diff --git a/.gitignore b/.gitignore index 114209c..cc2a4bd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ composer.phar /vendor/ -.idea/ # Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control # You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 0de9f64..472c61e 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -5,6 +5,7 @@ README.md composer.json docs/Api/AccountApi.md +docs/Api/AeEmployeeAssessmentApi.md docs/Api/AnalysisCategoryApi.md docs/Api/AttachmentOrderApi.md docs/Api/AuditApi.md @@ -78,6 +79,9 @@ docs/Model/AeAssessment.md docs/Model/AeAssessmentAction.md docs/Model/AeEmployeeState.md docs/Model/AeExclusionCode.md +docs/Model/AeLetter.md +docs/Model/AeLetterSentType.md +docs/Model/AeReason.md docs/Model/AeStatus.md docs/Model/AeStatutoryLetter.md docs/Model/AeUKWorker.md @@ -156,6 +160,9 @@ docs/Model/ContractAddress.md docs/Model/ContractAeAssessmentAction.md docs/Model/ContractAeAssessmentRequest.md docs/Model/ContractAeAssessmentResponse.md +docs/Model/ContractAeEmployeeAssessmentHistoryRequest.md +docs/Model/ContractAeEmployeeAssessmentHistoryResponse.md +docs/Model/ContractAeEmployeeLetterResponse.md docs/Model/ContractAllowanceGradesRequest.md docs/Model/ContractAllowanceGradesResponse.md docs/Model/ContractAllowanceGradesUpdateRequest.md @@ -168,6 +175,9 @@ docs/Model/ContractAutoEnrolmentResponse.md docs/Model/ContractAutoEnrolmentSettingsRequest.md docs/Model/ContractAutoEnrolmentSettingsResponse.md docs/Model/ContractBankDetails.md +docs/Model/ContractBenefitCarImportRequest.md +docs/Model/ContractBenefitImportRequest.md +docs/Model/ContractBenefitLoanImportRequest.md docs/Model/ContractCisDetailsRequest.md docs/Model/ContractCisDetailsResponse.md docs/Model/ContractCisPartnership.md @@ -175,6 +185,7 @@ docs/Model/ContractCisSubContractor.md docs/Model/ContractCisSubContractorItem.md docs/Model/ContractCisVerificationDetailsRequest.md docs/Model/ContractCisVerificationDetailsResponse.md +docs/Model/ContractCombinedPensionContributionsReportRequest.md docs/Model/ContractCostCentreJournalOverridesRequest.md docs/Model/ContractCostCentreJournalOverridesResponse.md docs/Model/ContractCostCentreJournalOverridesResponseItem.md @@ -191,6 +202,7 @@ docs/Model/ContractDirectorshipDetails.md docs/Model/ContractEmployeeItem.md docs/Model/ContractEmployeeLeaveSettingsRequest.md docs/Model/ContractEmployeeLeaveSettingsResponse.md +docs/Model/ContractEmployeeNavigationResponse.md docs/Model/ContractEmployeePaymentsReportRequest.md docs/Model/ContractEmployeeResponse.md docs/Model/ContractEmployeeRoleAnalysisCategoryCodeRequest.md @@ -200,6 +212,7 @@ docs/Model/ContractEmployeeRoleResponse.md docs/Model/ContractEmployeeRoleWorkingPatternRequest.md docs/Model/ContractEmployeeRoleWorkingPatternResponse.md docs/Model/ContractEmployeeRoleWorkingPatternResponseItem.md +docs/Model/ContractEmployeeSupplementaryPayRunResponse.md docs/Model/ContractEmployerBase.md docs/Model/ContractEmployerLeaveSettingsRequest.md docs/Model/ContractEmployerLeaveSettingsResponse.md @@ -237,6 +250,7 @@ docs/Model/ContractNetOfOnCostsSimulationResponse.md docs/Model/ContractOverseasEmployerDetails.md docs/Model/ContractP11HistoryRequest.md docs/Model/ContractP11HistoryResponse.md +docs/Model/ContractP45AvailabilityResponse.md docs/Model/ContractPartnerDetails.md docs/Model/ContractPayHistoryRequest.md docs/Model/ContractPayHistoryResponse.md @@ -247,6 +261,8 @@ docs/Model/ContractPayOptionsBaseResponse.md docs/Model/ContractPayOptionsImportRequest.md docs/Model/ContractPayOptionsRequest.md docs/Model/ContractPayOptionsResponse.md +docs/Model/ContractPayPeriodOrdinalSelection.md +docs/Model/ContractPayRunOverridesImportRequest.md docs/Model/ContractPayRunResponseItem.md docs/Model/ContractPayRunStateHistoryResponse.md docs/Model/ContractPayScheduleByDateRangeRequest.md @@ -259,6 +275,7 @@ docs/Model/ContractPaySpineResponse.md docs/Model/ContractPaySpineUpdateRequest.md docs/Model/ContractPaylineAnalysisCategoriesCodes.md docs/Model/ContractPaylineRequest.md +docs/Model/ContractPaymentImportRequest.md docs/Model/ContractPayrollSquadEmployerRequest.md docs/Model/ContractPayrollSquadEmployerResponse.md docs/Model/ContractPayrollSquadMemberRequest.md @@ -299,6 +316,7 @@ docs/Model/ContractRtiEmployeeAddress.md docs/Model/ContractRtiEmployeeName.md docs/Model/ContractRtiSubmissionSettingsRequest.md docs/Model/ContractRtiSubmissionSettingsResponse.md +docs/Model/ContractSharedBankDetails.md docs/Model/ContractShiftWorkingPatternDayRequest.md docs/Model/ContractShiftWorkingPatternDayResponse.md docs/Model/ContractSpinalPointRequest.md @@ -331,7 +349,12 @@ docs/Model/CostOfEmploymentReport.md docs/Model/CostOfEmploymentReportLine.md docs/Model/CostOfEmploymentReportReportResponse.md docs/Model/Country.md +docs/Model/CountryCode.md docs/Model/CsvFileFormat.md +docs/Model/CyclicReenrolmentReport.md +docs/Model/CyclicReenrolmentReportGroup.md +docs/Model/CyclicReenrolmentReportLine.md +docs/Model/CyclicReenrolmentReportReportResponse.md docs/Model/DayOfWeek.md docs/Model/DaysBeforePayday.md docs/Model/DecimalDecimalBooleanPensionRuleValueTuple.md @@ -353,11 +376,13 @@ docs/Model/EmployeeCostCentre.md docs/Model/EmployeeLeaveReport.md docs/Model/EmployeeLeaveReportLine.md docs/Model/EmployeeLeaveReportReportResponse.md +docs/Model/EmployeeLoanExportReport.md +docs/Model/EmployeeLoanExportReportLine.md +docs/Model/EmployeeLoanExportReportReportResponse.md docs/Model/EmployeeNiYtdValues.md docs/Model/EmployeePayRunTotal.md -docs/Model/EmployeePaymentsReport.md docs/Model/EmployeePaymentsReportLine.md -docs/Model/EmployeePaymentsReportReportResponse.md +docs/Model/EmployeePaymentsReportLineListReportResponse.md docs/Model/EmployeeRole.md docs/Model/EmployeeRoleAnalysisCategoryCode.md docs/Model/EmployeeRolePayItem.md @@ -365,6 +390,7 @@ docs/Model/EmployeeRolePayOptions.md docs/Model/EmployeeSortBy.md docs/Model/EmployeeStatus.md docs/Model/EmployeeYtdValues.md +docs/Model/EmployerBetaFeatures.md docs/Model/EmployerDefaults.md docs/Model/EmployerEmail.md docs/Model/EmployerEvcOptInHistory.md @@ -482,6 +508,7 @@ docs/Model/LeaveAssumedPensionablePay.md docs/Model/LeaveCalculationType.md docs/Model/LeaveCustomPayment.md docs/Model/LeaveCustomProRataRule.md +docs/Model/LeaveNotionalPayDetails.md docs/Model/LeavePayType.md docs/Model/LeaveProRataRule.md docs/Model/LeaveSettings.md @@ -528,6 +555,7 @@ docs/Model/NicSummary.md docs/Model/NominalCodeMapping.md docs/Model/Note.md docs/Model/NoteType.md +docs/Model/NotionalPayPeriodBreakdown.md docs/Model/Nvr.md docs/Model/NvrEmployee.md docs/Model/NvrEmployeeDetails.md @@ -612,6 +640,7 @@ docs/Model/PayRun.md docs/Model/PayRunChanges.md docs/Model/PayRunCsvType.md docs/Model/PayRunEntry.md +docs/Model/PayRunEntryNavigation.md docs/Model/PayRunEntrySortBy.md docs/Model/PayRunEntryWarningType.md docs/Model/PayRunJournal.md @@ -669,6 +698,7 @@ docs/Model/PensionContributionLevelType.md docs/Model/PensionContributionsSubmission.md docs/Model/PensionCsvFormat.md docs/Model/PensionEndReason.md +docs/Model/PensionInitialEnrolmentType.md docs/Model/PensionJoinReason.md docs/Model/PensionMembershipReportLine.md docs/Model/PensionMembershipsReport.md @@ -683,10 +713,12 @@ docs/Model/PensionScheme.md docs/Model/PensionSchemeNominalCodeMapping.md docs/Model/PensionSchemeReportOptionsLgpsCivicaUpm.md docs/Model/PensionSchemeReportOptionsLgpsIConnect.md +docs/Model/PensionSingleEmploymentRelationship.md docs/Model/PensionSummary.md docs/Model/PensionSummaryCostBreakdown.md docs/Model/PensionablePayDefinition.md docs/Model/PensionerPayroll.md +docs/Model/PercentOfPayBand.md docs/Model/PeriodValue.md docs/Model/PeriodValuePeriodValues.md docs/Model/PersonalDetails.md @@ -696,6 +728,7 @@ docs/Model/ProRataRule.md docs/Model/ProcessingNote.md docs/Model/ProcessingNoteStatus.md docs/Model/RecoverableAmounts.md +docs/Model/ReenrolmentStatus.md docs/Model/Report.md docs/Model/ReportCustomCssOption.md docs/Model/ReportFormat.md @@ -739,6 +772,7 @@ docs/Model/StringStringKeyValuePair.md docs/Model/StudentLoan.md docs/Model/StudentLoanRecovered.md docs/Model/SubmissionStatus.md +docs/Model/SupplementaryPayRunDetails.md docs/Model/Tag.md docs/Model/TaxAndNi.md docs/Model/TaxBracket.md @@ -771,6 +805,7 @@ docs/Model/User.md docs/Model/UserAuthorization.md docs/Model/UserCategory.md docs/Model/UserDisplayPreferences.md +docs/Model/UserEmployer.md docs/Model/UserIndustry.md docs/Model/UserJobType.md docs/Model/UserRole.md @@ -799,6 +834,7 @@ docs/Model/ZeroPaidFilter.md git_push.sh phpunit.xml.dist src/Api/AccountApi.php +src/Api/AeEmployeeAssessmentApi.php src/Api/AnalysisCategoryApi.php src/Api/AttachmentOrderApi.php src/Api/AuditApi.php @@ -865,6 +901,7 @@ src/Api/WebhookApi.php src/Api/WorkingPatternApi.php src/ApiException.php src/Configuration.php +src/FormDataProcessor.php src/HeaderSelector.php src/Model/Address.php src/Model/AdvancedVarianceReport.php @@ -875,6 +912,9 @@ src/Model/AeAssessment.php src/Model/AeAssessmentAction.php src/Model/AeEmployeeState.php src/Model/AeExclusionCode.php +src/Model/AeLetter.php +src/Model/AeLetterSentType.php +src/Model/AeReason.php src/Model/AeStatus.php src/Model/AeStatutoryLetter.php src/Model/AeUKWorker.php @@ -953,6 +993,9 @@ src/Model/ContractAddress.php src/Model/ContractAeAssessmentAction.php src/Model/ContractAeAssessmentRequest.php src/Model/ContractAeAssessmentResponse.php +src/Model/ContractAeEmployeeAssessmentHistoryRequest.php +src/Model/ContractAeEmployeeAssessmentHistoryResponse.php +src/Model/ContractAeEmployeeLetterResponse.php src/Model/ContractAllowanceGradesRequest.php src/Model/ContractAllowanceGradesResponse.php src/Model/ContractAllowanceGradesUpdateRequest.php @@ -965,6 +1008,9 @@ src/Model/ContractAutoEnrolmentResponse.php src/Model/ContractAutoEnrolmentSettingsRequest.php src/Model/ContractAutoEnrolmentSettingsResponse.php src/Model/ContractBankDetails.php +src/Model/ContractBenefitCarImportRequest.php +src/Model/ContractBenefitImportRequest.php +src/Model/ContractBenefitLoanImportRequest.php src/Model/ContractCisDetailsRequest.php src/Model/ContractCisDetailsResponse.php src/Model/ContractCisPartnership.php @@ -972,6 +1018,7 @@ src/Model/ContractCisSubContractor.php src/Model/ContractCisSubContractorItem.php src/Model/ContractCisVerificationDetailsRequest.php src/Model/ContractCisVerificationDetailsResponse.php +src/Model/ContractCombinedPensionContributionsReportRequest.php src/Model/ContractCostCentreJournalOverridesRequest.php src/Model/ContractCostCentreJournalOverridesResponse.php src/Model/ContractCostCentreJournalOverridesResponseItem.php @@ -988,6 +1035,7 @@ src/Model/ContractDirectorshipDetails.php src/Model/ContractEmployeeItem.php src/Model/ContractEmployeeLeaveSettingsRequest.php src/Model/ContractEmployeeLeaveSettingsResponse.php +src/Model/ContractEmployeeNavigationResponse.php src/Model/ContractEmployeePaymentsReportRequest.php src/Model/ContractEmployeeResponse.php src/Model/ContractEmployeeRoleAnalysisCategoryCodeRequest.php @@ -997,6 +1045,7 @@ src/Model/ContractEmployeeRoleResponse.php src/Model/ContractEmployeeRoleWorkingPatternRequest.php src/Model/ContractEmployeeRoleWorkingPatternResponse.php src/Model/ContractEmployeeRoleWorkingPatternResponseItem.php +src/Model/ContractEmployeeSupplementaryPayRunResponse.php src/Model/ContractEmployerBase.php src/Model/ContractEmployerLeaveSettingsRequest.php src/Model/ContractEmployerLeaveSettingsResponse.php @@ -1034,6 +1083,7 @@ src/Model/ContractNetOfOnCostsSimulationResponse.php src/Model/ContractOverseasEmployerDetails.php src/Model/ContractP11HistoryRequest.php src/Model/ContractP11HistoryResponse.php +src/Model/ContractP45AvailabilityResponse.php src/Model/ContractPartnerDetails.php src/Model/ContractPayHistoryRequest.php src/Model/ContractPayHistoryResponse.php @@ -1044,6 +1094,8 @@ src/Model/ContractPayOptionsBaseResponse.php src/Model/ContractPayOptionsImportRequest.php src/Model/ContractPayOptionsRequest.php src/Model/ContractPayOptionsResponse.php +src/Model/ContractPayPeriodOrdinalSelection.php +src/Model/ContractPayRunOverridesImportRequest.php src/Model/ContractPayRunResponseItem.php src/Model/ContractPayRunStateHistoryResponse.php src/Model/ContractPayScheduleByDateRangeRequest.php @@ -1056,6 +1108,7 @@ src/Model/ContractPaySpineResponse.php src/Model/ContractPaySpineUpdateRequest.php src/Model/ContractPaylineAnalysisCategoriesCodes.php src/Model/ContractPaylineRequest0.php +src/Model/ContractPaymentImportRequest.php src/Model/ContractPayrollSquadEmployerRequest.php src/Model/ContractPayrollSquadEmployerResponse.php src/Model/ContractPayrollSquadMemberRequest.php @@ -1096,6 +1149,7 @@ src/Model/ContractRtiEmployeeAddress.php src/Model/ContractRtiEmployeeName.php src/Model/ContractRtiSubmissionSettingsRequest.php src/Model/ContractRtiSubmissionSettingsResponse.php +src/Model/ContractSharedBankDetails.php src/Model/ContractShiftWorkingPatternDayRequest.php src/Model/ContractShiftWorkingPatternDayResponse.php src/Model/ContractSpinalPointRequest.php @@ -1128,7 +1182,12 @@ src/Model/CostOfEmploymentReport.php src/Model/CostOfEmploymentReportLine.php src/Model/CostOfEmploymentReportReportResponse.php src/Model/Country.php +src/Model/CountryCode.php src/Model/CsvFileFormat.php +src/Model/CyclicReenrolmentReport.php +src/Model/CyclicReenrolmentReportGroup.php +src/Model/CyclicReenrolmentReportLine.php +src/Model/CyclicReenrolmentReportReportResponse.php src/Model/DayOfWeek.php src/Model/DaysBeforePayday.php src/Model/DecimalDecimalBooleanPensionRuleValueTuple.php @@ -1150,11 +1209,13 @@ src/Model/EmployeeCostCentre.php src/Model/EmployeeLeaveReport.php src/Model/EmployeeLeaveReportLine.php src/Model/EmployeeLeaveReportReportResponse.php +src/Model/EmployeeLoanExportReport.php +src/Model/EmployeeLoanExportReportLine.php +src/Model/EmployeeLoanExportReportReportResponse.php src/Model/EmployeeNiYtdValues.php src/Model/EmployeePayRunTotal.php -src/Model/EmployeePaymentsReport.php src/Model/EmployeePaymentsReportLine.php -src/Model/EmployeePaymentsReportReportResponse.php +src/Model/EmployeePaymentsReportLineListReportResponse.php src/Model/EmployeeRole.php src/Model/EmployeeRoleAnalysisCategoryCode.php src/Model/EmployeeRolePayItem.php @@ -1162,6 +1223,7 @@ src/Model/EmployeeRolePayOptions.php src/Model/EmployeeSortBy.php src/Model/EmployeeStatus.php src/Model/EmployeeYtdValues.php +src/Model/EmployerBetaFeatures.php src/Model/EmployerDefaults.php src/Model/EmployerEmail.php src/Model/EmployerEvcOptInHistory.php @@ -1279,6 +1341,7 @@ src/Model/LeaveAssumedPensionablePay.php src/Model/LeaveCalculationType.php src/Model/LeaveCustomPayment.php src/Model/LeaveCustomProRataRule.php +src/Model/LeaveNotionalPayDetails.php src/Model/LeavePayType.php src/Model/LeaveProRataRule.php src/Model/LeaveSettings.php @@ -1326,6 +1389,7 @@ src/Model/NicSummary.php src/Model/NominalCodeMapping.php src/Model/Note.php src/Model/NoteType.php +src/Model/NotionalPayPeriodBreakdown.php src/Model/Nvr.php src/Model/NvrEmployee.php src/Model/NvrEmployeeDetails.php @@ -1410,6 +1474,7 @@ src/Model/PayRun.php src/Model/PayRunChanges.php src/Model/PayRunCsvType.php src/Model/PayRunEntry.php +src/Model/PayRunEntryNavigation.php src/Model/PayRunEntrySortBy.php src/Model/PayRunEntryWarningType.php src/Model/PayRunJournal.php @@ -1467,6 +1532,7 @@ src/Model/PensionContributionLevelType.php src/Model/PensionContributionsSubmission.php src/Model/PensionCsvFormat.php src/Model/PensionEndReason.php +src/Model/PensionInitialEnrolmentType.php src/Model/PensionJoinReason.php src/Model/PensionMembershipReportLine.php src/Model/PensionMembershipsReport.php @@ -1481,10 +1547,12 @@ src/Model/PensionScheme.php src/Model/PensionSchemeNominalCodeMapping.php src/Model/PensionSchemeReportOptionsLgpsCivicaUpm.php src/Model/PensionSchemeReportOptionsLgpsIConnect.php +src/Model/PensionSingleEmploymentRelationship.php src/Model/PensionSummary.php src/Model/PensionSummaryCostBreakdown.php src/Model/PensionablePayDefinition.php src/Model/PensionerPayroll.php +src/Model/PercentOfPayBand.php src/Model/PeriodValue.php src/Model/PeriodValuePeriodValues.php src/Model/PersonalDetails.php @@ -1494,6 +1562,7 @@ src/Model/ProRataRule.php src/Model/ProcessingNote.php src/Model/ProcessingNoteStatus.php src/Model/RecoverableAmounts.php +src/Model/ReenrolmentStatus.php src/Model/Report.php src/Model/ReportCustomCssOption.php src/Model/ReportFormat.php @@ -1537,6 +1606,7 @@ src/Model/StringStringKeyValuePair.php src/Model/StudentLoan.php src/Model/StudentLoanRecovered.php src/Model/SubmissionStatus.php +src/Model/SupplementaryPayRunDetails.php src/Model/Tag.php src/Model/TaxAndNi.php src/Model/TaxBracket.php @@ -1569,6 +1639,7 @@ src/Model/User.php src/Model/UserAuthorization.php src/Model/UserCategory.php src/Model/UserDisplayPreferences.php +src/Model/UserEmployer.php src/Model/UserIndustry.php src/Model/UserJobType.php src/Model/UserRole.php diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 96cfbb1..193a12d 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.13.0-SNAPSHOT +7.20.0-SNAPSHOT diff --git a/README.md b/README.md index 825de35..66fedc5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -For more information, please visit [http://www.staffology.co.uk](http://www.staffology.co.uk). +For more information, please visit [https://www.staffology.co.uk](https://www.staffology.co.uk). ## Installation & Usage @@ -97,6 +97,17 @@ Class | Method | HTTP request | Description *AccountApi* | [**updatePhotoAccount**](docs/Api/AccountApi.md#updatephotoaccount) | **POST** /account/photo | Update Photo *AccountApi* | [**verifyAccount**](docs/Api/AccountApi.md#verifyaccount) | **POST** /account/verify | Re-send Verification Email *AccountApi* | [**verifyResponseAccount**](docs/Api/AccountApi.md#verifyresponseaccount) | **PUT** /account/verify/respond | Verify Email Address +*AeEmployeeAssessmentApi* | [**assessAeEmployeeAssessment**](docs/Api/AeEmployeeAssessmentApi.md#assessaeemployeeassessment) | **POST** /employers/{employerId}/aeassessments/employees/{employeeId}/assess | Process AE Assessment for Employee during PayRun +*AeEmployeeAssessmentApi* | [**createAeEmployeeAssessmentAeEmployeeAssessment**](docs/Api/AeEmployeeAssessmentApi.md#createaeemployeeassessmentaeemployeeassessment) | **POST** /employers/{employerId}/aeassessments/employees/{employeeId}/create | Create employee auto enrolment assessment +*AeEmployeeAssessmentApi* | [**emailAeLetterAeEmployeeAssessment**](docs/Api/AeEmployeeAssessmentApi.md#emailaeletteraeemployeeassessment) | **POST** /employers/{employerId}/aeassessments/employees/{employeeId}/{id}/letter/email | Email AeLetter +*AeEmployeeAssessmentApi* | [**getAeEmployeeAssessmentsAeEmployeeAssessment**](docs/Api/AeEmployeeAssessmentApi.md#getaeemployeeassessmentsaeemployeeassessment) | **GET** /employers/{employerId}/aeassessments/employees/{employeeId}/aeEmployeeAssessments | List employee auto enrolment assessment +*AeEmployeeAssessmentApi* | [**getAeLetterAeEmployeeAssessment**](docs/Api/AeEmployeeAssessmentApi.md#getaeletteraeemployeeassessment) | **GET** /employers/{employerId}/aeassessments/employees/{employeeId}/{id}/letter | Get AeLetter +*AeEmployeeAssessmentApi* | [**getEmployeeLettersAeEmployeeAssessment**](docs/Api/AeEmployeeAssessmentApi.md#getemployeelettersaeemployeeassessment) | **GET** /employers/{employerId}/aeassessments/employees/{employeeId}/letters/{taxYear} | Get letters for an employee based on tax year +*AeEmployeeAssessmentApi* | [**getPendingLettersAeEmployeeAssessment**](docs/Api/AeEmployeeAssessmentApi.md#getpendinglettersaeemployeeassessment) | **GET** /employers/{employerId}/aeassessments/letters/pending | Get pending letters for an employer +*AeEmployeeAssessmentApi* | [**getPendingLettersCountAeEmployeeAssessment**](docs/Api/AeEmployeeAssessmentApi.md#getpendingletterscountaeemployeeassessment) | **GET** /employers/{employerId}/aeassessments/letters/pending/count | Get count of pending pension letters for an employer +*AeEmployeeAssessmentApi* | [**getReenrolmentDatesAeEmployeeAssessment**](docs/Api/AeEmployeeAssessmentApi.md#getreenrolmentdatesaeemployeeassessment) | **GET** /employers/{employerId}/aeassessments/reenrolmentdates | Gets a list of re-enrolment dates for the employer +*AeEmployeeAssessmentApi* | [**markAeLetterAsSentAeEmployeeAssessment**](docs/Api/AeEmployeeAssessmentApi.md#markaeletterassentaeemployeeassessment) | **PUT** /employers/{employerId}/aeassessments/employees/{employeeId}/{id}/letter/sent | Mark Letter as Sent +*AeEmployeeAssessmentApi* | [**markAeLettersAsSentAeEmployeeAssessment**](docs/Api/AeEmployeeAssessmentApi.md#markaelettersassentaeemployeeassessment) | **PUT** /employers/{employerId}/aeassessments/letters/sent | Mark All Letters as Sent *AnalysisCategoryApi* | [**createAnalysisCategory**](docs/Api/AnalysisCategoryApi.md#createanalysiscategory) | **POST** /employers/{employerId}/analysiscategories | Create AnalysisCategory *AnalysisCategoryApi* | [**createAnalysisCategoryCodeAnalysisCategory**](docs/Api/AnalysisCategoryApi.md#createanalysiscategorycodeanalysiscategory) | **POST** /employers/{employerId}/analysiscategories/{analysisCategoryId}/categorycodes | Create AnalysisCategoryCode *AnalysisCategoryApi* | [**deleteAnalysisCategory**](docs/Api/AnalysisCategoryApi.md#deleteanalysiscategory) | **DELETE** /employers/{employerId}/analysiscategories/{id} | Delete AnalysisCategory @@ -198,14 +209,17 @@ Class | Method | HTTP request | Description *DpsApi* | [**deleteDps**](docs/Api/DpsApi.md#deletedps) | **DELETE** /employers/{employerId}/dps/notices/{id} | Delete Notice *DpsApi* | [**getDps**](docs/Api/DpsApi.md#getdps) | **GET** /employers/{employerId}/dps/notices/{id} | Get Notice *DpsApi* | [**getDpsSettingsDps**](docs/Api/DpsApi.md#getdpssettingsdps) | **GET** /employers/{employerId}/dps/settings | Get DPS Settings +*DpsApi* | [**listEmployeeNoticesDps**](docs/Api/DpsApi.md#listemployeenoticesdps) | **GET** /employers/{employerId}/dps/employeeNotices/{employeeId} | List Employee Notices *DpsApi* | [**listNoticesDps**](docs/Api/DpsApi.md#listnoticesdps) | **GET** /employers/{employerId}/dps/notices | List Notices *DpsApi* | [**parseXmlDps**](docs/Api/DpsApi.md#parsexmldps) | **POST** /employers/{employerId}/dps/notices/xml | Parse notices from XML *DpsApi* | [**reapplyNoticesDps**](docs/Api/DpsApi.md#reapplynoticesdps) | **PUT** /employers/{employerId}/dps/reapply | Reapply DpsNotices *DpsApi* | [**updateDpsSettingsDps**](docs/Api/DpsApi.md#updatedpssettingsdps) | **PUT** /employers/{employerId}/dps/settings | Update DPS Settings +*EmailApi* | [**authorizeEmail**](docs/Api/EmailApi.md#authorizeemail) | **GET** /employers/{employerId}/email/authorize | Microsoft login for authorization *EmailApi* | [**getEmailEmail**](docs/Api/EmailApi.md#getemailemail) | **GET** /employers/{employerId}/email/{emailId} | Get Email *EmailApi* | [**getMailSettingsEmail**](docs/Api/EmailApi.md#getmailsettingsemail) | **GET** /employers/{employerId}/email/settings | Get MailSettings *EmailApi* | [**indexEmail**](docs/Api/EmailApi.md#indexemail) | **GET** /employers/{employerId}/email | List Emails *EmailApi* | [**resendEmailEmail**](docs/Api/EmailApi.md#resendemailemail) | **POST** /employers/{employerId}/email/{emailId} | Re-send Email +*EmailApi* | [**saveOAuthTokenEmail**](docs/Api/EmailApi.md#saveoauthtokenemail) | **POST** /employers/{employerId}/email/token | Update token details by Authorization code *EmailApi* | [**testMailSettingsEmail**](docs/Api/EmailApi.md#testmailsettingsemail) | **POST** /employers/{employerId}/email/settings/test | Send Test Email *EmailApi* | [**updateMailSettingsEmail**](docs/Api/EmailApi.md#updatemailsettingsemail) | **PUT** /employers/{employerId}/email/settings | Update MailSettings *EmailApi* | [**verifyMailSettingsEmail**](docs/Api/EmailApi.md#verifymailsettingsemail) | **POST** /employers/{employerId}/email/settings/verify | Email Verification (Request) @@ -220,9 +234,12 @@ Class | Method | HTTP request | Description *EmployeeApi* | [**deleteMultipleEmployee**](docs/Api/EmployeeApi.md#deletemultipleemployee) | **POST** /employers/{employerId}/employees/delete | Delete Employees *EmployeeApi* | [**deletePhotoEmployee**](docs/Api/EmployeeApi.md#deletephotoemployee) | **DELETE** /employers/{employerId}/employees/{id}/photo | Delete Photo *EmployeeApi* | [**expiringRtwEmployee**](docs/Api/EmployeeApi.md#expiringrtwemployee) | **GET** /employers/{employerId}/employees/expiring-rtw | Expiring RightToWork +*EmployeeApi* | [**fpsEmployeesEmployee**](docs/Api/EmployeeApi.md#fpsemployeesemployee) | **POST** /employers/{employerId}/employees/list | Get list of FPS Employees for EYFPS for the given Ids *EmployeeApi* | [**getDepartmentMembershipsEmployee**](docs/Api/EmployeeApi.md#getdepartmentmembershipsemployee) | **GET** /employers/{employerId}/employees/{id}/departments | Get Employee Departments *EmployeeApi* | [**getEmployee**](docs/Api/EmployeeApi.md#getemployee) | **GET** /employers/{employerId}/employees/{id} | Get an Employee *EmployeeApi* | [**getEmployeeCostCentresEmployee**](docs/Api/EmployeeApi.md#getemployeecostcentresemployee) | **GET** /employers/{employerId}/employees/{id}/costcentres | Get Employee Cost Centres +*EmployeeApi* | [**getEmployeeNavigationEmployee**](docs/Api/EmployeeApi.md#getemployeenavigationemployee) | **GET** /employers/{employerId}/employees/{id}/navigation | Get employee navigation details for a specific employee +*EmployeeApi* | [**getEmployeesForSupplementaryPayRunEmployee**](docs/Api/EmployeeApi.md#getemployeesforsupplementarypayrunemployee) | **GET** /employers/{employerId}/employees/{ordinal}/{periodNumber}/{taxYear}/{payPeriod}/supplementary | Get List of Employees for Supplementary PayRun *EmployeeApi* | [**getEvcSettingsEmployee**](docs/Api/EmployeeApi.md#getevcsettingsemployee) | **GET** /employers/{employerId}/employees/{id}/evcsettings | Get EvcSettings *EmployeeApi* | [**importCsvEmployee**](docs/Api/EmployeeApi.md#importcsvemployee) | **POST** /employers/{employerId}/employees/import | Import CSV *EmployeeApi* | [**indexEmployee**](docs/Api/EmployeeApi.md#indexemployee) | **GET** /employers/{employerId}/employees | List Employees @@ -270,6 +287,8 @@ Class | Method | HTTP request | Description *EmployerApi* | [**getEmployerOpeningBalancesEmployer**](docs/Api/EmployerApi.md#getemployeropeningbalancesemployer) | **GET** /employers/{id}/openingbalances | Get EmployerOpeningBalances *EmployerApi* | [**getEvcOptInHistoryEmployer**](docs/Api/EmployerApi.md#getevcoptinhistoryemployer) | **GET** /employers/{id}/evc | Get EVC OptIn History *EmployerApi* | [**getGroupMembershipsEmployer**](docs/Api/EmployerApi.md#getgroupmembershipsemployer) | **GET** /employers/{id}/groups | Get Employer Groups +*EmployerApi* | [**getReenrolmentStatusEmployer**](docs/Api/EmployerApi.md#getreenrolmentstatusemployer) | **GET** /employers/reenrolmentstatus | Gets the re-enrolment status for the employer +*EmployerApi* | [**getUserEmployerEmployer**](docs/Api/EmployerApi.md#getuseremployeremployer) | **GET** /employers/{id}/users/userEmployer | Get User Employer *EmployerApi* | [**importCsvEmployer**](docs/Api/EmployerApi.md#importcsvemployer) | **POST** /employers/import | Import CSV *EmployerApi* | [**indexEmployer**](docs/Api/EmployerApi.md#indexemployer) | **GET** /employers | List Employers *EmployerApi* | [**listUsersEmployer**](docs/Api/EmployerApi.md#listusersemployer) | **GET** /employers/{id}/users | List Users @@ -285,6 +304,7 @@ Class | Method | HTTP request | Description *EmployerApi* | [**updateAutomationSettingsEmployer**](docs/Api/EmployerApi.md#updateautomationsettingsemployer) | **PUT** /employers/{id}/automation | Update Automation Settings *EmployerApi* | [**updateCustomPayslipEmployer**](docs/Api/EmployerApi.md#updatecustompayslipemployer) | **POST** /employers/{id}/custompayslip | Update Payslip Customisations *EmployerApi* | [**updateEmployer**](docs/Api/EmployerApi.md#updateemployer) | **PUT** /employers/{id} | Update an Employer +*EmployerApi* | [**updateEmployerCanUsePremiumConnectorsEmployer**](docs/Api/EmployerApi.md#updateemployercanusepremiumconnectorsemployer) | **PUT** /employers/{id}/can-use-premium-connectors | Update Can Use Premium Connectors Setting *EmployerApi* | [**updateEmployerOpeningBalancesEmployer**](docs/Api/EmployerApi.md#updateemployeropeningbalancesemployer) | **PUT** /employers/{id}/openingbalances | Update EmployerOpeningBalances *EmployerApi* | [**updateLogoEmployer**](docs/Api/EmployerApi.md#updatelogoemployer) | **POST** /employers/{id}/logo | Update Employer Logo *EmployerGroupApi* | [**createEmployerGroup**](docs/Api/EmployerGroupApi.md#createemployergroup) | **POST** /employers/groups | Create EmployerGroup @@ -323,6 +343,7 @@ Class | Method | HTTP request | Description *ExbApi* | [**updateExb**](docs/Api/ExbApi.md#updateexb) | **PUT** /employers/{employerId}/rti/exb/{taxYear}/{id} | Update EXB *ExternalDataApi* | [**authorizeExternalData**](docs/Api/ExternalDataApi.md#authorizeexternaldata) | **GET** /employers/{employerId}/external-data/{id}/authorize | Get Authorization Url *ExternalDataApi* | [**companiesExternalData**](docs/Api/ExternalDataApi.md#companiesexternaldata) | **GET** /employers/{employerId}/external-data/{id}/companies | List Companies +*ExternalDataApi* | [**createStackOneSessionTokenExternalData**](docs/Api/ExternalDataApi.md#createstackonesessiontokenexternaldata) | **POST** /employers/{employerId}/external-data/create-stackone-session-token | Get StackOne session token *ExternalDataApi* | [**disconnectExternalData**](docs/Api/ExternalDataApi.md#disconnectexternaldata) | **GET** /employers/{employerId}/external-data/{id}/disconnect | Disconnect *ExternalDataApi* | [**employeeExternalData**](docs/Api/ExternalDataApi.md#employeeexternaldata) | **GET** /employers/{employerId}/external-data/{id}/employees/{employeeId} | Get Employee *ExternalDataApi* | [**employeeLogsExternalData**](docs/Api/ExternalDataApi.md#employeelogsexternaldata) | **GET** /employers/{employerId}/external-data/{id}/employees/{employeeId}/logs | Get Employee Logs @@ -353,15 +374,19 @@ Class | Method | HTTP request | Description *ExternalDataApi* | [**timeAndAttendanceExternalData**](docs/Api/ExternalDataApi.md#timeandattendanceexternaldata) | **GET** /employers/{employerId}/external-data/{id}/time-and-attendance | Get Time And Attendance Data *ExternalDataApi* | [**updateEmployeeExternalData**](docs/Api/ExternalDataApi.md#updateemployeeexternaldata) | **PUT** /employers/{employerId}/external-data/{id}/employees/{employeeId} | Update Employee *FpsApi* | [**createFps**](docs/Api/FpsApi.md#createfps) | **POST** /employers/{employerId}/rti/fps/{taxYear} | Create FPS +*FpsApi* | [**createFpsWithMultipleEmployeesFps**](docs/Api/FpsApi.md#createfpswithmultipleemployeesfps) | **POST** /employers/{employerId}/rti/fps/multiple/{taxYear} | Create FPS with multiple employees *FpsApi* | [**deleteFps**](docs/Api/FpsApi.md#deletefps) | **DELETE** /employers/{employerId}/rti/fps/{taxYear}/{id} | Delete FPS *FpsApi* | [**getFps**](docs/Api/FpsApi.md#getfps) | **GET** /employers/{employerId}/rti/fps/{taxYear}/{id} | Get FPS +*FpsApi* | [**getFpsesForEmployeeFps**](docs/Api/FpsApi.md#getfpsesforemployeefps) | **GET** /employers/{employerId}/rti/fps/{taxYear}/employee/{employeeId} | Get all FPS for Employee *FpsApi* | [**getXmlRequestFps**](docs/Api/FpsApi.md#getxmlrequestfps) | **GET** /employers/{employerId}/rti/fps/{taxYear}/{id}/xml/request | Get XML Request *FpsApi* | [**listFps**](docs/Api/FpsApi.md#listfps) | **GET** /employers/{employerId}/rti/fps/{taxYear} | List FPS *FpsApi* | [**markAsAcceptedFps**](docs/Api/FpsApi.md#markasacceptedfps) | **POST** /employers/{employerId}/rti/fps/{taxYear}/{id}/markasaccepted | Mark as Sent *FpsApi* | [**mostRecentForEmployeeFps**](docs/Api/FpsApi.md#mostrecentforemployeefps) | **GET** /employers/{employerId}/rti/fps/{taxYear}/mostrecentforemployee/{employeeId} | Get most recent FPS for Employee +*FpsApi* | [**mostRecentForEmployeesFps**](docs/Api/FpsApi.md#mostrecentforemployeesfps) | **POST** /employers/{employerId}/rti/fps/{taxYear}/mostrecentforemployees | Get most recent FPS for Employees *FpsApi* | [**requiringAttentionFps**](docs/Api/FpsApi.md#requiringattentionfps) | **GET** /employers/{employerId}/rti/fps/requiringattention | FPS Requiring Attention *FpsApi* | [**submitFps**](docs/Api/FpsApi.md#submitfps) | **POST** /employers/{employerId}/rti/fps/{taxYear}/{id}/submit | Submit FPS *FpsApi* | [**updateFps**](docs/Api/FpsApi.md#updatefps) | **PUT** /employers/{employerId}/rti/fps/{taxYear}/{id} | Update FPS +*FpsApi* | [**updateFpsWithMultipleEmployeesFps**](docs/Api/FpsApi.md#updatefpswithmultipleemployeesfps) | **PUT** /employers/{employerId}/rti/fps/multiple/{taxYear}/{id} | Update FPS with multiple employees *HmrcPaymentApi* | [**bankPaymentHmrcPayment**](docs/Api/HmrcPaymentApi.md#bankpaymenthmrcpayment) | **GET** /employers/{employerId}/hmrcpayment/{taxYear}/{periodEnding}/bankpayment | HMRC Bank Payment *HmrcPaymentApi* | [**getHmrcPayment**](docs/Api/HmrcPaymentApi.md#gethmrcpayment) | **GET** /employers/{employerId}/hmrcpayment/{taxYear}/{periodEnding} | Get HmrcLiability *HmrcPaymentApi* | [**indexHmrcPayment**](docs/Api/HmrcPaymentApi.md#indexhmrcpayment) | **GET** /employers/{employerId}/hmrcpayment/{taxYear} | List HmrcLiabilities @@ -374,13 +399,17 @@ Class | Method | HTTP request | Description *ImportApi* | [**createPaymentsCsvMappingImport**](docs/Api/ImportApi.md#createpaymentscsvmappingimport) | **POST** /employers/{employerId}/import/payments/mappings | Create PaymentsCsvMapping *ImportApi* | [**deletePaymentCsvMappingImport**](docs/Api/ImportApi.md#deletepaymentcsvmappingimport) | **DELETE** /employers/{employerId}/import/payments/mappings/{id} | Delete PaymentsCsvMapping *ImportApi* | [**employeeImportCsvImport**](docs/Api/ImportApi.md#employeeimportcsvimport) | **POST** /employers/{employerId}/import/employees/async | Import Employees Asynchronously (Beta) +*ImportApi* | [**importBenefitsImport**](docs/Api/ImportApi.md#importbenefitsimport) | **POST** /employers/{employerId}/import/benefits | Import Benefits *ImportApi* | [**importEmployeePayImport**](docs/Api/ImportApi.md#importemployeepayimport) | **POST** /employers/{employerId}/import/pay | Import Pay To Employee *ImportApi* | [**importLeaveImport**](docs/Api/ImportApi.md#importleaveimport) | **POST** /employers/{employerId}/import/leave | Import Leave Asynchronously +*ImportApi* | [**importPayRunOverridesImport**](docs/Api/ImportApi.md#importpayrunoverridesimport) | **POST** /employers/{employerId}/import/{taxYear}/{payPeriod}/{periodNumber}/{ordinal}/payrun-overrides | Import Pay Run Overrides +*ImportApi* | [**importPaymentsImport**](docs/Api/ImportApi.md#importpaymentsimport) | **POST** /employers/{employerId}/import/payments | Import Permanent Addition and Deductions Payments *ImportApi* | [**importPensionMembershipsImport**](docs/Api/ImportApi.md#importpensionmembershipsimport) | **POST** /employers/{employerId}/import/pensionmemberships | Import PensionMemberships from csv file *ImportApi* | [**importRolesImport**](docs/Api/ImportApi.md#importrolesimport) | **POST** /employers/{employerId}/import/import | Import EmployeeRoles from csv file *ImportApi* | [**listPaymentsCsvMappingsImport**](docs/Api/ImportApi.md#listpaymentscsvmappingsimport) | **GET** /employers/{employerId}/import/payments/mappings | List PaymentsCsvMappings *ImportApi* | [**paymentsCsvMappingCsvFileImport**](docs/Api/ImportApi.md#paymentscsvmappingcsvfileimport) | **GET** /employers/{employerId}/import/payments/mappings/{id}/csv | Get PaymentsCsvMapping CSV File *ImportApi* | [**paymentsCsvMappingImport**](docs/Api/ImportApi.md#paymentscsvmappingimport) | **GET** /employers/{employerId}/import/payments/mappings/{id} | Get PaymentsCsvMapping +*ImportApi* | [**pensionImportCsvImport**](docs/Api/ImportApi.md#pensionimportcsvimport) | **POST** /employers/{employerId}/import/pensionmemberships/async | Import PensionMemberships from csv file (async) *ImportApi* | [**updatePaymentsCsvMappingImport**](docs/Api/ImportApi.md#updatepaymentscsvmappingimport) | **PUT** /employers/{employerId}/import/payments/mappings/{id} | Update PaymentsCsvMapping *InvitationApi* | [**acceptInvitation**](docs/Api/InvitationApi.md#acceptinvitation) | **POST** /invitations/{id} | Accept Invitation *InvitationApi* | [**createInvitation**](docs/Api/InvitationApi.md#createinvitation) | **POST** /employers/{employerId}/invitation | Create Invitation @@ -415,6 +444,7 @@ Class | Method | HTTP request | Description *LeaveApi* | [**getLeave**](docs/Api/LeaveApi.md#getleave) | **GET** /employers/{employerId}/employees/{employeeId}/leave/{id} | Get Leave *LeaveApi* | [**getMaternityLeaveScheduleLeave**](docs/Api/LeaveApi.md#getmaternityleavescheduleleave) | **GET** /employers/{employerId}/employees/{employeeId}/leave/statutorymaternityschedule | List Statutory Maternity Leave History *LeaveApi* | [**getOccupationalMaternityScheduleLeave**](docs/Api/LeaveApi.md#getoccupationalmaternityscheduleleave) | **GET** /employers/{employerId}/employees/{employeeId}/leave/occupationalmaternityschedule/{id} | List occupational Maternity Leave History +*LeaveApi* | [**getRoleAssumedPensionablePayLeave**](docs/Api/LeaveApi.md#getroleassumedpensionablepayleave) | **GET** /employers/{employerId}/employees/{employeeId}/leave/{id}/role/{roleId}/assumedpensionablepay | Get Role Assumed Pensionable Pay *LeaveApi* | [**indexLeave**](docs/Api/LeaveApi.md#indexleave) | **GET** /employers/{employerId}/employees/{employeeId}/leave | List Leave *LeaveApi* | [**updateLeave**](docs/Api/LeaveApi.md#updateleave) | **PUT** /employers/{employerId}/employees/{employeeId}/leave/{id} | Update Leave *LoanApi* | [**addDocumentLoan**](docs/Api/LoanApi.md#adddocumentloan) | **POST** /employers/{employerId}/employees/{employeeId}/loans/{id}/documents | Add Document @@ -490,9 +520,12 @@ Class | Method | HTTP request | Description *PayRunApi* | [**changesForPayRunEntryPayRun**](docs/Api/PayRunApi.md#changesforpayrunentrypayrun) | **GET** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/{id}/changes | List PayRun Changes for PayRunEntry *PayRunApi* | [**changesPayRun**](docs/Api/PayRunApi.md#changespayrun) | **GET** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/changes | List PayRun Changes *PayRunApi* | [**createNextPayRunPayRun**](docs/Api/PayRunApi.md#createnextpayrunpayrun) | **POST** /employers/{employerId}/payrun/{taxYear}/{payPeriod} | Starts the next PayRun +*PayRunApi* | [**createSupplementaryPayRunPayRun**](docs/Api/PayRunApi.md#createsupplementarypayrunpayrun) | **POST** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/supplementary | Creates a supplementary PayRun *PayRunApi* | [**deletePayRun**](docs/Api/PayRunApi.md#deletepayrun) | **DELETE** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber} | Delete a PayRun *PayRunApi* | [**emailMultipleP45sPayRun**](docs/Api/PayRunApi.md#emailmultiplep45spayrun) | **GET** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/p45/email | (Re)send P45 Emails *PayRunApi* | [**finalisePayRunPayRun**](docs/Api/PayRunApi.md#finalisepayrunpayrun) | **POST** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/finalise | Finalise a PayRun (deprecated) +*PayRunApi* | [**getOpenPayrunsPayRun**](docs/Api/PayRunApi.md#getopenpayrunspayrun) | **GET** /open | Get list of open payruns +*PayRunApi* | [**getPayRunEntryNavigationPayRun**](docs/Api/PayRunApi.md#getpayrunentrynavigationpayrun) | **GET** /employers/{employerId}/payrun/navigation/{payRunEntryId} | Get PayRunEntryNavigation for a specific PayRunEntry *PayRunApi* | [**getPayRunEntryPayRun**](docs/Api/PayRunApi.md#getpayrunentrypayrun) | **GET** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/{id} | Get a PayRunEntry *PayRunApi* | [**getPayRunEventsPayRun**](docs/Api/PayRunApi.md#getpayruneventspayrun) | **GET** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/events | Get PayPeriodEvents *PayRunApi* | [**getPayRunJournalPayRun**](docs/Api/PayRunApi.md#getpayrunjournalpayrun) | **GET** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/journal | Get Journal for PayRun @@ -525,6 +558,7 @@ Class | Method | HTTP request | Description *PayScheduleApi* | [**createWithOptionalOrdinalPaySchedule**](docs/Api/PayScheduleApi.md#createwithoptionalordinalpayschedule) | **POST** /employers/{employerId}/schedules/{taxYear}/{payPeriod} | Create a PaySchedule (deprecated) *PayScheduleApi* | [**deletePaySchedule**](docs/Api/PayScheduleApi.md#deletepayschedule) | **DELETE** /employers/{employerId}/schedules/{taxYear}/{payPeriod}/{ordinal} | Delete PaySchedule *PayScheduleApi* | [**deleteWithOptionalOrdinalPaySchedule**](docs/Api/PayScheduleApi.md#deletewithoptionalordinalpayschedule) | **DELETE** /employers/{employerId}/schedules/{taxYear}/{payPeriod} | Delete PaySchedule (deprecated) +*PayScheduleApi* | [**getAllForEmployerPaySchedule**](docs/Api/PayScheduleApi.md#getallforemployerpayschedule) | **GET** /employers/{employerId}/schedules/all | Get PaySchedules for Employer (for active tax years) *PayScheduleApi* | [**getAllPaySchedule**](docs/Api/PayScheduleApi.md#getallpayschedule) | **GET** /employers/{employerId}/schedules/{taxYear} | Get PaySchedules *PayScheduleApi* | [**getPaySchedule**](docs/Api/PayScheduleApi.md#getpayschedule) | **GET** /employers/{employerId}/schedules/{taxYear}/{payPeriod}/{ordinal} | Get PaySchedule *PayScheduleApi* | [**getPeriodsPaySchedule**](docs/Api/PayScheduleApi.md#getperiodspayschedule) | **GET** /employers/{employerId}/schedules/{taxYear}/{payPeriod}/{ordinal}/periods | Get PaySchedulePeriods @@ -643,15 +677,18 @@ Class | Method | HTTP request | Description *ReportsApi* | [**cisSubContractorSummaryReports**](docs/Api/ReportsApi.md#cissubcontractorsummaryreports) | **GET** /employers/{employerId}/reports/cissummary | CIS Subcontractor Summary *ReportsApi* | [**costAnalysisReports**](docs/Api/ReportsApi.md#costanalysisreports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/costanalysis | Cost Analysis *ReportsApi* | [**costOfEmploymentReports**](docs/Api/ReportsApi.md#costofemploymentreports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/costofemployment | Cost Of Employment +*ReportsApi* | [**cyclicReenrolmentReports**](docs/Api/ReportsApi.md#cyclicreenrolmentreports) | **GET** /employers/{employerId}/reports/cyclicreenrolment | Export Cyclic Re-enrolments *ReportsApi* | [**downloadMaternitySchedulesReports**](docs/Api/ReportsApi.md#downloadmaternityschedulesreports) | **GET** /employers/{employerId}/reports/downloadmaternityschedules | Download Maternity Payment Schedule *ReportsApi* | [**emailP11DMultipleReports**](docs/Api/ReportsApi.md#emailp11dmultiplereports) | **POST** /employers/{employerId}/reports/p11d/email | Email P11D to all Employees *ReportsApi* | [**emailP11DReports**](docs/Api/ReportsApi.md#emailp11dreports) | **POST** /employers/{employerId}/reports/p11d/email/{employeeId} | Email P11D to an Employee +*ReportsApi* | [**emailP45MutlipleReports**](docs/Api/ReportsApi.md#emailp45mutliplereports) | **POST** /employers/{employerId}/reports/{payPeriod}/{period}/{ordinal}/p45-email-multiple | Email P45 to multiple employees *ReportsApi* | [**emailP45Reports**](docs/Api/ReportsApi.md#emailp45reports) | **POST** /employers/{employerId}/reports/p45/email | Email P45 to Employee *ReportsApi* | [**emailP60MultipleReports**](docs/Api/ReportsApi.md#emailp60multiplereports) | **POST** /employers/{employerId}/reports/p60/email | Email P60 to all Employees *ReportsApi* | [**emailP60Reports**](docs/Api/ReportsApi.md#emailp60reports) | **POST** /employers/{employerId}/reports/p60/email/{employeeId} | Email P60 to an Employee *ReportsApi* | [**employeeBenefitsReports**](docs/Api/ReportsApi.md#employeebenefitsreports) | **GET** /employers/{employerId}/reports/{taxYear}/EmployeeBenefits | Employee Benefits *ReportsApi* | [**employeeExportReports**](docs/Api/ReportsApi.md#employeeexportreports) | **GET** /employees | Employee Export Details *ReportsApi* | [**employeeLeaveReports**](docs/Api/ReportsApi.md#employeeleavereports) | **GET** /employers/{employerId}/reports/employeeleave | Employee Leave +*ReportsApi* | [**employeeLoanExportReports**](docs/Api/ReportsApi.md#employeeloanexportreports) | **GET** /employers/{employerId}/reports/{payPeriod}/employeeloanexport | Employee Loan Export *ReportsApi* | [**employeePaymentsReportReports**](docs/Api/ReportsApi.md#employeepaymentsreportreports) | **POST** /employers/{employerId}/reports/{payPeriod}/employeepayments | Employee Payments Report *ReportsApi* | [**employeeRoleExportReports**](docs/Api/ReportsApi.md#employeeroleexportreports) | **GET** /employeeroles | Employee Export Roles Details *ReportsApi* | [**employerChangesReports**](docs/Api/ReportsApi.md#employerchangesreports) | **GET** /employers/{employerId}/reports/employerchanges | Gets audit changes for a company. @@ -662,6 +699,7 @@ Class | Method | HTTP request | Description *ReportsApi* | [**fullSummaryOfPayReports**](docs/Api/ReportsApi.md#fullsummaryofpayreports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/fullsummaryofpay | Cost Of Employment *ReportsApi* | [**furloughReportReports**](docs/Api/ReportsApi.md#furloughreportreports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/furlough | FurloughReport *ReportsApi* | [**genderPayGapReports**](docs/Api/ReportsApi.md#genderpaygapreports) | **GET** /employers/{employerId}/reports/{taxYear}/GenderPayGap | Gender Pay Gap +*ReportsApi* | [**getP45AvailabilityReports**](docs/Api/ReportsApi.md#getp45availabilityreports) | **GET** /employers/{employerId}/reports/p45-availability | Get P45 Download Availability *ReportsApi* | [**getPayRunCsvReports**](docs/Api/ReportsApi.md#getpayruncsvreports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payruncsv | Get PayRun CSV *ReportsApi* | [**grossToNetReports**](docs/Api/ReportsApi.md#grosstonetreports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/gross-to-net | Gross To Net *ReportsApi* | [**holidayReports**](docs/Api/ReportsApi.md#holidayreports) | **GET** /employers/{employerId}/reports/holiday | Holiday @@ -677,6 +715,7 @@ Class | Method | HTTP request | Description *ReportsApi* | [**p11Reports**](docs/Api/ReportsApi.md#p11reports) | **GET** /employers/{employerId}/reports/{taxYear}/{employeeId}/p11 | P11 *ReportsApi* | [**p30Reports**](docs/Api/ReportsApi.md#p30reports) | **GET** /employers/{employerId}/reports/{taxYear}/p30/{periodEnding} | P30 *ReportsApi* | [**p32Reports**](docs/Api/ReportsApi.md#p32reports) | **GET** /employers/{employerId}/reports/{taxYear}/p32 | P32 +*ReportsApi* | [**p45MultipleReports**](docs/Api/ReportsApi.md#p45multiplereports) | **GET** /employers/{employerId}/reports/{payPeriod}/{period}/{ordinal}/p45-multiple | P45 for Multiple Employees *ReportsApi* | [**p45Reports**](docs/Api/ReportsApi.md#p45reports) | **GET** /employers/{employerId}/reports/p45 | P45 For Employee *ReportsApi* | [**p60MultipleReports**](docs/Api/ReportsApi.md#p60multiplereports) | **GET** /employers/{employerId}/reports/{taxYear}/p60 | All P60s For TaxYear *ReportsApi* | [**p60Reports**](docs/Api/ReportsApi.md#p60reports) | **GET** /employers/{employerId}/reports/{taxYear}/p60/{employeeId} | P60 For Employee @@ -705,6 +744,7 @@ Class | Method | HTTP request | Description *ReportsApi* | [**varianceReportReports**](docs/Api/ReportsApi.md#variancereportreports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/variance | Variance Report *ReportsApi* | [**warningsReports**](docs/Api/ReportsApi.md#warningsreports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/PayrollRunWarnings | Export Payroll Run Warnings *ReportsApi* | [**ytdReports**](docs/Api/ReportsApi.md#ytdreports) | **GET** /ytd | Year To Date Values +*ReportsAsyncApi* | [**executeCombinedPensionContributionsReportReportsAsync**](docs/Api/ReportsAsyncApi.md#executecombinedpensioncontributionsreportreportsasync) | **POST** /employers/{employerId}/reports-async/CombinedPensionContributions | Execute Combined Pension Contributions Report *ReportsAsyncApi* | [**executeCustomReportReportsAsync**](docs/Api/ReportsAsyncApi.md#executecustomreportreportsasync) | **POST** /employers/{employerId}/reports-async/{templateId} | Execute report template *TagApi* | [**createTag**](docs/Api/TagApi.md#createtag) | **POST** /employers/{employerId}/tags | Create Tag *TagApi* | [**deleteTag**](docs/Api/TagApi.md#deletetag) | **DELETE** /employers/{employerId}/tags/{code} | Delete Tag (deprecated) @@ -731,7 +771,9 @@ Class | Method | HTTP request | Description *TenantApi* | [**employerUsersTenant**](docs/Api/TenantApi.md#employeruserstenant) | **GET** /tenants/{id}/employers/{employerId}/users | Get Employer Users *TenantApi* | [**getApiMailingListReportByIdTenant**](docs/Api/TenantApi.md#getapimailinglistreportbyidtenant) | **GET** /tenants/{id}/reports/apimailinglist | Api Mailing List Report *TenantApi* | [**getApiMailingListReportTenant**](docs/Api/TenantApi.md#getapimailinglistreporttenant) | **GET** /tenants/reports/apimailinglist | Api Mailing List Report +*TenantApi* | [**getBureauUsageStatsTenant**](docs/Api/TenantApi.md#getbureauusagestatstenant) | **GET** /tenants/{id}/bureau-usage-stats | Get UsageStats Report *TenantApi* | [**getEmployersTenant**](docs/Api/TenantApi.md#getemployerstenant) | **GET** /tenants/{id}/users/employers | Get Employers +*TenantApi* | [**getPayrollSquadMembersTenant**](docs/Api/TenantApi.md#getpayrollsquadmemberstenant) | **GET** /tenants/{id}/payrollsquads | Get Payroll Squad Members for Employer *TenantApi* | [**getPayrollSquadTenant**](docs/Api/TenantApi.md#getpayrollsquadtenant) | **GET** /tenants/{id}/payrollsquad/{payrollSquadId} | Get Payroll Squad *TenantApi* | [**getPayrollSquadsTenant**](docs/Api/TenantApi.md#getpayrollsquadstenant) | **GET** /tenants/{id}/payrollsquad | Get Payroll Squads *TenantApi* | [**getPricingTableTenant**](docs/Api/TenantApi.md#getpricingtabletenant) | **GET** /tenants/{id}/pricingtables/{pricingTableId} | Get PricingTable @@ -754,7 +796,6 @@ Class | Method | HTTP request | Description *TenantApi* | [**setMonthlyMinimumTenant**](docs/Api/TenantApi.md#setmonthlyminimumtenant) | **PUT** /tenants/{id}/users/{userId}/monthlyminimum | Set Monthly Minimum *TenantApi* | [**setPricingTableIdTenant**](docs/Api/TenantApi.md#setpricingtableidtenant) | **PUT** /tenants/{id}/users/{userId}/pricingtable | Set User PricingTableId *TenantApi* | [**setTenantTenant**](docs/Api/TenantApi.md#settenanttenant) | **PUT** /tenants/{id}/users/{userId}/tenant | Set User Tenant -*TenantApi* | [**setUserCanUseRefactoredAeRoutinesTenant**](docs/Api/TenantApi.md#setusercanuserefactoredaeroutinestenant) | **PUT** /tenants/{id}/users/{userId}/refactoredaeroutine | Set CanUseRefactoredAeRoutines flag *TenantApi* | [**updateBillTenant**](docs/Api/TenantApi.md#updatebilltenant) | **PUT** /tenants/{id}/bills/{year}/{month}/{billId} | Update Bill *TenantApi* | [**updateCssColorsTenant**](docs/Api/TenantApi.md#updatecsscolorstenant) | **PUT** /tenants/{id}/css/colors | Update CSS Colors *TenantApi* | [**updateCssTenant**](docs/Api/TenantApi.md#updatecsstenant) | **PUT** /tenants/{id}/css | Update CSS @@ -814,6 +855,9 @@ Class | Method | HTTP request | Description - [AeAssessmentAction](docs/Model/AeAssessmentAction.md) - [AeEmployeeState](docs/Model/AeEmployeeState.md) - [AeExclusionCode](docs/Model/AeExclusionCode.md) +- [AeLetter](docs/Model/AeLetter.md) +- [AeLetterSentType](docs/Model/AeLetterSentType.md) +- [AeReason](docs/Model/AeReason.md) - [AeStatus](docs/Model/AeStatus.md) - [AeStatutoryLetter](docs/Model/AeStatutoryLetter.md) - [AeUKWorker](docs/Model/AeUKWorker.md) @@ -892,6 +936,9 @@ Class | Method | HTTP request | Description - [ContractAeAssessmentAction](docs/Model/ContractAeAssessmentAction.md) - [ContractAeAssessmentRequest](docs/Model/ContractAeAssessmentRequest.md) - [ContractAeAssessmentResponse](docs/Model/ContractAeAssessmentResponse.md) +- [ContractAeEmployeeAssessmentHistoryRequest](docs/Model/ContractAeEmployeeAssessmentHistoryRequest.md) +- [ContractAeEmployeeAssessmentHistoryResponse](docs/Model/ContractAeEmployeeAssessmentHistoryResponse.md) +- [ContractAeEmployeeLetterResponse](docs/Model/ContractAeEmployeeLetterResponse.md) - [ContractAllowanceGradesRequest](docs/Model/ContractAllowanceGradesRequest.md) - [ContractAllowanceGradesResponse](docs/Model/ContractAllowanceGradesResponse.md) - [ContractAllowanceGradesUpdateRequest](docs/Model/ContractAllowanceGradesUpdateRequest.md) @@ -904,6 +951,9 @@ Class | Method | HTTP request | Description - [ContractAutoEnrolmentSettingsRequest](docs/Model/ContractAutoEnrolmentSettingsRequest.md) - [ContractAutoEnrolmentSettingsResponse](docs/Model/ContractAutoEnrolmentSettingsResponse.md) - [ContractBankDetails](docs/Model/ContractBankDetails.md) +- [ContractBenefitCarImportRequest](docs/Model/ContractBenefitCarImportRequest.md) +- [ContractBenefitImportRequest](docs/Model/ContractBenefitImportRequest.md) +- [ContractBenefitLoanImportRequest](docs/Model/ContractBenefitLoanImportRequest.md) - [ContractCisDetailsRequest](docs/Model/ContractCisDetailsRequest.md) - [ContractCisDetailsResponse](docs/Model/ContractCisDetailsResponse.md) - [ContractCisPartnership](docs/Model/ContractCisPartnership.md) @@ -911,6 +961,7 @@ Class | Method | HTTP request | Description - [ContractCisSubContractorItem](docs/Model/ContractCisSubContractorItem.md) - [ContractCisVerificationDetailsRequest](docs/Model/ContractCisVerificationDetailsRequest.md) - [ContractCisVerificationDetailsResponse](docs/Model/ContractCisVerificationDetailsResponse.md) +- [ContractCombinedPensionContributionsReportRequest](docs/Model/ContractCombinedPensionContributionsReportRequest.md) - [ContractCostCentreJournalOverridesRequest](docs/Model/ContractCostCentreJournalOverridesRequest.md) - [ContractCostCentreJournalOverridesResponse](docs/Model/ContractCostCentreJournalOverridesResponse.md) - [ContractCostCentreJournalOverridesResponseItem](docs/Model/ContractCostCentreJournalOverridesResponseItem.md) @@ -927,6 +978,7 @@ Class | Method | HTTP request | Description - [ContractEmployeeItem](docs/Model/ContractEmployeeItem.md) - [ContractEmployeeLeaveSettingsRequest](docs/Model/ContractEmployeeLeaveSettingsRequest.md) - [ContractEmployeeLeaveSettingsResponse](docs/Model/ContractEmployeeLeaveSettingsResponse.md) +- [ContractEmployeeNavigationResponse](docs/Model/ContractEmployeeNavigationResponse.md) - [ContractEmployeePaymentsReportRequest](docs/Model/ContractEmployeePaymentsReportRequest.md) - [ContractEmployeeResponse](docs/Model/ContractEmployeeResponse.md) - [ContractEmployeeRoleAnalysisCategoryCodeRequest](docs/Model/ContractEmployeeRoleAnalysisCategoryCodeRequest.md) @@ -936,6 +988,7 @@ Class | Method | HTTP request | Description - [ContractEmployeeRoleWorkingPatternRequest](docs/Model/ContractEmployeeRoleWorkingPatternRequest.md) - [ContractEmployeeRoleWorkingPatternResponse](docs/Model/ContractEmployeeRoleWorkingPatternResponse.md) - [ContractEmployeeRoleWorkingPatternResponseItem](docs/Model/ContractEmployeeRoleWorkingPatternResponseItem.md) +- [ContractEmployeeSupplementaryPayRunResponse](docs/Model/ContractEmployeeSupplementaryPayRunResponse.md) - [ContractEmployerBase](docs/Model/ContractEmployerBase.md) - [ContractEmployerLeaveSettingsRequest](docs/Model/ContractEmployerLeaveSettingsRequest.md) - [ContractEmployerLeaveSettingsResponse](docs/Model/ContractEmployerLeaveSettingsResponse.md) @@ -973,6 +1026,7 @@ Class | Method | HTTP request | Description - [ContractOverseasEmployerDetails](docs/Model/ContractOverseasEmployerDetails.md) - [ContractP11HistoryRequest](docs/Model/ContractP11HistoryRequest.md) - [ContractP11HistoryResponse](docs/Model/ContractP11HistoryResponse.md) +- [ContractP45AvailabilityResponse](docs/Model/ContractP45AvailabilityResponse.md) - [ContractPartnerDetails](docs/Model/ContractPartnerDetails.md) - [ContractPayHistoryRequest](docs/Model/ContractPayHistoryRequest.md) - [ContractPayHistoryResponse](docs/Model/ContractPayHistoryResponse.md) @@ -983,6 +1037,8 @@ Class | Method | HTTP request | Description - [ContractPayOptionsImportRequest](docs/Model/ContractPayOptionsImportRequest.md) - [ContractPayOptionsRequest](docs/Model/ContractPayOptionsRequest.md) - [ContractPayOptionsResponse](docs/Model/ContractPayOptionsResponse.md) +- [ContractPayPeriodOrdinalSelection](docs/Model/ContractPayPeriodOrdinalSelection.md) +- [ContractPayRunOverridesImportRequest](docs/Model/ContractPayRunOverridesImportRequest.md) - [ContractPayRunResponseItem](docs/Model/ContractPayRunResponseItem.md) - [ContractPayRunStateHistoryResponse](docs/Model/ContractPayRunStateHistoryResponse.md) - [ContractPayScheduleByDateRangeRequest](docs/Model/ContractPayScheduleByDateRangeRequest.md) @@ -995,6 +1051,7 @@ Class | Method | HTTP request | Description - [ContractPaySpineUpdateRequest](docs/Model/ContractPaySpineUpdateRequest.md) - [ContractPaylineAnalysisCategoriesCodes](docs/Model/ContractPaylineAnalysisCategoriesCodes.md) - [ContractPaylineRequest](docs/Model/ContractPaylineRequest.md) +- [ContractPaymentImportRequest](docs/Model/ContractPaymentImportRequest.md) - [ContractPayrollSquadEmployerRequest](docs/Model/ContractPayrollSquadEmployerRequest.md) - [ContractPayrollSquadEmployerResponse](docs/Model/ContractPayrollSquadEmployerResponse.md) - [ContractPayrollSquadMemberRequest](docs/Model/ContractPayrollSquadMemberRequest.md) @@ -1035,6 +1092,7 @@ Class | Method | HTTP request | Description - [ContractRtiEmployeeName](docs/Model/ContractRtiEmployeeName.md) - [ContractRtiSubmissionSettingsRequest](docs/Model/ContractRtiSubmissionSettingsRequest.md) - [ContractRtiSubmissionSettingsResponse](docs/Model/ContractRtiSubmissionSettingsResponse.md) +- [ContractSharedBankDetails](docs/Model/ContractSharedBankDetails.md) - [ContractShiftWorkingPatternDayRequest](docs/Model/ContractShiftWorkingPatternDayRequest.md) - [ContractShiftWorkingPatternDayResponse](docs/Model/ContractShiftWorkingPatternDayResponse.md) - [ContractSpinalPointRequest](docs/Model/ContractSpinalPointRequest.md) @@ -1067,7 +1125,12 @@ Class | Method | HTTP request | Description - [CostOfEmploymentReportLine](docs/Model/CostOfEmploymentReportLine.md) - [CostOfEmploymentReportReportResponse](docs/Model/CostOfEmploymentReportReportResponse.md) - [Country](docs/Model/Country.md) +- [CountryCode](docs/Model/CountryCode.md) - [CsvFileFormat](docs/Model/CsvFileFormat.md) +- [CyclicReenrolmentReport](docs/Model/CyclicReenrolmentReport.md) +- [CyclicReenrolmentReportGroup](docs/Model/CyclicReenrolmentReportGroup.md) +- [CyclicReenrolmentReportLine](docs/Model/CyclicReenrolmentReportLine.md) +- [CyclicReenrolmentReportReportResponse](docs/Model/CyclicReenrolmentReportReportResponse.md) - [DayOfWeek](docs/Model/DayOfWeek.md) - [DaysBeforePayday](docs/Model/DaysBeforePayday.md) - [DecimalDecimalBooleanPensionRuleValueTuple](docs/Model/DecimalDecimalBooleanPensionRuleValueTuple.md) @@ -1089,11 +1152,13 @@ Class | Method | HTTP request | Description - [EmployeeLeaveReport](docs/Model/EmployeeLeaveReport.md) - [EmployeeLeaveReportLine](docs/Model/EmployeeLeaveReportLine.md) - [EmployeeLeaveReportReportResponse](docs/Model/EmployeeLeaveReportReportResponse.md) +- [EmployeeLoanExportReport](docs/Model/EmployeeLoanExportReport.md) +- [EmployeeLoanExportReportLine](docs/Model/EmployeeLoanExportReportLine.md) +- [EmployeeLoanExportReportReportResponse](docs/Model/EmployeeLoanExportReportReportResponse.md) - [EmployeeNiYtdValues](docs/Model/EmployeeNiYtdValues.md) - [EmployeePayRunTotal](docs/Model/EmployeePayRunTotal.md) -- [EmployeePaymentsReport](docs/Model/EmployeePaymentsReport.md) - [EmployeePaymentsReportLine](docs/Model/EmployeePaymentsReportLine.md) -- [EmployeePaymentsReportReportResponse](docs/Model/EmployeePaymentsReportReportResponse.md) +- [EmployeePaymentsReportLineListReportResponse](docs/Model/EmployeePaymentsReportLineListReportResponse.md) - [EmployeeRole](docs/Model/EmployeeRole.md) - [EmployeeRoleAnalysisCategoryCode](docs/Model/EmployeeRoleAnalysisCategoryCode.md) - [EmployeeRolePayItem](docs/Model/EmployeeRolePayItem.md) @@ -1101,6 +1166,7 @@ Class | Method | HTTP request | Description - [EmployeeSortBy](docs/Model/EmployeeSortBy.md) - [EmployeeStatus](docs/Model/EmployeeStatus.md) - [EmployeeYtdValues](docs/Model/EmployeeYtdValues.md) +- [EmployerBetaFeatures](docs/Model/EmployerBetaFeatures.md) - [EmployerDefaults](docs/Model/EmployerDefaults.md) - [EmployerEmail](docs/Model/EmployerEmail.md) - [EmployerEvcOptInHistory](docs/Model/EmployerEvcOptInHistory.md) @@ -1218,6 +1284,7 @@ Class | Method | HTTP request | Description - [LeaveCalculationType](docs/Model/LeaveCalculationType.md) - [LeaveCustomPayment](docs/Model/LeaveCustomPayment.md) - [LeaveCustomProRataRule](docs/Model/LeaveCustomProRataRule.md) +- [LeaveNotionalPayDetails](docs/Model/LeaveNotionalPayDetails.md) - [LeavePayType](docs/Model/LeavePayType.md) - [LeaveProRataRule](docs/Model/LeaveProRataRule.md) - [LeaveSettings](docs/Model/LeaveSettings.md) @@ -1264,6 +1331,7 @@ Class | Method | HTTP request | Description - [NominalCodeMapping](docs/Model/NominalCodeMapping.md) - [Note](docs/Model/Note.md) - [NoteType](docs/Model/NoteType.md) +- [NotionalPayPeriodBreakdown](docs/Model/NotionalPayPeriodBreakdown.md) - [Nvr](docs/Model/Nvr.md) - [NvrEmployee](docs/Model/NvrEmployee.md) - [NvrEmployeeDetails](docs/Model/NvrEmployeeDetails.md) @@ -1348,6 +1416,7 @@ Class | Method | HTTP request | Description - [PayRunChanges](docs/Model/PayRunChanges.md) - [PayRunCsvType](docs/Model/PayRunCsvType.md) - [PayRunEntry](docs/Model/PayRunEntry.md) +- [PayRunEntryNavigation](docs/Model/PayRunEntryNavigation.md) - [PayRunEntrySortBy](docs/Model/PayRunEntrySortBy.md) - [PayRunEntryWarningType](docs/Model/PayRunEntryWarningType.md) - [PayRunJournal](docs/Model/PayRunJournal.md) @@ -1405,6 +1474,7 @@ Class | Method | HTTP request | Description - [PensionContributionsSubmission](docs/Model/PensionContributionsSubmission.md) - [PensionCsvFormat](docs/Model/PensionCsvFormat.md) - [PensionEndReason](docs/Model/PensionEndReason.md) +- [PensionInitialEnrolmentType](docs/Model/PensionInitialEnrolmentType.md) - [PensionJoinReason](docs/Model/PensionJoinReason.md) - [PensionMembershipReportLine](docs/Model/PensionMembershipReportLine.md) - [PensionMembershipsReport](docs/Model/PensionMembershipsReport.md) @@ -1419,10 +1489,12 @@ Class | Method | HTTP request | Description - [PensionSchemeNominalCodeMapping](docs/Model/PensionSchemeNominalCodeMapping.md) - [PensionSchemeReportOptionsLgpsCivicaUpm](docs/Model/PensionSchemeReportOptionsLgpsCivicaUpm.md) - [PensionSchemeReportOptionsLgpsIConnect](docs/Model/PensionSchemeReportOptionsLgpsIConnect.md) +- [PensionSingleEmploymentRelationship](docs/Model/PensionSingleEmploymentRelationship.md) - [PensionSummary](docs/Model/PensionSummary.md) - [PensionSummaryCostBreakdown](docs/Model/PensionSummaryCostBreakdown.md) - [PensionablePayDefinition](docs/Model/PensionablePayDefinition.md) - [PensionerPayroll](docs/Model/PensionerPayroll.md) +- [PercentOfPayBand](docs/Model/PercentOfPayBand.md) - [PeriodValue](docs/Model/PeriodValue.md) - [PeriodValuePeriodValues](docs/Model/PeriodValuePeriodValues.md) - [PersonalDetails](docs/Model/PersonalDetails.md) @@ -1432,6 +1504,7 @@ Class | Method | HTTP request | Description - [ProcessingNote](docs/Model/ProcessingNote.md) - [ProcessingNoteStatus](docs/Model/ProcessingNoteStatus.md) - [RecoverableAmounts](docs/Model/RecoverableAmounts.md) +- [ReenrolmentStatus](docs/Model/ReenrolmentStatus.md) - [Report](docs/Model/Report.md) - [ReportCustomCssOption](docs/Model/ReportCustomCssOption.md) - [ReportFormat](docs/Model/ReportFormat.md) @@ -1475,6 +1548,7 @@ Class | Method | HTTP request | Description - [StudentLoan](docs/Model/StudentLoan.md) - [StudentLoanRecovered](docs/Model/StudentLoanRecovered.md) - [SubmissionStatus](docs/Model/SubmissionStatus.md) +- [SupplementaryPayRunDetails](docs/Model/SupplementaryPayRunDetails.md) - [Tag](docs/Model/Tag.md) - [TaxAndNi](docs/Model/TaxAndNi.md) - [TaxBracket](docs/Model/TaxBracket.md) @@ -1507,6 +1581,7 @@ Class | Method | HTTP request | Description - [UserAuthorization](docs/Model/UserAuthorization.md) - [UserCategory](docs/Model/UserCategory.md) - [UserDisplayPreferences](docs/Model/UserDisplayPreferences.md) +- [UserEmployer](docs/Model/UserEmployer.md) - [UserIndustry](docs/Model/UserIndustry.md) - [UserJobType](docs/Model/UserJobType.md) - [UserRole](docs/Model/UserRole.md) @@ -1550,7 +1625,7 @@ vendor/bin/phpunit ## Author -duane@staffology.co.uk +hello@staffology.co.uk ## About this package @@ -1558,5 +1633,5 @@ This PHP package is automatically generated by the [OpenAPI Generator](https://o - API version: `v1` - Package version: `1.0.0` - - Generator version: `7.13.0-SNAPSHOT` + - Generator version: `7.20.0-SNAPSHOT` - Build package: `org.openapitools.codegen.languages.PhpNextgenClientCodegen` diff --git a/docs/Api/AccountApi.md b/docs/Api/AccountApi.md index 4fdcb1e..eca495f 100644 --- a/docs/Api/AccountApi.md +++ b/docs/Api/AccountApi.md @@ -82,7 +82,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -206,7 +206,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -816,7 +816,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -878,7 +878,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/AeEmployeeAssessmentApi.md b/docs/Api/AeEmployeeAssessmentApi.md new file mode 100644 index 0000000..760b18b --- /dev/null +++ b/docs/Api/AeEmployeeAssessmentApi.md @@ -0,0 +1,712 @@ +# SynergiTech\Staffology\AeEmployeeAssessmentApi + +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**assessAeEmployeeAssessment()**](AeEmployeeAssessmentApi.md#assessAeEmployeeAssessment) | **POST** /employers/{employerId}/aeassessments/employees/{employeeId}/assess | Process AE Assessment for Employee during PayRun | +| [**createAeEmployeeAssessmentAeEmployeeAssessment()**](AeEmployeeAssessmentApi.md#createAeEmployeeAssessmentAeEmployeeAssessment) | **POST** /employers/{employerId}/aeassessments/employees/{employeeId}/create | Create employee auto enrolment assessment | +| [**emailAeLetterAeEmployeeAssessment()**](AeEmployeeAssessmentApi.md#emailAeLetterAeEmployeeAssessment) | **POST** /employers/{employerId}/aeassessments/employees/{employeeId}/{id}/letter/email | Email AeLetter | +| [**getAeEmployeeAssessmentsAeEmployeeAssessment()**](AeEmployeeAssessmentApi.md#getAeEmployeeAssessmentsAeEmployeeAssessment) | **GET** /employers/{employerId}/aeassessments/employees/{employeeId}/aeEmployeeAssessments | List employee auto enrolment assessment | +| [**getAeLetterAeEmployeeAssessment()**](AeEmployeeAssessmentApi.md#getAeLetterAeEmployeeAssessment) | **GET** /employers/{employerId}/aeassessments/employees/{employeeId}/{id}/letter | Get AeLetter | +| [**getEmployeeLettersAeEmployeeAssessment()**](AeEmployeeAssessmentApi.md#getEmployeeLettersAeEmployeeAssessment) | **GET** /employers/{employerId}/aeassessments/employees/{employeeId}/letters/{taxYear} | Get letters for an employee based on tax year | +| [**getPendingLettersAeEmployeeAssessment()**](AeEmployeeAssessmentApi.md#getPendingLettersAeEmployeeAssessment) | **GET** /employers/{employerId}/aeassessments/letters/pending | Get pending letters for an employer | +| [**getPendingLettersCountAeEmployeeAssessment()**](AeEmployeeAssessmentApi.md#getPendingLettersCountAeEmployeeAssessment) | **GET** /employers/{employerId}/aeassessments/letters/pending/count | Get count of pending pension letters for an employer | +| [**getReenrolmentDatesAeEmployeeAssessment()**](AeEmployeeAssessmentApi.md#getReenrolmentDatesAeEmployeeAssessment) | **GET** /employers/{employerId}/aeassessments/reenrolmentdates | Gets a list of re-enrolment dates for the employer | +| [**markAeLetterAsSentAeEmployeeAssessment()**](AeEmployeeAssessmentApi.md#markAeLetterAsSentAeEmployeeAssessment) | **PUT** /employers/{employerId}/aeassessments/employees/{employeeId}/{id}/letter/sent | Mark Letter as Sent | +| [**markAeLettersAsSentAeEmployeeAssessment()**](AeEmployeeAssessmentApi.md#markAeLettersAsSentAeEmployeeAssessment) | **PUT** /employers/{employerId}/aeassessments/letters/sent | Mark All Letters as Sent | + + +## `assessAeEmployeeAssessment()` + +```php +assessAeEmployeeAssessment($employerId, $employeeId, $payRunId): \SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[] +``` + +Process AE Assessment for Employee during PayRun + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\AeEmployeeAssessmentApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer +$employeeId = 'employeeId_example'; // string | The Id of the Employee +$payRunId = 'payRunId_example'; // string | The Id of the PayRun being assessed + +try { + $result = $apiInstance->assessAeEmployeeAssessment($employerId, $employeeId, $payRunId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AeEmployeeAssessmentApi->assessAeEmployeeAssessment: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer | | +| **employeeId** | **string**| The Id of the Employee | | +| **payRunId** | **string**| The Id of the PayRun being assessed | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[]**](../Model/ContractAeEmployeeAssessmentHistoryResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `createAeEmployeeAssessmentAeEmployeeAssessment()` + +```php +createAeEmployeeAssessmentAeEmployeeAssessment($employerId, $employeeId, $contractAeEmployeeAssessmentHistoryRequest): mixed +``` + +Create employee auto enrolment assessment + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\AeEmployeeAssessmentApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer +$employeeId = 'employeeId_example'; // string | The Id of the Employee +$contractAeEmployeeAssessmentHistoryRequest = new \SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryRequest(); // \SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryRequest | The request containing all data required for the employee assessment + +try { + $result = $apiInstance->createAeEmployeeAssessmentAeEmployeeAssessment($employerId, $employeeId, $contractAeEmployeeAssessmentHistoryRequest); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AeEmployeeAssessmentApi->createAeEmployeeAssessmentAeEmployeeAssessment: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer | | +| **employeeId** | **string**| The Id of the Employee | | +| **contractAeEmployeeAssessmentHistoryRequest** | [**\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryRequest**](../Model/ContractAeEmployeeAssessmentHistoryRequest.md)| The request containing all data required for the employee assessment | [optional] | + +### Return type + +**mixed** + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `emailAeLetterAeEmployeeAssessment()` + +```php +emailAeLetterAeEmployeeAssessment($employerId, $employeeId, $id): \SynergiTech\Staffology\Model\EmployerEmail +``` + +Email AeLetter + +Send via email letter that needs to be sent to an employee as a result of the assessment. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\AeEmployeeAssessmentApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer to which the Employee belongs +$employeeId = 'employeeId_example'; // string | The Id of the Employee the assessment is for +$id = 'id_example'; // string | The Id of the AeEmployeeAssessmentHistory + +try { + $result = $apiInstance->emailAeLetterAeEmployeeAssessment($employerId, $employeeId, $id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AeEmployeeAssessmentApi->emailAeLetterAeEmployeeAssessment: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer to which the Employee belongs | | +| **employeeId** | **string**| The Id of the Employee the assessment is for | | +| **id** | **string**| The Id of the AeEmployeeAssessmentHistory | | + +### Return type + +[**\SynergiTech\Staffology\Model\EmployerEmail**](../Model/EmployerEmail.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getAeEmployeeAssessmentsAeEmployeeAssessment()` + +```php +getAeEmployeeAssessmentsAeEmployeeAssessment($employerId, $employeeId): \SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[] +``` + +List employee auto enrolment assessment + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\AeEmployeeAssessmentApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer +$employeeId = 'employeeId_example'; // string | The Id of the Employee + +try { + $result = $apiInstance->getAeEmployeeAssessmentsAeEmployeeAssessment($employerId, $employeeId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AeEmployeeAssessmentApi->getAeEmployeeAssessmentsAeEmployeeAssessment: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer | | +| **employeeId** | **string**| The Id of the Employee | | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[]**](../Model/ContractAeEmployeeAssessmentHistoryResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getAeLetterAeEmployeeAssessment()` + +```php +getAeLetterAeEmployeeAssessment($employerId, $employeeId, $id, $accept): \SynergiTech\Staffology\Model\ReportResponse +``` + +Get AeLetter + +Returns PDF letter that needs to be sent to an employee as a result of the assessment. The same ReportResponse model that is used for reports is used here. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\AeEmployeeAssessmentApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer to which the Employee belongs +$employeeId = 'employeeId_example'; // string | The Id of the Employee the assessment is for +$id = 'id_example'; // string | The Id of the Assessment +$accept = 'accept_example'; // string + +try { + $result = $apiInstance->getAeLetterAeEmployeeAssessment($employerId, $employeeId, $id, $accept); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AeEmployeeAssessmentApi->getAeLetterAeEmployeeAssessment: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer to which the Employee belongs | | +| **employeeId** | **string**| The Id of the Employee the assessment is for | | +| **id** | **string**| The Id of the Assessment | | +| **accept** | **string**| | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\ReportResponse**](../Model/ReportResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `application/octet-stream`, `application/pdf`, `text/html` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getEmployeeLettersAeEmployeeAssessment()` + +```php +getEmployeeLettersAeEmployeeAssessment($employerId, $employeeId, $taxYear): \SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[] +``` + +Get letters for an employee based on tax year + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\AeEmployeeAssessmentApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer +$employeeId = 'employeeId_example'; // string | The Id of the Employee +$taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear | The TaxYear for which you want to list the pension letters + +try { + $result = $apiInstance->getEmployeeLettersAeEmployeeAssessment($employerId, $employeeId, $taxYear); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AeEmployeeAssessmentApi->getEmployeeLettersAeEmployeeAssessment: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer | | +| **employeeId** | **string**| The Id of the Employee | | +| **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| The TaxYear for which you want to list the pension letters | | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]**](../Model/ContractAeEmployeeLetterResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getPendingLettersAeEmployeeAssessment()` + +```php +getPendingLettersAeEmployeeAssessment($employerId): \SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[] +``` + +Get pending letters for an employer + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\AeEmployeeAssessmentApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer + +try { + $result = $apiInstance->getPendingLettersAeEmployeeAssessment($employerId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AeEmployeeAssessmentApi->getPendingLettersAeEmployeeAssessment: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer | | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]**](../Model/ContractAeEmployeeLetterResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getPendingLettersCountAeEmployeeAssessment()` + +```php +getPendingLettersCountAeEmployeeAssessment($employerId): \SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[] +``` + +Get count of pending pension letters for an employer + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\AeEmployeeAssessmentApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer + +try { + $result = $apiInstance->getPendingLettersCountAeEmployeeAssessment($employerId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AeEmployeeAssessmentApi->getPendingLettersCountAeEmployeeAssessment: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer | | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]**](../Model/ContractAeEmployeeLetterResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getReenrolmentDatesAeEmployeeAssessment()` + +```php +getReenrolmentDatesAeEmployeeAssessment($employerId): \DateTime[] +``` + +Gets a list of re-enrolment dates for the employer + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\AeEmployeeAssessmentApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer + +try { + $result = $apiInstance->getReenrolmentDatesAeEmployeeAssessment($employerId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AeEmployeeAssessmentApi->getReenrolmentDatesAeEmployeeAssessment: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer | | + +### Return type + +**\DateTime[]** + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `markAeLetterAsSentAeEmployeeAssessment()` + +```php +markAeLetterAsSentAeEmployeeAssessment($employerId, $employeeId, $id) +``` + +Mark Letter as Sent + +Update an Assessment to mark the letter as sent. This is done automatically if you send the letter via email so you'd only need to use this is you are printing/posting the letter. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\AeEmployeeAssessmentApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer to which the Employee belongs +$employeeId = 'employeeId_example'; // string | The Id of the Employee the assessment is for +$id = 'id_example'; // string | The Id of the Assessment + +try { + $apiInstance->markAeLetterAsSentAeEmployeeAssessment($employerId, $employeeId, $id); +} catch (Exception $e) { + echo 'Exception when calling AeEmployeeAssessmentApi->markAeLetterAsSentAeEmployeeAssessment: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer to which the Employee belongs | | +| **employeeId** | **string**| The Id of the Employee the assessment is for | | +| **id** | **string**| The Id of the Assessment | | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `markAeLettersAsSentAeEmployeeAssessment()` + +```php +markAeLettersAsSentAeEmployeeAssessment($employerId) +``` + +Mark All Letters as Sent + +Update an Assessments to mark all the letter as sent. This is done automatically if you send the letter via email so you'd only need to use this is you are printing/posting the letter. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\AeEmployeeAssessmentApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer to which the Employee belongs + +try { + $apiInstance->markAeLettersAsSentAeEmployeeAssessment($employerId); +} catch (Exception $e) { + echo 'Exception when calling AeEmployeeAssessmentApi->markAeLettersAsSentAeEmployeeAssessment: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer to which the Employee belongs | | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/AnalysisCategoryApi.md b/docs/Api/AnalysisCategoryApi.md index a79725f..b59d9c2 100644 --- a/docs/Api/AnalysisCategoryApi.md +++ b/docs/Api/AnalysisCategoryApi.md @@ -73,8 +73,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -139,8 +139,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -332,7 +332,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -398,7 +398,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -462,7 +462,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -524,7 +524,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -589,8 +589,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -657,8 +657,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/AttachmentOrderApi.md b/docs/Api/AttachmentOrderApi.md index 5a3b250..2e173c4 100644 --- a/docs/Api/AttachmentOrderApi.md +++ b/docs/Api/AttachmentOrderApi.md @@ -140,7 +140,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -602,7 +602,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/AutoEnrolmentApi.md b/docs/Api/AutoEnrolmentApi.md index 79692db..a39eecf 100644 --- a/docs/Api/AutoEnrolmentApi.md +++ b/docs/Api/AutoEnrolmentApi.md @@ -79,7 +79,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -271,7 +271,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -337,7 +337,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -401,7 +401,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -469,7 +469,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `application/pdf`, `text/html`, `application/octet-stream` +- **Accept**: `application/json`, `application/octet-stream`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -533,7 +533,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -721,7 +721,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -783,7 +783,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -845,7 +845,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -909,7 +909,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -987,7 +987,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/AverageHolidayPayHistoryApi.md b/docs/Api/AverageHolidayPayHistoryApi.md index 7b94fa7..74a28fc 100644 --- a/docs/Api/AverageHolidayPayHistoryApi.md +++ b/docs/Api/AverageHolidayPayHistoryApi.md @@ -67,7 +67,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -442,7 +442,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/BenefitsApi.md b/docs/Api/BenefitsApi.md index 5ccc11b..7dca37b 100644 --- a/docs/Api/BenefitsApi.md +++ b/docs/Api/BenefitsApi.md @@ -69,7 +69,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -330,7 +330,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/BureauApi.md b/docs/Api/BureauApi.md index b69847c..3860393 100644 --- a/docs/Api/BureauApi.md +++ b/docs/Api/BureauApi.md @@ -376,7 +376,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/Cis300Api.md b/docs/Api/Cis300Api.md index 8b465e8..437f5f1 100644 --- a/docs/Api/Cis300Api.md +++ b/docs/Api/Cis300Api.md @@ -74,7 +74,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -599,7 +599,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/CisVerificationApi.md b/docs/Api/CisVerificationApi.md index ec6fe31..8276008 100644 --- a/docs/Api/CisVerificationApi.md +++ b/docs/Api/CisVerificationApi.md @@ -74,7 +74,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -599,7 +599,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/CostCentreApi.md b/docs/Api/CostCentreApi.md index 2f7aec0..e7684ff 100644 --- a/docs/Api/CostCentreApi.md +++ b/docs/Api/CostCentreApi.md @@ -71,7 +71,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -453,7 +453,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -519,7 +519,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/DepartmentApi.md b/docs/Api/DepartmentApi.md index 94083d9..ef3313b 100644 --- a/docs/Api/DepartmentApi.md +++ b/docs/Api/DepartmentApi.md @@ -71,7 +71,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -453,7 +453,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -519,7 +519,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/DpsApi.md b/docs/Api/DpsApi.md index 39d1902..cc1619e 100644 --- a/docs/Api/DpsApi.md +++ b/docs/Api/DpsApi.md @@ -10,6 +10,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth | [**deleteDps()**](DpsApi.md#deleteDps) | **DELETE** /employers/{employerId}/dps/notices/{id} | Delete Notice | | [**getDps()**](DpsApi.md#getDps) | **GET** /employers/{employerId}/dps/notices/{id} | Get Notice | | [**getDpsSettingsDps()**](DpsApi.md#getDpsSettingsDps) | **GET** /employers/{employerId}/dps/settings | Get DPS Settings | +| [**listEmployeeNoticesDps()**](DpsApi.md#listEmployeeNoticesDps) | **GET** /employers/{employerId}/dps/employeeNotices/{employeeId} | List Employee Notices | | [**listNoticesDps()**](DpsApi.md#listNoticesDps) | **GET** /employers/{employerId}/dps/notices | List Notices | | [**parseXmlDps()**](DpsApi.md#parseXmlDps) | **POST** /employers/{employerId}/dps/notices/xml | Parse notices from XML | | [**reapplyNoticesDps()**](DpsApi.md#reapplyNoticesDps) | **PUT** /employers/{employerId}/dps/reapply | Reapply DpsNotices | @@ -388,6 +389,74 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `listEmployeeNoticesDps()` + +```php +listEmployeeNoticesDps($employerId, $employeeId, $pageNum, $pageSize): \SynergiTech\Staffology\Model\Item[] +``` + +List Employee Notices + +Lists employee DPS Notices. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\DpsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string +$employeeId = 'employeeId_example'; // string +$pageNum = 56; // int +$pageSize = 56; // int + +try { + $result = $apiInstance->listEmployeeNoticesDps($employerId, $employeeId, $pageNum, $pageSize); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DpsApi->listEmployeeNoticesDps: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| | | +| **employeeId** | **string**| | | +| **pageNum** | **int**| | [optional] | +| **pageSize** | **int**| | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\Item[]**](../Model/Item.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `listNoticesDps()` ```php @@ -511,7 +580,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -639,7 +708,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/EmailApi.md b/docs/Api/EmailApi.md index f7f316e..79c645e 100644 --- a/docs/Api/EmailApi.md +++ b/docs/Api/EmailApi.md @@ -4,16 +4,80 @@ All URIs are relative to http://localhost, except if the operation defines anoth | Method | HTTP request | Description | | ------------- | ------------- | ------------- | +| [**authorizeEmail()**](EmailApi.md#authorizeEmail) | **GET** /employers/{employerId}/email/authorize | Microsoft login for authorization | | [**getEmailEmail()**](EmailApi.md#getEmailEmail) | **GET** /employers/{employerId}/email/{emailId} | Get Email | | [**getMailSettingsEmail()**](EmailApi.md#getMailSettingsEmail) | **GET** /employers/{employerId}/email/settings | Get MailSettings | | [**indexEmail()**](EmailApi.md#indexEmail) | **GET** /employers/{employerId}/email | List Emails | | [**resendEmailEmail()**](EmailApi.md#resendEmailEmail) | **POST** /employers/{employerId}/email/{emailId} | Re-send Email | +| [**saveOAuthTokenEmail()**](EmailApi.md#saveOAuthTokenEmail) | **POST** /employers/{employerId}/email/token | Update token details by Authorization code | | [**testMailSettingsEmail()**](EmailApi.md#testMailSettingsEmail) | **POST** /employers/{employerId}/email/settings/test | Send Test Email | | [**updateMailSettingsEmail()**](EmailApi.md#updateMailSettingsEmail) | **PUT** /employers/{employerId}/email/settings | Update MailSettings | | [**verifyMailSettingsEmail()**](EmailApi.md#verifyMailSettingsEmail) | **POST** /employers/{employerId}/email/settings/verify | Email Verification (Request) | | [**verifyMailSettingsResponseEmail()**](EmailApi.md#verifyMailSettingsResponseEmail) | **PUT** /employers/{employerId}/email/settings/verify | Email Verification (Respond) | +## `authorizeEmail()` + +```php +authorizeEmail($employerId): string +``` + +Microsoft login for authorization + +Redirects the user to Microsoft login for authorization. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\EmailApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string + +try { + $result = $apiInstance->authorizeEmail($employerId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmailApi->authorizeEmail: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| | | + +### Return type + +**string** + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `getEmailEmail()` ```php @@ -270,6 +334,69 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `saveOAuthTokenEmail()` + +```php +saveOAuthTokenEmail($employerId, $code) +``` + +Update token details by Authorization code + +Stores token details (access and refresh tokens) in the database by receiving the authorization code and exchanging it for tokens using the Microsoft identity platform. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\EmailApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string +$code = 'code_example'; // string | The authorization code returned by Microsoft after user consent. + +try { + $apiInstance->saveOAuthTokenEmail($employerId, $code); +} catch (Exception $e) { + echo 'Exception when calling EmailApi->saveOAuthTokenEmail: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| | | +| **code** | **string**| The authorization code returned by Microsoft after user consent. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `testMailSettingsEmail()` ```php @@ -391,7 +518,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/EmployeeApi.md b/docs/Api/EmployeeApi.md index 0f13e51..894dc90 100644 --- a/docs/Api/EmployeeApi.md +++ b/docs/Api/EmployeeApi.md @@ -14,9 +14,12 @@ All URIs are relative to http://localhost, except if the operation defines anoth | [**deleteMultipleEmployee()**](EmployeeApi.md#deleteMultipleEmployee) | **POST** /employers/{employerId}/employees/delete | Delete Employees | | [**deletePhotoEmployee()**](EmployeeApi.md#deletePhotoEmployee) | **DELETE** /employers/{employerId}/employees/{id}/photo | Delete Photo | | [**expiringRtwEmployee()**](EmployeeApi.md#expiringRtwEmployee) | **GET** /employers/{employerId}/employees/expiring-rtw | Expiring RightToWork | +| [**fpsEmployeesEmployee()**](EmployeeApi.md#fpsEmployeesEmployee) | **POST** /employers/{employerId}/employees/list | Get list of FPS Employees for EYFPS for the given Ids | | [**getDepartmentMembershipsEmployee()**](EmployeeApi.md#getDepartmentMembershipsEmployee) | **GET** /employers/{employerId}/employees/{id}/departments | Get Employee Departments | | [**getEmployee()**](EmployeeApi.md#getEmployee) | **GET** /employers/{employerId}/employees/{id} | Get an Employee | | [**getEmployeeCostCentresEmployee()**](EmployeeApi.md#getEmployeeCostCentresEmployee) | **GET** /employers/{employerId}/employees/{id}/costcentres | Get Employee Cost Centres | +| [**getEmployeeNavigationEmployee()**](EmployeeApi.md#getEmployeeNavigationEmployee) | **GET** /employers/{employerId}/employees/{id}/navigation | Get employee navigation details for a specific employee | +| [**getEmployeesForSupplementaryPayRunEmployee()**](EmployeeApi.md#getEmployeesForSupplementaryPayRunEmployee) | **GET** /employers/{employerId}/employees/{ordinal}/{periodNumber}/{taxYear}/{payPeriod}/supplementary | Get List of Employees for Supplementary PayRun | | [**getEvcSettingsEmployee()**](EmployeeApi.md#getEvcSettingsEmployee) | **GET** /employers/{employerId}/employees/{id}/evcsettings | Get EvcSettings | | [**importCsvEmployee()**](EmployeeApi.md#importCsvEmployee) | **POST** /employers/{employerId}/employees/import | Import CSV | | [**indexEmployee()**](EmployeeApi.md#indexEmployee) | **GET** /employers/{employerId}/employees | List Employees | @@ -157,7 +160,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -429,7 +432,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -553,7 +556,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -685,6 +688,68 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `fpsEmployeesEmployee()` + +```php +fpsEmployeesEmployee($employerId, $requestBody): \SynergiTech\Staffology\Model\ContractEmployeeResponse[] +``` + +Get list of FPS Employees for EYFPS for the given Ids + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\EmployeeApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer to which the Employee belongs. +$requestBody = array('requestBody_example'); // string[] | List of Employee Ids + +try { + $result = $apiInstance->fpsEmployeesEmployee($employerId, $requestBody); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmployeeApi->fpsEmployeesEmployee: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer to which the Employee belongs. | | +| **requestBody** | [**string[]**](../Model/string.md)| List of Employee Ids | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractEmployeeResponse[]**](../Model/ContractEmployeeResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `getDepartmentMembershipsEmployee()` ```php @@ -871,6 +936,150 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `getEmployeeNavigationEmployee()` + +```php +getEmployeeNavigationEmployee($employerId, $id, $employeeStatus, $deptCode, $sortBy, $sortDescending): \SynergiTech\Staffology\Model\ContractEmployeeNavigationResponse +``` + +Get employee navigation details for a specific employee + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\EmployeeApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer to which the Employee belongs. +$id = 'id_example'; // string | The Id of the Employee you want to retrieve. +$employeeStatus = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\EmployeeStatus(); // \SynergiTech\Staffology\Model\EmployeeStatus | Restrict the results to employees with the given status +$deptCode = 'deptCode_example'; // string | If specified then only employees assigned to this department code will be listed +$sortBy = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\EmployeeSortBy(); // \SynergiTech\Staffology\Model\EmployeeSortBy | Specifies the field by which to sort the employees. Default is EmployeeSortBy.None. +$sortDescending = false; // bool | Specifies whether the sorting should be in descending order. Default is false. + +try { + $result = $apiInstance->getEmployeeNavigationEmployee($employerId, $id, $employeeStatus, $deptCode, $sortBy, $sortDescending); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmployeeApi->getEmployeeNavigationEmployee: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer to which the Employee belongs. | | +| **id** | **string**| The Id of the Employee you want to retrieve. | | +| **employeeStatus** | [**\SynergiTech\Staffology\Model\EmployeeStatus**](../Model/.md)| Restrict the results to employees with the given status | [optional] | +| **deptCode** | **string**| If specified then only employees assigned to this department code will be listed | [optional] | +| **sortBy** | [**\SynergiTech\Staffology\Model\EmployeeSortBy**](../Model/.md)| Specifies the field by which to sort the employees. Default is EmployeeSortBy.None. | [optional] | +| **sortDescending** | **bool**| Specifies whether the sorting should be in descending order. Default is false. | [optional] [default to false] | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractEmployeeNavigationResponse**](../Model/ContractEmployeeNavigationResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getEmployeesForSupplementaryPayRunEmployee()` + +```php +getEmployeesForSupplementaryPayRunEmployee($employerId, $ordinal, $periodNumber, $taxYear, $payPeriod, $pageNum, $pageSize, $query): \SynergiTech\Staffology\Model\ContractEmployeeSupplementaryPayRunResponse +``` + +Get List of Employees for Supplementary PayRun + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\EmployeeApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer. +$ordinal = 56; // int | The Period for which you want to get the employees for Pay Run. +$periodNumber = 56; // int | The Period for which you want to get the employees for Pay Run. +$taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear | The TaxYear for which you want to get the employees for Pay Run. +$payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\PayPeriods(); // \SynergiTech\Staffology\Model\PayPeriods | The Pay Period (i.e, Monthly, Weekly) for which you want to get employees for Pay Run. +$pageNum = 56; // int | The page number. +$pageSize = 56; // int | The number of items per page. +$query = 'query_example'; // string | The option to filter on a search term. + +try { + $result = $apiInstance->getEmployeesForSupplementaryPayRunEmployee($employerId, $ordinal, $periodNumber, $taxYear, $payPeriod, $pageNum, $pageSize, $query); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmployeeApi->getEmployeesForSupplementaryPayRunEmployee: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer. | | +| **ordinal** | **int**| The Period for which you want to get the employees for Pay Run. | | +| **periodNumber** | **int**| The Period for which you want to get the employees for Pay Run. | | +| **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| The TaxYear for which you want to get the employees for Pay Run. | | +| **payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](../Model/.md)| The Pay Period (i.e, Monthly, Weekly) for which you want to get employees for Pay Run. | | +| **pageNum** | **int**| The page number. | [optional] | +| **pageSize** | **int**| The number of items per page. | [optional] | +| **query** | **string**| The option to filter on a search term. | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractEmployeeSupplementaryPayRunResponse**](../Model/ContractEmployeeSupplementaryPayRunResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `getEvcSettingsEmployee()` ```php @@ -1201,7 +1410,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1461,7 +1670,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1655,7 +1864,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1719,7 +1928,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1784,7 +1993,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1848,7 +2057,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1912,7 +2121,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/EmployeeRoleApi.md b/docs/Api/EmployeeRoleApi.md index 6c6ac82..d0ae63b 100644 --- a/docs/Api/EmployeeRoleApi.md +++ b/docs/Api/EmployeeRoleApi.md @@ -84,7 +84,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -152,7 +152,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1030,7 +1030,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1098,7 +1098,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1168,7 +1168,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1236,7 +1236,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1306,7 +1306,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/EmployerApi.md b/docs/Api/EmployerApi.md index 669dedb..05a8abb 100644 --- a/docs/Api/EmployerApi.md +++ b/docs/Api/EmployerApi.md @@ -15,6 +15,8 @@ All URIs are relative to http://localhost, except if the operation defines anoth | [**getEmployerOpeningBalancesEmployer()**](EmployerApi.md#getEmployerOpeningBalancesEmployer) | **GET** /employers/{id}/openingbalances | Get EmployerOpeningBalances | | [**getEvcOptInHistoryEmployer()**](EmployerApi.md#getEvcOptInHistoryEmployer) | **GET** /employers/{id}/evc | Get EVC OptIn History | | [**getGroupMembershipsEmployer()**](EmployerApi.md#getGroupMembershipsEmployer) | **GET** /employers/{id}/groups | Get Employer Groups | +| [**getReenrolmentStatusEmployer()**](EmployerApi.md#getReenrolmentStatusEmployer) | **GET** /employers/reenrolmentstatus | Gets the re-enrolment status for the employer | +| [**getUserEmployerEmployer()**](EmployerApi.md#getUserEmployerEmployer) | **GET** /employers/{id}/users/userEmployer | Get User Employer | | [**importCsvEmployer()**](EmployerApi.md#importCsvEmployer) | **POST** /employers/import | Import CSV | | [**indexEmployer()**](EmployerApi.md#indexEmployer) | **GET** /employers | List Employers | | [**listUsersEmployer()**](EmployerApi.md#listUsersEmployer) | **GET** /employers/{id}/users | List Users | @@ -30,6 +32,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth | [**updateAutomationSettingsEmployer()**](EmployerApi.md#updateAutomationSettingsEmployer) | **PUT** /employers/{id}/automation | Update Automation Settings | | [**updateCustomPayslipEmployer()**](EmployerApi.md#updateCustomPayslipEmployer) | **POST** /employers/{id}/custompayslip | Update Payslip Customisations | | [**updateEmployer()**](EmployerApi.md#updateEmployer) | **PUT** /employers/{id} | Update an Employer | +| [**updateEmployerCanUsePremiumConnectorsEmployer()**](EmployerApi.md#updateEmployerCanUsePremiumConnectorsEmployer) | **PUT** /employers/{id}/can-use-premium-connectors | Update Can Use Premium Connectors Setting | | [**updateEmployerOpeningBalancesEmployer()**](EmployerApi.md#updateEmployerOpeningBalancesEmployer) | **PUT** /employers/{id}/openingbalances | Update EmployerOpeningBalances | | [**updateLogoEmployer()**](EmployerApi.md#updateLogoEmployer) | **POST** /employers/{id}/logo | Update Employer Logo | @@ -91,7 +94,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -219,7 +222,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -713,6 +716,128 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `getReenrolmentStatusEmployer()` + +```php +getReenrolmentStatusEmployer($id): \SynergiTech\Staffology\Model\ReenrolmentStatus +``` + +Gets the re-enrolment status for the employer + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\EmployerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string + +try { + $result = $apiInstance->getReenrolmentStatusEmployer($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmployerApi->getReenrolmentStatusEmployer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\ReenrolmentStatus**](../Model/ReenrolmentStatus.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getUserEmployerEmployer()` + +```php +getUserEmployerEmployer($id): \SynergiTech\Staffology\Model\UserEmployer +``` + +Get User Employer + +Returns a UserEmployer for the given Employer Id + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\EmployerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string | The Id of the Employer you want to get the User from. + +try { + $result = $apiInstance->getUserEmployerEmployer($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EmployerApi->getUserEmployerEmployer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The Id of the Employer you want to get the User from. | | + +### Return type + +[**\SynergiTech\Staffology\Model\UserEmployer**](../Model/UserEmployer.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `importCsvEmployer()` ```php @@ -1280,7 +1405,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1342,7 +1467,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1405,7 +1530,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1531,7 +1656,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1595,7 +1720,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1657,13 +1782,76 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `updateEmployerCanUsePremiumConnectorsEmployer()` + +```php +updateEmployerCanUsePremiumConnectorsEmployer($id, $body) +``` + +Update Can Use Premium Connectors Setting + +Sets Can Use Premium Connectors Setting A boolean value needs to be sent in the body to indicate if the employer can use premium connectors. So sending false would result in the employer not being able to use the premium connectors. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\EmployerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string | The Id of the Employer you want to update. +$body = True; // bool + +try { + $apiInstance->updateEmployerCanUsePremiumConnectorsEmployer($id, $body); +} catch (Exception $e) { + echo 'Exception when calling EmployerApi->updateEmployerCanUsePremiumConnectorsEmployer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| The Id of the Employer you want to update. | | +| **body** | **bool**| | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `updateEmployerOpeningBalancesEmployer()` ```php @@ -1721,7 +1909,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/EmployerGroupApi.md b/docs/Api/EmployerGroupApi.md index dc0a6c4..73950e0 100644 --- a/docs/Api/EmployerGroupApi.md +++ b/docs/Api/EmployerGroupApi.md @@ -66,7 +66,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -312,7 +312,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/EmployerTemplateApi.md b/docs/Api/EmployerTemplateApi.md index a3a9e3d..8e6f110 100644 --- a/docs/Api/EmployerTemplateApi.md +++ b/docs/Api/EmployerTemplateApi.md @@ -194,7 +194,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/EpsApi.md b/docs/Api/EpsApi.md index 1d8be21..0bade1a 100644 --- a/docs/Api/EpsApi.md +++ b/docs/Api/EpsApi.md @@ -142,7 +142,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -733,7 +733,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/ExbApi.md b/docs/Api/ExbApi.md index 9d3ff4e..d8789eb 100644 --- a/docs/Api/ExbApi.md +++ b/docs/Api/ExbApi.md @@ -139,7 +139,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -664,7 +664,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/ExternalDataApi.md b/docs/Api/ExternalDataApi.md index 7fd6562..241272b 100644 --- a/docs/Api/ExternalDataApi.md +++ b/docs/Api/ExternalDataApi.md @@ -6,6 +6,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth | ------------- | ------------- | ------------- | | [**authorizeExternalData()**](ExternalDataApi.md#authorizeExternalData) | **GET** /employers/{employerId}/external-data/{id}/authorize | Get Authorization Url | | [**companiesExternalData()**](ExternalDataApi.md#companiesExternalData) | **GET** /employers/{employerId}/external-data/{id}/companies | List Companies | +| [**createStackOneSessionTokenExternalData()**](ExternalDataApi.md#createStackOneSessionTokenExternalData) | **POST** /employers/{employerId}/external-data/create-stackone-session-token | Get StackOne session token | | [**disconnectExternalData()**](ExternalDataApi.md#disconnectExternalData) | **GET** /employers/{employerId}/external-data/{id}/disconnect | Disconnect | | [**employeeExternalData()**](ExternalDataApi.md#employeeExternalData) | **GET** /employers/{employerId}/external-data/{id}/employees/{employeeId} | Get Employee | | [**employeeLogsExternalData()**](ExternalDataApi.md#employeeLogsExternalData) | **GET** /employers/{employerId}/external-data/{id}/employees/{employeeId}/logs | Get Employee Logs | @@ -167,6 +168,70 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `createStackOneSessionTokenExternalData()` + +```php +createStackOneSessionTokenExternalData($employerId, $categories): string +``` + +Get StackOne session token + +Return a session token from the StackOne client to connect to StackOne. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\ExternalDataApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the employer in the external data provider +$categories = array('categories_example'); // string[] | A list of category for the premium connection + +try { + $result = $apiInstance->createStackOneSessionTokenExternalData($employerId, $categories); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ExternalDataApi->createStackOneSessionTokenExternalData: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the employer in the external data provider | | +| **categories** | [**string[]**](../Model/string.md)| A list of category for the premium connection | [optional] | + +### Return type + +**string** + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `disconnectExternalData()` ```php @@ -549,7 +614,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -833,7 +898,7 @@ try { ## `postPaymentsExternalData()` ```php -postPaymentsExternalData($id, $employerId, $payPeriod, $periodNumber, $taxYear, $incEmployees, $incHmrc, $incPensions, $incAeos, $incDeductions, $force, $ordinal, $paymentDate): \SynergiTech\Staffology\Model\BankPaymentInstruction +postPaymentsExternalData($id, $employerId, $payPeriod, $periodNumber, $taxYear, $incEmployees, $incHmrc, $incPensions, $incAeos, $incDeductions, $force, $ordinal, $paymentDate, $version): \SynergiTech\Staffology\Model\BankPaymentInstruction ``` Post Payments @@ -872,9 +937,10 @@ $incDeductions = True; // bool | Include any payment due to Deductions that are $force = True; // bool | Set to true if you want to force the payments to be posted even if it already has been $ordinal = 1; // int $paymentDate = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Optional. If a value is provided then it'll be used in place of the payment date for the payment. +$version = 56; // int | Will indicate what version of the payrun will be the source for the payments. If left empty, will post full pay run payments. try { - $result = $apiInstance->postPaymentsExternalData($id, $employerId, $payPeriod, $periodNumber, $taxYear, $incEmployees, $incHmrc, $incPensions, $incAeos, $incDeductions, $force, $ordinal, $paymentDate); + $result = $apiInstance->postPaymentsExternalData($id, $employerId, $payPeriod, $periodNumber, $taxYear, $incEmployees, $incHmrc, $incPensions, $incAeos, $incDeductions, $force, $ordinal, $paymentDate, $version); print_r($result); } catch (Exception $e) { echo 'Exception when calling ExternalDataApi->postPaymentsExternalData: ', $e->getMessage(), PHP_EOL; @@ -898,6 +964,7 @@ try { | **force** | **bool**| Set to true if you want to force the payments to be posted even if it already has been | [optional] | | **ordinal** | **int**| | [optional] [default to 1] | | **paymentDate** | **\DateTime**| Optional. If a value is provided then it'll be used in place of the payment date for the payment. | [optional] | +| **version** | **int**| Will indicate what version of the payrun will be the source for the payments. If left empty, will post full pay run payments. | [optional] | ### Return type @@ -1707,7 +1774,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1776,7 +1843,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2113,7 +2180,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/FpsApi.md b/docs/Api/FpsApi.md index 9deda92..3f8a5c3 100644 --- a/docs/Api/FpsApi.md +++ b/docs/Api/FpsApi.md @@ -5,15 +5,19 @@ All URIs are relative to http://localhost, except if the operation defines anoth | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**createFps()**](FpsApi.md#createFps) | **POST** /employers/{employerId}/rti/fps/{taxYear} | Create FPS | +| [**createFpsWithMultipleEmployeesFps()**](FpsApi.md#createFpsWithMultipleEmployeesFps) | **POST** /employers/{employerId}/rti/fps/multiple/{taxYear} | Create FPS with multiple employees | | [**deleteFps()**](FpsApi.md#deleteFps) | **DELETE** /employers/{employerId}/rti/fps/{taxYear}/{id} | Delete FPS | | [**getFps()**](FpsApi.md#getFps) | **GET** /employers/{employerId}/rti/fps/{taxYear}/{id} | Get FPS | +| [**getFpsesForEmployeeFps()**](FpsApi.md#getFpsesForEmployeeFps) | **GET** /employers/{employerId}/rti/fps/{taxYear}/employee/{employeeId} | Get all FPS for Employee | | [**getXmlRequestFps()**](FpsApi.md#getXmlRequestFps) | **GET** /employers/{employerId}/rti/fps/{taxYear}/{id}/xml/request | Get XML Request | | [**listFps()**](FpsApi.md#listFps) | **GET** /employers/{employerId}/rti/fps/{taxYear} | List FPS | | [**markAsAcceptedFps()**](FpsApi.md#markAsAcceptedFps) | **POST** /employers/{employerId}/rti/fps/{taxYear}/{id}/markasaccepted | Mark as Sent | | [**mostRecentForEmployeeFps()**](FpsApi.md#mostRecentForEmployeeFps) | **GET** /employers/{employerId}/rti/fps/{taxYear}/mostrecentforemployee/{employeeId} | Get most recent FPS for Employee | +| [**mostRecentForEmployeesFps()**](FpsApi.md#mostRecentForEmployeesFps) | **POST** /employers/{employerId}/rti/fps/{taxYear}/mostrecentforemployees | Get most recent FPS for Employees | | [**requiringAttentionFps()**](FpsApi.md#requiringAttentionFps) | **GET** /employers/{employerId}/rti/fps/requiringattention | FPS Requiring Attention | | [**submitFps()**](FpsApi.md#submitFps) | **POST** /employers/{employerId}/rti/fps/{taxYear}/{id}/submit | Submit FPS | | [**updateFps()**](FpsApi.md#updateFps) | **PUT** /employers/{employerId}/rti/fps/{taxYear}/{id} | Update FPS | +| [**updateFpsWithMultipleEmployeesFps()**](FpsApi.md#updateFpsWithMultipleEmployeesFps) | **PUT** /employers/{employerId}/rti/fps/multiple/{taxYear}/{id} | Update FPS with multiple employees | ## `createFps()` @@ -75,7 +79,73 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `createFpsWithMultipleEmployeesFps()` + +```php +createFpsWithMultipleEmployeesFps($employerId, $taxYear, $fps): \SynergiTech\Staffology\Model\Fps +``` + +Create FPS with multiple employees + +Creates a new Full Payment Submission. This is limited to corrections, to a previous year, for multiple employees. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\FpsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string +$taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear +$fps = new \SynergiTech\Staffology\Model\Fps(); // \SynergiTech\Staffology\Model\Fps + +try { + $result = $apiInstance->createFpsWithMultipleEmployeesFps($employerId, $taxYear, $fps); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FpsApi->createFpsWithMultipleEmployeesFps: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| | | +| **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | +| **fps** | [**\SynergiTech\Staffology\Model\Fps**](../Model/Fps.md)| | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\Fps**](../Model/Fps.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -213,6 +283,72 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `getFpsesForEmployeeFps()` + +```php +getFpsesForEmployeeFps($employerId, $taxYear, $employeeId): \SynergiTech\Staffology\Model\Fps[] +``` + +Get all FPS for Employee + +Returns all the Full Payment Submission that includes the specified employee + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\FpsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string +$taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear +$employeeId = 'employeeId_example'; // string + +try { + $result = $apiInstance->getFpsesForEmployeeFps($employerId, $taxYear, $employeeId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FpsApi->getFpsesForEmployeeFps: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| | | +| **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | +| **employeeId** | **string**| | | + +### Return type + +[**\SynergiTech\Staffology\Model\Fps[]**](../Model/Fps.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `getXmlRequestFps()` ```php @@ -479,6 +615,74 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `mostRecentForEmployeesFps()` + +```php +mostRecentForEmployeesFps($employerId, $taxYear, $correction, $requestBody): \SynergiTech\Staffology\Model\Fps[] +``` + +Get most recent FPS for Employees + +Returns the most recent Full Payment Submission that includes the specified employees + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\FpsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string +$taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear +$correction = false; // bool | Only search for FPS's submitted as a correction to a previous year +$requestBody = array('requestBody_example'); // string[] + +try { + $result = $apiInstance->mostRecentForEmployeesFps($employerId, $taxYear, $correction, $requestBody); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FpsApi->mostRecentForEmployeesFps: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| | | +| **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | +| **correction** | **bool**| Only search for FPS's submitted as a correction to a previous year | [optional] [default to false] | +| **requestBody** | [**string[]**](../Model/string.md)| | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\Fps[]**](../Model/Fps.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `requiringAttentionFps()` ```php @@ -670,7 +874,75 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateFpsWithMultipleEmployeesFps()` + +```php +updateFpsWithMultipleEmployeesFps($employerId, $taxYear, $id, $fps): \SynergiTech\Staffology\Model\Fps +``` + +Update FPS with multiple employees + +Updates an existing Full Payment Submission with multiple employees. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\FpsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string +$taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear +$id = 'id_example'; // string +$fps = new \SynergiTech\Staffology\Model\Fps(); // \SynergiTech\Staffology\Model\Fps + +try { + $result = $apiInstance->updateFpsWithMultipleEmployeesFps($employerId, $taxYear, $id, $fps); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FpsApi->updateFpsWithMultipleEmployeesFps: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| | | +| **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | +| **id** | **string**| | | +| **fps** | [**\SynergiTech\Staffology\Model\Fps**](../Model/Fps.md)| | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\Fps**](../Model/Fps.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/HmrcPaymentApi.md b/docs/Api/HmrcPaymentApi.md index 2cb6347..d14ea7e 100644 --- a/docs/Api/HmrcPaymentApi.md +++ b/docs/Api/HmrcPaymentApi.md @@ -13,7 +13,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth ## `bankPaymentHmrcPayment()` ```php -bankPaymentHmrcPayment($employerId, $taxYear, $periodEnding, $accept): \SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse +bankPaymentHmrcPayment($employerId, $taxYear, $periodEnding, $accept, $bankHoliday): \SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse ``` HMRC Bank Payment @@ -43,9 +43,10 @@ $employerId = 'employerId_example'; // string $taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear $periodEnding = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime $accept = 'accept_example'; // string +$bankHoliday = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\BankHolidayCollection(); // \SynergiTech\Staffology\Model\BankHolidayCollection try { - $result = $apiInstance->bankPaymentHmrcPayment($employerId, $taxYear, $periodEnding, $accept); + $result = $apiInstance->bankPaymentHmrcPayment($employerId, $taxYear, $periodEnding, $accept, $bankHoliday); print_r($result); } catch (Exception $e) { echo 'Exception when calling HmrcPaymentApi->bankPaymentHmrcPayment: ', $e->getMessage(), PHP_EOL; @@ -60,6 +61,7 @@ try { | **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | | **periodEnding** | **\DateTime**| | | | **accept** | **string**| | [optional] | +| **bankHoliday** | [**\SynergiTech\Staffology\Model\BankHolidayCollection**](../Model/.md)| | [optional] | ### Return type @@ -269,7 +271,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/HolidaySchemeApi.md b/docs/Api/HolidaySchemeApi.md index 7c2221c..ae8aadc 100644 --- a/docs/Api/HolidaySchemeApi.md +++ b/docs/Api/HolidaySchemeApi.md @@ -66,7 +66,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -313,7 +313,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/ImportApi.md b/docs/Api/ImportApi.md index 05d5046..8e1e33a 100644 --- a/docs/Api/ImportApi.md +++ b/docs/Api/ImportApi.md @@ -7,13 +7,17 @@ All URIs are relative to http://localhost, except if the operation defines anoth | [**createPaymentsCsvMappingImport()**](ImportApi.md#createPaymentsCsvMappingImport) | **POST** /employers/{employerId}/import/payments/mappings | Create PaymentsCsvMapping | | [**deletePaymentCsvMappingImport()**](ImportApi.md#deletePaymentCsvMappingImport) | **DELETE** /employers/{employerId}/import/payments/mappings/{id} | Delete PaymentsCsvMapping | | [**employeeImportCsvImport()**](ImportApi.md#employeeImportCsvImport) | **POST** /employers/{employerId}/import/employees/async | Import Employees Asynchronously (Beta) | +| [**importBenefitsImport()**](ImportApi.md#importBenefitsImport) | **POST** /employers/{employerId}/import/benefits | Import Benefits | | [**importEmployeePayImport()**](ImportApi.md#importEmployeePayImport) | **POST** /employers/{employerId}/import/pay | Import Pay To Employee | | [**importLeaveImport()**](ImportApi.md#importLeaveImport) | **POST** /employers/{employerId}/import/leave | Import Leave Asynchronously | +| [**importPayRunOverridesImport()**](ImportApi.md#importPayRunOverridesImport) | **POST** /employers/{employerId}/import/{taxYear}/{payPeriod}/{periodNumber}/{ordinal}/payrun-overrides | Import Pay Run Overrides | +| [**importPaymentsImport()**](ImportApi.md#importPaymentsImport) | **POST** /employers/{employerId}/import/payments | Import Permanent Addition and Deductions Payments | | [**importPensionMembershipsImport()**](ImportApi.md#importPensionMembershipsImport) | **POST** /employers/{employerId}/import/pensionmemberships | Import PensionMemberships from csv file | | [**importRolesImport()**](ImportApi.md#importRolesImport) | **POST** /employers/{employerId}/import/import | Import EmployeeRoles from csv file | | [**listPaymentsCsvMappingsImport()**](ImportApi.md#listPaymentsCsvMappingsImport) | **GET** /employers/{employerId}/import/payments/mappings | List PaymentsCsvMappings | | [**paymentsCsvMappingCsvFileImport()**](ImportApi.md#paymentsCsvMappingCsvFileImport) | **GET** /employers/{employerId}/import/payments/mappings/{id}/csv | Get PaymentsCsvMapping CSV File | | [**paymentsCsvMappingImport()**](ImportApi.md#paymentsCsvMappingImport) | **GET** /employers/{employerId}/import/payments/mappings/{id} | Get PaymentsCsvMapping | +| [**pensionImportCsvImport()**](ImportApi.md#pensionImportCsvImport) | **POST** /employers/{employerId}/import/pensionmemberships/async | Import PensionMemberships from csv file (async) | | [**updatePaymentsCsvMappingImport()**](ImportApi.md#updatePaymentsCsvMappingImport) | **PUT** /employers/{employerId}/import/payments/mappings/{id} | Update PaymentsCsvMapping | @@ -73,7 +77,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -211,6 +215,70 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `importBenefitsImport()` + +```php +importBenefitsImport($employerId, $contractBenefitImportRequest): \SynergiTech\Staffology\Model\ContractJobResponse +``` + +Import Benefits + +Allows the import of benefits asynchronously. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\ImportApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The employer id. +$contractBenefitImportRequest = array(new \SynergiTech\Staffology\Model\ContractBenefitImportRequest()); // \SynergiTech\Staffology\Model\ContractBenefitImportRequest[] | The import benefit items. + +try { + $result = $apiInstance->importBenefitsImport($employerId, $contractBenefitImportRequest); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ImportApi->importBenefitsImport: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The employer id. | | +| **contractBenefitImportRequest** | [**\SynergiTech\Staffology\Model\ContractBenefitImportRequest[]**](../Model/ContractBenefitImportRequest.md)| The import benefit items. | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractJobResponse**](../Model/ContractJobResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `importEmployeePayImport()` ```php @@ -275,7 +343,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -337,7 +405,145 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `importPayRunOverridesImport()` + +```php +importPayRunOverridesImport($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $contractPayRunOverridesImportRequest): \SynergiTech\Staffology\Model\ContractJobResponse +``` + +Import Pay Run Overrides + +Allows the import of payrun overrides asynchronously. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\ImportApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The employer id +$taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear | The tax year for the pay run overrides import. +$payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\PayPeriods(); // \SynergiTech\Staffology\Model\PayPeriods | The period number for the pay run overrides import. +$periodNumber = 56; // int | The period number for the pay run overrides import. +$ordinal = 56; // int | The ordinal for the pay run overrides import. +$contractPayRunOverridesImportRequest = array(new \SynergiTech\Staffology\Model\ContractPayRunOverridesImportRequest()); // \SynergiTech\Staffology\Model\ContractPayRunOverridesImportRequest[] | The import payrun ovverides items. + +try { + $result = $apiInstance->importPayRunOverridesImport($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $contractPayRunOverridesImportRequest); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ImportApi->importPayRunOverridesImport: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The employer id | | +| **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| The tax year for the pay run overrides import. | | +| **payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](../Model/.md)| The period number for the pay run overrides import. | | +| **periodNumber** | **int**| The period number for the pay run overrides import. | | +| **ordinal** | **int**| The ordinal for the pay run overrides import. | | +| **contractPayRunOverridesImportRequest** | [**\SynergiTech\Staffology\Model\ContractPayRunOverridesImportRequest[]**](../Model/ContractPayRunOverridesImportRequest.md)| The import payrun ovverides items. | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractJobResponse**](../Model/ContractJobResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `importPaymentsImport()` + +```php +importPaymentsImport($employerId, $updateOpenPayrun, $contractPaymentImportRequest): \SynergiTech\Staffology\Model\ContractJobResponse +``` + +Import Permanent Addition and Deductions Payments + +Allows the import of permanent addition and deductions payments asynchronously. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\ImportApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The employer id. +$updateOpenPayrun = false; // bool | If set to true, and there are any open pay runs, the imported values will be applied to those pay runs. +$contractPaymentImportRequest = array(new \SynergiTech\Staffology\Model\ContractPaymentImportRequest()); // \SynergiTech\Staffology\Model\ContractPaymentImportRequest[] | The import payment items. + +try { + $result = $apiInstance->importPaymentsImport($employerId, $updateOpenPayrun, $contractPaymentImportRequest); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ImportApi->importPaymentsImport: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The employer id. | | +| **updateOpenPayrun** | **bool**| If set to true, and there are any open pay runs, the imported values will be applied to those pay runs. | [optional] [default to false] | +| **contractPaymentImportRequest** | [**\SynergiTech\Staffology\Model\ContractPaymentImportRequest[]**](../Model/ContractPaymentImportRequest.md)| The import payment items. | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractJobResponse**](../Model/ContractJobResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -670,6 +876,72 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `pensionImportCsvImport()` + +```php +pensionImportCsvImport($employerId, $allowUpdates, $file): \SynergiTech\Staffology\Model\ContractJobResponse +``` + +Import PensionMemberships from csv file (async) + +Import Pension Memberships from a CSV file. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\ImportApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The employer id. +$allowUpdates = false; // bool | If set to true, and if the pension membership matches an existing one, then that membership will be updated. +$file = '/path/to/file.txt'; // \SplFileObject + +try { + $result = $apiInstance->pensionImportCsvImport($employerId, $allowUpdates, $file); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ImportApi->pensionImportCsvImport: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The employer id. | | +| **allowUpdates** | **bool**| If set to true, and if the pension membership matches an existing one, then that membership will be updated. | [optional] [default to false] | +| **file** | **\SplFileObject****\SplFileObject**| | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractJobResponse**](../Model/ContractJobResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `updatePaymentsCsvMappingImport()` ```php @@ -729,7 +1001,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/InvitationApi.md b/docs/Api/InvitationApi.md index fdde058..3a09a4d 100644 --- a/docs/Api/InvitationApi.md +++ b/docs/Api/InvitationApi.md @@ -133,7 +133,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/JournalTemplateApi.md b/docs/Api/JournalTemplateApi.md index 8854259..874c04a 100644 --- a/docs/Api/JournalTemplateApi.md +++ b/docs/Api/JournalTemplateApi.md @@ -66,8 +66,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -129,7 +129,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -194,8 +194,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/JournalTokenApi.md b/docs/Api/JournalTokenApi.md index 6fcc91e..4517221 100644 --- a/docs/Api/JournalTokenApi.md +++ b/docs/Api/JournalTokenApi.md @@ -76,8 +76,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -142,8 +142,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -206,8 +206,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -334,7 +334,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -398,7 +398,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -462,7 +462,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -524,7 +524,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -589,8 +589,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -655,8 +655,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -721,8 +721,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/LeaveApi.md b/docs/Api/LeaveApi.md index 4752a6d..30ec20e 100644 --- a/docs/Api/LeaveApi.md +++ b/docs/Api/LeaveApi.md @@ -13,6 +13,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth | [**getLeave()**](LeaveApi.md#getLeave) | **GET** /employers/{employerId}/employees/{employeeId}/leave/{id} | Get Leave | | [**getMaternityLeaveScheduleLeave()**](LeaveApi.md#getMaternityLeaveScheduleLeave) | **GET** /employers/{employerId}/employees/{employeeId}/leave/statutorymaternityschedule | List Statutory Maternity Leave History | | [**getOccupationalMaternityScheduleLeave()**](LeaveApi.md#getOccupationalMaternityScheduleLeave) | **GET** /employers/{employerId}/employees/{employeeId}/leave/occupationalmaternityschedule/{id} | List occupational Maternity Leave History | +| [**getRoleAssumedPensionablePayLeave()**](LeaveApi.md#getRoleAssumedPensionablePayLeave) | **GET** /employers/{employerId}/employees/{employeeId}/leave/{id}/role/{roleId}/assumedpensionablepay | Get Role Assumed Pensionable Pay | | [**indexLeave()**](LeaveApi.md#indexLeave) | **GET** /employers/{employerId}/employees/{employeeId}/leave | List Leave | | [**updateLeave()**](LeaveApi.md#updateLeave) | **PUT** /employers/{employerId}/employees/{employeeId}/leave/{id} | Update Leave | @@ -142,7 +143,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -633,6 +634,82 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `getRoleAssumedPensionablePayLeave()` + +```php +getRoleAssumedPensionablePayLeave($employerId, $employeeId, $id, $roleId, $payPeriod, $leaveType, $leavePayType, $from): float +``` + +Get Role Assumed Pensionable Pay + +Calculates the assumed pensionable pay for a specific employee role during a leave period. For existing leaves (when id is provided), uses the leave's existing configuration. For new leaves (when id is empty), calculates based on the provided leave type, pay type, and period parameters. Only supports roles associated with LGPS schemes that allow automatic APP calculation. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\LeaveApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The unique identifier of the employer +$employeeId = 'employeeId_example'; // string | The unique identifier of the employee +$id = 'id_example'; // string | The unique identifier of the leave record (empty GUID for new leaves) +$roleId = 'roleId_example'; // string | The unique identifier of the employee role for which to calculate assumed pensionable pay +$payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\PayPeriods(); // \SynergiTech\Staffology\Model\PayPeriods | The pay period (required for new leaves, ignored for existing leaves) +$leaveType = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\LeaveType(); // \SynergiTech\Staffology\Model\LeaveType | The type of leave (required for new leaves, ignored for existing leaves) +$leavePayType = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\LeavePayType(); // \SynergiTech\Staffology\Model\LeavePayType | The leave payment type (required for new leaves, ignored for existing leaves) +$from = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | The leave start date (required for new leaves, ignored for existing leaves) + +try { + $result = $apiInstance->getRoleAssumedPensionablePayLeave($employerId, $employeeId, $id, $roleId, $payPeriod, $leaveType, $leavePayType, $from); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling LeaveApi->getRoleAssumedPensionablePayLeave: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The unique identifier of the employer | | +| **employeeId** | **string**| The unique identifier of the employee | | +| **id** | **string**| The unique identifier of the leave record (empty GUID for new leaves) | | +| **roleId** | **string**| The unique identifier of the employee role for which to calculate assumed pensionable pay | | +| **payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](../Model/.md)| The pay period (required for new leaves, ignored for existing leaves) | [optional] | +| **leaveType** | [**\SynergiTech\Staffology\Model\LeaveType**](../Model/.md)| The type of leave (required for new leaves, ignored for existing leaves) | [optional] | +| **leavePayType** | [**\SynergiTech\Staffology\Model\LeavePayType**](../Model/.md)| The leave payment type (required for new leaves, ignored for existing leaves) | [optional] | +| **from** | **\DateTime**| The leave start date (required for new leaves, ignored for existing leaves) | [optional] | + +### Return type + +**float** + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `indexLeave()` ```php @@ -756,7 +833,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/LoanApi.md b/docs/Api/LoanApi.md index d83e0ab..2a719eb 100644 --- a/docs/Api/LoanApi.md +++ b/docs/Api/LoanApi.md @@ -139,7 +139,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -535,7 +535,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/NoteApi.md b/docs/Api/NoteApi.md index 11f680a..783c4b5 100644 --- a/docs/Api/NoteApi.md +++ b/docs/Api/NoteApi.md @@ -139,7 +139,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -535,7 +535,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/NvrApi.md b/docs/Api/NvrApi.md index bbe8b25..61a0545 100644 --- a/docs/Api/NvrApi.md +++ b/docs/Api/NvrApi.md @@ -74,7 +74,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -599,7 +599,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/OccupationalPolicyApi.md b/docs/Api/OccupationalPolicyApi.md index bf4cd0e..74dc998 100644 --- a/docs/Api/OccupationalPolicyApi.md +++ b/docs/Api/OccupationalPolicyApi.md @@ -68,7 +68,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -323,7 +323,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/OccupationalSickLeaveHistoryApi.md b/docs/Api/OccupationalSickLeaveHistoryApi.md index 1bf6760..0b4ae26 100644 --- a/docs/Api/OccupationalSickLeaveHistoryApi.md +++ b/docs/Api/OccupationalSickLeaveHistoryApi.md @@ -72,8 +72,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -204,7 +204,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -268,7 +268,7 @@ try { ### HTTP request headers - **Content-Type**: `multipart/form-data` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -332,7 +332,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -399,8 +399,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -463,8 +463,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/OpeningBalancesApi.md b/docs/Api/OpeningBalancesApi.md index d527279..e809273 100644 --- a/docs/Api/OpeningBalancesApi.md +++ b/docs/Api/OpeningBalancesApi.md @@ -77,7 +77,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -213,7 +213,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -281,7 +281,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -345,7 +345,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -409,7 +409,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -476,8 +476,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -546,8 +546,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -612,8 +612,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -678,8 +678,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -744,8 +744,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/P11HistoryApi.md b/docs/Api/P11HistoryApi.md index 7b797ab..6d5eae5 100644 --- a/docs/Api/P11HistoryApi.md +++ b/docs/Api/P11HistoryApi.md @@ -66,7 +66,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -261,7 +261,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/PayCodeApi.md b/docs/Api/PayCodeApi.md index 18a8b2c..6c2f1b0 100644 --- a/docs/Api/PayCodeApi.md +++ b/docs/Api/PayCodeApi.md @@ -73,7 +73,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -517,7 +517,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -583,7 +583,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -649,7 +649,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/PayCodeSetApi.md b/docs/Api/PayCodeSetApi.md index dc6ed7b..a1a7062 100644 --- a/docs/Api/PayCodeSetApi.md +++ b/docs/Api/PayCodeSetApi.md @@ -68,7 +68,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -323,7 +323,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/PayRunApi.md b/docs/Api/PayRunApi.md index b32f86c..74a5786 100644 --- a/docs/Api/PayRunApi.md +++ b/docs/Api/PayRunApi.md @@ -10,9 +10,12 @@ All URIs are relative to http://localhost, except if the operation defines anoth | [**changesForPayRunEntryPayRun()**](PayRunApi.md#changesForPayRunEntryPayRun) | **GET** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/{id}/changes | List PayRun Changes for PayRunEntry | | [**changesPayRun()**](PayRunApi.md#changesPayRun) | **GET** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/changes | List PayRun Changes | | [**createNextPayRunPayRun()**](PayRunApi.md#createNextPayRunPayRun) | **POST** /employers/{employerId}/payrun/{taxYear}/{payPeriod} | Starts the next PayRun | +| [**createSupplementaryPayRunPayRun()**](PayRunApi.md#createSupplementaryPayRunPayRun) | **POST** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/supplementary | Creates a supplementary PayRun | | [**deletePayRun()**](PayRunApi.md#deletePayRun) | **DELETE** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber} | Delete a PayRun | | [**emailMultipleP45sPayRun()**](PayRunApi.md#emailMultipleP45sPayRun) | **GET** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/p45/email | (Re)send P45 Emails | | [**finalisePayRunPayRun()**](PayRunApi.md#finalisePayRunPayRun) | **POST** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/finalise | Finalise a PayRun (deprecated) | +| [**getOpenPayrunsPayRun()**](PayRunApi.md#getOpenPayrunsPayRun) | **GET** /open | Get list of open payruns | +| [**getPayRunEntryNavigationPayRun()**](PayRunApi.md#getPayRunEntryNavigationPayRun) | **GET** /employers/{employerId}/payrun/navigation/{payRunEntryId} | Get PayRunEntryNavigation for a specific PayRunEntry | | [**getPayRunEntryPayRun()**](PayRunApi.md#getPayRunEntryPayRun) | **GET** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/{id} | Get a PayRunEntry | | [**getPayRunEventsPayRun()**](PayRunApi.md#getPayRunEventsPayRun) | **GET** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/events | Get PayPeriodEvents | | [**getPayRunJournalPayRun()**](PayRunApi.md#getPayRunJournalPayRun) | **GET** /employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/journal | Get Journal for PayRun | @@ -104,7 +107,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -184,7 +187,7 @@ try { ## `calculateAverageHolidayPayPayRun()` ```php -calculateAverageHolidayPayPayRun($employerId, $employeeId, $startDate): float +calculateAverageHolidayPayPayRun($employerId, $employeeId, $startDate, $isDaily): float ``` Calculate Average Holiday Pay Rate @@ -213,9 +216,10 @@ $apiInstance = new SynergiTech\Staffology\Api\PayRunApi( $employerId = 'employerId_example'; // string | The Id of the Employer to which the Employee belongs $employeeId = 'employeeId_example'; // string | The Id of the Employee $startDate = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | The date we used to calculate average holiday pay from +$isDaily = false; // bool | If set to true, will calculate based on days otherwise will calculate based on hours try { - $result = $apiInstance->calculateAverageHolidayPayPayRun($employerId, $employeeId, $startDate); + $result = $apiInstance->calculateAverageHolidayPayPayRun($employerId, $employeeId, $startDate, $isDaily); print_r($result); } catch (Exception $e) { echo 'Exception when calling PayRunApi->calculateAverageHolidayPayPayRun: ', $e->getMessage(), PHP_EOL; @@ -229,6 +233,7 @@ try { | **employerId** | **string**| The Id of the Employer to which the Employee belongs | | | **employeeId** | **string**| The Id of the Employee | | | **startDate** | **\DateTime**| The date we used to calculate average holiday pay from | | +| **isDaily** | **bool**| If set to true, will calculate based on days otherwise will calculate based on hours | [optional] [default to false] | ### Return type @@ -250,7 +255,7 @@ try { ## `changesForPayRunEntryPayRun()` ```php -changesForPayRunEntryPayRun($employerId, $id, $payPeriod, $periodNumber, $taxYear, $ordinal, $significantChangesOnly): \SynergiTech\Staffology\Model\ChangeSummary[] +changesForPayRunEntryPayRun($employerId, $id, $payPeriod, $periodNumber, $taxYear, $ordinal, $significantChangesOnly, $version): \SynergiTech\Staffology\Model\ChangeSummary[] ``` List PayRun Changes for PayRunEntry @@ -283,9 +288,10 @@ $periodNumber = 56; // int $taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear $ordinal = 1; // int $significantChangesOnly = false; // bool +$version = 56; // int try { - $result = $apiInstance->changesForPayRunEntryPayRun($employerId, $id, $payPeriod, $periodNumber, $taxYear, $ordinal, $significantChangesOnly); + $result = $apiInstance->changesForPayRunEntryPayRun($employerId, $id, $payPeriod, $periodNumber, $taxYear, $ordinal, $significantChangesOnly, $version); print_r($result); } catch (Exception $e) { echo 'Exception when calling PayRunApi->changesForPayRunEntryPayRun: ', $e->getMessage(), PHP_EOL; @@ -303,6 +309,7 @@ try { | **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | | **ordinal** | **int**| | [optional] [default to 1] | | **significantChangesOnly** | **bool**| | [optional] [default to false] | +| **version** | **int**| | [optional] | ### Return type @@ -324,7 +331,7 @@ try { ## `changesPayRun()` ```php -changesPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal): \SynergiTech\Staffology\Model\PayRunChanges +changesPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version): \SynergiTech\Staffology\Model\PayRunChanges ``` List PayRun Changes @@ -355,9 +362,10 @@ $payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\Pay $periodNumber = 56; // int $taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear $ordinal = 1; // int +$version = 56; // int try { - $result = $apiInstance->changesPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal); + $result = $apiInstance->changesPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version); print_r($result); } catch (Exception $e) { echo 'Exception when calling PayRunApi->changesPayRun: ', $e->getMessage(), PHP_EOL; @@ -373,6 +381,7 @@ try { | **periodNumber** | **int**| | | | **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | | **ordinal** | **int**| | [optional] [default to 1] | +| **version** | **int**| | [optional] | ### Return type @@ -459,10 +468,80 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `createSupplementaryPayRunPayRun()` + +```php +createSupplementaryPayRunPayRun($employerId, $payPeriod, $taxYear, $ordinal, $supplementaryPayRunDetails): \SynergiTech\Staffology\Model\PayRun +``` + +Creates a supplementary PayRun + +Creates a supplementary PayRun and returns a 201 if successful + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\PayRunApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string +$payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\PayPeriods(); // \SynergiTech\Staffology\Model\PayPeriods +$taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear +$ordinal = 1; // int +$supplementaryPayRunDetails = new \SynergiTech\Staffology\Model\SupplementaryPayRunDetails(); // \SynergiTech\Staffology\Model\SupplementaryPayRunDetails + +try { + $result = $apiInstance->createSupplementaryPayRunPayRun($employerId, $payPeriod, $taxYear, $ordinal, $supplementaryPayRunDetails); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling PayRunApi->createSupplementaryPayRunPayRun: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| | | +| **payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](../Model/.md)| | | +| **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | +| **ordinal** | **int**| | [optional] [default to 1] | +| **supplementaryPayRunDetails** | [**\SynergiTech\Staffology\Model\SupplementaryPayRunDetails**](../Model/SupplementaryPayRunDetails.md)| | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\PayRun**](../Model/PayRun.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `deletePayRun()` ```php -deletePayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal) +deletePayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version) ``` Delete a PayRun @@ -491,9 +570,10 @@ $payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\Pay $periodNumber = 56; // int $taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear $ordinal = 1; // int +$version = 56; // int try { - $apiInstance->deletePayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal); + $apiInstance->deletePayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version); } catch (Exception $e) { echo 'Exception when calling PayRunApi->deletePayRun: ', $e->getMessage(), PHP_EOL; } @@ -508,6 +588,7 @@ try { | **periodNumber** | **int**| | | | **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | | **ordinal** | **int**| | [optional] [default to 1] | +| **version** | **int**| | [optional] | ### Return type @@ -596,7 +677,7 @@ void (empty response body) ## `finalisePayRunPayRun()` ```php -finalisePayRunPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $requestBody): bool +finalisePayRunPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $requestBody): bool ``` Finalise a PayRun (deprecated) @@ -627,10 +708,11 @@ $payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\Pay $periodNumber = 56; // int $taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear $ordinal = 1; // int +$version = 56; // int $requestBody = NULL; // array try { - $result = $apiInstance->finalisePayRunPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $requestBody); + $result = $apiInstance->finalisePayRunPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $requestBody); print_r($result); } catch (Exception $e) { echo 'Exception when calling PayRunApi->finalisePayRunPayRun: ', $e->getMessage(), PHP_EOL; @@ -646,6 +728,7 @@ try { | **periodNumber** | **int**| | | | **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | | **ordinal** | **int**| | [optional] [default to 1] | +| **version** | **int**| | [optional] | | **requestBody** | [**array**](../Model/mixed.md)| | [optional] | ### Return type @@ -658,7 +741,145 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getOpenPayrunsPayRun()` + +```php +getOpenPayrunsPayRun($employerId): \SynergiTech\Staffology\Model\PayRun[] +``` + +Get list of open payruns + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\PayRunApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string + +try { + $result = $apiInstance->getOpenPayrunsPayRun($employerId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling PayRunApi->getOpenPayrunsPayRun: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\PayRun[]**](../Model/PayRun.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getPayRunEntryNavigationPayRun()` + +```php +getPayRunEntryNavigationPayRun($employerId, $payRunEntryId, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly): \SynergiTech\Staffology\Model\PayRunEntryNavigation +``` + +Get PayRunEntryNavigation for a specific PayRunEntry + +Gets PayRunEntryNavigation details for a specific payrunentry within a pay run context, providing previous/next payrunentry navigation based on the pay run's employee list filtered by the specified criteria. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\PayRunApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The ID of the employer. +$payRunEntryId = 'payRunEntryId_example'; // string | The unique identifier of the payrunentry for which to build navigation context. +$searchTerm = 'searchTerm_example'; // string | An optional search term to filter employees. +$zeroPaid = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\ZeroPaidFilter(); // \SynergiTech\Staffology\Model\ZeroPaidFilter | The option to filter pay run entries by negative paid, zero paid, and non-zero paid. +$departmentCode = 'departmentCode_example'; // string | The option to filter on department code. +$startersLeavers = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\StartersLeaversFilter(); // \SynergiTech\Staffology\Model\StartersLeaversFilter | The option to filter on whether the employee is a starter or leaver. +$sortBy = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\PayRunEntrySortBy(); // \SynergiTech\Staffology\Model\PayRunEntrySortBy | The option to sort by a certain field. Default is Payroll Code. +$sortDescending = false; // bool | Whether to sort in ascending or descending order. +$rolledBackOnly = false; // bool | If set to true, returns rolled back pay run entries. If false, returns all entries. + +try { + $result = $apiInstance->getPayRunEntryNavigationPayRun($employerId, $payRunEntryId, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling PayRunApi->getPayRunEntryNavigationPayRun: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The ID of the employer. | | +| **payRunEntryId** | **string**| The unique identifier of the payrunentry for which to build navigation context. | | +| **searchTerm** | **string**| An optional search term to filter employees. | [optional] | +| **zeroPaid** | [**\SynergiTech\Staffology\Model\ZeroPaidFilter**](../Model/.md)| The option to filter pay run entries by negative paid, zero paid, and non-zero paid. | [optional] | +| **departmentCode** | **string**| The option to filter on department code. | [optional] | +| **startersLeavers** | [**\SynergiTech\Staffology\Model\StartersLeaversFilter**](../Model/.md)| The option to filter on whether the employee is a starter or leaver. | [optional] | +| **sortBy** | [**\SynergiTech\Staffology\Model\PayRunEntrySortBy**](../Model/.md)| The option to sort by a certain field. Default is Payroll Code. | [optional] | +| **sortDescending** | **bool**| Whether to sort in ascending or descending order. | [optional] [default to false] | +| **rolledBackOnly** | **bool**| If set to true, returns rolled back pay run entries. If false, returns all entries. | [optional] [default to false] | + +### Return type + +[**\SynergiTech\Staffology\Model\PayRunEntryNavigation**](../Model/PayRunEntryNavigation.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -668,7 +889,7 @@ try { ## `getPayRunEntryPayRun()` ```php -getPayRunEntryPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $id, $ordinal): \SynergiTech\Staffology\Model\PayRunEntry +getPayRunEntryPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $id, $ordinal, $differenceOnly): \SynergiTech\Staffology\Model\PayRunEntry ``` Get a PayRunEntry @@ -698,9 +919,10 @@ $periodNumber = 56; // int $taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear $id = 'id_example'; // string $ordinal = 1; // int +$differenceOnly = false; // bool | If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version try { - $result = $apiInstance->getPayRunEntryPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $id, $ordinal); + $result = $apiInstance->getPayRunEntryPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $id, $ordinal, $differenceOnly); print_r($result); } catch (Exception $e) { echo 'Exception when calling PayRunApi->getPayRunEntryPayRun: ', $e->getMessage(), PHP_EOL; @@ -717,6 +939,7 @@ try { | **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | | **id** | **string**| | | | **ordinal** | **int**| | [optional] [default to 1] | +| **differenceOnly** | **bool**| If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version | [optional] [default to false] | ### Return type @@ -806,7 +1029,7 @@ try { ## `getPayRunJournalPayRun()` ```php -getPayRunJournalPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $deptBreakdown): \SynergiTech\Staffology\Model\PayRunJournal +getPayRunJournalPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $deptBreakdown, $includeApprenticeLevy, $allSchedules): \SynergiTech\Staffology\Model\PayRunJournal ``` Get Journal for PayRun @@ -838,9 +1061,11 @@ $periodNumber = 56; // int $taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear $ordinal = 1; // int $deptBreakdown = false; // bool | Set to true and the journal will be split between any relevant Departments +$includeApprenticeLevy = false; // bool | Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable +$allSchedules = false; // bool | Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal try { - $result = $apiInstance->getPayRunJournalPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $deptBreakdown); + $result = $apiInstance->getPayRunJournalPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $deptBreakdown, $includeApprenticeLevy, $allSchedules); print_r($result); } catch (Exception $e) { echo 'Exception when calling PayRunApi->getPayRunJournalPayRun: ', $e->getMessage(), PHP_EOL; @@ -857,6 +1082,8 @@ try { | **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | | **ordinal** | **int**| | [optional] [default to 1] | | **deptBreakdown** | **bool**| Set to true and the journal will be split between any relevant Departments | [optional] [default to false] | +| **includeApprenticeLevy** | **bool**| Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable | [optional] [default to false] | +| **allSchedules** | **bool**| Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal | [optional] [default to false] | ### Return type @@ -946,7 +1173,7 @@ try { ## `getPayRunPayRun()` ```php -getPayRunPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $pageNum, $pageSize, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly): \SynergiTech\Staffology\Model\PayRun +getPayRunPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $pageNum, $pageSize, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $version, $combinePayRuns): \SynergiTech\Staffology\Model\PayRun ``` Get a PayRun @@ -984,9 +1211,11 @@ $startersLeavers = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Mod $sortBy = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\PayRunEntrySortBy(); // \SynergiTech\Staffology\Model\PayRunEntrySortBy | The option to sort by a certain field. Default is Payroll Code $sortDescending = false; // bool | Whether to sort in ascending or descending order $rolledBackOnly = false; // bool | If set to true, returns rolled back pay run entries. If false, returns all entries. +$version = 56; // int | If supplementary pay runs have been created this can be used to retrieve the specific supplementary pay run version +$combinePayRuns = false; // bool | If supplementary pay runs have been created this can be used to retrieve the combined latest version of the pay run with all latest version pay run entries try { - $result = $apiInstance->getPayRunPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $pageNum, $pageSize, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly); + $result = $apiInstance->getPayRunPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $pageNum, $pageSize, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $version, $combinePayRuns); print_r($result); } catch (Exception $e) { echo 'Exception when calling PayRunApi->getPayRunPayRun: ', $e->getMessage(), PHP_EOL; @@ -1011,6 +1240,8 @@ try { | **sortBy** | [**\SynergiTech\Staffology\Model\PayRunEntrySortBy**](../Model/.md)| The option to sort by a certain field. Default is Payroll Code | [optional] | | **sortDescending** | **bool**| Whether to sort in ascending or descending order | [optional] [default to false] | | **rolledBackOnly** | **bool**| If set to true, returns rolled back pay run entries. If false, returns all entries. | [optional] [default to false] | +| **version** | **int**| If supplementary pay runs have been created this can be used to retrieve the specific supplementary pay run version | [optional] | +| **combinePayRuns** | **bool**| If supplementary pay runs have been created this can be used to retrieve the combined latest version of the pay run with all latest version pay run entries | [optional] [default to false] | ### Return type @@ -1307,7 +1538,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1443,7 +1674,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1717,7 +1948,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1727,7 +1958,7 @@ try { ## `reOpenPayRunPayRun()` ```php -reOpenPayRunPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal): \SynergiTech\Staffology\Model\PayRun +reOpenPayRunPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version): \SynergiTech\Staffology\Model\PayRun ``` Re-open a PayRun (deprecated) @@ -1758,9 +1989,10 @@ $payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\Pay $periodNumber = 56; // int $taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear $ordinal = 1; // int +$version = 56; // int try { - $result = $apiInstance->reOpenPayRunPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal); + $result = $apiInstance->reOpenPayRunPayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version); print_r($result); } catch (Exception $e) { echo 'Exception when calling PayRunApi->reOpenPayRunPayRun: ', $e->getMessage(), PHP_EOL; @@ -1776,6 +2008,7 @@ try { | **periodNumber** | **int**| | | | **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | | **ordinal** | **int**| | [optional] [default to 1] | +| **version** | **int**| | [optional] | ### Return type @@ -1859,7 +2092,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2071,7 +2304,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2081,7 +2314,7 @@ try { ## `updatePayRunPayRun()` ```php -updatePayRunPayRun($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $payRunStateChange): \SynergiTech\Staffology\Model\PayRun +updatePayRunPayRun($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $version, $payRunStateChange): \SynergiTech\Staffology\Model\PayRun ``` Update PayRun @@ -2115,10 +2348,11 @@ $ordinal = 1; // int $sendPayslipEmails = false; // bool | Only relevant if setting the State to Finalised. Set to true if you want to have payslips emailed to employees. $payslipReleaseType = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\PayslipReleaseType(); // \SynergiTech\Staffology\Model\PayslipReleaseType $payslipScheduledDateTime = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime +$version = 56; // int | If supplementary pay runs have been created this can be used to update the specific supplementary pay run version $payRunStateChange = new \SynergiTech\Staffology\Model\PayRunStateChange(); // \SynergiTech\Staffology\Model\PayRunStateChange | Specify the PayRun state you want to change to and the reason for the change. Only Open and Finalised states are available at the moment. Other states are used with Bureau functionality which isn't currently generally available. try { - $result = $apiInstance->updatePayRunPayRun($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $payRunStateChange); + $result = $apiInstance->updatePayRunPayRun($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $version, $payRunStateChange); print_r($result); } catch (Exception $e) { echo 'Exception when calling PayRunApi->updatePayRunPayRun: ', $e->getMessage(), PHP_EOL; @@ -2137,6 +2371,7 @@ try { | **sendPayslipEmails** | **bool**| Only relevant if setting the State to Finalised. Set to true if you want to have payslips emailed to employees. | [optional] [default to false] | | **payslipReleaseType** | [**\SynergiTech\Staffology\Model\PayslipReleaseType**](../Model/.md)| | [optional] | | **payslipScheduledDateTime** | **\DateTime**| | [optional] | +| **version** | **int**| If supplementary pay runs have been created this can be used to update the specific supplementary pay run version | [optional] | | **payRunStateChange** | [**\SynergiTech\Staffology\Model\PayRunStateChange**](../Model/PayRunStateChange.md)| Specify the PayRun state you want to change to and the reason for the change. Only Open and Finalised states are available at the moment. Other states are used with Bureau functionality which isn't currently generally available. | [optional] | ### Return type @@ -2149,7 +2384,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2159,7 +2394,7 @@ try { ## `updatePaymentDatePayRun()` ```php -updatePaymentDatePayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $body): \SynergiTech\Staffology\Model\PayRun +updatePaymentDatePayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $body): \SynergiTech\Staffology\Model\PayRun ``` Set PaymentDate @@ -2190,10 +2425,11 @@ $payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\Pay $periodNumber = 56; // int $taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear $ordinal = 1; // int +$version = 56; // int $body = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime try { - $result = $apiInstance->updatePaymentDatePayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $body); + $result = $apiInstance->updatePaymentDatePayRun($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling PayRunApi->updatePaymentDatePayRun: ', $e->getMessage(), PHP_EOL; @@ -2209,6 +2445,7 @@ try { | **periodNumber** | **int**| | | | **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | | **ordinal** | **int**| | [optional] [default to 1] | +| **version** | **int**| | [optional] | | **body** | **\DateTime**| | [optional] | ### Return type @@ -2221,7 +2458,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2365,7 +2602,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/PayRunAsyncApi.md b/docs/Api/PayRunAsyncApi.md index d6970e5..c1bb276 100644 --- a/docs/Api/PayRunAsyncApi.md +++ b/docs/Api/PayRunAsyncApi.md @@ -79,7 +79,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -156,7 +156,7 @@ void (empty response body) ## `queueDeletePayRunPayRunAsync()` ```php -queueDeletePayRunPayRunAsync($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal) +queueDeletePayRunPayRunAsync($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version) ``` Registers a request to delete a PayRun (beta) @@ -187,9 +187,10 @@ $payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\Pay $periodNumber = 56; // int $taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYear(); // \SynergiTech\Staffology\Model\TaxYear $ordinal = 1; // int +$version = 56; // int try { - $apiInstance->queueDeletePayRunPayRunAsync($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal); + $apiInstance->queueDeletePayRunPayRunAsync($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version); } catch (Exception $e) { echo 'Exception when calling PayRunAsyncApi->queueDeletePayRunPayRunAsync: ', $e->getMessage(), PHP_EOL; } @@ -204,6 +205,7 @@ try { | **periodNumber** | **int**| | | | **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](../Model/.md)| | | | **ordinal** | **int**| | [optional] [default to 1] | +| **version** | **int**| | [optional] | ### Return type @@ -225,7 +227,7 @@ void (empty response body) ## `queueUpdatePayRunPayRunAsync()` ```php -queueUpdatePayRunPayRunAsync($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $payRunStateChange): \SynergiTech\Staffology\Model\PayRun +queueUpdatePayRunPayRunAsync($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $version, $payRunStateChange): \SynergiTech\Staffology\Model\PayRun ``` Registers a request to update the PayRun (beta) @@ -259,10 +261,11 @@ $ordinal = 1; // int $sendPayslipEmails = false; // bool $payslipReleaseType = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\PayslipReleaseType(); // \SynergiTech\Staffology\Model\PayslipReleaseType $payslipScheduledDateTime = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime +$version = 56; // int $payRunStateChange = new \SynergiTech\Staffology\Model\PayRunStateChange(); // \SynergiTech\Staffology\Model\PayRunStateChange try { - $result = $apiInstance->queueUpdatePayRunPayRunAsync($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $payRunStateChange); + $result = $apiInstance->queueUpdatePayRunPayRunAsync($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $version, $payRunStateChange); print_r($result); } catch (Exception $e) { echo 'Exception when calling PayRunAsyncApi->queueUpdatePayRunPayRunAsync: ', $e->getMessage(), PHP_EOL; @@ -281,6 +284,7 @@ try { | **sendPayslipEmails** | **bool**| | [optional] [default to false] | | **payslipReleaseType** | [**\SynergiTech\Staffology\Model\PayslipReleaseType**](../Model/.md)| | [optional] | | **payslipScheduledDateTime** | **\DateTime**| | [optional] | +| **version** | **int**| | [optional] | | **payRunStateChange** | [**\SynergiTech\Staffology\Model\PayRunStateChange**](../Model/PayRunStateChange.md)| | [optional] | ### Return type @@ -293,7 +297,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/PayScheduleApi.md b/docs/Api/PayScheduleApi.md index d12c2f8..f8e971b 100644 --- a/docs/Api/PayScheduleApi.md +++ b/docs/Api/PayScheduleApi.md @@ -8,6 +8,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth | [**createWithOptionalOrdinalPaySchedule()**](PayScheduleApi.md#createWithOptionalOrdinalPaySchedule) | **POST** /employers/{employerId}/schedules/{taxYear}/{payPeriod} | Create a PaySchedule (deprecated) | | [**deletePaySchedule()**](PayScheduleApi.md#deletePaySchedule) | **DELETE** /employers/{employerId}/schedules/{taxYear}/{payPeriod}/{ordinal} | Delete PaySchedule | | [**deleteWithOptionalOrdinalPaySchedule()**](PayScheduleApi.md#deleteWithOptionalOrdinalPaySchedule) | **DELETE** /employers/{employerId}/schedules/{taxYear}/{payPeriod} | Delete PaySchedule (deprecated) | +| [**getAllForEmployerPaySchedule()**](PayScheduleApi.md#getAllForEmployerPaySchedule) | **GET** /employers/{employerId}/schedules/all | Get PaySchedules for Employer (for active tax years) | | [**getAllPaySchedule()**](PayScheduleApi.md#getAllPaySchedule) | **GET** /employers/{employerId}/schedules/{taxYear} | Get PaySchedules | | [**getPaySchedule()**](PayScheduleApi.md#getPaySchedule) | **GET** /employers/{employerId}/schedules/{taxYear}/{payPeriod}/{ordinal} | Get PaySchedule | | [**getPeriodsPaySchedule()**](PayScheduleApi.md#getPeriodsPaySchedule) | **GET** /employers/{employerId}/schedules/{taxYear}/{payPeriod}/{ordinal}/periods | Get PaySchedulePeriods | @@ -79,7 +80,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -148,7 +149,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -289,6 +290,68 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `getAllForEmployerPaySchedule()` + +```php +getAllForEmployerPaySchedule($employerId): \SynergiTech\Staffology\Model\PaySchedule[] +``` + +Get PaySchedules for Employer (for active tax years) + +Get all PaySchedules for the given Employer. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\PayScheduleApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer for which you want to get the PaySchedule + +try { + $result = $apiInstance->getAllForEmployerPaySchedule($employerId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling PayScheduleApi->getAllForEmployerPaySchedule: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer for which you want to get the PaySchedule | | + +### Return type + +[**\SynergiTech\Staffology\Model\PaySchedule[]**](../Model/PaySchedule.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `getAllPaySchedule()` ```php @@ -624,7 +687,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -694,7 +757,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -766,7 +829,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/PaySpineApi.md b/docs/Api/PaySpineApi.md index d42d3d3..9608264 100644 --- a/docs/Api/PaySpineApi.md +++ b/docs/Api/PaySpineApi.md @@ -111,7 +111,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -177,7 +177,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -245,7 +245,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -311,7 +311,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -377,7 +377,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -441,7 +441,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -507,7 +507,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -573,7 +573,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -639,7 +639,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2410,7 +2410,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2478,7 +2478,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2546,7 +2546,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2612,7 +2612,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2678,7 +2678,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2746,7 +2746,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2812,7 +2812,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2880,7 +2880,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2948,7 +2948,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/PayeeApi.md b/docs/Api/PayeeApi.md index 0056659..08c8638 100644 --- a/docs/Api/PayeeApi.md +++ b/docs/Api/PayeeApi.md @@ -68,7 +68,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -323,7 +323,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/PensionApi.md b/docs/Api/PensionApi.md index 54dff93..451f5a3 100644 --- a/docs/Api/PensionApi.md +++ b/docs/Api/PensionApi.md @@ -74,8 +74,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -139,7 +139,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -205,7 +205,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -273,7 +273,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -337,7 +337,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -530,8 +530,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -598,8 +598,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `text/plain`, `application/json`, `text/json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `text/json`, `text/plain` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/PensionRefundApi.md b/docs/Api/PensionRefundApi.md index cb46903..d03b609 100644 --- a/docs/Api/PensionRefundApi.md +++ b/docs/Api/PensionRefundApi.md @@ -71,7 +71,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -462,7 +462,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/PensionSchemeApi.md b/docs/Api/PensionSchemeApi.md index 7cde992..5346242 100644 --- a/docs/Api/PensionSchemeApi.md +++ b/docs/Api/PensionSchemeApi.md @@ -212,7 +212,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -724,7 +724,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/ProcessingNoteApi.md b/docs/Api/ProcessingNoteApi.md index 8b0b927..c5cd41b 100644 --- a/docs/Api/ProcessingNoteApi.md +++ b/docs/Api/ProcessingNoteApi.md @@ -143,7 +143,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -488,7 +488,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/ReportBuilderApi.md b/docs/Api/ReportBuilderApi.md index fc71d58..af3582d 100644 --- a/docs/Api/ReportBuilderApi.md +++ b/docs/Api/ReportBuilderApi.md @@ -63,7 +63,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -125,7 +125,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/ReportPackApi.md b/docs/Api/ReportPackApi.md index c415b1e..ba3dfb6 100644 --- a/docs/Api/ReportPackApi.md +++ b/docs/Api/ReportPackApi.md @@ -68,7 +68,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -323,7 +323,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/ReportTemplateApi.md b/docs/Api/ReportTemplateApi.md index 72cb4a8..95144cd 100644 --- a/docs/Api/ReportTemplateApi.md +++ b/docs/Api/ReportTemplateApi.md @@ -70,7 +70,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -384,7 +384,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -445,7 +445,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/ReportsApi.md b/docs/Api/ReportsApi.md index 0f239d0..43aefcd 100644 --- a/docs/Api/ReportsApi.md +++ b/docs/Api/ReportsApi.md @@ -18,15 +18,18 @@ All URIs are relative to http://localhost, except if the operation defines anoth | [**cisSubContractorSummaryReports()**](ReportsApi.md#cisSubContractorSummaryReports) | **GET** /employers/{employerId}/reports/cissummary | CIS Subcontractor Summary | | [**costAnalysisReports()**](ReportsApi.md#costAnalysisReports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/costanalysis | Cost Analysis | | [**costOfEmploymentReports()**](ReportsApi.md#costOfEmploymentReports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/costofemployment | Cost Of Employment | +| [**cyclicReenrolmentReports()**](ReportsApi.md#cyclicReenrolmentReports) | **GET** /employers/{employerId}/reports/cyclicreenrolment | Export Cyclic Re-enrolments | | [**downloadMaternitySchedulesReports()**](ReportsApi.md#downloadMaternitySchedulesReports) | **GET** /employers/{employerId}/reports/downloadmaternityschedules | Download Maternity Payment Schedule | | [**emailP11DMultipleReports()**](ReportsApi.md#emailP11DMultipleReports) | **POST** /employers/{employerId}/reports/p11d/email | Email P11D to all Employees | | [**emailP11DReports()**](ReportsApi.md#emailP11DReports) | **POST** /employers/{employerId}/reports/p11d/email/{employeeId} | Email P11D to an Employee | +| [**emailP45MutlipleReports()**](ReportsApi.md#emailP45MutlipleReports) | **POST** /employers/{employerId}/reports/{payPeriod}/{period}/{ordinal}/p45-email-multiple | Email P45 to multiple employees | | [**emailP45Reports()**](ReportsApi.md#emailP45Reports) | **POST** /employers/{employerId}/reports/p45/email | Email P45 to Employee | | [**emailP60MultipleReports()**](ReportsApi.md#emailP60MultipleReports) | **POST** /employers/{employerId}/reports/p60/email | Email P60 to all Employees | | [**emailP60Reports()**](ReportsApi.md#emailP60Reports) | **POST** /employers/{employerId}/reports/p60/email/{employeeId} | Email P60 to an Employee | | [**employeeBenefitsReports()**](ReportsApi.md#employeeBenefitsReports) | **GET** /employers/{employerId}/reports/{taxYear}/EmployeeBenefits | Employee Benefits | | [**employeeExportReports()**](ReportsApi.md#employeeExportReports) | **GET** /employees | Employee Export Details | | [**employeeLeaveReports()**](ReportsApi.md#employeeLeaveReports) | **GET** /employers/{employerId}/reports/employeeleave | Employee Leave | +| [**employeeLoanExportReports()**](ReportsApi.md#employeeLoanExportReports) | **GET** /employers/{employerId}/reports/{payPeriod}/employeeloanexport | Employee Loan Export | | [**employeePaymentsReportReports()**](ReportsApi.md#employeePaymentsReportReports) | **POST** /employers/{employerId}/reports/{payPeriod}/employeepayments | Employee Payments Report | | [**employeeRoleExportReports()**](ReportsApi.md#employeeRoleExportReports) | **GET** /employeeroles | Employee Export Roles Details | | [**employerChangesReports()**](ReportsApi.md#employerChangesReports) | **GET** /employers/{employerId}/reports/employerchanges | Gets audit changes for a company. | @@ -37,6 +40,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth | [**fullSummaryOfPayReports()**](ReportsApi.md#fullSummaryOfPayReports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/fullsummaryofpay | Cost Of Employment | | [**furloughReportReports()**](ReportsApi.md#furloughReportReports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/furlough | FurloughReport | | [**genderPayGapReports()**](ReportsApi.md#genderPayGapReports) | **GET** /employers/{employerId}/reports/{taxYear}/GenderPayGap | Gender Pay Gap | +| [**getP45AvailabilityReports()**](ReportsApi.md#getP45AvailabilityReports) | **GET** /employers/{employerId}/reports/p45-availability | Get P45 Download Availability | | [**getPayRunCsvReports()**](ReportsApi.md#getPayRunCsvReports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payruncsv | Get PayRun CSV | | [**grossToNetReports()**](ReportsApi.md#grossToNetReports) | **GET** /employers/{employerId}/reports/{taxYear}/{payPeriod}/gross-to-net | Gross To Net | | [**holidayReports()**](ReportsApi.md#holidayReports) | **GET** /employers/{employerId}/reports/holiday | Holiday | @@ -52,6 +56,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth | [**p11Reports()**](ReportsApi.md#p11Reports) | **GET** /employers/{employerId}/reports/{taxYear}/{employeeId}/p11 | P11 | | [**p30Reports()**](ReportsApi.md#p30Reports) | **GET** /employers/{employerId}/reports/{taxYear}/p30/{periodEnding} | P30 | | [**p32Reports()**](ReportsApi.md#p32Reports) | **GET** /employers/{employerId}/reports/{taxYear}/p32 | P32 | +| [**p45MultipleReports()**](ReportsApi.md#p45MultipleReports) | **GET** /employers/{employerId}/reports/{payPeriod}/{period}/{ordinal}/p45-multiple | P45 for Multiple Employees | | [**p45Reports()**](ReportsApi.md#p45Reports) | **GET** /employers/{employerId}/reports/p45 | P45 For Employee | | [**p60MultipleReports()**](ReportsApi.md#p60MultipleReports) | **GET** /employers/{employerId}/reports/{taxYear}/p60 | All P60s For TaxYear | | [**p60Reports()**](ReportsApi.md#p60Reports) | **GET** /employers/{employerId}/reports/{taxYear}/p60/{employeeId} | P60 For Employee | @@ -286,7 +291,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -428,7 +433,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/pdf`, `application/json`, `text/html` +- **Accept**: `application/json`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -502,7 +507,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -574,7 +579,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -583,7 +588,7 @@ try { ## `bankPaymentInstructionsReports()` ```php -bankPaymentInstructionsReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $paymentDate, $bankHoliday, $ordinal, $incPensions, $incHmrc, $incAeos, $incDeductions): \SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse +bankPaymentInstructionsReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $paymentDate, $bankHoliday, $ordinal, $incPensions, $incHmrc, $incAeos, $incDeductions, $version): \SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse ``` Bank Payment Instructions @@ -621,9 +626,10 @@ $incPensions = false; // bool | Set to true and we'll include any payment due to $incHmrc = false; // bool | Set to true and we'll include any payment due to HMRC $incAeos = false; // bool | Set to true and we'll include any payment due as a result of AttachmentOrders $incDeductions = false; // bool | Set to true and we'll include any payment due to Deductions that are set to be paid to a Payee +$version = 56; // int | Will indicate what version of the payrun will be shown. If left empty, will show full pay run. try { - $result = $apiInstance->bankPaymentInstructionsReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $paymentDate, $bankHoliday, $ordinal, $incPensions, $incHmrc, $incAeos, $incDeductions); + $result = $apiInstance->bankPaymentInstructionsReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $paymentDate, $bankHoliday, $ordinal, $incPensions, $incHmrc, $incAeos, $incDeductions, $version); print_r($result); } catch (Exception $e) { echo 'Exception when calling ReportsApi->bankPaymentInstructionsReports: ', $e->getMessage(), PHP_EOL; @@ -646,6 +652,7 @@ try { | **incHmrc** | **bool**| Set to true and we'll include any payment due to HMRC | [optional] [default to false] | | **incAeos** | **bool**| Set to true and we'll include any payment due as a result of AttachmentOrders | [optional] [default to false] | | **incDeductions** | **bool**| Set to true and we'll include any payment due to Deductions that are set to be paid to a Payee | [optional] [default to false] | +| **version** | **int**| Will indicate what version of the payrun will be shown. If left empty, will show full pay run. | [optional] | ### Return type @@ -658,7 +665,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `application/zip` +- **Accept**: `application/json`, `application/zip`, `text/csv` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -862,7 +869,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/pdf`, `application/json` +- **Accept**: `application/json`, `application/pdf` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -926,7 +933,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/pdf`, `text/html`, `text/csv`, `application/json` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -1000,7 +1007,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -1074,7 +1081,73 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/html` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `cyclicReenrolmentReports()` + +```php +cyclicReenrolmentReports($employerId, $reenrolmentDate, $accept): \SynergiTech\Staffology\Model\CyclicReenrolmentReportReportResponse +``` + +Export Cyclic Re-enrolments + +Returns a report for Cyclic Re-enrolments for a given re-enrolment date. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\ReportsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer. +$reenrolmentDate = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | The re-enrolment date in the format YYYY-MM-DD. +$accept = 'accept_example'; // string + +try { + $result = $apiInstance->cyclicReenrolmentReports($employerId, $reenrolmentDate, $accept); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ReportsApi->cyclicReenrolmentReports: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer. | | +| **reenrolmentDate** | **\DateTime**| The re-enrolment date in the format YYYY-MM-DD. | [optional] | +| **accept** | **string**| | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\CyclicReenrolmentReportReportResponse**](../Model/CyclicReenrolmentReportReportResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -1141,8 +1214,8 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` -- **Accept**: `application/pdf`, `application/json`, `text/html`, `application/octet-stream` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json`, `application/octet-stream`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -1278,6 +1351,73 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `emailP45MutlipleReports()` + +```php +emailP45MutlipleReports($employerId, $payPeriod, $period, $ordinal) +``` + +Email P45 to multiple employees + +Email P45 to multiple Employees you've marked as a leaver for a period in the employer's current tax year + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\ReportsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer. +$payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\PayPeriods(); // \SynergiTech\Staffology\Model\PayPeriods | The PayPeriod of the PayRun. +$period = 56; // int | The Period of the PayRun. +$ordinal = 56; // int | The Ordinal of the PayRun. + +try { + $apiInstance->emailP45MutlipleReports($employerId, $payPeriod, $period, $ordinal); +} catch (Exception $e) { + echo 'Exception when calling ReportsApi->emailP45MutlipleReports: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer. | | +| **payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](../Model/.md)| The PayPeriod of the PayRun. | | +| **period** | **int**| The Period of the PayRun. | | +| **ordinal** | **int**| The Ordinal of the PayRun. | | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `emailP45Reports()` ```php @@ -1681,10 +1821,78 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `employeeLoanExportReports()` + +```php +employeeLoanExportReports($employerId, $payPeriod, $accept, $ordinal): \SynergiTech\Staffology\Model\EmployeeLoanExportReportReportResponse +``` + +Employee Loan Export + +Returns the Employees Loan Export report for the given pay schedule + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\ReportsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer. +$payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\PayPeriods(); // \SynergiTech\Staffology\Model\PayPeriods +$accept = 'accept_example'; // string +$ordinal = 1; // int + +try { + $result = $apiInstance->employeeLoanExportReports($employerId, $payPeriod, $accept, $ordinal); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ReportsApi->employeeLoanExportReports: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer. | | +| **payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](../Model/.md)| | | +| **accept** | **string**| | [optional] | +| **ordinal** | **int**| | [optional] [default to 1] | + +### Return type + +[**\SynergiTech\Staffology\Model\EmployeeLoanExportReportReportResponse**](../Model/EmployeeLoanExportReportReportResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `employeePaymentsReportReports()` ```php -employeePaymentsReportReports($employerId, $payPeriod, $accept, $contractEmployeePaymentsReportRequest): \SynergiTech\Staffology\Model\EmployeePaymentsReportReportResponse +employeePaymentsReportReports($employerId, $payPeriod, $accept, $contractEmployeePaymentsReportRequest): \SynergiTech\Staffology\Model\EmployeePaymentsReportLineListReportResponse ``` Employee Payments Report @@ -1734,7 +1942,7 @@ try { ### Return type -[**\SynergiTech\Staffology\Model\EmployeePaymentsReportReportResponse**](../Model/EmployeePaymentsReportReportResponse.md) +[**\SynergiTech\Staffology\Model\EmployeePaymentsReportLineListReportResponse**](../Model/EmployeePaymentsReportLineListReportResponse.md) ### Authorization @@ -1742,7 +1950,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json`, `text/csv` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2002,7 +2210,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2213,7 +2421,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -2285,7 +2493,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -2357,7 +2565,69 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getP45AvailabilityReports()` + +```php +getP45AvailabilityReports($employerId): \SynergiTech\Staffology\Model\ContractP45AvailabilityResponse[] +``` + +Get P45 Download Availability + +Checks if there are leavers in each pay run of the employer's current tax year for downloading P45. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\ReportsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The Id of the Employer. + +try { + $result = $apiInstance->getP45AvailabilityReports($employerId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ReportsApi->getP45AvailabilityReports: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The Id of the Employer. | | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractP45AvailabilityResponse[]**](../Model/ContractP45AvailabilityResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -2442,7 +2712,7 @@ try { ## `grossToNetReports()` ```php -grossToNetReports($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $sortBy, $sortDescending, $ordinal, $forCis): \SynergiTech\Staffology\Model\GrossToNetReportReportResponse +grossToNetReports($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $sortBy, $sortDescending, $ordinal, $forCis, $version): \SynergiTech\Staffology\Model\GrossToNetReportReportResponse ``` Gross To Net @@ -2478,9 +2748,10 @@ $sortBy = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\Report $sortDescending = True; // bool | Defines whether to sort the data in descending order. Defaults to false. $ordinal = 1; // int $forCis = false; // bool | If true then CIS Subcontractors are reported on. If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false +$version = 56; // int | Will indicate what version of the payrun will be shown. If left empty, will show full pay run. try { - $result = $apiInstance->grossToNetReports($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $sortBy, $sortDescending, $ordinal, $forCis); + $result = $apiInstance->grossToNetReports($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $sortBy, $sortDescending, $ordinal, $forCis, $version); print_r($result); } catch (Exception $e) { echo 'Exception when calling ReportsApi->grossToNetReports: ', $e->getMessage(), PHP_EOL; @@ -2501,6 +2772,7 @@ try { | **sortDescending** | **bool**| Defines whether to sort the data in descending order. Defaults to false. | [optional] | | **ordinal** | **int**| | [optional] [default to 1] | | **forCis** | **bool**| If true then CIS Subcontractors are reported on. If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false | [optional] [default to false] | +| **version** | **int**| Will indicate what version of the payrun will be shown. If left empty, will show full pay run. | [optional] | ### Return type @@ -2513,7 +2785,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -2581,7 +2853,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -2655,7 +2927,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -2664,7 +2936,7 @@ try { ## `loanBalancesReports()` ```php -loanBalancesReports($employerId, $payPeriod, $accept, $ordinal): \SynergiTech\Staffology\Model\LoanBalancesReportReportResponse +loanBalancesReports($employerId, $payPeriod, $accept, $ordinal, $outstandingOnly): \SynergiTech\Staffology\Model\LoanBalancesReportReportResponse ``` Loan Balances @@ -2694,9 +2966,10 @@ $employerId = 'employerId_example'; // string | The Id of the Employer. $payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\PayPeriods(); // \SynergiTech\Staffology\Model\PayPeriods $accept = 'accept_example'; // string $ordinal = 1; // int +$outstandingOnly = true; // bool try { - $result = $apiInstance->loanBalancesReports($employerId, $payPeriod, $accept, $ordinal); + $result = $apiInstance->loanBalancesReports($employerId, $payPeriod, $accept, $ordinal, $outstandingOnly); print_r($result); } catch (Exception $e) { echo 'Exception when calling ReportsApi->loanBalancesReports: ', $e->getMessage(), PHP_EOL; @@ -2711,6 +2984,7 @@ try { | **payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](../Model/.md)| | | | **accept** | **string**| | [optional] | | **ordinal** | **int**| | [optional] [default to 1] | +| **outstandingOnly** | **bool**| | [optional] [default to true] | ### Return type @@ -2723,7 +2997,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `application/pdf`, `text/html`, `text/csv` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -2791,7 +3065,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -2863,7 +3137,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -2995,7 +3269,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `application/pdf`, `text/html`, `application/octet-stream` +- **Accept**: `application/json`, `application/octet-stream`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -3063,7 +3337,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `application/pdf`, `text/html`, `application/octet-stream` +- **Accept**: `application/json`, `application/octet-stream`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -3197,7 +3471,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/pdf`, `application/json`, `text/html` +- **Accept**: `application/json`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -3265,7 +3539,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/pdf`, `application/json`, `text/csv`, `text/html` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -3399,7 +3673,77 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/html`, `application/pdf`, `text/csv` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `p45MultipleReports()` + +```php +p45MultipleReports($employerId, $payPeriod, $period, $ordinal, $accept): \SynergiTech\Staffology\Model\ReportResponse +``` + +P45 for Multiple Employees + +Get P45s for multiple employees for a specific period in the employer's current tax year + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\ReportsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string | The employer id. +$payPeriod = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\PayPeriods(); // \SynergiTech\Staffology\Model\PayPeriods | The PayPeriod of the PayRun. +$period = 56; // int | The Period of the PayRun. +$ordinal = 56; // int | The Ordinal of the PayRun. +$accept = 'accept_example'; // string + +try { + $result = $apiInstance->p45MultipleReports($employerId, $payPeriod, $period, $ordinal, $accept); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ReportsApi->p45MultipleReports: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| The employer id. | | +| **payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](../Model/.md)| The PayPeriod of the PayRun. | | +| **period** | **int**| The Period of the PayRun. | | +| **ordinal** | **int**| The Ordinal of the PayRun. | | +| **accept** | **string**| | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\ReportResponse**](../Model/ReportResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `application/octet-stream`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -3465,7 +3809,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `application/pdf`, `text/html`, `application/octet-stream` +- **Accept**: `application/json`, `application/octet-stream`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -3533,7 +3877,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `application/pdf`, `text/html`, `application/octet-stream` +- **Accept**: `application/json`, `application/octet-stream`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -3601,7 +3945,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `application/pdf`, `text/html`, `application/octet-stream` +- **Accept**: `application/json`, `application/octet-stream`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -3677,7 +4021,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/pdf`, `application/json`, `text/csv`, `text/xml`, `text/html` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html`, `text/xml` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -3817,7 +4161,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -3970,7 +4314,7 @@ try { ## `payRunPaymentsReports()` ```php -payRunPaymentsReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $bankHoliday, $ordinal, $includeNonEmployeePayments): \SynergiTech\Staffology\Model\PayrunPaymentsReportReportResponse +payRunPaymentsReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $bankHoliday, $ordinal, $includeNonEmployeePayments, $version): \SynergiTech\Staffology\Model\PayrunPaymentsReportReportResponse ``` PayRun Payments @@ -4004,9 +4348,10 @@ $accept = 'accept_example'; // string $bankHoliday = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\BankHolidayCollection(); // \SynergiTech\Staffology\Model\BankHolidayCollection | Specifies the region whose bank holidays are to be considered in the operation. $ordinal = 1; // int $includeNonEmployeePayments = false; // bool | If set to true then we'll also include payments that need to be made to HMRC and PensionProviders +$version = 56; // int | Will indicate what version of the payrun will be shown. If left empty, will show full pay run. try { - $result = $apiInstance->payRunPaymentsReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $bankHoliday, $ordinal, $includeNonEmployeePayments); + $result = $apiInstance->payRunPaymentsReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $bankHoliday, $ordinal, $includeNonEmployeePayments, $version); print_r($result); } catch (Exception $e) { echo 'Exception when calling ReportsApi->payRunPaymentsReports: ', $e->getMessage(), PHP_EOL; @@ -4025,6 +4370,7 @@ try { | **bankHoliday** | [**\SynergiTech\Staffology\Model\BankHolidayCollection**](../Model/.md)| Specifies the region whose bank holidays are to be considered in the operation. | [optional] | | **ordinal** | **int**| | [optional] [default to 1] | | **includeNonEmployeePayments** | **bool**| If set to true then we'll also include payments that need to be made to HMRC and PensionProviders | [optional] [default to false] | +| **version** | **int**| Will indicate what version of the payrun will be shown. If left empty, will show full pay run. | [optional] | ### Return type @@ -4037,7 +4383,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -4342,7 +4688,7 @@ try { ## `payrollJournalCsvReportReports()` ```php -payrollJournalCsvReportReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $deptBreakdown): \SynergiTech\Staffology\Model\ReportResponse +payrollJournalCsvReportReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $deptBreakdown, $includeApprenticeLevy, $allSchedules): \SynergiTech\Staffology\Model\ReportResponse ``` Payroll Journal CSV @@ -4375,9 +4721,11 @@ $taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYe $accept = 'accept_example'; // string $ordinal = 1; // int $deptBreakdown = false; // bool | Set to true and the journal will be split between any relevant Departments +$includeApprenticeLevy = false; // bool | Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable +$allSchedules = false; // bool | Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal try { - $result = $apiInstance->payrollJournalCsvReportReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $deptBreakdown); + $result = $apiInstance->payrollJournalCsvReportReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $deptBreakdown, $includeApprenticeLevy, $allSchedules); print_r($result); } catch (Exception $e) { echo 'Exception when calling ReportsApi->payrollJournalCsvReportReports: ', $e->getMessage(), PHP_EOL; @@ -4395,6 +4743,8 @@ try { | **accept** | **string**| | [optional] | | **ordinal** | **int**| | [optional] [default to 1] | | **deptBreakdown** | **bool**| Set to true and the journal will be split between any relevant Departments | [optional] [default to false] | +| **includeApprenticeLevy** | **bool**| Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable | [optional] [default to false] | +| **allSchedules** | **bool**| Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal | [optional] [default to false] | ### Return type @@ -4479,7 +4829,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -4551,7 +4901,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -4560,7 +4910,7 @@ try { ## `payslipReports()` ```php -payslipReports($employerId, $payPeriod, $periodNumber, $taxYear, $id, $accept, $ordinal): \SynergiTech\Staffology\Model\PayslipReportResponse +payslipReports($employerId, $payPeriod, $periodNumber, $taxYear, $id, $accept, $ordinal, $differenceOnly): \SynergiTech\Staffology\Model\PayslipReportResponse ``` Payslip @@ -4593,9 +4943,10 @@ $taxYear = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\TaxYe $id = 'id_example'; // string | The Id of the PayRunEntry. $accept = 'accept_example'; // string $ordinal = 1; // int +$differenceOnly = false; // bool | If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version try { - $result = $apiInstance->payslipReports($employerId, $payPeriod, $periodNumber, $taxYear, $id, $accept, $ordinal); + $result = $apiInstance->payslipReports($employerId, $payPeriod, $periodNumber, $taxYear, $id, $accept, $ordinal, $differenceOnly); print_r($result); } catch (Exception $e) { echo 'Exception when calling ReportsApi->payslipReports: ', $e->getMessage(), PHP_EOL; @@ -4613,6 +4964,7 @@ try { | **id** | **string**| The Id of the PayRunEntry. | | | **accept** | **string**| | [optional] | | **ordinal** | **int**| | [optional] [default to 1] | +| **differenceOnly** | **bool**| If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version | [optional] [default to false] | ### Return type @@ -4625,7 +4977,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/pdf`, `application/json`, `text/html`, `application/octet-stream` +- **Accept**: `application/json`, `application/octet-stream`, `application/pdf`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -4634,7 +4986,7 @@ try { ## `payslipsReports()` ```php -payslipsReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $unemailed, $deptCode, $startersLeaversFilter, $pageNum, $pageSize, $sortBy, $sortDescending): \SynergiTech\Staffology\Model\ReportResponse +payslipsReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $unemailed, $deptCode, $startersLeaversFilter, $pageNum, $pageSize, $sortBy, $sortDescending, $version, $differenceOnly): \SynergiTech\Staffology\Model\ReportResponse ``` Payslips @@ -4673,9 +5025,11 @@ $pageNum = 56; // int $pageSize = 56; // int $sortBy = new \SynergiTech\Staffology\Model\\SynergiTech\Staffology\Model\PayRunEntrySortBy(); // \SynergiTech\Staffology\Model\PayRunEntrySortBy $sortDescending = false; // bool +$version = 56; // int | Will indicate what version of the payrun will be shown. If left empty, will show full pay run. +$differenceOnly = false; // bool | If the selected pay run is supplementary run and this is set to true, this will contain the differences between the current pay run version of the PayRunEntry and its previous version try { - $result = $apiInstance->payslipsReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $unemailed, $deptCode, $startersLeaversFilter, $pageNum, $pageSize, $sortBy, $sortDescending); + $result = $apiInstance->payslipsReports($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $unemailed, $deptCode, $startersLeaversFilter, $pageNum, $pageSize, $sortBy, $sortDescending, $version, $differenceOnly); print_r($result); } catch (Exception $e) { echo 'Exception when calling ReportsApi->payslipsReports: ', $e->getMessage(), PHP_EOL; @@ -4699,6 +5053,8 @@ try { | **pageSize** | **int**| | [optional] | | **sortBy** | [**\SynergiTech\Staffology\Model\PayRunEntrySortBy**](../Model/.md)| | [optional] | | **sortDescending** | **bool**| | [optional] [default to false] | +| **version** | **int**| Will indicate what version of the payrun will be shown. If left empty, will show full pay run. | [optional] | +| **differenceOnly** | **bool**| If the selected pay run is supplementary run and this is set to true, this will contain the differences between the current pay run version of the PayRunEntry and its previous version | [optional] [default to false] | ### Return type @@ -4781,7 +5137,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -4845,7 +5201,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -4991,7 +5347,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -5057,7 +5413,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -5127,7 +5483,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -5203,7 +5559,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -5291,7 +5647,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `text/html`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv`, `text/html` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) @@ -5363,7 +5719,7 @@ try { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: `application/json`, `text/csv`, `application/pdf` +- **Accept**: `application/json`, `application/pdf`, `text/csv` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/docs/Api/ReportsAsyncApi.md b/docs/Api/ReportsAsyncApi.md index 525a8e3..4fef0e0 100644 --- a/docs/Api/ReportsAsyncApi.md +++ b/docs/Api/ReportsAsyncApi.md @@ -4,9 +4,74 @@ All URIs are relative to http://localhost, except if the operation defines anoth | Method | HTTP request | Description | | ------------- | ------------- | ------------- | +| [**executeCombinedPensionContributionsReportReportsAsync()**](ReportsAsyncApi.md#executeCombinedPensionContributionsReportReportsAsync) | **POST** /employers/{employerId}/reports-async/CombinedPensionContributions | Execute Combined Pension Contributions Report | | [**executeCustomReportReportsAsync()**](ReportsAsyncApi.md#executeCustomReportReportsAsync) | **POST** /employers/{employerId}/reports-async/{templateId} | Execute report template | +## `executeCombinedPensionContributionsReportReportsAsync()` + +```php +executeCombinedPensionContributionsReportReportsAsync($employerId, $contractCombinedPensionContributionsReportRequest): \SynergiTech\Staffology\Model\ContractJobResponse +``` + +Execute Combined Pension Contributions Report + +Returns a job created to process a Combined Pension Contributions report. This endpoint is being beta tested and subject to un-announced breaking changes. Use the GET of Jobs to get the status and response of the job. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\ReportsAsyncApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$employerId = 'employerId_example'; // string +$contractCombinedPensionContributionsReportRequest = new \SynergiTech\Staffology\Model\ContractCombinedPensionContributionsReportRequest(); // \SynergiTech\Staffology\Model\ContractCombinedPensionContributionsReportRequest + +try { + $result = $apiInstance->executeCombinedPensionContributionsReportReportsAsync($employerId, $contractCombinedPensionContributionsReportRequest); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ReportsAsyncApi->executeCombinedPensionContributionsReportReportsAsync: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **employerId** | **string**| | | +| **contractCombinedPensionContributionsReportRequest** | [**\SynergiTech\Staffology\Model\ContractCombinedPensionContributionsReportRequest**](../Model/ContractCombinedPensionContributionsReportRequest.md)| | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\ContractJobResponse**](../Model/ContractJobResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `executeCustomReportReportsAsync()` ```php @@ -66,7 +131,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/TagApi.md b/docs/Api/TagApi.md index 0c971be..108a194 100644 --- a/docs/Api/TagApi.md +++ b/docs/Api/TagApi.md @@ -71,7 +71,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -453,7 +453,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -519,7 +519,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/TenantApi.md b/docs/Api/TenantApi.md index 383247e..f5d2244 100644 --- a/docs/Api/TenantApi.md +++ b/docs/Api/TenantApi.md @@ -21,7 +21,9 @@ All URIs are relative to http://localhost, except if the operation defines anoth | [**employerUsersTenant()**](TenantApi.md#employerUsersTenant) | **GET** /tenants/{id}/employers/{employerId}/users | Get Employer Users | | [**getApiMailingListReportByIdTenant()**](TenantApi.md#getApiMailingListReportByIdTenant) | **GET** /tenants/{id}/reports/apimailinglist | Api Mailing List Report | | [**getApiMailingListReportTenant()**](TenantApi.md#getApiMailingListReportTenant) | **GET** /tenants/reports/apimailinglist | Api Mailing List Report | +| [**getBureauUsageStatsTenant()**](TenantApi.md#getBureauUsageStatsTenant) | **GET** /tenants/{id}/bureau-usage-stats | Get UsageStats Report | | [**getEmployersTenant()**](TenantApi.md#getEmployersTenant) | **GET** /tenants/{id}/users/employers | Get Employers | +| [**getPayrollSquadMembersTenant()**](TenantApi.md#getPayrollSquadMembersTenant) | **GET** /tenants/{id}/payrollsquads | Get Payroll Squad Members for Employer | | [**getPayrollSquadTenant()**](TenantApi.md#getPayrollSquadTenant) | **GET** /tenants/{id}/payrollsquad/{payrollSquadId} | Get Payroll Squad | | [**getPayrollSquadsTenant()**](TenantApi.md#getPayrollSquadsTenant) | **GET** /tenants/{id}/payrollsquad | Get Payroll Squads | | [**getPricingTableTenant()**](TenantApi.md#getPricingTableTenant) | **GET** /tenants/{id}/pricingtables/{pricingTableId} | Get PricingTable | @@ -44,7 +46,6 @@ All URIs are relative to http://localhost, except if the operation defines anoth | [**setMonthlyMinimumTenant()**](TenantApi.md#setMonthlyMinimumTenant) | **PUT** /tenants/{id}/users/{userId}/monthlyminimum | Set Monthly Minimum | | [**setPricingTableIdTenant()**](TenantApi.md#setPricingTableIdTenant) | **PUT** /tenants/{id}/users/{userId}/pricingtable | Set User PricingTableId | | [**setTenantTenant()**](TenantApi.md#setTenantTenant) | **PUT** /tenants/{id}/users/{userId}/tenant | Set User Tenant | -| [**setUserCanUseRefactoredAeRoutinesTenant()**](TenantApi.md#setUserCanUseRefactoredAeRoutinesTenant) | **PUT** /tenants/{id}/users/{userId}/refactoredaeroutine | Set CanUseRefactoredAeRoutines flag | | [**updateBillTenant()**](TenantApi.md#updateBillTenant) | **PUT** /tenants/{id}/bills/{year}/{month}/{billId} | Update Bill | | [**updateCssColorsTenant()**](TenantApi.md#updateCssColorsTenant) | **PUT** /tenants/{id}/css/colors | Update CSS Colors | | [**updateCssTenant()**](TenantApi.md#updateCssTenant) | **PUT** /tenants/{id}/css | Update CSS | @@ -119,7 +120,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -444,7 +445,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -508,7 +509,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -570,7 +571,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -830,7 +831,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1151,6 +1152,74 @@ This endpoint does not need any parameter. [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `getBureauUsageStatsTenant()` + +```php +getBureauUsageStatsTenant($id, $fromDate, $toDate, $accept): \SynergiTech\Staffology\Model\ReportResponse +``` + +Get UsageStats Report + +Returns usage statistics data for all employers the logged in user has access to for the given date range. If either of the dates are not provided then the values are defaulted to the first and last date of the previous calendar month. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\TenantApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string +$fromDate = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime +$toDate = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime +$accept = 'accept_example'; // string + +try { + $result = $apiInstance->getBureauUsageStatsTenant($id, $fromDate, $toDate, $accept); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TenantApi->getBureauUsageStatsTenant: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| | | +| **fromDate** | **\DateTime**| | [optional] | +| **toDate** | **\DateTime**| | [optional] | +| **accept** | **string**| | [optional] | + +### Return type + +[**\SynergiTech\Staffology\Model\ReportResponse**](../Model/ReportResponse.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json`, `text/csv` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `getEmployersTenant()` ```php @@ -1213,6 +1282,68 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `getPayrollSquadMembersTenant()` + +```php +getPayrollSquadMembersTenant($id): \SynergiTech\Staffology\Model\Item[] +``` + +Get Payroll Squad Members for Employer + +Returns all Payroll Squad Members for the Employer + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new SynergiTech\Staffology\Api\TenantApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string | Current Employer id + +try { + $result = $apiInstance->getPayrollSquadMembersTenant($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TenantApi->getPayrollSquadMembersTenant: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **id** | **string**| Current Employer id | | + +### Return type + +[**\SynergiTech\Staffology\Model\Item[]**](../Model/Item.md) + +### Authorization + +[Basic](../../README.md#Basic) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `getPayrollSquadTenant()` ```php @@ -1782,7 +1913,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1846,7 +1977,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -1909,7 +2040,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2039,7 +2170,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2492,7 +2623,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2629,71 +2760,6 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `setUserCanUseRefactoredAeRoutinesTenant()` - -```php -setUserCanUseRefactoredAeRoutinesTenant($id, $userId, $canUseRefactoredAeRoutines) -``` - -Set CanUseRefactoredAeRoutines flag - -Updates the CanUseRefactoredAeRoutines flag for a User - -### Example - -```php -setUsername('YOUR_USERNAME') - ->setPassword('YOUR_PASSWORD'); - - -$apiInstance = new SynergiTech\Staffology\Api\TenantApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -$id = 'id_example'; // string | The Id of the Tenant. -$userId = 'userId_example'; // string | The Id of the User. -$canUseRefactoredAeRoutines = True; // bool | The CanUseRefactoredAeRoutines flag for the User. - -try { - $apiInstance->setUserCanUseRefactoredAeRoutinesTenant($id, $userId, $canUseRefactoredAeRoutines); -} catch (Exception $e) { - echo 'Exception when calling TenantApi->setUserCanUseRefactoredAeRoutinesTenant: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **id** | **string**| The Id of the Tenant. | | -| **userId** | **string**| The Id of the User. | | -| **canUseRefactoredAeRoutines** | **bool**| The CanUseRefactoredAeRoutines flag for the User. | [optional] | - -### Return type - -void (empty response body) - -### Authorization - -[Basic](../../README.md#Basic) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - ## `updateBillTenant()` ```php @@ -2757,7 +2823,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2821,7 +2887,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -2885,7 +2951,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -3079,7 +3145,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -3143,7 +3209,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -3207,7 +3273,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -3273,7 +3339,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/TenantEmailApi.md b/docs/Api/TenantEmailApi.md index 42fb890..3c8f364 100644 --- a/docs/Api/TenantEmailApi.md +++ b/docs/Api/TenantEmailApi.md @@ -389,7 +389,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/TermCalendarApi.md b/docs/Api/TermCalendarApi.md index 8e8d77e..d9b42d0 100644 --- a/docs/Api/TermCalendarApi.md +++ b/docs/Api/TermCalendarApi.md @@ -68,7 +68,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -323,7 +323,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/TermCalendarYearApi.md b/docs/Api/TermCalendarYearApi.md index 3470755..05783f1 100644 --- a/docs/Api/TermCalendarYearApi.md +++ b/docs/Api/TermCalendarYearApi.md @@ -70,7 +70,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -333,7 +333,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/WebhookApi.md b/docs/Api/WebhookApi.md index f5d479c..7825690 100644 --- a/docs/Api/WebhookApi.md +++ b/docs/Api/WebhookApi.md @@ -70,7 +70,7 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -523,7 +523,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Api/WorkingPatternApi.md b/docs/Api/WorkingPatternApi.md index ae6df0d..ec2cf0a 100644 --- a/docs/Api/WorkingPatternApi.md +++ b/docs/Api/WorkingPatternApi.md @@ -68,7 +68,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) @@ -323,7 +323,7 @@ try { ### HTTP request headers -- **Content-Type**: `application/json-patch+json`, `application/json`, `text/json`, `application/*+json` +- **Content-Type**: `application/*+json`, `application/json`, `application/json-patch+json`, `text/json` - **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) diff --git a/docs/Model/Address.md b/docs/Model/Address.md index 9895c0e..07f10d4 100644 --- a/docs/Model/Address.md +++ b/docs/Model/Address.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**country** | [**\SynergiTech\Staffology\Model\Country**](Country.md) | | [optional] +**foreignCountry** | **string** | | [optional] **line1** | **string** | | [optional] **line2** | **string** | | [optional] **line3** | **string** | | [optional] **line4** | **string** | | [optional] **line5** | **string** | | [optional] **postCode** | **string** | | [optional] -**country** | [**\SynergiTech\Staffology\Model\Country**](Country.md) | | [optional] -**foreignCountry** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AdvancedVarianceReport.md b/docs/Model/AdvancedVarianceReport.md index 002d3b9..8fcc3aa 100644 --- a/docs/Model/AdvancedVarianceReport.md +++ b/docs/Model/AdvancedVarianceReport.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\AdvancedVarianceReportLine[]**](AdvancedVarianceReportLine.md) | | [optional] **payCodes** | [**\SynergiTech\Staffology\Model\PayCode[]**](PayCode.md) | | [optional] **primaryPeriodName** | **string** | | [optional] -**secondaryPeriodName** | **string** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**secondaryPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AdvancedVarianceReportLine.md b/docs/Model/AdvancedVarianceReportLine.md index d45046d..7c2e931 100644 --- a/docs/Model/AdvancedVarianceReportLine.md +++ b/docs/Model/AdvancedVarianceReportLine.md @@ -4,24 +4,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**costCentre** | **string** | | [optional] +**department** | **string** | | [optional] **employeeCode** | **string** | | [optional] **employeeName** | **string** | | [optional] -**department** | **string** | | [optional] -**costCentre** | **string** | | [optional] -**primaryGrossTotal** | **float** | | [optional] -**secondaryGrossTotal** | **float** | | [optional] +**payCodeVarianceLines** | [**\SynergiTech\Staffology\Model\PayCodeVarianceLine[]**](PayCodeVarianceLine.md) | | [optional] +**primaryEmployeeNi** | **float** | | [optional] +**primaryEmployerNi** | **float** | | [optional] **primaryGrossTaxable** | **float** | | [optional] -**secondaryGrossTaxable** | **float** | | [optional] +**primaryGrossTotal** | **float** | | [optional] **primaryNetPay** | **float** | | [optional] -**secondaryNetPay** | **float** | | [optional] +**primaryStudentOrPgLoan** | **float** | | [optional] **primaryTax** | **float** | | [optional] -**secondaryTax** | **float** | | [optional] -**primaryEmployeeNi** | **float** | | [optional] **secondaryEmployeeNi** | **float** | | [optional] -**primaryEmployerNi** | **float** | | [optional] **secondaryEmployerNi** | **float** | | [optional] -**primaryStudentOrPgLoan** | **float** | | [optional] +**secondaryGrossTaxable** | **float** | | [optional] +**secondaryGrossTotal** | **float** | | [optional] +**secondaryNetPay** | **float** | | [optional] **secondaryStudentOrPgLoan** | **float** | | [optional] -**payCodeVarianceLines** | [**\SynergiTech\Staffology\Model\PayCodeVarianceLine[]**](PayCodeVarianceLine.md) | | [optional] +**secondaryTax** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AdvancedVarianceReportReportResponse.md b/docs/Model/AdvancedVarianceReportReportResponse.md index d7be1c6..2b4be4a 100644 --- a/docs/Model/AdvancedVarianceReportReportResponse.md +++ b/docs/Model/AdvancedVarianceReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\AdvancedVarianceReport**](AdvancedVarianceReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AeAssessment.md b/docs/Model/AeAssessment.md index 67fe4a7..75396f4 100644 --- a/docs/Model/AeAssessment.md +++ b/docs/Model/AeAssessment.md @@ -4,23 +4,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**action** | [**\SynergiTech\Staffology\Model\AeAssessmentAction**](AeAssessmentAction.md) | | [optional] +**aeExclusionCode** | [**\SynergiTech\Staffology\Model\AeExclusionCode**](AeExclusionCode.md) | | [optional] +**age** | **int** | [readonly] The age of the Employee at the time of the assessment | [optional] **assessmentDate** | **\DateTime** | | [optional] +**earningsInPeriod** | **float** | [readonly] | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **employeeState** | [**\SynergiTech\Staffology\Model\AeEmployeeState**](AeEmployeeState.md) | | [optional] -**age** | **int** | [readonly] The age of the Employee at the time of the assessment | [optional] -**ukWorker** | [**\SynergiTech\Staffology\Model\AeUKWorker**](AeUKWorker.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**endPayRunEntryId** | **int** | | [optional] +**endReportingType** | [**\SynergiTech\Staffology\Model\PensionReportingType**](PensionReportingType.md) | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **ordinal** | **int** | [readonly] The PaySchedule ordinal for the Employee at the time of the assessment | [optional] -**earningsInPeriod** | **float** | [readonly] | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**payRunVersion** | **int** | [readonly] The supplementary pay run version of this AeAssessment. | [optional] **qualifyingEarningsInPeriod** | **float** | [readonly] | [optional] -**aeExclusionCode** | [**\SynergiTech\Staffology\Model\AeExclusionCode**](AeExclusionCode.md) | | [optional] -**status** | [**\SynergiTech\Staffology\Model\AeStatus**](AeStatus.md) | | [optional] **reason** | **string** | [readonly] The reason for determining the Status given. | [optional] -**action** | [**\SynergiTech\Staffology\Model\AeAssessmentAction**](AeAssessmentAction.md) | | [optional] -**startReportingType** | [**\SynergiTech\Staffology\Model\PensionReportingType**](PensionReportingType.md) | | [optional] -**endReportingType** | [**\SynergiTech\Staffology\Model\PensionReportingType**](PensionReportingType.md) | | [optional] **startPayRunEntryId** | **int** | | [optional] -**endPayRunEntryId** | **int** | | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**startReportingType** | [**\SynergiTech\Staffology\Model\PensionReportingType**](PensionReportingType.md) | | [optional] +**status** | [**\SynergiTech\Staffology\Model\AeStatus**](AeStatus.md) | | [optional] +**ukWorker** | [**\SynergiTech\Staffology\Model\AeUKWorker**](AeUKWorker.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AeAssessmentAction.md b/docs/Model/AeAssessmentAction.md index 219d087..f3f86a7 100644 --- a/docs/Model/AeAssessmentAction.md +++ b/docs/Model/AeAssessmentAction.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action** | [**\SynergiTech\Staffology\Model\AeAction**](AeAction.md) | | [optional] -**employeeState** | [**\SynergiTech\Staffology\Model\AeEmployeeState**](AeEmployeeState.md) | | [optional] **actionCompleted** | **bool** | [readonly] Indicates whether or not the required action was successfully completed | [optional] **actionCompletedMessage** | **string** | [readonly] Gives further information about the action taken or the reason if wasn't successfully completed | [optional] -**requiredLetter** | [**\SynergiTech\Staffology\Model\AeStatutoryLetter**](AeStatutoryLetter.md) | | [optional] +**employeeState** | [**\SynergiTech\Staffology\Model\AeEmployeeState**](AeEmployeeState.md) | | [optional] +**letterNotYetSent** | **bool** | [readonly] Indicates whether or not any required letter has been sent | [optional] **pensionSchemeId** | **string** | [readonly] The PensionSchemeId that a completed action relates to | [optional] +**requiredLetter** | [**\SynergiTech\Staffology\Model\AeStatutoryLetter**](AeStatutoryLetter.md) | | [optional] **workerGroupId** | **string** | [readonly] The WorkerGroupId that a completed action relates to | [optional] -**letterNotYetSent** | **bool** | [readonly] Indicates whether or not any required letter has been sent | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AeLetter.md b/docs/Model/AeLetter.md new file mode 100644 index 0000000..382851e --- /dev/null +++ b/docs/Model/AeLetter.md @@ -0,0 +1,8 @@ +# # AeLetter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AeLetterSentType.md b/docs/Model/AeLetterSentType.md new file mode 100644 index 0000000..30b97ba --- /dev/null +++ b/docs/Model/AeLetterSentType.md @@ -0,0 +1,8 @@ +# # AeLetterSentType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AeReason.md b/docs/Model/AeReason.md new file mode 100644 index 0000000..ca08d3f --- /dev/null +++ b/docs/Model/AeReason.md @@ -0,0 +1,8 @@ +# # AeReason + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AnalysisCategoryCode.md b/docs/Model/AnalysisCategoryCode.md index 843eb9b..d47f8f4 100644 --- a/docs/Model/AnalysisCategoryCode.md +++ b/docs/Model/AnalysisCategoryCode.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**accountingCode** | **string** | | [optional] **code** | **string** | | -**title** | **string** | The name of this Analysis Code | **color** | **string** | A color to used to represent this Analysis Code, in hex format. ie 'ff0000' | [optional] -**accountingCode** | **string** | | [optional] +**title** | **string** | The name of this Analysis Code | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AnalysisCategoryCodes.md b/docs/Model/AnalysisCategoryCodes.md index 038bf4e..c46a638 100644 --- a/docs/Model/AnalysisCategoryCodes.md +++ b/docs/Model/AnalysisCategoryCodes.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **analysisCategory** | **string** | AnalysisCategory Model | [optional] **analysisCategoryCode** | **string** | AnalysisCategoryCode Model | [optional] -**analysisCategoryId** | **string** | AnalysisCategory Identifier | [optional] **analysisCategoryCodeId** | **string** | AnalysisCategoryCode Identifier | [optional] +**analysisCategoryId** | **string** | AnalysisCategory Identifier | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AnalysisCategoryIndex.md b/docs/Model/AnalysisCategoryIndex.md index 0329c50..5ab0c7a 100644 --- a/docs/Model/AnalysisCategoryIndex.md +++ b/docs/Model/AnalysisCategoryIndex.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | [optional] **index** | **int** | | [optional] +**name** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AnalysisReport.md b/docs/Model/AnalysisReport.md index 2e8755a..04c6a81 100644 --- a/docs/Model/AnalysisReport.md +++ b/docs/Model/AnalysisReport.md @@ -4,21 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\AnalysisReportLine[]**](AnalysisReportLine.md) | | [optional] +**ordinal** | **int** | | [optional] **payCodes** | [**\SynergiTech\Staffology\Model\PayCode[]**](PayCode.md) | | [optional] -**showPayPeriodBreakdown** | **bool** | | [optional] -**employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**ordinal** | **int** | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**showPayPeriodBreakdown** | **bool** | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AnalysisReportLine.md b/docs/Model/AnalysisReportLine.md index fed08c4..8c71a8c 100644 --- a/docs/Model/AnalysisReportLine.md +++ b/docs/Model/AnalysisReportLine.md @@ -5,17 +5,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**taxYear** | **string** | | [optional] -**payPeriod** | **int** | | [optional] +**employerNic** | **float** | | [optional] +**employerPension** | **float** | | [optional] **gross** | **float** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\AnalysisReportLineValue[]**](AnalysisReportLineValue.md) | | [optional] +**net** | **float** | | [optional] +**niSaving** | **float** | | [optional] **niableGross** | **float** | | [optional] +**payPeriod** | **int** | | [optional] **pensionableGross** | **float** | | [optional] -**net** | **float** | | [optional] -**takeHome** | **float** | | [optional] -**employerNic** | **float** | | [optional] -**employerPension** | **float** | | [optional] **showQtyColumn** | **bool** | | [optional] -**niSaving** | **float** | | [optional] -**lines** | [**\SynergiTech\Staffology\Model\AnalysisReportLineValue[]**](AnalysisReportLineValue.md) | | [optional] +**takeHome** | **float** | | [optional] +**taxYear** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AnalysisReportLineValue.md b/docs/Model/AnalysisReportLineValue.md index 0bb4ab6..7c8e51f 100644 --- a/docs/Model/AnalysisReportLineValue.md +++ b/docs/Model/AnalysisReportLineValue.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**qty** | **float** | | [optional] **code** | **string** | | [optional] +**qty** | **float** | | [optional] **value** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AnalysisReportReportResponse.md b/docs/Model/AnalysisReportReportResponse.md index 2293e49..c1436be 100644 --- a/docs/Model/AnalysisReportReportResponse.md +++ b/docs/Model/AnalysisReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\AnalysisReport**](AnalysisReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AttachmentOrder.md b/docs/Model/AttachmentOrder.md index 3196493..f2799c3 100644 --- a/docs/Model/AttachmentOrder.md +++ b/docs/Model/AttachmentOrder.md @@ -4,33 +4,33 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\SynergiTech\Staffology\Model\AttachmentOrderType**](AttachmentOrderType.md) | | [optional] -**carryForwardShortfall** | **bool** | [ReadOnly] Whether or not shortfalls should be carried forward | [optional] [readonly] **allowProtectedEarnings** | **bool** | [ReadOnly] Whether or not shortfalls should be carried forward | [optional] [readonly] -**autoDeduction** | **bool** | [readonly] Whether or not the amount to be deducted is automatically calculated | [optional] [readonly] -**reference** | **string** | The reference which appeared on the court paperwork | [optional] -**issueDate** | **\DateTime** | The date of issue for this Order | [optional] +**amountPreviouslyPaid** | **float** | Any amount that has previously been paid towards this Order | [optional] **applyFrom** | **\DateTime** | The date from which to apply this Order | [optional] **applyUntil** | **\DateTime** | An optional date on which to stop applying this order | [optional] -**deductionIsPercentage** | **bool** | Whether or not the amount given for Deduction is a percentage rather than a fixed amount | [optional] -**deduction** | **float** | The percentage or amount (depending on DeductionIsPercentage) to deduct | [optional] -**protectedEarningsIsPercentage** | **bool** | Whether or not the amount for ProtectedEarnings is a percentage rather than a fixed amount. | [optional] -**protectedEarnings** | **float** | The percentage or amount or percentage (depending on ProtectedEarningsIsPercentage) to protect | [optional] -**chargeAdminFee** | **bool** | Whether or not a £1 admin fee should be deducted for this order | [optional] -**shortfall** | **float** | Any shortfall that is being carried forward | [optional] -**stopWhenTotalPaid** | **bool** | Whether or not this order should be stopped once a total amount has been paid | [optional] -**totalAmountToPay** | **float** | The Total amount that needs to be paid for this Order | [optional] -**amountPreviouslyPaid** | **float** | Any amount that has previously been paid towards this Order | [optional] -**stopped** | **bool** | [readonly] Whether or not this Order has been stopped. This is set automatically when either it's paid in full or the ApplyUntil date has been reached. | [optional] -**notes** | **string** | A free-form text field to record any comments | [optional] -**includeBankDetails** | **bool** | | [optional] +**autoDeduction** | **bool** | [readonly] Whether or not the amount to be deducted is automatically calculated | [optional] [readonly] **bankDetails** | [**\SynergiTech\Staffology\Model\BankDetails**](BankDetails.md) | | [optional] -**payments** | [**\SynergiTech\Staffology\Model\AttachmentOrderPayment[]**](AttachmentOrderPayment.md) | [readonly] Payments made towards this order. Only populated when viewed as a report. | [optional] -**payee** | **string** | The Id of the Payee, if any, that deductions are to be paid to. | [optional] -**payeeName** | **string** | The name of the Payee, if any, that deductions are to be paid to. | [optional] +**carryForwardShortfall** | **bool** | [ReadOnly] Whether or not shortfalls should be carried forward | [optional] [readonly] +**chargeAdminFee** | **bool** | Whether or not a £1 admin fee should be deducted for this order | [optional] +**deduction** | **float** | The percentage or amount (depending on DeductionIsPercentage) to deduct | [optional] +**deductionIsPercentage** | **bool** | Whether or not the amount given for Deduction is a percentage rather than a fixed amount | [optional] **documentCount** | **int** | [readonly] The number of attachments associated with this model | [optional] **documents** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] The attachments associated with this model | [optional] **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**includeBankDetails** | **bool** | | [optional] +**issueDate** | **\DateTime** | The date of issue for this Order | [optional] +**notes** | **string** | A free-form text field to record any comments | [optional] +**payee** | **string** | The Id of the Payee, if any, that deductions are to be paid to. | [optional] +**payeeName** | **string** | The name of the Payee, if any, that deductions are to be paid to. | [optional] +**payments** | [**\SynergiTech\Staffology\Model\AttachmentOrderPayment[]**](AttachmentOrderPayment.md) | [readonly] Payments made towards this order. Only populated when viewed as a report. | [optional] +**protectedEarnings** | **float** | The percentage or amount or percentage (depending on ProtectedEarningsIsPercentage) to protect | [optional] +**protectedEarningsIsPercentage** | **bool** | Whether or not the amount for ProtectedEarnings is a percentage rather than a fixed amount. | [optional] +**reference** | **string** | The reference which appeared on the court paperwork | [optional] +**shortfall** | **float** | Any shortfall that is being carried forward | [optional] +**stopWhenTotalPaid** | **bool** | Whether or not this order should be stopped once a total amount has been paid | [optional] +**stopped** | **bool** | [readonly] Whether or not this Order has been stopped. This is set automatically when either it's paid in full or the ApplyUntil date has been reached. | [optional] +**totalAmountToPay** | **float** | The Total amount that needs to be paid for this Order | [optional] +**type** | [**\SynergiTech\Staffology\Model\AttachmentOrderType**](AttachmentOrderType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AttachmentOrderPayment.md b/docs/Model/AttachmentOrderPayment.md index 5d884f0..c44bd9d 100644 --- a/docs/Model/AttachmentOrderPayment.md +++ b/docs/Model/AttachmentOrderPayment.md @@ -4,21 +4,23 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**adminFee** | **float** | [readonly] Any admin fee charged | [optional] +**attachablePay** | **float** | [readonly] The total Attachable pay for the Employee on this PayRun | [optional] **attachmentOrder** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **date** | **\DateTime** | [readonly] The date this deduction was made | [optional] **description** | **string** | [readonly] Description of deduction, usually the reference from the AttachmentOrder | [optional] -**attachablePay** | **float** | [readonly] The total Attachable pay for the Employee on this PayRun | [optional] -**protectedPay** | **float** | [readonly] The amount of the Attachable Pay that must be protected | [optional] -**otherAttachmentOrderDeductions** | **float** | [readonly] Deductions made on this PayRun for this employee due to other higher priority AttachmentOrders | [optional] **desiredDeduction** | **float** | [readonly] The amount that should be deducted, if arrestable pay is available. Not including any shortfall | [optional] -**shortfall** | **float** | [readonly] Any shortfall (ie arrears) that existed before this PayRun. | [optional] -**totalPaid** | **float** | [readonly] Total amount paid to date, including this deduction. | [optional] -**resultingDeduction** | **float** | [readonly] The actual amount deducted | [optional] -**resultingShortfall** | **float** | [readonly] The resulting shortfall (including any shortfall from previous periods | [optional] -**adminFee** | **float** | [readonly] Any admin fee charged | [optional] **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**isLatestVersion** | **bool** | [readonly] Indicates whether this is the latest version of the AttachmentOrderPayment. | [optional] +**otherAttachmentOrderDeductions** | **float** | [readonly] Deductions made on this PayRun for this employee due to other higher priority AttachmentOrders | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**payRunVersion** | **int** | [readonly] The supplementary pay run version of this AttachmentOrderPayment. | [optional] +**protectedPay** | **float** | [readonly] The amount of the Attachable Pay that must be protected | [optional] +**resultingDeduction** | **float** | [readonly] The actual amount deducted | [optional] +**resultingShortfall** | **float** | [readonly] The resulting shortfall (including any shortfall from previous periods | [optional] +**shortfall** | **float** | [readonly] Any shortfall (ie arrears) that existed before this PayRun. | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**totalPaid** | **float** | [readonly] Total amount paid to date, including this deduction. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AttachmentOrderReportResponse.md b/docs/Model/AttachmentOrderReportResponse.md index 24fc04a..2b97867 100644 --- a/docs/Model/AttachmentOrderReportResponse.md +++ b/docs/Model/AttachmentOrderReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\AttachmentOrder**](AttachmentOrder.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AttachmentOrdersReport.md b/docs/Model/AttachmentOrdersReport.md index 4706cd7..15c6f2a 100644 --- a/docs/Model/AttachmentOrdersReport.md +++ b/docs/Model/AttachmentOrdersReport.md @@ -5,17 +5,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**isDraft** | **bool** | | [optional] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AttachmentOrdersReportReportResponse.md b/docs/Model/AttachmentOrdersReportReportResponse.md index 39d410a..291168f 100644 --- a/docs/Model/AttachmentOrdersReportReportResponse.md +++ b/docs/Model/AttachmentOrdersReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\AttachmentOrdersReport**](AttachmentOrdersReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AutoEnrolment.md b/docs/Model/AutoEnrolment.md index b26c1a3..91ebd1a 100644 --- a/docs/Model/AutoEnrolment.md +++ b/docs/Model/AutoEnrolment.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**state** | [**\SynergiTech\Staffology\Model\AeEmployeeState**](AeEmployeeState.md) | | [optional] -**stateDate** | **\DateTime** | [readonly] | [optional] -**ukWorker** | [**\SynergiTech\Staffology\Model\AeUKWorker**](AeUKWorker.md) | | [optional] +**aeExclusionCode** | [**\SynergiTech\Staffology\Model\AeExclusionCode**](AeExclusionCode.md) | | [optional] +**aePostponementLetterSent** | **bool** | | [optional] **daysToDeferAssessment** | **int** | The number of days, if any, to defer assessment of this employee. You're allowed to defer assessment of new employees by up to 3 months. | [optional] -**postponementDate** | **\DateTime** | [readonly] If a value is present, then employee wont be enrolled on an AE Pension until after this date. This is automatically set to a date if the employee is deemed to be an EligibleJobHolder, but the employer has set a Postponement period and this value is currently null This is automatically set to null if it already has a value and the employee is deemed NOT to be an EligibleJobHolder - ie, they previously qualified but now do not. | [optional] **deferByMonthsNotDays** | **bool** | If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days | [optional] **exempt** | **bool** | | [optional] -**aeExclusionCode** | [**\SynergiTech\Staffology\Model\AeExclusionCode**](AeExclusionCode.md) | | [optional] -**aePostponementLetterSent** | **bool** | | [optional] **lastAssessment** | [**\SynergiTech\Staffology\Model\AeAssessment**](AeAssessment.md) | | [optional] +**postponementDate** | **\DateTime** | [readonly] If a value is present, then employee wont be enrolled on an AE Pension until after this date. This is automatically set to a date if the employee is deemed to be an EligibleJobHolder, but the employer has set a Postponement period and this value is currently null This is automatically set to null if it already has a value and the employee is deemed NOT to be an EligibleJobHolder - ie, they previously qualified but now do not. | [optional] +**state** | [**\SynergiTech\Staffology\Model\AeEmployeeState**](AeEmployeeState.md) | | [optional] +**stateDate** | **\DateTime** | [readonly] | [optional] +**ukWorker** | [**\SynergiTech\Staffology\Model\AeUKWorker**](AeUKWorker.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AutomationSettings.md b/docs/Model/AutomationSettings.md index 3e70b44..2549d01 100644 --- a/docs/Model/AutomationSettings.md +++ b/docs/Model/AutomationSettings.md @@ -4,30 +4,30 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**enableAutoPilot** | **bool** | IF enabled then payruns will be automatically finalised on the payment date and the next payrun will be started | [optional] -**autoPilotTime** | [**\SynergiTech\Staffology\Model\AutoPilotFinaliseTime**](AutoPilotFinaliseTime.md) | | [optional] **autoPilotOffset** | **int** | How many days before the payment date a payrun should be finalised. Set it to 0 if you want the payrun to be automatically finalised on the payment date itself | [optional] -**enableAutoOpen** | **bool** | IF enabled then whenever you close a payrun, the next one will be started. Automatically set to true if EnableAutoPilot is true | [optional] +**autoPilotTime** | [**\SynergiTech\Staffology\Model\AutoPilotFinaliseTime**](AutoPilotFinaliseTime.md) | | [optional] +**autoSubmitEps** | **bool** | If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun. | [optional] **autoSubmitFps** | **bool** | If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun. This property will always have the same value as the property with the same name on the RtiSubmissionSettings model. | [optional] -**autoSubmitPayments** | **bool** | If set to true, we'll automatically submit payments whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'Payments'. | [optional] **autoSubmitJournal** | **bool** | If set to true, we'll automatically submit the payroll journal whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'Accounting'. | [optional] -**autoSubmitPaymentsEmployee** | **bool** | Used in conjunction with AutoSubmitPayments. | [optional] -**autoSubmitPayslips** | **bool** | If set to true, we'll automatically submit payslips whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'. | [optional] **autoSubmitP45s** | **bool** | If set to true, we'll automatically submit P45s whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'. | [optional] -**autoSubmitPaymentsHmrc** | **bool** | Used in conjunction with AutoSubmitPayments. | [optional] -**autoSubmitPaymentsDeductions** | **bool** | Used in conjunction with AutoSubmitPayments. | [optional] +**autoSubmitPayments** | **bool** | If set to true, we'll automatically submit payments whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'Payments'. | [optional] **autoSubmitPaymentsAeos** | **bool** | Used in conjunction with AutoSubmitPayments. | [optional] +**autoSubmitPaymentsDeductions** | **bool** | Used in conjunction with AutoSubmitPayments. | [optional] +**autoSubmitPaymentsEmployee** | **bool** | Used in conjunction with AutoSubmitPayments. | [optional] +**autoSubmitPaymentsHmrc** | **bool** | Used in conjunction with AutoSubmitPayments. | [optional] **autoSubmitPaymentsPensions** | **bool** | Used in conjunction with AutoSubmitPayments. | [optional] -**payslipReleaseType** | [**\SynergiTech\Staffology\Model\PayslipReleaseType**](PayslipReleaseType.md) | | [optional] +**autoSubmitPayslips** | **bool** | If set to true, we'll automatically submit payslips whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'. | [optional] **autoSubmitPayslipsDaysBeforePayday** | [**\SynergiTech\Staffology\Model\DaysBeforePayday**](DaysBeforePayday.md) | | [optional] **autoSubmitPayslipsPaymentDateRule** | [**\SynergiTech\Staffology\Model\PayslipReleasePaymentDateRule**](PayslipReleasePaymentDateRule.md) | | [optional] **autoSubmitPayslipsPayslipReleaseTime** | [**\SynergiTech\Staffology\Model\PayslipReleaseTime**](PayslipReleaseTime.md) | | [optional] -**employeesWithoutEmailAddress** | **int** | [readonly] A count of how many employees or subcontractors for this employer do not have email addresses | [optional] -**employeesWithEmailAddressButNotAutoSending** | **int** | [readonly] A count of how many employees or subcontractors for this employer do have email addresses but don't have the option enabled to auto-email payslips | [optional] -**subcontractorsNotAutoSendingStatement** | **int** | [readonly] A count of how many subscontractors for this employer do don't have the option enabled to auto-email statement | [optional] +**autoSubmitPensionLetters** | **bool** | If set to true, we'll automatically submit Pension Letters whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'. | [optional] **codingNoticesAutomaticallyApplied** | **bool** | [readonly] An indicator of whether or not this employer is automatically applying DpsNotices | [optional] +**employeesWithEmailAddressButNotAutoSending** | **int** | [readonly] A count of how many employees or subcontractors for this employer do have email addresses but don't have the option enabled to auto-email payslips | [optional] +**employeesWithoutEmailAddress** | **int** | [readonly] A count of how many employees or subcontractors for this employer do not have email addresses | [optional] +**enableAutoOpen** | **bool** | IF enabled then whenever you close a payrun, the next one will be started. Automatically set to true if EnableAutoPilot is true | [optional] +**enableAutoPilot** | **bool** | IF enabled then payruns will be automatically finalised on the payment date and the next payrun will be started | [optional] **payrunEmails** | [**\SynergiTech\Staffology\Model\PayrunEmail[]**](PayrunEmail.md) | Automated emails that will be sent when a PayRun is finalised | [optional] -**autoSubmitPensionLetters** | **bool** | If set to true, we'll automatically submit Pension Letters whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'. | [optional] -**autoSubmitEps** | **bool** | If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun. | [optional] +**payslipReleaseType** | [**\SynergiTech\Staffology\Model\PayslipReleaseType**](PayslipReleaseType.md) | | [optional] +**subcontractorsNotAutoSendingStatement** | **int** | [readonly] A count of how many subscontractors for this employer do don't have the option enabled to auto-email statement | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AverageHolidayPayRateReport.md b/docs/Model/AverageHolidayPayRateReport.md index 8bac194..91b6892 100644 --- a/docs/Model/AverageHolidayPayRateReport.md +++ b/docs/Model/AverageHolidayPayRateReport.md @@ -4,19 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**lines** | [**\SynergiTech\Staffology\Model\AverageHolidayPayRateReportLine[]**](AverageHolidayPayRateReportLine.md) | | [optional] **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**isDraft** | **bool** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\AverageHolidayPayRateReportLine[]**](AverageHolidayPayRateReportLine.md) | | [optional] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AverageHolidayPayRateReportLine.md b/docs/Model/AverageHolidayPayRateReportLine.md index 5c23eee..87c7a15 100644 --- a/docs/Model/AverageHolidayPayRateReportLine.md +++ b/docs/Model/AverageHolidayPayRateReportLine.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollCode** | **string** | Payroll code of the employee | [optional] +**department** | **string** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **firstName** | **string** | The First Name of the employee | [optional] **lastName** | **string** | The Last Name of the employee | [optional] **niNumber** | **string** | The NiNumber of the employee | [optional] +**payrollCode** | **string** | Payroll code of the employee | [optional] **period** | **int** | The Period of the average holiday pay rate | [optional] **rate** | **float** | The Average holiday pay rate | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**department** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AverageHolidayPayRateReportReportResponse.md b/docs/Model/AverageHolidayPayRateReportReportResponse.md index 8d5da7c..6410d53 100644 --- a/docs/Model/AverageHolidayPayRateReportReportResponse.md +++ b/docs/Model/AverageHolidayPayRateReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\AverageHolidayPayRateReport**](AverageHolidayPayRateReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AveragePayGradesReportLine.md b/docs/Model/AveragePayGradesReportLine.md index 518d0f4..50e93f0 100644 --- a/docs/Model/AveragePayGradesReportLine.md +++ b/docs/Model/AveragePayGradesReportLine.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**department** | **string** | | [optional] **effectiveDate** | **\DateTime** | Effective date for Pay spine grade | [optional] -**paySpineName** | **string** | Name of Pay Spine | [optional] -**payGradeName** | **string** | Name of Pay grade name | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **lowerGradePoint** | **string** | Lower grade point of pay spine grade | [optional] +**payGradeName** | **string** | Name of Pay grade name | [optional] +**paySpineName** | **string** | Name of Pay Spine | [optional] +**payrollCode** | **string** | | [optional] **upperGradePoint** | **string** | Upper grade point of pay spine grade | [optional] **upperPointAltMax** | **bool** | To Check Alt Max of Upper point | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payrollCode** | **string** | | [optional] -**department** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AverageWeeklyEarnings.md b/docs/Model/AverageWeeklyEarnings.md index 5f21377..7802101 100644 --- a/docs/Model/AverageWeeklyEarnings.md +++ b/docs/Model/AverageWeeklyEarnings.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**result** | [**\SynergiTech\Staffology\Model\AverageWeeklyEarningsResult**](AverageWeeklyEarningsResult.md) | | [optional] -**resultDescription** | **string** | | [optional] [readonly] **averageEarnings** | **float** | | [optional] [readonly] -**threshold** | **float** | | [optional] **eligibilityThreshold** | **float** | | [optional] -**requestedDate** | **\DateTime** | | [optional] -**relevantPeriodStart** | **\DateTime** | | [optional] +**relevantPeriodEarnings** | **float** | | [optional] **relevantPeriodEnd** | **\DateTime** | | [optional] +**relevantPeriodStart** | **\DateTime** | | [optional] **relevantPeriodWeekCount** | **float** | | [optional] -**relevantPeriodEarnings** | **float** | | [optional] +**requestedDate** | **\DateTime** | | [optional] +**result** | [**\SynergiTech\Staffology\Model\AverageWeeklyEarningsResult**](AverageWeeklyEarningsResult.md) | | [optional] +**resultDescription** | **string** | | [optional] [readonly] +**threshold** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BankDetails.md b/docs/Model/BankDetails.md index dcf8174..91f7afa 100644 --- a/docs/Model/BankDetails.md +++ b/docs/Model/BankDetails.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bankName** | **string** | | [optional] -**bankBranch** | **string** | | [optional] -**bankReference** | **string** | | [optional] **accountName** | **string** | | [optional] **accountNumber** | **string** | | [optional] -**sortCode** | **string** | | [optional] -**note** | **string** | | [optional] +**bankBranch** | **string** | | [optional] +**bankName** | **string** | | [optional] +**bankReference** | **string** | | [optional] **buildingSocietyRollNumber** | **string** | | [optional] +**note** | **string** | | [optional] +**sortCode** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BankPaymentInstruction.md b/docs/Model/BankPaymentInstruction.md index 75923e5..46de8bf 100644 --- a/docs/Model/BankPaymentInstruction.md +++ b/docs/Model/BankPaymentInstruction.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**originator** | [**\SynergiTech\Staffology\Model\BankDetails**](BankDetails.md) | | [optional] +**allowsMultiDate** | **bool** | Allows multiple payment dates in the file | [optional] **bankPayments** | [**\SynergiTech\Staffology\Model\PayRunPayment[]**](PayRunPayment.md) | | [optional] -**status** | [**\SynergiTech\Staffology\Model\BackgroundTaskStatus**](BackgroundTaskStatus.md) | | [optional] -**statusMessage** | **string** | [readonly] A message to elaborate on the Status | [optional] +**bureauNumber** | **string** | Bureau number to be used if available while sending payment instruction | [optional] **link** | **string** | [readonly] If available, a link to the payments in an ExternalDataProvider | [optional] +**originator** | [**\SynergiTech\Staffology\Model\BankDetails**](BankDetails.md) | | [optional] **serviceUserNumber** | **string** | Service user number to be used while sending payment instruction | [optional] -**bureauNumber** | **string** | Bureau number to be used if available while sending payment instruction | [optional] -**allowsMultiDate** | **bool** | Allows multiple payment dates in the file | [optional] +**status** | [**\SynergiTech\Staffology\Model\BackgroundTaskStatus**](BackgroundTaskStatus.md) | | [optional] +**statusMessage** | **string** | [readonly] A message to elaborate on the Status | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BankPaymentInstructionReportResponse.md b/docs/Model/BankPaymentInstructionReportResponse.md index ac6ff91..aec64e4 100644 --- a/docs/Model/BankPaymentInstructionReportResponse.md +++ b/docs/Model/BankPaymentInstructionReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\BankPaymentInstruction**](BankPaymentInstruction.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Benefit.md b/docs/Model/Benefit.md index 8be1e1d..8d40efd 100644 --- a/docs/Model/Benefit.md +++ b/docs/Model/Benefit.md @@ -4,32 +4,32 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**type** | [**\SynergiTech\Staffology\Model\BenefitType**](BenefitType.md) | | [optional] -**declarationType** | [**\SynergiTech\Staffology\Model\BenefitDeclarationType**](BenefitDeclarationType.md) | | [optional] +**assetType** | [**\SynergiTech\Staffology\Model\BenefitDetailsAssetType**](BenefitDetailsAssetType.md) | | [optional] **benefitPayrolled** | [**\SynergiTech\Staffology\Model\BenefitPayrolled[]**](BenefitPayrolled.md) | | [optional] +**bikOutstanding** | **float** | [readonly] | [optional] [readonly] +**car** | [**\SynergiTech\Staffology\Model\BenefitDetailsCar**](BenefitDetailsCar.md) | | [optional] +**cashEquivalent** | **float** | [readonly] | [optional] [readonly] +**cashEquivalentFuel** | **float** | Only relevant to Benefits with Type Vans | [optional] +**class1AType** | [**\SynergiTech\Staffology\Model\BenefitDetailsClass1AType**](BenefitDetailsClass1AType.md) | | [optional] +**declarationType** | [**\SynergiTech\Staffology\Model\BenefitDeclarationType**](BenefitDeclarationType.md) | | [optional] **description** | **string** | A description of this benefit | [optional] -**value** | **float** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **employeeContribution** | **float** | | [optional] -**startDate** | **\DateTime** | The date the benefits starts if different to the start date of the TaxYear | [optional] **endDate** | **\DateTime** | The date the benefits ends if different to the end date of the TaxYear | [optional] -**useProRata** | **bool** | Benefit calculation should be done on pro rata rules | [optional] -**cashEquivalent** | **float** | [readonly] | [optional] [readonly] -**assetType** | [**\SynergiTech\Staffology\Model\BenefitDetailsAssetType**](BenefitDetailsAssetType.md) | | [optional] -**useOfAssetType** | [**\SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType**](BenefitDetailsUseOfAssetType.md) | | [optional] -**class1AType** | [**\SynergiTech\Staffology\Model\BenefitDetailsClass1AType**](BenefitDetailsClass1AType.md) | | [optional] -**nonClass1AType** | [**\SynergiTech\Staffology\Model\BenefitDetailsNonClass1AType**](BenefitDetailsNonClass1AType.md) | | [optional] -**paymentType** | [**\SynergiTech\Staffology\Model\BenefitDetailsPaymentType**](BenefitDetailsPaymentType.md) | | [optional] -**tradingOrganisation** | **bool** | Only relevant to Benefits with Type Entertainment | [optional] -**cashEquivalentFuel** | **float** | Only relevant to Benefits with Type Vans | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**isPeriodValue** | **bool** | To be used for the benefit period | [optional] **loan** | [**\SynergiTech\Staffology\Model\BenefitDetailsLoan**](BenefitDetailsLoan.md) | | [optional] -**car** | [**\SynergiTech\Staffology\Model\BenefitDetailsCar**](BenefitDetailsCar.md) | | [optional] +**nonClass1AType** | [**\SynergiTech\Staffology\Model\BenefitDetailsNonClass1AType**](BenefitDetailsNonClass1AType.md) | | [optional] **openingBalance** | **float** | The amount of benefit paid YTD when setting up a benefit | [optional] -**paid** | **float** | [readonly] | [optional] [readonly] -**bikOutstanding** | **float** | [readonly] | [optional] [readonly] -**isPeriodValue** | **bool** | To be used for the benefit period | [optional] **overrideOpeningBalance** | **bool** | To be used to change the opening balance if the benefit has been payrolled | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**paid** | **float** | [readonly] | [optional] [readonly] +**paymentType** | [**\SynergiTech\Staffology\Model\BenefitDetailsPaymentType**](BenefitDetailsPaymentType.md) | | [optional] +**startDate** | **\DateTime** | The date the benefits starts if different to the start date of the TaxYear | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**tradingOrganisation** | **bool** | Only relevant to Benefits with Type Entertainment | [optional] +**type** | [**\SynergiTech\Staffology\Model\BenefitType**](BenefitType.md) | | [optional] +**useOfAssetType** | [**\SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType**](BenefitDetailsUseOfAssetType.md) | | [optional] +**useProRata** | **bool** | Benefit calculation should be done on pro rata rules | [optional] +**value** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BenefitDetailsCar.md b/docs/Model/BenefitDetailsCar.md index b962f52..4902317 100644 --- a/docs/Model/BenefitDetailsCar.md +++ b/docs/Model/BenefitDetailsCar.md @@ -4,30 +4,30 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**makeAndModel** | **string** | | [optional] -**registration** | **string** | | [optional] -**firstRegistered** | **\DateTime** | | [optional] -**hasApprovedEmissionsValue** | **bool** | | [optional] -**co2Emissions** | **int** | | [optional] -**engineSize** | **int** | | [optional] -**zeroEmissionsMileage** | **int** | | [optional] -**fuelType** | [**\SynergiTech\Staffology\Model\BenefitDetailsCarPowerType**](BenefitDetailsCarPowerType.md) | | [optional] **availableFrom** | **\DateTime** | | [optional] **availableTo** | **\DateTime** | | [optional] +**cashEquivalent** | **float** | [readonly] | [optional] +**cashEquivalentFuel** | **float** | [readonly] | [optional] +**chargeableValue** | **float** | [readonly] The chargeable value of the car | [optional] [readonly] +**co2Emissions** | **int** | | [optional] **daysUnavailable** | **int** | | [optional] -**listPrice** | **float** | | [optional] -**nonStandardAccessories** | **float** | | [optional] **employeeCapitalContributions** | **float** | | [optional] **employeePrivateContributions** | **float** | | [optional] +**engineSize** | **int** | | [optional] +**firstRegistered** | **\DateTime** | | [optional] **freeFuel** | **bool** | | [optional] +**freeFuelReinstated** | **bool** | | [optional] **fuelAvailableFrom** | **\DateTime** | | [optional] **fuelAvailableTo** | **\DateTime** | | [optional] -**freeFuelReinstated** | **bool** | | [optional] -**registeredPriorTo1998** | **bool** | [readonly] | [optional] [readonly] -**rate** | **float** | [readonly] The applicable rate based on CO2Emissions and Engine Size | [optional] -**chargeableValue** | **float** | [readonly] The chargeable value of the car | [optional] [readonly] +**fuelType** | [**\SynergiTech\Staffology\Model\BenefitDetailsCarPowerType**](BenefitDetailsCarPowerType.md) | | [optional] **fullYearCharge** | **float** | [readonly] The charge for the car for a full year, not taking in to account available dates or EmployeePrivateContributions | [optional] [readonly] -**cashEquivalent** | **float** | [readonly] | [optional] -**cashEquivalentFuel** | **float** | [readonly] | [optional] +**hasApprovedEmissionsValue** | **bool** | | [optional] +**listPrice** | **float** | | [optional] +**makeAndModel** | **string** | | [optional] +**nonStandardAccessories** | **float** | | [optional] +**rate** | **float** | [readonly] The applicable rate based on CO2Emissions and Engine Size | [optional] +**registeredPriorTo1998** | **bool** | [readonly] | [optional] [readonly] +**registration** | **string** | | [optional] +**zeroEmissionsMileage** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BenefitDetailsLoan.md b/docs/Model/BenefitDetailsLoan.md index 2fee3e7..e695428 100644 --- a/docs/Model/BenefitDetailsLoan.md +++ b/docs/Model/BenefitDetailsLoan.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**numberOfJointBorrowers** | **int** | | [optional] -**loanMade** | **\DateTime** | | [optional] -**loanDischarged** | **\DateTime** | | [optional] -**startingBalance** | **float** | | [optional] -**closingBalance** | **float** | | [optional] -**maxBalanceInYear** | **float** | | [optional] -**interestPaid** | **float** | | [optional] **cashEquivalent** | **float** | [readonly] | [optional] [readonly] +**closingBalance** | **float** | | [optional] **fullTaxMonths** | **int** | [readonly] | [optional] +**interestPaid** | **float** | | [optional] +**loanDischarged** | **\DateTime** | | [optional] +**loanMade** | **\DateTime** | | [optional] +**maxBalanceInYear** | **float** | | [optional] **monthlyValue** | **float** | [readonly] | [optional] +**numberOfJointBorrowers** | **int** | | [optional] **officialInterest** | **float** | [readonly] | [optional] +**startingBalance** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BenefitPayrolled.md b/docs/Model/BenefitPayrolled.md index 75d9449..123485e 100644 --- a/docs/Model/BenefitPayrolled.md +++ b/docs/Model/BenefitPayrolled.md @@ -4,8 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **amount** | **float** | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**isLatestVersion** | **bool** | [readonly] Indicates whether this is the latest version of the BenefitPayrolled. | [optional] +**payRunVersion** | **int** | [readonly] The supplementary pay run version of this BenefitPayrolled. | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BureauSettings.md b/docs/Model/BureauSettings.md index 94bdc1b..4fcc9d0 100644 --- a/docs/Model/BureauSettings.md +++ b/docs/Model/BureauSettings.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **enableApprovals** | **bool** | Whether or not Payruns for this employer need to go through an Approval process | [optional] -**processorUserId** | **string** | The Id of the user, if any, that is the allocated Processor | [optional] -**reportPackId** | **string** | The Id of the ReportPack, if any, to present to the Payroll Client | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **isBacsClient** | **bool** | Indicates that the bureau is responsible for BACS payments of net wages to employees | [optional] **isBacsClientForHmrc** | **bool** | Indicates that the bureau is responsible for BACS payments of HMRC liabilites | [optional] +**processorUserId** | **string** | The Id of the user, if any, that is the allocated Processor | [optional] +**reportPackId** | **string** | The Id of the ReportPack, if any, to present to the Payroll Client | [optional] **showContactCard** | **bool** | Show a Contact card with the Processors details on the PayrollClient dashboard | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CalendarEntry.md b/docs/Model/CalendarEntry.md index f74fcb5..a0225b7 100644 --- a/docs/Model/CalendarEntry.md +++ b/docs/Model/CalendarEntry.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | | [optional] -**start** | **\DateTime** | | [optional] **end** | **\DateTime** | | [optional] +**start** | **\DateTime** | | [optional] +**title** | **string** | | [optional] **type** | [**\SynergiTech\Staffology\Model\CalendarEntryType**](CalendarEntryType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CarCharge.md b/docs/Model/CarCharge.md index f946426..a344be0 100644 --- a/docs/Model/CarCharge.md +++ b/docs/Model/CarCharge.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**co2Table** | [**\SynergiTech\Staffology\Model\CarChargeRate[]**](CarChargeRate.md) | | [optional] **dieselSurcharge** | **float** | | [optional] +**engineSizeTable** | [**\SynergiTech\Staffology\Model\CarChargeRate[]**](CarChargeRate.md) | | [optional] +**fuelCharge** | **float** | | [optional] **maxCharge** | **float** | | [optional] **minCharge** | **float** | | [optional] -**fuelCharge** | **float** | | [optional] -**newCarRateReductionDate** | **\DateTime** | | [optional] **newCarRateReductionAmount** | **float** | | [optional] -**co2Table** | [**\SynergiTech\Staffology\Model\CarChargeRate[]**](CarChargeRate.md) | | [optional] -**engineSizeTable** | [**\SynergiTech\Staffology\Model\CarChargeRate[]**](CarChargeRate.md) | | [optional] +**newCarRateReductionDate** | **\DateTime** | | [optional] **zeroEmissionsTable** | [**\SynergiTech\Staffology\Model\CarChargeRate[]**](CarChargeRate.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ChangeSummary.md b/docs/Model/ChangeSummary.md index 8c5b5ee..a6b29ee 100644 --- a/docs/Model/ChangeSummary.md +++ b/docs/Model/ChangeSummary.md @@ -4,25 +4,25 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | | [optional] -**auditId** | **string** | | [optional] -**previousAuditId** | **string** | This Id is used to delete the previous audit entry once the change summary entry is created for the modifications between the current and the previous audit entry. | [optional] -**date** | **\DateTime** | | [optional] -**name** | **string** | | [optional] [readonly] **actionPerformed** | [**\SynergiTech\Staffology\Model\AuditEventAction**](AuditEventAction.md) | | [optional] -**entityType** | [**\SynergiTech\Staffology\Model\EntityType**](EntityType.md) | | [optional] -**entityId** | **string** | Id of the underlying entity | [optional] -**employeeUniqueId** | **string** | Unique id of the employee this operation belongs to | [optional] -**employerUniqueId** | **string** | Unique id of the employer this operation belongs to | [optional] **actionPerformedBy** | **string** | | [optional] **actionPerformedOn** | **string** | | [optional] +**auditId** | **string** | | [optional] +**changeType** | **string** | | [optional] +**date** | **\DateTime** | | [optional] +**displayName** | **string** | | [optional] **employeeFirstName** | **string** | | [optional] **employeeLastName** | **string** | | [optional] -**uniqueId** | **string** | Unique id of the owner this request belongs to | [optional] +**employeeUniqueId** | **string** | Unique id of the employee this operation belongs to | [optional] +**employerUniqueId** | **string** | Unique id of the employer this operation belongs to | [optional] +**entityId** | **string** | Id of the underlying entity | [optional] +**entityType** | [**\SynergiTech\Staffology\Model\EntityType**](EntityType.md) | | [optional] +**id** | **string** | | [optional] +**modifications** | [**\SynergiTech\Staffology\Model\FieldModification[]**](FieldModification.md) | | [optional] +**name** | **string** | | [optional] [readonly] **parentEventType** | **string** | | [optional] -**displayName** | **string** | | [optional] **payRunPeriod** | **int** | | [optional] -**changeType** | **string** | | [optional] -**modifications** | [**\SynergiTech\Staffology\Model\FieldModification[]**](FieldModification.md) | | [optional] +**previousAuditId** | **string** | This Id is used to delete the previous audit entry once the change summary entry is created for the modifications between the current and the previous audit entry. | [optional] +**uniqueId** | **string** | Unique id of the owner this request belongs to | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ChangeSummaryListReportResponse.md b/docs/Model/ChangeSummaryListReportResponse.md index 00ba471..4259057 100644 --- a/docs/Model/ChangeSummaryListReportResponse.md +++ b/docs/Model/ChangeSummaryListReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\ChangeSummary[]**](ChangeSummary.md) | [readonly] If the type is application.json then this will contain a JSON representation of the relevant model | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Cis300.md b/docs/Model/Cis300.md index 0c10df5..1c60b74 100644 --- a/docs/Model/Cis300.md +++ b/docs/Model/Cis300.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taxMonth** | **int** | | [optional] -**employeeCount** | **int** | | [optional] -**employmentStatusDeclaration** | **bool** | | [optional] -**verificationDeclaration** | **bool** | | [optional] -**informationCorrectDeclaration** | **bool** | | [optional] -**inactivityDeclaration** | **bool** | | [optional] **cisReturn** | [**\SynergiTech\Staffology\Model\CisReturn**](CisReturn.md) | | [optional] -**iRmark** | **string** | | [optional] -**xml** | **string** | This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**employeeCount** | **int** | | [optional] **employerReferences** | [**\SynergiTech\Staffology\Model\EmpRefs**](EmpRefs.md) | | [optional] +**employmentStatusDeclaration** | **bool** | | [optional] **govTalkSubmission** | [**\SynergiTech\Staffology\Model\GovTalkSubmission**](GovTalkSubmission.md) | | [optional] +**iRmark** | **string** | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**inactivityDeclaration** | **bool** | | [optional] +**informationCorrectDeclaration** | **bool** | | [optional] +**taxMonth** | **int** | | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**verificationDeclaration** | **bool** | | [optional] +**xml** | **string** | This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Cis300Declarations.md b/docs/Model/Cis300Declarations.md index 4c35b13..58f4bac 100644 --- a/docs/Model/Cis300Declarations.md +++ b/docs/Model/Cis300Declarations.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employmentStatus** | **string** | | [optional] -**verification** | **string** | | [optional] -**informationCorrect** | **string** | | [optional] **inactivity** | **string** | | [optional] +**informationCorrect** | **string** | | [optional] +**verification** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Cis300ReportResponse.md b/docs/Model/Cis300ReportResponse.md index 6c3515b..eb0e71e 100644 --- a/docs/Model/Cis300ReportResponse.md +++ b/docs/Model/Cis300ReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\Cis300**](Cis300.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CisContractor.md b/docs/Model/CisContractor.md index fdc9256..4ddd04c 100644 --- a/docs/Model/CisContractor.md +++ b/docs/Model/CisContractor.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**utr** | **string** | | [optional] **aOref** | **string** | | [optional] +**utr** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CisDetails.md b/docs/Model/CisDetails.md index 74dc87a..cf67cb4 100644 --- a/docs/Model/CisDetails.md +++ b/docs/Model/CisDetails.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**companyNumber** | **string** | | [optional] +**companyUtr** | **string** | | [optional] +**reverseChargeVAT** | **bool** | | [optional] +**tradingName** | **string** | | [optional] **type** | [**\SynergiTech\Staffology\Model\CISSubContractorType**](CISSubContractorType.md) | | [optional] **utr** | **string** | | [optional] -**tradingName** | **string** | | [optional] -**companyUtr** | **string** | | [optional] -**companyNumber** | **string** | | [optional] -**vatRegistered** | **bool** | | [optional] **vatNumber** | **string** | | [optional] **vatRate** | **float** | | [optional] -**reverseChargeVAT** | **bool** | | [optional] +**vatRegistered** | **bool** | | [optional] **verification** | [**\SynergiTech\Staffology\Model\CisVerificationDetails**](CisVerificationDetails.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CisRequest.md b/docs/Model/CisRequest.md index caf937e..77e55bb 100644 --- a/docs/Model/CisRequest.md +++ b/docs/Model/CisRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **contractor** | [**\SynergiTech\Staffology\Model\CisContractor**](CisContractor.md) | | [optional] -**subcontractor** | [**\SynergiTech\Staffology\Model\CisSubContractor[]**](CisSubContractor.md) | | [optional] **declaration** | **string** | | [optional] +**subcontractor** | [**\SynergiTech\Staffology\Model\CisSubContractor[]**](CisSubContractor.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CisReturn.md b/docs/Model/CisReturn.md index a2dc27e..89579f7 100644 --- a/docs/Model/CisReturn.md +++ b/docs/Model/CisReturn.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **contractor** | [**\SynergiTech\Staffology\Model\CisContractor**](CisContractor.md) | | [optional] -**subcontractor** | [**\SynergiTech\Staffology\Model\CisSubContractor[]**](CisSubContractor.md) | | [optional] -**nilReturn** | **string** | | [optional] **declarations** | [**\SynergiTech\Staffology\Model\Cis300Declarations**](Cis300Declarations.md) | | [optional] +**nilReturn** | **string** | | [optional] +**subcontractor** | [**\SynergiTech\Staffology\Model\CisSubContractor[]**](CisSubContractor.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CisStatement.md b/docs/Model/CisStatement.md index cc69e4c..423a6b6 100644 --- a/docs/Model/CisStatement.md +++ b/docs/Model/CisStatement.md @@ -4,19 +4,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**taxMonth** | **int** | [readonly] | [optional] -**contractorName** | **string** | [readonly] | [optional] +**amountDeducted** | **float** | [readonly] | [optional] +**amountLiableToDeduction** | **float** | [readonly] | [optional] +**amountPayable** | **float** | [readonly] | [optional] **contractorAddress** | [**\SynergiTech\Staffology\Model\Address**](Address.md) | | [optional] +**contractorName** | **string** | [readonly] | [optional] **contractorOfficeNumber** | **string** | [readonly] | [optional] **contractorPayeReference** | **string** | [readonly] | [optional] -**subcontractorName** | [**\SynergiTech\Staffology\Model\RtiEmployeeName**](RtiEmployeeName.md) | | [optional] +**costOfMaterials** | **float** | [readonly] | [optional] +**grossAmountPaid** | **float** | [readonly] Gross Amount Paid (Excl VAT) | [optional] **subContractorUtr** | **string** | [readonly] | [optional] +**subcontractorName** | [**\SynergiTech\Staffology\Model\RtiEmployeeName**](RtiEmployeeName.md) | | [optional] +**taxMonth** | **int** | [readonly] | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **verificationNumber** | **string** | [readonly] | [optional] -**grossAmountPaid** | **float** | [readonly] Gross Amount Paid (Excl VAT) | [optional] -**costOfMaterials** | **float** | [readonly] | [optional] -**amountLiableToDeduction** | **float** | [readonly] | [optional] -**amountDeducted** | **float** | [readonly] | [optional] -**amountPayable** | **float** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CisStatementListReportResponse.md b/docs/Model/CisStatementListReportResponse.md index 7a80eb0..cbcbe2d 100644 --- a/docs/Model/CisStatementListReportResponse.md +++ b/docs/Model/CisStatementListReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\CisStatement[]**](CisStatement.md) | [readonly] If the type is application.json then this will contain a JSON representation of the relevant model | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CisSubContractor.md b/docs/Model/CisSubContractor.md index b9e2402..e97a894 100644 --- a/docs/Model/CisSubContractor.md +++ b/docs/Model/CisSubContractor.md @@ -4,34 +4,34 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employeeUniqueId** | **string** | | [optional] +**action** | **string** | | [optional] +**address** | [**\SynergiTech\Staffology\Model\RtiEmployeeAddress**](RtiEmployeeAddress.md) | | [optional] +**costOfMaterials** | **string** | | [optional] +**costOfMaterialsUnrounded** | **string** | | [optional] +**crn** | **string** | | [optional] +**displayName** | **string** | | [optional] **emailStatementTo** | **string** | | [optional] -**numberOfPayments** | **int** | | [optional] +**employeeUniqueId** | **string** | | [optional] **item** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**displayName** | **string** | | [optional] -**action** | **string** | | [optional] -**type** | **string** | | [optional] +**matched** | **string** | | [optional] **name** | [**\SynergiTech\Staffology\Model\RtiEmployeeName**](RtiEmployeeName.md) | | [optional] -**tradingName** | **string** | | [optional] -**worksRef** | **string** | | [optional] -**unmatchedRate** | **string** | | [optional] -**utr** | **string** | | [optional] -**crn** | **string** | | [optional] +**netPayment** | **string** | | [optional] **nino** | **string** | | [optional] +**numberOfPayments** | **int** | | [optional] **partnership** | [**\SynergiTech\Staffology\Model\CisPartnership**](CisPartnership.md) | | [optional] -**address** | [**\SynergiTech\Staffology\Model\RtiEmployeeAddress**](RtiEmployeeAddress.md) | | [optional] +**taxTreatment** | **string** | | [optional] **telephone** | **string** | | [optional] +**totalDeducted** | **string** | | [optional] +**totalPayments** | **string** | | [optional] **totalPaymentsUnrounded** | **string** | | [optional] -**costOfMaterialsUnrounded** | **string** | | [optional] +**tradingName** | **string** | | [optional] +**type** | **string** | | [optional] **umbrellaFee** | **string** | | [optional] +**unmatchedRate** | **string** | | [optional] +**utr** | **string** | | [optional] **validationMsg** | **string** | | [optional] -**verificationNumber** | **string** | | [optional] -**totalPayments** | **string** | | [optional] -**costOfMaterials** | **string** | | [optional] -**totalDeducted** | **string** | | [optional] -**matched** | **string** | | [optional] -**taxTreatment** | **string** | | [optional] -**netPayment** | **string** | | [optional] **vatAmount** | **string** | | [optional] +**verificationNumber** | **string** | | [optional] +**worksRef** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CisSubContractorSummary.md b/docs/Model/CisSubContractorSummary.md index 42c9d4d..ef0b92b 100644 --- a/docs/Model/CisSubContractorSummary.md +++ b/docs/Model/CisSubContractorSummary.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollCode** | **string** | | [optional] -**tradingName** | **string** | | [optional] +**displayName** | **string** | | [optional] [readonly] **firstName** | **string** | | [optional] **lastName** | **string** | | [optional] **niNumber** | **string** | | [optional] +**payrollCode** | **string** | | [optional] +**taxStatus** | [**\SynergiTech\Staffology\Model\CISTaxStatus**](CISTaxStatus.md) | | [optional] +**tradingName** | **string** | | [optional] **type** | [**\SynergiTech\Staffology\Model\CISSubContractorType**](CISSubContractorType.md) | | [optional] **utr** | **string** | | [optional] -**taxStatus** | [**\SynergiTech\Staffology\Model\CISTaxStatus**](CISTaxStatus.md) | | [optional] -**verificationNumber** | **string** | | [optional] -**displayName** | **string** | | [optional] [readonly] **validationMessage** | **string[]** | | [optional] +**verificationNumber** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CisSubContractorSummaryListReportResponse.md b/docs/Model/CisSubContractorSummaryListReportResponse.md index c7f3feb..86b757a 100644 --- a/docs/Model/CisSubContractorSummaryListReportResponse.md +++ b/docs/Model/CisSubContractorSummaryListReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\CisSubContractorSummary[]**](CisSubContractorSummary.md) | [readonly] If the type is application.json then this will contain a JSON representation of the relevant model | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CisVerification.md b/docs/Model/CisVerification.md index c959e31..306286e 100644 --- a/docs/Model/CisVerification.md +++ b/docs/Model/CisVerification.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employees** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | | [optional] -**employeeCount** | **int** | | [optional] **cisRequest** | [**\SynergiTech\Staffology\Model\CisRequest**](CisRequest.md) | | [optional] -**responses** | [**\SynergiTech\Staffology\Model\CisSubContractor[]**](CisSubContractor.md) | | [optional] -**iRmark** | **string** | | [optional] -**xml** | **string** | This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**employeeCount** | **int** | | [optional] +**employees** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | | [optional] **employerReferences** | [**\SynergiTech\Staffology\Model\EmpRefs**](EmpRefs.md) | | [optional] **govTalkSubmission** | [**\SynergiTech\Staffology\Model\GovTalkSubmission**](GovTalkSubmission.md) | | [optional] +**iRmark** | **string** | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**responses** | [**\SynergiTech\Staffology\Model\CisSubContractor[]**](CisSubContractor.md) | | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**xml** | **string** | This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CisVerificationDetails.md b/docs/Model/CisVerificationDetails.md index 754e489..c0ab662 100644 --- a/docs/Model/CisVerificationDetails.md +++ b/docs/Model/CisVerificationDetails.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**date** | **\DateTime** | | [optional] **manuallyEntered** | **bool** | | [optional] **matchInsteadOfVerify** | **bool** | | [optional] **number** | **string** | | [optional] -**date** | **\DateTime** | | [optional] **taxStatus** | [**\SynergiTech\Staffology\Model\CISTaxStatus**](CISTaxStatus.md) | | [optional] **verificationRequest** | **string** | [readonly] If a Verification request has been made for this employee then this will show its ID | [optional] **verificationResponse** | [**\SynergiTech\Staffology\Model\CisSubContractor**](CisSubContractor.md) | | [optional] diff --git a/docs/Model/ContractAddress.md b/docs/Model/ContractAddress.md index 87c8e1d..a7bde57 100644 --- a/docs/Model/ContractAddress.md +++ b/docs/Model/ContractAddress.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**country** | [**\SynergiTech\Staffology\Model\Country**](Country.md) | | [optional] +**foreignCountry** | **string** | | [optional] **line1** | **string** | | [optional] **line2** | **string** | | [optional] **line3** | **string** | | [optional] **line4** | **string** | | [optional] **line5** | **string** | | [optional] **postCode** | **string** | | [optional] -**country** | [**\SynergiTech\Staffology\Model\Country**](Country.md) | | [optional] -**foreignCountry** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAeAssessmentAction.md b/docs/Model/ContractAeAssessmentAction.md index ce3cd90..f942465 100644 --- a/docs/Model/ContractAeAssessmentAction.md +++ b/docs/Model/ContractAeAssessmentAction.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action** | [**\SynergiTech\Staffology\Model\AeAction**](AeAction.md) | | [optional] -**employeeState** | [**\SynergiTech\Staffology\Model\AeEmployeeState**](AeEmployeeState.md) | | [optional] **actionCompleted** | **bool** | Indicates whether or not the required action was successfully completed | [optional] **actionCompletedMessage** | **string** | Gives further information about the action taken or the reason if wasn't successfully completed | [optional] -**requiredLetter** | [**\SynergiTech\Staffology\Model\AeStatutoryLetter**](AeStatutoryLetter.md) | | [optional] +**employeeState** | [**\SynergiTech\Staffology\Model\AeEmployeeState**](AeEmployeeState.md) | | [optional] +**letterNotYetSent** | **bool** | Indicates whether or not any required letter has been sent | [optional] **pensionSchemeId** | **string** | The PensionSchemeId that a completed action relates to | [optional] +**requiredLetter** | [**\SynergiTech\Staffology\Model\AeStatutoryLetter**](AeStatutoryLetter.md) | | [optional] **workerGroupId** | **string** | The WorkerGroupId that a completed action relates to | [optional] -**letterNotYetSent** | **bool** | Indicates whether or not any required letter has been sent | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAeAssessmentResponse.md b/docs/Model/ContractAeAssessmentResponse.md index fb04355..0b0f52f 100644 --- a/docs/Model/ContractAeAssessmentResponse.md +++ b/docs/Model/ContractAeAssessmentResponse.md @@ -4,19 +4,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | The unique id of the object | [optional] -**employeeState** | [**\SynergiTech\Staffology\Model\AeEmployeeState**](AeEmployeeState.md) | | [optional] +**action** | [**\SynergiTech\Staffology\Model\ContractAeAssessmentAction**](ContractAeAssessmentAction.md) | | [optional] +**aeExclusionCode** | [**\SynergiTech\Staffology\Model\AeExclusionCode**](AeExclusionCode.md) | | [optional] **age** | **int** | The age of the Employee at the time of the assessment | [optional] -**ukWorker** | [**\SynergiTech\Staffology\Model\AeUKWorker**](AeUKWorker.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**ordinal** | **int** | The PaySchedule ordinal for the Employee at the time of the assessment | [optional] +**assessmentDate** | **\DateTime** | | [optional] **earningsInPeriod** | **float** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\ContractEmployeeItem**](ContractEmployeeItem.md) | | [optional] +**employeeState** | [**\SynergiTech\Staffology\Model\AeEmployeeState**](AeEmployeeState.md) | | [optional] +**id** | **string** | The unique id of the object | [optional] +**ordinal** | **int** | The PaySchedule ordinal for the Employee at the time of the assessment | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **qualifyingEarningsInPeriod** | **float** | | [optional] -**aeExclusionCode** | [**\SynergiTech\Staffology\Model\AeExclusionCode**](AeExclusionCode.md) | | [optional] -**status** | [**\SynergiTech\Staffology\Model\AeStatus**](AeStatus.md) | | [optional] **reason** | **string** | The reason for determining the Status given. | [optional] -**action** | [**\SynergiTech\Staffology\Model\ContractAeAssessmentAction**](ContractAeAssessmentAction.md) | | [optional] -**employee** | [**\SynergiTech\Staffology\Model\ContractEmployeeItem**](ContractEmployeeItem.md) | | [optional] -**assessmentDate** | **\DateTime** | | [optional] +**status** | [**\SynergiTech\Staffology\Model\AeStatus**](AeStatus.md) | | [optional] +**ukWorker** | [**\SynergiTech\Staffology\Model\AeUKWorker**](AeUKWorker.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAeEmployeeAssessmentHistoryRequest.md b/docs/Model/ContractAeEmployeeAssessmentHistoryRequest.md new file mode 100644 index 0000000..22ab431 --- /dev/null +++ b/docs/Model/ContractAeEmployeeAssessmentHistoryRequest.md @@ -0,0 +1,32 @@ +# # ContractAeEmployeeAssessmentHistoryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | [**\SynergiTech\Staffology\Model\AeAction**](AeAction.md) | | [optional] +**actionDate** | **\DateTime** | The date when the action was applied, if applicable. | [optional] +**age** | **int** | The employee's age at the time of assessment. | [optional] +**assessmentDate** | **\DateTime** | The actual date the assessment was performed. | [optional] +**isJointAssessment** | **bool** | Is this a joint assessment with another role | [optional] +**isLatestVersion** | **bool** | Is the latest version of this assessment | [optional] +**isNewPension** | **bool** | Is this assessment resulting in a new pension | [optional] +**letter** | [**\SynergiTech\Staffology\Model\AeLetter**](AeLetter.md) | | [optional] +**letterExternalDataProviderId** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] +**letterSentDate** | **\DateTime** | The date the letter was sent to employee, if applicable. | [optional] +**letterSentType** | [**\SynergiTech\Staffology\Model\AeLetterSentType**](AeLetterSentType.md) | | [optional] +**lowerEarningsThreshold** | **float** | The Lower Earnings Threshold applicable for the assessment period. | [optional] +**payRunId** | **string** | The unique identifier of the Pay Run associated with this assessment. | [optional] +**pensionId** | **string** | The unique identifier of the pension associated with this assessment, if applicable. | [optional] +**pensionSchemeId** | **string** | The unique identifier of the pension scheme associated with this assessment, if applicable. | [optional] +**periodEndDate** | **\DateTime** | The end date of the pay reference period for which this assessment applies. | [optional] +**periodStartDate** | **\DateTime** | The start date of the pay reference period for which this assessment applies. | [optional] +**qualifyingThreshold** | **float** | The Qualifying Earnings Threshold (or Auto-Enrolment Trigger) applicable for the assessment period. | [optional] +**reason** | [**\SynergiTech\Staffology\Model\AeReason**](AeReason.md) | | [optional] +**reenrolmentDate** | **\DateTime** | Re-enrolment date if assessment occurs during re-enrolment period | [optional] +**roleId** | **string** | The unique identifier of the Role associated with this assessment. | [optional] +**status** | [**\SynergiTech\Staffology\Model\AeStatus**](AeStatus.md) | | [optional] +**version** | **int** | The version of this assessment in the current pay run | [optional] +**workerGroupId** | **string** | The unique identifier of the worker group with this assessment, if applicable. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAeEmployeeAssessmentHistoryResponse.md b/docs/Model/ContractAeEmployeeAssessmentHistoryResponse.md new file mode 100644 index 0000000..1bf9b00 --- /dev/null +++ b/docs/Model/ContractAeEmployeeAssessmentHistoryResponse.md @@ -0,0 +1,30 @@ +# # ContractAeEmployeeAssessmentHistoryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | [**\SynergiTech\Staffology\Model\AeAction**](AeAction.md) | | [optional] +**actionDate** | **\DateTime** | The date when the action was created | [optional] +**age** | **int** | Employee's age at the time of assessment | [optional] +**assessmentDate** | **\DateTime** | Assessment date | [optional] +**employeeId** | **string** | The employee ID associated with this assessment | [optional] +**employeeRoleId** | **string** | Employee role ID associated with this assessment, if applicable | [optional] +**endDate** | **\DateTime** | End date of assessment period | [optional] +**isNewPension** | **bool** | Is this assessment resulting in a new pension | [optional] +**letter** | [**\SynergiTech\Staffology\Model\AeLetter**](AeLetter.md) | | [optional] +**letterExternalDataProviderId** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] +**letterSentDate** | **\DateTime** | The Date the letter was sent, if applicable | [optional] +**letterSentType** | [**\SynergiTech\Staffology\Model\AeLetterSentType**](AeLetterSentType.md) | | [optional] +**lowerEarningsThreshold** | **float** | Lower earnings threshold for the assessment period | [optional] +**payRunId** | **string** | The pay run ID that triggered this assessment (optional) | [optional] +**pensionId** | **string** | The unique identifier of the pension associated with this assessment, if applicable. | [optional] +**pensionSchemeId** | **string** | The unique identifier of the pension scheme associated with this assessment, if applicable. | [optional] +**qualifyingThreshold** | **float** | Qualifying threshold for the assessment period | [optional] +**reEnrolmentDate** | **\DateTime** | Re-enrolment date if assessment occurs during re-enrolment period | [optional] +**reason** | [**\SynergiTech\Staffology\Model\AeReason**](AeReason.md) | | [optional] +**startDate** | **\DateTime** | Start date of assessment period | [optional] +**status** | [**\SynergiTech\Staffology\Model\AeStatus**](AeStatus.md) | | [optional] +**workerGroupId** | **string** | The worker group ID associated with this assessment, if applicable. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAeEmployeeLetterResponse.md b/docs/Model/ContractAeEmployeeLetterResponse.md new file mode 100644 index 0000000..3d106ee --- /dev/null +++ b/docs/Model/ContractAeEmployeeLetterResponse.md @@ -0,0 +1,21 @@ +# # ContractAeEmployeeLetterResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assessmentId** | **string** | The assessment Id the letter is related to | [optional] +**emailAddress** | **string** | The employee email address | [optional] +**employeeId** | **string** | The employee ID | [optional] +**employeeName** | **string** | The employee name | [optional] +**employeeUniqueId** | **int** | The employee uniqueId | [optional] +**externalDataProviderId** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] +**isJointAssessment** | **bool** | If the assessment was a joint assessment | [optional] +**letterSentType** | [**\SynergiTech\Staffology\Model\AeLetterSentType**](AeLetterSentType.md) | | [optional] +**letterType** | [**\SynergiTech\Staffology\Model\AeLetter**](AeLetter.md) | | [optional] +**payrollCode** | **string** | The employee payroll code | [optional] +**period** | **int** | The tax period in which the letter was generated | [optional] +**roles** | **string** | The roles associated with the letter | [optional] +**sentDate** | **\DateTime** | The roles which generated the letter | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAllowanceGradesRequest.md b/docs/Model/ContractAllowanceGradesRequest.md index ff87d38..1d33977 100644 --- a/docs/Model/ContractAllowanceGradesRequest.md +++ b/docs/Model/ContractAllowanceGradesRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**allowanceGradePayslipText** | **string** | Alternative text for display on the payslip (i.e. TLR1A) | [optional] **allowanceGradeAnnualValue** | **float** | FTE value of allowance grade | [optional] **allowanceGradeEffectiveDate** | **\DateTime** | Effective date of the value | [optional] +**allowanceGradePayslipText** | **string** | Alternative text for display on the payslip (i.e. TLR1A) | [optional] **allowanceName** | **string** | Spine Allowance Name | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAllowanceGradesResponse.md b/docs/Model/ContractAllowanceGradesResponse.md index 665408b..a550dcc 100644 --- a/docs/Model/ContractAllowanceGradesResponse.md +++ b/docs/Model/ContractAllowanceGradesResponse.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**allowanceGradePayslipText** | **string** | Alternative text for display on the payslip (i.e. TLR1A) | [optional] **allowanceGradeAnnualValue** | **float** | FTE value of allowance grade | [optional] **allowanceGradeEffectiveDate** | **\DateTime** | Effective date of the value | [optional] -**uniqueId** | **string** | Spine Allowance identifier | [optional] +**allowanceGradePayslipText** | **string** | Alternative text for display on the payslip (i.e. TLR1A) | [optional] **allowanceName** | **string** | Spine Allowance Name | [optional] +**uniqueId** | **string** | Spine Allowance identifier | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAllowanceGradesUpdateRequest.md b/docs/Model/ContractAllowanceGradesUpdateRequest.md index 260f738..51b716b 100644 --- a/docs/Model/ContractAllowanceGradesUpdateRequest.md +++ b/docs/Model/ContractAllowanceGradesUpdateRequest.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uniqueId** | **string** | Allowance Grades identifier | [optional] -**allowanceGradePayslipText** | **string** | Alternative text for display on the payslip (i.e. TLR1A) | [optional] **allowanceGradeAnnualValue** | **float** | FTE value of allowance grade | [optional] **allowanceGradeEffectiveDate** | **\DateTime** | Effective date of the value | [optional] +**allowanceGradePayslipText** | **string** | Alternative text for display on the payslip (i.e. TLR1A) | [optional] **allowanceName** | **string** | Spine Allowance Name | [optional] +**uniqueId** | **string** | Allowance Grades identifier | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAnalysisCategoryCodeRequest.md b/docs/Model/ContractAnalysisCategoryCodeRequest.md index af3e3dc..4780930 100644 --- a/docs/Model/ContractAnalysisCategoryCodeRequest.md +++ b/docs/Model/ContractAnalysisCategoryCodeRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**accountingCode** | **string** | | [optional] **code** | **string** | | [optional] -**title** | **string** | | [optional] **color** | **string** | | [optional] -**accountingCode** | **string** | | [optional] +**title** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAnalysisCategoryCodeResponse.md b/docs/Model/ContractAnalysisCategoryCodeResponse.md index 7c96b74..3a97495 100644 --- a/docs/Model/ContractAnalysisCategoryCodeResponse.md +++ b/docs/Model/ContractAnalysisCategoryCodeResponse.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | Analysis Category Code identifier | [optional] +**accountingCode** | **string** | | [optional] **code** | **string** | | [optional] -**title** | **string** | | [optional] **color** | **string** | | [optional] -**accountingCode** | **string** | | [optional] +**id** | **string** | Analysis Category Code identifier | [optional] +**title** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAutoEnrolmentRequest.md b/docs/Model/ContractAutoEnrolmentRequest.md index 5888d6c..f00f1d1 100644 --- a/docs/Model/ContractAutoEnrolmentRequest.md +++ b/docs/Model/ContractAutoEnrolmentRequest.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**lastAssessment** | [**\SynergiTech\Staffology\Model\ContractAeAssessmentRequest**](ContractAeAssessmentRequest.md) | | [optional] -**ukWorker** | [**\SynergiTech\Staffology\Model\AeUKWorker**](AeUKWorker.md) | | [optional] +**aeExclusionCode** | [**\SynergiTech\Staffology\Model\AeExclusionCode**](AeExclusionCode.md) | | [optional] +**aePostponementLetterSent** | **bool** | | [optional] **daysToDeferAssessment** | **int** | The number of days, if any, to defer assessment of this employee. You're allowed to defer assessment of new employees by up to 3 months. | [optional] **deferByMonthsNotDays** | **bool** | If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days | [optional] **exempt** | **bool** | | [optional] -**aeExclusionCode** | [**\SynergiTech\Staffology\Model\AeExclusionCode**](AeExclusionCode.md) | | [optional] -**aePostponementLetterSent** | **bool** | | [optional] +**lastAssessment** | [**\SynergiTech\Staffology\Model\ContractAeAssessmentRequest**](ContractAeAssessmentRequest.md) | | [optional] +**ukWorker** | [**\SynergiTech\Staffology\Model\AeUKWorker**](AeUKWorker.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAutoEnrolmentResponse.md b/docs/Model/ContractAutoEnrolmentResponse.md index 70f62ae..6728b22 100644 --- a/docs/Model/ContractAutoEnrolmentResponse.md +++ b/docs/Model/ContractAutoEnrolmentResponse.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**state** | [**\SynergiTech\Staffology\Model\AeEmployeeState**](AeEmployeeState.md) | | [optional] -**stateDate** | **\DateTime** | | [optional] -**postponementDate** | **\DateTime** | [readonly] If a value is present, then employee wont be enrolled on an AE Pension until after this date. This is automatically set to a date if the employee is deemed to be an EligibleJobHolder, but the employer has set a Postponement period and this value is currently null This is automatically set to null if it already has a value and the employee is deemed NOT to be an EligibleJobHolder - ie, they previously qualified but now do not. | [optional] -**lastAssessment** | [**\SynergiTech\Staffology\Model\ContractAeAssessmentResponse**](ContractAeAssessmentResponse.md) | | [optional] -**ukWorker** | [**\SynergiTech\Staffology\Model\AeUKWorker**](AeUKWorker.md) | | [optional] +**aeExclusionCode** | [**\SynergiTech\Staffology\Model\AeExclusionCode**](AeExclusionCode.md) | | [optional] +**aePostponementLetterSent** | **bool** | | [optional] **daysToDeferAssessment** | **int** | The number of days, if any, to defer assessment of this employee. You're allowed to defer assessment of new employees by up to 3 months. | [optional] **deferByMonthsNotDays** | **bool** | If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days | [optional] **exempt** | **bool** | | [optional] -**aeExclusionCode** | [**\SynergiTech\Staffology\Model\AeExclusionCode**](AeExclusionCode.md) | | [optional] -**aePostponementLetterSent** | **bool** | | [optional] +**lastAssessment** | [**\SynergiTech\Staffology\Model\ContractAeAssessmentResponse**](ContractAeAssessmentResponse.md) | | [optional] +**postponementDate** | **\DateTime** | [readonly] If a value is present, then employee wont be enrolled on an AE Pension until after this date. This is automatically set to a date if the employee is deemed to be an EligibleJobHolder, but the employer has set a Postponement period and this value is currently null This is automatically set to null if it already has a value and the employee is deemed NOT to be an EligibleJobHolder - ie, they previously qualified but now do not. | [optional] +**state** | [**\SynergiTech\Staffology\Model\AeEmployeeState**](AeEmployeeState.md) | | [optional] +**stateDate** | **\DateTime** | | [optional] +**ukWorker** | [**\SynergiTech\Staffology\Model\AeUKWorker**](AeUKWorker.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAutoEnrolmentSettingsRequest.md b/docs/Model/ContractAutoEnrolmentSettingsRequest.md index f233c83..4d44b3c 100644 --- a/docs/Model/ContractAutoEnrolmentSettingsRequest.md +++ b/docs/Model/ContractAutoEnrolmentSettingsRequest.md @@ -4,16 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | [readonly] The unique id of the object | [optional] -**stagingDate** | **\DateTime** | | [optional] **cyclicalReenrolmentDate** | **\DateTime** | | [optional] -**previousCyclicalReenrolmentDate** | **\DateTime** | | [optional] -**defaultPension** | [**\SynergiTech\Staffology\Model\ContractPensionSelectionRequest**](ContractPensionSelectionRequest.md) | | [optional] -**pensionSameAsDefault** | **bool** | | [optional] **daysToDeferAssessment** | **int** | The number of days, if any, to defer assessment of new employees. You're allowed to defer assessment of new employees by up to 3 months. This is the default value used when you create a new employee. It can be changed on a per-employee basis. | [optional] +**defaultPension** | [**\SynergiTech\Staffology\Model\ContractPensionSelectionRequest**](ContractPensionSelectionRequest.md) | | [optional] **deferByMonthsNotDays** | **bool** | If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days | [optional] **deferEnrolmentBy** | **int** | The number of days )or weeks, or months), if any, to defer enrolment of employees that are Eligible Jobholders. For example, if this is set to 30 days then if an employee meets the criteria for enrolment then they'll only be enrolled if they still meet the criteria 30 days later | [optional] **deferEnrolmentByPeriodType** | [**\SynergiTech\Staffology\Model\DeferalPeriodType**](DeferalPeriodType.md) | | [optional] +**exemptFromAeRegulations** | **bool** | Indicates if an employer is exempt from normal AE regulations | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] **includeNonPensionedEmployeesInSubmission** | **bool** | Whether or not to include details of non-pensioned employees in your submissions to this provider | [optional] +**pensionSameAsDefault** | **bool** | | [optional] +**previousCyclicalReenrolmentDate** | **\DateTime** | | [optional] +**stagingDate** | **\DateTime** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractAutoEnrolmentSettingsResponse.md b/docs/Model/ContractAutoEnrolmentSettingsResponse.md index 06ca51f..83be9fa 100644 --- a/docs/Model/ContractAutoEnrolmentSettingsResponse.md +++ b/docs/Model/ContractAutoEnrolmentSettingsResponse.md @@ -4,16 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | | [optional] -**stagingDate** | **\DateTime** | | [optional] **cyclicalReenrolmentDate** | **\DateTime** | | [optional] -**previousCyclicalReenrolmentDate** | **\DateTime** | | [optional] -**defaultPension** | [**\SynergiTech\Staffology\Model\ContractPensionSelectionResponse**](ContractPensionSelectionResponse.md) | | [optional] -**pensionSameAsDefault** | **bool** | | [optional] **daysToDeferAssessment** | **int** | The number of days, if any, to defer assessment of new employees. You're allowed to defer assessment of new employees by up to 3 months. This is the default value used when you create a new employee. It can be changed on a per-employee basis. | [optional] +**defaultPension** | [**\SynergiTech\Staffology\Model\ContractPensionSelectionResponse**](ContractPensionSelectionResponse.md) | | [optional] **deferByMonthsNotDays** | **bool** | If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days | [optional] **deferEnrolmentBy** | **int** | The number of days )or weeks, or months), if any, to defer enrolment of employees that are Eligible Jobholders. For example, if this is set to 30 days then if an employee meets the criteria for enrolment then they'll only be enrolled if they still meet the criteria 30 days later | [optional] **deferEnrolmentByPeriodType** | [**\SynergiTech\Staffology\Model\DeferalPeriodType**](DeferalPeriodType.md) | | [optional] +**exemptFromAeRegulations** | **bool** | Indicates if an employer is exempt from normal AE regulations | [optional] +**id** | **string** | | [optional] **includeNonPensionedEmployeesInSubmission** | **bool** | Whether or not to include details of non-pensioned employees in your submissions to this provider | [optional] +**pensionSameAsDefault** | **bool** | | [optional] +**previousCyclicalReenrolmentDate** | **\DateTime** | | [optional] +**stagingDate** | **\DateTime** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractBankDetails.md b/docs/Model/ContractBankDetails.md index ea8ddd3..4be2750 100644 --- a/docs/Model/ContractBankDetails.md +++ b/docs/Model/ContractBankDetails.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bankName** | **string** | | [optional] -**bankBranch** | **string** | | [optional] -**bankReference** | **string** | | [optional] **accountName** | **string** | | [optional] **accountNumber** | **string** | | [optional] -**sortCode** | **string** | | [optional] -**note** | **string** | | [optional] +**bankBranch** | **string** | | [optional] +**bankName** | **string** | | [optional] +**bankReference** | **string** | | [optional] **buildingSocietyRollNumber** | **string** | | [optional] +**note** | **string** | | [optional] +**sortCode** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractBenefitCarImportRequest.md b/docs/Model/ContractBenefitCarImportRequest.md new file mode 100644 index 0000000..1a56dde --- /dev/null +++ b/docs/Model/ContractBenefitCarImportRequest.md @@ -0,0 +1,27 @@ +# # ContractBenefitCarImportRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**availableFrom** | **\DateTime** | Date the car benefit became available | [optional] +**availableTo** | **\DateTime** | Date the car benefit ended | [optional] +**co2Emissions** | **int** | CO2 emissions value | [optional] +**daysUnavailable** | **int** | Total number of days the vehicle was unavailable | [optional] +**employeeCapitalContributions** | **float** | Employee's capital contribution | [optional] +**employeePrivateContributions** | **float** | Employee's private contributions | [optional] +**engineSize** | **int** | Engine size value | [optional] +**firstRegistered** | **\DateTime** | Date the vehicle was first registered | [optional] +**freeFuel** | **bool** | Indicates if free fuel is provided | [optional] +**freeFuelReinstated** | **bool** | Whether the free fuel benefit was reinstated | [optional] +**fuelAvailableFrom** | **\DateTime** | Date free fuel benefit started | [optional] +**fuelAvailableTo** | **\DateTime** | Date free fuel benefit ended | [optional] +**fuelType** | [**\SynergiTech\Staffology\Model\BenefitDetailsCarPowerType**](BenefitDetailsCarPowerType.md) | | [optional] +**hasApprovedEmissionsValue** | **bool** | Indicates if CO2 emissions data is approved | [optional] +**listPrice** | **float** | Original list price of the vehicle | [optional] +**makeAndModel** | **string** | Car make and model name | [optional] +**nonStandardAccessories** | **float** | Cost of any non-standard accessories | [optional] +**registration** | **string** | Vehicle registration number | [optional] +**zeroEmissionsMileage** | **int** | Mileage driven in zero-emission mode. Applicable only for Electric, Hybrid, and Petrol/Other fuel types. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractBenefitImportRequest.md b/docs/Model/ContractBenefitImportRequest.md new file mode 100644 index 0000000..a268b83 --- /dev/null +++ b/docs/Model/ContractBenefitImportRequest.md @@ -0,0 +1,31 @@ +# # ContractBenefitImportRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assetType** | [**\SynergiTech\Staffology\Model\BenefitDetailsAssetType**](BenefitDetailsAssetType.md) | | [optional] +**car** | [**\SynergiTech\Staffology\Model\ContractBenefitCarImportRequest**](ContractBenefitCarImportRequest.md) | | [optional] +**cashEquivalentFuel** | **float** | Only relevant to Benefits with Type Vans | [optional] +**class1AType** | [**\SynergiTech\Staffology\Model\BenefitDetailsClass1AType**](BenefitDetailsClass1AType.md) | | [optional] +**declarationType** | [**\SynergiTech\Staffology\Model\BenefitDeclarationType**](BenefitDeclarationType.md) | | [optional] +**description** | **string** | A description of this benefit | [optional] +**employeeContribution** | **float** | Amount contributed by the employee. | [optional] +**endDate** | **\DateTime** | End date for imported benefit | [optional] +**isPeriodValue** | **bool** | To be used for the benefit period | [optional] +**loan** | [**\SynergiTech\Staffology\Model\ContractBenefitLoanImportRequest**](ContractBenefitLoanImportRequest.md) | | [optional] +**nonClass1AType** | [**\SynergiTech\Staffology\Model\BenefitDetailsNonClass1AType**](BenefitDetailsNonClass1AType.md) | | [optional] +**openingBalance** | **float** | The amount of benefit paid YTD when setting up a benefit | [optional] +**overrideOpeningBalance** | **bool** | To be used to change the opening balance if the benefit has been payrolled | [optional] +**paymentType** | [**\SynergiTech\Staffology\Model\BenefitDetailsPaymentType**](BenefitDetailsPaymentType.md) | | [optional] +**payrollCode** | **string** | The payroll code of the employee to update | [optional] +**startDate** | **\DateTime** | Start date for imported benefit | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**tradingOrganisation** | **bool** | Only relevant to Benefits with Type Entertainment | [optional] +**type** | [**\SynergiTech\Staffology\Model\BenefitType**](BenefitType.md) | | [optional] +**uniqueId** | **string** | Optional. If value is provided then update else create benefit. | [optional] +**useOfAssetType** | [**\SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType**](BenefitDetailsUseOfAssetType.md) | | [optional] +**useProRata** | **bool** | Benefit calculation should be done on pro rata rules | [optional] +**value** | **float** | The total value of the benefit. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractBenefitLoanImportRequest.md b/docs/Model/ContractBenefitLoanImportRequest.md new file mode 100644 index 0000000..be52f90 --- /dev/null +++ b/docs/Model/ContractBenefitLoanImportRequest.md @@ -0,0 +1,15 @@ +# # ContractBenefitLoanImportRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**closingBalance** | **float** | Loan amount at the end of the year | [optional] +**interestPaid** | **float** | Interest amount paid by the employee | [optional] +**loanDischarged** | **\DateTime** | Date when the loan ended | [optional] +**loanMade** | **\DateTime** | Date when the loan started | [optional] +**maxBalanceInYear** | **float** | Highest loan balance during the year | [optional] +**numberOfJointBorrowers** | **int** | | [optional] +**startingBalance** | **float** | Loan amount at the start of the year | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractCisDetailsRequest.md b/docs/Model/ContractCisDetailsRequest.md index f43d57e..6f10c30 100644 --- a/docs/Model/ContractCisDetailsRequest.md +++ b/docs/Model/ContractCisDetailsRequest.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**verification** | [**\SynergiTech\Staffology\Model\ContractCisVerificationDetailsRequest**](ContractCisVerificationDetailsRequest.md) | | [optional] +**companyNumber** | **string** | | [optional] +**companyUtr** | **string** | | [optional] +**reverseChargeVAT** | **bool** | | [optional] +**tradingName** | **string** | | [optional] **type** | [**\SynergiTech\Staffology\Model\CISSubContractorType**](CISSubContractorType.md) | | [optional] **utr** | **string** | | [optional] -**tradingName** | **string** | | [optional] -**companyUtr** | **string** | | [optional] -**companyNumber** | **string** | | [optional] -**vatRegistered** | **bool** | | [optional] **vatNumber** | **string** | | [optional] **vatRate** | **float** | | [optional] -**reverseChargeVAT** | **bool** | | [optional] +**vatRegistered** | **bool** | | [optional] +**verification** | [**\SynergiTech\Staffology\Model\ContractCisVerificationDetailsRequest**](ContractCisVerificationDetailsRequest.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractCisDetailsResponse.md b/docs/Model/ContractCisDetailsResponse.md index 4b2e0b8..b4d3ba8 100644 --- a/docs/Model/ContractCisDetailsResponse.md +++ b/docs/Model/ContractCisDetailsResponse.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**verification** | [**\SynergiTech\Staffology\Model\ContractCisVerificationDetailsResponse**](ContractCisVerificationDetailsResponse.md) | | [optional] +**companyNumber** | **string** | | [optional] +**companyUtr** | **string** | | [optional] +**reverseChargeVAT** | **bool** | | [optional] +**tradingName** | **string** | | [optional] **type** | [**\SynergiTech\Staffology\Model\CISSubContractorType**](CISSubContractorType.md) | | [optional] **utr** | **string** | | [optional] -**tradingName** | **string** | | [optional] -**companyUtr** | **string** | | [optional] -**companyNumber** | **string** | | [optional] -**vatRegistered** | **bool** | | [optional] **vatNumber** | **string** | | [optional] **vatRate** | **float** | | [optional] -**reverseChargeVAT** | **bool** | | [optional] +**vatRegistered** | **bool** | | [optional] +**verification** | [**\SynergiTech\Staffology\Model\ContractCisVerificationDetailsResponse**](ContractCisVerificationDetailsResponse.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractCisSubContractor.md b/docs/Model/ContractCisSubContractor.md index 3563bb3..261d08b 100644 --- a/docs/Model/ContractCisSubContractor.md +++ b/docs/Model/ContractCisSubContractor.md @@ -4,33 +4,33 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employeeUniqueId** | **string** | | [optional] +**action** | **string** | | [optional] +**address** | [**\SynergiTech\Staffology\Model\ContractRtiEmployeeAddress**](ContractRtiEmployeeAddress.md) | | [optional] +**costOfMaterials** | **string** | | [optional] +**costOfMaterialsUnrounded** | **string** | | [optional] +**crn** | **string** | | [optional] +**displayName** | **string** | | [optional] **emailStatementTo** | **string** | | [optional] -**numberOfPayments** | **int** | | [optional] +**employeeUniqueId** | **string** | | [optional] **item** | [**\SynergiTech\Staffology\Model\ContractCisSubContractorItem**](ContractCisSubContractorItem.md) | | [optional] -**displayName** | **string** | | [optional] -**action** | **string** | | [optional] -**type** | **string** | | [optional] +**matched** | **string** | | [optional] **name** | [**\SynergiTech\Staffology\Model\ContractRtiEmployeeName**](ContractRtiEmployeeName.md) | | [optional] -**tradingName** | **string** | | [optional] -**worksRef** | **string** | | [optional] -**unmatchedRate** | **string** | | [optional] -**utr** | **string** | | [optional] -**crn** | **string** | | [optional] +**netPayment** | **string** | | [optional] **nino** | **string** | | [optional] +**numberOfPayments** | **int** | | [optional] **partnership** | [**\SynergiTech\Staffology\Model\ContractCisPartnership**](ContractCisPartnership.md) | | [optional] -**address** | [**\SynergiTech\Staffology\Model\ContractRtiEmployeeAddress**](ContractRtiEmployeeAddress.md) | | [optional] +**taxTreatment** | **string** | | [optional] **telephone** | **string** | | [optional] +**totalDeducted** | **string** | | [optional] +**totalPayments** | **string** | | [optional] **totalPaymentsUnrounded** | **string** | | [optional] -**costOfMaterialsUnrounded** | **string** | | [optional] +**tradingName** | **string** | | [optional] +**type** | **string** | | [optional] **umbrellaFee** | **string** | | [optional] +**unmatchedRate** | **string** | | [optional] +**utr** | **string** | | [optional] **validationMsg** | **string** | | [optional] **verificationNumber** | **string** | | [optional] -**totalPayments** | **string** | | [optional] -**costOfMaterials** | **string** | | [optional] -**totalDeducted** | **string** | | [optional] -**matched** | **string** | | [optional] -**taxTreatment** | **string** | | [optional] -**netPayment** | **string** | | [optional] +**worksRef** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractCisSubContractorItem.md b/docs/Model/ContractCisSubContractorItem.md index 539ffc0..311a5aa 100644 --- a/docs/Model/ContractCisSubContractorItem.md +++ b/docs/Model/ContractCisSubContractorItem.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] -**name** | **string** | | [optional] **metadata** | **mixed** | | [optional] +**name** | **string** | | [optional] **url** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractCisVerificationDetailsRequest.md b/docs/Model/ContractCisVerificationDetailsRequest.md index 22431dc..ee86fd0 100644 --- a/docs/Model/ContractCisVerificationDetailsRequest.md +++ b/docs/Model/ContractCisVerificationDetailsRequest.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**date** | **\DateTime** | | [optional] **manuallyEntered** | **bool** | | [optional] **matchInsteadOfVerify** | **bool** | | [optional] **number** | **string** | | [optional] -**date** | **\DateTime** | | [optional] **taxStatus** | [**\SynergiTech\Staffology\Model\CISTaxStatus**](CISTaxStatus.md) | | [optional] **verificationResponse** | [**\SynergiTech\Staffology\Model\ContractCisSubContractor**](ContractCisSubContractor.md) | | [optional] diff --git a/docs/Model/ContractCisVerificationDetailsResponse.md b/docs/Model/ContractCisVerificationDetailsResponse.md index e0fbbb5..38e5010 100644 --- a/docs/Model/ContractCisVerificationDetailsResponse.md +++ b/docs/Model/ContractCisVerificationDetailsResponse.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**verificationRequest** | **string** | If a Verification request has been made for this employee then this will show its ID | [optional] +**date** | **\DateTime** | | [optional] **manuallyEntered** | **bool** | | [optional] **matchInsteadOfVerify** | **bool** | | [optional] **number** | **string** | | [optional] -**date** | **\DateTime** | | [optional] **taxStatus** | [**\SynergiTech\Staffology\Model\CISTaxStatus**](CISTaxStatus.md) | | [optional] +**verificationRequest** | **string** | If a Verification request has been made for this employee then this will show its ID | [optional] **verificationResponse** | [**\SynergiTech\Staffology\Model\ContractCisSubContractor**](ContractCisSubContractor.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractCombinedPensionContributionsReportRequest.md b/docs/Model/ContractCombinedPensionContributionsReportRequest.md new file mode 100644 index 0000000..fdb58ee --- /dev/null +++ b/docs/Model/ContractCombinedPensionContributionsReportRequest.md @@ -0,0 +1,13 @@ +# # ContractCombinedPensionContributionsReportRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**effectiveDateFrom** | **\DateTime** | | [optional] +**effectiveDateTo** | **\DateTime** | | [optional] +**payScheduleSelections** | [**\SynergiTech\Staffology\Model\ContractPayPeriodOrdinalSelection[]**](ContractPayPeriodOrdinalSelection.md) | | [optional] +**pensionSchemeId** | **string** | | [optional] +**reportFormat** | [**\SynergiTech\Staffology\Model\ReportFormat**](ReportFormat.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractCostCentreJournalOverridesRequest.md b/docs/Model/ContractCostCentreJournalOverridesRequest.md index 004449f..e492440 100644 --- a/docs/Model/ContractCostCentreJournalOverridesRequest.md +++ b/docs/Model/ContractCostCentreJournalOverridesRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tokenDescription** | **string** | Token Description | [optional] -**mapping** | **string** | CostCentre Journal Overrides Mapping | [optional] **journalTokenPublicId** | **string** | Journal Token Public Id | [optional] +**mapping** | **string** | CostCentre Journal Overrides Mapping | [optional] +**tokenDescription** | **string** | Token Description | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractCostCentreJournalOverridesResponse.md b/docs/Model/ContractCostCentreJournalOverridesResponse.md index 1220e14..9d2faa4 100644 --- a/docs/Model/ContractCostCentreJournalOverridesResponse.md +++ b/docs/Model/ContractCostCentreJournalOverridesResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uniqueId** | **string** | Cost Centre Journal Overrides identifier | [optional] -**tokenDescription** | **string** | Token Description | [optional] -**mapping** | **string** | CostCentre Journal Overrides Mapping | [optional] **journalTokenPublicId** | **string** | Journal Token Public Id | [optional] +**mapping** | **string** | CostCentre Journal Overrides Mapping | [optional] +**tokenDescription** | **string** | Token Description | [optional] +**uniqueId** | **string** | Cost Centre Journal Overrides identifier | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractCostCentreJournalOverridesResponseItem.md b/docs/Model/ContractCostCentreJournalOverridesResponseItem.md index da2e86c..a67c56e 100644 --- a/docs/Model/ContractCostCentreJournalOverridesResponseItem.md +++ b/docs/Model/ContractCostCentreJournalOverridesResponseItem.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] -**name** | **string** | | [optional] **metadata** | **mixed** | | [optional] +**name** | **string** | | [optional] **url** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractCostCentreJournalOverridesUpdateRequest.md b/docs/Model/ContractCostCentreJournalOverridesUpdateRequest.md index 9724051..595c8f0 100644 --- a/docs/Model/ContractCostCentreJournalOverridesUpdateRequest.md +++ b/docs/Model/ContractCostCentreJournalOverridesUpdateRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uniqueId** | **string** | Unique Id | [optional] -**tokenDescription** | **string** | Token Description | [optional] -**mapping** | **string** | CostCentre Journal Overrides Mapping | [optional] **journalTokenPublicId** | **string** | Journal Token Public Id | [optional] +**mapping** | **string** | CostCentre Journal Overrides Mapping | [optional] +**tokenDescription** | **string** | Token Description | [optional] +**uniqueId** | **string** | Unique Id | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractCreateEmployeeRequest.md b/docs/Model/ContractCreateEmployeeRequest.md index 260e932..17c2af6 100644 --- a/docs/Model/ContractCreateEmployeeRequest.md +++ b/docs/Model/ContractCreateEmployeeRequest.md @@ -4,17 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**personalDetails** | [**\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest**](ContractPersonalDetailsRequest.md) | | [optional] -**employmentDetails** | [**\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest**](ContractEmploymentDetailsRequest.md) | | [optional] +**aggregatedServiceDate** | **\DateTime** | | [optional] **autoEnrolment** | [**\SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest**](ContractAutoEnrolmentRequest.md) | | [optional] -**leaveSettings** | [**\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest**](ContractEmployeeLeaveSettingsRequest.md) | | [optional] -**rightToWork** | [**\SynergiTech\Staffology\Model\ContractRightToWork**](ContractRightToWork.md) | | [optional] **bankDetails** | [**\SynergiTech\Staffology\Model\ContractBankDetails**](ContractBankDetails.md) | | [optional] -**payOptions** | [**\SynergiTech\Staffology\Model\ContractPayOptionsRequest**](ContractPayOptionsRequest.md) | | [optional] -**tags** | **string[]** | | [optional] -**holidaySchemeUniqueId** | **string** | | [optional] -**aggregatedServiceDate** | **\DateTime** | | [optional] +**defaultPensionSchemeName** | **string** | The name of the Pension Scheme that will be used for this employee. | [optional] +**defaultPensionSchemeUniqueId** | **string** | The UniqueId of the Pension Scheme that will be used for this employee. | [optional] +**defaultWorkerGroupName** | **string** | The name of the Worker Group that will be used for this employee. | [optional] +**defaultWorkerGroupUniqueId** | **string** | The UniqueId of the Worker Group that will be used for this employee. | [optional] +**employmentDetails** | [**\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest**](ContractEmploymentDetailsRequest.md) | | [optional] **evcId** | **string** | If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. | [optional] +**holidaySchemeUniqueId** | **string** | | [optional] +**leaveSettings** | [**\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest**](ContractEmployeeLeaveSettingsRequest.md) | | [optional] +**payOptions** | [**\SynergiTech\Staffology\Model\ContractPayOptionsRequest**](ContractPayOptionsRequest.md) | | [optional] +**personalDetails** | [**\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest**](ContractPersonalDetailsRequest.md) | | [optional] +**rightToWork** | [**\SynergiTech\Staffology\Model\ContractRightToWork**](ContractRightToWork.md) | | [optional] **sourceSystemId** | **string** | Used by external systems so they can store an immutable reference. Once this property is set it cannot be changed. | [optional] +**tags** | **string[]** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractDepartmentJournalOverridesRequest.md b/docs/Model/ContractDepartmentJournalOverridesRequest.md index 59f1403..19fdc68 100644 --- a/docs/Model/ContractDepartmentJournalOverridesRequest.md +++ b/docs/Model/ContractDepartmentJournalOverridesRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tokenDescription** | **string** | Token Description | [optional] -**mapping** | **string** | Department Journal Overrides Mapping | [optional] **journalTokenPublicId** | **string** | Journal Token Public Id | [optional] +**mapping** | **string** | Department Journal Overrides Mapping | [optional] +**tokenDescription** | **string** | Token Description | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractDepartmentJournalOverridesResponse.md b/docs/Model/ContractDepartmentJournalOverridesResponse.md index 61ebd74..765c171 100644 --- a/docs/Model/ContractDepartmentJournalOverridesResponse.md +++ b/docs/Model/ContractDepartmentJournalOverridesResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uniqueId** | **string** | Department Journal Overrides identifier | [optional] -**tokenDescription** | **string** | Token Description | [optional] -**mapping** | **string** | Department Journal Overrides Mapping | [optional] **journalTokenPublicId** | **string** | Journal Token Public Id | [optional] +**mapping** | **string** | Department Journal Overrides Mapping | [optional] +**tokenDescription** | **string** | Token Description | [optional] +**uniqueId** | **string** | Department Journal Overrides identifier | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractDepartmentJournalOverridesResponseItem.md b/docs/Model/ContractDepartmentJournalOverridesResponseItem.md index cff0195..140d241 100644 --- a/docs/Model/ContractDepartmentJournalOverridesResponseItem.md +++ b/docs/Model/ContractDepartmentJournalOverridesResponseItem.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] -**name** | **string** | | [optional] **metadata** | **mixed** | | [optional] +**name** | **string** | | [optional] **url** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractDepartmentJournalOverridesUpdateRequest.md b/docs/Model/ContractDepartmentJournalOverridesUpdateRequest.md index d89b7c4..7b495e8 100644 --- a/docs/Model/ContractDepartmentJournalOverridesUpdateRequest.md +++ b/docs/Model/ContractDepartmentJournalOverridesUpdateRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uniqueId** | **string** | Unique Id | [optional] -**tokenDescription** | **string** | Token Description | [optional] -**mapping** | **string** | Department Journal Overrides Mapping | [optional] **journalTokenPublicId** | **string** | Journal Token Public Id | [optional] +**mapping** | **string** | Department Journal Overrides Mapping | [optional] +**tokenDescription** | **string** | Token Description | [optional] +**uniqueId** | **string** | Unique Id | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractDepartmentRequest.md b/docs/Model/ContractDepartmentRequest.md index 1db4fc5..ef945a9 100644 --- a/docs/Model/ContractDepartmentRequest.md +++ b/docs/Model/ContractDepartmentRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**accountingCode** | **string** | | [optional] **code** | **string** | The unique code for this Department | -**title** | **string** | The name of this Department | **color** | **string** | A color to used to represent this Department, in hex format. ie 'ff0000' | [optional] -**accountingCode** | **string** | | [optional] +**title** | **string** | The name of this Department | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractDepartmentResponse.md b/docs/Model/ContractDepartmentResponse.md index 35983d9..70ff04b 100644 --- a/docs/Model/ContractDepartmentResponse.md +++ b/docs/Model/ContractDepartmentResponse.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employeeCount** | **int** | The number of employees with this set as their primary department | [optional] +**accountingCode** | **string** | | [optional] **code** | **string** | The unique code for this Department | -**title** | **string** | The name of this Department | **color** | **string** | A color to used to represent this Department, in hex format. ie 'ff0000' | [optional] -**accountingCode** | **string** | | [optional] +**employeeCount** | **int** | The number of employees with this set as their primary department | [optional] +**title** | **string** | The name of this Department | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractDirectorshipDetails.md b/docs/Model/ContractDirectorshipDetails.md index 7a36eae..b190801 100644 --- a/docs/Model/ContractDirectorshipDetails.md +++ b/docs/Model/ContractDirectorshipDetails.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **isDirector** | **bool** | | [optional] -**startDate** | **\DateTime** | | [optional] **leaveDate** | **\DateTime** | | [optional] **niAlternativeMethod** | **bool** | | [optional] +**startDate** | **\DateTime** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployeeItem.md b/docs/Model/ContractEmployeeItem.md index 3de54d3..77a7195 100644 --- a/docs/Model/ContractEmployeeItem.md +++ b/docs/Model/ContractEmployeeItem.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] -**name** | **string** | | [optional] **metadata** | **mixed** | | [optional] +**name** | **string** | | [optional] **url** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployeeLeaveSettingsRequest.md b/docs/Model/ContractEmployeeLeaveSettingsRequest.md index 62d2c2d..5b79436 100644 --- a/docs/Model/ContractEmployeeLeaveSettingsRequest.md +++ b/docs/Model/ContractEmployeeLeaveSettingsRequest.md @@ -4,37 +4,37 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**useDefaultHolidayType** | **bool** | If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAllowanceResetDate** | **bool** | If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAllowance** | **bool** | If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieu** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieuRate** | **bool** | If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieuAllGrossPay** | **bool** | [Deprecated] Please use UseUseDefaultHolidayAccrualBasis instead. This filed will be removed in a later release. | [optional] -**useDefaultHolidayAccrualBasis** | **bool** | If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieuPayAutomatically** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccrueHoursPerDay** | **bool** | If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultMaximumAccruePeriod** | **bool** | If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**allowanceResetDate** | **\DateTime** | The date that the holiday allowance resets. Only the day/month part of the value is relevant. | [optional] -**allowance** | **float** | The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset | [optional] -**adjustment** | **float** | Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**holidayType** | [**\SynergiTech\Staffology\Model\HolidayType**](HolidayType.md) | | [optional] -**accrueSetAmount** | **bool** | If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. | [optional] **accrueHoursPerDay** | **float** | If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued | [optional] -**showAllowanceOnPayslip** | **bool** | If true then the remaining Allowance will be shown on the employees payslip. | [optional] -**showAhpOnPayslip** | **bool** | If true then the AHP balance will be shown on the employees payslip. | [optional] -**accruePaymentInLieuRate** | **float** | The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. | [optional] +**accruePayCodeSetUniqueId** | **string** | Pay code set to use for accruing holiday pay | [optional] **accruePaymentInLieuAllGrossPay** | **bool** | [Deprecated] Please use HolidayAccrualBasis instead. This filed will be removed in a later release. | [optional] **accruePaymentInLieuPayAutomatically** | **bool** | Set to true if you want employees to be automatically paid any outstanding holiday pay | [optional] -**occupationalSicknessUniqueId** | **string** | | [optional] -**accruedPaymentAdjustment** | **float** | Any manual adjustment to the total accrued | [optional] +**accruePaymentInLieuRate** | **float** | The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. | [optional] +**accrueSetAmount** | **bool** | If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. | [optional] **accruedHoursAdjustment** | **float** | Any manual adjustment to the total hours accrued | [optional] +**accruedPaymentAdjustment** | **float** | Any manual adjustment to the total accrued | [optional] +**adjustment** | **float** | Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**aggregatedServiceDate** | **\DateTime** | | [optional] +**allowance** | **float** | The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset | [optional] +**allowanceResetDate** | **\DateTime** | The date that the holiday allowance resets. Only the day/month part of the value is relevant. | [optional] **holidayAccrualBasis** | [**\SynergiTech\Staffology\Model\HolidayAccrual**](HolidayAccrual.md) | | [optional] **holidayAccrualDefaultRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] -**aggregatedServiceDate** | **\DateTime** | | [optional] -**useAggregatedServiceDate** | **bool** | | [optional] -**accruePayCodeSetUniqueId** | **string** | Pay code set to use for accruing holiday pay | [optional] -**maximumAccruePeriod** | **float** | The maximum number of hours capable of being accrued in a single period | [optional] **holidayLeaveAccrualCustomRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] +**holidayType** | [**\SynergiTech\Staffology\Model\HolidayType**](HolidayType.md) | | [optional] +**maximumAccruePeriod** | **float** | The maximum number of hours capable of being accrued in a single period | [optional] +**occupationalSicknessUniqueId** | **string** | | [optional] +**showAhpOnPayslip** | **bool** | If true then the AHP balance will be shown on the employees payslip. | [optional] +**showAllowanceOnPayslip** | **bool** | If true then the remaining Allowance will be shown on the employees payslip. | [optional] +**useAggregatedServiceDate** | **bool** | | [optional] +**useDefaultAccrueHoursPerDay** | **bool** | If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieu** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieuAllGrossPay** | **bool** | [Deprecated] Please use UseUseDefaultHolidayAccrualBasis instead. This filed will be removed in a later release. | [optional] +**useDefaultAccruePaymentInLieuPayAutomatically** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieuRate** | **bool** | If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAllowance** | **bool** | If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) | [optional] +**useDefaultAllowanceResetDate** | **bool** | If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultHolidayAccrualBasis** | **bool** | If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] **useDefaultHolidayAccrualDefaultRateType** | **bool** | If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. | [optional] +**useDefaultHolidayType** | **bool** | If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultMaximumAccruePeriod** | **bool** | If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployeeLeaveSettingsResponse.md b/docs/Model/ContractEmployeeLeaveSettingsResponse.md index de042ba..5b77ef1 100644 --- a/docs/Model/ContractEmployeeLeaveSettingsResponse.md +++ b/docs/Model/ContractEmployeeLeaveSettingsResponse.md @@ -4,47 +4,47 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**allowanceUsed** | **float** | [readonly] The number of days used from the allowance since last reset | [optional] -**allowanceUsedPreviousPeriod** | **float** | [readonly] The number of days used in the 12 months prior to the last reset | [optional] -**allowanceRemaining** | **float** | [readonly] The number of days remaining of the allowance until next reset | [optional] [readonly] -**accruedPaymentLiability** | **float** | [readonly] The total accrued payments for this employee over the lifetime of their employment so far | [optional] -**accruedPaymentPaid** | **float** | [readonly] The Total amount paid to this employee in lieu of holidays | [optional] -**accruedPaymentBalance** | **float** | [readonly] The balance of what is owed to this employee in lieu of holidays | [optional] -**accruedHoursAmount** | **float** | [readonly] The total accrued hours for this employee over the lifetime of their employment so far | [optional] -**accruedHoursPaid** | **float** | [readonly] The Total amount of hours paid to this employee in lieu of holidays | [optional] -**accruedHoursBalance** | **float** | [readonly] The balance of hours owed to this employee in lieu of holidays | [optional] [readonly] -**holidayAccrualResetDate** | **\DateTime** | [readonly] This date is used to reset holiday accrual schemes (Accrual Money or Accrual Hours). | [optional] -**useDefaultHolidayType** | **bool** | If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAllowanceResetDate** | **bool** | If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAllowance** | **bool** | If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieu** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieuRate** | **bool** | If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieuAllGrossPay** | **bool** | [Deprecated] Please use UseUseDefaultHolidayAccrualBasis instead. This filed will be removed in a later release. | [optional] -**useDefaultHolidayAccrualBasis** | **bool** | If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieuPayAutomatically** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccrueHoursPerDay** | **bool** | If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultMaximumAccruePeriod** | **bool** | If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**allowanceResetDate** | **\DateTime** | The date that the holiday allowance resets. Only the day/month part of the value is relevant. | [optional] -**allowance** | **float** | The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset | [optional] -**adjustment** | **float** | Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**holidayType** | [**\SynergiTech\Staffology\Model\HolidayType**](HolidayType.md) | | [optional] -**accrueSetAmount** | **bool** | If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. | [optional] **accrueHoursPerDay** | **float** | If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued | [optional] -**showAllowanceOnPayslip** | **bool** | If true then the remaining Allowance will be shown on the employees payslip. | [optional] -**showAhpOnPayslip** | **bool** | If true then the AHP balance will be shown on the employees payslip. | [optional] -**accruePaymentInLieuRate** | **float** | The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. | [optional] +**accruePayCodeSetUniqueId** | **string** | Pay code set to use for accruing holiday pay | [optional] **accruePaymentInLieuAllGrossPay** | **bool** | [Deprecated] Please use HolidayAccrualBasis instead. This filed will be removed in a later release. | [optional] **accruePaymentInLieuPayAutomatically** | **bool** | Set to true if you want employees to be automatically paid any outstanding holiday pay | [optional] -**occupationalSicknessUniqueId** | **string** | | [optional] -**accruedPaymentAdjustment** | **float** | Any manual adjustment to the total accrued | [optional] +**accruePaymentInLieuRate** | **float** | The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. | [optional] +**accrueSetAmount** | **bool** | If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. | [optional] **accruedHoursAdjustment** | **float** | Any manual adjustment to the total hours accrued | [optional] +**accruedHoursAmount** | **float** | [readonly] The total accrued hours for this employee over the lifetime of their employment so far | [optional] +**accruedHoursBalance** | **float** | [readonly] The balance of hours owed to this employee in lieu of holidays | [optional] [readonly] +**accruedHoursPaid** | **float** | [readonly] The Total amount of hours paid to this employee in lieu of holidays | [optional] +**accruedPaymentAdjustment** | **float** | Any manual adjustment to the total accrued | [optional] +**accruedPaymentBalance** | **float** | [readonly] The balance of what is owed to this employee in lieu of holidays | [optional] +**accruedPaymentLiability** | **float** | [readonly] The total accrued payments for this employee over the lifetime of their employment so far | [optional] +**accruedPaymentPaid** | **float** | [readonly] The Total amount paid to this employee in lieu of holidays | [optional] +**adjustment** | **float** | Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**aggregatedServiceDate** | **\DateTime** | | [optional] +**allowance** | **float** | The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset | [optional] +**allowanceRemaining** | **float** | [readonly] The number of days remaining of the allowance until next reset | [optional] [readonly] +**allowanceResetDate** | **\DateTime** | The date that the holiday allowance resets. Only the day/month part of the value is relevant. | [optional] +**allowanceUsed** | **float** | [readonly] The number of days used from the allowance since last reset | [optional] +**allowanceUsedPreviousPeriod** | **float** | [readonly] The number of days used in the 12 months prior to the last reset | [optional] **holidayAccrualBasis** | [**\SynergiTech\Staffology\Model\HolidayAccrual**](HolidayAccrual.md) | | [optional] **holidayAccrualDefaultRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] -**aggregatedServiceDate** | **\DateTime** | | [optional] -**useAggregatedServiceDate** | **bool** | | [optional] -**accruePayCodeSetUniqueId** | **string** | Pay code set to use for accruing holiday pay | [optional] -**maximumAccruePeriod** | **float** | The maximum number of hours capable of being accrued in a single period | [optional] +**holidayAccrualResetDate** | **\DateTime** | [readonly] This date is used to reset holiday accrual schemes (Accrual Money or Accrual Hours). | [optional] **holidayLeaveAccrualCustomRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] +**holidayType** | [**\SynergiTech\Staffology\Model\HolidayType**](HolidayType.md) | | [optional] +**maximumAccruePeriod** | **float** | The maximum number of hours capable of being accrued in a single period | [optional] +**occupationalSicknessUniqueId** | **string** | | [optional] +**showAhpOnPayslip** | **bool** | If true then the AHP balance will be shown on the employees payslip. | [optional] +**showAllowanceOnPayslip** | **bool** | If true then the remaining Allowance will be shown on the employees payslip. | [optional] +**useAggregatedServiceDate** | **bool** | | [optional] +**useDefaultAccrueHoursPerDay** | **bool** | If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieu** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieuAllGrossPay** | **bool** | [Deprecated] Please use UseUseDefaultHolidayAccrualBasis instead. This filed will be removed in a later release. | [optional] +**useDefaultAccruePaymentInLieuPayAutomatically** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieuRate** | **bool** | If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAllowance** | **bool** | If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) | [optional] +**useDefaultAllowanceResetDate** | **bool** | If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultHolidayAccrualBasis** | **bool** | If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] **useDefaultHolidayAccrualDefaultRateType** | **bool** | If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. | [optional] +**useDefaultHolidayType** | **bool** | If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultMaximumAccruePeriod** | **bool** | If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployeeNavigationResponse.md b/docs/Model/ContractEmployeeNavigationResponse.md new file mode 100644 index 0000000..2766c10 --- /dev/null +++ b/docs/Model/ContractEmployeeNavigationResponse.md @@ -0,0 +1,19 @@ +# # ContractEmployeeNavigationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currentId** | **string** | | [optional] +**currentIndex** | **int** | | [optional] +**deptCode** | **string** | | [optional] +**employeeCount** | **int** | | [optional] +**firstId** | **string** | | [optional] +**lastId** | **string** | | [optional] +**nextId** | **string** | | [optional] +**previousId** | **string** | | [optional] +**sortBy** | [**\SynergiTech\Staffology\Model\EmployeeSortBy**](EmployeeSortBy.md) | | [optional] +**sortDescending** | **bool** | | [optional] +**status** | [**\SynergiTech\Staffology\Model\EmployeeStatus**](EmployeeStatus.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployeeResponse.md b/docs/Model/ContractEmployeeResponse.md index d313ec3..8a7c39a 100644 --- a/docs/Model/ContractEmployeeResponse.md +++ b/docs/Model/ContractEmployeeResponse.md @@ -4,20 +4,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | The unique id of the object | [optional] -**personalDetails** | [**\SynergiTech\Staffology\Model\ContractPersonalDetailsResponse**](ContractPersonalDetailsResponse.md) | | [optional] -**employmentDetails** | [**\SynergiTech\Staffology\Model\ContractEmploymentDetailsResponse**](ContractEmploymentDetailsResponse.md) | | [optional] +**aeNotEnroledWarning** | **bool** | | [optional] +**aggregatedServiceDate** | **\DateTime** | | [optional] **autoEnrolment** | [**\SynergiTech\Staffology\Model\ContractAutoEnrolmentResponse**](ContractAutoEnrolmentResponse.md) | | [optional] -**leaveSettings** | [**\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsResponse**](ContractEmployeeLeaveSettingsResponse.md) | | [optional] -**rightToWork** | [**\SynergiTech\Staffology\Model\ContractRightToWork**](ContractRightToWork.md) | | [optional] **bankDetails** | [**\SynergiTech\Staffology\Model\ContractBankDetails**](ContractBankDetails.md) | | [optional] +**defaultPensionSchemeName** | **string** | The name of the Pension Scheme that will be used for this employee. | [optional] +**defaultPensionSchemeUniqueId** | **string** | The UniqueId of the Pension Scheme that will be used for this employee. | [optional] +**defaultWorkerGroupName** | **string** | The name of the Worker Group that will be used for this employee. | [optional] +**defaultWorkerGroupUniqueId** | **string** | The UniqueId of the Worker Group that will be used for this employee. | [optional] +**employmentDetails** | [**\SynergiTech\Staffology\Model\ContractEmploymentDetailsResponse**](ContractEmploymentDetailsResponse.md) | | [optional] +**evcId** | **string** | If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. | [optional] +**holidaySchemeUniqueId** | **string** | | [optional] +**id** | **string** | The unique id of the object | [optional] +**leaveSettings** | [**\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsResponse**](ContractEmployeeLeaveSettingsResponse.md) | | [optional] **payOptions** | [**\SynergiTech\Staffology\Model\ContractPayOptionsResponse**](ContractPayOptionsResponse.md) | | [optional] -**tags** | **string[]** | | [optional] -**status** | [**\SynergiTech\Staffology\Model\EmployeeStatus**](EmployeeStatus.md) | | [optional] -**aeNotEnroledWarning** | **bool** | | [optional] +**personalDetails** | [**\SynergiTech\Staffology\Model\ContractPersonalDetailsResponse**](ContractPersonalDetailsResponse.md) | | [optional] +**rightToWork** | [**\SynergiTech\Staffology\Model\ContractRightToWork**](ContractRightToWork.md) | | [optional] **sourceSystemId** | **string** | | [optional] -**aggregatedServiceDate** | **\DateTime** | | [optional] -**holidaySchemeUniqueId** | **string** | | [optional] -**evcId** | **string** | If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. | [optional] +**status** | [**\SynergiTech\Staffology\Model\EmployeeStatus**](EmployeeStatus.md) | | [optional] +**tags** | **string[]** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployeeRoleAnalysisCategoryCodeRequest.md b/docs/Model/ContractEmployeeRoleAnalysisCategoryCodeRequest.md index 66e43fc..82df68a 100644 --- a/docs/Model/ContractEmployeeRoleAnalysisCategoryCodeRequest.md +++ b/docs/Model/ContractEmployeeRoleAnalysisCategoryCodeRequest.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**analysisCategoryName** | **string** | Analysis category name for AnalysisCategory code | [optional] +**analysisCategoryPublicId** | **string** | Analysis category identifier | [optional] **code** | **string** | Analysis Category code | [optional] **color** | **string** | Analysis Category code color | [optional] +**isPrimary** | **bool** | Return whether Employee Role is primary for not | [optional] **title** | **string** | Analysis Category code Title | [optional] **weighting** | **float** | Weightage for analysis category code | [optional] -**analysisCategoryName** | **string** | Analysis category name for AnalysisCategory code | [optional] -**analysisCategoryPublicId** | **string** | Analysis category identifier | [optional] -**isPrimary** | **bool** | Return whether Employee Role is primary for not | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployeeRoleAnalysisCategoryCodeResponse.md b/docs/Model/ContractEmployeeRoleAnalysisCategoryCodeResponse.md index 11ba6d3..9f0e645 100644 --- a/docs/Model/ContractEmployeeRoleAnalysisCategoryCodeResponse.md +++ b/docs/Model/ContractEmployeeRoleAnalysisCategoryCodeResponse.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | Employee Role Analysis Category Code identifier | [optional] +**analysisCategoryName** | **string** | Analysis category name for AnalysisCategory code | [optional] +**analysisCategoryPublicId** | **string** | Analysis category identifier | [optional] **code** | **string** | Analysis Category code | [optional] **color** | **string** | Analysis Category code color | [optional] +**id** | **string** | Employee Role Analysis Category Code identifier | [optional] +**isPrimary** | **bool** | Return whether Employee Role is primary for not | [optional] **title** | **string** | Analysis Category code Title | [optional] **weighting** | **float** | Weightage for analysis category code | [optional] -**analysisCategoryName** | **string** | Analysis category name for AnalysisCategory code | [optional] -**analysisCategoryPublicId** | **string** | Analysis category identifier | [optional] -**isPrimary** | **bool** | Return whether Employee Role is primary for not | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployeeRoleItem.md b/docs/Model/ContractEmployeeRoleItem.md index dc20107..28ced1d 100644 --- a/docs/Model/ContractEmployeeRoleItem.md +++ b/docs/Model/ContractEmployeeRoleItem.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] -**name** | **string** | | [optional] **metadata** | **mixed** | | [optional] +**name** | **string** | | [optional] **url** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployeeRoleResponse.md b/docs/Model/ContractEmployeeRoleResponse.md index 9a8e15e..4a45bf1 100644 --- a/docs/Model/ContractEmployeeRoleResponse.md +++ b/docs/Model/ContractEmployeeRoleResponse.md @@ -4,18 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**basis** | [**\SynergiTech\Staffology\Model\RoleBasis**](RoleBasis.md) | | [optional] +**defaultPensionSchemeUniqueId** | **string** | | [optional] +**defaultWorkerGroupUniqueId** | **string** | | [optional] +**displayName** | **string** | | [optional] [readonly] +**endDate** | **\DateTime** | | [optional] **id** | **string** | | [optional] -**jobTitle** | **string** | Job Title of the Role | [optional] **isPrimary** | **bool** | Set to True if this is Primary role of the Employee | [optional] +**jobTitle** | **string** | Job Title of the Role | [optional] +**occupationalMaternityPolicyUniqueId** | **string** | | [optional] +**occupationalSicknessPolicyUniqueId** | **string** | | [optional] +**payOptions** | [**\SynergiTech\Staffology\Model\ContractPayOptionsBaseResponse**](ContractPayOptionsBaseResponse.md) | | [optional] **reference** | **string** | | [optional] **startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] -**basis** | [**\SynergiTech\Staffology\Model\RoleBasis**](RoleBasis.md) | | [optional] **type** | [**\SynergiTech\Staffology\Model\RoleType**](RoleType.md) | | [optional] -**displayName** | **string** | | [optional] [readonly] -**payOptions** | [**\SynergiTech\Staffology\Model\ContractPayOptionsBaseResponse**](ContractPayOptionsBaseResponse.md) | | [optional] **workingPattern** | [**\SynergiTech\Staffology\Model\ContractWorkingPatternResponse**](ContractWorkingPatternResponse.md) | | [optional] -**occupationalMaternityPolicyUniqueId** | **string** | | [optional] -**occupationalSicknessPolicyUniqueId** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployeeRoleWorkingPatternResponse.md b/docs/Model/ContractEmployeeRoleWorkingPatternResponse.md index 7b0f310..2882d9e 100644 --- a/docs/Model/ContractEmployeeRoleWorkingPatternResponse.md +++ b/docs/Model/ContractEmployeeRoleWorkingPatternResponse.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uniqueId** | **string** | The UniqueId of the model. | [optional] +**effectiveFrom** | **\DateTime** | The date when the assignment of the Working Pattern becomes effective. | [optional] **effectiveTo** | **\DateTime** | [readonly] The date when the assignment of the Working Pattern effectiveness ends. Populated automatically based on working pattern effectiveFrom dates. | [optional] +**uniqueId** | **string** | The UniqueId of the model. | [optional] **workingPattern** | [**\SynergiTech\Staffology\Model\ContractWorkingPatternResponse**](ContractWorkingPatternResponse.md) | | [optional] -**effectiveFrom** | **\DateTime** | The date when the assignment of the Working Pattern becomes effective. | [optional] **workingPatternUniqueId** | **string** | The UniqueId of the Working Pattern. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployeeRoleWorkingPatternResponseItem.md b/docs/Model/ContractEmployeeRoleWorkingPatternResponseItem.md index 9fa7b54..80e531c 100644 --- a/docs/Model/ContractEmployeeRoleWorkingPatternResponseItem.md +++ b/docs/Model/ContractEmployeeRoleWorkingPatternResponseItem.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**workingPatternId** | **string** | The unique id of the working pattern. | [optional] +**contractedWeeks** | **float** | [readonly] The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. | [optional] **effectiveFrom** | **\DateTime** | The date when the assignment of the Working Pattern becomes effective. | [optional] **effectiveTo** | **\DateTime** | [readonly] The date when the assignment of the Working Pattern effectiveness ends. Populated automatically based on working pattern effectiveFrom dates. | [optional] -**totalHours** | **float** | [readonly] The amount of hours per working pattern. | [optional] -**contractedWeeks** | **float** | [readonly] The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. | [optional] -**title** | **string** | The title of the working pattern. | [optional] **id** | **string** | | [optional] -**name** | **string** | | [optional] **metadata** | **mixed** | | [optional] +**name** | **string** | | [optional] +**title** | **string** | The title of the working pattern. | [optional] +**totalHours** | **float** | [readonly] The amount of hours per working pattern. | [optional] **url** | **string** | | [optional] +**workingPatternId** | **string** | The unique id of the working pattern. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployeeSupplementaryPayRunResponse.md b/docs/Model/ContractEmployeeSupplementaryPayRunResponse.md new file mode 100644 index 0000000..d3e41ca --- /dev/null +++ b/docs/Model/ContractEmployeeSupplementaryPayRunResponse.md @@ -0,0 +1,10 @@ +# # ContractEmployeeSupplementaryPayRunResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**\SynergiTech\Staffology\Model\ContractEmployeeItem[]**](ContractEmployeeItem.md) | List of employee items. | [optional] +**totalItems** | **int** | Value indicating the total number of items. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployerLeaveSettingsRequest.md b/docs/Model/ContractEmployerLeaveSettingsRequest.md index 7843158..2394406 100644 --- a/docs/Model/ContractEmployerLeaveSettingsRequest.md +++ b/docs/Model/ContractEmployerLeaveSettingsRequest.md @@ -4,51 +4,51 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**useDefaultHolidayType** | **bool** | If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAllowanceResetDate** | **bool** | If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAllowance** | **bool** | If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieu** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieuRate** | **bool** | If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultHolidayAccrualBasis** | **bool** | If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieuPayAutomatically** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccrueHoursPerDay** | **bool** | If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultMaximumAccruePeriod** | **bool** | If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**allowanceResetDate** | **\DateTime** | The date that the holiday allowance resets. Only the day/month part of the value is relevant. | [optional] -**allowance** | **float** | The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset | [optional] -**adjustment** | **float** | Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**allowanceUsed** | **float** | [readonly] The number of days used from the allowance since last reset | [optional] -**allowanceUsedPreviousPeriod** | **float** | [readonly] The number of days used in the 12 months prior to the last reset | [optional] -**allowanceRemaining** | **float** | [readonly] The number of days remaining of the allowance until next reset | [optional] [readonly] -**holidayType** | [**\SynergiTech\Staffology\Model\HolidayType**](HolidayType.md) | | [optional] -**accrueSetAmount** | **bool** | If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. | [optional] **accrueHoursPerDay** | **float** | If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued | [optional] -**showAllowanceOnPayslip** | **bool** | If true then the remaining Allowance will be shown on the employees payslip. | [optional] -**showAhpOnPayslip** | **bool** | If true then the AHP balance will be shown on the employees payslip. | [optional] -**accruePaymentInLieuRate** | **float** | The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. | [optional] +**accruePayCodeSetUniqueId** | **string** | | [optional] **accruePaymentInLieuAllGrossPay** | **bool** | Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element | [optional] **accruePaymentInLieuPayAutomatically** | **bool** | Set to true if you want employees to be automatically paid any outstanding holiday pay | [optional] -**accruePayCodeSetUniqueId** | **string** | | [optional] -**maximumAccruePeriod** | **float** | The maximum number of hours capable of being accrued in a single period | [optional] -**holidayAccrualBasis** | [**\SynergiTech\Staffology\Model\HolidayAccrual**](HolidayAccrual.md) | | [optional] -**holidayAccrualDefaultRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] -**occupationalSicknessUniqueId** | **string** | | [optional] -**accruedPaymentLiability** | **float** | [readonly] The total accrued payments for this employee over the lifetime of their employment so far | [optional] -**accruedPaymentAdjustment** | **float** | Any manual adjustment to the total accrued | [optional] -**accruedPaymentPaid** | **float** | [readonly] The Total amount paid to this employee in lieu of holidays | [optional] -**accruedPaymentBalance** | **float** | [readonly] The balance of what is owed to this employee in lieu of holidays | [optional] [readonly] -**accruedHoursAmount** | **float** | [readonly] The total accrued hours for this employee over the lifetime of their employment so far | [optional] +**accruePaymentInLieuRate** | **float** | The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. | [optional] +**accrueSetAmount** | **bool** | If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. | [optional] **accruedHoursAdjustment** | **float** | Any manual adjustment to the total hours accrued | [optional] -**accruedHoursPaid** | **float** | [readonly] The Total amount of hours paid to this employee in lieu of holidays | [optional] +**accruedHoursAmount** | **float** | [readonly] The total accrued hours for this employee over the lifetime of their employment so far | [optional] **accruedHoursAmountLastPeriod** | **float** | [readonly] The total accrued hours for this employee in the last pay period | [optional] -**paidHoursAmountLastPeriod** | **float** | [readonly] The number of hours paid against the pay code | [optional] **accruedHoursBalance** | **float** | [readonly] The balance of hours owed to this employee in lieu of holidays | [optional] [readonly] +**accruedHoursPaid** | **float** | [readonly] The Total amount of hours paid to this employee in lieu of holidays | [optional] +**accruedPaymentAdjustment** | **float** | Any manual adjustment to the total accrued | [optional] +**accruedPaymentBalance** | **float** | [readonly] The balance of what is owed to this employee in lieu of holidays | [optional] [readonly] +**accruedPaymentLiability** | **float** | [readonly] The total accrued payments for this employee over the lifetime of their employment so far | [optional] +**accruedPaymentPaid** | **float** | [readonly] The Total amount paid to this employee in lieu of holidays | [optional] +**adjustment** | **float** | Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] **aggregatedServiceDate** | **\DateTime** | | [optional] -**useAggregatedServiceDate** | **bool** | | [optional] -**useDefaultHolidayAccrualDefaultRateType** | **bool** | If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. | [optional] -**unauthorisedLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**allowance** | **float** | The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset | [optional] +**allowanceRemaining** | **float** | [readonly] The number of days remaining of the allowance until next reset | [optional] [readonly] +**allowanceResetDate** | **\DateTime** | The date that the holiday allowance resets. Only the day/month part of the value is relevant. | [optional] +**allowanceUsed** | **float** | [readonly] The number of days used from the allowance since last reset | [optional] +**allowanceUsedPreviousPeriod** | **float** | [readonly] The number of days used in the 12 months prior to the last reset | [optional] +**bereavementLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**holidayAccrualBasis** | [**\SynergiTech\Staffology\Model\HolidayAccrual**](HolidayAccrual.md) | | [optional] +**holidayAccrualDefaultRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] **holidayLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] -**sickLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**holidayType** | [**\SynergiTech\Staffology\Model\HolidayType**](HolidayType.md) | | [optional] +**maximumAccruePeriod** | **float** | The maximum number of hours capable of being accrued in a single period | [optional] +**occupationalSicknessUniqueId** | **string** | | [optional] +**paidHoursAmountLastPeriod** | **float** | [readonly] The number of hours paid against the pay code | [optional] **parentalLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] -**bereavementLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**showAhpOnPayslip** | **bool** | If true then the AHP balance will be shown on the employees payslip. | [optional] +**showAllowanceOnPayslip** | **bool** | If true then the remaining Allowance will be shown on the employees payslip. | [optional] +**sickLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**unauthorisedLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**useAggregatedServiceDate** | **bool** | | [optional] +**useDefaultAccrueHoursPerDay** | **bool** | If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieu** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieuPayAutomatically** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieuRate** | **bool** | If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAllowance** | **bool** | If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) | [optional] +**useDefaultAllowanceResetDate** | **bool** | If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultHolidayAccrualBasis** | **bool** | If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultHolidayAccrualDefaultRateType** | **bool** | If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. | [optional] +**useDefaultHolidayType** | **bool** | If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultMaximumAccruePeriod** | **bool** | If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployerLeaveSettingsResponse.md b/docs/Model/ContractEmployerLeaveSettingsResponse.md index 1dbfec7..9dfcbed 100644 --- a/docs/Model/ContractEmployerLeaveSettingsResponse.md +++ b/docs/Model/ContractEmployerLeaveSettingsResponse.md @@ -4,51 +4,51 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**useDefaultHolidayType** | **bool** | If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAllowanceResetDate** | **bool** | If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAllowance** | **bool** | If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieu** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieuRate** | **bool** | If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultHolidayAccrualBasis** | **bool** | If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieuPayAutomatically** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccrueHoursPerDay** | **bool** | If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultMaximumAccruePeriod** | **bool** | If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**allowanceResetDate** | **\DateTime** | The date that the holiday allowance resets. Only the day/month part of the value is relevant. | [optional] -**allowance** | **float** | The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset | [optional] -**adjustment** | **float** | Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**allowanceUsed** | **float** | [readonly] The number of days used from the allowance since last reset | [optional] -**allowanceUsedPreviousPeriod** | **float** | [readonly] The number of days used in the 12 months prior to the last reset | [optional] -**allowanceRemaining** | **float** | [readonly] The number of days remaining of the allowance until next reset | [optional] -**holidayType** | [**\SynergiTech\Staffology\Model\HolidayType**](HolidayType.md) | | [optional] -**accrueSetAmount** | **bool** | If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. | [optional] **accrueHoursPerDay** | **float** | If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued | [optional] -**showAllowanceOnPayslip** | **bool** | If true then the remaining Allowance will be shown on the employees payslip. | [optional] -**showAhpOnPayslip** | **bool** | If true then the AHP balance will be shown on the employees payslip. | [optional] -**accruePaymentInLieuRate** | **float** | The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. | [optional] +**accruePayCodeSetUniqueId** | **string** | | [optional] **accruePaymentInLieuAllGrossPay** | **bool** | Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element | [optional] **accruePaymentInLieuPayAutomatically** | **bool** | Set to true if you want employees to be automatically paid any outstanding holiday pay | [optional] -**accruePayCodeSetUniqueId** | **string** | | [optional] -**maximumAccruePeriod** | **float** | The maximum number of hours capable of being accrued in a single period | [optional] -**holidayAccrualBasis** | [**\SynergiTech\Staffology\Model\HolidayAccrual**](HolidayAccrual.md) | | [optional] -**holidayAccrualDefaultRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] -**occupationalSicknessUniqueId** | **string** | | [optional] -**accruedPaymentLiability** | **float** | [readonly] The total accrued payments for this employee over the lifetime of their employment so far | [optional] -**accruedPaymentAdjustment** | **float** | Any manual adjustment to the total accrued | [optional] -**accruedPaymentPaid** | **float** | [readonly] The Total amount paid to this employee in lieu of holidays | [optional] -**accruedPaymentBalance** | **float** | [readonly] The balance of what is owed to this employee in lieu of holidays | [optional] [readonly] -**accruedHoursAmount** | **float** | [readonly] The total accrued hours for this employee over the lifetime of their employment so far | [optional] +**accruePaymentInLieuRate** | **float** | The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. | [optional] +**accrueSetAmount** | **bool** | If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. | [optional] **accruedHoursAdjustment** | **float** | Any manual adjustment to the total hours accrued | [optional] -**accruedHoursPaid** | **float** | [readonly] The Total amount of hours paid to this employee in lieu of holidays | [optional] +**accruedHoursAmount** | **float** | [readonly] The total accrued hours for this employee over the lifetime of their employment so far | [optional] **accruedHoursAmountLastPeriod** | **float** | [readonly] The total accrued hours for this employee in the last pay period | [optional] -**paidHoursAmountLastPeriod** | **float** | [readonly] The number of hours paid against the pay code | [optional] **accruedHoursBalance** | **float** | [readonly] The balance of hours owed to this employee in lieu of holidays | [optional] +**accruedHoursPaid** | **float** | [readonly] The Total amount of hours paid to this employee in lieu of holidays | [optional] +**accruedPaymentAdjustment** | **float** | Any manual adjustment to the total accrued | [optional] +**accruedPaymentBalance** | **float** | [readonly] The balance of what is owed to this employee in lieu of holidays | [optional] [readonly] +**accruedPaymentLiability** | **float** | [readonly] The total accrued payments for this employee over the lifetime of their employment so far | [optional] +**accruedPaymentPaid** | **float** | [readonly] The Total amount paid to this employee in lieu of holidays | [optional] +**adjustment** | **float** | Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] **aggregatedServiceDate** | **\DateTime** | | [optional] -**useAggregatedServiceDate** | **bool** | | [optional] -**useDefaultHolidayAccrualDefaultRateType** | **bool** | If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. | [optional] -**unauthorisedLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**allowance** | **float** | The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset | [optional] +**allowanceRemaining** | **float** | [readonly] The number of days remaining of the allowance until next reset | [optional] +**allowanceResetDate** | **\DateTime** | The date that the holiday allowance resets. Only the day/month part of the value is relevant. | [optional] +**allowanceUsed** | **float** | [readonly] The number of days used from the allowance since last reset | [optional] +**allowanceUsedPreviousPeriod** | **float** | [readonly] The number of days used in the 12 months prior to the last reset | [optional] +**bereavementLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**holidayAccrualBasis** | [**\SynergiTech\Staffology\Model\HolidayAccrual**](HolidayAccrual.md) | | [optional] +**holidayAccrualDefaultRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] **holidayLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] -**sickLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**holidayType** | [**\SynergiTech\Staffology\Model\HolidayType**](HolidayType.md) | | [optional] +**maximumAccruePeriod** | **float** | The maximum number of hours capable of being accrued in a single period | [optional] +**occupationalSicknessUniqueId** | **string** | | [optional] +**paidHoursAmountLastPeriod** | **float** | [readonly] The number of hours paid against the pay code | [optional] **parentalLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] -**bereavementLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**showAhpOnPayslip** | **bool** | If true then the AHP balance will be shown on the employees payslip. | [optional] +**showAllowanceOnPayslip** | **bool** | If true then the remaining Allowance will be shown on the employees payslip. | [optional] +**sickLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**unauthorisedLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**useAggregatedServiceDate** | **bool** | | [optional] +**useDefaultAccrueHoursPerDay** | **bool** | If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieu** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieuPayAutomatically** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieuRate** | **bool** | If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAllowance** | **bool** | If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) | [optional] +**useDefaultAllowanceResetDate** | **bool** | If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultHolidayAccrualBasis** | **bool** | If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultHolidayAccrualDefaultRateType** | **bool** | If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. | [optional] +**useDefaultHolidayType** | **bool** | If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultMaximumAccruePeriod** | **bool** | If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployerRequest.md b/docs/Model/ContractEmployerRequest.md index e800080..8ca4c93 100644 --- a/docs/Model/ContractEmployerRequest.md +++ b/docs/Model/ContractEmployerRequest.md @@ -4,58 +4,60 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**accruePayCodeSetUniqueId** | **string** | | [optional] **address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] -**bankDetails** | [**\SynergiTech\Staffology\Model\ContractBankDetails**](ContractBankDetails.md) | | [optional] -**defaultPayOptions** | [**\SynergiTech\Staffology\Model\ContractPayOptionsRequest**](ContractPayOptionsRequest.md) | | [optional] -**hmrcDetails** | [**\SynergiTech\Staffology\Model\ContractHmrcDetailsRequest**](ContractHmrcDetailsRequest.md) | | [optional] -**defaultPension** | [**\SynergiTech\Staffology\Model\ContractPensionSelectionRequest**](ContractPensionSelectionRequest.md) | | [optional] -**rtiSubmissionSettings** | [**\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsRequest**](ContractRtiSubmissionSettingsRequest.md) | | [optional] -**leaveSettings** | [**\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsRequest**](ContractEmployerLeaveSettingsRequest.md) | | [optional] -**settings** | [**\SynergiTech\Staffology\Model\ContractEmployerSettingsRequest**](ContractEmployerSettingsRequest.md) | | [optional] -**umbrellaSettings** | [**\SynergiTech\Staffology\Model\ContractUmbrellaSettingsRequest**](ContractUmbrellaSettingsRequest.md) | | [optional] -**autoEnrolmentSettings** | [**\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsRequest**](ContractAutoEnrolmentSettingsRequest.md) | | [optional] -**id** | **string** | | [optional] -**name** | **string** | | [optional] -**sourceSystemId** | **string** | [readonly] Can only be given a value when the employer is created. It can then never be changed. Used by external systems so they can store an immutable reference | [optional] -**crn** | **string** | Company Registration Number | [optional] -**logoUrl** | **string** | | [optional] -**logoSasUrl** | **string** | | [optional] **alternativeId** | **string** | | [optional] -**bankPaymentsCsvFormat** | [**\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat**](BankPaymentInstructionsCsvFormat.md) | | [optional] -**bacsServiceUserNumber** | **string** | | [optional] +**archived** | **bool** | A flag to indicate whather or not the employer is Archived, ie no longer actively used | [optional] +**autoEnrolmentSettings** | [**\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsRequest**](ContractAutoEnrolmentSettingsRequest.md) | | [optional] +**backPayEnabled** | **bool** | | [optional] **bacsBureauNumber** | **string** | | [optional] -**rejectInvalidBankDetails** | **bool** | | [optional] -**bankPaymentsReferenceFormat** | **string** | | [optional] **bacsIncludeAEO** | **bool** | | [optional] **bacsIncludeDeductions** | **bool** | | [optional] **bacsIncludeHmrc** | **bool** | | [optional] **bacsIncludePensions** | **bool** | | [optional] -**useTenantRtiSubmissionSettings** | **bool** | If the Tenant for this employer has Bureau Features enabled then they can set RtiSubmissionSettings to be used across multiple employers. If this is set to true then those settings will be used instead of any set at the Employer level | [optional] -**accruePayCodeSetUniqueId** | **string** | | [optional] -**employeeCount** | **int** | [readonly] The number of Employees this Employer has, including CIS Subcontractors. | [optional] -**subcontractorCount** | **int** | [readonly] The number of CIS Subcontractors this Employer has. | [optional] -**startYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**currentYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**supportAccessEnabled** | **bool** | If set to true then the support team can access this employer to help resolve support queries | [optional] -**archived** | **bool** | A flag to indicate whather or not the employer is Archived, ie no longer actively used | [optional] +**bacsServiceUserNumber** | **string** | | [optional] +**bankDetails** | [**\SynergiTech\Staffology\Model\ContractSharedBankDetails**](ContractSharedBankDetails.md) | | [optional] +**bankPaymentsCsvFormat** | [**\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat**](BankPaymentInstructionsCsvFormat.md) | | [optional] +**bankPaymentsReferenceFormat** | **string** | | [optional] +**bereavementLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**betaFeatures** | [**\SynergiTech\Staffology\Model\EmployerBetaFeatures**](EmployerBetaFeatures.md) | | [optional] **canUseBureauFeatures** | **bool** | | [optional] -**multiRoleEnabled** | **bool** | | [optional] +**costCentreJournalOverridesEnabled** | **bool** | Enables the journal overrides for cost centre, if set to true. | [optional] +**crn** | **string** | Company Registration Number | [optional] +**currentYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**defaultPayOptions** | [**\SynergiTech\Staffology\Model\ContractPayOptionsRequest**](ContractPayOptionsRequest.md) | | [optional] +**defaultPension** | [**\SynergiTech\Staffology\Model\ContractPensionSelectionRequest**](ContractPensionSelectionRequest.md) | | [optional] +**departmentJournalOverridesEnabled** | **bool** | Enables the journal overrides for departments, if set to true. | [optional] +**displayName** | **string** | | [optional] **educationPayrollEnabled** | **bool** | | [optional] **effectiveDateWorkingPatternsEnabled** | **bool** | | [optional] -**backPayEnabled** | **bool** | | [optional] -**displayName** | **string** | | [optional] -**isOptedInToEvc** | **bool** | [readonly] Indicates whether or not the Employer is opted in to the Employee Verification Programme. Value can only be changed by its dedicated API end point. | [optional] +**employeeCount** | **int** | [readonly] The number of Employees this Employer has, including CIS Subcontractors. | [optional] **evcId** | **string** | If set then this will be used as the Employer ID sent to EVC in place of the standard EmployerId. | [optional] +**hmrcDetails** | [**\SynergiTech\Staffology\Model\ContractHmrcDetailsRequest**](ContractHmrcDetailsRequest.md) | | [optional] **holidayAccrualBasis** | [**\SynergiTech\Staffology\Model\HolidayAccrual**](HolidayAccrual.md) | | [optional] **holidayAccrualDefaultRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] +**holidayLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**id** | **string** | | [optional] +**isOptedInToEvc** | **bool** | [readonly] Indicates whether or not the Employer is opted in to the Employee Verification Programme. Value can only be changed by its dedicated API end point. | [optional] +**leaveSettings** | [**\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsRequest**](ContractEmployerLeaveSettingsRequest.md) | | [optional] +**logoSasUrl** | **string** | | [optional] +**logoUrl** | **string** | | [optional] **mfaEnabled** | **bool** | if set to true requires all users to setup MFA support queries | [optional] -**departmentJournalOverridesEnabled** | **bool** | Enables the journal overrides for departments, if set to true. | [optional] -**costCentreJournalOverridesEnabled** | **bool** | Enables the journal overrides for cost centre, if set to true. | [optional] +**multiRoleEnabled** | **bool** | | [optional] +**name** | **string** | | [optional] +**parentalLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**rejectInvalidBankDetails** | **bool** | | [optional] +**rtiSubmissionSettings** | [**\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsRequest**](ContractRtiSubmissionSettingsRequest.md) | | [optional] +**settings** | [**\SynergiTech\Staffology\Model\ContractEmployerSettingsRequest**](ContractEmployerSettingsRequest.md) | | [optional] **settingsSortPayrollNumbersAlphanumerically** | **bool** | Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied | [optional] -**unauthorisedLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] -**holidayLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] **sickLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] -**parentalLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] -**bereavementLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**sourceSystemId** | **string** | [readonly] Can only be given a value when the employer is created. It can then never be changed. Used by external systems so they can store an immutable reference | [optional] +**startYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**subcontractorCount** | **int** | [readonly] The number of CIS Subcontractors this Employer has. | [optional] +**supportAccessEnabled** | **bool** | [Deprecated] If set to true then the support team can access this employer to help resolve support queries. If SupportAccessExpires is not provided support access will be turned off after 30 days. | [optional] +**supportAccessExpires** | **\DateTime** | The date and time when the support access expires | [optional] +**umbrellaSettings** | [**\SynergiTech\Staffology\Model\ContractUmbrellaSettingsRequest**](ContractUmbrellaSettingsRequest.md) | | [optional] +**unauthorisedLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**useTenantRtiSubmissionSettings** | **bool** | If the Tenant for this employer has Bureau Features enabled then they can set RtiSubmissionSettings to be used across multiple employers. If this is set to true then those settings will be used instead of any set at the Employer level | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployerResponse.md b/docs/Model/ContractEmployerResponse.md index 5498e9e..e348547 100644 --- a/docs/Model/ContractEmployerResponse.md +++ b/docs/Model/ContractEmployerResponse.md @@ -4,58 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**accruePayCodeSetUniqueId** | **string** | | [optional] **address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] -**bankDetails** | [**\SynergiTech\Staffology\Model\ContractBankDetails**](ContractBankDetails.md) | | [optional] -**defaultPayOptions** | [**\SynergiTech\Staffology\Model\ContractPayOptionsResponse**](ContractPayOptionsResponse.md) | | [optional] -**hmrcDetails** | [**\SynergiTech\Staffology\Model\ContractHmrcDetailsResponse**](ContractHmrcDetailsResponse.md) | | [optional] -**defaultPension** | [**\SynergiTech\Staffology\Model\ContractPensionSelectionResponse**](ContractPensionSelectionResponse.md) | | [optional] -**rtiSubmissionSettings** | [**\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsResponse**](ContractRtiSubmissionSettingsResponse.md) | | [optional] -**leaveSettings** | [**\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsResponse**](ContractEmployerLeaveSettingsResponse.md) | | [optional] -**settings** | [**\SynergiTech\Staffology\Model\ContractEmployerSettingsResponse**](ContractEmployerSettingsResponse.md) | | [optional] -**umbrellaSettings** | [**\SynergiTech\Staffology\Model\ContractUmbrellaSettingsResponse**](ContractUmbrellaSettingsResponse.md) | | [optional] -**autoEnrolmentSettings** | [**\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsResponse**](ContractAutoEnrolmentSettingsResponse.md) | | [optional] -**id** | **string** | | [optional] -**name** | **string** | | [optional] -**sourceSystemId** | **string** | [readonly] Can only be given a value when the employer is created. It can then never be changed. Used by external systems so they can store an immutable reference | [optional] -**crn** | **string** | Company Registration Number | [optional] -**logoUrl** | **string** | | [optional] -**logoSasUrl** | **string** | | [optional] **alternativeId** | **string** | | [optional] -**bankPaymentsCsvFormat** | [**\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat**](BankPaymentInstructionsCsvFormat.md) | | [optional] -**bacsServiceUserNumber** | **string** | | [optional] +**archived** | **bool** | A flag to indicate whather or not the employer is Archived, ie no longer actively used | [optional] +**autoEnrolmentSettings** | [**\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsResponse**](ContractAutoEnrolmentSettingsResponse.md) | | [optional] +**backPayEnabled** | **bool** | | [optional] **bacsBureauNumber** | **string** | | [optional] -**rejectInvalidBankDetails** | **bool** | | [optional] -**bankPaymentsReferenceFormat** | **string** | | [optional] **bacsIncludeAEO** | **bool** | | [optional] **bacsIncludeDeductions** | **bool** | | [optional] **bacsIncludeHmrc** | **bool** | | [optional] **bacsIncludePensions** | **bool** | | [optional] -**useTenantRtiSubmissionSettings** | **bool** | If the Tenant for this employer has Bureau Features enabled then they can set RtiSubmissionSettings to be used across multiple employers. If this is set to true then those settings will be used instead of any set at the Employer level | [optional] -**accruePayCodeSetUniqueId** | **string** | | [optional] -**employeeCount** | **int** | The default LeaveSettings. Only the Allowance and AllowanceResetDate fields are used. | [optional] -**subcontractorCount** | **int** | [readonly] The number of CIS Subcontractors this Employer has. | [optional] -**startYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**currentYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**supportAccessEnabled** | **bool** | If set to true then the support team can access this employer to help resolve support queries | [optional] -**archived** | **bool** | A flag to indicate whather or not the employer is Archived, ie no longer actively used | [optional] +**bacsServiceUserNumber** | **string** | | [optional] +**bankDetails** | [**\SynergiTech\Staffology\Model\ContractSharedBankDetails**](ContractSharedBankDetails.md) | | [optional] +**bankPaymentsCsvFormat** | [**\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat**](BankPaymentInstructionsCsvFormat.md) | | [optional] +**bankPaymentsReferenceFormat** | **string** | | [optional] +**bereavementLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**betaFeatures** | [**\SynergiTech\Staffology\Model\EmployerBetaFeatures**](EmployerBetaFeatures.md) | | [optional] **canUseBureauFeatures** | **bool** | | [optional] -**multiRoleEnabled** | **bool** | | [optional] +**canUsePremiumConnectors** | **bool** | Indicates whether the employer has permission to use the premium connectors feature. | [optional] +**costCentreJournalOverridesEnabled** | **bool** | Enables the journal overrides for cost centre, if set to true. | [optional] +**crn** | **string** | Company Registration Number | [optional] +**currentYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**defaultPayOptions** | [**\SynergiTech\Staffology\Model\ContractPayOptionsResponse**](ContractPayOptionsResponse.md) | | [optional] +**defaultPension** | [**\SynergiTech\Staffology\Model\ContractPensionSelectionResponse**](ContractPensionSelectionResponse.md) | | [optional] +**departmentJournalOverridesEnabled** | **bool** | Enables the journal overrides for departments, if set to true. | [optional] +**displayName** | **string** | | [optional] **educationPayrollEnabled** | **bool** | | [optional] **effectiveDateWorkingPatternsEnabled** | **bool** | | [optional] -**backPayEnabled** | **bool** | | [optional] -**displayName** | **string** | | [optional] -**isOptedInToEvc** | **bool** | [readonly] Indicates whether or not the Employer is opted in to the Employee Verification Programme. Value can only be changed by its dedicated API end point. | [optional] +**employeeCount** | **int** | The default LeaveSettings. Only the Allowance and AllowanceResetDate fields are used. | [optional] **evcId** | **string** | If set then this will be used as the Employer ID sent to EVC in place of the standard EmployerId. | [optional] +**hmrcDetails** | [**\SynergiTech\Staffology\Model\ContractHmrcDetailsResponse**](ContractHmrcDetailsResponse.md) | | [optional] **holidayAccrualBasis** | [**\SynergiTech\Staffology\Model\HolidayAccrual**](HolidayAccrual.md) | | [optional] **holidayAccrualDefaultRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] +**holidayLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**id** | **string** | | [optional] +**isOptedInToEvc** | **bool** | [readonly] Indicates whether or not the Employer is opted in to the Employee Verification Programme. Value can only be changed by its dedicated API end point. | [optional] +**leaveSettings** | [**\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsResponse**](ContractEmployerLeaveSettingsResponse.md) | | [optional] +**logoSasUrl** | **string** | | [optional] +**logoUrl** | **string** | | [optional] **mfaEnabled** | **bool** | if set to true requires all users to setup MFA support queries | [optional] -**departmentJournalOverridesEnabled** | **bool** | Enables the journal overrides for departments, if set to true. | [optional] -**costCentreJournalOverridesEnabled** | **bool** | Enables the journal overrides for cost centre, if set to true. | [optional] +**multiRoleEnabled** | **bool** | | [optional] +**name** | **string** | | [optional] +**parentalLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**rejectInvalidBankDetails** | **bool** | | [optional] +**rtiSubmissionSettings** | [**\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsResponse**](ContractRtiSubmissionSettingsResponse.md) | | [optional] +**settings** | [**\SynergiTech\Staffology\Model\ContractEmployerSettingsResponse**](ContractEmployerSettingsResponse.md) | | [optional] **settingsSortPayrollNumbersAlphanumerically** | **bool** | Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied | [optional] -**unauthorisedLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] -**holidayLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] **sickLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] -**parentalLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] -**bereavementLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**sourceSystemId** | **string** | [readonly] Can only be given a value when the employer is created. It can then never be changed. Used by external systems so they can store an immutable reference | [optional] +**startYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**subcontractorCount** | **int** | [readonly] The number of CIS Subcontractors this Employer has. | [optional] +**supportAccessEnabled** | **bool** | [Deprecated] If set to true then the support team can access this employer to help resolve support queries. If SupportAccessExpires is not provided support access will be turned off after 30 days. | [optional] +**supportAccessExpires** | **\DateTime** | The date and time when the support access expires | [optional] +**umbrellaSettings** | [**\SynergiTech\Staffology\Model\ContractUmbrellaSettingsResponse**](ContractUmbrellaSettingsResponse.md) | | [optional] +**unauthorisedLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**useTenantRtiSubmissionSettings** | **bool** | If the Tenant for this employer has Bureau Features enabled then they can set RtiSubmissionSettings to be used across multiple employers. If this is set to true then those settings will be used instead of any set at the Employer level | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployerSettingsRequest.md b/docs/Model/ContractEmployerSettingsRequest.md index 056e3e4..76fcbea 100644 --- a/docs/Model/ContractEmployerSettingsRequest.md +++ b/docs/Model/ContractEmployerSettingsRequest.md @@ -5,19 +5,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **allowNegativePay** | **bool** | | [optional] -**manualStatutoryPayLinesEnabled** | **bool** | | [optional] -**mergeMatchingNominalsEnabled** | **bool** | | [optional] **autoCalcBackPayForNewStarters** | **bool** | | [optional] -**payCodeValidationEnabled** | **bool** | | [optional] **calculateEffectiveDateSalaryChanges** | **bool** | | [optional] -**groupPayLinesEnabled** | **bool** | A flag to indicate whether paylines should be grouped. The grouping is done based on the following PayLine properties: Rate, Multiplier, Code, Description and RoleId | [optional] **contractedWeeks** | **float** | The amount of weeks an employee works, utilise for employees who aren't working full time. This value is the default which can be inherited when creating/updating a WorkingPattern. | [optional] -**fullTimeContractedWeeks** | **float** | The amount of weeks an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. | [optional] -**fullTimeContractedHours** | **float** | The amount of hours an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. | [optional] **disabledPayRunWarningsList** | [**\SynergiTech\Staffology\Model\PayRunEntryWarningType[]**](PayRunEntryWarningType.md) | Pay run warnings that the user has opted to ignore. | [optional] +**fullTimeContractedHours** | **float** | The amount of hours an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. | [optional] +**fullTimeContractedWeeks** | **float** | The amount of weeks an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. | [optional] +**groupPayLinesEnabled** | **bool** | A flag to indicate whether paylines should be grouped. The grouping is done based on the following PayLine properties: Rate, Multiplier, Code, Description and RoleId | [optional] **journalCsvFormat** | [**\SynergiTech\Staffology\Model\JournalCsvFormat**](JournalCsvFormat.md) | | [optional] -**preferAsyncPayrunApiCalls** | **bool** | This setting is only available temporarily and is only setable by users with access to beta features enabled. If set to true the the web applicaiton will use new async API calls for managing payruns | [optional] +**manualStatutoryPayLinesEnabled** | **bool** | | [optional] +**mergeMatchingNominalsEnabled** | **bool** | | [optional] **nominalMappingsEnabled** | **bool** | Enables the nominal mappings(Custom Codes,System Codes,Control Codes,Employer Codes) for the employer, if set to true. | [optional] +**payCodeValidationEnabled** | **bool** | | [optional] +**preferAsyncPayrunApiCalls** | **bool** | This setting is only available temporarily and is only setable by users with access to beta features enabled. If set to true the the web applicaiton will use new async API calls for managing payruns | [optional] **sortPayrollNumbersAlphanumerically** | **bool** | Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmployerSettingsResponse.md b/docs/Model/ContractEmployerSettingsResponse.md index 6196d21..431d374 100644 --- a/docs/Model/ContractEmployerSettingsResponse.md +++ b/docs/Model/ContractEmployerSettingsResponse.md @@ -5,20 +5,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **allowNegativePay** | **bool** | | [optional] -**manualStatutoryPayLinesEnabled** | **bool** | | [optional] -**mergeMatchingNominalsEnabled** | **bool** | | [optional] **autoCalcBackPayForNewStarters** | **bool** | | [optional] -**payCodeValidationEnabled** | **bool** | | [optional] **calculateEffectiveDateSalaryChanges** | **bool** | | [optional] -**groupPayLinesEnabled** | **bool** | A flag to indicate whether paylines should be grouped. The grouping is done based on the following PayLine properties: Rate, Multiplier, Code, Description and RoleId | [optional] **contractedWeeks** | **float** | The amount of weeks an employee works, utilise for employees who aren't working full time. This value is the default which can be inherited when creating/updating a WorkingPattern. | [optional] -**fullTimeContractedWeeks** | **float** | The amount of weeks an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. | [optional] -**fullTimeContractedHours** | **float** | The amount of hours an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. | [optional] **disabledPayRunWarningsBitmask** | **int** | | [optional] **disabledPayRunWarningsList** | [**\SynergiTech\Staffology\Model\PayRunEntryWarningType[]**](PayRunEntryWarningType.md) | Pay run warnings that the user has opted to ignore. | [optional] +**fullTimeContractedHours** | **float** | The amount of hours an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. | [optional] +**fullTimeContractedWeeks** | **float** | The amount of weeks an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. | [optional] +**groupPayLinesEnabled** | **bool** | A flag to indicate whether paylines should be grouped. The grouping is done based on the following PayLine properties: Rate, Multiplier, Code, Description and RoleId | [optional] **journalCsvFormat** | [**\SynergiTech\Staffology\Model\JournalCsvFormat**](JournalCsvFormat.md) | | [optional] -**preferAsyncPayrunApiCalls** | **bool** | This setting is only available temporarily and is only setable by users with access to beta features enabled. If set to true the the web applicaiton will use new async API calls for managing payruns | [optional] +**manualStatutoryPayLinesEnabled** | **bool** | | [optional] +**mergeMatchingNominalsEnabled** | **bool** | | [optional] **nominalMappingsEnabled** | **bool** | Enables the nominal mappings(Custom Codes,System Codes,Control Codes,Employer Codes) for the employer, if set to true. | [optional] +**payCodeValidationEnabled** | **bool** | | [optional] +**preferAsyncPayrunApiCalls** | **bool** | This setting is only available temporarily and is only setable by users with access to beta features enabled. If set to true the the web applicaiton will use new async API calls for managing payruns | [optional] **sortPayrollNumbersAlphanumerically** | **bool** | Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmploymentDetailsRequest.md b/docs/Model/ContractEmploymentDetailsRequest.md index 962dcaf..7613acd 100644 --- a/docs/Model/ContractEmploymentDetailsRequest.md +++ b/docs/Model/ContractEmploymentDetailsRequest.md @@ -4,33 +4,33 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**apprenticeshipEndDate** | **\DateTime** | | [optional] +**apprenticeshipStartDate** | **\DateTime** | | [optional] **cis** | [**\SynergiTech\Staffology\Model\ContractCisDetailsRequest**](ContractCisDetailsRequest.md) | | [optional] -**department** | [**\SynergiTech\Staffology\Model\ContractDepartmentRequest**](ContractDepartmentRequest.md) | | [optional] **cisSubContractor** | **bool** | Set to True if this Employee is a CIS Subcontractor. The ```Cis``` property contains further information | [optional] -**payrollCode** | **string** | The Employees Payroll Code. Must be unique within the Employer. | -**jobTitle** | **string** | Job Title of Primary role of the Employee | [optional] -**workplacePostcode** | **string** | Set the workplace postcode, ensuring it is no longer than 10 characters. | [optional] -**onHold** | **bool** | Set to true to temporarily exclude the employee from payruns | [optional] -**onFurlough** | **bool** | Set to true if the employee is on furlough. | [optional] -**furloughStart** | **\DateTime** | Furlough Start Date. | [optional] -**furloughEnd** | **\DateTime** | Furlough End Date. | [optional] +**continuousEmploymentDate** | **\DateTime** | Date of continuous employment | [optional] +**department** | [**\SynergiTech\Staffology\Model\ContractDepartmentRequest**](ContractDepartmentRequest.md) | | [optional] +**directorshipDetails** | [**\SynergiTech\Staffology\Model\ContractDirectorshipDetails**](ContractDirectorshipDetails.md) | | [optional] +**forcePreviousPayrollCode** | **string** | If this property has a non-empty value then a change of Payroll code will be declared on the next FPS. | [optional] **furloughCalculationBasis** | [**\SynergiTech\Staffology\Model\FurloughCalculationBasis**](FurloughCalculationBasis.md) | | [optional] **furloughCalculationBasisAmount** | **float** | | [optional] -**partialFurlough** | **bool** | Set to true if the employee is partially furloughed. | [optional] +**furloughEnd** | **\DateTime** | Furlough End Date. | [optional] **furloughHoursNormallyWorked** | **float** | | [optional] **furloughHoursOnFurlough** | **float** | | [optional] +**furloughStart** | **\DateTime** | Furlough Start Date. | [optional] **isApprentice** | **bool** | Set to True if this Employee is an apprentice. This affects the calculations for National Minimum Wage | [optional] -**apprenticeshipStartDate** | **\DateTime** | | [optional] -**apprenticeshipEndDate** | **\DateTime** | | [optional] -**workingPattern** | **string** | Used when calculating payments for Leave. If null then the default Working Pattern is used | [optional] -**forcePreviousPayrollCode** | **string** | If this property has a non-empty value then a change of Payroll code will be declared on the next FPS. | [optional] -**starterDetails** | [**\SynergiTech\Staffology\Model\ContractStarterDetails**](ContractStarterDetails.md) | | [optional] -**directorshipDetails** | [**\SynergiTech\Staffology\Model\ContractDirectorshipDetails**](ContractDirectorshipDetails.md) | | [optional] -**leaverDetails** | [**\SynergiTech\Staffology\Model\ContractLeaverDetails**](ContractLeaverDetails.md) | | [optional] -**roles** | [**\SynergiTech\Staffology\Model\ContractEmployeeRoleItem[]**](ContractEmployeeRoleItem.md) | List of Roles held by Employee | [optional] **isWorkingInFreePort** | **bool** | Flag indicating the employee is employed in a Freeport | [optional] **isWorkingInInvestmentZone** | **bool** | Flag indicating the employee is employed in an Investment Zone | [optional] +**jobTitle** | **string** | Job Title of Primary role of the Employee | [optional] +**leaverDetails** | [**\SynergiTech\Staffology\Model\ContractLeaverDetails**](ContractLeaverDetails.md) | | [optional] +**onFurlough** | **bool** | Set to true if the employee is on furlough. | [optional] +**onHold** | **bool** | Set to true to temporarily exclude the employee from payruns | [optional] +**partialFurlough** | **bool** | Set to true if the employee is partially furloughed. | [optional] +**payrollCode** | **string** | The Employees Payroll Code. Must be unique within the Employer. | +**roles** | [**\SynergiTech\Staffology\Model\ContractEmployeeRoleItem[]**](ContractEmployeeRoleItem.md) | List of Roles held by Employee | [optional] +**starterDetails** | [**\SynergiTech\Staffology\Model\ContractStarterDetails**](ContractStarterDetails.md) | | [optional] **veteranDetails** | [**\SynergiTech\Staffology\Model\ContractVeteranDetails**](ContractVeteranDetails.md) | | [optional] -**continuousEmploymentDate** | **\DateTime** | Date of continuous employment | [optional] +**workingPattern** | **string** | Used when calculating payments for Leave. If null then the default Working Pattern is used | [optional] +**workplacePostcode** | **string** | Set the workplace postcode, ensuring it is no longer than 10 characters. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractEmploymentDetailsResponse.md b/docs/Model/ContractEmploymentDetailsResponse.md index 269ba11..6da1ea1 100644 --- a/docs/Model/ContractEmploymentDetailsResponse.md +++ b/docs/Model/ContractEmploymentDetailsResponse.md @@ -4,34 +4,34 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**apprenticeshipEndDate** | **\DateTime** | | [optional] +**apprenticeshipStartDate** | **\DateTime** | | [optional] **cis** | [**\SynergiTech\Staffology\Model\ContractCisDetailsResponse**](ContractCisDetailsResponse.md) | | [optional] -**department** | [**\SynergiTech\Staffology\Model\ContractDepartmentResponse**](ContractDepartmentResponse.md) | | [optional] -**includeSecondedInfoOnStarter** | **bool** | | [optional] **cisSubContractor** | **bool** | Set to True if this Employee is a CIS Subcontractor. The ```Cis``` property contains further information | [optional] -**payrollCode** | **string** | The Employees Payroll Code. Must be unique within the Employer. | -**jobTitle** | **string** | Job Title of Primary role of the Employee | [optional] -**workplacePostcode** | **string** | Set the workplace postcode, ensuring it is no longer than 10 characters. | [optional] -**onHold** | **bool** | Set to true to temporarily exclude the employee from payruns | [optional] -**onFurlough** | **bool** | Set to true if the employee is on furlough. | [optional] -**furloughStart** | **\DateTime** | Furlough Start Date. | [optional] -**furloughEnd** | **\DateTime** | Furlough End Date. | [optional] +**continuousEmploymentDate** | **\DateTime** | Date of continuous employment | [optional] +**department** | [**\SynergiTech\Staffology\Model\ContractDepartmentResponse**](ContractDepartmentResponse.md) | | [optional] +**directorshipDetails** | [**\SynergiTech\Staffology\Model\ContractDirectorshipDetails**](ContractDirectorshipDetails.md) | | [optional] +**forcePreviousPayrollCode** | **string** | If this property has a non-empty value then a change of Payroll code will be declared on the next FPS. | [optional] **furloughCalculationBasis** | [**\SynergiTech\Staffology\Model\FurloughCalculationBasis**](FurloughCalculationBasis.md) | | [optional] **furloughCalculationBasisAmount** | **float** | | [optional] -**partialFurlough** | **bool** | Set to true if the employee is partially furloughed. | [optional] +**furloughEnd** | **\DateTime** | Furlough End Date. | [optional] **furloughHoursNormallyWorked** | **float** | | [optional] **furloughHoursOnFurlough** | **float** | | [optional] +**furloughStart** | **\DateTime** | Furlough Start Date. | [optional] +**includeSecondedInfoOnStarter** | **bool** | | [optional] **isApprentice** | **bool** | Set to True if this Employee is an apprentice. This affects the calculations for National Minimum Wage | [optional] -**apprenticeshipStartDate** | **\DateTime** | | [optional] -**apprenticeshipEndDate** | **\DateTime** | | [optional] -**workingPattern** | **string** | Used when calculating payments for Leave. If null then the default Working Pattern is used | [optional] -**forcePreviousPayrollCode** | **string** | If this property has a non-empty value then a change of Payroll code will be declared on the next FPS. | [optional] -**starterDetails** | [**\SynergiTech\Staffology\Model\ContractStarterDetails**](ContractStarterDetails.md) | | [optional] -**directorshipDetails** | [**\SynergiTech\Staffology\Model\ContractDirectorshipDetails**](ContractDirectorshipDetails.md) | | [optional] -**leaverDetails** | [**\SynergiTech\Staffology\Model\ContractLeaverDetails**](ContractLeaverDetails.md) | | [optional] -**roles** | [**\SynergiTech\Staffology\Model\ContractEmployeeRoleItem[]**](ContractEmployeeRoleItem.md) | List of Roles held by Employee | [optional] **isWorkingInFreePort** | **bool** | Flag indicating the employee is employed in a Freeport | [optional] **isWorkingInInvestmentZone** | **bool** | Flag indicating the employee is employed in an Investment Zone | [optional] +**jobTitle** | **string** | Job Title of Primary role of the Employee | [optional] +**leaverDetails** | [**\SynergiTech\Staffology\Model\ContractLeaverDetails**](ContractLeaverDetails.md) | | [optional] +**onFurlough** | **bool** | Set to true if the employee is on furlough. | [optional] +**onHold** | **bool** | Set to true to temporarily exclude the employee from payruns | [optional] +**partialFurlough** | **bool** | Set to true if the employee is partially furloughed. | [optional] +**payrollCode** | **string** | The Employees Payroll Code. Must be unique within the Employer. | +**roles** | [**\SynergiTech\Staffology\Model\ContractEmployeeRoleItem[]**](ContractEmployeeRoleItem.md) | List of Roles held by Employee | [optional] +**starterDetails** | [**\SynergiTech\Staffology\Model\ContractStarterDetails**](ContractStarterDetails.md) | | [optional] **veteranDetails** | [**\SynergiTech\Staffology\Model\ContractVeteranDetails**](ContractVeteranDetails.md) | | [optional] -**continuousEmploymentDate** | **\DateTime** | Date of continuous employment | [optional] +**workingPattern** | **string** | Used when calculating payments for Leave. If null then the default Working Pattern is used | [optional] +**workplacePostcode** | **string** | Set the workplace postcode, ensuring it is no longer than 10 characters. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractFpsFields.md b/docs/Model/ContractFpsFields.md index ed199de..5507779 100644 --- a/docs/Model/ContractFpsFields.md +++ b/docs/Model/ContractFpsFields.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**offPayrollWorker** | **bool** | | [optional] -**irregularPaymentPattern** | **bool** | True if employee is currently on an irregular payment patter | [optional] -**nonIndividual** | **bool** | True if Employee's payments are being made to a body (eg, trustee, corporate organisation or personal representative) | [optional] **excludeFromRtiSubmissions** | **bool** | True if Employee is excluded from RTI submissions | [optional] **hoursNormallyWorked** | [**\SynergiTech\Staffology\Model\HoursNormallyWorked**](HoursNormallyWorked.md) | | [optional] +**irregularPaymentPattern** | **bool** | True if employee is currently on an irregular payment patter | [optional] +**nonIndividual** | **bool** | True if Employee's payments are being made to a body (eg, trustee, corporate organisation or personal representative) | [optional] +**offPayrollWorker** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractHmrcDetailsRequest.md b/docs/Model/ContractHmrcDetailsRequest.md index 84647be..defe550 100644 --- a/docs/Model/ContractHmrcDetailsRequest.md +++ b/docs/Model/ContractHmrcDetailsRequest.md @@ -4,22 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | | [optional] -**officeNumber** | **string** | | [optional] -**payeReference** | **string** | | [optional] **accountsOfficeReference** | **string** | | [optional] -**econ** | **string** | | [optional] -**utr** | **string** | | [optional] +**apprenticeshipLevy** | **bool** | | [optional] +**apprenticeshipLevyAllowance** | **float** | | [optional] +**carryForwardUnpaidLiabilities** | **bool** | If set to true then any unpaid amounts from previous periods will be brought forward to work out the liability for the current period. You'd set this to false if you don't want to track payments. | [optional] **coTax** | **string** | | [optional] +**econ** | **string** | | [optional] **employmentAllowance** | **bool** | | [optional] **employmentAllowanceMaxClaim** | **float** | You might reduce this from the default if you've made/are making a claim in another system | [optional] -**smallEmployersRelief** | **bool** | | [optional] -**apprenticeshipLevy** | **bool** | | [optional] -**apprenticeshipLevyAllowance** | **float** | | [optional] -**quarterlyPaymentSchedule** | **bool** | Set to true if the employer pays HMRC on a quarterly schedule. A value of false implies a monthly schedule. <b>Warning:</b> Changing this value after starting PayRuns will delete any existing payments or adjustments you may have entered. | [optional] +**id** | **string** | | [optional] **includeEmploymentAllowanceOnMonthlyJournal** | **bool** | If the employer is not on a QuarterlyPaymentSchedule and is claiming EmploymentAllowance, then set this to true to include a line for Employment Allowance on the journal for the monthly schedule. | [optional] -**carryForwardUnpaidLiabilities** | **bool** | If set to true then any unpaid amounts from previous periods will be brought forward to work out the liability for the current period. You'd set this to false if you don't want to track payments. | [optional] -**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] +**officeNumber** | **string** | | [optional] +**payeReference** | **string** | | [optional] **paymentDateDayOfMonth** | **int** | | [optional] +**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] +**quarterlyPaymentSchedule** | **bool** | Set to true if the employer pays HMRC on a quarterly schedule. A value of false implies a monthly schedule. <b>Warning:</b> Changing this value after starting PayRuns will delete any existing payments or adjustments you may have entered. | [optional] +**smallEmployersRelief** | **bool** | | [optional] +**utr** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractHmrcDetailsResponse.md b/docs/Model/ContractHmrcDetailsResponse.md index 45346ce..f69cd6a 100644 --- a/docs/Model/ContractHmrcDetailsResponse.md +++ b/docs/Model/ContractHmrcDetailsResponse.md @@ -4,22 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | | [optional] -**officeNumber** | **string** | | [optional] -**payeReference** | **string** | | [optional] **accountsOfficeReference** | **string** | | [optional] -**econ** | **string** | | [optional] -**utr** | **string** | | [optional] +**apprenticeshipLevy** | **bool** | | [optional] +**apprenticeshipLevyAllowance** | **float** | | [optional] +**carryForwardUnpaidLiabilities** | **bool** | If set to true then any unpaid amounts from previous periods will be brought forward to work out the liability for the current period. You'd set this to false if you don't want to track payments. | [optional] **coTax** | **string** | | [optional] +**econ** | **string** | | [optional] **employmentAllowance** | **bool** | | [optional] **employmentAllowanceMaxClaim** | **float** | You might reduce this from the default if you've made/are making a claim in another system | [optional] -**smallEmployersRelief** | **bool** | | [optional] -**apprenticeshipLevy** | **bool** | | [optional] -**apprenticeshipLevyAllowance** | **float** | | [optional] -**quarterlyPaymentSchedule** | **bool** | Set to true if the employer pays HMRC on a quarterly schedule. A value of false implies a monthly schedule. <b>Warning:</b> Changing this value after starting PayRuns will delete any existing payments or adjustments you may have entered. | [optional] +**id** | **string** | | [optional] **includeEmploymentAllowanceOnMonthlyJournal** | **bool** | If the employer is not on a QuarterlyPaymentSchedule and is claiming EmploymentAllowance, then set this to true to include a line for Employment Allowance on the journal for the monthly schedule. | [optional] -**carryForwardUnpaidLiabilities** | **bool** | If set to true then any unpaid amounts from previous periods will be brought forward to work out the liability for the current period. You'd set this to false if you don't want to track payments. | [optional] -**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] +**officeNumber** | **string** | | [optional] +**payeReference** | **string** | | [optional] **paymentDateDayOfMonth** | **int** | | [optional] +**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] +**quarterlyPaymentSchedule** | **bool** | Set to true if the employer pays HMRC on a quarterly schedule. A value of false implies a monthly schedule. <b>Warning:</b> Changing this value after starting PayRuns will delete any existing payments or adjustments you may have entered. | [optional] +**smallEmployersRelief** | **bool** | | [optional] +**utr** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractHolidayEntitlementRequest.md b/docs/Model/ContractHolidayEntitlementRequest.md index fcf3275..f21b61e 100644 --- a/docs/Model/ContractHolidayEntitlementRequest.md +++ b/docs/Model/ContractHolidayEntitlementRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**effectiveDate** | **\DateTime** | PaySpine Holiday Entitlement Effective Date | **baseHolidayEntitlement** | **float** | PaySpine Base Holiday Entitlement | +**effectiveDate** | **\DateTime** | PaySpine Holiday Entitlement Effective Date | **yearsServiceEntitlementBasis** | [**\SynergiTech\Staffology\Model\PaySpineYearsServiceEntitlementBasis**](PaySpineYearsServiceEntitlementBasis.md) | | [optional] **yearsServiceEntitlements** | [**\SynergiTech\Staffology\Model\ContractYearsServiceEntitlementRequest[]**](ContractYearsServiceEntitlementRequest.md) | Holiday Entitlement Years Service Entitlements | [optional] diff --git a/docs/Model/ContractHolidayEntitlementResponse.md b/docs/Model/ContractHolidayEntitlementResponse.md index 60cad3b..f95c763 100644 --- a/docs/Model/ContractHolidayEntitlementResponse.md +++ b/docs/Model/ContractHolidayEntitlementResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uniqueId** | **string** | Unique identifier for the Holiday Entitlement | [optional] -**effectiveDate** | **\DateTime** | PaySpine Holiday Entitlement Effective Date | **baseHolidayEntitlement** | **float** | PaySpine Base Holiday Entitlement | +**effectiveDate** | **\DateTime** | PaySpine Holiday Entitlement Effective Date | +**uniqueId** | **string** | Unique identifier for the Holiday Entitlement | [optional] **yearsServiceEntitlementBasis** | [**\SynergiTech\Staffology\Model\PaySpineYearsServiceEntitlementBasis**](PaySpineYearsServiceEntitlementBasis.md) | | [optional] **yearsServiceEntitlements** | [**\SynergiTech\Staffology\Model\ContractYearsServiceEntitlementResponse[]**](ContractYearsServiceEntitlementResponse.md) | Holiday Entitlement Years Service Entitlements | [optional] diff --git a/docs/Model/ContractHolidayEntitlementUpdateRequest.md b/docs/Model/ContractHolidayEntitlementUpdateRequest.md index 2e95669..5f0267f 100644 --- a/docs/Model/ContractHolidayEntitlementUpdateRequest.md +++ b/docs/Model/ContractHolidayEntitlementUpdateRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uniqueId** | **string** | Unique identifier for the PaySpine Holiday Entitlement. | [optional] -**effectiveDate** | **\DateTime** | PaySpine Holiday Entitlement Effective Date | **baseHolidayEntitlement** | **float** | PaySpine Base Holiday Entitlement | +**effectiveDate** | **\DateTime** | PaySpine Holiday Entitlement Effective Date | +**uniqueId** | **string** | Unique identifier for the PaySpine Holiday Entitlement. | [optional] **yearsServiceEntitlementBasis** | [**\SynergiTech\Staffology\Model\PaySpineYearsServiceEntitlementBasis**](PaySpineYearsServiceEntitlementBasis.md) | | [optional] **yearsServiceEntitlements** | [**\SynergiTech\Staffology\Model\ContractYearsServiceEntitlementUpdateRequest[]**](ContractYearsServiceEntitlementUpdateRequest.md) | Holiday Entitlement Years Service Entitlements | [optional] diff --git a/docs/Model/ContractHolidaySchemeRequest.md b/docs/Model/ContractHolidaySchemeRequest.md index d1bff60..c6e0680 100644 --- a/docs/Model/ContractHolidaySchemeRequest.md +++ b/docs/Model/ContractHolidaySchemeRequest.md @@ -4,15 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Holiday scheme name | **averageCalculationWeeks** | **int** | The number of weeks that the average holiday pay calculation is to be calculated over (Default 52) | [optional] -**useOnlyPaidWeeks** | **bool** | If to go back further than the stated no of weeks for calculation if there are weeks where the employee has not been paid. (Default- True) | [optional] -**ignoreSxp** | **bool** | Option to ignore weeks where SXP payments have been paid. The calculation will then go back like above until the stated number of weeks are included in the calculation. (Default -True). | [optional] **calculationDurationUnit** | [**\SynergiTech\Staffology\Model\HolidaySchemeDurationType**](HolidaySchemeDurationType.md) | | [optional] -**useNiPay** | **bool** | If use National insurance gross taxable pay. (Default - True). | [optional] -**useWorkingPattern** | **bool** | If use the weekly hours or days as per their working pattern as the divisor for the average holiday rate. | [optional] -**payCodeSetForPayId** | **string** | the Paycode set that they want to use for the Values to enable the calculation. | [optional] +**ignoreSxp** | **bool** | Option to ignore weeks where SXP payments have been paid. The calculation will then go back like above until the stated number of weeks are included in the calculation. (Default -True). | [optional] +**name** | **string** | Holiday scheme name | +**payCodeSetForDaysId** | **string** | the Paycode set that they want to use for the Days to enable the calculation. | [optional] **payCodeSetForHoursId** | **string** | the Paycode set that they want to use for the Hours to enable the calculation. | [optional] +**payCodeSetForPayId** | **string** | the Paycode set that they want to use for the Values to enable the calculation. | [optional] **useFallbackRate** | **bool** | Indicates to use employee base hourly rate where the calculated average hourly rate is less | [optional] +**useNiPay** | **bool** | If use National insurance gross taxable pay. (Default - True). | [optional] +**useOnlyPaidWeeks** | **bool** | If to go back further than the stated no of weeks for calculation if there are weeks where the employee has not been paid. (Default- True) | [optional] +**useWorkingPattern** | **bool** | If use the weekly hours or days as per their working pattern as the divisor for the average holiday rate. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractHolidaySchemeResponse.md b/docs/Model/ContractHolidaySchemeResponse.md index 018bb13..91c4d33 100644 --- a/docs/Model/ContractHolidaySchemeResponse.md +++ b/docs/Model/ContractHolidaySchemeResponse.md @@ -4,16 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | Holiday scheme identifier | [optional] -**name** | **string** | Holiday scheme name | **averageCalculationWeeks** | **int** | The number of weeks that the average holiday pay calculation is to be calculated over (Default 52) | [optional] -**useOnlyPaidWeeks** | **bool** | If to go back further than the stated no of weeks for calculation if there are weeks where the employee has not been paid. (Default- True) | [optional] -**ignoreSxp** | **bool** | Option to ignore weeks where SXP payments have been paid. The calculation will then go back like above until the stated number of weeks are included in the calculation. (Default -True). | [optional] **calculationDurationUnit** | [**\SynergiTech\Staffology\Model\HolidaySchemeDurationType**](HolidaySchemeDurationType.md) | | [optional] -**useNiPay** | **bool** | If use National insurance gross taxable pay. (Default - True). | [optional] -**useWorkingPattern** | **bool** | If use the weekly hours or days as per their working pattern as the divisor for the average holiday rate. | [optional] -**payCodeSetForPayId** | **string** | the Paycode set that they want to use for the Values to enable the calculation. | [optional] +**id** | **string** | Holiday scheme identifier | [optional] +**ignoreSxp** | **bool** | Option to ignore weeks where SXP payments have been paid. The calculation will then go back like above until the stated number of weeks are included in the calculation. (Default -True). | [optional] +**name** | **string** | Holiday scheme name | +**payCodeSetForDaysId** | **string** | the Paycode set that they want to use for the Days to enable the calculation. | [optional] **payCodeSetForHoursId** | **string** | the Paycode set that they want to use for the Hours to enable the calculation. | [optional] +**payCodeSetForPayId** | **string** | the Paycode set that they want to use for the Values to enable the calculation. | [optional] **useFallbackRate** | **bool** | Indicates to use employee base hourly rate where the calculated average hourly rate is less | [optional] +**useNiPay** | **bool** | If use National insurance gross taxable pay. (Default - True). | [optional] +**useOnlyPaidWeeks** | **bool** | If to go back further than the stated no of weeks for calculation if there are weeks where the employee has not been paid. (Default- True) | [optional] +**useWorkingPattern** | **bool** | If use the weekly hours or days as per their working pattern as the divisor for the average holiday rate. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractJobErrorResponse.md b/docs/Model/ContractJobErrorResponse.md index 586cbb9..0990cda 100644 --- a/docs/Model/ContractJobErrorResponse.md +++ b/docs/Model/ContractJobErrorResponse.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | The unique identifier of the job error. | [optional] -**jobId** | **string** | Job public Id | [optional] +**createdDate** | **\DateTime** | Date the job error was created | [optional] **errorMessage** | **string** | Error Message | [optional] **errorType** | **string** | Type of job error | [optional] -**createdDate** | **\DateTime** | Date the job error was created | [optional] +**id** | **string** | The unique identifier of the job error. | [optional] +**jobId** | **string** | Job public Id | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractJobResponse.md b/docs/Model/ContractJobResponse.md index 813d1e4..8d2f4f6 100644 --- a/docs/Model/ContractJobResponse.md +++ b/docs/Model/ContractJobResponse.md @@ -4,19 +4,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | Job public Id. | [optional] +**createdDate** | **\DateTime** | Job Created date. | [optional] **employerId** | **string** | Employer public Id. | [optional] **employerName** | **string** | Employer name. | [optional] -**type** | [**\SynergiTech\Staffology\Model\JobType**](JobType.md) | | [optional] +**executionStartTime** | **\DateTime** | The Job excution start time. | [optional] +**executionTime** | **int** | The time it took the Job to execute in seconds. | [optional] +**id** | **string** | Job public Id. | [optional] **name** | **string** | The Job name, e.g. uploaded file for Import, or report display name for Report | [optional] **outputFormat** | **string** | The Job output format, e.g. json/csv/pdf for Report, or something else for other Job types. | [optional] +**requestedByName** | **string** | The name of the user that requested this job | [optional] +**result** | [**\SynergiTech\Staffology\Model\ContractJobResultResponse**](ContractJobResultResponse.md) | | [optional] **status** | [**\SynergiTech\Staffology\Model\JobStatus**](JobStatus.md) | | [optional] -**executionStartTime** | **\DateTime** | The Job excution start time. | [optional] **timeInQueue** | **int** | The time the Job spent in the queue before execution in seconds. | [optional] -**executionTime** | **int** | The time it took the Job to execute in seconds. | [optional] -**result** | [**\SynergiTech\Staffology\Model\ContractJobResultResponse**](ContractJobResultResponse.md) | | [optional] -**createdDate** | **\DateTime** | Job Created date. | [optional] +**type** | [**\SynergiTech\Staffology\Model\JobType**](JobType.md) | | [optional] **updatedDate** | **\DateTime** | Job Updated date where applicable. | [optional] -**requestedByName** | **string** | The name of the user that requested this job | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractJobResultResponse.md b/docs/Model/ContractJobResultResponse.md index c6204eb..bec633c 100644 --- a/docs/Model/ContractJobResultResponse.md +++ b/docs/Model/ContractJobResultResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**errors** | **string[]** | Job execution's errors. | [optional] **file** | [**\SynergiTech\Staffology\Model\ContractJobResultFileResponse**](ContractJobResultFileResponse.md) | | [optional] **metadata** | **array** | Job result metadata, e.g. Employee Import stats | [optional] -**errors** | **string[]** | Job execution's errors. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractJournalTemplateRequest.md b/docs/Model/ContractJournalTemplateRequest.md index 5ae9e29..1ecce41 100644 --- a/docs/Model/ContractJournalTemplateRequest.md +++ b/docs/Model/ContractJournalTemplateRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**header** | **string** | Header of Journal Template | [optional] **content** | **string** | Content of Journal Template | [optional] +**header** | **string** | Header of Journal Template | [optional] **useColumnHeaders** | **bool** | Indicates whether content is empty or not | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractJournalTemplateResponse.md b/docs/Model/ContractJournalTemplateResponse.md index d94f500..dfa3c66 100644 --- a/docs/Model/ContractJournalTemplateResponse.md +++ b/docs/Model/ContractJournalTemplateResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uniqueId** | **string** | Journal Template identifier | [optional] -**header** | **string** | Header of Journal Template | [optional] **content** | **string** | Content of Journal Template | [optional] +**header** | **string** | Header of Journal Template | [optional] +**uniqueId** | **string** | Journal Template identifier | [optional] **useColumnHeaders** | **bool** | Indicates whether content is empty or not | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractJournalTokenRequest.md b/docs/Model/ContractJournalTokenRequest.md index 2133015..80bd6f2 100644 --- a/docs/Model/ContractJournalTokenRequest.md +++ b/docs/Model/ContractJournalTokenRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\SynergiTech\Staffology\Model\JournalTokenType**](JournalTokenType.md) | | [optional] -**name** | **string** | Name of Journal Tokens | [optional] **description** | **string** | Description of Journal Tokens | [optional] +**name** | **string** | Name of Journal Tokens | [optional] +**type** | [**\SynergiTech\Staffology\Model\JournalTokenType**](JournalTokenType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractJournalTokenResponse.md b/docs/Model/ContractJournalTokenResponse.md index 8d54903..5a7b4dd 100644 --- a/docs/Model/ContractJournalTokenResponse.md +++ b/docs/Model/ContractJournalTokenResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uniqueId** | **string** | Journal Token identifier | [optional] -**type** | [**\SynergiTech\Staffology\Model\JournalTokenType**](JournalTokenType.md) | | [optional] -**name** | **string** | Name of Journal Tokens | [optional] **description** | **string** | Description of Journal Tokens | [optional] +**name** | **string** | Name of Journal Tokens | [optional] +**type** | [**\SynergiTech\Staffology\Model\JournalTokenType**](JournalTokenType.md) | | [optional] +**uniqueId** | **string** | Journal Token identifier | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractJournalTokenResponseItem.md b/docs/Model/ContractJournalTokenResponseItem.md index cdaa926..2b0d8fb 100644 --- a/docs/Model/ContractJournalTokenResponseItem.md +++ b/docs/Model/ContractJournalTokenResponseItem.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] -**name** | **string** | | [optional] **metadata** | **mixed** | | [optional] +**name** | **string** | | [optional] **url** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractLeaveImportRequest.md b/docs/Model/ContractLeaveImportRequest.md index cead496..9a8605c 100644 --- a/docs/Model/ContractLeaveImportRequest.md +++ b/docs/Model/ContractLeaveImportRequest.md @@ -4,22 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollCode** | **string** | Payroll Code | [optional] -**type** | [**\SynergiTech\Staffology\Model\LeaveType**](LeaveType.md) | | [optional] -**pay** | [**\SynergiTech\Staffology\Model\LeavePayType**](LeavePayType.md) | | [optional] -**openEndedAbsence** | **bool** | Open Ended Absence | [optional] +**assumedPensionablePay** | **float** | Assumed Pensionable Pay (APP) is an average figure, calculated as the average pay in the 3 months (or 12 weeks if weekly/fortnightly/fourweekly paid) before the absence | [optional] +**automaticAPPCalculation** | **bool** | If set to True then we'll automatically calculate the AssumedPensionablePay. Set it to false if you want to manually provide a figure that overrides our calculations | [optional] +**automaticAWECalculation** | **bool** | Automatic Average Weekly Earnings. | [optional] +**averageWeeklyEarnings** | **float** | The employees average weekly earnings. | [optional] +**calculationType** | [**\SynergiTech\Staffology\Model\LeaveCalculationType**](LeaveCalculationType.md) | | [optional] **from** | **\DateTime** | The first day of Leave. | [optional] -**to** | **\DateTime** | The last day of Leave. | [optional] **historicLeaveRequiresProcessing** | **bool** | Only used during the creation of historical SSP. When creating historical SSP, this will determine whether to pay that leave in the next PayRun. | [optional] -**averageWeeklyEarnings** | **float** | The employees average weekly earnings. | [optional] -**automaticAWECalculation** | **bool** | Automatic Average Weekly Earnings. | [optional] **offsetPay** | **bool** | Top-up pay to usual amongst (offsetting) | [optional] -**calculationType** | [**\SynergiTech\Staffology\Model\LeaveCalculationType**](LeaveCalculationType.md) | | [optional] +**openEndedAbsence** | **bool** | Open Ended Absence | [optional] +**pay** | [**\SynergiTech\Staffology\Model\LeavePayType**](LeavePayType.md) | | [optional] +**paySSPInAddition** | **bool** | Only provided when the leave type is 'Sick' and the payment type is 'Custom'. | [optional] +**payrollCode** | **string** | Payroll Code | [optional] **percentOfPay** | **float** | Only provided when the leave type is 'Sick' and the payment type is 'Custom'. | [optional] **strikeHoursToDeduct** | **float** | Only provided when the leave type is 'StrikeAction' and the calculation type is 'SpecifyHours'. | [optional] -**paySSPInAddition** | **bool** | Only provided when the leave type is 'Sick' and the payment type is 'Custom'. | [optional] +**to** | **\DateTime** | The last day of Leave. | [optional] +**type** | [**\SynergiTech\Staffology\Model\LeaveType**](LeaveType.md) | | [optional] **useAssumedPensionablePay** | **bool** | Only provided when the leave type is 'Sick' and the payment type is 'Custom', 'Occupational Policy' or 'Statutory Pay'. | [optional] -**assumedPensionablePay** | **float** | Assumed Pensionable Pay (APP) is an average figure, calculated as the average pay in the 3 months (or 12 weeks if weekly/fortnightly/fourweekly paid) before the absence | [optional] -**automaticAPPCalculation** | **bool** | If set to True then we'll automatically calculate the AssumedPensionablePay. Set it to false if you want to manually provide a figure that overrides our calculations | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractLeaverDetails.md b/docs/Model/ContractLeaverDetails.md index bebeb5a..c5b212c 100644 --- a/docs/Model/ContractLeaverDetails.md +++ b/docs/Model/ContractLeaverDetails.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasLeft** | **bool** | | [optional] -**leaveDate** | **\DateTime** | | [optional] **isDeceased** | **bool** | | [optional] -**paymentAfterLeaving** | **bool** | | [optional] +**leaveDate** | **\DateTime** | | [optional] **p45Sent** | **bool** | | [optional] **payAccruedBalance** | **bool** | If set to true then new PayLine will be added into the PayRunEntry to pay the accrued balance | [optional] +**paymentAfterLeaving** | **bool** | | [optional] **paymentMethodAfterLeaving** | [**\SynergiTech\Staffology\Model\PaymentMethodAfterLeaving**](PaymentMethodAfterLeaving.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractLondonAllowanceRequest.md b/docs/Model/ContractLondonAllowanceRequest.md index 0adacdf..ec43b00 100644 --- a/docs/Model/ContractLondonAllowanceRequest.md +++ b/docs/Model/ContractLondonAllowanceRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**\SynergiTech\Staffology\Model\LondonAllowanceType**](LondonAllowanceType.md) | | [optional] -**valueType** | [**\SynergiTech\Staffology\Model\LondonAllowanceValueType**](LondonAllowanceValueType.md) | | [optional] **value** | **float** | Value of London Allowance | [optional] +**valueType** | [**\SynergiTech\Staffology\Model\LondonAllowanceValueType**](LondonAllowanceValueType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractLondonAllowanceResponse.md b/docs/Model/ContractLondonAllowanceResponse.md index 1c8ecff..730919c 100644 --- a/docs/Model/ContractLondonAllowanceResponse.md +++ b/docs/Model/ContractLondonAllowanceResponse.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**\SynergiTech\Staffology\Model\LondonAllowanceType**](LondonAllowanceType.md) | | [optional] -**valueType** | [**\SynergiTech\Staffology\Model\LondonAllowanceValueType**](LondonAllowanceValueType.md) | | [optional] -**value** | **float** | Value of London Allowance | [optional] **uniqueId** | **string** | London Allowance identifier | [optional] +**value** | **float** | Value of London Allowance | [optional] +**valueType** | [**\SynergiTech\Staffology\Model\LondonAllowanceValueType**](LondonAllowanceValueType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractNetOfOnCostsResponse.md b/docs/Model/ContractNetOfOnCostsResponse.md index 4de76c7..9ce5498 100644 --- a/docs/Model/ContractNetOfOnCostsResponse.md +++ b/docs/Model/ContractNetOfOnCostsResponse.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**salary** | **float** | | [optional] -**holidayPay** | **float** | | [optional] -**employersPensionContribution** | **float** | | [optional] +**apprenticeshipLevy** | **float** | | [optional] **employeesPensionContribution** | **float** | | [optional] **employersNi** | **float** | | [optional] -**apprenticeshipLevy** | **float** | | [optional] +**employersPensionContribution** | **float** | | [optional] **grossDailyRate** | **float** | | [optional] -**totalFees** | **float** | | [optional] +**holInclusiveSimulation** | [**\SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse**](ContractNetOfOnCostsSimulationResponse.md) | | [optional] +**holidayPay** | **float** | | [optional] **numberOfDays** | **float** | | [optional] +**salary** | **float** | | [optional] **simulation** | [**\SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse**](ContractNetOfOnCostsSimulationResponse.md) | | [optional] -**holInclusiveSimulation** | [**\SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse**](ContractNetOfOnCostsSimulationResponse.md) | | [optional] +**totalFees** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractNetOfOnCostsSimulationResponse.md b/docs/Model/ContractNetOfOnCostsSimulationResponse.md index 913ed2a..3cd792b 100644 --- a/docs/Model/ContractNetOfOnCostsSimulationResponse.md +++ b/docs/Model/ContractNetOfOnCostsSimulationResponse.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**grossPay** | **float** | | [optional] **employeePension** | **float** | | [optional] -**taxDue** | **float** | | [optional] -**niDue** | **float** | | [optional] +**grossPay** | **float** | | [optional] **netPay** | **float** | | [optional] [readonly] +**niDue** | **float** | | [optional] +**taxDue** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractOverseasEmployerDetails.md b/docs/Model/ContractOverseasEmployerDetails.md index cc21b72..2dfc686 100644 --- a/docs/Model/ContractOverseasEmployerDetails.md +++ b/docs/Model/ContractOverseasEmployerDetails.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**overseasEmployer** | **bool** | | [optional] -**overseasSecondmentStatus** | [**\SynergiTech\Staffology\Model\OverseasSecondmentStatus**](OverseasSecondmentStatus.md) | | [optional] **eeaCitizen** | **bool** | | [optional] **epm6Scheme** | **bool** | | [optional] +**overseasEmployer** | **bool** | | [optional] +**overseasSecondmentStatus** | [**\SynergiTech\Staffology\Model\OverseasSecondmentStatus**](OverseasSecondmentStatus.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractP11HistoryRequest.md b/docs/Model/ContractP11HistoryRequest.md index da48e51..d78a7a7 100644 --- a/docs/Model/ContractP11HistoryRequest.md +++ b/docs/Model/ContractP11HistoryRequest.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**periodNumber** | **int** | | [optional] **niablePay** | **float** | | [optional] **payDate** | **\DateTime** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**periodNumber** | **int** | | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractP11HistoryResponse.md b/docs/Model/ContractP11HistoryResponse.md index de09df2..fc41852 100644 --- a/docs/Model/ContractP11HistoryResponse.md +++ b/docs/Model/ContractP11HistoryResponse.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**periodNumber** | **int** | | [optional] **niablePay** | **float** | | [optional] **payDate** | **\DateTime** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**periodNumber** | **int** | | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractP45AvailabilityResponse.md b/docs/Model/ContractP45AvailabilityResponse.md new file mode 100644 index 0000000..93058fa --- /dev/null +++ b/docs/Model/ContractP45AvailabilityResponse.md @@ -0,0 +1,12 @@ +# # ContractP45AvailabilityResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**isLeaverPresent** | **bool** | Indicates if a leaver is present in the pay run | [optional] +**ordinal** | **int** | The Ordinal of the PayRun | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**period** | **int** | The Period (i.e, Tax Week or Tax Month) of the PayRun | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayHistoryRequest.md b/docs/Model/ContractPayHistoryRequest.md index 5b2be37..f524fa7 100644 --- a/docs/Model/ContractPayHistoryRequest.md +++ b/docs/Model/ContractPayHistoryRequest.md @@ -4,14 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**days** | **float** | decimal amount of days worked, if not provided then 0 | [optional] **employeeId** | **string** | Employee unique Id | [optional] **employeeRoleId** | **string** | Employee role unique Id | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYearTypes**](TaxYearTypes.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriodTypes**](PayPeriodTypes.md) | | [optional] -**periodNumber** | **int** | Tax Week or Tax Month number this PayRunEntry relates to | [optional] -**payAmount** | **float** | monetary amount for given period, if not provided then 0 | [optional] **hours** | **float** | decimal amount of hours worked, if not provided then 0 | [optional] **isStatutoryPayOnly** | **bool** | optional boolean flag, if the period only had SXP present | [optional] +**payAmount** | **float** | monetary amount for given period, if not provided then 0 | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriodTypes**](PayPeriodTypes.md) | | [optional] **paymentDate** | **\DateTime** | The date payment was made for respective period | [optional] +**periodNumber** | **int** | Tax Week or Tax Month number this PayRunEntry relates to | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYearTypes**](TaxYearTypes.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayHistoryResponse.md b/docs/Model/ContractPayHistoryResponse.md index bb5abde..f5fb0b1 100644 --- a/docs/Model/ContractPayHistoryResponse.md +++ b/docs/Model/ContractPayHistoryResponse.md @@ -4,15 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | Average Holiday Pay History identifier | [optional] +**days** | **float** | decimal amount of days worked, if not provided then 0 | [optional] **employeeId** | **string** | Employee unique Id | [optional] **employeeRoleId** | **string** | Employee role unique Id | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYearTypes**](TaxYearTypes.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriodTypes**](PayPeriodTypes.md) | | [optional] -**periodNumber** | **int** | Tax Week or Tax Month number this PayRunEntry relates to | [optional] -**payAmount** | **float** | monetary amount for given period, if not provided then 0 | [optional] **hours** | **float** | decimal amount of hours worked, if not provided then 0 | [optional] +**id** | **string** | Average Holiday Pay History identifier | [optional] **isStatutoryPayOnly** | **bool** | optional boolean flag, if the period only had SXP present | [optional] +**payAmount** | **float** | monetary amount for given period, if not provided then 0 | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriodTypes**](PayPeriodTypes.md) | | [optional] **paymentDate** | **\DateTime** | The date payment was made for respective period | [optional] +**periodNumber** | **int** | Tax Week or Tax Month number this PayRunEntry relates to | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYearTypes**](TaxYearTypes.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayHistoryUpdateRequest.md b/docs/Model/ContractPayHistoryUpdateRequest.md index 435cb91..405c965 100644 --- a/docs/Model/ContractPayHistoryUpdateRequest.md +++ b/docs/Model/ContractPayHistoryUpdateRequest.md @@ -4,15 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | Average Holiday Pay History identifier | [optional] +**days** | **float** | decimal amount of days worked, if not provided then 0 | [optional] **employeeId** | **string** | Employee unique Id | [optional] **employeeRoleId** | **string** | Employee role unique Id | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYearTypes**](TaxYearTypes.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriodTypes**](PayPeriodTypes.md) | | [optional] -**periodNumber** | **int** | Tax Week or Tax Month number this PayRunEntry relates to | [optional] -**payAmount** | **float** | monetary amount for given period, if not provided then 0 | [optional] **hours** | **float** | decimal amount of hours worked, if not provided then 0 | [optional] +**id** | **string** | Average Holiday Pay History identifier | [optional] **isStatutoryPayOnly** | **bool** | optional boolean flag, if the period only had SXP present | [optional] +**payAmount** | **float** | monetary amount for given period, if not provided then 0 | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriodTypes**](PayPeriodTypes.md) | | [optional] **paymentDate** | **\DateTime** | The date payment was made for respective period | [optional] +**periodNumber** | **int** | Tax Week or Tax Month number this PayRunEntry relates to | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYearTypes**](TaxYearTypes.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayLineRequest.md b/docs/Model/ContractPayLineRequest.md index 16bef80..9a35bdf 100644 --- a/docs/Model/ContractPayLineRequest.md +++ b/docs/Model/ContractPayLineRequest.md @@ -4,42 +4,42 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**analysisCategoriesCodes** | [**\SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]**](ContractPaylineAnalysisCategoriesCodes.md) | List of analysiscategory id and analysiscategoryCode id | [optional] +**analysisCategoryCodeIds** | **string[]** | Array of analysiscategoryCode uniqueId | [optional] **analysisCategoryCodesJson** | **string** | Analysis category id and analysiscategoryCode json | [optional] -**value** | **float** | The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used). If the PayCode has a CalculationType other than FixedAmount then this field will be a percentage. If the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated. | [optional] -**rate** | **float** | If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used | [optional] -**multiplier** | **float** | If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours | [optional] -**description** | **string** | A freeform description to accompany this line. It will be displayed on the payslip. | [optional] -**code** | **string** | The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition. | [optional] -**tags** | **string[]** | | [optional] +**annualValue** | **float** | The original value from the PayLine before we modify it Currently only used when CalculationType is set to FixedAnnualAmount so we can determine whether the payline value needs calculating or not To recalculate set to null with annual amount recorded in Value | [optional] +**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] +**calculateAsWhenPaid** | **bool** | Indicates whether this pay line should be treated as When Paid rather than When Earned | [optional] **childId** | **string** | | [optional] -**isNetToGross** | **bool** | If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. | [optional] -**targetNetToGrossValue** | **float** | The orginal net fixed addition amount that is considered to be a take home pay target. | [optional] -**netToGrossDiscrepancy** | **float** | The discrepancy between the targeted and the calculated grossed up value durig a net to gross calculation. | [optional] +**code** | **string** | The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition. | [optional] +**contributesToBasicPay** | **bool** | Indicates whether this PayLine contributes to the basic pay of the Employee. | [optional] +**costCentre** | **string** | CostCentre code which we want to override in payline | [optional] +**costCentreId** | **string** | CostCentre uniqueId which we want to override in payline | [optional] +**department** | **string** | Department code which we want to override in payline | [optional] +**departmentId** | **string** | Department uniqueId which we want to override in payline | [optional] +**description** | **string** | A freeform description to accompany this line. It will be displayed on the payslip. | [optional] +**earnedFrom** | **\DateTime** | | [optional] +**earnedTo** | **\DateTime** | | [optional] **effectiveFrom** | **\DateTime** | The date the payline starts being calculated in payrun | [optional] **effectiveTo** | **\DateTime** | The date the payline stops being calculated in payrun | [optional] +**fullTimeAnnualValue** | **float** | Used to set Full Time Annual Value for payline | [optional] +**ignoreInitialBackPay** | **bool** | Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology. If set to false, the automatic backpay calculation will be performed on the first pay run. | [optional] **isAutoGeneratedBasicPayLine** | **bool** | | [optional] -**percentageOfEffectiveDays** | **float** | The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun | [optional] -**totalWorkingDays** | **float** | | [optional] -**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] **isAutomaticBackPay** | **bool** | Automatically calculate backpay and add or modify the necessary pay lines for this addition/deduction when a pay run is created. Applicable only to employee level addition/deduction pay lines. If set to false then you must manually handle the calculation and adding of backpay lines. | [optional] -**ignoreInitialBackPay** | **bool** | Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology. If set to false, the automatic backpay calculation will be performed on the first pay run. | [optional] -**contributesToBasicPay** | **bool** | Indicates whether this PayLine contributes to the basic pay of the Employee. | [optional] -**calculateAsWhenPaid** | **bool** | Indicates whether this pay line should be treated as When Paid rather than When Earned | [optional] -**totalPaidDays** | **float** | | [optional] -**roleId** | **string** | The employee role which is associated with this pay line. If set to null, the pay line is not related with a role. | [optional] -**earnedFrom** | **\DateTime** | | [optional] -**earnedTo** | **\DateTime** | | [optional] -**annualValue** | **float** | The original value from the PayLine before we modify it Currently only used when CalculationType is set to FixedAnnualAmount so we can determine whether the payline value needs calculating or not To recalculate set to null with annual amount recorded in Value | [optional] -**department** | **string** | Department code which we want to override in payline | [optional] -**costCentre** | **string** | CostCentre code which we want to override in payline | [optional] -**departmentId** | **string** | Department uniqueId which we want to override in payline | [optional] -**costCentreId** | **string** | CostCentre uniqueId which we want to override in payline | [optional] -**analysisCategoriesCodes** | [**\SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]**](ContractPaylineAnalysisCategoriesCodes.md) | List of analysiscategory id and analysiscategoryCode id | [optional] -**analysisCategoryCodeIds** | **string[]** | Array of analysiscategoryCode uniqueId | [optional] -**paySpineId** | **string** | [readonly] The Id of the associated pay spine. | [optional] +**isNetToGross** | **bool** | If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. | [optional] +**londonAllowanceId** | **int** | Used to set London allowance id for payline | [optional] +**multiplier** | **float** | If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours | [optional] +**netToGrossDiscrepancy** | **float** | The discrepancy between the targeted and the calculated grossed up value durig a net to gross calculation. | [optional] **paySpineGradeId** | **string** | [readonly] The Id of the associated pay spine grade. | [optional] +**paySpineId** | **string** | [readonly] The Id of the associated pay spine. | [optional] +**percentageOfEffectiveDays** | **float** | The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun | [optional] +**rate** | **float** | If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used | [optional] +**roleId** | **string** | The employee role which is associated with this pay line. If set to null, the pay line is not related with a role. | [optional] **spinalPointId** | **string** | [readonly] The Id of the associated spinal point. | [optional] -**londonAllowanceId** | **int** | Used to set London allowance id for payline | [optional] -**fullTimeAnnualValue** | **float** | Used to set Full Time Annual Value for payline | [optional] +**tags** | **string[]** | | [optional] +**targetNetToGrossValue** | **float** | The orginal net fixed addition amount that is considered to be a take home pay target. | [optional] +**totalPaidDays** | **float** | | [optional] +**totalWorkingDays** | **float** | | [optional] +**value** | **float** | The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used). If the PayCode has a CalculationType other than FixedAmount then this field will be a percentage. If the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayLineResponse.md b/docs/Model/ContractPayLineResponse.md index 16599ad..f4932e9 100644 --- a/docs/Model/ContractPayLineResponse.md +++ b/docs/Model/ContractPayLineResponse.md @@ -4,49 +4,49 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | | [optional] +**analysisCategoriesCodes** | [**\SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]**](ContractPaylineAnalysisCategoriesCodes.md) | List of analysiscategory id and analysiscategoryCode id | [optional] +**analysisCategoryCodeIds** | **string[]** | Array of analysiscategoryCode uniqueId | [optional] +**annualValue** | **float** | The original value from the PayLine before we modify it Currently only used when CalculationType is set to FixedAnnualAmount so we can determine whether the payline value needs calculating or not To recalculate set to null with annual amount recorded in Value | [optional] **attachmentOrderId** | **string** | [readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO | [optional] -**pensionId** | **string** | [readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS | [optional] +**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] +**calculateAsWhenPaid** | **bool** | Indicates whether this pay line should be treated as When Paid rather than When Earned | [optional] +**childId** | **string** | | [optional] +**code** | **string** | The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition. | [optional] +**contributesToBasicPay** | **bool** | Indicates whether this PayLine contributes to the basic pay of the Employee. | [optional] +**costCentre** | **string** | CostCentre code which we want to override in payline | [optional] +**costCentreId** | **string** | CostCentre uniqueId which we want to override in payline | [optional] +**department** | **string** | Department code which we want to override in payline | [optional] +**departmentId** | **string** | Department uniqueId which we want to override in payline | [optional] +**description** | **string** | A freeform description to accompany this line. It will be displayed on the payslip. | [optional] +**earnedFrom** | **\DateTime** | | [optional] +**earnedTo** | **\DateTime** | | [optional] +**effectiveFrom** | **\DateTime** | The date the payline starts being calculated in payrun | [optional] +**effectiveTo** | **\DateTime** | The date the payline stops being calculated in payrun | [optional] +**fullTimeAnnualValue** | **float** | Used to set Full Time Annual Value for payline | [optional] +**id** | **string** | | [optional] +**ignoreInitialBackPay** | **bool** | Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology. If set to false, the automatic backpay calculation will be performed on the first pay run. | [optional] +**initialBackPayPublicPayRunId** | **string** | [readonly] Used to mark the first payrun where this payline has been payrolled for backpay | [optional] +**isAutoGeneratedBasicPayLine** | **bool** | | [optional] +**isAutomaticBackPay** | **bool** | Automatically calculate backpay and add or modify the necessary pay lines for this addition/deduction when a pay run is created. Applicable only to employee level addition/deduction pay lines. If set to false then you must manually handle the calculation and adding of backpay lines. | [optional] +**isNetToGross** | **bool** | If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. | [optional] **leaveId** | **string** | [readonly] The Id of the associated Leave. Only included if the PayLine is a result of a Leave with Statutory pay | [optional] -**loanId** | **string** | [readonly] The Id of the associated Loan, if any. | [optional] **leaveStatutoryDaysPaid** | **float** | [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many days they've been paid for (based on their Working Pattern). | [optional] **leaveStatutoryWeeksPaid** | **float** | [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many weeks they've been paid for (based on their Working Pattern). | [optional] -**initialBackPayPublicPayRunId** | **string** | [readonly] Used to mark the first payrun where this payline has been payrolled for backpay | [optional] -**value** | **float** | The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used). If the PayCode has a CalculationType other than FixedAmount then this field will be a percentage. If the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated. | [optional] -**rate** | **float** | If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used | [optional] +**loanId** | **string** | [readonly] The Id of the associated Loan, if any. | [optional] +**londonAllowanceId** | **int** | Used to set London allowance id for payline | [optional] **multiplier** | **float** | If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours | [optional] -**description** | **string** | A freeform description to accompany this line. It will be displayed on the payslip. | [optional] -**code** | **string** | The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition. | [optional] -**tags** | **string[]** | | [optional] -**childId** | **string** | | [optional] -**isNetToGross** | **bool** | If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. | [optional] -**targetNetToGrossValue** | **float** | The orginal net fixed addition amount that is considered to be a take home pay target. | [optional] **netToGrossDiscrepancy** | **float** | The discrepancy between the targeted and the calculated grossed up value durig a net to gross calculation. | [optional] -**effectiveFrom** | **\DateTime** | The date the payline starts being calculated in payrun | [optional] -**effectiveTo** | **\DateTime** | The date the payline stops being calculated in payrun | [optional] -**isAutoGeneratedBasicPayLine** | **bool** | | [optional] +**paySpineGradeId** | **string** | [readonly] The Id of the associated pay spine grade. | [optional] +**paySpineId** | **string** | [readonly] The Id of the associated pay spine. | [optional] +**pensionId** | **string** | [readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS | [optional] **percentageOfEffectiveDays** | **float** | The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun | [optional] -**totalWorkingDays** | **float** | | [optional] -**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] -**isAutomaticBackPay** | **bool** | Automatically calculate backpay and add or modify the necessary pay lines for this addition/deduction when a pay run is created. Applicable only to employee level addition/deduction pay lines. If set to false then you must manually handle the calculation and adding of backpay lines. | [optional] -**ignoreInitialBackPay** | **bool** | Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology. If set to false, the automatic backpay calculation will be performed on the first pay run. | [optional] -**contributesToBasicPay** | **bool** | Indicates whether this PayLine contributes to the basic pay of the Employee. | [optional] -**calculateAsWhenPaid** | **bool** | Indicates whether this pay line should be treated as When Paid rather than When Earned | [optional] -**totalPaidDays** | **float** | | [optional] +**rate** | **float** | If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used | [optional] **roleId** | **string** | The employee role which is associated with this pay line. If set to null, the pay line is not related with a role. | [optional] -**earnedFrom** | **\DateTime** | | [optional] -**earnedTo** | **\DateTime** | | [optional] -**annualValue** | **float** | The original value from the PayLine before we modify it Currently only used when CalculationType is set to FixedAnnualAmount so we can determine whether the payline value needs calculating or not To recalculate set to null with annual amount recorded in Value | [optional] -**department** | **string** | Department code which we want to override in payline | [optional] -**costCentre** | **string** | CostCentre code which we want to override in payline | [optional] -**departmentId** | **string** | Department uniqueId which we want to override in payline | [optional] -**costCentreId** | **string** | CostCentre uniqueId which we want to override in payline | [optional] -**analysisCategoriesCodes** | [**\SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]**](ContractPaylineAnalysisCategoriesCodes.md) | List of analysiscategory id and analysiscategoryCode id | [optional] -**analysisCategoryCodeIds** | **string[]** | Array of analysiscategoryCode uniqueId | [optional] -**paySpineId** | **string** | [readonly] The Id of the associated pay spine. | [optional] -**paySpineGradeId** | **string** | [readonly] The Id of the associated pay spine grade. | [optional] **spinalPointId** | **string** | [readonly] The Id of the associated spinal point. | [optional] -**londonAllowanceId** | **int** | Used to set London allowance id for payline | [optional] -**fullTimeAnnualValue** | **float** | Used to set Full Time Annual Value for payline | [optional] +**tags** | **string[]** | | [optional] +**targetNetToGrossValue** | **float** | The orginal net fixed addition amount that is considered to be a take home pay target. | [optional] +**totalPaidDays** | **float** | | [optional] +**totalWorkingDays** | **float** | | [optional] +**value** | **float** | The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used). If the PayCode has a CalculationType other than FixedAmount then this field will be a percentage. If the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayOptionsBaseResponse.md b/docs/Model/ContractPayOptionsBaseResponse.md index a161a3a..6e4b466 100644 --- a/docs/Model/ContractPayOptionsBaseResponse.md +++ b/docs/Model/ContractPayOptionsBaseResponse.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**regularPayLines** | [**\SynergiTech\Staffology\Model\ContractPayLineResponse[]**](ContractPayLineResponse.md) | These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. | [optional] +**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] +**baseDailyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] +**baseHourlyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] **basis** | [**\SynergiTech\Staffology\Model\PayBasis**](PayBasis.md) | | [optional] -**nationalMinimumWage** | **bool** | | [optional] -**payCode** | **string** | If you want the Employees pay to be allocated to a code other than BASIC, specify it here | [optional] -**mileageVehicleType** | [**\SynergiTech\Staffology\Model\MileageVehicleType**](MileageVehicleType.md) | | [optional] **mapsMiles** | **int** | The number of miles to pay for as Mileage Allowance Payments | [optional] +**mileageVehicleType** | [**\SynergiTech\Staffology\Model\MileageVehicleType**](MileageVehicleType.md) | | [optional] +**nationalMinimumWage** | **bool** | | [optional] +**niTable** | **string** | | [optional] **payAmount** | **float** | The amount the Employee is regularly paid each period | [optional] **payAmountMultiplier** | **float** | This property is irrelevant if the basis is Monthly. But if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period. | [optional] -**baseHourlyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] -**baseDailyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] -**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] -**niTable** | **string** | | [optional] +**payCode** | **string** | If you want the Employees pay to be allocated to a code other than BASIC, specify it here | [optional] +**regularPayLines** | [**\SynergiTech\Staffology\Model\ContractPayLineResponse[]**](ContractPayLineResponse.md) | These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayOptionsImportRequest.md b/docs/Model/ContractPayOptionsImportRequest.md index f4ce37a..0b3289b 100644 --- a/docs/Model/ContractPayOptionsImportRequest.md +++ b/docs/Model/ContractPayOptionsImportRequest.md @@ -22,8 +22,8 @@ Name | Type | Description | Notes **payAmountMultiplier** | **float** | | [optional] **payCode** | **string** | | [optional] **payGrade** | **string** | | [optional] -**payrollCode** | **string** | | [optional] **paySpine** | **string** | | [optional] +**payrollCode** | **string** | | [optional] **roleReference** | **string** | | [optional] **spinePoint** | **string** | | [optional] **tags** | **string[]** | | [optional] diff --git a/docs/Model/ContractPayOptionsRequest.md b/docs/Model/ContractPayOptionsRequest.md index ca37f51..bfe56b4 100644 --- a/docs/Model/ContractPayOptionsRequest.md +++ b/docs/Model/ContractPayOptionsRequest.md @@ -4,24 +4,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**regularPayLines** | [**\SynergiTech\Staffology\Model\ContractPayLineRequest[]**](ContractPayLineRequest.md) | These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. | [optional] -**period** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**ordinal** | **int** | Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod. | [optional] -**method** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] -**withholdTaxRefundIfPayIsZero** | **bool** | If you don't want negative PAYE values when the Gross pay is zero, set this to true | [optional] -**taxAndNi** | [**\SynergiTech\Staffology\Model\ContractTaxAndNi**](ContractTaxAndNi.md) | | [optional] -**fpsFields** | [**\SynergiTech\Staffology\Model\ContractFpsFields**](ContractFpsFields.md) | | [optional] -**tags** | **string[]** | | [optional] +**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] +**baseDailyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] +**baseHourlyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] **basis** | [**\SynergiTech\Staffology\Model\PayBasis**](PayBasis.md) | | [optional] -**nationalMinimumWage** | **bool** | | [optional] -**payCode** | **string** | If you want the Employees pay to be allocated to a code other than BASIC, specify it here | [optional] -**mileageVehicleType** | [**\SynergiTech\Staffology\Model\MileageVehicleType**](MileageVehicleType.md) | | [optional] +**fpsFields** | [**\SynergiTech\Staffology\Model\ContractFpsFields**](ContractFpsFields.md) | | [optional] **mapsMiles** | **int** | The number of miles to pay for as Mileage Allowance Payments | [optional] +**method** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] +**mileageVehicleType** | [**\SynergiTech\Staffology\Model\MileageVehicleType**](MileageVehicleType.md) | | [optional] +**nationalMinimumWage** | **bool** | | [optional] +**niTable** | **string** | | [optional] +**ordinal** | **int** | Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod. | [optional] **payAmount** | **float** | The amount the Employee is regularly paid each period | [optional] **payAmountMultiplier** | **float** | This property is irrelevant if the basis is Monthly. But if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period. | [optional] -**baseHourlyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] -**baseDailyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] -**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] -**niTable** | **string** | | [optional] +**payCode** | **string** | If you want the Employees pay to be allocated to a code other than BASIC, specify it here | [optional] +**period** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**regularPayLines** | [**\SynergiTech\Staffology\Model\ContractPayLineRequest[]**](ContractPayLineRequest.md) | These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. | [optional] +**tags** | **string[]** | | [optional] +**taxAndNi** | [**\SynergiTech\Staffology\Model\ContractTaxAndNi**](ContractTaxAndNi.md) | | [optional] +**withholdTaxRefundIfPayIsZero** | **bool** | If you don't want negative PAYE values when the Gross pay is zero, set this to true | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayOptionsResponse.md b/docs/Model/ContractPayOptionsResponse.md index ac03bea..b933c6d 100644 --- a/docs/Model/ContractPayOptionsResponse.md +++ b/docs/Model/ContractPayOptionsResponse.md @@ -4,25 +4,25 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**regularPayLines** | [**\SynergiTech\Staffology\Model\ContractPayLineResponse[]**](ContractPayLineResponse.md) | These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. | [optional] +**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] +**baseDailyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] +**baseHourlyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] **basicPay** | **float** | The amount of basic pay the Employee is regularly paid each period This amount is the combined total of all pay elements that contribute to basic pay | [optional] -**period** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**ordinal** | **int** | Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod. | [optional] -**method** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] -**withholdTaxRefundIfPayIsZero** | **bool** | If you don't want negative PAYE values when the Gross pay is zero, set this to true | [optional] -**taxAndNi** | [**\SynergiTech\Staffology\Model\ContractTaxAndNi**](ContractTaxAndNi.md) | | [optional] -**fpsFields** | [**\SynergiTech\Staffology\Model\ContractFpsFields**](ContractFpsFields.md) | | [optional] -**tags** | **string[]** | | [optional] **basis** | [**\SynergiTech\Staffology\Model\PayBasis**](PayBasis.md) | | [optional] -**nationalMinimumWage** | **bool** | | [optional] -**payCode** | **string** | If you want the Employees pay to be allocated to a code other than BASIC, specify it here | [optional] -**mileageVehicleType** | [**\SynergiTech\Staffology\Model\MileageVehicleType**](MileageVehicleType.md) | | [optional] +**fpsFields** | [**\SynergiTech\Staffology\Model\ContractFpsFields**](ContractFpsFields.md) | | [optional] **mapsMiles** | **int** | The number of miles to pay for as Mileage Allowance Payments | [optional] +**method** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] +**mileageVehicleType** | [**\SynergiTech\Staffology\Model\MileageVehicleType**](MileageVehicleType.md) | | [optional] +**nationalMinimumWage** | **bool** | | [optional] +**niTable** | **string** | | [optional] +**ordinal** | **int** | Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod. | [optional] **payAmount** | **float** | The amount the Employee is regularly paid each period | [optional] **payAmountMultiplier** | **float** | This property is irrelevant if the basis is Monthly. But if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period. | [optional] -**baseHourlyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] -**baseDailyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] -**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] -**niTable** | **string** | | [optional] +**payCode** | **string** | If you want the Employees pay to be allocated to a code other than BASIC, specify it here | [optional] +**period** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**regularPayLines** | [**\SynergiTech\Staffology\Model\ContractPayLineResponse[]**](ContractPayLineResponse.md) | These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. | [optional] +**tags** | **string[]** | | [optional] +**taxAndNi** | [**\SynergiTech\Staffology\Model\ContractTaxAndNi**](ContractTaxAndNi.md) | | [optional] +**withholdTaxRefundIfPayIsZero** | **bool** | If you don't want negative PAYE values when the Gross pay is zero, set this to true | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayPeriodOrdinalSelection.md b/docs/Model/ContractPayPeriodOrdinalSelection.md new file mode 100644 index 0000000..efe5921 --- /dev/null +++ b/docs/Model/ContractPayPeriodOrdinalSelection.md @@ -0,0 +1,10 @@ +# # ContractPayPeriodOrdinalSelection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayRunOverridesImportRequest.md b/docs/Model/ContractPayRunOverridesImportRequest.md new file mode 100644 index 0000000..4b9ced9 --- /dev/null +++ b/docs/Model/ContractPayRunOverridesImportRequest.md @@ -0,0 +1,14 @@ +# # ContractPayRunOverridesImportRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employeeNi** | **float** | Employee Ni | [optional] +**employerNi** | **float** | Employer Ni | [optional] +**paye** | **float** | PAYE | [optional] +**payrollCode** | **string** | The payroll code of the employee | [optional] +**postGradLoan** | **float** | Post Graduate Loan | [optional] +**studentLoan** | **float** | Student Loan | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayRunResponseItem.md b/docs/Model/ContractPayRunResponseItem.md index 74bc922..ee71504 100644 --- a/docs/Model/ContractPayRunResponseItem.md +++ b/docs/Model/ContractPayRunResponseItem.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] -**name** | **string** | | [optional] **metadata** | **mixed** | | [optional] +**name** | **string** | | [optional] **url** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayRunStateHistoryResponse.md b/docs/Model/ContractPayRunStateHistoryResponse.md index 8cb6ef9..3009401 100644 --- a/docs/Model/ContractPayRunStateHistoryResponse.md +++ b/docs/Model/ContractPayRunStateHistoryResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**state** | [**\SynergiTech\Staffology\Model\PayRunState**](PayRunState.md) | | [optional] **createdDate** | **\DateTime** | Date in which the State was changed | [optional] +**state** | [**\SynergiTech\Staffology\Model\PayRunState**](PayRunState.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayScheduleResponseItem.md b/docs/Model/ContractPayScheduleResponseItem.md index 077ba06..4fc7023 100644 --- a/docs/Model/ContractPayScheduleResponseItem.md +++ b/docs/Model/ContractPayScheduleResponseItem.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payRunList** | [**\SynergiTech\Staffology\Model\ContractPayRunResponseItem[]**](ContractPayRunResponseItem.md) | | [optional] **id** | **string** | | [optional] -**name** | **string** | | [optional] **metadata** | **mixed** | | [optional] +**name** | **string** | | [optional] +**payRunList** | [**\SynergiTech\Staffology\Model\ContractPayRunResponseItem[]**](ContractPayRunResponseItem.md) | | [optional] **url** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPaySpineGradeRequest.md b/docs/Model/ContractPaySpineGradeRequest.md index 79d8a39..9b787b9 100644 --- a/docs/Model/ContractPaySpineGradeRequest.md +++ b/docs/Model/ContractPaySpineGradeRequest.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Pay spine grade name | [optional] +**effectiveDate** | **\DateTime** | Date that this configuration is effective from. | [optional] +**holidayEntitlement** | **float** | The number of holidays entitled to this pay spine grade. | [optional] **lowerPointUniqueId** | **string** | Id of lower spinal point to be used. | [optional] +**name** | **string** | Pay spine grade name | [optional] **upperPointUniqueId** | **string** | Id of upper spinal point to be used. | [optional] **upperPointUseMax** | **bool** | Use the Alt Max Value of the Upper Point. (Default false) | [optional] -**effectiveDate** | **\DateTime** | Date that this configuration is effective from. | [optional] -**holidayEntitlement** | **float** | The number of holidays entitled to this pay spine grade. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPaySpineGradeResponse.md b/docs/Model/ContractPaySpineGradeResponse.md index 5265178..46260f8 100644 --- a/docs/Model/ContractPaySpineGradeResponse.md +++ b/docs/Model/ContractPaySpineGradeResponse.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Pay spine grade name | [optional] +**effectiveDate** | **\DateTime** | Date that this configuration is effective from. | [optional] +**holidayEntitlement** | **float** | The number of holiday days entitled for this pay spine grade. | [optional] **lowerPointUniqueId** | **string** | Id of lower spinal point used. | [optional] +**name** | **string** | Pay spine grade name | [optional] +**uniqueId** | **string** | Pay spine grade Id | [optional] **upperPointUniqueId** | **string** | Id of upper spinal point used. | [optional] **upperPointUseMax** | **bool** | Use the Alt Max Value of the Upper Point. (Default false) | [optional] -**effectiveDate** | **\DateTime** | Date that this configuration is effective from. | [optional] -**uniqueId** | **string** | Pay spine grade Id | [optional] -**holidayEntitlement** | **float** | The number of holiday days entitled for this pay spine grade. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPaySpineRequest.md b/docs/Model/ContractPaySpineRequest.md index ddb1043..25b17c1 100644 --- a/docs/Model/ContractPaySpineRequest.md +++ b/docs/Model/ContractPaySpineRequest.md @@ -4,21 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Name of the Pay Spine | [optional] +**annualDecimals** | **int** | Number of decimal places to calculate Annual Salaries | [optional] +**annualRoundingRule** | [**\SynergiTech\Staffology\Model\AnnualRoundingRule**](AnnualRoundingRule.md) | | [optional] +**dailyDecimals** | **int** | Number of decimal places to calculate Daily Rates | [optional] +**dailyDivisor** | **float** | Days used to determine Full time Daily Rate | [optional] **fullTimeHours** | **float** | Maximum Full Time Hours on this Pay Spine | [optional] **fullTimeWeeks** | **float** | Maximum Full Time Weeks on this Pay Spine | [optional] -**salaryFormula** | **string** | Formula used to derive annual salary <remarks> The salary formula consists of the following elements and Round functions: - PointValue (The value of an individual Spinal Point) - HoursWorked (The hours an employee is contracted to work for in their role) - FTHours (The full time hours specified for an employee in their role) - WeeksWorked (The contracted weeks an employee works in their role) - FTWeeks (The full weeks specified for an employee in their role) Round functions: - ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15. - ROUNDUP(Value) - ROUNDDOWN(Value) - TRUNCATE(Value) </remarks><example> For example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" </example> | [optional] -**hourlyDivisor** | **float** | Hours used to determine Hourly Rate | [optional] +**gradeEffectiveDate** | **\DateTime** | Effective date for applicable grades | [optional] +**holidayEntitlements** | [**\SynergiTech\Staffology\Model\ContractHolidayEntitlementRequest[]**](ContractHolidayEntitlementRequest.md) | PaySpine Holiday Entitlements | [optional] **hourlyDecimals** | **int** | Number of decimal places to calculate Hourly Rates | [optional] -**dailyDivisor** | **float** | Days used to determine Full time Daily Rate | [optional] -**dailyDecimals** | **int** | Number of decimal places to calculate Daily Rates | [optional] -**annualDecimals** | **int** | Number of decimal places to calculate Annual Salaries | [optional] -**annualRoundingRule** | [**\SynergiTech\Staffology\Model\AnnualRoundingRule**](AnnualRoundingRule.md) | | [optional] +**hourlyDivisor** | **float** | Hours used to determine Hourly Rate | [optional] **incrementRule** | [**\SynergiTech\Staffology\Model\IncrementRule**](IncrementRule.md) | | [optional] -**requiresLondonAllowance** | **bool** | Requires LA column to be completed on the spine | [optional] -**gradeEffectiveDate** | **\DateTime** | Effective date for applicable grades | [optional] +**name** | **string** | Name of the Pay Spine | [optional] **pointEffectiveDate** | **\DateTime** | Effective date for applicable spinal points | [optional] +**requiresLondonAllowance** | **bool** | Requires LA column to be completed on the spine | [optional] +**salaryFormula** | **string** | Formula used to derive annual salary <remarks> The salary formula consists of the following elements and Round functions: - PointValue (The value of an individual Spinal Point) - HoursWorked (The hours an employee is contracted to work for in their role) - FTHours (The full time hours specified for an employee in their role) - WeeksWorked (The contracted weeks an employee works in their role) - FTWeeks (The full weeks specified for an employee in their role) Round functions: - ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15. - ROUNDUP(Value) - ROUNDDOWN(Value) - TRUNCATE(Value) </remarks><example> For example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" </example> | [optional] **useSpineHolidayRules** | **bool** | Flag to include holiday entitlements in Payspine (Default false) | [optional] -**holidayEntitlements** | [**\SynergiTech\Staffology\Model\ContractHolidayEntitlementRequest[]**](ContractHolidayEntitlementRequest.md) | PaySpine Holiday Entitlements | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPaySpineResponse.md b/docs/Model/ContractPaySpineResponse.md index 9f58a47..81934f1 100644 --- a/docs/Model/ContractPaySpineResponse.md +++ b/docs/Model/ContractPaySpineResponse.md @@ -4,22 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | Pay Spine identifier | [optional] -**name** | **string** | Name of the Pay Spine | [optional] +**annualDecimals** | **int** | Number of decimal places to calculate Annual Salaries | [optional] +**annualRoundingRule** | [**\SynergiTech\Staffology\Model\AnnualRoundingRule**](AnnualRoundingRule.md) | | [optional] +**dailyDecimals** | **int** | Number of decimal places to calculate Daily Rates | [optional] +**dailyDivisor** | **float** | Days used to determine Full time Daily Rate | [optional] **fullTimeHours** | **float** | Maximum Full Time Hours on this Pay Spine | [optional] **fullTimeWeeks** | **float** | Maximum Full Time Weeks on this Pay Spine | [optional] -**salaryFormula** | **string** | Formula used to derive annual salary <remarks> The salary formula consists of the following elements and Round functions: - PointValue (The value of an individual Spinal Point) - HoursWorked (The hours an employee is contracted to work for in their role) - FTHours (The full time hours specified for an employee in their role) - WeeksWorked (The contracted weeks an employee works in their role) - FTWeeks (The full weeks specified for an employee in their role) Round functions: - ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15. - ROUNDUP(Value) - ROUNDDOWN(Value) - TRUNCATE(Value) </remarks><example> For example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" </example> | [optional] -**hourlyDivisor** | **float** | Hours used to determine Hourly Rate | [optional] +**gradeEffectiveDate** | **\DateTime** | Effective date for applicable grades | [optional] +**holidayEntitlements** | [**\SynergiTech\Staffology\Model\ContractHolidayEntitlementResponse[]**](ContractHolidayEntitlementResponse.md) | | [optional] **hourlyDecimals** | **int** | Number of decimal places to calculate Hourly Rates | [optional] -**dailyDivisor** | **float** | Days used to determine Full time Daily Rate | [optional] -**dailyDecimals** | **int** | Number of decimal places to calculate Daily Rates | [optional] -**annualDecimals** | **int** | Number of decimal places to calculate Annual Salaries | [optional] -**annualRoundingRule** | [**\SynergiTech\Staffology\Model\AnnualRoundingRule**](AnnualRoundingRule.md) | | [optional] +**hourlyDivisor** | **float** | Hours used to determine Hourly Rate | [optional] +**id** | **string** | Pay Spine identifier | [optional] **incrementRule** | [**\SynergiTech\Staffology\Model\IncrementRule**](IncrementRule.md) | | [optional] -**requiresLondonAllowance** | **bool** | Requires LA column to be completed on the spine | [optional] -**gradeEffectiveDate** | **\DateTime** | Effective date for applicable grades | [optional] +**name** | **string** | Name of the Pay Spine | [optional] **pointEffectiveDate** | **\DateTime** | Effective date for applicable spinal points | [optional] +**requiresLondonAllowance** | **bool** | Requires LA column to be completed on the spine | [optional] +**salaryFormula** | **string** | Formula used to derive annual salary <remarks> The salary formula consists of the following elements and Round functions: - PointValue (The value of an individual Spinal Point) - HoursWorked (The hours an employee is contracted to work for in their role) - FTHours (The full time hours specified for an employee in their role) - WeeksWorked (The contracted weeks an employee works in their role) - FTWeeks (The full weeks specified for an employee in their role) Round functions: - ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15. - ROUNDUP(Value) - ROUNDDOWN(Value) - TRUNCATE(Value) </remarks><example> For example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" </example> | [optional] **useSpineHolidayRules** | **bool** | Flag to include holiday entitlements in Payspine (Default false) | [optional] -**holidayEntitlements** | [**\SynergiTech\Staffology\Model\ContractHolidayEntitlementResponse[]**](ContractHolidayEntitlementResponse.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPaySpineUpdateRequest.md b/docs/Model/ContractPaySpineUpdateRequest.md index 7b1c6ac..bcd6b95 100644 --- a/docs/Model/ContractPaySpineUpdateRequest.md +++ b/docs/Model/ContractPaySpineUpdateRequest.md @@ -4,21 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Name of the Pay Spine | [optional] +**annualDecimals** | **int** | Number of decimal places to calculate Annual Salaries | [optional] +**annualRoundingRule** | [**\SynergiTech\Staffology\Model\AnnualRoundingRule**](AnnualRoundingRule.md) | | [optional] +**dailyDecimals** | **int** | Number of decimal places to calculate Daily Rates | [optional] +**dailyDivisor** | **float** | Days used to determine Full time Daily Rate | [optional] **fullTimeHours** | **float** | Maximum Full Time Hours on this Pay Spine | [optional] **fullTimeWeeks** | **float** | Maximum Full Time Weeks on this Pay Spine | [optional] -**salaryFormula** | **string** | Formula used to derive annual salary <remarks> The salary formula consists of the following elements and Round functions: - PointValue (The value of an individual Spinal Point) - HoursWorked (The hours an employee is contracted to work for in their role) - FTHours (The full time hours specified for an employee in their role) - WeeksWorked (The contracted weeks an employee works in their role) - FTWeeks (The full weeks specified for an employee in their role) Round functions: - ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15. - ROUNDUP(Value) - ROUNDDOWN(Value) - TRUNCATE(Value) </remarks><example> For example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" </example> | [optional] -**hourlyDivisor** | **float** | Hours used to determine Hourly Rate | [optional] +**gradeEffectiveDate** | **\DateTime** | Effective date for applicable grades | [optional] +**holidayEntitlements** | [**\SynergiTech\Staffology\Model\ContractHolidayEntitlementUpdateRequest[]**](ContractHolidayEntitlementUpdateRequest.md) | PaySpine Holiday Entitlements | [optional] **hourlyDecimals** | **int** | Number of decimal places to calculate Hourly Rates | [optional] -**dailyDivisor** | **float** | Days used to determine Full time Daily Rate | [optional] -**dailyDecimals** | **int** | Number of decimal places to calculate Daily Rates | [optional] -**annualDecimals** | **int** | Number of decimal places to calculate Annual Salaries | [optional] -**annualRoundingRule** | [**\SynergiTech\Staffology\Model\AnnualRoundingRule**](AnnualRoundingRule.md) | | [optional] +**hourlyDivisor** | **float** | Hours used to determine Hourly Rate | [optional] **incrementRule** | [**\SynergiTech\Staffology\Model\IncrementRule**](IncrementRule.md) | | [optional] -**requiresLondonAllowance** | **bool** | Requires LA column to be completed on the spine | [optional] -**gradeEffectiveDate** | **\DateTime** | Effective date for applicable grades | [optional] +**name** | **string** | Name of the Pay Spine | [optional] **pointEffectiveDate** | **\DateTime** | Effective date for applicable spinal points | [optional] +**requiresLondonAllowance** | **bool** | Requires LA column to be completed on the spine | [optional] +**salaryFormula** | **string** | Formula used to derive annual salary <remarks> The salary formula consists of the following elements and Round functions: - PointValue (The value of an individual Spinal Point) - HoursWorked (The hours an employee is contracted to work for in their role) - FTHours (The full time hours specified for an employee in their role) - WeeksWorked (The contracted weeks an employee works in their role) - FTWeeks (The full weeks specified for an employee in their role) Round functions: - ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15. - ROUNDUP(Value) - ROUNDDOWN(Value) - TRUNCATE(Value) </remarks><example> For example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" </example> | [optional] **useSpineHolidayRules** | **bool** | Flag to include holiday entitlements in Payspine (Default false) | [optional] -**holidayEntitlements** | [**\SynergiTech\Staffology\Model\ContractHolidayEntitlementUpdateRequest[]**](ContractHolidayEntitlementUpdateRequest.md) | PaySpine Holiday Entitlements | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPaylineAnalysisCategoriesCodes.md b/docs/Model/ContractPaylineAnalysisCategoriesCodes.md index f92f72d..ea3fd0d 100644 --- a/docs/Model/ContractPaylineAnalysisCategoriesCodes.md +++ b/docs/Model/ContractPaylineAnalysisCategoriesCodes.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **analysisCategory** | **string** | AnalysisCategory Model | [optional] **analysisCategoryCode** | **string** | AnalysisCategoryCode Model | [optional] -**analysisCategoryId** | **string** | AnalysisCategory Identifier | [optional] **analysisCategoryCodeId** | **string** | AnalysisCategoryCode Identifier | [optional] +**analysisCategoryId** | **string** | AnalysisCategory Identifier | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPaylineRequest.md b/docs/Model/ContractPaylineRequest.md index 5be3d8c..33149dd 100644 --- a/docs/Model/ContractPaylineRequest.md +++ b/docs/Model/ContractPaylineRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**analysisCategoryCodeIds** | **string[]** | List of analysis category code unique ids. | [optional] **analysisCategoriesCodes** | [**\SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]**](ContractPaylineAnalysisCategoriesCodes.md) | List of analysis category ids and analysis category code ids. | [optional] +**analysisCategoryCodeIds** | **string[]** | List of analysis category code unique ids. | [optional] **annualValue** | **float** | The original value from the PayLine before we modify it. Currently only used when CalculationType is set to FixedAnnualAmount so we can determine whether the payline value needs calculating or not. To recalculate set to null with annual amount recorded in Value. | [optional] **autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling midway through a PayRun. | [optional] **calculateAsWhenPaid** | **bool** | Indicates whether this pay line should be treated as When Paid rather than When Earned. | [optional] @@ -38,8 +38,8 @@ Name | Type | Description | Notes **percentageOfEffectiveDays** | **float** | The percentage of working days the effective dates span for pro-rata values, calculated and set during each payrun. | [optional] **rate** | **float** | If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used. | [optional] **roleId** | **string** | The employee role which is associated with this pay line. If set to null, the pay line is not related with a role. | [optional] -**spinePoint** | **string** | SpinePoint for imported pay lines | [optional] **spinalPointId** | **string** | The Id of the associated spinal point. | [optional] +**spinePoint** | **string** | SpinePoint for imported pay lines | [optional] **tags** | **string[]** | Tags related to this line. | [optional] **targetNetToGrossValue** | **float** | The orginal net fixed addition amount that is considered to be a take home pay target. | [optional] **totalPaidDays** | **float** | The total paid days. | [optional] diff --git a/docs/Model/ContractPaymentImportRequest.md b/docs/Model/ContractPaymentImportRequest.md new file mode 100644 index 0000000..6235b97 --- /dev/null +++ b/docs/Model/ContractPaymentImportRequest.md @@ -0,0 +1,31 @@ +# # ContractPaymentImportRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **float** | The amount regularly paid to the Employee | [optional] +**contributesToBasicPay** | **bool** | ContributesToBasicPay for imported pay lines Only import if 'Effective date salary changes' is enabled | [optional] +**costCentre** | **string** | Associated costcentre of the employee | [optional] +**days** | **float** | Payment Days | [optional] +**department** | **string** | Associated department of the employee | [optional] +**description** | **string** | Description | [optional] +**effectiveFrom** | **\DateTime** | EffectiveFrom date for imported pay lines | [optional] +**effectiveTo** | **\DateTime** | EffectiveTo date for imported pay lines | [optional] +**hours** | **float** | Payment Hours | [optional] +**isAlreadyPaid** | **bool** | IsAlreadyPaid Only import if 'Effective date salary changes' is enabled | [optional] +**isAutomaticBackPay** | **bool** | IsAutomaticBackPay for imported pay lines Only import if 'Effective date salary changes' is enabled | [optional] +**isNetToGross** | **bool** | IsNetToGross (True/False) | [optional] +**londonAllowance** | [**\SynergiTech\Staffology\Model\LondonAllowanceType**](LondonAllowanceType.md) | | [optional] +**payCode** | **string** | If you want to override the PayCode used for the Basic Pay then set the code here, otherwise leave this blank and the default will be used. | [optional] +**payGrade** | **string** | PayGrade for imported pay lines Only import if Pay Spines exist | [optional] +**paySpine** | **string** | PaySpine for imported pay lines Only import if Pay Spines exist | [optional] +**payrollCode** | **string** | The payroll code of the employee to update | [optional] +**percentage** | **float** | Perentage | [optional] +**proRataAdjustments** | **bool** | ProRataAdjustments (True/False) | [optional] +**roleReference** | **string** | This is the unique reference of the Role that the employee is assigned to. Only import if 'Multi-Role Settings' are enabled | [optional] +**spinalPoint** | **string** | SpinePoint for imported pay lines Only import if Pay Spines exist | [optional] +**treatAsWhenPaid** | **bool** | Only import if 'Education settings' are enabled | [optional] +**uniqueId** | **string** | Optional. If value is provided then update else create payline. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayrollSquadEmployerRequest.md b/docs/Model/ContractPayrollSquadEmployerRequest.md index 93c7023..7677baf 100644 --- a/docs/Model/ContractPayrollSquadEmployerRequest.md +++ b/docs/Model/ContractPayrollSquadEmployerRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollSquadId** | **string** | UniqueId of Payroll Squad | [optional] **employerIds** | **string[]** | UniqueIds of Employers | [optional] +**payrollSquadId** | **string** | UniqueId of Payroll Squad | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayrollSquadEmployerResponse.md b/docs/Model/ContractPayrollSquadEmployerResponse.md index 3733085..56f189e 100644 --- a/docs/Model/ContractPayrollSquadEmployerResponse.md +++ b/docs/Model/ContractPayrollSquadEmployerResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | Payroll Squad Employer Id | [optional] **employerId** | **string** | Employer Id | [optional] +**id** | **string** | Payroll Squad Employer Id | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayrollSquadMemberRequest.md b/docs/Model/ContractPayrollSquadMemberRequest.md index dc7cc86..97a0f12 100644 --- a/docs/Model/ContractPayrollSquadMemberRequest.md +++ b/docs/Model/ContractPayrollSquadMemberRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**userId** | **string** | Payroll Squad Selected UserId | [optional] **payrollSquadId** | **string** | UniqueId of Payroll Squad | [optional] **role** | [**\SynergiTech\Staffology\Model\UserRole**](UserRole.md) | | [optional] +**userId** | **string** | Payroll Squad Selected UserId | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayrollSquadMemberResponse.md b/docs/Model/ContractPayrollSquadMemberResponse.md index ca3ba4a..1e9557e 100644 --- a/docs/Model/ContractPayrollSquadMemberResponse.md +++ b/docs/Model/ContractPayrollSquadMemberResponse.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | Payroll Squad Member Identifier | [optional] -**userId** | **string** | Payroll Squad User Identifier | [optional] **displayName** | **string** | Payroll Squad Member DisplayName | [optional] **emailAddress** | **string** | Payroll Squad Member EmailAddress | [optional] +**id** | **string** | Payroll Squad Member Identifier | [optional] **lastLogin** | **\DateTime** | Payroll Squad Member LastLogin | [optional] **role** | [**\SynergiTech\Staffology\Model\UserRole**](UserRole.md) | | [optional] +**userId** | **string** | Payroll Squad User Identifier | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayrollSquadRequest.md b/docs/Model/ContractPayrollSquadRequest.md index 9f5c322..8101d68 100644 --- a/docs/Model/ContractPayrollSquadRequest.md +++ b/docs/Model/ContractPayrollSquadRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Name of Payroll Squad | [optional] **employerIds** | **string[]** | Employer ids of Payroll Squad | [optional] +**name** | **string** | Name of Payroll Squad | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPayrollSquadResponse.md b/docs/Model/ContractPayrollSquadResponse.md index b79c887..3210b05 100644 --- a/docs/Model/ContractPayrollSquadResponse.md +++ b/docs/Model/ContractPayrollSquadResponse.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**employers** | [**\SynergiTech\Staffology\Model\ContractEmployerBase[]**](ContractEmployerBase.md) | List of all Employers | [optional] **id** | **string** | Payroll Squad Identifier | [optional] -**tenantId** | **string** | Current Tenant Id | [optional] **members** | [**\SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse[]**](ContractPayrollSquadMemberResponse.md) | List of all Members | [optional] -**employers** | [**\SynergiTech\Staffology\Model\ContractEmployerBase[]**](ContractEmployerBase.md) | List of all Employers | [optional] **name** | **string** | Name of Payroll Squad | [optional] +**tenantId** | **string** | Current Tenant Id | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionAdministratorRequest.md b/docs/Model/ContractPensionAdministratorRequest.md index d99c451..1f5e304 100644 --- a/docs/Model/ContractPensionAdministratorRequest.md +++ b/docs/Model/ContractPensionAdministratorRequest.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] +**email** | **string** | | [optional] **id** | **string** | | [optional] **name** | **string** | | [optional] -**email** | **string** | | [optional] -**address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] **telephone** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionAdministratorResponse.md b/docs/Model/ContractPensionAdministratorResponse.md index 5bca6f1..93644fe 100644 --- a/docs/Model/ContractPensionAdministratorResponse.md +++ b/docs/Model/ContractPensionAdministratorResponse.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] +**email** | **string** | | [optional] **id** | **string** | | [optional] **name** | **string** | | [optional] -**email** | **string** | | [optional] -**address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] **telephone** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionProviderRequest.md b/docs/Model/ContractPensionProviderRequest.md index 7e1094b..8ab461a 100644 --- a/docs/Model/ContractPensionProviderRequest.md +++ b/docs/Model/ContractPensionProviderRequest.md @@ -4,24 +4,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | | [optional] -**name** | **string** | | [optional] **accountNo** | **string** | | [optional] -**portal** | **string** | | [optional] -**website** | **string** | | [optional] **address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] -**telephone** | **string** | | [optional] -**papdisVersion** | [**\SynergiTech\Staffology\Model\PapdisVersion**](PapdisVersion.md) | | [optional] -**papdisProviderId** | **string** | | [optional] -**papdisEmployerId** | **string** | | [optional] **csvFormat** | [**\SynergiTech\Staffology\Model\PensionCsvFormat**](PensionCsvFormat.md) | | [optional] **excludeNilPaidFromContributions** | **bool** | If we're sending contributions to an external provider then we'll include all employees that were on the payrun. If you want to exclude employees that don't have any contributions to report then set this to true. | [optional] -**payPeriodDateAdjustment** | **int** | If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here. A negative value of will move the date back in time. | [optional] +**id** | **string** | | [optional] **miscBoolean1** | **bool** | This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\" | [optional] **miscBoolean2** | **bool** | This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not to approve payments after submitting contributions | [optional] **miscString1** | **string** | This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it dictates the PaymentSource. | [optional] **miscString2** | **string** | This field has different uses dependent on the ExternalDataProvider, if any. | [optional] +**name** | **string** | | [optional] **optOutWindow** | **int** | The number of days or months that an employee has to Opt out after being enrolled | [optional] **optOutWindowIsMonths** | **bool** | Determines whether the value given for OptOutWindow is in Months (true) or days (false) | [optional] +**papdisEmployerId** | **string** | | [optional] +**papdisProviderId** | **string** | | [optional] +**papdisVersion** | [**\SynergiTech\Staffology\Model\PapdisVersion**](PapdisVersion.md) | | [optional] +**payPeriodDateAdjustment** | **int** | If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here. A negative value of will move the date back in time. | [optional] +**portal** | **string** | | [optional] +**telephone** | **string** | | [optional] +**website** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionProviderResponse.md b/docs/Model/ContractPensionProviderResponse.md index 9dd06ad..ac6d876 100644 --- a/docs/Model/ContractPensionProviderResponse.md +++ b/docs/Model/ContractPensionProviderResponse.md @@ -4,24 +4,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | | [optional] -**name** | **string** | | [optional] **accountNo** | **string** | | [optional] -**portal** | **string** | | [optional] -**website** | **string** | | [optional] **address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] -**telephone** | **string** | | [optional] -**papdisVersion** | [**\SynergiTech\Staffology\Model\PapdisVersion**](PapdisVersion.md) | | [optional] -**papdisProviderId** | **string** | | [optional] -**papdisEmployerId** | **string** | | [optional] **csvFormat** | [**\SynergiTech\Staffology\Model\PensionCsvFormat**](PensionCsvFormat.md) | | [optional] **excludeNilPaidFromContributions** | **bool** | If we're sending contributions to an external provider then we'll include all employees that were on the payrun. If you want to exclude employees that don't have any contributions to report then set this to true. | [optional] -**payPeriodDateAdjustment** | **int** | If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here. A negative value of will move the date back in time. | [optional] +**id** | **string** | | [optional] **miscBoolean1** | **bool** | This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\" | [optional] **miscBoolean2** | **bool** | This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not to approve payments after submitting contributions | [optional] **miscString1** | **string** | This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it dictates the PaymentSource. | [optional] **miscString2** | **string** | This field has different uses dependent on the ExternalDataProvider, if any. | [optional] +**name** | **string** | | [optional] **optOutWindow** | **int** | The number of days or months that an employee has to Opt out after being enrolled | [optional] **optOutWindowIsMonths** | **bool** | Determines whether the value given for OptOutWindow is in Months (true) or days (false) | [optional] +**papdisEmployerId** | **string** | | [optional] +**papdisProviderId** | **string** | | [optional] +**papdisVersion** | [**\SynergiTech\Staffology\Model\PapdisVersion**](PapdisVersion.md) | | [optional] +**payPeriodDateAdjustment** | **int** | If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here. A negative value of will move the date back in time. | [optional] +**portal** | **string** | | [optional] +**telephone** | **string** | | [optional] +**website** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionSchemeNominalCodeMappingRequest.md b/docs/Model/ContractPensionSchemeNominalCodeMappingRequest.md index 6745194..284cb2c 100644 --- a/docs/Model/ContractPensionSchemeNominalCodeMappingRequest.md +++ b/docs/Model/ContractPensionSchemeNominalCodeMappingRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**journalNarrative** | **string** | | [optional] **nominalCode** | **string** | | [optional] **nominalName** | **string** | | [optional] -**journalNarrative** | **string** | | [optional] **payCode** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionSchemeNominalCodeMappingResponse.md b/docs/Model/ContractPensionSchemeNominalCodeMappingResponse.md index bc3f202..6c48fe8 100644 --- a/docs/Model/ContractPensionSchemeNominalCodeMappingResponse.md +++ b/docs/Model/ContractPensionSchemeNominalCodeMappingResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**journalNarrative** | **string** | Journal narrative description. | [optional] **nominalCode** | **string** | Nominal Code for pension scheme | [optional] **nominalName** | **string** | Nominal Name | [optional] -**journalNarrative** | **string** | Journal narrative description. | [optional] **payCode** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest.md b/docs/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest.md index b093126..a85e3cc 100644 --- a/docs/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest.md +++ b/docs/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollNumber** | [**\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber**](LgpsCivicaPayrollNumber.md) | | [optional] +**addressesForNewJoinersOnly** | **bool** | | [optional] **casualHours** | [**\SynergiTech\Staffology\Model\LgpsCivicaCasualHours**](LgpsCivicaCasualHours.md) | | [optional] -**omitHeaderLine** | **bool** | | [optional] -**includeFolderNo** | **bool** | | [optional] **excludeSchoolEmployerName** | **bool** | | [optional] -**addressesForNewJoinersOnly** | **bool** | | [optional] -**proRatePtHoursWeeksWorked** | **bool** | | [optional] **fullTimeHoursAsOneHundred** | **bool** | | [optional] +**includeFolderNo** | **bool** | | [optional] **includeWeeksWorkedColumns** | **bool** | | [optional] +**omitHeaderLine** | **bool** | | [optional] +**payrollNumber** | [**\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber**](LgpsCivicaPayrollNumber.md) | | [optional] +**proRatePtHoursWeeksWorked** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse.md b/docs/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse.md index 3d776c0..47bd0b8 100644 --- a/docs/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse.md +++ b/docs/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollNumber** | [**\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber**](LgpsCivicaPayrollNumber.md) | | [optional] +**addressesForNewJoinersOnly** | **bool** | | [optional] **casualHours** | [**\SynergiTech\Staffology\Model\LgpsCivicaCasualHours**](LgpsCivicaCasualHours.md) | | [optional] -**omitHeaderLine** | **bool** | | [optional] -**includeFolderNo** | **bool** | | [optional] **excludeSchoolEmployerName** | **bool** | | [optional] -**addressesForNewJoinersOnly** | **bool** | | [optional] -**proRatePtHoursWeeksWorked** | **bool** | | [optional] **fullTimeHoursAsOneHundred** | **bool** | | [optional] +**includeFolderNo** | **bool** | | [optional] **includeWeeksWorkedColumns** | **bool** | | [optional] +**omitHeaderLine** | **bool** | | [optional] +**payrollNumber** | [**\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber**](LgpsCivicaPayrollNumber.md) | | [optional] +**proRatePtHoursWeeksWorked** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionSchemeReportOptionsLgpsIConnectRequest.md b/docs/Model/ContractPensionSchemeReportOptionsLgpsIConnectRequest.md index 9528641..b5f3e92 100644 --- a/docs/Model/ContractPensionSchemeReportOptionsLgpsIConnectRequest.md +++ b/docs/Model/ContractPensionSchemeReportOptionsLgpsIConnectRequest.md @@ -4,28 +4,28 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**breakReasonSmpIndicatorOnly** | **bool** | | [optional] +**casualStaffHoursAsOne** | **bool** | | [optional] +**casualStaffIndicatorAsY** | **bool** | | [optional] +**customText** | **string** | | [optional] **fileType** | [**\SynergiTech\Staffology\Model\LgpsIConnectFileType**](LgpsIConnectFileType.md) | | [optional] +**forceUpperCase** | **bool** | | [optional] +**ignoreHours** | **bool** | | [optional] +**ignoreTermTimeWeeksForFteFinalPay** | **bool** | | [optional] +**includeAeQualifyingEarnings** | **bool** | | [optional] +**includeEmploymentBreaks** | **bool** | | [optional] **payrollReference1** | [**\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference**](LgpsIConnectPayrollReference.md) | | [optional] **payrollReference2** | [**\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference**](LgpsIConnectPayrollReference.md) | | [optional] **payrollReference3** | [**\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference**](LgpsIConnectPayrollReference.md) | | [optional] **populateEmailAddress** | **bool** | | [optional] -**populateTelephoneNumber** | **bool** | | [optional] +**populateMaritalStatus** | **bool** | | [optional] **populateMobileNumber** | **bool** | | [optional] -**populateWorksPlaceName** | **bool** | | [optional] +**populateTelephoneNumber** | **bool** | | [optional] **populateWorksAddress** | **bool** | | [optional] **populateWorksEmailAddress** | **bool** | | [optional] -**includeEmploymentBreaks** | **bool** | | [optional] -**breakReasonSmpIndicatorOnly** | **bool** | | [optional] -**populateMaritalStatus** | **bool** | | [optional] -**includeAeQualifyingEarnings** | **bool** | | [optional] +**populateWorksPlaceName** | **bool** | | [optional] **proRatePtHoursByTermTimeWeeks** | **bool** | | [optional] -**ignoreTermTimeWeeksForFteFinalPay** | **bool** | | [optional] -**showFteAnnualSalaryForFteFinalPay** | **bool** | | [optional] -**casualStaffHoursAsOne** | **bool** | | [optional] -**casualStaffIndicatorAsY** | **bool** | | [optional] -**ignoreHours** | **bool** | | [optional] -**forceUpperCase** | **bool** | | [optional] **salaryType** | [**\SynergiTech\Staffology\Model\LgpsIConnectSalaryType**](LgpsIConnectSalaryType.md) | | [optional] -**customText** | **string** | | [optional] +**showFteAnnualSalaryForFteFinalPay** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionSchemeReportOptionsLgpsIConnectResponse.md b/docs/Model/ContractPensionSchemeReportOptionsLgpsIConnectResponse.md index fc73acb..04e4350 100644 --- a/docs/Model/ContractPensionSchemeReportOptionsLgpsIConnectResponse.md +++ b/docs/Model/ContractPensionSchemeReportOptionsLgpsIConnectResponse.md @@ -4,28 +4,28 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**breakReasonSmpIndicatorOnly** | **bool** | | [optional] +**casualStaffHoursAsOne** | **bool** | | [optional] +**casualStaffIndicatorAsY** | **bool** | | [optional] +**customText** | **string** | | [optional] **fileType** | [**\SynergiTech\Staffology\Model\LgpsIConnectFileType**](LgpsIConnectFileType.md) | | [optional] +**forceUpperCase** | **bool** | | [optional] +**ignoreHours** | **bool** | | [optional] +**ignoreTermTimeWeeksForFteFinalPay** | **bool** | | [optional] +**includeAeQualifyingEarnings** | **bool** | | [optional] +**includeEmploymentBreaks** | **bool** | | [optional] **payrollReference1** | [**\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference**](LgpsIConnectPayrollReference.md) | | [optional] **payrollReference2** | [**\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference**](LgpsIConnectPayrollReference.md) | | [optional] **payrollReference3** | [**\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference**](LgpsIConnectPayrollReference.md) | | [optional] **populateEmailAddress** | **bool** | | [optional] -**populateTelephoneNumber** | **bool** | | [optional] +**populateMaritalStatus** | **bool** | | [optional] **populateMobileNumber** | **bool** | | [optional] -**populateWorksPlaceName** | **bool** | | [optional] +**populateTelephoneNumber** | **bool** | | [optional] **populateWorksAddress** | **bool** | | [optional] **populateWorksEmailAddress** | **bool** | | [optional] -**includeEmploymentBreaks** | **bool** | | [optional] -**breakReasonSmpIndicatorOnly** | **bool** | | [optional] -**populateMaritalStatus** | **bool** | | [optional] -**includeAeQualifyingEarnings** | **bool** | | [optional] +**populateWorksPlaceName** | **bool** | | [optional] **proRatePtHoursByTermTimeWeeks** | **bool** | | [optional] -**ignoreTermTimeWeeksForFteFinalPay** | **bool** | | [optional] -**showFteAnnualSalaryForFteFinalPay** | **bool** | | [optional] -**casualStaffHoursAsOne** | **bool** | | [optional] -**casualStaffIndicatorAsY** | **bool** | | [optional] -**ignoreHours** | **bool** | | [optional] -**forceUpperCase** | **bool** | | [optional] **salaryType** | [**\SynergiTech\Staffology\Model\LgpsIConnectSalaryType**](LgpsIConnectSalaryType.md) | | [optional] -**customText** | **string** | | [optional] +**showFteAnnualSalaryForFteFinalPay** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionSchemeRequest.md b/docs/Model/ContractPensionSchemeRequest.md index d92abd0..a76997d 100644 --- a/docs/Model/ContractPensionSchemeRequest.md +++ b/docs/Model/ContractPensionSchemeRequest.md @@ -4,37 +4,37 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**administrator** | [**\SynergiTech\Staffology\Model\ContractPensionAdministratorRequest**](ContractPensionAdministratorRequest.md) | | [optional] +**bankDetails** | [**\SynergiTech\Staffology\Model\ContractBankDetails**](ContractBankDetails.md) | | [optional] +**customPayCodes** | **string[]** | If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code that we'll treat as being pensionable. | [optional] +**deficitValue** | **float** | The Defict value that will be deducted in a PaySchedule | [optional] +**deficitValueOrdinal** | **int** | The Ordinal used to identify the PaySchedule which the Deficit will be against | [optional] +**deficitValuePayPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**disableAeLetters** | **bool** | Set to true if the provider deals with AutoEnrolment Letters and therefore the system should not generate them | [optional] +**displayName** | **string** | | [optional] [readonly] +**externalDataCompany** | [**\SynergiTech\Staffology\Model\ContractExternalDataCompanyRequest**](ContractExternalDataCompanyRequest.md) | | [optional] +**externalDataProviderId** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] **id** | **string** | | [optional] +**includeDeficitValue** | **bool** | Set to true if this a Deficit Payment needs to be assigned to a PaySchedule | [optional] **name** | **string** | | [optional] -**provider** | [**\SynergiTech\Staffology\Model\ContractPensionProviderRequest**](ContractPensionProviderRequest.md) | | [optional] -**administrator** | [**\SynergiTech\Staffology\Model\ContractPensionAdministratorRequest**](ContractPensionAdministratorRequest.md) | | [optional] +**nominalCodeMappings** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingRequest[]**](ContractPensionSchemeNominalCodeMappingRequest.md) | The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration | [optional] +**payCodeSetUniqueId** | **string** | | [optional] +**payCodeType** | [**\SynergiTech\Staffology\Model\PensionPayCode**](PensionPayCode.md) | | [optional] +**payMethod** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] +**paymentDateDayOfMonth** | **int** | | [optional] +**paymentDateDayOfWeek** | [**\SynergiTech\Staffology\Model\DayOfWeek**](DayOfWeek.md) | | [optional] +**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] **pensionRule** | [**\SynergiTech\Staffology\Model\PensionRule**](PensionRule.md) | | [optional] +**provider** | [**\SynergiTech\Staffology\Model\ContractPensionProviderRequest**](ContractPensionProviderRequest.md) | | [optional] **qualifyingScheme** | **bool** | Set to true if this is a Qualifying Scheme for Auto Enrolment | [optional] -**disableAeLetters** | **bool** | Set to true if the provider deals with AutoEnrolment Letters and therefore the system should not generate them | [optional] +**reportOptionsLgpsCivicaUpm** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest**](ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest.md) | | [optional] +**reportOptionsLgpsIConnect** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsIConnectRequest**](ContractPensionSchemeReportOptionsLgpsIConnectRequest.md) | | [optional] **subtractBasicRateTax** | **bool** | | [optional] -**payMethod** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] -**bankDetails** | [**\SynergiTech\Staffology\Model\ContractBankDetails**](ContractBankDetails.md) | | [optional] +**tierablePayCustomPayCodes** | **string[]** | If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code that we'll treat as being tierable. | [optional] +**tierablePayPayCodeSetUniqueId** | **string** | | [optional] +**tierablePayPayCodeType** | [**\SynergiTech\Staffology\Model\PensionPayCode**](PensionPayCode.md) | | [optional] **useCustomPayCodes** | **bool** | If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable we'll instead treat it as pensionable if the Code is included in CustomPayCodes | [optional] **useCustomPayCodesForTierablePay** | **bool** | If set to true then rather than using the setting on the PayCode to determine if the pay is tierable we'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes | [optional] -**customPayCodes** | **string[]** | If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code that we'll treat as being pensionable. | [optional] -**tierablePayCustomPayCodes** | **string[]** | If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code that we'll treat as being tierable. | [optional] **workerGroups** | [**\SynergiTech\Staffology\Model\ContractWorkerGroupRequest[]**](ContractWorkerGroupRequest.md) | A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup | [optional] -**externalDataProviderId** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] -**externalDataCompany** | [**\SynergiTech\Staffology\Model\ContractExternalDataCompanyRequest**](ContractExternalDataCompanyRequest.md) | | [optional] -**displayName** | **string** | | [optional] [readonly] -**payCodeType** | [**\SynergiTech\Staffology\Model\PensionPayCode**](PensionPayCode.md) | | [optional] -**tierablePayPayCodeType** | [**\SynergiTech\Staffology\Model\PensionPayCode**](PensionPayCode.md) | | [optional] -**payCodeSetUniqueId** | **string** | | [optional] -**tierablePayPayCodeSetUniqueId** | **string** | | [optional] -**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] -**paymentDateDayOfWeek** | [**\SynergiTech\Staffology\Model\DayOfWeek**](DayOfWeek.md) | | [optional] -**paymentDateDayOfMonth** | **int** | | [optional] -**reportOptionsLgpsIConnect** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsIConnectRequest**](ContractPensionSchemeReportOptionsLgpsIConnectRequest.md) | | [optional] -**reportOptionsLgpsCivicaUpm** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest**](ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest.md) | | [optional] -**deficitValueOrdinal** | **int** | The Ordinal used to identify the PaySchedule which the Deficit will be against | [optional] -**deficitValue** | **float** | The Defict value that will be deducted in a PaySchedule | [optional] -**includeDeficitValue** | **bool** | Set to true if this a Deficit Payment needs to be assigned to a PaySchedule | [optional] -**deficitValuePayPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**nominalCodeMappings** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingRequest[]**](ContractPensionSchemeNominalCodeMappingRequest.md) | The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionSchemeResponse.md b/docs/Model/ContractPensionSchemeResponse.md index 447d6de..8b931b6 100644 --- a/docs/Model/ContractPensionSchemeResponse.md +++ b/docs/Model/ContractPensionSchemeResponse.md @@ -4,37 +4,37 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**administrator** | [**\SynergiTech\Staffology\Model\ContractPensionAdministratorResponse**](ContractPensionAdministratorResponse.md) | | [optional] +**bankDetails** | [**\SynergiTech\Staffology\Model\ContractBankDetails**](ContractBankDetails.md) | | [optional] +**customPayCodes** | **string[]** | If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code that we'll treat as being pensionable. | [optional] +**deficitValue** | **float** | The Defict value that will be deducted in a PaySchedule | [optional] +**deficitValueOrdinal** | **int** | The Ordinal used to identify the PaySchedule which the Deficit will be against | [optional] +**deficitValuePayPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**disableAeLetters** | **bool** | Set to true if the provider deals with AutoEnrolment Letters and therefore the system should not generate them | [optional] +**displayName** | **string** | | [optional] [readonly] +**externalDataCompany** | [**\SynergiTech\Staffology\Model\ContractExternalDataCompanyResponse**](ContractExternalDataCompanyResponse.md) | | [optional] +**externalDataProviderId** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] **id** | **string** | | [optional] +**includeDeficitValue** | **bool** | Set to true if this a Deficit Payment needs to be assigned to a PaySchedule | [optional] **name** | **string** | | [optional] -**provider** | [**\SynergiTech\Staffology\Model\ContractPensionProviderResponse**](ContractPensionProviderResponse.md) | | [optional] -**administrator** | [**\SynergiTech\Staffology\Model\ContractPensionAdministratorResponse**](ContractPensionAdministratorResponse.md) | | [optional] +**nominalCodeMappings** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingResponse[]**](ContractPensionSchemeNominalCodeMappingResponse.md) | The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration | [optional] +**payCodeSetUniqueId** | **string** | | [optional] +**payCodeType** | [**\SynergiTech\Staffology\Model\PensionPayCode**](PensionPayCode.md) | | [optional] +**payMethod** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] +**paymentDateDayOfMonth** | **int** | | [optional] +**paymentDateDayOfWeek** | [**\SynergiTech\Staffology\Model\DayOfWeek**](DayOfWeek.md) | | [optional] +**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] **pensionRule** | [**\SynergiTech\Staffology\Model\PensionRule**](PensionRule.md) | | [optional] +**provider** | [**\SynergiTech\Staffology\Model\ContractPensionProviderResponse**](ContractPensionProviderResponse.md) | | [optional] **qualifyingScheme** | **bool** | Set to true if this is a Qualifying Scheme for Auto Enrolment | [optional] -**disableAeLetters** | **bool** | Set to true if the provider deals with AutoEnrolment Letters and therefore the system should not generate them | [optional] +**reportOptionsLgpsCivicaUpm** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse**](ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse.md) | | [optional] +**reportOptionsLgpsIConnect** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsIConnectResponse**](ContractPensionSchemeReportOptionsLgpsIConnectResponse.md) | | [optional] **subtractBasicRateTax** | **bool** | | [optional] -**payMethod** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] -**bankDetails** | [**\SynergiTech\Staffology\Model\ContractBankDetails**](ContractBankDetails.md) | | [optional] +**tierablePayCustomPayCodes** | **string[]** | If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code that we'll treat as being tierable. | [optional] +**tierablePayPayCodeSetUniqueId** | **string** | | [optional] +**tierablePayPayCodeType** | [**\SynergiTech\Staffology\Model\PensionPayCode**](PensionPayCode.md) | | [optional] **useCustomPayCodes** | **bool** | If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable we'll instead treat it as pensionable if the Code is included in CustomPayCodes | [optional] **useCustomPayCodesForTierablePay** | **bool** | If set to true then rather than using the setting on the PayCode to determine if the pay is tierable we'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes | [optional] -**customPayCodes** | **string[]** | If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code that we'll treat as being pensionable. | [optional] -**tierablePayCustomPayCodes** | **string[]** | If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code that we'll treat as being tierable. | [optional] **workerGroups** | [**\SynergiTech\Staffology\Model\ContractWorkerGroupResponse[]**](ContractWorkerGroupResponse.md) | A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup | [optional] -**externalDataProviderId** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] -**externalDataCompany** | [**\SynergiTech\Staffology\Model\ContractExternalDataCompanyResponse**](ContractExternalDataCompanyResponse.md) | | [optional] -**displayName** | **string** | | [optional] [readonly] -**payCodeType** | [**\SynergiTech\Staffology\Model\PensionPayCode**](PensionPayCode.md) | | [optional] -**tierablePayPayCodeType** | [**\SynergiTech\Staffology\Model\PensionPayCode**](PensionPayCode.md) | | [optional] -**payCodeSetUniqueId** | **string** | | [optional] -**tierablePayPayCodeSetUniqueId** | **string** | | [optional] -**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] -**paymentDateDayOfWeek** | [**\SynergiTech\Staffology\Model\DayOfWeek**](DayOfWeek.md) | | [optional] -**paymentDateDayOfMonth** | **int** | | [optional] -**reportOptionsLgpsIConnect** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsIConnectResponse**](ContractPensionSchemeReportOptionsLgpsIConnectResponse.md) | | [optional] -**reportOptionsLgpsCivicaUpm** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse**](ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse.md) | | [optional] -**deficitValueOrdinal** | **int** | The Ordinal used to identify the PaySchedule which the Deficit will be against | [optional] -**deficitValue** | **float** | The Defict value that will be deducted in a PaySchedule | [optional] -**includeDeficitValue** | **bool** | Set to true if this a Deficit Payment needs to be assigned to a PaySchedule | [optional] -**deficitValuePayPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**nominalCodeMappings** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingResponse[]**](ContractPensionSchemeNominalCodeMappingResponse.md) | The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionSelectionRequest.md b/docs/Model/ContractPensionSelectionRequest.md index 77656fb..364d608 100644 --- a/docs/Model/ContractPensionSelectionRequest.md +++ b/docs/Model/ContractPensionSelectionRequest.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**autoEnrolled** | **bool** | [readonly] Is True if the employee joined this Pension due to an AutoEnrolment action | [optional] **id** | **string** | | [optional] +**pensionScheme** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeRequest**](ContractPensionSchemeRequest.md) | | [optional] **pensionSchemeId** | **string** | | [optional] **workerGroupId** | **string** | | [optional] -**pensionScheme** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeRequest**](ContractPensionSchemeRequest.md) | | [optional] -**autoEnrolled** | **bool** | [readonly] Is True if the employee joined this Pension due to an AutoEnrolment action | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionSelectionResponse.md b/docs/Model/ContractPensionSelectionResponse.md index d1ebf06..435491b 100644 --- a/docs/Model/ContractPensionSelectionResponse.md +++ b/docs/Model/ContractPensionSelectionResponse.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**autoEnrolled** | **bool** | [readonly] Is True if the employee joined this Pension due to an AutoEnrolment action | [optional] **id** | **string** | | [optional] +**pensionScheme** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeResponse**](ContractPensionSchemeResponse.md) | | [optional] **pensionSchemeId** | **string** | | [optional] **workerGroupId** | **string** | | [optional] -**pensionScheme** | [**\SynergiTech\Staffology\Model\ContractPensionSchemeResponse**](ContractPensionSchemeResponse.md) | | [optional] -**autoEnrolled** | **bool** | [readonly] Is True if the employee joined this Pension due to an AutoEnrolment action | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPensionerPayroll.md b/docs/Model/ContractPensionerPayroll.md index 7a3c103..251a931 100644 --- a/docs/Model/ContractPensionerPayroll.md +++ b/docs/Model/ContractPensionerPayroll.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**inReceiptOfPension** | **bool** | If set to true then the FPS will have the OccPenInd flag set to 'yes' | [optional] -**bereaved** | **bool** | Indicator that Occupational Pension is being paid because they are a recently bereaved Spouse/Civil Partner | [optional] **amount** | **float** | Annual amount of occupational pension | [optional] +**bereaved** | **bool** | Indicator that Occupational Pension is being paid because they are a recently bereaved Spouse/Civil Partner | [optional] +**inReceiptOfPension** | **bool** | If set to true then the FPS will have the OccPenInd flag set to 'yes' | [optional] **startDate** | **\DateTime** | Start date of occupational Pension | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPersonalDetailsRequest.md b/docs/Model/ContractPersonalDetailsRequest.md index f87034a..af0b003 100644 --- a/docs/Model/ContractPersonalDetailsRequest.md +++ b/docs/Model/ContractPersonalDetailsRequest.md @@ -5,26 +5,26 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] -**maritalStatus** | [**\SynergiTech\Staffology\Model\MaritalStatus**](MaritalStatus.md) | | -**title** | **string** | | [optional] -**firstName** | **string** | | [optional] -**middleName** | **string** | | [optional] -**lastName** | **string** | | [optional] **alternativeEmail** | **string** | | [optional] -**previousSurName** | **string** | | [optional] +**dateOfBirth** | **\DateTime** | | **email** | **string** | | [optional] **emailPayslip** | **bool** | If set to true then the employees Payslip will be sent by email when a PayRun is finalised. | [optional] -**pdfPassword** | **string** | Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property. | [optional] -**pdfPasswordType** | [**\SynergiTech\Staffology\Model\PdfPasswordType**](PdfPasswordType.md) | | [optional] **emailStatement** | **bool** | Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted. | [optional] -**photoUrl** | **string** | | [optional] -**telephone** | **string** | | [optional] -**photoSasUrl** | **string** | | [optional] -**mobile** | **string** | | [optional] -**dateOfBirth** | **\DateTime** | | +**firstName** | **string** | | [optional] **gender** | [**\SynergiTech\Staffology\Model\Gender**](Gender.md) | | +**lastName** | **string** | | [optional] +**maritalStatus** | [**\SynergiTech\Staffology\Model\MaritalStatus**](MaritalStatus.md) | | +**middleName** | **string** | | [optional] +**mobile** | **string** | | [optional] **niNumber** | **string** | | [optional] -**passportNumber** | **string** | | [optional] **partnerDetails** | [**\SynergiTech\Staffology\Model\ContractPartnerDetails**](ContractPartnerDetails.md) | | [optional] +**passportNumber** | **string** | | [optional] +**pdfPassword** | **string** | Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property. | [optional] +**pdfPasswordType** | [**\SynergiTech\Staffology\Model\PdfPasswordType**](PdfPasswordType.md) | | [optional] +**photoSasUrl** | **string** | | [optional] +**photoUrl** | **string** | | [optional] +**previousSurName** | **string** | | [optional] +**telephone** | **string** | | [optional] +**title** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractPersonalDetailsResponse.md b/docs/Model/ContractPersonalDetailsResponse.md index 8e5d75e..c1c6d3b 100644 --- a/docs/Model/ContractPersonalDetailsResponse.md +++ b/docs/Model/ContractPersonalDetailsResponse.md @@ -4,28 +4,28 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**statePensionAge** | **int** | Automatically calculated. | [optional] **address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] -**maritalStatus** | [**\SynergiTech\Staffology\Model\MaritalStatus**](MaritalStatus.md) | | -**title** | **string** | | [optional] -**firstName** | **string** | | [optional] -**middleName** | **string** | | [optional] -**lastName** | **string** | | [optional] **alternativeEmail** | **string** | | [optional] -**previousSurName** | **string** | | [optional] +**dateOfBirth** | **\DateTime** | | **email** | **string** | | [optional] **emailPayslip** | **bool** | If set to true then the employees Payslip will be sent by email when a PayRun is finalised. | [optional] -**pdfPassword** | **string** | Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property. | [optional] -**pdfPasswordType** | [**\SynergiTech\Staffology\Model\PdfPasswordType**](PdfPasswordType.md) | | [optional] **emailStatement** | **bool** | Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted. | [optional] -**photoUrl** | **string** | | [optional] -**telephone** | **string** | | [optional] -**photoSasUrl** | **string** | | [optional] -**mobile** | **string** | | [optional] -**dateOfBirth** | **\DateTime** | | +**firstName** | **string** | | [optional] **gender** | [**\SynergiTech\Staffology\Model\Gender**](Gender.md) | | +**lastName** | **string** | | [optional] +**maritalStatus** | [**\SynergiTech\Staffology\Model\MaritalStatus**](MaritalStatus.md) | | +**middleName** | **string** | | [optional] +**mobile** | **string** | | [optional] **niNumber** | **string** | | [optional] -**passportNumber** | **string** | | [optional] **partnerDetails** | [**\SynergiTech\Staffology\Model\ContractPartnerDetails**](ContractPartnerDetails.md) | | [optional] +**passportNumber** | **string** | | [optional] +**pdfPassword** | **string** | Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property. | [optional] +**pdfPasswordType** | [**\SynergiTech\Staffology\Model\PdfPasswordType**](PdfPasswordType.md) | | [optional] +**photoSasUrl** | **string** | | [optional] +**photoUrl** | **string** | | [optional] +**previousSurName** | **string** | | [optional] +**statePensionAge** | **int** | Automatically calculated. | [optional] +**telephone** | **string** | | [optional] +**title** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractReportTemplateColumnRequest.md b/docs/Model/ContractReportTemplateColumnRequest.md index 2c558d3..db26f42 100644 --- a/docs/Model/ContractReportTemplateColumnRequest.md +++ b/docs/Model/ContractReportTemplateColumnRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**position** | **int** | The position of the column in the template | [optional] -**header** | **string** | The header text of the column | [optional] **content** | **string** | The content associated with the column | [optional] +**header** | **string** | The header text of the column | [optional] +**position** | **int** | The position of the column in the template | [optional] **type** | [**\SynergiTech\Staffology\Model\ReportTemplateColumnType**](ReportTemplateColumnType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractReportTemplateColumnResponse.md b/docs/Model/ContractReportTemplateColumnResponse.md index b354499..be732bd 100644 --- a/docs/Model/ContractReportTemplateColumnResponse.md +++ b/docs/Model/ContractReportTemplateColumnResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**position** | **int** | The position of the column in the template | [optional] -**header** | **string** | The header text of the column | [optional] **content** | **string** | The content associated with the column | [optional] +**header** | **string** | The header text of the column | [optional] +**position** | **int** | The position of the column in the template | [optional] **type** | [**\SynergiTech\Staffology\Model\ReportTemplateColumnType**](ReportTemplateColumnType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractReportTemplateContentDictionaryResponse.md b/docs/Model/ContractReportTemplateContentDictionaryResponse.md index 3661213..0858391 100644 --- a/docs/Model/ContractReportTemplateContentDictionaryResponse.md +++ b/docs/Model/ContractReportTemplateContentDictionaryResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\SynergiTech\Staffology\Model\ReportTemplateColumnType**](ReportTemplateColumnType.md) | | [optional] **content** | [**\SynergiTech\Staffology\Model\ContractReportTemplateContentResponse[]**](ContractReportTemplateContentResponse.md) | The content list of report template column | [optional] +**type** | [**\SynergiTech\Staffology\Model\ReportTemplateColumnType**](ReportTemplateColumnType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractReportTemplateContentResponse.md b/docs/Model/ContractReportTemplateContentResponse.md index 0b18bfd..7f5b3ee 100644 --- a/docs/Model/ContractReportTemplateContentResponse.md +++ b/docs/Model/ContractReportTemplateContentResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**groupName** | **string** | Group name of the report template content | [optional] **name** | **string** | The name of the report template content | [optional] **value** | **string** | The value of the report template content, which will be enclosed in curly braces | [optional] -**groupName** | **string** | Group name of the report template content | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractReportTemplateRequest.md b/docs/Model/ContractReportTemplateRequest.md index cf9f08e..0a9f887 100644 --- a/docs/Model/ContractReportTemplateRequest.md +++ b/docs/Model/ContractReportTemplateRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**templateName** | **string** | The name of the report template | **description** | **string** | The description of the report template | [optional] **reportTemplateColumns** | [**\SynergiTech\Staffology\Model\ContractReportTemplateColumnRequest[]**](ContractReportTemplateColumnRequest.md) | The list of the report template columns | [optional] +**templateName** | **string** | The name of the report template | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractReportTemplateResponse.md b/docs/Model/ContractReportTemplateResponse.md index 3f3d674..884eeaa 100644 --- a/docs/Model/ContractReportTemplateResponse.md +++ b/docs/Model/ContractReportTemplateResponse.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uniqueId** | **string** | Unique Id of report template column | [optional] -**userName** | **string** | Name of the user who created the report template | [optional] -**templateName** | **string** | Name of the report template | [optional] +**createdDate** | **\DateTime** | Created date of the report template column | [optional] **description** | **string** | Description of the report template | [optional] **reportTemplateColumns** | [**\SynergiTech\Staffology\Model\ContractReportTemplateColumnResponse[]**](ContractReportTemplateColumnResponse.md) | List of the report template column | [optional] +**templateName** | **string** | Name of the report template | [optional] +**uniqueId** | **string** | Unique Id of report template column | [optional] **updatedDate** | **\DateTime** | Updated date of the report template column | [optional] -**createdDate** | **\DateTime** | Created date of the report template column | [optional] +**userName** | **string** | Name of the user who created the report template | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractRightToWork.md b/docs/Model/ContractRightToWork.md index d33a4f5..679a3f3 100644 --- a/docs/Model/ContractRightToWork.md +++ b/docs/Model/ContractRightToWork.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **checked** | **bool** | | [optional] -**documentType** | [**\SynergiTech\Staffology\Model\RightToWorkDocumentType**](RightToWorkDocumentType.md) | | [optional] -**documentRef** | **string** | | [optional] **documentExpiry** | **\DateTime** | | [optional] +**documentRef** | **string** | | [optional] +**documentType** | [**\SynergiTech\Staffology\Model\RightToWorkDocumentType**](RightToWorkDocumentType.md) | | [optional] **note** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractRtiAgentRequest.md b/docs/Model/ContractRtiAgentRequest.md index ee62b90..3901305 100644 --- a/docs/Model/ContractRtiAgentRequest.md +++ b/docs/Model/ContractRtiAgentRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] **agentId** | **string** | | [optional] **company** | **string** | | [optional] -**address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] **contact** | [**\SynergiTech\Staffology\Model\ContractRtiContactRequest**](ContractRtiContactRequest.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractRtiAgentResponse.md b/docs/Model/ContractRtiAgentResponse.md index 133d8eb..1f677f7 100644 --- a/docs/Model/ContractRtiAgentResponse.md +++ b/docs/Model/ContractRtiAgentResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] **agentId** | **string** | | [optional] **company** | **string** | | [optional] -**address** | [**\SynergiTech\Staffology\Model\ContractAddress**](ContractAddress.md) | | [optional] **contact** | [**\SynergiTech\Staffology\Model\ContractRtiContactResponse**](ContractRtiContactResponse.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractRtiContactRequest.md b/docs/Model/ContractRtiContactRequest.md index ccd35c1..829f349 100644 --- a/docs/Model/ContractRtiContactRequest.md +++ b/docs/Model/ContractRtiContactRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**email** | **string** | | [optional] **firstName** | **string** | | [optional] **lastName** | **string** | | [optional] -**email** | **string** | | [optional] **telephone** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractRtiContactResponse.md b/docs/Model/ContractRtiContactResponse.md index 1e3ea87..6928a45 100644 --- a/docs/Model/ContractRtiContactResponse.md +++ b/docs/Model/ContractRtiContactResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**email** | **string** | | [optional] **firstName** | **string** | | [optional] **lastName** | **string** | | [optional] -**email** | **string** | | [optional] **telephone** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractRtiEmployeeAddress.md b/docs/Model/ContractRtiEmployeeAddress.md index 461a5f9..67ec5cb 100644 --- a/docs/Model/ContractRtiEmployeeAddress.md +++ b/docs/Model/ContractRtiEmployeeAddress.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**country** | **string** | | [optional] +**foreignCountry** | **string** | | [optional] **line** | **string[]** | | [optional] -**postcode** | **string** | | [optional] **postCode** | **string** | | [optional] +**postcode** | **string** | | [optional] **ukPostcode** | **string** | | [optional] -**country** | **string** | | [optional] -**foreignCountry** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractRtiEmployeeName.md b/docs/Model/ContractRtiEmployeeName.md index 5e5d8b5..02fa93d 100644 --- a/docs/Model/ContractRtiEmployeeName.md +++ b/docs/Model/ContractRtiEmployeeName.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ttl** | **string** | | [optional] **fore** | **string[]** | | [optional] **initials** | **string** | | [optional] **sur** | **string** | | [optional] +**ttl** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractRtiSubmissionSettingsRequest.md b/docs/Model/ContractRtiSubmissionSettingsRequest.md index 540c3ab..e0a8711 100644 --- a/docs/Model/ContractRtiSubmissionSettingsRequest.md +++ b/docs/Model/ContractRtiSubmissionSettingsRequest.md @@ -4,19 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | [readonly] The unique id of the object | [optional] -**senderType** | [**\SynergiTech\Staffology\Model\RtiSenderType**](RtiSenderType.md) | | [optional] -**senderId** | **string** | The SenderId used to submit RTI documents to HMRC | [optional] -**password** | **string** | The Password used to submit RTI documents to HMRC | [optional] +**agent** | [**\SynergiTech\Staffology\Model\ContractRtiAgentRequest**](ContractRtiAgentRequest.md) | | [optional] +**allowLinkedEps** | **bool** | If set to true this will allow you to submit a combined Employer Payment Summary | [optional] +**autoSubmitEps** | **bool** | If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun | [optional] +**autoSubmitFps** | **bool** | If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun | [optional] +**contact** | [**\SynergiTech\Staffology\Model\ContractRtiContactRequest**](ContractRtiContactRequest.md) | | [optional] **excludeNilPaid** | **bool** | Whether or not to include Employees paid a zero amount on your FPS | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] **includeHashCrossRef** | **bool** | [readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions This is automatically set to true if you use a bank payments CSV format that supports it or set to false if not | [optional] -**autoSubmitFps** | **bool** | If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun | [optional] -**testInLive** | **bool** | Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it | [optional] -**useTestGateway** | **bool** | If set to true then your RTI documents will be sent to HMRCs test services instead of the live service | [optional] **overrideTimestampValue** | **string** | If a value is provided then it will be used as the timestamp on the RTI submission. This would normally only be used for testing purposes. | [optional] -**contact** | [**\SynergiTech\Staffology\Model\ContractRtiContactRequest**](ContractRtiContactRequest.md) | | [optional] -**agent** | [**\SynergiTech\Staffology\Model\ContractRtiAgentRequest**](ContractRtiAgentRequest.md) | | [optional] -**allowLinkedEps** | **bool** | If set to true this will allow you to submit a combined Employer Payment Summary | [optional] +**password** | **string** | The Password used to submit RTI documents to HMRC | [optional] +**senderId** | **string** | The SenderId used to submit RTI documents to HMRC | [optional] +**senderType** | [**\SynergiTech\Staffology\Model\RtiSenderType**](RtiSenderType.md) | | [optional] **shouldCompressFps** | **bool** | If set to true this will compress the FPS before submitting to HMRC | [optional] +**testInLive** | **bool** | Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it | [optional] +**useTestGateway** | **bool** | If set to true then your RTI documents will be sent to HMRCs test services instead of the live service | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractRtiSubmissionSettingsResponse.md b/docs/Model/ContractRtiSubmissionSettingsResponse.md index 9ab4c1c..661f38e 100644 --- a/docs/Model/ContractRtiSubmissionSettingsResponse.md +++ b/docs/Model/ContractRtiSubmissionSettingsResponse.md @@ -4,19 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | | [optional] -**senderType** | [**\SynergiTech\Staffology\Model\RtiSenderType**](RtiSenderType.md) | | [optional] -**senderId** | **string** | The SenderId used to submit RTI documents to HMRC | [optional] -**password** | **string** | The Password used to submit RTI documents to HMRC | [optional] +**agent** | [**\SynergiTech\Staffology\Model\ContractRtiAgentResponse**](ContractRtiAgentResponse.md) | | [optional] +**allowLinkedEps** | **bool** | If set to true this will allow you to submit a combined Employer Payment Summary | [optional] +**autoSubmitEps** | **bool** | If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun | [optional] +**autoSubmitFps** | **bool** | If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun | [optional] +**contact** | [**\SynergiTech\Staffology\Model\ContractRtiContactResponse**](ContractRtiContactResponse.md) | | [optional] **excludeNilPaid** | **bool** | Whether or not to include Employees paid a zero amount on your FPS | [optional] +**id** | **string** | | [optional] **includeHashCrossRef** | **bool** | [readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions This is automatically set to true if you use a bank payments CSV format that supports it or set to false if not | [optional] -**autoSubmitFps** | **bool** | If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun | [optional] -**testInLive** | **bool** | Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it | [optional] -**useTestGateway** | **bool** | If set to true then your RTI documents will be sent to HMRCs test services instead of the live service | [optional] **overrideTimestampValue** | **string** | If a value is provided then it will be used as the timestamp on the RTI submission. This would normally only be used for testing purposes. | [optional] -**contact** | [**\SynergiTech\Staffology\Model\ContractRtiContactResponse**](ContractRtiContactResponse.md) | | [optional] -**agent** | [**\SynergiTech\Staffology\Model\ContractRtiAgentResponse**](ContractRtiAgentResponse.md) | | [optional] -**allowLinkedEps** | **bool** | If set to true this will allow you to submit a combined Employer Payment Summary | [optional] +**password** | **string** | The Password used to submit RTI documents to HMRC | [optional] +**senderId** | **string** | The SenderId used to submit RTI documents to HMRC | [optional] +**senderType** | [**\SynergiTech\Staffology\Model\RtiSenderType**](RtiSenderType.md) | | [optional] **shouldCompressFps** | **bool** | If set to true this will compress the FPS before submitting to HMRC | [optional] +**testInLive** | **bool** | Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it | [optional] +**useTestGateway** | **bool** | If set to true then your RTI documents will be sent to HMRCs test services instead of the live service | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractSharedBankDetails.md b/docs/Model/ContractSharedBankDetails.md new file mode 100644 index 0000000..a4a87c2 --- /dev/null +++ b/docs/Model/ContractSharedBankDetails.md @@ -0,0 +1,19 @@ +# # ContractSharedBankDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accountName** | **string** | | [optional] +**accountNumber** | **string** | | [optional] +**bankBranch** | **string** | | [optional] +**bankName** | **string** | | [optional] +**bankReference** | **string** | | [optional] +**buildingSocietyRollNumber** | **string** | | [optional] +**countryOfBank** | [**\SynergiTech\Staffology\Model\CountryCode**](CountryCode.md) | | [optional] +**iban** | **string** | | [optional] +**note** | **string** | | [optional] +**sortCode** | **string** | | [optional] +**swiftBic** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractShiftWorkingPatternDayRequest.md b/docs/Model/ContractShiftWorkingPatternDayRequest.md index fe51a17..781da64 100644 --- a/docs/Model/ContractShiftWorkingPatternDayRequest.md +++ b/docs/Model/ContractShiftWorkingPatternDayRequest.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **day** | **int** | | [optional] -**isWorkingDay** | **bool** | | [optional] **hours** | **float** | | [optional] +**isWorkingDay** | **bool** | | [optional] **workingPatternHoursType** | [**\SynergiTech\Staffology\Model\WorkingPatternHoursType**](WorkingPatternHoursType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractShiftWorkingPatternDayResponse.md b/docs/Model/ContractShiftWorkingPatternDayResponse.md index 2633f8e..2bbbd88 100644 --- a/docs/Model/ContractShiftWorkingPatternDayResponse.md +++ b/docs/Model/ContractShiftWorkingPatternDayResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **day** | **int** | | [optional] -**isWorkingDay** | **bool** | | [optional] **hours** | **float** | | [optional] +**isWorkingDay** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractSpinalPointRequest.md b/docs/Model/ContractSpinalPointRequest.md index bd62a91..86a581e 100644 --- a/docs/Model/ContractSpinalPointRequest.md +++ b/docs/Model/ContractSpinalPointRequest.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Name of the Spinal Point | [optional] -**number** | **int** | Number of Spinal Point within the Scale | [optional] **annualValue** | **float** | Annual Value for the Spinal Point | [optional] **annualValueAltMax** | **float** | Annual Value for the Spinal Point (Alternative Max Value) | [optional] +**annualValueLAFringe** | **float** | Annual Value for the Spinal Point Fringe London Allowance | [optional] +**annualValueLAFringeAltMax** | **float** | Annual Value for the Spinal Point Fringe LA (Alt Max Value) | [optional] **annualValueLAInner** | **float** | Annual Value for the Spinal Point Inner London Allowance | [optional] **annualValueLAInnerAltMax** | **float** | Annual Value for the Spinal Point Inner LA (Alt Max Value) | [optional] **annualValueLAOuter** | **float** | Annual Value for the Spinal Point Outer London Allowance | [optional] **annualValueLAOuterAltMax** | **float** | Annual Value for the Spinal Point Outer LA (Alt Max Value) | [optional] -**annualValueLAFringe** | **float** | Annual Value for the Spinal Point Fringe London Allowance | [optional] -**annualValueLAFringeAltMax** | **float** | Annual Value for the Spinal Point Fringe LA (Alt Max Value) | [optional] **effectiveDate** | **\DateTime** | Date these rates became effective | [optional] +**name** | **string** | Name of the Spinal Point | [optional] +**number** | **int** | Number of Spinal Point within the Scale | [optional] **predecessorId** | **string** | Spinal point predecessorId | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractSpinalPointResponse.md b/docs/Model/ContractSpinalPointResponse.md index c1a1459..2ec0da8 100644 --- a/docs/Model/ContractSpinalPointResponse.md +++ b/docs/Model/ContractSpinalPointResponse.md @@ -4,19 +4,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | Spinal Point identifier | [optional] -**finalAnnualValue** | **float** | Spinal Point Final Annual Value | [optional] -**name** | **string** | Name of the Spinal Point | [optional] -**number** | **int** | Number of Spinal Point within the Scale | [optional] **annualValue** | **float** | Annual Value for the Spinal Point | [optional] **annualValueAltMax** | **float** | Annual Value for the Spinal Point (Alternative Max Value) | [optional] +**annualValueLAFringe** | **float** | Annual Value for the Spinal Point Fringe London Allowance | [optional] +**annualValueLAFringeAltMax** | **float** | Annual Value for the Spinal Point Fringe LA (Alt Max Value) | [optional] **annualValueLAInner** | **float** | Annual Value for the Spinal Point Inner London Allowance | [optional] **annualValueLAInnerAltMax** | **float** | Annual Value for the Spinal Point Inner LA (Alt Max Value) | [optional] **annualValueLAOuter** | **float** | Annual Value for the Spinal Point Outer London Allowance | [optional] **annualValueLAOuterAltMax** | **float** | Annual Value for the Spinal Point Outer LA (Alt Max Value) | [optional] -**annualValueLAFringe** | **float** | Annual Value for the Spinal Point Fringe London Allowance | [optional] -**annualValueLAFringeAltMax** | **float** | Annual Value for the Spinal Point Fringe LA (Alt Max Value) | [optional] **effectiveDate** | **\DateTime** | Date these rates became effective | [optional] +**finalAnnualValue** | **float** | Spinal Point Final Annual Value | [optional] +**id** | **string** | Spinal Point identifier | [optional] +**name** | **string** | Name of the Spinal Point | [optional] +**number** | **int** | Number of Spinal Point within the Scale | [optional] **predecessorId** | **string** | Spinal point predecessorId | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractSpinalPointUpdateRequest.md b/docs/Model/ContractSpinalPointUpdateRequest.md index cfceaa5..62ff85f 100644 --- a/docs/Model/ContractSpinalPointUpdateRequest.md +++ b/docs/Model/ContractSpinalPointUpdateRequest.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uniqueId** | **string** | | [optional] -**name** | **string** | Name of the Spinal Point | [optional] -**number** | **int** | Number of Spinal Point within the Scale | [optional] **annualValue** | **float** | Annual Value for the Spinal Point | [optional] **annualValueAltMax** | **float** | Annual Value for the Spinal Point (Alternative Max Value) | [optional] +**annualValueLAFringe** | **float** | Annual Value for the Spinal Point Fringe London Allowance | [optional] +**annualValueLAFringeAltMax** | **float** | Annual Value for the Spinal Point Fringe LA (Alt Max Value) | [optional] **annualValueLAInner** | **float** | Annual Value for the Spinal Point Inner London Allowance | [optional] **annualValueLAInnerAltMax** | **float** | Annual Value for the Spinal Point Inner LA (Alt Max Value) | [optional] **annualValueLAOuter** | **float** | Annual Value for the Spinal Point Outer London Allowance | [optional] **annualValueLAOuterAltMax** | **float** | Annual Value for the Spinal Point Outer LA (Alt Max Value) | [optional] -**annualValueLAFringe** | **float** | Annual Value for the Spinal Point Fringe London Allowance | [optional] -**annualValueLAFringeAltMax** | **float** | Annual Value for the Spinal Point Fringe LA (Alt Max Value) | [optional] **effectiveDate** | **\DateTime** | Date these rates became effective | [optional] +**name** | **string** | Name of the Spinal Point | [optional] +**number** | **int** | Number of Spinal Point within the Scale | [optional] **predecessorId** | **string** | Spinal point predecessorId | [optional] +**uniqueId** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractSpineAllowanceRequest.md b/docs/Model/ContractSpineAllowanceRequest.md index 690b5f4..1d0ca62 100644 --- a/docs/Model/ContractSpineAllowanceRequest.md +++ b/docs/Model/ContractSpineAllowanceRequest.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**allowanceAlwaysFTE** | **bool** | Allowance Always FTE or Not | [optional] +**allowanceEffectiveDate** | **\DateTime** | Allowance Effective Date | [optional] **allowanceName** | **string** | Name of Allowance | [optional] -**allowanceType** | [**\SynergiTech\Staffology\Model\AllowanceType**](AllowanceType.md) | | [optional] -**allowanceUsualAnnualValue** | **float** | Value of Allowance Usual Annual | [optional] **allowanceRangeLowerValue** | **float** | Value of Allowance Range Lower | [optional] **allowanceRangeUpperValue** | **float** | Value of Allowance Range Upper | [optional] -**allowanceEffectiveDate** | **\DateTime** | Allowance Effective Date | [optional] -**allowanceAlwaysFTE** | **bool** | Allowance Always FTE or Not | [optional] +**allowanceType** | [**\SynergiTech\Staffology\Model\AllowanceType**](AllowanceType.md) | | [optional] +**allowanceUsualAnnualValue** | **float** | Value of Allowance Usual Annual | [optional] **payCode** | **string** | Pay Code | [optional] **payCodeTitle** | **string** | Pay Code Title | [optional] diff --git a/docs/Model/ContractSpineAllowanceResponse.md b/docs/Model/ContractSpineAllowanceResponse.md index 9a43b60..aa4cede 100644 --- a/docs/Model/ContractSpineAllowanceResponse.md +++ b/docs/Model/ContractSpineAllowanceResponse.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**allowanceAlwaysFTE** | **bool** | Allowance Always FTE or Not | [optional] +**allowanceEffectiveDate** | **\DateTime** | Allowance Effective Date | [optional] **allowanceName** | **string** | Name of Allowance | [optional] -**allowanceType** | [**\SynergiTech\Staffology\Model\AllowanceType**](AllowanceType.md) | | [optional] -**allowanceUsualAnnualValue** | **float** | Value of Allowance Usual Annual | [optional] **allowanceRangeLowerValue** | **float** | Value of Allowance Range Lower | [optional] **allowanceRangeUpperValue** | **float** | Value of Allowance Range Upper | [optional] -**allowanceEffectiveDate** | **\DateTime** | Allowance Effective Date | [optional] -**allowanceAlwaysFTE** | **bool** | Allowance Always FTE or Not | [optional] -**uniqueId** | **string** | Spine Allowance identifier | [optional] +**allowanceType** | [**\SynergiTech\Staffology\Model\AllowanceType**](AllowanceType.md) | | [optional] +**allowanceUsualAnnualValue** | **float** | Value of Allowance Usual Annual | [optional] **payCode** | **string** | Pay Code | [optional] **payCodeTitle** | **string** | Pay Code Title | [optional] +**uniqueId** | **string** | Spine Allowance identifier | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractSpineAllowanceUpdateRequest.md b/docs/Model/ContractSpineAllowanceUpdateRequest.md index 50dbaaa..a250c4d 100644 --- a/docs/Model/ContractSpineAllowanceUpdateRequest.md +++ b/docs/Model/ContractSpineAllowanceUpdateRequest.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uniqueId** | **string** | Spine Allowance identifier | [optional] +**allowanceAlwaysFTE** | **bool** | Allowance Always FTE or Not | [optional] +**allowanceEffectiveDate** | **\DateTime** | Allowance Effective Date | [optional] **allowanceName** | **string** | Name of Allowance | [optional] -**allowanceType** | [**\SynergiTech\Staffology\Model\AllowanceType**](AllowanceType.md) | | [optional] -**allowanceUsualAnnualValue** | **float** | Value of Allowance Usual Annual | [optional] **allowanceRangeLowerValue** | **float** | Value of Allowance Range Lower | [optional] **allowanceRangeUpperValue** | **float** | Value of Allowance Range Upper | [optional] -**allowanceEffectiveDate** | **\DateTime** | Allowance Effective Date | [optional] -**allowanceAlwaysFTE** | **bool** | Allowance Always FTE or Not | [optional] +**allowanceType** | [**\SynergiTech\Staffology\Model\AllowanceType**](AllowanceType.md) | | [optional] +**allowanceUsualAnnualValue** | **float** | Value of Allowance Usual Annual | [optional] **payCode** | **string** | Pay Code | [optional] **payCodeTitle** | **string** | Pay Code Title | [optional] +**uniqueId** | **string** | Spine Allowance identifier | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractStarterDetails.md b/docs/Model/ContractStarterDetails.md index 564e5c8..6b58b3f 100644 --- a/docs/Model/ContractStarterDetails.md +++ b/docs/Model/ContractStarterDetails.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**startDate** | **\DateTime** | | -**starterDeclaration** | [**\SynergiTech\Staffology\Model\StarterDeclaration**](StarterDeclaration.md) | | **overseasEmployerDetails** | [**\SynergiTech\Staffology\Model\ContractOverseasEmployerDetails**](ContractOverseasEmployerDetails.md) | | [optional] **pensionerPayroll** | [**\SynergiTech\Staffology\Model\ContractPensionerPayroll**](ContractPensionerPayroll.md) | | [optional] +**startDate** | **\DateTime** | | +**starterDeclaration** | [**\SynergiTech\Staffology\Model\StarterDeclaration**](StarterDeclaration.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractTaxAndNi.md b/docs/Model/ContractTaxAndNi.md index 69a165f..0fba8c6 100644 --- a/docs/Model/ContractTaxAndNi.md +++ b/docs/Model/ContractTaxAndNi.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**foreignTaxCredit** | **bool** | If set to True you are enabling the possibility to enter an amount on payslip so you can reduce UK Tax liabilities. | [optional] **niTable** | **string** | The appropriate NI letter for this Employee | [optional] -**secondaryClass1NotPayable** | **bool** | If set to true then no Employer NI will be paid for this Employee | [optional] **postgradLoan** | **bool** | Set to true if the Employee needs to make Post Graduate Loan repayments | [optional] -**postgraduateLoanStartDate** | **\DateTime** | | [optional] **postgraduateLoanEndDate** | **\DateTime** | | [optional] +**postgraduateLoanStartDate** | **\DateTime** | | [optional] +**secondaryClass1NotPayable** | **bool** | If set to true then no Employer NI will be paid for this Employee | [optional] **studentLoan** | [**\SynergiTech\Staffology\Model\StudentLoan**](StudentLoan.md) | | [optional] -**studentLoanStartDate** | **\DateTime** | | [optional] **studentLoanEndDate** | **\DateTime** | | [optional] +**studentLoanStartDate** | **\DateTime** | | [optional] **taxCode** | **string** | The Tax Code for this Employee | [optional] **week1Month1** | **bool** | Determines whether PAYE should be calculated on a Week1/Month1 basis instead of on a cumulative basis. This is automatically set to false for any existing Employees when you start a new Tax Year. | [optional] -**foreignTaxCredit** | **bool** | If set to True you are enabling the possibility to enter an amount on payslip so you can reduce UK Tax liabilities. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractTermCalendarRequest.md b/docs/Model/ContractTermCalendarRequest.md index caf9a56..e03298a 100644 --- a/docs/Model/ContractTermCalendarRequest.md +++ b/docs/Model/ContractTermCalendarRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | Title of the Term Calendar | [optional] **academicYearStartMonth** | [**\SynergiTech\Staffology\Model\CalendarMonth**](CalendarMonth.md) | | [optional] +**title** | **string** | Title of the Term Calendar | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractTermCalendarResponse.md b/docs/Model/ContractTermCalendarResponse.md index 57ecc55..75c4584 100644 --- a/docs/Model/ContractTermCalendarResponse.md +++ b/docs/Model/ContractTermCalendarResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**academicYearStartMonth** | [**\SynergiTech\Staffology\Model\CalendarMonth**](CalendarMonth.md) | | [optional] **id** | **string** | Term Calendar identifier | [optional] **title** | **string** | Title of the Term Calendar | [optional] -**academicYearStartMonth** | [**\SynergiTech\Staffology\Model\CalendarMonth**](CalendarMonth.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractTermCalendarYearRequest.md b/docs/Model/ContractTermCalendarYearRequest.md index 329c1ba..4cd0af0 100644 --- a/docs/Model/ContractTermCalendarYearRequest.md +++ b/docs/Model/ContractTermCalendarYearRequest.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**autumnTermStartDate** | **\DateTime** | Autumn Term Start Date of Term Calendar Year View | [optional] **autumnTermEndDate** | **\DateTime** | Autumn Term End Date of Term Calendar Year View | [optional] -**springTermStartDate** | **\DateTime** | Spring Term Start Date of Term Calendar Year View | [optional] +**autumnTermStartDate** | **\DateTime** | Autumn Term Start Date of Term Calendar Year View | [optional] **springTermEndDate** | **\DateTime** | Spring Term End Date of Term Calendar Year View | [optional] -**summerTermStartDate** | **\DateTime** | Summer Term Start Date of Term Calendar Year View | [optional] +**springTermStartDate** | **\DateTime** | Spring Term Start Date of Term Calendar Year View | [optional] **summerTermEndDate** | **\DateTime** | Summer Term End Date of Term Calendar Year View | [optional] +**summerTermStartDate** | **\DateTime** | Summer Term Start Date of Term Calendar Year View | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractTermCalendarYearResponse.md b/docs/Model/ContractTermCalendarYearResponse.md index 7787e3e..aebad94 100644 --- a/docs/Model/ContractTermCalendarYearResponse.md +++ b/docs/Model/ContractTermCalendarYearResponse.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | Term Calendar Year identifier | [optional] -**autumnTermStartDate** | **\DateTime** | Autumn Term Start Date of Term Calendar Year View | [optional] **autumnTermEndDate** | **\DateTime** | Autumn Term End Date of Term Calendar Year View | [optional] -**springTermStartDate** | **\DateTime** | Spring Term Start Date of Term Calendar Year View | [optional] +**autumnTermStartDate** | **\DateTime** | Autumn Term Start Date of Term Calendar Year View | [optional] +**id** | **string** | Term Calendar Year identifier | [optional] **springTermEndDate** | **\DateTime** | Spring Term End Date of Term Calendar Year View | [optional] -**summerTermStartDate** | **\DateTime** | Summer Term Start Date of Term Calendar Year View | [optional] +**springTermStartDate** | **\DateTime** | Spring Term Start Date of Term Calendar Year View | [optional] **summerTermEndDate** | **\DateTime** | Summer Term End Date of Term Calendar Year View | [optional] +**summerTermStartDate** | **\DateTime** | Summer Term Start Date of Term Calendar Year View | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractUmbrellaSettingsRequest.md b/docs/Model/ContractUmbrellaSettingsRequest.md index 4618335..015855a 100644 --- a/docs/Model/ContractUmbrellaSettingsRequest.md +++ b/docs/Model/ContractUmbrellaSettingsRequest.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**enabled** | **bool** | | [optional] -**chargePerTimesheet** | **float** | | [optional] **apprenticeshipLevyDednRate** | **float** | | [optional] -**holidayRate** | **float** | | [optional] +**chargePerTimesheet** | **float** | | [optional] +**cisFeeCode** | **string** | | [optional] +**detailFeeInComment** | **bool** | | [optional] **dpsbCode** | **string** | | [optional] +**enabled** | **bool** | | [optional] **expensesCode** | **string** | | [optional] **grossDeductionCode** | **string** | | [optional] **holidayCode** | **string** | | [optional] -**cisFeeCode** | **string** | | [optional] -**detailFeeInComment** | **bool** | | [optional] +**holidayRate** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractUmbrellaSettingsResponse.md b/docs/Model/ContractUmbrellaSettingsResponse.md index a59fb01..50e5e3e 100644 --- a/docs/Model/ContractUmbrellaSettingsResponse.md +++ b/docs/Model/ContractUmbrellaSettingsResponse.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**enabled** | **bool** | | [optional] -**chargePerTimesheet** | **float** | | [optional] **apprenticeshipLevyDednRate** | **float** | | [optional] -**holidayRate** | **float** | | [optional] +**chargePerTimesheet** | **float** | | [optional] +**cisFeeCode** | **string** | | [optional] +**detailFeeInComment** | **bool** | | [optional] **dpsbCode** | **string** | | [optional] +**enabled** | **bool** | | [optional] **expensesCode** | **string** | | [optional] **grossDeductionCode** | **string** | | [optional] **holidayCode** | **string** | | [optional] -**cisFeeCode** | **string** | | [optional] -**detailFeeInComment** | **bool** | | [optional] +**holidayRate** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractUpdateEmployeeRequest.md b/docs/Model/ContractUpdateEmployeeRequest.md index 703835f..8a56102 100644 --- a/docs/Model/ContractUpdateEmployeeRequest.md +++ b/docs/Model/ContractUpdateEmployeeRequest.md @@ -4,18 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | The unique id of the object | [optional] -**personalDetails** | [**\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest**](ContractPersonalDetailsRequest.md) | | [optional] -**employmentDetails** | [**\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest**](ContractEmploymentDetailsRequest.md) | | [optional] +**aggregatedServiceDate** | **\DateTime** | | [optional] **autoEnrolment** | [**\SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest**](ContractAutoEnrolmentRequest.md) | | [optional] -**leaveSettings** | [**\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest**](ContractEmployeeLeaveSettingsRequest.md) | | [optional] -**rightToWork** | [**\SynergiTech\Staffology\Model\ContractRightToWork**](ContractRightToWork.md) | | [optional] **bankDetails** | [**\SynergiTech\Staffology\Model\ContractBankDetails**](ContractBankDetails.md) | | [optional] -**payOptions** | [**\SynergiTech\Staffology\Model\ContractPayOptionsRequest**](ContractPayOptionsRequest.md) | | [optional] -**tags** | **string[]** | | [optional] -**holidaySchemeUniqueId** | **string** | | [optional] -**aggregatedServiceDate** | **\DateTime** | | [optional] +**defaultPensionSchemeName** | **string** | The name of the Pension Scheme that will be used for this employee. | [optional] +**defaultPensionSchemeUniqueId** | **string** | The UniqueId of the Pension Scheme that will be used for this employee. | [optional] +**defaultWorkerGroupName** | **string** | The name of the Worker Group that will be used for this employee. | [optional] +**defaultWorkerGroupUniqueId** | **string** | The UniqueId of the Worker Group that will be used for this employee. | [optional] +**employmentDetails** | [**\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest**](ContractEmploymentDetailsRequest.md) | | [optional] **evcId** | **string** | If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. | [optional] +**holidaySchemeUniqueId** | **string** | | [optional] +**id** | **string** | The unique id of the object | [optional] +**leaveSettings** | [**\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest**](ContractEmployeeLeaveSettingsRequest.md) | | [optional] +**payOptions** | [**\SynergiTech\Staffology\Model\ContractPayOptionsRequest**](ContractPayOptionsRequest.md) | | [optional] +**personalDetails** | [**\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest**](ContractPersonalDetailsRequest.md) | | [optional] +**rightToWork** | [**\SynergiTech\Staffology\Model\ContractRightToWork**](ContractRightToWork.md) | | [optional] **sourceSystemId** | **string** | Used by external systems so they can store an immutable reference. Once this property is set it cannot be changed. | [optional] +**tags** | **string[]** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractVeteranDetails.md b/docs/Model/ContractVeteranDetails.md index 729262f..b1ce1c6 100644 --- a/docs/Model/ContractVeteranDetails.md +++ b/docs/Model/ContractVeteranDetails.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**isVeteran** | **bool** | Set to true if the employee is a veteran | [optional] **firstCivilianEmploymentDate** | **\DateTime** | Date of Veteran's first civilian employment | [optional] +**isVeteran** | **bool** | Set to true if the employee is a veteran | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractWorkerGroupRequest.md b/docs/Model/ContractWorkerGroupRequest.md index e7773c8..1efd309 100644 --- a/docs/Model/ContractWorkerGroupRequest.md +++ b/docs/Model/ContractWorkerGroupRequest.md @@ -4,34 +4,34 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | | [optional] -**name** | **string** | | [optional] +**additionalVoluntaryContribution** | **float** | Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. | [optional] +**assumedPensionablePay** | [**\SynergiTech\Staffology\Model\AssumedPensionablePay**](AssumedPensionablePay.md) | | [optional] +**avcIsPercentage** | **bool** | Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, | [optional] **contributionLevelType** | [**\SynergiTech\Staffology\Model\PensionContributionLevelType**](PensionContributionLevelType.md) | | [optional] +**customThreshold** | **bool** | | [optional] **employeeContribution** | **float** | | [optional] **employeeContributionIsPercentage** | **bool** | | [optional] **employerContribution** | **float** | | [optional] -**employerContributionIsPercentage** | **bool** | | [optional] -**employerContributionTopUpPercentage** | **float** | Increase Employer Contribution by this percentage of the Employee Contribution | [optional] **employerContributionIncludesNiSaving** | **bool** | Employer Contribution includes the Employers NI saving | [optional] +**employerContributionIsPercentage** | **bool** | | [optional] +**employerContributionNiSaving** | **float** | Employers NI Saving | [optional] **employerContributionNiSavingPercentage** | **float** | Increase Employer Contribution by this percentage of the Employers NI saving | [optional] +**employerContributionTopUpPercentage** | **float** | Increase Employer Contribution by this percentage of the Employee Contribution | [optional] +**employerReference** | **string** | | [optional] +**id** | **string** | | [optional] **isAvc** | **bool** | Determines whether the workergroup uses additonal voluntary contributions. This property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC. | [optional] -**additionalVoluntaryContribution** | **float** | Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. | [optional] -**avcIsPercentage** | **bool** | Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, | [optional] -**employerContributionNiSaving** | **float** | Employers NI Saving | [optional] -**customThreshold** | **bool** | | [optional] +**lgpsFund** | [**\SynergiTech\Staffology\Model\LgpsFund**](LgpsFund.md) | | [optional] +**localAuthorityNumber** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] **lowerLimit** | **float** | | [optional] -**upperLimit** | **float** | | [optional] +**matIdentifier** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] +**matUniqueNumber** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] +**name** | **string** | | [optional] **papdisGroup** | **string** | | [optional] **papdisSubGroup** | **string** | | [optional] -**localAuthorityNumber** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] +**payslipDescription** | **string** | Used for overwriting the pension description that is displayed on the payslip | [optional] +**pensionablePayDefinition** | [**\SynergiTech\Staffology\Model\PensionablePayDefinition**](PensionablePayDefinition.md) | | [optional] **schoolEmployerType** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] -**matIdentifier** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] -**matUniqueNumber** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] -**employerReference** | **string** | | [optional] -**lgpsFund** | [**\SynergiTech\Staffology\Model\LgpsFund**](LgpsFund.md) | | [optional] +**upperLimit** | **float** | | [optional] **workerGroupId** | **string** | [readonly] | [optional] -**assumedPensionablePay** | [**\SynergiTech\Staffology\Model\AssumedPensionablePay**](AssumedPensionablePay.md) | | [optional] -**pensionablePayDefinition** | [**\SynergiTech\Staffology\Model\PensionablePayDefinition**](PensionablePayDefinition.md) | | [optional] -**payslipDescription** | **string** | Used for overwriting the pension description that is displayed on the payslip | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractWorkerGroupResponse.md b/docs/Model/ContractWorkerGroupResponse.md index 20ed9c0..ac234a1 100644 --- a/docs/Model/ContractWorkerGroupResponse.md +++ b/docs/Model/ContractWorkerGroupResponse.md @@ -4,34 +4,34 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | | [optional] -**name** | **string** | | [optional] +**additionalVoluntaryContribution** | **float** | Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. | [optional] +**assumedPensionablePay** | [**\SynergiTech\Staffology\Model\AssumedPensionablePay**](AssumedPensionablePay.md) | | [optional] +**avcIsPercentage** | **bool** | Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, | [optional] **contributionLevelType** | [**\SynergiTech\Staffology\Model\PensionContributionLevelType**](PensionContributionLevelType.md) | | [optional] +**customThreshold** | **bool** | | [optional] **employeeContribution** | **float** | | [optional] **employeeContributionIsPercentage** | **bool** | | [optional] **employerContribution** | **float** | | [optional] -**employerContributionIsPercentage** | **bool** | | [optional] -**employerContributionTopUpPercentage** | **float** | Increase Employer Contribution by this percentage of the Employee Contribution | [optional] **employerContributionIncludesNiSaving** | **bool** | Employer Contribution includes the Employers NI saving | [optional] +**employerContributionIsPercentage** | **bool** | | [optional] +**employerContributionNiSaving** | **float** | Employers NI Saving | [optional] **employerContributionNiSavingPercentage** | **float** | Increase Employer Contribution by this percentage of the Employers NI saving | [optional] +**employerContributionTopUpPercentage** | **float** | Increase Employer Contribution by this percentage of the Employee Contribution | [optional] +**employerReference** | **string** | | [optional] +**id** | **string** | | [optional] **isAvc** | **bool** | Determines whether the workergroup uses additonal voluntary contributions. This property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC. | [optional] -**additionalVoluntaryContribution** | **float** | Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. | [optional] -**avcIsPercentage** | **bool** | Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, | [optional] -**employerContributionNiSaving** | **float** | Employers NI Saving | [optional] -**customThreshold** | **bool** | | [optional] +**lgpsFund** | [**\SynergiTech\Staffology\Model\LgpsFund**](LgpsFund.md) | | [optional] +**localAuthorityNumber** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] **lowerLimit** | **float** | | [optional] -**upperLimit** | **float** | | [optional] +**matIdentifier** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] +**matUniqueNumber** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] +**name** | **string** | | [optional] **papdisGroup** | **string** | | [optional] **papdisSubGroup** | **string** | | [optional] -**localAuthorityNumber** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] +**payslipDescription** | **string** | Used for overwriting the pension description that is displayed on the payslip | [optional] +**pensionablePayDefinition** | [**\SynergiTech\Staffology\Model\PensionablePayDefinition**](PensionablePayDefinition.md) | | [optional] **schoolEmployerType** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] -**matIdentifier** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] -**matUniqueNumber** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] -**employerReference** | **string** | | [optional] -**lgpsFund** | [**\SynergiTech\Staffology\Model\LgpsFund**](LgpsFund.md) | | [optional] +**upperLimit** | **float** | | [optional] **workerGroupId** | **string** | | [optional] -**assumedPensionablePay** | [**\SynergiTech\Staffology\Model\AssumedPensionablePay**](AssumedPensionablePay.md) | | [optional] -**pensionablePayDefinition** | [**\SynergiTech\Staffology\Model\PensionablePayDefinition**](PensionablePayDefinition.md) | | [optional] -**payslipDescription** | **string** | Used for overwriting the pension description that is displayed on the payslip | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractWorkingPatternRequest.md b/docs/Model/ContractWorkingPatternRequest.md index e2d8c75..94c49b4 100644 --- a/docs/Model/ContractWorkingPatternRequest.md +++ b/docs/Model/ContractWorkingPatternRequest.md @@ -4,32 +4,32 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**bankHolidays** | [**\SynergiTech\Staffology\Model\BankHolidayCollection**](BankHolidayCollection.md) | | [optional] +**contractedWeeks** | **float** | The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. | [optional] +**effectiveFrom** | **\DateTime** | | [optional] +**fri** | **float** | | [optional] +**friIsWorkingDay** | **bool** | | [optional] +**fullTimeContractedHours** | **float** | The amount of hours an employee works (Full Time). If Null then the default is used. | [optional] +**fullTimeContractedWeeks** | **float** | The amount of weeks an employee works (Full Time). If Null then the default is used. | [optional] **id** | **string** | | [optional] -**title** | **string** | | +**isDefault** | **bool** | | [optional] **mon** | **float** | | [optional] -**tue** | **float** | | [optional] -**wed** | **float** | | [optional] -**thu** | **float** | | [optional] -**fri** | **float** | | [optional] -**sat** | **float** | | [optional] -**sun** | **float** | | [optional] **monIsWorkingDay** | **bool** | | [optional] -**tueIsWorkingDay** | **bool** | | [optional] -**wedIsWorkingDay** | **bool** | | [optional] -**thuIsWorkingDay** | **bool** | | [optional] -**friIsWorkingDay** | **bool** | | [optional] +**proRataRule** | [**\SynergiTech\Staffology\Model\ProRataRule**](ProRataRule.md) | | [optional] +**sat** | **float** | | [optional] **satIsWorkingDay** | **bool** | | [optional] +**shiftWorkingPatternDays** | [**\SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayRequest[]**](ContractShiftWorkingPatternDayRequest.md) | | [optional] +**sun** | **float** | | [optional] **sunIsWorkingDay** | **bool** | | [optional] +**thu** | **float** | | [optional] +**thuIsWorkingDay** | **bool** | | [optional] +**title** | **string** | | **totalHours** | **float** | | [optional] -**contractedWeeks** | **float** | The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. | [optional] -**fullTimeContractedWeeks** | **float** | The amount of weeks an employee works (Full Time). If Null then the default is used. | [optional] -**fullTimeContractedHours** | **float** | The amount of hours an employee works (Full Time). If Null then the default is used. | [optional] -**bankHolidays** | [**\SynergiTech\Staffology\Model\BankHolidayCollection**](BankHolidayCollection.md) | | [optional] -**proRataRule** | [**\SynergiTech\Staffology\Model\ProRataRule**](ProRataRule.md) | | [optional] +**tue** | **float** | | [optional] +**tueIsWorkingDay** | **bool** | | [optional] +**wed** | **float** | | [optional] +**wedIsWorkingDay** | **bool** | | [optional] **workingPatternHoursType** | [**\SynergiTech\Staffology\Model\WorkingPatternHoursType**](WorkingPatternHoursType.md) | | [optional] -**isDefault** | **bool** | | [optional] **workingPatternType** | [**\SynergiTech\Staffology\Model\WorkingPatternType**](WorkingPatternType.md) | | [optional] -**effectiveFrom** | **\DateTime** | | [optional] -**shiftWorkingPatternDays** | [**\SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayRequest[]**](ContractShiftWorkingPatternDayRequest.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractWorkingPatternResponse.md b/docs/Model/ContractWorkingPatternResponse.md index 9b2ecf3..130399c 100644 --- a/docs/Model/ContractWorkingPatternResponse.md +++ b/docs/Model/ContractWorkingPatternResponse.md @@ -4,27 +4,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**bankHolidayDates** | **\DateTime[]** | [readonly] The dates that are classed as Bank Holidays for this Working Pattern | [optional] +**bankHolidays** | [**\SynergiTech\Staffology\Model\BankHolidayCollection**](BankHolidayCollection.md) | | [optional] +**contractedWeeks** | **float** | The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. | [optional] +**displayName** | **string** | | [optional] [readonly] +**effectiveFrom** | **\DateTime** | | [optional] +**fri** | **float** | | [optional] +**fullTimeContractedHours** | **float** | The amount of hours an employee works (Full Time). If Null then the default is used. | [optional] +**fullTimeContractedWeeks** | **float** | The amount of weeks an employee works (Full Time). If Null then the default is used. | [optional] **id** | **string** | | [optional] -**title** | **string** | | +**isDefault** | **bool** | | [optional] **mon** | **float** | | [optional] -**tue** | **float** | | [optional] -**wed** | **float** | | [optional] -**thu** | **float** | | [optional] -**fri** | **float** | | [optional] +**proRataRule** | [**\SynergiTech\Staffology\Model\ProRataRule**](ProRataRule.md) | | [optional] **sat** | **float** | | [optional] +**shiftWorkingPatternDays** | [**\SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayResponse[]**](ContractShiftWorkingPatternDayResponse.md) | | [optional] **sun** | **float** | | [optional] -**contractedWeeks** | **float** | The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. | [optional] -**fullTimeContractedWeeks** | **float** | The amount of weeks an employee works (Full Time). If Null then the default is used. | [optional] -**fullTimeContractedHours** | **float** | The amount of hours an employee works (Full Time). If Null then the default is used. | [optional] -**bankHolidays** | [**\SynergiTech\Staffology\Model\BankHolidayCollection**](BankHolidayCollection.md) | | [optional] -**proRataRule** | [**\SynergiTech\Staffology\Model\ProRataRule**](ProRataRule.md) | | [optional] -**bankHolidayDates** | **\DateTime[]** | [readonly] The dates that are classed as Bank Holidays for this Working Pattern | [optional] -**workingPatternHoursType** | [**\SynergiTech\Staffology\Model\WorkingPatternHoursType**](WorkingPatternHoursType.md) | | [optional] -**isDefault** | **bool** | | [optional] -**displayName** | **string** | | [optional] [readonly] +**thu** | **float** | | [optional] +**title** | **string** | | **totalHours** | **float** | | [optional] [readonly] +**tue** | **float** | | [optional] +**wed** | **float** | | [optional] +**workingPatternHoursType** | [**\SynergiTech\Staffology\Model\WorkingPatternHoursType**](WorkingPatternHoursType.md) | | [optional] **workingPatternType** | [**\SynergiTech\Staffology\Model\WorkingPatternType**](WorkingPatternType.md) | | [optional] -**effectiveFrom** | **\DateTime** | | [optional] -**shiftWorkingPatternDays** | [**\SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayResponse[]**](ContractShiftWorkingPatternDayResponse.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractYearsServiceEntitlementRequest.md b/docs/Model/ContractYearsServiceEntitlementRequest.md index 18e4263..4fecb5a 100644 --- a/docs/Model/ContractYearsServiceEntitlementRequest.md +++ b/docs/Model/ContractYearsServiceEntitlementRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**yearsService** | **int** | Number of years of service. | [optional] **totalAdditionalDaysHoliday** | **float** | Total additional days of holiday entitlement. | [optional] +**yearsService** | **int** | Number of years of service. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractYearsServiceEntitlementResponse.md b/docs/Model/ContractYearsServiceEntitlementResponse.md index 68c1a2a..44e2a79 100644 --- a/docs/Model/ContractYearsServiceEntitlementResponse.md +++ b/docs/Model/ContractYearsServiceEntitlementResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**totalAdditionalDaysHoliday** | **float** | Total additional days of holiday entitlement. | [optional] **uniqueId** | **string** | Unique identifier for the Years Service Entitlement. | [optional] **yearsService** | **int** | Number of years of service. | [optional] -**totalAdditionalDaysHoliday** | **float** | Total additional days of holiday entitlement. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ContractYearsServiceEntitlementUpdateRequest.md b/docs/Model/ContractYearsServiceEntitlementUpdateRequest.md index bbd3abb..70cd33e 100644 --- a/docs/Model/ContractYearsServiceEntitlementUpdateRequest.md +++ b/docs/Model/ContractYearsServiceEntitlementUpdateRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**totalAdditionalDaysHoliday** | **float** | Total additional days of holiday entitlement. | [optional] **uniqueId** | **string** | Unique identifier for the request. | [optional] **yearsService** | **int** | Number of years of service. | [optional] -**totalAdditionalDaysHoliday** | **float** | Total additional days of holiday entitlement. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CostAnalysisReport.md b/docs/Model/CostAnalysisReport.md index f1b4d60..e17fd63 100644 --- a/docs/Model/CostAnalysisReport.md +++ b/docs/Model/CostAnalysisReport.md @@ -4,31 +4,32 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**singlePayrun** | [**\SynergiTech\Staffology\Model\PayRun**](PayRun.md) | | [optional] -**totalPay** | **float** | | [optional] [readonly] -**pension** | **float** | | [optional] **aeoFees** | **float** | | [optional] -**totalCost** | **float** | | [optional] [readonly] +**employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **employerNic** | **float** | | [optional] -**netPayrollCost** | **float** | | [optional] -**maleCount** | **int** | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] **femaleCount** | **int** | | [optional] -**leaverCount** | **int** | | [optional] +**isDraft** | **bool** | | [optional] **joinerCount** | **int** | | [optional] -**paymentAfterLeavingCount** | **int** | | [optional] -**recoverableAmounts** | [**\SynergiTech\Staffology\Model\RecoverableAmounts**](RecoverableAmounts.md) | | [optional] -**employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**leaverCount** | **int** | | [optional] +**maleCount** | **int** | | [optional] +**netPayrollCost** | **float** | | [optional] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**paymentAfterLeavingCount** | **int** | | [optional] +**pension** | **float** | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] +**recoverableAmounts** | [**\SynergiTech\Staffology\Model\RecoverableAmounts**](RecoverableAmounts.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**singlePayrun** | [**\SynergiTech\Staffology\Model\PayRun**](PayRun.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**totalCost** | **float** | | [optional] [readonly] +**totalPay** | **float** | | [optional] [readonly] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CostAnalysisReportReportResponse.md b/docs/Model/CostAnalysisReportReportResponse.md index d8d6afa..74a6170 100644 --- a/docs/Model/CostAnalysisReportReportResponse.md +++ b/docs/Model/CostAnalysisReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\CostAnalysisReport**](CostAnalysisReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CostCentre.md b/docs/Model/CostCentre.md index d69e2bc..a56dab8 100644 --- a/docs/Model/CostCentre.md +++ b/docs/Model/CostCentre.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**accountingCode** | **string** | | [optional] **code** | **string** | The unique code for this Cost Centre | -**title** | **string** | The name of this Cost Centre | **color** | **string** | A color to used to represent this Cost Centre, in hex format. ie 'ff0000' | [optional] -**accountingCode** | **string** | | [optional] **employeeCount** | **int** | [readonly] The number of employees with this set as their primary cost centre | [optional] **hasJournalOverrides** | **bool** | Has Journal Overrides | [optional] +**title** | **string** | The name of this Cost Centre | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CostOfEmploymentReport.md b/docs/Model/CostOfEmploymentReport.md index 0685acb..00ca702 100644 --- a/docs/Model/CostOfEmploymentReport.md +++ b/docs/Model/CostOfEmploymentReport.md @@ -4,20 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] **hasDepartments** | **bool** | | [optional] +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\CostOfEmploymentReportLine[]**](CostOfEmploymentReportLine.md) | | [optional] -**employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CostOfEmploymentReportLine.md b/docs/Model/CostOfEmploymentReportLine.md index d3c36b7..47000ca 100644 --- a/docs/Model/CostOfEmploymentReportLine.md +++ b/docs/Model/CostOfEmploymentReportLine.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pay** | **float** | | [optional] +**aeoFees** | **float** | | [optional] +**department** | **string** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **employerNic** | **float** | | [optional] +**pay** | **float** | | [optional] +**payrollCode** | **string** | | [optional] **pension** | **float** | | [optional] -**aeoFees** | **float** | | [optional] **statPayReclaim** | **float** | | [optional] **totalCost** | **float** | | [optional] [readonly] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payrollCode** | **string** | | [optional] -**department** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CostOfEmploymentReportReportResponse.md b/docs/Model/CostOfEmploymentReportReportResponse.md index 8811c71..fa29c3e 100644 --- a/docs/Model/CostOfEmploymentReportReportResponse.md +++ b/docs/Model/CostOfEmploymentReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\CostOfEmploymentReport**](CostOfEmploymentReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CountryCode.md b/docs/Model/CountryCode.md new file mode 100644 index 0000000..0ccce8c --- /dev/null +++ b/docs/Model/CountryCode.md @@ -0,0 +1,8 @@ +# # CountryCode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CyclicReenrolmentReport.md b/docs/Model/CyclicReenrolmentReport.md new file mode 100644 index 0000000..f9839c9 --- /dev/null +++ b/docs/Model/CyclicReenrolmentReport.md @@ -0,0 +1,18 @@ +# # CyclicReenrolmentReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**alreadyInPension** | **int** | | [optional] +**employerName** | **string** | | [optional] +**groups** | [**\SynergiTech\Staffology\Model\CyclicReenrolmentReportGroup[]**](CyclicReenrolmentReportGroup.md) | | [optional] +**isDraft** | **bool** | | [optional] +**reenrolmentDate** | **\DateTime** | | [optional] +**report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**title** | **string** | | [optional] +**totalReenrolled** | **int** | | [optional] [readonly] +**totalStaff** | **int** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CyclicReenrolmentReportGroup.md b/docs/Model/CyclicReenrolmentReportGroup.md new file mode 100644 index 0000000..50a1bd0 --- /dev/null +++ b/docs/Model/CyclicReenrolmentReportGroup.md @@ -0,0 +1,12 @@ +# # CyclicReenrolmentReportGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\CyclicReenrolmentReportLine[]**](CyclicReenrolmentReportLine.md) | | [optional] +**name** | **string** | | [optional] +**totalStaff** | **int** | | [optional] [readonly] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CyclicReenrolmentReportLine.md b/docs/Model/CyclicReenrolmentReportLine.md new file mode 100644 index 0000000..3981d40 --- /dev/null +++ b/docs/Model/CyclicReenrolmentReportLine.md @@ -0,0 +1,18 @@ +# # CyclicReenrolmentReportLine + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**firstName** | **string** | | [optional] +**lastName** | **string** | | [optional] +**middleName** | **string** | | [optional] +**payScheduleName** | **string** | | [optional] +**payrollCode** | **string** | | [optional] +**pensionSchemeId** | **int** | | [optional] +**pensionSchemeName** | **string** | | [optional] +**reenrolmentDate** | **\DateTime** | | [optional] +**title** | **string** | | [optional] +**workerGroupName** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CyclicReenrolmentReportReportResponse.md b/docs/Model/CyclicReenrolmentReportReportResponse.md new file mode 100644 index 0000000..8a85ee2 --- /dev/null +++ b/docs/Model/CyclicReenrolmentReportReportResponse.md @@ -0,0 +1,12 @@ +# # CyclicReenrolmentReportReportResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] +**model** | [**\SynergiTech\Staffology\Model\CyclicReenrolmentReport**](CyclicReenrolmentReport.md) | | [optional] +**stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DecimalTaxYearConfigPrimitiveValue.md b/docs/Model/DecimalTaxYearConfigPrimitiveValue.md index 8470f0c..36813f1 100644 --- a/docs/Model/DecimalTaxYearConfigPrimitiveValue.md +++ b/docs/Model/DecimalTaxYearConfigPrimitiveValue.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **float** | | [optional] **effectiveFrom** | **\DateTime** | The date when these period values are effective | [optional] **midYearChanges** | [**\SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue[]**](DecimalTaxYearConfigPrimitiveValue.md) | Any optional changes to the period values that are effective from a specified date in the middle of a tax year | [optional] +**value** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Department.md b/docs/Model/Department.md index ac0caa8..723aad3 100644 --- a/docs/Model/Department.md +++ b/docs/Model/Department.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**accountingCode** | **string** | | [optional] **code** | **string** | The unique code for this Department | -**title** | **string** | The name of this Department | **color** | **string** | A color to used to represent this Department, in hex format. ie 'ff0000' | [optional] **employeeCount** | **int** | [readonly] The number of employees with this set as their primary department | [optional] -**accountingCode** | **string** | | [optional] **hasJournalOverrides** | **bool** | Has Overrides | [optional] +**title** | **string** | The name of this Department | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DepartmentMembership.md b/docs/Model/DepartmentMembership.md index dbe6443..68b57a8 100644 --- a/docs/Model/DepartmentMembership.md +++ b/docs/Model/DepartmentMembership.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **string** | The Code for the Department | **color** | **string** | [readonly] The Color for the Department | [optional] -**title** | **string** | [readonly] The Title for the Department | [optional] +**employeeRoleUniqueId** | **string** | | [optional] **primary** | **bool** | Set to true if this is the primary Department for the Employee. Only one department can be set as the primary. | [optional] +**title** | **string** | [readonly] The Title for the Department | [optional] **weighting** | **float** | If there is more than one Department Membership for the Employee then this determines the weighting to give to this membership. ie, if he is in two departments you might set the primary as 0.8 and the secondary as 0.2; | [optional] -**employeeRoleUniqueId** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DirectDebitMandate.md b/docs/Model/DirectDebitMandate.md index 9ebe5c9..4c79188 100644 --- a/docs/Model/DirectDebitMandate.md +++ b/docs/Model/DirectDebitMandate.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**isCompleted** | **bool** | | [optional] -**mandateLink** | **string** | | [optional] -**customerLink** | **string** | | [optional] -**bankName** | **string** | | [optional] **accountNumberEnding** | **string** | | [optional] +**bankName** | **string** | | [optional] +**customerLink** | **string** | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**isCompleted** | **bool** | | [optional] +**mandateLink** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DirectorshipDetails.md b/docs/Model/DirectorshipDetails.md index 74a226b..d8a4cd0 100644 --- a/docs/Model/DirectorshipDetails.md +++ b/docs/Model/DirectorshipDetails.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **isDirector** | **bool** | | [optional] -**startDate** | **\DateTime** | | [optional] **leaveDate** | **\DateTime** | | [optional] **niAlternativeMethod** | **bool** | | [optional] +**startDate** | **\DateTime** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DpsNotice.md b/docs/Model/DpsNotice.md index 967d956..11a0f66 100644 --- a/docs/Model/DpsNotice.md +++ b/docs/Model/DpsNotice.md @@ -4,23 +4,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**issueDate** | **\DateTime** | | [optional] +**appliedOn** | **\DateTime** | | [optional] **effectiveDate** | **\DateTime** | | [optional] -**taxYear** | **int** | | [optional] [readonly] -**sequenceNumber** | **int** | | [optional] -**type** | [**\SynergiTech\Staffology\Model\DpsDataType**](DpsDataType.md) | | [optional] -**formType** | **string** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **forename** | **string** | | [optional] -**surname** | **string** | | [optional] +**formType** | **string** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**issueDate** | **\DateTime** | | [optional] **niNo** | **string** | | [optional] -**worksNumber** | **string** | | [optional] +**periodApplied** | **int** | | [optional] +**planType** | [**\SynergiTech\Staffology\Model\StudentLoan**](StudentLoan.md) | | [optional] +**previousPay** | **float** | | [optional] +**previousTax** | **float** | | [optional] +**sequenceNumber** | **int** | | [optional] +**surname** | **string** | | [optional] **taxCode** | **string** | | [optional] +**taxYear** | **int** | | [optional] [readonly] +**type** | [**\SynergiTech\Staffology\Model\DpsDataType**](DpsDataType.md) | | [optional] **week1Month1** | **bool** | | [optional] -**previousTax** | **float** | | [optional] -**previousPay** | **float** | | [optional] -**planType** | [**\SynergiTech\Staffology\Model\StudentLoan**](StudentLoan.md) | | [optional] -**appliedOn** | **\DateTime** | | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**worksNumber** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DpsSettings.md b/docs/Model/DpsSettings.md index b6dd9e3..3fd45b9 100644 --- a/docs/Model/DpsSettings.md +++ b/docs/Model/DpsSettings.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**enabled** | **bool** | If enabled, we'll automatically retrieve DPS notices from HMRC for you | [optional] -**retrieveFrom** | **\DateTime** | The date from which notices should be retrieved | [optional] **autoApply** | **bool** | If enabled, we'll automatically apply DPSNotices before starting a payrun that covers the EffectiveDate | [optional] -**lastChecked** | **\DateTime** | [readonly] The time we last checked for notices | [optional] +**enabled** | **bool** | If enabled, we'll automatically retrieve DPS notices from HMRC for you | [optional] **error** | **string** | [readonly] If we received an error from HMRC when checking for notices, it'll be displayed here | [optional] +**lastChecked** | **\DateTime** | [readonly] The time we last checked for notices | [optional] +**retrieveFrom** | **\DateTime** | The date from which notices should be retrieved | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmailAttachment.md b/docs/Model/EmailAttachment.md index 6928b35..40d3726 100644 --- a/docs/Model/EmailAttachment.md +++ b/docs/Model/EmailAttachment.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **string** | | **filename** | **string** | | -**pdfPasswordType** | [**\SynergiTech\Staffology\Model\PdfPasswordType**](PdfPasswordType.md) | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**pdfPasswordType** | [**\SynergiTech\Staffology\Model\PdfPasswordType**](PdfPasswordType.md) | | [optional] +**url** | **string** | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmpRefs.md b/docs/Model/EmpRefs.md index 7d8d6e8..896c580 100644 --- a/docs/Model/EmpRefs.md +++ b/docs/Model/EmpRefs.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**officeNo** | **string** | | [optional] -**payeRef** | **string** | | [optional] **aoRef** | **string** | | [optional] -**econ** | **string** | | [optional] **cotaxRef** | **string** | | [optional] +**econ** | **string** | | [optional] +**officeNo** | **string** | | [optional] +**payeRef** | **string** | | [optional] **sautr** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Employee.md b/docs/Model/Employee.md index 69d0cc4..6c4c576 100644 --- a/docs/Model/Employee.md +++ b/docs/Model/Employee.md @@ -4,21 +4,25 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**holidaySchemeUniqueId** | **string** | | [optional] +**aeNotEnroledWarning** | **bool** | [readonly] If true then the employee should be enrolled in an Auto Enrolment Qualifying pension but isn't | [optional] [readonly] **aggregatedServiceDate** | **\DateTime** | | [optional] -**leaveHolidayAccrualDefaultRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] -**personalDetails** | [**\SynergiTech\Staffology\Model\PersonalDetails**](PersonalDetails.md) | | [optional] -**employmentDetails** | [**\SynergiTech\Staffology\Model\EmploymentDetails**](EmploymentDetails.md) | | [optional] **autoEnrolment** | [**\SynergiTech\Staffology\Model\AutoEnrolment**](AutoEnrolment.md) | | [optional] -**leaveSettings** | [**\SynergiTech\Staffology\Model\LeaveSettings**](LeaveSettings.md) | | [optional] -**rightToWork** | [**\SynergiTech\Staffology\Model\RightToWork**](RightToWork.md) | | [optional] **bankDetails** | [**\SynergiTech\Staffology\Model\BankDetails**](BankDetails.md) | | [optional] -**tags** | **string[]** | | [optional] +**defaultPensionSchemeName** | **string** | | [optional] +**defaultPensionSchemeUniqueId** | **string** | | [optional] +**defaultWorkerGroupName** | **string** | | [optional] +**defaultWorkerGroupUniqueId** | **string** | | [optional] +**employmentDetails** | [**\SynergiTech\Staffology\Model\EmploymentDetails**](EmploymentDetails.md) | | [optional] +**evcId** | **string** | If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. | [optional] +**holidaySchemeUniqueId** | **string** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**leaveHolidayAccrualDefaultRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] +**leaveSettings** | [**\SynergiTech\Staffology\Model\LeaveSettings**](LeaveSettings.md) | | [optional] **payOptions** | [**\SynergiTech\Staffology\Model\PayOptions**](PayOptions.md) | | [optional] -**status** | [**\SynergiTech\Staffology\Model\EmployeeStatus**](EmployeeStatus.md) | | [optional] -**aeNotEnroledWarning** | **bool** | [readonly] If true then the employee should be enrolled in an Auto Enrolment Qualifying pension but isn't | [optional] [readonly] +**personalDetails** | [**\SynergiTech\Staffology\Model\PersonalDetails**](PersonalDetails.md) | | [optional] +**rightToWork** | [**\SynergiTech\Staffology\Model\RightToWork**](RightToWork.md) | | [optional] **sourceSystemId** | **string** | [readonly] Can only be given a value when the employee is created. It can then never be changed. Used by external systems so they can store an immutable reference | [optional] -**evcId** | **string** | If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. | [optional] +**status** | [**\SynergiTech\Staffology\Model\EmployeeStatus**](EmployeeStatus.md) | | [optional] +**tags** | **string[]** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeBenefitsReport.md b/docs/Model/EmployeeBenefitsReport.md index accbc59..21f5c19 100644 --- a/docs/Model/EmployeeBenefitsReport.md +++ b/docs/Model/EmployeeBenefitsReport.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**isDraft** | **bool** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeBenefitsReportReportResponse.md b/docs/Model/EmployeeBenefitsReportReportResponse.md index e209442..982bd0d 100644 --- a/docs/Model/EmployeeBenefitsReportReportResponse.md +++ b/docs/Model/EmployeeBenefitsReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\EmployeeBenefitsReport**](EmployeeBenefitsReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeCostCentre.md b/docs/Model/EmployeeCostCentre.md index 62f5c26..bbf4cbb 100644 --- a/docs/Model/EmployeeCostCentre.md +++ b/docs/Model/EmployeeCostCentre.md @@ -6,10 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **string** | The Code for the Cost Centre | **color** | **string** | [readonly] The Color for the Cost Centre | [optional] -**title** | **string** | [readonly] The Title for the Cost Centre | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**employeeRoleUniqueId** | **string** | | [optional] **isPrimary** | **bool** | Set to true if this is the primary Cost Centre for the Employee. Only one Cost Centre can be set as the primary. | [optional] +**title** | **string** | [readonly] The Title for the Cost Centre | [optional] **weighting** | **float** | If there is more than one Cost Centre Membership for the Employee then this determines the weighting to give to this membership. ie, if he is in two Cost Centre you might set the primary as 0.8 and the secondary as 0.2; | [optional] -**employeeRoleUniqueId** | **string** | | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeLeaveReport.md b/docs/Model/EmployeeLeaveReport.md index 4bbece2..1f6d3a3 100644 --- a/docs/Model/EmployeeLeaveReport.md +++ b/docs/Model/EmployeeLeaveReport.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\EmployeeLeaveReportLine[]**](EmployeeLeaveReportLine.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeLeaveReportLine.md b/docs/Model/EmployeeLeaveReportLine.md index 08b180d..b1fa8e0 100644 --- a/docs/Model/EmployeeLeaveReportLine.md +++ b/docs/Model/EmployeeLeaveReportLine.md @@ -4,35 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**assumedPensionablePay** | **float** | | [optional] +**automaticAPPCalculation** | **bool** | | [optional] +**automaticAWECalculation** | **bool** | | [optional] +**averageWeeklyEarnings** | **float** | | [optional] +**babyBirthDate** | **\DateTime** | | [optional] +**babyDueDate** | **\DateTime** | | [optional] +**calculationType** | [**\SynergiTech\Staffology\Model\LeaveCalculationType**](LeaveCalculationType.md) | | [optional] +**deathDate** | **\DateTime** | | [optional] +**expectedPlacementDate** | **\DateTime** | | [optional] **firstName** | **string** | | [optional] +**from** | **\DateTime** | | [optional] +**historicLeaveRequiresProcessing** | **bool** | | [optional] **lastName** | **string** | | [optional] -**type** | [**\SynergiTech\Staffology\Model\LeaveType**](LeaveType.md) | | [optional] +**matchingDate** | **\DateTime** | | [optional] +**occupationalPolicy** | **string** | | [optional] +**offsetPay** | **bool** | | [optional] +**openEndedAbsence** | **bool** | | [optional] +**openingOmpPay** | **float** | | [optional] +**openingPay** | **float** | | [optional] +**payFrequency** | [**\SynergiTech\Staffology\Model\StatPayFrequency**](StatPayFrequency.md) | | [optional] +**paySSPInAddition** | **bool** | | [optional] **payment** | [**\SynergiTech\Staffology\Model\LeavePayType**](LeavePayType.md) | | [optional] **payrollCode** | **string** | | [optional] -**openEndedAbsence** | **bool** | | [optional] **percentOfPay** | **float** | | [optional] -**paySSPInAddition** | **bool** | | [optional] -**payFrequency** | [**\SynergiTech\Staffology\Model\StatPayFrequency**](StatPayFrequency.md) | | [optional] -**occupationalPolicy** | **string** | | [optional] -**from** | **\DateTime** | | [optional] -**to** | **\DateTime** | | [optional] -**useOpeningPay** | **bool** | | [optional] -**openingPay** | **float** | | [optional] -**openingOmpPay** | **float** | | [optional] -**babyDueDate** | **\DateTime** | | [optional] -**babyBirthDate** | **\DateTime** | | [optional] -**matchingDate** | **\DateTime** | | [optional] -**expectedPlacementDate** | **\DateTime** | | [optional] **placementDate** | **\DateTime** | | [optional] -**deathDate** | **\DateTime** | | [optional] -**averageWeeklyEarnings** | **float** | | [optional] -**automaticAWECalculation** | **bool** | | [optional] -**calculationType** | [**\SynergiTech\Staffology\Model\LeaveCalculationType**](LeaveCalculationType.md) | | [optional] **strikeHoursToDeduct** | **float** | | [optional] -**historicLeaveRequiresProcessing** | **bool** | | [optional] -**offsetPay** | **bool** | | [optional] +**to** | **\DateTime** | | [optional] +**type** | [**\SynergiTech\Staffology\Model\LeaveType**](LeaveType.md) | | [optional] **useAssumedPensionablePay** | **bool** | | [optional] -**automaticAPPCalculation** | **bool** | | [optional] -**assumedPensionablePay** | **float** | | [optional] +**useOpeningPay** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeLeaveReportReportResponse.md b/docs/Model/EmployeeLeaveReportReportResponse.md index a196312..959f5fd 100644 --- a/docs/Model/EmployeeLeaveReportReportResponse.md +++ b/docs/Model/EmployeeLeaveReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\EmployeeLeaveReport**](EmployeeLeaveReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeLoanExportReport.md b/docs/Model/EmployeeLoanExportReport.md new file mode 100644 index 0000000..8aae478 --- /dev/null +++ b/docs/Model/EmployeeLoanExportReport.md @@ -0,0 +1,13 @@ +# # EmployeeLoanExportReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**isDraft** | **bool** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\EmployeeLoanExportReportLine[]**](EmployeeLoanExportReportLine.md) | | [optional] +**report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**title** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeLoanExportReportLine.md b/docs/Model/EmployeeLoanExportReportLine.md new file mode 100644 index 0000000..fbe7ca0 --- /dev/null +++ b/docs/Model/EmployeeLoanExportReportLine.md @@ -0,0 +1,19 @@ +# # EmployeeLoanExportReportLine + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**firstName** | **string** | | [optional] +**issueDate** | **\DateTime** | | [optional] +**loanAmount** | **float** | | [optional] +**pausePayments** | **bool** | | [optional] +**payCode** | **string** | | [optional] +**payrollCode** | **string** | | [optional] +**periodAmount** | **float** | | [optional] +**previouslyPaid** | **float** | | [optional] +**reference** | **string** | | [optional] +**surname** | **string** | | [optional] +**uniqueIdentifier** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeLoanExportReportReportResponse.md b/docs/Model/EmployeeLoanExportReportReportResponse.md new file mode 100644 index 0000000..8ee718d --- /dev/null +++ b/docs/Model/EmployeeLoanExportReportReportResponse.md @@ -0,0 +1,12 @@ +# # EmployeeLoanExportReportReportResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] +**model** | [**\SynergiTech\Staffology\Model\EmployeeLoanExportReport**](EmployeeLoanExportReport.md) | | [optional] +**stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeNiYtdValues.md b/docs/Model/EmployeeNiYtdValues.md index aa7fe0f..86c8cd8 100644 --- a/docs/Model/EmployeeNiYtdValues.md +++ b/docs/Model/EmployeeNiYtdValues.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payrollCode** | **string** | | [optional] **firstName** | **string** | | [optional] **lastName** | **string** | | [optional] **niTable** | **string** | | [optional] +**payrollCode** | **string** | | [optional] **values** | [**\SynergiTech\Staffology\Model\NiYtdValue[]**](NiYtdValue.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeePayRunTotal.md b/docs/Model/EmployeePayRunTotal.md index e7ca609..6a34f28 100644 --- a/docs/Model/EmployeePayRunTotal.md +++ b/docs/Model/EmployeePayRunTotal.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollCode** | **string** | Payroll code of the employee | [optional] -**grossForNi** | **float** | The amount of the Gross that is subject to NI | [optional] -**grossPensionPay** | **float** | The amount of the Gross that is subject to PensionPay | [optional] -**employerPensionContribution** | **float** | The value of the Pension Contribution being made by the Employer for this Employee | [optional] -**employerNi** | **float** | The Employer NI Contribution amount | [optional] -**grossTaxablePay** | **float** | The amount of the Gross that is subject to TaxablePay | [optional] **employeeNi** | **float** | The Employee NI Contribution amount | [optional] -**tax** | **float** | The Employee Tax amount | [optional] -**studentLoanRecovered** | **float** | The Employee Student Loan recovered amount | [optional] **employeePension** | **float** | The value of the Pension Contribution(PENSION) being made by the Employee as a Net Pay Arrangement | [optional] **employeePensionContributionReliefAtSource** | **float** | The value of employee pension contributions Relief At Source(PENSIONRAS) that are not paid under 'net pay arrangements' | [optional] **employeePensionContributionSalarySacrifice** | **float** | The value of the Pension Contribution Salary Sacrifice(PENSIONSS) being made by the Employee as a Salary Sacrifice | [optional] +**employerNi** | **float** | The Employer NI Contribution amount | [optional] +**employerPensionContribution** | **float** | The value of the Pension Contribution being made by the Employer for this Employee | [optional] +**grossForNi** | **float** | The amount of the Gross that is subject to NI | [optional] +**grossPensionPay** | **float** | The amount of the Gross that is subject to PensionPay | [optional] +**grossTaxablePay** | **float** | The amount of the Gross that is subject to TaxablePay | [optional] +**payrollCode** | **string** | Payroll code of the employee | [optional] +**studentLoanRecovered** | **float** | The Employee Student Loan recovered amount | [optional] +**tax** | **float** | The Employee Tax amount | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeePaymentsReportLine.md b/docs/Model/EmployeePaymentsReportLine.md index 5777bbf..8bcaea8 100644 --- a/docs/Model/EmployeePaymentsReportLine.md +++ b/docs/Model/EmployeePaymentsReportLine.md @@ -4,34 +4,36 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollCode** | **string** | Payroll Code for exported pay line | [optional] -**uniqueIdentifier** | **string** | Unique Id for exported pay line | [optional] **amount** | **float** | Amount for exported pay line | [optional] -**multiplierType** | **int** | MultiplierType of exported pay line | [optional] -**multiplier** | **float** | Multiplier for exported pay line | [optional] -**hours** | **float** | Number of Hours for exported pay line | [optional] +**autoAdjustForLeave** | **bool** | Indicates Auto Adjust For Leave value for exported pay line | [optional] +**calculateAsWhenPaid** | **bool** | Indicates whether this pay line should be treated as When Paid rather than When Earned | [optional] +**contributesToBasicPay** | **bool** | Indicates Contributes To Basic Pay value for exported pay line | [optional] +**costCentre** | **string** | Cost Centre for exported pay line | [optional] +**costCentreId** | **string** | Cost Centre ID associated with the exported payline | [optional] **days** | **float** | Number of Days for exported pay line | [optional] -**payCode** | **string** | Pay code for exported pay line | [optional] +**department** | **string** | Department for exported pay line | [optional] +**departmentId** | **string** | Department ID associated with the exported payline | [optional] **description** | **string** | Note for exported pay line | [optional] **effectiveFrom** | **\DateTime** | Effective From date for exported pay line | [optional] **effectiveTo** | **\DateTime** | Effective To date for exported pay line | [optional] -**isNetToGross** | **bool** | Indicates Gross To Net value for exported pay line | [optional] -**department** | **string** | Department for exported pay line | [optional] -**costCentre** | **string** | Cost Centre for exported pay line | [optional] -**isAutomaticBackPay** | **bool** | Indicates Automatic Back Pay value for exported pay line | [optional] +**employeeName** | **string** | Employee Name for exported pay line | [optional] +**hours** | **float** | Number of Hours for exported pay line | [optional] **ignoreInitialBackPay** | **bool** | Indicates Ignore Initial Back Pay value for exported pay line | [optional] -**contributesToBasicPay** | **bool** | Indicates Contributes To Basic Pay value for exported pay line | [optional] -**autoAdjustForLeave** | **bool** | Indicates Auto Adjust For Leave value for exported pay line | [optional] -**roleReference** | **string** | Employee Role Reference for exported pay line | [optional] -**paySpine** | **string** | Pay Spine for exported pay line | [optional] -**payGrade** | **string** | Pay Grade for exported pay line | [optional] -**spinePoint** | **string** | Spine Point for exported pay line | [optional] +**isAutomaticBackPay** | **bool** | Indicates Automatic Back Pay value for exported pay line | [optional] +**isNetToGross** | **bool** | Indicates Gross To Net value for exported pay line | [optional] **londonAllowanceType** | **string** | London Allowance type for exported pay line | [optional] -**calculateAsWhenPaid** | **bool** | Indicates whether this pay line should be treated as When Paid rather than When Earned | [optional] -**departmentId** | **string** | Department ID associated with the exported payline | [optional] -**costCentreId** | **string** | Cost Centre ID associated with the exported payline | [optional] +**multiplier** | **float** | Multiplier for exported pay line | [optional] +**multiplierType** | **int** | MultiplierType of exported pay line | [optional] +**payCode** | **string** | Pay code for exported pay line | [optional] +**payGrade** | **string** | Pay Grade for exported pay line | [optional] +**paySpine** | **string** | Pay Spine for exported pay line | [optional] +**paySpineGradeId** | **string** | Pay Spine Grade ID associated with the exported payline | [optional] **paySpineId** | **string** | Pay Spine ID associated with the exported payline | [optional] +**payrollCode** | **string** | Payroll Code for exported pay line | [optional] +**percentage** | **float** | Amount for exported pay line | [optional] +**roleReference** | **string** | Employee Role Reference for exported pay line | [optional] **spinalPointId** | **string** | Spinal Point ID associated with the exported payline | [optional] -**paySpineGradeId** | **string** | Pay Spine Grade ID associated with the exported payline | [optional] +**spinePoint** | **string** | Spine Point for exported pay line | [optional] +**uniqueIdentifier** | **string** | Unique Id for exported pay line | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeePaymentsReportLineListReportResponse.md b/docs/Model/EmployeePaymentsReportLineListReportResponse.md new file mode 100644 index 0000000..aa53236 --- /dev/null +++ b/docs/Model/EmployeePaymentsReportLineListReportResponse.md @@ -0,0 +1,12 @@ +# # EmployeePaymentsReportLineListReportResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] +**model** | [**\SynergiTech\Staffology\Model\EmployeePaymentsReportLine[]**](EmployeePaymentsReportLine.md) | [readonly] If the type is application.json then this will contain a JSON representation of the relevant model | [optional] +**stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeRole.md b/docs/Model/EmployeeRole.md index ba6bda2..e00c773 100644 --- a/docs/Model/EmployeeRole.md +++ b/docs/Model/EmployeeRole.md @@ -4,18 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**jobTitle** | **string** | Job Title of the Role | [optional] +**basis** | [**\SynergiTech\Staffology\Model\RoleBasis**](RoleBasis.md) | | [optional] +**defaultPensionSchemeUniqueId** | **string** | Used when employee role has attached default pension scheme Id | [optional] +**defaultWorkerGroupUniqueId** | **string** | Used when employee role has attached default worker group Id | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **isPrimary** | **bool** | Set to True if this is Primary role of the Employee | [optional] +**jobTitle** | **string** | Job Title of the Role | [optional] +**occupationalMaternityPolicyUniqueId** | **string** | Used for assigning occupational maternity policy | [optional] +**occupationalSicknessPolicyUniqueId** | **string** | Used for assigning occupational sickness policy | [optional] +**payOptions** | [**\SynergiTech\Staffology\Model\EmployeeRolePayOptions**](EmployeeRolePayOptions.md) | | [optional] **reference** | **string** | | [optional] **startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] -**basis** | [**\SynergiTech\Staffology\Model\RoleBasis**](RoleBasis.md) | | [optional] **type** | [**\SynergiTech\Staffology\Model\RoleType**](RoleType.md) | | [optional] -**payOptions** | [**\SynergiTech\Staffology\Model\EmployeeRolePayOptions**](EmployeeRolePayOptions.md) | | [optional] **workingPatternId** | **string** | Used when calculating payments for Leave. If null then the default Working Pattern is used | [optional] -**occupationalMaternityPolicyUniqueId** | **string** | Used for assigning occupational maternity policy | [optional] -**occupationalSicknessPolicyUniqueId** | **string** | Used for assigning occupational sickness policy | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeRoleAnalysisCategoryCode.md b/docs/Model/EmployeeRoleAnalysisCategoryCode.md index 728ce90..fe06eb1 100644 --- a/docs/Model/EmployeeRoleAnalysisCategoryCode.md +++ b/docs/Model/EmployeeRoleAnalysisCategoryCode.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**analysisCategoryName** | **string** | Analysis Category Name | [optional] +**analysisCategoryPublicId** | **string** | Analysis Category Public Id | [optional] **code** | **string** | The Code for the AnalysisCategoryCode | **color** | **string** | [readonly] The Color for the AnalysisCategoryCode | [optional] -**title** | **string** | [readonly] The Title for the AnalysisCategoryCode | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**employeeRolePublicId** | **string** | Employee Role Public Id | [optional] **isPrimary** | **bool** | Set to true if this is the primary AnalysisCategoryCode for the Employee. Only one AnalysisCategoryCode can be set as the primary. | [optional] +**title** | **string** | [readonly] The Title for the AnalysisCategoryCode | [optional] **weighting** | **float** | If there is more than one AnalysisCategoryCode Membership for the Employee then this determines the weighting to give to this membership. ie, if he is in two AnalysisCategoryCode you might set the primary as 0.8 and the secondary as 0.2; | [optional] -**analysisCategoryName** | **string** | Analysis Category Name | [optional] -**analysisCategoryPublicId** | **string** | Analysis Category Public Id | [optional] -**employeeRolePublicId** | **string** | Employee Role Public Id | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeRolePayItem.md b/docs/Model/EmployeeRolePayItem.md index 6c87ef6..9464c61 100644 --- a/docs/Model/EmployeeRolePayItem.md +++ b/docs/Model/EmployeeRolePayItem.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**roleId** | **string** | | [optional] -**isPrimary** | **bool** | | [optional] **baseDailyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] **baseHourlyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] +**isPrimary** | **bool** | | [optional] +**roleId** | **string** | | [optional] **weight** | **float** | This property is used to calculate values for the relative weight of the usual pay for each role compared to the sum of all roles' usual pay Usual pay for the purpose of the current value's calculation is based on the employee's permanent pay items including employee basic pay and permanent addition and deduction pay lines subject to NI or Tax | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeRolePayOptions.md b/docs/Model/EmployeeRolePayOptions.md index 963305a..3cc9e71 100644 --- a/docs/Model/EmployeeRolePayOptions.md +++ b/docs/Model/EmployeeRolePayOptions.md @@ -4,20 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] +**baseDailyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] +**baseHourlyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] +**basicPay** | **float** | The amount of basic pay the Employee is regularly paid each period This amount is the combined total of all pay elements that contribute to basic pay | [optional] **basis** | [**\SynergiTech\Staffology\Model\PayBasis**](PayBasis.md) | | [optional] -**nationalMinimumWage** | **bool** | | [optional] -**payCode** | **string** | If you want the Employees pay to be allocated to a code other than BASIC, specify it here | [optional] -**mileageVehicleType** | [**\SynergiTech\Staffology\Model\MileageVehicleType**](MileageVehicleType.md) | | [optional] +**excludedRegularPayLines** | [**\SynergiTech\Staffology\Model\PayLine[]**](PayLine.md) | These used to store the PayLines that have been excluded from RegularPaylines. | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **mapsMiles** | **int** | The number of miles to pay for as Mileage Allowance Payments | [optional] +**mileageVehicleType** | [**\SynergiTech\Staffology\Model\MileageVehicleType**](MileageVehicleType.md) | | [optional] +**nationalMinimumWage** | **bool** | | [optional] +**niTable** | **string** | | [optional] **payAmount** | **float** | The amount the Employee is regularly paid each period | [optional] **payAmountMultiplier** | **float** | This property is irrelevant if the basis is Monthly. But if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period. | [optional] -**baseHourlyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] -**baseDailyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] -**basicPay** | **float** | The amount of basic pay the Employee is regularly paid each period This amount is the combined total of all pay elements that contribute to basic pay | [optional] -**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] -**niTable** | **string** | | [optional] +**payCode** | **string** | If you want the Employees pay to be allocated to a code other than BASIC, specify it here | [optional] **regularPayLines** | [**\SynergiTech\Staffology\Model\PayLine[]**](PayLine.md) | These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. | [optional] -**excludedRegularPayLines** | [**\SynergiTech\Staffology\Model\PayLine[]**](PayLine.md) | These used to store the PayLines that have been excluded from RegularPaylines. | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployeeYtdValues.md b/docs/Model/EmployeeYtdValues.md index cbc0f85..d907389 100644 --- a/docs/Model/EmployeeYtdValues.md +++ b/docs/Model/EmployeeYtdValues.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payrollCode** | **string** | | [optional] **firstName** | **string** | | [optional] **lastName** | **string** | | [optional] +**payrollCode** | **string** | | [optional] **values** | [**\SynergiTech\Staffology\Model\YtdValue[]**](YtdValue.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployerBetaFeatures.md b/docs/Model/EmployerBetaFeatures.md new file mode 100644 index 0000000..e324f7b --- /dev/null +++ b/docs/Model/EmployerBetaFeatures.md @@ -0,0 +1,8 @@ +# # EmployerBetaFeatures + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployerDefaults.md b/docs/Model/EmployerDefaults.md index 38a7d34..2299a95 100644 --- a/docs/Model/EmployerDefaults.md +++ b/docs/Model/EmployerDefaults.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employer** | [**\SynergiTech\Staffology\Model\EmployerItem**](EmployerItem.md) | | [optional] -**payCodes** | **bool** | If true then PayCodes and PayCodeSets will be copied from the specified Employer | [optional] **csvMappings** | **bool** | If true then CSV Mappings will be copied from the specified Employer | [optional] **departments** | **bool** | If true then Departments, Cost Centres and Analysis Categories will be copied from the specified Employer | [optional] -**rti** | **bool** | If true then RTI Settings will be copied from the specified Employer | [optional] -**users** | **bool** | If true then Users will be copied from the specified Employer | [optional] +**employer** | [**\SynergiTech\Staffology\Model\EmployerItem**](EmployerItem.md) | | [optional] **hmrcNoticeSettings** | **bool** | If true then HMRC Notice Settings will be copied from the specified Employer | [optional] -**payOptions** | **bool** | If true then Default Pay Options will be copied from the specified Employer. | [optional] -**workingPatterns** | **bool** | If true then WorkingPatterns will be copied from the specified Employer | [optional] **occupationalPolicies** | **bool** | If true then Occupational Absence Schemes will be copied from the specified Employer. | [optional] -**pensionSchemes** | **bool** | If true then PensionSchemes will be copied from the specified Employer | [optional] +**payCodes** | **bool** | If true then PayCodes and PayCodeSets will be copied from the specified Employer | [optional] +**payOptions** | **bool** | If true then Default Pay Options will be copied from the specified Employer. | [optional] **payees** | **bool** | If true then Payees will be copied from the specified Employer | [optional] +**pensionSchemes** | **bool** | If true then PensionSchemes will be copied from the specified Employer | [optional] **reportPacks** | **bool** | If true then ReportPacks will be copied from the specified Employer | [optional] +**rti** | **bool** | If true then RTI Settings will be copied from the specified Employer | [optional] +**users** | **bool** | If true then Users will be copied from the specified Employer | [optional] +**workingPatterns** | **bool** | If true then WorkingPatterns will be copied from the specified Employer | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployerEmail.md b/docs/Model/EmployerEmail.md index 33ee0cc..eba4aaf 100644 --- a/docs/Model/EmployerEmail.md +++ b/docs/Model/EmployerEmail.md @@ -4,20 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**toName** | **string** | | -**toEmail** | **string** | | -**subject** | **string** | | -**buttonText** | **string** | | [optional] -**buttonLink** | **string** | | [optional] -**bodyPreview** | **string** | | [optional] -**body** | **string** | | [optional] **afterBtnBody** | **string** | | [optional] +**attachments** | [**\SynergiTech\Staffology\Model\EmailAttachment[]**](EmailAttachment.md) | | [optional] +**body** | **string** | | [optional] +**bodyPreview** | **string** | | [optional] +**buttonLink** | **string** | | [optional] +**buttonText** | **string** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**sendAttempts** | **int** | | [optional] **status** | [**\SynergiTech\Staffology\Model\BackgroundTaskStatus**](BackgroundTaskStatus.md) | | [optional] **statusDate** | **\DateTime** | | [optional] **statusMessage** | **string** | | [optional] -**sendAttempts** | **int** | | [optional] +**subject** | **string** | | +**toEmail** | **string** | | +**toName** | **string** | | **webAppBaseUrl** | **string** | | [optional] -**attachments** | [**\SynergiTech\Staffology\Model\EmailAttachment[]**](EmailAttachment.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployerEvcOptInHistory.md b/docs/Model/EmployerEvcOptInHistory.md index eccb6fb..d6eee3c 100644 --- a/docs/Model/EmployerEvcOptInHistory.md +++ b/docs/Model/EmployerEvcOptInHistory.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**optIn** | **bool** | | [optional] **date** | **\DateTime** | | [optional] +**optIn** | **bool** | | [optional] **userEmail** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployerGroup.md b/docs/Model/EmployerGroup.md index 0c3baf0..d081519 100644 --- a/docs/Model/EmployerGroup.md +++ b/docs/Model/EmployerGroup.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **string** | The unique code for this EmployerGroup | -**employerCount** | **int** | | [optional] **color** | **string** | A color to used to represent this EmployerGroup, in hex format. ie 'ff0000' | [optional] +**employerCount** | **int** | | [optional] **name** | **string** | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployerGroupMembership.md b/docs/Model/EmployerGroupMembership.md index 8db6b49..13295f2 100644 --- a/docs/Model/EmployerGroupMembership.md +++ b/docs/Model/EmployerGroupMembership.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **string** | The Code for the EmployerGroup | **color** | **string** | [readonly] The Color for the EmployerGroup | [optional] -**title** | **string** | [readonly] The Title for the EmployerGroup | [optional] **primary** | **bool** | Set to true if this is the primary EmployerGroup for the Employer. Only one EmployerGroup can be set as the primary. | [optional] +**title** | **string** | [readonly] The Title for the EmployerGroup | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployerItem.md b/docs/Model/EmployerItem.md index b8bb2d8..37e56d5 100644 --- a/docs/Model/EmployerItem.md +++ b/docs/Model/EmployerItem.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**isOwner** | **bool** | | [optional] -**role** | [**\SynergiTech\Staffology\Model\UserRole**](UserRole.md) | | [optional] **id** | **string** | | [optional] -**name** | **string** | | [optional] +**isOwner** | **bool** | | [optional] **metadata** | **mixed** | | [optional] +**name** | **string** | | [optional] +**role** | [**\SynergiTech\Staffology\Model\UserRole**](UserRole.md) | | [optional] **url** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployerOpeningBalances.md b/docs/Model/EmployerOpeningBalances.md index a34f1e9..5d6c4c7 100644 --- a/docs/Model/EmployerOpeningBalances.md +++ b/docs/Model/EmployerOpeningBalances.md @@ -4,20 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**smpRecovered** | **float** | Value of Statutory Maternity Pay recovered year to date | [optional] -**sppRecovered** | **float** | Value of Statutory Paternity Pay recovered year to date | [optional] -**sapRecovered** | **float** | Value of Statutory Adoption Pay recovered year to date | [optional] -**shPPRecovered** | **float** | Value of Shared Parental Pay recovered year to date | [optional] -**spbpRecovered** | **float** | Value of Statutory Parental Bereavment Pay recovered year to date | [optional] -**sncpRecovered** | **float** | Value of Statutory Neonatal Care Pay recovered year to date | [optional] +**apprenticeshipLevy** | **float** | Value of Apprenticeship levy paid year to date | [optional] +**cisDeductionsSuffered** | **float** | Value of CIS deductions suffered year to date | [optional] +**employmentAllowance** | **float** | Value of Employment Allowance claimed year to date | [optional] +**nicCompensationOnSAP** | **float** | Value of NIC compensation on Statutory Adoption Pay year to date | [optional] **nicCompensationOnSMP** | **float** | Value of NIC compensation on SMP year to date | [optional] +**nicCompensationOnSNCP** | **float** | Value of NIC compensation on Statutory Neonatal Care Pay year to date | [optional] +**nicCompensationOnSPBP** | **float** | Value of NIC compensation on Statutory Parental Bereavement Pay year to date | [optional] **nicCompensationOnSPP** | **float** | Value of NIC compensation on Statutory Paternity Pay year to date | [optional] -**nicCompensationOnSAP** | **float** | Value of NIC compensation on Statutory Adoption Pay year to date | [optional] **nicCompensationOnShPP** | **float** | Value of NIC compensation on Shared Parental Pay year to date | [optional] -**nicCompensationOnSPBP** | **float** | Value of NIC compensation on Statutory Parental Bereavement Pay year to date | [optional] -**nicCompensationOnSNCP** | **float** | Value of NIC compensation on Statutory Neonatal Care Pay year to date | [optional] -**cisDeductionsSuffered** | **float** | Value of CIS deductions suffered year to date | [optional] -**apprenticeshipLevy** | **float** | Value of Apprenticeship levy paid year to date | [optional] -**employmentAllowance** | **float** | Value of Employment Allowance claimed year to date | [optional] +**sapRecovered** | **float** | Value of Statutory Adoption Pay recovered year to date | [optional] +**shPPRecovered** | **float** | Value of Shared Parental Pay recovered year to date | [optional] +**smpRecovered** | **float** | Value of Statutory Maternity Pay recovered year to date | [optional] +**sncpRecovered** | **float** | Value of Statutory Neonatal Care Pay recovered year to date | [optional] +**spbpRecovered** | **float** | Value of Statutory Parental Bereavment Pay recovered year to date | [optional] +**sppRecovered** | **float** | Value of Statutory Paternity Pay recovered year to date | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployerPensionContribution.md b/docs/Model/EmployerPensionContribution.md index 276586a..c0be374 100644 --- a/docs/Model/EmployerPensionContribution.md +++ b/docs/Model/EmployerPensionContribution.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pensionName** | **string** | | [optional] **contributionAmount** | **float** | | [optional] **contributionPercentage** | **float** | | [optional] **isPercentage** | **bool** | | [optional] +**pensionName** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmployerTemplate.md b/docs/Model/EmployerTemplate.md index 9efc42c..f3ead2b 100644 --- a/docs/Model/EmployerTemplate.md +++ b/docs/Model/EmployerTemplate.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\SynergiTech\Staffology\Model\EmployerTemplateType**](EmployerTemplateType.md) | | [optional] -**description** | **string** | Explains the purpose of this template | [optional] -**isCustom** | **bool** | Indicates whether or not this template has been changed from the default content. | [optional] [readonly] **content** | **string** | | [optional] -**subject** | **string** | | [optional] **defaultContent** | **string** | [readonly] The default content for this template | [optional] **defaultSubject** | **string** | [readonly] The default subject for this template | [optional] +**description** | **string** | Explains the purpose of this template | [optional] **hasSubject** | **bool** | [readonly] If false then the Subject property is not relevant for this template type | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**isCustom** | **bool** | Indicates whether or not this template has been changed from the default content. | [optional] [readonly] +**subject** | **string** | | [optional] **tokens** | **string[]** | [readonly] A list of tokens that can be used with this template. For example, if 'Employee.FirstName' is in the list then use '{Employee.FirstName}' in the Content or Subject and it'll be replaced with the relevant value when the template is parsed. | [optional] **tokensExpanded** | **bool** | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**type** | [**\SynergiTech\Staffology\Model\EmployerTemplateType**](EmployerTemplateType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EmploymentDetails.md b/docs/Model/EmploymentDetails.md index facc063..27ec519 100644 --- a/docs/Model/EmploymentDetails.md +++ b/docs/Model/EmploymentDetails.md @@ -4,34 +4,34 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**apprenticeshipEndDate** | **\DateTime** | | [optional] +**apprenticeshipStartDate** | **\DateTime** | | [optional] +**cis** | [**\SynergiTech\Staffology\Model\CisDetails**](CisDetails.md) | | [optional] **cisSubContractor** | **bool** | Set to True if this Employee is a CIS Subcontractor. The ```Cis``` property contains further information | [optional] -**payrollCode** | **string** | The Employees Payroll Code. Must be unique within the Employer. | -**jobTitle** | **string** | Job Title of Primary role of the Employee | [optional] -**workplacePostcode** | **string** | Set the workplace postcode, ensuring it's uppercase and no longer than 10 characters. | [optional] -**onHold** | **bool** | Set to true to temporarily exclude the employee from payruns | [optional] -**onFurlough** | **bool** | Set to true if the employee is on furlough. | [optional] -**furloughStart** | **\DateTime** | Furlough Start Date. | [optional] -**furloughEnd** | **\DateTime** | Furlough End Date. | [optional] +**continuousEmploymentDate** | **\DateTime** | [readonly] Continuous employment date for the occupational scheme. | [optional] +**department** | [**\SynergiTech\Staffology\Model\Department**](Department.md) | | [optional] +**directorshipDetails** | [**\SynergiTech\Staffology\Model\DirectorshipDetails**](DirectorshipDetails.md) | | [optional] +**forcePreviousPayrollCode** | **string** | If this property has a non-empty value then a change of Payroll code will be declared on the next FPS. | [optional] **furloughCalculationBasis** | [**\SynergiTech\Staffology\Model\FurloughCalculationBasis**](FurloughCalculationBasis.md) | | [optional] **furloughCalculationBasisAmount** | **float** | | [optional] -**partialFurlough** | **bool** | Set to true if the employee is partially furloughed. | [optional] +**furloughEnd** | **\DateTime** | Furlough End Date. | [optional] **furloughHoursNormallyWorked** | **float** | | [optional] **furloughHoursOnFurlough** | **float** | | [optional] +**furloughStart** | **\DateTime** | Furlough Start Date. | [optional] +**includeSecondedInfoOnStarter** | **bool** | [readonly] If true then include seconded information on starter of FPS | [optional] **isApprentice** | **bool** | Set to True if this Employee is an apprentice. This affects the calculations for National Minimum Wage | [optional] -**apprenticeshipStartDate** | **\DateTime** | | [optional] -**apprenticeshipEndDate** | **\DateTime** | | [optional] -**workingPattern** | **string** | Used when calculating payments for Leave. If null then the default Working Pattern is used | [optional] -**forcePreviousPayrollCode** | **string** | If this property has a non-empty value then a change of Payroll code will be declared on the next FPS. | [optional] -**starterDetails** | [**\SynergiTech\Staffology\Model\StarterDetails**](StarterDetails.md) | | [optional] -**directorshipDetails** | [**\SynergiTech\Staffology\Model\DirectorshipDetails**](DirectorshipDetails.md) | | [optional] +**isWorkingInFreePort** | **bool** | Flag indicating the employee is employed in a Freeport | [optional] +**isWorkingInInvestmentZone** | **bool** | Flag indicating the employee is employed in an Investment Zone | [optional] +**jobTitle** | **string** | Job Title of Primary role of the Employee | [optional] **leaverDetails** | [**\SynergiTech\Staffology\Model\LeaverDetails**](LeaverDetails.md) | | [optional] -**cis** | [**\SynergiTech\Staffology\Model\CisDetails**](CisDetails.md) | | [optional] -**department** | [**\SynergiTech\Staffology\Model\Department**](Department.md) | | [optional] +**onFurlough** | **bool** | Set to true if the employee is on furlough. | [optional] +**onHold** | **bool** | Set to true to temporarily exclude the employee from payruns | [optional] +**partialFurlough** | **bool** | Set to true if the employee is partially furloughed. | [optional] +**payrollCode** | **string** | The Employees Payroll Code. Must be unique within the Employer. | **roles** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | List of Roles held by Employee | [optional] -**isWorkingInFreePort** | **bool** | Flag indicating the employee is employed in a Freeport | [optional] +**starterDetails** | [**\SynergiTech\Staffology\Model\StarterDetails**](StarterDetails.md) | | [optional] **veteranDetails** | [**\SynergiTech\Staffology\Model\VeteranDetails**](VeteranDetails.md) | | [optional] -**continuousEmploymentDate** | **\DateTime** | [readonly] Continuous employment date for the occupational scheme. | [optional] -**includeSecondedInfoOnStarter** | **bool** | [readonly] If true then include seconded information on starter of FPS | [optional] -**isWorkingInInvestmentZone** | **bool** | Flag indicating the employee is employed in an Investment Zone | [optional] +**workingPattern** | **string** | Used when calculating payments for Leave. If null then the default Working Pattern is used | [optional] +**workplacePostcode** | **string** | Set the workplace postcode, ensuring it's uppercase and no longer than 10 characters. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EntitlementBand.md b/docs/Model/EntitlementBand.md index 7486165..ffec6fa 100644 --- a/docs/Model/EntitlementBand.md +++ b/docs/Model/EntitlementBand.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**order** | **int** | | [optional] +**paySspInAddition** | **bool** | | [optional] **percentOfPay** | **float** | | [optional] **period** | **int** | | [optional] -**paySspInAddition** | **bool** | | [optional] -**order** | **int** | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Eps.md b/docs/Model/Eps.md index 7e77a13..ec33dc2 100644 --- a/docs/Model/Eps.md +++ b/docs/Model/Eps.md @@ -4,19 +4,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**periodOfInactivity** | [**\SynergiTech\Staffology\Model\FromToDates**](FromToDates.md) | | [optional] -**noPaymentForPeriod** | [**\SynergiTech\Staffology\Model\FromToDates**](FromToDates.md) | | [optional] -**finalSubmission** | [**\SynergiTech\Staffology\Model\EpsFinalSubmission**](EpsFinalSubmission.md) | | [optional] -**recoverableAmounts** | [**\SynergiTech\Staffology\Model\RecoverableAmounts**](RecoverableAmounts.md) | | [optional] -**apprenticeshipLevy** | [**\SynergiTech\Staffology\Model\EpsApprenticeshipLevy**](EpsApprenticeshipLevy.md) | | [optional] **account** | [**\SynergiTech\Staffology\Model\EpsAccount**](EpsAccount.md) | | [optional] -**eligibleForEmploymentAllowance** | **bool** | | [optional] +**apprenticeshipLevy** | [**\SynergiTech\Staffology\Model\EpsApprenticeshipLevy**](EpsApprenticeshipLevy.md) | | [optional] **deMinimisStateAid** | [**\SynergiTech\Staffology\Model\EpsDeMinimisStateAid**](EpsDeMinimisStateAid.md) | | [optional] -**iRmark** | **string** | | [optional] -**xml** | **string** | This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**eligibleForEmploymentAllowance** | **bool** | | [optional] **employerReferences** | [**\SynergiTech\Staffology\Model\EmpRefs**](EmpRefs.md) | | [optional] +**finalSubmission** | [**\SynergiTech\Staffology\Model\EpsFinalSubmission**](EpsFinalSubmission.md) | | [optional] **govTalkSubmission** | [**\SynergiTech\Staffology\Model\GovTalkSubmission**](GovTalkSubmission.md) | | [optional] +**iRmark** | **string** | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**noPaymentForPeriod** | [**\SynergiTech\Staffology\Model\FromToDates**](FromToDates.md) | | [optional] +**periodOfInactivity** | [**\SynergiTech\Staffology\Model\FromToDates**](FromToDates.md) | | [optional] +**recoverableAmounts** | [**\SynergiTech\Staffology\Model\RecoverableAmounts**](RecoverableAmounts.md) | | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**xml** | **string** | This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EpsAccount.md b/docs/Model/EpsAccount.md index 73c86dd..c0ae931 100644 --- a/docs/Model/EpsAccount.md +++ b/docs/Model/EpsAccount.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **accountHoldersName** | **string** | | [optional] **accountNo** | **string** | | [optional] -**sortCode** | **string** | | [optional] **buildingSocRef** | **string** | | [optional] +**sortCode** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EpsApprenticeshipLevy.md b/docs/Model/EpsApprenticeshipLevy.md index 9dd356b..61f6a10 100644 --- a/docs/Model/EpsApprenticeshipLevy.md +++ b/docs/Model/EpsApprenticeshipLevy.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taxMonth** | **int** | | [optional] -**levyDueYTD** | **float** | | [optional] **annualAllce** | **float** | | [optional] +**levyDueYTD** | **float** | | [optional] +**taxMonth** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EpsDeMinimisStateAid.md b/docs/Model/EpsDeMinimisStateAid.md index 29a5a21..2c7c704 100644 --- a/docs/Model/EpsDeMinimisStateAid.md +++ b/docs/Model/EpsDeMinimisStateAid.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agri** | **bool** | | [optional] **fisheriesAqua** | **bool** | | [optional] -**roadTrans** | **bool** | | [optional] **indust** | **bool** | | [optional] +**roadTrans** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EpsFinalSubmission.md b/docs/Model/EpsFinalSubmission.md index e03e72d..28a7039 100644 --- a/docs/Model/EpsFinalSubmission.md +++ b/docs/Model/EpsFinalSubmission.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**isFinalSubmission** | **bool** | | [optional] **becauseSchemeCeased** | **bool** | | [optional] **dateCeased** | **\DateTime** | | [optional] +**isFinalSubmission** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Establishment.md b/docs/Model/Establishment.md index a7d04ff..1c50ae3 100644 --- a/docs/Model/Establishment.md +++ b/docs/Model/Establishment.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**localAuthorityNumber** | **string** | | [optional] -**schoolEmployerType** | **string** | | [optional] **establishmentCode** | **string** | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**localAuthorityNumber** | **string** | | [optional] +**schoolEmployerType** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EvcSettings.md b/docs/Model/EvcSettings.md index 3231eff..ecc3858 100644 --- a/docs/Model/EvcSettings.md +++ b/docs/Model/EvcSettings.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**rightToRestrict** | **bool** | If set to True then this employee shouldn't be included in data sent to EVC | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **rightToDelete** | **bool** | If set to True then the EVC service will be informed that the employee has invoked their GDPR Right To Delete | [optional] +**rightToRestrict** | **bool** | If set to True then this employee shouldn't be included in data sent to EVC | [optional] **subjectAccessRequest** | **bool** | If set to True then the EVC service will be informed that the employee has made a Subject Access Request | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Exb.md b/docs/Model/Exb.md index f59ec9b..d8b9c96 100644 --- a/docs/Model/Exb.md +++ b/docs/Model/Exb.md @@ -9,16 +9,16 @@ Name | Type | Description | Notes **deductionsAmount** | **float** | | [optional] **deductionsDescription** | **string** | | [optional] **employeeCount** | **int** | [readonly] The number of employees with a P11D | [optional] -**totalBenefits** | **float** | [readonly] Total value of benefits, not including any deductions or additions | [optional] -**totalAdjustedBenefits** | **float** | [readonly] Total value of benefits | [optional] [readonly] -**nicsRate** | **float** | [readonly] The Class 1A NICS Rate | [optional] -**nicsPayable** | **float** | [readonly] NICs Payable | [optional] [readonly] -**expensesAndBenefits** | [**\SynergiTech\Staffology\Model\ExpensesAndBenefits**](ExpensesAndBenefits.md) | | [optional] -**iRmark** | **string** | | [optional] -**xml** | **string** | This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **employerReferences** | [**\SynergiTech\Staffology\Model\EmpRefs**](EmpRefs.md) | | [optional] +**expensesAndBenefits** | [**\SynergiTech\Staffology\Model\ExpensesAndBenefits**](ExpensesAndBenefits.md) | | [optional] **govTalkSubmission** | [**\SynergiTech\Staffology\Model\GovTalkSubmission**](GovTalkSubmission.md) | | [optional] +**iRmark** | **string** | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**nicsPayable** | **float** | [readonly] NICs Payable | [optional] [readonly] +**nicsRate** | **float** | [readonly] The Class 1A NICS Rate | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**totalAdjustedBenefits** | **float** | [readonly] Total value of benefits | [optional] [readonly] +**totalBenefits** | **float** | [readonly] Total value of benefits, not including any deductions or additions | [optional] +**xml** | **string** | This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ExbP11d.md b/docs/Model/ExbP11d.md index cb7e274..86ae40f 100644 --- a/docs/Model/ExbP11d.md +++ b/docs/Model/ExbP11d.md @@ -4,20 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**assetsAvail** | [**\SynergiTech\Staffology\Model\P11DAssetAvailableCollection**](P11DAssetAvailableCollection.md) | | [optional] +**cars** | [**\SynergiTech\Staffology\Model\P11DCarCollection**](P11DCarCollection.md) | | [optional] **employee** | [**\SynergiTech\Staffology\Model\ExbP11dEmployee**](ExbP11dEmployee.md) | | [optional] -**transferred** | [**\SynergiTech\Staffology\Model\P11DAssetTransferredCollection**](P11DAssetTransferredCollection.md) | | [optional] -**payments** | [**\SynergiTech\Staffology\Model\P11DPaymentCollection**](P11DPaymentCollection.md) | | [optional] -**vouchersOrCCs** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] +**expPaid** | [**\SynergiTech\Staffology\Model\P11dExpenses**](P11dExpenses.md) | | [optional] **livingAccom** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] -**mileageAllow** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] -**cars** | [**\SynergiTech\Staffology\Model\P11DCarCollection**](P11DCarCollection.md) | | [optional] -**vans** | [**\SynergiTech\Staffology\Model\P11dVans**](P11dVans.md) | | [optional] **loans** | [**\SynergiTech\Staffology\Model\P11DLoanCollection**](P11DLoanCollection.md) | | [optional] **medical** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] +**mileageAllow** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] +**other** | [**\SynergiTech\Staffology\Model\P11DOther**](P11DOther.md) | | [optional] +**payments** | [**\SynergiTech\Staffology\Model\P11DPaymentCollection**](P11DPaymentCollection.md) | | [optional] **relocation** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] **services** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] -**assetsAvail** | [**\SynergiTech\Staffology\Model\P11DAssetAvailableCollection**](P11DAssetAvailableCollection.md) | | [optional] -**other** | [**\SynergiTech\Staffology\Model\P11DOther**](P11DOther.md) | | [optional] -**expPaid** | [**\SynergiTech\Staffology\Model\P11dExpenses**](P11dExpenses.md) | | [optional] +**transferred** | [**\SynergiTech\Staffology\Model\P11DAssetTransferredCollection**](P11DAssetTransferredCollection.md) | | [optional] +**vans** | [**\SynergiTech\Staffology\Model\P11dVans**](P11dVans.md) | | [optional] +**vouchersOrCCs** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ExbP11dEmployee.md b/docs/Model/ExbP11dEmployee.md index a716e92..c675841 100644 --- a/docs/Model/ExbP11dEmployee.md +++ b/docs/Model/ExbP11dEmployee.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employeeUniqueId** | **string** | | [optional] +**birthDate** | **string** | | [optional] **dirInd** | **string** | | [optional] +**employeeUniqueId** | **string** | | [optional] +**gender** | **string** | | [optional] **name** | [**\SynergiTech\Staffology\Model\RtiEmployeeName**](RtiEmployeeName.md) | | [optional] -**wksNo** | **string** | | [optional] **nino** | **string** | | [optional] -**birthDate** | **string** | | [optional] -**gender** | **string** | | [optional] +**wksNo** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ExbP11dbClass1A.md b/docs/Model/ExbP11dbClass1A.md index 5ea4ccd..1adee7b 100644 --- a/docs/Model/ExbP11dbClass1A.md +++ b/docs/Model/ExbP11dbClass1A.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**niCsRate** | **string** | | [optional] -**totalBenefit** | [**\SynergiTech\Staffology\Model\ExbP11dbClass1ATotalBenefit**](ExbP11dbClass1ATotalBenefit.md) | | [optional] **adjustments** | [**\SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustments**](ExbP11dbClass1AAdjustments.md) | | [optional] **niCpayable** | **string** | | [optional] +**niCsRate** | **string** | | [optional] +**totalBenefit** | [**\SynergiTech\Staffology\Model\ExbP11dbClass1ATotalBenefit**](ExbP11dbClass1ATotalBenefit.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ExbP11dbClass1AAdjustment.md b/docs/Model/ExbP11dbClass1AAdjustment.md index a3ea308..ae5c180 100644 --- a/docs/Model/ExbP11dbClass1AAdjustment.md +++ b/docs/Model/ExbP11dbClass1AAdjustment.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **string** | | [optional] **adjustment** | **string** | | [optional] +**description** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ExbP11dbClass1AAdjustments.md b/docs/Model/ExbP11dbClass1AAdjustments.md index 7156fd2..140183d 100644 --- a/docs/Model/ExbP11dbClass1AAdjustments.md +++ b/docs/Model/ExbP11dbClass1AAdjustments.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalBenefit** | **string** | | [optional] **amountDue** | [**\SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustment**](ExbP11dbClass1AAdjustment.md) | | [optional] **amountNotDue** | [**\SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustment**](ExbP11dbClass1AAdjustment.md) | | [optional] -**total** | **string** | | [optional] **payable** | **string** | | [optional] +**total** | **string** | | [optional] +**totalBenefit** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ExbReportResponse.md b/docs/Model/ExbReportResponse.md index 2b786f8..a535353 100644 --- a/docs/Model/ExbReportResponse.md +++ b/docs/Model/ExbReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\Exb**](Exb.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ExpensesAndBenefits.md b/docs/Model/ExpensesAndBenefits.md index 02b635f..7235dac 100644 --- a/docs/Model/ExpensesAndBenefits.md +++ b/docs/Model/ExpensesAndBenefits.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employer** | [**\SynergiTech\Staffology\Model\ExbEmployer**](ExbEmployer.md) | | [optional] **declarations** | [**\SynergiTech\Staffology\Model\ExbDeclarations**](ExbDeclarations.md) | | [optional] +**employer** | [**\SynergiTech\Staffology\Model\ExbEmployer**](ExbEmployer.md) | | [optional] +**p11D** | [**\SynergiTech\Staffology\Model\ExbP11d[]**](ExbP11d.md) | | [optional] **p11Db** | [**\SynergiTech\Staffology\Model\ExbP11db**](ExbP11db.md) | | [optional] **p11DrecordCount** | **int** | | [optional] **p46CarRecordCount** | **int** | | [optional] -**p11D** | [**\SynergiTech\Staffology\Model\ExbP11d[]**](ExbP11d.md) | | [optional] **relatedTaxYear** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ExternalDataProvider.md b/docs/Model/ExternalDataProvider.md index 5ad4479..300f67e 100644 --- a/docs/Model/ExternalDataProvider.md +++ b/docs/Model/ExternalDataProvider.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | [optional] [readonly] -**id** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] **authScheme** | [**\SynergiTech\Staffology\Model\AuthScheme**](AuthScheme.md) | | [optional] -**logoUrl** | **string** | | [optional] -**iconUrl** | **string** | | [optional] **connected** | **bool** | | [optional] **connectedAs** | **string** | | [optional] -**requiresConfig** | **bool** | | [optional] **deferralUrl** | **string** | | [optional] +**iconUrl** | **string** | | [optional] +**id** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] +**logoUrl** | **string** | | [optional] +**name** | **string** | | [optional] [readonly] +**requiresConfig** | **bool** | | [optional] **types** | [**\SynergiTech\Staffology\Model\ExternalDataProviderType[]**](ExternalDataProviderType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ExternalEmployeeMapping.md b/docs/Model/ExternalEmployeeMapping.md index 82edd15..90c4415 100644 --- a/docs/Model/ExternalEmployeeMapping.md +++ b/docs/Model/ExternalEmployeeMapping.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**externalId** | **string** | [readonly] The id for the employee in the external system | [optional] -**providerId** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] -**status** | [**\SynergiTech\Staffology\Model\ExternalEmployeeMappingStatus**](ExternalEmployeeMappingStatus.md) | | [optional] **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **externalEmployee** | [**\SynergiTech\Staffology\Model\Employee**](Employee.md) | | [optional] +**externalId** | **string** | [readonly] The id for the employee in the external system | [optional] **lastSyncDate** | **\DateTime** | [readonly] The date and time this mapping was last synchronised | [optional] +**providerId** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] +**status** | [**\SynergiTech\Staffology\Model\ExternalEmployeeMappingStatus**](ExternalEmployeeMappingStatus.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ExternalProviderConversation.md b/docs/Model/ExternalProviderConversation.md index fffcabe..24cb59d 100644 --- a/docs/Model/ExternalProviderConversation.md +++ b/docs/Model/ExternalProviderConversation.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | | [optional] **contentType** | **string** | | [optional] -**url** | **string** | | [optional] **request** | **string** | | [optional] **response** | **string** | | [optional] **status** | [**\SynergiTech\Staffology\Model\BackgroundTaskStatus**](BackgroundTaskStatus.md) | | [optional] **statusMessage** | **string** | | [optional] +**title** | **string** | | [optional] +**url** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FieldModification.md b/docs/Model/FieldModification.md index 3f75b79..4f8d273 100644 --- a/docs/Model/FieldModification.md +++ b/docs/Model/FieldModification.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **fieldName** | **string** | | [optional] **isSignificant** | **bool** | | [optional] -**oldValue** | **string** | | [optional] **newValue** | **string** | | [optional] +**oldValue** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Fps.md b/docs/Model/Fps.md index a07a717..451a1bc 100644 --- a/docs/Model/Fps.md +++ b/docs/Model/Fps.md @@ -4,20 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**lateReason** | [**\SynergiTech\Staffology\Model\FpsLateReason**](FpsLateReason.md) | | [optional] -**paymentDate** | **\DateTime** | | [optional] -**overridePaymentDate** | **\DateTime** | If a value if provided here then it will be used in place of the actual PaymentDate on the FPS. The value must fall in to the same Tax Period as the PaymentDate | [optional] +**correctionEmployees** | **int[]** | | [optional] **employeeCount** | **int** | | [optional] +**employerReferences** | [**\SynergiTech\Staffology\Model\EmpRefs**](EmpRefs.md) | | [optional] +**fullPaymentSubmission** | [**\SynergiTech\Staffology\Model\FullPaymentSubmission**](FullPaymentSubmission.md) | | [optional] +**govTalkSubmission** | [**\SynergiTech\Staffology\Model\GovTalkSubmission**](GovTalkSubmission.md) | | [optional] +**iRmark** | **string** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **isCorrection** | **bool** | | [optional] +**lateReason** | [**\SynergiTech\Staffology\Model\FpsLateReason**](FpsLateReason.md) | | [optional] +**overridePaymentDate** | **\DateTime** | If a value if provided here then it will be used in place of the actual PaymentDate on the FPS. The value must fall in to the same Tax Period as the PaymentDate | [optional] +**payRunVersion** | **int** | The supplementary pay run version of this FPS. | [optional] +**paymentDate** | **\DateTime** | | [optional] **supersededCount** | **int** | The number of payments on this FPS that have been superseded by later versions | [optional] -**fullPaymentSubmission** | [**\SynergiTech\Staffology\Model\FullPaymentSubmission**](FullPaymentSubmission.md) | | [optional] -**versions** | [**\SynergiTech\Staffology\Model\FpsPriorVersion[]**](FpsPriorVersion.md) | If any of the payments on this FPS appear on another FPS then then there will be an entry here for each of them. If there is an entry where the FpsId matches this FPS then that means the FpsEmployee on this Fps is itself a prior version (ie, it's been superseded) | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **validationWarnings** | [**\SynergiTech\Staffology\Model\RtiValidationWarning[]**](RtiValidationWarning.md) | | [optional] [readonly] -**iRmark** | **string** | | [optional] +**versions** | [**\SynergiTech\Staffology\Model\FpsPriorVersion[]**](FpsPriorVersion.md) | If any of the payments on this FPS appear on another FPS then then there will be an entry here for each of them. If there is an entry where the FpsId matches this FPS then that means the FpsEmployee on this Fps is itself a prior version (ie, it's been superseded) | [optional] **xml** | **string** | This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**employerReferences** | [**\SynergiTech\Staffology\Model\EmpRefs**](EmpRefs.md) | | [optional] -**govTalkSubmission** | [**\SynergiTech\Staffology\Model\GovTalkSubmission**](GovTalkSubmission.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsCar.md b/docs/Model/FpsCar.md index 4b6f222..e91ad08 100644 --- a/docs/Model/FpsCar.md +++ b/docs/Model/FpsCar.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**make** | **string** | | [optional] -**firstRegd** | **string** | | [optional] -**cO2** | **string** | | [optional] -**zeroEmissionsMileage** | **string** | | [optional] -**fuel** | **string** | | [optional] -**id** | **string** | | [optional] **amendment** | **string** | | [optional] -**price** | **string** | | [optional] **availFrom** | **string** | | [optional] -**cashEquiv** | **string** | | [optional] **availTo** | **string** | | [optional] +**cO2** | **string** | | [optional] +**cashEquiv** | **string** | | [optional] +**firstRegd** | **string** | | [optional] **freeFuel** | [**\SynergiTech\Staffology\Model\FpsCarFuel**](FpsCarFuel.md) | | [optional] +**fuel** | **string** | | [optional] +**id** | **string** | | [optional] +**make** | **string** | | [optional] +**price** | **string** | | [optional] +**zeroEmissionsMileage** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsCarFuel.md b/docs/Model/FpsCarFuel.md index 28b9055..bd4f204 100644 --- a/docs/Model/FpsCarFuel.md +++ b/docs/Model/FpsCarFuel.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**provided** | **string** | | [optional] **cashEquiv** | **string** | | [optional] +**provided** | **string** | | [optional] **withdrawn** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsEmployee.md b/docs/Model/FpsEmployee.md index e383fe8..d505b5c 100644 --- a/docs/Model/FpsEmployee.md +++ b/docs/Model/FpsEmployee.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrunEntryId** | **string** | | [optional] -**employeeUniqueId** | **string** | | [optional] -**item** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **employeeDetails** | [**\SynergiTech\Staffology\Model\FpsEmployeeDetails**](FpsEmployeeDetails.md) | | [optional] +**employeeUniqueId** | **string** | | [optional] **employment** | [**\SynergiTech\Staffology\Model\FpsEmployment**](FpsEmployment.md) | | [optional] +**item** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**payrunEntryId** | **string** | | [optional] **validationWarnings** | [**\SynergiTech\Staffology\Model\RtiValidationWarning[]**](RtiValidationWarning.md) | | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsEmployeeDetails.md b/docs/Model/FpsEmployeeDetails.md index 88472c2..63d24b2 100644 --- a/docs/Model/FpsEmployeeDetails.md +++ b/docs/Model/FpsEmployeeDetails.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nino** | **string** | | [optional] -**name** | [**\SynergiTech\Staffology\Model\RtiEmployeeName**](RtiEmployeeName.md) | | [optional] **address** | [**\SynergiTech\Staffology\Model\RtiEmployeeAddress**](RtiEmployeeAddress.md) | | [optional] **birthDate** | **string** | | [optional] **gender** | **string** | | [optional] -**passportNumber** | **string** | | [optional] +**name** | [**\SynergiTech\Staffology\Model\RtiEmployeeName**](RtiEmployeeName.md) | | [optional] +**nino** | **string** | | [optional] **partnerDetails** | [**\SynergiTech\Staffology\Model\FpsEmployeeDetailsPartnerDetails**](FpsEmployeeDetailsPartnerDetails.md) | | [optional] +**passportNumber** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsEmployeeDetailsPartnerDetails.md b/docs/Model/FpsEmployeeDetailsPartnerDetails.md index 8beaa61..5c14628 100644 --- a/docs/Model/FpsEmployeeDetailsPartnerDetails.md +++ b/docs/Model/FpsEmployeeDetailsPartnerDetails.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nino** | **string** | | [optional] **name** | [**\SynergiTech\Staffology\Model\RtiEmployeeName**](RtiEmployeeName.md) | | [optional] +**nino** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsEmployeeFigsToDate.md b/docs/Model/FpsEmployeeFigsToDate.md index 0017060..df5434c 100644 --- a/docs/Model/FpsEmployeeFigsToDate.md +++ b/docs/Model/FpsEmployeeFigsToDate.md @@ -4,36 +4,36 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taxablePay** | **string** | | [optional] -**totalTax** | **string** | | [optional] -**studentLoansTD** | **string** | | [optional] -**postgradLoansTD** | **string** | | [optional] +**additions** | **string** | | [optional] +**adjustments** | **string** | | [optional] **benefitsTaxedViaPayrollYTD** | **string** | | [optional] -**empeePenContribnsPaidYTD** | **string** | | [optional] +**deductions** | **string** | | [optional] **empeePenContribnsNotPaidYTD** | **string** | | [optional] -**smpytd** | **string** | | [optional] -**sppytd** | **string** | | [optional] +**empeePenContribnsPaidYTD** | **string** | | [optional] +**employeePensionContribution** | **string** | | [optional] +**employeePensionContributionAvc** | **string** | | [optional] +**employerPensionContribution** | **string** | | [optional] +**foreignTaxAmount** | **string** | | [optional] +**foreignTaxAmountReclaimed** | **string** | | [optional] +**gross** | **string** | | [optional] +**mapsMiles** | **string** | | [optional] +**netPay** | **string** | | [optional] +**nonTaxOrNICPmt** | **string** | | [optional] +**paymentAfterLeaving** | **string** | | [optional] +**pensionableEarnings** | **string** | | [optional] +**pensionablePay** | **string** | | [optional] +**postgradLoansTD** | **string** | | [optional] **sapytd** | **string** | | [optional] **shppytd** | **string** | | [optional] -**spbpytd** | **string** | | [optional] +**smpytd** | **string** | | [optional] **sncpytd** | **string** | | [optional] +**spbpytd** | **string** | | [optional] +**sppytd** | **string** | | [optional] **sspytd** | **string** | | [optional] -**gross** | **string** | | [optional] -**netPay** | **string** | | [optional] -**additions** | **string** | | [optional] -**deductions** | **string** | | [optional] +**studentLoansTD** | **string** | | [optional] **takeHomePay** | **string** | | [optional] -**adjustments** | **string** | | [optional] -**mapsMiles** | **string** | | [optional] -**foreignTaxAmount** | **string** | | [optional] -**foreignTaxAmountReclaimed** | **string** | | [optional] -**pensionableEarnings** | **string** | | [optional] -**pensionablePay** | **string** | | [optional] -**employerPensionContribution** | **string** | | [optional] -**employeePensionContribution** | **string** | | [optional] -**employeePensionContributionAvc** | **string** | | [optional] -**paymentAfterLeaving** | **string** | | [optional] **taxOnPaymentAfterLeaving** | **string** | | [optional] -**nonTaxOrNICPmt** | **string** | | [optional] +**taxablePay** | **string** | | [optional] +**totalTax** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsEmployeeFlexibleDrawdown.md b/docs/Model/FpsEmployeeFlexibleDrawdown.md index 399fa61..8bd04f7 100644 --- a/docs/Model/FpsEmployeeFlexibleDrawdown.md +++ b/docs/Model/FpsEmployeeFlexibleDrawdown.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **flexiblyAccessingPensionRights** | **string** | | [optional] +**nontaxablePayment** | **string** | | [optional] +**pensionCommencementExcess** | **string** | | [optional] **pensionDeathBenefit** | **string** | | [optional] **seriousIllHealthLumpSum** | **string** | | [optional] **standAloneLumpSum** | **string** | | [optional] -**pensionCommencementExcess** | **string** | | [optional] **taxablePayment** | **string** | | [optional] -**nontaxablePayment** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsEmployeeNIlettersAndValues.md b/docs/Model/FpsEmployeeNIlettersAndValues.md index d3a2ee9..67ad112 100644 --- a/docs/Model/FpsEmployeeNIlettersAndValues.md +++ b/docs/Model/FpsEmployeeNIlettersAndValues.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nIletter** | **string** | | [optional] +**atLELYTD** | **string** | | [optional] +**empeeContribnsInPd** | **string** | | [optional] +**empeeContribnsYTD** | **string** | | [optional] **grossEarningsForNICsInPd** | **string** | | [optional] **grossEarningsForNICsYTD** | **string** | | [optional] -**atLELYTD** | **string** | | [optional] **leLtoPTYTD** | **string** | | [optional] +**nIletter** | **string** | | [optional] **pTtoUELYTD** | **string** | | [optional] **totalEmpNICInPd** | **string** | | [optional] **totalEmpNICYTD** | **string** | | [optional] -**empeeContribnsInPd** | **string** | | [optional] -**empeeContribnsYTD** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsEmployeePayment.md b/docs/Model/FpsEmployeePayment.md index 45440b0..16c2e13 100644 --- a/docs/Model/FpsEmployeePayment.md +++ b/docs/Model/FpsEmployeePayment.md @@ -4,39 +4,39 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bacsHashCode** | **string** | | [optional] -**payFreq** | **string** | | [optional] -**pmtDate** | **string** | | [optional] -**lateReason** | **string** | | [optional] -**weekNo** | **string** | | [optional] -**monthNo** | **string** | | [optional] -**periodsCovered** | **int** | | [optional] **aggregatedEarnings** | **string** | | [optional] -**pmtAfterLeaving** | **string** | | [optional] -**hoursWorked** | **string** | | [optional] -**taxCode** | [**\SynergiTech\Staffology\Model\FpsEmployeeTaxCode**](FpsEmployeeTaxCode.md) | | [optional] -**taxablePay** | **string** | | [optional] -**nonTaxOrNICPmt** | **string** | | [optional] -**dednsFromNetPay** | **string** | | [optional] -**payAfterStatDedns** | **string** | | [optional] +**bacsHashCode** | **string** | | [optional] +**benefits** | [**\SynergiTech\Staffology\Model\FpsBenefit**](FpsBenefit.md) | | [optional] **benefitsTaxedViaPayroll** | **string** | | [optional] **class1ANICsYTD** | **string** | | [optional] -**benefits** | [**\SynergiTech\Staffology\Model\FpsBenefit**](FpsBenefit.md) | | [optional] +**dednsFromNetPay** | **string** | | [optional] +**empeePenContribnsNotPaid** | **string** | | [optional] **empeePenContribnsPaid** | **string** | | [optional] +**flexibleDrawdown** | [**\SynergiTech\Staffology\Model\FpsEmployeeFlexibleDrawdown**](FpsEmployeeFlexibleDrawdown.md) | | [optional] +**hoursWorked** | **string** | | [optional] **itemsSubjectToClass1NIC** | **string** | | [optional] -**empeePenContribnsNotPaid** | **string** | | [optional] -**studentLoanRecovered** | [**\SynergiTech\Staffology\Model\StudentLoanRecovered**](StudentLoanRecovered.md) | | [optional] -**postgradLoanRecovered** | **string** | | [optional] -**taxDeductedOrRefunded** | **string** | | [optional] +**lateReason** | **string** | | [optional] +**monthNo** | **string** | | [optional] +**nonTaxOrNICPmt** | **string** | | [optional] **onStrike** | **string** | | [optional] -**unpaidAbsence** | **string** | | [optional] -**smpytd** | **string** | | [optional] -**sppytd** | **string** | | [optional] +**payAfterStatDedns** | **string** | | [optional] +**payFreq** | **string** | | [optional] +**periodsCovered** | **int** | | [optional] +**pmtAfterLeaving** | **string** | | [optional] +**pmtDate** | **string** | | [optional] +**postgradLoanRecovered** | **string** | | [optional] **sapytd** | **string** | | [optional] **shPPYTD** | **string** | | [optional] -**spbpytd** | **string** | | [optional] +**smpytd** | **string** | | [optional] **sncpytd** | **string** | | [optional] +**spbpytd** | **string** | | [optional] +**sppytd** | **string** | | [optional] +**studentLoanRecovered** | [**\SynergiTech\Staffology\Model\StudentLoanRecovered**](StudentLoanRecovered.md) | | [optional] +**taxCode** | [**\SynergiTech\Staffology\Model\FpsEmployeeTaxCode**](FpsEmployeeTaxCode.md) | | [optional] +**taxDeductedOrRefunded** | **string** | | [optional] +**taxablePay** | **string** | | [optional] **trivialCommutationPayment** | [**\SynergiTech\Staffology\Model\FpsEmployeeTrivialCommutationPayment[]**](FpsEmployeeTrivialCommutationPayment.md) | | [optional] -**flexibleDrawdown** | [**\SynergiTech\Staffology\Model\FpsEmployeeFlexibleDrawdown**](FpsEmployeeFlexibleDrawdown.md) | | [optional] +**unpaidAbsence** | **string** | | [optional] +**weekNo** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsEmployeeSeconded.md b/docs/Model/FpsEmployeeSeconded.md index 4687516..b183057 100644 --- a/docs/Model/FpsEmployeeSeconded.md +++ b/docs/Model/FpsEmployeeSeconded.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**eeaCitizen** | **string** | | [optional] +**epM6** | **string** | | [optional] **inOutUK** | **string** | | [optional] **stay183DaysOrMore** | **string** | | [optional] **stayLessThan183Days** | **string** | | [optional] -**eeaCitizen** | **string** | | [optional] -**epM6** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsEmployeeStarter.md b/docs/Model/FpsEmployeeStarter.md index d05efde..642a805 100644 --- a/docs/Model/FpsEmployeeStarter.md +++ b/docs/Model/FpsEmployeeStarter.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**occPension** | [**\SynergiTech\Staffology\Model\FpsEmployeeStarterOccPension**](FpsEmployeeStarterOccPension.md) | | [optional] +**postgradLoan** | **string** | | [optional] +**seconded** | [**\SynergiTech\Staffology\Model\FpsEmployeeSeconded**](FpsEmployeeSeconded.md) | | [optional] **startDate** | **string** | | [optional] **startDec** | **string** | | [optional] **studentLoan** | **string** | | [optional] -**postgradLoan** | **string** | | [optional] -**occPension** | [**\SynergiTech\Staffology\Model\FpsEmployeeStarterOccPension**](FpsEmployeeStarterOccPension.md) | | [optional] -**seconded** | [**\SynergiTech\Staffology\Model\FpsEmployeeSeconded**](FpsEmployeeSeconded.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsEmployeeStarterOccPension.md b/docs/Model/FpsEmployeeStarterOccPension.md index 09b78c6..5d252c7 100644 --- a/docs/Model/FpsEmployeeStarterOccPension.md +++ b/docs/Model/FpsEmployeeStarterOccPension.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bereaved** | **string** | | [optional] **amount** | **string** | | [optional] +**bereaved** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsEmployeeTaxCode.md b/docs/Model/FpsEmployeeTaxCode.md index d0f7399..f4074dd 100644 --- a/docs/Model/FpsEmployeeTaxCode.md +++ b/docs/Model/FpsEmployeeTaxCode.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **basisNonCumulative** | **string** | | [optional] -**taxRegime** | **string** | | [optional] **taxCode** | **string** | | [optional] +**taxRegime** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsEmployerPayIdChanged.md b/docs/Model/FpsEmployerPayIdChanged.md index 74fcc8e..85db022 100644 --- a/docs/Model/FpsEmployerPayIdChanged.md +++ b/docs/Model/FpsEmployerPayIdChanged.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollIdChangedIndicator** | **string** | | [optional] **oldPayrollId** | **string** | | [optional] +**payrollIdChangedIndicator** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsEmployment.md b/docs/Model/FpsEmployment.md index 49649b9..90eafd0 100644 --- a/docs/Model/FpsEmployment.md +++ b/docs/Model/FpsEmployment.md @@ -4,20 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employeeCurrentNiLetter** | **string** | | [optional] -**offPayrollWorker** | **string** | | [optional] -**occPenInd** | **string** | | [optional] **directorsNIC** | **string** | | [optional] -**taxWkOfApptOfDirector** | **string** | | [optional] -**starter** | [**\SynergiTech\Staffology\Model\FpsEmployeeStarter**](FpsEmployeeStarter.md) | | [optional] +**employeeCurrentNiLetter** | **string** | | [optional] **employeeWorkplacePostcode** | **string** | | [optional] -**payId** | **string** | | [optional] -**payIdChgd** | [**\SynergiTech\Staffology\Model\FpsEmployerPayIdChanged**](FpsEmployerPayIdChanged.md) | | [optional] -**paymentToANonIndividual** | **string** | | [optional] +**figuresToDate** | [**\SynergiTech\Staffology\Model\FpsEmployeeFigsToDate**](FpsEmployeeFigsToDate.md) | | [optional] **irrEmp** | **string** | | [optional] **leavingDate** | **string** | | [optional] -**figuresToDate** | [**\SynergiTech\Staffology\Model\FpsEmployeeFigsToDate**](FpsEmployeeFigsToDate.md) | | [optional] -**payment** | [**\SynergiTech\Staffology\Model\FpsEmployeePayment**](FpsEmployeePayment.md) | | [optional] **nIlettersAndValues** | [**\SynergiTech\Staffology\Model\FpsEmployeeNIlettersAndValues[]**](FpsEmployeeNIlettersAndValues.md) | | [optional] +**occPenInd** | **string** | | [optional] +**offPayrollWorker** | **string** | | [optional] +**payId** | **string** | | [optional] +**payIdChgd** | [**\SynergiTech\Staffology\Model\FpsEmployerPayIdChanged**](FpsEmployerPayIdChanged.md) | | [optional] +**payment** | [**\SynergiTech\Staffology\Model\FpsEmployeePayment**](FpsEmployeePayment.md) | | [optional] +**paymentToANonIndividual** | **string** | | [optional] +**starter** | [**\SynergiTech\Staffology\Model\FpsEmployeeStarter**](FpsEmployeeStarter.md) | | [optional] +**taxWkOfApptOfDirector** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsFields.md b/docs/Model/FpsFields.md index 79462fc..07634ef 100644 --- a/docs/Model/FpsFields.md +++ b/docs/Model/FpsFields.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**offPayrollWorker** | **bool** | | [optional] +**excludeFromRtiSubmissions** | **bool** | True if Employee is excluded from RTI submissions | [optional] +**hoursNormallyWorked** | [**\SynergiTech\Staffology\Model\HoursNormallyWorked**](HoursNormallyWorked.md) | | [optional] **irregularPaymentPattern** | **bool** | True if employee is currently on an irregular payment patter | [optional] **nonIndividual** | **bool** | True if Employee's payments are being made to a body (eg, trustee, corporate organisation or personal representative) | [optional] -**hoursNormallyWorked** | [**\SynergiTech\Staffology\Model\HoursNormallyWorked**](HoursNormallyWorked.md) | | [optional] -**excludeFromRtiSubmissions** | **bool** | True if Employee is excluded from RTI submissions | [optional] +**offPayrollWorker** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsPriorVersion.md b/docs/Model/FpsPriorVersion.md index cf0e7a9..1a99641 100644 --- a/docs/Model/FpsPriorVersion.md +++ b/docs/Model/FpsPriorVersion.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payRunEntryId** | **string** | | [optional] **fpsId** | **string** | The Id of the FPS that contains an earlier version of the PayRunEntry | [optional] +**payRunEntryId** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FpsReportResponse.md b/docs/Model/FpsReportResponse.md index 40f4a8e..ed86abf 100644 --- a/docs/Model/FpsReportResponse.md +++ b/docs/Model/FpsReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\Fps**](Fps.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FullSummaryOfPayReport.md b/docs/Model/FullSummaryOfPayReport.md index 7c75aca..10c1dfb 100644 --- a/docs/Model/FullSummaryOfPayReport.md +++ b/docs/Model/FullSummaryOfPayReport.md @@ -4,20 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**lines** | [**\SynergiTech\Staffology\Model\FullSummaryOfPayReportLine[]**](FullSummaryOfPayReportLine.md) | | [optional] **deductionLines** | [**\SynergiTech\Staffology\Model\FullSummaryOfPayReportLine[]**](FullSummaryOfPayReportLine.md) | | [optional] **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**isDraft** | **bool** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\FullSummaryOfPayReportLine[]**](FullSummaryOfPayReportLine.md) | | [optional] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FullSummaryOfPayReportLine.md b/docs/Model/FullSummaryOfPayReportLine.md index e1f283d..a7a8858 100644 --- a/docs/Model/FullSummaryOfPayReportLine.md +++ b/docs/Model/FullSummaryOfPayReportLine.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payCode** | [**\SynergiTech\Staffology\Model\PayCode**](PayCode.md) | | [optional] -**value** | **float** | | [optional] **erValue** | **float** | | [optional] -**qty** | **float** | | [optional] **headCount** | **int** | | [optional] +**payCode** | [**\SynergiTech\Staffology\Model\PayCode**](PayCode.md) | | [optional] +**qty** | **float** | | [optional] +**value** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FullSummaryOfPayReportReportResponse.md b/docs/Model/FullSummaryOfPayReportReportResponse.md index 6d23c8a..f847c03 100644 --- a/docs/Model/FullSummaryOfPayReportReportResponse.md +++ b/docs/Model/FullSummaryOfPayReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\FullSummaryOfPayReport**](FullSummaryOfPayReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FurloughReport.md b/docs/Model/FurloughReport.md index e45ec70..363f261 100644 --- a/docs/Model/FurloughReport.md +++ b/docs/Model/FurloughReport.md @@ -4,44 +4,45 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**maxClaimPerEmployee** | **float** | | [optional] -**percentageOfNIAndPensionToClaim** | **float** | | [optional] -**govtContribRate** | **float** | | [optional] -**companyName** | **string** | | [optional] -**employerReference** | **string** | | [optional] -**companyCrn** | **string** | | [optional] -**ctUtr** | **string** | | [optional] -**saUtr** | **string** | | [optional] -**claimPeriodStartDate** | **\DateTime** | | [optional] [readonly] -**claimPeriodEndDate** | **\DateTime** | | [optional] [readonly] -**numberOfEmployeesBeingFurloughed** | **int** | | [optional] -**totalClaimAmount** | **float** | | [optional] [readonly] -**totalGrossPay** | **float** | | [optional] -**amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod** | **float** | | [optional] **amountClaimedForEmployerNICsContributionsForFurloughedEmployees** | **float** | | [optional] **amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees** | **float** | | [optional] -**lines** | [**\SynergiTech\Staffology\Model\FurloughReportLine[]**](FurloughReportLine.md) | | [optional] -**bankAccountNumber** | **string** | | [optional] -**bankSortCode** | **string** | | [optional] +**amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod** | **float** | | [optional] +**bankAccountHoldersAddress** | **string** | | [optional] **bankAccountHoldersFirstName** | **string** | | [optional] **bankAccountHoldersLastName** | **string** | | [optional] -**bankAccountHoldersAddress** | **string** | | [optional] +**bankAccountNumber** | **string** | | [optional] +**bankSortCode** | **string** | | [optional] **buildingSocietyRollNumber** | **string** | | [optional] +**claimPeriodEndDate** | **\DateTime** | | [optional] [readonly] +**claimPeriodStartDate** | **\DateTime** | | [optional] [readonly] **companyAddress** | **string** | | [optional] +**companyCrn** | **string** | | [optional] +**companyName** | **string** | | [optional] **contactName** | **string** | | [optional] **contactNumber** | **string** | | [optional] +**ctUtr** | **string** | | [optional] **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**employerReference** | **string** | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**govtContribRate** | **float** | | [optional] +**isDraft** | **bool** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\FurloughReportLine[]**](FurloughReportLine.md) | | [optional] +**maxClaimPerEmployee** | **float** | | [optional] +**numberOfEmployeesBeingFurloughed** | **int** | | [optional] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**percentageOfNIAndPensionToClaim** | **float** | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**saUtr** | **string** | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**totalClaimAmount** | **float** | | [optional] [readonly] +**totalGrossPay** | **float** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FurloughReportLine.md b/docs/Model/FurloughReportLine.md index bfbe88a..68d878d 100644 --- a/docs/Model/FurloughReportLine.md +++ b/docs/Model/FurloughReportLine.md @@ -4,22 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**daysInPeriod** | **int** | | [optional] +**department** | **string** | | [optional] **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **employeesFullName** | **string** | | [optional] **employeesNINO** | **string** | | [optional] **employeesPayrollReferenceNumber** | **string** | | [optional] +**furloughEnd** | **\DateTime** | | [optional] +**furloughStart** | **\DateTime** | | [optional] **furloughedDays** | **int** | | [optional] -**daysInPeriod** | **int** | | [optional] -**hoursNormallyWorked** | **float** | | [optional] -**hoursFurloughed** | **float** | | [optional] -**percentageOfFurloughedDaysWorked** | **float** | | [optional] **grossPay** | **float** | | [optional] **grossPayClaim** | **float** | | [optional] +**hoursFurloughed** | **float** | | [optional] +**hoursNormallyWorked** | **float** | | [optional] **niClaim** | **float** | | [optional] **pensionClaim** | **float** | | [optional] +**percentageOfFurloughedDaysWorked** | **float** | | [optional] **totalClaim** | **float** | | [optional] [readonly] -**furloughStart** | **\DateTime** | | [optional] -**furloughEnd** | **\DateTime** | | [optional] -**department** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FurloughReportReportResponse.md b/docs/Model/FurloughReportReportResponse.md index dc5aac8..9a1e459 100644 --- a/docs/Model/FurloughReportReportResponse.md +++ b/docs/Model/FurloughReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\FurloughReport**](FurloughReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GenderPayGapLine.md b/docs/Model/GenderPayGapLine.md index 91ccdf6..3452dc6 100644 --- a/docs/Model/GenderPayGapLine.md +++ b/docs/Model/GenderPayGapLine.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollCode** | **string** | | [optional] +**bonusRbp** | **float** | | [optional] **forename** | **string** | | [optional] -**surname** | **string** | | [optional] -**gender** | [**\SynergiTech\Staffology\Model\Gender**](Gender.md) | | [optional] **fullPay** | **string** | | [optional] +**gender** | [**\SynergiTech\Staffology\Model\Gender**](Gender.md) | | [optional] +**hourlyRate** | **float** | | [optional] **ordinaryPay** | **float** | | [optional] +**payrollCode** | **string** | | [optional] **periodBonus** | **float** | | [optional] -**bonusRbp** | **float** | | [optional] +**surname** | **string** | | [optional] **weeklyHours** | **float** | | [optional] -**hourlyRate** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GenderPayGapReport.md b/docs/Model/GenderPayGapReport.md index 72c0af5..6275ca8 100644 --- a/docs/Model/GenderPayGapReport.md +++ b/docs/Model/GenderPayGapReport.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **genderPayGapLines** | [**\SynergiTech\Staffology\Model\GenderPayGapLine[]**](GenderPayGapLine.md) | | [optional] +**isDraft** | **bool** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GenderPayGapReportReportResponse.md b/docs/Model/GenderPayGapReportReportResponse.md index 257c761..d3b1439 100644 --- a/docs/Model/GenderPayGapReportReportResponse.md +++ b/docs/Model/GenderPayGapReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\GenderPayGapReport**](GenderPayGapReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GovTalk.md b/docs/Model/GovTalk.md index 74e9782..eec3d25 100644 --- a/docs/Model/GovTalk.md +++ b/docs/Model/GovTalk.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**fullPaymentSubmissionNamespace** | **string** | [readonly] | [optional] -**fullPaymentSubmissionNamespaceVersion** | **string** | [readonly] | [optional] +**cis300NameSpace** | **string** | [readonly] | [optional] +**cisVerificationRequestNameSpace** | **string** | [readonly] | [optional] **employerPaymentSummaryNamespace** | **string** | [readonly] | [optional] **employerPaymentSummaryNamespaceVersion** | **string** | [readonly] | [optional] -**niNoVerificationRequestNameSpace** | **string** | [readonly] | [optional] -**cisVerificationRequestNameSpace** | **string** | [readonly] | [optional] -**cis300NameSpace** | **string** | [readonly] | [optional] **expensesAndBenefitsNameSpace** | **string** | [readonly] | [optional] **expensesAndBenefitsNameSpaceVersion** | **string** | [readonly] | [optional] +**fullPaymentSubmissionNamespace** | **string** | [readonly] | [optional] +**fullPaymentSubmissionNamespaceVersion** | **string** | [readonly] | [optional] +**niNoVerificationRequestNameSpace** | **string** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GovTalkError.md b/docs/Model/GovTalkError.md index 1b3a8b0..0fcea88 100644 --- a/docs/Model/GovTalkError.md +++ b/docs/Model/GovTalkError.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**raisedBy** | **string** | | [optional] +**location** | **string** | | [optional] **number** | **string** | | [optional] -**type** | **string** | | [optional] +**raisedBy** | **string** | | [optional] **text** | **string** | | [optional] -**location** | **string** | | [optional] +**type** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GovTalkSubmission.md b/docs/Model/GovTalkSubmission.md index 4e010d7..ba94d3f 100644 --- a/docs/Model/GovTalkSubmission.md +++ b/docs/Model/GovTalkSubmission.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**rawResponse** | **string** | | [optional] +**correlationId** | **string** | | [optional] +**errors** | [**\SynergiTech\Staffology\Model\GovTalkError[]**](GovTalkError.md) | | [optional] +**errorsJson** | **string** | | [optional] +**iRmark** | **string** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**lastPoll** | **\DateTime** | | [optional] +**message** | **string** | | [optional] **messageClass** | **string** | | [optional] **pollInterval** | **int** | | [optional] -**lastPoll** | **\DateTime** | | [optional] -**correlationId** | **string** | | [optional] -**url** | **string** | | [optional] +**rawResponse** | **string** | | [optional] **status** | [**\SynergiTech\Staffology\Model\SubmissionStatus**](SubmissionStatus.md) | | [optional] -**message** | **string** | | [optional] -**iRmark** | **string** | | [optional] -**errorsJson** | **string** | | [optional] -**errors** | [**\SynergiTech\Staffology\Model\GovTalkError[]**](GovTalkError.md) | | [optional] **submittedAt** | **\DateTime** | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**url** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GrossToNetReport.md b/docs/Model/GrossToNetReport.md index d107033..97b7301 100644 --- a/docs/Model/GrossToNetReport.md +++ b/docs/Model/GrossToNetReport.md @@ -4,21 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**forCis** | **bool** | | [optional] -**lines** | [**\SynergiTech\Staffology\Model\GrossToNetReportLine[]**](GrossToNetReportLine.md) | | [optional] **cisLines** | [**\SynergiTech\Staffology\Model\GrossToNetReportCisLine[]**](GrossToNetReportCisLine.md) | | [optional] **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**forCis** | **bool** | | [optional] +**isDraft** | **bool** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\GrossToNetReportLine[]**](GrossToNetReportLine.md) | | [optional] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GrossToNetReportCisLine.md b/docs/Model/GrossToNetReportCisLine.md index b331408..34bd6bf 100644 --- a/docs/Model/GrossToNetReportCisLine.md +++ b/docs/Model/GrossToNetReportCisLine.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payrollCode** | **string** | | [optional] +**cisDeduction** | **float** | | [optional] **department** | **string** | | [optional] -**totalGross** | **float** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **labour** | **float** | | [optional] +**lastName** | **string** | | [optional] **materials** | **float** | | [optional] +**payment** | **float** | | [optional] +**payrollCode** | **string** | | [optional] **taxableGross** | **float** | | [optional] -**cisDeduction** | **float** | | [optional] +**totalGross** | **float** | | [optional] **umbrellaFee** | **float** | | [optional] **vat** | **float** | | [optional] -**payment** | **float** | | [optional] -**lastName** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GrossToNetReportLine.md b/docs/Model/GrossToNetReportLine.md index cc74d5b..1a4e29b 100644 --- a/docs/Model/GrossToNetReportLine.md +++ b/docs/Model/GrossToNetReportLine.md @@ -4,24 +4,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**niNumber** | **string** | | [optional] -**totalGross** | **float** | | [optional] -**taxableGross** | **float** | | [optional] -**netPay** | **float** | | [optional] -**tax** | **float** | | [optional] +**attachments** | **float** | | [optional] +**department** | **string** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **employeeNi** | **float** | | [optional] -**employerNi** | **float** | | [optional] **employeePension** | **float** | | [optional] +**employerNi** | **float** | | [optional] **employerPension** | **float** | | [optional] -**studentOrPgLoan** | **float** | | [optional] -**statutoryPayments** | **float** | | [optional] -**attachments** | **float** | | [optional] -**otherDeductions** | **float** | | [optional] -**lastName** | **string** | | [optional] -**isNewStarter** | **bool** | | [optional] **isLeaver** | **bool** | | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**isNewStarter** | **bool** | | [optional] +**lastName** | **string** | | [optional] +**netPay** | **float** | | [optional] +**niNumber** | **string** | | [optional] +**otherDeductions** | **float** | | [optional] **payrollCode** | **string** | | [optional] -**department** | **string** | | [optional] +**statutoryPayments** | **float** | | [optional] +**studentOrPgLoan** | **float** | | [optional] +**tax** | **float** | | [optional] +**taxableGross** | **float** | | [optional] +**totalGross** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GrossToNetReportReportResponse.md b/docs/Model/GrossToNetReportReportResponse.md index 0b64113..9ed5699 100644 --- a/docs/Model/GrossToNetReportReportResponse.md +++ b/docs/Model/GrossToNetReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\GrossToNetReport**](GrossToNetReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/HmrcDetails.md b/docs/Model/HmrcDetails.md index cb3aee6..bbd9dba 100644 --- a/docs/Model/HmrcDetails.md +++ b/docs/Model/HmrcDetails.md @@ -4,22 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**officeNumber** | **string** | | [optional] -**payeReference** | **string** | | [optional] **accountsOfficeReference** | **string** | | [optional] -**econ** | **string** | | [optional] -**utr** | **string** | | [optional] +**apprenticeshipLevy** | **bool** | | [optional] +**apprenticeshipLevyAllowance** | **float** | | [optional] +**carryForwardUnpaidLiabilities** | **bool** | If set to true then any unpaid amounts from previous periods will be brought forward to work out the liability for the current period. You'd set this to false if you don't want to track payments. | [optional] **coTax** | **string** | | [optional] +**econ** | **string** | | [optional] **employmentAllowance** | **bool** | | [optional] **employmentAllowanceMaxClaim** | **float** | You might reduce this from the default if you've made/are making a claim in another system | [optional] -**smallEmployersRelief** | **bool** | | [optional] -**apprenticeshipLevy** | **bool** | | [optional] -**apprenticeshipLevyAllowance** | **float** | | [optional] -**quarterlyPaymentSchedule** | **bool** | Set to true if the employer pays HMRC on a quarterly schedule. A value of false implies a monthly schedule. <b>Warning:</b> Changing this value after starting PayRuns will delete any existing payments or adjustments you may have entered. | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **includeEmploymentAllowanceOnMonthlyJournal** | **bool** | If the employer is not on a QuarterlyPaymentSchedule and is claiming EmploymentAllowance, then set this to true to include a line for Employment Allowance on the journal for the monthly schedule. | [optional] -**carryForwardUnpaidLiabilities** | **bool** | If set to true then any unpaid amounts from previous periods will be brought forward to work out the liability for the current period. You'd set this to false if you don't want to track payments. | [optional] -**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] +**officeNumber** | **string** | | [optional] +**payeReference** | **string** | | [optional] **paymentDateDayOfMonth** | **int** | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] +**quarterlyPaymentSchedule** | **bool** | Set to true if the employer pays HMRC on a quarterly schedule. A value of false implies a monthly schedule. <b>Warning:</b> Changing this value after starting PayRuns will delete any existing payments or adjustments you may have entered. | [optional] +**smallEmployersRelief** | **bool** | | [optional] +**utr** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/HmrcLiability.md b/docs/Model/HmrcLiability.md index 01787bb..d990abc 100644 --- a/docs/Model/HmrcLiability.md +++ b/docs/Model/HmrcLiability.md @@ -4,51 +4,51 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | [readonly] A descriptive name for the Period | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**periodEnding** | **\DateTime** | [readonly] | [optional] -**periodComplete** | **bool** | [readonly] Indicates whether or not all PayRuns for this period have been completed | [optional] -**recoverableAmountsEpsCreated** | **bool** | [readonly] If there are recoverable amount present (ie, SMP) and the Period is complete then this field Indicates whether or not an EPS has been created up to the final tax month of this period to declare the recoverable amounts | [optional] +**adjustment** | **float** | Any manual adjustment for Period | [optional] +**allowLinkedEps** | **bool** | If true this will allow you to submit a combined Employer Payment Summary | [optional] +**apprenticeshipLevy** | **float** | Amount due with respect to the Apprenticeship Levy | [optional] +**apprenticeshipLevyAuto** | **bool** | If set to true, we'll automatically calculate your liability If set to false then you can enter your own value. If LiableForApprenticeshipLevy is false then the ApprenticeshipLevy will always be overwritten with a zero value regardless of this property | [optional] **apprenticeshipLevyEpsCreated** | **bool** | [readonly] If there is an Apprenticeship LEvy amount present and the Period is complete then this field Indicates whether or not an EPS has been created up to the final tax month of this period to declare the amount | [optional] -**payRuns** | [**\SynergiTech\Staffology\Model\PayRun[]**](PayRun.md) | | [optional] -**tax** | **float** | [readonly] Amount due to HMRC for PAYE in period | [optional] **cisDeductions** | **float** | [readonly] Amount due to HMRC for CIS Deductions made in period | [optional] -**postgradLoanDeductions** | **float** | [readonly] Amount due to HMRC for Postgrad Loan Deductions made in period | [optional] -**studentLoanDeductions** | **float** | [readonly] Amount due to HMRC for Student Loan Deductions made in period | [optional] +**cisDeductionsSuffered** | **float** | CIS Deductions Suffered in Period | [optional] +**dueInPreviousPeriods** | **float** | [readonly] Amount due to HMRC in previous periods for this Tax Year | [optional] +**eligibleForEmploymentAllowance** | **bool** | [readonly] Indicates whether the Employer settings say the Employer is eligible for Employment Allowance | [optional] **employeeNic** | **float** | [readonly] Amount due to HMRC for Employee NIC Contributions withheld in period | [optional] **employerNic** | **float** | [readonly] Amount due to HMRC for Employer NIC Contributions due on payments in period | [optional] +**employmentAllowanceClaim** | **float** | Amount to claim with respect to the Employment Allowance | [optional] +**employmentAllowanceClaimAuto** | **bool** | If set to true, we'll automatically claim the maximum allowed. If set to false then you can enter your own value. If EligibleForEmploymentAllowance is false then the EmploymentAllowanceClaim will always be overwritten with a zero value regardless of this property | [optional] +**employmentAllowanceClaimInPreviousPeriods** | **float** | [readonly] The amount of Employment Allowance claimed in previous periods for this Tax Year | [optional] +**fpsList** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**liabilityArisingInPeriod** | **float** | [readonly] Total Liability (before any deductions) arising in this Period | [optional] [readonly] +**liableForApprenticeshipLevy** | **bool** | [readonly] Indicates whether the Employer settings say the Employer is liable for the Apprenticeship Levy | [optional] +**netLiabilityForPeriod** | **float** | [readonly] Net Liability (including any deductions/additions) arising in this Period | [optional] [readonly] +**paidInPreviousPeriods** | **float** | [readonly] Amount paid to HMRC in previous periods for this Tax Year | [optional] +**payRuns** | [**\SynergiTech\Staffology\Model\PayRun[]**](PayRun.md) | | [optional] +**payments** | [**\SynergiTech\Staffology\Model\HmrcPayment[]**](HmrcPayment.md) | | [optional] +**periodComplete** | **bool** | [readonly] Indicates whether or not all PayRuns for this period have been completed | [optional] +**periodEnding** | **\DateTime** | [readonly] | [optional] +**postgradLoanDeductions** | **float** | [readonly] Amount due to HMRC for Postgrad Loan Deductions made in period | [optional] **realTimeClass1ANic** | **float** | [readonly] Amount due to HMRC for Employer NIC Contributions due on payments in period | [optional] -**smp** | **float** | [readonly] SMP recovered from payments in period | [optional] -**smpNic** | **float** | [readonly] SMP NIC Compensation for period | [optional] -**spp** | **float** | [readonly] SPP recovered from payments in period | [optional] -**sppNic** | **float** | [readonly] SPP Nic Compensation for period | [optional] +**receivedFromHMRCToPayStatutoryPay** | **float** | Any amount received from HMRC to pay Statutory Pay Period | [optional] +**receivedFromHMRCToRefundTax** | **float** | Any amount received from HMRC to refund Tax in Period | [optional] +**recoverableAmountsEpsCreated** | **bool** | [readonly] If there are recoverable amount present (ie, SMP) and the Period is complete then this field Indicates whether or not an EPS has been created up to the final tax month of this period to declare the recoverable amounts | [optional] **sap** | **float** | [readonly] SAP recovered from payments in period | [optional] **sapNic** | **float** | [readonly] SAP Nic Compensation for period | [optional] **shpp** | **float** | [readonly] ShPP recovered from payments in period | [optional] **shppNic** | **float** | [readonly] ShPP Nic Compensation for period | [optional] -**spbp** | **float** | [readonly] SPBP recovered from payments in period | [optional] -**spbpNic** | **float** | [readonly] SPBP Nic Compensation for period | [optional] +**smp** | **float** | [readonly] SMP recovered from payments in period | [optional] +**smpNic** | **float** | [readonly] SMP NIC Compensation for period | [optional] **sncp** | **float** | [readonly] SNCP recovered from payments in period | [optional] **sncpNic** | **float** | [readonly] SNCP Nic Compensation for period | [optional] -**eligibleForEmploymentAllowance** | **bool** | [readonly] Indicates whether the Employer settings say the Employer is eligible for Employment Allowance | [optional] -**employmentAllowanceClaim** | **float** | Amount to claim with respect to the Employment Allowance | [optional] -**employmentAllowanceClaimAuto** | **bool** | If set to true, we'll automatically claim the maximum allowed. If set to false then you can enter your own value. If EligibleForEmploymentAllowance is false then the EmploymentAllowanceClaim will always be overwritten with a zero value regardless of this property | [optional] -**liableForApprenticeshipLevy** | **bool** | [readonly] Indicates whether the Employer settings say the Employer is liable for the Apprenticeship Levy | [optional] -**apprenticeshipLevy** | **float** | Amount due with respect to the Apprenticeship Levy | [optional] -**apprenticeshipLevyAuto** | **bool** | If set to true, we'll automatically calculate your liability If set to false then you can enter your own value. If LiableForApprenticeshipLevy is false then the ApprenticeshipLevy will always be overwritten with a zero value regardless of this property | [optional] -**liabilityArisingInPeriod** | **float** | [readonly] Total Liability (before any deductions) arising in this Period | [optional] [readonly] -**dueInPreviousPeriods** | **float** | [readonly] Amount due to HMRC in previous periods for this Tax Year | [optional] -**paidInPreviousPeriods** | **float** | [readonly] Amount paid to HMRC in previous periods for this Tax Year | [optional] -**employmentAllowanceClaimInPreviousPeriods** | **float** | [readonly] The amount of Employment Allowance claimed in previous periods for this Tax Year | [optional] -**receivedFromHMRCToRefundTax** | **float** | Any amount received from HMRC to refund Tax in Period | [optional] -**receivedFromHMRCToPayStatutoryPay** | **float** | Any amount received from HMRC to pay Statutory Pay Period | [optional] -**cisDeductionsSuffered** | **float** | CIS Deductions Suffered in Period | [optional] -**adjustment** | **float** | Any manual adjustment for Period | [optional] -**netLiabilityForPeriod** | **float** | [readonly] Net Liability (including any deductions/additions) arising in this Period | [optional] [readonly] +**spbp** | **float** | [readonly] SPBP recovered from payments in period | [optional] +**spbpNic** | **float** | [readonly] SPBP Nic Compensation for period | [optional] +**spp** | **float** | [readonly] SPP recovered from payments in period | [optional] +**sppNic** | **float** | [readonly] SPP Nic Compensation for period | [optional] +**studentLoanDeductions** | **float** | [readonly] Amount due to HMRC for Student Loan Deductions made in period | [optional] +**tax** | **float** | [readonly] Amount due to HMRC for PAYE in period | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**title** | **string** | [readonly] A descriptive name for the Period | [optional] **totalPaid** | **float** | [readonly] The total value of all payments in this period | [optional] -**payments** | [**\SynergiTech\Staffology\Model\HmrcPayment[]**](HmrcPayment.md) | | [optional] -**fpsList** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | | [optional] -**allowLinkedEps** | **bool** | If true this will allow you to submit a combined Employer Payment Summary | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/HolidayReport.md b/docs/Model/HolidayReport.md index 7e043e7..295e37c 100644 --- a/docs/Model/HolidayReport.md +++ b/docs/Model/HolidayReport.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**accrualsReport** | **bool** | | [optional] **accrualsHrsReport** | **bool** | | [optional] +**accrualsReport** | **bool** | | [optional] **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\HolidayReportLine[]**](HolidayReportLine.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/HolidayReportLine.md b/docs/Model/HolidayReportLine.md index 2768fd9..3850958 100644 --- a/docs/Model/HolidayReportLine.md +++ b/docs/Model/HolidayReportLine.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payrollCode** | **string** | | [optional] -**department** | **string** | | [optional] **dayRate** | **float** | | [optional] +**department** | **string** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **leaveSettings** | [**\SynergiTech\Staffology\Model\LeaveSettings**](LeaveSettings.md) | | [optional] +**payrollCode** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/HolidayReportReportResponse.md b/docs/Model/HolidayReportReportResponse.md index d3d3a54..2f15f96 100644 --- a/docs/Model/HolidayReportReportResponse.md +++ b/docs/Model/HolidayReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\HolidayReport**](HolidayReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/HourlyPayReport.md b/docs/Model/HourlyPayReport.md index 9c364fd..953b7d2 100644 --- a/docs/Model/HourlyPayReport.md +++ b/docs/Model/HourlyPayReport.md @@ -4,19 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**lines** | [**\SynergiTech\Staffology\Model\HourlyPayReportLine[]**](HourlyPayReportLine.md) | | [optional] **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**isDraft** | **bool** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\HourlyPayReportLine[]**](HourlyPayReportLine.md) | | [optional] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/HourlyPayReportLine.md b/docs/Model/HourlyPayReportLine.md index 47b2873..505fb6f 100644 --- a/docs/Model/HourlyPayReportLine.md +++ b/docs/Model/HourlyPayReportLine.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payrollCode** | **string** | | [optional] +**hours** | **float** | | [optional] **payCode** | **string** | | [optional] +**payrollCode** | **string** | | [optional] **period** | **int** | | [optional] -**hours** | **float** | | [optional] **rate** | **float** | | [optional] **total** | **float** | | [optional] diff --git a/docs/Model/HourlyPayReportReportResponse.md b/docs/Model/HourlyPayReportReportResponse.md index 4fcdf34..6cbb346 100644 --- a/docs/Model/HourlyPayReportReportResponse.md +++ b/docs/Model/HourlyPayReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\HourlyPayReport**](HourlyPayReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/HtmlEmailSettings.md b/docs/Model/HtmlEmailSettings.md index c37f64b..9cbab7c 100644 --- a/docs/Model/HtmlEmailSettings.md +++ b/docs/Model/HtmlEmailSettings.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **bodyCssStyle** | **string** | | [optional] -**fontCssStyle** | **string** | | [optional] **buttonCssStyle** | **string** | | [optional] -**headerHtml** | **string** | | [optional] +**fontCssStyle** | **string** | | [optional] **footerHtml** | **string** | | [optional] +**headerHtml** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Invitation.md b/docs/Model/Invitation.md index edb318d..a4a9a11 100644 --- a/docs/Model/Invitation.md +++ b/docs/Model/Invitation.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **emailAddress** | **string** | The email address of the user that is being invited to access the Employer | -**message** | **string** | An optional message to include in the email sent to the EmailAddress | [optional] -**role** | [**\SynergiTech\Staffology\Model\UserRole**](UserRole.md) | | [optional] **emailId** | **string** | | [optional] **emailStatus** | [**\SynergiTech\Staffology\Model\BackgroundTaskStatus**](BackgroundTaskStatus.md) | | [optional] -**invitedBy** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**invitedBy** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**message** | **string** | An optional message to include in the email sent to the EmailAddress | [optional] +**role** | [**\SynergiTech\Staffology\Model\UserRole**](UserRole.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Item.md b/docs/Model/Item.md index 82c611a..586b15d 100644 --- a/docs/Model/Item.md +++ b/docs/Model/Item.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] -**name** | **string** | | [optional] **metadata** | **mixed** | | [optional] +**name** | **string** | | [optional] **url** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ItemListReportResponse.md b/docs/Model/ItemListReportResponse.md index ecdf524..490800f 100644 --- a/docs/Model/ItemListReportResponse.md +++ b/docs/Model/ItemListReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] If the type is application.json then this will contain a JSON representation of the relevant model | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/JournalTemplate.md b/docs/Model/JournalTemplate.md index 89afb8f..0f171d5 100644 --- a/docs/Model/JournalTemplate.md +++ b/docs/Model/JournalTemplate.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**header** | **string** | Header of Journal Template | [optional] **content** | **string** | Content of Journal Template | [optional] -**useColumnHeaders** | **bool** | Use Column Headers indicates whether to use column headers while parsing the content in CSV format | [optional] +**header** | **string** | Header of Journal Template | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**useColumnHeaders** | **bool** | Use Column Headers indicates whether to use column headers while parsing the content in CSV format | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Leave.md b/docs/Model/Leave.md index 67ad9f0..7f51182 100644 --- a/docs/Model/Leave.md +++ b/docs/Model/Leave.md @@ -4,52 +4,52 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**providerId** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] +**assumedPensionablePays** | [**\SynergiTech\Staffology\Model\LeaveAssumedPensionablePay[]**](LeaveAssumedPensionablePay.md) | if UseAssumedPensionablePay is True, then this is the value used to calculate the employer pension contributions | [optional] +**automaticAWECalculation** | **bool** | If set to True then we'll automatically calculate the AverageWeeklyEarnings. Set it to false if you want to manually provide a figure that overrides our calculations | [optional] +**averageWeeklyEarnings** | **float** | The employees average weekly earnings. Only relevant for Statutory Pay It's advised that you don't try to calculate this yourself. | [optional] +**babyDate** | **\DateTime** | Only required for Parental Leave with Statutory Pay If Type is Maternity or Paternity then this is the date the baby is due. For Adoption this is the Matching Date. For Neonatal Care is the Baby Due / Matching / Placement Date | [optional] +**calculationType** | [**\SynergiTech\Staffology\Model\LeaveCalculationType**](LeaveCalculationType.md) | | [optional] +**customPayments** | [**\SynergiTech\Staffology\Model\LeaveCustomPayment[]**](LeaveCustomPayment.md) | If this is Sick Leave with Custom Payment, then this stores the RoleId, PercentOfPay and PaySSPInAddition for each role assigned to an employee that did not end before the start date of the absence. | [optional] +**customProRataRules** | [**\SynergiTech\Staffology\Model\LeaveCustomProRataRule[]**](LeaveCustomProRataRule.md) | If this is a Leave that supports changing the pro rata at leave level, This stores the RoleId and ProRataMethod for each role assigned to an employee that did not end before the start date of the absence. | [optional] +**documentCount** | **int** | [readonly] The number of attachments associated with this model | [optional] +**documents** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] The attachments associated with this model | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **externalId** | **string** | If the Leave comes from an ExternalDataProvider, then this is its Id in the ExternalDataProvider | [optional] -**type** | [**\SynergiTech\Staffology\Model\LeaveType**](LeaveType.md) | | [optional] +**from** | **\DateTime** | The first day of Leave. If it's a half day PM then set the time portion to 12:00:00, otherwise leave it blank or set it to 00:00:00 | [optional] +**historicOmpRequiresProcessing** | **bool** | Only used during the creation and update of occupational maternity leaves. When creating or updating historical occupational leaves, this will determine whether to pay the historic payments or correction in the next PayRun. | [optional] +**historicOspRequiresProcessing** | **bool** | Only used during the creation of sickness Occupational Policy. When creating historical SOP, this will determine whether to pay that leave in the next PayRun. | [optional] +**historicSmpRequiresProcessing** | **bool** | Only used during the creation and update of statutory maternity leaves. When creating or updating historical statutory maternity leaves, this will determine whether to pay the historic payments or correction in the next PayRun. | [optional] +**historicSspRequiresProcessing** | **bool** | Only used during the creation of historical SSP. When creating historical SSP, this will determine whether to pay that leave in the next PayRun. | [optional] +**historicSxpRequiresProcessing** | **bool** | Used during to determine whether to back pay before current payrun | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**isReversed** | **bool** | If the reversal of this Leave has already been processed, this will be set to true | [optional] +**kitSplitDays** | **\DateTime[]** | If the LeaveType supports KIT/SPLIT days then use this property to store the list of dates | [optional] +**lastProcessedFrom** | **\DateTime** | [readonly] Last Processed From Date If this Leave has already been processed, this will be the original leave from date | [optional] +**linkedPiw** | [**\SynergiTech\Staffology\Model\LinkedPiw**](LinkedPiw.md) | | [optional] +**notes** | **string** | A free-form text field to record any comments | [optional] +**occupationalMaternityPolicyUniqueId** | **string** | Occupational Maternity Policy Id when leave type is Maternity and payment type is occupational policy | [optional] +**offsetPay** | **bool** | If this Leave has Statutory Pay and this is set to True and the employe eis paid a fixed amoutn per period with Leave Adjustments set to automatic, then we'll reduce their pay for the period by the statutory amount so the employee still gets paid the full amount. | [optional] +**openingOmpPay** | **float** | Opening occupational pay which has already been paid to the employee | [optional] +**openingPay** | **float** | Opening pay which has already been paid to the employee in another system | [optional] +**overridePaymentDescription** | **bool** | If Pay is StatutoryPay and you want to override our description that goes with the payment then set this to true | [optional] +**overridenPaymentDescription** | **string** | If OverridePaymentDescription is true and Pay is set to StatutoryPay then we'll use this as the description for the payment amount. | [optional] **pay** | [**\SynergiTech\Staffology\Model\LeavePayType**](LeavePayType.md) | | [optional] **payFrequency** | [**\SynergiTech\Staffology\Model\StatPayFrequency**](StatPayFrequency.md) | | [optional] +**payRunExistsWithOccMaternityPay** | **bool** | Indicates whether there is occupational maternity payment associated with a leave in the current pay run. | [optional] **payRunExistsWithStatPay** | **bool** | | [optional] -**from** | **\DateTime** | The first day of Leave. If it's a half day PM then set the time portion to 12:00:00, otherwise leave it blank or set it to 00:00:00 | [optional] -**to** | **\DateTime** | The last day of Leave. If it's a half day AM then set the time portion to 11:59:59, otherwise set it to 23:59:59 | [optional] -**notes** | **string** | A free-form text field to record any comments | [optional] -**averageWeeklyEarnings** | **float** | The employees average weekly earnings. Only relevant for Statutory Pay It's advised that you don't try to calculate this yourself. | [optional] -**automaticAWECalculation** | **bool** | If set to True then we'll automatically calculate the AverageWeeklyEarnings. Set it to false if you want to manually provide a figure that overrides our calculations | [optional] -**babyDate** | **\DateTime** | Only required for Parental Leave with Statutory Pay If Type is Maternity or Paternity then this is the date the baby is due. For Adoption this is the Matching Date. For Neonatal Care is the Baby Due / Matching / Placement Date | [optional] +**paymentTier** | [**\SynergiTech\Staffology\Model\NeonatalCarePaymentTier**](NeonatalCarePaymentTier.md) | | [optional] +**providerId** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] **secondaryBabyDate** | **\DateTime** | Only used for Parental Leave with Statutory Pay If Type is Maternity, Paternity, SharedParental (Birth) then this is the the Baby Born Date. For Adoption or SharedParental (Adoption) this is the Expected Placement Date. | [optional] +**sspPayFromDayOne** | **bool** | If this is Sick Leave with Statutory Pay then setting this to true will force SSP to be paid from day one rather than the usual rule of the first Working Day after 3 Qualifying Days | [optional] +**strikeHoursToDeduct** | **float** | The number of hours to be deducted at the employee's contractual rate This property is valid for strike deducted hours | [optional] **tertiaryBabyDate** | **\DateTime** | Only used for Parental Leave with Statutory Pay If Type is Adoption this is the Placement Date. If Type is Neonatal Care is the Date Baby Entered Neonatal Care | [optional] -**overridePaymentDescription** | **bool** | If Pay is StatutoryPay and you want to override our description that goes with the payment then set this to true | [optional] -**overridenPaymentDescription** | **string** | If OverridePaymentDescription is true and Pay is set to StatutoryPay then we'll use this as the description for the payment amount. | [optional] -**workingDays** | **float** | [readonly] The number of working days covered by this leave. This is calculated based on the employees Working Pattern. | [optional] -**workingDaysOverride** | **float** | If a value is provided here then this will be used in place of the calculated WorkingDays value | [optional] +**to** | **\DateTime** | The last day of Leave. If it's a half day AM then set the time portion to 11:59:59, otherwise set it to 23:59:59 | [optional] **totalDays** | **float** | [readonly] The number of days covered by this leave, regardless of whether or not they're working days. This is calculated based on the employees Working Pattern. | [optional] **totalDaysOverride** | **float** | If a value is provided here then this will be used in place of the calculated TotalDays value | [optional] +**type** | [**\SynergiTech\Staffology\Model\LeaveType**](LeaveType.md) | | [optional] **useAssumedPensionablePay** | **bool** | If this Leave has Statutory Pay then if this is set to True we will use the value set in AssumedPensionablePay to work out the employer pension contributions | [optional] -**assumedPensionablePays** | [**\SynergiTech\Staffology\Model\LeaveAssumedPensionablePay[]**](LeaveAssumedPensionablePay.md) | if UseAssumedPensionablePay is True, then this is the value used to calculate the employer pension contributions | [optional] -**offsetPay** | **bool** | If this Leave has Statutory Pay and this is set to True and the employe eis paid a fixed amoutn per period with Leave Adjustments set to automatic, then we'll reduce their pay for the period by the statutory amount so the employee still gets paid the full amount. | [optional] -**sspPayFromDayOne** | **bool** | If this is Sick Leave with Statutory Pay then setting this to true will force SSP to be paid from day one rather than the usual rule of the first Working Day after 3 Qualifying Days | [optional] -**linkedPiw** | [**\SynergiTech\Staffology\Model\LinkedPiw**](LinkedPiw.md) | | [optional] -**kitSplitDays** | **\DateTime[]** | If the LeaveType supports KIT/SPLIT days then use this property to store the list of dates | [optional] -**historicSspRequiresProcessing** | **bool** | Only used during the creation of historical SSP. When creating historical SSP, this will determine whether to pay that leave in the next PayRun. | [optional] -**historicSxpRequiresProcessing** | **bool** | Used during to determine whether to back pay before current payrun | [optional] -**openingPay** | **float** | Opening pay which has already been paid to the employee in another system | [optional] **useOpeningPay** | **bool** | Use the OpeningPay which has already been paid in another system | [optional] -**historicOspRequiresProcessing** | **bool** | Only used during the creation of sickness Occupational Policy. When creating historical SOP, this will determine whether to pay that leave in the next PayRun. | [optional] -**historicOmpRequiresProcessing** | **bool** | Only used during the creation and update of occupational maternity leaves. When creating or updating historical occupational leaves, this will determine whether to pay the historic payments or correction in the next PayRun. | [optional] -**historicSmpRequiresProcessing** | **bool** | Only used during the creation and update of statutory maternity leaves. When creating or updating historical statutory maternity leaves, this will determine whether to pay the historic payments or correction in the next PayRun. | [optional] -**occupationalMaternityPolicyUniqueId** | **string** | Occupational Maternity Policy Id when leave type is Maternity and payment type is occupational policy | [optional] -**openingOmpPay** | **float** | Opening occupational pay which has already been paid to the employee | [optional] -**payRunExistsWithOccMaternityPay** | **bool** | Indicates whether there is occupational maternity payment associated with a leave in the current pay run. | [optional] -**calculationType** | [**\SynergiTech\Staffology\Model\LeaveCalculationType**](LeaveCalculationType.md) | | [optional] -**strikeHoursToDeduct** | **float** | The number of hours to be deducted at the employee's contractual rate This property is valid for strike deducted hours | [optional] -**customPayments** | [**\SynergiTech\Staffology\Model\LeaveCustomPayment[]**](LeaveCustomPayment.md) | If this is Sick Leave with Custom Payment, then this stores the RoleId, PercentOfPay and PaySSPInAddition for each role assigned to an employee that did not end before the start date of the absence. | [optional] -**customProRataRules** | [**\SynergiTech\Staffology\Model\LeaveCustomProRataRule[]**](LeaveCustomProRataRule.md) | If this is a Leave that supports changing the pro rata at leave level, This stores the RoleId and ProRataMethod for each role assigned to an employee that did not end before the start date of the absence. | [optional] -**lastProcessedFrom** | **\DateTime** | [readonly] Last Processed From Date If this Leave has already been processed, this will be the original leave from date | [optional] -**isReversed** | **bool** | If the reversal of this Leave has already been processed, this will be set to true | [optional] -**paymentTier** | [**\SynergiTech\Staffology\Model\NeonatalCarePaymentTier**](NeonatalCarePaymentTier.md) | | [optional] -**documentCount** | **int** | [readonly] The number of attachments associated with this model | [optional] -**documents** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] The attachments associated with this model | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**workingDays** | **float** | [readonly] The number of working days covered by this leave. This is calculated based on the employees Working Pattern. | [optional] +**workingDaysOverride** | **float** | If a value is provided here then this will be used in place of the calculated WorkingDays value | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LeaveAssumedPensionablePay.md b/docs/Model/LeaveAssumedPensionablePay.md index e8fcddb..2f1b88b 100644 --- a/docs/Model/LeaveAssumedPensionablePay.md +++ b/docs/Model/LeaveAssumedPensionablePay.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**roleReference** | **string** | Employee role reference | [optional] -**roleId** | **string** | Employee role unique Id | [optional] -**isPrimary** | **bool** | Boolean flag indicates if the role is primary | [optional] **assumedPensionablePay** | **float** | Assumed Pensionable Pay (APP) is an average figure, calculated as the average pay in the 3 months (or 12 weeks if weekly/fortnightly/fourweekly paid) before the absence | [optional] **automaticAPPCalculation** | **bool** | If set to True then we'll automatically calculate the AssumedPensionablePay. Set it to false if you want to manually provide a figure that overrides our calculations | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**isPrimary** | **bool** | Boolean flag indicates if the role is primary | [optional] +**roleId** | **string** | Employee role unique Id | [optional] +**roleReference** | **string** | Employee role reference | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LeaveCustomPayment.md b/docs/Model/LeaveCustomPayment.md index 6ed6063..a94de94 100644 --- a/docs/Model/LeaveCustomPayment.md +++ b/docs/Model/LeaveCustomPayment.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**roleId** | **string** | | [optional] -**percentOfPay** | **float** | If this is Sick Leave with Custom Payment, the user will input the desired impact on the employee’s pay, per role. This will be via an amount between 0-100 in 'Pay for Absence'. The employees pay will be fully reduced for the absence, and the % paid will be added back using the OSP pay code. | [optional] **paySSPInAddition** | **bool** | If this is Sick Leave with Custom Payment, If true, then reduce the OSP by the amount of SSP paid (and apportioned according to role weighting) If false, then do not reduce the OSP at all. | [optional] +**percentOfPay** | **float** | If this is Sick Leave with Custom Payment, the user will input the desired impact on the employee’s pay, per role. This will be via an amount between 0-100 in 'Pay for Absence'. The employees pay will be fully reduced for the absence, and the % paid will be added back using the OSP pay code. | [optional] +**roleId** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LeaveCustomProRataRule.md b/docs/Model/LeaveCustomProRataRule.md index 7e5d89b..5ab8d8a 100644 --- a/docs/Model/LeaveCustomProRataRule.md +++ b/docs/Model/LeaveCustomProRataRule.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**roleId** | **string** | | [optional] **proRataMethod** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**roleId** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LeaveNotionalPayDetails.md b/docs/Model/LeaveNotionalPayDetails.md new file mode 100644 index 0000000..cb209b0 --- /dev/null +++ b/docs/Model/LeaveNotionalPayDetails.md @@ -0,0 +1,15 @@ +# # LeaveNotionalPayDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**leaveId** | **string** | | [optional] +**notionalPay** | **float** | | [optional] +**notionalPayPeriodBreakdowns** | [**\SynergiTech\Staffology\Model\NotionalPayPeriodBreakdown[]**](NotionalPayPeriodBreakdown.md) | Breakdown of notional pay details by percent of pay bands Every leave has entries representing a continuous period of leave with the same percent of pay | [optional] +**occupationalPay** | **float** | | [optional] +**occupationalPayWithLessThanHalfPay** | **float** | | [optional] +**ospDaysToBeExcludedForNotionalPay** | **float** | | [optional] +**payableOccupationalLeavesCount** | **int** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LeaveSettings.md b/docs/Model/LeaveSettings.md index f941073..fe06a8d 100644 --- a/docs/Model/LeaveSettings.md +++ b/docs/Model/LeaveSettings.md @@ -4,52 +4,52 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**useDefaultHolidayType** | **bool** | If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAllowanceResetDate** | **bool** | If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAllowance** | **bool** | If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieu** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieuRate** | **bool** | If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultHolidayAccrualBasis** | **bool** | If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccruePaymentInLieuPayAutomatically** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultAccrueHoursPerDay** | **bool** | If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**useDefaultMaximumAccruePeriod** | **bool** | If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**allowanceResetDate** | **\DateTime** | The date that the holiday allowance resets. Only the day/month part of the value is relevant. | [optional] -**allowance** | **float** | The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset | [optional] -**adjustment** | **float** | Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] -**allowanceUsed** | **float** | [readonly] The number of days used from the allowance since last reset | [optional] -**allowanceUsedPreviousPeriod** | **float** | [readonly] The number of days used in the 12 months prior to the last reset | [optional] -**allowanceRemaining** | **float** | [readonly] The number of days remaining of the allowance until next reset | [optional] [readonly] -**holidayType** | [**\SynergiTech\Staffology\Model\HolidayType**](HolidayType.md) | | [optional] -**accrueSetAmount** | **bool** | If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. | [optional] **accrueHoursPerDay** | **float** | If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued | [optional] -**showAllowanceOnPayslip** | **bool** | If true then the remaining Allowance will be shown on the employees payslip. | [optional] -**showAhpOnPayslip** | **bool** | If true then the AHP balance will be shown on the employees payslip. | [optional] -**accruePaymentInLieuRate** | **float** | The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. | [optional] +**accruePayCodeSetUniqueId** | **string** | | [optional] **accruePaymentInLieuAllGrossPay** | **bool** | Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element | [optional] **accruePaymentInLieuPayAutomatically** | **bool** | Set to true if you want employees to be automatically paid any outstanding holiday pay | [optional] -**accruePayCodeSetUniqueId** | **string** | | [optional] -**maximumAccruePeriod** | **float** | The maximum number of hours capable of being accrued in a single period | [optional] -**holidayAccrualBasis** | [**\SynergiTech\Staffology\Model\HolidayAccrual**](HolidayAccrual.md) | | [optional] -**holidayAccrualDefaultRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] -**occupationalSicknessUniqueId** | **string** | | [optional] -**accruedPaymentLiability** | **float** | [readonly] The total accrued payments for this employee over the lifetime of their employment so far | [optional] -**accruedPaymentAdjustment** | **float** | Any manual adjustment to the total accrued | [optional] -**accruedPaymentPaid** | **float** | [readonly] The Total amount paid to this employee in lieu of holidays | [optional] -**accruedPaymentBalance** | **float** | [readonly] The balance of what is owed to this employee in lieu of holidays | [optional] [readonly] -**accruedHoursAmount** | **float** | [readonly] The total accrued hours for this employee over the lifetime of their employment so far | [optional] +**accruePaymentInLieuRate** | **float** | The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. | [optional] +**accrueSetAmount** | **bool** | If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. | [optional] **accruedHoursAdjustment** | **float** | Any manual adjustment to the total hours accrued | [optional] -**accruedHoursPaid** | **float** | [readonly] The Total amount of hours paid to this employee in lieu of holidays | [optional] +**accruedHoursAmount** | **float** | [readonly] The total accrued hours for this employee over the lifetime of their employment so far | [optional] **accruedHoursAmountLastPeriod** | **float** | [readonly] The total accrued hours for this employee in the last pay period | [optional] -**paidHoursAmountLastPeriod** | **float** | [readonly] The number of hours paid against the pay code | [optional] **accruedHoursBalance** | **float** | [readonly] The balance of hours owed to this employee in lieu of holidays | [optional] [readonly] -**holidayAccrualResetDate** | **\DateTime** | [readonly] This date is used to reset holiday accrual schemes (Accrual Money or Accrual Hours). | [optional] +**accruedHoursPaid** | **float** | [readonly] The Total amount of hours paid to this employee in lieu of holidays | [optional] +**accruedPaymentAdjustment** | **float** | Any manual adjustment to the total accrued | [optional] +**accruedPaymentBalance** | **float** | [readonly] The balance of what is owed to this employee in lieu of holidays | [optional] [readonly] +**accruedPaymentLiability** | **float** | [readonly] The total accrued payments for this employee over the lifetime of their employment so far | [optional] +**accruedPaymentPaid** | **float** | [readonly] The Total amount paid to this employee in lieu of holidays | [optional] +**adjustment** | **float** | Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] **aggregatedServiceDate** | **\DateTime** | | [optional] -**useAggregatedServiceDate** | **bool** | | [optional] -**useDefaultHolidayAccrualDefaultRateType** | **bool** | If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. | [optional] -**unauthorisedLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**allowance** | **float** | The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset | [optional] +**allowanceRemaining** | **float** | [readonly] The number of days remaining of the allowance until next reset | [optional] [readonly] +**allowanceResetDate** | **\DateTime** | The date that the holiday allowance resets. Only the day/month part of the value is relevant. | [optional] +**allowanceUsed** | **float** | [readonly] The number of days used from the allowance since last reset | [optional] +**allowanceUsedPreviousPeriod** | **float** | [readonly] The number of days used in the 12 months prior to the last reset | [optional] +**bereavementLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**holidayAccrualBasis** | [**\SynergiTech\Staffology\Model\HolidayAccrual**](HolidayAccrual.md) | | [optional] +**holidayAccrualDefaultRateType** | [**\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType**](HolidayAccrualDefaultRateType.md) | | [optional] +**holidayAccrualResetDate** | **\DateTime** | [readonly] This date is used to reset holiday accrual schemes (Accrual Money or Accrual Hours). | [optional] **holidayLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] -**sickLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**holidayType** | [**\SynergiTech\Staffology\Model\HolidayType**](HolidayType.md) | | [optional] +**maximumAccruePeriod** | **float** | The maximum number of hours capable of being accrued in a single period | [optional] +**occupationalSicknessUniqueId** | **string** | | [optional] +**paidHoursAmountLastPeriod** | **float** | [readonly] The number of hours paid against the pay code | [optional] **parentalLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] -**bereavementLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**showAhpOnPayslip** | **bool** | If true then the AHP balance will be shown on the employees payslip. | [optional] +**showAllowanceOnPayslip** | **bool** | If true then the remaining Allowance will be shown on the employees payslip. | [optional] +**sickLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**unauthorisedLeaveProRataRule** | [**\SynergiTech\Staffology\Model\LeaveProRataRule**](LeaveProRataRule.md) | | [optional] +**useAggregatedServiceDate** | **bool** | | [optional] +**useDefaultAccrueHoursPerDay** | **bool** | If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieu** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieuPayAutomatically** | **bool** | If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAccruePaymentInLieuRate** | **bool** | If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultAllowance** | **bool** | If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) | [optional] +**useDefaultAllowanceResetDate** | **bool** | If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultHolidayAccrualBasis** | **bool** | If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultHolidayAccrualDefaultRateType** | **bool** | If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. | [optional] +**useDefaultHolidayType** | **bool** | If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] +**useDefaultMaximumAccruePeriod** | **bool** | If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LeaverDetails.md b/docs/Model/LeaverDetails.md index 9bdaa8d..49bf2e1 100644 --- a/docs/Model/LeaverDetails.md +++ b/docs/Model/LeaverDetails.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasLeft** | **bool** | | [optional] -**leaveDate** | **\DateTime** | | [optional] **isDeceased** | **bool** | | [optional] -**paymentAfterLeaving** | **bool** | | [optional] +**leaveDate** | **\DateTime** | | [optional] **p45Sent** | **bool** | | [optional] **payAccruedBalance** | **bool** | | [optional] +**paymentAfterLeaving** | **bool** | | [optional] **paymentMethodAfterLeaving** | [**\SynergiTech\Staffology\Model\PaymentMethodAfterLeaving**](PaymentMethodAfterLeaving.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LinkedPiw.md b/docs/Model/LinkedPiw.md index 2de10da..f011796 100644 --- a/docs/Model/LinkedPiw.md +++ b/docs/Model/LinkedPiw.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**result** | [**\SynergiTech\Staffology\Model\LinkedPiwResult**](LinkedPiwResult.md) | | [optional] -**id** | **string** | [readonly] The Id of the linked Leave | [optional] **averageWeeklyEarnings** | **float** | [readonly] Average weekly earnings from linked Leave | [optional] -**workingDays** | **float** | [readonly] The number of working days in the linked Leave. | [optional] -**totalDays** | **float** | [readonly] The number of days covered by the linked Leave. | [optional] -**sspFirstPayDay** | **\DateTime** | [readonly] The SspFirstPayDay from the linked Leave, if set | [optional] +**id** | **string** | [readonly] The Id of the linked Leave | [optional] +**result** | [**\SynergiTech\Staffology\Model\LinkedPiwResult**](LinkedPiwResult.md) | | [optional] **sspFirstDay** | **\DateTime** | [readonly] The SspFirstDay from the linked Leave, if set | [optional] +**sspFirstPayDay** | **\DateTime** | [readonly] The SspFirstPayDay from the linked Leave, if set | [optional] +**totalDays** | **float** | [readonly] The number of days covered by the linked Leave. | [optional] +**workingDays** | **float** | [readonly] The number of working days in the linked Leave. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Loan.md b/docs/Model/Loan.md index 3b0df7f..693c9c0 100644 --- a/docs/Model/Loan.md +++ b/docs/Model/Loan.md @@ -4,19 +4,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**issueDate** | **\DateTime** | The date the Loan was made | [optional] -**reference** | **string** | An optional reference for this Loan | [optional] -**payCode** | **string** | The Code of the PayCode used for recording payments. The PayCode must have a CalculationType of FixedAmount and not be a multiplier code | [optional] -**loanAmount** | **float** | The initial amount that the loan was for | [optional] -**periodAmount** | **float** | The amount to deduct per PayPeriod | [optional] **amountRepaid** | **float** | [readonly] The amount repaid so far due to deductions in Payruns | [optional] -**previouslyPaid** | **float** | [readonly] Any amount by which to adjust the Balance, perhaps due to repayments made elsewhere | [optional] **balance** | **float** | [readonly] The Balance of the Loan | [optional] [readonly] -**isSettled** | **bool** | [readonly] | [optional] [readonly] -**isPaused** | **bool** | If set to true then deductions will not be made | [optional] **documentCount** | **int** | [readonly] The number of attachments associated with this model | [optional] **documents** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] The attachments associated with this model | [optional] **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**isPaused** | **bool** | If set to true then deductions will not be made | [optional] +**isSettled** | **bool** | [readonly] | [optional] [readonly] +**issueDate** | **\DateTime** | The date the Loan was made | [optional] +**loanAmount** | **float** | The initial amount that the loan was for | [optional] +**payCode** | **string** | The Code of the PayCode used for recording payments. The PayCode must have a CalculationType of FixedAmount and not be a multiplier code | [optional] +**periodAmount** | **float** | The amount to deduct per PayPeriod | [optional] +**previouslyPaid** | **float** | [readonly] Any amount by which to adjust the Balance, perhaps due to repayments made elsewhere | [optional] +**reference** | **string** | An optional reference for this Loan | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoanBalancesReport.md b/docs/Model/LoanBalancesReport.md index cf837bb..fef6e54 100644 --- a/docs/Model/LoanBalancesReport.md +++ b/docs/Model/LoanBalancesReport.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\LoanBalancesReportLine[]**](LoanBalancesReportLine.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoanBalancesReportLine.md b/docs/Model/LoanBalancesReportLine.md index 8f48cf4..d3ae6f0 100644 --- a/docs/Model/LoanBalancesReportLine.md +++ b/docs/Model/LoanBalancesReportLine.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employeeName** | **string** | | [optional] -**payrollCode** | **string** | | [optional] **issueDate** | **\DateTime** | | [optional] -**reference** | **string** | | [optional] -**payCode** | **string** | | [optional] **loanAmount** | **float** | | [optional] -**paidAmount** | **float** | | [optional] **outstandingBalance** | **float** | | [optional] +**paidAmount** | **float** | | [optional] +**payCode** | **string** | | [optional] +**payrollCode** | **string** | | [optional] +**reference** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoanBalancesReportReportResponse.md b/docs/Model/LoanBalancesReportReportResponse.md index 59add04..036ee83 100644 --- a/docs/Model/LoanBalancesReportReportResponse.md +++ b/docs/Model/LoanBalancesReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\LoanBalancesReport**](LoanBalancesReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoanCharge.md b/docs/Model/LoanCharge.md index e9c447d..cac60f1 100644 --- a/docs/Model/LoanCharge.md +++ b/docs/Model/LoanCharge.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**threshhold** | **float** | | [optional] **officialInterestRate** | **float** | | [optional] +**threshhold** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LondonAllowance.md b/docs/Model/LondonAllowance.md index 1be0e97..9ab2869 100644 --- a/docs/Model/LondonAllowance.md +++ b/docs/Model/LondonAllowance.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**paySpineId** | **int** | foreign key with pay spine table | **type** | [**\SynergiTech\Staffology\Model\LondonAllowanceType**](LondonAllowanceType.md) | | [optional] -**valueType** | [**\SynergiTech\Staffology\Model\LondonAllowanceValueType**](LondonAllowanceValueType.md) | | [optional] **value** | **float** | Value of London Allowance | [optional] -**paySpineId** | **int** | foreign key with pay spine table | -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**valueType** | [**\SynergiTech\Staffology\Model\LondonAllowanceValueType**](LondonAllowanceValueType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MailSettings.md b/docs/Model/MailSettings.md index 1be7fa0..d2e53a8 100644 --- a/docs/Model/MailSettings.md +++ b/docs/Model/MailSettings.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**senderName** | **string** | | -**senderEmail** | **string** | | -**useSystemFromAddress** | **bool** | If set to true then the SenderEmail provided will only be used in the ReplyTo fields. The system defaults will be used for the From address. | [optional] -**senderEmailVerified** | **bool** | [readonly] The SenderEmail must be verified before you can send email using that address | [optional] -**customiseSmtpSettings** | **bool** | | -**smtpSettings** | [**\SynergiTech\Staffology\Model\SmtpSettings**](SmtpSettings.md) | | [optional] **customiseHtmlEmailSettings** | **bool** | | +**customiseSmtpSettings** | **bool** | | **htmlEmailSettings** | [**\SynergiTech\Staffology\Model\HtmlEmailSettings**](HtmlEmailSettings.md) | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**senderEmail** | **string** | | +**senderEmailVerified** | **bool** | [readonly] The SenderEmail must be verified before you can send email using that address | [optional] +**senderName** | **string** | | +**smtpSettings** | [**\SynergiTech\Staffology\Model\SmtpSettings**](SmtpSettings.md) | | [optional] +**useSystemFromAddress** | **bool** | If set to true then the SenderEmail provided will only be used in the ReplyTo fields. The system defaults will be used for the From address. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MileageAllowancePaymentsRate.md b/docs/Model/MileageAllowancePaymentsRate.md index 2dd77eb..74be6a0 100644 --- a/docs/Model/MileageAllowancePaymentsRate.md +++ b/docs/Model/MileageAllowancePaymentsRate.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**vehicleType** | [**\SynergiTech\Staffology\Model\MileageVehicleType**](MileageVehicleType.md) | | [optional] +**aboveThresholdRate** | **float** | | [optional] **rate** | **float** | | [optional] **threshold** | **int** | | [optional] -**aboveThresholdRate** | **float** | | [optional] +**vehicleType** | [**\SynergiTech\Staffology\Model\MileageVehicleType**](MileageVehicleType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MonthlyMinimum.md b/docs/Model/MonthlyMinimum.md index 8839ad8..31f68f7 100644 --- a/docs/Model/MonthlyMinimum.md +++ b/docs/Model/MonthlyMinimum.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**enabled** | **bool** | | [optional] **amount** | **float** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **billPastEndDate** | **bool** | If set to true then this user should still be billed even after the End Date | [optional] +**enabled** | **bool** | | [optional] +**endDate** | **\DateTime** | | [optional] +**startDate** | **\DateTime** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NationalInsuranceCalculation.md b/docs/Model/NationalInsuranceCalculation.md index ec33892..a20d252 100644 --- a/docs/Model/NationalInsuranceCalculation.md +++ b/docs/Model/NationalInsuranceCalculation.md @@ -4,24 +4,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**breakdown** | [**\SynergiTech\Staffology\Model\NationalInsuranceCalculationBase[]**](NationalInsuranceCalculationBase.md) | [readonly] List of calculations that make up this calculation | [optional] -**niCategory** | **string** | Calculated on NI table letter | [optional] **asDirector** | **bool** | Calculated as a Director | [optional] -**earningsUptoIncludingLEL** | **float** | Earnings up to and including LEL | [optional] +**breakdown** | [**\SynergiTech\Staffology\Model\NationalInsuranceCalculationBase[]**](NationalInsuranceCalculationBase.md) | [readonly] List of calculations that make up this calculation | [optional] +**earningsAboveFUSTUptoIncludingUEL** | **float** | Earnings above FUST up to UEL | [optional] **earningsAboveLELUptoIncludingPT** | **float** | Earnings above LEL up to PT | [optional] **earningsAbovePTUptoIncludingST** | **float** | Earnings above PT up to ST | [optional] **earningsAbovePTUptoIncludingUEL** | **float** | Earnings above PT up to UEL | [optional] -**earningsAboveSTUptoIncludingUEL** | **float** | Earnings above ST up to UEL | [optional] **earningsAboveSTUptoIncludingFUST** | **float** | Earnings above ST up to FUST | [optional] -**earningsAboveFUSTUptoIncludingUEL** | **float** | Earnings above FUST up to UEL | [optional] +**earningsAboveSTUptoIncludingUEL** | **float** | Earnings above ST up to UEL | [optional] **earningsAboveUEL** | **float** | Earnings above UEL | [optional] +**earningsUptoIncludingLEL** | **float** | Earnings up to and including LEL | [optional] +**employeeNi** | **float** | [readonly] Net Employee National Insurance | [optional] [readonly] **employeeNiGross** | **float** | Employee National Insurance Gross Value | [optional] **employeeNiRebate** | **float** | Employee National Insurance Rebate Value | [optional] +**employerNi** | **float** | [readonly] Net Employer National Insurance | [optional] [readonly] **employerNiGross** | **float** | Employer National Insurance Gross Value | [optional] **employerNiRebate** | **float** | Employer National Insurance Rebate Value | [optional] -**employeeNi** | **float** | [readonly] Net Employee National Insurance | [optional] [readonly] -**employerNi** | **float** | [readonly] Net Employer National Insurance | [optional] [readonly] **netNi** | **float** | [readonly] Net National Insurance (Employer + Employee) | [optional] [readonly] +**niCategory** | **string** | Calculated on NI table letter | [optional] **niablePay** | **float** | Niable pay value, required for payrun overrides | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NationalInsuranceCalculationBase.md b/docs/Model/NationalInsuranceCalculationBase.md index ae7a6f2..2519c18 100644 --- a/docs/Model/NationalInsuranceCalculationBase.md +++ b/docs/Model/NationalInsuranceCalculationBase.md @@ -4,23 +4,23 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**niCategory** | **string** | Calculated on NI table letter | [optional] **asDirector** | **bool** | Calculated as a Director | [optional] -**earningsUptoIncludingLEL** | **float** | Earnings up to and including LEL | [optional] +**earningsAboveFUSTUptoIncludingUEL** | **float** | Earnings above FUST up to UEL | [optional] **earningsAboveLELUptoIncludingPT** | **float** | Earnings above LEL up to PT | [optional] **earningsAbovePTUptoIncludingST** | **float** | Earnings above PT up to ST | [optional] **earningsAbovePTUptoIncludingUEL** | **float** | Earnings above PT up to UEL | [optional] -**earningsAboveSTUptoIncludingUEL** | **float** | Earnings above ST up to UEL | [optional] **earningsAboveSTUptoIncludingFUST** | **float** | Earnings above ST up to FUST | [optional] -**earningsAboveFUSTUptoIncludingUEL** | **float** | Earnings above FUST up to UEL | [optional] +**earningsAboveSTUptoIncludingUEL** | **float** | Earnings above ST up to UEL | [optional] **earningsAboveUEL** | **float** | Earnings above UEL | [optional] +**earningsUptoIncludingLEL** | **float** | Earnings up to and including LEL | [optional] +**employeeNi** | **float** | [readonly] Net Employee National Insurance | [optional] [readonly] **employeeNiGross** | **float** | Employee National Insurance Gross Value | [optional] **employeeNiRebate** | **float** | Employee National Insurance Rebate Value | [optional] +**employerNi** | **float** | [readonly] Net Employer National Insurance | [optional] [readonly] **employerNiGross** | **float** | Employer National Insurance Gross Value | [optional] **employerNiRebate** | **float** | Employer National Insurance Rebate Value | [optional] -**employeeNi** | **float** | [readonly] Net Employee National Insurance | [optional] [readonly] -**employerNi** | **float** | [readonly] Net Employer National Insurance | [optional] [readonly] **netNi** | **float** | [readonly] Net National Insurance (Employer + Employee) | [optional] [readonly] +**niCategory** | **string** | Calculated on NI table letter | [optional] **niablePay** | **float** | Niable pay value, required for payrun overrides | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NationalInsuranceCalculationPeriodValues.md b/docs/Model/NationalInsuranceCalculationPeriodValues.md index 4c4e268..f8643e3 100644 --- a/docs/Model/NationalInsuranceCalculationPeriodValues.md +++ b/docs/Model/NationalInsuranceCalculationPeriodValues.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**aust** | **float** | [readonly] Apprentice Upper Secondary Threshold (apprentice under 25) | [optional] +**fust** | **float** | [readonly] Freeports Upper Accrual Threshold | [optional] **lel** | **float** | [readonly] Lower Earnings Limit | [optional] **pt** | **float** | [readonly] Primary Threshold | [optional] **st** | **float** | [readonly] Secondary Threshold | [optional] -**fust** | **float** | [readonly] Freeports Upper Accrual Threshold | [optional] **uap** | **float** | [readonly] Upper Accrual Point | [optional] -**ust** | **float** | [readonly] Upper Secondary Threshold (under 21) | [optional] -**aust** | **float** | [readonly] Apprentice Upper Secondary Threshold (apprentice under 25) | [optional] **uel** | **float** | [readonly] Upper Earnings Limit | [optional] +**ust** | **float** | [readonly] Upper Secondary Threshold (under 21) | [optional] **vust** | **float** | [readonly] Veterian Upper Secondary Threshold | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NationalInsuranceCode.md b/docs/Model/NationalInsuranceCode.md index 633b6f0..7f6dac3 100644 --- a/docs/Model/NationalInsuranceCode.md +++ b/docs/Model/NationalInsuranceCode.md @@ -11,12 +11,12 @@ Name | Type | Description | Notes **eeD** | **float** | [readonly] Balance of earnings above UEL (Employee Contribution) | [optional] **eeE** | **float** | [readonly] | [optional] **eeF** | **float** | [readonly] | [optional] +**effectiveFrom** | **\DateTime** | The date when these period values are effective | [optional] **erB** | **float** | [readonly] Earnings at or above LEL up to and including PT (Employer Contribution) | [optional] **erC** | **float** | [readonly] Earnings above the PT up to and including UEL (Employer Contribution) | [optional] **erD** | **float** | [readonly] Balance of earnings above UEL (Employer Contribution) | [optional] **erE** | **float** | [readonly] | [optional] **erF** | **float** | [readonly] | [optional] -**effectiveFrom** | **\DateTime** | The date when these period values are effective | [optional] **midYearChanges** | [**\SynergiTech\Staffology\Model\NationalInsuranceCode[]**](NationalInsuranceCode.md) | Any optional changes to the period values that are effective from a specified date in the middle of a tax year | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NationalMinimumWage.md b/docs/Model/NationalMinimumWage.md index ca82bc8..5254a14 100644 --- a/docs/Model/NationalMinimumWage.md +++ b/docs/Model/NationalMinimumWage.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **apprentice** | **bool** | | [optional] -**maxAge** | **int** | | [optional] **hourlyAmount** | **float** | | [optional] +**maxAge** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NiLetterValidationReport.md b/docs/Model/NiLetterValidationReport.md index 20b2eb2..36acdb6 100644 --- a/docs/Model/NiLetterValidationReport.md +++ b/docs/Model/NiLetterValidationReport.md @@ -5,20 +5,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **basedOnPayrun** | **bool** | If false, then any payrun related information (Tax year, etc) should be ignored. | [optional] -**errorLines** | [**\SynergiTech\Staffology\Model\NiLetterValidationReportLine[]**](NiLetterValidationReportLine.md) | | [optional] [readonly] -**paymentDate** | **\DateTime** | | [optional] **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**errorLines** | [**\SynergiTech\Staffology\Model\NiLetterValidationReportLine[]**](NiLetterValidationReportLine.md) | | [optional] [readonly] +**isDraft** | **bool** | | [optional] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**paymentDate** | **\DateTime** | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NiLetterValidationReportLine.md b/docs/Model/NiLetterValidationReportLine.md index b56694a..c2c45cd 100644 --- a/docs/Model/NiLetterValidationReportLine.md +++ b/docs/Model/NiLetterValidationReportLine.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employeeId** | **string** | | [optional] -**payrollCode** | **string** | | [optional] -**name** | **string** | | [optional] -**niNumber** | **string** | | [optional] -**gender** | [**\SynergiTech\Staffology\Model\Gender**](Gender.md) | | [optional] **dateOfBirth** | **\DateTime** | | [optional] -**niLetterError** | [**\SynergiTech\Staffology\Model\NiLetterError**](NiLetterError.md) | | [optional] +**employeeId** | **string** | | [optional] **errorDetails** | **string** | | [optional] [readonly] +**gender** | [**\SynergiTech\Staffology\Model\Gender**](Gender.md) | | [optional] +**name** | **string** | | [optional] **niLetter** | **string** | | [optional] +**niLetterError** | [**\SynergiTech\Staffology\Model\NiLetterError**](NiLetterError.md) | | [optional] +**niNumber** | **string** | | [optional] +**payrollCode** | **string** | | [optional] **suggestedLetter** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NiLetterValidationReportReportResponse.md b/docs/Model/NiLetterValidationReportReportResponse.md index 61eb2c9..849fb44 100644 --- a/docs/Model/NiLetterValidationReportReportResponse.md +++ b/docs/Model/NiLetterValidationReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\NiLetterValidationReport**](NiLetterValidationReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NiYtdReport.md b/docs/Model/NiYtdReport.md index 9c62881..48c0192 100644 --- a/docs/Model/NiYtdReport.md +++ b/docs/Model/NiYtdReport.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrun** | [**\SynergiTech\Staffology\Model\PayRun**](PayRun.md) | | [optional] +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\EmployeeNiYtdValues[]**](EmployeeNiYtdValues.md) | | [optional] +**payrun** | [**\SynergiTech\Staffology\Model\PayRun**](PayRun.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NiYtdReportReportResponse.md b/docs/Model/NiYtdReportReportResponse.md index b5c5d43..e4d4656 100644 --- a/docs/Model/NiYtdReportReportResponse.md +++ b/docs/Model/NiYtdReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\NiYtdReport**](NiYtdReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NiYtdValue.md b/docs/Model/NiYtdValue.md index 897b7e8..df8d681 100644 --- a/docs/Model/NiYtdValue.md +++ b/docs/Model/NiYtdValue.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | | [optional] **broughtForward** | **float** | | [optional] **period** | **float** | | [optional] +**type** | **string** | | [optional] **value** | **float** | | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NicSummary.md b/docs/Model/NicSummary.md index a88ac4c..608c522 100644 --- a/docs/Model/NicSummary.md +++ b/docs/Model/NicSummary.md @@ -4,28 +4,30 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**paymentDate** | **\DateTime** | | [optional] -**niTable** | **string** | | [optional] **asDirector** | **bool** | | [optional] -**grossEarningsForNics** | **float** | | [optional] -**earningsAtLel** | **float** | | [optional] +**childId** | **string** | This is nothing but the UniqueId of the model. | [optional] +**earningsAboveFustToUel** | **float** | | [optional] **earningsAboveLelToPt** | **float** | | [optional] **earningsAbovePtToSt** | **float** | | [optional] **earningsAbovePtToUap** | **float** | | [optional] -**earningsAboveStToUel** | **float** | | [optional] **earningsAboveStToFust** | **float** | | [optional] -**earningsAboveFustToUel** | **float** | | [optional] +**earningsAboveStToUel** | **float** | | [optional] **earningsAboveUapToUel** | **float** | | [optional] **earningsAboveUel** | **float** | | [optional] -**employeeNics** | **float** | | [optional] +**earningsAtLel** | **float** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **employeeNiRebate** | **float** | | [optional] -**employerNics** | **float** | | [optional] +**employeeNics** | **float** | | [optional] **employerNiRebate** | **float** | | [optional] +**employerNics** | **float** | | [optional] +**grossEarningsForNics** | **float** | | [optional] **hasValues** | **bool** | | [optional] [readonly] **id** | **string** | | [optional] [readonly] +**isLatestVersion** | **bool** | [readonly] Indicates whether this is the latest version of the NicSummary. | [optional] **isNiYtdOverride** | **bool** | | [optional] -**childId** | **string** | This is nothing but the UniqueId of the model. | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**niTable** | **string** | | [optional] +**payRunVersion** | **int** | [readonly] The supplementary pay run version of this NicSummary. | [optional] +**paymentDate** | **\DateTime** | | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NominalCodeMapping.md b/docs/Model/NominalCodeMapping.md index b3f0302..79de6ff 100644 --- a/docs/Model/NominalCodeMapping.md +++ b/docs/Model/NominalCodeMapping.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**externalId** | **string** | If you will be using the API to post journals to an ExternalDataProvider, then this is the Id of the nominal code in the external system. If there's no mapping then this will have a value of \"0\" | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **nominalCode** | **string** | | [optional] +**nominalMapping** | **string** | | [optional] **nominalName** | **string** | | [optional] -**externalId** | **string** | If you will be using the API to post journals to an ExternalDataProvider, then this is the Id of the nominal code in the external system. If there's no mapping then this will have a value of \"0\" | [optional] **payCode** | **string** | | [optional] -**nominalMapping** | **string** | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Note.md b/docs/Model/Note.md index d5c88ed..e6e6d03 100644 --- a/docs/Model/Note.md +++ b/docs/Model/Note.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**noteDate** | **\DateTime** | The date of the note | [optional] -**noteText** | **string** | Note text | [optional] **createdBy** | **string** | [readonly] The email address of the user that create the Note | [optional] -**updatedBy** | **string** | [readonly] The email address of the user that last updated the Note | [optional] -**type** | [**\SynergiTech\Staffology\Model\NoteType**](NoteType.md) | | [optional] **documentCount** | **int** | [readonly] The number of attachments associated with this model | [optional] **documents** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] The attachments associated with this model | [optional] **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**noteDate** | **\DateTime** | The date of the note | [optional] +**noteText** | **string** | Note text | [optional] +**type** | [**\SynergiTech\Staffology\Model\NoteType**](NoteType.md) | | [optional] +**updatedBy** | **string** | [readonly] The email address of the user that last updated the Note | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NotionalPayPeriodBreakdown.md b/docs/Model/NotionalPayPeriodBreakdown.md new file mode 100644 index 0000000..602b11c --- /dev/null +++ b/docs/Model/NotionalPayPeriodBreakdown.md @@ -0,0 +1,16 @@ +# # NotionalPayPeriodBreakdown + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**daysExcluded** | **int** | | [optional] +**from** | **\DateTime** | | [optional] +**leaveId** | **string** | | [optional] +**notionalPay** | **float** | | [optional] +**occupationalPayWithLessThanHalfPay** | **float** | | [optional] +**percentOfPay** | **float** | | [optional] +**percentOfPayBand** | [**\SynergiTech\Staffology\Model\PercentOfPayBand**](PercentOfPayBand.md) | | [optional] +**to** | **\DateTime** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Nvr.md b/docs/Model/Nvr.md index 6b3b53e..1ac3303 100644 --- a/docs/Model/Nvr.md +++ b/docs/Model/Nvr.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employees** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | | [optional] **employeeCount** | **int** | | [optional] -**nvrRequest** | [**\SynergiTech\Staffology\Model\NvrRequest**](NvrRequest.md) | | [optional] -**iRmark** | **string** | | [optional] -**xml** | **string** | This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**employees** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | | [optional] **employerReferences** | [**\SynergiTech\Staffology\Model\EmpRefs**](EmpRefs.md) | | [optional] **govTalkSubmission** | [**\SynergiTech\Staffology\Model\GovTalkSubmission**](GovTalkSubmission.md) | | [optional] +**iRmark** | **string** | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**nvrRequest** | [**\SynergiTech\Staffology\Model\NvrRequest**](NvrRequest.md) | | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**xml** | **string** | This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NvrEmployee.md b/docs/Model/NvrEmployee.md index 1181a96..1e86c8f 100644 --- a/docs/Model/NvrEmployee.md +++ b/docs/Model/NvrEmployee.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employeeUniqueId** | **string** | | [optional] -**item** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **employeeDetails** | [**\SynergiTech\Staffology\Model\NvrEmployeeDetails**](NvrEmployeeDetails.md) | | [optional] +**employeeUniqueId** | **string** | | [optional] **employment** | [**\SynergiTech\Staffology\Model\NvrEmployment**](NvrEmployment.md) | | [optional] +**item** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NvrEmployeeDetails.md b/docs/Model/NvrEmployeeDetails.md index e2f4837..4b8aa62 100644 --- a/docs/Model/NvrEmployeeDetails.md +++ b/docs/Model/NvrEmployeeDetails.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nino** | **string** | | [optional] -**name** | [**\SynergiTech\Staffology\Model\RtiEmployeeName**](RtiEmployeeName.md) | | [optional] **address** | [**\SynergiTech\Staffology\Model\RtiEmployeeAddress**](RtiEmployeeAddress.md) | | [optional] **birthDate** | **string** | | [optional] **gender** | **string** | | [optional] +**name** | [**\SynergiTech\Staffology\Model\RtiEmployeeName**](RtiEmployeeName.md) | | [optional] +**nino** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OccupationalPolicy.md b/docs/Model/OccupationalPolicy.md index bec5c96..d93bd9b 100644 --- a/docs/Model/OccupationalPolicy.md +++ b/docs/Model/OccupationalPolicy.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**policyName** | **string** | The unique policy name | -**type** | [**\SynergiTech\Staffology\Model\OccupationalPolicyType**](OccupationalPolicyType.md) | | +**daysOrWeeksBeforeRecalculatingEntitlement** | **int** | How many days or weeks an employee needs to return to work before new entitlements are used in calculations | [optional] **entitlement** | [**\SynergiTech\Staffology\Model\OccupationalPolicyEntitlement**](OccupationalPolicyEntitlement.md) | | -**sicknessYear** | [**\SynergiTech\Staffology\Model\OccupationalPolicySicknessYear**](OccupationalPolicySicknessYear.md) | | -**policyStartMonth** | [**\SynergiTech\Staffology\Model\CalendarMonth**](CalendarMonth.md) | | [optional] -**serviceBands** | [**\SynergiTech\Staffology\Model\ServiceBand[]**](ServiceBand.md) | Service Bands Json | [optional] +**entitlementRecalculationBasis** | [**\SynergiTech\Staffology\Model\OccupationalPolicyEntitlementRecalculationBasis**](OccupationalPolicyEntitlementRecalculationBasis.md) | | [optional] +**ignorePreviousYearsSickness** | **bool** | Defines whether any sickness that relates to a previous year's sickness entitlement should be included in the entitlement calculation, or whether only sickness that is relevant to the current year's entitlement is taken into consideration | [optional] **payCalculatedOn** | [**\SynergiTech\Staffology\Model\OccupationalPolicyPayCalculatedOn**](OccupationalPolicyPayCalculatedOn.md) | | [optional] **payCodeSetUniqueId** | **string** | | [optional] +**policyName** | **string** | The unique policy name | +**policyStartMonth** | [**\SynergiTech\Staffology\Model\CalendarMonth**](CalendarMonth.md) | | [optional] +**serviceBands** | [**\SynergiTech\Staffology\Model\ServiceBand[]**](ServiceBand.md) | Service Bands Json | [optional] +**sicknessYear** | [**\SynergiTech\Staffology\Model\OccupationalPolicySicknessYear**](OccupationalPolicySicknessYear.md) | | +**type** | [**\SynergiTech\Staffology\Model\OccupationalPolicyType**](OccupationalPolicyType.md) | | **useAggregatedServiceDate** | **bool** | | [optional] -**daysOrWeeksBeforeRecalculatingEntitlement** | **int** | How many days or weeks an employee needs to return to work before new entitlements are used in calculations | [optional] -**entitlementRecalculationBasis** | [**\SynergiTech\Staffology\Model\OccupationalPolicyEntitlementRecalculationBasis**](OccupationalPolicyEntitlementRecalculationBasis.md) | | [optional] -**ignorePreviousYearsSickness** | **bool** | Defines whether any sickness that relates to a previous year's sickness entitlement should be included in the entitlement calculation, or whether only sickness that is relevant to the current year's entitlement is taken into consideration | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OccupationalSickLeaveHistory.md b/docs/Model/OccupationalSickLeaveHistory.md index efe2d8d..ee9f56b 100644 --- a/docs/Model/OccupationalSickLeaveHistory.md +++ b/docs/Model/OccupationalSickLeaveHistory.md @@ -4,14 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollCode** | **string** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**isReversed** | **bool** | [readonly] Is set to true if this has been reversed in a Leave | [optional] **leaveDate** | **\DateTime** | | +**occupationalPolicy** | **string** | | [optional] **payPercent** | **float** | | -**serviceBandFrom** | **int** | | -**serviceBandTo** | **int** | | **payRunId** | **int** | | [optional] +**payrollCode** | **string** | | [optional] **roleReference** | **string** | | [optional] -**occupationalPolicy** | **string** | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**serviceBandFrom** | **int** | | +**serviceBandTo** | **int** | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OpeningBalances.md b/docs/Model/OpeningBalances.md index aee5784..22860e8 100644 --- a/docs/Model/OpeningBalances.md +++ b/docs/Model/OpeningBalances.md @@ -4,30 +4,30 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**notNewStarter** | **bool** | | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**previousEmployerGross** | **float** | | [optional] -**previousEmployerTax** | **float** | | [optional] +**benefitsTaxedViaPayroll** | **float** | | [optional] **currentEmployerGross** | **float** | | [optional] -**currentEmployerTax** | **float** | | [optional] **currentEmployerNet** | **float** | | [optional] -**studentLoanDeductions** | **float** | | [optional] -**postgradLoanDeductions** | **float** | | [optional] -**empeePenContribnsPaid** | **float** | | [optional] +**currentEmployerTax** | **float** | | [optional] **empeePenContribnsNotPaid** | **float** | | [optional] -**smp** | **float** | | [optional] -**spp** | **float** | | [optional] +**empeePenContribnsPaid** | **float** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**foreignTaxCredit** | **float** | | [optional] +**foreignTaxCreditReclaimed** | **float** | | [optional] +**mapsMiles** | **int** | | [optional] +**nicSummaries** | [**\SynergiTech\Staffology\Model\NicSummary[]**](NicSummary.md) | | [optional] +**notNewStarter** | **bool** | | [optional] +**postgradLoanDeductions** | **float** | | [optional] +**previousEmployerGross** | **float** | | [optional] +**previousEmployerTax** | **float** | | [optional] +**realTimeClass1ANi** | **float** | | [optional] **sap** | **float** | | [optional] **shpp** | **float** | | [optional] -**spbp** | **float** | | [optional] +**smp** | **float** | | [optional] **sncp** | **float** | | [optional] -**realTimeClass1ANi** | **float** | | [optional] +**spbp** | **float** | | [optional] +**spp** | **float** | | [optional] +**studentLoanDeductions** | **float** | | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **terminationPayments** | **float** | | [optional] -**mapsMiles** | **int** | | [optional] -**benefitsTaxedViaPayroll** | **float** | | [optional] -**nicSummaries** | [**\SynergiTech\Staffology\Model\NicSummary[]**](NicSummary.md) | | [optional] -**foreignTaxCredit** | **float** | | [optional] -**foreignTaxCreditReclaimed** | **float** | | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OpeningBalancesTotals.md b/docs/Model/OpeningBalancesTotals.md index 38439c3..e3c4326 100644 --- a/docs/Model/OpeningBalancesTotals.md +++ b/docs/Model/OpeningBalancesTotals.md @@ -4,30 +4,30 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employeesWithOpeningBalancesCount** | **int** | | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**previousEmployerGross** | **float** | | [optional] -**previousEmployerTax** | **float** | | [optional] +**benefitsTaxedViaPayroll** | **float** | | [optional] **currentEmployerGross** | **float** | | [optional] -**currentEmployerTax** | **float** | | [optional] **currentEmployerNet** | **float** | | [optional] -**studentLoanDeductions** | **float** | | [optional] -**postgradLoanDeductions** | **float** | | [optional] -**empeePenContribnsPaid** | **float** | | [optional] +**currentEmployerTax** | **float** | | [optional] **empeePenContribnsNotPaid** | **float** | | [optional] -**smp** | **float** | | [optional] -**spp** | **float** | | [optional] +**empeePenContribnsPaid** | **float** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**employeesWithOpeningBalancesCount** | **int** | | [optional] +**foreignTaxCredit** | **float** | | [optional] +**foreignTaxCreditReclaimed** | **float** | | [optional] +**mapsMiles** | **int** | | [optional] +**nicSummaries** | [**\SynergiTech\Staffology\Model\NicSummary[]**](NicSummary.md) | | [optional] +**postgradLoanDeductions** | **float** | | [optional] +**previousEmployerGross** | **float** | | [optional] +**previousEmployerTax** | **float** | | [optional] +**realTimeClass1ANi** | **float** | | [optional] **sap** | **float** | | [optional] **shpp** | **float** | | [optional] -**spbp** | **float** | | [optional] +**smp** | **float** | | [optional] **sncp** | **float** | | [optional] -**realTimeClass1ANi** | **float** | | [optional] +**spbp** | **float** | | [optional] +**spp** | **float** | | [optional] +**studentLoanDeductions** | **float** | | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **terminationPayments** | **float** | | [optional] -**mapsMiles** | **int** | | [optional] -**benefitsTaxedViaPayroll** | **float** | | [optional] -**nicSummaries** | [**\SynergiTech\Staffology\Model\NicSummary[]**](NicSummary.md) | | [optional] -**foreignTaxCredit** | **float** | | [optional] -**foreignTaxCreditReclaimed** | **float** | | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OverseasEmployerDetails.md b/docs/Model/OverseasEmployerDetails.md index c6f6746..fe0eb70 100644 --- a/docs/Model/OverseasEmployerDetails.md +++ b/docs/Model/OverseasEmployerDetails.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**overseasEmployer** | **bool** | | [optional] -**overseasSecondmentStatus** | [**\SynergiTech\Staffology\Model\OverseasSecondmentStatus**](OverseasSecondmentStatus.md) | | [optional] **eeaCitizen** | **bool** | | [optional] **epm6Scheme** | **bool** | | [optional] +**overseasEmployer** | **bool** | | [optional] +**overseasSecondmentStatus** | [**\SynergiTech\Staffology\Model\OverseasSecondmentStatus**](OverseasSecondmentStatus.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11.md b/docs/Model/P11.md index 6eed711..2068c2c 100644 --- a/docs/Model/P11.md +++ b/docs/Model/P11.md @@ -4,21 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**dateOfBirth** | **\DateTime** | [readonly] | [optional] **employerName** | **string** | [readonly] | [optional] -**payrollCode** | **string** | [readonly] | [optional] **employerOfficeNo** | **string** | [readonly] | [optional] **employerPayeRef** | **string** | [readonly] | [optional] **firstname** | **string** | [readonly] | [optional] -**surname** | **string** | [readonly] | [optional] -**niNumber** | **string** | [readonly] | [optional] -**taxCode** | **string** | [readonly] | [optional] -**dateOfBirth** | **\DateTime** | [readonly] | [optional] +**isDraft** | **bool** | | [optional] **joinDate** | **\DateTime** | [readonly] | [optional] **leaveDate** | **\DateTime** | [readonly] | [optional] **lines** | [**\SynergiTech\Staffology\Model\P11Line[]**](P11Line.md) | [readonly] | [optional] +**niNumber** | **string** | [readonly] | [optional] +**payrollCode** | **string** | [readonly] | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**surname** | **string** | [readonly] | [optional] +**taxCode** | **string** | [readonly] | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11DAssetAvailable.md b/docs/Model/P11DAssetAvailable.md index 20ae60b..046cd98 100644 --- a/docs/Model/P11DAssetAvailable.md +++ b/docs/Model/P11DAssetAvailable.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**desc** | **string** | | [optional] -**other** | **string** | | [optional] **annValProRata** | **string** | | [optional] -**grossOrAmtForgone** | **string** | | [optional] +**cashEquivOrRelevantAmt** | **string** | | [optional] **costOrAmtForgone** | **string** | | [optional] +**desc** | **string** | | [optional] +**grossOrAmtForgone** | **string** | | [optional] **madeGood** | **string** | | [optional] -**cashEquivOrRelevantAmt** | **string** | | [optional] +**other** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11DCar.md b/docs/Model/P11DCar.md index 5c79758..d5dbd3d 100644 --- a/docs/Model/P11DCar.md +++ b/docs/Model/P11DCar.md @@ -4,21 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**make** | **string** | | [optional] -**registered** | **string** | | [optional] +**accs** | **string** | | [optional] **availFrom** | **string** | | [optional] **availTo** | **string** | | [optional] -**cc** | **string** | | [optional] -**fuel** | **string** | | [optional] **cO2** | **string** | | [optional] -**zeroEmissionMileage** | **string** | | [optional] -**noAppCO2Fig** | **string** | | [optional] -**list** | **string** | | [optional] -**accs** | **string** | | [optional] **capCont** | **string** | | [optional] -**privUsePmt** | **string** | | [optional] -**fuelWithdrawn** | [**\SynergiTech\Staffology\Model\P11dCarFreeFuelWithdrawn**](P11dCarFreeFuelWithdrawn.md) | | [optional] **cashEquivOrRelevantAmt** | **string** | | [optional] +**cc** | **string** | | [optional] +**fuel** | **string** | | [optional] **fuelCashEquivOrRelevantAmt** | **string** | | [optional] +**fuelWithdrawn** | [**\SynergiTech\Staffology\Model\P11dCarFreeFuelWithdrawn**](P11dCarFreeFuelWithdrawn.md) | | [optional] +**list** | **string** | | [optional] +**make** | **string** | | [optional] +**noAppCO2Fig** | **string** | | [optional] +**privUsePmt** | **string** | | [optional] +**registered** | **string** | | [optional] +**zeroEmissionMileage** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11DDescOther.md b/docs/Model/P11DDescOther.md index 6f903ef..125d5ce 100644 --- a/docs/Model/P11DDescOther.md +++ b/docs/Model/P11DDescOther.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**desc** | **string** | | [optional] -**other** | **string** | | [optional] **annValProRata** | **string** | | [optional] -**grossOrAmtForgone** | **string** | | [optional] +**cashEquivOrRelevantAmt** | **string** | | [optional] **costOrAmtForgone** | **string** | | [optional] +**desc** | **string** | | [optional] +**grossOrAmtForgone** | **string** | | [optional] **madeGood** | **string** | | [optional] -**cashEquivOrRelevantAmt** | **string** | | [optional] +**other** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11DLoan.md b/docs/Model/P11DLoan.md index c4be067..97fba40 100644 --- a/docs/Model/P11DLoan.md +++ b/docs/Model/P11DLoan.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**joint** | **string** | | [optional] -**initOS** | **string** | | [optional] -**finalOS** | **string** | | [optional] -**maxOS** | **string** | | [optional] -**intPaid** | **string** | | [optional] +**cashEquivOrRelevantAmt** | **string** | | [optional] **date** | **string** | | [optional] **discharge** | **string** | | [optional] -**cashEquivOrRelevantAmt** | **string** | | [optional] +**finalOS** | **string** | | [optional] +**initOS** | **string** | | [optional] +**intPaid** | **string** | | [optional] +**joint** | **string** | | [optional] +**maxOS** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11DSingleItem.md b/docs/Model/P11DSingleItem.md index 5f3db87..2412d53 100644 --- a/docs/Model/P11DSingleItem.md +++ b/docs/Model/P11DSingleItem.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**typeLetter** | **string** | | [optional] -**taxablePmt** | **string** | | [optional] -**excess** | **string** | | [optional] -**taxablePmtOrRelevantAmt** | **string** | | [optional] -**tradingOrgInd** | **string** | | [optional] -**desc** | **string** | | [optional] -**other** | **string** | | [optional] **annValProRata** | **string** | | [optional] -**grossOrAmtForgone** | **string** | | [optional] +**cashEquivOrRelevantAmt** | **string** | | [optional] **costOrAmtForgone** | **string** | | [optional] +**desc** | **string** | | [optional] +**excess** | **string** | | [optional] +**grossOrAmtForgone** | **string** | | [optional] **madeGood** | **string** | | [optional] -**cashEquivOrRelevantAmt** | **string** | | [optional] +**other** | **string** | | [optional] +**taxablePmt** | **string** | | [optional] +**taxablePmtOrRelevantAmt** | **string** | | [optional] +**tradingOrgInd** | **string** | | [optional] +**typeLetter** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11Detailed.md b/docs/Model/P11Detailed.md index 5cbec71..53bfc27 100644 --- a/docs/Model/P11Detailed.md +++ b/docs/Model/P11Detailed.md @@ -4,28 +4,28 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**dateOfBirth** | **\DateTime** | [readonly] | [optional] **employerName** | **string** | [readonly] | [optional] -**payrollCode** | **string** | [readonly] | [optional] **employerOfficeNo** | **string** | [readonly] | [optional] **employerPayeRef** | **string** | [readonly] | [optional] **firstname** | **string** | [readonly] | [optional] -**middlename** | **string** | [readonly] | [optional] -**surname** | **string** | [readonly] | [optional] -**niNumber** | **string** | [readonly] | [optional] -**taxCode** | **string** | [readonly] | [optional] -**dateOfBirth** | **\DateTime** | [readonly] | [optional] +**isDirector** | **bool** | [readonly] | [optional] +**isDraft** | **bool** | | [optional] **joinDate** | **\DateTime** | [readonly] | [optional] **leaveDate** | **\DateTime** | [readonly] | [optional] -**isDirector** | **bool** | [readonly] | [optional] +**middlename** | **string** | [readonly] | [optional] **niAndStatPaymentsLines** | [**\SynergiTech\Staffology\Model\P11NiAndStatPaymentsLine[]**](P11NiAndStatPaymentsLine.md) | [readonly] | [optional] -**totalsLine** | [**\SynergiTech\Staffology\Model\P11NiAndStatPaymentsTotalsLine**](P11NiAndStatPaymentsTotalsLine.md) | | [optional] +**niNumber** | **string** | [readonly] | [optional] **niSummary** | [**\SynergiTech\Staffology\Model\P11DetailedNiValues[]**](P11DetailedNiValues.md) | [readonly] | [optional] **payeLines** | [**\SynergiTech\Staffology\Model\P11PayeLine[]**](P11PayeLine.md) | [readonly] | [optional] -**payeTotalsLine** | [**\SynergiTech\Staffology\Model\P11PayeTotalsLine**](P11PayeTotalsLine.md) | | [optional] **payeSummary** | [**\SynergiTech\Staffology\Model\P11PayeSummary**](P11PayeSummary.md) | | [optional] +**payeTotalsLine** | [**\SynergiTech\Staffology\Model\P11PayeTotalsLine**](P11PayeTotalsLine.md) | | [optional] +**payrollCode** | **string** | [readonly] | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**surname** | **string** | [readonly] | [optional] +**taxCode** | **string** | [readonly] | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**totalsLine** | [**\SynergiTech\Staffology\Model\P11NiAndStatPaymentsTotalsLine**](P11NiAndStatPaymentsTotalsLine.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11DetailedNiValues.md b/docs/Model/P11DetailedNiValues.md index f3939c1..3591282 100644 --- a/docs/Model/P11DetailedNiValues.md +++ b/docs/Model/P11DetailedNiValues.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**table** | **string** | [readonly] | [optional] -**earningsAtLel** | **float** | [readonly] | [optional] **earningsAboveLelToPt** | **float** | [readonly] | [optional] **earningsAbovePtToUap** | **float** | [readonly] | [optional] -**earningsAboveUapToUel** | **float** | [readonly] | [optional] **earningsAbovePtToUel** | **float** | [readonly] | [optional] +**earningsAboveUapToUel** | **float** | [readonly] | [optional] +**earningsAtLel** | **float** | [readonly] | [optional] +**employeeAndEmployerNics** | **float** | [readonly] | [optional] **employeeNics** | **float** | [readonly] | [optional] **employerNics** | **float** | [readonly] | [optional] -**employeeAndEmployerNics** | **float** | [readonly] | [optional] +**table** | **string** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11DetailedReportResponse.md b/docs/Model/P11DetailedReportResponse.md index ddc7f1e..cfa0328 100644 --- a/docs/Model/P11DetailedReportResponse.md +++ b/docs/Model/P11DetailedReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\P11Detailed**](P11Detailed.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11Line.md b/docs/Model/P11Line.md index 8760612..3e5475d 100644 --- a/docs/Model/P11Line.md +++ b/docs/Model/P11Line.md @@ -5,19 +5,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **date** | **\DateTime** | [readonly] | [optional] -**period** | **string** | [readonly] | [optional] **grossTaxablePay** | **float** | [readonly] | [optional] **grossTaxablePayYTD** | **float** | [readonly] | [optional] -**tax** | **float** | [readonly] | [optional] -**taxYTD** | **float** | [readonly] | [optional] -**smpYTD** | **float** | [readonly] | [optional] -**sppYTD** | **float** | [readonly] | [optional] +**niValues** | [**\SynergiTech\Staffology\Model\P11NiValues[]**](P11NiValues.md) | [readonly] | [optional] +**period** | **string** | [readonly] | [optional] +**postgradLoanYTD** | **float** | [readonly] | [optional] **sapYTD** | **float** | [readonly] | [optional] **shppYTD** | **float** | [readonly] | [optional] -**spbpYTD** | **float** | [readonly] | [optional] +**smpYTD** | **float** | [readonly] | [optional] **sncpYTD** | **float** | [readonly] | [optional] +**spbpYTD** | **float** | [readonly] | [optional] +**sppYTD** | **float** | [readonly] | [optional] **studentLoanYTD** | **float** | [readonly] | [optional] -**postgradLoanYTD** | **float** | [readonly] | [optional] -**niValues** | [**\SynergiTech\Staffology\Model\P11NiValues[]**](P11NiValues.md) | [readonly] | [optional] +**tax** | **float** | [readonly] | [optional] +**taxYTD** | **float** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11NiAndStatPaymentsLine.md b/docs/Model/P11NiAndStatPaymentsLine.md index 9d35cb1..966d13f 100644 --- a/docs/Model/P11NiAndStatPaymentsLine.md +++ b/docs/Model/P11NiAndStatPaymentsLine.md @@ -4,19 +4,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**class1a** | **float** | [readonly] | [optional] **date** | **\DateTime** | [readonly] | [optional] -**period** | **string** | [readonly] | [optional] **monthNumber** | **string** | [readonly] | [optional] -**weekNumber** | **string** | [readonly] | [optional] -**smp** | **float** | [readonly] | [optional] -**spp** | **float** | [readonly] | [optional] +**niValues** | [**\SynergiTech\Staffology\Model\P11DetailedNiValues**](P11DetailedNiValues.md) | | [optional] +**period** | **string** | [readonly] | [optional] **sap** | **float** | [readonly] | [optional] **shpp** | **float** | [readonly] | [optional] -**ssp** | **float** | [readonly] | [optional] -**spbp** | **float** | [readonly] | [optional] +**smp** | **float** | [readonly] | [optional] **sncp** | **float** | [readonly] | [optional] -**class1a** | **float** | [readonly] | [optional] -**niValues** | [**\SynergiTech\Staffology\Model\P11DetailedNiValues**](P11DetailedNiValues.md) | | [optional] +**spbp** | **float** | [readonly] | [optional] +**spp** | **float** | [readonly] | [optional] +**ssp** | **float** | [readonly] | [optional] **taxCode** | **string** | [readonly] | [optional] +**weekNumber** | **string** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11NiAndStatPaymentsTotalsLine.md b/docs/Model/P11NiAndStatPaymentsTotalsLine.md index d166a12..b4f32d2 100644 --- a/docs/Model/P11NiAndStatPaymentsTotalsLine.md +++ b/docs/Model/P11NiAndStatPaymentsTotalsLine.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**toLel** | **float** | [readonly] | [optional] +**class1A** | **float** | [readonly] | [optional] +**ees** | **float** | [readonly] | [optional] +**eesAndErs** | **float** | [readonly] | [optional] **lelToPt** | **float** | [readonly] | [optional] **ptToUel** | **float** | [readonly] | [optional] -**eesAndErs** | **float** | [readonly] | [optional] -**ees** | **float** | [readonly] | [optional] -**class1A** | **float** | [readonly] | [optional] -**ssp** | **float** | [readonly] | [optional] -**smp** | **float** | [readonly] | [optional] -**spp** | **float** | [readonly] | [optional] -**shpp** | **float** | [readonly] | [optional] **sap** | **float** | [readonly] | [optional] -**spbp** | **float** | [readonly] | [optional] +**shpp** | **float** | [readonly] | [optional] +**smp** | **float** | [readonly] | [optional] **sncp** | **float** | [readonly] | [optional] +**spbp** | **float** | [readonly] | [optional] +**spp** | **float** | [readonly] | [optional] +**ssp** | **float** | [readonly] | [optional] +**toLel** | **float** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11NiValues.md b/docs/Model/P11NiValues.md index 83b7ad5..bea8dbc 100644 --- a/docs/Model/P11NiValues.md +++ b/docs/Model/P11NiValues.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**table** | **string** | [readonly] | [optional] **period** | **float** | [readonly] | [optional] +**table** | **string** | [readonly] | [optional] **ytd** | **float** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11PayeLine.md b/docs/Model/P11PayeLine.md index f02873a..4248495 100644 --- a/docs/Model/P11PayeLine.md +++ b/docs/Model/P11PayeLine.md @@ -5,15 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **date** | **\DateTime** | [readonly] | [optional] -**period** | **string** | [readonly] | [optional] -**monthNumber** | **string** | [readonly] | [optional] -**weekNumber** | **string** | [readonly] | [optional] **grossTaxablePay** | **float** | [readonly] | [optional] **grossTaxablePayYTD** | **float** | [readonly] | [optional] -**tax** | **float** | [readonly] | [optional] -**taxYTD** | **float** | [readonly] | [optional] -**studentLoan** | **float** | [readonly] | [optional] +**monthNumber** | **string** | [readonly] | [optional] +**period** | **string** | [readonly] | [optional] **postgradLoan** | **float** | [readonly] | [optional] +**studentLoan** | **float** | [readonly] | [optional] +**tax** | **float** | [readonly] | [optional] **taxCode** | **string** | [readonly] | [optional] +**taxYTD** | **float** | [readonly] | [optional] +**weekNumber** | **string** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11PayeTotalsLine.md b/docs/Model/P11PayeTotalsLine.md index bb8342a..9cb7d71 100644 --- a/docs/Model/P11PayeTotalsLine.md +++ b/docs/Model/P11PayeTotalsLine.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**studentLoan** | **float** | [readonly] | [optional] -**postgradLoan** | **float** | [readonly] | [optional] **pay** | **float** | [readonly] | [optional] -**totalPayToDate** | **float** | [readonly] | [optional] -**taxDueToDate** | **float** | [readonly] | [optional] +**postgradLoan** | **float** | [readonly] | [optional] +**studentLoan** | **float** | [readonly] | [optional] **taxDue** | **float** | [readonly] | [optional] +**taxDueToDate** | **float** | [readonly] | [optional] +**totalPayToDate** | **float** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11ReportResponse.md b/docs/Model/P11ReportResponse.md index 037aed6..aeceb5f 100644 --- a/docs/Model/P11ReportResponse.md +++ b/docs/Model/P11ReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\P11**](P11.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11dExpenses.md b/docs/Model/P11dExpenses.md index 8d57401..1e96de3 100644 --- a/docs/Model/P11dExpenses.md +++ b/docs/Model/P11dExpenses.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**travAndSub** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] **ent** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] **homeTel** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] **nonQualRel** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] **other** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] +**travAndSub** | [**\SynergiTech\Staffology\Model\P11DSingleItem**](P11DSingleItem.md) | | [optional] **typeLetter** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P11dVans.md b/docs/Model/P11dVans.md index c75fe91..7d6599a 100644 --- a/docs/Model/P11dVans.md +++ b/docs/Model/P11dVans.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**annValProRata** | **string** | | [optional] +**cashEquivOrRelevantAmt** | **string** | | [optional] +**costOrAmtForgone** | **string** | | [optional] +**desc** | **string** | | [optional] +**excess** | **string** | | [optional] **fuelCashEquivOrRelevantAmt** | **string** | | [optional] -**typeLetter** | **string** | | [optional] +**grossOrAmtForgone** | **string** | | [optional] +**madeGood** | **string** | | [optional] +**other** | **string** | | [optional] **taxablePmt** | **string** | | [optional] -**excess** | **string** | | [optional] **taxablePmtOrRelevantAmt** | **string** | | [optional] **tradingOrgInd** | **string** | | [optional] -**desc** | **string** | | [optional] -**other** | **string** | | [optional] -**annValProRata** | **string** | | [optional] -**grossOrAmtForgone** | **string** | | [optional] -**costOrAmtForgone** | **string** | | [optional] -**madeGood** | **string** | | [optional] -**cashEquivOrRelevantAmt** | **string** | | [optional] +**typeLetter** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P32.md b/docs/Model/P32.md index 2d31105..a1ac8ac 100644 --- a/docs/Model/P32.md +++ b/docs/Model/P32.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**isQuarterly** | **bool** | [readonly] | [optional] -**hmrcLiabilities** | [**\SynergiTech\Staffology\Model\HmrcLiability[]**](HmrcLiability.md) | [readonly] | [optional] **employerOpeningBalances** | [**\SynergiTech\Staffology\Model\EmployerOpeningBalances**](EmployerOpeningBalances.md) | | [optional] +**hmrcLiabilities** | [**\SynergiTech\Staffology\Model\HmrcLiability[]**](HmrcLiability.md) | [readonly] | [optional] +**isDraft** | **bool** | | [optional] +**isQuarterly** | **bool** | [readonly] | [optional] **openingBalancesTotals** | [**\SynergiTech\Staffology\Model\OpeningBalancesTotals**](OpeningBalancesTotals.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/P32ReportResponse.md b/docs/Model/P32ReportResponse.md index 37543c1..39531cb 100644 --- a/docs/Model/P32ReportResponse.md +++ b/docs/Model/P32ReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\P32**](P32.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisDocument.md b/docs/Model/PapdisDocument.md index 509cdd7..1dd2e2e 100644 --- a/docs/Model/PapdisDocument.md +++ b/docs/Model/PapdisDocument.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**isDraft** | **bool** | | [optional] **messageFunctionCode** | [**\SynergiTech\Staffology\Model\PapdisMessageFunctionCode**](PapdisMessageFunctionCode.md) | | [optional] -**version** | [**\SynergiTech\Staffology\Model\PapdisVersion**](PapdisVersion.md) | | [optional] **messageFunctionCodeInt** | **int** | [readonly] | [optional] **pensionProvider** | [**\SynergiTech\Staffology\Model\PapdisPensionProvider**](PapdisPensionProvider.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | [**\SynergiTech\Staffology\Model\PapdisVersion**](PapdisVersion.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisDocumentReportResponse.md b/docs/Model/PapdisDocumentReportResponse.md index d9cea60..5bd8110 100644 --- a/docs/Model/PapdisDocumentReportResponse.md +++ b/docs/Model/PapdisDocumentReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\PapdisDocument**](PapdisDocument.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisEmployee.md b/docs/Model/PapdisEmployee.md index 5e45aa7..cbd1547 100644 --- a/docs/Model/PapdisEmployee.md +++ b/docs/Model/PapdisEmployee.md @@ -4,26 +4,30 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | [readonly] | [optional] -**employeeId** | **string** | [readonly] | [optional] -**name** | [**\SynergiTech\Staffology\Model\PapdisEmployeeName**](PapdisEmployeeName.md) | | [optional] -**identity** | [**\SynergiTech\Staffology\Model\PapdisEmployeeIdentity**](PapdisEmployeeIdentity.md) | | [optional] -**contact** | [**\SynergiTech\Staffology\Model\PapdisEmployeeContact**](PapdisEmployeeContact.md) | | [optional] -**pay** | [**\SynergiTech\Staffology\Model\PapdisEmployeePay**](PapdisEmployeePay.md) | | [optional] +**aeStateDate** | **\DateTime** | | [optional] **assessment** | [**\SynergiTech\Staffology\Model\PapdisEmployeeAssessment**](PapdisEmployeeAssessment.md) | | [optional] +**contact** | [**\SynergiTech\Staffology\Model\PapdisEmployeeContact**](PapdisEmployeeContact.md) | | [optional] +**contractualJoinerIndicator** | **bool** | | [optional] **contribution** | [**\SynergiTech\Staffology\Model\PapdisEmployeeContribution**](PapdisEmployeeContribution.md) | | [optional] +**employeeId** | **string** | [readonly] | [optional] +**employeeRoleUniqueId** | **string** | | [optional] **exit** | [**\SynergiTech\Staffology\Model\PapdisEmployeeExit**](PapdisEmployeeExit.md) | | [optional] -**payrollCode** | **string** | [readonly] | [optional] -**aeStateDate** | **\DateTime** | | [optional] -**leaveDate** | **\DateTime** | | [optional] -**statePensionAge** | **int** | | [optional] -**contractualJoinerIndicator** | **bool** | | [optional] +**hasPrevioulyLeftPension** | **bool** | Flag indicating the employee has previously left the pension | [optional] +**id** | **int** | [readonly] | [optional] +**identity** | [**\SynergiTech\Staffology\Model\PapdisEmployeeIdentity**](PapdisEmployeeIdentity.md) | | [optional] +**isPreviousTaxYearRefund** | **bool** | Indicates whether the employee has a pension refund from the previous tax year. | [optional] **jobTitle** | **string** | | [optional] +**lastPaymentDate** | **\DateTime** | The last time the employee was paid | [optional] +**leaveDate** | **\DateTime** | | [optional] +**name** | [**\SynergiTech\Staffology\Model\PapdisEmployeeName**](PapdisEmployeeName.md) | | [optional] +**pay** | [**\SynergiTech\Staffology\Model\PapdisEmployeePay**](PapdisEmployeePay.md) | | [optional] +**payrollCode** | **string** | [readonly] | [optional] **pensionMemberReference** | **string** | | [optional] **pensionUniqueId** | **string** | | [optional] -**employeeRoleUniqueId** | **string** | | [optional] -**lastPaymentDate** | **\DateTime** | The last time the employee was paid | [optional] -**hasPrevioulyLeftPension** | **bool** | Flag indicating the employee has previously left the pension | [optional] **pensionablePayDefinition** | [**\SynergiTech\Staffology\Model\PensionablePayDefinition**](PensionablePayDefinition.md) | | [optional] +**statePensionAge** | **int** | | [optional] +**totalPreviousTaxYearRefundEmployeeAmount** | **float** | The total amount of pension refunds paid to the employee, calculated as the sum of all EmployeeRefund values from applicable PensionRefunds (when IsPreviousTaxYearRefund is enabled). | [optional] +**totalPreviousTaxYearRefundEmployeeAvcAmount** | **float** | The total amount of AVC (Additional Voluntary Contributions) refunds paid to the employee, calculated as the sum of all AdditionalVoluntaryContribution values from applicable PensionRefunds (when IsPreviousTaxYearRefund is enabled). | [optional] +**totalPreviousTaxYearRefundEmployerAmount** | **float** | The total amount of employer pension refunds, calculated as the sum of all EmployerRefund values from applicable PensionRefunds (when IsPreviousTaxYearRefund is enabled). | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisEmployeeAssessment.md b/docs/Model/PapdisEmployeeAssessment.md index e37f52b..814eb19 100644 --- a/docs/Model/PapdisEmployeeAssessment.md +++ b/docs/Model/PapdisEmployeeAssessment.md @@ -5,16 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **assessmentCode** | **int** | [readonly] | [optional] +**deferralDate** | **\DateTime** | [readonly] | [optional] +**enrolmentCommunicationsIssuedDate** | **\DateTime** | [readonly] | [optional] **eventCode** | **int** | [readonly] | [optional] **eventDate** | **\DateTime** | [readonly] | [optional] -**statutoryLetterCode** | **string** | [readonly] | [optional] **isIndividualAlreadyMemberOfQPS** | **bool** | [readonly] | [optional] -**deferralDate** | **\DateTime** | [readonly] | [optional] -**enrolmentCommunicationsIssuedDate** | **\DateTime** | [readonly] | [optional] -**workerExclusionCode** | **string** | [readonly] | [optional] -**reenrolmentIndicator** | **bool** | [readonly] | [optional] **optOutWindowEndDate** | **\DateTime** | [readonly] | [optional] **pensionJoinReason** | [**\SynergiTech\Staffology\Model\PensionJoinReason**](PensionJoinReason.md) | | [optional] **pensionStartDate** | **\DateTime** | [readonly] | [optional] +**reenrolmentIndicator** | **bool** | [readonly] | [optional] +**statutoryLetterCode** | **string** | [readonly] | [optional] +**workerExclusionCode** | **string** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisEmployeeContact.md b/docs/Model/PapdisEmployeeContact.md index 9e089ac..309698a 100644 --- a/docs/Model/PapdisEmployeeContact.md +++ b/docs/Model/PapdisEmployeeContact.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**postalAddress** | [**\SynergiTech\Staffology\Model\PapdisEmployeeContactPostalAddress**](PapdisEmployeeContactPostalAddress.md) | | [optional] **emailAddress** | **string** | [readonly] | [optional] +**mobile** | **string** | [readonly] | [optional] +**postalAddress** | [**\SynergiTech\Staffology\Model\PapdisEmployeeContactPostalAddress**](PapdisEmployeeContactPostalAddress.md) | | [optional] **secondaryEmailAddress** | **string** | [readonly] | [optional] **telephone** | **string** | [readonly] | [optional] -**mobile** | **string** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisEmployeeContactPostalAddress.md b/docs/Model/PapdisEmployeeContactPostalAddress.md index af6075c..fec5c92 100644 --- a/docs/Model/PapdisEmployeeContactPostalAddress.md +++ b/docs/Model/PapdisEmployeeContactPostalAddress.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **address2** | **string** | [readonly] | [optional] **address3** | **string** | [readonly] | [optional] **address4** | **string** | [readonly] | [optional] -**postcode** | **string** | [readonly] | [optional] **country** | **string** | [readonly] | [optional] +**postcode** | **string** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisEmployeeContribution.md b/docs/Model/PapdisEmployeeContribution.md index 41cd4b6..f2ae737 100644 --- a/docs/Model/PapdisEmployeeContribution.md +++ b/docs/Model/PapdisEmployeeContribution.md @@ -4,27 +4,28 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employerContributionsAmount** | **float** | [readonly] | [optional] -**employerContributionsPercent** | **float** | [readonly] | [optional] -**employeeContributionsAmount** | **float** | [readonly] | [optional] -**employeeContributionsPercent** | **float** | [readonly] | [optional] **additionalVoluntaryContributionsAmount** | **float** | [readonly] | [optional] **additionalVoluntaryContributionsPercent** | **float** | [readonly] | [optional] -**salarySacrificeIndicator** | **bool** | [readonly] | [optional] +**assumedPensionablePay** | **float** | [readonly] | [optional] +**contributionLevelType** | [**\SynergiTech\Staffology\Model\PensionContributionLevelType**](PensionContributionLevelType.md) | | [optional] **contributionStartDate** | **\DateTime** | [readonly] | [optional] **employeeContributionIsPercentage** | **bool** | [readonly] | [optional] +**employeeContributionsAmount** | **float** | [readonly] | [optional] +**employeeContributionsPercent** | **float** | [readonly] | [optional] +**employerContributionIncludesNiSaving** | **bool** | [readonly] | [optional] **employerContributionIsPercentage** | **bool** | [readonly] | [optional] -**unadjustedEmployeeContributionsAmount** | **float** | [readonly] | [optional] -**unadjustedEmployerContributionsAmount** | **float** | [readonly] | [optional] -**unadjustedAdditionalVoluntaryContributionsAmount** | **float** | [readonly] | [optional] **employerContributionNiSavings** | **float** | [readonly] | [optional] -**contributionLevelType** | [**\SynergiTech\Staffology\Model\PensionContributionLevelType**](PensionContributionLevelType.md) | | [optional] +**employerContributionsAmount** | **float** | [readonly] | [optional] +**employerContributionsPercent** | **float** | [readonly] | [optional] **isAvcOnly** | **bool** | [readonly] | [optional] -**employerContributionIncludesNiSaving** | **bool** | [readonly] | [optional] -**unadjustedAdditionalVoluntaryContributionsPercent** | **float** | [readonly] | [optional] **isHalfContributionMember** | **bool** | [readonly] | [optional] -**assumedPensionablePay** | **float** | [readonly] | [optional] +**isPensionAvcPayLine** | **bool** | Indicates whether the pay run entry includes a pension AVC pay line. | [optional] **isPensionRefund** | **bool** | [readonly] | [optional] **lowerLimit** | **float** | [readonly] | [optional] +**salarySacrificeIndicator** | **bool** | [readonly] | [optional] +**unadjustedAdditionalVoluntaryContributionsAmount** | **float** | [readonly] | [optional] +**unadjustedAdditionalVoluntaryContributionsPercent** | **float** | [readonly] | [optional] +**unadjustedEmployeeContributionsAmount** | **float** | [readonly] | [optional] +**unadjustedEmployerContributionsAmount** | **float** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisEmployeeExit.md b/docs/Model/PapdisEmployeeExit.md index 6ac3336..c825552 100644 --- a/docs/Model/PapdisEmployeeExit.md +++ b/docs/Model/PapdisEmployeeExit.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**exitDate** | **\DateTime** | [readonly] | [optional] -**exitReasonCode** | **int** | [readonly] | [optional] **aeOptOutDate** | **\DateTime** | [readonly] | [optional] **aeOptOutReference** | **string** | [readonly] | [optional] +**exitDate** | **\DateTime** | [readonly] | [optional] +**exitReasonCode** | **int** | [readonly] | [optional] **reasonForLeaving** | **string** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisEmployeeIdentity.md b/docs/Model/PapdisEmployeeIdentity.md index ca71fd9..dd7ae30 100644 --- a/docs/Model/PapdisEmployeeIdentity.md +++ b/docs/Model/PapdisEmployeeIdentity.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employeeId** | **string** | [readonly] | [optional] **birthDate** | **\DateTime** | [readonly] | [optional] -**gender** | **string** | [readonly] | [optional] -**nationalInsuranceNumber** | **string** | [readonly] | [optional] +**employeeId** | **string** | [readonly] | [optional] **employmentStartDate** | **\DateTime** | [readonly] | [optional] +**gender** | **string** | [readonly] | [optional] **maritalStatus** | [**\SynergiTech\Staffology\Model\MaritalStatus**](MaritalStatus.md) | | [optional] +**nationalInsuranceNumber** | **string** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisEmployeeName.md b/docs/Model/PapdisEmployeeName.md index ab4467c..0f98e83 100644 --- a/docs/Model/PapdisEmployeeName.md +++ b/docs/Model/PapdisEmployeeName.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | [readonly] | [optional] **forename1** | **string** | [readonly] | [optional] **forename2** | **string** | [readonly] | [optional] **surname** | **string** | [readonly] | [optional] +**title** | **string** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisEmployeePay.md b/docs/Model/PapdisEmployeePay.md index 7a32943..1336a5f 100644 --- a/docs/Model/PapdisEmployeePay.md +++ b/docs/Model/PapdisEmployeePay.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pensionableEarningsAmount** | **float** | [readonly] | [optional] -**totalGrossQualifyingEarningsAmount** | **float** | [readonly] | [optional] -**annualSalary** | **float** | [readonly] | [optional] **annualPensionableEarningsAmount** | **float** | [readonly] | [optional] +**annualSalary** | **float** | [readonly] | [optional] **basis** | [**\SynergiTech\Staffology\Model\PayBasis**](PayBasis.md) | | [optional] **payAmountMultiplier** | **float** | [readonly] | [optional] +**pensionableEarningsAmount** | **float** | [readonly] | [optional] +**totalGrossQualifyingEarningsAmount** | **float** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisEmployer.md b/docs/Model/PapdisEmployer.md index 713f40e..f26201c 100644 --- a/docs/Model/PapdisEmployer.md +++ b/docs/Model/PapdisEmployer.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pensionRule** | [**\SynergiTech\Staffology\Model\PensionRule**](PensionRule.md) | | [optional] -**employerId** | **string** | [readonly] Taken from the papdisEmployerId property of the PensionProvider | [optional] -**group** | **string** | [readonly] Taken from the papdisGroup property of the WorkerGroup | [optional] -**subGroup** | **string** | [readonly] Taken from the papdisSubGroup property of the WorkerGroup | [optional] -**payrollPeriod** | [**\SynergiTech\Staffology\Model\PapdisPayrollPeriod**](PapdisPayrollPeriod.md) | | [optional] -**stagingDate** | **\DateTime** | [readonly] | [optional] +**contractedWeeks** | **float** | [readonly] | [optional] **cyclicalReenrolmentDate** | **\DateTime** | [readonly] | [optional] -**name** | **string** | [readonly] | [optional] -**postalAddress** | [**\SynergiTech\Staffology\Model\PapdisEmployerContactPostalAddress**](PapdisEmployerContactPostalAddress.md) | | [optional] +**employerId** | **string** | [readonly] Taken from the papdisEmployerId property of the PensionProvider | [optional] **fullTimeContractedHours** | **float** | [readonly] | [optional] **fullTimeContractedWeeks** | **float** | [readonly] | [optional] -**contractedWeeks** | **float** | [readonly] | [optional] +**group** | **string** | [readonly] Taken from the papdisGroup property of the WorkerGroup | [optional] **id** | **int** | [readonly] | [optional] +**name** | **string** | [readonly] | [optional] +**payrollPeriod** | [**\SynergiTech\Staffology\Model\PapdisPayrollPeriod**](PapdisPayrollPeriod.md) | | [optional] +**pensionRule** | [**\SynergiTech\Staffology\Model\PensionRule**](PensionRule.md) | | [optional] +**postalAddress** | [**\SynergiTech\Staffology\Model\PapdisEmployerContactPostalAddress**](PapdisEmployerContactPostalAddress.md) | | [optional] +**stagingDate** | **\DateTime** | [readonly] | [optional] +**subGroup** | **string** | [readonly] Taken from the papdisSubGroup property of the WorkerGroup | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisEmployerContactPostalAddress.md b/docs/Model/PapdisEmployerContactPostalAddress.md index aaaaf4e..c13f523 100644 --- a/docs/Model/PapdisEmployerContactPostalAddress.md +++ b/docs/Model/PapdisEmployerContactPostalAddress.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **address2** | **string** | [readonly] | [optional] **address3** | **string** | [readonly] | [optional] **address4** | **string** | [readonly] | [optional] -**postcode** | **string** | [readonly] | [optional] **country** | **string** | [readonly] | [optional] +**postcode** | **string** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisPayrollPeriod.md b/docs/Model/PapdisPayrollPeriod.md index f3c85cd..5b3f997 100644 --- a/docs/Model/PapdisPayrollPeriod.md +++ b/docs/Model/PapdisPayrollPeriod.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payPeriodStartDate** | **\DateTime** | [readonly] | [optional] -**payPeriodEndDate** | **\DateTime** | [readonly] | [optional] **contributionDeductionDate** | **\DateTime** | [readonly] | [optional] +**employees** | [**\SynergiTech\Staffology\Model\PapdisEmployee[]**](PapdisEmployee.md) | [readonly] Employees and contributions made in this period | [optional] **frequencyCode** | **string** | [readonly] | [optional] -**taxPeriod** | **int** | [readonly] | [optional] -**payReferenceStartDate** | **\DateTime** | [readonly] | [optional] +**payPeriodEndDate** | **\DateTime** | [readonly] | [optional] +**payPeriodStartDate** | **\DateTime** | [readonly] | [optional] **payReferenceEndDate** | **\DateTime** | [readonly] | [optional] -**employees** | [**\SynergiTech\Staffology\Model\PapdisEmployee[]**](PapdisEmployee.md) | [readonly] Employees and contributions made in this period | [optional] +**payReferenceStartDate** | **\DateTime** | [readonly] | [optional] +**taxPeriod** | **int** | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PapdisPensionProvider.md b/docs/Model/PapdisPensionProvider.md index 04d7cc6..f3d2e97 100644 --- a/docs/Model/PapdisPensionProvider.md +++ b/docs/Model/PapdisPensionProvider.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pensionProviderId** | **string** | [readonly] Taken from the papdisProviderId property of the PensionProvider | [optional] -**employers** | [**\SynergiTech\Staffology\Model\PapdisEmployer[]**](PapdisEmployer.md) | | [optional] **accountNo** | **string** | [readonly] | [optional] +**employers** | [**\SynergiTech\Staffology\Model\PapdisEmployer[]**](PapdisEmployer.md) | | [optional] +**pensionProviderId** | **string** | [readonly] Taken from the papdisProviderId property of the PensionProvider | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayCode.md b/docs/Model/PayCode.md index 4cd374f..5d62eb9 100644 --- a/docs/Model/PayCode.md +++ b/docs/Model/PayCode.md @@ -4,32 +4,32 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | | +**calculationType** | [**\SynergiTech\Staffology\Model\PayCodeCalculationType**](PayCodeCalculationType.md) | | [optional] **code** | **string** | | +**dailyRateMultiplier** | **float** | If the MultiplierType is MultipleOfDailyRate then this sets the multiple to be used, ie 1.5 | [optional] **defaultValue** | **float** | If a non-zero value is provided then when this code is selected in our UI the value will be automatically filled. | [optional] +**flexibleDrawdown** | [**\SynergiTech\Staffology\Model\FlexibleDrawdown**](FlexibleDrawdown.md) | | [optional] +**hourlyRateMultiplier** | **float** | If the MultiplierType is MultipleOfHourlyRate then this sets the multiple to be used, ie 1.5 | [optional] +**isAttachable** | **bool** | Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the attachable pay for AttachmentOrders. | [optional] +**isAutoAdjust** | **bool** | Can be used to inform a User to what default value to set for PayLine.autoAdjustForLeave for new lines created. | [optional] +**isControlCode** | **bool** | [readonly] Control Codes cannot be deleted or edited nor can PayLines be assigned to them. | [optional] **isDeduction** | **bool** | If set to true then a PayLine using this code will be treated as a deduction as opposed to an addition. | [optional] **isNiable** | **bool** | Determines whether or not the value of PayLines using this code should be taken into consideration when calculating National Insurance Contributions. | [optional] -**isTaxable** | **bool** | Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the PAYE liability. | [optional] -**isPensionable** | **bool** | Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the total pensionable pay. | [optional] -**isAttachable** | **bool** | Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the attachable pay for AttachmentOrders. | [optional] -**isRealTimeClass1aNiable** | **bool** | Determines whether or not the value of PayLines using this code are subject to real time Class 1A NIC. | [optional] **isNotContributingToHolidayPay** | **bool** | If true then any payments made using this code will not contribute towards holiday pay calculations. | [optional] -**isQualifyingEarningsForAe** | **bool** | If true then any payments made using this code will be used as the basis for calculating QualifyingEarnings for AutoEnrolment assessments. If it is set to null then when it's next retrieved it'll have the same value as PensionablePay | [optional] **isNotTierable** | **bool** | If true then any payments made using this code will not be included when calculating the tier an employee should be on for a Tiered Pension. | [optional] -**isTcpTcls** | **bool** | If true then any payments made using this code will be reported as a Trivial Commutation Payment (A - TCLS) | [optional] -**isTcpPp** | **bool** | If true then any payments made using this code will be reported as a Trivial Commutation Payment (B - Personal Pension) | [optional] -**isTcpOp** | **bool** | If true then any payments made using this code will be reported as a Trivial Commutation Payment (C - Occupational Pension) | [optional] -**flexibleDrawdown** | [**\SynergiTech\Staffology\Model\FlexibleDrawdown**](FlexibleDrawdown.md) | | [optional] -**isAutoAdjust** | **bool** | Can be used to inform a User to what default value to set for PayLine.autoAdjustForLeave for new lines created. | [optional] -**calculationType** | [**\SynergiTech\Staffology\Model\PayCodeCalculationType**](PayCodeCalculationType.md) | | [optional] -**multiplierType** | [**\SynergiTech\Staffology\Model\PayCodeMultiplierType**](PayCodeMultiplierType.md) | | [optional] -**dailyRateMultiplier** | **float** | If the MultiplierType is MultipleOfDailyRate then this sets the multiple to be used, ie 1.5 | [optional] -**hourlyRateMultiplier** | **float** | If the MultiplierType is MultipleOfHourlyRate then this sets the multiple to be used, ie 1.5 | [optional] -**isSystemCode** | **bool** | [readonly] System Codes cannot be deleted or edited | [optional] -**isControlCode** | **bool** | [readonly] Control Codes cannot be deleted or edited nor can PayLines be assigned to them. | [optional] **isNotional** | **bool** | Determines whether the transaction involves non-monetary benefits for payroll processing, potentially subject to tax and National Insurance. | [optional] -**isStandAloneLumpSum** | **bool** | If true then any payments made using this code will be reported as a Lump Sums (A - SALS) | [optional] **isPensionExcessLumpSum** | **bool** | If true then any payments made using this code will be reported as a Lump Sums (B - PCELS) | [optional] +**isPensionable** | **bool** | Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the total pensionable pay. | [optional] +**isQualifyingEarningsForAe** | **bool** | If true then any payments made using this code will be used as the basis for calculating QualifyingEarnings for AutoEnrolment assessments. If it is set to null then when it's next retrieved it'll have the same value as PensionablePay | [optional] +**isRealTimeClass1aNiable** | **bool** | Determines whether or not the value of PayLines using this code are subject to real time Class 1A NIC. | [optional] +**isStandAloneLumpSum** | **bool** | If true then any payments made using this code will be reported as a Lump Sums (A - SALS) | [optional] +**isSystemCode** | **bool** | [readonly] System Codes cannot be deleted or edited | [optional] +**isTaxable** | **bool** | Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the PAYE liability. | [optional] +**isTcpOp** | **bool** | If true then any payments made using this code will be reported as a Trivial Commutation Payment (C - Occupational Pension) | [optional] +**isTcpPp** | **bool** | If true then any payments made using this code will be reported as a Trivial Commutation Payment (B - Personal Pension) | [optional] +**isTcpTcls** | **bool** | If true then any payments made using this code will be reported as a Trivial Commutation Payment (A - TCLS) | [optional] +**multiplierType** | [**\SynergiTech\Staffology\Model\PayCodeMultiplierType**](PayCodeMultiplierType.md) | | [optional] **payee** | **string** | The Id of the Payee, if any, that deductions are to be paid to. | [optional] +**title** | **string** | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayCodeSet.md b/docs/Model/PayCodeSet.md index a95426f..75d1fa7 100644 --- a/docs/Model/PayCodeSet.md +++ b/docs/Model/PayCodeSet.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**lgpsPayCategory** | [**\SynergiTech\Staffology\Model\LgpsPayCategory**](LgpsPayCategory.md) | | [optional] +**mcrPayCategory** | [**\SynergiTech\Staffology\Model\McrPayCategory**](McrPayCategory.md) | | [optional] **name** | **string** | The name of this PayCodeSet | **payCodes** | **string[]** | The Code of any PayCodes included in this PayCodeSet | [optional] -**useForMcr** | **bool** | | [optional] -**mcrPayCategory** | [**\SynergiTech\Staffology\Model\McrPayCategory**](McrPayCategory.md) | | [optional] **useForLgps** | **bool** | Flag indicating if this PayCodeSet will be used for LGPS pay categorisation | [optional] -**lgpsPayCategory** | [**\SynergiTech\Staffology\Model\LgpsPayCategory**](LgpsPayCategory.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**useForMcr** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayElementReport.md b/docs/Model/PayElementReport.md index 8cbc839..acdb128 100644 --- a/docs/Model/PayElementReport.md +++ b/docs/Model/PayElementReport.md @@ -4,20 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\PayElementReportLine[]**](PayElementReportLine.md) | | [optional] +**ordinal** | **int** | | [optional] **payCodeTotals** | **array** | | [optional] [readonly] -**employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**ordinal** | **int** | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayElementReportLine.md b/docs/Model/PayElementReportLine.md index e11b9d7..f65a738 100644 --- a/docs/Model/PayElementReportLine.md +++ b/docs/Model/PayElementReportLine.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payrollCode** | **string** | | [optional] +**hasPay** | **bool** | | [optional] [readonly] **niNumber** | **string** | | [optional] **payElements** | **array** | | [optional] -**hasPay** | **bool** | | [optional] [readonly] +**payrollCode** | **string** | | [optional] **totalPay** | **float** | | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayElementReportReportResponse.md b/docs/Model/PayElementReportReportResponse.md index 7df848c..ff50135 100644 --- a/docs/Model/PayElementReportReportResponse.md +++ b/docs/Model/PayElementReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\PayElementReport**](PayElementReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayGradesReport.md b/docs/Model/PayGradesReport.md index 115abc4..dc82507 100644 --- a/docs/Model/PayGradesReport.md +++ b/docs/Model/PayGradesReport.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\AveragePayGradesReportLine[]**](AveragePayGradesReportLine.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayGradesReportReportResponse.md b/docs/Model/PayGradesReportReportResponse.md index 7a146a8..25b529c 100644 --- a/docs/Model/PayGradesReportReportResponse.md +++ b/docs/Model/PayGradesReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\PayGradesReport**](PayGradesReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayLine.md b/docs/Model/PayLine.md index e049211..e2b23f0 100644 --- a/docs/Model/PayLine.md +++ b/docs/Model/PayLine.md @@ -4,59 +4,63 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **float** | The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used). If the PayCode has a CalculationType other than FixedAmount then this field will be a percentage. If the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated. | [optional] -**rate** | **float** | If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used | [optional] -**multiplier** | **float** | If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours | [optional] -**description** | **string** | A free form description to accompany this line. It will be displayed on the payslip. | [optional] +**analysisCategoriesCodes** | [**\SynergiTech\Staffology\Model\AnalysisCategoryCodes[]**](AnalysisCategoryCodes.md) | List of analysis Category Codes | [optional] +**analysisCategoryCodeIds** | **string[]** | List of analysis Category Codes uniqueId | [optional] +**annualValue** | **float** | The original value from the PayLine before we modify it Currently only used when CalculationType is set to FixedAnnualAmount so we can determine whether the pay line value needs calculating or not To recalculate set to null with annual amount recorded in Value | [optional] **attachmentOrderId** | **string** | [readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO | [optional] -**pensionId** | **string** | [readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS | [optional] -**leaveId** | **string** | [readonly] The Id of the associated Leave. Only included if the PayLine is a result of a Leave with Statutory pay | [optional] -**loanId** | **string** | [readonly] The Id of the associated Loan, if any. | [optional] -**leaveStatutoryDaysPaid** | **float** | [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many days they've been paid for (based on their Working Pattern). | [optional] -**leaveStatutoryWeeksPaid** | **float** | [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many weeks they've been paid for (based on their Working Pattern). | [optional] -**code** | **string** | The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition. | [optional] -**tags** | **string[]** | | [optional] +**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] +**benefitId** | **int** | | [optional] +**calculateAsWhenPaid** | **bool** | Indicates whether this pay line should be treated as When Paid rather than When Earned | [optional] **childId** | **string** | This is nothing but the UniqueId of the model. | [optional] -**isNetToGross** | **bool** | If the PayLine is a fixed amount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. | [optional] -**targetNetToGrossValue** | **float** | The original net fixed addition amount that is considered to be a take home pay target. | [optional] -**netToGrossDiscrepancy** | **float** | The discrepancy between the targeted and the calculated grossed up value during a net to gross calculation. | [optional] -**effectiveFrom** | **\DateTime** | The date the pay line starts being calculated in payrun | [optional] -**effectiveTo** | **\DateTime** | The date the pay line stops being calculated in payrun | [optional] -**department** | **string** | | [optional] -**departmentTitle** | **string** | | [optional] +**code** | **string** | The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition. | [optional] +**contributesToBasicPay** | **bool** | Indicates whether this pay line contributes to the basic pay of the employee. Will be set to true by default when IsAutoGeneratedBasicPayLine is true. | [optional] **costCentre** | **string** | | [optional] +**costCentreId** | **string** | | [optional] **costCentreTitle** | **string** | | [optional] +**department** | **string** | | [optional] **departmentId** | **string** | | [optional] -**costCentreId** | **string** | | [optional] -**isAutoGeneratedBasicPayLine** | **bool** | | [optional] -**percentageOfEffectiveDays** | **float** | The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun | [optional] -**totalWorkingDays** | **float** | | [optional] -**isAutomaticBackPay** | **bool** | Automatically calculate back pay and add or modify the necessary pay lines for this addition/deduction when a pay run is created. Applicable only to employee level addition/deduction pay lines. If set to false then you must manually handle the calculation and adding of back pay lines. | [optional] -**ignoreInitialBackPay** | **bool** | Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology. If set to false, the automatic backpay calculation will be performed on the first pay run. | [optional] -**initialBackPayPublicPayRunId** | **string** | Used to mark the first payrun where this payline has been payrolled for backpay | [optional] -**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] -**contributesToBasicPay** | **bool** | Indicates whether this pay line contributes to the basic pay of the employee. Will be set to true by default when IsAutoGeneratedBasicPayLine is true. | [optional] -**calculateAsWhenPaid** | **bool** | Indicates whether this pay line should be treated as When Paid rather than When Earned | [optional] -**totalPaidDays** | **float** | | [optional] -**roleId** | **string** | The employee role which is associated with this pay line. If set to null, the pay line is not related with a role. | [optional] -**employeeRoleReference** | **string** | | [optional] +**departmentTitle** | **string** | | [optional] +**description** | **string** | A free form description to accompany this line. It will be displayed on the payslip. | [optional] **earnedFrom** | **\DateTime** | Nullable DateTime property \"EarnedFrom\" in the PayLine model to store the start date of the PayLine's 'earned' period in a PayRun. | [optional] **earnedTo** | **\DateTime** | Nullable DateTime property \"EarnedTo\" in the PayLine model to store the end date of the PayLine's 'earned' period in a PayRun. | [optional] -**periodFrom** | **\DateTime** | Nullable DateTime property \"PeriodFrom\" in the PayLine model to store the start date of the PayRun period the current PayLine is part of. | [optional] -**periodTo** | **\DateTime** | Nullable DateTime property \"PeriodTo\" in the PayLine model to store the end date of the PayRun period the current PayLine is part of. | [optional] -**annualValue** | **float** | The original value from the PayLine before we modify it Currently only used when CalculationType is set to FixedAnnualAmount so we can determine whether the pay line value needs calculating or not To recalculate set to null with annual amount recorded in Value | [optional] -**parentId** | **string** | [readonly] The Id of the associated employee level pay line, if the current line is a back pay line. | [optional] +**effectiveFrom** | **\DateTime** | The date the pay line starts being calculated in payrun | [optional] +**effectiveTo** | **\DateTime** | The date the pay line stops being calculated in payrun | [optional] +**employeeRoleReference** | **string** | | [optional] +**fullTimeAnnualValue** | **float** | Used to set Full Time Annual Value for payline | [optional] +**ignoreInitialBackPay** | **bool** | Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology. If set to false, the automatic backpay calculation will be performed on the first pay run. | [optional] +**importIdempotencyKey** | **string** | Deterministic GUID used for import idempotency tracking. Generated from: blobScope|employerUniqueId|payrollCode|lineIndex | [optional] +**initialBackPayPublicPayRunId** | **string** | Used to mark the first payrun where this payline has been payrolled for backpay | [optional] **isAutoCalculatedBackPayLine** | **bool** | | [optional] [readonly] +**isAutoGeneratedBasicPayLine** | **bool** | | [optional] +**isAutomaticBackPay** | **bool** | Automatically calculate back pay and add or modify the necessary pay lines for this addition/deduction when a pay run is created. Applicable only to employee level addition/deduction pay lines. If set to false then you must manually handle the calculation and adding of back pay lines. | [optional] +**isNetToGross** | **bool** | If the PayLine is a fixed amount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. | [optional] +**isTaxable** | **bool** | | [optional] **isZeroHoursTeachersBackPayLine** | **bool** | [readonly] Indicates whether this pay line is a backdated pay claim line belonging to a zero hours contract teacher. | [optional] -**analysisCategoriesCodes** | [**\SynergiTech\Staffology\Model\AnalysisCategoryCodes[]**](AnalysisCategoryCodes.md) | List of analysis Category Codes | [optional] -**analysisCategoryCodeIds** | **string[]** | List of analysis Category Codes uniqueId | [optional] -**paySpineId** | **string** | [readonly] The Id of the associated pay spine. | [optional] -**paySpineGradeId** | **string** | [readonly] The Id of the associated pay spine grade. | [optional] -**spinalPointId** | **string** | [readonly] The Id of the associated spinal point. | [optional] +**leaveId** | **string** | [readonly] The Id of the associated Leave. Only included if the PayLine is a result of a Leave with Statutory pay | [optional] +**leaveStatutoryDaysPaid** | **float** | [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many days they've been paid for (based on their Working Pattern). | [optional] +**leaveStatutoryWeeksPaid** | **float** | [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many weeks they've been paid for (based on their Working Pattern). | [optional] +**loanId** | **string** | [readonly] The Id of the associated Loan, if any. | [optional] **londonAllowanceId** | **int** | Used to set London allowance id for payline | [optional] -**fullTimeAnnualValue** | **float** | Used to set Full Time Annual Value for payline | [optional] -**paySpine** | **string** | PaySpine name based on PaySpineId | [optional] +**multiplier** | **float** | If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours | [optional] +**netToGrossDiscrepancy** | **float** | The discrepancy between the targeted and the calculated grossed up value during a net to gross calculation. | [optional] +**parentId** | **string** | [readonly] The Id of the associated employee level pay line, if the current line is a back pay line. | [optional] **payGrade** | **string** | PayGrade name based on PayGradeId | [optional] +**paySpine** | **string** | PaySpine name based on PaySpineId | [optional] +**paySpineGradeId** | **string** | [readonly] The Id of the associated pay spine grade. | [optional] +**paySpineId** | **string** | [readonly] The Id of the associated pay spine. | [optional] +**payrollCode** | **string** | | [optional] +**pensionId** | **string** | [readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS | [optional] +**percentageOfEffectiveDays** | **float** | The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun | [optional] +**periodFrom** | **\DateTime** | Nullable DateTime property \"PeriodFrom\" in the PayLine model to store the start date of the PayRun period the current PayLine is part of. | [optional] +**periodTo** | **\DateTime** | Nullable DateTime property \"PeriodTo\" in the PayLine model to store the end date of the PayRun period the current PayLine is part of. | [optional] +**rate** | **float** | If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used | [optional] +**roleId** | **string** | The employee role which is associated with this pay line. If set to null, the pay line is not related with a role. | [optional] +**spinalPointId** | **string** | [readonly] The Id of the associated spinal point. | [optional] **spinePoint** | **string** | SpinePoint name based on SpinePointId | [optional] +**tags** | **string[]** | | [optional] +**targetNetToGrossValue** | **float** | The original net fixed addition amount that is considered to be a take home pay target. | [optional] +**totalPaidDays** | **float** | | [optional] +**totalWorkingDays** | **float** | | [optional] +**value** | **float** | The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used). If the PayCode has a CalculationType other than FixedAmount then this field will be a percentage. If the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayOptions.md b/docs/Model/PayOptions.md index d74733d..bed5e93 100644 --- a/docs/Model/PayOptions.md +++ b/docs/Model/PayOptions.md @@ -4,26 +4,26 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**period** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**ordinal** | **int** | Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod. | [optional] -**method** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] -**withholdTaxRefundIfPayIsZero** | **bool** | If you don't want negative PAYE values when the Gross pay is zero, set this to true | [optional] -**taxAndNi** | [**\SynergiTech\Staffology\Model\TaxAndNi**](TaxAndNi.md) | | [optional] -**fpsFields** | [**\SynergiTech\Staffology\Model\FpsFields**](FpsFields.md) | | [optional] -**tags** | **string[]** | | [optional] +**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] +**baseDailyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] +**baseHourlyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] +**basicPay** | **float** | The amount of basic pay the Employee is regularly paid each period This amount is the combined total of all pay elements that contribute to basic pay | [optional] **basis** | [**\SynergiTech\Staffology\Model\PayBasis**](PayBasis.md) | | [optional] -**nationalMinimumWage** | **bool** | | [optional] -**payCode** | **string** | If you want the Employees pay to be allocated to a code other than BASIC, specify it here | [optional] -**mileageVehicleType** | [**\SynergiTech\Staffology\Model\MileageVehicleType**](MileageVehicleType.md) | | [optional] +**excludedRegularPayLines** | [**\SynergiTech\Staffology\Model\PayLine[]**](PayLine.md) | These used to store the PayLines that have been excluded from RegularPaylines. | [optional] +**fpsFields** | [**\SynergiTech\Staffology\Model\FpsFields**](FpsFields.md) | | [optional] **mapsMiles** | **int** | The number of miles to pay for as Mileage Allowance Payments | [optional] +**method** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] +**mileageVehicleType** | [**\SynergiTech\Staffology\Model\MileageVehicleType**](MileageVehicleType.md) | | [optional] +**nationalMinimumWage** | **bool** | | [optional] +**niTable** | **string** | | [optional] +**ordinal** | **int** | Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod. | [optional] **payAmount** | **float** | The amount the Employee is regularly paid each period | [optional] **payAmountMultiplier** | **float** | This property is irrelevant if the basis is Monthly. But if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period. | [optional] -**baseHourlyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] -**baseDailyRate** | **float** | This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields | [optional] -**basicPay** | **float** | The amount of basic pay the Employee is regularly paid each period This amount is the combined total of all pay elements that contribute to basic pay | [optional] -**autoAdjustForLeave** | **bool** | This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun | [optional] -**niTable** | **string** | | [optional] +**payCode** | **string** | If you want the Employees pay to be allocated to a code other than BASIC, specify it here | [optional] +**period** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **regularPayLines** | [**\SynergiTech\Staffology\Model\PayLine[]**](PayLine.md) | These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. | [optional] -**excludedRegularPayLines** | [**\SynergiTech\Staffology\Model\PayLine[]**](PayLine.md) | These used to store the PayLines that have been excluded from RegularPaylines. | [optional] +**tags** | **string[]** | | [optional] +**taxAndNi** | [**\SynergiTech\Staffology\Model\TaxAndNi**](TaxAndNi.md) | | [optional] +**withholdTaxRefundIfPayIsZero** | **bool** | If you don't want negative PAYE values when the Gross pay is zero, set this to true | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayOptionsImport.md b/docs/Model/PayOptionsImport.md index 9692e23..aaa8b35 100644 --- a/docs/Model/PayOptionsImport.md +++ b/docs/Model/PayOptionsImport.md @@ -4,28 +4,28 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employerIdentifier** | **string** | Optional. But if one entry has it then all must. Allows you to import to multiple employers by specifying the Employers AlternativeIdentifier | [optional] -**payrollCode** | **string** | The payroll code of the employee to update | [optional] -**payAmount** | **float** | The amount the Employee is regularly paid each period | [optional] +**analysisCategoryCodes** | [**\SynergiTech\Staffology\Model\AnalysisCategoryCodes[]**](AnalysisCategoryCodes.md) | List of Analysis Category Codes associated with this item on the payslip. | [optional] +**autoAdjustForLeave** | **bool** | AutoAdjustForLeave for imported pay lines | [optional] **basis** | [**\SynergiTech\Staffology\Model\PayBasis**](PayBasis.md) | | [optional] -**payCode** | **string** | If you want to override the PayCode used for the Basic Pay then set the code here, otherwise leave this blank and the default will be used. | [optional] -**roleReference** | **string** | This is the unique reference of the Role that the employee is assigned to. | [optional] -**payAmountMultiplier** | **float** | This property is irrelevant if the basis is Monthly. But if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period. | [optional] -**note** | **string** | Any note that you'd like to appear on the payslip | [optional] -**tags** | **string[]** | | [optional] -**isNetToGross** | **bool** | | [optional] -**department** | **string** | Any Department that you'd like to appear on the payslip | [optional] +**contributesToBasicPay** | **bool** | ContributesToBasicPay for imported pay lines | [optional] **costCentre** | **string** | Any CostCentre that you'd like to appear on the payslip | [optional] -**analysisCategoryCodes** | [**\SynergiTech\Staffology\Model\AnalysisCategoryCodes[]**](AnalysisCategoryCodes.md) | List of Analysis Category Codes associated with this item on the payslip. | [optional] -**lines** | [**\SynergiTech\Staffology\Model\PayLine[]**](PayLine.md) | | [optional] +**department** | **string** | Any Department that you'd like to appear on the payslip | [optional] **effectiveFrom** | **\DateTime** | EffectiveFrom date for imported pay lines | [optional] **effectiveTo** | **\DateTime** | EffectiveTo date for imported pay lines | [optional] -**isAutomaticBackPay** | **bool** | IsAutomaticBackPay for imported pay lines | [optional] +**employerIdentifier** | **string** | Optional. But if one entry has it then all must. Allows you to import to multiple employers by specifying the Employers AlternativeIdentifier | [optional] **ignoreInitialBackPay** | **bool** | IgnoreInitialBackPay for imported pay lines | [optional] -**contributesToBasicPay** | **bool** | ContributesToBasicPay for imported pay lines | [optional] -**autoAdjustForLeave** | **bool** | AutoAdjustForLeave for imported pay lines | [optional] -**paySpine** | **string** | PaySpine for imported pay lines | [optional] +**isAutomaticBackPay** | **bool** | IsAutomaticBackPay for imported pay lines | [optional] +**isNetToGross** | **bool** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\PayLine[]**](PayLine.md) | | [optional] +**note** | **string** | Any note that you'd like to appear on the payslip | [optional] +**payAmount** | **float** | The amount the Employee is regularly paid each period | [optional] +**payAmountMultiplier** | **float** | This property is irrelevant if the basis is Monthly. But if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period. | [optional] +**payCode** | **string** | If you want to override the PayCode used for the Basic Pay then set the code here, otherwise leave this blank and the default will be used. | [optional] **payGrade** | **string** | PayGrade for imported pay lines | [optional] +**paySpine** | **string** | PaySpine for imported pay lines | [optional] +**payrollCode** | **string** | The payroll code of the employee to update | [optional] +**roleReference** | **string** | This is the unique reference of the Role that the employee is assigned to. | [optional] **spinePoint** | **string** | SpinePoint for imported pay lines | [optional] +**tags** | **string[]** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayRun.md b/docs/Model/PayRun.md index 04b5f42..5f80a1d 100644 --- a/docs/Model/PayRun.md +++ b/docs/Model/PayRun.md @@ -4,24 +4,31 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**taxMonth** | **int** | [readonly] The Tax Month that the Payment Date falls in | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**autoPilotCloseDate** | **\DateTime** | [readonly] If AutoPilot is enabled in the AutomationSettings for the Employer then this property will tell you when the payrun will be automatically closed | [optional] +**dateClosed** | **\DateTime** | | [optional] +**description** | **string** | Description of the current version of the PayRun. | [optional] +**employeeCount** | **int** | [readonly] The number of Employees included in this PayRun (including any CIS Subcontractors) | [optional] +**endDate** | **\DateTime** | [readonly] The end date of the period this PayRun covers | [optional] +**entries** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] The PayRunEntries that make up this PayRun. This is populate automatically when you start a PayRun. | [optional] +**isClosed** | **bool** | [readonly] Set to True if the PayRun is Finalised and changes can no longer be made | [optional] [readonly] +**isCombinedPayRun** | **bool** | Indicates if the payRun is a combined pay run or not | [optional] +**isLatestVersion** | **bool** | [readonly] Indicates whether this is the latest version of the PayRun. | [optional] +**isRolledBack** | **bool** | [readonly] Set to True if the PayRun is currently rolled back | [optional] +**navigation** | [**\SynergiTech\Staffology\Model\PayRunEntryNavigation**](PayRunEntryNavigation.md) | | [optional] +**nonRtiEmployeeCount** | **int** | [readonly] The number of employees excluded from the RTI submission in this PayRun | [optional] **ordinal** | **int** | [readonly] Indicates whether this uses first, second, third (etc.) PaySchedule for this PayPeriod. | [optional] +**originalPayRunPaymentDate** | **\DateTime** | [readonly] If this PayRun is a supplementary PayRun then this will be the date of the original PayRun's Payment Date | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**paymentDate** | **\DateTime** | [readonly] The intended date that Employees will be paid, although this can be changed on a per PayRunEntry basis | [optional] +**payslipScheduledDateTime** | **\DateTime** | The scheduled date time for sending payslips by email. | [optional] **period** | **int** | [readonly] The period (i.e, Tax Week or Tax Month) that this PayRun is for. | [optional] +**previousVersionTotals** | [**\SynergiTech\Staffology\Model\PayRunTotals**](PayRunTotals.md) | | [optional] **startDate** | **\DateTime** | [readonly] The start date of the period this PayRun covers | [optional] -**endDate** | **\DateTime** | [readonly] The end date of the period this PayRun covers | [optional] -**paymentDate** | **\DateTime** | [readonly] The intended date that Employees will be paid, although this can be changed on a per PayRunEntry basis | [optional] -**employeeCount** | **int** | [readonly] The number of Employees included in this PayRun (including any CIS Subcontractors) | [optional] +**state** | [**\SynergiTech\Staffology\Model\PayRunState**](PayRunState.md) | | [optional] **subContractorCount** | **int** | [readonly] The number of CIS Subcontractors included in this PayRun | [optional] -**nonRtiEmployeeCount** | **int** | [readonly] The number of employees excluded from the RTI submission in this PayRun | [optional] +**taxMonth** | **int** | [readonly] The Tax Month that the Payment Date falls in | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **totals** | [**\SynergiTech\Staffology\Model\PayRunTotals**](PayRunTotals.md) | | [optional] -**payslipScheduledDateTime** | **\DateTime** | The scheduled date time for sending payslips by email. | [optional] -**state** | [**\SynergiTech\Staffology\Model\PayRunState**](PayRunState.md) | | [optional] -**isClosed** | **bool** | [readonly] Set to True if the PayRun is Finalised and changes can no longer be made | [optional] [readonly] -**isRolledBack** | **bool** | [readonly] Set to True if the PayRun is currently rolled back | [optional] -**dateClosed** | **\DateTime** | | [optional] -**autoPilotCloseDate** | **\DateTime** | [readonly] If AutoPilot is enabled in the AutomationSettings for the Employer then this property will tell you when the payrun will be automatically closed | [optional] -**entries** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] The PayRunEntries that make up this PayRun. This is populate automatically when you start a PayRun. | [optional] +**version** | **int** | [readonly] The version of this PayRun in case any supplementary pay runs have been created for the same period. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayRunEntry.md b/docs/Model/PayRunEntry.md index b4dcc96..a461f1e 100644 --- a/docs/Model/PayRunEntry.md +++ b/docs/Model/PayRunEntry.md @@ -4,54 +4,59 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**taxMonth** | **int** | [readonly] The Tax Month that the Payment Date falls in | [optional] -**startDate** | **\DateTime** | [readonly] | [optional] -**endDate** | **\DateTime** | [readonly] | [optional] -**note** | **string** | Any note that you'd like to appear on the payslip | [optional] -**bacsSubReference** | **string** | [readonly] A randomly generated string for use with the RTI Hash Cross Reference | [optional] +**aeNotEnroledWarning** | **bool** | [readonly] If true then this Employee needs to be on an Auto Enrolment pension but isn't yet. | [optional] **bacsHashCode** | **string** | [readonly] A Hash Code used for RTI BACS Hash Cross Reference | [optional] -**percentageOfWorkingDaysPaidAsNormal** | **float** | [readonly] If the employee is paid a set amount per period (ie, not an hourly or daily rate) and there is any Leave that is either Not Paid or Statutory Pay then this value will give the percentage of working days (based on the Working Pattern) that should be paid as normal. If there is no Leave in the period or PayOptions.AutoAdjustForLeave is false, then this will be 1. | [optional] -**workingDaysNotPaidAsNormal** | **float** | [readonly] If PercentageOfWorkingDaysPaidAsNormal has a value other than 1 then this property will tell you how many working days have been deducted from the basic pay due to either being Not Paid or Statutory Pay | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**ordinal** | **int** | [readonly] Indicates whether this uses the first, second, third (etc) PaySchedule for this PayPeriod. | [optional] -**period** | **int** | [readonly] The Tax Week or Tax Month number this PayRunEntry relates to | [optional] -**isNewStarter** | **bool** | Determines whether or not this Employee will be declared as a new starter on the resulting FPS | [optional] -**unpaidAbsence** | **bool** | [readonly] Indicates that there was unpaid absence in the pay period | [optional] -**hasAttachmentOrders** | **bool** | [readonly] Indicates that there are AttachmentOrders for this Employee in this entry | [optional] -**paymentDate** | **\DateTime** | The date this payment was or will be made | [optional] -**priorPayrollCode** | **string** | [readonly] If the FPS needs to declare a change of PayId then this will contain the previous code It's worked out automatically but can also be set from the Employees EmploymentDetails property. | [optional] -**pensionSummary** | [**\SynergiTech\Staffology\Model\PensionSummary**](PensionSummary.md) | | [optional] -**pensionSummaries** | [**\SynergiTech\Staffology\Model\PensionSummary[]**](PensionSummary.md) | [readonly] A summary of the details for the Pensions (if any) that the Employee is assigned to. | [optional] +**bacsSubReference** | **string** | [readonly] A randomly generated string for use with the RTI Hash Cross Reference | [optional] +**differencePensionSummaries** | [**\SynergiTech\Staffology\Model\PensionSummary[]**](PensionSummary.md) | [readonly] A summary of the details for the Pensions (if any) that the Employee is assigned to. | [optional] +**emailId** | **string** | If the Payslip for this PayRunEntry has been emailed to the employee then the Id for an EmployerEmail will be provided here. if the value is all zeroes then the email is in the process of being created. | [optional] **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**totals** | [**\SynergiTech\Staffology\Model\PayRunTotals**](PayRunTotals.md) | | [optional] -**periodOverrides** | [**\SynergiTech\Staffology\Model\ValueOverride[]**](ValueOverride.md) | Any calculated values for this period that should be overridden with a different value | [optional] -**totalsYtd** | [**\SynergiTech\Staffology\Model\PayRunTotals**](PayRunTotals.md) | | [optional] -**totalsYtdOverrides** | [**\SynergiTech\Staffology\Model\ValueOverride[]**](ValueOverride.md) | Any values of TotalsYtd that should be overridden with a different value | [optional] +**employeeRolePayItems** | [**\SynergiTech\Staffology\Model\EmployeeRolePayItem[]**](EmployeeRolePayItem.md) | [readonly] Automatically populated. Array of base hourly and daily rates for the employee roles | [optional] +**employmentDetails** | [**\SynergiTech\Staffology\Model\EmploymentDetails**](EmploymentDetails.md) | | [optional] +**endDate** | **\DateTime** | [readonly] | [optional] **forcedCisVatAmount** | **float** | If this employee is a CIS Subcontractor registered for VAT, we'll automatically work out VAT at the set rate. If you want to override this calculations then set this property to anything other than null. | [optional] +**fps** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**hasAttachmentOrders** | **bool** | [readonly] Indicates that there are AttachmentOrders for this Employee in this entry | [optional] **holidayAccrued** | **float** | The amount of holiday days or hours accrued in the period. | [optional] -**state** | [**\SynergiTech\Staffology\Model\PayRunState**](PayRunState.md) | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **isClosed** | **bool** | [readonly] Set to True if the PayRun is Finalised and changes can no longer be made to the PayRunEntries | [optional] [readonly] +**isLatestVersion** | **bool** | [readonly] Indicates whether this is the latest version of the PayRunEntry. | [optional] +**isNewStarter** | **bool** | Determines whether or not this Employee will be declared as a new starter on the resulting FPS | [optional] +**isRemoved** | **bool** | Has the entry been removed from the payrun | [optional] +**isRolledBack** | **bool** | [readonly] Set to True if the Pay Run Entry is currently rolled back | [optional] **manualNi** | **bool** | If set to true then you must provide your own value for NationalInsuranceCalculation. You'd normally leave this set to false and let us automatically calculate NI amounts. | [optional] -**niSplit** | **bool** | If set to true Ni calculations are done for backdated pay for each pay period separately and then summed up | [optional] **nationalInsuranceCalculation** | [**\SynergiTech\Staffology\Model\NationalInsuranceCalculation**](NationalInsuranceCalculation.md) | | [optional] +**niLetterError** | [**\SynergiTech\Staffology\Model\NiLetterError**](NiLetterError.md) | | [optional] +**niSplit** | **bool** | If set to true Ni calculations are done for backdated pay for each pay period separately and then summed up | [optional] +**note** | **string** | Any note that you'd like to appear on the payslip | [optional] +**ordinal** | **int** | [readonly] Indicates whether this uses the first, second, third (etc) PaySchedule for this PayPeriod. | [optional] +**originalPayRunEntryPaymentDate** | **\DateTime** | [readonly] If this PayRunEntry is a supplementary PayRunEntry then this will be the date of the original PayRunEntry's Payment Date | [optional] +**payOptions** | [**\SynergiTech\Staffology\Model\PayOptions**](PayOptions.md) | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**payRunVersion** | **int** | [readonly] The supplementary pay run version of this PayRunEntry. | [optional] +**paymentAfterLeaving** | **bool** | [readonly] If this payment is for an employee that has left then this is set to true. | [optional] +**paymentDate** | **\DateTime** | The date this payment was or will be made | [optional] **payrollCodeChanged** | **bool** | [readonly] Indicates whether or not the Payroll Code for this Employee has changed since the last FPS | [optional] [readonly] -**aeNotEnroledWarning** | **bool** | [readonly] If true then this Employee needs to be on an Auto Enrolment pension but isn't yet. | [optional] -**fps** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**emailId** | **string** | If the Payslip for this PayRunEntry has been emailed to the employee then the Id for an EmployerEmail will be provided here. if the value is all zeroes then the email is in the process of being created. | [optional] +**pensionSummaries** | [**\SynergiTech\Staffology\Model\PensionSummary[]**](PensionSummary.md) | [readonly] A summary of the details for the Pensions (if any) that the Employee is assigned to. | [optional] +**pensionSummary** | [**\SynergiTech\Staffology\Model\PensionSummary**](PensionSummary.md) | | [optional] +**percentageOfWorkingDaysPaidAsNormal** | **float** | [readonly] If the employee is paid a set amount per period (ie, not an hourly or daily rate) and there is any Leave that is either Not Paid or Statutory Pay then this value will give the percentage of working days (based on the Working Pattern) that should be paid as normal. If there is no Leave in the period or PayOptions.AutoAdjustForLeave is false, then this will be 1. | [optional] +**period** | **int** | [readonly] The Tax Week or Tax Month number this PayRunEntry relates to | [optional] +**periodOverrides** | [**\SynergiTech\Staffology\Model\ValueOverride[]**](ValueOverride.md) | Any calculated values for this period that should be overridden with a different value | [optional] +**periodsCovered** | **int** | [readonly] The amount of periods that the Pay Run Entry covers. This can be > 1 when back pay for previous periods is paid in the current period | [optional] +**personalDetails** | [**\SynergiTech\Staffology\Model\PersonalDetails**](PersonalDetails.md) | | [optional] +**previousVersionTotals** | [**\SynergiTech\Staffology\Model\PayRunTotals**](PayRunTotals.md) | | [optional] +**priorPayrollCode** | **string** | [readonly] If the FPS needs to declare a change of PayId then this will contain the previous code It's worked out automatically but can also be set from the Employees EmploymentDetails property. | [optional] **recievingOffsetPay** | **bool** | If the pay is being topped up due to an applied Leave having the offset value set to true then this will be set to true | [optional] -**paymentAfterLeaving** | **bool** | [readonly] If this payment is for an employee that has left then this is set to true. | [optional] +**startDate** | **\DateTime** | [readonly] | [optional] +**state** | [**\SynergiTech\Staffology\Model\PayRunState**](PayRunState.md) | | [optional] +**taxMonth** | **int** | [readonly] The Tax Month that the Payment Date falls in | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**teachersPensionAgeWarning** | [**\SynergiTech\Staffology\Model\TeachersPensionAgeWarning**](TeachersPensionAgeWarning.md) | | [optional] +**totals** | [**\SynergiTech\Staffology\Model\PayRunTotals**](PayRunTotals.md) | | [optional] +**totalsYtd** | [**\SynergiTech\Staffology\Model\PayRunTotals**](PayRunTotals.md) | | [optional] +**totalsYtdOverrides** | [**\SynergiTech\Staffology\Model\ValueOverride[]**](ValueOverride.md) | Any values of TotalsYtd that should be overridden with a different value | [optional] **umbrellaPayment** | [**\SynergiTech\Staffology\Model\UmbrellaPayment**](UmbrellaPayment.md) | | [optional] -**isRemoved** | **bool** | Has the entry been removed from the payrun | [optional] -**isRolledBack** | **bool** | [readonly] Set to True if the Pay Run Entry is currently rolled back | [optional] -**periodsCovered** | **int** | [readonly] The amount of periods that the Pay Run Entry covers. This can be > 1 when back pay for previous periods is paid in the current period | [optional] -**employeeRolePayItems** | [**\SynergiTech\Staffology\Model\EmployeeRolePayItem[]**](EmployeeRolePayItem.md) | [readonly] Automatically populated. Array of base hourly and daily rates for the employee roles | [optional] +**unpaidAbsence** | **bool** | [readonly] Indicates that there was unpaid absence in the pay period | [optional] **warnings** | [**\SynergiTech\Staffology\Model\PayRunEntryWarningType**](PayRunEntryWarningType.md) | | [optional] -**niLetterError** | [**\SynergiTech\Staffology\Model\NiLetterError**](NiLetterError.md) | | [optional] -**teachersPensionAgeWarning** | [**\SynergiTech\Staffology\Model\TeachersPensionAgeWarning**](TeachersPensionAgeWarning.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] -**personalDetails** | [**\SynergiTech\Staffology\Model\PersonalDetails**](PersonalDetails.md) | | [optional] -**employmentDetails** | [**\SynergiTech\Staffology\Model\EmploymentDetails**](EmploymentDetails.md) | | [optional] -**payOptions** | [**\SynergiTech\Staffology\Model\PayOptions**](PayOptions.md) | | [optional] +**workingDaysNotPaidAsNormal** | **float** | [readonly] If PercentageOfWorkingDaysPaidAsNormal has a value other than 1 then this property will tell you how many working days have been deducted from the basic pay due to either being Not Paid or Statutory Pay | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayRunEntryNavigation.md b/docs/Model/PayRunEntryNavigation.md new file mode 100644 index 0000000..f4f176a --- /dev/null +++ b/docs/Model/PayRunEntryNavigation.md @@ -0,0 +1,22 @@ +# # PayRunEntryNavigation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currentId** | **string** | | [optional] +**currentIndex** | **int** | | [optional] +**departmentFilterSelected** | **string** | | [optional] +**entryCount** | **int** | | [optional] +**firstId** | **string** | | [optional] +**lastId** | **string** | | [optional] +**nextId** | **string** | | [optional] +**payRunEntrySortBy** | [**\SynergiTech\Staffology\Model\PayRunEntrySortBy**](PayRunEntrySortBy.md) | | [optional] +**previousId** | **string** | | [optional] +**rolledBackOnly** | **bool** | | [optional] +**searchTerm** | **string** | | [optional] +**sortDescending** | **bool** | | [optional] +**startersLeaversFilterSelected** | [**\SynergiTech\Staffology\Model\StartersLeaversFilter**](StartersLeaversFilter.md) | | [optional] +**zeroPaidFilterSelected** | [**\SynergiTech\Staffology\Model\ZeroPaidFilter**](ZeroPaidFilter.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayRunJournal.md b/docs/Model/PayRunJournal.md index dbd74aa..6134810 100644 --- a/docs/Model/PayRunJournal.md +++ b/docs/Model/PayRunJournal.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**lines** | [**\SynergiTech\Staffology\Model\PayRunSummaryLine[]**](PayRunSummaryLine.md) | | [optional] +**csvFormat** | [**\SynergiTech\Staffology\Model\JournalCsvFormat**](JournalCsvFormat.md) | | [optional] **date** | **\DateTime** | [readonly] The PaymentDate from the PayRun | [optional] -**title** | **string** | [readonly] The status of the task for posting this journal to an ExternalDataProvider | [optional] -**status** | [**\SynergiTech\Staffology\Model\BackgroundTaskStatus**](BackgroundTaskStatus.md) | | [optional] -**statusMessage** | **string** | [readonly] A message to elaborate on the Status | [optional] +**lines** | [**\SynergiTech\Staffology\Model\PayRunSummaryLine[]**](PayRunSummaryLine.md) | | [optional] **link** | **string** | [readonly] If available, a link to the journal in the ExternalDataProvider | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**mergeMatchingNominals** | **bool** | [readonly] | [optional] **ordinal** | **int** | [readonly] | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **period** | **int** | [readonly] | [optional] -**mergeMatchingNominals** | **bool** | [readonly] | [optional] -**csvFormat** | [**\SynergiTech\Staffology\Model\JournalCsvFormat**](JournalCsvFormat.md) | | [optional] +**status** | [**\SynergiTech\Staffology\Model\BackgroundTaskStatus**](BackgroundTaskStatus.md) | | [optional] +**statusMessage** | **string** | [readonly] A message to elaborate on the Status | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**title** | **string** | [readonly] The status of the task for posting this journal to an ExternalDataProvider | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayRunPayment.md b/docs/Model/PayRunPayment.md index 30b36c4..2dfb0ef 100644 --- a/docs/Model/PayRunPayment.md +++ b/docs/Model/PayRunPayment.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\SynergiTech\Staffology\Model\PayeeType**](PayeeType.md) | | [optional] -**payee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**date** | **\DateTime** | [readonly] The date the payment is to be made | [optional] -**method** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] **amount** | **float** | [readonly] The amount to pay | [optional] -**reference** | **string** | [readonly] The period the payment is for | [optional] -**employerPaymentReference** | **string** | The employer's payment reference, formatted as per the employer settings | [optional] -**bankDetails** | [**\SynergiTech\Staffology\Model\BankDetails**](BankDetails.md) | | [optional] **bacsHash** | **string** | [readonly] if paying by Credit and you've enabled BacsHash then this will contain the BacsHash included on the FPS | [optional] **bacsSubReference** | **string** | [readonly] if paying by Credit and you've enabled BacsHash then this will contain the BacsSubReference included on the FPS | [optional] +**bankDetails** | [**\SynergiTech\Staffology\Model\BankDetails**](BankDetails.md) | | [optional] +**date** | **\DateTime** | [readonly] The date the payment is to be made | [optional] +**employerPaymentReference** | **string** | The employer's payment reference, formatted as per the employer settings | [optional] **isBankDetailValid** | **bool** | [readonly] for checking if bank details are valid | [optional] +**method** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] +**payee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**reference** | **string** | [readonly] The period the payment is for | [optional] +**type** | [**\SynergiTech\Staffology\Model\PayeeType**](PayeeType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayRunStateChange.md b/docs/Model/PayRunStateChange.md index b6ed6d4..6aef348 100644 --- a/docs/Model/PayRunStateChange.md +++ b/docs/Model/PayRunStateChange.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**state** | [**\SynergiTech\Staffology\Model\PayRunState**](PayRunState.md) | | [optional] +**employeeUniqueIds** | **string[]** | List of employee unique ids, whose PayRunEntries to be re-opened during a Payrun rollback operation. Will be used only during a transition to a rolled back pay run state | [optional] **reason** | [**\SynergiTech\Staffology\Model\PayRunStateChangeReason**](PayRunStateChangeReason.md) | | [optional] **reasonText** | **string** | A free-form text field for a reason for the change of state. | [optional] -**employeeUniqueIds** | **string[]** | List of employee unique ids, whose PayRunEntries to be re-opened during a Payrun rollback operation. Will be used only during a transition to a rolled back pay run state | [optional] +**state** | [**\SynergiTech\Staffology\Model\PayRunState**](PayRunState.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayRunSummaryLine.md b/docs/Model/PayRunSummaryLine.md index da470f1..a5199af 100644 --- a/docs/Model/PayRunSummaryLine.md +++ b/docs/Model/PayRunSummaryLine.md @@ -4,20 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nominalCode** | **string** | [readonly] If you've set up NominalCodeMapping then the relevant Nominal code for the PayCode will be shown here. | [optional] -**departmentCode** | **string** | [readonly] If the journal is split by department then the relevant department code is shown here. | [optional] -**nominalName** | **string** | [readonly] As above | [optional] -**description** | **string** | [readonly] A description of what this line summarises. | [optional] -**qty** | **float** | [readonly] If the PayCode is a Multiplier code then this will contain the number of days/hours | [optional] -**value** | **float** | [readonly] The total value for this line. | [optional] -**payCode** | [**\SynergiTech\Staffology\Model\PayCode**](PayCode.md) | | [optional] -**costCentreCode** | **string** | [readonly] If the journal is split by cost centre then the relevant cost centre code is shown here. | [optional] **analysisCategories** | [**\SynergiTech\Staffology\Model\AnalysisCategory[]**](AnalysisCategory.md) | [readonly] If the journal is split by analysis categories | [optional] **analysisCategoryCodes** | [**\SynergiTech\Staffology\Model\AnalysisCategoryCode[]**](AnalysisCategoryCode.md) | [readonly] If the journal is split by analysis categories then the relevant analysis categories code is shown here. | [optional] +**costCentreCode** | **string** | [readonly] If the journal is split by cost centre then the relevant cost centre code is shown here. | [optional] +**departmentCode** | **string** | [readonly] If the journal is split by department then the relevant department code is shown here. | [optional] +**description** | **string** | [readonly] A description of what this line summarises. | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Employee**](Employee.md) | | [optional] **employeeUniqueId** | **string** | [readonly] The EmployeeId this summary line relates to. | [optional] **journalNarrative** | **string** | [readonly] Gets the journal narrative for the pension, if defined. | [optional] +**nominalCode** | **string** | [readonly] If you've set up NominalCodeMapping then the relevant Nominal code for the PayCode will be shown here. | [optional] +**nominalName** | **string** | [readonly] As above | [optional] +**payCode** | [**\SynergiTech\Staffology\Model\PayCode**](PayCode.md) | | [optional] **pensionId** | **string** | [readonly] The PensionId of the pension associated with this summary line, only present for pension summary lines. | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Employee**](Employee.md) | | [optional] +**qty** | **float** | [readonly] If the PayCode is a Multiplier code then this will contain the number of days/hours | [optional] **unMappedNominalCode** | **string** | [readonly] Unmapped Nominal Code is the Nominal Code without the Nominal Mapping. | [optional] +**value** | **float** | [readonly] The total value for this line. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayRunSummaryLineIEnumerableReportResponse.md b/docs/Model/PayRunSummaryLineIEnumerableReportResponse.md index 8b817f2..1c1f2cf 100644 --- a/docs/Model/PayRunSummaryLineIEnumerableReportResponse.md +++ b/docs/Model/PayRunSummaryLineIEnumerableReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\PayRunSummaryLine[]**](PayRunSummaryLine.md) | [readonly] If the type is application.json then this will contain a JSON representation of the relevant model | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayRunTotals.md b/docs/Model/PayRunTotals.md index 2e2d5cd..a0a2628 100644 --- a/docs/Model/PayRunTotals.md +++ b/docs/Model/PayRunTotals.md @@ -4,89 +4,90 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**additions** | **float** | The value of all additions. This minus Deductions should equal TakeHomePay | [optional] +**adjustments** | **float** | [readonly] The value of adjustments made to the Net Pay (Non taxable/NIable additions/deductions) | [optional] +**appLevyDeduction** | **float** | [readonly] Value of any Apprenticeship Levy fee deducted for processing the umbrella payment | [optional] +**attachmentOrderDeductions** | **float** | [readonly] Value of deductions made due to AttachmentOrders | [optional] **basicPay** | **float** | [readonly] The amount to be paid to this Employee as a result of the PayOptions that have been set | [optional] -**gross** | **float** | [readonly] Gross pay | [optional] -**grossForNi** | **float** | [readonly] The amount of the Gross that is subject to NI | [optional] -**grossForNiNonRti** | **float** | [readonly] The amount of the Gross that is subject to NI but excluded from RTI | [optional] -**grossNotSubjectToEmployersNi** | **float** | [readonly] The amount of the Gross that is not subject to Employers NI. This is the same as GrossForNI where the employees NI Table has an Er contribution | [optional] -**grossNotSubjectToEmployersNiNonRti** | **float** | [readonly] The amount of the Gross that is not subject to Employers NI. This is the same as GrossForNI where the employees NI Table has an Er contribution This is the amount that is excluded from RTI | [optional] -**grossForTax** | **float** | [readonly] The amount of the Gross that is subject to PAYE | [optional] -**employerNi** | **float** | [readonly] | [optional] -**employerNiNonRti** | **float** | [readonly] Employer NI excluded from RTI | [optional] +**cisDeduction** | **float** | [readonly] Value of any CIS Deduction made | [optional] +**cisUmbrellaFee** | **float** | [readonly] Value of any pre-tax fee charged to the CIS Subcontractor for processing the payment | [optional] +**cisUmbrellaFeePostTax** | **float** | [readonly] Value of any post-tax fee charged to the CIS Subcontractor for processing the payment | [optional] +**cisVat** | **float** | [readonly] Value of any VAT paid to CIS Subcontractor | [optional] +**dednsFromNetPay** | **float** | [readonly] The value of any deductions being made to the Net Pay for this Employee | [optional] +**deductions** | **float** | The value of all deductions. Additions minus This value should equal TakeHomePay | [optional] +**empeePenContribnsNotPaid** | **float** | [readonly] Value of employee pension contributions that are not paid under 'net pay arrangements', including any AVC | [optional] +**empeePenContribnsPaid** | **float** | [readonly] Value of employee pension contributions paid under 'net pay arrangements', including any AVC | [optional] **employeeNi** | **float** | [readonly] | [optional] **employeeNiNonRti** | **float** | [readonly] Employee NI excluded from RTI | [optional] +**employeePensionContribution** | **float** | [readonly] The value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions | [optional] +**employeePensionContributionAvc** | **float** | [readonly] The value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution | [optional] +**employerNi** | **float** | [readonly] | [optional] +**employerNiNonRti** | **float** | [readonly] Employer NI excluded from RTI | [optional] **employerNiOffPayroll** | **float** | [readonly] The amount included in EmployerNi that is in relation to Off-Payroll Workers | [optional] -**realTimeClass1ANi** | **float** | [readonly] | [optional] -**realTimeClass1ANiNonRti** | **float** | [readonly] Real Time Class 1A NI excluded from RTI | [optional] -**tax** | **float** | [readonly] | [optional] -**taxNonRti** | **float** | [readonly] Tax excluded from RTI | [optional] -**netPay** | **float** | [readonly] The Net Pay for this Employee | [optional] -**adjustments** | **float** | [readonly] The value of adjustments made to the Net Pay (Non taxable/NIable additions/deductions) | [optional] -**notionalPay** | **float** | [readonly] The value of adjustments that are of type notional. | [optional] -**additions** | **float** | The value of all additions. This minus Deductions should equal TakeHomePay | [optional] -**deductions** | **float** | The value of all deductions. Additions minus This value should equal TakeHomePay | [optional] -**takeHomePay** | **float** | [readonly] The amount this Employee takes home | [optional] -**nonTaxOrNICPmt** | **float** | [readonly] The value of any payments being made to this Employee that aren't being subjected to PAYE or NI | [optional] -**itemsSubjectToClass1NIC** | **float** | [readonly] Items subject to Class 1 NIC but not taxed under PAYE regulations excluding pension contributions | [optional] -**dednsFromNetPay** | **float** | [readonly] The value of any deductions being made to the Net Pay for this Employee | [optional] -**tcpTcls** | **float** | [readonly] Value of payments marked as Trivial Commutation Payment (A - TCLS) | [optional] -**tcpPp** | **float** | [readonly] Value of payments marked as Trivial Commutation Payment (B - Personal Pension) | [optional] -**tcpOp** | **float** | [readonly] Value of payments marked as Trivial Commutation Payment (C - Occupational Pension) | [optional] +**employerPensionContribution** | **float** | [readonly] The value of the Pension Contribution being made by the Employer for this Employee | [optional] **flexiDdDeath** | **float** | [readonly] Value of payments marked as flexibly accessing death benefit (taxable) | [optional] **flexiDdDeathNonTax** | **float** | [readonly] Value of payments marked as flexibly accessing death benefit (non taxable) | [optional] **flexiDdPension** | **float** | [readonly] Value of payments marked as flexibly accessing pension (taxable) | [optional] +**flexiDdPensionCommencementExcess** | **float** | [readonly] Value of payments marked as flexibly accessing pension commencement excess lump sum (taxable) | [optional] +**flexiDdPensionCommencementExcessNonTax** | **float** | [readonly] Value of payments marked as flexibly accessing pension commencement excess lump sum (non taxable) | [optional] **flexiDdPensionNonTax** | **float** | [readonly] Value of payments marked as flexibly accessing pension (non taxable) | [optional] **flexiDdSeriousIllHealth** | **float** | [readonly] Value of payments marked as flexibly accessing serious ill health lump sum (taxable) | [optional] **flexiDdSeriousIllHealthNonTax** | **float** | [readonly] Value of payments marked as flexibly accessing serious ill health lump sum (non taxable) | [optional] **flexiDdStandAloneLumpSum** | **float** | [readonly] Value of payments marked as flexibly accessing stand alone lump sum (taxable) | [optional] **flexiDdStandAloneLumpSumNonTax** | **float** | [readonly] Value of payments marked as flexibly accessing stand alone lump sum (non taxable) | [optional] -**flexiDdPensionCommencementExcess** | **float** | [readonly] Value of payments marked as flexibly accessing pension commencement excess lump sum (taxable) | [optional] -**flexiDdPensionCommencementExcessNonTax** | **float** | [readonly] Value of payments marked as flexibly accessing pension commencement excess lump sum (non taxable) | [optional] -**smp** | **float** | [readonly] Statutory Maternity Pay | [optional] -**smpNonRti** | **float** | [readonly] Statutory Maternity Pay excluded from RTI | [optional] -**spp** | **float** | [readonly] Statutory Paternity Pay | [optional] -**sppNonRti** | **float** | [readonly] Statutory Paternity Pay excluded from RTI | [optional] +**foreignTaxAmount** | **float** | [readonly] The amount paid for Foreign Tax Credits in this period | [optional] +**foreignTaxAmountReclaimed** | **float** | [readonly] The amount of Foreign Tax Credits that you actually reclaimed | [optional] +**gross** | **float** | [readonly] Gross pay | [optional] +**grossForNi** | **float** | [readonly] The amount of the Gross that is subject to NI | [optional] +**grossForNiNonRti** | **float** | [readonly] The amount of the Gross that is subject to NI but excluded from RTI | [optional] +**grossForTax** | **float** | [readonly] The amount of the Gross that is subject to PAYE | [optional] +**grossNotSubjectToEmployersNi** | **float** | [readonly] The amount of the Gross that is not subject to Employers NI. This is the same as GrossForNI where the employees NI Table has an Er contribution | [optional] +**grossNotSubjectToEmployersNiNonRti** | **float** | [readonly] The amount of the Gross that is not subject to Employers NI. This is the same as GrossForNI where the employees NI Table has an Er contribution This is the amount that is excluded from RTI | [optional] +**itemsSubjectToClass1NIC** | **float** | [readonly] Items subject to Class 1 NIC but not taxed under PAYE regulations excluding pension contributions | [optional] +**leavers** | **int** | [readonly] The number of Leavers on ths PayRun | [optional] +**mapsMiles** | **int** | [readonly] The number of miles paid for Mileage Allowance Payments | [optional] +**netPay** | **float** | [readonly] The Net Pay for this Employee | [optional] +**newEmployeesInCurrentSupplementaryPayRun** | **int** | [readonly] The number of new Employees included in the current supplementary PayRun | [optional] +**nilPaid** | **int** | [readonly] The number of employees with NilPaid on the PayRun | [optional] +**nonTaxOrNICPmt** | **float** | [readonly] The value of any payments being made to this Employee that aren't being subjected to PAYE or NI | [optional] +**nonTierablePay** | **float** | [readonly] The value of any pay that shouldn't count towards determining a pension tier. | [optional] +**notionalPay** | **float** | [readonly] The value of adjustments that are of type notional. | [optional] +**p45Gross** | **float** | [readonly] The value P45 Gross which is held on the Employees Opening Balance | [optional] +**p45Tax** | **float** | [readonly] The value of P45 Tax which is held on the Employees Opening Balance | [optional] +**paymentAfterLeaving** | **float** | [readonly] Payment After Leaving | [optional] +**pbik** | **float** | [readonly] Value of any Payrolled Benefits In Kind | [optional] +**pensionableEarnings** | **float** | [readonly] The amount of the Gross that is subject to Pension Deductions. If the Pension Scheme uses Qualifying Earnings (upper and lower limits) then this value is before those are applied | [optional] +**pensionablePay** | **float** | [readonly] The amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. | [optional] +**postgradLoanRecovered** | **float** | [readonly] | [optional] +**postgradLoanRecoveredNonRti** | **float** | [readonly] Postgrad Loan recovered excluded from RTI | [optional] +**realTimeClass1ANi** | **float** | [readonly] | [optional] +**realTimeClass1ANiNonRti** | **float** | [readonly] Real Time Class 1A NI excluded from RTI | [optional] +**recoverableAmounts** | [**\SynergiTech\Staffology\Model\RecoverableAmounts**](RecoverableAmounts.md) | | [optional] **sap** | **float** | [readonly] Statutory Adoption Pay | [optional] **sapNonRti** | **float** | [readonly] Statutory Adoption Pay excluded from RTI | [optional] **shpp** | **float** | [readonly] Statutory Shared Parental Pay | [optional] **shppNonRti** | **float** | [readonly] Statutory Shared Parental Pay excluded from RTI | [optional] -**spbp** | **float** | [readonly] Statutory Parental Bereavement Pay | [optional] -**spbpNonRti** | **float** | [readonly] Statutory Parental Bereavement Pay excluded from RTI | [optional] +**smp** | **float** | [readonly] Statutory Maternity Pay | [optional] +**smpNonRti** | **float** | [readonly] Statutory Maternity Pay excluded from RTI | [optional] **sncp** | **float** | [readonly] Statutory Neonatal Care Pay | [optional] **sncpNonRti** | **float** | [readonly] Statutory Neonatal Care Pay excluded from RTI | [optional] +**spbp** | **float** | [readonly] Statutory Parental Bereavement Pay | [optional] +**spbpNonRti** | **float** | [readonly] Statutory Parental Bereavement Pay excluded from RTI | [optional] +**spp** | **float** | [readonly] Statutory Paternity Pay | [optional] +**sppNonRti** | **float** | [readonly] Statutory Paternity Pay excluded from RTI | [optional] **ssp** | **float** | [readonly] Statutory Sick Pay | [optional] **sspNonRti** | **float** | [readonly] Statutory Sick Pay excluded from RTI | [optional] +**starters** | **int** | [readonly] The number of Starters on this PayRun | [optional] **studentLoanRecovered** | **float** | [readonly] | [optional] **studentLoanRecoveredNonRti** | **float** | [readonly] Student Loan recovered excluded from RTI | [optional] -**postgradLoanRecovered** | **float** | [readonly] | [optional] -**postgradLoanRecoveredNonRti** | **float** | [readonly] Postgrad Loan recovered excluded from RTI | [optional] -**pensionableEarnings** | **float** | [readonly] The amount of the Gross that is subject to Pension Deductions. If the Pension Scheme uses Qualifying Earnings (upper and lower limits) then this value is before those are applied | [optional] -**pensionablePay** | **float** | [readonly] The amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. | [optional] -**nonTierablePay** | **float** | [readonly] The value of any pay that shouldn't count towards determining a pension tier. | [optional] -**employeePensionContribution** | **float** | [readonly] The value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions | [optional] -**employeePensionContributionAvc** | **float** | [readonly] The value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution | [optional] -**employerPensionContribution** | **float** | [readonly] The value of the Pension Contribution being made by the Employer for this Employee | [optional] -**empeePenContribnsNotPaid** | **float** | [readonly] Value of employee pension contributions that are not paid under 'net pay arrangements', including any AVC | [optional] -**empeePenContribnsPaid** | **float** | [readonly] Value of employee pension contributions paid under 'net pay arrangements', including any AVC | [optional] -**attachmentOrderDeductions** | **float** | [readonly] Value of deductions made due to AttachmentOrders | [optional] -**cisDeduction** | **float** | [readonly] Value of any CIS Deduction made | [optional] -**cisVat** | **float** | [readonly] Value of any VAT paid to CIS Subcontractor | [optional] -**cisUmbrellaFee** | **float** | [readonly] Value of any pre-tax fee charged to the CIS Subcontractor for processing the payment | [optional] -**cisUmbrellaFeePostTax** | **float** | [readonly] Value of any post-tax fee charged to the CIS Subcontractor for processing the payment | [optional] -**pbik** | **float** | [readonly] Value of any Payrolled Benefits In Kind | [optional] -**mapsMiles** | **int** | [readonly] The number of miles paid for Mileage Allowance Payments | [optional] -**foreignTaxAmount** | **float** | [readonly] The amount paid for Foreign Tax Credits in this period | [optional] -**foreignTaxAmountReclaimed** | **float** | [readonly] The amount of Foreign Tax Credits that you actually reclaimed | [optional] -**umbrellaFee** | **float** | [readonly] Value of any Umbrella fee charged for processing the payment | [optional] -**appLevyDeduction** | **float** | [readonly] Value of any Apprenticeship Levy fee deducted for processing the umbrella payment | [optional] -**paymentAfterLeaving** | **float** | [readonly] Payment After Leaving | [optional] +**takeHomePay** | **float** | [readonly] The amount this Employee takes home | [optional] +**tax** | **float** | [readonly] | [optional] +**taxNonRti** | **float** | [readonly] Tax excluded from RTI | [optional] **taxOnPaymentAfterLeaving** | **float** | [readonly] Tax On Payment After Leaving | [optional] -**nilPaid** | **int** | [readonly] The number of employees with NilPaid on the PayRun | [optional] -**leavers** | **int** | [readonly] The number of Leavers on ths PayRun | [optional] -**starters** | **int** | [readonly] The number of Starters on this PayRun | [optional] -**p45Gross** | **float** | [readonly] The value P45 Gross which is held on the Employees Opening Balance | [optional] -**p45Tax** | **float** | [readonly] The value of P45 Tax which is held on the Employees Opening Balance | [optional] +**tcpOp** | **float** | [readonly] Value of payments marked as Trivial Commutation Payment (C - Occupational Pension) | [optional] +**tcpPp** | **float** | [readonly] Value of payments marked as Trivial Commutation Payment (B - Personal Pension) | [optional] +**tcpTcls** | **float** | [readonly] Value of payments marked as Trivial Commutation Payment (A - TCLS) | [optional] **totalCost** | **float** | | [optional] [readonly] -**recoverableAmounts** | [**\SynergiTech\Staffology\Model\RecoverableAmounts**](RecoverableAmounts.md) | | [optional] +**umbrellaFee** | **float** | [readonly] Value of any Umbrella fee charged for processing the payment | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaySchedule.md b/docs/Model/PaySchedule.md index 744ace0..5e875c0 100644 --- a/docs/Model/PaySchedule.md +++ b/docs/Model/PaySchedule.md @@ -4,31 +4,31 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | A descriptive name for this PaySchedule | [optional] -**ordinal** | **int** | [readonly] Indicates whether this is first, second, third (etc) PaySchedule for this PayPeriod. | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**firstPeriodEndDate** | **\DateTime** | The last day of the first pay period | [optional] +**currentPayRun** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**employeeCount** | **int** | [readonly] The number of employees paid with this PaySchedule | [optional] +**employerName** | **string** | Employer name for this PaySchedule | [optional] +**employerUniqueId** | **string** | Employer Unique Id for this PaySchedule | [optional] **firstPaymentDate** | **\DateTime** | The first payment date | [optional] -**paymentDateType** | [**\SynergiTech\Staffology\Model\PaymentDateType**](PaymentDateType.md) | | [optional] -**periodEndDateType** | [**\SynergiTech\Staffology\Model\PaymentDateType**](PaymentDateType.md) | | [optional] -**periodLengths** | **int[]** | Only applicable for PayPeriod of Custom. Defines the length of each period | [optional] +**firstPeriodEndDate** | **\DateTime** | The last day of the first pay period | [optional] +**hasOpenPayRunPeriod** | **bool** | [readonly] Will be true if the employer currently has an open PayRun for this PayPeriod | [optional] **highGrossPay** | **float** | A gross pay amount considered high for this PaySchedule | [optional] **highNetPay** | **float** | A net pay amount considered high for this PaySchedule | [optional] -**periodEventsConfig** | [**\SynergiTech\Staffology\Model\PaySchedulePeriodEventsConfig**](PaySchedulePeriodEventsConfig.md) | | [optional] -**hasOpenPayRunPeriod** | **bool** | [readonly] Will be true if the employer currently has an open PayRun for this PayPeriod | [optional] -**lastPeriodEndDate** | **\DateTime** | [readonly] The end date of the most recent PayRun on this schedule | [optional] -**lastPeriodNumber** | **int** | [readonly] The period number of the most recent PayRun on this schedule | [optional] -**employeeCount** | **int** | [readonly] The number of employees paid with this PaySchedule | [optional] -**isRequired** | **bool** | [readonly] Whether or not this PaySchedule is required for the employer, ie: they have employees to be paid on this PaySchedule | [optional] [readonly] **isConfigured** | **bool** | [readonly] Whether or not this PaySchedule has been configured and is ready for use | [optional] +**isRequired** | **bool** | [readonly] Whether or not this PaySchedule is required for the employer, ie: they have employees to be paid on this PaySchedule | [optional] [readonly] **isYearCompleted** | **bool** | [readonly] Returns true if all PayRuns for this PaySchedule in the TaxYear have been completed | [optional] -**yearEndTasks** | **string[]** | [readonly] A list of actions that need to be completed for this PaySchedule before this TaxYear can be finalised | [optional] -**payRuns** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] Details of PayRuns for this PaySchedule | [optional] -**currentPayRun** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**lastPeriodEndDate** | **\DateTime** | [readonly] The end date of the most recent PayRun on this schedule | [optional] +**lastPeriodNumber** | **int** | [readonly] The period number of the most recent PayRun on this schedule | [optional] +**name** | **string** | A descriptive name for this PaySchedule | [optional] **nextPayRun** | [**\SynergiTech\Staffology\Model\PayRun**](PayRun.md) | | [optional] +**ordinal** | **int** | [readonly] Indicates whether this is first, second, third (etc) PaySchedule for this PayPeriod. | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**payRuns** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] Details of PayRuns for this PaySchedule | [optional] +**paymentDateType** | [**\SynergiTech\Staffology\Model\PaymentDateType**](PaymentDateType.md) | | [optional] +**periodEndDateType** | [**\SynergiTech\Staffology\Model\PaymentDateType**](PaymentDateType.md) | | [optional] +**periodEventsConfig** | [**\SynergiTech\Staffology\Model\PaySchedulePeriodEventsConfig**](PaySchedulePeriodEventsConfig.md) | | [optional] +**periodLengths** | **int[]** | Only applicable for PayPeriod of Custom. Defines the length of each period | [optional] **publicCreatedDate** | **\DateTime** | | [optional] -**employerName** | **string** | Employer name for this PaySchedule | [optional] -**employerUniqueId** | **string** | Employer Unique Id for this PaySchedule | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**yearEndTasks** | **string[]** | [readonly] A list of actions that need to be completed for this PaySchedule before this TaxYear can be finalised | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaySchedulePeriod.md b/docs/Model/PaySchedulePeriod.md index b00909e..1d353b6 100644 --- a/docs/Model/PaySchedulePeriod.md +++ b/docs/Model/PaySchedulePeriod.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**endDate** | **\DateTime** | [readonly] The end date of the PaySchedulePeriod | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **paySchedulePeriodEvents** | [**\SynergiTech\Staffology\Model\PaySchedulePeriodEvent[]**](PaySchedulePeriodEvent.md) | [readonly] List of all the events in this PaySchedulePeriod | [optional] +**paymentDate** | **\DateTime** | The payment date of the PaySchedulePeriod. | [optional] **period** | **int** | [readonly] The Period number of the PaySchedulePeriod. | [optional] **startDate** | **\DateTime** | [readonly] The start date of the PaySchedulePeriod | [optional] -**endDate** | **\DateTime** | [readonly] The end date of the PaySchedulePeriod | [optional] -**paymentDate** | **\DateTime** | The payment date of the PaySchedulePeriod. | [optional] **unadjustedPaymentDate** | **\DateTime** | The payment date of the PaySchedulePeriod when not accounting for weekends, bank hols or ad-hoc alterations to the pay schedule | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaySchedulePeriodEvent.md b/docs/Model/PaySchedulePeriodEvent.md index 68591d0..e6619bb 100644 --- a/docs/Model/PaySchedulePeriodEvent.md +++ b/docs/Model/PaySchedulePeriodEvent.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payPeriodEventType** | [**\SynergiTech\Staffology\Model\PayPeriodEventType**](PayPeriodEventType.md) | | [optional] -**eventDate** | **\DateTime** | The expected date and time of the event. | [optional] **actualEventDate** | **\DateTime** | The actual date and time when the event was completed. | [optional] -**isOverDue** | **bool** | Returns true if its past the event date. | [optional] [readonly] +**eventDate** | **\DateTime** | The expected date and time of the event. | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**isOverDue** | **bool** | Returns true if its past the event date. | [optional] [readonly] +**payPeriodEventType** | [**\SynergiTech\Staffology\Model\PayPeriodEventType**](PayPeriodEventType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaySchedulePeriodEventsConfig.md b/docs/Model/PaySchedulePeriodEventsConfig.md index 3cf51b1..7d20e11 100644 --- a/docs/Model/PaySchedulePeriodEventsConfig.md +++ b/docs/Model/PaySchedulePeriodEventsConfig.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**submitForProcessing** | **int** | | [optional] -**sendForApproval** | **int** | | [optional] **approval** | **int** | | [optional] **finalise** | **int** | | [optional] +**sendForApproval** | **int** | | [optional] **sendPaySlip** | **int** | | [optional] +**submitForProcessing** | **int** | | [optional] **submitRti** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaySpineReport.md b/docs/Model/PaySpineReport.md index 1f9a691..37cebf2 100644 --- a/docs/Model/PaySpineReport.md +++ b/docs/Model/PaySpineReport.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\PaySpineReportLine[]**](PaySpineReportLine.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaySpineReportLine.md b/docs/Model/PaySpineReportLine.md index bcc3ca5..8342af0 100644 --- a/docs/Model/PaySpineReportLine.md +++ b/docs/Model/PaySpineReportLine.md @@ -4,22 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**spineName** | **string** | Name of the Pay Spine | [optional] +**annualDecimals** | **int** | Number of decimal places to calculate Annual Salaries | [optional] +**annualRoundingRule** | [**\SynergiTech\Staffology\Model\AnnualRoundingRule**](AnnualRoundingRule.md) | | [optional] +**dailyDecimals** | **int** | Number of decimal places to calculate Daily Rates | [optional] +**dailyDivisor** | **float** | Days used to determine Full time Daily Rate | [optional] +**department** | **string** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **fullTimeHours** | **float** | Maximum Full Time Hours on this Pay Spine | [optional] **fullTimeWeeks** | **float** | Maximum Full Time Weeks on this Pay Spine | [optional] -**salaryFormula** | **string** | Formula used to derive annual salary | [optional] -**hourlyDivisor** | **float** | Hours used to determine Hourly Rate | [optional] +**gradeEffectiveDate** | **\DateTime** | Effective date for applicable grades | [optional] **hourlyDecimals** | **int** | Number of decimal places to calculate Hourly Rates | [optional] -**dailyDivisor** | **float** | Days used to determine Full time Daily Rate | [optional] -**dailyDecimals** | **int** | Number of decimal places to calculate Daily Rates | [optional] -**annualDecimals** | **int** | Number of decimal places to calculate Annual Salaries | [optional] -**annualRoundingRule** | [**\SynergiTech\Staffology\Model\AnnualRoundingRule**](AnnualRoundingRule.md) | | [optional] +**hourlyDivisor** | **float** | Hours used to determine Hourly Rate | [optional] **incrementRule** | [**\SynergiTech\Staffology\Model\IncrementRule**](IncrementRule.md) | | [optional] -**requiresLondonAllowance** | **bool** | Requires LA column to be completed on the spine | [optional] -**gradeEffectiveDate** | **\DateTime** | Effective date for applicable grades | [optional] -**pointEffectiveDate** | **\DateTime** | Effective date for applicable spinal points | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **payrollCode** | **string** | | [optional] -**department** | **string** | | [optional] +**pointEffectiveDate** | **\DateTime** | Effective date for applicable spinal points | [optional] +**requiresLondonAllowance** | **bool** | Requires LA column to be completed on the spine | [optional] +**salaryFormula** | **string** | Formula used to derive annual salary | [optional] +**spineName** | **string** | Name of the Pay Spine | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaySpineReportReportResponse.md b/docs/Model/PaySpineReportReportResponse.md index a78485b..e6786c3 100644 --- a/docs/Model/PaySpineReportReportResponse.md +++ b/docs/Model/PaySpineReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\PaySpineReport**](PaySpineReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Payee.md b/docs/Model/Payee.md index ed3ebdb..6ad376e 100644 --- a/docs/Model/Payee.md +++ b/docs/Model/Payee.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | The name of this Payee | **bankDetails** | [**\SynergiTech\Staffology\Model\BankDetails**](BankDetails.md) | | [optional] -**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] -**paymentDateDayOfWeek** | [**\SynergiTech\Staffology\Model\DayOfWeek**](DayOfWeek.md) | | [optional] -**paymentDateDayOfMonth** | **int** | | [optional] **hasMinimumBankDetails** | **bool** | Denotes whether the payee has the minimum bank details to receive a payment | [optional] [readonly] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**paymentDateDayOfMonth** | **int** | | [optional] +**paymentDateDayOfWeek** | [**\SynergiTech\Staffology\Model\DayOfWeek**](DayOfWeek.md) | | [optional] +**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] +**title** | **string** | The name of this Payee | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaylineCalculationData.md b/docs/Model/PaylineCalculationData.md index 95d7646..38892c1 100644 --- a/docs/Model/PaylineCalculationData.md +++ b/docs/Model/PaylineCalculationData.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**fixedAnnualValue** | **float** | PaySpine full time annual value | [optional] **contractedHours** | **float** | PaySpine contracted hours | [optional] **contractedWeeks** | **float** | PaySpine contracted weeks | [optional] +**fixedAnnualValue** | **float** | PaySpine full time annual value | [optional] **fullTimeEquivalent** | **float** | PaySpine full time equivalent value | [optional] **fullTimeHours** | **float** | PaySpine full time hours | [optional] -**fullTimeWeeks** | **float** | PaySpine full time weeks | [optional] **fullTimeSalary** | **float** | PaySpine full time salary | [optional] +**fullTimeWeeks** | **float** | PaySpine full time weeks | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentsCsvMapping.md b/docs/Model/PaymentsCsvMapping.md index 7dd4749..8748662 100644 --- a/docs/Model/PaymentsCsvMapping.md +++ b/docs/Model/PaymentsCsvMapping.md @@ -4,33 +4,33 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | -**type** | [**\SynergiTech\Staffology\Model\PaymentsCsvMappingType**](PaymentsCsvMappingType.md) | | [optional] -**importBehaviour** | **int** | | [optional] -**payBasis** | [**\SynergiTech\Staffology\Model\PayBasis**](PayBasis.md) | | [optional] -**hasHeader** | **bool** | | [optional] -**payrollCodeIndex** | **int** | | [optional] -**employerIdIndex** | **int** | | [optional] -**roleReferenceIndex** | **int** | | [optional] -**payAmountIndex** | **int** | | [optional] -**payAmountMultiplierIndex** | **int** | | [optional] -**noteIndex** | **int** | | [optional] -**payCodeIndex** | **int** | | [optional] -**hasPaylineCosting** | **bool** | | [optional] -**departmentIndex** | **int** | | [optional] +**analysisCategoryIndexes** | [**\SynergiTech\Staffology\Model\AnalysisCategoryIndex[]**](AnalysisCategoryIndex.md) | | [optional] +**analysisCategoryIndexesJson** | **string** | | [optional] +**autoAdjustForLeaveIndex** | **int** | | [optional] +**columns** | [**\SynergiTech\Staffology\Model\PaymentsCsvMappingColumn[]**](PaymentsCsvMappingColumn.md) | | [optional] +**contributesToBasicPayIndex** | **int** | | [optional] **costCentreIndex** | **int** | | [optional] +**departmentIndex** | **int** | | [optional] **effectiveFromIndex** | **int** | | [optional] **effectiveToIndex** | **int** | | [optional] -**isAutomaticBackPayIndex** | **int** | | [optional] +**employerIdIndex** | **int** | | [optional] +**hasHeader** | **bool** | | [optional] +**hasPaylineCosting** | **bool** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **ignoreInitialBackPayIndex** | **int** | | [optional] -**contributesToBasicPayIndex** | **int** | | [optional] -**autoAdjustForLeaveIndex** | **int** | | [optional] -**analysisCategoryIndexesJson** | **string** | | [optional] -**paySpineIndex** | **int** | | [optional] +**importBehaviour** | **int** | | [optional] +**isAutomaticBackPayIndex** | **int** | | [optional] +**name** | **string** | | +**noteIndex** | **int** | | [optional] +**payAmountIndex** | **int** | | [optional] +**payAmountMultiplierIndex** | **int** | | [optional] +**payBasis** | [**\SynergiTech\Staffology\Model\PayBasis**](PayBasis.md) | | [optional] +**payCodeIndex** | **int** | | [optional] **payGradeIndex** | **int** | | [optional] +**paySpineIndex** | **int** | | [optional] +**payrollCodeIndex** | **int** | | [optional] +**roleReferenceIndex** | **int** | | [optional] **spinePointIndex** | **int** | | [optional] -**analysisCategoryIndexes** | [**\SynergiTech\Staffology\Model\AnalysisCategoryIndex[]**](AnalysisCategoryIndex.md) | | [optional] -**columns** | [**\SynergiTech\Staffology\Model\PaymentsCsvMappingColumn[]**](PaymentsCsvMappingColumn.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**type** | [**\SynergiTech\Staffology\Model\PaymentsCsvMappingType**](PaymentsCsvMappingType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentsCsvMappingColumn.md b/docs/Model/PaymentsCsvMappingColumn.md index a184000..bc53d2b 100644 --- a/docs/Model/PaymentsCsvMappingColumn.md +++ b/docs/Model/PaymentsCsvMappingColumn.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | | **code** | **string** | | [optional] -**isReferenceOnly** | **bool** | If set to true then no PayCode is mapped and this column is just for on-screen refernece only | [optional] **colIndex** | **int** | | [optional] **isMultiplier** | **bool** | | [optional] **isNetToGross** | **bool** | | [optional] +**isReferenceOnly** | **bool** | If set to true then no PayCode is mapped and this column is just for on-screen refernece only | [optional] **rateColIndex** | **int** | If the mapping IsMultiplier, then this optionally specifies another column from which to get the value | [optional] **shouldSerializeRateColIndex** | **bool** | | [optional] [readonly] +**title** | **string** | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayrollAnalysisCostBreakdownReport.md b/docs/Model/PayrollAnalysisCostBreakdownReport.md index eee77f7..4a0fde0 100644 --- a/docs/Model/PayrollAnalysisCostBreakdownReport.md +++ b/docs/Model/PayrollAnalysisCostBreakdownReport.md @@ -4,21 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**lines** | [**\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportLine[]**](PayrollAnalysisCostBreakdownReportLine.md) | | [optional] -**payCodes** | [**\SynergiTech\Staffology\Model\PayCode[]**](PayCode.md) | | [optional] **employeesPayRunTotals** | [**\SynergiTech\Staffology\Model\EmployeePayRunTotal[]**](EmployeePayRunTotal.md) | | [optional] **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**isDraft** | **bool** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportLine[]**](PayrollAnalysisCostBreakdownReportLine.md) | | [optional] **ordinal** | **int** | | [optional] +**payCodes** | [**\SynergiTech\Staffology\Model\PayCode[]**](PayCode.md) | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayrollAnalysisCostBreakdownReportLine.md b/docs/Model/PayrollAnalysisCostBreakdownReportLine.md index a0dd023..ae608c7 100644 --- a/docs/Model/PayrollAnalysisCostBreakdownReportLine.md +++ b/docs/Model/PayrollAnalysisCostBreakdownReportLine.md @@ -4,29 +4,29 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollCode** | **string** | | [optional] -**lastName** | **string** | | [optional] -**department** | [**\SynergiTech\Staffology\Model\StringStringDecimalValueTuple**](StringStringDecimalValueTuple.md) | | [optional] **costCentre** | [**\SynergiTech\Staffology\Model\StringStringDecimalValueTuple**](StringStringDecimalValueTuple.md) | | [optional] +**department** | [**\SynergiTech\Staffology\Model\StringStringDecimalValueTuple**](StringStringDecimalValueTuple.md) | | [optional] +**employeeNi** | **float** | | [optional] +**employeePension** | **float** | The value of the Pension Contribution(PENSION) being made by the Employee | [optional] +**employeePensionContributionReliefAtSource** | **float** | The value of the Pension Contribution Relief At Source(PENSIONRAS) being made by the Employee | [optional] +**employeePensionContributionSalarySacrifice** | **float** | The value of the Pension Contribution Salary Sacrifice(PENSIONSS) being made by the Employee | [optional] **employeeRoleAnalysisCategory** | [**array**](StringDecimalKeyValuePair.md) | | [optional] +**ersNi** | **float** | | [optional] +**ersPension** | **float** | | [optional] +**lastName** | **string** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportValue[]**](PayrollAnalysisCostBreakdownReportValue.md) | | [optional] -**totalPay** | **float** | | [optional] +**niPercent** | **float** | | [optional] **niablePay** | **float** | | [optional] +**payrollCode** | **string** | | [optional] **pensionPay** | **float** | | [optional] -**niPercent** | **float** | | [optional] -**ersNi** | **float** | | [optional] **pensionPercent** | **float** | | [optional] -**ersPension** | **float** | | [optional] -**taxablePay** | **float** | | [optional] -**taxablePercent** | **float** | | [optional] -**employeeNi** | **float** | | [optional] -**taxPaid** | **float** | | [optional] -**studentLoan** | **float** | | [optional] -**employeePension** | **float** | The value of the Pension Contribution(PENSION) being made by the Employee | [optional] -**employeePensionContributionSalarySacrifice** | **float** | The value of the Pension Contribution Salary Sacrifice(PENSIONSS) being made by the Employee | [optional] -**employeePensionContributionReliefAtSource** | **float** | The value of the Pension Contribution Relief At Source(PENSIONRAS) being made by the Employee | [optional] **pensionSummaryCostBreakdowns** | [**\SynergiTech\Staffology\Model\PensionSummaryCostBreakdown[]**](PensionSummaryCostBreakdown.md) | List of pension summaries, each representing a breakdown of various pension components | [optional] **roleId** | **string** | RoleId of that particular line entry | [optional] **roleWeightage** | **float** | Weightage value of the given employee role | [optional] +**studentLoan** | **float** | | [optional] +**taxPaid** | **float** | | [optional] +**taxablePay** | **float** | | [optional] +**taxablePercent** | **float** | | [optional] +**totalPay** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayrollAnalysisCostBreakdownReportReportResponse.md b/docs/Model/PayrollAnalysisCostBreakdownReportReportResponse.md index 17e3753..f996483 100644 --- a/docs/Model/PayrollAnalysisCostBreakdownReportReportResponse.md +++ b/docs/Model/PayrollAnalysisCostBreakdownReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReport**](PayrollAnalysisCostBreakdownReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayrollAnalysisCostBreakdownReportValue.md b/docs/Model/PayrollAnalysisCostBreakdownReportValue.md index aa6affa..8acbcd6 100644 --- a/docs/Model/PayrollAnalysisCostBreakdownReportValue.md +++ b/docs/Model/PayrollAnalysisCostBreakdownReportValue.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**qty** | **float** | | [optional] **code** | **string** | | [optional] +**qty** | **float** | | [optional] **value** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReport.md b/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReport.md index a40ae6b..a35ed15 100644 --- a/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReport.md +++ b/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReport.md @@ -4,20 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLine[]**](PayrollAnalysisEmployeeRoleBreakdownReportLine.md) | | [optional] +**ordinal** | **int** | | [optional] **payCodes** | [**\SynergiTech\Staffology\Model\PayCode[]**](PayCode.md) | | [optional] -**employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**ordinal** | **int** | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReportLine.md b/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReportLine.md index b2041fb..1cc5147 100644 --- a/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReportLine.md +++ b/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReportLine.md @@ -4,17 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**department** | [**\SynergiTech\Staffology\Model\DepartmentMembership**](DepartmentMembership.md) | | [optional] **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**fullEmployee** | [**\SynergiTech\Staffology\Model\Employee**](Employee.md) | | [optional] **employeeRole** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**department** | [**\SynergiTech\Staffology\Model\DepartmentMembership**](DepartmentMembership.md) | | [optional] +**employerNic** | **float** | | [optional] +**ersPension** | **float** | | [optional] +**fullEmployee** | [**\SynergiTech\Staffology\Model\Employee**](Employee.md) | | [optional] **gross** | **float** | | [optional] -**niableGross** | **float** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLineValue[]**](PayrollAnalysisEmployeeRoleBreakdownReportLineValue.md) | | [optional] **net** | **float** | | [optional] -**takeHome** | **float** | | [optional] -**employerNic** | **float** | | [optional] +**niableGross** | **float** | | [optional] **showQtyColumn** | **bool** | | [optional] -**lines** | [**\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLineValue[]**](PayrollAnalysisEmployeeRoleBreakdownReportLineValue.md) | | [optional] -**ersPension** | **float** | | [optional] +**takeHome** | **float** | | [optional] +**taxablePay** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReportLineValue.md b/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReportLineValue.md index fb59b5f..c1b0e6a 100644 --- a/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReportLineValue.md +++ b/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReportLineValue.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**qty** | **float** | | [optional] **code** | **string** | | [optional] +**qty** | **float** | | [optional] **value** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReportReportResponse.md b/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReportReportResponse.md index 7d86498..d60a472 100644 --- a/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReportReportResponse.md +++ b/docs/Model/PayrollAnalysisEmployeeRoleBreakdownReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReport**](PayrollAnalysisEmployeeRoleBreakdownReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayrunEmail.md b/docs/Model/PayrunEmail.md index e2246c6..109d9ce 100644 --- a/docs/Model/PayrunEmail.md +++ b/docs/Model/PayrunEmail.md @@ -4,26 +4,26 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**isActive** | **bool** | If false then this email won't be sent | [optional] -**name** | **string** | Only used for reference, not included in the email | -**templateType** | [**\SynergiTech\Staffology\Model\EmployerTemplateType**](EmployerTemplateType.md) | | [optional] -**recipientAddress** | **string** | The address to which the email should be sent | -**pdfPassword** | **string** | If a value is provided, then all PDFs attached to the email will be encrypted using this password | [optional] -**attachPayslips** | **bool** | If set to true then Payslips will be attached to the email | [optional] -**payslipsUnemailed** | **bool** | If AttachPayslips is true and this property is also true then only payslips that haven't already been sent directly to employees will be attached. | [optional] -**payslipsSingleFile** | **bool** | If AttachPayslips is true and this property is also true then the payslips will be attached as a single file rather than as separate PDFs, | [optional] -**attachPaymentSummary** | **bool** | If set to True then the PaymentSummary report will be attached to the Email | [optional] -**attachP32** | **bool** | If set to True then the P32 report will be attached to the email | [optional] -**attachP30** | **bool** | If set to True then the P30 report will be attached to the email | [optional] -**attachGrossToNet** | **bool** | If set to True then the GrossToNet report will be attached to the email | [optional] -**attachPensionContributions** | **bool** | If set to True then the Pensions Contributions report will be attached to the email | [optional] +**attachBankPayments** | **bool** | If set to True then the Bank Payments CSV file will be attached to the email | [optional] **attachCostAnalysis** | **bool** | If set to True then the Cost Analysis report will be attached to the email | [optional] **attachCostOfEmployment** | **bool** | If set to True then the Cost of Employment report will be attached to the email | [optional] **attachFullSummaryOfPay** | **bool** | If set to True then the Full Summary Of Payment report will be attached to the email | [optional] -**attachBankPayments** | **bool** | If set to True then the Bank Payments CSV file will be attached to the email | [optional] -**customSubject** | **string** | If TemplateType is null then you can provide a subject line here to be used for the email | [optional] +**attachGrossToNet** | **bool** | If set to True then the GrossToNet report will be attached to the email | [optional] +**attachP30** | **bool** | If set to True then the P30 report will be attached to the email | [optional] +**attachP32** | **bool** | If set to True then the P32 report will be attached to the email | [optional] +**attachPaymentSummary** | **bool** | If set to True then the PaymentSummary report will be attached to the Email | [optional] +**attachPayslips** | **bool** | If set to true then Payslips will be attached to the email | [optional] +**attachPensionContributions** | **bool** | If set to True then the Pensions Contributions report will be attached to the email | [optional] +**childId** | **string** | This is nothing but the UniqueId of the model. | [optional] **customBody** | **string** | If TemplateType is null then you can provide the body text here to be used for the email | [optional] **customBodyIsHtml** | **bool** | If the CustomBody is in HTML format, set this to true. | [optional] -**childId** | **string** | This is nothing but the UniqueId of the model. | [optional] +**customSubject** | **string** | If TemplateType is null then you can provide a subject line here to be used for the email | [optional] +**isActive** | **bool** | If false then this email won't be sent | [optional] +**name** | **string** | Only used for reference, not included in the email | +**payslipsSingleFile** | **bool** | If AttachPayslips is true and this property is also true then the payslips will be attached as a single file rather than as separate PDFs, | [optional] +**payslipsUnemailed** | **bool** | If AttachPayslips is true and this property is also true then only payslips that haven't already been sent directly to employees will be attached. | [optional] +**pdfPassword** | **string** | If a value is provided, then all PDFs attached to the email will be encrypted using this password | [optional] +**recipientAddress** | **string** | The address to which the email should be sent | +**templateType** | [**\SynergiTech\Staffology\Model\EmployerTemplateType**](EmployerTemplateType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayrunPaymentsReport.md b/docs/Model/PayrunPaymentsReport.md index e99ba1c..b77a2e3 100644 --- a/docs/Model/PayrunPaymentsReport.md +++ b/docs/Model/PayrunPaymentsReport.md @@ -4,23 +4,25 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payments** | [**\SynergiTech\Staffology\Model\PayRunPayment[]**](PayRunPayment.md) | | [optional] -**status** | [**\SynergiTech\Staffology\Model\BackgroundTaskStatus**](BackgroundTaskStatus.md) | | [optional] -**statusMessage** | **string** | [readonly] A message to elaborate on the Status | [optional] -**link** | **string** | [readonly] If available, a link to the payments in an ExternalDataProvider | [optional] +**allowRepost** | **bool** | | [optional] **connectedExternalDataProvider** | [**\SynergiTech\Staffology\Model\ExternalDataProvider**](ExternalDataProvider.md) | | [optional] **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**isDraft** | **bool** | | [optional] +**link** | **string** | [readonly] If available, a link to the payments in an ExternalDataProvider | [optional] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**payments** | [**\SynergiTech\Staffology\Model\PayRunPayment[]**](PayRunPayment.md) | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] +**status** | [**\SynergiTech\Staffology\Model\BackgroundTaskStatus**](BackgroundTaskStatus.md) | | [optional] +**statusMessage** | **string** | [readonly] A message to elaborate on the Status | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayrunPaymentsReportReportResponse.md b/docs/Model/PayrunPaymentsReportReportResponse.md index b587565..b9d78c8 100644 --- a/docs/Model/PayrunPaymentsReportReportResponse.md +++ b/docs/Model/PayrunPaymentsReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\PayrunPaymentsReport**](PayrunPaymentsReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Payslip.md b/docs/Model/Payslip.md index 00a4e20..599d0ba 100644 --- a/docs/Model/Payslip.md +++ b/docs/Model/Payslip.md @@ -4,37 +4,39 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**isClosed** | **bool** | [readonly] Indicates if the Payrun has been finalised | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**periodNumber** | **int** | | [optional] -**period** | **string** | [readonly] A description of the period that Payslip relates to. | [optional] -**from** | **\DateTime** | [readonly] The start date of the period this Payslip covers. | [optional] -**to** | **\DateTime** | [readonly] The end date of the period this Payslip covers. | [optional] -**paymentDate** | **\DateTime** | [readonly] The date the Employee will be paid on | [optional] -**note** | **string** | [readonly] Any note that should appear on the payslip | [optional] **allowanceNote** | **string** | [readonly] Details of remaining allowance to show on payslip | [optional] +**costCentres** | [**\SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]**](StringDecimalKeyValuePair.md) | The employees Cost Centre Membership(s) only populated when creating journals | [optional] +**departmentMemberships** | [**\SynergiTech\Staffology\Model\DepartmentMembership[]**](DepartmentMembership.md) | The Employee Department Membership(s) by role only populated when creating journals | [optional] +**depts** | [**\SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]**](StringDecimalKeyValuePair.md) | The employees Department Membership(s) at the time the payrun was finalised | [optional] **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**logoUrl** | **string** | [readonly] The Logo to include on the payslip | [optional] +**employeeCostCentres** | [**\SynergiTech\Staffology\Model\EmployeeCostCentre[]**](EmployeeCostCentre.md) | The Employee Cost Centre Membership(s) by role only populated when creating journals | [optional] +**employeePensionContributions** | [**array**](DecimalDecimalBooleanPensionRuleValueTuple.md) | Dictionary of Pension Contributions(s) Keyed on PensionId containing Employee Pension and AVC Contribution(s) Bfd, AVC indicator and pension rule | [optional] +**employeeRoleAnalysisCategoryCodes** | [**\SynergiTech\Staffology\Model\EmployeeRoleAnalysisCategoryCode[]**](EmployeeRoleAnalysisCategoryCode.md) | The EmployeeRoleAnalysisCategoryCodes only populated when creating journals | [optional] **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **employerAddress** | [**\SynergiTech\Staffology\Model\Address**](Address.md) | | [optional] +**employerNi** | **float** | [readonly] The Employer NI Contribution amount | [optional] +**employerPensionContribs** | **float** | [readonly] The Employer Pension Contribution Amount | [optional] +**employerPensionContributions** | [**\SynergiTech\Staffology\Model\EmployerPensionContribution[]**](EmployerPensionContribution.md) | [readonly] The list of Employer Pension Contribution(s) | [optional] +**employmentDetails** | [**\SynergiTech\Staffology\Model\EmploymentDetails**](EmploymentDetails.md) | | [optional] +**from** | **\DateTime** | [readonly] The start date of the period this Payslip covers. | [optional] **hmrcDetails** | [**\SynergiTech\Staffology\Model\HmrcDetails**](HmrcDetails.md) | | [optional] +**isClosed** | **bool** | [readonly] Indicates if the Payrun has been finalised | [optional] +**isSupplementary** | **bool** | Indicates if this payslip is for a supplementary pay run | [optional] +**lines** | [**\SynergiTech\Staffology\Model\PayslipLine[]**](PayslipLine.md) | [readonly] The lines to display on the Payslip | [optional] +**logoUrl** | **string** | [readonly] The Logo to include on the payslip | [optional] +**note** | **string** | [readonly] Any note that should appear on the payslip | [optional] +**originalPayRunPaymentDate** | **\DateTime** | Original PayRun's Payment Date | [optional] **payOptions** | [**\SynergiTech\Staffology\Model\PayOptions**](PayOptions.md) | | [optional] -**employmentDetails** | [**\SynergiTech\Staffology\Model\EmploymentDetails**](EmploymentDetails.md) | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**paymentDate** | **\DateTime** | [readonly] The date the Employee will be paid on | [optional] +**pensionContributionsByRole** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | The Pension Employer contribution by role only populated when creating journals | [optional] +**period** | **string** | [readonly] A description of the period that Payslip relates to. | [optional] +**periodNumber** | **int** | | [optional] **personalDetails** | [**\SynergiTech\Staffology\Model\PersonalDetails**](PersonalDetails.md) | | [optional] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**to** | **\DateTime** | [readonly] The end date of the period this Payslip covers. | [optional] **totals** | [**\SynergiTech\Staffology\Model\PayRunTotals**](PayRunTotals.md) | | [optional] **totalsYtd** | [**\SynergiTech\Staffology\Model\PayRunTotals**](PayRunTotals.md) | | [optional] -**lines** | [**\SynergiTech\Staffology\Model\PayslipLine[]**](PayslipLine.md) | [readonly] The lines to display on the Payslip | [optional] -**employerNi** | **float** | [readonly] The Employer NI Contribution amount | [optional] -**employerPensionContribs** | **float** | [readonly] The Employer Pension Contribution Amount | [optional] -**depts** | [**\SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]**](StringDecimalKeyValuePair.md) | The employees Department Membership(s) at the time the payrun was finalised | [optional] **umbrellaPayment** | [**\SynergiTech\Staffology\Model\UmbrellaPayment**](UmbrellaPayment.md) | | [optional] -**costCentres** | [**\SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]**](StringDecimalKeyValuePair.md) | The employees Cost Centre Membership(s) only populated when creating journals | [optional] -**employeeRoleAnalysisCategoryCodes** | [**\SynergiTech\Staffology\Model\EmployeeRoleAnalysisCategoryCode[]**](EmployeeRoleAnalysisCategoryCode.md) | The EmployeeRoleAnalysisCategoryCodes only populated when creating journals | [optional] -**employeeCostCentres** | [**\SynergiTech\Staffology\Model\EmployeeCostCentre[]**](EmployeeCostCentre.md) | The Employee Cost Centre Membership(s) by role only populated when creating journals | [optional] -**departmentMemberships** | [**\SynergiTech\Staffology\Model\DepartmentMembership[]**](DepartmentMembership.md) | The Employee Department Membership(s) by role only populated when creating journals | [optional] -**pensionContributionsByRole** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | The Pension Employer contribution by role only populated when creating journals | [optional] -**employerPensionContributions** | [**\SynergiTech\Staffology\Model\EmployerPensionContribution[]**](EmployerPensionContribution.md) | [readonly] The list of Employer Pension Contribution(s) | [optional] -**employeePensionContributions** | [**array**](DecimalDecimalBooleanPensionRuleValueTuple.md) | Dictionary of Pension Contributions(s) Keyed on PensionId containing Employee Pension and AVC Contribution(s) Bfd, AVC indicator and pension rule | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayslipCustomisation.md b/docs/Model/PayslipCustomisation.md index aba2437..515d5a3 100644 --- a/docs/Model/PayslipCustomisation.md +++ b/docs/Model/PayslipCustomisation.md @@ -5,20 +5,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **custom** | **bool** | Whether or not you are customising the Payslip. This should always be true if you are providing any other values. | [optional] -**includeLogo** | **bool** | Whether or not to include the employer logo on the payslip. | [optional] -**customCssOption** | [**\SynergiTech\Staffology\Model\ReportCustomCssOption**](ReportCustomCssOption.md) | | [optional] **customCss** | **string** | | [optional] -**removeYtd** | **bool** | Whether or not to remove the YTD column | [optional] -**includeEmployerAddress** | **bool** | Whether or not to include the employer address | [optional] -**useUmbrellaFormat** | **bool** | If true then the format the payslip will include details of the Umbrella Payment as well as employer costs | [optional] +**customCssOption** | [**\SynergiTech\Staffology\Model\ReportCustomCssOption**](ReportCustomCssOption.md) | | [optional] **filename** | **string** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**includeBenefits** | **bool** | Whether or not to include any payrolled benefits | [optional] **includeDepartment** | **bool** | Whether or not to include the primary department of the employee on the payslip | [optional] +**includeEmployerAddress** | **bool** | Whether or not to include the employer address | [optional] **includeHealthAndSocialCareMessage** | **bool** | Whether or not to include health and social car message | [optional] -**includeBenefits** | **bool** | Whether or not to include any payrolled benefits | [optional] -**removePensionYtd** | **bool** | Whether or not to remove the pension YTD column | [optional] -**paperSize** | [**\SynergiTech\Staffology\Model\PdfPaperSize**](PdfPaperSize.md) | | [optional] -**orientation** | [**\SynergiTech\Staffology\Model\PdfPaperOrientation**](PdfPaperOrientation.md) | | [optional] +**includeLogo** | **bool** | Whether or not to include the employer logo on the payslip. | [optional] **margins** | [**\SynergiTech\Staffology\Model\PdfPaperMargins**](PdfPaperMargins.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**orientation** | [**\SynergiTech\Staffology\Model\PdfPaperOrientation**](PdfPaperOrientation.md) | | [optional] +**paperSize** | [**\SynergiTech\Staffology\Model\PdfPaperSize**](PdfPaperSize.md) | | [optional] +**removePensionYtd** | **bool** | Whether or not to remove the pension YTD column | [optional] +**removeYtd** | **bool** | Whether or not to remove the YTD column | [optional] +**useUmbrellaFormat** | **bool** | If true then the format the payslip will include details of the Umbrella Payment as well as employer costs | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayslipLine.md b/docs/Model/PayslipLine.md index 7d1f69e..3ccf928 100644 --- a/docs/Model/PayslipLine.md +++ b/docs/Model/PayslipLine.md @@ -4,25 +4,25 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\SynergiTech\Staffology\Model\PayslipLineType**](PayslipLineType.md) | | [optional] -**code** | **string** | | [optional] -**description** | **string** | | [optional] -**secondaryDescription** | **string** | | [optional] -**value** | **float** | | [optional] -**multiplier** | **float** | [readonly] If the Code is a multiplier code then this is the multiplier. Value has already been calculated so this is just for reference | [optional] **attachmentOrderId** | **string** | [readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO | [optional] -**pensionId** | **string** | [readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS | [optional] -**loanId** | **string** | [readonly] The Id of the associated Loan, if any. | [optional] +**code** | **string** | | [optional] +**contributesToBasicPay** | **bool** | | [optional] **currencySymbol** | **string** | | [optional] +**description** | **string** | | [optional] **formattedValue** | **string** | | [optional] [readonly] -**isNetToGross** | **bool** | If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. | [optional] -**targetNetToGrossValue** | **float** | The orginal net fixed addition amount that is considered to be a take home pay target. | [optional] -**leaveId** | **string** | | [optional] -**roleId** | **string** | The employee role which is associated with this payslip line. If set to null, the payslip line is not related with a role. | [optional] +**hasSecondaryDescription** | **bool** | | [optional] [readonly] **isAutoCalculatedBackPayLine** | **bool** | | [optional] **isAutomaticBackPay** | **bool** | | [optional] -**hasSecondaryDescription** | **bool** | | [optional] [readonly] -**contributesToBasicPay** | **bool** | | [optional] +**isNetToGross** | **bool** | If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. | [optional] **isNotional** | **bool** | Determines whether the transaction involves non-monetary benefits for payroll processing, potentially subject to tax and National Insurance | [optional] +**leaveId** | **string** | | [optional] +**loanId** | **string** | [readonly] The Id of the associated Loan, if any. | [optional] +**multiplier** | **float** | [readonly] If the Code is a multiplier code then this is the multiplier. Value has already been calculated so this is just for reference | [optional] +**pensionId** | **string** | [readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS | [optional] +**roleId** | **string** | The employee role which is associated with this payslip line. If set to null, the payslip line is not related with a role. | [optional] +**secondaryDescription** | **string** | | [optional] +**targetNetToGrossValue** | **float** | The orginal net fixed addition amount that is considered to be a take home pay target. | [optional] +**type** | [**\SynergiTech\Staffology\Model\PayslipLineType**](PayslipLineType.md) | | [optional] +**value** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PayslipReportResponse.md b/docs/Model/PayslipReportResponse.md index 398b39e..bc6d811 100644 --- a/docs/Model/PayslipReportResponse.md +++ b/docs/Model/PayslipReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\Payslip**](Payslip.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PdfPaperMargins.md b/docs/Model/PdfPaperMargins.md index cf034f9..047857a 100644 --- a/docs/Model/PdfPaperMargins.md +++ b/docs/Model/PdfPaperMargins.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**top** | **float** | | [optional] -**right** | **float** | | [optional] **bottom** | **float** | | [optional] **left** | **float** | | [optional] +**right** | **float** | | [optional] +**top** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Pension.md b/docs/Model/Pension.md index c6def8f..4814937 100644 --- a/docs/Model/Pension.md +++ b/docs/Model/Pension.md @@ -4,44 +4,44 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**additionalVoluntaryContribution** | **float** | Any additional voluntary amount the employer contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. | [optional] +**aeStatusAtJoining** | [**\SynergiTech\Staffology\Model\AeStatus**](AeStatus.md) | | [optional] +**associatedEmployeeRoles** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | The list of employee roles associated with the pension membership | [optional] +**autoEnrolled** | **bool** | [readonly] Is True if the employee joined this Pension due to an AutoEnrolment action | [optional] +**avcIsPercentage** | **bool** | Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, | [optional] **contributionLevelType** | [**\SynergiTech\Staffology\Model\PensionContributionLevelType**](PensionContributionLevelType.md) | | [optional] -**endDate** | **\DateTime** | The date the employee left the scheme | [optional] -**endReason** | [**\SynergiTech\Staffology\Model\PensionEndReason**](PensionEndReason.md) | | [optional] -**joinReason** | [**\SynergiTech\Staffology\Model\PensionJoinReason**](PensionJoinReason.md) | | [optional] -**startPayRunEntryId** | **int** | [readonly] Holds the Id for the payroll that the employee joined the scheme | [optional] -**endPayRunEntryId** | **int** | [readonly] Holds the Id for the payroll that the employee left the scheme | [optional] -**startReportingType** | [**\SynergiTech\Staffology\Model\PensionReportingType**](PensionReportingType.md) | | [optional] -**endReportingType** | [**\SynergiTech\Staffology\Model\PensionReportingType**](PensionReportingType.md) | | [optional] -**pensionOpeningBalances** | [**\SynergiTech\Staffology\Model\PensionOpeningBalances**](PensionOpeningBalances.md) | | [optional] -**reasonForLeaving** | **string** | If a value is provided for EndDate then this is the reason for leaving the employee left the scheme | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] -**pensionSchemeId** | **string** | | [optional] -**pensionScheme** | [**\SynergiTech\Staffology\Model\PensionScheme**](PensionScheme.md) | | [optional] -**workerGroupId** | **string** | | [optional] -**workerGroup** | [**\SynergiTech\Staffology\Model\WorkerGroup**](WorkerGroup.md) | | [optional] -**startDate** | **\DateTime** | | [optional] -**memberReferenceNumber** | **string** | | [optional] -**overrideContributions** | **bool** | If this is set to true then the Contributions levels set for the WorkerGroup will be replaced with the values provided here | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **employeeContribution** | **float** | The amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on EmployeeContributionIsPercentage. This is read-only if OverrideContributions is false | [optional] **employeeContributionIsPercentage** | **bool** | Determines whether the Value of the EmployeeContribution is a fixed amount or a percentage, | [optional] **employerContribution** | **float** | The amount the employer contributes towards the pension. Could be a percentage or a fixed amount depending on EmployerContributionIsPercentage. This is read-only if OverrideContributions is false | [optional] +**employerContributionIncludesNiSaving** | **bool** | Employer Contribution includes the Employers NI saving | [optional] **employerContributionIsPercentage** | **bool** | Determines whether the Value of the EmployerContribution is a fixed amount or a percentage, | [optional] +**employerContributionNiSavingPercentage** | **float** | Increase Employer Contribution by this percentage of the Employers NI saving | [optional] **employerContributionTopUpPercentage** | **float** | Increase Employer Contribution by this percentage of the Employee Contribution | [optional] +**endDate** | **\DateTime** | The date the employee left the scheme | [optional] +**endPayRunEntryId** | **int** | [readonly] Holds the Id for the payroll that the employee left the scheme | [optional] +**endReason** | [**\SynergiTech\Staffology\Model\PensionEndReason**](PensionEndReason.md) | | [optional] +**endReportingType** | [**\SynergiTech\Staffology\Model\PensionReportingType**](PensionReportingType.md) | | [optional] +**exitViaProvider** | **bool** | | [optional] [readonly] +**externalEmployeeId** | **string** | [readonly] | [optional] +**fiftyFiftySchemeMember** | **bool** | if an employee as a member of the 50/50 LGPS scheme, they can enable contribution to 50% of the normal contributions. | [optional] +**forceEnrolment** | **bool** | If the PensionScheme is connected to an ExternalDataProvider that supports enrolment then setting this to true will force this employee to be enrolled with the next submission. | [optional] +**forcedTier** | **string** | If the WorkerGroup ContributionLevelType is a Tiered Scheme then you can specify the name of the tier to force the employee on to. If none is specified then the Tier is determined by the earnings in the period | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **isAeQualifyingScheme** | **bool** | [readonly] Whether or not the associated PensionScheme is a Qualifying Scheme for AutoEnrolment | [optional] **isTeachersPension** | **bool** | [readonly] Whether or not the associated PensionScheme is a Teachers' Pension (determined by its CsvFormat) | [optional] -**aeStatusAtJoining** | [**\SynergiTech\Staffology\Model\AeStatus**](AeStatus.md) | | [optional] -**externalEmployeeId** | **string** | [readonly] | [optional] -**additionalVoluntaryContribution** | **float** | Any additional voluntary amount the employer contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. | [optional] -**avcIsPercentage** | **bool** | Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, | [optional] -**exitViaProvider** | **bool** | | [optional] [readonly] +**joinReason** | [**\SynergiTech\Staffology\Model\PensionJoinReason**](PensionJoinReason.md) | | [optional] +**memberReferenceNumber** | **string** | | [optional] +**overrideContributions** | **bool** | If this is set to true then the Contributions levels set for the WorkerGroup will be replaced with the values provided here | [optional] +**pensionOpeningBalances** | [**\SynergiTech\Staffology\Model\PensionOpeningBalances**](PensionOpeningBalances.md) | | [optional] +**pensionScheme** | [**\SynergiTech\Staffology\Model\PensionScheme**](PensionScheme.md) | | [optional] +**pensionSchemeId** | **string** | | [optional] +**reasonForLeaving** | **string** | If a value is provided for EndDate then this is the reason for leaving the employee left the scheme | [optional] +**startDate** | **\DateTime** | | [optional] +**startPayRunEntryId** | **int** | [readonly] Holds the Id for the payroll that the employee joined the scheme | [optional] +**startReportingType** | [**\SynergiTech\Staffology\Model\PensionReportingType**](PensionReportingType.md) | | [optional] **teachersPensionDetails** | [**\SynergiTech\Staffology\Model\TeachersPensionDetails**](TeachersPensionDetails.md) | | [optional] -**forcedTier** | **string** | If the WorkerGroup ContributionLevelType is a Tiered Scheme then you can specify the name of the tier to force the employee on to. If none is specified then the Tier is determined by the earnings in the period | [optional] -**forceEnrolment** | **bool** | If the PensionScheme is connected to an ExternalDataProvider that supports enrolment then setting this to true will force this employee to be enrolled with the next submission. | [optional] -**employerContributionIncludesNiSaving** | **bool** | Employer Contribution includes the Employers NI saving | [optional] -**employerContributionNiSavingPercentage** | **float** | Increase Employer Contribution by this percentage of the Employers NI saving | [optional] -**fiftyFiftySchemeMember** | **bool** | if an employee as a member of the 50/50 LGPS scheme, they can enable contribution to 50% of the normal contributions. | [optional] -**associatedEmployeeRoles** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | The list of employee roles associated with the pension membership | [optional] -**autoEnrolled** | **bool** | [readonly] Is True if the employee joined this Pension due to an AutoEnrolment action | [optional] +**workerGroup** | [**\SynergiTech\Staffology\Model\WorkerGroup**](WorkerGroup.md) | | [optional] +**workerGroupId** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionAdministrator.md b/docs/Model/PensionAdministrator.md index 72a742b..2df34db 100644 --- a/docs/Model/PensionAdministrator.md +++ b/docs/Model/PensionAdministrator.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | [optional] -**email** | **string** | | [optional] **address** | [**\SynergiTech\Staffology\Model\Address**](Address.md) | | [optional] -**telephone** | **string** | | [optional] +**email** | **string** | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**name** | **string** | | [optional] +**telephone** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionContributionsSubmission.md b/docs/Model/PensionContributionsSubmission.md index d882ec4..cd1631a 100644 --- a/docs/Model/PensionContributionsSubmission.md +++ b/docs/Model/PensionContributionsSubmission.md @@ -5,16 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employerId** | **int** | | [optional] -**payRunId** | **int** | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**externalId** | **string** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**payRunId** | **int** | | [optional] **period** | **int** | | [optional] -**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **schemeId** | **int** | | [optional] **status** | [**\SynergiTech\Staffology\Model\BackgroundTaskStatus**](BackgroundTaskStatus.md) | | [optional] -**externalId** | **string** | | [optional] **statusMessage** | **string** | | [optional] **submissionData** | **mixed** | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionInitialEnrolmentType.md b/docs/Model/PensionInitialEnrolmentType.md new file mode 100644 index 0000000..478c7b2 --- /dev/null +++ b/docs/Model/PensionInitialEnrolmentType.md @@ -0,0 +1,8 @@ +# # PensionInitialEnrolmentType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionMembershipReportLine.md b/docs/Model/PensionMembershipReportLine.md index 5f152ab..7bd8b51 100644 --- a/docs/Model/PensionMembershipReportLine.md +++ b/docs/Model/PensionMembershipReportLine.md @@ -4,38 +4,38 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollCode** | **string** | Payroll code of the employee | [optional] -**pensionScheme** | **string** | Employee pension scheme | [optional] -**workerGroup** | **string** | The WorkerGroup of the employee pension scheme | [optional] -**joinDate** | **string** | The Join Date of the employee | [optional] -**joinReason** | [**\SynergiTech\Staffology\Model\PensionJoinReason**](PensionJoinReason.md) | | [optional] -**isPensionJoinerActionReported** | **bool** | Indicates whether the pension joiner action is reported. | [optional] +**aeStatusAtJoining** | [**\SynergiTech\Staffology\Model\AeStatus**](AeStatus.md) | | [optional] +**assumedPensionablePayYTD** | **float** | Assumed pensionable pay year to date | [optional] +**avcPensionYTD** | **float** | Additional Voluntary Contribution YTD | [optional] +**department** | **string** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**employeePensionYTD** | **float** | Employee pension year to date | [optional] +**employerPensionYTD** | **float** | Employer pension year to date | [optional] **endDate** | **string** | Pension End Date | [optional] **endReason** | [**\SynergiTech\Staffology\Model\PensionEndReason**](PensionEndReason.md) | | [optional] -**isPensionLeaverActionReported** | **bool** | Indicates whether the pension leaver action is reported. | [optional] -**aeStatusAtJoining** | [**\SynergiTech\Staffology\Model\AeStatus**](AeStatus.md) | | [optional] -**roleRefs** | **string** | role references of employee | [optional] -**pensionEmployeeContribution** | **float** | Pension Employee Contribution | [optional] -**isEmployeeContributionPercentage** | **bool** | Indicates whether the EmployeeContribution is expressed as a percentage. | [optional] -**pensionTiers** | **string** | Pension Tiers of the employee | [optional] -**pensionAVCContribution** | **float** | Pension AVC Contribution of employee | [optional] **isAvcPercentage** | **bool** | Indicates whether the AvcContribution is expressed as a percentage. | [optional] -**pensionEmployerContribution** | **float** | Employer Pension Contribution | [optional] +**isEmployeeContributionPercentage** | **bool** | Indicates whether the EmployeeContribution is expressed as a percentage. | [optional] **isEmployerContributionPercentage** | **bool** | Indicates whether the EmployerContribution is expressed as a percentage. | [optional] -**pensionMembershipNo** | **string** | Pension Membership Number | [optional] +**isHalfContributionMember** | **bool** | 50/50 membership | [optional] +**isPensionJoinerActionReported** | **bool** | Indicates whether the pension joiner action is reported. | [optional] +**isPensionLeaverActionReported** | **bool** | Indicates whether the pension leaver action is reported. | [optional] +**joinDate** | **string** | The Join Date of the employee | [optional] +**joinReason** | [**\SynergiTech\Staffology\Model\PensionJoinReason**](PensionJoinReason.md) | | [optional] **mcrRoleID1** | **string** | MCR Role ID1 for teachers pension | [optional] **mcrRoleID2** | **string** | MCR Role ID2 for teachers pension | [optional] -**isHalfContributionMember** | **bool** | 50/50 membership | [optional] -**tpAdminNino** | **string** | Teachers Pension Admin Ni Number | [optional] +**payrollCode** | **string** | Payroll code of the employee | [optional] +**pensionAVCContribution** | **float** | Pension AVC Contribution of employee | [optional] +**pensionEmployeeContribution** | **float** | Pension Employee Contribution | [optional] +**pensionEmployerContribution** | **float** | Employer Pension Contribution | [optional] +**pensionId** | **string** | Pension Id | [optional] +**pensionMembershipNo** | **string** | Pension Membership Number | [optional] +**pensionScheme** | **string** | Employee pension scheme | [optional] +**pensionTiers** | **string** | Pension Tiers of the employee | [optional] **pensionableEarningsYTD** | **float** | Pensionable earning year to date | [optional] **pensionablePayYTD** | **float** | Pensionable Pay year to date | [optional] -**employeePensionYTD** | **float** | Employee pension year to date | [optional] -**avcPensionYTD** | **float** | Additional Voluntary Contribution YTD | [optional] -**employerPensionYTD** | **float** | Employer pension year to date | [optional] -**assumedPensionablePayYTD** | **float** | Assumed pensionable pay year to date | [optional] **reasonForLeaving** | **string** | Reason the employee left the scheme | [optional] -**pensionId** | **string** | Pension Id | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**department** | **string** | | [optional] +**roleRefs** | **string** | role references of employee | [optional] +**tpAdminNino** | **string** | Teachers Pension Admin Ni Number | [optional] +**workerGroup** | **string** | The WorkerGroup of the employee pension scheme | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionMembershipsReport.md b/docs/Model/PensionMembershipsReport.md index 6020656..ec615ce 100644 --- a/docs/Model/PensionMembershipsReport.md +++ b/docs/Model/PensionMembershipsReport.md @@ -4,19 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**lines** | [**\SynergiTech\Staffology\Model\PensionMembershipReportLine[]**](PensionMembershipReportLine.md) | | [optional] **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**isDraft** | **bool** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\PensionMembershipReportLine[]**](PensionMembershipReportLine.md) | | [optional] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionMembershipsReportReportResponse.md b/docs/Model/PensionMembershipsReportReportResponse.md index 480976a..157ec2c 100644 --- a/docs/Model/PensionMembershipsReportReportResponse.md +++ b/docs/Model/PensionMembershipsReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\PensionMembershipsReport**](PensionMembershipsReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionOpeningBalances.md b/docs/Model/PensionOpeningBalances.md index a0879f1..bbc046d 100644 --- a/docs/Model/PensionOpeningBalances.md +++ b/docs/Model/PensionOpeningBalances.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pensionableEarnings** | **float** | Opening balances for pensionable earnings | [optional] -**pensionablePay** | **float** | Opening balances for pensionable pay | [optional] +**assumedPensionablePay** | **float** | Opening balances for assumed pensionable pay | [optional] **employeePensionContribution** | **float** | Opening balances for employee pension contribution | [optional] **employeePensionContributionAvc** | **float** | Opening balances for employee pension contribution avc | [optional] **employerPensionContribution** | **float** | Opening balances for employer pension contribution | [optional] -**assumedPensionablePay** | **float** | Opening balances for assumed pensionable pay | [optional] +**pensionableEarnings** | **float** | Opening balances for pensionable earnings | [optional] +**pensionablePay** | **float** | Opening balances for pensionable pay | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionProvider.md b/docs/Model/PensionProvider.md index c78c5f2..6709424 100644 --- a/docs/Model/PensionProvider.md +++ b/docs/Model/PensionProvider.md @@ -4,24 +4,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | **accountNo** | **string** | | [optional] -**portal** | **string** | | [optional] -**website** | **string** | | [optional] **address** | [**\SynergiTech\Staffology\Model\Address**](Address.md) | | [optional] -**telephone** | **string** | | [optional] -**papdisVersion** | [**\SynergiTech\Staffology\Model\PapdisVersion**](PapdisVersion.md) | | [optional] -**papdisProviderId** | **string** | | [optional] -**papdisEmployerId** | **string** | | [optional] **csvFormat** | [**\SynergiTech\Staffology\Model\PensionCsvFormat**](PensionCsvFormat.md) | | [optional] **excludeNilPaidFromContributions** | **bool** | If we're sending contributions to an external provider then we'll include all employees that were on the payrun. If you want to exclude employees that don't have any contributions to report then set this to true. | [optional] -**payPeriodDateAdjustment** | **int** | If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here. A negative value of will move the date back in time. | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **miscBoolean1** | **bool** | This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\" | [optional] **miscBoolean2** | **bool** | This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not to approve payments after submitting contributions | [optional] **miscString1** | **string** | This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it dictates the PaymentSource. | [optional] **miscString2** | **string** | This field has different uses dependent on the ExternalDataProvider, if any. | [optional] +**name** | **string** | | **optOutWindow** | **int** | The number of days or months that an employee has to Opt out after being enrolled | [optional] **optOutWindowIsMonths** | **bool** | Determines whether the value given for OptOutWindow is in Months (true) or days (false) | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**papdisEmployerId** | **string** | | [optional] +**papdisProviderId** | **string** | | [optional] +**papdisVersion** | [**\SynergiTech\Staffology\Model\PapdisVersion**](PapdisVersion.md) | | [optional] +**payPeriodDateAdjustment** | **int** | If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here. A negative value of will move the date back in time. | [optional] +**portal** | **string** | | [optional] +**telephone** | **string** | | [optional] +**website** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionRefund.md b/docs/Model/PensionRefund.md index 0e323bd..828c2d5 100644 --- a/docs/Model/PensionRefund.md +++ b/docs/Model/PensionRefund.md @@ -4,20 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**additionalVoluntaryContribution** | **float** | | +**assumedPensionablePay** | **float** | | +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **employeeRefund** | **float** | | **employerRefund** | **float** | | -**pensionSchemeUniqueId** | **string** | | [optional] -**pensionUniqueId** | **string** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**isPreviousTaxYearRefund** | **bool** | | **payInCurrentPayRun** | **bool** | | [optional] **payRun** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**pensionSchemeUniqueId** | **string** | | [optional] +**pensionUniqueId** | **string** | | [optional] **pensionableEarning** | **float** | | **pensionablePay** | **float** | | -**additionalVoluntaryContribution** | **float** | | -**assumedPensionablePay** | **float** | | -**isPreviousTaxYearRefund** | **bool** | | **tierName** | **string** | | [optional] **tierRate** | **float** | | [optional] -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionScheme.md b/docs/Model/PensionScheme.md index 6fa28c5..7bcf767 100644 --- a/docs/Model/PensionScheme.md +++ b/docs/Model/PensionScheme.md @@ -4,36 +4,38 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | -**provider** | [**\SynergiTech\Staffology\Model\PensionProvider**](PensionProvider.md) | | [optional] **administrator** | [**\SynergiTech\Staffology\Model\PensionAdministrator**](PensionAdministrator.md) | | [optional] -**pensionRule** | [**\SynergiTech\Staffology\Model\PensionRule**](PensionRule.md) | | [optional] -**qualifyingScheme** | **bool** | Set to true if this is a Qualifying Scheme for Auto Enrolment | [optional] -**disableAeLetters** | **bool** | Set to true if the provider deals with AutoEnrolment Letters and therefore the system should not generate them | [optional] -**subtractBasicRateTax** | **bool** | | [optional] -**payMethod** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] **bankDetails** | [**\SynergiTech\Staffology\Model\BankDetails**](BankDetails.md) | | [optional] -**useCustomPayCodes** | **bool** | If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable we'll instead treat it as pensionable if the Code is included in CustomPayCodes | [optional] -**useCustomPayCodesForTierablePay** | **bool** | If set to true then rather than using the setting on the PayCode to determine if the pay is tierable we'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes | [optional] **customPayCodes** | **string[]** | If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code that we'll treat as being pensionable. | [optional] -**tierablePayCustomPayCodes** | **string[]** | If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code that we'll treat as being tierable. | [optional] -**workerGroups** | [**\SynergiTech\Staffology\Model\WorkerGroup[]**](WorkerGroup.md) | A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup | [optional] -**externalDataProviderId** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] +**deficitValue** | **float** | The Defict value that will be deducted in a PaySchedule | [optional] +**deficitValueOrdinal** | **int** | The Ordinal used to identify the PaySchedule which the Deficit will be against | [optional] +**deficitValuePayPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**disableAeLetters** | **bool** | Set to true if the provider deals with AutoEnrolment Letters and therefore the system should not generate them | [optional] **externalDataCompany** | [**\SynergiTech\Staffology\Model\ExternalDataCompany**](ExternalDataCompany.md) | | [optional] -**payCodeType** | [**\SynergiTech\Staffology\Model\PensionPayCode**](PensionPayCode.md) | | [optional] -**tierablePayPayCodeType** | [**\SynergiTech\Staffology\Model\PensionPayCode**](PensionPayCode.md) | | [optional] +**externalDataProviderId** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId**](ExternalDataProviderId.md) | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**includeDeficitValue** | **bool** | Set to true if this a Deficit Payment needs to be assigned to a PaySchedule | [optional] +**initialEnrolmentType** | [**\SynergiTech\Staffology\Model\PensionInitialEnrolmentType**](PensionInitialEnrolmentType.md) | | [optional] +**name** | **string** | | +**nominalCodeMappings** | [**\SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]**](PensionSchemeNominalCodeMapping.md) | The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration | [optional] **payCodeSetUniqueId** | **string** | | [optional] -**tierablePayPayCodeSetUniqueId** | **string** | | [optional] -**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] -**paymentDateDayOfWeek** | [**\SynergiTech\Staffology\Model\DayOfWeek**](DayOfWeek.md) | | [optional] +**payCodeType** | [**\SynergiTech\Staffology\Model\PensionPayCode**](PensionPayCode.md) | | [optional] +**payMethod** | [**\SynergiTech\Staffology\Model\PayMethod**](PayMethod.md) | | [optional] **paymentDateDayOfMonth** | **int** | | [optional] -**reportOptionsLgpsIConnect** | [**\SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsIConnect**](PensionSchemeReportOptionsLgpsIConnect.md) | | [optional] +**paymentDateDayOfWeek** | [**\SynergiTech\Staffology\Model\DayOfWeek**](DayOfWeek.md) | | [optional] +**paymentDateRule** | [**\SynergiTech\Staffology\Model\PaymentDateRule**](PaymentDateRule.md) | | [optional] +**pensionRule** | [**\SynergiTech\Staffology\Model\PensionRule**](PensionRule.md) | | [optional] +**provider** | [**\SynergiTech\Staffology\Model\PensionProvider**](PensionProvider.md) | | [optional] +**qualifyingScheme** | **bool** | Set to true if this is a Qualifying Scheme for Auto Enrolment | [optional] **reportOptionsLgpsCivicaUpm** | [**\SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsCivicaUpm**](PensionSchemeReportOptionsLgpsCivicaUpm.md) | | [optional] -**deficitValueOrdinal** | **int** | The Ordinal used to identify the PaySchedule which the Deficit will be against | [optional] -**deficitValue** | **float** | The Defict value that will be deducted in a PaySchedule | [optional] -**includeDeficitValue** | **bool** | Set to true if this a Deficit Payment needs to be assigned to a PaySchedule | [optional] -**deficitValuePayPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] -**nominalCodeMappings** | [**\SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]**](PensionSchemeNominalCodeMapping.md) | The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**reportOptionsLgpsIConnect** | [**\SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsIConnect**](PensionSchemeReportOptionsLgpsIConnect.md) | | [optional] +**singleEmploymentRelationship** | [**\SynergiTech\Staffology\Model\PensionSingleEmploymentRelationship**](PensionSingleEmploymentRelationship.md) | | [optional] +**subtractBasicRateTax** | **bool** | | [optional] +**tierablePayCustomPayCodes** | **string[]** | If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code that we'll treat as being tierable. | [optional] +**tierablePayPayCodeSetUniqueId** | **string** | | [optional] +**tierablePayPayCodeType** | [**\SynergiTech\Staffology\Model\PensionPayCode**](PensionPayCode.md) | | [optional] +**useCustomPayCodes** | **bool** | If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable we'll instead treat it as pensionable if the Code is included in CustomPayCodes | [optional] +**useCustomPayCodesForTierablePay** | **bool** | If set to true then rather than using the setting on the PayCode to determine if the pay is tierable we'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes | [optional] +**workerGroups** | [**\SynergiTech\Staffology\Model\WorkerGroup[]**](WorkerGroup.md) | A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionSchemeNominalCodeMapping.md b/docs/Model/PensionSchemeNominalCodeMapping.md index 04a9f71..eb8828e 100644 --- a/docs/Model/PensionSchemeNominalCodeMapping.md +++ b/docs/Model/PensionSchemeNominalCodeMapping.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**journalNarrative** | **string** | Journal narrative description. | [optional] **nominalCode** | **string** | Nominal Code for pension scheme | [optional] **nominalName** | **string** | Nominal Name | [optional] -**journalNarrative** | **string** | Journal narrative description. | [optional] **payCode** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionSchemeReportOptionsLgpsCivicaUpm.md b/docs/Model/PensionSchemeReportOptionsLgpsCivicaUpm.md index d43884c..7255ce2 100644 --- a/docs/Model/PensionSchemeReportOptionsLgpsCivicaUpm.md +++ b/docs/Model/PensionSchemeReportOptionsLgpsCivicaUpm.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollNumber** | [**\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber**](LgpsCivicaPayrollNumber.md) | | [optional] +**addressesForNewJoinersOnly** | **bool** | | [optional] **casualHours** | [**\SynergiTech\Staffology\Model\LgpsCivicaCasualHours**](LgpsCivicaCasualHours.md) | | [optional] -**omitHeaderLine** | **bool** | | [optional] -**includeFolderNo** | **bool** | | [optional] **excludeSchoolEmployerName** | **bool** | | [optional] -**addressesForNewJoinersOnly** | **bool** | | [optional] -**proRatePtHoursWeeksWorked** | **bool** | | [optional] **fullTimeHoursAsOneHundred** | **bool** | | [optional] +**includeFolderNo** | **bool** | | [optional] **includeWeeksWorkedColumns** | **bool** | | [optional] +**omitHeaderLine** | **bool** | | [optional] +**payrollNumber** | [**\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber**](LgpsCivicaPayrollNumber.md) | | [optional] +**proRatePtHoursWeeksWorked** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionSchemeReportOptionsLgpsIConnect.md b/docs/Model/PensionSchemeReportOptionsLgpsIConnect.md index 67f559a..a0eb50c 100644 --- a/docs/Model/PensionSchemeReportOptionsLgpsIConnect.md +++ b/docs/Model/PensionSchemeReportOptionsLgpsIConnect.md @@ -4,28 +4,28 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**breakReasonSmpIndicatorOnly** | **bool** | | [optional] +**casualStaffHoursAsOne** | **bool** | | [optional] +**casualStaffIndicatorAsY** | **bool** | | [optional] +**customText** | **string** | | [optional] **fileType** | [**\SynergiTech\Staffology\Model\LgpsIConnectFileType**](LgpsIConnectFileType.md) | | [optional] +**forceUpperCase** | **bool** | | [optional] +**ignoreHours** | **bool** | | [optional] +**ignoreTermTimeWeeksForFteFinalPay** | **bool** | | [optional] +**includeAeQualifyingEarnings** | **bool** | | [optional] +**includeEmploymentBreaks** | **bool** | | [optional] **payrollReference1** | [**\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference**](LgpsIConnectPayrollReference.md) | | [optional] **payrollReference2** | [**\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference**](LgpsIConnectPayrollReference.md) | | [optional] **payrollReference3** | [**\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference**](LgpsIConnectPayrollReference.md) | | [optional] **populateEmailAddress** | **bool** | | [optional] -**populateTelephoneNumber** | **bool** | | [optional] +**populateMaritalStatus** | **bool** | | [optional] **populateMobileNumber** | **bool** | | [optional] -**populateWorksPlaceName** | **bool** | | [optional] +**populateTelephoneNumber** | **bool** | | [optional] **populateWorksAddress** | **bool** | | [optional] **populateWorksEmailAddress** | **bool** | | [optional] -**includeEmploymentBreaks** | **bool** | | [optional] -**breakReasonSmpIndicatorOnly** | **bool** | | [optional] -**populateMaritalStatus** | **bool** | | [optional] -**includeAeQualifyingEarnings** | **bool** | | [optional] +**populateWorksPlaceName** | **bool** | | [optional] **proRatePtHoursByTermTimeWeeks** | **bool** | | [optional] -**ignoreTermTimeWeeksForFteFinalPay** | **bool** | | [optional] -**showFteAnnualSalaryForFteFinalPay** | **bool** | | [optional] -**casualStaffHoursAsOne** | **bool** | | [optional] -**casualStaffIndicatorAsY** | **bool** | | [optional] -**ignoreHours** | **bool** | | [optional] -**forceUpperCase** | **bool** | | [optional] **salaryType** | [**\SynergiTech\Staffology\Model\LgpsIConnectSalaryType**](LgpsIConnectSalaryType.md) | | [optional] -**customText** | **string** | | [optional] +**showFteAnnualSalaryForFteFinalPay** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionSingleEmploymentRelationship.md b/docs/Model/PensionSingleEmploymentRelationship.md new file mode 100644 index 0000000..3a92042 --- /dev/null +++ b/docs/Model/PensionSingleEmploymentRelationship.md @@ -0,0 +1,8 @@ +# # PensionSingleEmploymentRelationship + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionSummary.md b/docs/Model/PensionSummary.md index 0f377fb..a2b9557 100644 --- a/docs/Model/PensionSummary.md +++ b/docs/Model/PensionSummary.md @@ -4,55 +4,62 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pensionId** | **string** | [readonly] The Id of the Pension. | [optional] -**name** | **string** | [readonly] The name of the PensionScheme to which contributions have been made. | [optional] -**pensionSchemeId** | **string** | [readonly] The Id of the PensionScheme. | [optional] -**startDate** | **\DateTime** | [readonly] Pension Start Date | [optional] -**endDate** | **\DateTime** | Pension End Date | [optional] -**workerGroupId** | **string** | [readonly] The Id of the WorkerGroup. | [optional] -**pensionRule** | [**\SynergiTech\Staffology\Model\PensionRule**](PensionRule.md) | | [optional] -**subtractedBasicRateTax** | **bool** | [readonly] The SubtractedBasicRateTax applied from the PensionScheme SubtractBasicRateTax. | [optional] -**papdisPensionProviderId** | **string** | [readonly] Papdis information from the PensionScheme | [optional] -**papdisEmployerId** | **string** | [readonly] Papdis information from the PensionScheme | [optional] -**employeePensionContributionMultiplier** | **float** | [readonly] If the PensionScheme is set to SubtractBasicRateTax then this value is used to reduce the contribution amount. Otherwise it is set as 1. | [optional] **additionalVoluntaryContribution** | **float** | [readonly] Any Additional Voluntary Contribution the Employee has chosen to make Otherwise it is set as 1. | [optional] -**avcIsPercentage** | **bool** | [readonly] Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, | [optional] -**autoEnrolled** | **bool** | [readonly] Any Additional Voluntary Contribution the Employee has chosen to make Otherwise it is set as 1. | [optional] -**workerGroup** | [**\SynergiTech\Staffology\Model\WorkerGroup**](WorkerGroup.md) | | [optional] -**forcedTier** | **string** | [readonly] If the WorkerGroup ContributionLevelType is a Tiered Scheme then the name of the tier to force the employee on to may be specified. If none is specified then the Tier is determined by the earnings in the period | [optional] -**tiers** | [**\SynergiTech\Staffology\Model\TieredPensionRate[]**](TieredPensionRate.md) | | [optional] +**associatedEmployeeRoles** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | | [optional] **assumedPensionablePay** | **float** | [readonly] Assumed Pensionable Pay. If the employee is receiving any Statutory Leave that has an AssumedPensionablePay value set then it'll be shown here. | [optional] -**pensionablePayCodes** | **string[]** | [readonly] If the pension scheme is set to override the Pensionale PayCodes, then this is what they've been set to. | [optional] -**tierablePayPayCodes** | **string[]** | [readonly] If the pension scheme is set to override the TierablePay PayCodes, then this is what they've been set to. | [optional] -**isHalfContributionMember** | **bool** | if an employee as a member of the 50/50 LGPS scheme, they can enable contribution to 50% of the normal contributions. | [optional] -**pensionableEarnings** | **float** | [readonly] The amount of the Gross that is subject to Pension Deductions. If the Pension Scheme uses Qualifying Earnings (upper and lower limits) then this value is before those are applied Applied only if an employee has more than one pension assigned to them | [optional] -**pensionablePay** | **float** | [readonly] The amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. Applied only if an employee has more than one pension assigned to them | [optional] -**nonTierablePay** | **float** | [readonly] The value of any pay that shouldn't count towards determining a pension tier. | [optional] +**assumedPensionablePayBfd** | **float** | [readonly] The brought forward Year to Date value of Assumed Pensionable Pay. If the employee is receiving any Statutory Leave that has an AssumedPensionablePay value set then it'll be shown here. | [optional] +**autoEnrolled** | **bool** | [readonly] Any Additional Voluntary Contribution the Employee has chosen to make Otherwise it is set as 1. | [optional] +**avcIsPercentage** | **bool** | [readonly] Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, | [optional] +**contributionCalculationDate** | **\DateTime** | Nullable DateTime property \"ContributionCalculationDate\" to store the date of the latest earned date on the back pay lines when processing when earned pension summaries on a payment after leaving. Applicable only for when the pension summary is created on the base of when earned additions' and deductions' pension calculations for back paid periods and the pay run entry is marked as payment after leaving | [optional] **employeePensionContribution** | **float** | [readonly] The value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions | [optional] **employeePensionContributionAvc** | **float** | [readonly] The value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution | [optional] +**employeePensionContributionAvcBfd** | **float** | [readonly] The brought forward Year to Date value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution | [optional] +**employeePensionContributionBfd** | **float** | [readonly] The brought forward Year to Date value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions | [optional] +**employeePensionContributionMultiplier** | **float** | [readonly] If the PensionScheme is set to SubtractBasicRateTax then this value is used to reduce the contribution amount. Otherwise it is set as 1. | [optional] **employerPensionContribution** | **float** | [readonly] The value of the Pension Contribution being made by the Employer for this Employee | [optional] +**employerPensionContributionBfd** | **float** | [readonly] The brought forward Year to Date value of the Pension Contribution being made by the Employer for this Employee | [optional] +**endDate** | **\DateTime** | Pension End Date | [optional] +**forcedTier** | **string** | [readonly] If the WorkerGroup ContributionLevelType is a Tiered Scheme then the name of the tier to force the employee on to may be specified. If none is specified then the Tier is determined by the earnings in the period | [optional] **isForEndedPension** | **bool** | [readonly] Determines whether the pension summary is related to a pension that has ended or not | [optional] -**associatedEmployeeRoles** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | | [optional] +**isHalfContributionMember** | **bool** | if an employee as a member of the 50/50 LGPS scheme, they can enable contribution to 50% of the normal contributions. | [optional] +**isTeachersPension** | **bool** | | [optional] +**leaveDaysUnderHalfPay** | **int** | The numer of leave days where less than half the normal pay is received | [optional] +**name** | **string** | [readonly] The name of the PensionScheme to which contributions have been made. | [optional] +**nominalCodeMappings** | [**\SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]**](PensionSchemeNominalCodeMapping.md) | List of Nominal Code Mappings of the Pension | [optional] +**nonPensionableStatutoryPay** | **float** | Non pensionable statutory pay | [optional] +**nonPensionableStatutoryPays** | **array** | Non pensionable statutory pay per leave | [optional] +**nonTierablePay** | **float** | [readonly] The value of any pay that shouldn't count towards determining a pension tier. | [optional] **notionalPay** | **float** | Pay value based on regular pay lines and the pension's associated roles Set before any adjustments for things like stat payments | [optional] +**notionalPayDetails** | [**\SynergiTech\Staffology\Model\LeaveNotionalPayDetails[]**](LeaveNotionalPayDetails.md) | Notional pay details based on every occupational or custom leave affecting a teachers pension summary | [optional] +**papdisEmployerId** | **string** | [readonly] Papdis information from the PensionScheme | [optional] +**papdisPensionProviderId** | **string** | [readonly] Papdis information from the PensionScheme | [optional] +**pensionId** | **string** | [readonly] The Id of the Pension. | [optional] +**pensionRule** | [**\SynergiTech\Staffology\Model\PensionRule**](PensionRule.md) | | [optional] +**pensionSchemeId** | **string** | [readonly] The Id of the PensionScheme. | [optional] +**pensionableEarnings** | **float** | [readonly] The amount of the Gross that is subject to Pension Deductions. If the Pension Scheme uses Qualifying Earnings (upper and lower limits) then this value is before those are applied Applied only if an employee has more than one pension assigned to them | [optional] **pensionableEarningsBfd** | **float** | [readonly] The brought forward Year to Date amount of the Gross that is subject to Pension Deductions. Applied only if an employee has more than one pension assigned to them | [optional] +**pensionablePay** | **float** | [readonly] The amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. Applied only if an employee has more than one pension assigned to them | [optional] **pensionablePayBfd** | **float** | [readonly] The brought forward Year to Date amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. Applied only if an employee has more than one pension assigned to them | [optional] -**employeePensionContributionBfd** | **float** | [readonly] The brought forward Year to Date value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions | [optional] -**assumedPensionablePayBfd** | **float** | [readonly] The brought forward Year to Date value of Assumed Pensionable Pay. If the employee is receiving any Statutory Leave that has an AssumedPensionablePay value set then it'll be shown here. | [optional] -**employerPensionContributionBfd** | **float** | [readonly] The brought forward Year to Date value of the Pension Contribution being made by the Employer for this Employee | [optional] -**employeePensionContributionAvcBfd** | **float** | [readonly] The brought forward Year to Date value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution | [optional] -**whenEarnedPensionSummaries** | [**\SynergiTech\Staffology\Model\PensionSummary[]**](PensionSummary.md) | The list of pension summaries created on the base of when earned additions' and deductions' pension calculations for back paid periods | [optional] +**pensionablePayCodes** | **string[]** | [readonly] If the pension scheme is set to override the Pensionale PayCodes, then this is what they've been set to. | [optional] **periodFrom** | **\DateTime** | Nullable DateTime property \"PeriodFrom\" to store the start date of the PayPeriod the current PensionSummary is attributable to. Applicable only for when the pension summary is created on the base of when earned additions' and deductions' pension calculations for back paid periods | [optional] **periodTo** | **\DateTime** | Nullable DateTime property \"PeriodTo\" to store the start date of the PayPeriod the current PensionSummary is attributable to. Applicable only for when the pension summary is created on the base of when earned additions' and deductions' pension calculations for back paid periods | [optional] -**whenEarnedPensionableEarningsCorrection** | **float** | [readonly] The when earned amount correction to the Gross that is subject to Pension Deductions. | [optional] -**whenEarnedPensionablePayCorrection** | **float** | [readonly] The when earned amount correction to the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. | [optional] +**startDate** | **\DateTime** | [readonly] Pension Start Date | [optional] +**subtractedBasicRateTax** | **bool** | [readonly] The SubtractedBasicRateTax applied from the PensionScheme SubtractBasicRateTax. | [optional] +**tierablePayPayCodes** | **string[]** | [readonly] If the pension scheme is set to override the TierablePay PayCodes, then this is what they've been set to. | [optional] +**tiers** | [**\SynergiTech\Staffology\Model\TieredPensionRate[]**](TieredPensionRate.md) | | [optional] +**treatAsWhenPaidForBackPay** | **bool** | [readonly] Determines whether the pension summary should be treated as when paid when the earnings are based only on back pay | [optional] +**whenEarnedEmployeePensionContributionAvcCorrection** | **float** | [readonly] The when earned amount correction to Pension Contribution being made by this Employee as an Additional Voluntary Contribution | [optional] +**whenEarnedEmployeePensionContributionAvcCorrectionBfd** | **float** | [readonly] The brought forward Year to Date when earned amount correction to Pension Contribution being made by this Employee as an Additional Voluntary Contribution | [optional] **whenEarnedEmployeePensionContributionCorrection** | **float** | [readonly] The when earned amount correction to the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions | [optional] +**whenEarnedEmployeePensionContributionCorrectionBfd** | **float** | [readonly] The brought forward Year to Date when earned amount correction to the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions | [optional] **whenEarnedEmployerPensionContributionCorrection** | **float** | [readonly] The when earned amount correction to the Pension Contribution being made by the Employer for this Employee | [optional] -**whenEarnedEmployeePensionContributionAvcCorrection** | **float** | [readonly] The when earned amount correction to Pension Contribution being made by this Employee as an Additional Voluntary Contribution | [optional] +**whenEarnedEmployerPensionContributionCorrectionBfd** | **float** | [readonly] The brought forward Year to Date when earned amount correction to the Pension Contribution being made by the Employer for this Employee | [optional] +**whenEarnedPensionSummaries** | [**\SynergiTech\Staffology\Model\PensionSummary[]**](PensionSummary.md) | The list of pension summaries created on the base of when earned additions' and deductions' pension calculations for back paid periods | [optional] +**whenEarnedPensionableEarningsCorrection** | **float** | [readonly] The when earned amount correction to the Gross that is subject to Pension Deductions. | [optional] **whenEarnedPensionableEarningsCorrectionBfd** | **float** | [readonly] The brought forward Year to Date when earned amount correction to the Gross that is subject to Pension Deductions. | [optional] +**whenEarnedPensionablePayCorrection** | **float** | [readonly] The when earned amount correction to the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. | [optional] **whenEarnedPensionablePayCorrectionBfd** | **float** | [readonly] The brought forward Year to Date when earned amount correction to the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. | [optional] -**whenEarnedEmployeePensionContributionCorrectionBfd** | **float** | [readonly] The brought forward Year to Date when earned amount correction to the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions | [optional] -**whenEarnedEmployerPensionContributionCorrectionBfd** | **float** | [readonly] The brought forward Year to Date when earned amount correction to the Pension Contribution being made by the Employer for this Employee | [optional] -**whenEarnedEmployeePensionContributionAvcCorrectionBfd** | **float** | [readonly] The brought forward Year to Date when earned amount correction to Pension Contribution being made by this Employee as an Additional Voluntary Contribution | [optional] -**nominalCodeMappings** | [**\SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]**](PensionSchemeNominalCodeMapping.md) | List of Nominal Code Mappings of the Pension | [optional] +**workerGroup** | [**\SynergiTech\Staffology\Model\WorkerGroup**](WorkerGroup.md) | | [optional] +**workerGroupId** | **string** | [readonly] The Id of the WorkerGroup. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionSummaryCostBreakdown.md b/docs/Model/PensionSummaryCostBreakdown.md index bdf18de..4a4fb60 100644 --- a/docs/Model/PensionSummaryCostBreakdown.md +++ b/docs/Model/PensionSummaryCostBreakdown.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pensionRule** | [**\SynergiTech\Staffology\Model\PensionRule**](PensionRule.md) | | [optional] -**payCodes** | **string[]** | The list of pay codes associated with this pension rule. | [optional] **amount** | **float** | The amount associated with this pension entry. | [optional] -**pensionableEarnings** | **float** | The total pensionable earnings relevant to this pension rule. | [optional] **employeePensionContribution** | **float** | The contribution amount made by the employee towards the pension. | [optional] **employerPensionContribution** | **float** | The contribution amount made by the employer towards the pension. | [optional] +**payCodes** | **string[]** | The list of pay codes associated with this pension rule. | [optional] +**pensionRule** | [**\SynergiTech\Staffology\Model\PensionRule**](PensionRule.md) | | [optional] +**pensionableEarnings** | **float** | The total pensionable earnings relevant to this pension rule. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PensionerPayroll.md b/docs/Model/PensionerPayroll.md index 8b78886..299dddf 100644 --- a/docs/Model/PensionerPayroll.md +++ b/docs/Model/PensionerPayroll.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**inReceiptOfPension** | **bool** | If set to true then the FPS will have the OccPenInd flag set to 'yes' | [optional] -**bereaved** | **bool** | Indicator that Occupational Pension is being paid because they are a recently bereaved Spouse/Civil Partner | [optional] **amount** | **float** | Annual amount of occupational pension | [optional] +**bereaved** | **bool** | Indicator that Occupational Pension is being paid because they are a recently bereaved Spouse/Civil Partner | [optional] +**inReceiptOfPension** | **bool** | If set to true then the FPS will have the OccPenInd flag set to 'yes' | [optional] **startDate** | **\DateTime** | Start date of occupational Pension | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PercentOfPayBand.md b/docs/Model/PercentOfPayBand.md new file mode 100644 index 0000000..d9d2041 --- /dev/null +++ b/docs/Model/PercentOfPayBand.md @@ -0,0 +1,8 @@ +# # PercentOfPayBand + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PeriodValue.md b/docs/Model/PeriodValue.md index b99aef1..127337a 100644 --- a/docs/Model/PeriodValue.md +++ b/docs/Model/PeriodValue.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**effectiveFrom** | **\DateTime** | The date when these period values are effective | [optional] **annualValue** | **float** | The Annual value | [optional] -**periodValues** | [**\SynergiTech\Staffology\Model\PeriodValuePeriodValues**](PeriodValuePeriodValues.md) | | [optional] +**effectiveFrom** | **\DateTime** | The date when these period values are effective | [optional] **midYearChanges** | [**\SynergiTech\Staffology\Model\PeriodValue[]**](PeriodValue.md) | Any optional changes to the period values that are effective from a specified date in the middle of a tax year | [optional] +**periodValues** | [**\SynergiTech\Staffology\Model\PeriodValuePeriodValues**](PeriodValuePeriodValues.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PeriodValuePeriodValues.md b/docs/Model/PeriodValuePeriodValues.md index 9186cbb..44683a9 100644 --- a/docs/Model/PeriodValuePeriodValues.md +++ b/docs/Model/PeriodValuePeriodValues.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **custom** | **float** | | [optional] -**monthly** | **float** | | [optional] -**fourWeekly** | **float** | | [optional] +**daily** | **float** | | [optional] **fortnightly** | **float** | | [optional] +**fourWeekly** | **float** | | [optional] +**monthly** | **float** | | [optional] **weekly** | **float** | | [optional] -**daily** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PersonalDetails.md b/docs/Model/PersonalDetails.md index 96bc6ba..ee77209 100644 --- a/docs/Model/PersonalDetails.md +++ b/docs/Model/PersonalDetails.md @@ -5,27 +5,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | [**\SynergiTech\Staffology\Model\Address**](Address.md) | | [optional] -**maritalStatus** | [**\SynergiTech\Staffology\Model\MaritalStatus**](MaritalStatus.md) | | -**title** | **string** | | [optional] -**firstName** | **string** | | [optional] -**middleName** | **string** | | [optional] -**lastName** | **string** | | [optional] **alternativeEmail** | **string** | | [optional] -**previousSurName** | **string** | | [optional] +**dateOfBirth** | **\DateTime** | | **email** | **string** | | [optional] **emailPayslip** | **bool** | If set to true then the employees Payslip will be sent by email when a PayRun is finalised. | [optional] -**pdfPassword** | **string** | Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property. | [optional] -**pdfPasswordType** | [**\SynergiTech\Staffology\Model\PdfPasswordType**](PdfPasswordType.md) | | [optional] **emailStatement** | **bool** | Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted. | [optional] -**photoUrl** | **string** | | [optional] -**photoSasUrl** | **string** | | [optional] -**telephone** | **string** | | [optional] -**mobile** | **string** | | [optional] -**dateOfBirth** | **\DateTime** | | -**statePensionAge** | **int** | [readonly] Automatically calculated. | [optional] +**firstName** | **string** | | [optional] **gender** | [**\SynergiTech\Staffology\Model\Gender**](Gender.md) | | +**lastName** | **string** | | [optional] +**maritalStatus** | [**\SynergiTech\Staffology\Model\MaritalStatus**](MaritalStatus.md) | | +**middleName** | **string** | | [optional] +**mobile** | **string** | | [optional] **niNumber** | **string** | | [optional] -**passportNumber** | **string** | | [optional] **partnerDetails** | [**\SynergiTech\Staffology\Model\PartnerDetails**](PartnerDetails.md) | | [optional] +**passportNumber** | **string** | | [optional] +**pdfPassword** | **string** | Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property. | [optional] +**pdfPasswordType** | [**\SynergiTech\Staffology\Model\PdfPasswordType**](PdfPasswordType.md) | | [optional] +**photoSasUrl** | **string** | | [optional] +**photoUrl** | **string** | | [optional] +**previousSurName** | **string** | | [optional] +**statePensionAge** | **int** | [readonly] Automatically calculated. | [optional] +**telephone** | **string** | | [optional] +**title** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PricingBand.md b/docs/Model/PricingBand.md index b039a2c..3fded73 100644 --- a/docs/Model/PricingBand.md +++ b/docs/Model/PricingBand.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | **string** | | [optional] **from** | **int** | | [optional] -**to** | **int** | | [optional] -**price** | **float** | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**price** | **float** | | [optional] +**to** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PricingTable.md b/docs/Model/PricingTable.md index 759bf62..2e946be 100644 --- a/docs/Model/PricingTable.md +++ b/docs/Model/PricingTable.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | [optional] -**minimumCharge** | **float** | | [optional] **bands** | [**\SynergiTech\Staffology\Model\PricingBand[]**](PricingBand.md) | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **isDefault** | **bool** | | [optional] -**netSuiteItemCode** | **string** | | [optional] +**minimumCharge** | **float** | | [optional] +**name** | **string** | | [optional] **netSuiteDescription** | **string** | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**netSuiteItemCode** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProcessingNote.md b/docs/Model/ProcessingNote.md index aad4783..5a8933c 100644 --- a/docs/Model/ProcessingNote.md +++ b/docs/Model/ProcessingNote.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payRunEntryId** | **string** | The Id of the payrunEntry this ProcessingNote relates to, if any | [optional] -**note** | **string** | | -**user** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payRun** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**completedDate** | **\DateTime** | UpdatedDate is assigned to this to get around the base implementation of UpdatedDate having [JsonIgnore] tag | [optional] **date** | **\DateTime** | | [optional] **documentCount** | **int** | [readonly] The number of attachments associated with this model | [optional] **documents** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] The attachments associated with this model | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**note** | **string** | | +**payRun** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**payRunEntryId** | **string** | The Id of the payrunEntry this ProcessingNote relates to, if any | [optional] **status** | [**\SynergiTech\Staffology\Model\ProcessingNoteStatus**](ProcessingNoteStatus.md) | | [optional] **updatedByName** | **string** | Name of the user who was last to update the record | [optional] -**completedDate** | **\DateTime** | UpdatedDate is assigned to this to get around the base implementation of UpdatedDate having [JsonIgnore] tag | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**user** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RecoverableAmounts.md b/docs/Model/RecoverableAmounts.md index c4e6f7e..0e09091 100644 --- a/docs/Model/RecoverableAmounts.md +++ b/docs/Model/RecoverableAmounts.md @@ -4,20 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taxMonth** | **int** | | [optional] -**smpRecovered** | **float** | Value of Statutory Maternity Pay recovered year to date | [optional] -**sppRecovered** | **float** | Value of Statutory Paternity Pay recovered year to date | [optional] -**sapRecovered** | **float** | Value of Statutory Adoption Pay recovered year to date | [optional] -**shPPRecovered** | **float** | Value of Shared Parental Pay recovered year to date | [optional] -**spbpRecovered** | **float** | Value of Statutory Parental Bereavement Pay recovered year to date | [optional] -**sncpRecovered** | **float** | Value of Statutory Neonatal Care Pay recovered year to date | [optional] +**cisDeductionsSuffered** | **float** | Value of CIS deductions suffered year to date | [optional] +**nicCompensationOnSAP** | **float** | Value of NIC compensation on Statutory Adoption Pay year to date | [optional] **nicCompensationOnSMP** | **float** | Value of NIC compensation on SMP year to date | [optional] +**nicCompensationOnSNCP** | **float** | Value of NIC compensation on Statutory Neonatal Care Pay year to date | [optional] +**nicCompensationOnSPBP** | **float** | Value of NIC compensation on Statutory Parental Bereavement Pay year to date | [optional] **nicCompensationOnSPP** | **float** | Value of NIC compensation on Statutory Paternity Pay year to date | [optional] -**nicCompensationOnSAP** | **float** | Value of NIC compensation on Statutory Adoption Pay year to date | [optional] **nicCompensationOnShPP** | **float** | Value of NIC compensation on Shared Parental Pay year to date | [optional] -**nicCompensationOnSPBP** | **float** | Value of NIC compensation on Statutory Parental Bereavement Pay year to date | [optional] -**nicCompensationOnSNCP** | **float** | Value of NIC compensation on Statutory Neonatal Care Pay year to date | [optional] -**cisDeductionsSuffered** | **float** | Value of CIS deductions suffered year to date | [optional] +**sapRecovered** | **float** | Value of Statutory Adoption Pay recovered year to date | [optional] +**shPPRecovered** | **float** | Value of Shared Parental Pay recovered year to date | [optional] +**smpRecovered** | **float** | Value of Statutory Maternity Pay recovered year to date | [optional] +**sncpRecovered** | **float** | Value of Statutory Neonatal Care Pay recovered year to date | [optional] +**spbpRecovered** | **float** | Value of Statutory Parental Bereavement Pay recovered year to date | [optional] +**sppRecovered** | **float** | Value of Statutory Paternity Pay recovered year to date | [optional] +**taxMonth** | **int** | | [optional] **total** | **float** | The total value of the reclaimed amounts | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ReenrolmentStatus.md b/docs/Model/ReenrolmentStatus.md new file mode 100644 index 0000000..75bda74 --- /dev/null +++ b/docs/Model/ReenrolmentStatus.md @@ -0,0 +1,8 @@ +# # ReenrolmentStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ReportPack.md b/docs/Model/ReportPack.md index 94f6664..99fcd39 100644 --- a/docs/Model/ReportPack.md +++ b/docs/Model/ReportPack.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | The name of this ReportPack | -**reports** | [**\SynergiTech\Staffology\Model\Report[]**](Report.md) | The Reports included in this ReportPack | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**reports** | [**\SynergiTech\Staffology\Model\Report[]**](Report.md) | The Reports included in this ReportPack | [optional] +**title** | **string** | The name of this ReportPack | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ReportResponse.md b/docs/Model/ReportResponse.md index 287b051..9f347b9 100644 --- a/docs/Model/ReportResponse.md +++ b/docs/Model/ReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | **mixed** | [readonly] If the type is application.json then this will contain a JSON representation of the relevant model | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RightToWork.md b/docs/Model/RightToWork.md index 3ace735..1935c86 100644 --- a/docs/Model/RightToWork.md +++ b/docs/Model/RightToWork.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **checked** | **bool** | | [optional] -**documentType** | [**\SynergiTech\Staffology\Model\RightToWorkDocumentType**](RightToWorkDocumentType.md) | | [optional] -**documentRef** | **string** | | [optional] **documentExpiry** | **\DateTime** | | [optional] +**documentRef** | **string** | | [optional] +**documentType** | [**\SynergiTech\Staffology\Model\RightToWorkDocumentType**](RightToWorkDocumentType.md) | | [optional] **note** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RightToWorkReport.md b/docs/Model/RightToWorkReport.md index e228179..a9faeb0 100644 --- a/docs/Model/RightToWorkReport.md +++ b/docs/Model/RightToWorkReport.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\RightToWorkReportLine[]**](RightToWorkReportLine.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RightToWorkReportLine.md b/docs/Model/RightToWorkReportLine.md index 6851d31..ddefd4e 100644 --- a/docs/Model/RightToWorkReportLine.md +++ b/docs/Model/RightToWorkReportLine.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**department** | **string** | | [optional] **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **payrollCode** | **string** | | [optional] -**department** | **string** | | [optional] **rightToWork** | [**\SynergiTech\Staffology\Model\RightToWork**](RightToWork.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RightToWorkReportReportResponse.md b/docs/Model/RightToWorkReportReportResponse.md index 9e8b18d..39aea19 100644 --- a/docs/Model/RightToWorkReportReportResponse.md +++ b/docs/Model/RightToWorkReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\RightToWorkReport**](RightToWorkReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RtiAgent.md b/docs/Model/RtiAgent.md index 6b4a221..1ac65b6 100644 --- a/docs/Model/RtiAgent.md +++ b/docs/Model/RtiAgent.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**address** | [**\SynergiTech\Staffology\Model\Address**](Address.md) | | [optional] **agentId** | **string** | | [optional] **company** | **string** | | [optional] -**address** | [**\SynergiTech\Staffology\Model\Address**](Address.md) | | [optional] **contact** | [**\SynergiTech\Staffology\Model\RtiContact**](RtiContact.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RtiContact.md b/docs/Model/RtiContact.md index 5a12640..6d62447 100644 --- a/docs/Model/RtiContact.md +++ b/docs/Model/RtiContact.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**email** | **string** | | [optional] **firstName** | **string** | | [optional] **lastName** | **string** | | [optional] -**email** | **string** | | [optional] **telephone** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RtiEmployeeAddress.md b/docs/Model/RtiEmployeeAddress.md index db7b2bc..15d6184 100644 --- a/docs/Model/RtiEmployeeAddress.md +++ b/docs/Model/RtiEmployeeAddress.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**country** | **string** | | [optional] +**foreignCountry** | **string** | | [optional] **line** | **string[]** | | [optional] -**postcode** | **string** | | [optional] **postCode** | **string** | | [optional] +**postcode** | **string** | | [optional] **ukPostcode** | **string** | | [optional] -**country** | **string** | | [optional] -**foreignCountry** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RtiEmployeeName.md b/docs/Model/RtiEmployeeName.md index 6c29db7..3e35b24 100644 --- a/docs/Model/RtiEmployeeName.md +++ b/docs/Model/RtiEmployeeName.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ttl** | **string** | | [optional] **fore** | **string[]** | | [optional] **initials** | **string** | | [optional] **sur** | **string** | | [optional] +**ttl** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RtiSubmissionSettings.md b/docs/Model/RtiSubmissionSettings.md index 327c778..e6fc868 100644 --- a/docs/Model/RtiSubmissionSettings.md +++ b/docs/Model/RtiSubmissionSettings.md @@ -4,19 +4,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**senderType** | [**\SynergiTech\Staffology\Model\RtiSenderType**](RtiSenderType.md) | | [optional] -**senderId** | **string** | The SenderId used to submit RTI documents to HMRC | [optional] -**password** | **string** | The Password used to submit RTI documents to HMRC | [optional] +**agent** | [**\SynergiTech\Staffology\Model\RtiAgent**](RtiAgent.md) | | [optional] +**allowLinkedEps** | **bool** | If set to true this will allow you to submit a combined Employer Payment Summary | [optional] +**autoSubmitEps** | **bool** | If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun. | [optional] +**autoSubmitFps** | **bool** | If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun | [optional] +**contact** | [**\SynergiTech\Staffology\Model\RtiContact**](RtiContact.md) | | [optional] **excludeNilPaid** | **bool** | Whether or not to include Employees paid a zero amount on your FPS | [optional] **includeHashCrossRef** | **bool** | [readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions This is automatically set to true if you use a bank payments CSV format that supports it or set to false if not | [optional] -**autoSubmitFps** | **bool** | If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun | [optional] -**testInLive** | **bool** | Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it | [optional] -**useTestGateway** | **bool** | If set to true then your RTI documents will be sent to HMRCs test services instead of the live service | [optional] **overrideTimestampValue** | **string** | If a value is provided then it will be used as the timestamp on the RTI submission. This would normally only be used for testing purposes. | [optional] -**contact** | [**\SynergiTech\Staffology\Model\RtiContact**](RtiContact.md) | | [optional] -**agent** | [**\SynergiTech\Staffology\Model\RtiAgent**](RtiAgent.md) | | [optional] -**allowLinkedEps** | **bool** | If set to true this will allow you to submit a combined Employer Payment Summary | [optional] +**password** | **string** | The Password used to submit RTI documents to HMRC | [optional] +**senderId** | **string** | The SenderId used to submit RTI documents to HMRC | [optional] +**senderType** | [**\SynergiTech\Staffology\Model\RtiSenderType**](RtiSenderType.md) | | [optional] **shouldCompressFps** | **bool** | If set to true this will compress the FPS before submitting to HMRC | [optional] -**autoSubmitEps** | **bool** | If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun. | [optional] +**testInLive** | **bool** | Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it | [optional] +**useTestGateway** | **bool** | If set to true then your RTI documents will be sent to HMRCs test services instead of the live service | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RtiValidationWarning.md b/docs/Model/RtiValidationWarning.md index 01fe988..d15a293 100644 --- a/docs/Model/RtiValidationWarning.md +++ b/docs/Model/RtiValidationWarning.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\SynergiTech\Staffology\Model\RtiValidationWarningType**](RtiValidationWarningType.md) | | [optional] **employeeId** | **string** | | [optional] +**type** | [**\SynergiTech\Staffology\Model\RtiValidationWarningType**](RtiValidationWarningType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ServiceBand.md b/docs/Model/ServiceBand.md index b4fe91c..f5db3ea 100644 --- a/docs/Model/ServiceBand.md +++ b/docs/Model/ServiceBand.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | **string** | | [optional] -**from** | **int** | | [optional] -**to** | **int** | | [optional] **entitlementBands** | [**\SynergiTech\Staffology\Model\EntitlementBand[]**](EntitlementBand.md) | | [optional] +**from** | **int** | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**to** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ShiftWorkingPatternDay.md b/docs/Model/ShiftWorkingPatternDay.md index 9076c30..d42a423 100644 --- a/docs/Model/ShiftWorkingPatternDay.md +++ b/docs/Model/ShiftWorkingPatternDay.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **day** | **int** | | [optional] -**isWorkingDay** | **bool** | | [optional] **hours** | **float** | | [optional] +**isWorkingDay** | **bool** | | [optional] **workingPatternHoursType** | [**\SynergiTech\Staffology\Model\WorkingPatternHoursType**](WorkingPatternHoursType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SmtpSettings.md b/docs/Model/SmtpSettings.md index a5f4980..373beb4 100644 --- a/docs/Model/SmtpSettings.md +++ b/docs/Model/SmtpSettings.md @@ -4,10 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**smtpServer** | **string** | | [optional] -**smtpPort** | **int** | | [optional] +**accessToken** | **string** | | [optional] **encryption** | [**\SynergiTech\Staffology\Model\SmtpEncryption**](SmtpEncryption.md) | | [optional] -**smtpUsername** | **string** | | [optional] +**expiresAt** | **\DateTime** | | [optional] +**expiresIn** | **int** | | [optional] +**refreshToken** | **string** | | [optional] **smtpPassword** | **string** | | [optional] +**smtpPort** | **int** | | [optional] +**smtpServer** | **string** | | [optional] +**smtpUsername** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SpinePointReport.md b/docs/Model/SpinePointReport.md index efd323b..eff2e23 100644 --- a/docs/Model/SpinePointReport.md +++ b/docs/Model/SpinePointReport.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\SpinePointReportLine[]**](SpinePointReportLine.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SpinePointReportLine.md b/docs/Model/SpinePointReportLine.md index aa4c355..48728b3 100644 --- a/docs/Model/SpinePointReportLine.md +++ b/docs/Model/SpinePointReportLine.md @@ -4,20 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**spineName** | **string** | Spine Name | [optional] -**spinePointName** | **string** | Spine Point Name | [optional] -**number** | **int** | Spine Point Number | [optional] -**effectiveDate** | **\DateTime** | Effective Date of spine point | [optional] **annualValue** | **float** | Annual Value of spine point | [optional] **annualValueAltMax** | **float** | Alt Max Annual Value of spine point | [optional] +**annualValueLAFringe** | **float** | Annual Value LA Fringe of spine point | [optional] +**annualValueLAFringeAltMax** | **float** | Annual Value LA Fringe Alt Max of spine point | [optional] **annualValueLAInner** | **float** | Annual Value LA Inner of spine point | [optional] **annualValueLAInnerAltMax** | **float** | Annual Value LA Inner Alt Max of spine point | [optional] **annualValueLAOuter** | **float** | Annual Value LA Outer of spine point | [optional] **annualValueLAOuterAltMax** | **float** | Annual Value LA Outer Alt Max of spine point | [optional] -**annualValueLAFringe** | **float** | Annual Value LA Fringe of spine point | [optional] -**annualValueLAFringeAltMax** | **float** | Annual Value LA Fringe Alt Max of spine point | [optional] +**department** | **string** | | [optional] +**effectiveDate** | **\DateTime** | Effective Date of spine point | [optional] **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**number** | **int** | Spine Point Number | [optional] **payrollCode** | **string** | | [optional] -**department** | **string** | | [optional] +**spineName** | **string** | Spine Name | [optional] +**spinePointName** | **string** | Spine Point Name | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SpinePointReportReportResponse.md b/docs/Model/SpinePointReportReportResponse.md index dfb1198..ca084d1 100644 --- a/docs/Model/SpinePointReportReportResponse.md +++ b/docs/Model/SpinePointReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\SpinePointReport**](SpinePointReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StarterDetails.md b/docs/Model/StarterDetails.md index 868f24e..4d06718 100644 --- a/docs/Model/StarterDetails.md +++ b/docs/Model/StarterDetails.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**startDate** | **\DateTime** | | -**starterDeclaration** | [**\SynergiTech\Staffology\Model\StarterDeclaration**](StarterDeclaration.md) | | **overseasEmployerDetails** | [**\SynergiTech\Staffology\Model\OverseasEmployerDetails**](OverseasEmployerDetails.md) | | [optional] **pensionerPayroll** | [**\SynergiTech\Staffology\Model\PensionerPayroll**](PensionerPayroll.md) | | [optional] +**startDate** | **\DateTime** | | +**starterDeclaration** | [**\SynergiTech\Staffology\Model\StarterDeclaration**](StarterDeclaration.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StatutoryPay.md b/docs/Model/StatutoryPay.md index 4133834..b2f9c8a 100644 --- a/docs/Model/StatutoryPay.md +++ b/docs/Model/StatutoryPay.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**aweEligibilityThreshold** | **float** | | [optional] **weeklyParentalLeaveAmount** | **float** | [readonly] | [optional] **weeklySickPayAmount** | **float** | [readonly] | [optional] -**aweEligibilityThreshold** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StatutoryPayReport.md b/docs/Model/StatutoryPayReport.md index 7f06846..dbce958 100644 --- a/docs/Model/StatutoryPayReport.md +++ b/docs/Model/StatutoryPayReport.md @@ -4,19 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**lines** | [**\SynergiTech\Staffology\Model\StatutoryPayReportLine[]**](StatutoryPayReportLine.md) | | [optional] **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**isDraft** | **bool** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\StatutoryPayReportLine[]**](StatutoryPayReportLine.md) | | [optional] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StatutoryPayReportLine.md b/docs/Model/StatutoryPayReportLine.md index 08afc14..9ce7c4a 100644 --- a/docs/Model/StatutoryPayReportLine.md +++ b/docs/Model/StatutoryPayReportLine.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**department** | **string** | | [optional] **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**hasStatPay** | **bool** | | [optional] [readonly] **payrollCode** | **string** | | [optional] -**department** | **string** | | [optional] -**ssp** | **float** | | [optional] -**smp** | **float** | | [optional] -**spp** | **float** | | [optional] **sap** | **float** | | [optional] **shpp** | **float** | | [optional] +**smp** | **float** | | [optional] **spbp** | **float** | | [optional] -**hasStatPay** | **bool** | | [optional] [readonly] +**spp** | **float** | | [optional] +**ssp** | **float** | | [optional] **totalStatPay** | **float** | | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StatutoryPayReportReportResponse.md b/docs/Model/StatutoryPayReportReportResponse.md index 06112b1..0c5230d 100644 --- a/docs/Model/StatutoryPayReportReportResponse.md +++ b/docs/Model/StatutoryPayReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\StatutoryPayReport**](StatutoryPayReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SupplementaryPayRunDetails.md b/docs/Model/SupplementaryPayRunDetails.md new file mode 100644 index 0000000..3ec3de9 --- /dev/null +++ b/docs/Model/SupplementaryPayRunDetails.md @@ -0,0 +1,11 @@ +# # SupplementaryPayRunDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **string** | Description of the Supplementary Pay Run This will be set to a default value if not set by the user | +**employeeUniqueIds** | **string[]** | List of employee unique ids to be included in a supplementary Payrun | +**paymentDate** | **\DateTime** | The intended date that the Employees included in the supplementary PayRun will be paid, although this can be changed on a per PayRunEntry basis This date must be on or after the PaymentDate of the main PayRun | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Tag.md b/docs/Model/Tag.md index f05799f..39beb36 100644 --- a/docs/Model/Tag.md +++ b/docs/Model/Tag.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **string** | The unique code for this Tag | -**title** | **string** | The title for this Tag | **color** | **string** | A color to used to represent this Tag, in hex format. ie 'ff0000' | [optional] +**title** | **string** | The title for this Tag | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TaxAndNi.md b/docs/Model/TaxAndNi.md index 657b7c5..0a8f650 100644 --- a/docs/Model/TaxAndNi.md +++ b/docs/Model/TaxAndNi.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**foreignTaxCredit** | **bool** | If set to True you are enabling the possibility to enter an amount on payslip so you can reduce UK Tax liabilities. | [optional] **niTable** | **string** | The appropriate NI letter for this Employee | -**secondaryClass1NotPayable** | **bool** | If set to true then no Employer NI will be paid for this Employee | [optional] **postgradLoan** | **bool** | Set to true if the Employee needs to make Post Graduate Loan repayments | [optional] -**postgraduateLoanStartDate** | **\DateTime** | | [optional] **postgraduateLoanEndDate** | **\DateTime** | | [optional] +**postgraduateLoanStartDate** | **\DateTime** | | [optional] +**secondaryClass1NotPayable** | **bool** | If set to true then no Employer NI will be paid for this Employee | [optional] **studentLoan** | [**\SynergiTech\Staffology\Model\StudentLoan**](StudentLoan.md) | | [optional] -**studentLoanStartDate** | **\DateTime** | | [optional] **studentLoanEndDate** | **\DateTime** | | [optional] +**studentLoanStartDate** | **\DateTime** | | [optional] **taxCode** | **string** | The Tax Code for this Employee | [optional] **week1Month1** | **bool** | Determines whether PAYE should be calculated on a Week1/Month1 basis instead of on a cumulative basis. This is automatically set to false for any existing Employees when you start a new Tax Year. | [optional] -**foreignTaxCredit** | **bool** | If set to True you are enabling the possibility to enter an amount on payslip so you can reduce UK Tax liabilities. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TaxBracket.md b/docs/Model/TaxBracket.md index 015f74d..5f94dcf 100644 --- a/docs/Model/TaxBracket.md +++ b/docs/Model/TaxBracket.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **from** | **float** | [readonly] The starting point for applying this tax rate | [optional] -**to** | **float** | [readonly] The end point for applying this tax rate | [optional] **multiplier** | **float** | [readonly] The tax rate to apply | [optional] +**to** | **float** | [readonly] The end point for applying this tax rate | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TaxCodeChange.md b/docs/Model/TaxCodeChange.md index 71cc67e..f3eb2b6 100644 --- a/docs/Model/TaxCodeChange.md +++ b/docs/Model/TaxCodeChange.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**suffix** | **string** | [readonly] The suffix of the Tax Code that needs to be incremented for this Tax Year | [optional] **increment** | **int** | [readonly] The amount by which to increment Tax Codes with the given suffix | [optional] +**suffix** | **string** | [readonly] The suffix of the Tax Code that needs to be incremented for this Tax Year | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TaxCodeChangeReport.md b/docs/Model/TaxCodeChangeReport.md index c05d184..f1d1669 100644 --- a/docs/Model/TaxCodeChangeReport.md +++ b/docs/Model/TaxCodeChangeReport.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\TaxCodeChangeValues[]**](TaxCodeChangeValues.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TaxCodeChangeReportReportResponse.md b/docs/Model/TaxCodeChangeReportReportResponse.md index 7298f4b..1aaa98c 100644 --- a/docs/Model/TaxCodeChangeReportReportResponse.md +++ b/docs/Model/TaxCodeChangeReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\TaxCodeChangeReport**](TaxCodeChangeReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TaxCodeChangeValues.md b/docs/Model/TaxCodeChangeValues.md index 14099c1..aa1c058 100644 --- a/docs/Model/TaxCodeChangeValues.md +++ b/docs/Model/TaxCodeChangeValues.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employeeId** | **int** | | [optional] +**currentTaxCode** | **string** | | [optional] **employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payrollCode** | **string** | | [optional] +**employeeId** | **int** | | [optional] **firstName** | **string** | | [optional] **lastName** | **string** | | [optional] **niNumber** | **string** | | [optional] +**payrollCode** | **string** | | [optional] **periodChange** | **int** | | [optional] **previousTaxCode** | **string** | | [optional] -**currentTaxCode** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TaxYearConfig.md b/docs/Model/TaxYearConfig.md index 42cdcaa..1305968 100644 --- a/docs/Model/TaxYearConfig.md +++ b/docs/Model/TaxYearConfig.md @@ -4,55 +4,58 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**taxYear** | **int** | [readonly] The TaxYear for which this configuration applies | [optional] -**isPreview** | **bool** | [readonly] Indicates that this is a preview of the given years configuration and it shouldn't yet be used for live processing of payroll data. | [optional] -**defaultTaxCode** | **string** | [readonly] | [optional] -**class1ANicsRate** | [**\SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue**](DecimalTaxYearConfigPrimitiveValue.md) | | [optional] -**lowerEarningsLimit** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] -**upperEarningsLimit** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] -**primaryThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] -**secondaryThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] -**upperAccrualPoint** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] -**upperSecondaryThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] **apprenticeUpperSecondaryThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] -**freeportsUpperSecondaryThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] -**veteransUpperSecondaryThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] +**brackets** | [**\SynergiTech\Staffology\Model\TaxBracket[]**](TaxBracket.md) | [readonly] | [optional] +**carCharge** | [**\SynergiTech\Staffology\Model\CarCharge**](CarCharge.md) | | [optional] +**class1ANicsRate** | [**\SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue**](DecimalTaxYearConfigPrimitiveValue.md) | | [optional] +**deaProtectedEarnings** | **float** | [readonly] | [optional] +**defaultTaxCode** | **string** | [readonly] | [optional] +**directorsNiRates** | [**\SynergiTech\Staffology\Model\NationalInsuranceCode[]**](NationalInsuranceCode.md) | [readonly] | [optional] **directorsProratePrimaryThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] -**plan1StudentLoanThreshold** | **float** | [readonly] | [optional] +**eligibleAeAge** | **int** | [readonly] | [optional] +**employmentAllowance** | **float** | [readonly] | [optional] +**employmentAllowancePreviousYear** | **float** | [readonly] | [optional] +**fixedCodes** | [**\SynergiTech\Staffology\Model\FixedCode[]**](FixedCode.md) | [readonly] | [optional] +**freeportsUpperSecondaryThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] +**govTalk** | [**\SynergiTech\Staffology\Model\GovTalk**](GovTalk.md) | | [optional] +**isPreview** | **bool** | [readonly] Indicates that this is a preview of the given years configuration and it shouldn't yet be used for live processing of payroll data. | [optional] +**loanCharge** | [**\SynergiTech\Staffology\Model\LoanCharge**](LoanCharge.md) | | [optional] +**lowerEarningsLimit** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] +**maximumAeAge** | **int** | [readonly] | [optional] +**mileageAllowancePaymentsRates** | [**\SynergiTech\Staffology\Model\MileageAllowancePaymentsRate[]**](MileageAllowancePaymentsRate.md) | [readonly] | [optional] +**minimumAeAge** | **int** | [readonly] | [optional] +**minimumWage** | [**\SynergiTech\Staffology\Model\NationalMinimumWage[]**](NationalMinimumWage.md) | [readonly] | [optional] +**niRates** | [**\SynergiTech\Staffology\Model\NationalInsuranceCode[]**](NationalInsuranceCode.md) | [readonly] | [optional] +**nicCompensationNormalEmployerRate** | **float** | [readonly] | [optional] +**nicCompensationSmallEmployerRate** | **float** | [readonly] | [optional] +**nicRecoverableNormalEmployerRate** | **float** | [readonly] | [optional] +**nicRecoverableSmallEmployerRate** | **float** | [readonly] | [optional] +**pensionAeEmployeeContribution** | **float** | [readonly] | [optional] +**pensionAeEmployerContribution** | **float** | [readonly] | [optional] +**pensionAutomaticEnrolment** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] +**pensionLowerThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] +**pensionUpperThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] **plan1StudentLoanRate** | **float** | [readonly] | [optional] -**plan2StudentLoanThreshold** | **float** | [readonly] | [optional] +**plan1StudentLoanThreshold** | **float** | [readonly] | [optional] **plan2StudentLoanRate** | **float** | [readonly] | [optional] -**plan4StudentLoanThreshold** | **float** | [readonly] | [optional] +**plan2StudentLoanThreshold** | **float** | [readonly] | [optional] **plan4StudentLoanRate** | **float** | [readonly] | [optional] -**postGradLoanThreshold** | **float** | [readonly] | [optional] +**plan4StudentLoanThreshold** | **float** | [readonly] | [optional] **postGradLoanRate** | **float** | [readonly] | [optional] -**deaProtectedEarnings** | **float** | [readonly] | [optional] -**pensionLowerThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] -**pensionAutomaticEnrolment** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] -**pensionUpperThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] -**pensionAeEmployerContribution** | **float** | [readonly] | [optional] -**pensionAeEmployeeContribution** | **float** | [readonly] | [optional] -**employmentAllowancePreviousYear** | **float** | [readonly] | [optional] -**employmentAllowance** | **float** | [readonly] | [optional] -**fixedCodes** | [**\SynergiTech\Staffology\Model\FixedCode[]**](FixedCode.md) | [readonly] | [optional] -**scottishFixedCodes** | [**\SynergiTech\Staffology\Model\FixedCode[]**](FixedCode.md) | [readonly] | [optional] -**welshFixedCodes** | [**\SynergiTech\Staffology\Model\FixedCode[]**](FixedCode.md) | [readonly] | [optional] -**niRates** | [**\SynergiTech\Staffology\Model\NationalInsuranceCode[]**](NationalInsuranceCode.md) | [readonly] | [optional] -**directorsNiRates** | [**\SynergiTech\Staffology\Model\NationalInsuranceCode[]**](NationalInsuranceCode.md) | [readonly] | [optional] -**brackets** | [**\SynergiTech\Staffology\Model\TaxBracket[]**](TaxBracket.md) | [readonly] | [optional] +**postGradLoanThreshold** | **float** | [readonly] | [optional] +**primaryThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] **scottishBrackets** | [**\SynergiTech\Staffology\Model\TaxBracket[]**](TaxBracket.md) | [readonly] | [optional] -**welshBrackets** | [**\SynergiTech\Staffology\Model\TaxBracket[]**](TaxBracket.md) | [readonly] | [optional] -**taxCodeChanges** | [**\SynergiTech\Staffology\Model\TaxCodeChange[]**](TaxCodeChange.md) | [readonly] | [optional] -**minimumWage** | [**\SynergiTech\Staffology\Model\NationalMinimumWage[]**](NationalMinimumWage.md) | [readonly] | [optional] +**scottishFixedCodes** | [**\SynergiTech\Staffology\Model\FixedCode[]**](FixedCode.md) | [readonly] | [optional] +**secondaryThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] **statutoryPay** | [**\SynergiTech\Staffology\Model\StatutoryPay**](StatutoryPay.md) | | [optional] -**loanCharge** | [**\SynergiTech\Staffology\Model\LoanCharge**](LoanCharge.md) | | [optional] -**carCharge** | [**\SynergiTech\Staffology\Model\CarCharge**](CarCharge.md) | | [optional] -**govTalk** | [**\SynergiTech\Staffology\Model\GovTalk**](GovTalk.md) | | [optional] -**mileageAllowancePaymentsRates** | [**\SynergiTech\Staffology\Model\MileageAllowancePaymentsRate[]**](MileageAllowancePaymentsRate.md) | [readonly] | [optional] +**taxCodeChanges** | [**\SynergiTech\Staffology\Model\TaxCodeChange[]**](TaxCodeChange.md) | [readonly] | [optional] +**taxYear** | **int** | [readonly] The TaxYear for which this configuration applies | [optional] **tieredPensions** | [**\SynergiTech\Staffology\Model\TieredPension[]**](TieredPension.md) | [readonly] | [optional] -**nicRecoverableNormalEmployerRate** | **float** | [readonly] | [optional] -**nicRecoverableSmallEmployerRate** | **float** | [readonly] | [optional] -**nicCompensationNormalEmployerRate** | **float** | [readonly] | [optional] -**nicCompensationSmallEmployerRate** | **float** | [readonly] | [optional] +**upperAccrualPoint** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] +**upperEarningsLimit** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] +**upperSecondaryThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] +**veteransUpperSecondaryThreshold** | [**\SynergiTech\Staffology\Model\PeriodValue**](PeriodValue.md) | | [optional] +**welshBrackets** | [**\SynergiTech\Staffology\Model\TaxBracket[]**](TaxBracket.md) | [readonly] | [optional] +**welshFixedCodes** | [**\SynergiTech\Staffology\Model\FixedCode[]**](FixedCode.md) | [readonly] | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TeachersPensionDetails.md b/docs/Model/TeachersPensionDetails.md index ed67e64..823af8f 100644 --- a/docs/Model/TeachersPensionDetails.md +++ b/docs/Model/TeachersPensionDetails.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **employmentType** | [**\SynergiTech\Staffology\Model\TeachersPensionEmploymentType**](TeachersPensionEmploymentType.md) | | [optional] **fullTimeSalary** | **int** | Up to 7 digits, in pounds. eg 24000 | [optional] -**partTimeSalaryPaid** | **int** | Up to 7 digits, in pounds. eg 24000 | [optional] **mcrRoleId1** | **string** | Data field for the Contract used for Teachers pension administration | [optional] **mcrRoleId2** | **string** | The Job role within the contract used for Teachers pension administration | [optional] +**partTimeSalaryPaid** | **int** | Up to 7 digits, in pounds. eg 24000 | [optional] **teachersPensionAdminNiNumber** | **string** | Where an employee does not have an NI number yet (or doesn't know their NI number) Teachers Pensions will issue an administrative NI number | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TeachersPensionEoyLineItem.md b/docs/Model/TeachersPensionEoyLineItem.md index d538f7b..b2b6b02 100644 --- a/docs/Model/TeachersPensionEoyLineItem.md +++ b/docs/Model/TeachersPensionEoyLineItem.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tier** | **float** | | [optional] -**percentageRate** | **float** | | [optional] [readonly] **contributorySalary** | **float** | | [optional] [readonly] -**teachersContributions** | **float** | | [optional] [readonly] **employersContributions** | **float** | | [optional] [readonly] +**percentageRate** | **float** | | [optional] [readonly] +**teachersContributions** | **float** | | [optional] [readonly] +**tier** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TeachersPensionEoyReport.md b/docs/Model/TeachersPensionEoyReport.md index b4b886d..6b09f95 100644 --- a/docs/Model/TeachersPensionEoyReport.md +++ b/docs/Model/TeachersPensionEoyReport.md @@ -4,27 +4,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pdfFileName** | **string** | | [optional] [readonly] -**establishment** | [**\SynergiTech\Staffology\Model\Establishment**](Establishment.md) | | [optional] -**lineItems** | [**\SynergiTech\Staffology\Model\TeachersPensionEoyLineItem[]**](TeachersPensionEoyLineItem.md) | | [optional] [readonly] -**careerAverageFlexibilities** | **float** | | [optional] [readonly] -**additionalPensionPayments** | **float** | | [optional] [readonly] **additionalContributions** | **float** | | [optional] [readonly] -**teachersContributions** | **float** | | [optional] [readonly] -**employersContributions** | **float** | | [optional] [readonly] -**totalContributions** | **float** | | [optional] [readonly] +**additionalPensionPayments** | **float** | | [optional] [readonly] +**careerAverageFlexibilities** | **float** | | [optional] [readonly] **efeArrears** | **float** | | [optional] [readonly] -**prestonContributions** | **float** | | [optional] [readonly] -**tr22ElectionAmounts** | **float** | | [optional] [readonly] -**totalExtraContributions** | **float** | | [optional] [readonly] -**overallBalance** | **float** | | [optional] [readonly] **employersContributionPercentage** | **float** | | [optional] [readonly] -**totalContributorySalary** | **float** | | [optional] [readonly] -**totalTeachersContributions** | **float** | | [optional] [readonly] -**totalEmployersContributions** | **float** | | [optional] [readonly] +**employersContributions** | **float** | | [optional] [readonly] +**establishment** | [**\SynergiTech\Staffology\Model\Establishment**](Establishment.md) | | [optional] +**isDraft** | **bool** | | [optional] +**lineItems** | [**\SynergiTech\Staffology\Model\TeachersPensionEoyLineItem[]**](TeachersPensionEoyLineItem.md) | | [optional] [readonly] +**overallBalance** | **float** | | [optional] [readonly] +**pdfFileName** | **string** | | [optional] [readonly] +**prestonContributions** | **float** | | [optional] [readonly] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**teachersContributions** | **float** | | [optional] [readonly] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**totalContributions** | **float** | | [optional] [readonly] +**totalContributorySalary** | **float** | | [optional] [readonly] +**totalEmployersContributions** | **float** | | [optional] [readonly] +**totalExtraContributions** | **float** | | [optional] [readonly] +**totalTeachersContributions** | **float** | | [optional] [readonly] +**tr22ElectionAmounts** | **float** | | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TeachersPensionEoyReportReportResponse.md b/docs/Model/TeachersPensionEoyReportReportResponse.md index 7276444..bdae063 100644 --- a/docs/Model/TeachersPensionEoyReportReportResponse.md +++ b/docs/Model/TeachersPensionEoyReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\TeachersPensionEoyReport**](TeachersPensionEoyReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Tenant.md b/docs/Model/Tenant.md index dc7736a..14b956d 100644 --- a/docs/Model/Tenant.md +++ b/docs/Model/Tenant.md @@ -4,33 +4,34 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**brandCode** | **string** | [readonly] | [optional] **appName** | **string** | | [optional] -**homeUrl** | **string** | | [optional] -**headContent** | **string** | | [optional] -**logOutUrl** | **string** | | [optional] -**loginImgUrl** | **string** | [readonly] | [optional] -**homeImgUrl** | **string** | [readonly] | [optional] -**favIcon** | **string** | [readonly] | [optional] +**approveNewUsers** | **bool** | | [optional] +**billingSettings** | [**\SynergiTech\Staffology\Model\TenantBillingSettings**](TenantBillingSettings.md) | | [optional] +**brandCode** | **string** | [readonly] | [optional] **cssColorsFile** | **string** | [readonly] | [optional] **cssFile** | **string** | [readonly] | [optional] -**mailingList** | **bool** | | [optional] +**disableEvc** | **bool** | Indicates whether FPS should be submitted to EVC for employees/employers under this tenant. | [optional] +**enableAdminsToManageReportWriter** | **bool** | Indicates whether all Admin users of a tenant can manage report templates. | [optional] +**enableBureauFeatures** | **bool** | | [optional] +**enableReportWriterFeature** | **bool** | Indicates if the Report Writer feature is enabled for the tenant. | [optional] +**favIcon** | **string** | [readonly] | [optional] +**headContent** | **string** | | [optional] +**helpUrl** | **string** | | [optional] +**homeImgUrl** | **string** | [readonly] | [optional] +**homeUrl** | **string** | | [optional] **htmlInsertions** | [**\SynergiTech\Staffology\Model\TenantHtmlInsertion[]**](TenantHtmlInsertion.md) | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**logOutUrl** | **string** | | [optional] +**loginImgUrl** | **string** | [readonly] | [optional] **mailSettings** | [**\SynergiTech\Staffology\Model\MailSettings**](MailSettings.md) | | [optional] -**signupUrl** | **string** | | [optional] -**termsUrl** | **string** | | [optional] -**helpUrl** | **string** | | [optional] -**supportEmail** | **string** | | [optional] +**mailingList** | **bool** | | [optional] **newUserSignupEmail** | **string** | | [optional] -**approveNewUsers** | **bool** | | [optional] -**enableBureauFeatures** | **bool** | | [optional] **requireDdMandateBeforeAllowingBillableActivity** | **bool** | | [optional] -**whiteLabelMode** | **bool** | | [optional] -**enableReportWriterFeature** | **bool** | Indicates if the Report Writer feature is enabled for the tenant. | [optional] -**disableEvc** | **bool** | Indicates whether FPS should be submitted to EVC for employees/employers under this tenant. | [optional] +**signupUrl** | **string** | | [optional] +**supportEmail** | **string** | | [optional] **tenantOwnsBilling** | **bool** | [readonly] | [optional] -**billingSettings** | [**\SynergiTech\Staffology\Model\TenantBillingSettings**](TenantBillingSettings.md) | | [optional] +**termsUrl** | **string** | | [optional] **usersCanManageAccountSecuritySettings** | **bool** | If the users are allowed manage their own account security settings through a page or portal defined by their current authentication provider | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**whiteLabelMode** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TenantBillingSettings.md b/docs/Model/TenantBillingSettings.md index 471240f..c72d3c1 100644 --- a/docs/Model/TenantBillingSettings.md +++ b/docs/Model/TenantBillingSettings.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**discount** | **float** | | [optional] -**monthlyMinimum** | **float** | | [optional] **aggregatedPricing** | **bool** | | [optional] **billTo** | **string** | If all activity for a Tenant is being biulled to a specifc user, set the email address here | [optional] -**pricingTable** | **string** | If BillTo is set, then specify a Pricing Table to use from the Staffology tenant, otherwise the default Staffology Pricing Table will be used | [optional] -**netSuiteDefaultItemCode** | **string** | [readonly] The item code used in the NetSuite billing if not specified in the pricing table | [optional] +**discount** | **float** | | [optional] +**monthlyMinimum** | **float** | | [optional] **netSuiteDefaultDescription** | **string** | [readonly] The product description used in the NetSuite billing if not specified in the pricing table | [optional] +**netSuiteDefaultItemCode** | **string** | [readonly] The item code used in the NetSuite billing if not specified in the pricing table | [optional] +**pricingTable** | **string** | If BillTo is set, then specify a Pricing Table to use from the Staffology tenant, otherwise the default Staffology Pricing Table will be used | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TenantEmail.md b/docs/Model/TenantEmail.md index f69a950..fc2c597 100644 --- a/docs/Model/TenantEmail.md +++ b/docs/Model/TenantEmail.md @@ -4,20 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**toName** | **string** | | -**toEmail** | **string** | | -**subject** | **string** | | -**buttonText** | **string** | | [optional] -**buttonLink** | **string** | | [optional] -**bodyPreview** | **string** | | [optional] -**body** | **string** | | [optional] **afterBtnBody** | **string** | | [optional] +**attachments** | [**\SynergiTech\Staffology\Model\EmailAttachment[]**](EmailAttachment.md) | | [optional] +**body** | **string** | | [optional] +**bodyPreview** | **string** | | [optional] +**buttonLink** | **string** | | [optional] +**buttonText** | **string** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**sendAttempts** | **int** | | [optional] **status** | [**\SynergiTech\Staffology\Model\BackgroundTaskStatus**](BackgroundTaskStatus.md) | | [optional] **statusDate** | **\DateTime** | | [optional] **statusMessage** | **string** | | [optional] -**sendAttempts** | **int** | | [optional] +**subject** | **string** | | +**toEmail** | **string** | | +**toName** | **string** | | **webAppBaseUrl** | **string** | | [optional] -**attachments** | [**\SynergiTech\Staffology\Model\EmailAttachment[]**](EmailAttachment.md) | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TenantHtmlInsertion.md b/docs/Model/TenantHtmlInsertion.md index ddbabed..6ebac16 100644 --- a/docs/Model/TenantHtmlInsertion.md +++ b/docs/Model/TenantHtmlInsertion.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**insertionPoint** | [**\SynergiTech\Staffology\Model\HtmlInsertionPoint**](HtmlInsertionPoint.md) | | [optional] **content** | **string** | | [optional] +**insertionPoint** | [**\SynergiTech\Staffology\Model\HtmlInsertionPoint**](HtmlInsertionPoint.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TenantItem.md b/docs/Model/TenantItem.md index c856325..e643768 100644 --- a/docs/Model/TenantItem.md +++ b/docs/Model/TenantItem.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] -**name** | **string** | | [optional] **metadata** | **mixed** | | [optional] +**name** | **string** | | [optional] **url** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TieredPension.md b/docs/Model/TieredPension.md index f855b10..858a447 100644 --- a/docs/Model/TieredPension.md +++ b/docs/Model/TieredPension.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\SynergiTech\Staffology\Model\PensionContributionLevelType**](PensionContributionLevelType.md) | | [optional] -**rates** | [**\SynergiTech\Staffology\Model\TieredPensionRate[]**](TieredPensionRate.md) | | [optional] **employerContribRate** | **float** | | [optional] +**rates** | [**\SynergiTech\Staffology\Model\TieredPensionRate[]**](TieredPensionRate.md) | | [optional] +**type** | [**\SynergiTech\Staffology\Model\PensionContributionLevelType**](PensionContributionLevelType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TieredPensionRate.md b/docs/Model/TieredPensionRate.md index 070b60c..88e9746 100644 --- a/docs/Model/TieredPensionRate.md +++ b/docs/Model/TieredPensionRate.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | [optional] **description** | **string** | | [optional] +**name** | **string** | | [optional] **rangeStart** | **float** | | [optional] **rate** | **float** | | [optional] diff --git a/docs/Model/UmbrellaPayment.md b/docs/Model/UmbrellaPayment.md index 5f935f1..836f40c 100644 --- a/docs/Model/UmbrellaPayment.md +++ b/docs/Model/UmbrellaPayment.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollCode** | **string** | When importing multiple UmbrellaPayments this field is used to identify the employee | [optional] **chargePerTimesheet** | **float** | Override the settings for this employer by specifying a ChargePerTimeSheet. Or leave it as null to use the settings from the Employer | [optional] +**grossAddition** | **float** | | [optional] +**grossDeduction** | **float** | | [optional] +**hoursWorked** | **float** | | [optional] **invoiceValue** | **float** | | [optional] **mapsMiles** | **int** | | [optional] -**otherExpenses** | **float** | | [optional] **numberOfTimesheets** | **int** | | [optional] -**hoursWorked** | **float** | | [optional] -**grossDeduction** | **float** | | [optional] -**grossAddition** | **float** | | [optional] +**otherExpenses** | **float** | | [optional] +**payrollCode** | **string** | When importing multiple UmbrellaPayments this field is used to identify the employee | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UmbrellaReconciliationReport.md b/docs/Model/UmbrellaReconciliationReport.md index 9263b96..e4fcd5e 100644 --- a/docs/Model/UmbrellaReconciliationReport.md +++ b/docs/Model/UmbrellaReconciliationReport.md @@ -4,19 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**lines** | [**\SynergiTech\Staffology\Model\UmbrellaReconciliationReportLine[]**](UmbrellaReconciliationReportLine.md) | | [optional] **employer** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] +**endDate** | **\DateTime** | | [optional] +**endPeriodName** | **string** | | [optional] +**isDraft** | **bool** | | [optional] +**lines** | [**\SynergiTech\Staffology\Model\UmbrellaReconciliationReportLine[]**](UmbrellaReconciliationReportLine.md) | | [optional] **ordinal** | **int** | | [optional] +**payPeriod** | [**\SynergiTech\Staffology\Model\PayPeriods**](PayPeriods.md) | | [optional] **period** | **int** | | [optional] **periodTo** | **int** | | [optional] -**startPeriodName** | **string** | | [optional] -**endPeriodName** | **string** | | [optional] -**startDate** | **\DateTime** | | [optional] -**endDate** | **\DateTime** | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**startDate** | **\DateTime** | | [optional] +**startPeriodName** | **string** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] +**version** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UmbrellaReconciliationReportLine.md b/docs/Model/UmbrellaReconciliationReportLine.md index 7d5dca1..4d0eaea 100644 --- a/docs/Model/UmbrellaReconciliationReportLine.md +++ b/docs/Model/UmbrellaReconciliationReportLine.md @@ -4,23 +4,23 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] -**period** | **string** | | [optional] -**payrollCode** | **string** | | [optional] +**appLevy** | **float** | | [optional] **department** | **string** | | [optional] -**totalGross** | **float** | | [optional] -**netPay** | **float** | | [optional] -**tax** | **float** | | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] +**employeeCosts** | **float** | | [optional] [readonly] **employeeNi** | **float** | | [optional] -**employerNi** | **float** | | [optional] **employeePension** | **float** | | [optional] +**employerCosts** | **float** | | [optional] [readonly] +**employerNi** | **float** | | [optional] **employerPension** | **float** | | [optional] **expenses** | **float** | | [optional] **fee** | **float** | | [optional] -**appLevy** | **float** | | [optional] **invoiceValue** | **float** | | [optional] -**employeeCosts** | **float** | | [optional] [readonly] -**employerCosts** | **float** | | [optional] [readonly] +**netPay** | **float** | | [optional] +**payrollCode** | **string** | | [optional] +**period** | **string** | | [optional] +**tax** | **float** | | [optional] **total** | **float** | | [optional] [readonly] +**totalGross** | **float** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UmbrellaReconciliationReportReportResponse.md b/docs/Model/UmbrellaReconciliationReportReportResponse.md index 1ff919a..8d869a6 100644 --- a/docs/Model/UmbrellaReconciliationReportReportResponse.md +++ b/docs/Model/UmbrellaReconciliationReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\UmbrellaReconciliationReport**](UmbrellaReconciliationReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UsageBill.md b/docs/Model/UsageBill.md index cefe82f..d87e9f0 100644 --- a/docs/Model/UsageBill.md +++ b/docs/Model/UsageBill.md @@ -4,21 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**year** | **int** | | [optional] +**accountingCustomerId** | **string** | | [optional] +**accountingInvoiceId** | **string** | | [optional] +**accountingInvoiceLink** | **string** | | [optional] +**discount** | **float** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **month** | **int** | | [optional] -**payslipCount** | **int** | | [optional] -**previouslyBilledPayslipCount** | **int** | The number of payslips that appear in the usage, but were billed in a previous period | [optional] +**monthlyMinimum** | **float** | This is actually an offset against the NetCost and doesn't contain the full MonthlyMinimum. | [optional] **netCost** | **float** | Net cost of any payslips, or the Pricing Table minimum, whichever is greater. | [optional] -**discount** | **float** | | [optional] +**paid** | **bool** | | [optional] **partnerDiscountAmount** | **float** | | [optional] -**monthlyMinimum** | **float** | This is actually an offset against the NetCost and doesn't contain the full MonthlyMinimum. | [optional] +**payslipCount** | **int** | | [optional] +**previouslyBilledPayslipCount** | **int** | The number of payslips that appear in the usage, but were billed in a previous period | [optional] **total** | **float** | | [optional] [readonly] -**paid** | **bool** | | [optional] **usage** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | | [optional] -**accountingCustomerId** | **string** | | [optional] -**accountingInvoiceId** | **string** | | [optional] -**accountingInvoiceLink** | **string** | | [optional] **useNetSuite** | **bool** | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**year** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/User.md b/docs/Model/User.md index 53e3314..7de39fb 100644 --- a/docs/Model/User.md +++ b/docs/Model/User.md @@ -4,55 +4,56 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**accountingCustomerId** | **string** | [readonly] Used internally to manage billing | [optional] +**address** | [**\SynergiTech\Staffology\Model\Address**](Address.md) | | [optional] +**apiMailingEnabled** | **bool** | Flag to keep the user up-to-date with any API changes and inform about upcoming breaking changes. | [optional] +**authorization** | [**\SynergiTech\Staffology\Model\UserAuthorization**](UserAuthorization.md) | | [optional] +**bureauNotificationEmailAddress** | **string** | If an email address is provided here then Bureau-related notifications will go to this address instead of the EmailAddress | [optional] +**businessName** | **string** | | [optional] +**canCreateEmployers** | **bool** | [readonly] If false then the user cannot create new employers. This can be turned on or off by the tenant admin. | [optional] +**canEnablePremiumConnectors** | **bool** | Indicates whether the user has permission to enable the premium connectors feature. | [optional] +**canUseBetaFeatures** | **bool** | | [optional] +**canUseBureauFeatures** | **bool** | | [optional] +**canUseReportWriter** | **bool** | Indicates whether the user has permission to use the report writer feature. | [optional] **category** | [**\SynergiTech\Staffology\Model\UserCategory**](UserCategory.md) | | [optional] +**directDebitMandate** | [**\SynergiTech\Staffology\Model\DirectDebitMandate**](DirectDebitMandate.md) | | [optional] +**disabled** | **bool** | [readonly] If true then any employers the owner managed will not be able to run new payruns. DisabledReason will give a reason why the account is disabled | [optional] +**disabledReason** | **string** | | [optional] +**displayPrefs** | [**\SynergiTech\Staffology\Model\UserDisplayPreferences**](UserDisplayPreferences.md) | | [optional] **emailAddress** | **string** | | [optional] -**pendingEmailAddress** | **string** | If the user has requested to change their email address then the address it'll be changed to after verification will be shown here. | [optional] -**firstName** | **string** | | [optional] -**lastName** | **string** | | [optional] -**salutation** | **string** | | [optional] -**userIdentifier** | **string** | | [optional] -**photo** | **string** | | [optional] -**photoSasUrl** | **string** | | [optional] -**role** | [**\SynergiTech\Staffology\Model\UserRole**](UserRole.md) | | [optional] -**jobType** | [**\SynergiTech\Staffology\Model\UserJobType**](UserJobType.md) | | [optional] -**jobTitle** | **string** | | [optional] -**telephoneNumber** | **string** | | [optional] -**businessName** | **string** | | [optional] -**industry** | [**\SynergiTech\Staffology\Model\UserIndustry**](UserIndustry.md) | | [optional] -**address** | [**\SynergiTech\Staffology\Model\Address**](Address.md) | | [optional] -**statedEmployeeCount** | **int** | | [optional] -**emailVerified** | **bool** | | [optional] **emailVerificationKey** | **string** | | [optional] +**emailVerified** | **bool** | | [optional] +**firstBillableActivityDate** | **\DateTime** | | [optional] +**firstName** | **string** | | [optional] **gdprOptin** | **bool** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**industry** | [**\SynergiTech\Staffology\Model\UserIndustry**](UserIndustry.md) | | [optional] **inviteCode** | **string** | | [optional] -**registrationIp** | **string** | | [optional] -**registrationDate** | **\DateTime** | | [optional] -**lastLogin** | **\DateTime** | | [optional] **isActivated** | **bool** | | [optional] -**authorization** | [**\SynergiTech\Staffology\Model\UserAuthorization**](UserAuthorization.md) | | [optional] -**isSuperAdmin** | **bool** | | [optional] -**canUseBureauFeatures** | **bool** | | [optional] -**canUseBetaFeatures** | **bool** | | [optional] -**canUseReportWriter** | **bool** | Indicates whether the user has permission to use the report writer feature. | [optional] -**canUseRefactoredAeRoutines** | **bool** | | [optional] **isBilledInNetSuite** | **bool** | | [optional] -**tenant** | [**\SynergiTech\Staffology\Model\Tenant**](Tenant.md) | | [optional] +**isBureauMember** | **bool** | Indicates whether the user is a bureau member. | [optional] +**isSuperAdmin** | **bool** | | [optional] +**jobTitle** | **string** | | [optional] +**jobType** | [**\SynergiTech\Staffology\Model\UserJobType**](UserJobType.md) | | [optional] +**lastLogin** | **\DateTime** | | [optional] +**lastName** | **string** | | [optional] +**loginDisabled** | **bool** | [readonly] If true then the user will not have login permissions | [optional] +**migratedFrom** | **string** | | [optional] +**monthlyMinimum** | [**\SynergiTech\Staffology\Model\MonthlyMinimum**](MonthlyMinimum.md) | | [optional] +**pendingEmailAddress** | **string** | If the user has requested to change their email address then the address it'll be changed to after verification will be shown here. | [optional] +**photo** | **string** | | [optional] +**photoSasUrl** | **string** | | [optional] +**pricingTableId** | **string** | | [optional] +**registrationDate** | **\DateTime** | | [optional] +**registrationIp** | **string** | | [optional] **requestDdSetup** | **bool** | [readonly] If true then the user is required to set up a direct debit mandate | [optional] -**disabled** | **bool** | [readonly] If true then any employers the owner managed will not be able to run new payruns. DisabledReason will give a reason why the account is disabled | [optional] -**canCreateEmployers** | **bool** | [readonly] If false then the user cannot create new employers. This can be turned on or off by the tenant admin. | [optional] -**disabledReason** | **string** | | [optional] -**directDebitMandate** | [**\SynergiTech\Staffology\Model\DirectDebitMandate**](DirectDebitMandate.md) | | [optional] -**displayPrefs** | [**\SynergiTech\Staffology\Model\UserDisplayPreferences**](UserDisplayPreferences.md) | | [optional] +**role** | [**\SynergiTech\Staffology\Model\UserRole**](UserRole.md) | | [optional] +**salutation** | **string** | | [optional] **showBills** | **bool** | [readonly] Whether or not the user can see bills. This will be false if the Tenant manages billing and the user is not an admin for the Tenant | [optional] -**accountingCustomerId** | **string** | [readonly] Used internally to manage billing | [optional] -**pricingTableId** | **string** | | [optional] +**statedEmployeeCount** | **int** | | [optional] +**telephoneNumber** | **string** | | [optional] +**tenant** | [**\SynergiTech\Staffology\Model\Tenant**](Tenant.md) | | [optional] +**userIdentifier** | **string** | | [optional] **utmInfo** | [**\SynergiTech\Staffology\Model\UtmInfo**](UtmInfo.md) | | [optional] -**firstBillableActivityDate** | **\DateTime** | | [optional] -**bureauNotificationEmailAddress** | **string** | If an email address is provided here then Bureau-related notifications will go to this address instead of the EmailAddress | [optional] -**monthlyMinimum** | [**\SynergiTech\Staffology\Model\MonthlyMinimum**](MonthlyMinimum.md) | | [optional] -**apiMailingEnabled** | **bool** | Flag to keep the user up-to-date with any API changes and inform about upcoming breaking changes. | [optional] -**loginDisabled** | **bool** | [readonly] If true then the user will not have login permissions | [optional] -**isBureauMember** | **bool** | Indicates whether the user is a bureau member. | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UserDisplayPreferences.md b/docs/Model/UserDisplayPreferences.md index d5fa807..607037d 100644 --- a/docs/Model/UserDisplayPreferences.md +++ b/docs/Model/UserDisplayPreferences.md @@ -4,21 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**startPage** | [**\SynergiTech\Staffology\Model\UserstartPage**](UserstartPage.md) | | [optional] -**showZeroes** | **bool** | | [optional] -**showTaxCodeWhenViewingPayrunEntry** | **bool** | | [optional] **allowJournalResubmit** | **bool** | | [optional] -**hideSalaryOnEmployeeIndexPage** | **bool** | | [optional] -**enableMultiEmployerImport** | **bool** | | [optional] +**dontHideFpsEmployeeList** | **bool** | | [optional] **enableCovid19Features** | **bool** | | [optional] -**hidePayslipCheckboxes** | **bool** | | [optional] -**hidePayslipSearchAndSort** | **bool** | | [optional] -**showYtdInPayslipView** | **bool** | | [optional] **enableDpsXmlUpload** | **bool** | | [optional] -**enableRtiTimestampOverride** | **bool** | | [optional] +**enableMultiEmployerImport** | **bool** | | [optional] +**enablePayrunPagination** | **bool** | | [optional] **enablePayrunWarnings** | **bool** | | [optional] +**enableRtiTimestampOverride** | **bool** | | [optional] **enableWorkingDaysOverrides** | **bool** | | [optional] -**enablePayrunPagination** | **bool** | | [optional] -**dontHideFpsEmployeeList** | **bool** | | [optional] +**hidePayslipCheckboxes** | **bool** | | [optional] +**hidePayslipSearchAndSort** | **bool** | | [optional] +**hideSalaryOnEmployeeIndexPage** | **bool** | | [optional] +**showTaxCodeWhenViewingPayrunEntry** | **bool** | | [optional] +**showYtdInPayslipView** | **bool** | | [optional] +**showZeroes** | **bool** | | [optional] +**startPage** | [**\SynergiTech\Staffology\Model\UserstartPage**](UserstartPage.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UserEmployer.md b/docs/Model/UserEmployer.md new file mode 100644 index 0000000..d216888 --- /dev/null +++ b/docs/Model/UserEmployer.md @@ -0,0 +1,14 @@ +# # UserEmployer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employerId** | **int** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**isOwner** | **bool** | | [optional] +**role** | [**\SynergiTech\Staffology\Model\UserRole**](UserRole.md) | | [optional] +**showOutstandingLoanBalancesOnly** | **bool** | | [optional] +**userId** | **int** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UtmInfo.md b/docs/Model/UtmInfo.md index 4526722..d7b4544 100644 --- a/docs/Model/UtmInfo.md +++ b/docs/Model/UtmInfo.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**source** | **string** | | [optional] +**campaign** | **string** | | [optional] +**content** | **string** | | [optional] **medium** | **string** | | [optional] +**source** | **string** | | [optional] **term** | **string** | | [optional] -**content** | **string** | | [optional] -**campaign** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ValueOverride.md b/docs/Model/ValueOverride.md index db5787e..59efc79 100644 --- a/docs/Model/ValueOverride.md +++ b/docs/Model/ValueOverride.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\SynergiTech\Staffology\Model\PayrollValueType**](PayrollValueType.md) | | [optional] -**value** | **float** | The value to use in place of the original value | [optional] -**originalValue** | **float** | [readonly] The original value | [optional] -**note** | **string** | The reason given for the override | [optional] **attachmentOrderId** | **string** | The Id of the AttachmentOrder. Only relevant if the Type is set to AttachmentOrderDeductions | [optional] -**pensionId** | **string** | The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS | [optional] **leaveId** | **string** | The Id of the associated Leave. | [optional] +**note** | **string** | The reason given for the override | [optional] +**originalValue** | **float** | [readonly] The original value | [optional] +**pensionId** | **string** | The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS | [optional] +**type** | [**\SynergiTech\Staffology\Model\PayrollValueType**](PayrollValueType.md) | | [optional] +**value** | **float** | The value to use in place of the original value | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VarianceReport.md b/docs/Model/VarianceReport.md index 2a4a042..46185a6 100644 --- a/docs/Model/VarianceReport.md +++ b/docs/Model/VarianceReport.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**showDifferenceAsPercentage** | **bool** | | [optional] -**minimumChangePercentage** | **float** | | [optional] -**primary** | [**\SynergiTech\Staffology\Model\GrossToNetReport**](GrossToNetReport.md) | | [optional] -**secondary** | [**\SynergiTech\Staffology\Model\GrossToNetReport**](GrossToNetReport.md) | | [optional] -**joiners** | [**\SynergiTech\Staffology\Model\GrossToNetReportLine[]**](GrossToNetReportLine.md) | | [optional] [readonly] -**leavers** | [**\SynergiTech\Staffology\Model\GrossToNetReportLine[]**](GrossToNetReportLine.md) | | [optional] [readonly] -**hasDepartments** | **bool** | | [optional] [readonly] **commonLines** | [**\SynergiTech\Staffology\Model\GrossToNetReportLine[]**](GrossToNetReportLine.md) | | [optional] [readonly] +**hasDepartments** | **bool** | | [optional] [readonly] **hasVariances** | **bool** | | [optional] [readonly] +**isDraft** | **bool** | | [optional] +**joiners** | [**\SynergiTech\Staffology\Model\GrossToNetReportLine[]**](GrossToNetReportLine.md) | | [optional] [readonly] +**leavers** | [**\SynergiTech\Staffology\Model\GrossToNetReportLine[]**](GrossToNetReportLine.md) | | [optional] [readonly] +**minimumChangePercentage** | **float** | | [optional] +**primary** | [**\SynergiTech\Staffology\Model\GrossToNetReport**](GrossToNetReport.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] +**secondary** | [**\SynergiTech\Staffology\Model\GrossToNetReport**](GrossToNetReport.md) | | [optional] +**showDifferenceAsPercentage** | **bool** | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VarianceReportReportResponse.md b/docs/Model/VarianceReportReportResponse.md index 29e8711..0eea5d9 100644 --- a/docs/Model/VarianceReportReportResponse.md +++ b/docs/Model/VarianceReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\VarianceReport**](VarianceReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VeteranDetails.md b/docs/Model/VeteranDetails.md index 5ce2938..d717fa7 100644 --- a/docs/Model/VeteranDetails.md +++ b/docs/Model/VeteranDetails.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**isVeteran** | **bool** | Set to true if the employee is a veteran | [optional] **firstCivilianEmploymentDate** | **\DateTime** | Date of Veteran's first civilian employment | [optional] +**isVeteran** | **bool** | Set to true if the employee is a veteran | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WarningsReportLine.md b/docs/Model/WarningsReportLine.md index 104d9b7..459811f 100644 --- a/docs/Model/WarningsReportLine.md +++ b/docs/Model/WarningsReportLine.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrollCode** | **string** | | [optional] **employeeName** | **string** | | [optional] -**warningType** | [**\SynergiTech\Staffology\Model\PayRunEntryWarningType**](PayRunEntryWarningType.md) | | [optional] +**payrollCode** | **string** | | [optional] **warningMessage** | **string** | | [optional] +**warningType** | [**\SynergiTech\Staffology\Model\PayRunEntryWarningType**](PayRunEntryWarningType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WarningsReportReportResponse.md b/docs/Model/WarningsReportReportResponse.md index 354645f..4347271 100644 --- a/docs/Model/WarningsReportReportResponse.md +++ b/docs/Model/WarningsReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\WarningsReport**](WarningsReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Webhook.md b/docs/Model/Webhook.md index 002b83a..abc6dca 100644 --- a/docs/Model/Webhook.md +++ b/docs/Model/Webhook.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**webhookEvent** | [**\SynergiTech\Staffology\Model\WebhookEvent**](WebhookEvent.md) | | [optional] -**url** | **string** | The Url to which the payload should be sent | **active** | **bool** | If set to false then this Webhook will not be triggered | [optional] **eventCount** | **int** | The number of times this webhook has been triggered | [optional] -**lastPayload** | [**\SynergiTech\Staffology\Model\WebhookPayload**](WebhookPayload.md) | | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**lastPayload** | [**\SynergiTech\Staffology\Model\WebhookPayload**](WebhookPayload.md) | | [optional] +**url** | **string** | The Url to which the payload should be sent | +**webhookEvent** | [**\SynergiTech\Staffology\Model\WebhookEvent**](WebhookEvent.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookPayload.md b/docs/Model/WebhookPayload.md index 603182a..a9ded7c 100644 --- a/docs/Model/WebhookPayload.md +++ b/docs/Model/WebhookPayload.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | [readonly] A descriptive name for this payload | [optional] -**url** | **string** | [readonly] The Url that payload will be sent to | **attempts** | **int** | [readonly] The number of attempts that have been made to deliver this payload | [optional] -**statusCode** | **int** | [readonly] The status code received from the Url | [optional] -**taskStatus** | [**\SynergiTech\Staffology\Model\BackgroundTaskStatus**](BackgroundTaskStatus.md) | | [optional] -**statusMessage** | **string** | [readonly] A message to accompany the status | [optional] **created** | **\DateTime** | [readonly] The date and time this payload was created | [optional] [readonly] -**payload** | **mixed** | [readonly] the JSON payload that will be sent to the URl | [optional] **id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**name** | **string** | [readonly] A descriptive name for this payload | [optional] +**payload** | **mixed** | [readonly] the JSON payload that will be sent to the URl | [optional] +**statusCode** | **int** | [readonly] The status code received from the Url | [optional] +**statusMessage** | **string** | [readonly] A message to accompany the status | [optional] +**taskStatus** | [**\SynergiTech\Staffology\Model\BackgroundTaskStatus**](BackgroundTaskStatus.md) | | [optional] +**url** | **string** | [readonly] The Url that payload will be sent to | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WorkerGroup.md b/docs/Model/WorkerGroup.md index dd5f402..c03e45b 100644 --- a/docs/Model/WorkerGroup.md +++ b/docs/Model/WorkerGroup.md @@ -4,34 +4,34 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | +**additionalVoluntaryContribution** | **float** | Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. | [optional] +**assumedPensionablePay** | [**\SynergiTech\Staffology\Model\AssumedPensionablePay**](AssumedPensionablePay.md) | | [optional] +**avcIsPercentage** | **bool** | Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, | [optional] **contributionLevelType** | [**\SynergiTech\Staffology\Model\PensionContributionLevelType**](PensionContributionLevelType.md) | | [optional] +**customThreshold** | **bool** | | [optional] **employeeContribution** | **float** | | [optional] **employeeContributionIsPercentage** | **bool** | | [optional] **employerContribution** | **float** | | [optional] -**employerContributionIsPercentage** | **bool** | | [optional] -**employerContributionTopUpPercentage** | **float** | Increase Employer Contribution by this percentage of the Employee Contribution | [optional] **employerContributionIncludesNiSaving** | **bool** | Employer Contribution includes the Employers NI saving | [optional] +**employerContributionIsPercentage** | **bool** | | [optional] +**employerContributionNiSaving** | **float** | Employers NI Saving | [optional] **employerContributionNiSavingPercentage** | **float** | Increase Employer Contribution by this percentage of the Employers NI saving | [optional] +**employerContributionTopUpPercentage** | **float** | Increase Employer Contribution by this percentage of the Employee Contribution | [optional] +**employerReference** | **string** | | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **isAvc** | **bool** | Determines whether the workergroup uses additonal voluntary contributions. This property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC. | [optional] -**additionalVoluntaryContribution** | **float** | Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. | [optional] -**avcIsPercentage** | **bool** | Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, | [optional] -**employerContributionNiSaving** | **float** | Employers NI Saving | [optional] -**customThreshold** | **bool** | | [optional] +**lgpsFund** | [**\SynergiTech\Staffology\Model\LgpsFund**](LgpsFund.md) | | [optional] +**localAuthorityNumber** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] **lowerLimit** | **float** | | [optional] -**upperLimit** | **float** | | [optional] +**matIdentifier** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] +**matUniqueNumber** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] +**name** | **string** | | **papdisGroup** | **string** | | [optional] **papdisSubGroup** | **string** | | [optional] -**localAuthorityNumber** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] +**payslipDescription** | **string** | Used for overwriting the pension description that is displayed on the payslip | [optional] +**pensionablePayDefinition** | [**\SynergiTech\Staffology\Model\PensionablePayDefinition**](PensionablePayDefinition.md) | | [optional] **schoolEmployerType** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] -**matIdentifier** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] -**matUniqueNumber** | **string** | Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales | [optional] -**employerReference** | **string** | | [optional] -**lgpsFund** | [**\SynergiTech\Staffology\Model\LgpsFund**](LgpsFund.md) | | [optional] +**upperLimit** | **float** | | [optional] **workerGroupId** | **string** | [readonly] | [optional] -**assumedPensionablePay** | [**\SynergiTech\Staffology\Model\AssumedPensionablePay**](AssumedPensionablePay.md) | | [optional] -**pensionablePayDefinition** | [**\SynergiTech\Staffology\Model\PensionablePayDefinition**](PensionablePayDefinition.md) | | [optional] -**payslipDescription** | **string** | Used for overwriting the pension description that is displayed on the payslip | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WorkingPattern.md b/docs/Model/WorkingPattern.md index 9368c37..bd34212 100644 --- a/docs/Model/WorkingPattern.md +++ b/docs/Model/WorkingPattern.md @@ -4,26 +4,26 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | | -**mon** | **float** | | [optional] -**tue** | **float** | | [optional] -**wed** | **float** | | [optional] -**thu** | **float** | | [optional] -**fri** | **float** | | [optional] -**sat** | **float** | | [optional] -**sun** | **float** | | [optional] +**bankHolidayDates** | **\DateTime[]** | [readonly] The dates that are classed as Bank Holidays for this WorkingPattern | [optional] +**bankHolidays** | [**\SynergiTech\Staffology\Model\BankHolidayCollection**](BankHolidayCollection.md) | | [optional] **contractedWeeks** | **float** | The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. | [optional] -**fullTimeContractedWeeks** | **float** | The amount of weeks an employee works (Full Time). If Null then the default is used. | [optional] +**effectiveFrom** | **\DateTime** | The date when the assignment of the Working Pattern becomes effective. Required for a Shift WorkingPattern to determine when it starts | [optional] +**fri** | **float** | | [optional] **fullTimeContractedHours** | **float** | The amount of hours an employee works (Full Time). If Null then the default is used. | [optional] -**bankHolidays** | [**\SynergiTech\Staffology\Model\BankHolidayCollection**](BankHolidayCollection.md) | | [optional] -**proRataRule** | [**\SynergiTech\Staffology\Model\ProRataRule**](ProRataRule.md) | | [optional] -**bankHolidayDates** | **\DateTime[]** | [readonly] The dates that are classed as Bank Holidays for this WorkingPattern | [optional] -**workingPatternHoursType** | [**\SynergiTech\Staffology\Model\WorkingPatternHoursType**](WorkingPatternHoursType.md) | | [optional] +**fullTimeContractedWeeks** | **float** | The amount of weeks an employee works (Full Time). If Null then the default is used. | [optional] +**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] **isDefault** | **bool** | | [optional] -**effectiveFrom** | **\DateTime** | The date when the assignment of the Working Pattern becomes effective. Required for a Shift WorkingPattern to determine when it starts | [optional] -**workingPatternType** | [**\SynergiTech\Staffology\Model\WorkingPatternType**](WorkingPatternType.md) | | [optional] +**mon** | **float** | | [optional] +**proRataRule** | [**\SynergiTech\Staffology\Model\ProRataRule**](ProRataRule.md) | | [optional] +**sat** | **float** | | [optional] **shiftWorkingPatternDays** | [**\SynergiTech\Staffology\Model\ShiftWorkingPatternDay[]**](ShiftWorkingPatternDay.md) | | [optional] +**sun** | **float** | | [optional] +**thu** | **float** | | [optional] +**title** | **string** | | +**tue** | **float** | | [optional] +**wed** | **float** | | [optional] **workingPatternEffectiveFrom** | **\DateTime** | | [optional] -**id** | **string** | [readonly] The unique id of the object | [optional] [readonly] +**workingPatternHoursType** | [**\SynergiTech\Staffology\Model\WorkingPatternHoursType**](WorkingPatternHoursType.md) | | [optional] +**workingPatternType** | [**\SynergiTech\Staffology\Model\WorkingPatternType**](WorkingPatternType.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/YearEnd.md b/docs/Model/YearEnd.md index e0ed95f..df75a68 100644 --- a/docs/Model/YearEnd.md +++ b/docs/Model/YearEnd.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**endingYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**startingYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] -**createEpsForFinalSubmission** | **bool** | [readonly] Whether or not the system will automatically create an EPS to tell HMRC the year has ended. | [optional] **createEpsForEmploymentAllowance** | **bool** | [readonly] Whether or not the system will automatically create an EPS to tell HMRC you qualify for Employment Allowance. | [optional] +**createEpsForFinalSubmission** | **bool** | [readonly] Whether or not the system will automatically create an EPS to tell HMRC the year has ended. | [optional] **createExb** | **bool** | [readonly] Whether or not the system will automatically create an EXB to inform HMRC of Expenses and Benefits | [optional] -**setEmploymentAllowance** | **float** | [readonly] If the Employment Allowance needs to be changed, this indicates the new value | [optional] -**taxCodeChanges** | [**\SynergiTech\Staffology\Model\YearEndTaxCodeChange[]**](YearEndTaxCodeChange.md) | [readonly] Details of changes that wil be made to Tax Codes | [optional] -**removeWeek1Month1** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] Employees that will have the Week1Month1 flag removed from their tax code | [optional] +**emailCisStatement** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] Subcontractors who will be automatically sent an annual CIS Statement | [optional] **emailP60** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] Employees who will be automatically emailed P60s | [optional] +**endingYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **pushP60** | [**\SynergiTech\Staffology\Model\ExternalDataProviderId[]**](ExternalDataProviderId.md) | [readonly] ExternalDataProviderIds to which P60s can be pushed | [optional] -**emailCisStatement** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] Subcontractors who will be automatically sent an annual CIS Statement | [optional] +**removeWeek1Month1** | [**\SynergiTech\Staffology\Model\Item[]**](Item.md) | [readonly] Employees that will have the Week1Month1 flag removed from their tax code | [optional] +**setEmploymentAllowance** | **float** | [readonly] If the Employment Allowance needs to be changed, this indicates the new value | [optional] +**startingYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] +**taxCodeChanges** | [**\SynergiTech\Staffology\Model\YearEndTaxCodeChange[]**](YearEndTaxCodeChange.md) | [readonly] Details of changes that wil be made to Tax Codes | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/YearEndTaxCodeChange.md b/docs/Model/YearEndTaxCodeChange.md index 3dd71ba..4dfc99f 100644 --- a/docs/Model/YearEndTaxCodeChange.md +++ b/docs/Model/YearEndTaxCodeChange.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **currentCode** | **string** | [readonly] The Employees current tax code | [optional] +**employee** | [**\SynergiTech\Staffology\Model\Item**](Item.md) | | [optional] **newCode** | **string** | [readonly] The new TaxCode for the employee | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/YtdReport.md b/docs/Model/YtdReport.md index 52e9635..cbe3d68 100644 --- a/docs/Model/YtdReport.md +++ b/docs/Model/YtdReport.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payrun** | [**\SynergiTech\Staffology\Model\PayRun**](PayRun.md) | | [optional] +**isDraft** | **bool** | | [optional] **lines** | [**\SynergiTech\Staffology\Model\EmployeeYtdValues[]**](EmployeeYtdValues.md) | | [optional] +**payrun** | [**\SynergiTech\Staffology\Model\PayRun**](PayRun.md) | | [optional] **report** | [**\SynergiTech\Staffology\Model\Report**](Report.md) | | [optional] **taxYear** | [**\SynergiTech\Staffology\Model\TaxYear**](TaxYear.md) | | [optional] **title** | **string** | | [optional] -**isDraft** | **bool** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/YtdReportReportResponse.md b/docs/Model/YtdReportReportResponse.md index 0867799..68cba4a 100644 --- a/docs/Model/YtdReportReportResponse.md +++ b/docs/Model/YtdReportReportResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] **content** | **string** | [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. | [optional] **model** | [**\SynergiTech\Staffology\Model\YtdReport**](YtdReport.md) | | [optional] **stream** | **string** | byte array | [optional] +**type** | **string** | [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/YtdValue.md b/docs/Model/YtdValue.md index 5206f43..3a7ca7d 100644 --- a/docs/Model/YtdValue.md +++ b/docs/Model/YtdValue.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\SynergiTech\Staffology\Model\PayrollValueType**](PayrollValueType.md) | | [optional] **broughtForward** | **float** | | [optional] **period** | **float** | | [optional] +**type** | [**\SynergiTech\Staffology\Model\PayrollValueType**](PayrollValueType.md) | | [optional] **value** | **float** | | [optional] [readonly] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/generate/README.md b/generate/README.md index b74effa..0f6838b 100644 --- a/generate/README.md +++ b/generate/README.md @@ -12,5 +12,3 @@ docker run --rm -v "$(pwd):/local" openapitools/openapi-generator-cli generate \ --global-property apiTests=false,modelTests=false \ --output /local ``` - -You will need to edit the README.md back to something which makes sense. You will also need to exclude the generate directory and find/replace `http://localhost` with `https://api.iplicit.com` and `new GuzzleHttp\Client()` with `config: $config` diff --git a/generate/swagger.json b/generate/swagger.json index 819294c..2bee3a8 100644 --- a/generate/swagger.json +++ b/generate/swagger.json @@ -1,38353 +1,33337 @@ { - "openapi": "3.0.1", - "info": { - "title": "Staffology Payroll API", - "contact": { - "name": "D Jackson", - "url": "http://www.staffology.co.uk", - "email": "duane@staffology.co.uk" - }, - "version": "v1" - }, - "paths": { - "/account/activate": { - "post": { - "tags": [ - "Account" - ], - "summary": "Activate an Account", - "description": "New accounts need to be activated to confirm Terms and Conditions have been accepted.", - "operationId": "ActivateAccount", - "parameters": [ - { - "name": "brandCode", - "in": "query", - "schema": { - "type": "string" - } + "components": { + "schemas": { + "Address": { + "additionalProperties": false, + "properties": { + "country": { + "$ref": "#/components/schemas/Country" }, - { - "name": "autoActivate", - "in": "query", - "description": "If autoActivate is set to true, the account activation should be automatically performed without any user interaction", - "schema": { - "type": "boolean", - "default": false - } + "foreignCountry": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "line1": { + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "line2": { + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "line3": { + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "line4": { + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "line5": { + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "postCode": { + "maxLength": 10, + "nullable": true, + "type": "string" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/User" - } + }, + "type": "object" + }, + "AdvancedVarianceReport": { + "additionalProperties": false, + "properties": { + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/AdvancedVarianceReportLine" }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } + "nullable": true, + "type": "array" + }, + "payCodes": { + "items": { + "$ref": "#/components/schemas/PayCode" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/User" - } + "nullable": true, + "type": "array" + }, + "primaryPeriodName": { + "nullable": true, + "type": "string" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "secondaryPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "AdvancedVarianceReportLine": { + "additionalProperties": false, + "properties": { + "costCentre": { + "nullable": true, + "type": "string" + }, + "department": { + "nullable": true, + "type": "string" + }, + "employeeCode": { + "nullable": true, + "type": "string" + }, + "employeeName": { + "nullable": true, + "type": "string" + }, + "payCodeVarianceLines": { + "items": { + "$ref": "#/components/schemas/PayCodeVarianceLine" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } + "nullable": true, + "type": "array" + }, + "primaryEmployeeNi": { + "format": "double", + "nullable": true, + "type": "number" + }, + "primaryEmployerNi": { + "format": "double", + "nullable": true, + "type": "number" + }, + "primaryGrossTaxable": { + "format": "double", + "nullable": true, + "type": "number" + }, + "primaryGrossTotal": { + "format": "double", + "nullable": true, + "type": "number" + }, + "primaryNetPay": { + "format": "double", + "nullable": true, + "type": "number" + }, + "primaryStudentOrPgLoan": { + "format": "double", + "nullable": true, + "type": "number" + }, + "primaryTax": { + "format": "double", + "nullable": true, + "type": "number" + }, + "secondaryEmployeeNi": { + "format": "double", + "nullable": true, + "type": "number" + }, + "secondaryEmployerNi": { + "format": "double", + "nullable": true, + "type": "number" + }, + "secondaryGrossTaxable": { + "format": "double", + "nullable": true, + "type": "number" + }, + "secondaryGrossTotal": { + "format": "double", + "nullable": true, + "type": "number" + }, + "secondaryNetPay": { + "format": "double", + "nullable": true, + "type": "number" + }, + "secondaryStudentOrPgLoan": { + "format": "double", + "nullable": true, + "type": "number" + }, + "secondaryTax": { + "format": "double", + "nullable": true, + "type": "number" } }, - "responses": { - "200": { - "description": "Your account has been activated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } + "type": "object" + }, + "AdvancedVarianceReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/AdvancedVarianceReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } - } - }, - "/account/demo": { - "post": { - "tags": [ - "Account" + }, + "type": "object" + }, + "AeAction": { + "enum": [ + "NoChange", + "Enrol", + "Exit", + "Inconclusive", + "Postpone", + "ReEnrol", + "AddToPension", + "OptOut", + "CeaseMembership" ], - "summary": "Create Demo Employer", - "description": "Creates a demo employer for the user", - "operationId": "CreateDemoEmployerAccount", - "responses": { - "201": { - "description": "Created" + "type": "string" + }, + "AeAssessment": { + "additionalProperties": false, + "description": "As part of AutoEnrolment we assess your Employees to see if they need to be auto-enroled in a Pension.\r\nThis model shows the result of an assessment.", + "properties": { + "action": { + "$ref": "#/components/schemas/AeAssessmentAction" + }, + "aeExclusionCode": { + "$ref": "#/components/schemas/AeExclusionCode" + }, + "age": { + "description": "[readonly] The age of the Employee at the time of the assessment", + "format": "int32", + "type": "integer" + }, + "assessmentDate": { + "format": "date-time", + "type": "string" + }, + "earningsInPeriod": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "employeeState": { + "$ref": "#/components/schemas/AeEmployeeState" + }, + "endPayRunEntryId": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "endReportingType": { + "$ref": "#/components/schemas/PensionReportingType" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "ordinal": { + "description": "[readonly] The PaySchedule ordinal for the Employee at the time of the assessment", + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "payRunVersion": { + "description": "[readonly] The supplementary pay run version of this AeAssessment.", + "format": "int32", + "type": "integer" + }, + "qualifyingEarningsInPeriod": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "reason": { + "description": "[readonly] The reason for determining the Status given.", + "nullable": true, + "type": "string" + }, + "startPayRunEntryId": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "startReportingType": { + "$ref": "#/components/schemas/PensionReportingType" + }, + "status": { + "$ref": "#/components/schemas/AeStatus" + }, + "ukWorker": { + "$ref": "#/components/schemas/AeUKWorker" } - } - } - }, - "/account/emailaddress": { - "post": { - "tags": [ - "Account" - ], - "summary": "Change Email Address", - "description": "The user.PendingEmailAddress will be set to the give address and a new verification email will be sent.\r\nOnce the link in the email is clicked on then the user account will be updated to use the new email address", - "operationId": "ChangeEmailAddressAccount", - "parameters": [ - { - "name": "emailAddress", - "in": "query", - "schema": { - "type": "string" - } + }, + "type": "object" + }, + "AeAssessmentAction": { + "additionalProperties": false, + "properties": { + "action": { + "$ref": "#/components/schemas/AeAction" + }, + "actionCompleted": { + "description": "[readonly] Indicates whether or not the required action was successfully completed", + "type": "boolean" + }, + "actionCompletedMessage": { + "description": "[readonly] Gives further information about the action taken or the reason if wasn't successfully completed", + "nullable": true, + "type": "string" + }, + "employeeState": { + "$ref": "#/components/schemas/AeEmployeeState" + }, + "letterNotYetSent": { + "description": "[readonly] Indicates whether or not any required letter has been sent", + "type": "boolean" + }, + "pensionSchemeId": { + "description": "[readonly] The PensionSchemeId that a completed action relates to", + "format": "uuid", + "type": "string" + }, + "requiredLetter": { + "$ref": "#/components/schemas/AeStatutoryLetter" + }, + "workerGroupId": { + "description": "[readonly] The WorkerGroupId that a completed action relates to", + "format": "uuid", + "type": "string" } + }, + "type": "object" + }, + "AeEmployeeState": { + "enum": [ + "Automatic", + "OptOut", + "OptIn", + "VoluntaryJoiner", + "ContractualPension", + "CeasedMembership", + "Leaver", + "Excluded", + "Enrol" ], - "responses": { - "200": { - "description": "Your account has been activated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - } - } - } - }, - "/account": { - "get": { - "tags": [ - "Account" + "type": "string" + }, + "AeExclusionCode": { + "enum": [ + "NotKnown", + "NotAWorker", + "NotWorkingInUk", + "NoOrdinarilyWorkingInUk", + "OutsideOfAgeRange", + "SingleEmployee", + "CeasedActiveMembershipInPast12Mo", + "CeasedActiveMembership", + "ReceivedWulsInPast12Mo", + "ReceivedWuls", + "Leaving", + "TaxProtection", + "CisSubContractor" ], - "summary": "Get Account Details", - "description": "Returns the details for the authorised account.", - "operationId": "GetAccount", - "parameters": [ - { - "name": "defaults", - "in": "query", - "description": "You can leave this empty, it's for internal use only.", - "schema": { - "type": "string" - } - }, - { - "name": "defaultsKey", - "in": "query", - "description": "You can leave this empty, it's for internal use only.", - "schema": { - "type": "string" - } - } + "type": "string" + }, + "AeLetter": { + "enum": [ + "Entitled", + "NonEligible", + "Postponed", + "Enrolled", + "Reenrolled" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - } - } - } - }, - "/account/photo": { - "post": { - "tags": [ - "Account" + "type": "string" + }, + "AeLetterSentType": { + "enum": [ + "Email", + "Manual", + "ExternalDataProvider" ], - "summary": "Update Photo", - "description": "Submit an image here and we'll upload it, resize it to 200px squared and set it as the image for your account.", - "operationId": "UpdatePhotoAccount", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - } - } - } - }, - "/account/profile": { - "post": { - "tags": [ - "Account" + "type": "string" + }, + "AeReason": { + "enum": [ + "NoEmployee", + "NoPeriod", + "NoDefaultPension", + "NoSer", + "IsExempt", + "IsPostponed", + "NonEligibleAge", + "PayBelowLowerEarningsThreshold", + "PayBelowQualifyingThreshold", + "HasQualifyingPension", + "HasOptedOut", + "IsLeaver", + "HasCeasedMembership", + "Contractual", + "IsEntitled", + "IsEligible", + "HasExistingSerPension" ], - "summary": "Update Profile", - "description": "Updates your profile. Only Salutation, FirstName, LastName, JobType, JobTitle, TelephoneNumber, BusinessName, Industry, Address and DisplayPrefs fields are updated.", - "operationId": "ProfileAccount", - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/User" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - } - } - } - }, - "/account/invitations": { - "get": { - "tags": [ - "Account" + "type": "string" + }, + "AeStatus": { + "enum": [ + "Eligible", + "NonEligible", + "Entitled", + "NoDuties" ], - "summary": "Get Invitations", - "description": "Returns any pending Invitations for the authorised user.\r\nIf the email address isn't yet verified then the Name displayed in the Item will be the users email address instead of the company name.\r\nInvitations cannot be accepted until the email address for the user is verified.", - "operationId": "GetInvitationsAccount", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/account/verify": { - "post": { - "tags": [ - "Account" + "type": "string" + }, + "AeStatutoryLetter": { + "enum": [ + "B1", + "B2", + "B3", + "B4" ], - "summary": "Re-send Verification Email", - "description": "Users should receive an email to verify their email address when they first register or if they change their email address.\r\nHowever, this API endpoint can be used to re-send the email.", - "operationId": "VerifyAccount", - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/account/verify/respond": { - "put": { - "tags": [ - "Account" + "type": "string" + }, + "AeUKWorker": { + "enum": [ + "No", + "Yes", + "Ordinarily" ], - "summary": "Verify Email Address", - "description": "Used to process the link sent in an email to verify an email address.", - "operationId": "VerifyResponseAccount", - "parameters": [ - { - "name": "u", - "in": "query", - "description": "The value from the link in the email.", - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "k", - "in": "query", - "description": "The value from the link in the email.", - "schema": { - "type": "string", - "format": "uuid" - } - } + "type": "string" + }, + "AllowanceType": { + "enum": [ + "Fixed", + "Variable", + "Range", + "Graded" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } + "type": "string" + }, + "AnalysisCategory": { + "additionalProperties": false, + "properties": { + "name": { + "description": "The unique Analysis Category Name", + "maxLength": 100, + "minLength": 1, + "type": "string" } - } - } - }, - "/account/Tenant": { - "get": { - "tags": [ - "Account" + }, + "required": [ + "name" ], - "summary": "Get Tenant", - "description": "Returns branding details for the specified tenant. This is used by the web app and is unlikely to be used by third-parties.", - "operationId": "GetTenantAccount", - "parameters": [ - { - "name": "tenantId", - "in": "query", - "schema": { - "type": "string" - } + "type": "object" + }, + "AnalysisCategoryCode": { + "additionalProperties": false, + "properties": { + "accountingCode": { + "maxLength": 50, + "nullable": true, + "type": "string" }, - { - "name": "key", - "in": "query", - "schema": { - "type": "string" - } + "code": { + "maxLength": 20, + "minLength": 1, + "type": "string" + }, + "color": { + "description": "A color to used to represent this Analysis Code, in hex format. ie 'ff0000'", + "maxLength": 6, + "nullable": true, + "type": "string" + }, + "title": { + "description": "The name of this Analysis Code", + "maxLength": 50, + "minLength": 1, + "type": "string" } + }, + "required": [ + "code", + "title" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Tenant" - } - } - } + "type": "object" + }, + "AnalysisCategoryCodes": { + "additionalProperties": false, + "properties": { + "analysisCategory": { + "description": "AnalysisCategory Model", + "nullable": true, + "type": "string" + }, + "analysisCategoryCode": { + "description": "AnalysisCategoryCode Model", + "nullable": true, + "type": "string" + }, + "analysisCategoryCodeId": { + "description": "AnalysisCategoryCode Identifier", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "analysisCategoryId": { + "description": "AnalysisCategory Identifier", + "format": "uuid", + "nullable": true, + "type": "string" } - } - } - }, - "/account/employerdefaults": { - "get": { - "tags": [ - "Account" - ], - "summary": "Get EmployerDefaults", - "description": "Get the EmployerDefaults for the currently authorised User.", - "operationId": "GetEmployerDefaultsAccount", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerDefaults" - } - } - } + }, + "type": "object" + }, + "AnalysisCategoryIndex": { + "additionalProperties": false, + "properties": { + "index": { + "format": "int32", + "type": "integer" + }, + "name": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Account" - ], - "summary": "Set EmployerDefaults", - "description": "Set the EmployerDefaults for the currently authorised User.", - "operationId": "SetEmployerDefaultsAccount", - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/EmployerDefaults" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerDefaults" - } + "AnalysisReport": { + "additionalProperties": false, + "properties": { + "employer": { + "$ref": "#/components/schemas/Item" + }, + "endDate": { + "format": "date", + "type": "string" + }, + "endPeriodName": { + "nullable": true, + "type": "string" + }, + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/AnalysisReportLine" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/EmployerDefaults" - } + "nullable": true, + "type": "array" + }, + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payCodes": { + "items": { + "$ref": "#/components/schemas/PayCode" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/EmployerDefaults" - } - } + "nullable": true, + "type": "array" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "period": { + "format": "int32", + "type": "integer" + }, + "periodTo": { + "format": "int32", + "type": "integer" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "showPayPeriodBreakdown": { + "type": "boolean" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerDefaults" - } - } - } + "type": "object" + }, + "AnalysisReportLine": { + "additionalProperties": false, + "properties": { + "employee": { + "$ref": "#/components/schemas/Item" + }, + "employerNic": { + "format": "double", + "type": "number" + }, + "employerPension": { + "format": "double", + "type": "number" + }, + "gross": { + "format": "double", + "type": "number" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/AnalysisReportLineValue" + }, + "nullable": true, + "type": "array" + }, + "net": { + "format": "double", + "type": "number" + }, + "niSaving": { + "format": "double", + "type": "number" + }, + "niableGross": { + "format": "double", + "type": "number" + }, + "payPeriod": { + "format": "int32", + "type": "integer" + }, + "pensionableGross": { + "format": "double", + "type": "number" + }, + "showQtyColumn": { + "type": "boolean" + }, + "takeHome": { + "format": "double", + "type": "number" + }, + "taxYear": { + "nullable": true, + "type": "string" } - } - } - }, - "/account/useremployers": { - "get": { - "tags": [ - "Account" - ], - "summary": "List User Employers", - "description": "Returns a list of Employers that are associated to the given User", - "operationId": "GetUserEmployersAccount", - "parameters": [ - { - "name": "id", - "in": "query", - "description": "The Id of the user you want a list of employers for.", - "schema": { - "type": "integer", - "format": "int32" - } + }, + "type": "object" + }, + "AnalysisReportLineValue": { + "additionalProperties": false, + "properties": { + "code": { + "nullable": true, + "type": "string" + }, + "qty": { + "format": "double", + "nullable": true, + "type": "number" + }, + "value": { + "format": "double", + "type": "number" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployerItem" - } - } - } - } + }, + "type": "object" + }, + "AnalysisReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/AnalysisReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } - } - }, - "/account/keys": { - "get": { - "tags": [ - "Account" + }, + "type": "object" + }, + "AnnualRoundingRule": { + "enum": [ + "RoundOff", + "Exact", + "RoundUp", + "RoundDown" ], - "summary": "List ApiKeys", - "description": "", - "operationId": "ListApiKeysAccount", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } + "type": "string" }, - "post": { - "tags": [ - "Account" + "AssumedPensionablePay": { + "enum": [ + "AssumedPensionablePay", + "NormalPay", + "HigherOfTheTwo" ], - "summary": "Create ApiKey", - "description": "Creates a new APIKey. The only property that's required or used is Name.\r\nA new ApiKey will be generated and returned to you.", - "operationId": "CreateApiKeyAccount", - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Item" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Item" - } + "type": "string" + }, + "AttachmentOrder": { + "additionalProperties": false, + "description": "Used to represent an Attachment of Earnings Order (AEO)", + "properties": { + "allowProtectedEarnings": { + "description": "[ReadOnly] Whether or not shortfalls should be carried forward", + "readOnly": true, + "type": "boolean" + }, + "amountPreviouslyPaid": { + "description": "Any amount that has previously been paid towards this Order", + "format": "double", + "type": "number" + }, + "applyFrom": { + "description": "The date from which to apply this Order", + "format": "date", + "type": "string" + }, + "applyUntil": { + "description": "An optional date on which to stop applying this order", + "format": "date", + "nullable": true, + "type": "string" + }, + "autoDeduction": { + "description": "[readonly] Whether or not the amount to be deducted is automatically calculated", + "readOnly": true, + "type": "boolean" + }, + "bankDetails": { + "$ref": "#/components/schemas/BankDetails" + }, + "carryForwardShortfall": { + "description": "[ReadOnly] Whether or not shortfalls should be carried forward", + "readOnly": true, + "type": "boolean" + }, + "chargeAdminFee": { + "description": "Whether or not a £1 admin fee should be deducted for this order", + "type": "boolean" + }, + "deduction": { + "description": "The percentage or amount (depending on DeductionIsPercentage) to deduct", + "format": "double", + "type": "number" + }, + "deductionIsPercentage": { + "description": "Whether or not the amount given for Deduction is a percentage rather than a fixed amount", + "type": "boolean" + }, + "documentCount": { + "description": "[readonly] The number of attachments associated with this model", + "format": "int32", + "type": "integer" + }, + "documents": { + "description": "[readonly] The attachments associated with this model", + "items": { + "$ref": "#/components/schemas/Item" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Item" - } + "nullable": true, + "type": "array" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "includeBankDetails": { + "type": "boolean" + }, + "issueDate": { + "description": "The date of issue for this Order", + "format": "date", + "type": "string" + }, + "notes": { + "description": "A free-form text field to record any comments", + "maxLength": 300, + "nullable": true, + "type": "string" + }, + "payee": { + "description": "The Id of the Payee, if any, that deductions are to be paid to.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "payeeName": { + "description": "The name of the Payee, if any, that deductions are to be paid to.", + "nullable": true, + "type": "string" + }, + "payments": { + "description": "[readonly] Payments made towards this order. Only populated when viewed as a report.", + "items": { + "$ref": "#/components/schemas/AttachmentOrderPayment" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Item" - } - } + "nullable": true, + "type": "array" + }, + "protectedEarnings": { + "description": "The percentage or amount or percentage (depending on ProtectedEarningsIsPercentage) to protect", + "format": "double", + "type": "number" + }, + "protectedEarningsIsPercentage": { + "description": "Whether or not the amount for ProtectedEarnings is a percentage rather than a fixed amount.", + "type": "boolean" + }, + "reference": { + "description": "The reference which appeared on the court paperwork", + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "shortfall": { + "description": "Any shortfall that is being carried forward", + "format": "double", + "type": "number" + }, + "stopWhenTotalPaid": { + "description": "Whether or not this order should be stopped once a total amount has been paid", + "type": "boolean" + }, + "stopped": { + "description": "[readonly] Whether or not this Order has been stopped.\r\nThis is set automatically when either it's paid in full or the ApplyUntil date has been reached.", + "type": "boolean" + }, + "totalAmountToPay": { + "description": "The Total amount that needs to be paid for this Order", + "format": "double", + "type": "number" + }, + "type": { + "$ref": "#/components/schemas/AttachmentOrderType" } }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - }, - "/account/keys/{id}": { - "get": { - "tags": [ - "Account" - ], - "summary": "Get ApiKey", - "description": "", - "operationId": "GetApiKeyAccount", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } + "type": "object" }, - "delete": { - "tags": [ - "Account" - ], - "summary": "Delete ApiKey", - "description": "", - "operationId": "DeleteApiKeyAccount", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/employers/{employerId}/analysiscategories": { - "get": { - "tags": [ - "AnalysisCategory" - ], - "summary": "List AnalysisCategories", - "description": "Lists all AnalysisCategories for an Employer.", - "operationId": "IndexAnalysisCategory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list AnalysisCategories", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "AttachmentOrderPayment": { + "additionalProperties": false, + "description": "Used to represent a payment towards an Attachment of Earnings Order (AEO)", + "properties": { + "adminFee": { + "description": "[readonly] Any admin fee charged", + "format": "double", + "type": "number" }, - "404": { - "description": "Employer or AnalysisCategories Not Found" + "attachablePay": { + "description": "[readonly] The total Attachable pay for the Employee on this PayRun", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "attachmentOrder": { + "$ref": "#/components/schemas/Item" + }, + "date": { + "description": "[readonly] The date this deduction was made", + "format": "date", + "type": "string" + }, + "description": { + "description": "[readonly] Description of deduction, usually the reference from the AttachmentOrder", + "nullable": true, + "type": "string" + }, + "desiredDeduction": { + "description": "[readonly] The amount that should be deducted, if arrestable pay is available.\r\nNot including any shortfall", + "format": "double", + "type": "number" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "isLatestVersion": { + "description": "[readonly] Indicates whether this is the latest version of the AttachmentOrderPayment.", + "type": "boolean" + }, + "otherAttachmentOrderDeductions": { + "description": "[readonly] Deductions made on this PayRun for this employee due to other higher priority AttachmentOrders", + "format": "double", + "type": "number" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "payRunVersion": { + "description": "[readonly] The supplementary pay run version of this AttachmentOrderPayment.", + "format": "int32", + "type": "integer" + }, + "protectedPay": { + "description": "[readonly] The amount of the Attachable Pay that must be protected", + "format": "double", + "type": "number" + }, + "resultingDeduction": { + "description": "[readonly] The actual amount deducted", + "format": "double", + "type": "number" + }, + "resultingShortfall": { + "description": "[readonly] The resulting shortfall (including any shortfall from previous periods", + "format": "double", + "type": "number" + }, + "shortfall": { + "description": "[readonly] Any shortfall (ie arrears) that existed before this PayRun.", + "format": "double", + "type": "number" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "totalPaid": { + "description": "[readonly] Total amount paid to date, including this deduction.", + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "AnalysisCategory" - ], - "summary": "Create AnalysisCategory", - "description": "Create a new AnalysisCategory for the Employer.", - "operationId": "CreateAnalysisCategory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { + "AttachmentOrderReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - "201": { - "description": "Created", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" - } - } - } + "model": { + "$ref": "#/components/schemas/AttachmentOrder" }, - "404": { - "description": "Employer Not Found" - } - } - } - }, - "/employers/{employerId}/analysiscategories/{id}": { - "get": { - "tags": [ - "AnalysisCategory" - ], - "summary": "Get AnalysisCategory", - "description": "Gets the AnalysisCategory specified.", - "operationId": "GetAnalysisCategory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the AnalysisCategory belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the AnalysisCategory which you want to fetch", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } + }, + "type": "object" + }, + "AttachmentOrderType": { + "enum": [ + "AeoP", + "Aeo", + "Csa", + "Csa2012", + "Deo", + "AeoNp", + "CcPre92", + "CcPost92", + "Ctaeo", + "Mcaeo", + "Ea", + "Cma", + "Cao", + "Isd", + "Ea2006", + "Caps", + "Dea", + "DeaHigher", + "DeaFixed", + "CtaeoWales" ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" - } - } - } + "type": "string" + }, + "AttachmentOrdersReport": { + "additionalProperties": false, + "properties": { + "employer": { + "$ref": "#/components/schemas/Item" }, - "404": { - "description": "Employer or AnalysisCategory Not Found" + "endDate": { + "format": "date", + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - }, - "put": { - "tags": [ - "AnalysisCategory" - ], - "summary": "Update AnalysisCategory", - "description": "Updates a AnalysisCategory for the Employer.", - "operationId": "UpdateAnalysisCategory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "endPeriodName": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" - } - } + "isDraft": { + "type": "boolean" + }, + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "period": { + "format": "int32", + "type": "integer" + }, + "periodTo": { + "format": "int32", + "type": "integer" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" - } - } - } - } - } + "type": "object" }, - "delete": { - "tags": [ - "AnalysisCategory" - ], - "summary": "Delete AnalysisCategory", - "description": "Deletes the specified AnalysisCategory.", - "operationId": "DeleteAnalysisCategory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "AttachmentOrdersReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "model": { + "$ref": "#/components/schemas/AttachmentOrdersReport" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/analysiscategories/{analysisCategoryId}/categorycodes": { - "get": { - "tags": [ - "AnalysisCategory" - ], - "summary": "List AnalysisCategoryCodes", - "description": "Lists all AnalysisCategoryCodes for an Category.", - "operationId": "GetCodesAnalysisCategory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" }, - { - "name": "analysisCategoryId", - "in": "path", - "description": "The Id of the Category for which you want to list Codes", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } + }, + "type": "object" + }, + "AuditEventAction": { + "enum": [ + "Added", + "Edited", + "Deleted" ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } + "type": "string" }, - "post": { - "tags": [ - "AnalysisCategory" + "AuthScheme": { + "enum": [ + "OAuth1", + "OAuth2", + "Basic", + "ApiKeyInHeader", + "Hmac", + "OAuth2Cc", + "OAuth2Password", + "DeferToThirdParty" ], - "summary": "Create AnalysisCategoryCode", - "description": "Create the details of an existing AnalysisCategoryCode.", - "operationId": "CreateAnalysisCategoryCodeAnalysisCategory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Analysis category belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "AutoEnrolment": { + "additionalProperties": false, + "properties": { + "aeExclusionCode": { + "$ref": "#/components/schemas/AeExclusionCode" }, - { - "name": "analysisCategoryId", - "in": "path", - "description": "The Analysis category id for which you want to create code", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "aePostponementLetterSent": { + "type": "boolean" }, - "201": { - "description": "Created", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/analysiscategories/{analysisCategoryId}/categorycodes/{code}": { - "get": { - "tags": [ - "AnalysisCategory" - ], - "summary": "Get AnalysisCategoryCode", - "description": "Gets the AnalysisCategoryCode specified.", - "operationId": "GetAnalysisCategoryCodeAnalysisCategory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "daysToDeferAssessment": { + "description": "The number of days, if any, to defer assessment of this employee.\r\nYou're allowed to defer assessment of new employees by up to 3 months.", + "format": "int32", + "type": "integer" }, - { - "name": "analysisCategoryId", - "in": "path", - "description": "The Id of the AnalysisCategory to which the Code belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "deferByMonthsNotDays": { + "description": "If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days", + "type": "boolean" }, - { - "name": "code", - "in": "path", - "description": "The code of the AnalysisCategoryCode you want to retrieve.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" - } - } - } + "exempt": { + "type": "boolean" }, - "404": { - "description": "Not Found" + "lastAssessment": { + "$ref": "#/components/schemas/AeAssessment" + }, + "postponementDate": { + "description": "[readonly] If a value is present, then employee wont be enrolled on an AE Pension until after this date.\r\nThis is automatically set to a date if the employee is deemed to be an EligibleJobHolder, but the employer has set a Postponement period and this value is currently null\r\nThis is automatically set to null if it already has a value and the employee is deemed NOT to be an EligibleJobHolder - ie, they previously qualified but now do not.", + "format": "date", + "nullable": true, + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/AeEmployeeState" + }, + "stateDate": { + "description": "[readonly]", + "format": "date", + "nullable": true, + "type": "string" + }, + "ukWorker": { + "$ref": "#/components/schemas/AeUKWorker" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "AnalysisCategory" + "AutoPilotFinaliseTime": { + "enum": [ + "JustAfterMidnight", + "NineAm", + "OnePm", + "FourPm", + "SixPm", + "ElevenPm" ], - "summary": "Delete AnalysisCategoryCode", - "description": "Deletes the specified AnalysisCategoryCode.", - "operationId": "DeleteAnalysisCategoryCodeAnalysisCategory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "AutomationSettings": { + "additionalProperties": false, + "description": "Configures various automation settings for an Employer", + "properties": { + "autoPilotOffset": { + "description": "How many days before the payment date a payrun should be finalised.\r\nSet it to 0 if you want the payrun to be automatically finalised on the payment date itself", + "format": "int32", + "maximum": 6, + "minimum": 0, + "type": "integer" }, - { - "name": "analysisCategoryId", - "in": "path", - "description": "The Id of the AnalysisCategory to which the Code belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "autoPilotTime": { + "$ref": "#/components/schemas/AutoPilotFinaliseTime" }, - { - "name": "code", - "in": "path", - "description": "The code of the AnalysisCategoryCode you want to delete.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "autoSubmitEps": { + "description": "If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun.", + "type": "boolean" }, - "400": { - "description": "Bad Request" + "autoSubmitFps": { + "description": "If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun.\r\nThis property will always have the same value as the property with the same name on the RtiSubmissionSettings model.", + "type": "boolean" + }, + "autoSubmitJournal": { + "description": "If set to true, we'll automatically submit the payroll journal whenever you finalise a PayRun.\r\nThe employer must be connected to an ExternalDataProvider supporting Type of 'Accounting'.", + "type": "boolean" + }, + "autoSubmitP45s": { + "description": "If set to true, we'll automatically submit P45s whenever you finalise a PayRun.\r\nThe employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'.", + "type": "boolean" + }, + "autoSubmitPayments": { + "description": "If set to true, we'll automatically submit payments whenever you finalise a PayRun.\r\nThe employer must be connected to an ExternalDataProvider supporting Type of 'Payments'.", + "type": "boolean" + }, + "autoSubmitPayments_Aeos": { + "description": "Used in conjunction with AutoSubmitPayments.", + "type": "boolean" + }, + "autoSubmitPayments_Deductions": { + "description": "Used in conjunction with AutoSubmitPayments.", + "type": "boolean" + }, + "autoSubmitPayments_Employee": { + "description": "Used in conjunction with AutoSubmitPayments.", + "type": "boolean" + }, + "autoSubmitPayments_Hmrc": { + "description": "Used in conjunction with AutoSubmitPayments.", + "type": "boolean" + }, + "autoSubmitPayments_Pensions": { + "description": "Used in conjunction with AutoSubmitPayments.", + "type": "boolean" + }, + "autoSubmitPayslips": { + "description": "If set to true, we'll automatically submit payslips whenever you finalise a PayRun.\r\nThe employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'.", + "type": "boolean" + }, + "autoSubmitPayslips_DaysBeforePayday": { + "$ref": "#/components/schemas/DaysBeforePayday" + }, + "autoSubmitPayslips_PaymentDateRule": { + "$ref": "#/components/schemas/PayslipReleasePaymentDateRule" + }, + "autoSubmitPayslips_PayslipReleaseTime": { + "$ref": "#/components/schemas/PayslipReleaseTime" + }, + "autoSubmitPensionLetters": { + "description": "If set to true, we'll automatically submit Pension Letters whenever you finalise a PayRun.\r\nThe employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'.", + "type": "boolean" + }, + "codingNoticesAutomaticallyApplied": { + "description": "[readonly] An indicator of whether or not this employer is automatically applying DpsNotices", + "type": "boolean" + }, + "employeesWithEmailAddressButNotAutoSending": { + "description": "[readonly] A count of how many employees or subcontractors for this employer do have email addresses but don't have the option enabled to auto-email payslips", + "format": "int32", + "type": "integer" + }, + "employeesWithoutEmailAddress": { + "description": "[readonly] A count of how many employees or subcontractors for this employer do not have email addresses", + "format": "int32", + "type": "integer" + }, + "enableAutoOpen": { + "description": "IF enabled then whenever you close a payrun, the next one will be started. Automatically set to true if EnableAutoPilot is true", + "type": "boolean" + }, + "enableAutoPilot": { + "description": "IF enabled then payruns will be automatically finalised on the payment date and the next payrun will be started", + "type": "boolean" + }, + "payrunEmails": { + "description": "Automated emails that will be sent when a PayRun is finalised", + "items": { + "$ref": "#/components/schemas/PayrunEmail" + }, + "nullable": true, + "type": "array" + }, + "payslipReleaseType": { + "$ref": "#/components/schemas/PayslipReleaseType" + }, + "subcontractorsNotAutoSendingStatement": { + "description": "[readonly] A count of how many subscontractors for this employer do don't have the option enabled to auto-email statement", + "format": "int32", + "type": "integer" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "AnalysisCategory" - ], - "summary": "Update AnalysisCategoryCode", - "description": "Updates the details of an existing AnalysisCategoryCode.", - "operationId": "UpdateAnalysisCategoryCodeAnalysisCategory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Analysis category belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "AverageHolidayPayRateReport": { + "additionalProperties": false, + "properties": { + "employer": { + "$ref": "#/components/schemas/Item" }, - { - "name": "analysisCategoryId", - "in": "path", - "description": "The Analysis category id for which you want to update Analysis code", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "endDate": { + "format": "date", + "type": "string" }, - { - "name": "code", - "in": "path", - "description": "The code of the Analysis category code you want to update.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/attachmentorders": { - "post": { - "tags": [ - "AttachmentOrder" - ], - "summary": "Create AttachmentOrder", - "description": "Creates an AttachmentOrder for the Employee", - "operationId": "CreateAttachmentOrder", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "endPeriodName": { + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrder" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrder" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrder" - } + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/AverageHolidayPayRateReportLine" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrder" - } - } - } - }, - "responses": { - "201": { - "description": "Created" + "nullable": true, + "type": "array" }, - "400": { - "description": "Bad Request" + "ordinal": { + "format": "int32", + "type": "integer" }, - "404": { - "description": "Not Found" + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" }, - "409": { - "description": "Conflict" - } - } - }, - "get": { - "tags": [ - "AttachmentOrder" - ], - "summary": "List AttachmentOrders", - "description": "Lists all AttachmentOrders for the Employee", - "operationId": "IndexAttachmentOrder", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "period": { + "format": "int32", + "type": "integer" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/attachmentorders/{id}": { - "get": { - "tags": [ - "AttachmentOrder" - ], - "summary": "Get AttachmentOrder", - "description": "Gets the AttachmentOrder specified by the Id for the Employee specified by the EmployeeId", - "operationId": "GetAttachmentOrder", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "periodTo": { + "format": "int32", + "type": "integer" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "report": { + "$ref": "#/components/schemas/Report" }, - { - "name": "id", - "in": "path", - "description": "The Id of the AttachmentOrder you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrder" - } - } - } + "startDate": { + "format": "date", + "type": "string" }, - "404": { - "description": "Not Found" + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "AttachmentOrder" - ], - "summary": "Update AttachmentOrder", - "operationId": "UpdateAttachmentOrder", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "AverageHolidayPayRateReportLine": { + "additionalProperties": false, + "properties": { + "department": { + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employee": { + "$ref": "#/components/schemas/Item" }, - { - "name": "id", - "in": "path", - "description": "The Id of the AttachmentOrder you want to update.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrder" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrder" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrder" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrder" - } - } + "firstName": { + "description": "The First Name of the employee", + "nullable": true, + "type": "string" + }, + "lastName": { + "description": "The Last Name of the employee", + "nullable": true, + "type": "string" + }, + "niNumber": { + "description": "The NiNumber of the employee", + "nullable": true, + "type": "string" + }, + "payrollCode": { + "description": "Payroll code of the employee", + "nullable": true, + "type": "string" + }, + "period": { + "description": "The Period of the average holiday pay rate", + "format": "int32", + "type": "integer" + }, + "rate": { + "description": "The Average holiday pay rate", + "format": "double", + "type": "number" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "AverageHolidayPayRateReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "model": { + "$ref": "#/components/schemas/AverageHolidayPayRateReport" }, - "409": { - "description": "Conflict" + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" }, - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrder" - } - } - } + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "AttachmentOrder" - ], - "summary": "Delete AttachmentOrder", - "description": "Deletes the AttachmentOrder specified by the Id for the Employee specified by the EmployeeId", - "operationId": "DeleteAttachmentOrder", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "AveragePayGradesReportLine": { + "additionalProperties": false, + "properties": { + "department": { + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "effectiveDate": { + "description": "Effective date for Pay spine grade", + "format": "date", + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the AttachmentOrder you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "400": { - "description": "Bad Request" + "employee": { + "$ref": "#/components/schemas/Item" }, - "404": { - "description": "Not Found" + "lowerGradePoint": { + "description": "Lower grade point of pay spine grade", + "nullable": true, + "type": "string" }, - "204": { - "description": "No Content" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/attachmentorders/payments/{taxYear}": { - "get": { - "tags": [ - "AttachmentOrder" - ], - "summary": "Get Payments", - "description": "Lists all Payments made to AttachmentOrders for the Employee in the given TaxYear", - "operationId": "PaymentsAttachmentOrder", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "payGradeName": { + "description": "Name of Pay grade name", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "paySpineName": { + "description": "Name of Pay Spine", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttachmentOrderPayment" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/attachmentorders/{id}/documents": { - "post": { - "tags": [ - "AttachmentOrder" - ], - "summary": "Add Document", - "description": "Adds document to the AttachmentOrder", - "operationId": "AddDocumentAttachmentOrder", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "payrollCode": { + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "upperGradePoint": { + "description": "Upper grade point of pay spine grade", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the AttachmentOrder you want to attach documents to", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } + "upperPointAltMax": { + "description": "To Check Alt Max of Upper point", + "type": "boolean" } }, - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/attachmentorders/{id}/documents/{documentId}": { - "delete": { - "tags": [ - "AttachmentOrder" - ], - "summary": "Delete AttachmentOrder Document", - "description": "Deletes the document specified by the documentId for the AttachmentOrder specified by the Id", - "operationId": "DeleteDocumentAttachmentOrder", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "AverageWeeklyEarnings": { + "additionalProperties": false, + "properties": { + "averageEarnings": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "eligibilityThreshold": { + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "relevantPeriodEarnings": { + "format": "double", + "type": "number" }, - { - "name": "documentId", - "in": "path", - "description": "The Id of the Document you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "relevantPeriodEnd": { + "format": "date", + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - }, - "get": { - "tags": [ - "AttachmentOrder" - ], - "summary": "Get AttachmentOrder Document", - "description": "Gets the document specified by the documentId for the AttachmentOrder specified by the Id", - "operationId": "GetDocumentAttachmentOrder", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "relevantPeriodStart": { + "format": "date", + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "relevantPeriodWeekCount": { + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "requestedDate": { + "format": "date", + "type": "string" }, - { - "name": "documentId", - "in": "path", - "description": "The Id of the Document you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string", - "format": "binary" - } - } - } + "result": { + "$ref": "#/components/schemas/AverageWeeklyEarningsResult" }, - "404": { - "description": "Not Found" + "resultDescription": { + "nullable": true, + "readOnly": true, + "type": "string" + }, + "threshold": { + "format": "double", + "type": "number" } - } - } - }, - "/employers/{employerId}/audit": { - "get": { - "tags": [ - "Audit" + }, + "type": "object" + }, + "AverageWeeklyEarningsResult": { + "enum": [ + "Success", + "EarningsBelowThreshold", + "NotEnoughPayrollData", + "TaxYearNotSupported", + "TwoRelatedSchemes", + "NeonatalCareDateMissing" ], - "summary": "Employer Audit Log", - "operationId": "EmployerAuditListAudit", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list Audit logs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "BackgroundTaskStatus": { + "enum": [ + "Queued", + "Sent", + "Failed", + "Processing" + ], + "type": "string" + }, + "BankDetails": { + "additionalProperties": false, + "properties": { + "accountName": { + "maxLength": 100, + "nullable": true, + "type": "string" }, - { - "name": "entity", - "in": "query", - "description": "Entity type name for which audit log should be retrieved", - "schema": { - "$ref": "#/components/schemas/EntityType" - } + "accountNumber": { + "nullable": true, + "pattern": "^\\d{8}$", + "type": "string" }, - { - "name": "entityId", - "in": "query", - "description": "Id of the entity for which audit log should be retrieved", - "schema": { - "type": "string", - "format": "uuid" - } + "bankBranch": { + "maxLength": 100, + "nullable": true, + "type": "string" }, - { - "name": "fromDate", - "in": "query", - "description": "Date from which records should be retrieved", - "schema": { - "type": "string", - "format": "date-time" - } + "bankName": { + "maxLength": 100, + "nullable": true, + "type": "string" }, - { - "name": "toDate", - "in": "query", - "description": "Date till records should be retrieved", - "schema": { - "type": "string", - "format": "date-time" - } + "bankReference": { + "maxLength": 100, + "nullable": true, + "type": "string" }, - { - "name": "pageNum", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "buildingSocietyRollNumber": { + "maxLength": 18, + "minLength": 1, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\s\\/\\.-]+$", + "type": "string" }, - { - "name": "pageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/autoenrolment": { - "get": { - "tags": [ - "AutoEnrolment" - ], - "summary": "Get AE Assessments", - "description": "Returns all AE Assessments for the Employee specified.", - "operationId": "ListAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "note": { + "maxLength": 200, + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to retrieve AE Assessments", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "sortCode": { + "nullable": true, + "pattern": "^(\\d{6}|\\d{2}-\\d{2}-\\d{2}|\\d{2} \\d{2} \\d{2})$", + "type": "string" } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/autoenrolment/assessments": { - "post": { - "tags": [ - "AutoEnrolment" + }, + "type": "object" + }, + "BankHolidayCollection": { + "enum": [ + "None", + "EnglandAndWales", + "Scotland", + "NorthernIreland" ], - "summary": "Assess Employee for AutoEnrolment", - "description": "Asseses an Employee for AutoEnrolment", - "operationId": "AssessAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "BankPaymentInstruction": { + "additionalProperties": false, + "properties": { + "allowsMultiDate": { + "description": "Allows multiple payment dates in the file", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee you want to assess", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "201": { - "description": "Created", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/AeAssessment" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/AeAssessment" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AeAssessment" - } - } - } + "bankPayments": { + "items": { + "$ref": "#/components/schemas/PayRunPayment" + }, + "nullable": true, + "type": "array" }, - "400": { - "description": "Bad Request" + "bureauNumber": { + "description": "Bureau number to be used if available while sending payment instruction", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/autoenrolment/assessments/{id}": { - "get": { - "tags": [ - "AutoEnrolment" - ], - "summary": "Get AE Assessment", - "description": "Returns the specified AeAssessment for the specified Employee", - "operationId": "GetAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "link": { + "description": "[readonly] If available, a link to the payments in an ExternalDataProvider", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee the assessment is for", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "originator": { + "$ref": "#/components/schemas/BankDetails" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Assessment.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/AeAssessment" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/AeAssessment" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AeAssessment" - } - } - } + "serviceUserNumber": { + "description": "Service user number to be used while sending payment instruction", + "nullable": true, + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/BackgroundTaskStatus" + }, + "statusMessage": { + "description": "[readonly] A message to elaborate on the Status", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "AutoEnrolment" - ], - "summary": "Delete AE Assessment", - "description": "Deletes the AeAssessment specified by the Id for the Employee specified by the EmployeeId.", - "operationId": "DeleteAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "BankPaymentInstructionReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee the assessment is for", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "model": { + "$ref": "#/components/schemas/BankPaymentInstruction" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Assessment.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/autoenrolment/assessments/last": { - "get": { - "tags": [ - "AutoEnrolment" - ], - "summary": "Get Last AE Assessment", - "description": "Returns the most recent AeAssessment for an Employee", - "operationId": "GetLastAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee the assessment is for", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/AeAssessment" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/AeAssessment" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AeAssessment" - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/autoenrolment/assessments/{id}/letter": { - "get": { - "tags": [ - "AutoEnrolment" + }, + "type": "object" + }, + "BankPaymentInstructionsCsvFormat": { + "enum": [ + "StandardCsv", + "Telleroo", + "BarclaysBacs", + "SantanderBacs", + "Sif", + "Revolut", + "Standard18FasterPayments", + "Standard18Bacs", + "Bankline", + "BanklineBulk", + "StandardCsvBacs", + "LloydsMultipleStandardCsvBacs", + "LloydsV11CsvBacs", + "CoOpBulkCsvBacs", + "CoOpFasterPaymentsCsv", + "BankOfAmericaBacs", + "DanskeBankUkLocalPayments", + "DanskeBankUkFasterPayments", + "Standard18BacsMulti", + "BanklineBulkListDebit", + "VirginMoney", + "JpMorganAch", + "MetrobankCsv", + "CitibankUkAch", + "CitibankFasterPayments" ], - "summary": "Get Letter", - "description": "Returns either a PDF or HTML (depending on accept header) of the letter that needs to be sent to an employee as a result of the assessment.\r\nThe same ReportResponse model that is used for reports is used here.", - "operationId": "GetLetterAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "Benefit": { + "additionalProperties": false, + "description": "Used to represent Benefits and Expenses", + "properties": { + "assetType": { + "$ref": "#/components/schemas/BenefitDetailsAssetType" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee the assessment is for", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "benefitPayrolled": { + "items": { + "$ref": "#/components/schemas/BenefitPayrolled" + }, + "nullable": true, + "type": "array" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Assessment", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "bikOutstanding": { + "description": "[readonly]", + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/octet-stream": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/autoenrolment/assessments/{id}/letter/email": { - "post": { - "tags": [ - "AutoEnrolment" - ], - "summary": "Email Letter", - "description": "Send via email letter that needs to be sent to an employee as a result of the assessment.\r\nThe letter is then marked as having been sent.", - "operationId": "EmailLetterAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "car": { + "$ref": "#/components/schemas/BenefitDetailsCar" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee the assessment is for", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "cashEquivalent": { + "description": "[readonly]", + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Assessment", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/EmployerEmail" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerEmail" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/EmployerEmail" - } - } - } - } - } - } - }, - "/employers/{employerId}/autoenrolment/letters/email": { - "post": { - "tags": [ - "AutoEnrolment" - ], - "summary": "Email All Letters", - "description": "", - "operationId": "EmailAllLettersAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/autoenrolment/assessments/{id}/letter/sent": { - "put": { - "tags": [ - "AutoEnrolment" - ], - "summary": "Mark Letter as Sent", - "description": "Update an Assessment to mark the letter as sent.\r\nThis is done automatically if you send the letter via email so you'd\r\nonly need to use this is you are printing/posting the letter.", - "operationId": "MarkLetterAsSentAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "cashEquivalentFuel": { + "description": "Only relevant to Benefits with Type Vans", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee the assessment is for", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "class1AType": { + "$ref": "#/components/schemas/BenefitDetailsClass1AType" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Assessment", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/autoenrolment/letters/sent": { - "put": { - "tags": [ - "AutoEnrolment" - ], - "summary": "Mark All Letters as Sent", - "description": "Update an Assessments to mark all the letter as sent.\r\nThis is done automatically if you send the letter via email so you'd\r\nonly need to use this is you are printing/posting the letter.", - "operationId": "MarkLettersAsSentAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/autoenrolment/state": { - "put": { - "tags": [ - "AutoEnrolment" - ], - "summary": "Update State", - "description": "Updates the AutoEnrolment state for an Employee. \r\nYou would use this API call to process notices such as Opt Out, Opt In, etc.\r\nA new assessment is returned showing the result of the state change.", - "operationId": "SetStateAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "declarationType": { + "$ref": "#/components/schemas/BenefitDeclarationType" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee you want to set the status for", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "description": { + "description": "A description of this benefit", + "maxLength": 120, + "nullable": true, + "type": "string" }, - { - "name": "state", - "in": "query", - "description": "The AutoEnrolment State to set for the Employee", - "schema": { - "$ref": "#/components/schemas/AeEmployeeState" - } + "employee": { + "$ref": "#/components/schemas/Item" }, - { - "name": "status", - "in": "query", - "schema": { - "$ref": "#/components/schemas/AeStatus" - } + "employeeContribution": { + "format": "double", + "type": "number" }, - { - "name": "stateDate", - "in": "query", - "description": "Optional. Will default to the current date", - "schema": { - "type": "string", - "format": "date-time" - } + "endDate": { + "description": "The date the benefits ends if different to the end date of the TaxYear", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "pensionId", - "in": "query", - "description": "Optional. Used to override the default AE Pension. Only valid with states of Enrol, VoluntaryJoiner or OptIn", - "schema": { - "type": "string", - "format": "uuid" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "workerGroupId", - "in": "query", - "description": "Optional. Used to override the default AE Pension Workergroup. Only valid with states of Enrol, Join or OptIn. Must be provided if a pensionId is being provided.", - "schema": { - "type": "string", - "format": "uuid" - } + "isPeriodValue": { + "description": "To be used for the benefit period", + "type": "boolean" }, - { - "name": "startActionAlreadyReported", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } + "loan": { + "$ref": "#/components/schemas/BenefitDetailsLoan" }, - { - "name": "endActionAlreadyReported", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "201": { - "description": "Created", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/AeAssessment" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/AeAssessment" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AeAssessment" - } - } - } + "nonClass1AType": { + "$ref": "#/components/schemas/BenefitDetailsNonClass1AType" }, - "400": { - "description": "Bad Request" + "openingBalance": { + "description": "The amount of benefit paid YTD when setting up a benefit", + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/autoenrolment/letters/pending/count": { - "get": { - "tags": [ - "AutoEnrolment" - ], - "summary": "Pending Letters Count", - "description": "Returns the count of AE Assessments that are awaiting a letter to be sent\r\nand the count of the employees that are awaiting a postponement letter to be sent.", - "operationId": "PendingLettersCountAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Contract.PendingLettersCountResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PendingLettersCountResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PendingLettersCountResponse" - } - } - } + "overrideOpeningBalance": { + "description": "To be used to change the opening balance if the benefit has been payrolled", + "type": "boolean" + }, + "paid": { + "description": "[readonly]", + "format": "double", + "readOnly": true, + "type": "number" + }, + "paymentType": { + "$ref": "#/components/schemas/BenefitDetailsPaymentType" + }, + "startDate": { + "description": "The date the benefits starts if different to the start date of the TaxYear", + "format": "date", + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "tradingOrganisation": { + "description": "Only relevant to Benefits with Type Entertainment", + "type": "boolean" + }, + "type": { + "$ref": "#/components/schemas/BenefitType" + }, + "useOfAssetType": { + "$ref": "#/components/schemas/BenefitDetailsUseOfAssetType" + }, + "useProRata": { + "description": "Benefit calculation should be done on pro rata rules", + "type": "boolean" + }, + "value": { + "format": "double", + "type": "number" } - } - } - }, - "/employers/{employerId}/autoenrolment/letters/pending": { - "get": { - "tags": [ - "AutoEnrolment" + }, + "type": "object" + }, + "BenefitDeclarationType": { + "enum": [ + "P11D", + "Paye" ], - "summary": "Pending Letters", - "description": "Returns all AE Assessments that are awaiting a letter to be sent", - "operationId": "PendingLettersAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "type": "string" + }, + "BenefitDetailsAssetType": { + "enum": [ + "Other", + "Multiple", + "Property", + "Cars", + "PreciousMetals" ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/autoenrolment/letters/pending/postponement": { - "get": { - "tags": [ - "AutoEnrolment" - ], - "summary": "Pending Postponement Letters", - "description": "Returns all employees that are awaiting a postponement letter to be sent.\r\nBecause there is no associated AeAssessment they can't be returned with the other pending letters", - "operationId": "PendingPostponementLettersAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/autoenrolment/renrol": { - "get": { - "tags": [ - "AutoEnrolment" - ], - "summary": "Cyclical Re-enrolment", - "description": "Performs a Cyclical Re-enrolment. All employees that have opted-out or ceased membership \r\nwill be re-assessed and auto-enrolled if necessary.\r\nThe employers cyclical re-enrolment date will then be updated to the date provided.", - "operationId": "ReenrolAutoEnrolment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "BenefitDetailsCar": { + "additionalProperties": false, + "properties": { + "availableFrom": { + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "cyclicalReenrolmentDate", - "in": "query", - "description": "The new Cyclical Re-enrolment Date for the Employer", - "schema": { - "type": "string", - "format": "date-time" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "availableTo": { + "format": "date", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "cashEquivalent": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/{employerId}/employees/AverageHolidayPay/PayHistory": { - "post": { - "tags": [ - "AverageHolidayPayHistory" - ], - "summary": "Create multiple AverageHolidayPayHistory for an Employer", - "operationId": "CreateAverageHolidayPayHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "description": "", - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayHistoryRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayHistoryRequest" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayHistoryRequest" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayHistoryRequest" - } - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "cashEquivalentFuel": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - "200": { - "description": "Success" + "chargeableValue": { + "description": "[readonly] The chargeable value of the car", + "format": "double", + "readOnly": true, + "type": "number" + }, + "co2Emissions": { + "format": "int32", + "type": "integer" + }, + "daysUnavailable": { + "format": "int32", + "type": "integer" + }, + "employeeCapitalContributions": { + "format": "double", + "type": "number" + }, + "employeePrivateContributions": { + "format": "double", + "type": "number" + }, + "engineSize": { + "format": "int32", + "type": "integer" + }, + "firstRegistered": { + "format": "date", + "nullable": true, + "type": "string" + }, + "freeFuel": { + "type": "boolean" + }, + "freeFuelReinstated": { + "type": "boolean" + }, + "fuelAvailableFrom": { + "format": "date", + "nullable": true, + "type": "string" + }, + "fuelAvailableTo": { + "format": "date", + "nullable": true, + "type": "string" + }, + "fuelType": { + "$ref": "#/components/schemas/BenefitDetailsCarPowerType" + }, + "fullYearCharge": { + "description": "[readonly] The charge for the car for a full year, not taking in to account available dates or EmployeePrivateContributions", + "format": "double", + "readOnly": true, + "type": "number" + }, + "hasApprovedEmissionsValue": { + "type": "boolean" + }, + "listPrice": { + "format": "double", + "type": "number" + }, + "makeAndModel": { + "nullable": true, + "type": "string" + }, + "nonStandardAccessories": { + "format": "double", + "type": "number" + }, + "rate": { + "description": "[readonly] The applicable rate based on CO2Emissions and Engine Size", + "format": "double", + "type": "number" + }, + "registeredPriorTo1998": { + "description": "[readonly]", + "readOnly": true, + "type": "boolean" + }, + "registration": { + "nullable": true, + "type": "string" + }, + "zeroEmissionsMileage": { + "format": "int32", + "type": "integer" } - } + }, + "type": "object" }, - "get": { - "tags": [ - "AverageHolidayPayHistory" - ], - "summary": "Get AverageHolidayPayHistory for Employer", - "operationId": "GetByEmployerAverageHolidayPayHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "BenefitDetailsCarPowerType": { + "enum": [ + "Diesel6d", + "DieselNon6d", + "Petrol", + "Hybrid", + "Electric" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayHistoryResponse" - } - } - } - } - } - } + "type": "string" }, - "put": { - "tags": [ - "AverageHolidayPayHistory" - ], - "summary": "Update multiple AverageHolidayPayHistory for an Employer", - "operationId": "UpdateAverageHolidayPayHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "BenefitDetailsClass1AType": { + "enum": [ + "Other", + "Multiple", + "StopLossCharges", + "NonQualifyingRelocationBenefit", + "EducationalAssitance", + "SubscriptionsAndFees" ], - "requestBody": { - "description": "", - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayHistoryUpdateRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayHistoryUpdateRequest" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayHistoryUpdateRequest" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayHistoryUpdateRequest" - } - } - } - } - }, - "responses": { - "404": { - "description": "Not Found" + "type": "string" + }, + "BenefitDetailsLoan": { + "additionalProperties": false, + "properties": { + "cashEquivalent": { + "description": "[readonly]", + "format": "double", + "readOnly": true, + "type": "number" }, - "200": { - "description": "Success" - } - } - } - }, - "/{employerId}/employees/{employeeId}/AverageHolidayPay/PayHistory/{taxYear}": { - "get": { - "tags": [ - "AverageHolidayPayHistory" - ], - "summary": "List AverageHolidayPayHistory for Employee", - "description": "List AverageHistoryPayHistory for the given Employee in the specified TaxYear", - "operationId": "GetByEmployeeAverageHolidayPayHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "closingBalance": { + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "description": "The Employee Id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "fullTaxMonths": { + "description": "[readonly]", + "format": "int32", + "type": "integer" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear for which you want the history.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayHistoryResponse" - } - } - } - } + "interestPaid": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "loanDischarged": { + "format": "date", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/{employerId}/employees/AverageHolidayPay/PayHistory/{id}": { - "delete": { - "tags": [ - "AverageHolidayPayHistory" - ], - "summary": "Delete an AverageHolidayPayHistory record", - "operationId": "DeleteAverageHolidayPayHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "loanMade": { + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The pay history unique id", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "maxBalanceInYear": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "monthlyValue": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" + "numberOfJointBorrowers": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "officialInterest": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "startingBalance": { + "format": "double", + "type": "number" } - } - } - }, - "/{employerId}/employees/{employeeId}/AverageHolidayPay/PayHistory": { - "delete": { - "tags": [ - "AverageHolidayPayHistory" + }, + "type": "object" + }, + "BenefitDetailsNonClass1AType": { + "enum": [ + "Other", + "Multiple", + "LoansWrittenOrWaived", + "NurseryPlaces", + "EducationalAssitance", + "SubscriptionsAndFees" ], - "summary": "Delete all AverageHolidayPayHistory for an Employee", - "operationId": "DeleteByEmployeeIdAverageHolidayPayHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "type": "string" + }, + "BenefitDetailsPaymentType": { + "enum": [ + "Other", + "SeasonTickets", + "PrivateCarExpenses", + "PrivateEducation", + "AccountancyFees", + "DomesticBills", + "Multiple" ], - "responses": { - "204": { - "description": "No Content" + "type": "string" + }, + "BenefitDetailsUseOfAssetType": { + "enum": [ + "Other", + "Multiple", + "CorporateHospitality", + "Boat", + "Aircraft", + "TimeshareAccommodation", + "HolidayAccommodation" + ], + "type": "string" + }, + "BenefitPayrolled": { + "additionalProperties": false, + "properties": { + "amount": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/{employerId}/employees/AverageHolidayPay/PayHistory/import": { - "post": { - "tags": [ - "AverageHolidayPayHistory" - ], - "summary": "Import AverageHistoryPayHistory from csv file", - "description": "Import Pay History from a CSV file.", - "operationId": "ImportCsvAverageHolidayPayHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isLatestVersion": { + "description": "[readonly] Indicates whether this is the latest version of the BenefitPayrolled.", + "type": "boolean" }, - { - "name": "previewOnly", - "in": "query", - "description": "Set to true and nothing will be imported but you'll be shown a preview of the data.", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } + "payRunVersion": { + "description": "[readonly] The supplementary pay run version of this BenefitPayrolled.", + "format": "int32", + "type": "integer" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/benefits": { - "post": { - "tags": [ - "Benefits" + "type": "object" + }, + "BenefitType": { + "enum": [ + "AssetsTransferred", + "PaymentsOnBehalf", + "UnborneTax", + "Vouchers", + "Accommodation", + "MileageAllowance", + "Car", + "Vans", + "Loan", + "Medical", + "QualifyingRelocationExpenses", + "Services", + "AssetsAtEmployeeDisposal", + "OtherClass1AItems", + "OtherNonClass1AItems", + "DirectorTax", + "TravellingAndSubsistence", + "Entertainment", + "HomeTelephone", + "NonQualifyingRelocationExpenses", + "OtherExpenses" ], - "summary": "Create Benefit", - "description": "Creates a Benefit for the Employee", - "operationId": "CreateBenefits", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "BureauSettings": { + "additionalProperties": false, + "description": "Represents the BureauSettings for an Employer.", + "properties": { + "enableApprovals": { + "description": "Whether or not Payruns for this employer need to go through an Approval process", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Benefit" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Benefit" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Benefit" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Benefit" - } - } - } - }, - "responses": { - "201": { - "description": "Created" + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "isBacsClient": { + "description": "Indicates that the bureau is responsible for BACS payments of net wages to employees", + "type": "boolean" }, - "404": { - "description": "Not Found" + "isBacsClientForHmrc": { + "description": "Indicates that the bureau is responsible for BACS payments of HMRC liabilites", + "type": "boolean" }, - "409": { - "description": "Conflict" - } - } - }, - "get": { - "tags": [ - "Benefits" - ], - "summary": "List Benefits", - "description": "Lists all Benefits for the Employee", - "operationId": "IndexBenefits", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "processorUserId": { + "description": "The Id of the user, if any, that is the allocated Processor", + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "reportPackId": { + "description": "The Id of the ReportPack, if any, to present to the Payroll Client", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "showContactCard": { + "description": "Show a Contact card with the Processors details on the PayrollClient dashboard", + "type": "boolean" } + }, + "type": "object" + }, + "CISSubContractorType": { + "enum": [ + "SoleTrader", + "Partnership", + "Company", + "Trust" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/benefits/{id}": { - "get": { - "tags": [ - "Benefits" + "type": "string" + }, + "CISTaxStatus": { + "enum": [ + "Gross", + "NetOfStandardDeduction", + "NetOfHigherDeduction" ], - "summary": "Get Benefit", - "description": "Gets the Benefit specified by the Id for the Employee specified by the EmployeeId", - "operationId": "GetBenefits", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "CalendarEntry": { + "additionalProperties": false, + "properties": { + "end": { + "format": "date", + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "start": { + "format": "date", + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Benefit you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Benefit" - } - } - } + "title": { + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "type": { + "$ref": "#/components/schemas/CalendarEntryType" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Benefits" + "CalendarEntryType": { + "enum": [ + "EmployeeStarting", + "EmployeeLeaving", + "EmployeeAbsence", + "PayDay", + "EmployeeBirthday", + "EmployeeWorkAnniversary" ], - "summary": "Update Benefit", - "operationId": "UpdateBenefits", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "id", - "in": "path", - "description": "The Id of the Benefit you want to update.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "type": "string" + }, + "CalendarMonth": { + "enum": [ + "None", + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Benefit" - } + "type": "string" + }, + "CarCharge": { + "additionalProperties": false, + "description": "Part of the TaxYearConfig that our engine uses to calculate charges for a Company Car.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "co2Table": { + "items": { + "$ref": "#/components/schemas/CarChargeRate" }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Benefit" - } + "nullable": true, + "type": "array" + }, + "dieselSurcharge": { + "format": "double", + "type": "number" + }, + "engineSizeTable": { + "items": { + "$ref": "#/components/schemas/CarChargeRate" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Benefit" - } + "nullable": true, + "type": "array" + }, + "fuelCharge": { + "format": "double", + "type": "number" + }, + "maxCharge": { + "format": "double", + "type": "number" + }, + "minCharge": { + "format": "double", + "type": "number" + }, + "newCarRateReductionAmount": { + "format": "double", + "type": "number" + }, + "newCarRateReductionDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "zeroEmissionsTable": { + "items": { + "$ref": "#/components/schemas/CarChargeRate" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Benefit" - } - } + "nullable": true, + "type": "array" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Benefit" - } - } - } + "type": "object" + }, + "CarChargeRate": { + "additionalProperties": false, + "description": "Part of the TaxYearConfig that our engine uses to calculate charges for a Company Car.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "rangeStart": { + "format": "int32", + "type": "integer" }, - "409": { - "description": "Conflict" + "rangeStop": { + "format": "int32", + "type": "integer" }, - "404": { - "description": "Not Found" + "rate": { + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "Benefits" - ], - "summary": "Delete Benefit", - "description": "Deletes the Benefit specified by the Id for the Employee specified by the EmployeeId", - "operationId": "DeleteBenefits", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "ChangeSummary": { + "additionalProperties": false, + "properties": { + "actionPerformed": { + "$ref": "#/components/schemas/AuditEventAction" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Benefit you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "actionPerformedBy": { + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "actionPerformedOn": { + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "auditId": { + "format": "uuid", + "type": "string" }, - "409": { - "description": "Conflict" - } - } - } - }, - "/billing/directdebit": { - "get": { - "tags": [ - "Billing" - ], - "summary": "Get DirectDebitMandate", - "description": "Returns the DirectDebitMandate for the authenticated account", - "operationId": "DirectDebitMandateBilling", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DirectDebitMandate" - } - } - } + "changeType": { + "nullable": true, + "type": "string" + }, + "date": { + "format": "date", + "type": "string" + }, + "displayName": { + "nullable": true, + "type": "string" + }, + "employeeFirstName": { + "nullable": true, + "type": "string" + }, + "employeeLastName": { + "nullable": true, + "type": "string" + }, + "employeeUniqueId": { + "description": "Unique id of the employee this operation belongs to", + "format": "uuid", + "type": "string" + }, + "employerUniqueId": { + "description": "Unique id of the employer this operation belongs to", + "format": "uuid", + "type": "string" + }, + "entityId": { + "description": "Id of the underlying entity", + "format": "uuid", + "type": "string" + }, + "entityType": { + "$ref": "#/components/schemas/EntityType" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "modifications": { + "items": { + "$ref": "#/components/schemas/FieldModification" + }, + "nullable": true, + "type": "array" + }, + "name": { + "nullable": true, + "readOnly": true, + "type": "string" + }, + "parentEventType": { + "nullable": true, + "type": "string" + }, + "payRunPeriod": { + "format": "int32", + "type": "integer" + }, + "previousAuditId": { + "description": "This Id is used to delete the previous audit entry once the change summary entry is created\r\nfor the modifications between the current and the previous audit entry.", + "format": "uuid", + "type": "string" + }, + "uniqueId": { + "description": "Unique id of the owner this request belongs to", + "format": "uuid", + "type": "string" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "Billing" - ], - "summary": "Delete DirectDebitMandate", - "description": "Cancels and deletes the Direct Debit Mandate for the account", - "operationId": "DeleteDirectDebitMandateBilling", - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/billing/directdebit/setup": { - "get": { - "tags": [ - "Billing" - ], - "summary": "Setup DirectDebitMandate", - "description": "Returns a Url to redirect a user to in order to start the process of setting up a Direct Debit Mandate.\r\nOnce the process is complete then the user is sent to the URL specified.", - "operationId": "SetupDirectDebitMandateBilling", - "parameters": [ - { - "name": "returnUrl", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/billing/directdebit/confirm": { - "get": { - "tags": [ - "Billing" - ], - "summary": "Confirm Direct Debit Setup", - "description": "This endpoint is called by an external provider. You will never have to call this endpoint yourself.", - "operationId": "ConfirmDirectDebitMandateBilling", - "parameters": [ - { - "name": "redirect_flow_id", - "in": "query", - "schema": { - "type": "string" - } + "ChangeSummaryListReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "description": "[readonly] If the type is application.json then this will contain a JSON representation of the relevant model", + "items": { + "$ref": "#/components/schemas/ChangeSummary" + }, + "nullable": true, + "type": "array" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - ], - "responses": { - "200": { - "description": "Success" + }, + "type": "object" + }, + "Cis300": { + "additionalProperties": false, + "properties": { + "cisReturn": { + "$ref": "#/components/schemas/CisReturn" + }, + "employeeCount": { + "format": "int32", + "type": "integer" + }, + "employerReferences": { + "$ref": "#/components/schemas/EmpRefs" + }, + "employmentStatusDeclaration": { + "type": "boolean" + }, + "govTalkSubmission": { + "$ref": "#/components/schemas/GovTalkSubmission" + }, + "iRmark": { + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "inactivityDeclaration": { + "type": "boolean" + }, + "informationCorrectDeclaration": { + "type": "boolean" + }, + "taxMonth": { + "format": "int32", + "type": "integer" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "verificationDeclaration": { + "type": "boolean" + }, + "xml": { + "description": "This property will soon be removed and should not be used.\r\nThere is now a dedicated API endpoint for retrieving the XML for a submission.", + "nullable": true, + "type": "string" } - } - } - }, - "/billing/bills": { - "get": { - "tags": [ - "Billing" - ], - "summary": "List Bills", - "description": "Returns a list of UsageBills for the authenticated account", - "operationId": "BillsBilling", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + }, + "type": "object" + }, + "Cis300Declarations": { + "additionalProperties": false, + "properties": { + "employmentStatus": { + "nullable": true, + "type": "string" + }, + "inactivity": { + "nullable": true, + "type": "string" + }, + "informationCorrect": { + "nullable": true, + "type": "string" + }, + "verification": { + "nullable": true, + "type": "string" } - } - } - }, - "/billing/bill/{id}": { - "get": { - "tags": [ - "Billing" - ], - "summary": "Get Bill", - "description": "Returns the specified UsageBill", - "operationId": "BillBilling", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "Cis300ReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/Cis300" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UsageBill" - } - } - } + }, + "type": "object" + }, + "CisContractor": { + "additionalProperties": false, + "description": "Used to represent details of a CIS SubContractor when communicating with the HMRC Gateway", + "properties": { + "aOref": { + "nullable": true, + "type": "string" + }, + "utr": { + "nullable": true, + "type": "string" } - } - } - }, - "/billing/bill/{id}/csv": { - "get": { - "tags": [ - "Billing" - ], - "summary": "Get Bill CSV", - "description": "Returns the specified UsageBill as a CSV file", - "operationId": "BillCsvBilling", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "CisDetails": { + "additionalProperties": false, + "description": "If an Employee is marked as a CIS Subcontractor then this model provides further details specifically related to the CIS details of the Employee.", + "properties": { + "companyNumber": { + "maxLength": 20, + "nullable": true, + "type": "string" + }, + "companyUtr": { + "maxLength": 20, + "nullable": true, + "type": "string" + }, + "reverseChargeVAT": { + "type": "boolean" + }, + "tradingName": { + "maxLength": 200, + "nullable": true, + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/CISSubContractorType" + }, + "utr": { + "maxLength": 20, + "nullable": true, + "type": "string" + }, + "vatNumber": { + "maxLength": 20, + "nullable": true, + "type": "string" + }, + "vatRate": { + "format": "double", + "type": "number" + }, + "vatRegistered": { + "type": "boolean" + }, + "verification": { + "$ref": "#/components/schemas/CisVerificationDetails" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } + }, + "type": "object" + }, + "CisPartnership": { + "additionalProperties": false, + "description": "If an Employee is marked as a CIS Subcontractor and is registered as a Partnership then this model provides further details specifically related to the CIS Partnership.", + "properties": { + "name": { + "nullable": true, + "type": "string" + }, + "utr": { + "nullable": true, + "type": "string" } - } - } - }, - "/billing/usage-stats": { - "get": { - "tags": [ - "Billing" - ], - "summary": "Get UsageStats Report", - "description": "Returns usage statistics data for all employers the logged in user has access to for the given date range.\r\nIf either of the dates are not provided then the values are defaulted to the first and last date of the previous calendar month.", - "operationId": "GetUsageStatsBilling", - "parameters": [ - { - "name": "fromDate", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + }, + "type": "object" + }, + "CisRequest": { + "additionalProperties": false, + "properties": { + "contractor": { + "$ref": "#/components/schemas/CisContractor" }, - { - "name": "toDate", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "declaration": { + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "subcontractor": { + "items": { + "$ref": "#/components/schemas/CisSubContractor" + }, + "nullable": true, + "type": "array" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/bureau/processors": { - "get": { - "tags": [ - "Bureau" - ], - "summary": "List Allocated Processors", - "description": "Returns a list of Users that have one or more Employers allocated to them as the Processor", - "operationId": "ProcessorUsersBureau", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/bureau/employers": { - "get": { - "tags": [ - "Bureau" - ], - "summary": "List Employers", - "description": "Returns a list of Employers.\r\nThis differs from the main Employer list end point in that the metadata included is more relevant to Bureau activities\r\nIt also gives you the ability to filter based on the allocated Processor.\r\nNote: an entry is returned for each PaySchedule. So if the employer has both a Monthly and a Weekly PaySchedule then they'll appear twice", - "operationId": "EmployersBureau", - "parameters": [ - { - "name": "processor", - "in": "query", - "description": "The Id of the Processor (User) you want to restrict the list to.", - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/bureau/settings": { - "get": { - "tags": [ - "Bureau" - ], - "summary": "Get BureauSettings", - "description": "Returns the BureauSettings for the Employer", - "operationId": "GetSettingsBureau", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BureauSettings" - } - } - } - } - } - }, - "put": { - "tags": [ - "Bureau" - ], - "summary": "Update BureauSettings", - "description": "Updates the BureauSettings for the Employer", - "operationId": "UpdateSettingsBureau", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/BureauSettings" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/BureauSettings" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BureauSettings" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BureauSettings" - } - } + }, + "type": "object" + }, + "CisReturn": { + "additionalProperties": false, + "properties": { + "contractor": { + "$ref": "#/components/schemas/CisContractor" + }, + "declarations": { + "$ref": "#/components/schemas/Cis300Declarations" + }, + "nilReturn": { + "nullable": true, + "type": "string" + }, + "subcontractor": { + "items": { + "$ref": "#/components/schemas/CisSubContractor" + }, + "nullable": true, + "type": "array" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BureauSettings" - } - } - } - } - } - } - }, - "/employers/{employerId}/bureau/settings/reportpack": { - "get": { - "tags": [ - "Bureau" - ], - "summary": "Get BureauSettings ReportPack", - "description": "If a ReportPack is specified in the BureauSettings then it is returned, otherwise an empty ReportPAck is returned", - "operationId": "GetReportPackBureau", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportPack" - } - } - } - } - } - } - }, - "/employers/{employerId}/bureau/settings/processor": { - "get": { - "tags": [ - "Bureau" - ], - "summary": "Get Processor", - "description": "If a Processor is specified in the BureauSettings then it is returned as a User, otherwise a 404 is returned", - "operationId": "GetProcessorUserBureau", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "404": { - "description": "Not Found" + "type": "object" + }, + "CisStatement": { + "additionalProperties": false, + "description": "CIS Payment and Deduction Statement (CISOL1)", + "properties": { + "amountDeducted": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/cis300/{taxYear}": { - "get": { - "tags": [ - "Cis300" - ], - "summary": "List Cis300", - "description": "Returns all Cis300s for the given tax year.", - "operationId": "ListCis300", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "amountLiableToDeduction": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "Cis300" - ], - "summary": "Create Cis300", - "description": "A Cis300 is automatically created for each Tax Month that you pay a Subcontractor.\r\nYou would only manually create one if you are intending to submit a nil return.", - "operationId": "CreateCis300", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "amountPayable": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Cis300" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cis300" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Cis300" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Cis300" - } - } - } - }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cis300" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/cis300/{taxYear}/{id}": { - "put": { - "tags": [ - "Cis300" - ], - "summary": "Update Cis300", - "description": "Updates an existing Cis300.", - "operationId": "UpdateCis300", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "contractorAddress": { + "$ref": "#/components/schemas/Address" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "contractorName": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "contractorOfficeNumber": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "contractorPayeReference": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "costOfMaterials": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "grossAmountPaid": { + "description": "[readonly] Gross Amount Paid (Excl VAT)", + "format": "double", + "type": "number" + }, + "subContractorUtr": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "subcontractorName": { + "$ref": "#/components/schemas/RtiEmployeeName" + }, + "taxMonth": { + "description": "[readonly]", + "format": "int32", + "type": "integer" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "verificationNumber": { + "description": "[readonly]", + "nullable": true, + "type": "string" } - ], - "requestBody": { + }, + "type": "object" + }, + "CisStatementListReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Cis300" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cis300" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Cis300" - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "description": "[readonly] If the type is application.json then this will contain a JSON representation of the relevant model", + "items": { + "$ref": "#/components/schemas/CisStatement" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Cis300" - } - } + "nullable": true, + "type": "array" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cis300" - } - } - } - } - } + "type": "object" }, - "get": { - "tags": [ - "Cis300" - ], - "summary": "Get Cis300", - "description": "Retrieves a Cis300", - "operationId": "GetCis300", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "CisSubContractor": { + "additionalProperties": false, + "properties": { + "action": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "address": { + "$ref": "#/components/schemas/RtiEmployeeAddress" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cis300" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Cis300" - ], - "summary": "Delete Cis300", - "description": "Not implemented, CIS300s cannot be deleted", - "operationId": "DeleteCis300", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "costOfMaterials": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "costOfMaterialsUnrounded": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/employers/{employerId}/rti/cis300/{taxYear}/{id}/xml/request": { - "get": { - "tags": [ - "Cis300" - ], - "summary": "Get XML Request", - "description": "Returns the XML request that was or will be sent to HMRC for this RTI document.\r\nAlthough the value is XML, it is returned as a JSON string.", - "operationId": "GetXmlRequestCis300", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "crn": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "displayName": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/cis300/{taxYear}/{id}/submit": { - "post": { - "tags": [ - "Cis300" - ], - "summary": "Submit Cis300", - "description": "Submits an existing Cis300 to HMRC.", - "operationId": "SubmitCis300", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "emailStatementTo": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "employeeUniqueId": { + "format": "uuid", + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "item": { + "$ref": "#/components/schemas/Item" }, - { - "name": "force", - "in": "query", - "description": "If the CIS300 has already been accepted then you will need to set this to true to force it to be resubmitted", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cis300" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/cis300/{taxYear}/{id}/markasaccepted": { - "post": { - "tags": [ - "Cis300" - ], - "summary": "Mark as Sent", - "description": "Marks a Cis300 as having been sent to HMRC and accepted by them\r\nYou only use this method if the request has been submitted via an external system.\r\nIt will automatically be updated as Sent and/or Accepted if it's submitted via this API.", - "operationId": "MarkAsAcceptedCis300", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "matched": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "name": { + "$ref": "#/components/schemas/RtiEmployeeName" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cis300" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/cis300/requiringattention": { - "get": { - "tags": [ - "Cis300" - ], - "summary": "Cis300 Requiring Attention", - "description": "Returns all Cis300 that have a Submission Status of NotSubmitted or ErrorResponse", - "operationId": "RequiringAttentionCis300", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/cis-verification/{taxYear}": { - "get": { - "tags": [ - "CisVerification" - ], - "summary": "List CisVerificationRequest", - "description": "Returns all CIS Verification Requests for the given tax year.", - "operationId": "ListCisVerification", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "netPayment": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "nino": { + "nullable": true, + "type": "string" + }, + "numberOfPayments": { + "format": "int32", + "type": "integer" + }, + "partnership": { + "$ref": "#/components/schemas/CisPartnership" + }, + "taxTreatment": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "totalDeducted": { + "nullable": true, + "type": "string" + }, + "totalPayments": { + "nullable": true, + "type": "string" + }, + "totalPaymentsUnrounded": { + "nullable": true, + "type": "string" + }, + "tradingName": { + "nullable": true, + "type": "string" + }, + "type": { + "nullable": true, + "type": "string" + }, + "umbrellaFee": { + "nullable": true, + "type": "string" + }, + "unmatchedRate": { + "nullable": true, + "type": "string" + }, + "utr": { + "nullable": true, + "type": "string" + }, + "validationMsg": { + "nullable": true, + "type": "string" + }, + "vatAmount": { + "nullable": true, + "type": "string" + }, + "verificationNumber": { + "nullable": true, + "type": "string" + }, + "worksRef": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "CisVerification" - ], - "summary": "Create CisVerificationRequest", - "description": "Creates a new CIS Verification Request.", - "operationId": "CreateCisVerification", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "CisSubContractorSummary": { + "additionalProperties": false, + "description": "", + "properties": { + "displayName": { + "nullable": true, + "readOnly": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "firstName": { + "nullable": true, + "type": "string" + }, + "lastName": { + "nullable": true, + "type": "string" + }, + "niNumber": { + "nullable": true, + "type": "string" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "taxStatus": { + "$ref": "#/components/schemas/CISTaxStatus" + }, + "tradingName": { + "nullable": true, + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/CISSubContractorType" + }, + "utr": { + "nullable": true, + "type": "string" + }, + "validationMessage": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "verificationNumber": { + "nullable": true, + "type": "string" } - ], - "requestBody": { + }, + "type": "object" + }, + "CisSubContractorSummaryListReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/CisVerification" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/CisVerification" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CisVerification" - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "description": "[readonly] If the type is application.json then this will contain a JSON representation of the relevant model", + "items": { + "$ref": "#/components/schemas/CisSubContractorSummary" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/CisVerification" - } - } + "nullable": true, + "type": "array" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CisVerification" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/cis-verification/{taxYear}/{id}": { - "put": { - "tags": [ - "CisVerification" - ], - "summary": "Update CisVerificationRequest", - "description": "Updates an existing CIS Verification Request.", - "operationId": "UpdateCisVerification", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "CisVerification": { + "additionalProperties": false, + "description": "If an Employee is marked as a CIS Subcontractor then this model is included ad a child of CisDetails and is used to represent the Verification details of the Subcontractor", + "properties": { + "cisRequest": { + "$ref": "#/components/schemas/CisRequest" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "employeeCount": { + "format": "int32", + "type": "integer" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/CisVerification" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/CisVerification" - } + "employees": { + "items": { + "$ref": "#/components/schemas/Item" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CisVerification" - } + "nullable": true, + "type": "array" + }, + "employerReferences": { + "$ref": "#/components/schemas/EmpRefs" + }, + "govTalkSubmission": { + "$ref": "#/components/schemas/GovTalkSubmission" + }, + "iRmark": { + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "responses": { + "items": { + "$ref": "#/components/schemas/CisSubContractor" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/CisVerification" - } - } + "nullable": true, + "type": "array" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "xml": { + "description": "This property will soon be removed and should not be used.\r\nThere is now a dedicated API endpoint for retrieving the XML for a submission.", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CisVerification" - } - } - } - } - } + "type": "object" }, - "get": { - "tags": [ - "CisVerification" - ], - "summary": "Get CisVerificationRequest", - "description": "Retrieves the CIS Verification Request.", - "operationId": "GetCisVerification", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "CisVerificationDetails": { + "additionalProperties": false, + "properties": { + "date": { + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "manuallyEntered": { + "type": "boolean" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CisVerification" - } - } - } + "matchInsteadOfVerify": { + "type": "boolean" + }, + "number": { + "nullable": true, + "type": "string" + }, + "taxStatus": { + "$ref": "#/components/schemas/CISTaxStatus" + }, + "verificationRequest": { + "description": "[readonly] If a Verification request has been made for this employee then this will show its ID", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "verificationResponse": { + "$ref": "#/components/schemas/CisSubContractor" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "CisVerification" - ], - "summary": "Delete CisVerificationRequest", - "description": "Deletes the CIS Verification Request.", - "operationId": "DeleteCisVerification", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.Address": { + "additionalProperties": false, + "properties": { + "country": { + "$ref": "#/components/schemas/Country" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "foreignCountry": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/employers/{employerId}/rti/cis-verification/{taxYear}/{id}/xml/request": { - "get": { - "tags": [ - "CisVerification" - ], - "summary": "Get XML Request", - "description": "Returns the XML request that was or will be sent to HMRC for this RTI document.\r\nAlthough the value is XML, it is returned as a JSON string.", - "operationId": "GetXmlRequestCisVerification", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "line1": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "line2": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/cis-verification/{taxYear}/{id}/submit": { - "post": { - "tags": [ - "CisVerification" - ], - "summary": "Submit CisVerificationRequest", - "description": "Submits an existing CIS Verification Request to HMRC.", - "operationId": "SubmitCisVerification", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "line3": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "line4": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "line5": { + "nullable": true, + "type": "string" }, - { - "name": "force", - "in": "query", - "description": "If the CisVerification has already been accepted then you will need to set this to true to force it to be resubmitted", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CisVerification" - } - } - } + "postCode": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/rti/cis-verification/{taxYear}/{id}/markasaccepted": { - "post": { - "tags": [ - "CisVerification" - ], - "summary": "Mark as Sent", - "description": "Marks a CIS Verification Request as having been sent to HMRC and accepted by them\r\nYou only use this method if the request has been submitted via an external system.\r\nIt will automatically be updated as Sent and/or Accepted if it's submitted via this API.", - "operationId": "MarkAsAcceptedCisVerification", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "Contract.AeAssessmentAction": { + "additionalProperties": false, + "properties": { + "action": { + "$ref": "#/components/schemas/AeAction" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "actionCompleted": { + "description": "Indicates whether or not the required action was successfully completed", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CisVerification" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/cis-verification/requiringattention": { - "get": { - "tags": [ - "CisVerification" - ], - "summary": "CisVerificationRequest Requiring Attention", - "description": "Returns all CIS Verification Requests that have a Submission Status of NotSubmitted or ErrorResponse", - "operationId": "RequiringAttentionCisVerification", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/costcentres": { - "get": { - "tags": [ - "CostCentre" - ], - "summary": "List Cost Centres", - "description": "Lists all Cost Centres for an Employer.", - "operationId": "IndexCostCentre", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list Cost Centres", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "actionCompletedMessage": { + "description": "Gives further information about the action taken or the reason if wasn't successfully completed", + "nullable": true, + "type": "string" + }, + "employeeState": { + "$ref": "#/components/schemas/AeEmployeeState" + }, + "letterNotYetSent": { + "description": "Indicates whether or not any required letter has been sent", + "type": "boolean" + }, + "pensionSchemeId": { + "description": "The PensionSchemeId that a completed action relates to", + "format": "uuid", + "type": "string" + }, + "requiredLetter": { + "$ref": "#/components/schemas/AeStatutoryLetter" + }, + "workerGroupId": { + "description": "The WorkerGroupId that a completed action relates to", + "format": "uuid", + "type": "string" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "CostCentre" - ], - "summary": "Create Cost Centre", - "description": "Creates a new CostCentre for the Employer.", - "operationId": "CreateCostCentre", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - } + "Contract.AeAssessmentRequest": { + "additionalProperties": false, + "description": "As part of AutoEnrolment we assess your Employees to see if they need to be auto-enroled in a Pension.\r\nThis model shows the result of an assessment.", + "properties": { + "assessmentDate": { + "format": "date", + "type": "string" } }, - "responses": { - "400": { - "description": "Bad Request" - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - } - } - } - } + "type": "object" }, - "put": { - "tags": [ - "CostCentre" - ], - "summary": "Update Cost Centre", - "description": "Updates a Cost Centre for the Employer.", - "operationId": "UpdateCostCentreCostCentre", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Cost Centre belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.AeAssessmentResponse": { + "additionalProperties": false, + "properties": { + "action": { + "$ref": "#/components/schemas/Contract.AeAssessmentAction" }, - { - "name": "code", - "in": "query", - "description": "The existing code of the Cost Centre you want to get.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "The new values for the Cost Centre you want to update", - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - } + "aeExclusionCode": { + "$ref": "#/components/schemas/AeExclusionCode" + }, + "age": { + "description": "The age of the Employee at the time of the assessment", + "format": "int32", + "type": "integer" + }, + "assessmentDate": { + "format": "date", + "type": "string" + }, + "earningsInPeriod": { + "format": "double", + "type": "number" + }, + "employee": { + "$ref": "#/components/schemas/Contract.EmployeeItem" + }, + "employeeState": { + "$ref": "#/components/schemas/AeEmployeeState" + }, + "id": { + "description": "The unique id of the object", + "format": "uuid", + "type": "string" + }, + "ordinal": { + "description": "The PaySchedule ordinal for the Employee at the time of the assessment", + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "qualifyingEarningsInPeriod": { + "format": "double", + "type": "number" + }, + "reason": { + "description": "The reason for determining the Status given.", + "nullable": true, + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/AeStatus" + }, + "ukWorker": { + "$ref": "#/components/schemas/AeUKWorker" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - } - } - } - } + "type": "object" }, - "delete": { - "tags": [ - "CostCentre" - ], - "summary": "Delete Cost Centre", - "description": "Deletes the specified Cost Centre.", - "operationId": "DeleteCostCentreCostCentre", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Cost Centre belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.AeEmployeeAssessmentHistoryRequest": { + "additionalProperties": false, + "properties": { + "action": { + "$ref": "#/components/schemas/AeAction" }, - { - "name": "code", - "in": "query", - "description": "The code of the Cost Centre you want to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "actionDate": { + "description": "The date when the action was applied, if applicable.", + "format": "date", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/costcentres/{code}": { - "get": { - "tags": [ - "CostCentre" - ], - "summary": "Get Cost Centre (deprecated)", - "description": "Gets the Cost Centres specified.\r\nUse the other GET endpoint that supports non-alphanumeric characters for a cost centre code", - "operationId": "GetCostCentre", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Department belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "age": { + "description": "The employee's age at the time of assessment.", + "format": "int32", + "type": "integer" }, - { - "name": "code", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - } - } + "assessmentDate": { + "description": "The actual date the assessment was performed.", + "format": "date", + "type": "string" + }, + "isJointAssessment": { + "description": "Is this a joint assessment with another role", + "type": "boolean" + }, + "isLatestVersion": { + "description": "Is the latest version of this assessment", + "type": "boolean" + }, + "isNewPension": { + "description": "Is this assessment resulting in a new pension", + "type": "boolean" + }, + "letter": { + "$ref": "#/components/schemas/AeLetter" + }, + "letterExternalDataProviderId": { + "$ref": "#/components/schemas/ExternalDataProviderId" + }, + "letterSentDate": { + "description": "The date the letter was sent to employee, if applicable.", + "format": "date", + "nullable": true, + "type": "string" + }, + "letterSentType": { + "$ref": "#/components/schemas/AeLetterSentType" + }, + "lowerEarningsThreshold": { + "description": "The Lower Earnings Threshold applicable for the assessment period.", + "format": "double", + "type": "number" + }, + "payRunId": { + "description": "The unique identifier of the Pay Run associated with this assessment.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "pensionId": { + "description": "The unique identifier of the pension associated with this assessment, if applicable.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "pensionSchemeId": { + "description": "The unique identifier of the pension scheme associated with this assessment, if applicable.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "periodEndDate": { + "description": "The end date of the pay reference period for which this assessment applies.", + "format": "date", + "type": "string" + }, + "periodStartDate": { + "description": "The start date of the pay reference period for which this assessment applies.", + "format": "date", + "type": "string" + }, + "qualifyingThreshold": { + "description": "The Qualifying Earnings Threshold (or Auto-Enrolment Trigger) applicable for the assessment period.", + "format": "double", + "type": "number" + }, + "reason": { + "$ref": "#/components/schemas/AeReason" + }, + "reenrolmentDate": { + "description": "Re-enrolment date if assessment occurs during re-enrolment period", + "format": "date", + "nullable": true, + "type": "string" + }, + "roleId": { + "description": "The unique identifier of the Role associated with this assessment.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/AeStatus" + }, + "version": { + "description": "The version of this assessment in the current pay run", + "format": "int32", + "type": "integer" + }, + "workerGroupId": { + "description": "The unique identifier of the worker group with this assessment, if applicable.", + "format": "uuid", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "CostCentre" - ], - "summary": "Update Cost Centre (deprecated)", - "description": "Updates a Cost Centre for the Employer.\r\nUse the other Update endpoint that supports non-alphanumeric characters for a cost centre code", - "operationId": "UpdateCostCentre", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.AeEmployeeAssessmentHistoryResponse": { + "additionalProperties": false, + "properties": { + "action": { + "$ref": "#/components/schemas/AeAction" }, - { - "name": "code", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - } + "actionDate": { + "description": "The date when the action was created", + "format": "date", + "nullable": true, + "type": "string" + }, + "age": { + "description": "Employee's age at the time of assessment", + "format": "int32", + "type": "integer" + }, + "assessmentDate": { + "description": "Assessment date", + "format": "date", + "type": "string" + }, + "employeeId": { + "description": "The employee ID associated with this assessment", + "format": "uuid", + "type": "string" + }, + "employeeRoleId": { + "description": "Employee role ID associated with this assessment, if applicable", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "endDate": { + "description": "End date of assessment period", + "format": "date", + "nullable": true, + "type": "string" + }, + "isNewPension": { + "description": "Is this assessment resulting in a new pension", + "type": "boolean" + }, + "letter": { + "$ref": "#/components/schemas/AeLetter" + }, + "letterExternalDataProviderId": { + "$ref": "#/components/schemas/ExternalDataProviderId" + }, + "letterSentDate": { + "description": "The Date the letter was sent, if applicable", + "format": "date", + "nullable": true, + "type": "string" + }, + "letterSentType": { + "$ref": "#/components/schemas/AeLetterSentType" + }, + "lowerEarningsThreshold": { + "description": "Lower earnings threshold for the assessment period", + "format": "double", + "type": "number" + }, + "payRunId": { + "description": "The pay run ID that triggered this assessment (optional)", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "pensionId": { + "description": "The unique identifier of the pension associated with this assessment, if applicable.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "pensionSchemeId": { + "description": "The unique identifier of the pension scheme associated with this assessment, if applicable.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "qualifyingThreshold": { + "description": "Qualifying threshold for the assessment period", + "format": "double", + "type": "number" + }, + "reEnrolmentDate": { + "description": "Re-enrolment date if assessment occurs during re-enrolment period", + "format": "date", + "nullable": true, + "type": "string" + }, + "reason": { + "$ref": "#/components/schemas/AeReason" + }, + "startDate": { + "description": "Start date of assessment period", + "format": "date", + "nullable": true, + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/AeStatus" + }, + "workerGroupId": { + "description": "The worker group ID associated with this assessment, if applicable.", + "format": "uuid", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - } - } - } - } + "type": "object" }, - "delete": { - "tags": [ - "CostCentre" - ], - "summary": "Delete Cost Centre (deprecated)", - "description": "Deletes the specified Cost Centre.\r\nUse the other Delete endpoint that supports non-alphanumeric characters for a cost centre code", - "operationId": "DeleteCostCentre", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.AeEmployeeLetterResponse": { + "additionalProperties": false, + "properties": { + "assessmentId": { + "description": "The assessment Id the letter is related to", + "format": "uuid", + "type": "string" }, - { - "name": "code", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "emailAddress": { + "description": "The employee email address", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/costcentres/costcentre": { - "get": { - "tags": [ - "CostCentre" - ], - "summary": "Get Cost Centre", - "description": "Gets the Cost Centres specified.", - "operationId": "GetCostCentreCostCentre", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Department belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employeeId": { + "description": "The employee ID", + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "code", - "in": "query", - "description": "The existing code of the Cost Centre you want to get.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostCentre" - } - } - } - } - } - } - }, - "/employers/{employerId}/departments": { - "get": { - "tags": [ - "Department" - ], - "summary": "List Departments", - "description": "Lists all Departments for an Employer.", - "operationId": "IndexDepartment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list Departments", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "employeeName": { + "description": "The employee name", + "nullable": true, + "type": "string" + }, + "employeeUniqueId": { + "description": "The employee uniqueId", + "format": "int32", + "type": "integer" + }, + "externalDataProviderId": { + "$ref": "#/components/schemas/ExternalDataProviderId" + }, + "isJointAssessment": { + "description": "If the assessment was a joint assessment", + "type": "boolean" + }, + "letterSentType": { + "$ref": "#/components/schemas/AeLetterSentType" + }, + "letterType": { + "$ref": "#/components/schemas/AeLetter" + }, + "payrollCode": { + "description": "The employee payroll code", + "nullable": true, + "type": "string" + }, + "period": { + "description": "The tax period in which the letter was generated", + "format": "int32", + "type": "integer" + }, + "roles": { + "description": "The roles associated with the letter", + "nullable": true, + "type": "string" + }, + "sentDate": { + "description": "The roles which generated the letter", + "format": "date", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "Department" - ], - "summary": "Create Department", - "description": "Creates a new Department for the Employer.", - "operationId": "CreateDepartment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - } + "Contract.AllowanceGradesRequest": { + "additionalProperties": false, + "properties": { + "allowanceGradeAnnualValue": { + "description": "FTE value of allowance grade", + "format": "double", + "type": "number" + }, + "allowanceGradeEffectiveDate": { + "description": "Effective date of the value", + "format": "date", + "type": "string" + }, + "allowanceGradePayslipText": { + "description": "Alternative text for display on the payslip (i.e. TLR1A)", + "nullable": true, + "type": "string" + }, + "allowanceName": { + "description": "Spine Allowance Name", + "nullable": true, + "type": "string" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "Contract.AllowanceGradesResponse": { + "additionalProperties": false, + "properties": { + "allowanceGradeAnnualValue": { + "description": "FTE value of allowance grade", + "format": "double", + "type": "number" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - } - } + "allowanceGradeEffectiveDate": { + "description": "Effective date of the value", + "format": "date", + "type": "string" }, - "404": { - "description": "Employer Not Found" - } - } - } - }, - "/employers/{employerId}/departments/{code}": { - "get": { - "tags": [ - "Department" - ], - "summary": "Get Department (deprecated)", - "description": "Gets the Department specified.\r\nUse the other GET endpoint that supports non-alphanumeric characters for a department code", - "operationId": "GetDepartment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Department belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "allowanceGradePayslipText": { + "description": "Alternative text for display on the payslip (i.e. TLR1A)", + "nullable": true, + "type": "string" }, - { - "name": "code", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - } - } - } - } - }, - "put": { - "tags": [ - "Department" - ], - "summary": "Update Department (deprecated)", - "description": "Updates a Department for the Employer.", - "operationId": "UpdateDepartment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "allowanceName": { + "description": "Spine Allowance Name", + "nullable": true, + "type": "string" }, - { - "name": "code", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - } + "uniqueId": { + "description": "Spine Allowance identifier", + "format": "uuid", + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - } - } + "type": "object" + }, + "Contract.AllowanceGradesUpdateRequest": { + "additionalProperties": false, + "properties": { + "allowanceGradeAnnualValue": { + "description": "FTE value of allowance grade", + "format": "double", + "type": "number" }, - "404": { - "description": "Employer Not Found" + "allowanceGradeEffectiveDate": { + "description": "Effective date of the value", + "format": "date", + "type": "string" + }, + "allowanceGradePayslipText": { + "description": "Alternative text for display on the payslip (i.e. TLR1A)", + "nullable": true, + "type": "string" + }, + "allowanceName": { + "description": "Spine Allowance Name", + "nullable": true, + "type": "string" + }, + "uniqueId": { + "description": "Allowance Grades identifier", + "format": "uuid", + "type": "string" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "Department" - ], - "summary": "Delete Department (deprecated)", - "description": "Deletes the specified Department.", - "operationId": "DeleteDepartment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.AnalysisCategoryCodeRequest": { + "additionalProperties": false, + "properties": { + "accountingCode": { + "nullable": true, + "type": "string" }, - { - "name": "code", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "code": { + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/departments/Department": { - "get": { - "tags": [ - "Department" - ], - "summary": "Get Department", - "description": "Gets the Department specified.", - "operationId": "GetDepartmentDepartment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Department belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "color": { + "nullable": true, + "type": "string" }, - { - "name": "code", - "in": "query", - "description": "The code of the Department you want to retrieve.", - "schema": { - "type": "string" - } + "title": { + "nullable": true, + "type": "string" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - } - } + }, + "type": "object" + }, + "Contract.AnalysisCategoryCodeResponse": { + "additionalProperties": false, + "properties": { + "accountingCode": { + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/departments/department": { - "put": { - "tags": [ - "Department" - ], - "summary": "Update Department", - "description": "Updates the details of an existing Department.", - "operationId": "UpdateDepartmentDepartment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "code": { + "nullable": true, + "type": "string" }, - { - "name": "code", - "in": "query", - "schema": { - "type": "string" - } + "color": { + "nullable": true, + "type": "string" + }, + "id": { + "description": "Analysis Category Code identifier", + "format": "uuid", + "type": "string" + }, + "title": { + "nullable": true, + "type": "string" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - } + }, + "type": "object" + }, + "Contract.AnalysisCategoryRequest": { + "additionalProperties": false, + "properties": { + "name": { + "description": "Analysis Category Name", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Department" - } - } - } + "type": "object" + }, + "Contract.AnalysisCategoryResponse": { + "additionalProperties": false, + "properties": { + "id": { + "description": "Analysis Category identifier", + "format": "uuid", + "type": "string" }, - "404": { - "description": "Not Found" + "name": { + "description": "Analysis Category Name", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "Department" - ], - "summary": "Delete Department", - "description": "Deletes the specified Department.", - "operationId": "DeleteDepartmentDepartment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.AutoEnrolmentRequest": { + "additionalProperties": false, + "properties": { + "aeExclusionCode": { + "$ref": "#/components/schemas/AeExclusionCode" }, - { - "name": "code", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "aePostponementLetterSent": { + "type": "boolean" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/dps/notices": { - "post": { - "tags": [ - "Dps" - ], - "summary": "Check for new Notices", - "description": "Checks with HMRC for new notices. Returns an integer showing how many new notices were found", - "operationId": "CheckForNoticesDps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } + "daysToDeferAssessment": { + "description": "The number of days, if any, to defer assessment of this employee.\r\nYou're allowed to defer assessment of new employees by up to 3 months.", + "format": "int32", + "type": "integer" + }, + "deferByMonthsNotDays": { + "description": "If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days", + "type": "boolean" + }, + "exempt": { + "type": "boolean" + }, + "lastAssessment": { + "$ref": "#/components/schemas/Contract.AeAssessmentRequest" + }, + "ukWorker": { + "$ref": "#/components/schemas/AeUKWorker" } - } + }, + "type": "object" }, - "get": { - "tags": [ - "Dps" - ], - "summary": "List Notices", - "description": "Lists DPS Notices.", - "operationId": "ListNoticesDps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.AutoEnrolmentResponse": { + "additionalProperties": false, + "properties": { + "aeExclusionCode": { + "$ref": "#/components/schemas/AeExclusionCode" }, - { - "name": "pageNum", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "aePostponementLetterSent": { + "type": "boolean" }, - { - "name": "pageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "daysToDeferAssessment": { + "description": "The number of days, if any, to defer assessment of this employee.\r\nYou're allowed to defer assessment of new employees by up to 3 months.", + "format": "int32", + "type": "integer" + }, + "deferByMonthsNotDays": { + "description": "If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days", + "type": "boolean" + }, + "exempt": { + "type": "boolean" + }, + "lastAssessment": { + "$ref": "#/components/schemas/Contract.AeAssessmentResponse" + }, + "postponementDate": { + "description": "[readonly] If a value is present, then employee wont be enrolled on an AE Pension until after this date.\r\nThis is automatically set to a date if the employee is deemed to be an EligibleJobHolder, but the employer has set a Postponement period and this value is currently null\r\nThis is automatically set to null if it already has a value and the employee is deemed NOT to be an EligibleJobHolder - ie, they previously qualified but now do not.", + "format": "date", + "nullable": true, + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/AeEmployeeState" + }, + "stateDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "ukWorker": { + "$ref": "#/components/schemas/AeUKWorker" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "Dps" - ], - "summary": "Delete All Notices", - "operationId": "DeleteAllDps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer that you want to delete all notices for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "Contract.AutoEnrolmentSettingsRequest": { + "additionalProperties": false, + "properties": { + "cyclicalReenrolmentDate": { + "format": "date", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/dps/notices/xml": { - "post": { - "tags": [ - "Dps" - ], - "summary": "Parse notices from XML", - "description": "Checks the supplied XML string for notices. They're then processed in the same was as if received from HMRC.\r\nOnly used for testing the parsing of DPS XML.\r\nReturns an integer showing how many new notices were found", - "operationId": "ParseXmlDps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "type": "string" - } - }, - "text/json": { - "schema": { - "type": "string" - } - }, - "application/*+json": { - "schema": { - "type": "string" - } - } + "daysToDeferAssessment": { + "description": "The number of days, if any, to defer assessment of new employees.\r\nYou're allowed to defer assessment of new employees by up to 3 months.\r\nThis is the default value used when you create a new employee. It can be changed on a per-employee basis.", + "format": "int32", + "type": "integer" + }, + "defaultPension": { + "$ref": "#/components/schemas/Contract.PensionSelectionRequest" + }, + "deferByMonthsNotDays": { + "description": "If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days", + "type": "boolean" + }, + "deferEnrolmentBy": { + "description": "The number of days )or weeks, or months), if any, to defer enrolment of employees that are Eligible Jobholders.\r\nFor example, if this is set to 30 days then if an employee meets the criteria for enrolment then they'll only be enrolled if they still meet the criteria 30 days later", + "format": "int32", + "type": "integer" + }, + "deferEnrolmentByPeriodType": { + "$ref": "#/components/schemas/DeferalPeriodType" + }, + "exemptFromAeRegulations": { + "description": "Indicates if an employer is exempt from normal AE regulations", + "type": "boolean" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "type": "string" + }, + "includeNonPensionedEmployeesInSubmission": { + "description": "Whether or not to include details of non-pensioned employees in your submissions to this provider", + "type": "boolean" + }, + "pensionSameAsDefault": { + "type": "boolean" + }, + "previousCyclicalReenrolmentDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "stagingDate": { + "format": "date", + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - } - } - }, - "/employers/{employerId}/dps/notices/{id}": { - "get": { - "tags": [ - "Dps" - ], - "summary": "Get Notice", - "description": "Returns the specified DPS Notice.", - "operationId": "GetDps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "id", - "in": "path", - "description": "The Id of the DpsNotice you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DpsNotice" - } - } - } - } - } + "type": "object" }, - "put": { - "tags": [ - "Dps" - ], - "summary": "Apply Notice", - "description": "Applies the specified DPS Notice.", - "operationId": "ApplyDps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.AutoEnrolmentSettingsResponse": { + "additionalProperties": false, + "properties": { + "cyclicalReenrolmentDate": { + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the DpsNotice you want to apply.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DpsNotice" - } - } - } + "daysToDeferAssessment": { + "description": "The number of days, if any, to defer assessment of new employees.\r\nYou're allowed to defer assessment of new employees by up to 3 months.\r\nThis is the default value used when you create a new employee. It can be changed on a per-employee basis.", + "format": "int32", + "type": "integer" }, - "400": { - "description": "Bad Request" + "defaultPension": { + "$ref": "#/components/schemas/Contract.PensionSelectionResponse" }, - "404": { - "description": "Not Found" - } - } - }, - "delete": { - "tags": [ - "Dps" - ], - "summary": "Delete Notice", - "operationId": "DeleteDps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the DpsNotice belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "deferByMonthsNotDays": { + "description": "If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The Id of the DsNotice you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "deferEnrolmentBy": { + "description": "The number of days )or weeks, or months), if any, to defer enrolment of employees that are Eligible Jobholders.\r\nFor example, if this is set to 30 days then if an employee meets the criteria for enrolment then they'll only be enrolled if they still meet the criteria 30 days later", + "format": "int32", + "type": "integer" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/dps/settings": { - "get": { - "tags": [ - "Dps" - ], - "summary": "Get DPS Settings", - "description": "Returns the DpsSettings for the Employer", - "operationId": "GetDpsSettingsDps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DpsSettings" - } - } - } + "deferEnrolmentByPeriodType": { + "$ref": "#/components/schemas/DeferalPeriodType" + }, + "exemptFromAeRegulations": { + "description": "Indicates if an employer is exempt from normal AE regulations", + "type": "boolean" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "includeNonPensionedEmployeesInSubmission": { + "description": "Whether or not to include details of non-pensioned employees in your submissions to this provider", + "type": "boolean" + }, + "pensionSameAsDefault": { + "type": "boolean" + }, + "previousCyclicalReenrolmentDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "stagingDate": { + "format": "date", + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Dps" - ], - "summary": "Update DPS Settings", - "description": "Updates the DpsSettings for the Employer", - "operationId": "UpdateDpsSettingsDps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/DpsSettings" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/DpsSettings" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DpsSettings" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DpsSettings" - } - } + "Contract.BankDetails": { + "additionalProperties": false, + "properties": { + "accountName": { + "nullable": true, + "type": "string" + }, + "accountNumber": { + "nullable": true, + "type": "string" + }, + "bankBranch": { + "nullable": true, + "type": "string" + }, + "bankName": { + "nullable": true, + "type": "string" + }, + "bankReference": { + "nullable": true, + "type": "string" + }, + "buildingSocietyRollNumber": { + "nullable": true, + "type": "string" + }, + "note": { + "nullable": true, + "type": "string" + }, + "sortCode": { + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DpsSettings" - } - } - } - } - } - } - }, - "/employers/{employerId}/dps/reapply": { - "put": { - "tags": [ - "Dps" - ], - "summary": "Reapply DpsNotices", - "description": "From a specified date onwards, reapply DpsNotices", - "operationId": "ReapplyNoticesDps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "Contract.BenefitCarImportRequest": { + "additionalProperties": false, + "properties": { + "availableFrom": { + "description": "Date the car benefit became available", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "appliedFromDate", - "in": "query", - "description": "The date from which to apply DpsNotices", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.ReapplyDpsNoticeResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/email": { - "get": { - "tags": [ - "Email" - ], - "summary": "List Emails", - "description": "Returns a list of all emails sent for this Employer.", - "operationId": "IndexEmail", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "availableTo": { + "description": "Date the car benefit ended", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "pageNum", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "co2Emissions": { + "description": "CO2 emissions value", + "format": "int32", + "type": "integer" }, - { - "name": "pageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/email/{emailId}": { - "get": { - "tags": [ - "Email" - ], - "summary": "Get Email", - "description": "Returns the email along with its status.", - "operationId": "GetEmailEmail", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "daysUnavailable": { + "description": "Total number of days the vehicle was unavailable", + "format": "int32", + "type": "integer" }, - { - "name": "emailId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerEmail" - } - } - } + "employeeCapitalContributions": { + "description": "Employee's capital contribution", + "format": "double", + "type": "number" + }, + "employeePrivateContributions": { + "description": "Employee's private contributions", + "format": "double", + "type": "number" + }, + "engineSize": { + "description": "Engine size value", + "format": "int32", + "type": "integer" + }, + "firstRegistered": { + "description": "Date the vehicle was first registered", + "format": "date", + "nullable": true, + "type": "string" + }, + "freeFuel": { + "description": "Indicates if free fuel is provided", + "type": "boolean" + }, + "freeFuelReinstated": { + "description": "Whether the free fuel benefit was reinstated", + "type": "boolean" + }, + "fuelAvailableFrom": { + "description": "Date free fuel benefit started", + "format": "date", + "nullable": true, + "type": "string" + }, + "fuelAvailableTo": { + "description": "Date free fuel benefit ended", + "format": "date", + "nullable": true, + "type": "string" + }, + "fuelType": { + "$ref": "#/components/schemas/BenefitDetailsCarPowerType" + }, + "hasApprovedEmissionsValue": { + "description": "Indicates if CO2 emissions data is approved", + "type": "boolean" + }, + "listPrice": { + "description": "Original list price of the vehicle", + "format": "double", + "type": "number" + }, + "makeAndModel": { + "description": "Car make and model name", + "nullable": true, + "type": "string" + }, + "nonStandardAccessories": { + "description": "Cost of any non-standard accessories", + "format": "double", + "type": "number" + }, + "registration": { + "description": "Vehicle registration number", + "nullable": true, + "type": "string" + }, + "zeroEmissionsMileage": { + "description": "Mileage driven in zero-emission mode.\r\nApplicable only for Electric, Hybrid, and Petrol/Other fuel types.", + "format": "int32", + "type": "integer" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "Email" - ], - "summary": "Re-send Email", - "description": "Re-send an existing email.", - "operationId": "ResendEmailEmail", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.BenefitImportRequest": { + "additionalProperties": false, + "properties": { + "assetType": { + "$ref": "#/components/schemas/BenefitDetailsAssetType" }, - { - "name": "emailId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerEmail" - } - } - } - } - } - } - }, - "/employers/{employerId}/email/settings": { - "get": { - "tags": [ - "Email" - ], - "summary": "Get MailSettings", - "description": "Returns the MailSettings for an Employer.", - "operationId": "GetMailSettingsEmail", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MailSettings" - } - } - } - } - } - }, - "put": { - "tags": [ - "Email" - ], - "summary": "Update MailSettings", - "description": "Updates the MailSettings for an Employer.", - "operationId": "UpdateMailSettingsEmail", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/MailSettings" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/MailSettings" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/MailSettings" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/MailSettings" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MailSettings" - } - } - } - } - } - } - }, - "/employers/{employerId}/email/settings/test": { - "post": { - "tags": [ - "Email" - ], - "summary": "Send Test Email", - "description": "This API call will generate a test email based on your MailSettings.", - "operationId": "TestMailSettingsEmail", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "car": { + "$ref": "#/components/schemas/Contract.BenefitCarImportRequest" }, - { - "name": "email", - "in": "query", - "description": "The address to send a test email to", - "schema": { - "type": "string" - } - } - ], - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerEmail" - } - } - } - } - } - } - }, - "/employers/{employerId}/email/settings/verify": { - "post": { - "tags": [ - "Email" - ], - "summary": "Email Verification (Request)", - "description": "If the user attempts to use a non-verified email address in their MailSettings then we'll send them a verification email.\r\nThis API endpoint can be used to re-send the email.", - "operationId": "VerifyMailSettingsEmail", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - }, - "put": { - "tags": [ - "Email" - ], - "summary": "Email Verification (Respond)", - "description": "Used to process the link sent in an email to verify an email address that's being used in MailSettings.", - "operationId": "VerifyMailSettingsResponseEmail", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The employer Id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "cashEquivalentFuel": { + "description": "Only relevant to Benefits with Type Vans", + "format": "double", + "type": "number" }, - { - "name": "u", - "in": "query", - "description": "The value from the link in the email.", - "schema": { - "type": "string", - "format": "uuid" - } + "class1AType": { + "$ref": "#/components/schemas/BenefitDetailsClass1AType" }, - { - "name": "k", - "in": "query", - "description": "The value from the link in the email.", - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } - } - } - } - }, - "/employers/{employerId}/employees": { - "post": { - "tags": [ - "Employee" - ], - "summary": "Create a new Employee", - "description": "Creates an Employee for the Employer specified.\r\nIf you don't provide PayOptions then the DefaultPayOptions from the Employer will be used", - "operationId": "CreateEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer you are creating the Employee for", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.CreateEmployeeRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.CreateEmployeeRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.CreateEmployeeRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.CreateEmployeeRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeResponse" - } - } - } + "declarationType": { + "$ref": "#/components/schemas/BenefitDeclarationType" }, - "400": { - "description": "Bad Request" + "description": { + "description": "A description of this benefit", + "nullable": true, + "type": "string" }, - "409": { - "description": "Conflict" + "employeeContribution": { + "description": "Amount contributed by the employee.", + "format": "double", + "type": "number" }, - "404": { - "description": "Employer Not Found" - } - } - }, - "get": { - "tags": [ - "Employee" - ], - "summary": "List Employees", - "operationId": "IndexEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to see Employees", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "endDate": { + "description": "End date for imported benefit", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "pageNum", - "in": "query", - "description": "Zero-based page number, used in conjunction with pageSize", - "schema": { - "type": "integer", - "format": "int32" - } + "isPeriodValue": { + "description": "To be used for the benefit period", + "type": "boolean" }, - { - "name": "pageSize", - "in": "query", - "description": "The number of items per page", - "schema": { - "type": "integer", - "format": "int32" - } + "loan": { + "$ref": "#/components/schemas/Contract.BenefitLoanImportRequest" }, - { - "name": "status", - "in": "query", - "description": "Restrict the results to employees with the given status", - "schema": { - "$ref": "#/components/schemas/EmployeeStatus" - } + "nonClass1AType": { + "$ref": "#/components/schemas/BenefitDetailsNonClass1AType" }, - { - "name": "deptCode", - "in": "query", - "description": "If specified then only employees assigned to this department code will be listed", - "schema": { - "type": "string" - } + "openingBalance": { + "description": "The amount of benefit paid YTD when setting up a benefit", + "format": "double", + "type": "number" }, - { - "name": "pensionSchemeId", - "in": "query", - "description": "If specified then only employees enrolled into the given pension scheme will be listed.\r\n If empty guid(00000000-0000-0000-0000-000000000000) is passed in all employees not enrolled into any pension scheme will be listed.", - "schema": { - "type": "string", - "format": "uuid" - } + "overrideOpeningBalance": { + "description": "To be used to change the opening balance if the benefit has been payrolled", + "type": "boolean" }, - { - "name": "sortBy", - "in": "query", - "description": "Specifies the field by which to sort the employees. Default is EmployeeSortBy.None.", - "schema": { - "$ref": "#/components/schemas/EmployeeSortBy" - } + "paymentType": { + "$ref": "#/components/schemas/BenefitDetailsPaymentType" }, - { - "name": "sortDescending", - "in": "query", - "description": "Specifies whether the sorting should be in descending order. Default is false.", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/import": { - "post": { - "tags": [ - "Employee" - ], - "summary": "Import CSV", - "description": "Import employee data from a CSV file.", - "operationId": "ImportCsvEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "payrollCode": { + "description": "The payroll code of the employee to update", + "nullable": true, + "type": "string" }, - { - "name": "format", - "in": "query", - "description": "The format of the CSV file.", - "schema": { - "$ref": "#/components/schemas/CsvFileFormat" - } + "startDate": { + "description": "Start date for imported benefit", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "previewOnly", - "in": "query", - "description": "Set to true and nothing will be imported but you'll be shown a preview of the data.", - "schema": { - "type": "boolean", - "default": false - } + "taxYear": { + "$ref": "#/components/schemas/TaxYear" }, - { - "name": "allowUpdates", - "in": "query", - "description": "Set to true and if the payroll code matches an existing employee then that employee will be updated.", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "tradingOrganisation": { + "description": "Only relevant to Benefits with Type Entertainment", + "type": "boolean" }, - "409": { - "description": "Conflict" - } - } - } - }, - "/employers/{employerId}/employees/{id}": { - "get": { - "tags": [ - "Employee" - ], - "summary": "Get an Employee", - "operationId": "GetEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": { + "$ref": "#/components/schemas/BenefitType" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeResponse" - } - } - } + "uniqueId": { + "description": "Optional. If value is provided then update else create benefit.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "useOfAssetType": { + "$ref": "#/components/schemas/BenefitDetailsUseOfAssetType" + }, + "useProRata": { + "description": "Benefit calculation should be done on pro rata rules", + "type": "boolean" + }, + "value": { + "description": "The total value of the benefit.", + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Employee" - ], - "summary": "Update an Employee", - "operationId": "UpdateEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.BenefitLoanImportRequest": { + "additionalProperties": false, + "properties": { + "closingBalance": { + "description": "Loan amount at the end of the year", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee you want to update.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.UpdateEmployeeRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.UpdateEmployeeRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.UpdateEmployeeRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.UpdateEmployeeRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeResponse" - } - } - } + "interestPaid": { + "description": "Interest amount paid by the employee", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "loanDischarged": { + "description": "Date when the loan ended", + "format": "date", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "loanMade": { + "description": "Date when the loan started", + "format": "date", + "nullable": true, + "type": "string" }, - "409": { - "description": "Conflict" + "maxBalanceInYear": { + "description": "Highest loan balance during the year", + "format": "double", + "type": "number" + }, + "numberOfJointBorrowers": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "startingBalance": { + "description": "Loan amount at the start of the year", + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "Employee" - ], - "summary": "Delete an Employee", - "operationId": "DeleteEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.CisDetailsRequest": { + "additionalProperties": false, + "properties": { + "companyNumber": { + "maxLength": 20, + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "companyUtr": { + "maxLength": 20, + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/employees/{id}/rehire": { - "get": { - "tags": [ - "Employee" - ], - "summary": "Rehire an Employee", - "description": "If an employee has left and you want to rehire him/her, then this method will create a copy of the employee record but with a new payroll code", - "operationId": "ReHireEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "reverseChargeVAT": { + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee you want to rehire.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "201": { - "description": "Created" - } - } - } - }, - "/employers/{employerId}/employees/delete": { - "post": { - "tags": [ - "Employee" - ], - "summary": "Delete Employees", - "description": "Used to delete multiple employees.\r\nThe body should contain an array of Ids to identify the employees to delete.", - "operationId": "DeleteMultipleEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employees belong", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } - } - }, - "responses": { - "204": { - "description": "No Content" + "tradingName": { + "maxLength": 200, + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "type": { + "$ref": "#/components/schemas/CISSubContractorType" }, - "409": { - "description": "Conflict" - } - } - } - }, - "/employers/{employerId}/employees/leavers": { - "put": { - "tags": [ - "Employee" - ], - "summary": "Mark as Leavers", - "description": "Used to mark multiple employees as leavers.\r\nThe body should contain an array of Ids to identify the employees to update.", - "operationId": "MarkAsLeaversEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employees belong", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "utr": { + "maxLength": 20, + "nullable": true, + "type": "string" }, - { - "name": "date", - "in": "query", - "description": "The date the employees left or are leaving", - "schema": { - "type": "string", - "format": "date-time" - } + "vatNumber": { + "maxLength": 20, + "nullable": true, + "type": "string" }, - { - "name": "emailP45", - "in": "query", - "description": "If set to true, the employee will be email a P45 if they have an email address", - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success" + "vatRate": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "vatRegistered": { + "type": "boolean" }, - "409": { - "description": "Conflict" + "verification": { + "$ref": "#/components/schemas/Contract.CisVerificationDetailsRequest" } - } + }, + "type": "object" }, - "get": { - "tags": [ - "Employee" - ], - "summary": "List Leavers", - "description": "Returns a list of all Employees that have a leaving date set", - "operationId": "LeaversEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to see Leavers", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.CisDetailsResponse": { + "additionalProperties": false, + "properties": { + "companyNumber": { + "maxLength": 20, + "nullable": true, + "type": "string" }, - { - "name": "onlyUnsentP45s", - "in": "query", - "description": "If set to true then only employees that don't have the P45Sent set to true will be returned", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/onhold": { - "put": { - "tags": [ - "Employee" - ], - "summary": "Mark as On Hold", - "description": "Used to mark multiple employees as On Hold or not On Hold.\r\nThe body should contain an array of Ids to identify the employees to update.", - "operationId": "SetOnHoldEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employees belong", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "companyUtr": { + "maxLength": 20, + "nullable": true, + "type": "string" }, - { - "name": "onHold", - "in": "query", - "description": "The OnHold status to set", - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success" + "reverseChargeVAT": { + "type": "boolean" }, - "400": { - "description": "Bad Request" + "tradingName": { + "maxLength": 200, + "nullable": true, + "type": "string" }, - "409": { - "description": "Conflict" - } - } - } - }, - "/employers/{employerId}/employees/{id}/photo": { - "post": { - "tags": [ - "Employee" - ], - "summary": "Update Photo", - "description": "If you already have a URL for the employee photo then you can just set the PhotoUrl property of the Employee.\r\nAlternatively, submit an image here and we'll upload it, resize it to 200px squared and set the PhotoUrl for you.", - "operationId": "UpdatePhotoEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": { + "$ref": "#/components/schemas/CISSubContractorType" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee you want to update.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } + "utr": { + "maxLength": 20, + "nullable": true, + "type": "string" + }, + "vatNumber": { + "maxLength": 20, + "nullable": true, + "type": "string" + }, + "vatRate": { + "format": "double", + "type": "number" + }, + "vatRegistered": { + "type": "boolean" + }, + "verification": { + "$ref": "#/components/schemas/Contract.CisVerificationDetailsResponse" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeResponse" - } - } - } - } - } + "type": "object" }, - "delete": { - "tags": [ - "Employee" - ], - "summary": "Delete Photo", - "operationId": "DeletePhotoEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.CisPartnership": { + "additionalProperties": false, + "description": "If an Employee is marked as a CIS Subcontractor and is registered as a Partnership then this model provides further details specifically related to the CIS Partnership.", + "properties": { + "name": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee you want to update.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "utr": { + "nullable": true, + "type": "string" } - ], - "responses": { - "204": { - "description": "No Content" + }, + "type": "object" + }, + "Contract.CisSubContractor": { + "additionalProperties": false, + "properties": { + "action": { + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/search": { - "get": { - "tags": [ - "Employee" - ], - "summary": "Search Employer for Employees", - "description": "Search for an employee of the specified employer based on their name or payroll code.\r\nEnsure your query is at least 3 characters long or you wont get any results.", - "operationId": "SearchEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to search.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "address": { + "$ref": "#/components/schemas/Contract.RtiEmployeeAddress" }, - { - "name": "query", - "in": "query", - "description": "The search string (at least 3 characters).", - "schema": { - "type": "string" - } + "costOfMaterials": { + "nullable": true, + "type": "string" }, - { - "name": "exludeCisSubContactors", - "in": "query", - "description": "If set to true, then we'll only search employees that aren't labelled as CIS Subcontractors", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/expiring-rtw": { - "get": { - "tags": [ - "Employee" - ], - "summary": "Expiring RightToWork", - "description": "Returns a list of Item representing Employees that have a RightToWork with a DocumentExpiring date within the next numberOfDays days.", - "operationId": "ExpiringRtwEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to search.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "costOfMaterialsUnrounded": { + "nullable": true, + "type": "string" }, - { - "name": "numberOfDays", - "in": "query", - "description": "The number of days in the future to look got expiry dates.", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/search/payrollcode": { - "get": { - "tags": [ - "Employee" - ], - "summary": "Get Employee by Payroll Code", - "description": "Get an employee by their payroll code. Will return an Item that contains the Id for you to retrieve the full Employee record", - "operationId": "SearchByPayrollCodeEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "crn": { + "nullable": true, + "type": "string" }, - { - "name": "code", - "in": "query", - "description": "The payroll code to look for.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{id}/payrunentries/{taxYear}": { - "get": { - "tags": [ - "Employee" - ], - "summary": "PayRunEntries for Employee", - "description": "List PayRunEntries for the given Employee in the specified TaxYear", - "operationId": "PayRunEntriesEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to search.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "displayName": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Employee Id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "emailStatementTo": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear for which you want to list PayRunEntries.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{id}/awe": { - "get": { - "tags": [ - "Employee" - ], - "summary": "Average Weekly Earnings", - "description": "Calculates the Average Weekly Earnings for an Employee at the given date.\r\nYou can optionally include a LeaveType and we'll adjust the given date accordingly\r\nFor example if you specify Maternity then it'll be moved back by 15 weeks", - "operationId": "AverageWeeklyEarningsEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employeeUniqueId": { + "format": "uuid", + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Employee Id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "item": { + "$ref": "#/components/schemas/Contract.CisSubContractorItem" }, - { - "name": "date", - "in": "query", - "description": "The date at which you want to calculate the earnings from.", - "schema": { - "type": "string", - "format": "date-time" - } + "matched": { + "nullable": true, + "type": "string" }, - { - "name": "leaveType", - "in": "query", - "description": "", - "schema": { - "$ref": "#/components/schemas/LeaveType" - } + "name": { + "$ref": "#/components/schemas/Contract.RtiEmployeeName" }, - { - "name": "secondaryDate", - "in": "query", - "description": "", - "schema": { - "type": "string", - "format": "date-time" - } + "netPayment": { + "nullable": true, + "type": "string" }, - { - "name": "tertiaryDate", - "in": "query", - "description": "", - "schema": { - "type": "string", - "format": "date-time" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AverageWeeklyEarnings" - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{id}/basehourlyrate": { - "get": { - "tags": [ - "Employee" - ], - "summary": "Calculate Base Hourly Rate (deprecated)", - "operationId": "BaseHourlyRateEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "nino": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Employee Id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "numberOfPayments": { + "format": "int32", + "type": "integer" }, - { - "name": "payPeriod", - "in": "query", - "description": "The frequency that this Employee is paid.", - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "partnership": { + "$ref": "#/components/schemas/Contract.CisPartnership" }, - { - "name": "payBasis", - "in": "query", - "description": "", - "schema": { - "$ref": "#/components/schemas/PayBasis" - } + "taxTreatment": { + "nullable": true, + "type": "string" }, - { - "name": "payAmount", - "in": "query", - "description": "The amount the Employee is regularly paid each period.", - "schema": { - "type": "number", - "format": "double" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "number", - "format": "double" - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{id}/basedailyrate": { - "get": { - "tags": [ - "Employee" - ], - "summary": "Calculate Base Daily Rate (deprecated)", - "operationId": "BaseDailyRateEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "telephone": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Employee Id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "totalDeducted": { + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "query", - "description": "The frequency that this Employee is paid.", - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "totalPayments": { + "nullable": true, + "type": "string" }, - { - "name": "payBasis", - "in": "query", - "description": "", - "schema": { - "$ref": "#/components/schemas/PayBasis" - } + "totalPaymentsUnrounded": { + "nullable": true, + "type": "string" }, - { - "name": "payAmount", - "in": "query", - "description": "The amount the Employee is regularly paid each period.", - "schema": { - "type": "number", - "format": "double" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "number", - "format": "double" - } - } - } + "tradingName": { + "nullable": true, + "type": "string" + }, + "type": { + "nullable": true, + "type": "string" + }, + "umbrellaFee": { + "nullable": true, + "type": "string" + }, + "unmatchedRate": { + "nullable": true, + "type": "string" + }, + "utr": { + "nullable": true, + "type": "string" + }, + "validationMsg": { + "nullable": true, + "type": "string" + }, + "verificationNumber": { + "nullable": true, + "type": "string" + }, + "worksRef": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/employees/{id}/{taxYear}/minimum-wage": { - "get": { - "tags": [ - "Employee" - ], - "summary": "Minimum Wage", - "description": "Calculates the National Minimum Wage for this employee for the given TaxYear and based on\r\ntheir age at the given date", - "operationId": "MinimumWageEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "Contract.CisSubContractorItem": { + "additionalProperties": false, + "properties": { + "id": { + "format": "uuid", + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Employee Id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "metadata": { + "nullable": true }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "name": { + "nullable": true, + "type": "string" }, - { - "name": "date", - "in": "query", - "description": "The date for which we should calculate the employees age, for not provided we'll use today's date.", - "schema": { - "type": "string", - "format": "date-time" - } + "url": { + "nullable": true, + "type": "string" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "number", - "format": "double" - } - } - } + }, + "type": "object" + }, + "Contract.CisVerificationDetailsRequest": { + "additionalProperties": false, + "properties": { + "date": { + "format": "date", + "nullable": true, + "type": "string" + }, + "manuallyEntered": { + "type": "boolean" + }, + "matchInsteadOfVerify": { + "type": "boolean" + }, + "number": { + "nullable": true, + "type": "string" + }, + "taxStatus": { + "$ref": "#/components/schemas/CISTaxStatus" + }, + "verificationResponse": { + "$ref": "#/components/schemas/Contract.CisSubContractor" } - } - } - }, - "/employers/{employerId}/employees/payoptions": { - "put": { - "tags": [ - "Employee" - ], - "summary": "Apply PayOptions", - "description": "Overwrite the PayOptions for all employees with the values provided.\r\nCurrently only the following fields are updated: period, payAmount, basis, payamountMultiplier, nationalMinimumWage and regularPaylines.", - "operationId": "ApplyPayOptionsEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the employees belong.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "Contract.CisVerificationDetailsResponse": { + "additionalProperties": false, + "properties": { + "date": { + "format": "date", + "nullable": true, + "type": "string" + }, + "manuallyEntered": { + "type": "boolean" + }, + "matchInsteadOfVerify": { + "type": "boolean" + }, + "number": { + "nullable": true, + "type": "string" + }, + "taxStatus": { + "$ref": "#/components/schemas/CISTaxStatus" + }, + "verificationRequest": { + "description": "If a Verification request has been made for this employee then this will show its ID", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "verificationResponse": { + "$ref": "#/components/schemas/Contract.CisSubContractor" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PayOptions" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayOptions" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PayOptions" - } + }, + "type": "object" + }, + "Contract.CombinedPensionContributionsReportRequest": { + "additionalProperties": false, + "properties": { + "effectiveDateFrom": { + "format": "date", + "type": "string" + }, + "effectiveDateTo": { + "format": "date", + "type": "string" + }, + "payScheduleSelections": { + "items": { + "$ref": "#/components/schemas/Contract.PayPeriodOrdinalSelection" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PayOptions" - } - } + "nullable": true, + "type": "array" + }, + "pensionSchemeId": { + "format": "uuid", + "type": "string" + }, + "reportFormat": { + "$ref": "#/components/schemas/ReportFormat" } }, - "responses": { - "200": { - "description": "Success" + "type": "object" + }, + "Contract.CostCentreJournalOverridesRequest": { + "additionalProperties": false, + "properties": { + "journalTokenPublicId": { + "description": "Journal Token Public Id", + "format": "uuid", + "type": "string" }, - "409": { - "description": "Conflict" + "mapping": { + "description": "CostCentre Journal Overrides Mapping", + "nullable": true, + "type": "string" + }, + "tokenDescription": { + "description": "Token Description", + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/employees/payincrease": { - "put": { - "tags": [ - "Employee" - ], - "summary": "Apply Pay Increase", - "description": "Increases the PayOptions.PayAmount and PayOptions.BaseHourlyRate by the percentage given.", - "operationId": "ApplyPayIncreaseEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the employees belong.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "Contract.CostCentreJournalOverridesResponse": { + "additionalProperties": false, + "properties": { + "journalTokenPublicId": { + "description": "Journal Token Public Id", + "format": "uuid", + "type": "string" }, - { - "name": "percentage", - "in": "query", - "schema": { - "type": "number", - "format": "double" - } + "mapping": { + "description": "CostCentre Journal Overrides Mapping", + "nullable": true, + "type": "string" }, - { - "name": "allEmployees", - "in": "query", - "description": "Set this to true", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "Success" + "tokenDescription": { + "description": "Token Description", + "nullable": true, + "type": "string" }, - "409": { - "description": "Conflict" + "uniqueId": { + "description": "Cost Centre Journal Overrides identifier", + "format": "uuid", + "type": "string" } - } - } - }, - "/employers/{employerId}/employees/{id}/departments": { - "get": { - "tags": [ - "Employee" - ], - "summary": "Get Employee Departments", - "operationId": "GetDepartmentMembershipsEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "Contract.CostCentreJournalOverridesResponseItem": { + "additionalProperties": false, + "properties": { + "id": { + "format": "uuid", + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee you want to retrieve Departments for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DepartmentMembership" - } - } - } - } + "metadata": { + "nullable": true + }, + "name": { + "nullable": true, + "type": "string" + }, + "url": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Employee" - ], - "summary": "Set Employee Departments", - "operationId": "SetDepartmentMembershipsEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.CostCentreJournalOverridesUpdateRequest": { + "additionalProperties": false, + "properties": { + "journalTokenPublicId": { + "description": "Journal Token Public Id", + "format": "uuid", + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee you want to set Departments for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "mapping": { + "description": "CostCentre Journal Overrides Mapping", + "nullable": true, + "type": "string" + }, + "tokenDescription": { + "description": "Token Description", + "nullable": true, + "type": "string" + }, + "uniqueId": { + "description": "Unique Id", + "format": "uuid", + "type": "string" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DepartmentMembership" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DepartmentMembership" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DepartmentMembership" - } - } + }, + "type": "object" + }, + "Contract.CreateEmployeeRequest": { + "additionalProperties": false, + "properties": { + "aggregatedServiceDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "autoEnrolment": { + "$ref": "#/components/schemas/Contract.AutoEnrolmentRequest" + }, + "bankDetails": { + "$ref": "#/components/schemas/Contract.BankDetails" + }, + "defaultPensionSchemeName": { + "description": "The name of the Pension Scheme that will be used for this employee.", + "nullable": true, + "type": "string" + }, + "defaultPensionSchemeUniqueId": { + "description": "The UniqueId of the Pension Scheme that will be used for this employee.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "defaultWorkerGroupName": { + "description": "The name of the Worker Group that will be used for this employee.", + "nullable": true, + "type": "string" + }, + "defaultWorkerGroupUniqueId": { + "description": "The UniqueId of the Worker Group that will be used for this employee.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "employmentDetails": { + "$ref": "#/components/schemas/Contract.EmploymentDetailsRequest" + }, + "evcId": { + "description": "If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "holidaySchemeUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "leaveSettings": { + "$ref": "#/components/schemas/Contract.EmployeeLeaveSettingsRequest" + }, + "payOptions": { + "$ref": "#/components/schemas/Contract.PayOptionsRequest" + }, + "personalDetails": { + "$ref": "#/components/schemas/Contract.PersonalDetailsRequest" + }, + "rightToWork": { + "$ref": "#/components/schemas/Contract.RightToWork" + }, + "sourceSystemId": { + "description": "Used by external systems so they can store an immutable reference.\r\nOnce this property is set it cannot be changed.", + "maxLength": 50, + "nullable": true, + "type": "string" + }, + "tags": { + "items": { + "type": "string" }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DepartmentMembership" - } - } - } + "nullable": true, + "type": "array" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DepartmentMembership" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{id}/evcsettings": { - "get": { - "tags": [ - "Employee" - ], - "summary": "Get EvcSettings", - "operationId": "GetEvcSettingsEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "Contract.CustomReportRequest": { + "additionalProperties": false, + "properties": { + "payRunUniqueIds": { + "items": { + "format": "uuid", + "type": "string" + }, + "nullable": true, + "type": "array" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee for which you want to retrieve EvcSettings.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvcSettings" - } - } - } + "reportFormat": { + "$ref": "#/components/schemas/ReportFormat" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Employee" - ], - "summary": "Update EvcSettings", - "operationId": "UpdateEvcSettingsEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.DepartmentJournalOverridesRequest": { + "additionalProperties": false, + "properties": { + "journalTokenPublicId": { + "description": "Journal Token Public Id", + "format": "uuid", + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee for who you want to update EvcSettings.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "mapping": { + "description": "Department Journal Overrides Mapping", + "nullable": true, + "type": "string" + }, + "tokenDescription": { + "description": "Token Description", + "nullable": true, + "type": "string" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/EvcSettings" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvcSettings" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/EvcSettings" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/EvcSettings" - } - } + }, + "type": "object" + }, + "Contract.DepartmentJournalOverridesResponse": { + "additionalProperties": false, + "properties": { + "journalTokenPublicId": { + "description": "Journal Token Public Id", + "format": "uuid", + "type": "string" + }, + "mapping": { + "description": "Department Journal Overrides Mapping", + "nullable": true, + "type": "string" + }, + "tokenDescription": { + "description": "Token Description", + "nullable": true, + "type": "string" + }, + "uniqueId": { + "description": "Department Journal Overrides identifier", + "format": "uuid", + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvcSettings" - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{id}/costcentres": { - "get": { - "tags": [ - "Employee" - ], - "summary": "Get Employee Cost Centres", - "operationId": "GetEmployeeCostCentresEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee you want to retrieve CostCenntres for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeCostCentre" - } - } - } - } - } - } + "type": "object" }, - "put": { - "tags": [ - "Employee" - ], - "summary": "Set Employee Cost Centres", - "operationId": "SetEmployeeCostCentresEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee you want to set CostCentres for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeCostCentre" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeCostCentre" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeCostCentre" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeCostCentre" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeCostCentre" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/reset-holiday-scheme": { - "put": { - "tags": [ - "Employee" - ], - "summary": "Resets employee accrual scheme", - "description": "Resets employee accrual scheme fields to zero and adds a update accrual reset date in employee table", - "operationId": "ResetEmployeeHolidayAccrualSchemeEmployee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "description": "UnqiueId of the employees for setting the Holiday Scheme Reset Date", - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } - } - }, - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/roles": { - "get": { - "tags": [ - "EmployeeRole" - ], - "summary": "List Employee Roles", - "description": "Lists all Roles for an Employee.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "IndexEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.DepartmentJournalOverridesResponseItem": { + "additionalProperties": false, + "properties": { + "id": { + "format": "uuid", + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee which you want to list Roles.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "metadata": { + "nullable": true }, - "403": { - "description": "Forbidden" + "name": { + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "url": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "EmployeeRole" - ], - "summary": "Create Employee Role", - "description": "Creates a new Role for the Employee.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "CreateEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.DepartmentJournalOverridesUpdateRequest": { + "additionalProperties": false, + "properties": { + "journalTokenPublicId": { + "description": "Journal Token Public Id", + "format": "uuid", + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee to which the Role belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/EmployeeRole" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployeeRole" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/EmployeeRole" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/EmployeeRole" - } - } + "mapping": { + "description": "Department Journal Overrides Mapping", + "nullable": true, + "type": "string" + }, + "tokenDescription": { + "description": "Token Description", + "nullable": true, + "type": "string" + }, + "uniqueId": { + "description": "Unique Id", + "format": "uuid", + "type": "string" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "Contract.DepartmentRequest": { + "additionalProperties": false, + "properties": { + "accountingCode": { + "maxLength": 50, + "nullable": true, + "type": "string" }, - "403": { - "description": "Forbidden" + "code": { + "description": "The unique code for this Department", + "maxLength": 20, + "minLength": 1, + "type": "string" }, - "404": { - "description": "Not Found" + "color": { + "description": "A color to used to represent this Department, in hex format. ie 'ff0000'", + "maxLength": 6, + "nullable": true, + "type": "string" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployeeRole" - } - } - } + "title": { + "description": "The name of this Department", + "maxLength": 50, + "minLength": 1, + "type": "string" } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/roles/{id}": { - "get": { - "tags": [ - "EmployeeRole" + }, + "required": [ + "code", + "title" ], - "summary": "Get Employee Role", - "description": "Gets the Role specified.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "GetEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "Contract.DepartmentResponse": { + "additionalProperties": false, + "properties": { + "accountingCode": { + "maxLength": 50, + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee to which the Role belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "code": { + "description": "The unique code for this Department", + "maxLength": 20, + "minLength": 1, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The id of the Role you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeRoleResponse" - } - } - } + "color": { + "description": "A color to used to represent this Department, in hex format. ie 'ff0000'", + "maxLength": 6, + "nullable": true, + "type": "string" }, - "403": { - "description": "Forbidden" + "employeeCount": { + "description": "The number of employees with this set as their primary department", + "format": "int32", + "type": "integer" }, - "404": { - "description": "Not Found" + "title": { + "description": "The name of this Department", + "maxLength": 50, + "minLength": 1, + "type": "string" } - } - }, - "put": { - "tags": [ - "EmployeeRole" + }, + "required": [ + "code", + "title" ], - "summary": "Update Employee Role", - "description": "Updates a Role for the Employee.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "UpdateEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "Contract.DirectorshipDetails": { + "additionalProperties": false, + "properties": { + "isDirector": { + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee to which the Role belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "leaveDate": { + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Role to update.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/EmployeeRole" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployeeRole" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/EmployeeRole" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/EmployeeRole" - } - } + "niAlternativeMethod": { + "type": "boolean" + }, + "startDate": { + "format": "date", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployeeRole" - } - } - } + "type": "object" + }, + "Contract.EmployeeItem": { + "additionalProperties": false, + "properties": { + "id": { + "format": "uuid", + "type": "string" }, - "400": { - "description": "Bad Request" + "metadata": { + "nullable": true }, - "403": { - "description": "Forbidden" + "name": { + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "url": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "EmployeeRole" - ], - "summary": "Delete Employee Role", - "description": "Deletes the specified Role.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "DeleteEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Contract.EmployeeLeaveSettingsRequest": { + "additionalProperties": false, + "properties": { + "accrueHoursPerDay": { + "description": "If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee to which the Role belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accruePayCodeSetUniqueId": { + "description": "Pay code set to use for accruing holiday pay", + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Role to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "accruePaymentInLieuAllGrossPay": { + "deprecated": true, + "description": "[Deprecated] Please use HolidayAccrualBasis instead.\r\nThis filed will be removed in a later release.", + "type": "boolean" }, - "400": { - "description": "Bad Request" + "accruePaymentInLieuPayAutomatically": { + "description": "Set to true if you want employees to be automatically paid any outstanding holiday pay", + "type": "boolean" }, - "403": { - "description": "Forbidden" + "accruePaymentInLieuRate": { + "description": "The rate at which Payments in Lieu acrrue. Typically this should be 12.07%.", + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/roles/{id}/departments": { - "put": { - "tags": [ - "EmployeeRole" - ], - "summary": "Set Employee Role Departments", - "description": "Assigns Departments to an Employee Role.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "SetDepartmentMembershipsEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accrueSetAmount": { + "description": "If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked.", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee you want to set Departments for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accruedHoursAdjustment": { + "description": "Any manual adjustment to the total hours accrued", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee Role you want to set Departments for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DepartmentMembership" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DepartmentMembership" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DepartmentMembership" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DepartmentMembership" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DepartmentMembership" - } - } - } - } + "accruedPaymentAdjustment": { + "description": "Any manual adjustment to the total accrued", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "adjustment": { + "description": "Adjustment to number of hours/days/weeks holiday this employee can take per year.\r\nWill reset to 0 when the Allowance resets.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "format": "double", + "nullable": true, + "type": "number" }, - "404": { - "description": "Not Found" - } - } - }, - "get": { - "tags": [ - "EmployeeRole" - ], - "summary": "Get Employee Role Departments", - "description": "Gets Departments that are Assigned to an Employee Role.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "GetDepartmentMembershipsEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "aggregatedServiceDate": { + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee you want to retrieve Departments for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "allowance": { + "description": "The number of days holiday an employee can take per year if HolidayType is Days.\r\nOtherwise this is readonly and gives you the number of days accrued since the last reset", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee Role you want to retrieve Departments for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DepartmentMembership" - } - } - } - } + "allowanceResetDate": { + "description": "The date that the holiday allowance resets. Only the day/month part of the value is relevant.", + "format": "date", + "type": "string" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/roles/{roleId}/basehourlyrate": { - "get": { - "tags": [ - "EmployeeRole" - ], - "summary": "Calculate Base Hourly Rate", - "operationId": "GetBaseHourlyRateEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "holidayAccrualBasis": { + "$ref": "#/components/schemas/HolidayAccrual" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "holidayAccrualDefaultRateType": { + "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" }, - { - "name": "roleId", - "in": "path", - "description": "The Employee Role Id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "holidayLeaveAccrualCustomRateType": { + "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" }, - { - "name": "payPeriod", - "in": "query", - "description": "The frequency that this Employee Role is paid.", - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "holidayType": { + "$ref": "#/components/schemas/HolidayType" }, - { - "name": "payBasis", - "in": "query", - "description": "", - "schema": { - "$ref": "#/components/schemas/PayBasis" - } + "maximumAccruePeriod": { + "description": "The maximum number of hours capable of being accrued in a single period", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "payAmount", - "in": "query", - "description": "The amount the Employee Role is regularly paid each period.", - "schema": { - "type": "number", - "format": "double" - } + "occupationalSicknessUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "workingPatternId", - "in": "query", - "description": "The Id of the Working Pattern that we want the calculations against.", - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "number", - "format": "double" - } - } - } + "showAhpOnPayslip": { + "description": "If true then the AHP balance will be shown on the employees payslip.", + "type": "boolean" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/roles/{roleId}/basedailyrate": { - "get": { - "tags": [ - "EmployeeRole" - ], - "summary": "Calculate Base Daily Rate", - "operationId": "GetBaseDailyRateEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "showAllowanceOnPayslip": { + "description": "If true then the remaining Allowance will be shown on the employees payslip.", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "useAggregatedServiceDate": { + "type": "boolean" }, - { - "name": "roleId", - "in": "path", - "description": "The Employee Role Id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "useDefaultAccrueHoursPerDay": { + "description": "If true then the value for AccrueHoursPerDay comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" }, - { - "name": "payPeriod", - "in": "query", - "description": "The frequency that this Employee Role is paid.", - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "useDefaultAccruePaymentInLieu": { + "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" }, - { - "name": "payBasis", - "in": "query", - "description": "", - "schema": { - "$ref": "#/components/schemas/PayBasis" - } + "useDefaultAccruePaymentInLieuAllGrossPay": { + "deprecated": true, + "description": "[Deprecated] Please use UseUseDefaultHolidayAccrualBasis instead.\r\nThis filed will be removed in a later release.", + "type": "boolean" }, - { - "name": "payAmount", - "in": "query", - "description": "The amount the Employee Role is regularly paid each period.", - "schema": { - "type": "number", - "format": "double" - } + "useDefaultAccruePaymentInLieuPayAutomatically": { + "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" }, - { - "name": "workingPatternId", - "in": "query", - "description": "The Id of the Working Pattern that we want the calculations against.", - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "number", - "format": "double" - } - } - } + "useDefaultAccruePaymentInLieuRate": { + "description": "If true then the value for AccruePaymentInLieuRate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/roles/{id}/costcentres": { - "get": { - "tags": [ - "EmployeeRole" - ], - "summary": "Get Employee Role Cost Centres", - "description": "Gets Cost Centres that are Assigned to an Employee Role.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "GetCostCentreMembershipsEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "useDefaultAllowance": { + "description": "If true then the value for the Allowance comes from the Employer record.\r\nThis property only appears if the LeaveSettings if a child of an Employee (not of an Employer)", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee you want to retrieve Cost Centres for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "useDefaultAllowanceResetDate": { + "description": "If true then the value for the AllowanceResetDate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee Role you want to retrieve Cost Centres for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeCostCentre" - } - } - } - } + "useDefaultHolidayAccrualBasis": { + "description": "If true then the value for HolidayAccrualBasis comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "nullable": true, + "type": "boolean" }, - "404": { - "description": "Not Found" - } - } - }, - "put": { - "tags": [ - "EmployeeRole" - ], - "summary": "Set Employee Role Cost Centres", - "description": "Assigns Cost Centres to an Employee Role.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "SetCostCentreMembershipsEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "useDefaultHolidayAccrualDefaultRateType": { + "description": "If true then the value for HolidayAccrualDefaultRateType comes from the Employer record.", + "nullable": true, + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee you want to set Cost Centres for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "useDefaultHolidayType": { + "description": "If true then the value for HolidayType comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee Role you want to set Cost Centres for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeCostCentre" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeCostCentre" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeCostCentre" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeCostCentre" - } - } - } + "useDefaultMaximumAccruePeriod": { + "description": "If true then the value for MaximumAccruePeriod comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeCostCentre" - } - } - } - } + "type": "object" + }, + "Contract.EmployeeLeaveSettingsResponse": { + "additionalProperties": false, + "properties": { + "accrueHoursPerDay": { + "description": "If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "accruePayCodeSetUniqueId": { + "description": "Pay code set to use for accruing holiday pay", + "format": "uuid", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/roles/{id}/workingpatterns/{roleWorkingPatternId}": { - "get": { - "tags": [ - "EmployeeRole" - ], - "summary": "Get Employee Role Working Pattern", - "description": "Gets the Employee Role Working Pattern specified.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "GetRoleWorkingPatternEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accruePaymentInLieuAllGrossPay": { + "deprecated": true, + "description": "[Deprecated] Please use HolidayAccrualBasis instead.\r\nThis filed will be removed in a later release.", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee to which the Role belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accruePaymentInLieuPayAutomatically": { + "description": "Set to true if you want employees to be automatically paid any outstanding holiday pay", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee Role you want to retrieve a Role Working Pattern for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accruePaymentInLieuRate": { + "description": "The rate at which Payments in Lieu acrrue. Typically this should be 12.07%.", + "format": "double", + "type": "number" }, - { - "name": "roleWorkingPatternId", - "in": "path", - "description": "The Id of the Employee Role Working Pattern you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternResponse" - } - } - } + "accrueSetAmount": { + "description": "If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked.", + "type": "boolean" }, - "404": { - "description": "Not Found" - } - } - }, - "delete": { - "tags": [ - "EmployeeRole" - ], - "summary": "Delete Employee Role Working Pattern", - "description": "Deletes the specified Employee Role Working Pattern.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "DeleteRoleWorkingPatternEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accruedHoursAdjustment": { + "description": "Any manual adjustment to the total hours accrued", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee to which the Role belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accruedHoursAmount": { + "description": "[readonly] The total accrued hours for this employee over the lifetime of their employment so far", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee Role to which the Role Working Pattern belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accruedHoursBalance": { + "description": "[readonly] The balance of hours owed to this employee in lieu of holidays", + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "roleWorkingPatternId", - "in": "path", - "description": "The Id of the Employee Role Working Pattern you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "accruedHoursPaid": { + "description": "[readonly] The Total amount of hours paid to this employee in lieu of holidays", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "accruedPaymentAdjustment": { + "description": "Any manual adjustment to the total accrued", + "format": "double", + "type": "number" }, - "403": { - "description": "Forbidden" + "accruedPaymentBalance": { + "description": "[readonly] The balance of what is owed to this employee in lieu of holidays", + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/roles/{id}/workingpatterns": { - "get": { - "tags": [ - "EmployeeRole" - ], - "summary": "List Working Patterns for an Employee Role", - "description": "Lists all Working Patterns for an Employee Role.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "ListRoleWorkingPatternsEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accruedPaymentLiability": { + "description": "[readonly] The total accrued payments for this employee over the lifetime of their employment so far", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee to which the Role belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accruedPaymentPaid": { + "description": "[readonly] The Total amount paid to this employee in lieu of holidays", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee Role you want to retrieve Employee Role Working Patterns for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternResponseItem" - } - } - } - } + "adjustment": { + "description": "Adjustment to number of hours/days/weeks holiday this employee can take per year.\r\nWill reset to 0 when the Allowance resets.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "format": "double", + "nullable": true, + "type": "number" }, - "403": { - "description": "Forbidden" + "aggregatedServiceDate": { + "format": "date", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" - } - } - }, - "post": { - "tags": [ - "EmployeeRole" - ], - "summary": "Create Employee Role Working Pattern", - "description": "Creates a new Role Working Pattern for the Employee Role.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "CreateRoleWorkingPatternEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "allowance": { + "description": "The number of days holiday an employee can take per year if HolidayType is Days.\r\nOtherwise this is readonly and gives you the number of days accrued since the last reset", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee to which the Role belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "allowanceRemaining": { + "description": "[readonly] The number of days remaining of the allowance until next reset", + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee Role you want to create a Role Working Pattern for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "allowanceResetDate": { + "description": "The date that the holiday allowance resets. Only the day/month part of the value is relevant.", + "format": "date", + "type": "string" }, - "403": { - "description": "Forbidden" + "allowanceUsed": { + "description": "[readonly] The number of days used from the allowance since last reset", + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" + "allowanceUsedPreviousPeriod": { + "description": "[readonly] The number of days used in the 12 months prior to the last reset", + "format": "double", + "type": "number" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/roles/{id}/workingPatterns/{roleWorkingPatternId}": { - "put": { - "tags": [ - "EmployeeRole" - ], - "summary": "Update Employee Role Working Pattern", - "description": "Updates a Working Pattern for the Employee Role.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "UpdateRoleWorkingPatternEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "holidayAccrualBasis": { + "$ref": "#/components/schemas/HolidayAccrual" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee to which the Role belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "holidayAccrualDefaultRateType": { + "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Role to which the Employee Role Working Pattern belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "holidayAccrualResetDate": { + "description": "[readonly] This date is used to reset holiday accrual schemes (Accrual Money or Accrual Hours).", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "roleWorkingPatternId", - "in": "path", - "description": "The Id of the Employee Role Working Pattern you want to update.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternResponse" - } - } - } + "holidayLeaveAccrualCustomRateType": { + "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" }, - "400": { - "description": "Bad Request" + "holidayType": { + "$ref": "#/components/schemas/HolidayType" }, - "403": { - "description": "Forbidden" + "maximumAccruePeriod": { + "description": "The maximum number of hours capable of being accrued in a single period", + "format": "double", + "nullable": true, + "type": "number" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/roles/{id}/analysiscategories/{analysisCategoryId}/analysiscategorycodes": { - "put": { - "tags": [ - "EmployeeRole" - ], - "summary": "Set Employee Role AnalysisCategorycode", - "description": "Assigns AnalysisCategoryCode to an Employee Role.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "SetEmployeeRoleAnalysisCategoryCodesEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "occupationalSicknessUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee you want to set AnalysisCategoryCode for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "showAhpOnPayslip": { + "description": "If true then the AHP balance will be shown on the employees payslip.", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee Role you want to set AnalysisCategoryCode for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "showAllowanceOnPayslip": { + "description": "If true then the remaining Allowance will be shown on the employees payslip.", + "type": "boolean" }, - { - "name": "analysisCategoryId", - "in": "path", - "description": "The Id of the Analysis Category you want to set AnalysisCategoryCode for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.EmployeeRoleAnalysisCategoryCodeRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.EmployeeRoleAnalysisCategoryCodeRequest" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.EmployeeRoleAnalysisCategoryCodeRequest" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.EmployeeRoleAnalysisCategoryCodeRequest" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.EmployeeRoleAnalysisCategoryCodeResponse" - } - } - } - } + "useAggregatedServiceDate": { + "type": "boolean" }, - "400": { - "description": "Bad Request" + "useDefaultAccrueHoursPerDay": { + "description": "If true then the value for AccrueHoursPerDay comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/roles/{id}/analysiscategorycodes": { - "get": { - "tags": [ - "EmployeeRole" - ], - "summary": "Get Employee Role AnalysisCategoryCode", - "description": "Gets AnalysisCategoryCode that are Assigned to an Employee Role.\r\nYou must have the multi-role feature enabled.", - "operationId": "GetEmployeeRoleAnalysisCategoryCodesEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "useDefaultAccruePaymentInLieu": { + "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee you want to retrieve AnalysisCategoryCode for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "useDefaultAccruePaymentInLieuAllGrossPay": { + "deprecated": true, + "description": "[Deprecated] Please use UseUseDefaultHolidayAccrualBasis instead.\r\nThis filed will be removed in a later release.", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Employee Role you want to retrieve AnalysisCategoryCode for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.EmployeeRoleAnalysisCategoryCodeResponse" - } - } - } - } + "useDefaultAccruePaymentInLieuPayAutomatically": { + "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" }, - "404": { - "description": "Not Found" + "useDefaultAccruePaymentInLieuRate": { + "description": "If true then the value for AccruePaymentInLieuRate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAllowance": { + "description": "If true then the value for the Allowance comes from the Employer record.\r\nThis property only appears if the LeaveSettings if a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAllowanceResetDate": { + "description": "If true then the value for the AllowanceResetDate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultHolidayAccrualBasis": { + "description": "If true then the value for HolidayAccrualBasis comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "nullable": true, + "type": "boolean" + }, + "useDefaultHolidayAccrualDefaultRateType": { + "description": "If true then the value for HolidayAccrualDefaultRateType comes from the Employer record.", + "nullable": true, + "type": "boolean" + }, + "useDefaultHolidayType": { + "description": "If true then the value for HolidayType comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultMaximumAccruePeriod": { + "description": "If true then the value for MaximumAccruePeriod comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/roles/{roleId}/assumedpensionablepay": { - "get": { - "tags": [ - "EmployeeRole" - ], - "summary": "Calculate Assumed Pensionable Pay", - "operationId": "GetRoleAssumedPensionablePayEmployeeRole", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "Contract.EmployeeNavigationResponse": { + "additionalProperties": false, + "properties": { + "currentId": { + "format": "uuid", + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "currentIndex": { + "format": "int32", + "type": "integer" }, - { - "name": "roleId", - "in": "path", - "description": "The Employee Role Id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "deptCode": { + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "query", - "description": "The frequency that this Employee Role is paid.", - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "employeeCount": { + "format": "int32", + "type": "integer" }, - { - "name": "leaveType", - "in": "query", - "description": "The type of the Leave.", - "schema": { - "$ref": "#/components/schemas/LeaveType" - } + "firstId": { + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "leavePayType", - "in": "query", - "description": "The pay type of the Leave.", - "schema": { - "$ref": "#/components/schemas/LeavePayType" - } + "lastId": { + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "from", - "in": "query", - "description": "The date from which the Assumed Pensionable Pay is calculated.", - "schema": { - "type": "string", - "format": "date-time" - } + "nextId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "previousId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "sortBy": { + "$ref": "#/components/schemas/EmployeeSortBy" + }, + "sortDescending": { + "type": "boolean" + }, + "status": { + "$ref": "#/components/schemas/EmployeeStatus" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "number", - "format": "double" - } - } - } + }, + "type": "object" + }, + "Contract.EmployeePaymentsReportRequest": { + "additionalProperties": false, + "properties": { + "ordinal": { + "description": "Ordinal number for the Pay Schedule.", + "format": "int32", + "type": "integer" }, - "404": { - "description": "Not Found" + "payCodes": { + "description": "Comma-separated list of Pay Codes.", + "nullable": true, + "type": "string" } - } - } - }, - "/employers": { - "post": { - "tags": [ - "Employer" - ], - "summary": "Create an Employer", - "description": "Use this method to create a new Employer\r\nThe only required field is the Employer name.", - "operationId": "CreateEmployer", - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployerRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployerRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployerRequest" - } + }, + "type": "object" + }, + "Contract.EmployeeResponse": { + "additionalProperties": false, + "properties": { + "aeNotEnroledWarning": { + "type": "boolean" + }, + "aggregatedServiceDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "autoEnrolment": { + "$ref": "#/components/schemas/Contract.AutoEnrolmentResponse" + }, + "bankDetails": { + "$ref": "#/components/schemas/Contract.BankDetails" + }, + "defaultPensionSchemeName": { + "description": "The name of the Pension Scheme that will be used for this employee.", + "nullable": true, + "type": "string" + }, + "defaultPensionSchemeUniqueId": { + "description": "The UniqueId of the Pension Scheme that will be used for this employee.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "defaultWorkerGroupName": { + "description": "The name of the Worker Group that will be used for this employee.", + "nullable": true, + "type": "string" + }, + "defaultWorkerGroupUniqueId": { + "description": "The UniqueId of the Worker Group that will be used for this employee.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "employmentDetails": { + "$ref": "#/components/schemas/Contract.EmploymentDetailsResponse" + }, + "evcId": { + "description": "If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "holidaySchemeUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The unique id of the object", + "format": "uuid", + "type": "string" + }, + "leaveSettings": { + "$ref": "#/components/schemas/Contract.EmployeeLeaveSettingsResponse" + }, + "payOptions": { + "$ref": "#/components/schemas/Contract.PayOptionsResponse" + }, + "personalDetails": { + "$ref": "#/components/schemas/Contract.PersonalDetailsResponse" + }, + "rightToWork": { + "$ref": "#/components/schemas/Contract.RightToWork" + }, + "sourceSystemId": { + "nullable": true, + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/EmployeeStatus" + }, + "tags": { + "items": { + "type": "string" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployerRequest" - } - } + "nullable": true, + "type": "array" } }, - "responses": { - "201": { - "description": "Success - the employer has been created and is returned in the body.\r\nThe unique URL for this employer is returned in the Location header.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployerResponse" - } - } - } + "type": "object" + }, + "Contract.EmployeeRoleAnalysisCategoryCodeRequest": { + "additionalProperties": false, + "properties": { + "analysisCategoryName": { + "description": "Analysis category name for AnalysisCategory code", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "analysisCategoryPublicId": { + "description": "Analysis category identifier", + "format": "uuid", + "type": "string" + }, + "code": { + "description": "Analysis Category code", + "nullable": true, + "type": "string" + }, + "color": { + "description": "Analysis Category code color", + "nullable": true, + "type": "string" + }, + "isPrimary": { + "description": "Return whether Employee Role is primary for not", + "type": "boolean" + }, + "title": { + "description": "Analysis Category code Title", + "nullable": true, + "type": "string" + }, + "weighting": { + "description": "Weightage for analysis category code", + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "get": { - "tags": [ - "Employer" - ], - "summary": "List Employers", - "description": "Return a list of employers with pagination options. If no pagination parameters are provided, return all applicable employers based on the search.", - "operationId": "IndexEmployer", - "parameters": [ - { - "name": "employerGroupCode", - "in": "query", - "description": "Optionally specify the code of an EmployerGroup to only see employers that are a member of that group.", - "schema": { - "type": "string" - } + "Contract.EmployeeRoleAnalysisCategoryCodeResponse": { + "additionalProperties": false, + "properties": { + "analysisCategoryName": { + "description": "Analysis category name for AnalysisCategory code", + "nullable": true, + "type": "string" }, - { - "name": "searchTerm", - "in": "query", - "description": "Filters the employer list by Processor Name, Employer Name, Customer #, Alt ID and Employer GUID.", - "schema": { - "type": "string" - } + "analysisCategoryPublicId": { + "description": "Analysis category identifier", + "format": "uuid", + "type": "string" }, - { - "name": "employerListType", - "in": "query", - "description": "Filters the employer list type.", - "schema": { - "$ref": "#/components/schemas/EmployerListType" - } + "code": { + "description": "Analysis Category code", + "nullable": true, + "type": "string" }, - { - "name": "pageNum", - "in": "query", - "description": "Zero-based index indicating the current page.", - "schema": { - "type": "integer", - "format": "int32" - } + "color": { + "description": "Analysis Category code color", + "nullable": true, + "type": "string" }, - { - "name": "pageSize", - "in": "query", - "description": "Number of items per page.", - "schema": { - "type": "integer", - "format": "int32" - } + "id": { + "description": "Employee Role Analysis Category Code identifier", + "format": "uuid", + "type": "string" }, - { - "name": "sortBy", - "in": "query", - "description": "Field to sort employers by.", - "schema": { - "$ref": "#/components/schemas/EmployerSortBy" - } + "isPrimary": { + "description": "Return whether Employee Role is primary for not", + "type": "boolean" }, - { - "name": "sortDescending", - "in": "query", - "description": "Indicates descending sort order.", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/import": { - "post": { - "tags": [ - "Employer" - ], - "summary": "Import CSV", - "description": "Import employers from a CSV file.", - "operationId": "ImportCsvEmployer", - "parameters": [ - { - "name": "previewOnly", - "in": "query", - "description": "Set to true and nothing will be imported but you'll be shown a preview of the data.", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } + "title": { + "description": "Analysis Category code Title", + "nullable": true, + "type": "string" + }, + "weighting": { + "description": "Weightage for analysis category code", + "format": "double", + "type": "number" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/search": { - "get": { - "tags": [ - "Employer" - ], - "summary": "Search Employers", - "operationId": "SearchEmployer", - "parameters": [ - { - "name": "query", - "in": "query", - "schema": { - "type": "string" - } + "type": "object" + }, + "Contract.EmployeeRoleItem": { + "additionalProperties": false, + "properties": { + "id": { + "format": "uuid", + "type": "string" + }, + "metadata": { + "nullable": true + }, + "name": { + "nullable": true, + "type": "string" + }, + "url": { + "nullable": true, + "type": "string" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/employees/search": { - "get": { - "tags": [ - "Employer" - ], - "summary": "Search Employees", - "description": "Search all employers for an employee based on their name or payroll code.\r\nEnsure your query is at least 3 characters long or you wont get any results.", - "operationId": "SearchEmployeesEmployer", - "parameters": [ - { - "name": "query", - "in": "query", - "description": "The search string (at least 3 characters).", - "schema": { - "type": "string" - } + }, + "type": "object" + }, + "Contract.EmployeeRoleResponse": { + "additionalProperties": false, + "properties": { + "basis": { + "$ref": "#/components/schemas/RoleBasis" }, - { - "name": "exludeCisSubContactors", - "in": "query", - "description": "If set to true, then we'll only search employees that aren't labeled as CIS Subcontractors", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{id}": { - "get": { - "tags": [ - "Employer" - ], - "summary": "Get an Employer", - "operationId": "GetEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployerResponse" - } - } - } + "defaultPensionSchemeUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "defaultWorkerGroupUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "displayName": { + "nullable": true, + "readOnly": true, + "type": "string" + }, + "endDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "isPrimary": { + "description": "Set to True if this is Primary role of the Employee", + "type": "boolean" + }, + "jobTitle": { + "description": "Job Title of the Role", + "nullable": true, + "type": "string" + }, + "occupationalMaternityPolicyUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "occupationalSicknessPolicyUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "payOptions": { + "$ref": "#/components/schemas/Contract.PayOptionsBaseResponse" + }, + "reference": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/RoleType" + }, + "workingPattern": { + "$ref": "#/components/schemas/Contract.WorkingPatternResponse" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Employer" - ], - "summary": "Update an Employer", - "operationId": "UpdateEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer you want to update.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployerRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployerRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployerRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployerRequest" - } - } + "Contract.EmployeeRoleWorkingPatternRequest": { + "additionalProperties": false, + "properties": { + "effectiveFrom": { + "description": "The date when the assignment of the Working Pattern becomes effective.", + "format": "date", + "type": "string" + }, + "workingPatternUniqueId": { + "description": "The UniqueId of the Working Pattern.", + "format": "uuid", + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployerResponse" - } - } - } + "type": "object" + }, + "Contract.EmployeeRoleWorkingPatternResponse": { + "additionalProperties": false, + "properties": { + "effectiveFrom": { + "description": "The date when the assignment of the Working Pattern becomes effective.", + "format": "date", + "type": "string" }, - "404": { - "description": "Not Found" + "effectiveTo": { + "description": "[readonly] The date when the assignment of the Working Pattern effectiveness ends. Populated automatically based on working pattern effectiveFrom dates.", + "format": "date", + "type": "string" + }, + "uniqueId": { + "description": "The UniqueId of the model.", + "format": "uuid", + "type": "string" + }, + "workingPattern": { + "$ref": "#/components/schemas/Contract.WorkingPatternResponse" + }, + "workingPatternUniqueId": { + "description": "The UniqueId of the Working Pattern.", + "format": "uuid", + "type": "string" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "Employer" - ], - "summary": "Delete an Employer", - "operationId": "DeleteEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "Contract.EmployeeRoleWorkingPatternResponseItem": { + "additionalProperties": false, + "properties": { + "contractedWeeks": { + "description": "[readonly] The amount of weeks an employee works, utilise for employees who aren't working full time.\r\nIf Null then the default is used.", + "format": "double", + "nullable": true, + "type": "number" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{id}/calendar": { - "get": { - "tags": [ - "Employer" - ], - "summary": "Get Employer Calendar", - "description": "Get a list of upcoming CalendarEntry for the Employer.", - "operationId": "CalendarEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "effectiveFrom": { + "description": "The date when the assignment of the Working Pattern becomes effective.", + "format": "date", + "type": "string" }, - { - "name": "from", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "effectiveTo": { + "description": "[readonly] The date when the assignment of the Working Pattern effectiveness ends. Populated automatically based on working pattern effectiveFrom dates.", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "to", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CalendarEntry" - } - } - } - } - } - } - } - }, - "/employers/{id}/users": { - "get": { - "tags": [ - "Employer" - ], - "summary": "List Users", - "description": "Returns a list of Users that have access to the given Employer", - "operationId": "ListUsersEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer you want a list of Users for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{id}/users/owner": { - "put": { - "tags": [ - "Employer" - ], - "summary": "Set Owner", - "description": "Sets the owner for the employer. You must be the owner of the Employer to set this value.\r\nThe user you are setting as the owner must already have the role Admin.\r\nYou can get a list of users from the ListUsers endpoint.", - "operationId": "SetOwnerEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer you want to change the ownership of.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "id": { + "format": "uuid", + "type": "string" + }, + "metadata": { + "nullable": true + }, + "name": { + "nullable": true, + "type": "string" + }, + "title": { + "description": "The title of the working pattern.", + "nullable": true, + "type": "string" + }, + "totalHours": { + "description": "[readonly] The amount of hours per working pattern.", + "format": "double", + "type": "number" + }, + "url": { + "nullable": true, + "type": "string" + }, + "workingPatternId": { + "description": "The unique id of the working pattern.", + "format": "uuid", + "type": "string" } - ], - "requestBody": { - "description": "The Id of the User you want a change ownership to. They must already be a user for this employer and have the admin role assigned to them.", - "content": { - "application/json-patch+json": { - "schema": { - "type": "string", - "format": "uuid" - } - }, - "application/json": { - "schema": { - "type": "string", - "format": "uuid" - } - }, - "text/json": { - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "Contract.EmployeeSupplementaryPayRunResponse": { + "additionalProperties": false, + "properties": { + "items": { + "description": "List of employee items.", + "items": { + "$ref": "#/components/schemas/Contract.EmployeeItem" }, - "application/*+json": { - "schema": { - "type": "string", - "format": "uuid" - } - } + "nullable": true, + "type": "array" + }, + "totalItems": { + "description": "Value indicating the total number of items.", + "format": "int32", + "type": "integer" } }, - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{id}/users/{userId}": { - "delete": { - "tags": [ - "Employer" - ], - "summary": "Remove User", - "description": "Removes a User from an Employer.\r\nYou cannot remove Users that are marked as the owner of the Employer.\r\nYou must be the owner of the Employer in order to remove other Users.", - "operationId": "RemoveUserEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer you want to remove the User from.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "Contract.EmployerBase": { + "additionalProperties": false, + "properties": { + "name": { + "nullable": true, + "type": "string" }, - { - "name": "userId", - "in": "path", - "description": "The Id of the User you want to remove.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/employers/{id}/suggestPayrollCode": { - "get": { - "tags": [ - "Employer" - ], - "summary": "Suggest Payroll Code", - "description": "This helper method returns a unique code for the next Employee that you create for the specified Employer.\r\nYou don't have to use the value provided, you can use any value that is unique across Employees for the Employer.", - "operationId": "SuggestPayCodeEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer you want a suggestion for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/employers/{id}/logo": { - "post": { - "tags": [ - "Employer" - ], - "summary": "Update Employer Logo", - "description": "If you already have a URL for the employer Logo then you can just set the LogoUrl property of the Employer.\r\nAlternatively, submit a logo here and we'll upload it and set the LogoUrl for you.", - "operationId": "UpdateLogoEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer you want to update.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "uniqueId": { + "format": "uuid", + "type": "string" } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } + }, + "type": "object" + }, + "Contract.EmployerLeaveSettingsRequest": { + "additionalProperties": false, + "properties": { + "accrueHoursPerDay": { + "description": "If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued", + "format": "double", + "type": "number" + }, + "accruePayCodeSetUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "accruePaymentInLieuAllGrossPay": { + "description": "Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element", + "type": "boolean" + }, + "accruePaymentInLieuPayAutomatically": { + "description": "Set to true if you want employees to be automatically paid any outstanding holiday pay", + "type": "boolean" + }, + "accruePaymentInLieuRate": { + "description": "The rate at which Payments in Lieu acrrue. Typically this should be 12.07%.", + "format": "double", + "type": "number" + }, + "accrueSetAmount": { + "description": "If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked.", + "type": "boolean" + }, + "accruedHoursAdjustment": { + "description": "Any manual adjustment to the total hours accrued", + "format": "double", + "type": "number" + }, + "accruedHoursAmount": { + "description": "[readonly] The total accrued hours for this employee over the lifetime of their employment so far", + "format": "double", + "type": "number" + }, + "accruedHoursAmountLastPeriod": { + "description": "[readonly] The total accrued hours for this employee in the last pay period", + "format": "double", + "type": "number" + }, + "accruedHoursBalance": { + "description": "[readonly] The balance of hours owed to this employee in lieu of holidays", + "format": "double", + "readOnly": true, + "type": "number" + }, + "accruedHoursPaid": { + "description": "[readonly] The Total amount of hours paid to this employee in lieu of holidays", + "format": "double", + "type": "number" + }, + "accruedPaymentAdjustment": { + "description": "Any manual adjustment to the total accrued", + "format": "double", + "type": "number" + }, + "accruedPaymentBalance": { + "description": "[readonly] The balance of what is owed to this employee in lieu of holidays", + "format": "double", + "readOnly": true, + "type": "number" + }, + "accruedPaymentLiability": { + "description": "[readonly] The total accrued payments for this employee over the lifetime of their employment so far", + "format": "double", + "type": "number" + }, + "accruedPaymentPaid": { + "description": "[readonly] The Total amount paid to this employee in lieu of holidays", + "format": "double", + "type": "number" + }, + "adjustment": { + "description": "Adjustment to number of hours/days/weeks holiday this employee can take per year.\r\nWill reset to 0 when the Allowance resets.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "format": "double", + "nullable": true, + "type": "number" + }, + "aggregatedServiceDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "allowance": { + "description": "The number of days holiday an employee can take per year if HolidayType is Days.\r\nOtherwise this is readonly and gives you the number of days accrued since the last reset", + "format": "double", + "type": "number" + }, + "allowanceRemaining": { + "description": "[readonly] The number of days remaining of the allowance until next reset", + "format": "double", + "readOnly": true, + "type": "number" + }, + "allowanceResetDate": { + "description": "The date that the holiday allowance resets. Only the day/month part of the value is relevant.", + "format": "date", + "type": "string" + }, + "allowanceUsed": { + "description": "[readonly] The number of days used from the allowance since last reset", + "format": "double", + "type": "number" + }, + "allowanceUsedPreviousPeriod": { + "description": "[readonly] The number of days used in the 12 months prior to the last reset", + "format": "double", + "type": "number" + }, + "bereavementLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "holidayAccrualBasis": { + "$ref": "#/components/schemas/HolidayAccrual" + }, + "holidayAccrualDefaultRateType": { + "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + }, + "holidayLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "holidayType": { + "$ref": "#/components/schemas/HolidayType" + }, + "maximumAccruePeriod": { + "description": "The maximum number of hours capable of being accrued in a single period", + "format": "double", + "nullable": true, + "type": "number" + }, + "occupationalSicknessUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "paidHoursAmountLastPeriod": { + "description": "[readonly] The number of hours paid against the pay code", + "format": "double", + "type": "number" + }, + "parentalLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "showAhpOnPayslip": { + "description": "If true then the AHP balance will be shown on the employees payslip.", + "type": "boolean" + }, + "showAllowanceOnPayslip": { + "description": "If true then the remaining Allowance will be shown on the employees payslip.", + "type": "boolean" + }, + "sickLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "unauthorisedLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "useAggregatedServiceDate": { + "type": "boolean" + }, + "useDefaultAccrueHoursPerDay": { + "description": "If true then the value for AccrueHoursPerDay comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAccruePaymentInLieu": { + "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAccruePaymentInLieuPayAutomatically": { + "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAccruePaymentInLieuRate": { + "description": "If true then the value for AccruePaymentInLieuRate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAllowance": { + "description": "If true then the value for the Allowance comes from the Employer record.\r\nThis property only appears if the LeaveSettings if a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAllowanceResetDate": { + "description": "If true then the value for the AllowanceResetDate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultHolidayAccrualBasis": { + "description": "If true then the value for HolidayAccrualBasis comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultHolidayAccrualDefaultRateType": { + "description": "If true then the value for HolidayAccrualDefaultRateType comes from the Employer record.", + "type": "boolean" + }, + "useDefaultHolidayType": { + "description": "If true then the value for HolidayType comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultMaximumAccruePeriod": { + "description": "If true then the value for MaximumAccruePeriod comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.EmployerLeaveSettingsResponse": { + "additionalProperties": false, + "properties": { + "accrueHoursPerDay": { + "description": "If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued", + "format": "double", + "type": "number" + }, + "accruePayCodeSetUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "accruePaymentInLieuAllGrossPay": { + "description": "Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element", + "type": "boolean" + }, + "accruePaymentInLieuPayAutomatically": { + "description": "Set to true if you want employees to be automatically paid any outstanding holiday pay", + "type": "boolean" + }, + "accruePaymentInLieuRate": { + "description": "The rate at which Payments in Lieu acrrue. Typically this should be 12.07%.", + "format": "double", + "type": "number" + }, + "accrueSetAmount": { + "description": "If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked.", + "type": "boolean" + }, + "accruedHoursAdjustment": { + "description": "Any manual adjustment to the total hours accrued", + "format": "double", + "type": "number" + }, + "accruedHoursAmount": { + "description": "[readonly] The total accrued hours for this employee over the lifetime of their employment so far", + "format": "double", + "type": "number" + }, + "accruedHoursAmountLastPeriod": { + "description": "[readonly] The total accrued hours for this employee in the last pay period", + "format": "double", + "type": "number" + }, + "accruedHoursBalance": { + "description": "[readonly] The balance of hours owed to this employee in lieu of holidays", + "format": "double", + "type": "number" + }, + "accruedHoursPaid": { + "description": "[readonly] The Total amount of hours paid to this employee in lieu of holidays", + "format": "double", + "type": "number" + }, + "accruedPaymentAdjustment": { + "description": "Any manual adjustment to the total accrued", + "format": "double", + "type": "number" + }, + "accruedPaymentBalance": { + "description": "[readonly] The balance of what is owed to this employee in lieu of holidays", + "format": "double", + "readOnly": true, + "type": "number" + }, + "accruedPaymentLiability": { + "description": "[readonly] The total accrued payments for this employee over the lifetime of their employment so far", + "format": "double", + "type": "number" + }, + "accruedPaymentPaid": { + "description": "[readonly] The Total amount paid to this employee in lieu of holidays", + "format": "double", + "type": "number" + }, + "adjustment": { + "description": "Adjustment to number of hours/days/weeks holiday this employee can take per year.\r\nWill reset to 0 when the Allowance resets.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "format": "double", + "nullable": true, + "type": "number" + }, + "aggregatedServiceDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "allowance": { + "description": "The number of days holiday an employee can take per year if HolidayType is Days.\r\nOtherwise this is readonly and gives you the number of days accrued since the last reset", + "format": "double", + "type": "number" + }, + "allowanceRemaining": { + "description": "[readonly] The number of days remaining of the allowance until next reset", + "format": "double", + "type": "number" + }, + "allowanceResetDate": { + "description": "The date that the holiday allowance resets. Only the day/month part of the value is relevant.", + "format": "date", + "type": "string" + }, + "allowanceUsed": { + "description": "[readonly] The number of days used from the allowance since last reset", + "format": "double", + "type": "number" + }, + "allowanceUsedPreviousPeriod": { + "description": "[readonly] The number of days used in the 12 months prior to the last reset", + "format": "double", + "type": "number" + }, + "bereavementLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "holidayAccrualBasis": { + "$ref": "#/components/schemas/HolidayAccrual" + }, + "holidayAccrualDefaultRateType": { + "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + }, + "holidayLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "holidayType": { + "$ref": "#/components/schemas/HolidayType" + }, + "maximumAccruePeriod": { + "description": "The maximum number of hours capable of being accrued in a single period", + "format": "double", + "nullable": true, + "type": "number" + }, + "occupationalSicknessUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "paidHoursAmountLastPeriod": { + "description": "[readonly] The number of hours paid against the pay code", + "format": "double", + "type": "number" + }, + "parentalLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "showAhpOnPayslip": { + "description": "If true then the AHP balance will be shown on the employees payslip.", + "type": "boolean" + }, + "showAllowanceOnPayslip": { + "description": "If true then the remaining Allowance will be shown on the employees payslip.", + "type": "boolean" + }, + "sickLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "unauthorisedLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "useAggregatedServiceDate": { + "type": "boolean" + }, + "useDefaultAccrueHoursPerDay": { + "description": "If true then the value for AccrueHoursPerDay comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAccruePaymentInLieu": { + "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAccruePaymentInLieuPayAutomatically": { + "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAccruePaymentInLieuRate": { + "description": "If true then the value for AccruePaymentInLieuRate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAllowance": { + "description": "If true then the value for the Allowance comes from the Employer record.\r\nThis property only appears if the LeaveSettings if a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAllowanceResetDate": { + "description": "If true then the value for the AllowanceResetDate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultHolidayAccrualBasis": { + "description": "If true then the value for HolidayAccrualBasis comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultHolidayAccrualDefaultRateType": { + "description": "If true then the value for HolidayAccrualDefaultRateType comes from the Employer record.", + "type": "boolean" + }, + "useDefaultHolidayType": { + "description": "If true then the value for HolidayType comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultMaximumAccruePeriod": { + "description": "If true then the value for MaximumAccruePeriod comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.EmployerRequest": { + "additionalProperties": false, + "properties": { + "accruePayCodeSetUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/Contract.Address" + }, + "alternativeId": { + "nullable": true, + "type": "string" + }, + "archived": { + "description": "A flag to indicate whather or not the employer is Archived, ie no longer actively used", + "type": "boolean" + }, + "autoEnrolmentSettings": { + "$ref": "#/components/schemas/Contract.AutoEnrolmentSettingsRequest" + }, + "backPayEnabled": { + "type": "boolean" + }, + "bacsBureauNumber": { + "nullable": true, + "type": "string" + }, + "bacsIncludeAEO": { + "type": "boolean" + }, + "bacsIncludeDeductions": { + "type": "boolean" + }, + "bacsIncludeHmrc": { + "type": "boolean" + }, + "bacsIncludePensions": { + "type": "boolean" + }, + "bacsServiceUserNumber": { + "nullable": true, + "type": "string" + }, + "bankDetails": { + "$ref": "#/components/schemas/Contract.SharedBankDetails" + }, + "bankPaymentsCsvFormat": { + "$ref": "#/components/schemas/BankPaymentInstructionsCsvFormat" + }, + "bankPaymentsReferenceFormat": { + "nullable": true, + "type": "string" + }, + "bereavementLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "betaFeatures": { + "$ref": "#/components/schemas/EmployerBetaFeatures" + }, + "canUseBureauFeatures": { + "type": "boolean" + }, + "costCentreJournalOverridesEnabled": { + "description": "Enables the journal overrides for cost centre, if set to true.", + "type": "boolean" + }, + "crn": { + "description": "Company Registration Number", + "nullable": true, + "type": "string" + }, + "currentYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "defaultPayOptions": { + "$ref": "#/components/schemas/Contract.PayOptionsRequest" + }, + "defaultPension": { + "$ref": "#/components/schemas/Contract.PensionSelectionRequest" + }, + "departmentJournalOverridesEnabled": { + "description": "Enables the journal overrides for departments, if set to true.", + "type": "boolean" + }, + "displayName": { + "nullable": true, + "type": "string" + }, + "educationPayrollEnabled": { + "type": "boolean" + }, + "effectiveDateWorkingPatternsEnabled": { + "type": "boolean" + }, + "employeeCount": { + "description": "[readonly] The number of Employees this Employer has, including CIS Subcontractors.", + "format": "int32", + "type": "integer" + }, + "evcId": { + "description": "If set then this will be used as the Employer ID sent to EVC in place of the standard EmployerId.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "hmrcDetails": { + "$ref": "#/components/schemas/Contract.HmrcDetailsRequest" + }, + "holidayAccrualBasis": { + "$ref": "#/components/schemas/HolidayAccrual" + }, + "holidayAccrualDefaultRateType": { + "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + }, + "holidayLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "isOptedInToEvc": { + "description": "[readonly] Indicates whether or not the Employer is opted in to the Employee Verification Programme.\r\nValue can only be changed by its dedicated API end point.", + "type": "boolean" + }, + "leaveSettings": { + "$ref": "#/components/schemas/Contract.EmployerLeaveSettingsRequest" + }, + "logoSasUrl": { + "nullable": true, + "type": "string" + }, + "logoUrl": { + "nullable": true, + "type": "string" + }, + "mfaEnabled": { + "description": "if set to true requires all users to setup MFA\r\nsupport queries", + "type": "boolean" + }, + "multiRoleEnabled": { + "type": "boolean" + }, + "name": { + "nullable": true, + "type": "string" + }, + "parentalLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "rejectInvalidBankDetails": { + "type": "boolean" + }, + "rtiSubmissionSettings": { + "$ref": "#/components/schemas/Contract.RtiSubmissionSettingsRequest" + }, + "settings": { + "$ref": "#/components/schemas/Contract.EmployerSettingsRequest" + }, + "settingsSortPayrollNumbersAlphanumerically": { + "description": "Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied", + "type": "boolean" + }, + "sickLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "sourceSystemId": { + "description": "[readonly] Can only be given a value when the employer is created. It can then never be changed.\r\nUsed by external systems so they can store an immutable reference", + "nullable": true, + "type": "string" + }, + "startYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "subcontractorCount": { + "description": "[readonly] The number of CIS Subcontractors this Employer has.", + "format": "int32", + "type": "integer" + }, + "supportAccessEnabled": { + "deprecated": true, + "description": "[Deprecated] If set to true then the support team can access this employer to help resolve support queries.\r\nIf SupportAccessExpires is not provided support access will be turned off after 30 days.", + "type": "boolean" + }, + "supportAccessExpires": { + "description": "The date and time when the support access expires", + "format": "date", + "nullable": true, + "type": "string" + }, + "umbrellaSettings": { + "$ref": "#/components/schemas/Contract.UmbrellaSettingsRequest" + }, + "unauthorisedLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "useTenantRtiSubmissionSettings": { + "description": "If the Tenant for this employer has Bureau Features enabled then they can set RtiSubmissionSettings to be used across multiple employers.\r\nIf this is set to true then those settings will be used instead of any set at the Employer level", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.EmployerResponse": { + "additionalProperties": false, + "properties": { + "accruePayCodeSetUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/Contract.Address" + }, + "alternativeId": { + "nullable": true, + "type": "string" + }, + "archived": { + "description": "A flag to indicate whather or not the employer is Archived, ie no longer actively used", + "type": "boolean" + }, + "autoEnrolmentSettings": { + "$ref": "#/components/schemas/Contract.AutoEnrolmentSettingsResponse" + }, + "backPayEnabled": { + "type": "boolean" + }, + "bacsBureauNumber": { + "nullable": true, + "type": "string" + }, + "bacsIncludeAEO": { + "type": "boolean" + }, + "bacsIncludeDeductions": { + "type": "boolean" + }, + "bacsIncludeHmrc": { + "type": "boolean" + }, + "bacsIncludePensions": { + "type": "boolean" + }, + "bacsServiceUserNumber": { + "nullable": true, + "type": "string" + }, + "bankDetails": { + "$ref": "#/components/schemas/Contract.SharedBankDetails" + }, + "bankPaymentsCsvFormat": { + "$ref": "#/components/schemas/BankPaymentInstructionsCsvFormat" + }, + "bankPaymentsReferenceFormat": { + "nullable": true, + "type": "string" + }, + "bereavementLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "betaFeatures": { + "$ref": "#/components/schemas/EmployerBetaFeatures" + }, + "canUseBureauFeatures": { + "type": "boolean" + }, + "canUsePremiumConnectors": { + "description": "Indicates whether the employer has permission to use the premium connectors feature.", + "type": "boolean" + }, + "costCentreJournalOverridesEnabled": { + "description": "Enables the journal overrides for cost centre, if set to true.", + "type": "boolean" + }, + "crn": { + "description": "Company Registration Number", + "nullable": true, + "type": "string" + }, + "currentYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "defaultPayOptions": { + "$ref": "#/components/schemas/Contract.PayOptionsResponse" + }, + "defaultPension": { + "$ref": "#/components/schemas/Contract.PensionSelectionResponse" + }, + "departmentJournalOverridesEnabled": { + "description": "Enables the journal overrides for departments, if set to true.", + "type": "boolean" + }, + "displayName": { + "nullable": true, + "type": "string" + }, + "educationPayrollEnabled": { + "type": "boolean" + }, + "effectiveDateWorkingPatternsEnabled": { + "type": "boolean" + }, + "employeeCount": { + "description": "The default LeaveSettings. Only the Allowance and AllowanceResetDate fields are used.", + "format": "int32", + "type": "integer" + }, + "evcId": { + "description": "If set then this will be used as the Employer ID sent to EVC in place of the standard EmployerId.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "hmrcDetails": { + "$ref": "#/components/schemas/Contract.HmrcDetailsResponse" + }, + "holidayAccrualBasis": { + "$ref": "#/components/schemas/HolidayAccrual" + }, + "holidayAccrualDefaultRateType": { + "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + }, + "holidayLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "isOptedInToEvc": { + "description": "[readonly] Indicates whether or not the Employer is opted in to the Employee Verification Programme.\r\nValue can only be changed by its dedicated API end point.", + "type": "boolean" + }, + "leaveSettings": { + "$ref": "#/components/schemas/Contract.EmployerLeaveSettingsResponse" + }, + "logoSasUrl": { + "nullable": true, + "type": "string" + }, + "logoUrl": { + "nullable": true, + "type": "string" + }, + "mfaEnabled": { + "description": "if set to true requires all users to setup MFA\r\nsupport queries", + "type": "boolean" + }, + "multiRoleEnabled": { + "type": "boolean" + }, + "name": { + "nullable": true, + "type": "string" + }, + "parentalLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "rejectInvalidBankDetails": { + "type": "boolean" + }, + "rtiSubmissionSettings": { + "$ref": "#/components/schemas/Contract.RtiSubmissionSettingsResponse" + }, + "settings": { + "$ref": "#/components/schemas/Contract.EmployerSettingsResponse" + }, + "settingsSortPayrollNumbersAlphanumerically": { + "description": "Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied", + "type": "boolean" + }, + "sickLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "sourceSystemId": { + "description": "[readonly] Can only be given a value when the employer is created. It can then never be changed.\r\nUsed by external systems so they can store an immutable reference", + "nullable": true, + "type": "string" + }, + "startYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "subcontractorCount": { + "description": "[readonly] The number of CIS Subcontractors this Employer has.", + "format": "int32", + "type": "integer" + }, + "supportAccessEnabled": { + "deprecated": true, + "description": "[Deprecated] If set to true then the support team can access this employer to help resolve support queries.\r\nIf SupportAccessExpires is not provided support access will be turned off after 30 days.", + "type": "boolean" + }, + "supportAccessExpires": { + "description": "The date and time when the support access expires", + "format": "date", + "nullable": true, + "type": "string" + }, + "umbrellaSettings": { + "$ref": "#/components/schemas/Contract.UmbrellaSettingsResponse" + }, + "unauthorisedLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "useTenantRtiSubmissionSettings": { + "description": "If the Tenant for this employer has Bureau Features enabled then they can set RtiSubmissionSettings to be used across multiple employers.\r\nIf this is set to true then those settings will be used instead of any set at the Employer level", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.EmployerSettingsRequest": { + "additionalProperties": false, + "properties": { + "allowNegativePay": { + "type": "boolean" + }, + "autoCalcBackPayForNewStarters": { + "type": "boolean" + }, + "calculateEffectiveDateSalaryChanges": { + "type": "boolean" + }, + "contractedWeeks": { + "description": "The amount of weeks an employee works, utilise for employees who aren't working full time.\r\nThis value is the default which can be inherited when creating/updating a WorkingPattern.", + "format": "double", + "type": "number" + }, + "disabledPayRunWarningsList": { + "description": "Pay run warnings that the user has opted to ignore.", + "items": { + "$ref": "#/components/schemas/PayRunEntryWarningType" + }, + "nullable": true, + "type": "array" + }, + "fullTimeContractedHours": { + "description": "The amount of hours an employee works (Full Time).\r\nThis value is the default which can be inherited when creating/updating a WorkingPattern.", + "format": "double", + "type": "number" + }, + "fullTimeContractedWeeks": { + "description": "The amount of weeks an employee works (Full Time).\r\nThis value is the default which can be inherited when creating/updating a WorkingPattern.", + "format": "double", + "type": "number" + }, + "groupPayLinesEnabled": { + "description": "A flag to indicate whether paylines should be grouped. The grouping is done based on the following PayLine properties: Rate, Multiplier, Code, Description and RoleId", + "type": "boolean" + }, + "journalCsvFormat": { + "$ref": "#/components/schemas/JournalCsvFormat" + }, + "manualStatutoryPayLinesEnabled": { + "type": "boolean" + }, + "mergeMatchingNominalsEnabled": { + "type": "boolean" + }, + "nominalMappingsEnabled": { + "description": "Enables the nominal mappings(Custom Codes,System Codes,Control Codes,Employer Codes) for the employer, if set to true.", + "type": "boolean" + }, + "payCodeValidationEnabled": { + "type": "boolean" + }, + "preferAsyncPayrunApiCalls": { + "description": "This setting is only available temporarily and is only setable by users with access to beta features enabled.\r\nIf set to true the the web applicaiton will use new async API calls for managing payruns", + "type": "boolean" + }, + "sortPayrollNumbersAlphanumerically": { + "description": "Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.EmployerSettingsResponse": { + "additionalProperties": false, + "properties": { + "allowNegativePay": { + "type": "boolean" + }, + "autoCalcBackPayForNewStarters": { + "type": "boolean" + }, + "calculateEffectiveDateSalaryChanges": { + "type": "boolean" + }, + "contractedWeeks": { + "description": "The amount of weeks an employee works, utilise for employees who aren't working full time.\r\nThis value is the default which can be inherited when creating/updating a WorkingPattern.", + "format": "double", + "type": "number" + }, + "disabledPayRunWarningsBitmask": { + "format": "int32", + "type": "integer" + }, + "disabledPayRunWarningsList": { + "description": "Pay run warnings that the user has opted to ignore.", + "items": { + "$ref": "#/components/schemas/PayRunEntryWarningType" + }, + "nullable": true, + "type": "array" + }, + "fullTimeContractedHours": { + "description": "The amount of hours an employee works (Full Time).\r\nThis value is the default which can be inherited when creating/updating a WorkingPattern.", + "format": "double", + "type": "number" + }, + "fullTimeContractedWeeks": { + "description": "The amount of weeks an employee works (Full Time).\r\nThis value is the default which can be inherited when creating/updating a WorkingPattern.", + "format": "double", + "type": "number" + }, + "groupPayLinesEnabled": { + "description": "A flag to indicate whether paylines should be grouped. The grouping is done based on the following PayLine properties: Rate, Multiplier, Code, Description and RoleId", + "type": "boolean" + }, + "journalCsvFormat": { + "$ref": "#/components/schemas/JournalCsvFormat" + }, + "manualStatutoryPayLinesEnabled": { + "type": "boolean" + }, + "mergeMatchingNominalsEnabled": { + "type": "boolean" + }, + "nominalMappingsEnabled": { + "description": "Enables the nominal mappings(Custom Codes,System Codes,Control Codes,Employer Codes) for the employer, if set to true.", + "type": "boolean" + }, + "payCodeValidationEnabled": { + "type": "boolean" + }, + "preferAsyncPayrunApiCalls": { + "description": "This setting is only available temporarily and is only setable by users with access to beta features enabled.\r\nIf set to true the the web applicaiton will use new async API calls for managing payruns", + "type": "boolean" + }, + "sortPayrollNumbersAlphanumerically": { + "description": "Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.EmploymentDetailsRequest": { + "additionalProperties": false, + "properties": { + "apprenticeshipEndDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "apprenticeshipStartDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "cis": { + "$ref": "#/components/schemas/Contract.CisDetailsRequest" + }, + "cisSubContractor": { + "description": "Set to True if this Employee is a CIS Subcontractor. The ```Cis``` property contains further information", + "type": "boolean" + }, + "continuousEmploymentDate": { + "description": "Date of continuous employment", + "format": "date", + "nullable": true, + "type": "string" + }, + "department": { + "$ref": "#/components/schemas/Contract.DepartmentRequest" + }, + "directorshipDetails": { + "$ref": "#/components/schemas/Contract.DirectorshipDetails" + }, + "forcePreviousPayrollCode": { + "description": "If this property has a non-empty value then a change of Payroll code will be declared on the next FPS.", + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "furloughCalculationBasis": { + "$ref": "#/components/schemas/FurloughCalculationBasis" + }, + "furloughCalculationBasisAmount": { + "format": "double", + "type": "number" + }, + "furloughEnd": { + "description": "Furlough End Date.", + "format": "date", + "nullable": true, + "type": "string" + }, + "furloughHoursNormallyWorked": { + "format": "double", + "type": "number" + }, + "furloughHoursOnFurlough": { + "format": "double", + "type": "number" + }, + "furloughStart": { + "description": "Furlough Start Date.", + "format": "date", + "nullable": true, + "type": "string" + }, + "isApprentice": { + "description": "Set to True if this Employee is an apprentice. This affects the calculations for National Minimum Wage", + "type": "boolean" + }, + "isWorkingInFreePort": { + "description": "Flag indicating the employee is employed in a Freeport", + "type": "boolean" + }, + "isWorkingInInvestmentZone": { + "description": "Flag indicating the employee is employed in an Investment Zone", + "type": "boolean" + }, + "jobTitle": { + "description": "Job Title of Primary role of the Employee", + "maxLength": 120, + "nullable": true, + "type": "string" + }, + "leaverDetails": { + "$ref": "#/components/schemas/Contract.LeaverDetails" + }, + "onFurlough": { + "description": "Set to true if the employee is on furlough.", + "type": "boolean" + }, + "onHold": { + "description": "Set to true to temporarily exclude the employee from payruns", + "type": "boolean" + }, + "partialFurlough": { + "description": "Set to true if the employee is partially furloughed.", + "type": "boolean" + }, + "payrollCode": { + "description": "The Employees Payroll Code. Must be unique within the Employer.", + "maxLength": 35, + "minLength": 1, + "type": "string" + }, + "roles": { + "description": "List of Roles held by Employee", + "items": { + "$ref": "#/components/schemas/Contract.EmployeeRoleItem" + }, + "nullable": true, + "type": "array" + }, + "starterDetails": { + "$ref": "#/components/schemas/Contract.StarterDetails" + }, + "veteranDetails": { + "$ref": "#/components/schemas/Contract.VeteranDetails" + }, + "workingPattern": { + "description": "Used when calculating payments for Leave.\r\nIf null then the default Working Pattern is used", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "workplacePostcode": { + "description": "Set the workplace postcode, ensuring it is no longer than 10 characters.", + "maxLength": 10, + "nullable": true, + "type": "string" + } + }, + "required": [ + "payrollCode" + ], + "type": "object" + }, + "Contract.EmploymentDetailsResponse": { + "additionalProperties": false, + "properties": { + "apprenticeshipEndDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "apprenticeshipStartDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "cis": { + "$ref": "#/components/schemas/Contract.CisDetailsResponse" + }, + "cisSubContractor": { + "description": "Set to True if this Employee is a CIS Subcontractor. The ```Cis``` property contains further information", + "type": "boolean" + }, + "continuousEmploymentDate": { + "description": "Date of continuous employment", + "format": "date", + "nullable": true, + "type": "string" + }, + "department": { + "$ref": "#/components/schemas/Contract.DepartmentResponse" + }, + "directorshipDetails": { + "$ref": "#/components/schemas/Contract.DirectorshipDetails" + }, + "forcePreviousPayrollCode": { + "description": "If this property has a non-empty value then a change of Payroll code will be declared on the next FPS.", + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "furloughCalculationBasis": { + "$ref": "#/components/schemas/FurloughCalculationBasis" + }, + "furloughCalculationBasisAmount": { + "format": "double", + "type": "number" + }, + "furloughEnd": { + "description": "Furlough End Date.", + "format": "date", + "nullable": true, + "type": "string" + }, + "furloughHoursNormallyWorked": { + "format": "double", + "type": "number" + }, + "furloughHoursOnFurlough": { + "format": "double", + "type": "number" + }, + "furloughStart": { + "description": "Furlough Start Date.", + "format": "date", + "nullable": true, + "type": "string" + }, + "includeSecondedInfoOnStarter": { + "type": "boolean" + }, + "isApprentice": { + "description": "Set to True if this Employee is an apprentice. This affects the calculations for National Minimum Wage", + "type": "boolean" + }, + "isWorkingInFreePort": { + "description": "Flag indicating the employee is employed in a Freeport", + "type": "boolean" + }, + "isWorkingInInvestmentZone": { + "description": "Flag indicating the employee is employed in an Investment Zone", + "type": "boolean" + }, + "jobTitle": { + "description": "Job Title of Primary role of the Employee", + "maxLength": 120, + "nullable": true, + "type": "string" + }, + "leaverDetails": { + "$ref": "#/components/schemas/Contract.LeaverDetails" + }, + "onFurlough": { + "description": "Set to true if the employee is on furlough.", + "type": "boolean" + }, + "onHold": { + "description": "Set to true to temporarily exclude the employee from payruns", + "type": "boolean" + }, + "partialFurlough": { + "description": "Set to true if the employee is partially furloughed.", + "type": "boolean" + }, + "payrollCode": { + "description": "The Employees Payroll Code. Must be unique within the Employer.", + "maxLength": 35, + "minLength": 1, + "type": "string" + }, + "roles": { + "description": "List of Roles held by Employee", + "items": { + "$ref": "#/components/schemas/Contract.EmployeeRoleItem" + }, + "nullable": true, + "type": "array" + }, + "starterDetails": { + "$ref": "#/components/schemas/Contract.StarterDetails" + }, + "veteranDetails": { + "$ref": "#/components/schemas/Contract.VeteranDetails" + }, + "workingPattern": { + "description": "Used when calculating payments for Leave.\r\nIf null then the default Working Pattern is used", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "workplacePostcode": { + "description": "Set the workplace postcode, ensuring it is no longer than 10 characters.", + "maxLength": 10, + "nullable": true, + "type": "string" + } + }, + "required": [ + "payrollCode" + ], + "type": "object" + }, + "Contract.ExternalDataCompanyRequest": { + "additionalProperties": false, + "properties": { + "id": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "schemeName": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.ExternalDataCompanyResponse": { + "additionalProperties": false, + "properties": { + "id": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "schemeName": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.FpsFields": { + "additionalProperties": false, + "properties": { + "excludeFromRtiSubmissions": { + "description": "True if Employee is excluded from RTI submissions", + "type": "boolean" + }, + "hoursNormallyWorked": { + "$ref": "#/components/schemas/HoursNormallyWorked" + }, + "irregularPaymentPattern": { + "description": "True if employee is currently on an irregular payment patter", + "type": "boolean" + }, + "nonIndividual": { + "description": "True if Employee's payments are being made to a body (eg, trustee, corporate organisation or personal representative)", + "type": "boolean" + }, + "offPayrollWorker": { + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.HmrcDetailsRequest": { + "additionalProperties": false, + "properties": { + "accountsOfficeReference": { + "nullable": true, + "type": "string" + }, + "apprenticeshipLevy": { + "type": "boolean" + }, + "apprenticeshipLevyAllowance": { + "format": "double", + "type": "number" + }, + "carryForwardUnpaidLiabilities": { + "description": "If set to true then any unpaid amounts from previous periods will be brought forward\r\nto work out the liability for the current period.\r\nYou'd set this to false if you don't want to track payments.", + "type": "boolean" + }, + "coTax": { + "nullable": true, + "type": "string" + }, + "econ": { + "nullable": true, + "type": "string" + }, + "employmentAllowance": { + "type": "boolean" + }, + "employmentAllowanceMaxClaim": { + "description": "You might reduce this from the default if you've made/are making a claim in another system", + "format": "double", + "type": "number" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "includeEmploymentAllowanceOnMonthlyJournal": { + "description": "If the employer is not on a QuarterlyPaymentSchedule\r\nand is claiming EmploymentAllowance, then set this to true to include a line for\r\nEmployment Allowance on the journal for the monthly schedule.", + "type": "boolean" + }, + "officeNumber": { + "nullable": true, + "type": "string" + }, + "payeReference": { + "nullable": true, + "type": "string" + }, + "paymentDateDayOfMonth": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "paymentDateRule": { + "$ref": "#/components/schemas/PaymentDateRule" + }, + "quarterlyPaymentSchedule": { + "description": "Set to true if the employer pays HMRC on a quarterly schedule.\r\nA value of false implies a monthly schedule.\r\nWarning: Changing this value after starting PayRuns will\r\ndelete any existing payments or adjustments you may have entered.", + "type": "boolean" + }, + "smallEmployersRelief": { + "type": "boolean" + }, + "utr": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.HmrcDetailsResponse": { + "additionalProperties": false, + "properties": { + "accountsOfficeReference": { + "nullable": true, + "type": "string" + }, + "apprenticeshipLevy": { + "type": "boolean" + }, + "apprenticeshipLevyAllowance": { + "format": "double", + "type": "number" + }, + "carryForwardUnpaidLiabilities": { + "description": "If set to true then any unpaid amounts from previous periods will be brought forward\r\nto work out the liability for the current period.\r\nYou'd set this to false if you don't want to track payments.", + "type": "boolean" + }, + "coTax": { + "nullable": true, + "type": "string" + }, + "econ": { + "nullable": true, + "type": "string" + }, + "employmentAllowance": { + "type": "boolean" + }, + "employmentAllowanceMaxClaim": { + "description": "You might reduce this from the default if you've made/are making a claim in another system", + "format": "double", + "type": "number" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "includeEmploymentAllowanceOnMonthlyJournal": { + "description": "If the employer is not on a QuarterlyPaymentSchedule\r\nand is claiming EmploymentAllowance, then set this to true to include a line for\r\nEmployment Allowance on the journal for the monthly schedule.", + "type": "boolean" + }, + "officeNumber": { + "nullable": true, + "type": "string" + }, + "payeReference": { + "nullable": true, + "type": "string" + }, + "paymentDateDayOfMonth": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "paymentDateRule": { + "$ref": "#/components/schemas/PaymentDateRule" + }, + "quarterlyPaymentSchedule": { + "description": "Set to true if the employer pays HMRC on a quarterly schedule.\r\nA value of false implies a monthly schedule.\r\nWarning: Changing this value after starting PayRuns will\r\ndelete any existing payments or adjustments you may have entered.", + "type": "boolean" + }, + "smallEmployersRelief": { + "type": "boolean" + }, + "utr": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.HolidayEntitlementRequest": { + "additionalProperties": false, + "properties": { + "baseHolidayEntitlement": { + "description": "PaySpine Base Holiday Entitlement", + "format": "double", + "type": "number" + }, + "effectiveDate": { + "description": "PaySpine Holiday Entitlement Effective Date", + "format": "date", + "type": "string" + }, + "yearsServiceEntitlementBasis": { + "$ref": "#/components/schemas/PaySpineYearsServiceEntitlementBasis" + }, + "yearsServiceEntitlements": { + "description": "Holiday Entitlement Years Service Entitlements", + "items": { + "$ref": "#/components/schemas/Contract.YearsServiceEntitlementRequest" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "baseHolidayEntitlement", + "effectiveDate" + ], + "type": "object" + }, + "Contract.HolidayEntitlementResponse": { + "additionalProperties": false, + "properties": { + "baseHolidayEntitlement": { + "description": "PaySpine Base Holiday Entitlement", + "format": "double", + "type": "number" + }, + "effectiveDate": { + "description": "PaySpine Holiday Entitlement Effective Date", + "format": "date", + "type": "string" + }, + "uniqueId": { + "description": "Unique identifier for the Holiday Entitlement", + "format": "uuid", + "type": "string" + }, + "yearsServiceEntitlementBasis": { + "$ref": "#/components/schemas/PaySpineYearsServiceEntitlementBasis" + }, + "yearsServiceEntitlements": { + "description": "Holiday Entitlement Years Service Entitlements", + "items": { + "$ref": "#/components/schemas/Contract.YearsServiceEntitlementResponse" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "baseHolidayEntitlement", + "effectiveDate" + ], + "type": "object" + }, + "Contract.HolidayEntitlementUpdateRequest": { + "additionalProperties": false, + "properties": { + "baseHolidayEntitlement": { + "description": "PaySpine Base Holiday Entitlement", + "format": "double", + "type": "number" + }, + "effectiveDate": { + "description": "PaySpine Holiday Entitlement Effective Date", + "format": "date", + "type": "string" + }, + "uniqueId": { + "description": "Unique identifier for the PaySpine Holiday Entitlement.", + "format": "uuid", + "type": "string" + }, + "yearsServiceEntitlementBasis": { + "$ref": "#/components/schemas/PaySpineYearsServiceEntitlementBasis" + }, + "yearsServiceEntitlements": { + "description": "Holiday Entitlement Years Service Entitlements", + "items": { + "$ref": "#/components/schemas/Contract.YearsServiceEntitlementUpdateRequest" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "baseHolidayEntitlement", + "effectiveDate" + ], + "type": "object" + }, + "Contract.HolidaySchemeRequest": { + "additionalProperties": false, + "properties": { + "averageCalculationWeeks": { + "description": "The number of weeks that the average holiday pay calculation is to be calculated over (Default 52)", + "format": "int32", + "type": "integer" + }, + "calculationDurationUnit": { + "$ref": "#/components/schemas/HolidaySchemeDurationType" + }, + "ignoreSxp": { + "description": "Option to ignore weeks where SXP payments have been paid. The calculation will then go back like above until the stated number of weeks are included in the calculation. (Default -True).", + "type": "boolean" + }, + "name": { + "description": "Holiday scheme name", + "minLength": 1, + "type": "string" + }, + "payCodeSetForDaysId": { + "description": "the Paycode set that they want to use for the Days to enable the calculation.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "payCodeSetForHoursId": { + "description": "the Paycode set that they want to use for the Hours to enable the calculation.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "payCodeSetForPayId": { + "description": "the Paycode set that they want to use for the Values to enable the calculation.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "useFallbackRate": { + "description": "Indicates to use employee base hourly rate where the calculated average hourly rate is less", + "type": "boolean" + }, + "useNiPay": { + "description": "If use National insurance gross taxable pay. (Default - True).", + "type": "boolean" + }, + "useOnlyPaidWeeks": { + "description": "If to go back further than the stated no of weeks for calculation if there are weeks where the employee has not been paid. (Default- True)", + "type": "boolean" + }, + "useWorkingPattern": { + "description": "If use the weekly hours or days as per their working pattern as the divisor for the average holiday rate.", + "type": "boolean" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "Contract.HolidaySchemeResponse": { + "additionalProperties": false, + "properties": { + "averageCalculationWeeks": { + "description": "The number of weeks that the average holiday pay calculation is to be calculated over (Default 52)", + "format": "int32", + "type": "integer" + }, + "calculationDurationUnit": { + "$ref": "#/components/schemas/HolidaySchemeDurationType" + }, + "id": { + "description": "Holiday scheme identifier", + "format": "uuid", + "type": "string" + }, + "ignoreSxp": { + "description": "Option to ignore weeks where SXP payments have been paid. The calculation will then go back like above until the stated number of weeks are included in the calculation. (Default -True).", + "type": "boolean" + }, + "name": { + "description": "Holiday scheme name", + "minLength": 1, + "type": "string" + }, + "payCodeSetForDaysId": { + "description": "the Paycode set that they want to use for the Days to enable the calculation.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "payCodeSetForHoursId": { + "description": "the Paycode set that they want to use for the Hours to enable the calculation.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "payCodeSetForPayId": { + "description": "the Paycode set that they want to use for the Values to enable the calculation.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "useFallbackRate": { + "description": "Indicates to use employee base hourly rate where the calculated average hourly rate is less", + "type": "boolean" + }, + "useNiPay": { + "description": "If use National insurance gross taxable pay. (Default - True).", + "type": "boolean" + }, + "useOnlyPaidWeeks": { + "description": "If to go back further than the stated no of weeks for calculation if there are weeks where the employee has not been paid. (Default- True)", + "type": "boolean" + }, + "useWorkingPattern": { + "description": "If use the weekly hours or days as per their working pattern as the divisor for the average holiday rate.", + "type": "boolean" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "Contract.JobErrorResponse": { + "additionalProperties": false, + "properties": { + "createdDate": { + "description": "Date the job error was created", + "format": "date", + "type": "string" + }, + "errorMessage": { + "description": "Error Message", + "nullable": true, + "type": "string" + }, + "errorType": { + "description": "Type of job error", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The unique identifier of the job error.", + "format": "uuid", + "type": "string" + }, + "jobId": { + "description": "Job public Id", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.JobResponse": { + "additionalProperties": false, + "properties": { + "createdDate": { + "description": "Job Created date.", + "format": "date", + "type": "string" + }, + "employerId": { + "description": "Employer public Id.", + "format": "uuid", + "type": "string" + }, + "employerName": { + "description": "Employer name.", + "nullable": true, + "type": "string" + }, + "executionStartTime": { + "description": "The Job excution start time.", + "format": "date", + "nullable": true, + "type": "string" + }, + "executionTime": { + "description": "The time it took the Job to execute in seconds.", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Job public Id.", + "format": "uuid", + "type": "string" + }, + "name": { + "description": "The Job name, e.g. uploaded file for Import, or report display name for Report", + "nullable": true, + "type": "string" + }, + "outputFormat": { + "description": "The Job output format, e.g. json/csv/pdf for Report, or something else for other Job types.", + "nullable": true, + "type": "string" + }, + "requestedByName": { + "description": "The name of the user that requested this job", + "nullable": true, + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/Contract.JobResultResponse" + }, + "status": { + "$ref": "#/components/schemas/JobStatus" + }, + "timeInQueue": { + "description": "The time the Job spent in the queue before execution in seconds.", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "type": { + "$ref": "#/components/schemas/JobType" + }, + "updatedDate": { + "description": "Job Updated date where applicable.", + "format": "date", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.JobResultFileResponse": { + "additionalProperties": false, + "properties": { + "fileName": { + "description": "Result File name", + "nullable": true, + "type": "string" + }, + "uri": { + "description": "Api method URI that can be used to download the result file", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.JobResultResponse": { + "additionalProperties": false, + "properties": { + "errors": { + "description": "Job execution's errors.", + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "file": { + "$ref": "#/components/schemas/Contract.JobResultFileResponse" + }, + "metadata": { + "additionalProperties": { + "nullable": true + }, + "description": "Job result metadata, e.g. Employee Import stats", + "nullable": true, + "type": "object" + } + }, + "type": "object" + }, + "Contract.JournalTemplateRequest": { + "additionalProperties": false, + "properties": { + "content": { + "description": "Content of Journal Template", + "nullable": true, + "type": "string" + }, + "header": { + "description": "Header of Journal Template", + "nullable": true, + "type": "string" + }, + "useColumnHeaders": { + "description": "Indicates whether content is empty or not", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.JournalTemplateResponse": { + "additionalProperties": false, + "properties": { + "content": { + "description": "Content of Journal Template", + "nullable": true, + "type": "string" + }, + "header": { + "description": "Header of Journal Template", + "nullable": true, + "type": "string" + }, + "uniqueId": { + "description": "Journal Template identifier", + "format": "uuid", + "type": "string" + }, + "useColumnHeaders": { + "description": "Indicates whether content is empty or not", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.JournalTokenRequest": { + "additionalProperties": false, + "properties": { + "description": { + "description": "Description of Journal Tokens", + "nullable": true, + "type": "string" + }, + "name": { + "description": "Name of Journal Tokens", + "nullable": true, + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/JournalTokenType" + } + }, + "type": "object" + }, + "Contract.JournalTokenResponse": { + "additionalProperties": false, + "properties": { + "description": { + "description": "Description of Journal Tokens", + "nullable": true, + "type": "string" + }, + "name": { + "description": "Name of Journal Tokens", + "nullable": true, + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/JournalTokenType" + }, + "uniqueId": { + "description": "Journal Token identifier", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.JournalTokenResponseItem": { + "additionalProperties": false, + "properties": { + "id": { + "format": "uuid", + "type": "string" + }, + "metadata": { + "nullable": true + }, + "name": { + "nullable": true, + "type": "string" + }, + "url": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.LeaveImportRequest": { + "additionalProperties": false, + "properties": { + "assumedPensionablePay": { + "description": "Assumed Pensionable Pay (APP) is an average figure, calculated as the average pay in the 3 months\r\n(or 12 weeks if weekly/fortnightly/fourweekly paid) before the absence", + "format": "double", + "nullable": true, + "type": "number" + }, + "automaticAPPCalculation": { + "description": "If set to True then we'll automatically calculate the AssumedPensionablePay. \r\nSet it to false if you want to manually provide a figure that overrides our calculations", + "type": "boolean" + }, + "automaticAWECalculation": { + "description": "Automatic Average Weekly Earnings.", + "type": "boolean" + }, + "averageWeeklyEarnings": { + "description": "The employees average weekly earnings.", + "format": "double", + "nullable": true, + "type": "number" + }, + "calculationType": { + "$ref": "#/components/schemas/LeaveCalculationType" + }, + "from": { + "description": "The first day of Leave.", + "format": "date", + "nullable": true, + "type": "string" + }, + "historicLeaveRequiresProcessing": { + "description": "Only used during the creation of historical SSP.\r\nWhen creating historical SSP, this will determine whether to pay that leave in the next PayRun.", + "type": "boolean" + }, + "offsetPay": { + "description": "Top-up pay to usual amongst (offsetting)", + "type": "boolean" + }, + "openEndedAbsence": { + "description": "Open Ended Absence", + "type": "boolean" + }, + "pay": { + "$ref": "#/components/schemas/LeavePayType" + }, + "paySSPInAddition": { + "description": "Only provided when the leave type is 'Sick' and the payment type is 'Custom'.", + "type": "boolean" + }, + "payrollCode": { + "description": "Payroll Code", + "nullable": true, + "type": "string" + }, + "percentOfPay": { + "description": "Only provided when the leave type is 'Sick' and the payment type is 'Custom'.", + "format": "double", + "nullable": true, + "type": "number" + }, + "strikeHoursToDeduct": { + "description": "Only provided when the leave type is 'StrikeAction' and the calculation type is 'SpecifyHours'.", + "format": "double", + "nullable": true, + "type": "number" + }, + "to": { + "description": "The last day of Leave.", + "format": "date", + "nullable": true, + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/LeaveType" + }, + "useAssumedPensionablePay": { + "description": "Only provided when the leave type is 'Sick' and the payment type is 'Custom', 'Occupational Policy' or 'Statutory Pay'.", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.LeaverDetails": { + "additionalProperties": false, + "properties": { + "hasLeft": { + "type": "boolean" + }, + "isDeceased": { + "type": "boolean" + }, + "leaveDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "p45Sent": { + "type": "boolean" + }, + "payAccruedBalance": { + "description": "If set to true then new PayLine will be added into the PayRunEntry to pay the accrued balance", + "type": "boolean" + }, + "paymentAfterLeaving": { + "type": "boolean" + }, + "paymentMethodAfterLeaving": { + "$ref": "#/components/schemas/PaymentMethodAfterLeaving" + } + }, + "type": "object" + }, + "Contract.LondonAllowanceRequest": { + "additionalProperties": false, + "properties": { + "type": { + "$ref": "#/components/schemas/LondonAllowanceType" + }, + "value": { + "description": "Value of London Allowance", + "format": "double", + "type": "number" + }, + "valueType": { + "$ref": "#/components/schemas/LondonAllowanceValueType" + } + }, + "type": "object" + }, + "Contract.LondonAllowanceResponse": { + "additionalProperties": false, + "properties": { + "type": { + "$ref": "#/components/schemas/LondonAllowanceType" + }, + "uniqueId": { + "description": "London Allowance identifier", + "format": "uuid", + "type": "string" + }, + "value": { + "description": "Value of London Allowance", + "format": "double", + "type": "number" + }, + "valueType": { + "$ref": "#/components/schemas/LondonAllowanceValueType" + } + }, + "type": "object" + }, + "Contract.NetOfOnCostsResponse": { + "additionalProperties": false, + "properties": { + "apprenticeshipLevy": { + "format": "double", + "type": "number" + }, + "employeesPensionContribution": { + "format": "double", + "type": "number" + }, + "employersNi": { + "format": "double", + "type": "number" + }, + "employersPensionContribution": { + "format": "double", + "type": "number" + }, + "grossDailyRate": { + "format": "double", + "type": "number" + }, + "holInclusiveSimulation": { + "$ref": "#/components/schemas/Contract.NetOfOnCostsSimulationResponse" + }, + "holidayPay": { + "format": "double", + "type": "number" + }, + "numberOfDays": { + "format": "double", + "type": "number" + }, + "salary": { + "format": "double", + "type": "number" + }, + "simulation": { + "$ref": "#/components/schemas/Contract.NetOfOnCostsSimulationResponse" + }, + "totalFees": { + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "Contract.NetOfOnCostsSimulationResponse": { + "additionalProperties": false, + "properties": { + "employeePension": { + "format": "double", + "type": "number" + }, + "grossPay": { + "format": "double", + "type": "number" + }, + "netPay": { + "format": "double", + "readOnly": true, + "type": "number" + }, + "niDue": { + "format": "double", + "type": "number" + }, + "taxDue": { + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "Contract.OverseasEmployerDetails": { + "additionalProperties": false, + "properties": { + "eeaCitizen": { + "type": "boolean" + }, + "epm6Scheme": { + "type": "boolean" + }, + "overseasEmployer": { + "type": "boolean" + }, + "overseasSecondmentStatus": { + "$ref": "#/components/schemas/OverseasSecondmentStatus" + } + }, + "type": "object" + }, + "Contract.P11HistoryRequest": { + "additionalProperties": false, + "properties": { + "niablePay": { + "format": "double", + "type": "number" + }, + "payDate": { + "format": "date", + "type": "string" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "periodNumber": { + "format": "int32", + "type": "integer" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + } + }, + "type": "object" + }, + "Contract.P11HistoryResponse": { + "additionalProperties": false, + "properties": { + "id": { + "format": "uuid", + "type": "string" + }, + "niablePay": { + "format": "double", + "type": "number" + }, + "payDate": { + "format": "date", + "type": "string" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "periodNumber": { + "format": "int32", + "type": "integer" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + } + }, + "type": "object" + }, + "Contract.P45AvailabilityResponse": { + "additionalProperties": false, + "properties": { + "isLeaverPresent": { + "description": "Indicates if a leaver is present in the pay run", + "type": "boolean" + }, + "ordinal": { + "description": "The Ordinal of the PayRun", + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "period": { + "description": "The Period (i.e, Tax Week or Tax Month) of the PayRun", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "Contract.PartnerDetails": { + "additionalProperties": false, + "properties": { + "firstName": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "initials": { + "maxLength": 30, + "nullable": true, + "type": "string" + }, + "lastName": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "niNumber": { + "maxLength": 15, + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.PayHistoryRequest": { + "additionalProperties": false, + "properties": { + "days": { + "description": "decimal amount of days worked, if not provided then 0", + "format": "double", + "type": "number" + }, + "employeeId": { + "description": "Employee unique Id", + "format": "uuid", + "type": "string" + }, + "employeeRoleId": { + "description": "Employee role unique Id", + "format": "uuid", + "type": "string" + }, + "hours": { + "description": "decimal amount of hours worked, if not provided then 0", + "format": "double", + "type": "number" + }, + "isStatutoryPayOnly": { + "description": "optional boolean flag, if the period only had SXP present", + "type": "boolean" + }, + "payAmount": { + "description": "monetary amount for given period, if not provided then 0", + "format": "double", + "type": "number" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriodTypes" + }, + "paymentDate": { + "description": "The date payment was made for respective period", + "format": "date", + "type": "string" + }, + "periodNumber": { + "description": "Tax Week or Tax Month number this PayRunEntry relates to", + "format": "int32", + "type": "integer" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYearTypes" + } + }, + "type": "object" + }, + "Contract.PayHistoryResponse": { + "additionalProperties": false, + "properties": { + "days": { + "description": "decimal amount of days worked, if not provided then 0", + "format": "double", + "type": "number" + }, + "employeeId": { + "description": "Employee unique Id", + "format": "uuid", + "type": "string" + }, + "employeeRoleId": { + "description": "Employee role unique Id", + "format": "uuid", + "type": "string" + }, + "hours": { + "description": "decimal amount of hours worked, if not provided then 0", + "format": "double", + "type": "number" + }, + "id": { + "description": "Average Holiday Pay History identifier", + "format": "uuid", + "type": "string" + }, + "isStatutoryPayOnly": { + "description": "optional boolean flag, if the period only had SXP present", + "type": "boolean" + }, + "payAmount": { + "description": "monetary amount for given period, if not provided then 0", + "format": "double", + "type": "number" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriodTypes" + }, + "paymentDate": { + "description": "The date payment was made for respective period", + "format": "date", + "type": "string" + }, + "periodNumber": { + "description": "Tax Week or Tax Month number this PayRunEntry relates to", + "format": "int32", + "type": "integer" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYearTypes" + } + }, + "type": "object" + }, + "Contract.PayHistoryUpdateRequest": { + "additionalProperties": false, + "properties": { + "days": { + "description": "decimal amount of days worked, if not provided then 0", + "format": "double", + "type": "number" + }, + "employeeId": { + "description": "Employee unique Id", + "format": "uuid", + "type": "string" + }, + "employeeRoleId": { + "description": "Employee role unique Id", + "format": "uuid", + "type": "string" + }, + "hours": { + "description": "decimal amount of hours worked, if not provided then 0", + "format": "double", + "type": "number" + }, + "id": { + "description": "Average Holiday Pay History identifier", + "format": "uuid", + "type": "string" + }, + "isStatutoryPayOnly": { + "description": "optional boolean flag, if the period only had SXP present", + "type": "boolean" + }, + "payAmount": { + "description": "monetary amount for given period, if not provided then 0", + "format": "double", + "type": "number" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriodTypes" + }, + "paymentDate": { + "description": "The date payment was made for respective period", + "format": "date", + "type": "string" + }, + "periodNumber": { + "description": "Tax Week or Tax Month number this PayRunEntry relates to", + "format": "int32", + "type": "integer" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYearTypes" + } + }, + "type": "object" + }, + "Contract.PayLineRequest": { + "additionalProperties": false, + "properties": { + "analysisCategoriesCodes": { + "description": "List of analysiscategory id and analysiscategoryCode id", + "items": { + "$ref": "#/components/schemas/Contract.PaylineAnalysisCategoriesCodes" + }, + "nullable": true, + "type": "array" + }, + "analysisCategoryCodeIds": { + "description": "Array of analysiscategoryCode uniqueId", + "items": { + "format": "uuid", + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "analysisCategoryCodesJson": { + "description": "Analysis category id and analysiscategoryCode json", + "nullable": true, + "type": "string" + }, + "annualValue": { + "description": "The original value from the PayLine before we modify it\r\nCurrently only used when CalculationType is set to FixedAnnualAmount\r\nso we can determine whether the payline value needs calculating or not\r\nTo recalculate set to null with annual amount recorded in Value", + "format": "double", + "nullable": true, + "type": "number" + }, + "autoAdjustForLeave": { + "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun", + "type": "boolean" + }, + "calculateAsWhenPaid": { + "description": "Indicates whether this pay line should be treated as When Paid rather than When Earned", + "type": "boolean" + }, + "childId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "code": { + "description": "The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition.", + "nullable": true, + "type": "string" + }, + "contributesToBasicPay": { + "description": "Indicates whether this PayLine contributes to the basic pay of the Employee.", + "type": "boolean" + }, + "costCentre": { + "description": "CostCentre code which we want to override in payline", + "nullable": true, + "type": "string" + }, + "costCentreId": { + "description": "CostCentre uniqueId which we want to override in payline", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "department": { + "description": "Department code which we want to override in payline", + "nullable": true, + "type": "string" + }, + "departmentId": { + "description": "Department uniqueId which we want to override in payline", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "description": { + "description": "A freeform description to accompany this line. It will be displayed on the payslip.", + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "earnedFrom": { + "format": "date", + "nullable": true, + "type": "string" + }, + "earnedTo": { + "format": "date", + "nullable": true, + "type": "string" + }, + "effectiveFrom": { + "description": "The date the payline starts being calculated in payrun", + "format": "date", + "nullable": true, + "type": "string" + }, + "effectiveTo": { + "description": "The date the payline stops being calculated in payrun", + "format": "date", + "nullable": true, + "type": "string" + }, + "fullTimeAnnualValue": { + "description": "Used to set Full Time Annual Value for payline", + "format": "double", + "type": "number" + }, + "ignoreInitialBackPay": { + "description": "Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology.\r\nIf set to false, the automatic backpay calculation will be performed on the first pay run.", + "type": "boolean" + }, + "isAutoGeneratedBasicPayLine": { + "type": "boolean" + }, + "isAutomaticBackPay": { + "description": "Automatically calculate backpay and add or modify the necessary pay lines for this addition/deduction when a pay run is created.\r\nApplicable only to employee level addition/deduction pay lines.\r\nIf set to false then you must manually handle the calculation and adding of backpay lines.", + "type": "boolean" + }, + "isNetToGross": { + "description": "If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target.", + "type": "boolean" + }, + "londonAllowanceId": { + "description": "Used to set London allowance id for payline", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "multiplier": { + "description": "If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours", + "format": "double", + "nullable": true, + "type": "number" + }, + "netToGrossDiscrepancy": { + "description": "The discrepancy between the targeted and the calculated grossed up value durig a net to gross calculation.", + "format": "double", + "nullable": true, + "type": "number" + }, + "paySpineGradeId": { + "description": "[readonly] The Id of the associated pay spine grade.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "paySpineId": { + "description": "[readonly] The Id of the associated pay spine.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "percentageOfEffectiveDays": { + "description": "The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun", + "format": "double", + "nullable": true, + "type": "number" + }, + "rate": { + "description": "If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used", + "format": "double", + "nullable": true, + "type": "number" + }, + "roleId": { + "description": "The employee role which is associated with this pay line.\r\nIf set to null, the pay line is not related with a role.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "spinalPointId": { + "description": "[readonly] The Id of the associated spinal point.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "targetNetToGrossValue": { + "description": "The orginal net fixed addition amount that is considered to be a take home pay target.", + "format": "double", + "nullable": true, + "type": "number" + }, + "totalPaidDays": { + "format": "double", + "nullable": true, + "type": "number" + }, + "totalWorkingDays": { + "format": "double", + "nullable": true, + "type": "number" + }, + "value": { + "description": "The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used).\r\nIf the PayCode has a CalculationType other than FixedAmount then this field will be a percentage.\r\nIf the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "Contract.PayLineResponse": { + "additionalProperties": false, + "properties": { + "analysisCategoriesCodes": { + "description": "List of analysiscategory id and analysiscategoryCode id", + "items": { + "$ref": "#/components/schemas/Contract.PaylineAnalysisCategoriesCodes" + }, + "nullable": true, + "type": "array" + }, + "analysisCategoryCodeIds": { + "description": "Array of analysiscategoryCode uniqueId", + "items": { + "format": "uuid", + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "annualValue": { + "description": "The original value from the PayLine before we modify it\r\nCurrently only used when CalculationType is set to FixedAnnualAmount\r\nso we can determine whether the payline value needs calculating or not\r\nTo recalculate set to null with annual amount recorded in Value", + "format": "double", + "nullable": true, + "type": "number" + }, + "attachmentOrderId": { + "description": "[readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "autoAdjustForLeave": { + "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun", + "type": "boolean" + }, + "calculateAsWhenPaid": { + "description": "Indicates whether this pay line should be treated as When Paid rather than When Earned", + "type": "boolean" + }, + "childId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "code": { + "description": "The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition.", + "nullable": true, + "type": "string" + }, + "contributesToBasicPay": { + "description": "Indicates whether this PayLine contributes to the basic pay of the Employee.", + "type": "boolean" + }, + "costCentre": { + "description": "CostCentre code which we want to override in payline", + "nullable": true, + "type": "string" + }, + "costCentreId": { + "description": "CostCentre uniqueId which we want to override in payline", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "department": { + "description": "Department code which we want to override in payline", + "nullable": true, + "type": "string" + }, + "departmentId": { + "description": "Department uniqueId which we want to override in payline", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "description": { + "description": "A freeform description to accompany this line. It will be displayed on the payslip.", + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "earnedFrom": { + "format": "date", + "nullable": true, + "type": "string" + }, + "earnedTo": { + "format": "date", + "nullable": true, + "type": "string" + }, + "effectiveFrom": { + "description": "The date the payline starts being calculated in payrun", + "format": "date", + "nullable": true, + "type": "string" + }, + "effectiveTo": { + "description": "The date the payline stops being calculated in payrun", + "format": "date", + "nullable": true, + "type": "string" + }, + "fullTimeAnnualValue": { + "description": "Used to set Full Time Annual Value for payline", + "format": "double", + "type": "number" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "ignoreInitialBackPay": { + "description": "Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology.\r\nIf set to false, the automatic backpay calculation will be performed on the first pay run.", + "type": "boolean" + }, + "initialBackPayPublicPayRunId": { + "description": "[readonly] Used to mark the first payrun where this payline has been payrolled for backpay", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "isAutoGeneratedBasicPayLine": { + "type": "boolean" + }, + "isAutomaticBackPay": { + "description": "Automatically calculate backpay and add or modify the necessary pay lines for this addition/deduction when a pay run is created.\r\nApplicable only to employee level addition/deduction pay lines.\r\nIf set to false then you must manually handle the calculation and adding of backpay lines.", + "type": "boolean" + }, + "isNetToGross": { + "description": "If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target.", + "type": "boolean" + }, + "leaveId": { + "description": "[readonly] The Id of the associated Leave. Only included if the PayLine is a result of a Leave with Statutory pay", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "leaveStatutoryDaysPaid": { + "description": "[readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many days they've been paid for (based on their Working Pattern).", + "format": "double", + "nullable": true, + "type": "number" + }, + "leaveStatutoryWeeksPaid": { + "description": "[readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many weeks they've been paid for (based on their Working Pattern).", + "format": "double", + "nullable": true, + "type": "number" + }, + "loanId": { + "description": "[readonly] The Id of the associated Loan, if any.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "londonAllowanceId": { + "description": "Used to set London allowance id for payline", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "multiplier": { + "description": "If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours", + "format": "double", + "nullable": true, + "type": "number" + }, + "netToGrossDiscrepancy": { + "description": "The discrepancy between the targeted and the calculated grossed up value durig a net to gross calculation.", + "format": "double", + "nullable": true, + "type": "number" + }, + "paySpineGradeId": { + "description": "[readonly] The Id of the associated pay spine grade.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "paySpineId": { + "description": "[readonly] The Id of the associated pay spine.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "pensionId": { + "description": "[readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "percentageOfEffectiveDays": { + "description": "The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun", + "format": "double", + "nullable": true, + "type": "number" + }, + "rate": { + "description": "If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used", + "format": "double", + "nullable": true, + "type": "number" + }, + "roleId": { + "description": "The employee role which is associated with this pay line.\r\nIf set to null, the pay line is not related with a role.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "spinalPointId": { + "description": "[readonly] The Id of the associated spinal point.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "targetNetToGrossValue": { + "description": "The orginal net fixed addition amount that is considered to be a take home pay target.", + "format": "double", + "nullable": true, + "type": "number" + }, + "totalPaidDays": { + "format": "double", + "nullable": true, + "type": "number" + }, + "totalWorkingDays": { + "format": "double", + "nullable": true, + "type": "number" + }, + "value": { + "description": "The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used).\r\nIf the PayCode has a CalculationType other than FixedAmount then this field will be a percentage.\r\nIf the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "Contract.PayOptionsBaseResponse": { + "additionalProperties": false, + "properties": { + "autoAdjustForLeave": { + "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun", + "type": "boolean" + }, + "baseDailyRate": { + "description": "This property is used to calculate values for PayCodes that are set as multiples of\r\nthe employees base daily rate. Eg sick.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", + "format": "double", + "type": "number" + }, + "baseHourlyRate": { + "description": "This property is used to calculate values for PayCodes that are set as multiples of\r\nthe employees base hourly rate. Eg Overtime.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", + "format": "double", + "type": "number" + }, + "basis": { + "$ref": "#/components/schemas/PayBasis" + }, + "mapsMiles": { + "description": "The number of miles to pay for as Mileage Allowance Payments", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "mileageVehicleType": { + "$ref": "#/components/schemas/MileageVehicleType" + }, + "nationalMinimumWage": { + "type": "boolean" + }, + "niTable": { + "type": "string" + }, + "payAmount": { + "description": "The amount the Employee is regularly paid each period", + "format": "double", + "type": "number" + }, + "payAmountMultiplier": { + "description": "This property is irrelevant if the basis is Monthly.\r\nBut if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period.", + "format": "double", + "type": "number" + }, + "payCode": { + "description": "If you want the Employees pay to be allocated to a code other than BASIC, specify it here", + "nullable": true, + "type": "string" + }, + "regularPayLines": { + "description": "These are used to make additions/deductions to the pay for this Employee.\r\nYou do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created.", + "items": { + "$ref": "#/components/schemas/Contract.PayLineResponse" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "Contract.PayOptionsImportRequest": { + "additionalProperties": false, + "properties": { + "analysisCategoriesCodes": { + "items": { + "$ref": "#/components/schemas/Contract.PaylineAnalysisCategoriesCodes" + }, + "nullable": true, + "type": "array" + }, + "autoAdjustForLeave": { + "type": "boolean" + }, + "basis": { + "$ref": "#/components/schemas/PayBasis" + }, + "contributesToBasicPay": { + "type": "boolean" + }, + "costCentre": { + "nullable": true, + "type": "string" + }, + "department": { + "nullable": true, + "type": "string" + }, + "effectiveFrom": { + "format": "date", + "nullable": true, + "type": "string" + }, + "effectiveTo": { + "format": "date", + "nullable": true, + "type": "string" + }, + "employerIdentifier": { + "nullable": true, + "type": "string" + }, + "ignoreInitialBackPay": { + "type": "boolean" + }, + "isAutomaticBackPay": { + "type": "boolean" + }, + "isNetToGross": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/Contract.PaylineRequest" + }, + "nullable": true, + "type": "array" + }, + "note": { + "nullable": true, + "type": "string" + }, + "payAmount": { + "format": "double", + "type": "number" + }, + "payAmountMultiplier": { + "format": "double", + "type": "number" + }, + "payCode": { + "nullable": true, + "type": "string" + }, + "payGrade": { + "nullable": true, + "type": "string" + }, + "paySpine": { + "nullable": true, + "type": "string" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "roleReference": { + "nullable": true, + "type": "string" + }, + "spinePoint": { + "nullable": true, + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "Contract.PayOptionsRequest": { + "additionalProperties": false, + "properties": { + "autoAdjustForLeave": { + "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun", + "type": "boolean" + }, + "baseDailyRate": { + "description": "This property is used to calculate values for PayCodes that are set as multiples of\r\nthe employees base daily rate. Eg sick.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", + "format": "double", + "type": "number" + }, + "baseHourlyRate": { + "description": "This property is used to calculate values for PayCodes that are set as multiples of\r\nthe employees base hourly rate. Eg Overtime.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", + "format": "double", + "type": "number" + }, + "basis": { + "$ref": "#/components/schemas/PayBasis" + }, + "fpsFields": { + "$ref": "#/components/schemas/Contract.FpsFields" + }, + "mapsMiles": { + "description": "The number of miles to pay for as Mileage Allowance Payments", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "method": { + "$ref": "#/components/schemas/PayMethod" + }, + "mileageVehicleType": { + "$ref": "#/components/schemas/MileageVehicleType" + }, + "nationalMinimumWage": { + "type": "boolean" + }, + "niTable": { + "type": "string" + }, + "ordinal": { + "description": "Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod.", + "format": "int32", + "type": "integer" + }, + "payAmount": { + "description": "The amount the Employee is regularly paid each period", + "format": "double", + "type": "number" + }, + "payAmountMultiplier": { + "description": "This property is irrelevant if the basis is Monthly.\r\nBut if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period.", + "format": "double", + "type": "number" + }, + "payCode": { + "description": "If you want the Employees pay to be allocated to a code other than BASIC, specify it here", + "nullable": true, + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/PayPeriods" + }, + "regularPayLines": { + "description": "These are used to make additions/deductions to the pay for this Employee.\r\nYou do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created.", + "items": { + "$ref": "#/components/schemas/Contract.PayLineRequest" + }, + "nullable": true, + "type": "array" + }, + "tags": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "taxAndNi": { + "$ref": "#/components/schemas/Contract.TaxAndNi" + }, + "withholdTaxRefundIfPayIsZero": { + "description": "If you don't want negative PAYE values when the Gross pay is zero, set this to true", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.PayOptionsResponse": { + "additionalProperties": false, + "properties": { + "autoAdjustForLeave": { + "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun", + "type": "boolean" + }, + "baseDailyRate": { + "description": "This property is used to calculate values for PayCodes that are set as multiples of\r\nthe employees base daily rate. Eg sick.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", + "format": "double", + "type": "number" + }, + "baseHourlyRate": { + "description": "This property is used to calculate values for PayCodes that are set as multiples of\r\nthe employees base hourly rate. Eg Overtime.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", + "format": "double", + "type": "number" + }, + "basicPay": { + "description": "The amount of basic pay the Employee is regularly paid each period\r\nThis amount is the combined total of all pay elements that contribute to basic pay", + "format": "double", + "type": "number" + }, + "basis": { + "$ref": "#/components/schemas/PayBasis" + }, + "fpsFields": { + "$ref": "#/components/schemas/Contract.FpsFields" + }, + "mapsMiles": { + "description": "The number of miles to pay for as Mileage Allowance Payments", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "method": { + "$ref": "#/components/schemas/PayMethod" + }, + "mileageVehicleType": { + "$ref": "#/components/schemas/MileageVehicleType" + }, + "nationalMinimumWage": { + "type": "boolean" + }, + "niTable": { + "type": "string" + }, + "ordinal": { + "description": "Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod.", + "format": "int32", + "type": "integer" + }, + "payAmount": { + "description": "The amount the Employee is regularly paid each period", + "format": "double", + "type": "number" + }, + "payAmountMultiplier": { + "description": "This property is irrelevant if the basis is Monthly.\r\nBut if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period.", + "format": "double", + "type": "number" + }, + "payCode": { + "description": "If you want the Employees pay to be allocated to a code other than BASIC, specify it here", + "nullable": true, + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/PayPeriods" + }, + "regularPayLines": { + "description": "These are used to make additions/deductions to the pay for this Employee.\r\nYou do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created.", + "items": { + "$ref": "#/components/schemas/Contract.PayLineResponse" + }, + "nullable": true, + "type": "array" + }, + "tags": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "taxAndNi": { + "$ref": "#/components/schemas/Contract.TaxAndNi" + }, + "withholdTaxRefundIfPayIsZero": { + "description": "If you don't want negative PAYE values when the Gross pay is zero, set this to true", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.PayPeriodOrdinalSelection": { + "additionalProperties": false, + "properties": { + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + } + }, + "type": "object" + }, + "Contract.PayRunOverridesImportRequest": { + "additionalProperties": false, + "properties": { + "employeeNi": { + "description": "Employee Ni", + "format": "double", + "nullable": true, + "type": "number" + }, + "employerNi": { + "description": "Employer Ni", + "format": "double", + "nullable": true, + "type": "number" + }, + "paye": { + "description": "PAYE", + "format": "double", + "nullable": true, + "type": "number" + }, + "payrollCode": { + "description": "The payroll code of the employee", + "nullable": true, + "type": "string" + }, + "postGradLoan": { + "description": "Post Graduate Loan", + "format": "double", + "nullable": true, + "type": "number" + }, + "studentLoan": { + "description": "Student Loan", + "format": "double", + "nullable": true, + "type": "number" + } + }, + "type": "object" + }, + "Contract.PayRunResponseItem": { + "additionalProperties": false, + "properties": { + "id": { + "format": "uuid", + "type": "string" + }, + "metadata": { + "nullable": true + }, + "name": { + "nullable": true, + "type": "string" + }, + "url": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.PayRunStateHistoryResponse": { + "additionalProperties": false, + "properties": { + "createdDate": { + "description": "Date in which the State was changed", + "format": "date", + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/PayRunState" + } + }, + "type": "object" + }, + "Contract.PayScheduleByDateRangeRequest": { + "additionalProperties": false, + "description": "Represents a request to retrieve pay schedules within a specific date range for a list of employers.", + "properties": { + "employerIds": { + "description": "Employer ids of PaySchedule", + "items": { + "format": "uuid", + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "fromPayDate": { + "description": "From PayDate of PayRun", + "format": "date", + "type": "string" + }, + "toPayDate": { + "description": "To PayDate of PayRun", + "format": "date", + "type": "string" + } + }, + "type": "object" + }, + "Contract.PayScheduleRequest": { + "additionalProperties": false, + "description": "Represents a request to retrieve pay schedules for a list of employers and tax years.", + "properties": { + "employerIds": { + "description": "Employer ids of PaySchedule", + "items": { + "format": "uuid", + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "taxYears": { + "description": "Tax years of PaySchedule", + "items": { + "$ref": "#/components/schemas/TaxYear" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "Contract.PayScheduleResponseItem": { + "additionalProperties": false, + "properties": { + "id": { + "format": "uuid", + "type": "string" + }, + "metadata": { + "nullable": true + }, + "name": { + "nullable": true, + "type": "string" + }, + "payRunList": { + "items": { + "$ref": "#/components/schemas/Contract.PayRunResponseItem" + }, + "nullable": true, + "type": "array" + }, + "url": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.PaySpineGradeRequest": { + "additionalProperties": false, + "properties": { + "effectiveDate": { + "description": "Date that this configuration is effective from.", + "format": "date", + "type": "string" + }, + "holidayEntitlement": { + "description": "The number of holidays entitled to this pay spine grade.", + "format": "double", + "type": "number" + }, + "lowerPointUniqueId": { + "description": "Id of lower spinal point to be used.", + "format": "uuid", + "type": "string" + }, + "name": { + "description": "Pay spine grade name", + "nullable": true, + "type": "string" + }, + "upperPointUniqueId": { + "description": "Id of upper spinal point to be used.", + "format": "uuid", + "type": "string" + }, + "upperPointUseMax": { + "description": "Use the Alt Max Value of the Upper Point. (Default false)", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.PaySpineGradeResponse": { + "additionalProperties": false, + "properties": { + "effectiveDate": { + "description": "Date that this configuration is effective from.", + "format": "date", + "type": "string" + }, + "holidayEntitlement": { + "description": "The number of holiday days entitled for this pay spine grade.", + "format": "double", + "type": "number" + }, + "lowerPointUniqueId": { + "description": "Id of lower spinal point used.", + "format": "uuid", + "type": "string" + }, + "name": { + "description": "Pay spine grade name", + "nullable": true, + "type": "string" + }, + "uniqueId": { + "description": "Pay spine grade Id", + "format": "uuid", + "type": "string" + }, + "upperPointUniqueId": { + "description": "Id of upper spinal point used.", + "format": "uuid", + "type": "string" + }, + "upperPointUseMax": { + "description": "Use the Alt Max Value of the Upper Point. (Default false)", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.PaySpineRequest": { + "additionalProperties": false, + "properties": { + "annualDecimals": { + "description": "Number of decimal places to calculate Annual Salaries", + "format": "int32", + "type": "integer" + }, + "annualRoundingRule": { + "$ref": "#/components/schemas/AnnualRoundingRule" + }, + "dailyDecimals": { + "description": "Number of decimal places to calculate Daily Rates", + "format": "int32", + "type": "integer" + }, + "dailyDivisor": { + "description": "Days used to determine Full time Daily Rate", + "format": "double", + "type": "number" + }, + "fullTimeHours": { + "description": "Maximum Full Time Hours on this Pay Spine", + "format": "double", + "type": "number" + }, + "fullTimeWeeks": { + "description": "Maximum Full Time Weeks on this Pay Spine", + "format": "double", + "type": "number" + }, + "gradeEffectiveDate": { + "description": "Effective date for applicable grades", + "format": "date", + "type": "string" + }, + "holidayEntitlements": { + "description": "PaySpine Holiday Entitlements", + "items": { + "$ref": "#/components/schemas/Contract.HolidayEntitlementRequest" + }, + "nullable": true, + "type": "array" + }, + "hourlyDecimals": { + "description": "Number of decimal places to calculate Hourly Rates", + "format": "int32", + "type": "integer" + }, + "hourlyDivisor": { + "description": "Hours used to determine Hourly Rate", + "format": "double", + "type": "number" + }, + "incrementRule": { + "$ref": "#/components/schemas/IncrementRule" + }, + "name": { + "description": "Name of the Pay Spine", + "nullable": true, + "type": "string" + }, + "pointEffectiveDate": { + "description": "Effective date for applicable spinal points", + "format": "date", + "type": "string" + }, + "requiresLondonAllowance": { + "description": "Requires LA column to be completed on the spine", + "type": "boolean" + }, + "salaryFormula": { + "description": "Formula used to derive annual salary\r\n\r\nThe salary formula consists of the following elements and Round functions:\r\n- PointValue (The value of an individual Spinal Point)\r\n- HoursWorked (The hours an employee is contracted to work for in their role)\r\n- FTHours (The full time hours specified for an employee in their role)\r\n- WeeksWorked (The contracted weeks an employee works in their role)\r\n- FTWeeks (The full weeks specified for an employee in their role)\r\nRound functions: \r\n- ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15.\r\n- ROUNDUP(Value)\r\n- ROUNDDOWN(Value) \r\n- TRUNCATE(Value)\r\n\r\nFor example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" \r\n", + "nullable": true, + "type": "string" + }, + "useSpineHolidayRules": { + "description": "Flag to include holiday entitlements in Payspine (Default false)", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.PaySpineResponse": { + "additionalProperties": false, + "properties": { + "annualDecimals": { + "description": "Number of decimal places to calculate Annual Salaries", + "format": "int32", + "type": "integer" + }, + "annualRoundingRule": { + "$ref": "#/components/schemas/AnnualRoundingRule" + }, + "dailyDecimals": { + "description": "Number of decimal places to calculate Daily Rates", + "format": "int32", + "type": "integer" + }, + "dailyDivisor": { + "description": "Days used to determine Full time Daily Rate", + "format": "double", + "type": "number" + }, + "fullTimeHours": { + "description": "Maximum Full Time Hours on this Pay Spine", + "format": "double", + "type": "number" + }, + "fullTimeWeeks": { + "description": "Maximum Full Time Weeks on this Pay Spine", + "format": "double", + "type": "number" + }, + "gradeEffectiveDate": { + "description": "Effective date for applicable grades", + "format": "date", + "type": "string" + }, + "holidayEntitlements": { + "items": { + "$ref": "#/components/schemas/Contract.HolidayEntitlementResponse" + }, + "nullable": true, + "type": "array" + }, + "hourlyDecimals": { + "description": "Number of decimal places to calculate Hourly Rates", + "format": "int32", + "type": "integer" + }, + "hourlyDivisor": { + "description": "Hours used to determine Hourly Rate", + "format": "double", + "type": "number" + }, + "id": { + "description": "Pay Spine identifier", + "format": "uuid", + "type": "string" + }, + "incrementRule": { + "$ref": "#/components/schemas/IncrementRule" + }, + "name": { + "description": "Name of the Pay Spine", + "nullable": true, + "type": "string" + }, + "pointEffectiveDate": { + "description": "Effective date for applicable spinal points", + "format": "date", + "type": "string" + }, + "requiresLondonAllowance": { + "description": "Requires LA column to be completed on the spine", + "type": "boolean" + }, + "salaryFormula": { + "description": "Formula used to derive annual salary\r\n\r\nThe salary formula consists of the following elements and Round functions:\r\n- PointValue (The value of an individual Spinal Point)\r\n- HoursWorked (The hours an employee is contracted to work for in their role)\r\n- FTHours (The full time hours specified for an employee in their role)\r\n- WeeksWorked (The contracted weeks an employee works in their role)\r\n- FTWeeks (The full weeks specified for an employee in their role)\r\nRound functions: \r\n- ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15.\r\n- ROUNDUP(Value)\r\n- ROUNDDOWN(Value) \r\n- TRUNCATE(Value)\r\n\r\nFor example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" \r\n", + "nullable": true, + "type": "string" + }, + "useSpineHolidayRules": { + "description": "Flag to include holiday entitlements in Payspine (Default false)", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.PaySpineUpdateRequest": { + "additionalProperties": false, + "properties": { + "annualDecimals": { + "description": "Number of decimal places to calculate Annual Salaries", + "format": "int32", + "type": "integer" + }, + "annualRoundingRule": { + "$ref": "#/components/schemas/AnnualRoundingRule" + }, + "dailyDecimals": { + "description": "Number of decimal places to calculate Daily Rates", + "format": "int32", + "type": "integer" + }, + "dailyDivisor": { + "description": "Days used to determine Full time Daily Rate", + "format": "double", + "type": "number" + }, + "fullTimeHours": { + "description": "Maximum Full Time Hours on this Pay Spine", + "format": "double", + "type": "number" + }, + "fullTimeWeeks": { + "description": "Maximum Full Time Weeks on this Pay Spine", + "format": "double", + "type": "number" + }, + "gradeEffectiveDate": { + "description": "Effective date for applicable grades", + "format": "date", + "type": "string" + }, + "holidayEntitlements": { + "description": "PaySpine Holiday Entitlements", + "items": { + "$ref": "#/components/schemas/Contract.HolidayEntitlementUpdateRequest" + }, + "nullable": true, + "type": "array" + }, + "hourlyDecimals": { + "description": "Number of decimal places to calculate Hourly Rates", + "format": "int32", + "type": "integer" + }, + "hourlyDivisor": { + "description": "Hours used to determine Hourly Rate", + "format": "double", + "type": "number" + }, + "incrementRule": { + "$ref": "#/components/schemas/IncrementRule" + }, + "name": { + "description": "Name of the Pay Spine", + "nullable": true, + "type": "string" + }, + "pointEffectiveDate": { + "description": "Effective date for applicable spinal points", + "format": "date", + "type": "string" + }, + "requiresLondonAllowance": { + "description": "Requires LA column to be completed on the spine", + "type": "boolean" + }, + "salaryFormula": { + "description": "Formula used to derive annual salary\r\n\r\nThe salary formula consists of the following elements and Round functions:\r\n- PointValue (The value of an individual Spinal Point)\r\n- HoursWorked (The hours an employee is contracted to work for in their role)\r\n- FTHours (The full time hours specified for an employee in their role)\r\n- WeeksWorked (The contracted weeks an employee works in their role)\r\n- FTWeeks (The full weeks specified for an employee in their role)\r\nRound functions: \r\n- ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15.\r\n- ROUNDUP(Value)\r\n- ROUNDDOWN(Value) \r\n- TRUNCATE(Value)\r\n\r\nFor example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" \r\n", + "nullable": true, + "type": "string" + }, + "useSpineHolidayRules": { + "description": "Flag to include holiday entitlements in Payspine (Default false)", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.PaylineAnalysisCategoriesCodes": { + "additionalProperties": false, + "properties": { + "analysisCategory": { + "description": "AnalysisCategory Model", + "nullable": true, + "type": "string" + }, + "analysisCategoryCode": { + "description": "AnalysisCategoryCode Model", + "nullable": true, + "type": "string" + }, + "analysisCategoryCodeId": { + "description": "AnalysisCategoryCode Identifier", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "analysisCategoryId": { + "description": "AnalysisCategory Identifier", + "format": "uuid", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.PaylineRequest": { + "additionalProperties": false, + "properties": { + "analysisCategoriesCodes": { + "description": "List of analysis category ids and analysis category code ids.", + "items": { + "$ref": "#/components/schemas/Contract.PaylineAnalysisCategoriesCodes" + }, + "nullable": true, + "type": "array" + }, + "analysisCategoryCodeIds": { + "description": "List of analysis category code unique ids.", + "items": { + "format": "uuid", + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "annualValue": { + "description": "The original value from the PayLine before we modify it.\r\nCurrently only used when CalculationType is set to FixedAnnualAmount\r\nso we can determine whether the payline value needs calculating or not.\r\nTo recalculate set to null with annual amount recorded in Value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "autoAdjustForLeave": { + "description": "This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling midway through a PayRun.", + "type": "boolean" + }, + "calculateAsWhenPaid": { + "description": "Indicates whether this pay line should be treated as When Paid rather than When Earned.", + "type": "boolean" + }, + "childId": { + "description": "The child id.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "code": { + "description": "The PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition.", + "nullable": true, + "type": "string" + }, + "contributesToBasicPay": { + "description": "Indicates whether this PayLine contributes to the basic pay of the Employee.", + "type": "boolean" + }, + "costCentre": { + "description": "CostCentre code which we want to override in the payline.", + "nullable": true, + "type": "string" + }, + "costCentreId": { + "description": "CostCentre uniqueId which we want to override in the payline.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "department": { + "description": "Department code which we want to override in the payline.", + "nullable": true, + "type": "string" + }, + "departmentId": { + "description": "Department uniqueId which we want to override in the payline.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "description": { + "description": "A description to accompany this line. It will be displayed on the payslip.", + "nullable": true, + "type": "string" + }, + "earnedFrom": { + "description": "The earned from date.", + "format": "date", + "nullable": true, + "type": "string" + }, + "earnedTo": { + "description": "The earned to date.", + "format": "date", + "nullable": true, + "type": "string" + }, + "effectiveFrom": { + "description": "The date the payline starts being calculated in the payrun.", + "format": "date", + "nullable": true, + "type": "string" + }, + "effectiveTo": { + "description": "The date the payline stops being calculated in the payrun.", + "format": "date", + "nullable": true, + "type": "string" + }, + "employeeRoleReference": { + "description": "The employee role reference.", + "nullable": true, + "type": "string" + }, + "fullTimeAnnualValue": { + "description": "Used to set the Full Time Annual Value for the payline.", + "format": "double", + "type": "number" + }, + "ignoreInitialBackPay": { + "description": "Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside of Staffology.\r\nIf set to false, the automatic backpay calculation will be performed on the first pay run.", + "type": "boolean" + }, + "isAutoGeneratedBasicPayLine": { + "description": "If the PayLine is an auto-generated basic payline.", + "type": "boolean" + }, + "isAutomaticBackPay": { + "description": "Automatically calculate backpay and add or modify the necessary pay lines for this addition/deduction when a pay run is created.\r\nApplicable only to employee level addition/deduction pay lines.\r\nIf set to false then you must manually handle the calculation and adding of backpay lines.", + "type": "boolean" + }, + "isNetToGross": { + "description": "If the PayLine is a fixed amount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target.", + "type": "boolean" + }, + "isZeroHoursTeachersBackPayLine": { + "description": "If the PayLine is a zero-hours teachers back-pay line.", + "type": "boolean" + }, + "londonAllowanceId": { + "description": "Used to set London allowance id for payline.", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "multiplier": { + "description": "If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours.", + "format": "double", + "nullable": true, + "type": "number" + }, + "netToGrossDiscrepancy": { + "description": "The discrepancy between the targeted and the calculated grossed up value during a net to gross calculation.", + "format": "double", + "nullable": true, + "type": "number" + }, + "payGrade": { + "description": "PayGrade for imported pay lines", + "nullable": true, + "type": "string" + }, + "paySpine": { + "description": "PaySpine for imported pay lines", + "nullable": true, + "type": "string" + }, + "paySpineGradeId": { + "description": "The Id of the associated pay spine grade.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "paySpineId": { + "description": "The Id of the associated pay spine.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "percentageOfEffectiveDays": { + "description": "The percentage of working days the effective dates span for pro-rata values, calculated and set during each payrun.", + "format": "double", + "nullable": true, + "type": "number" + }, + "rate": { + "description": "If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used.", + "format": "double", + "nullable": true, + "type": "number" + }, + "roleId": { + "description": "The employee role which is associated with this pay line.\r\nIf set to null, the pay line is not related with a role.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "spinalPointId": { + "description": "The Id of the associated spinal point.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "spinePoint": { + "description": "SpinePoint for imported pay lines", + "nullable": true, + "type": "string" + }, + "tags": { + "description": "Tags related to this line.", + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "targetNetToGrossValue": { + "description": "The orginal net fixed addition amount that is considered to be a take home pay target.", + "format": "double", + "nullable": true, + "type": "number" + }, + "totalPaidDays": { + "description": "The total paid days.", + "format": "double", + "nullable": true, + "type": "number" + }, + "totalWorkingDays": { + "description": "The total working days.", + "format": "double", + "nullable": true, + "type": "number" + }, + "value": { + "description": "The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used).\r\nIf the PayCode has a CalculationType other than FixedAmount then this field will be a percentage.\r\nIf the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "Contract.PaymentImportRequest": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The amount regularly paid to the Employee", + "format": "double", + "nullable": true, + "type": "number" + }, + "contributesToBasicPay": { + "description": "ContributesToBasicPay for imported pay lines\r\nOnly import if 'Effective date salary changes' is enabled", + "type": "boolean" + }, + "costCentre": { + "description": "Associated costcentre of the employee", + "nullable": true, + "type": "string" + }, + "days": { + "description": "Payment Days", + "format": "double", + "nullable": true, + "type": "number" + }, + "department": { + "description": "Associated department of the employee", + "nullable": true, + "type": "string" + }, + "description": { + "description": "Description", + "nullable": true, + "type": "string" + }, + "effectiveFrom": { + "description": "EffectiveFrom date for imported pay lines", + "format": "date", + "nullable": true, + "type": "string" + }, + "effectiveTo": { + "description": "EffectiveTo date for imported pay lines", + "format": "date", + "nullable": true, + "type": "string" + }, + "hours": { + "description": "Payment Hours", + "format": "double", + "nullable": true, + "type": "number" + }, + "isAlreadyPaid": { + "description": "IsAlreadyPaid\r\nOnly import if 'Effective date salary changes' is enabled", + "type": "boolean" + }, + "isAutomaticBackPay": { + "description": "IsAutomaticBackPay for imported pay lines \r\nOnly import if 'Effective date salary changes' is enabled", + "type": "boolean" + }, + "isNetToGross": { + "description": "IsNetToGross (True/False)", + "type": "boolean" + }, + "londonAllowance": { + "$ref": "#/components/schemas/LondonAllowanceType" + }, + "payCode": { + "description": "If you want to override the PayCode used for the Basic Pay then set the code here, otherwise leave this blank and the default will be used.", + "nullable": true, + "type": "string" + }, + "payGrade": { + "description": "PayGrade for imported pay lines \r\nOnly import if Pay Spines exist", + "nullable": true, + "type": "string" + }, + "paySpine": { + "description": "PaySpine for imported pay lines\r\nOnly import if Pay Spines exist", + "nullable": true, + "type": "string" + }, + "payrollCode": { + "description": "The payroll code of the employee to update", + "nullable": true, + "type": "string" + }, + "percentage": { + "description": "Perentage", + "format": "double", + "nullable": true, + "type": "number" + }, + "proRataAdjustments": { + "description": "ProRataAdjustments (True/False)", + "type": "boolean" + }, + "roleReference": { + "description": "This is the unique reference of the Role that the employee is assigned to.\r\nOnly import if 'Multi-Role Settings' are enabled", + "nullable": true, + "type": "string" + }, + "spinalPoint": { + "description": "SpinePoint for imported pay lines\r\nOnly import if Pay Spines exist", + "nullable": true, + "type": "string" + }, + "treatAsWhenPaid": { + "description": "Only import if 'Education settings' are enabled", + "type": "boolean" + }, + "uniqueId": { + "description": "Optional. If value is provided then update else create payline.", + "format": "uuid", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.PayrollSquadEmployerRequest": { + "additionalProperties": false, + "properties": { + "employerIds": { + "description": "UniqueIds of Employers", + "items": { + "format": "uuid", + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "payrollSquadId": { + "description": "UniqueId of Payroll Squad", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.PayrollSquadEmployerResponse": { + "additionalProperties": false, + "properties": { + "employerId": { + "description": "Employer Id", + "format": "uuid", + "type": "string" + }, + "id": { + "description": "Payroll Squad Employer Id", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.PayrollSquadMemberRequest": { + "additionalProperties": false, + "properties": { + "payrollSquadId": { + "description": "UniqueId of Payroll Squad", + "format": "uuid", + "type": "string" + }, + "role": { + "$ref": "#/components/schemas/UserRole" + }, + "userId": { + "description": "Payroll Squad Selected UserId", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.PayrollSquadMemberResponse": { + "additionalProperties": false, + "properties": { + "displayName": { + "description": "Payroll Squad Member DisplayName", + "nullable": true, + "type": "string" + }, + "emailAddress": { + "description": "Payroll Squad Member EmailAddress", + "nullable": true, + "type": "string" + }, + "id": { + "description": "Payroll Squad Member Identifier", + "format": "uuid", + "type": "string" + }, + "lastLogin": { + "description": "Payroll Squad Member LastLogin", + "format": "date", + "nullable": true, + "type": "string" + }, + "role": { + "$ref": "#/components/schemas/UserRole" + }, + "userId": { + "description": "Payroll Squad User Identifier", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.PayrollSquadRequest": { + "additionalProperties": false, + "properties": { + "employerIds": { + "description": "Employer ids of Payroll Squad", + "items": { + "format": "uuid", + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "name": { + "description": "Name of Payroll Squad", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.PayrollSquadResponse": { + "additionalProperties": false, + "properties": { + "employers": { + "description": "List of all Employers", + "items": { + "$ref": "#/components/schemas/Contract.EmployerBase" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "Payroll Squad Identifier", + "format": "uuid", + "type": "string" + }, + "members": { + "description": "List of all Members", + "items": { + "$ref": "#/components/schemas/Contract.PayrollSquadMemberResponse" + }, + "nullable": true, + "type": "array" + }, + "name": { + "description": "Name of Payroll Squad", + "nullable": true, + "type": "string" + }, + "tenantId": { + "description": "Current Tenant Id", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.PendingLettersCountResponse": { + "additionalProperties": false, + "properties": { + "pendingLettersCount": { + "format": "int32", + "type": "integer" + }, + "requiringAePostponementLettersCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "Contract.PensionAdministratorRequest": { + "additionalProperties": false, + "properties": { + "address": { + "$ref": "#/components/schemas/Contract.Address" + }, + "email": { + "nullable": true, + "type": "string" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.PensionAdministratorResponse": { + "additionalProperties": false, + "properties": { + "address": { + "$ref": "#/components/schemas/Contract.Address" + }, + "email": { + "nullable": true, + "type": "string" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.PensionProviderRequest": { + "additionalProperties": false, + "properties": { + "accountNo": { + "nullable": true, + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/Contract.Address" + }, + "csvFormat": { + "$ref": "#/components/schemas/PensionCsvFormat" + }, + "excludeNilPaidFromContributions": { + "description": "If we're sending contributions to an external provider then we'll include all employees that were on the payrun.\r\nIf you want to exclude employees that don't have any contributions to report then set this to true.", + "type": "boolean" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "miscBoolean1": { + "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\"", + "type": "boolean" + }, + "miscBoolean2": { + "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it indicates whether or not to approve payments after submitting contributions", + "type": "boolean" + }, + "miscString1": { + "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it dictates the PaymentSource.", + "nullable": true, + "type": "string" + }, + "miscString2": { + "description": "This field has different uses dependent on the ExternalDataProvider, if any.", + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "optOutWindow": { + "description": "The number of days or months that an employee has to Opt out after being enrolled", + "format": "int32", + "type": "integer" + }, + "optOutWindowIsMonths": { + "description": "Determines whether the value given for OptOutWindow is in Months (true) or days (false)", + "type": "boolean" + }, + "papdisEmployerId": { + "nullable": true, + "type": "string" + }, + "papdisProviderId": { + "nullable": true, + "type": "string" + }, + "papdisVersion": { + "$ref": "#/components/schemas/PapdisVersion" + }, + "payPeriodDateAdjustment": { + "description": "If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here.\r\nA negative value of will move the date back in time.", + "format": "int32", + "type": "integer" + }, + "portal": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "website": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.PensionProviderResponse": { + "additionalProperties": false, + "properties": { + "accountNo": { + "nullable": true, + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/Contract.Address" + }, + "csvFormat": { + "$ref": "#/components/schemas/PensionCsvFormat" + }, + "excludeNilPaidFromContributions": { + "description": "If we're sending contributions to an external provider then we'll include all employees that were on the payrun.\r\nIf you want to exclude employees that don't have any contributions to report then set this to true.", + "type": "boolean" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "miscBoolean1": { + "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\"", + "type": "boolean" + }, + "miscBoolean2": { + "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it indicates whether or not to approve payments after submitting contributions", + "type": "boolean" + }, + "miscString1": { + "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it dictates the PaymentSource.", + "nullable": true, + "type": "string" + }, + "miscString2": { + "description": "This field has different uses dependent on the ExternalDataProvider, if any.", + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "optOutWindow": { + "description": "The number of days or months that an employee has to Opt out after being enrolled", + "format": "int32", + "type": "integer" + }, + "optOutWindowIsMonths": { + "description": "Determines whether the value given for OptOutWindow is in Months (true) or days (false)", + "type": "boolean" + }, + "papdisEmployerId": { + "nullable": true, + "type": "string" + }, + "papdisProviderId": { + "nullable": true, + "type": "string" + }, + "papdisVersion": { + "$ref": "#/components/schemas/PapdisVersion" + }, + "payPeriodDateAdjustment": { + "description": "If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here.\r\nA negative value of will move the date back in time.", + "format": "int32", + "type": "integer" + }, + "portal": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "website": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.PensionSchemeNominalCodeMappingRequest": { + "additionalProperties": false, + "properties": { + "journalNarrative": { + "nullable": true, + "type": "string" + }, + "nominalCode": { + "nullable": true, + "type": "string" + }, + "nominalName": { + "nullable": true, + "type": "string" + }, + "payCode": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.PensionSchemeNominalCodeMappingResponse": { + "additionalProperties": false, + "properties": { + "journalNarrative": { + "description": "Journal narrative description.", + "nullable": true, + "type": "string" + }, + "nominalCode": { + "description": "Nominal Code for pension scheme", + "nullable": true, + "type": "string" + }, + "nominalName": { + "description": "Nominal Name", + "nullable": true, + "type": "string" + }, + "payCode": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.PensionSchemeReportOptionsLgpsCivicaUpmRequest": { + "additionalProperties": false, + "properties": { + "addressesForNewJoinersOnly": { + "type": "boolean" + }, + "casualHours": { + "$ref": "#/components/schemas/LgpsCivicaCasualHours" + }, + "excludeSchoolEmployerName": { + "type": "boolean" + }, + "fullTimeHoursAsOneHundred": { + "type": "boolean" + }, + "includeFolderNo": { + "type": "boolean" + }, + "includeWeeksWorkedColumns": { + "type": "boolean" + }, + "omitHeaderLine": { + "type": "boolean" + }, + "payrollNumber": { + "$ref": "#/components/schemas/LgpsCivicaPayrollNumber" + }, + "proRatePtHoursWeeksWorked": { + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.PensionSchemeReportOptionsLgpsCivicaUpmResponse": { + "additionalProperties": false, + "properties": { + "addressesForNewJoinersOnly": { + "type": "boolean" + }, + "casualHours": { + "$ref": "#/components/schemas/LgpsCivicaCasualHours" + }, + "excludeSchoolEmployerName": { + "type": "boolean" + }, + "fullTimeHoursAsOneHundred": { + "type": "boolean" + }, + "includeFolderNo": { + "type": "boolean" + }, + "includeWeeksWorkedColumns": { + "type": "boolean" + }, + "omitHeaderLine": { + "type": "boolean" + }, + "payrollNumber": { + "$ref": "#/components/schemas/LgpsCivicaPayrollNumber" + }, + "proRatePtHoursWeeksWorked": { + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.PensionSchemeReportOptionsLgpsIConnectRequest": { + "additionalProperties": false, + "properties": { + "breakReasonSmpIndicatorOnly": { + "type": "boolean" + }, + "casualStaffHoursAsOne": { + "type": "boolean" + }, + "casualStaffIndicatorAsY": { + "type": "boolean" + }, + "customText": { + "nullable": true, + "type": "string" + }, + "fileType": { + "$ref": "#/components/schemas/LgpsIConnectFileType" + }, + "forceUpperCase": { + "type": "boolean" + }, + "ignoreHours": { + "type": "boolean" + }, + "ignoreTermTimeWeeksForFteFinalPay": { + "type": "boolean" + }, + "includeAeQualifyingEarnings": { + "type": "boolean" + }, + "includeEmploymentBreaks": { + "type": "boolean" + }, + "payrollReference1": { + "$ref": "#/components/schemas/LgpsIConnectPayrollReference" + }, + "payrollReference2": { + "$ref": "#/components/schemas/LgpsIConnectPayrollReference" + }, + "payrollReference3": { + "$ref": "#/components/schemas/LgpsIConnectPayrollReference" + }, + "populateEmailAddress": { + "type": "boolean" + }, + "populateMaritalStatus": { + "type": "boolean" + }, + "populateMobileNumber": { + "type": "boolean" + }, + "populateTelephoneNumber": { + "type": "boolean" + }, + "populateWorksAddress": { + "type": "boolean" + }, + "populateWorksEmailAddress": { + "type": "boolean" + }, + "populateWorksPlaceName": { + "type": "boolean" + }, + "proRatePtHoursByTermTimeWeeks": { + "type": "boolean" + }, + "salaryType": { + "$ref": "#/components/schemas/LgpsIConnectSalaryType" + }, + "showFteAnnualSalaryForFteFinalPay": { + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.PensionSchemeReportOptionsLgpsIConnectResponse": { + "additionalProperties": false, + "properties": { + "breakReasonSmpIndicatorOnly": { + "type": "boolean" + }, + "casualStaffHoursAsOne": { + "type": "boolean" + }, + "casualStaffIndicatorAsY": { + "type": "boolean" + }, + "customText": { + "nullable": true, + "type": "string" + }, + "fileType": { + "$ref": "#/components/schemas/LgpsIConnectFileType" + }, + "forceUpperCase": { + "type": "boolean" + }, + "ignoreHours": { + "type": "boolean" + }, + "ignoreTermTimeWeeksForFteFinalPay": { + "type": "boolean" + }, + "includeAeQualifyingEarnings": { + "type": "boolean" + }, + "includeEmploymentBreaks": { + "type": "boolean" + }, + "payrollReference1": { + "$ref": "#/components/schemas/LgpsIConnectPayrollReference" + }, + "payrollReference2": { + "$ref": "#/components/schemas/LgpsIConnectPayrollReference" + }, + "payrollReference3": { + "$ref": "#/components/schemas/LgpsIConnectPayrollReference" + }, + "populateEmailAddress": { + "type": "boolean" + }, + "populateMaritalStatus": { + "type": "boolean" + }, + "populateMobileNumber": { + "type": "boolean" + }, + "populateTelephoneNumber": { + "type": "boolean" + }, + "populateWorksAddress": { + "type": "boolean" + }, + "populateWorksEmailAddress": { + "type": "boolean" + }, + "populateWorksPlaceName": { + "type": "boolean" + }, + "proRatePtHoursByTermTimeWeeks": { + "type": "boolean" + }, + "salaryType": { + "$ref": "#/components/schemas/LgpsIConnectSalaryType" + }, + "showFteAnnualSalaryForFteFinalPay": { + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.PensionSchemeRequest": { + "additionalProperties": false, + "properties": { + "administrator": { + "$ref": "#/components/schemas/Contract.PensionAdministratorRequest" + }, + "bankDetails": { + "$ref": "#/components/schemas/Contract.BankDetails" + }, + "customPayCodes": { + "description": "If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code\r\nthat we'll treat as being pensionable.", + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "deficitValue": { + "description": "The Defict value that will be deducted in a PaySchedule", + "format": "double", + "nullable": true, + "type": "number" + }, + "deficitValueOrdinal": { + "description": "The Ordinal used to identify the PaySchedule which the Deficit will be against", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "deficitValuePayPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "disableAeLetters": { + "description": "Set to true if the provider deals with AutoEnrolment Letters and therefore the system should not generate them", + "type": "boolean" + }, + "displayName": { + "nullable": true, + "readOnly": true, + "type": "string" + }, + "externalDataCompany": { + "$ref": "#/components/schemas/Contract.ExternalDataCompanyRequest" + }, + "externalDataProviderId": { + "$ref": "#/components/schemas/ExternalDataProviderId" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "includeDeficitValue": { + "description": "Set to true if this a Deficit Payment needs to be assigned to a PaySchedule", + "type": "boolean" + }, + "name": { + "nullable": true, + "type": "string" + }, + "nominalCodeMappings": { + "description": "The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration", + "items": { + "$ref": "#/components/schemas/Contract.PensionSchemeNominalCodeMappingRequest" + }, + "nullable": true, + "type": "array" + }, + "payCodeSetUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "payCodeType": { + "$ref": "#/components/schemas/PensionPayCode" + }, + "payMethod": { + "$ref": "#/components/schemas/PayMethod" + }, + "paymentDateDayOfMonth": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "paymentDateDayOfWeek": { + "$ref": "#/components/schemas/DayOfWeek" + }, + "paymentDateRule": { + "$ref": "#/components/schemas/PaymentDateRule" + }, + "pensionRule": { + "$ref": "#/components/schemas/PensionRule" + }, + "provider": { + "$ref": "#/components/schemas/Contract.PensionProviderRequest" + }, + "qualifyingScheme": { + "description": "Set to true if this is a Qualifying Scheme for Auto Enrolment", + "type": "boolean" + }, + "reportOptionsLgpsCivicaUpm": { + "$ref": "#/components/schemas/Contract.PensionSchemeReportOptionsLgpsCivicaUpmRequest" + }, + "reportOptionsLgpsIConnect": { + "$ref": "#/components/schemas/Contract.PensionSchemeReportOptionsLgpsIConnectRequest" + }, + "subtractBasicRateTax": { + "type": "boolean" + }, + "tierablePayCustomPayCodes": { + "description": "If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code\r\nthat we'll treat as being tierable.", + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "tierablePayPayCodeSetUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "tierablePayPayCodeType": { + "$ref": "#/components/schemas/PensionPayCode" + }, + "useCustomPayCodes": { + "description": "If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable\r\nwe'll instead treat it as pensionable if the Code is included in CustomPayCodes", + "type": "boolean" + }, + "useCustomPayCodesForTierablePay": { + "description": "If set to true then rather than using the setting on the PayCode to determine if the pay is tierable\r\nwe'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes", + "type": "boolean" + }, + "workerGroups": { + "description": "A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup", + "items": { + "$ref": "#/components/schemas/Contract.WorkerGroupRequest" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "Contract.PensionSchemeResponse": { + "additionalProperties": false, + "properties": { + "administrator": { + "$ref": "#/components/schemas/Contract.PensionAdministratorResponse" + }, + "bankDetails": { + "$ref": "#/components/schemas/Contract.BankDetails" + }, + "customPayCodes": { + "description": "If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code\r\nthat we'll treat as being pensionable.", + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "deficitValue": { + "description": "The Defict value that will be deducted in a PaySchedule", + "format": "double", + "nullable": true, + "type": "number" + }, + "deficitValueOrdinal": { + "description": "The Ordinal used to identify the PaySchedule which the Deficit will be against", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "deficitValuePayPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "disableAeLetters": { + "description": "Set to true if the provider deals with AutoEnrolment Letters and therefore the system should not generate them", + "type": "boolean" + }, + "displayName": { + "nullable": true, + "readOnly": true, + "type": "string" + }, + "externalDataCompany": { + "$ref": "#/components/schemas/Contract.ExternalDataCompanyResponse" + }, + "externalDataProviderId": { + "$ref": "#/components/schemas/ExternalDataProviderId" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "includeDeficitValue": { + "description": "Set to true if this a Deficit Payment needs to be assigned to a PaySchedule", + "type": "boolean" + }, + "name": { + "nullable": true, + "type": "string" + }, + "nominalCodeMappings": { + "description": "The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration", + "items": { + "$ref": "#/components/schemas/Contract.PensionSchemeNominalCodeMappingResponse" + }, + "nullable": true, + "type": "array" + }, + "payCodeSetUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "payCodeType": { + "$ref": "#/components/schemas/PensionPayCode" + }, + "payMethod": { + "$ref": "#/components/schemas/PayMethod" + }, + "paymentDateDayOfMonth": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "paymentDateDayOfWeek": { + "$ref": "#/components/schemas/DayOfWeek" + }, + "paymentDateRule": { + "$ref": "#/components/schemas/PaymentDateRule" + }, + "pensionRule": { + "$ref": "#/components/schemas/PensionRule" + }, + "provider": { + "$ref": "#/components/schemas/Contract.PensionProviderResponse" + }, + "qualifyingScheme": { + "description": "Set to true if this is a Qualifying Scheme for Auto Enrolment", + "type": "boolean" + }, + "reportOptionsLgpsCivicaUpm": { + "$ref": "#/components/schemas/Contract.PensionSchemeReportOptionsLgpsCivicaUpmResponse" + }, + "reportOptionsLgpsIConnect": { + "$ref": "#/components/schemas/Contract.PensionSchemeReportOptionsLgpsIConnectResponse" + }, + "subtractBasicRateTax": { + "type": "boolean" + }, + "tierablePayCustomPayCodes": { + "description": "If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code\r\nthat we'll treat as being tierable.", + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "tierablePayPayCodeSetUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "tierablePayPayCodeType": { + "$ref": "#/components/schemas/PensionPayCode" + }, + "useCustomPayCodes": { + "description": "If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable\r\nwe'll instead treat it as pensionable if the Code is included in CustomPayCodes", + "type": "boolean" + }, + "useCustomPayCodesForTierablePay": { + "description": "If set to true then rather than using the setting on the PayCode to determine if the pay is tierable\r\nwe'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes", + "type": "boolean" + }, + "workerGroups": { + "description": "A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup", + "items": { + "$ref": "#/components/schemas/Contract.WorkerGroupResponse" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "Contract.PensionSelectionRequest": { + "additionalProperties": false, + "properties": { + "autoEnrolled": { + "description": "[readonly] Is True if the employee joined this Pension due to an AutoEnrolment action", + "type": "boolean" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "pensionScheme": { + "$ref": "#/components/schemas/Contract.PensionSchemeRequest" + }, + "pensionSchemeId": { + "format": "uuid", + "type": "string" + }, + "workerGroupId": { + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.PensionSelectionResponse": { + "additionalProperties": false, + "properties": { + "autoEnrolled": { + "description": "[readonly] Is True if the employee joined this Pension due to an AutoEnrolment action", + "type": "boolean" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "pensionScheme": { + "$ref": "#/components/schemas/Contract.PensionSchemeResponse" + }, + "pensionSchemeId": { + "format": "uuid", + "type": "string" + }, + "workerGroupId": { + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.PensionerPayroll": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Annual amount of occupational pension", + "format": "double", + "type": "number" + }, + "bereaved": { + "description": "Indicator that Occupational Pension is being paid because they are a recently bereaved Spouse/Civil Partner", + "type": "boolean" + }, + "inReceiptOfPension": { + "description": "If set to true then the FPS will have the OccPenInd flag set to 'yes'", + "type": "boolean" + }, + "startDate": { + "description": "Start date of occupational Pension", + "format": "date", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.PersonalDetailsRequest": { + "additionalProperties": false, + "properties": { + "address": { + "$ref": "#/components/schemas/Contract.Address" + }, + "alternativeEmail": { + "format": "email", + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "dateOfBirth": { + "format": "date", + "type": "string" + }, + "email": { + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "emailPayslip": { + "description": "If set to true then the employees Payslip will be sent by email when a PayRun is finalised.", + "type": "boolean" + }, + "emailStatement": { + "description": "Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted.", + "type": "boolean" + }, + "firstName": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "gender": { + "$ref": "#/components/schemas/Gender" + }, + "lastName": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "maritalStatus": { + "$ref": "#/components/schemas/MaritalStatus" + }, + "middleName": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "mobile": { + "maxLength": 30, + "nullable": true, + "type": "string" + }, + "niNumber": { + "maxLength": 15, + "nullable": true, + "type": "string" + }, + "partnerDetails": { + "$ref": "#/components/schemas/Contract.PartnerDetails" + }, + "passportNumber": { + "maxLength": 25, + "nullable": true, + "type": "string" + }, + "pdfPassword": { + "description": "Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property.", + "nullable": true, + "type": "string" + }, + "pdfPasswordType": { + "$ref": "#/components/schemas/PdfPasswordType" + }, + "photoSasUrl": { + "nullable": true, + "type": "string" + }, + "photoUrl": { + "maxLength": 250, + "nullable": true, + "type": "string" + }, + "previousSurName": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "telephone": { + "maxLength": 30, + "nullable": true, + "type": "string" + }, + "title": { + "maxLength": 30, + "nullable": true, + "type": "string" + } + }, + "required": [ + "dateOfBirth", + "gender", + "maritalStatus" + ], + "type": "object" + }, + "Contract.PersonalDetailsResponse": { + "additionalProperties": false, + "properties": { + "address": { + "$ref": "#/components/schemas/Contract.Address" + }, + "alternativeEmail": { + "format": "email", + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "dateOfBirth": { + "format": "date", + "type": "string" + }, + "email": { + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "emailPayslip": { + "description": "If set to true then the employees Payslip will be sent by email when a PayRun is finalised.", + "type": "boolean" + }, + "emailStatement": { + "description": "Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted.", + "type": "boolean" + }, + "firstName": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "gender": { + "$ref": "#/components/schemas/Gender" + }, + "lastName": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "maritalStatus": { + "$ref": "#/components/schemas/MaritalStatus" + }, + "middleName": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "mobile": { + "maxLength": 30, + "nullable": true, + "type": "string" + }, + "niNumber": { + "maxLength": 15, + "nullable": true, + "type": "string" + }, + "partnerDetails": { + "$ref": "#/components/schemas/Contract.PartnerDetails" + }, + "passportNumber": { + "maxLength": 25, + "nullable": true, + "type": "string" + }, + "pdfPassword": { + "description": "Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property.", + "nullable": true, + "type": "string" + }, + "pdfPasswordType": { + "$ref": "#/components/schemas/PdfPasswordType" + }, + "photoSasUrl": { + "nullable": true, + "type": "string" + }, + "photoUrl": { + "maxLength": 250, + "nullable": true, + "type": "string" + }, + "previousSurName": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "statePensionAge": { + "description": "Automatically calculated.", + "format": "int32", + "type": "integer" + }, + "telephone": { + "maxLength": 30, + "nullable": true, + "type": "string" + }, + "title": { + "maxLength": 30, + "nullable": true, + "type": "string" + } + }, + "required": [ + "dateOfBirth", + "gender", + "maritalStatus" + ], + "type": "object" + }, + "Contract.ReapplyDpsNoticeResponse": { + "additionalProperties": false, + "properties": { + "numberOfAppliedNotices": { + "format": "int32", + "type": "integer" + }, + "numberOfFailedNotices": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "Contract.ReportTemplateColumnRequest": { + "additionalProperties": false, + "properties": { + "content": { + "description": "The content associated with the column", + "nullable": true, + "type": "string" + }, + "header": { + "description": "The header text of the column", + "nullable": true, + "type": "string" + }, + "position": { + "description": "The position of the column in the template", + "format": "int32", + "type": "integer" + }, + "type": { + "$ref": "#/components/schemas/ReportTemplateColumnType" + } + }, + "type": "object" + }, + "Contract.ReportTemplateColumnResponse": { + "additionalProperties": false, + "properties": { + "content": { + "description": "The content associated with the column", + "nullable": true, + "type": "string" + }, + "header": { + "description": "The header text of the column", + "nullable": true, + "type": "string" + }, + "position": { + "description": "The position of the column in the template", + "format": "int32", + "type": "integer" + }, + "type": { + "$ref": "#/components/schemas/ReportTemplateColumnType" + } + }, + "type": "object" + }, + "Contract.ReportTemplateContentDictionaryResponse": { + "additionalProperties": false, + "properties": { + "content": { + "description": "The content list of report template column", + "items": { + "$ref": "#/components/schemas/Contract.ReportTemplateContentResponse" + }, + "nullable": true, + "type": "array" + }, + "type": { + "$ref": "#/components/schemas/ReportTemplateColumnType" + } + }, + "type": "object" + }, + "Contract.ReportTemplateContentResponse": { + "additionalProperties": false, + "properties": { + "groupName": { + "description": "Group name of the report template content", + "nullable": true, + "type": "string" + }, + "name": { + "description": "The name of the report template content", + "nullable": true, + "type": "string" + }, + "value": { + "description": "The value of the report template content, which will be enclosed in curly braces", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.ReportTemplateRequest": { + "additionalProperties": false, + "properties": { + "description": { + "description": "The description of the report template", + "nullable": true, + "type": "string" + }, + "reportTemplateColumns": { + "description": "The list of the report template columns", + "items": { + "$ref": "#/components/schemas/Contract.ReportTemplateColumnRequest" + }, + "nullable": true, + "type": "array" + }, + "templateName": { + "description": "The name of the report template", + "minLength": 1, + "type": "string" + } + }, + "required": [ + "templateName" + ], + "type": "object" + }, + "Contract.ReportTemplateResponse": { + "additionalProperties": false, + "properties": { + "createdDate": { + "description": "Created date of the report template column", + "format": "date", + "type": "string" + }, + "description": { + "description": "Description of the report template", + "nullable": true, + "type": "string" + }, + "reportTemplateColumns": { + "description": "List of the report template column", + "items": { + "$ref": "#/components/schemas/Contract.ReportTemplateColumnResponse" + }, + "nullable": true, + "type": "array" + }, + "templateName": { + "description": "Name of the report template", + "nullable": true, + "type": "string" + }, + "uniqueId": { + "description": "Unique Id of report template column", + "format": "uuid", + "type": "string" + }, + "updatedDate": { + "description": "Updated date of the report template column", + "format": "date", + "nullable": true, + "type": "string" + }, + "userName": { + "description": "Name of the user who created the report template", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.RightToWork": { + "additionalProperties": false, + "properties": { + "checked": { + "type": "boolean" + }, + "documentExpiry": { + "format": "date", + "nullable": true, + "type": "string" + }, + "documentRef": { + "maxLength": 80, + "nullable": true, + "type": "string" + }, + "documentType": { + "$ref": "#/components/schemas/RightToWorkDocumentType" + }, + "note": { + "maxLength": 200, + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.RtiAgentRequest": { + "additionalProperties": false, + "properties": { + "address": { + "$ref": "#/components/schemas/Contract.Address" + }, + "agentId": { + "nullable": true, + "type": "string" + }, + "company": { + "nullable": true, + "type": "string" + }, + "contact": { + "$ref": "#/components/schemas/Contract.RtiContactRequest" + } + }, + "type": "object" + }, + "Contract.RtiAgentResponse": { + "additionalProperties": false, + "properties": { + "address": { + "$ref": "#/components/schemas/Contract.Address" + }, + "agentId": { + "nullable": true, + "type": "string" + }, + "company": { + "nullable": true, + "type": "string" + }, + "contact": { + "$ref": "#/components/schemas/Contract.RtiContactResponse" + } + }, + "type": "object" + }, + "Contract.RtiContactRequest": { + "additionalProperties": false, + "properties": { + "email": { + "nullable": true, + "type": "string" + }, + "firstName": { + "nullable": true, + "type": "string" + }, + "lastName": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.RtiContactResponse": { + "additionalProperties": false, + "properties": { + "email": { + "nullable": true, + "type": "string" + }, + "firstName": { + "nullable": true, + "type": "string" + }, + "lastName": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.RtiEmployeeAddress": { + "additionalProperties": false, + "properties": { + "country": { + "nullable": true, + "type": "string" + }, + "foreignCountry": { + "nullable": true, + "type": "string" + }, + "line": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "postCode": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "ukPostcode": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.RtiEmployeeName": { + "additionalProperties": false, + "properties": { + "fore": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "initials": { + "nullable": true, + "type": "string" + }, + "sur": { + "nullable": true, + "type": "string" + }, + "ttl": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.RtiSubmissionSettingsRequest": { + "additionalProperties": false, + "properties": { + "agent": { + "$ref": "#/components/schemas/Contract.RtiAgentRequest" + }, + "allowLinkedEps": { + "description": "If set to true this will allow you to submit a combined Employer Payment Summary", + "type": "boolean" + }, + "autoSubmitEps": { + "description": "If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun", + "type": "boolean" + }, + "autoSubmitFps": { + "description": "If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun", + "type": "boolean" + }, + "contact": { + "$ref": "#/components/schemas/Contract.RtiContactRequest" + }, + "excludeNilPaid": { + "description": "Whether or not to include Employees paid a zero amount on your FPS", + "type": "boolean" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "type": "string" + }, + "includeHashCrossRef": { + "description": "[readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions\r\nThis is automatically set to true if you use a bank payments CSV format that supports it\r\nor set to false if not", + "type": "boolean" + }, + "overrideTimestampValue": { + "description": "If a value is provided then it will be used as the timestamp on the RTI submission. This would normally only be used for testing purposes.", + "nullable": true, + "type": "string" + }, + "password": { + "description": "The Password used to submit RTI documents to HMRC", + "nullable": true, + "type": "string" + }, + "senderId": { + "description": "The SenderId used to submit RTI documents to HMRC", + "nullable": true, + "type": "string" + }, + "senderType": { + "$ref": "#/components/schemas/RtiSenderType" + }, + "shouldCompressFps": { + "description": "If set to true this will compress the FPS before submitting to HMRC", + "type": "boolean" + }, + "testInLive": { + "description": "Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it", + "type": "boolean" + }, + "useTestGateway": { + "description": "If set to true then your RTI documents will be sent to HMRCs test services instead of the live service", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.RtiSubmissionSettingsResponse": { + "additionalProperties": false, + "properties": { + "agent": { + "$ref": "#/components/schemas/Contract.RtiAgentResponse" + }, + "allowLinkedEps": { + "description": "If set to true this will allow you to submit a combined Employer Payment Summary", + "type": "boolean" + }, + "autoSubmitEps": { + "description": "If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun", + "type": "boolean" + }, + "autoSubmitFps": { + "description": "If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun", + "type": "boolean" + }, + "contact": { + "$ref": "#/components/schemas/Contract.RtiContactResponse" + }, + "excludeNilPaid": { + "description": "Whether or not to include Employees paid a zero amount on your FPS", + "type": "boolean" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "includeHashCrossRef": { + "description": "[readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions\r\nThis is automatically set to true if you use a bank payments CSV format that supports it\r\nor set to false if not", + "type": "boolean" + }, + "overrideTimestampValue": { + "description": "If a value is provided then it will be used as the timestamp on the RTI submission. This would normally only be used for testing purposes.", + "nullable": true, + "type": "string" + }, + "password": { + "description": "The Password used to submit RTI documents to HMRC", + "nullable": true, + "type": "string" + }, + "senderId": { + "description": "The SenderId used to submit RTI documents to HMRC", + "nullable": true, + "type": "string" + }, + "senderType": { + "$ref": "#/components/schemas/RtiSenderType" + }, + "shouldCompressFps": { + "description": "If set to true this will compress the FPS before submitting to HMRC", + "type": "boolean" + }, + "testInLive": { + "description": "Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it", + "type": "boolean" + }, + "useTestGateway": { + "description": "If set to true then your RTI documents will be sent to HMRCs test services instead of the live service", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.SharedBankDetails": { + "additionalProperties": false, + "properties": { + "accountName": { + "nullable": true, + "type": "string" + }, + "accountNumber": { + "nullable": true, + "type": "string" + }, + "bankBranch": { + "nullable": true, + "type": "string" + }, + "bankName": { + "nullable": true, + "type": "string" + }, + "bankReference": { + "nullable": true, + "type": "string" + }, + "buildingSocietyRollNumber": { + "nullable": true, + "type": "string" + }, + "countryOfBank": { + "$ref": "#/components/schemas/CountryCode" + }, + "iban": { + "maxLength": 34, + "nullable": true, + "type": "string" + }, + "note": { + "nullable": true, + "type": "string" + }, + "sortCode": { + "nullable": true, + "type": "string" + }, + "swift_Bic": { + "maxLength": 11, + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.ShiftWorkingPatternDayRequest": { + "additionalProperties": false, + "properties": { + "day": { + "format": "int32", + "type": "integer" + }, + "hours": { + "format": "double", + "type": "number" + }, + "isWorkingDay": { + "type": "boolean" + }, + "workingPatternHoursType": { + "$ref": "#/components/schemas/WorkingPatternHoursType" + } + }, + "type": "object" + }, + "Contract.ShiftWorkingPatternDayResponse": { + "additionalProperties": false, + "properties": { + "day": { + "format": "int32", + "type": "integer" + }, + "hours": { + "format": "double", + "type": "number" + }, + "isWorkingDay": { + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.SpinalPointRequest": { + "additionalProperties": false, + "properties": { + "annualValue": { + "description": "Annual Value for the Spinal Point", + "format": "double", + "type": "number" + }, + "annualValueAltMax": { + "description": "Annual Value for the Spinal Point (Alternative Max Value)", + "format": "double", + "type": "number" + }, + "annualValueLAFringe": { + "description": "Annual Value for the Spinal Point Fringe London Allowance", + "format": "double", + "type": "number" + }, + "annualValueLAFringeAltMax": { + "description": "Annual Value for the Spinal Point Fringe LA (Alt Max Value)", + "format": "double", + "type": "number" + }, + "annualValueLAInner": { + "description": "Annual Value for the Spinal Point Inner London Allowance", + "format": "double", + "type": "number" + }, + "annualValueLAInnerAltMax": { + "description": "Annual Value for the Spinal Point Inner LA (Alt Max Value)", + "format": "double", + "type": "number" + }, + "annualValueLAOuter": { + "description": "Annual Value for the Spinal Point Outer London Allowance", + "format": "double", + "type": "number" + }, + "annualValueLAOuterAltMax": { + "description": "Annual Value for the Spinal Point Outer LA (Alt Max Value)", + "format": "double", + "type": "number" + }, + "effectiveDate": { + "description": "Date these rates became effective", + "format": "date", + "type": "string" + }, + "name": { + "description": "Name of the Spinal Point", + "nullable": true, + "type": "string" + }, + "number": { + "description": "Number of Spinal Point within the Scale", + "format": "int32", + "type": "integer" + }, + "predecessorId": { + "description": "Spinal point predecessorId", + "format": "uuid", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.SpinalPointResponse": { + "additionalProperties": false, + "properties": { + "annualValue": { + "description": "Annual Value for the Spinal Point", + "format": "double", + "type": "number" + }, + "annualValueAltMax": { + "description": "Annual Value for the Spinal Point (Alternative Max Value)", + "format": "double", + "type": "number" + }, + "annualValueLAFringe": { + "description": "Annual Value for the Spinal Point Fringe London Allowance", + "format": "double", + "type": "number" + }, + "annualValueLAFringeAltMax": { + "description": "Annual Value for the Spinal Point Fringe LA (Alt Max Value)", + "format": "double", + "type": "number" + }, + "annualValueLAInner": { + "description": "Annual Value for the Spinal Point Inner London Allowance", + "format": "double", + "type": "number" + }, + "annualValueLAInnerAltMax": { + "description": "Annual Value for the Spinal Point Inner LA (Alt Max Value)", + "format": "double", + "type": "number" + }, + "annualValueLAOuter": { + "description": "Annual Value for the Spinal Point Outer London Allowance", + "format": "double", + "type": "number" + }, + "annualValueLAOuterAltMax": { + "description": "Annual Value for the Spinal Point Outer LA (Alt Max Value)", + "format": "double", + "type": "number" + }, + "effectiveDate": { + "description": "Date these rates became effective", + "format": "date", + "type": "string" + }, + "finalAnnualValue": { + "description": "Spinal Point Final Annual Value", + "format": "double", + "type": "number" + }, + "id": { + "description": "Spinal Point identifier", + "format": "uuid", + "type": "string" + }, + "name": { + "description": "Name of the Spinal Point", + "nullable": true, + "type": "string" + }, + "number": { + "description": "Number of Spinal Point within the Scale", + "format": "int32", + "type": "integer" + }, + "predecessorId": { + "description": "Spinal point predecessorId", + "format": "uuid", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.SpinalPointUpdateRequest": { + "additionalProperties": false, + "properties": { + "annualValue": { + "description": "Annual Value for the Spinal Point", + "format": "double", + "type": "number" + }, + "annualValueAltMax": { + "description": "Annual Value for the Spinal Point (Alternative Max Value)", + "format": "double", + "type": "number" + }, + "annualValueLAFringe": { + "description": "Annual Value for the Spinal Point Fringe London Allowance", + "format": "double", + "type": "number" + }, + "annualValueLAFringeAltMax": { + "description": "Annual Value for the Spinal Point Fringe LA (Alt Max Value)", + "format": "double", + "type": "number" + }, + "annualValueLAInner": { + "description": "Annual Value for the Spinal Point Inner London Allowance", + "format": "double", + "type": "number" + }, + "annualValueLAInnerAltMax": { + "description": "Annual Value for the Spinal Point Inner LA (Alt Max Value)", + "format": "double", + "type": "number" + }, + "annualValueLAOuter": { + "description": "Annual Value for the Spinal Point Outer London Allowance", + "format": "double", + "type": "number" + }, + "annualValueLAOuterAltMax": { + "description": "Annual Value for the Spinal Point Outer LA (Alt Max Value)", + "format": "double", + "type": "number" + }, + "effectiveDate": { + "description": "Date these rates became effective", + "format": "date", + "type": "string" + }, + "name": { + "description": "Name of the Spinal Point", + "nullable": true, + "type": "string" + }, + "number": { + "description": "Number of Spinal Point within the Scale", + "format": "int32", + "type": "integer" + }, + "predecessorId": { + "description": "Spinal point predecessorId", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "uniqueId": { + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.SpineAllowanceRequest": { + "additionalProperties": false, + "properties": { + "allowanceAlwaysFTE": { + "description": "Allowance Always FTE or Not", + "type": "boolean" + }, + "allowanceEffectiveDate": { + "description": "Allowance Effective Date", + "format": "date", + "type": "string" + }, + "allowanceName": { + "description": "Name of Allowance", + "nullable": true, + "type": "string" + }, + "allowanceRangeLowerValue": { + "description": "Value of Allowance Range Lower", + "format": "double", + "type": "number" + }, + "allowanceRangeUpperValue": { + "description": "Value of Allowance Range Upper", + "format": "double", + "type": "number" + }, + "allowanceType": { + "$ref": "#/components/schemas/AllowanceType" + }, + "allowanceUsualAnnualValue": { + "description": "Value of Allowance Usual Annual", + "format": "double", + "type": "number" + }, + "payCode": { + "description": "Pay Code", + "nullable": true, + "type": "string" + }, + "payCodeTitle": { + "description": "Pay Code Title", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.SpineAllowanceResponse": { + "additionalProperties": false, + "properties": { + "allowanceAlwaysFTE": { + "description": "Allowance Always FTE or Not", + "type": "boolean" + }, + "allowanceEffectiveDate": { + "description": "Allowance Effective Date", + "format": "date", + "type": "string" + }, + "allowanceName": { + "description": "Name of Allowance", + "nullable": true, + "type": "string" + }, + "allowanceRangeLowerValue": { + "description": "Value of Allowance Range Lower", + "format": "double", + "type": "number" + }, + "allowanceRangeUpperValue": { + "description": "Value of Allowance Range Upper", + "format": "double", + "type": "number" + }, + "allowanceType": { + "$ref": "#/components/schemas/AllowanceType" + }, + "allowanceUsualAnnualValue": { + "description": "Value of Allowance Usual Annual", + "format": "double", + "type": "number" + }, + "payCode": { + "description": "Pay Code", + "nullable": true, + "type": "string" + }, + "payCodeTitle": { + "description": "Pay Code Title", + "nullable": true, + "type": "string" + }, + "uniqueId": { + "description": "Spine Allowance identifier", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.SpineAllowanceUpdateRequest": { + "additionalProperties": false, + "properties": { + "allowanceAlwaysFTE": { + "description": "Allowance Always FTE or Not", + "type": "boolean" + }, + "allowanceEffectiveDate": { + "description": "Allowance Effective Date", + "format": "date", + "type": "string" + }, + "allowanceName": { + "description": "Name of Allowance", + "nullable": true, + "type": "string" + }, + "allowanceRangeLowerValue": { + "description": "Value of Allowance Range Lower", + "format": "double", + "type": "number" + }, + "allowanceRangeUpperValue": { + "description": "Value of Allowance Range Upper", + "format": "double", + "type": "number" + }, + "allowanceType": { + "$ref": "#/components/schemas/AllowanceType" + }, + "allowanceUsualAnnualValue": { + "description": "Value of Allowance Usual Annual", + "format": "double", + "type": "number" + }, + "payCode": { + "description": "Pay Code", + "nullable": true, + "type": "string" + }, + "payCodeTitle": { + "description": "Pay Code Title", + "nullable": true, + "type": "string" + }, + "uniqueId": { + "description": "Spine Allowance identifier", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.StarterDetails": { + "additionalProperties": false, + "properties": { + "overseasEmployerDetails": { + "$ref": "#/components/schemas/Contract.OverseasEmployerDetails" + }, + "pensionerPayroll": { + "$ref": "#/components/schemas/Contract.PensionerPayroll" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "starterDeclaration": { + "$ref": "#/components/schemas/StarterDeclaration" + } + }, + "required": [ + "startDate", + "starterDeclaration" + ], + "type": "object" + }, + "Contract.TaxAndNi": { + "additionalProperties": false, + "properties": { + "foreignTaxCredit": { + "description": "If set to True you are enabling the possibility to enter an amount on payslip so you can reduce UK Tax liabilities.", + "type": "boolean" + }, + "niTable": { + "description": "The appropriate NI letter for this Employee", + "type": "string" + }, + "postgradLoan": { + "description": "Set to true if the Employee needs to make Post Graduate Loan repayments", + "type": "boolean" + }, + "postgraduateLoanEndDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "postgraduateLoanStartDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "secondaryClass1NotPayable": { + "description": "If set to true then no Employer NI will be paid for this Employee", + "type": "boolean" + }, + "studentLoan": { + "$ref": "#/components/schemas/StudentLoan" + }, + "studentLoanEndDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "studentLoanStartDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "taxCode": { + "description": "The Tax Code for this Employee", + "nullable": true, + "type": "string" + }, + "week1Month1": { + "description": "Determines whether PAYE should be calculated on a Week1/Month1 basis instead of on a cumulative basis.\r\nThis is automatically set to false for any existing Employees when you start a new Tax Year.", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.TermCalendarRequest": { + "additionalProperties": false, + "properties": { + "academicYearStartMonth": { + "$ref": "#/components/schemas/CalendarMonth" + }, + "title": { + "description": "Title of the Term Calendar", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.TermCalendarResponse": { + "additionalProperties": false, + "properties": { + "academicYearStartMonth": { + "$ref": "#/components/schemas/CalendarMonth" + }, + "id": { + "description": "Term Calendar identifier", + "format": "uuid", + "type": "string" + }, + "title": { + "description": "Title of the Term Calendar", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Contract.TermCalendarYearRequest": { + "additionalProperties": false, + "properties": { + "autumnTermEndDate": { + "description": "Autumn Term End Date of Term Calendar Year View", + "format": "date", + "type": "string" + }, + "autumnTermStartDate": { + "description": "Autumn Term Start Date of Term Calendar Year View", + "format": "date", + "type": "string" + }, + "springTermEndDate": { + "description": "Spring Term End Date of Term Calendar Year View", + "format": "date", + "type": "string" + }, + "springTermStartDate": { + "description": "Spring Term Start Date of Term Calendar Year View", + "format": "date", + "type": "string" + }, + "summerTermEndDate": { + "description": "Summer Term End Date of Term Calendar Year View", + "format": "date", + "type": "string" + }, + "summerTermStartDate": { + "description": "Summer Term Start Date of Term Calendar Year View", + "format": "date", + "type": "string" + } + }, + "type": "object" + }, + "Contract.TermCalendarYearResponse": { + "additionalProperties": false, + "properties": { + "autumnTermEndDate": { + "description": "Autumn Term End Date of Term Calendar Year View", + "format": "date", + "type": "string" + }, + "autumnTermStartDate": { + "description": "Autumn Term Start Date of Term Calendar Year View", + "format": "date", + "type": "string" + }, + "id": { + "description": "Term Calendar Year identifier", + "format": "uuid", + "type": "string" + }, + "springTermEndDate": { + "description": "Spring Term End Date of Term Calendar Year View", + "format": "date", + "type": "string" + }, + "springTermStartDate": { + "description": "Spring Term Start Date of Term Calendar Year View", + "format": "date", + "type": "string" + }, + "summerTermEndDate": { + "description": "Summer Term End Date of Term Calendar Year View", + "format": "date", + "type": "string" + }, + "summerTermStartDate": { + "description": "Summer Term Start Date of Term Calendar Year View", + "format": "date", + "type": "string" + } + }, + "type": "object" + }, + "Contract.UmbrellaSettingsRequest": { + "additionalProperties": false, + "properties": { + "apprenticeshipLevyDednRate": { + "format": "double", + "type": "number" + }, + "chargePerTimesheet": { + "format": "double", + "type": "number" + }, + "cisFeeCode": { + "nullable": true, + "type": "string" + }, + "detailFeeInComment": { + "type": "boolean" + }, + "dpsbCode": { + "nullable": true, + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "expensesCode": { + "nullable": true, + "type": "string" + }, + "grossDeductionCode": { + "nullable": true, + "type": "string" + }, + "holidayCode": { + "nullable": true, + "type": "string" + }, + "holidayRate": { + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "Contract.UmbrellaSettingsResponse": { + "additionalProperties": false, + "properties": { + "apprenticeshipLevyDednRate": { + "format": "double", + "type": "number" + }, + "chargePerTimesheet": { + "format": "double", + "type": "number" + }, + "cisFeeCode": { + "nullable": true, + "type": "string" + }, + "detailFeeInComment": { + "type": "boolean" + }, + "dpsbCode": { + "nullable": true, + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "expensesCode": { + "nullable": true, + "type": "string" + }, + "grossDeductionCode": { + "nullable": true, + "type": "string" + }, + "holidayCode": { + "nullable": true, + "type": "string" + }, + "holidayRate": { + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "Contract.UpdateEmployeeRequest": { + "additionalProperties": false, + "properties": { + "aggregatedServiceDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "autoEnrolment": { + "$ref": "#/components/schemas/Contract.AutoEnrolmentRequest" + }, + "bankDetails": { + "$ref": "#/components/schemas/Contract.BankDetails" + }, + "defaultPensionSchemeName": { + "description": "The name of the Pension Scheme that will be used for this employee.", + "nullable": true, + "type": "string" + }, + "defaultPensionSchemeUniqueId": { + "description": "The UniqueId of the Pension Scheme that will be used for this employee.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "defaultWorkerGroupName": { + "description": "The name of the Worker Group that will be used for this employee.", + "nullable": true, + "type": "string" + }, + "defaultWorkerGroupUniqueId": { + "description": "The UniqueId of the Worker Group that will be used for this employee.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "employmentDetails": { + "$ref": "#/components/schemas/Contract.EmploymentDetailsRequest" + }, + "evcId": { + "description": "If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "holidaySchemeUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The unique id of the object", + "format": "uuid", + "type": "string" + }, + "leaveSettings": { + "$ref": "#/components/schemas/Contract.EmployeeLeaveSettingsRequest" + }, + "payOptions": { + "$ref": "#/components/schemas/Contract.PayOptionsRequest" + }, + "personalDetails": { + "$ref": "#/components/schemas/Contract.PersonalDetailsRequest" + }, + "rightToWork": { + "$ref": "#/components/schemas/Contract.RightToWork" + }, + "sourceSystemId": { + "description": "Used by external systems so they can store an immutable reference.\r\nOnce this property is set it cannot be changed.", + "maxLength": 50, + "nullable": true, + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "Contract.VeteranDetails": { + "additionalProperties": false, + "properties": { + "firstCivilianEmploymentDate": { + "description": "Date of Veteran's first civilian employment", + "format": "date", + "nullable": true, + "type": "string" + }, + "isVeteran": { + "description": "Set to true if the employee is a veteran", + "type": "boolean" + } + }, + "type": "object" + }, + "Contract.WorkerGroupRequest": { + "additionalProperties": false, + "properties": { + "additionalVoluntaryContribution": { + "description": "Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage.", + "format": "double", + "nullable": true, + "type": "number" + }, + "assumedPensionablePay": { + "$ref": "#/components/schemas/AssumedPensionablePay" + }, + "avcIsPercentage": { + "description": "Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage,", + "nullable": true, + "type": "boolean" + }, + "contributionLevelType": { + "$ref": "#/components/schemas/PensionContributionLevelType" + }, + "customThreshold": { + "type": "boolean" + }, + "employeeContribution": { + "format": "double", + "type": "number" + }, + "employeeContributionIsPercentage": { + "type": "boolean" + }, + "employerContribution": { + "format": "double", + "type": "number" + }, + "employerContributionIncludesNiSaving": { + "description": "Employer Contribution includes the Employers NI saving", + "type": "boolean" + }, + "employerContributionIsPercentage": { + "type": "boolean" + }, + "employerContributionNiSaving": { + "description": "Employers NI Saving", + "format": "double", + "type": "number" + }, + "employerContributionNiSavingPercentage": { + "description": "Increase Employer Contribution by this percentage of the Employers NI saving", + "format": "double", + "type": "number" + }, + "employerContributionTopUpPercentage": { + "description": "Increase Employer Contribution by this percentage of the Employee Contribution", + "format": "double", + "type": "number" + }, + "employerReference": { + "nullable": true, + "type": "string" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "isAvc": { + "description": "Determines whether the workergroup uses additonal voluntary contributions.\r\nThis property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC.", + "type": "boolean" + }, + "lgpsFund": { + "$ref": "#/components/schemas/LgpsFund" + }, + "localAuthorityNumber": { + "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", + "nullable": true, + "type": "string" + }, + "lowerLimit": { + "format": "double", + "type": "number" + }, + "matIdentifier": { + "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", + "nullable": true, + "type": "string" + }, + "matUniqueNumber": { + "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "papdisGroup": { + "nullable": true, + "type": "string" + }, + "papdisSubGroup": { + "nullable": true, + "type": "string" + }, + "payslipDescription": { + "description": "Used for overwriting the pension description that is displayed on the payslip", + "nullable": true, + "type": "string" + }, + "pensionablePayDefinition": { + "$ref": "#/components/schemas/PensionablePayDefinition" + }, + "schoolEmployerType": { + "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", + "nullable": true, + "type": "string" + }, + "upperLimit": { + "format": "double", + "type": "number" + }, + "workerGroupId": { + "description": "[readonly]", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.WorkerGroupResponse": { + "additionalProperties": false, + "properties": { + "additionalVoluntaryContribution": { + "description": "Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage.", + "format": "double", + "nullable": true, + "type": "number" + }, + "assumedPensionablePay": { + "$ref": "#/components/schemas/AssumedPensionablePay" + }, + "avcIsPercentage": { + "description": "Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage,", + "nullable": true, + "type": "boolean" + }, + "contributionLevelType": { + "$ref": "#/components/schemas/PensionContributionLevelType" + }, + "customThreshold": { + "type": "boolean" + }, + "employeeContribution": { + "format": "double", + "type": "number" + }, + "employeeContributionIsPercentage": { + "type": "boolean" + }, + "employerContribution": { + "format": "double", + "type": "number" + }, + "employerContributionIncludesNiSaving": { + "description": "Employer Contribution includes the Employers NI saving", + "type": "boolean" + }, + "employerContributionIsPercentage": { + "type": "boolean" + }, + "employerContributionNiSaving": { + "description": "Employers NI Saving", + "format": "double", + "type": "number" + }, + "employerContributionNiSavingPercentage": { + "description": "Increase Employer Contribution by this percentage of the Employers NI saving", + "format": "double", + "type": "number" + }, + "employerContributionTopUpPercentage": { + "description": "Increase Employer Contribution by this percentage of the Employee Contribution", + "format": "double", + "type": "number" + }, + "employerReference": { + "nullable": true, + "type": "string" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "isAvc": { + "description": "Determines whether the workergroup uses additonal voluntary contributions.\r\nThis property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC.", + "type": "boolean" + }, + "lgpsFund": { + "$ref": "#/components/schemas/LgpsFund" + }, + "localAuthorityNumber": { + "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", + "nullable": true, + "type": "string" + }, + "lowerLimit": { + "format": "double", + "type": "number" + }, + "matIdentifier": { + "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", + "nullable": true, + "type": "string" + }, + "matUniqueNumber": { + "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "papdisGroup": { + "nullable": true, + "type": "string" + }, + "papdisSubGroup": { + "nullable": true, + "type": "string" + }, + "payslipDescription": { + "description": "Used for overwriting the pension description that is displayed on the payslip", + "nullable": true, + "type": "string" + }, + "pensionablePayDefinition": { + "$ref": "#/components/schemas/PensionablePayDefinition" + }, + "schoolEmployerType": { + "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", + "nullable": true, + "type": "string" + }, + "upperLimit": { + "format": "double", + "type": "number" + }, + "workerGroupId": { + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "Contract.WorkingPatternRequest": { + "additionalProperties": false, + "properties": { + "bankHolidays": { + "$ref": "#/components/schemas/BankHolidayCollection" + }, + "contractedWeeks": { + "description": "The amount of weeks an employee works, utilise for employees who aren't working full time.\r\nIf Null then the default is used.", + "format": "double", + "nullable": true, + "type": "number" + }, + "effectiveFrom": { + "format": "date", + "nullable": true, + "type": "string" + }, + "fri": { + "format": "double", + "type": "number" + }, + "friIsWorkingDay": { + "type": "boolean" + }, + "fullTimeContractedHours": { + "description": "The amount of hours an employee works (Full Time). If Null then the default is used.", + "format": "double", + "nullable": true, + "type": "number" + }, + "fullTimeContractedWeeks": { + "description": "The amount of weeks an employee works (Full Time). If Null then the default is used.", + "format": "double", + "nullable": true, + "type": "number" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "isDefault": { + "type": "boolean" + }, + "mon": { + "format": "double", + "type": "number" + }, + "monIsWorkingDay": { + "type": "boolean" + }, + "proRataRule": { + "$ref": "#/components/schemas/ProRataRule" + }, + "sat": { + "format": "double", + "type": "number" + }, + "satIsWorkingDay": { + "type": "boolean" + }, + "shiftWorkingPatternDays": { + "items": { + "$ref": "#/components/schemas/Contract.ShiftWorkingPatternDayRequest" + }, + "nullable": true, + "type": "array" + }, + "sun": { + "format": "double", + "type": "number" + }, + "sunIsWorkingDay": { + "type": "boolean" + }, + "thu": { + "format": "double", + "type": "number" + }, + "thuIsWorkingDay": { + "type": "boolean" + }, + "title": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "totalHours": { + "format": "double", + "type": "number" + }, + "tue": { + "format": "double", + "type": "number" + }, + "tueIsWorkingDay": { + "type": "boolean" + }, + "wed": { + "format": "double", + "type": "number" + }, + "wedIsWorkingDay": { + "type": "boolean" + }, + "workingPatternHoursType": { + "$ref": "#/components/schemas/WorkingPatternHoursType" + }, + "workingPatternType": { + "$ref": "#/components/schemas/WorkingPatternType" + } + }, + "required": [ + "title" + ], + "type": "object" + }, + "Contract.WorkingPatternResponse": { + "additionalProperties": false, + "properties": { + "bankHolidayDates": { + "description": "[readonly] The dates that are classed as Bank Holidays for this Working Pattern", + "items": { + "format": "date-time", + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "bankHolidays": { + "$ref": "#/components/schemas/BankHolidayCollection" + }, + "contractedWeeks": { + "description": "The amount of weeks an employee works, utilise for employees who aren't working full time.\r\nIf Null then the default is used.", + "format": "double", + "nullable": true, + "type": "number" + }, + "displayName": { + "nullable": true, + "readOnly": true, + "type": "string" + }, + "effectiveFrom": { + "format": "date", + "nullable": true, + "type": "string" + }, + "fri": { + "format": "double", + "type": "number" + }, + "fullTimeContractedHours": { + "description": "The amount of hours an employee works (Full Time). If Null then the default is used.", + "format": "double", + "nullable": true, + "type": "number" + }, + "fullTimeContractedWeeks": { + "description": "The amount of weeks an employee works (Full Time). If Null then the default is used.", + "format": "double", + "nullable": true, + "type": "number" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "isDefault": { + "type": "boolean" + }, + "mon": { + "format": "double", + "type": "number" + }, + "proRataRule": { + "$ref": "#/components/schemas/ProRataRule" + }, + "sat": { + "format": "double", + "type": "number" + }, + "shiftWorkingPatternDays": { + "items": { + "$ref": "#/components/schemas/Contract.ShiftWorkingPatternDayResponse" + }, + "nullable": true, + "type": "array" + }, + "sun": { + "format": "double", + "type": "number" + }, + "thu": { + "format": "double", + "type": "number" + }, + "title": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "totalHours": { + "format": "double", + "readOnly": true, + "type": "number" + }, + "tue": { + "format": "double", + "type": "number" + }, + "wed": { + "format": "double", + "type": "number" + }, + "workingPatternHoursType": { + "$ref": "#/components/schemas/WorkingPatternHoursType" + }, + "workingPatternType": { + "$ref": "#/components/schemas/WorkingPatternType" + } + }, + "required": [ + "title" + ], + "type": "object" + }, + "Contract.YearsServiceEntitlementRequest": { + "additionalProperties": false, + "properties": { + "totalAdditionalDaysHoliday": { + "description": "Total additional days of holiday entitlement.", + "format": "double", + "nullable": true, + "type": "number" + }, + "yearsService": { + "description": "Number of years of service.", + "format": "int32", + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "Contract.YearsServiceEntitlementResponse": { + "additionalProperties": false, + "properties": { + "totalAdditionalDaysHoliday": { + "description": "Total additional days of holiday entitlement.", + "format": "double", + "nullable": true, + "type": "number" + }, + "uniqueId": { + "description": "Unique identifier for the Years Service Entitlement.", + "format": "uuid", + "type": "string" + }, + "yearsService": { + "description": "Number of years of service.", + "format": "int32", + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "Contract.YearsServiceEntitlementUpdateRequest": { + "additionalProperties": false, + "properties": { + "totalAdditionalDaysHoliday": { + "description": "Total additional days of holiday entitlement.", + "format": "double", + "nullable": true, + "type": "number" + }, + "uniqueId": { + "description": "Unique identifier for the request.", + "format": "uuid", + "type": "string" + }, + "yearsService": { + "description": "Number of years of service.", + "format": "int32", + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "CostAnalysisReport": { + "additionalProperties": false, + "properties": { + "aeoFees": { + "format": "double", + "type": "number" + }, + "employer": { + "$ref": "#/components/schemas/Item" + }, + "employerNic": { + "format": "double", + "type": "number" + }, + "endDate": { + "format": "date", + "type": "string" + }, + "endPeriodName": { + "nullable": true, + "type": "string" + }, + "femaleCount": { + "format": "int32", + "type": "integer" + }, + "isDraft": { + "type": "boolean" + }, + "joinerCount": { + "format": "int32", + "type": "integer" + }, + "leaverCount": { + "format": "int32", + "type": "integer" + }, + "maleCount": { + "format": "int32", + "type": "integer" + }, + "netPayrollCost": { + "format": "double", + "type": "number" + }, + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "paymentAfterLeavingCount": { + "format": "int32", + "type": "integer" + }, + "pension": { + "format": "double", + "type": "number" + }, + "period": { + "format": "int32", + "type": "integer" + }, + "periodTo": { + "format": "int32", + "type": "integer" + }, + "recoverableAmounts": { + "$ref": "#/components/schemas/RecoverableAmounts" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "singlePayrun": { + "$ref": "#/components/schemas/PayRun" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "totalCost": { + "format": "double", + "readOnly": true, + "type": "number" + }, + "totalPay": { + "format": "double", + "readOnly": true, + "type": "number" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "CostAnalysisReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/CostAnalysisReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "CostCentre": { + "additionalProperties": false, + "properties": { + "accountingCode": { + "maxLength": 50, + "nullable": true, + "type": "string" + }, + "code": { + "description": "The unique code for this Cost Centre", + "maxLength": 20, + "minLength": 1, + "type": "string" + }, + "color": { + "description": "A color to used to represent this Cost Centre, in hex format. ie 'ff0000'", + "maxLength": 6, + "nullable": true, + "type": "string" + }, + "employeeCount": { + "description": "[readonly] The number of employees with this set as their primary cost centre", + "format": "int32", + "type": "integer" + }, + "hasJournalOverrides": { + "description": "Has Journal Overrides", + "type": "boolean" + }, + "title": { + "description": "The name of this Cost Centre", + "maxLength": 50, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "code", + "title" + ], + "type": "object" + }, + "CostOfEmploymentReport": { + "additionalProperties": false, + "properties": { + "employer": { + "$ref": "#/components/schemas/Item" + }, + "endDate": { + "format": "date", + "type": "string" + }, + "endPeriodName": { + "nullable": true, + "type": "string" + }, + "hasDepartments": { + "type": "boolean" + }, + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/CostOfEmploymentReportLine" + }, + "nullable": true, + "type": "array" + }, + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "period": { + "format": "int32", + "type": "integer" + }, + "periodTo": { + "format": "int32", + "type": "integer" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "CostOfEmploymentReportLine": { + "additionalProperties": false, + "properties": { + "aeoFees": { + "format": "double", + "type": "number" + }, + "department": { + "nullable": true, + "type": "string" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "employerNic": { + "format": "double", + "type": "number" + }, + "pay": { + "format": "double", + "type": "number" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "pension": { + "format": "double", + "type": "number" + }, + "statPayReclaim": { + "format": "double", + "type": "number" + }, + "totalCost": { + "format": "double", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "CostOfEmploymentReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/CostOfEmploymentReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Country": { + "enum": [ + "England", + "NorthernIreland", + "Scotland", + "Wales", + "OutsideUk", + "Uk" + ], + "type": "string" + }, + "CountryCode": { + "enum": [ + "Andorra", + "Albania", + "Austria", + "Azerbaijan", + "Bahrain", + "Belarus", + "Belgium", + "BosniaAndHerzegovina", + "Brazil", + "Bulgaria", + "Burundi", + "CostaRica", + "Croatia", + "Cyprus", + "CzechRepublic", + "Denmark", + "Djibouti", + "DominicanRepublic", + "ElSalvador", + "Estonia", + "Egypt", + "FalklandIslands", + "FaroeIslands", + "Finland", + "France", + "Georgia", + "Germany", + "Gibraltar", + "Greece", + "Greenland", + "Guatemala", + "Honduras", + "Hungary", + "Iceland", + "Ireland", + "Israel", + "Iraq", + "Italy", + "Jordan", + "Kazakhstan", + "Kosovo", + "Kuwait", + "Lebanon", + "Latvia", + "Liechtenstein", + "Lithuania", + "Luxembourg", + "Macedonia", + "Malta", + "Mauritania", + "Mauritius", + "Monaco", + "Moldova", + "Montenegro", + "Mongolia", + "Nicaragua", + "Netherlands", + "Norway", + "Oman", + "Pakistan", + "Palestine", + "Poland", + "Portugal", + "Qatar", + "RepublicOfBelarus", + "Romania", + "Russia", + "SaintLucia", + "SanMarino", + "SaudiArabia", + "Serbia", + "Seychelles", + "Slovakia", + "Slovenia", + "Somalia", + "SaoTomeAndPrincipe", + "Spain", + "Sudan", + "Sweden", + "Switzerland", + "TimorLeste", + "Tunisia", + "Turkey", + "Ukraine", + "UnitedArabEmirates", + "UnitedKingdom", + "VaticanCity", + "VirginIslands", + "Yemen" + ], + "type": "string" + }, + "CsvFileFormat": { + "enum": [ + "MoneysoftEmployees", + "BrightPayEmployees", + "Fps", + "SageEmployeeDetails", + "AccessPeoplePlanner", + "EmployeeCsv" + ], + "type": "string" + }, + "CyclicReenrolmentReport": { + "additionalProperties": false, + "properties": { + "alreadyInPension": { + "format": "int32", + "type": "integer" + }, + "employerName": { + "nullable": true, + "type": "string" + }, + "groups": { + "items": { + "$ref": "#/components/schemas/CyclicReenrolmentReportGroup" + }, + "nullable": true, + "type": "array" + }, + "isDraft": { + "type": "boolean" + }, + "reenrolmentDate": { + "format": "date", + "type": "string" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "totalReenrolled": { + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "totalStaff": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "CyclicReenrolmentReportGroup": { + "additionalProperties": false, + "properties": { + "id": { + "format": "int32", + "type": "integer" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/CyclicReenrolmentReportLine" + }, + "nullable": true, + "type": "array" + }, + "name": { + "nullable": true, + "type": "string" + }, + "totalStaff": { + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "CyclicReenrolmentReportLine": { + "additionalProperties": false, + "properties": { + "firstName": { + "nullable": true, + "type": "string" + }, + "lastName": { + "nullable": true, + "type": "string" + }, + "middleName": { + "nullable": true, + "type": "string" + }, + "payScheduleName": { + "nullable": true, + "type": "string" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "pensionSchemeId": { + "format": "int32", + "type": "integer" + }, + "pensionSchemeName": { + "nullable": true, + "type": "string" + }, + "reenrolmentDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "title": { + "nullable": true, + "type": "string" + }, + "workerGroupName": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "CyclicReenrolmentReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/CyclicReenrolmentReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "DayOfWeek": { + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "type": "string" + }, + "DaysBeforePayday": { + "enum": [ + "ZeroDayBeforePayday", + "OneDayBeforePayday", + "TwoDaysBeforePayday", + "ThreeDaysBeforePayday", + "FourDaysBeforePayday", + "FiveDaysBeforePayday" + ], + "type": "string" + }, + "DecimalDecimalBooleanPensionRuleValueTuple": { + "additionalProperties": false, + "properties": { + "item1": { + "format": "double", + "type": "number" + }, + "item2": { + "format": "double", + "type": "number" + }, + "item3": { + "type": "boolean" + }, + "item4": { + "$ref": "#/components/schemas/PensionRule" + } + }, + "type": "object" + }, + "DecimalTaxYearConfigPrimitiveValue": { + "additionalProperties": false, + "properties": { + "effectiveFrom": { + "description": "The date when these period values are effective", + "format": "date", + "nullable": true, + "type": "string" + }, + "midYearChanges": { + "description": "Any optional changes to the period values that are effective from a specified date in the middle of a tax year", + "items": { + "$ref": "#/components/schemas/DecimalTaxYearConfigPrimitiveValue" + }, + "nullable": true, + "type": "array" + }, + "value": { + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "DeferalPeriodType": { + "enum": [ + "Days", + "Weeks", + "Months", + "PayPeriods" + ], + "type": "string" + }, + "Department": { + "additionalProperties": false, + "properties": { + "accountingCode": { + "maxLength": 50, + "nullable": true, + "type": "string" + }, + "code": { + "description": "The unique code for this Department", + "maxLength": 20, + "minLength": 1, + "type": "string" + }, + "color": { + "description": "A color to used to represent this Department, in hex format. ie 'ff0000'", + "maxLength": 6, + "nullable": true, + "type": "string" + }, + "employeeCount": { + "description": "[readonly] The number of employees with this set as their primary department", + "format": "int32", + "type": "integer" + }, + "hasJournalOverrides": { + "description": "Has Overrides", + "type": "boolean" + }, + "title": { + "description": "The name of this Department", + "maxLength": 50, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "code", + "title" + ], + "type": "object" + }, + "DepartmentMembership": { + "additionalProperties": false, + "description": "Used to represent an Employees membership of a Department", + "properties": { + "code": { + "description": "The Code for the Department", + "minLength": 1, + "type": "string" + }, + "color": { + "description": "[readonly] The Color for the Department", + "nullable": true, + "type": "string" + }, + "employeeRoleUniqueId": { + "format": "uuid", + "type": "string" + }, + "primary": { + "description": "Set to true if this is the primary Department for the Employee.\r\nOnly one department can be set as the primary.", + "type": "boolean" + }, + "title": { + "description": "[readonly] The Title for the Department", + "nullable": true, + "type": "string" + }, + "weighting": { + "description": "If there is more than one Department Membership for the Employee then this determines the weighting to give to this membership.\r\nie, if he is in two departments you might set the primary as 0.8 and the secondary as 0.2;", + "format": "double", + "type": "number" + } + }, + "required": [ + "code" + ], + "type": "object" + }, + "DirectDebitMandate": { + "additionalProperties": false, + "properties": { + "accountNumberEnding": { + "nullable": true, + "type": "string" + }, + "bankName": { + "nullable": true, + "type": "string" + }, + "customerLink": { + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "isCompleted": { + "type": "boolean" + }, + "mandateLink": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "DirectorshipDetails": { + "additionalProperties": false, + "properties": { + "isDirector": { + "type": "boolean" + }, + "leaveDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "niAlternativeMethod": { + "type": "boolean" + }, + "startDate": { + "format": "date", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "DpsDataType": { + "enum": [ + "P6", + "P9", + "SL1", + "SL2", + "PGL1", + "PGL2", + "AR", + "NOT", + "RTI", + "CIS" + ], + "type": "string" + }, + "DpsNotice": { + "additionalProperties": false, + "properties": { + "appliedOn": { + "format": "date", + "nullable": true, + "type": "string" + }, + "effectiveDate": { + "format": "date", + "type": "string" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "forename": { + "nullable": true, + "type": "string" + }, + "formType": { + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "issueDate": { + "format": "date", + "type": "string" + }, + "niNo": { + "nullable": true, + "type": "string" + }, + "periodApplied": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "planType": { + "$ref": "#/components/schemas/StudentLoan" + }, + "previousPay": { + "format": "double", + "nullable": true, + "type": "number" + }, + "previousTax": { + "format": "double", + "nullable": true, + "type": "number" + }, + "sequenceNumber": { + "format": "int32", + "type": "integer" + }, + "surname": { + "nullable": true, + "type": "string" + }, + "taxCode": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "type": { + "$ref": "#/components/schemas/DpsDataType" + }, + "week1Month1": { + "nullable": true, + "type": "boolean" + }, + "worksNumber": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "DpsSettings": { + "additionalProperties": false, + "description": "This model is used to set an employers settings for HMRCs Data Provisioning Service", + "properties": { + "autoApply": { + "description": "If enabled, we'll automatically apply DPSNotices before starting a payrun that covers the EffectiveDate", + "type": "boolean" + }, + "enabled": { + "description": "If enabled, we'll automatically retrieve DPS notices from HMRC for you", + "type": "boolean" + }, + "error": { + "description": "[readonly] If we received an error from HMRC when checking for notices, it'll be displayed here", + "nullable": true, + "type": "string" + }, + "lastChecked": { + "description": "[readonly] The time we last checked for notices", + "format": "date", + "nullable": true, + "type": "string" + }, + "retrieveFrom": { + "description": "The date from which notices should be retrieved", + "format": "date", + "type": "string" + } + }, + "type": "object" + }, + "EmailAttachment": { + "additionalProperties": false, + "properties": { + "filename": { + "minLength": 1, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "pdfPasswordType": { + "$ref": "#/components/schemas/PdfPasswordType" + }, + "url": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "filename", + "url" + ], + "type": "object" + }, + "EmpRefs": { + "additionalProperties": false, + "properties": { + "aoRef": { + "nullable": true, + "type": "string" + }, + "cotaxRef": { + "nullable": true, + "type": "string" + }, + "econ": { + "nullable": true, + "type": "string" + }, + "officeNo": { + "nullable": true, + "type": "string" + }, + "payeRef": { + "nullable": true, + "type": "string" + }, + "sautr": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "Employee": { + "additionalProperties": false, + "properties": { + "aeNotEnroledWarning": { + "description": "[readonly] If true then the employee should be enrolled in an Auto Enrolment Qualifying pension but isn't", + "readOnly": true, + "type": "boolean" + }, + "aggregatedServiceDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "autoEnrolment": { + "$ref": "#/components/schemas/AutoEnrolment" + }, + "bankDetails": { + "$ref": "#/components/schemas/BankDetails" + }, + "defaultPensionSchemeName": { + "nullable": true, + "type": "string" + }, + "defaultPensionSchemeUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "defaultWorkerGroupName": { + "nullable": true, + "type": "string" + }, + "defaultWorkerGroupUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "employmentDetails": { + "$ref": "#/components/schemas/EmploymentDetails" + }, + "evcId": { + "description": "If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "holidaySchemeUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "leaveHolidayAccrualDefaultRateType": { + "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + }, + "leaveSettings": { + "$ref": "#/components/schemas/LeaveSettings" + }, + "payOptions": { + "$ref": "#/components/schemas/PayOptions" + }, + "personalDetails": { + "$ref": "#/components/schemas/PersonalDetails" + }, + "rightToWork": { + "$ref": "#/components/schemas/RightToWork" + }, + "sourceSystemId": { + "description": "[readonly] Can only be given a value when the employee is created. It can then never be changed.\r\nUsed by external systems so they can store an immutable reference", + "maxLength": 50, + "nullable": true, + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/EmployeeStatus" + }, + "tags": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "EmployeeBenefitsReport": { + "additionalProperties": false, + "properties": { + "isDraft": { + "type": "boolean" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EmployeeBenefitsReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/EmployeeBenefitsReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EmployeeCostCentre": { + "additionalProperties": false, + "description": "Used to represent an Employees membership of a Cost Centre", + "properties": { + "code": { + "description": "The Code for the Cost Centre", + "minLength": 1, + "type": "string" + }, + "color": { + "description": "[readonly] The Color for the Cost Centre", + "nullable": true, + "type": "string" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "employeeRoleUniqueId": { + "format": "uuid", + "type": "string" + }, + "isPrimary": { + "description": "Set to true if this is the primary Cost Centre for the Employee.\r\nOnly one Cost Centre can be set as the primary.", + "type": "boolean" + }, + "title": { + "description": "[readonly] The Title for the Cost Centre", + "nullable": true, + "type": "string" + }, + "weighting": { + "description": "If there is more than one Cost Centre Membership for the Employee then this determines the weighting to give to this membership.\r\nie, if he is in two Cost Centre you might set the primary as 0.8 and the secondary as 0.2;", + "format": "double", + "type": "number" + } + }, + "required": [ + "code" + ], + "type": "object" + }, + "EmployeeLeaveReport": { + "additionalProperties": false, + "properties": { + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/EmployeeLeaveReportLine" + }, + "nullable": true, + "type": "array" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EmployeeLeaveReportLine": { + "additionalProperties": false, + "properties": { + "assumedPensionablePay": { + "format": "double", + "nullable": true, + "type": "number" + }, + "automaticAPPCalculation": { + "type": "boolean" + }, + "automaticAWECalculation": { + "type": "boolean" + }, + "averageWeeklyEarnings": { + "format": "double", + "type": "number" + }, + "babyBirthDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "babyDueDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "calculationType": { + "$ref": "#/components/schemas/LeaveCalculationType" + }, + "deathDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "expectedPlacementDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "firstName": { + "nullable": true, + "type": "string" + }, + "from": { + "format": "date", + "type": "string" + }, + "historicLeaveRequiresProcessing": { + "type": "boolean" + }, + "lastName": { + "nullable": true, + "type": "string" + }, + "matchingDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "occupationalPolicy": { + "nullable": true, + "type": "string" + }, + "offsetPay": { + "type": "boolean" + }, + "openEndedAbsence": { + "type": "boolean" + }, + "openingOmpPay": { + "format": "double", + "nullable": true, + "type": "number" + }, + "openingPay": { + "format": "double", + "nullable": true, + "type": "number" + }, + "payFrequency": { + "$ref": "#/components/schemas/StatPayFrequency" + }, + "paySSPInAddition": { + "type": "boolean" + }, + "payment": { + "$ref": "#/components/schemas/LeavePayType" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "percentOfPay": { + "format": "double", + "type": "number" + }, + "placementDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "strikeHoursToDeduct": { + "format": "double", + "nullable": true, + "type": "number" + }, + "to": { + "format": "date", + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/LeaveType" + }, + "useAssumedPensionablePay": { + "type": "boolean" + }, + "useOpeningPay": { + "type": "boolean" + } + }, + "type": "object" + }, + "EmployeeLeaveReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/EmployeeLeaveReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EmployeeLoanExportReport": { + "additionalProperties": false, + "properties": { + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/EmployeeLoanExportReportLine" + }, + "nullable": true, + "type": "array" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EmployeeLoanExportReportLine": { + "additionalProperties": false, + "properties": { + "firstName": { + "nullable": true, + "type": "string" + }, + "issueDate": { + "format": "date", + "type": "string" + }, + "loanAmount": { + "format": "double", + "type": "number" + }, + "pausePayments": { + "type": "boolean" + }, + "payCode": { + "nullable": true, + "type": "string" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "periodAmount": { + "format": "double", + "type": "number" + }, + "previouslyPaid": { + "format": "double", + "type": "number" + }, + "reference": { + "nullable": true, + "type": "string" + }, + "surname": { + "nullable": true, + "type": "string" + }, + "uniqueIdentifier": { + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "EmployeeLoanExportReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/EmployeeLoanExportReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EmployeeNiYtdValues": { + "additionalProperties": false, + "properties": { + "employee": { + "$ref": "#/components/schemas/Item" + }, + "firstName": { + "nullable": true, + "type": "string" + }, + "lastName": { + "nullable": true, + "type": "string" + }, + "niTable": { + "type": "string" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "values": { + "items": { + "$ref": "#/components/schemas/NiYtdValue" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "EmployeePayRunTotal": { + "additionalProperties": false, + "description": "EmployeePayRunTotal is used to calculte the employee pay run total", + "properties": { + "employeeNi": { + "description": "The Employee NI Contribution amount", + "format": "double", + "type": "number" + }, + "employeePension": { + "description": "The value of the Pension Contribution(PENSION) being made by the Employee as a Net Pay Arrangement", + "format": "double", + "type": "number" + }, + "employeePensionContributionReliefAtSource": { + "description": "The value of employee pension contributions Relief At Source(PENSIONRAS) that are not paid under 'net pay arrangements'", + "format": "double", + "type": "number" + }, + "employeePensionContributionSalarySacrifice": { + "description": "The value of the Pension Contribution Salary Sacrifice(PENSIONSS) being made by the Employee as a Salary Sacrifice", + "format": "double", + "type": "number" + }, + "employerNi": { + "description": "The Employer NI Contribution amount", + "format": "double", + "type": "number" + }, + "employerPensionContribution": { + "description": "The value of the Pension Contribution being made by the Employer for this Employee", + "format": "double", + "type": "number" + }, + "grossForNi": { + "description": "The amount of the Gross that is subject to NI", + "format": "double", + "type": "number" + }, + "grossPensionPay": { + "description": "The amount of the Gross that is subject to PensionPay", + "format": "double", + "type": "number" + }, + "grossTaxablePay": { + "description": "The amount of the Gross that is subject to TaxablePay", + "format": "double", + "type": "number" + }, + "payrollCode": { + "description": "Payroll code of the employee", + "nullable": true, + "type": "string" + }, + "studentLoanRecovered": { + "description": "The Employee Student Loan recovered amount", + "format": "double", + "type": "number" + }, + "tax": { + "description": "The Employee Tax amount", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "EmployeePaymentsReportLine": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Amount for exported pay line", + "format": "double", + "type": "number" + }, + "autoAdjustForLeave": { + "description": "Indicates Auto Adjust For Leave value for exported pay line", + "type": "boolean" + }, + "calculateAsWhenPaid": { + "description": "Indicates whether this pay line should be treated as When Paid rather than When Earned", + "type": "boolean" + }, + "contributesToBasicPay": { + "description": "Indicates Contributes To Basic Pay value for exported pay line", + "type": "boolean" + }, + "costCentre": { + "description": "Cost Centre for exported pay line", + "nullable": true, + "type": "string" + }, + "costCentreId": { + "description": "Cost Centre ID associated with the exported payline", + "format": "uuid", + "type": "string" + }, + "days": { + "description": "Number of Days for exported pay line", + "format": "double", + "nullable": true, + "type": "number" + }, + "department": { + "description": "Department for exported pay line", + "nullable": true, + "type": "string" + }, + "departmentId": { + "description": "Department ID associated with the exported payline", + "format": "uuid", + "type": "string" + }, + "description": { + "description": "Note for exported pay line", + "nullable": true, + "type": "string" + }, + "effectiveFrom": { + "description": "Effective From date for exported pay line", + "format": "date", + "nullable": true, + "type": "string" + }, + "effectiveTo": { + "description": "Effective To date for exported pay line", + "format": "date", + "nullable": true, + "type": "string" + }, + "employeeName": { + "description": "Employee Name for exported pay line", + "nullable": true, + "type": "string" + }, + "hours": { + "description": "Number of Hours for exported pay line", + "format": "double", + "nullable": true, + "type": "number" + }, + "ignoreInitialBackPay": { + "description": "Indicates Ignore Initial Back Pay value for exported pay line", + "type": "boolean" + }, + "isAutomaticBackPay": { + "description": "Indicates Automatic Back Pay value for exported pay line", + "type": "boolean" + }, + "isNetToGross": { + "description": "Indicates Gross To Net value for exported pay line", + "type": "boolean" + }, + "londonAllowanceType": { + "description": "London Allowance type for exported pay line", + "nullable": true, + "type": "string" + }, + "multiplier": { + "description": "Multiplier for exported pay line", + "format": "double", + "nullable": true, + "type": "number" + }, + "multiplierType": { + "description": "MultiplierType of exported pay line", + "format": "int32", + "type": "integer" + }, + "payCode": { + "description": "Pay code for exported pay line", + "nullable": true, + "type": "string" + }, + "payGrade": { + "description": "Pay Grade for exported pay line", + "nullable": true, + "type": "string" + }, + "paySpine": { + "description": "Pay Spine for exported pay line", + "nullable": true, + "type": "string" + }, + "paySpineGradeId": { + "description": "Pay Spine Grade ID associated with the exported payline", + "format": "uuid", + "type": "string" + }, + "paySpineId": { + "description": "Pay Spine ID associated with the exported payline", + "format": "uuid", + "type": "string" + }, + "payrollCode": { + "description": "Payroll Code for exported pay line", + "nullable": true, + "type": "string" + }, + "percentage": { + "description": "Amount for exported pay line", + "format": "double", + "nullable": true, + "type": "number" + }, + "roleReference": { + "description": "Employee Role Reference for exported pay line", + "nullable": true, + "type": "string" + }, + "spinalPointId": { + "description": "Spinal Point ID associated with the exported payline", + "format": "uuid", + "type": "string" + }, + "spinePoint": { + "description": "Spine Point for exported pay line", + "nullable": true, + "type": "string" + }, + "uniqueIdentifier": { + "description": "Unique Id for exported pay line", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "EmployeePaymentsReportLineListReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "description": "[readonly] If the type is application.json then this will contain a JSON representation of the relevant model", + "items": { + "$ref": "#/components/schemas/EmployeePaymentsReportLine" + }, + "nullable": true, + "type": "array" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EmployeeRole": { + "additionalProperties": false, + "properties": { + "basis": { + "$ref": "#/components/schemas/RoleBasis" + }, + "defaultPensionSchemeUniqueId": { + "description": "Used when employee role has attached default pension scheme Id", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "defaultWorkerGroupUniqueId": { + "description": "Used when employee role has attached default worker group Id", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "endDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "isPrimary": { + "description": "Set to True if this is Primary role of the Employee", + "type": "boolean" + }, + "jobTitle": { + "description": "Job Title of the Role", + "nullable": true, + "type": "string" + }, + "occupationalMaternityPolicyUniqueId": { + "description": "Used for assigning occupational maternity policy", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "occupationalSicknessPolicyUniqueId": { + "description": "Used for assigning occupational sickness policy", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "payOptions": { + "$ref": "#/components/schemas/EmployeeRolePayOptions" + }, + "reference": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/RoleType" + }, + "workingPatternId": { + "deprecated": true, + "description": "Used when calculating payments for Leave.\r\nIf null then the default Working Pattern is used", + "format": "uuid", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EmployeeRoleAnalysisCategoryCode": { + "additionalProperties": false, + "properties": { + "analysisCategoryName": { + "description": "Analysis Category Name", + "nullable": true, + "type": "string" + }, + "analysisCategoryPublicId": { + "description": "Analysis Category Public Id", + "format": "uuid", + "type": "string" + }, + "code": { + "description": "The Code for the AnalysisCategoryCode", + "minLength": 1, + "type": "string" + }, + "color": { + "description": "[readonly] The Color for the AnalysisCategoryCode", + "nullable": true, + "type": "string" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "employeeRolePublicId": { + "description": "Employee Role Public Id", + "format": "uuid", + "type": "string" + }, + "isPrimary": { + "description": "Set to true if this is the primary AnalysisCategoryCode for the Employee.\r\nOnly one AnalysisCategoryCode can be set as the primary.", + "type": "boolean" + }, + "title": { + "description": "[readonly] The Title for the AnalysisCategoryCode", + "nullable": true, + "type": "string" + }, + "weighting": { + "description": "If there is more than one AnalysisCategoryCode Membership for the Employee then this determines the weighting to give to this membership.\r\nie, if he is in two AnalysisCategoryCode you might set the primary as 0.8 and the secondary as 0.2;", + "format": "double", + "type": "number" + } + }, + "required": [ + "code" + ], + "type": "object" + }, + "EmployeeRolePayItem": { + "additionalProperties": false, + "properties": { + "baseDailyRate": { + "description": "This property is used to calculate values for PayCodes that are set as multiples of \r\nthe employees base daily rate. Eg sick.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", + "format": "double", + "type": "number" + }, + "baseHourlyRate": { + "description": "This property is used to calculate values for PayCodes that are set as multiples of \r\nthe employees base hourly rate. Eg Overtime.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", + "format": "double", + "type": "number" + }, + "isPrimary": { + "type": "boolean" + }, + "roleId": { + "format": "uuid", + "type": "string" + }, + "weight": { + "description": "This property is used to calculate values for the relative weight of the usual pay for \r\neach role compared to the sum of all roles' usual pay\r\nUsual pay for the purpose of the current value's calculation is based on the employee's permanent pay items\r\nincluding employee basic pay and permanent addition and deduction pay lines subject to NI or Tax", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "EmployeeRolePayOptions": { + "additionalProperties": false, + "properties": { + "autoAdjustForLeave": { + "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun", + "type": "boolean" + }, + "baseDailyRate": { + "description": "This property is used to calculate values for PayCodes that are set as multiples of \r\nthe employees base daily rate. Eg sick.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", + "format": "double", + "type": "number" + }, + "baseHourlyRate": { + "description": "This property is used to calculate values for PayCodes that are set as multiples of \r\nthe employees base hourly rate. Eg Overtime.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", + "format": "double", + "type": "number" + }, + "basicPay": { + "description": "The amount of basic pay the Employee is regularly paid each period\r\nThis amount is the combined total of all pay elements that contribute to basic pay", + "format": "double", + "type": "number" + }, + "basis": { + "$ref": "#/components/schemas/PayBasis" + }, + "excludedRegularPayLines": { + "description": "These used to store the PayLines that have been excluded from RegularPaylines.", + "items": { + "$ref": "#/components/schemas/PayLine" + }, + "nullable": true, + "type": "array" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "mapsMiles": { + "description": "The number of miles to pay for as Mileage Allowance Payments", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "mileageVehicleType": { + "$ref": "#/components/schemas/MileageVehicleType" + }, + "nationalMinimumWage": { + "type": "boolean" + }, + "niTable": { + "type": "string" + }, + "payAmount": { + "description": "The amount the Employee is regularly paid each period", + "format": "double", + "type": "number" + }, + "payAmountMultiplier": { + "description": "This property is irrelevant if the basis is Monthly.\r\nBut if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period.", + "format": "double", + "type": "number" + }, + "payCode": { + "description": "If you want the Employees pay to be allocated to a code other than BASIC, specify it here", + "nullable": true, + "type": "string" + }, + "regularPayLines": { + "description": "These are used to make additions/deductions to the pay for this Employee.\r\nYou do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created.", + "items": { + "$ref": "#/components/schemas/PayLine" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "EmployeeSortBy": { + "enum": [ + "PayrollCode", + "Employee", + "Department", + "PaySchedule" + ], + "type": "string" + }, + "EmployeeStatus": { + "enum": [ + "Current", + "Former", + "Upcoming" + ], + "type": "string" + }, + "EmployeeYtdValues": { + "additionalProperties": false, + "properties": { + "employee": { + "$ref": "#/components/schemas/Item" + }, + "firstName": { + "nullable": true, + "type": "string" + }, + "lastName": { + "nullable": true, + "type": "string" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "values": { + "items": { + "$ref": "#/components/schemas/YtdValue" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "EmployerBetaFeatures": { + "enum": [ + "MultiRoleAe" + ], + "type": "string" + }, + "EmployerDefaults": { + "additionalProperties": false, + "description": "When a user creates a new Employer, certain settings can be copied from an existing employer.\r\nThis model determines which employer (if any) settings should be copied from and what should be copied.", + "properties": { + "csvMappings": { + "description": "If true then CSV Mappings will be copied from the specified Employer", + "type": "boolean" + }, + "departments": { + "description": "If true then Departments, Cost Centres and Analysis Categories will be copied from the specified Employer", + "type": "boolean" + }, + "employer": { + "$ref": "#/components/schemas/EmployerItem" + }, + "hmrcNoticeSettings": { + "description": "If true then HMRC Notice Settings will be copied from the specified Employer", + "type": "boolean" + }, + "occupationalPolicies": { + "description": "If true then Occupational Absence Schemes will be copied from the specified Employer.", + "type": "boolean" + }, + "payCodes": { + "description": "If true then PayCodes and PayCodeSets will be copied from the specified Employer", + "type": "boolean" + }, + "payOptions": { + "description": "If true then Default Pay Options will be copied from the specified Employer.", + "type": "boolean" + }, + "payees": { + "description": "If true then Payees will be copied from the specified Employer", + "type": "boolean" + }, + "pensionSchemes": { + "description": "If true then PensionSchemes will be copied from the specified Employer", + "type": "boolean" + }, + "reportPacks": { + "description": "If true then ReportPacks will be copied from the specified Employer", + "type": "boolean" + }, + "rti": { + "description": "If true then RTI Settings will be copied from the specified Employer", + "type": "boolean" + }, + "users": { + "description": "If true then Users will be copied from the specified Employer", + "type": "boolean" + }, + "workingPatterns": { + "description": "If true then WorkingPatterns will be copied from the specified Employer", + "type": "boolean" + } + }, + "type": "object" + }, + "EmployerEmail": { + "additionalProperties": false, + "properties": { + "afterBtnBody": { + "nullable": true, + "type": "string" + }, + "attachments": { + "items": { + "$ref": "#/components/schemas/EmailAttachment" + }, + "nullable": true, + "type": "array" + }, + "body": { + "nullable": true, + "type": "string" + }, + "bodyPreview": { + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "buttonLink": { + "maxLength": 250, + "nullable": true, + "type": "string" + }, + "buttonText": { + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "sendAttempts": { + "format": "int32", + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/BackgroundTaskStatus" + }, + "statusDate": { + "format": "date-time", + "type": "string" + }, + "statusMessage": { + "nullable": true, + "type": "string" + }, + "subject": { + "maxLength": 150, + "minLength": 1, + "type": "string" + }, + "toEmail": { + "maxLength": 150, + "minLength": 1, + "type": "string" + }, + "toName": { + "maxLength": 150, + "minLength": 1, + "type": "string" + }, + "webAppBaseUrl": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "subject", + "toEmail", + "toName" + ], + "type": "object" + }, + "EmployerEvcOptInHistory": { + "additionalProperties": false, + "properties": { + "date": { + "format": "date", + "type": "string" + }, + "optIn": { + "type": "boolean" + }, + "userEmail": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EmployerGroup": { + "additionalProperties": false, + "properties": { + "code": { + "description": "The unique code for this EmployerGroup", + "maxLength": 20, + "minLength": 1, + "type": "string" + }, + "color": { + "description": "A color to used to represent this EmployerGroup, in hex format. ie 'ff0000'", + "maxLength": 6, + "nullable": true, + "type": "string" + }, + "employerCount": { + "format": "int32", + "type": "integer" + }, + "name": { + "maxLength": 150, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "code", + "name" + ], + "type": "object" + }, + "EmployerGroupMembership": { + "additionalProperties": false, + "description": "Used to represent an Employers membership of a EmployerGroup", + "properties": { + "code": { + "description": "The Code for the EmployerGroup", + "minLength": 1, + "type": "string" + }, + "color": { + "description": "[readonly] The Color for the EmployerGroup", + "nullable": true, + "type": "string" + }, + "primary": { + "description": "Set to true if this is the primary EmployerGroup for the Employer.\r\nOnly one EmployerGroup can be set as the primary.", + "type": "boolean" + }, + "title": { + "description": "[readonly] The Title for the EmployerGroup", + "nullable": true, + "type": "string" + } + }, + "required": [ + "code" + ], + "type": "object" + }, + "EmployerItem": { + "additionalProperties": false, + "properties": { + "id": { + "format": "uuid", + "type": "string" + }, + "isOwner": { + "type": "boolean" + }, + "metadata": { + "nullable": true + }, + "name": { + "nullable": true, + "type": "string" + }, + "role": { + "$ref": "#/components/schemas/UserRole" + }, + "url": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EmployerListType": { + "enum": [ + "Owned", + "FromOthers", + "Support", + "Archived" + ], + "type": "string" + }, + "EmployerOpeningBalances": { + "additionalProperties": false, + "properties": { + "apprenticeshipLevy": { + "description": "Value of Apprenticeship levy paid year to date", + "format": "double", + "type": "number" + }, + "cisDeductionsSuffered": { + "description": "Value of CIS deductions suffered year to date", + "format": "double", + "type": "number" + }, + "employmentAllowance": { + "description": "Value of Employment Allowance claimed year to date", + "format": "double", + "type": "number" + }, + "nicCompensationOnSAP": { + "description": "Value of NIC compensation on Statutory Adoption Pay year to date", + "format": "double", + "type": "number" + }, + "nicCompensationOnSMP": { + "description": "Value of NIC compensation on SMP year to date", + "format": "double", + "type": "number" + }, + "nicCompensationOnSNCP": { + "description": "Value of NIC compensation on Statutory Neonatal Care Pay year to date", + "format": "double", + "type": "number" + }, + "nicCompensationOnSPBP": { + "description": "Value of NIC compensation on Statutory Parental Bereavement Pay year to date", + "format": "double", + "type": "number" + }, + "nicCompensationOnSPP": { + "description": "Value of NIC compensation on Statutory Paternity Pay year to date", + "format": "double", + "type": "number" + }, + "nicCompensationOnShPP": { + "description": "Value of NIC compensation on Shared Parental Pay year to date", + "format": "double", + "type": "number" + }, + "sapRecovered": { + "description": "Value of Statutory Adoption Pay recovered year to date", + "format": "double", + "type": "number" + }, + "shPPRecovered": { + "description": "Value of Shared Parental Pay recovered year to date", + "format": "double", + "type": "number" + }, + "smpRecovered": { + "description": "Value of Statutory Maternity Pay recovered year to date", + "format": "double", + "type": "number" + }, + "sncpRecovered": { + "description": "Value of Statutory Neonatal Care Pay recovered year to date", + "format": "double", + "type": "number" + }, + "spbpRecovered": { + "description": "Value of Statutory Parental Bereavment Pay recovered year to date", + "format": "double", + "type": "number" + }, + "sppRecovered": { + "description": "Value of Statutory Paternity Pay recovered year to date", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "EmployerPensionContribution": { + "additionalProperties": false, + "properties": { + "contributionAmount": { + "format": "double", + "type": "number" + }, + "contributionPercentage": { + "format": "double", + "type": "number" + }, + "isPercentage": { + "type": "boolean" + }, + "pensionName": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EmployerSortBy": { + "enum": [ + "ProcessorName", + "Name", + "Crn", + "AlternativeId", + "EmployeeCount", + "RTICount", + "PensionStatus", + "AutoPilot" + ], + "type": "string" + }, + "EmployerTemplate": { + "additionalProperties": false, + "properties": { + "content": { + "nullable": true, + "type": "string" + }, + "defaultContent": { + "description": "[readonly] The default content for this template", + "nullable": true, + "type": "string" + }, + "defaultSubject": { + "description": "[readonly] The default subject for this template", + "nullable": true, + "type": "string" + }, + "description": { + "description": "Explains the purpose of this template", + "nullable": true, + "type": "string" + }, + "hasSubject": { + "description": "[readonly] If false then the Subject property is not relevant for this template type", + "type": "boolean" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "isCustom": { + "description": "Indicates whether or not this template has been changed from the default content.", + "readOnly": true, + "type": "boolean" + }, + "subject": { + "maxLength": 250, + "nullable": true, + "type": "string" + }, + "tokens": { + "description": "[readonly] A list of tokens that can be used with this template.\r\nFor example, if 'Employee.FirstName' is in the list then use '{Employee.FirstName}' in the Content or Subject and\r\nit'll be replaced with the relevant value when the template is parsed.", + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "tokensExpanded": { + "type": "boolean" + }, + "type": { + "$ref": "#/components/schemas/EmployerTemplateType" + } + }, + "type": "object" + }, + "EmployerTemplateType": { + "enum": [ + "PayslipEmail", + "AutoEnrolment_Enrolled", + "AutoEnrolment_Enrolled_NetPay", + "AutoEnrolment_NotEnrolled", + "AutoEnrolment_Insert", + "CisStatementEmail", + "PayrunSummary", + "PayslipsUnemailed", + "PayrunAutoEmail", + "P60Email", + "AnnualCisStatementEmail", + "P45Email", + "AutoEnrolment_Postponed", + "AutoEnrolment_ReEnrolled", + "AutoEnrolment_Enrolled_SalarySacrifice", + "AutoEnrolment_ReEnrolled_SalarySacrifice", + "P11DEmail" + ], + "type": "string" + }, + "EmploymentDetails": { + "additionalProperties": false, + "properties": { + "apprenticeshipEndDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "apprenticeshipStartDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "cis": { + "$ref": "#/components/schemas/CisDetails" + }, + "cisSubContractor": { + "description": "Set to True if this Employee is a CIS Subcontractor. The ```Cis``` property contains further information", + "type": "boolean" + }, + "continuousEmploymentDate": { + "description": "[readonly] Continuous employment date for the occupational scheme.", + "format": "date", + "nullable": true, + "type": "string" + }, + "department": { + "$ref": "#/components/schemas/Department" + }, + "directorshipDetails": { + "$ref": "#/components/schemas/DirectorshipDetails" + }, + "forcePreviousPayrollCode": { + "description": "If this property has a non-empty value then a change of Payroll code will be declared on the next FPS.", + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "furloughCalculationBasis": { + "$ref": "#/components/schemas/FurloughCalculationBasis" + }, + "furloughCalculationBasisAmount": { + "format": "double", + "type": "number" + }, + "furloughEnd": { + "description": "Furlough End Date.", + "format": "date", + "nullable": true, + "type": "string" + }, + "furloughHoursNormallyWorked": { + "format": "double", + "type": "number" + }, + "furloughHoursOnFurlough": { + "format": "double", + "type": "number" + }, + "furloughStart": { + "description": "Furlough Start Date.", + "format": "date", + "nullable": true, + "type": "string" + }, + "includeSecondedInfoOnStarter": { + "description": "[readonly] If true then include seconded information on starter of FPS", + "type": "boolean" + }, + "isApprentice": { + "description": "Set to True if this Employee is an apprentice. This affects the calculations for National Minimum Wage", + "type": "boolean" + }, + "isWorkingInFreePort": { + "description": "Flag indicating the employee is employed in a Freeport", + "type": "boolean" + }, + "isWorkingInInvestmentZone": { + "description": "Flag indicating the employee is employed in an Investment Zone", + "type": "boolean" + }, + "jobTitle": { + "description": "Job Title of Primary role of the Employee", + "maxLength": 120, + "nullable": true, + "type": "string" + }, + "leaverDetails": { + "$ref": "#/components/schemas/LeaverDetails" + }, + "onFurlough": { + "description": "Set to true if the employee is on furlough.", + "type": "boolean" + }, + "onHold": { + "description": "Set to true to temporarily exclude the employee from payruns", + "type": "boolean" + }, + "partialFurlough": { + "description": "Set to true if the employee is partially furloughed.", + "type": "boolean" + }, + "payrollCode": { + "description": "The Employees Payroll Code. Must be unique within the Employer.", + "maxLength": 35, + "minLength": 1, + "type": "string" + }, + "roles": { + "description": "List of Roles held by Employee", + "items": { + "$ref": "#/components/schemas/Item" + }, + "nullable": true, + "type": "array" + }, + "starterDetails": { + "$ref": "#/components/schemas/StarterDetails" + }, + "veteranDetails": { + "$ref": "#/components/schemas/VeteranDetails" + }, + "workingPattern": { + "description": "Used when calculating payments for Leave.\r\nIf null then the default Working Pattern is used", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "workplacePostcode": { + "description": "Set the workplace postcode, ensuring it's uppercase and no longer than 10 characters.", + "maxLength": 10, + "nullable": true, + "type": "string" + } + }, + "required": [ + "payrollCode" + ], + "type": "object" + }, + "EntitlementBand": { + "additionalProperties": false, + "properties": { + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "order": { + "format": "int32", + "type": "integer" + }, + "paySspInAddition": { + "type": "boolean" + }, + "percentOfPay": { + "format": "double", + "type": "number" + }, + "period": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "EntityType": { + "enum": [ + "None", + "Employer", + "Employee", + "PayRunEntry", + "PensionScheme", + "PayCode", + "Note", + "Leave", + "Benefits", + "Pension", + "AttachmentOrder", + "OpeningBalances", + "NicSummary", + "HmrcPayment", + "DpsNotice", + "User", + "Settings", + "PayRun", + "Loan", + "Department", + "EmployerOpeningBalances", + "EmployerGroupMembership", + "DepartmentMembership", + "TermCalendar", + "TermCalendarYear" + ], + "type": "string" + }, + "Eps": { + "additionalProperties": false, + "properties": { + "account": { + "$ref": "#/components/schemas/EpsAccount" + }, + "apprenticeshipLevy": { + "$ref": "#/components/schemas/EpsApprenticeshipLevy" + }, + "deMinimisStateAid": { + "$ref": "#/components/schemas/EpsDeMinimisStateAid" + }, + "eligibleForEmploymentAllowance": { + "nullable": true, + "type": "boolean" + }, + "employerReferences": { + "$ref": "#/components/schemas/EmpRefs" + }, + "finalSubmission": { + "$ref": "#/components/schemas/EpsFinalSubmission" + }, + "govTalkSubmission": { + "$ref": "#/components/schemas/GovTalkSubmission" + }, + "iRmark": { + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "noPaymentForPeriod": { + "$ref": "#/components/schemas/FromToDates" + }, + "periodOfInactivity": { + "$ref": "#/components/schemas/FromToDates" + }, + "recoverableAmounts": { + "$ref": "#/components/schemas/RecoverableAmounts" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "xml": { + "description": "This property will soon be removed and should not be used.\r\nThere is now a dedicated API endpoint for retrieving the XML for a submission.", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EpsAccount": { + "additionalProperties": false, + "description": "Used on an EPS to send bank account information", + "properties": { + "accountHoldersName": { + "nullable": true, + "type": "string" + }, + "accountNo": { + "nullable": true, + "type": "string" + }, + "buildingSocRef": { + "nullable": true, + "type": "string" + }, + "sortCode": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EpsApprenticeshipLevy": { + "additionalProperties": false, + "description": "Used on an EPS to declare an Apprenticeship Levy amount", + "properties": { + "annualAllce": { + "format": "double", + "type": "number" + }, + "levyDueYTD": { + "format": "double", + "type": "number" + }, + "taxMonth": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "EpsDeMinimisStateAid": { + "additionalProperties": false, + "description": "Used on an EPS to declare an Employment Allowance DeMinimis State Aid information", + "properties": { + "agri": { + "type": "boolean" + }, + "fisheriesAqua": { + "type": "boolean" + }, + "indust": { + "type": "boolean" + }, + "roadTrans": { + "type": "boolean" + } + }, + "type": "object" + }, + "EpsFinalSubmission": { + "additionalProperties": false, + "description": "Used on an EPS to declare a Final Submission", + "properties": { + "becauseSchemeCeased": { + "type": "boolean" + }, + "dateCeased": { + "format": "date", + "nullable": true, + "type": "string" + }, + "isFinalSubmission": { + "type": "boolean" + } + }, + "type": "object" + }, + "Establishment": { + "additionalProperties": false, + "properties": { + "establishmentCode": { + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "localAuthorityNumber": { + "nullable": true, + "type": "string" + }, + "schoolEmployerType": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "EvcSettings": { + "additionalProperties": false, + "description": "Employee Settings related to the Employee Verification Programme", + "properties": { + "employee": { + "$ref": "#/components/schemas/Item" + }, + "rightToDelete": { + "description": "If set to True then the EVC service will be informed that the employee has invoked their GDPR Right To Delete", + "type": "boolean" + }, + "rightToRestrict": { + "description": "If set to True then this employee shouldn't be included in data sent to EVC", + "type": "boolean" + }, + "subjectAccessRequest": { + "description": "If set to True then the EVC service will be informed that the employee has made a Subject Access Request", + "type": "boolean" + } + }, + "type": "object" + }, + "Exb": { + "additionalProperties": false, + "properties": { + "additionsAmount": { + "format": "double", + "type": "number" + }, + "additionsDescription": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "deductionsAmount": { + "format": "double", + "type": "number" + }, + "deductionsDescription": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "employeeCount": { + "description": "[readonly] The number of employees with a P11D", + "format": "int32", + "type": "integer" + }, + "employerReferences": { + "$ref": "#/components/schemas/EmpRefs" + }, + "expensesAndBenefits": { + "$ref": "#/components/schemas/ExpensesAndBenefits" + }, + "govTalkSubmission": { + "$ref": "#/components/schemas/GovTalkSubmission" + }, + "iRmark": { + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "nicsPayable": { + "description": "[readonly] NICs Payable", + "format": "double", + "readOnly": true, + "type": "number" + }, + "nicsRate": { + "description": "[readonly] The Class 1A NICS Rate", + "format": "double", + "type": "number" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "totalAdjustedBenefits": { + "description": "[readonly] Total value of benefits", + "format": "double", + "readOnly": true, + "type": "number" + }, + "totalBenefits": { + "description": "[readonly] Total value of benefits, not including any deductions or additions", + "format": "double", + "type": "number" + }, + "xml": { + "description": "This property will soon be removed and should not be used.\r\nThere is now a dedicated API endpoint for retrieving the XML for a submission.", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "ExbDeclarations": { + "additionalProperties": false, + "properties": { + "p11Dincluded": { + "nullable": true, + "type": "string" + }, + "p46CarDeclaration": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "ExbEmployer": { + "additionalProperties": false, + "properties": { + "name": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "ExbP11d": { + "additionalProperties": false, + "properties": { + "assetsAvail": { + "$ref": "#/components/schemas/P11DAssetAvailableCollection" + }, + "cars": { + "$ref": "#/components/schemas/P11DCarCollection" + }, + "employee": { + "$ref": "#/components/schemas/ExbP11dEmployee" + }, + "expPaid": { + "$ref": "#/components/schemas/P11dExpenses" + }, + "livingAccom": { + "$ref": "#/components/schemas/P11DSingleItem" + }, + "loans": { + "$ref": "#/components/schemas/P11DLoanCollection" + }, + "medical": { + "$ref": "#/components/schemas/P11DSingleItem" + }, + "mileageAllow": { + "$ref": "#/components/schemas/P11DSingleItem" + }, + "other": { + "$ref": "#/components/schemas/P11DOther" + }, + "payments": { + "$ref": "#/components/schemas/P11DPaymentCollection" + }, + "relocation": { + "$ref": "#/components/schemas/P11DSingleItem" + }, + "services": { + "$ref": "#/components/schemas/P11DSingleItem" + }, + "transferred": { + "$ref": "#/components/schemas/P11DAssetTransferredCollection" + }, + "vans": { + "$ref": "#/components/schemas/P11dVans" + }, + "vouchersOrCCs": { + "$ref": "#/components/schemas/P11DSingleItem" + } + }, + "type": "object" + }, + "ExbP11dEmployee": { + "additionalProperties": false, + "properties": { + "birthDate": { + "nullable": true, + "type": "string" + }, + "dirInd": { + "nullable": true, + "type": "string" + }, + "employeeUniqueId": { + "format": "uuid", + "type": "string" + }, + "gender": { + "nullable": true, + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/RtiEmployeeName" + }, + "nino": { + "nullable": true, + "type": "string" + }, + "wksNo": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "ExbP11db": { + "additionalProperties": false, + "properties": { + "class1AcontributionsDue": { + "$ref": "#/components/schemas/ExbP11dbClass1A" + } + }, + "type": "object" + }, + "ExbP11dbClass1A": { + "additionalProperties": false, + "properties": { + "adjustments": { + "$ref": "#/components/schemas/ExbP11dbClass1AAdjustments" + }, + "niCpayable": { + "nullable": true, + "type": "string" + }, + "niCsRate": { + "nullable": true, + "type": "string" + }, + "totalBenefit": { + "$ref": "#/components/schemas/ExbP11dbClass1ATotalBenefit" + } + }, + "type": "object" + }, + "ExbP11dbClass1AAdjustment": { + "additionalProperties": false, + "properties": { + "adjustment": { + "nullable": true, + "type": "string" + }, + "description": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "ExbP11dbClass1AAdjustments": { + "additionalProperties": false, + "properties": { + "amountDue": { + "$ref": "#/components/schemas/ExbP11dbClass1AAdjustment" + }, + "amountNotDue": { + "$ref": "#/components/schemas/ExbP11dbClass1AAdjustment" + }, + "payable": { + "nullable": true, + "type": "string" + }, + "total": { + "nullable": true, + "type": "string" + }, + "totalBenefit": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "ExbP11dbClass1ATotalBenefit": { + "additionalProperties": false, + "properties": { + "adjustmentRequired": { + "nullable": true, + "type": "string" + }, + "value": { + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployerResponse" - } - } - } + "type": "object" + }, + "ExbReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/Exb" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{id}/custompayslip": { - "get": { - "tags": [ - "Employer" - ], - "summary": "Get Payslip Customisations", - "description": "Get the settings used to customise PaySlips for this Employer", - "operationId": "CustomPayslipEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer you want customisations for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "ExpensesAndBenefits": { + "additionalProperties": false, + "properties": { + "declarations": { + "$ref": "#/components/schemas/ExbDeclarations" + }, + "employer": { + "$ref": "#/components/schemas/ExbEmployer" + }, + "p11D": { + "items": { + "$ref": "#/components/schemas/ExbP11d" + }, + "nullable": true, + "type": "array" + }, + "p11Db": { + "$ref": "#/components/schemas/ExbP11db" + }, + "p11DrecordCount": { + "format": "int32", + "type": "integer" + }, + "p46CarRecordCount": { + "format": "int32", + "type": "integer" + }, + "relatedTaxYear": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "ExternalDataCompany": { + "additionalProperties": false, + "description": "When we retrieve data from an ExternalDataProvider we normalise it so that regardless of the provider the models are the same.\r\nThis model is used to represent a Company in an ExternalDataProvider", + "properties": { + "id": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "schemeName": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "ExternalDataProvider": { + "additionalProperties": false, + "properties": { + "authScheme": { + "$ref": "#/components/schemas/AuthScheme" + }, + "connected": { + "type": "boolean" + }, + "connectedAs": { + "nullable": true, + "type": "string" + }, + "deferralUrl": { + "nullable": true, + "type": "string" + }, + "iconUrl": { + "nullable": true, + "type": "string" + }, + "id": { + "$ref": "#/components/schemas/ExternalDataProviderId" + }, + "logoUrl": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "readOnly": true, + "type": "string" + }, + "requiresConfig": { + "type": "boolean" + }, + "types": { + "items": { + "$ref": "#/components/schemas/ExternalDataProviderType" + }, + "nullable": true, + "type": "array" } + }, + "type": "object" + }, + "ExternalDataProviderId": { + "enum": [ + "SmartPension_Employer", + "SmartPension_Adviser", + "PeoplesPension", + "Xero", + "Qbo", + "Sage", + "Nest", + "Cashplus", + "BreatheHr", + "KashFlow", + "FreeAgent", + "FreeAgentPm", + "Modulr", + "Square", + "Cezanne", + "Ciphr", + "Telleroo", + "WeWorked", + "RotaCloud", + "Quinyx", + "Csod", + "Planday", + "Starling", + "Deputy", + "Bottomline", + "Twinfield", + "MyePayWindow", + "IFinance", + "AccountsIQ", + "EPaySlips", + "NetSuite", + "StackOne" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayslipCustomisation" - } - } - } + "type": "string" + }, + "ExternalDataProviderType": { + "enum": [ + "PensionSchemes", + "Accounting", + "Payments", + "Hr", + "TimeAndAttendance", + "EmployeePortal", + "PremiumConnectedServices" + ], + "type": "string" + }, + "ExternalEmployeeMapping": { + "additionalProperties": false, + "description": "Used to represent details of an employee from an ExternalDataProvider, along with mapping information to an employee in the payroll system", + "properties": { + "employee": { + "$ref": "#/components/schemas/Item" + }, + "externalEmployee": { + "$ref": "#/components/schemas/Employee" + }, + "externalId": { + "description": "[readonly] The id for the employee in the external system", + "nullable": true, + "type": "string" + }, + "lastSyncDate": { + "description": "[readonly] The date and time this mapping was last synchronised", + "format": "date", + "nullable": true, + "type": "string" + }, + "providerId": { + "$ref": "#/components/schemas/ExternalDataProviderId" + }, + "status": { + "$ref": "#/components/schemas/ExternalEmployeeMappingStatus" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "Employer" + "ExternalEmployeeMappingStatus": { + "enum": [ + "Unmapped", + "Mapped", + "Ignored", + "Import" ], - "summary": "Update Payslip Customisations", - "description": "Set the settings used to customise PaySlips for this Employer", - "operationId": "UpdateCustomPayslipEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer you want customisations for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "ExternalProviderConversation": { + "additionalProperties": false, + "description": "This model is used to provide details of a data exchange with an ExternalDataProvider", + "properties": { + "contentType": { + "nullable": true, + "type": "string" + }, + "request": { + "nullable": true, + "type": "string" + }, + "response": { + "nullable": true, + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/BackgroundTaskStatus" + }, + "statusMessage": { + "nullable": true, + "type": "string" + }, + "title": { + "nullable": true, + "type": "string" + }, + "url": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "FieldModification": { + "additionalProperties": false, + "properties": { + "fieldName": { + "nullable": true, + "type": "string" + }, + "isSignificant": { + "type": "boolean" + }, + "newValue": { + "nullable": true, + "type": "string" + }, + "oldValue": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "FixedCode": { + "additionalProperties": false, + "description": "Part of the TaxYearConfig that our engine uses to enable calculation of Tax and NI.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "code": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "rate": { + "description": "[readonly]", + "format": "double", + "type": "number" } + }, + "type": "object" + }, + "FlexibleDrawdown": { + "enum": [ + "None", + "DeathBenefit", + "Pension", + "SeriousIllHealth", + "StandAloneLumpSum", + "PensionCommencementExcess" ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PayslipCustomisation" - } + "type": "string" + }, + "Fps": { + "additionalProperties": false, + "properties": { + "correctionEmployees": { + "items": { + "format": "int32", + "type": "integer" }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayslipCustomisation" - } + "nullable": true, + "type": "array" + }, + "employeeCount": { + "format": "int32", + "type": "integer" + }, + "employerReferences": { + "$ref": "#/components/schemas/EmpRefs" + }, + "fullPaymentSubmission": { + "$ref": "#/components/schemas/FullPaymentSubmission" + }, + "govTalkSubmission": { + "$ref": "#/components/schemas/GovTalkSubmission" + }, + "iRmark": { + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "isCorrection": { + "type": "boolean" + }, + "lateReason": { + "$ref": "#/components/schemas/FpsLateReason" + }, + "overridePaymentDate": { + "description": "If a value if provided here then it will be used in place of the actual PaymentDate on the FPS.\r\nThe value must fall in to the same Tax Period as the PaymentDate", + "format": "date", + "nullable": true, + "type": "string" + }, + "payRunVersion": { + "description": "The supplementary pay run version of this FPS.", + "format": "int32", + "type": "integer" + }, + "paymentDate": { + "format": "date", + "type": "string" + }, + "supersededCount": { + "description": "The number of payments on this FPS that have been superseded by later versions", + "format": "int32", + "type": "integer" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "validationWarnings": { + "items": { + "$ref": "#/components/schemas/RtiValidationWarning" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PayslipCustomisation" - } + "nullable": true, + "readOnly": true, + "type": "array" + }, + "versions": { + "description": "If any of the payments on this FPS appear on another FPS then\r\nthen there will be an entry here for each of them.\r\nIf there is an entry where the FpsId matches this FPS then that means the FpsEmployee on this Fps\r\nis itself a prior version (ie, it's been superseded)", + "items": { + "$ref": "#/components/schemas/FpsPriorVersion" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PayslipCustomisation" - } - } + "nullable": true, + "type": "array" + }, + "xml": { + "description": "This property will soon be removed and should not be used.\r\nThere is now a dedicated API endpoint for retrieving the XML for a submission.", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayslipCustomisation" - } - } - } - } - } - } - }, - "/employers/{id}/YearEnd": { - "get": { - "tags": [ - "Employer" - ], - "summary": "Review Year End Changes", - "description": "View the changes that will be made when you start the next tax year for the employer", - "operationId": "ReviewYearEndEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "FpsBenefit": { + "additionalProperties": false, + "properties": { + "car": { + "items": { + "$ref": "#/components/schemas/FpsCar" + }, + "nullable": true, + "type": "array" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/YearEnd" - } - } - } + }, + "type": "object" + }, + "FpsCar": { + "additionalProperties": false, + "properties": { + "amendment": { + "nullable": true, + "type": "string" }, - "404": { - "description": "NotFound -\r\nWe don't yet support the tax year following the employers current tax year" + "availFrom": { + "nullable": true, + "type": "string" + }, + "availTo": { + "nullable": true, + "type": "string" + }, + "cO2": { + "nullable": true, + "type": "string" + }, + "cashEquiv": { + "nullable": true, + "type": "string" + }, + "firstRegd": { + "nullable": true, + "type": "string" + }, + "freeFuel": { + "$ref": "#/components/schemas/FpsCarFuel" + }, + "fuel": { + "nullable": true, + "type": "string" + }, + "id": { + "nullable": true, + "type": "string" + }, + "make": { + "nullable": true, + "type": "string" + }, + "price": { + "nullable": true, + "type": "string" + }, + "zeroEmissionsMileage": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Employer" - ], - "summary": "Make Year End Changes", - "description": "Apply the changes for the year end and start the next tax year for the employer.", - "operationId": "ApplyYearEndEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "FpsCarFuel": { + "additionalProperties": false, + "properties": { + "cashEquiv": { + "nullable": true, + "type": "string" + }, + "provided": { + "nullable": true, + "type": "string" + }, + "withdrawn": { + "nullable": true, + "type": "string" } - ], - "requestBody": { - "description": "You can suppress the emailing of P60s and/or CIS Statements by supplying a value of true for dontEmailP60s and/or dontEmailCisStatements", - "content": { - "application/json-patch+json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - }, - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - }, - "text/json": { - "schema": { - "type": "object", - "additionalProperties": { } - } + }, + "type": "object" + }, + "FpsEmployee": { + "additionalProperties": false, + "properties": { + "employeeDetails": { + "$ref": "#/components/schemas/FpsEmployeeDetails" + }, + "employeeUniqueId": { + "format": "uuid", + "type": "string" + }, + "employment": { + "$ref": "#/components/schemas/FpsEmployment" + }, + "item": { + "$ref": "#/components/schemas/Item" + }, + "payrunEntryId": { + "format": "uuid", + "type": "string" + }, + "validationWarnings": { + "items": { + "$ref": "#/components/schemas/RtiValidationWarning" }, - "application/*+json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - } + "nullable": true, + "readOnly": true, + "type": "array" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/YearEnd" - } - } - } + "type": "object" + }, + "FpsEmployeeDetails": { + "additionalProperties": false, + "properties": { + "address": { + "$ref": "#/components/schemas/RtiEmployeeAddress" }, - "404": { - "description": "NotFound -\r\nWe don't yet support the tax year following the employers current tax year" + "birthDate": { + "nullable": true, + "type": "string" + }, + "gender": { + "nullable": true, + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/RtiEmployeeName" + }, + "nino": { + "nullable": true, + "type": "string" + }, + "partnerDetails": { + "$ref": "#/components/schemas/FpsEmployeeDetailsPartnerDetails" + }, + "passportNumber": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{id}/rti/requiringattention": { - "get": { - "tags": [ - "Employer" - ], - "summary": "RTI Documents Requiring Attention", - "description": "Returns all RTI documents that have a Submission Status of NotSubmitted or ErrorResponse", - "operationId": "RtiRequiringAttentionEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "FpsEmployeeDetailsPartnerDetails": { + "additionalProperties": false, + "properties": { + "name": { + "$ref": "#/components/schemas/RtiEmployeeName" + }, + "nino": { + "nullable": true, + "type": "string" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + }, + "type": "object" + }, + "FpsEmployeeFigsToDate": { + "additionalProperties": false, + "properties": { + "additions": { + "nullable": true, + "type": "string" + }, + "adjustments": { + "nullable": true, + "type": "string" + }, + "benefitsTaxedViaPayrollYTD": { + "nullable": true, + "type": "string" + }, + "deductions": { + "nullable": true, + "type": "string" + }, + "empeePenContribnsNotPaidYTD": { + "nullable": true, + "type": "string" + }, + "empeePenContribnsPaidYTD": { + "nullable": true, + "type": "string" + }, + "employeePensionContribution": { + "nullable": true, + "type": "string" + }, + "employeePensionContributionAvc": { + "nullable": true, + "type": "string" + }, + "employerPensionContribution": { + "nullable": true, + "type": "string" + }, + "foreignTaxAmount": { + "nullable": true, + "type": "string" + }, + "foreignTaxAmountReclaimed": { + "nullable": true, + "type": "string" + }, + "gross": { + "nullable": true, + "type": "string" + }, + "mapsMiles": { + "nullable": true, + "type": "string" + }, + "netPay": { + "nullable": true, + "type": "string" + }, + "nonTaxOrNICPmt": { + "nullable": true, + "type": "string" + }, + "paymentAfterLeaving": { + "nullable": true, + "type": "string" + }, + "pensionableEarnings": { + "nullable": true, + "type": "string" + }, + "pensionablePay": { + "nullable": true, + "type": "string" + }, + "postgradLoansTD": { + "nullable": true, + "type": "string" + }, + "sapytd": { + "nullable": true, + "type": "string" + }, + "shppytd": { + "nullable": true, + "type": "string" + }, + "smpytd": { + "nullable": true, + "type": "string" + }, + "sncpytd": { + "nullable": true, + "type": "string" + }, + "spbpytd": { + "nullable": true, + "type": "string" + }, + "sppytd": { + "nullable": true, + "type": "string" + }, + "sspytd": { + "nullable": true, + "type": "string" + }, + "studentLoansTD": { + "nullable": true, + "type": "string" + }, + "takeHomePay": { + "nullable": true, + "type": "string" + }, + "taxOnPaymentAfterLeaving": { + "nullable": true, + "type": "string" + }, + "taxablePay": { + "nullable": true, + "type": "string" + }, + "totalTax": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{id}/automation": { - "get": { - "tags": [ - "Employer" - ], - "summary": "Get Automation Settings", - "description": "Returns the AutomationSettings for the Employer", - "operationId": "GetAutomationSettingsEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "FpsEmployeeFlexibleDrawdown": { + "additionalProperties": false, + "properties": { + "flexiblyAccessingPensionRights": { + "nullable": true, + "type": "string" + }, + "nontaxablePayment": { + "nullable": true, + "type": "string" + }, + "pensionCommencementExcess": { + "nullable": true, + "type": "string" + }, + "pensionDeathBenefit": { + "nullable": true, + "type": "string" + }, + "seriousIllHealthLumpSum": { + "nullable": true, + "type": "string" + }, + "standAloneLumpSum": { + "nullable": true, + "type": "string" + }, + "taxablePayment": { + "nullable": true, + "type": "string" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AutomationSettings" - } - } - } + }, + "type": "object" + }, + "FpsEmployeeNIlettersAndValues": { + "additionalProperties": false, + "properties": { + "atLELYTD": { + "nullable": true, + "type": "string" + }, + "empeeContribnsInPd": { + "nullable": true, + "type": "string" + }, + "empeeContribnsYTD": { + "nullable": true, + "type": "string" + }, + "grossEarningsForNICsInPd": { + "nullable": true, + "type": "string" + }, + "grossEarningsForNICsYTD": { + "nullable": true, + "type": "string" + }, + "leLtoPTYTD": { + "nullable": true, + "type": "string" + }, + "nIletter": { + "nullable": true, + "type": "string" + }, + "pTtoUELYTD": { + "nullable": true, + "type": "string" + }, + "totalEmpNICInPd": { + "nullable": true, + "type": "string" + }, + "totalEmpNICYTD": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "FpsEmployeePayment": { + "additionalProperties": false, + "properties": { + "aggregatedEarnings": { + "nullable": true, + "type": "string" + }, + "bacsHashCode": { + "nullable": true, + "type": "string" + }, + "benefits": { + "$ref": "#/components/schemas/FpsBenefit" + }, + "benefitsTaxedViaPayroll": { + "nullable": true, + "type": "string" + }, + "class1ANICsYTD": { + "nullable": true, + "type": "string" + }, + "dednsFromNetPay": { + "nullable": true, + "type": "string" + }, + "empeePenContribnsNotPaid": { + "nullable": true, + "type": "string" + }, + "empeePenContribnsPaid": { + "nullable": true, + "type": "string" + }, + "flexibleDrawdown": { + "$ref": "#/components/schemas/FpsEmployeeFlexibleDrawdown" + }, + "hoursWorked": { + "nullable": true, + "type": "string" + }, + "itemsSubjectToClass1NIC": { + "nullable": true, + "type": "string" + }, + "lateReason": { + "nullable": true, + "type": "string" + }, + "monthNo": { + "nullable": true, + "type": "string" + }, + "nonTaxOrNICPmt": { + "nullable": true, + "type": "string" + }, + "onStrike": { + "nullable": true, + "type": "string" + }, + "payAfterStatDedns": { + "nullable": true, + "type": "string" + }, + "payFreq": { + "nullable": true, + "type": "string" + }, + "periodsCovered": { + "format": "int32", + "type": "integer" + }, + "pmtAfterLeaving": { + "nullable": true, + "type": "string" + }, + "pmtDate": { + "nullable": true, + "type": "string" + }, + "postgradLoanRecovered": { + "nullable": true, + "type": "string" + }, + "sapytd": { + "nullable": true, + "type": "string" + }, + "shPPYTD": { + "nullable": true, + "type": "string" + }, + "smpytd": { + "nullable": true, + "type": "string" + }, + "sncpytd": { + "nullable": true, + "type": "string" + }, + "spbpytd": { + "nullable": true, + "type": "string" + }, + "sppytd": { + "nullable": true, + "type": "string" + }, + "studentLoanRecovered": { + "$ref": "#/components/schemas/StudentLoanRecovered" + }, + "taxCode": { + "$ref": "#/components/schemas/FpsEmployeeTaxCode" + }, + "taxDeductedOrRefunded": { + "nullable": true, + "type": "string" + }, + "taxablePay": { + "nullable": true, + "type": "string" + }, + "trivialCommutationPayment": { + "items": { + "$ref": "#/components/schemas/FpsEmployeeTrivialCommutationPayment" + }, + "nullable": true, + "type": "array" + }, + "unpaidAbsence": { + "nullable": true, + "type": "string" + }, + "weekNo": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Employer" - ], - "summary": "Update Automation Settings", - "description": "Updates the AutomationSettings for the Employer", - "operationId": "UpdateAutomationSettingsEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "FpsEmployeeSeconded": { + "additionalProperties": false, + "properties": { + "eeaCitizen": { + "nullable": true, + "type": "string" + }, + "epM6": { + "nullable": true, + "type": "string" + }, + "inOutUK": { + "nullable": true, + "type": "string" + }, + "stay183DaysOrMore": { + "nullable": true, + "type": "string" + }, + "stayLessThan183Days": { + "nullable": true, + "type": "string" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/AutomationSettings" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/AutomationSettings" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AutomationSettings" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AutomationSettings" - } - } + }, + "type": "object" + }, + "FpsEmployeeStarter": { + "additionalProperties": false, + "properties": { + "occPension": { + "$ref": "#/components/schemas/FpsEmployeeStarterOccPension" + }, + "postgradLoan": { + "nullable": true, + "type": "string" + }, + "seconded": { + "$ref": "#/components/schemas/FpsEmployeeSeconded" + }, + "startDate": { + "nullable": true, + "type": "string" + }, + "startDec": { + "nullable": true, + "type": "string" + }, + "studentLoan": { + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AutomationSettings" - } - } - } + "type": "object" + }, + "FpsEmployeeStarterOccPension": { + "additionalProperties": false, + "properties": { + "amount": { + "nullable": true, + "type": "string" + }, + "bereaved": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{id}/groups": { - "get": { - "tags": [ - "Employer" - ], - "summary": "Get Employer Groups", - "operationId": "GetGroupMembershipsEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer you want to retrieve Groups for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "FpsEmployeeTaxCode": { + "additionalProperties": false, + "properties": { + "basisNonCumulative": { + "nullable": true, + "type": "string" + }, + "taxCode": { + "nullable": true, + "type": "string" + }, + "taxRegime": { + "nullable": true, + "type": "string" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployerGroupMembership" - } - } - } - } + }, + "type": "object" + }, + "FpsEmployeeTrivialCommutationPayment": { + "additionalProperties": false, + "properties": { + "type": { + "nullable": true, + "type": "string" + }, + "value": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Employer" - ], - "summary": "Set Employer Groups", - "operationId": "SetGroupMembershipsEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer you want to set Groups for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "FpsEmployerPayIdChanged": { + "additionalProperties": false, + "properties": { + "oldPayrollId": { + "nullable": true, + "type": "string" + }, + "payrollIdChangedIndicator": { + "nullable": true, + "type": "string" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployerGroupMembership" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployerGroupMembership" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployerGroupMembership" - } - } + }, + "type": "object" + }, + "FpsEmployment": { + "additionalProperties": false, + "properties": { + "directorsNIC": { + "nullable": true, + "type": "string" + }, + "employeeCurrentNiLetter": { + "nullable": true, + "type": "string" + }, + "employeeWorkplacePostcode": { + "nullable": true, + "type": "string" + }, + "figuresToDate": { + "$ref": "#/components/schemas/FpsEmployeeFigsToDate" + }, + "irrEmp": { + "nullable": true, + "type": "string" + }, + "leavingDate": { + "nullable": true, + "type": "string" + }, + "nIlettersAndValues": { + "items": { + "$ref": "#/components/schemas/FpsEmployeeNIlettersAndValues" }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployerGroupMembership" - } - } - } + "nullable": true, + "type": "array" + }, + "occPenInd": { + "nullable": true, + "type": "string" + }, + "offPayrollWorker": { + "nullable": true, + "type": "string" + }, + "payId": { + "nullable": true, + "type": "string" + }, + "payIdChgd": { + "$ref": "#/components/schemas/FpsEmployerPayIdChanged" + }, + "payment": { + "$ref": "#/components/schemas/FpsEmployeePayment" + }, + "paymentToANonIndividual": { + "nullable": true, + "type": "string" + }, + "starter": { + "$ref": "#/components/schemas/FpsEmployeeStarter" + }, + "taxWkOfApptOfDirector": { + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployerGroupMembership" - } - } - } - } + "type": "object" + }, + "FpsFields": { + "additionalProperties": false, + "properties": { + "excludeFromRtiSubmissions": { + "description": "True if Employee is excluded from RTI submissions", + "type": "boolean" + }, + "hoursNormallyWorked": { + "$ref": "#/components/schemas/HoursNormallyWorked" + }, + "irregularPaymentPattern": { + "description": "True if employee is currently on an irregular payment patter", + "type": "boolean" + }, + "nonIndividual": { + "description": "True if Employee's payments are being made to a body (eg, trustee, corporate organisation or personal representative)", + "type": "boolean" + }, + "offPayrollWorker": { + "type": "boolean" } - } - } - }, - "/employers/{id}/openingbalances": { - "get": { - "tags": [ - "Employer" + }, + "type": "object" + }, + "FpsLateReason": { + "enum": [ + "NoneGiven", + "NotionalExpat", + "NotionalErs", + "NotionalOther", + "Class1", + "MicroEmployer", + "NoRequirement", + "ReasonableExcuse", + "Correction" ], - "summary": "Get EmployerOpeningBalances", - "description": "Returns the EmployerOpeningBalances for the Employer", - "operationId": "GetEmployerOpeningBalancesEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "FpsPriorVersion": { + "additionalProperties": false, + "properties": { + "fpsId": { + "description": "The Id of the FPS that contains an earlier version of the PayRunEntry", + "format": "uuid", + "type": "string" + }, + "payRunEntryId": { + "format": "uuid", + "type": "string" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerOpeningBalances" - } - } - } + }, + "type": "object" + }, + "FpsReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/Fps" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Employer" - ], - "summary": "Update EmployerOpeningBalances", - "description": "Updates the EmployerOpeningBalances for the Employer for their StartYear", - "operationId": "UpdateEmployerOpeningBalancesEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "FromToDates": { + "additionalProperties": false, + "properties": { + "from": { + "format": "date", + "type": "string" + }, + "to": { + "format": "date", + "type": "string" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/EmployerOpeningBalances" - } + }, + "type": "object" + }, + "FullPaymentSubmission": { + "additionalProperties": false, + "properties": { + "employee": { + "items": { + "$ref": "#/components/schemas/FpsEmployee" }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerOpeningBalances" - } + "nullable": true, + "type": "array" + }, + "relatedTaxYear": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "FullSummaryOfPayReport": { + "additionalProperties": false, + "properties": { + "deductionLines": { + "items": { + "$ref": "#/components/schemas/FullSummaryOfPayReportLine" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/EmployerOpeningBalances" - } + "nullable": true, + "type": "array" + }, + "employer": { + "$ref": "#/components/schemas/Item" + }, + "endDate": { + "format": "date", + "type": "string" + }, + "endPeriodName": { + "nullable": true, + "type": "string" + }, + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/FullSummaryOfPayReportLine" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/EmployerOpeningBalances" - } - } + "nullable": true, + "type": "array" + }, + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "period": { + "format": "int32", + "type": "integer" + }, + "periodTo": { + "format": "int32", + "type": "integer" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerOpeningBalances" - } - } - } - } - } - } - }, - "/employers/{id}/evc": { - "put": { - "tags": [ - "Employer" - ], - "summary": "Update EVC OptIn", - "description": "Sets the EVC OptIn setting for the employer.\r\nA boolean value needs to be sent in the body to indicate if the employer is opted in.\r\nSo sending false would result in the employer being opted out.", - "operationId": "SetEvcOptInEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "FullSummaryOfPayReportLine": { + "additionalProperties": false, + "properties": { + "erValue": { + "format": "double", + "nullable": true, + "type": "number" + }, + "headCount": { + "format": "int32", + "type": "integer" + }, + "payCode": { + "$ref": "#/components/schemas/PayCode" + }, + "qty": { + "format": "double", + "nullable": true, + "type": "number" + }, + "value": { + "format": "double", + "type": "number" } - ], - "requestBody": { + }, + "type": "object" + }, + "FullSummaryOfPayReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "type": "boolean" - } - }, - "application/json": { - "schema": { - "type": "boolean" - } - }, - "text/json": { - "schema": { - "type": "boolean" - } - }, - "application/*+json": { - "schema": { - "type": "boolean" - } - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/FullSummaryOfPayReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success" - } - } + "type": "object" }, - "get": { - "tags": [ - "Employer" - ], - "summary": "Get EVC OptIn History", - "description": "Gets the history of changes to the EVC OptIn setting for the employer.", - "operationId": "GetEvcOptInHistoryEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployerEvcOptInHistory" - } - } - } - } - } - } - } - }, - "/employers/{id}/accrual-holiday-scheme/employee": { - "get": { - "tags": [ - "Employer" - ], - "summary": "Get List of Employees with Holiday Accrual Scheme", - "operationId": "GetEmployeesWithAccrualHolidaySchemeEmployer", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/groups": { - "get": { - "tags": [ - "EmployerGroup" + "FurloughCalculationBasis": { + "enum": [ + "ActualPaidAmount", + "DailyReferenceAmount", + "MonthlyReferenceAmount" ], - "summary": "List EmployerGroups", - "description": "Lists all EmployerGroups for the user.", - "operationId": "IndexEmployerGroup", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } + "type": "string" }, - "post": { - "tags": [ - "EmployerGroup" - ], - "summary": "Create EmployerGroup", - "description": "Creates a new EmployerGroup for the user.", - "operationId": "CreateEmployerGroup", - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/EmployerGroup" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerGroup" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/EmployerGroup" - } + "FurloughReport": { + "additionalProperties": false, + "properties": { + "amountClaimedForEmployerNICsContributionsForFurloughedEmployees": { + "format": "double", + "type": "number" + }, + "amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees": { + "format": "double", + "type": "number" + }, + "amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod": { + "format": "double", + "type": "number" + }, + "bankAccountHoldersAddress": { + "nullable": true, + "type": "string" + }, + "bankAccountHoldersFirstName": { + "nullable": true, + "type": "string" + }, + "bankAccountHoldersLastName": { + "nullable": true, + "type": "string" + }, + "bankAccountNumber": { + "nullable": true, + "type": "string" + }, + "bankSortCode": { + "nullable": true, + "type": "string" + }, + "buildingSocietyRollNumber": { + "nullable": true, + "type": "string" + }, + "claimPeriodEndDate": { + "format": "date", + "readOnly": true, + "type": "string" + }, + "claimPeriodStartDate": { + "format": "date", + "readOnly": true, + "type": "string" + }, + "companyAddress": { + "nullable": true, + "type": "string" + }, + "companyCrn": { + "nullable": true, + "type": "string" + }, + "companyName": { + "nullable": true, + "type": "string" + }, + "contactName": { + "nullable": true, + "type": "string" + }, + "contactNumber": { + "nullable": true, + "type": "string" + }, + "ctUtr": { + "nullable": true, + "type": "string" + }, + "employer": { + "$ref": "#/components/schemas/Item" + }, + "employerReference": { + "nullable": true, + "type": "string" + }, + "endDate": { + "format": "date", + "type": "string" + }, + "endPeriodName": { + "nullable": true, + "type": "string" + }, + "govtContribRate": { + "format": "double", + "type": "number" + }, + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/FurloughReportLine" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/EmployerGroup" - } - } + "nullable": true, + "type": "array" + }, + "maxClaimPerEmployee": { + "format": "double", + "type": "number" + }, + "numberOfEmployeesBeingFurloughed": { + "format": "int32", + "type": "integer" + }, + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "percentageOfNIAndPensionToClaim": { + "format": "double", + "type": "number" + }, + "period": { + "format": "int32", + "type": "integer" + }, + "periodTo": { + "format": "int32", + "type": "integer" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "saUtr": { + "nullable": true, + "type": "string" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "totalClaimAmount": { + "format": "double", + "readOnly": true, + "type": "number" + }, + "totalGrossPay": { + "format": "double", + "type": "number" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "FurloughReportLine": { + "additionalProperties": false, + "properties": { + "daysInPeriod": { + "format": "int32", + "type": "integer" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerGroup" - } - } - } + "department": { + "nullable": true, + "type": "string" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "employeesFullName": { + "nullable": true, + "type": "string" + }, + "employeesNINO": { + "nullable": true, + "type": "string" + }, + "employeesPayrollReferenceNumber": { + "nullable": true, + "type": "string" + }, + "furloughEnd": { + "format": "date", + "nullable": true, + "type": "string" + }, + "furloughStart": { + "format": "date", + "nullable": true, + "type": "string" + }, + "furloughedDays": { + "format": "int32", + "type": "integer" + }, + "grossPay": { + "format": "double", + "type": "number" + }, + "grossPayClaim": { + "format": "double", + "type": "number" + }, + "hoursFurloughed": { + "format": "double", + "nullable": true, + "type": "number" + }, + "hoursNormallyWorked": { + "format": "double", + "nullable": true, + "type": "number" + }, + "niClaim": { + "format": "double", + "type": "number" + }, + "pensionClaim": { + "format": "double", + "type": "number" + }, + "percentageOfFurloughedDaysWorked": { + "format": "double", + "type": "number" + }, + "totalClaim": { + "format": "double", + "readOnly": true, + "type": "number" } - } - } - }, - "/employers/groups/{code}": { - "get": { - "tags": [ - "EmployerGroup" - ], - "summary": "Get EmployerGroup", - "description": "Gets the EmployerGroup specified.", - "operationId": "GetEmployerGroup", - "parameters": [ - { - "name": "code", - "in": "path", - "required": true, - "schema": { - "type": "string" - } + }, + "type": "object" + }, + "FurloughReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/FurloughReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } + }, + "type": "object" + }, + "Gender": { + "enum": [ + "Male", + "Female" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerGroup" - } - } - } + "type": "string" + }, + "GenderPayGapLine": { + "additionalProperties": false, + "properties": { + "bonusRbp": { + "format": "double", + "type": "number" + }, + "forename": { + "nullable": true, + "type": "string" + }, + "fullPay": { + "nullable": true, + "type": "string" + }, + "gender": { + "$ref": "#/components/schemas/Gender" + }, + "hourlyRate": { + "format": "double", + "type": "number" }, - "404": { - "description": "EmployerGroup Not Found" + "ordinaryPay": { + "format": "double", + "type": "number" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "periodBonus": { + "format": "double", + "type": "number" + }, + "surname": { + "nullable": true, + "type": "string" + }, + "weeklyHours": { + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "EmployerGroup" - ], - "summary": "Update EmployerGroup", - "description": "Updates a EmployerGroup for the user.", - "operationId": "UpdateEmployerGroup", - "parameters": [ - { - "name": "code", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/EmployerGroup" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerGroup" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/EmployerGroup" - } + "GenderPayGapReport": { + "additionalProperties": false, + "properties": { + "genderPayGapLines": { + "items": { + "$ref": "#/components/schemas/GenderPayGapLine" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/EmployerGroup" - } - } + "nullable": true, + "type": "array" + }, + "isDraft": { + "type": "boolean" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerGroup" - } - } - } + "type": "object" + }, + "GenderPayGapReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - "404": { - "description": "EmployerGroup Not Found" + "model": { + "$ref": "#/components/schemas/GenderPayGapReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "EmployerGroup" - ], - "summary": "Delete EmployerGroup", - "description": "Deletes the specified EmployerGroup.", - "operationId": "DeleteEmployerGroup", - "parameters": [ - { - "name": "code", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } + "GenderPayGapSnapShotDate": { + "enum": [ + "March", + "April" ], - "responses": { - "204": { - "description": "No Content" + "type": "string" + }, + "GovTalk": { + "additionalProperties": false, + "description": "Part of the TaxYearConfig that our engine uses submit documents to the HMRC Gateway.\r\nIt is used internally when our engine communicates with HMRC.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "cis300NameSpace": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/templates": { - "get": { - "tags": [ - "EmployerTemplate" - ], - "summary": "List EmployerTemplates", - "description": "Lists all EmployerTemplates for the Employer specified.", - "operationId": "IndexEmployerTemplate", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list Pay Codes", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/templates/{type}": { - "get": { - "tags": [ - "EmployerTemplate" - ], - "summary": "Get EmployerTemplate", - "description": "Gets the EmployerTemplate specified by the Type.", - "operationId": "GetEmployerTemplate", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the EmployerTemplate belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "cisVerificationRequestNameSpace": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "type", - "in": "path", - "description": "The EmployerTemplateType you want to retrieve.", - "required": true, - "schema": { - "$ref": "#/components/schemas/EmployerTemplateType" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerTemplate" - } - } - } + "employerPaymentSummaryNamespace": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "employerPaymentSummaryNamespaceVersion": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "expensesAndBenefitsNameSpace": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "expensesAndBenefitsNameSpaceVersion": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "fullPaymentSubmissionNamespace": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "fullPaymentSubmissionNamespaceVersion": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "niNoVerificationRequestNameSpace": { + "description": "[readonly]", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "EmployerTemplate" - ], - "summary": "Update EmployerTemplate", - "description": "Updates the EmployerTemplate specified by the Type.\r\nThe only values need to supply are ```Content```\r\nand (if applicable) ```Subject```.\r\nIf these values are empty strings or not provided then the template will revert to the default values.", - "operationId": "UpdateEmployerTemplate", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the EmployerTemplate belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "GovTalkError": { + "additionalProperties": false, + "properties": { + "location": { + "nullable": true, + "type": "string" }, - { - "name": "type", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/EmployerTemplateType" - } + "number": { + "nullable": true, + "type": "string" + }, + "raisedBy": { + "nullable": true, + "type": "string" + }, + "text": { + "nullable": true, + "type": "string" + }, + "type": { + "nullable": true, + "type": "string" } - ], - "requestBody": { - "description": "The EmployerTemplateType you want to retrieve.", - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/EmployerTemplate" - } + }, + "type": "object" + }, + "GovTalkSubmission": { + "additionalProperties": false, + "properties": { + "correlationId": { + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "errors": { + "items": { + "$ref": "#/components/schemas/GovTalkError" }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerTemplate" - } + "nullable": true, + "type": "array" + }, + "errorsJson": { + "nullable": true, + "type": "string" + }, + "iRmark": { + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "lastPoll": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "message": { + "nullable": true, + "type": "string" + }, + "messageClass": { + "nullable": true, + "type": "string" + }, + "pollInterval": { + "format": "int32", + "type": "integer" + }, + "rawResponse": { + "nullable": true, + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/SubmissionStatus" + }, + "submittedAt": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "url": { + "maxLength": 100, + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "GrossToNetReport": { + "additionalProperties": false, + "properties": { + "cisLines": { + "items": { + "$ref": "#/components/schemas/GrossToNetReportCisLine" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/EmployerTemplate" - } + "nullable": true, + "type": "array" + }, + "employer": { + "$ref": "#/components/schemas/Item" + }, + "endDate": { + "format": "date", + "type": "string" + }, + "endPeriodName": { + "nullable": true, + "type": "string" + }, + "forCis": { + "type": "boolean" + }, + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/GrossToNetReportLine" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/EmployerTemplate" - } - } + "nullable": true, + "type": "array" + }, + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "period": { + "format": "int32", + "type": "integer" + }, + "periodTo": { + "format": "int32", + "type": "integer" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerTemplate" - } - } - } - } - } - } - }, - "/engine/config": { - "get": { - "tags": [ - "Engine" - ], - "summary": "Get Configuration", - "description": "Returns the raw configuration data that is used as the basis for any calculations for the given tax year.\r\nYou would never need to use this configuration values yourself in any API calls. It is provided just for information purposes", - "operationId": "ConfigEngine", - "parameters": [ - { - "name": "taxYear", - "in": "query", - "description": "The year that you want to retrieve details for. If not provided then current tax year will be used.", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TaxYearConfig" - } - } - } - } - } - } - }, - "/engine/config/{taxYear}/ni/{payPeriod}": { - "get": { - "tags": [ - "Engine" - ], - "summary": "Get National Insurance Thresholds", - "description": "Returns the National Insurance thresholds for the given PayPeriod", - "operationId": "GetNationalInsuranceThresholdsEngine", - "parameters": [ - { - "name": "taxYear", - "in": "path", - "description": "The year that you want to retrieve details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "type": "object" + }, + "GrossToNetReportCisLine": { + "additionalProperties": false, + "properties": { + "cisDeduction": { + "format": "double", + "type": "number" + }, + "department": { + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "description": "The PayPeriod (ie, monthly) that you want to retrieve details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "employee": { + "$ref": "#/components/schemas/Item" }, - { - "name": "periodStart", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "labour": { + "format": "double", + "type": "number" }, - { - "name": "periodEnd", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "lastName": { + "nullable": true, + "type": "string" }, - { - "name": "effectiveDate", - "in": "query", - "description": "The date as of which you want to retrieve details for. If not provided then latest available details for the current tax year will be used.", - "schema": { - "type": "string", - "format": "date-time" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NationalInsuranceCalculationPeriodValues" - } - } - } + "materials": { + "format": "double", + "type": "number" + }, + "payment": { + "format": "double", + "type": "number" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "taxableGross": { + "format": "double", + "type": "number" + }, + "totalGross": { + "format": "double", + "type": "number" + }, + "umbrellaFee": { + "format": "double", + "type": "number" + }, + "vat": { + "format": "double", + "type": "number" } - } - } - }, - "/engine/tax": { - "get": { - "tags": [ - "Engine" - ], - "summary": "Calculate Tax due", - "description": "Calculates tax amount due, given the values specified.\r\nYou would never need to use this API call. It is provided just for information and testing purposes.\r\nAccess is limited so you'll probably receive a 401 response if you try to use it.", - "operationId": "CalculateTaxEngine", - "parameters": [ - { - "name": "taxYear", - "in": "query", - "description": "If not provided then current tax year will be used.", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + }, + "type": "object" + }, + "GrossToNetReportLine": { + "additionalProperties": false, + "properties": { + "attachments": { + "format": "double", + "type": "number" }, - { - "name": "taxCode", - "in": "query", - "description": "If not provided then the default code for the tax year will be used.", - "schema": { - "type": "string" - } + "department": { + "nullable": true, + "type": "string" }, - { - "name": "gross", - "in": "query", - "description": "The gross amount for which tax should be calculated.", - "schema": { - "type": "number", - "format": "double" - } + "employee": { + "$ref": "#/components/schemas/Item" }, - { - "name": "periodStart", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "employeeNi": { + "format": "double", + "type": "number" }, - { - "name": "periodEnd", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "employeePension": { + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "query", - "description": "The PayPeriod (Weekly, Monthly, etc)", - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "employerNi": { + "format": "double", + "type": "number" }, - { - "name": "period", - "in": "query", - "description": "The period that this payment is being made for", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "employerPension": { + "format": "double", + "type": "number" }, - { - "name": "week1", - "in": "query", - "description": "If set to true then tax will be calculated in a Week1/Month1 basis", - "schema": { - "type": "boolean", - "default": false - } + "isLeaver": { + "type": "boolean" }, - { - "name": "grossToDate", - "in": "query", - "description": "Gross pay to date", - "schema": { - "type": "number", - "format": "double", - "default": 0 - } + "isNewStarter": { + "type": "boolean" }, - { - "name": "taxToDate", - "in": "query", - "description": "Tax paid to date", - "schema": { - "type": "number", - "format": "double", - "default": 0 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "number", - "format": "double" - } - } - } - } - } - } - }, - "/engine/ni": { - "get": { - "tags": [ - "Engine" - ], - "summary": "Calculate NI due.", - "description": "Calculates National Insurance Contributions due given the values specified.\r\nYou would never need to use this API call in practice. It is provided just for information and testing purposes.\r\nAccess is limited so you'll probably receive a 401 response if you try to use it.", - "operationId": "CalculateNiEngine", - "parameters": [ - { - "name": "taxYear", - "in": "query", - "description": "If not provided then current tax year will be used.", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "lastName": { + "nullable": true, + "type": "string" }, - { - "name": "gross", - "in": "query", - "description": "The gross amount for which tax should be calculated.", - "schema": { - "type": "number", - "format": "double" - } + "netPay": { + "format": "double", + "type": "number" }, - { - "name": "niCategory", - "in": "query", - "description": "The letter from the NI table", - "schema": { - "type": "string" - } + "niNumber": { + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "query", - "description": "The PayPeriod (Weekly, Monthly, etc)", - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NationalInsuranceCalculation" - } - } - } - } - } - } - }, - "/engine/branding/{brandCode}": { - "get": { - "tags": [ - "Engine" - ], - "summary": "Tenant Branding", - "description": "Returns Tenant Branding. Not for public use, will return 401", - "operationId": "GetTenantBrandingEngine", - "parameters": [ - { - "name": "brandCode", - "in": "path", - "description": "The Id of the Tenant you want to retrieve.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Tenant" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/eps/{taxYear}": { - "get": { - "tags": [ - "Eps" - ], - "summary": "List EPS", - "description": "Returns all Employment Payment Summaries for the given tax year.\r\nIf the 'Linked EPS' is enabled by the employer, Employment Payment Summaries\r\nfor employer as well as for any linked employers with 'Linked EPS' enabled\r\nand with the same PAYE scheme are returned.", - "operationId": "ListEps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "otherDeductions": { + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "Eps" - ], - "summary": "Create EPS", - "description": "Creates a new Employer Payment Summary", - "operationId": "CreateEps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "payrollCode": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "statutoryPayments": { + "format": "double", + "type": "number" + }, + "studentOrPgLoan": { + "format": "double", + "type": "number" + }, + "tax": { + "format": "double", + "type": "number" + }, + "taxableGross": { + "format": "double", + "type": "number" + }, + "totalGross": { + "format": "double", + "type": "number" } - ], - "requestBody": { + }, + "type": "object" + }, + "GrossToNetReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/GrossToNetReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } - } - } + "type": "object" + }, + "HmrcDetails": { + "additionalProperties": false, + "properties": { + "accountsOfficeReference": { + "maxLength": 20, + "nullable": true, + "type": "string" + }, + "apprenticeshipLevy": { + "type": "boolean" + }, + "apprenticeshipLevyAllowance": { + "format": "double", + "type": "number" + }, + "carryForwardUnpaidLiabilities": { + "description": "If set to true then any unpaid amounts from previous periods will be brought forward\r\nto work out the liability for the current period.\r\nYou'd set this to false if you don't want to track payments.", + "type": "boolean" + }, + "coTax": { + "maxLength": 20, + "nullable": true, + "type": "string" + }, + "econ": { + "maxLength": 20, + "nullable": true, + "type": "string" + }, + "employmentAllowance": { + "type": "boolean" + }, + "employmentAllowanceMaxClaim": { + "description": "You might reduce this from the default if you've made/are making a claim in another system", + "format": "double", + "type": "number" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "includeEmploymentAllowanceOnMonthlyJournal": { + "description": "If the employer is not on a QuarterlyPaymentSchedule\r\nand is claiming EmploymentAllowance, then set this to true to include a line for\r\nEmployment Allowance on the journal for the monthly schedule.", + "type": "boolean" + }, + "officeNumber": { + "maxLength": 3, + "nullable": true, + "type": "string" + }, + "payeReference": { + "maxLength": 20, + "nullable": true, + "type": "string" + }, + "paymentDateDayOfMonth": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "paymentDateRule": { + "$ref": "#/components/schemas/PaymentDateRule" + }, + "quarterlyPaymentSchedule": { + "description": "Set to true if the employer pays HMRC on a quarterly schedule.\r\nA value of false implies a monthly schedule.\r\nWarning: Changing this value after starting PayRuns will\r\ndelete any existing payments or adjustments you may have entered.", + "type": "boolean" + }, + "smallEmployersRelief": { + "type": "boolean" + }, + "utr": { + "maxLength": 20, + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/rti/eps/{taxYear}/{id}": { - "put": { - "tags": [ - "Eps" - ], - "summary": "Update EPS", - "description": "Updates an existing Employment Payment Summary.", - "operationId": "UpdateEps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "HmrcLiability": { + "additionalProperties": false, + "properties": { + "adjustment": { + "description": "Any manual adjustment for Period", + "format": "double", + "type": "number" + }, + "allowLinkedEps": { + "description": "If true this will allow you to submit a combined Employer Payment Summary", + "type": "boolean" + }, + "apprenticeshipLevy": { + "description": "Amount due with respect to the Apprenticeship Levy", + "format": "double", + "type": "number" + }, + "apprenticeshipLevyAuto": { + "description": "If set to true, we'll automatically calculate your liability\r\nIf set to false then you can enter your own value.\r\nIf LiableForApprenticeshipLevy is false then the ApprenticeshipLevy will \r\nalways be overwritten with a zero value regardless of this property", + "type": "boolean" + }, + "apprenticeshipLevyEpsCreated": { + "description": "[readonly] If there is an Apprenticeship LEvy amount present and the Period is complete then this field Indicates \r\nwhether or not an EPS has been created up to the final tax month of this period to declare\r\nthe amount", + "type": "boolean" + }, + "cisDeductions": { + "description": "[readonly] Amount due to HMRC for CIS Deductions made in period", + "format": "double", + "type": "number" + }, + "cisDeductionsSuffered": { + "description": "CIS Deductions Suffered in Period", + "format": "double", + "type": "number" + }, + "dueInPreviousPeriods": { + "description": "[readonly] Amount due to HMRC in previous periods for this Tax Year", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "eligibleForEmploymentAllowance": { + "description": "[readonly] Indicates whether the Employer settings say the Employer is eligible for Employment Allowance", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } + "employeeNic": { + "description": "[readonly] Amount due to HMRC for Employee NIC Contributions withheld in period", + "format": "double", + "type": "number" + }, + "employerNic": { + "description": "[readonly] Amount due to HMRC for Employer NIC Contributions due on payments in period", + "format": "double", + "type": "number" + }, + "employmentAllowanceClaim": { + "description": "Amount to claim with respect to the Employment Allowance", + "format": "double", + "type": "number" + }, + "employmentAllowanceClaimAuto": { + "description": "If set to true, we'll automatically claim the maximum allowed.\r\nIf set to false then you can enter your own value.\r\nIf EligibleForEmploymentAllowance is false then the EmploymentAllowanceClaim will \r\nalways be overwritten with a zero value regardless of this property", + "type": "boolean" + }, + "employmentAllowanceClaimInPreviousPeriods": { + "description": "[readonly] The amount of Employment Allowance claimed in previous periods for this Tax Year", + "format": "double", + "type": "number" + }, + "fpsList": { + "items": { + "$ref": "#/components/schemas/Item" }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } + "nullable": true, + "type": "array" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "liabilityArisingInPeriod": { + "description": "[readonly] Total Liability (before any deductions) arising in this Period", + "format": "double", + "readOnly": true, + "type": "number" + }, + "liableForApprenticeshipLevy": { + "description": "[readonly] Indicates whether the Employer settings say the Employer is liable for the Apprenticeship Levy", + "type": "boolean" + }, + "netLiabilityForPeriod": { + "description": "[readonly] Net Liability (including any deductions/additions) arising in this Period", + "format": "double", + "readOnly": true, + "type": "number" + }, + "paidInPreviousPeriods": { + "description": "[readonly] Amount paid to HMRC in previous periods for this Tax Year", + "format": "double", + "type": "number" + }, + "payRuns": { + "items": { + "$ref": "#/components/schemas/PayRun" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } + "nullable": true, + "type": "array" + }, + "payments": { + "items": { + "$ref": "#/components/schemas/HmrcPayment" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } - } - } - } - } - }, - "get": { - "tags": [ - "Eps" - ], - "summary": "Get EPS", - "description": "Retrieves the Employer Payment Summary specified", - "operationId": "GetEps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "nullable": true, + "type": "array" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "periodComplete": { + "description": "[readonly] Indicates whether or not all PayRuns for this period have been completed", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Eps" - ], - "summary": "Delete Eps", - "description": "Deletes the Eps.", - "operationId": "DeleteEps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "periodEnding": { + "description": "[readonly]", + "format": "date", + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "postgradLoanDeductions": { + "description": "[readonly] Amount due to HMRC for Postgrad Loan Deductions made in period", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/employers/{employerId}/rti/eps/{taxYear}/{id}/xml/request": { - "get": { - "tags": [ - "Eps" - ], - "summary": "Get XML Request", - "description": "Returns the XML request that was or will be sent to HMRC for this RTI document.\r\nAlthough the value is XML, it is returned as a JSON string.", - "operationId": "GetXmlRequestEps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "realTimeClass1ANic": { + "description": "[readonly] Amount due to HMRC for Employer NIC Contributions due on payments in period", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "receivedFromHMRCToPayStatutoryPay": { + "description": "Any amount received from HMRC to pay Statutory Pay Period", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/eps/{taxYear}/{id}/submit": { - "post": { - "tags": [ - "Eps" - ], - "summary": "Submit EPS", - "description": "Submits an existing Employment Payment Summary to HMRC.", - "operationId": "SubmitEps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "receivedFromHMRCToRefundTax": { + "description": "Any amount received from HMRC to refund Tax in Period", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "recoverableAmountsEpsCreated": { + "description": "[readonly] If there are recoverable amount present (ie, SMP) and the Period is complete then this field Indicates \r\nwhether or not an EPS has been created up to the final tax month of this period to declare\r\nthe recoverable amounts", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "sap": { + "description": "[readonly] SAP recovered from payments in period", + "format": "double", + "type": "number" }, - { - "name": "force", - "in": "query", - "description": "If the EPS has already been accepted then you will need to set this to true to force it to be resubmitted", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/eps/{taxYear}/{id}/markasaccepted": { - "post": { - "tags": [ - "Eps" - ], - "summary": "Mark as Sent", - "description": "Marks an Employer Payment Summary as having been sent to HMRC and accepted by them.\r\nYou would only use this method if the EPS had been submitted via an external system.\r\nIt will automatically be updated as Sent and/or Accepted if it's submitted via this API.", - "operationId": "MarkAsAcceptedEps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "sapNic": { + "description": "[readonly] SAP Nic Compensation for period", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "shpp": { + "description": "[readonly] ShPP recovered from payments in period", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/eps/requiringattention": { - "get": { - "tags": [ - "Eps" - ], - "summary": "EPS Requiring Attention", - "description": "Returns all Employer Payment Summaries that have a Submission Status of NotSubmitted or ErrorResponse", - "operationId": "RequiringAttentionEps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/eps/{taxYear}/{taxMonth}/recoverableamounts": { - "get": { - "tags": [ - "Eps" - ], - "summary": "Recoverable Amounts", - "description": "Get all recoverable amounts (SMP, etc) for a given tax year, up to the given tax month, and if the 'Linked EPS'\r\nis enabled by the employer, recoverable amounts as well as the recoverable amounts for any employers with 'Linked EPS' enabled and with the same PAYE scheme\r\nis returned as a sum.", - "operationId": "RecoverableAmountsEps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "shppNic": { + "description": "[readonly] ShPP Nic Compensation for period", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "smp": { + "description": "[readonly] SMP recovered from payments in period", + "format": "double", + "type": "number" }, - { - "name": "taxMonth", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecoverableAmounts" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/eps/{taxYear}/{taxMonth}/apprenticeshipLevytodate": { - "get": { - "tags": [ - "Eps" - ], - "summary": "Apprenticeship Levy", - "description": "Get all Apprenticeship Levy (SMP, etc) for a given tax year, up to the given tax month, and if the 'Linked EPS'\r\nis enabled by the employer, apprenticeship levy as well as the apprenticeship levy for any employers with 'Linked EPS' enabled and with the same PAYE scheme\r\nis returned as a sum.", - "operationId": "ApprenticeshipLevyEps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "smpNic": { + "description": "[readonly] SMP NIC Compensation for period", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "sncp": { + "description": "[readonly] SNCP recovered from payments in period", + "format": "double", + "type": "number" }, - { - "name": "taxMonth", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EpsApprenticeshipLevy" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/exb/{taxYear}": { - "get": { - "tags": [ - "Exb" - ], - "summary": "List EXB", - "description": "Returns all ExpensesAndBenefits for the given tax year.", - "operationId": "ListExb", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "sncpNic": { + "description": "[readonly] SNCP Nic Compensation for period", + "format": "double", + "type": "number" + }, + "spbp": { + "description": "[readonly] SPBP recovered from payments in period", + "format": "double", + "type": "number" + }, + "spbpNic": { + "description": "[readonly] SPBP Nic Compensation for period", + "format": "double", + "type": "number" + }, + "spp": { + "description": "[readonly] SPP recovered from payments in period", + "format": "double", + "type": "number" + }, + "sppNic": { + "description": "[readonly] SPP Nic Compensation for period", + "format": "double", + "type": "number" + }, + "studentLoanDeductions": { + "description": "[readonly] Amount due to HMRC for Student Loan Deductions made in period", + "format": "double", + "type": "number" + }, + "tax": { + "description": "[readonly] Amount due to HMRC for PAYE in period", + "format": "double", + "type": "number" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "title": { + "description": "[readonly] A descriptive name for the Period", + "nullable": true, + "type": "string" + }, + "totalPaid": { + "description": "[readonly] The total value of all payments in this period", + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "Exb" - ], - "summary": "Create EXB", - "description": "Creates a new Expenses And Benefits submission", - "operationId": "CreateExb", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "HmrcPayment": { + "additionalProperties": false, + "properties": { + "amount": { + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Exb" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Exb" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Exb" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Exb" - } - } + "date": { + "format": "date", + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" } }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eps" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/exb/{taxYear}/{id}": { - "put": { - "tags": [ - "Exb" + "type": "object" + }, + "HolidayAccrual": { + "enum": [ + "RegularPayOnly", + "AllGrossPay", + "PaycodeSet", + "WorkingPatternHours" ], - "summary": "Update EXB", - "description": "Updates an existing Expenses And Benefits submission.", - "operationId": "UpdateExb", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "HolidayAccrualDefaultRateType": { + "enum": [ + "HourlyRate", + "AverageHolidayRate", + "FixedPeriodAmount" + ], + "type": "string" + }, + "HolidayReport": { + "additionalProperties": false, + "properties": { + "accrualsHrsReport": { + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "accrualsReport": { + "type": "boolean" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Exb" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Exb" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Exb" - } + "employer": { + "$ref": "#/components/schemas/Item" + }, + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/HolidayReportLine" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Exb" - } - } + "nullable": true, + "type": "array" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Exb" - } - } - } - } - } + "type": "object" }, - "get": { - "tags": [ - "Exb" - ], - "summary": "Get EXB", - "description": "Retrieves the Expenses And Benefits submission specified", - "operationId": "GetExb", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "HolidayReportLine": { + "additionalProperties": false, + "properties": { + "dayRate": { + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "department": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Exb" - } - } - } + "employee": { + "$ref": "#/components/schemas/Item" + }, + "leaveSettings": { + "$ref": "#/components/schemas/LeaveSettings" + }, + "payrollCode": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "Exb" - ], - "summary": "Delete EXB", - "description": "Deletes the EXB.", - "operationId": "DeleteExb", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "HolidayReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "model": { + "$ref": "#/components/schemas/HolidayReport" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } + }, + "type": "object" + }, + "HolidaySchemeDurationType": { + "enum": [ + "Hours", + "Days" ], - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/employers/{employerId}/rti/exb/{taxYear}/{id}/xml/request": { - "get": { - "tags": [ - "Exb" + "type": "string" + }, + "HolidayType": { + "enum": [ + "Days", + "Accrual_Money", + "Accrual_Days", + "Accrual_Hours" ], - "summary": "Get XML Request", - "description": "Returns the XML request that was or will be sent to HMRC for this RTI document.\r\nAlthough the value is XML, it is returned as a JSON string.", - "operationId": "GetXmlRequestExb", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "HourlyPayReport": { + "additionalProperties": false, + "properties": { + "employer": { + "$ref": "#/components/schemas/Item" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "endDate": { + "format": "date", + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "endPeriodName": { + "nullable": true, + "type": "string" + }, + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/HourlyPayReportLine" + }, + "nullable": true, + "type": "array" + }, + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "period": { + "format": "int32", + "type": "integer" + }, + "periodTo": { + "format": "int32", + "type": "integer" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } - } - } - }, - "/employers/{employerId}/rti/exb/{taxYear}/{id}/submit": { - "post": { - "tags": [ - "Exb" - ], - "summary": "Submit EXB", - "description": "Submits an existing Expenses And Benefits submission to HMRC.", - "operationId": "SubmitExb", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "HourlyPayReportLine": { + "additionalProperties": false, + "properties": { + "employee": { + "$ref": "#/components/schemas/Item" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "hours": { + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "payCode": { + "nullable": true, + "type": "string" }, - { - "name": "force", - "in": "query", - "description": "If the EXB has already been accepted then you will need to set this to true to force it to be resubmitted", - "schema": { - "type": "boolean", - "default": false - } + "payrollCode": { + "nullable": true, + "type": "string" + }, + "period": { + "format": "int32", + "type": "integer" + }, + "rate": { + "format": "double", + "type": "number" + }, + "total": { + "format": "double", + "type": "number" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Exb" - } - } - } + }, + "type": "object" + }, + "HourlyPayReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/HourlyPayReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/rti/exb/{taxYear}/{id}/markasaccepted": { - "post": { - "tags": [ - "Exb" + }, + "type": "object" + }, + "HoursNormallyWorked": { + "enum": [ + "LessThan16", + "MoreThan16", + "MoreThan24", + "MoreThan30", + "NotRegular" ], - "summary": "Mark as Sent", - "description": "Marks an Expenses And Benefits submission as having been sent to HMRC and accepted by them.\r\nYou would only use this method if the EXB had been submitted via an external system.\r\nIt will automatically be updated as Sent and/or Accepted if it's submitted via this API.", - "operationId": "MarkAsAcceptedExb", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "HtmlEmailSettings": { + "additionalProperties": false, + "properties": { + "bodyCssStyle": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "buttonCssStyle": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "fontCssStyle": { + "nullable": true, + "type": "string" + }, + "footerHtml": { + "nullable": true, + "type": "string" + }, + "headerHtml": { + "nullable": true, + "type": "string" } + }, + "type": "object" + }, + "HtmlInsertionPoint": { + "enum": [ + "CreateEmployer", + "EmployeeDetails" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Exb" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/exb/requiringattention": { - "get": { - "tags": [ - "Exb" + "type": "string" + }, + "IncrementRule": { + "enum": [ + "Manual", + "Annual", + "April", + "April6m" ], - "summary": "EXB Requiring Attention", - "description": "Returns all Expenses And Benefits submissions that have a Submission Status of NotSubmitted or ErrorResponse", - "operationId": "RequiringAttentionExb", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "Invitation": { + "additionalProperties": false, + "description": "Invitations are used to invite other users to access an existing Employer", + "properties": { + "emailAddress": { + "description": "The email address of the user that is being invited to access the Employer", + "format": "email", + "maxLength": 150, + "minLength": 1, + "type": "string" + }, + "emailId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "emailStatus": { + "$ref": "#/components/schemas/BackgroundTaskStatus" + }, + "employer": { + "$ref": "#/components/schemas/Item" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "invitedBy": { + "$ref": "#/components/schemas/Item" + }, + "message": { + "description": "An optional message to include in the email sent to the EmailAddress", + "nullable": true, + "type": "string" + }, + "role": { + "$ref": "#/components/schemas/UserRole" } + }, + "required": [ + "emailAddress" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "type": "object" + }, + "Item": { + "additionalProperties": false, + "properties": { + "id": { + "format": "uuid", + "type": "string" + }, + "metadata": { + "nullable": true + }, + "name": { + "nullable": true, + "type": "string" + }, + "url": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/rti/exb/{taxYear}/values": { - "get": { - "tags": [ - "Exb" - ], - "summary": "Annual Values", - "description": "Returns an empty Exb showing the number of employees and total benefits for the year provided", - "operationId": "AnnualValuesExb", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "ItemListReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "model": { + "description": "[readonly] If the type is application.json then this will contain a JSON representation of the relevant model", + "items": { + "$ref": "#/components/schemas/Item" + }, + "nullable": true, + "type": "array" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } + }, + "type": "object" + }, + "JobStatus": { + "enum": [ + "Queued", + "Executing", + "Completed", + "Failed", + "CompletedWithErrors" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Exb" - } - } - } - } - } - } - }, - "/employers/{employerId}/external-data": { - "get": { - "tags": [ - "ExternalData" + "type": "string" + }, + "JobType": { + "enum": [ + "Report", + "Import", + "PayRun" ], - "summary": "List Providers", - "description": "Returns a list of External Data Providers and indicates which the Employer has successfully authenticated with.", - "operationId": "ListExternalData", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "type": "string" + }, + "JournalCsvFormat": { + "enum": [ + "Default", + "SapS4Hana", + "MappedOutput" ], - "responses": { - "404": { - "description": "Not Found" + "type": "string" + }, + "JournalTemplate": { + "additionalProperties": false, + "properties": { + "content": { + "description": "Content of Journal Template", + "nullable": true, + "type": "string" }, - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExternalDataProvider" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/external-data/{id}/companies": { - "get": { - "tags": [ - "ExternalData" - ], - "summary": "List Companies", - "description": "Return a list of companies from the external data provider", - "operationId": "CompaniesExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "header": { + "description": "Header of Journal Template", + "nullable": true, + "type": "string" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExternalDataCompany" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/external-data/{id}/nominals": { - "get": { - "tags": [ - "ExternalData" - ], - "summary": "List Nominal Codes", - "description": "Return a list of Nominal Codes from the external data provider", - "operationId": "NominalCodesExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "useColumnHeaders": { + "description": "Use Column Headers indicates whether to use column headers while parsing the content in CSV format", + "type": "boolean" } - } - } - }, - "/employers/{employerId}/external-data/{id}/{taxYear}/{payPeriod}/{periodNumber}/journal": { - "post": { - "tags": [ - "ExternalData" + }, + "type": "object" + }, + "JournalTokenType": { + "enum": [ + "SystemToken", + "CustomToken", + "TextToken", + "ValueToken" ], - "summary": "Post Journal", - "description": "Post a Journal for a payrun to the ExternalDataProvider\r\nA 200 response does not mean the journal was necessarily successfully posted.\r\nThe PayRunJournal is returned (without the Lines) so that you can inspect the status to determine success", - "operationId": "PostJournalExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "type": "string" + }, + "Leave": { + "additionalProperties": false, + "description": "Used to represent Leave, including Holiday and Statutory leave (such as Maternity Leave)", + "properties": { + "assumedPensionablePays": { + "description": "if UseAssumedPensionablePay is True, then this is the value used to calculate the employer pension contributions", + "items": { + "$ref": "#/components/schemas/LeaveAssumedPensionablePay" + }, + "nullable": true, + "type": "array" + }, + "automaticAWECalculation": { + "description": "If set to True then we'll automatically calculate the AverageWeeklyEarnings. \r\nSet it to false if you want to manually provide a figure that overrides our calculations", + "type": "boolean" + }, + "averageWeeklyEarnings": { + "description": "The employees average weekly earnings. Only relevant for Statutory Pay\r\nIt's advised that you don't try to calculate this yourself.", + "format": "double", + "type": "number" + }, + "babyDate": { + "description": "Only required for Parental Leave with Statutory Pay\r\nIf Type is Maternity or Paternity then this is the date the baby is due.\r\nFor Adoption this is the Matching Date.\r\nFor Neonatal Care is the Baby Due / Matching / Placement Date", + "format": "date", + "nullable": true, + "type": "string" + }, + "calculationType": { + "$ref": "#/components/schemas/LeaveCalculationType" + }, + "customPayments": { + "description": "If this is Sick Leave with Custom Payment, then this stores the RoleId, PercentOfPay and PaySSPInAddition for each\r\nrole assigned to an employee that did not end before the start date of the absence.", + "items": { + "$ref": "#/components/schemas/LeaveCustomPayment" + }, + "nullable": true, + "type": "array" + }, + "customProRataRules": { + "description": "If this is a Leave that supports changing the pro rata at leave level,\r\nThis stores the RoleId and ProRataMethod for each\r\nrole assigned to an employee that did not end before the start date of the absence.", + "items": { + "$ref": "#/components/schemas/LeaveCustomProRataRule" + }, + "nullable": true, + "type": "array" + }, + "documentCount": { + "description": "[readonly] The number of attachments associated with this model", + "format": "int32", + "type": "integer" + }, + "documents": { + "description": "[readonly] The attachments associated with this model", + "items": { + "$ref": "#/components/schemas/Item" + }, + "nullable": true, + "type": "array" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "externalId": { + "description": "If the Leave comes from an ExternalDataProvider, then this is its Id in the ExternalDataProvider", + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "from": { + "description": "The first day of Leave.\r\nIf it's a half day PM then set the time portion to 12:00:00, otherwise leave it blank or set it to 00:00:00", + "format": "date-time", + "type": "string" + }, + "historicOmpRequiresProcessing": { + "description": "Only used during the creation and update of occupational maternity leaves.\r\nWhen creating or updating historical occupational leaves, this will determine whether to pay the historic payments or correction in the next PayRun.", + "type": "boolean" + }, + "historicOspRequiresProcessing": { + "description": "Only used during the creation of sickness Occupational Policy.\r\nWhen creating historical SOP, this will determine whether to pay that leave in the next PayRun.", + "type": "boolean" + }, + "historicSmpRequiresProcessing": { + "description": "Only used during the creation and update of statutory maternity leaves.\r\nWhen creating or updating historical statutory maternity leaves, this will determine whether to pay the historic payments or correction in the next PayRun.", + "type": "boolean" + }, + "historicSspRequiresProcessing": { + "description": "Only used during the creation of historical SSP.\r\nWhen creating historical SSP, this will determine whether to pay that leave in the next PayRun.", + "type": "boolean" + }, + "historicSxpRequiresProcessing": { + "description": "Used during to determine whether to back pay before current payrun", + "type": "boolean" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "isReversed": { + "description": "If the reversal of this Leave has already been processed,\r\nthis will be set to true", + "type": "boolean" + }, + "kitSplitDays": { + "description": "If the LeaveType supports KIT/SPLIT days then use this property to store the list of dates", + "items": { + "format": "date-time", + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "lastProcessedFrom": { + "description": "[readonly] Last Processed From Date\r\nIf this Leave has already been processed,\r\nthis will be the original leave from date", + "format": "date", + "nullable": true, + "type": "string" + }, + "linkedPiw": { + "$ref": "#/components/schemas/LinkedPiw" + }, + "notes": { + "description": "A free-form text field to record any comments", + "maxLength": 300, + "nullable": true, + "type": "string" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "occupationalMaternityPolicyUniqueId": { + "description": "Occupational Maternity Policy Id when leave type is Maternity and payment type is occupational policy", + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "description": "To identify the PayRun", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "offsetPay": { + "description": "If this Leave has Statutory Pay and this is set to True and the employe eis paid a fixed amoutn per period\r\nwith Leave Adjustments set to automatic, then we'll reduce their pay for the period by the statutory amount\r\nso the employee still gets paid the full amount.", + "type": "boolean" }, - { - "name": "periodNumber", - "in": "path", - "description": "To identify the PayRun", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "openingOmpPay": { + "description": "Opening occupational pay which has already been paid to the employee", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "description": "To identify the PayRun", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "openingPay": { + "description": "Opening pay which has already been paid to the employee in another system", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "force", - "in": "query", - "description": "Set to true if you want to force the journal to be posted even if it already has been", - "schema": { - "type": "boolean" - } + "overridePaymentDescription": { + "description": "If Pay is StatutoryPay and you want to override our description that goes with the payment then set this to true", + "type": "boolean" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRunJournal" - } - } - } - } - } - } - }, - "/employers/{employerId}/external-data/{id}/{taxYear}/{payPeriod}/{periodNumber}/payments": { - "post": { - "tags": [ - "ExternalData" - ], - "summary": "Post Payments", - "description": "Post Payments for a payrun to the ExternalDataProvider\r\nA 200 response does not mean the payments were necessarily successfully posted.\r\nThe BankPaymentInstruction is returned (without the payments) so that you can inspect the status to determine success", - "operationId": "PostPaymentsExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "overridenPaymentDescription": { + "description": "If OverridePaymentDescription is true and Pay is set to StatutoryPay then we'll use this as the description for the payment amount.", + "maxLength": 150, + "nullable": true, + "type": "string" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pay": { + "$ref": "#/components/schemas/LeavePayType" }, - { - "name": "payPeriod", - "in": "path", - "description": "To identify the PayRun", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "payFrequency": { + "$ref": "#/components/schemas/StatPayFrequency" }, - { - "name": "periodNumber", - "in": "path", - "description": "To identify the PayRun", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "payRunExistsWithOccMaternityPay": { + "description": "Indicates whether there is occupational maternity payment associated with a leave in the current pay run.", + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "description": "To identify the PayRun", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "payRunExistsWithStatPay": { + "type": "boolean" }, - { - "name": "incEmployees", - "in": "query", - "description": "Include payments for employees", - "schema": { - "type": "boolean" - } + "paymentTier": { + "$ref": "#/components/schemas/NeonatalCarePaymentTier" }, - { - "name": "incHmrc", - "in": "query", - "description": "Include payments for HMRC (if any)", - "schema": { - "type": "boolean" - } + "providerId": { + "$ref": "#/components/schemas/ExternalDataProviderId" }, - { - "name": "incPensions", - "in": "query", - "description": "Include payments for Pension Providers (if any)", - "schema": { - "type": "boolean" - } + "secondaryBabyDate": { + "description": "Only used for Parental Leave with Statutory Pay\r\nIf Type is Maternity, Paternity, SharedParental (Birth) then this is the the Baby Born Date.\r\nFor Adoption or SharedParental (Adoption) this is the Expected Placement Date.", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "incAeos", - "in": "query", - "description": "Include any payment due as a result of AttachmentOrders (if any)", - "schema": { - "type": "boolean" - } + "sspPayFromDayOne": { + "description": "If this is Sick Leave with Statutory Pay then setting this to true\r\nwill force SSP to be paid from day one rather than the usual rule \r\nof the first Working Day after 3 Qualifying Days", + "type": "boolean" }, - { - "name": "incDeductions", - "in": "query", - "description": "Include any payment due to Deductions that are set to be paid to a Payee (if any)", - "schema": { - "type": "boolean" - } + "strikeHoursToDeduct": { + "description": "The number of hours to be deducted at the employee's contractual rate\r\nThis property is valid for strike deducted hours", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "force", - "in": "query", - "description": "Set to true if you want to force the payments to be posted even if it already has been", - "schema": { - "type": "boolean" - } + "tertiaryBabyDate": { + "description": "Only used for Parental Leave with Statutory Pay\r\nIf Type is Adoption this is the Placement Date.\r\nIf Type is Neonatal Care is the Date Baby Entered Neonatal Care", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "to": { + "description": "The last day of Leave.\r\nIf it's a half day AM then set the time portion to 11:59:59, otherwise set it to 23:59:59", + "format": "date-time", + "type": "string" }, - { - "name": "paymentDate", - "in": "query", - "description": "Optional. If a value is provided then it'll be used in place of the payment date for the payment.", - "schema": { - "type": "string", - "format": "date-time" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BankPaymentInstruction" - } - } - } - } - } - } - }, - "/employers/{employerId}/external-data/{id}/employees": { - "get": { - "tags": [ - "ExternalData" - ], - "summary": "List Employees", - "description": "Return a list of ExternalEmployeeMapping for Employees in the external data provider.\r\nThe metadata of the Item contains a field called externalId. This can be used to retrieve the full employee record.", - "operationId": "EmployeesExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "totalDays": { + "description": "[readonly] The number of days covered by this leave, regardless of whether or not they're working days.\r\nThis is calculated based on the employees Working Pattern.", + "format": "double", + "type": "number" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "totalDaysOverride": { + "description": "If a value is provided here then this will be used in place of the calculated TotalDays value", + "format": "double", + "nullable": true, + "type": "number" + }, + "type": { + "$ref": "#/components/schemas/LeaveType" + }, + "useAssumedPensionablePay": { + "description": "If this Leave has Statutory Pay then if this is set to True\r\nwe will use the value set in AssumedPensionablePay to work out the employer pension contributions", + "type": "boolean" + }, + "useOpeningPay": { + "description": "Use the OpeningPay which has already been paid in another system", + "type": "boolean" + }, + "workingDays": { + "description": "[readonly] The number of working days covered by this leave.\r\nThis is calculated based on the employees Working Pattern.", + "format": "double", + "type": "number" + }, + "workingDaysOverride": { + "description": "If a value is provided here then this will be used in place of the calculated WorkingDays value", + "format": "double", + "nullable": true, + "type": "number" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "ExternalData" - ], - "summary": "Import Employees", - "description": "Import Employees from the external data provider.", - "operationId": "ImportEmployeesExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "LeaveAssumedPensionablePay": { + "additionalProperties": false, + "properties": { + "assumedPensionablePay": { + "description": "Assumed Pensionable Pay (APP) is an average figure, calculated as the average pay in the 3 months\r\n(or 12 weeks if weekly/fortnightly/fourweekly paid) before the absence", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "automaticAPPCalculation": { + "description": "If set to True then we'll automatically calculate the AssumedPensionablePay. \r\nSet it to false if you want to manually provide a figure that overrides our calculations", + "type": "boolean" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "isPrimary": { + "description": "Boolean flag indicates if the role is primary", + "type": "boolean" + }, + "roleId": { + "description": "Employee role unique Id", + "format": "uuid", + "type": "string" + }, + "roleReference": { + "description": "Employee role reference", + "nullable": true, + "type": "string" } + }, + "type": "object" + }, + "LeaveCalculationType": { + "enum": [ + "OneThreeSixtyFifthFTE", + "OneThreeSixtyFifthProRata", + "UsualProRata", + "OneFifthOrWorkingPattern", + "SpecifyHours" ], - "requestBody": { - "description": "The externalIds to import", - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } + "type": "string" + }, + "LeaveCustomPayment": { + "additionalProperties": false, + "properties": { + "paySSPInAddition": { + "description": "If this is Sick Leave with Custom Payment,\r\nIf true, then reduce the OSP by the amount of SSP paid (and apportioned according to role weighting)\r\nIf false, then do not reduce the OSP at all.", + "type": "boolean" + }, + "percentOfPay": { + "description": "If this is Sick Leave with Custom Payment,\r\nthe user will input the desired impact on the employee’s pay, per role.\r\nThis will be via an amount between 0-100 in 'Pay for Absence'.\r\nThe employees pay will be fully reduced for the absence, and the % paid will be added back using the OSP pay code.", + "format": "double", + "type": "number" + }, + "roleId": { + "format": "uuid", + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "type": "object" + }, + "LeaveCustomProRataRule": { + "additionalProperties": false, + "properties": { + "proRataMethod": { + "$ref": "#/components/schemas/LeaveProRataRule" }, - "409": { - "description": "Conflict" + "roleId": { + "format": "uuid", + "type": "string" } - } - } - }, - "/employers/{employerId}/external-data/{id}/employees/push": { - "put": { - "tags": [ - "ExternalData" - ], - "summary": "Push Employees", - "description": "Push employees to the ExternalDataProvider.", - "operationId": "PushEmployeesExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + }, + "type": "object" + }, + "LeaveNotionalPayDetails": { + "additionalProperties": false, + "properties": { + "leaveId": { + "format": "uuid", + "type": "string" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "notionalPay": { + "format": "double", + "type": "number" + }, + "notionalPayPeriodBreakdowns": { + "description": "Breakdown of notional pay details by percent of pay bands\r\nEvery leave has entries representing a continuous period of leave with the same percent of pay", + "items": { + "$ref": "#/components/schemas/NotionalPayPeriodBreakdown" + }, + "nullable": true, + "type": "array" + }, + "occupationalPay": { + "format": "double", + "type": "number" + }, + "occupationalPayWithLessThanHalfPay": { + "format": "double", + "type": "number" + }, + "ospDaysToBeExcludedForNotionalPay": { + "format": "double", + "type": "number" + }, + "payableOccupationalLeavesCount": { + "format": "int32", + "type": "integer" } + }, + "type": "object" + }, + "LeavePayType": { + "enum": [ + "DoNotPay", + "PayAsUsual", + "StatutoryPay", + "OccupationalPolicy", + "Custom" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/external-data/{id}/payslips": { - "post": { - "tags": [ - "ExternalData" + "type": "string" + }, + "LeaveProRataRule": { + "enum": [ + "WorkingPattern", + "TwoSixtyDaysNotWorked", + "TwoSixtyDaysWorked", + "ThreeSixFiveDaysNotWorked", + "ThreeSixFiveDaysWorked", + "CalendarDays", + "WorkingDays" ], - "summary": "Push Payslips", - "description": "Push payslips to the ExternalDataProvider.", - "operationId": "PushPayslipsExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "type": "string" + }, + "LeaveSettings": { + "additionalProperties": false, + "properties": { + "accrueHoursPerDay": { + "description": "If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued", + "format": "double", + "type": "number" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accruePayCodeSetUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "query", - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "accruePaymentInLieuAllGrossPay": { + "description": "Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element", + "type": "boolean" }, - { - "name": "periodNumber", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "accruePaymentInLieuPayAutomatically": { + "description": "Set to true if you want employees to be automatically paid any outstanding holiday pay", + "type": "boolean" }, - { - "name": "taxYear", - "in": "query", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "accruePaymentInLieuRate": { + "description": "The rate at which Payments in Lieu acrrue. Typically this should be 12.07%.", + "format": "double", + "type": "number" }, - { - "name": "force", - "in": "query", - "schema": { - "type": "boolean" - } + "accrueSetAmount": { + "description": "If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked.", + "type": "boolean" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "accruedHoursAdjustment": { + "description": "Any manual adjustment to the total hours accrued", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/external-data/{id}/p45": { - "post": { - "tags": [ - "ExternalData" - ], - "summary": "Push P45", - "description": "Push a P45 to the ExternalDataProvider.", - "operationId": "PushP45ExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "accruedHoursAmount": { + "description": "[readonly] The total accrued hours for this employee over the lifetime of their employment so far", + "format": "double", + "type": "number" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accruedHoursAmountLastPeriod": { + "description": "[readonly] The total accrued hours for this employee in the last pay period", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/external-data/{id}/p45s": { - "post": { - "tags": [ - "ExternalData" - ], - "summary": "Push P45s", - "description": "Push P45s to the ExternalDataProvider.", - "operationId": "PushP45sExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the External Provider to which you want to send P45s", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "accruedHoursBalance": { + "description": "[readonly] The balance of hours owed to this employee in lieu of holidays", + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to send P45s", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "accruedHoursPaid": { + "description": "[readonly] The Total amount of hours paid to this employee in lieu of holidays", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "query", - "description": "The Pay Period (i.e, Monthly, Weekly) for which you want to send P45s", - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "accruedPaymentAdjustment": { + "description": "Any manual adjustment to the total accrued", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "query", - "description": "The Period (i.e, Tax Month, Tax Week) for which you want to send P45s", - "schema": { - "type": "integer", - "format": "int32" - } + "accruedPaymentBalance": { + "description": "[readonly] The balance of what is owed to this employee in lieu of holidays", + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "taxYear", - "in": "query", - "description": "The Tax Year for which you want to send P45s", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "accruedPaymentLiability": { + "description": "[readonly] The total accrued payments for this employee over the lifetime of their employment so far", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "description": "Indicates whether it uses first, second, third (etc.) PaySchedule for the PayPeriod for which you want to send P45s", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success" + "accruedPaymentPaid": { + "description": "[readonly] The Total amount paid to this employee in lieu of holidays", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "adjustment": { + "description": "Adjustment to number of hours/days/weeks holiday this employee can take per year.\r\nWill reset to 0 when the Allowance resets.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "format": "double", + "nullable": true, + "type": "number" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/external-data/{id}/p60": { - "post": { - "tags": [ - "ExternalData" - ], - "summary": "Push P60", - "description": "Pushes a P60 to the ExternalDataProvider.", - "operationId": "PushP60ExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "aggregatedServiceDate": { + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "allowance": { + "description": "The number of days holiday an employee can take per year if HolidayType is Days.\r\nOtherwise this is readonly and gives you the number of days accrued since the last reset", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } + "allowanceRemaining": { + "description": "[readonly] The number of days remaining of the allowance until next reset", + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "taxYear", - "in": "query", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/external-data/{id}/p60s": { - "post": { - "tags": [ - "ExternalData" - ], - "summary": "Push P60s", - "description": "Pushes P60s to the ExternalDataProvider for all employees paid for a given tax year, provided they were paid during that tax year.", - "operationId": "PushP60sExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "allowanceResetDate": { + "description": "The date that the holiday allowance resets. Only the day/month part of the value is relevant.", + "format": "date", + "type": "string" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "allowanceUsed": { + "description": "[readonly] The number of days used from the allowance since last reset", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "query", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success" + "allowanceUsedPreviousPeriod": { + "description": "[readonly] The number of days used in the 12 months prior to the last reset", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/external-data/{id}/p11d": { - "post": { - "tags": [ - "ExternalData" - ], - "summary": "Push P11D", - "description": "Pushes a P11D for the given employee to the ExternalDataProvider.", - "operationId": "PushP11DExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "bereavementLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "holidayAccrualBasis": { + "$ref": "#/components/schemas/HolidayAccrual" }, - { - "name": "employeeId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } + "holidayAccrualDefaultRateType": { + "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" }, - { - "name": "taxYear", - "in": "query", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/external-data/{id}/p11ds": { - "post": { - "tags": [ - "ExternalData" - ], - "summary": "Push P11Ds", - "description": "Pushes all P11Ds for the given TaxYear to the ExternalDataProvider.", - "operationId": "PushP11DsExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "holidayAccrualResetDate": { + "description": "[readonly] This date is used to reset holiday accrual schemes (Accrual Money or Accrual Hours).", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "holidayLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" }, - { - "name": "taxYear", - "in": "query", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/external-data/{id}/pension-letter": { - "post": { - "tags": [ - "ExternalData" - ], - "summary": "Push Pension Letter", - "description": "Pushes a Pension Letter for the given employee to the ExternalDataProvider.", - "operationId": "PushPensionLetterExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "holidayType": { + "$ref": "#/components/schemas/HolidayType" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "maximumAccruePeriod": { + "description": "The maximum number of hours capable of being accrued in a single period", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "employeeId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } + "occupationalSicknessUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "assessmentId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/external-data/{id}/pension-letters": { - "post": { - "tags": [ - "ExternalData" - ], - "summary": "Push Pension Letters", - "description": "Pushes a Pension Letters for the given employees to the ExternalDataProvider.", - "operationId": "PushPensionLettersExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "paidHoursAmountLastPeriod": { + "description": "[readonly] The number of hours paid against the pay code", + "format": "double", + "type": "number" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/external-data/{id}/employees/{employeeId}": { - "get": { - "tags": [ - "ExternalData" - ], - "summary": "Get Employee", - "description": "Return an ExternalEmployeeMapping for the specified Employee from the external data provider", - "operationId": "EmployeeExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "parentalLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "showAhpOnPayslip": { + "description": "If true then the AHP balance will be shown on the employees payslip.", + "type": "boolean" + }, + "showAllowanceOnPayslip": { + "description": "If true then the remaining Allowance will be shown on the employees payslip.", + "type": "boolean" + }, + "sickLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "unauthorisedLeaveProRataRule": { + "$ref": "#/components/schemas/LeaveProRataRule" + }, + "useAggregatedServiceDate": { + "type": "boolean" + }, + "useDefaultAccrueHoursPerDay": { + "description": "If true then the value for AccrueHoursPerDay comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAccruePaymentInLieu": { + "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAccruePaymentInLieuPayAutomatically": { + "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" + }, + "useDefaultAccruePaymentInLieuRate": { + "description": "If true then the value for AccruePaymentInLieuRate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the employee in the external data provider", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExternalEmployeeMapping" - } - } - } - } - } - }, - "put": { - "tags": [ - "ExternalData" - ], - "summary": "Update Employee", - "description": "Update an ExternalEmployeeMapping to map/unmap/import/ignore an employee from an external data provider", - "operationId": "UpdateEmployeeExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "useDefaultAllowance": { + "description": "If true then the value for the Allowance comes from the Employer record.\r\nThis property only appears if the LeaveSettings if a child of an Employee (not of an Employer)", + "type": "boolean" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "useDefaultAllowanceResetDate": { + "description": "If true then the value for the AllowanceResetDate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the employee in the external data provider", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/ExternalEmployeeMapping" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExternalEmployeeMapping" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/ExternalEmployeeMapping" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/ExternalEmployeeMapping" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExternalEmployeeMapping" - } - } - } + "useDefaultHolidayAccrualBasis": { + "description": "If true then the value for HolidayAccrualBasis comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" }, - "409": { - "description": "Conflict" - } - } - } - }, - "/employers/{employerId}/external-data/{id}/employees/i/sync-all": { - "get": { - "tags": [ - "ExternalData" - ], - "summary": "Sync Employees", - "description": "Syncs data from the ExternalDataProvider to update all mapped employees", - "operationId": "SyncAllEmployeesExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "useDefaultHolidayAccrualDefaultRateType": { + "description": "If true then the value for HolidayAccrualDefaultRateType comes from the Employer record.", + "type": "boolean" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "useDefaultHolidayType": { + "description": "If true then the value for HolidayType comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" }, - "409": { - "description": "Conflict" + "useDefaultMaximumAccruePeriod": { + "description": "If true then the value for MaximumAccruePeriod comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", + "type": "boolean" } - } - } - }, - "/employers/{employerId}/external-data/{id}/employees/{employeeId}/sync": { - "get": { - "tags": [ - "ExternalData" + }, + "type": "object" + }, + "LeaveType": { + "enum": [ + "Unauthorised", + "Holiday", + "Sick", + "Maternity", + "Paternity", + "Adoption", + "SharedParental", + "Bereavement", + "SharedParentalAdoption", + "PaternityAdoption", + "StrikeAction", + "NeonatalCare" ], - "summary": "Sync Employee", - "description": "Syncs data from the ExternalDataProvider to update the specified mapped employee.\r\nAny changes made as a result of the sync are show in the metadata.logs property.", - "operationId": "SyncEmployeeExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "type": "string" + }, + "LeaverDetails": { + "additionalProperties": false, + "properties": { + "hasLeft": { + "type": "boolean" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isDeceased": { + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the employee in the external data provider", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Item" - } - } - } + "leaveDate": { + "format": "date", + "nullable": true, + "type": "string" }, - "409": { - "description": "Conflict" - } - } - } - }, - "/employers/{employerId}/external-data/{id}/employees/{employeeId}/logs": { - "get": { - "tags": [ - "ExternalData" - ], - "summary": "Get Employee Logs", - "description": "Return a list of changes made locally to this employee based on changes in the external data provider", - "operationId": "EmployeeLogsExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "p45Sent": { + "type": "boolean" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "payAccruedBalance": { + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the employee in the external data provider", - "required": true, - "schema": { - "type": "string" - } + "paymentAfterLeaving": { + "type": "boolean" + }, + "paymentMethodAfterLeaving": { + "$ref": "#/components/schemas/PaymentMethodAfterLeaving" } + }, + "type": "object" + }, + "LgpsCivicaCasualHours": { + "enum": [ + "ReportAsZero", + "ReportAsOne", + "ReportAsBlank" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LogEntry" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/external-data/{id}/{taxYear}/{payPeriod}/{periodNumber}/leave": { - "post": { - "tags": [ - "ExternalData" + "type": "string" + }, + "LgpsCivicaPayrollNumber": { + "enum": [ + "PayrollCode", + "RoleReference", + "PayrollCodeAndRoleReference", + "UUID", + "PensionMembershipNoOrRoleReference", + "PensionMembershipNoOrPayrollCodeAndRoleReference", + "PensionMembershipNoOrUUID" ], - "summary": "Sync Leave", - "description": "Sync Leave from the ExternalDataProvider for the specified PayRun.\r\nReturns a JSON object indicating how many Leaves have been created, updated or deleted, etc.", - "operationId": "SyncLeaveExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "type": "string" + }, + "LgpsFund": { + "enum": [ + "Avon", + "BarkingAndDagenham", + "Barnet", + "Bedfordshire", + "Berkshire", + "Bexley", + "Brent", + "Bromley", + "Buckinghamshire", + "Cambridgeshire", + "Camden", + "Cardiff", + "Cheshire", + "CityOfWestminster", + "Clwyd", + "Cornwall", + "Croydon", + "Cumbria", + "Derbyshire", + "Devon", + "Dorset", + "Durham", + "Dyfed", + "Ealing", + "EastRiding", + "EastSussex", + "Enfield", + "Essex", + "Gloucestershire", + "GreaterGwent", + "GreaterManchester", + "Greenwich", + "Gwynedd", + "Hackney", + "HammersmithAndFulham", + "Hampshire", + "Haringey", + "Harrow", + "Havering", + "Hertfordshire", + "Hillingdon", + "Hounslow", + "IsleOfWight", + "Islington", + "KensingtonAndChelsea", + "Kent", + "KingstonUponThames", + "Lambeth", + "Lancashire", + "Leicestershire", + "Lewisham", + "Lincolnshire", + "LondonPensionsFundAuthority", + "Merseyside", + "Merton", + "Newham", + "Norfolk", + "NorthYorkshire", + "Northamptonshire", + "Northumberland", + "Nottinghamshire", + "Oxfordshire", + "Powys", + "Redbridge", + "RhonddaCynonTaf", + "Shropshire", + "Somerset", + "SouthYorkshire", + "Southwark", + "Staffordshire", + "Suffolk", + "Surrey", + "Sutton", + "Swansea", + "Teesside", + "TowerHamlets", + "TyneAndWear", + "WalthamForest", + "Wandsworth", + "Warwickshire", + "WestMidlandsPassengerTransport", + "WestMidlands", + "WestSussex", + "WestYorkshire", + "Wiltshire", + "Worcestershire" + ], + "type": "string" + }, + "LgpsIConnectFileType": { + "enum": [ + "SingleFile", + "MultipleProviderFile" + ], + "type": "string" + }, + "LgpsIConnectPayrollReference": { + "enum": [ + "Empty", + "PayrollCode", + "RoleReference", + "PensionMemberNo", + "Uuid", + "PayrollCodeAndRoleReference", + "EmployerCode", + "CustomText", + "PensionMemberNoOrRoleReference", + "PensionMemberNoOrPayrollCodeAndRoleReference", + "PensionMemberNoOrPensionUuid" + ], + "type": "string" + }, + "LgpsIConnectSalaryType": { + "enum": [ + "PayOnJoining", + "AnnualPensionableSalary", + "DoNotReport" + ], + "type": "string" + }, + "LgpsPayCategory": { + "enum": [ + "LgpsFinalPayPre2014" + ], + "type": "string" + }, + "LinkedPiw": { + "additionalProperties": false, + "description": "Linked Period of Incapacity for Work.\r\nIf you record Sick Leave and select Statutory Pay then any other Sick Leave with Statutory Pay\r\nlasting 4 or more days in the previous 8 weeks will be linked to it", + "properties": { + "averageWeeklyEarnings": { + "description": "[readonly] Average weekly earnings from linked Leave", + "format": "double", + "type": "number" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "id": { + "description": "[readonly] The Id of the linked Leave", + "format": "uuid", + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "result": { + "$ref": "#/components/schemas/LinkedPiwResult" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "sspFirstDay": { + "description": "[readonly] The SspFirstDay from the linked Leave, if set", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "sspFirstPayDay": { + "description": "[readonly] The SspFirstPayDay from the linked Leave, if set", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success" + "totalDays": { + "description": "[readonly] The number of days covered by the linked Leave.", + "format": "double", + "type": "number" + }, + "workingDays": { + "description": "[readonly] The number of working days in the linked Leave.", + "format": "double", + "type": "number" } - } - } - }, - "/employers/{employerId}/external-data/{id}/contributions/{taxYear}/{payPeriod}/{periodNumber}": { - "get": { - "tags": [ - "ExternalData" + }, + "type": "object" + }, + "LinkedPiwResult": { + "enum": [ + "Success", + "NoLinkedLeave" ], - "summary": "Contributions CSV File", - "description": "Returns a CSV file containing contributions for the specified payrun in a format specific to the ExternalDataProvider", - "operationId": "PensionContributionsCsvExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "type": "string" + }, + "Loan": { + "additionalProperties": false, + "description": "Used to represent an Attachment of Earnings Order (AEO)", + "properties": { + "amountRepaid": { + "description": "[readonly] The amount repaid so far due to deductions in Payruns", + "format": "double", + "type": "number" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "balance": { + "description": "[readonly] The Balance of the Loan", + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "documentCount": { + "description": "[readonly] The number of attachments associated with this model", + "format": "int32", + "type": "integer" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "documents": { + "description": "[readonly] The attachments associated with this model", + "items": { + "$ref": "#/components/schemas/Item" + }, + "nullable": true, + "type": "array" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "employee": { + "$ref": "#/components/schemas/Item" }, - { - "name": "schemeId", - "in": "query", - "description": "The Id of the Pension Scheme you want a file for.", - "schema": { - "type": "string", - "format": "uuid" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/employers/{employerId}/external-data/{id}/time-and-attendance": { - "get": { - "tags": [ - "ExternalData" - ], - "summary": "Get Time And Attendance Data", - "description": "Return a list of PayOptionsImport representing Time and Attendance data from the specified ExternalDataProvider, for to specified date range", - "operationId": "TimeAndAttendanceExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "isPaused": { + "description": "If set to true then deductions will not be made", + "type": "boolean" }, - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isSettled": { + "description": "[readonly]", + "readOnly": true, + "type": "boolean" }, - { - "name": "from", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "issueDate": { + "description": "The date the Loan was made", + "format": "date", + "type": "string" }, - { - "name": "to", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayOptionsImport" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/external-data/{id}/authorize": { - "get": { - "tags": [ - "ExternalData" - ], - "summary": "Get Authorization Url", - "description": "For ExternalDataProviders with an AuthScheme of OAuth1 or OAuth2.\r\nReturns a Url to redirect a user to in order to start the authorization process with the given ExternalDataProvider.\r\nOur API handles the response from the OAuth provider and processes it to obtain a token.\r\nThe user is then sent to the URL specified.", - "operationId": "AuthorizeExternalData", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "loanAmount": { + "description": "The initial amount that the loan was for", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the ExternalDataProvider you want to authorize with.", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "payCode": { + "description": "The Code of the PayCode used for recording payments.\r\nThe PayCode must have a CalculationType of FixedAmount and not be a multiplier code", + "nullable": true, + "type": "string" }, - { - "name": "returnUrl", - "in": "query", - "description": "The URL to send the user to once the process is complete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "periodAmount": { + "description": "The amount to deduct per PayPeriod", + "format": "double", + "type": "number" + }, + "previouslyPaid": { + "description": "[readonly] Any amount by which to adjust the Balance, perhaps due to repayments made elsewhere", + "format": "double", + "type": "number" + }, + "reference": { + "description": "An optional reference for this Loan", + "maxLength": 100, + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "ExternalData" - ], - "summary": "Set Credentials", - "description": "For ExternalDataProviders with an AuthScheme of Basic.\r\nSets the username and password for the service.", - "operationId": "SetCredentialsExternalData", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "LoanBalancesReport": { + "additionalProperties": false, + "properties": { + "isDraft": { + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The Id of the ExternalDataProvider you want to authorize with.", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "lines": { + "items": { + "$ref": "#/components/schemas/LoanBalancesReportLine" + }, + "nullable": true, + "type": "array" }, - { - "name": "username", - "in": "query", - "description": "The username for the ExternalDataProvider.", - "schema": { - "type": "string" - } + "report": { + "$ref": "#/components/schemas/Report" }, - { - "name": "password", - "in": "query", - "description": "The password for the ExternalDataProvider.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "Any additional data that is needed (optional)", - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StringStringKeyValuePair" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StringStringKeyValuePair" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StringStringKeyValuePair" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StringStringKeyValuePair" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/external-data/{id}/config": { - "get": { - "tags": [ - "ExternalData" - ], - "summary": "Get Config Data", - "description": "Returns any additional configuration data for the connection to the ExternalDataProvider.", - "operationId": "GetConfigDataExternalData", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "taxYear": { + "$ref": "#/components/schemas/TaxYear" }, - { - "name": "id", - "in": "path", - "description": "The Id of the ExternalDataProvider you want configuration data for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { } - } - } + "title": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "ExternalData" - ], - "summary": "Set Config Data", - "description": "Sets the additional configuration data for the connection to the ExternalDataProvider.\r\nOnly the value set in the userData field is updated", - "operationId": "SetConfigDataExternalData", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "LoanBalancesReportLine": { + "additionalProperties": false, + "properties": { + "employeeName": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the ExternalDataProvider you want configuration data for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { } - }, - "application/json": { - "schema": { } - }, - "text/json": { - "schema": { } - }, - "application/*+json": { - "schema": { } - } + "issueDate": { + "format": "date", + "type": "string" + }, + "loanAmount": { + "format": "double", + "type": "number" + }, + "outstandingBalance": { + "format": "double", + "type": "number" + }, + "paidAmount": { + "format": "double", + "type": "number" + }, + "payCode": { + "nullable": true, + "type": "string" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "reference": { + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { } - } - } - } - } - } - }, - "/employers/{employerId}/external-data/{id}/disconnect": { - "get": { - "tags": [ - "ExternalData" - ], - "summary": "Disconnect", - "description": "Disconnect from the external provider and revoke any OAuth token that has been received.", - "operationId": "DisconnectExternalData", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "LoanBalancesReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the ExternalDataProvider you want to disconnect from.", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/external-data/{id}/respond": { - "get": { - "tags": [ - "ExternalData" - ], - "summary": "3rd Party Response", - "description": "This endpoint is used by third parties to respond to an oAuth authorization request. You do not need to use this", - "operationId": "RespondExternalData", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "model": { + "$ref": "#/components/schemas/LoanBalancesReport" }, - { - "name": "error", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success" + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/rti/fps/{taxYear}": { - "post": { - "tags": [ - "Fps" - ], - "summary": "Create FPS", - "description": "Creates a new Full Payment Submission. This is limited to corrections, to a previous year, for a single employee.", - "operationId": "CreateFps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "LoanCharge": { + "additionalProperties": false, + "description": "Part of the TaxYearConfig that our engine uses to calculate charges for a Loan.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "officialInterestRate": { + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "threshhold": { + "format": "double", + "type": "number" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Fps" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Fps" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Fps" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Fps" - } - } + }, + "type": "object" + }, + "LogEntry": { + "additionalProperties": false, + "properties": { + "date": { + "format": "date", + "type": "string" + }, + "message": { + "nullable": true, + "type": "string" } }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Fps" - } - } - } + "type": "object" + }, + "LondonAllowance": { + "additionalProperties": false, + "properties": { + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "paySpineId": { + "description": "foreign key with pay spine table", + "format": "int32", + "type": "integer" + }, + "type": { + "$ref": "#/components/schemas/LondonAllowanceType" + }, + "value": { + "description": "Value of London Allowance", + "format": "double", + "type": "number" + }, + "valueType": { + "$ref": "#/components/schemas/LondonAllowanceValueType" } - } + }, + "required": [ + "paySpineId" + ], + "type": "object" }, - "get": { - "tags": [ - "Fps" + "LondonAllowanceType": { + "enum": [ + "Inner", + "Outer", + "Fringe" ], - "summary": "List FPS", - "description": "Returns all Full Payment Submissions for the given tax year.", - "operationId": "ListFps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "LondonAllowanceValueType": { + "enum": [ + "Graded", + "Fixed" + ], + "type": "string" + }, + "MailSettings": { + "additionalProperties": false, + "description": "Determines the settings used when the Employer sends emails.\r\nIf CustomiseSmtpSettings is false then SmtpSettings will be null and our default internal settings will be used;", + "properties": { + "customiseHtmlEmailSettings": { + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "customiseSmtpSettings": { + "type": "boolean" + }, + "htmlEmailSettings": { + "$ref": "#/components/schemas/HtmlEmailSettings" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "senderEmail": { + "format": "email", + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "senderEmailVerified": { + "description": "[readonly] The SenderEmail must be verified before you can send email using that address", + "type": "boolean" + }, + "senderName": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "smtpSettings": { + "$ref": "#/components/schemas/SmtpSettings" + }, + "useSystemFromAddress": { + "description": "If set to true then the SenderEmail provided will only be used in the \r\nReplyTo fields. The system defaults will be used for the From address.", + "type": "boolean" } + }, + "required": [ + "customiseHtmlEmailSettings", + "customiseSmtpSettings", + "senderEmail", + "senderName" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/fps/{taxYear}/{id}": { - "put": { - "tags": [ - "Fps" + "type": "object" + }, + "MaritalStatus": { + "enum": [ + "Single", + "Married", + "Divorced", + "Widowed", + "CivilPartnership", + "Unknown" ], - "summary": "Update FPS", - "description": "Updates an existing Full Payment Submission.", - "operationId": "UpdateFps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "McrPayCategory": { + "enum": [ + "McrPensionablePay", + "McrOvertime", + "McrAdditionalPensionablePayments" + ], + "type": "string" + }, + "MileageAllowancePaymentsRate": { + "additionalProperties": false, + "description": "Part of the TaxYearConfig that our engine uses to calculate Mileage Allowance Payments.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "aboveThresholdRate": { + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "rate": { + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "threshold": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "vehicleType": { + "$ref": "#/components/schemas/MileageVehicleType" } + }, + "type": "object" + }, + "MileageVehicleType": { + "enum": [ + "Car", + "Motorcycle", + "Cycle" ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Fps" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Fps" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Fps" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Fps" - } - } + "type": "string" + }, + "MonthlyMinimum": { + "additionalProperties": false, + "properties": { + "amount": { + "format": "double", + "type": "number" + }, + "billPastEndDate": { + "description": "If set to true then this user should still be billed even after the End Date", + "type": "boolean" + }, + "enabled": { + "type": "boolean" + }, + "endDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "startDate": { + "format": "date", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Fps" - } - } - } - } - } + "type": "object" }, - "get": { - "tags": [ - "Fps" - ], - "summary": "Get FPS", - "description": "Retrieves the Full Payment Submission specified", - "operationId": "GetFps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "NationalInsuranceCalculation": { + "additionalProperties": false, + "description": "Included as part of the PayRunEntry model to provide details of how the National Insurance Contribution was calculated.\r\nUnless the PayRunEntry.ManualNi property is set to true then these value will all be read-only and are recalculated everytime a payrun is updated.\r\nThis calculation could be made up of one or more calculations made on different NI table letters.\r\nWhere more than NI table letter affects the calculation, the calculation for each NI table letter will be contain in the Breakdown.", + "properties": { + "asDirector": { + "description": "Calculated as a Director", + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "breakdown": { + "description": "[readonly] List of calculations that make up this calculation", + "items": { + "$ref": "#/components/schemas/NationalInsuranceCalculationBase" + }, + "nullable": true, + "type": "array" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "earningsAboveFUSTUptoIncludingUEL": { + "description": "Earnings above FUST up to UEL", + "format": "double", + "nullable": true, + "type": "number" + }, + "earningsAboveLELUptoIncludingPT": { + "description": "Earnings above LEL up to PT", + "format": "double", + "type": "number" + }, + "earningsAbovePTUptoIncludingST": { + "description": "Earnings above PT up to ST", + "format": "double", + "type": "number" + }, + "earningsAbovePTUptoIncludingUEL": { + "description": "Earnings above PT up to UEL", + "format": "double", + "type": "number" + }, + "earningsAboveSTUptoIncludingFUST": { + "description": "Earnings above ST up to FUST", + "format": "double", + "nullable": true, + "type": "number" + }, + "earningsAboveSTUptoIncludingUEL": { + "description": "Earnings above ST up to UEL", + "format": "double", + "type": "number" + }, + "earningsAboveUEL": { + "description": "Earnings above UEL", + "format": "double", + "type": "number" + }, + "earningsUptoIncludingLEL": { + "description": "Earnings up to and including LEL", + "format": "double", + "type": "number" + }, + "employeeNi": { + "description": "[readonly] Net Employee National Insurance", + "format": "double", + "readOnly": true, + "type": "number" + }, + "employeeNiGross": { + "description": "Employee National Insurance Gross Value", + "format": "double", + "type": "number" + }, + "employeeNiRebate": { + "description": "Employee National Insurance Rebate Value", + "format": "double", + "type": "number" + }, + "employerNi": { + "description": "[readonly] Net Employer National Insurance", + "format": "double", + "readOnly": true, + "type": "number" + }, + "employerNiGross": { + "description": "Employer National Insurance Gross Value", + "format": "double", + "type": "number" + }, + "employerNiRebate": { + "description": "Employer National Insurance Rebate Value", + "format": "double", + "type": "number" + }, + "netNi": { + "description": "[readonly] Net National Insurance (Employer + Employee)", + "format": "double", + "readOnly": true, + "type": "number" + }, + "niCategory": { + "description": "Calculated on NI table letter", + "type": "string" + }, + "niablePay": { + "description": "Niable pay value, required for payrun overrides", + "format": "double", + "type": "number" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Fps" - } - } - } + }, + "type": "object" + }, + "NationalInsuranceCalculationBase": { + "additionalProperties": false, + "description": "Included as part of the PayRunEntry model to provide details of how the National Insurance Contribution was calculated.\r\nUnless the PayRunEntry.ManualNi property is set to true then these value will all be read-only and are recalculated everytime a payrun is updated.\r\nThis calculation could be made up of one or more calculations made on different NI table letters.\r\nWhere more than NI table letter affects the calculation, the calculation for each NI table letter will be contain in the Breakdown.", + "properties": { + "asDirector": { + "description": "Calculated as a Director", + "type": "boolean" + }, + "earningsAboveFUSTUptoIncludingUEL": { + "description": "Earnings above FUST up to UEL", + "format": "double", + "nullable": true, + "type": "number" + }, + "earningsAboveLELUptoIncludingPT": { + "description": "Earnings above LEL up to PT", + "format": "double", + "type": "number" + }, + "earningsAbovePTUptoIncludingST": { + "description": "Earnings above PT up to ST", + "format": "double", + "type": "number" + }, + "earningsAbovePTUptoIncludingUEL": { + "description": "Earnings above PT up to UEL", + "format": "double", + "type": "number" + }, + "earningsAboveSTUptoIncludingFUST": { + "description": "Earnings above ST up to FUST", + "format": "double", + "nullable": true, + "type": "number" + }, + "earningsAboveSTUptoIncludingUEL": { + "description": "Earnings above ST up to UEL", + "format": "double", + "type": "number" + }, + "earningsAboveUEL": { + "description": "Earnings above UEL", + "format": "double", + "type": "number" + }, + "earningsUptoIncludingLEL": { + "description": "Earnings up to and including LEL", + "format": "double", + "type": "number" + }, + "employeeNi": { + "description": "[readonly] Net Employee National Insurance", + "format": "double", + "readOnly": true, + "type": "number" + }, + "employeeNiGross": { + "description": "Employee National Insurance Gross Value", + "format": "double", + "type": "number" + }, + "employeeNiRebate": { + "description": "Employee National Insurance Rebate Value", + "format": "double", + "type": "number" + }, + "employerNi": { + "description": "[readonly] Net Employer National Insurance", + "format": "double", + "readOnly": true, + "type": "number" + }, + "employerNiGross": { + "description": "Employer National Insurance Gross Value", + "format": "double", + "type": "number" + }, + "employerNiRebate": { + "description": "Employer National Insurance Rebate Value", + "format": "double", + "type": "number" + }, + "netNi": { + "description": "[readonly] Net National Insurance (Employer + Employee)", + "format": "double", + "readOnly": true, + "type": "number" + }, + "niCategory": { + "description": "Calculated on NI table letter", + "type": "string" + }, + "niablePay": { + "description": "Niable pay value, required for payrun overrides", + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "Fps" - ], - "summary": "Delete FPS", - "description": "Not implemented, FPSes cannot be deleted", - "operationId": "DeleteFps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "NationalInsuranceCalculationPeriodValues": { + "additionalProperties": false, + "description": "Part of the TaxYearConfig that our engine uses to calculate National Insurance Contributions.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "aust": { + "description": "[readonly] Apprentice Upper Secondary Threshold (apprentice under 25)", + "format": "double", + "type": "number" + }, + "fust": { + "description": "[readonly] Freeports Upper Accrual Threshold", + "format": "double", + "type": "number" + }, + "lel": { + "description": "[readonly] Lower Earnings Limit", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "pt": { + "description": "[readonly] Primary Threshold", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/employers/{employerId}/rti/fps/{taxYear}/{id}/xml/request": { - "get": { - "tags": [ - "Fps" - ], - "summary": "Get XML Request", - "description": "Returns the XML request that was or will be sent to HMRC for this RTI document.\r\nAlthough the value is XML, it is returned as a JSON string.", - "operationId": "GetXmlRequestFps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "st": { + "description": "[readonly] Secondary Threshold", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "uap": { + "description": "[readonly] Upper Accrual Point", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "uel": { + "description": "[readonly] Upper Earnings Limit", + "format": "double", + "type": "number" }, - { - "name": "compressed", - "in": "query", - "description": "Indicates whether the FPS XML should be in compressed format.", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "ust": { + "description": "[readonly] Upper Secondary Threshold (under 21)", + "format": "double", + "type": "number" + }, + "vust": { + "description": "[readonly] Veterian Upper Secondary Threshold", + "format": "double", + "type": "number" } - } - } - }, - "/employers/{employerId}/rti/fps/{taxYear}/mostrecentforemployee/{employeeId}": { - "get": { - "tags": [ - "Fps" - ], - "summary": "Get most recent FPS for Employee", - "description": "Returns the most recent Full Payment Submission that includes the specified employee", - "operationId": "MostRecentForEmployeeFps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "NationalInsuranceCode": { + "additionalProperties": false, + "description": "Part of the TaxYearConfig that our engine uses to calculate National Insurance Contributions.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "code": { + "description": "[readonly] NI Table Letter", + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "description": { + "description": "[readonly] Description of Employees that would use this NI Letter", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "eeB": { + "description": "[readonly] Earnings at or above LEL up to and including PT (Employee Contribution)", + "format": "double", + "type": "number" }, - { - "name": "correction", - "in": "query", - "description": "Only search for FPS's submitted as a correction to a previous year", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Item" - } - } - } + "eeC": { + "description": "[readonly] Earnings above the PT up to and including UEL (Employee Contribution)", + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/rti/fps/{taxYear}/{id}/submit": { - "post": { - "tags": [ - "Fps" - ], - "summary": "Submit FPS", - "description": "Submits an existing Full Payment Submission to HMRC.", - "operationId": "SubmitFps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "eeD": { + "description": "[readonly] Balance of earnings above UEL (Employee Contribution)", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "eeE": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "eeF": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "force", - "in": "query", - "description": "If the FPS has already been accepted then you will need to set this to true to force it to be resubmitted", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Fps" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/fps/{taxYear}/{id}/markasaccepted": { - "post": { - "tags": [ - "Fps" - ], - "summary": "Mark as Sent", - "description": "Marks an Full Payment Submission as having been sent to HMRC and accepted by them.\r\nYou only use this method if the FPS has been submitted via an external system.\r\nIt will automatically be updated as Sent and/or Accepted if it's submitted via this API.", - "operationId": "MarkAsAcceptedFps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "effectiveFrom": { + "description": "The date when these period values are effective", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "erB": { + "description": "[readonly] Earnings at or above LEL up to and including PT (Employer Contribution)", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Fps" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/fps/requiringattention": { - "get": { - "tags": [ - "Fps" - ], - "summary": "FPS Requiring Attention", - "description": "Returns all Full Payment Submissions that have a Submission Status of NotSubmitted or ErrorResponse", - "operationId": "RequiringAttentionFps", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/hmrcpayment/{taxYear}": { - "get": { - "tags": [ - "HmrcPayment" - ], - "summary": "List HmrcLiabilities", - "description": "Lists all periods for which a payment is due to HMRC in the given TaxYear", - "operationId": "IndexHmrcPayment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list HMRC Payments", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "erC": { + "description": "[readonly] Earnings above the PT up to and including UEL (Employer Contribution)", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "erD": { + "description": "[readonly] Balance of earnings above UEL (Employer Contribution)", + "format": "double", + "type": "number" + }, + "erE": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "erF": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "midYearChanges": { + "description": "Any optional changes to the period values that are effective from a specified date in the middle of a tax year", + "items": { + "$ref": "#/components/schemas/NationalInsuranceCode" + }, + "nullable": true, + "type": "array" } - } - } - }, - "/employers/{employerId}/hmrcpayment/{taxYear}/{periodEnding}": { - "get": { - "tags": [ - "HmrcPayment" - ], - "summary": "Get HmrcLiability", - "description": "Gets the HmrcLiability record for the period ending on the date specified.", - "operationId": "GetHmrcPayment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "NationalMinimumWage": { + "additionalProperties": false, + "description": "Part of the TaxYearConfig that our engine uses to calculate National Minimum Wage.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "apprentice": { + "nullable": true, + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "hourlyAmount": { + "format": "double", + "type": "number" }, - { - "name": "periodEnding", - "in": "path", - "description": "The final date of the month or quarter that the HmrcLiability is for.", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } + "maxAge": { + "format": "int32", + "type": "integer" } + }, + "type": "object" + }, + "NeonatalCarePaymentTier": { + "enum": [ + "None", + "FirstTier", + "SecondTier" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HmrcLiability" - } - } - } - } - } + "type": "string" }, - "put": { - "tags": [ - "HmrcPayment" + "NiLetterError": { + "enum": [ + "XNotUsedForPensionersPayroll", + "BUsedForMale", + "CUsedBeforeStatePensionAge", + "AUsedForUnder21", + "AUsedOverStatePensionAge", + "HUsedForOver24", + "MUsedForOver20", + "ZUsedForOver20", + "IUsedForMale", + "FUsedForNonFreeportWorker", + "IUsedForNonFreeportWorker", + "LUsedForNonFreeportWorker", + "SUsedForNonFreeportWorker", + "VUsedForNonVeteran", + "VUsedForVeteransFirstEmploymentDateOverOneYearOld", + "FUsedForFreeportWorkerOverThreeYearsOld", + "IUsedForFreeportWorkerOverThreeYearsOld", + "LUsedForFreeportWorkerOverThreeYearsOld", + "SUsedForFreeportWorkerOverThreeYearsOld", + "XNotUsedForUnder16", + "DUsedForNonInvestmentZoneWorker", + "EUsedForNonInvestmentZoneWorker", + "KUsedForNonInvestmentZoneWorker", + "NUsedForNonInvestmentZoneWorker", + "BEITAllowForDOBBefore5thApril1961" ], - "summary": "Update HmrcLiability", - "description": "Updates the editable fields of a HmrcLiability (ie, Adjustment, CISDeductionsSuffered, etc)", - "operationId": "UpdateHmrcPayment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "NiLetterValidationReport": { + "additionalProperties": false, + "properties": { + "basedOnPayrun": { + "description": "If false, then any payrun related information (Tax year, etc) should be ignored.", + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "employer": { + "$ref": "#/components/schemas/Item" + }, + "endDate": { + "format": "date", + "type": "string" + }, + "endPeriodName": { + "nullable": true, + "type": "string" + }, + "errorLines": { + "items": { + "$ref": "#/components/schemas/NiLetterValidationReportLine" + }, + "nullable": true, + "readOnly": true, + "type": "array" + }, + "isDraft": { + "type": "boolean" + }, + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "paymentDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "period": { + "format": "int32", + "type": "integer" + }, + "periodTo": { + "format": "int32", + "type": "integer" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" }, - { - "name": "periodEnding", - "in": "path", - "description": "The final date of the month or quarter that the HmrcLiability is for.", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/HmrcLiability" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/HmrcLiability" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/HmrcLiability" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/HmrcLiability" - } - } + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HmrcLiability" - } - } - } + "type": "object" + }, + "NiLetterValidationReportLine": { + "additionalProperties": false, + "properties": { + "dateOfBirth": { + "format": "date", + "type": "string" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/hmrcpayment/{taxYear}/{periodEnding}/bankpayment": { - "get": { - "tags": [ - "HmrcPayment" - ], - "summary": "HMRC Bank Payment", - "description": "Returns a payments file for the HMRC payment that needs to be made", - "operationId": "BankPaymentHmrcPayment", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employeeId": { + "format": "uuid", + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "errorDetails": { + "nullable": true, + "readOnly": true, + "type": "string" }, - { - "name": "periodEnding", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } + "gender": { + "$ref": "#/components/schemas/Gender" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BankPaymentInstructionReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/BankPaymentInstructionReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/holidayscheme": { - "get": { - "tags": [ - "HolidayScheme" - ], - "summary": "Get holiday scheme", - "operationId": "GetHolidayScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "400": { - "description": "Bad Request" + "name": { + "nullable": true, + "type": "string" }, - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.HolidaySchemeResponse" - } - } - } - } + "niLetter": { + "nullable": true, + "type": "string" + }, + "niLetterError": { + "$ref": "#/components/schemas/NiLetterError" + }, + "niNumber": { + "nullable": true, + "type": "string" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "suggestedLetter": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "HolidayScheme" - ], - "summary": "Create holiday scheme", - "operationId": "CreateHolidayScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { + "NiLetterValidationReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" - } - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/NiLetterValidationReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "NiYtdReport": { + "additionalProperties": false, + "properties": { + "isDraft": { + "type": "boolean" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.HolidaySchemeResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/holidayscheme/{id}": { - "get": { - "tags": [ - "HolidayScheme" - ], - "summary": "Get holiday scheme by Id", - "operationId": "GetByIdHolidayScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "lines": { + "items": { + "$ref": "#/components/schemas/EmployeeNiYtdValues" + }, + "nullable": true, + "type": "array" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "400": { - "description": "Bad Request" + "payrun": { + "$ref": "#/components/schemas/PayRun" }, - "404": { - "description": "Not Found" + "report": { + "$ref": "#/components/schemas/Report" }, - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.HolidaySchemeResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "HolidayScheme" - ], - "summary": "Update holiday scheme", - "operationId": "UpdateHolidayScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "taxYear": { + "$ref": "#/components/schemas/TaxYear" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "title": { + "nullable": true, + "type": "string" } - ], - "requestBody": { + }, + "type": "object" + }, + "NiYtdReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" - } - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/NiYtdReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "NiYtdValue": { + "additionalProperties": false, + "properties": { + "broughtForward": { + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" + "period": { + "format": "double", + "type": "number" }, - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.HolidaySchemeResponse" - } - } - } + "type": { + "nullable": true, + "type": "string" + }, + "value": { + "format": "double", + "readOnly": true, + "type": "number" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "HolidayScheme" - ], - "summary": "Delete holiday scheme", - "operationId": "DeleteHolidayScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "NicSummary": { + "additionalProperties": false, + "properties": { + "asDirector": { + "type": "boolean" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "childId": { + "description": "This is nothing but the UniqueId of the model.", + "format": "uuid", + "type": "string" + }, + "earningsAboveFustToUel": { + "format": "double", + "type": "number" + }, + "earningsAboveLelToPt": { + "format": "double", + "type": "number" + }, + "earningsAbovePtToSt": { + "format": "double", + "type": "number" + }, + "earningsAbovePtToUap": { + "format": "double", + "type": "number" + }, + "earningsAboveStToFust": { + "format": "double", + "type": "number" + }, + "earningsAboveStToUel": { + "format": "double", + "type": "number" + }, + "earningsAboveUapToUel": { + "format": "double", + "type": "number" + }, + "earningsAboveUel": { + "format": "double", + "type": "number" + }, + "earningsAtLel": { + "format": "double", + "type": "number" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "employeeNiRebate": { + "format": "double", + "type": "number" + }, + "employeeNics": { + "format": "double", + "type": "number" + }, + "employerNiRebate": { + "format": "double", + "type": "number" + }, + "employerNics": { + "format": "double", + "type": "number" + }, + "grossEarningsForNics": { + "format": "double", + "type": "number" + }, + "hasValues": { + "readOnly": true, + "type": "boolean" + }, + "id": { + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "isLatestVersion": { + "description": "[readonly] Indicates whether this is the latest version of the NicSummary.", + "type": "boolean" + }, + "isNiYtdOverride": { + "type": "boolean" + }, + "niTable": { + "type": "string" + }, + "payRunVersion": { + "description": "[readonly] The supplementary pay run version of this NicSummary.", + "format": "int32", + "type": "integer" + }, + "paymentDate": { + "format": "date", + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" } - ], - "responses": { - "400": { - "description": "Bad Request" + }, + "type": "object" + }, + "NominalCodeMapping": { + "additionalProperties": false, + "properties": { + "externalId": { + "description": "If you will be using the API to post journals to an ExternalDataProvider, then this is the Id of the nominal code in the external system.\r\nIf there's no mapping then this will have a value of \"0\"", + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "nominalCode": { + "maxLength": 500, + "nullable": true, + "type": "string" }, - "403": { - "description": "Forbidden" + "nominalMapping": { + "maxLength": 500, + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "nominalName": { + "maxLength": 100, + "nullable": true, + "type": "string" }, - "204": { - "description": "No Content" - } - } - } - }, - "/employers/{employerId}/import/payments/mappings": { - "get": { - "tags": [ - "Import" - ], - "summary": "List PaymentsCsvMappings", - "description": "Lists all PaymentsCsvMappings for an Employer.", - "operationId": "ListPaymentsCsvMappingsImport", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list mappings", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "payCode": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "Import" - ], - "summary": "Create PaymentsCsvMapping", - "description": "Creates a new PaymentsCsvMapping for the Employer.", - "operationId": "CreatePaymentsCsvMappingImport", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PaymentsCsvMapping" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentsCsvMapping" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PaymentsCsvMapping" - } + "Note": { + "additionalProperties": false, + "description": "Used to represent a Note for an Employee", + "properties": { + "createdBy": { + "description": "[readonly] The email address of the user that create the Note", + "nullable": true, + "type": "string" + }, + "documentCount": { + "description": "[readonly] The number of attachments associated with this model", + "format": "int32", + "type": "integer" + }, + "documents": { + "description": "[readonly] The attachments associated with this model", + "items": { + "$ref": "#/components/schemas/Item" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PaymentsCsvMapping" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "nullable": true, + "type": "array" }, - "201": { - "description": "Created" - } - } - } - }, - "/employers/{employerId}/import/payments/mappings/{id}": { - "get": { - "tags": [ - "Import" - ], - "summary": "Get PaymentsCsvMapping", - "description": "Gets the PaymentsCsvMapping specified.", - "operationId": "PaymentsCsvMappingImport", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the PaymentCsvMapping belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employee": { + "$ref": "#/components/schemas/Item" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentsCsvMapping" - } - } - } - } - } - }, - "put": { - "tags": [ - "Import" - ], - "summary": "Update PaymentsCsvMapping", - "description": "Updates the PaymentsCsvMapping specified.", - "operationId": "UpdatePaymentsCsvMappingImport", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the PaymentsCsvMapping belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PaymentsCsvMapping" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentsCsvMapping" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PaymentsCsvMapping" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PaymentsCsvMapping" - } - } + "noteDate": { + "description": "The date of the note", + "format": "date", + "type": "string" + }, + "noteText": { + "description": "Note text", + "nullable": true, + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/NoteType" + }, + "updatedBy": { + "description": "[readonly] The email address of the user that last updated the Note", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentsCsvMapping" - } - } - } - } - } + "type": "object" }, - "delete": { - "tags": [ - "Import" + "NoteType": { + "enum": [ + "General", + "NewStarterStatement", + "RtwProof", + "P45" ], - "summary": "Delete PaymentsCsvMapping", - "description": "Deletes the specified PaymentsCsvMapping.", - "operationId": "DeletePaymentCsvMappingImport", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "NotionalPayPeriodBreakdown": { + "additionalProperties": false, + "properties": { + "daysExcluded": { + "format": "int32", + "type": "integer" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "from": { + "format": "date", + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/import/payments/mappings/{id}/csv": { - "get": { - "tags": [ - "Import" - ], - "summary": "Get PaymentsCsvMapping CSV File", - "description": "Gets a CSV file in the format needed to import for the specified PaymentsCsvMapping\r\nThis is only available for PaymentsCsvMapping with a Type of ColumnBased", - "operationId": "PaymentsCsvMappingCsvFileImport", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the PaymentCsvMapping belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "leaveId": { + "format": "uuid", + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/import/pay": { - "post": { - "tags": [ - "Import" - ], - "summary": "Import Pay To Employee", - "description": "Takes a list PayOptionsImport and updates employees PayOptions to use the values provided.", - "operationId": "ImportEmployeePayImport", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "notionalPay": { + "format": "double", + "type": "number" }, - { - "name": "linesOnly", - "in": "query", - "description": "If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false.", - "schema": { - "type": "boolean", - "default": false - } + "occupationalPayWithLessThanHalfPay": { + "format": "double", + "type": "number" }, - { - "name": "append", - "in": "query", - "description": "If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false.", - "schema": { - "type": "boolean", - "default": false - } + "percentOfPay": { + "format": "double", + "type": "number" }, - { - "name": "updateExisting", - "in": "query", - "description": "If set to true then any submitted lines that match the paycode of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines.", - "schema": { - "type": "boolean", - "default": false - } + "percentOfPayBand": { + "$ref": "#/components/schemas/PercentOfPayBand" }, - { - "name": "validateOnly", - "in": "query", - "description": "If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported.", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayOptionsImport" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayOptionsImport" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayOptionsImport" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayOptionsImport" - } - } - } + "to": { + "format": "date", + "type": "string" } }, - "responses": { - "200": { - "description": "Success" + "type": "object" + }, + "Nvr": { + "additionalProperties": false, + "properties": { + "employeeCount": { + "format": "int32", + "type": "integer" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/import/employees/async": { - "post": { - "tags": [ - "Import" - ], - "summary": "Import Employees Asynchronously (Beta)", - "description": "This endpoint is currently being beta tested and subject to unannounced breaking changes.\r\nAllows the import of employees asynchronously from a CSV file.", - "operationId": "EmployeeImportCsvImport", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The employer id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employees": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "nullable": true, + "type": "array" }, - { - "name": "format", - "in": "query", - "description": "The CSV format.", - "schema": { - "$ref": "#/components/schemas/CsvFileFormat" - } + "employerReferences": { + "$ref": "#/components/schemas/EmpRefs" }, - { - "name": "allowUpdates", - "in": "query", - "description": "If set to true, and if the payroll code matches an existing employee, then that employee will be updated.", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } - } - }, - "responses": { - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JobResponse" - } - } - } + "govTalkSubmission": { + "$ref": "#/components/schemas/GovTalkSubmission" }, - "400": { - "description": "Bad Request" + "iRmark": { + "nullable": true, + "type": "string" }, - "409": { - "description": "Conflict" + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "nvrRequest": { + "$ref": "#/components/schemas/NvrRequest" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "xml": { + "description": "This property will soon be removed and should not be used.\r\nThere is now a dedicated API endpoint for retrieving the XML for a submission.", + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/import/import": { - "post": { - "tags": [ - "Import" - ], - "summary": "Import EmployeeRoles from csv file", - "description": "Import Employee Roles from a CSV file.", - "operationId": "ImportRolesImport", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "NvrEmployee": { + "additionalProperties": false, + "properties": { + "employeeDetails": { + "$ref": "#/components/schemas/NvrEmployeeDetails" }, - { - "name": "previewOnly", - "in": "query", - "description": "Set to true and nothing will be imported but you'll be shown a preview of the data.", - "schema": { - "type": "boolean", - "default": false - } + "employeeUniqueId": { + "format": "uuid", + "type": "string" }, - { - "name": "allowUpdates", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } + "employment": { + "$ref": "#/components/schemas/NvrEmployment" + }, + "item": { + "$ref": "#/components/schemas/Item" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/import/pensionmemberships": { - "post": { - "tags": [ - "Import" - ], - "summary": "Import PensionMemberships from csv file", - "description": "Import Pension Memberships from a CSV file.", - "operationId": "ImportPensionMembershipsImport", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "NvrEmployeeDetails": { + "additionalProperties": false, + "properties": { + "address": { + "$ref": "#/components/schemas/RtiEmployeeAddress" }, - { - "name": "previewOnly", - "in": "query", - "description": "Set to true and nothing will be imported but you'll be shown a preview of the data.", - "schema": { - "type": "boolean", - "default": false - } + "birthDate": { + "nullable": true, + "type": "string" }, - { - "name": "allowUpdates", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } + "gender": { + "nullable": true, + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/RtiEmployeeName" + }, + "nino": { + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/import/leave": { - "post": { - "tags": [ - "Import" - ], - "summary": "Import Leave Asynchronously", - "operationId": "ImportLeaveImport", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The employer id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "NvrEmployment": { + "additionalProperties": false, + "properties": { + "payId": { + "nullable": true, + "type": "string" } - ], - "requestBody": { - "description": "The import leave items.", - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.LeaveImportRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.LeaveImportRequest" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.LeaveImportRequest" - } - } + }, + "type": "object" + }, + "NvrRequest": { + "additionalProperties": false, + "properties": { + "employee": { + "items": { + "$ref": "#/components/schemas/NvrEmployee" }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.LeaveImportRequest" - } - } - } + "nullable": true, + "type": "array" + }, + "relatedTaxYear": { + "nullable": true, + "type": "string" } }, - "responses": { - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JobResponse" - } - } - } + "type": "object" + }, + "OccupationalPolicy": { + "additionalProperties": false, + "properties": { + "daysOrWeeksBeforeRecalculatingEntitlement": { + "description": "How many days or weeks an employee needs to return to work before new entitlements are used in calculations", + "format": "int32", + "type": "integer" }, - "400": { - "description": "Bad Request" + "entitlement": { + "$ref": "#/components/schemas/OccupationalPolicyEntitlement" }, - "404": { - "description": "Not Found" + "entitlementRecalculationBasis": { + "$ref": "#/components/schemas/OccupationalPolicyEntitlementRecalculationBasis" }, - "409": { - "description": "Conflict" + "ignorePreviousYearsSickness": { + "description": "Defines whether any sickness that relates to a previous year's sickness entitlement should be included in the entitlement calculation,\r\nor whether only sickness that is relevant to the current year's entitlement is taken into consideration", + "type": "boolean" + }, + "payCalculatedOn": { + "$ref": "#/components/schemas/OccupationalPolicyPayCalculatedOn" + }, + "payCodeSetUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "policyName": { + "description": "The unique policy name", + "maxLength": 50, + "minLength": 1, + "type": "string" + }, + "policyStartMonth": { + "$ref": "#/components/schemas/CalendarMonth" + }, + "serviceBands": { + "description": "Service Bands Json", + "items": { + "$ref": "#/components/schemas/ServiceBand" + }, + "nullable": true, + "type": "array" + }, + "sicknessYear": { + "$ref": "#/components/schemas/OccupationalPolicySicknessYear" + }, + "type": { + "$ref": "#/components/schemas/OccupationalPolicyType" + }, + "useAggregatedServiceDate": { + "type": "boolean" } - } - } - }, - "/employers/{employerId}/invitation": { - "get": { - "tags": [ - "Invitation" + }, + "required": [ + "entitlement", + "policyName", + "sicknessYear", + "type" ], - "summary": "List Invitations", - "description": "Lists all Invitations for an Employer.\r\nOnly unaccepted Invitations are listed as they are deleted once they've been accepted.", - "operationId": "IndexInvitation", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list Pay Codes", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "type": "object" + }, + "OccupationalPolicyEntitlement": { + "enum": [ + "Days", + "Weeks" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } + "type": "string" }, - "post": { - "tags": [ - "Invitation" + "OccupationalPolicyEntitlementRecalculationBasis": { + "enum": [ + "ServiceBanding", + "SickYear" ], - "summary": "Create Invitation", - "description": "Creates a new Invitation for the Employer.", - "operationId": "CreateInvitation", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "autoAccept", - "in": "query", - "description": "This is useful for when you want to invite a user to an employer and automatically accept the invitation.", - "schema": { - "type": "boolean" - } - } + "type": "string" + }, + "OccupationalPolicyPayCalculatedOn": { + "enum": [ + "NotApplicable", + "PercentageOfAnnualSalary", + "PercentageOfAverageWeeklyEarnings", + "PercentageOfPayCodeSet", + "Custom" ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Invitation" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invitation" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Invitation" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Invitation" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "type": "string" + }, + "OccupationalPolicySicknessYear": { + "enum": [ + "NotApplicable", + "Rolling", + "Fixed" + ], + "type": "string" + }, + "OccupationalPolicyType": { + "enum": [ + "Sickness", + "Maternity" + ], + "type": "string" + }, + "OccupationalSickLeaveHistory": { + "additionalProperties": false, + "properties": { + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invitation" - } - } - } + "isReversed": { + "description": "[readonly] Is set to true if this has been reversed in a Leave", + "type": "boolean" }, - "404": { - "description": "Employer Not Found" - } - } - } - }, - "/employers/{employerId}/invitation/{id}": { - "get": { - "tags": [ - "Invitation" - ], - "summary": "Get Invitation", - "description": "Gets the Invitation specified.", - "operationId": "GetInvitation", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Invitation belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "leaveDate": { + "format": "date", + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "occupationalPolicy": { + "nullable": true, + "type": "string" + }, + "payPercent": { + "format": "double", + "type": "number" + }, + "payRunId": { + "format": "int32", + "type": "integer" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "roleReference": { + "nullable": true, + "type": "string" + }, + "serviceBandFrom": { + "format": "int32", + "type": "integer" + }, + "serviceBandTo": { + "format": "int32", + "type": "integer" } + }, + "required": [ + "leaveDate", + "payPercent", + "serviceBandFrom", + "serviceBandTo" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invitation" - } - } - } - } - } + "type": "object" }, - "delete": { - "tags": [ - "Invitation" - ], - "summary": "Delete Invitation", - "description": "Deletes the specified Invitation.", - "operationId": "DeleteInvitation", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "OpeningBalances": { + "additionalProperties": false, + "properties": { + "benefitsTaxedViaPayroll": { + "format": "double", + "type": "number" + }, + "currentEmployerGross": { + "format": "double", + "type": "number" + }, + "currentEmployerNet": { + "format": "double", + "type": "number" + }, + "currentEmployerTax": { + "format": "double", + "type": "number" + }, + "empeePenContribnsNotPaid": { + "format": "double", + "type": "number" + }, + "empeePenContribnsPaid": { + "format": "double", + "type": "number" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "foreignTaxCredit": { + "format": "double", + "type": "number" + }, + "foreignTaxCreditReclaimed": { + "format": "double", + "type": "number" + }, + "mapsMiles": { + "format": "int32", + "type": "integer" + }, + "nicSummaries": { + "items": { + "$ref": "#/components/schemas/NicSummary" + }, + "nullable": true, + "type": "array" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "notNewStarter": { + "type": "boolean" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/invitations/{id}": { - "post": { - "tags": [ - "Invitation" - ], - "summary": "Accept Invitation", - "description": "Accepts the Invitation.\r\nThe user making this API call must have the email address that the invite was created for and the email address must be verified.", - "operationId": "AcceptInvitation", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "postgradLoanDeductions": { + "format": "double", + "type": "number" }, - { - "name": "acceptInvitation", - "in": "query", - "description": "Set to true to accept the invitation or false to decline it.", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "previousEmployerGross": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "previousEmployerTax": { + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/jobs/{jobId}": { - "get": { - "tags": [ - "Job" - ], - "summary": "Get Job", - "description": "Returns a job.", - "operationId": "GetJobJob", - "parameters": [ - { - "name": "jobId", - "in": "path", - "description": "The job identifier.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JobResponse" - } - } - } + "realTimeClass1ANi": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "sap": { + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/jobs": { - "get": { - "tags": [ - "Job" - ], - "summary": "List Jobs", - "description": "Returns a list of Jobs for all Employers that belong to the User with pagination.", - "operationId": "GetJobsListJob", - "parameters": [ - { - "name": "employerId", - "in": "query", - "description": "The employer identifier.", - "schema": { - "type": "string", - "format": "uuid" - } + "shpp": { + "format": "double", + "type": "number" }, - { - "name": "jobType", - "in": "query", - "description": "Type of the job.", - "schema": { - "$ref": "#/components/schemas/JobType" - } + "smp": { + "format": "double", + "type": "number" }, - { - "name": "pageNum", - "in": "query", - "description": "The page number.", - "schema": { - "type": "integer", - "format": "int32" - } + "sncp": { + "format": "double", + "type": "number" }, - { - "name": "pageSize", - "in": "query", - "description": "Size of the page.", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.JobResponse" - } - } - } - } + "spbp": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "spp": { + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/jobs/{jobId}/document": { - "get": { - "tags": [ - "Job" - ], - "summary": "Get Job file", - "description": "Returns the file generated for a successfully completed Job of type Report as a string representing a filestream.", - "operationId": "GetReportJobResultJob", - "parameters": [ - { - "name": "jobId", - "in": "path", - "description": "The job identifier.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string", - "format": "binary" - } - } - } + "studentLoanDeductions": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "taxYear": { + "$ref": "#/components/schemas/TaxYear" }, - "404": { - "description": "Not Found" + "terminationPayments": { + "format": "double", + "type": "number" } - } - } - }, - "/jobs/completed": { - "delete": { - "tags": [ - "Job" - ], - "summary": "Delete Completed Jobs", - "description": "Deletes the users completed Jobs.", - "operationId": "DeleteCompletedJobsJob", - "responses": { - "204": { - "description": "No Content" + }, + "type": "object" + }, + "OpeningBalancesTotals": { + "additionalProperties": false, + "properties": { + "benefitsTaxedViaPayroll": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "currentEmployerGross": { + "format": "double", + "type": "number" }, - "403": { - "description": "Forbidden" + "currentEmployerNet": { + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/jobs/{jobId}/errors": { - "get": { - "tags": [ - "Job" - ], - "summary": "Get Job Errors", - "description": "Returns a list of errors for a job.", - "operationId": "GetJobErrorsByJobIdJob", - "parameters": [ - { - "name": "jobId", - "in": "path", - "description": "The job identifier.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "currentEmployerTax": { + "format": "double", + "type": "number" }, - { - "name": "pageNum", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 0 - } + "empeePenContribnsNotPaid": { + "format": "double", + "type": "number" }, - { - "name": "pageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.JobErrorResponse" - } - } - } - } + "empeePenContribnsPaid": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "employee": { + "$ref": "#/components/schemas/Item" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/journaltemplate": { - "get": { - "tags": [ - "JournalTemplate" - ], - "summary": "Get Journal Template", - "description": "Get Journal Template for an Employer.", - "operationId": "GetJournalTemplate", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to get Journal Template", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "400": { - "description": "Bad Request" + "employeesWithOpeningBalancesCount": { + "format": "int32", + "type": "integer" }, - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateResponse" - } - } - } - } - } - }, - "post": { - "tags": [ - "JournalTemplate" - ], - "summary": "Create Journal Template", - "description": "Create Journal Template for an Employer.", - "operationId": "CreateJournalTemplate", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to create Journal Template", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateRequest" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "foreignTaxCredit": { + "format": "double", + "type": "number" }, - "201": { - "description": "Created", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/JournalTemplate" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/JournalTemplate" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/JournalTemplate" - } - } - } - } - } - } - }, - "/employers/{employerId}/journaltemplate/{id}": { - "put": { - "tags": [ - "JournalTemplate" - ], - "summary": "Update Journal Template", - "description": "Updates Specified Journal Template for the Employer.", - "operationId": "UpdateJournalTemplate", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update Journal Template", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "foreignTaxCreditReclaimed": { + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateRequest" - } + "mapsMiles": { + "format": "int32", + "type": "integer" + }, + "nicSummaries": { + "items": { + "$ref": "#/components/schemas/NicSummary" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTemplateResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/journaltokens": { - "get": { - "tags": [ - "JournalToken" - ], - "summary": "List Journal Tokens", - "description": "List Journal Tokens for an Employer.", - "operationId": "IndexJournalToken", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want list of Journal Tokens", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "400": { - "description": "Bad Request" + "nullable": true, + "type": "array" + }, + "postgradLoanDeductions": { + "format": "double", + "type": "number" + }, + "previousEmployerGross": { + "format": "double", + "type": "number" + }, + "previousEmployerTax": { + "format": "double", + "type": "number" + }, + "realTimeClass1ANi": { + "format": "double", + "type": "number" + }, + "sap": { + "format": "double", + "type": "number" + }, + "shpp": { + "format": "double", + "type": "number" }, - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.JournalTokenResponseItem" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.JournalTokenResponseItem" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.JournalTokenResponseItem" - } - } - } - } + "smp": { + "format": "double", + "type": "number" + }, + "sncp": { + "format": "double", + "type": "number" + }, + "spbp": { + "format": "double", + "type": "number" + }, + "spp": { + "format": "double", + "type": "number" + }, + "studentLoanDeductions": { + "format": "double", + "type": "number" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "terminationPayments": { + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "JournalToken" - ], - "summary": "Create Journal Token", - "description": "Create Journal Token for an Employer.", - "operationId": "CreateJournalToken", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to create Journal Token", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "OverseasEmployerDetails": { + "additionalProperties": false, + "properties": { + "eeaCitizen": { + "type": "boolean" + }, + "epm6Scheme": { + "type": "boolean" + }, + "overseasEmployer": { + "type": "boolean" + }, + "overseasSecondmentStatus": { + "$ref": "#/components/schemas/OverseasSecondmentStatus" } + }, + "type": "object" + }, + "OverseasSecondmentStatus": { + "enum": [ + "None", + "MoreThan183Days", + "LessThan183Days", + "BothInAndOutOfUK" ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenRequest" - } + "type": "string" + }, + "P11": { + "additionalProperties": false, + "description": "A P11 Report summarises payments and deductions made to an employee.\r\nOur Reports API can return this to you in many formats including as a PDF file\r\nIf you request is as a JSOn object then it is represented using this model.", + "properties": { + "dateOfBirth": { + "description": "[readonly]", + "format": "date", + "type": "string" + }, + "employerName": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "employerOfficeNo": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "employerPayeRef": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "firstname": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "isDraft": { + "type": "boolean" + }, + "joinDate": { + "description": "[readonly]", + "format": "date", + "type": "string" + }, + "leaveDate": { + "description": "[readonly]", + "format": "date", + "nullable": true, + "type": "string" + }, + "lines": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/P11Line" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenRequest" - } - } + "nullable": true, + "type": "array" + }, + "niNumber": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "payrollCode": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "surname": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "taxCode": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "P11DAssetAvailable": { + "additionalProperties": false, + "properties": { + "annValProRata": { + "nullable": true, + "type": "string" }, - "201": { - "description": "Created", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenResponse" - } - } - } + "cashEquivOrRelevantAmt": { + "nullable": true, + "type": "string" + }, + "costOrAmtForgone": { + "nullable": true, + "type": "string" + }, + "desc": { + "nullable": true, + "type": "string" + }, + "grossOrAmtForgone": { + "nullable": true, + "type": "string" + }, + "madeGood": { + "nullable": true, + "type": "string" + }, + "other": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/journaltokens/{id}": { - "get": { - "tags": [ - "JournalToken" - ], - "summary": "Get Journal Token", - "description": "Get Specified Journal Token for an Employer.", - "operationId": "GetJournalToken", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to get Journal Token", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "P11DAssetAvailableCollection": { + "additionalProperties": false, + "properties": { + "asset": { + "items": { + "$ref": "#/components/schemas/P11DAssetAvailable" + }, + "nullable": true, + "type": "array" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Journal Tokens for which you want to get Journal Token", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "typeLetter": { + "nullable": true, + "type": "string" } - ], - "responses": { - "400": { - "description": "Bad Request" + }, + "type": "object" + }, + "P11DAssetTransferredCollection": { + "additionalProperties": false, + "properties": { + "asset": { + "items": { + "$ref": "#/components/schemas/P11DDescOther" + }, + "nullable": true, + "type": "array" }, - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenResponse" - } - } - } + "typeLetter": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "JournalToken" - ], - "summary": "Update Journal Token", - "description": "Updates Specified Journal Token for the Employer.", - "operationId": "UpdateJournalToken", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "P11DCar": { + "additionalProperties": false, + "properties": { + "accs": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "availFrom": { + "nullable": true, + "type": "string" + }, + "availTo": { + "nullable": true, + "type": "string" + }, + "cO2": { + "nullable": true, + "type": "string" + }, + "capCont": { + "nullable": true, + "type": "string" + }, + "cashEquivOrRelevantAmt": { + "nullable": true, + "type": "string" + }, + "cc": { + "nullable": true, + "type": "string" + }, + "fuel": { + "nullable": true, + "type": "string" + }, + "fuelCashEquivOrRelevantAmt": { + "nullable": true, + "type": "string" + }, + "fuelWithdrawn": { + "$ref": "#/components/schemas/P11dCarFreeFuelWithdrawn" + }, + "list": { + "nullable": true, + "type": "string" + }, + "make": { + "nullable": true, + "type": "string" + }, + "noAppCO2Fig": { + "nullable": true, + "type": "string" + }, + "privUsePmt": { + "nullable": true, + "type": "string" + }, + "registered": { + "nullable": true, + "type": "string" + }, + "zeroEmissionMileage": { + "nullable": true, + "type": "string" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenRequest" - } + }, + "type": "object" + }, + "P11DCarCollection": { + "additionalProperties": false, + "properties": { + "car": { + "items": { + "$ref": "#/components/schemas/P11DCar" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenRequest" - } - } + "nullable": true, + "type": "array" + }, + "totalCarsOrRelevantAmt": { + "nullable": true, + "type": "string" + }, + "totalFuelOrRelevantAmt": { + "nullable": true, + "type": "string" + }, + "typeLetter": { + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenResponse" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JournalTokenResponse" - } - } - } + "type": "object" + }, + "P11DDescOther": { + "additionalProperties": false, + "properties": { + "annValProRata": { + "nullable": true, + "type": "string" + }, + "cashEquivOrRelevantAmt": { + "nullable": true, + "type": "string" + }, + "costOrAmtForgone": { + "nullable": true, + "type": "string" + }, + "desc": { + "nullable": true, + "type": "string" + }, + "grossOrAmtForgone": { + "nullable": true, + "type": "string" + }, + "madeGood": { + "nullable": true, + "type": "string" + }, + "other": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "JournalToken" - ], - "summary": "Delete Journal Token", - "description": "Deletes the specified Journal Token.", - "operationId": "DeleteJournalToken", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "P11DLoan": { + "additionalProperties": false, + "properties": { + "cashEquivOrRelevantAmt": { + "nullable": true, + "type": "string" + }, + "date": { + "nullable": true, + "type": "string" + }, + "discharge": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "finalOS": { + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/journaltokens/{departmentId}/departmentjournaloverrides": { - "get": { - "tags": [ - "JournalToken" - ], - "summary": "List Department Journal Overrides", - "description": "List Journal Overrides for an Department.", - "operationId": "GetDepartmentJournalOverridesListJournalToken", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want list of Journal Overrides", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "initOS": { + "nullable": true, + "type": "string" }, - { - "name": "departmentId", - "in": "path", - "description": "The Id of the Department for which you want list of Journal Overrides", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "400": { - "description": "Bad Request" + "intPaid": { + "nullable": true, + "type": "string" }, - "404": { - "description": "Employer or Department Not Found" + "joint": { + "nullable": true, + "type": "string" }, - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponseItem" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponseItem" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponseItem" - } - } - } - } + "maxOS": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "JournalToken" - ], - "summary": "Create Department Journal Overrides", - "description": "Create Journal Overrides for an Department.", - "operationId": "CreateDepartmentJournalOverridesJournalToken", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to create Journal Overrides", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "P11DLoanCollection": { + "additionalProperties": false, + "properties": { + "loan": { + "items": { + "$ref": "#/components/schemas/P11DLoan" + }, + "nullable": true, + "type": "array" }, - { - "name": "departmentId", - "in": "path", - "description": "The Id of the Department for which you want to create Journal Overrides", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "typeLetter": { + "nullable": true, + "type": "string" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesRequest" - } - } + }, + "type": "object" + }, + "P11DOther": { + "additionalProperties": false, + "properties": { + "class1A": { + "items": { + "$ref": "#/components/schemas/P11DDescOther" }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesRequest" - } - } + "nullable": true, + "type": "array" + }, + "nonClass1A": { + "items": { + "$ref": "#/components/schemas/P11DDescOther" }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesRequest" - } - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "nullable": true, + "type": "array" }, - "404": { - "description": "Employer or Department Not Found" + "taxPaid": { + "nullable": true, + "type": "string" }, - "201": { - "description": "Created", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponse" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponse" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponse" - } - } - } - } + "typeLetter": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "JournalToken" - ], - "summary": "Update Department Journal Overrides", - "description": "Updates Journal Overrides for the Department.", - "operationId": "UpdateDepartmentJournalOverridesJournalToken", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update Journal Overrides", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "departmentId", - "in": "path", - "description": "The Id of the Department for which you want to update Journal Overrides", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesUpdateRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesUpdateRequest" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesUpdateRequest" - } - } + "P11DPaymentCollection": { + "additionalProperties": false, + "properties": { + "payment": { + "items": { + "$ref": "#/components/schemas/P11DDescOther" }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesUpdateRequest" - } - } - } + "nullable": true, + "type": "array" + }, + "tax": { + "nullable": true, + "type": "string" + }, + "typeLetter": { + "nullable": true, + "type": "string" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "P11DSingleItem": { + "additionalProperties": false, + "properties": { + "annValProRata": { + "nullable": true, + "type": "string" }, - "404": { - "description": "Employer or Department Not Found" + "cashEquivOrRelevantAmt": { + "nullable": true, + "type": "string" }, - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponse" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponse" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponse" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/journaltokens/{costCentreId}/costcentrejournaloverrides": { - "get": { - "tags": [ - "JournalToken" - ], - "summary": "List CostCentre Journal Overrides", - "description": "List Journal Overrides for an CostCentre.", - "operationId": "GetCostCentreJournalOverridesListJournalToken", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want list of Journal Overrides", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "costOrAmtForgone": { + "nullable": true, + "type": "string" }, - { - "name": "costCentreId", - "in": "path", - "description": "The Id of the CostCentre for which you want list of Journal Overrides", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "400": { - "description": "Bad Request" + "desc": { + "nullable": true, + "type": "string" }, - "404": { - "description": "Employer or CostCentre Not Found" + "excess": { + "nullable": true, + "type": "string" }, - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponseItem" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponseItem" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponseItem" - } - } - } - } + "grossOrAmtForgone": { + "nullable": true, + "type": "string" + }, + "madeGood": { + "nullable": true, + "type": "string" + }, + "other": { + "nullable": true, + "type": "string" + }, + "taxablePmt": { + "nullable": true, + "type": "string" + }, + "taxablePmtOrRelevantAmt": { + "nullable": true, + "type": "string" + }, + "tradingOrgInd": { + "nullable": true, + "type": "string" + }, + "typeLetter": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "JournalToken" - ], - "summary": "Create CostCentre Journal Overrides", - "description": "Create Journal Overrides for an CostCentre.", - "operationId": "CreateCostCentreJournalOverridesJournalToken", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to create Journal Overrides", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "P11Detailed": { + "additionalProperties": false, + "description": "A more comprehensive P11 Report.\r\nOur Reports API can return this to you in several formats including as a PDF file\r\nIf you request a JSON object then it is represented using this model.", + "properties": { + "dateOfBirth": { + "description": "[readonly]", + "format": "date", + "type": "string" }, - { - "name": "costCentreId", - "in": "path", - "description": "The Id of the CostCentre for which you want to create Journal Overrides", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesRequest" - } - } + "employerName": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "employerOfficeNo": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "employerPayeRef": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "firstname": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "isDirector": { + "description": "[readonly]", + "type": "boolean" + }, + "isDraft": { + "type": "boolean" + }, + "joinDate": { + "description": "[readonly]", + "format": "date", + "type": "string" + }, + "leaveDate": { + "description": "[readonly]", + "format": "date", + "nullable": true, + "type": "string" + }, + "middlename": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "niAndStatPaymentsLines": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/P11NiAndStatPaymentsLine" }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesRequest" - } - } + "nullable": true, + "type": "array" + }, + "niNumber": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "niSummary": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/P11DetailedNiValues" }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesRequest" - } - } + "nullable": true, + "type": "array" + }, + "payeLines": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/P11PayeLine" }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesRequest" - } - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "nullable": true, + "type": "array" }, - "404": { - "description": "Employer or CostCentre Not Found" + "payeSummary": { + "$ref": "#/components/schemas/P11PayeSummary" }, - "201": { - "description": "Created", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponse" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponse" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponse" - } - } - } - } + "payeTotalsLine": { + "$ref": "#/components/schemas/P11PayeTotalsLine" + }, + "payrollCode": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "surname": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "taxCode": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "totalsLine": { + "$ref": "#/components/schemas/P11NiAndStatPaymentsTotalsLine" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "JournalToken" - ], - "summary": "Update CostCentre Journal Overrides", - "description": "Updates Journal Overrides for the CostCentre.", - "operationId": "UpdateCostCentreJournalOverridesJournalToken", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update Journal Overrides", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "P11DetailedNiValues": { + "additionalProperties": false, + "description": "Forms the NI Summary table in the P11 Detailed report.", + "properties": { + "earningsAboveLelToPt": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "costCentreId", - "in": "path", - "description": "The Id of the CostCentre for which you want to update Journal Overrides", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "earningsAbovePtToUap": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "earningsAbovePtToUel": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "earningsAboveUapToUel": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "earningsAtLel": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "employeeAndEmployerNics": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "employeeNics": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "employerNics": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "table": { + "description": "[readonly]", + "nullable": true, + "type": "string" } - ], - "requestBody": { + }, + "type": "object" + }, + "P11DetailedReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesUpdateRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesUpdateRequest" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesUpdateRequest" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesUpdateRequest" - } - } - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/P11Detailed" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "P11Line": { + "additionalProperties": false, + "description": "Lines for the P11 Report", + "properties": { + "date": { + "description": "[readonly]", + "format": "date", + "type": "string" }, - "404": { - "description": "Employer or CostCentre Not Found" + "grossTaxablePay": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponse" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponse" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponse" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/leave": { - "post": { - "tags": [ - "Leave" - ], - "summary": "Create Leave", - "description": "Creates Leave for the Employee", - "operationId": "CreateLeave", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "grossTaxablePayYTD": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } + "niValues": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/P11NiValues" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } - } + "nullable": true, + "type": "array" + }, + "period": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "postgradLoanYTD": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "sapYTD": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "shppYTD": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "smpYTD": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "sncpYTD": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "spbpYTD": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "sppYTD": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "studentLoanYTD": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "tax": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "taxYTD": { + "description": "[readonly]", + "format": "double", + "type": "number" } }, - "responses": { - "409": { - "description": "Conflict" + "type": "object" + }, + "P11NiAndStatPaymentsLine": { + "additionalProperties": false, + "description": "Lines for the NI Contributions and Statutory Payments table in the P11 Detailed Report", + "properties": { + "class1a": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - "201": { - "description": "Created" + "date": { + "description": "[readonly]", + "format": "date", + "type": "string" }, - "400": { - "description": "Bad Request" + "monthNumber": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "niValues": { + "$ref": "#/components/schemas/P11DetailedNiValues" + }, + "period": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "sap": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "shpp": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "smp": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "sncp": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "spbp": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "spp": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "ssp": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "taxCode": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "weekNumber": { + "description": "[readonly]", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "get": { - "tags": [ - "Leave" - ], - "summary": "List Leave", - "description": "Lists all Leave for the Employee", - "operationId": "IndexLeave", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "P11NiAndStatPaymentsTotalsLine": { + "additionalProperties": false, + "description": "Summary line for the NI Contributions and Statutory Payments table in the P11 Detailed report", + "properties": { + "class1A": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/leave/{id}": { - "get": { - "tags": [ - "Leave" - ], - "summary": "Get Leave", - "description": "Gets the Leave specified by the Id for the Employee specified by the EmployeeId", - "operationId": "GetLeave", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "ees": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "eesAndErs": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Leave you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } - } - } + "lelToPt": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "ptToUel": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "sap": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "shpp": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "smp": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "sncp": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "spbp": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" + "spp": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "ssp": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "toLel": { + "description": "[readonly]", + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Leave" - ], - "summary": "Update Leave", - "operationId": "UpdateLeave", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "P11NiValues": { + "additionalProperties": false, + "description": "Forms a part of the P11 report.", + "properties": { + "period": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "table": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Leave you want to update.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } - } + "ytd": { + "description": "[readonly]", + "format": "double", + "type": "number" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } - } - } + "type": "object" + }, + "P11PayeLine": { + "additionalProperties": false, + "description": "Lines for the Paye Income Tax table in the P11 Detailed report", + "properties": { + "date": { + "description": "[readonly]", + "format": "date", + "type": "string" }, - "400": { - "description": "Bad Request" + "grossTaxablePay": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - "409": { - "description": "Conflict" + "grossTaxablePayYTD": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" - } - } - }, - "delete": { - "tags": [ - "Leave" - ], - "summary": "Delete Leave", - "description": "Deletes the Leave specified by the Id for the Employee specified by the EmployeeId", - "operationId": "DeleteLeave", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "monthNumber": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "period": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Leave you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "409": { - "description": "Conflict" + "postgradLoan": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "studentLoan": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - "204": { - "description": "No Content" + "tax": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "taxCode": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "taxYTD": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "weekNumber": { + "description": "[readonly]", + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/leave/findlinkedpiw": { - "get": { - "tags": [ - "Leave" - ], - "summary": "Find Linked Piw", - "description": "Finds the linked piw the supplied leave would linked to, or null if none found", - "operationId": "FindLinkedPiwLeave", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "P11PayeSummary": { + "additionalProperties": false, + "description": "Forms the PAYE summary in the P11 Detailed report", + "properties": { + "previousEmploymentPay": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "previousEmploymentTax": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "leaveType", - "in": "query", - "description": "The type of leave to you want to find a linked Piw for.", - "schema": { - "$ref": "#/components/schemas/LeaveType" - } + "thisEmploymentPay": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "leavePayType", - "in": "query", - "description": "The type of leave pay to you want to find a linked Piw for.", - "schema": { - "$ref": "#/components/schemas/LeavePayType" - } + "thisEmploymentTax": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "from", - "in": "query", - "description": "The leave from date you want to find a linked Piw for.", - "schema": { - "type": "string", - "format": "date-time" - } + "totalPayForYear": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "to", - "in": "query", - "description": "The leave to date you want to find a linked Piw for.", - "schema": { - "type": "string", - "format": "date-time" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LinkedPiw" - } - } - } + "totalTaxForYear": { + "description": "[readonly]", + "format": "double", + "type": "number" } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/leave/{id}/documents": { - "post": { - "tags": [ - "Leave" - ], - "summary": "Add Document", - "description": "Adds document to the leave", - "operationId": "AddDocumentLeave", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "P11PayeTotalsLine": { + "additionalProperties": false, + "description": "Summary line for the Paye Income Tax table in the P11 Detailed report", + "properties": { + "pay": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "postgradLoan": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the leave you want to attach documents to", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } + "studentLoan": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "taxDue": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "taxDueToDate": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "totalPayToDate": { + "description": "[readonly]", + "format": "double", + "type": "number" } }, - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/leave/{id}/documents/{documentId}": { - "delete": { - "tags": [ - "Leave" - ], - "summary": "Delete Leave Document", - "description": "Deletes the document specified by the documentId for the Leave specified by the Id", - "operationId": "DeleteDocumentLeave", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "P11ReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "model": { + "$ref": "#/components/schemas/P11" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" }, - { - "name": "documentId", - "in": "path", - "description": "The Id of the Document you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - ], - "responses": { - "204": { - "description": "No Content" + }, + "type": "object" + }, + "P11dCarFreeFuelWithdrawn": { + "additionalProperties": false, + "properties": { + "reinstated": { + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "value": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "get": { - "tags": [ - "Leave" - ], - "summary": "Get Leave Document", - "description": "Gets the document specified by the documentId for the Leave specified by the Id", - "operationId": "GetDocumentLeave", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "P11dExpenses": { + "additionalProperties": false, + "properties": { + "ent": { + "$ref": "#/components/schemas/P11DSingleItem" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "homeTel": { + "$ref": "#/components/schemas/P11DSingleItem" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "nonQualRel": { + "$ref": "#/components/schemas/P11DSingleItem" }, - { - "name": "documentId", - "in": "path", - "description": "The Id of the Document you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string", - "format": "binary" - } - } - } + "other": { + "$ref": "#/components/schemas/P11DSingleItem" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/leave/statutorymaternityschedule": { - "get": { - "tags": [ - "Leave" - ], - "summary": "List Statutory Maternity Leave History", - "description": "Lists all Statutory Maternity leave history specified for an Employee.", - "operationId": "GetMaternityLeaveScheduleLeave", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "travAndSub": { + "$ref": "#/components/schemas/P11DSingleItem" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "typeLetter": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "P11dVans": { + "additionalProperties": false, + "properties": { + "annValProRata": { + "nullable": true, + "type": "string" }, - { - "name": "babyDueDate", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "cashEquivOrRelevantAmt": { + "nullable": true, + "type": "string" }, - { - "name": "leaveFrom", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "costOrAmtForgone": { + "nullable": true, + "type": "string" }, - { - "name": "leaveTo", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "desc": { + "nullable": true, + "type": "string" }, - { - "name": "leaveType", - "in": "query", - "schema": { - "$ref": "#/components/schemas/LeaveType" - } + "excess": { + "nullable": true, + "type": "string" }, - { - "name": "leavePayType", - "in": "query", - "schema": { - "$ref": "#/components/schemas/LeavePayType" - } + "fuelCashEquivOrRelevantAmt": { + "nullable": true, + "type": "string" }, - { - "name": "payFrequency", - "in": "query", - "schema": { - "$ref": "#/components/schemas/StatPayFrequency" - } + "grossOrAmtForgone": { + "nullable": true, + "type": "string" }, - { - "name": "averageWeeklyEarnings", - "in": "query", - "schema": { - "type": "number", - "format": "double", - "default": 0 - } + "madeGood": { + "nullable": true, + "type": "string" }, - { - "name": "isReversed", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "other": { + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/leave/occupationalmaternityschedule/{id}": { - "get": { - "tags": [ - "Leave" - ], - "summary": "List occupational Maternity Leave History", - "description": "Lists all occupational Maternity leave history specified for an Employee.", - "operationId": "GetOccupationalMaternityScheduleLeave", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "taxablePmt": { + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "taxablePmtOrRelevantAmt": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "tradingOrgInd": { + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "typeLetter": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/loans": { - "post": { - "tags": [ - "Loan" - ], - "summary": "Create Loan", - "description": "Creates a Loan for the Employee", - "operationId": "CreateLoan", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "P32": { + "additionalProperties": false, + "description": "", + "properties": { + "employerOpeningBalances": { + "$ref": "#/components/schemas/EmployerOpeningBalances" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Loan" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Loan" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Loan" - } + "hmrcLiabilities": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/HmrcLiability" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Loan" - } - } + "nullable": true, + "type": "array" + }, + "isDraft": { + "type": "boolean" + }, + "isQuarterly": { + "description": "[readonly]", + "type": "boolean" + }, + "openingBalancesTotals": { + "$ref": "#/components/schemas/OpeningBalancesTotals" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" } }, - "responses": { - "201": { - "description": "Created" + "type": "object" + }, + "P32ReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "model": { + "$ref": "#/components/schemas/P32" }, - "404": { - "description": "Not Found" + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" }, - "409": { - "description": "Conflict" + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "get": { - "tags": [ - "Loan" - ], - "summary": "List Loans", - "description": "Lists all AttachmentOrders for the Employee", - "operationId": "IndexLoan", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PapdisDocument": { + "additionalProperties": false, + "description": "PAPDIS stands for 'Payroll and Pension Data Interface Standard'.\r\nIt is an industry standard for exchanging data between payroll software and pension providers.\r\nOur system provides an export of data in this standard and these models are used to represent the data.\r\nWhilst the relevant reporting API endpoint can provide this data as a JSON entity, it is usually represented in CSV or XML format which our API also provides.", + "properties": { + "isDraft": { + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/loans/{id}": { - "get": { - "tags": [ - "Loan" - ], - "summary": "Get Loan", - "description": "Gets the Loan specified by the Id for the Employee specified by the EmployeeId", - "operationId": "GetLoan", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "messageFunctionCode": { + "$ref": "#/components/schemas/PapdisMessageFunctionCode" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "messageFunctionCodeInt": { + "description": "[readonly]", + "format": "int32", + "type": "integer" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Loan you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Loan" - } - } - } + "pensionProvider": { + "$ref": "#/components/schemas/PapdisPensionProvider" }, - "404": { - "description": "Not Found" - } - } - }, - "put": { - "tags": [ - "Loan" - ], - "summary": "Update Loan", - "operationId": "UpdateLoan", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "report": { + "$ref": "#/components/schemas/Report" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "taxYear": { + "$ref": "#/components/schemas/TaxYear" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Loan you want to update.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Loan" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Loan" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Loan" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Loan" - } - } + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "$ref": "#/components/schemas/PapdisVersion" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "PapdisDocumentReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "model": { + "$ref": "#/components/schemas/PapdisDocument" }, - "409": { - "description": "Conflict" + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" }, - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Loan" - } - } - } + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "Loan" - ], - "summary": "Delete Loan", - "description": "Deletes the Loan specified by the Id for the Employee specified by the EmployeeId", - "operationId": "DeleteLoan", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PapdisEmployee": { + "additionalProperties": false, + "properties": { + "aeStateDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "assessment": { + "$ref": "#/components/schemas/PapdisEmployeeAssessment" + }, + "contact": { + "$ref": "#/components/schemas/PapdisEmployeeContact" + }, + "contractualJoinerIndicator": { + "type": "boolean" + }, + "contribution": { + "$ref": "#/components/schemas/PapdisEmployeeContribution" + }, + "employeeId": { + "description": "[readonly]", + "format": "uuid", + "type": "string" + }, + "employeeRoleUniqueId": { + "format": "uuid", + "type": "string" + }, + "exit": { + "$ref": "#/components/schemas/PapdisEmployeeExit" + }, + "hasPrevioulyLeftPension": { + "description": "Flag indicating the employee has previously left the pension", + "type": "boolean" + }, + "id": { + "description": "[readonly]", + "format": "int32", + "type": "integer" + }, + "identity": { + "$ref": "#/components/schemas/PapdisEmployeeIdentity" + }, + "isPreviousTaxYearRefund": { + "description": "Indicates whether the employee has a pension refund from the previous tax year.", + "type": "boolean" + }, + "jobTitle": { + "nullable": true, + "type": "string" + }, + "lastPaymentDate": { + "description": "The last time the employee was paid", + "format": "date", + "nullable": true, + "type": "string" + }, + "leaveDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/PapdisEmployeeName" + }, + "pay": { + "$ref": "#/components/schemas/PapdisEmployeePay" + }, + "payrollCode": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "pensionMemberReference": { + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionUniqueId": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Loan you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "400": { - "description": "Bad Request" + "pensionablePayDefinition": { + "$ref": "#/components/schemas/PensionablePayDefinition" }, - "404": { - "description": "Not Found" + "statePensionAge": { + "format": "int32", + "type": "integer" }, - "204": { - "description": "No Content" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/loans/{id}/documents": { - "post": { - "tags": [ - "Loan" - ], - "summary": "Add Document", - "description": "Adds document to the Loan", - "operationId": "AddDocumentLoan", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "totalPreviousTaxYearRefundEmployeeAmount": { + "description": "The total amount of pension refunds paid to the employee,\r\ncalculated as the sum of all EmployeeRefund values from applicable PensionRefunds (when IsPreviousTaxYearRefund is enabled).", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "totalPreviousTaxYearRefundEmployeeAvcAmount": { + "description": "The total amount of AVC (Additional Voluntary Contributions) refunds paid to the employee,\r\ncalculated as the sum of all AdditionalVoluntaryContribution values from applicable PensionRefunds (when IsPreviousTaxYearRefund is enabled).", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Loan you want to attach documents to", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } + "totalPreviousTaxYearRefundEmployerAmount": { + "description": "The total amount of employer pension refunds,\r\ncalculated as the sum of all EmployerRefund values from applicable PensionRefunds (when IsPreviousTaxYearRefund is enabled).", + "format": "double", + "type": "number" } }, - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/loans/{id}/documents/{documentId}": { - "delete": { - "tags": [ - "Loan" - ], - "summary": "Delete Loan Document", - "description": "Deletes the document specified by the documentId for the Loan specified by the Id", - "operationId": "DeleteDocumentLoan", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "PapdisEmployeeAssessment": { + "additionalProperties": false, + "properties": { + "assessmentCode": { + "description": "[readonly]", + "format": "int32", + "type": "integer" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "deferralDate": { + "description": "[readonly]", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "enrolmentCommunicationsIssuedDate": { + "description": "[readonly]", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "documentId", - "in": "path", - "description": "The Id of the Document you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "eventCode": { + "description": "[readonly]", + "format": "int32", + "type": "integer" }, - "400": { - "description": "Bad Request" - } - } - }, - "get": { - "tags": [ - "Loan" - ], - "summary": "Get Loan Document", - "description": "Gets the document specified by the documentId for the Loan specified by the Id", - "operationId": "GetDocumentLoan", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "eventDate": { + "description": "[readonly]", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isIndividualAlreadyMemberOfQPS": { + "description": "[readonly]", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "optOutWindowEndDate": { + "description": "[readonly]", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "documentId", - "in": "path", - "description": "The Id of the Document you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string", - "format": "binary" - } - } - } + "pensionJoinReason": { + "$ref": "#/components/schemas/PensionJoinReason" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/notes": { - "post": { - "tags": [ - "Note" - ], - "summary": "Create Note", - "description": "Creates a Note for the Employee", - "operationId": "CreateNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionStartDate": { + "description": "[readonly]", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - } - } - }, - "responses": { - "201": { - "description": "Created" + "reenrolmentIndicator": { + "description": "[readonly]", + "type": "boolean" }, - "400": { - "description": "Bad Request" + "statutoryLetterCode": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "workerExclusionCode": { + "description": "[readonly]", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "get": { - "tags": [ - "Note" - ], - "summary": "List Notes", - "description": "Lists all Note for the Employee", - "operationId": "IndexNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PapdisEmployeeContact": { + "additionalProperties": false, + "properties": { + "emailAddress": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/notes/{id}": { - "get": { - "tags": [ - "Note" - ], - "summary": "Get Note", - "description": "Gets the Note specified by the Id for the Employee specified by the EmployeeId", - "operationId": "GetNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "mobile": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "postalAddress": { + "$ref": "#/components/schemas/PapdisEmployeeContactPostalAddress" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Note you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - } - } + "secondaryEmailAddress": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "telephone": { + "description": "[readonly]", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Note" - ], - "summary": "Update Note", - "operationId": "UpdateNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PapdisEmployeeContactPostalAddress": { + "additionalProperties": false, + "properties": { + "address1": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "address2": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Note you want to update.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Note" - } - } - } + "address3": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "address4": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "country": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "postcode": { + "description": "[readonly]", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "Note" - ], - "summary": "Delete Note", - "description": "Deletes the Note specified by the Id for the Employee specified by the EmployeeId", - "operationId": "DeleteNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PapdisEmployeeContribution": { + "additionalProperties": false, + "properties": { + "additionalVoluntaryContributionsAmount": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "additionalVoluntaryContributionsPercent": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "assumedPensionablePay": { + "description": "[readonly]", + "format": "double", + "nullable": true, + "type": "number" + }, + "contributionLevelType": { + "$ref": "#/components/schemas/PensionContributionLevelType" + }, + "contributionStartDate": { + "description": "[readonly]", + "format": "date", + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employeeContributionIsPercentage": { + "description": "[readonly]", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Note you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "employeeContributionsAmount": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/notes/{id}/documents": { - "post": { - "tags": [ - "Note" - ], - "summary": "Add Document", - "description": "Adds document to the Note", - "operationId": "AddDocumentNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employeeContributionsPercent": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employerContributionIncludesNiSaving": { + "description": "[readonly]", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Note you want to attach documents to", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/notes/{id}/documents/{documentId}": { - "delete": { - "tags": [ - "Note" - ], - "summary": "Delete Note Document", - "description": "Deletes the document specified by the documentId for the Note specified by the Id", - "operationId": "DeleteDocumentNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employerContributionIsPercentage": { + "description": "[readonly]", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employerContributionNiSavings": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employerContributionsAmount": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "documentId", - "in": "path", - "description": "The Id of the Document you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "employerContributionsPercent": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" - } - } - }, - "get": { - "tags": [ - "Note" - ], - "summary": "Get Note Document", - "description": "Gets the document specified by the documentId for the Note specified by the Id", - "operationId": "GetDocumentNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isAvcOnly": { + "description": "[readonly]", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isHalfContributionMember": { + "description": "[readonly]", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isPensionAvcPayLine": { + "description": "Indicates whether the pay run entry includes a pension AVC pay line.", + "type": "boolean" }, - { - "name": "documentId", - "in": "path", - "description": "The Id of the Document you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string", - "format": "binary" - } - } - } + "isPensionRefund": { + "description": "[readonly]", + "type": "boolean" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/rti/nvr/{taxYear}": { - "get": { - "tags": [ - "Nvr" - ], - "summary": "List NVR", - "description": "Returns all NiNo Verification Requests for the given tax year.", - "operationId": "ListNvr", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "lowerLimit": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "Nvr" - ], - "summary": "Create NVR", - "description": "Creates a new NiNo Verification Request.", - "operationId": "CreateNvr", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "salarySacrificeIndicator": { + "description": "[readonly]", + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Nvr" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Nvr" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Nvr" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Nvr" - } - } - } - }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Nvr" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/nvr/{taxYear}/{id}": { - "put": { - "tags": [ - "Nvr" - ], - "summary": "Update NVR", - "description": "Updates an existing NiNo Verification Request.", - "operationId": "UpdateNvr", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "unadjustedAdditionalVoluntaryContributionsAmount": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "unadjustedAdditionalVoluntaryContributionsPercent": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Nvr" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Nvr" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Nvr" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Nvr" - } - } + "unadjustedEmployeeContributionsAmount": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "unadjustedEmployerContributionsAmount": { + "description": "[readonly]", + "format": "double", + "type": "number" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Nvr" - } - } - } - } - } + "type": "object" }, - "get": { - "tags": [ - "Nvr" - ], - "summary": "Get NVR", - "description": "Retrieves the NiNo Verification Request.", - "operationId": "GetNvr", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PapdisEmployeeExit": { + "additionalProperties": false, + "properties": { + "aeOptOutDate": { + "description": "[readonly]", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "aeOptOutReference": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Nvr" - } - } - } + "exitDate": { + "description": "[readonly]", + "format": "date", + "nullable": true, + "type": "string" + }, + "exitReasonCode": { + "description": "[readonly]", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "reasonForLeaving": { + "description": "[readonly]", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "Nvr" - ], - "summary": "Delete NVR", - "description": "Deletes the NVR.", - "operationId": "DeleteNvr", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PapdisEmployeeIdentity": { + "additionalProperties": false, + "properties": { + "birthDate": { + "description": "[readonly]", + "format": "date", + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "employeeId": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/employers/{employerId}/rti/nvr/{taxYear}/{id}/xml/request": { - "get": { - "tags": [ - "Nvr" - ], - "summary": "Get XML Request", - "description": "Returns the XML request that was or will be sent to HMRC for this RTI document.\r\nAlthough the value is XML, it is returned as a JSON string.", - "operationId": "GetXmlRequestNvr", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employmentStartDate": { + "description": "[readonly]", + "format": "date", + "type": "string" + }, + "gender": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "maritalStatus": { + "$ref": "#/components/schemas/MaritalStatus" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "nationalInsuranceNumber": { + "description": "[readonly]", + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/rti/nvr/{taxYear}/{id}/submit": { - "post": { - "tags": [ - "Nvr" - ], - "summary": "Submit an existing NVR", - "description": "Submits an existing NiNo Verification Request to HMRC.", - "operationId": "SubmitNvr", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "PapdisEmployeeName": { + "additionalProperties": false, + "properties": { + "forename1": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "forename2": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "surname": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "force", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Nvr" - } - } - } + "title": { + "description": "[readonly]", + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/rti/nvr/{taxYear}/{id}/markasaccepted": { - "post": { - "tags": [ - "Nvr" - ], - "summary": "Mark as Sent", - "description": "Marks a NiNo Verification Request as having been sent to HMRC and accepted by them\r\nYou only use this method if the NVR has been submitted via an external system.\r\nIt will automatically be updated as Sent and/or Accepted if it's submitted via this API.", - "operationId": "MarkAsAcceptedNvr", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "PapdisEmployeePay": { + "additionalProperties": false, + "properties": { + "annualPensionableEarningsAmount": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "annualSalary": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Nvr" - } - } - } - } - } - } - }, - "/employers/{employerId}/rti/nvr/requiringattention": { - "get": { - "tags": [ - "Nvr" - ], - "summary": "NVR Requiring Attention", - "description": "Returns all NiNo Verification Requests that have a Submission Status of NotSubmitted or ErrorResponse", - "operationId": "RequiringAttentionNvr", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/occupationalpolicies": { - "get": { - "tags": [ - "OccupationalPolicy" - ], - "summary": "List Occupational Policies", - "description": "Lists all Occupational Policies for an Employer.", - "operationId": "IndexOccupationalPolicy", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "basis": { + "$ref": "#/components/schemas/PayBasis" }, - "404": { - "description": "Employer or Occupational Policy Not Found" + "payAmountMultiplier": { + "description": "[readonly]", + "format": "double", + "nullable": true, + "type": "number" }, - "400": { - "description": "Bad Request" + "pensionableEarningsAmount": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "totalGrossQualifyingEarningsAmount": { + "description": "[readonly]", + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "OccupationalPolicy" - ], - "summary": "Create Occupational Policy", - "description": "Creates a new Occupational Policy for the Employer.", - "operationId": "CreateOccupationalPolicy", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/OccupationalPolicy" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalPolicy" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalPolicy" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/OccupationalPolicy" - } - } + "PapdisEmployer": { + "additionalProperties": false, + "properties": { + "contractedWeeks": { + "description": "[readonly]", + "format": "double", + "nullable": true, + "type": "number" + }, + "cyclicalReenrolmentDate": { + "description": "[readonly]", + "format": "date", + "nullable": true, + "type": "string" + }, + "employerId": { + "description": "[readonly] Taken from the papdisEmployerId property of the PensionProvider", + "nullable": true, + "type": "string" + }, + "fullTimeContractedHours": { + "description": "[readonly]", + "format": "double", + "nullable": true, + "type": "number" + }, + "fullTimeContractedWeeks": { + "description": "[readonly]", + "format": "double", + "nullable": true, + "type": "number" + }, + "group": { + "description": "[readonly] Taken from the papdisGroup property of the WorkerGroup", + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly]", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "payrollPeriod": { + "$ref": "#/components/schemas/PapdisPayrollPeriod" + }, + "pensionRule": { + "$ref": "#/components/schemas/PensionRule" + }, + "postalAddress": { + "$ref": "#/components/schemas/PapdisEmployerContactPostalAddress" + }, + "stagingDate": { + "description": "[readonly]", + "format": "date", + "type": "string" + }, + "subGroup": { + "description": "[readonly] Taken from the papdisSubGroup property of the WorkerGroup", + "nullable": true, + "type": "string" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "PapdisEmployerContactPostalAddress": { + "additionalProperties": false, + "properties": { + "address1": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalPolicy" - } - } - } + "address2": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - "404": { - "description": "Employer or Occupational Policy Not Found" - } - } - } - }, - "/employers/{employerId}/occupationalpolicies/{id}": { - "get": { - "tags": [ - "OccupationalPolicy" - ], - "summary": "Get Occupational Policy", - "description": "Gets the Occupational Policy specified.", - "operationId": "GetOccupationalPolicy", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Occupational Policy belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "address3": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Occupational Policy which you want to fetch", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalPolicy" - } - } - } + "address4": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - "404": { - "description": "Employer or Occupational Policy Not Found" + "country": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "postcode": { + "description": "[readonly]", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "OccupationalPolicy" + "PapdisMessageFunctionCode": { + "enum": [ + "Enrol", + "InfoOnly", + "AssessmentRequest", + "AssessmentResponse", + "WokerInstruction" ], - "summary": "Update Occupational Policy", - "description": "Updates a Occupational Policy for the Employer.", - "operationId": "UpdateOccupationalPolicy", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Occupational Policy belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PapdisPayrollPeriod": { + "additionalProperties": false, + "properties": { + "contributionDeductionDate": { + "description": "[readonly]", + "format": "date", + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Occupational Policy which you want to fetch", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/OccupationalPolicy" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalPolicy" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalPolicy" - } + "employees": { + "description": "[readonly] Employees and contributions made in this period", + "items": { + "$ref": "#/components/schemas/PapdisEmployee" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/OccupationalPolicy" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalPolicy" - } - } - } + "nullable": true, + "type": "array" + }, + "frequencyCode": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "payPeriodEndDate": { + "description": "[readonly]", + "format": "date", + "type": "string" + }, + "payPeriodStartDate": { + "description": "[readonly]", + "format": "date", + "type": "string" + }, + "payReferenceEndDate": { + "description": "[readonly]", + "format": "date", + "type": "string" }, - "404": { - "description": "Employer or Occupational Policy Not Found" + "payReferenceStartDate": { + "description": "[readonly]", + "format": "date", + "type": "string" }, - "400": { - "description": "Bad Request" + "taxPeriod": { + "description": "[readonly]", + "format": "int32", + "type": "integer" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "OccupationalPolicy" - ], - "summary": "Delete Occupational Policy", - "description": "Deletes the specified Occupational Policy.", - "operationId": "DeleteOccupationalPolicy", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Occupational Policy belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PapdisPensionProvider": { + "additionalProperties": false, + "properties": { + "accountNo": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Occupational Policy which you want to fetch", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employers": { + "items": { + "$ref": "#/components/schemas/PapdisEmployer" + }, + "nullable": true, + "type": "array" + }, + "pensionProviderId": { + "description": "[readonly] Taken from the papdisProviderId property of the PensionProvider", + "nullable": true, + "type": "string" } + }, + "type": "object" + }, + "PapdisVersion": { + "enum": [ + "PAP10", + "PAP11" ], - "responses": { - "204": { - "description": "No Content" + "type": "string" + }, + "PartnerDetails": { + "additionalProperties": false, + "properties": { + "firstName": { + "maxLength": 35, + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "initials": { + "maxLength": 30, + "nullable": true, + "type": "string" }, - "404": { - "description": "Employer or Occupational Policy Not Found" - } - } - } - }, - "/employers/{employerId}/occupationalsickleavehistory/employees/{employeeId}": { - "get": { - "tags": [ - "OccupationalSickLeaveHistory" - ], - "summary": "List OccupationalSickLeaveHistory", - "description": "Lists all OccupationalSickLeaveHistory for the Employee specified", - "operationId": "OccupationalSickLeaveHistoryOccupationalSickLeaveHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "lastName": { + "maxLength": 35, + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "niNumber": { + "maxLength": 15, + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "OccupationalSickLeaveHistory" + "PayBasis": { + "enum": [ + "Hourly", + "Daily", + "Monthly" ], - "summary": "Create OccupationalSickLeaveHistory", - "description": "Creates Occupational sick leave history for the Employee.", - "operationId": "CreateOccupationalSickLeaveHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PayCode": { + "additionalProperties": false, + "description": "Each PayLine has a Code. The Code will match the Code property of a PayCode.\r\nThe PayCode that is used determines how the amount is treated with regards to tax, NI and pensions", + "properties": { + "calculationType": { + "$ref": "#/components/schemas/PayCodeCalculationType" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee to which the Occupational sick leave history belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "code": { + "maxLength": 20, + "minLength": 1, + "type": "string" }, - "404": { - "description": "Not Found" + "dailyRateMultiplier": { + "description": "If the MultiplierType is MultipleOfDailyRate then this sets the multiple to be used, ie 1.5", + "format": "double", + "type": "number" }, - "201": { - "description": "Created", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - } - } - } - } - } - }, - "/employers/{employerId}/occupationalsickleavehistory/employees/{employeeId}/{id}": { - "get": { - "tags": [ - "OccupationalSickLeaveHistory" - ], - "summary": "Get OccupationalSickLeaveHistory", - "description": "Gets a occupational sick leave for the employee and employer.", - "operationId": "GetOccupationalSickLeaveHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "defaultValue": { + "description": "If a non-zero value is provided then when this code is selected in our UI the value will be automatically filled.", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "flexibleDrawdown": { + "$ref": "#/components/schemas/FlexibleDrawdown" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Occupational leave history which you want to fetch", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "hourlyRateMultiplier": { + "description": "If the MultiplierType is MultipleOfHourlyRate then this sets the multiple to be used, ie 1.5", + "format": "double", + "type": "number" + }, + "isAttachable": { + "description": "Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the attachable pay for AttachmentOrders.", + "type": "boolean" + }, + "isAutoAdjust": { + "description": "Can be used to inform a User to what default value to set for PayLine.autoAdjustForLeave for new lines created.", + "type": "boolean" + }, + "isControlCode": { + "description": "[readonly] Control Codes cannot be deleted or edited nor can PayLines be assigned to them.", + "type": "boolean" + }, + "isDeduction": { + "description": "If set to true then a PayLine using this code will be treated as a deduction as opposed to an addition.", + "type": "boolean" + }, + "isNiable": { + "description": "Determines whether or not the value of PayLines using this code should be taken into consideration when calculating National Insurance Contributions.", + "type": "boolean" + }, + "isNotContributingToHolidayPay": { + "description": "If true then any payments made using this code will not contribute towards holiday pay calculations.", + "type": "boolean" + }, + "isNotTierable": { + "description": "If true then any payments made using this code will not be included when calculating the tier an employee should be on for a Tiered Pension.", + "type": "boolean" + }, + "isNotional": { + "description": "Determines whether the transaction involves non-monetary benefits for payroll processing, potentially subject to tax and National Insurance.", + "type": "boolean" + }, + "isPensionExcessLumpSum": { + "description": "If true then any payments made using this code will be reported as\r\na Lump Sums (B - PCELS)", + "type": "boolean" + }, + "isPensionable": { + "description": "Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the total pensionable pay.", + "type": "boolean" + }, + "isQualifyingEarningsForAe": { + "description": "If true then any payments made using this code will be used as the basis for calculating QualifyingEarnings for AutoEnrolment assessments.\r\nIf it is set to null then when it's next retrieved it'll have the same value as PensionablePay", + "nullable": true, + "type": "boolean" + }, + "isRealTimeClass1aNiable": { + "description": "Determines whether or not the value of PayLines using this code are subject to real time Class 1A NIC.", + "type": "boolean" + }, + "isStandAloneLumpSum": { + "description": "If true then any payments made using this code will be reported as\r\na Lump Sums (A - SALS)", + "type": "boolean" + }, + "isSystemCode": { + "description": "[readonly] System Codes cannot be deleted or edited", + "type": "boolean" + }, + "isTaxable": { + "description": "Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the PAYE liability.", + "type": "boolean" + }, + "isTcp_Op": { + "description": "If true then any payments made using this code will be reported as\r\na Trivial Commutation Payment (C - Occupational Pension)", + "type": "boolean" + }, + "isTcp_Pp": { + "description": "If true then any payments made using this code will be reported as\r\na Trivial Commutation Payment (B - Personal Pension)", + "type": "boolean" + }, + "isTcp_Tcls": { + "description": "If true then any payments made using this code will be reported as\r\na Trivial Commutation Payment (A - TCLS)", + "type": "boolean" + }, + "multiplierType": { + "$ref": "#/components/schemas/PayCodeMultiplierType" + }, + "payee": { + "description": "The Id of the Payee, if any, that deductions are to be paid to.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "title": { + "maxLength": 100, + "minLength": 1, + "type": "string" } + }, + "required": [ + "code", + "title" ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - } - } - } - } + "type": "object" }, - "put": { - "tags": [ - "OccupationalSickLeaveHistory" + "PayCodeCalculationType": { + "enum": [ + "FixedAmount", + "PercentageOfGross", + "PercentageOfNet", + "MultipleOfHourlyRate", + "MultipleOfDailyRate", + "FixedAnnualAmount" ], - "summary": "Update OccupationalSickLeaveHistory", - "description": "Updates a occupational sick leave for the employee and employer.", - "operationId": "UpdateOccupationalSickLeaveHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PayCodeMultiplierType": { + "enum": [ + "None", + "Hours", + "Days" + ], + "type": "string" + }, + "PayCodeSet": { + "additionalProperties": false, + "description": "A PayCodeSet is used to group together a number of PayCodes.", + "properties": { + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "lgpsPayCategory": { + "$ref": "#/components/schemas/LgpsPayCategory" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Occupational leave history which you want to fetch", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } + "mcrPayCategory": { + "$ref": "#/components/schemas/McrPayCategory" + }, + "name": { + "description": "The name of this PayCodeSet", + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "payCodes": { + "description": "The Code of any PayCodes included in this PayCodeSet", + "items": { + "type": "string" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "nullable": true, + "type": "array" }, - "404": { - "description": "Not Found" + "useForLgps": { + "description": "Flag indicating if this PayCodeSet will be used for LGPS pay categorisation", + "type": "boolean" }, - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - } - } + "useForMcr": { + "type": "boolean" } - } - }, - "delete": { - "tags": [ - "OccupationalSickLeaveHistory" + }, + "required": [ + "name" ], - "summary": "Delete OccupationalSickLeaveHistory", - "description": "Deletes the specified Occupational leave history record.", - "operationId": "DeleteOccupationalSickLeaveHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "PayCodeVarianceLine": { + "additionalProperties": false, + "properties": { + "code": { + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "primaryValue": { + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Occupational sick leave which you want to fetch", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "secondaryValue": { + "format": "double", + "nullable": true, + "type": "number" } - ], - "responses": { - "204": { - "description": "No Content" + }, + "type": "object" + }, + "PayElementReport": { + "additionalProperties": false, + "properties": { + "employer": { + "$ref": "#/components/schemas/Item" }, - "400": { - "description": "Bad Request" + "endDate": { + "format": "date", + "type": "string" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/occupationalsickleavehistory/import": { - "post": { - "tags": [ - "OccupationalSickLeaveHistory" - ], - "summary": "Upload OccupationalSickLeaveHistory", - "description": "Uploads new Occupational sick leave history for the Employer against specific occupational policy.", - "operationId": "UploadOSPHistoryOccupationalSickLeaveHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the occupational sick leave history is to be uploaded.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - } + "endPeriodName": { + "nullable": true, + "type": "string" + }, + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/PayElementReportLine" }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - } + "nullable": true, + "type": "array" + }, + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payCodeTotals": { + "additionalProperties": { + "format": "double", + "nullable": true, + "type": "number" }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OccupationalSickLeaveHistory" - } - } - } + "nullable": true, + "readOnly": true, + "type": "object" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "period": { + "format": "int32", + "type": "integer" + }, + "periodTo": { + "format": "int32", + "type": "integer" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "PayElementReportLine": { + "additionalProperties": false, + "properties": { + "employee": { + "$ref": "#/components/schemas/Item" }, - "201": { - "description": "Created", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/occupationalsickleavehistory/importfile": { - "post": { - "tags": [ - "OccupationalSickLeaveHistory" - ], - "summary": "Import OccupationalSickLeaveHistory from csv file", - "description": "Import Occupational Sick Leave History from a CSV file.", - "operationId": "ImportOccupationalSickLeaveHistoryCsvOccupationalSickLeaveHistory", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "hasPay": { + "readOnly": true, + "type": "boolean" + }, + "niNumber": { + "nullable": true, + "type": "string" + }, + "payElements": { + "additionalProperties": { + "format": "double", + "nullable": true, + "type": "number" + }, + "nullable": true, + "type": "object" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "totalPay": { + "format": "double", + "readOnly": true, + "type": "number" } - ], - "requestBody": { + }, + "type": "object" + }, + "PayElementReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/PayElementReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/openingBalances": { - "get": { - "tags": [ - "OpeningBalances" - ], - "summary": "Get Opening Balances", - "description": "Returns the Opening Balances for an Employee", - "operationId": "GetOpeningBalances", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "PayGradesReport": { + "additionalProperties": false, + "properties": { + "isDraft": { + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to retrieve Opening Balances", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - } - } + "lines": { + "items": { + "$ref": "#/components/schemas/AveragePayGradesReportLine" + }, + "nullable": true, + "type": "array" }, - "404": { - "description": "Not Found" + "report": { + "$ref": "#/components/schemas/Report" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "OpeningBalances" - ], - "summary": "Update Opening Balances", - "description": "Updates the Opening Balances for an Employee.", - "operationId": "UpdateOpeningBalances", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PayGradesReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to update Opening Balances", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "model": { + "$ref": "#/components/schemas/PayGradesReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } + }, + "type": "object" + }, + "PayLine": { + "additionalProperties": false, + "description": "As well as the basic pay amount for an employee there are often additions and deductions such as bonuses.\r\nThese additions and deductions are represented using this model.", + "properties": { + "analysisCategoriesCodes": { + "description": "List of analysis Category Codes", + "items": { + "$ref": "#/components/schemas/AnalysisCategoryCodes" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } + "nullable": true, + "type": "array" + }, + "analysisCategoryCodeIds": { + "description": "List of analysis Category Codes uniqueId", + "items": { + "format": "uuid", + "type": "string" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - } - } + "nullable": true, + "type": "array" + }, + "annualValue": { + "description": "The original value from the PayLine before we modify it\r\nCurrently only used when CalculationType is set to FixedAnnualAmount\r\nso we can determine whether the pay line value needs calculating or not\r\nTo recalculate set to null with annual amount recorded in Value", + "format": "double", + "nullable": true, + "type": "number" + }, + "attachmentOrderId": { + "description": "[readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "autoAdjustForLeave": { + "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun", + "type": "boolean" + }, + "benefitId": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "calculateAsWhenPaid": { + "description": "Indicates whether this pay line should be treated as When Paid rather than When Earned", + "type": "boolean" + }, + "childId": { + "description": "This is nothing but the UniqueId of the model.", + "format": "uuid", + "type": "string" + }, + "code": { + "description": "The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition.", + "nullable": true, + "type": "string" + }, + "contributesToBasicPay": { + "description": "Indicates whether this pay line contributes to the basic pay of the employee.\r\nWill be set to true by default when IsAutoGeneratedBasicPayLine is true.", + "type": "boolean" + }, + "costCentre": { + "nullable": true, + "type": "string" + }, + "costCentreId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "costCentreTitle": { + "nullable": true, + "type": "string" + }, + "department": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "departmentTitle": { + "nullable": true, + "type": "string" + }, + "description": { + "description": "A free form description to accompany this line. It will be displayed on the payslip.", + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "earnedFrom": { + "description": "Nullable DateTime property \"EarnedFrom\" in the PayLine model to store the start date of the PayLine's 'earned' period in a PayRun.", + "format": "date", + "nullable": true, + "type": "string" + }, + "earnedTo": { + "description": "Nullable DateTime property \"EarnedTo\" in the PayLine model to store the end date of the PayLine's 'earned' period in a PayRun.", + "format": "date", + "nullable": true, + "type": "string" + }, + "effectiveFrom": { + "description": "The date the pay line starts being calculated in payrun", + "format": "date", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "effectiveTo": { + "description": "The date the pay line stops being calculated in payrun", + "format": "date", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/openingBalances/nic/{taxYear}": { - "post": { - "tags": [ - "OpeningBalances" - ], - "summary": "Create NicSummary", - "description": "Creates a NicSummary for for an Employee.", - "operationId": "CreateNicSummaryOpeningBalances", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employeeRoleReference": { + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to create the Nic Summary", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "fullTimeAnnualValue": { + "description": "Used to set Full Time Annual Value for payline", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear the NicSummary applies to", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - } - } - }, - "responses": { - "201": { - "description": "Created" + "ignoreInitialBackPay": { + "description": "Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology.\r\nIf set to false, the automatic backpay calculation will be performed on the first pay run.", + "type": "boolean" }, - "400": { - "description": "Bad Request" - } - } - }, - "get": { - "tags": [ - "OpeningBalances" - ], - "summary": "Get NicSummaries", - "description": "Returns the NicSummaries for an Employee for a given TaxYear.\r\nIf the TaxYear is the same as on their OpeningBalances then the NicSummaries will be the same as shown there.", - "operationId": "GetNicSummariesOpeningBalances", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "importIdempotencyKey": { + "description": "Deterministic GUID used for import idempotency tracking.\r\nGenerated from: blobScope|employerUniqueId|payrollCode|lineIndex", + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to retrieve Opening Balances", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "initialBackPayPublicPayRunId": { + "description": "Used to mark the first payrun where this payline has been payrolled for backpay", + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear the NicSummaries apply to", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "isAutoCalculatedBackPayLine": { + "readOnly": true, + "type": "boolean" }, - { - "name": "openingBalancesOnly", - "in": "query", - "description": "Limit the results to opening balance year to date", - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NicSummary" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NicSummary" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NicSummary" - } - } - } - } + "isAutoGeneratedBasicPayLine": { + "type": "boolean" }, - "404": { - "description": "Not Found" - } - } - }, - "put": { - "tags": [ - "OpeningBalances" - ], - "summary": "Update NicSummaries", - "description": "Updates the NicSummaries for an Employee for a given TaxYear.\r\nIf the TaxYear is the same as on their OpeningBalances then the NicSummaries there will also be updated.", - "operationId": "UpdateNicSummariesOpeningBalances", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isAutomaticBackPay": { + "description": "Automatically calculate back pay and add or modify the necessary pay lines for this addition/deduction when a pay run is created.\r\nApplicable only to employee level addition/deduction pay lines.\r\nIf set to false then you must manually handle the calculation and adding of back pay lines.", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to retrieve Opening Balances", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isNetToGross": { + "description": "If the PayLine is a fixed amount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target.", + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear the NicSummaries apply to", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NicSummary" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NicSummary" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NicSummary" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NicSummary" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NicSummary" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NicSummary" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NicSummary" - } - } - } - } + "isTaxable": { + "type": "boolean" }, - "400": { - "description": "Bad Request" + "isZeroHoursTeachersBackPayLine": { + "description": "[readonly] Indicates whether this pay line is a backdated pay claim line\r\nbelonging to a zero hours contract teacher.", + "type": "boolean" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/openingBalances/nic/{taxYear}/{uniqueId}": { - "get": { - "tags": [ - "OpeningBalances" - ], - "summary": "Get NicSummary", - "description": "Returns a NicSummary for a Unique Id for an Employee.", - "operationId": "GetNicSummaryOpeningBalances", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "leaveId": { + "description": "[readonly] The Id of the associated Leave. Only included if the PayLine is a result of a Leave with Statutory pay", + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to retrieve the Nic Summary", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "leaveStatutoryDaysPaid": { + "description": "[readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many days they've been paid for (based on their Working Pattern).", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear the NicSummary applies to", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "leaveStatutoryWeeksPaid": { + "description": "[readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many weeks they've been paid for (based on their Working Pattern).", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "uniqueId", - "in": "path", - "description": "The Id of the NicSummary", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - } - } + "loanId": { + "description": "[readonly] The Id of the associated Loan, if any.", + "format": "uuid", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" - } - } - }, - "put": { - "tags": [ - "OpeningBalances" - ], - "summary": "Update NicSummary", - "description": "Update a NicSummary for a Unique Id for an Employee.", - "operationId": "UpdateNicSummaryOpeningBalances", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "londonAllowanceId": { + "description": "Used to set London allowance id for payline", + "format": "int32", + "nullable": true, + "type": "integer" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to update the Nic Summary", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "multiplier": { + "description": "If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear the NicSummary applies to", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "netToGrossDiscrepancy": { + "description": "The discrepancy between the targeted and the calculated grossed up value during a net to gross calculation.", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "uniqueId", - "in": "path", - "description": "The Id of the NicSummary", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/NicSummary" - } - } - } + "parentId": { + "description": "[readonly] The Id of the associated employee level pay line, if the current line is a back pay line.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "payGrade": { + "description": "PayGrade name based on PayGradeId", + "nullable": true, + "type": "string" + }, + "paySpine": { + "description": "PaySpine name based on PaySpineId", + "nullable": true, + "type": "string" + }, + "paySpineGradeId": { + "description": "[readonly] The Id of the associated pay spine grade.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "paySpineId": { + "description": "[readonly] The Id of the associated pay spine.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "pensionId": { + "description": "[readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "percentageOfEffectiveDays": { + "description": "The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun", + "format": "double", + "nullable": true, + "type": "number" + }, + "periodFrom": { + "description": "Nullable DateTime property \"PeriodFrom\" in the PayLine model to store the start date of the PayRun period the current PayLine is part of.", + "format": "date", + "nullable": true, + "type": "string" + }, + "periodTo": { + "description": "Nullable DateTime property \"PeriodTo\" in the PayLine model to store the end date of the PayRun period the current PayLine is part of.", + "format": "date", + "nullable": true, + "type": "string" + }, + "rate": { + "description": "If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used", + "format": "double", + "nullable": true, + "type": "number" + }, + "roleId": { + "description": "The employee role which is associated with this pay line.\r\nIf set to null, the pay line is not related with a role.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "spinalPointId": { + "description": "[readonly] The Id of the associated spinal point.", + "format": "uuid", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" - } - } - }, - "delete": { - "tags": [ - "OpeningBalances" - ], - "summary": "Delete NicSummary", - "description": "Delete a NicSummary for a Unique Id for an Employee.", - "operationId": "DeleteNicSummaryOpeningBalances", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "spinePoint": { + "description": "SpinePoint name based on SpinePointId", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to delete the Nic Summary", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "tags": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear the NicSummary applies to", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "targetNetToGrossValue": { + "description": "The original net fixed addition amount that is considered to be a take home pay target.", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "uniqueId", - "in": "path", - "description": "The Id of the NicSummary", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "totalPaidDays": { + "format": "double", + "nullable": true, + "type": "number" }, - "400": { - "description": "Bad Request" + "totalWorkingDays": { + "format": "double", + "nullable": true, + "type": "number" }, - "404": { - "description": "Not Found" + "value": { + "description": "The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used).\r\nIf the PayCode has a CalculationType other than FixedAmount then this field will be a percentage.\r\nIf the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated.", + "format": "double", + "type": "number" } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/openingBalances/p45": { - "put": { - "tags": [ - "OpeningBalances" + }, + "type": "object" + }, + "PayMethod": { + "enum": [ + "Cash", + "Cheque", + "Credit", + "DirectDebit" ], - "summary": "Update P45 Value", - "description": "Updates the P45 Values on the Opening Balances for an Employee.\r\nThis would ideally be done when the Opening Balances are updated but if payruns have already been started for the employee then Opening Balances can't be updated - hence this API call just to update the P45 values.\r\nThere must be a currently open PayRun for the employee.\r\nOnly the PreviousEmployerGross and PreviousEmployerTax properties of the submitted OpeningBalances model are updated.", - "operationId": "UpdateP45OpeningBalances", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PayOptions": { + "additionalProperties": false, + "description": "This object forms the basis of the Employees payment.", + "properties": { + "autoAdjustForLeave": { + "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to update P45 figures", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - } - } + "baseDailyRate": { + "description": "This property is used to calculate values for PayCodes that are set as multiples of \r\nthe employees base daily rate. Eg sick.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "baseHourlyRate": { + "description": "This property is used to calculate values for PayCodes that are set as multiples of \r\nthe employees base hourly rate. Eg Overtime.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/openingBalances/terminationpayments": { - "put": { - "tags": [ - "OpeningBalances" - ], - "summary": "Update Termination Pay", - "description": "Updates the Termination Pay value on the Opening Balances for an Employee.\r\nThis would ideally be done when the Opening Balances are updated but if payruns have already been started for the employee then Opening Balances can't be updated - hence this API call just to update the Termination Pay value.\r\nOnly the TerminationPayments property of the submitted OpeningBalances model is updated.", - "operationId": "UpdateTerminationPaymentsOpeningBalances", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "basicPay": { + "description": "The amount of basic pay the Employee is regularly paid each period\r\nThis amount is the combined total of all pay elements that contribute to basic pay", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to update Termination Payments", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } + "basis": { + "$ref": "#/components/schemas/PayBasis" + }, + "excludedRegularPayLines": { + "description": "These used to store the PayLines that have been excluded from RegularPaylines.", + "items": { + "$ref": "#/components/schemas/PayLine" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalances" - } - } - } + "nullable": true, + "type": "array" }, - "400": { - "description": "Bad Request" + "fpsFields": { + "$ref": "#/components/schemas/FpsFields" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/openingbalances/{taxYear}": { - "get": { - "tags": [ - "OpeningBalances" - ], - "summary": "Totals of employee opening balances for a tax year", - "description": "Totals of Employee Opening Balances in the specified TaxYear", - "operationId": "GetOpeningBalancesTotalsOpeningBalances", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to search.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "mapsMiles": { + "description": "The number of miles to pay for as Mileage Allowance Payments", + "format": "int32", + "nullable": true, + "type": "integer" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear for which you want to Opening Balances totals.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/OpeningBalancesTotals" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalancesTotals" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OpeningBalancesTotals" - } - } - } + "method": { + "$ref": "#/components/schemas/PayMethod" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/p11history": { - "post": { - "tags": [ - "P11History" - ], - "summary": "Create P11 Historical data", - "operationId": "CreateP11History", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "mileageVehicleType": { + "$ref": "#/components/schemas/MileageVehicleType" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "description": "", - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.P11HistoryRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.P11HistoryRequest" - } - } + "nationalMinimumWage": { + "type": "boolean" + }, + "niTable": { + "type": "string" + }, + "ordinal": { + "description": "Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod.", + "format": "int32", + "type": "integer" + }, + "payAmount": { + "description": "The amount the Employee is regularly paid each period", + "format": "double", + "type": "number" + }, + "payAmountMultiplier": { + "description": "This property is irrelevant if the basis is Monthly.\r\nBut if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period.", + "format": "double", + "type": "number" + }, + "payCode": { + "description": "If you want the Employees pay to be allocated to a code other than BASIC, specify it here", + "nullable": true, + "type": "string" + }, + "period": { + "$ref": "#/components/schemas/PayPeriods" + }, + "regularPayLines": { + "description": "These are used to make additions/deductions to the pay for this Employee.\r\nYou do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created.", + "items": { + "$ref": "#/components/schemas/PayLine" }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.P11HistoryRequest" - } - } + "nullable": true, + "type": "array" + }, + "tags": { + "items": { + "type": "string" }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.P11HistoryRequest" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success" + "nullable": true, + "type": "array" }, - "400": { - "description": "Bad Request" + "taxAndNi": { + "$ref": "#/components/schemas/TaxAndNi" + }, + "withholdTaxRefundIfPayIsZero": { + "description": "If you don't want negative PAYE values when the Gross pay is zero, set this to true", + "type": "boolean" } - } + }, + "type": "object" }, - "get": { - "tags": [ - "P11History" - ], - "summary": "Retrieve P11 Historical data", - "operationId": "ListPagedP11History", - "parameters": [ - { - "name": "pageNum", - "in": "query", - "description": "", - "schema": { - "type": "integer", - "format": "int32" - } + "PayOptionsImport": { + "additionalProperties": false, + "description": "This object is used to import payment information for a payrun entry", + "properties": { + "analysisCategoryCodes": { + "description": "List of Analysis Category Codes associated with this item on the payslip.", + "items": { + "$ref": "#/components/schemas/AnalysisCategoryCodes" + }, + "nullable": true, + "type": "array" }, - { - "name": "pageSize", - "in": "query", - "description": "", - "schema": { - "type": "integer", - "format": "int32" - } + "autoAdjustForLeave": { + "description": "AutoAdjustForLeave for imported pay lines", + "type": "boolean" }, - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "basis": { + "$ref": "#/components/schemas/PayBasis" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.P11HistoryResponse" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/p11history/{id}": { - "delete": { - "tags": [ - "P11History" - ], - "summary": "Delete P11 Historical data", - "operationId": "DeleteP11History", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "contributesToBasicPay": { + "description": "ContributesToBasicPay for imported pay lines", + "type": "boolean" + }, + "costCentre": { + "description": "Any CostCentre that you'd like to appear on the payslip", + "nullable": true, + "type": "string" + }, + "department": { + "description": "Any Department that you'd like to appear on the payslip", + "nullable": true, + "type": "string" + }, + "effectiveFrom": { + "description": "EffectiveFrom date for imported pay lines", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "effectiveTo": { + "description": "EffectiveTo date for imported pay lines", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - }, - "put": { - "tags": [ - "P11History" - ], - "summary": "Update P11 Historical entry", - "operationId": "UpdateP11History", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employerIdentifier": { + "description": "Optional. But if one entry has it then all must.\r\nAllows you to import to multiple employers by specifying the Employers AlternativeIdentifier", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "ignoreInitialBackPay": { + "description": "IgnoreInitialBackPay for imported pay lines", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The unique id of the record", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "description": "", - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.P11HistoryRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.P11HistoryRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.P11HistoryRequest" - } + "isAutomaticBackPay": { + "description": "IsAutomaticBackPay for imported pay lines", + "type": "boolean" + }, + "isNetToGross": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/PayLine" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.P11HistoryRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.P11HistoryResponse" - } - } - } + "nullable": true, + "type": "array" }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.P11HistoryResponse" - } - } - } + "note": { + "description": "Any note that you'd like to appear on the payslip", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/paycodes": { - "get": { - "tags": [ - "PayCode" - ], - "summary": "List PayCodes", - "description": "Lists all PayCodes for the Employer specified.", - "operationId": "IndexPayCode", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list Pay Codes", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "payAmount": { + "description": "The amount the Employee is regularly paid each period", + "format": "double", + "type": "number" }, - { - "name": "verbose", - "in": "query", - "description": "If provided and set to true then full details of all Pay Codes will be returned instead of just a summary", - "schema": { - "type": "boolean", - "default": false - } + "payAmountMultiplier": { + "description": "This property is irrelevant if the basis is Monthly.\r\nBut if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period.", + "format": "double", + "type": "number" + }, + "payCode": { + "description": "If you want to override the PayCode used for the Basic Pay then set the code here, otherwise leave this blank and the default will be used.", + "nullable": true, + "type": "string" + }, + "payGrade": { + "description": "PayGrade for imported pay lines", + "nullable": true, + "type": "string" + }, + "paySpine": { + "description": "PaySpine for imported pay lines", + "nullable": true, + "type": "string" + }, + "payrollCode": { + "description": "The payroll code of the employee to update", + "nullable": true, + "type": "string" + }, + "roleReference": { + "description": "This is the unique reference of the Role that the employee is assigned to.", + "nullable": true, + "type": "string" + }, + "spinePoint": { + "description": "SpinePoint for imported pay lines", + "nullable": true, + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" } + }, + "type": "object" + }, + "PayPeriodEventType": { + "description": "Different events supported for a PaySchedule Period. These events happen a pre-configured number of days before the PaymentDate for that PaySchedulePeriod.", + "enum": [ + "SubmitForProcessing", + "SendForApproval", + "Approval", + "Finalise", + "SendPaySlip", + "SubmitRti" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayCode" - } - } - } - } - } - } + "type": "string" }, - "post": { - "tags": [ - "PayCode" + "PayPeriodTypes": { + "enum": [ + "Custom", + "Monthly", + "FourWeekly", + "Fortnightly", + "Weekly", + "Daily" ], - "summary": "Create PayCode", - "description": "Creates a new PayCode for the Employer.", - "operationId": "CreatePayCode", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "type": "string" + }, + "PayPeriods": { + "enum": [ + "Custom", + "Monthly", + "FourWeekly", + "Fortnightly", + "Weekly", + "Daily" ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "type": "string" + }, + "PayRun": { + "additionalProperties": false, + "description": "This model is right at the very heart of the software.\r\nThere is a PayRun for each period in which people are paid.", + "properties": { + "autoPilotCloseDate": { + "description": "[readonly] If AutoPilot is enabled in the AutomationSettings for the Employer then this property will tell you when\r\nthe payrun will be automatically closed", + "format": "date", + "nullable": true, + "type": "string" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - } - } + "dateClosed": { + "format": "date-time", + "nullable": true, + "type": "string" }, - "404": { - "description": "Employer Not Found" - } - } - } - }, - "/employers/{employerId}/paycodes/{code}": { - "get": { - "tags": [ - "PayCode" - ], - "summary": "Get PayCode (deprecated)", - "description": "Gets the PayCode specified.\r\nUse the other GET endpoint that supports non-alphanumeric characters for a pay code", - "operationId": "GetPayCode", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Pay Code belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "description": { + "description": "Description of the current version of the PayRun.", + "nullable": true, + "type": "string" }, - { - "name": "code", - "in": "path", - "description": "The code of the Pay Code you want to retrieve.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - } - } + "employeeCount": { + "description": "[readonly] The number of Employees included in this PayRun (including any CIS Subcontractors)", + "format": "int32", + "type": "integer" }, - "404": { - "description": "Not Found" - } - } - }, - "put": { - "tags": [ - "PayCode" - ], - "summary": "Update PayCode (deprecated)", - "description": "Updates the details of an existing PayCode.\r\nUse the other Update endpoint that supports non-alphanumeric characters for a pay code", - "operationId": "UpdatePayCode", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "endDate": { + "description": "[readonly] The end date of the period this PayRun covers", + "format": "date", + "type": "string" }, - { - "name": "code", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } + "entries": { + "description": "[readonly] The PayRunEntries that make up this PayRun.\r\nThis is populate automatically when you start a PayRun.", + "items": { + "$ref": "#/components/schemas/Item" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - } - } + "nullable": true, + "type": "array" }, - "404": { - "description": "Not Found" - } - } - }, - "delete": { - "tags": [ - "PayCode" - ], - "summary": "Delete PayCode (deprecated)", - "description": "Deletes the specified PayCode.\r\nUse the other Delete endpoint that supports non-alphanumeric characters for a pay code", - "operationId": "DeletePayCode", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isClosed": { + "description": "[readonly] Set to True if the PayRun is Finalised and changes can no longer be made", + "readOnly": true, + "type": "boolean" }, - { - "name": "code", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "isCombinedPayRun": { + "description": "Indicates if the payRun is a combined pay run or not", + "type": "boolean" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/paycodes/paycode": { - "get": { - "tags": [ - "PayCode" - ], - "summary": "Get PayCode", - "description": "Gets the PayCode specified.", - "operationId": "GetPayCodePayCode", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Pay Code belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isLatestVersion": { + "description": "[readonly] Indicates whether this is the latest version of the PayRun.", + "type": "boolean" }, - { - "name": "code", - "in": "query", - "description": "The code of the Pay Code you want to retrieve.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - } - } + "isRolledBack": { + "description": "[readonly] Set to True if the PayRun is currently rolled back", + "type": "boolean" + }, + "navigation": { + "$ref": "#/components/schemas/PayRunEntryNavigation" + }, + "nonRtiEmployeeCount": { + "description": "[readonly] The number of employees excluded from the RTI submission in this PayRun", + "format": "int32", + "type": "integer" + }, + "ordinal": { + "description": "[readonly] Indicates whether this uses first, second, third (etc.) PaySchedule for this PayPeriod.", + "format": "int32", + "type": "integer" + }, + "originalPayRunPaymentDate": { + "description": "[readonly] If this PayRun is a supplementary PayRun then this will be the date of the original PayRun's Payment Date", + "format": "date", + "nullable": true, + "type": "string" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "paymentDate": { + "description": "[readonly] The intended date that Employees will be paid, although this can be changed on a per PayRunEntry basis", + "format": "date", + "type": "string" + }, + "payslipScheduledDateTime": { + "description": "The scheduled date time for sending payslips by email.", + "format": "date", + "nullable": true, + "type": "string" + }, + "period": { + "description": "[readonly] The period (i.e, Tax Week or Tax Month) that this PayRun is for.", + "format": "int32", + "type": "integer" + }, + "previousVersionTotals": { + "$ref": "#/components/schemas/PayRunTotals" }, - "404": { - "description": "Not Found" - } - } - }, - "put": { - "tags": [ - "PayCode" - ], - "summary": "Update PayCode", - "description": "Updates the details of an existing PayCode.", - "operationId": "UpdatePayCodePayCode", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "startDate": { + "description": "[readonly] The start date of the period this PayRun covers", + "format": "date", + "type": "string" }, - { - "name": "code", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayCode" - } - } - } + "state": { + "$ref": "#/components/schemas/PayRunState" }, - "404": { - "description": "Not Found" - } - } - }, - "delete": { - "tags": [ - "PayCode" - ], - "summary": "Delete PayCode", - "description": "Deletes the specified PayCode.", - "operationId": "DeletePayCodePayCode", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "subContractorCount": { + "description": "[readonly] The number of CIS Subcontractors included in this PayRun", + "format": "int32", + "type": "integer" }, - { - "name": "code", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "taxMonth": { + "description": "[readonly] The Tax Month that the Payment Date falls in", + "format": "int32", + "type": "integer" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/paycodes/nominalcodes": { - "get": { - "tags": [ - "PayCode" - ], - "summary": "Get Nominal Code Mappings", - "description": "Returns the list of mappings of PayCodes to NominalCodes", - "operationId": "NominalCodeMappingsPayCode", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to get the mapping", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NominalCodeMapping" - } - } - } - } + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "totals": { + "$ref": "#/components/schemas/PayRunTotals" + }, + "version": { + "description": "[readonly] The version of this PayRun in case any supplementary pay runs have been created for the same period.", + "format": "int32", + "type": "integer" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "PayCode" - ], - "summary": "Updates Nominal Code Mappings", - "description": "Updates the list of mappings of PayCodes to NominalCodes", - "operationId": "UpdateNominalCodeMappingsPayCode", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NominalCodeMapping" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NominalCodeMapping" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NominalCodeMapping" - } - } + "PayRunChanges": { + "additionalProperties": false, + "properties": { + "payRunEntries": { + "description": "A list of PayRunEntries where the PayRunEntry itself has been modified and.or the related Employee record was changed", + "items": { + "$ref": "#/components/schemas/Item" }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NominalCodeMapping" - } - } - } + "nullable": true, + "type": "array" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NominalCodeMapping" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/paycodesets": { - "get": { - "tags": [ - "PayCodeSet" - ], - "summary": "List PayCodeSets", - "description": "Lists all PayCodeSets for an Employer.", - "operationId": "IndexPayCodeSet", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list PayCodeSets", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } + "type": "object" }, - "post": { - "tags": [ - "PayCodeSet" - ], - "summary": "Create PayCodeSet", - "description": "Creates a new PayCodeSet for the Employer.", - "operationId": "CreatePayCodeSet", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "PayRunCsvType": { + "enum": [ + "Summary", + "Lines", + "PayrollCodeAndNameOnly", + "ColumnCsvMapping" ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PayCodeSet" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayCodeSet" - } + "type": "string" + }, + "PayRunEntry": { + "additionalProperties": false, + "description": "A PayRun contains multiple PayRunEntries, one for each Employee that is being paid.\r\nThe value for ```PersonalDetails``` and ```EmploymentDetails``` is copied from the Employee record.\r\nSo to change them you should update the Employee, not the PayRunEntry.\r\nChanges made to the Employee are only reflected whilst the PayRun is still open.\r\nOnce you finalise and close the PayRun then a snapshot is taken of these values which is stored with the PayRunEntry for future reference.", + "properties": { + "aeNotEnroledWarning": { + "description": "[readonly] If true then this Employee needs to be on an Auto Enrolment pension but isn't yet.", + "type": "boolean" + }, + "bacsHashCode": { + "description": "[readonly] A Hash Code used for RTI BACS Hash Cross Reference", + "nullable": true, + "type": "string" + }, + "bacsSubReference": { + "description": "[readonly] A randomly generated string for use with the RTI Hash Cross Reference", + "nullable": true, + "type": "string" + }, + "differencePensionSummaries": { + "description": "[readonly] A summary of the details for the Pensions (if any) that the Employee is assigned to.", + "items": { + "$ref": "#/components/schemas/PensionSummary" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PayCodeSet" - } + "nullable": true, + "type": "array" + }, + "emailId": { + "description": "If the Payslip for this PayRunEntry has been emailed to the employee then the Id for an EmployerEmail will be provided here.\r\nif the value is all zeroes then the email is in the process of being created.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "employeeRolePayItems": { + "description": "[readonly] Automatically populated.\r\nArray of base hourly and daily rates for the employee roles", + "items": { + "$ref": "#/components/schemas/EmployeeRolePayItem" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PayCodeSet" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "nullable": true, + "type": "array" }, - "404": { - "description": "Not Found" + "employmentDetails": { + "$ref": "#/components/schemas/EmploymentDetails" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayCodeSet" - } - } - } - } - } - } - }, - "/employers/{employerId}/paycodesets/{id}": { - "get": { - "tags": [ - "PayCodeSet" - ], - "summary": "Get PayCodeSet", - "description": "Gets the PayCodeSet specified.", - "operationId": "GetPayCodeSet", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Pay Code Set belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "endDate": { + "description": "[readonly]", + "format": "date", + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "404": { - "description": "Not Found" + "forcedCisVatAmount": { + "description": "If this employee is a CIS Subcontractor registered for VAT, we'll automatically work out VAT at the set rate.\r\nIf you want to override this calculations then set this property to anything other than null.", + "format": "double", + "nullable": true, + "type": "number" }, - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayCodeSet" - } - } - } - } - } - }, - "put": { - "tags": [ - "PayCodeSet" - ], - "summary": "Update PayCodeSet", - "description": "Updates the details of an existing PayCodeSet.", - "operationId": "UpdatePayCodeSet", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "fps": { + "$ref": "#/components/schemas/Item" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PayCodeSet" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayCodeSet" - } + "hasAttachmentOrders": { + "description": "[readonly] Indicates that there are AttachmentOrders for this Employee in this entry", + "type": "boolean" + }, + "holidayAccrued": { + "description": "The amount of holiday days or hours accrued in the period.", + "format": "double", + "type": "number" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "isClosed": { + "description": "[readonly] Set to True if the PayRun is Finalised and changes can no longer be made to the PayRunEntries", + "readOnly": true, + "type": "boolean" + }, + "isLatestVersion": { + "description": "[readonly] Indicates whether this is the latest version of the PayRunEntry.", + "type": "boolean" + }, + "isNewStarter": { + "description": "Determines whether or not this Employee will be declared as a new starter on the resulting FPS", + "type": "boolean" + }, + "isRemoved": { + "description": "Has the entry been removed from the payrun", + "type": "boolean" + }, + "isRolledBack": { + "description": "[readonly] Set to True if the Pay Run Entry is currently rolled back", + "type": "boolean" + }, + "manualNi": { + "description": "If set to true then you must provide your own value for NationalInsuranceCalculation.\r\nYou'd normally leave this set to false and let us automatically calculate NI amounts.", + "type": "boolean" + }, + "nationalInsuranceCalculation": { + "$ref": "#/components/schemas/NationalInsuranceCalculation" + }, + "niLetterError": { + "$ref": "#/components/schemas/NiLetterError" + }, + "niSplit": { + "description": "If set to true Ni calculations are done for backdated pay for each pay period separately and then summed up", + "type": "boolean" + }, + "note": { + "description": "Any note that you'd like to appear on the payslip", + "maxLength": 500, + "nullable": true, + "type": "string" + }, + "ordinal": { + "description": "[readonly] Indicates whether this uses the first, second, third (etc) PaySchedule for this PayPeriod.", + "format": "int32", + "type": "integer" + }, + "originalPayRunEntryPaymentDate": { + "description": "[readonly] If this PayRunEntry is a supplementary PayRunEntry then this will be the date of the original PayRunEntry's Payment Date", + "format": "date", + "nullable": true, + "type": "string" + }, + "payOptions": { + "$ref": "#/components/schemas/PayOptions" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "payRunVersion": { + "description": "[readonly] The supplementary pay run version of this PayRunEntry.", + "format": "int32", + "type": "integer" + }, + "paymentAfterLeaving": { + "description": "[readonly] If this payment is for an employee that has left then this is set to true.", + "type": "boolean" + }, + "paymentDate": { + "description": "The date this payment was or will be made", + "format": "date", + "type": "string" + }, + "payrollCodeChanged": { + "description": "[readonly] Indicates whether or not the Payroll Code for this Employee has changed since the last FPS", + "readOnly": true, + "type": "boolean" + }, + "pensionSummaries": { + "description": "[readonly] A summary of the details for the Pensions (if any) that the Employee is assigned to.", + "items": { + "$ref": "#/components/schemas/PensionSummary" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PayCodeSet" - } + "nullable": true, + "type": "array" + }, + "pensionSummary": { + "$ref": "#/components/schemas/PensionSummary" + }, + "percentageOfWorkingDaysPaidAsNormal": { + "description": "[readonly] If the employee is paid a set amount per period (ie, not an hourly or daily rate) and there is any Leave that is either Not Paid or Statutory Pay then this value\r\nwill give the percentage of working days (based on the Working Pattern) that should be paid as normal.\r\nIf there is no Leave in the period or PayOptions.AutoAdjustForLeave is false, then this will be 1.", + "format": "double", + "type": "number" + }, + "period": { + "description": "[readonly] The Tax Week or Tax Month number this PayRunEntry relates to", + "format": "int32", + "type": "integer" + }, + "periodOverrides": { + "description": "Any calculated values for this period that should be overridden with a different value", + "items": { + "$ref": "#/components/schemas/ValueOverride" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PayCodeSet" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayCodeSet" - } - } - } + "nullable": true, + "type": "array" }, - "400": { - "description": "Bad Request" + "periodsCovered": { + "description": "[readonly] The amount of periods that the Pay Run Entry covers. This can be > 1 when back pay for previous periods is paid in the current period", + "format": "int32", + "type": "integer" }, - "404": { - "description": "Not Found" - } - } - }, - "delete": { - "tags": [ - "PayCodeSet" - ], - "summary": "Delete PayCodeSet", - "description": "Deletes the specified PayCodeSet.", - "operationId": "DeletePayCodeSet", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "personalDetails": { + "$ref": "#/components/schemas/PersonalDetails" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "previousVersionTotals": { + "$ref": "#/components/schemas/PayRunTotals" }, - "400": { - "description": "Bad Request" + "priorPayrollCode": { + "description": "[readonly] If the FPS needs to declare a change of PayId then this will contain the previous code\r\nIt's worked out automatically but can also be set from the Employees EmploymentDetails property.", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/payees": { - "get": { - "tags": [ - "Payee" - ], - "summary": "List Payees", - "description": "Lists all Payees for an Employer.", - "operationId": "IndexPayee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list Payees", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "Payee" - ], - "summary": "Create Payee", - "description": "Creates a new Payee for the Employer.", - "operationId": "CreatePayee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Payee" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Payee" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Payee" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Payee" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "recievingOffsetPay": { + "description": "If the pay is being topped up due to an applied Leave having the offset value set to true then\r\nthis will be set to true", + "type": "boolean" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Payee" - } - } - } + "startDate": { + "description": "[readonly]", + "format": "date", + "type": "string" }, - "404": { - "description": "Employer Not Found" - } - } - } - }, - "/employers/{employerId}/payees/{id}": { - "get": { - "tags": [ - "Payee" - ], - "summary": "Get Payee", - "description": "Gets the Payee specified.", - "operationId": "GetPayee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Payee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "state": { + "$ref": "#/components/schemas/PayRunState" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Payee" - } - } - } - } - } - }, - "put": { - "tags": [ - "Payee" - ], - "summary": "Update Payee", - "description": "Updates a Payee for the Employer.", - "operationId": "UpdatePayee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "taxMonth": { + "description": "[readonly] The Tax Month that the Payment Date falls in", + "format": "int32", + "type": "integer" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Payee" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Payee" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Payee" - } + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "teachersPensionAgeWarning": { + "$ref": "#/components/schemas/TeachersPensionAgeWarning" + }, + "totals": { + "$ref": "#/components/schemas/PayRunTotals" + }, + "totalsYtd": { + "$ref": "#/components/schemas/PayRunTotals" + }, + "totalsYtdOverrides": { + "description": "Any values of TotalsYtd that should be overridden with a different value", + "items": { + "$ref": "#/components/schemas/ValueOverride" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Payee" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Payee" - } - } - } + "nullable": true, + "type": "array" }, - "404": { - "description": "Employer Not Found" + "umbrellaPayment": { + "$ref": "#/components/schemas/UmbrellaPayment" + }, + "unpaidAbsence": { + "description": "[readonly] Indicates that there was unpaid absence in the pay period", + "type": "boolean" + }, + "warnings": { + "$ref": "#/components/schemas/PayRunEntryWarningType" + }, + "workingDaysNotPaidAsNormal": { + "description": "[readonly] If PercentageOfWorkingDaysPaidAsNormal has a value other than 1\r\nthen this property will tell you how many working days have been deducted from the basic pay\r\ndue to either being Not Paid or Statutory Pay", + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "Payee" - ], - "summary": "Delete Payee", - "description": "Deletes the specified Payee.", - "operationId": "DeletePayee", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PayRunEntryNavigation": { + "additionalProperties": false, + "properties": { + "currentId": { + "format": "uuid", + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "currentIndex": { + "format": "int32", + "type": "integer" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}": { - "get": { - "tags": [ - "PayRun" - ], - "summary": "List PayRuns", - "operationId": "GetPayRunsPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "departmentFilterSelected": { + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "entryCount": { + "format": "int32", + "type": "integer" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "firstId": { + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "PayRun" - ], - "summary": "Starts the next PayRun", - "description": "Starts the next PayRun and returns a 201 if successful", - "operationId": "CreateNextPayRunPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "lastId": { + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "nextId": { + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "payRunEntrySortBy": { + "$ref": "#/components/schemas/PayRunEntrySortBy" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "201": { - "description": "Success - the PayRun has been created.\r\nThe unique URL for this PayRun is returned in the Location header.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRun" - } - } - } + "previousId": { + "format": "uuid", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "rolledBackOnly": { + "type": "boolean" + }, + "searchTerm": { + "nullable": true, + "type": "string" + }, + "sortDescending": { + "type": "boolean" + }, + "startersLeaversFilterSelected": { + "$ref": "#/components/schemas/StartersLeaversFilter" + }, + "zeroPaidFilterSelected": { + "$ref": "#/components/schemas/ZeroPaidFilter" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "PayRun" + "PayRunEntrySortBy": { + "enum": [ + "PayrollCode", + "FirstName", + "LastName", + "TotalCost", + "NetPay", + "GrossPay", + "TakeHomePay", + "Paye", + "EmployeeNic", + "EmployerNic", + "PaymentDate" ], - "summary": "Starts the next PayRun (deprecated)", - "description": "This PUT will be removed in Jan 2022. You should instead use a POST to this URL", - "operationId": "StartNextPayRunPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PayRunEntryWarningType": { + "enum": [ + "MissingBankDetails", + "MissingAddressLines", + "AddressInvalid", + "NinoInvalid", + "BelowNationalMinimumWage", + "HighGrossPay", + "HighNetPay", + "InReceiptOfTaxRefund", + "NetToGrossDiscrepancyAboveThreshold", + "StatutoryMaternity", + "TeachersPensionNotAutoCalculated", + "JointTeachersPensionsNotAutoCalculated", + "MissingNiNumber", + "OpenEndedAbsences", + "SspHasExpired", + "SspDueToExpire", + "InvalidBankDetails", + "DuplicateEmployee", + "TeachersPensionAge", + "TeachersPensionMcrRoleIdMissing" + ], + "type": "string" + }, + "PayRunJournal": { + "additionalProperties": false, + "properties": { + "csvFormat": { + "$ref": "#/components/schemas/JournalCsvFormat" + }, + "date": { + "description": "[readonly] The PaymentDate from the PayRun", + "format": "date", + "type": "string" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/PayRunSummaryLine" + }, + "nullable": true, + "type": "array" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "link": { + "description": "[readonly] If available, a link to the journal in the ExternalDataProvider", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "mergeMatchingNominals": { + "description": "[readonly]", + "type": "boolean" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "201": { - "description": "Success - the PayRun has been created.\r\nThe unique URL for this PayRun is returned in the Location header." - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}": { - "get": { - "tags": [ - "PayRun" - ], - "summary": "Get a PayRun", - "operationId": "GetPayRunPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "ordinal": { + "description": "[readonly]", + "format": "int32", + "type": "integer" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "period": { + "description": "[readonly]", + "format": "int32", + "type": "integer" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "status": { + "$ref": "#/components/schemas/BackgroundTaskStatus" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "statusMessage": { + "description": "[readonly] A message to elaborate on the Status", + "nullable": true, + "type": "string" }, - { - "name": "pageNum", - "in": "query", - "description": "Zero-based page number, used in conjunction with pageSize", - "schema": { - "type": "integer", - "format": "int32" - } + "taxYear": { + "$ref": "#/components/schemas/TaxYear" }, - { - "name": "pageSize", - "in": "query", - "description": "The number of items per page", - "schema": { - "type": "integer", - "format": "int32" - } + "title": { + "description": "[readonly] The status of the task for posting this journal to an ExternalDataProvider", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "PayRunPayment": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "[readonly] The amount to pay", + "format": "double", + "type": "number" }, - { - "name": "searchTerm", - "in": "query", - "description": "The option to filter on a search term", - "schema": { - "type": "string" - } + "bacsHash": { + "description": "[readonly] if paying by Credit and you've enabled BacsHash then this will contain the BacsHash included on the FPS", + "nullable": true, + "type": "string" }, - { - "name": "zeroPaid", - "in": "query", - "description": "The option to filter pay run entries by negative paid, zero paid and non-zero paid", - "schema": { - "$ref": "#/components/schemas/ZeroPaidFilter" - } + "bacsSubReference": { + "description": "[readonly] if paying by Credit and you've enabled BacsHash then this will contain the BacsSubReference included on the FPS", + "nullable": true, + "type": "string" }, - { - "name": "departmentCode", - "in": "query", - "description": "The option to filter on department code", - "schema": { - "type": "string" - } + "bankDetails": { + "$ref": "#/components/schemas/BankDetails" }, - { - "name": "startersLeavers", - "in": "query", - "description": "The option to filter on whether the employee is a starter or leaver", - "schema": { - "$ref": "#/components/schemas/StartersLeaversFilter" - } + "date": { + "description": "[readonly] The date the payment is to be made", + "format": "date", + "type": "string" }, - { - "name": "sortBy", - "in": "query", - "description": "The option to sort by a certain field. Default is Payroll Code", - "schema": { - "$ref": "#/components/schemas/PayRunEntrySortBy" - } + "employerPaymentReference": { + "description": "The employer's payment reference, formatted as per the employer settings", + "nullable": true, + "type": "string" }, - { - "name": "sortDescending", - "in": "query", - "description": "Whether to sort in ascending or descending order", - "schema": { - "type": "boolean", - "default": false - } + "isBankDetailValid": { + "description": "[readonly] for checking if bank details are valid", + "type": "boolean" }, - { - "name": "rolledBackOnly", - "in": "query", - "description": "If set to true, returns rolled back pay run entries. If false, returns all entries.", - "schema": { - "type": "boolean", - "default": false - } + "method": { + "$ref": "#/components/schemas/PayMethod" + }, + "payee": { + "$ref": "#/components/schemas/Item" + }, + "reference": { + "description": "[readonly] The period the payment is for", + "nullable": true, + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/PayeeType" } + }, + "type": "object" + }, + "PayRunState": { + "enum": [ + "Opening", + "Open", + "ReOpening", + "RollingBack", + "RolledBack", + "SubmittedForProcessing", + "Processing", + "AwaitingApproval", + "Approved", + "Finalising", + "Finalised", + "Deleting" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRun" - } - } - } + "type": "string" + }, + "PayRunStateChange": { + "additionalProperties": false, + "properties": { + "employeeUniqueIds": { + "description": "List of employee unique ids, whose PayRunEntries to be re-opened during a Payrun rollback operation.\r\nWill be used only during a transition to a rolled back pay run state", + "items": { + "format": "uuid", + "type": "string" + }, + "nullable": true, + "type": "array" }, - "400": { - "description": "Bad Request" + "reason": { + "$ref": "#/components/schemas/PayRunStateChangeReason" + }, + "reasonText": { + "description": "A free-form text field for a reason for the change of state.", + "maxLength": 300, + "nullable": true, + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/PayRunState" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "PayRun" + "PayRunStateChangeReason": { + "enum": [ + "Other", + "AdditionalDataNotSubmitted", + "ChangeToOriginalData", + "PayBureauError" ], - "summary": "Delete a PayRun", - "operationId": "DeletePayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PayRunSummaryLine": { + "additionalProperties": false, + "description": "An array of this model is used to represent a summary of a PayRun.\r\nThis would typically be used for creating accounting entries for the PayRun.", + "properties": { + "analysisCategories": { + "description": "[readonly] If the journal is split by analysis categories", + "items": { + "$ref": "#/components/schemas/AnalysisCategory" + }, + "nullable": true, + "type": "array" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "analysisCategoryCodes": { + "description": "[readonly] If the journal is split by analysis categories then the relevant analysis categories code is shown here.", + "items": { + "$ref": "#/components/schemas/AnalysisCategoryCode" + }, + "nullable": true, + "type": "array" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "costCentreCode": { + "description": "[readonly] If the journal is split by cost centre then the relevant cost centre code is shown here.", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "departmentCode": { + "description": "[readonly] If the journal is split by department then the relevant department code is shown here.", + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "204": { - "description": "No Content" + "description": { + "description": "[readonly] A description of what this line summarises.", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - }, - "put": { - "tags": [ - "PayRun" - ], - "summary": "Update PayRun", - "description": "Updates a PayRun to the state provided along with the reason (optional) for the change.", - "operationId": "UpdatePayRunPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employee": { + "$ref": "#/components/schemas/Employee" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "employeeUniqueId": { + "description": "[readonly] The EmployeeId this summary line relates to.", + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "journalNarrative": { + "description": "[readonly] Gets the journal narrative for the pension, if defined.", + "nullable": true, + "type": "string" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "nominalCode": { + "description": "[readonly] If you've set up NominalCodeMapping then the relevant Nominal code for the PayCode will be shown here.", + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "nominalName": { + "description": "[readonly] As above", + "nullable": true, + "type": "string" }, - { - "name": "sendPayslipEmails", - "in": "query", - "description": "Only relevant if setting the State to Finalised. Set to true if you want to have payslips emailed to employees.", - "schema": { - "type": "boolean", - "default": false - } + "payCode": { + "$ref": "#/components/schemas/PayCode" }, - { - "name": "payslipReleaseType", - "in": "query", - "schema": { - "$ref": "#/components/schemas/PayslipReleaseType" - } + "pensionId": { + "description": "[readonly] The PensionId of the pension associated with this summary line, only present for pension summary lines.", + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "payslipScheduledDateTime", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "qty": { + "description": "[readonly] If the PayCode is a Multiplier code then this will contain the number of days/hours", + "format": "double", + "nullable": true, + "type": "number" + }, + "unMappedNominalCode": { + "description": "[readonly] Unmapped Nominal Code is the Nominal Code without the Nominal Mapping.", + "nullable": true, + "type": "string" + }, + "value": { + "description": "[readonly] The total value for this line.", + "format": "double", + "type": "number" } - ], - "requestBody": { - "description": "Specify the PayRun state you want to change to and the reason for the change.\r\nOnly Open and Finalised states are available at the moment.\r\nOther states are used with Bureau functionality which isn't currently generally available.", + }, + "type": "object" + }, + "PayRunSummaryLineIEnumerableReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PayRunStateChange" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRunStateChange" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PayRunStateChange" - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "description": "[readonly] If the type is application.json then this will contain a JSON representation of the relevant model", + "items": { + "$ref": "#/components/schemas/PayRunSummaryLine" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PayRunStateChange" - } - } + "nullable": true, + "type": "array" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success - the PayRun has been updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRun" - } - } - } + "type": "object" + }, + "PayRunTotals": { + "additionalProperties": false, + "description": "Used to represent totals for a PayRun or PayRunEntry.\r\nIf a value is 0 then it will not be shown in the JSON.", + "properties": { + "additions": { + "description": "The value of all additions. This minus Deductions should equal TakeHomePay", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "adjustments": { + "description": "[readonly] The value of adjustments made to the Net Pay (Non taxable/NIable additions/deductions)", + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/warnings": { - "get": { - "tags": [ - "PayRun" - ], - "summary": "Get PayRun Warnings", - "description": "Returns a list of Item detailing any Warnings for PayRunEntries on the specified PayRun", - "operationId": "GetPayRunWarningsPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "appLevyDeduction": { + "description": "[readonly] Value of any Apprenticeship Levy fee deducted for processing the umbrella payment", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "attachmentOrderDeductions": { + "description": "[readonly] Value of deductions made due to AttachmentOrders", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "basicPay": { + "description": "[readonly] The amount to be paid to this Employee as a result of the PayOptions that have been set", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "cisDeduction": { + "description": "[readonly] Value of any CIS Deduction made", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "cisUmbrellaFee": { + "description": "[readonly] Value of any pre-tax fee charged to the CIS Subcontractor for processing the payment", + "format": "double", + "type": "number" }, - { - "name": "pageNum", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "cisUmbrellaFeePostTax": { + "description": "[readonly] Value of any post-tax fee charged to the CIS Subcontractor for processing the payment", + "format": "double", + "type": "number" }, - { - "name": "pageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/events": { - "get": { - "tags": [ - "PayRun" - ], - "summary": "Get PayPeriodEvents", - "operationId": "GetPayRunEventsPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "cisVat": { + "description": "[readonly] Value of any VAT paid to CIS Subcontractor", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "dednsFromNetPay": { + "description": "[readonly] The value of any deductions being made to the Net Pay for this Employee", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "deductions": { + "description": "The value of all deductions. Additions minus This value should equal TakeHomePay", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "empeePenContribnsNotPaid": { + "description": "[readonly] Value of employee pension contributions that are not paid under 'net pay arrangements', including any AVC", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaySchedulePeriodEvent" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/ytd": { - "put": { - "tags": [ - "PayRun" - ], - "summary": "Update YTD", - "description": "Upload a CSV to override the YTD values on a Pay Run.\r\nThe CSV should have the same headings as the YTD report", - "operationId": "YtdPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "empeePenContribnsPaid": { + "description": "[readonly] Value of employee pension contributions paid under 'net pay arrangements', including any AVC", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "employeeNi": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "employeeNiNonRti": { + "description": "[readonly] Employee NI excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "employeePensionContribution": { + "description": "[readonly] The value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeYtdValues" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/leave": { - "get": { - "tags": [ - "PayRun" - ], - "summary": "List Leave related to a PayRun", - "description": "Returns a List of Items representing any Leave within the PayRun date range for Employees that are included in the given PayRun.\r\nNote that if Leave was added after the PayRun was closed, but the Leave is within the PayRun period then it'll be returned here even though it wouldn't have been processed with the PayRun.", - "operationId": "LeavePayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employeePensionContributionAvc": { + "description": "[readonly] The value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "employerNi": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "employerNiNonRti": { + "description": "[readonly] Employer NI excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "employerNiOffPayroll": { + "description": "[readonly] The amount included in EmployerNi that is in relation to Off-Payroll Workers", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/aeo": { - "get": { - "tags": [ - "PayRun" - ], - "summary": "List AttachmentOrders related to a PayRun", - "description": "Returns a List of Items representing any AttachmentOrders within the PayRun date range for Employees that are included in the given PayRun.", - "operationId": "AeoPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employerPensionContribution": { + "description": "[readonly] The value of the Pension Contribution being made by the Employer for this Employee", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "flexiDd_Death": { + "description": "[readonly] Value of payments marked as flexibly accessing death benefit (taxable)", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "flexiDd_Death_NonTax": { + "description": "[readonly] Value of payments marked as flexibly accessing death benefit (non taxable)", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "flexiDd_Pension": { + "description": "[readonly] Value of payments marked as flexibly accessing pension (taxable)", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/changes": { - "get": { - "tags": [ - "PayRun" - ], - "summary": "List PayRun Changes", - "description": "Returns a of changes made to a payrun since it was created.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "ChangesPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "flexiDd_PensionCommencementExcess": { + "description": "[readonly] Value of payments marked as flexibly accessing pension commencement excess lump sum (taxable)", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "flexiDd_PensionCommencementExcess_NonTax": { + "description": "[readonly] Value of payments marked as flexibly accessing pension commencement excess lump sum (non taxable)", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "flexiDd_Pension_NonTax": { + "description": "[readonly] Value of payments marked as flexibly accessing pension (non taxable)", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "flexiDd_SeriousIllHealth": { + "description": "[readonly] Value of payments marked as flexibly accessing serious ill health lump sum (taxable)", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRunChanges" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/{id}/changes": { - "get": { - "tags": [ - "PayRun" - ], - "summary": "List PayRun Changes for PayRunEntry", - "description": "Returns a list of AuditEntry reflecting changes made to a PayRunEntry and related employee record for a given PayRun\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "ChangesForPayRunEntryPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "flexiDd_SeriousIllHealth_NonTax": { + "description": "[readonly] Value of payments marked as flexibly accessing serious ill health lump sum (non taxable)", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "flexiDd_StandAloneLumpSum": { + "description": "[readonly] Value of payments marked as flexibly accessing stand alone lump sum (taxable)", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "flexiDd_StandAloneLumpSum_NonTax": { + "description": "[readonly] Value of payments marked as flexibly accessing stand alone lump sum (non taxable)", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "foreignTaxAmount": { + "description": "[readonly] The amount paid for Foreign Tax Credits in this period", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "foreignTaxAmountReclaimed": { + "description": "[readonly] The amount of Foreign Tax Credits that you actually reclaimed", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "gross": { + "description": "[readonly] Gross pay", + "format": "double", + "type": "number" + }, + "grossForNi": { + "description": "[readonly] The amount of the Gross that is subject to NI", + "format": "double", + "type": "number" + }, + "grossForNiNonRti": { + "description": "[readonly] The amount of the Gross that is subject to NI but excluded from RTI", + "format": "double", + "type": "number" + }, + "grossForTax": { + "description": "[readonly] The amount of the Gross that is subject to PAYE", + "format": "double", + "type": "number" + }, + "grossNotSubjectToEmployersNi": { + "description": "[readonly] The amount of the Gross that is not subject to Employers NI.\r\nThis is the same as GrossForNI where the employees NI Table has an Er contribution", + "format": "double", + "type": "number" + }, + "grossNotSubjectToEmployersNiNonRti": { + "description": "[readonly] The amount of the Gross that is not subject to Employers NI.\r\nThis is the same as GrossForNI where the employees NI Table has an Er contribution\r\nThis is the amount that is excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "significantChangesOnly", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChangeSummary" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/journal": { - "get": { - "tags": [ - "PayRun" - ], - "summary": "Get Journal for PayRun", - "description": "Returns values that can be used to create accounting entries for this PayRun.", - "operationId": "GetPayRunJournalPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "itemsSubjectToClass1NIC": { + "description": "[readonly] Items subject to Class 1 NIC but not taxed under PAYE regulations excluding pension contributions", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "leavers": { + "description": "[readonly] The number of Leavers on ths PayRun", + "format": "int32", + "type": "integer" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "mapsMiles": { + "description": "[readonly] The number of miles paid for Mileage Allowance Payments", + "format": "int32", + "type": "integer" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "netPay": { + "description": "[readonly] The Net Pay for this Employee", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "newEmployeesInCurrentSupplementaryPayRun": { + "description": "[readonly] The number of new Employees included in the current supplementary PayRun", + "format": "int32", + "type": "integer" }, - { - "name": "deptBreakdown", - "in": "query", - "description": "Set to true and the journal will be split between any relevant Departments", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRunJournal" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/finalise": { - "post": { - "tags": [ - "PayRun" - ], - "summary": "Finalise a PayRun (deprecated)", - "description": "This endpoint is now deprecated and will be removed in Jan 2022.\r\nYou should instead use the Update method and set the State to Finalised.\r\n \r\nReturns True if the resulting FPS has been automatically submitted due to the Employers RTISubmissionSettings, otherwise returns false.\r\nYou can suppress the emailing of payslips to employees by adding a key named dontEmailEmployeePayslips with a value of true to the body. See the related guides for more information.", - "operationId": "FinalisePayRunPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "nilPaid": { + "description": "[readonly] The number of employees with NilPaid on the PayRun", + "format": "int32", + "type": "integer" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "nonTaxOrNICPmt": { + "description": "[readonly] The value of any payments being made to this Employee that aren't being subjected to PAYE or NI", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "nonTierablePay": { + "description": "[readonly] The value of any pay that shouldn't count towards determining a pension tier.", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "notionalPay": { + "description": "[readonly] The value of adjustments that are of type notional.", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - }, - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - }, - "text/json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - }, - "application/*+json": { - "schema": { - "type": "object", - "additionalProperties": { } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/reopen": { - "post": { - "tags": [ - "PayRun" - ], - "summary": "Re-open a PayRun (deprecated)", - "description": "This endpoint is now deprecated and will be removed in Jan 2022.\r\nYou should instead use the Update method and set the State to Open.\r\n \r\nRe-opens a PayRun so that it can be edited.\r\nOnly the most recent PayRun can be re-opened, and only if the Employer is still in the same TaxYear as the PayRun and there are no open PayRuns.", - "operationId": "ReOpenPayRunPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "p45Gross": { + "description": "[readonly] The value P45 Gross which is held on the Employees Opening Balance", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "p45Tax": { + "description": "[readonly] The value of P45 Tax which is held on the Employees Opening Balance", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "paymentAfterLeaving": { + "description": "[readonly] Payment After Leaving", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "pbik": { + "description": "[readonly] Value of any Payrolled Benefits In Kind", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRun" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/email": { - "post": { - "tags": [ - "PayRun" - ], - "summary": "(Re)send Payslip Emails", - "description": "Payslips are usually emailed automatically when a PayRun is finalised. But if you suppressed them or need to re-send them then you can do so with this API call.\r\nProviding a pay run entry id will send a single email, otherwise all emails will be sent.", - "operationId": "SendPayslipEmailsPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The ID of the employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionableEarnings": { + "description": "[readonly] The amount of the Gross that is subject to Pension Deductions.\r\nIf the Pension Scheme uses Qualifying Earnings (upper and lower limits) then this value is before those are applied", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "description": "The pay period of the pay run.", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "pensionablePay": { + "description": "[readonly] The amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup.", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "description": "The period number of the pay run.", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "postgradLoanRecovered": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "description": "The tax year of the pay run.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "postgradLoanRecoveredNonRti": { + "description": "[readonly] Postgrad Loan recovered excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "description": "The ordinal number of the pay run.", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "realTimeClass1ANi": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "query", - "description": "The UniqueId of the pay run entry (optional).", - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/p45/email": { - "get": { - "tags": [ - "PayRun" - ], - "summary": "(Re)send P45 Emails", - "operationId": "EmailMultipleP45sPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "realTimeClass1ANiNonRti": { + "description": "[readonly] Real Time Class 1A NI excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "recoverableAmounts": { + "$ref": "#/components/schemas/RecoverableAmounts" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "sap": { + "description": "[readonly] Statutory Adoption Pay", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "sapNonRti": { + "description": "[readonly] Statutory Adoption Pay excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/paycodes": { - "get": { - "tags": [ - "PayRun" - ], - "summary": "Get PayCodes for a PayRun", - "operationId": "GetPayRunPayCodesPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "shpp": { + "description": "[readonly] Statutory Shared Parental Pay", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "shppNonRti": { + "description": "[readonly] Statutory Shared Parental Pay excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "smp": { + "description": "[readonly] Statutory Maternity Pay", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "smpNonRti": { + "description": "[readonly] Statutory Maternity Pay excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayCode" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/{id}": { - "get": { - "tags": [ - "PayRun" - ], - "summary": "Get a PayRunEntry", - "operationId": "GetPayRunEntryPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "sncp": { + "description": "[readonly] Statutory Neonatal Care Pay", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "sncpNonRti": { + "description": "[readonly] Statutory Neonatal Care Pay excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "spbp": { + "description": "[readonly] Statutory Parental Bereavement Pay", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "spbpNonRti": { + "description": "[readonly] Statutory Parental Bereavement Pay excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "spp": { + "description": "[readonly] Statutory Paternity Pay", + "format": "double", + "type": "number" + }, + "sppNonRti": { + "description": "[readonly] Statutory Paternity Pay excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRunEntry" - } - } - } - } - } - }, - "post": { - "tags": [ - "PayRun" - ], - "summary": "Update a PayRunEntry", - "operationId": "UpdatePayRunEntryPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "ssp": { + "description": "[readonly] Statutory Sick Pay", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "sspNonRti": { + "description": "[readonly] Statutory Sick Pay excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "starters": { + "description": "[readonly] The number of Starters on this PayRun", + "format": "int32", + "type": "integer" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "studentLoanRecovered": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "studentLoanRecoveredNonRti": { + "description": "[readonly] Student Loan recovered excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "takeHomePay": { + "description": "[readonly] The amount this Employee takes home", + "format": "double", + "type": "number" }, - { - "name": "forceSyncEmployeePayOptions", - "in": "query", - "description": "If set to true then changes made to employee pay options will be reflected into the pay run entry. Defaults to false.", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PayRunEntry" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRunEntry" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PayRunEntry" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PayRunEntry" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRunEntry" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/{id}/umbrella": { - "post": { - "tags": [ - "PayRun" - ], - "summary": "PayRunEntry Umbrella Payment", - "description": "Automatically sets the values on the PayRunEntry based on an UmbrellaPayment.\r\nUsing this method overwrites any existing values for the PayRunEntry.", - "operationId": "PayRunEntryUmbrellaPaymentPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "tax": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "taxNonRti": { + "description": "[readonly] Tax excluded from RTI", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "taxOnPaymentAfterLeaving": { + "description": "[readonly] Tax On Payment After Leaving", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "tcp_Op": { + "description": "[readonly] Value of payments marked as Trivial Commutation Payment (C - Occupational Pension)", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "tcp_Pp": { + "description": "[readonly] Value of payments marked as Trivial Commutation Payment (B - Personal Pension)", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/UmbrellaPayment" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/UmbrellaPayment" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UmbrellaPayment" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UmbrellaPayment" - } - } + "tcp_Tcls": { + "description": "[readonly] Value of payments marked as Trivial Commutation Payment (A - TCLS)", + "format": "double", + "type": "number" + }, + "totalCost": { + "format": "double", + "readOnly": true, + "type": "number" + }, + "umbrellaFee": { + "description": "[readonly] Value of any Umbrella fee charged for processing the payment", + "format": "double", + "type": "number" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRunEntry" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{payPeriod}/importpay": { - "post": { - "tags": [ - "PayRun" - ], - "summary": "Import Pay", - "description": "Takes a list PayOptionsImport and updates the currently open payrun to use the amounts given.\r\nYou must have an open payrun for the PayPeriod specified and all payroll codes submitted must match an employee on the payrun.\r\nAny lines imported for a PayRunEntry will replace existing lines for that PayRunEntry.", - "operationId": "ImportPayPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "PaySchedule": { + "additionalProperties": false, + "properties": { + "currentPayRun": { + "$ref": "#/components/schemas/Item" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "employeeCount": { + "description": "[readonly] The number of employees paid with this PaySchedule", + "format": "int32", + "type": "integer" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "employerName": { + "description": "Employer name for this PaySchedule", + "nullable": true, + "type": "string" }, - { - "name": "linesOnly", - "in": "query", - "description": "If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false.", - "schema": { - "type": "boolean", - "default": false - } + "employerUniqueId": { + "description": "Employer Unique Id for this PaySchedule", + "format": "uuid", + "type": "string" }, - { - "name": "append", - "in": "query", - "description": "If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false.", - "schema": { - "type": "boolean", - "default": false - } + "firstPaymentDate": { + "description": "The first payment date", + "format": "date", + "type": "string" }, - { - "name": "updateExisting", - "in": "query", - "description": "If set to true then any submitted lines that match the pay code of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines.", - "schema": { - "type": "boolean", - "default": false - } + "firstPeriodEndDate": { + "description": "The last day of the first pay period", + "format": "date", + "type": "string" }, - { - "name": "validateOnly", - "in": "query", - "description": "If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported.", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayOptionsImport" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayOptionsImport" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayOptionsImport" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayOptionsImport" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success" + "hasOpenPayRunPeriod": { + "description": "[readonly] Will be true if the employer currently has an open PayRun for this PayPeriod", + "type": "boolean" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/payrun/{payPeriod}/importumbrellapay": { - "post": { - "tags": [ - "PayRun" - ], - "summary": "Import Umbrella Pay", - "description": "Takes a list UmbrellaPayment and updates the currently open payrun to use the amounts given.\r\nYou must have an open payrun for the PayPeriod specified and all payroll codes submitted must match an employee on the payrun.\r\nYou should have also set the UmbrellaSettings for the Employer", - "operationId": "ImportUmbrellaPayPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "highGrossPay": { + "description": "A gross pay amount considered high for this PaySchedule", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "highNetPay": { + "description": "A net pay amount considered high for this PaySchedule", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UmbrellaPayment" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UmbrellaPayment" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UmbrellaPayment" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UmbrellaPayment" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRun" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{payPeriod}/importtimeandattendance": { - "post": { - "tags": [ - "PayRun" - ], - "summary": "Import Time And Attendance", - "description": "If the employer is connected to an ExternalDataProvider that provides Time and Attendance data then this API\r\ncall will update the currently open payrun for the PayPeriod specified with data from the specified provider.\r\nReturns a list of PayOptionsImport to show what's been imported.", - "operationId": "ImportTimeAndAttendancePayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isConfigured": { + "description": "[readonly] Whether or not this PaySchedule has been configured and is ready for use", + "type": "boolean" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "isRequired": { + "description": "[readonly] Whether or not this PaySchedule is required for the employer, ie: they have employees to be paid on this PaySchedule", + "readOnly": true, + "type": "boolean" }, - { - "name": "providerId", - "in": "query", - "schema": { - "$ref": "#/components/schemas/ExternalDataProviderId" - } + "isYearCompleted": { + "description": "[readonly] Returns true if all PayRuns for this PaySchedule in the TaxYear have been completed", + "type": "boolean" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayOptionsImport" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/paymentdate": { - "post": { - "tags": [ - "PayRun" - ], - "summary": "Set PaymentDate", - "description": "Sets the PaymentDate for a PayRun.\r\nIf the date given is outside of the TaxPeriod that the payrun is for then only the payment date for the individual\r\nPayRunEntries is updated, the PayRun will retain it's current PaymentDate", - "operationId": "UpdatePaymentDatePayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "lastPeriodEndDate": { + "description": "[readonly] The end date of the most recent PayRun on this schedule", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "lastPeriodNumber": { + "description": "[readonly] The period number of the most recent PayRun on this schedule", + "format": "int32", + "nullable": true, + "type": "integer" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "name": { + "description": "A descriptive name for this PaySchedule", + "maxLength": 100, + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "nextPayRun": { + "$ref": "#/components/schemas/PayRun" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "string", - "format": "date-time" - } + "ordinal": { + "description": "[readonly] Indicates whether this is first, second, third (etc) PaySchedule for this PayPeriod.", + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "payRuns": { + "description": "[readonly] Details of PayRuns for this PaySchedule", + "items": { + "$ref": "#/components/schemas/Item" }, - "application/json": { - "schema": { - "type": "string", - "format": "date-time" + "nullable": true, + "type": "array" + }, + "paymentDateType": { + "$ref": "#/components/schemas/PaymentDateType" + }, + "periodEndDateType": { + "$ref": "#/components/schemas/PaymentDateType" + }, + "periodEventsConfig": { + "additionalProperties": false, + "description": "Only applicable if Bureau functionality is enabled. Defines the number of days each event occurs before the Payment Date.", + "nullable": true, + "properties": { + "Approval": { + "format": "int32", + "type": "integer" + }, + "Finalise": { + "format": "int32", + "type": "integer" + }, + "SendForApproval": { + "format": "int32", + "type": "integer" + }, + "SendPaySlip": { + "format": "int32", + "type": "integer" + }, + "SubmitForProcessing": { + "format": "int32", + "type": "integer" + }, + "SubmitRti": { + "format": "int32", + "type": "integer" } }, - "text/json": { - "schema": { - "type": "string", - "format": "date-time" - } + "type": "object" + }, + "periodLengths": { + "description": "Only applicable for PayPeriod of Custom. Defines the length of each period", + "items": { + "format": "int32", + "type": "integer" }, - "application/*+json": { - "schema": { - "type": "string", - "format": "date-time" - } - } + "nullable": true, + "type": "array" + }, + "publicCreatedDate": { + "format": "date", + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "yearEndTasks": { + "description": "[readonly] A list of actions that need to be completed for this PaySchedule before this TaxYear can be finalised", + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRun" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/zeroise": { - "post": { - "tags": [ - "PayRun" - ], - "summary": "Zeroise PayRunEntries", - "description": "Zeroises the payrun entries specified in the ids property", - "operationId": "ZeroisePayRunEntriesPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "PaySchedulePeriod": { + "additionalProperties": false, + "properties": { + "endDate": { + "description": "[readonly] The end date of the PaySchedulePeriod", + "format": "date", + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "paySchedulePeriodEvents": { + "description": "[readonly] List of all the events in this PaySchedulePeriod", + "items": { + "$ref": "#/components/schemas/PaySchedulePeriodEvent" + }, + "nullable": true, + "type": "array" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "paymentDate": { + "description": "The payment date of the PaySchedulePeriod.", + "format": "date", + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } + "period": { + "description": "[readonly] The Period number of the PaySchedulePeriod.", + "format": "int32", + "type": "integer" + }, + "startDate": { + "description": "[readonly] The start date of the PaySchedulePeriod", + "format": "date", + "type": "string" + }, + "unadjustedPaymentDate": { + "description": "The payment date of the PaySchedulePeriod when not accounting for weekends, bank hols or ad-hoc alterations to the pay schedule", + "format": "date", + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRun" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/removepayrunentries": { - "post": { - "tags": [ - "PayRun" - ], - "summary": "Remove PayRunEntries (deprecated)", - "description": "Removes the payrun entries specified in the ids property", - "operationId": "RemovePayRunEntriesPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "PaySchedulePeriodEvent": { + "additionalProperties": false, + "description": "An Event within a PaySchedulePeriod. The event could be scheduled x days before PaymentDate.", + "properties": { + "actualEventDate": { + "description": "The actual date and time when the event was completed.", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "eventDate": { + "description": "The expected date and time of the event.", + "format": "date", + "type": "string" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "isOverDue": { + "description": "Returns true if its past the event date.", + "readOnly": true, + "type": "boolean" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "payPeriodEventType": { + "$ref": "#/components/schemas/PayPeriodEventType" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } + }, + "type": "object" + }, + "PaySpineReport": { + "additionalProperties": false, + "properties": { + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/PaySpineReportLine" }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } + "nullable": true, + "type": "array" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRun" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/addpayrunentries": { - "post": { - "tags": [ - "PayRun" - ], - "summary": "Add PayRunEntries (deprecated)", - "description": "Adds the payrun entries specified in the ids property", - "operationId": "AddPayRunEntriesPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "PaySpineReportLine": { + "additionalProperties": false, + "properties": { + "annualDecimals": { + "description": "Number of decimal places to calculate Annual Salaries", + "format": "int32", + "type": "integer" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "annualRoundingRule": { + "$ref": "#/components/schemas/AnnualRoundingRule" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "dailyDecimals": { + "description": "Number of decimal places to calculate Daily Rates", + "format": "int32", + "type": "integer" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "dailyDivisor": { + "description": "Days used to determine Full time Daily Rate", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "department": { + "nullable": true, + "type": "string" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "fullTimeHours": { + "description": "Maximum Full Time Hours on this Pay Spine", + "format": "double", + "type": "number" + }, + "fullTimeWeeks": { + "description": "Maximum Full Time Weeks on this Pay Spine", + "format": "double", + "type": "number" + }, + "gradeEffectiveDate": { + "description": "Effective date for applicable grades", + "format": "date", + "type": "string" + }, + "hourlyDecimals": { + "description": "Number of decimal places to calculate Hourly Rates", + "format": "int32", + "type": "integer" + }, + "hourlyDivisor": { + "description": "Hours used to determine Hourly Rate", + "format": "double", + "type": "number" + }, + "incrementRule": { + "$ref": "#/components/schemas/IncrementRule" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "pointEffectiveDate": { + "description": "Effective date for applicable spinal points", + "format": "date", + "type": "string" + }, + "requiresLondonAllowance": { + "description": "Requires LA column to be completed on the spine", + "type": "boolean" + }, + "salaryFormula": { + "description": "Formula used to derive annual salary", + "nullable": true, + "type": "string" + }, + "spineName": { + "description": "Name of the Pay Spine", + "nullable": true, + "type": "string" } - ], - "requestBody": { + }, + "type": "object" + }, + "PaySpineReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/PaySpineReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRun" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/employees/{employeeId}/Last": { - "get": { - "tags": [ - "PayRun" + "type": "object" + }, + "PaySpineYearsServiceEntitlementBasis": { + "enum": [ + "RoleStartDate", + "EmploymentStartDate", + "ContinuousStartDate", + "AggregatedStartDate" ], - "summary": "Gets the last closed pay run entry for an employee.", - "operationId": "LastPayRunEntryForEmployeePayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "Payee": { + "additionalProperties": false, + "properties": { + "bankDetails": { + "$ref": "#/components/schemas/BankDetails" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee you want to get last pay run entry for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "hasMinimumBankDetails": { + "description": "Denotes whether the payee has the minimum bank details to receive a payment", + "readOnly": true, + "type": "boolean" }, - { - "name": "isClosed", - "in": "query", - "schema": { - "type": "boolean" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "paymentDateDayOfMonth": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "paymentDateDayOfWeek": { + "$ref": "#/components/schemas/DayOfWeek" + }, + "paymentDateRule": { + "$ref": "#/components/schemas/PaymentDateRule" + }, + "title": { + "description": "The name of this Payee", + "maxLength": 50, + "minLength": 1, + "type": "string" } + }, + "required": [ + "title" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRunEntry" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/employees/{employeeId}/averageholidaypayrate": { - "get": { - "tags": [ - "PayRun" + "type": "object" + }, + "PayeeType": { + "enum": [ + "Employee", + "Hmrc", + "PensionProvider", + "Aeo", + "Deduction" ], - "summary": "Calculate Average Holiday Pay Rate", - "description": "Calculates the average holiday pay rate for an employee based on their holiday scheme configuration", - "operationId": "CalculateAverageHolidayPayPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PaylineCalculationData": { + "additionalProperties": false, + "properties": { + "contractedHours": { + "description": "PaySpine contracted hours", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "contractedWeeks": { + "description": "PaySpine contracted weeks", + "format": "double", + "type": "number" }, - { - "name": "startDate", - "in": "query", - "description": "The date we used to calculate average holiday pay from", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } + "fixedAnnualValue": { + "description": "PaySpine full time annual value", + "format": "double", + "type": "number" + }, + "fullTimeEquivalent": { + "description": "PaySpine full time equivalent value", + "format": "double", + "type": "number" + }, + "fullTimeHours": { + "description": "PaySpine full time hours", + "format": "double", + "type": "number" + }, + "fullTimeSalary": { + "description": "PaySpine full time salary", + "format": "double", + "type": "number" + }, + "fullTimeWeeks": { + "description": "PaySpine full time weeks", + "format": "double", + "type": "number" } + }, + "type": "object" + }, + "PaymentDateRule": { + "enum": [ + "OnPayDate", + "OnDayOfWeekAfterPayDate", + "OnDayOfMonth" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "number", - "format": "double" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/stateHistory": { - "get": { - "tags": [ - "PayRun" + "type": "string" + }, + "PaymentDateType": { + "enum": [ + "SameDate", + "LastDay", + "LastWeekday", + "LastXxxday", + "SameDateWorkingDay", + "SecondXxxday", + "ThirdXxxday", + "FourthXxxday", + "SecondToLastXxxday", + "ThirdToLastXxxday" ], - "summary": "List PayRunStateHistory", - "description": "Returns the state history of a pay run.", - "operationId": "GetPayRunStateHistoryPayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PaymentMethodAfterLeaving": { + "enum": [ + "RegularPayMethod", + "IrregularPayMethod" + ], + "type": "string" + }, + "PaymentsCsvMapping": { + "additionalProperties": false, + "description": "This model is used to save CSV mappings for importing of payments.\r\nIt probably has very little practical use outside of our own UI", + "properties": { + "analysisCategoryIndexes": { + "items": { + "$ref": "#/components/schemas/AnalysisCategoryIndex" + }, + "nullable": true, + "type": "array" }, - { - "name": "payPeriod", - "in": "path", - "description": "The Pay Period (i.e, Monthly, Weekly) for which you want to get the Pay Run history", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "analysisCategoryIndexesJson": { + "nullable": true, + "type": "string" }, - { - "name": "periodNumber", - "in": "path", - "description": "The Period (i.e, Tax Month, Tax Week) for which you want to get the Pay Run history", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "autoAdjustForLeaveIndex": { + "format": "int32", + "type": "integer" }, - { - "name": "taxYear", - "in": "path", - "description": "The Tax Year for which you want to get the Pay Run history", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "columns": { + "items": { + "$ref": "#/components/schemas/PaymentsCsvMappingColumn" + }, + "nullable": true, + "type": "array" }, - { - "name": "ordinal", - "in": "query", - "description": "Indicates whether it uses first, second, third (etc.) PaySchedule for the PayPeriod", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayRunStateHistoryResponse" - } - } - } - } + "contributesToBasicPayIndex": { + "format": "int32", + "type": "integer" }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayRunStateHistoryResponse" - } - } - } - } + "costCentreIndex": { + "format": "int32", + "type": "integer" }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayRunStateHistoryResponse" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/employees/{employeeId}/pension/{pensionUniqueId}/pensionytd": { - "get": { - "tags": [ - "PayRun" - ], - "summary": "Gets last PayRunEntry for a Pension", - "operationId": "LastPayRunEntryWithPensionYtdValuesForEmployeePayRun", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "departmentIndex": { + "format": "int32", + "type": "integer" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee you want to get pay run entry for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "effectiveFromIndex": { + "format": "int32", + "type": "integer" }, - { - "name": "pensionUniqueId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "effectiveToIndex": { + "format": "int32", + "type": "integer" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRunEntry" - } - } - } + "employerIdIndex": { + "format": "int32", + "type": "integer" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/payrun-async/{taxYear}/{payPeriod}/{periodNumber}": { - "delete": { - "tags": [ - "PayRunAsync" - ], - "summary": "Registers a request to delete a PayRun (beta)", - "description": "Registers a request to delete a PayRun and returns a 202 if successful.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "QueueDeletePayRunPayRunAsync", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "hasHeader": { + "type": "boolean" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "hasPaylineCosting": { + "type": "boolean" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "ignoreInitialBackPayIndex": { + "format": "int32", + "type": "integer" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "202": { - "description": "Accepted" + "importBehaviour": { + "format": "int32", + "type": "integer" }, - "400": { - "description": "Bad Request" + "isAutomaticBackPayIndex": { + "format": "int32", + "type": "integer" }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "tags": [ - "PayRunAsync" - ], - "summary": "Registers a request to update the PayRun (beta)", - "description": "Queues a request to update a PayRun to the state provided along with the reason (optional) for the change.", - "operationId": "QueueUpdatePayRunPayRunAsync", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "name": { + "maxLength": 50, + "minLength": 1, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "noteIndex": { + "format": "int32", + "type": "integer" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "payAmountIndex": { + "format": "int32", + "type": "integer" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "payAmountMultiplierIndex": { + "format": "int32", + "type": "integer" + }, + "payBasis": { + "$ref": "#/components/schemas/PayBasis" + }, + "payCodeIndex": { + "format": "int32", + "type": "integer" + }, + "payGradeIndex": { + "format": "int32", + "type": "integer" + }, + "paySpineIndex": { + "format": "int32", + "type": "integer" + }, + "payrollCodeIndex": { + "format": "int32", + "type": "integer" + }, + "roleReferenceIndex": { + "format": "int32", + "type": "integer" + }, + "spinePointIndex": { + "format": "int32", + "type": "integer" + }, + "type": { + "$ref": "#/components/schemas/PaymentsCsvMappingType" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "PaymentsCsvMappingColumn": { + "additionalProperties": false, + "properties": { + "code": { + "nullable": true, + "type": "string" + }, + "colIndex": { + "format": "int32", + "type": "integer" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "isMultiplier": { + "type": "boolean" }, - { - "name": "sendPayslipEmails", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } + "isNetToGross": { + "type": "boolean" }, - { - "name": "payslipReleaseType", - "in": "query", - "schema": { - "$ref": "#/components/schemas/PayslipReleaseType" - } + "isReferenceOnly": { + "description": "If set to true then no PayCode is mapped and this column is just for on-screen refernece only", + "type": "boolean" }, - { - "name": "payslipScheduledDateTime", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "rateColIndex": { + "description": "If the mapping IsMultiplier, then this optionally specifies another column from which to get the value", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "shouldSerializeRateColIndex": { + "readOnly": true, + "type": "boolean" + }, + "title": { + "maxLength": 25, + "minLength": 1, + "type": "string" } + }, + "required": [ + "title" ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PayRunStateChange" - } + "type": "object" + }, + "PaymentsCsvMappingType": { + "enum": [ + "RowBased", + "ColumnBased" + ], + "type": "string" + }, + "PayrollAnalysisCostBreakdownReport": { + "additionalProperties": false, + "properties": { + "employeesPayRunTotals": { + "items": { + "$ref": "#/components/schemas/EmployeePayRunTotal" }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRunStateChange" - } + "nullable": true, + "type": "array" + }, + "employer": { + "$ref": "#/components/schemas/Item" + }, + "endDate": { + "format": "date", + "type": "string" + }, + "endPeriodName": { + "nullable": true, + "type": "string" + }, + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/PayrollAnalysisCostBreakdownReportLine" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PayRunStateChange" - } + "nullable": true, + "type": "array" + }, + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payCodes": { + "items": { + "$ref": "#/components/schemas/PayCode" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PayRunStateChange" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRun" - } - } - } + "nullable": true, + "type": "array" }, - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRun" - } - } - } + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" }, - "400": { - "description": "Bad Request" + "period": { + "format": "int32", + "type": "integer" }, - "404": { - "description": "Not Found" + "periodTo": { + "format": "int32", + "type": "integer" }, - "409": { - "description": "Conflict" - } - } - } - }, - "/employers/{employerId}/payrun-async/{taxYear}/{payPeriod}": { - "post": { - "tags": [ - "PayRunAsync" - ], - "summary": "Registers a request to start the next PayRun (beta)", - "description": "Registers the request to start the next PayRun and returns a 202 if successful\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "QueueCreatePayRunPayRunAsync", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "report": { + "$ref": "#/components/schemas/Report" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "startDate": { + "format": "date", + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "startPeriodName": { + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "202": { - "description": "Success - the request to start a PayRun has been accepted.\r\nThe unique URL for this PayRun is returned in the Location header." + "taxYear": { + "$ref": "#/components/schemas/TaxYear" }, - "400": { - "description": "Bad Request" + "title": { + "nullable": true, + "type": "string" }, - "409": { - "description": "Conflict" + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } - } - } - }, - "/employers/{employerId}/payrun-async/{payPeriod}/importpay": { - "post": { - "tags": [ - "PayRunAsync" - ], - "summary": "Import Pay (beta)", - "description": "Takes a list PayOptionsImport and updates the currently open payrun to use the amounts given.\r\nYou must have an open payrun for the PayPeriod specified and all payroll codes submitted must match an employee on the payrun.\r\nAny lines imported for a PayRunEntry will replace existing lines for that PayRunEntry.", - "operationId": "ImportPayPayRunAsync", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "PayrollAnalysisCostBreakdownReportLine": { + "additionalProperties": false, + "properties": { + "costCentre": { + "$ref": "#/components/schemas/StringStringDecimalValueTuple" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "department": { + "$ref": "#/components/schemas/StringStringDecimalValueTuple" }, - { - "name": "ordinal", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "employeeNi": { + "format": "double", + "type": "number" }, - { - "name": "LinesOnly", - "in": "query", - "description": "If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false.", - "schema": { - "type": "boolean" - } + "employeePension": { + "description": "The value of the Pension Contribution(PENSION) being made by the Employee", + "format": "double", + "type": "number" }, - { - "name": "Append", - "in": "query", - "description": "If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false.", - "schema": { - "type": "boolean" - } + "employeePensionContributionReliefAtSource": { + "description": "The value of the Pension Contribution Relief At Source(PENSIONRAS) being made by the Employee", + "format": "double", + "type": "number" }, - { - "name": "UpdateExisting", - "in": "query", - "description": "If set to true then any submitted lines that match the pay code of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines. Defaults to false.", - "schema": { - "type": "boolean" - } + "employeePensionContributionSalarySacrifice": { + "description": "The value of the Pension Contribution Salary Sacrifice(PENSIONSS) being made by the Employee", + "format": "double", + "type": "number" }, - { - "name": "throwOnError", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayOptionsImportRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayOptionsImportRequest" - } - } + "employeeRoleAnalysisCategory": { + "additionalProperties": { + "$ref": "#/components/schemas/StringDecimalKeyValuePair" }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayOptionsImportRequest" - } - } + "nullable": true, + "type": "object" + }, + "ersNi": { + "format": "double", + "type": "number" + }, + "ersPension": { + "format": "double", + "type": "number" + }, + "lastName": { + "nullable": true, + "type": "string" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/PayrollAnalysisCostBreakdownReportValue" }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayOptionsImportRequest" - } - } - } + "nullable": true, + "type": "array" }, - "required": true - }, - "responses": { - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JobResponse" - } - } - } + "niPercent": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "niablePay": { + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" + "payrollCode": { + "nullable": true, + "type": "string" }, - "409": { - "description": "Conflict" - } - } - } - }, - "/employers/{employerId}/schedules/{taxYear}": { - "get": { - "tags": [ - "PaySchedule" - ], - "summary": "Get PaySchedules", - "description": "Get all PaySchedules for the given TaxYear.", - "operationId": "GetAllPaySchedule", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to get the PaySchedule", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionPay": { + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "description": "The year that you want to retrieve details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaySchedule" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/schedules/{taxYear}/{payPeriod}": { - "get": { - "tags": [ - "PaySchedule" - ], - "summary": "Get PaySchedule (deprecated)", - "description": "Get the PaySchedule for the PayPeriod and TaxYear specified (and an optional ordinal. 1 will be used if ordinal is not provided).", - "operationId": "GetWithOptionalOrdinalPaySchedule", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to get the PaySchedule", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionPercent": { + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "description": "The PayPeriod (ie, Monthly) that you want to retrieve details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "pensionSummaryCostBreakdowns": { + "description": "List of pension summaries, each representing a breakdown of various pension components", + "items": { + "$ref": "#/components/schemas/PensionSummaryCostBreakdown" + }, + "nullable": true, + "type": "array" }, - { - "name": "taxYear", - "in": "path", - "description": "The year that you want to retrieve details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "roleId": { + "description": "RoleId of that particular line entry", + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - } - } - } - } - }, - "post": { - "tags": [ - "PaySchedule" - ], - "summary": "Create a PaySchedule (deprecated)", - "description": "Create PaySchedule using a certain pay frequency and TaxYear specified (and an optional ordinal. 1 will be used if ordinal is not provided).", - "operationId": "CreateWithOptionalOrdinalPaySchedule", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update the PaySchedule", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "roleWeightage": { + "description": "Weightage value of the given employee role", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "description": "The PayPeriod (ie, Monthly) that you want to update details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "studentLoan": { + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "description": "The year that the PaySchedule is for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "taxPaid": { + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "taxablePay": { + "format": "double", + "type": "number" + }, + "taxablePercent": { + "format": "double", + "type": "number" + }, + "totalPay": { + "format": "double", + "type": "number" } - ], - "requestBody": { + }, + "type": "object" + }, + "PayrollAnalysisCostBreakdownReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/PayrollAnalysisCostBreakdownReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "201": { - "description": "Created" + "type": "object" + }, + "PayrollAnalysisCostBreakdownReportValue": { + "additionalProperties": false, + "properties": { + "code": { + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "qty": { + "format": "double", + "nullable": true, + "type": "number" + }, + "value": { + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "PaySchedule" - ], - "summary": "Update PaySchedule (deprecated)", - "description": "Update PaySchedule for the PayPeriod and TaxYear specified (and an optional ordinal. 1 will be used if ordinal is not provided).", - "operationId": "SaveWithOptionalOrdinalPaySchedule", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update the PaySchedule", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PayrollAnalysisEmployeeRoleBreakdownReport": { + "additionalProperties": false, + "properties": { + "employer": { + "$ref": "#/components/schemas/Item" }, - { - "name": "payPeriod", - "in": "path", - "description": "The PayPeriod (ie, Monthly) that you want to update details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "endDate": { + "format": "date", + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "description": "The year that the PaySchedule is for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "endPeriodName": { + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/PayrollAnalysisEmployeeRoleBreakdownReportLine" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } + "nullable": true, + "type": "array" + }, + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payCodes": { + "items": { + "$ref": "#/components/schemas/PayCode" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - } - } + "nullable": true, + "type": "array" }, - "400": { - "description": "Bad Request" + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "period": { + "format": "int32", + "type": "integer" + }, + "periodTo": { + "format": "int32", + "type": "integer" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "PaySchedule" - ], - "summary": "Delete PaySchedule (deprecated)", - "description": "Delete the PaySchedule for the PayPeriod and TaxYear specified (and an optional ordinal. 1 will be used if ordinal is not provided).", - "operationId": "DeleteWithOptionalOrdinalPaySchedule", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to get the PaySchedule", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PayrollAnalysisEmployeeRoleBreakdownReportLine": { + "additionalProperties": false, + "properties": { + "department": { + "$ref": "#/components/schemas/DepartmentMembership" }, - { - "name": "payPeriod", - "in": "path", - "description": "The PayPeriod (ie, Monthly) that you want to retrieve details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "employee": { + "$ref": "#/components/schemas/Item" }, - { - "name": "taxYear", - "in": "path", - "description": "The year that you want to retrieve details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "employeeRole": { + "$ref": "#/components/schemas/Item" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "employerNic": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/schedules/{taxYear}/{payPeriod}/{ordinal}": { - "get": { - "tags": [ - "PaySchedule" - ], - "summary": "Get PaySchedule", - "description": "Get the PaySchedule for the PayPeriod and TaxYear specified.", - "operationId": "GetPaySchedule", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to get the PaySchedule", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "ersPension": { + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "description": "The PayPeriod (ie, Monthly) that you want to retrieve details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "fullEmployee": { + "$ref": "#/components/schemas/Employee" }, - { - "name": "taxYear", - "in": "path", - "description": "The year that you want to retrieve details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "gross": { + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "path", - "description": "Specify if this is the first, second, third (etc) PaySchedule for this PayPeriod. Use 1 for the first, 2 for the second, etc.", - "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - } - } + "lines": { + "items": { + "$ref": "#/components/schemas/PayrollAnalysisEmployeeRoleBreakdownReportLineValue" + }, + "nullable": true, + "type": "array" + }, + "net": { + "format": "double", + "type": "number" + }, + "niableGross": { + "format": "double", + "type": "number" + }, + "showQtyColumn": { + "type": "boolean" + }, + "takeHome": { + "format": "double", + "type": "number" + }, + "taxablePay": { + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "PaySchedule" - ], - "summary": "Create a PaySchedule", - "description": "Create PaySchedule using a certain pay frequency.", - "operationId": "CreatePaySchedule", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update the PaySchedule", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "payPeriod", - "in": "path", - "description": "The PayPeriod (ie, Monthly) that you want to update details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "PayrollAnalysisEmployeeRoleBreakdownReportLineValue": { + "additionalProperties": false, + "properties": { + "code": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "description": "The year that the PaySchedule is for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "qty": { + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "ordinal", - "in": "path", - "description": "Specify if this is the first, second, third (etc) PaySchedule for this PayPeriod. Use 1 for the first, 2 for the second, etc.", - "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "value": { + "format": "double", + "type": "number" } - ], - "requestBody": { + }, + "type": "object" + }, + "PayrollAnalysisEmployeeRoleBreakdownReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/PayrollAnalysisEmployeeRoleBreakdownReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "201": { - "description": "Created" + "type": "object" + }, + "PayrollValueType": { + "enum": [ + "BasicPay", + "Gross", + "GrossForTax", + "GrossForNi", + "EmployerNi", + "EmployeeNi", + "EmployerNiOffPayroll", + "RealTimeClass1ANi", + "Tax", + "NetPay", + "Adjustments", + "TakeHomePay", + "NonTaxOrNICPmt", + "ItemsSubjectToClass1NIC", + "DednsFromNetPay", + "Tcp_Tcls", + "Tcp_Pp", + "Tcp_Op", + "FlexiDd_Death", + "FlexiDd_Death_NonTax", + "FlexiDd_Pension", + "FlexiDd_Pension_NonTax", + "Smp", + "Spp", + "Sap", + "Shpp", + "Spbp", + "StudentLoanRecovered", + "PostgradLoanRecovered", + "PensionablePay", + "NonTierablePay", + "EmployeePensionContribution", + "EmployerPensionContribution", + "EmpeePenContribnsNotPaid", + "EmpeePenContribnsPaid", + "AttachmentOrderDeductions", + "CisDeduction", + "CisVat", + "CisUmbrellaFee", + "CisUmbrellaFeePostTax", + "Pbik", + "MapsMiles", + "UmbrellaFee", + "AppLevyDeduction", + "PaymentAfterLeaving", + "TaxOnPaymentAfterLeaving", + "Ssp", + "AttachmentOrderAdminFee", + "EmployeePensionNetPay", + "EmployeePensionRas", + "EmployeePensionSalSac", + "EmployeePensionContributionAvc", + "Deductions", + "Additions", + "PensionableEarnings", + "TotalGross", + "FlexiDd_SeriousIllHealth", + "FlexiDd_SeriousIllHealth_NonTax", + "ForeignTaxCredit", + "ForeignTaxReclaimed", + "AverageHolidayPay", + "P45Gross", + "P45Tax", + "Sncp", + "FlexiDd_StandAloneLumpSum", + "FlexiDd_StandAloneLumpSum_NonTax", + "FlexiDd_PensionCommencementExcess", + "FlexiDd_PensionCommencementExcess_NonTax", + "Average_Holiday_Pay_Days", + "Holiday_Days_Day_Rate" + ], + "type": "string" + }, + "PayrunEmail": { + "additionalProperties": false, + "description": "PayrunEmails are sent automatically when a payrun has been finalised", + "properties": { + "attachBankPayments": { + "description": "If set to True then the Bank Payments CSV file will be attached to the email", + "type": "boolean" + }, + "attachCostAnalysis": { + "description": "If set to True then the Cost Analysis report will be attached to the email", + "type": "boolean" + }, + "attachCostOfEmployment": { + "description": "If set to True then the Cost of Employment report will be attached to the email", + "type": "boolean" + }, + "attachFullSummaryOfPay": { + "description": "If set to True then the Full Summary Of Payment report will be attached to the email", + "type": "boolean" + }, + "attachGrossToNet": { + "description": "If set to True then the GrossToNet report will be attached to the email", + "type": "boolean" + }, + "attachP30": { + "description": "If set to True then the P30 report will be attached to the email", + "type": "boolean" }, - "400": { - "description": "Bad Request" - } - } - }, - "put": { - "tags": [ - "PaySchedule" - ], - "summary": "Update PaySchedule", - "description": "Update PaySchedule for the PayPeriod.", - "operationId": "SavePaySchedule", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update the PaySchedule", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "attachP32": { + "description": "If set to True then the P32 report will be attached to the email", + "type": "boolean" }, - { - "name": "payPeriod", - "in": "path", - "description": "The PayPeriod (ie, Monthly) that you want to update details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "attachPaymentSummary": { + "description": "If set to True then the PaymentSummary report will be attached to the Email", + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "description": "The year that the PaySchedule is for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "attachPayslips": { + "description": "If set to true then Payslips will be attached to the email", + "type": "boolean" }, - { - "name": "ordinal", - "in": "path", - "description": "Specify if this is the first, second, third (etc) PaySchedule for this PayPeriod. Use 1 for the first, 2 for the second, etc.", - "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedule" - } - } - } + "attachPensionContributions": { + "description": "If set to True then the Pensions Contributions report will be attached to the email", + "type": "boolean" }, - "400": { - "description": "Bad Request" - } - } - }, - "delete": { - "tags": [ - "PaySchedule" - ], - "summary": "Delete PaySchedule", - "description": "Delete the PaySchedule for the PayPeriod and TaxYear specified.", - "operationId": "DeletePaySchedule", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to get the PaySchedule", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "childId": { + "description": "This is nothing but the UniqueId of the model.", + "format": "uuid", + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "description": "The PayPeriod (ie, Monthly) that you want to retrieve details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "customBody": { + "description": "If TemplateType is null then you can provide the body text here to be used for the email", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "description": "The year that you want to retrieve details for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "customBody_IsHtml": { + "description": "If the CustomBody is in HTML format, set this to true.", + "type": "boolean" }, - { - "name": "ordinal", - "in": "path", - "description": "Specify if this is the first, second, third (etc) PaySchedule for this PayPeriod. Use 1 for the first, 2 for the second, etc.", - "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "204": { - "description": "No Content" + "customSubject": { + "description": "If TemplateType is null then you can provide a subject line here to be used for the email", + "maxLength": 200, + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/schedules/{taxYear}/{payPeriod}/{ordinal}/periods": { - "get": { - "tags": [ - "PaySchedule" - ], - "summary": "Get PaySchedulePeriods", - "description": "Get the PaySchedulePeriods for PaySchedule specified.", - "operationId": "GetPeriodsPaySchedule", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to get the PaySchedule periods", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isActive": { + "description": "If false then this email won't be sent", + "type": "boolean" }, - { - "name": "payPeriod", - "in": "path", - "description": "The PayPeriod (ie, Monthly) that you want to retrieve details for", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "name": { + "description": "Only used for reference, not included in the email", + "maxLength": 75, + "minLength": 1, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "description": "The year that you want to retrieve details for", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "payslips_SingleFile": { + "description": "If AttachPayslips is true and this property is also true then the payslips will be attached as a single file rather than as separate PDFs,", + "type": "boolean" }, - { - "name": "ordinal", - "in": "path", - "description": "Optionally specify the second, third, fourth (etc) PaySchedule for this PayPeriod. Defaults to 1 (first)", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "payslips_Unemailed": { + "description": "If AttachPayslips is true and this property is also true then only payslips that haven't already been sent directly to employees will be attached.", + "type": "boolean" }, - { - "name": "periodNumber", - "in": "query", - "description": "Optionally specify a period number to get a result just for that period", - "schema": { - "type": "integer", - "format": "int32" - } + "pdfPassword": { + "description": "If a value is provided, then all PDFs attached to the email will be encrypted using this password", + "maxLength": 50, + "nullable": true, + "type": "string" }, - { - "name": "includeEvents", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaySchedulePeriod" - } - } - } - } + "recipientAddress": { + "description": "The address to which the email should be sent", + "format": "email", + "maxLength": 150, + "minLength": 1, + "type": "string" }, - "404": { - "description": "Not Found" + "templateType": { + "$ref": "#/components/schemas/EmployerTemplateType" } - } - } - }, - "/employers/{employerId}/schedules/{taxYear}/{payPeriod}/{ordinal}/periods/{periodNumber}": { - "put": { - "tags": [ - "PaySchedule" + }, + "required": [ + "name", + "recipientAddress" ], - "summary": "Update PaySchedulePeriod", - "description": "Update the PaymentDate for a PaySchedulePeriod.", - "operationId": "UpdatePaySchedulePeriodPaySchedule", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update the PaySchedulePeriod", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "PayrunPaymentsReport": { + "additionalProperties": false, + "description": "After finalising a PayRun, employees need to actually be paid.\r\nThis model is returned by the Reports API and is used to provide details of a payment that needs to be made.", + "properties": { + "allowRepost": { + "type": "boolean" }, - { - "name": "payPeriod", - "in": "path", - "description": "The PayPeriod (ie, Monthly) that you want to update details for", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "connectedExternalDataProvider": { + "$ref": "#/components/schemas/ExternalDataProvider" }, - { - "name": "taxYear", - "in": "path", - "description": "The year that the PaySchedule is for", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "employer": { + "$ref": "#/components/schemas/Item" }, - { - "name": "ordinal", - "in": "path", - "description": "Specify the first, second, third (etc) PaySchedule for this PayPeriod.", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "endDate": { + "format": "date", + "type": "string" }, - { - "name": "periodNumber", - "in": "path", - "description": "Specify the number of the period that you want to update the PaymentDate for", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PaySchedulePeriod" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedulePeriod" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedulePeriod" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PaySchedulePeriod" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaySchedulePeriod" - } - } - } + "endPeriodName": { + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "isDraft": { + "type": "boolean" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/payspines": { - "get": { - "tags": [ - "PaySpine" - ], - "summary": "List PaySpine", - "description": "Lists all PaySpine for an Employer.", - "operationId": "IndexPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list PaySpine", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "link": { + "description": "[readonly] If available, a link to the payments in an ExternalDataProvider", + "nullable": true, + "type": "string" }, - "404": { - "description": "Employer or PaySpine Not Found" + "ordinal": { + "format": "int32", + "type": "integer" }, - "400": { - "description": "Bad Request" - } - } - }, - "post": { - "tags": [ - "PaySpine" - ], - "summary": "Create PaySpine", - "description": "Create a new PaySpine for the Employer.", - "operationId": "CreatePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineRequest" - } + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "payments": { + "items": { + "$ref": "#/components/schemas/PayRunPayment" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineRequest" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "nullable": true, + "type": "array" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineResponse" - } - } - } + "period": { + "format": "int32", + "type": "integer" }, - "404": { - "description": "Employer Not Found" - } - } - } - }, - "/employers/{employerId}/payspines/{id}": { - "get": { - "tags": [ - "PaySpine" - ], - "summary": "Get PaySpine", - "description": "Gets the PaySpine specified.", - "operationId": "GetPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the PaySpine belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "periodTo": { + "format": "int32", + "type": "integer" }, - { - "name": "id", - "in": "path", - "description": "The Id of the PaySpine which you want to fetch", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineResponse" - } - } - } + "report": { + "$ref": "#/components/schemas/Report" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/BackgroundTaskStatus" + }, + "statusMessage": { + "description": "[readonly] A message to elaborate on the Status", + "nullable": true, + "type": "string" }, - "404": { - "description": "Employer or PaySpine Not Found" + "taxYear": { + "$ref": "#/components/schemas/TaxYear" }, - "400": { - "description": "Bad Request" + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "PaySpine" - ], - "summary": "Update PaySpine", - "description": "Updates a PaySpine for the Employer.", - "operationId": "UpdatePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PayrunPaymentsReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "model": { + "$ref": "#/components/schemas/PayrunPaymentsReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineUpdateRequest" - } + }, + "type": "object" + }, + "Payslip": { + "additionalProperties": false, + "description": "If you don't want to use our customisable PDFs for Payslips then you can retrieve the raw data used to create a Payslip.\r\nThis is the model you will be provided with for each employee.", + "properties": { + "allowanceNote": { + "description": "[readonly] Details of remaining allowance to show on payslip", + "nullable": true, + "type": "string" + }, + "costCentres": { + "description": "The employees Cost Centre Membership(s) only populated when creating journals", + "items": { + "$ref": "#/components/schemas/StringDecimalKeyValuePair" }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineUpdateRequest" - } + "nullable": true, + "type": "array" + }, + "departmentMemberships": { + "description": "The Employee Department Membership(s) by role only populated when creating journals", + "items": { + "$ref": "#/components/schemas/DepartmentMembership" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineUpdateRequest" - } + "nullable": true, + "type": "array" + }, + "depts": { + "description": "The employees Department Membership(s) at the time the payrun was finalised", + "items": { + "$ref": "#/components/schemas/StringDecimalKeyValuePair" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineUpdateRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "PaySpine" - ], - "summary": "Delete PaySpine", - "description": "Deletes the specified PaySpine.", - "operationId": "DeletePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "nullable": true, + "type": "array" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "employee": { + "$ref": "#/components/schemas/Item" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/payspines/import": { - "post": { - "tags": [ - "PaySpine" - ], - "summary": "Import PaySpine from csv file", - "description": "Import PaySpine from a CSV file.", - "operationId": "ImportCsvPaySpinePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/spinalpoints": { - "get": { - "tags": [ - "PaySpine" - ], - "summary": "List SpinalPoints", - "description": "List SpinalPoints for an Employer and Payspine.", - "operationId": "GetSpinalPointListPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want Spinal Point List", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employeeCostCentres": { + "description": "The Employee Cost Centre Membership(s) by role only populated when creating journals", + "items": { + "$ref": "#/components/schemas/EmployeeCostCentre" + }, + "nullable": true, + "type": "array" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Spinal Point for which you want Spinal Point List", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpinalPointResponse" - } - } - } - } + "employeePensionContributions": { + "additionalProperties": { + "$ref": "#/components/schemas/DecimalDecimalBooleanPensionRuleValueTuple" + }, + "description": "Dictionary of Pension Contributions(s) Keyed on PensionId containing Employee Pension and AVC Contribution(s) Bfd, AVC indicator and pension rule", + "nullable": true, + "type": "object" }, - "404": { - "description": "Employer or Pay Spine Not Found" + "employeeRoleAnalysisCategoryCodes": { + "description": "The EmployeeRoleAnalysisCategoryCodes only populated when creating journals", + "items": { + "$ref": "#/components/schemas/EmployeeRoleAnalysisCategoryCode" + }, + "nullable": true, + "type": "array" }, - "400": { - "description": "Bad Request" - } - } - }, - "post": { - "tags": [ - "PaySpine" - ], - "summary": "Create SpinalPoint", - "description": "Create SpinalPoint for an Employer and Payspine.", - "operationId": "CreateSpinalPointPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to create Spinal Point", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employer": { + "$ref": "#/components/schemas/Item" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay spine for which you want to create Spinal Point", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpinalPointRequest" - } + "employerAddress": { + "$ref": "#/components/schemas/Address" + }, + "employerNi": { + "description": "[readonly] The Employer NI Contribution amount", + "format": "double", + "type": "number" + }, + "employerPensionContribs": { + "description": "[readonly] The Employer Pension Contribution Amount", + "format": "double", + "type": "number" + }, + "employerPensionContributions": { + "description": "[readonly] The list of Employer Pension Contribution(s)", + "items": { + "$ref": "#/components/schemas/EmployerPensionContribution" }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpinalPointRequest" - } + "nullable": true, + "type": "array" + }, + "employmentDetails": { + "$ref": "#/components/schemas/EmploymentDetails" + }, + "from": { + "description": "[readonly] The start date of the period this Payslip covers.", + "format": "date", + "type": "string" + }, + "hmrcDetails": { + "$ref": "#/components/schemas/HmrcDetails" + }, + "isClosed": { + "description": "[readonly] Indicates if the Payrun has been finalised", + "type": "boolean" + }, + "isSupplementary": { + "description": "Indicates if this payslip is for a supplementary pay run", + "type": "boolean" + }, + "lines": { + "description": "[readonly] The lines to display on the Payslip", + "items": { + "$ref": "#/components/schemas/PayslipLine" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpinalPointRequest" - } + "nullable": true, + "type": "array" + }, + "logoUrl": { + "description": "[readonly] The Logo to include on the payslip", + "nullable": true, + "type": "string" + }, + "note": { + "description": "[readonly] Any note that should appear on the payslip", + "nullable": true, + "type": "string" + }, + "originalPayRunPaymentDate": { + "description": "Original PayRun's Payment Date", + "format": "date", + "nullable": true, + "type": "string" + }, + "payOptions": { + "$ref": "#/components/schemas/PayOptions" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "paymentDate": { + "description": "[readonly] The date the Employee will be paid on", + "format": "date", + "type": "string" + }, + "pensionContributionsByRole": { + "description": "The Pension Employer contribution by role only populated when creating journals", + "items": { + "$ref": "#/components/schemas/Item" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpinalPointRequest" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "nullable": true, + "type": "array" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpinalPointResponse" - } - } - } + "period": { + "description": "[readonly] A description of the period that Payslip relates to.", + "nullable": true, + "type": "string" + }, + "periodNumber": { + "format": "int32", + "type": "integer" + }, + "personalDetails": { + "$ref": "#/components/schemas/PersonalDetails" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "to": { + "description": "[readonly] The end date of the period this Payslip covers.", + "format": "date", + "type": "string" + }, + "totals": { + "$ref": "#/components/schemas/PayRunTotals" + }, + "totalsYtd": { + "$ref": "#/components/schemas/PayRunTotals" + }, + "umbrellaPayment": { + "$ref": "#/components/schemas/UmbrellaPayment" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "PaySpine" - ], - "summary": "Delete All SpinalPoints Associated with a PaySpine", - "description": "Delete all SpinalPoints associated with the specified PaySpine.", - "operationId": "DeleteAllSpinalPointsPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to delete Spinal Point List", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PayslipCustomisation": { + "additionalProperties": false, + "description": "Used to represent any customisations you make to the look of Payslip PDFs.\r\nThis is covered in detail in the Guides section.", + "properties": { + "custom": { + "description": "Whether or not you are customising the Payslip.\r\nThis should always be true if you are providing any other values.", + "type": "boolean" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to delete Spinal Point List", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "customCss": { + "maxLength": 2500, + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/spinalpoints/{spinalPointId}": { - "get": { - "tags": [ - "PaySpine" - ], - "summary": "Get SpinalPoint", - "description": "Get SpinalPoint for an Employer and Payspine.", - "operationId": "GetSpinalPointPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want Spinal Point", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "customCssOption": { + "$ref": "#/components/schemas/ReportCustomCssOption" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want Spinal Point", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "filename": { + "maxLength": 200, + "nullable": true, + "type": "string" }, - { - "name": "spinalPointId", - "in": "path", - "description": "The Id of the Spinal Point for which you want Spinal Point", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpinalPointResponse" - } - } - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "includeBenefits": { + "description": "Whether or not to include any payrolled benefits", + "type": "boolean" + }, + "includeDepartment": { + "description": "Whether or not to include the primary department of the employee on the payslip", + "type": "boolean" + }, + "includeEmployerAddress": { + "description": "Whether or not to include the employer address", + "type": "boolean" + }, + "includeHealthAndSocialCareMessage": { + "description": "Whether or not to include health and social car message", + "type": "boolean" }, - "404": { - "description": "Employer or Pay Spine Not Found" + "includeLogo": { + "description": "Whether or not to include the employer logo on the payslip.", + "type": "boolean" }, - "400": { - "description": "Bad Request" - } - } - }, - "put": { - "tags": [ - "PaySpine" - ], - "summary": "Update SpinalPoint", - "description": "Update SpinalPoint for the Employer and PaySpine.", - "operationId": "UpdateSpinalPointPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update Spinal Point", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "margins": { + "$ref": "#/components/schemas/PdfPaperMargins" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to update Spinal Point", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "orientation": { + "$ref": "#/components/schemas/PdfPaperOrientation" }, - { - "name": "spinalPointId", - "in": "path", - "description": "The Id of the Spinal Point for which you want to update Spinal Point", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpinalPointRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpinalPointRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpinalPointRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpinalPointRequest" - } - } + "paperSize": { + "$ref": "#/components/schemas/PdfPaperSize" + }, + "removePensionYtd": { + "description": "Whether or not to remove the pension YTD column", + "type": "boolean" + }, + "removeYtd": { + "description": "Whether or not to remove the YTD column", + "type": "boolean" + }, + "useUmbrellaFormat": { + "description": "If true then the format the payslip will include details of the Umbrella Payment as well as employer costs", + "type": "boolean" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpinalPointResponse" - } - } - } - } - } + "type": "object" }, - "delete": { - "tags": [ - "PaySpine" - ], - "summary": "Delete SpinalPoint", - "description": "Delete the specified SpinalPoint.", - "operationId": "DeleteSpinalPointPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update Spinal Point List", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PayslipLine": { + "additionalProperties": false, + "properties": { + "attachmentOrderId": { + "description": "[readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO", + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to update Spinal Point List", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "code": { + "nullable": true, + "type": "string" }, - { - "name": "spinalPointId", - "in": "path", - "description": "The Id of the Spinal Point for which you want to update Spinal Point List", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "contributesToBasicPay": { + "type": "boolean" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/spinalpoints/bulk": { - "post": { - "tags": [ - "PaySpine" - ], - "summary": "Create Multiple SpinalPoints", - "description": "Create multiple SpinalPoints for the specified PaySpine.", - "operationId": "CreateMultiplePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to create multiple Spinal Point", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "currencySymbol": { + "nullable": true, + "type": "string" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to create multiple Spinal Point", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpinalPointRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpinalPointRequest" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpinalPointRequest" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpinalPointRequest" - } - } - } + "description": { + "nullable": true, + "type": "string" + }, + "formattedValue": { + "nullable": true, + "readOnly": true, + "type": "string" + }, + "hasSecondaryDescription": { + "readOnly": true, + "type": "boolean" + }, + "isAutoCalculatedBackPayLine": { + "type": "boolean" + }, + "isAutomaticBackPay": { + "type": "boolean" + }, + "isNetToGross": { + "description": "If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target.", + "type": "boolean" + }, + "isNotional": { + "description": "Determines whether the transaction involves non-monetary benefits for payroll processing, potentially subject to tax and National Insurance", + "type": "boolean" + }, + "leaveId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "loanId": { + "description": "[readonly] The Id of the associated Loan, if any.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "multiplier": { + "description": "[readonly] If the Code is a multiplier code then this is the multiplier. Value has already been calculated so this is just for reference", + "format": "double", + "nullable": true, + "type": "number" + }, + "pensionId": { + "description": "[readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "roleId": { + "description": "The employee role which is associated with this payslip line.\r\nIf set to null, the payslip line is not related with a role.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "secondaryDescription": { + "nullable": true, + "type": "string" + }, + "targetNetToGrossValue": { + "description": "The orginal net fixed addition amount that is considered to be a take home pay target.", + "format": "double", + "nullable": true, + "type": "number" + }, + "type": { + "$ref": "#/components/schemas/PayslipLineType" + }, + "value": { + "format": "double", + "type": "number" } }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpinalPointResponse" - } - } - } - } - } - } + "type": "object" }, - "put": { - "tags": [ - "PaySpine" + "PayslipLineType": { + "enum": [ + "BasicPay", + "Gross", + "Net", + "Nic", + "Tax", + "Cis" ], - "summary": "Update Multiple SpinalPoints", - "description": "Update an array of SpinalPoints for the specified PaySpine.", - "operationId": "UpdateMultiplePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update multiple Spinal Point", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to update multiple Spinal Point", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "type": "string" + }, + "PayslipReleasePaymentDateRule": { + "enum": [ + "WorkingDays", + "CalendarDays" ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpinalPointUpdateRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpinalPointUpdateRequest" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpinalPointUpdateRequest" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpinalPointUpdateRequest" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpinalPointResponse" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payspines/spinalpoints/import": { - "post": { - "tags": [ - "PaySpine" + "type": "string" + }, + "PayslipReleaseTime": { + "enum": [ + "OneMinutePastMidnight", + "OneAm", + "TwoAm", + "ThreeAm", + "FourAm", + "FiveAm", + "SixAm", + "SevenAm", + "EightAm", + "NineAm", + "TenAm", + "ElevenAm", + "TwelveNoon", + "OnePm", + "TwoPm", + "ThreePm", + "FourPm", + "FivePm", + "SixPm", + "SevenPm", + "EightPm", + "NinePm", + "TenPm", + "ElevenPm", + "OneMinuteToMidnight" ], - "summary": "Import SpinalPoints from csv file", - "description": "Import SpinalPoints from a CSV file.", - "operationId": "ImportCsvPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "type": "string" + }, + "PayslipReleaseType": { + "enum": [ + "Immediately", + "Scheduled" ], - "requestBody": { + "type": "string" + }, + "PayslipReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/allowances": { - "post": { - "tags": [ - "PaySpine" - ], - "summary": "Create SpineAllowance", - "description": "Create Allowance for a Pay Spine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "CreateSpineAllowancePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to create Spine Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay spine for which you want to create Spine Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "model": { + "$ref": "#/components/schemas/Payslip" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpineAllowanceResponse" - } - } - } + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "get": { - "tags": [ - "PaySpine" - ], - "summary": "List SpineAllowances", - "description": "List Spine Allowances for a Pay Spine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "GetSpineAllowanceListPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want list of Spine Allowances", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PdfPaperMargins": { + "additionalProperties": false, + "properties": { + "bottom": { + "format": "double", + "type": "number" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want list of Spine Allowances", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpineAllowanceResponse" - } - } - } - } + "left": { + "format": "double", + "type": "number" }, - "404": { - "description": "Employer or Pay Spine Not Found" + "right": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "top": { + "format": "double", + "type": "number" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "PaySpine" + "PdfPaperOrientation": { + "enum": [ + "Landscape", + "Portrait" ], - "summary": "Delete All SpineAllowances Associated with a PaySpine", - "description": "Delete all Allowances associated with the specified Pay Spine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "DeleteAllSpineAllowancesPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to delete SpineAllowances", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to delete SpineAllowances", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "type": "string" + }, + "PdfPaperSize": { + "enum": [ + "Letter", + "LetterSmall", + "A4", + "A4Small", + "A5" ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/allowances/{allowanceid}": { - "put": { - "tags": [ - "PaySpine" + "type": "string" + }, + "PdfPasswordType": { + "enum": [ + "InitialsAndDob", + "NiNumber", + "Custom" ], - "summary": "Update SpineAllowance", - "description": "Update Allowance for a Pay Spine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "UpdateSpineAllowancePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update Spine Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "Pension": { + "additionalProperties": false, + "properties": { + "additionalVoluntaryContribution": { + "description": "Any additional voluntary amount the employer contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage.", + "format": "double", + "type": "number" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to update Spine Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "aeStatusAtJoining": { + "$ref": "#/components/schemas/AeStatus" }, - { - "name": "allowanceid", - "in": "path", - "description": "The Id of the Spine Allowance for which you want to update Spine Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" - } + "associatedEmployeeRoles": { + "description": "The list of employee roles associated with the pension membership", + "items": { + "$ref": "#/components/schemas/Item" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpineAllowanceResponse" - } - } - } - } - } - }, - "get": { - "tags": [ - "PaySpine" - ], - "summary": "Get SpineAllowance", - "description": "Get Allowance for a Pay Spine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "GetSpineAllowancePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to get Spine Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "nullable": true, + "type": "array" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to get Spine Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "autoEnrolled": { + "description": "[readonly] Is True if the employee joined this Pension due to an AutoEnrolment action", + "type": "boolean" }, - { - "name": "allowanceid", - "in": "path", - "description": "The Id of the Spine Allowance for which you want to get Spine Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpineAllowanceResponse" - } - } - } + "avcIsPercentage": { + "description": "Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage,", + "type": "boolean" }, - "404": { - "description": "Employer or Pay Spine Not Found" + "contributionLevelType": { + "$ref": "#/components/schemas/PensionContributionLevelType" }, - "400": { - "description": "Bad Request" - } - } - }, - "delete": { - "tags": [ - "PaySpine" - ], - "summary": "Delete SpineAllowance", - "description": "Delete Allowance for a Pay Spine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "DeleteSpineAllowancePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to delete Spine Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employee": { + "$ref": "#/components/schemas/Item" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to delete Spine Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employeeContribution": { + "description": "The amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on EmployeeContributionIsPercentage.\r\nThis is read-only if OverrideContributions is false", + "format": "double", + "type": "number" }, - { - "name": "allowanceid", - "in": "path", - "description": "The Id of the Spine Allowance for which you want to delete Spine Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "employeeContributionIsPercentage": { + "description": "Determines whether the Value of the EmployeeContribution is a fixed amount or a percentage,", + "type": "boolean" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/allowances/create/bulk": { - "post": { - "tags": [ - "PaySpine" - ], - "summary": "Create Multiple SpineAllowances", - "description": "Creates multiple Spine Allowance for the specified PaySpine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "CreateMultipleSpineAllowancePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to create multiple SpineAllowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employerContribution": { + "description": "The amount the employer contributes towards the pension. Could be a percentage or a fixed amount depending on EmployerContributionIsPercentage.\r\nThis is read-only if OverrideContributions is false", + "format": "double", + "type": "number" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to create multiple SpineAllowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" - } - } - } - } - }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpineAllowanceResponse" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/allowances/update/bulk": { - "put": { - "tags": [ - "PaySpine" - ], - "summary": "Update Multiple SpineAllowances", - "description": "Updates an array of Spine Allowance for the specified PaySpine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "UpdateMultipleSpineAllowancePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update multiple SpineAllowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employerContributionIncludesNiSaving": { + "description": "Employer Contribution includes the Employers NI saving", + "type": "boolean" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to update multiple SpineAllowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpineAllowanceUpdateRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpineAllowanceUpdateRequest" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpineAllowanceUpdateRequest" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpineAllowanceUpdateRequest" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.SpineAllowanceResponse" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/londonallowances": { - "get": { - "tags": [ - "PaySpine" - ], - "summary": "List LondonAllowances", - "description": "List LondonAllowances for an Employer and Payspine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "GetLondonAllowanceListPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want list of London Allowances", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employerContributionIsPercentage": { + "description": "Determines whether the Value of the EmployerContribution is a fixed amount or a percentage,", + "type": "boolean" + }, + "employerContributionNiSavingPercentage": { + "description": "Increase Employer Contribution by this percentage of the Employers NI saving", + "format": "double", + "type": "number" + }, + "employerContributionTopUpPercentage": { + "description": "Increase Employer Contribution by this percentage of the Employee Contribution", + "format": "double", + "type": "number" + }, + "endDate": { + "description": "The date the employee left the scheme", + "format": "date", + "nullable": true, + "type": "string" + }, + "endPayRunEntryId": { + "description": "[readonly] Holds the Id for the payroll that the employee left the scheme", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "endReason": { + "$ref": "#/components/schemas/PensionEndReason" + }, + "endReportingType": { + "$ref": "#/components/schemas/PensionReportingType" + }, + "exitViaProvider": { + "readOnly": true, + "type": "boolean" + }, + "externalEmployeeId": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "fiftyFiftySchemeMember": { + "description": "if an employee as a member of the 50/50 LGPS scheme, they can enable contribution to 50% of the normal contributions.", + "type": "boolean" + }, + "forceEnrolment": { + "description": "If the PensionScheme is connected to an ExternalDataProvider that supports enrolment then setting this to true will force this employee to be enrolled with the next submission.", + "type": "boolean" + }, + "forcedTier": { + "description": "If the WorkerGroup ContributionLevelType is a Tiered Scheme then you can specify the name of the tier to force the employee on to.\r\nIf none is specified then the Tier is determined by the earnings in the period", + "nullable": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "isAeQualifyingScheme": { + "description": "[readonly] Whether or not the associated PensionScheme is a Qualifying Scheme for AutoEnrolment", + "type": "boolean" + }, + "isTeachersPension": { + "description": "[readonly] Whether or not the associated PensionScheme is a Teachers' Pension (determined by its CsvFormat)", + "type": "boolean" + }, + "joinReason": { + "$ref": "#/components/schemas/PensionJoinReason" + }, + "memberReferenceNumber": { + "maxLength": 25, + "nullable": true, + "type": "string" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want list of London Allowances", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LondonAllowance" - } - } - } - } + "overrideContributions": { + "description": "If this is set to true then the Contributions levels set for the WorkerGroup will be replaced with the values provided here", + "type": "boolean" }, - "404": { - "description": "Employer or Pay Spine Not Found" + "pensionOpeningBalances": { + "$ref": "#/components/schemas/PensionOpeningBalances" }, - "400": { - "description": "Bad Request" - } - } - }, - "post": { - "tags": [ - "PaySpine" - ], - "summary": "Create LondonAllowance", - "description": "Create LondonAllowance for an Employer and Payspine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "CreateLondonAllowancePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to create London Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionScheme": { + "$ref": "#/components/schemas/PensionScheme" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay spine for which you want to create London Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "pensionSchemeId": { + "format": "uuid", + "type": "string" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.LondonAllowanceResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/londonallowances/{londonAllowanceId}": { - "get": { - "tags": [ - "PaySpine" - ], - "summary": "Get LondonAllowance", - "description": "Get LondonAllowance for an Employer and Payspine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "GetLondonAllowancePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to get London Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "reasonForLeaving": { + "description": "If a value is provided for EndDate then this is the reason for leaving the employee left the scheme", + "maxLength": 100, + "nullable": true, + "type": "string" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to get London Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "startDate": { + "format": "date", + "type": "string" }, - { - "name": "londonAllowanceId", - "in": "path", - "description": "The Id of the London Allowance for which you want to get London Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.LondonAllowanceResponse" - } - } - } + "startPayRunEntryId": { + "description": "[readonly] Holds the Id for the payroll that the employee joined the scheme", + "format": "int32", + "nullable": true, + "type": "integer" }, - "404": { - "description": "Employer or Pay Spine Not Found" + "startReportingType": { + "$ref": "#/components/schemas/PensionReportingType" }, - "400": { - "description": "Bad Request" + "teachersPensionDetails": { + "$ref": "#/components/schemas/TeachersPensionDetails" + }, + "workerGroup": { + "$ref": "#/components/schemas/WorkerGroup" + }, + "workerGroupId": { + "format": "uuid", + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "PaySpine" - ], - "summary": "Update LondonAllowance", - "description": "Update LondonAllowance for the Employer and PaySpine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "UpdateLondonAllowancePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update London Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PensionAdministrator": { + "additionalProperties": false, + "properties": { + "address": { + "$ref": "#/components/schemas/Address" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to update London Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "email": { + "maxLength": 150, + "nullable": true, + "type": "string" }, - { - "name": "londonAllowanceId", - "in": "path", - "description": "The Id of the London Allowance for which you want to update London Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" - } - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "name": { + "maxLength": 150, + "nullable": true, + "type": "string" + }, + "telephone": { + "maxLength": 100, + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.LondonAllowanceResponse" - } - } - } - } - } + "type": "object" }, - "delete": { - "tags": [ - "PaySpine" + "PensionContributionLevelType": { + "enum": [ + "UserDefined", + "StatutoryMinimum", + "Nhs2015", + "TeachersPensionEnglandAndWales", + "LgpsEnglandAndWales", + "TpFasterAccrual", + "TpAdditionalPensionContributions", + "TpActuariallyAdjustedBenefits", + "TpFamilyBenefits", + "tpPastAddedYears", + "tpHigherSalaries", + "tpPreston", + "LgpsAdditionalPensionContributions", + "LgpsSharedAdditionalPensionContributions", + "LgpsAdditionalRegularContributions", + "LgpsAddedYearsContributions", + "LgpsSharedAdditionalPensionLumpSump", + "LgpsPartTimeBuyBack", + "PrudentialAVC", + "tpElectedFurtherEmployment", + "AptisCashIsa", + "AptisStocksSharesIsa", + "AptisInvestmentAccount" ], - "summary": "Delete LondonAllowance", - "description": "Delete the specified London Allowance. [This endpoint is in beta for future development work and should not be used]", - "operationId": "DeleteLondonAllowancePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to delete London Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PensionContributionsSubmission": { + "additionalProperties": false, + "description": "This model is used to track submission of Pension Contributions to an external data provider.", + "properties": { + "employerId": { + "format": "int32", + "type": "integer" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to delete London Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "externalId": { + "nullable": true, + "type": "string" }, - { - "name": "londonAllowanceId", - "in": "path", - "description": "The Id of the Spinal Point for which you want to delete London Allowance", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/paygrades": { - "get": { - "tags": [ - "PaySpine" - ], - "summary": "List PaySpine Grade", - "description": "Lists PaySpine Grade for an Employer and PaySpine Grade.", - "operationId": "GetPaySpineGradeListPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want PaySpine Grade List", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "ordinal": { + "format": "int32", + "type": "integer" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the PaySpine Grade for which you want PaySpine Grade List", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PaySpineGradeResponse" - } - } - } - } + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" }, - "404": { - "description": "Employer or PaySpine Grade Not Found" + "payRunId": { + "format": "int32", + "type": "integer" }, - "400": { - "description": "Bad Request" + "period": { + "format": "int32", + "type": "integer" + }, + "schemeId": { + "format": "int32", + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/BackgroundTaskStatus" + }, + "statusMessage": { + "nullable": true, + "type": "string" + }, + "submissionData": { + "nullable": true + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "PaySpine" + "PensionCsvFormat": { + "enum": [ + "Papdis", + "Nest", + "NowPensions", + "TeachersPensionMdc", + "TeachersPensionMcr", + "ScottishWidowsAssistMe", + "Aviva", + "AvivaEnrolment", + "ScottishWidowsWorkplace", + "Aegon", + "ScottishWidowsWorkplaceEnrolment", + "AegonEnrolment", + "StandardLifeWorkplaceHub", + "PeoplesPension", + "StandardLifeWorkplaceHubEnrolment", + "PrudentialAvc", + "LgpsCivicaUpm", + "LgpsIConnect", + "StandardLifeGpz", + "StandardLifeGpzEnrolment", + "Aptis", + "AptisEnrolment", + "NestEnrolment", + "TruePotential", + "TruePotentialEnrolment", + "AegonSmartEnrol" ], - "summary": "Create PaySpine Grade", - "description": "create PaySpine Grade for an Employer and Payspine.", - "operationId": "CreatePaySpineGradePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to create PaySpine Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PensionEndReason": { + "enum": [ + "OptOut", + "CeasedMembership", + "Leaver" + ], + "type": "string" + }, + "PensionInitialEnrolmentType": { + "enum": [ + "Auto", + "Contractual", + "Manual" + ], + "type": "string" + }, + "PensionJoinReason": { + "enum": [ + "Automatic", + "OptIn", + "VoluntaryJoiner", + "ContractualPension", + "Enrol" + ], + "type": "string" + }, + "PensionMembershipReportLine": { + "additionalProperties": false, + "properties": { + "aeStatusAtJoining": { + "$ref": "#/components/schemas/AeStatus" + }, + "assumedPensionablePayYTD": { + "description": "Assumed pensionable pay year to date", + "format": "double", + "nullable": true, + "type": "number" + }, + "avcPensionYTD": { + "description": "Additional Voluntary Contribution YTD", + "format": "double", + "nullable": true, + "type": "number" + }, + "department": { + "nullable": true, + "type": "string" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "employeePensionYTD": { + "description": "Employee pension year to date", + "format": "double", + "nullable": true, + "type": "number" + }, + "employerPensionYTD": { + "description": "Employer pension year to date", + "format": "double", + "nullable": true, + "type": "number" + }, + "endDate": { + "description": "Pension End Date", + "nullable": true, + "type": "string" + }, + "endReason": { + "$ref": "#/components/schemas/PensionEndReason" + }, + "isAvcPercentage": { + "description": "Indicates whether the AvcContribution is expressed as a percentage.", + "type": "boolean" + }, + "isEmployeeContributionPercentage": { + "description": "Indicates whether the EmployeeContribution is expressed as a percentage.", + "type": "boolean" + }, + "isEmployerContributionPercentage": { + "description": "Indicates whether the EmployerContribution is expressed as a percentage.", + "type": "boolean" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay spine for which you want to create PaySpine Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "isHalfContributionMember": { + "description": "50/50 membership", + "nullable": true, + "type": "boolean" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineGradeResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/paygrades/{payGradeId}": { - "get": { - "tags": [ - "PaySpine" - ], - "summary": "Get PaySpine Grade", - "description": "PaySpine Grade for an Employer and Payspine.", - "operationId": "GetPaySpineGradePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want PaySpine Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isPensionJoinerActionReported": { + "description": "Indicates whether the pension joiner action is reported.", + "type": "boolean" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want PaySpine Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isPensionLeaverActionReported": { + "description": "Indicates whether the pension leaver action is reported.", + "nullable": true, + "type": "boolean" }, - { - "name": "payGradeId", - "in": "path", - "description": "The Id of the PaySpine Grade for which you want PaySpine Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineGradeResponse" - } - } - } + "joinDate": { + "description": "The Join Date of the employee", + "nullable": true, + "type": "string" }, - "404": { - "description": "Employer or PaySpine Grade Not Found" + "joinReason": { + "$ref": "#/components/schemas/PensionJoinReason" }, - "400": { - "description": "Bad Request" - } - } - }, - "put": { - "tags": [ - "PaySpine" - ], - "summary": "Update PaySpine Grade", - "description": "Updates a PaySpine Grade for the Employer and PaySpine.", - "operationId": "UpdatePayGradePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update PaySpine Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "mcrRoleID1": { + "description": "MCR Role ID1 for teachers pension", + "nullable": true, + "type": "string" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to update PaySpine Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "mcrRoleID2": { + "description": "MCR Role ID2 for teachers pension", + "nullable": true, + "type": "string" }, - { - "name": "payGradeId", - "in": "path", - "description": "The Id of the PaySpine Grade for which you want to update PaySpine Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PaySpineGradeResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "PaySpine" - ], - "summary": "Delete PaySpine Grade", - "description": "Deletes the specified PaySpine Grade.", - "operationId": "DeletePaySpineGradePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "payrollCode": { + "description": "Payroll code of the employee", + "nullable": true, + "type": "string" }, - { - "name": "paySpineId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionAVCContribution": { + "description": "Pension AVC Contribution of employee", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "payGradeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "pensionEmployeeContribution": { + "description": "Pension Employee Contribution", + "format": "double", + "nullable": true, + "type": "number" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/allowances/{allowanceId}/allowancegrades/{allowanceGradeId}": { - "get": { - "tags": [ - "PaySpine" - ], - "summary": "Get AllowanceGrade", - "description": "Get AllowanceGrade for a PaySpine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "GetAllowanceGradePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionEmployerContribution": { + "description": "Employer Pension Contribution", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionId": { + "description": "Pension Id", + "format": "uuid", + "type": "string" }, - { - "name": "allowanceId", - "in": "path", - "description": "The Id of the Spine Allowance for which you want Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionMembershipNo": { + "description": "Pension Membership Number", + "nullable": true, + "type": "string" }, - { - "name": "allowanceGradeId", - "in": "path", - "description": "The Id of the Allowance Grade for which you want Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AllowanceGradesResponse" - } - } - } + "pensionScheme": { + "description": "Employee pension scheme", + "nullable": true, + "type": "string" }, - "404": { - "description": "Employer or PaySpine Grade Not Found" + "pensionTiers": { + "description": "Pension Tiers of the employee", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - }, - "put": { - "tags": [ - "PaySpine" - ], - "summary": "Update AllowanceGrade", - "description": "Update AllowanceGrade for a PaySpine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "UpdateAllowanceGradePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionableEarningsYTD": { + "description": "Pensionable earning year to date", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to update Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionablePayYTD": { + "description": "Pensionable Pay year to date", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "allowanceId", - "in": "path", - "description": "The Id of the Spine Allowance for which you want to update Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "reasonForLeaving": { + "description": "Reason the employee left the scheme", + "nullable": true, + "type": "string" }, - { - "name": "allowanceGradeId", - "in": "path", - "description": "The Id of the Allowance Grade for which you want to update Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" - } - } + "roleRefs": { + "description": "role references of employee", + "nullable": true, + "type": "string" + }, + "tpAdminNino": { + "description": "Teachers Pension Admin Ni Number", + "nullable": true, + "type": "string" + }, + "workerGroup": { + "description": "The WorkerGroup of the employee pension scheme", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AllowanceGradesResponse" - } - } - } - } - } + "type": "object" }, - "delete": { - "tags": [ - "PaySpine" - ], - "summary": "Delete AllowanceGrade", - "description": "Delete AllowanceGrade for a PaySpine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "DeleteAllowanceGradePaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to delete Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to delete Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "allowanceId", - "in": "path", - "description": "The Id of the Spine Allowance for which you want to delete Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PensionMembershipsReport": { + "additionalProperties": false, + "properties": { + "employer": { + "$ref": "#/components/schemas/Item" }, - { - "name": "allowanceGradeId", - "in": "path", - "description": "The Id of the Allowance Grade for which you want to delete Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "endDate": { + "format": "date", + "type": "string" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/allowances/{allowanceId}/allowancegrades": { - "post": { - "tags": [ - "PaySpine" - ], - "summary": "Create AllowanceGrade", - "description": "Create AllowanceGrade for a PaySpine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "CreateAllowanceGradesPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to create Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "endPeriodName": { + "nullable": true, + "type": "string" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay spine for which you want to create Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isDraft": { + "type": "boolean" }, - { - "name": "allowanceId", - "in": "path", - "description": "The Id of the Spine Allowance for which you want to create Allowance Grade", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" - } + "lines": { + "items": { + "$ref": "#/components/schemas/PensionMembershipReportLine" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" - } - } + "nullable": true, + "type": "array" + }, + "ordinal": { + "format": "int32", + "type": "integer" + }, + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" + }, + "period": { + "format": "int32", + "type": "integer" + }, + "periodTo": { + "format": "int32", + "type": "integer" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "PensionMembershipsReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.AllowanceGradesResponse" - } - } - } + "model": { + "$ref": "#/components/schemas/PensionMembershipsReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "get": { - "tags": [ - "PaySpine" - ], - "summary": "List AllowanceGrades", - "description": "List AllowanceGrades for a PaySpine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "GetAllowanceGradesPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want list of Allowance Grades", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PensionOpeningBalances": { + "additionalProperties": false, + "properties": { + "assumedPensionablePay": { + "description": "Opening balances for assumed pensionable pay", + "format": "double", + "pattern": "^[\\d\\.\\,]{1,8}([\\.\\,]\\d{0,2})?$", + "type": "number" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want list of Allowance Grades", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employeePensionContribution": { + "description": "Opening balances for employee pension contribution", + "format": "double", + "pattern": "^[\\d\\.\\,]{1,8}([\\.\\,]\\d{0,2})?$", + "type": "number" }, - { - "name": "allowanceId", - "in": "path", - "description": "The Id of the Spine Allowance for which you want list of Allowance Grades", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.AllowanceGradesResponse" - } - } - } - } + "employeePensionContributionAvc": { + "description": "Opening balances for employee pension contribution avc", + "format": "double", + "pattern": "^[\\d\\.\\,]{1,8}([\\.\\,]\\d{0,2})?$", + "type": "number" }, - "404": { - "description": "Employer or Pay Spine Not Found" + "employerPensionContribution": { + "description": "Opening balances for employer pension contribution", + "format": "double", + "pattern": "^[\\d\\.\\,]{1,8}([\\.\\,]\\d{0,2})?$", + "type": "number" }, - "400": { - "description": "Bad Request" + "pensionableEarnings": { + "description": "Opening balances for pensionable earnings", + "format": "double", + "pattern": "^[\\d\\.\\,]{1,8}([\\.\\,]\\d{0,2})?$", + "type": "number" + }, + "pensionablePay": { + "description": "Opening balances for pensionable pay", + "format": "double", + "pattern": "^[\\d\\.\\,]{1,8}([\\.\\,]\\d{0,2})?$", + "type": "number" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "PaySpine" + "PensionPayCode": { + "enum": [ + "Default", + "CustomPayCodes", + "PayCodeSets" ], - "summary": "Delete All AllowanceGrades Associated with a PaySpine", - "description": "Delete all AllowanceGrades associated with a PaySpine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "DeleteAllAllowanceGradesPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to delete Allowance Grades", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PensionProvider": { + "additionalProperties": false, + "properties": { + "accountNo": { + "maxLength": 100, + "nullable": true, + "type": "string" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to delete Allowance Grades", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "address": { + "$ref": "#/components/schemas/Address" }, - { - "name": "allowanceId", - "in": "path", - "description": "The Id of the Spine Allowance for which you want to delete Allowance Grades", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "csvFormat": { + "$ref": "#/components/schemas/PensionCsvFormat" }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/allowances/{allowanceId}/allowancegrades/create/bulk": { - "post": { - "tags": [ - "PaySpine" - ], - "summary": "Create Multiple AllowanceGrades", - "description": "Create multiple AllowanceGrades for a PaySpine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "CreateMultipleAllowanceGradesPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to create multiple Allowance Grades", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "excludeNilPaidFromContributions": { + "description": "If we're sending contributions to an external provider then we'll include all employees that were on the payrun.\r\nIf you want to exclude employees that don't have any contributions to report then set this to true.", + "type": "boolean" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to create multiple Allowance Grades", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "allowanceId", - "in": "path", - "description": "The Id of the Spine Allowance for which you want to create multiple Allowance Grades", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" - } - } - } - } - }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.AllowanceGradesResponse" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payspines/{paySpineId}/allowances/{allowanceId}/allowancegrades/update/bulk": { - "put": { - "tags": [ - "PaySpine" - ], - "summary": "Update Multiple AllowanceGrades", - "description": "Update multiple AllowanceGrades for a PaySpine. [This endpoint is in beta for future development work and should not be used]", - "operationId": "UpdateMultipleAllowanceGradesPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to update multiple Allowance Grades", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "miscBoolean1": { + "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\"", + "type": "boolean" }, - { - "name": "paySpineId", - "in": "path", - "description": "The Id of the Pay Spine for which you want to update multiple Allowance Grades", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "miscBoolean2": { + "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it indicates whether or not to approve payments after submitting contributions", + "type": "boolean" }, - { - "name": "allowanceId", - "in": "path", - "description": "The Id of the Spine Allowance for which you want to update multiple Allowance Grades", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.AllowanceGradesUpdateRequest" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.AllowanceGradesUpdateRequest" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.AllowanceGradesUpdateRequest" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.AllowanceGradesUpdateRequest" - } - } - } + "miscString1": { + "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it dictates the PaymentSource.", + "maxLength": 50, + "nullable": true, + "type": "string" + }, + "miscString2": { + "description": "This field has different uses dependent on the ExternalDataProvider, if any.", + "maxLength": 50, + "nullable": true, + "type": "string" + }, + "name": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "optOutWindow": { + "description": "The number of days or months that an employee has to Opt out after being enrolled", + "format": "int32", + "type": "integer" + }, + "optOutWindowIsMonths": { + "description": "Determines whether the value given for OptOutWindow is in Months (true) or days (false)", + "type": "boolean" + }, + "papdisEmployerId": { + "maxLength": 40, + "nullable": true, + "type": "string" + }, + "papdisProviderId": { + "maxLength": 35, + "nullable": true, + "type": "string" + }, + "papdisVersion": { + "$ref": "#/components/schemas/PapdisVersion" + }, + "payPeriodDateAdjustment": { + "description": "If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here.\r\nA negative value of will move the date back in time.", + "format": "int32", + "type": "integer" + }, + "portal": { + "format": "uri", + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "telephone": { + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "website": { + "format": "uri", + "maxLength": 100, + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.AllowanceGradesResponse" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payspines/paygrades/import": { - "post": { - "tags": [ - "PaySpine" - ], - "summary": "Import SpineGrades from csv file", - "description": "Import Spine Grades from a CSV file.", - "operationId": "ImportPayspineGradeCsvPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "required": [ + "name" ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } + "type": "object" + }, + "PensionRefund": { + "additionalProperties": false, + "description": "Used to represent a Pension Refund", + "properties": { + "additionalVoluntaryContribution": { + "format": "double", + "type": "number" + }, + "assumedPensionablePay": { + "format": "double", + "type": "number" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "employeeRefund": { + "format": "double", + "type": "number" + }, + "employerRefund": { + "format": "double", + "type": "number" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "isPreviousTaxYearRefund": { + "type": "boolean" + }, + "payInCurrentPayRun": { + "type": "boolean" + }, + "payRun": { + "$ref": "#/components/schemas/Item" + }, + "pensionSchemeUniqueId": { + "format": "uuid", + "type": "string" + }, + "pensionUniqueId": { + "format": "uuid", + "type": "string" + }, + "pensionableEarning": { + "format": "double", + "type": "number" + }, + "pensionablePay": { + "format": "double", + "type": "number" + }, + "tierName": { + "minLength": 1, + "nullable": true, + "type": "string" + }, + "tierRate": { + "format": "double", + "maximum": 0.999, + "minimum": 0.001, + "nullable": true, + "type": "number" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payspines/{id}/annualsalarybypayspines": { - "get": { - "tags": [ - "PaySpine" + "required": [ + "additionalVoluntaryContribution", + "assumedPensionablePay", + "employeeRefund", + "employerRefund", + "isPreviousTaxYearRefund", + "pensionableEarning", + "pensionablePay" ], - "summary": "Get Annual Value from pay spines formula", - "operationId": "GetAnnualValueFromSalaryFormulaPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Employer id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "PensionReportingType": { + "enum": [ + "UsePayRun", + "UseAssessment", + "AlreadyReported", + "UseExisting" + ], + "type": "string" + }, + "PensionRule": { + "enum": [ + "ReliefAtSource", + "SalarySacrifice", + "NetPayArrangement" + ], + "type": "string" + }, + "PensionScheme": { + "additionalProperties": false, + "properties": { + "administrator": { + "$ref": "#/components/schemas/PensionAdministrator" }, - { - "name": "employeeId", - "in": "query", - "description": "The Employee id.", - "schema": { - "type": "string", - "format": "uuid" - } + "bankDetails": { + "$ref": "#/components/schemas/BankDetails" }, - { - "name": "id", - "in": "path", - "description": "The selected PaySpine Id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "customPayCodes": { + "description": "If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code\r\nthat we'll treat as being pensionable.", + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" }, - { - "name": "paySpineGradeId", - "in": "query", - "description": "The selected PaySpineGrade Id.", - "schema": { - "type": "string", - "format": "uuid" - } + "deficitValue": { + "description": "The Defict value that will be deducted in a PaySchedule", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "spinalPointId", - "in": "query", - "description": "The selected SpinalPoint Id.", - "schema": { - "type": "string", - "format": "uuid" - } + "deficitValueOrdinal": { + "description": "The Ordinal used to identify the PaySchedule which the Deficit will be against", + "format": "int32", + "nullable": true, + "type": "integer" }, - { - "name": "londonAllowanceType", - "in": "query", - "description": "The London Allowance Id of PayLine.", - "schema": { - "type": "integer", - "format": "int32" - } + "deficitValuePayPeriod": { + "$ref": "#/components/schemas/PayPeriods" }, - { - "name": "effectiveFrom", - "in": "query", - "description": "The PayLine effective from.", - "schema": { - "type": "string", - "format": "date-time" - } + "disableAeLetters": { + "description": "Set to true if the provider deals with AutoEnrolment Letters and therefore the system should not generate them", + "type": "boolean" }, - { - "name": "workingPatternId", - "in": "query", - "description": "The selected WorkingPattern Id.", - "schema": { - "type": "string", - "format": "uuid" - } + "externalDataCompany": { + "$ref": "#/components/schemas/ExternalDataCompany" }, - { - "name": "roleId", - "in": "query", - "description": "The Role Id.", - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaylineCalculationData" - } - } - } + "externalDataProviderId": { + "$ref": "#/components/schemas/ExternalDataProviderId" }, - "404": { - "description": "Employee or PaySpine Not Found" - } - } - } - }, - "/employers/{employerId}/payspines/{id}/employees/{employeeId}/getspinalpointwithannualsalary/{spinalPointId}/{effectiveFrom}": { - "get": { - "tags": [ - "PaySpine" - ], - "summary": "Get Spinal Point With Final Annual Salary", - "operationId": "GetSpinalPointWithAnnualSalaryPaySpine", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Employer id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Employee id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "includeDeficitValue": { + "description": "Set to true if this a Deficit Payment needs to be assigned to a PaySchedule", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The selected PaySpine Id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "initialEnrolmentType": { + "$ref": "#/components/schemas/PensionInitialEnrolmentType" }, - { - "name": "spinalPointId", - "in": "path", - "description": "The selected SpinalPoint Id.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "name": { + "maxLength": 150, + "minLength": 1, + "type": "string" }, - { - "name": "effectiveFrom", - "in": "path", - "description": "The PayLine effective from.", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } + "nominalCodeMappings": { + "description": "The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration", + "items": { + "$ref": "#/components/schemas/PensionSchemeNominalCodeMapping" + }, + "nullable": true, + "type": "array" }, - { - "name": "paySpineGradeId", - "in": "query", - "description": "The selected PaySpineGrade Id.", - "schema": { - "type": "string", - "format": "uuid" - } + "payCodeSetUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "londonAllowanceType", - "in": "query", - "description": "The London Allowance Id of PayLine.", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.SpinalPointResponse" - } - } - } + "payCodeType": { + "$ref": "#/components/schemas/PensionPayCode" }, - "404": { - "description": "Employee or PaySpine Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/pension/list": { - "get": { - "tags": [ - "Pension" - ], - "summary": "List Pensions", - "description": "Returns a list of Item representing any Pensions for the given employee", - "operationId": "ListPension", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "payMethod": { + "$ref": "#/components/schemas/PayMethod" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to list Pensions", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/pension/{id}": { - "get": { - "tags": [ - "Pension" - ], - "summary": "Get Pension", - "description": "Returns a Pension for an Employee", - "operationId": "GetPension", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "paymentDateDayOfMonth": { + "format": "int32", + "nullable": true, + "type": "integer" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to retrieve the Pension", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "paymentDateDayOfWeek": { + "$ref": "#/components/schemas/DayOfWeek" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Pension", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "paymentDateRule": { + "$ref": "#/components/schemas/PaymentDateRule" + }, + "pensionRule": { + "$ref": "#/components/schemas/PensionRule" + }, + "provider": { + "$ref": "#/components/schemas/PensionProvider" + }, + "qualifyingScheme": { + "description": "Set to true if this is a Qualifying Scheme for Auto Enrolment", + "type": "boolean" + }, + "reportOptionsLgpsCivicaUpm": { + "$ref": "#/components/schemas/PensionSchemeReportOptionsLgpsCivicaUpm" + }, + "reportOptionsLgpsIConnect": { + "$ref": "#/components/schemas/PensionSchemeReportOptionsLgpsIConnect" + }, + "singleEmploymentRelationship": { + "$ref": "#/components/schemas/PensionSingleEmploymentRelationship" + }, + "subtractBasicRateTax": { + "type": "boolean" + }, + "tierablePayCustomPayCodes": { + "description": "If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code\r\nthat we'll treat as being tierable.", + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "tierablePayPayCodeSetUniqueId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "tierablePayPayCodeType": { + "$ref": "#/components/schemas/PensionPayCode" + }, + "useCustomPayCodes": { + "description": "If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable\r\nwe'll instead treat it as pensionable if the Code is included in CustomPayCodes", + "type": "boolean" + }, + "useCustomPayCodesForTierablePay": { + "description": "If set to true then rather than using the setting on the PayCode to determine if the pay is tierable\r\nwe'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes", + "type": "boolean" + }, + "workerGroups": { + "description": "A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup", + "items": { + "$ref": "#/components/schemas/WorkerGroup" + }, + "nullable": true, + "type": "array" } + }, + "required": [ + "name" ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - } - } - } - } + "type": "object" }, - "put": { - "tags": [ - "Pension" - ], - "summary": "Update Pension", - "description": "Updates the Pension for an Employee.", - "operationId": "UpdatePension", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PensionSchemeNominalCodeMapping": { + "additionalProperties": false, + "properties": { + "journalNarrative": { + "description": "Journal narrative description.", + "maxLength": 500, + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to update the Pension", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "nominalCode": { + "description": "Nominal Code for pension scheme", + "maxLength": 500, + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Pension", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - } + "nominalName": { + "description": "Nominal Name", + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "payCode": { + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - } - } + "type": "object" + }, + "PensionSchemeReportOptionsLgpsCivicaUpm": { + "additionalProperties": false, + "properties": { + "addressesForNewJoinersOnly": { + "type": "boolean" + }, + "casualHours": { + "$ref": "#/components/schemas/LgpsCivicaCasualHours" }, - "400": { - "description": "Bad Request" + "excludeSchoolEmployerName": { + "type": "boolean" }, - "404": { - "description": "Not Found" - } - } - }, - "delete": { - "tags": [ - "Pension" - ], - "summary": "Remove Pension", - "description": "Removes a Pension for an Employee.", - "operationId": "RemovePension", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "fullTimeHoursAsOneHundred": { + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to remove the Pension", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "includeFolderNo": { + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Pension", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "includeWeeksWorkedColumns": { + "type": "boolean" }, - "400": { - "description": "Bad Request" + "omitHeaderLine": { + "type": "boolean" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/pension": { - "post": { - "tags": [ - "Pension" - ], - "summary": "Create Pension", - "description": "Creates a Pension for an Employee.", - "operationId": "CreatePension", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "payrollNumber": { + "$ref": "#/components/schemas/LgpsCivicaPayrollNumber" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to create a Pension", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - } + "proRatePtHoursWeeksWorked": { + "type": "boolean" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - } - } + "type": "object" + }, + "PensionSchemeReportOptionsLgpsIConnect": { + "additionalProperties": false, + "properties": { + "breakReasonSmpIndicatorOnly": { + "type": "boolean" }, - "400": { - "description": "Bad Request" + "casualStaffHoursAsOne": { + "type": "boolean" }, - "404": { - "description": "Not Found" - } - } - }, - "get": { - "tags": [ - "Pension" - ], - "summary": "Get Pension (deprecated)", - "description": "This endpoint is now deprecated. You should use the alternative end points that require an ID to be specified.\r\nUntil it is removed, this endpoint will work only for employees with a single pension\r\n\r\nReturns the Pension, if any, for an Employee", - "operationId": "Get_DeprecatedPension", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "casualStaffIndicatorAsY": { + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to retrieve the Pension", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - } - } + "customText": { + "nullable": true, + "type": "string" + }, + "fileType": { + "$ref": "#/components/schemas/LgpsIConnectFileType" + }, + "forceUpperCase": { + "type": "boolean" + }, + "ignoreHours": { + "type": "boolean" + }, + "ignoreTermTimeWeeksForFteFinalPay": { + "type": "boolean" + }, + "includeAeQualifyingEarnings": { + "type": "boolean" + }, + "includeEmploymentBreaks": { + "type": "boolean" + }, + "payrollReference1": { + "$ref": "#/components/schemas/LgpsIConnectPayrollReference" + }, + "payrollReference2": { + "$ref": "#/components/schemas/LgpsIConnectPayrollReference" + }, + "payrollReference3": { + "$ref": "#/components/schemas/LgpsIConnectPayrollReference" + }, + "populateEmailAddress": { + "type": "boolean" + }, + "populateMaritalStatus": { + "type": "boolean" + }, + "populateMobileNumber": { + "type": "boolean" + }, + "populateTelephoneNumber": { + "type": "boolean" + }, + "populateWorksAddress": { + "type": "boolean" + }, + "populateWorksEmailAddress": { + "type": "boolean" + }, + "populateWorksPlaceName": { + "type": "boolean" + }, + "proRatePtHoursByTermTimeWeeks": { + "type": "boolean" + }, + "salaryType": { + "$ref": "#/components/schemas/LgpsIConnectSalaryType" + }, + "showFteAnnualSalaryForFteFinalPay": { + "type": "boolean" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "Pension" + "PensionSingleEmploymentRelationship": { + "enum": [ + "AssessJointly", + "AssessRolesSeparately" ], - "summary": "Update Pension (deprecated)", - "description": "This endpoint is now deprecated. You should use the alternative end points that require an ID to be specified.\r\nUntil it is removed, this endpoint will work only for employees with a single pension\r\n\r\nUpdates the Pension for an Employee.", - "operationId": "Update_DeprecatedPension", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PensionSummary": { + "additionalProperties": false, + "description": "If a PayRunEntry contains pension contributions then it'll also include a PensionSummary model\r\ngiving further information about the Pension Scheme and the contributions made", + "properties": { + "additionalVoluntaryContribution": { + "description": "[readonly] Any Additional Voluntary Contribution the Employee has chosen to make\r\nOtherwise it is set as 1.", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to update the Pension", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } + "associatedEmployeeRoles": { + "items": { + "$ref": "#/components/schemas/Item" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Pension" - } - } - } + "nullable": true, + "type": "array" }, - "400": { - "description": "Bad Request" + "assumedPensionablePay": { + "description": "[readonly] Assumed Pensionable Pay. If the employee is receiving any Statutory Leave that has an AssumedPensionablePay value set\r\nthen it'll be shown here.", + "format": "double", + "nullable": true, + "type": "number" }, - "404": { - "description": "Not Found" - } - } - }, - "delete": { - "tags": [ - "Pension" - ], - "summary": "Remove Pension (deprecated)", - "description": "This endpoint is now deprecated. You should use the alternative end points that require an ID to be specified.\r\nUntil it is removed, this endpoint will work only for employees with a single pension\r\n\r\nRemoves the Pension for an Employee.\r\nFor AE Pensions this will remove the employee from the pension and delete any associated AeAssessments", - "operationId": "Remove_DeprecatedPension", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "assumedPensionablePayBfd": { + "description": "[readonly] The brought forward Year to Date value of Assumed Pensionable Pay. If the employee is receiving any Statutory Leave that has an AssumedPensionablePay value set\r\nthen it'll be shown here.", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee for which you want to remove the Pension", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "autoEnrolled": { + "description": "[readonly] Any Additional Voluntary Contribution the Employee has chosen to make\r\nOtherwise it is set as 1.", + "type": "boolean" }, - "400": { - "description": "Bad Request" + "avcIsPercentage": { + "description": "[readonly] Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage,", + "type": "boolean" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/pension/{pensionUniqueId}/{taxYear}/pensionytd": { - "get": { - "tags": [ - "Pension" - ], - "summary": "Get last PayRunEntry for a Pension (deprecated)", - "description": "This endpoint is now deprecated. You should use the alternative GET end point from PayRun\r\n \r\nGets a last PayRunEntry for a Pension.", - "operationId": "LastPayRunEntryWithPensionYtdValuesForEmployeePension", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Employee belongs", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "contributionCalculationDate": { + "description": "Nullable DateTime property \"ContributionCalculationDate\" to store the date of the latest earned date on the back pay lines when processing when earned pension summaries on a payment after leaving.\r\nApplicable only for when the pension summary is created on the base of when earned additions' and deductions' pension calculations for back paid periods and the pay run entry is marked as payment after leaving", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee you want to get pay run entry for", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employeePensionContribution": { + "description": "[readonly] The value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions", + "format": "double", + "type": "number" }, - { - "name": "pensionUniqueId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employeePensionContributionAvc": { + "description": "[readonly] The value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PayRunEntry" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRunEntry" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PayRunEntry" - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/pensionrefund": { - "post": { - "tags": [ - "PensionRefund" - ], - "summary": "Create Pension Refund", - "description": "Creates a Pension Refund for the Employee", - "operationId": "CreatePensionRefund", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employeePensionContributionAvcBfd": { + "description": "[readonly] The brought forward Year to Date value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PensionRefund" - } + "employeePensionContributionBfd": { + "description": "[readonly] The brought forward Year to Date value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions", + "format": "double", + "type": "number" + }, + "employeePensionContributionMultiplier": { + "description": "[readonly] If the PensionScheme is set to SubtractBasicRateTax then this value is used to reduce the contribution amount.\r\nOtherwise it is set as 1.", + "format": "double", + "type": "number" + }, + "employerPensionContribution": { + "description": "[readonly] The value of the Pension Contribution being made by the Employer for this Employee", + "format": "double", + "type": "number" + }, + "employerPensionContributionBfd": { + "description": "[readonly] The brought forward Year to Date value of the Pension Contribution being made by the Employer for this Employee", + "format": "double", + "type": "number" + }, + "endDate": { + "description": "Pension End Date", + "format": "date", + "nullable": true, + "type": "string" + }, + "forcedTier": { + "description": "[readonly] If the WorkerGroup ContributionLevelType is a Tiered Scheme then the name of the tier to force the employee on to may be specified.\r\nIf none is specified then the Tier is determined by the earnings in the period", + "nullable": true, + "type": "string" + }, + "isForEndedPension": { + "description": "[readonly] Determines whether the pension summary is related to a pension that has ended or not", + "type": "boolean" + }, + "isHalfContributionMember": { + "description": "if an employee as a member of the 50/50 LGPS scheme, they can enable contribution to 50% of the normal contributions.", + "type": "boolean" + }, + "isTeachersPension": { + "type": "boolean" + }, + "leaveDaysUnderHalfPay": { + "description": "The numer of leave days where less than half the normal pay is received", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "[readonly] The name of the PensionScheme to which contributions have been made.", + "nullable": true, + "type": "string" + }, + "nominalCodeMappings": { + "description": "List of Nominal Code Mappings of the Pension", + "items": { + "$ref": "#/components/schemas/PensionSchemeNominalCodeMapping" }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PensionRefund" - } + "nullable": true, + "type": "array" + }, + "nonPensionableStatutoryPay": { + "description": "Non pensionable statutory pay", + "format": "double", + "type": "number" + }, + "nonPensionableStatutoryPays": { + "additionalProperties": { + "format": "double", + "nullable": true, + "type": "number" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PensionRefund" - } + "description": "Non pensionable statutory pay per leave", + "nullable": true, + "type": "object" + }, + "nonTierablePay": { + "description": "[readonly] The value of any pay that shouldn't count towards determining a pension tier.", + "format": "double", + "type": "number" + }, + "notionalPay": { + "description": "Pay value based on regular pay lines and the pension's associated roles\r\nSet before any adjustments for things like stat payments", + "format": "double", + "type": "number" + }, + "notionalPayDetails": { + "description": "Notional pay details based on every occupational or custom leave affecting a teachers pension summary", + "items": { + "$ref": "#/components/schemas/LeaveNotionalPayDetails" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PensionRefund" - } - } - } - }, - "responses": { - "201": { - "description": "Created" + "nullable": true, + "type": "array" }, - "400": { - "description": "Bad Request" + "papdisEmployerId": { + "description": "[readonly] Papdis information from the PensionScheme", + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" + "papdisPensionProviderId": { + "description": "[readonly] Papdis information from the PensionScheme", + "nullable": true, + "type": "string" }, - "409": { - "description": "Conflict" - } - } - }, - "get": { - "tags": [ - "PensionRefund" - ], - "summary": "List Pension Refunds", - "description": "Lists all Pension Refunds for the Employee", - "operationId": "IndexPensionRefund", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionId": { + "description": "[readonly] The Id of the Pension.", + "format": "uuid", + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/pensionrefund/{id}": { - "get": { - "tags": [ - "PensionRefund" - ], - "summary": "Get Pension Refund", - "description": "Gets the Pension Refund specified by the Id for the Employee specified by the EmployeeId", - "operationId": "GetPensionRefund", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionRule": { + "$ref": "#/components/schemas/PensionRule" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionSchemeId": { + "description": "[readonly] The Id of the PensionScheme.", + "format": "uuid", + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Pension Refund you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PensionRefund" - } - } - } + "pensionableEarnings": { + "description": "[readonly] The amount of the Gross that is subject to Pension Deductions.\r\nIf the Pension Scheme uses Qualifying Earnings (upper and lower limits) then this value is before those are applied\r\nApplied only if an employee has more than one pension assigned to them", + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" - } - } - }, - "put": { - "tags": [ - "PensionRefund" - ], - "summary": "Update Pension Refund", - "operationId": "UpdatePensionRefund", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionableEarningsBfd": { + "description": "[readonly] The brought forward Year to Date amount of the Gross that is subject to Pension Deductions.\r\nApplied only if an employee has more than one pension assigned to them", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionablePay": { + "description": "[readonly] The amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup.\r\nApplied only if an employee has more than one pension assigned to them", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Pension Refund you want to update.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PensionRefund" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PensionRefund" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PensionRefund" - } + "pensionablePayBfd": { + "description": "[readonly] The brought forward Year to Date amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup.\r\nApplied only if an employee has more than one pension assigned to them", + "format": "double", + "type": "number" + }, + "pensionablePayCodes": { + "description": "[readonly] If the pension scheme is set to override the Pensionale PayCodes, then this is what they've been set to.", + "items": { + "type": "string" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PensionRefund" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PensionRefund" - } - } - } + "nullable": true, + "type": "array" }, - "404": { - "description": "Not Found" + "periodFrom": { + "description": "Nullable DateTime property \"PeriodFrom\" to store the start date of the PayPeriod the current PensionSummary is attributable to.\r\nApplicable only for when the pension summary is created on the base of when earned additions' and deductions' pension calculations for back paid periods", + "format": "date", + "nullable": true, + "type": "string" }, - "409": { - "description": "Conflict" - } - } - }, - "delete": { - "tags": [ - "PensionRefund" - ], - "summary": "Delete Pension Refund", - "description": "Deletes the Pension Refund specified by the Id for the Employee specified by the EmployeeId", - "operationId": "DeletePensionRefund", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "periodTo": { + "description": "Nullable DateTime property \"PeriodTo\" to store the start date of the PayPeriod the current PensionSummary is attributable to.\r\nApplicable only for when the pension summary is created on the base of when earned additions' and deductions' pension calculations for back paid periods", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "startDate": { + "description": "[readonly] Pension Start Date", + "format": "date", + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the Pension Refund you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "subtractedBasicRateTax": { + "description": "[readonly] The SubtractedBasicRateTax applied from the PensionScheme SubtractBasicRateTax.", + "type": "boolean" }, - "400": { - "description": "Bad Request" + "tierablePayPayCodes": { + "description": "[readonly] If the pension scheme is set to override the TierablePay PayCodes, then this is what they've been set to.", + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" }, - "404": { - "description": "Not Found" + "tiers": { + "items": { + "$ref": "#/components/schemas/TieredPensionRate" + }, + "nullable": true, + "type": "array" }, - "409": { - "description": "Conflict" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/pensionrefund/autocalculated": { - "post": { - "tags": [ - "PensionRefund" - ], - "summary": "Issue Pension Refund (deprecated)", - "description": "Creates a pension refund for full contribution amount for the current tax year for the current pensionScheme", - "operationId": "IssueRefundForCurrentPensionSchemePensionRefund", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "treatAsWhenPaidForBackPay": { + "description": "[readonly] Determines whether the pension summary should be treated as when paid when the earnings are based only on back pay", + "type": "boolean" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PensionRefund" - } - } - } + "whenEarnedEmployeePensionContributionAvcCorrection": { + "description": "[readonly] The when earned amount correction to Pension Contribution being made by this Employee as an Additional Voluntary Contribution", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "whenEarnedEmployeePensionContributionAvcCorrectionBfd": { + "description": "[readonly] The brought forward Year to Date when earned amount correction to Pension Contribution being made by this Employee as an Additional Voluntary Contribution", + "format": "double", + "type": "number" }, - "404": { - "description": "Not Found" + "whenEarnedEmployeePensionContributionCorrection": { + "description": "[readonly] The when earned amount correction to the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions", + "format": "double", + "type": "number" }, - "409": { - "description": "Conflict" - } - } - } - }, - "/employers/{employerId}/employees/{employeeId}/pensionrefund/{pensionId}/autocalculated": { - "post": { - "tags": [ - "PensionRefund" - ], - "summary": "Issue Pension Refund", - "description": "Creates a pension refund for full contribution amount for the current tax year for the current pension", - "operationId": "IssueRefundForPensionPensionRefund", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "whenEarnedEmployeePensionContributionCorrectionBfd": { + "description": "[readonly] The brought forward Year to Date when earned amount correction to the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "whenEarnedEmployerPensionContributionCorrection": { + "description": "[readonly] The when earned amount correction to the Pension Contribution being made by the Employer for this Employee", + "format": "double", + "type": "number" }, - { - "name": "pensionId", - "in": "path", - "description": "The Id of the pension for which you want to issue a refund.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PensionRefund" - } - } - } + "whenEarnedEmployerPensionContributionCorrectionBfd": { + "description": "[readonly] The brought forward Year to Date when earned amount correction to the Pension Contribution being made by the Employer for this Employee", + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "whenEarnedPensionSummaries": { + "description": "The list of pension summaries created on the base of when earned additions' and deductions' pension calculations for back paid periods", + "items": { + "$ref": "#/components/schemas/PensionSummary" + }, + "nullable": true, + "type": "array" }, - "404": { - "description": "Not Found" + "whenEarnedPensionableEarningsCorrection": { + "description": "[readonly] The when earned amount correction to the Gross that is subject to Pension Deductions.", + "format": "double", + "type": "number" }, - "409": { - "description": "Conflict" - } - } - } - }, - "/employers/{employerId}/pensionschemes": { - "get": { - "tags": [ - "PensionScheme" - ], - "summary": "List PensionSchemes", - "operationId": "IndexPensionScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list PensionSchemes", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } + "whenEarnedPensionableEarningsCorrectionBfd": { + "description": "[readonly] The brought forward Year to Date when earned amount correction to the Gross that is subject to Pension Deductions.", + "format": "double", + "type": "number" + }, + "whenEarnedPensionablePayCorrection": { + "description": "[readonly] The when earned amount correction to the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup.", + "format": "double", + "type": "number" + }, + "whenEarnedPensionablePayCorrectionBfd": { + "description": "[readonly] The brought forward Year to Date when earned amount correction to the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup.", + "format": "double", + "type": "number" + }, + "workerGroup": { + "$ref": "#/components/schemas/WorkerGroup" + }, + "workerGroupId": { + "description": "[readonly] The Id of the WorkerGroup.", + "format": "uuid", + "type": "string" } - } + }, + "type": "object" }, - "post": { - "tags": [ - "PensionScheme" - ], - "summary": "Create a PensionScheme", - "operationId": "CreatePensionScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PensionScheme" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PensionScheme" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PensionScheme" - } + "PensionSummaryCostBreakdown": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "The amount associated with this pension entry.", + "format": "double", + "type": "number" + }, + "employeePensionContribution": { + "description": "The contribution amount made by the employee towards the pension.", + "format": "double", + "type": "number" + }, + "employerPensionContribution": { + "description": "The contribution amount made by the employer towards the pension.", + "format": "double", + "type": "number" + }, + "payCodes": { + "description": "The list of pay codes associated with this pension rule.", + "items": { + "type": "string" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PensionScheme" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request" + "nullable": true, + "type": "array" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PensionScheme" - } - } - } + "pensionRule": { + "$ref": "#/components/schemas/PensionRule" }, - "404": { - "description": "Employer Not Found" + "pensionableEarnings": { + "description": "The total pensionable earnings relevant to this pension rule.", + "format": "double", + "type": "number" } - } - } - }, - "/employers/{employerId}/pensionschemes/{id}": { - "get": { - "tags": [ - "PensionScheme" + }, + "type": "object" + }, + "PensionablePayDefinition": { + "enum": [ + "NotApplicable", + "QualifyingEarnings", + "BasicPay", + "TotalPay", + "OwnDefinition" ], - "summary": "Get a PensionScheme", - "operationId": "GetPensionScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the PensionScheme belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PensionerPayroll": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Annual amount of occupational pension", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of the PensionScheme you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PensionScheme" - } - } - } + "bereaved": { + "description": "Indicator that Occupational Pension is being paid because they are a recently bereaved Spouse/Civil Partner", + "type": "boolean" + }, + "inReceiptOfPension": { + "description": "If set to true then the FPS will have the OccPenInd flag set to 'yes'", + "type": "boolean" + }, + "startDate": { + "description": "Start date of occupational Pension", + "format": "date", + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "put": { - "tags": [ - "PensionScheme" + "PercentOfPayBand": { + "enum": [ + "HundredPercent", + "BetweenFiftyAndHundredPercent", + "BelowFiftyPercent" ], - "summary": "Update a PensionScheme", - "operationId": "UpdatePensionScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "PeriodValue": { + "additionalProperties": false, + "properties": { + "annualValue": { + "description": "The Annual value", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PensionScheme" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PensionScheme" - } + "effectiveFrom": { + "description": "The date when these period values are effective", + "format": "date", + "nullable": true, + "type": "string" + }, + "midYearChanges": { + "description": "Any optional changes to the period values that are effective from a specified date in the middle of a tax year", + "items": { + "$ref": "#/components/schemas/PeriodValue" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PensionScheme" + "nullable": true, + "type": "array" + }, + "periodValues": { + "additionalProperties": false, + "description": "Period values for different pay periods", + "nullable": true, + "properties": { + "Custom": { + "format": "double", + "type": "number" + }, + "Daily": { + "format": "double", + "type": "number" + }, + "Fortnightly": { + "format": "double", + "type": "number" + }, + "FourWeekly": { + "format": "double", + "type": "number" + }, + "Monthly": { + "format": "double", + "type": "number" + }, + "Weekly": { + "format": "double", + "type": "number" } }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PensionScheme" - } - } + "type": "object" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PensionScheme" - } - } - } - }, - "404": { - "description": "Not Found" - } - } + "type": "object" }, - "delete": { - "tags": [ - "PensionScheme" - ], - "summary": "Delete a PensionScheme", - "operationId": "DeletePensionScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "PersonalDetails": { + "additionalProperties": false, + "properties": { + "address": { + "$ref": "#/components/schemas/Address" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "alternativeEmail": { + "format": "email", + "maxLength": 100, + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "dateOfBirth": { + "format": "date", + "type": "string" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/pensionschemes/{id}/employees": { - "get": { - "tags": [ - "PensionScheme" - ], - "summary": "Get Employees", - "description": "Returns the employees that are enrolled in the specified scheme", - "operationId": "EmployeesPensionScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the PensionScheme belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "email": { + "format": "email", + "maxLength": 100, + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the PensionScheme you want to retrieve Employees for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/pensionschemes/{id}/contributions/{taxYear}": { - "get": { - "tags": [ - "PensionScheme" - ], - "summary": "List Contributions", - "description": "Returns a list of Items that tell you which PayRuns contain contributions to this scheme and the Url to the relevant report.\r\nIF the scheme is connected to an ExternalDataProvider then the status of the submission will also be included.", - "operationId": "ListContributionsPensionScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the PensionScheme belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "emailPayslip": { + "description": "If set to true then the employees Payslip will be sent by email when a PayRun is finalised.", + "type": "boolean" }, - { - "name": "id", - "in": "path", - "description": "The Id of the PensionScheme.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "emailStatement": { + "description": "Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted.", + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear to query", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/pensionschemes/{id}/contributions/{taxYear}/{payPeriod}/{periodNumber}": { - "get": { - "tags": [ - "PensionScheme" - ], - "summary": "Contributions for Payrun", - "description": "Returns contributions for a specific scheme and payrun", - "operationId": "ContributionsForPayrunPensionScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the PensionScheme belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "firstName": { + "maxLength": 35, + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the PensionScheme.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "gender": { + "$ref": "#/components/schemas/Gender" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear to query", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "lastName": { + "maxLength": 35, + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "maritalStatus": { + "$ref": "#/components/schemas/MaritalStatus" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "middleName": { + "maxLength": 35, + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "404": { - "description": "Not Found" + "mobile": { + "maxLength": 30, + "nullable": true, + "type": "string" }, - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PensionContributionsSubmission" - } - } - } - } - } - } - }, - "/employers/{employerId}/pensionschemes/{id}/contributions/{taxYear}/{submissionId}": { - "post": { - "tags": [ - "PensionScheme" - ], - "summary": "Re-submit Contributions", - "description": "Re-submits previously failed Contributions to a Pension Scheme.", - "operationId": "ResubmitContributionsPensionScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the PensionScheme belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "niNumber": { + "maxLength": 15, + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the PensionScheme.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "partnerDetails": { + "$ref": "#/components/schemas/PartnerDetails" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear of the submission", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "passportNumber": { + "maxLength": 25, + "nullable": true, + "type": "string" }, - { - "name": "submissionId", - "in": "path", - "description": "The Id of the Submission to re-submit.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - }, - "get": { - "tags": [ - "PensionScheme" - ], - "summary": "Contributions Data", - "description": "Returns an ExternalProviderConversation showing data sent to and received from the ExternalDataProvider for the pension contribution submission.", - "operationId": "ContributionsPensionScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the PensionScheme belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pdfPassword": { + "description": "Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property.", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the PensionScheme.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pdfPasswordType": { + "$ref": "#/components/schemas/PdfPasswordType" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear of the submission", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "photoSasUrl": { + "nullable": true, + "type": "string" + }, + "photoUrl": { + "maxLength": 250, + "nullable": true, + "type": "string" }, - { - "name": "submissionId", - "in": "path", - "description": "The Id of the Submission.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExternalProviderConversation" - } - } - } - } - } - } - }, - "/employers/{employerId}/pensionschemes/{id}/contributions/{taxYear}/{submissionId}/markassent": { - "post": { - "tags": [ - "PensionScheme" - ], - "summary": "Mark as Sent", - "description": "Marks the Pension Contributions as sent", - "operationId": "MarkAsSentPensionScheme", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the PensionScheme belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "previousSurName": { + "maxLength": 35, + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the PensionScheme.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "statePensionAge": { + "description": "[readonly] Automatically calculated.", + "format": "int32", + "type": "integer" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear of the submission", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "telephone": { + "maxLength": 30, + "nullable": true, + "type": "string" }, - { - "name": "submissionId", - "in": "path", - "description": "The Id of the Submission.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExternalProviderConversation" - } - } - } + "title": { + "maxLength": 30, + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/processingnotes": { - "post": { - "tags": [ - "ProcessingNote" + }, + "required": [ + "dateOfBirth", + "gender", + "maritalStatus" ], - "summary": "Create ProcessingNote", - "description": "Creates a Processing Note for the PayRun.\r\nYou must have Bureau Features enabled and the payrun must be editable.", - "operationId": "CreateProcessingNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "PricingBand": { + "additionalProperties": false, + "properties": { + "description": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "from": { + "format": "int32", + "type": "integer" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "price": { + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/ProcessingNote" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessingNote" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/ProcessingNote" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/ProcessingNote" - } - } + "to": { + "format": "int32", + "type": "integer" } }, - "responses": { - "201": { - "description": "Success - the ProcessingNote has has been created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessingNote" - } - } - } + "type": "object" + }, + "PricingTable": { + "additionalProperties": false, + "properties": { + "bands": { + "items": { + "$ref": "#/components/schemas/PricingBand" + }, + "nullable": true, + "type": "array" }, - "400": { - "description": "Bad Request" + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - "404": { - "description": "Not Found" + "isDefault": { + "type": "boolean" + }, + "minimumCharge": { + "format": "double", + "type": "number" + }, + "name": { + "maxLength": 50, + "nullable": true, + "type": "string" + }, + "netSuiteDescription": { + "maxLength": 40, + "nullable": true, + "type": "string" + }, + "netSuiteItemCode": { + "maxLength": 20, + "nullable": true, + "type": "string" } - } + }, + "type": "object" }, - "get": { - "tags": [ - "ProcessingNote" + "ProRataRule": { + "enum": [ + "WorkingDaysInPeriod", + "CalendarDaysInPeriod", + "TwoSixtyRule", + "ThreeSixFiveRule" ], - "summary": "List ProcessingNotes for a PayRun", - "operationId": "ListProcessingNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "ProcessingNote": { + "additionalProperties": false, + "properties": { + "completedDate": { + "description": "UpdatedDate is assigned to this to get around the base implementation of UpdatedDate having [JsonIgnore] tag", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "date": { + "format": "date", + "type": "string" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "documentCount": { + "description": "[readonly] The number of attachments associated with this model", + "format": "int32", + "type": "integer" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "documents": { + "description": "[readonly] The attachments associated with this model", + "items": { + "$ref": "#/components/schemas/Item" + }, + "nullable": true, + "type": "array" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "payrunEntryId", - "in": "query", - "description": "Optionally filter ProcessingNotes to just those for the specified PayRunEntry", - "schema": { - "type": "string", - "format": "uuid" - } + "note": { + "minLength": 1, + "type": "string" + }, + "payRun": { + "$ref": "#/components/schemas/Item" + }, + "payRunEntryId": { + "description": "The Id of the payrunEntry this ProcessingNote relates to, if any", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/ProcessingNoteStatus" + }, + "updatedByName": { + "description": "Name of the user who was last to update the record", + "nullable": true, + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/Item" } + }, + "required": [ + "note" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/processingnotes/{id}": { - "get": { - "tags": [ - "ProcessingNote" + "type": "object" + }, + "ProcessingNoteStatus": { + "enum": [ + "New", + "Complete" ], - "summary": "Get a ProcessingNote", - "operationId": "GetProcessingNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "RecoverableAmounts": { + "additionalProperties": false, + "properties": { + "cisDeductionsSuffered": { + "description": "Value of CIS deductions suffered year to date", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "nicCompensationOnSAP": { + "description": "Value of NIC compensation on Statutory Adoption Pay year to date", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "nicCompensationOnSMP": { + "description": "Value of NIC compensation on SMP year to date", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "nicCompensationOnSNCP": { + "description": "Value of NIC compensation on Statutory Neonatal Care Pay year to date", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "nicCompensationOnSPBP": { + "description": "Value of NIC compensation on Statutory Parental Bereavement Pay year to date", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "nicCompensationOnSPP": { + "description": "Value of NIC compensation on Statutory Paternity Pay year to date", + "format": "double", + "type": "number" + }, + "nicCompensationOnShPP": { + "description": "Value of NIC compensation on Shared Parental Pay year to date", + "format": "double", + "type": "number" + }, + "sapRecovered": { + "description": "Value of Statutory Adoption Pay recovered year to date", + "format": "double", + "type": "number" + }, + "shPPRecovered": { + "description": "Value of Shared Parental Pay recovered year to date", + "format": "double", + "type": "number" + }, + "smpRecovered": { + "description": "Value of Statutory Maternity Pay recovered year to date", + "format": "double", + "type": "number" + }, + "sncpRecovered": { + "description": "Value of Statutory Neonatal Care Pay recovered year to date", + "format": "double", + "type": "number" + }, + "spbpRecovered": { + "description": "Value of Statutory Parental Bereavement Pay recovered year to date", + "format": "double", + "type": "number" + }, + "sppRecovered": { + "description": "Value of Statutory Paternity Pay recovered year to date", + "format": "double", + "type": "number" + }, + "taxMonth": { + "format": "int32", + "type": "integer" + }, + "total": { + "description": "The total value of the reclaimed amounts", + "format": "double", + "readOnly": true, + "type": "number" } + }, + "type": "object" + }, + "ReenrolmentStatus": { + "enum": [ + "NotStarted", + "InProgress", + "Completed" + ], + "type": "string" + }, + "Report": { + "enum": [ + "GrossToNet", + "GrossToNetCis", + "PayrunPayments", + "Furlough", + "PensionContribs", + "Journal", + "HourlyPay", + "UmbrellaReconciliation", + "UmbrellaStatement", + "StatutoryPay", + "CostAnalysis", + "CostOfEmployment", + "FullSummaryOfPay", + "P11", + "P11d", + "P30", + "P32", + "P45", + "P60", + "EmployeeExport", + "RightToWork", + "AeoStatement", + "HolidayAllowances", + "HolidayPayAccruals", + "AeAssessments", + "CisStatement", + "SubcontractorSummary", + "PayrollAnalysis", + "VarianceReport", + "P11Detailed", + "NiLetterValidation", + "Ytd", + "TaxCodeChanges", + "EmployeeBenefits", + "MemberEnrolment", + "AttachmentOrders", + "NiYtd", + "ApprenticeshipLevy", + "TeachersPensionEoy", + "MaternitySchedule", + "PaySpine", + "SpinePoint", + "PayGrades", + "PaySpineAllowances", + "AverageHolidayPayRate", + "EmployeeRoleExport", + "HolidayPayAccrualsHours", + "GenderPayGap", + "PensionMemberships", + "PayElement", + "LoanBalances", + "EmployeeLeave", + "AdvancedVarianceReport", + "EmployeePayments", + "EmployeeLoanExport", + "CombinedPensionContributions", + "CyclicReenrolment" + ], + "type": "string" + }, + "ReportCustomCssOption": { + "enum": [ + "UseDefault", + "AppendToDefault", + "ReplaceDefault" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessingNote" - } - } - } - } - } - } - }, - "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/processingnotes/{id}/status": { - "put": { - "tags": [ - "ProcessingNote" + "type": "string" + }, + "ReportFormat": { + "enum": [ + "Json", + "Csv", + "Pdf" ], - "summary": "Set a ProcessingNote status", - "description": "Set a ProcessingNote status.\r\nYou must have Bureau Features enabled and the payrun must be editable.", - "operationId": "SetStatusProcessingNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } - }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "type": "string" + }, + "ReportPack": { + "additionalProperties": false, + "description": "A ReportPack is used to group together a number of reports", + "properties": { + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "reports": { + "description": "The Reports included in this ReportPack", + "items": { + "$ref": "#/components/schemas/Report" + }, + "nullable": true, + "type": "array" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "title": { + "description": "The name of this ReportPack", + "maxLength": 150, + "minLength": 1, + "type": "string" } + }, + "required": [ + "title" ], - "requestBody": { + "type": "object" + }, + "ReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/ProcessingNoteStatus" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessingNoteStatus" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/ProcessingNoteStatus" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/ProcessingNoteStatus" - } - } - } - }, - "responses": { - "200": { - "description": "Success - the ProcessingNote status has been updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessingNote" - } - } - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "model": { + "description": "[readonly] If the type is application.json then this will contain a JSON representation of the relevant model", + "nullable": true }, - "404": { - "description": "Not Found" - } - } - } - }, - "/employers/{employerId}/payrun/{id}/documents": { - "post": { - "tags": [ - "ProcessingNote" - ], - "summary": "Add Document", - "description": "Adds document to the ProcessingNote", - "operationId": "AddDocumentProcessingNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "description": "The Id of the ProcessingNote you want to attach documents to", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/payrun/{id}/documents/{documentId}": { - "delete": { - "tags": [ - "ProcessingNote" - ], - "summary": "Delete ProcessingNote Document", - "description": "Deletes the document specified by the documentId for the ProcessingNote specified by the Id", - "operationId": "DeleteDocumentProcessingNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "documentId", - "in": "path", - "description": "The Id of the Document you want to delete.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "type": "object" + }, + "ReportSortBy": { + "enum": [ + "PayrollCode", + "LastName", + "Department" ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - } - } + "type": "string" }, - "get": { - "tags": [ - "ProcessingNote" + "ReportTemplateColumnType": { + "enum": [ + "CustomFixedData", + "EmployeeField", + "EmployerField", + "PayRunField", + "RoleField", + "PayDataField" ], - "summary": "Get ProcessingNote Document", - "description": "Gets the document specified by the documentId for the ProcessingNote specified by the Id", - "operationId": "GetDocumentProcessingNote", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "RightToWork": { + "additionalProperties": false, + "properties": { + "checked": { + "type": "boolean" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "documentExpiry": { + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "documentId", - "in": "path", - "description": "The Id of the Document you want to retrieve.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string", - "format": "binary" - } - } - } + "documentRef": { + "maxLength": 80, + "nullable": true, + "type": "string" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/reportbuilder/schedules": { - "post": { - "tags": [ - "ReportBuilder" - ], - "summary": "List PaySchedules", - "description": "Get PaySchedules based on the provided EmployerIds and TaxYears for running custom reports.", - "operationId": "GetPaySchedulesByEmployersAndTaxYearsReportBuilder", - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.PayScheduleRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PayScheduleRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PayScheduleRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.PayScheduleRequest" - } - } + "documentType": { + "$ref": "#/components/schemas/RightToWorkDocumentType" + }, + "note": { + "maxLength": 200, + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayScheduleResponseItem" - } - } - } - } - } - } - } - }, - "/reportbuilder/schedulesbydate": { - "post": { - "tags": [ - "ReportBuilder" + "type": "object" + }, + "RightToWorkDocumentType": { + "enum": [ + "Other", + "Visa", + "Passport", + "BirthCertificate", + "IdentityCard", + "ShareCode" ], - "summary": "List PaySchedules By Date Range", - "description": "Get PaySchedules based on the provided EmployerIds and pay dates for running custom reports.", - "operationId": "GetPaySchedulesByEmployerAndPayDatesReportBuilder", - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.PayScheduleByDateRangeRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PayScheduleByDateRangeRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.PayScheduleByDateRangeRequest" - } + "type": "string" + }, + "RightToWorkReport": { + "additionalProperties": false, + "properties": { + "employer": { + "$ref": "#/components/schemas/Item" + }, + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/RightToWorkReportLine" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.PayScheduleByDateRangeRequest" - } - } + "nullable": true, + "type": "array" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayScheduleResponseItem" - } - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/packs": { - "get": { - "tags": [ - "ReportPack" - ], - "summary": "List ReportPacks", - "description": "Lists all ReportPacks for an Employer.", - "operationId": "IndexReportPack", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list ReportPacks", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } - } - } - } + "type": "object" }, - "post": { - "tags": [ - "ReportPack" - ], - "summary": "Create ReportPack", - "description": "Creates a new ReportPack for the Employer.", - "operationId": "CreateReportPack", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/ReportPack" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportPack" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/ReportPack" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/ReportPack" - } - } + "RightToWorkReportLine": { + "additionalProperties": false, + "properties": { + "department": { + "nullable": true, + "type": "string" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "rightToWork": { + "$ref": "#/components/schemas/RightToWork" } }, - "responses": { - "400": { - "description": "Bad Request" + "type": "object" + }, + "RightToWorkReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportPack" - } - } - } + "model": { + "$ref": "#/components/schemas/RightToWorkReport" }, - "404": { - "description": "Employer Not Found" - } - } - } - }, - "/employers/{employerId}/reports/packs/{id}": { - "get": { - "tags": [ - "ReportPack" - ], - "summary": "Get ReportPack", - "description": "Gets the ReportPack specified.", - "operationId": "GetReportPack", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the ReportPack belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } + }, + "type": "object" + }, + "RoleBasis": { + "enum": [ + "NotApplicable", + "Permanent", + "Temporary", + "FixedTerm", + "ZeroHours", + "Casual", + "Supply" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportPack" - } - } - } - } - } + "type": "string" }, - "put": { - "tags": [ - "ReportPack" + "RoleType": { + "enum": [ + "NotApplicable", + "Teacher", + "Support", + "Other" ], - "summary": "Update ReportPack", - "description": "Updates a ReportPack for the Employer.", - "operationId": "UpdateReportPack", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "RtiAgent": { + "additionalProperties": false, + "properties": { + "address": { + "$ref": "#/components/schemas/Address" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/ReportPack" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportPack" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/ReportPack" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/ReportPack" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportPack" - } - } - } + "agentId": { + "nullable": true, + "type": "string" }, - "404": { - "description": "Employer Not Found" + "company": { + "nullable": true, + "type": "string" + }, + "contact": { + "$ref": "#/components/schemas/RtiContact" } - } + }, + "type": "object" }, - "delete": { - "tags": [ - "ReportPack" - ], - "summary": "Delete ReportPack", - "description": "Deletes the specified ReportPack.", - "operationId": "DeleteReportPack", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "RtiContact": { + "additionalProperties": false, + "properties": { + "email": { + "maxLength": 150, + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" + "firstName": { + "maxLength": 50, + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "lastName": { + "maxLength": 50, + "nullable": true, + "type": "string" + }, + "telephone": { + "maxLength": 50, + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/apprenticeshiplevy": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Apprenticeship Levy Details", - "operationId": "ApprenticeshipLevyDetailsReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "RtiEmployeeAddress": { + "additionalProperties": false, + "properties": { + "country": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear that the Apprenticeship Levy is for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "foreignCountry": { + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { + "line": { + "items": { "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/p60/{employeeId}": { - "get": { - "tags": [ - "Reports" - ], - "summary": "P60 For Employee", - "description": "Gets a P60 in PDF format for the TaxYear and Employee specified. A URL is returned which points to the PDF file.", - "operationId": "P60Reports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "nullable": true, + "type": "array" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "postCode": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear the P60 is for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "postcode": { + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/octet-stream": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } + "ukPostcode": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/p60": { - "get": { - "tags": [ - "Reports" - ], - "summary": "All P60s For TaxYear", - "description": "Returns all P60s in a single PDF file for the TaxYear and Employer specified\r\nIf you set the accept header to \"text/html\" then unlike other reports the html is NOT in the ```Content``` field.\r\nAs there are multiple HTML documents they are encoded as a JSON array of strings in the ```Model``` field.", - "operationId": "P60MultipleReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "RtiEmployeeName": { + "additionalProperties": false, + "properties": { + "fore": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear you want P60s for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "initials": { + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "sur": { + "nullable": true, + "type": "string" }, - { - "name": "excludeEmployeesWithP60EmailSent", - "in": "query", - "description": "Exclude Employees with Already Sent P60 Emails.", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/octet-stream": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } + "ttl": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/p60/email/{employeeId}": { - "post": { - "tags": [ - "Reports" + }, + "type": "object" + }, + "RtiSenderType": { + "enum": [ + "ActingInCapacity", + "Agent", + "Bureau", + "Company", + "Employer", + "Government", + "Individual", + "Other", + "Partnership", + "Trust" ], - "summary": "Email P60 to an Employee", - "description": "Email a P60 to an Employee", - "operationId": "EmailP60Reports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "RtiSubmissionSettings": { + "additionalProperties": false, + "properties": { + "agent": { + "$ref": "#/components/schemas/RtiAgent" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee you want the email a P60 to.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "allowLinkedEps": { + "description": "If set to true this will allow you to submit a combined Employer Payment Summary", + "type": "boolean" + }, + "autoSubmitEps": { + "description": "If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun.", + "type": "boolean" + }, + "autoSubmitFps": { + "description": "If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun", + "type": "boolean" + }, + "contact": { + "$ref": "#/components/schemas/RtiContact" + }, + "excludeNilPaid": { + "description": "Whether or not to include Employees paid a zero amount on your FPS", + "type": "boolean" + }, + "includeHashCrossRef": { + "description": "[readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions\r\nThis is automatically set to true if you use a bank payments CSV format that supports it\r\nor set to false if not", + "type": "boolean" + }, + "overrideTimestampValue": { + "description": "If a value is provided then it will be used as the timestamp on the RTI submission. This would normally only be used for testing purposes.", + "maxLength": 25, + "nullable": true, + "type": "string" + }, + "password": { + "description": "The Password used to submit RTI documents to HMRC", + "maxLength": 200, + "nullable": true, + "type": "string" + }, + "senderId": { + "description": "The SenderId used to submit RTI documents to HMRC", + "maxLength": 30, + "nullable": true, + "type": "string" + }, + "senderType": { + "$ref": "#/components/schemas/RtiSenderType" }, - { - "name": "taxYear", - "in": "query", - "description": "The TaxYear you want P60s for.", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "shouldCompressFps": { + "description": "If set to true this will compress the FPS before submitting to HMRC", + "type": "boolean" + }, + "testInLive": { + "description": "Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it", + "type": "boolean" + }, + "useTestGateway": { + "description": "If set to true then your RTI documents will be sent to HMRCs test services instead of the live service", + "type": "boolean" } - ], - "responses": { - "200": { - "description": "Success" + }, + "type": "object" + }, + "RtiValidationWarning": { + "additionalProperties": false, + "properties": { + "employeeId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/RtiValidationWarningType" } - } - } - }, - "/employers/{employerId}/reports/p60/email": { - "post": { - "tags": [ - "Reports" + }, + "type": "object" + }, + "RtiValidationWarningType": { + "enum": [ + "MissingAddress", + "MissingNiNo" ], - "summary": "Email P60 to all Employees", - "description": "Email P60 to all Employee", - "operationId": "EmailP60MultipleReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "ServiceBand": { + "additionalProperties": false, + "properties": { + "description": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "query", - "description": "The TaxYear you want P60s for.", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "entitlementBands": { + "items": { + "$ref": "#/components/schemas/EntitlementBand" + }, + "nullable": true, + "type": "array" }, - { - "name": "excludeEmployeesWithP60EmailSent", - "in": "query", - "description": "Exclude Employees with Already Sent P60 Emails.", - "schema": { - "type": "boolean", - "default": false - } + "from": { + "format": "int32", + "type": "integer" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "to": { + "format": "int32", + "type": "integer" } - ], - "responses": { - "200": { - "description": "Success" + }, + "type": "object" + }, + "ShiftWorkingPatternDay": { + "additionalProperties": false, + "properties": { + "day": { + "format": "int32", + "type": "integer" + }, + "hours": { + "format": "double", + "type": "number" + }, + "isWorkingDay": { + "type": "boolean" + }, + "workingPatternHoursType": { + "$ref": "#/components/schemas/WorkingPatternHoursType" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/p11d/{employeeId}": { - "get": { - "tags": [ - "Reports" + }, + "type": "object" + }, + "SmtpEncryption": { + "enum": [ + "Auto", + "Ssl", + "Tls" ], - "summary": "P11D For Employee", - "description": "Gets a P11D in PDF format for the TaxYear and Employee specified. A URL is returned which points to the PDF file.", - "operationId": "P11DReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "SmtpSettings": { + "additionalProperties": false, + "properties": { + "accessToken": { + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "encryption": { + "$ref": "#/components/schemas/SmtpEncryption" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear the P60 is for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "expiresAt": { + "format": "date", + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "expiresIn": { + "format": "int32", + "type": "integer" + }, + "refreshToken": { + "nullable": true, + "type": "string" + }, + "smtpPassword": { + "nullable": true, + "type": "string" + }, + "smtpPort": { + "format": "int32", + "type": "integer" + }, + "smtpServer": { + "nullable": true, + "type": "string" + }, + "smtpUsername": { + "nullable": true, + "type": "string" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/octet-stream": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } + }, + "type": "object" + }, + "SpinePointReport": { + "additionalProperties": false, + "properties": { + "isDraft": { + "type": "boolean" + }, + "lines": { + "items": { + "$ref": "#/components/schemas/SpinePointReportLine" + }, + "nullable": true, + "type": "array" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/p11d": { - "get": { - "tags": [ - "Reports" - ], - "summary": "All P11Ds For TaxYear", - "description": "Returns all P11Ds in a single PDF file for the TaxYear and Employer specified\r\nIf you set the accept header to \"text/html\" then unlike other reports the html is NOT in the ```Content``` field.\r\nAs there are multiple HTML documents they are encoded as a JSON array of strings in the ```Model``` field.", - "operationId": "P11DMultipleReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "SpinePointReportLine": { + "additionalProperties": false, + "properties": { + "annualValue": { + "description": "Annual Value of spine point", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "description": "The TaxYear you want P11Ds for.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "annualValueAltMax": { + "description": "Alt Max Annual Value of spine point", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "annualValueLAFringe": { + "description": "Annual Value LA Fringe of spine point", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "excludeEmployeesWithP11dEmailSent", - "in": "query", - "description": "Exclude Employees with Already Sent P11Ds Emails.", - "schema": { - "type": "boolean", - "default": false - } + "annualValueLAFringeAltMax": { + "description": "Annual Value LA Fringe Alt Max of spine point", + "format": "double", + "nullable": true, + "type": "number" + }, + "annualValueLAInner": { + "description": "Annual Value LA Inner of spine point", + "format": "double", + "nullable": true, + "type": "number" + }, + "annualValueLAInnerAltMax": { + "description": "Annual Value LA Inner Alt Max of spine point", + "format": "double", + "nullable": true, + "type": "number" + }, + "annualValueLAOuter": { + "description": "Annual Value LA Outer of spine point", + "format": "double", + "nullable": true, + "type": "number" + }, + "annualValueLAOuterAltMax": { + "description": "Annual Value LA Outer Alt Max of spine point", + "format": "double", + "nullable": true, + "type": "number" + }, + "department": { + "nullable": true, + "type": "string" + }, + "effectiveDate": { + "description": "Effective Date of spine point", + "format": "date", + "type": "string" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "number": { + "description": "Spine Point Number", + "format": "int32", + "type": "integer" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "spineName": { + "description": "Spine Name", + "nullable": true, + "type": "string" + }, + "spinePointName": { + "description": "Spine Point Name", + "nullable": true, + "type": "string" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/octet-stream": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } + }, + "type": "object" + }, + "SpinePointReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/SpinePointReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/p11d/email/{employeeId}": { - "post": { - "tags": [ - "Reports" + }, + "type": "object" + }, + "StarterDeclaration": { + "enum": [ + "A", + "B", + "C", + "Unknown" ], - "summary": "Email P11D to an Employee", - "description": "Email a P11D to an Employee", - "operationId": "EmailP11DReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "StarterDetails": { + "additionalProperties": false, + "properties": { + "overseasEmployerDetails": { + "$ref": "#/components/schemas/OverseasEmployerDetails" }, - { - "name": "employeeId", - "in": "path", - "description": "The Id of the Employee you want the email a P11D to.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionerPayroll": { + "$ref": "#/components/schemas/PensionerPayroll" }, - { - "name": "taxYear", - "in": "query", - "description": "The TaxYear you want P11Ds for.", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "startDate": { + "format": "date", + "type": "string" + }, + "starterDeclaration": { + "$ref": "#/components/schemas/StarterDeclaration" } + }, + "required": [ + "startDate", + "starterDeclaration" ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/reports/p11d/email": { - "post": { - "tags": [ - "Reports" + "type": "object" + }, + "StartersLeaversFilter": { + "enum": [ + "Starters", + "Leavers" ], - "summary": "Email P11D to all Employees", - "description": "Email P11D to all Employee", - "operationId": "EmailP11DMultipleReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "StatPayFrequency": { + "enum": [ + "DaysInPeriod", + "WeeksInPeriod" + ], + "type": "string" + }, + "StatutoryPay": { + "additionalProperties": false, + "description": "Part of the TaxYearConfig that our engine uses to calculate Statutory Pay.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "aweEligibilityThreshold": { + "format": "double", + "type": "number" + }, + "weeklyParentalLeaveAmount": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "weeklySickPayAmount": { + "description": "[readonly]", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "StatutoryPayReport": { + "additionalProperties": false, + "properties": { + "employer": { + "$ref": "#/components/schemas/Item" + }, + "endDate": { + "format": "date", + "type": "string" + }, + "endPeriodName": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "query", - "description": "The TaxYear you want P11Ds for.", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "isDraft": { + "type": "boolean" }, - { - "name": "excludeEmployeesWithP11DEmailSent", - "in": "query", - "description": "Exclude Employees with Already Sent P11D Emails.", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success" - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/papdis": { - "get": { - "tags": [ - "Reports" - ], - "summary": "PAPDIS File", - "description": "Returns a PAPDIS compliant file for the PayRun and Pension Provider PAPDIS Id specified", - "operationId": "PapdisFileReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "lines": { + "items": { + "$ref": "#/components/schemas/StatutoryPayReportLine" + }, + "nullable": true, + "type": "array" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "ordinal": { + "format": "int32", + "type": "integer" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "period": { + "format": "int32", + "type": "integer" }, - { - "name": "schemeId", - "in": "query", - "description": "The Id of the Pension Scheme you want a file for.", - "schema": { - "type": "string", - "format": "uuid" - } + "periodTo": { + "format": "int32", + "type": "integer" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "report": { + "$ref": "#/components/schemas/Report" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "startDate": { + "format": "date", + "type": "string" }, - { - "name": "csvFormat", - "in": "query", - "schema": { - "$ref": "#/components/schemas/PensionCsvFormat" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/PapdisDocumentReportResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PapdisDocumentReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/PapdisDocumentReportResponse" - } - }, - "text/xml": { - "schema": { - "$ref": "#/components/schemas/PapdisDocumentReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/PapdisDocumentReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/cis300/{id}": { - "get": { - "tags": [ - "Reports" - ], - "summary": "CIS300", - "description": "Returns a CIS300 as a CSV or human-readable report", - "operationId": "Cis300Reports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "startPeriodName": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "taxYear": { + "$ref": "#/components/schemas/TaxYear" }, - { - "name": "id", - "in": "path", - "description": "The Id of CIS300.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "title": { + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cis300ReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/Cis300ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/Cis300ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/Cis300ReportResponse" - } - } - } + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/fps/{id}": { - "get": { - "tags": [ - "Reports" - ], - "summary": "FPS", - "description": "Returns an FPS as a CSV file", - "operationId": "FpsReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "StatutoryPayReportLine": { + "additionalProperties": false, + "properties": { + "department": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "employee": { + "$ref": "#/components/schemas/Item" }, - { - "name": "id", - "in": "path", - "description": "The Id of FPS.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "hasStatPay": { + "readOnly": true, + "type": "boolean" }, - { - "name": "incAllEmployees", - "in": "query", - "description": "If true, then any employees that were paid earlier in the year but not on this FPS will also be included", - "schema": { - "type": "boolean" - } + "payrollCode": { + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FpsReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/FpsReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/exb/{id}": { - "get": { - "tags": [ - "Reports" - ], - "summary": "EXB", - "description": "Returns an EXB as a CSV file", - "operationId": "ExbReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "sap": { + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "shpp": { + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The Id of EXB.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "smp": { + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExbReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ExbReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/AeAssessments": { - "get": { - "tags": [ - "Reports" - ], - "summary": "AutoEnrolment Assessments", - "description": "Returns a list of Items representing your current Employees along with their most recent Auto Enrolment Assessment in the metadata field.", - "operationId": "AeAssessmentsReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "spbp": { + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ItemListReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ItemListReportResponse" - } - } - } + "spp": { + "format": "double", + "type": "number" + }, + "ssp": { + "format": "double", + "type": "number" + }, + "totalStatPay": { + "format": "double", + "readOnly": true, + "type": "number" } - } - } - }, - "/employers/{employerId}/reports/p45": { - "get": { - "tags": [ - "Reports" - ], - "summary": "P45 For Employee", - "description": "Get a P45 for an Employee you've marked as a leaver", - "operationId": "P45Reports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "StatutoryPayReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "query", - "description": "The Id of the Employee you want a P45 for.", - "schema": { - "type": "string", - "format": "uuid" - } + "model": { + "$ref": "#/components/schemas/StatutoryPayReport" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/octet-stream": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } + }, + "type": "object" + }, + "StringDecimalKeyValuePair": { + "additionalProperties": false, + "properties": { + "key": { + "nullable": true, + "type": "string" + }, + "value": { + "format": "double", + "type": "number" } - } - } - }, - "/employers/{employerId}/reports/p45/email": { - "post": { - "tags": [ - "Reports" - ], - "summary": "Email P45 to Employee", - "description": "Email a P45 to an Employee you've marked as a leaver", - "operationId": "EmailP45Reports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "StringStringDecimalValueTuple": { + "additionalProperties": false, + "properties": { + "item1": { + "nullable": true, + "type": "string" + }, + "item2": { + "nullable": true, + "type": "string" + }, + "item3": { + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "StringStringKeyValuePair": { + "additionalProperties": false, + "properties": { + "key": { + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "query", - "description": "The Id of the Employee you want the email a P45 to.", - "schema": { - "type": "string", - "format": "uuid" - } + "value": { + "nullable": true, + "type": "string" } + }, + "type": "object" + }, + "StudentLoan": { + "enum": [ + "None", + "PlanOne", + "PlanTwo", + "PlanFour" ], - "responses": { - "200": { - "description": "Success" + "type": "string" + }, + "StudentLoanRecovered": { + "additionalProperties": false, + "properties": { + "planType": { + "nullable": true, + "type": "string" + }, + "value": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{employeeId}/p11detailed": { - "get": { - "tags": [ - "Reports" + }, + "type": "object" + }, + "SubmissionStatus": { + "enum": [ + "NotSubmitted", + "Submitted", + "ErrorResponse", + "Accepted" ], - "summary": "P11 (Detailed)", - "description": "Returns a detailed P11 Report for the given employee.", - "operationId": "P11DetailedReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "employeeId", - "in": "path", - "description": "The employee Id of the employee you want to report on", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "taxYear", - "in": "path", - "description": "The tax year you want to report on.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "type": "string" + }, + "SupplementaryPayRunDetails": { + "additionalProperties": false, + "properties": { + "description": { + "description": "Description of the Supplementary Pay Run\r\nThis will be set to a default value if not set by the user", + "minLength": 1, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { + "employeeUniqueIds": { + "description": "List of employee unique ids to be included in a supplementary Payrun", + "items": { + "format": "uuid", "type": "string" - } + }, + "type": "array" + }, + "paymentDate": { + "description": "The intended date that the Employees included in the supplementary PayRun will be paid, although this can be changed on a per PayRunEntry basis\r\nThis date must be on or after the PaymentDate of the main PayRun", + "format": "date", + "type": "string" } + }, + "required": [ + "description", + "employeeUniqueIds", + "paymentDate" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/P11DetailedReportResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/P11DetailedReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/P11DetailedReportResponse" - } - } - } + "type": "object" + }, + "Tag": { + "additionalProperties": false, + "properties": { + "code": { + "description": "The unique code for this Tag", + "maxLength": 20, + "minLength": 1, + "type": "string" + }, + "color": { + "description": "A color to used to represent this Tag, in hex format. ie 'ff0000'", + "maxLength": 6, + "nullable": true, + "type": "string" + }, + "title": { + "description": "The title for this Tag", + "maxLength": 50, + "minLength": 1, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/p11detailed": { - "get": { - "tags": [ - "Reports" + }, + "required": [ + "code", + "title" ], - "summary": "All Detailed P11s For TaxYear", - "description": "Returns all detailed P11s in a single PDF file for the TaxYear and Employer specified\r\nIf you set the accept header to \"text/html\" then unlike other reports the html is NOT in the ```Content``` field.\r\nAs there are multiple HTML documents they are encoded as a JSON array of strings in the ```Model``` field.", - "operationId": "P11DetailedMultipleReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the employer you want to report on", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "TaxAndNi": { + "additionalProperties": false, + "properties": { + "foreignTaxCredit": { + "description": "If set to True you are enabling the possibility to enter an amount on payslip so you can reduce UK Tax liabilities.", + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "description": "The tax year you want to report on.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "niTable": { + "description": "The appropriate NI letter for this Employee", + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "postgradLoan": { + "description": "Set to true if the Employee needs to make Post Graduate Loan repayments", + "type": "boolean" + }, + "postgraduateLoanEndDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "postgraduateLoanStartDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "secondaryClass1NotPayable": { + "description": "If set to true then no Employer NI will be paid for this Employee", + "type": "boolean" + }, + "studentLoan": { + "$ref": "#/components/schemas/StudentLoan" + }, + "studentLoanEndDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "studentLoanStartDate": { + "format": "date", + "nullable": true, + "type": "string" + }, + "taxCode": { + "description": "The Tax Code for this Employee", + "maxLength": 12, + "nullable": true, + "type": "string" + }, + "week1Month1": { + "description": "Determines whether PAYE should be calculated on a Week1/Month1 basis instead of on a cumulative basis.\r\nThis is automatically set to false for any existing Employees when you start a new Tax Year.", + "type": "boolean" } + }, + "required": [ + "niTable" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } + "type": "object" + }, + "TaxBracket": { + "additionalProperties": false, + "properties": { + "from": { + "description": "[readonly] The starting point for applying this tax rate", + "format": "double", + "type": "number" + }, + "multiplier": { + "description": "[readonly] The tax rate to apply", + "format": "double", + "type": "number" + }, + "to": { + "description": "[readonly] The end point for applying this tax rate", + "format": "double", + "type": "number" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{employeeId}/p11": { - "get": { - "tags": [ - "Reports" - ], - "summary": "P11", - "description": "Returns a P11 Report, detailing all payments and deductions for the given employee", - "operationId": "P11Reports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "TaxCodeChange": { + "additionalProperties": false, + "description": "Part of the TaxYearConfig that our engine uses to perform the Year End routine.\r\nIt is used internally when our engine performs the Year End routine.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "increment": { + "description": "[readonly] The amount by which to increment Tax Codes with the given suffix", + "format": "int32", + "type": "integer" }, - { - "name": "employeeId", - "in": "path", - "description": "The employee Id of the employee you want to report on", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "suffix": { + "description": "[readonly] The suffix of the Tax Code that needs to be incremented for this Tax Year", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "TaxCodeChangeReport": { + "additionalProperties": false, + "properties": { + "isDraft": { + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "description": "The tax year you want to report on.", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "lines": { + "items": { + "$ref": "#/components/schemas/TaxCodeChangeValues" + }, + "nullable": true, + "type": "array" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "report": { + "$ref": "#/components/schemas/Report" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/P11ReportResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/P11ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/P11ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/P11ReportResponse" - } - } - } + }, + "type": "object" + }, + "TaxCodeChangeReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/TaxCodeChangeReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/p30/{periodEnding}": { - "get": { - "tags": [ - "Reports" + }, + "type": "object" + }, + "TaxCodeChangeValues": { + "additionalProperties": false, + "properties": { + "currentTaxCode": { + "nullable": true, + "type": "string" + }, + "employee": { + "$ref": "#/components/schemas/Item" + }, + "employeeId": { + "format": "int32", + "type": "integer" + }, + "firstName": { + "nullable": true, + "type": "string" + }, + "lastName": { + "nullable": true, + "type": "string" + }, + "niNumber": { + "nullable": true, + "type": "string" + }, + "payrollCode": { + "nullable": true, + "type": "string" + }, + "periodChange": { + "format": "int32", + "type": "integer" + }, + "previousTaxCode": { + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "TaxYear": { + "enum": [ + "Year2017", + "Year2018", + "Year2019", + "Year2020", + "Year2021", + "Year2022", + "Year2023", + "Year2024", + "Year2025" ], - "summary": "P30", - "description": "Returns a P30 Report summarising the employers HMRC liabilities for the period.\r\nFor available periods retrieve a list of HmrcLiability and examine the metadata.\r\nIf the accept header is set to \"text/csv\" then the periodEnding parameter is ignored and you'll receive a CSV for the entire TaxYear.", - "operationId": "P30Reports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "TaxYearConfig": { + "additionalProperties": false, + "description": "The configuation that our engine uses to perform calculations for the related TaxYear.\r\nIt is used internally when our engine performs any calculations or the Year End routine.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "apprenticeUpperSecondaryThreshold": { + "$ref": "#/components/schemas/PeriodValue" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "brackets": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/TaxBracket" + }, + "nullable": true, + "type": "array" }, - { - "name": "periodEnding", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } + "carCharge": { + "$ref": "#/components/schemas/CarCharge" + }, + "class1ANicsRate": { + "$ref": "#/components/schemas/DecimalTaxYearConfigPrimitiveValue" + }, + "deaProtectedEarnings": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "defaultTaxCode": { + "description": "[readonly]", + "nullable": true, + "type": "string" + }, + "directorsNiRates": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/NationalInsuranceCode" + }, + "nullable": true, + "type": "array" + }, + "directorsProratePrimaryThreshold": { + "$ref": "#/components/schemas/PeriodValue" + }, + "eligibleAeAge": { + "description": "[readonly]", + "format": "int32", + "type": "integer" + }, + "employmentAllowance": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "employmentAllowancePreviousYear": { + "description": "[readonly]", + "format": "double", + "type": "number" + }, + "fixedCodes": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/FixedCode" + }, + "nullable": true, + "type": "array" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/p32": { - "get": { - "tags": [ - "Reports" - ], - "summary": "P32", - "description": "Returns a P32 Report detailing the employers HMRC liabilities for the year.", - "operationId": "P32Reports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "freeportsUpperSecondaryThreshold": { + "$ref": "#/components/schemas/PeriodValue" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "govTalk": { + "$ref": "#/components/schemas/GovTalk" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/P32ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/P32ReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/P32ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/P32ReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payments/employee": { - "get": { - "tags": [ - "Reports" - ], - "summary": "PayRun Payments", - "description": "Returns a list of all employee payments that need to be made as a result of a Payrun.\r\nIf you specifically want just bank payments (employees where PayMethod is Credit) then you\r\nmay find the Bank Payment Instructions API call more useful", - "operationId": "PayRunPaymentsReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isPreview": { + "description": "[readonly] Indicates that this is a preview of the given years configuration and it shouldn't yet be used for live processing of payroll data.", + "type": "boolean" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "loanCharge": { + "$ref": "#/components/schemas/LoanCharge" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "lowerEarningsLimit": { + "$ref": "#/components/schemas/PeriodValue" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "maximumAeAge": { + "description": "[readonly]", + "format": "int32", + "type": "integer" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "mileageAllowancePaymentsRates": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/MileageAllowancePaymentsRate" + }, + "nullable": true, + "type": "array" }, - { - "name": "bankHoliday", - "in": "query", - "description": "Specifies the region whose bank holidays are to be considered in the operation.", - "schema": { - "$ref": "#/components/schemas/BankHolidayCollection" - } + "minimumAeAge": { + "description": "[readonly]", + "format": "int32", + "type": "integer" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "minimumWage": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/NationalMinimumWage" + }, + "nullable": true, + "type": "array" }, - { - "name": "includeNonEmployeePayments", - "in": "query", - "description": "If set to true then we'll also include payments that need to be made to HMRC and PensionProviders", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayrunPaymentsReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/PayrunPaymentsReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/PayrunPaymentsReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/PayrunPaymentsReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payrun-csv": { - "get": { - "tags": [ - "Reports" - ], - "summary": "PayRun CSV (deprecated)", - "description": "Download the lines of a PayRun to a CSV file.\r\nPlease use Get PayRun CSV that now accepts a parameter for CSV type", - "operationId": "PayRunCsvReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "niRates": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/NationalInsuranceCode" + }, + "nullable": true, + "type": "array" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "nicCompensationNormalEmployerRate": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "nicCompensationSmallEmployerRate": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "nicRecoverableNormalEmployerRate": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "nicRecoverableSmallEmployerRate": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "pensionAeEmployeeContribution": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "summary", - "in": "query", - "description": "If set to true then instead of a line-by-line CSV, you'll receive a summary for each employee", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payruncsv": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Get PayRun CSV", - "description": "Download the lines of a PayRun to a CSV file.", - "operationId": "GetPayRunCsvReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "pensionAeEmployerContribution": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "pensionAutomaticEnrolment": { + "$ref": "#/components/schemas/PeriodValue" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "pensionLowerThreshold": { + "$ref": "#/components/schemas/PeriodValue" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "pensionUpperThreshold": { + "$ref": "#/components/schemas/PeriodValue" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "plan1StudentLoanRate": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "csvType", - "in": "query", - "description": "Choose the type of CSV you want to generate", - "schema": { - "$ref": "#/components/schemas/PayRunCsvType" - } + "plan1StudentLoanThreshold": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "mappingId", - "in": "query", - "description": "If you provide the id of a PaymentCsvMapping that is column based then we'll return the CSV formatted accordingly", - "schema": { - "type": "string", - "format": "uuid" - } + "plan2StudentLoanRate": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string", - "default": "application/json" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/aeo/{employeeId}/{id}": { - "get": { - "tags": [ - "Reports" - ], - "summary": "AEO Statement", - "description": "Returns a statement for an Attachment Order, listing payments that have been made.", - "operationId": "AeoStatementReports", - "parameters": [ - { - "name": "employerId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } + "plan2StudentLoanThreshold": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "plan4StudentLoanRate": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "id", - "in": "path", - "description": "The id of the AttachmentOrder", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "plan4StudentLoanThreshold": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrderReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrderReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrderReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrderReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/gross-to-net": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Gross To Net", - "description": "Returns a report comparing employees' gross pay with their net pay for one or more pay periods.", - "operationId": "GrossToNetReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "postGradLoanRate": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "postGradLoanThreshold": { + "description": "[readonly]", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "primaryThreshold": { + "$ref": "#/components/schemas/PeriodValue" + }, + "scottishBrackets": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/TaxBracket" + }, + "nullable": true, + "type": "array" }, - { - "name": "fromPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "scottishFixedCodes": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/FixedCode" + }, + "nullable": true, + "type": "array" }, - { - "name": "toPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "secondaryThreshold": { + "$ref": "#/components/schemas/PeriodValue" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "statutoryPay": { + "$ref": "#/components/schemas/StatutoryPay" }, - { - "name": "sortBy", - "in": "query", - "description": "Defines the way to sort the data. Defaults to sorting by PayrollCode.", - "schema": { - "$ref": "#/components/schemas/ReportSortBy" - } + "taxCodeChanges": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/TaxCodeChange" + }, + "nullable": true, + "type": "array" }, - { - "name": "sortDescending", - "in": "query", - "description": "Defines whether to sort the data in descending order. Defaults to false.", - "schema": { - "type": "boolean" - } + "taxYear": { + "description": "[readonly] The TaxYear for which this configuration applies", + "format": "int32", + "type": "integer" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "tieredPensions": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/TieredPension" + }, + "nullable": true, + "type": "array" }, - { - "name": "forCis", - "in": "query", - "description": "If true then CIS Subcontractors are reported on.\r\n If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GrossToNetReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/GrossToNetReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/GrossToNetReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/GrossToNetReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/ytd": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Year To Date Values", - "description": "Returns a CSV file containing YTD values for all Employees on the payrun.", - "operationId": "PayrunYtdReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "upperAccrualPoint": { + "$ref": "#/components/schemas/PeriodValue" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "upperEarningsLimit": { + "$ref": "#/components/schemas/PeriodValue" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "upperSecondaryThreshold": { + "$ref": "#/components/schemas/PeriodValue" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "veteransUpperSecondaryThreshold": { + "$ref": "#/components/schemas/PeriodValue" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "welshBrackets": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/TaxBracket" + }, + "nullable": true, + "type": "array" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "welshFixedCodes": { + "description": "[readonly]", + "items": { + "$ref": "#/components/schemas/FixedCode" + }, + "nullable": true, + "type": "array" } + }, + "type": "object" + }, + "TaxYearTypes": { + "enum": [ + "Year2017", + "Year2018", + "Year2019", + "Year2020", + "Year2021", + "Year2022", + "Year2023", + "Year2024", + "Year2025" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/YtdReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/YtdReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/YtdReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/YtdReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/niytd": { - "get": { - "tags": [ - "Reports" + "type": "string" + }, + "TeachersPensionAgeWarning": { + "enum": [ + "EmployeeUnder16", + "EmployeeTurns16", + "EmployeeOver75", + "EmployeeTurns75" ], - "summary": "NI Year To Date Values", - "description": "Returns a CSV file containing NI YTD values for all Employees on the payrun.", - "operationId": "PayrunNiYtdReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "TeachersPensionDetails": { + "additionalProperties": false, + "description": "Used to represent additional information needed for \r\nTeachers' Pensions", + "properties": { + "employmentType": { + "$ref": "#/components/schemas/TeachersPensionEmploymentType" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "fullTimeSalary": { + "description": "Up to 7 digits, in pounds. eg 24000", + "format": "int32", + "nullable": true, + "type": "integer" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "mcrRoleId1": { + "description": "Data field for the Contract used for Teachers pension administration", + "maxLength": 15, + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "mcrRoleId2": { + "description": "The Job role within the contract used for Teachers pension administration", + "maxLength": 20, + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "partTimeSalaryPaid": { + "description": "Up to 7 digits, in pounds. eg 24000", + "format": "int32", + "nullable": true, + "type": "integer" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NiYtdReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/NiYtdReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/NiYtdReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/NiYtdReportReportResponse" - } - } - } + "teachersPensionAdminNiNumber": { + "description": "Where an employee does not have an NI number yet (or doesn't know their NI number) Teachers Pensions will issue an administrative NI number", + "maxLength": 9, + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/teachersPensionEoy": { - "get": { - "tags": [ - "Reports" + }, + "type": "object" + }, + "TeachersPensionEmploymentType": { + "enum": [ + "FullTime", + "PartTimeRegular", + "IrregularPartTime", + "IrregularPartTime_In" ], - "summary": "Teachers Pension Eoy Report", - "description": "Returns a report response containing the Teachers Pension EOYC Report", - "operationId": "TeachersPensionEoyReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "TeachersPensionEoyLineItem": { + "additionalProperties": false, + "properties": { + "contributorySalary": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "localAuthorityNumber", - "in": "query", - "schema": { - "type": "string" - } + "employersContributions": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "schoolEmployerType", - "in": "query", - "schema": { - "type": "string" - } + "percentageRate": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "teachersContributions": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeachersPensionEoyReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/TeachersPensionEoyReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/TeachersPensionEoyReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/TeachersPensionEoyReportReportResponse" - } - } - } + "tier": { + "format": "double", + "type": "number" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/costanalysis": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Cost Analysis", - "description": "Returns a report analysing the costs of a payrun or range of payruns.", - "operationId": "CostAnalysisReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "TeachersPensionEoyReport": { + "additionalProperties": false, + "properties": { + "additionalContributions": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "additionalPensionPayments": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "careerAverageFlexibilities": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "fromPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "efeArrears": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "toPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "employersContributionPercentage": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "employersContributions": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostAnalysisReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/CostAnalysisReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/CostAnalysisReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/costofemployment": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Cost Of Employment", - "description": "Returns a report detailing the employment cost per employee for a payrun or range of payruns.", - "operationId": "CostOfEmploymentReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "establishment": { + "$ref": "#/components/schemas/Establishment" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "isDraft": { + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "lineItems": { + "items": { + "$ref": "#/components/schemas/TeachersPensionEoyLineItem" + }, + "nullable": true, + "readOnly": true, + "type": "array" }, - { - "name": "fromPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "overallBalance": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "toPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "pdfFileName": { + "nullable": true, + "readOnly": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "prestonContributions": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostOfEmploymentReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/CostOfEmploymentReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/CostOfEmploymentReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/fullsummaryofpay": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Cost Of Employment", - "description": "Returns a report detailing the employment cost per employee for a payrun or range of payruns.", - "operationId": "FullSummaryOfPayReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "report": { + "$ref": "#/components/schemas/Report" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "taxYear": { + "$ref": "#/components/schemas/TaxYear" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "teachersContributions": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "period", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "title": { + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "totalContributions": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "totalContributorySalary": { + "format": "double", + "readOnly": true, + "type": "number" + }, + "totalEmployersContributions": { + "format": "double", + "readOnly": true, + "type": "number" + }, + "totalExtraContributions": { + "format": "double", + "readOnly": true, + "type": "number" + }, + "totalTeachersContributions": { + "format": "double", + "readOnly": true, + "type": "number" + }, + "tr22ElectionAmounts": { + "format": "double", + "readOnly": true, + "type": "number" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FullSummaryOfPayReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/FullSummaryOfPayReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/FullSummaryOfPayReportReportResponse" - } - } - } + }, + "type": "object" + }, + "TeachersPensionEoyReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/TeachersPensionEoyReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/statutory-pay": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Statutory Pay", - "description": "Returns a report detailing statutory pay for one or more pay periods.", - "operationId": "StatutoryPayReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "Tenant": { + "additionalProperties": false, + "description": "The Tenant model represents the brand that provides the account.\r\nThis is used by our White Label partners to manage and brand their user accounts.\r\nUnless you are an admin for a White Label account you'll have no interest in this model.", + "properties": { + "appName": { + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "approveNewUsers": { + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "billingSettings": { + "$ref": "#/components/schemas/TenantBillingSettings" }, - { - "name": "fromPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "brandCode": { + "description": "[readonly]", + "maxLength": 100, + "nullable": true, + "type": "string" }, - { - "name": "toPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "cssColorsFile": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "statutoryPayTypes", - "in": "query", - "description": "Comma separated values from (SAP, SHPP, SMP, SPBP, SPP)", - "schema": { - "type": "string" - } + "cssFile": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "disableEvc": { + "description": "Indicates whether FPS should be submitted to EVC for employees/employers under this tenant.", + "type": "boolean" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatutoryPayReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/StatutoryPayReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/StatutoryPayReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/StatutoryPayReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/variance": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Variance Report", - "description": "Returns a report comparing two pay periods or two ranges of pay periods.", - "operationId": "VarianceReportReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "enableAdminsToManageReportWriter": { + "description": "Indicates whether all Admin users of a tenant can manage report templates.", + "type": "boolean" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "enableBureauFeatures": { + "type": "boolean" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "enableReportWriterFeature": { + "description": "Indicates if the Report Writer feature is enabled for the tenant.", + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "favIcon": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "fromPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "headContent": { + "nullable": true, + "type": "string" }, - { - "name": "toPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "helpUrl": { + "maxLength": 250, + "nullable": true, + "type": "string" }, - { - "name": "payPeriodCompare", - "in": "query", - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "homeImgUrl": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "ordinalCompare", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "homeUrl": { + "nullable": true, + "type": "string" }, - { - "name": "taxYearCompare", - "in": "query", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "htmlInsertions": { + "items": { + "$ref": "#/components/schemas/TenantHtmlInsertion" + }, + "nullable": true, + "type": "array" }, - { - "name": "fromPeriodCompare", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "toPeriodCompare", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "logOutUrl": { + "maxLength": 150, + "nullable": true, + "type": "string" }, - { - "name": "showPercentage", - "in": "query", - "description": "If true then any variations will be shown as a percentage.", - "schema": { - "type": "boolean" - } + "loginImgUrl": { + "description": "[readonly]", + "nullable": true, + "type": "string" }, - { - "name": "minChange", - "in": "query", - "description": "Set a threshold for reporting variance. Ie, provide 0.10 and any variance below 10% will be ignored", - "schema": { - "type": "number", - "format": "double" - } + "mailSettings": { + "$ref": "#/components/schemas/MailSettings" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VarianceReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/VarianceReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/VarianceReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/VarianceReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/umbrella-reconciliation": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Umbrella Reconciliation", - "description": "Returns an Umbrella Reconciliation report.", - "operationId": "UmbrellaReconciliationReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "mailingList": { + "type": "boolean" + }, + "newUserSignupEmail": { + "format": "email", + "maxLength": 150, + "nullable": true, + "type": "string" + }, + "requireDdMandateBeforeAllowingBillableActivity": { + "type": "boolean" + }, + "signupUrl": { + "maxLength": 150, + "nullable": true, + "type": "string" + }, + "supportEmail": { + "format": "email", + "maxLength": 150, + "nullable": true, + "type": "string" + }, + "tenantOwnsBilling": { + "description": "[readonly]", + "type": "boolean" + }, + "termsUrl": { + "maxLength": 150, + "nullable": true, + "type": "string" + }, + "usersCanManageAccountSecuritySettings": { + "description": "If the users are allowed manage their own account security settings through a page or portal defined by their current authentication provider", + "type": "boolean" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "whiteLabelMode": { + "type": "boolean" + } + }, + "type": "object" + }, + "TenantBillingSettings": { + "additionalProperties": false, + "properties": { + "aggregatedPricing": { + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "billTo": { + "description": "If all activity for a Tenant is being biulled to a specifc user, set the email address here", + "nullable": true, + "type": "string" }, - { - "name": "fromPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "discount": { + "format": "double", + "type": "number" }, - { - "name": "toPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "monthlyMinimum": { + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "netSuiteDefaultDescription": { + "description": "[readonly] The product description used in the NetSuite billing if not specified in the pricing table", + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "netSuiteDefaultItemCode": { + "description": "[readonly] The item code used in the NetSuite billing if not specified in the pricing table", + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "query", - "description": "Specify an employee id to report on just that employee, otherwise all employees will be included.", - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UmbrellaReconciliationReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/UmbrellaReconciliationReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/UmbrellaReconciliationReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/UmbrellaReconciliationReportReportResponse" - } - } - } + "pricingTable": { + "description": "If BillTo is set, then specify a Pricing Table to use from the Staffology tenant, otherwise the default Staffology Pricing Table will be used", + "format": "uuid", + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/furlough": { - "get": { - "tags": [ - "Reports" - ], - "summary": "FurloughReport", - "description": "Returns a Furlough Report.", - "operationId": "FurloughReportReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "TenantEmail": { + "additionalProperties": false, + "properties": { + "afterBtnBody": { + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "attachments": { + "items": { + "$ref": "#/components/schemas/EmailAttachment" + }, + "nullable": true, + "type": "array" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "body": { + "nullable": true, + "type": "string" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "bodyPreview": { + "maxLength": 100, + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "buttonLink": { + "maxLength": 250, + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FurloughReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/FurloughReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/FurloughReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/FurloughReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/hourly-pay": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Hourly Pay", - "description": "Returns a report summarising the hourly pay for employees for one or more pay periods.", - "operationId": "HourlyPayReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "buttonText": { + "maxLength": 100, + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "sendAttempts": { + "format": "int32", + "type": "integer" }, - { - "name": "fromPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "status": { + "$ref": "#/components/schemas/BackgroundTaskStatus" }, - { - "name": "toPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "statusDate": { + "format": "date-time", + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "statusMessage": { + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "subject": { + "maxLength": 150, + "minLength": 1, + "type": "string" + }, + "toEmail": { + "maxLength": 150, + "minLength": 1, + "type": "string" + }, + "toName": { + "maxLength": 150, + "minLength": 1, + "type": "string" + }, + "webAppBaseUrl": { + "nullable": true, + "type": "string" } + }, + "required": [ + "subject", + "toEmail", + "toName" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HourlyPayReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/HourlyPayReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/HourlyPayReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/HourlyPayReportReportResponse" - } - } - } + "type": "object" + }, + "TenantHtmlInsertion": { + "additionalProperties": false, + "properties": { + "content": { + "nullable": true, + "type": "string" + }, + "insertionPoint": { + "$ref": "#/components/schemas/HtmlInsertionPoint" } - } - } - }, - "/employers/{employerId}/reports/holiday": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Holiday", - "description": "Returns a report summarising holiday usage for all employees.", - "operationId": "HolidayReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "TenantItem": { + "additionalProperties": false, + "description": "Represents a Tenant that the user account can administrate.\r\nUnless you are an admin for a White Label account you'll have no interest in this model.", + "properties": { + "id": { + "format": "uuid", + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "metadata": { + "nullable": true }, - { - "name": "accruals", - "in": "query", - "description": "If set to true then you'll receive a report for holiday pay accruals instead of holiday allowances. Defaults to false.", - "schema": { - "type": "boolean", - "default": false - } + "name": { + "nullable": true, + "type": "string" }, - { - "name": "accrualsHrs", - "in": "query", - "description": "If set to true then you'll receive a report for holiday pay accruals hours. Defaults to false.", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HolidayReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/HolidayReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/HolidayReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/HolidayReportReportResponse" - } - } - } + "url": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/right-to-work": { - "get": { - "tags": [ - "Reports" - ], - "summary": "RightToWork", - "description": "Returns a report summarising RightToWork information for all employees.", - "operationId": "RightToWorkReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "TieredPension": { + "additionalProperties": false, + "description": "Part of the TaxYearConfig that our engine uses to calculate tiered pension contributions.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "employerContribRate": { + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "rates": { + "items": { + "$ref": "#/components/schemas/TieredPensionRate" + }, + "nullable": true, + "type": "array" + }, + "type": { + "$ref": "#/components/schemas/PensionContributionLevelType" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RightToWorkReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/RightToWorkReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/RightToWorkReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/RightToWorkReportReportResponse" - } - } - } + }, + "type": "object" + }, + "TieredPensionRate": { + "additionalProperties": false, + "description": "Part of the TaxYearConfig that our engine uses to calculate tiered pension contributions.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes.", + "properties": { + "description": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "rangeStart": { + "format": "double", + "type": "number" + }, + "rate": { + "format": "double", + "type": "number" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payments/employee/credit": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Bank Payment Instructions", - "description": "Returns a list of bank payments that need to be made to employees as a result of a Payrun.\r\nYou can optionally provide a PaymentDate and only payments for that date will be returned.", - "operationId": "BankPaymentInstructionsReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "UmbrellaPayment": { + "additionalProperties": false, + "properties": { + "chargePerTimesheet": { + "description": "Override the settings for this employer by specifying a ChargePerTimeSheet.\r\nOr leave it as null to use the settings from the Employer", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "grossAddition": { + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "grossDeduction": { + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "hoursWorked": { + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "invoiceValue": { + "format": "double", + "type": "number" }, - { - "name": "paymentDate", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "mapsMiles": { + "format": "int32", + "type": "integer" }, - { - "name": "bankHoliday", - "in": "query", - "description": "Specifies the region whose bank holidays are to be considered in the operation.", - "schema": { - "$ref": "#/components/schemas/BankHolidayCollection" - } + "numberOfTimesheets": { + "format": "int32", + "type": "integer" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "otherExpenses": { + "format": "double", + "type": "number" }, - { - "name": "incPensions", - "in": "query", - "description": "Set to true and we'll include any payment due to Pension Providers", - "schema": { - "type": "boolean", - "default": false - } + "payrollCode": { + "description": "When importing multiple UmbrellaPayments this field is used to identify the employee", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "UmbrellaReconciliationReport": { + "additionalProperties": false, + "properties": { + "employer": { + "$ref": "#/components/schemas/Item" }, - { - "name": "incHmrc", - "in": "query", - "description": "Set to true and we'll include any payment due to HMRC", - "schema": { - "type": "boolean", - "default": false - } + "endDate": { + "format": "date", + "type": "string" }, - { - "name": "incAeos", - "in": "query", - "description": "Set to true and we'll include any payment due as a result of AttachmentOrders", - "schema": { - "type": "boolean", - "default": false - } + "endPeriodName": { + "nullable": true, + "type": "string" }, - { - "name": "incDeductions", - "in": "query", - "description": "Set to true and we'll include any payment due to Deductions that are set to be paid to a Payee", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BankPaymentInstructionReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/BankPaymentInstructionReportResponse" - } - }, - "application/zip": { - "schema": { - "$ref": "#/components/schemas/BankPaymentInstructionReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/cisstatement/{taxMonth}": { - "get": { - "tags": [ - "Reports" - ], - "summary": "CIS Statement", - "description": "Returns a CIS Statement for the employee specified.", - "operationId": "CisStatementReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isDraft": { + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "lines": { + "items": { + "$ref": "#/components/schemas/UmbrellaReconciliationReportLine" + }, + "nullable": true, + "type": "array" }, - { - "name": "taxMonth", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "ordinal": { + "format": "int32", + "type": "integer" }, - { - "name": "employeeId", - "in": "query", - "description": "Specify an employeeId to get a single statement.\r\n If you don't provide a value then all Subcontractors will be included.", - "schema": { - "type": "string", - "format": "uuid" - } + "payPeriod": { + "$ref": "#/components/schemas/PayPeriods" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/CisStatementListReportResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/CisStatementListReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/cissummary": { - "get": { - "tags": [ - "Reports" - ], - "summary": "CIS Subcontractor Summary", - "description": "Returns a list of all CIS Subcontractors along with verification details", - "operationId": "CisSubContractorSummaryReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "period": { + "format": "int32", + "type": "integer" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/CisSubContractorSummaryListReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/CisSubContractorSummaryListReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/CisSubContractorSummaryListReportResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/CisSubContractorSummaryListReportResponse" - } - } - } + "periodTo": { + "format": "int32", + "type": "integer" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "startDate": { + "format": "date", + "type": "string" + }, + "startPeriodName": { + "nullable": true, + "type": "string" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" + }, + "version": { + "format": "int32", + "nullable": true, + "type": "integer" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/payrunsummary": { - "get": { - "tags": [ - "Reports" - ], - "summary": "PayRunSummary", - "description": "Returns an array of PayRunSummaryLine for one or multiple periods. Similar to a PayRunJournal except that it can cover multiple periods.", - "operationId": "PayRunSummaryReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "UmbrellaReconciliationReportLine": { + "additionalProperties": false, + "properties": { + "appLevy": { + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "department": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "employee": { + "$ref": "#/components/schemas/Item" }, - { - "name": "fromPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "employeeCosts": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "toPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "employeeNi": { + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "employeePension": { + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "employerCosts": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "deptCode", - "in": "query", - "description": "If specified then only employees assigned to this department code at the time of the payrun will be included", - "schema": { - "type": "string" - } + "employerNi": { + "format": "double", + "type": "number" }, - { - "name": "includeQty", - "in": "query", - "description": "If set to true and acceptType is text/csv, then where a PayCode on a PayLine is a multiplier code we'll include a Qty value for the number of days/hours", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayRunSummaryLineIEnumerableReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/PayRunSummaryLineIEnumerableReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/analysis": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Analysis", - "description": "Returns an AnalysisReport for one or multiple periods.", - "operationId": "AnalysisReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employerPension": { + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "expenses": { + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "fee": { + "format": "double", + "type": "number" }, - { - "name": "fromPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "invoiceValue": { + "format": "double", + "type": "number" }, - { - "name": "toPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "netPay": { + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "payrollCode": { + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "period": { + "nullable": true, + "type": "string" }, - { - "name": "deptCode", - "in": "query", - "description": "If specified then only employees assigned to this department code at the time of the payrun will be included", - "schema": { - "type": "string" - } + "tax": { + "format": "double", + "type": "number" }, - { - "name": "showPayPeriodBreakdown", - "in": "query", - "description": "If set to true, then the report will show a breakdown of each period for each employee", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AnalysisReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/AnalysisReportReportResponse" - } - } - } + "total": { + "format": "double", + "readOnly": true, + "type": "number" + }, + "totalGross": { + "format": "double", + "type": "number" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/analysiscostbreakdown": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Analysis Cost Breakdown", - "description": "Returns an AnalysisCostBreakdownReport for one or multiple periods.", - "operationId": "PayrollAnalysisCostBreakdownReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "UmbrellaReconciliationReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/UmbrellaReconciliationReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "UsageBill": { + "additionalProperties": false, + "properties": { + "accountingCustomerId": { + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "accountingInvoiceId": { + "nullable": true, + "type": "string" }, - { - "name": "fromPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "accountingInvoiceLink": { + "nullable": true, + "type": "string" }, - { - "name": "toPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "discount": { + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "month": { + "format": "int32", + "type": "integer" }, - { - "name": "deptCode", - "in": "query", - "description": "If specified then only employees assigned to this department code at the time of the payrun will be included", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayrollAnalysisCostBreakdownReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/PayrollAnalysisCostBreakdownReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/analysisemployeerolebreakdown": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Payroll Analysis with Employee Role Breakdown", - "description": "Return a Payroll Analysis Report with Employee Role Breakdown for a specified pay period.\r\nIf a department code is specified, only employees assigned to this department at the time of the payrun will be included.", - "operationId": "PayrollAnalysisEmployeeRoleBreakdownReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "monthlyMinimum": { + "description": "This is actually an offset against the NetCost and doesn't contain the full MonthlyMinimum.", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "netCost": { + "description": "Net cost of any payslips, or the Pricing Table minimum, whichever is greater.", + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "paid": { + "type": "boolean" }, - { - "name": "fromPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "partnerDiscountAmount": { + "format": "double", + "type": "number" }, - { - "name": "toPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "payslipCount": { + "format": "int32", + "type": "integer" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "previouslyBilledPayslipCount": { + "description": "The number of payslips that appear in the usage, but were billed in a previous period", + "format": "int32", + "type": "integer" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "total": { + "format": "double", + "readOnly": true, + "type": "number" }, - { - "name": "deptCode", - "in": "query", - "description": "Optional. Filters employees by department code.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayrollAnalysisEmployeeRoleBreakdownReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/PayrollAnalysisEmployeeRoleBreakdownReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/{id}/payslip": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Payslip", - "description": "Returns a single Payslip for the given PayRunEntry of a PayRun. The type of response depends on the accept header.", - "operationId": "PayslipReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "usage": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "nullable": true, + "type": "array" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "useNetSuite": { + "type": "boolean" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "year": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "User": { + "additionalProperties": false, + "description": "Represents a User Account.\r\nAs well as basic details about the user it also includes details of Employers that the user account can access.", + "properties": { + "accountingCustomerId": { + "description": "[readonly] Used internally to manage billing", + "nullable": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "address": { + "$ref": "#/components/schemas/Address" }, - { - "name": "id", - "in": "path", - "description": "The Id of the PayRunEntry.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "apiMailingEnabled": { + "description": "Flag to keep the user up-to-date with any API changes and inform about upcoming breaking changes.", + "type": "boolean" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "authorization": { + "$ref": "#/components/schemas/UserAuthorization" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/PayslipReportResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayslipReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/PayslipReportResponse" - } - }, - "application/octet-stream": { - "schema": { - "$ref": "#/components/schemas/PayslipReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payslips": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Payslips", - "description": "Returns all Payslips for the given PayRun\r\nIf you set the accept header to \"text/html\" then unlike other reports the html is NOT in the ```Content``` field.\r\nAs there are multiple HTML documents they are encoded as a JSON array of strings in the ```Model``` field.", - "operationId": "PayslipsReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "bureauNotificationEmailAddress": { + "description": "If an email address is provided here then Bureau-related notifications will go to this address instead of the EmailAddress", + "format": "email", + "maxLength": 150, + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "businessName": { + "maxLength": 160, + "nullable": true, + "pattern": "^[A-Za-z0-9 ,;:'£()\\-\\.\\@\\$\\&]{1,160}$", + "type": "string" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "canCreateEmployers": { + "description": "[readonly] If false then the user cannot create new employers.\r\nThis can be turned on or off by the tenant admin.", + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "canEnablePremiumConnectors": { + "description": "Indicates whether the user has permission to enable the premium connectors feature.", + "type": "boolean" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "canUseBetaFeatures": { + "type": "boolean" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "canUseBureauFeatures": { + "type": "boolean" }, - { - "name": "unemailed", - "in": "query", - "description": "Set this to True if you only want the Payslips that haven't been sent by email", - "schema": { - "type": "boolean", - "default": false - } + "canUseReportWriter": { + "description": "Indicates whether the user has permission to use the report writer feature.", + "type": "boolean" }, - { - "name": "deptCode", - "in": "query", - "description": "Set if you want to filter by department", - "schema": { - "type": "string" - } + "category": { + "$ref": "#/components/schemas/UserCategory" }, - { - "name": "startersLeaversFilter", - "in": "query", - "schema": { - "$ref": "#/components/schemas/StartersLeaversFilter" - } + "directDebitMandate": { + "$ref": "#/components/schemas/DirectDebitMandate" }, - { - "name": "pageNum", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "disabled": { + "description": "[readonly] If true then any employers the owner managed will not be able to run new payruns.\r\nDisabledReason will give a reason why the account is disabled", + "type": "boolean" }, - { - "name": "pageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "disabledReason": { + "nullable": true, + "type": "string" }, - { - "name": "sortBy", - "in": "query", - "schema": { - "$ref": "#/components/schemas/PayRunEntrySortBy" - } + "displayPrefs": { + "$ref": "#/components/schemas/UserDisplayPreferences" }, - { - "name": "sortDescending", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/payslip/example/pdf": { - "post": { - "tags": [ - "Reports" - ], - "summary": "Example Payslip", - "description": "Use this operation to test your PayslipCustomisation.\r\nWe'll use dummy date and create a Payslip PDF or HTML document based on the customisation that you submit", - "operationId": "ExamplePayslipReports", - "parameters": [ - { - "name": "employerId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } + "emailAddress": { + "format": "email", + "maxLength": 150, + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "Your PayslipCustomisation.", - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PayslipCustomisation" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayslipCustomisation" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PayslipCustomisation" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PayslipCustomisation" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/employees": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Employee Export Details", - "description": "Returns a CSV file containing details for all Employees.", - "operationId": "EmployeeExportReports", - "parameters": [ - { - "name": "employerId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } + "emailVerificationKey": { + "format": "uuid", + "type": "string" }, - { - "name": "taxYear", - "in": "query", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "emailVerified": { + "type": "boolean" }, - { - "name": "includeBankAccountDetails", - "in": "query", - "schema": { - "type": "boolean" - } + "firstBillableActivityDate": { + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "includeYtd", - "in": "query", - "schema": { - "type": "boolean" - } + "firstName": { + "maxLength": 150, + "nullable": true, + "type": "string" }, - { - "name": "incPensionInfo", - "in": "query", - "schema": { - "type": "boolean" - } + "gdprOptin": { + "type": "boolean" }, - { - "name": "includePayInfo", - "in": "query", - "schema": { - "type": "boolean" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "includeNotes", - "in": "query", - "schema": { - "type": "boolean" - } + "industry": { + "$ref": "#/components/schemas/UserIndustry" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/ytd": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Year To Date Values", - "description": "Returns a CSV file containing YTD values for all Employees.", - "operationId": "YtdReports", - "parameters": [ - { - "name": "employerId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } + "inviteCode": { + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/niytd": { - "get": { - "tags": [ - "Reports" - ], - "summary": "NI Year To Date Values", - "description": "Returns a CSV file containing NI YTD values for all Employees.", - "operationId": "NiYtdReports", - "parameters": [ - { - "name": "employerId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } + "isActivated": { + "type": "boolean" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/taxcode": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Taxcode Change", - "description": "Returns a CSV file containing Tax Code Changes values for all Employees.", - "operationId": "TaxCodeChangesReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isBilledInNetSuite": { + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "isBureauMember": { + "description": "Indicates whether the user is a bureau member.", + "type": "boolean" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TaxCodeChangeReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/TaxCodeChangeReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/TaxCodeChangeReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/TaxCodeChangeReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/employers": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Employer Export", - "description": "Returns a CSV file containing details for all Employers.", - "operationId": "EmployerExportReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of any employer to which you have access. It wont affect the report results.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isSuperAdmin": { + "type": "boolean" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/NiLetterValidationReport": { - "get": { - "tags": [ - "Reports" - ], - "summary": "NI Letter Validation (Payrun)", - "description": "Checks the NI Letters allocated to employees on a specific payrun", - "operationId": "NiLetterValidationReportReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "jobTitle": { + "maxLength": 150, + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "jobType": { + "$ref": "#/components/schemas/UserJobType" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "lastLogin": { + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "lastName": { + "maxLength": 150, + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "loginDisabled": { + "description": "[readonly] If true then the user will not have login permissions", + "type": "boolean" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NiLetterValidationReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/NiLetterValidationReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/NiLetterValidationReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/NiLetterValidationReport": { - "get": { - "tags": [ - "Reports" - ], - "summary": "NI Letter Validation (Employees)", - "description": "Checks the NI Letters allocated to your employees. If no pay date is provided, the checks are based on today's date.", - "operationId": "NiLetterValidationReportEmployeesReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "migratedFrom": { + "maxLength": 150, + "minLength": 0, + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "monthlyMinimum": { + "$ref": "#/components/schemas/MonthlyMinimum" }, - { - "name": "payDate", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "pendingEmailAddress": { + "description": "If the user has requested to change their email address then the \r\naddress it'll be changed to after verification will be shown here.", + "format": "email", + "maxLength": 150, + "nullable": true, + "type": "string" }, - { - "name": "payPeriod", - "in": "query", - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "photo": { + "maxLength": 1000, + "nullable": true, + "type": "string" + }, + "photoSasUrl": { + "nullable": true, + "type": "string" + }, + "pricingTableId": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "registrationDate": { + "format": "date", + "type": "string" + }, + "registrationIp": { + "maxLength": 20, + "nullable": true, + "type": "string" + }, + "requestDdSetup": { + "description": "[readonly] If true then the user is required to set up a direct debit mandate", + "type": "boolean" + }, + "role": { + "$ref": "#/components/schemas/UserRole" + }, + "salutation": { + "maxLength": 35, + "nullable": true, + "pattern": "^[A-Za-z '\\-]{1,35}$", + "type": "string" + }, + "showBills": { + "description": "[readonly] Whether or not the user can see bills. This will be false if the Tenant manages billing and the user is not an admin for the Tenant", + "nullable": true, + "type": "boolean" + }, + "statedEmployeeCount": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "telephoneNumber": { + "maxLength": 20, + "nullable": true, + "type": "string" + }, + "tenant": { + "$ref": "#/components/schemas/Tenant" + }, + "userIdentifier": { + "maxLength": 150, + "nullable": true, + "type": "string" + }, + "utmInfo": { + "$ref": "#/components/schemas/UtmInfo" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NiLetterValidationReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/NiLetterValidationReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/NiLetterValidationReportReportResponse" - } - } - } + }, + "type": "object" + }, + "UserAuthorization": { + "additionalProperties": false, + "description": "This model provides information about what the User is able to access.\r\nThis would usually just be a list of Employers. But if the user is an administrator for a White Label instance then this will be shown in the list of Tenants.", + "properties": { + "employers": { + "description": "[readonly] A list of any Employers that the user can access", + "items": { + "$ref": "#/components/schemas/EmployerItem" + }, + "nullable": true, + "type": "array" + }, + "tenants": { + "description": "[readonly] A list of any Tenants that the user can administrate", + "items": { + "$ref": "#/components/schemas/TenantItem" + }, + "nullable": true, + "type": "array" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/EmployeeBenefits": { - "get": { - "tags": [ - "Reports" + }, + "type": "object" + }, + "UserCategory": { + "enum": [ + "ActiveTrialist", + "AgedActiveTrialist", + "LapsedTrialist", + "ActiveCustomer", + "LapsedCustomer", + "SubUser", + "AgedActiveTrialistAndSubUser", + "InternalUser" ], - "summary": "Employee Benefits", - "description": "Returns a output containing details for employee benefits.", - "operationId": "EmployeeBenefitsReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "UserDisplayPreferences": { + "additionalProperties": false, + "properties": { + "allowJournalResubmit": { + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "dontHideFpsEmployeeList": { + "type": "boolean" }, - { - "name": "reportType", - "in": "query", - "schema": { - "type": "string" - } + "enableCovid19Features": { + "type": "boolean" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployeeBenefitsReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/EmployeeBenefitsReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/EmployeeBenefitsReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/attachmentorders": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Attachment Orders", - "description": "Returns a report detailing attachment of earning order deductions for one or multiple periods.", - "operationId": "AttachmentOrdersReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "enableDpsXmlUpload": { + "type": "boolean" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "enableMultiEmployerImport": { + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "enablePayrunPagination": { + "type": "boolean" }, - { - "name": "fromPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "enablePayrunWarnings": { + "type": "boolean" }, - { - "name": "toPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "enableRtiTimestampOverride": { + "type": "boolean" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "enableWorkingDaysOverrides": { + "type": "boolean" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrdersReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrdersReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/AttachmentOrdersReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/changes": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Gets audit changes of all employees within a company.", - "operationId": "ChangesReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of any employer to which you have access.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "hidePayslipCheckboxes": { + "type": "boolean" }, - { - "name": "fromDate", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "hidePayslipSearchAndSort": { + "type": "boolean" }, - { - "name": "toDate", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "hideSalaryOnEmployeeIndexPage": { + "type": "boolean" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChangeSummaryListReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ChangeSummaryListReportResponse" - } - } - } + "showTaxCodeWhenViewingPayrunEntry": { + "type": "boolean" + }, + "showYtdInPayslipView": { + "type": "boolean" + }, + "showZeroes": { + "type": "boolean" + }, + "startPage": { + "$ref": "#/components/schemas/UserstartPage" } - } - } - }, - "/employers/{employerId}/reports/employerchanges": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Gets audit changes for a company.", - "operationId": "EmployerChangesReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of any employer to which you have access.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "UserEmployer": { + "additionalProperties": false, + "properties": { + "employerId": { + "format": "int32", + "type": "integer" }, - { - "name": "fromDate", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "toDate", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } + "isOwner": { + "type": "boolean" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "role": { + "$ref": "#/components/schemas/UserRole" + }, + "showOutstandingLoanBalancesOnly": { + "type": "boolean" + }, + "userId": { + "format": "int32", + "type": "integer" } + }, + "type": "object" + }, + "UserIndustry": { + "enum": [ + "NotSpecified", + "Agriculture", + "Apparel", + "Banking", + "Biotechnology", + "Chemicals", + "Communication", + "Construction", + "Consulting", + "Education", + "Engineering", + "Entertainment", + "Environmental", + "Finance", + "FoodAndBeverage", + "Government", + "Healthcare", + "Hospitality", + "Insurance", + "Legal", + "Machinery", + "Manufacturing", + "Media", + "NotForProfit", + "Other", + "Recreation", + "Retail", + "Shipping", + "Technology", + "Telecommunications", + "Transportation", + "Utilities" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChangeSummaryListReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ChangeSummaryListReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/paycodes": { - "get": { - "tags": [ - "Reports" + "type": "string" + }, + "UserJobType": { + "enum": [ + "BusinessOwner", + "PayrollManager", + "Accountant", + "Developer", + "SoftwareVendor", + "Other" ], - "summary": "Pay Code Export Details", - "description": "Returns details for all Pay Codes.", - "operationId": "PayCodeExportReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } + "type": "string" + }, + "UserRole": { + "enum": [ + "Admin", + "Editor", + "Reviewer", + "PayrollClientApprover", + "PayrollClientEditor", + "PayrollClientReviewer" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/payGrades": { - "get": { - "tags": [ - "Reports" + "type": "string" + }, + "UserstartPage": { + "enum": [ + "Dashboard", + "EmployerList", + "EmployeeList", + "Payroll", + "Rti", + "BureauDashboard" ], - "summary": "Pay Grade", - "description": "Returns a report for Pay Grade.", - "operationId": "PayGradesReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "UtmInfo": { + "additionalProperties": false, + "properties": { + "campaign": { + "nullable": true, + "type": "string" }, - { - "name": "effectiveDateFrom", - "in": "query", - "schema": { - "type": "string" - } + "content": { + "nullable": true, + "type": "string" }, - { - "name": "effectiveDateTo", - "in": "query", - "schema": { - "type": "string" - } + "medium": { + "nullable": true, + "type": "string" }, - { - "name": "paySpineId", - "in": "query", - "schema": { - "type": "string" - } + "source": { + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayGradesReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/PayGradesReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/PayGradesReportReportResponse" - } - } - } + "term": { + "nullable": true, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/spinepoints": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Spine Point", - "description": "Returns a report for Spine Point.", - "operationId": "SpinePointReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "ValueOverride": { + "additionalProperties": false, + "properties": { + "attachmentOrderId": { + "description": "The Id of the AttachmentOrder. Only relevant if the Type is set to AttachmentOrderDeductions", + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "paySpineId", - "in": "query", - "schema": { - "type": "string" - } + "leaveId": { + "description": "The Id of the associated Leave.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "note": { + "description": "The reason given for the override", + "maxLength": 150, + "nullable": true, + "type": "string" }, - { - "name": "effectiveDateFrom", - "in": "query", - "schema": { - "type": "string" - } + "originalValue": { + "description": "[readonly] The original value", + "format": "double", + "type": "number" }, - { - "name": "effectiveDateTo", - "in": "query", - "schema": { - "type": "string" - } + "pensionId": { + "description": "The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS", + "format": "uuid", + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SpinePointReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/SpinePointReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/SpinePointReportReportResponse" - } - } - } + "type": { + "$ref": "#/components/schemas/PayrollValueType" + }, + "value": { + "description": "The value to use in place of the original value", + "format": "double", + "type": "number" } - } - } - }, - "/employers/{employerId}/reports/payspines": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Pay Spine", - "description": "Returns a report for Pay Spine.", - "operationId": "PaySpineReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "VarianceReport": { + "additionalProperties": false, + "properties": { + "commonLines": { + "items": { + "$ref": "#/components/schemas/GrossToNetReportLine" + }, + "nullable": true, + "readOnly": true, + "type": "array" }, - { - "name": "paySpineId", - "in": "query", - "schema": { - "type": "string" - } + "hasDepartments": { + "readOnly": true, + "type": "boolean" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaySpineReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/PaySpineReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/PaySpineReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/averageholidaypayrate": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Average Holiday Pay Rate", - "description": "Returns a report for average holiday pay rate.", - "operationId": "AverageHolidayPayRateReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "hasVariances": { + "readOnly": true, + "type": "boolean" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "isDraft": { + "type": "boolean" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "joiners": { + "items": { + "$ref": "#/components/schemas/GrossToNetReportLine" + }, + "nullable": true, + "readOnly": true, + "type": "array" }, - { - "name": "period", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "leavers": { + "items": { + "$ref": "#/components/schemas/GrossToNetReportLine" + }, + "nullable": true, + "readOnly": true, + "type": "array" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "minimumChangePercentage": { + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "primary": { + "$ref": "#/components/schemas/GrossToNetReport" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "secondary": { + "$ref": "#/components/schemas/GrossToNetReport" + }, + "showDifferenceAsPercentage": { + "type": "boolean" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AverageHolidayPayRateReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/AverageHolidayPayRateReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/AverageHolidayPayRateReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/AverageHolidayPayRateReportReportResponse" - } - } - } + }, + "type": "object" + }, + "VarianceReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/VarianceReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } - } - } - }, - "/employeeroles": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Employee Export Roles Details", - "description": "Returns a CSV file containing details for all Employee Roles.", - "operationId": "EmployeeRoleExportReports", - "parameters": [ - { - "name": "employerId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "VeteranDetails": { + "additionalProperties": false, + "description": "Employment details for veterans", + "properties": { + "firstCivilianEmploymentDate": { + "description": "Date of Veteran's first civilian employment", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "isVeteran": { + "description": "Set to true if the employee is a veteran", + "type": "boolean" } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } + }, + "type": "object" + }, + "WarningsReport": { + "additionalProperties": false, + "properties": { + "lines": { + "items": { + "$ref": "#/components/schemas/WarningsReportLine" + }, + "nullable": true, + "type": "array" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" } - } - } - }, - "/employers/{employerId}/reports/downloadmaternityschedules": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Download Maternity Payment Schedule", - "description": "Returns a Maternity Pay schedule for employee", - "operationId": "DownloadMaternitySchedulesReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + }, + "type": "object" + }, + "WarningsReportLine": { + "additionalProperties": false, + "properties": { + "employeeName": { + "nullable": true, + "type": "string" }, - { - "name": "employeeId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } + "payrollCode": { + "nullable": true, + "type": "string" }, - { - "name": "id", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } + "warningMessage": { + "nullable": true, + "type": "string" + }, + "warningType": { + "$ref": "#/components/schemas/PayRunEntryWarningType" } - ], - "requestBody": { + }, + "type": "object" + }, + "WarningsReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Leave" - } - } + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/WarningsReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "application/octet-stream": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } + "type": "object" + }, + "Webhook": { + "additionalProperties": false, + "properties": { + "active": { + "description": "If set to false then this Webhook will not be triggered", + "type": "boolean" + }, + "eventCount": { + "description": "The number of times this webhook has been triggered", + "format": "int32", + "type": "integer" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "lastPayload": { + "$ref": "#/components/schemas/WebhookPayload" + }, + "url": { + "description": "The Url to which the payload should be sent", + "format": "uri", + "maxLength": 300, + "minLength": 1, + "type": "string" + }, + "webhookEvent": { + "$ref": "#/components/schemas/WebhookEvent" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/GenderPayGap": { - "get": { - "tags": [ - "Reports" + }, + "required": [ + "url" ], - "summary": "Gender Pay Gap", - "description": "Returns a report containing details for gender pay gap analysis.", - "operationId": "GenderPayGapReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "WebhookEvent": { + "enum": [ + "Employee_Created", + "Employee_Updated", + "Employee_Deleted", + "Payrun_Finalised", + "Payrun_StateChanged", + "PensionMembership_Created", + "PensionMembership_Updated", + "PensionMembership_Deleted", + "JobCompleted" + ], + "type": "string" + }, + "WebhookPayload": { + "additionalProperties": false, + "properties": { + "attempts": { + "description": "[readonly] The number of attempts that have been made to deliver this payload", + "format": "int32", + "type": "integer" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "created": { + "description": "[readonly] The date and time this payload was created", + "format": "date", + "readOnly": true, + "type": "string" + }, + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "[readonly] A descriptive name for this payload", + "maxLength": 150, + "nullable": true, + "type": "string" + }, + "payload": { + "description": "[readonly] the JSON payload that will be sent to the URl", + "nullable": true }, - { - "name": "genderPayGapSnapShotDate", - "in": "query", - "schema": { - "$ref": "#/components/schemas/GenderPayGapSnapShotDate" - } + "statusCode": { + "description": "[readonly] The status code received from the Url", + "format": "int32", + "type": "integer" }, - { - "name": "ordinaryPayCodeSetId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } + "statusMessage": { + "description": "[readonly] A message to accompany the status", + "maxLength": 150, + "nullable": true, + "type": "string" }, - { - "name": "bonusPayCodeSetId", - "in": "query", - "schema": { - "type": "string", - "format": "uuid" - } + "taskStatus": { + "$ref": "#/components/schemas/BackgroundTaskStatus" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GenderPayGapReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/GenderPayGapReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/GenderPayGapReportReportResponse" - } - } - } + "url": { + "description": "[readonly] The Url that payload will be sent to", + "format": "uri", + "maxLength": 300, + "minLength": 1, + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/pensionmemberships": { - "get": { - "tags": [ - "Reports" + }, + "required": [ + "url" ], - "summary": "Export Multiple Pension Memberships Report", - "description": "Returns a report for Multiple Pension Memberships", - "operationId": "PensionMembershipsReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "WorkerGroup": { + "additionalProperties": false, + "properties": { + "additionalVoluntaryContribution": { + "description": "Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage.", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "payPeriod", - "in": "query", - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "assumedPensionablePay": { + "$ref": "#/components/schemas/AssumedPensionablePay" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "avcIsPercentage": { + "description": "Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage,", + "nullable": true, + "type": "boolean" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "contributionLevelType": { + "$ref": "#/components/schemas/PensionContributionLevelType" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PensionMembershipsReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/PensionMembershipsReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/PensionMembershipsReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/PensionMembershipsReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/pay-element": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Pay Element", - "description": "Returns a report detailing pay elements for one or more pay periods.", - "operationId": "PayElementReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "customThreshold": { + "type": "boolean" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "employeeContribution": { + "format": "double", + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "employeeContributionIsPercentage": { + "type": "boolean" }, - { - "name": "fromPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "employerContribution": { + "format": "double", + "type": "number" }, - { - "name": "toPeriod", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "employerContributionIncludesNiSaving": { + "description": "Employer Contribution includes the Employers NI saving", + "type": "boolean" }, - { - "name": "payCodes", - "in": "query", - "description": "Comma separated values of pay codes, e.g., (BASIC,BASICANNUAL,BASICDAILY)", - "schema": { - "type": "string" - } + "employerContributionIsPercentage": { + "type": "boolean" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "employerContributionNiSaving": { + "description": "Employers NI Saving", + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PayElementReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/PayElementReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/PayElementReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/PayElementReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{payPeriod}/loanbalances": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Loan Balances", - "description": "Returns the Loan Balances report for the given pay schedule", - "operationId": "LoanBalancesReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "employerContributionNiSavingPercentage": { + "description": "Increase Employer Contribution by this percentage of the Employers NI saving", + "format": "double", + "type": "number" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "employerContributionTopUpPercentage": { + "description": "Increase Employer Contribution by this percentage of the Employee Contribution", + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "employerReference": { + "nullable": true, + "type": "string" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoanBalancesReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/LoanBalancesReportReportResponse" - } - }, - "text/html": { - "schema": { - "$ref": "#/components/schemas/LoanBalancesReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/LoanBalancesReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/PayrollRunWarnings": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Export Payroll Run Warnings", - "description": "Returns a report for payroll warnings", - "operationId": "WarningsReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "isAvc": { + "description": "Determines whether the workergroup uses additonal voluntary contributions.\r\nThis property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC.", + "type": "boolean" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "lgpsFund": { + "$ref": "#/components/schemas/LgpsFund" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "localAuthorityNumber": { + "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", + "maxLength": 3, + "nullable": true, + "pattern": "^(\\d{3})$", + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "lowerLimit": { + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WarningsReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/WarningsReportReportResponse" - } - }, - "application/pdf": { - "schema": { - "$ref": "#/components/schemas/WarningsReportReportResponse" - } - } - } + "matIdentifier": { + "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", + "maxLength": 3, + "nullable": true, + "pattern": "^(\\d{3}|)$", + "type": "string" + }, + "matUniqueNumber": { + "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", + "maxLength": 4, + "nullable": true, + "pattern": "^(\\d{4}|)$", + "type": "string" + }, + "name": { + "maxLength": 150, + "minLength": 1, + "type": "string" + }, + "papdisGroup": { + "maxLength": 40, + "nullable": true, + "type": "string" + }, + "papdisSubGroup": { + "maxLength": 40, + "nullable": true, + "type": "string" + }, + "payslipDescription": { + "description": "Used for overwriting the pension description that is displayed on the payslip", + "maxLength": 100, + "nullable": true, + "type": "string" + }, + "pensionablePayDefinition": { + "$ref": "#/components/schemas/PensionablePayDefinition" + }, + "schoolEmployerType": { + "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", + "maxLength": 4, + "nullable": true, + "pattern": "^(\\d{4})$", + "type": "string" + }, + "upperLimit": { + "format": "double", + "type": "number" + }, + "workerGroupId": { + "description": "[readonly]", + "format": "uuid", + "type": "string" } - } - } - }, - "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payrolljournalcsv": { - "get": { - "tags": [ - "Reports" + }, + "required": [ + "name" ], - "summary": "Payroll Journal CSV", - "description": "Download the lines of Payroll Journal to CSV file.", - "operationId": "PayrollJournalCsvReportReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "object" + }, + "WorkingPattern": { + "additionalProperties": false, + "properties": { + "bankHolidayDates": { + "description": "[readonly] The dates that are classed as Bank Holidays for this WorkingPattern", + "items": { + "format": "date-time", + "type": "string" + }, + "nullable": true, + "type": "array" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "bankHolidays": { + "$ref": "#/components/schemas/BankHolidayCollection" + }, + "contractedWeeks": { + "description": "The amount of weeks an employee works, utilise for employees who aren't working full time.\r\nIf Null then the default is used.", + "format": "double", + "nullable": true, + "pattern": "^([0-9]|[1234][0-9]|5[0-2])(\\.\\d{0,6})?$", + "type": "number" + }, + "effectiveFrom": { + "description": "The date when the assignment of the Working Pattern becomes effective.\r\nRequired for a Shift WorkingPattern to determine when it starts", + "format": "date", + "nullable": true, + "type": "string" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "fri": { + "format": "double", + "type": "number" }, - { - "name": "periodNumber", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "fullTimeContractedHours": { + "description": "The amount of hours an employee works (Full Time). If Null then the default is used.", + "format": "double", + "nullable": true, + "type": "number" }, - { - "name": "taxYear", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "fullTimeContractedWeeks": { + "description": "The amount of weeks an employee works (Full Time). If Null then the default is used.", + "format": "double", + "nullable": true, + "pattern": "^(52)(\\.\\d{0,6})?$", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "id": { + "description": "[readonly] The unique id of the object", + "format": "uuid", + "readOnly": true, + "type": "string" }, - { - "name": "deptBreakdown", - "in": "query", - "description": "Set to true and the journal will be split between any relevant Departments", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/employeeleave": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Employee Leave", - "description": "Returns the Employee Leave report for the selected tax year. If the tax year is not selected, returns the Employee Leave report for all the leave entries.", - "operationId": "EmployeeLeaveReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "isDefault": { + "type": "boolean" }, - { - "name": "taxYear", - "in": "query", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "mon": { + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployeeLeaveReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/EmployeeLeaveReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/advancedvariance": { - "get": { - "tags": [ - "Reports" - ], - "summary": "Advanced Variance Report", - "description": "Returns a report comparing one period to another period.", - "operationId": "AdvancedVarianceReportReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "proRataRule": { + "$ref": "#/components/schemas/ProRataRule" }, - { - "name": "payPeriod", - "in": "query", - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "sat": { + "format": "double", + "type": "number" }, - { - "name": "ordinal", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "shiftWorkingPatternDays": { + "items": { + "$ref": "#/components/schemas/ShiftWorkingPatternDay" + }, + "nullable": true, + "type": "array" }, - { - "name": "taxYear", - "in": "query", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "sun": { + "format": "double", + "type": "number" }, - { - "name": "period", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "thu": { + "format": "double", + "type": "number" }, - { - "name": "taxYearCompare", - "in": "query", - "schema": { - "$ref": "#/components/schemas/TaxYear" - } + "title": { + "maxLength": 100, + "minLength": 1, + "type": "string" }, - { - "name": "periodCompare", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } + "tue": { + "format": "double", + "type": "number" }, - { - "name": "payCodes", - "in": "query", - "schema": { - "type": "string" - } + "wed": { + "format": "double", + "type": "number" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } + "workingPatternEffectiveFrom": { + "format": "date", + "nullable": true, + "type": "string" + }, + "workingPatternHoursType": { + "$ref": "#/components/schemas/WorkingPatternHoursType" + }, + "workingPatternType": { + "$ref": "#/components/schemas/WorkingPatternType" } + }, + "required": [ + "title" ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdvancedVarianceReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/AdvancedVarianceReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports/{payPeriod}/employeepayments": { - "post": { - "tags": [ - "Reports" + "type": "object" + }, + "WorkingPatternHoursType": { + "enum": [ + "HoursPerDay", + "HoursPerWeek", + "HoursPerPattern" ], - "summary": "Employee Payments Report", - "description": "Returns a payments report for all employees for given pay schedule.", - "operationId": "EmployeePaymentsReportReports", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "type": "string" + }, + "WorkingPatternType": { + "enum": [ + "Standard", + "Shift" + ], + "type": "string" + }, + "YearEnd": { + "additionalProperties": false, + "description": "This model gives you a summary of what will happen when you confirm the closing of one year and the start of the next", + "properties": { + "createEpsForEmploymentAllowance": { + "description": "[readonly] Whether or not the system will automatically create an EPS to tell HMRC you qualify for Employment Allowance.", + "type": "boolean" }, - { - "name": "payPeriod", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/PayPeriods" - } + "createEpsForFinalSubmission": { + "description": "[readonly] Whether or not the system will automatically create an EPS to tell HMRC the year has ended.", + "type": "boolean" }, - { - "name": "accept", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeePaymentsReportRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeePaymentsReportRequest" - } + "createExb": { + "description": "[readonly] Whether or not the system will automatically create an EXB to inform HMRC of Expenses and Benefits", + "type": "boolean" + }, + "emailCisStatement": { + "description": "[readonly] Subcontractors who will be automatically sent an annual CIS Statement", + "items": { + "$ref": "#/components/schemas/Item" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeePaymentsReportRequest" - } + "nullable": true, + "type": "array" + }, + "emailP60": { + "description": "[readonly] Employees who will be automatically emailed P60s", + "items": { + "$ref": "#/components/schemas/Item" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.EmployeePaymentsReportRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployeePaymentsReportReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/EmployeePaymentsReportReportResponse" - } - } - } - } - } - } - }, - "/employers/{employerId}/reports-async/{templateId}": { - "post": { - "tags": [ - "ReportsAsync" - ], - "summary": "Execute report template", - "description": "Returns a job created to process a report using custom report templates. \r\nThis endpoint is being beta tested and subject to un-announced breaking changes.\r\nUse the GET of Jobs to get the status and response of the job.", - "operationId": "ExecuteCustomReportReportsAsync", - "parameters": [ - { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "nullable": true, + "type": "array" }, - { - "name": "templateId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.CustomReportRequest" - } + "endingYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "pushP60": { + "description": "[readonly] ExternalDataProviderIds to which P60s can be pushed", + "items": { + "$ref": "#/components/schemas/ExternalDataProviderId" }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.CustomReportRequest" - } + "nullable": true, + "type": "array" + }, + "removeWeek1Month1": { + "description": "[readonly] Employees that will have the Week1Month1 flag removed from their tax code", + "items": { + "$ref": "#/components/schemas/Item" }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.CustomReportRequest" - } + "nullable": true, + "type": "array" + }, + "setEmploymentAllowance": { + "description": "[readonly] If the Employment Allowance needs to be changed, this indicates the new value", + "format": "double", + "nullable": true, + "type": "number" + }, + "startingYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "taxCodeChanges": { + "description": "[readonly] Details of changes that wil be made to Tax Codes", + "items": { + "$ref": "#/components/schemas/YearEndTaxCodeChange" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.CustomReportRequest" - } - } + "nullable": true, + "type": "array" } }, - "responses": { - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.JobResponse" - } - } - } + "type": "object" + }, + "YearEndTaxCodeChange": { + "additionalProperties": false, + "description": "Forms part of the YearEnd model to list changes to Tax Codes", + "properties": { + "currentCode": { + "description": "[readonly] The Employees current tax code", + "nullable": true, + "type": "string" }, - "400": { - "description": "Bad Request" + "employee": { + "$ref": "#/components/schemas/Item" }, - "401": { - "description": "Unauthorized" + "newCode": { + "description": "[readonly] The new TaxCode for the employee", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "YtdReport": { + "additionalProperties": false, + "properties": { + "isDraft": { + "type": "boolean" }, - "403": { - "description": "Forbidden" + "lines": { + "items": { + "$ref": "#/components/schemas/EmployeeYtdValues" + }, + "nullable": true, + "type": "array" }, - "409": { - "description": "Conflict" - } - } - } - }, - "/contentdictionary": { - "get": { - "tags": [ - "ReportTemplate" - ], - "summary": "Get Content Dictionary For Report Template Column Type(beta)", - "description": "Gets the content dictionary for ReportTemplate columns type for employee and employer.", - "operationId": "GetContentDictionaryReportTemplate", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.ReportTemplateContentDictionaryResponse" - } - } - } - } + "payrun": { + "$ref": "#/components/schemas/PayRun" + }, + "report": { + "$ref": "#/components/schemas/Report" + }, + "taxYear": { + "$ref": "#/components/schemas/TaxYear" + }, + "title": { + "nullable": true, + "type": "string" } - } - } - }, - "/column/validate": { - "post": { - "tags": [ - "ReportTemplate" - ], - "summary": "Validate Report Template Columns(beta)", - "description": "Validates the specified Report Template columns.", - "operationId": "ValidateReportTemplateColumnsReportTemplate", - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateColumnRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateColumnRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateColumnRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateColumnRequest" - } - } + }, + "type": "object" + }, + "YtdReportReportResponse": { + "additionalProperties": false, + "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details", + "properties": { + "content": { + "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", + "nullable": true, + "type": "string" + }, + "model": { + "$ref": "#/components/schemas/YtdReport" + }, + "stream": { + "description": "byte array", + "format": "byte", + "nullable": true, + "type": "string" + }, + "type": { + "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", + "nullable": true, + "type": "string" } }, - "responses": { - "200": { - "description": "Success" + "type": "object" + }, + "YtdValue": { + "additionalProperties": false, + "properties": { + "broughtForward": { + "format": "double", + "type": "number" }, - "400": { - "description": "Bad Request" + "period": { + "format": "double", + "type": "number" + }, + "type": { + "$ref": "#/components/schemas/PayrollValueType" + }, + "value": { + "format": "double", + "readOnly": true, + "type": "number" } - } + }, + "type": "object" + }, + "ZeroPaidFilter": { + "enum": [ + "NegativePaid", + "ZeroPaid", + "NonZeroPaid" + ], + "type": "string" } }, - "/employers/{employerId}/reporttemplate": { + "securitySchemes": { + "Basic": { + "description": "If you have an API Key then enter is as the password.
The username can be anything you like.", + "scheme": "basic", + "type": "http" + } + } + }, + "info": { + "contact": { + "email": "hello@staffology.co.uk", + "name": "IRIS Customer Support", + "url": "https://www.staffology.co.uk" + }, + "title": "Staffology Payroll API", + "version": "v1" + }, + "openapi": "3.0.1", + "paths": { + "/account": { "get": { - "tags": [ - "ReportTemplate" - ], - "summary": "List Report Templates (beta)", - "description": "Lists all Report Templates for an Employer.", - "operationId": "IndexReportTemplate", + "description": "Returns the details for the authorised account.", + "operationId": "GetAccount", "parameters": [ { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Report Template belongs.", - "required": true, + "description": "You can leave this empty, it's for internal use only.", + "in": "query", + "name": "defaults", "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } + "type": "string" } - } - } - }, - "post": { - "tags": [ - "ReportTemplate" - ], - "summary": "Create Report Template (beta)", - "description": "Creates a new Report Template for the Employer.", - "operationId": "CreateReportTemplate", - "parameters": [ + }, { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Report Template belongs.", - "required": true, + "description": "You can leave this empty, it's for internal use only.", + "in": "query", + "name": "defaultsKey", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateRequest" - } - } - } - }, "responses": { - "400": { - "description": "Bad Request" - }, - "201": { - "description": "Created", + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateResponse" + "$ref": "#/components/schemas/User" } } - } + }, + "description": "Success" } - } + }, + "summary": "Get Account Details", + "tags": [ + "Account" + ] } }, - "/employers/{employerId}/reporttemplate/{id}": { + "/account/Tenant": { "get": { - "tags": [ - "ReportTemplate" - ], - "summary": "Get Report Template (beta)", - "description": "Gets the Report Template specified.", - "operationId": "GetReportTemplate", + "description": "Returns branding details for the specified tenant. This is used by the web app and is unlikely to be used by third-parties.", + "operationId": "GetTenantAccount", "parameters": [ { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Report Template belongs.", - "required": true, + "in": "query", + "name": "tenantId", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } }, { - "name": "id", - "in": "path", - "description": "The Id of the Report Template which you want to fetch", - "required": true, + "in": "query", + "name": "key", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateResponse" + "$ref": "#/components/schemas/Tenant" } } - } - }, - "404": { - "description": "Employer or Report Template Not Found" - }, - "400": { - "description": "Bad Request" + }, + "description": "Success" } - } - }, - "put": { + }, + "summary": "Get Tenant", "tags": [ - "ReportTemplate" - ], - "summary": "Update Report Template (beta)", - "description": "Updates a Report Template for the Employer.", - "operationId": "UpdateReportTemplate", + "Account" + ] + } + }, + "/account/activate": { + "post": { + "description": "New accounts need to be activated to confirm Terms and Conditions have been accepted.", + "operationId": "ActivateAccount", "parameters": [ { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Report Template belongs.", - "required": true, + "in": "query", + "name": "brandCode", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } }, { - "name": "id", - "in": "path", - "description": "The Id of the Report Template which you want to fetch", - "required": true, + "description": "If autoActivate is set to true, the account activation should be automatically performed without any user interaction", + "in": "query", + "name": "autoActivate", "schema": { - "type": "string", - "format": "uuid" + "default": false, + "type": "boolean" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateRequest" + "$ref": "#/components/schemas/User" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateRequest" + "$ref": "#/components/schemas/User" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateRequest" + "$ref": "#/components/schemas/User" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateRequest" + "$ref": "#/components/schemas/User" } } } }, "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.ReportTemplateResponse" + "$ref": "#/components/schemas/User" } } - } - }, - "404": { - "description": "Employer or Report Template Not Found" - }, - "400": { - "description": "Bad Request" + }, + "description": "Your account has been activated" } - } - }, - "delete": { + }, + "summary": "Activate an Account", "tags": [ - "ReportTemplate" - ], - "summary": "Delete Report Template (beta)", - "description": "Deletes the specified Report Template.", - "operationId": "DeleteReportTemplate", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Report Template belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "id", - "in": "path", - "description": "The Id of the Report Template which you want to fetch", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], + "Account" + ] + } + }, + "/account/demo": { + "post": { + "description": "Creates a demo employer for the user", + "operationId": "CreateDemoEmployerAccount", "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "404": { - "description": "Employer or Report Template Not Found" + "201": { + "description": "Created" } - } + }, + "summary": "Create Demo Employer", + "tags": [ + "Account" + ] } }, - "/employers/{employerId}/tags": { - "get": { - "tags": [ - "Tag" - ], - "summary": "List Tags", - "description": "Lists all Tags for an Employer.", - "operationId": "IndexTag", + "/account/emailaddress": { + "post": { + "description": "The user.PendingEmailAddress will be set to the give address and a new verification email will be sent.\r\nOnce the link in the email is clicked on then the user account will be updated to use the new email address", + "operationId": "ChangeEmailAddressAccount", "parameters": [ { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer for which you want to list Tags", - "required": true, + "in": "query", + "name": "emailAddress", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } + "$ref": "#/components/schemas/User" } } - } + }, + "description": "Your account has been activated" } - } - }, - "post": { + }, + "summary": "Change Email Address", "tags": [ - "Tag" - ], - "summary": "Create Tag", - "description": "Creates a new Tag for the Employer.", - "operationId": "CreateTag", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Tag belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } + "Account" + ] + } + }, + "/account/employerdefaults": { + "get": { + "description": "Get the EmployerDefaults for the currently authorised User.", + "operationId": "GetEmployerDefaultsAccount", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerDefaults" + } + } + }, + "description": "Success" } - ], + }, + "summary": "Get EmployerDefaults", + "tags": [ + "Account" + ] + }, + "put": { + "description": "Set the EmployerDefaults for the currently authorised User.", + "operationId": "SetEmployerDefaultsAccount", "requestBody": { - "description": "The new values for the Tag you want to update.", "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/EmployerDefaults" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/EmployerDefaults" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/EmployerDefaults" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/EmployerDefaults" } } } }, "responses": { - "400": { - "description": "Bad Request" - }, - "201": { - "description": "Created", + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/EmployerDefaults" } } - } - }, - "404": { - "description": "Employer Not Found" + }, + "description": "Success" } - } + }, + "summary": "Set EmployerDefaults", + "tags": [ + "Account" + ] } }, - "/employers/{employerId}/tags/{code}": { + "/account/invitations": { "get": { - "tags": [ - "Tag" - ], - "summary": "Get Tag (deprecated)", - "description": "Gets the Tag specified.", - "operationId": "GetTag", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Tag belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "code", - "in": "path", - "description": "The code of the Tag you want to retrieve.", - "required": true, - "schema": { - "type": "string" - } - } - ], + "description": "Returns any pending Invitations for the authorised user.\r\nIf the email address isn't yet verified then the Name displayed in the Item will be the users email address instead of the company name.\r\nInvitations cannot be accepted until the email address for the user is verified.", + "operationId": "GetInvitationsAccount", "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Tag" + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" } } - } + }, + "description": "Success" } - } - }, - "put": { + }, + "summary": "Get Invitations", "tags": [ - "Tag" - ], - "summary": "Update Tag (deprecated)", - "description": "Updates a Tag for the Employer.", - "operationId": "UpdateTag", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Tag belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "code", - "in": "path", - "description": "The existing code of the Tag you want to update.", - "required": true, - "schema": { - "type": "string" - } + "Account" + ] + } + }, + "/account/keys": { + "get": { + "description": "", + "operationId": "ListApiKeysAccount", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } - ], + }, + "summary": "List ApiKeys", + "tags": [ + "Account" + ] + }, + "post": { + "description": "Creates a new APIKey. The only property that's required or used is Name.\r\nA new ApiKey will be generated and returned to you.", + "operationId": "CreateApiKeyAccount", "requestBody": { - "description": "The new values for the Tag you want to update.", "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/Item" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/Item" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/Item" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/Item" } } } }, "responses": { - "200": { - "description": "Success", + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/Item" } } - } - }, - "404": { - "description": "Employer Not Found" + }, + "description": "Created" } - } - }, - "delete": { + }, + "summary": "Create ApiKey", "tags": [ - "Tag" - ], - "summary": "Delete Tag (deprecated)", - "description": "Deletes the specified Tag.", - "operationId": "DeleteTag", + "Account" + ] + } + }, + "/account/keys/{id}": { + "delete": { + "description": "", + "operationId": "DeleteApiKeyAccount", "parameters": [ { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Tag belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "code", "in": "path", - "description": "The code of the Tag you want to delete.", + "name": "id", "required": true, "schema": { + "format": "uuid", "type": "string" } } @@ -38355,744 +33339,622 @@ "responses": { "204": { "description": "No Content" - }, - "400": { - "description": "Bad Request" } - } - } - }, - "/employers/{employerId}/tags/Tag": { - "get": { + }, + "summary": "Delete ApiKey", "tags": [ - "Tag" - ], - "summary": "Get Tag", - "description": "Gets the Tag specified.", - "operationId": "GetTagTag", + "Account" + ] + }, + "get": { + "description": "", + "operationId": "GetApiKeyAccount", "parameters": [ { - "name": "employerId", "in": "path", - "description": "The Id of the Employer to which the Tag belongs.", + "name": "id", "required": true, "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "code", - "in": "query", - "description": "The code of the Tag you want to retrieve.", - "schema": { + "format": "uuid", "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/Item" } } - } - }, - "404": { - "description": "Not Found" + }, + "description": "Success" } - } + }, + "summary": "Get ApiKey", + "tags": [ + "Account" + ] } }, - "/employers/{employerId}/tags/tag": { - "put": { - "tags": [ - "Tag" - ], - "summary": "Update Tag", - "description": "Updates the details of an existing Tag.", - "operationId": "UpdateTagTag", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Tag belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "code", - "in": "query", - "description": "The existing code of the Tag you want to update.", - "schema": { - "type": "string" - } - } - ], + "/account/photo": { + "post": { + "description": "Submit an image here and we'll upload it, resize it to 200px squared and set it as the image for your account.", + "operationId": "UpdatePhotoAccount", "requestBody": { - "description": "The new values for the Tag you want to update.", "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Tag" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Tag" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Tag" - } - }, - "application/*+json": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, "schema": { - "$ref": "#/components/schemas/Tag" + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" } } } }, "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/User" } } - } - }, - "404": { - "description": "Not Found" + }, + "description": "Success" } - } - }, - "delete": { + }, + "summary": "Update Photo", "tags": [ - "Tag" - ], - "summary": "Delete Tag", - "description": "Deletes the specified Tag.", - "operationId": "DeleteTagTag", - "parameters": [ - { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Tag belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "code", - "in": "query", - "description": "The code of the Tag you want to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - } - } + "Account" + ] } }, - "/tenants": { + "/account/profile": { "post": { - "tags": [ - "Tenant" - ], - "summary": "Create a Tenant", - "description": "Use this method to create a new Tenant\r\nOnly available to SuperAdmins", - "operationId": "CreateTenant", + "description": "Updates your profile. Only Salutation, FirstName, LastName, JobType, JobTitle, TelephoneNumber, BusinessName, Industry, Address and DisplayPrefs fields are updated.", + "operationId": "ProfileAccount", "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Tenant" + "$ref": "#/components/schemas/User" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Tenant" + "$ref": "#/components/schemas/User" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Tenant" + "$ref": "#/components/schemas/User" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Tenant" + "$ref": "#/components/schemas/User" } } } }, "responses": { - "201": { - "description": "Success - \r\nthe Tenant has been created and is returned in the body.\r\nThe unique URL for this Tenant is returned in the Location header.", + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Tenant" + "$ref": "#/components/schemas/User" } } - } - }, - "400": { - "description": "Bad Request" + }, + "description": "Success" } - } + }, + "summary": "Update Profile", + "tags": [ + "Account" + ] } }, - "/tenants/{id}": { + "/account/useremployers": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Get a Tenant", - "description": "If you are an administrator for a Tenant then you can retrieve the settings for it using this API call", - "operationId": "GetTenant", + "description": "Returns a list of Employers that are associated to the given User", + "operationId": "GetUserEmployersAccount", "parameters": [ { + "description": "The Id of the user you want a list of employers for.", + "in": "query", "name": "id", - "in": "path", - "description": "The Id of the Tenant you want to retrieve.", - "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "int32", + "type": "integer" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Tenant" + "items": { + "$ref": "#/components/schemas/EmployerItem" + }, + "type": "array" } } - } + }, + "description": "Success" } - } - }, - "put": { + }, + "summary": "List User Employers", "tags": [ - "Tenant" - ], - "summary": "Update a Tenant", - "description": "If you are an administrator for a Tenant then you can update the settings for it using this API call", - "operationId": "UpdateTenant", + "Account" + ] + } + }, + "/account/verify": { + "post": { + "description": "Users should receive an email to verify their email address when they first register or if they change their email address.\r\nHowever, this API endpoint can be used to re-send the email.", + "operationId": "VerifyAccount", + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Re-send Verification Email", + "tags": [ + "Account" + ] + } + }, + "/account/verify/respond": { + "put": { + "description": "Used to process the link sent in an email to verify an email address.", + "operationId": "VerifyResponseAccount", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant you want to update.", - "required": true, + "description": "The value from the link in the email.", + "in": "query", + "name": "u", "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Tenant" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Tenant" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Tenant" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Tenant" - } + }, + { + "description": "The value from the link in the email.", + "in": "query", + "name": "k", + "schema": { + "format": "uuid", + "type": "string" } } - }, + ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Tenant" + "type": "boolean" } } - } - }, - "404": { - "description": "Not Found" + }, + "description": "Success" } - } + }, + "summary": "Verify Email Address", + "tags": [ + "Account" + ] } }, - "/tenants/{id}/css": { - "put": { - "tags": [ - "Tenant" - ], - "summary": "Update CSS", - "description": "Update the custom CSS for a Tenant", - "operationId": "UpdateCssTenant", + "/aeo/{employeeId}/{id}": { + "get": { + "description": "Returns a statement for an Attachment Order, listing payments that have been made.", + "operationId": "AeoStatementReports", "parameters": [ { - "name": "id", + "in": "query", + "name": "employerId", + "schema": { + "format": "uuid", + "type": "string" + } + }, + { "in": "path", - "description": "The Id of the Tenant you want to update.", + "name": "employeeId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "type": "string" - } - }, - "text/json": { - "schema": { - "type": "string" - } - }, - "application/*+json": { - "schema": { - "type": "string" - } + }, + { + "description": "The id of the AttachmentOrder", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/AttachmentOrderReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrderReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrderReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrderReportResponse" } } - } + }, + "description": "Success" } - } + }, + "summary": "AEO Statement", + "tags": [ + "Reports" + ] } }, - "/tenants/{id}/css/colors": { - "put": { - "tags": [ - "Tenant" - ], - "summary": "Update CSS Colors", - "description": "Update the colors for a Tenant", - "operationId": "UpdateCssColorsTenant", + "/billing/bill/{id}": { + "get": { + "description": "Returns the specified UsageBill", + "operationId": "BillBilling", "parameters": [ { - "name": "id", "in": "path", - "description": "The Id of the Tenant you want to update.", + "name": "id", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StringStringKeyValuePair" - } - } - }, - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StringStringKeyValuePair" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StringStringKeyValuePair" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StringStringKeyValuePair" - } - } - } - } - }, "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StringStringKeyValuePair" - } + "$ref": "#/components/schemas/UsageBill" } } - } + }, + "description": "Success" } - } + }, + "summary": "Get Bill", + "tags": [ + "Billing" + ] } }, - "/tenants/{id}/logo": { - "put": { - "tags": [ - "Tenant" - ], - "summary": "Upload Logo", - "description": "Upload an image to use as your main logo. We'll upload it and set the URL on the HomeImgUrl property of the Tenant.", - "operationId": "UpdateLogoTenant", + "/billing/bill/{id}/csv": { + "get": { + "description": "Returns the specified UsageBill as a CSV file", + "operationId": "BillCsvBilling", "parameters": [ { - "name": "id", "in": "path", - "description": "The Id of the Tenant you want to update.", + "name": "id", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" } }, - "encoding": { - "file": { - "style": "form" + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" } } - } + }, + "description": "Success" + } + }, + "summary": "Get Bill CSV", + "tags": [ + "Billing" + ] + } + }, + "/billing/bills": { + "get": { + "description": "Returns a list of UsageBills for the authenticated account", + "operationId": "BillsBilling", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List Bills", + "tags": [ + "Billing" + ] + } + }, + "/billing/directdebit": { + "delete": { + "description": "Cancels and deletes the Direct Debit Mandate for the account", + "operationId": "DeleteDirectDebitMandateBilling", + "responses": { + "204": { + "description": "No Content" } }, + "summary": "Delete DirectDebitMandate", + "tags": [ + "Billing" + ] + }, + "get": { + "description": "Returns the DirectDebitMandate for the authenticated account", + "operationId": "DirectDebitMandateBilling", "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Tenant" + "$ref": "#/components/schemas/DirectDebitMandate" } } - } + }, + "description": "Success" } - } + }, + "summary": "Get DirectDebitMandate", + "tags": [ + "Billing" + ] } }, - "/tenants/{id}/favicon": { - "put": { - "tags": [ - "Tenant" - ], - "summary": "Upload Favicon", - "description": "Upload an image to use as favicon. We'll upload it and set the URL on the FavIcon property of the Tenant.", - "operationId": "UpdateFavIconTenant", + "/billing/directdebit/confirm": { + "get": { + "description": "This endpoint is called by an external provider. You will never have to call this endpoint yourself.", + "operationId": "ConfirmDirectDebitMandateBilling", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant you want to update.", - "required": true, + "in": "query", + "name": "redirect_flow_id", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } + "responses": { + "200": { + "description": "Success" } }, + "summary": "Confirm Direct Debit Setup", + "tags": [ + "Billing" + ] + } + }, + "/billing/directdebit/setup": { + "get": { + "description": "Returns a Url to redirect a user to in order to start the process of setting up a Direct Debit Mandate.\r\nOnce the process is complete then the user is sent to the URL specified.", + "operationId": "SetupDirectDebitMandateBilling", + "parameters": [ + { + "in": "query", + "name": "returnUrl", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Tenant" + "type": "string" } } - } + }, + "description": "Success" } - } + }, + "summary": "Setup DirectDebitMandate", + "tags": [ + "Billing" + ] } }, - "/tenants/{id}/users": { + "/billing/usage-stats": { "get": { - "tags": [ - "Tenant" - ], - "summary": "List Users", - "description": "Returns a list of users for the Tenant", - "operationId": "UsersTenant", + "description": "Returns usage statistics data for all employers the logged in user has access to for the given date range.\r\nIf either of the dates are not provided then the values are defaulted to the first and last date of the previous calendar month.", + "operationId": "GetUsageStatsBilling", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant you want to list Users for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "pageNum", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "pageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "sortByLastLogin", "in": "query", + "name": "fromDate", "schema": { - "type": "boolean", - "default": false + "format": "date-time", + "type": "string" } }, { - "name": "category", "in": "query", + "name": "toDate", "schema": { - "$ref": "#/components/schemas/UserCategory" + "format": "date-time", + "type": "string" } }, { - "name": "isBureauMember", - "in": "query", + "in": "header", + "name": "accept", "schema": { - "type": "boolean" + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" } } - } + }, + "description": "Success" } - } + }, + "summary": "Get UsageStats Report", + "tags": [ + "Billing" + ] } }, - "/tenants/{id}/users/admins": { + "/bureau/employers": { "get": { - "tags": [ - "Tenant" - ], - "summary": "List Admin Users", - "description": "Returns a list of admin users for the Tenant", - "operationId": "AdminUsersTenant", + "description": "Returns a list of Employers.\r\nThis differs from the main Employer list end point in that the metadata included is more relevant to Bureau activities\r\nIt also gives you the ability to filter based on the allocated Processor.\r\nNote: an entry is returned for each PaySchedule. So if the employer has both a Monthly and a Weekly PaySchedule then they'll appear twice", + "operationId": "EmployersBureau", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant you want to list admin Users for.", - "required": true, + "description": "The Id of the Processor (User) you want to restrict the list to.", + "in": "query", + "name": "processor", "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", "items": { "$ref": "#/components/schemas/Item" - } + }, + "type": "array" } } - } - } - } - }, - "delete": { - "tags": [ - "Tenant" - ], - "summary": "Remove Admin User", - "description": "Removes the specified admin user for the Tenant", - "operationId": "RemoveAdminUserTenant", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Tenant you want to remove the admin User from.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "type": "string" - } - }, - "text/json": { - "schema": { - "type": "string" - } }, - "application/*+json": { - "schema": { - "type": "string" - } - } + "description": "Success" } }, + "summary": "List Employers", + "tags": [ + "Bureau" + ] + } + }, + "/bureau/processors": { + "get": { + "description": "Returns a list of Users that have one or more Employers allocated to them as the Processor", + "operationId": "ProcessorUsersBureau", "responses": { "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, "description": "Success" } - } - }, - "post": { + }, + "summary": "List Allocated Processors", "tags": [ - "Tenant" - ], - "summary": "Add Admin User", - "description": "Adds the specified user as an admin for the Tenant", - "operationId": "AddAdminUserTenant", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Tenant you want to remove the admin User from.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], + "Bureau" + ] + } + }, + "/column/validate": { + "post": { + "description": "Validates the specified Report Template columns.", + "operationId": "ValidateReportTemplateColumnsReportTemplate", "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Contract.ReportTemplateColumnRequest" } }, "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Contract.ReportTemplateColumnRequest" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Contract.ReportTemplateColumnRequest" } }, - "application/*+json": { + "text/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Contract.ReportTemplateColumnRequest" } } } @@ -39100,466 +33962,429 @@ "responses": { "200": { "description": "Success" + }, + "400": { + "description": "Bad Request" } - } + }, + "summary": "Validate Report Template Columns(beta)", + "tags": [ + "ReportTemplate" + ] } }, - "/tenants/{id}/users/search": { + "/contentdictionary": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Search Users", - "description": "Returns a list of users for the Tenant that match the search", - "operationId": "UsersSearchTenant", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Tenant you want to search Users for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "q", - "in": "query", - "schema": { - "type": "string" - } - } - ], + "description": "Gets the content dictionary for ReportTemplate columns type for employee and employer.", + "operationId": "GetContentDictionaryReportTemplate", "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", "items": { - "$ref": "#/components/schemas/Item" - } + "$ref": "#/components/schemas/Contract.ReportTemplateContentDictionaryResponse" + }, + "type": "array" } } - } + }, + "description": "Success" } - } + }, + "summary": "Get Content Dictionary For Report Template Column Type(beta)", + "tags": [ + "ReportTemplate" + ] } }, - "/tenants/{id}/users/{userId}": { + "/employeeroles": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Get a User", - "description": "Returns details of a User that belongs to the Tenant", - "operationId": "UserTenant", + "description": "Returns a CSV file containing details for all Employee Roles.", + "operationId": "EmployeeRoleExportReports", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant you want to get a User for.", - "required": true, + "in": "query", + "name": "employerId", "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "userId", - "in": "path", - "required": true, + "in": "header", + "name": "accept", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" } } - } + }, + "description": "Success" } - } - }, - "put": { + }, + "summary": "Employee Export Roles Details", "tags": [ - "Tenant" - ], - "summary": "Update a User", - "description": "Set the details of a User that belongs to the Tenant", - "operationId": "UpdateUserTenant", + "Reports" + ] + } + }, + "/employees": { + "get": { + "description": "Returns a CSV file containing details for all Employees.", + "operationId": "EmployeeExportReports", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant you want to update a User for.", - "required": true, + "in": "query", + "name": "employerId", "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "userId", - "in": "path", - "description": "The Id of the User.", - "required": true, + "in": "query", + "name": "taxYear", "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/TaxYear" } - } - ], - "requestBody": { - "description": "The User details.", - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/User" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/User" - } + }, + { + "in": "query", + "name": "includeBankAccountDetails", + "schema": { + "type": "boolean" } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } + }, + { + "in": "query", + "name": "includeYtd", + "schema": { + "type": "boolean" } }, - "404": { - "description": "Not Found" - } - } - } - }, - "/tenants/{id}/users/{userId}/bills": { - "get": { - "tags": [ - "Tenant" - ], - "summary": "Get User Bills", - "description": "Returns all UsageBills for a User", - "operationId": "UserBillsTenant", - "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant you want to get a Users UsageBills for.", - "required": true, + "in": "query", + "name": "incPensionInfo", "schema": { - "type": "string", - "format": "uuid" + "type": "boolean" } }, { - "name": "userId", - "in": "path", - "required": true, + "in": "query", + "name": "includePayInfo", + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "includeNotes", + "schema": { + "type": "boolean" + } + }, + { + "in": "header", + "name": "accept", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" } } - } + }, + "description": "Success" } - } + }, + "summary": "Employee Export Details", + "tags": [ + "Reports" + ] } }, - "/tenants/{id}/users/{userId}/employers": { + "/employers": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Get User Employers", - "description": "Returns Employer details for a User that belongs to the Tenant", - "operationId": "UserEmployersTenant", + "description": "Return a list of employers with pagination options. If no pagination parameters are provided, return all applicable employers based on the search.", + "operationId": "IndexEmployer", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant you want to get User Employers for.", - "required": true, + "description": "Optionally specify the code of an EmployerGroup to only see employers that are a member of that group.", + "in": "query", + "name": "employerGroupCode", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } }, { - "name": "userId", - "in": "path", - "required": true, + "description": "Filters the employer list by Processor Name, Employer Name, Customer #, Alt ID and Employer GUID.", + "in": "query", + "name": "searchTerm", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } + }, + { + "description": "Filters the employer list type.", + "in": "query", + "name": "employerListType", + "schema": { + "$ref": "#/components/schemas/EmployerListType" } - } - } - } - }, - "/tenants/{id}/users/{userId}/disabled": { - "put": { - "tags": [ - "Tenant" - ], - "summary": "Disable User Account", - "description": "Disables (or re-enabled) a user account", - "operationId": "DisabledTenant", - "parameters": [ + }, { - "name": "id", - "in": "path", - "description": "The Id of the Tenant.", - "required": true, + "description": "Zero-based index indicating the current page.", + "in": "query", + "name": "pageNum", "schema": { - "type": "string", - "format": "uuid" + "format": "int32", + "type": "integer" } }, { - "name": "userId", - "in": "path", - "required": true, + "description": "Number of items per page.", + "in": "query", + "name": "pageSize", "schema": { - "type": "string", - "format": "uuid" + "format": "int32", + "type": "integer" } }, { - "name": "disabled", + "description": "Field to sort employers by.", "in": "query", - "description": "Whether or not the account should be disabled.", + "name": "sortBy", "schema": { - "type": "boolean" + "$ref": "#/components/schemas/EmployerSortBy" } }, { - "name": "loginDisabled", + "description": "Indicates descending sort order.", "in": "query", - "description": "Whether or not the account should have log in permissions.", + "name": "sortDescending", "schema": { "type": "boolean" } } ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List Employers", + "tags": [ + "Employer" + ] + }, + "post": { + "description": "Use this method to create a new Employer\r\nThe only required field is the Employer name.", + "operationId": "CreateEmployer", "requestBody": { - "description": "A message to show the user explaining why the account is disabled.", "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Contract.EmployerRequest" } }, "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Contract.EmployerRequest" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Contract.EmployerRequest" } }, - "application/*+json": { + "text/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Contract.EmployerRequest" } } } }, "responses": { - "200": { - "description": "Success" + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployerResponse" + } + } + }, + "description": "Success - the employer has been created and is returned in the body.\r\nThe unique URL for this employer is returned in the Location header." }, "400": { "description": "Bad Request" } - } + }, + "summary": "Create an Employer", + "tags": [ + "Employer" + ] } }, - "/tenants/{id}/users/{userId}/employercreation": { - "put": { - "tags": [ - "Tenant" - ], - "summary": "Enable Employer Creation", - "description": "Enable (or disable) a user accounts ability to create new employers", - "operationId": "EmployerCreationTenant", + "/employers/employees/search": { + "get": { + "description": "Search all employers for an employee based on their name or payroll code.\r\nEnsure your query is at least 3 characters long or you wont get any results.", + "operationId": "SearchEmployeesEmployer", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "userId", - "in": "path", - "required": true, + "description": "The search string (at least 3 characters).", + "in": "query", + "name": "query", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } }, { - "name": "enabled", + "description": "If set to true, then we'll only search employees that aren't labeled as CIS Subcontractors", "in": "query", - "description": "Whether or not the account can create employers.", + "name": "exludeCisSubContactors", "schema": { + "default": false, "type": "boolean" } } ], "responses": { "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, "description": "Success" - }, - "404": { - "description": "Not Found" } - } + }, + "summary": "Search Employees", + "tags": [ + "Employer" + ] } }, - "/tenants/{id}/users/{userId}/tenant": { - "put": { + "/employers/groups": { + "get": { + "description": "Lists all EmployerGroups for the user.", + "operationId": "IndexEmployerGroup", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List EmployerGroups", "tags": [ - "Tenant" - ], - "summary": "Set User Tenant", - "description": "Changes the Tenant for a User. Only applicable if you manage two or more Tenants", - "operationId": "SetTenantTenant", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Tenant the user is currently assigned to.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "userId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "newTenantId", - "in": "query", - "description": "The Id of the Tenant the user is to be assigned to.", - "schema": { - "type": "string", - "format": "uuid" + "EmployerGroup" + ] + }, + "post": { + "description": "Creates a new EmployerGroup for the user.", + "operationId": "CreateEmployerGroup", + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/EmployerGroup" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerGroup" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/EmployerGroup" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/EmployerGroup" + } } } - ], + }, "responses": { - "204": { - "description": "No Content" + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerGroup" + } + } + }, + "description": "Created" }, - "404": { - "description": "Not Found" + "400": { + "description": "Bad Request" } - } + }, + "summary": "Create EmployerGroup", + "tags": [ + "EmployerGroup" + ] } }, - "/tenants/{id}/users/{userId}/accounting": { - "put": { - "tags": [ - "Tenant" - ], - "summary": "Set User Accounting Id", - "description": "Updates the Customer Accounting Id for a user", - "operationId": "SetAccountingIdTenant", + "/employers/groups/{code}": { + "delete": { + "description": "Deletes the specified EmployerGroup.", + "operationId": "DeleteEmployerGroup", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "userId", "in": "path", + "name": "code", "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "accountingId", - "in": "query", - "description": "The CustomerAccountingId for the user.", "schema": { "type": "string" } @@ -39569,1706 +34394,1969 @@ "204": { "description": "No Content" }, - "404": { - "description": "Not Found" + "400": { + "description": "Bad Request" } - } - } - }, - "/tenants/{id}/users/{userId}/pricingtable": { - "put": { + }, + "summary": "Delete EmployerGroup", "tags": [ - "Tenant" - ], - "summary": "Set User PricingTableId", - "description": "Updates the Customer Accounting Id for a user", - "operationId": "SetPricingTableIdTenant", + "EmployerGroup" + ] + }, + "get": { + "description": "Gets the EmployerGroup specified.", + "operationId": "GetEmployerGroup", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "userId", "in": "path", + "name": "code", "required": true, "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "pricingTableId", - "in": "query", - "description": "The PricingTable Id for the user. Provide null and the user will use the Tenant default", - "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { - "204": { - "description": "No Content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerGroup" + } + } + }, + "description": "Success" }, "404": { - "description": "Not Found" + "description": "EmployerGroup Not Found" } - } - } - }, - "/tenants/{id}/users/{userId}/monthlyminimum": { - "put": { + }, + "summary": "Get EmployerGroup", "tags": [ - "Tenant" - ], - "summary": "Set Monthly Minimum", - "description": "Updates the MonthlyMinimum subscription charge for a user", - "operationId": "SetMonthlyMinimumTenant", + "EmployerGroup" + ] + }, + "put": { + "description": "Updates a EmployerGroup for the user.", + "operationId": "UpdateEmployerGroup", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "userId", "in": "path", + "name": "code", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/MonthlyMinimum" + "$ref": "#/components/schemas/EmployerGroup" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/MonthlyMinimum" + "$ref": "#/components/schemas/EmployerGroup" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/MonthlyMinimum" + "$ref": "#/components/schemas/EmployerGroup" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/MonthlyMinimum" + "$ref": "#/components/schemas/EmployerGroup" } } } }, "responses": { - "204": { - "description": "No Content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerGroup" + } + } + }, + "description": "Success" }, "404": { - "description": "Not Found" + "description": "EmployerGroup Not Found" } - } + }, + "summary": "Update EmployerGroup", + "tags": [ + "EmployerGroup" + ] } }, - "/tenants/{id}/users/{userId}/bureauredir": { - "put": { - "tags": [ - "Tenant" - ], - "summary": "Set Bureau Redirect", - "description": "Sets or removes the redirect email address for a users Bureau-related notifications", - "operationId": "SetBureauRedirectEmailAddressTenant", + "/employers/import": { + "post": { + "description": "Import employers from a CSV file.", + "operationId": "ImportCsvEmployer", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "userId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "emailAddress", + "description": "Set to true and nothing will be imported but you'll be shown a preview of the data.", "in": "query", - "description": "The email address to redirect to, or an empty string to remove the redirect.", + "name": "previewOnly", "schema": { - "type": "string" + "default": false, + "type": "boolean" } } ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } + } + }, "responses": { - "204": { - "description": "No Content" - }, - "404": { - "description": "Not Found" + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } - } + }, + "summary": "Import CSV", + "tags": [ + "Employer" + ] } }, - "/tenants/{id}/bills/{year}/{month}": { + "/employers/reenrolmentstatus": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Get Bills", - "description": "Returns a list of UsageBill for Users of this Tenant, for the Year and Month supplied", - "operationId": "BillsTenant", + "operationId": "GetReenrolmentStatusEmployer", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant you want to list bills for.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "year", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "month", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeNetSuiteBills", "in": "query", + "name": "id", "schema": { - "type": "boolean", - "default": false + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } + "$ref": "#/components/schemas/ReenrolmentStatus" } } - } + }, + "description": "Success" } - } + }, + "summary": "Gets the re-enrolment status for the employer", + "tags": [ + "Employer" + ] } }, - "/tenants/{id}/bills/{year}/{month}/{billId}": { + "/employers/search": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Get Bill", - "description": "Returns details of a UsageBill for a User of this Tenant", - "operationId": "BillTenant", + "operationId": "SearchEmployer", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant the bill belongs to.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "year", - "in": "path", - "required": true, + "in": "query", + "name": "query", "schema": { - "type": "integer", - "format": "int32" + "type": "string" } - }, + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Search Employers", + "tags": [ + "Employer" + ] + } + }, + "/employers/{employerId}/aeassessments/employees/{employeeId}/aeEmployeeAssessments": { + "get": { + "operationId": "GetAeEmployeeAssessmentsAeEmployeeAssessment", + "parameters": [ { - "name": "month", + "description": "The Id of the Employer", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "integer", - "format": "int32" + "format": "uuid", + "type": "string" } }, { - "name": "billId", + "description": "The Id of the Employee", "in": "path", - "description": "The Id of the UsageBill.", + "name": "employeeId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UsageBill" + "items": { + "$ref": "#/components/schemas/Contract.AeEmployeeAssessmentHistoryResponse" + }, + "type": "array" } } - } + }, + "description": "Success" + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" } - } - }, - "put": { + }, + "summary": "List employee auto enrolment assessment", "tags": [ - "Tenant" - ], - "summary": "Update Bill", - "description": "Updates the UsageBill.", - "operationId": "UpdateBillTenant", + "AeEmployeeAssessment" + ] + } + }, + "/employers/{employerId}/aeassessments/employees/{employeeId}/assess": { + "post": { + "operationId": "AssessAeEmployeeAssessment", "parameters": [ { - "name": "id", + "description": "The Id of the Employer", "in": "path", - "description": "The Id of the Tenant the bill belongs to.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "year", + "description": "The Id of the Employee", "in": "path", + "name": "employeeId", "required": true, "schema": { - "type": "integer", - "format": "int32" + "format": "uuid", + "type": "string" } }, { - "name": "month", + "description": "The Id of the PayRun being assessed", + "in": "query", + "name": "payRunId", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.AeEmployeeAssessmentHistoryResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" + } + }, + "summary": "Process AE Assessment for Employee during PayRun", + "tags": [ + "AeEmployeeAssessment" + ] + } + }, + "/employers/{employerId}/aeassessments/employees/{employeeId}/create": { + "post": { + "operationId": "CreateAeEmployeeAssessmentAeEmployeeAssessment", + "parameters": [ + { + "description": "The Id of the Employer", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "integer", - "format": "int32" + "format": "uuid", + "type": "string" } }, { - "name": "billId", + "description": "The Id of the Employee", "in": "path", - "description": "The Id of the UsageBill.", + "name": "employeeId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/UsageBill" + "$ref": "#/components/schemas/Contract.AeEmployeeAssessmentHistoryRequest" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/UsageBill" + "$ref": "#/components/schemas/Contract.AeEmployeeAssessmentHistoryRequest" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/UsageBill" + "$ref": "#/components/schemas/Contract.AeEmployeeAssessmentHistoryRequest" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/UsageBill" + "$ref": "#/components/schemas/Contract.AeEmployeeAssessmentHistoryRequest" } } - } + }, + "description": "The request containing all data required for the employee assessment" }, "responses": { "200": { - "description": "Success", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/UsageBill" - } + "schema": {} } - } + }, + "description": "Success" } - } + }, + "summary": "Create employee auto enrolment assessment", + "tags": [ + "AeEmployeeAssessment" + ] } }, - "/tenants/{id}/usage/{year}/{month}": { + "/employers/{employerId}/aeassessments/employees/{employeeId}/letters/{taxYear}": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Get Usage", - "description": "Returns activity for Users of this Tenant, for the Year and Month supplied", - "operationId": "UsageTenant", + "operationId": "GetEmployeeLettersAeEmployeeAssessment", "parameters": [ { - "name": "id", + "description": "The Id of the Employer", "in": "path", - "description": "The Id of the Tenant.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "year", + "description": "The Id of the Employee", "in": "path", + "name": "employeeId", "required": true, "schema": { - "type": "integer", - "format": "int32" + "format": "uuid", + "type": "string" } }, { - "name": "month", + "description": "The TaxYear for which you want to list the pension letters", "in": "path", + "name": "taxYear", "required": true, "schema": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/TaxYear" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", "items": { - "$ref": "#/components/schemas/Item" - } + "$ref": "#/components/schemas/Contract.AeEmployeeLetterResponse" + }, + "type": "array" } } - } + }, + "description": "Success" + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" } - } + }, + "summary": "Get letters for an employee based on tax year", + "tags": [ + "AeEmployeeAssessment" + ] } }, - "/tenants/{id}/employers/{employerId}/usage": { + "/employers/{employerId}/aeassessments/employees/{employeeId}/{id}/letter": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Get Employer Usage", - "description": "Returns all activity for the given Employer", - "operationId": "EmployerUsageTenant", + "description": "Returns PDF letter that needs to be sent to an employee as a result of the assessment.\r\nThe same ReportResponse model that is used for reports is used here.", + "operationId": "GetAeLetterAeEmployeeAssessment", "parameters": [ { - "name": "id", + "description": "The Id of the Employer to which the Employee belongs", "in": "path", - "description": "The Id of the Tenant.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "employerId", + "description": "The Id of the Employee the assessment is for", "in": "path", - "description": "The Id of the Employer.", + "name": "employeeId", "required": true, "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } - } - } + "format": "uuid", + "type": "string" } - } - } - } - }, - "/tenants/{id}/employers/{employerId}/users": { - "get": { - "tags": [ - "Tenant" - ], - "summary": "Get Employer Users", - "description": "Returns all users for the given Employer", - "operationId": "EmployerUsersTenant", - "parameters": [ + }, { - "name": "id", + "description": "The Id of the Assessment", "in": "path", - "description": "The Id of the Tenant.", + "name": "id", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer.", - "required": true, + "in": "header", + "name": "accept", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" } } - } + }, + "description": "Success" } - } + }, + "summary": "Get AeLetter", + "tags": [ + "AeEmployeeAssessment" + ] } }, - "/tenants/{id}/reports/users/nobillableactivity": { - "get": { - "tags": [ - "Tenant" - ], - "summary": "Get Users with no Billable Activity.", - "description": "Returns a .csv file containing users created in or before the given month that do not have billable activity.", - "operationId": "GetUsersWithNoBillableActivityTenant", + "/employers/{employerId}/aeassessments/employees/{employeeId}/{id}/letter/email": { + "post": { + "description": "Send via email letter that needs to be sent to an employee as a result of the assessment.", + "operationId": "EmailAeLetterAeEmployeeAssessment", "parameters": [ { - "name": "id", + "description": "The Id of the Employer to which the Employee belongs", "in": "path", - "description": "The Id of the Tenant", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "month", - "in": "query", + "description": "The Id of the Employee the assessment is for", + "in": "path", + "name": "employeeId", + "required": true, "schema": { - "type": "integer", - "format": "int32" + "format": "uuid", + "type": "string" } }, { - "name": "year", - "in": "query", + "description": "The Id of the AeEmployeeAssessmentHistory", + "in": "path", + "name": "id", + "required": true, "schema": { - "type": "integer", - "format": "int32" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" + "$ref": "#/components/schemas/EmployerEmail" } } - } + }, + "description": "Success" } - } + }, + "summary": "Email AeLetter", + "tags": [ + "AeEmployeeAssessment" + ] } }, - "/tenants/{id}/reports/weeklyactivity": { - "get": { - "tags": [ - "Tenant" - ], - "summary": "Weekly Activity Report", - "description": "Returns a report detailing User activity, summarised by week, for the given date range", - "operationId": "WeeklyActivityTenant", + "/employers/{employerId}/aeassessments/employees/{employeeId}/{id}/letter/sent": { + "put": { + "description": "Update an Assessment to mark the letter as sent.\r\nThis is done automatically if you send the letter via email so you'd\r\nonly need to use this is you are printing/posting the letter.", + "operationId": "MarkAeLetterAsSentAeEmployeeAssessment", "parameters": [ { - "name": "id", + "description": "The Id of the Employer to which the Employee belongs", "in": "path", - "description": "The Id of the Tenant", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "fromDate", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" + "format": "uuid", + "type": "string" } }, { - "name": "toDate", - "in": "query", + "description": "The Id of the Employee the assessment is for", + "in": "path", + "name": "employeeId", + "required": true, "schema": { - "type": "string", - "format": "date-time" + "format": "uuid", + "type": "string" } }, { - "name": "accept", - "in": "header", + "description": "The Id of the Assessment", + "in": "path", + "name": "id", + "required": true, "schema": { + "format": "uuid", "type": "string" } - }, + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Mark Letter as Sent", + "tags": [ + "AeEmployeeAssessment" + ] + } + }, + "/employers/{employerId}/aeassessments/letters/pending": { + "get": { + "operationId": "GetPendingLettersAeEmployeeAssessment", + "parameters": [ { - "name": "allTenants", - "in": "query", - "description": "If set to true then the report will include all Tenants to which you have access", + "description": "The Id of the Employer", + "in": "path", + "name": "employerId", + "required": true, "schema": { - "type": "boolean", - "default": false + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" + "items": { + "$ref": "#/components/schemas/Contract.AeEmployeeLetterResponse" + }, + "type": "array" } } - } + }, + "description": "Success" + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" } - } + }, + "summary": "Get pending letters for an employer", + "tags": [ + "AeEmployeeAssessment" + ] } }, - "/tenants/{id}/reports/netsuitebills": { + "/employers/{employerId}/aeassessments/letters/pending/count": { "get": { - "tags": [ - "Tenant" - ], - "summary": "NetSuite Billing Report", - "description": "Returns a report detailing billing, for NetSuite, for the given year and month\r\nOnly available to SuperAdmins", - "operationId": "NetSuiteBillingTenant", + "operationId": "GetPendingLettersCountAeEmployeeAssessment", "parameters": [ { - "name": "id", + "description": "The Id of the Employer", "in": "path", - "description": "The Id of the Tenant", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "year", - "in": "query", - "description": "The year of the billing period", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "month", - "in": "query", - "description": "The month of the billing period", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "accept", - "in": "header", - "schema": { + "format": "uuid", "type": "string" } - }, - { - "name": "allTenants", - "in": "query", - "description": "If set to true then the report will include all Tenants to which you have access", - "schema": { - "type": "boolean", - "default": false - } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportResponse" - } - }, - "text/csv": { - "schema": { - "$ref": "#/components/schemas/ReportResponse" + "items": { + "$ref": "#/components/schemas/Contract.AeEmployeeLetterResponse" + }, + "type": "array" } } - } + }, + "description": "Success" + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" } - } + }, + "summary": "Get count of pending pension letters for an employer", + "tags": [ + "AeEmployeeAssessment" + ] } }, - "/tenants/bills": { - "post": { - "tags": [ - "Tenant" - ], - "summary": "Create Bills for Period", - "description": "Generates usage and creates bills for all Tenants\r\nOnly available to SuperAdmins", - "operationId": "CreateBillsTenant", + "/employers/{employerId}/aeassessments/letters/sent": { + "put": { + "description": "Update an Assessments to mark all the letter as sent.\r\nThis is done automatically if you send the letter via email so you'd\r\nonly need to use this is you are printing/posting the letter.", + "operationId": "MarkAeLettersAsSentAeEmployeeAssessment", "parameters": [ { - "name": "month", - "in": "query", + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, "schema": { - "type": "integer", - "format": "int32" + "format": "uuid", + "type": "string" } - }, + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Mark All Letters as Sent", + "tags": [ + "AeEmployeeAssessment" + ] + } + }, + "/employers/{employerId}/aeassessments/reenrolmentdates": { + "get": { + "operationId": "GetReenrolmentDatesAeEmployeeAssessment", + "parameters": [ { - "name": "year", - "in": "query", + "description": "The Id of the Employer", + "in": "path", + "name": "employerId", + "required": true, "schema": { - "type": "integer", - "format": "int32" + "format": "uuid", + "type": "string" } } ], "responses": { - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "202": { - "description": "Started generating bills" + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "format": "date-time", + "type": "string" + }, + "type": "array" + } + } + }, + "description": "Success" } - } + }, + "summary": "Gets a list of re-enrolment dates for the employer", + "tags": [ + "AeEmployeeAssessment" + ] } }, - "/tenants/ritsubmissionsettings": { + "/employers/{employerId}/analysiscategories": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Get RtiSubmissionSettings", - "description": "If the Tenant has BureauFeaturesEnabled then they can store RtiSubmissionSettings for use across multiple employers.\r\nThis end point returns them RtiSubmissionSettings.", - "operationId": "GetRtiSubmissionSettingsTenant", + "description": "Lists all AnalysisCategories for an Employer.", + "operationId": "IndexAnalysisCategory", "parameters": [ { - "name": "id", - "in": "query", - "description": "The Id of the Tenant.", + "description": "The Id of the Employer for which you want to list AnalysisCategories", + "in": "path", + "name": "employerId", + "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RtiSubmissionSettings" + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" } } - } + }, + "description": "Success" + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Employer or AnalysisCategories Not Found" } - } - }, - "put": { + }, + "summary": "List AnalysisCategories", "tags": [ - "Tenant" - ], - "summary": "Update RtiSubmissionSettings", - "description": "If the Tenant has BureauFeaturesEnabled then they can store RtiSubmissionSettings for use across multiple employers.\r\nThis end point updates the RtiSubmissionSettings.", - "operationId": "UpdateRtiSubmissionSettingsTenant", + "AnalysisCategory" + ] + }, + "post": { + "description": "Create a new AnalysisCategory for the Employer.", + "operationId": "CreateAnalysisCategory", "parameters": [ { - "name": "id", - "in": "query", - "description": "The Id of the Tenant.", + "in": "path", + "name": "employerId", + "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/RtiSubmissionSettings" + "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/RtiSubmissionSettings" + "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/RtiSubmissionSettings" + "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/RtiSubmissionSettings" + "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" } } } }, "responses": { - "400": { - "description": "Bad Request" - }, - "200": { - "description": "Success", + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RtiSubmissionSettings" + "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" } } - } + }, + "description": "Created" + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Employer Not Found" } - } + }, + "summary": "Create AnalysisCategory", + "tags": [ + "AnalysisCategory" + ] } }, - "/tenants/{id}/pricingtables": { + "/employers/{employerId}/analysiscategories/{analysisCategoryId}/categorycodes": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Get PricingTables", - "description": "Returns all PricingTables for the Tenant", - "operationId": "GetPricingTablesTenant", + "description": "Lists all AnalysisCategoryCodes for an Category.", + "operationId": "GetCodesAnalysisCategory", "parameters": [ { - "name": "id", "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "The Id of the Category for which you want to list Codes", + "in": "path", + "name": "analysisCategoryId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", "items": { "$ref": "#/components/schemas/Item" - } + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" } } - } + }, + "description": "Success" } - } + }, + "summary": "List AnalysisCategoryCodes", + "tags": [ + "AnalysisCategory" + ] }, "post": { - "tags": [ - "Tenant" - ], - "summary": "Create PricingTable", - "description": "Create a PricingTable", - "operationId": "CreatePricingTableTenant", + "description": "Create the details of an existing AnalysisCategoryCode.", + "operationId": "CreateAnalysisCategoryCodeAnalysisCategory", "parameters": [ { - "name": "id", + "description": "The Id of the Employer to which the Analysis category belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "The Analysis category id for which you want to create code", "in": "path", + "name": "analysisCategoryId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/PricingTable" + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/PricingTable" + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/PricingTable" + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/PricingTable" + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" } } } }, "responses": { "201": { - "description": "Created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PricingTable" + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" } } - } + }, + "description": "Created" }, "400": { "description": "Bad Request" } - } + }, + "summary": "Create AnalysisCategoryCode", + "tags": [ + "AnalysisCategory" + ] } }, - "/tenants/{id}/pricingtables/{pricingTableId}": { - "get": { - "tags": [ - "Tenant" + "/employers/{employerId}/analysiscategories/{analysisCategoryId}/categorycodes/{code}": { + "delete": { + "description": "Deletes the specified AnalysisCategoryCode.", + "operationId": "DeleteAnalysisCategoryCodeAnalysisCategory", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "The Id of the AnalysisCategory to which the Code belongs.", + "in": "path", + "name": "analysisCategoryId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "The code of the AnalysisCategoryCode you want to delete.", + "in": "path", + "name": "code", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get PricingTable", - "description": "Get a PricingTable", - "operationId": "GetPricingTableTenant", + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + } + }, + "summary": "Delete AnalysisCategoryCode", + "tags": [ + "AnalysisCategory" + ] + }, + "get": { + "description": "Gets the AnalysisCategoryCode specified.", + "operationId": "GetAnalysisCategoryCodeAnalysisCategory", "parameters": [ { - "name": "id", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "pricingTableId", + "description": "The Id of the AnalysisCategory to which the Code belongs.", + "in": "path", + "name": "analysisCategoryId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "The code of the AnalysisCategoryCode you want to retrieve.", "in": "path", + "name": "code", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PricingTable" + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { + }, + "text/json": { "schema": { - "$ref": "#/components/schemas/PricingTable" + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" } } - } + }, + "description": "Success" }, - "400": { - "description": "Bad Request" + "404": { + "description": "Not Found" } - } + }, + "summary": "Get AnalysisCategoryCode", + "tags": [ + "AnalysisCategory" + ] }, "put": { - "tags": [ - "Tenant" - ], - "summary": "Update PricingTable", - "description": "Update a PricingTables", - "operationId": "UpdatePricingTableTenant", + "description": "Updates the details of an existing AnalysisCategoryCode.", + "operationId": "UpdateAnalysisCategoryCodeAnalysisCategory", "parameters": [ { - "name": "id", + "description": "The Id of the Employer to which the Analysis category belongs.", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "pricingTableId", + "description": "The Analysis category id for which you want to update Analysis code", + "in": "path", + "name": "analysisCategoryId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "The code of the Analysis category code you want to update.", "in": "path", + "name": "code", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/PricingTable" + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/PricingTable" + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/PricingTable" + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/PricingTable" + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeRequest" } } } }, "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PricingTable" + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryCodeResponse" } } - } - }, - "400": { - "description": "Bad Request" + }, + "description": "Success" } - } - }, - "delete": { + }, + "summary": "Update AnalysisCategoryCode", "tags": [ - "Tenant" - ], - "summary": "Delete PricingTable", - "description": "Delete a PricingTable", - "operationId": "DeletePricingTableTenant", + "AnalysisCategory" + ] + } + }, + "/employers/{employerId}/analysiscategories/{id}": { + "delete": { + "description": "Deletes the specified AnalysisCategory.", + "operationId": "DeleteAnalysisCategory", "parameters": [ { - "name": "id", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "pricingTableId", "in": "path", + "name": "id", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { - "200": { - "description": "Success" + "204": { + "description": "No Content" }, "400": { "description": "Bad Request" } - } - } - }, - "/tenants/{id}/users/{userId}/businessname": { - "put": { + }, + "summary": "Delete AnalysisCategory", "tags": [ - "Tenant" - ], - "summary": "Set User Business Name", - "description": "Updates the Business Name for a User", - "operationId": "SetBusinessNameTenant", + "AnalysisCategory" + ] + }, + "get": { + "description": "Gets the AnalysisCategory specified.", + "operationId": "GetAnalysisCategory", "parameters": [ { - "name": "id", + "description": "The Id of the Employer to which the AnalysisCategory belongs.", "in": "path", - "description": "The Id of the Tenant.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "userId", + "description": "The Id of the AnalysisCategory which you want to fetch", "in": "path", - "description": "The Id of the User.", + "name": "id", "required": true, "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "businessName", - "in": "query", - "description": "The Business Name for the User.", - "schema": { + "format": "uuid", "type": "string" } } ], "responses": { - "204": { - "description": "No Content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Bad Request" }, "404": { - "description": "Not Found" + "description": "Employer or AnalysisCategory Not Found" } - } - } - }, - "/tenants/{id}/users/{userId}/industry": { - "put": { + }, + "summary": "Get AnalysisCategory", "tags": [ - "Tenant" - ], - "summary": "Set Industry", - "description": "Updates the Industry for a User", - "operationId": "SetIndustryTenant", + "AnalysisCategory" + ] + }, + "put": { + "description": "Updates a AnalysisCategory for the Employer.", + "operationId": "UpdateAnalysisCategory", "parameters": [ { - "name": "id", "in": "path", - "description": "The Id of the Tenant.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "userId", "in": "path", - "description": "The Id of the User.", + "name": "id", "required": true, "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "industry", - "in": "query", - "description": "The Industry for the User.", - "schema": { - "$ref": "#/components/schemas/UserIndustry" + "format": "uuid", + "type": "string" } } ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryRequest" + } + } + } + }, "responses": { - "204": { - "description": "No Content" - }, - "404": { - "description": "Not Found" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Contract.AnalysisCategoryResponse" + } + } + }, + "description": "Success" } - } + }, + "summary": "Update AnalysisCategory", + "tags": [ + "AnalysisCategory" + ] } }, - "/tenants/{id}/users/{userId}/employeecount": { - "put": { - "tags": [ - "Tenant" - ], - "summary": "Set Employee Count", - "description": "Updates the Employee Count for a User", - "operationId": "SetEmployeeCountTenant", + "/employers/{employerId}/audit": { + "get": { + "operationId": "EmployerAuditListAudit", "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "userId", + "description": "The Id of the Employer for which you want to list Audit logs", "in": "path", - "description": "The Id of the User.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "employeeCount", - "in": "query", - "description": "The Employee Count for the User.", - "schema": { - "type": "integer", - "format": "int32" + "format": "uuid", + "type": "string" } - } - ], - "responses": { - "204": { - "description": "No Content" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/tenants/{id}/users/{userId}/country": { - "put": { - "tags": [ - "Tenant" - ], - "summary": "Set Country", - "description": "Updates the Country for a User", - "operationId": "SetCountryTenant", - "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant.", - "required": true, + "description": "Entity type name for which audit log should be retrieved", + "in": "query", + "name": "entity", "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/EntityType" } }, { - "name": "userId", - "in": "path", - "description": "The Id of the User.", - "required": true, + "description": "Id of the entity for which audit log should be retrieved", + "in": "query", + "name": "entityId", "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "country", + "description": "Date from which records should be retrieved", "in": "query", - "description": "The Country for the User.", + "name": "fromDate", "schema": { - "$ref": "#/components/schemas/Country" + "format": "date-time", + "type": "string" } - } - ], - "responses": { - "204": { - "description": "No Content" }, - "404": { - "description": "Not Found" - } - } - } - }, - "/tenants/{id}/users/{userId}/refactoredaeroutine": { - "put": { - "tags": [ - "Tenant" - ], - "summary": "Set CanUseRefactoredAeRoutines flag", - "description": "Updates the CanUseRefactoredAeRoutines flag for a User", - "operationId": "SetUserCanUseRefactoredAeRoutinesTenant", - "parameters": [ { - "name": "id", - "in": "path", - "description": "The Id of the Tenant.", - "required": true, + "description": "Date till records should be retrieved", + "in": "query", + "name": "toDate", "schema": { - "type": "string", - "format": "uuid" + "format": "date-time", + "type": "string" } }, { - "name": "userId", - "in": "path", - "description": "The Id of the User.", - "required": true, + "in": "query", + "name": "pageNum", "schema": { - "type": "string", - "format": "uuid" + "format": "int32", + "type": "integer" } }, { - "name": "canUseRefactoredAeRoutines", "in": "query", - "description": "The CanUseRefactoredAeRoutines flag for the User.", + "name": "pageSize", "schema": { - "type": "boolean" + "format": "int32", + "type": "integer" } } ], "responses": { - "204": { - "description": "No Content" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } - } + }, + "summary": "Employer Audit Log", + "tags": [ + "Audit" + ] } }, - "/tenants/{id}/users/{userId}/address": { - "put": { - "tags": [ - "Tenant" - ], - "summary": "Set Address", - "description": "Updates the Address for a User", - "operationId": "SetAddressTenant", + "/employers/{employerId}/autoenrolment/letters/email": { + "post": { + "description": "", + "operationId": "EmailAllLettersAutoEnrolment", "parameters": [ { - "name": "id", + "description": "The Id of the Employer to which the Employee belongs", "in": "path", - "description": "The Id of the Tenant.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } - }, + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Email All Letters", + "tags": [ + "AutoEnrolment" + ] + } + }, + "/employers/{employerId}/autoenrolment/letters/pending": { + "get": { + "description": "Returns all AE Assessments that are awaiting a letter to be sent", + "operationId": "PendingLettersAutoEnrolment", + "parameters": [ { - "name": "userId", + "description": "The Id of the Employer", "in": "path", - "description": "The Id of the User.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/User" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/User" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } } }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } + "description": "Success" } }, - "responses": { - "204": { - "description": "No Content" - }, - "404": { - "description": "Not Found" - } - } + "summary": "Pending Letters", + "tags": [ + "AutoEnrolment" + ] } }, - "/tenants/reports/apimailinglist": { + "/employers/{employerId}/autoenrolment/letters/pending/count": { "get": { - "tags": [ - "Tenant" + "description": "Returns the count of AE Assessments that are awaiting a letter to be sent\r\nand the count of the employees that are awaiting a postponement letter to be sent.", + "operationId": "PendingLettersCountAutoEnrolment", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "summary": "Api Mailing List Report", - "description": "Returns a report of active users that have asked to be updated about API across all tenants.", - "operationId": "GetApiMailingListReportTenant", "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportResponse" + "$ref": "#/components/schemas/Contract.PendingLettersCountResponse" } }, - "text/csv": { + "text/json": { "schema": { - "$ref": "#/components/schemas/ReportResponse" + "$ref": "#/components/schemas/Contract.PendingLettersCountResponse" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Contract.PendingLettersCountResponse" } } - } + }, + "description": "Success" } - } + }, + "summary": "Pending Letters Count", + "tags": [ + "AutoEnrolment" + ] } }, - "/tenants/{id}/reports/apimailinglist": { + "/employers/{employerId}/autoenrolment/letters/pending/postponement": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Api Mailing List Report", - "description": "Returns a report of active users that have asked to be updated about API for specific tenant.", - "operationId": "GetApiMailingListReportByIdTenant", + "description": "Returns all employees that are awaiting a postponement letter to be sent.\r\nBecause there is no associated AeAssessment they can't be returned with the other pending letters", + "operationId": "PendingPostponementLettersAutoEnrolment", "parameters": [ { - "name": "id", + "description": "The Id of the Employer", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportResponse" + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" } }, - "text/csv": { + "text/json": { "schema": { - "$ref": "#/components/schemas/ReportResponse" + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" } } + }, + "description": "Success" + } + }, + "summary": "Pending Postponement Letters", + "tags": [ + "AutoEnrolment" + ] + } + }, + "/employers/{employerId}/autoenrolment/letters/sent": { + "put": { + "description": "Update an Assessments to mark all the letter as sent.\r\nThis is done automatically if you send the letter via email so you'd\r\nonly need to use this is you are printing/posting the letter.", + "operationId": "MarkLettersAsSentAutoEnrolment", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" } } - } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Mark All Letters as Sent", + "tags": [ + "AutoEnrolment" + ] } }, - "/tenants/{id}/users/employers": { + "/employers/{employerId}/autoenrolment/renrol": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Get Employers", - "description": "Returns all the employers of all the users of the Tenant", - "operationId": "GetEmployersTenant", + "description": "Performs a Cyclical Re-enrolment. All employees that have opted-out or ceased membership \r\nwill be re-assessed and auto-enrolled if necessary.\r\nThe employers cyclical re-enrolment date will then be updated to the date provided.", + "operationId": "ReenrolAutoEnrolment", "parameters": [ { - "name": "id", + "description": "The Id of the Employer", "in": "path", - "description": "Current tenant id", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" + } + }, + { + "description": "The new Cyclical Re-enrolment Date for the Employer", + "in": "query", + "name": "cyclicalReenrolmentDate", + "schema": { + "format": "date-time", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", "items": { "$ref": "#/components/schemas/Item" - } + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" } } - } + }, + "description": "Success" + }, + "400": { + "description": "Bad Request" }, "404": { "description": "Not Found" } - } + }, + "summary": "Cyclical Re-enrolment", + "tags": [ + "AutoEnrolment" + ] } }, - "/tenants/{id}/payrollsquad": { + "/employers/{employerId}/bureau/settings": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Get Payroll Squads", - "description": "Returns all Payroll Squad for the Tenant", - "operationId": "GetPayrollSquadsTenant", + "description": "Returns the BureauSettings for the Employer", + "operationId": "GetSettingsBureau", "parameters": [ { - "name": "id", + "description": "The Id of the Employer", "in": "path", - "description": "Current tenant id", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } + "$ref": "#/components/schemas/BureauSettings" } } - } - }, - "404": { - "description": "Not Found" + }, + "description": "Success" } - } - }, - "post": { + }, + "summary": "Get BureauSettings", "tags": [ - "Tenant" - ], - "summary": "Create Payroll Squad", - "description": "Create a Payroll Squad", - "operationId": "CreatePayrollSquadTenant", + "Bureau" + ] + }, + "put": { + "description": "Updates the BureauSettings for the Employer", + "operationId": "UpdateSettingsBureau", "parameters": [ { - "name": "id", + "description": "The Id of the Employer", "in": "path", - "description": "Current tenant id", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadRequest" + "$ref": "#/components/schemas/BureauSettings" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadRequest" + "$ref": "#/components/schemas/BureauSettings" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadRequest" + "$ref": "#/components/schemas/BureauSettings" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadRequest" + "$ref": "#/components/schemas/BureauSettings" } } } }, "responses": { - "201": { - "description": "Created", + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadResponse" + "$ref": "#/components/schemas/BureauSettings" } } - } - }, - "400": { - "description": "Bad Request" - }, - "404": { - "description": "Not Found" + }, + "description": "Success" } - } + }, + "summary": "Update BureauSettings", + "tags": [ + "Bureau" + ] } }, - "/tenants/{id}/payrollsquad/{payrollSquadId}": { + "/employers/{employerId}/bureau/settings/processor": { "get": { - "tags": [ - "Tenant" - ], - "summary": "Get Payroll Squad", - "description": "Get a Payroll Squad", - "operationId": "GetPayrollSquadTenant", + "description": "If a Processor is specified in the BureauSettings then it is returned as a User, otherwise a 404 is returned", + "operationId": "GetProcessorUserBureau", "parameters": [ { - "name": "id", - "in": "path", - "description": "Current tenant id", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "payrollSquadId", + "description": "The Id of the Employer", "in": "path", - "description": "The id of payroll squad", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadResponse" + "$ref": "#/components/schemas/User" } } - } + }, + "description": "Success" }, "404": { - "description": "Not Found", + "description": "Not Found" + } + }, + "summary": "Get Processor", + "tags": [ + "Bureau" + ] + } + }, + "/employers/{employerId}/bureau/settings/reportpack": { + "get": { + "description": "If a ReportPack is specified in the BureauSettings then it is returned, otherwise an empty ReportPAck is returned", + "operationId": "GetReportPackBureau", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadResponse" + "$ref": "#/components/schemas/ReportPack" } } - } - }, - "400": { - "description": "Bad Request" + }, + "description": "Success" } - } - }, - "delete": { + }, + "summary": "Get BureauSettings ReportPack", "tags": [ - "Tenant" - ], - "summary": "Delete Payroll Squad and it's Members and Employers.", - "description": "Delete Payroll Squad with it's Members and Employers.", - "operationId": "DeletePayrollSquadTenant", + "Bureau" + ] + } + }, + "/employers/{employerId}/costcentres": { + "delete": { + "description": "Deletes the specified Cost Centre.", + "operationId": "DeleteCostCentreCostCentre", "parameters": [ { - "name": "id", + "description": "The Id of the Employer to which the Cost Centre belongs.", "in": "path", - "description": "Current tenant id", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "payrollSquadId", - "in": "path", - "description": "The id of payroll squad", - "required": true, + "description": "The code of the Cost Centre you want to delete.", + "in": "query", + "name": "code", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -41278,750 +36366,618 @@ }, "400": { "description": "Bad Request" - }, - "404": { - "description": "Not Found" } - } - } - }, - "/tenants/{id}/payrollsquad/employers": { - "post": { + }, + "summary": "Delete Cost Centre", "tags": [ - "Tenant" + "CostCentre" + ] + }, + "get": { + "description": "Lists all Cost Centres for an Employer.", + "operationId": "IndexCostCentre", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list Cost Centres", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "summary": "Update Payroll Squad Employers", - "description": "Update Payroll Squad Employers", - "operationId": "PayrollSquadUpdateEmployersTenant", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List Cost Centres", + "tags": [ + "CostCentre" + ] + }, + "post": { + "description": "Creates a new CostCentre for the Employer.", + "operationId": "CreateCostCentre", "parameters": [ { - "name": "id", "in": "path", - "description": "Current tenant id", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadEmployerRequest" + "$ref": "#/components/schemas/CostCentre" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadEmployerRequest" + "$ref": "#/components/schemas/CostCentre" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadEmployerRequest" + "$ref": "#/components/schemas/CostCentre" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadEmployerRequest" + "$ref": "#/components/schemas/CostCentre" } } } }, "responses": { "201": { - "description": "Created", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayrollSquadEmployerResponse" - } + "$ref": "#/components/schemas/CostCentre" } } - } + }, + "description": "Created" }, "400": { "description": "Bad Request" - }, - "404": { - "description": "Not Found" } - } - } - }, - "/tenants/{id}/payrollsquad/member": { - "post": { + }, + "summary": "Create Cost Centre", "tags": [ - "Tenant" - ], - "summary": "Add Payroll Squad Member", - "description": "Add Payroll Squad Member", - "operationId": "PayrollSquadAddMemberTenant", + "CostCentre" + ] + }, + "put": { + "description": "Updates a Cost Centre for the Employer.", + "operationId": "UpdateCostCentreCostCentre", "parameters": [ { - "name": "id", + "description": "The Id of the Employer to which the Cost Centre belongs.", "in": "path", - "description": "Current tenant id", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" + } + }, + { + "description": "The existing code of the Cost Centre you want to get.", + "in": "query", + "name": "code", + "schema": { + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadMemberRequest" + "$ref": "#/components/schemas/CostCentre" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadMemberRequest" + "$ref": "#/components/schemas/CostCentre" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadMemberRequest" + "$ref": "#/components/schemas/CostCentre" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadMemberRequest" + "$ref": "#/components/schemas/CostCentre" } } - } + }, + "description": "The new values for the Cost Centre you want to update" }, "responses": { - "201": { - "description": "Created", + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.PayrollSquadMemberResponse" + "$ref": "#/components/schemas/CostCentre" } } - } - }, - "400": { - "description": "Bad Request" - }, - "404": { - "description": "Not Found" - } - } - } - }, - "/tenants/{id}/payrollsquad/{payrollSquadId}/member/{payrollSquadMemberId}": { - "delete": { - "tags": [ - "Tenant" - ], - "summary": "Delete Payroll Squad Member", - "description": "Delete a Payroll Squad Member", - "operationId": "DeletePayrollSquadMemberTenant", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "Current tenant id", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "payrollSquadId", - "in": "path", - "description": "The id of payroll squad", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "payrollSquadMemberId", - "in": "path", - "description": "The id of payroll squad member", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "404": { - "description": "Not Found" - } - } - } - }, - "/tenants/{id}/admin/evc": { - "put": { - "tags": [ - "Tenant" - ], - "summary": "Set Evc", - "description": "Disables or enables EVC for a tenant.", - "operationId": "SetEvcTenant", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the tenant", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "disableEvc", - "in": "query", - "description": "A boolean value indicating whether to disable or enable EVC at tenant level.", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { + }, "description": "Success" - }, - "404": { - "description": "Not Found" } - } + }, + "summary": "Update Cost Centre", + "tags": [ + "CostCentre" + ] } }, - "/tenants/{id}/email": { + "/employers/{employerId}/costcentres/costcentre": { "get": { - "tags": [ - "TenantEmail" - ], - "summary": "List Emails", - "description": "Returns a list of all emails sent for this Tenant.", - "operationId": "IndexTenantEmail", + "description": "Gets the Cost Centres specified.", + "operationId": "GetCostCentreCostCentre", "parameters": [ { - "name": "id", + "description": "The Id of the Employer to which the Department belongs.", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "pageNum", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" + "format": "uuid", + "type": "string" } }, { - "name": "pageSize", + "description": "The existing code of the Cost Centre you want to get.", "in": "query", + "name": "code", "schema": { - "type": "integer", - "format": "int32" + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } + "$ref": "#/components/schemas/CostCentre" } } - } + }, + "description": "Success" } - } + }, + "summary": "Get Cost Centre", + "tags": [ + "CostCentre" + ] } }, - "/tenants/{id}/email/{emailId}": { - "get": { - "tags": [ - "TenantEmail" - ], - "summary": "Get Email", - "description": "Returns the email along with its status.", - "operationId": "GetEmailTenantEmail", + "/employers/{employerId}/costcentres/{code}": { + "delete": { + "description": "Deletes the specified Cost Centre.\r\nUse the other Delete endpoint that supports non-alphanumeric characters for a cost centre code", + "operationId": "DeleteCostCentre", "parameters": [ { - "name": "id", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "emailId", "in": "path", + "name": "code", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TenantEmail" - } - } - } + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" } - } - }, - "post": { + }, + "summary": "Delete Cost Centre (deprecated)", "tags": [ - "TenantEmail" - ], - "summary": "Re-send Email", - "description": "Re-sends an existing email.", - "operationId": "ResendEmailTenantEmail", + "CostCentre" + ] + }, + "get": { + "description": "Gets the Cost Centres specified.\r\nUse the other GET endpoint that supports non-alphanumeric characters for a cost centre code", + "operationId": "GetCostCentre", "parameters": [ { - "name": "id", + "description": "The Id of the Employer to which the Department belongs.", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "emailId", "in": "path", + "name": "code", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TenantEmail" + "$ref": "#/components/schemas/CostCentre" } } - } + }, + "description": "Success" } - } - } - }, - "/tenants/{id}/email/settings": { - "get": { + }, + "summary": "Get Cost Centre (deprecated)", "tags": [ - "TenantEmail" - ], - "summary": "Get MailSettings", - "description": "Returns the MailSettings for a Tenant.", - "operationId": "GetMailSettingsTenantEmail", + "CostCentre" + ] + }, + "put": { + "description": "Updates a Cost Centre for the Employer.\r\nUse the other Update endpoint that supports non-alphanumeric characters for a cost centre code", + "operationId": "UpdateCostCentre", "parameters": [ { - "name": "id", "in": "path", - "description": "The Id of the Tenant", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MailSettings" - } - } + "format": "uuid", + "type": "string" } - } - } - }, - "put": { - "tags": [ - "TenantEmail" - ], - "summary": "Update MailSettings", - "description": "Updates the MailSettings for a Tenant.", - "operationId": "UpdateMailSettingsTenantEmail", - "parameters": [ + }, { - "name": "id", "in": "path", - "description": "The Id of the Tenant", + "name": "code", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/MailSettings" + "$ref": "#/components/schemas/CostCentre" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/MailSettings" + "$ref": "#/components/schemas/CostCentre" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/MailSettings" + "$ref": "#/components/schemas/CostCentre" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/MailSettings" + "$ref": "#/components/schemas/CostCentre" } } } }, "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MailSettings" + "$ref": "#/components/schemas/CostCentre" } } - } + }, + "description": "Success" } - } - } - }, - "/tenants/{id}/email/settings/test": { - "post": { + }, + "summary": "Update Cost Centre (deprecated)", "tags": [ - "TenantEmail" - ], - "summary": "Send test email", - "description": "This API call will generate a test email based on your MailSettings.", - "operationId": "TestMailSettingsTenantEmail", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The Id of the Tenant", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "email", - "in": "query", - "description": "The address to send a test email to", - "schema": { - "type": "string" - } - } - ], - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmployerEmail" - } - } - } - } - } + "CostCentre" + ] } }, - "/employers/{employerId}/termcalendars": { + "/employers/{employerId}/departments": { "get": { - "tags": [ - "TermCalendar" - ], - "summary": "List Term Calendars", - "description": "Lists all Term Calendars for an Employer.", - "operationId": "IndexTermCalendar", + "description": "Lists all Departments for an Employer.", + "operationId": "IndexDepartment", "parameters": [ { - "name": "employerId", + "description": "The Id of the Employer for which you want to list Departments", "in": "path", - "description": "The Id of the Employer for which you want to get the Term Calendar list", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", "items": { - "$ref": "#/components/schemas/Contract.TermCalendarResponse" - } + "$ref": "#/components/schemas/Item" + }, + "type": "array" } } - } - }, - "404": { - "description": "Not Found" + }, + "description": "Success" } - } + }, + "summary": "List Departments", + "tags": [ + "Department" + ] }, "post": { - "tags": [ - "TermCalendar" - ], - "summary": "Create Term Calendar", - "description": "Creates a new Term Calendar for the Employer.", - "operationId": "CreateTermCalendar", + "description": "Creates a new Department for the Employer.", + "operationId": "CreateDepartment", "parameters": [ { - "name": "employerId", "in": "path", - "description": "The Id of the Employer to which new Term Calendar will be created.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarRequest" + "$ref": "#/components/schemas/Department" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarRequest" + "$ref": "#/components/schemas/Department" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarRequest" + "$ref": "#/components/schemas/Department" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarRequest" + "$ref": "#/components/schemas/Department" } } } }, "responses": { "201": { - "description": "Created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarResponse" + "$ref": "#/components/schemas/Department" } } - } + }, + "description": "Created" }, "400": { "description": "Bad Request" }, "404": { - "description": "Not Found" + "description": "Employer Not Found" } - } + }, + "summary": "Create Department", + "tags": [ + "Department" + ] } }, - "/employers/{employerId}/termcalendars/{id}": { + "/employers/{employerId}/departments/Department": { "get": { - "tags": [ - "TermCalendar" - ], - "summary": "Get Term Calendar", - "description": "Gets a specified Term Calendar.", - "operationId": "GetTermCalendar", + "description": "Gets the Department specified.", + "operationId": "GetDepartmentDepartment", "parameters": [ { - "name": "employerId", + "description": "The Id of the Employer to which the Department belongs.", "in": "path", - "description": "The Id of the Employer to which the Term Calendar belongs.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "id", - "in": "path", - "description": "The Id of the Term Calendar which you want to fetch", - "required": true, + "description": "The code of the Department you want to retrieve.", + "in": "query", + "name": "code", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarResponse" + "$ref": "#/components/schemas/Department" } } + }, + "description": "Success" + }, + "404": { + "description": "Not Found" + } + }, + "summary": "Get Department", + "tags": [ + "Department" + ] + } + }, + "/employers/{employerId}/departments/department": { + "delete": { + "description": "Deletes the specified Department.", + "operationId": "DeleteDepartmentDepartment", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "query", + "name": "code", + "schema": { + "type": "string" } + } + ], + "responses": { + "204": { + "description": "No Content" }, "400": { "description": "Bad Request" - }, - "404": { - "description": "Not Found" } - } + }, + "summary": "Delete Department", + "tags": [ + "Department" + ] }, "put": { - "tags": [ - "TermCalendar" - ], - "summary": "Update Term Calendar", - "description": "Updates a Term Calendar for the Employer.", - "operationId": "UpdateTermCalendar", + "description": "Updates the details of an existing Department.", + "operationId": "UpdateDepartmentDepartment", "parameters": [ { - "name": "employerId", "in": "path", - "description": "The Id of the Employer to which the Term Calendar belongs.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "id", - "in": "path", - "description": "The Id of the Term Calendar which you want to update", - "required": true, + "in": "query", + "name": "code", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarRequest" + "$ref": "#/components/schemas/Department" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarRequest" + "$ref": "#/components/schemas/Department" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarRequest" + "$ref": "#/components/schemas/Department" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarRequest" + "$ref": "#/components/schemas/Department" } } } }, "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarResponse" + "$ref": "#/components/schemas/Department" } } - } - }, - "400": { - "description": "Bad Request" + }, + "description": "Success" }, "404": { "description": "Not Found" } - } - }, - "delete": { + }, + "summary": "Update Department", "tags": [ - "TermCalendar" - ], - "summary": "Delete Term Calendar", - "description": "Deletes a specified Term Calendar.", - "operationId": "DeleteTermCalendar", + "Department" + ] + } + }, + "/employers/{employerId}/departments/{code}": { + "delete": { + "description": "Deletes the specified Department.", + "operationId": "DeleteDepartment", "parameters": [ { - "name": "employerId", "in": "path", - "description": "The Id of the Employer to which the Term Calendar belongs.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "id", "in": "path", - "description": "The Id of the Term Calendar which you want to delete", + "name": "code", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -42031,315 +36987,372 @@ }, "400": { "description": "Bad Request" - }, - "404": { - "description": "Not Found" } - } - } - }, - "/employers/{employerId}/termcalendaryears/{termCalendarId}": { - "get": { + }, + "summary": "Delete Department (deprecated)", "tags": [ - "TermCalendarYear" - ], - "summary": "List Term Calendar Years", - "description": "Lists all Years for an Employer and given Term Calendar.", - "operationId": "IndexTermCalendarYear", + "Department" + ] + }, + "get": { + "description": "Gets the Department specified.\r\nUse the other GET endpoint that supports non-alphanumeric characters for a department code", + "operationId": "GetDepartment", "parameters": [ { - "name": "employerId", + "description": "The Id of the Employer to which the Department belongs.", "in": "path", - "description": "The Id of the Employer for which you want to get Term Calendar Year list", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "termCalendarId", "in": "path", - "description": "The Id of the Term Calendar for which you want to list Years", + "name": "code", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.TermCalendarYearResponse" - } + "$ref": "#/components/schemas/Department" } } - } - }, - "400": { - "description": "Bad Request" - }, - "404": { - "description": "Not Found" + }, + "description": "Success" } - } - }, - "post": { + }, + "summary": "Get Department (deprecated)", "tags": [ - "TermCalendarYear" - ], - "summary": "Create Term Calendar Year", - "description": "Creates a new Year data for the Employer and given Term Calendar.", - "operationId": "CreateTermCalendarYear", + "Department" + ] + }, + "put": { + "description": "Updates a Department for the Employer.", + "operationId": "UpdateDepartment", "parameters": [ { - "name": "employerId", "in": "path", - "description": "The Id of the Employer to which the Term Calendar Year belongs.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "termCalendarId", "in": "path", - "description": "The Id of the Term Calendar which you want to add a new year", + "name": "code", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + "$ref": "#/components/schemas/Department" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + "$ref": "#/components/schemas/Department" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + "$ref": "#/components/schemas/Department" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + "$ref": "#/components/schemas/Department" } } } }, "responses": { - "201": { - "description": "Created", + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarYearResponse" + "$ref": "#/components/schemas/Department" } } - } - }, - "400": { - "description": "Bad Request" + }, + "description": "Success" }, "404": { - "description": "Not Found" + "description": "Employer Not Found" } - } + }, + "summary": "Update Department (deprecated)", + "tags": [ + "Department" + ] } }, - "/employers/{employerId}/termcalendaryears/{termCalendarId}/{id}": { + "/employers/{employerId}/dps/employeeNotices/{employeeId}": { "get": { - "tags": [ - "TermCalendarYear" - ], - "summary": "Get Term Calendar Year", - "description": "Gets a specified Term Calendar Year.", - "operationId": "GetTermCalendarYear", + "description": "Lists employee DPS Notices.", + "operationId": "ListEmployeeNoticesDps", "parameters": [ { - "name": "employerId", "in": "path", - "description": "The Id of the Employer to which the Term Calendar Year belongs.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "termCalendarId", "in": "path", - "description": "The Id of the Term Calendar to which the Year belongs", + "name": "employeeId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "id", - "in": "path", - "description": "The Id of the Term Calendar Year which you want to fetch", - "required": true, + "in": "query", + "name": "pageNum", + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", "schema": { - "type": "string", - "format": "uuid" + "format": "int32", + "type": "integer" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarYearResponse" + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" } } + }, + "description": "Success" + } + }, + "summary": "List Employee Notices", + "tags": [ + "Dps" + ] + } + }, + "/employers/{employerId}/dps/notices": { + "delete": { + "operationId": "DeleteAllDps", + "parameters": [ + { + "description": "The Id of the Employer that you want to delete all notices for.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" } + } + ], + "responses": { + "204": { + "description": "No Content" }, "400": { "description": "Bad Request" - }, - "404": { - "description": "Not Found" } - } - }, - "put": { + }, + "summary": "Delete All Notices", "tags": [ - "TermCalendarYear" - ], - "summary": "Update Term Calendar Year", - "description": "Updates Year data for the Employer and given Term Calendar.", - "operationId": "UpdateTermCalendarYear", + "Dps" + ] + }, + "get": { + "description": "Lists DPS Notices.", + "operationId": "ListNoticesDps", "parameters": [ { - "name": "employerId", "in": "path", - "description": "The Id of the Employer to which the Term Calendar Year belongs.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "termCalendarId", + "in": "query", + "name": "pageNum", + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List Notices", + "tags": [ + "Dps" + ] + }, + "post": { + "description": "Checks with HMRC for new notices. Returns an integer showing how many new notices were found", + "operationId": "CheckForNoticesDps", + "parameters": [ + { "in": "path", - "description": "The Id of the Term Calendar which you want to update existing year", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } - }, + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "int32", + "type": "integer" + } + } + }, + "description": "Success" + } + }, + "summary": "Check for new Notices", + "tags": [ + "Dps" + ] + } + }, + "/employers/{employerId}/dps/notices/xml": { + "post": { + "description": "Checks the supplied XML string for notices. They're then processed in the same was as if received from HMRC.\r\nOnly used for testing the parsing of DPS XML.\r\nReturns an integer showing how many new notices were found", + "operationId": "ParseXmlDps", + "parameters": [ { - "name": "id", "in": "path", - "description": "The Id of the Term Calendar Year which you want to update data", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + "type": "string" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + "type": "string" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + "type": "string" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + "type": "string" } } } }, "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.TermCalendarYearResponse" + "format": "int32", + "type": "integer" } } - } - }, - "400": { - "description": "Bad Request" - }, - "404": { - "description": "Not Found" + }, + "description": "Success" } - } - }, - "delete": { + }, + "summary": "Parse notices from XML", "tags": [ - "TermCalendarYear" - ], - "summary": "Delete Term Calendar Year", - "description": "Deletes a specified Term Calendar Year.", - "operationId": "DeleteTermCalendarYear", + "Dps" + ] + } + }, + "/employers/{employerId}/dps/notices/{id}": { + "delete": { + "operationId": "DeleteDps", "parameters": [ { - "name": "employerId", + "description": "The Id of the Employer to which the DpsNotice belongs.", "in": "path", - "description": "The Id of the Employer to which the Term Calendar Year belongs.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "termCalendarId", + "description": "The Id of the DsNotice you want to delete.", "in": "path", - "description": "The Id of the Term Calendar which you want to delete a year", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { "name": "id", - "in": "path", - "description": "The Id of the Term Calendar Year which you want to delete", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], @@ -42349,31805 +37362,41607 @@ }, "400": { "description": "Bad Request" - }, - "404": { - "description": "Not Found" } - } - } - }, - "/employers/{employerId}/tierablepay/{payrunEntryId}": { - "get": { + }, + "summary": "Delete Notice", "tags": [ - "TierablePay" - ], - "summary": "Calculate tierable pay", - "operationId": "GetTierablePay", + "Dps" + ] + }, + "get": { + "description": "Returns the specified DPS Notice.", + "operationId": "GetDps", "parameters": [ { - "name": "employerId", "in": "path", - "description": "Employer ID", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "payrunEntryId", + "description": "The Id of the DpsNotice you want to retrieve.", "in": "path", - "description": "Payrun entry ID", + "name": "id", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { - "400": { - "description": "Bad Request" - }, "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/DpsNotice" } } - } + }, + "description": "Success" } - } - } - }, - "/tools/calculate-net-of-on-costs": { - "get": { + }, + "summary": "Get Notice", "tags": [ - "Tools" - ], - "summary": "Calculate Net of On Costs", - "description": "Calculate the Gross Daily Pay and typical Net Costs for an employee.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", - "operationId": "CalculateNetOfOnCostsTools", + "Dps" + ] + }, + "put": { + "description": "Applies the specified DPS Notice.", + "operationId": "ApplyDps", "parameters": [ { - "name": "NotionalDayRate", - "in": "query", - "description": "The total chargeable rate per day.", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - }, - { - "name": "CalculationDate", - "in": "query", - "description": "Used to find associated legislative values, default Today.", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "Fee", - "in": "query", - "description": "The charge for providing this service, per pay period.", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - }, - { - "name": "FeeIsPercentage", - "in": "query", - "description": "If true, 'Fee' will be treated as a percentage.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "ApprenticeshipLevyRateOverride", - "in": "query", - "description": "Override the Apprenticeship Levy Rate. 0.50 for 0.5%.", - "schema": { - "type": "number", - "format": "double" - } - }, - { - "name": "EmployersPensionContribution", - "in": "query", - "description": "The employers pension contributions, per pay period.", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - }, - { - "name": "EmployersPensionContributionIsPercentage", - "in": "query", - "description": "If true, EmployersPensionContribution will be treated as a percentage.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "EmployeesPensionContribution", - "in": "query", - "description": "The employees pension contributions, per pay period.", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - }, - { - "name": "EmployeesPensionContributionIsPercentage", - "in": "query", - "description": "If true, EmployeesPensionContribution will be used as a percentage.", + "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "boolean" + "format": "uuid", + "type": "string" } }, { - "name": "UseAeBandings", - "in": "query", - "description": "If true, legislative Ae Bandings will be applied during calculation.", + "description": "The Id of the DpsNotice you want to apply.", + "in": "path", + "name": "id", "required": true, "schema": { - "type": "boolean" + "format": "uuid", + "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DpsNotice" + } + } + }, + "description": "Success" }, - { - "name": "HolidayWeeks", - "in": "query", - "description": "The holiday weeks to use for the calculation.", - "required": true, - "schema": { - "type": "number", - "format": "double" - } + "400": { + "description": "Bad Request" }, + "404": { + "description": "Not Found" + } + }, + "summary": "Apply Notice", + "tags": [ + "Dps" + ] + } + }, + "/employers/{employerId}/dps/reapply": { + "put": { + "description": "From a specified date onwards, reapply DpsNotices", + "operationId": "ReapplyNoticesDps", + "parameters": [ { - "name": "DaysWorkedPerWeek", - "in": "query", - "description": "Number of days the employee works per week.", + "description": "The Id of the Employer", + "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "integer", - "format": "int32" + "format": "uuid", + "type": "string" } }, { - "name": "PayPeriod", + "description": "The date from which to apply DpsNotices", "in": "query", - "description": "The pay frequency to be used for the calculation.", + "name": "appliedFromDate", "required": true, "schema": { - "$ref": "#/components/schemas/PayPeriods" - } - }, - { - "name": "PensionRule", - "in": "query", - "description": "The type of pension scheme being enrolled into, default SalarySacrifice.", - "schema": { - "$ref": "#/components/schemas/PensionRule" + "format": "date-time", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.NetOfOnCostsResponse" + "$ref": "#/components/schemas/Contract.ReapplyDpsNoticeResponse" } } - } - }, - "400": { - "description": "Bad Request" - }, - "403": { - "description": "Forbidden" + }, + "description": "Success" } - } + }, + "summary": "Reapply DpsNotices", + "tags": [ + "Dps" + ] } }, - "/employers/{employerId}/webhooks": { + "/employers/{employerId}/dps/settings": { "get": { - "tags": [ - "Webhook" - ], - "summary": "List Webhooks", - "description": "Lists all Webhooks for an Employer.", - "operationId": "IndexWebhook", + "description": "Returns the DpsSettings for the Employer", + "operationId": "GetDpsSettingsDps", "parameters": [ { - "name": "employerId", + "description": "The Id of the Employer", "in": "path", - "description": "The Id of the Employer for which you want to list Webhooks", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } + "$ref": "#/components/schemas/DpsSettings" } } - } + }, + "description": "Success" } - } - }, - "post": { + }, + "summary": "Get DPS Settings", "tags": [ - "Webhook" - ], - "summary": "Create Webhook", - "description": "Creates a new Webhook for the Employer.", - "operationId": "CreateWebhook", + "Dps" + ] + }, + "put": { + "description": "Updates the DpsSettings for the Employer", + "operationId": "UpdateDpsSettingsDps", "parameters": [ { - "name": "employerId", + "description": "The Id of the Employer", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Webhook" + "$ref": "#/components/schemas/DpsSettings" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Webhook" + "$ref": "#/components/schemas/DpsSettings" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Webhook" + "$ref": "#/components/schemas/DpsSettings" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Webhook" + "$ref": "#/components/schemas/DpsSettings" } } } }, "responses": { - "400": { - "description": "Bad Request" - }, - "201": { - "description": "Created" - }, - "404": { - "description": "Employer Not Found" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DpsSettings" + } + } + }, + "description": "Success" } - } + }, + "summary": "Update DPS Settings", + "tags": [ + "Dps" + ] } }, - "/employers/{employerId}/webhooks/{id}": { + "/employers/{employerId}/email": { "get": { - "tags": [ - "Webhook" - ], - "summary": "Get Webhook", - "description": "Gets the Webhook specified.", - "operationId": "GetWebhook", + "description": "Returns a list of all emails sent for this Employer.", + "operationId": "IndexEmail", "parameters": [ { - "name": "employerId", "in": "path", - "description": "The Id of the Employer to which the Webhook belongs.", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "id", + "in": "query", + "name": "pageNum", + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List Emails", + "tags": [ + "Email" + ] + } + }, + "/employers/{employerId}/email/authorize": { + "get": { + "description": "Redirects the user to Microsoft login for authorization.", + "operationId": "AuthorizeEmail", + "parameters": [ + { "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Webhook" + "type": "string" } } - } + }, + "description": "Success" } - } - }, - "put": { + }, + "summary": "Microsoft login for authorization", "tags": [ - "Webhook" - ], - "summary": "Update Webhook", - "description": "Updates a Webhook for the Employer.", - "operationId": "UpdateWebhook", + "Email" + ] + } + }, + "/employers/{employerId}/email/settings": { + "get": { + "description": "Returns the MailSettings for an Employer.", + "operationId": "GetMailSettingsEmail", "parameters": [ { - "name": "employerId", + "description": "The Id of the Employer", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } - }, + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MailSettings" + } + } + }, + "description": "Success" + } + }, + "summary": "Get MailSettings", + "tags": [ + "Email" + ] + }, + "put": { + "description": "Updates the MailSettings for an Employer.", + "operationId": "UpdateMailSettingsEmail", + "parameters": [ { - "name": "id", + "description": "The Id of the Employer", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Webhook" + "$ref": "#/components/schemas/MailSettings" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Webhook" + "$ref": "#/components/schemas/MailSettings" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Webhook" + "$ref": "#/components/schemas/MailSettings" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Webhook" + "$ref": "#/components/schemas/MailSettings" } } } }, "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Webhook" + "$ref": "#/components/schemas/MailSettings" } } - } - }, - "404": { - "description": "Employer Not Found" + }, + "description": "Success" } - } - }, - "delete": { + }, + "summary": "Update MailSettings", "tags": [ - "Webhook" - ], - "summary": "Delete Webhook", - "description": "Deletes the specified Webhook.", - "operationId": "DeleteWebhook", + "Email" + ] + } + }, + "/employers/{employerId}/email/settings/test": { + "post": { + "description": "This API call will generate a test email based on your MailSettings.", + "operationId": "TestMailSettingsEmail", "parameters": [ { - "name": "employerId", + "description": "The Id of the Employer", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "id", - "in": "path", - "required": true, + "description": "The address to send a test email to", + "in": "query", + "name": "email", "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerEmail" + } + } + }, + "description": "Created" } - } + }, + "summary": "Send Test Email", + "tags": [ + "Email" + ] } }, - "/employers/{employerId}/webhooks/samples/{webhookEvent}": { - "get": { - "tags": [ - "Webhook" - ], - "summary": "Sample Value", - "description": "Returns an example of the data you can expect your end point to receive when a webhook is fired.", - "operationId": "SampleWebhook", + "/employers/{employerId}/email/settings/verify": { + "post": { + "description": "If the user attempts to use a non-verified email address in their MailSettings then we'll send them a verification email.\r\nThis API endpoint can be used to re-send the email.", + "operationId": "VerifyMailSettingsEmail", "parameters": [ { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the Webhook belongs.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "webhookEvent", + "description": "The Id of the Employer", "in": "path", - "description": "The WebhookEvent that you want a sample value for.", + "name": "employerId", "required": true, "schema": { - "$ref": "#/components/schemas/WebhookEvent" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { } - } - } + "description": "Success" } - } - } - }, - "/employers/{employerId}/webhooks/{id}/payloads": { - "get": { + }, + "summary": "Email Verification (Request)", "tags": [ - "Webhook" - ], - "summary": "List WebhookPayloads", - "description": "Returns a list of all WebhookPayloads for this webhook", - "operationId": "PayloadsWebhook", + "Email" + ] + }, + "put": { + "description": "Used to process the link sent in an email to verify an email address that's being used in MailSettings.", + "operationId": "VerifyMailSettingsResponseEmail", "parameters": [ { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "id", + "description": "The employer Id.", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "pageNum", + "description": "The value from the link in the email.", "in": "query", + "name": "u", "schema": { - "type": "integer", - "format": "int32" + "format": "uuid", + "type": "string" } }, { - "name": "pageSize", + "description": "The value from the link in the email.", "in": "query", + "name": "k", "schema": { - "type": "integer", - "format": "int32" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } + "type": "boolean" } } - } + }, + "description": "Success" } - } + }, + "summary": "Email Verification (Respond)", + "tags": [ + "Email" + ] } }, - "/employers/{employerId}/webhooks/{id}/payloads/{payloadId}": { - "get": { - "tags": [ - "Webhook" - ], - "summary": "Get WebhookPayload", - "description": "Returns the specified WebhookPayload for this webhook", - "operationId": "PayloadWebhook", + "/employers/{employerId}/email/token": { + "post": { + "description": "Stores token details (access and refresh tokens) in the database by receiving the authorization code \r\nand exchanging it for tokens using the Microsoft identity platform.", + "operationId": "SaveOAuthTokenEmail", "parameters": [ { - "name": "employerId", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "id", + "description": "The authorization code returned by Microsoft after user consent.", + "in": "query", + "name": "code", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Update token details by Authorization code", + "tags": [ + "Email" + ] + } + }, + "/employers/{employerId}/email/{emailId}": { + "get": { + "description": "Returns the email along with its status.", + "operationId": "GetEmailEmail", + "parameters": [ + { "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } }, { - "name": "payloadId", "in": "path", + "name": "emailId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WebhookPayload" + "$ref": "#/components/schemas/EmployerEmail" } } - } + }, + "description": "Success" } - } - } - }, - "/employers/{employerId}/workingpatterns": { - "get": { + }, + "summary": "Get Email", "tags": [ - "WorkingPattern" - ], - "summary": "List WorkingPatterns", - "description": "Lists all WorkingPattern for the Employer specified.", - "operationId": "IndexAsyncWorkingPattern", + "Email" + ] + }, + "post": { + "description": "Re-send an existing email.", + "operationId": "ResendEmailEmail", "parameters": [ { + "in": "path", "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { "in": "path", - "description": "The Id of the Employer for which you want to list WorkingPattern", + "name": "emailId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - } + "$ref": "#/components/schemas/EmployerEmail" } } - } + }, + "description": "Success" } - } - }, - "post": { + }, + "summary": "Re-send Email", "tags": [ - "WorkingPattern" - ], - "summary": "Create WorkingPattern", - "description": "Creates a new WorkingPattern for the Employer.", - "operationId": "CreateWorkingPattern", + "Email" + ] + } + }, + "/employers/{employerId}/employees": { + "get": { + "operationId": "IndexEmployee", "parameters": [ { - "name": "employerId", + "description": "The Id of the Employer for which you want to see Employees", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/Contract.WorkingPatternRequest" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/Contract.WorkingPatternRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Contract.WorkingPatternRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Contract.WorkingPatternRequest" - } + }, + { + "description": "Zero-based page number, used in conjunction with pageSize", + "in": "query", + "name": "pageNum", + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "description": "The number of items per page", + "in": "query", + "name": "pageSize", + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "description": "Restrict the results to employees with the given status", + "in": "query", + "name": "status", + "schema": { + "$ref": "#/components/schemas/EmployeeStatus" + } + }, + { + "description": "If specified then only employees assigned to this department code will be listed", + "in": "query", + "name": "deptCode", + "schema": { + "type": "string" } - } - }, - "responses": { - "400": { - "description": "Bad Request" }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorkingPattern" - } - } + { + "description": "If specified then only employees enrolled into the given pension scheme will be listed.\r\n If empty guid(00000000-0000-0000-0000-000000000000) is passed in all employees not enrolled into any pension scheme will be listed.", + "in": "query", + "name": "pensionSchemeId", + "schema": { + "format": "uuid", + "type": "string" } }, - "404": { - "description": "Employer Not Found" - } - } - } - }, - "/employers/{employerId}/workingpatterns/{id}": { - "get": { - "tags": [ - "WorkingPattern" - ], - "summary": "Get WorkingPattern", - "description": "Gets the WorkingPattern specified.", - "operationId": "GetAsyncWorkingPattern", - "parameters": [ { - "name": "employerId", - "in": "path", - "description": "The Id of the Employer to which the WorkingPattern belongs.", - "required": true, + "description": "Specifies the field by which to sort the employees. Default is EmployeeSortBy.None.", + "in": "query", + "name": "sortBy", "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/EmployeeSortBy" } }, { - "name": "id", - "in": "path", - "description": "The id of the WorkingPattern you want to retrieve.", - "required": true, + "description": "Specifies whether the sorting should be in descending order. Default is false.", + "in": "query", + "name": "sortDescending", "schema": { - "type": "string", - "format": "uuid" + "default": false, + "type": "boolean" } } ], "responses": { "200": { - "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.WorkingPatternResponse" + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" } } - } - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" + }, + "description": "Success" } - } - }, - "put": { + }, + "summary": "List Employees", "tags": [ - "WorkingPattern" - ], - "summary": "Update WorkingPattern", - "description": "Updates the details of an existing WorkingPattern.", - "operationId": "UpdateWorkingPattern", + "Employee" + ] + }, + "post": { + "description": "Creates an Employee for the Employer specified.\r\nIf you don't provide PayOptions then the DefaultPayOptions from the Employer will be used", + "operationId": "CreateEmployee", "parameters": [ { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "id", + "description": "The Id of the Employer you are creating the Employee for", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], "requestBody": { "content": { - "application/json-patch+json": { + "application/*+json": { "schema": { - "$ref": "#/components/schemas/Contract.WorkingPatternRequest" + "$ref": "#/components/schemas/Contract.CreateEmployeeRequest" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.WorkingPatternRequest" + "$ref": "#/components/schemas/Contract.CreateEmployeeRequest" } }, - "text/json": { + "application/json-patch+json": { "schema": { - "$ref": "#/components/schemas/Contract.WorkingPatternRequest" + "$ref": "#/components/schemas/Contract.CreateEmployeeRequest" } }, - "application/*+json": { + "text/json": { "schema": { - "$ref": "#/components/schemas/Contract.WorkingPatternRequest" + "$ref": "#/components/schemas/Contract.CreateEmployeeRequest" } } } }, "responses": { - "200": { - "description": "Success", + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contract.WorkingPatternResponse" + "$ref": "#/components/schemas/Contract.EmployeeResponse" } } - } + }, + "description": "Created" + }, + "400": { + "description": "Bad Request" }, "404": { - "description": "Not Found" + "description": "Employer Not Found" + }, + "409": { + "description": "Conflict" } - } - }, - "delete": { + }, + "summary": "Create a new Employee", "tags": [ - "WorkingPattern" - ], - "summary": "Delete WorkingPattern", - "description": "Deletes the specified WorkingPattern.", - "operationId": "DeleteWorkingPattern", + "Employee" + ] + } + }, + "/employers/{employerId}/employees/delete": { + "post": { + "description": "Used to delete multiple employees.\r\nThe body should contain an array of Ids to identify the employees to delete.", + "operationId": "DeleteMultipleEmployee", "parameters": [ { - "name": "employerId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "id", + "description": "The Id of the Employer to which the Employees belong", "in": "path", + "name": "employerId", "required": true, "schema": { - "type": "string", - "format": "uuid" + "format": "uuid", + "type": "string" } } ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - } - } - } - } - }, - "components": { - "schemas": { - "Address": { - "type": "object", - "properties": { - "line1": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "line2": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "line3": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "line4": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "line5": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "postCode": { - "maxLength": 10, - "type": "string", - "nullable": true - }, - "country": { - "$ref": "#/components/schemas/Country" - }, - "foreignCountry": { - "maxLength": 35, - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AdvancedVarianceReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AdvancedVarianceReportLine" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } }, - "nullable": true - }, - "payCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayCode" + "application/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } }, - "nullable": true - }, - "primaryPeriodName": { - "type": "string", - "nullable": true - }, - "secondaryPeriodName": { - "type": "string", - "nullable": true - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true - }, - "isDraft": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "AdvancedVarianceReportLine": { - "type": "object", - "properties": { - "employeeCode": { - "type": "string", - "nullable": true - }, - "employeeName": { - "type": "string", - "nullable": true - }, - "department": { - "type": "string", - "nullable": true - }, - "costCentre": { - "type": "string", - "nullable": true - }, - "primaryGrossTotal": { - "type": "number", - "format": "double", - "nullable": true - }, - "secondaryGrossTotal": { - "type": "number", - "format": "double", - "nullable": true - }, - "primaryGrossTaxable": { - "type": "number", - "format": "double", - "nullable": true - }, - "secondaryGrossTaxable": { - "type": "number", - "format": "double", - "nullable": true - }, - "primaryNetPay": { - "type": "number", - "format": "double", - "nullable": true - }, - "secondaryNetPay": { - "type": "number", - "format": "double", - "nullable": true - }, - "primaryTax": { - "type": "number", - "format": "double", - "nullable": true - }, - "secondaryTax": { - "type": "number", - "format": "double", - "nullable": true - }, - "primaryEmployeeNi": { - "type": "number", - "format": "double", - "nullable": true - }, - "secondaryEmployeeNi": { - "type": "number", - "format": "double", - "nullable": true - }, - "primaryEmployerNi": { - "type": "number", - "format": "double", - "nullable": true - }, - "secondaryEmployerNi": { - "type": "number", - "format": "double", - "nullable": true - }, - "primaryStudentOrPgLoan": { - "type": "number", - "format": "double", - "nullable": true - }, - "secondaryStudentOrPgLoan": { - "type": "number", - "format": "double", - "nullable": true - }, - "payCodeVarianceLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayCodeVarianceLine" + "application/json-patch+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AdvancedVarianceReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/AdvancedVarianceReport" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "AeAction": { - "enum": [ - "NoChange", - "Enrol", - "Exit", - "Inconclusive", - "Postpone", - "ReEnrol" - ], - "type": "string" - }, - "AeAssessment": { - "type": "object", - "properties": { - "assessmentDate": { - "type": "string", - "format": "date-time" - }, - "employeeState": { - "$ref": "#/components/schemas/AeEmployeeState" - }, - "age": { - "type": "integer", - "description": "[readonly] The age of the Employee at the time of the assessment", - "format": "int32" - }, - "ukWorker": { - "$ref": "#/components/schemas/AeUKWorker" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "description": "[readonly] The PaySchedule ordinal for the Employee at the time of the assessment", - "format": "int32" - }, - "earningsInPeriod": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "qualifyingEarningsInPeriod": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "aeExclusionCode": { - "$ref": "#/components/schemas/AeExclusionCode" - }, - "status": { - "$ref": "#/components/schemas/AeStatus" - }, - "reason": { - "type": "string", - "description": "[readonly] The reason for determining the Status given.", - "nullable": true - }, - "action": { - "$ref": "#/components/schemas/AeAssessmentAction" - }, - "startReportingType": { - "$ref": "#/components/schemas/PensionReportingType" - }, - "endReportingType": { - "$ref": "#/components/schemas/PensionReportingType" - }, - "startPayRunEntryId": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "endPayRunEntryId": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "employee": { - "$ref": "#/components/schemas/Item" - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true - } - }, - "additionalProperties": false, - "description": "As part of AutoEnrolment we assess your Employees to see if they need to be auto-enroled in a Pension.\r\nThis model shows the result of an assessment." - }, - "AeAssessmentAction": { - "type": "object", - "properties": { - "action": { - "$ref": "#/components/schemas/AeAction" - }, - "employeeState": { - "$ref": "#/components/schemas/AeEmployeeState" - }, - "actionCompleted": { - "type": "boolean", - "description": "[readonly] Indicates whether or not the required action was successfully completed" - }, - "actionCompletedMessage": { - "type": "string", - "description": "[readonly] Gives further information about the action taken or the reason if wasn't successfully completed", - "nullable": true - }, - "requiredLetter": { - "$ref": "#/components/schemas/AeStatutoryLetter" - }, - "pensionSchemeId": { - "type": "string", - "description": "[readonly] The PensionSchemeId that a completed action relates to", - "format": "uuid" - }, - "workerGroupId": { - "type": "string", - "description": "[readonly] The WorkerGroupId that a completed action relates to", - "format": "uuid" - }, - "letterNotYetSent": { - "type": "boolean", - "description": "[readonly] Indicates whether or not any required letter has been sent" - } - }, - "additionalProperties": false - }, - "AeEmployeeState": { - "enum": [ - "Automatic", - "OptOut", - "OptIn", - "VoluntaryJoiner", - "ContractualPension", - "CeasedMembership", - "Leaver", - "Excluded", - "Enrol" - ], - "type": "string" - }, - "AeExclusionCode": { - "enum": [ - "NotKnown", - "NotAWorker", - "NotWorkingInUk", - "NoOrdinarilyWorkingInUk", - "OutsideOfAgeRange", - "SingleEmployee", - "CeasedActiveMembershipInPast12Mo", - "CeasedActiveMembership", - "ReceivedWulsInPast12Mo", - "ReceivedWuls", - "Leaving", - "TaxProtection", - "CisSubContractor" - ], - "type": "string" - }, - "AeStatus": { - "enum": [ - "Eligible", - "NonEligible", - "Entitled", - "NoDuties" - ], - "type": "string" - }, - "AeStatutoryLetter": { - "enum": [ - "B1", - "B2", - "B3", - "B4" - ], - "type": "string" - }, - "AeUKWorker": { - "enum": [ - "No", - "Yes", - "Ordinarily" - ], - "type": "string" - }, - "AllowanceType": { - "enum": [ - "Fixed", - "Variable", - "Range", - "Graded" - ], - "type": "string" - }, - "AnalysisCategory": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "maxLength": 100, - "minLength": 1, - "type": "string", - "description": "The unique Analysis Category Name" + "text/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "AnalysisCategoryCode": { - "required": [ - "code", - "title" - ], - "type": "object", - "properties": { - "code": { - "maxLength": 20, - "minLength": 1, - "type": "string" + "responses": { + "204": { + "description": "No Content" }, - "title": { - "maxLength": 50, - "minLength": 1, - "type": "string", - "description": "The name of this Analysis Code" + "400": { + "description": "Bad Request" }, - "color": { - "maxLength": 6, - "type": "string", - "description": "A color to used to represent this Analysis Code, in hex format. ie 'ff0000'", - "nullable": true + "409": { + "description": "Conflict" + } + }, + "summary": "Delete Employees", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/expiring-rtw": { + "get": { + "description": "Returns a list of Item representing Employees that have a RightToWork with a DocumentExpiring date within the next numberOfDays days.", + "operationId": "ExpiringRtwEmployee", + "parameters": [ + { + "description": "The Id of the Employer to search.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accountingCode": { - "maxLength": 50, - "type": "string", - "nullable": true + { + "description": "The number of days in the future to look got expiry dates.", + "in": "query", + "name": "numberOfDays", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "AnalysisCategoryCodes": { - "type": "object", - "properties": { - "analysisCategory": { - "type": "string", - "description": "AnalysisCategory Model", - "nullable": true + "summary": "Expiring RightToWork", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/import": { + "post": { + "description": "Import employee data from a CSV file.", + "operationId": "ImportCsvEmployee", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "analysisCategoryCode": { - "type": "string", - "description": "AnalysisCategoryCode Model", - "nullable": true + { + "description": "The format of the CSV file.", + "in": "query", + "name": "format", + "schema": { + "$ref": "#/components/schemas/CsvFileFormat" + } }, - "analysisCategoryId": { - "type": "string", - "description": "AnalysisCategory Identifier", - "format": "uuid", - "nullable": true + { + "description": "Set to true and nothing will be imported but you'll be shown a preview of the data.", + "in": "query", + "name": "previewOnly", + "schema": { + "default": false, + "type": "boolean" + } }, - "analysisCategoryCodeId": { - "type": "string", - "description": "AnalysisCategoryCode Identifier", - "format": "uuid", - "nullable": true + { + "description": "Set to true and if the payroll code matches an existing employee then that employee will be updated.", + "in": "query", + "name": "allowUpdates", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } } }, - "additionalProperties": false - }, - "AnalysisCategoryIndex": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "index": { - "type": "integer", - "format": "int32" + "409": { + "description": "Conflict" } }, - "additionalProperties": false - }, - "AnalysisReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AnalysisReportLine" - }, - "nullable": true + "summary": "Import CSV", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/leavers": { + "get": { + "description": "Returns a list of all Employees that have a leaving date set", + "operationId": "LeaversEmployee", + "parameters": [ + { + "description": "The Id of the Employer for which you want to see Leavers", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayCode" + { + "description": "If set to true then only employees that don't have the P45Sent set to true will be returned", + "in": "query", + "name": "onlyUnsentP45s", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true - }, - "showPayPeriodBreakdown": { - "type": "boolean" - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "periodTo": { - "type": "integer", - "format": "int32" - }, - "startPeriodName": { - "type": "string", - "nullable": true - }, - "endPeriodName": { - "type": "string", - "nullable": true - }, - "startDate": { - "type": "string", - "format": "date" - }, - "endDate": { - "type": "string", - "format": "date" - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true - }, - "isDraft": { - "type": "boolean" + "description": "Success" } }, - "additionalProperties": false + "summary": "List Leavers", + "tags": [ + "Employee" + ] }, - "AnalysisReportLine": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" - }, - "taxYear": { - "type": "string", - "nullable": true - }, - "payPeriod": { - "type": "integer", - "format": "int32" - }, - "gross": { - "type": "number", - "format": "double" - }, - "niableGross": { - "type": "number", - "format": "double" - }, - "pensionableGross": { - "type": "number", - "format": "double" - }, - "net": { - "type": "number", - "format": "double" - }, - "takeHome": { - "type": "number", - "format": "double" - }, - "employerNic": { - "type": "number", - "format": "double" - }, - "employerPension": { - "type": "number", - "format": "double" - }, - "showQtyColumn": { - "type": "boolean" + "put": { + "description": "Used to mark multiple employees as leavers.\r\nThe body should contain an array of Ids to identify the employees to update.", + "operationId": "MarkAsLeaversEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employees belong", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "niSaving": { - "type": "number", - "format": "double" + { + "description": "The date the employees left or are leaving", + "in": "query", + "name": "date", + "schema": { + "format": "date-time", + "type": "string" + } }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AnalysisReportLineValue" + { + "description": "If set to true, the employee will be email a P45 if they have an email address", + "in": "query", + "name": "emailP45", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } }, - "nullable": true + "application/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "AnalysisReportLineValue": { - "type": "object", - "properties": { - "qty": { - "type": "number", - "format": "double", - "nullable": true + "responses": { + "200": { + "description": "Success" }, - "code": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "value": { - "type": "number", - "format": "double" + "409": { + "description": "Conflict" } }, - "additionalProperties": false - }, - "AnalysisReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, + "summary": "Mark as Leavers", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/list": { + "post": { + "operationId": "FpsEmployeesEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/AnalysisReport" + "application/*+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "description": "List of Employee Ids" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.EmployeeResponse" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "AnnualRoundingRule": { - "enum": [ - "RoundOff", - "Exact", - "RoundUp", - "RoundDown" - ], - "type": "string" - }, - "AssumedPensionablePay": { - "enum": [ - "AssumedPensionablePay", - "NormalPay", - "HigherOfTheTwo" - ], - "type": "string" - }, - "AttachmentOrder": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/AttachmentOrderType" - }, - "carryForwardShortfall": { - "type": "boolean", - "description": "[ReadOnly] Whether or not shortfalls should be carried forward", - "readOnly": true - }, - "allowProtectedEarnings": { - "type": "boolean", - "description": "[ReadOnly] Whether or not shortfalls should be carried forward", - "readOnly": true - }, - "autoDeduction": { - "type": "boolean", - "description": "[readonly] Whether or not the amount to be deducted is automatically calculated", - "readOnly": true - }, - "reference": { - "maxLength": 100, - "type": "string", - "description": "The reference which appeared on the court paperwork", - "nullable": true - }, - "issueDate": { - "type": "string", - "description": "The date of issue for this Order", - "format": "date" - }, - "applyFrom": { - "type": "string", - "description": "The date from which to apply this Order", - "format": "date" - }, - "applyUntil": { - "type": "string", - "description": "An optional date on which to stop applying this order", - "format": "date", - "nullable": true - }, - "deductionIsPercentage": { - "type": "boolean", - "description": "Whether or not the amount given for Deduction is a percentage rather than a fixed amount" - }, - "deduction": { - "type": "number", - "description": "The percentage or amount (depending on DeductionIsPercentage) to deduct", - "format": "double" - }, - "protectedEarningsIsPercentage": { - "type": "boolean", - "description": "Whether or not the amount for ProtectedEarnings is a percentage rather than a fixed amount." - }, - "protectedEarnings": { - "type": "number", - "description": "The percentage or amount or percentage (depending on ProtectedEarningsIsPercentage) to protect", - "format": "double" - }, - "chargeAdminFee": { - "type": "boolean", - "description": "Whether or not a £1 admin fee should be deducted for this order" - }, - "shortfall": { - "type": "number", - "description": "Any shortfall that is being carried forward", - "format": "double" - }, - "stopWhenTotalPaid": { - "type": "boolean", - "description": "Whether or not this order should be stopped once a total amount has been paid" - }, - "totalAmountToPay": { - "type": "number", - "description": "The Total amount that needs to be paid for this Order", - "format": "double" - }, - "amountPreviouslyPaid": { - "type": "number", - "description": "Any amount that has previously been paid towards this Order", - "format": "double" - }, - "stopped": { - "type": "boolean", - "description": "[readonly] Whether or not this Order has been stopped.\r\nThis is set automatically when either it's paid in full or the ApplyUntil date has been reached." - }, - "notes": { - "maxLength": 300, - "type": "string", - "description": "A free-form text field to record any comments", - "nullable": true - }, - "includeBankDetails": { - "type": "boolean" - }, - "bankDetails": { - "$ref": "#/components/schemas/BankDetails" + "summary": "Get list of FPS Employees for EYFPS for the given Ids", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/onhold": { + "put": { + "description": "Used to mark multiple employees as On Hold or not On Hold.\r\nThe body should contain an array of Ids to identify the employees to update.", + "operationId": "SetOnHoldEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employees belong", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttachmentOrderPayment" + { + "description": "The OnHold status to set", + "in": "query", + "name": "onHold", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } }, - "description": "[readonly] Payments made towards this order. Only populated when viewed as a report.", - "nullable": true - }, - "payee": { - "type": "string", - "description": "The Id of the Payee, if any, that deductions are to be paid to.", - "format": "uuid", - "nullable": true - }, - "payeeName": { - "type": "string", - "description": "The name of the Payee, if any, that deductions are to be paid to.", - "nullable": true - }, - "documentCount": { - "type": "integer", - "description": "[readonly] The number of attachments associated with this model", - "format": "int32" - }, - "documents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + "application/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } }, - "description": "[readonly] The attachments associated with this model", - "nullable": true - }, - "employee": { - "$ref": "#/components/schemas/Item" - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "application/json-patch+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + } } }, - "additionalProperties": false, - "description": "Used to represent an Attachment of Earnings Order (AEO)" - }, - "AttachmentOrderPayment": { - "type": "object", - "properties": { - "attachmentOrder": { - "$ref": "#/components/schemas/Item" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "date": { - "type": "string", - "description": "[readonly] The date this deduction was made", - "format": "date" - }, - "description": { - "type": "string", - "description": "[readonly] Description of deduction, usually the reference from the AttachmentOrder", - "nullable": true - }, - "attachablePay": { - "type": "number", - "description": "[readonly] The total Attachable pay for the Employee on this PayRun", - "format": "double" - }, - "protectedPay": { - "type": "number", - "description": "[readonly] The amount of the Attachable Pay that must be protected", - "format": "double" - }, - "otherAttachmentOrderDeductions": { - "type": "number", - "description": "[readonly] Deductions made on this PayRun for this employee due to other higher priority AttachmentOrders", - "format": "double" - }, - "desiredDeduction": { - "type": "number", - "description": "[readonly] The amount that should be deducted, if arrestable pay is available.\r\nNot including any shortfall", - "format": "double" + "responses": { + "200": { + "description": "Success" }, - "shortfall": { - "type": "number", - "description": "[readonly] Any shortfall (ie arrears) that existed before this PayRun.", - "format": "double" + "400": { + "description": "Bad Request" }, - "totalPaid": { - "type": "number", - "description": "[readonly] Total amount paid to date, including this deduction.", - "format": "double" + "409": { + "description": "Conflict" + } + }, + "summary": "Mark as On Hold", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/openingbalances/{taxYear}": { + "get": { + "description": "Totals of Employee Opening Balances in the specified TaxYear", + "operationId": "GetOpeningBalancesTotalsOpeningBalances", + "parameters": [ + { + "description": "The Id of the Employer to search.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "resultingDeduction": { - "type": "number", - "description": "[readonly] The actual amount deducted", - "format": "double" + { + "description": "The TaxYear for which you want to Opening Balances totals.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalancesTotals" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalancesTotals" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/OpeningBalancesTotals" + } + } + }, + "description": "Success" }, - "resultingShortfall": { - "type": "number", - "description": "[readonly] The resulting shortfall (including any shortfall from previous periods", - "format": "double" + "400": { + "description": "Bad Request" + } + }, + "summary": "Totals of employee opening balances for a tax year", + "tags": [ + "OpeningBalances" + ] + } + }, + "/employers/{employerId}/employees/payincrease": { + "put": { + "description": "Increases the PayOptions.PayAmount and PayOptions.BaseHourlyRate by the percentage given.", + "operationId": "ApplyPayIncreaseEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the employees belong.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "adminFee": { - "type": "number", - "description": "[readonly] Any admin fee charged", - "format": "double" + { + "in": "query", + "name": "percentage", + "schema": { + "format": "double", + "type": "number" + } }, - "employee": { - "$ref": "#/components/schemas/Item" + { + "description": "Set this to true", + "in": "query", + "name": "allEmployees", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Success" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "409": { + "description": "Conflict" } }, - "additionalProperties": false, - "description": "Used to represent a payment towards an Attachment of Earnings Order (AEO)" - }, - "AttachmentOrderReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, + "summary": "Apply Pay Increase", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/payoptions": { + "put": { + "description": "Overwrite the PayOptions for all employees with the values provided.\r\nCurrently only the following fields are updated: period, payAmount, basis, payamountMultiplier, nationalMinimumWage and regularPaylines.", + "operationId": "ApplyPayOptionsEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the employees belong.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/AttachmentOrder" + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PayOptions" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayOptions" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PayOptions" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PayOptions" + } + } + } + }, + "responses": { + "200": { + "description": "Success" }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "409": { + "description": "Conflict" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "AttachmentOrderType": { - "enum": [ - "AeoP", - "Aeo", - "Csa", - "Csa2012", - "Deo", - "AeoNp", - "CcPre92", - "CcPost92", - "Ctaeo", - "Mcaeo", - "Ea", - "Cma", - "Cao", - "Isd", - "Ea2006", - "Caps", - "Dea", - "DeaHigher", - "DeaFixed", - "CtaeoWales" + "summary": "Apply PayOptions", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/reset-holiday-scheme": { + "put": { + "description": "Resets employee accrual scheme fields to zero and adds a update accrual reset date in employee table", + "operationId": "ResetEmployeeHolidayAccrualSchemeEmployee", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "AttachmentOrdersReport": { - "type": "object", - "properties": { - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "periodTo": { - "type": "integer", - "format": "int32" - }, - "startPeriodName": { - "type": "string", - "nullable": true - }, - "endPeriodName": { - "type": "string", - "nullable": true - }, - "startDate": { - "type": "string", - "format": "date" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + } }, - "endDate": { - "type": "string", - "format": "date" + "description": "UnqiueId of the employees for setting the Holiday Scheme Reset Date" + }, + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Resets employee accrual scheme", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/search": { + "get": { + "description": "Search for an employee of the specified employer based on their name or payroll code.\r\nEnsure your query is at least 3 characters long or you wont get any results.", + "operationId": "SearchEmployee", + "parameters": [ + { + "description": "The Id of the Employer to search.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "report": { - "$ref": "#/components/schemas/Report" + { + "description": "The search string (at least 3 characters).", + "in": "query", + "name": "query", + "schema": { + "type": "string" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "description": "If set to true, then we'll only search employees that aren't labelled as CIS Subcontractors", + "in": "query", + "name": "exludeCisSubContactors", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Search Employer for Employees", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/search/payrollcode": { + "get": { + "description": "Get an employee by their payroll code. Will return an Item that contains the Id for you to retrieve the full Employee record", + "operationId": "SearchByPayrollCodeEmployee", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "title": { - "type": "string", - "nullable": true + { + "description": "The payroll code to look for.", + "in": "query", + "name": "code", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Item" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Employee by Payroll Code", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/attachmentorders": { + "get": { + "description": "Lists all AttachmentOrders for the Employee", + "operationId": "IndexAttachmentOrder", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isDraft": { - "type": "boolean" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "List AttachmentOrders", + "tags": [ + "AttachmentOrder" + ] }, - "AttachmentOrdersReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "post": { + "description": "Creates an AttachmentOrder for the Employee", + "operationId": "CreateAttachmentOrder", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/AttachmentOrdersReport" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrder" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrder" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrder" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrder" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "AuditEventAction": { - "enum": [ - "Added", - "Edited", - "Deleted" - ], - "type": "string" - }, - "AuthScheme": { - "enum": [ - "OAuth1", - "OAuth2", - "Basic", - "ApiKeyInHeader", - "Hmac", - "OAuth2Cc", - "OAuth2Password", - "DeferToThirdParty" - ], - "type": "string" - }, - "AutoEnrolment": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/AeEmployeeState" + "responses": { + "201": { + "description": "Created" }, - "stateDate": { - "type": "string", - "description": "[readonly]", - "format": "date", - "nullable": true + "400": { + "description": "Bad Request" }, - "ukWorker": { - "$ref": "#/components/schemas/AeUKWorker" + "404": { + "description": "Not Found" }, - "daysToDeferAssessment": { - "type": "integer", - "description": "The number of days, if any, to defer assessment of this employee.\r\nYou're allowed to defer assessment of new employees by up to 3 months.", - "format": "int32" + "409": { + "description": "Conflict" + } + }, + "summary": "Create AttachmentOrder", + "tags": [ + "AttachmentOrder" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/attachmentorders/payments/{taxYear}": { + "get": { + "description": "Lists all Payments made to AttachmentOrders for the Employee in the given TaxYear", + "operationId": "PaymentsAttachmentOrder", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "postponementDate": { - "type": "string", - "description": "[readonly] If a value is present, then employee wont be enrolled on an AE Pension until after this date.\r\nThis is automatically set to a date if the employee is deemed to be an EligibleJobHolder, but the employer has set a Postponement period and this value is currently null\r\nThis is automatically set to null if it already has a value and the employee is deemed NOT to be an EligibleJobHolder - ie, they previously qualified but now do not.", - "format": "date", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "deferByMonthsNotDays": { - "type": "boolean", - "description": "If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AttachmentOrderPayment" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Payments", + "tags": [ + "AttachmentOrder" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/attachmentorders/{id}": { + "delete": { + "description": "Deletes the AttachmentOrder specified by the Id for the Employee specified by the EmployeeId", + "operationId": "DeleteAttachmentOrder", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "exempt": { - "type": "boolean" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "aeExclusionCode": { - "$ref": "#/components/schemas/AeExclusionCode" + { + "description": "The Id of the AttachmentOrder you want to delete.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "aePostponementLetterSent": { - "type": "boolean" + "400": { + "description": "Bad Request" }, - "lastAssessment": { - "$ref": "#/components/schemas/AeAssessment" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "AutoPilotFinaliseTime": { - "enum": [ - "JustAfterMidnight", - "NineAm", - "OnePm", - "FourPm", - "SixPm", - "ElevenPm" - ], - "type": "string" + "summary": "Delete AttachmentOrder", + "tags": [ + "AttachmentOrder" + ] }, - "AutomationSettings": { - "type": "object", - "properties": { - "enableAutoPilot": { - "type": "boolean", - "description": "IF enabled then payruns will be automatically finalised on the payment date and the next payrun will be started" - }, - "autoPilotTime": { - "$ref": "#/components/schemas/AutoPilotFinaliseTime" - }, - "autoPilotOffset": { - "maximum": 6, - "minimum": 0, - "type": "integer", - "description": "How many days before the payment date a payrun should be finalised.\r\nSet it to 0 if you want the payrun to be automatically finalised on the payment date itself", - "format": "int32" - }, - "enableAutoOpen": { - "type": "boolean", - "description": "IF enabled then whenever you close a payrun, the next one will be started. Automatically set to true if EnableAutoPilot is true" - }, - "autoSubmitFps": { - "type": "boolean", - "description": "If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun.\r\nThis property will always have the same value as the property with the same name on the RtiSubmissionSettings model." - }, - "autoSubmitPayments": { - "type": "boolean", - "description": "If set to true, we'll automatically submit payments whenever you finalise a PayRun.\r\nThe employer must be connected to an ExternalDataProvider supporting Type of 'Payments'." - }, - "autoSubmitJournal": { - "type": "boolean", - "description": "If set to true, we'll automatically submit the payroll journal whenever you finalise a PayRun.\r\nThe employer must be connected to an ExternalDataProvider supporting Type of 'Accounting'." - }, - "autoSubmitPayments_Employee": { - "type": "boolean", - "description": "Used in conjunction with AutoSubmitPayments." - }, - "autoSubmitPayslips": { - "type": "boolean", - "description": "If set to true, we'll automatically submit payslips whenever you finalise a PayRun.\r\nThe employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'." - }, - "autoSubmitP45s": { - "type": "boolean", - "description": "If set to true, we'll automatically submit P45s whenever you finalise a PayRun.\r\nThe employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'." - }, - "autoSubmitPayments_Hmrc": { - "type": "boolean", - "description": "Used in conjunction with AutoSubmitPayments." - }, - "autoSubmitPayments_Deductions": { - "type": "boolean", - "description": "Used in conjunction with AutoSubmitPayments." - }, - "autoSubmitPayments_Aeos": { - "type": "boolean", - "description": "Used in conjunction with AutoSubmitPayments." - }, - "autoSubmitPayments_Pensions": { - "type": "boolean", - "description": "Used in conjunction with AutoSubmitPayments." - }, - "payslipReleaseType": { - "$ref": "#/components/schemas/PayslipReleaseType" - }, - "autoSubmitPayslips_DaysBeforePayday": { - "$ref": "#/components/schemas/DaysBeforePayday" - }, - "autoSubmitPayslips_PaymentDateRule": { - "$ref": "#/components/schemas/PayslipReleasePaymentDateRule" - }, - "autoSubmitPayslips_PayslipReleaseTime": { - "$ref": "#/components/schemas/PayslipReleaseTime" + "get": { + "description": "Gets the AttachmentOrder specified by the Id for the Employee specified by the EmployeeId", + "operationId": "GetAttachmentOrder", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employeesWithoutEmailAddress": { - "type": "integer", - "description": "[readonly] A count of how many employees or subcontractors for this employer do not have email addresses", - "format": "int32" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employeesWithEmailAddressButNotAutoSending": { - "type": "integer", - "description": "[readonly] A count of how many employees or subcontractors for this employer do have email addresses but don't have the option enabled to auto-email payslips", - "format": "int32" + { + "description": "The Id of the AttachmentOrder you want to retrieve.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrder" + } + } + }, + "description": "Success" }, - "subcontractorsNotAutoSendingStatement": { - "type": "integer", - "description": "[readonly] A count of how many subscontractors for this employer do don't have the option enabled to auto-email statement", - "format": "int32" + "404": { + "description": "Not Found" + } + }, + "summary": "Get AttachmentOrder", + "tags": [ + "AttachmentOrder" + ] + }, + "put": { + "operationId": "UpdateAttachmentOrder", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "codingNoticesAutomaticallyApplied": { - "type": "boolean", - "description": "[readonly] An indicator of whether or not this employer is automatically applying DpsNotices" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payrunEmails": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayrunEmail" + { + "description": "The Id of the AttachmentOrder you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrder" + } }, - "description": "Automated emails that will be sent when a PayRun is finalised", - "nullable": true - }, - "autoSubmitPensionLetters": { - "type": "boolean", - "description": "If set to true, we'll automatically submit Pension Letters whenever you finalise a PayRun.\r\nThe employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'." - }, - "autoSubmitEps": { - "type": "boolean", - "description": "If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun." + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrder" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrder" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrder" + } + } } }, - "additionalProperties": false, - "description": "Configures various automation settings for an Employer" - }, - "AverageHolidayPayRateReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AverageHolidayPayRateReportLine" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrder" + } + } }, - "nullable": true + "description": "Success" }, - "employer": { - "$ref": "#/components/schemas/Item" + "400": { + "description": "Bad Request" }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" + "404": { + "description": "Not Found" }, - "ordinal": { - "type": "integer", - "format": "int32" + "409": { + "description": "Conflict" + } + }, + "summary": "Update AttachmentOrder", + "tags": [ + "AttachmentOrder" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/attachmentorders/{id}/documents": { + "post": { + "description": "Adds document to the AttachmentOrder", + "operationId": "AddDocumentAttachmentOrder", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "period": { - "type": "integer", - "format": "int32" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "periodTo": { - "type": "integer", - "format": "int32" + { + "description": "The Id of the AttachmentOrder you want to attach documents to", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Add Document", + "tags": [ + "AttachmentOrder" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/attachmentorders/{id}/documents/{documentId}": { + "delete": { + "description": "Deletes the document specified by the documentId for the AttachmentOrder specified by the Id", + "operationId": "DeleteDocumentAttachmentOrder", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "startPeriodName": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "endPeriodName": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "startDate": { - "type": "string", - "format": "date" + { + "description": "The Id of the Document you want to delete.", + "in": "path", + "name": "documentId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + } + }, + "summary": "Delete AttachmentOrder Document", + "tags": [ + "AttachmentOrder" + ] + }, + "get": { + "description": "Gets the document specified by the documentId for the AttachmentOrder specified by the Id", + "operationId": "GetDocumentAttachmentOrder", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "endDate": { - "type": "string", - "format": "date" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "report": { - "$ref": "#/components/schemas/Report" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "description": "The Id of the Document you want to retrieve.", + "in": "path", + "name": "documentId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "description": "Success" }, - "title": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Get AttachmentOrder Document", + "tags": [ + "AttachmentOrder" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/autoenrolment": { + "get": { + "description": "Returns all AE Assessments for the Employee specified.", + "operationId": "ListAutoEnrolment", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isDraft": { - "type": "boolean" + { + "description": "The Id of the Employee for which you want to retrieve AE Assessments", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "AverageHolidayPayRateReportLine": { - "type": "object", - "properties": { - "payrollCode": { - "type": "string", - "description": "Payroll code of the employee", - "nullable": true + "summary": "Get AE Assessments", + "tags": [ + "AutoEnrolment" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/autoenrolment/assessments": { + "post": { + "description": "Asseses an Employee for AutoEnrolment", + "operationId": "AssessAutoEnrolment", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "firstName": { - "type": "string", - "description": "The First Name of the employee", - "nullable": true + { + "description": "The Id of the Employee you want to assess", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AeAssessment" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AeAssessment" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/AeAssessment" + } + } + }, + "description": "Created" }, - "lastName": { - "type": "string", - "description": "The Last Name of the employee", - "nullable": true + "400": { + "description": "Bad Request" }, - "niNumber": { - "type": "string", - "description": "The NiNumber of the employee", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Assess Employee for AutoEnrolment", + "tags": [ + "AutoEnrolment" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/autoenrolment/assessments/last": { + "get": { + "description": "Returns the most recent AeAssessment for an Employee", + "operationId": "GetLastAutoEnrolment", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "period": { - "type": "integer", - "description": "The Period of the average holiday pay rate", - "format": "int32" + { + "description": "The Id of the Employee the assessment is for", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AeAssessment" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AeAssessment" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/AeAssessment" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Last AE Assessment", + "tags": [ + "AutoEnrolment" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/autoenrolment/assessments/{id}": { + "delete": { + "description": "Deletes the AeAssessment specified by the Id for the Employee specified by the EmployeeId.", + "operationId": "DeleteAutoEnrolment", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "rate": { - "type": "number", - "description": "The Average holiday pay rate", - "format": "double" + { + "description": "The Id of the Employee the assessment is for", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employee": { - "$ref": "#/components/schemas/Item" + { + "description": "The Id of the Assessment.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "department": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Delete AE Assessment", + "tags": [ + "AutoEnrolment" + ] }, - "AverageHolidayPayRateReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + "get": { + "description": "Returns the specified AeAssessment for the specified Employee", + "operationId": "GetAutoEnrolment", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "$ref": "#/components/schemas/AverageHolidayPayRateReport" + { + "description": "The Id of the Employee the assessment is for", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "description": "The Id of the Assessment.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AeAssessment" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AeAssessment" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/AeAssessment" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "AveragePayGradesReportLine": { - "type": "object", - "properties": { - "effectiveDate": { - "type": "string", - "description": "Effective date for Pay spine grade", - "format": "date" - }, - "paySpineName": { - "type": "string", - "description": "Name of Pay Spine", - "nullable": true + "summary": "Get AE Assessment", + "tags": [ + "AutoEnrolment" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/autoenrolment/assessments/{id}/letter": { + "get": { + "description": "Returns either a PDF or HTML (depending on accept header) of the letter that needs to be sent to an employee as a result of the assessment.\r\nThe same ReportResponse model that is used for reports is used here.", + "operationId": "GetLetterAutoEnrolment", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payGradeName": { - "type": "string", - "description": "Name of Pay grade name", - "nullable": true + { + "description": "The Id of the Employee the assessment is for", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "lowerGradePoint": { - "type": "string", - "description": "Lower grade point of pay spine grade", - "nullable": true + { + "description": "The Id of the Assessment", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "upperGradePoint": { - "type": "string", - "description": "Upper grade point of pay spine grade", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Letter", + "tags": [ + "AutoEnrolment" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/autoenrolment/assessments/{id}/letter/email": { + "post": { + "description": "Send via email letter that needs to be sent to an employee as a result of the assessment.\r\nThe letter is then marked as having been sent.", + "operationId": "EmailLetterAutoEnrolment", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "upperPointAltMax": { - "type": "boolean", - "description": "To Check Alt Max of Upper point" + { + "description": "The Id of the Employee the assessment is for", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employee": { - "$ref": "#/components/schemas/Item" + { + "description": "The Id of the Assessment", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerEmail" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/EmployerEmail" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/EmployerEmail" + } + } + }, + "description": "Success" + } + }, + "summary": "Email Letter", + "tags": [ + "AutoEnrolment" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/autoenrolment/assessments/{id}/letter/sent": { + "put": { + "description": "Update an Assessment to mark the letter as sent.\r\nThis is done automatically if you send the letter via email so you'd\r\nonly need to use this is you are printing/posting the letter.", + "operationId": "MarkLetterAsSentAutoEnrolment", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payrollCode": { - "type": "string", - "nullable": true + { + "description": "The Id of the Employee the assessment is for", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "department": { - "type": "string", - "nullable": true + { + "description": "The Id of the Assessment", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "AverageWeeklyEarnings": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/AverageWeeklyEarningsResult" - }, - "resultDescription": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "averageEarnings": { - "type": "number", - "format": "double", - "readOnly": true - }, - "threshold": { - "type": "number", - "format": "double" - }, - "eligibilityThreshold": { - "type": "number", - "format": "double" - }, - "requestedDate": { - "type": "string", - "format": "date" - }, - "relevantPeriodStart": { - "type": "string", - "format": "date" - }, - "relevantPeriodEnd": { - "type": "string", - "format": "date" - }, - "relevantPeriodWeekCount": { - "type": "number", - "format": "double" - }, - "relevantPeriodEarnings": { - "type": "number", - "format": "double" + ], + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false - }, - "AverageWeeklyEarningsResult": { - "enum": [ - "Success", - "EarningsBelowThreshold", - "NotEnoughPayrollData", - "TaxYearNotSupported", - "TwoRelatedSchemes", - "NeonatalCareDateMissing" - ], - "type": "string" - }, - "BackgroundTaskStatus": { - "enum": [ - "Queued", - "Sent", - "Failed", - "Processing" - ], - "type": "string" - }, - "BankDetails": { - "type": "object", - "properties": { - "bankName": { - "maxLength": 100, - "type": "string", - "nullable": true + "summary": "Mark Letter as Sent", + "tags": [ + "AutoEnrolment" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/autoenrolment/state": { + "put": { + "description": "Updates the AutoEnrolment state for an Employee. \r\nYou would use this API call to process notices such as Opt Out, Opt In, etc.\r\nA new assessment is returned showing the result of the state change.", + "operationId": "SetStateAutoEnrolment", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "bankBranch": { - "maxLength": 100, - "type": "string", - "nullable": true + { + "description": "The Id of the Employee you want to set the status for", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "bankReference": { - "maxLength": 100, - "type": "string", - "nullable": true + { + "description": "The AutoEnrolment State to set for the Employee", + "in": "query", + "name": "state", + "schema": { + "$ref": "#/components/schemas/AeEmployeeState" + } }, - "accountName": { - "maxLength": 100, - "type": "string", - "nullable": true + { + "in": "query", + "name": "status", + "schema": { + "$ref": "#/components/schemas/AeStatus" + } }, - "accountNumber": { - "pattern": "^\\d{8}$", - "type": "string", - "nullable": true + { + "description": "Optional. Will default to the current date", + "in": "query", + "name": "stateDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "sortCode": { - "pattern": "^(\\d{6}|\\d{2}-\\d{2}-\\d{2}|\\d{2} \\d{2} \\d{2})$", - "type": "string", - "nullable": true + { + "description": "Optional. Used to override the default AE Pension. Only valid with states of Enrol, VoluntaryJoiner or OptIn", + "in": "query", + "name": "pensionId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "note": { - "maxLength": 200, - "type": "string", - "nullable": true + { + "description": "Optional. Used to override the default AE Pension Workergroup. Only valid with states of Enrol, Join or OptIn. Must be provided if a pensionId is being provided.", + "in": "query", + "name": "workerGroupId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "buildingSocietyRollNumber": { - "maxLength": 18, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\s\\/\\.-]+$", - "type": "string", - "nullable": true + { + "in": "query", + "name": "startActionAlreadyReported", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "in": "query", + "name": "endActionAlreadyReported", + "schema": { + "default": false, + "type": "boolean" + } } - }, - "additionalProperties": false - }, - "BankHolidayCollection": { - "enum": [ - "None", - "EnglandAndWales", - "Scotland", - "NorthernIreland" ], - "type": "string" - }, - "BankPaymentInstruction": { - "type": "object", - "properties": { - "originator": { - "$ref": "#/components/schemas/BankDetails" - }, - "bankPayments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayRunPayment" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AeAssessment" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AeAssessment" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/AeAssessment" + } + } }, - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/BackgroundTaskStatus" - }, - "statusMessage": { - "type": "string", - "description": "[readonly] A message to elaborate on the Status", - "nullable": true - }, - "link": { - "type": "string", - "description": "[readonly] If available, a link to the payments in an ExternalDataProvider", - "nullable": true - }, - "serviceUserNumber": { - "type": "string", - "description": "Service user number to be used while sending payment instruction", - "nullable": true + "description": "Created" }, - "bureauNumber": { - "type": "string", - "description": "Bureau number to be used if available while sending payment instruction", - "nullable": true + "400": { + "description": "Bad Request" }, - "allowsMultiDate": { - "type": "boolean", - "description": "Allows multiple payment dates in the file" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "BankPaymentInstructionReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/BankPaymentInstruction" + "summary": "Update State", + "tags": [ + "AutoEnrolment" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/benefits": { + "get": { + "description": "Lists all Benefits for the Employee", + "operationId": "IndexBenefits", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "BankPaymentInstructionsCsvFormat": { - "enum": [ - "StandardCsv", - "Telleroo", - "BarclaysBacs", - "SantanderBacs", - "Sif", - "Revolut", - "Standard18FasterPayments", - "Standard18Bacs", - "Bankline", - "BanklineBulk", - "StandardCsvBacs", - "LloydsMultipleStandardCsvBacs", - "LloydsV11CsvBacs", - "CoOpBulkCsvBacs", - "CoOpFasterPaymentsCsv", - "BankOfAmericaBacs", - "DanskeBankUkLocalPayments", - "DanskeBankUkFasterPayments", - "Standard18BacsMulti", - "BanklineBulkListDebit" ], - "type": "string" - }, - "Benefit": { - "type": "object", - "properties": { - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "type": { - "$ref": "#/components/schemas/BenefitType" - }, - "declarationType": { - "$ref": "#/components/schemas/BenefitDeclarationType" - }, - "benefitPayrolled": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BenefitPayrolled" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true - }, - "description": { - "maxLength": 120, - "type": "string", - "description": "A description of this benefit", - "nullable": true - }, - "value": { - "type": "number", - "format": "double" - }, - "employeeContribution": { - "type": "number", - "format": "double" - }, - "startDate": { - "type": "string", - "description": "The date the benefits starts if different to the start date of the TaxYear", - "format": "date", - "nullable": true - }, - "endDate": { - "type": "string", - "description": "The date the benefits ends if different to the end date of the TaxYear", - "format": "date", - "nullable": true - }, - "useProRata": { - "type": "boolean", - "description": "Benefit calculation should be done on pro rata rules" - }, - "cashEquivalent": { - "type": "number", - "description": "[readonly]", - "format": "double", - "readOnly": true - }, - "assetType": { - "$ref": "#/components/schemas/BenefitDetailsAssetType" - }, - "useOfAssetType": { - "$ref": "#/components/schemas/BenefitDetailsUseOfAssetType" - }, - "class1AType": { - "$ref": "#/components/schemas/BenefitDetailsClass1AType" - }, - "nonClass1AType": { - "$ref": "#/components/schemas/BenefitDetailsNonClass1AType" - }, - "paymentType": { - "$ref": "#/components/schemas/BenefitDetailsPaymentType" - }, - "tradingOrganisation": { - "type": "boolean", - "description": "Only relevant to Benefits with Type Entertainment" - }, - "cashEquivalentFuel": { - "type": "number", - "description": "Only relevant to Benefits with Type Vans", - "format": "double" - }, - "loan": { - "$ref": "#/components/schemas/BenefitDetailsLoan" - }, - "car": { - "$ref": "#/components/schemas/BenefitDetailsCar" - }, - "openingBalance": { - "type": "number", - "description": "The amount of benefit paid YTD when setting up a benefit", - "format": "double" - }, - "paid": { - "type": "number", - "description": "[readonly]", - "format": "double", - "readOnly": true - }, - "bikOutstanding": { - "type": "number", - "description": "[readonly]", - "format": "double", - "readOnly": true - }, - "isPeriodValue": { - "type": "boolean", - "description": "To be used for the benefit period" - }, - "overrideOpeningBalance": { - "type": "boolean", - "description": "To be used to change the opening balance if the benefit has been payrolled" - }, - "employee": { - "$ref": "#/components/schemas/Item" - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to represent Benefits and Expenses" - }, - "BenefitDeclarationType": { - "enum": [ - "P11D", - "Paye" - ], - "type": "string" - }, - "BenefitDetailsAssetType": { - "enum": [ - "Other", - "Multiple", - "Property", - "Cars", - "PreciousMetals" - ], - "type": "string" + "summary": "List Benefits", + "tags": [ + "Benefits" + ] }, - "BenefitDetailsCar": { - "type": "object", - "properties": { - "makeAndModel": { - "type": "string", - "nullable": true - }, - "registration": { - "type": "string", - "nullable": true - }, - "firstRegistered": { - "type": "string", - "format": "date", - "nullable": true - }, - "hasApprovedEmissionsValue": { - "type": "boolean" - }, - "co2Emissions": { - "type": "integer", - "format": "int32" - }, - "engineSize": { - "type": "integer", - "format": "int32" - }, - "zeroEmissionsMileage": { - "type": "integer", - "format": "int32" - }, - "fuelType": { - "$ref": "#/components/schemas/BenefitDetailsCarPowerType" - }, - "availableFrom": { - "type": "string", - "format": "date", - "nullable": true - }, - "availableTo": { - "type": "string", - "format": "date", - "nullable": true - }, - "daysUnavailable": { - "type": "integer", - "format": "int32" - }, - "listPrice": { - "type": "number", - "format": "double" - }, - "nonStandardAccessories": { - "type": "number", - "format": "double" - }, - "employeeCapitalContributions": { - "type": "number", - "format": "double" - }, - "employeePrivateContributions": { - "type": "number", - "format": "double" - }, - "freeFuel": { - "type": "boolean" + "post": { + "description": "Creates a Benefit for the Employee", + "operationId": "CreateBenefits", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "fuelAvailableFrom": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Benefit" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Benefit" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Benefit" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Benefit" + } + } + } + }, + "responses": { + "201": { + "description": "Created" }, - "fuelAvailableTo": { - "type": "string", - "format": "date", - "nullable": true + "400": { + "description": "Bad Request" }, - "freeFuelReinstated": { - "type": "boolean" + "404": { + "description": "Not Found" }, - "registeredPriorTo1998": { - "type": "boolean", - "description": "[readonly]", - "readOnly": true + "409": { + "description": "Conflict" + } + }, + "summary": "Create Benefit", + "tags": [ + "Benefits" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/benefits/{id}": { + "delete": { + "description": "Deletes the Benefit specified by the Id for the Employee specified by the EmployeeId", + "operationId": "DeleteBenefits", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "rate": { - "type": "number", - "description": "[readonly] The applicable rate based on CO2Emissions and Engine Size", - "format": "double" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "chargeableValue": { - "type": "number", - "description": "[readonly] The chargeable value of the car", - "format": "double", - "readOnly": true + { + "description": "The Id of the Benefit you want to delete.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "fullYearCharge": { - "type": "number", - "description": "[readonly] The charge for the car for a full year, not taking in to account available dates or EmployeePrivateContributions", - "format": "double", - "readOnly": true + "400": { + "description": "Bad Request" }, - "cashEquivalent": { - "type": "number", - "description": "[readonly]", - "format": "double" + "404": { + "description": "Not Found" }, - "cashEquivalentFuel": { - "type": "number", - "description": "[readonly]", - "format": "double" + "409": { + "description": "Conflict" } }, - "additionalProperties": false - }, - "BenefitDetailsCarPowerType": { - "enum": [ - "Diesel6d", - "DieselNon6d", - "Petrol", - "Hybrid", - "Electric" - ], - "type": "string" - }, - "BenefitDetailsClass1AType": { - "enum": [ - "Other", - "Multiple", - "StopLossCharges", - "NonQualifyingRelocationBenefit", - "EducationalAssitance", - "SubscriptionsAndFees" - ], - "type": "string" + "summary": "Delete Benefit", + "tags": [ + "Benefits" + ] }, - "BenefitDetailsLoan": { - "type": "object", - "properties": { - "numberOfJointBorrowers": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "loanMade": { - "type": "string", - "format": "date", - "nullable": true - }, - "loanDischarged": { - "type": "string", - "format": "date", - "nullable": true - }, - "startingBalance": { - "type": "number", - "format": "double" - }, - "closingBalance": { - "type": "number", - "format": "double" - }, - "maxBalanceInYear": { - "type": "number", - "format": "double" - }, - "interestPaid": { - "type": "number", - "format": "double" - }, - "cashEquivalent": { - "type": "number", - "description": "[readonly]", - "format": "double", - "readOnly": true - }, - "fullTaxMonths": { - "type": "integer", - "description": "[readonly]", - "format": "int32" + "get": { + "description": "Gets the Benefit specified by the Id for the Employee specified by the EmployeeId", + "operationId": "GetBenefits", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "monthlyValue": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "officialInterest": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "description": "The Id of the Benefit you want to retrieve.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "BenefitDetailsNonClass1AType": { - "enum": [ - "Other", - "Multiple", - "LoansWrittenOrWaived", - "NurseryPlaces", - "EducationalAssitance", - "SubscriptionsAndFees" - ], - "type": "string" - }, - "BenefitDetailsPaymentType": { - "enum": [ - "Other", - "SeasonTickets", - "PrivateCarExpenses", - "PrivateEducation", - "AccountancyFees", - "DomesticBills", - "Multiple" - ], - "type": "string" - }, - "BenefitDetailsUseOfAssetType": { - "enum": [ - "Other", - "Multiple", - "CorporateHospitality", - "Boat", - "Aircraft", - "TimeshareAccommodation", - "HolidayAccommodation" ], - "type": "string" - }, - "BenefitPayrolled": { - "type": "object", - "properties": { - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "amount": { - "type": "number", - "format": "double" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Benefit" + } + } + }, + "description": "Success" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "BenefitType": { - "enum": [ - "AssetsTransferred", - "PaymentsOnBehalf", - "UnborneTax", - "Vouchers", - "Accommodation", - "MileageAllowance", - "Car", - "Vans", - "Loan", - "Medical", - "QualifyingRelocationExpenses", - "Services", - "AssetsAtEmployeeDisposal", - "OtherClass1AItems", - "OtherNonClass1AItems", - "DirectorTax", - "TravellingAndSubsistence", - "Entertainment", - "HomeTelephone", - "NonQualifyingRelocationExpenses", - "OtherExpenses" - ], - "type": "string" + "summary": "Get Benefit", + "tags": [ + "Benefits" + ] }, - "BureauSettings": { - "type": "object", - "properties": { - "enableApprovals": { - "type": "boolean", - "description": "Whether or not Payruns for this employer need to go through an Approval process" - }, - "processorUserId": { - "type": "string", - "description": "The Id of the user, if any, that is the allocated Processor", - "format": "uuid", - "nullable": true - }, - "reportPackId": { - "type": "string", - "description": "The Id of the ReportPack, if any, to present to the Payroll Client", - "format": "uuid", - "nullable": true - }, - "isBacsClient": { - "type": "boolean", - "description": "Indicates that the bureau is responsible for BACS payments of net wages to employees" - }, - "isBacsClientForHmrc": { - "type": "boolean", - "description": "Indicates that the bureau is responsible for BACS payments of HMRC liabilites" + "put": { + "operationId": "UpdateBenefits", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "showContactCard": { - "type": "boolean", - "description": "Show a Contact card with the Processors details on the PayrollClient dashboard" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "description": "The Id of the Benefit you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Represents the BureauSettings for an Employer." - }, - "CISSubContractorType": { - "enum": [ - "SoleTrader", - "Partnership", - "Company", - "Trust" - ], - "type": "string" - }, - "CISTaxStatus": { - "enum": [ - "Gross", - "NetOfStandardDeduction", - "NetOfHigherDeduction" ], - "type": "string" - }, - "CalendarEntry": { - "type": "object", - "properties": { - "title": { - "type": "string", - "nullable": true - }, - "start": { - "type": "string", - "format": "date" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Benefit" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Benefit" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Benefit" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Benefit" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Benefit" + } + } + }, + "description": "Success" }, - "end": { - "type": "string", - "format": "date" + "404": { + "description": "Not Found" }, - "type": { - "$ref": "#/components/schemas/CalendarEntryType" + "409": { + "description": "Conflict" } }, - "additionalProperties": false - }, - "CalendarEntryType": { - "enum": [ - "EmployeeStarting", - "EmployeeLeaving", - "EmployeeAbsence", - "PayDay", - "EmployeeBirthday", - "EmployeeWorkAnniversary" + "summary": "Update Benefit", + "tags": [ + "Benefits" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/leave": { + "get": { + "description": "Lists all Leave for the Employee", + "operationId": "IndexLeave", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List Leave", + "tags": [ + "Leave" + ] }, - "CalendarMonth": { - "enum": [ - "None", - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" + "post": { + "description": "Creates Leave for the Employee", + "operationId": "CreateLeave", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "CarCharge": { - "type": "object", - "properties": { - "dieselSurcharge": { - "type": "number", - "format": "double" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + } + } + }, + "responses": { + "201": { + "description": "Created" }, - "maxCharge": { - "type": "number", - "format": "double" + "400": { + "description": "Bad Request" }, - "minCharge": { - "type": "number", - "format": "double" + "404": { + "description": "Not Found" }, - "fuelCharge": { - "type": "number", - "format": "double" + "409": { + "description": "Conflict" + } + }, + "summary": "Create Leave", + "tags": [ + "Leave" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/leave/findlinkedpiw": { + "get": { + "description": "Finds the linked piw the supplied leave would linked to, or null if none found", + "operationId": "FindLinkedPiwLeave", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "newCarRateReductionDate": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "newCarRateReductionAmount": { - "type": "number", - "format": "double" + { + "description": "The type of leave to you want to find a linked Piw for.", + "in": "query", + "name": "leaveType", + "schema": { + "$ref": "#/components/schemas/LeaveType" + } }, - "co2Table": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CarChargeRate" - }, - "nullable": true + { + "description": "The type of leave pay to you want to find a linked Piw for.", + "in": "query", + "name": "leavePayType", + "schema": { + "$ref": "#/components/schemas/LeavePayType" + } }, - "engineSizeTable": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CarChargeRate" - }, - "nullable": true + { + "description": "The leave from date you want to find a linked Piw for.", + "in": "query", + "name": "from", + "schema": { + "format": "date-time", + "type": "string" + } }, - "zeroEmissionsTable": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CarChargeRate" + { + "description": "The leave to date you want to find a linked Piw for.", + "in": "query", + "name": "to", + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LinkedPiw" + } + } }, - "nullable": true + "description": "Success" } }, - "additionalProperties": false, - "description": "Part of the TaxYearConfig that our engine uses to calculate charges for a Company Car.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "CarChargeRate": { - "type": "object", - "properties": { - "rangeStart": { - "type": "integer", - "format": "int32" + "summary": "Find Linked Piw", + "tags": [ + "Leave" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/leave/occupationalmaternityschedule/{id}": { + "get": { + "description": "Lists all occupational Maternity leave history specified for an Employee.", + "operationId": "GetOccupationalMaternityScheduleLeave", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "rangeStop": { - "type": "integer", - "format": "int32" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "rate": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Part of the TaxYearConfig that our engine uses to calculate charges for a Company Car.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "ChangeSummary": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "auditId": { - "type": "string", - "format": "uuid" - }, - "previousAuditId": { - "type": "string", - "description": "This Id is used to delete the previous audit entry once the change summary entry is created\r\nfor the modifications between the current and the previous audit entry.", - "format": "uuid" - }, - "date": { - "type": "string", - "format": "date" - }, - "name": { - "type": "string", - "nullable": true, - "readOnly": true + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "actionPerformed": { - "$ref": "#/components/schemas/AuditEventAction" + "400": { + "description": "Bad Request" + } + }, + "summary": "List occupational Maternity Leave History", + "tags": [ + "Leave" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/leave/statutorymaternityschedule": { + "get": { + "description": "Lists all Statutory Maternity leave history specified for an Employee.", + "operationId": "GetMaternityLeaveScheduleLeave", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "entityType": { - "$ref": "#/components/schemas/EntityType" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "entityId": { - "type": "string", - "description": "Id of the underlying entity", - "format": "uuid" + { + "in": "query", + "name": "babyDueDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "employeeUniqueId": { - "type": "string", - "description": "Unique id of the employee this operation belongs to", - "format": "uuid" + { + "in": "query", + "name": "leaveFrom", + "schema": { + "format": "date-time", + "type": "string" + } }, - "employerUniqueId": { - "type": "string", - "description": "Unique id of the employer this operation belongs to", - "format": "uuid" + { + "in": "query", + "name": "leaveTo", + "schema": { + "format": "date-time", + "type": "string" + } }, - "actionPerformedBy": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "leaveType", + "schema": { + "$ref": "#/components/schemas/LeaveType" + } }, - "actionPerformedOn": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "leavePayType", + "schema": { + "$ref": "#/components/schemas/LeavePayType" + } }, - "employeeFirstName": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "payFrequency", + "schema": { + "$ref": "#/components/schemas/StatPayFrequency" + } }, - "employeeLastName": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "averageWeeklyEarnings", + "schema": { + "default": 0, + "format": "double", + "type": "number" + } }, - "uniqueId": { - "type": "string", - "description": "Unique id of the owner this request belongs to", - "format": "uuid" + { + "in": "query", + "name": "isReversed", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "parentEventType": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" + } + }, + "summary": "List Statutory Maternity Leave History", + "tags": [ + "Leave" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/leave/{id}": { + "delete": { + "description": "Deletes the Leave specified by the Id for the Employee specified by the EmployeeId", + "operationId": "DeleteLeave", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "displayName": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payRunPeriod": { - "type": "integer", - "format": "int32" + { + "description": "The Id of the Leave you want to delete.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "changeType": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "modifications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FieldModification" - }, - "nullable": true + "409": { + "description": "Conflict" } }, - "additionalProperties": false + "summary": "Delete Leave", + "tags": [ + "Leave" + ] }, - "ChangeSummaryListReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "get": { + "description": "Gets the Leave specified by the Id for the Employee specified by the EmployeeId", + "operationId": "GetLeave", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChangeSummary" + { + "description": "The Id of the Leave you want to retrieve.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + } }, - "description": "[readonly] If the type is application.json then this will contain a JSON representation of the relevant model", - "nullable": true + "description": "Success" }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" + "summary": "Get Leave", + "tags": [ + "Leave" + ] }, - "Cis300": { - "type": "object", - "properties": { - "taxMonth": { - "type": "integer", - "format": "int32" - }, - "employeeCount": { - "type": "integer", - "format": "int32" - }, - "employmentStatusDeclaration": { - "type": "boolean" - }, - "verificationDeclaration": { - "type": "boolean" - }, - "informationCorrectDeclaration": { - "type": "boolean" - }, - "inactivityDeclaration": { - "type": "boolean" - }, - "cisReturn": { - "$ref": "#/components/schemas/CisReturn" - }, - "iRmark": { - "type": "string", - "nullable": true - }, - "xml": { - "type": "string", - "description": "This property will soon be removed and should not be used.\r\nThere is now a dedicated API endpoint for retrieving the XML for a submission.", - "nullable": true - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "employerReferences": { - "$ref": "#/components/schemas/EmpRefs" + "put": { + "operationId": "UpdateLeave", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "govTalkSubmission": { - "$ref": "#/components/schemas/GovTalkSubmission" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "description": "The Id of the Leave you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + } } }, - "additionalProperties": false - }, - "Cis300Declarations": { - "type": "object", - "properties": { - "employmentStatus": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + } + }, + "description": "Success" }, - "verification": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "informationCorrect": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" }, - "inactivity": { - "type": "string", - "nullable": true + "409": { + "description": "Conflict" } }, - "additionalProperties": false - }, - "Cis300ReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + "summary": "Update Leave", + "tags": [ + "Leave" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/leave/{id}/documents": { + "post": { + "description": "Adds document to the leave", + "operationId": "AddDocumentLeave", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "$ref": "#/components/schemas/Cis300" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "description": "The Id of the leave you want to attach documents to", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "CisContractor": { - "type": "object", - "properties": { - "utr": { - "type": "string", - "nullable": true - }, - "aOref": { - "type": "string", - "nullable": true + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to represent details of a CIS SubContractor when communicating with the HMRC Gateway" - }, - "CisDetails": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/CISSubContractorType" - }, - "utr": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "tradingName": { - "maxLength": 200, - "type": "string", - "nullable": true - }, - "companyUtr": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "companyNumber": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "vatRegistered": { - "type": "boolean" - }, - "vatNumber": { - "maxLength": 20, - "type": "string", - "nullable": true + "summary": "Add Document", + "tags": [ + "Leave" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/leave/{id}/documents/{documentId}": { + "delete": { + "description": "Deletes the document specified by the documentId for the Leave specified by the Id", + "operationId": "DeleteDocumentLeave", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "vatRate": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "reverseChargeVAT": { - "type": "boolean" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "verification": { - "$ref": "#/components/schemas/CisVerificationDetails" + { + "description": "The Id of the Document you want to delete.", + "in": "path", + "name": "documentId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "If an Employee is marked as a CIS Subcontractor then this model provides further details specifically related to the CIS details of the Employee." - }, - "CisPartnership": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true + ], + "responses": { + "204": { + "description": "No Content" }, - "utr": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false, - "description": "If an Employee is marked as a CIS Subcontractor and is registered as a Partnership then this model provides further details specifically related to the CIS Partnership." + "summary": "Delete Leave Document", + "tags": [ + "Leave" + ] }, - "CisRequest": { - "type": "object", - "properties": { - "contractor": { - "$ref": "#/components/schemas/CisContractor" + "get": { + "description": "Gets the document specified by the documentId for the Leave specified by the Id", + "operationId": "GetDocumentLeave", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "subcontractor": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CisSubContractor" - }, - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "declaration": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "CisReturn": { - "type": "object", - "properties": { - "contractor": { - "$ref": "#/components/schemas/CisContractor" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "subcontractor": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CisSubContractor" + { + "description": "The Id of the Document you want to retrieve.", + "in": "path", + "name": "documentId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "binary", + "type": "string" + } + } }, - "nullable": true - }, - "nilReturn": { - "type": "string", - "nullable": true + "description": "Success" }, - "declarations": { - "$ref": "#/components/schemas/Cis300Declarations" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "CisStatement": { - "type": "object", - "properties": { - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "taxMonth": { - "type": "integer", - "description": "[readonly]", - "format": "int32" - }, - "contractorName": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "contractorAddress": { - "$ref": "#/components/schemas/Address" + "summary": "Get Leave Document", + "tags": [ + "Leave" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/leave/{id}/role/{roleId}/assumedpensionablepay": { + "get": { + "description": "Calculates the assumed pensionable pay for a specific employee role during a leave period.\r\nFor existing leaves (when id is provided), uses the leave's existing configuration.\r\nFor new leaves (when id is empty), calculates based on the provided leave type, pay type, and period parameters.\r\nOnly supports roles associated with LGPS schemes that allow automatic APP calculation.", + "operationId": "GetRoleAssumedPensionablePayLeave", + "parameters": [ + { + "description": "The unique identifier of the employer", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "contractorOfficeNumber": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "description": "The unique identifier of the employee", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "contractorPayeReference": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "description": "The unique identifier of the leave record (empty GUID for new leaves)", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "subcontractorName": { - "$ref": "#/components/schemas/RtiEmployeeName" + { + "description": "The unique identifier of the employee role for which to calculate assumed pensionable pay", + "in": "path", + "name": "roleId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "subContractorUtr": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "description": "The pay period (required for new leaves, ignored for existing leaves)", + "in": "query", + "name": "payPeriod", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "verificationNumber": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "description": "The type of leave (required for new leaves, ignored for existing leaves)", + "in": "query", + "name": "leaveType", + "schema": { + "$ref": "#/components/schemas/LeaveType" + } }, - "grossAmountPaid": { - "type": "number", - "description": "[readonly] Gross Amount Paid (Excl VAT)", - "format": "double" + { + "description": "The leave payment type (required for new leaves, ignored for existing leaves)", + "in": "query", + "name": "leavePayType", + "schema": { + "$ref": "#/components/schemas/LeavePayType" + } }, - "costOfMaterials": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "description": "The leave start date (required for new leaves, ignored for existing leaves)", + "in": "query", + "name": "from", + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "double", + "type": "number" + } + } + }, + "description": "Success" }, - "amountLiableToDeduction": { - "type": "number", - "description": "[readonly]", - "format": "double" + "400": { + "description": "Bad Request" }, - "amountDeducted": { - "type": "number", - "description": "[readonly]", - "format": "double" + "404": { + "description": "Not Found" + } + }, + "summary": "Get Role Assumed Pensionable Pay", + "tags": [ + "Leave" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/loans": { + "get": { + "description": "Lists all AttachmentOrders for the Employee", + "operationId": "IndexLoan", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "amountPayable": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "CIS Payment and Deduction Statement (CISOL1)" + "summary": "List Loans", + "tags": [ + "Loan" + ] }, - "CisStatementListReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "post": { + "description": "Creates a Loan for the Employee", + "operationId": "CreateLoan", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CisStatement" + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Loan" + } }, - "description": "[readonly] If the type is application.json then this will contain a JSON representation of the relevant model", - "nullable": true - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "application/json": { + "schema": { + "$ref": "#/components/schemas/Loan" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Loan" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Loan" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "CisSubContractor": { - "type": "object", - "properties": { - "employeeUniqueId": { - "type": "string", - "format": "uuid" - }, - "emailStatementTo": { - "type": "string", - "nullable": true - }, - "numberOfPayments": { - "type": "integer", - "format": "int32" - }, - "item": { - "$ref": "#/components/schemas/Item" - }, - "displayName": { - "type": "string", - "nullable": true - }, - "action": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true - }, - "name": { - "$ref": "#/components/schemas/RtiEmployeeName" - }, - "tradingName": { - "type": "string", - "nullable": true - }, - "worksRef": { - "type": "string", - "nullable": true - }, - "unmatchedRate": { - "type": "string", - "nullable": true - }, - "utr": { - "type": "string", - "nullable": true - }, - "crn": { - "type": "string", - "nullable": true - }, - "nino": { - "type": "string", - "nullable": true - }, - "partnership": { - "$ref": "#/components/schemas/CisPartnership" - }, - "address": { - "$ref": "#/components/schemas/RtiEmployeeAddress" - }, - "telephone": { - "type": "string", - "nullable": true - }, - "totalPaymentsUnrounded": { - "type": "string", - "nullable": true - }, - "costOfMaterialsUnrounded": { - "type": "string", - "nullable": true - }, - "umbrellaFee": { - "type": "string", - "nullable": true - }, - "validationMsg": { - "type": "string", - "nullable": true - }, - "verificationNumber": { - "type": "string", - "nullable": true + "responses": { + "201": { + "description": "Created" }, - "totalPayments": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "costOfMaterials": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" }, - "totalDeducted": { - "type": "string", - "nullable": true + "409": { + "description": "Conflict" + } + }, + "summary": "Create Loan", + "tags": [ + "Loan" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/loans/{id}": { + "delete": { + "description": "Deletes the Loan specified by the Id for the Employee specified by the EmployeeId", + "operationId": "DeleteLoan", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "matched": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxTreatment": { - "type": "string", - "nullable": true + { + "description": "The Id of the Loan you want to delete.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "netPayment": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "vatAmount": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Delete Loan", + "tags": [ + "Loan" + ] }, - "CisSubContractorSummary": { - "type": "object", - "properties": { - "payrollCode": { - "type": "string", - "nullable": true + "get": { + "description": "Gets the Loan specified by the Id for the Employee specified by the EmployeeId", + "operationId": "GetLoan", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "tradingName": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "firstName": { - "type": "string", - "nullable": true + { + "description": "The Id of the Loan you want to retrieve.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Loan" + } + } + }, + "description": "Success" }, - "lastName": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Get Loan", + "tags": [ + "Loan" + ] + }, + "put": { + "operationId": "UpdateLoan", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "niNumber": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "type": { - "$ref": "#/components/schemas/CISSubContractorType" + { + "description": "The Id of the Loan you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Loan" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Loan" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Loan" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Loan" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Loan" + } + } + }, + "description": "Success" }, - "utr": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "taxStatus": { - "$ref": "#/components/schemas/CISTaxStatus" + "404": { + "description": "Not Found" }, - "verificationNumber": { - "type": "string", - "nullable": true + "409": { + "description": "Conflict" + } + }, + "summary": "Update Loan", + "tags": [ + "Loan" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/loans/{id}/documents": { + "post": { + "description": "Adds document to the Loan", + "operationId": "AddDocumentLoan", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "displayName": { - "type": "string", - "nullable": true, - "readOnly": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "validationMessage": { - "type": "array", - "items": { + { + "description": "The Id of the Loan you want to attach documents to", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", "type": "string" - }, - "nullable": true + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } } }, - "additionalProperties": false, - "description": "" - }, - "CisSubContractorSummaryListReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Add Document", + "tags": [ + "Loan" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/loans/{id}/documents/{documentId}": { + "delete": { + "description": "Deletes the document specified by the documentId for the Loan specified by the Id", + "operationId": "DeleteDocumentLoan", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CisSubContractorSummary" - }, - "description": "[readonly] If the type is application.json then this will contain a JSON representation of the relevant model", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "description": "The Id of the Document you want to delete.", + "in": "path", + "name": "documentId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" + "summary": "Delete Loan Document", + "tags": [ + "Loan" + ] }, - "CisVerification": { - "type": "object", - "properties": { - "employees": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - }, - "nullable": true + "get": { + "description": "Gets the document specified by the documentId for the Loan specified by the Id", + "operationId": "GetDocumentLoan", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employeeCount": { - "type": "integer", - "format": "int32" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "cisRequest": { - "$ref": "#/components/schemas/CisRequest" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "responses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CisSubContractor" + { + "description": "The Id of the Document you want to retrieve.", + "in": "path", + "name": "documentId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "binary", + "type": "string" + } + } }, - "nullable": true - }, - "iRmark": { - "type": "string", - "nullable": true - }, - "xml": { - "type": "string", - "description": "This property will soon be removed and should not be used.\r\nThere is now a dedicated API endpoint for retrieving the XML for a submission.", - "nullable": true - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "employerReferences": { - "$ref": "#/components/schemas/EmpRefs" + "description": "Success" }, - "govTalkSubmission": { - "$ref": "#/components/schemas/GovTalkSubmission" + "404": { + "description": "Not Found" + } + }, + "summary": "Get Loan Document", + "tags": [ + "Loan" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/notes": { + "get": { + "description": "Lists all Note for the Employee", + "operationId": "IndexNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "If an Employee is marked as a CIS Subcontractor then this model is included ad a child of CisDetails and is used to represent the Verification details of the Subcontractor" + "summary": "List Notes", + "tags": [ + "Note" + ] }, - "CisVerificationDetails": { - "type": "object", - "properties": { - "manuallyEntered": { - "type": "boolean" + "post": { + "description": "Creates a Note for the Employee", + "operationId": "CreateNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "matchInsteadOfVerify": { - "type": "boolean" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Note" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Note" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Note" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Note" + } + } + } + }, + "responses": { + "201": { + "description": "Created" }, - "number": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "date": { - "type": "string", - "format": "date", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Create Note", + "tags": [ + "Note" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/notes/{id}": { + "delete": { + "description": "Deletes the Note specified by the Id for the Employee specified by the EmployeeId", + "operationId": "DeleteNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxStatus": { - "$ref": "#/components/schemas/CISTaxStatus" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "verificationRequest": { - "type": "string", - "description": "[readonly] If a Verification request has been made for this employee then this will show its ID", - "format": "uuid", - "nullable": true + { + "description": "The Id of the Note you want to delete.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "verificationResponse": { - "$ref": "#/components/schemas/CisSubContractor" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete Note", + "tags": [ + "Note" + ] }, - "Contract.Address": { - "type": "object", - "properties": { - "line1": { - "type": "string", - "nullable": true - }, - "line2": { - "type": "string", - "nullable": true - }, - "line3": { - "type": "string", - "nullable": true - }, - "line4": { - "type": "string", - "nullable": true - }, - "line5": { - "type": "string", - "nullable": true + "get": { + "description": "Gets the Note specified by the Id for the Employee specified by the EmployeeId", + "operationId": "GetNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "postCode": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "country": { - "$ref": "#/components/schemas/Country" + { + "description": "The Id of the Note you want to retrieve.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Note" + } + } + }, + "description": "Success" }, - "foreignCountry": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Get Note", + "tags": [ + "Note" + ] }, - "Contract.AeAssessmentAction": { - "type": "object", - "properties": { - "action": { - "$ref": "#/components/schemas/AeAction" - }, - "employeeState": { - "$ref": "#/components/schemas/AeEmployeeState" - }, - "actionCompleted": { - "type": "boolean", - "description": "Indicates whether or not the required action was successfully completed" + "put": { + "operationId": "UpdateNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "actionCompletedMessage": { - "type": "string", - "description": "Gives further information about the action taken or the reason if wasn't successfully completed", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "requiredLetter": { - "$ref": "#/components/schemas/AeStatutoryLetter" + { + "description": "The Id of the Note you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Note" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Note" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Note" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Note" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Note" + } + } + }, + "description": "Success" }, - "pensionSchemeId": { - "type": "string", - "description": "The PensionSchemeId that a completed action relates to", - "format": "uuid" + "404": { + "description": "Not Found" + } + }, + "summary": "Update Note", + "tags": [ + "Note" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/notes/{id}/documents": { + "post": { + "description": "Adds document to the Note", + "operationId": "AddDocumentNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "workerGroupId": { - "type": "string", - "description": "The WorkerGroupId that a completed action relates to", - "format": "uuid" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "letterNotYetSent": { - "type": "boolean", - "description": "Indicates whether or not any required letter has been sent" + { + "description": "The Id of the Note you want to attach documents to", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } } }, - "additionalProperties": false - }, - "Contract.AeAssessmentRequest": { - "type": "object", - "properties": { - "assessmentDate": { - "type": "string", - "format": "date" + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false, - "description": "As part of AutoEnrolment we assess your Employees to see if they need to be auto-enroled in a Pension.\r\nThis model shows the result of an assessment." - }, - "Contract.AeAssessmentResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique id of the object", - "format": "uuid" - }, - "employeeState": { - "$ref": "#/components/schemas/AeEmployeeState" - }, - "age": { - "type": "integer", - "description": "The age of the Employee at the time of the assessment", - "format": "int32" - }, - "ukWorker": { - "$ref": "#/components/schemas/AeUKWorker" + "summary": "Add Document", + "tags": [ + "Note" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/notes/{id}/documents/{documentId}": { + "delete": { + "description": "Deletes the document specified by the documentId for the Note specified by the Id", + "operationId": "DeleteDocumentNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "ordinal": { - "type": "integer", - "description": "The PaySchedule ordinal for the Employee at the time of the assessment", - "format": "int32" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "earningsInPeriod": { - "type": "number", - "format": "double" + { + "description": "The Id of the Document you want to delete.", + "in": "path", + "name": "documentId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "qualifyingEarningsInPeriod": { - "type": "number", - "format": "double" + "400": { + "description": "Bad Request" + } + }, + "summary": "Delete Note Document", + "tags": [ + "Note" + ] + }, + "get": { + "description": "Gets the document specified by the documentId for the Note specified by the Id", + "operationId": "GetDocumentNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "aeExclusionCode": { - "$ref": "#/components/schemas/AeExclusionCode" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "status": { - "$ref": "#/components/schemas/AeStatus" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "reason": { - "type": "string", - "description": "The reason for determining the Status given.", - "nullable": true + { + "description": "The Id of the Document you want to retrieve.", + "in": "path", + "name": "documentId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "description": "Success" }, - "action": { - "$ref": "#/components/schemas/Contract.AeAssessmentAction" + "404": { + "description": "Not Found" + } + }, + "summary": "Get Note Document", + "tags": [ + "Note" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/openingBalances": { + "get": { + "description": "Returns the Opening Balances for an Employee", + "operationId": "GetOpeningBalances", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employee": { - "$ref": "#/components/schemas/Contract.EmployeeItem" + { + "description": "The Id of the Employee for which you want to retrieve Opening Balances", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + } + }, + "description": "Success" }, - "assessmentDate": { - "type": "string", - "format": "date" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Get Opening Balances", + "tags": [ + "OpeningBalances" + ] }, - "Contract.AllowanceGradesRequest": { - "type": "object", - "properties": { - "allowanceGradePayslipText": { - "type": "string", - "description": "Alternative text for display on the payslip (i.e. TLR1A)", - "nullable": true + "put": { + "description": "Updates the Opening Balances for an Employee.", + "operationId": "UpdateOpeningBalances", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "allowanceGradeAnnualValue": { - "type": "number", - "description": "FTE value of allowance grade", - "format": "double" + { + "description": "The Id of the Employee for which you want to update Opening Balances", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + } + }, + "description": "Success" }, - "allowanceGradeEffectiveDate": { - "type": "string", - "description": "Effective date of the value", - "format": "date" + "400": { + "description": "Bad Request" }, - "allowanceName": { - "type": "string", - "description": "Spine Allowance Name", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.AllowanceGradesResponse": { - "type": "object", - "properties": { - "allowanceGradePayslipText": { - "type": "string", - "description": "Alternative text for display on the payslip (i.e. TLR1A)", - "nullable": true + "summary": "Update Opening Balances", + "tags": [ + "OpeningBalances" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/openingBalances/nic/{taxYear}": { + "get": { + "description": "Returns the NicSummaries for an Employee for a given TaxYear.\r\nIf the TaxYear is the same as on their OpeningBalances then the NicSummaries will be the same as shown there.", + "operationId": "GetNicSummariesOpeningBalances", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "allowanceGradeAnnualValue": { - "type": "number", - "description": "FTE value of allowance grade", - "format": "double" + { + "description": "The Id of the Employee for which you want to retrieve Opening Balances", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "allowanceGradeEffectiveDate": { - "type": "string", - "description": "Effective date of the value", - "format": "date" + { + "description": "The TaxYear the NicSummaries apply to", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "uniqueId": { - "type": "string", - "description": "Spine Allowance identifier", - "format": "uuid" + { + "description": "Limit the results to opening balance year to date", + "in": "query", + "name": "openingBalancesOnly", + "schema": { + "default": true, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NicSummary" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NicSummary" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/NicSummary" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "allowanceName": { - "type": "string", - "description": "Spine Allowance Name", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Get NicSummaries", + "tags": [ + "OpeningBalances" + ] }, - "Contract.AllowanceGradesUpdateRequest": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Allowance Grades identifier", - "format": "uuid" - }, - "allowanceGradePayslipText": { - "type": "string", - "description": "Alternative text for display on the payslip (i.e. TLR1A)", - "nullable": true - }, - "allowanceGradeAnnualValue": { - "type": "number", - "description": "FTE value of allowance grade", - "format": "double" + "post": { + "description": "Creates a NicSummary for for an Employee.", + "operationId": "CreateNicSummaryOpeningBalances", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "allowanceGradeEffectiveDate": { - "type": "string", - "description": "Effective date of the value", - "format": "date" + { + "description": "The Id of the Employee for which you want to create the Nic Summary", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "allowanceName": { - "type": "string", - "description": "Spine Allowance Name", - "nullable": true + { + "description": "The TaxYear the NicSummary applies to", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + } } }, - "additionalProperties": false - }, - "Contract.AnalysisCategoryCodeRequest": { - "type": "object", - "properties": { - "code": { - "type": "string", - "nullable": true - }, - "title": { - "type": "string", - "nullable": true - }, - "color": { - "type": "string", - "nullable": true + "responses": { + "201": { + "description": "Created" }, - "accountingCode": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Create NicSummary", + "tags": [ + "OpeningBalances" + ] }, - "Contract.AnalysisCategoryCodeResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Analysis Category Code identifier", - "format": "uuid" - }, - "code": { - "type": "string", - "nullable": true - }, - "title": { - "type": "string", - "nullable": true + "put": { + "description": "Updates the NicSummaries for an Employee for a given TaxYear.\r\nIf the TaxYear is the same as on their OpeningBalances then the NicSummaries there will also be updated.", + "operationId": "UpdateNicSummariesOpeningBalances", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "color": { - "type": "string", - "nullable": true + { + "description": "The Id of the Employee for which you want to retrieve Opening Balances", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accountingCode": { - "type": "string", - "nullable": true + { + "description": "The TaxYear the NicSummaries apply to", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } } - }, - "additionalProperties": false - }, - "Contract.AnalysisCategoryRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Analysis Category Name", - "nullable": true + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NicSummary" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NicSummary" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NicSummary" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NicSummary" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "Contract.AnalysisCategoryResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Analysis Category identifier", - "format": "uuid" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NicSummary" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NicSummary" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/NicSummary" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "name": { - "type": "string", - "description": "Analysis Category Name", - "nullable": true + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.AutoEnrolmentRequest": { - "type": "object", - "properties": { - "lastAssessment": { - "$ref": "#/components/schemas/Contract.AeAssessmentRequest" - }, - "ukWorker": { - "$ref": "#/components/schemas/AeUKWorker" + "summary": "Update NicSummaries", + "tags": [ + "OpeningBalances" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/openingBalances/nic/{taxYear}/{uniqueId}": { + "delete": { + "description": "Delete a NicSummary for a Unique Id for an Employee.", + "operationId": "DeleteNicSummaryOpeningBalances", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "daysToDeferAssessment": { - "type": "integer", - "description": "The number of days, if any, to defer assessment of this employee.\r\nYou're allowed to defer assessment of new employees by up to 3 months.", - "format": "int32" + { + "description": "The Id of the Employee for which you want to delete the Nic Summary", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "deferByMonthsNotDays": { - "type": "boolean", - "description": "If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days" + { + "description": "The TaxYear the NicSummary applies to", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "exempt": { - "type": "boolean" + { + "description": "The Id of the NicSummary", + "in": "path", + "name": "uniqueId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "aeExclusionCode": { - "$ref": "#/components/schemas/AeExclusionCode" + "400": { + "description": "Bad Request" }, - "aePostponementLetterSent": { - "type": "boolean" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Delete NicSummary", + "tags": [ + "OpeningBalances" + ] }, - "Contract.AutoEnrolmentResponse": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/AeEmployeeState" + "get": { + "description": "Returns a NicSummary for a Unique Id for an Employee.", + "operationId": "GetNicSummaryOpeningBalances", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stateDate": { - "type": "string", - "format": "date", - "nullable": true + { + "description": "The Id of the Employee for which you want to retrieve the Nic Summary", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "postponementDate": { - "type": "string", - "description": "[readonly] If a value is present, then employee wont be enrolled on an AE Pension until after this date.\r\nThis is automatically set to a date if the employee is deemed to be an EligibleJobHolder, but the employer has set a Postponement period and this value is currently null\r\nThis is automatically set to null if it already has a value and the employee is deemed NOT to be an EligibleJobHolder - ie, they previously qualified but now do not.", - "format": "date", - "nullable": true + { + "description": "The TaxYear the NicSummary applies to", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "lastAssessment": { - "$ref": "#/components/schemas/Contract.AeAssessmentResponse" + { + "description": "The Id of the NicSummary", + "in": "path", + "name": "uniqueId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + } + }, + "description": "Success" }, - "ukWorker": { - "$ref": "#/components/schemas/AeUKWorker" + "404": { + "description": "Not Found" + } + }, + "summary": "Get NicSummary", + "tags": [ + "OpeningBalances" + ] + }, + "put": { + "description": "Update a NicSummary for a Unique Id for an Employee.", + "operationId": "UpdateNicSummaryOpeningBalances", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "daysToDeferAssessment": { - "type": "integer", - "description": "The number of days, if any, to defer assessment of this employee.\r\nYou're allowed to defer assessment of new employees by up to 3 months.", - "format": "int32" + { + "description": "The Id of the Employee for which you want to update the Nic Summary", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "deferByMonthsNotDays": { - "type": "boolean", - "description": "If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days" + { + "description": "The TaxYear the NicSummary applies to", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "exempt": { - "type": "boolean" + { + "description": "The Id of the NicSummary", + "in": "path", + "name": "uniqueId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/NicSummary" + } + } + }, + "description": "Success" }, - "aeExclusionCode": { - "$ref": "#/components/schemas/AeExclusionCode" + "404": { + "description": "Not Found" + } + }, + "summary": "Update NicSummary", + "tags": [ + "OpeningBalances" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/openingBalances/p45": { + "put": { + "description": "Updates the P45 Values on the Opening Balances for an Employee.\r\nThis would ideally be done when the Opening Balances are updated but if payruns have already been started for the employee then Opening Balances can't be updated - hence this API call just to update the P45 values.\r\nThere must be a currently open PayRun for the employee.\r\nOnly the PreviousEmployerGross and PreviousEmployerTax properties of the submitted OpeningBalances model are updated.", + "operationId": "UpdateP45OpeningBalances", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "aePostponementLetterSent": { - "type": "boolean" + { + "description": "The Id of the Employee for which you want to update P45 figures", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + } } }, - "additionalProperties": false - }, - "Contract.AutoEnrolmentSettingsRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid" - }, - "stagingDate": { - "type": "string", - "format": "date" - }, - "cyclicalReenrolmentDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "previousCyclicalReenrolmentDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "defaultPension": { - "$ref": "#/components/schemas/Contract.PensionSelectionRequest" - }, - "pensionSameAsDefault": { - "type": "boolean" - }, - "daysToDeferAssessment": { - "type": "integer", - "description": "The number of days, if any, to defer assessment of new employees.\r\nYou're allowed to defer assessment of new employees by up to 3 months.\r\nThis is the default value used when you create a new employee. It can be changed on a per-employee basis.", - "format": "int32" - }, - "deferByMonthsNotDays": { - "type": "boolean", - "description": "If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days" - }, - "deferEnrolmentBy": { - "type": "integer", - "description": "The number of days )or weeks, or months), if any, to defer enrolment of employees that are Eligible Jobholders.\r\nFor example, if this is set to 30 days then if an employee meets the criteria for enrolment then they'll only be enrolled if they still meet the criteria 30 days later", - "format": "int32" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + } + }, + "description": "Success" }, - "deferEnrolmentByPeriodType": { - "$ref": "#/components/schemas/DeferalPeriodType" + "400": { + "description": "Bad Request" }, - "includeNonPensionedEmployeesInSubmission": { - "type": "boolean", - "description": "Whether or not to include details of non-pensioned employees in your submissions to this provider" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.AutoEnrolmentSettingsResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "stagingDate": { - "type": "string", - "format": "date" - }, - "cyclicalReenrolmentDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "previousCyclicalReenrolmentDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "defaultPension": { - "$ref": "#/components/schemas/Contract.PensionSelectionResponse" - }, - "pensionSameAsDefault": { - "type": "boolean" - }, - "daysToDeferAssessment": { - "type": "integer", - "description": "The number of days, if any, to defer assessment of new employees.\r\nYou're allowed to defer assessment of new employees by up to 3 months.\r\nThis is the default value used when you create a new employee. It can be changed on a per-employee basis.", - "format": "int32" - }, - "deferByMonthsNotDays": { - "type": "boolean", - "description": "If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days" - }, - "deferEnrolmentBy": { - "type": "integer", - "description": "The number of days )or weeks, or months), if any, to defer enrolment of employees that are Eligible Jobholders.\r\nFor example, if this is set to 30 days then if an employee meets the criteria for enrolment then they'll only be enrolled if they still meet the criteria 30 days later", - "format": "int32" - }, - "deferEnrolmentByPeriodType": { - "$ref": "#/components/schemas/DeferalPeriodType" + "summary": "Update P45 Value", + "tags": [ + "OpeningBalances" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/openingBalances/terminationpayments": { + "put": { + "description": "Updates the Termination Pay value on the Opening Balances for an Employee.\r\nThis would ideally be done when the Opening Balances are updated but if payruns have already been started for the employee then Opening Balances can't be updated - hence this API call just to update the Termination Pay value.\r\nOnly the TerminationPayments property of the submitted OpeningBalances model is updated.", + "operationId": "UpdateTerminationPaymentsOpeningBalances", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "includeNonPensionedEmployeesInSubmission": { - "type": "boolean", - "description": "Whether or not to include details of non-pensioned employees in your submissions to this provider" + { + "description": "The Id of the Employee for which you want to update Termination Payments", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + } } }, - "additionalProperties": false - }, - "Contract.BankDetails": { - "type": "object", - "properties": { - "bankName": { - "type": "string", - "nullable": true - }, - "bankBranch": { - "type": "string", - "nullable": true - }, - "bankReference": { - "type": "string", - "nullable": true - }, - "accountName": { - "type": "string", - "nullable": true - }, - "accountNumber": { - "type": "string", - "nullable": true - }, - "sortCode": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/OpeningBalances" + } + } + }, + "description": "Success" }, - "note": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "buildingSocietyRollNumber": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.CisDetailsRequest": { - "type": "object", - "properties": { - "verification": { - "$ref": "#/components/schemas/Contract.CisVerificationDetailsRequest" - }, - "type": { - "$ref": "#/components/schemas/CISSubContractorType" - }, - "utr": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "tradingName": { - "maxLength": 200, - "type": "string", - "nullable": true - }, - "companyUtr": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "companyNumber": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "vatRegistered": { - "type": "boolean" + "summary": "Update Termination Pay", + "tags": [ + "OpeningBalances" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/p11history": { + "get": { + "operationId": "ListPagedP11History", + "parameters": [ + { + "description": "", + "in": "query", + "name": "pageNum", + "schema": { + "format": "int32", + "type": "integer" + } }, - "vatNumber": { - "maxLength": 20, - "type": "string", - "nullable": true + { + "description": "", + "in": "query", + "name": "pageSize", + "schema": { + "format": "int32", + "type": "integer" + } }, - "vatRate": { - "type": "number", - "format": "double" + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "reverseChargeVAT": { - "type": "boolean" + { + "description": "The Id of the Employee", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.P11HistoryResponse" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Retrieve P11 Historical data", + "tags": [ + "P11History" + ] }, - "Contract.CisDetailsResponse": { - "type": "object", - "properties": { - "verification": { - "$ref": "#/components/schemas/Contract.CisVerificationDetailsResponse" - }, - "type": { - "$ref": "#/components/schemas/CISSubContractorType" - }, - "utr": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "tradingName": { - "maxLength": 200, - "type": "string", - "nullable": true - }, - "companyUtr": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "companyNumber": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "vatRegistered": { - "type": "boolean" - }, - "vatNumber": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "vatRate": { - "type": "number", - "format": "double" + "post": { + "operationId": "CreateP11History", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "reverseChargeVAT": { - "type": "boolean" + { + "description": "The Id of the Employee", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.P11HistoryRequest" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.P11HistoryRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.P11HistoryRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.P11HistoryRequest" + }, + "type": "array" + } + } + }, + "description": "" }, - "additionalProperties": false - }, - "Contract.CisPartnership": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true + "responses": { + "200": { + "description": "Success" }, - "utr": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false, - "description": "If an Employee is marked as a CIS Subcontractor and is registered as a Partnership then this model provides further details specifically related to the CIS Partnership." - }, - "Contract.CisSubContractor": { - "type": "object", - "properties": { - "employeeUniqueId": { - "type": "string", - "format": "uuid" - }, - "emailStatementTo": { - "type": "string", - "nullable": true - }, - "numberOfPayments": { - "type": "integer", - "format": "int32" - }, - "item": { - "$ref": "#/components/schemas/Contract.CisSubContractorItem" - }, - "displayName": { - "type": "string", - "nullable": true - }, - "action": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true - }, - "name": { - "$ref": "#/components/schemas/Contract.RtiEmployeeName" - }, - "tradingName": { - "type": "string", - "nullable": true - }, - "worksRef": { - "type": "string", - "nullable": true - }, - "unmatchedRate": { - "type": "string", - "nullable": true - }, - "utr": { - "type": "string", - "nullable": true - }, - "crn": { - "type": "string", - "nullable": true - }, - "nino": { - "type": "string", - "nullable": true - }, - "partnership": { - "$ref": "#/components/schemas/Contract.CisPartnership" - }, - "address": { - "$ref": "#/components/schemas/Contract.RtiEmployeeAddress" - }, - "telephone": { - "type": "string", - "nullable": true - }, - "totalPaymentsUnrounded": { - "type": "string", - "nullable": true - }, - "costOfMaterialsUnrounded": { - "type": "string", - "nullable": true - }, - "umbrellaFee": { - "type": "string", - "nullable": true - }, - "validationMsg": { - "type": "string", - "nullable": true - }, - "verificationNumber": { - "type": "string", - "nullable": true - }, - "totalPayments": { - "type": "string", - "nullable": true - }, - "costOfMaterials": { - "type": "string", - "nullable": true - }, - "totalDeducted": { - "type": "string", - "nullable": true - }, - "matched": { - "type": "string", - "nullable": true + "summary": "Create P11 Historical data", + "tags": [ + "P11History" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/p11history/{id}": { + "delete": { + "operationId": "DeleteP11History", + "parameters": [ + { + "description": "", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxTreatment": { - "type": "string", - "nullable": true + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "netPayment": { - "type": "string", - "nullable": true + { + "description": "The Id of the Employee", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.CisSubContractorItem": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "metadata": { - "nullable": true - }, - "url": { - "type": "string", - "nullable": true + ], + "responses": { + "204": { + "description": "No Content" } }, - "additionalProperties": false + "summary": "Delete P11 Historical data", + "tags": [ + "P11History" + ] }, - "Contract.CisVerificationDetailsRequest": { - "type": "object", - "properties": { - "manuallyEntered": { - "type": "boolean" + "put": { + "operationId": "UpdateP11History", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "matchInsteadOfVerify": { - "type": "boolean" + { + "description": "The Id of the Employee", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "number": { - "type": "string", - "nullable": true + { + "description": "The unique id of the record", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.P11HistoryRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.P11HistoryRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.P11HistoryRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.P11HistoryRequest" + } + } }, - "date": { - "type": "string", - "format": "date", - "nullable": true + "description": "" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.P11HistoryResponse" + } + } + }, + "description": "Success" }, - "taxStatus": { - "$ref": "#/components/schemas/CISTaxStatus" + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.P11HistoryResponse" + } + } + }, + "description": "Bad Request" }, - "verificationResponse": { - "$ref": "#/components/schemas/Contract.CisSubContractor" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.CisVerificationDetailsResponse": { - "type": "object", - "properties": { - "verificationRequest": { - "type": "string", - "description": "If a Verification request has been made for this employee then this will show its ID", - "format": "uuid", - "nullable": true - }, - "manuallyEntered": { - "type": "boolean" - }, - "matchInsteadOfVerify": { - "type": "boolean" - }, - "number": { - "type": "string", - "nullable": true - }, - "date": { - "type": "string", - "format": "date", - "nullable": true - }, - "taxStatus": { - "$ref": "#/components/schemas/CISTaxStatus" + "summary": "Update P11 Historical entry", + "tags": [ + "P11History" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/pension": { + "delete": { + "description": "This endpoint is now deprecated. You should use the alternative end points that require an ID to be specified.\r\nUntil it is removed, this endpoint will work only for employees with a single pension\r\n\r\nRemoves the Pension for an Employee.\r\nFor AE Pensions this will remove the employee from the pension and delete any associated AeAssessments", + "operationId": "Remove_DeprecatedPension", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "verificationResponse": { - "$ref": "#/components/schemas/Contract.CisSubContractor" + { + "description": "The Id of the Employee for which you want to remove the Pension", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.CostCentreJournalOverridesRequest": { - "type": "object", - "properties": { - "tokenDescription": { - "type": "string", - "description": "Token Description", - "nullable": true + ], + "responses": { + "204": { + "description": "No Content" }, - "mapping": { - "type": "string", - "description": "CostCentre Journal Overrides Mapping", - "nullable": true + "400": { + "description": "Bad Request" }, - "journalTokenPublicId": { - "type": "string", - "description": "Journal Token Public Id", - "format": "uuid" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Remove Pension (deprecated)", + "tags": [ + "Pension" + ] }, - "Contract.CostCentreJournalOverridesResponse": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Cost Centre Journal Overrides identifier", - "format": "uuid" - }, - "tokenDescription": { - "type": "string", - "description": "Token Description", - "nullable": true - }, - "mapping": { - "type": "string", - "description": "CostCentre Journal Overrides Mapping", - "nullable": true + "get": { + "description": "This endpoint is now deprecated. You should use the alternative end points that require an ID to be specified.\r\nUntil it is removed, this endpoint will work only for employees with a single pension\r\n\r\nReturns the Pension, if any, for an Employee", + "operationId": "Get_DeprecatedPension", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "journalTokenPublicId": { - "type": "string", - "description": "Journal Token Public Id", - "format": "uuid" + { + "description": "The Id of the Employee for which you want to retrieve the Pension", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get Pension (deprecated)", + "tags": [ + "Pension" + ] }, - "Contract.CostCentreJournalOverridesResponseItem": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "metadata": { - "nullable": true + "post": { + "description": "Creates a Pension for an Employee.", + "operationId": "CreatePension", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "url": { - "type": "string", - "nullable": true + { + "description": "The Id of the Employee for which you want to create a Pension", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + } } }, - "additionalProperties": false - }, - "Contract.CostCentreJournalOverridesUpdateRequest": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Unique Id", - "format": "uuid" - }, - "tokenDescription": { - "type": "string", - "description": "Token Description", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + } + }, + "description": "Success" }, - "mapping": { - "type": "string", - "description": "CostCentre Journal Overrides Mapping", - "nullable": true + "400": { + "description": "Bad Request" }, - "journalTokenPublicId": { - "type": "string", - "description": "Journal Token Public Id", - "format": "uuid" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Create Pension", + "tags": [ + "Pension" + ] }, - "Contract.CreateEmployeeRequest": { - "type": "object", - "properties": { - "personalDetails": { - "$ref": "#/components/schemas/Contract.PersonalDetailsRequest" - }, - "employmentDetails": { - "$ref": "#/components/schemas/Contract.EmploymentDetailsRequest" - }, - "autoEnrolment": { - "$ref": "#/components/schemas/Contract.AutoEnrolmentRequest" - }, - "leaveSettings": { - "$ref": "#/components/schemas/Contract.EmployeeLeaveSettingsRequest" - }, - "rightToWork": { - "$ref": "#/components/schemas/Contract.RightToWork" - }, - "bankDetails": { - "$ref": "#/components/schemas/Contract.BankDetails" - }, - "payOptions": { - "$ref": "#/components/schemas/Contract.PayOptionsRequest" + "put": { + "description": "This endpoint is now deprecated. You should use the alternative end points that require an ID to be specified.\r\nUntil it is removed, this endpoint will work only for employees with a single pension\r\n\r\nUpdates the Pension for an Employee.", + "operationId": "Update_DeprecatedPension", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "tags": { - "type": "array", - "items": { + { + "description": "The Id of the Employee for which you want to update the Pension", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } }, - "nullable": true - }, - "holidaySchemeUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "aggregatedServiceDate": { - "type": "string", - "format": "date", - "nullable": true + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + } + }, + "description": "Success" }, - "evcId": { - "type": "string", - "description": "If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId.", - "format": "uuid", - "nullable": true + "400": { + "description": "Bad Request" }, - "sourceSystemId": { - "maxLength": 50, - "type": "string", - "description": "Used by external systems so they can store an immutable reference.\r\nOnce this property is set it cannot be changed.", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.CustomReportRequest": { - "type": "object", - "properties": { - "payRunUniqueIds": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" + "summary": "Update Pension (deprecated)", + "tags": [ + "Pension" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/pension/list": { + "get": { + "description": "Returns a list of Item representing any Pensions for the given employee", + "operationId": "ListPension", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "The Id of the Employee for which you want to list Pensions", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true - }, - "reportFormat": { - "$ref": "#/components/schemas/ReportFormat" + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.DepartmentJournalOverridesRequest": { - "type": "object", - "properties": { - "tokenDescription": { - "type": "string", - "description": "Token Description", - "nullable": true + "summary": "List Pensions", + "tags": [ + "Pension" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/pension/{id}": { + "delete": { + "description": "Removes a Pension for an Employee.", + "operationId": "RemovePension", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "mapping": { - "type": "string", - "description": "Department Journal Overrides Mapping", - "nullable": true + { + "description": "The Id of the Employee for which you want to remove the Pension", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "journalTokenPublicId": { - "type": "string", - "description": "Journal Token Public Id", - "format": "uuid" + { + "description": "The Id of the Pension", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.DepartmentJournalOverridesResponse": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Department Journal Overrides identifier", - "format": "uuid" - }, - "tokenDescription": { - "type": "string", - "description": "Token Description", - "nullable": true + ], + "responses": { + "204": { + "description": "No Content" }, - "mapping": { - "type": "string", - "description": "Department Journal Overrides Mapping", - "nullable": true + "400": { + "description": "Bad Request" }, - "journalTokenPublicId": { - "type": "string", - "description": "Journal Token Public Id", - "format": "uuid" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Remove Pension", + "tags": [ + "Pension" + ] }, - "Contract.DepartmentJournalOverridesResponseItem": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true + "get": { + "description": "Returns a Pension for an Employee", + "operationId": "GetPension", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "metadata": { - "nullable": true + { + "description": "The Id of the Employee for which you want to retrieve the Pension", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "url": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pension", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get Pension", + "tags": [ + "Pension" + ] }, - "Contract.DepartmentJournalOverridesUpdateRequest": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Unique Id", - "format": "uuid" - }, - "tokenDescription": { - "type": "string", - "description": "Token Description", - "nullable": true + "put": { + "description": "Updates the Pension for an Employee.", + "operationId": "UpdatePension", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "mapping": { - "type": "string", - "description": "Department Journal Overrides Mapping", - "nullable": true + { + "description": "The Id of the Employee for which you want to update the Pension", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "journalTokenPublicId": { - "type": "string", - "description": "Journal Token Public Id", - "format": "uuid" + { + "description": "The Id of the Pension", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.DepartmentRequest": { - "required": [ - "code", - "title" ], - "type": "object", - "properties": { - "code": { - "maxLength": 20, - "minLength": 1, - "type": "string", - "description": "The unique code for this Department" - }, - "title": { - "maxLength": 50, - "minLength": 1, - "type": "string", - "description": "The name of this Department" - }, - "color": { - "maxLength": 6, - "type": "string", - "description": "A color to used to represent this Department, in hex format. ie 'ff0000'", - "nullable": true - }, - "accountingCode": { - "maxLength": 50, - "type": "string", - "nullable": true + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + } } }, - "additionalProperties": false - }, - "Contract.DepartmentResponse": { - "required": [ - "code", - "title" - ], - "type": "object", - "properties": { - "employeeCount": { - "type": "integer", - "description": "The number of employees with this set as their primary department", - "format": "int32" - }, - "code": { - "maxLength": 20, - "minLength": 1, - "type": "string", - "description": "The unique code for this Department" - }, - "title": { - "maxLength": 50, - "minLength": 1, - "type": "string", - "description": "The name of this Department" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Pension" + } + } + }, + "description": "Success" }, - "color": { - "maxLength": 6, - "type": "string", - "description": "A color to used to represent this Department, in hex format. ie 'ff0000'", - "nullable": true + "400": { + "description": "Bad Request" }, - "accountingCode": { - "maxLength": 50, - "type": "string", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.DirectorshipDetails": { - "type": "object", - "properties": { - "isDirector": { - "type": "boolean" + "summary": "Update Pension", + "tags": [ + "Pension" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/pension/{pensionUniqueId}/{taxYear}/pensionytd": { + "get": { + "description": "This endpoint is now deprecated. You should use the alternative GET end point from PayRun\r\n \r\nGets a last PayRunEntry for a Pension.", + "operationId": "LastPayRunEntryWithPensionYtdValuesForEmployeePension", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "startDate": { - "type": "string", - "format": "date", - "nullable": true + { + "description": "The Id of the Employee you want to get pay run entry for", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "leaveDate": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "path", + "name": "pensionUniqueId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "niAlternativeMethod": { - "type": "boolean" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunEntry" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PayRunEntry" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/PayRunEntry" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.EmployeeItem": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "metadata": { - "nullable": true + "summary": "Get last PayRunEntry for a Pension (deprecated)", + "tags": [ + "Pension" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/pensionrefund": { + "get": { + "description": "Lists all Pension Refunds for the Employee", + "operationId": "IndexPensionRefund", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "url": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "List Pension Refunds", + "tags": [ + "PensionRefund" + ] }, - "Contract.EmployeeLeaveSettingsRequest": { - "type": "object", - "properties": { - "useDefaultHolidayType": { - "type": "boolean", - "description": "If true then the value for HolidayType comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAllowanceResetDate": { - "type": "boolean", - "description": "If true then the value for the AllowanceResetDate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAllowance": { - "type": "boolean", - "description": "If true then the value for the Allowance comes from the Employer record.\r\nThis property only appears if the LeaveSettings if a child of an Employee (not of an Employer)" - }, - "useDefaultAccruePaymentInLieu": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAccruePaymentInLieuRate": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieuRate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAccruePaymentInLieuAllGrossPay": { - "type": "boolean", - "description": "[Deprecated] Please use UseUseDefaultHolidayAccrualBasis instead.\r\nThis filed will be removed in a later release.", - "deprecated": true - }, - "useDefaultHolidayAccrualBasis": { - "type": "boolean", - "description": "If true then the value for HolidayAccrualBasis comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", - "nullable": true - }, - "useDefaultAccruePaymentInLieuPayAutomatically": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAccrueHoursPerDay": { - "type": "boolean", - "description": "If true then the value for AccrueHoursPerDay comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultMaximumAccruePeriod": { - "type": "boolean", - "description": "If true then the value for MaximumAccruePeriod comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "allowanceResetDate": { - "type": "string", - "description": "The date that the holiday allowance resets. Only the day/month part of the value is relevant.", - "format": "date" - }, - "allowance": { - "type": "number", - "description": "The number of days holiday an employee can take per year if HolidayType is Days.\r\nOtherwise this is readonly and gives you the number of days accrued since the last reset", - "format": "double" - }, - "adjustment": { - "type": "number", - "description": "Adjustment to number of hours/days/weeks holiday this employee can take per year.\r\nWill reset to 0 when the Allowance resets.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", - "format": "double", - "nullable": true - }, - "holidayType": { - "$ref": "#/components/schemas/HolidayType" - }, - "accrueSetAmount": { - "type": "boolean", - "description": "If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked." - }, - "accrueHoursPerDay": { - "type": "number", - "description": "If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued", - "format": "double" - }, - "showAllowanceOnPayslip": { - "type": "boolean", - "description": "If true then the remaining Allowance will be shown on the employees payslip." - }, - "showAhpOnPayslip": { - "type": "boolean", - "description": "If true then the AHP balance will be shown on the employees payslip." - }, - "accruePaymentInLieuRate": { - "type": "number", - "description": "The rate at which Payments in Lieu acrrue. Typically this should be 12.07%.", - "format": "double" - }, - "accruePaymentInLieuAllGrossPay": { - "type": "boolean", - "description": "[Deprecated] Please use HolidayAccrualBasis instead.\r\nThis filed will be removed in a later release.", - "deprecated": true - }, - "accruePaymentInLieuPayAutomatically": { - "type": "boolean", - "description": "Set to true if you want employees to be automatically paid any outstanding holiday pay" - }, - "occupationalSicknessUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "accruedPaymentAdjustment": { - "type": "number", - "description": "Any manual adjustment to the total accrued", - "format": "double" - }, - "accruedHoursAdjustment": { - "type": "number", - "description": "Any manual adjustment to the total hours accrued", - "format": "double" - }, - "holidayAccrualBasis": { - "$ref": "#/components/schemas/HolidayAccrual" - }, - "holidayAccrualDefaultRateType": { - "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" - }, - "aggregatedServiceDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "useAggregatedServiceDate": { - "type": "boolean" - }, - "accruePayCodeSetUniqueId": { - "type": "string", - "description": "Pay code set to use for accruing holiday pay", - "format": "uuid", - "nullable": true - }, - "maximumAccruePeriod": { - "type": "number", - "description": "The maximum number of hours capable of being accrued in a single period", - "format": "double", - "nullable": true - }, - "holidayLeaveAccrualCustomRateType": { - "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + "post": { + "description": "Creates a Pension Refund for the Employee", + "operationId": "CreatePensionRefund", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "useDefaultHolidayAccrualDefaultRateType": { - "type": "boolean", - "description": "If true then the value for HolidayAccrualDefaultRateType comes from the Employer record.", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PensionRefund" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PensionRefund" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PensionRefund" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PensionRefund" + } + } } }, - "additionalProperties": false - }, - "Contract.EmployeeLeaveSettingsResponse": { - "type": "object", - "properties": { - "allowanceUsed": { - "type": "number", - "description": "[readonly] The number of days used from the allowance since last reset", - "format": "double" - }, - "allowanceUsedPreviousPeriod": { - "type": "number", - "description": "[readonly] The number of days used in the 12 months prior to the last reset", - "format": "double" - }, - "allowanceRemaining": { - "type": "number", - "description": "[readonly] The number of days remaining of the allowance until next reset", - "format": "double", - "readOnly": true - }, - "accruedPaymentLiability": { - "type": "number", - "description": "[readonly] The total accrued payments for this employee over the lifetime of their employment so far", - "format": "double" - }, - "accruedPaymentPaid": { - "type": "number", - "description": "[readonly] The Total amount paid to this employee in lieu of holidays", - "format": "double" - }, - "accruedPaymentBalance": { - "type": "number", - "description": "[readonly] The balance of what is owed to this employee in lieu of holidays", - "format": "double" + "responses": { + "201": { + "description": "Created" }, - "accruedHoursAmount": { - "type": "number", - "description": "[readonly] The total accrued hours for this employee over the lifetime of their employment so far", - "format": "double" + "400": { + "description": "Bad Request" }, - "accruedHoursPaid": { - "type": "number", - "description": "[readonly] The Total amount of hours paid to this employee in lieu of holidays", - "format": "double" + "404": { + "description": "Not Found" }, - "accruedHoursBalance": { - "type": "number", - "description": "[readonly] The balance of hours owed to this employee in lieu of holidays", - "format": "double", - "readOnly": true + "409": { + "description": "Conflict" + } + }, + "summary": "Create Pension Refund", + "tags": [ + "PensionRefund" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/pensionrefund/autocalculated": { + "post": { + "description": "Creates a pension refund for full contribution amount for the current tax year for the current pensionScheme", + "operationId": "IssueRefundForCurrentPensionSchemePensionRefund", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "holidayAccrualResetDate": { - "type": "string", - "description": "[readonly] This date is used to reset holiday accrual schemes (Accrual Money or Accrual Hours).", - "format": "date", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PensionRefund" + } + } + }, + "description": "Success" }, - "useDefaultHolidayType": { - "type": "boolean", - "description": "If true then the value for HolidayType comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" + "400": { + "description": "Bad Request" }, - "useDefaultAllowanceResetDate": { - "type": "boolean", - "description": "If true then the value for the AllowanceResetDate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" + "404": { + "description": "Not Found" }, - "useDefaultAllowance": { - "type": "boolean", - "description": "If true then the value for the Allowance comes from the Employer record.\r\nThis property only appears if the LeaveSettings if a child of an Employee (not of an Employer)" + "409": { + "description": "Conflict" + } + }, + "summary": "Issue Pension Refund (deprecated)", + "tags": [ + "PensionRefund" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/pensionrefund/{id}": { + "delete": { + "description": "Deletes the Pension Refund specified by the Id for the Employee specified by the EmployeeId", + "operationId": "DeletePensionRefund", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "useDefaultAccruePaymentInLieu": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "useDefaultAccruePaymentInLieuRate": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieuRate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" + { + "description": "The Id of the Pension Refund you want to delete.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "useDefaultAccruePaymentInLieuAllGrossPay": { - "type": "boolean", - "description": "[Deprecated] Please use UseUseDefaultHolidayAccrualBasis instead.\r\nThis filed will be removed in a later release.", - "deprecated": true + "400": { + "description": "Bad Request" }, - "useDefaultHolidayAccrualBasis": { - "type": "boolean", - "description": "If true then the value for HolidayAccrualBasis comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", - "nullable": true + "404": { + "description": "Not Found" }, - "useDefaultAccruePaymentInLieuPayAutomatically": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" + "409": { + "description": "Conflict" + } + }, + "summary": "Delete Pension Refund", + "tags": [ + "PensionRefund" + ] + }, + "get": { + "description": "Gets the Pension Refund specified by the Id for the Employee specified by the EmployeeId", + "operationId": "GetPensionRefund", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "useDefaultAccrueHoursPerDay": { - "type": "boolean", - "description": "If true then the value for AccrueHoursPerDay comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "useDefaultMaximumAccruePeriod": { - "type": "boolean", - "description": "If true then the value for MaximumAccruePeriod comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" + { + "description": "The Id of the Pension Refund you want to retrieve.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PensionRefund" + } + } + }, + "description": "Success" }, - "allowanceResetDate": { - "type": "string", - "description": "The date that the holiday allowance resets. Only the day/month part of the value is relevant.", - "format": "date" + "404": { + "description": "Not Found" + } + }, + "summary": "Get Pension Refund", + "tags": [ + "PensionRefund" + ] + }, + "put": { + "operationId": "UpdatePensionRefund", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "allowance": { - "type": "number", - "description": "The number of days holiday an employee can take per year if HolidayType is Days.\r\nOtherwise this is readonly and gives you the number of days accrued since the last reset", - "format": "double" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "adjustment": { - "type": "number", - "description": "Adjustment to number of hours/days/weeks holiday this employee can take per year.\r\nWill reset to 0 when the Allowance resets.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", - "format": "double", - "nullable": true + { + "description": "The Id of the Pension Refund you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PensionRefund" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PensionRefund" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PensionRefund" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PensionRefund" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PensionRefund" + } + } + }, + "description": "Success" }, - "holidayType": { - "$ref": "#/components/schemas/HolidayType" + "404": { + "description": "Not Found" }, - "accrueSetAmount": { - "type": "boolean", - "description": "If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked." + "409": { + "description": "Conflict" + } + }, + "summary": "Update Pension Refund", + "tags": [ + "PensionRefund" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/pensionrefund/{pensionId}/autocalculated": { + "post": { + "description": "Creates a pension refund for full contribution amount for the current tax year for the current pension", + "operationId": "IssueRefundForPensionPensionRefund", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accrueHoursPerDay": { - "type": "number", - "description": "If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued", - "format": "double" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "showAllowanceOnPayslip": { - "type": "boolean", - "description": "If true then the remaining Allowance will be shown on the employees payslip." + { + "description": "The Id of the pension for which you want to issue a refund.", + "in": "path", + "name": "pensionId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PensionRefund" + } + } + }, + "description": "Success" }, - "showAhpOnPayslip": { - "type": "boolean", - "description": "If true then the AHP balance will be shown on the employees payslip." + "400": { + "description": "Bad Request" }, - "accruePaymentInLieuRate": { - "type": "number", - "description": "The rate at which Payments in Lieu acrrue. Typically this should be 12.07%.", - "format": "double" + "404": { + "description": "Not Found" }, - "accruePaymentInLieuAllGrossPay": { - "type": "boolean", - "description": "[Deprecated] Please use HolidayAccrualBasis instead.\r\nThis filed will be removed in a later release.", - "deprecated": true + "409": { + "description": "Conflict" + } + }, + "summary": "Issue Pension Refund", + "tags": [ + "PensionRefund" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/roles": { + "get": { + "description": "Lists all Roles for an Employee.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "IndexEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer for the Employee.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruePaymentInLieuPayAutomatically": { - "type": "boolean", - "description": "Set to true if you want employees to be automatically paid any outstanding holiday pay" + { + "description": "The Id of the Employee which you want to list Roles.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "occupationalSicknessUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true + "403": { + "description": "Forbidden" }, - "accruedPaymentAdjustment": { - "type": "number", - "description": "Any manual adjustment to the total accrued", - "format": "double" + "404": { + "description": "Not Found" + } + }, + "summary": "List Employee Roles", + "tags": [ + "EmployeeRole" + ] + }, + "post": { + "description": "Creates a new Role for the Employee.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "CreateEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer for the Employee.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedHoursAdjustment": { - "type": "number", - "description": "Any manual adjustment to the total hours accrued", - "format": "double" + { + "description": "The Id of the Employee to which the Role belongs.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/EmployeeRole" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployeeRole" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/EmployeeRole" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/EmployeeRole" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployeeRole" + } + } + }, + "description": "Created" }, - "holidayAccrualBasis": { - "$ref": "#/components/schemas/HolidayAccrual" + "400": { + "description": "Bad Request" }, - "holidayAccrualDefaultRateType": { - "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + "403": { + "description": "Forbidden" }, - "aggregatedServiceDate": { - "type": "string", - "format": "date", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Create Employee Role", + "tags": [ + "EmployeeRole" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/roles/{id}": { + "delete": { + "description": "Deletes the specified Role.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "DeleteEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer for the Employee.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "useAggregatedServiceDate": { - "type": "boolean" + { + "description": "The Id of the Employee to which the Role belongs.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruePayCodeSetUniqueId": { - "type": "string", - "description": "Pay code set to use for accruing holiday pay", - "format": "uuid", - "nullable": true + { + "description": "The Id of the Role to delete.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "maximumAccruePeriod": { - "type": "number", - "description": "The maximum number of hours capable of being accrued in a single period", - "format": "double", - "nullable": true + "400": { + "description": "Bad Request" }, - "holidayLeaveAccrualCustomRateType": { - "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + "403": { + "description": "Forbidden" }, - "useDefaultHolidayAccrualDefaultRateType": { - "type": "boolean", - "description": "If true then the value for HolidayAccrualDefaultRateType comes from the Employer record.", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Delete Employee Role", + "tags": [ + "EmployeeRole" + ] }, - "Contract.EmployeePaymentsReportRequest": { - "type": "object", - "properties": { - "ordinal": { - "type": "integer", - "description": "Ordinal number for the Pay Schedule.", - "format": "int32" + "get": { + "description": "Gets the Role specified.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "GetEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer for the Employee.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payCodes": { - "type": "string", - "description": "Comma-separated list of Pay Codes.", - "nullable": true + { + "description": "The Id of the Employee to which the Role belongs.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "The id of the Role you want to retrieve.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeRoleResponse" + } + } + }, + "description": "Success" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Get Employee Role", + "tags": [ + "EmployeeRole" + ] }, - "Contract.EmployeeResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique id of the object", - "format": "uuid" + "put": { + "description": "Updates a Role for the Employee.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "UpdateEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer for the Employee.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "personalDetails": { - "$ref": "#/components/schemas/Contract.PersonalDetailsResponse" + { + "description": "The Id of the Employee to which the Role belongs.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employmentDetails": { - "$ref": "#/components/schemas/Contract.EmploymentDetailsResponse" + { + "description": "The Id of the Role to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/EmployeeRole" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployeeRole" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/EmployeeRole" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/EmployeeRole" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployeeRole" + } + } + }, + "description": "Success" }, - "autoEnrolment": { - "$ref": "#/components/schemas/Contract.AutoEnrolmentResponse" + "400": { + "description": "Bad Request" }, - "leaveSettings": { - "$ref": "#/components/schemas/Contract.EmployeeLeaveSettingsResponse" + "403": { + "description": "Forbidden" }, - "rightToWork": { - "$ref": "#/components/schemas/Contract.RightToWork" + "404": { + "description": "Not Found" + } + }, + "summary": "Update Employee Role", + "tags": [ + "EmployeeRole" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/roles/{id}/analysiscategories/{analysisCategoryId}/analysiscategorycodes": { + "put": { + "description": "Assigns AnalysisCategoryCode to an Employee Role.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "SetEmployeeRoleAnalysisCategoryCodesEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "bankDetails": { - "$ref": "#/components/schemas/Contract.BankDetails" + { + "description": "The Id of the Employee you want to set AnalysisCategoryCode for.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payOptions": { - "$ref": "#/components/schemas/Contract.PayOptionsResponse" + { + "description": "The Id of the Employee Role you want to set AnalysisCategoryCode for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "tags": { - "type": "array", - "items": { + { + "description": "The Id of the Analysis Category you want to set AnalysisCategoryCode for.", + "in": "path", + "name": "analysisCategoryId", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.EmployeeRoleAnalysisCategoryCodeRequest" + }, + "type": "array" + } }, - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/EmployeeStatus" - }, - "aeNotEnroledWarning": { - "type": "boolean" - }, - "sourceSystemId": { - "type": "string", - "nullable": true - }, - "aggregatedServiceDate": { - "type": "string", - "format": "date", - "nullable": true + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.EmployeeRoleAnalysisCategoryCodeRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.EmployeeRoleAnalysisCategoryCodeRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.EmployeeRoleAnalysisCategoryCodeRequest" + }, + "type": "array" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.EmployeeRoleAnalysisCategoryCodeResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "holidaySchemeUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true + "400": { + "description": "Bad Request" }, - "evcId": { - "type": "string", - "description": "If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId.", - "format": "uuid", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.EmployeeRoleAnalysisCategoryCodeRequest": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Analysis Category code", - "nullable": true + "summary": "Set Employee Role AnalysisCategorycode", + "tags": [ + "EmployeeRole" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/roles/{id}/analysiscategorycodes": { + "get": { + "description": "Gets AnalysisCategoryCode that are Assigned to an Employee Role.\r\nYou must have the multi-role feature enabled.", + "operationId": "GetEmployeeRoleAnalysisCategoryCodesEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "color": { - "type": "string", - "description": "Analysis Category code color", - "nullable": true + { + "description": "The Id of the Employee you want to retrieve AnalysisCategoryCode for.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "title": { - "type": "string", - "description": "Analysis Category code Title", - "nullable": true + { + "description": "The Id of the Employee Role you want to retrieve AnalysisCategoryCode for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.EmployeeRoleAnalysisCategoryCodeResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "weighting": { - "type": "number", - "description": "Weightage for analysis category code", - "format": "double" + "404": { + "description": "Not Found" + } + }, + "summary": "Get Employee Role AnalysisCategoryCode", + "tags": [ + "EmployeeRole" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/roles/{id}/costcentres": { + "get": { + "description": "Gets Cost Centres that are Assigned to an Employee Role.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "GetCostCentreMembershipsEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "analysisCategoryName": { - "type": "string", - "description": "Analysis category name for AnalysisCategory code", - "nullable": true + { + "description": "The Id of the Employee you want to retrieve Cost Centres for.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "analysisCategoryPublicId": { - "type": "string", - "description": "Analysis category identifier", - "format": "uuid" + { + "description": "The Id of the Employee Role you want to retrieve Cost Centres for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployeeCostCentre" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "isPrimary": { - "type": "boolean", - "description": "Return whether Employee Role is primary for not" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Get Employee Role Cost Centres", + "tags": [ + "EmployeeRole" + ] }, - "Contract.EmployeeRoleAnalysisCategoryCodeResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Employee Role Analysis Category Code identifier", - "format": "uuid" - }, - "code": { - "type": "string", - "description": "Analysis Category code", - "nullable": true - }, - "color": { - "type": "string", - "description": "Analysis Category code color", - "nullable": true - }, - "title": { - "type": "string", - "description": "Analysis Category code Title", - "nullable": true + "put": { + "description": "Assigns Cost Centres to an Employee Role.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "SetCostCentreMembershipsEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "weighting": { - "type": "number", - "description": "Weightage for analysis category code", - "format": "double" + { + "description": "The Id of the Employee you want to set Cost Centres for.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "analysisCategoryName": { - "type": "string", - "description": "Analysis category name for AnalysisCategory code", - "nullable": true + { + "description": "The Id of the Employee Role you want to set Cost Centres for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployeeCostCentre" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployeeCostCentre" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployeeCostCentre" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployeeCostCentre" + }, + "type": "array" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployeeCostCentre" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "analysisCategoryPublicId": { - "type": "string", - "description": "Analysis category identifier", - "format": "uuid" + "400": { + "description": "Bad Request" }, - "isPrimary": { - "type": "boolean", - "description": "Return whether Employee Role is primary for not" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.EmployeeRoleItem": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" + "summary": "Set Employee Role Cost Centres", + "tags": [ + "EmployeeRole" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/roles/{id}/departments": { + "get": { + "description": "Gets Departments that are Assigned to an Employee Role.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "GetDepartmentMembershipsEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "name": { - "type": "string", - "nullable": true + { + "description": "The Id of the Employee you want to retrieve Departments for.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "metadata": { - "nullable": true + { + "description": "The Id of the Employee Role you want to retrieve Departments for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DepartmentMembership" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "url": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Get Employee Role Departments", + "tags": [ + "EmployeeRole" + ] }, - "Contract.EmployeeRoleResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "jobTitle": { - "type": "string", - "description": "Job Title of the Role", - "nullable": true - }, - "isPrimary": { - "type": "boolean", - "description": "Set to True if this is Primary role of the Employee" - }, - "reference": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "startDate": { - "type": "string", - "format": "date" - }, - "endDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "basis": { - "$ref": "#/components/schemas/RoleBasis" - }, - "type": { - "$ref": "#/components/schemas/RoleType" - }, - "displayName": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "payOptions": { - "$ref": "#/components/schemas/Contract.PayOptionsBaseResponse" - }, - "workingPattern": { - "$ref": "#/components/schemas/Contract.WorkingPatternResponse" + "put": { + "description": "Assigns Departments to an Employee Role.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "SetDepartmentMembershipsEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "occupationalMaternityPolicyUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true + { + "description": "The Id of the Employee you want to set Departments for.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "occupationalSicknessPolicyUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true + { + "description": "The Id of the Employee Role you want to set Departments for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DepartmentMembership" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DepartmentMembership" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DepartmentMembership" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DepartmentMembership" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "Contract.EmployeeRoleWorkingPatternRequest": { - "type": "object", - "properties": { - "effectiveFrom": { - "type": "string", - "description": "The date when the assignment of the Working Pattern becomes effective.", - "format": "date" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DepartmentMembership" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "workingPatternUniqueId": { - "type": "string", - "description": "The UniqueId of the Working Pattern.", - "format": "uuid" + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.EmployeeRoleWorkingPatternResponse": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "The UniqueId of the model.", - "format": "uuid" - }, - "effectiveTo": { - "type": "string", - "description": "[readonly] The date when the assignment of the Working Pattern effectiveness ends. Populated automatically based on working pattern effectiveFrom dates.", - "format": "date" + "summary": "Set Employee Role Departments", + "tags": [ + "EmployeeRole" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/roles/{id}/workingPatterns/{roleWorkingPatternId}": { + "put": { + "description": "Updates a Working Pattern for the Employee Role.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "UpdateRoleWorkingPatternEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer for the Employee.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "workingPattern": { - "$ref": "#/components/schemas/Contract.WorkingPatternResponse" + { + "description": "The Id of the Employee to which the Role belongs.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "effectiveFrom": { - "type": "string", - "description": "The date when the assignment of the Working Pattern becomes effective.", - "format": "date" + { + "description": "The Id of the Role to which the Employee Role Working Pattern belongs.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "workingPatternUniqueId": { - "type": "string", - "description": "The UniqueId of the Working Pattern.", - "format": "uuid" + { + "description": "The Id of the Employee Role Working Pattern you want to update.", + "in": "path", + "name": "roleWorkingPatternId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" + } + } } }, - "additionalProperties": false - }, - "Contract.EmployeeRoleWorkingPatternResponseItem": { - "type": "object", - "properties": { - "workingPatternId": { - "type": "string", - "description": "The unique id of the working pattern.", - "format": "uuid" - }, - "effectiveFrom": { - "type": "string", - "description": "The date when the assignment of the Working Pattern becomes effective.", - "format": "date" - }, - "effectiveTo": { - "type": "string", - "description": "[readonly] The date when the assignment of the Working Pattern effectiveness ends. Populated automatically based on working pattern effectiveFrom dates.", - "format": "date", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternResponse" + } + } + }, + "description": "Success" }, - "totalHours": { - "type": "number", - "description": "[readonly] The amount of hours per working pattern.", - "format": "double" + "400": { + "description": "Bad Request" }, - "contractedWeeks": { - "type": "number", - "description": "[readonly] The amount of weeks an employee works, utilise for employees who aren't working full time.\r\nIf Null then the default is used.", - "format": "double", - "nullable": true + "403": { + "description": "Forbidden" }, - "title": { - "type": "string", - "description": "The title of the working pattern.", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Update Employee Role Working Pattern", + "tags": [ + "EmployeeRole" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/roles/{id}/workingpatterns": { + "get": { + "description": "Lists all Working Patterns for an Employee Role.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "ListRoleWorkingPatternsEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer for the Employee.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "id": { - "type": "string", - "format": "uuid" + { + "description": "The Id of the Employee to which the Role belongs.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "name": { - "type": "string", - "nullable": true + { + "description": "The Id of the Employee Role you want to retrieve Employee Role Working Patterns for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternResponseItem" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "metadata": { - "nullable": true + "403": { + "description": "Forbidden" }, - "url": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "List Working Patterns for an Employee Role", + "tags": [ + "EmployeeRole" + ] }, - "Contract.EmployerBase": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true + "post": { + "description": "Creates a new Role Working Pattern for the Employee Role.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "CreateRoleWorkingPatternEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer for the Employee.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "uniqueId": { - "type": "string", - "format": "uuid" + { + "description": "The Id of the Employee to which the Role belongs.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "The Id of the Employee Role you want to create a Role Working Pattern for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternRequest" + } + } } }, - "additionalProperties": false - }, - "Contract.EmployerLeaveSettingsRequest": { - "type": "object", - "properties": { - "useDefaultHolidayType": { - "type": "boolean", - "description": "If true then the value for HolidayType comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAllowanceResetDate": { - "type": "boolean", - "description": "If true then the value for the AllowanceResetDate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAllowance": { - "type": "boolean", - "description": "If true then the value for the Allowance comes from the Employer record.\r\nThis property only appears if the LeaveSettings if a child of an Employee (not of an Employer)" - }, - "useDefaultAccruePaymentInLieu": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAccruePaymentInLieuRate": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieuRate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultHolidayAccrualBasis": { - "type": "boolean", - "description": "If true then the value for HolidayAccrualBasis comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAccruePaymentInLieuPayAutomatically": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAccrueHoursPerDay": { - "type": "boolean", - "description": "If true then the value for AccrueHoursPerDay comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultMaximumAccruePeriod": { - "type": "boolean", - "description": "If true then the value for MaximumAccruePeriod comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "allowanceResetDate": { - "type": "string", - "description": "The date that the holiday allowance resets. Only the day/month part of the value is relevant.", - "format": "date" - }, - "allowance": { - "type": "number", - "description": "The number of days holiday an employee can take per year if HolidayType is Days.\r\nOtherwise this is readonly and gives you the number of days accrued since the last reset", - "format": "double" - }, - "adjustment": { - "type": "number", - "description": "Adjustment to number of hours/days/weeks holiday this employee can take per year.\r\nWill reset to 0 when the Allowance resets.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", - "format": "double", - "nullable": true - }, - "allowanceUsed": { - "type": "number", - "description": "[readonly] The number of days used from the allowance since last reset", - "format": "double" - }, - "allowanceUsedPreviousPeriod": { - "type": "number", - "description": "[readonly] The number of days used in the 12 months prior to the last reset", - "format": "double" - }, - "allowanceRemaining": { - "type": "number", - "description": "[readonly] The number of days remaining of the allowance until next reset", - "format": "double", - "readOnly": true - }, - "holidayType": { - "$ref": "#/components/schemas/HolidayType" - }, - "accrueSetAmount": { - "type": "boolean", - "description": "If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked." - }, - "accrueHoursPerDay": { - "type": "number", - "description": "If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued", - "format": "double" - }, - "showAllowanceOnPayslip": { - "type": "boolean", - "description": "If true then the remaining Allowance will be shown on the employees payslip." - }, - "showAhpOnPayslip": { - "type": "boolean", - "description": "If true then the AHP balance will be shown on the employees payslip." - }, - "accruePaymentInLieuRate": { - "type": "number", - "description": "The rate at which Payments in Lieu acrrue. Typically this should be 12.07%.", - "format": "double" - }, - "accruePaymentInLieuAllGrossPay": { - "type": "boolean", - "description": "Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element" - }, - "accruePaymentInLieuPayAutomatically": { - "type": "boolean", - "description": "Set to true if you want employees to be automatically paid any outstanding holiday pay" - }, - "accruePayCodeSetUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "maximumAccruePeriod": { - "type": "number", - "description": "The maximum number of hours capable of being accrued in a single period", - "format": "double", - "nullable": true - }, - "holidayAccrualBasis": { - "$ref": "#/components/schemas/HolidayAccrual" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternResponse" + } + } + }, + "description": "Created" }, - "holidayAccrualDefaultRateType": { - "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + "400": { + "description": "Bad Request" }, - "occupationalSicknessUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true + "403": { + "description": "Forbidden" }, - "accruedPaymentLiability": { - "type": "number", - "description": "[readonly] The total accrued payments for this employee over the lifetime of their employment so far", - "format": "double" + "404": { + "description": "Not Found" + } + }, + "summary": "Create Employee Role Working Pattern", + "tags": [ + "EmployeeRole" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/roles/{id}/workingpatterns/{roleWorkingPatternId}": { + "delete": { + "description": "Deletes the specified Employee Role Working Pattern.\r\nYou must have the multi-role feature enabled.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "DeleteRoleWorkingPatternEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer for the Employee.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedPaymentAdjustment": { - "type": "number", - "description": "Any manual adjustment to the total accrued", - "format": "double" + { + "description": "The Id of the Employee to which the Role belongs.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedPaymentPaid": { - "type": "number", - "description": "[readonly] The Total amount paid to this employee in lieu of holidays", - "format": "double" + { + "description": "The Id of the Employee Role to which the Role Working Pattern belongs.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedPaymentBalance": { - "type": "number", - "description": "[readonly] The balance of what is owed to this employee in lieu of holidays", - "format": "double", - "readOnly": true + { + "description": "The Id of the Employee Role Working Pattern you want to delete.", + "in": "path", + "name": "roleWorkingPatternId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "accruedHoursAmount": { - "type": "number", - "description": "[readonly] The total accrued hours for this employee over the lifetime of their employment so far", - "format": "double" + "400": { + "description": "Bad Request" }, - "accruedHoursAdjustment": { - "type": "number", - "description": "Any manual adjustment to the total hours accrued", - "format": "double" + "403": { + "description": "Forbidden" }, - "accruedHoursPaid": { - "type": "number", - "description": "[readonly] The Total amount of hours paid to this employee in lieu of holidays", - "format": "double" + "404": { + "description": "Not Found" + } + }, + "summary": "Delete Employee Role Working Pattern", + "tags": [ + "EmployeeRole" + ] + }, + "get": { + "description": "Gets the Employee Role Working Pattern specified.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "GetRoleWorkingPatternEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer for the Employee.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedHoursAmountLastPeriod": { - "type": "number", - "description": "[readonly] The total accrued hours for this employee in the last pay period", - "format": "double" + { + "description": "The Id of the Employee to which the Role belongs.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "paidHoursAmountLastPeriod": { - "type": "number", - "description": "[readonly] The number of hours paid against the pay code", - "format": "double" + { + "description": "The Id of the Employee Role you want to retrieve a Role Working Pattern for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedHoursBalance": { - "type": "number", - "description": "[readonly] The balance of hours owed to this employee in lieu of holidays", - "format": "double", - "readOnly": true + { + "description": "The Id of the Employee Role Working Pattern you want to retrieve.", + "in": "path", + "name": "roleWorkingPatternId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeRoleWorkingPatternResponse" + } + } + }, + "description": "Success" }, - "aggregatedServiceDate": { - "type": "string", - "format": "date", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Get Employee Role Working Pattern", + "tags": [ + "EmployeeRole" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/roles/{roleId}/assumedpensionablepay": { + "get": { + "operationId": "GetRoleAssumedPensionablePayEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "useAggregatedServiceDate": { - "type": "boolean" + { + "description": "The Id of the Employee.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "useDefaultHolidayAccrualDefaultRateType": { - "type": "boolean", - "description": "If true then the value for HolidayAccrualDefaultRateType comes from the Employer record." + { + "description": "The Employee Role Id.", + "in": "path", + "name": "roleId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "unauthorisedLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The frequency that this Employee Role is paid.", + "in": "query", + "name": "payPeriod", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "holidayLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The type of the Leave.", + "in": "query", + "name": "leaveType", + "schema": { + "$ref": "#/components/schemas/LeaveType" + } }, - "sickLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The pay type of the Leave.", + "in": "query", + "name": "leavePayType", + "schema": { + "$ref": "#/components/schemas/LeavePayType" + } }, - "parentalLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The date from which the Assumed Pensionable Pay is calculated.", + "in": "query", + "name": "from", + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "double", + "type": "number" + } + } + }, + "description": "Success" }, - "bereavementLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.EmployerLeaveSettingsResponse": { - "type": "object", - "properties": { - "useDefaultHolidayType": { - "type": "boolean", - "description": "If true then the value for HolidayType comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAllowanceResetDate": { - "type": "boolean", - "description": "If true then the value for the AllowanceResetDate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAllowance": { - "type": "boolean", - "description": "If true then the value for the Allowance comes from the Employer record.\r\nThis property only appears if the LeaveSettings if a child of an Employee (not of an Employer)" - }, - "useDefaultAccruePaymentInLieu": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAccruePaymentInLieuRate": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieuRate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultHolidayAccrualBasis": { - "type": "boolean", - "description": "If true then the value for HolidayAccrualBasis comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAccruePaymentInLieuPayAutomatically": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" + "summary": "Calculate Assumed Pensionable Pay", + "tags": [ + "EmployeeRole" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/roles/{roleId}/basedailyrate": { + "get": { + "operationId": "GetBaseDailyRateEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "useDefaultAccrueHoursPerDay": { - "type": "boolean", - "description": "If true then the value for AccrueHoursPerDay comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" + { + "description": "The Id of the Employee.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "useDefaultMaximumAccruePeriod": { - "type": "boolean", - "description": "If true then the value for MaximumAccruePeriod comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" + { + "description": "The Employee Role Id.", + "in": "path", + "name": "roleId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "allowanceResetDate": { - "type": "string", - "description": "The date that the holiday allowance resets. Only the day/month part of the value is relevant.", - "format": "date" + { + "description": "The frequency that this Employee Role is paid.", + "in": "query", + "name": "payPeriod", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "allowance": { - "type": "number", - "description": "The number of days holiday an employee can take per year if HolidayType is Days.\r\nOtherwise this is readonly and gives you the number of days accrued since the last reset", - "format": "double" + { + "description": "", + "in": "query", + "name": "payBasis", + "schema": { + "$ref": "#/components/schemas/PayBasis" + } }, - "adjustment": { - "type": "number", - "description": "Adjustment to number of hours/days/weeks holiday this employee can take per year.\r\nWill reset to 0 when the Allowance resets.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", - "format": "double", - "nullable": true + { + "description": "The amount the Employee Role is regularly paid each period.", + "in": "query", + "name": "payAmount", + "schema": { + "format": "double", + "type": "number" + } }, - "allowanceUsed": { - "type": "number", - "description": "[readonly] The number of days used from the allowance since last reset", - "format": "double" + { + "description": "The Id of the Working Pattern that we want the calculations against.", + "in": "query", + "name": "workingPatternId", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "double", + "type": "number" + } + } + }, + "description": "Success" }, - "allowanceUsedPreviousPeriod": { - "type": "number", - "description": "[readonly] The number of days used in the 12 months prior to the last reset", - "format": "double" + "404": { + "description": "Not Found" + } + }, + "summary": "Calculate Base Daily Rate", + "tags": [ + "EmployeeRole" + ] + } + }, + "/employers/{employerId}/employees/{employeeId}/roles/{roleId}/basehourlyrate": { + "get": { + "operationId": "GetBaseHourlyRateEmployeeRole", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "allowanceRemaining": { - "type": "number", - "description": "[readonly] The number of days remaining of the allowance until next reset", - "format": "double" + { + "description": "The Id of the Employee.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "holidayType": { - "$ref": "#/components/schemas/HolidayType" + { + "description": "The Employee Role Id.", + "in": "path", + "name": "roleId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accrueSetAmount": { - "type": "boolean", - "description": "If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked." + { + "description": "The frequency that this Employee Role is paid.", + "in": "query", + "name": "payPeriod", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "accrueHoursPerDay": { - "type": "number", - "description": "If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued", - "format": "double" + { + "description": "", + "in": "query", + "name": "payBasis", + "schema": { + "$ref": "#/components/schemas/PayBasis" + } }, - "showAllowanceOnPayslip": { - "type": "boolean", - "description": "If true then the remaining Allowance will be shown on the employees payslip." + { + "description": "The amount the Employee Role is regularly paid each period.", + "in": "query", + "name": "payAmount", + "schema": { + "format": "double", + "type": "number" + } }, - "showAhpOnPayslip": { - "type": "boolean", - "description": "If true then the AHP balance will be shown on the employees payslip." + { + "description": "The Id of the Working Pattern that we want the calculations against.", + "in": "query", + "name": "workingPatternId", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "double", + "type": "number" + } + } + }, + "description": "Success" }, - "accruePaymentInLieuRate": { - "type": "number", - "description": "The rate at which Payments in Lieu acrrue. Typically this should be 12.07%.", - "format": "double" + "404": { + "description": "Not Found" + } + }, + "summary": "Calculate Base Hourly Rate", + "tags": [ + "EmployeeRole" + ] + } + }, + "/employers/{employerId}/employees/{id}": { + "delete": { + "operationId": "DeleteEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruePaymentInLieuAllGrossPay": { - "type": "boolean", - "description": "Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element" + { + "description": "The Id of the Employee you want to delete.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "accruePaymentInLieuPayAutomatically": { - "type": "boolean", - "description": "Set to true if you want employees to be automatically paid any outstanding holiday pay" + "400": { + "description": "Bad Request" + } + }, + "summary": "Delete an Employee", + "tags": [ + "Employee" + ] + }, + "get": { + "operationId": "GetEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruePayCodeSetUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true + { + "description": "The Id of the Employee you want to retrieve.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Get an Employee", + "tags": [ + "Employee" + ] + }, + "put": { + "operationId": "UpdateEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "maximumAccruePeriod": { - "type": "number", - "description": "The maximum number of hours capable of being accrued in a single period", - "format": "double", - "nullable": true + { + "description": "The Id of the Employee you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.UpdateEmployeeRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.UpdateEmployeeRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.UpdateEmployeeRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.UpdateEmployeeRequest" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeResponse" + } + } + }, + "description": "Success" }, - "holidayAccrualBasis": { - "$ref": "#/components/schemas/HolidayAccrual" + "400": { + "description": "Bad Request" }, - "holidayAccrualDefaultRateType": { - "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + "404": { + "description": "Not Found" }, - "occupationalSicknessUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true + "409": { + "description": "Conflict" + } + }, + "summary": "Update an Employee", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/{id}/awe": { + "get": { + "description": "Calculates the Average Weekly Earnings for an Employee at the given date.\r\nYou can optionally include a LeaveType and we'll adjust the given date accordingly\r\nFor example if you specify Maternity then it'll be moved back by 15 weeks", + "operationId": "AverageWeeklyEarningsEmployee", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedPaymentLiability": { - "type": "number", - "description": "[readonly] The total accrued payments for this employee over the lifetime of their employment so far", - "format": "double" + { + "description": "The Employee Id.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedPaymentAdjustment": { - "type": "number", - "description": "Any manual adjustment to the total accrued", - "format": "double" + { + "description": "The date at which you want to calculate the earnings from.", + "in": "query", + "name": "date", + "schema": { + "format": "date-time", + "type": "string" + } }, - "accruedPaymentPaid": { - "type": "number", - "description": "[readonly] The Total amount paid to this employee in lieu of holidays", - "format": "double" + { + "description": "", + "in": "query", + "name": "leaveType", + "schema": { + "$ref": "#/components/schemas/LeaveType" + } }, - "accruedPaymentBalance": { - "type": "number", - "description": "[readonly] The balance of what is owed to this employee in lieu of holidays", - "format": "double", - "readOnly": true + { + "description": "", + "in": "query", + "name": "secondaryDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "accruedHoursAmount": { - "type": "number", - "description": "[readonly] The total accrued hours for this employee over the lifetime of their employment so far", - "format": "double" + { + "description": "", + "in": "query", + "name": "tertiaryDate", + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AverageWeeklyEarnings" + } + } + }, + "description": "Success" + } + }, + "summary": "Average Weekly Earnings", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/{id}/basedailyrate": { + "get": { + "operationId": "BaseDailyRateEmployee", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedHoursAdjustment": { - "type": "number", - "description": "Any manual adjustment to the total hours accrued", - "format": "double" + { + "description": "The Employee Id.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedHoursPaid": { - "type": "number", - "description": "[readonly] The Total amount of hours paid to this employee in lieu of holidays", - "format": "double" + { + "description": "The frequency that this Employee is paid.", + "in": "query", + "name": "payPeriod", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "accruedHoursAmountLastPeriod": { - "type": "number", - "description": "[readonly] The total accrued hours for this employee in the last pay period", - "format": "double" + { + "description": "", + "in": "query", + "name": "payBasis", + "schema": { + "$ref": "#/components/schemas/PayBasis" + } }, - "paidHoursAmountLastPeriod": { - "type": "number", - "description": "[readonly] The number of hours paid against the pay code", - "format": "double" + { + "description": "The amount the Employee is regularly paid each period.", + "in": "query", + "name": "payAmount", + "schema": { + "format": "double", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "double", + "type": "number" + } + } + }, + "description": "Success" + } + }, + "summary": "Calculate Base Daily Rate (deprecated)", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/{id}/basehourlyrate": { + "get": { + "operationId": "BaseHourlyRateEmployee", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedHoursBalance": { - "type": "number", - "description": "[readonly] The balance of hours owed to this employee in lieu of holidays", - "format": "double" + { + "description": "The Employee Id.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "aggregatedServiceDate": { - "type": "string", - "format": "date", - "nullable": true + { + "description": "The frequency that this Employee is paid.", + "in": "query", + "name": "payPeriod", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "useAggregatedServiceDate": { - "type": "boolean" + { + "description": "", + "in": "query", + "name": "payBasis", + "schema": { + "$ref": "#/components/schemas/PayBasis" + } }, - "useDefaultHolidayAccrualDefaultRateType": { - "type": "boolean", - "description": "If true then the value for HolidayAccrualDefaultRateType comes from the Employer record." + { + "description": "The amount the Employee is regularly paid each period.", + "in": "query", + "name": "payAmount", + "schema": { + "format": "double", + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "double", + "type": "number" + } + } + }, + "description": "Success" + } + }, + "summary": "Calculate Base Hourly Rate (deprecated)", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/{id}/costcentres": { + "get": { + "operationId": "GetEmployeeCostCentresEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "unauthorisedLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The Id of the Employee you want to retrieve CostCenntres for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployeeCostCentre" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Employee Cost Centres", + "tags": [ + "Employee" + ] + }, + "put": { + "operationId": "SetEmployeeCostCentresEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "holidayLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The Id of the Employee you want to set CostCentres for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployeeCostCentre" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployeeCostCentre" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployeeCostCentre" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployeeCostCentre" + }, + "type": "array" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployeeCostCentre" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Set Employee Cost Centres", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/{id}/departments": { + "get": { + "operationId": "GetDepartmentMembershipsEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "sickLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The Id of the Employee you want to retrieve Departments for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DepartmentMembership" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Employee Departments", + "tags": [ + "Employee" + ] + }, + "put": { + "operationId": "SetDepartmentMembershipsEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "parentalLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The Id of the Employee you want to set Departments for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DepartmentMembership" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DepartmentMembership" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DepartmentMembership" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DepartmentMembership" + }, + "type": "array" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DepartmentMembership" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Set Employee Departments", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/{id}/evcsettings": { + "get": { + "operationId": "GetEvcSettingsEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "bereavementLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The Id of the Employee for which you want to retrieve EvcSettings.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvcSettings" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get EvcSettings", + "tags": [ + "Employee" + ] }, - "Contract.EmployerRequest": { - "type": "object", - "properties": { - "address": { - "$ref": "#/components/schemas/Contract.Address" - }, - "bankDetails": { - "$ref": "#/components/schemas/Contract.BankDetails" - }, - "defaultPayOptions": { - "$ref": "#/components/schemas/Contract.PayOptionsRequest" - }, - "hmrcDetails": { - "$ref": "#/components/schemas/Contract.HmrcDetailsRequest" - }, - "defaultPension": { - "$ref": "#/components/schemas/Contract.PensionSelectionRequest" - }, - "rtiSubmissionSettings": { - "$ref": "#/components/schemas/Contract.RtiSubmissionSettingsRequest" - }, - "leaveSettings": { - "$ref": "#/components/schemas/Contract.EmployerLeaveSettingsRequest" - }, - "settings": { - "$ref": "#/components/schemas/Contract.EmployerSettingsRequest" - }, - "umbrellaSettings": { - "$ref": "#/components/schemas/Contract.UmbrellaSettingsRequest" - }, - "autoEnrolmentSettings": { - "$ref": "#/components/schemas/Contract.AutoEnrolmentSettingsRequest" - }, - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "sourceSystemId": { - "type": "string", - "description": "[readonly] Can only be given a value when the employer is created. It can then never be changed.\r\nUsed by external systems so they can store an immutable reference", - "nullable": true - }, - "crn": { - "type": "string", - "description": "Company Registration Number", - "nullable": true - }, - "logoUrl": { - "type": "string", - "nullable": true - }, - "logoSasUrl": { - "type": "string", - "nullable": true - }, - "alternativeId": { - "type": "string", - "nullable": true - }, - "bankPaymentsCsvFormat": { - "$ref": "#/components/schemas/BankPaymentInstructionsCsvFormat" - }, - "bacsServiceUserNumber": { - "type": "string", - "nullable": true - }, - "bacsBureauNumber": { - "type": "string", - "nullable": true - }, - "rejectInvalidBankDetails": { - "type": "boolean" - }, - "bankPaymentsReferenceFormat": { - "type": "string", - "nullable": true - }, - "bacsIncludeAEO": { - "type": "boolean" - }, - "bacsIncludeDeductions": { - "type": "boolean" - }, - "bacsIncludeHmrc": { - "type": "boolean" - }, - "bacsIncludePensions": { - "type": "boolean" - }, - "useTenantRtiSubmissionSettings": { - "type": "boolean", - "description": "If the Tenant for this employer has Bureau Features enabled then they can set RtiSubmissionSettings to be used across multiple employers.\r\nIf this is set to true then those settings will be used instead of any set at the Employer level" - }, - "accruePayCodeSetUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "employeeCount": { - "type": "integer", - "description": "[readonly] The number of Employees this Employer has, including CIS Subcontractors.", - "format": "int32" - }, - "subcontractorCount": { - "type": "integer", - "description": "[readonly] The number of CIS Subcontractors this Employer has.", - "format": "int32" - }, - "startYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "currentYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "supportAccessEnabled": { - "type": "boolean", - "description": "If set to true then the support team can access this employer to help resolve\r\nsupport queries" - }, - "archived": { - "type": "boolean", - "description": "A flag to indicate whather or not the employer is Archived, ie no longer actively used" - }, - "canUseBureauFeatures": { - "type": "boolean" - }, - "multiRoleEnabled": { - "type": "boolean" - }, - "educationPayrollEnabled": { - "type": "boolean" - }, - "effectiveDateWorkingPatternsEnabled": { - "type": "boolean" - }, - "backPayEnabled": { - "type": "boolean" - }, - "displayName": { - "type": "string", - "nullable": true - }, - "isOptedInToEvc": { - "type": "boolean", - "description": "[readonly] Indicates whether or not the Employer is opted in to the Employee Verification Programme.\r\nValue can only be changed by its dedicated API end point." - }, - "evcId": { - "type": "string", - "description": "If set then this will be used as the Employer ID sent to EVC in place of the standard EmployerId.", - "format": "uuid", - "nullable": true - }, - "holidayAccrualBasis": { - "$ref": "#/components/schemas/HolidayAccrual" + "put": { + "operationId": "UpdateEvcSettingsEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "holidayAccrualDefaultRateType": { - "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + { + "description": "The Id of the Employee for who you want to update EvcSettings.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/EvcSettings" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvcSettings" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/EvcSettings" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/EvcSettings" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvcSettings" + } + } + }, + "description": "Success" + } + }, + "summary": "Update EvcSettings", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/{id}/navigation": { + "get": { + "operationId": "GetEmployeeNavigationEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "mfaEnabled": { - "type": "boolean", - "description": "if set to true requires all users to setup MFA\r\nsupport queries" + { + "description": "The Id of the Employee you want to retrieve.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "departmentJournalOverridesEnabled": { - "type": "boolean", - "description": "Enables the journal overrides for departments, if set to true." + { + "description": "Restrict the results to employees with the given status", + "in": "query", + "name": "employeeStatus", + "schema": { + "$ref": "#/components/schemas/EmployeeStatus" + } }, - "costCentreJournalOverridesEnabled": { - "type": "boolean", - "description": "Enables the journal overrides for cost centre, if set to true." + { + "description": "If specified then only employees assigned to this department code will be listed", + "in": "query", + "name": "deptCode", + "schema": { + "type": "string" + } }, - "settingsSortPayrollNumbersAlphanumerically": { - "type": "boolean", - "description": "Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied" + { + "description": "Specifies the field by which to sort the employees. Default is EmployeeSortBy.None.", + "in": "query", + "name": "sortBy", + "schema": { + "$ref": "#/components/schemas/EmployeeSortBy" + } }, - "unauthorisedLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "Specifies whether the sorting should be in descending order. Default is false.", + "in": "query", + "name": "sortDescending", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeNavigationResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Get employee navigation details for a specific employee", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/{id}/payrunentries/{taxYear}": { + "get": { + "description": "List PayRunEntries for the given Employee in the specified TaxYear", + "operationId": "PayRunEntriesEmployee", + "parameters": [ + { + "description": "The Id of the Employer to search.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "holidayLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The Employee Id.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "sickLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The TaxYear for which you want to list PayRunEntries.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "PayRunEntries for Employee", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/{id}/photo": { + "delete": { + "operationId": "DeletePhotoEmployee", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "parentalLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The Id of the Employee you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "bereavementLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Delete Photo", + "tags": [ + "Employee" + ] }, - "Contract.EmployerResponse": { - "type": "object", - "properties": { - "address": { - "$ref": "#/components/schemas/Contract.Address" - }, - "bankDetails": { - "$ref": "#/components/schemas/Contract.BankDetails" - }, - "defaultPayOptions": { - "$ref": "#/components/schemas/Contract.PayOptionsResponse" - }, - "hmrcDetails": { - "$ref": "#/components/schemas/Contract.HmrcDetailsResponse" - }, - "defaultPension": { - "$ref": "#/components/schemas/Contract.PensionSelectionResponse" - }, - "rtiSubmissionSettings": { - "$ref": "#/components/schemas/Contract.RtiSubmissionSettingsResponse" - }, - "leaveSettings": { - "$ref": "#/components/schemas/Contract.EmployerLeaveSettingsResponse" - }, - "settings": { - "$ref": "#/components/schemas/Contract.EmployerSettingsResponse" - }, - "umbrellaSettings": { - "$ref": "#/components/schemas/Contract.UmbrellaSettingsResponse" - }, - "autoEnrolmentSettings": { - "$ref": "#/components/schemas/Contract.AutoEnrolmentSettingsResponse" - }, - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "sourceSystemId": { - "type": "string", - "description": "[readonly] Can only be given a value when the employer is created. It can then never be changed.\r\nUsed by external systems so they can store an immutable reference", - "nullable": true - }, - "crn": { - "type": "string", - "description": "Company Registration Number", - "nullable": true - }, - "logoUrl": { - "type": "string", - "nullable": true - }, - "logoSasUrl": { - "type": "string", - "nullable": true - }, - "alternativeId": { - "type": "string", - "nullable": true - }, - "bankPaymentsCsvFormat": { - "$ref": "#/components/schemas/BankPaymentInstructionsCsvFormat" - }, - "bacsServiceUserNumber": { - "type": "string", - "nullable": true - }, - "bacsBureauNumber": { - "type": "string", - "nullable": true - }, - "rejectInvalidBankDetails": { - "type": "boolean" - }, - "bankPaymentsReferenceFormat": { - "type": "string", - "nullable": true - }, - "bacsIncludeAEO": { - "type": "boolean" - }, - "bacsIncludeDeductions": { - "type": "boolean" - }, - "bacsIncludeHmrc": { - "type": "boolean" - }, - "bacsIncludePensions": { - "type": "boolean" - }, - "useTenantRtiSubmissionSettings": { - "type": "boolean", - "description": "If the Tenant for this employer has Bureau Features enabled then they can set RtiSubmissionSettings to be used across multiple employers.\r\nIf this is set to true then those settings will be used instead of any set at the Employer level" - }, - "accruePayCodeSetUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "employeeCount": { - "type": "integer", - "description": "The default LeaveSettings. Only the Allowance and AllowanceResetDate fields are used.", - "format": "int32" - }, - "subcontractorCount": { - "type": "integer", - "description": "[readonly] The number of CIS Subcontractors this Employer has.", - "format": "int32" - }, - "startYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "currentYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "supportAccessEnabled": { - "type": "boolean", - "description": "If set to true then the support team can access this employer to help resolve\r\nsupport queries" - }, - "archived": { - "type": "boolean", - "description": "A flag to indicate whather or not the employer is Archived, ie no longer actively used" - }, - "canUseBureauFeatures": { - "type": "boolean" - }, - "multiRoleEnabled": { - "type": "boolean" - }, - "educationPayrollEnabled": { - "type": "boolean" - }, - "effectiveDateWorkingPatternsEnabled": { - "type": "boolean" - }, - "backPayEnabled": { - "type": "boolean" - }, - "displayName": { - "type": "string", - "nullable": true + "post": { + "description": "If you already have a URL for the employee photo then you can just set the PhotoUrl property of the Employee.\r\nAlternatively, submit an image here and we'll upload it, resize it to 200px squared and set the PhotoUrl for you.", + "operationId": "UpdatePhotoEmployee", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isOptedInToEvc": { - "type": "boolean", - "description": "[readonly] Indicates whether or not the Employer is opted in to the Employee Verification Programme.\r\nValue can only be changed by its dedicated API end point." + { + "description": "The Id of the Employee you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Update Photo", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/{id}/rehire": { + "get": { + "description": "If an employee has left and you want to rehire him/her, then this method will create a copy of the employee record but with a new payroll code", + "operationId": "ReHireEmployee", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "evcId": { - "type": "string", - "description": "If set then this will be used as the Employer ID sent to EVC in place of the standard EmployerId.", - "format": "uuid", - "nullable": true + { + "description": "The Id of the Employee you want to rehire.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "Created" + } + }, + "summary": "Rehire an Employee", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/{id}/{taxYear}/minimum-wage": { + "get": { + "description": "Calculates the National Minimum Wage for this employee for the given TaxYear and based on\r\ntheir age at the given date", + "operationId": "MinimumWageEmployee", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "holidayAccrualBasis": { - "$ref": "#/components/schemas/HolidayAccrual" + { + "description": "The Employee Id.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "holidayAccrualDefaultRateType": { - "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + { + "description": "The TaxYear", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "mfaEnabled": { - "type": "boolean", - "description": "if set to true requires all users to setup MFA\r\nsupport queries" + { + "description": "The date for which we should calculate the employees age, for not provided we'll use today's date.", + "in": "query", + "name": "date", + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "double", + "type": "number" + } + } + }, + "description": "Success" + } + }, + "summary": "Minimum Wage", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/employees/{ordinal}/{periodNumber}/{taxYear}/{payPeriod}/supplementary": { + "get": { + "operationId": "GetEmployeesForSupplementaryPayRunEmployee", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "departmentJournalOverridesEnabled": { - "type": "boolean", - "description": "Enables the journal overrides for departments, if set to true." + { + "description": "The Period for which you want to get the employees for Pay Run.", + "in": "path", + "name": "ordinal", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "costCentreJournalOverridesEnabled": { - "type": "boolean", - "description": "Enables the journal overrides for cost centre, if set to true." + { + "description": "The Period for which you want to get the employees for Pay Run.", + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "settingsSortPayrollNumbersAlphanumerically": { - "type": "boolean", - "description": "Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied" + { + "description": "The TaxYear for which you want to get the employees for Pay Run.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "unauthorisedLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The Pay Period (i.e, Monthly, Weekly) for which you want to get employees for Pay Run.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "holidayLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The page number.", + "in": "query", + "name": "pageNum", + "schema": { + "format": "int32", + "type": "integer" + } }, - "sickLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The number of items per page.", + "in": "query", + "name": "pageSize", + "schema": { + "format": "int32", + "type": "integer" + } }, - "parentalLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The option to filter on a search term.", + "in": "query", + "name": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeeSupplementaryPayRunResponse" + } + } + }, + "description": "Success" }, - "bereavementLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.EmployerSettingsRequest": { - "type": "object", - "properties": { - "allowNegativePay": { - "type": "boolean" - }, - "manualStatutoryPayLinesEnabled": { - "type": "boolean" - }, - "mergeMatchingNominalsEnabled": { - "type": "boolean" - }, - "autoCalcBackPayForNewStarters": { - "type": "boolean" + "summary": "Get List of Employees for Supplementary PayRun", + "tags": [ + "Employee" + ] + } + }, + "/employers/{employerId}/external-data": { + "get": { + "description": "Returns a list of External Data Providers and indicates which the Employer has successfully authenticated with.", + "operationId": "ListExternalData", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ExternalDataProvider" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "payCodeValidationEnabled": { - "type": "boolean" + "404": { + "description": "Not Found" + } + }, + "summary": "List Providers", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/create-stackone-session-token": { + "post": { + "description": "Return a session token from the StackOne client to connect to StackOne.", + "operationId": "CreateStackOneSessionTokenExternalData", + "parameters": [ + { + "description": "The Id of the employer in the external data provider", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "calculateEffectiveDateSalaryChanges": { - "type": "boolean" + { + "description": "A list of category for the premium connection", + "in": "query", + "name": "categories", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "Success" + } + }, + "summary": "Get StackOne session token", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/authorize": { + "get": { + "description": "For ExternalDataProviders with an AuthScheme of OAuth1 or OAuth2.\r\nReturns a Url to redirect a user to in order to start the authorization process with the given ExternalDataProvider.\r\nOur API handles the response from the OAuth provider and processes it to obtain a token.\r\nThe user is then sent to the URL specified.", + "operationId": "AuthorizeExternalData", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "groupPayLinesEnabled": { - "type": "boolean", - "description": "A flag to indicate whether paylines should be grouped. The grouping is done based on the following PayLine properties: Rate, Multiplier, Code, Description and RoleId" + { + "description": "The Id of the ExternalDataProvider you want to authorize with.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "contractedWeeks": { - "type": "number", - "description": "The amount of weeks an employee works, utilise for employees who aren't working full time.\r\nThis value is the default which can be inherited when creating/updating a WorkingPattern.", - "format": "double" + { + "description": "The URL to send the user to once the process is complete.", + "in": "query", + "name": "returnUrl", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Authorization Url", + "tags": [ + "ExternalData" + ] + }, + "put": { + "description": "For ExternalDataProviders with an AuthScheme of Basic.\r\nSets the username and password for the service.", + "operationId": "SetCredentialsExternalData", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "fullTimeContractedWeeks": { - "type": "number", - "description": "The amount of weeks an employee works (Full Time).\r\nThis value is the default which can be inherited when creating/updating a WorkingPattern.", - "format": "double" + { + "description": "The Id of the ExternalDataProvider you want to authorize with.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "fullTimeContractedHours": { - "type": "number", - "description": "The amount of hours an employee works (Full Time).\r\nThis value is the default which can be inherited when creating/updating a WorkingPattern.", - "format": "double" + { + "description": "The username for the ExternalDataProvider.", + "in": "query", + "name": "username", + "schema": { + "type": "string" + } }, - "disabledPayRunWarningsList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayRunEntryWarningType" + { + "description": "The password for the ExternalDataProvider.", + "in": "query", + "name": "password", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/StringStringKeyValuePair" + }, + "type": "array" + } }, - "description": "Pay run warnings that the user has opted to ignore.", - "nullable": true - }, - "journalCsvFormat": { - "$ref": "#/components/schemas/JournalCsvFormat" + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/StringStringKeyValuePair" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/StringStringKeyValuePair" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/StringStringKeyValuePair" + }, + "type": "array" + } + } }, - "preferAsyncPayrunApiCalls": { - "type": "boolean", - "description": "This setting is only available temporarily and is only setable by users with access to beta features enabled.\r\nIf set to true the the web applicaiton will use new async API calls for managing payruns" + "description": "Any additional data that is needed (optional)" + }, + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Set Credentials", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/companies": { + "get": { + "description": "Return a list of companies from the external data provider", + "operationId": "CompaniesExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "nominalMappingsEnabled": { - "type": "boolean", - "description": "Enables the nominal mappings(Custom Codes,System Codes,Control Codes,Employer Codes) for the employer, if set to true." + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ExternalDataCompany" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List Companies", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/config": { + "get": { + "description": "Returns any additional configuration data for the connection to the ExternalDataProvider.", + "operationId": "GetConfigDataExternalData", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "sortPayrollNumbersAlphanumerically": { - "type": "boolean", - "description": "Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied" + { + "description": "The Id of the ExternalDataProvider you want configuration data for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get Config Data", + "tags": [ + "ExternalData" + ] }, - "Contract.EmployerSettingsResponse": { - "type": "object", - "properties": { - "allowNegativePay": { - "type": "boolean" - }, - "manualStatutoryPayLinesEnabled": { - "type": "boolean" - }, - "mergeMatchingNominalsEnabled": { - "type": "boolean" - }, - "autoCalcBackPayForNewStarters": { - "type": "boolean" - }, - "payCodeValidationEnabled": { - "type": "boolean" - }, - "calculateEffectiveDateSalaryChanges": { - "type": "boolean" - }, - "groupPayLinesEnabled": { - "type": "boolean", - "description": "A flag to indicate whether paylines should be grouped. The grouping is done based on the following PayLine properties: Rate, Multiplier, Code, Description and RoleId" - }, - "contractedWeeks": { - "type": "number", - "description": "The amount of weeks an employee works, utilise for employees who aren't working full time.\r\nThis value is the default which can be inherited when creating/updating a WorkingPattern.", - "format": "double" - }, - "fullTimeContractedWeeks": { - "type": "number", - "description": "The amount of weeks an employee works (Full Time).\r\nThis value is the default which can be inherited when creating/updating a WorkingPattern.", - "format": "double" - }, - "fullTimeContractedHours": { - "type": "number", - "description": "The amount of hours an employee works (Full Time).\r\nThis value is the default which can be inherited when creating/updating a WorkingPattern.", - "format": "double" - }, - "disabledPayRunWarningsBitmask": { - "type": "integer", - "format": "int32" + "put": { + "description": "Sets the additional configuration data for the connection to the ExternalDataProvider.\r\nOnly the value set in the userData field is updated", + "operationId": "SetConfigDataExternalData", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "disabledPayRunWarningsList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayRunEntryWarningType" + { + "description": "The Id of the ExternalDataProvider you want configuration data for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": {} }, - "description": "Pay run warnings that the user has opted to ignore.", - "nullable": true - }, - "journalCsvFormat": { - "$ref": "#/components/schemas/JournalCsvFormat" - }, - "preferAsyncPayrunApiCalls": { - "type": "boolean", - "description": "This setting is only available temporarily and is only setable by users with access to beta features enabled.\r\nIf set to true the the web applicaiton will use new async API calls for managing payruns" - }, - "nominalMappingsEnabled": { - "type": "boolean", - "description": "Enables the nominal mappings(Custom Codes,System Codes,Control Codes,Employer Codes) for the employer, if set to true." - }, - "sortPayrollNumbersAlphanumerically": { - "type": "boolean", - "description": "Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied" + "application/json": { + "schema": {} + }, + "application/json-patch+json": { + "schema": {} + }, + "text/json": { + "schema": {} + } } }, - "additionalProperties": false - }, - "Contract.EmploymentDetailsRequest": { - "required": [ - "payrollCode" - ], - "type": "object", - "properties": { - "cis": { - "$ref": "#/components/schemas/Contract.CisDetailsRequest" - }, - "department": { - "$ref": "#/components/schemas/Contract.DepartmentRequest" - }, - "cisSubContractor": { - "type": "boolean", - "description": "Set to True if this Employee is a CIS Subcontractor. The ```Cis``` property contains further information" - }, - "payrollCode": { - "maxLength": 35, - "minLength": 1, - "type": "string", - "description": "The Employees Payroll Code. Must be unique within the Employer." - }, - "jobTitle": { - "maxLength": 120, - "type": "string", - "description": "Job Title of Primary role of the Employee", - "nullable": true - }, - "workplacePostcode": { - "maxLength": 10, - "type": "string", - "description": "Set the workplace postcode, ensuring it is no longer than 10 characters.", - "nullable": true - }, - "onHold": { - "type": "boolean", - "description": "Set to true to temporarily exclude the employee from payruns" - }, - "onFurlough": { - "type": "boolean", - "description": "Set to true if the employee is on furlough." - }, - "furloughStart": { - "type": "string", - "description": "Furlough Start Date.", - "format": "date", - "nullable": true - }, - "furloughEnd": { - "type": "string", - "description": "Furlough End Date.", - "format": "date", - "nullable": true - }, - "furloughCalculationBasis": { - "$ref": "#/components/schemas/FurloughCalculationBasis" - }, - "furloughCalculationBasisAmount": { - "type": "number", - "format": "double" - }, - "partialFurlough": { - "type": "boolean", - "description": "Set to true if the employee is partially furloughed." - }, - "furloughHoursNormallyWorked": { - "type": "number", - "format": "double" - }, - "furloughHoursOnFurlough": { - "type": "number", - "format": "double" - }, - "isApprentice": { - "type": "boolean", - "description": "Set to True if this Employee is an apprentice. This affects the calculations for National Minimum Wage" - }, - "apprenticeshipStartDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "apprenticeshipEndDate": { - "type": "string", - "format": "date", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "Success" + } + }, + "summary": "Set Config Data", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/contributions/{taxYear}/{payPeriod}/{periodNumber}": { + "get": { + "description": "Returns a CSV file containing contributions for the specified payrun in a format specific to the ExternalDataProvider", + "operationId": "PensionContributionsCsvExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "workingPattern": { - "type": "string", - "description": "Used when calculating payments for Leave.\r\nIf null then the default Working Pattern is used", - "format": "uuid", - "nullable": true + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "forcePreviousPayrollCode": { - "maxLength": 35, - "type": "string", - "description": "If this property has a non-empty value then a change of Payroll code will be declared on the next FPS.", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "starterDetails": { - "$ref": "#/components/schemas/Contract.StarterDetails" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "directorshipDetails": { - "$ref": "#/components/schemas/Contract.DirectorshipDetails" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "leaverDetails": { - "$ref": "#/components/schemas/Contract.LeaverDetails" + { + "description": "The Id of the Pension Scheme you want a file for.", + "in": "query", + "name": "schemeId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "roles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.EmployeeRoleItem" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } }, - "description": "List of Roles held by Employee", - "nullable": true - }, - "isWorkingInFreePort": { - "type": "boolean", - "description": "Flag indicating the employee is employed in a Freeport" - }, - "isWorkingInInvestmentZone": { - "type": "boolean", - "description": "Flag indicating the employee is employed in an Investment Zone" + "description": "Success" + } + }, + "summary": "Contributions CSV File", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/disconnect": { + "get": { + "description": "Disconnect from the external provider and revoke any OAuth token that has been received.", + "operationId": "DisconnectExternalData", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "veteranDetails": { - "$ref": "#/components/schemas/Contract.VeteranDetails" + { + "description": "The Id of the ExternalDataProvider you want to disconnect from.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Disconnect", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/employees": { + "get": { + "description": "Return a list of ExternalEmployeeMapping for Employees in the external data provider.\r\nThe metadata of the Item contains a field called externalId. This can be used to retrieve the full employee record.", + "operationId": "EmployeesExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "continuousEmploymentDate": { - "type": "string", - "description": "Date of continuous employment", - "format": "date", - "nullable": true + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "List Employees", + "tags": [ + "ExternalData" + ] }, - "Contract.EmploymentDetailsResponse": { - "required": [ - "payrollCode" - ], - "type": "object", - "properties": { - "cis": { - "$ref": "#/components/schemas/Contract.CisDetailsResponse" - }, - "department": { - "$ref": "#/components/schemas/Contract.DepartmentResponse" - }, - "includeSecondedInfoOnStarter": { - "type": "boolean" - }, - "cisSubContractor": { - "type": "boolean", - "description": "Set to True if this Employee is a CIS Subcontractor. The ```Cis``` property contains further information" - }, - "payrollCode": { - "maxLength": 35, - "minLength": 1, - "type": "string", - "description": "The Employees Payroll Code. Must be unique within the Employer." - }, - "jobTitle": { - "maxLength": 120, - "type": "string", - "description": "Job Title of Primary role of the Employee", - "nullable": true - }, - "workplacePostcode": { - "maxLength": 10, - "type": "string", - "description": "Set the workplace postcode, ensuring it is no longer than 10 characters.", - "nullable": true - }, - "onHold": { - "type": "boolean", - "description": "Set to true to temporarily exclude the employee from payruns" - }, - "onFurlough": { - "type": "boolean", - "description": "Set to true if the employee is on furlough." - }, - "furloughStart": { - "type": "string", - "description": "Furlough Start Date.", - "format": "date", - "nullable": true - }, - "furloughEnd": { - "type": "string", - "description": "Furlough End Date.", - "format": "date", - "nullable": true - }, - "furloughCalculationBasis": { - "$ref": "#/components/schemas/FurloughCalculationBasis" - }, - "furloughCalculationBasisAmount": { - "type": "number", - "format": "double" - }, - "partialFurlough": { - "type": "boolean", - "description": "Set to true if the employee is partially furloughed." - }, - "furloughHoursNormallyWorked": { - "type": "number", - "format": "double" - }, - "furloughHoursOnFurlough": { - "type": "number", - "format": "double" - }, - "isApprentice": { - "type": "boolean", - "description": "Set to True if this Employee is an apprentice. This affects the calculations for National Minimum Wage" - }, - "apprenticeshipStartDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "apprenticeshipEndDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "workingPattern": { - "type": "string", - "description": "Used when calculating payments for Leave.\r\nIf null then the default Working Pattern is used", - "format": "uuid", - "nullable": true - }, - "forcePreviousPayrollCode": { - "maxLength": 35, - "type": "string", - "description": "If this property has a non-empty value then a change of Payroll code will be declared on the next FPS.", - "nullable": true - }, - "starterDetails": { - "$ref": "#/components/schemas/Contract.StarterDetails" - }, - "directorshipDetails": { - "$ref": "#/components/schemas/Contract.DirectorshipDetails" - }, - "leaverDetails": { - "$ref": "#/components/schemas/Contract.LeaverDetails" + "post": { + "description": "Import Employees from the external data provider.", + "operationId": "ImportEmployeesExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "roles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.EmployeeRoleItem" + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } }, - "description": "List of Roles held by Employee", - "nullable": true + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } }, - "isWorkingInFreePort": { - "type": "boolean", - "description": "Flag indicating the employee is employed in a Freeport" + "description": "The externalIds to import" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "isWorkingInInvestmentZone": { - "type": "boolean", - "description": "Flag indicating the employee is employed in an Investment Zone" + "409": { + "description": "Conflict" + } + }, + "summary": "Import Employees", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/employees/i/sync-all": { + "get": { + "description": "Syncs data from the ExternalDataProvider to update all mapped employees", + "operationId": "SyncAllEmployeesExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "veteranDetails": { - "$ref": "#/components/schemas/Contract.VeteranDetails" + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "continuousEmploymentDate": { - "type": "string", - "description": "Date of continuous employment", - "format": "date", - "nullable": true + "409": { + "description": "Conflict" } }, - "additionalProperties": false - }, - "Contract.ExternalDataCompanyRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true + "summary": "Sync Employees", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/employees/push": { + "put": { + "description": "Push employees to the ExternalDataProvider.", + "operationId": "PushEmployeesExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "schemeName": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.ExternalDataCompanyResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true + "summary": "Push Employees", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/employees/{employeeId}": { + "get": { + "description": "Return an ExternalEmployeeMapping for the specified Employee from the external data provider", + "operationId": "EmployeeExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "name": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "schemeName": { - "type": "string", - "nullable": true + { + "description": "The Id of the employee in the external data provider", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalEmployeeMapping" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get Employee", + "tags": [ + "ExternalData" + ] }, - "Contract.FpsFields": { - "type": "object", - "properties": { - "offPayrollWorker": { - "type": "boolean" - }, - "irregularPaymentPattern": { - "type": "boolean", - "description": "True if employee is currently on an irregular payment patter" - }, - "nonIndividual": { - "type": "boolean", - "description": "True if Employee's payments are being made to a body (eg, trustee, corporate organisation or personal representative)" + "put": { + "description": "Update an ExternalEmployeeMapping to map/unmap/import/ignore an employee from an external data provider", + "operationId": "UpdateEmployeeExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "excludeFromRtiSubmissions": { - "type": "boolean", - "description": "True if Employee is excluded from RTI submissions" + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "hoursNormallyWorked": { - "$ref": "#/components/schemas/HoursNormallyWorked" + { + "description": "The Id of the employee in the external data provider", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ExternalEmployeeMapping" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalEmployeeMapping" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/ExternalEmployeeMapping" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ExternalEmployeeMapping" + } + } } }, - "additionalProperties": false - }, - "Contract.HmrcDetailsRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "officeNumber": { - "type": "string", - "nullable": true - }, - "payeReference": { - "type": "string", - "nullable": true - }, - "accountsOfficeReference": { - "type": "string", - "nullable": true - }, - "econ": { - "type": "string", - "nullable": true - }, - "utr": { - "type": "string", - "nullable": true - }, - "coTax": { - "type": "string", - "nullable": true - }, - "employmentAllowance": { - "type": "boolean" - }, - "employmentAllowanceMaxClaim": { - "type": "number", - "description": "You might reduce this from the default if you've made/are making a claim in another system", - "format": "double" - }, - "smallEmployersRelief": { - "type": "boolean" - }, - "apprenticeshipLevy": { - "type": "boolean" - }, - "apprenticeshipLevyAllowance": { - "type": "number", - "format": "double" - }, - "quarterlyPaymentSchedule": { - "type": "boolean", - "description": "Set to true if the employer pays HMRC on a quarterly schedule.\r\nA value of false implies a monthly schedule.\r\nWarning: Changing this value after starting PayRuns will\r\ndelete any existing payments or adjustments you may have entered." - }, - "includeEmploymentAllowanceOnMonthlyJournal": { - "type": "boolean", - "description": "If the employer is not on a QuarterlyPaymentSchedule\r\nand is claiming EmploymentAllowance, then set this to true to include a line for\r\nEmployment Allowance on the journal for the monthly schedule." - }, - "carryForwardUnpaidLiabilities": { - "type": "boolean", - "description": "If set to true then any unpaid amounts from previous periods will be brought forward\r\nto work out the liability for the current period.\r\nYou'd set this to false if you don't want to track payments." - }, - "paymentDateRule": { - "$ref": "#/components/schemas/PaymentDateRule" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalEmployeeMapping" + } + } + }, + "description": "Success" }, - "paymentDateDayOfMonth": { - "type": "integer", - "format": "int32", - "nullable": true + "409": { + "description": "Conflict" } }, - "additionalProperties": false - }, - "Contract.HmrcDetailsResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "officeNumber": { - "type": "string", - "nullable": true - }, - "payeReference": { - "type": "string", - "nullable": true - }, - "accountsOfficeReference": { - "type": "string", - "nullable": true - }, - "econ": { - "type": "string", - "nullable": true - }, - "utr": { - "type": "string", - "nullable": true - }, - "coTax": { - "type": "string", - "nullable": true - }, - "employmentAllowance": { - "type": "boolean" - }, - "employmentAllowanceMaxClaim": { - "type": "number", - "description": "You might reduce this from the default if you've made/are making a claim in another system", - "format": "double" - }, - "smallEmployersRelief": { - "type": "boolean" - }, - "apprenticeshipLevy": { - "type": "boolean" - }, - "apprenticeshipLevyAllowance": { - "type": "number", - "format": "double" - }, - "quarterlyPaymentSchedule": { - "type": "boolean", - "description": "Set to true if the employer pays HMRC on a quarterly schedule.\r\nA value of false implies a monthly schedule.\r\nWarning: Changing this value after starting PayRuns will\r\ndelete any existing payments or adjustments you may have entered." - }, - "includeEmploymentAllowanceOnMonthlyJournal": { - "type": "boolean", - "description": "If the employer is not on a QuarterlyPaymentSchedule\r\nand is claiming EmploymentAllowance, then set this to true to include a line for\r\nEmployment Allowance on the journal for the monthly schedule." - }, - "carryForwardUnpaidLiabilities": { - "type": "boolean", - "description": "If set to true then any unpaid amounts from previous periods will be brought forward\r\nto work out the liability for the current period.\r\nYou'd set this to false if you don't want to track payments." + "summary": "Update Employee", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/employees/{employeeId}/logs": { + "get": { + "description": "Return a list of changes made locally to this employee based on changes in the external data provider", + "operationId": "EmployeeLogsExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "paymentDateRule": { - "$ref": "#/components/schemas/PaymentDateRule" + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "paymentDateDayOfMonth": { - "type": "integer", - "format": "int32", - "nullable": true + { + "description": "The Id of the employee in the external data provider", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.HolidayEntitlementRequest": { - "required": [ - "baseHolidayEntitlement", - "effectiveDate" ], - "type": "object", - "properties": { - "effectiveDate": { - "type": "string", - "description": "PaySpine Holiday Entitlement Effective Date", - "format": "date" - }, - "baseHolidayEntitlement": { - "type": "number", - "description": "PaySpine Base Holiday Entitlement", - "format": "double" - }, - "yearsServiceEntitlementBasis": { - "$ref": "#/components/schemas/PaySpineYearsServiceEntitlementBasis" - }, - "yearsServiceEntitlements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.YearsServiceEntitlementRequest" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/LogEntry" + }, + "type": "array" + } + } }, - "description": "Holiday Entitlement Years Service Entitlements", - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.HolidayEntitlementResponse": { - "required": [ - "baseHolidayEntitlement", - "effectiveDate" - ], - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Unique identifier for the Holiday Entitlement", - "format": "uuid" - }, - "effectiveDate": { - "type": "string", - "description": "PaySpine Holiday Entitlement Effective Date", - "format": "date" - }, - "baseHolidayEntitlement": { - "type": "number", - "description": "PaySpine Base Holiday Entitlement", - "format": "double" + "summary": "Get Employee Logs", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/employees/{employeeId}/sync": { + "get": { + "description": "Syncs data from the ExternalDataProvider to update the specified mapped employee.\r\nAny changes made as a result of the sync are show in the metadata.logs property.", + "operationId": "SyncEmployeeExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "yearsServiceEntitlementBasis": { - "$ref": "#/components/schemas/PaySpineYearsServiceEntitlementBasis" + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "yearsServiceEntitlements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.YearsServiceEntitlementResponse" - }, - "description": "Holiday Entitlement Years Service Entitlements", - "nullable": true + { + "description": "The Id of the employee in the external data provider", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.HolidayEntitlementUpdateRequest": { - "required": [ - "baseHolidayEntitlement", - "effectiveDate" ], - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Unique identifier for the PaySpine Holiday Entitlement.", - "format": "uuid" - }, - "effectiveDate": { - "type": "string", - "description": "PaySpine Holiday Entitlement Effective Date", - "format": "date" - }, - "baseHolidayEntitlement": { - "type": "number", - "description": "PaySpine Base Holiday Entitlement", - "format": "double" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Item" + } + } + }, + "description": "Success" }, - "yearsServiceEntitlementBasis": { - "$ref": "#/components/schemas/PaySpineYearsServiceEntitlementBasis" + "409": { + "description": "Conflict" + } + }, + "summary": "Sync Employee", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/nominals": { + "get": { + "description": "Return a list of Nominal Codes from the external data provider", + "operationId": "NominalCodesExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "yearsServiceEntitlements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.YearsServiceEntitlementUpdateRequest" + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "description": "Holiday Entitlement Years Service Entitlements", - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.HolidaySchemeRequest": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "minLength": 1, - "type": "string", - "description": "Holiday scheme name" - }, - "averageCalculationWeeks": { - "type": "integer", - "description": "The number of weeks that the average holiday pay calculation is to be calculated over (Default 52)", - "format": "int32" - }, - "useOnlyPaidWeeks": { - "type": "boolean", - "description": "If to go back further than the stated no of weeks for calculation if there are weeks where the employee has not been paid. (Default- True)" - }, - "ignoreSxp": { - "type": "boolean", - "description": "Option to ignore weeks where SXP payments have been paid. The calculation will then go back like above until the stated number of weeks are included in the calculation. (Default -True)." - }, - "calculationDurationUnit": { - "$ref": "#/components/schemas/HolidaySchemeDurationType" - }, - "useNiPay": { - "type": "boolean", - "description": "If use National insurance gross taxable pay. (Default - True)." - }, - "useWorkingPattern": { - "type": "boolean", - "description": "If use the weekly hours or days as per their working pattern as the divisor for the average holiday rate." + "summary": "List Nominal Codes", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/p11d": { + "post": { + "description": "Pushes a P11D for the given employee to the ExternalDataProvider.", + "operationId": "PushP11DExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "payCodeSetForPayId": { - "type": "string", - "description": "the Paycode set that they want to use for the Values to enable the calculation.", - "format": "uuid", - "nullable": true + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payCodeSetForHoursId": { - "type": "string", - "description": "the Paycode set that they want to use for the Hours to enable the calculation.", - "format": "uuid", - "nullable": true + { + "in": "query", + "name": "employeeId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "useFallbackRate": { - "type": "boolean", - "description": "Indicates to use employee base hourly rate where the calculated average hourly rate is less" + { + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } } - }, - "additionalProperties": false - }, - "Contract.HolidaySchemeResponse": { - "required": [ - "name" ], - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Holiday scheme identifier", - "format": "uuid" - }, - "name": { - "minLength": 1, - "type": "string", - "description": "Holiday scheme name" - }, - "averageCalculationWeeks": { - "type": "integer", - "description": "The number of weeks that the average holiday pay calculation is to be calculated over (Default 52)", - "format": "int32" - }, - "useOnlyPaidWeeks": { - "type": "boolean", - "description": "If to go back further than the stated no of weeks for calculation if there are weeks where the employee has not been paid. (Default- True)" - }, - "ignoreSxp": { - "type": "boolean", - "description": "Option to ignore weeks where SXP payments have been paid. The calculation will then go back like above until the stated number of weeks are included in the calculation. (Default -True)." - }, - "calculationDurationUnit": { - "$ref": "#/components/schemas/HolidaySchemeDurationType" - }, - "useNiPay": { - "type": "boolean", - "description": "If use National insurance gross taxable pay. (Default - True)." - }, - "useWorkingPattern": { - "type": "boolean", - "description": "If use the weekly hours or days as per their working pattern as the divisor for the average holiday rate." - }, - "payCodeSetForPayId": { - "type": "string", - "description": "the Paycode set that they want to use for the Values to enable the calculation.", - "format": "uuid", - "nullable": true - }, - "payCodeSetForHoursId": { - "type": "string", - "description": "the Paycode set that they want to use for the Hours to enable the calculation.", - "format": "uuid", - "nullable": true - }, - "useFallbackRate": { - "type": "boolean", - "description": "Indicates to use employee base hourly rate where the calculated average hourly rate is less" + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.JobErrorResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the job error.", - "format": "uuid" + "summary": "Push P11D", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/p11ds": { + "post": { + "description": "Pushes all P11Ds for the given TaxYear to the ExternalDataProvider.", + "operationId": "PushP11DsExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "jobId": { - "type": "string", - "description": "Job public Id", - "format": "uuid" + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "errorMessage": { - "type": "string", - "description": "Error Message", - "nullable": true + { + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Push P11Ds", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/p45": { + "post": { + "description": "Push a P45 to the ExternalDataProvider.", + "operationId": "PushP45ExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "errorType": { - "type": "string", - "description": "Type of job error", - "nullable": true + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "createdDate": { - "type": "string", - "description": "Date the job error was created", - "format": "date" + { + "in": "query", + "name": "employeeId", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.JobResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Job public Id.", - "format": "uuid" - }, - "employerId": { - "type": "string", - "description": "Employer public Id.", - "format": "uuid" + "summary": "Push P45", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/p45s": { + "post": { + "description": "Push P45s to the ExternalDataProvider.", + "operationId": "PushP45sExternalData", + "parameters": [ + { + "description": "The Id of the External Provider to which you want to send P45s", + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "employerName": { - "type": "string", - "description": "Employer name.", - "nullable": true + { + "description": "The Id of the Employer for which you want to send P45s", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "type": { - "$ref": "#/components/schemas/JobType" + { + "description": "The Pay Period (i.e, Monthly, Weekly) for which you want to send P45s", + "in": "query", + "name": "payPeriod", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "name": { - "type": "string", - "description": "The Job name, e.g. uploaded file for Import, or report display name for Report", - "nullable": true + { + "description": "The Period (i.e, Tax Month, Tax Week) for which you want to send P45s", + "in": "query", + "name": "periodNumber", + "schema": { + "format": "int32", + "type": "integer" + } }, - "outputFormat": { - "type": "string", - "description": "The Job output format, e.g. json/csv/pdf for Report, or something else for other Job types.", - "nullable": true + { + "description": "The Tax Year for which you want to send P45s", + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "status": { - "$ref": "#/components/schemas/JobStatus" + { + "description": "Indicates whether it uses first, second, third (etc.) PaySchedule for the PayPeriod for which you want to send P45s", + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Success" }, - "executionStartTime": { - "type": "string", - "description": "The Job excution start time.", - "format": "date", - "nullable": true + "400": { + "description": "Bad Request" }, - "timeInQueue": { - "type": "integer", - "description": "The time the Job spent in the queue before execution in seconds.", - "format": "int32", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Push P45s", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/p60": { + "post": { + "description": "Pushes a P60 to the ExternalDataProvider.", + "operationId": "PushP60ExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "executionTime": { - "type": "integer", - "description": "The time it took the Job to execute in seconds.", - "format": "int32", - "nullable": true + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "result": { - "$ref": "#/components/schemas/Contract.JobResultResponse" + { + "in": "query", + "name": "employeeId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "createdDate": { - "type": "string", - "description": "Job Created date.", - "format": "date" + { + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Push P60", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/p60s": { + "post": { + "description": "Pushes P60s to the ExternalDataProvider for all employees paid for a given tax year, provided they were paid during that tax year.", + "operationId": "PushP60sExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "updatedDate": { - "type": "string", - "description": "Job Updated date where applicable.", - "format": "date", - "nullable": true + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "requestedByName": { - "type": "string", - "description": "The name of the user that requested this job", - "nullable": true + { + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } } - }, - "additionalProperties": false - }, - "Contract.JobResultFileResponse": { - "type": "object", - "properties": { - "fileName": { - "type": "string", - "description": "Result File name", - "nullable": true + ], + "responses": { + "200": { + "description": "Success" }, - "uri": { - "type": "string", - "description": "Api method URI that can be used to download the result file", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false - }, - "Contract.JobResultResponse": { - "type": "object", - "properties": { - "file": { - "$ref": "#/components/schemas/Contract.JobResultFileResponse" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "description": "Job result metadata, e.g. Employee Import stats", - "nullable": true + "summary": "Push P60s", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/payslips": { + "post": { + "description": "Push payslips to the ExternalDataProvider.", + "operationId": "PushPayslipsExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "errors": { - "type": "array", - "items": { + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", "type": "string" - }, - "description": "Job execution's errors.", - "nullable": true - } - }, - "additionalProperties": false - }, - "Contract.JournalTemplateRequest": { - "type": "object", - "properties": { - "header": { - "type": "string", - "description": "Header of Journal Template", - "nullable": true + } }, - "content": { - "type": "string", - "description": "Content of Journal Template", - "nullable": true + { + "in": "query", + "name": "payPeriod", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "useColumnHeaders": { - "type": "boolean", - "description": "Indicates whether content is empty or not" - } - }, - "additionalProperties": false - }, - "Contract.JournalTemplateResponse": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Journal Template identifier", - "format": "uuid" + { + "in": "query", + "name": "periodNumber", + "schema": { + "format": "int32", + "type": "integer" + } }, - "header": { - "type": "string", - "description": "Header of Journal Template", - "nullable": true + { + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "content": { - "type": "string", - "description": "Content of Journal Template", - "nullable": true + { + "in": "query", + "name": "force", + "schema": { + "type": "boolean" + } }, - "useColumnHeaders": { - "type": "boolean", - "description": "Indicates whether content is empty or not" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "employeeId", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.JournalTokenRequest": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/JournalTokenType" + "summary": "Push Payslips", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/pension-letter": { + "post": { + "description": "Pushes a Pension Letter for the given employee to the ExternalDataProvider.", + "operationId": "PushPensionLetterExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "name": { - "type": "string", - "description": "Name of Journal Tokens", - "nullable": true + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "description": { - "type": "string", - "description": "Description of Journal Tokens", - "nullable": true + { + "in": "query", + "name": "employeeId", + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "query", + "name": "assessmentId", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.JournalTokenResponse": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Journal Token identifier", - "format": "uuid" - }, - "type": { - "$ref": "#/components/schemas/JournalTokenType" - }, - "name": { - "type": "string", - "description": "Name of Journal Tokens", - "nullable": true + "summary": "Push Pension Letter", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/pension-letters": { + "post": { + "description": "Pushes a Pension Letters for the given employees to the ExternalDataProvider.", + "operationId": "PushPensionLettersExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "description": { - "type": "string", - "description": "Description of Journal Tokens", - "nullable": true + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.JournalTokenResponseItem": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" + "summary": "Push Pension Letters", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/time-and-attendance": { + "get": { + "description": "Return a list of PayOptionsImport representing Time and Attendance data from the specified ExternalDataProvider, for to specified date range", + "operationId": "TimeAndAttendanceExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "name": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "metadata": { - "nullable": true + { + "in": "query", + "name": "from", + "schema": { + "format": "date-time", + "type": "string" + } }, - "url": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "to", + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayOptionsImport" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.LeaveImportRequest": { - "type": "object", - "properties": { - "payrollCode": { - "type": "string", - "description": "Payroll Code", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/LeaveType" - }, - "pay": { - "$ref": "#/components/schemas/LeavePayType" - }, - "openEndedAbsence": { - "type": "boolean", - "description": "Open Ended Absence" - }, - "from": { - "type": "string", - "description": "The first day of Leave.", - "format": "date", - "nullable": true - }, - "to": { - "type": "string", - "description": "The last day of Leave.", - "format": "date", - "nullable": true - }, - "historicLeaveRequiresProcessing": { - "type": "boolean", - "description": "Only used during the creation of historical SSP.\r\nWhen creating historical SSP, this will determine whether to pay that leave in the next PayRun." - }, - "averageWeeklyEarnings": { - "type": "number", - "description": "The employees average weekly earnings.", - "format": "double", - "nullable": true - }, - "automaticAWECalculation": { - "type": "boolean", - "description": "Automatic Average Weekly Earnings." - }, - "offsetPay": { - "type": "boolean", - "description": "Top-up pay to usual amongst (offsetting)" - }, - "calculationType": { - "$ref": "#/components/schemas/LeaveCalculationType" + "summary": "Get Time And Attendance Data", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/{taxYear}/{payPeriod}/{periodNumber}/journal": { + "post": { + "description": "Post a Journal for a payrun to the ExternalDataProvider\r\nA 200 response does not mean the journal was necessarily successfully posted.\r\nThe PayRunJournal is returned (without the Lines) so that you can inspect the status to determine success", + "operationId": "PostJournalExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "percentOfPay": { - "type": "number", - "description": "Only provided when the leave type is 'Sick' and the payment type is 'Custom'.", - "format": "double", - "nullable": true + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "strikeHoursToDeduct": { - "type": "number", - "description": "Only provided when the leave type is 'StrikeAction' and the calculation type is 'SpecifyHours'.", - "format": "double", - "nullable": true + { + "description": "To identify the PayRun", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "paySSPInAddition": { - "type": "boolean", - "description": "Only provided when the leave type is 'Sick' and the payment type is 'Custom'." + { + "description": "To identify the PayRun", + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "useAssumedPensionablePay": { - "type": "boolean", - "description": "Only provided when the leave type is 'Sick' and the payment type is 'Custom', 'Occupational Policy' or 'Statutory Pay'." + { + "description": "To identify the PayRun", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "assumedPensionablePay": { - "type": "number", - "description": "Assumed Pensionable Pay (APP) is an average figure, calculated as the average pay in the 3 months\r\n(or 12 weeks if weekly/fortnightly/fourweekly paid) before the absence", - "format": "double", - "nullable": true + { + "description": "Set to true if you want to force the journal to be posted even if it already has been", + "in": "query", + "name": "force", + "schema": { + "type": "boolean" + } }, - "automaticAPPCalculation": { - "type": "boolean", - "description": "If set to True then we'll automatically calculate the AssumedPensionablePay. \r\nSet it to false if you want to manually provide a figure that overrides our calculations" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunJournal" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.LeaverDetails": { - "type": "object", - "properties": { - "hasLeft": { - "type": "boolean" - }, - "leaveDate": { - "type": "string", - "format": "date", - "nullable": true + "summary": "Post Journal", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/{taxYear}/{payPeriod}/{periodNumber}/leave": { + "post": { + "description": "Sync Leave from the ExternalDataProvider for the specified PayRun.\r\nReturns a JSON object indicating how many Leaves have been created, updated or deleted, etc.", + "operationId": "SyncLeaveExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "isDeceased": { - "type": "boolean" + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "paymentAfterLeaving": { - "type": "boolean" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "p45Sent": { - "type": "boolean" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "payAccruedBalance": { - "type": "boolean", - "description": "If set to true then new PayLine will be added into the PayRunEntry to pay the accrued balance" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "paymentMethodAfterLeaving": { - "$ref": "#/components/schemas/PaymentMethodAfterLeaving" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false - }, - "Contract.LondonAllowanceRequest": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/LondonAllowanceType" - }, - "valueType": { - "$ref": "#/components/schemas/LondonAllowanceValueType" - }, - "value": { - "type": "number", - "description": "Value of London Allowance", - "format": "double" + ], + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.LondonAllowanceResponse": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/LondonAllowanceType" + "summary": "Sync Leave", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/external-data/{id}/{taxYear}/{payPeriod}/{periodNumber}/payments": { + "post": { + "description": "Post Payments for a payrun to the ExternalDataProvider\r\nA 200 response does not mean the payments were necessarily successfully posted.\r\nThe BankPaymentInstruction is returned (without the payments) so that you can inspect the status to determine success", + "operationId": "PostPaymentsExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "valueType": { - "$ref": "#/components/schemas/LondonAllowanceValueType" + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "value": { - "type": "number", - "description": "Value of London Allowance", - "format": "double" + { + "description": "To identify the PayRun", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "uniqueId": { - "type": "string", - "description": "London Allowance identifier", - "format": "uuid" - } - }, - "additionalProperties": false - }, - "Contract.NetOfOnCostsResponse": { - "type": "object", - "properties": { - "salary": { - "type": "number", - "format": "double" + { + "description": "To identify the PayRun", + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "holidayPay": { - "type": "number", - "format": "double" + { + "description": "To identify the PayRun", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "employersPensionContribution": { - "type": "number", - "format": "double" + { + "description": "Include payments for employees", + "in": "query", + "name": "incEmployees", + "schema": { + "type": "boolean" + } }, - "employeesPensionContribution": { - "type": "number", - "format": "double" + { + "description": "Include payments for HMRC (if any)", + "in": "query", + "name": "incHmrc", + "schema": { + "type": "boolean" + } }, - "employersNi": { - "type": "number", - "format": "double" + { + "description": "Include payments for Pension Providers (if any)", + "in": "query", + "name": "incPensions", + "schema": { + "type": "boolean" + } }, - "apprenticeshipLevy": { - "type": "number", - "format": "double" + { + "description": "Include any payment due as a result of AttachmentOrders (if any)", + "in": "query", + "name": "incAeos", + "schema": { + "type": "boolean" + } }, - "grossDailyRate": { - "type": "number", - "format": "double" + { + "description": "Include any payment due to Deductions that are set to be paid to a Payee (if any)", + "in": "query", + "name": "incDeductions", + "schema": { + "type": "boolean" + } }, - "totalFees": { - "type": "number", - "format": "double" + { + "description": "Set to true if you want to force the payments to be posted even if it already has been", + "in": "query", + "name": "force", + "schema": { + "type": "boolean" + } }, - "numberOfDays": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "simulation": { - "$ref": "#/components/schemas/Contract.NetOfOnCostsSimulationResponse" + { + "description": "Optional. If a value is provided then it'll be used in place of the payment date for the payment.", + "in": "query", + "name": "paymentDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "holInclusiveSimulation": { - "$ref": "#/components/schemas/Contract.NetOfOnCostsSimulationResponse" + { + "description": "Will indicate what version of the payrun will be the source for the payments. If left empty, will post full pay run payments.", + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BankPaymentInstruction" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.NetOfOnCostsSimulationResponse": { - "type": "object", - "properties": { - "grossPay": { - "type": "number", - "format": "double" - }, - "employeePension": { - "type": "number", - "format": "double" - }, - "taxDue": { - "type": "number", - "format": "double" - }, - "niDue": { - "type": "number", - "format": "double" + "summary": "Post Payments", + "tags": [ + "ExternalData" + ] + } + }, + "/employers/{employerId}/hmrcpayment/{taxYear}": { + "get": { + "description": "Lists all periods for which a payment is due to HMRC in the given TaxYear", + "operationId": "IndexHmrcPayment", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list HMRC Payments", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "netPay": { - "type": "number", - "format": "double", - "readOnly": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.OverseasEmployerDetails": { - "type": "object", - "properties": { - "overseasEmployer": { - "type": "boolean" - }, - "overseasSecondmentStatus": { - "$ref": "#/components/schemas/OverseasSecondmentStatus" + "summary": "List HmrcLiabilities", + "tags": [ + "HmrcPayment" + ] + } + }, + "/employers/{employerId}/hmrcpayment/{taxYear}/{periodEnding}": { + "get": { + "description": "Gets the HmrcLiability record for the period ending on the date specified.", + "operationId": "GetHmrcPayment", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "eeaCitizen": { - "type": "boolean" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "epm6Scheme": { - "type": "boolean" + { + "description": "The final date of the month or quarter that the HmrcLiability is for.", + "in": "path", + "name": "periodEnding", + "required": true, + "schema": { + "format": "date-time", + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.P11HistoryRequest": { - "type": "object", - "properties": { - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "periodNumber": { - "type": "integer", - "format": "int32" - }, - "niablePay": { - "type": "number", - "format": "double" - }, - "payDate": { - "type": "string", - "format": "date" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HmrcLiability" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get HmrcLiability", + "tags": [ + "HmrcPayment" + ] }, - "Contract.P11HistoryResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "periodNumber": { - "type": "integer", - "format": "int32" + "put": { + "description": "Updates the editable fields of a HmrcLiability (ie, Adjustment, CISDeductionsSuffered, etc)", + "operationId": "UpdateHmrcPayment", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "niablePay": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "payDate": { - "type": "string", - "format": "date" + { + "description": "The final date of the month or quarter that the HmrcLiability is for.", + "in": "path", + "name": "periodEnding", + "required": true, + "schema": { + "format": "date-time", + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.PartnerDetails": { - "type": "object", - "properties": { - "firstName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "initials": { - "maxLength": 30, - "type": "string", - "nullable": true - }, - "lastName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "niNumber": { - "maxLength": 15, - "type": "string", - "nullable": true + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/HmrcLiability" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/HmrcLiability" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/HmrcLiability" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/HmrcLiability" + } + } } }, - "additionalProperties": false - }, - "Contract.PayHistoryRequest": { - "type": "object", - "properties": { - "employeeId": { - "type": "string", - "description": "Employee unique Id", - "format": "uuid" - }, - "employeeRoleId": { - "type": "string", - "description": "Employee role unique Id", - "format": "uuid" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYearTypes" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriodTypes" - }, - "periodNumber": { - "type": "integer", - "description": "Tax Week or Tax Month number this PayRunEntry relates to", - "format": "int32" - }, - "payAmount": { - "type": "number", - "description": "monetary amount for given period, if not provided then 0", - "format": "double" - }, - "hours": { - "type": "number", - "description": "decimal amount of hours worked, if not provided then 0", - "format": "double" - }, - "isStatutoryPayOnly": { - "type": "boolean", - "description": "optional boolean flag, if the period only had SXP present" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HmrcLiability" + } + } + }, + "description": "Success" }, - "paymentDate": { - "type": "string", - "description": "The date payment was made for respective period", - "format": "date" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.PayHistoryResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Average Holiday Pay History identifier", - "format": "uuid" - }, - "employeeId": { - "type": "string", - "description": "Employee unique Id", - "format": "uuid" - }, - "employeeRoleId": { - "type": "string", - "description": "Employee role unique Id", - "format": "uuid" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYearTypes" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriodTypes" - }, - "periodNumber": { - "type": "integer", - "description": "Tax Week or Tax Month number this PayRunEntry relates to", - "format": "int32" + "summary": "Update HmrcLiability", + "tags": [ + "HmrcPayment" + ] + } + }, + "/employers/{employerId}/hmrcpayment/{taxYear}/{periodEnding}/bankpayment": { + "get": { + "description": "Returns a payments file for the HMRC payment that needs to be made", + "operationId": "BankPaymentHmrcPayment", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payAmount": { - "type": "number", - "description": "monetary amount for given period, if not provided then 0", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "hours": { - "type": "number", - "description": "decimal amount of hours worked, if not provided then 0", - "format": "double" + { + "in": "path", + "name": "periodEnding", + "required": true, + "schema": { + "format": "date-time", + "type": "string" + } }, - "isStatutoryPayOnly": { - "type": "boolean", - "description": "optional boolean flag, if the period only had SXP present" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "paymentDate": { - "type": "string", - "description": "The date payment was made for respective period", - "format": "date" + { + "in": "query", + "name": "bankHoliday", + "schema": { + "$ref": "#/components/schemas/BankHolidayCollection" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BankPaymentInstructionReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/BankPaymentInstructionReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.PayHistoryUpdateRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Average Holiday Pay History identifier", - "format": "uuid" - }, - "employeeId": { - "type": "string", - "description": "Employee unique Id", - "format": "uuid" - }, - "employeeRoleId": { - "type": "string", - "description": "Employee role unique Id", - "format": "uuid" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYearTypes" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriodTypes" - }, - "periodNumber": { - "type": "integer", - "description": "Tax Week or Tax Month number this PayRunEntry relates to", - "format": "int32" - }, - "payAmount": { - "type": "number", - "description": "monetary amount for given period, if not provided then 0", - "format": "double" - }, - "hours": { - "type": "number", - "description": "decimal amount of hours worked, if not provided then 0", - "format": "double" - }, - "isStatutoryPayOnly": { - "type": "boolean", - "description": "optional boolean flag, if the period only had SXP present" + "summary": "HMRC Bank Payment", + "tags": [ + "HmrcPayment" + ] + } + }, + "/employers/{employerId}/holidayscheme": { + "get": { + "operationId": "GetHolidayScheme", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.HolidaySchemeResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "paymentDate": { - "type": "string", - "description": "The date payment was made for respective period", - "format": "date" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Get holiday scheme", + "tags": [ + "HolidayScheme" + ] }, - "Contract.PayLineRequest": { - "type": "object", - "properties": { - "analysisCategoryCodesJson": { - "type": "string", - "description": "Analysis category id and analysiscategoryCode json", - "nullable": true - }, - "value": { - "type": "number", - "description": "The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used).\r\nIf the PayCode has a CalculationType other than FixedAmount then this field will be a percentage.\r\nIf the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated.", - "format": "double" - }, - "rate": { - "type": "number", - "description": "If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used", - "format": "double", - "nullable": true - }, - "multiplier": { - "type": "number", - "description": "If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours", - "format": "double", - "nullable": true - }, - "description": { - "maxLength": 100, - "type": "string", - "description": "A freeform description to accompany this line. It will be displayed on the payslip.", - "nullable": true - }, - "code": { - "type": "string", - "description": "The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition.", - "nullable": true - }, - "tags": { - "type": "array", - "items": { + "post": { + "operationId": "CreateHolidayScheme", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" + } }, - "nullable": true - }, - "childId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "isNetToGross": { - "type": "boolean", - "description": "If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target." - }, - "targetNetToGrossValue": { - "type": "number", - "description": "The orginal net fixed addition amount that is considered to be a take home pay target.", - "format": "double", - "nullable": true - }, - "netToGrossDiscrepancy": { - "type": "number", - "description": "The discrepancy between the targeted and the calculated grossed up value durig a net to gross calculation.", - "format": "double", - "nullable": true - }, - "effectiveFrom": { - "type": "string", - "description": "The date the payline starts being calculated in payrun", - "format": "date", - "nullable": true - }, - "effectiveTo": { - "type": "string", - "description": "The date the payline stops being calculated in payrun", - "format": "date", - "nullable": true - }, - "isAutoGeneratedBasicPayLine": { - "type": "boolean" - }, - "percentageOfEffectiveDays": { - "type": "number", - "description": "The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun", - "format": "double", - "nullable": true - }, - "totalWorkingDays": { - "type": "number", - "format": "double", - "nullable": true - }, - "autoAdjustForLeave": { - "type": "boolean", - "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun" - }, - "isAutomaticBackPay": { - "type": "boolean", - "description": "Automatically calculate backpay and add or modify the necessary pay lines for this addition/deduction when a pay run is created.\r\nApplicable only to employee level addition/deduction pay lines.\r\nIf set to false then you must manually handle the calculation and adding of backpay lines." - }, - "ignoreInitialBackPay": { - "type": "boolean", - "description": "Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology.\r\nIf set to false, the automatic backpay calculation will be performed on the first pay run." - }, - "contributesToBasicPay": { - "type": "boolean", - "description": "Indicates whether this PayLine contributes to the basic pay of the Employee." - }, - "calculateAsWhenPaid": { - "type": "boolean", - "description": "Indicates whether this pay line should be treated as When Paid rather than When Earned" - }, - "totalPaidDays": { - "type": "number", - "format": "double", - "nullable": true - }, - "roleId": { - "type": "string", - "description": "The employee role which is associated with this pay line.\r\nIf set to null, the pay line is not related with a role.", - "format": "uuid", - "nullable": true - }, - "earnedFrom": { - "type": "string", - "format": "date", - "nullable": true - }, - "earnedTo": { - "type": "string", - "format": "date", - "nullable": true - }, - "annualValue": { - "type": "number", - "description": "The original value from the PayLine before we modify it\r\nCurrently only used when CalculationType is set to FixedAnnualAmount\r\nso we can determine whether the payline value needs calculating or not\r\nTo recalculate set to null with annual amount recorded in Value", - "format": "double", - "nullable": true - }, - "department": { - "type": "string", - "description": "Department code which we want to override in payline", - "nullable": true - }, - "costCentre": { - "type": "string", - "description": "CostCentre code which we want to override in payline", - "nullable": true - }, - "departmentId": { - "type": "string", - "description": "Department uniqueId which we want to override in payline", - "format": "uuid", - "nullable": true - }, - "costCentreId": { - "type": "string", - "description": "CostCentre uniqueId which we want to override in payline", - "format": "uuid", - "nullable": true - }, - "analysisCategoriesCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PaylineAnalysisCategoriesCodes" + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" + } }, - "description": "List of analysiscategory id and analysiscategoryCode id", - "nullable": true - }, - "analysisCategoryCodeIds": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.HolidaySchemeResponse" + } + } }, - "description": "Array of analysiscategoryCode uniqueId", - "nullable": true + "description": "Created" }, - "paySpineId": { - "type": "string", - "description": "[readonly] The Id of the associated pay spine.", - "format": "uuid", - "nullable": true + "400": { + "description": "Bad Request" + } + }, + "summary": "Create holiday scheme", + "tags": [ + "HolidayScheme" + ] + } + }, + "/employers/{employerId}/holidayscheme/{id}": { + "delete": { + "operationId": "DeleteHolidayScheme", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "paySpineGradeId": { - "type": "string", - "description": "[readonly] The Id of the associated pay spine grade.", - "format": "uuid", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "spinalPointId": { - "type": "string", - "description": "[readonly] The Id of the associated spinal point.", - "format": "uuid", - "nullable": true + "400": { + "description": "Bad Request" }, - "londonAllowanceId": { - "type": "integer", - "description": "Used to set London allowance id for payline", - "format": "int32", - "nullable": true + "403": { + "description": "Forbidden" }, - "fullTimeAnnualValue": { - "type": "number", - "description": "Used to set Full Time Annual Value for payline", - "format": "double" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Delete holiday scheme", + "tags": [ + "HolidayScheme" + ] }, - "Contract.PayLineResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "attachmentOrderId": { - "type": "string", - "description": "[readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO", - "format": "uuid", - "nullable": true - }, - "pensionId": { - "type": "string", - "description": "[readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS", - "format": "uuid", - "nullable": true - }, - "leaveId": { - "type": "string", - "description": "[readonly] The Id of the associated Leave. Only included if the PayLine is a result of a Leave with Statutory pay", - "format": "uuid", - "nullable": true - }, - "loanId": { - "type": "string", - "description": "[readonly] The Id of the associated Loan, if any.", - "format": "uuid", - "nullable": true - }, - "leaveStatutoryDaysPaid": { - "type": "number", - "description": "[readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many days they've been paid for (based on their Working Pattern).", - "format": "double", - "nullable": true - }, - "leaveStatutoryWeeksPaid": { - "type": "number", - "description": "[readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many weeks they've been paid for (based on their Working Pattern).", - "format": "double", - "nullable": true - }, - "initialBackPayPublicPayRunId": { - "type": "string", - "description": "[readonly] Used to mark the first payrun where this payline has been payrolled for backpay", - "format": "uuid", - "nullable": true - }, - "value": { - "type": "number", - "description": "The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used).\r\nIf the PayCode has a CalculationType other than FixedAmount then this field will be a percentage.\r\nIf the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated.", - "format": "double" - }, - "rate": { - "type": "number", - "description": "If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used", - "format": "double", - "nullable": true - }, - "multiplier": { - "type": "number", - "description": "If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours", - "format": "double", - "nullable": true - }, - "description": { - "maxLength": 100, - "type": "string", - "description": "A freeform description to accompany this line. It will be displayed on the payslip.", - "nullable": true - }, - "code": { - "type": "string", - "description": "The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition.", - "nullable": true + "get": { + "operationId": "GetByIdHolidayScheme", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "tags": { - "type": "array", - "items": { + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.HolidaySchemeResponse" + } + } }, - "nullable": true - }, - "childId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "isNetToGross": { - "type": "boolean", - "description": "If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target." - }, - "targetNetToGrossValue": { - "type": "number", - "description": "The orginal net fixed addition amount that is considered to be a take home pay target.", - "format": "double", - "nullable": true - }, - "netToGrossDiscrepancy": { - "type": "number", - "description": "The discrepancy between the targeted and the calculated grossed up value durig a net to gross calculation.", - "format": "double", - "nullable": true - }, - "effectiveFrom": { - "type": "string", - "description": "The date the payline starts being calculated in payrun", - "format": "date", - "nullable": true - }, - "effectiveTo": { - "type": "string", - "description": "The date the payline stops being calculated in payrun", - "format": "date", - "nullable": true - }, - "isAutoGeneratedBasicPayLine": { - "type": "boolean" - }, - "percentageOfEffectiveDays": { - "type": "number", - "description": "The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun", - "format": "double", - "nullable": true - }, - "totalWorkingDays": { - "type": "number", - "format": "double", - "nullable": true + "description": "Success" }, - "autoAdjustForLeave": { - "type": "boolean", - "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun" + "400": { + "description": "Bad Request" }, - "isAutomaticBackPay": { - "type": "boolean", - "description": "Automatically calculate backpay and add or modify the necessary pay lines for this addition/deduction when a pay run is created.\r\nApplicable only to employee level addition/deduction pay lines.\r\nIf set to false then you must manually handle the calculation and adding of backpay lines." + "404": { + "description": "Not Found" + } + }, + "summary": "Get holiday scheme by Id", + "tags": [ + "HolidayScheme" + ] + }, + "put": { + "operationId": "UpdateHolidayScheme", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "ignoreInitialBackPay": { - "type": "boolean", - "description": "Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology.\r\nIf set to false, the automatic backpay calculation will be performed on the first pay run." + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.HolidaySchemeRequest" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.HolidaySchemeResponse" + } + } + }, + "description": "Success" }, - "contributesToBasicPay": { - "type": "boolean", - "description": "Indicates whether this PayLine contributes to the basic pay of the Employee." + "400": { + "description": "Bad Request" }, - "calculateAsWhenPaid": { - "type": "boolean", - "description": "Indicates whether this pay line should be treated as When Paid rather than When Earned" + "404": { + "description": "Not Found" + } + }, + "summary": "Update holiday scheme", + "tags": [ + "HolidayScheme" + ] + } + }, + "/employers/{employerId}/import/benefits": { + "post": { + "description": "Allows the import of benefits asynchronously.", + "operationId": "ImportBenefitsImport", + "parameters": [ + { + "description": "The employer id.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.BenefitImportRequest" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.BenefitImportRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.BenefitImportRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.BenefitImportRequest" + }, + "type": "array" + } + } }, - "totalPaidDays": { - "type": "number", - "format": "double", - "nullable": true + "description": "The import benefit items." + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JobResponse" + } + } + }, + "description": "Accepted" }, - "roleId": { - "type": "string", - "description": "The employee role which is associated with this pay line.\r\nIf set to null, the pay line is not related with a role.", - "format": "uuid", - "nullable": true + "400": { + "description": "Bad Request" }, - "earnedFrom": { - "type": "string", - "format": "date", - "nullable": true + "404": { + "description": "Not Found" }, - "earnedTo": { - "type": "string", - "format": "date", - "nullable": true + "409": { + "description": "Conflict" + } + }, + "summary": "Import Benefits", + "tags": [ + "Import" + ] + } + }, + "/employers/{employerId}/import/employees/async": { + "post": { + "description": "This endpoint is currently being beta tested and subject to unannounced breaking changes.\r\nAllows the import of employees asynchronously from a CSV file.", + "operationId": "EmployeeImportCsvImport", + "parameters": [ + { + "description": "The employer id.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "annualValue": { - "type": "number", - "description": "The original value from the PayLine before we modify it\r\nCurrently only used when CalculationType is set to FixedAnnualAmount\r\nso we can determine whether the payline value needs calculating or not\r\nTo recalculate set to null with annual amount recorded in Value", - "format": "double", - "nullable": true + { + "description": "The CSV format.", + "in": "query", + "name": "format", + "schema": { + "$ref": "#/components/schemas/CsvFileFormat" + } }, - "department": { - "type": "string", - "description": "Department code which we want to override in payline", - "nullable": true + { + "description": "If set to true, and if the payroll code matches an existing employee, then that employee will be updated.", + "in": "query", + "name": "allowUpdates", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JobResponse" + } + } + }, + "description": "Accepted" }, - "costCentre": { - "type": "string", - "description": "CostCentre code which we want to override in payline", - "nullable": true + "400": { + "description": "Bad Request" }, - "departmentId": { - "type": "string", - "description": "Department uniqueId which we want to override in payline", - "format": "uuid", - "nullable": true + "409": { + "description": "Conflict" + } + }, + "summary": "Import Employees Asynchronously (Beta)", + "tags": [ + "Import" + ] + } + }, + "/employers/{employerId}/import/import": { + "post": { + "description": "Import Employee Roles from a CSV file.", + "operationId": "ImportRolesImport", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "costCentreId": { - "type": "string", - "description": "CostCentre uniqueId which we want to override in payline", - "format": "uuid", - "nullable": true + { + "description": "Set to true and nothing will be imported but you'll be shown a preview of the data.", + "in": "query", + "name": "previewOnly", + "schema": { + "default": false, + "type": "boolean" + } }, - "analysisCategoriesCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PaylineAnalysisCategoriesCodes" + { + "in": "query", + "name": "allowUpdates", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Import EmployeeRoles from csv file", + "tags": [ + "Import" + ] + } + }, + "/employers/{employerId}/import/leave": { + "post": { + "operationId": "ImportLeaveImport", + "parameters": [ + { + "description": "The employer id.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.LeaveImportRequest" + }, + "type": "array" + } }, - "description": "List of analysiscategory id and analysiscategoryCode id", - "nullable": true - }, - "analysisCategoryCodeIds": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.LeaveImportRequest" + }, + "type": "array" + } }, - "description": "Array of analysiscategoryCode uniqueId", - "nullable": true - }, - "paySpineId": { - "type": "string", - "description": "[readonly] The Id of the associated pay spine.", - "format": "uuid", - "nullable": true - }, - "paySpineGradeId": { - "type": "string", - "description": "[readonly] The Id of the associated pay spine grade.", - "format": "uuid", - "nullable": true - }, - "spinalPointId": { - "type": "string", - "description": "[readonly] The Id of the associated spinal point.", - "format": "uuid", - "nullable": true - }, - "londonAllowanceId": { - "type": "integer", - "description": "Used to set London allowance id for payline", - "format": "int32", - "nullable": true + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.LeaveImportRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.LeaveImportRequest" + }, + "type": "array" + } + } }, - "fullTimeAnnualValue": { - "type": "number", - "description": "Used to set Full Time Annual Value for payline", - "format": "double" - } + "description": "The import leave items." }, - "additionalProperties": false - }, - "Contract.PayOptionsBaseResponse": { - "type": "object", - "properties": { - "regularPayLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayLineResponse" + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JobResponse" + } + } }, - "description": "These are used to make additions/deductions to the pay for this Employee.\r\nYou do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created.", - "nullable": true - }, - "basis": { - "$ref": "#/components/schemas/PayBasis" - }, - "nationalMinimumWage": { - "type": "boolean" - }, - "payCode": { - "type": "string", - "description": "If you want the Employees pay to be allocated to a code other than BASIC, specify it here", - "nullable": true - }, - "mileageVehicleType": { - "$ref": "#/components/schemas/MileageVehicleType" - }, - "mapsMiles": { - "type": "integer", - "description": "The number of miles to pay for as Mileage Allowance Payments", - "format": "int32", - "nullable": true - }, - "payAmount": { - "type": "number", - "description": "The amount the Employee is regularly paid each period", - "format": "double" - }, - "payAmountMultiplier": { - "type": "number", - "description": "This property is irrelevant if the basis is Monthly.\r\nBut if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period.", - "format": "double" - }, - "baseHourlyRate": { - "type": "number", - "description": "This property is used to calculate values for PayCodes that are set as multiples of\r\nthe employees base hourly rate. Eg Overtime.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", - "format": "double" + "description": "Accepted" }, - "baseDailyRate": { - "type": "number", - "description": "This property is used to calculate values for PayCodes that are set as multiples of\r\nthe employees base daily rate. Eg sick.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", - "format": "double" + "400": { + "description": "Bad Request" }, - "autoAdjustForLeave": { - "type": "boolean", - "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun" + "404": { + "description": "Not Found" }, - "niTable": { - "type": "string" + "409": { + "description": "Conflict" } }, - "additionalProperties": false - }, - "Contract.PayOptionsImportRequest": { - "type": "object", - "properties": { - "analysisCategoriesCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PaylineAnalysisCategoriesCodes" - }, - "nullable": true - }, - "autoAdjustForLeave": { - "type": "boolean" - }, - "basis": { - "$ref": "#/components/schemas/PayBasis" - }, - "contributesToBasicPay": { - "type": "boolean" - }, - "costCentre": { - "type": "string", - "nullable": true - }, - "department": { - "type": "string", - "nullable": true - }, - "effectiveFrom": { - "type": "string", - "format": "date", - "nullable": true - }, - "effectiveTo": { - "type": "string", - "format": "date", - "nullable": true - }, - "employerIdentifier": { - "type": "string", - "nullable": true + "summary": "Import Leave Asynchronously", + "tags": [ + "Import" + ] + } + }, + "/employers/{employerId}/import/pay": { + "post": { + "description": "Takes a list PayOptionsImport and updates employees PayOptions to use the values provided.", + "operationId": "ImportEmployeePayImport", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "ignoreInitialBackPay": { - "type": "boolean" + { + "description": "If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false.", + "in": "query", + "name": "linesOnly", + "schema": { + "default": false, + "type": "boolean" + } }, - "isAutomaticBackPay": { - "type": "boolean" + { + "description": "If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false.", + "in": "query", + "name": "append", + "schema": { + "default": false, + "type": "boolean" + } }, - "isNetToGross": { - "type": "boolean" + { + "description": "If set to true then any submitted lines that match the paycode of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines.", + "in": "query", + "name": "updateExisting", + "schema": { + "default": false, + "type": "boolean" + } }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PaylineRequest" + { + "description": "If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported.", + "in": "query", + "name": "validateOnly", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayOptionsImport" + }, + "type": "array" + } }, - "nullable": true - }, - "note": { - "type": "string", - "nullable": true - }, - "payAmount": { - "type": "number", - "format": "double" - }, - "payAmountMultiplier": { - "type": "number", - "format": "double" - }, - "payCode": { - "type": "string", - "nullable": true - }, - "payGrade": { - "type": "string", - "nullable": true - }, - "payrollCode": { - "type": "string", - "nullable": true - }, - "paySpine": { - "type": "string", - "nullable": true - }, - "roleReference": { - "type": "string", - "nullable": true - }, - "spinePoint": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "array", - "items": { - "type": "string" + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayOptionsImport" + }, + "type": "array" + } }, - "nullable": true + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayOptionsImport" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayOptionsImport" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "Contract.PayOptionsRequest": { - "type": "object", - "properties": { - "regularPayLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayLineRequest" - }, - "description": "These are used to make additions/deductions to the pay for this Employee.\r\nYou do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created.", - "nullable": true - }, - "period": { - "$ref": "#/components/schemas/PayPeriods" + "responses": { + "200": { + "description": "Success" }, - "ordinal": { - "type": "integer", - "description": "Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod.", - "format": "int32" + "400": { + "description": "Bad Request" + } + }, + "summary": "Import Pay To Employee", + "tags": [ + "Import" + ] + } + }, + "/employers/{employerId}/import/payments": { + "post": { + "description": "Allows the import of permanent addition and deductions payments asynchronously.", + "operationId": "ImportPaymentsImport", + "parameters": [ + { + "description": "The employer id.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "method": { - "$ref": "#/components/schemas/PayMethod" + { + "description": "If set to true, and there are any open pay runs, the imported values will be applied to those pay runs.", + "in": "query", + "name": "updateOpenPayrun", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PaymentImportRequest" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PaymentImportRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PaymentImportRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PaymentImportRequest" + }, + "type": "array" + } + } }, - "withholdTaxRefundIfPayIsZero": { - "type": "boolean", - "description": "If you don't want negative PAYE values when the Gross pay is zero, set this to true" + "description": "The import payment items." + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JobResponse" + } + } + }, + "description": "Accepted" }, - "taxAndNi": { - "$ref": "#/components/schemas/Contract.TaxAndNi" + "400": { + "description": "Bad Request" }, - "fpsFields": { - "$ref": "#/components/schemas/Contract.FpsFields" + "404": { + "description": "Not Found" }, - "tags": { - "type": "array", - "items": { + "409": { + "description": "Conflict" + } + }, + "summary": "Import Permanent Addition and Deductions Payments", + "tags": [ + "Import" + ] + } + }, + "/employers/{employerId}/import/payments/mappings": { + "get": { + "description": "Lists all PaymentsCsvMappings for an Employer.", + "operationId": "ListPaymentsCsvMappingsImport", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list mappings", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true - }, - "basis": { - "$ref": "#/components/schemas/PayBasis" - }, - "nationalMinimumWage": { - "type": "boolean" - }, - "payCode": { - "type": "string", - "description": "If you want the Employees pay to be allocated to a code other than BASIC, specify it here", - "nullable": true - }, - "mileageVehicleType": { - "$ref": "#/components/schemas/MileageVehicleType" - }, - "mapsMiles": { - "type": "integer", - "description": "The number of miles to pay for as Mileage Allowance Payments", - "format": "int32", - "nullable": true - }, - "payAmount": { - "type": "number", - "description": "The amount the Employee is regularly paid each period", - "format": "double" - }, - "payAmountMultiplier": { - "type": "number", - "description": "This property is irrelevant if the basis is Monthly.\r\nBut if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period.", - "format": "double" - }, - "baseHourlyRate": { - "type": "number", - "description": "This property is used to calculate values for PayCodes that are set as multiples of\r\nthe employees base hourly rate. Eg Overtime.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", - "format": "double" - }, - "baseDailyRate": { - "type": "number", - "description": "This property is used to calculate values for PayCodes that are set as multiples of\r\nthe employees base daily rate. Eg sick.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", - "format": "double" - }, - "autoAdjustForLeave": { - "type": "boolean", - "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun" - }, - "niTable": { - "type": "string" + "description": "Success" } }, - "additionalProperties": false + "summary": "List PaymentsCsvMappings", + "tags": [ + "Import" + ] }, - "Contract.PayOptionsResponse": { - "type": "object", - "properties": { - "regularPayLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayLineResponse" - }, - "description": "These are used to make additions/deductions to the pay for this Employee.\r\nYou do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created.", - "nullable": true - }, - "basicPay": { - "type": "number", - "description": "The amount of basic pay the Employee is regularly paid each period\r\nThis amount is the combined total of all pay elements that contribute to basic pay", - "format": "double" - }, - "period": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "description": "Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod.", - "format": "int32" - }, - "method": { - "$ref": "#/components/schemas/PayMethod" - }, - "withholdTaxRefundIfPayIsZero": { - "type": "boolean", - "description": "If you don't want negative PAYE values when the Gross pay is zero, set this to true" - }, - "taxAndNi": { - "$ref": "#/components/schemas/Contract.TaxAndNi" - }, - "fpsFields": { - "$ref": "#/components/schemas/Contract.FpsFields" - }, - "tags": { - "type": "array", - "items": { + "post": { + "description": "Creates a new PaymentsCsvMapping for the Employer.", + "operationId": "CreatePaymentsCsvMappingImport", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PaymentsCsvMapping" + } }, - "nullable": true - }, - "basis": { - "$ref": "#/components/schemas/PayBasis" - }, - "nationalMinimumWage": { - "type": "boolean" - }, - "payCode": { - "type": "string", - "description": "If you want the Employees pay to be allocated to a code other than BASIC, specify it here", - "nullable": true - }, - "mileageVehicleType": { - "$ref": "#/components/schemas/MileageVehicleType" - }, - "mapsMiles": { - "type": "integer", - "description": "The number of miles to pay for as Mileage Allowance Payments", - "format": "int32", - "nullable": true - }, - "payAmount": { - "type": "number", - "description": "The amount the Employee is regularly paid each period", - "format": "double" - }, - "payAmountMultiplier": { - "type": "number", - "description": "This property is irrelevant if the basis is Monthly.\r\nBut if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period.", - "format": "double" - }, - "baseHourlyRate": { - "type": "number", - "description": "This property is used to calculate values for PayCodes that are set as multiples of\r\nthe employees base hourly rate. Eg Overtime.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", - "format": "double" - }, - "baseDailyRate": { - "type": "number", - "description": "This property is used to calculate values for PayCodes that are set as multiples of\r\nthe employees base daily rate. Eg sick.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", - "format": "double" - }, - "autoAdjustForLeave": { - "type": "boolean", - "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun" + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentsCsvMapping" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PaymentsCsvMapping" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PaymentsCsvMapping" + } + } + } + }, + "responses": { + "201": { + "description": "Created" }, - "niTable": { - "type": "string" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false - }, - "Contract.PayRunResponseItem": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true + "summary": "Create PaymentsCsvMapping", + "tags": [ + "Import" + ] + } + }, + "/employers/{employerId}/import/payments/mappings/{id}": { + "delete": { + "description": "Deletes the specified PaymentsCsvMapping.", + "operationId": "DeletePaymentCsvMappingImport", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "metadata": { - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "url": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete PaymentsCsvMapping", + "tags": [ + "Import" + ] }, - "Contract.PayRunStateHistoryResponse": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/PayRunState" + "get": { + "description": "Gets the PaymentsCsvMapping specified.", + "operationId": "PaymentsCsvMappingImport", + "parameters": [ + { + "description": "The Id of the Employer to which the PaymentCsvMapping belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "createdDate": { - "type": "string", - "description": "Date in which the State was changed", - "format": "date" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.PayScheduleByDateRangeRequest": { - "type": "object", - "properties": { - "employerIds": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentsCsvMapping" + } + } }, - "description": "Employer ids of PaySchedule", - "nullable": true - }, - "fromPayDate": { - "type": "string", - "description": "From PayDate of PayRun", - "format": "date" - }, - "toPayDate": { - "type": "string", - "description": "To PayDate of PayRun", - "format": "date" + "description": "Success" } }, - "additionalProperties": false, - "description": "Represents a request to retrieve pay schedules within a specific date range for a list of employers." + "summary": "Get PaymentsCsvMapping", + "tags": [ + "Import" + ] }, - "Contract.PayScheduleRequest": { - "type": "object", - "properties": { - "employerIds": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "description": "Employer ids of PaySchedule", - "nullable": true + "put": { + "description": "Updates the PaymentsCsvMapping specified.", + "operationId": "UpdatePaymentsCsvMappingImport", + "parameters": [ + { + "description": "The Id of the Employer to which the PaymentsCsvMapping belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxYears": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxYear" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PaymentsCsvMapping" + } }, - "description": "Tax years of PaySchedule", - "nullable": true + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentsCsvMapping" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PaymentsCsvMapping" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PaymentsCsvMapping" + } + } } }, - "additionalProperties": false, - "description": "Represents a request to retrieve pay schedules for a list of employers and tax years." - }, - "Contract.PayScheduleResponseItem": { - "type": "object", - "properties": { - "payRunList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayRunResponseItem" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentsCsvMapping" + } + } }, - "nullable": true - }, - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "metadata": { - "nullable": true - }, - "url": { - "type": "string", - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.PaySpineGradeRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Pay spine grade name", - "nullable": true - }, - "lowerPointUniqueId": { - "type": "string", - "description": "Id of lower spinal point to be used.", - "format": "uuid" - }, - "upperPointUniqueId": { - "type": "string", - "description": "Id of upper spinal point to be used.", - "format": "uuid" - }, - "upperPointUseMax": { - "type": "boolean", - "description": "Use the Alt Max Value of the Upper Point. (Default false)" - }, - "effectiveDate": { - "type": "string", - "description": "Date that this configuration is effective from.", - "format": "date" + "summary": "Update PaymentsCsvMapping", + "tags": [ + "Import" + ] + } + }, + "/employers/{employerId}/import/payments/mappings/{id}/csv": { + "get": { + "description": "Gets a CSV file in the format needed to import for the specified PaymentsCsvMapping\r\nThis is only available for PaymentsCsvMapping with a Type of ColumnBased", + "operationId": "PaymentsCsvMappingCsvFileImport", + "parameters": [ + { + "description": "The Id of the Employer to which the PaymentCsvMapping belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "holidayEntitlement": { - "type": "number", - "description": "The number of holidays entitled to this pay spine grade.", - "format": "double" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.PaySpineGradeResponse": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Pay spine grade name", - "nullable": true - }, - "lowerPointUniqueId": { - "type": "string", - "description": "Id of lower spinal point used.", - "format": "uuid" - }, - "upperPointUniqueId": { - "type": "string", - "description": "Id of upper spinal point used.", - "format": "uuid" - }, - "upperPointUseMax": { - "type": "boolean", - "description": "Use the Alt Max Value of the Upper Point. (Default false)" - }, - "effectiveDate": { - "type": "string", - "description": "Date that this configuration is effective from.", - "format": "date" - }, - "uniqueId": { - "type": "string", - "description": "Pay spine grade Id", - "format": "uuid" - }, - "holidayEntitlement": { - "type": "number", - "description": "The number of holiday days entitled for this pay spine grade.", - "format": "double" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.PaySpineRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the Pay Spine", - "nullable": true - }, - "fullTimeHours": { - "type": "number", - "description": "Maximum Full Time Hours on this Pay Spine", - "format": "double" - }, - "fullTimeWeeks": { - "type": "number", - "description": "Maximum Full Time Weeks on this Pay Spine", - "format": "double" - }, - "salaryFormula": { - "type": "string", - "description": "Formula used to derive annual salary\r\n\r\nThe salary formula consists of the following elements and Round functions:\r\n- PointValue (The value of an individual Spinal Point)\r\n- HoursWorked (The hours an employee is contracted to work for in their role)\r\n- FTHours (The full time hours specified for an employee in their role)\r\n- WeeksWorked (The contracted weeks an employee works in their role)\r\n- FTWeeks (The full weeks specified for an employee in their role)\r\nRound functions: \r\n- ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15.\r\n- ROUNDUP(Value)\r\n- ROUNDDOWN(Value) \r\n- TRUNCATE(Value)\r\n\r\nFor example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" \r\n", - "nullable": true - }, - "hourlyDivisor": { - "type": "number", - "description": "Hours used to determine Hourly Rate", - "format": "double" - }, - "hourlyDecimals": { - "type": "integer", - "description": "Number of decimal places to calculate Hourly Rates", - "format": "int32" - }, - "dailyDivisor": { - "type": "number", - "description": "Days used to determine Full time Daily Rate", - "format": "double" - }, - "dailyDecimals": { - "type": "integer", - "description": "Number of decimal places to calculate Daily Rates", - "format": "int32" - }, - "annualDecimals": { - "type": "integer", - "description": "Number of decimal places to calculate Annual Salaries", - "format": "int32" - }, - "annualRoundingRule": { - "$ref": "#/components/schemas/AnnualRoundingRule" - }, - "incrementRule": { - "$ref": "#/components/schemas/IncrementRule" - }, - "requiresLondonAllowance": { - "type": "boolean", - "description": "Requires LA column to be completed on the spine" - }, - "gradeEffectiveDate": { - "type": "string", - "description": "Effective date for applicable grades", - "format": "date" - }, - "pointEffectiveDate": { - "type": "string", - "description": "Effective date for applicable spinal points", - "format": "date" + "summary": "Get PaymentsCsvMapping CSV File", + "tags": [ + "Import" + ] + } + }, + "/employers/{employerId}/import/pensionmemberships": { + "post": { + "description": "Import Pension Memberships from a CSV file.", + "operationId": "ImportPensionMembershipsImport", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "useSpineHolidayRules": { - "type": "boolean", - "description": "Flag to include holiday entitlements in Payspine (Default false)" + { + "description": "Set to true and nothing will be imported but you'll be shown a preview of the data.", + "in": "query", + "name": "previewOnly", + "schema": { + "default": false, + "type": "boolean" + } }, - "holidayEntitlements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.HolidayEntitlementRequest" - }, - "description": "PaySpine Holiday Entitlements", - "nullable": true + { + "in": "query", + "name": "allowUpdates", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } } }, - "additionalProperties": false - }, - "Contract.PaySpineResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Pay Spine identifier", - "format": "uuid" - }, - "name": { - "type": "string", - "description": "Name of the Pay Spine", - "nullable": true - }, - "fullTimeHours": { - "type": "number", - "description": "Maximum Full Time Hours on this Pay Spine", - "format": "double" - }, - "fullTimeWeeks": { - "type": "number", - "description": "Maximum Full Time Weeks on this Pay Spine", - "format": "double" - }, - "salaryFormula": { - "type": "string", - "description": "Formula used to derive annual salary\r\n\r\nThe salary formula consists of the following elements and Round functions:\r\n- PointValue (The value of an individual Spinal Point)\r\n- HoursWorked (The hours an employee is contracted to work for in their role)\r\n- FTHours (The full time hours specified for an employee in their role)\r\n- WeeksWorked (The contracted weeks an employee works in their role)\r\n- FTWeeks (The full weeks specified for an employee in their role)\r\nRound functions: \r\n- ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15.\r\n- ROUNDUP(Value)\r\n- ROUNDDOWN(Value) \r\n- TRUNCATE(Value)\r\n\r\nFor example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" \r\n", - "nullable": true - }, - "hourlyDivisor": { - "type": "number", - "description": "Hours used to determine Hourly Rate", - "format": "double" - }, - "hourlyDecimals": { - "type": "integer", - "description": "Number of decimal places to calculate Hourly Rates", - "format": "int32" - }, - "dailyDivisor": { - "type": "number", - "description": "Days used to determine Full time Daily Rate", - "format": "double" - }, - "dailyDecimals": { - "type": "integer", - "description": "Number of decimal places to calculate Daily Rates", - "format": "int32" - }, - "annualDecimals": { - "type": "integer", - "description": "Number of decimal places to calculate Annual Salaries", - "format": "int32" - }, - "annualRoundingRule": { - "$ref": "#/components/schemas/AnnualRoundingRule" - }, - "incrementRule": { - "$ref": "#/components/schemas/IncrementRule" - }, - "requiresLondonAllowance": { - "type": "boolean", - "description": "Requires LA column to be completed on the spine" - }, - "gradeEffectiveDate": { - "type": "string", - "description": "Effective date for applicable grades", - "format": "date" - }, - "pointEffectiveDate": { - "type": "string", - "description": "Effective date for applicable spinal points", - "format": "date" - }, - "useSpineHolidayRules": { - "type": "boolean", - "description": "Flag to include holiday entitlements in Payspine (Default false)" - }, - "holidayEntitlements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.HolidayEntitlementResponse" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.PaySpineUpdateRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the Pay Spine", - "nullable": true - }, - "fullTimeHours": { - "type": "number", - "description": "Maximum Full Time Hours on this Pay Spine", - "format": "double" - }, - "fullTimeWeeks": { - "type": "number", - "description": "Maximum Full Time Weeks on this Pay Spine", - "format": "double" - }, - "salaryFormula": { - "type": "string", - "description": "Formula used to derive annual salary\r\n\r\nThe salary formula consists of the following elements and Round functions:\r\n- PointValue (The value of an individual Spinal Point)\r\n- HoursWorked (The hours an employee is contracted to work for in their role)\r\n- FTHours (The full time hours specified for an employee in their role)\r\n- WeeksWorked (The contracted weeks an employee works in their role)\r\n- FTWeeks (The full weeks specified for an employee in their role)\r\nRound functions: \r\n- ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15.\r\n- ROUNDUP(Value)\r\n- ROUNDDOWN(Value) \r\n- TRUNCATE(Value)\r\n\r\nFor example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" \r\n", - "nullable": true - }, - "hourlyDivisor": { - "type": "number", - "description": "Hours used to determine Hourly Rate", - "format": "double" - }, - "hourlyDecimals": { - "type": "integer", - "description": "Number of decimal places to calculate Hourly Rates", - "format": "int32" - }, - "dailyDivisor": { - "type": "number", - "description": "Days used to determine Full time Daily Rate", - "format": "double" - }, - "dailyDecimals": { - "type": "integer", - "description": "Number of decimal places to calculate Daily Rates", - "format": "int32" - }, - "annualDecimals": { - "type": "integer", - "description": "Number of decimal places to calculate Annual Salaries", - "format": "int32" - }, - "annualRoundingRule": { - "$ref": "#/components/schemas/AnnualRoundingRule" - }, - "incrementRule": { - "$ref": "#/components/schemas/IncrementRule" - }, - "requiresLondonAllowance": { - "type": "boolean", - "description": "Requires LA column to be completed on the spine" - }, - "gradeEffectiveDate": { - "type": "string", - "description": "Effective date for applicable grades", - "format": "date" - }, - "pointEffectiveDate": { - "type": "string", - "description": "Effective date for applicable spinal points", - "format": "date" - }, - "useSpineHolidayRules": { - "type": "boolean", - "description": "Flag to include holiday entitlements in Payspine (Default false)" + "summary": "Import PensionMemberships from csv file", + "tags": [ + "Import" + ] + } + }, + "/employers/{employerId}/import/pensionmemberships/async": { + "post": { + "description": "Import Pension Memberships from a CSV file.", + "operationId": "PensionImportCsvImport", + "parameters": [ + { + "description": "The employer id.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "holidayEntitlements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.HolidayEntitlementUpdateRequest" - }, - "description": "PaySpine Holiday Entitlements", - "nullable": true + { + "description": "If set to true, and if the pension membership matches an existing one, then that membership will be updated.", + "in": "query", + "name": "allowUpdates", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } } }, - "additionalProperties": false - }, - "Contract.PaylineAnalysisCategoriesCodes": { - "type": "object", - "properties": { - "analysisCategory": { - "type": "string", - "description": "AnalysisCategory Model", - "nullable": true - }, - "analysisCategoryCode": { - "type": "string", - "description": "AnalysisCategoryCode Model", - "nullable": true + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JobResponse" + } + } + }, + "description": "Accepted" }, - "analysisCategoryId": { - "type": "string", - "description": "AnalysisCategory Identifier", - "format": "uuid", - "nullable": true + "400": { + "description": "Bad Request" }, - "analysisCategoryCodeId": { - "type": "string", - "description": "AnalysisCategoryCode Identifier", - "format": "uuid", - "nullable": true + "409": { + "description": "Conflict" } }, - "additionalProperties": false - }, - "Contract.PaylineRequest": { - "type": "object", - "properties": { - "analysisCategoryCodeIds": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "description": "List of analysis category code unique ids.", - "nullable": true - }, - "analysisCategoriesCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PaylineAnalysisCategoriesCodes" - }, - "description": "List of analysis category ids and analysis category code ids.", - "nullable": true - }, - "annualValue": { - "type": "number", - "description": "The original value from the PayLine before we modify it.\r\nCurrently only used when CalculationType is set to FixedAnnualAmount\r\nso we can determine whether the payline value needs calculating or not.\r\nTo recalculate set to null with annual amount recorded in Value.", - "format": "double", - "nullable": true - }, - "autoAdjustForLeave": { - "type": "boolean", - "description": "This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling midway through a PayRun." - }, - "calculateAsWhenPaid": { - "type": "boolean", - "description": "Indicates whether this pay line should be treated as When Paid rather than When Earned." - }, - "childId": { - "type": "string", - "description": "The child id.", - "format": "uuid", - "nullable": true - }, - "code": { - "type": "string", - "description": "The PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition.", - "nullable": true - }, - "contributesToBasicPay": { - "type": "boolean", - "description": "Indicates whether this PayLine contributes to the basic pay of the Employee." - }, - "costCentre": { - "type": "string", - "description": "CostCentre code which we want to override in the payline.", - "nullable": true - }, - "costCentreId": { - "type": "string", - "description": "CostCentre uniqueId which we want to override in the payline.", - "format": "uuid", - "nullable": true - }, - "department": { - "type": "string", - "description": "Department code which we want to override in the payline.", - "nullable": true - }, - "departmentId": { - "type": "string", - "description": "Department uniqueId which we want to override in the payline.", - "format": "uuid", - "nullable": true - }, - "description": { - "type": "string", - "description": "A description to accompany this line. It will be displayed on the payslip.", - "nullable": true - }, - "earnedFrom": { - "type": "string", - "description": "The earned from date.", - "format": "date", - "nullable": true - }, - "earnedTo": { - "type": "string", - "description": "The earned to date.", - "format": "date", - "nullable": true - }, - "effectiveFrom": { - "type": "string", - "description": "The date the payline starts being calculated in the payrun.", - "format": "date", - "nullable": true - }, - "effectiveTo": { - "type": "string", - "description": "The date the payline stops being calculated in the payrun.", - "format": "date", - "nullable": true - }, - "employeeRoleReference": { - "type": "string", - "description": "The employee role reference.", - "nullable": true - }, - "fullTimeAnnualValue": { - "type": "number", - "description": "Used to set the Full Time Annual Value for the payline.", - "format": "double" - }, - "ignoreInitialBackPay": { - "type": "boolean", - "description": "Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside of Staffology.\r\nIf set to false, the automatic backpay calculation will be performed on the first pay run." - }, - "isAutoGeneratedBasicPayLine": { - "type": "boolean", - "description": "If the PayLine is an auto-generated basic payline." - }, - "isAutomaticBackPay": { - "type": "boolean", - "description": "Automatically calculate backpay and add or modify the necessary pay lines for this addition/deduction when a pay run is created.\r\nApplicable only to employee level addition/deduction pay lines.\r\nIf set to false then you must manually handle the calculation and adding of backpay lines." - }, - "isNetToGross": { - "type": "boolean", - "description": "If the PayLine is a fixed amount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target." - }, - "isZeroHoursTeachersBackPayLine": { - "type": "boolean", - "description": "If the PayLine is a zero-hours teachers back-pay line." - }, - "londonAllowanceId": { - "type": "integer", - "description": "Used to set London allowance id for payline.", - "format": "int32", - "nullable": true - }, - "multiplier": { - "type": "number", - "description": "If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours.", - "format": "double", - "nullable": true - }, - "netToGrossDiscrepancy": { - "type": "number", - "description": "The discrepancy between the targeted and the calculated grossed up value during a net to gross calculation.", - "format": "double", - "nullable": true - }, - "payGrade": { - "type": "string", - "description": "PayGrade for imported pay lines", - "nullable": true - }, - "paySpine": { - "type": "string", - "description": "PaySpine for imported pay lines", - "nullable": true + "summary": "Import PensionMemberships from csv file (async)", + "tags": [ + "Import" + ] + } + }, + "/employers/{employerId}/import/{taxYear}/{payPeriod}/{periodNumber}/{ordinal}/payrun-overrides": { + "post": { + "description": "Allows the import of payrun overrides asynchronously.", + "operationId": "ImportPayRunOverridesImport", + "parameters": [ + { + "description": "The employer id", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "paySpineGradeId": { - "type": "string", - "description": "The Id of the associated pay spine grade.", - "format": "uuid", - "nullable": true + { + "description": "The tax year for the pay run overrides import.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "paySpineId": { - "type": "string", - "description": "The Id of the associated pay spine.", - "format": "uuid", - "nullable": true + { + "description": "The period number for the pay run overrides import.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "percentageOfEffectiveDays": { - "type": "number", - "description": "The percentage of working days the effective dates span for pro-rata values, calculated and set during each payrun.", - "format": "double", - "nullable": true + { + "description": "The period number for the pay run overrides import.", + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "rate": { - "type": "number", - "description": "If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used.", - "format": "double", - "nullable": true + { + "description": "The ordinal for the pay run overrides import.", + "in": "path", + "name": "ordinal", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayRunOverridesImportRequest" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayRunOverridesImportRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayRunOverridesImportRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayRunOverridesImportRequest" + }, + "type": "array" + } + } }, - "roleId": { - "type": "string", - "description": "The employee role which is associated with this pay line.\r\nIf set to null, the pay line is not related with a role.", - "format": "uuid", - "nullable": true + "description": "The import payrun ovverides items." + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JobResponse" + } + } + }, + "description": "Accepted" }, - "spinePoint": { - "type": "string", - "description": "SpinePoint for imported pay lines", - "nullable": true + "400": { + "description": "Bad Request" }, - "spinalPointId": { - "type": "string", - "description": "The Id of the associated spinal point.", - "format": "uuid", - "nullable": true + "404": { + "description": "Not Found" }, - "tags": { - "type": "array", - "items": { + "409": { + "description": "Conflict" + } + }, + "summary": "Import Pay Run Overrides", + "tags": [ + "Import" + ] + } + }, + "/employers/{employerId}/invitation": { + "get": { + "description": "Lists all Invitations for an Employer.\r\nOnly unaccepted Invitations are listed as they are deleted once they've been accepted.", + "operationId": "IndexInvitation", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list Pay Codes", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "description": "Tags related to this line.", - "nullable": true - }, - "targetNetToGrossValue": { - "type": "number", - "description": "The orginal net fixed addition amount that is considered to be a take home pay target.", - "format": "double", - "nullable": true - }, - "totalPaidDays": { - "type": "number", - "description": "The total paid days.", - "format": "double", - "nullable": true - }, - "totalWorkingDays": { - "type": "number", - "description": "The total working days.", - "format": "double", - "nullable": true - }, - "value": { - "type": "number", - "description": "The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used).\r\nIf the PayCode has a CalculationType other than FixedAmount then this field will be a percentage.\r\nIf the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated.", - "format": "double" + "description": "Success" } }, - "additionalProperties": false + "summary": "List Invitations", + "tags": [ + "Invitation" + ] }, - "Contract.PayrollSquadEmployerRequest": { - "type": "object", - "properties": { - "payrollSquadId": { - "type": "string", - "description": "UniqueId of Payroll Squad", - "format": "uuid" + "post": { + "description": "Creates a new Invitation for the Employer.", + "operationId": "CreateInvitation", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employerIds": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" + { + "description": "This is useful for when you want to invite a user to an employer and automatically accept the invitation.", + "in": "query", + "name": "autoAccept", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Invitation" + } }, - "description": "UniqueIds of Employers", - "nullable": true + "application/json": { + "schema": { + "$ref": "#/components/schemas/Invitation" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Invitation" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Invitation" + } + } } }, - "additionalProperties": false - }, - "Contract.PayrollSquadEmployerResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Payroll Squad Employer Id", - "format": "uuid" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Invitation" + } + } + }, + "description": "Created" }, - "employerId": { - "type": "string", - "description": "Employer Id", - "format": "uuid" + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Employer Not Found" } }, - "additionalProperties": false - }, - "Contract.PayrollSquadMemberRequest": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Payroll Squad Selected UserId", - "format": "uuid" + "summary": "Create Invitation", + "tags": [ + "Invitation" + ] + } + }, + "/employers/{employerId}/invitation/{id}": { + "delete": { + "description": "Deletes the specified Invitation.", + "operationId": "DeleteInvitation", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payrollSquadId": { - "type": "string", - "description": "UniqueId of Payroll Squad", - "format": "uuid" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "role": { - "$ref": "#/components/schemas/UserRole" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete Invitation", + "tags": [ + "Invitation" + ] }, - "Contract.PayrollSquadMemberResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Payroll Squad Member Identifier", - "format": "uuid" - }, - "userId": { - "type": "string", - "description": "Payroll Squad User Identifier", - "format": "uuid" - }, - "displayName": { - "type": "string", - "description": "Payroll Squad Member DisplayName", - "nullable": true - }, - "emailAddress": { - "type": "string", - "description": "Payroll Squad Member EmailAddress", - "nullable": true + "get": { + "description": "Gets the Invitation specified.", + "operationId": "GetInvitation", + "parameters": [ + { + "description": "The Id of the Employer to which the Invitation belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "lastLogin": { - "type": "string", - "description": "Payroll Squad Member LastLogin", - "format": "date", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Invitation" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Invitation", + "tags": [ + "Invitation" + ] + } + }, + "/employers/{employerId}/journaltemplate": { + "get": { + "description": "Get Journal Template for an Employer.", + "operationId": "GetJournalTemplate", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get Journal Template", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateResponse" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateResponse" + } + } + }, + "description": "Success" }, - "role": { - "$ref": "#/components/schemas/UserRole" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Get Journal Template", + "tags": [ + "JournalTemplate" + ] }, - "Contract.PayrollSquadRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of Payroll Squad", - "nullable": true - }, - "employerIds": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "description": "Employer ids of Payroll Squad", - "nullable": true + "post": { + "description": "Create Journal Template for an Employer.", + "operationId": "CreateJournalTemplate", + "parameters": [ + { + "description": "The Id of the Employer for which you want to create Journal Template", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.PayrollSquadResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Payroll Squad Identifier", - "format": "uuid" - }, - "tenantId": { - "type": "string", - "description": "Current Tenant Id", - "format": "uuid" - }, - "members": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PayrollSquadMemberResponse" + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateRequest" + } }, - "description": "List of all Members", - "nullable": true - }, - "employers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.EmployerBase" + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateRequest" + } }, - "description": "List of all Employers", - "nullable": true - }, - "name": { - "type": "string", - "description": "Name of Payroll Squad", - "nullable": true + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateRequest" + } + } } }, - "additionalProperties": false - }, - "Contract.PendingLettersCountResponse": { - "type": "object", - "properties": { - "pendingLettersCount": { - "type": "integer", - "format": "int32" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JournalTemplate" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/JournalTemplate" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/JournalTemplate" + } + } + }, + "description": "Created" }, - "requiringAePostponementLettersCount": { - "type": "integer", - "format": "int32" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false - }, - "Contract.PensionAdministratorRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - }, - "address": { - "$ref": "#/components/schemas/Contract.Address" + "summary": "Create Journal Template", + "tags": [ + "JournalTemplate" + ] + } + }, + "/employers/{employerId}/journaltemplate/{id}": { + "put": { + "description": "Updates Specified Journal Template for the Employer.", + "operationId": "UpdateJournalTemplate", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update Journal Template", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "telephone": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.PensionAdministratorResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - }, - "address": { - "$ref": "#/components/schemas/Contract.Address" - }, - "telephone": { - "type": "string", - "nullable": true + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateRequest" + } + } } }, - "additionalProperties": false - }, - "Contract.PensionProviderRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "accountNo": { - "type": "string", - "nullable": true - }, - "portal": { - "type": "string", - "nullable": true - }, - "website": { - "type": "string", - "nullable": true - }, - "address": { - "$ref": "#/components/schemas/Contract.Address" - }, - "telephone": { - "type": "string", - "nullable": true - }, - "papdisVersion": { - "$ref": "#/components/schemas/PapdisVersion" - }, - "papdisProviderId": { - "type": "string", - "nullable": true - }, - "papdisEmployerId": { - "type": "string", - "nullable": true - }, - "csvFormat": { - "$ref": "#/components/schemas/PensionCsvFormat" - }, - "excludeNilPaidFromContributions": { - "type": "boolean", - "description": "If we're sending contributions to an external provider then we'll include all employees that were on the payrun.\r\nIf you want to exclude employees that don't have any contributions to report then set this to true." - }, - "payPeriodDateAdjustment": { - "type": "integer", - "description": "If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here.\r\nA negative value of will move the date back in time.", - "format": "int32" - }, - "miscBoolean1": { - "type": "boolean", - "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\"" - }, - "miscBoolean2": { - "type": "boolean", - "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it indicates whether or not to approve payments after submitting contributions" - }, - "miscString1": { - "type": "string", - "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it dictates the PaymentSource.", - "nullable": true - }, - "miscString2": { - "type": "string", - "description": "This field has different uses dependent on the ExternalDataProvider, if any.", - "nullable": true - }, - "optOutWindow": { - "type": "integer", - "description": "The number of days or months that an employee has to Opt out after being enrolled", - "format": "int32" - }, - "optOutWindowIsMonths": { - "type": "boolean", - "description": "Determines whether the value given for OptOutWindow is in Months (true) or days (false)" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateResponse" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTemplateResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.PensionProviderResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "accountNo": { - "type": "string", - "nullable": true - }, - "portal": { - "type": "string", - "nullable": true - }, - "website": { - "type": "string", - "nullable": true - }, - "address": { - "$ref": "#/components/schemas/Contract.Address" - }, - "telephone": { - "type": "string", - "nullable": true - }, - "papdisVersion": { - "$ref": "#/components/schemas/PapdisVersion" - }, - "papdisProviderId": { - "type": "string", - "nullable": true - }, - "papdisEmployerId": { - "type": "string", - "nullable": true - }, - "csvFormat": { - "$ref": "#/components/schemas/PensionCsvFormat" - }, - "excludeNilPaidFromContributions": { - "type": "boolean", - "description": "If we're sending contributions to an external provider then we'll include all employees that were on the payrun.\r\nIf you want to exclude employees that don't have any contributions to report then set this to true." - }, - "payPeriodDateAdjustment": { - "type": "integer", - "description": "If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here.\r\nA negative value of will move the date back in time.", - "format": "int32" - }, - "miscBoolean1": { - "type": "boolean", - "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\"" - }, - "miscBoolean2": { - "type": "boolean", - "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it indicates whether or not to approve payments after submitting contributions" - }, - "miscString1": { - "type": "string", - "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it dictates the PaymentSource.", - "nullable": true - }, - "miscString2": { - "type": "string", - "description": "This field has different uses dependent on the ExternalDataProvider, if any.", - "nullable": true - }, - "optOutWindow": { - "type": "integer", - "description": "The number of days or months that an employee has to Opt out after being enrolled", - "format": "int32" - }, - "optOutWindowIsMonths": { - "type": "boolean", - "description": "Determines whether the value given for OptOutWindow is in Months (true) or days (false)" + "summary": "Update Journal Template", + "tags": [ + "JournalTemplate" + ] + } + }, + "/employers/{employerId}/journaltokens": { + "get": { + "description": "List Journal Tokens for an Employer.", + "operationId": "IndexJournalToken", + "parameters": [ + { + "description": "The Id of the Employer for which you want list of Journal Tokens", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.PensionSchemeNominalCodeMappingRequest": { - "type": "object", - "properties": { - "nominalCode": { - "type": "string", - "nullable": true - }, - "nominalName": { - "type": "string", - "nullable": true - }, - "journalNarrative": { - "type": "string", - "nullable": true + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.JournalTokenResponseItem" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.JournalTokenResponseItem" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.JournalTokenResponseItem" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "payCode": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "List Journal Tokens", + "tags": [ + "JournalToken" + ] }, - "Contract.PensionSchemeNominalCodeMappingResponse": { - "type": "object", - "properties": { - "nominalCode": { - "type": "string", - "description": "Nominal Code for pension scheme", - "nullable": true - }, - "nominalName": { - "type": "string", - "description": "Nominal Name", - "nullable": true - }, - "journalNarrative": { - "type": "string", - "description": "Journal narrative description.", - "nullable": true - }, - "payCode": { - "type": "string", - "nullable": true + "post": { + "description": "Create Journal Token for an Employer.", + "operationId": "CreateJournalToken", + "parameters": [ + { + "description": "The Id of the Employer for which you want to create Journal Token", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.PensionSchemeReportOptionsLgpsCivicaUpmRequest": { - "type": "object", - "properties": { - "payrollNumber": { - "$ref": "#/components/schemas/LgpsCivicaPayrollNumber" - }, - "casualHours": { - "$ref": "#/components/schemas/LgpsCivicaCasualHours" - }, - "omitHeaderLine": { - "type": "boolean" - }, - "includeFolderNo": { - "type": "boolean" - }, - "excludeSchoolEmployerName": { - "type": "boolean" - }, - "addressesForNewJoinersOnly": { - "type": "boolean" - }, - "proRatePtHoursWeeksWorked": { - "type": "boolean" - }, - "fullTimeHoursAsOneHundred": { - "type": "boolean" - }, - "includeWeeksWorkedColumns": { - "type": "boolean" + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenRequest" + } + } } }, - "additionalProperties": false - }, - "Contract.PensionSchemeReportOptionsLgpsCivicaUpmResponse": { - "type": "object", - "properties": { - "payrollNumber": { - "$ref": "#/components/schemas/LgpsCivicaPayrollNumber" - }, - "casualHours": { - "$ref": "#/components/schemas/LgpsCivicaCasualHours" - }, - "omitHeaderLine": { - "type": "boolean" - }, - "includeFolderNo": { - "type": "boolean" - }, - "excludeSchoolEmployerName": { - "type": "boolean" - }, - "addressesForNewJoinersOnly": { - "type": "boolean" - }, - "proRatePtHoursWeeksWorked": { - "type": "boolean" - }, - "fullTimeHoursAsOneHundred": { - "type": "boolean" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenResponse" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenResponse" + } + } + }, + "description": "Created" }, - "includeWeeksWorkedColumns": { - "type": "boolean" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false - }, - "Contract.PensionSchemeReportOptionsLgpsIConnectRequest": { - "type": "object", - "properties": { - "fileType": { - "$ref": "#/components/schemas/LgpsIConnectFileType" - }, - "payrollReference1": { - "$ref": "#/components/schemas/LgpsIConnectPayrollReference" - }, - "payrollReference2": { - "$ref": "#/components/schemas/LgpsIConnectPayrollReference" - }, - "payrollReference3": { - "$ref": "#/components/schemas/LgpsIConnectPayrollReference" - }, - "populateEmailAddress": { - "type": "boolean" - }, - "populateTelephoneNumber": { - "type": "boolean" - }, - "populateMobileNumber": { - "type": "boolean" - }, - "populateWorksPlaceName": { - "type": "boolean" - }, - "populateWorksAddress": { - "type": "boolean" - }, - "populateWorksEmailAddress": { - "type": "boolean" - }, - "includeEmploymentBreaks": { - "type": "boolean" - }, - "breakReasonSmpIndicatorOnly": { - "type": "boolean" - }, - "populateMaritalStatus": { - "type": "boolean" - }, - "includeAeQualifyingEarnings": { - "type": "boolean" - }, - "proRatePtHoursByTermTimeWeeks": { - "type": "boolean" - }, - "ignoreTermTimeWeeksForFteFinalPay": { - "type": "boolean" - }, - "showFteAnnualSalaryForFteFinalPay": { - "type": "boolean" - }, - "casualStaffHoursAsOne": { - "type": "boolean" - }, - "casualStaffIndicatorAsY": { - "type": "boolean" - }, - "ignoreHours": { - "type": "boolean" + "summary": "Create Journal Token", + "tags": [ + "JournalToken" + ] + } + }, + "/employers/{employerId}/journaltokens/{costCentreId}/costcentrejournaloverrides": { + "get": { + "description": "List Journal Overrides for an CostCentre.", + "operationId": "GetCostCentreJournalOverridesListJournalToken", + "parameters": [ + { + "description": "The Id of the Employer for which you want list of Journal Overrides", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "forceUpperCase": { - "type": "boolean" + { + "description": "The Id of the CostCentre for which you want list of Journal Overrides", + "in": "path", + "name": "costCentreId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponseItem" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponseItem" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponseItem" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "salaryType": { - "$ref": "#/components/schemas/LgpsIConnectSalaryType" + "400": { + "description": "Bad Request" }, - "customText": { - "type": "string", - "nullable": true + "404": { + "description": "Employer or CostCentre Not Found" } }, - "additionalProperties": false + "summary": "List CostCentre Journal Overrides", + "tags": [ + "JournalToken" + ] }, - "Contract.PensionSchemeReportOptionsLgpsIConnectResponse": { - "type": "object", - "properties": { - "fileType": { - "$ref": "#/components/schemas/LgpsIConnectFileType" - }, - "payrollReference1": { - "$ref": "#/components/schemas/LgpsIConnectPayrollReference" - }, - "payrollReference2": { - "$ref": "#/components/schemas/LgpsIConnectPayrollReference" - }, - "payrollReference3": { - "$ref": "#/components/schemas/LgpsIConnectPayrollReference" - }, - "populateEmailAddress": { - "type": "boolean" - }, - "populateTelephoneNumber": { - "type": "boolean" - }, - "populateMobileNumber": { - "type": "boolean" - }, - "populateWorksPlaceName": { - "type": "boolean" - }, - "populateWorksAddress": { - "type": "boolean" - }, - "populateWorksEmailAddress": { - "type": "boolean" - }, - "includeEmploymentBreaks": { - "type": "boolean" - }, - "breakReasonSmpIndicatorOnly": { - "type": "boolean" - }, - "populateMaritalStatus": { - "type": "boolean" - }, - "includeAeQualifyingEarnings": { - "type": "boolean" - }, - "proRatePtHoursByTermTimeWeeks": { - "type": "boolean" - }, - "ignoreTermTimeWeeksForFteFinalPay": { - "type": "boolean" - }, - "showFteAnnualSalaryForFteFinalPay": { - "type": "boolean" - }, - "casualStaffHoursAsOne": { - "type": "boolean" - }, - "casualStaffIndicatorAsY": { - "type": "boolean" - }, - "ignoreHours": { - "type": "boolean" + "post": { + "description": "Create Journal Overrides for an CostCentre.", + "operationId": "CreateCostCentreJournalOverridesJournalToken", + "parameters": [ + { + "description": "The Id of the Employer for which you want to create Journal Overrides", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "forceUpperCase": { - "type": "boolean" + { + "description": "The Id of the CostCentre for which you want to create Journal Overrides", + "in": "path", + "name": "costCentreId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesRequest" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesRequest" + }, + "type": "array" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponse" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponse" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponse" + }, + "type": "array" + } + } + }, + "description": "Created" }, - "salaryType": { - "$ref": "#/components/schemas/LgpsIConnectSalaryType" + "400": { + "description": "Bad Request" }, - "customText": { - "type": "string", - "nullable": true + "404": { + "description": "Employer or CostCentre Not Found" } }, - "additionalProperties": false + "summary": "Create CostCentre Journal Overrides", + "tags": [ + "JournalToken" + ] }, - "Contract.PensionSchemeRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "provider": { - "$ref": "#/components/schemas/Contract.PensionProviderRequest" - }, - "administrator": { - "$ref": "#/components/schemas/Contract.PensionAdministratorRequest" - }, - "pensionRule": { - "$ref": "#/components/schemas/PensionRule" - }, - "qualifyingScheme": { - "type": "boolean", - "description": "Set to true if this is a Qualifying Scheme for Auto Enrolment" - }, - "disableAeLetters": { - "type": "boolean", - "description": "Set to true if the provider deals with AutoEnrolment Letters and therefore the system should not generate them" - }, - "subtractBasicRateTax": { - "type": "boolean" - }, - "payMethod": { - "$ref": "#/components/schemas/PayMethod" - }, - "bankDetails": { - "$ref": "#/components/schemas/Contract.BankDetails" - }, - "useCustomPayCodes": { - "type": "boolean", - "description": "If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable\r\nwe'll instead treat it as pensionable if the Code is included in CustomPayCodes" - }, - "useCustomPayCodesForTierablePay": { - "type": "boolean", - "description": "If set to true then rather than using the setting on the PayCode to determine if the pay is tierable\r\nwe'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes" - }, - "customPayCodes": { - "type": "array", - "items": { + "put": { + "description": "Updates Journal Overrides for the CostCentre.", + "operationId": "UpdateCostCentreJournalOverridesJournalToken", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update Journal Overrides", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", "type": "string" - }, - "description": "If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code\r\nthat we'll treat as being pensionable.", - "nullable": true + } }, - "tierablePayCustomPayCodes": { - "type": "array", - "items": { + { + "description": "The Id of the CostCentre for which you want to update Journal Overrides", + "in": "path", + "name": "costCentreId", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesUpdateRequest" + }, + "type": "array" + } }, - "description": "If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code\r\nthat we'll treat as being tierable.", - "nullable": true - }, - "workerGroups": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.WorkerGroupRequest" + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesUpdateRequest" + }, + "type": "array" + } }, - "description": "A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup", - "nullable": true - }, - "externalDataProviderId": { - "$ref": "#/components/schemas/ExternalDataProviderId" - }, - "externalDataCompany": { - "$ref": "#/components/schemas/Contract.ExternalDataCompanyRequest" - }, - "displayName": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "payCodeType": { - "$ref": "#/components/schemas/PensionPayCode" - }, - "tierablePayPayCodeType": { - "$ref": "#/components/schemas/PensionPayCode" - }, - "payCodeSetUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "tierablePayPayCodeSetUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "paymentDateRule": { - "$ref": "#/components/schemas/PaymentDateRule" - }, - "paymentDateDayOfWeek": { - "$ref": "#/components/schemas/DayOfWeek" - }, - "paymentDateDayOfMonth": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "reportOptionsLgpsIConnect": { - "$ref": "#/components/schemas/Contract.PensionSchemeReportOptionsLgpsIConnectRequest" - }, - "reportOptionsLgpsCivicaUpm": { - "$ref": "#/components/schemas/Contract.PensionSchemeReportOptionsLgpsCivicaUpmRequest" - }, - "deficitValueOrdinal": { - "type": "integer", - "description": "The Ordinal used to identify the PaySchedule which the Deficit will be against", - "format": "int32", - "nullable": true - }, - "deficitValue": { - "type": "number", - "description": "The Defict value that will be deducted in a PaySchedule", - "format": "double", - "nullable": true + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesUpdateRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesUpdateRequest" + }, + "type": "array" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponse" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponse" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.CostCentreJournalOverridesResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "includeDeficitValue": { - "type": "boolean", - "description": "Set to true if this a Deficit Payment needs to be assigned to a PaySchedule" + "400": { + "description": "Bad Request" }, - "deficitValuePayPeriod": { - "$ref": "#/components/schemas/PayPeriods" + "404": { + "description": "Employer or CostCentre Not Found" + } + }, + "summary": "Update CostCentre Journal Overrides", + "tags": [ + "JournalToken" + ] + } + }, + "/employers/{employerId}/journaltokens/{departmentId}/departmentjournaloverrides": { + "get": { + "description": "List Journal Overrides for an Department.", + "operationId": "GetDepartmentJournalOverridesListJournalToken", + "parameters": [ + { + "description": "The Id of the Employer for which you want list of Journal Overrides", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "nominalCodeMappings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PensionSchemeNominalCodeMappingRequest" + { + "description": "The Id of the Department for which you want list of Journal Overrides", + "in": "path", + "name": "departmentId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponseItem" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponseItem" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponseItem" + }, + "type": "array" + } + } }, - "description": "The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration", - "nullable": true + "description": "Success" + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Employer or Department Not Found" } }, - "additionalProperties": false + "summary": "List Department Journal Overrides", + "tags": [ + "JournalToken" + ] }, - "Contract.PensionSchemeResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "provider": { - "$ref": "#/components/schemas/Contract.PensionProviderResponse" - }, - "administrator": { - "$ref": "#/components/schemas/Contract.PensionAdministratorResponse" - }, - "pensionRule": { - "$ref": "#/components/schemas/PensionRule" - }, - "qualifyingScheme": { - "type": "boolean", - "description": "Set to true if this is a Qualifying Scheme for Auto Enrolment" - }, - "disableAeLetters": { - "type": "boolean", - "description": "Set to true if the provider deals with AutoEnrolment Letters and therefore the system should not generate them" - }, - "subtractBasicRateTax": { - "type": "boolean" - }, - "payMethod": { - "$ref": "#/components/schemas/PayMethod" - }, - "bankDetails": { - "$ref": "#/components/schemas/Contract.BankDetails" - }, - "useCustomPayCodes": { - "type": "boolean", - "description": "If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable\r\nwe'll instead treat it as pensionable if the Code is included in CustomPayCodes" - }, - "useCustomPayCodesForTierablePay": { - "type": "boolean", - "description": "If set to true then rather than using the setting on the PayCode to determine if the pay is tierable\r\nwe'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes" - }, - "customPayCodes": { - "type": "array", - "items": { + "post": { + "description": "Create Journal Overrides for an Department.", + "operationId": "CreateDepartmentJournalOverridesJournalToken", + "parameters": [ + { + "description": "The Id of the Employer for which you want to create Journal Overrides", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", "type": "string" - }, - "description": "If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code\r\nthat we'll treat as being pensionable.", - "nullable": true + } }, - "tierablePayCustomPayCodes": { - "type": "array", - "items": { + { + "description": "The Id of the Department for which you want to create Journal Overrides", + "in": "path", + "name": "departmentId", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesRequest" + }, + "type": "array" + } }, - "description": "If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code\r\nthat we'll treat as being tierable.", - "nullable": true - }, - "workerGroups": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.WorkerGroupResponse" + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesRequest" + }, + "type": "array" + } }, - "description": "A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup", - "nullable": true - }, - "externalDataProviderId": { - "$ref": "#/components/schemas/ExternalDataProviderId" - }, - "externalDataCompany": { - "$ref": "#/components/schemas/Contract.ExternalDataCompanyResponse" - }, - "displayName": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "payCodeType": { - "$ref": "#/components/schemas/PensionPayCode" - }, - "tierablePayPayCodeType": { - "$ref": "#/components/schemas/PensionPayCode" - }, - "payCodeSetUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "tierablePayPayCodeSetUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "paymentDateRule": { - "$ref": "#/components/schemas/PaymentDateRule" - }, - "paymentDateDayOfWeek": { - "$ref": "#/components/schemas/DayOfWeek" - }, - "paymentDateDayOfMonth": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "reportOptionsLgpsIConnect": { - "$ref": "#/components/schemas/Contract.PensionSchemeReportOptionsLgpsIConnectResponse" - }, - "reportOptionsLgpsCivicaUpm": { - "$ref": "#/components/schemas/Contract.PensionSchemeReportOptionsLgpsCivicaUpmResponse" - }, - "deficitValueOrdinal": { - "type": "integer", - "description": "The Ordinal used to identify the PaySchedule which the Deficit will be against", - "format": "int32", - "nullable": true - }, - "deficitValue": { - "type": "number", - "description": "The Defict value that will be deducted in a PaySchedule", - "format": "double", - "nullable": true - }, - "includeDeficitValue": { - "type": "boolean", - "description": "Set to true if this a Deficit Payment needs to be assigned to a PaySchedule" - }, - "deficitValuePayPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "nominalCodeMappings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.PensionSchemeNominalCodeMappingResponse" + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesRequest" + }, + "type": "array" + } }, - "description": "The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration", - "nullable": true + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesRequest" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "Contract.PensionSelectionRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "pensionSchemeId": { - "type": "string", - "format": "uuid" - }, - "workerGroupId": { - "type": "string", - "format": "uuid" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponse" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponse" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponse" + }, + "type": "array" + } + } + }, + "description": "Created" }, - "pensionScheme": { - "$ref": "#/components/schemas/Contract.PensionSchemeRequest" + "400": { + "description": "Bad Request" }, - "autoEnrolled": { - "type": "boolean", - "description": "[readonly] Is True if the employee joined this Pension due to an AutoEnrolment action" + "404": { + "description": "Employer or Department Not Found" } }, - "additionalProperties": false + "summary": "Create Department Journal Overrides", + "tags": [ + "JournalToken" + ] }, - "Contract.PensionSelectionResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "pensionSchemeId": { - "type": "string", - "format": "uuid" + "put": { + "description": "Updates Journal Overrides for the Department.", + "operationId": "UpdateDepartmentJournalOverridesJournalToken", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update Journal Overrides", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "workerGroupId": { - "type": "string", - "format": "uuid" + { + "description": "The Id of the Department for which you want to update Journal Overrides", + "in": "path", + "name": "departmentId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesUpdateRequest" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesUpdateRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesUpdateRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesUpdateRequest" + }, + "type": "array" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponse" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponse" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.DepartmentJournalOverridesResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "pensionScheme": { - "$ref": "#/components/schemas/Contract.PensionSchemeResponse" + "400": { + "description": "Bad Request" }, - "autoEnrolled": { - "type": "boolean", - "description": "[readonly] Is True if the employee joined this Pension due to an AutoEnrolment action" + "404": { + "description": "Employer or Department Not Found" } }, - "additionalProperties": false - }, - "Contract.PensionerPayroll": { - "type": "object", - "properties": { - "inReceiptOfPension": { - "type": "boolean", - "description": "If set to true then the FPS will have the OccPenInd flag set to 'yes'" - }, - "bereaved": { - "type": "boolean", - "description": "Indicator that Occupational Pension is being paid because they are a recently bereaved Spouse/Civil Partner" + "summary": "Update Department Journal Overrides", + "tags": [ + "JournalToken" + ] + } + }, + "/employers/{employerId}/journaltokens/{id}": { + "delete": { + "description": "Deletes the specified Journal Token.", + "operationId": "DeleteJournalToken", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "amount": { - "type": "number", - "description": "Annual amount of occupational pension", - "format": "double" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "startDate": { - "type": "string", - "description": "Start date of occupational Pension", - "format": "date", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete Journal Token", + "tags": [ + "JournalToken" + ] }, - "Contract.PersonalDetailsRequest": { - "required": [ - "dateOfBirth", - "gender", - "maritalStatus" - ], - "type": "object", - "properties": { - "address": { - "$ref": "#/components/schemas/Contract.Address" - }, - "maritalStatus": { - "$ref": "#/components/schemas/MaritalStatus" - }, - "title": { - "maxLength": 30, - "type": "string", - "nullable": true - }, - "firstName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "middleName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "lastName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "alternativeEmail": { - "maxLength": 100, - "type": "string", - "format": "email", - "nullable": true - }, - "previousSurName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "email": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "emailPayslip": { - "type": "boolean", - "description": "If set to true then the employees Payslip will be sent by email when a PayRun is finalised." - }, - "pdfPassword": { - "type": "string", - "description": "Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property.", - "nullable": true - }, - "pdfPasswordType": { - "$ref": "#/components/schemas/PdfPasswordType" - }, - "emailStatement": { - "type": "boolean", - "description": "Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted." - }, - "photoUrl": { - "maxLength": 250, - "type": "string", - "nullable": true - }, - "telephone": { - "maxLength": 30, - "type": "string", - "nullable": true - }, - "photoSasUrl": { - "type": "string", - "nullable": true - }, - "mobile": { - "maxLength": 30, - "type": "string", - "nullable": true - }, - "dateOfBirth": { - "type": "string", - "format": "date" - }, - "gender": { - "$ref": "#/components/schemas/Gender" + "get": { + "description": "Get Specified Journal Token for an Employer.", + "operationId": "GetJournalToken", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get Journal Token", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "niNumber": { - "maxLength": 15, - "type": "string", - "nullable": true + { + "description": "The Id of the Journal Tokens for which you want to get Journal Token", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenResponse" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenResponse" + } + } + }, + "description": "Success" }, - "passportNumber": { - "maxLength": 25, - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" + } + }, + "summary": "Get Journal Token", + "tags": [ + "JournalToken" + ] + }, + "put": { + "description": "Updates Specified Journal Token for the Employer.", + "operationId": "UpdateJournalToken", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "partnerDetails": { - "$ref": "#/components/schemas/Contract.PartnerDetails" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenRequest" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenResponse" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Contract.JournalTokenResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.PersonalDetailsResponse": { - "required": [ - "dateOfBirth", - "gender", - "maritalStatus" + "summary": "Update Journal Token", + "tags": [ + "JournalToken" + ] + } + }, + "/employers/{employerId}/occupationalpolicies": { + "get": { + "description": "Lists all Occupational Policies for an Employer.", + "operationId": "IndexOccupationalPolicy", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "object", - "properties": { - "statePensionAge": { - "type": "integer", - "description": "Automatically calculated.", - "format": "int32" - }, - "address": { - "$ref": "#/components/schemas/Contract.Address" - }, - "maritalStatus": { - "$ref": "#/components/schemas/MaritalStatus" - }, - "title": { - "maxLength": 30, - "type": "string", - "nullable": true - }, - "firstName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "middleName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "lastName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "alternativeEmail": { - "maxLength": 100, - "type": "string", - "format": "email", - "nullable": true - }, - "previousSurName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "email": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "emailPayslip": { - "type": "boolean", - "description": "If set to true then the employees Payslip will be sent by email when a PayRun is finalised." - }, - "pdfPassword": { - "type": "string", - "description": "Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property.", - "nullable": true - }, - "pdfPasswordType": { - "$ref": "#/components/schemas/PdfPasswordType" - }, - "emailStatement": { - "type": "boolean", - "description": "Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted." - }, - "photoUrl": { - "maxLength": 250, - "type": "string", - "nullable": true - }, - "telephone": { - "maxLength": 30, - "type": "string", - "nullable": true - }, - "photoSasUrl": { - "type": "string", - "nullable": true - }, - "mobile": { - "maxLength": 30, - "type": "string", - "nullable": true - }, - "dateOfBirth": { - "type": "string", - "format": "date" - }, - "gender": { - "$ref": "#/components/schemas/Gender" - }, - "niNumber": { - "maxLength": 15, - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "passportNumber": { - "maxLength": 25, - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "partnerDetails": { - "$ref": "#/components/schemas/Contract.PartnerDetails" + "404": { + "description": "Employer or Occupational Policy Not Found" } }, - "additionalProperties": false + "summary": "List Occupational Policies", + "tags": [ + "OccupationalPolicy" + ] }, - "Contract.ReapplyDpsNoticeResponse": { - "type": "object", - "properties": { - "numberOfAppliedNotices": { - "type": "integer", - "format": "int32" + "post": { + "description": "Creates a new Occupational Policy for the Employer.", + "operationId": "CreateOccupationalPolicy", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/OccupationalPolicy" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalPolicy" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/OccupationalPolicy" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalPolicy" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalPolicy" + } + } + }, + "description": "Created" }, - "numberOfFailedNotices": { - "type": "integer", - "format": "int32" + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Employer or Occupational Policy Not Found" } }, - "additionalProperties": false - }, - "Contract.ReportTemplateColumnRequest": { - "type": "object", - "properties": { - "position": { - "type": "integer", - "description": "The position of the column in the template", - "format": "int32" + "summary": "Create Occupational Policy", + "tags": [ + "OccupationalPolicy" + ] + } + }, + "/employers/{employerId}/occupationalpolicies/{id}": { + "delete": { + "description": "Deletes the specified Occupational Policy.", + "operationId": "DeleteOccupationalPolicy", + "parameters": [ + { + "description": "The Id of the Employer to which the Occupational Policy belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "header": { - "type": "string", - "description": "The header text of the column", - "nullable": true + { + "description": "The Id of the Occupational Policy which you want to fetch", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "content": { - "type": "string", - "description": "The content associated with the column", - "nullable": true + "400": { + "description": "Bad Request" }, - "type": { - "$ref": "#/components/schemas/ReportTemplateColumnType" + "404": { + "description": "Employer or Occupational Policy Not Found" } }, - "additionalProperties": false + "summary": "Delete Occupational Policy", + "tags": [ + "OccupationalPolicy" + ] }, - "Contract.ReportTemplateColumnResponse": { - "type": "object", - "properties": { - "position": { - "type": "integer", - "description": "The position of the column in the template", - "format": "int32" + "get": { + "description": "Gets the Occupational Policy specified.", + "operationId": "GetOccupationalPolicy", + "parameters": [ + { + "description": "The Id of the Employer to which the Occupational Policy belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "header": { - "type": "string", - "description": "The header text of the column", - "nullable": true + { + "description": "The Id of the Occupational Policy which you want to fetch", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalPolicy" + } + } + }, + "description": "Success" }, - "content": { - "type": "string", - "description": "The content associated with the column", - "nullable": true + "400": { + "description": "Bad Request" }, - "type": { - "$ref": "#/components/schemas/ReportTemplateColumnType" + "404": { + "description": "Employer or Occupational Policy Not Found" } }, - "additionalProperties": false + "summary": "Get Occupational Policy", + "tags": [ + "OccupationalPolicy" + ] }, - "Contract.ReportTemplateContentDictionaryResponse": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/ReportTemplateColumnType" + "put": { + "description": "Updates a Occupational Policy for the Employer.", + "operationId": "UpdateOccupationalPolicy", + "parameters": [ + { + "description": "The Id of the Employer to which the Occupational Policy belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, + { + "description": "The Id of the Occupational Policy which you want to fetch", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.ReportTemplateContentResponse" + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/OccupationalPolicy" + } }, - "description": "The content list of report template column", - "nullable": true + "application/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalPolicy" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/OccupationalPolicy" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalPolicy" + } + } } }, - "additionalProperties": false - }, - "Contract.ReportTemplateContentResponse": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the report template content", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalPolicy" + } + } + }, + "description": "Success" }, - "value": { - "type": "string", - "description": "The value of the report template content, which will be enclosed in curly braces", - "nullable": true + "400": { + "description": "Bad Request" }, - "groupName": { - "type": "string", - "description": "Group name of the report template content", - "nullable": true + "404": { + "description": "Employer or Occupational Policy Not Found" } }, - "additionalProperties": false - }, - "Contract.ReportTemplateRequest": { - "required": [ - "templateName" - ], - "type": "object", - "properties": { - "templateName": { - "minLength": 1, - "type": "string", - "description": "The name of the report template" - }, - "description": { - "type": "string", - "description": "The description of the report template", - "nullable": true + "summary": "Update Occupational Policy", + "tags": [ + "OccupationalPolicy" + ] + } + }, + "/employers/{employerId}/occupationalsickleavehistory/employees/{employeeId}": { + "get": { + "description": "Lists all OccupationalSickLeaveHistory for the Employee specified", + "operationId": "OccupationalSickLeaveHistoryOccupationalSickLeaveHistory", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "reportTemplateColumns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.ReportTemplateColumnRequest" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "description": "The list of the report template columns", - "nullable": true + "description": "Success" } }, - "additionalProperties": false + "summary": "List OccupationalSickLeaveHistory", + "tags": [ + "OccupationalSickLeaveHistory" + ] }, - "Contract.ReportTemplateResponse": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Unique Id of report template column", - "format": "uuid" - }, - "userName": { - "type": "string", - "description": "Name of the user who created the report template", - "nullable": true - }, - "templateName": { - "type": "string", - "description": "Name of the report template", - "nullable": true - }, - "description": { - "type": "string", - "description": "Description of the report template", - "nullable": true + "post": { + "description": "Creates Occupational sick leave history for the Employee.", + "operationId": "CreateOccupationalSickLeaveHistory", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "reportTemplateColumns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.ReportTemplateColumnResponse" + { + "description": "The Id of the Employee to which the Occupational sick leave history belongs", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + } }, - "description": "List of the report template column", - "nullable": true + "description": "Created" }, - "updatedDate": { - "type": "string", - "description": "Updated date of the report template column", - "format": "date", - "nullable": true + "400": { + "description": "Bad Request" }, - "createdDate": { - "type": "string", - "description": "Created date of the report template column", - "format": "date" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.RightToWork": { - "type": "object", - "properties": { - "checked": { - "type": "boolean" - }, - "documentType": { - "$ref": "#/components/schemas/RightToWorkDocumentType" - }, - "documentRef": { - "maxLength": 80, - "type": "string", - "nullable": true + "summary": "Create OccupationalSickLeaveHistory", + "tags": [ + "OccupationalSickLeaveHistory" + ] + } + }, + "/employers/{employerId}/occupationalsickleavehistory/employees/{employeeId}/{id}": { + "delete": { + "description": "Deletes the specified Occupational leave history record.", + "operationId": "DeleteOccupationalSickLeaveHistory", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "documentExpiry": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "note": { - "maxLength": 200, - "type": "string", - "nullable": true + { + "description": "The Id of the Occupational sick leave which you want to fetch", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.RtiAgentRequest": { - "type": "object", - "properties": { - "agentId": { - "type": "string", - "nullable": true - }, - "company": { - "type": "string", - "nullable": true + ], + "responses": { + "204": { + "description": "No Content" }, - "address": { - "$ref": "#/components/schemas/Contract.Address" + "400": { + "description": "Bad Request" }, - "contact": { - "$ref": "#/components/schemas/Contract.RtiContactRequest" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Delete OccupationalSickLeaveHistory", + "tags": [ + "OccupationalSickLeaveHistory" + ] }, - "Contract.RtiAgentResponse": { - "type": "object", - "properties": { - "agentId": { - "type": "string", - "nullable": true - }, - "company": { - "type": "string", - "nullable": true + "get": { + "description": "Gets a occupational sick leave for the employee and employer.", + "operationId": "GetOccupationalSickLeaveHistory", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "address": { - "$ref": "#/components/schemas/Contract.Address" + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "contact": { - "$ref": "#/components/schemas/Contract.RtiContactResponse" + { + "description": "The Id of the Occupational leave history which you want to fetch", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get OccupationalSickLeaveHistory", + "tags": [ + "OccupationalSickLeaveHistory" + ] }, - "Contract.RtiContactRequest": { - "type": "object", - "properties": { - "firstName": { - "type": "string", - "nullable": true - }, - "lastName": { - "type": "string", - "nullable": true + "put": { + "description": "Updates a occupational sick leave for the employee and employer.", + "operationId": "UpdateOccupationalSickLeaveHistory", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "email": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "telephone": { - "type": "string", - "nullable": true + { + "description": "The Id of the Occupational leave history which you want to fetch", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + } } }, - "additionalProperties": false - }, - "Contract.RtiContactResponse": { - "type": "object", - "properties": { - "firstName": { - "type": "string", - "nullable": true - }, - "lastName": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + } + } + }, + "description": "Success" }, - "email": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "telephone": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.RtiEmployeeAddress": { - "type": "object", - "properties": { - "line": { - "type": "array", - "items": { + "summary": "Update OccupationalSickLeaveHistory", + "tags": [ + "OccupationalSickLeaveHistory" + ] + } + }, + "/employers/{employerId}/occupationalsickleavehistory/import": { + "post": { + "description": "Uploads new Occupational sick leave history for the Employer against specific occupational policy.", + "operationId": "UploadOSPHistoryOccupationalSickLeaveHistory", + "parameters": [ + { + "description": "The Id of the Employer to which the occupational sick leave history is to be uploaded.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + }, + "type": "array" + } }, - "nullable": true - }, - "postcode": { - "type": "string", - "nullable": true - }, - "postCode": { - "type": "string", - "nullable": true - }, - "ukPostcode": { - "type": "string", - "nullable": true - }, - "country": { - "type": "string", - "nullable": true - }, - "foreignCountry": { - "type": "string", - "nullable": true + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/OccupationalSickLeaveHistory" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "Contract.RtiEmployeeName": { - "type": "object", - "properties": { - "ttl": { - "type": "string", - "nullable": true - }, - "fore": { - "type": "array", - "items": { - "type": "string" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true - }, - "initials": { - "type": "string", - "nullable": true + "description": "Created" }, - "sur": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false - }, - "Contract.RtiSubmissionSettingsRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid" - }, - "senderType": { - "$ref": "#/components/schemas/RtiSenderType" - }, - "senderId": { - "type": "string", - "description": "The SenderId used to submit RTI documents to HMRC", - "nullable": true - }, - "password": { - "type": "string", - "description": "The Password used to submit RTI documents to HMRC", - "nullable": true - }, - "excludeNilPaid": { - "type": "boolean", - "description": "Whether or not to include Employees paid a zero amount on your FPS" - }, - "includeHashCrossRef": { - "type": "boolean", - "description": "[readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions\r\nThis is automatically set to true if you use a bank payments CSV format that supports it\r\nor set to false if not" - }, - "autoSubmitFps": { - "type": "boolean", - "description": "If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun" - }, - "testInLive": { - "type": "boolean", - "description": "Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it" - }, - "useTestGateway": { - "type": "boolean", - "description": "If set to true then your RTI documents will be sent to HMRCs test services instead of the live service" - }, - "overrideTimestampValue": { - "type": "string", - "description": "If a value is provided then it will be used as the timestamp on the RTI submission. This would normally only be used for testing purposes.", - "nullable": true - }, - "contact": { - "$ref": "#/components/schemas/Contract.RtiContactRequest" - }, - "agent": { - "$ref": "#/components/schemas/Contract.RtiAgentRequest" - }, - "allowLinkedEps": { - "type": "boolean", - "description": "If set to true this will allow you to submit a combined Employer Payment Summary" - }, - "shouldCompressFps": { - "type": "boolean", - "description": "If set to true this will compress the FPS before submitting to HMRC" + "summary": "Upload OccupationalSickLeaveHistory", + "tags": [ + "OccupationalSickLeaveHistory" + ] + } + }, + "/employers/{employerId}/occupationalsickleavehistory/importfile": { + "post": { + "description": "Import Occupational Sick Leave History from a CSV file.", + "operationId": "ImportOccupationalSickLeaveHistoryCsvOccupationalSickLeaveHistory", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } } }, - "additionalProperties": false - }, - "Contract.RtiSubmissionSettingsResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "senderType": { - "$ref": "#/components/schemas/RtiSenderType" - }, - "senderId": { - "type": "string", - "description": "The SenderId used to submit RTI documents to HMRC", - "nullable": true - }, - "password": { - "type": "string", - "description": "The Password used to submit RTI documents to HMRC", - "nullable": true - }, - "excludeNilPaid": { - "type": "boolean", - "description": "Whether or not to include Employees paid a zero amount on your FPS" - }, - "includeHashCrossRef": { - "type": "boolean", - "description": "[readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions\r\nThis is automatically set to true if you use a bank payments CSV format that supports it\r\nor set to false if not" - }, - "autoSubmitFps": { - "type": "boolean", - "description": "If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun" - }, - "testInLive": { - "type": "boolean", - "description": "Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it" - }, - "useTestGateway": { - "type": "boolean", - "description": "If set to true then your RTI documents will be sent to HMRCs test services instead of the live service" - }, - "overrideTimestampValue": { - "type": "string", - "description": "If a value is provided then it will be used as the timestamp on the RTI submission. This would normally only be used for testing purposes.", - "nullable": true - }, - "contact": { - "$ref": "#/components/schemas/Contract.RtiContactResponse" - }, - "agent": { - "$ref": "#/components/schemas/Contract.RtiAgentResponse" - }, - "allowLinkedEps": { - "type": "boolean", - "description": "If set to true this will allow you to submit a combined Employer Payment Summary" - }, - "shouldCompressFps": { - "type": "boolean", - "description": "If set to true this will compress the FPS before submitting to HMRC" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + }, + "text/plain": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.ShiftWorkingPatternDayRequest": { - "type": "object", - "properties": { - "day": { - "type": "integer", - "format": "int32" - }, - "isWorkingDay": { - "type": "boolean" - }, - "hours": { - "type": "number", - "format": "double" + "summary": "Import OccupationalSickLeaveHistory from csv file", + "tags": [ + "OccupationalSickLeaveHistory" + ] + } + }, + "/employers/{employerId}/paycodes": { + "get": { + "description": "Lists all PayCodes for the Employer specified.", + "operationId": "IndexPayCode", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list Pay Codes", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "workingPatternHoursType": { - "$ref": "#/components/schemas/WorkingPatternHoursType" + { + "description": "If provided and set to true then full details of all Pay Codes will be returned instead of just a summary", + "in": "query", + "name": "verbose", + "schema": { + "default": false, + "type": "boolean" + } } - }, - "additionalProperties": false - }, - "Contract.ShiftWorkingPatternDayResponse": { - "type": "object", - "properties": { - "day": { - "type": "integer", - "format": "int32" - }, - "isWorkingDay": { - "type": "boolean" - }, - "hours": { - "type": "number", - "format": "double" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayCode" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "List PayCodes", + "tags": [ + "PayCode" + ] }, - "Contract.SpinalPointRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the Spinal Point", - "nullable": true - }, - "number": { - "type": "integer", - "description": "Number of Spinal Point within the Scale", - "format": "int32" - }, - "annualValue": { - "type": "number", - "description": "Annual Value for the Spinal Point", - "format": "double" - }, - "annualValueAltMax": { - "type": "number", - "description": "Annual Value for the Spinal Point (Alternative Max Value)", - "format": "double" - }, - "annualValueLAInner": { - "type": "number", - "description": "Annual Value for the Spinal Point Inner London Allowance", - "format": "double" - }, - "annualValueLAInnerAltMax": { - "type": "number", - "description": "Annual Value for the Spinal Point Inner LA (Alt Max Value)", - "format": "double" - }, - "annualValueLAOuter": { - "type": "number", - "description": "Annual Value for the Spinal Point Outer London Allowance", - "format": "double" - }, - "annualValueLAOuterAltMax": { - "type": "number", - "description": "Annual Value for the Spinal Point Outer LA (Alt Max Value)", - "format": "double" - }, - "annualValueLAFringe": { - "type": "number", - "description": "Annual Value for the Spinal Point Fringe London Allowance", - "format": "double" - }, - "annualValueLAFringeAltMax": { - "type": "number", - "description": "Annual Value for the Spinal Point Fringe LA (Alt Max Value)", - "format": "double" - }, - "effectiveDate": { - "type": "string", - "description": "Date these rates became effective", - "format": "date" - }, - "predecessorId": { - "type": "string", - "description": "Spinal point predecessorId", - "format": "uuid", - "nullable": true + "post": { + "description": "Creates a new PayCode for the Employer.", + "operationId": "CreatePayCode", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + } } }, - "additionalProperties": false - }, - "Contract.SpinalPointResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Spinal Point identifier", - "format": "uuid" - }, - "finalAnnualValue": { - "type": "number", - "description": "Spinal Point Final Annual Value", - "format": "double" - }, - "name": { - "type": "string", - "description": "Name of the Spinal Point", - "nullable": true - }, - "number": { - "type": "integer", - "description": "Number of Spinal Point within the Scale", - "format": "int32" - }, - "annualValue": { - "type": "number", - "description": "Annual Value for the Spinal Point", - "format": "double" - }, - "annualValueAltMax": { - "type": "number", - "description": "Annual Value for the Spinal Point (Alternative Max Value)", - "format": "double" - }, - "annualValueLAInner": { - "type": "number", - "description": "Annual Value for the Spinal Point Inner London Allowance", - "format": "double" - }, - "annualValueLAInnerAltMax": { - "type": "number", - "description": "Annual Value for the Spinal Point Inner LA (Alt Max Value)", - "format": "double" - }, - "annualValueLAOuter": { - "type": "number", - "description": "Annual Value for the Spinal Point Outer London Allowance", - "format": "double" - }, - "annualValueLAOuterAltMax": { - "type": "number", - "description": "Annual Value for the Spinal Point Outer LA (Alt Max Value)", - "format": "double" - }, - "annualValueLAFringe": { - "type": "number", - "description": "Annual Value for the Spinal Point Fringe London Allowance", - "format": "double" - }, - "annualValueLAFringeAltMax": { - "type": "number", - "description": "Annual Value for the Spinal Point Fringe LA (Alt Max Value)", - "format": "double" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + } + }, + "description": "Created" }, - "effectiveDate": { - "type": "string", - "description": "Date these rates became effective", - "format": "date" + "400": { + "description": "Bad Request" }, - "predecessorId": { - "type": "string", - "description": "Spinal point predecessorId", - "format": "uuid", - "nullable": true + "404": { + "description": "Employer Not Found" } }, - "additionalProperties": false - }, - "Contract.SpinalPointUpdateRequest": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "description": "Name of the Spinal Point", - "nullable": true - }, - "number": { - "type": "integer", - "description": "Number of Spinal Point within the Scale", - "format": "int32" - }, - "annualValue": { - "type": "number", - "description": "Annual Value for the Spinal Point", - "format": "double" - }, - "annualValueAltMax": { - "type": "number", - "description": "Annual Value for the Spinal Point (Alternative Max Value)", - "format": "double" - }, - "annualValueLAInner": { - "type": "number", - "description": "Annual Value for the Spinal Point Inner London Allowance", - "format": "double" - }, - "annualValueLAInnerAltMax": { - "type": "number", - "description": "Annual Value for the Spinal Point Inner LA (Alt Max Value)", - "format": "double" - }, - "annualValueLAOuter": { - "type": "number", - "description": "Annual Value for the Spinal Point Outer London Allowance", - "format": "double" - }, - "annualValueLAOuterAltMax": { - "type": "number", - "description": "Annual Value for the Spinal Point Outer LA (Alt Max Value)", - "format": "double" - }, - "annualValueLAFringe": { - "type": "number", - "description": "Annual Value for the Spinal Point Fringe London Allowance", - "format": "double" - }, - "annualValueLAFringeAltMax": { - "type": "number", - "description": "Annual Value for the Spinal Point Fringe LA (Alt Max Value)", - "format": "double" - }, - "effectiveDate": { - "type": "string", - "description": "Date these rates became effective", - "format": "date" - }, - "predecessorId": { - "type": "string", - "description": "Spinal point predecessorId", - "format": "uuid", - "nullable": true + "summary": "Create PayCode", + "tags": [ + "PayCode" + ] + } + }, + "/employers/{employerId}/paycodes/nominalcodes": { + "get": { + "description": "Returns the list of mappings of PayCodes to NominalCodes", + "operationId": "NominalCodeMappingsPayCode", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get the mapping", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NominalCodeMapping" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get Nominal Code Mappings", + "tags": [ + "PayCode" + ] }, - "Contract.SpineAllowanceRequest": { - "type": "object", - "properties": { - "allowanceName": { - "type": "string", - "description": "Name of Allowance", - "nullable": true - }, - "allowanceType": { - "$ref": "#/components/schemas/AllowanceType" - }, - "allowanceUsualAnnualValue": { - "type": "number", - "description": "Value of Allowance Usual Annual", - "format": "double" - }, - "allowanceRangeLowerValue": { - "type": "number", - "description": "Value of Allowance Range Lower", - "format": "double" - }, - "allowanceRangeUpperValue": { - "type": "number", - "description": "Value of Allowance Range Upper", - "format": "double" - }, - "allowanceEffectiveDate": { - "type": "string", - "description": "Allowance Effective Date", - "format": "date" - }, - "allowanceAlwaysFTE": { - "type": "boolean", - "description": "Allowance Always FTE or Not" - }, - "payCode": { - "type": "string", - "description": "Pay Code", - "nullable": true - }, - "payCodeTitle": { - "type": "string", - "description": "Pay Code Title", - "nullable": true + "put": { + "description": "Updates the list of mappings of PayCodes to NominalCodes", + "operationId": "UpdateNominalCodeMappingsPayCode", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NominalCodeMapping" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NominalCodeMapping" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NominalCodeMapping" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NominalCodeMapping" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "Contract.SpineAllowanceResponse": { - "type": "object", - "properties": { - "allowanceName": { - "type": "string", - "description": "Name of Allowance", - "nullable": true - }, - "allowanceType": { - "$ref": "#/components/schemas/AllowanceType" - }, - "allowanceUsualAnnualValue": { - "type": "number", - "description": "Value of Allowance Usual Annual", - "format": "double" - }, - "allowanceRangeLowerValue": { - "type": "number", - "description": "Value of Allowance Range Lower", - "format": "double" - }, - "allowanceRangeUpperValue": { - "type": "number", - "description": "Value of Allowance Range Upper", - "format": "double" - }, - "allowanceEffectiveDate": { - "type": "string", - "description": "Allowance Effective Date", - "format": "date" - }, - "allowanceAlwaysFTE": { - "type": "boolean", - "description": "Allowance Always FTE or Not" - }, - "uniqueId": { - "type": "string", - "description": "Spine Allowance identifier", - "format": "uuid" - }, - "payCode": { - "type": "string", - "description": "Pay Code", - "nullable": true - }, - "payCodeTitle": { - "type": "string", - "description": "Pay Code Title", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NominalCodeMapping" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "Contract.SpineAllowanceUpdateRequest": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Spine Allowance identifier", - "format": "uuid" - }, - "allowanceName": { - "type": "string", - "description": "Name of Allowance", - "nullable": true - }, - "allowanceType": { - "$ref": "#/components/schemas/AllowanceType" - }, - "allowanceUsualAnnualValue": { - "type": "number", - "description": "Value of Allowance Usual Annual", - "format": "double" - }, - "allowanceRangeLowerValue": { - "type": "number", - "description": "Value of Allowance Range Lower", - "format": "double" - }, - "allowanceRangeUpperValue": { - "type": "number", - "description": "Value of Allowance Range Upper", - "format": "double" - }, - "allowanceEffectiveDate": { - "type": "string", - "description": "Allowance Effective Date", - "format": "date" - }, - "allowanceAlwaysFTE": { - "type": "boolean", - "description": "Allowance Always FTE or Not" - }, - "payCode": { - "type": "string", - "description": "Pay Code", - "nullable": true + "summary": "Updates Nominal Code Mappings", + "tags": [ + "PayCode" + ] + } + }, + "/employers/{employerId}/paycodes/paycode": { + "delete": { + "description": "Deletes the specified PayCode.", + "operationId": "DeletePayCodePayCode", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payCodeTitle": { - "type": "string", - "description": "Pay Code Title", - "nullable": true + { + "in": "query", + "name": "code", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false - }, - "Contract.StarterDetails": { - "required": [ - "startDate", - "starterDeclaration" ], - "type": "object", - "properties": { - "startDate": { - "type": "string", - "format": "date" - }, - "starterDeclaration": { - "$ref": "#/components/schemas/StarterDeclaration" - }, - "overseasEmployerDetails": { - "$ref": "#/components/schemas/Contract.OverseasEmployerDetails" + "responses": { + "204": { + "description": "No Content" }, - "pensionerPayroll": { - "$ref": "#/components/schemas/Contract.PensionerPayroll" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete PayCode", + "tags": [ + "PayCode" + ] }, - "Contract.TaxAndNi": { - "type": "object", - "properties": { - "niTable": { - "type": "string", - "description": "The appropriate NI letter for this Employee" - }, - "secondaryClass1NotPayable": { - "type": "boolean", - "description": "If set to true then no Employer NI will be paid for this Employee" - }, - "postgradLoan": { - "type": "boolean", - "description": "Set to true if the Employee needs to make Post Graduate Loan repayments" - }, - "postgraduateLoanStartDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "postgraduateLoanEndDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "studentLoan": { - "$ref": "#/components/schemas/StudentLoan" - }, - "studentLoanStartDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "studentLoanEndDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "taxCode": { - "type": "string", - "description": "The Tax Code for this Employee", - "nullable": true + "get": { + "description": "Gets the PayCode specified.", + "operationId": "GetPayCodePayCode", + "parameters": [ + { + "description": "The Id of the Employer to which the Pay Code belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "week1Month1": { - "type": "boolean", - "description": "Determines whether PAYE should be calculated on a Week1/Month1 basis instead of on a cumulative basis.\r\nThis is automatically set to false for any existing Employees when you start a new Tax Year." + { + "description": "The code of the Pay Code you want to retrieve.", + "in": "query", + "name": "code", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + } + }, + "description": "Success" }, - "foreignTaxCredit": { - "type": "boolean", - "description": "If set to True you are enabling the possibility to enter an amount on payslip so you can reduce UK Tax liabilities." + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Get PayCode", + "tags": [ + "PayCode" + ] }, - "Contract.TermCalendarRequest": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "Title of the Term Calendar", - "nullable": true + "put": { + "description": "Updates the details of an existing PayCode.", + "operationId": "UpdatePayCodePayCode", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "academicYearStartMonth": { - "$ref": "#/components/schemas/CalendarMonth" + { + "in": "query", + "name": "code", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + } } }, - "additionalProperties": false - }, - "Contract.TermCalendarResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Term Calendar identifier", - "format": "uuid" - }, - "title": { - "type": "string", - "description": "Title of the Term Calendar", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + } + }, + "description": "Success" }, - "academicYearStartMonth": { - "$ref": "#/components/schemas/CalendarMonth" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.TermCalendarYearRequest": { - "type": "object", - "properties": { - "autumnTermStartDate": { - "type": "string", - "description": "Autumn Term Start Date of Term Calendar Year View", - "format": "date" - }, - "autumnTermEndDate": { - "type": "string", - "description": "Autumn Term End Date of Term Calendar Year View", - "format": "date" - }, - "springTermStartDate": { - "type": "string", - "description": "Spring Term Start Date of Term Calendar Year View", - "format": "date" - }, - "springTermEndDate": { - "type": "string", - "description": "Spring Term End Date of Term Calendar Year View", - "format": "date" + "summary": "Update PayCode", + "tags": [ + "PayCode" + ] + } + }, + "/employers/{employerId}/paycodes/{code}": { + "delete": { + "description": "Deletes the specified PayCode.\r\nUse the other Delete endpoint that supports non-alphanumeric characters for a pay code", + "operationId": "DeletePayCode", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "summerTermStartDate": { - "type": "string", - "description": "Summer Term Start Date of Term Calendar Year View", - "format": "date" + { + "in": "path", + "name": "code", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "summerTermEndDate": { - "type": "string", - "description": "Summer Term End Date of Term Calendar Year View", - "format": "date" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete PayCode (deprecated)", + "tags": [ + "PayCode" + ] }, - "Contract.TermCalendarYearResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Term Calendar Year identifier", - "format": "uuid" - }, - "autumnTermStartDate": { - "type": "string", - "description": "Autumn Term Start Date of Term Calendar Year View", - "format": "date" - }, - "autumnTermEndDate": { - "type": "string", - "description": "Autumn Term End Date of Term Calendar Year View", - "format": "date" - }, - "springTermStartDate": { - "type": "string", - "description": "Spring Term Start Date of Term Calendar Year View", - "format": "date" - }, - "springTermEndDate": { - "type": "string", - "description": "Spring Term End Date of Term Calendar Year View", - "format": "date" + "get": { + "description": "Gets the PayCode specified.\r\nUse the other GET endpoint that supports non-alphanumeric characters for a pay code", + "operationId": "GetPayCode", + "parameters": [ + { + "description": "The Id of the Employer to which the Pay Code belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "summerTermStartDate": { - "type": "string", - "description": "Summer Term Start Date of Term Calendar Year View", - "format": "date" + { + "description": "The code of the Pay Code you want to retrieve.", + "in": "path", + "name": "code", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + } + }, + "description": "Success" }, - "summerTermEndDate": { - "type": "string", - "description": "Summer Term End Date of Term Calendar Year View", - "format": "date" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Get PayCode (deprecated)", + "tags": [ + "PayCode" + ] }, - "Contract.UmbrellaSettingsRequest": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "chargePerTimesheet": { - "type": "number", - "format": "double" - }, - "apprenticeshipLevyDednRate": { - "type": "number", - "format": "double" - }, - "holidayRate": { - "type": "number", - "format": "double" - }, - "dpsbCode": { - "type": "string", - "nullable": true - }, - "expensesCode": { - "type": "string", - "nullable": true - }, - "grossDeductionCode": { - "type": "string", - "nullable": true - }, - "holidayCode": { - "type": "string", - "nullable": true - }, - "cisFeeCode": { - "type": "string", - "nullable": true + "put": { + "description": "Updates the details of an existing PayCode.\r\nUse the other Update endpoint that supports non-alphanumeric characters for a pay code", + "operationId": "UpdatePayCode", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "detailFeeInComment": { - "type": "boolean" + { + "in": "path", + "name": "code", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + } } }, - "additionalProperties": false - }, - "Contract.UmbrellaSettingsResponse": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "chargePerTimesheet": { - "type": "number", - "format": "double" - }, - "apprenticeshipLevyDednRate": { - "type": "number", - "format": "double" - }, - "holidayRate": { - "type": "number", - "format": "double" - }, - "dpsbCode": { - "type": "string", - "nullable": true - }, - "expensesCode": { - "type": "string", - "nullable": true - }, - "grossDeductionCode": { - "type": "string", - "nullable": true - }, - "holidayCode": { - "type": "string", - "nullable": true - }, - "cisFeeCode": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayCode" + } + } + }, + "description": "Success" }, - "detailFeeInComment": { - "type": "boolean" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "Contract.UpdateEmployeeRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique id of the object", - "format": "uuid" - }, - "personalDetails": { - "$ref": "#/components/schemas/Contract.PersonalDetailsRequest" - }, - "employmentDetails": { - "$ref": "#/components/schemas/Contract.EmploymentDetailsRequest" - }, - "autoEnrolment": { - "$ref": "#/components/schemas/Contract.AutoEnrolmentRequest" - }, - "leaveSettings": { - "$ref": "#/components/schemas/Contract.EmployeeLeaveSettingsRequest" - }, - "rightToWork": { - "$ref": "#/components/schemas/Contract.RightToWork" - }, - "bankDetails": { - "$ref": "#/components/schemas/Contract.BankDetails" - }, - "payOptions": { - "$ref": "#/components/schemas/Contract.PayOptionsRequest" - }, - "tags": { - "type": "array", - "items": { + "summary": "Update PayCode (deprecated)", + "tags": [ + "PayCode" + ] + } + }, + "/employers/{employerId}/paycodesets": { + "get": { + "description": "Lists all PayCodeSets for an Employer.", + "operationId": "IndexPayCodeSet", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list PayCodeSets", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true - }, - "holidaySchemeUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "aggregatedServiceDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "evcId": { - "type": "string", - "description": "If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId.", - "format": "uuid", - "nullable": true - }, - "sourceSystemId": { - "maxLength": 50, - "type": "string", - "description": "Used by external systems so they can store an immutable reference.\r\nOnce this property is set it cannot be changed.", - "nullable": true + "description": "Success" } }, - "additionalProperties": false + "summary": "List PayCodeSets", + "tags": [ + "PayCodeSet" + ] }, - "Contract.VeteranDetails": { - "type": "object", - "properties": { - "isVeteran": { - "type": "boolean", - "description": "Set to true if the employee is a veteran" - }, - "firstCivilianEmploymentDate": { - "type": "string", - "description": "Date of Veteran's first civilian employment", - "format": "date", - "nullable": true + "post": { + "description": "Creates a new PayCodeSet for the Employer.", + "operationId": "CreatePayCodeSet", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PayCodeSet" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayCodeSet" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PayCodeSet" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PayCodeSet" + } + } } }, - "additionalProperties": false - }, - "Contract.WorkerGroupRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "contributionLevelType": { - "$ref": "#/components/schemas/PensionContributionLevelType" - }, - "employeeContribution": { - "type": "number", - "format": "double" - }, - "employeeContributionIsPercentage": { - "type": "boolean" - }, - "employerContribution": { - "type": "number", - "format": "double" - }, - "employerContributionIsPercentage": { - "type": "boolean" - }, - "employerContributionTopUpPercentage": { - "type": "number", - "description": "Increase Employer Contribution by this percentage of the Employee Contribution", - "format": "double" - }, - "employerContributionIncludesNiSaving": { - "type": "boolean", - "description": "Employer Contribution includes the Employers NI saving" - }, - "employerContributionNiSavingPercentage": { - "type": "number", - "description": "Increase Employer Contribution by this percentage of the Employers NI saving", - "format": "double" - }, - "isAvc": { - "type": "boolean", - "description": "Determines whether the workergroup uses additonal voluntary contributions.\r\nThis property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC." - }, - "additionalVoluntaryContribution": { - "type": "number", - "description": "Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage.", - "format": "double", - "nullable": true - }, - "avcIsPercentage": { - "type": "boolean", - "description": "Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage,", - "nullable": true - }, - "employerContributionNiSaving": { - "type": "number", - "description": "Employers NI Saving", - "format": "double" - }, - "customThreshold": { - "type": "boolean" - }, - "lowerLimit": { - "type": "number", - "format": "double" - }, - "upperLimit": { - "type": "number", - "format": "double" - }, - "papdisGroup": { - "type": "string", - "nullable": true - }, - "papdisSubGroup": { - "type": "string", - "nullable": true - }, - "localAuthorityNumber": { - "type": "string", - "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", - "nullable": true - }, - "schoolEmployerType": { - "type": "string", - "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", - "nullable": true - }, - "matIdentifier": { - "type": "string", - "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", - "nullable": true - }, - "matUniqueNumber": { - "type": "string", - "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", - "nullable": true - }, - "employerReference": { - "type": "string", - "nullable": true + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayCodeSet" + } + } + }, + "description": "Created" }, - "lgpsFund": { - "$ref": "#/components/schemas/LgpsFund" + "400": { + "description": "Bad Request" }, - "workerGroupId": { - "type": "string", - "description": "[readonly]", - "format": "uuid" + "404": { + "description": "Not Found" + } + }, + "summary": "Create PayCodeSet", + "tags": [ + "PayCodeSet" + ] + } + }, + "/employers/{employerId}/paycodesets/{id}": { + "delete": { + "description": "Deletes the specified PayCodeSet.", + "operationId": "DeletePayCodeSet", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "assumedPensionablePay": { - "$ref": "#/components/schemas/AssumedPensionablePay" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "pensionablePayDefinition": { - "$ref": "#/components/schemas/PensionablePayDefinition" + "400": { + "description": "Bad Request" }, - "payslipDescription": { - "type": "string", - "description": "Used for overwriting the pension description that is displayed on the payslip", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Delete PayCodeSet", + "tags": [ + "PayCodeSet" + ] }, - "Contract.WorkerGroupResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "contributionLevelType": { - "$ref": "#/components/schemas/PensionContributionLevelType" - }, - "employeeContribution": { - "type": "number", - "format": "double" - }, - "employeeContributionIsPercentage": { - "type": "boolean" - }, - "employerContribution": { - "type": "number", - "format": "double" - }, - "employerContributionIsPercentage": { - "type": "boolean" - }, - "employerContributionTopUpPercentage": { - "type": "number", - "description": "Increase Employer Contribution by this percentage of the Employee Contribution", - "format": "double" - }, - "employerContributionIncludesNiSaving": { - "type": "boolean", - "description": "Employer Contribution includes the Employers NI saving" - }, - "employerContributionNiSavingPercentage": { - "type": "number", - "description": "Increase Employer Contribution by this percentage of the Employers NI saving", - "format": "double" - }, - "isAvc": { - "type": "boolean", - "description": "Determines whether the workergroup uses additonal voluntary contributions.\r\nThis property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC." - }, - "additionalVoluntaryContribution": { - "type": "number", - "description": "Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage.", - "format": "double", - "nullable": true - }, - "avcIsPercentage": { - "type": "boolean", - "description": "Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage,", - "nullable": true - }, - "employerContributionNiSaving": { - "type": "number", - "description": "Employers NI Saving", - "format": "double" - }, - "customThreshold": { - "type": "boolean" - }, - "lowerLimit": { - "type": "number", - "format": "double" - }, - "upperLimit": { - "type": "number", - "format": "double" - }, - "papdisGroup": { - "type": "string", - "nullable": true - }, - "papdisSubGroup": { - "type": "string", - "nullable": true - }, - "localAuthorityNumber": { - "type": "string", - "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", - "nullable": true - }, - "schoolEmployerType": { - "type": "string", - "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", - "nullable": true - }, - "matIdentifier": { - "type": "string", - "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", - "nullable": true - }, - "matUniqueNumber": { - "type": "string", - "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", - "nullable": true - }, - "employerReference": { - "type": "string", - "nullable": true + "get": { + "description": "Gets the PayCodeSet specified.", + "operationId": "GetPayCodeSet", + "parameters": [ + { + "description": "The Id of the Employer to which the Pay Code Set belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "lgpsFund": { - "$ref": "#/components/schemas/LgpsFund" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayCodeSet" + } + } + }, + "description": "Success" }, - "workerGroupId": { - "type": "string", - "format": "uuid" + "404": { + "description": "Not Found" + } + }, + "summary": "Get PayCodeSet", + "tags": [ + "PayCodeSet" + ] + }, + "put": { + "description": "Updates the details of an existing PayCodeSet.", + "operationId": "UpdatePayCodeSet", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "assumedPensionablePay": { - "$ref": "#/components/schemas/AssumedPensionablePay" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PayCodeSet" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayCodeSet" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PayCodeSet" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PayCodeSet" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayCodeSet" + } + } + }, + "description": "Success" }, - "pensionablePayDefinition": { - "$ref": "#/components/schemas/PensionablePayDefinition" + "400": { + "description": "Bad Request" }, - "payslipDescription": { - "type": "string", - "description": "Used for overwriting the pension description that is displayed on the payslip", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Update PayCodeSet", + "tags": [ + "PayCodeSet" + ] + } + }, + "/employers/{employerId}/payees": { + "get": { + "description": "Lists all Payees for an Employer.", + "operationId": "IndexPayee", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list Payees", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "List Payees", + "tags": [ + "Payee" + ] }, - "Contract.WorkingPatternRequest": { - "required": [ - "title" + "post": { + "description": "Creates a new Payee for the Employer.", + "operationId": "CreatePayee", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "title": { - "maxLength": 100, - "minLength": 1, - "type": "string" - }, - "mon": { - "type": "number", - "format": "double" - }, - "tue": { - "type": "number", - "format": "double" - }, - "wed": { - "type": "number", - "format": "double" - }, - "thu": { - "type": "number", - "format": "double" - }, - "fri": { - "type": "number", - "format": "double" - }, - "sat": { - "type": "number", - "format": "double" - }, - "sun": { - "type": "number", - "format": "double" - }, - "monIsWorkingDay": { - "type": "boolean" - }, - "tueIsWorkingDay": { - "type": "boolean" - }, - "wedIsWorkingDay": { - "type": "boolean" - }, - "thuIsWorkingDay": { - "type": "boolean" - }, - "friIsWorkingDay": { - "type": "boolean" - }, - "satIsWorkingDay": { - "type": "boolean" - }, - "sunIsWorkingDay": { - "type": "boolean" - }, - "totalHours": { - "type": "number", - "format": "double" - }, - "contractedWeeks": { - "type": "number", - "description": "The amount of weeks an employee works, utilise for employees who aren't working full time.\r\nIf Null then the default is used.", - "format": "double", - "nullable": true - }, - "fullTimeContractedWeeks": { - "type": "number", - "description": "The amount of weeks an employee works (Full Time). If Null then the default is used.", - "format": "double", - "nullable": true - }, - "fullTimeContractedHours": { - "type": "number", - "description": "The amount of hours an employee works (Full Time). If Null then the default is used.", - "format": "double", - "nullable": true - }, - "bankHolidays": { - "$ref": "#/components/schemas/BankHolidayCollection" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Payee" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payee" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Payee" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Payee" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payee" + } + } + }, + "description": "Created" }, - "proRataRule": { - "$ref": "#/components/schemas/ProRataRule" + "400": { + "description": "Bad Request" }, - "workingPatternHoursType": { - "$ref": "#/components/schemas/WorkingPatternHoursType" + "404": { + "description": "Employer Not Found" + } + }, + "summary": "Create Payee", + "tags": [ + "Payee" + ] + } + }, + "/employers/{employerId}/payees/{id}": { + "delete": { + "description": "Deletes the specified Payee.", + "operationId": "DeletePayee", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isDefault": { - "type": "boolean" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "workingPatternType": { - "$ref": "#/components/schemas/WorkingPatternType" + "400": { + "description": "Bad Request" + } + }, + "summary": "Delete Payee", + "tags": [ + "Payee" + ] + }, + "get": { + "description": "Gets the Payee specified.", + "operationId": "GetPayee", + "parameters": [ + { + "description": "The Id of the Employer to which the Payee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "effectiveFrom": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payee" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Payee", + "tags": [ + "Payee" + ] + }, + "put": { + "description": "Updates a Payee for the Employer.", + "operationId": "UpdatePayee", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "shiftWorkingPatternDays": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.ShiftWorkingPatternDayRequest" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Payee" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payee" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Payee" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Payee" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payee" + } + } }, - "nullable": true + "description": "Success" + }, + "404": { + "description": "Employer Not Found" } }, - "additionalProperties": false - }, - "Contract.WorkingPatternResponse": { - "required": [ - "title" - ], - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "title": { - "maxLength": 100, - "minLength": 1, - "type": "string" - }, - "mon": { - "type": "number", - "format": "double" - }, - "tue": { - "type": "number", - "format": "double" - }, - "wed": { - "type": "number", - "format": "double" - }, - "thu": { - "type": "number", - "format": "double" - }, - "fri": { - "type": "number", - "format": "double" - }, - "sat": { - "type": "number", - "format": "double" - }, - "sun": { - "type": "number", - "format": "double" + "summary": "Update Payee", + "tags": [ + "Payee" + ] + } + }, + "/employers/{employerId}/payrun-async/{payPeriod}/importpay": { + "post": { + "description": "Takes a list PayOptionsImport and updates the currently open payrun to use the amounts given.\r\nYou must have an open payrun for the PayPeriod specified and all payroll codes submitted must match an employee on the payrun.\r\nAny lines imported for a PayRunEntry will replace existing lines for that PayRunEntry.", + "operationId": "ImportPayPayRunAsync", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "contractedWeeks": { - "type": "number", - "description": "The amount of weeks an employee works, utilise for employees who aren't working full time.\r\nIf Null then the default is used.", - "format": "double", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "fullTimeContractedWeeks": { - "type": "number", - "description": "The amount of weeks an employee works (Full Time). If Null then the default is used.", - "format": "double", - "nullable": true + { + "in": "query", + "name": "ordinal", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "fullTimeContractedHours": { - "type": "number", - "description": "The amount of hours an employee works (Full Time). If Null then the default is used.", - "format": "double", - "nullable": true + { + "description": "If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false.", + "in": "query", + "name": "LinesOnly", + "schema": { + "type": "boolean" + } }, - "bankHolidays": { - "$ref": "#/components/schemas/BankHolidayCollection" + { + "description": "If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false.", + "in": "query", + "name": "Append", + "schema": { + "type": "boolean" + } }, - "proRataRule": { - "$ref": "#/components/schemas/ProRataRule" + { + "description": "If set to true then any submitted lines that match the pay code of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines. Defaults to false.", + "in": "query", + "name": "UpdateExisting", + "schema": { + "type": "boolean" + } }, - "bankHolidayDates": { - "type": "array", - "items": { - "type": "string", - "format": "date-time" + { + "in": "query", + "name": "throwOnError", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayOptionsImportRequest" + }, + "type": "array" + } }, - "description": "[readonly] The dates that are classed as Bank Holidays for this Working Pattern", - "nullable": true + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayOptionsImportRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayOptionsImportRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayOptionsImportRequest" + }, + "type": "array" + } + } }, - "workingPatternHoursType": { - "$ref": "#/components/schemas/WorkingPatternHoursType" + "required": true + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JobResponse" + } + } + }, + "description": "Accepted" }, - "isDefault": { - "type": "boolean" + "400": { + "description": "Bad Request" }, - "displayName": { - "type": "string", - "nullable": true, - "readOnly": true + "404": { + "description": "Not Found" }, - "totalHours": { - "type": "number", - "format": "double", - "readOnly": true + "409": { + "description": "Conflict" + } + }, + "summary": "Import Pay (beta)", + "tags": [ + "PayRunAsync" + ] + } + }, + "/employers/{employerId}/payrun-async/{taxYear}/{payPeriod}": { + "post": { + "description": "Registers the request to start the next PayRun and returns a 202 if successful\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "QueueCreatePayRunPayRunAsync", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "workingPatternType": { - "$ref": "#/components/schemas/WorkingPatternType" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "effectiveFrom": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "shiftWorkingPatternDays": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Contract.ShiftWorkingPatternDayResponse" - }, - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false - }, - "Contract.YearsServiceEntitlementRequest": { - "type": "object", - "properties": { - "yearsService": { - "type": "integer", - "description": "Number of years of service.", - "format": "int32", - "nullable": true + ], + "responses": { + "202": { + "description": "Success - the request to start a PayRun has been accepted.\r\nThe unique URL for this PayRun is returned in the Location header." }, - "totalAdditionalDaysHoliday": { - "type": "number", - "description": "Total additional days of holiday entitlement.", - "format": "double", - "nullable": true + "400": { + "description": "Bad Request" + }, + "409": { + "description": "Conflict" } }, - "additionalProperties": false - }, - "Contract.YearsServiceEntitlementResponse": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Unique identifier for the Years Service Entitlement.", - "format": "uuid" + "summary": "Registers a request to start the next PayRun (beta)", + "tags": [ + "PayRunAsync" + ] + } + }, + "/employers/{employerId}/payrun-async/{taxYear}/{payPeriod}/{periodNumber}": { + "delete": { + "description": "Registers a request to delete a PayRun and returns a 202 if successful.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "QueueDeletePayRunPayRunAsync", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "yearsService": { - "type": "integer", - "description": "Number of years of service.", - "format": "int32", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "totalAdditionalDaysHoliday": { - "type": "number", - "description": "Total additional days of holiday entitlement.", - "format": "double", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + }, + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false - }, - "Contract.YearsServiceEntitlementUpdateRequest": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Unique identifier for the request.", - "format": "uuid" + ], + "responses": { + "202": { + "description": "Accepted" }, - "yearsService": { - "type": "integer", - "description": "Number of years of service.", - "format": "int32", - "nullable": true + "400": { + "description": "Bad Request" }, - "totalAdditionalDaysHoliday": { - "type": "number", - "description": "Total additional days of holiday entitlement.", - "format": "double", - "nullable": true + "409": { + "description": "Conflict" } }, - "additionalProperties": false + "summary": "Registers a request to delete a PayRun (beta)", + "tags": [ + "PayRunAsync" + ] }, - "CostAnalysisReport": { - "type": "object", - "properties": { - "singlePayrun": { - "$ref": "#/components/schemas/PayRun" + "put": { + "description": "Queues a request to update a PayRun to the state provided along with the reason (optional) for the change.", + "operationId": "QueueUpdatePayRunPayRunAsync", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "totalPay": { - "type": "number", - "format": "double", - "readOnly": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "pension": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "aeoFees": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "totalCost": { - "type": "number", - "format": "double", - "readOnly": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "employerNic": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "sendPayslipEmails", + "schema": { + "default": false, + "type": "boolean" + } }, - "netPayrollCost": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "payslipReleaseType", + "schema": { + "$ref": "#/components/schemas/PayslipReleaseType" + } }, - "maleCount": { - "type": "integer", - "format": "int32" + { + "in": "query", + "name": "payslipScheduledDateTime", + "schema": { + "format": "date-time", + "type": "string" + } }, - "femaleCount": { - "type": "integer", - "format": "int32" + { + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PayRunStateChange" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunStateChange" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PayRunStateChange" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PayRunStateChange" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRun" + } + } + }, + "description": "Success" }, - "leaverCount": { - "type": "integer", - "format": "int32" + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRun" + } + } + }, + "description": "Accepted" }, - "joinerCount": { - "type": "integer", - "format": "int32" + "400": { + "description": "Bad Request" }, - "paymentAfterLeavingCount": { - "type": "integer", - "format": "int32" + "404": { + "description": "Not Found" }, - "recoverableAmounts": { - "$ref": "#/components/schemas/RecoverableAmounts" + "409": { + "description": "Conflict" + } + }, + "summary": "Registers a request to update the PayRun (beta)", + "tags": [ + "PayRunAsync" + ] + } + }, + "/employers/{employerId}/payrun/employees/{employeeId}/Last": { + "get": { + "operationId": "LastPayRunEntryForEmployeePayRun", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employer": { - "$ref": "#/components/schemas/Item" + { + "description": "The Id of the Employee you want to get last pay run entry for.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" + { + "in": "query", + "name": "isClosed", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunEntry" + } + } + }, + "description": "Success" + } + }, + "summary": "Gets the last closed pay run entry for an employee.", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/employees/{employeeId}/averageholidaypayrate": { + "get": { + "description": "Calculates the average holiday pay rate for an employee based on their holiday scheme configuration", + "operationId": "CalculateAverageHolidayPayPayRun", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "ordinal": { - "type": "integer", - "format": "int32" + { + "description": "The Id of the Employee", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "period": { - "type": "integer", - "format": "int32" + { + "description": "The date we used to calculate average holiday pay from", + "in": "query", + "name": "startDate", + "required": true, + "schema": { + "format": "date-time", + "type": "string" + } }, - "periodTo": { - "type": "integer", - "format": "int32" + { + "description": "If set to true, will calculate based on days otherwise will calculate based on hours", + "in": "query", + "name": "isDaily", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "double", + "type": "number" + } + } + }, + "description": "Success" + } + }, + "summary": "Calculate Average Holiday Pay Rate", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/navigation/{payRunEntryId}": { + "get": { + "description": "Gets PayRunEntryNavigation details for a specific payrunentry within a pay run context, \r\nproviding previous/next payrunentry navigation based on the pay run's employee list filtered by the specified criteria.", + "operationId": "GetPayRunEntryNavigationPayRun", + "parameters": [ + { + "description": "The ID of the employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "startPeriodName": { - "type": "string", - "nullable": true + { + "description": "The unique identifier of the payrunentry for which to build navigation context.", + "in": "path", + "name": "payRunEntryId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "endPeriodName": { - "type": "string", - "nullable": true + { + "description": "An optional search term to filter employees.", + "in": "query", + "name": "searchTerm", + "schema": { + "type": "string" + } }, - "startDate": { - "type": "string", - "format": "date" + { + "description": "The option to filter pay run entries by negative paid, zero paid, and non-zero paid.", + "in": "query", + "name": "zeroPaid", + "schema": { + "$ref": "#/components/schemas/ZeroPaidFilter" + } }, - "endDate": { - "type": "string", - "format": "date" + { + "description": "The option to filter on department code.", + "in": "query", + "name": "departmentCode", + "schema": { + "type": "string" + } }, - "report": { - "$ref": "#/components/schemas/Report" + { + "description": "The option to filter on whether the employee is a starter or leaver.", + "in": "query", + "name": "startersLeavers", + "schema": { + "$ref": "#/components/schemas/StartersLeaversFilter" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "description": "The option to sort by a certain field. Default is Payroll Code.", + "in": "query", + "name": "sortBy", + "schema": { + "$ref": "#/components/schemas/PayRunEntrySortBy" + } }, - "title": { - "type": "string", - "nullable": true + { + "description": "Whether to sort in ascending or descending order.", + "in": "query", + "name": "sortDescending", + "schema": { + "default": false, + "type": "boolean" + } }, - "isDraft": { - "type": "boolean" + { + "description": "If set to true, returns rolled back pay run entries. If false, returns all entries.", + "in": "query", + "name": "rolledBackOnly", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunEntryNavigation" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "CostAnalysisReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "summary": "Get PayRunEntryNavigation for a specific PayRunEntry", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{id}/documents": { + "post": { + "description": "Adds document to the ProcessingNote", + "operationId": "AddDocumentProcessingNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, + { + "description": "The Id of the ProcessingNote you want to attach documents to", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/CostAnalysisReport" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "CostCentre": { - "required": [ - "code", - "title" - ], - "type": "object", - "properties": { - "code": { - "maxLength": 20, - "minLength": 1, - "type": "string", - "description": "The unique code for this Cost Centre" - }, - "title": { - "maxLength": 50, - "minLength": 1, - "type": "string", - "description": "The name of this Cost Centre" - }, - "color": { - "maxLength": 6, - "type": "string", - "description": "A color to used to represent this Cost Centre, in hex format. ie 'ff0000'", - "nullable": true + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Add Document", + "tags": [ + "ProcessingNote" + ] + } + }, + "/employers/{employerId}/payrun/{id}/documents/{documentId}": { + "delete": { + "description": "Deletes the document specified by the documentId for the ProcessingNote specified by the Id", + "operationId": "DeleteDocumentProcessingNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accountingCode": { - "maxLength": 50, - "type": "string", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employeeCount": { - "type": "integer", - "description": "[readonly] The number of employees with this set as their primary cost centre", - "format": "int32" + { + "description": "The Id of the Document you want to delete.", + "in": "path", + "name": "documentId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "hasJournalOverrides": { - "type": "boolean", - "description": "Has Journal Overrides" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete ProcessingNote Document", + "tags": [ + "ProcessingNote" + ] }, - "CostOfEmploymentReport": { - "type": "object", - "properties": { - "hasDepartments": { - "type": "boolean" - }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CostOfEmploymentReportLine" - }, - "nullable": true - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" + "get": { + "description": "Gets the document specified by the documentId for the ProcessingNote specified by the Id", + "operationId": "GetDocumentProcessingNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "periodTo": { - "type": "integer", - "format": "int32" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "startPeriodName": { - "type": "string", - "nullable": true + { + "description": "The Id of the Document you want to retrieve.", + "in": "path", + "name": "documentId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "description": "Success" }, - "endPeriodName": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Get ProcessingNote Document", + "tags": [ + "ProcessingNote" + ] + } + }, + "/employers/{employerId}/payrun/{payPeriod}/importpay": { + "post": { + "description": "Takes a list PayOptionsImport and updates the currently open payrun to use the amounts given.\r\nYou must have an open payrun for the PayPeriod specified and all payroll codes submitted must match an employee on the payrun.\r\nAny lines imported for a PayRunEntry will replace existing lines for that PayRunEntry.", + "operationId": "ImportPayPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "startDate": { - "type": "string", - "format": "date" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "endDate": { - "type": "string", - "format": "date" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "report": { - "$ref": "#/components/schemas/Report" + { + "description": "If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false.", + "in": "query", + "name": "linesOnly", + "schema": { + "default": false, + "type": "boolean" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "description": "If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false.", + "in": "query", + "name": "append", + "schema": { + "default": false, + "type": "boolean" + } }, - "title": { - "type": "string", - "nullable": true + { + "description": "If set to true then any submitted lines that match the pay code of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines.", + "in": "query", + "name": "updateExisting", + "schema": { + "default": false, + "type": "boolean" + } }, - "isDraft": { - "type": "boolean" + { + "description": "If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported.", + "in": "query", + "name": "validateOnly", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayOptionsImport" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayOptionsImport" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayOptionsImport" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayOptionsImport" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "CostOfEmploymentReportLine": { - "type": "object", - "properties": { - "pay": { - "type": "number", - "format": "double" - }, - "employerNic": { - "type": "number", - "format": "double" - }, - "pension": { - "type": "number", - "format": "double" + "responses": { + "200": { + "description": "Success" }, - "aeoFees": { - "type": "number", - "format": "double" + "400": { + "description": "Bad Request" + } + }, + "summary": "Import Pay", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{payPeriod}/importtimeandattendance": { + "post": { + "description": "If the employer is connected to an ExternalDataProvider that provides Time and Attendance data then this API\r\ncall will update the currently open payrun for the PayPeriod specified with data from the specified provider.\r\nReturns a list of PayOptionsImport to show what's been imported.", + "operationId": "ImportTimeAndAttendancePayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "statPayReclaim": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "totalCost": { - "type": "number", - "format": "double", - "readOnly": true + { + "in": "query", + "name": "providerId", + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "employee": { - "$ref": "#/components/schemas/Item" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayOptionsImport" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Import Time And Attendance", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{payPeriod}/importumbrellapay": { + "post": { + "description": "Takes a list UmbrellaPayment and updates the currently open payrun to use the amounts given.\r\nYou must have an open payrun for the PayPeriod specified and all payroll codes submitted must match an employee on the payrun.\r\nYou should have also set the UmbrellaSettings for the Employer", + "operationId": "ImportUmbrellaPayPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payrollCode": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "department": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/UmbrellaPayment" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/UmbrellaPayment" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/UmbrellaPayment" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/UmbrellaPayment" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "CostOfEmploymentReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRun" + } + } + }, + "description": "Success" + } + }, + "summary": "Import Umbrella Pay", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/employees/{employeeId}/pension/{pensionUniqueId}/pensionytd": { + "get": { + "operationId": "LastPayRunEntryWithPensionYtdValuesForEmployeePayRun", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + { + "description": "The Id of the Employee you want to get pay run entry for.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "$ref": "#/components/schemas/CostOfEmploymentReport" + { + "in": "path", + "name": "pensionUniqueId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "Country": { - "enum": [ - "England", - "NorthernIreland", - "Scotland", - "Wales", - "OutsideUk", - "Uk" - ], - "type": "string" - }, - "CsvFileFormat": { - "enum": [ - "MoneysoftEmployees", - "BrightPayEmployees", - "Fps", - "SageEmployeeDetails", - "AccessPeoplePlanner", - "EmployeeCsv" - ], - "type": "string" - }, - "DayOfWeek": { - "enum": [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - "type": "string" - }, - "DaysBeforePayday": { - "enum": [ - "ZeroDayBeforePayday", - "OneDayBeforePayday", - "TwoDaysBeforePayday", - "ThreeDaysBeforePayday", - "FourDaysBeforePayday", - "FiveDaysBeforePayday" ], - "type": "string" - }, - "DecimalDecimalBooleanPensionRuleValueTuple": { - "type": "object", - "properties": { - "item1": { - "type": "number", - "format": "double" - }, - "item2": { - "type": "number", - "format": "double" - }, - "item3": { - "type": "boolean" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunEntry" + } + } + }, + "description": "Success" }, - "item4": { - "$ref": "#/components/schemas/PensionRule" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "DecimalTaxYearConfigPrimitiveValue": { - "type": "object", - "properties": { - "value": { - "type": "number", - "format": "double" + "summary": "Gets last PayRunEntry for a Pension", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}": { + "get": { + "operationId": "GetPayRunsPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "effectiveFrom": { - "type": "string", - "description": "The date when these period values are effective", - "format": "date", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "midYearChanges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DecimalTaxYearConfigPrimitiveValue" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + }, + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "description": "Any optional changes to the period values that are effective from a specified date in the middle of a tax year", - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "DeferalPeriodType": { - "enum": [ - "Days", - "Weeks", - "Months", - "PayPeriods" - ], - "type": "string" + "summary": "List PayRuns", + "tags": [ + "PayRun" + ] }, - "Department": { - "required": [ - "code", - "title" - ], - "type": "object", - "properties": { - "code": { - "maxLength": 20, - "minLength": 1, - "type": "string", - "description": "The unique code for this Department" - }, - "title": { - "maxLength": 50, - "minLength": 1, - "type": "string", - "description": "The name of this Department" + "post": { + "description": "Starts the next PayRun and returns a 201 if successful", + "operationId": "CreateNextPayRunPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "color": { - "maxLength": 6, - "type": "string", - "description": "A color to used to represent this Department, in hex format. ie 'ff0000'", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "employeeCount": { - "type": "integer", - "description": "[readonly] The number of employees with this set as their primary department", - "format": "int32" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "accountingCode": { - "maxLength": 50, - "type": "string", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRun" + } + } + }, + "description": "Success - the PayRun has been created.\r\nThe unique URL for this PayRun is returned in the Location header." }, - "hasJournalOverrides": { - "type": "boolean", - "description": "Has Overrides" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Starts the next PayRun", + "tags": [ + "PayRun" + ] }, - "DepartmentMembership": { - "required": [ - "code" - ], - "type": "object", - "properties": { - "code": { - "minLength": 1, - "type": "string", - "description": "The Code for the Department" - }, - "color": { - "type": "string", - "description": "[readonly] The Color for the Department", - "nullable": true - }, - "title": { - "type": "string", - "description": "[readonly] The Title for the Department", - "nullable": true + "put": { + "description": "This PUT will be removed in Jan 2022. You should instead use a POST to this URL", + "operationId": "StartNextPayRunPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "primary": { - "type": "boolean", - "description": "Set to true if this is the primary Department for the Employee.\r\nOnly one department can be set as the primary." + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "weighting": { - "type": "number", - "description": "If there is more than one Department Membership for the Employee then this determines the weighting to give to this membership.\r\nie, if he is in two departments you might set the primary as 0.8 and the secondary as 0.2;", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "employeeRoleUniqueId": { - "type": "string", - "format": "uuid" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "201": { + "description": "Success - the PayRun has been created.\r\nThe unique URL for this PayRun is returned in the Location header." } }, - "additionalProperties": false, - "description": "Used to represent an Employees membership of a Department" - }, - "DirectDebitMandate": { - "type": "object", - "properties": { - "isCompleted": { - "type": "boolean" - }, - "mandateLink": { - "type": "string", - "nullable": true - }, - "customerLink": { - "type": "string", - "nullable": true + "summary": "Starts the next PayRun (deprecated)", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/supplementary": { + "post": { + "description": "Creates a supplementary PayRun and returns a 201 if successful", + "operationId": "CreateSupplementaryPayRunPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "bankName": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "accountNumberEnding": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SupplementaryPayRunDetails" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/SupplementaryPayRunDetails" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/SupplementaryPayRunDetails" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SupplementaryPayRunDetails" + } + } } }, - "additionalProperties": false - }, - "DirectorshipDetails": { - "type": "object", - "properties": { - "isDirector": { - "type": "boolean" - }, - "startDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "leaveDate": { - "type": "string", - "format": "date", - "nullable": true + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRun" + } + } + }, + "description": "Success - the supplementary PayRun has been created.\r\nThe unique URL for this supplementary PayRun is returned in the Location header." }, - "niAlternativeMethod": { - "type": "boolean" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false - }, - "DpsDataType": { - "enum": [ - "P6", - "P9", - "SL1", - "SL2", - "PGL1", - "PGL2", - "AR", - "NOT", - "RTI", - "CIS" - ], - "type": "string" - }, - "DpsNotice": { - "type": "object", - "properties": { - "issueDate": { - "type": "string", - "format": "date" + "summary": "Creates a supplementary PayRun", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}": { + "delete": { + "operationId": "DeletePayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "effectiveDate": { - "type": "string", - "format": "date" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "taxYear": { - "type": "integer", - "format": "int32", - "readOnly": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "sequenceNumber": { - "type": "integer", - "format": "int32" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "type": { - "$ref": "#/components/schemas/DpsDataType" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "formType": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "forename": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" + } + }, + "summary": "Delete a PayRun", + "tags": [ + "PayRun" + ] + }, + "get": { + "operationId": "GetPayRunPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "surname": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "niNo": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "worksNumber": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "taxCode": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "week1Month1": { - "type": "boolean", - "nullable": true + { + "description": "Zero-based page number, used in conjunction with pageSize", + "in": "query", + "name": "pageNum", + "schema": { + "format": "int32", + "type": "integer" + } }, - "previousTax": { - "type": "number", - "format": "double", - "nullable": true + { + "description": "The number of items per page", + "in": "query", + "name": "pageSize", + "schema": { + "format": "int32", + "type": "integer" + } }, - "previousPay": { - "type": "number", - "format": "double", - "nullable": true + { + "description": "The option to filter on a search term", + "in": "query", + "name": "searchTerm", + "schema": { + "type": "string" + } }, - "planType": { - "$ref": "#/components/schemas/StudentLoan" + { + "description": "The option to filter pay run entries by negative paid, zero paid and non-zero paid", + "in": "query", + "name": "zeroPaid", + "schema": { + "$ref": "#/components/schemas/ZeroPaidFilter" + } }, - "appliedOn": { - "type": "string", - "format": "date", - "nullable": true + { + "description": "The option to filter on department code", + "in": "query", + "name": "departmentCode", + "schema": { + "type": "string" + } }, - "employee": { - "$ref": "#/components/schemas/Item" + { + "description": "The option to filter on whether the employee is a starter or leaver", + "in": "query", + "name": "startersLeavers", + "schema": { + "$ref": "#/components/schemas/StartersLeaversFilter" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true - } - }, - "additionalProperties": false - }, - "DpsSettings": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "If enabled, we'll automatically retrieve DPS notices from HMRC for you" + { + "description": "The option to sort by a certain field. Default is Payroll Code", + "in": "query", + "name": "sortBy", + "schema": { + "$ref": "#/components/schemas/PayRunEntrySortBy" + } }, - "retrieveFrom": { - "type": "string", - "description": "The date from which notices should be retrieved", - "format": "date" + { + "description": "Whether to sort in ascending or descending order", + "in": "query", + "name": "sortDescending", + "schema": { + "default": false, + "type": "boolean" + } }, - "autoApply": { - "type": "boolean", - "description": "If enabled, we'll automatically apply DPSNotices before starting a payrun that covers the EffectiveDate" + { + "description": "If set to true, returns rolled back pay run entries. If false, returns all entries.", + "in": "query", + "name": "rolledBackOnly", + "schema": { + "default": false, + "type": "boolean" + } }, - "lastChecked": { - "type": "string", - "description": "[readonly] The time we last checked for notices", - "format": "date", - "nullable": true + { + "description": "If supplementary pay runs have been created this can be used to retrieve the specific supplementary pay run version", + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } }, - "error": { - "type": "string", - "description": "[readonly] If we received an error from HMRC when checking for notices, it'll be displayed here", - "nullable": true + { + "description": "If supplementary pay runs have been created this can be used to retrieve the combined latest version of the pay run with all latest version pay run entries", + "in": "query", + "name": "combinePayRuns", + "schema": { + "default": false, + "type": "boolean" + } } - }, - "additionalProperties": false, - "description": "This model is used to set an employers settings for HMRCs Data Provisioning Service" - }, - "EmailAttachment": { - "required": [ - "filename", - "url" ], - "type": "object", - "properties": { - "url": { - "minLength": 1, - "type": "string" - }, - "filename": { - "minLength": 1, - "type": "string" - }, - "pdfPasswordType": { - "$ref": "#/components/schemas/PdfPasswordType" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRun" + } + } + }, + "description": "Success" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Get a PayRun", + "tags": [ + "PayRun" + ] }, - "EmpRefs": { - "type": "object", - "properties": { - "officeNo": { - "type": "string", - "nullable": true - }, - "payeRef": { - "type": "string", - "nullable": true - }, - "aoRef": { - "type": "string", - "nullable": true - }, - "econ": { - "type": "string", - "nullable": true - }, - "cotaxRef": { - "type": "string", - "nullable": true + "put": { + "description": "Updates a PayRun to the state provided along with the reason (optional) for the change.", + "operationId": "UpdatePayRunPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "sautr": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "Employee": { - "type": "object", - "properties": { - "holidaySchemeUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "aggregatedServiceDate": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "leaveHolidayAccrualDefaultRateType": { - "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "personalDetails": { - "$ref": "#/components/schemas/PersonalDetails" + { + "description": "Only relevant if setting the State to Finalised. Set to true if you want to have payslips emailed to employees.", + "in": "query", + "name": "sendPayslipEmails", + "schema": { + "default": false, + "type": "boolean" + } }, - "employmentDetails": { - "$ref": "#/components/schemas/EmploymentDetails" + { + "in": "query", + "name": "payslipReleaseType", + "schema": { + "$ref": "#/components/schemas/PayslipReleaseType" + } }, - "autoEnrolment": { - "$ref": "#/components/schemas/AutoEnrolment" + { + "in": "query", + "name": "payslipScheduledDateTime", + "schema": { + "format": "date-time", + "type": "string" + } }, - "leaveSettings": { - "$ref": "#/components/schemas/LeaveSettings" + { + "description": "If supplementary pay runs have been created this can be used to update the specific supplementary pay run version", + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PayRunStateChange" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunStateChange" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PayRunStateChange" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PayRunStateChange" + } + } }, - "rightToWork": { - "$ref": "#/components/schemas/RightToWork" + "description": "Specify the PayRun state you want to change to and the reason for the change.\r\nOnly Open and Finalised states are available at the moment.\r\nOther states are used with Bureau functionality which isn't currently generally available." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRun" + } + } + }, + "description": "Success - the PayRun has been updated." }, - "bankDetails": { - "$ref": "#/components/schemas/BankDetails" + "400": { + "description": "Bad Request" }, - "tags": { - "type": "array", - "items": { + "404": { + "description": "Not Found" + } + }, + "summary": "Update PayRun", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/addpayrunentries": { + "post": { + "description": "Adds the payrun entries specified in the ids property", + "operationId": "AddPayRunEntriesPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", "type": "string" - }, - "nullable": true - }, - "payOptions": { - "$ref": "#/components/schemas/PayOptions" + } }, - "status": { - "$ref": "#/components/schemas/EmployeeStatus" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "aeNotEnroledWarning": { - "type": "boolean", - "description": "[readonly] If true then the employee should be enrolled in an Auto Enrolment Qualifying pension but isn't", - "readOnly": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "sourceSystemId": { - "maxLength": 50, - "type": "string", - "description": "[readonly] Can only be given a value when the employee is created. It can then never be changed.\r\nUsed by external systems so they can store an immutable reference", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "evcId": { - "type": "string", - "description": "If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId.", - "format": "uuid", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "EmployeeBenefitsReport": { - "type": "object", - "properties": { - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true - }, - "isDraft": { - "type": "boolean" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRun" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "EmployeeBenefitsReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "summary": "Add PayRunEntries (deprecated)", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/aeo": { + "get": { + "description": "Returns a List of Items representing any AttachmentOrders within the PayRun date range for Employees that are included in the given PayRun.", + "operationId": "AeoPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "model": { - "$ref": "#/components/schemas/EmployeeBenefitsReport" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + }, + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "EmployeeCostCentre": { - "required": [ - "code" ], - "type": "object", - "properties": { - "code": { - "minLength": 1, - "type": "string", - "description": "The Code for the Cost Centre" - }, - "color": { - "type": "string", - "description": "[readonly] The Color for the Cost Centre", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List AttachmentOrders related to a PayRun", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/changes": { + "get": { + "description": "Returns a of changes made to a payrun since it was created.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "ChangesPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "title": { - "type": "string", - "description": "[readonly] The Title for the Cost Centre", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "isPrimary": { - "type": "boolean", - "description": "Set to true if this is the primary Cost Centre for the Employee.\r\nOnly one Cost Centre can be set as the primary." + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "weighting": { - "type": "number", - "description": "If there is more than one Cost Centre Membership for the Employee then this determines the weighting to give to this membership.\r\nie, if he is in two Cost Centre you might set the primary as 0.8 and the secondary as 0.2;", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "employeeRoleUniqueId": { - "type": "string", - "format": "uuid" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "employee": { - "$ref": "#/components/schemas/Item" + { + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false, - "description": "Used to represent an Employees membership of a Cost Centre" - }, - "EmployeeLeaveReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeLeaveReportLine" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunChanges" + } + } }, - "nullable": true - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true - }, - "isDraft": { - "type": "boolean" + "description": "Success" } }, - "additionalProperties": false - }, - "EmployeeLeaveReportLine": { - "type": "object", - "properties": { - "firstName": { - "type": "string", - "nullable": true - }, - "lastName": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/LeaveType" - }, - "payment": { - "$ref": "#/components/schemas/LeavePayType" - }, - "payrollCode": { - "type": "string", - "nullable": true + "summary": "List PayRun Changes", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/email": { + "post": { + "description": "Payslips are usually emailed automatically when a PayRun is finalised. But if you suppressed them or need to re-send them then you can do so with this API call.\r\nProviding a pay run entry id will send a single email, otherwise all emails will be sent.", + "operationId": "SendPayslipEmailsPayRun", + "parameters": [ + { + "description": "The ID of the employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "openEndedAbsence": { - "type": "boolean" + { + "description": "The pay period of the pay run.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "percentOfPay": { - "type": "number", - "format": "double" + { + "description": "The period number of the pay run.", + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "paySSPInAddition": { - "type": "boolean" + { + "description": "The tax year of the pay run.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "payFrequency": { - "$ref": "#/components/schemas/StatPayFrequency" + { + "description": "The ordinal number of the pay run.", + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "occupationalPolicy": { - "type": "string", - "nullable": true + { + "description": "The UniqueId of the pay run entry (optional).", + "in": "query", + "name": "id", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "(Re)send Payslip Emails", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/events": { + "get": { + "operationId": "GetPayRunEventsPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "from": { - "type": "string", - "format": "date" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "to": { - "type": "string", - "format": "date" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "useOpeningPay": { - "type": "boolean" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "openingPay": { - "type": "number", - "format": "double", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PaySchedulePeriodEvent" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get PayPeriodEvents", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/finalise": { + "post": { + "description": "This endpoint is now deprecated and will be removed in Jan 2022.\r\nYou should instead use the Update method and set the State to Finalised.\r\n \r\nReturns True if the resulting FPS has been automatically submitted due to the Employers RTISubmissionSettings, otherwise returns false.\r\nYou can suppress the emailing of payslips to employees by adding a key named dontEmailEmployeePayslips with a value of true to the body. See the related guides for more information.", + "operationId": "FinalisePayRunPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "openingOmpPay": { - "type": "number", - "format": "double", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "babyDueDate": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "babyBirthDate": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "matchingDate": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "expectedPlacementDate": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "additionalProperties": {}, + "type": "object" + } + }, + "application/json": { + "schema": { + "additionalProperties": {}, + "type": "object" + } + }, + "application/json-patch+json": { + "schema": { + "additionalProperties": {}, + "type": "object" + } + }, + "text/json": { + "schema": { + "additionalProperties": {}, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + }, + "description": "Success" + } + }, + "summary": "Finalise a PayRun (deprecated)", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/journal": { + "get": { + "description": "Returns values that can be used to create accounting entries for this PayRun.", + "operationId": "GetPayRunJournalPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "placementDate": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "deathDate": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "averageWeeklyEarnings": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "automaticAWECalculation": { - "type": "boolean" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "calculationType": { - "$ref": "#/components/schemas/LeaveCalculationType" + { + "description": "Set to true and the journal will be split between any relevant Departments", + "in": "query", + "name": "deptBreakdown", + "schema": { + "default": false, + "type": "boolean" + } }, - "strikeHoursToDeduct": { - "type": "number", - "format": "double", - "nullable": true + { + "description": "Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable", + "in": "query", + "name": "includeApprenticeLevy", + "schema": { + "default": false, + "type": "boolean" + } }, - "historicLeaveRequiresProcessing": { - "type": "boolean" + { + "description": "Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal", + "in": "query", + "name": "allSchedules", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunJournal" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Journal for PayRun", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/leave": { + "get": { + "description": "Returns a List of Items representing any Leave within the PayRun date range for Employees that are included in the given PayRun.\r\nNote that if Leave was added after the PayRun was closed, but the Leave is within the PayRun period then it'll be returned here even though it wouldn't have been processed with the PayRun.", + "operationId": "LeavePayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "offsetPay": { - "type": "boolean" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "useAssumedPensionablePay": { - "type": "boolean" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "automaticAPPCalculation": { - "type": "boolean" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "assumedPensionablePay": { - "type": "number", - "format": "double", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "EmployeeLeaveReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "summary": "List Leave related to a PayRun", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/p45/email": { + "get": { + "operationId": "EmailMultipleP45sPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "model": { - "$ref": "#/components/schemas/EmployeeLeaveReport" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + }, + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "EmployeeNiYtdValues": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" - }, - "payrollCode": { - "type": "string", - "nullable": true + "summary": "(Re)send P45 Emails", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/paycodes": { + "get": { + "operationId": "GetPayRunPayCodesPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "firstName": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "lastName": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "niTable": { - "type": "string" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "values": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NiYtdValue" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayCode" + }, + "type": "array" + } + } }, - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "EmployeePayRunTotal": { - "type": "object", - "properties": { - "payrollCode": { - "type": "string", - "description": "Payroll code of the employee", - "nullable": true - }, - "grossForNi": { - "type": "number", - "description": "The amount of the Gross that is subject to NI", - "format": "double" - }, - "grossPensionPay": { - "type": "number", - "description": "The amount of the Gross that is subject to PensionPay", - "format": "double" - }, - "employerPensionContribution": { - "type": "number", - "description": "The value of the Pension Contribution being made by the Employer for this Employee", - "format": "double" - }, - "employerNi": { - "type": "number", - "description": "The Employer NI Contribution amount", - "format": "double" - }, - "grossTaxablePay": { - "type": "number", - "description": "The amount of the Gross that is subject to TaxablePay", - "format": "double" - }, - "employeeNi": { - "type": "number", - "description": "The Employee NI Contribution amount", - "format": "double" + "summary": "Get PayCodes for a PayRun", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/paymentdate": { + "post": { + "description": "Sets the PaymentDate for a PayRun.\r\nIf the date given is outside of the TaxPeriod that the payrun is for then only the payment date for the individual\r\nPayRunEntries is updated, the PayRun will retain it's current PaymentDate", + "operationId": "UpdatePaymentDatePayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "tax": { - "type": "number", - "description": "The Employee Tax amount", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "studentLoanRecovered": { - "type": "number", - "description": "The Employee Student Loan recovered amount", - "format": "double" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "employeePension": { - "type": "number", - "description": "The value of the Pension Contribution(PENSION) being made by the Employee as a Net Pay Arrangement", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "employeePensionContributionReliefAtSource": { - "type": "number", - "description": "The value of employee pension contributions Relief At Source(PENSIONRAS) that are not paid under 'net pay arrangements'", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "employeePensionContributionSalarySacrifice": { - "type": "number", - "description": "The value of the Pension Contribution Salary Sacrifice(PENSIONSS) being made by the Employee as a Salary Sacrifice", - "format": "double" + { + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "format": "date-time", + "type": "string" + } + }, + "application/json": { + "schema": { + "format": "date-time", + "type": "string" + } + }, + "application/json-patch+json": { + "schema": { + "format": "date-time", + "type": "string" + } + }, + "text/json": { + "schema": { + "format": "date-time", + "type": "string" + } + } } }, - "additionalProperties": false, - "description": "EmployeePayRunTotal is used to calculte the employee pay run total" - }, - "EmployeePaymentsReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeePaymentsReportLine" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRun" + } + } }, - "nullable": true + "description": "Success" + } + }, + "summary": "Set PaymentDate", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/processingnotes": { + "get": { + "operationId": "ListProcessingNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isEducationSettingsEnabled": { - "type": "boolean" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "report": { - "$ref": "#/components/schemas/Report" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "title": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "isDraft": { - "type": "boolean" + { + "description": "Optionally filter ProcessingNotes to just those for the specified PayRunEntry", + "in": "query", + "name": "payrunEntryId", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "List ProcessingNotes for a PayRun", + "tags": [ + "ProcessingNote" + ] }, - "EmployeePaymentsReportLine": { - "type": "object", - "properties": { - "payrollCode": { - "type": "string", - "description": "Payroll Code for exported pay line", - "nullable": true - }, - "uniqueIdentifier": { - "type": "string", - "description": "Unique Id for exported pay line", - "format": "uuid" - }, - "amount": { - "type": "number", - "description": "Amount for exported pay line", - "format": "double" - }, - "multiplierType": { - "type": "integer", - "description": "MultiplierType of exported pay line", - "format": "int32" - }, - "multiplier": { - "type": "number", - "description": "Multiplier for exported pay line", - "format": "double", - "nullable": true - }, - "hours": { - "type": "number", - "description": "Number of Hours for exported pay line", - "format": "double", - "nullable": true - }, - "days": { - "type": "number", - "description": "Number of Days for exported pay line", - "format": "double", - "nullable": true + "post": { + "description": "Creates a Processing Note for the PayRun.\r\nYou must have Bureau Features enabled and the payrun must be editable.", + "operationId": "CreateProcessingNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payCode": { - "type": "string", - "description": "Pay code for exported pay line", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "description": { - "type": "string", - "description": "Note for exported pay line", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "effectiveFrom": { - "type": "string", - "description": "Effective From date for exported pay line", - "format": "date", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "effectiveTo": { - "type": "string", - "description": "Effective To date for exported pay line", - "format": "date", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ProcessingNote" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessingNote" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/ProcessingNote" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ProcessingNote" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessingNote" + } + } + }, + "description": "Success - the ProcessingNote has has been created." }, - "isNetToGross": { - "type": "boolean", - "description": "Indicates Gross To Net value for exported pay line" + "400": { + "description": "Bad Request" }, - "department": { - "type": "string", - "description": "Department for exported pay line", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Create ProcessingNote", + "tags": [ + "ProcessingNote" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/processingnotes/{id}": { + "get": { + "operationId": "GetProcessingNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "costCentre": { - "type": "string", - "description": "Cost Centre for exported pay line", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "isAutomaticBackPay": { - "type": "boolean", - "description": "Indicates Automatic Back Pay value for exported pay line" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "ignoreInitialBackPay": { - "type": "boolean", - "description": "Indicates Ignore Initial Back Pay value for exported pay line" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "contributesToBasicPay": { - "type": "boolean", - "description": "Indicates Contributes To Basic Pay value for exported pay line" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "autoAdjustForLeave": { - "type": "boolean", - "description": "Indicates Auto Adjust For Leave value for exported pay line" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessingNote" + } + } + }, + "description": "Success" + } + }, + "summary": "Get a ProcessingNote", + "tags": [ + "ProcessingNote" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/processingnotes/{id}/status": { + "put": { + "description": "Set a ProcessingNote status.\r\nYou must have Bureau Features enabled and the payrun must be editable.", + "operationId": "SetStatusProcessingNote", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "roleReference": { - "type": "string", - "description": "Employee Role Reference for exported pay line", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "paySpine": { - "type": "string", - "description": "Pay Spine for exported pay line", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "payGrade": { - "type": "string", - "description": "Pay Grade for exported pay line", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "spinePoint": { - "type": "string", - "description": "Spine Point for exported pay line", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "londonAllowanceType": { - "type": "string", - "description": "London Allowance type for exported pay line", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ProcessingNoteStatus" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessingNoteStatus" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/ProcessingNoteStatus" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ProcessingNoteStatus" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessingNote" + } + } + }, + "description": "Success - the ProcessingNote status has been updated." }, - "calculateAsWhenPaid": { - "type": "boolean", - "description": "Indicates whether this pay line should be treated as When Paid rather than When Earned" + "400": { + "description": "Bad Request" }, - "departmentId": { - "type": "string", - "description": "Department ID associated with the exported payline", - "format": "uuid" + "404": { + "description": "Not Found" + } + }, + "summary": "Set a ProcessingNote status", + "tags": [ + "ProcessingNote" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/removepayrunentries": { + "post": { + "description": "Removes the payrun entries specified in the ids property", + "operationId": "RemovePayRunEntriesPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "costCentreId": { - "type": "string", - "description": "Cost Centre ID associated with the exported payline", - "format": "uuid" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "paySpineId": { - "type": "string", - "description": "Pay Spine ID associated with the exported payline", - "format": "uuid" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "spinalPointId": { - "type": "string", - "description": "Spinal Point ID associated with the exported payline", - "format": "uuid" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "paySpineGradeId": { - "type": "string", - "description": "Pay Spine Grade ID associated with the exported payline", - "format": "uuid" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "EmployeePaymentsReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRun" + } + } + }, + "description": "Success" + } + }, + "summary": "Remove PayRunEntries (deprecated)", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/reopen": { + "post": { + "description": "This endpoint is now deprecated and will be removed in Jan 2022.\r\nYou should instead use the Update method and set the State to Open.\r\n \r\nRe-opens a PayRun so that it can be edited.\r\nOnly the most recent PayRun can be re-opened, and only if the Employer is still in the same TaxYear as the PayRun and there are no open PayRuns.", + "operationId": "ReOpenPayRunPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "model": { - "$ref": "#/components/schemas/EmployeePaymentsReport" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + }, + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRun" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "EmployeeRole": { - "type": "object", - "properties": { - "jobTitle": { - "type": "string", - "description": "Job Title of the Role", - "nullable": true + "summary": "Re-open a PayRun (deprecated)", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/stateHistory": { + "get": { + "description": "Returns the state history of a pay run.", + "operationId": "GetPayRunStateHistoryPayRun", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isPrimary": { - "type": "boolean", - "description": "Set to True if this is Primary role of the Employee" + { + "description": "The Pay Period (i.e, Monthly, Weekly) for which you want to get the Pay Run history", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "reference": { - "maxLength": 35, - "type": "string", - "nullable": true + { + "description": "The Period (i.e, Tax Month, Tax Week) for which you want to get the Pay Run history", + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "startDate": { - "type": "string", - "format": "date" + { + "description": "The Tax Year for which you want to get the Pay Run history", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "endDate": { - "type": "string", - "format": "date", - "nullable": true + { + "description": "Indicates whether it uses first, second, third (etc.) PaySchedule for the PayPeriod", + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayRunStateHistoryResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "basis": { - "$ref": "#/components/schemas/RoleBasis" + "400": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayRunStateHistoryResponse" + }, + "type": "array" + } + } + }, + "description": "Bad Request" }, - "type": { - "$ref": "#/components/schemas/RoleType" + "404": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayRunStateHistoryResponse" + }, + "type": "array" + } + } + }, + "description": "Not Found" + } + }, + "summary": "List PayRunStateHistory", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/warnings": { + "get": { + "description": "Returns a list of Item detailing any Warnings for PayRunEntries on the specified PayRun", + "operationId": "GetPayRunWarningsPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payOptions": { - "$ref": "#/components/schemas/EmployeeRolePayOptions" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "workingPatternId": { - "type": "string", - "description": "Used when calculating payments for Leave.\r\nIf null then the default Working Pattern is used", - "format": "uuid", - "nullable": true, - "deprecated": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "occupationalMaternityPolicyUniqueId": { - "type": "string", - "description": "Used for assigning occupational maternity policy", - "format": "uuid", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "occupationalSicknessPolicyUniqueId": { - "type": "string", - "description": "Used for assigning occupational sickness policy", - "format": "uuid", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "employee": { - "$ref": "#/components/schemas/Item" + { + "in": "query", + "name": "pageNum", + "schema": { + "format": "int32", + "type": "integer" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "in": "query", + "name": "pageSize", + "schema": { + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false - }, - "EmployeeRoleAnalysisCategoryCode": { - "required": [ - "code" ], - "type": "object", - "properties": { - "code": { - "minLength": 1, - "type": "string", - "description": "The Code for the AnalysisCategoryCode" - }, - "color": { - "type": "string", - "description": "[readonly] The Color for the AnalysisCategoryCode", - "nullable": true - }, - "title": { - "type": "string", - "description": "[readonly] The Title for the AnalysisCategoryCode", - "nullable": true - }, - "isPrimary": { - "type": "boolean", - "description": "Set to true if this is the primary AnalysisCategoryCode for the Employee.\r\nOnly one AnalysisCategoryCode can be set as the primary." - }, - "weighting": { - "type": "number", - "description": "If there is more than one AnalysisCategoryCode Membership for the Employee then this determines the weighting to give to this membership.\r\nie, if he is in two AnalysisCategoryCode you might set the primary as 0.8 and the secondary as 0.2;", - "format": "double" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get PayRun Warnings", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/ytd": { + "put": { + "description": "Upload a CSV to override the YTD values on a Pay Run.\r\nThe CSV should have the same headings as the YTD report", + "operationId": "YtdPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "analysisCategoryName": { - "type": "string", - "description": "Analysis Category Name", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "analysisCategoryPublicId": { - "type": "string", - "description": "Analysis Category Public Id", - "format": "uuid" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "employeeRolePublicId": { - "type": "string", - "description": "Employee Role Public Id", - "format": "uuid" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "employee": { - "$ref": "#/components/schemas/Item" + { + "in": "query", + "name": "ordinal", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } } }, - "additionalProperties": false - }, - "EmployeeRolePayItem": { - "type": "object", - "properties": { - "roleId": { - "type": "string", - "format": "uuid" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployeeYtdValues" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Update YTD", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/zeroise": { + "post": { + "description": "Zeroises the payrun entries specified in the ids property", + "operationId": "ZeroisePayRunEntriesPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isPrimary": { - "type": "boolean" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "baseDailyRate": { - "type": "number", - "description": "This property is used to calculate values for PayCodes that are set as multiples of \r\nthe employees base daily rate. Eg sick.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", - "format": "double" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "baseHourlyRate": { - "type": "number", - "description": "This property is used to calculate values for PayCodes that are set as multiples of \r\nthe employees base hourly rate. Eg Overtime.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "weight": { - "type": "number", - "description": "This property is used to calculate values for the relative weight of the usual pay for \r\neach role compared to the sum of all roles' usual pay\r\nUsual pay for the purpose of the current value's calculation is based on the employee's permanent pay items\r\nincluding employee basic pay and permanent addition and deduction pay lines subject to NI or Tax", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "EmployeeRolePayOptions": { - "type": "object", - "properties": { - "basis": { - "$ref": "#/components/schemas/PayBasis" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRun" + } + } + }, + "description": "Success" + } + }, + "summary": "Zeroise PayRunEntries", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/{id}": { + "get": { + "operationId": "GetPayRunEntryPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "nationalMinimumWage": { - "type": "boolean" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "payCode": { - "type": "string", - "description": "If you want the Employees pay to be allocated to a code other than BASIC, specify it here", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "mileageVehicleType": { - "$ref": "#/components/schemas/MileageVehicleType" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "mapsMiles": { - "type": "integer", - "description": "The number of miles to pay for as Mileage Allowance Payments", - "format": "int32", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payAmount": { - "type": "number", - "description": "The amount the Employee is regularly paid each period", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "payAmountMultiplier": { - "type": "number", - "description": "This property is irrelevant if the basis is Monthly.\r\nBut if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period.", - "format": "double" + { + "description": "If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version", + "in": "query", + "name": "differenceOnly", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunEntry" + } + } + }, + "description": "Success" + } + }, + "summary": "Get a PayRunEntry", + "tags": [ + "PayRun" + ] + }, + "post": { + "operationId": "UpdatePayRunEntryPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "baseHourlyRate": { - "type": "number", - "description": "This property is used to calculate values for PayCodes that are set as multiples of \r\nthe employees base hourly rate. Eg Overtime.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "baseDailyRate": { - "type": "number", - "description": "This property is used to calculate values for PayCodes that are set as multiples of \r\nthe employees base daily rate. Eg sick.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", - "format": "double" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "basicPay": { - "type": "number", - "description": "The amount of basic pay the Employee is regularly paid each period\r\nThis amount is the combined total of all pay elements that contribute to basic pay", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "autoAdjustForLeave": { - "type": "boolean", - "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "niTable": { - "type": "string" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "regularPayLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayLine" + { + "description": "If set to true then changes made to employee pay options will be reflected into the pay run entry. Defaults to false.", + "in": "query", + "name": "forceSyncEmployeePayOptions", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PayRunEntry" + } }, - "description": "These are used to make additions/deductions to the pay for this Employee.\r\nYou do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created.", - "nullable": true - }, - "excludedRegularPayLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayLine" + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunEntry" + } }, - "description": "These used to store the PayLines that have been excluded from RegularPaylines.", - "nullable": true - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PayRunEntry" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PayRunEntry" + } + } } }, - "additionalProperties": false - }, - "EmployeeSortBy": { - "enum": [ - "PayrollCode", - "Employee", - "Department", - "PaySchedule" - ], - "type": "string" - }, - "EmployeeStatus": { - "enum": [ - "Current", - "Former", - "Upcoming" - ], - "type": "string" - }, - "EmployeeYtdValues": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunEntry" + } + } + }, + "description": "Success" + } + }, + "summary": "Update a PayRunEntry", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/{id}/changes": { + "get": { + "description": "Returns a list of AuditEntry reflecting changes made to a PayRunEntry and related employee record for a given PayRun\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "ChangesForPayRunEntryPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } + }, + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "payrollCode": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "firstName": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "lastName": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "significantChangesOnly", + "schema": { + "default": false, + "type": "boolean" + } }, - "values": { - "type": "array", - "items": { - "$ref": "#/components/schemas/YtdValue" + { + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ChangeSummary" + }, + "type": "array" + } + } }, - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "EmployerDefaults": { - "type": "object", - "properties": { - "employer": { - "$ref": "#/components/schemas/EmployerItem" - }, - "payCodes": { - "type": "boolean", - "description": "If true then PayCodes and PayCodeSets will be copied from the specified Employer" - }, - "csvMappings": { - "type": "boolean", - "description": "If true then CSV Mappings will be copied from the specified Employer" - }, - "departments": { - "type": "boolean", - "description": "If true then Departments, Cost Centres and Analysis Categories will be copied from the specified Employer" - }, - "rti": { - "type": "boolean", - "description": "If true then RTI Settings will be copied from the specified Employer" - }, - "users": { - "type": "boolean", - "description": "If true then Users will be copied from the specified Employer" + "summary": "List PayRun Changes for PayRunEntry", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/{id}/umbrella": { + "post": { + "description": "Automatically sets the values on the PayRunEntry based on an UmbrellaPayment.\r\nUsing this method overwrites any existing values for the PayRunEntry.", + "operationId": "PayRunEntryUmbrellaPaymentPayRun", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "hmrcNoticeSettings": { - "type": "boolean", - "description": "If true then HMRC Notice Settings will be copied from the specified Employer" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "payOptions": { - "type": "boolean", - "description": "If true then Default Pay Options will be copied from the specified Employer." + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "workingPatterns": { - "type": "boolean", - "description": "If true then WorkingPatterns will be copied from the specified Employer" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "occupationalPolicies": { - "type": "boolean", - "description": "If true then Occupational Absence Schemes will be copied from the specified Employer." + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "pensionSchemes": { - "type": "boolean", - "description": "If true then PensionSchemes will be copied from the specified Employer" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UmbrellaPayment" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UmbrellaPayment" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/UmbrellaPayment" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UmbrellaPayment" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunEntry" + } + } + }, + "description": "Success" + } + }, + "summary": "PayRunEntry Umbrella Payment", + "tags": [ + "PayRun" + ] + } + }, + "/employers/{employerId}/payspines": { + "get": { + "description": "Lists all PaySpine for an Employer.", + "operationId": "IndexPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list PaySpine", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "payees": { - "type": "boolean", - "description": "If true then Payees will be copied from the specified Employer" + "400": { + "description": "Bad Request" }, - "reportPacks": { - "type": "boolean", - "description": "If true then ReportPacks will be copied from the specified Employer" + "404": { + "description": "Employer or PaySpine Not Found" } }, - "additionalProperties": false, - "description": "When a user creates a new Employer, certain settings can be copied from an existing employer.\r\nThis model determines which employer (if any) settings should be copied from and what should be copied." + "summary": "List PaySpine", + "tags": [ + "PaySpine" + ] }, - "EmployerEmail": { - "required": [ - "subject", - "toEmail", - "toName" + "post": { + "description": "Create a new PaySpine for the Employer.", + "operationId": "CreatePaySpine", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "object", - "properties": { - "toName": { - "maxLength": 150, - "minLength": 1, - "type": "string" - }, - "toEmail": { - "maxLength": 150, - "minLength": 1, - "type": "string" - }, - "subject": { - "maxLength": 150, - "minLength": 1, - "type": "string" - }, - "buttonText": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "buttonLink": { - "maxLength": 250, - "type": "string", - "nullable": true - }, - "bodyPreview": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "body": { - "type": "string", - "nullable": true - }, - "afterBtnBody": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/BackgroundTaskStatus" - }, - "statusDate": { - "type": "string", - "format": "date-time" - }, - "statusMessage": { - "type": "string", - "nullable": true - }, - "sendAttempts": { - "type": "integer", - "format": "int32" - }, - "webAppBaseUrl": { - "type": "string", - "nullable": true - }, - "attachments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmailAttachment" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineRequest" + } }, - "nullable": true - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineRequest" + } + } } }, - "additionalProperties": false - }, - "EmployerEvcOptInHistory": { - "type": "object", - "properties": { - "optIn": { - "type": "boolean" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineResponse" + } + } + }, + "description": "Created" }, - "date": { - "type": "string", - "format": "date" + "400": { + "description": "Bad Request" }, - "userEmail": { - "type": "string", - "nullable": true + "404": { + "description": "Employer Not Found" } }, - "additionalProperties": false - }, - "EmployerGroup": { - "required": [ - "code", - "name" + "summary": "Create PaySpine", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/import": { + "post": { + "description": "Import PaySpine from a CSV file.", + "operationId": "ImportCsvPaySpinePaySpine", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "object", - "properties": { - "code": { - "maxLength": 20, - "minLength": 1, - "type": "string", - "description": "The unique code for this EmployerGroup" - }, - "employerCount": { - "type": "integer", - "format": "int32" - }, - "color": { - "maxLength": 6, - "type": "string", - "description": "A color to used to represent this EmployerGroup, in hex format. ie 'ff0000'", - "nullable": true - }, - "name": { - "maxLength": 150, - "minLength": 1, - "type": "string" + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } } }, - "additionalProperties": false - }, - "EmployerGroupMembership": { - "required": [ - "code" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Import PaySpine from csv file", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/paygrades/import": { + "post": { + "description": "Import Spine Grades from a CSV file.", + "operationId": "ImportPayspineGradeCsvPaySpine", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "object", - "properties": { - "code": { - "minLength": 1, - "type": "string", - "description": "The Code for the EmployerGroup" - }, - "color": { - "type": "string", - "description": "[readonly] The Color for the EmployerGroup", - "nullable": true + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Import SpineGrades from csv file", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/spinalpoints/import": { + "post": { + "description": "Import SpinalPoints from a CSV file.", + "operationId": "ImportCsvPaySpine", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Import SpinalPoints from csv file", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{id}": { + "delete": { + "description": "Deletes the specified PaySpine.", + "operationId": "DeletePaySpine", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "title": { - "type": "string", - "description": "[readonly] The Title for the EmployerGroup", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "primary": { - "type": "boolean", - "description": "Set to true if this is the primary EmployerGroup for the Employer.\r\nOnly one EmployerGroup can be set as the primary." + "400": { + "description": "Bad Request" } }, - "additionalProperties": false, - "description": "Used to represent an Employers membership of a EmployerGroup" + "summary": "Delete PaySpine", + "tags": [ + "PaySpine" + ] }, - "EmployerItem": { - "type": "object", - "properties": { - "isOwner": { - "type": "boolean" - }, - "role": { - "$ref": "#/components/schemas/UserRole" - }, - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true - }, - "metadata": { - "nullable": true + "get": { + "description": "Gets the PaySpine specified.", + "operationId": "GetPaySpine", + "parameters": [ + { + "description": "The Id of the Employer to which the PaySpine belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "url": { - "type": "string", - "nullable": true + { + "description": "The Id of the PaySpine which you want to fetch", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "EmployerListType": { - "enum": [ - "Owned", - "FromOthers", - "Support", - "Archived" ], - "type": "string" - }, - "EmployerOpeningBalances": { - "type": "object", - "properties": { - "smpRecovered": { - "type": "number", - "description": "Value of Statutory Maternity Pay recovered year to date", - "format": "double" - }, - "sppRecovered": { - "type": "number", - "description": "Value of Statutory Paternity Pay recovered year to date", - "format": "double" - }, - "sapRecovered": { - "type": "number", - "description": "Value of Statutory Adoption Pay recovered year to date", - "format": "double" - }, - "shPPRecovered": { - "type": "number", - "description": "Value of Shared Parental Pay recovered year to date", - "format": "double" - }, - "spbpRecovered": { - "type": "number", - "description": "Value of Statutory Parental Bereavment Pay recovered year to date", - "format": "double" - }, - "sncpRecovered": { - "type": "number", - "description": "Value of Statutory Neonatal Care Pay recovered year to date", - "format": "double" - }, - "nicCompensationOnSMP": { - "type": "number", - "description": "Value of NIC compensation on SMP year to date", - "format": "double" - }, - "nicCompensationOnSPP": { - "type": "number", - "description": "Value of NIC compensation on Statutory Paternity Pay year to date", - "format": "double" - }, - "nicCompensationOnSAP": { - "type": "number", - "description": "Value of NIC compensation on Statutory Adoption Pay year to date", - "format": "double" - }, - "nicCompensationOnShPP": { - "type": "number", - "description": "Value of NIC compensation on Shared Parental Pay year to date", - "format": "double" - }, - "nicCompensationOnSPBP": { - "type": "number", - "description": "Value of NIC compensation on Statutory Parental Bereavement Pay year to date", - "format": "double" - }, - "nicCompensationOnSNCP": { - "type": "number", - "description": "Value of NIC compensation on Statutory Neonatal Care Pay year to date", - "format": "double" - }, - "cisDeductionsSuffered": { - "type": "number", - "description": "Value of CIS deductions suffered year to date", - "format": "double" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineResponse" + } + } + }, + "description": "Success" }, - "apprenticeshipLevy": { - "type": "number", - "description": "Value of Apprenticeship levy paid year to date", - "format": "double" + "400": { + "description": "Bad Request" }, - "employmentAllowance": { - "type": "number", - "description": "Value of Employment Allowance claimed year to date", - "format": "double" + "404": { + "description": "Employer or PaySpine Not Found" } }, - "additionalProperties": false + "summary": "Get PaySpine", + "tags": [ + "PaySpine" + ] }, - "EmployerPensionContribution": { - "type": "object", - "properties": { - "pensionName": { - "type": "string", - "nullable": true - }, - "contributionAmount": { - "type": "number", - "format": "double" - }, - "contributionPercentage": { - "type": "number", - "format": "double" + "put": { + "description": "Updates a PaySpine for the Employer.", + "operationId": "UpdatePaySpine", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isPercentage": { - "type": "boolean" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "EmployerSortBy": { - "enum": [ - "ProcessorName", - "Name", - "Crn", - "AlternativeId", - "EmployeeCount", - "RTICount", - "PensionStatus", - "AutoPilot" ], - "type": "string" - }, - "EmployerTemplate": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/EmployerTemplateType" - }, - "description": { - "type": "string", - "description": "Explains the purpose of this template", - "nullable": true - }, - "isCustom": { - "type": "boolean", - "description": "Indicates whether or not this template has been changed from the default content.", - "readOnly": true - }, + "requestBody": { "content": { - "type": "string", - "nullable": true - }, - "subject": { - "maxLength": 250, - "type": "string", - "nullable": true - }, - "defaultContent": { - "type": "string", - "description": "[readonly] The default content for this template", - "nullable": true - }, - "defaultSubject": { - "type": "string", - "description": "[readonly] The default subject for this template", - "nullable": true - }, - "hasSubject": { - "type": "boolean", - "description": "[readonly] If false then the Subject property is not relevant for this template type" - }, - "tokens": { - "type": "array", - "items": { - "type": "string" + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineUpdateRequest" + } }, - "description": "[readonly] A list of tokens that can be used with this template.\r\nFor example, if 'Employee.FirstName' is in the list then use '{Employee.FirstName}' in the Content or Subject and\r\nit'll be replaced with the relevant value when the template is parsed.", - "nullable": true - }, - "tokensExpanded": { - "type": "boolean" - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineUpdateRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineUpdateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineUpdateRequest" + } + } } }, - "additionalProperties": false - }, - "EmployerTemplateType": { - "enum": [ - "PayslipEmail", - "AutoEnrolment_Enrolled", - "AutoEnrolment_Enrolled_NetPay", - "AutoEnrolment_NotEnrolled", - "AutoEnrolment_Insert", - "CisStatementEmail", - "PayrunSummary", - "PayslipsUnemailed", - "PayrunAutoEmail", - "P60Email", - "AnnualCisStatementEmail", - "P45Email", - "AutoEnrolment_Postponed", - "AutoEnrolment_ReEnrolled", - "AutoEnrolment_Enrolled_SalarySacrifice", - "AutoEnrolment_ReEnrolled_SalarySacrifice", - "P11DEmail" - ], - "type": "string" - }, - "EmploymentDetails": { - "required": [ - "payrollCode" - ], - "type": "object", - "properties": { - "cisSubContractor": { - "type": "boolean", - "description": "Set to True if this Employee is a CIS Subcontractor. The ```Cis``` property contains further information" - }, - "payrollCode": { - "maxLength": 35, - "minLength": 1, - "type": "string", - "description": "The Employees Payroll Code. Must be unique within the Employer." - }, - "jobTitle": { - "maxLength": 120, - "type": "string", - "description": "Job Title of Primary role of the Employee", - "nullable": true - }, - "workplacePostcode": { - "maxLength": 10, - "type": "string", - "description": "Set the workplace postcode, ensuring it's uppercase and no longer than 10 characters.", - "nullable": true - }, - "onHold": { - "type": "boolean", - "description": "Set to true to temporarily exclude the employee from payruns" - }, - "onFurlough": { - "type": "boolean", - "description": "Set to true if the employee is on furlough." - }, - "furloughStart": { - "type": "string", - "description": "Furlough Start Date.", - "format": "date", - "nullable": true - }, - "furloughEnd": { - "type": "string", - "description": "Furlough End Date.", - "format": "date", - "nullable": true - }, - "furloughCalculationBasis": { - "$ref": "#/components/schemas/FurloughCalculationBasis" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Update PaySpine", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{id}/annualsalarybypayspines": { + "get": { + "operationId": "GetAnnualValueFromSalaryFormulaPaySpine", + "parameters": [ + { + "description": "The Employer id.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "furloughCalculationBasisAmount": { - "type": "number", - "format": "double" + { + "description": "The Employee id.", + "in": "query", + "name": "employeeId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "partialFurlough": { - "type": "boolean", - "description": "Set to true if the employee is partially furloughed." + { + "description": "The selected PaySpine Id.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "furloughHoursNormallyWorked": { - "type": "number", - "format": "double" + { + "description": "The selected PaySpineGrade Id.", + "in": "query", + "name": "paySpineGradeId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "furloughHoursOnFurlough": { - "type": "number", - "format": "double" + { + "description": "The selected SpinalPoint Id.", + "in": "query", + "name": "spinalPointId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "isApprentice": { - "type": "boolean", - "description": "Set to True if this Employee is an apprentice. This affects the calculations for National Minimum Wage" + { + "description": "The London Allowance Id of PayLine.", + "in": "query", + "name": "londonAllowanceType", + "schema": { + "format": "int32", + "type": "integer" + } }, - "apprenticeshipStartDate": { - "type": "string", - "format": "date", - "nullable": true + { + "description": "The PayLine effective from.", + "in": "query", + "name": "effectiveFrom", + "schema": { + "format": "date-time", + "type": "string" + } }, - "apprenticeshipEndDate": { - "type": "string", - "format": "date", - "nullable": true + { + "description": "The selected WorkingPattern Id.", + "in": "query", + "name": "workingPatternId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "workingPattern": { - "type": "string", - "description": "Used when calculating payments for Leave.\r\nIf null then the default Working Pattern is used", - "format": "uuid", - "nullable": true + { + "description": "The Role Id.", + "in": "query", + "name": "roleId", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaylineCalculationData" + } + } + }, + "description": "Success" }, - "forcePreviousPayrollCode": { - "maxLength": 35, - "type": "string", - "description": "If this property has a non-empty value then a change of Payroll code will be declared on the next FPS.", - "nullable": true + "404": { + "description": "Employee or PaySpine Not Found" + } + }, + "summary": "Get Annual Value from pay spines formula", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{id}/employees/{employeeId}/getspinalpointwithannualsalary/{spinalPointId}/{effectiveFrom}": { + "get": { + "operationId": "GetSpinalPointWithAnnualSalaryPaySpine", + "parameters": [ + { + "description": "The Employer id.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "starterDetails": { - "$ref": "#/components/schemas/StarterDetails" + { + "description": "The Employee id.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "directorshipDetails": { - "$ref": "#/components/schemas/DirectorshipDetails" + { + "description": "The selected PaySpine Id.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "leaverDetails": { - "$ref": "#/components/schemas/LeaverDetails" + { + "description": "The selected SpinalPoint Id.", + "in": "path", + "name": "spinalPointId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "cis": { - "$ref": "#/components/schemas/CisDetails" + { + "description": "The PayLine effective from.", + "in": "path", + "name": "effectiveFrom", + "required": true, + "schema": { + "format": "date-time", + "type": "string" + } }, - "department": { - "$ref": "#/components/schemas/Department" + { + "description": "The selected PaySpineGrade Id.", + "in": "query", + "name": "paySpineGradeId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "roles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + { + "description": "The London Allowance Id of PayLine.", + "in": "query", + "name": "londonAllowanceType", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpinalPointResponse" + } + } }, - "description": "List of Roles held by Employee", - "nullable": true - }, - "isWorkingInFreePort": { - "type": "boolean", - "description": "Flag indicating the employee is employed in a Freeport" - }, - "veteranDetails": { - "$ref": "#/components/schemas/VeteranDetails" + "description": "Success" }, - "continuousEmploymentDate": { - "type": "string", - "description": "[readonly] Continuous employment date for the occupational scheme.", - "format": "date", - "nullable": true + "404": { + "description": "Employee or PaySpine Not Found" + } + }, + "summary": "Get Spinal Point With Final Annual Salary", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/allowances": { + "delete": { + "description": "Delete all Allowances associated with the specified Pay Spine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "DeleteAllSpineAllowancesPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to delete SpineAllowances", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "includeSecondedInfoOnStarter": { - "type": "boolean", - "description": "[readonly] If true then include seconded information on starter of FPS" + { + "description": "The Id of the Pay Spine for which you want to delete SpineAllowances", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "isWorkingInInvestmentZone": { - "type": "boolean", - "description": "Flag indicating the employee is employed in an Investment Zone" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete All SpineAllowances Associated with a PaySpine", + "tags": [ + "PaySpine" + ] }, - "EntitlementBand": { - "type": "object", - "properties": { - "percentOfPay": { - "type": "number", - "format": "double" - }, - "period": { - "type": "integer", - "format": "int32" + "get": { + "description": "List Spine Allowances for a Pay Spine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "GetSpineAllowanceListPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want list of Spine Allowances", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "paySspInAddition": { - "type": "boolean" + { + "description": "The Id of the Pay Spine for which you want list of Spine Allowances", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpineAllowanceResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "order": { - "type": "integer", - "format": "int32" + "400": { + "description": "Bad Request" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "404": { + "description": "Employer or Pay Spine Not Found" } }, - "additionalProperties": false - }, - "EntityType": { - "enum": [ - "None", - "Employer", - "Employee", - "PayRunEntry", - "PensionScheme", - "PayCode", - "Note", - "Leave", - "Benefits", - "Pension", - "AttachmentOrder", - "OpeningBalances", - "NicSummary", - "HmrcPayment", - "DpsNotice", - "User", - "Settings", - "PayRun", - "Loan", - "Department", - "EmployerOpeningBalances", - "EmployerGroupMembership", - "DepartmentMembership", - "TermCalendar", - "TermCalendarYear" - ], - "type": "string" + "summary": "List SpineAllowances", + "tags": [ + "PaySpine" + ] }, - "Eps": { - "type": "object", - "properties": { - "periodOfInactivity": { - "$ref": "#/components/schemas/FromToDates" - }, - "noPaymentForPeriod": { - "$ref": "#/components/schemas/FromToDates" - }, - "finalSubmission": { - "$ref": "#/components/schemas/EpsFinalSubmission" - }, - "recoverableAmounts": { - "$ref": "#/components/schemas/RecoverableAmounts" - }, - "apprenticeshipLevy": { - "$ref": "#/components/schemas/EpsApprenticeshipLevy" - }, - "account": { - "$ref": "#/components/schemas/EpsAccount" - }, - "eligibleForEmploymentAllowance": { - "type": "boolean", - "nullable": true + "post": { + "description": "Create Allowance for a Pay Spine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "CreateSpineAllowancePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to create Spine Allowance", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "deMinimisStateAid": { - "$ref": "#/components/schemas/EpsDeMinimisStateAid" + { + "description": "The Id of the Pay spine for which you want to create Spine Allowance", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpineAllowanceResponse" + } + } + }, + "description": "Created" }, - "iRmark": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" + } + }, + "summary": "Create SpineAllowance", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/allowances/create/bulk": { + "post": { + "description": "Creates multiple Spine Allowance for the specified PaySpine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "CreateMultipleSpineAllowancePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to create multiple SpineAllowance", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "xml": { - "type": "string", - "description": "This property will soon be removed and should not be used.\r\nThere is now a dedicated API endpoint for retrieving the XML for a submission.", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want to create multiple SpineAllowance", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" + }, + "type": "array" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpineAllowanceResponse" + }, + "type": "array" + } + } + }, + "description": "Created" + } + }, + "summary": "Create Multiple SpineAllowances", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/allowances/update/bulk": { + "put": { + "description": "Updates an array of Spine Allowance for the specified PaySpine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "UpdateMultipleSpineAllowancePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update multiple SpineAllowance", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "description": "The Id of the Pay Spine for which you want to update multiple SpineAllowance", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpineAllowanceUpdateRequest" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpineAllowanceUpdateRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpineAllowanceUpdateRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpineAllowanceUpdateRequest" + }, + "type": "array" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpineAllowanceResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Update Multiple SpineAllowances", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/allowances/{allowanceId}/allowancegrades": { + "delete": { + "description": "Delete all AllowanceGrades associated with a PaySpine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "DeleteAllAllowanceGradesPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to delete Allowance Grades", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employerReferences": { - "$ref": "#/components/schemas/EmpRefs" + { + "description": "The Id of the Pay Spine for which you want to delete Allowance Grades", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "govTalkSubmission": { - "$ref": "#/components/schemas/GovTalkSubmission" + { + "description": "The Id of the Spine Allowance for which you want to delete Allowance Grades", + "in": "path", + "name": "allowanceId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete All AllowanceGrades Associated with a PaySpine", + "tags": [ + "PaySpine" + ] }, - "EpsAccount": { - "type": "object", - "properties": { - "accountHoldersName": { - "type": "string", - "nullable": true - }, - "accountNo": { - "type": "string", - "nullable": true + "get": { + "description": "List AllowanceGrades for a PaySpine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "GetAllowanceGradesPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want list of Allowance Grades", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "sortCode": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want list of Allowance Grades", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "buildingSocRef": { - "type": "string", - "nullable": true + { + "description": "The Id of the Spine Allowance for which you want list of Allowance Grades", + "in": "path", + "name": "allowanceId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Used on an EPS to send bank account information" - }, - "EpsApprenticeshipLevy": { - "type": "object", - "properties": { - "taxMonth": { - "type": "integer", - "format": "int32" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.AllowanceGradesResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "levyDueYTD": { - "type": "number", - "format": "double" + "400": { + "description": "Bad Request" }, - "annualAllce": { - "type": "number", - "format": "double" + "404": { + "description": "Employer or Pay Spine Not Found" } }, - "additionalProperties": false, - "description": "Used on an EPS to declare an Apprenticeship Levy amount" + "summary": "List AllowanceGrades", + "tags": [ + "PaySpine" + ] }, - "EpsDeMinimisStateAid": { - "type": "object", - "properties": { - "agri": { - "type": "boolean" - }, - "fisheriesAqua": { - "type": "boolean" + "post": { + "description": "Create AllowanceGrade for a PaySpine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "CreateAllowanceGradesPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to create Allowance Grade", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "roadTrans": { - "type": "boolean" + { + "description": "The Id of the Pay spine for which you want to create Allowance Grade", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "indust": { - "type": "boolean" + { + "description": "The Id of the Spine Allowance for which you want to create Allowance Grade", + "in": "path", + "name": "allowanceId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" + } + } } }, - "additionalProperties": false, - "description": "Used on an EPS to declare an Employment Allowance DeMinimis State Aid information" - }, - "EpsFinalSubmission": { - "type": "object", - "properties": { - "isFinalSubmission": { - "type": "boolean" - }, - "becauseSchemeCeased": { - "type": "boolean" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AllowanceGradesResponse" + } + } + }, + "description": "Created" }, - "dateCeased": { - "type": "string", - "format": "date", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false, - "description": "Used on an EPS to declare a Final Submission" - }, - "Establishment": { - "type": "object", - "properties": { - "localAuthorityNumber": { - "type": "string", - "nullable": true - }, - "schoolEmployerType": { - "type": "string", - "nullable": true + "summary": "Create AllowanceGrade", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/allowances/{allowanceId}/allowancegrades/create/bulk": { + "post": { + "description": "Create multiple AllowanceGrades for a PaySpine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "CreateMultipleAllowanceGradesPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to create multiple Allowance Grades", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "establishmentCode": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want to create multiple Allowance Grades", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "description": "The Id of the Spine Allowance for which you want to create multiple Allowance Grades", + "in": "path", + "name": "allowanceId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "EvcSettings": { - "type": "object", - "properties": { - "rightToRestrict": { - "type": "boolean", - "description": "If set to True then this employee shouldn't be included in data sent to EVC" - }, - "rightToDelete": { - "type": "boolean", - "description": "If set to True then the EVC service will be informed that the employee has invoked their GDPR Right To Delete" - }, - "subjectAccessRequest": { - "type": "boolean", - "description": "If set to True then the EVC service will be informed that the employee has made a Subject Access Request" - }, - "employee": { - "$ref": "#/components/schemas/Item" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.AllowanceGradesResponse" + }, + "type": "array" + } + } + }, + "description": "Created" } }, - "additionalProperties": false, - "description": "Employee Settings related to the Employee Verification Programme" - }, - "Exb": { - "type": "object", - "properties": { - "additionsAmount": { - "type": "number", - "format": "double" - }, - "additionsDescription": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "deductionsAmount": { - "type": "number", - "format": "double" - }, - "deductionsDescription": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "employeeCount": { - "type": "integer", - "description": "[readonly] The number of employees with a P11D", - "format": "int32" - }, - "totalBenefits": { - "type": "number", - "description": "[readonly] Total value of benefits, not including any deductions or additions", - "format": "double" - }, - "totalAdjustedBenefits": { - "type": "number", - "description": "[readonly] Total value of benefits", - "format": "double", - "readOnly": true - }, - "nicsRate": { - "type": "number", - "description": "[readonly] The Class 1A NICS Rate", - "format": "double" - }, - "nicsPayable": { - "type": "number", - "description": "[readonly] NICs Payable", - "format": "double", - "readOnly": true - }, - "expensesAndBenefits": { - "$ref": "#/components/schemas/ExpensesAndBenefits" - }, - "iRmark": { - "type": "string", - "nullable": true - }, - "xml": { - "type": "string", - "description": "This property will soon be removed and should not be used.\r\nThere is now a dedicated API endpoint for retrieving the XML for a submission.", - "nullable": true - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "employerReferences": { - "$ref": "#/components/schemas/EmpRefs" + "summary": "Create Multiple AllowanceGrades", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/allowances/{allowanceId}/allowancegrades/update/bulk": { + "put": { + "description": "Update multiple AllowanceGrades for a PaySpine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "UpdateMultipleAllowanceGradesPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update multiple Allowance Grades", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "govTalkSubmission": { - "$ref": "#/components/schemas/GovTalkSubmission" + { + "description": "The Id of the Pay Spine for which you want to update multiple Allowance Grades", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "description": "The Id of the Spine Allowance for which you want to update multiple Allowance Grades", + "in": "path", + "name": "allowanceId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "ExbDeclarations": { - "type": "object", - "properties": { - "p11Dincluded": { - "type": "string", - "nullable": true - }, - "p46CarDeclaration": { - "type": "string", - "nullable": true + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.AllowanceGradesUpdateRequest" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.AllowanceGradesUpdateRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.AllowanceGradesUpdateRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.AllowanceGradesUpdateRequest" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "ExbEmployer": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.AllowanceGradesResponse" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "ExbP11d": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/ExbP11dEmployee" - }, - "transferred": { - "$ref": "#/components/schemas/P11DAssetTransferredCollection" - }, - "payments": { - "$ref": "#/components/schemas/P11DPaymentCollection" - }, - "vouchersOrCCs": { - "$ref": "#/components/schemas/P11DSingleItem" - }, - "livingAccom": { - "$ref": "#/components/schemas/P11DSingleItem" - }, - "mileageAllow": { - "$ref": "#/components/schemas/P11DSingleItem" - }, - "cars": { - "$ref": "#/components/schemas/P11DCarCollection" - }, - "vans": { - "$ref": "#/components/schemas/P11dVans" - }, - "loans": { - "$ref": "#/components/schemas/P11DLoanCollection" - }, - "medical": { - "$ref": "#/components/schemas/P11DSingleItem" - }, - "relocation": { - "$ref": "#/components/schemas/P11DSingleItem" + "summary": "Update Multiple AllowanceGrades", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/allowances/{allowanceId}/allowancegrades/{allowanceGradeId}": { + "delete": { + "description": "Delete AllowanceGrade for a PaySpine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "DeleteAllowanceGradePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to delete Allowance Grade", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "services": { - "$ref": "#/components/schemas/P11DSingleItem" + { + "description": "The Id of the Pay Spine for which you want to delete Allowance Grade", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "assetsAvail": { - "$ref": "#/components/schemas/P11DAssetAvailableCollection" + { + "description": "The Id of the Spine Allowance for which you want to delete Allowance Grade", + "in": "path", + "name": "allowanceId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "other": { - "$ref": "#/components/schemas/P11DOther" + { + "description": "The Id of the Allowance Grade for which you want to delete Allowance Grade", + "in": "path", + "name": "allowanceGradeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "expPaid": { - "$ref": "#/components/schemas/P11dExpenses" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete AllowanceGrade", + "tags": [ + "PaySpine" + ] }, - "ExbP11dEmployee": { - "type": "object", - "properties": { - "employeeUniqueId": { - "type": "string", - "format": "uuid" - }, - "dirInd": { - "type": "string", - "nullable": true + "get": { + "description": "Get AllowanceGrade for a PaySpine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "GetAllowanceGradePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want Allowance Grade", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "name": { - "$ref": "#/components/schemas/RtiEmployeeName" + { + "description": "The Id of the Pay Spine for which you want Allowance Grade", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "wksNo": { - "type": "string", - "nullable": true + { + "description": "The Id of the Spine Allowance for which you want Allowance Grade", + "in": "path", + "name": "allowanceId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "nino": { - "type": "string", - "nullable": true + { + "description": "The Id of the Allowance Grade for which you want Allowance Grade", + "in": "path", + "name": "allowanceGradeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AllowanceGradesResponse" + } + } + }, + "description": "Success" }, - "birthDate": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "gender": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ExbP11db": { - "type": "object", - "properties": { - "class1AcontributionsDue": { - "$ref": "#/components/schemas/ExbP11dbClass1A" + "404": { + "description": "Employer or PaySpine Grade Not Found" } }, - "additionalProperties": false + "summary": "Get AllowanceGrade", + "tags": [ + "PaySpine" + ] }, - "ExbP11dbClass1A": { - "type": "object", - "properties": { - "niCsRate": { - "type": "string", - "nullable": true + "put": { + "description": "Update AllowanceGrade for a PaySpine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "UpdateAllowanceGradePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update Allowance Grade", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "totalBenefit": { - "$ref": "#/components/schemas/ExbP11dbClass1ATotalBenefit" + { + "description": "The Id of the Pay Spine for which you want to update Allowance Grade", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "adjustments": { - "$ref": "#/components/schemas/ExbP11dbClass1AAdjustments" + { + "description": "The Id of the Spine Allowance for which you want to update Allowance Grade", + "in": "path", + "name": "allowanceId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "niCpayable": { - "type": "string", - "nullable": true + { + "description": "The Id of the Allowance Grade for which you want to update Allowance Grade", + "in": "path", + "name": "allowanceGradeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AllowanceGradesRequest" + } + } } }, - "additionalProperties": false - }, - "ExbP11dbClass1AAdjustment": { - "type": "object", - "properties": { - "description": { - "type": "string", - "nullable": true - }, - "adjustment": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.AllowanceGradesResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "ExbP11dbClass1AAdjustments": { - "type": "object", - "properties": { - "totalBenefit": { - "type": "string", - "nullable": true - }, - "amountDue": { - "$ref": "#/components/schemas/ExbP11dbClass1AAdjustment" - }, - "amountNotDue": { - "$ref": "#/components/schemas/ExbP11dbClass1AAdjustment" + "summary": "Update AllowanceGrade", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/allowances/{allowanceid}": { + "delete": { + "description": "Delete Allowance for a Pay Spine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "DeleteSpineAllowancePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to delete Spine Allowance", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "total": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want to delete Spine Allowance", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payable": { - "type": "string", - "nullable": true + { + "description": "The Id of the Spine Allowance for which you want to delete Spine Allowance", + "in": "path", + "name": "allowanceid", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "ExbP11dbClass1ATotalBenefit": { - "type": "object", - "properties": { - "adjustmentRequired": { - "type": "string", - "nullable": true + ], + "responses": { + "204": { + "description": "No Content" }, - "value": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete SpineAllowance", + "tags": [ + "PaySpine" + ] }, - "ExbReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + "get": { + "description": "Get Allowance for a Pay Spine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "GetSpineAllowancePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get Spine Allowance", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "$ref": "#/components/schemas/Exb" + { + "description": "The Id of the Pay Spine for which you want to get Spine Allowance", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "description": "The Id of the Spine Allowance for which you want to get Spine Allowance", + "in": "path", + "name": "allowanceid", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "ExpensesAndBenefits": { - "type": "object", - "properties": { - "employer": { - "$ref": "#/components/schemas/ExbEmployer" - }, - "declarations": { - "$ref": "#/components/schemas/ExbDeclarations" - }, - "p11Db": { - "$ref": "#/components/schemas/ExbP11db" - }, - "p11DrecordCount": { - "type": "integer", - "format": "int32" - }, - "p46CarRecordCount": { - "type": "integer", - "format": "int32" - }, - "p11D": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExbP11d" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpineAllowanceResponse" + } + } }, - "nullable": true - }, - "relatedTaxYear": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ExternalDataCompany": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true + "description": "Success" }, - "name": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "schemeName": { - "type": "string", - "nullable": true + "404": { + "description": "Employer or Pay Spine Not Found" } }, - "additionalProperties": false, - "description": "When we retrieve data from an ExternalDataProvider we normalise it so that regardless of the provider the models are the same.\r\nThis model is used to represent a Company in an ExternalDataProvider" + "summary": "Get SpineAllowance", + "tags": [ + "PaySpine" + ] }, - "ExternalDataProvider": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "id": { - "$ref": "#/components/schemas/ExternalDataProviderId" - }, - "authScheme": { - "$ref": "#/components/schemas/AuthScheme" - }, - "logoUrl": { - "type": "string", - "nullable": true - }, - "iconUrl": { - "type": "string", - "nullable": true - }, - "connected": { - "type": "boolean" - }, - "connectedAs": { - "type": "string", - "nullable": true - }, - "requiresConfig": { - "type": "boolean" + "put": { + "description": "Update Allowance for a Pay Spine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "UpdateSpineAllowancePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update Spine Allowance", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "deferralUrl": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want to update Spine Allowance", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "types": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExternalDataProviderType" - }, - "nullable": true + { + "description": "The Id of the Spine Allowance for which you want to update Spine Allowance", + "in": "path", + "name": "allowanceid", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "ExternalDataProviderId": { - "enum": [ - "SmartPension_Employer", - "SmartPension_Adviser", - "PeoplesPension", - "Xero", - "Qbo", - "Sage", - "Nest", - "Cashplus", - "BreatheHr", - "KashFlow", - "FreeAgent", - "FreeAgentPm", - "Modulr", - "Square", - "Cezanne", - "Ciphr", - "Telleroo", - "WeWorked", - "RotaCloud", - "Quinyx", - "Csod", - "Planday", - "Starling", - "Deputy", - "Bottomline", - "Twinfield", - "MyePayWindow", - "IFinance", - "AccountsIQ", - "EPaySlips", - "NetSuite" - ], - "type": "string" - }, - "ExternalDataProviderType": { - "enum": [ - "PensionSchemes", - "Accounting", - "Payments", - "Hr", - "TimeAndAttendance", - "EmployeePortal" ], - "type": "string" - }, - "ExternalEmployeeMapping": { - "type": "object", - "properties": { - "externalId": { - "type": "string", - "description": "[readonly] The id for the employee in the external system", - "nullable": true - }, - "providerId": { - "$ref": "#/components/schemas/ExternalDataProviderId" - }, - "status": { - "$ref": "#/components/schemas/ExternalEmployeeMappingStatus" - }, - "employee": { - "$ref": "#/components/schemas/Item" - }, - "externalEmployee": { - "$ref": "#/components/schemas/Employee" - }, - "lastSyncDate": { - "type": "string", - "description": "[readonly] The date and time this mapping was last synchronised", - "format": "date", - "nullable": true + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpineAllowanceRequest" + } + } } }, - "additionalProperties": false, - "description": "Used to represent details of an employee from an ExternalDataProvider, along with mapping information to an employee in the payroll system" - }, - "ExternalEmployeeMappingStatus": { - "enum": [ - "Unmapped", - "Mapped", - "Ignored", - "Import" - ], - "type": "string" - }, - "ExternalProviderConversation": { - "type": "object", - "properties": { - "title": { - "type": "string", - "nullable": true - }, - "contentType": { - "type": "string", - "nullable": true - }, - "url": { - "type": "string", - "nullable": true - }, - "request": { - "type": "string", - "nullable": true - }, - "response": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/BackgroundTaskStatus" - }, - "statusMessage": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpineAllowanceResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "This model is used to provide details of a data exchange with an ExternalDataProvider" - }, - "FieldModification": { - "type": "object", - "properties": { - "fieldName": { - "type": "string", - "nullable": true + "summary": "Update SpineAllowance", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/londonallowances": { + "get": { + "description": "List LondonAllowances for an Employer and Payspine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "GetLondonAllowanceListPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want list of London Allowances", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isSignificant": { - "type": "boolean" + { + "description": "The Id of the Pay Spine for which you want list of London Allowances", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/LondonAllowance" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "oldValue": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "newValue": { - "type": "string", - "nullable": true + "404": { + "description": "Employer or Pay Spine Not Found" } }, - "additionalProperties": false + "summary": "List LondonAllowances", + "tags": [ + "PaySpine" + ] }, - "FixedCode": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[readonly]", - "nullable": true + "post": { + "description": "Create LondonAllowance for an Employer and Payspine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "CreateLondonAllowancePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to create London Allowance", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "rate": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "description": "The Id of the Pay spine for which you want to create London Allowance", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Part of the TaxYearConfig that our engine uses to enable calculation of Tax and NI.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "FlexibleDrawdown": { - "enum": [ - "None", - "DeathBenefit", - "Pension", - "SeriousIllHealth", - "StandAloneLumpSum", - "PensionCommencementExcess" ], - "type": "string" - }, - "Fps": { - "type": "object", - "properties": { - "lateReason": { - "$ref": "#/components/schemas/FpsLateReason" - }, - "paymentDate": { - "type": "string", - "format": "date" - }, - "overridePaymentDate": { - "type": "string", - "description": "If a value if provided here then it will be used in place of the actual PaymentDate on the FPS.\r\nThe value must fall in to the same Tax Period as the PaymentDate", - "format": "date", - "nullable": true - }, - "employeeCount": { - "type": "integer", - "format": "int32" - }, - "isCorrection": { - "type": "boolean" - }, - "supersededCount": { - "type": "integer", - "description": "The number of payments on this FPS that have been superseded by later versions", - "format": "int32" - }, - "fullPaymentSubmission": { - "$ref": "#/components/schemas/FullPaymentSubmission" - }, - "versions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FpsPriorVersion" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" + } }, - "description": "If any of the payments on this FPS appear on another FPS then\r\nthen there will be an entry here for each of them.\r\nIf there is an entry where the FpsId matches this FPS then that means the FpsEmployee on this Fps\r\nis itself a prior version (ie, it's been superseded)", - "nullable": true - }, - "validationWarnings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RtiValidationWarning" + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" + } }, - "nullable": true, - "readOnly": true - }, - "iRmark": { - "type": "string", - "nullable": true - }, - "xml": { - "type": "string", - "description": "This property will soon be removed and should not be used.\r\nThere is now a dedicated API endpoint for retrieving the XML for a submission.", - "nullable": true - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "employerReferences": { - "$ref": "#/components/schemas/EmpRefs" - }, - "govTalkSubmission": { - "$ref": "#/components/schemas/GovTalkSubmission" - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" + } + } } }, - "additionalProperties": false - }, - "FpsBenefit": { - "type": "object", - "properties": { - "car": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FpsCar" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.LondonAllowanceResponse" + } + } }, - "nullable": true + "description": "Created" + }, + "400": { + "description": "Bad Request" } }, - "additionalProperties": false - }, - "FpsCar": { - "type": "object", - "properties": { - "make": { - "type": "string", - "nullable": true - }, - "firstRegd": { - "type": "string", - "nullable": true - }, - "cO2": { - "type": "string", - "nullable": true - }, - "zeroEmissionsMileage": { - "type": "string", - "nullable": true - }, - "fuel": { - "type": "string", - "nullable": true + "summary": "Create LondonAllowance", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/londonallowances/{londonAllowanceId}": { + "delete": { + "description": "Delete the specified London Allowance. [This endpoint is in beta for future development work and should not be used]", + "operationId": "DeleteLondonAllowancePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to delete London Allowance", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "id": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want to delete London Allowance", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "amendment": { - "type": "string", - "nullable": true + { + "description": "The Id of the Spinal Point for which you want to delete London Allowance", + "in": "path", + "name": "londonAllowanceId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "price": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" + } + }, + "summary": "Delete LondonAllowance", + "tags": [ + "PaySpine" + ] + }, + "get": { + "description": "Get LondonAllowance for an Employer and Payspine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "GetLondonAllowancePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get London Allowance", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "availFrom": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want to get London Allowance", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "cashEquiv": { - "type": "string", - "nullable": true + { + "description": "The Id of the London Allowance for which you want to get London Allowance", + "in": "path", + "name": "londonAllowanceId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.LondonAllowanceResponse" + } + } + }, + "description": "Success" }, - "availTo": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "freeFuel": { - "$ref": "#/components/schemas/FpsCarFuel" + "404": { + "description": "Employer or Pay Spine Not Found" } }, - "additionalProperties": false + "summary": "Get LondonAllowance", + "tags": [ + "PaySpine" + ] }, - "FpsCarFuel": { - "type": "object", - "properties": { - "provided": { - "type": "string", - "nullable": true + "put": { + "description": "Update LondonAllowance for the Employer and PaySpine. [This endpoint is in beta for future development work and should not be used]", + "operationId": "UpdateLondonAllowancePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update London Allowance", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "cashEquiv": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want to update London Allowance", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "withdrawn": { - "type": "string", - "nullable": true + { + "description": "The Id of the London Allowance for which you want to update London Allowance", + "in": "path", + "name": "londonAllowanceId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.LondonAllowanceRequest" + } + } } }, - "additionalProperties": false - }, - "FpsEmployee": { - "type": "object", - "properties": { - "payrunEntryId": { - "type": "string", - "format": "uuid" - }, - "employeeUniqueId": { - "type": "string", - "format": "uuid" - }, - "item": { - "$ref": "#/components/schemas/Item" - }, - "employeeDetails": { - "$ref": "#/components/schemas/FpsEmployeeDetails" - }, - "employment": { - "$ref": "#/components/schemas/FpsEmployment" - }, - "validationWarnings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RtiValidationWarning" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.LondonAllowanceResponse" + } + } }, - "nullable": true, - "readOnly": true + "description": "Success" } }, - "additionalProperties": false - }, - "FpsEmployeeDetails": { - "type": "object", - "properties": { - "nino": { - "type": "string", - "nullable": true - }, - "name": { - "$ref": "#/components/schemas/RtiEmployeeName" - }, - "address": { - "$ref": "#/components/schemas/RtiEmployeeAddress" - }, - "birthDate": { - "type": "string", - "nullable": true + "summary": "Update LondonAllowance", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/paygrades": { + "get": { + "description": "Lists PaySpine Grade for an Employer and PaySpine Grade.", + "operationId": "GetPaySpineGradeListPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want PaySpine Grade List", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "gender": { - "type": "string", - "nullable": true + { + "description": "The Id of the PaySpine Grade for which you want PaySpine Grade List", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PaySpineGradeResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "passportNumber": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "partnerDetails": { - "$ref": "#/components/schemas/FpsEmployeeDetailsPartnerDetails" + "404": { + "description": "Employer or PaySpine Grade Not Found" } }, - "additionalProperties": false + "summary": "List PaySpine Grade", + "tags": [ + "PaySpine" + ] }, - "FpsEmployeeDetailsPartnerDetails": { - "type": "object", - "properties": { - "nino": { - "type": "string", - "nullable": true + "post": { + "description": "create PaySpine Grade for an Employer and Payspine.", + "operationId": "CreatePaySpineGradePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to create PaySpine Grade", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "name": { - "$ref": "#/components/schemas/RtiEmployeeName" + { + "description": "The Id of the Pay spine for which you want to create PaySpine Grade", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" + } + } } }, - "additionalProperties": false - }, - "FpsEmployeeFigsToDate": { - "type": "object", - "properties": { - "taxablePay": { - "type": "string", - "nullable": true - }, - "totalTax": { - "type": "string", - "nullable": true - }, - "studentLoansTD": { - "type": "string", - "nullable": true - }, - "postgradLoansTD": { - "type": "string", - "nullable": true - }, - "benefitsTaxedViaPayrollYTD": { - "type": "string", - "nullable": true - }, - "empeePenContribnsPaidYTD": { - "type": "string", - "nullable": true - }, - "empeePenContribnsNotPaidYTD": { - "type": "string", - "nullable": true - }, - "smpytd": { - "type": "string", - "nullable": true - }, - "sppytd": { - "type": "string", - "nullable": true - }, - "sapytd": { - "type": "string", - "nullable": true - }, - "shppytd": { - "type": "string", - "nullable": true - }, - "spbpytd": { - "type": "string", - "nullable": true - }, - "sncpytd": { - "type": "string", - "nullable": true - }, - "sspytd": { - "type": "string", - "nullable": true - }, - "gross": { - "type": "string", - "nullable": true - }, - "netPay": { - "type": "string", - "nullable": true - }, - "additions": { - "type": "string", - "nullable": true - }, - "deductions": { - "type": "string", - "nullable": true - }, - "takeHomePay": { - "type": "string", - "nullable": true - }, - "adjustments": { - "type": "string", - "nullable": true - }, - "mapsMiles": { - "type": "string", - "nullable": true - }, - "foreignTaxAmount": { - "type": "string", - "nullable": true - }, - "foreignTaxAmountReclaimed": { - "type": "string", - "nullable": true - }, - "pensionableEarnings": { - "type": "string", - "nullable": true - }, - "pensionablePay": { - "type": "string", - "nullable": true - }, - "employerPensionContribution": { - "type": "string", - "nullable": true - }, - "employeePensionContribution": { - "type": "string", - "nullable": true + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineGradeResponse" + } + } + }, + "description": "Created" }, - "employeePensionContributionAvc": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" + } + }, + "summary": "Create PaySpine Grade", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/paygrades/{payGradeId}": { + "delete": { + "description": "Deletes the specified PaySpine Grade.", + "operationId": "DeletePaySpineGradePaySpine", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "paymentAfterLeaving": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxOnPaymentAfterLeaving": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "payGradeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "nonTaxOrNICPmt": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete PaySpine Grade", + "tags": [ + "PaySpine" + ] }, - "FpsEmployeeFlexibleDrawdown": { - "type": "object", - "properties": { - "flexiblyAccessingPensionRights": { - "type": "string", - "nullable": true - }, - "pensionDeathBenefit": { - "type": "string", - "nullable": true - }, - "seriousIllHealthLumpSum": { - "type": "string", - "nullable": true + "get": { + "description": "PaySpine Grade for an Employer and Payspine.", + "operationId": "GetPaySpineGradePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want PaySpine Grade", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "standAloneLumpSum": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want PaySpine Grade", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "pensionCommencementExcess": { - "type": "string", - "nullable": true + { + "description": "The Id of the PaySpine Grade for which you want PaySpine Grade", + "in": "path", + "name": "payGradeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineGradeResponse" + } + } + }, + "description": "Success" }, - "taxablePayment": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "nontaxablePayment": { - "type": "string", - "nullable": true + "404": { + "description": "Employer or PaySpine Grade Not Found" } }, - "additionalProperties": false + "summary": "Get PaySpine Grade", + "tags": [ + "PaySpine" + ] }, - "FpsEmployeeNIlettersAndValues": { - "type": "object", - "properties": { - "nIletter": { - "type": "string", - "nullable": true - }, - "grossEarningsForNICsInPd": { - "type": "string", - "nullable": true - }, - "grossEarningsForNICsYTD": { - "type": "string", - "nullable": true - }, - "atLELYTD": { - "type": "string", - "nullable": true - }, - "leLtoPTYTD": { - "type": "string", - "nullable": true - }, - "pTtoUELYTD": { - "type": "string", - "nullable": true + "put": { + "description": "Updates a PaySpine Grade for the Employer and PaySpine.", + "operationId": "UpdatePayGradePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update PaySpine Grade", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "totalEmpNICInPd": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want to update PaySpine Grade", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "totalEmpNICYTD": { - "type": "string", - "nullable": true + { + "description": "The Id of the PaySpine Grade for which you want to update PaySpine Grade", + "in": "path", + "name": "payGradeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineGradeRequest" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PaySpineGradeResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Update PaySpine Grade", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/spinalpoints": { + "delete": { + "description": "Delete all SpinalPoints associated with the specified PaySpine.", + "operationId": "DeleteAllSpinalPointsPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to delete Spinal Point List", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "empeeContribnsInPd": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want to delete Spinal Point List", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "empeeContribnsYTD": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete All SpinalPoints Associated with a PaySpine", + "tags": [ + "PaySpine" + ] }, - "FpsEmployeePayment": { - "type": "object", - "properties": { - "bacsHashCode": { - "type": "string", - "nullable": true - }, - "payFreq": { - "type": "string", - "nullable": true - }, - "pmtDate": { - "type": "string", - "nullable": true - }, - "lateReason": { - "type": "string", - "nullable": true - }, - "weekNo": { - "type": "string", - "nullable": true - }, - "monthNo": { - "type": "string", - "nullable": true - }, - "periodsCovered": { - "type": "integer", - "format": "int32" - }, - "aggregatedEarnings": { - "type": "string", - "nullable": true - }, - "pmtAfterLeaving": { - "type": "string", - "nullable": true - }, - "hoursWorked": { - "type": "string", - "nullable": true - }, - "taxCode": { - "$ref": "#/components/schemas/FpsEmployeeTaxCode" - }, - "taxablePay": { - "type": "string", - "nullable": true - }, - "nonTaxOrNICPmt": { - "type": "string", - "nullable": true - }, - "dednsFromNetPay": { - "type": "string", - "nullable": true - }, - "payAfterStatDedns": { - "type": "string", - "nullable": true - }, - "benefitsTaxedViaPayroll": { - "type": "string", - "nullable": true - }, - "class1ANICsYTD": { - "type": "string", - "nullable": true - }, - "benefits": { - "$ref": "#/components/schemas/FpsBenefit" - }, - "empeePenContribnsPaid": { - "type": "string", - "nullable": true - }, - "itemsSubjectToClass1NIC": { - "type": "string", - "nullable": true - }, - "empeePenContribnsNotPaid": { - "type": "string", - "nullable": true - }, - "studentLoanRecovered": { - "$ref": "#/components/schemas/StudentLoanRecovered" - }, - "postgradLoanRecovered": { - "type": "string", - "nullable": true - }, - "taxDeductedOrRefunded": { - "type": "string", - "nullable": true - }, - "onStrike": { - "type": "string", - "nullable": true - }, - "unpaidAbsence": { - "type": "string", - "nullable": true + "get": { + "description": "List SpinalPoints for an Employer and Payspine.", + "operationId": "GetSpinalPointListPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want Spinal Point List", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "smpytd": { - "type": "string", - "nullable": true + { + "description": "The Id of the Spinal Point for which you want Spinal Point List", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpinalPointResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "sppytd": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "sapytd": { - "type": "string", - "nullable": true + "404": { + "description": "Employer or Pay Spine Not Found" + } + }, + "summary": "List SpinalPoints", + "tags": [ + "PaySpine" + ] + }, + "post": { + "description": "Create SpinalPoint for an Employer and Payspine.", + "operationId": "CreateSpinalPointPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to create Spinal Point", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "shPPYTD": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay spine for which you want to create Spinal Point", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpinalPointRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpinalPointRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpinalPointRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpinalPointRequest" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpinalPointResponse" + } + } + }, + "description": "Created" }, - "spbpytd": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" + } + }, + "summary": "Create SpinalPoint", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/spinalpoints/bulk": { + "post": { + "description": "Create multiple SpinalPoints for the specified PaySpine.", + "operationId": "CreateMultiplePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to create multiple Spinal Point", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "sncpytd": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want to create multiple Spinal Point", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpinalPointRequest" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpinalPointRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpinalPointRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpinalPointRequest" + }, + "type": "array" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpinalPointResponse" + }, + "type": "array" + } + } + }, + "description": "Created" + } + }, + "summary": "Create Multiple SpinalPoints", + "tags": [ + "PaySpine" + ] + }, + "put": { + "description": "Update an array of SpinalPoints for the specified PaySpine.", + "operationId": "UpdateMultiplePaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update multiple Spinal Point", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "trivialCommutationPayment": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FpsEmployeeTrivialCommutationPayment" + { + "description": "The Id of the Pay Spine for which you want to update multiple Spinal Point", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpinalPointUpdateRequest" + }, + "type": "array" + } }, - "nullable": true - }, - "flexibleDrawdown": { - "$ref": "#/components/schemas/FpsEmployeeFlexibleDrawdown" + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpinalPointUpdateRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpinalPointUpdateRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpinalPointUpdateRequest" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "FpsEmployeeSeconded": { - "type": "object", - "properties": { - "inOutUK": { - "type": "string", - "nullable": true - }, - "stay183DaysOrMore": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.SpinalPointResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Update Multiple SpinalPoints", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/payspines/{paySpineId}/spinalpoints/{spinalPointId}": { + "delete": { + "description": "Delete the specified SpinalPoint.", + "operationId": "DeleteSpinalPointPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update Spinal Point List", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stayLessThan183Days": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want to update Spinal Point List", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "eeaCitizen": { - "type": "string", - "nullable": true + { + "description": "The Id of the Spinal Point for which you want to update Spinal Point List", + "in": "path", + "name": "spinalPointId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "epM6": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete SpinalPoint", + "tags": [ + "PaySpine" + ] }, - "FpsEmployeeStarter": { - "type": "object", - "properties": { - "startDate": { - "type": "string", - "nullable": true - }, - "startDec": { - "type": "string", - "nullable": true + "get": { + "description": "Get SpinalPoint for an Employer and Payspine.", + "operationId": "GetSpinalPointPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want Spinal Point", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "studentLoan": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want Spinal Point", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "postgradLoan": { - "type": "string", - "nullable": true + { + "description": "The Id of the Spinal Point for which you want Spinal Point", + "in": "path", + "name": "spinalPointId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpinalPointResponse" + } + } + }, + "description": "Success" }, - "occPension": { - "$ref": "#/components/schemas/FpsEmployeeStarterOccPension" + "400": { + "description": "Bad Request" }, - "seconded": { - "$ref": "#/components/schemas/FpsEmployeeSeconded" + "404": { + "description": "Employer or Pay Spine Not Found" } }, - "additionalProperties": false + "summary": "Get SpinalPoint", + "tags": [ + "PaySpine" + ] }, - "FpsEmployeeStarterOccPension": { - "type": "object", - "properties": { - "bereaved": { - "type": "string", - "nullable": true + "put": { + "description": "Update SpinalPoint for the Employer and PaySpine.", + "operationId": "UpdateSpinalPointPaySpine", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update Spinal Point", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "amount": { - "type": "string", - "nullable": true + { + "description": "The Id of the Pay Spine for which you want to update Spinal Point", + "in": "path", + "name": "paySpineId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "The Id of the Spinal Point for which you want to update Spinal Point", + "in": "path", + "name": "spinalPointId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpinalPointRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpinalPointRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpinalPointRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpinalPointRequest" + } + } } }, - "additionalProperties": false - }, - "FpsEmployeeTaxCode": { - "type": "object", - "properties": { - "basisNonCumulative": { - "type": "string", - "nullable": true - }, - "taxRegime": { - "type": "string", - "nullable": true - }, - "taxCode": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.SpinalPointResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "FpsEmployeeTrivialCommutationPayment": { - "type": "object", - "properties": { - "type": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string", - "nullable": true + "summary": "Update SpinalPoint", + "tags": [ + "PaySpine" + ] + } + }, + "/employers/{employerId}/pensionschemes": { + "get": { + "operationId": "IndexPensionScheme", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list PensionSchemes", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "List PensionSchemes", + "tags": [ + "PensionScheme" + ] }, - "FpsEmployerPayIdChanged": { - "type": "object", - "properties": { - "payrollIdChangedIndicator": { - "type": "string", - "nullable": true - }, - "oldPayrollId": { - "type": "string", - "nullable": true + "post": { + "operationId": "CreatePensionScheme", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PensionScheme" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PensionScheme" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PensionScheme" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PensionScheme" + } + } } }, - "additionalProperties": false - }, - "FpsEmployment": { - "type": "object", - "properties": { - "employeeCurrentNiLetter": { - "type": "string", - "nullable": true - }, - "offPayrollWorker": { - "type": "string", - "nullable": true - }, - "occPenInd": { - "type": "string", - "nullable": true - }, - "directorsNIC": { - "type": "string", - "nullable": true - }, - "taxWkOfApptOfDirector": { - "type": "string", - "nullable": true + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PensionScheme" + } + } + }, + "description": "Created" }, - "starter": { - "$ref": "#/components/schemas/FpsEmployeeStarter" + "400": { + "description": "Bad Request" }, - "employeeWorkplacePostcode": { - "type": "string", - "nullable": true + "404": { + "description": "Employer Not Found" + } + }, + "summary": "Create a PensionScheme", + "tags": [ + "PensionScheme" + ] + } + }, + "/employers/{employerId}/pensionschemes/{id}": { + "delete": { + "operationId": "DeletePensionScheme", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payId": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "payIdChgd": { - "$ref": "#/components/schemas/FpsEmployerPayIdChanged" + "400": { + "description": "Bad Request" }, - "paymentToANonIndividual": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Delete a PensionScheme", + "tags": [ + "PensionScheme" + ] + }, + "get": { + "operationId": "GetPensionScheme", + "parameters": [ + { + "description": "The Id of the Employer to which the PensionScheme belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "irrEmp": { - "type": "string", - "nullable": true + { + "description": "The Id of the PensionScheme you want to retrieve.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PensionScheme" + } + } + }, + "description": "Success" + } + }, + "summary": "Get a PensionScheme", + "tags": [ + "PensionScheme" + ] + }, + "put": { + "operationId": "UpdatePensionScheme", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "leavingDate": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PensionScheme" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PensionScheme" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PensionScheme" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PensionScheme" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PensionScheme" + } + } + }, + "description": "Success" }, - "figuresToDate": { - "$ref": "#/components/schemas/FpsEmployeeFigsToDate" + "404": { + "description": "Not Found" + } + }, + "summary": "Update a PensionScheme", + "tags": [ + "PensionScheme" + ] + } + }, + "/employers/{employerId}/pensionschemes/{id}/contributions/{taxYear}": { + "get": { + "description": "Returns a list of Items that tell you which PayRuns contain contributions to this scheme and the Url to the relevant report.\r\nIF the scheme is connected to an ExternalDataProvider then the status of the submission will also be included.", + "operationId": "ListContributionsPensionScheme", + "parameters": [ + { + "description": "The Id of the Employer to which the PensionScheme belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payment": { - "$ref": "#/components/schemas/FpsEmployeePayment" + { + "description": "The Id of the PensionScheme.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "nIlettersAndValues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FpsEmployeeNIlettersAndValues" + { + "description": "The TaxYear to query", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "FpsFields": { - "type": "object", - "properties": { - "offPayrollWorker": { - "type": "boolean" + "summary": "List Contributions", + "tags": [ + "PensionScheme" + ] + } + }, + "/employers/{employerId}/pensionschemes/{id}/contributions/{taxYear}/{payPeriod}/{periodNumber}": { + "get": { + "description": "Returns contributions for a specific scheme and payrun", + "operationId": "ContributionsForPayrunPensionScheme", + "parameters": [ + { + "description": "The Id of the Employer to which the PensionScheme belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "irregularPaymentPattern": { - "type": "boolean", - "description": "True if employee is currently on an irregular payment patter" + { + "description": "The Id of the PensionScheme.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "nonIndividual": { - "type": "boolean", - "description": "True if Employee's payments are being made to a body (eg, trustee, corporate organisation or personal representative)" + { + "description": "The TaxYear to query", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "hoursNormallyWorked": { - "$ref": "#/components/schemas/HoursNormallyWorked" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "excludeFromRtiSubmissions": { - "type": "boolean", - "description": "True if Employee is excluded from RTI submissions" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false - }, - "FpsLateReason": { - "enum": [ - "NoneGiven", - "NotionalExpat", - "NotionalErs", - "NotionalOther", - "Class1", - "MicroEmployer", - "NoRequirement", - "ReasonableExcuse", - "Correction" ], - "type": "string" - }, - "FpsPriorVersion": { - "type": "object", - "properties": { - "payRunEntryId": { - "type": "string", - "format": "uuid" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PensionContributionsSubmission" + } + } + }, + "description": "Success" }, - "fpsId": { - "type": "string", - "description": "The Id of the FPS that contains an earlier version of the PayRunEntry", - "format": "uuid" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "FpsReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + "summary": "Contributions for Payrun", + "tags": [ + "PensionScheme" + ] + } + }, + "/employers/{employerId}/pensionschemes/{id}/contributions/{taxYear}/{submissionId}": { + "get": { + "description": "Returns an ExternalProviderConversation showing data sent to and received from the ExternalDataProvider for the pension contribution submission.", + "operationId": "ContributionsPensionScheme", + "parameters": [ + { + "description": "The Id of the Employer to which the PensionScheme belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "$ref": "#/components/schemas/Fps" + { + "description": "The Id of the PensionScheme.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "FromToDates": { - "type": "object", - "properties": { - "from": { - "type": "string", - "format": "date" + { + "description": "The TaxYear of the submission", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "to": { - "type": "string", - "format": "date" + { + "description": "The Id of the Submission.", + "in": "path", + "name": "submissionId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "FullPaymentSubmission": { - "type": "object", - "properties": { - "employee": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FpsEmployee" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalProviderConversation" + } + } }, - "nullable": true - }, - "relatedTaxYear": { - "type": "string", - "nullable": true + "description": "Success" } }, - "additionalProperties": false + "summary": "Contributions Data", + "tags": [ + "PensionScheme" + ] }, - "FullSummaryOfPayReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FullSummaryOfPayReportLine" - }, - "nullable": true - }, - "deductionLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FullSummaryOfPayReportLine" - }, - "nullable": true - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "periodTo": { - "type": "integer", - "format": "int32" - }, - "startPeriodName": { - "type": "string", - "nullable": true - }, - "endPeriodName": { - "type": "string", - "nullable": true - }, - "startDate": { - "type": "string", - "format": "date" - }, - "endDate": { - "type": "string", - "format": "date" - }, - "report": { - "$ref": "#/components/schemas/Report" + "post": { + "description": "Re-submits previously failed Contributions to a Pension Scheme.", + "operationId": "ResubmitContributionsPensionScheme", + "parameters": [ + { + "description": "The Id of the Employer to which the PensionScheme belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "description": "The Id of the PensionScheme.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "title": { - "type": "string", - "nullable": true + { + "description": "The TaxYear of the submission", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "isDraft": { - "type": "boolean" + { + "description": "The Id of the Submission to re-submit.", + "in": "path", + "name": "submissionId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "FullSummaryOfPayReportLine": { - "type": "object", - "properties": { - "payCode": { - "$ref": "#/components/schemas/PayCode" - }, - "value": { - "type": "number", - "format": "double" - }, - "erValue": { - "type": "number", - "format": "double", - "nullable": true - }, - "qty": { - "type": "number", - "format": "double", - "nullable": true - }, - "headCount": { - "type": "integer", - "format": "int32" + ], + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false - }, - "FullSummaryOfPayReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "summary": "Re-submit Contributions", + "tags": [ + "PensionScheme" + ] + } + }, + "/employers/{employerId}/pensionschemes/{id}/contributions/{taxYear}/{submissionId}/markassent": { + "post": { + "description": "Marks the Pension Contributions as sent", + "operationId": "MarkAsSentPensionScheme", + "parameters": [ + { + "description": "The Id of the Employer to which the PensionScheme belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + { + "description": "The Id of the PensionScheme.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "$ref": "#/components/schemas/FullSummaryOfPayReport" + { + "description": "The TaxYear of the submission", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "description": "The Id of the Submission.", + "in": "path", + "name": "submissionId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "FurloughCalculationBasis": { - "enum": [ - "ActualPaidAmount", - "DailyReferenceAmount", - "MonthlyReferenceAmount" ], - "type": "string" - }, - "FurloughReport": { - "type": "object", - "properties": { - "maxClaimPerEmployee": { - "type": "number", - "format": "double" - }, - "percentageOfNIAndPensionToClaim": { - "type": "number", - "format": "double" - }, - "govtContribRate": { - "type": "number", - "format": "double" - }, - "companyName": { - "type": "string", - "nullable": true - }, - "employerReference": { - "type": "string", - "nullable": true - }, - "companyCrn": { - "type": "string", - "nullable": true - }, - "ctUtr": { - "type": "string", - "nullable": true - }, - "saUtr": { - "type": "string", - "nullable": true - }, - "claimPeriodStartDate": { - "type": "string", - "format": "date", - "readOnly": true - }, - "claimPeriodEndDate": { - "type": "string", - "format": "date", - "readOnly": true - }, - "numberOfEmployeesBeingFurloughed": { - "type": "integer", - "format": "int32" - }, - "totalClaimAmount": { - "type": "number", - "format": "double", - "readOnly": true - }, - "totalGrossPay": { - "type": "number", - "format": "double" - }, - "amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod": { - "type": "number", - "format": "double" - }, - "amountClaimedForEmployerNICsContributionsForFurloughedEmployees": { - "type": "number", - "format": "double" - }, - "amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees": { - "type": "number", - "format": "double" - }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FurloughReportLine" - }, - "nullable": true - }, - "bankAccountNumber": { - "type": "string", - "nullable": true - }, - "bankSortCode": { - "type": "string", - "nullable": true - }, - "bankAccountHoldersFirstName": { - "type": "string", - "nullable": true - }, - "bankAccountHoldersLastName": { - "type": "string", - "nullable": true - }, - "bankAccountHoldersAddress": { - "type": "string", - "nullable": true - }, - "buildingSocietyRollNumber": { - "type": "string", - "nullable": true - }, - "companyAddress": { - "type": "string", - "nullable": true - }, - "contactName": { - "type": "string", - "nullable": true - }, - "contactNumber": { - "type": "string", - "nullable": true - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "periodTo": { - "type": "integer", - "format": "int32" - }, - "startPeriodName": { - "type": "string", - "nullable": true - }, - "endPeriodName": { - "type": "string", - "nullable": true - }, - "startDate": { - "type": "string", - "format": "date" - }, - "endDate": { - "type": "string", - "format": "date" - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true - }, - "isDraft": { - "type": "boolean" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalProviderConversation" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "FurloughReportLine": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" - }, - "employeesFullName": { - "type": "string", - "nullable": true - }, - "employeesNINO": { - "type": "string", - "nullable": true - }, - "employeesPayrollReferenceNumber": { - "type": "string", - "nullable": true - }, - "furloughedDays": { - "type": "integer", - "format": "int32" - }, - "daysInPeriod": { - "type": "integer", - "format": "int32" + "summary": "Mark as Sent", + "tags": [ + "PensionScheme" + ] + } + }, + "/employers/{employerId}/pensionschemes/{id}/employees": { + "get": { + "description": "Returns the employees that are enrolled in the specified scheme", + "operationId": "EmployeesPensionScheme", + "parameters": [ + { + "description": "The Id of the Employer to which the PensionScheme belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "hoursNormallyWorked": { - "type": "number", - "format": "double", - "nullable": true + { + "description": "The Id of the PensionScheme you want to retrieve Employees for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Employees", + "tags": [ + "PensionScheme" + ] + } + }, + "/employers/{employerId}/reports-async/CombinedPensionContributions": { + "post": { + "description": "Returns a job created to process a Combined Pension Contributions report. \r\nThis endpoint is being beta tested and subject to un-announced breaking changes.\r\nUse the GET of Jobs to get the status and response of the job.", + "operationId": "ExecuteCombinedPensionContributionsReportReportsAsync", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.CombinedPensionContributionsReportRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.CombinedPensionContributionsReportRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.CombinedPensionContributionsReportRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.CombinedPensionContributionsReportRequest" + } + } + } + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JobResponse" + } + } + }, + "description": "Accepted" }, - "hoursFurloughed": { - "type": "number", - "format": "double", - "nullable": true + "400": { + "description": "Bad Request" }, - "percentageOfFurloughedDaysWorked": { - "type": "number", - "format": "double" + "401": { + "description": "Unauthorized" }, - "grossPay": { - "type": "number", - "format": "double" + "403": { + "description": "Forbidden" }, - "grossPayClaim": { - "type": "number", - "format": "double" + "409": { + "description": "Conflict" + } + }, + "summary": "Execute Combined Pension Contributions Report", + "tags": [ + "ReportsAsync" + ] + } + }, + "/employers/{employerId}/reports-async/{templateId}": { + "post": { + "description": "Returns a job created to process a report using custom report templates. \r\nThis endpoint is being beta tested and subject to un-announced breaking changes.\r\nUse the GET of Jobs to get the status and response of the job.", + "operationId": "ExecuteCustomReportReportsAsync", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "niClaim": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "templateId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.CustomReportRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.CustomReportRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.CustomReportRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.CustomReportRequest" + } + } + } + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JobResponse" + } + } + }, + "description": "Accepted" }, - "pensionClaim": { - "type": "number", - "format": "double" + "400": { + "description": "Bad Request" }, - "totalClaim": { - "type": "number", - "format": "double", - "readOnly": true + "401": { + "description": "Unauthorized" }, - "furloughStart": { - "type": "string", - "format": "date", - "nullable": true + "403": { + "description": "Forbidden" }, - "furloughEnd": { - "type": "string", - "format": "date", - "nullable": true + "409": { + "description": "Conflict" + } + }, + "summary": "Execute report template", + "tags": [ + "ReportsAsync" + ] + } + }, + "/employers/{employerId}/reports/AeAssessments": { + "get": { + "description": "Returns a list of Items representing your current Employees along with their most recent Auto Enrolment Assessment in the metadata field.", + "operationId": "AeAssessmentsReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "department": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ItemListReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ItemListReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "FurloughReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "summary": "AutoEnrolment Assessments", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/NiLetterValidationReport": { + "get": { + "description": "Checks the NI Letters allocated to your employees. If no pay date is provided, the checks are based on today's date.", + "operationId": "NiLetterValidationReportEmployeesReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "model": { - "$ref": "#/components/schemas/FurloughReport" + { + "in": "query", + "name": "payDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "in": "query", + "name": "payPeriod", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "Gender": { - "enum": [ - "Male", - "Female" ], - "type": "string" - }, - "GenderPayGapLine": { - "type": "object", - "properties": { - "payrollCode": { - "type": "string", - "nullable": true - }, - "forename": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NiLetterValidationReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/NiLetterValidationReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/NiLetterValidationReportReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "NI Letter Validation (Employees)", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/advancedvariance": { + "get": { + "description": "Returns a report comparing one period to another period.", + "operationId": "AdvancedVarianceReportReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "surname": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "payPeriod", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "gender": { - "$ref": "#/components/schemas/Gender" + { + "in": "query", + "name": "ordinal", + "schema": { + "format": "int32", + "type": "integer" + } }, - "fullPay": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "ordinaryPay": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "period", + "schema": { + "format": "int32", + "type": "integer" + } }, - "periodBonus": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "taxYearCompare", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "bonusRbp": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "periodCompare", + "schema": { + "format": "int32", + "type": "integer" + } }, - "weeklyHours": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "payCodes", + "schema": { + "type": "string" + } }, - "hourlyRate": { - "type": "number", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false - }, - "GenderPayGapReport": { - "type": "object", - "properties": { - "genderPayGapLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GenderPayGapLine" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdvancedVarianceReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/AdvancedVarianceReportReportResponse" + } + } }, - "nullable": true + "description": "Success" + } + }, + "summary": "Advanced Variance Report", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/changes": { + "get": { + "operationId": "ChangesReports", + "parameters": [ + { + "description": "The Id of any employer to which you have access.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "report": { - "$ref": "#/components/schemas/Report" + { + "in": "query", + "name": "fromDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "in": "query", + "name": "toDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "title": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeSummaryListReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ChangeSummaryListReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Gets audit changes of all employees within a company.", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/cissummary": { + "get": { + "description": "Returns a list of all CIS Subcontractors along with verification details", + "operationId": "CisSubContractorSummaryReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isDraft": { - "type": "boolean" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CisSubContractorSummaryListReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/CisSubContractorSummaryListReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/CisSubContractorSummaryListReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/CisSubContractorSummaryListReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "GenderPayGapReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + "summary": "CIS Subcontractor Summary", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/cyclicreenrolment": { + "get": { + "description": "Returns a report for Cyclic Re-enrolments for a given re-enrolment date.", + "operationId": "CyclicReenrolmentReports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "$ref": "#/components/schemas/GenderPayGapReport" + { + "description": "The re-enrolment date in the format YYYY-MM-DD.", + "in": "query", + "name": "reenrolmentDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "GenderPayGapSnapShotDate": { - "enum": [ - "March", - "April" ], - "type": "string" - }, - "GovTalk": { - "type": "object", - "properties": { - "fullPaymentSubmissionNamespace": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "fullPaymentSubmissionNamespaceVersion": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "employerPaymentSummaryNamespace": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "employerPaymentSummaryNamespaceVersion": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "niNoVerificationRequestNameSpace": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "cisVerificationRequestNameSpace": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "cis300NameSpace": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "expensesAndBenefitsNameSpace": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "expensesAndBenefitsNameSpaceVersion": { - "type": "string", - "description": "[readonly]", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CyclicReenrolmentReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/CyclicReenrolmentReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/CyclicReenrolmentReportReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "Part of the TaxYearConfig that our engine uses submit documents to the HMRC Gateway.\r\nIt is used internally when our engine communicates with HMRC.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "GovTalkError": { - "type": "object", - "properties": { - "raisedBy": { - "type": "string", - "nullable": true - }, - "number": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true + "summary": "Export Cyclic Re-enrolments", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/downloadmaternityschedules": { + "get": { + "description": "Returns a Maternity Pay schedule for employee", + "operationId": "DownloadMaternitySchedulesReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "text": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "employeeId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "location": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "id", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Leave" + } + } } }, - "additionalProperties": false - }, - "GovTalkSubmission": { - "type": "object", - "properties": { - "rawResponse": { - "type": "string", - "nullable": true - }, - "messageClass": { - "type": "string", - "nullable": true - }, - "pollInterval": { - "type": "integer", - "format": "int32" - }, - "lastPoll": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "correlationId": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "url": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/SubmissionStatus" - }, - "message": { - "type": "string", - "nullable": true - }, - "iRmark": { - "type": "string", - "nullable": true - }, - "errorsJson": { - "type": "string", - "nullable": true - }, - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GovTalkError" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } }, - "nullable": true - }, - "submittedAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "description": "Success" } }, - "additionalProperties": false - }, - "GrossToNetReport": { - "type": "object", - "properties": { - "forCis": { - "type": "boolean" + "summary": "Download Maternity Payment Schedule", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/employeeleave": { + "get": { + "description": "Returns the Employee Leave report for the selected tax year. If the tax year is not selected, returns the Employee Leave report for all the leave entries.", + "operationId": "EmployeeLeaveReports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GrossToNetReportLine" - }, - "nullable": true + { + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "cisLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GrossToNetReportCisLine" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployeeLeaveReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/EmployeeLeaveReportReportResponse" + } + } }, - "nullable": true - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "periodTo": { - "type": "integer", - "format": "int32" - }, - "startPeriodName": { - "type": "string", - "nullable": true - }, - "endPeriodName": { - "type": "string", - "nullable": true - }, - "startDate": { - "type": "string", - "format": "date" - }, - "endDate": { - "type": "string", - "format": "date" - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true - }, - "isDraft": { - "type": "boolean" + "description": "Success" } }, - "additionalProperties": false - }, - "GrossToNetReportCisLine": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" - }, - "payrollCode": { - "type": "string", - "nullable": true - }, - "department": { - "type": "string", - "nullable": true - }, - "totalGross": { - "type": "number", - "format": "double" - }, - "labour": { - "type": "number", - "format": "double" - }, - "materials": { - "type": "number", - "format": "double" - }, - "taxableGross": { - "type": "number", - "format": "double" - }, - "cisDeduction": { - "type": "number", - "format": "double" - }, - "umbrellaFee": { - "type": "number", - "format": "double" + "summary": "Employee Leave", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/employerchanges": { + "get": { + "operationId": "EmployerChangesReports", + "parameters": [ + { + "description": "The Id of any employer to which you have access.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "vat": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "fromDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "payment": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "toDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "lastName": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeSummaryListReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ChangeSummaryListReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "GrossToNetReportLine": { - "type": "object", - "properties": { - "niNumber": { - "type": "string", - "nullable": true - }, - "totalGross": { - "type": "number", - "format": "double" - }, - "taxableGross": { - "type": "number", - "format": "double" - }, - "netPay": { - "type": "number", - "format": "double" - }, - "tax": { - "type": "number", - "format": "double" - }, - "employeeNi": { - "type": "number", - "format": "double" - }, - "employerNi": { - "type": "number", - "format": "double" - }, - "employeePension": { - "type": "number", - "format": "double" - }, - "employerPension": { - "type": "number", - "format": "double" - }, - "studentOrPgLoan": { - "type": "number", - "format": "double" - }, - "statutoryPayments": { - "type": "number", - "format": "double" - }, - "attachments": { - "type": "number", - "format": "double" - }, - "otherDeductions": { - "type": "number", - "format": "double" - }, - "lastName": { - "type": "string", - "nullable": true - }, - "isNewStarter": { - "type": "boolean" - }, - "isLeaver": { - "type": "boolean" - }, - "employee": { - "$ref": "#/components/schemas/Item" - }, - "payrollCode": { - "type": "string", - "nullable": true + "summary": "Gets audit changes for a company.", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/employers": { + "get": { + "description": "Returns a CSV file containing details for all Employers.", + "operationId": "EmployerExportReports", + "parameters": [ + { + "description": "The Id of any employer to which you have access. It wont affect the report results.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "department": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "GrossToNetReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "summary": "Employer Export", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/holiday": { + "get": { + "description": "Returns a report summarising holiday usage for all employees.", + "operationId": "HolidayReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "model": { - "$ref": "#/components/schemas/GrossToNetReport" + { + "description": "If set to true then you'll receive a report for holiday pay accruals instead of holiday allowances. Defaults to false.", + "in": "query", + "name": "accruals", + "schema": { + "default": false, + "type": "boolean" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "description": "If set to true then you'll receive a report for holiday pay accruals hours. Defaults to false.", + "in": "query", + "name": "accrualsHrs", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidayReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/HolidayReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/HolidayReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/HolidayReportReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "HmrcDetails": { - "type": "object", - "properties": { - "officeNumber": { - "maxLength": 3, - "type": "string", - "nullable": true - }, - "payeReference": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "accountsOfficeReference": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "econ": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "utr": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "coTax": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "employmentAllowance": { - "type": "boolean" - }, - "employmentAllowanceMaxClaim": { - "type": "number", - "description": "You might reduce this from the default if you've made/are making a claim in another system", - "format": "double" - }, - "smallEmployersRelief": { - "type": "boolean" - }, - "apprenticeshipLevy": { - "type": "boolean" - }, - "apprenticeshipLevyAllowance": { - "type": "number", - "format": "double" - }, - "quarterlyPaymentSchedule": { - "type": "boolean", - "description": "Set to true if the employer pays HMRC on a quarterly schedule.\r\nA value of false implies a monthly schedule.\r\nWarning: Changing this value after starting PayRuns will\r\ndelete any existing payments or adjustments you may have entered." - }, - "includeEmploymentAllowanceOnMonthlyJournal": { - "type": "boolean", - "description": "If the employer is not on a QuarterlyPaymentSchedule\r\nand is claiming EmploymentAllowance, then set this to true to include a line for\r\nEmployment Allowance on the journal for the monthly schedule." - }, - "carryForwardUnpaidLiabilities": { - "type": "boolean", - "description": "If set to true then any unpaid amounts from previous periods will be brought forward\r\nto work out the liability for the current period.\r\nYou'd set this to false if you don't want to track payments." - }, - "paymentDateRule": { - "$ref": "#/components/schemas/PaymentDateRule" + "summary": "Holiday", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/p11d/email": { + "post": { + "description": "Email P11D to all Employee", + "operationId": "EmailP11DMultipleReports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "paymentDateDayOfMonth": { - "type": "integer", - "format": "int32", - "nullable": true + { + "description": "The TaxYear you want P11Ds for.", + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "description": "Exclude Employees with Already Sent P11D Emails.", + "in": "query", + "name": "excludeEmployeesWithP11DEmailSent", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false - }, - "HmrcLiability": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "[readonly] A descriptive name for the Period", - "nullable": true - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "periodEnding": { - "type": "string", - "description": "[readonly]", - "format": "date" + "summary": "Email P11D to all Employees", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/p11d/email/{employeeId}": { + "post": { + "description": "Email a P11D to an Employee", + "operationId": "EmailP11DReports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "periodComplete": { - "type": "boolean", - "description": "[readonly] Indicates whether or not all PayRuns for this period have been completed" + { + "description": "The Id of the Employee you want the email a P11D to.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "recoverableAmountsEpsCreated": { - "type": "boolean", - "description": "[readonly] If there are recoverable amount present (ie, SMP) and the Period is complete then this field Indicates \r\nwhether or not an EPS has been created up to the final tax month of this period to declare\r\nthe recoverable amounts" + { + "description": "The TaxYear you want P11Ds for.", + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Email P11D to an Employee", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/p45": { + "get": { + "description": "Get a P45 for an Employee you've marked as a leaver", + "operationId": "P45Reports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "apprenticeshipLevyEpsCreated": { - "type": "boolean", - "description": "[readonly] If there is an Apprenticeship LEvy amount present and the Period is complete then this field Indicates \r\nwhether or not an EPS has been created up to the final tax month of this period to declare\r\nthe amount" + { + "description": "The Id of the Employee you want a P45 for.", + "in": "query", + "name": "employeeId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "payRuns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayRun" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } }, - "nullable": true - }, - "tax": { - "type": "number", - "description": "[readonly] Amount due to HMRC for PAYE in period", - "format": "double" - }, - "cisDeductions": { - "type": "number", - "description": "[readonly] Amount due to HMRC for CIS Deductions made in period", - "format": "double" - }, - "postgradLoanDeductions": { - "type": "number", - "description": "[readonly] Amount due to HMRC for Postgrad Loan Deductions made in period", - "format": "double" - }, - "studentLoanDeductions": { - "type": "number", - "description": "[readonly] Amount due to HMRC for Student Loan Deductions made in period", - "format": "double" - }, - "employeeNic": { - "type": "number", - "description": "[readonly] Amount due to HMRC for Employee NIC Contributions withheld in period", - "format": "double" - }, - "employerNic": { - "type": "number", - "description": "[readonly] Amount due to HMRC for Employer NIC Contributions due on payments in period", - "format": "double" - }, - "realTimeClass1ANic": { - "type": "number", - "description": "[readonly] Amount due to HMRC for Employer NIC Contributions due on payments in period", - "format": "double" - }, - "smp": { - "type": "number", - "description": "[readonly] SMP recovered from payments in period", - "format": "double" - }, - "smpNic": { - "type": "number", - "description": "[readonly] SMP NIC Compensation for period", - "format": "double" - }, - "spp": { - "type": "number", - "description": "[readonly] SPP recovered from payments in period", - "format": "double" - }, - "sppNic": { - "type": "number", - "description": "[readonly] SPP Nic Compensation for period", - "format": "double" - }, - "sap": { - "type": "number", - "description": "[readonly] SAP recovered from payments in period", - "format": "double" - }, - "sapNic": { - "type": "number", - "description": "[readonly] SAP Nic Compensation for period", - "format": "double" - }, - "shpp": { - "type": "number", - "description": "[readonly] ShPP recovered from payments in period", - "format": "double" - }, - "shppNic": { - "type": "number", - "description": "[readonly] ShPP Nic Compensation for period", - "format": "double" - }, - "spbp": { - "type": "number", - "description": "[readonly] SPBP recovered from payments in period", - "format": "double" - }, - "spbpNic": { - "type": "number", - "description": "[readonly] SPBP Nic Compensation for period", - "format": "double" - }, - "sncp": { - "type": "number", - "description": "[readonly] SNCP recovered from payments in period", - "format": "double" - }, - "sncpNic": { - "type": "number", - "description": "[readonly] SNCP Nic Compensation for period", - "format": "double" - }, - "eligibleForEmploymentAllowance": { - "type": "boolean", - "description": "[readonly] Indicates whether the Employer settings say the Employer is eligible for Employment Allowance" - }, - "employmentAllowanceClaim": { - "type": "number", - "description": "Amount to claim with respect to the Employment Allowance", - "format": "double" - }, - "employmentAllowanceClaimAuto": { - "type": "boolean", - "description": "If set to true, we'll automatically claim the maximum allowed.\r\nIf set to false then you can enter your own value.\r\nIf EligibleForEmploymentAllowance is false then the EmploymentAllowanceClaim will \r\nalways be overwritten with a zero value regardless of this property" - }, - "liableForApprenticeshipLevy": { - "type": "boolean", - "description": "[readonly] Indicates whether the Employer settings say the Employer is liable for the Apprenticeship Levy" - }, - "apprenticeshipLevy": { - "type": "number", - "description": "Amount due with respect to the Apprenticeship Levy", - "format": "double" - }, - "apprenticeshipLevyAuto": { - "type": "boolean", - "description": "If set to true, we'll automatically calculate your liability\r\nIf set to false then you can enter your own value.\r\nIf LiableForApprenticeshipLevy is false then the ApprenticeshipLevy will \r\nalways be overwritten with a zero value regardless of this property" - }, - "liabilityArisingInPeriod": { - "type": "number", - "description": "[readonly] Total Liability (before any deductions) arising in this Period", - "format": "double", - "readOnly": true - }, - "dueInPreviousPeriods": { - "type": "number", - "description": "[readonly] Amount due to HMRC in previous periods for this Tax Year", - "format": "double" - }, - "paidInPreviousPeriods": { - "type": "number", - "description": "[readonly] Amount paid to HMRC in previous periods for this Tax Year", - "format": "double" - }, - "employmentAllowanceClaimInPreviousPeriods": { - "type": "number", - "description": "[readonly] The amount of Employment Allowance claimed in previous periods for this Tax Year", - "format": "double" - }, - "receivedFromHMRCToRefundTax": { - "type": "number", - "description": "Any amount received from HMRC to refund Tax in Period", - "format": "double" - }, - "receivedFromHMRCToPayStatutoryPay": { - "type": "number", - "description": "Any amount received from HMRC to pay Statutory Pay Period", - "format": "double" - }, - "cisDeductionsSuffered": { - "type": "number", - "description": "CIS Deductions Suffered in Period", - "format": "double" - }, - "adjustment": { - "type": "number", - "description": "Any manual adjustment for Period", - "format": "double" - }, - "netLiabilityForPeriod": { - "type": "number", - "description": "[readonly] Net Liability (including any deductions/additions) arising in this Period", - "format": "double", - "readOnly": true + "description": "Success" + } + }, + "summary": "P45 For Employee", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/p45-availability": { + "get": { + "description": "Checks if there are leavers in each pay run of the employer's current tax year for downloading P45.", + "operationId": "GetP45AvailabilityReports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.P45AvailabilityResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "totalPaid": { - "type": "number", - "description": "[readonly] The total value of all payments in this period", - "format": "double" + "400": { + "description": "Bad Request" }, - "payments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HmrcPayment" - }, - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Get P45 Download Availability", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/p45/email": { + "post": { + "description": "Email a P45 to an Employee you've marked as a leaver", + "operationId": "EmailP45Reports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "fpsList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - }, - "nullable": true + { + "description": "The Id of the Employee you want the email a P45 to.", + "in": "query", + "name": "employeeId", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Email P45 to Employee", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/p60/email": { + "post": { + "description": "Email P60 to all Employee", + "operationId": "EmailP60MultipleReports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "allowLinkedEps": { - "type": "boolean", - "description": "If true this will allow you to submit a combined Employer Payment Summary" + { + "description": "The TaxYear you want P60s for.", + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "description": "Exclude Employees with Already Sent P60 Emails.", + "in": "query", + "name": "excludeEmployeesWithP60EmailSent", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false - }, - "HmrcPayment": { - "type": "object", - "properties": { - "amount": { - "type": "number", - "format": "double" + "summary": "Email P60 to all Employees", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/p60/email/{employeeId}": { + "post": { + "description": "Email a P60 to an Employee", + "operationId": "EmailP60Reports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "date": { - "type": "string", - "format": "date" + { + "description": "The Id of the Employee you want the email a P60 to.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "description": "The TaxYear you want P60s for.", + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } } - }, - "additionalProperties": false - }, - "HolidayAccrual": { - "enum": [ - "RegularPayOnly", - "AllGrossPay", - "PaycodeSet", - "WorkingPatternHours" ], - "type": "string" - }, - "HolidayAccrualDefaultRateType": { - "enum": [ - "HourlyRate", - "AverageHolidayRate", - "FixedPeriodAmount" + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Email P60 to an Employee", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/packs": { + "get": { + "description": "Lists all ReportPacks for an Employer.", + "operationId": "IndexReportPack", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list ReportPacks", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "HolidayReport": { - "type": "object", - "properties": { - "accrualsReport": { - "type": "boolean" - }, - "accrualsHrsReport": { - "type": "boolean" - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HolidayReportLine" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true - }, - "isDraft": { - "type": "boolean" + "description": "Success" } }, - "additionalProperties": false + "summary": "List ReportPacks", + "tags": [ + "ReportPack" + ] }, - "HolidayReportLine": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" - }, - "payrollCode": { - "type": "string", - "nullable": true - }, - "department": { - "type": "string", - "nullable": true - }, - "dayRate": { - "type": "number", - "format": "double", - "nullable": true - }, - "leaveSettings": { - "$ref": "#/components/schemas/LeaveSettings" + "post": { + "description": "Creates a new ReportPack for the Employer.", + "operationId": "CreateReportPack", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "HolidayReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/HolidayReport" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ReportPack" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportPack" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/ReportPack" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ReportPack" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "HolidaySchemeDurationType": { - "enum": [ - "Hours", - "Days" - ], - "type": "string" - }, - "HolidayType": { - "enum": [ - "Days", - "Accrual_Money", - "Accrual_Days", - "Accrual_Hours" - ], - "type": "string" - }, - "HourlyPayReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HourlyPayReportLine" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportPack" + } + } }, - "nullable": true - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "periodTo": { - "type": "integer", - "format": "int32" - }, - "startPeriodName": { - "type": "string", - "nullable": true - }, - "endPeriodName": { - "type": "string", - "nullable": true - }, - "startDate": { - "type": "string", - "format": "date" - }, - "endDate": { - "type": "string", - "format": "date" - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + "description": "Created" }, - "title": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "isDraft": { - "type": "boolean" + "404": { + "description": "Employer Not Found" } }, - "additionalProperties": false - }, - "HourlyPayReportLine": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" - }, - "payrollCode": { - "type": "string", - "nullable": true - }, - "payCode": { - "type": "string", - "nullable": true - }, - "period": { - "type": "integer", - "format": "int32" - }, - "hours": { - "type": "number", - "format": "double" + "summary": "Create ReportPack", + "tags": [ + "ReportPack" + ] + } + }, + "/employers/{employerId}/reports/packs/{id}": { + "delete": { + "description": "Deletes the specified ReportPack.", + "operationId": "DeleteReportPack", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "rate": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "total": { - "type": "number", - "format": "double" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete ReportPack", + "tags": [ + "ReportPack" + ] }, - "HourlyPayReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/HourlyPayReport" + "get": { + "description": "Gets the ReportPack specified.", + "operationId": "GetReportPack", + "parameters": [ + { + "description": "The Id of the Employer to which the ReportPack belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "HoursNormallyWorked": { - "enum": [ - "LessThan16", - "MoreThan16", - "MoreThan24", - "MoreThan30", - "NotRegular" ], - "type": "string" - }, - "HtmlEmailSettings": { - "type": "object", - "properties": { - "bodyCssStyle": { - "type": "string", - "nullable": true - }, - "fontCssStyle": { - "type": "string", - "nullable": true - }, - "buttonCssStyle": { - "type": "string", - "nullable": true - }, - "headerHtml": { - "type": "string", - "nullable": true - }, - "footerHtml": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportPack" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "HtmlInsertionPoint": { - "enum": [ - "CreateEmployer", - "EmployeeDetails" - ], - "type": "string" - }, - "IncrementRule": { - "enum": [ - "Manual", - "Annual", - "April", - "April6m" - ], - "type": "string" + "summary": "Get ReportPack", + "tags": [ + "ReportPack" + ] }, - "Invitation": { - "required": [ - "emailAddress" - ], - "type": "object", - "properties": { - "employer": { - "$ref": "#/components/schemas/Item" - }, - "emailAddress": { - "maxLength": 150, - "minLength": 1, - "type": "string", - "description": "The email address of the user that is being invited to access the Employer", - "format": "email" - }, - "message": { - "type": "string", - "description": "An optional message to include in the email sent to the EmailAddress", - "nullable": true - }, - "role": { - "$ref": "#/components/schemas/UserRole" - }, - "emailId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "emailStatus": { - "$ref": "#/components/schemas/BackgroundTaskStatus" + "put": { + "description": "Updates a ReportPack for the Employer.", + "operationId": "UpdateReportPack", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "invitedBy": { - "$ref": "#/components/schemas/Item" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ReportPack" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportPack" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/ReportPack" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ReportPack" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportPack" + } + } + }, + "description": "Success" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "404": { + "description": "Employer Not Found" } }, - "additionalProperties": false, - "description": "Invitations are used to invite other users to access an existing Employer" - }, - "Item": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" + "summary": "Update ReportPack", + "tags": [ + "ReportPack" + ] + } + }, + "/employers/{employerId}/reports/payGrades": { + "get": { + "description": "Returns a report for Pay Grade.", + "operationId": "PayGradesReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "name": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "effectiveDateFrom", + "schema": { + "type": "string" + } }, - "metadata": { - "nullable": true + { + "in": "query", + "name": "effectiveDateTo", + "schema": { + "type": "string" + } }, - "url": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "paySpineId", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayGradesReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/PayGradesReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/PayGradesReportReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "ItemListReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + "summary": "Pay Grade", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/paycodes": { + "get": { + "description": "Returns details for all Pay Codes.", + "operationId": "PayCodeExportReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } }, - "description": "[readonly] If the type is application.json then this will contain a JSON representation of the relevant model", - "nullable": true - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "JobStatus": { - "enum": [ - "Queued", - "Executing", - "Completed", - "Failed", - "CompletedWithErrors" - ], - "type": "string" - }, - "JobType": { - "enum": [ - "Report", - "Import", - "PayRun" - ], - "type": "string" - }, - "JournalCsvFormat": { - "enum": [ - "Default", - "SapS4Hana", - "MappedOutput" - ], - "type": "string" - }, - "JournalTemplate": { - "type": "object", - "properties": { - "header": { - "type": "string", - "description": "Header of Journal Template", - "nullable": true - }, - "content": { - "type": "string", - "description": "Content of Journal Template", - "nullable": true + "summary": "Pay Code Export Details", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/payspines": { + "get": { + "description": "Returns a report for Pay Spine.", + "operationId": "PaySpineReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "useColumnHeaders": { - "type": "boolean", - "description": "Use Column Headers indicates whether to use column headers while parsing the content in CSV format" + { + "in": "query", + "name": "paySpineId", + "schema": { + "type": "string" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false - }, - "JournalTokenType": { - "enum": [ - "SystemToken", - "CustomToken", - "TextToken", - "ValueToken" ], - "type": "string" - }, - "Leave": { - "type": "object", - "properties": { - "providerId": { - "$ref": "#/components/schemas/ExternalDataProviderId" - }, - "externalId": { - "maxLength": 100, - "type": "string", - "description": "If the Leave comes from an ExternalDataProvider, then this is its Id in the ExternalDataProvider", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/LeaveType" - }, - "pay": { - "$ref": "#/components/schemas/LeavePayType" - }, - "payFrequency": { - "$ref": "#/components/schemas/StatPayFrequency" - }, - "payRunExistsWithStatPay": { - "type": "boolean" - }, - "from": { - "type": "string", - "description": "The first day of Leave.\r\nIf it's a half day PM then set the time portion to 12:00:00, otherwise leave it blank or set it to 00:00:00", - "format": "date-time" - }, - "to": { - "type": "string", - "description": "The last day of Leave.\r\nIf it's a half day AM then set the time portion to 11:59:59, otherwise set it to 23:59:59", - "format": "date-time" - }, - "notes": { - "maxLength": 300, - "type": "string", - "description": "A free-form text field to record any comments", - "nullable": true - }, - "averageWeeklyEarnings": { - "type": "number", - "description": "The employees average weekly earnings. Only relevant for Statutory Pay\r\nIt's advised that you don't try to calculate this yourself.", - "format": "double" - }, - "automaticAWECalculation": { - "type": "boolean", - "description": "If set to True then we'll automatically calculate the AverageWeeklyEarnings. \r\nSet it to false if you want to manually provide a figure that overrides our calculations" - }, - "babyDate": { - "type": "string", - "description": "Only required for Parental Leave with Statutory Pay\r\nIf Type is Maternity or Paternity then this is the date the baby is due.\r\nFor Adoption this is the Matching Date.\r\nFor Neonatal Care is the Baby Due / Matching / Placement Date", - "format": "date", - "nullable": true - }, - "secondaryBabyDate": { - "type": "string", - "description": "Only used for Parental Leave with Statutory Pay\r\nIf Type is Maternity, Paternity, SharedParental (Birth) then this is the the Baby Born Date.\r\nFor Adoption or SharedParental (Adoption) this is the Expected Placement Date.", - "format": "date", - "nullable": true - }, - "tertiaryBabyDate": { - "type": "string", - "description": "Only used for Parental Leave with Statutory Pay\r\nIf Type is Adoption this is the Placement Date.\r\nIf Type is Neonatal Care is the Date Baby Entered Neonatal Care", - "format": "date", - "nullable": true - }, - "overridePaymentDescription": { - "type": "boolean", - "description": "If Pay is StatutoryPay and you want to override our description that goes with the payment then set this to true" - }, - "overridenPaymentDescription": { - "maxLength": 150, - "type": "string", - "description": "If OverridePaymentDescription is true and Pay is set to StatutoryPay then we'll use this as the description for the payment amount.", - "nullable": true - }, - "workingDays": { - "type": "number", - "description": "[readonly] The number of working days covered by this leave.\r\nThis is calculated based on the employees Working Pattern.", - "format": "double" - }, - "workingDaysOverride": { - "type": "number", - "description": "If a value is provided here then this will be used in place of the calculated WorkingDays value", - "format": "double", - "nullable": true - }, - "totalDays": { - "type": "number", - "description": "[readonly] The number of days covered by this leave, regardless of whether or not they're working days.\r\nThis is calculated based on the employees Working Pattern.", - "format": "double" - }, - "totalDaysOverride": { - "type": "number", - "description": "If a value is provided here then this will be used in place of the calculated TotalDays value", - "format": "double", - "nullable": true - }, - "useAssumedPensionablePay": { - "type": "boolean", - "description": "If this Leave has Statutory Pay then if this is set to True\r\nwe will use the value set in AssumedPensionablePay to work out the employer pension contributions" - }, - "assumedPensionablePays": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LeaveAssumedPensionablePay" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaySpineReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/PaySpineReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/PaySpineReportReportResponse" + } + } }, - "description": "if UseAssumedPensionablePay is True, then this is the value used to calculate the employer pension contributions", - "nullable": true - }, - "offsetPay": { - "type": "boolean", - "description": "If this Leave has Statutory Pay and this is set to True and the employe eis paid a fixed amoutn per period\r\nwith Leave Adjustments set to automatic, then we'll reduce their pay for the period by the statutory amount\r\nso the employee still gets paid the full amount." - }, - "sspPayFromDayOne": { - "type": "boolean", - "description": "If this is Sick Leave with Statutory Pay then setting this to true\r\nwill force SSP to be paid from day one rather than the usual rule \r\nof the first Working Day after 3 Qualifying Days" - }, - "linkedPiw": { - "$ref": "#/components/schemas/LinkedPiw" + "description": "Success" + } + }, + "summary": "Pay Spine", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/right-to-work": { + "get": { + "description": "Returns a report summarising RightToWork information for all employees.", + "operationId": "RightToWorkReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "kitSplitDays": { - "type": "array", - "items": { - "type": "string", - "format": "date-time" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RightToWorkReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/RightToWorkReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/RightToWorkReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/RightToWorkReportReportResponse" + } + } }, - "description": "If the LeaveType supports KIT/SPLIT days then use this property to store the list of dates", - "nullable": true - }, - "historicSspRequiresProcessing": { - "type": "boolean", - "description": "Only used during the creation of historical SSP.\r\nWhen creating historical SSP, this will determine whether to pay that leave in the next PayRun." - }, - "historicSxpRequiresProcessing": { - "type": "boolean", - "description": "Used during to determine whether to back pay before current payrun" - }, - "openingPay": { - "type": "number", - "description": "Opening pay which has already been paid to the employee in another system", - "format": "double", - "nullable": true - }, - "useOpeningPay": { - "type": "boolean", - "description": "Use the OpeningPay which has already been paid in another system" - }, - "historicOspRequiresProcessing": { - "type": "boolean", - "description": "Only used during the creation of sickness Occupational Policy.\r\nWhen creating historical SOP, this will determine whether to pay that leave in the next PayRun." - }, - "historicOmpRequiresProcessing": { - "type": "boolean", - "description": "Only used during the creation and update of occupational maternity leaves.\r\nWhen creating or updating historical occupational leaves, this will determine whether to pay the historic payments or correction in the next PayRun." - }, - "historicSmpRequiresProcessing": { - "type": "boolean", - "description": "Only used during the creation and update of statutory maternity leaves.\r\nWhen creating or updating historical statutory maternity leaves, this will determine whether to pay the historic payments or correction in the next PayRun." - }, - "occupationalMaternityPolicyUniqueId": { - "type": "string", - "description": "Occupational Maternity Policy Id when leave type is Maternity and payment type is occupational policy", - "format": "uuid", - "nullable": true - }, - "openingOmpPay": { - "type": "number", - "description": "Opening occupational pay which has already been paid to the employee", - "format": "double", - "nullable": true - }, - "payRunExistsWithOccMaternityPay": { - "type": "boolean", - "description": "Indicates whether there is occupational maternity payment associated with a leave in the current pay run." + "description": "Success" + } + }, + "summary": "RightToWork", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/spinepoints": { + "get": { + "description": "Returns a report for Spine Point.", + "operationId": "SpinePointReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "calculationType": { - "$ref": "#/components/schemas/LeaveCalculationType" + { + "in": "query", + "name": "paySpineId", + "schema": { + "type": "string" + } }, - "strikeHoursToDeduct": { - "type": "number", - "description": "The number of hours to be deducted at the employee's contractual rate\r\nThis property is valid for strike deducted hours", - "format": "double", - "nullable": true + { + "in": "query", + "name": "effectiveDateFrom", + "schema": { + "type": "string" + } }, - "customPayments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LeaveCustomPayment" - }, - "description": "If this is Sick Leave with Custom Payment, then this stores the RoleId, PercentOfPay and PaySSPInAddition for each\r\nrole assigned to an employee that did not end before the start date of the absence.", - "nullable": true + { + "in": "query", + "name": "effectiveDateTo", + "schema": { + "type": "string" + } }, - "customProRataRules": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LeaveCustomProRataRule" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpinePointReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/SpinePointReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/SpinePointReportReportResponse" + } + } }, - "description": "If this is a Leave that supports changing the pro rata at leave level,\r\nThis stores the RoleId and ProRataMethod for each\r\nrole assigned to an employee that did not end before the start date of the absence.", - "nullable": true - }, - "lastProcessedFrom": { - "type": "string", - "description": "[readonly] Last Processed From Date\r\nIf this Leave has already been processed,\r\nthis will be the original leave from date", - "format": "date", - "nullable": true - }, - "isReversed": { - "type": "boolean", - "description": "If the reversal of this Leave has already been processed,\r\nthis will be set to true" + "description": "Success" + } + }, + "summary": "Spine Point", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{payPeriod}/employeeloanexport": { + "get": { + "description": "Returns the Employees Loan Export report for the given pay schedule", + "operationId": "EmployeeLoanExportReports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "paymentTier": { - "$ref": "#/components/schemas/NeonatalCarePaymentTier" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "documentCount": { - "type": "integer", - "description": "[readonly] The number of attachments associated with this model", - "format": "int32" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "documents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployeeLoanExportReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/EmployeeLoanExportReportReportResponse" + } + } }, - "description": "[readonly] The attachments associated with this model", - "nullable": true - }, - "employee": { - "$ref": "#/components/schemas/Item" - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to represent Leave, including Holiday and Statutory leave (such as Maternity Leave)" - }, - "LeaveAssumedPensionablePay": { - "type": "object", - "properties": { - "roleReference": { - "type": "string", - "description": "Employee role reference", - "nullable": true - }, - "roleId": { - "type": "string", - "description": "Employee role unique Id", - "format": "uuid" - }, - "isPrimary": { - "type": "boolean", - "description": "Boolean flag indicates if the role is primary" - }, - "assumedPensionablePay": { - "type": "number", - "description": "Assumed Pensionable Pay (APP) is an average figure, calculated as the average pay in the 3 months\r\n(or 12 weeks if weekly/fortnightly/fourweekly paid) before the absence", - "format": "double", - "nullable": true + "summary": "Employee Loan Export", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{payPeriod}/employeepayments": { + "post": { + "description": "Returns a payments report for all employees for given pay schedule.", + "operationId": "EmployeePaymentsReportReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "automaticAPPCalculation": { - "type": "boolean", - "description": "If set to True then we'll automatically calculate the AssumedPensionablePay. \r\nSet it to false if you want to manually provide a figure that overrides our calculations" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false - }, - "LeaveCalculationType": { - "enum": [ - "OneThreeSixtyFifthFTE", - "OneThreeSixtyFifthProRata", - "UsualProRata", - "OneFifthOrWorkingPattern", - "SpecifyHours" ], - "type": "string" - }, - "LeaveCustomPayment": { - "type": "object", - "properties": { - "roleId": { - "type": "string", - "format": "uuid" - }, - "percentOfPay": { - "type": "number", - "description": "If this is Sick Leave with Custom Payment,\r\nthe user will input the desired impact on the employee’s pay, per role.\r\nThis will be via an amount between 0-100 in 'Pay for Absence'.\r\nThe employees pay will be fully reduced for the absence, and the % paid will be added back using the OSP pay code.", - "format": "double" - }, - "paySSPInAddition": { - "type": "boolean", - "description": "If this is Sick Leave with Custom Payment,\r\nIf true, then reduce the OSP by the amount of SSP paid (and apportioned according to role weighting)\r\nIf false, then do not reduce the OSP at all." + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeePaymentsReportRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeePaymentsReportRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeePaymentsReportRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployeePaymentsReportRequest" + } + } } }, - "additionalProperties": false - }, - "LeaveCustomProRataRule": { - "type": "object", - "properties": { - "roleId": { - "type": "string", - "format": "uuid" - }, - "proRataMethod": { - "$ref": "#/components/schemas/LeaveProRataRule" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployeePaymentsReportLineListReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/EmployeePaymentsReportLineListReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "LeavePayType": { - "enum": [ - "DoNotPay", - "PayAsUsual", - "StatutoryPay", - "OccupationalPolicy", - "Custom" - ], - "type": "string" - }, - "LeaveProRataRule": { - "enum": [ - "WorkingPattern", - "TwoSixtyDaysNotWorked", - "TwoSixtyDaysWorked", - "ThreeSixFiveDaysNotWorked", - "ThreeSixFiveDaysWorked", - "CalendarDays", - "WorkingDays" - ], - "type": "string" - }, - "LeaveSettings": { - "type": "object", - "properties": { - "useDefaultHolidayType": { - "type": "boolean", - "description": "If true then the value for HolidayType comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAllowanceResetDate": { - "type": "boolean", - "description": "If true then the value for the AllowanceResetDate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAllowance": { - "type": "boolean", - "description": "If true then the value for the Allowance comes from the Employer record.\r\nThis property only appears if the LeaveSettings if a child of an Employee (not of an Employer)" - }, - "useDefaultAccruePaymentInLieu": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAccruePaymentInLieuRate": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieuRate comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultHolidayAccrualBasis": { - "type": "boolean", - "description": "If true then the value for HolidayAccrualBasis comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAccruePaymentInLieuPayAutomatically": { - "type": "boolean", - "description": "If true then the value for AccruePaymentInLieu comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultAccrueHoursPerDay": { - "type": "boolean", - "description": "If true then the value for AccrueHoursPerDay comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "useDefaultMaximumAccruePeriod": { - "type": "boolean", - "description": "If true then the value for MaximumAccruePeriod comes from the Employer record.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)" - }, - "allowanceResetDate": { - "type": "string", - "description": "The date that the holiday allowance resets. Only the day/month part of the value is relevant.", - "format": "date" - }, - "allowance": { - "type": "number", - "description": "The number of days holiday an employee can take per year if HolidayType is Days.\r\nOtherwise this is readonly and gives you the number of days accrued since the last reset", - "format": "double" - }, - "adjustment": { - "type": "number", - "description": "Adjustment to number of hours/days/weeks holiday this employee can take per year.\r\nWill reset to 0 when the Allowance resets.\r\nThis property only appears if the LeaveSettings is a child of an Employee (not of an Employer)", - "format": "double", - "nullable": true - }, - "allowanceUsed": { - "type": "number", - "description": "[readonly] The number of days used from the allowance since last reset", - "format": "double" - }, - "allowanceUsedPreviousPeriod": { - "type": "number", - "description": "[readonly] The number of days used in the 12 months prior to the last reset", - "format": "double" - }, - "allowanceRemaining": { - "type": "number", - "description": "[readonly] The number of days remaining of the allowance until next reset", - "format": "double", - "readOnly": true - }, - "holidayType": { - "$ref": "#/components/schemas/HolidayType" - }, - "accrueSetAmount": { - "type": "boolean", - "description": "If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked." - }, - "accrueHoursPerDay": { - "type": "number", - "description": "If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued", - "format": "double" - }, - "showAllowanceOnPayslip": { - "type": "boolean", - "description": "If true then the remaining Allowance will be shown on the employees payslip." + "summary": "Employee Payments Report", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{payPeriod}/loanbalances": { + "get": { + "description": "Returns the Loan Balances report for the given pay schedule", + "operationId": "LoanBalancesReports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "showAhpOnPayslip": { - "type": "boolean", - "description": "If true then the AHP balance will be shown on the employees payslip." + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "accruePaymentInLieuRate": { - "type": "number", - "description": "The rate at which Payments in Lieu acrrue. Typically this should be 12.07%.", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "accruePaymentInLieuAllGrossPay": { - "type": "boolean", - "description": "Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "accruePaymentInLieuPayAutomatically": { - "type": "boolean", - "description": "Set to true if you want employees to be automatically paid any outstanding holiday pay" + { + "in": "query", + "name": "outstandingOnly", + "schema": { + "default": true, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoanBalancesReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/LoanBalancesReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/LoanBalancesReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/LoanBalancesReportReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Loan Balances", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{payPeriod}/{period}/{ordinal}/p45-email-multiple": { + "post": { + "description": "Email P45 to multiple Employees you've marked as a leaver for a period in the employer's current tax year", + "operationId": "EmailP45MutlipleReports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruePayCodeSetUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true + { + "description": "The PayPeriod of the PayRun.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "maximumAccruePeriod": { - "type": "number", - "description": "The maximum number of hours capable of being accrued in a single period", - "format": "double", - "nullable": true + { + "description": "The Period of the PayRun.", + "in": "path", + "name": "period", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "holidayAccrualBasis": { - "$ref": "#/components/schemas/HolidayAccrual" + { + "description": "The Ordinal of the PayRun.", + "in": "path", + "name": "ordinal", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Success" }, - "holidayAccrualDefaultRateType": { - "$ref": "#/components/schemas/HolidayAccrualDefaultRateType" + "400": { + "description": "Bad Request" }, - "occupationalSicknessUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Email P45 to multiple employees", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{payPeriod}/{period}/{ordinal}/p45-multiple": { + "get": { + "description": "Get P45s for multiple employees for a specific period in the employer's current tax year", + "operationId": "P45MultipleReports", + "parameters": [ + { + "description": "The employer id.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedPaymentLiability": { - "type": "number", - "description": "[readonly] The total accrued payments for this employee over the lifetime of their employment so far", - "format": "double" + { + "description": "The PayPeriod of the PayRun.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "accruedPaymentAdjustment": { - "type": "number", - "description": "Any manual adjustment to the total accrued", - "format": "double" + { + "description": "The Period of the PayRun.", + "in": "path", + "name": "period", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "accruedPaymentPaid": { - "type": "number", - "description": "[readonly] The Total amount paid to this employee in lieu of holidays", - "format": "double" + { + "description": "The Ordinal of the PayRun.", + "in": "path", + "name": "ordinal", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "accruedPaymentBalance": { - "type": "number", - "description": "[readonly] The balance of what is owed to this employee in lieu of holidays", - "format": "double", - "readOnly": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" }, - "accruedHoursAmount": { - "type": "number", - "description": "[readonly] The total accrued hours for this employee over the lifetime of their employment so far", - "format": "double" + "400": { + "description": "Bad Request" }, - "accruedHoursAdjustment": { - "type": "number", - "description": "Any manual adjustment to the total hours accrued", - "format": "double" + "404": { + "description": "Not Found" + } + }, + "summary": "P45 for Multiple Employees", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/EmployeeBenefits": { + "get": { + "description": "Returns a output containing details for employee benefits.", + "operationId": "EmployeeBenefitsReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedHoursPaid": { - "type": "number", - "description": "[readonly] The Total amount of hours paid to this employee in lieu of holidays", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "accruedHoursAmountLastPeriod": { - "type": "number", - "description": "[readonly] The total accrued hours for this employee in the last pay period", - "format": "double" + { + "in": "query", + "name": "reportType", + "schema": { + "type": "string" + } }, - "paidHoursAmountLastPeriod": { - "type": "number", - "description": "[readonly] The number of hours paid against the pay code", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployeeBenefitsReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/EmployeeBenefitsReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/EmployeeBenefitsReportReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Employee Benefits", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/GenderPayGap": { + "get": { + "description": "Returns a report containing details for gender pay gap analysis.", + "operationId": "GenderPayGapReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "accruedHoursBalance": { - "type": "number", - "description": "[readonly] The balance of hours owed to this employee in lieu of holidays", - "format": "double", - "readOnly": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "holidayAccrualResetDate": { - "type": "string", - "description": "[readonly] This date is used to reset holiday accrual schemes (Accrual Money or Accrual Hours).", - "format": "date", - "nullable": true + { + "in": "query", + "name": "genderPayGapSnapShotDate", + "schema": { + "$ref": "#/components/schemas/GenderPayGapSnapShotDate" + } }, - "aggregatedServiceDate": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "query", + "name": "ordinaryPayCodeSetId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "useAggregatedServiceDate": { - "type": "boolean" + { + "in": "query", + "name": "bonusPayCodeSetId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "useDefaultHolidayAccrualDefaultRateType": { - "type": "boolean", - "description": "If true then the value for HolidayAccrualDefaultRateType comes from the Employer record." + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenderPayGapReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/GenderPayGapReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/GenderPayGapReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/GenderPayGapReportReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Gender Pay Gap", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/apprenticeshiplevy": { + "get": { + "operationId": "ApprenticeshipLevyDetailsReports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "unauthorisedLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The TaxYear that the Apprenticeship Levy is for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "holidayLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Apprenticeship Levy Details", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/cis300/{id}": { + "get": { + "description": "Returns a CIS300 as a CSV or human-readable report", + "operationId": "Cis300Reports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "sickLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "parentalLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "description": "The Id of CIS300.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "bereavementLeaveProRataRule": { - "$ref": "#/components/schemas/LeaveProRataRule" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false - }, - "LeaveType": { - "enum": [ - "Unauthorised", - "Holiday", - "Sick", - "Maternity", - "Paternity", - "Adoption", - "SharedParental", - "Bereavement", - "SharedParentalAdoption", - "PaternityAdoption", - "StrikeAction", - "NeonatalCare" ], - "type": "string" - }, - "LeaverDetails": { - "type": "object", - "properties": { - "hasLeft": { - "type": "boolean" - }, - "leaveDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "isDeceased": { - "type": "boolean" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cis300ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/Cis300ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/Cis300ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/Cis300ReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "CIS300", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/cisstatement/{taxMonth}": { + "get": { + "description": "Returns a CIS Statement for the employee specified.", + "operationId": "CisStatementReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "paymentAfterLeaving": { - "type": "boolean" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "p45Sent": { - "type": "boolean" + { + "in": "path", + "name": "taxMonth", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "payAccruedBalance": { - "type": "boolean" + { + "description": "Specify an employeeId to get a single statement.\r\n If you don't provide a value then all Subcontractors will be included.", + "in": "query", + "name": "employeeId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "paymentMethodAfterLeaving": { - "$ref": "#/components/schemas/PaymentMethodAfterLeaving" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false - }, - "LgpsCivicaCasualHours": { - "enum": [ - "ReportAsZero", - "ReportAsOne", - "ReportAsBlank" - ], - "type": "string" - }, - "LgpsCivicaPayrollNumber": { - "enum": [ - "PayrollCode", - "RoleReference", - "PayrollCodeAndRoleReference", - "UUID", - "PensionMembershipNoOrRoleReference", - "PensionMembershipNoOrPayrollCodeAndRoleReference", - "PensionMembershipNoOrUUID" - ], - "type": "string" - }, - "LgpsFund": { - "enum": [ - "Avon", - "BarkingAndDagenham", - "Barnet", - "Bedfordshire", - "Berkshire", - "Bexley", - "Brent", - "Bromley", - "Buckinghamshire", - "Cambridgeshire", - "Camden", - "Cardiff", - "Cheshire", - "CityOfWestminster", - "Clwyd", - "Cornwall", - "Croydon", - "Cumbria", - "Derbyshire", - "Devon", - "Dorset", - "Durham", - "Dyfed", - "Ealing", - "EastRiding", - "EastSussex", - "Enfield", - "Essex", - "Gloucestershire", - "GreaterGwent", - "GreaterManchester", - "Greenwich", - "Gwynedd", - "Hackney", - "HammersmithAndFulham", - "Hampshire", - "Haringey", - "Harrow", - "Havering", - "Hertfordshire", - "Hillingdon", - "Hounslow", - "IsleOfWight", - "Islington", - "KensingtonAndChelsea", - "Kent", - "KingstonUponThames", - "Lambeth", - "Lancashire", - "Leicestershire", - "Lewisham", - "Lincolnshire", - "LondonPensionsFundAuthority", - "Merseyside", - "Merton", - "Newham", - "Norfolk", - "NorthYorkshire", - "Northamptonshire", - "Northumberland", - "Nottinghamshire", - "Oxfordshire", - "Powys", - "Redbridge", - "RhonddaCynonTaf", - "Shropshire", - "Somerset", - "SouthYorkshire", - "Southwark", - "Staffordshire", - "Suffolk", - "Surrey", - "Sutton", - "Swansea", - "Teesside", - "TowerHamlets", - "TyneAndWear", - "WalthamForest", - "Wandsworth", - "Warwickshire", - "WestMidlandsPassengerTransport", - "WestMidlands", - "WestSussex", - "WestYorkshire", - "Wiltshire", - "Worcestershire" - ], - "type": "string" - }, - "LgpsIConnectFileType": { - "enum": [ - "SingleFile", - "MultipleProviderFile" - ], - "type": "string" - }, - "LgpsIConnectPayrollReference": { - "enum": [ - "Empty", - "PayrollCode", - "RoleReference", - "PensionMemberNo", - "Uuid", - "PayrollCodeAndRoleReference", - "EmployerCode", - "CustomText", - "PensionMemberNoOrRoleReference", - "PensionMemberNoOrPayrollCodeAndRoleReference", - "PensionMemberNoOrPensionUuid" - ], - "type": "string" - }, - "LgpsIConnectSalaryType": { - "enum": [ - "PayOnJoining", - "AnnualPensionableSalary", - "DoNotReport" - ], - "type": "string" - }, - "LgpsPayCategory": { - "enum": [ - "LgpsFinalPayPre2014" ], - "type": "string" - }, - "LinkedPiw": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/LinkedPiwResult" - }, - "id": { - "type": "string", - "description": "[readonly] The Id of the linked Leave", - "format": "uuid" - }, - "averageWeeklyEarnings": { - "type": "number", - "description": "[readonly] Average weekly earnings from linked Leave", - "format": "double" - }, - "workingDays": { - "type": "number", - "description": "[readonly] The number of working days in the linked Leave.", - "format": "double" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CisStatementListReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/CisStatementListReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "CIS Statement", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/exb/{id}": { + "get": { + "description": "Returns an EXB as a CSV file", + "operationId": "ExbReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "totalDays": { - "type": "number", - "description": "[readonly] The number of days covered by the linked Leave.", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "sspFirstPayDay": { - "type": "string", - "description": "[readonly] The SspFirstPayDay from the linked Leave, if set", - "format": "date", - "nullable": true + { + "description": "The Id of EXB.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "sspFirstDay": { - "type": "string", - "description": "[readonly] The SspFirstDay from the linked Leave, if set", - "format": "date", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Linked Period of Incapacity for Work.\r\nIf you record Sick Leave and select Statutory Pay then any other Sick Leave with Statutory Pay\r\nlasting 4 or more days in the previous 8 weeks will be linked to it" - }, - "LinkedPiwResult": { - "enum": [ - "Success", - "NoLinkedLeave" ], - "type": "string" - }, - "Loan": { - "type": "object", - "properties": { - "issueDate": { - "type": "string", - "description": "The date the Loan was made", - "format": "date" - }, - "reference": { - "maxLength": 100, - "type": "string", - "description": "An optional reference for this Loan", - "nullable": true - }, - "payCode": { - "type": "string", - "description": "The Code of the PayCode used for recording payments.\r\nThe PayCode must have a CalculationType of FixedAmount and not be a multiplier code", - "nullable": true - }, - "loanAmount": { - "type": "number", - "description": "The initial amount that the loan was for", - "format": "double" - }, - "periodAmount": { - "type": "number", - "description": "The amount to deduct per PayPeriod", - "format": "double" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExbReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ExbReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "EXB", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/fps/{id}": { + "get": { + "description": "Returns an FPS as a CSV file", + "operationId": "FpsReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "amountRepaid": { - "type": "number", - "description": "[readonly] The amount repaid so far due to deductions in Payruns", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "previouslyPaid": { - "type": "number", - "description": "[readonly] Any amount by which to adjust the Balance, perhaps due to repayments made elsewhere", - "format": "double" + { + "description": "The Id of FPS.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "balance": { - "type": "number", - "description": "[readonly] The Balance of the Loan", - "format": "double", - "readOnly": true + { + "description": "If true, then any employees that were paid earlier in the year but not on this FPS will also be included", + "in": "query", + "name": "incAllEmployees", + "schema": { + "type": "boolean" + } }, - "isSettled": { - "type": "boolean", - "description": "[readonly]", - "readOnly": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FpsReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/FpsReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "FPS", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/p11d": { + "get": { + "description": "Returns all P11Ds in a single PDF file for the TaxYear and Employer specified\r\nIf you set the accept header to \"text/html\" then unlike other reports the html is NOT in the ```Content``` field.\r\nAs there are multiple HTML documents they are encoded as a JSON array of strings in the ```Model``` field.", + "operationId": "P11DMultipleReports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isPaused": { - "type": "boolean", - "description": "If set to true then deductions will not be made" + { + "description": "The TaxYear you want P11Ds for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "documentCount": { - "type": "integer", - "description": "[readonly] The number of attachments associated with this model", - "format": "int32" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "documents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + { + "description": "Exclude Employees with Already Sent P11Ds Emails.", + "in": "query", + "name": "excludeEmployeesWithP11dEmailSent", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } }, - "description": "[readonly] The attachments associated with this model", - "nullable": true - }, - "employee": { - "$ref": "#/components/schemas/Item" - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to represent an Attachment of Earnings Order (AEO)" - }, - "LoanBalancesReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LoanBalancesReportLine" - }, - "nullable": true - }, - "report": { - "$ref": "#/components/schemas/Report" + "summary": "All P11Ds For TaxYear", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/p11d/{employeeId}": { + "get": { + "description": "Gets a P11D in PDF format for the TaxYear and Employee specified. A URL is returned which points to the PDF file.", + "operationId": "P11DReports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "description": "The Id of the Employee.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "title": { - "type": "string", - "nullable": true + { + "description": "The TaxYear the P60 is for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "isDraft": { - "type": "boolean" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "LoanBalancesReportLine": { - "type": "object", - "properties": { - "employeeName": { - "type": "string", - "nullable": true - }, - "payrollCode": { - "type": "string", - "nullable": true - }, - "issueDate": { - "type": "string", - "format": "date" + "summary": "P11D For Employee", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/p11detailed": { + "get": { + "description": "Returns all detailed P11s in a single PDF file for the TaxYear and Employer specified\r\nIf you set the accept header to \"text/html\" then unlike other reports the html is NOT in the ```Content``` field.\r\nAs there are multiple HTML documents they are encoded as a JSON array of strings in the ```Model``` field.", + "operationId": "P11DetailedMultipleReports", + "parameters": [ + { + "description": "The Id of the employer you want to report on", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "reference": { - "type": "string", - "nullable": true + { + "description": "The tax year you want to report on.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "payCode": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "All Detailed P11s For TaxYear", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/p30/{periodEnding}": { + "get": { + "description": "Returns a P30 Report summarising the employers HMRC liabilities for the period.\r\nFor available periods retrieve a list of HmrcLiability and examine the metadata.\r\nIf the accept header is set to \"text/csv\" then the periodEnding parameter is ignored and you'll receive a CSV for the entire TaxYear.", + "operationId": "P30Reports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "loanAmount": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "paidAmount": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "periodEnding", + "required": true, + "schema": { + "format": "date-time", + "type": "string" + } }, - "outstandingBalance": { - "type": "number", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "LoanBalancesReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + "summary": "P30", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/p32": { + "get": { + "description": "Returns a P32 Report detailing the employers HMRC liabilities for the year.", + "operationId": "P32Reports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "$ref": "#/components/schemas/LoanBalancesReport" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/P32ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/P32ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/P32ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/P32ReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "LoanCharge": { - "type": "object", - "properties": { - "threshhold": { - "type": "number", - "format": "double" + "summary": "P32", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/p60": { + "get": { + "description": "Returns all P60s in a single PDF file for the TaxYear and Employer specified\r\nIf you set the accept header to \"text/html\" then unlike other reports the html is NOT in the ```Content``` field.\r\nAs there are multiple HTML documents they are encoded as a JSON array of strings in the ```Model``` field.", + "operationId": "P60MultipleReports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "officialInterestRate": { - "type": "number", - "format": "double" - } - }, - "additionalProperties": false, - "description": "Part of the TaxYearConfig that our engine uses to calculate charges for a Loan.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "LogEntry": { - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date" + { + "description": "The TaxYear you want P60s for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "message": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + }, + { + "description": "Exclude Employees with Already Sent P60 Emails.", + "in": "query", + "name": "excludeEmployeesWithP60EmailSent", + "schema": { + "default": false, + "type": "boolean" + } } - }, - "additionalProperties": false - }, - "LondonAllowance": { - "required": [ - "paySpineId" ], - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/LondonAllowanceType" - }, - "valueType": { - "$ref": "#/components/schemas/LondonAllowanceValueType" - }, - "value": { - "type": "number", - "description": "Value of London Allowance", - "format": "double" - }, - "paySpineId": { - "type": "integer", - "description": "foreign key with pay spine table", - "format": "int32" - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "LondonAllowanceType": { - "enum": [ - "Inner", - "Outer", - "Fringe" - ], - "type": "string" - }, - "LondonAllowanceValueType": { - "enum": [ - "Graded", - "Fixed" - ], - "type": "string" - }, - "MailSettings": { - "required": [ - "customiseHtmlEmailSettings", - "customiseSmtpSettings", - "senderEmail", - "senderName" - ], - "type": "object", - "properties": { - "senderName": { - "maxLength": 100, - "minLength": 1, - "type": "string" - }, - "senderEmail": { - "maxLength": 100, - "minLength": 1, - "type": "string", - "format": "email" - }, - "useSystemFromAddress": { - "type": "boolean", - "description": "If set to true then the SenderEmail provided will only be used in the \r\nReplyTo fields. The system defaults will be used for the From address." - }, - "senderEmailVerified": { - "type": "boolean", - "description": "[readonly] The SenderEmail must be verified before you can send email using that address" - }, - "customiseSmtpSettings": { - "type": "boolean" - }, - "smtpSettings": { - "$ref": "#/components/schemas/SmtpSettings" + "summary": "All P60s For TaxYear", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/p60/{employeeId}": { + "get": { + "description": "Gets a P60 in PDF format for the TaxYear and Employee specified. A URL is returned which points to the PDF file.", + "operationId": "P60Reports", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "customiseHtmlEmailSettings": { - "type": "boolean" + { + "description": "The Id of the Employee.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "htmlEmailSettings": { - "$ref": "#/components/schemas/HtmlEmailSettings" + { + "description": "The TaxYear the P60 is for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Determines the settings used when the Employer sends emails.\r\nIf CustomiseSmtpSettings is false then SmtpSettings will be null and our default internal settings will be used;" - }, - "MaritalStatus": { - "enum": [ - "Single", - "Married", - "Divorced", - "Widowed", - "CivilPartnership", - "Unknown" ], - "type": "string" - }, - "McrPayCategory": { - "enum": [ - "McrPensionablePay", - "McrOvertime", - "McrAdditionalPensionablePayments" - ], - "type": "string" - }, - "MileageAllowancePaymentsRate": { - "type": "object", - "properties": { - "vehicleType": { - "$ref": "#/components/schemas/MileageVehicleType" - }, - "rate": { - "type": "number", - "format": "double" - }, - "threshold": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "aboveThresholdRate": { - "type": "number", - "format": "double" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "Part of the TaxYearConfig that our engine uses to calculate Mileage Allowance Payments.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "MileageVehicleType": { - "enum": [ - "Car", - "Motorcycle", - "Cycle" - ], - "type": "string" - }, - "MonthlyMinimum": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" + "summary": "P60 For Employee", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/pensionmemberships": { + "get": { + "description": "Returns a report for Multiple Pension Memberships", + "operationId": "PensionMembershipsReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "amount": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "payPeriod", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "startDate": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "endDate": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "billPastEndDate": { - "type": "boolean", - "description": "If set to true then this user should still be billed even after the End Date" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false - }, - "NationalInsuranceCalculation": { - "type": "object", - "properties": { - "breakdown": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NationalInsuranceCalculationBase" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PensionMembershipsReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/PensionMembershipsReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/PensionMembershipsReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/PensionMembershipsReportReportResponse" + } + } }, - "description": "[readonly] List of calculations that make up this calculation", - "nullable": true - }, - "niCategory": { - "type": "string", - "description": "Calculated on NI table letter" - }, - "asDirector": { - "type": "boolean", - "description": "Calculated as a Director" - }, - "earningsUptoIncludingLEL": { - "type": "number", - "description": "Earnings up to and including LEL", - "format": "double" - }, - "earningsAboveLELUptoIncludingPT": { - "type": "number", - "description": "Earnings above LEL up to PT", - "format": "double" - }, - "earningsAbovePTUptoIncludingST": { - "type": "number", - "description": "Earnings above PT up to ST", - "format": "double" - }, - "earningsAbovePTUptoIncludingUEL": { - "type": "number", - "description": "Earnings above PT up to UEL", - "format": "double" - }, - "earningsAboveSTUptoIncludingUEL": { - "type": "number", - "description": "Earnings above ST up to UEL", - "format": "double" - }, - "earningsAboveSTUptoIncludingFUST": { - "type": "number", - "description": "Earnings above ST up to FUST", - "format": "double", - "nullable": true - }, - "earningsAboveFUSTUptoIncludingUEL": { - "type": "number", - "description": "Earnings above FUST up to UEL", - "format": "double", - "nullable": true - }, - "earningsAboveUEL": { - "type": "number", - "description": "Earnings above UEL", - "format": "double" - }, - "employeeNiGross": { - "type": "number", - "description": "Employee National Insurance Gross Value", - "format": "double" - }, - "employeeNiRebate": { - "type": "number", - "description": "Employee National Insurance Rebate Value", - "format": "double" - }, - "employerNiGross": { - "type": "number", - "description": "Employer National Insurance Gross Value", - "format": "double" - }, - "employerNiRebate": { - "type": "number", - "description": "Employer National Insurance Rebate Value", - "format": "double" - }, - "employeeNi": { - "type": "number", - "description": "[readonly] Net Employee National Insurance", - "format": "double", - "readOnly": true - }, - "employerNi": { - "type": "number", - "description": "[readonly] Net Employer National Insurance", - "format": "double", - "readOnly": true - }, - "netNi": { - "type": "number", - "description": "[readonly] Net National Insurance (Employer + Employee)", - "format": "double", - "readOnly": true - }, - "niablePay": { - "type": "number", - "description": "Niable pay value, required for payrun overrides", - "format": "double" + "description": "Success" } }, - "additionalProperties": false, - "description": "Included as part of the PayRunEntry model to provide details of how the National Insurance Contribution was calculated.\r\nUnless the PayRunEntry.ManualNi property is set to true then these value will all be read-only and are recalculated everytime a payrun is updated.\r\nThis calculation could be made up of one or more calculations made on different NI table letters.\r\nWhere more than NI table letter affects the calculation, the calculation for each NI table letter will be contain in the Breakdown." - }, - "NationalInsuranceCalculationBase": { - "type": "object", - "properties": { - "niCategory": { - "type": "string", - "description": "Calculated on NI table letter" - }, - "asDirector": { - "type": "boolean", - "description": "Calculated as a Director" - }, - "earningsUptoIncludingLEL": { - "type": "number", - "description": "Earnings up to and including LEL", - "format": "double" - }, - "earningsAboveLELUptoIncludingPT": { - "type": "number", - "description": "Earnings above LEL up to PT", - "format": "double" - }, - "earningsAbovePTUptoIncludingST": { - "type": "number", - "description": "Earnings above PT up to ST", - "format": "double" - }, - "earningsAbovePTUptoIncludingUEL": { - "type": "number", - "description": "Earnings above PT up to UEL", - "format": "double" - }, - "earningsAboveSTUptoIncludingUEL": { - "type": "number", - "description": "Earnings above ST up to UEL", - "format": "double" - }, - "earningsAboveSTUptoIncludingFUST": { - "type": "number", - "description": "Earnings above ST up to FUST", - "format": "double", - "nullable": true - }, - "earningsAboveFUSTUptoIncludingUEL": { - "type": "number", - "description": "Earnings above FUST up to UEL", - "format": "double", - "nullable": true - }, - "earningsAboveUEL": { - "type": "number", - "description": "Earnings above UEL", - "format": "double" - }, - "employeeNiGross": { - "type": "number", - "description": "Employee National Insurance Gross Value", - "format": "double" - }, - "employeeNiRebate": { - "type": "number", - "description": "Employee National Insurance Rebate Value", - "format": "double" - }, - "employerNiGross": { - "type": "number", - "description": "Employer National Insurance Gross Value", - "format": "double" - }, - "employerNiRebate": { - "type": "number", - "description": "Employer National Insurance Rebate Value", - "format": "double" - }, - "employeeNi": { - "type": "number", - "description": "[readonly] Net Employee National Insurance", - "format": "double", - "readOnly": true - }, - "employerNi": { - "type": "number", - "description": "[readonly] Net Employer National Insurance", - "format": "double", - "readOnly": true + "summary": "Export Multiple Pension Memberships Report", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/taxcode": { + "get": { + "description": "Returns a CSV file containing Tax Code Changes values for all Employees.", + "operationId": "TaxCodeChangesReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "netNi": { - "type": "number", - "description": "[readonly] Net National Insurance (Employer + Employee)", - "format": "double", - "readOnly": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "niablePay": { - "type": "number", - "description": "Niable pay value, required for payrun overrides", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaxCodeChangeReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/TaxCodeChangeReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/TaxCodeChangeReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/TaxCodeChangeReportReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "Included as part of the PayRunEntry model to provide details of how the National Insurance Contribution was calculated.\r\nUnless the PayRunEntry.ManualNi property is set to true then these value will all be read-only and are recalculated everytime a payrun is updated.\r\nThis calculation could be made up of one or more calculations made on different NI table letters.\r\nWhere more than NI table letter affects the calculation, the calculation for each NI table letter will be contain in the Breakdown." - }, - "NationalInsuranceCalculationPeriodValues": { - "type": "object", - "properties": { - "lel": { - "type": "number", - "description": "[readonly] Lower Earnings Limit", - "format": "double" - }, - "pt": { - "type": "number", - "description": "[readonly] Primary Threshold", - "format": "double" - }, - "st": { - "type": "number", - "description": "[readonly] Secondary Threshold", - "format": "double" - }, - "fust": { - "type": "number", - "description": "[readonly] Freeports Upper Accrual Threshold", - "format": "double" - }, - "uap": { - "type": "number", - "description": "[readonly] Upper Accrual Point", - "format": "double" + "summary": "Taxcode Change", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/teachersPensionEoy": { + "get": { + "description": "Returns a report response containing the Teachers Pension EOYC Report", + "operationId": "TeachersPensionEoyReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "ust": { - "type": "number", - "description": "[readonly] Upper Secondary Threshold (under 21)", - "format": "double" + { + "in": "query", + "name": "localAuthorityNumber", + "schema": { + "type": "string" + } }, - "aust": { - "type": "number", - "description": "[readonly] Apprentice Upper Secondary Threshold (apprentice under 25)", - "format": "double" + { + "in": "query", + "name": "schoolEmployerType", + "schema": { + "type": "string" + } }, - "uel": { - "type": "number", - "description": "[readonly] Upper Earnings Limit", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "vust": { - "type": "number", - "description": "[readonly] Veterian Upper Secondary Threshold", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeachersPensionEoyReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/TeachersPensionEoyReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/TeachersPensionEoyReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/TeachersPensionEoyReportReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "Part of the TaxYearConfig that our engine uses to calculate National Insurance Contributions.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "NationalInsuranceCode": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[readonly] NI Table Letter" - }, - "description": { - "type": "string", - "description": "[readonly] Description of Employees that would use this NI Letter", - "nullable": true + "summary": "Teachers Pension Eoy Report", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{employeeId}/p11": { + "get": { + "description": "Returns a P11 Report, detailing all payments and deductions for the given employee", + "operationId": "P11Reports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "eeB": { - "type": "number", - "description": "[readonly] Earnings at or above LEL up to and including PT (Employee Contribution)", - "format": "double" + { + "description": "The employee Id of the employee you want to report on", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "eeC": { - "type": "number", - "description": "[readonly] Earnings above the PT up to and including UEL (Employee Contribution)", - "format": "double" + { + "description": "The tax year you want to report on.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "eeD": { - "type": "number", - "description": "[readonly] Balance of earnings above UEL (Employee Contribution)", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/P11ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/P11ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/P11ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/P11ReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "P11", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{employeeId}/p11detailed": { + "get": { + "description": "Returns a detailed P11 Report for the given employee.", + "operationId": "P11DetailedReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "eeE": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "description": "The employee Id of the employee you want to report on", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "eeF": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "description": "The tax year you want to report on.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "erB": { - "type": "number", - "description": "[readonly] Earnings at or above LEL up to and including PT (Employer Contribution)", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/P11DetailedReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/P11DetailedReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/P11DetailedReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "P11 (Detailed)", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/analysis": { + "get": { + "description": "Returns an AnalysisReport for one or multiple periods.", + "operationId": "AnalysisReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "erC": { - "type": "number", - "description": "[readonly] Earnings above the PT up to and including UEL (Employer Contribution)", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "erD": { - "type": "number", - "description": "[readonly] Balance of earnings above UEL (Employer Contribution)", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "erE": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "in": "query", + "name": "fromPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "erF": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "in": "query", + "name": "toPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "effectiveFrom": { - "type": "string", - "description": "The date when these period values are effective", - "format": "date", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "midYearChanges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NationalInsuranceCode" - }, - "description": "Any optional changes to the period values that are effective from a specified date in the middle of a tax year", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Part of the TaxYearConfig that our engine uses to calculate National Insurance Contributions.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "NationalMinimumWage": { - "type": "object", - "properties": { - "apprentice": { - "type": "boolean", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "maxAge": { - "type": "integer", - "format": "int32" + { + "description": "If specified then only employees assigned to this department code at the time of the payrun will be included", + "in": "query", + "name": "deptCode", + "schema": { + "type": "string" + } }, - "hourlyAmount": { - "type": "number", - "format": "double" + { + "description": "If set to true, then the report will show a breakdown of each period for each employee", + "in": "query", + "name": "showPayPeriodBreakdown", + "schema": { + "default": false, + "type": "boolean" + } } - }, - "additionalProperties": false, - "description": "Part of the TaxYearConfig that our engine uses to calculate National Minimum Wage.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "NeonatalCarePaymentTier": { - "enum": [ - "None", - "FirstTier", - "SecondTier" - ], - "type": "string" - }, - "NiLetterError": { - "enum": [ - "XNotUsedForPensionersPayroll", - "BUsedForMale", - "CUsedBeforeStatePensionAge", - "AUsedForUnder21", - "AUsedOverStatePensionAge", - "HUsedForOver24", - "MUsedForOver20", - "ZUsedForOver20", - "IUsedForMale", - "FUsedForNonFreeportWorker", - "IUsedForNonFreeportWorker", - "LUsedForNonFreeportWorker", - "SUsedForNonFreeportWorker", - "VUsedForNonVeteran", - "VUsedForVeteransFirstEmploymentDateOverOneYearOld", - "FUsedForFreeportWorkerOverThreeYearsOld", - "IUsedForFreeportWorkerOverThreeYearsOld", - "LUsedForFreeportWorkerOverThreeYearsOld", - "SUsedForFreeportWorkerOverThreeYearsOld", - "XNotUsedForUnder16", - "DUsedForNonInvestmentZoneWorker", - "EUsedForNonInvestmentZoneWorker", - "KUsedForNonInvestmentZoneWorker", - "NUsedForNonInvestmentZoneWorker", - "BEITAllowForDOBBefore5thApril1961" ], - "type": "string" - }, - "NiLetterValidationReport": { - "type": "object", - "properties": { - "basedOnPayrun": { - "type": "boolean", - "description": "If false, then any payrun related information (Tax year, etc) should be ignored." - }, - "errorLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NiLetterValidationReportLine" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnalysisReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/AnalysisReportReportResponse" + } + } }, - "nullable": true, - "readOnly": true + "description": "Success" + } + }, + "summary": "Analysis", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/analysiscostbreakdown": { + "get": { + "description": "Returns an AnalysisCostBreakdownReport for one or multiple periods.", + "operationId": "PayrollAnalysisCostBreakdownReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "paymentDate": { - "type": "string", - "format": "date", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "employer": { - "$ref": "#/components/schemas/Item" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" + { + "in": "query", + "name": "fromPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "ordinal": { - "type": "integer", - "format": "int32" + { + "in": "query", + "name": "toPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "period": { - "type": "integer", - "format": "int32" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "periodTo": { - "type": "integer", - "format": "int32" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "startPeriodName": { - "type": "string", - "nullable": true + { + "description": "If specified then only employees assigned to this department code at the time of the payrun will be included", + "in": "query", + "name": "deptCode", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayrollAnalysisCostBreakdownReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/PayrollAnalysisCostBreakdownReportReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Analysis Cost Breakdown", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/analysisemployeerolebreakdown": { + "get": { + "description": "Return a Payroll Analysis Report with Employee Role Breakdown for a specified pay period.\r\nIf a department code is specified, only employees assigned to this department at the time of the payrun will be included.", + "operationId": "PayrollAnalysisEmployeeRoleBreakdownReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "endPeriodName": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "startDate": { - "type": "string", - "format": "date" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "endDate": { - "type": "string", - "format": "date" + { + "in": "query", + "name": "fromPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "report": { - "$ref": "#/components/schemas/Report" + { + "in": "query", + "name": "toPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "title": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "isDraft": { - "type": "boolean" + { + "description": "Optional. Filters employees by department code.", + "in": "query", + "name": "deptCode", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayrollAnalysisEmployeeRoleBreakdownReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/PayrollAnalysisEmployeeRoleBreakdownReportReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "NiLetterValidationReportLine": { - "type": "object", - "properties": { - "employeeId": { - "type": "string", - "format": "uuid" - }, - "payrollCode": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "niNumber": { - "type": "string", - "nullable": true + "summary": "Payroll Analysis with Employee Role Breakdown", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/attachmentorders": { + "get": { + "description": "Returns a report detailing attachment of earning order deductions for one or multiple periods.", + "operationId": "AttachmentOrdersReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "gender": { - "$ref": "#/components/schemas/Gender" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "dateOfBirth": { - "type": "string", - "format": "date" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "niLetterError": { - "$ref": "#/components/schemas/NiLetterError" + { + "in": "query", + "name": "fromPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "errorDetails": { - "type": "string", - "nullable": true, - "readOnly": true + { + "in": "query", + "name": "toPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "niLetter": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "suggestedLetter": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false - }, - "NiLetterValidationReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/NiLetterValidationReport" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrdersReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrdersReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/AttachmentOrdersReportReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "NiYtdReport": { - "type": "object", - "properties": { - "payrun": { - "$ref": "#/components/schemas/PayRun" + "summary": "Attachment Orders", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/averageholidaypayrate": { + "get": { + "description": "Returns a report for average holiday pay rate.", + "operationId": "AverageHolidayPayRateReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeNiYtdValues" - }, - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "report": { - "$ref": "#/components/schemas/Report" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "in": "query", + "name": "period", + "schema": { + "format": "int32", + "type": "integer" + } }, - "title": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "isDraft": { - "type": "boolean" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AverageHolidayPayRateReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/AverageHolidayPayRateReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/AverageHolidayPayRateReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/AverageHolidayPayRateReportReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "NiYtdReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "summary": "Average Holiday Pay Rate", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/costanalysis": { + "get": { + "description": "Returns a report analysing the costs of a payrun or range of payruns.", + "operationId": "CostAnalysisReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "model": { - "$ref": "#/components/schemas/NiYtdReport" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "NiYtdValue": { - "type": "object", - "properties": { - "type": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "fromPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "broughtForward": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "toPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "period": { - "type": "number", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "value": { - "type": "number", - "format": "double", - "readOnly": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostAnalysisReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/CostAnalysisReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/CostAnalysisReportReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "NicSummary": { - "type": "object", - "properties": { - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "paymentDate": { - "type": "string", - "format": "date" + "summary": "Cost Analysis", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/costofemployment": { + "get": { + "description": "Returns a report detailing the employment cost per employee for a payrun or range of payruns.", + "operationId": "CostOfEmploymentReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "niTable": { - "type": "string" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "asDirector": { - "type": "boolean" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "grossEarningsForNics": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "fromPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "earningsAtLel": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "toPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "earningsAboveLelToPt": { - "type": "number", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "earningsAbovePtToSt": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostOfEmploymentReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/CostOfEmploymentReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/CostOfEmploymentReportReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Cost Of Employment", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/fullsummaryofpay": { + "get": { + "description": "Returns a report detailing the employment cost per employee for a payrun or range of payruns.", + "operationId": "FullSummaryOfPayReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "earningsAbovePtToUap": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "earningsAboveStToUel": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "earningsAboveStToFust": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "period", + "schema": { + "format": "int32", + "type": "integer" + } }, - "earningsAboveFustToUel": { - "type": "number", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "earningsAboveUapToUel": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FullSummaryOfPayReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/FullSummaryOfPayReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/FullSummaryOfPayReportReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Cost Of Employment", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/gross-to-net": { + "get": { + "description": "Returns a report comparing employees' gross pay with their net pay for one or more pay periods.", + "operationId": "GrossToNetReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "earningsAboveUel": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "employeeNics": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "employeeNiRebate": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "fromPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "employerNics": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "toPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "employerNiRebate": { - "type": "number", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "hasValues": { - "type": "boolean", - "readOnly": true + { + "description": "Defines the way to sort the data. Defaults to sorting by PayrollCode.", + "in": "query", + "name": "sortBy", + "schema": { + "$ref": "#/components/schemas/ReportSortBy" + } }, - "id": { - "type": "string", - "format": "uuid", - "readOnly": true + { + "description": "Defines whether to sort the data in descending order. Defaults to false.", + "in": "query", + "name": "sortDescending", + "schema": { + "type": "boolean" + } }, - "isNiYtdOverride": { - "type": "boolean" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "childId": { - "type": "string", - "description": "This is nothing but the UniqueId of the model.", - "format": "uuid" + { + "description": "If true then CIS Subcontractors are reported on.\r\n If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false", + "in": "query", + "name": "forCis", + "schema": { + "default": false, + "type": "boolean" + } }, - "employee": { - "$ref": "#/components/schemas/Item" + { + "description": "Will indicate what version of the payrun will be shown. If left empty, will show full pay run.", + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false - }, - "NominalCodeMapping": { - "type": "object", - "properties": { - "nominalCode": { - "maxLength": 500, - "type": "string", - "nullable": true - }, - "nominalName": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "externalId": { - "maxLength": 100, - "type": "string", - "description": "If you will be using the API to post journals to an ExternalDataProvider, then this is the Id of the nominal code in the external system.\r\nIf there's no mapping then this will have a value of \"0\"", - "nullable": true - }, - "payCode": { - "type": "string", - "nullable": true - }, - "nominalMapping": { - "maxLength": 500, - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GrossToNetReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/GrossToNetReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/GrossToNetReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/GrossToNetReportReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "Note": { - "type": "object", - "properties": { - "noteDate": { - "type": "string", - "description": "The date of the note", - "format": "date" - }, - "noteText": { - "type": "string", - "description": "Note text", - "nullable": true - }, - "createdBy": { - "type": "string", - "description": "[readonly] The email address of the user that create the Note", - "nullable": true + "summary": "Gross To Net", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/hourly-pay": { + "get": { + "description": "Returns a report summarising the hourly pay for employees for one or more pay periods.", + "operationId": "HourlyPayReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "updatedBy": { - "type": "string", - "description": "[readonly] The email address of the user that last updated the Note", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "type": { - "$ref": "#/components/schemas/NoteType" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "documentCount": { - "type": "integer", - "description": "[readonly] The number of attachments associated with this model", - "format": "int32" + { + "in": "query", + "name": "fromPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "documents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - }, - "description": "[readonly] The attachments associated with this model", - "nullable": true + { + "in": "query", + "name": "toPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "employee": { - "$ref": "#/components/schemas/Item" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false, - "description": "Used to represent a Note for an Employee" - }, - "NoteType": { - "enum": [ - "General", - "NewStarterStatement", - "RtwProof", - "P45" ], - "type": "string" - }, - "Nvr": { - "type": "object", - "properties": { - "employees": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HourlyPayReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/HourlyPayReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/HourlyPayReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/HourlyPayReportReportResponse" + } + } }, - "nullable": true - }, - "employeeCount": { - "type": "integer", - "format": "int32" - }, - "nvrRequest": { - "$ref": "#/components/schemas/NvrRequest" - }, - "iRmark": { - "type": "string", - "nullable": true - }, - "xml": { - "type": "string", - "description": "This property will soon be removed and should not be used.\r\nThere is now a dedicated API endpoint for retrieving the XML for a submission.", - "nullable": true - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "employerReferences": { - "$ref": "#/components/schemas/EmpRefs" - }, - "govTalkSubmission": { - "$ref": "#/components/schemas/GovTalkSubmission" - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "description": "Success" } }, - "additionalProperties": false - }, - "NvrEmployee": { - "type": "object", - "properties": { - "employeeUniqueId": { - "type": "string", - "format": "uuid" - }, - "item": { - "$ref": "#/components/schemas/Item" + "summary": "Hourly Pay", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/pay-element": { + "get": { + "description": "Returns a report detailing pay elements for one or more pay periods.", + "operationId": "PayElementReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employeeDetails": { - "$ref": "#/components/schemas/NvrEmployeeDetails" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "employment": { - "$ref": "#/components/schemas/NvrEmployment" - } - }, - "additionalProperties": false - }, - "NvrEmployeeDetails": { - "type": "object", - "properties": { - "nino": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "name": { - "$ref": "#/components/schemas/RtiEmployeeName" + { + "in": "query", + "name": "fromPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "address": { - "$ref": "#/components/schemas/RtiEmployeeAddress" + { + "in": "query", + "name": "toPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "birthDate": { - "type": "string", - "nullable": true + { + "description": "Comma separated values of pay codes, e.g., (BASIC,BASICANNUAL,BASICDAILY)", + "in": "query", + "name": "payCodes", + "schema": { + "type": "string" + } }, - "gender": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "NvrEmployment": { - "type": "object", - "properties": { - "payId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "NvrRequest": { - "type": "object", - "properties": { - "employee": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NvrEmployee" - }, - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "relatedTaxYear": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false - }, - "OccupationalPolicy": { - "required": [ - "entitlement", - "policyName", - "sicknessYear", - "type" ], - "type": "object", - "properties": { - "policyName": { - "maxLength": 50, - "minLength": 1, - "type": "string", - "description": "The unique policy name" - }, - "type": { - "$ref": "#/components/schemas/OccupationalPolicyType" - }, - "entitlement": { - "$ref": "#/components/schemas/OccupationalPolicyEntitlement" - }, - "sicknessYear": { - "$ref": "#/components/schemas/OccupationalPolicySicknessYear" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayElementReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/PayElementReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/PayElementReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/PayElementReportReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Pay Element", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/payrunsummary": { + "get": { + "description": "Returns an array of PayRunSummaryLine for one or multiple periods. Similar to a PayRunJournal except that it can cover multiple periods.", + "operationId": "PayRunSummaryReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "policyStartMonth": { - "$ref": "#/components/schemas/CalendarMonth" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "serviceBands": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ServiceBand" - }, - "description": "Service Bands Json", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "payCalculatedOn": { - "$ref": "#/components/schemas/OccupationalPolicyPayCalculatedOn" + { + "in": "query", + "name": "fromPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "payCodeSetUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true + { + "in": "query", + "name": "toPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "useAggregatedServiceDate": { - "type": "boolean" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "daysOrWeeksBeforeRecalculatingEntitlement": { - "type": "integer", - "description": "How many days or weeks an employee needs to return to work before new entitlements are used in calculations", - "format": "int32" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "entitlementRecalculationBasis": { - "$ref": "#/components/schemas/OccupationalPolicyEntitlementRecalculationBasis" + { + "description": "If specified then only employees assigned to this department code at the time of the payrun will be included", + "in": "query", + "name": "deptCode", + "schema": { + "type": "string" + } }, - "ignorePreviousYearsSickness": { - "type": "boolean", - "description": "Defines whether any sickness that relates to a previous year's sickness entitlement should be included in the entitlement calculation,\r\nor whether only sickness that is relevant to the current year's entitlement is taken into consideration" + { + "description": "If set to true and acceptType is text/csv, then where a PayCode on a PayLine is a multiplier code we'll include a Qty value for the number of days/hours", + "in": "query", + "name": "includeQty", + "schema": { + "default": false, + "type": "boolean" + } } - }, - "additionalProperties": false - }, - "OccupationalPolicyEntitlement": { - "enum": [ - "Days", - "Weeks" - ], - "type": "string" - }, - "OccupationalPolicyEntitlementRecalculationBasis": { - "enum": [ - "ServiceBanding", - "SickYear" - ], - "type": "string" - }, - "OccupationalPolicyPayCalculatedOn": { - "enum": [ - "NotApplicable", - "PercentageOfAnnualSalary", - "PercentageOfAverageWeeklyEarnings", - "PercentageOfPayCodeSet", - "Custom" - ], - "type": "string" - }, - "OccupationalPolicySicknessYear": { - "enum": [ - "NotApplicable", - "Rolling", - "Fixed" - ], - "type": "string" - }, - "OccupationalPolicyType": { - "enum": [ - "Sickness", - "Maternity" - ], - "type": "string" - }, - "OccupationalSickLeaveHistory": { - "required": [ - "leaveDate", - "payPercent", - "serviceBandFrom", - "serviceBandTo" ], - "type": "object", - "properties": { - "payrollCode": { - "type": "string", - "nullable": true - }, - "leaveDate": { - "type": "string", - "format": "date" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayRunSummaryLineIEnumerableReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/PayRunSummaryLineIEnumerableReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "PayRunSummary", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/statutory-pay": { + "get": { + "description": "Returns a report detailing statutory pay for one or more pay periods.", + "operationId": "StatutoryPayReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payPercent": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "serviceBandFrom": { - "type": "integer", - "format": "int32" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "serviceBandTo": { - "type": "integer", - "format": "int32" + { + "in": "query", + "name": "fromPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "payRunId": { - "type": "integer", - "format": "int32" + { + "in": "query", + "name": "toPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "roleReference": { - "type": "string", - "nullable": true + { + "description": "Comma separated values from (SAP, SHPP, SMP, SPBP, SPP)", + "in": "query", + "name": "statutoryPayTypes", + "schema": { + "type": "string" + } }, - "occupationalPolicy": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatutoryPayReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/StatutoryPayReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/StatutoryPayReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/StatutoryPayReportReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "OpeningBalances": { - "type": "object", - "properties": { - "notNewStarter": { - "type": "boolean" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + "summary": "Statutory Pay", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/umbrella-reconciliation": { + "get": { + "description": "Returns an Umbrella Reconciliation report.", + "operationId": "UmbrellaReconciliationReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "previousEmployerGross": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "previousEmployerTax": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "currentEmployerGross": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "fromPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "currentEmployerTax": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "toPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "currentEmployerNet": { - "type": "number", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "studentLoanDeductions": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "postgradLoanDeductions": { - "type": "number", - "format": "double" + { + "description": "Specify an employee id to report on just that employee, otherwise all employees will be included.", + "in": "query", + "name": "employeeId", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UmbrellaReconciliationReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/UmbrellaReconciliationReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/UmbrellaReconciliationReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/UmbrellaReconciliationReportReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Umbrella Reconciliation", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/variance": { + "get": { + "description": "Returns a report comparing two pay periods or two ranges of pay periods.", + "operationId": "VarianceReportReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "empeePenContribnsPaid": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "empeePenContribnsNotPaid": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "format": "int32", + "type": "integer" + } }, - "smp": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "spp": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "fromPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "sap": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "toPeriod", + "schema": { + "format": "int32", + "type": "integer" + } }, - "shpp": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "payPeriodCompare", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "spbp": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "ordinalCompare", + "schema": { + "format": "int32", + "type": "integer" + } }, - "sncp": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "taxYearCompare", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "realTimeClass1ANi": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "fromPeriodCompare", + "schema": { + "format": "int32", + "type": "integer" + } }, - "terminationPayments": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "toPeriodCompare", + "schema": { + "format": "int32", + "type": "integer" + } }, - "mapsMiles": { - "type": "integer", - "format": "int32" + { + "description": "If true then any variations will be shown as a percentage.", + "in": "query", + "name": "showPercentage", + "schema": { + "type": "boolean" + } }, - "benefitsTaxedViaPayroll": { - "type": "number", - "format": "double" + { + "description": "Set a threshold for reporting variance. Ie, provide 0.10 and any variance below 10% will be ignored", + "in": "query", + "name": "minChange", + "schema": { + "format": "double", + "type": "number" + } }, - "nicSummaries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NicSummary" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VarianceReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/VarianceReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/VarianceReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/VarianceReportReportResponse" + } + } }, - "nullable": true - }, - "foreignTaxCredit": { - "type": "number", - "format": "double" - }, - "foreignTaxCreditReclaimed": { - "type": "number", - "format": "double" - }, - "employee": { - "$ref": "#/components/schemas/Item" + "description": "Success" } }, - "additionalProperties": false - }, - "OpeningBalancesTotals": { - "type": "object", - "properties": { - "employeesWithOpeningBalancesCount": { - "type": "integer", - "format": "int32" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + "summary": "Variance Report", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/NiLetterValidationReport": { + "get": { + "description": "Checks the NI Letters allocated to employees on a specific payrun", + "operationId": "NiLetterValidationReportReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "previousEmployerGross": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "previousEmployerTax": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "currentEmployerGross": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "currentEmployerTax": { - "type": "number", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "currentEmployerNet": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NiLetterValidationReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/NiLetterValidationReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/NiLetterValidationReportReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "NI Letter Validation (Payrun)", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/PayrollRunWarnings": { + "get": { + "description": "Returns a report for payroll warnings", + "operationId": "WarningsReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "studentLoanDeductions": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "postgradLoanDeductions": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "empeePenContribnsPaid": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "empeePenContribnsNotPaid": { - "type": "number", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "smp": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WarningsReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/WarningsReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/WarningsReportReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Export Payroll Run Warnings", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/furlough": { + "get": { + "description": "Returns a Furlough Report.", + "operationId": "FurloughReportReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "spp": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "sap": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "shpp": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "spbp": { - "type": "number", - "format": "double" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "sncp": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FurloughReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/FurloughReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/FurloughReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/FurloughReportReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "FurloughReport", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/niytd": { + "get": { + "description": "Returns a CSV file containing NI YTD values for all Employees on the payrun.", + "operationId": "PayrunNiYtdReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "realTimeClass1ANi": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "terminationPayments": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "mapsMiles": { - "type": "integer", - "format": "int32" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "benefitsTaxedViaPayroll": { - "type": "number", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "format": "int32", + "type": "integer" + } }, - "nicSummaries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NicSummary" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NiYtdReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/NiYtdReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/NiYtdReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/NiYtdReportReportResponse" + } + } }, - "nullable": true - }, - "foreignTaxCredit": { - "type": "number", - "format": "double" - }, - "foreignTaxCreditReclaimed": { - "type": "number", - "format": "double" - }, - "employee": { - "$ref": "#/components/schemas/Item" + "description": "Success" } }, - "additionalProperties": false - }, - "OverseasEmployerDetails": { - "type": "object", - "properties": { - "overseasEmployer": { - "type": "boolean" + "summary": "NI Year To Date Values", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/papdis": { + "get": { + "description": "Returns a PAPDIS compliant file for the PayRun and Pension Provider PAPDIS Id specified", + "operationId": "PapdisFileReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "overseasSecondmentStatus": { - "$ref": "#/components/schemas/OverseasSecondmentStatus" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "eeaCitizen": { - "type": "boolean" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "epm6Scheme": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "OverseasSecondmentStatus": { - "enum": [ - "None", - "MoreThan183Days", - "LessThan183Days", - "BothInAndOutOfUK" - ], - "type": "string" - }, - "P11": { - "type": "object", - "properties": { - "employerName": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "payrollCode": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "description": "The Id of the Pension Scheme you want a file for.", + "in": "query", + "name": "schemeId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "employerOfficeNo": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "employerPayeRef": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "firstname": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "query", + "name": "csvFormat", + "schema": { + "$ref": "#/components/schemas/PensionCsvFormat" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PapdisDocumentReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/PapdisDocumentReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/PapdisDocumentReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/PapdisDocumentReportResponse" + } + }, + "text/xml": { + "schema": { + "$ref": "#/components/schemas/PapdisDocumentReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "PAPDIS File", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payments/employee": { + "get": { + "description": "Returns a list of all employee payments that need to be made as a result of a Payrun.\r\nIf you specifically want just bank payments (employees where PayMethod is Credit) then you\r\nmay find the Bank Payment Instructions API call more useful", + "operationId": "PayRunPaymentsReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "surname": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "niNumber": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "taxCode": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "dateOfBirth": { - "type": "string", - "description": "[readonly]", - "format": "date" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "joinDate": { - "type": "string", - "description": "[readonly]", - "format": "date" + { + "description": "Specifies the region whose bank holidays are to be considered in the operation.", + "in": "query", + "name": "bankHoliday", + "schema": { + "$ref": "#/components/schemas/BankHolidayCollection" + } }, - "leaveDate": { - "type": "string", - "description": "[readonly]", - "format": "date", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/P11Line" + { + "description": "If set to true then we'll also include payments that need to be made to HMRC and PensionProviders", + "in": "query", + "name": "includeNonEmployeePayments", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "Will indicate what version of the payrun will be shown. If left empty, will show full pay run.", + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayrunPaymentsReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/PayrunPaymentsReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/PayrunPaymentsReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/PayrunPaymentsReportReportResponse" + } + } }, - "description": "[readonly]", - "nullable": true + "description": "Success" + } + }, + "summary": "PayRun Payments", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payments/employee/credit": { + "get": { + "description": "Returns a list of bank payments that need to be made to employees as a result of a Payrun.\r\nYou can optionally provide a PaymentDate and only payments for that date will be returned.", + "operationId": "BankPaymentInstructionsReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "report": { - "$ref": "#/components/schemas/Report" + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "title": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "isDraft": { - "type": "boolean" - } - }, - "additionalProperties": false, - "description": "A P11 Report summarises payments and deductions made to an employee.\r\nOur Reports API can return this to you in many formats including as a PDF file\r\nIf you request is as a JSOn object then it is represented using this model." - }, - "P11DAssetAvailable": { - "type": "object", - "properties": { - "desc": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "other": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "paymentDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "annValProRata": { - "type": "string", - "nullable": true + { + "description": "Specifies the region whose bank holidays are to be considered in the operation.", + "in": "query", + "name": "bankHoliday", + "schema": { + "$ref": "#/components/schemas/BankHolidayCollection" + } }, - "grossOrAmtForgone": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "costOrAmtForgone": { - "type": "string", - "nullable": true + { + "description": "Set to true and we'll include any payment due to Pension Providers", + "in": "query", + "name": "incPensions", + "schema": { + "default": false, + "type": "boolean" + } }, - "madeGood": { - "type": "string", - "nullable": true + { + "description": "Set to true and we'll include any payment due to HMRC", + "in": "query", + "name": "incHmrc", + "schema": { + "default": false, + "type": "boolean" + } }, - "cashEquivOrRelevantAmt": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "P11DAssetAvailableCollection": { - "type": "object", - "properties": { - "asset": { - "type": "array", - "items": { - "$ref": "#/components/schemas/P11DAssetAvailable" - }, - "nullable": true + { + "description": "Set to true and we'll include any payment due as a result of AttachmentOrders", + "in": "query", + "name": "incAeos", + "schema": { + "default": false, + "type": "boolean" + } }, - "typeLetter": { - "type": "string", - "nullable": true + { + "description": "Set to true and we'll include any payment due to Deductions that are set to be paid to a Payee", + "in": "query", + "name": "incDeductions", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "description": "Will indicate what version of the payrun will be shown. If left empty, will show full pay run.", + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false - }, - "P11DAssetTransferredCollection": { - "type": "object", - "properties": { - "asset": { - "type": "array", - "items": { - "$ref": "#/components/schemas/P11DDescOther" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BankPaymentInstructionReportResponse" + } + }, + "application/zip": { + "schema": { + "$ref": "#/components/schemas/BankPaymentInstructionReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/BankPaymentInstructionReportResponse" + } + } }, - "nullable": true - }, - "typeLetter": { - "type": "string", - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "P11DCar": { - "type": "object", - "properties": { - "make": { - "type": "string", - "nullable": true - }, - "registered": { - "type": "string", - "nullable": true - }, - "availFrom": { - "type": "string", - "nullable": true - }, - "availTo": { - "type": "string", - "nullable": true - }, - "cc": { - "type": "string", - "nullable": true - }, - "fuel": { - "type": "string", - "nullable": true - }, - "cO2": { - "type": "string", - "nullable": true - }, - "zeroEmissionMileage": { - "type": "string", - "nullable": true + "summary": "Bank Payment Instructions", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payrolljournalcsv": { + "get": { + "description": "Download the lines of Payroll Journal to CSV file.", + "operationId": "PayrollJournalCsvReportReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "noAppCO2Fig": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "list": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "accs": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "capCont": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "privUsePmt": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "fuelWithdrawn": { - "$ref": "#/components/schemas/P11dCarFreeFuelWithdrawn" + { + "description": "Set to true and the journal will be split between any relevant Departments", + "in": "query", + "name": "deptBreakdown", + "schema": { + "default": false, + "type": "boolean" + } }, - "cashEquivOrRelevantAmt": { - "type": "string", - "nullable": true + { + "description": "Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable", + "in": "query", + "name": "includeApprenticeLevy", + "schema": { + "default": false, + "type": "boolean" + } }, - "fuelCashEquivOrRelevantAmt": { - "type": "string", - "nullable": true + { + "description": "Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal", + "in": "query", + "name": "allSchedules", + "schema": { + "default": false, + "type": "boolean" + } } - }, - "additionalProperties": false - }, - "P11DCarCollection": { - "type": "object", - "properties": { - "car": { - "type": "array", - "items": { - "$ref": "#/components/schemas/P11DCar" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } }, - "nullable": true - }, - "totalCarsOrRelevantAmt": { - "type": "string", - "nullable": true - }, - "totalFuelOrRelevantAmt": { - "type": "string", - "nullable": true - }, - "typeLetter": { - "type": "string", - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "P11DDescOther": { - "type": "object", - "properties": { - "desc": { - "type": "string", - "nullable": true + "summary": "Payroll Journal CSV", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payrun-csv": { + "get": { + "description": "Download the lines of a PayRun to a CSV file.\r\nPlease use Get PayRun CSV that now accepts a parameter for CSV type", + "operationId": "PayRunCsvReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "other": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "annValProRata": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "grossOrAmtForgone": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "costOrAmtForgone": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "madeGood": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "cashEquivOrRelevantAmt": { - "type": "string", - "nullable": true + { + "description": "If set to true then instead of a line-by-line CSV, you'll receive a summary for each employee", + "in": "query", + "name": "summary", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "P11DLoan": { - "type": "object", - "properties": { - "joint": { - "type": "string", - "nullable": true + "summary": "PayRun CSV (deprecated)", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payruncsv": { + "get": { + "description": "Download the lines of a PayRun to a CSV file.", + "operationId": "GetPayRunCsvReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "initOS": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "finalOS": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "maxOS": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "intPaid": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "date": { - "type": "string", - "nullable": true + { + "description": "Choose the type of CSV you want to generate", + "in": "query", + "name": "csvType", + "schema": { + "$ref": "#/components/schemas/PayRunCsvType" + } }, - "discharge": { - "type": "string", - "nullable": true + { + "description": "If you provide the id of a PaymentCsvMapping that is column based then we'll return the CSV formatted accordingly", + "in": "query", + "name": "mappingId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "cashEquivOrRelevantAmt": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "default": "application/json", + "type": "string" + } } - }, - "additionalProperties": false - }, - "P11DLoanCollection": { - "type": "object", - "properties": { - "loan": { - "type": "array", - "items": { - "$ref": "#/components/schemas/P11DLoan" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } }, - "nullable": true - }, - "typeLetter": { - "type": "string", - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "P11DOther": { - "type": "object", - "properties": { - "class1A": { - "type": "array", - "items": { - "$ref": "#/components/schemas/P11DDescOther" - }, - "nullable": true - }, - "nonClass1A": { - "type": "array", - "items": { - "$ref": "#/components/schemas/P11DDescOther" - }, - "nullable": true - }, - "taxPaid": { - "type": "string", - "nullable": true + "summary": "Get PayRun CSV", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payslips": { + "get": { + "description": "Returns all Payslips for the given PayRun\r\nIf you set the accept header to \"text/html\" then unlike other reports the html is NOT in the ```Content``` field.\r\nAs there are multiple HTML documents they are encoded as a JSON array of strings in the ```Model``` field.", + "operationId": "PayslipsReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "typeLetter": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "P11DPaymentCollection": { - "type": "object", - "properties": { - "payment": { - "type": "array", - "items": { - "$ref": "#/components/schemas/P11DDescOther" - }, - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "tax": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "typeLetter": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "P11DSingleItem": { - "type": "object", - "properties": { - "typeLetter": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "taxablePmt": { - "type": "string", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "excess": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "taxablePmtOrRelevantAmt": { - "type": "string", - "nullable": true + { + "description": "Set this to True if you only want the Payslips that haven't been sent by email", + "in": "query", + "name": "unemailed", + "schema": { + "default": false, + "type": "boolean" + } }, - "tradingOrgInd": { - "type": "string", - "nullable": true + { + "description": "Set if you want to filter by department", + "in": "query", + "name": "deptCode", + "schema": { + "type": "string" + } }, - "desc": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "startersLeaversFilter", + "schema": { + "$ref": "#/components/schemas/StartersLeaversFilter" + } }, - "other": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "pageNum", + "schema": { + "format": "int32", + "type": "integer" + } }, - "annValProRata": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "pageSize", + "schema": { + "format": "int32", + "type": "integer" + } }, - "grossOrAmtForgone": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "sortBy", + "schema": { + "$ref": "#/components/schemas/PayRunEntrySortBy" + } }, - "costOrAmtForgone": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "sortDescending", + "schema": { + "default": false, + "type": "boolean" + } }, - "madeGood": { - "type": "string", - "nullable": true + { + "description": "Will indicate what version of the payrun will be shown. If left empty, will show full pay run.", + "in": "query", + "name": "version", + "schema": { + "format": "int32", + "type": "integer" + } }, - "cashEquivOrRelevantAmt": { - "type": "string", - "nullable": true + { + "description": "If the selected pay run is supplementary run and this is set to true, this will contain the differences between the current pay run version of the PayRunEntry and its previous version", + "in": "query", + "name": "differenceOnly", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "P11Detailed": { - "type": "object", - "properties": { - "employerName": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "payrollCode": { - "type": "string", - "description": "[readonly]", - "nullable": true + "summary": "Payslips", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/ytd": { + "get": { + "description": "Returns a CSV file containing YTD values for all Employees on the payrun.", + "operationId": "PayrunYtdReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employerOfficeNo": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "employerPayeRef": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "firstname": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "middlename": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "query", + "name": "ordinal", + "schema": { + "format": "int32", + "type": "integer" + } }, - "surname": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/YtdReportReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/YtdReportReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/YtdReportReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/YtdReportReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Year To Date Values", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/{id}/payslip": { + "get": { + "description": "Returns a single Payslip for the given PayRunEntry of a PayRun. The type of response depends on the accept header.", + "operationId": "PayslipReports", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "niNumber": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "taxCode": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "dateOfBirth": { - "type": "string", - "description": "[readonly]", - "format": "date" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "joinDate": { - "type": "string", - "description": "[readonly]", - "format": "date" + { + "description": "The Id of the PayRunEntry.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "leaveDate": { - "type": "string", - "description": "[readonly]", - "format": "date", - "nullable": true + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "isDirector": { - "type": "boolean", - "description": "[readonly]" + { + "in": "query", + "name": "ordinal", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "niAndStatPaymentsLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/P11NiAndStatPaymentsLine" + { + "description": "If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version", + "in": "query", + "name": "differenceOnly", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayslipReportResponse" + } + }, + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/PayslipReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/PayslipReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/PayslipReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Payslip", + "tags": [ + "Reports" + ] + } + }, + "/employers/{employerId}/reporttemplate": { + "get": { + "description": "Lists all Report Templates for an Employer.", + "operationId": "IndexReportTemplate", + "parameters": [ + { + "description": "The Id of the Employer to which the Report Template belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "description": "[readonly]", - "nullable": true - }, - "totalsLine": { - "$ref": "#/components/schemas/P11NiAndStatPaymentsTotalsLine" - }, - "niSummary": { - "type": "array", - "items": { - "$ref": "#/components/schemas/P11DetailedNiValues" + "description": "Success" + } + }, + "summary": "List Report Templates (beta)", + "tags": [ + "ReportTemplate" + ] + }, + "post": { + "description": "Creates a new Report Template for the Employer.", + "operationId": "CreateReportTemplate", + "parameters": [ + { + "description": "The Id of the Employer to which the Report Template belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.ReportTemplateRequest" + } }, - "description": "[readonly]", - "nullable": true - }, - "payeLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/P11PayeLine" + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.ReportTemplateRequest" + } }, - "description": "[readonly]", - "nullable": true - }, - "payeTotalsLine": { - "$ref": "#/components/schemas/P11PayeTotalsLine" - }, - "payeSummary": { - "$ref": "#/components/schemas/P11PayeSummary" + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.ReportTemplateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.ReportTemplateRequest" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.ReportTemplateResponse" + } + } + }, + "description": "Created" }, - "report": { - "$ref": "#/components/schemas/Report" + "400": { + "description": "Bad Request" + } + }, + "summary": "Create Report Template (beta)", + "tags": [ + "ReportTemplate" + ] + } + }, + "/employers/{employerId}/reporttemplate/{id}": { + "delete": { + "description": "Deletes the specified Report Template.", + "operationId": "DeleteReportTemplate", + "parameters": [ + { + "description": "The Id of the Employer to which the Report Template belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "description": "The Id of the Report Template which you want to fetch", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "title": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "isDraft": { - "type": "boolean" + "404": { + "description": "Employer or Report Template Not Found" } }, - "additionalProperties": false, - "description": "A more comprehensive P11 Report.\r\nOur Reports API can return this to you in several formats including as a PDF file\r\nIf you request a JSON object then it is represented using this model." + "summary": "Delete Report Template (beta)", + "tags": [ + "ReportTemplate" + ] }, - "P11DetailedNiValues": { - "type": "object", - "properties": { - "table": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "earningsAtLel": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "earningsAboveLelToPt": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "earningsAbovePtToUap": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "earningsAboveUapToUel": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "earningsAbovePtToUel": { - "type": "number", - "description": "[readonly]", - "format": "double" + "get": { + "description": "Gets the Report Template specified.", + "operationId": "GetReportTemplate", + "parameters": [ + { + "description": "The Id of the Employer to which the Report Template belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employeeNics": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "description": "The Id of the Report Template which you want to fetch", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.ReportTemplateResponse" + } + } + }, + "description": "Success" }, - "employerNics": { - "type": "number", - "description": "[readonly]", - "format": "double" + "400": { + "description": "Bad Request" }, - "employeeAndEmployerNics": { - "type": "number", - "description": "[readonly]", - "format": "double" + "404": { + "description": "Employer or Report Template Not Found" } }, - "additionalProperties": false, - "description": "Forms the NI Summary table in the P11 Detailed report." + "summary": "Get Report Template (beta)", + "tags": [ + "ReportTemplate" + ] }, - "P11DetailedReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "put": { + "description": "Updates a Report Template for the Employer.", + "operationId": "UpdateReportTemplate", + "parameters": [ + { + "description": "The Id of the Employer to which the Report Template belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, + { + "description": "The Id of the Report Template which you want to fetch", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/P11Detailed" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.ReportTemplateRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.ReportTemplateRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.ReportTemplateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.ReportTemplateRequest" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "P11Line": { - "type": "object", - "properties": { - "date": { - "type": "string", - "description": "[readonly]", - "format": "date" - }, - "period": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "grossTaxablePay": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "grossTaxablePayYTD": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "tax": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "taxYTD": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "smpYTD": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "sppYTD": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "sapYTD": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "shppYTD": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "spbpYTD": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "sncpYTD": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "studentLoanYTD": { - "type": "number", - "description": "[readonly]", - "format": "double" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.ReportTemplateResponse" + } + } + }, + "description": "Success" }, - "postgradLoanYTD": { - "type": "number", - "description": "[readonly]", - "format": "double" + "400": { + "description": "Bad Request" }, - "niValues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/P11NiValues" + "404": { + "description": "Employer or Report Template Not Found" + } + }, + "summary": "Update Report Template (beta)", + "tags": [ + "ReportTemplate" + ] + } + }, + "/employers/{employerId}/rti/cis-verification/requiringattention": { + "get": { + "description": "Returns all CIS Verification Requests that have a Submission Status of NotSubmitted or ErrorResponse", + "operationId": "RequiringAttentionCisVerification", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "description": "[readonly]", - "nullable": true + "description": "Success" } }, - "additionalProperties": false, - "description": "Lines for the P11 Report" - }, - "P11NiAndStatPaymentsLine": { - "type": "object", - "properties": { - "date": { - "type": "string", - "description": "[readonly]", - "format": "date" - }, - "period": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "monthNumber": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "weekNumber": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "smp": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "spp": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "sap": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "shpp": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "ssp": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "spbp": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "sncp": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "class1a": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "niValues": { - "$ref": "#/components/schemas/P11DetailedNiValues" + "summary": "CisVerificationRequest Requiring Attention", + "tags": [ + "CisVerification" + ] + } + }, + "/employers/{employerId}/rti/cis-verification/{taxYear}": { + "get": { + "description": "Returns all CIS Verification Requests for the given tax year.", + "operationId": "ListCisVerification", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxCode": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "Lines for the NI Contributions and Statutory Payments table in the P11 Detailed Report" + "summary": "List CisVerificationRequest", + "tags": [ + "CisVerification" + ] }, - "P11NiAndStatPaymentsTotalsLine": { - "type": "object", - "properties": { - "toLel": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "lelToPt": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "ptToUel": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "eesAndErs": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "ees": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "class1A": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "ssp": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "smp": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "spp": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "shpp": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "sap": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "spbp": { - "type": "number", - "description": "[readonly]", - "format": "double" + "post": { + "description": "Creates a new CIS Verification Request.", + "operationId": "CreateCisVerification", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "sncp": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CisVerification" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/CisVerification" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/CisVerification" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CisVerification" + } + } } }, - "additionalProperties": false, - "description": "Summary line for the NI Contributions and Statutory Payments table in the P11 Detailed report" - }, - "P11NiValues": { - "type": "object", - "properties": { - "table": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "period": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "ytd": { - "type": "number", - "description": "[readonly]", - "format": "double" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CisVerification" + } + } + }, + "description": "Created" } }, - "additionalProperties": false, - "description": "Forms a part of the P11 report." - }, - "P11PayeLine": { - "type": "object", - "properties": { - "date": { - "type": "string", - "description": "[readonly]", - "format": "date" - }, - "period": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "monthNumber": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "weekNumber": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "grossTaxablePay": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "grossTaxablePayYTD": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "tax": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "taxYTD": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "studentLoan": { - "type": "number", - "description": "[readonly]", - "format": "double" + "summary": "Create CisVerificationRequest", + "tags": [ + "CisVerification" + ] + } + }, + "/employers/{employerId}/rti/cis-verification/{taxYear}/{id}": { + "delete": { + "description": "Deletes the CIS Verification Request.", + "operationId": "DeleteCisVerification", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "postgradLoan": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "taxCode": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" } }, - "additionalProperties": false, - "description": "Lines for the Paye Income Tax table in the P11 Detailed report" + "summary": "Delete CisVerificationRequest", + "tags": [ + "CisVerification" + ] }, - "P11PayeSummary": { - "type": "object", - "properties": { - "previousEmploymentPay": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "previousEmploymentTax": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "thisEmploymentPay": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "thisEmploymentTax": { - "type": "number", - "description": "[readonly]", - "format": "double" + "get": { + "description": "Retrieves the CIS Verification Request.", + "operationId": "GetCisVerification", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "totalPayForYear": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "totalTaxForYear": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CisVerification" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "Forms the PAYE summary in the P11 Detailed report" + "summary": "Get CisVerificationRequest", + "tags": [ + "CisVerification" + ] }, - "P11PayeTotalsLine": { - "type": "object", - "properties": { - "studentLoan": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "postgradLoan": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "pay": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "totalPayToDate": { - "type": "number", - "description": "[readonly]", - "format": "double" + "put": { + "description": "Updates an existing CIS Verification Request.", + "operationId": "UpdateCisVerification", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxDueToDate": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "taxDue": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Summary line for the Paye Income Tax table in the P11 Detailed report" - }, - "P11ReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/P11" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CisVerification" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/CisVerification" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/CisVerification" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CisVerification" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "P11dCarFreeFuelWithdrawn": { - "type": "object", - "properties": { - "reinstated": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CisVerification" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "P11dExpenses": { - "type": "object", - "properties": { - "travAndSub": { - "$ref": "#/components/schemas/P11DSingleItem" - }, - "ent": { - "$ref": "#/components/schemas/P11DSingleItem" - }, - "homeTel": { - "$ref": "#/components/schemas/P11DSingleItem" - }, - "nonQualRel": { - "$ref": "#/components/schemas/P11DSingleItem" + "summary": "Update CisVerificationRequest", + "tags": [ + "CisVerification" + ] + } + }, + "/employers/{employerId}/rti/cis-verification/{taxYear}/{id}/markasaccepted": { + "post": { + "description": "Marks a CIS Verification Request as having been sent to HMRC and accepted by them\r\nYou only use this method if the request has been submitted via an external system.\r\nIt will automatically be updated as Sent and/or Accepted if it's submitted via this API.", + "operationId": "MarkAsAcceptedCisVerification", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "other": { - "$ref": "#/components/schemas/P11DSingleItem" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "typeLetter": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CisVerification" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "P11dVans": { - "type": "object", - "properties": { - "fuelCashEquivOrRelevantAmt": { - "type": "string", - "nullable": true - }, - "typeLetter": { - "type": "string", - "nullable": true - }, - "taxablePmt": { - "type": "string", - "nullable": true - }, - "excess": { - "type": "string", - "nullable": true - }, - "taxablePmtOrRelevantAmt": { - "type": "string", - "nullable": true - }, - "tradingOrgInd": { - "type": "string", - "nullable": true - }, - "desc": { - "type": "string", - "nullable": true + "summary": "Mark as Sent", + "tags": [ + "CisVerification" + ] + } + }, + "/employers/{employerId}/rti/cis-verification/{taxYear}/{id}/submit": { + "post": { + "description": "Submits an existing CIS Verification Request to HMRC.", + "operationId": "SubmitCisVerification", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "other": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "annValProRata": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "grossOrAmtForgone": { - "type": "string", - "nullable": true + { + "description": "If the CisVerification has already been accepted then you will need to set this to true to force it to be resubmitted", + "in": "query", + "name": "force", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CisVerification" + } + } + }, + "description": "Success" + } + }, + "summary": "Submit CisVerificationRequest", + "tags": [ + "CisVerification" + ] + } + }, + "/employers/{employerId}/rti/cis-verification/{taxYear}/{id}/xml/request": { + "get": { + "description": "Returns the XML request that was or will be sent to HMRC for this RTI document.\r\nAlthough the value is XML, it is returned as a JSON string.", + "operationId": "GetXmlRequestCisVerification", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "costOrAmtForgone": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "madeGood": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "Success" + } + }, + "summary": "Get XML Request", + "tags": [ + "CisVerification" + ] + } + }, + "/employers/{employerId}/rti/cis300/requiringattention": { + "get": { + "description": "Returns all Cis300 that have a Submission Status of NotSubmitted or ErrorResponse", + "operationId": "RequiringAttentionCis300", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Cis300 Requiring Attention", + "tags": [ + "Cis300" + ] + } + }, + "/employers/{employerId}/rti/cis300/{taxYear}": { + "get": { + "description": "Returns all Cis300s for the given tax year.", + "operationId": "ListCis300", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "cashEquivOrRelevantAmt": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } } - }, - "additionalProperties": false - }, - "P32": { - "type": "object", - "properties": { - "isQuarterly": { - "type": "boolean", - "description": "[readonly]" - }, - "hmrcLiabilities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HmrcLiability" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "description": "[readonly]", - "nullable": true - }, - "employerOpeningBalances": { - "$ref": "#/components/schemas/EmployerOpeningBalances" - }, - "openingBalancesTotals": { - "$ref": "#/components/schemas/OpeningBalancesTotals" - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true - }, - "isDraft": { - "type": "boolean" + "description": "Success" } }, - "additionalProperties": false, - "description": "" + "summary": "List Cis300", + "tags": [ + "Cis300" + ] }, - "P32ReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "post": { + "description": "A Cis300 is automatically created for each Tax Month that you pay a Subcontractor.\r\nYou would only manually create one if you are intending to submit a nil return.", + "operationId": "CreateCis300", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/P32" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Cis300" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cis300" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Cis300" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Cis300" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "PapdisDocument": { - "type": "object", - "properties": { - "messageFunctionCode": { - "$ref": "#/components/schemas/PapdisMessageFunctionCode" - }, - "version": { - "$ref": "#/components/schemas/PapdisVersion" - }, - "messageFunctionCodeInt": { - "type": "integer", - "description": "[readonly]", - "format": "int32" - }, - "pensionProvider": { - "$ref": "#/components/schemas/PapdisPensionProvider" - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true - }, - "isDraft": { - "type": "boolean" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cis300" + } + } + }, + "description": "Created" } }, - "additionalProperties": false, - "description": "PAPDIS stands for 'Payroll and Pension Data Interface Standard'.\r\nIt is an industry standard for exchanging data between payroll software and pension providers.\r\nOur system provides an export of data in this standard and these models are used to represent the data.\r\nWhilst the relevant reporting API endpoint can provide this data as a JSON entity, it is usually represented in CSV or XML format which our API also provides." - }, - "PapdisDocumentReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + "summary": "Create Cis300", + "tags": [ + "Cis300" + ] + } + }, + "/employers/{employerId}/rti/cis300/{taxYear}/{id}": { + "delete": { + "description": "Not implemented, CIS300s cannot be deleted", + "operationId": "DeleteCis300", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "$ref": "#/components/schemas/PapdisDocument" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "PapdisEmployee": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "[readonly]", - "format": "int32" - }, - "employeeId": { - "type": "string", - "description": "[readonly]", - "format": "uuid" - }, - "name": { - "$ref": "#/components/schemas/PapdisEmployeeName" - }, - "identity": { - "$ref": "#/components/schemas/PapdisEmployeeIdentity" - }, - "contact": { - "$ref": "#/components/schemas/PapdisEmployeeContact" - }, - "pay": { - "$ref": "#/components/schemas/PapdisEmployeePay" - }, - "assessment": { - "$ref": "#/components/schemas/PapdisEmployeeAssessment" - }, - "contribution": { - "$ref": "#/components/schemas/PapdisEmployeeContribution" - }, - "exit": { - "$ref": "#/components/schemas/PapdisEmployeeExit" - }, - "payrollCode": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "aeStateDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "leaveDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "statePensionAge": { - "type": "integer", - "format": "int32" - }, - "contractualJoinerIndicator": { - "type": "boolean" - }, - "jobTitle": { - "type": "string", - "nullable": true - }, - "pensionMemberReference": { - "type": "string", - "nullable": true - }, - "pensionUniqueId": { - "type": "string", - "nullable": true - }, - "employeeRoleUniqueId": { - "type": "string", - "format": "uuid" - }, - "lastPaymentDate": { - "type": "string", - "description": "The last time the employee was paid", - "format": "date", - "nullable": true - }, - "hasPrevioulyLeftPension": { - "type": "boolean", - "description": "Flag indicating the employee has previously left the pension" - }, - "pensionablePayDefinition": { - "$ref": "#/components/schemas/PensionablePayDefinition" + ], + "responses": { + "204": { + "description": "No Content" } }, - "additionalProperties": false + "summary": "Delete Cis300", + "tags": [ + "Cis300" + ] }, - "PapdisEmployeeAssessment": { - "type": "object", - "properties": { - "assessmentCode": { - "type": "integer", - "description": "[readonly]", - "format": "int32" - }, - "eventCode": { - "type": "integer", - "description": "[readonly]", - "format": "int32" - }, - "eventDate": { - "type": "string", - "description": "[readonly]", - "format": "date", - "nullable": true - }, - "statutoryLetterCode": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "isIndividualAlreadyMemberOfQPS": { - "type": "boolean", - "description": "[readonly]" - }, - "deferralDate": { - "type": "string", - "description": "[readonly]", - "format": "date", - "nullable": true - }, - "enrolmentCommunicationsIssuedDate": { - "type": "string", - "description": "[readonly]", - "format": "date", - "nullable": true - }, - "workerExclusionCode": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "reenrolmentIndicator": { - "type": "boolean", - "description": "[readonly]" - }, - "optOutWindowEndDate": { - "type": "string", - "description": "[readonly]", - "format": "date", - "nullable": true + "get": { + "description": "Retrieves a Cis300", + "operationId": "GetCis300", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "pensionJoinReason": { - "$ref": "#/components/schemas/PensionJoinReason" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "pensionStartDate": { - "type": "string", - "description": "[readonly]", - "format": "date", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "PapdisEmployeeContact": { - "type": "object", - "properties": { - "postalAddress": { - "$ref": "#/components/schemas/PapdisEmployeeContactPostalAddress" - }, - "emailAddress": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "secondaryEmailAddress": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "telephone": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "mobile": { - "type": "string", - "description": "[readonly]", - "nullable": true + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cis300" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get Cis300", + "tags": [ + "Cis300" + ] }, - "PapdisEmployeeContactPostalAddress": { - "type": "object", - "properties": { - "address1": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "address2": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "address3": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "address4": { - "type": "string", - "description": "[readonly]", - "nullable": true + "put": { + "description": "Updates an existing Cis300.", + "operationId": "UpdateCis300", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "postcode": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "country": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "PapdisEmployeeContribution": { - "type": "object", - "properties": { - "employerContributionsAmount": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "employerContributionsPercent": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "employeeContributionsAmount": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "employeeContributionsPercent": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "additionalVoluntaryContributionsAmount": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "additionalVoluntaryContributionsPercent": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "salarySacrificeIndicator": { - "type": "boolean", - "description": "[readonly]" - }, - "contributionStartDate": { - "type": "string", - "description": "[readonly]", - "format": "date" - }, - "employeeContributionIsPercentage": { - "type": "boolean", - "description": "[readonly]" - }, - "employerContributionIsPercentage": { - "type": "boolean", - "description": "[readonly]" - }, - "unadjustedEmployeeContributionsAmount": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "unadjustedEmployerContributionsAmount": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "unadjustedAdditionalVoluntaryContributionsAmount": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "employerContributionNiSavings": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "contributionLevelType": { - "$ref": "#/components/schemas/PensionContributionLevelType" - }, - "isAvcOnly": { - "type": "boolean", - "description": "[readonly]" - }, - "employerContributionIncludesNiSaving": { - "type": "boolean", - "description": "[readonly]" - }, - "unadjustedAdditionalVoluntaryContributionsPercent": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "isHalfContributionMember": { - "type": "boolean", - "description": "[readonly]" - }, - "assumedPensionablePay": { - "type": "number", - "description": "[readonly]", - "format": "double", - "nullable": true - }, - "isPensionRefund": { - "type": "boolean", - "description": "[readonly]" - }, - "lowerLimit": { - "type": "number", - "description": "[readonly]", - "format": "double" + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Cis300" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cis300" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Cis300" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Cis300" + } + } } }, - "additionalProperties": false - }, - "PapdisEmployeeExit": { - "type": "object", - "properties": { - "exitDate": { - "type": "string", - "description": "[readonly]", - "format": "date", - "nullable": true - }, - "exitReasonCode": { - "type": "integer", - "description": "[readonly]", - "format": "int32", - "nullable": true - }, - "aeOptOutDate": { - "type": "string", - "description": "[readonly]", - "format": "date", - "nullable": true - }, - "aeOptOutReference": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "reasonForLeaving": { - "type": "string", - "description": "[readonly]", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cis300" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "PapdisEmployeeIdentity": { - "type": "object", - "properties": { - "employeeId": { - "type": "string", - "description": "[readonly]", - "nullable": true + "summary": "Update Cis300", + "tags": [ + "Cis300" + ] + } + }, + "/employers/{employerId}/rti/cis300/{taxYear}/{id}/markasaccepted": { + "post": { + "description": "Marks a Cis300 as having been sent to HMRC and accepted by them\r\nYou only use this method if the request has been submitted via an external system.\r\nIt will automatically be updated as Sent and/or Accepted if it's submitted via this API.", + "operationId": "MarkAsAcceptedCis300", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "birthDate": { - "type": "string", - "description": "[readonly]", - "format": "date" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "gender": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cis300" + } + } + }, + "description": "Success" + } + }, + "summary": "Mark as Sent", + "tags": [ + "Cis300" + ] + } + }, + "/employers/{employerId}/rti/cis300/{taxYear}/{id}/submit": { + "post": { + "description": "Submits an existing Cis300 to HMRC.", + "operationId": "SubmitCis300", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "nationalInsuranceNumber": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "employmentStartDate": { - "type": "string", - "description": "[readonly]", - "format": "date" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "maritalStatus": { - "$ref": "#/components/schemas/MaritalStatus" + { + "description": "If the CIS300 has already been accepted then you will need to set this to true to force it to be resubmitted", + "in": "query", + "name": "force", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cis300" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "PapdisEmployeeName": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "[readonly]", - "nullable": true + "summary": "Submit Cis300", + "tags": [ + "Cis300" + ] + } + }, + "/employers/{employerId}/rti/cis300/{taxYear}/{id}/xml/request": { + "get": { + "description": "Returns the XML request that was or will be sent to HMRC for this RTI document.\r\nAlthough the value is XML, it is returned as a JSON string.", + "operationId": "GetXmlRequestCis300", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "forename1": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "forename2": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "Success" + } + }, + "summary": "Get XML Request", + "tags": [ + "Cis300" + ] + } + }, + "/employers/{employerId}/rti/eps/requiringattention": { + "get": { + "description": "Returns all Employer Payment Summaries that have a Submission Status of NotSubmitted or ErrorResponse", + "operationId": "RequiringAttentionEps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "EPS Requiring Attention", + "tags": [ + "Eps" + ] + } + }, + "/employers/{employerId}/rti/eps/{taxYear}": { + "get": { + "description": "Returns all Employment Payment Summaries for the given tax year.\r\nIf the 'Linked EPS' is enabled by the employer, Employment Payment Summaries\r\nfor employer as well as for any linked employers with 'Linked EPS' enabled\r\nand with the same PAYE scheme are returned.", + "operationId": "ListEps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "surname": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "List EPS", + "tags": [ + "Eps" + ] }, - "PapdisEmployeePay": { - "type": "object", - "properties": { - "pensionableEarningsAmount": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "totalGrossQualifyingEarningsAmount": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "annualSalary": { - "type": "number", - "description": "[readonly]", - "format": "double" + "post": { + "description": "Creates a new Employer Payment Summary", + "operationId": "CreateEps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "annualPensionableEarningsAmount": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } + } + }, + "description": "Created" + } + }, + "summary": "Create EPS", + "tags": [ + "Eps" + ] + } + }, + "/employers/{employerId}/rti/eps/{taxYear}/{id}": { + "delete": { + "description": "Deletes the Eps.", + "operationId": "DeleteEps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "basis": { - "$ref": "#/components/schemas/PayBasis" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "payAmountMultiplier": { - "type": "number", - "description": "[readonly]", - "format": "double", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" } }, - "additionalProperties": false + "summary": "Delete Eps", + "tags": [ + "Eps" + ] }, - "PapdisEmployer": { - "type": "object", - "properties": { - "pensionRule": { - "$ref": "#/components/schemas/PensionRule" - }, - "employerId": { - "type": "string", - "description": "[readonly] Taken from the papdisEmployerId property of the PensionProvider", - "nullable": true - }, - "group": { - "type": "string", - "description": "[readonly] Taken from the papdisGroup property of the WorkerGroup", - "nullable": true - }, - "subGroup": { - "type": "string", - "description": "[readonly] Taken from the papdisSubGroup property of the WorkerGroup", - "nullable": true - }, - "payrollPeriod": { - "$ref": "#/components/schemas/PapdisPayrollPeriod" - }, - "stagingDate": { - "type": "string", - "description": "[readonly]", - "format": "date" - }, - "cyclicalReenrolmentDate": { - "type": "string", - "description": "[readonly]", - "format": "date", - "nullable": true - }, - "name": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "postalAddress": { - "$ref": "#/components/schemas/PapdisEmployerContactPostalAddress" - }, - "fullTimeContractedHours": { - "type": "number", - "description": "[readonly]", - "format": "double", - "nullable": true - }, - "fullTimeContractedWeeks": { - "type": "number", - "description": "[readonly]", - "format": "double", - "nullable": true + "get": { + "description": "Retrieves the Employer Payment Summary specified", + "operationId": "GetEps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "contractedWeeks": { - "type": "number", - "description": "[readonly]", - "format": "double", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "id": { - "type": "integer", - "description": "[readonly]", - "format": "int32" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get EPS", + "tags": [ + "Eps" + ] }, - "PapdisEmployerContactPostalAddress": { - "type": "object", - "properties": { - "address1": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "address2": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "address3": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "address4": { - "type": "string", - "description": "[readonly]", - "nullable": true + "put": { + "description": "Updates an existing Employment Payment Summary.", + "operationId": "UpdateEps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "postcode": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "country": { - "type": "string", - "description": "[readonly]", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "PapdisMessageFunctionCode": { - "enum": [ - "Enrol", - "InfoOnly", - "AssessmentRequest", - "AssessmentResponse", - "WokerInstruction" ], - "type": "string" - }, - "PapdisPayrollPeriod": { - "type": "object", - "properties": { - "payPeriodStartDate": { - "type": "string", - "description": "[readonly]", - "format": "date" - }, - "payPeriodEndDate": { - "type": "string", - "description": "[readonly]", - "format": "date" - }, - "contributionDeductionDate": { - "type": "string", - "description": "[readonly]", - "format": "date" - }, - "frequencyCode": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "taxPeriod": { - "type": "integer", - "description": "[readonly]", - "format": "int32" - }, - "payReferenceStartDate": { - "type": "string", - "description": "[readonly]", - "format": "date" - }, - "payReferenceEndDate": { - "type": "string", - "description": "[readonly]", - "format": "date" - }, - "employees": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PapdisEmployee" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } }, - "description": "[readonly] Employees and contributions made in this period", - "nullable": true + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } + } } }, - "additionalProperties": false - }, - "PapdisPensionProvider": { - "type": "object", - "properties": { - "pensionProviderId": { - "type": "string", - "description": "[readonly] Taken from the papdisProviderId property of the PensionProvider", - "nullable": true - }, - "employers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PapdisEmployer" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } + } }, - "nullable": true - }, - "accountNo": { - "type": "string", - "description": "[readonly]", - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "PapdisVersion": { - "enum": [ - "PAP10", - "PAP11" - ], - "type": "string" - }, - "PartnerDetails": { - "type": "object", - "properties": { - "firstName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "initials": { - "maxLength": 30, - "type": "string", - "nullable": true + "summary": "Update EPS", + "tags": [ + "Eps" + ] + } + }, + "/employers/{employerId}/rti/eps/{taxYear}/{id}/markasaccepted": { + "post": { + "description": "Marks an Employer Payment Summary as having been sent to HMRC and accepted by them.\r\nYou would only use this method if the EPS had been submitted via an external system.\r\nIt will automatically be updated as Sent and/or Accepted if it's submitted via this API.", + "operationId": "MarkAsAcceptedEps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "lastName": { - "maxLength": 35, - "type": "string", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "niNumber": { - "maxLength": 15, - "type": "string", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "PayBasis": { - "enum": [ - "Hourly", - "Daily", - "Monthly" - ], - "type": "string" - }, - "PayCode": { - "required": [ - "code", - "title" ], - "type": "object", - "properties": { - "title": { - "maxLength": 100, - "minLength": 1, - "type": "string" - }, - "code": { - "maxLength": 20, - "minLength": 1, - "type": "string" - }, - "defaultValue": { - "type": "number", - "description": "If a non-zero value is provided then when this code is selected in our UI the value will be automatically filled.", - "format": "double", - "nullable": true - }, - "isDeduction": { - "type": "boolean", - "description": "If set to true then a PayLine using this code will be treated as a deduction as opposed to an addition." - }, - "isNiable": { - "type": "boolean", - "description": "Determines whether or not the value of PayLines using this code should be taken into consideration when calculating National Insurance Contributions." - }, - "isTaxable": { - "type": "boolean", - "description": "Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the PAYE liability." - }, - "isPensionable": { - "type": "boolean", - "description": "Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the total pensionable pay." - }, - "isAttachable": { - "type": "boolean", - "description": "Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the attachable pay for AttachmentOrders." - }, - "isRealTimeClass1aNiable": { - "type": "boolean", - "description": "Determines whether or not the value of PayLines using this code are subject to real time Class 1A NIC." - }, - "isNotContributingToHolidayPay": { - "type": "boolean", - "description": "If true then any payments made using this code will not contribute towards holiday pay calculations." - }, - "isQualifyingEarningsForAe": { - "type": "boolean", - "description": "If true then any payments made using this code will be used as the basis for calculating QualifyingEarnings for AutoEnrolment assessments.\r\nIf it is set to null then when it's next retrieved it'll have the same value as PensionablePay", - "nullable": true - }, - "isNotTierable": { - "type": "boolean", - "description": "If true then any payments made using this code will not be included when calculating the tier an employee should be on for a Tiered Pension." - }, - "isTcp_Tcls": { - "type": "boolean", - "description": "If true then any payments made using this code will be reported as\r\na Trivial Commutation Payment (A - TCLS)" - }, - "isTcp_Pp": { - "type": "boolean", - "description": "If true then any payments made using this code will be reported as\r\na Trivial Commutation Payment (B - Personal Pension)" - }, - "isTcp_Op": { - "type": "boolean", - "description": "If true then any payments made using this code will be reported as\r\na Trivial Commutation Payment (C - Occupational Pension)" - }, - "flexibleDrawdown": { - "$ref": "#/components/schemas/FlexibleDrawdown" - }, - "isAutoAdjust": { - "type": "boolean", - "description": "Can be used to inform a User to what default value to set for PayLine.autoAdjustForLeave for new lines created." - }, - "calculationType": { - "$ref": "#/components/schemas/PayCodeCalculationType" - }, - "multiplierType": { - "$ref": "#/components/schemas/PayCodeMultiplierType" - }, - "dailyRateMultiplier": { - "type": "number", - "description": "If the MultiplierType is MultipleOfDailyRate then this sets the multiple to be used, ie 1.5", - "format": "double" - }, - "hourlyRateMultiplier": { - "type": "number", - "description": "If the MultiplierType is MultipleOfHourlyRate then this sets the multiple to be used, ie 1.5", - "format": "double" - }, - "isSystemCode": { - "type": "boolean", - "description": "[readonly] System Codes cannot be deleted or edited" - }, - "isControlCode": { - "type": "boolean", - "description": "[readonly] Control Codes cannot be deleted or edited nor can PayLines be assigned to them." - }, - "isNotional": { - "type": "boolean", - "description": "Determines whether the transaction involves non-monetary benefits for payroll processing, potentially subject to tax and National Insurance." + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } + } + }, + "description": "Success" + } + }, + "summary": "Mark as Sent", + "tags": [ + "Eps" + ] + } + }, + "/employers/{employerId}/rti/eps/{taxYear}/{id}/submit": { + "post": { + "description": "Submits an existing Employment Payment Summary to HMRC.", + "operationId": "SubmitEps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isStandAloneLumpSum": { - "type": "boolean", - "description": "If true then any payments made using this code will be reported as\r\na Lump Sums (A - SALS)" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "isPensionExcessLumpSum": { - "type": "boolean", - "description": "If true then any payments made using this code will be reported as\r\na Lump Sums (B - PCELS)" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payee": { - "type": "string", - "description": "The Id of the Payee, if any, that deductions are to be paid to.", - "format": "uuid", - "nullable": true + { + "description": "If the EPS has already been accepted then you will need to set this to true to force it to be resubmitted", + "in": "query", + "name": "force", + "schema": { + "default": false, + "type": "boolean" + } } - }, - "additionalProperties": false, - "description": "Each PayLine has a Code. The Code will match the Code property of a PayCode.\r\nThe PayCode that is used determines how the amount is treated with regards to tax, NI and pensions" - }, - "PayCodeCalculationType": { - "enum": [ - "FixedAmount", - "PercentageOfGross", - "PercentageOfNet", - "MultipleOfHourlyRate", - "MultipleOfDailyRate", - "FixedAnnualAmount" ], - "type": "string" - }, - "PayCodeMultiplierType": { - "enum": [ - "None", - "Hours", - "Days" - ], - "type": "string" - }, - "PayCodeSet": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "maxLength": 100, - "minLength": 1, - "type": "string", - "description": "The name of this PayCodeSet" - }, - "payCodes": { - "type": "array", - "items": { - "type": "string" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } + } }, - "description": "The Code of any PayCodes included in this PayCodeSet", - "nullable": true - }, - "useForMcr": { - "type": "boolean" + "description": "Success" + } + }, + "summary": "Submit EPS", + "tags": [ + "Eps" + ] + } + }, + "/employers/{employerId}/rti/eps/{taxYear}/{id}/xml/request": { + "get": { + "description": "Returns the XML request that was or will be sent to HMRC for this RTI document.\r\nAlthough the value is XML, it is returned as a JSON string.", + "operationId": "GetXmlRequestEps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "mcrPayCategory": { - "$ref": "#/components/schemas/McrPayCategory" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "useForLgps": { - "type": "boolean", - "description": "Flag indicating if this PayCodeSet will be used for LGPS pay categorisation" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "Success" + } + }, + "summary": "Get XML Request", + "tags": [ + "Eps" + ] + } + }, + "/employers/{employerId}/rti/eps/{taxYear}/{taxMonth}/apprenticeshipLevytodate": { + "get": { + "description": "Get all Apprenticeship Levy (SMP, etc) for a given tax year, up to the given tax month, and if the 'Linked EPS'\r\nis enabled by the employer, apprenticeship levy as well as the apprenticeship levy for any employers with 'Linked EPS' enabled and with the same PAYE scheme\r\nis returned as a sum.", + "operationId": "ApprenticeshipLevyEps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "lgpsPayCategory": { - "$ref": "#/components/schemas/LgpsPayCategory" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "in": "path", + "name": "taxMonth", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EpsApprenticeshipLevy" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "A PayCodeSet is used to group together a number of PayCodes." - }, - "PayCodeVarianceLine": { - "type": "object", - "properties": { - "code": { - "type": "string", - "nullable": true + "summary": "Apprenticeship Levy", + "tags": [ + "Eps" + ] + } + }, + "/employers/{employerId}/rti/eps/{taxYear}/{taxMonth}/recoverableamounts": { + "get": { + "description": "Get all recoverable amounts (SMP, etc) for a given tax year, up to the given tax month, and if the 'Linked EPS'\r\nis enabled by the employer, recoverable amounts as well as the recoverable amounts for any employers with 'Linked EPS' enabled and with the same PAYE scheme\r\nis returned as a sum.", + "operationId": "RecoverableAmountsEps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "primaryValue": { - "type": "number", - "format": "double", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "secondaryValue": { - "type": "number", - "format": "double", - "nullable": true + { + "in": "path", + "name": "taxMonth", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecoverableAmounts" + } + } + }, + "description": "Success" + } + }, + "summary": "Recoverable Amounts", + "tags": [ + "Eps" + ] + } + }, + "/employers/{employerId}/rti/exb/requiringattention": { + "get": { + "description": "Returns all Expenses And Benefits submissions that have a Submission Status of NotSubmitted or ErrorResponse", + "operationId": "RequiringAttentionExb", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "PayElementReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayElementReportLine" - }, - "nullable": true - }, - "payCodeTotals": { - "type": "object", - "additionalProperties": { - "type": "number", - "format": "double", - "nullable": true + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true, - "readOnly": true - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "periodTo": { - "type": "integer", - "format": "int32" - }, - "startPeriodName": { - "type": "string", - "nullable": true - }, - "endPeriodName": { - "type": "string", - "nullable": true - }, - "startDate": { - "type": "string", - "format": "date" - }, - "endDate": { - "type": "string", - "format": "date" - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true - }, - "isDraft": { - "type": "boolean" + "description": "Success" } }, - "additionalProperties": false - }, - "PayElementReportLine": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" - }, - "payrollCode": { - "type": "string", - "nullable": true - }, - "niNumber": { - "type": "string", - "nullable": true + "summary": "EXB Requiring Attention", + "tags": [ + "Exb" + ] + } + }, + "/employers/{employerId}/rti/exb/{taxYear}": { + "get": { + "description": "Returns all ExpensesAndBenefits for the given tax year.", + "operationId": "ListExb", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payElements": { - "type": "object", - "additionalProperties": { - "type": "number", - "format": "double", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true - }, - "hasPay": { - "type": "boolean", - "readOnly": true - }, - "totalPay": { - "type": "number", - "format": "double", - "readOnly": true + "description": "Success" } }, - "additionalProperties": false + "summary": "List EXB", + "tags": [ + "Exb" + ] }, - "PayElementReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "post": { + "description": "Creates a new Expenses And Benefits submission", + "operationId": "CreateExb", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/PayElementReport" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Exb" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Exb" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Exb" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Exb" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "PayGradesReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AveragePayGradesReportLine" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eps" + } + } }, - "nullable": true - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true - }, - "isDraft": { - "type": "boolean" + "description": "Created" } }, - "additionalProperties": false - }, - "PayGradesReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/PayGradesReport" + "summary": "Create EXB", + "tags": [ + "Exb" + ] + } + }, + "/employers/{employerId}/rti/exb/{taxYear}/values": { + "get": { + "description": "Returns an empty Exb showing the number of employees and total benefits for the year provided", + "operationId": "AnnualValuesExb", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Exb" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "PayLine": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used).\r\nIf the PayCode has a CalculationType other than FixedAmount then this field will be a percentage.\r\nIf the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated.", - "format": "double" - }, - "rate": { - "type": "number", - "description": "If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used", - "format": "double", - "nullable": true - }, - "multiplier": { - "type": "number", - "description": "If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours", - "format": "double", - "nullable": true - }, - "description": { - "maxLength": 100, - "type": "string", - "description": "A free form description to accompany this line. It will be displayed on the payslip.", - "nullable": true - }, - "attachmentOrderId": { - "type": "string", - "description": "[readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO", - "format": "uuid", - "nullable": true - }, - "pensionId": { - "type": "string", - "description": "[readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS", - "format": "uuid", - "nullable": true - }, - "leaveId": { - "type": "string", - "description": "[readonly] The Id of the associated Leave. Only included if the PayLine is a result of a Leave with Statutory pay", - "format": "uuid", - "nullable": true - }, - "loanId": { - "type": "string", - "description": "[readonly] The Id of the associated Loan, if any.", - "format": "uuid", - "nullable": true - }, - "leaveStatutoryDaysPaid": { - "type": "number", - "description": "[readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many days they've been paid for (based on their Working Pattern).", - "format": "double", - "nullable": true - }, - "leaveStatutoryWeeksPaid": { - "type": "number", - "description": "[readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many weeks they've been paid for (based on their Working Pattern).", - "format": "double", - "nullable": true - }, - "code": { - "type": "string", - "description": "The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition.", - "nullable": true - }, - "tags": { - "type": "array", - "items": { + "summary": "Annual Values", + "tags": [ + "Exb" + ] + } + }, + "/employers/{employerId}/rti/exb/{taxYear}/{id}": { + "delete": { + "description": "Deletes the EXB.", + "operationId": "DeleteExb", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", "type": "string" - }, - "nullable": true - }, - "childId": { - "type": "string", - "description": "This is nothing but the UniqueId of the model.", - "format": "uuid" - }, - "isNetToGross": { - "type": "boolean", - "description": "If the PayLine is a fixed amount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target." - }, - "targetNetToGrossValue": { - "type": "number", - "description": "The original net fixed addition amount that is considered to be a take home pay target.", - "format": "double", - "nullable": true - }, - "netToGrossDiscrepancy": { - "type": "number", - "description": "The discrepancy between the targeted and the calculated grossed up value during a net to gross calculation.", - "format": "double", - "nullable": true - }, - "effectiveFrom": { - "type": "string", - "description": "The date the pay line starts being calculated in payrun", - "format": "date", - "nullable": true - }, - "effectiveTo": { - "type": "string", - "description": "The date the pay line stops being calculated in payrun", - "format": "date", - "nullable": true - }, - "department": { - "type": "string", - "nullable": true - }, - "departmentTitle": { - "type": "string", - "nullable": true - }, - "costCentre": { - "type": "string", - "nullable": true - }, - "costCentreTitle": { - "type": "string", - "nullable": true - }, - "departmentId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "costCentreId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "isAutoGeneratedBasicPayLine": { - "type": "boolean" - }, - "percentageOfEffectiveDays": { - "type": "number", - "description": "The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun", - "format": "double", - "nullable": true - }, - "totalWorkingDays": { - "type": "number", - "format": "double", - "nullable": true - }, - "isAutomaticBackPay": { - "type": "boolean", - "description": "Automatically calculate back pay and add or modify the necessary pay lines for this addition/deduction when a pay run is created.\r\nApplicable only to employee level addition/deduction pay lines.\r\nIf set to false then you must manually handle the calculation and adding of back pay lines." - }, - "ignoreInitialBackPay": { - "type": "boolean", - "description": "Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology.\r\nIf set to false, the automatic backpay calculation will be performed on the first pay run." - }, - "initialBackPayPublicPayRunId": { - "type": "string", - "description": "Used to mark the first payrun where this payline has been payrolled for backpay", - "format": "uuid", - "nullable": true - }, - "autoAdjustForLeave": { - "type": "boolean", - "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun" - }, - "contributesToBasicPay": { - "type": "boolean", - "description": "Indicates whether this pay line contributes to the basic pay of the employee.\r\nWill be set to true by default when IsAutoGeneratedBasicPayLine is true." - }, - "calculateAsWhenPaid": { - "type": "boolean", - "description": "Indicates whether this pay line should be treated as When Paid rather than When Earned" - }, - "totalPaidDays": { - "type": "number", - "format": "double", - "nullable": true - }, - "roleId": { - "type": "string", - "description": "The employee role which is associated with this pay line.\r\nIf set to null, the pay line is not related with a role.", - "format": "uuid", - "nullable": true - }, - "employeeRoleReference": { - "type": "string", - "nullable": true - }, - "earnedFrom": { - "type": "string", - "description": "Nullable DateTime property \"EarnedFrom\" in the PayLine model to store the start date of the PayLine's 'earned' period in a PayRun.", - "format": "date", - "nullable": true - }, - "earnedTo": { - "type": "string", - "description": "Nullable DateTime property \"EarnedTo\" in the PayLine model to store the end date of the PayLine's 'earned' period in a PayRun.", - "format": "date", - "nullable": true - }, - "periodFrom": { - "type": "string", - "description": "Nullable DateTime property \"PeriodFrom\" in the PayLine model to store the start date of the PayRun period the current PayLine is part of.", - "format": "date", - "nullable": true - }, - "periodTo": { - "type": "string", - "description": "Nullable DateTime property \"PeriodTo\" in the PayLine model to store the end date of the PayRun period the current PayLine is part of.", - "format": "date", - "nullable": true - }, - "annualValue": { - "type": "number", - "description": "The original value from the PayLine before we modify it\r\nCurrently only used when CalculationType is set to FixedAnnualAmount\r\nso we can determine whether the pay line value needs calculating or not\r\nTo recalculate set to null with annual amount recorded in Value", - "format": "double", - "nullable": true - }, - "parentId": { - "type": "string", - "description": "[readonly] The Id of the associated employee level pay line, if the current line is a back pay line.", - "format": "uuid", - "nullable": true - }, - "isAutoCalculatedBackPayLine": { - "type": "boolean", - "readOnly": true - }, - "isZeroHoursTeachersBackPayLine": { - "type": "boolean", - "description": "[readonly] Indicates whether this pay line is a backdated pay claim line\r\nbelonging to a zero hours contract teacher." - }, - "analysisCategoriesCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AnalysisCategoryCodes" - }, - "description": "List of analysis Category Codes", - "nullable": true - }, - "analysisCategoryCodeIds": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "description": "List of analysis Category Codes uniqueId", - "nullable": true - }, - "paySpineId": { - "type": "string", - "description": "[readonly] The Id of the associated pay spine.", - "format": "uuid", - "nullable": true - }, - "paySpineGradeId": { - "type": "string", - "description": "[readonly] The Id of the associated pay spine grade.", - "format": "uuid", - "nullable": true - }, - "spinalPointId": { - "type": "string", - "description": "[readonly] The Id of the associated spinal point.", - "format": "uuid", - "nullable": true - }, - "londonAllowanceId": { - "type": "integer", - "description": "Used to set London allowance id for payline", - "format": "int32", - "nullable": true - }, - "fullTimeAnnualValue": { - "type": "number", - "description": "Used to set Full Time Annual Value for payline", - "format": "double" - }, - "paySpine": { - "type": "string", - "description": "PaySpine name based on PaySpineId", - "nullable": true + } }, - "payGrade": { - "type": "string", - "description": "PayGrade name based on PayGradeId", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "spinePoint": { - "type": "string", - "description": "SpinePoint name based on SpinePointId", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "As well as the basic pay amount for an employee there are often additions and deductions such as bonuses.\r\nThese additions and deductions are represented using this model." - }, - "PayMethod": { - "enum": [ - "Cash", - "Cheque", - "Credit", - "DirectDebit" ], - "type": "string" + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Delete EXB", + "tags": [ + "Exb" + ] }, - "PayOptions": { - "type": "object", - "properties": { - "period": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "description": "Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod.", - "format": "int32" - }, - "method": { - "$ref": "#/components/schemas/PayMethod" + "get": { + "description": "Retrieves the Expenses And Benefits submission specified", + "operationId": "GetExb", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "withholdTaxRefundIfPayIsZero": { - "type": "boolean", - "description": "If you don't want negative PAYE values when the Gross pay is zero, set this to true" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "taxAndNi": { - "$ref": "#/components/schemas/TaxAndNi" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Exb" + } + } + }, + "description": "Success" + } + }, + "summary": "Get EXB", + "tags": [ + "Exb" + ] + }, + "put": { + "description": "Updates an existing Expenses And Benefits submission.", + "operationId": "UpdateExb", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "fpsFields": { - "$ref": "#/components/schemas/FpsFields" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "tags": { - "type": "array", - "items": { + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Exb" + } }, - "nullable": true - }, - "basis": { - "$ref": "#/components/schemas/PayBasis" + "application/json": { + "schema": { + "$ref": "#/components/schemas/Exb" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Exb" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Exb" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Exb" + } + } + }, + "description": "Success" + } + }, + "summary": "Update EXB", + "tags": [ + "Exb" + ] + } + }, + "/employers/{employerId}/rti/exb/{taxYear}/{id}/markasaccepted": { + "post": { + "description": "Marks an Expenses And Benefits submission as having been sent to HMRC and accepted by them.\r\nYou would only use this method if the EXB had been submitted via an external system.\r\nIt will automatically be updated as Sent and/or Accepted if it's submitted via this API.", + "operationId": "MarkAsAcceptedExb", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "nationalMinimumWage": { - "type": "boolean" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "payCode": { - "type": "string", - "description": "If you want the Employees pay to be allocated to a code other than BASIC, specify it here", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Exb" + } + } + }, + "description": "Success" + } + }, + "summary": "Mark as Sent", + "tags": [ + "Exb" + ] + } + }, + "/employers/{employerId}/rti/exb/{taxYear}/{id}/submit": { + "post": { + "description": "Submits an existing Expenses And Benefits submission to HMRC.", + "operationId": "SubmitExb", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "mileageVehicleType": { - "$ref": "#/components/schemas/MileageVehicleType" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "mapsMiles": { - "type": "integer", - "description": "The number of miles to pay for as Mileage Allowance Payments", - "format": "int32", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payAmount": { - "type": "number", - "description": "The amount the Employee is regularly paid each period", - "format": "double" + { + "description": "If the EXB has already been accepted then you will need to set this to true to force it to be resubmitted", + "in": "query", + "name": "force", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Exb" + } + } + }, + "description": "Success" + } + }, + "summary": "Submit EXB", + "tags": [ + "Exb" + ] + } + }, + "/employers/{employerId}/rti/exb/{taxYear}/{id}/xml/request": { + "get": { + "description": "Returns the XML request that was or will be sent to HMRC for this RTI document.\r\nAlthough the value is XML, it is returned as a JSON string.", + "operationId": "GetXmlRequestExb", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payAmountMultiplier": { - "type": "number", - "description": "This property is irrelevant if the basis is Monthly.\r\nBut if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period.", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "baseHourlyRate": { - "type": "number", - "description": "This property is used to calculate values for PayCodes that are set as multiples of \r\nthe employees base hourly rate. Eg Overtime.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", - "format": "double" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "Success" + } + }, + "summary": "Get XML Request", + "tags": [ + "Exb" + ] + } + }, + "/employers/{employerId}/rti/fps/multiple/{taxYear}": { + "post": { + "description": "Creates a new Full Payment Submission. This is limited to corrections, to a previous year, for multiple employees.", + "operationId": "CreateFpsWithMultipleEmployeesFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "baseDailyRate": { - "type": "number", - "description": "This property is used to calculate values for PayCodes that are set as multiples of \r\nthe employees base daily rate. Eg sick.\r\nIf this is set as zero then we'll attempt to calculate a value based on the other fields", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + } + }, + "description": "Created" + } + }, + "summary": "Create FPS with multiple employees", + "tags": [ + "Fps" + ] + } + }, + "/employers/{employerId}/rti/fps/multiple/{taxYear}/{id}": { + "put": { + "description": "Updates an existing Full Payment Submission with multiple employees.", + "operationId": "UpdateFpsWithMultipleEmployeesFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "basicPay": { - "type": "number", - "description": "The amount of basic pay the Employee is regularly paid each period\r\nThis amount is the combined total of all pay elements that contribute to basic pay", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "autoAdjustForLeave": { - "type": "boolean", - "description": "This sets whether the PayLine should be automatically adjusted or not for:\r\nLeave Entries;\r\nStarters/Leavers;\r\nPayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + } + }, + "description": "Success" + } + }, + "summary": "Update FPS with multiple employees", + "tags": [ + "Fps" + ] + } + }, + "/employers/{employerId}/rti/fps/requiringattention": { + "get": { + "description": "Returns all Full Payment Submissions that have a Submission Status of NotSubmitted or ErrorResponse", + "operationId": "RequiringAttentionFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "FPS Requiring Attention", + "tags": [ + "Fps" + ] + } + }, + "/employers/{employerId}/rti/fps/{taxYear}": { + "get": { + "description": "Returns all Full Payment Submissions for the given tax year.", + "operationId": "ListFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "niTable": { - "type": "string" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List FPS", + "tags": [ + "Fps" + ] + }, + "post": { + "description": "Creates a new Full Payment Submission. This is limited to corrections, to a previous year, for a single employee.", + "operationId": "CreateFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "regularPayLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayLine" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } }, - "description": "These are used to make additions/deductions to the pay for this Employee.\r\nYou do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created.", - "nullable": true - }, - "excludedRegularPayLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayLine" + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } }, - "description": "These used to store the PayLines that have been excluded from RegularPaylines.", - "nullable": true + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + } } }, - "additionalProperties": false, - "description": "This object forms the basis of the Employees payment." - }, - "PayOptionsImport": { - "type": "object", - "properties": { - "employerIdentifier": { - "type": "string", - "description": "Optional. But if one entry has it then all must.\r\nAllows you to import to multiple employers by specifying the Employers AlternativeIdentifier", - "nullable": true - }, - "payrollCode": { - "type": "string", - "description": "The payroll code of the employee to update", - "nullable": true - }, - "payAmount": { - "type": "number", - "description": "The amount the Employee is regularly paid each period", - "format": "double" - }, - "basis": { - "$ref": "#/components/schemas/PayBasis" - }, - "payCode": { - "type": "string", - "description": "If you want to override the PayCode used for the Basic Pay then set the code here, otherwise leave this blank and the default will be used.", - "nullable": true - }, - "roleReference": { - "type": "string", - "description": "This is the unique reference of the Role that the employee is assigned to.", - "nullable": true - }, - "payAmountMultiplier": { - "type": "number", - "description": "This property is irrelevant if the basis is Monthly.\r\nBut if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period.", - "format": "double" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + } + }, + "description": "Created" + } + }, + "summary": "Create FPS", + "tags": [ + "Fps" + ] + } + }, + "/employers/{employerId}/rti/fps/{taxYear}/employee/{employeeId}": { + "get": { + "description": "Returns all the Full Payment Submission that includes the specified employee", + "operationId": "GetFpsesForEmployeeFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "note": { - "type": "string", - "description": "Any note that you'd like to appear on the payslip", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "tags": { - "type": "array", - "items": { + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Fps" + }, + "type": "array" + } + } }, - "nullable": true - }, - "isNetToGross": { - "type": "boolean" + "description": "Success" }, - "department": { - "type": "string", - "description": "Any Department that you'd like to appear on the payslip", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Get all FPS for Employee", + "tags": [ + "Fps" + ] + } + }, + "/employers/{employerId}/rti/fps/{taxYear}/mostrecentforemployee/{employeeId}": { + "get": { + "description": "Returns the most recent Full Payment Submission that includes the specified employee", + "operationId": "MostRecentForEmployeeFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "costCentre": { - "type": "string", - "description": "Any CostCentre that you'd like to appear on the payslip", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "analysisCategoryCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AnalysisCategoryCodes" - }, - "description": "List of Analysis Category Codes associated with this item on the payslip.", - "nullable": true + { + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayLine" + { + "description": "Only search for FPS's submitted as a correction to a previous year", + "in": "query", + "name": "correction", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Item" + } + } }, - "nullable": true - }, - "effectiveFrom": { - "type": "string", - "description": "EffectiveFrom date for imported pay lines", - "format": "date", - "nullable": true - }, - "effectiveTo": { - "type": "string", - "description": "EffectiveTo date for imported pay lines", - "format": "date", - "nullable": true - }, - "isAutomaticBackPay": { - "type": "boolean", - "description": "IsAutomaticBackPay for imported pay lines" + "description": "Success" }, - "ignoreInitialBackPay": { - "type": "boolean", - "description": "IgnoreInitialBackPay for imported pay lines" + "404": { + "description": "Not Found" + } + }, + "summary": "Get most recent FPS for Employee", + "tags": [ + "Fps" + ] + } + }, + "/employers/{employerId}/rti/fps/{taxYear}/mostrecentforemployees": { + "post": { + "description": "Returns the most recent Full Payment Submission that includes the specified employees", + "operationId": "MostRecentForEmployeesFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "contributesToBasicPay": { - "type": "boolean", - "description": "ContributesToBasicPay for imported pay lines" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "autoAdjustForLeave": { - "type": "boolean", - "description": "AutoAdjustForLeave for imported pay lines" + { + "description": "Only search for FPS's submitted as a correction to a previous year", + "in": "query", + "name": "correction", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Fps" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "paySpine": { - "type": "string", - "description": "PaySpine for imported pay lines", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Get most recent FPS for Employees", + "tags": [ + "Fps" + ] + } + }, + "/employers/{employerId}/rti/fps/{taxYear}/{id}": { + "delete": { + "description": "Not implemented, FPSes cannot be deleted", + "operationId": "DeleteFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payGrade": { - "type": "string", - "description": "PayGrade for imported pay lines", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "spinePoint": { - "type": "string", - "description": "SpinePoint for imported pay lines", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "This object is used to import payment information for a payrun entry" - }, - "PayPeriodEventType": { - "enum": [ - "SubmitForProcessing", - "SendForApproval", - "Approval", - "Finalise", - "SendPaySlip", - "SubmitRti" - ], - "type": "string", - "description": "Different events supported for a PaySchedule Period. These events happen a pre-configured number of days before the PaymentDate for that PaySchedulePeriod." - }, - "PayPeriodTypes": { - "enum": [ - "Custom", - "Monthly", - "FourWeekly", - "Fortnightly", - "Weekly", - "Daily" ], - "type": "string" - }, - "PayPeriods": { - "enum": [ - "Custom", - "Monthly", - "FourWeekly", - "Fortnightly", - "Weekly", - "Daily" - ], - "type": "string" + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Delete FPS", + "tags": [ + "Fps" + ] }, - "PayRun": { - "type": "object", - "properties": { - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "taxMonth": { - "type": "integer", - "description": "[readonly] The Tax Month that the Payment Date falls in", - "format": "int32" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "description": "[readonly] Indicates whether this uses first, second, third (etc.) PaySchedule for this PayPeriod.", - "format": "int32" - }, - "period": { - "type": "integer", - "description": "[readonly] The period (i.e, Tax Week or Tax Month) that this PayRun is for.", - "format": "int32" - }, - "startDate": { - "type": "string", - "description": "[readonly] The start date of the period this PayRun covers", - "format": "date" - }, - "endDate": { - "type": "string", - "description": "[readonly] The end date of the period this PayRun covers", - "format": "date" - }, - "paymentDate": { - "type": "string", - "description": "[readonly] The intended date that Employees will be paid, although this can be changed on a per PayRunEntry basis", - "format": "date" - }, - "employeeCount": { - "type": "integer", - "description": "[readonly] The number of Employees included in this PayRun (including any CIS Subcontractors)", - "format": "int32" - }, - "subContractorCount": { - "type": "integer", - "description": "[readonly] The number of CIS Subcontractors included in this PayRun", - "format": "int32" - }, - "nonRtiEmployeeCount": { - "type": "integer", - "description": "[readonly] The number of employees excluded from the RTI submission in this PayRun", - "format": "int32" - }, - "totals": { - "$ref": "#/components/schemas/PayRunTotals" - }, - "payslipScheduledDateTime": { - "type": "string", - "description": "The scheduled date time for sending payslips by email.", - "format": "date", - "nullable": true - }, - "state": { - "$ref": "#/components/schemas/PayRunState" - }, - "isClosed": { - "type": "boolean", - "description": "[readonly] Set to True if the PayRun is Finalised and changes can no longer be made", - "readOnly": true + "get": { + "description": "Retrieves the Full Payment Submission specified", + "operationId": "GetFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isRolledBack": { - "type": "boolean", - "description": "[readonly] Set to True if the PayRun is currently rolled back" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "dateClosed": { - "type": "string", - "format": "date-time", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + } + }, + "description": "Success" + } + }, + "summary": "Get FPS", + "tags": [ + "Fps" + ] + }, + "put": { + "description": "Updates an existing Full Payment Submission.", + "operationId": "UpdateFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "autoPilotCloseDate": { - "type": "string", - "description": "[readonly] If AutoPilot is enabled in the AutomationSettings for the Employer then this property will tell you when\r\nthe payrun will be automatically closed", - "format": "date", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "entries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } }, - "description": "[readonly] The PayRunEntries that make up this PayRun.\r\nThis is populate automatically when you start a PayRun.", - "nullable": true + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + } } }, - "additionalProperties": false, - "description": "This model is right at the very heart of the software.\r\nThere is a PayRun for each period in which people are paid." - }, - "PayRunChanges": { - "type": "object", - "properties": { - "payRunEntries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + } }, - "description": "A list of PayRunEntries where the PayRunEntry itself has been modified and.or the related Employee record was changed", - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "PayRunCsvType": { - "enum": [ - "Summary", - "Lines", - "PayrollCodeAndNameOnly", - "ColumnCsvMapping" - ], - "type": "string" - }, - "PayRunEntry": { - "type": "object", - "properties": { - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "taxMonth": { - "type": "integer", - "description": "[readonly] The Tax Month that the Payment Date falls in", - "format": "int32" - }, - "startDate": { - "type": "string", - "description": "[readonly]", - "format": "date" - }, - "endDate": { - "type": "string", - "description": "[readonly]", - "format": "date" - }, - "note": { - "maxLength": 500, - "type": "string", - "description": "Any note that you'd like to appear on the payslip", - "nullable": true - }, - "bacsSubReference": { - "type": "string", - "description": "[readonly] A randomly generated string for use with the RTI Hash Cross Reference", - "nullable": true - }, - "bacsHashCode": { - "type": "string", - "description": "[readonly] A Hash Code used for RTI BACS Hash Cross Reference", - "nullable": true - }, - "percentageOfWorkingDaysPaidAsNormal": { - "type": "number", - "description": "[readonly] If the employee is paid a set amount per period (ie, not an hourly or daily rate) and there is any Leave that is either Not Paid or Statutory Pay then this value\r\nwill give the percentage of working days (based on the Working Pattern) that should be paid as normal.\r\nIf there is no Leave in the period or PayOptions.AutoAdjustForLeave is false, then this will be 1.", - "format": "double" - }, - "workingDaysNotPaidAsNormal": { - "type": "number", - "description": "[readonly] If PercentageOfWorkingDaysPaidAsNormal has a value other than 1\r\nthen this property will tell you how many working days have been deducted from the basic pay\r\ndue to either being Not Paid or Statutory Pay", - "format": "double" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "description": "[readonly] Indicates whether this uses the first, second, third (etc) PaySchedule for this PayPeriod.", - "format": "int32" - }, - "period": { - "type": "integer", - "description": "[readonly] The Tax Week or Tax Month number this PayRunEntry relates to", - "format": "int32" - }, - "isNewStarter": { - "type": "boolean", - "description": "Determines whether or not this Employee will be declared as a new starter on the resulting FPS" - }, - "unpaidAbsence": { - "type": "boolean", - "description": "[readonly] Indicates that there was unpaid absence in the pay period" - }, - "hasAttachmentOrders": { - "type": "boolean", - "description": "[readonly] Indicates that there are AttachmentOrders for this Employee in this entry" - }, - "paymentDate": { - "type": "string", - "description": "The date this payment was or will be made", - "format": "date" - }, - "priorPayrollCode": { - "type": "string", - "description": "[readonly] If the FPS needs to declare a change of PayId then this will contain the previous code\r\nIt's worked out automatically but can also be set from the Employees EmploymentDetails property.", - "nullable": true + "summary": "Update FPS", + "tags": [ + "Fps" + ] + } + }, + "/employers/{employerId}/rti/fps/{taxYear}/{id}/markasaccepted": { + "post": { + "description": "Marks an Full Payment Submission as having been sent to HMRC and accepted by them.\r\nYou only use this method if the FPS has been submitted via an external system.\r\nIt will automatically be updated as Sent and/or Accepted if it's submitted via this API.", + "operationId": "MarkAsAcceptedFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "pensionSummary": { - "$ref": "#/components/schemas/PensionSummary" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "pensionSummaries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PensionSummary" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + } }, - "description": "[readonly] A summary of the details for the Pensions (if any) that the Employee is assigned to.", - "nullable": true - }, - "employee": { - "$ref": "#/components/schemas/Item" - }, - "totals": { - "$ref": "#/components/schemas/PayRunTotals" + "description": "Success" + } + }, + "summary": "Mark as Sent", + "tags": [ + "Fps" + ] + } + }, + "/employers/{employerId}/rti/fps/{taxYear}/{id}/submit": { + "post": { + "description": "Submits an existing Full Payment Submission to HMRC.", + "operationId": "SubmitFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "periodOverrides": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValueOverride" - }, - "description": "Any calculated values for this period that should be overridden with a different value", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "totalsYtd": { - "$ref": "#/components/schemas/PayRunTotals" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "totalsYtdOverrides": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValueOverride" + { + "description": "If the FPS has already been accepted then you will need to set this to true to force it to be resubmitted", + "in": "query", + "name": "force", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fps" + } + } }, - "description": "Any values of TotalsYtd that should be overridden with a different value", - "nullable": true - }, - "forcedCisVatAmount": { - "type": "number", - "description": "If this employee is a CIS Subcontractor registered for VAT, we'll automatically work out VAT at the set rate.\r\nIf you want to override this calculations then set this property to anything other than null.", - "format": "double", - "nullable": true - }, - "holidayAccrued": { - "type": "number", - "description": "The amount of holiday days or hours accrued in the period.", - "format": "double" - }, - "state": { - "$ref": "#/components/schemas/PayRunState" - }, - "isClosed": { - "type": "boolean", - "description": "[readonly] Set to True if the PayRun is Finalised and changes can no longer be made to the PayRunEntries", - "readOnly": true - }, - "manualNi": { - "type": "boolean", - "description": "If set to true then you must provide your own value for NationalInsuranceCalculation.\r\nYou'd normally leave this set to false and let us automatically calculate NI amounts." - }, - "niSplit": { - "type": "boolean", - "description": "If set to true Ni calculations are done for backdated pay for each pay period separately and then summed up" - }, - "nationalInsuranceCalculation": { - "$ref": "#/components/schemas/NationalInsuranceCalculation" - }, - "payrollCodeChanged": { - "type": "boolean", - "description": "[readonly] Indicates whether or not the Payroll Code for this Employee has changed since the last FPS", - "readOnly": true - }, - "aeNotEnroledWarning": { - "type": "boolean", - "description": "[readonly] If true then this Employee needs to be on an Auto Enrolment pension but isn't yet." - }, - "fps": { - "$ref": "#/components/schemas/Item" - }, - "emailId": { - "type": "string", - "description": "If the Payslip for this PayRunEntry has been emailed to the employee then the Id for an EmployerEmail will be provided here.\r\nif the value is all zeroes then the email is in the process of being created.", - "format": "uuid", - "nullable": true - }, - "recievingOffsetPay": { - "type": "boolean", - "description": "If the pay is being topped up due to an applied Leave having the offset value set to true then\r\nthis will be set to true" - }, - "paymentAfterLeaving": { - "type": "boolean", - "description": "[readonly] If this payment is for an employee that has left then this is set to true." - }, - "umbrellaPayment": { - "$ref": "#/components/schemas/UmbrellaPayment" - }, - "isRemoved": { - "type": "boolean", - "description": "Has the entry been removed from the payrun" + "description": "Success" + } + }, + "summary": "Submit FPS", + "tags": [ + "Fps" + ] + } + }, + "/employers/{employerId}/rti/fps/{taxYear}/{id}/xml/request": { + "get": { + "description": "Returns the XML request that was or will be sent to HMRC for this RTI document.\r\nAlthough the value is XML, it is returned as a JSON string.", + "operationId": "GetXmlRequestFps", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "isRolledBack": { - "type": "boolean", - "description": "[readonly] Set to True if the Pay Run Entry is currently rolled back" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "periodsCovered": { - "type": "integer", - "description": "[readonly] The amount of periods that the Pay Run Entry covers. This can be > 1 when back pay for previous periods is paid in the current period", - "format": "int32" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employeeRolePayItems": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeRolePayItem" + { + "description": "Indicates whether the FPS XML should be in compressed format.", + "in": "query", + "name": "compressed", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } }, - "description": "[readonly] Automatically populated.\r\nArray of base hourly and daily rates for the employee roles", - "nullable": true - }, - "warnings": { - "$ref": "#/components/schemas/PayRunEntryWarningType" - }, - "niLetterError": { - "$ref": "#/components/schemas/NiLetterError" - }, - "teachersPensionAgeWarning": { - "$ref": "#/components/schemas/TeachersPensionAgeWarning" - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true - }, - "personalDetails": { - "$ref": "#/components/schemas/PersonalDetails" - }, - "employmentDetails": { - "$ref": "#/components/schemas/EmploymentDetails" - }, - "payOptions": { - "$ref": "#/components/schemas/PayOptions" + "description": "Success" } }, - "additionalProperties": false, - "description": "A PayRun contains multiple PayRunEntries, one for each Employee that is being paid.\r\nThe value for ```PersonalDetails``` and ```EmploymentDetails``` is copied from the Employee record.\r\nSo to change them you should update the Employee, not the PayRunEntry.\r\nChanges made to the Employee are only reflected whilst the PayRun is still open.\r\nOnce you finalise and close the PayRun then a snapshot is taken of these values which is stored with the PayRunEntry for future reference." - }, - "PayRunEntrySortBy": { - "enum": [ - "PayrollCode", - "FirstName", - "LastName", - "TotalCost", - "NetPay", - "GrossPay", - "TakeHomePay", - "Paye", - "EmployeeNic", - "EmployerNic", - "PaymentDate" - ], - "type": "string" - }, - "PayRunEntryWarningType": { - "enum": [ - "MissingBankDetails", - "MissingAddressLines", - "AddressInvalid", - "NinoInvalid", - "BelowNationalMinimumWage", - "HighGrossPay", - "HighNetPay", - "InReceiptOfTaxRefund", - "NetToGrossDiscrepancyAboveThreshold", - "StatutoryMaternity", - "TeachersPensionNotAutoCalculated", - "JointTeachersPensionsNotAutoCalculated", - "MissingNiNumber", - "OpenEndedAbsences", - "SspHasExpired", - "SspDueToExpire", - "InvalidBankDetails", - "DuplicateEmployee", - "TeachersPensionAge", - "TeachersPensionMcrRoleIdMissing" + "summary": "Get XML Request", + "tags": [ + "Fps" + ] + } + }, + "/employers/{employerId}/rti/nvr/requiringattention": { + "get": { + "description": "Returns all NiNo Verification Requests that have a Submission Status of NotSubmitted or ErrorResponse", + "operationId": "RequiringAttentionNvr", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "PayRunJournal": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayRunSummaryLine" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true - }, - "date": { - "type": "string", - "description": "[readonly] The PaymentDate from the PayRun", - "format": "date" - }, - "title": { - "type": "string", - "description": "[readonly] The status of the task for posting this journal to an ExternalDataProvider", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/BackgroundTaskStatus" - }, - "statusMessage": { - "type": "string", - "description": "[readonly] A message to elaborate on the Status", - "nullable": true - }, - "link": { - "type": "string", - "description": "[readonly] If available, a link to the journal in the ExternalDataProvider", - "nullable": true - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "description": "[readonly]", - "format": "int32" - }, - "period": { - "type": "integer", - "description": "[readonly]", - "format": "int32" + "description": "Success" + } + }, + "summary": "NVR Requiring Attention", + "tags": [ + "Nvr" + ] + } + }, + "/employers/{employerId}/rti/nvr/{taxYear}": { + "get": { + "description": "Returns all NiNo Verification Requests for the given tax year.", + "operationId": "ListNvr", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "mergeMatchingNominals": { - "type": "boolean", - "description": "[readonly]" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List NVR", + "tags": [ + "Nvr" + ] + }, + "post": { + "description": "Creates a new NiNo Verification Request.", + "operationId": "CreateNvr", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "csvFormat": { - "$ref": "#/components/schemas/JournalCsvFormat" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Nvr" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Nvr" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Nvr" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Nvr" + } + } } }, - "additionalProperties": false - }, - "PayRunPayment": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/PayeeType" - }, - "payee": { - "$ref": "#/components/schemas/Item" - }, - "date": { - "type": "string", - "description": "[readonly] The date the payment is to be made", - "format": "date" - }, - "method": { - "$ref": "#/components/schemas/PayMethod" - }, - "amount": { - "type": "number", - "description": "[readonly] The amount to pay", - "format": "double" - }, - "reference": { - "type": "string", - "description": "[readonly] The period the payment is for", - "nullable": true - }, - "employerPaymentReference": { - "type": "string", - "description": "The employer's payment reference, formatted as per the employer settings", - "nullable": true - }, - "bankDetails": { - "$ref": "#/components/schemas/BankDetails" - }, - "bacsHash": { - "type": "string", - "description": "[readonly] if paying by Credit and you've enabled BacsHash then this will contain the BacsHash included on the FPS", - "nullable": true + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Nvr" + } + } + }, + "description": "Created" + } + }, + "summary": "Create NVR", + "tags": [ + "Nvr" + ] + } + }, + "/employers/{employerId}/rti/nvr/{taxYear}/{id}": { + "delete": { + "description": "Deletes the NVR.", + "operationId": "DeleteNvr", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "bacsSubReference": { - "type": "string", - "description": "[readonly] if paying by Credit and you've enabled BacsHash then this will contain the BacsSubReference included on the FPS", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "isBankDetailValid": { - "type": "boolean", - "description": "[readonly] for checking if bank details are valid" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "PayRunState": { - "enum": [ - "Opening", - "Open", - "ReOpening", - "RollingBack", - "RolledBack", - "SubmittedForProcessing", - "Processing", - "AwaitingApproval", - "Approved", - "Finalising", - "Finalised", - "Deleting" ], - "type": "string" + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Delete NVR", + "tags": [ + "Nvr" + ] }, - "PayRunStateChange": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/PayRunState" - }, - "reason": { - "$ref": "#/components/schemas/PayRunStateChangeReason" + "get": { + "description": "Retrieves the NiNo Verification Request.", + "operationId": "GetNvr", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "reasonText": { - "maxLength": 300, - "type": "string", - "description": "A free-form text field for a reason for the change of state.", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "employeeUniqueIds": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Nvr" + } + } }, - "description": "List of employee unique ids, whose PayRunEntries to be re-opened during a Payrun rollback operation.\r\nWill be used only during a transition to a rolled back pay run state", - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "PayRunStateChangeReason": { - "enum": [ - "Other", - "AdditionalDataNotSubmitted", - "ChangeToOriginalData", - "PayBureauError" - ], - "type": "string" + "summary": "Get NVR", + "tags": [ + "Nvr" + ] }, - "PayRunSummaryLine": { - "type": "object", - "properties": { - "nominalCode": { - "type": "string", - "description": "[readonly] If you've set up NominalCodeMapping then the relevant Nominal code for the PayCode will be shown here.", - "nullable": true - }, - "departmentCode": { - "type": "string", - "description": "[readonly] If the journal is split by department then the relevant department code is shown here.", - "nullable": true - }, - "nominalName": { - "type": "string", - "description": "[readonly] As above", - "nullable": true - }, - "description": { - "type": "string", - "description": "[readonly] A description of what this line summarises.", - "nullable": true - }, - "qty": { - "type": "number", - "description": "[readonly] If the PayCode is a Multiplier code then this will contain the number of days/hours", - "format": "double", - "nullable": true - }, - "value": { - "type": "number", - "description": "[readonly] The total value for this line.", - "format": "double" - }, - "payCode": { - "$ref": "#/components/schemas/PayCode" + "put": { + "description": "Updates an existing NiNo Verification Request.", + "operationId": "UpdateNvr", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "costCentreCode": { - "type": "string", - "description": "[readonly] If the journal is split by cost centre then the relevant cost centre code is shown here.", - "nullable": true + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "analysisCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AnalysisCategory" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Nvr" + } }, - "description": "[readonly] If the journal is split by analysis categories", - "nullable": true - }, - "analysisCategoryCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AnalysisCategoryCode" + "application/json": { + "schema": { + "$ref": "#/components/schemas/Nvr" + } }, - "description": "[readonly] If the journal is split by analysis categories then the relevant analysis categories code is shown here.", - "nullable": true - }, - "employeeUniqueId": { - "type": "string", - "description": "[readonly] The EmployeeId this summary line relates to.", - "format": "uuid", - "nullable": true - }, - "journalNarrative": { - "type": "string", - "description": "[readonly] Gets the journal narrative for the pension, if defined.", - "nullable": true - }, - "pensionId": { - "type": "string", - "description": "[readonly] The PensionId of the pension associated with this summary line, only present for pension summary lines.", - "format": "uuid", - "nullable": true - }, - "employee": { - "$ref": "#/components/schemas/Employee" - }, - "unMappedNominalCode": { - "type": "string", - "description": "[readonly] Unmapped Nominal Code is the Nominal Code without the Nominal Mapping.", - "nullable": true + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Nvr" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Nvr" + } + } } }, - "additionalProperties": false, - "description": "An array of this model is used to represent a summary of a PayRun.\r\nThis would typically be used for creating accounting entries for the PayRun." - }, - "PayRunSummaryLineIEnumerableReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayRunSummaryLine" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Nvr" + } + } }, - "description": "[readonly] If the type is application.json then this will contain a JSON representation of the relevant model", - "nullable": true - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "description": "Success" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "PayRunTotals": { - "type": "object", - "properties": { - "basicPay": { - "type": "number", - "description": "[readonly] The amount to be paid to this Employee as a result of the PayOptions that have been set", - "format": "double" - }, - "gross": { - "type": "number", - "description": "[readonly] Gross pay", - "format": "double" - }, - "grossForNi": { - "type": "number", - "description": "[readonly] The amount of the Gross that is subject to NI", - "format": "double" - }, - "grossForNiNonRti": { - "type": "number", - "description": "[readonly] The amount of the Gross that is subject to NI but excluded from RTI", - "format": "double" - }, - "grossNotSubjectToEmployersNi": { - "type": "number", - "description": "[readonly] The amount of the Gross that is not subject to Employers NI.\r\nThis is the same as GrossForNI where the employees NI Table has an Er contribution", - "format": "double" - }, - "grossNotSubjectToEmployersNiNonRti": { - "type": "number", - "description": "[readonly] The amount of the Gross that is not subject to Employers NI.\r\nThis is the same as GrossForNI where the employees NI Table has an Er contribution\r\nThis is the amount that is excluded from RTI", - "format": "double" - }, - "grossForTax": { - "type": "number", - "description": "[readonly] The amount of the Gross that is subject to PAYE", - "format": "double" - }, - "employerNi": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "employerNiNonRti": { - "type": "number", - "description": "[readonly] Employer NI excluded from RTI", - "format": "double" - }, - "employeeNi": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "employeeNiNonRti": { - "type": "number", - "description": "[readonly] Employee NI excluded from RTI", - "format": "double" - }, - "employerNiOffPayroll": { - "type": "number", - "description": "[readonly] The amount included in EmployerNi that is in relation to Off-Payroll Workers", - "format": "double" - }, - "realTimeClass1ANi": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "realTimeClass1ANiNonRti": { - "type": "number", - "description": "[readonly] Real Time Class 1A NI excluded from RTI", - "format": "double" - }, - "tax": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "taxNonRti": { - "type": "number", - "description": "[readonly] Tax excluded from RTI", - "format": "double" - }, - "netPay": { - "type": "number", - "description": "[readonly] The Net Pay for this Employee", - "format": "double" - }, - "adjustments": { - "type": "number", - "description": "[readonly] The value of adjustments made to the Net Pay (Non taxable/NIable additions/deductions)", - "format": "double" - }, - "notionalPay": { - "type": "number", - "description": "[readonly] The value of adjustments that are of type notional.", - "format": "double" - }, - "additions": { - "type": "number", - "description": "The value of all additions. This minus Deductions should equal TakeHomePay", - "format": "double" - }, - "deductions": { - "type": "number", - "description": "The value of all deductions. Additions minus This value should equal TakeHomePay", - "format": "double" - }, - "takeHomePay": { - "type": "number", - "description": "[readonly] The amount this Employee takes home", - "format": "double" - }, - "nonTaxOrNICPmt": { - "type": "number", - "description": "[readonly] The value of any payments being made to this Employee that aren't being subjected to PAYE or NI", - "format": "double" - }, - "itemsSubjectToClass1NIC": { - "type": "number", - "description": "[readonly] Items subject to Class 1 NIC but not taxed under PAYE regulations excluding pension contributions", - "format": "double" - }, - "dednsFromNetPay": { - "type": "number", - "description": "[readonly] The value of any deductions being made to the Net Pay for this Employee", - "format": "double" - }, - "tcp_Tcls": { - "type": "number", - "description": "[readonly] Value of payments marked as Trivial Commutation Payment (A - TCLS)", - "format": "double" - }, - "tcp_Pp": { - "type": "number", - "description": "[readonly] Value of payments marked as Trivial Commutation Payment (B - Personal Pension)", - "format": "double" - }, - "tcp_Op": { - "type": "number", - "description": "[readonly] Value of payments marked as Trivial Commutation Payment (C - Occupational Pension)", - "format": "double" - }, - "flexiDd_Death": { - "type": "number", - "description": "[readonly] Value of payments marked as flexibly accessing death benefit (taxable)", - "format": "double" - }, - "flexiDd_Death_NonTax": { - "type": "number", - "description": "[readonly] Value of payments marked as flexibly accessing death benefit (non taxable)", - "format": "double" - }, - "flexiDd_Pension": { - "type": "number", - "description": "[readonly] Value of payments marked as flexibly accessing pension (taxable)", - "format": "double" - }, - "flexiDd_Pension_NonTax": { - "type": "number", - "description": "[readonly] Value of payments marked as flexibly accessing pension (non taxable)", - "format": "double" - }, - "flexiDd_SeriousIllHealth": { - "type": "number", - "description": "[readonly] Value of payments marked as flexibly accessing serious ill health lump sum (taxable)", - "format": "double" - }, - "flexiDd_SeriousIllHealth_NonTax": { - "type": "number", - "description": "[readonly] Value of payments marked as flexibly accessing serious ill health lump sum (non taxable)", - "format": "double" - }, - "flexiDd_StandAloneLumpSum": { - "type": "number", - "description": "[readonly] Value of payments marked as flexibly accessing stand alone lump sum (taxable)", - "format": "double" - }, - "flexiDd_StandAloneLumpSum_NonTax": { - "type": "number", - "description": "[readonly] Value of payments marked as flexibly accessing stand alone lump sum (non taxable)", - "format": "double" - }, - "flexiDd_PensionCommencementExcess": { - "type": "number", - "description": "[readonly] Value of payments marked as flexibly accessing pension commencement excess lump sum (taxable)", - "format": "double" - }, - "flexiDd_PensionCommencementExcess_NonTax": { - "type": "number", - "description": "[readonly] Value of payments marked as flexibly accessing pension commencement excess lump sum (non taxable)", - "format": "double" - }, - "smp": { - "type": "number", - "description": "[readonly] Statutory Maternity Pay", - "format": "double" - }, - "smpNonRti": { - "type": "number", - "description": "[readonly] Statutory Maternity Pay excluded from RTI", - "format": "double" - }, - "spp": { - "type": "number", - "description": "[readonly] Statutory Paternity Pay", - "format": "double" - }, - "sppNonRti": { - "type": "number", - "description": "[readonly] Statutory Paternity Pay excluded from RTI", - "format": "double" - }, - "sap": { - "type": "number", - "description": "[readonly] Statutory Adoption Pay", - "format": "double" - }, - "sapNonRti": { - "type": "number", - "description": "[readonly] Statutory Adoption Pay excluded from RTI", - "format": "double" - }, - "shpp": { - "type": "number", - "description": "[readonly] Statutory Shared Parental Pay", - "format": "double" - }, - "shppNonRti": { - "type": "number", - "description": "[readonly] Statutory Shared Parental Pay excluded from RTI", - "format": "double" - }, - "spbp": { - "type": "number", - "description": "[readonly] Statutory Parental Bereavement Pay", - "format": "double" - }, - "spbpNonRti": { - "type": "number", - "description": "[readonly] Statutory Parental Bereavement Pay excluded from RTI", - "format": "double" - }, - "sncp": { - "type": "number", - "description": "[readonly] Statutory Neonatal Care Pay", - "format": "double" - }, - "sncpNonRti": { - "type": "number", - "description": "[readonly] Statutory Neonatal Care Pay excluded from RTI", - "format": "double" + "summary": "Update NVR", + "tags": [ + "Nvr" + ] + } + }, + "/employers/{employerId}/rti/nvr/{taxYear}/{id}/markasaccepted": { + "post": { + "description": "Marks a NiNo Verification Request as having been sent to HMRC and accepted by them\r\nYou only use this method if the NVR has been submitted via an external system.\r\nIt will automatically be updated as Sent and/or Accepted if it's submitted via this API.", + "operationId": "MarkAsAcceptedNvr", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "ssp": { - "type": "number", - "description": "[readonly] Statutory Sick Pay", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "sspNonRti": { - "type": "number", - "description": "[readonly] Statutory Sick Pay excluded from RTI", - "format": "double" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Nvr" + } + } + }, + "description": "Success" + } + }, + "summary": "Mark as Sent", + "tags": [ + "Nvr" + ] + } + }, + "/employers/{employerId}/rti/nvr/{taxYear}/{id}/submit": { + "post": { + "description": "Submits an existing NiNo Verification Request to HMRC.", + "operationId": "SubmitNvr", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "studentLoanRecovered": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "studentLoanRecoveredNonRti": { - "type": "number", - "description": "[readonly] Student Loan recovered excluded from RTI", - "format": "double" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "postgradLoanRecovered": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "in": "query", + "name": "force", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Nvr" + } + } + }, + "description": "Success" + } + }, + "summary": "Submit an existing NVR", + "tags": [ + "Nvr" + ] + } + }, + "/employers/{employerId}/rti/nvr/{taxYear}/{id}/xml/request": { + "get": { + "description": "Returns the XML request that was or will be sent to HMRC for this RTI document.\r\nAlthough the value is XML, it is returned as a JSON string.", + "operationId": "GetXmlRequestNvr", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "postgradLoanRecoveredNonRti": { - "type": "number", - "description": "[readonly] Postgrad Loan recovered excluded from RTI", - "format": "double" + { + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "pensionableEarnings": { - "type": "number", - "description": "[readonly] The amount of the Gross that is subject to Pension Deductions.\r\nIf the Pension Scheme uses Qualifying Earnings (upper and lower limits) then this value is before those are applied", - "format": "double" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "Success" + } + }, + "summary": "Get XML Request", + "tags": [ + "Nvr" + ] + } + }, + "/employers/{employerId}/schedules/all": { + "get": { + "description": "Get all PaySchedules for the given Employer.", + "operationId": "GetAllForEmployerPaySchedule", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get the PaySchedule", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PaySchedule" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get PaySchedules for Employer (for active tax years)", + "tags": [ + "PaySchedule" + ] + } + }, + "/employers/{employerId}/schedules/{taxYear}": { + "get": { + "description": "Get all PaySchedules for the given TaxYear.", + "operationId": "GetAllPaySchedule", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get the PaySchedule", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "pensionablePay": { - "type": "number", - "description": "[readonly] The amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup.", - "format": "double" + { + "description": "The year that you want to retrieve details for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PaySchedule" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get PaySchedules", + "tags": [ + "PaySchedule" + ] + } + }, + "/employers/{employerId}/schedules/{taxYear}/{payPeriod}": { + "delete": { + "description": "Delete the PaySchedule for the PayPeriod and TaxYear specified (and an optional ordinal. 1 will be used if ordinal is not provided).", + "operationId": "DeleteWithOptionalOrdinalPaySchedule", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get the PaySchedule", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "nonTierablePay": { - "type": "number", - "description": "[readonly] The value of any pay that shouldn't count towards determining a pension tier.", - "format": "double" + { + "description": "The PayPeriod (ie, Monthly) that you want to retrieve details for.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "employeePensionContribution": { - "type": "number", - "description": "[readonly] The value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions", - "format": "double" + { + "description": "The year that you want to retrieve details for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "employeePensionContributionAvc": { - "type": "number", - "description": "[readonly] The value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "employerPensionContribution": { - "type": "number", - "description": "[readonly] The value of the Pension Contribution being made by the Employer for this Employee", - "format": "double" + "400": { + "description": "Bad Request" + } + }, + "summary": "Delete PaySchedule (deprecated)", + "tags": [ + "PaySchedule" + ] + }, + "get": { + "description": "Get the PaySchedule for the PayPeriod and TaxYear specified (and an optional ordinal. 1 will be used if ordinal is not provided).", + "operationId": "GetWithOptionalOrdinalPaySchedule", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get the PaySchedule", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "empeePenContribnsNotPaid": { - "type": "number", - "description": "[readonly] Value of employee pension contributions that are not paid under 'net pay arrangements', including any AVC", - "format": "double" + { + "description": "The PayPeriod (ie, Monthly) that you want to retrieve details for.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "empeePenContribnsPaid": { - "type": "number", - "description": "[readonly] Value of employee pension contributions paid under 'net pay arrangements', including any AVC", - "format": "double" + { + "description": "The year that you want to retrieve details for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "attachmentOrderDeductions": { - "type": "number", - "description": "[readonly] Value of deductions made due to AttachmentOrders", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + } + }, + "description": "Success" + } + }, + "summary": "Get PaySchedule (deprecated)", + "tags": [ + "PaySchedule" + ] + }, + "post": { + "description": "Create PaySchedule using a certain pay frequency and TaxYear specified (and an optional ordinal. 1 will be used if ordinal is not provided).", + "operationId": "CreateWithOptionalOrdinalPaySchedule", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update the PaySchedule", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "cisDeduction": { - "type": "number", - "description": "[readonly] Value of any CIS Deduction made", - "format": "double" + { + "description": "The PayPeriod (ie, Monthly) that you want to update details for.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "cisVat": { - "type": "number", - "description": "[readonly] Value of any VAT paid to CIS Subcontractor", - "format": "double" + { + "description": "The year that the PaySchedule is for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "cisUmbrellaFee": { - "type": "number", - "description": "[readonly] Value of any pre-tax fee charged to the CIS Subcontractor for processing the payment", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + } + } + }, + "responses": { + "201": { + "description": "Created" }, - "cisUmbrellaFeePostTax": { - "type": "number", - "description": "[readonly] Value of any post-tax fee charged to the CIS Subcontractor for processing the payment", - "format": "double" + "400": { + "description": "Bad Request" + } + }, + "summary": "Create a PaySchedule (deprecated)", + "tags": [ + "PaySchedule" + ] + }, + "put": { + "description": "Update PaySchedule for the PayPeriod and TaxYear specified (and an optional ordinal. 1 will be used if ordinal is not provided).", + "operationId": "SaveWithOptionalOrdinalPaySchedule", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update the PaySchedule", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "pbik": { - "type": "number", - "description": "[readonly] Value of any Payrolled Benefits In Kind", - "format": "double" + { + "description": "The PayPeriod (ie, Monthly) that you want to update details for.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "mapsMiles": { - "type": "integer", - "description": "[readonly] The number of miles paid for Mileage Allowance Payments", - "format": "int32" + { + "description": "The year that the PaySchedule is for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "foreignTaxAmount": { - "type": "number", - "description": "[readonly] The amount paid for Foreign Tax Credits in this period", - "format": "double" + { + "in": "query", + "name": "ordinal", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + } + }, + "description": "Success" }, - "foreignTaxAmountReclaimed": { - "type": "number", - "description": "[readonly] The amount of Foreign Tax Credits that you actually reclaimed", - "format": "double" + "400": { + "description": "Bad Request" + } + }, + "summary": "Update PaySchedule (deprecated)", + "tags": [ + "PaySchedule" + ] + } + }, + "/employers/{employerId}/schedules/{taxYear}/{payPeriod}/{ordinal}": { + "delete": { + "description": "Delete the PaySchedule for the PayPeriod and TaxYear specified.", + "operationId": "DeletePaySchedule", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get the PaySchedule", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "umbrellaFee": { - "type": "number", - "description": "[readonly] Value of any Umbrella fee charged for processing the payment", - "format": "double" + { + "description": "The PayPeriod (ie, Monthly) that you want to retrieve details for.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "appLevyDeduction": { - "type": "number", - "description": "[readonly] Value of any Apprenticeship Levy fee deducted for processing the umbrella payment", - "format": "double" + { + "description": "The year that you want to retrieve details for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "paymentAfterLeaving": { - "type": "number", - "description": "[readonly] Payment After Leaving", - "format": "double" + { + "description": "Specify if this is the first, second, third (etc) PaySchedule for this PayPeriod. Use 1 for the first, 2 for the second, etc.", + "in": "path", + "name": "ordinal", + "required": true, + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "taxOnPaymentAfterLeaving": { - "type": "number", - "description": "[readonly] Tax On Payment After Leaving", - "format": "double" + "400": { + "description": "Bad Request" + } + }, + "summary": "Delete PaySchedule", + "tags": [ + "PaySchedule" + ] + }, + "get": { + "description": "Get the PaySchedule for the PayPeriod and TaxYear specified.", + "operationId": "GetPaySchedule", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get the PaySchedule", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "nilPaid": { - "type": "integer", - "description": "[readonly] The number of employees with NilPaid on the PayRun", - "format": "int32" + { + "description": "The PayPeriod (ie, Monthly) that you want to retrieve details for.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "leavers": { - "type": "integer", - "description": "[readonly] The number of Leavers on ths PayRun", - "format": "int32" + { + "description": "The year that you want to retrieve details for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "starters": { - "type": "integer", - "description": "[readonly] The number of Starters on this PayRun", - "format": "int32" + { + "description": "Specify if this is the first, second, third (etc) PaySchedule for this PayPeriod. Use 1 for the first, 2 for the second, etc.", + "in": "path", + "name": "ordinal", + "required": true, + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + } + }, + "description": "Success" + } + }, + "summary": "Get PaySchedule", + "tags": [ + "PaySchedule" + ] + }, + "post": { + "description": "Create PaySchedule using a certain pay frequency.", + "operationId": "CreatePaySchedule", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update the PaySchedule", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "p45Gross": { - "type": "number", - "description": "[readonly] The value P45 Gross which is held on the Employees Opening Balance", - "format": "double", - "nullable": true + { + "description": "The PayPeriod (ie, Monthly) that you want to update details for.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "p45Tax": { - "type": "number", - "description": "[readonly] The value of P45 Tax which is held on the Employees Opening Balance", - "format": "double", - "nullable": true + { + "description": "The year that the PaySchedule is for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "totalCost": { - "type": "number", - "format": "double", - "readOnly": true + { + "description": "Specify if this is the first, second, third (etc) PaySchedule for this PayPeriod. Use 1 for the first, 2 for the second, etc.", + "in": "path", + "name": "ordinal", + "required": true, + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + } + } + }, + "responses": { + "201": { + "description": "Created" }, - "recoverableAmounts": { - "$ref": "#/components/schemas/RecoverableAmounts" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false, - "description": "Used to represent totals for a PayRun or PayRunEntry.\r\nIf a value is 0 then it will not be shown in the JSON." + "summary": "Create a PaySchedule", + "tags": [ + "PaySchedule" + ] }, - "PaySchedule": { - "type": "object", - "properties": { - "name": { - "maxLength": 100, - "type": "string", - "description": "A descriptive name for this PaySchedule", - "nullable": true - }, - "ordinal": { - "type": "integer", - "description": "[readonly] Indicates whether this is first, second, third (etc) PaySchedule for this PayPeriod.", - "format": "int32" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + "put": { + "description": "Update PaySchedule for the PayPeriod.", + "operationId": "SavePaySchedule", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update the PaySchedule", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" + { + "description": "The PayPeriod (ie, Monthly) that you want to update details for.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "firstPeriodEndDate": { - "type": "string", - "description": "The last day of the first pay period", - "format": "date" + { + "description": "The year that the PaySchedule is for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "firstPaymentDate": { - "type": "string", - "description": "The first payment date", - "format": "date" + { + "description": "Specify if this is the first, second, third (etc) PaySchedule for this PayPeriod. Use 1 for the first, 2 for the second, etc.", + "in": "path", + "name": "ordinal", + "required": true, + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedule" + } + } + }, + "description": "Success" }, - "paymentDateType": { - "$ref": "#/components/schemas/PaymentDateType" + "400": { + "description": "Bad Request" + } + }, + "summary": "Update PaySchedule", + "tags": [ + "PaySchedule" + ] + } + }, + "/employers/{employerId}/schedules/{taxYear}/{payPeriod}/{ordinal}/periods": { + "get": { + "description": "Get the PaySchedulePeriods for PaySchedule specified.", + "operationId": "GetPeriodsPaySchedule", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get the PaySchedule periods", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "periodEndDateType": { - "$ref": "#/components/schemas/PaymentDateType" + { + "description": "The PayPeriod (ie, Monthly) that you want to retrieve details for", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "periodLengths": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "description": "Only applicable for PayPeriod of Custom. Defines the length of each period", - "nullable": true + { + "description": "The year that you want to retrieve details for", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "highGrossPay": { - "type": "number", - "description": "A gross pay amount considered high for this PaySchedule", - "format": "double" + { + "description": "Optionally specify the second, third, fourth (etc) PaySchedule for this PayPeriod. Defaults to 1 (first)", + "in": "path", + "name": "ordinal", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "highNetPay": { - "type": "number", - "description": "A net pay amount considered high for this PaySchedule", - "format": "double" + { + "description": "Optionally specify a period number to get a result just for that period", + "in": "query", + "name": "periodNumber", + "schema": { + "format": "int32", + "type": "integer" + } }, - "periodEventsConfig": { - "type": "object", - "properties": { - "SubmitForProcessing": { - "type": "integer", - "format": "int32" - }, - "SendForApproval": { - "type": "integer", - "format": "int32" - }, - "Approval": { - "type": "integer", - "format": "int32" - }, - "Finalise": { - "type": "integer", - "format": "int32" - }, - "SendPaySlip": { - "type": "integer", - "format": "int32" - }, - "SubmitRti": { - "type": "integer", - "format": "int32" + { + "in": "query", + "name": "includeEvents", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PaySchedulePeriod" + }, + "type": "array" + } } }, - "additionalProperties": false, - "description": "Only applicable if Bureau functionality is enabled. Defines the number of days each event occurs before the Payment Date.", - "nullable": true - }, - "hasOpenPayRunPeriod": { - "type": "boolean", - "description": "[readonly] Will be true if the employer currently has an open PayRun for this PayPeriod" + "description": "Success" }, - "lastPeriodEndDate": { - "type": "string", - "description": "[readonly] The end date of the most recent PayRun on this schedule", - "format": "date", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Get PaySchedulePeriods", + "tags": [ + "PaySchedule" + ] + } + }, + "/employers/{employerId}/schedules/{taxYear}/{payPeriod}/{ordinal}/periods/{periodNumber}": { + "put": { + "description": "Update the PaymentDate for a PaySchedulePeriod.", + "operationId": "UpdatePaySchedulePeriodPaySchedule", + "parameters": [ + { + "description": "The Id of the Employer for which you want to update the PaySchedulePeriod", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "lastPeriodNumber": { - "type": "integer", - "description": "[readonly] The period number of the most recent PayRun on this schedule", - "format": "int32", - "nullable": true + { + "description": "The PayPeriod (ie, Monthly) that you want to update details for", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "employeeCount": { - "type": "integer", - "description": "[readonly] The number of employees paid with this PaySchedule", - "format": "int32" + { + "description": "The year that the PaySchedule is for", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "isRequired": { - "type": "boolean", - "description": "[readonly] Whether or not this PaySchedule is required for the employer, ie: they have employees to be paid on this PaySchedule", - "readOnly": true + { + "description": "Specify the first, second, third (etc) PaySchedule for this PayPeriod.", + "in": "path", + "name": "ordinal", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "isConfigured": { - "type": "boolean", - "description": "[readonly] Whether or not this PaySchedule has been configured and is ready for use" + { + "description": "Specify the number of the period that you want to update the PaymentDate for", + "in": "path", + "name": "periodNumber", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PaySchedulePeriod" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedulePeriod" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PaySchedulePeriod" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedulePeriod" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaySchedulePeriod" + } + } + }, + "description": "Success" }, - "isYearCompleted": { - "type": "boolean", - "description": "[readonly] Returns true if all PayRuns for this PaySchedule in the TaxYear have been completed" + "400": { + "description": "Bad Request" }, - "yearEndTasks": { - "type": "array", - "items": { + "404": { + "description": "Not Found" + } + }, + "summary": "Update PaySchedulePeriod", + "tags": [ + "PaySchedule" + ] + } + }, + "/employers/{employerId}/tags": { + "get": { + "description": "Lists all Tags for an Employer.", + "operationId": "IndexTag", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list Tags", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List Tags", + "tags": [ + "Tag" + ] + }, + "post": { + "description": "Creates a new Tag for the Employer.", + "operationId": "CreateTag", + "parameters": [ + { + "description": "The Id of the Employer to which the Tag belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } }, - "description": "[readonly] A list of actions that need to be completed for this PaySchedule before this TaxYear can be finalised", - "nullable": true - }, - "payRuns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } }, - "description": "[readonly] Details of PayRuns for this PaySchedule", - "nullable": true - }, - "currentPayRun": { - "$ref": "#/components/schemas/Item" - }, - "nextPayRun": { - "$ref": "#/components/schemas/PayRun" - }, - "publicCreatedDate": { - "type": "string", - "format": "date" - }, - "employerName": { - "type": "string", - "description": "Employer name for this PaySchedule", - "nullable": true + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } }, - "employerUniqueId": { - "type": "string", - "description": "Employer Unique Id for this PaySchedule", - "format": "uuid" - } + "description": "The new values for the Tag you want to update." }, - "additionalProperties": false - }, - "PaySchedulePeriod": { - "type": "object", - "properties": { - "paySchedulePeriodEvents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaySchedulePeriodEvent" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } }, - "description": "[readonly] List of all the events in this PaySchedulePeriod", - "nullable": true - }, - "period": { - "type": "integer", - "description": "[readonly] The Period number of the PaySchedulePeriod.", - "format": "int32" - }, - "startDate": { - "type": "string", - "description": "[readonly] The start date of the PaySchedulePeriod", - "format": "date" - }, - "endDate": { - "type": "string", - "description": "[readonly] The end date of the PaySchedulePeriod", - "format": "date" - }, - "paymentDate": { - "type": "string", - "description": "The payment date of the PaySchedulePeriod.", - "format": "date" + "description": "Created" }, - "unadjustedPaymentDate": { - "type": "string", - "description": "The payment date of the PaySchedulePeriod when not accounting for weekends, bank hols or ad-hoc alterations to the pay schedule", - "format": "date" + "400": { + "description": "Bad Request" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "404": { + "description": "Employer Not Found" } }, - "additionalProperties": false - }, - "PaySchedulePeriodEvent": { - "type": "object", - "properties": { - "payPeriodEventType": { - "$ref": "#/components/schemas/PayPeriodEventType" - }, - "eventDate": { - "type": "string", - "description": "The expected date and time of the event.", - "format": "date" - }, - "actualEventDate": { - "type": "string", - "description": "The actual date and time when the event was completed.", - "format": "date", - "nullable": true - }, - "isOverDue": { - "type": "boolean", - "description": "Returns true if its past the event date.", - "readOnly": true + "summary": "Create Tag", + "tags": [ + "Tag" + ] + } + }, + "/employers/{employerId}/tags/Tag": { + "get": { + "description": "Gets the Tag specified.", + "operationId": "GetTagTag", + "parameters": [ + { + "description": "The Id of the Employer to which the Tag belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "description": "The code of the Tag you want to retrieve.", + "in": "query", + "name": "code", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false, - "description": "An Event within a PaySchedulePeriod. The event could be scheduled x days before PaymentDate." - }, - "PaySpineReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaySpineReportLine" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } }, - "nullable": true - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true + "description": "Success" }, - "isDraft": { - "type": "boolean" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "PaySpineReportLine": { - "type": "object", - "properties": { - "spineName": { - "type": "string", - "description": "Name of the Pay Spine", - "nullable": true - }, - "fullTimeHours": { - "type": "number", - "description": "Maximum Full Time Hours on this Pay Spine", - "format": "double" - }, - "fullTimeWeeks": { - "type": "number", - "description": "Maximum Full Time Weeks on this Pay Spine", - "format": "double" - }, - "salaryFormula": { - "type": "string", - "description": "Formula used to derive annual salary", - "nullable": true - }, - "hourlyDivisor": { - "type": "number", - "description": "Hours used to determine Hourly Rate", - "format": "double" - }, - "hourlyDecimals": { - "type": "integer", - "description": "Number of decimal places to calculate Hourly Rates", - "format": "int32" - }, - "dailyDivisor": { - "type": "number", - "description": "Days used to determine Full time Daily Rate", - "format": "double" - }, - "dailyDecimals": { - "type": "integer", - "description": "Number of decimal places to calculate Daily Rates", - "format": "int32" - }, - "annualDecimals": { - "type": "integer", - "description": "Number of decimal places to calculate Annual Salaries", - "format": "int32" - }, - "annualRoundingRule": { - "$ref": "#/components/schemas/AnnualRoundingRule" - }, - "incrementRule": { - "$ref": "#/components/schemas/IncrementRule" - }, - "requiresLondonAllowance": { - "type": "boolean", - "description": "Requires LA column to be completed on the spine" - }, - "gradeEffectiveDate": { - "type": "string", - "description": "Effective date for applicable grades", - "format": "date" - }, - "pointEffectiveDate": { - "type": "string", - "description": "Effective date for applicable spinal points", - "format": "date" - }, - "employee": { - "$ref": "#/components/schemas/Item" + "summary": "Get Tag", + "tags": [ + "Tag" + ] + } + }, + "/employers/{employerId}/tags/tag": { + "delete": { + "description": "Deletes the specified Tag.", + "operationId": "DeleteTagTag", + "parameters": [ + { + "description": "The Id of the Employer to which the Tag belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payrollCode": { - "type": "string", - "nullable": true + { + "description": "The code of the Tag you want to delete.", + "in": "query", + "name": "code", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "department": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false + "summary": "Delete Tag", + "tags": [ + "Tag" + ] }, - "PaySpineReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/PaySpineReport" + "put": { + "description": "Updates the details of an existing Tag.", + "operationId": "UpdateTagTag", + "parameters": [ + { + "description": "The Id of the Employer to which the Tag belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "description": "The existing code of the Tag you want to update.", + "in": "query", + "name": "code", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "PaySpineYearsServiceEntitlementBasis": { - "enum": [ - "RoleStartDate", - "EmploymentStartDate", - "ContinuousStartDate", - "AggregatedStartDate" - ], - "type": "string" - }, - "Payee": { - "required": [ - "title" ], - "type": "object", - "properties": { - "title": { - "maxLength": 50, - "minLength": 1, - "type": "string", - "description": "The name of this Payee" - }, - "bankDetails": { - "$ref": "#/components/schemas/BankDetails" - }, - "paymentDateRule": { - "$ref": "#/components/schemas/PaymentDateRule" - }, - "paymentDateDayOfWeek": { - "$ref": "#/components/schemas/DayOfWeek" - }, - "paymentDateDayOfMonth": { - "type": "integer", - "format": "int32", - "nullable": true + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } }, - "hasMinimumBankDetails": { - "type": "boolean", - "description": "Denotes whether the payee has the minimum bank details to receive a payment", - "readOnly": true + "description": "The new values for the Tag you want to update." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } + }, + "description": "Success" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "PayeeType": { - "enum": [ - "Employee", - "Hmrc", - "PensionProvider", - "Aeo", - "Deduction" - ], - "type": "string" - }, - "PaylineCalculationData": { - "type": "object", - "properties": { - "fixedAnnualValue": { - "type": "number", - "description": "PaySpine full time annual value", - "format": "double" - }, - "contractedHours": { - "type": "number", - "description": "PaySpine contracted hours", - "format": "double" - }, - "contractedWeeks": { - "type": "number", - "description": "PaySpine contracted weeks", - "format": "double" - }, - "fullTimeEquivalent": { - "type": "number", - "description": "PaySpine full time equivalent value", - "format": "double" - }, - "fullTimeHours": { - "type": "number", - "description": "PaySpine full time hours", - "format": "double" - }, - "fullTimeWeeks": { - "type": "number", - "description": "PaySpine full time weeks", - "format": "double" + "summary": "Update Tag", + "tags": [ + "Tag" + ] + } + }, + "/employers/{employerId}/tags/{code}": { + "delete": { + "description": "Deletes the specified Tag.", + "operationId": "DeleteTag", + "parameters": [ + { + "description": "The Id of the Employer to which the Tag belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "fullTimeSalary": { - "type": "number", - "description": "PaySpine full time salary", - "format": "double" + { + "description": "The code of the Tag you want to delete.", + "in": "path", + "name": "code", + "required": true, + "schema": { + "type": "string" + } } - }, - "additionalProperties": false - }, - "PaymentDateRule": { - "enum": [ - "OnPayDate", - "OnDayOfWeekAfterPayDate", - "OnDayOfMonth" - ], - "type": "string" - }, - "PaymentDateType": { - "enum": [ - "SameDate", - "LastDay", - "LastWeekday", - "LastXxxday", - "SameDateWorkingDay", - "SecondXxxday", - "ThirdXxxday", - "FourthXxxday", - "SecondToLastXxxday", - "ThirdToLastXxxday" - ], - "type": "string" - }, - "PaymentMethodAfterLeaving": { - "enum": [ - "RegularPayMethod", - "IrregularPayMethod" - ], - "type": "string" - }, - "PaymentsCsvMapping": { - "required": [ - "name" ], - "type": "object", - "properties": { - "name": { - "maxLength": 50, - "minLength": 1, - "type": "string" - }, - "type": { - "$ref": "#/components/schemas/PaymentsCsvMappingType" - }, - "importBehaviour": { - "type": "integer", - "format": "int32" - }, - "payBasis": { - "$ref": "#/components/schemas/PayBasis" - }, - "hasHeader": { - "type": "boolean" - }, - "payrollCodeIndex": { - "type": "integer", - "format": "int32" - }, - "employerIdIndex": { - "type": "integer", - "format": "int32" - }, - "roleReferenceIndex": { - "type": "integer", - "format": "int32" - }, - "payAmountIndex": { - "type": "integer", - "format": "int32" - }, - "payAmountMultiplierIndex": { - "type": "integer", - "format": "int32" - }, - "noteIndex": { - "type": "integer", - "format": "int32" - }, - "payCodeIndex": { - "type": "integer", - "format": "int32" - }, - "hasPaylineCosting": { - "type": "boolean" - }, - "departmentIndex": { - "type": "integer", - "format": "int32" - }, - "costCentreIndex": { - "type": "integer", - "format": "int32" - }, - "effectiveFromIndex": { - "type": "integer", - "format": "int32" - }, - "effectiveToIndex": { - "type": "integer", - "format": "int32" - }, - "isAutomaticBackPayIndex": { - "type": "integer", - "format": "int32" - }, - "ignoreInitialBackPayIndex": { - "type": "integer", - "format": "int32" - }, - "contributesToBasicPayIndex": { - "type": "integer", - "format": "int32" - }, - "autoAdjustForLeaveIndex": { - "type": "integer", - "format": "int32" - }, - "analysisCategoryIndexesJson": { - "type": "string", - "nullable": true - }, - "paySpineIndex": { - "type": "integer", - "format": "int32" + "responses": { + "204": { + "description": "No Content" }, - "payGradeIndex": { - "type": "integer", - "format": "int32" + "400": { + "description": "Bad Request" + } + }, + "summary": "Delete Tag (deprecated)", + "tags": [ + "Tag" + ] + }, + "get": { + "description": "Gets the Tag specified.", + "operationId": "GetTag", + "parameters": [ + { + "description": "The Id of the Employer to which the Tag belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "spinePointIndex": { - "type": "integer", - "format": "int32" + { + "description": "The code of the Tag you want to retrieve.", + "in": "path", + "name": "code", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Tag (deprecated)", + "tags": [ + "Tag" + ] + }, + "put": { + "description": "Updates a Tag for the Employer.", + "operationId": "UpdateTag", + "parameters": [ + { + "description": "The Id of the Employer to which the Tag belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "analysisCategoryIndexes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AnalysisCategoryIndex" + { + "description": "The existing code of the Tag you want to update.", + "in": "path", + "name": "code", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } }, - "nullable": true + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } }, - "columns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentsCsvMappingColumn" + "description": "The new values for the Tag you want to update." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } }, - "nullable": true + "description": "Success" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "404": { + "description": "Employer Not Found" } }, - "additionalProperties": false, - "description": "This model is used to save CSV mappings for importing of payments.\r\nIt probably has very little practical use outside of our own UI" - }, - "PaymentsCsvMappingColumn": { - "required": [ - "title" + "summary": "Update Tag (deprecated)", + "tags": [ + "Tag" + ] + } + }, + "/employers/{employerId}/templates": { + "get": { + "description": "Lists all EmployerTemplates for the Employer specified.", + "operationId": "IndexEmployerTemplate", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list Pay Codes", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "object", - "properties": { - "title": { - "maxLength": 25, - "minLength": 1, - "type": "string" - }, - "code": { - "type": "string", - "nullable": true - }, - "isReferenceOnly": { - "type": "boolean", - "description": "If set to true then no PayCode is mapped and this column is just for on-screen refernece only" - }, - "colIndex": { - "type": "integer", - "format": "int32" - }, - "isMultiplier": { - "type": "boolean" - }, - "isNetToGross": { - "type": "boolean" - }, - "rateColIndex": { - "type": "integer", - "description": "If the mapping IsMultiplier, then this optionally specifies another column from which to get the value", - "format": "int32", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List EmployerTemplates", + "tags": [ + "EmployerTemplate" + ] + } + }, + "/employers/{employerId}/templates/{type}": { + "get": { + "description": "Gets the EmployerTemplate specified by the Type.", + "operationId": "GetEmployerTemplate", + "parameters": [ + { + "description": "The Id of the Employer to which the EmployerTemplate belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "shouldSerializeRateColIndex": { - "type": "boolean", - "readOnly": true + { + "description": "The EmployerTemplateType you want to retrieve.", + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/EmployerTemplateType" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerTemplate" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get EmployerTemplate", + "tags": [ + "EmployerTemplate" + ] }, - "PaymentsCsvMappingType": { - "enum": [ - "RowBased", - "ColumnBased" + "put": { + "description": "Updates the EmployerTemplate specified by the Type.\r\nThe only values need to supply are ```Content```\r\nand (if applicable) ```Subject```.\r\nIf these values are empty strings or not provided then the template will revert to the default values.", + "operationId": "UpdateEmployerTemplate", + "parameters": [ + { + "description": "The Id of the Employer to which the EmployerTemplate belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/EmployerTemplateType" + } + } ], - "type": "string" - }, - "PayrollAnalysisCostBreakdownReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayrollAnalysisCostBreakdownReportLine" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/EmployerTemplate" + } }, - "nullable": true - }, - "payCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayCode" + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerTemplate" + } }, - "nullable": true - }, - "employeesPayRunTotals": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeePayRunTotal" + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/EmployerTemplate" + } }, - "nullable": true - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "periodTo": { - "type": "integer", - "format": "int32" - }, - "startPeriodName": { - "type": "string", - "nullable": true - }, - "endPeriodName": { - "type": "string", - "nullable": true - }, - "startDate": { - "type": "string", - "format": "date" - }, - "endDate": { - "type": "string", - "format": "date" - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + "text/json": { + "schema": { + "$ref": "#/components/schemas/EmployerTemplate" + } + } }, - "title": { - "type": "string", - "nullable": true + "description": "The EmployerTemplateType you want to retrieve." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerTemplate" + } + } + }, + "description": "Success" + } + }, + "summary": "Update EmployerTemplate", + "tags": [ + "EmployerTemplate" + ] + } + }, + "/employers/{employerId}/termcalendars": { + "get": { + "description": "Lists all Term Calendars for an Employer.", + "operationId": "IndexTermCalendar", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get the Term Calendar list", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.TermCalendarResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "isDraft": { - "type": "boolean" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "List Term Calendars", + "tags": [ + "TermCalendar" + ] }, - "PayrollAnalysisCostBreakdownReportLine": { - "type": "object", - "properties": { - "payrollCode": { - "type": "string", - "nullable": true - }, - "lastName": { - "type": "string", - "nullable": true - }, - "department": { - "$ref": "#/components/schemas/StringStringDecimalValueTuple" - }, - "costCentre": { - "$ref": "#/components/schemas/StringStringDecimalValueTuple" - }, - "employeeRoleAnalysisCategory": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/StringDecimalKeyValuePair" + "post": { + "description": "Creates a new Term Calendar for the Employer.", + "operationId": "CreateTermCalendar", + "parameters": [ + { + "description": "The Id of the Employer to which new Term Calendar will be created.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarRequest" + } }, - "nullable": true - }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayrollAnalysisCostBreakdownReportValue" + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarRequest" + } }, - "nullable": true - }, - "totalPay": { - "type": "number", - "format": "double" - }, - "niablePay": { - "type": "number", - "format": "double" - }, - "pensionPay": { - "type": "number", - "format": "double" - }, - "niPercent": { - "type": "number", - "format": "double" - }, - "ersNi": { - "type": "number", - "format": "double" - }, - "pensionPercent": { - "type": "number", - "format": "double" - }, - "ersPension": { - "type": "number", - "format": "double" - }, - "taxablePay": { - "type": "number", - "format": "double" - }, - "taxablePercent": { - "type": "number", - "format": "double" - }, - "employeeNi": { - "type": "number", - "format": "double" - }, - "taxPaid": { - "type": "number", - "format": "double" - }, - "studentLoan": { - "type": "number", - "format": "double" - }, - "employeePension": { - "type": "number", - "description": "The value of the Pension Contribution(PENSION) being made by the Employee", - "format": "double" - }, - "employeePensionContributionSalarySacrifice": { - "type": "number", - "description": "The value of the Pension Contribution Salary Sacrifice(PENSIONSS) being made by the Employee", - "format": "double" - }, - "employeePensionContributionReliefAtSource": { - "type": "number", - "description": "The value of the Pension Contribution Relief At Source(PENSIONRAS) being made by the Employee", - "format": "double" - }, - "pensionSummaryCostBreakdowns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PensionSummaryCostBreakdown" + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarRequest" + } }, - "description": "List of pension summaries, each representing a breakdown of various pension components", - "nullable": true - }, - "roleId": { - "type": "string", - "description": "RoleId of that particular line entry", - "format": "uuid", - "nullable": true - }, - "roleWeightage": { - "type": "number", - "description": "Weightage value of the given employee role", - "format": "double" + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarRequest" + } + } } }, - "additionalProperties": false - }, - "PayrollAnalysisCostBreakdownReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarResponse" + } + } + }, + "description": "Created" }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + "400": { + "description": "Bad Request" }, - "model": { - "$ref": "#/components/schemas/PayrollAnalysisCostBreakdownReport" + "404": { + "description": "Not Found" + } + }, + "summary": "Create Term Calendar", + "tags": [ + "TermCalendar" + ] + } + }, + "/employers/{employerId}/termcalendars/{id}": { + "delete": { + "description": "Deletes a specified Term Calendar.", + "operationId": "DeleteTermCalendar", + "parameters": [ + { + "description": "The Id of the Employer to which the Term Calendar belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "description": "The Id of the Term Calendar which you want to delete", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "PayrollAnalysisCostBreakdownReportValue": { - "type": "object", - "properties": { - "qty": { - "type": "number", - "format": "double", - "nullable": true + ], + "responses": { + "204": { + "description": "No Content" }, - "code": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "value": { - "type": "number", - "format": "double" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Delete Term Calendar", + "tags": [ + "TermCalendar" + ] }, - "PayrollAnalysisEmployeeRoleBreakdownReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayrollAnalysisEmployeeRoleBreakdownReportLine" - }, - "nullable": true + "get": { + "description": "Gets a specified Term Calendar.", + "operationId": "GetTermCalendar", + "parameters": [ + { + "description": "The Id of the Employer to which the Term Calendar belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayCode" + { + "description": "The Id of the Term Calendar which you want to fetch", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarResponse" + } + } }, - "nullable": true - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "periodTo": { - "type": "integer", - "format": "int32" - }, - "startPeriodName": { - "type": "string", - "nullable": true - }, - "endPeriodName": { - "type": "string", - "nullable": true - }, - "startDate": { - "type": "string", - "format": "date" - }, - "endDate": { - "type": "string", - "format": "date" - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + "description": "Success" }, - "title": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "isDraft": { - "type": "boolean" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Get Term Calendar", + "tags": [ + "TermCalendar" + ] }, - "PayrollAnalysisEmployeeRoleBreakdownReportLine": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" - }, - "fullEmployee": { - "$ref": "#/components/schemas/Employee" - }, - "employeeRole": { - "$ref": "#/components/schemas/Item" - }, - "department": { - "$ref": "#/components/schemas/DepartmentMembership" - }, - "gross": { - "type": "number", - "format": "double" - }, - "niableGross": { - "type": "number", - "format": "double" - }, - "net": { - "type": "number", - "format": "double" - }, - "takeHome": { - "type": "number", - "format": "double" - }, - "employerNic": { - "type": "number", - "format": "double" - }, - "showQtyColumn": { - "type": "boolean" + "put": { + "description": "Updates a Term Calendar for the Employer.", + "operationId": "UpdateTermCalendar", + "parameters": [ + { + "description": "The Id of the Employer to which the Term Calendar belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayrollAnalysisEmployeeRoleBreakdownReportLineValue" + { + "description": "The Id of the Term Calendar which you want to update", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarRequest" + } }, - "nullable": true - }, - "ersPension": { - "type": "number", - "format": "double" + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarRequest" + } + } } }, - "additionalProperties": false - }, - "PayrollAnalysisEmployeeRoleBreakdownReportLineValue": { - "type": "object", - "properties": { - "qty": { - "type": "number", - "format": "double", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarResponse" + } + } + }, + "description": "Success" }, - "code": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "value": { - "type": "number", - "format": "double" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "PayrollAnalysisEmployeeRoleBreakdownReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "summary": "Update Term Calendar", + "tags": [ + "TermCalendar" + ] + } + }, + "/employers/{employerId}/termcalendaryears/{termCalendarId}": { + "get": { + "description": "Lists all Years for an Employer and given Term Calendar.", + "operationId": "IndexTermCalendarYear", + "parameters": [ + { + "description": "The Id of the Employer for which you want to get Term Calendar Year list", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + { + "description": "The Id of the Term Calendar for which you want to list Years", + "in": "path", + "name": "termCalendarId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.TermCalendarYearResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "model": { - "$ref": "#/components/schemas/PayrollAnalysisEmployeeRoleBreakdownReport" + "400": { + "description": "Bad Request" }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "PayrollValueType": { - "enum": [ - "BasicPay", - "Gross", - "GrossForTax", - "GrossForNi", - "EmployerNi", - "EmployeeNi", - "EmployerNiOffPayroll", - "RealTimeClass1ANi", - "Tax", - "NetPay", - "Adjustments", - "TakeHomePay", - "NonTaxOrNICPmt", - "ItemsSubjectToClass1NIC", - "DednsFromNetPay", - "Tcp_Tcls", - "Tcp_Pp", - "Tcp_Op", - "FlexiDd_Death", - "FlexiDd_Death_NonTax", - "FlexiDd_Pension", - "FlexiDd_Pension_NonTax", - "Smp", - "Spp", - "Sap", - "Shpp", - "Spbp", - "StudentLoanRecovered", - "PostgradLoanRecovered", - "PensionablePay", - "NonTierablePay", - "EmployeePensionContribution", - "EmployerPensionContribution", - "EmpeePenContribnsNotPaid", - "EmpeePenContribnsPaid", - "AttachmentOrderDeductions", - "CisDeduction", - "CisVat", - "CisUmbrellaFee", - "CisUmbrellaFeePostTax", - "Pbik", - "MapsMiles", - "UmbrellaFee", - "AppLevyDeduction", - "PaymentAfterLeaving", - "TaxOnPaymentAfterLeaving", - "Ssp", - "AttachmentOrderAdminFee", - "EmployeePensionNetPay", - "EmployeePensionRas", - "EmployeePensionSalSac", - "EmployeePensionContributionAvc", - "Deductions", - "Additions", - "PensionableEarnings", - "TotalGross", - "FlexiDd_SeriousIllHealth", - "FlexiDd_SeriousIllHealth_NonTax", - "ForeignTaxCredit", - "ForeignTaxReclaimed", - "AverageHolidayPay", - "P45Gross", - "P45Tax", - "Sncp", - "FlexiDd_StandAloneLumpSum", - "FlexiDd_StandAloneLumpSum_NonTax", - "FlexiDd_PensionCommencementExcess", - "FlexiDd_PensionCommencementExcess_NonTax" - ], - "type": "string" + "summary": "List Term Calendar Years", + "tags": [ + "TermCalendarYear" + ] }, - "PayrunEmail": { - "required": [ - "name", - "recipientAddress" - ], - "type": "object", - "properties": { - "isActive": { - "type": "boolean", - "description": "If false then this email won't be sent" - }, - "name": { - "maxLength": 75, - "minLength": 1, - "type": "string", - "description": "Only used for reference, not included in the email" - }, - "templateType": { - "$ref": "#/components/schemas/EmployerTemplateType" - }, - "recipientAddress": { - "maxLength": 150, - "minLength": 1, - "type": "string", - "description": "The address to which the email should be sent", - "format": "email" - }, - "pdfPassword": { - "maxLength": 50, - "type": "string", - "description": "If a value is provided, then all PDFs attached to the email will be encrypted using this password", - "nullable": true - }, - "attachPayslips": { - "type": "boolean", - "description": "If set to true then Payslips will be attached to the email" - }, - "payslips_Unemailed": { - "type": "boolean", - "description": "If AttachPayslips is true and this property is also true then only payslips that haven't already been sent directly to employees will be attached." - }, - "payslips_SingleFile": { - "type": "boolean", - "description": "If AttachPayslips is true and this property is also true then the payslips will be attached as a single file rather than as separate PDFs," - }, - "attachPaymentSummary": { - "type": "boolean", - "description": "If set to True then the PaymentSummary report will be attached to the Email" - }, - "attachP32": { - "type": "boolean", - "description": "If set to True then the P32 report will be attached to the email" - }, - "attachP30": { - "type": "boolean", - "description": "If set to True then the P30 report will be attached to the email" - }, - "attachGrossToNet": { - "type": "boolean", - "description": "If set to True then the GrossToNet report will be attached to the email" - }, - "attachPensionContributions": { - "type": "boolean", - "description": "If set to True then the Pensions Contributions report will be attached to the email" - }, - "attachCostAnalysis": { - "type": "boolean", - "description": "If set to True then the Cost Analysis report will be attached to the email" - }, - "attachCostOfEmployment": { - "type": "boolean", - "description": "If set to True then the Cost of Employment report will be attached to the email" - }, - "attachFullSummaryOfPay": { - "type": "boolean", - "description": "If set to True then the Full Summary Of Payment report will be attached to the email" - }, - "attachBankPayments": { - "type": "boolean", - "description": "If set to True then the Bank Payments CSV file will be attached to the email" - }, - "customSubject": { - "maxLength": 200, - "type": "string", - "description": "If TemplateType is null then you can provide a subject line here to be used for the email", - "nullable": true - }, - "customBody": { - "type": "string", - "description": "If TemplateType is null then you can provide the body text here to be used for the email", - "nullable": true - }, - "customBody_IsHtml": { - "type": "boolean", - "description": "If the CustomBody is in HTML format, set this to true." + "post": { + "description": "Creates a new Year data for the Employer and given Term Calendar.", + "operationId": "CreateTermCalendarYear", + "parameters": [ + { + "description": "The Id of the Employer to which the Term Calendar Year belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "childId": { - "type": "string", - "description": "This is nothing but the UniqueId of the model.", - "format": "uuid" + { + "description": "The Id of the Term Calendar which you want to add a new year", + "in": "path", + "name": "termCalendarId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + } + } } }, - "additionalProperties": false, - "description": "PayrunEmails are sent automatically when a payrun has been finalised" - }, - "PayrunPaymentsReport": { - "type": "object", - "properties": { - "payments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayRunPayment" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarYearResponse" + } + } }, - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/BackgroundTaskStatus" - }, - "statusMessage": { - "type": "string", - "description": "[readonly] A message to elaborate on the Status", - "nullable": true - }, - "link": { - "type": "string", - "description": "[readonly] If available, a link to the payments in an ExternalDataProvider", - "nullable": true - }, - "connectedExternalDataProvider": { - "$ref": "#/components/schemas/ExternalDataProvider" - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "periodTo": { - "type": "integer", - "format": "int32" - }, - "startPeriodName": { - "type": "string", - "nullable": true - }, - "endPeriodName": { - "type": "string", - "nullable": true + "description": "Created" }, - "startDate": { - "type": "string", - "format": "date" + "400": { + "description": "Bad Request" }, - "endDate": { - "type": "string", - "format": "date" + "404": { + "description": "Not Found" + } + }, + "summary": "Create Term Calendar Year", + "tags": [ + "TermCalendarYear" + ] + } + }, + "/employers/{employerId}/termcalendaryears/{termCalendarId}/{id}": { + "delete": { + "description": "Deletes a specified Term Calendar Year.", + "operationId": "DeleteTermCalendarYear", + "parameters": [ + { + "description": "The Id of the Employer to which the Term Calendar Year belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "report": { - "$ref": "#/components/schemas/Report" + { + "description": "The Id of the Term Calendar which you want to delete a year", + "in": "path", + "name": "termCalendarId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "description": "The Id of the Term Calendar Year which you want to delete", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "title": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "isDraft": { - "type": "boolean" + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "After finalising a PayRun, employees need to actually be paid.\r\nThis model is returned by the Reports API and is used to provide details of a payment that needs to be made." + "summary": "Delete Term Calendar Year", + "tags": [ + "TermCalendarYear" + ] }, - "PayrunPaymentsReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "get": { + "description": "Gets a specified Term Calendar Year.", + "operationId": "GetTermCalendarYear", + "parameters": [ + { + "description": "The Id of the Employer to which the Term Calendar Year belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + { + "description": "The Id of the Term Calendar to which the Year belongs", + "in": "path", + "name": "termCalendarId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "$ref": "#/components/schemas/PayrunPaymentsReport" + { + "description": "The Id of the Term Calendar Year which you want to fetch", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarYearResponse" + } + } + }, + "description": "Success" }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" + "summary": "Get Term Calendar Year", + "tags": [ + "TermCalendarYear" + ] }, - "Payslip": { - "type": "object", - "properties": { - "isClosed": { - "type": "boolean", - "description": "[readonly] Indicates if the Payrun has been finalised" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "periodNumber": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "string", - "description": "[readonly] A description of the period that Payslip relates to.", - "nullable": true - }, - "from": { - "type": "string", - "description": "[readonly] The start date of the period this Payslip covers.", - "format": "date" - }, - "to": { - "type": "string", - "description": "[readonly] The end date of the period this Payslip covers.", - "format": "date" - }, - "paymentDate": { - "type": "string", - "description": "[readonly] The date the Employee will be paid on", - "format": "date" + "put": { + "description": "Updates Year data for the Employer and given Term Calendar.", + "operationId": "UpdateTermCalendarYear", + "parameters": [ + { + "description": "The Id of the Employer to which the Term Calendar Year belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "note": { - "type": "string", - "description": "[readonly] Any note that should appear on the payslip", - "nullable": true + { + "description": "The Id of the Term Calendar which you want to update existing year", + "in": "path", + "name": "termCalendarId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "allowanceNote": { - "type": "string", - "description": "[readonly] Details of remaining allowance to show on payslip", - "nullable": true + { + "description": "The Id of the Term Calendar Year which you want to update data", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarYearRequest" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.TermCalendarYearResponse" + } + } + }, + "description": "Success" }, - "employee": { - "$ref": "#/components/schemas/Item" + "400": { + "description": "Bad Request" }, - "logoUrl": { - "type": "string", - "description": "[readonly] The Logo to include on the payslip", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Update Term Calendar Year", + "tags": [ + "TermCalendarYear" + ] + } + }, + "/employers/{employerId}/tierablepay/{payrunEntryId}": { + "get": { + "operationId": "GetTierablePay", + "parameters": [ + { + "description": "Employer ID", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employer": { - "$ref": "#/components/schemas/Item" + { + "description": "Payrun entry ID", + "in": "path", + "name": "payrunEntryId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "double", + "type": "number" + } + } + }, + "description": "Success" }, - "employerAddress": { - "$ref": "#/components/schemas/Address" + "400": { + "description": "Bad Request" + } + }, + "summary": "Calculate tierable pay", + "tags": [ + "TierablePay" + ] + } + }, + "/employers/{employerId}/webhooks": { + "get": { + "description": "Lists all Webhooks for an Employer.", + "operationId": "IndexWebhook", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list Webhooks", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List Webhooks", + "tags": [ + "Webhook" + ] + }, + "post": { + "description": "Creates a new Webhook for the Employer.", + "operationId": "CreateWebhook", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Webhook" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Webhook" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Webhook" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Webhook" + } + } + } + }, + "responses": { + "201": { + "description": "Created" }, - "hmrcDetails": { - "$ref": "#/components/schemas/HmrcDetails" + "400": { + "description": "Bad Request" }, - "payOptions": { - "$ref": "#/components/schemas/PayOptions" + "404": { + "description": "Employer Not Found" + } + }, + "summary": "Create Webhook", + "tags": [ + "Webhook" + ] + } + }, + "/employers/{employerId}/webhooks/samples/{webhookEvent}": { + "get": { + "description": "Returns an example of the data you can expect your end point to receive when a webhook is fired.", + "operationId": "SampleWebhook", + "parameters": [ + { + "description": "The Id of the Employer to which the Webhook belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employmentDetails": { - "$ref": "#/components/schemas/EmploymentDetails" + { + "description": "The WebhookEvent that you want a sample value for.", + "in": "path", + "name": "webhookEvent", + "required": true, + "schema": { + "$ref": "#/components/schemas/WebhookEvent" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "Success" + } + }, + "summary": "Sample Value", + "tags": [ + "Webhook" + ] + } + }, + "/employers/{employerId}/webhooks/{id}": { + "delete": { + "description": "Deletes the specified Webhook.", + "operationId": "DeleteWebhook", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "personalDetails": { - "$ref": "#/components/schemas/PersonalDetails" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "totals": { - "$ref": "#/components/schemas/PayRunTotals" + "400": { + "description": "Bad Request" + } + }, + "summary": "Delete Webhook", + "tags": [ + "Webhook" + ] + }, + "get": { + "description": "Gets the Webhook specified.", + "operationId": "GetWebhook", + "parameters": [ + { + "description": "The Id of the Employer to which the Webhook belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "totalsYtd": { - "$ref": "#/components/schemas/PayRunTotals" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Webhook" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Webhook", + "tags": [ + "Webhook" + ] + }, + "put": { + "description": "Updates a Webhook for the Employer.", + "operationId": "UpdateWebhook", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PayslipLine" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Webhook" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Webhook" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Webhook" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Webhook" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Webhook" + } + } }, - "description": "[readonly] The lines to display on the Payslip", - "nullable": true - }, - "employerNi": { - "type": "number", - "description": "[readonly] The Employer NI Contribution amount", - "format": "double" + "description": "Success" }, - "employerPensionContribs": { - "type": "number", - "description": "[readonly] The Employer Pension Contribution Amount", - "format": "double" + "404": { + "description": "Employer Not Found" + } + }, + "summary": "Update Webhook", + "tags": [ + "Webhook" + ] + } + }, + "/employers/{employerId}/webhooks/{id}/payloads": { + "get": { + "description": "Returns a list of all WebhookPayloads for this webhook", + "operationId": "PayloadsWebhook", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "depts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StringDecimalKeyValuePair" - }, - "description": "The employees Department Membership(s) at the time the payrun was finalised", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "umbrellaPayment": { - "$ref": "#/components/schemas/UmbrellaPayment" + { + "in": "query", + "name": "pageNum", + "schema": { + "format": "int32", + "type": "integer" + } }, - "costCentres": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StringDecimalKeyValuePair" + { + "in": "query", + "name": "pageSize", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "description": "The employees Cost Centre Membership(s) only populated when creating journals", - "nullable": true + "description": "Success" + } + }, + "summary": "List WebhookPayloads", + "tags": [ + "Webhook" + ] + } + }, + "/employers/{employerId}/webhooks/{id}/payloads/{payloadId}": { + "get": { + "description": "Returns the specified WebhookPayload for this webhook", + "operationId": "PayloadWebhook", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employeeRoleAnalysisCategoryCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeRoleAnalysisCategoryCode" - }, - "description": "The EmployeeRoleAnalysisCategoryCodes only populated when creating journals", - "nullable": true + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employeeCostCentres": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeCostCentre" + { + "in": "path", + "name": "payloadId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookPayload" + } + } }, - "description": "The Employee Cost Centre Membership(s) by role only populated when creating journals", - "nullable": true - }, - "departmentMemberships": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DepartmentMembership" + "description": "Success" + } + }, + "summary": "Get WebhookPayload", + "tags": [ + "Webhook" + ] + } + }, + "/employers/{employerId}/workingpatterns": { + "get": { + "description": "Lists all WorkingPattern for the Employer specified.", + "operationId": "IndexAsyncWorkingPattern", + "parameters": [ + { + "description": "The Id of the Employer for which you want to list WorkingPattern", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "description": "The Employee Department Membership(s) by role only populated when creating journals", - "nullable": true - }, - "pensionContributionsByRole": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + "description": "Success" + } + }, + "summary": "List WorkingPatterns", + "tags": [ + "WorkingPattern" + ] + }, + "post": { + "description": "Creates a new WorkingPattern for the Employer.", + "operationId": "CreateWorkingPattern", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.WorkingPatternRequest" + } }, - "description": "The Pension Employer contribution by role only populated when creating journals", - "nullable": true - }, - "employerPensionContributions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployerPensionContribution" + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.WorkingPatternRequest" + } }, - "description": "[readonly] The list of Employer Pension Contribution(s)", - "nullable": true - }, - "employeePensionContributions": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DecimalDecimalBooleanPensionRuleValueTuple" + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.WorkingPatternRequest" + } }, - "description": "Dictionary of Pension Contributions(s) Keyed on PensionId containing Employee Pension and AVC Contribution(s) Bfd, AVC indicator and pension rule", - "nullable": true + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.WorkingPatternRequest" + } + } } }, - "additionalProperties": false, - "description": "If you don't want to use our customisable PDFs for Payslips then you can retrieve the raw data used to create a Payslip.\r\nThis is the model you will be provided with for each employee." - }, - "PayslipCustomisation": { - "type": "object", - "properties": { - "custom": { - "type": "boolean", - "description": "Whether or not you are customising the Payslip.\r\nThis should always be true if you are providing any other values." - }, - "includeLogo": { - "type": "boolean", - "description": "Whether or not to include the employer logo on the payslip." - }, - "customCssOption": { - "$ref": "#/components/schemas/ReportCustomCssOption" - }, - "customCss": { - "maxLength": 2500, - "type": "string", - "nullable": true - }, - "removeYtd": { - "type": "boolean", - "description": "Whether or not to remove the YTD column" - }, - "includeEmployerAddress": { - "type": "boolean", - "description": "Whether or not to include the employer address" - }, - "useUmbrellaFormat": { - "type": "boolean", - "description": "If true then the format the payslip will include details of the Umbrella Payment as well as employer costs" - }, - "filename": { - "maxLength": 200, - "type": "string", - "nullable": true - }, - "includeDepartment": { - "type": "boolean", - "description": "Whether or not to include the primary department of the employee on the payslip" - }, - "includeHealthAndSocialCareMessage": { - "type": "boolean", - "description": "Whether or not to include health and social car message" - }, - "includeBenefits": { - "type": "boolean", - "description": "Whether or not to include any payrolled benefits" - }, - "removePensionYtd": { - "type": "boolean", - "description": "Whether or not to remove the pension YTD column" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkingPattern" + } + } + }, + "description": "Created" }, - "paperSize": { - "$ref": "#/components/schemas/PdfPaperSize" + "400": { + "description": "Bad Request" }, - "orientation": { - "$ref": "#/components/schemas/PdfPaperOrientation" + "404": { + "description": "Employer Not Found" + } + }, + "summary": "Create WorkingPattern", + "tags": [ + "WorkingPattern" + ] + } + }, + "/employers/{employerId}/workingpatterns/{id}": { + "delete": { + "description": "Deletes the specified WorkingPattern.", + "operationId": "DeleteWorkingPattern", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "margins": { - "$ref": "#/components/schemas/PdfPaperMargins" + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false, - "description": "Used to represent any customisations you make to the look of Payslip PDFs.\r\nThis is covered in detail in the Guides section." + "summary": "Delete WorkingPattern", + "tags": [ + "WorkingPattern" + ] }, - "PayslipLine": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/PayslipLineType" - }, - "code": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "secondaryDescription": { - "type": "string", - "nullable": true - }, - "value": { - "type": "number", - "format": "double" - }, - "multiplier": { - "type": "number", - "description": "[readonly] If the Code is a multiplier code then this is the multiplier. Value has already been calculated so this is just for reference", - "format": "double", - "nullable": true - }, - "attachmentOrderId": { - "type": "string", - "description": "[readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO", - "format": "uuid", - "nullable": true - }, - "pensionId": { - "type": "string", - "description": "[readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS", - "format": "uuid", - "nullable": true - }, - "loanId": { - "type": "string", - "description": "[readonly] The Id of the associated Loan, if any.", - "format": "uuid", - "nullable": true - }, - "currencySymbol": { - "type": "string", - "nullable": true - }, - "formattedValue": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "isNetToGross": { - "type": "boolean", - "description": "If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target." - }, - "targetNetToGrossValue": { - "type": "number", - "description": "The orginal net fixed addition amount that is considered to be a take home pay target.", - "format": "double", - "nullable": true - }, - "leaveId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "roleId": { - "type": "string", - "description": "The employee role which is associated with this payslip line.\r\nIf set to null, the payslip line is not related with a role.", - "format": "uuid", - "nullable": true - }, - "isAutoCalculatedBackPayLine": { - "type": "boolean" - }, - "isAutomaticBackPay": { - "type": "boolean" + "get": { + "description": "Gets the WorkingPattern specified.", + "operationId": "GetAsyncWorkingPattern", + "parameters": [ + { + "description": "The Id of the Employer to which the WorkingPattern belongs.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "hasSecondaryDescription": { - "type": "boolean", - "readOnly": true + { + "description": "The id of the WorkingPattern you want to retrieve.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.WorkingPatternResponse" + } + } + }, + "description": "Success" }, - "contributesToBasicPay": { - "type": "boolean" + "403": { + "description": "Forbidden" }, - "isNotional": { - "type": "boolean", - "description": "Determines whether the transaction involves non-monetary benefits for payroll processing, potentially subject to tax and National Insurance" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Get WorkingPattern", + "tags": [ + "WorkingPattern" + ] }, - "PayslipLineType": { - "enum": [ - "BasicPay", - "Gross", - "Net", - "Nic", - "Tax", - "Cis" + "put": { + "description": "Updates the details of an existing WorkingPattern.", + "operationId": "UpdateWorkingPattern", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "PayslipReleasePaymentDateRule": { - "enum": [ - "WorkingDays", - "CalendarDays" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.WorkingPatternRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.WorkingPatternRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.WorkingPatternRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.WorkingPatternRequest" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.WorkingPatternResponse" + } + } + }, + "description": "Success" + }, + "404": { + "description": "Not Found" + } + }, + "summary": "Update WorkingPattern", + "tags": [ + "WorkingPattern" + ] + } + }, + "/employers/{id}": { + "delete": { + "operationId": "DeleteEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want to delete.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + } + }, + "summary": "Delete an Employer", + "tags": [ + "Employer" + ] }, - "PayslipReleaseTime": { - "enum": [ - "OneMinutePastMidnight", - "OneAm", - "TwoAm", - "ThreeAm", - "FourAm", - "FiveAm", - "SixAm", - "SevenAm", - "EightAm", - "NineAm", - "TenAm", - "ElevenAm", - "TwelveNoon", - "OnePm", - "TwoPm", - "ThreePm", - "FourPm", - "FivePm", - "SixPm", - "SevenPm", - "EightPm", - "NinePm", - "TenPm", - "ElevenPm", - "OneMinuteToMidnight" + "get": { + "operationId": "GetEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want to retrieve.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployerResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Get an Employer", + "tags": [ + "Employer" + ] }, - "PayslipReleaseType": { - "enum": [ - "Immediately", - "Scheduled" + "put": { + "operationId": "UpdateEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "PayslipReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployerRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployerRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployerRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployerRequest" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployerResponse" + } + } + }, + "description": "Success" }, - "model": { - "$ref": "#/components/schemas/Payslip" + "404": { + "description": "Not Found" + } + }, + "summary": "Update an Employer", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/YearEnd": { + "get": { + "description": "View the changes that will be made when you start the next tax year for the employer", + "operationId": "ReviewYearEndEmployer", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/YearEnd" + } + } + }, + "description": "Success" }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "404": { + "description": "NotFound -\r\nWe don't yet support the tax year following the employers current tax year" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" + "summary": "Review Year End Changes", + "tags": [ + "Employer" + ] }, - "PdfPaperMargins": { - "type": "object", - "properties": { - "top": { - "type": "number", - "format": "double" - }, - "right": { - "type": "number", - "format": "double" + "put": { + "description": "Apply the changes for the year end and start the next tax year for the employer.", + "operationId": "ApplyYearEndEmployer", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "additionalProperties": {}, + "type": "object" + } + }, + "application/json": { + "schema": { + "additionalProperties": {}, + "type": "object" + } + }, + "application/json-patch+json": { + "schema": { + "additionalProperties": {}, + "type": "object" + } + }, + "text/json": { + "schema": { + "additionalProperties": {}, + "type": "object" + } + } }, - "bottom": { - "type": "number", - "format": "double" + "description": "You can suppress the emailing of P60s and/or CIS Statements by supplying a value of true for dontEmailP60s and/or dontEmailCisStatements" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/YearEnd" + } + } + }, + "description": "Success" }, - "left": { - "type": "number", - "format": "double" + "404": { + "description": "NotFound -\r\nWe don't yet support the tax year following the employers current tax year" } }, - "additionalProperties": false - }, - "PdfPaperOrientation": { - "enum": [ - "Landscape", - "Portrait" + "summary": "Make Year End Changes", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/accrual-holiday-scheme/employee": { + "get": { + "operationId": "GetEmployeesWithAccrualHolidaySchemeEmployer", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "PdfPaperSize": { - "enum": [ - "Letter", - "LetterSmall", - "A4", - "A4Small", - "A5" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get List of Employees with Holiday Accrual Scheme", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/automation": { + "get": { + "description": "Returns the AutomationSettings for the Employer", + "operationId": "GetAutomationSettingsEmployer", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationSettings" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Automation Settings", + "tags": [ + "Employer" + ] }, - "PdfPasswordType": { - "enum": [ - "InitialsAndDob", - "NiNumber", - "Custom" + "put": { + "description": "Updates the AutomationSettings for the Employer", + "operationId": "UpdateAutomationSettingsEmployer", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "Pension": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" - }, - "contributionLevelType": { - "$ref": "#/components/schemas/PensionContributionLevelType" - }, - "endDate": { - "type": "string", - "description": "The date the employee left the scheme", - "format": "date", - "nullable": true - }, - "endReason": { - "$ref": "#/components/schemas/PensionEndReason" - }, - "joinReason": { - "$ref": "#/components/schemas/PensionJoinReason" - }, - "startPayRunEntryId": { - "type": "integer", - "description": "[readonly] Holds the Id for the payroll that the employee joined the scheme", - "format": "int32", - "nullable": true - }, - "endPayRunEntryId": { - "type": "integer", - "description": "[readonly] Holds the Id for the payroll that the employee left the scheme", - "format": "int32", - "nullable": true - }, - "startReportingType": { - "$ref": "#/components/schemas/PensionReportingType" - }, - "endReportingType": { - "$ref": "#/components/schemas/PensionReportingType" - }, - "pensionOpeningBalances": { - "$ref": "#/components/schemas/PensionOpeningBalances" - }, - "reasonForLeaving": { - "maxLength": 100, - "type": "string", - "description": "If a value is provided for EndDate then this is the reason for leaving the employee left the scheme", - "nullable": true - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true - }, - "pensionSchemeId": { - "type": "string", - "format": "uuid" - }, - "pensionScheme": { - "$ref": "#/components/schemas/PensionScheme" - }, - "workerGroupId": { - "type": "string", - "format": "uuid" - }, - "workerGroup": { - "$ref": "#/components/schemas/WorkerGroup" - }, - "startDate": { - "type": "string", - "format": "date" - }, - "memberReferenceNumber": { - "maxLength": 25, - "type": "string", - "nullable": true - }, - "overrideContributions": { - "type": "boolean", - "description": "If this is set to true then the Contributions levels set for the WorkerGroup will be replaced with the values provided here" - }, - "employeeContribution": { - "type": "number", - "description": "The amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on EmployeeContributionIsPercentage.\r\nThis is read-only if OverrideContributions is false", - "format": "double" - }, - "employeeContributionIsPercentage": { - "type": "boolean", - "description": "Determines whether the Value of the EmployeeContribution is a fixed amount or a percentage," - }, - "employerContribution": { - "type": "number", - "description": "The amount the employer contributes towards the pension. Could be a percentage or a fixed amount depending on EmployerContributionIsPercentage.\r\nThis is read-only if OverrideContributions is false", - "format": "double" - }, - "employerContributionIsPercentage": { - "type": "boolean", - "description": "Determines whether the Value of the EmployerContribution is a fixed amount or a percentage," - }, - "employerContributionTopUpPercentage": { - "type": "number", - "description": "Increase Employer Contribution by this percentage of the Employee Contribution", - "format": "double" - }, - "isAeQualifyingScheme": { - "type": "boolean", - "description": "[readonly] Whether or not the associated PensionScheme is a Qualifying Scheme for AutoEnrolment" - }, - "isTeachersPension": { - "type": "boolean", - "description": "[readonly] Whether or not the associated PensionScheme is a Teachers' Pension (determined by its CsvFormat)" - }, - "aeStatusAtJoining": { - "$ref": "#/components/schemas/AeStatus" - }, - "externalEmployeeId": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "additionalVoluntaryContribution": { - "type": "number", - "description": "Any additional voluntary amount the employer contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage.", - "format": "double" - }, - "avcIsPercentage": { - "type": "boolean", - "description": "Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage," - }, - "exitViaProvider": { - "type": "boolean", - "readOnly": true - }, - "teachersPensionDetails": { - "$ref": "#/components/schemas/TeachersPensionDetails" - }, - "forcedTier": { - "type": "string", - "description": "If the WorkerGroup ContributionLevelType is a Tiered Scheme then you can specify the name of the tier to force the employee on to.\r\nIf none is specified then the Tier is determined by the earnings in the period", - "nullable": true - }, - "forceEnrolment": { - "type": "boolean", - "description": "If the PensionScheme is connected to an ExternalDataProvider that supports enrolment then setting this to true will force this employee to be enrolled with the next submission." - }, - "employerContributionIncludesNiSaving": { - "type": "boolean", - "description": "Employer Contribution includes the Employers NI saving" - }, - "employerContributionNiSavingPercentage": { - "type": "number", - "description": "Increase Employer Contribution by this percentage of the Employers NI saving", - "format": "double" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AutomationSettings" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationSettings" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/AutomationSettings" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AutomationSettings" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutomationSettings" + } + } + }, + "description": "Success" + } + }, + "summary": "Update Automation Settings", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/calendar": { + "get": { + "description": "Get a list of upcoming CalendarEntry for the Employer.", + "operationId": "CalendarEmployer", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "fiftyFiftySchemeMember": { - "type": "boolean", - "description": "if an employee as a member of the 50/50 LGPS scheme, they can enable contribution to 50% of the normal contributions." + { + "in": "query", + "name": "from", + "schema": { + "format": "date-time", + "type": "string" + } }, - "associatedEmployeeRoles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + { + "in": "query", + "name": "to", + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/CalendarEntry" + }, + "type": "array" + } + } }, - "description": "The list of employee roles associated with the pension membership", - "nullable": true - }, - "autoEnrolled": { - "type": "boolean", - "description": "[readonly] Is True if the employee joined this Pension due to an AutoEnrolment action" + "description": "Success" } }, - "additionalProperties": false - }, - "PensionAdministrator": { - "type": "object", - "properties": { - "name": { - "maxLength": 150, - "type": "string", - "nullable": true - }, - "email": { - "maxLength": 150, - "type": "string", - "nullable": true - }, - "address": { - "$ref": "#/components/schemas/Address" + "summary": "Get Employer Calendar", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/can-use-premium-connectors": { + "put": { + "description": "Sets Can Use Premium Connectors Setting\r\nA boolean value needs to be sent in the body to indicate if the employer can use premium connectors.\r\nSo sending false would result in the employer not being able to use the premium connectors.", + "operationId": "UpdateEmployerCanUsePremiumConnectorsEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "type": "boolean" + } + }, + "application/json": { + "schema": { + "type": "boolean" + } + }, + "application/json-patch+json": { + "schema": { + "type": "boolean" + } + }, + "text/json": { + "schema": { + "type": "boolean" + } + } + } + }, + "responses": { + "204": { + "description": "No Content" }, - "telephone": { - "maxLength": 100, - "type": "string", - "nullable": true + "403": { + "description": "Forbidden" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "PensionContributionLevelType": { - "enum": [ - "UserDefined", - "StatutoryMinimum", - "Nhs2015", - "TeachersPensionEnglandAndWales", - "LgpsEnglandAndWales", - "TpFasterAccrual", - "TpAdditionalPensionContributions", - "TpActuariallyAdjustedBenefits", - "TpFamilyBenefits", - "tpPastAddedYears", - "tpHigherSalaries", - "tpPreston", - "LgpsAdditionalPensionContributions", - "LgpsSharedAdditionalPensionContributions", - "LgpsAdditionalRegularContributions", - "LgpsAddedYearsContributions", - "LgpsSharedAdditionalPensionLumpSump", - "LgpsPartTimeBuyBack", - "PrudentialAVC", - "tpElectedFurtherEmployment", - "AptisCashIsa", - "AptisStocksSharesIsa", - "AptisInvestmentAccount" + "summary": "Update Can Use Premium Connectors Setting", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/custompayslip": { + "get": { + "description": "Get the settings used to customise PaySlips for this Employer", + "operationId": "CustomPayslipEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want customisations for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "PensionContributionsSubmission": { - "type": "object", - "properties": { - "employerId": { - "type": "integer", - "format": "int32" - }, - "payRunId": { - "type": "integer", - "format": "int32" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "schemeId": { - "type": "integer", - "format": "int32" - }, - "status": { - "$ref": "#/components/schemas/BackgroundTaskStatus" - }, - "externalId": { - "type": "string", - "nullable": true - }, - "statusMessage": { - "type": "string", - "nullable": true - }, - "submissionData": { - "nullable": true - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayslipCustomisation" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "This model is used to track submission of Pension Contributions to an external data provider." + "summary": "Get Payslip Customisations", + "tags": [ + "Employer" + ] }, - "PensionCsvFormat": { - "enum": [ - "Papdis", - "Nest", - "NowPensions", - "TeachersPensionMdc", - "TeachersPensionMcr", - "ScottishWidowsAssistMe", - "Aviva", - "AvivaEnrolment", - "ScottishWidowsWorkplace", - "Aegon", - "ScottishWidowsWorkplaceEnrolment", - "AegonEnrolment", - "StandardLifeWorkplaceHub", - "PeoplesPension", - "StandardLifeWorkplaceHubEnrolment", - "PrudentialAvc", - "LgpsCivicaUpm", - "LgpsIConnect", - "StandardLifeGpz", - "StandardLifeGpzEnrolment", - "Aptis", - "AptisEnrolment", - "NestEnrolment", - "TruePotential", - "TruePotentialEnrolment" + "post": { + "description": "Set the settings used to customise PaySlips for this Employer", + "operationId": "UpdateCustomPayslipEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want customisations for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "PensionEndReason": { - "enum": [ - "OptOut", - "CeasedMembership", - "Leaver" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PayslipCustomisation" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayslipCustomisation" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PayslipCustomisation" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PayslipCustomisation" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayslipCustomisation" + } + } + }, + "description": "Success" + } + }, + "summary": "Update Payslip Customisations", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/evc": { + "get": { + "description": "Gets the history of changes to the EVC OptIn setting for the employer.", + "operationId": "GetEvcOptInHistoryEmployer", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployerEvcOptInHistory" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get EVC OptIn History", + "tags": [ + "Employer" + ] }, - "PensionJoinReason": { - "enum": [ - "Automatic", - "OptIn", - "VoluntaryJoiner", - "ContractualPension", - "Enrol" + "put": { + "description": "Sets the EVC OptIn setting for the employer.\r\nA boolean value needs to be sent in the body to indicate if the employer is opted in.\r\nSo sending false would result in the employer being opted out.", + "operationId": "SetEvcOptInEmployer", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "type": "boolean" + } + }, + "application/json": { + "schema": { + "type": "boolean" + } + }, + "application/json-patch+json": { + "schema": { + "type": "boolean" + } + }, + "text/json": { + "schema": { + "type": "boolean" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Update EVC OptIn", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/groups": { + "get": { + "operationId": "GetGroupMembershipsEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want to retrieve Groups for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployerGroupMembership" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Employer Groups", + "tags": [ + "Employer" + ] }, - "PensionMembershipReportLine": { - "type": "object", - "properties": { - "payrollCode": { - "type": "string", - "description": "Payroll code of the employee", - "nullable": true - }, - "pensionScheme": { - "type": "string", - "description": "Employee pension scheme", - "nullable": true - }, - "workerGroup": { - "type": "string", - "description": "The WorkerGroup of the employee pension scheme", - "nullable": true - }, - "joinDate": { - "type": "string", - "description": "The Join Date of the employee", - "nullable": true - }, - "joinReason": { - "$ref": "#/components/schemas/PensionJoinReason" - }, - "isPensionJoinerActionReported": { - "type": "boolean", - "description": "Indicates whether the pension joiner action is reported." - }, - "endDate": { - "type": "string", - "description": "Pension End Date", - "nullable": true - }, - "endReason": { - "$ref": "#/components/schemas/PensionEndReason" - }, - "isPensionLeaverActionReported": { - "type": "boolean", - "description": "Indicates whether the pension leaver action is reported.", - "nullable": true - }, - "aeStatusAtJoining": { - "$ref": "#/components/schemas/AeStatus" - }, - "roleRefs": { - "type": "string", - "description": "role references of employee", - "nullable": true - }, - "pensionEmployeeContribution": { - "type": "number", - "description": "Pension Employee Contribution", - "format": "double", - "nullable": true - }, - "isEmployeeContributionPercentage": { - "type": "boolean", - "description": "Indicates whether the EmployeeContribution is expressed as a percentage." - }, - "pensionTiers": { - "type": "string", - "description": "Pension Tiers of the employee", - "nullable": true - }, - "pensionAVCContribution": { - "type": "number", - "description": "Pension AVC Contribution of employee", - "format": "double", - "nullable": true - }, - "isAvcPercentage": { - "type": "boolean", - "description": "Indicates whether the AvcContribution is expressed as a percentage." - }, - "pensionEmployerContribution": { - "type": "number", - "description": "Employer Pension Contribution", - "format": "double", - "nullable": true - }, - "isEmployerContributionPercentage": { - "type": "boolean", - "description": "Indicates whether the EmployerContribution is expressed as a percentage." - }, - "pensionMembershipNo": { - "type": "string", - "description": "Pension Membership Number", - "nullable": true - }, - "mcrRoleID1": { - "type": "string", - "description": "MCR Role ID1 for teachers pension", - "nullable": true - }, - "mcrRoleID2": { - "type": "string", - "description": "MCR Role ID2 for teachers pension", - "nullable": true - }, - "isHalfContributionMember": { - "type": "boolean", - "description": "50/50 membership", - "nullable": true - }, - "tpAdminNino": { - "type": "string", - "description": "Teachers Pension Admin Ni Number", - "nullable": true - }, - "pensionableEarningsYTD": { - "type": "number", - "description": "Pensionable earning year to date", - "format": "double", - "nullable": true - }, - "pensionablePayYTD": { - "type": "number", - "description": "Pensionable Pay year to date", - "format": "double", - "nullable": true - }, - "employeePensionYTD": { - "type": "number", - "description": "Employee pension year to date", - "format": "double", - "nullable": true - }, - "avcPensionYTD": { - "type": "number", - "description": "Additional Voluntary Contribution YTD", - "format": "double", - "nullable": true - }, - "employerPensionYTD": { - "type": "number", - "description": "Employer pension year to date", - "format": "double", - "nullable": true - }, - "assumedPensionablePayYTD": { - "type": "number", - "description": "Assumed pensionable pay year to date", - "format": "double", - "nullable": true - }, - "reasonForLeaving": { - "type": "string", - "description": "Reason the employee left the scheme", - "nullable": true - }, - "pensionId": { - "type": "string", - "description": "Pension Id", - "format": "uuid" - }, - "employee": { - "$ref": "#/components/schemas/Item" - }, - "department": { - "type": "string", - "nullable": true + "put": { + "operationId": "SetGroupMembershipsEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want to set Groups for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployerGroupMembership" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployerGroupMembership" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployerGroupMembership" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployerGroupMembership" + }, + "type": "array" + } + } } }, - "additionalProperties": false - }, - "PensionMembershipsReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PensionMembershipReportLine" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EmployerGroupMembership" + }, + "type": "array" + } + } }, - "nullable": true - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "periodTo": { - "type": "integer", - "format": "int32" - }, - "startPeriodName": { - "type": "string", - "nullable": true - }, - "endPeriodName": { - "type": "string", - "nullable": true - }, - "startDate": { - "type": "string", - "format": "date" - }, - "endDate": { - "type": "string", - "format": "date" - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true - }, - "isDraft": { - "type": "boolean" + "description": "Success" } }, - "additionalProperties": false - }, - "PensionMembershipsReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, + "summary": "Set Employer Groups", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/logo": { + "post": { + "description": "If you already have a URL for the employer Logo then you can just set the LogoUrl property of the Employer.\r\nAlternatively, submit a logo here and we'll upload it and set the LogoUrl for you.", + "operationId": "UpdateLogoEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/PensionMembershipsReport" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "PensionOpeningBalances": { - "type": "object", - "properties": { - "pensionableEarnings": { - "pattern": "^[\\d\\.\\,]{1,8}([\\.\\,]\\d{0,2})?$", - "type": "number", - "description": "Opening balances for pensionable earnings", - "format": "double" - }, - "pensionablePay": { - "pattern": "^[\\d\\.\\,]{1,8}([\\.\\,]\\d{0,2})?$", - "type": "number", - "description": "Opening balances for pensionable pay", - "format": "double" - }, - "employeePensionContribution": { - "pattern": "^[\\d\\.\\,]{1,8}([\\.\\,]\\d{0,2})?$", - "type": "number", - "description": "Opening balances for employee pension contribution", - "format": "double" - }, - "employeePensionContributionAvc": { - "pattern": "^[\\d\\.\\,]{1,8}([\\.\\,]\\d{0,2})?$", - "type": "number", - "description": "Opening balances for employee pension contribution avc", - "format": "double" - }, - "employerPensionContribution": { - "pattern": "^[\\d\\.\\,]{1,8}([\\.\\,]\\d{0,2})?$", - "type": "number", - "description": "Opening balances for employer pension contribution", - "format": "double" - }, - "assumedPensionablePay": { - "pattern": "^[\\d\\.\\,]{1,8}([\\.\\,]\\d{0,2})?$", - "type": "number", - "description": "Opening balances for assumed pensionable pay", - "format": "double" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.EmployerResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "PensionPayCode": { - "enum": [ - "Default", - "CustomPayCodes", - "PayCodeSets" - ], - "type": "string" - }, - "PensionProvider": { - "required": [ - "name" + "summary": "Update Employer Logo", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/openingbalances": { + "get": { + "description": "Returns the EmployerOpeningBalances for the Employer", + "operationId": "GetEmployerOpeningBalancesEmployer", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "object", - "properties": { - "name": { - "maxLength": 100, - "minLength": 1, - "type": "string" - }, - "accountNo": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "portal": { - "maxLength": 100, - "type": "string", - "format": "uri", - "nullable": true - }, - "website": { - "maxLength": 100, - "type": "string", - "format": "uri", - "nullable": true - }, - "address": { - "$ref": "#/components/schemas/Address" - }, - "telephone": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "papdisVersion": { - "$ref": "#/components/schemas/PapdisVersion" - }, - "papdisProviderId": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "papdisEmployerId": { - "maxLength": 40, - "type": "string", - "nullable": true - }, - "csvFormat": { - "$ref": "#/components/schemas/PensionCsvFormat" - }, - "excludeNilPaidFromContributions": { - "type": "boolean", - "description": "If we're sending contributions to an external provider then we'll include all employees that were on the payrun.\r\nIf you want to exclude employees that don't have any contributions to report then set this to true." - }, - "payPeriodDateAdjustment": { - "type": "integer", - "description": "If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here.\r\nA negative value of will move the date back in time.", - "format": "int32" - }, - "miscBoolean1": { - "type": "boolean", - "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\"" - }, - "miscBoolean2": { - "type": "boolean", - "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it indicates whether or not to approve payments after submitting contributions" - }, - "miscString1": { - "maxLength": 50, - "type": "string", - "description": "This field has different uses dependent on the ExternalDataProvider, if any.\r\nFor Nest, it dictates the PaymentSource.", - "nullable": true - }, - "miscString2": { - "maxLength": 50, - "type": "string", - "description": "This field has different uses dependent on the ExternalDataProvider, if any.", - "nullable": true - }, - "optOutWindow": { - "type": "integer", - "description": "The number of days or months that an employee has to Opt out after being enrolled", - "format": "int32" - }, - "optOutWindowIsMonths": { - "type": "boolean", - "description": "Determines whether the value given for OptOutWindow is in Months (true) or days (false)" - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerOpeningBalances" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get EmployerOpeningBalances", + "tags": [ + "Employer" + ] }, - "PensionRefund": { - "required": [ - "additionalVoluntaryContribution", - "assumedPensionablePay", - "employeeRefund", - "employerRefund", - "isPreviousTaxYearRefund", - "pensionableEarning", - "pensionablePay" + "put": { + "description": "Updates the EmployerOpeningBalances for the Employer for their StartYear", + "operationId": "UpdateEmployerOpeningBalancesEmployer", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "object", - "properties": { - "employeeRefund": { - "type": "number", - "format": "double" - }, - "employerRefund": { - "type": "number", - "format": "double" - }, - "pensionSchemeUniqueId": { - "type": "string", - "format": "uuid" - }, - "pensionUniqueId": { - "type": "string", - "format": "uuid" - }, - "payInCurrentPayRun": { - "type": "boolean" - }, - "payRun": { - "$ref": "#/components/schemas/Item" - }, - "pensionableEarning": { - "type": "number", - "format": "double" - }, - "pensionablePay": { - "type": "number", - "format": "double" - }, - "additionalVoluntaryContribution": { - "type": "number", - "format": "double" - }, - "assumedPensionablePay": { - "type": "number", - "format": "double" - }, - "isPreviousTaxYearRefund": { - "type": "boolean" - }, - "tierName": { - "minLength": 1, - "type": "string", - "nullable": true - }, - "tierRate": { - "maximum": 0.999, - "minimum": 0.001, - "type": "number", - "format": "double", - "nullable": true - }, - "employee": { - "$ref": "#/components/schemas/Item" - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/EmployerOpeningBalances" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerOpeningBalances" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/EmployerOpeningBalances" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/EmployerOpeningBalances" + } + } } }, - "additionalProperties": false, - "description": "Used to represent a Pension Refund" - }, - "PensionReportingType": { - "enum": [ - "UsePayRun", - "UseAssessment", - "AlreadyReported", - "UseExisting" - ], - "type": "string" - }, - "PensionRule": { - "enum": [ - "ReliefAtSource", - "SalarySacrifice", - "NetPayArrangement" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerOpeningBalances" + } + } + }, + "description": "Success" + } + }, + "summary": "Update EmployerOpeningBalances", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/rti/requiringattention": { + "get": { + "description": "Returns all RTI documents that have a Submission Status of NotSubmitted or ErrorResponse", + "operationId": "RtiRequiringAttentionEmployer", + "parameters": [ + { + "description": "The Id of the Employer", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "PensionScheme": { - "required": [ - "name" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "RTI Documents Requiring Attention", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/suggestPayrollCode": { + "get": { + "description": "This helper method returns a unique code for the next Employee that you create for the specified Employer.\r\nYou don't have to use the value provided, you can use any value that is unique across Employees for the Employer.", + "operationId": "SuggestPayCodeEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want a suggestion for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "object", - "properties": { - "name": { - "maxLength": 150, - "minLength": 1, - "type": "string" - }, - "provider": { - "$ref": "#/components/schemas/PensionProvider" - }, - "administrator": { - "$ref": "#/components/schemas/PensionAdministrator" - }, - "pensionRule": { - "$ref": "#/components/schemas/PensionRule" - }, - "qualifyingScheme": { - "type": "boolean", - "description": "Set to true if this is a Qualifying Scheme for Auto Enrolment" - }, - "disableAeLetters": { - "type": "boolean", - "description": "Set to true if the provider deals with AutoEnrolment Letters and therefore the system should not generate them" - }, - "subtractBasicRateTax": { - "type": "boolean" - }, - "payMethod": { - "$ref": "#/components/schemas/PayMethod" - }, - "bankDetails": { - "$ref": "#/components/schemas/BankDetails" - }, - "useCustomPayCodes": { - "type": "boolean", - "description": "If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable\r\nwe'll instead treat it as pensionable if the Code is included in CustomPayCodes" - }, - "useCustomPayCodesForTierablePay": { - "type": "boolean", - "description": "If set to true then rather than using the setting on the PayCode to determine if the pay is tierable\r\nwe'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes" - }, - "customPayCodes": { - "type": "array", - "items": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "Success" + } + }, + "summary": "Suggest Payroll Code", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/users": { + "get": { + "description": "Returns a list of Users that have access to the given Employer", + "operationId": "ListUsersEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want a list of Users for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "description": "If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code\r\nthat we'll treat as being pensionable.", - "nullable": true - }, - "tierablePayCustomPayCodes": { - "type": "array", - "items": { + "description": "Success" + } + }, + "summary": "List Users", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/users/owner": { + "put": { + "description": "Sets the owner for the employer. You must be the owner of the Employer to set this value.\r\nThe user you are setting as the owner must already have the role Admin.\r\nYou can get a list of users from the ListUsers endpoint.", + "operationId": "SetOwnerEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want to change the ownership of.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "format": "uuid", + "type": "string" + } }, - "description": "If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code\r\nthat we'll treat as being tierable.", - "nullable": true - }, - "workerGroups": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WorkerGroup" + "application/json": { + "schema": { + "format": "uuid", + "type": "string" + } }, - "description": "A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup", - "nullable": true - }, - "externalDataProviderId": { - "$ref": "#/components/schemas/ExternalDataProviderId" - }, - "externalDataCompany": { - "$ref": "#/components/schemas/ExternalDataCompany" - }, - "payCodeType": { - "$ref": "#/components/schemas/PensionPayCode" - }, - "tierablePayPayCodeType": { - "$ref": "#/components/schemas/PensionPayCode" - }, - "payCodeSetUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "tierablePayPayCodeSetUniqueId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "paymentDateRule": { - "$ref": "#/components/schemas/PaymentDateRule" - }, - "paymentDateDayOfWeek": { - "$ref": "#/components/schemas/DayOfWeek" - }, - "paymentDateDayOfMonth": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "reportOptionsLgpsIConnect": { - "$ref": "#/components/schemas/PensionSchemeReportOptionsLgpsIConnect" - }, - "reportOptionsLgpsCivicaUpm": { - "$ref": "#/components/schemas/PensionSchemeReportOptionsLgpsCivicaUpm" - }, - "deficitValueOrdinal": { - "type": "integer", - "description": "The Ordinal used to identify the PaySchedule which the Deficit will be against", - "format": "int32", - "nullable": true - }, - "deficitValue": { - "type": "number", - "description": "The Defict value that will be deducted in a PaySchedule", - "format": "double", - "nullable": true - }, - "includeDeficitValue": { - "type": "boolean", - "description": "Set to true if this a Deficit Payment needs to be assigned to a PaySchedule" - }, - "deficitValuePayPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "nominalCodeMappings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PensionSchemeNominalCodeMapping" + "application/json-patch+json": { + "schema": { + "format": "uuid", + "type": "string" + } }, - "description": "The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration", - "nullable": true + "text/json": { + "schema": { + "format": "uuid", + "type": "string" + } + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true - } + "description": "The Id of the User you want a change ownership to. They must already be a user for this employer and have the admin role assigned to them." }, - "additionalProperties": false - }, - "PensionSchemeNominalCodeMapping": { - "type": "object", - "properties": { - "nominalCode": { - "maxLength": 500, - "type": "string", - "description": "Nominal Code for pension scheme", - "nullable": true - }, - "nominalName": { - "maxLength": 100, - "type": "string", - "description": "Nominal Name", - "nullable": true - }, - "journalNarrative": { - "maxLength": 500, - "type": "string", - "description": "Journal narrative description.", - "nullable": true - }, - "payCode": { - "type": "string", - "nullable": true + "responses": { + "200": { + "description": "Success" } }, - "additionalProperties": false - }, - "PensionSchemeReportOptionsLgpsCivicaUpm": { - "type": "object", - "properties": { - "payrollNumber": { - "$ref": "#/components/schemas/LgpsCivicaPayrollNumber" - }, - "casualHours": { - "$ref": "#/components/schemas/LgpsCivicaCasualHours" - }, - "omitHeaderLine": { - "type": "boolean" - }, - "includeFolderNo": { - "type": "boolean" - }, - "excludeSchoolEmployerName": { - "type": "boolean" - }, - "addressesForNewJoinersOnly": { - "type": "boolean" - }, - "proRatePtHoursWeeksWorked": { - "type": "boolean" - }, - "fullTimeHoursAsOneHundred": { - "type": "boolean" - }, - "includeWeeksWorkedColumns": { - "type": "boolean" + "summary": "Set Owner", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/users/userEmployer": { + "get": { + "description": "Returns a UserEmployer for the given Employer Id", + "operationId": "GetUserEmployerEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want to get the User from.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "PensionSchemeReportOptionsLgpsIConnect": { - "type": "object", - "properties": { - "fileType": { - "$ref": "#/components/schemas/LgpsIConnectFileType" - }, - "payrollReference1": { - "$ref": "#/components/schemas/LgpsIConnectPayrollReference" - }, - "payrollReference2": { - "$ref": "#/components/schemas/LgpsIConnectPayrollReference" - }, - "payrollReference3": { - "$ref": "#/components/schemas/LgpsIConnectPayrollReference" - }, - "populateEmailAddress": { - "type": "boolean" - }, - "populateTelephoneNumber": { - "type": "boolean" - }, - "populateMobileNumber": { - "type": "boolean" - }, - "populateWorksPlaceName": { - "type": "boolean" - }, - "populateWorksAddress": { - "type": "boolean" - }, - "populateWorksEmailAddress": { - "type": "boolean" - }, - "includeEmploymentBreaks": { - "type": "boolean" - }, - "breakReasonSmpIndicatorOnly": { - "type": "boolean" - }, - "populateMaritalStatus": { - "type": "boolean" - }, - "includeAeQualifyingEarnings": { - "type": "boolean" - }, - "proRatePtHoursByTermTimeWeeks": { - "type": "boolean" - }, - "ignoreTermTimeWeeksForFteFinalPay": { - "type": "boolean" - }, - "showFteAnnualSalaryForFteFinalPay": { - "type": "boolean" - }, - "casualStaffHoursAsOne": { - "type": "boolean" - }, - "casualStaffIndicatorAsY": { - "type": "boolean" - }, - "ignoreHours": { - "type": "boolean" - }, - "forceUpperCase": { - "type": "boolean" - }, - "salaryType": { - "$ref": "#/components/schemas/LgpsIConnectSalaryType" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserEmployer" + } + } + }, + "description": "Success" }, - "customText": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "PensionSummary": { - "type": "object", - "properties": { - "pensionId": { - "type": "string", - "description": "[readonly] The Id of the Pension.", - "format": "uuid" - }, - "name": { - "type": "string", - "description": "[readonly] The name of the PensionScheme to which contributions have been made.", - "nullable": true - }, - "pensionSchemeId": { - "type": "string", - "description": "[readonly] The Id of the PensionScheme.", - "format": "uuid" - }, - "startDate": { - "type": "string", - "description": "[readonly] Pension Start Date", - "format": "date" - }, - "endDate": { - "type": "string", - "description": "Pension End Date", - "format": "date", - "nullable": true - }, - "workerGroupId": { - "type": "string", - "description": "[readonly] The Id of the WorkerGroup.", - "format": "uuid" - }, - "pensionRule": { - "$ref": "#/components/schemas/PensionRule" - }, - "subtractedBasicRateTax": { - "type": "boolean", - "description": "[readonly] The SubtractedBasicRateTax applied from the PensionScheme SubtractBasicRateTax." - }, - "papdisPensionProviderId": { - "type": "string", - "description": "[readonly] Papdis information from the PensionScheme", - "nullable": true - }, - "papdisEmployerId": { - "type": "string", - "description": "[readonly] Papdis information from the PensionScheme", - "nullable": true - }, - "employeePensionContributionMultiplier": { - "type": "number", - "description": "[readonly] If the PensionScheme is set to SubtractBasicRateTax then this value is used to reduce the contribution amount.\r\nOtherwise it is set as 1.", - "format": "double" - }, - "additionalVoluntaryContribution": { - "type": "number", - "description": "[readonly] Any Additional Voluntary Contribution the Employee has chosen to make\r\nOtherwise it is set as 1.", - "format": "double" - }, - "avcIsPercentage": { - "type": "boolean", - "description": "[readonly] Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage," - }, - "autoEnrolled": { - "type": "boolean", - "description": "[readonly] Any Additional Voluntary Contribution the Employee has chosen to make\r\nOtherwise it is set as 1." - }, - "workerGroup": { - "$ref": "#/components/schemas/WorkerGroup" - }, - "forcedTier": { - "type": "string", - "description": "[readonly] If the WorkerGroup ContributionLevelType is a Tiered Scheme then the name of the tier to force the employee on to may be specified.\r\nIf none is specified then the Tier is determined by the earnings in the period", - "nullable": true - }, - "tiers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TieredPensionRate" - }, - "nullable": true - }, - "assumedPensionablePay": { - "type": "number", - "description": "[readonly] Assumed Pensionable Pay. If the employee is receiving any Statutory Leave that has an AssumedPensionablePay value set\r\nthen it'll be shown here.", - "format": "double", - "nullable": true - }, - "pensionablePayCodes": { - "type": "array", - "items": { + "summary": "Get User Employer", + "tags": [ + "Employer" + ] + } + }, + "/employers/{id}/users/{userId}": { + "delete": { + "description": "Removes a User from an Employer.\r\nYou cannot remove Users that are marked as the owner of the Employer.\r\nYou must be the owner of the Employer in order to remove other Users.", + "operationId": "RemoveUserEmployer", + "parameters": [ + { + "description": "The Id of the Employer you want to remove the User from.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", "type": "string" - }, - "description": "[readonly] If the pension scheme is set to override the Pensionale PayCodes, then this is what they've been set to.", - "nullable": true + } }, - "tierablePayPayCodes": { - "type": "array", - "items": { + { + "description": "The Id of the User you want to remove.", + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Remove User", + "tags": [ + "Employer" + ] + } + }, + "/engine/branding/{brandCode}": { + "get": { + "description": "Returns Tenant Branding. Not for public use, will return 401", + "operationId": "GetTenantBrandingEngine", + "parameters": [ + { + "description": "The Id of the Tenant you want to retrieve.", + "in": "path", + "name": "brandCode", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + } }, - "description": "[readonly] If the pension scheme is set to override the TierablePay PayCodes, then this is what they've been set to.", - "nullable": true - }, - "isHalfContributionMember": { - "type": "boolean", - "description": "if an employee as a member of the 50/50 LGPS scheme, they can enable contribution to 50% of the normal contributions." - }, - "pensionableEarnings": { - "type": "number", - "description": "[readonly] The amount of the Gross that is subject to Pension Deductions.\r\nIf the Pension Scheme uses Qualifying Earnings (upper and lower limits) then this value is before those are applied\r\nApplied only if an employee has more than one pension assigned to them", - "format": "double" - }, - "pensionablePay": { - "type": "number", - "description": "[readonly] The amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup.\r\nApplied only if an employee has more than one pension assigned to them", - "format": "double" - }, - "nonTierablePay": { - "type": "number", - "description": "[readonly] The value of any pay that shouldn't count towards determining a pension tier.", - "format": "double" - }, - "employeePensionContribution": { - "type": "number", - "description": "[readonly] The value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions", - "format": "double" - }, - "employeePensionContributionAvc": { - "type": "number", - "description": "[readonly] The value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution", - "format": "double" - }, - "employerPensionContribution": { - "type": "number", - "description": "[readonly] The value of the Pension Contribution being made by the Employer for this Employee", - "format": "double" - }, - "isForEndedPension": { - "type": "boolean", - "description": "[readonly] Determines whether the pension summary is related to a pension that has ended or not" - }, - "associatedEmployeeRoles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - }, - "nullable": true - }, - "notionalPay": { - "type": "number", - "description": "Pay value based on regular pay lines and the pension's associated roles\r\nSet before any adjustments for things like stat payments", - "format": "double" - }, - "pensionableEarningsBfd": { - "type": "number", - "description": "[readonly] The brought forward Year to Date amount of the Gross that is subject to Pension Deductions.\r\nApplied only if an employee has more than one pension assigned to them", - "format": "double" - }, - "pensionablePayBfd": { - "type": "number", - "description": "[readonly] The brought forward Year to Date amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup.\r\nApplied only if an employee has more than one pension assigned to them", - "format": "double" - }, - "employeePensionContributionBfd": { - "type": "number", - "description": "[readonly] The brought forward Year to Date value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions", - "format": "double" - }, - "assumedPensionablePayBfd": { - "type": "number", - "description": "[readonly] The brought forward Year to Date value of Assumed Pensionable Pay. If the employee is receiving any Statutory Leave that has an AssumedPensionablePay value set\r\nthen it'll be shown here.", - "format": "double", - "nullable": true - }, - "employerPensionContributionBfd": { - "type": "number", - "description": "[readonly] The brought forward Year to Date value of the Pension Contribution being made by the Employer for this Employee", - "format": "double" - }, - "employeePensionContributionAvcBfd": { - "type": "number", - "description": "[readonly] The brought forward Year to Date value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution", - "format": "double" - }, - "whenEarnedPensionSummaries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PensionSummary" - }, - "description": "The list of pension summaries created on the base of when earned additions' and deductions' pension calculations for back paid periods", - "nullable": true - }, - "periodFrom": { - "type": "string", - "description": "Nullable DateTime property \"PeriodFrom\" to store the start date of the PayPeriod the current PensionSummary is attributable to.\r\nApplicable only for when the pension summary is created on the base of when earned additions' and deductions' pension calculations for back paid periods", - "format": "date", - "nullable": true - }, - "periodTo": { - "type": "string", - "description": "Nullable DateTime property \"PeriodTo\" to store the start date of the PayPeriod the current PensionSummary is attributable to.\r\nApplicable only for when the pension summary is created on the base of when earned additions' and deductions' pension calculations for back paid periods", - "format": "date", - "nullable": true - }, - "whenEarnedPensionableEarningsCorrection": { - "type": "number", - "description": "[readonly] The when earned amount correction to the Gross that is subject to Pension Deductions.", - "format": "double" - }, - "whenEarnedPensionablePayCorrection": { - "type": "number", - "description": "[readonly] The when earned amount correction to the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup.", - "format": "double" - }, - "whenEarnedEmployeePensionContributionCorrection": { - "type": "number", - "description": "[readonly] The when earned amount correction to the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions", - "format": "double" - }, - "whenEarnedEmployerPensionContributionCorrection": { - "type": "number", - "description": "[readonly] The when earned amount correction to the Pension Contribution being made by the Employer for this Employee", - "format": "double" - }, - "whenEarnedEmployeePensionContributionAvcCorrection": { - "type": "number", - "description": "[readonly] The when earned amount correction to Pension Contribution being made by this Employee as an Additional Voluntary Contribution", - "format": "double" - }, - "whenEarnedPensionableEarningsCorrectionBfd": { - "type": "number", - "description": "[readonly] The brought forward Year to Date when earned amount correction to the Gross that is subject to Pension Deductions.", - "format": "double" - }, - "whenEarnedPensionablePayCorrectionBfd": { - "type": "number", - "description": "[readonly] The brought forward Year to Date when earned amount correction to the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup.", - "format": "double" - }, - "whenEarnedEmployeePensionContributionCorrectionBfd": { - "type": "number", - "description": "[readonly] The brought forward Year to Date when earned amount correction to the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions", - "format": "double" - }, - "whenEarnedEmployerPensionContributionCorrectionBfd": { - "type": "number", - "description": "[readonly] The brought forward Year to Date when earned amount correction to the Pension Contribution being made by the Employer for this Employee", - "format": "double" - }, - "whenEarnedEmployeePensionContributionAvcCorrectionBfd": { - "type": "number", - "description": "[readonly] The brought forward Year to Date when earned amount correction to Pension Contribution being made by this Employee as an Additional Voluntary Contribution", - "format": "double" - }, - "nominalCodeMappings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PensionSchemeNominalCodeMapping" - }, - "description": "List of Nominal Code Mappings of the Pension", - "nullable": true + "description": "Success" } }, - "additionalProperties": false, - "description": "If a PayRunEntry contains pension contributions then it'll also include a PensionSummary model\r\ngiving further information about the Pension Scheme and the contributions made" - }, - "PensionSummaryCostBreakdown": { - "type": "object", - "properties": { - "pensionRule": { - "$ref": "#/components/schemas/PensionRule" - }, - "payCodes": { - "type": "array", - "items": { - "type": "string" + "summary": "Tenant Branding", + "tags": [ + "Engine" + ] + } + }, + "/engine/config": { + "get": { + "description": "Returns the raw configuration data that is used as the basis for any calculations for the given tax year.\r\nYou would never need to use this configuration values yourself in any API calls. It is provided just for information purposes", + "operationId": "ConfigEngine", + "parameters": [ + { + "description": "The year that you want to retrieve details for. If not provided then current tax year will be used.", + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaxYearConfig" + } + } }, - "description": "The list of pay codes associated with this pension rule.", - "nullable": true + "description": "Success" + } + }, + "summary": "Get Configuration", + "tags": [ + "Engine" + ] + } + }, + "/engine/config/{taxYear}/ni/{payPeriod}": { + "get": { + "description": "Returns the National Insurance thresholds for the given PayPeriod", + "operationId": "GetNationalInsuranceThresholdsEngine", + "parameters": [ + { + "description": "The year that you want to retrieve details for.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "amount": { - "type": "number", - "description": "The amount associated with this pension entry.", - "format": "double" + { + "description": "The PayPeriod (ie, monthly) that you want to retrieve details for.", + "in": "path", + "name": "payPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "pensionableEarnings": { - "type": "number", - "description": "The total pensionable earnings relevant to this pension rule.", - "format": "double" + { + "in": "query", + "name": "periodStart", + "schema": { + "format": "date-time", + "type": "string" + } }, - "employeePensionContribution": { - "type": "number", - "description": "The contribution amount made by the employee towards the pension.", - "format": "double" + { + "in": "query", + "name": "periodEnd", + "schema": { + "format": "date-time", + "type": "string" + } }, - "employerPensionContribution": { - "type": "number", - "description": "The contribution amount made by the employer towards the pension.", - "format": "double" + { + "description": "The date as of which you want to retrieve details for. If not provided then latest available details for the current tax year will be used.", + "in": "query", + "name": "effectiveDate", + "schema": { + "format": "date-time", + "type": "string" + } } - }, - "additionalProperties": false - }, - "PensionablePayDefinition": { - "enum": [ - "NotApplicable", - "QualifyingEarnings", - "BasicPay", - "TotalPay", - "OwnDefinition" ], - "type": "string" - }, - "PensionerPayroll": { - "type": "object", - "properties": { - "inReceiptOfPension": { - "type": "boolean", - "description": "If set to true then the FPS will have the OccPenInd flag set to 'yes'" - }, - "bereaved": { - "type": "boolean", - "description": "Indicator that Occupational Pension is being paid because they are a recently bereaved Spouse/Civil Partner" - }, - "amount": { - "type": "number", - "description": "Annual amount of occupational pension", - "format": "double" - }, - "startDate": { - "type": "string", - "description": "Start date of occupational Pension", - "format": "date", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NationalInsuranceCalculationPeriodValues" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "PeriodValue": { - "type": "object", - "properties": { - "effectiveFrom": { - "type": "string", - "description": "The date when these period values are effective", - "format": "date", - "nullable": true + "summary": "Get National Insurance Thresholds", + "tags": [ + "Engine" + ] + } + }, + "/engine/ni": { + "get": { + "description": "Calculates National Insurance Contributions due given the values specified.\r\nYou would never need to use this API call in practice. It is provided just for information and testing purposes.\r\nAccess is limited so you'll probably receive a 401 response if you try to use it.", + "operationId": "CalculateNiEngine", + "parameters": [ + { + "description": "If not provided then current tax year will be used.", + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "annualValue": { - "type": "number", - "description": "The Annual value", - "format": "double" + { + "description": "The gross amount for which tax should be calculated.", + "in": "query", + "name": "gross", + "schema": { + "format": "double", + "type": "number" + } }, - "periodValues": { - "type": "object", - "properties": { - "Custom": { - "type": "number", - "format": "double" - }, - "Monthly": { - "type": "number", - "format": "double" - }, - "FourWeekly": { - "type": "number", - "format": "double" - }, - "Fortnightly": { - "type": "number", - "format": "double" - }, - "Weekly": { - "type": "number", - "format": "double" - }, - "Daily": { - "type": "number", - "format": "double" - } - }, - "additionalProperties": false, - "description": "Period values for different pay periods", - "nullable": true + { + "description": "The letter from the NI table", + "in": "query", + "name": "niCategory", + "schema": { + "type": "string" + } }, - "midYearChanges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PeriodValue" + { + "description": "The PayPeriod (Weekly, Monthly, etc)", + "in": "query", + "name": "payPeriod", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NationalInsuranceCalculation" + } + } }, - "description": "Any optional changes to the period values that are effective from a specified date in the middle of a tax year", - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "PersonalDetails": { - "required": [ - "dateOfBirth", - "gender", - "maritalStatus" - ], - "type": "object", - "properties": { - "address": { - "$ref": "#/components/schemas/Address" - }, - "maritalStatus": { - "$ref": "#/components/schemas/MaritalStatus" - }, - "title": { - "maxLength": 30, - "type": "string", - "nullable": true - }, - "firstName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "middleName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "lastName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "alternativeEmail": { - "maxLength": 100, - "type": "string", - "format": "email", - "nullable": true - }, - "previousSurName": { - "maxLength": 35, - "type": "string", - "nullable": true - }, - "email": { - "maxLength": 100, - "type": "string", - "format": "email", - "nullable": true - }, - "emailPayslip": { - "type": "boolean", - "description": "If set to true then the employees Payslip will be sent by email when a PayRun is finalised." - }, - "pdfPassword": { - "type": "string", - "description": "Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property.", - "nullable": true - }, - "pdfPasswordType": { - "$ref": "#/components/schemas/PdfPasswordType" - }, - "emailStatement": { - "type": "boolean", - "description": "Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted." - }, - "photoUrl": { - "maxLength": 250, - "type": "string", - "nullable": true + "summary": "Calculate NI due.", + "tags": [ + "Engine" + ] + } + }, + "/engine/tax": { + "get": { + "description": "Calculates tax amount due, given the values specified.\r\nYou would never need to use this API call. It is provided just for information and testing purposes.\r\nAccess is limited so you'll probably receive a 401 response if you try to use it.", + "operationId": "CalculateTaxEngine", + "parameters": [ + { + "description": "If not provided then current tax year will be used.", + "in": "query", + "name": "taxYear", + "schema": { + "$ref": "#/components/schemas/TaxYear" + } }, - "photoSasUrl": { - "type": "string", - "nullable": true + { + "description": "If not provided then the default code for the tax year will be used.", + "in": "query", + "name": "taxCode", + "schema": { + "type": "string" + } }, - "telephone": { - "maxLength": 30, - "type": "string", - "nullable": true + { + "description": "The gross amount for which tax should be calculated.", + "in": "query", + "name": "gross", + "schema": { + "format": "double", + "type": "number" + } }, - "mobile": { - "maxLength": 30, - "type": "string", - "nullable": true + { + "in": "query", + "name": "periodStart", + "schema": { + "format": "date-time", + "type": "string" + } }, - "dateOfBirth": { - "type": "string", - "format": "date" + { + "in": "query", + "name": "periodEnd", + "schema": { + "format": "date-time", + "type": "string" + } }, - "statePensionAge": { - "type": "integer", - "description": "[readonly] Automatically calculated.", - "format": "int32" + { + "description": "The PayPeriod (Weekly, Monthly, etc)", + "in": "query", + "name": "payPeriod", + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "gender": { - "$ref": "#/components/schemas/Gender" + { + "description": "The period that this payment is being made for", + "in": "query", + "name": "period", + "schema": { + "default": 1, + "format": "int32", + "type": "integer" + } }, - "niNumber": { - "maxLength": 15, - "type": "string", - "nullable": true + { + "description": "If set to true then tax will be calculated in a Week1/Month1 basis", + "in": "query", + "name": "week1", + "schema": { + "default": false, + "type": "boolean" + } }, - "passportNumber": { - "maxLength": 25, - "type": "string", - "nullable": true + { + "description": "Gross pay to date", + "in": "query", + "name": "grossToDate", + "schema": { + "default": 0, + "format": "double", + "type": "number" + } }, - "partnerDetails": { - "$ref": "#/components/schemas/PartnerDetails" + { + "description": "Tax paid to date", + "in": "query", + "name": "taxToDate", + "schema": { + "default": 0, + "format": "double", + "type": "number" + } } - }, - "additionalProperties": false - }, - "PricingBand": { - "type": "object", - "properties": { - "description": { - "type": "string", - "nullable": true - }, - "from": { - "type": "integer", - "format": "int32" - }, - "to": { - "type": "integer", - "format": "int32" - }, - "price": { - "type": "number", - "format": "double" - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "double", + "type": "number" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "PricingTable": { - "type": "object", - "properties": { - "name": { - "maxLength": 50, - "type": "string", - "nullable": true - }, - "minimumCharge": { - "type": "number", - "format": "double" - }, - "bands": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PricingBand" - }, - "nullable": true - }, - "isDefault": { - "type": "boolean" - }, - "netSuiteItemCode": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "netSuiteDescription": { - "maxLength": 40, - "type": "string", - "nullable": true + "summary": "Calculate Tax due", + "tags": [ + "Engine" + ] + } + }, + "/external-data/{id}/respond": { + "get": { + "description": "This endpoint is used by third parties to respond to an oAuth authorization request. You do not need to use this", + "operationId": "RespondExternalData", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExternalDataProviderId" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "in": "query", + "name": "error", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false - }, - "ProRataRule": { - "enum": [ - "WorkingDaysInPeriod", - "CalendarDaysInPeriod", - "TwoSixtyRule", - "ThreeSixFiveRule" ], - "type": "string" - }, - "ProcessingNote": { - "required": [ - "note" - ], - "type": "object", - "properties": { - "payRunEntryId": { - "type": "string", - "description": "The Id of the payrunEntry this ProcessingNote relates to, if any", - "format": "uuid", - "nullable": true - }, - "note": { - "minLength": 1, - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/Item" - }, - "payRun": { - "$ref": "#/components/schemas/Item" - }, - "date": { - "type": "string", - "format": "date" - }, - "documentCount": { - "type": "integer", - "description": "[readonly] The number of attachments associated with this model", - "format": "int32" - }, - "documents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - }, - "description": "[readonly] The attachments associated with this model", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/ProcessingNoteStatus" - }, - "updatedByName": { - "type": "string", - "description": "Name of the user who was last to update the record", - "nullable": true - }, - "completedDate": { - "type": "string", - "description": "UpdatedDate is assigned to this to get around the base implementation of UpdatedDate having [JsonIgnore] tag", - "format": "date", - "nullable": true + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "3rd Party Response", + "tags": [ + "ExternalData" + ] + } + }, + "/invitations/{id}": { + "post": { + "description": "Accepts the Invitation.\r\nThe user making this API call must have the email address that the invite was created for and the email address must be verified.", + "operationId": "AcceptInvitation", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "description": "Set to true to accept the invitation or false to decline it.", + "in": "query", + "name": "acceptInvitation", + "schema": { + "type": "boolean" + } } - }, - "additionalProperties": false - }, - "ProcessingNoteStatus": { - "enum": [ - "New", - "Complete" ], - "type": "string" - }, - "RecoverableAmounts": { - "type": "object", - "properties": { - "taxMonth": { - "type": "integer", - "format": "int32" - }, - "smpRecovered": { - "type": "number", - "description": "Value of Statutory Maternity Pay recovered year to date", - "format": "double" - }, - "sppRecovered": { - "type": "number", - "description": "Value of Statutory Paternity Pay recovered year to date", - "format": "double" - }, - "sapRecovered": { - "type": "number", - "description": "Value of Statutory Adoption Pay recovered year to date", - "format": "double" - }, - "shPPRecovered": { - "type": "number", - "description": "Value of Shared Parental Pay recovered year to date", - "format": "double" - }, - "spbpRecovered": { - "type": "number", - "description": "Value of Statutory Parental Bereavement Pay recovered year to date", - "format": "double" - }, - "sncpRecovered": { - "type": "number", - "description": "Value of Statutory Neonatal Care Pay recovered year to date", - "format": "double" - }, - "nicCompensationOnSMP": { - "type": "number", - "description": "Value of NIC compensation on SMP year to date", - "format": "double" - }, - "nicCompensationOnSPP": { - "type": "number", - "description": "Value of NIC compensation on Statutory Paternity Pay year to date", - "format": "double" - }, - "nicCompensationOnSAP": { - "type": "number", - "description": "Value of NIC compensation on Statutory Adoption Pay year to date", - "format": "double" + "responses": { + "204": { + "description": "No Content" }, - "nicCompensationOnShPP": { - "type": "number", - "description": "Value of NIC compensation on Shared Parental Pay year to date", - "format": "double" + "400": { + "description": "Bad Request" }, - "nicCompensationOnSPBP": { - "type": "number", - "description": "Value of NIC compensation on Statutory Parental Bereavement Pay year to date", - "format": "double" + "404": { + "description": "Not Found" + } + }, + "summary": "Accept Invitation", + "tags": [ + "Invitation" + ] + } + }, + "/jobs": { + "get": { + "description": "Returns a list of Jobs for all Employers that belong to the User with pagination.", + "operationId": "GetJobsListJob", + "parameters": [ + { + "description": "The employer identifier.", + "in": "query", + "name": "employerId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "nicCompensationOnSNCP": { - "type": "number", - "description": "Value of NIC compensation on Statutory Neonatal Care Pay year to date", - "format": "double" + { + "description": "Type of the job.", + "in": "query", + "name": "jobType", + "schema": { + "$ref": "#/components/schemas/JobType" + } }, - "cisDeductionsSuffered": { - "type": "number", - "description": "Value of CIS deductions suffered year to date", - "format": "double" + { + "description": "The page number.", + "in": "query", + "name": "pageNum", + "schema": { + "format": "int32", + "type": "integer" + } }, - "total": { - "type": "number", - "description": "The total value of the reclaimed amounts", - "format": "double", - "readOnly": true + { + "description": "Size of the page.", + "in": "query", + "name": "pageSize", + "schema": { + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false - }, - "Report": { - "enum": [ - "GrossToNet", - "GrossToNetCis", - "PayrunPayments", - "Furlough", - "PensionContribs", - "Journal", - "HourlyPay", - "UmbrellaReconciliation", - "UmbrellaStatement", - "StatutoryPay", - "CostAnalysis", - "CostOfEmployment", - "FullSummaryOfPay", - "P11", - "P11d", - "P30", - "P32", - "P45", - "P60", - "EmployeeExport", - "RightToWork", - "AeoStatement", - "HolidayAllowances", - "HolidayPayAccruals", - "AeAssessments", - "CisStatement", - "SubcontractorSummary", - "PayrollAnalysis", - "VarianceReport", - "P11Detailed", - "NiLetterValidation", - "Ytd", - "TaxCodeChanges", - "EmployeeBenefits", - "MemberEnrolment", - "AttachmentOrders", - "NiYtd", - "ApprenticeshipLevy", - "TeachersPensionEoy", - "MaternitySchedule", - "PaySpine", - "SpinePoint", - "PayGrades", - "PaySpineAllowances", - "AverageHolidayPayRate", - "EmployeeRoleExport", - "HolidayPayAccrualsHours", - "GenderPayGap", - "PensionMemberships", - "PayElement", - "LoanBalances", - "EmployeeLeave", - "AdvancedVarianceReport", - "EmployeePayments" - ], - "type": "string" - }, - "ReportCustomCssOption": { - "enum": [ - "UseDefault", - "AppendToDefault", - "ReplaceDefault" - ], - "type": "string" - }, - "ReportFormat": { - "enum": [ - "Json", - "Csv", - "Pdf" - ], - "type": "string" - }, - "ReportPack": { - "required": [ - "title" ], - "type": "object", - "properties": { - "title": { - "maxLength": 150, - "minLength": 1, - "type": "string", - "description": "The name of this ReportPack" - }, - "reports": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Report" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.JobResponse" + }, + "type": "array" + } + } }, - "description": "The Reports included in this ReportPack", - "nullable": true + "description": "Success" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "A ReportPack is used to group together a number of reports" - }, - "ReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "summary": "List Jobs", + "tags": [ + "Job" + ] + } + }, + "/jobs/completed": { + "delete": { + "description": "Deletes the users completed Jobs.", + "operationId": "DeleteCompletedJobsJob", + "responses": { + "204": { + "description": "No Content" }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + "400": { + "description": "Bad Request" }, - "model": { - "description": "[readonly] If the type is application.json then this will contain a JSON representation of the relevant model", - "nullable": true + "403": { + "description": "Forbidden" }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "ReportSortBy": { - "enum": [ - "PayrollCode", - "LastName", - "Department" - ], - "type": "string" - }, - "ReportTemplateColumnType": { - "enum": [ - "CustomFixedData", - "EmployeeField", - "EmployerField", - "PayRunField", - "RoleField", - "PayDataField" + "summary": "Delete Completed Jobs", + "tags": [ + "Job" + ] + } + }, + "/jobs/{jobId}": { + "get": { + "description": "Returns a job.", + "operationId": "GetJobJob", + "parameters": [ + { + "description": "The job identifier.", + "in": "path", + "name": "jobId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "RightToWork": { - "type": "object", - "properties": { - "checked": { - "type": "boolean" - }, - "documentType": { - "$ref": "#/components/schemas/RightToWorkDocumentType" - }, - "documentRef": { - "maxLength": 80, - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.JobResponse" + } + } + }, + "description": "Success" }, - "documentExpiry": { - "type": "string", - "format": "date", - "nullable": true + "400": { + "description": "Bad Request" }, - "note": { - "maxLength": 200, - "type": "string", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "RightToWorkDocumentType": { - "enum": [ - "Other", - "Visa", - "Passport", - "BirthCertificate", - "IdentityCard", - "ShareCode" + "summary": "Get Job", + "tags": [ + "Job" + ] + } + }, + "/jobs/{jobId}/document": { + "get": { + "description": "Returns the file generated for a successfully completed Job of type Report as a string representing a filestream.", + "operationId": "GetReportJobResultJob", + "parameters": [ + { + "description": "The job identifier.", + "in": "path", + "name": "jobId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "RightToWorkReport": { - "type": "object", - "properties": { - "employer": { - "$ref": "#/components/schemas/Item" - }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RightToWorkReportLine" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "format": "binary", + "type": "string" + } + } }, - "nullable": true - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + "description": "Success" }, - "title": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "isDraft": { - "type": "boolean" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "RightToWorkReportLine": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" - }, - "payrollCode": { - "type": "string", - "nullable": true + "summary": "Get Job file", + "tags": [ + "Job" + ] + } + }, + "/jobs/{jobId}/errors": { + "get": { + "description": "Returns a list of errors for a job.", + "operationId": "GetJobErrorsByJobIdJob", + "parameters": [ + { + "description": "The job identifier.", + "in": "path", + "name": "jobId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "department": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "pageNum", + "schema": { + "default": 0, + "format": "int32", + "type": "integer" + } }, - "rightToWork": { - "$ref": "#/components/schemas/RightToWork" + { + "in": "query", + "name": "pageSize", + "schema": { + "default": 10, + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false - }, - "RightToWorkReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.JobErrorResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "model": { - "$ref": "#/components/schemas/RightToWorkReport" + "400": { + "description": "Bad Request" }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "RoleBasis": { - "enum": [ - "NotApplicable", - "Permanent", - "Temporary", - "FixedTerm", - "ZeroHours", - "Casual", - "Supply" - ], - "type": "string" - }, - "RoleType": { - "enum": [ - "NotApplicable", - "Teacher", - "Support", - "Other" - ], - "type": "string" - }, - "RtiAgent": { - "type": "object", - "properties": { - "agentId": { - "type": "string", - "nullable": true - }, - "company": { - "type": "string", - "nullable": true - }, - "address": { - "$ref": "#/components/schemas/Address" + "summary": "Get Job Errors", + "tags": [ + "Job" + ] + } + }, + "/niytd": { + "get": { + "description": "Returns a CSV file containing NI YTD values for all Employees.", + "operationId": "NiYtdReports", + "parameters": [ + { + "in": "query", + "name": "employerId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "contact": { - "$ref": "#/components/schemas/RtiContact" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false - }, - "RtiContact": { - "type": "object", - "properties": { - "firstName": { - "maxLength": 50, - "type": "string", - "nullable": true - }, - "lastName": { - "maxLength": 50, - "type": "string", - "nullable": true - }, - "email": { - "maxLength": 150, - "type": "string", - "nullable": true - }, - "telephone": { - "maxLength": 50, - "type": "string", - "nullable": true + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "RtiEmployeeAddress": { - "type": "object", - "properties": { - "line": { - "type": "array", - "items": { + "summary": "NI Year To Date Values", + "tags": [ + "Reports" + ] + } + }, + "/open": { + "get": { + "operationId": "GetOpenPayrunsPayRun", + "parameters": [ + { + "in": "query", + "name": "employerId", + "schema": { + "format": "uuid", "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayRun" + }, + "type": "array" + } + } }, - "nullable": true - }, - "postcode": { - "type": "string", - "nullable": true - }, - "postCode": { - "type": "string", - "nullable": true - }, - "ukPostcode": { - "type": "string", - "nullable": true - }, - "country": { - "type": "string", - "nullable": true - }, - "foreignCountry": { - "type": "string", - "nullable": true + "description": "Success" } }, - "additionalProperties": false - }, - "RtiEmployeeName": { - "type": "object", - "properties": { - "ttl": { - "type": "string", - "nullable": true + "summary": "Get list of open payruns", + "tags": [ + "PayRun" + ] + } + }, + "/payslip/example/pdf": { + "post": { + "description": "Use this operation to test your PayslipCustomisation.\r\nWe'll use dummy date and create a Payslip PDF or HTML document based on the customisation that you submit", + "operationId": "ExamplePayslipReports", + "parameters": [ + { + "in": "query", + "name": "employerId", + "schema": { + "format": "uuid", + "type": "string" + } }, - "fore": { - "type": "array", - "items": { + { + "in": "header", + "name": "accept", + "schema": { "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PayslipCustomisation" + } }, - "nullable": true - }, - "initials": { - "type": "string", - "nullable": true + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayslipCustomisation" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PayslipCustomisation" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PayslipCustomisation" + } + } }, - "sur": { - "type": "string", - "nullable": true + "description": "Your PayslipCustomisation." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "application/pdf": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/html": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "RtiSenderType": { - "enum": [ - "ActingInCapacity", - "Agent", - "Bureau", - "Company", - "Employer", - "Government", - "Individual", - "Other", - "Partnership", - "Trust" - ], - "type": "string" - }, - "RtiSubmissionSettings": { - "type": "object", - "properties": { - "senderType": { - "$ref": "#/components/schemas/RtiSenderType" - }, - "senderId": { - "maxLength": 30, - "type": "string", - "description": "The SenderId used to submit RTI documents to HMRC", - "nullable": true - }, - "password": { - "maxLength": 200, - "type": "string", - "description": "The Password used to submit RTI documents to HMRC", - "nullable": true - }, - "excludeNilPaid": { - "type": "boolean", - "description": "Whether or not to include Employees paid a zero amount on your FPS" - }, - "includeHashCrossRef": { - "type": "boolean", - "description": "[readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions\r\nThis is automatically set to true if you use a bank payments CSV format that supports it\r\nor set to false if not" - }, - "autoSubmitFps": { - "type": "boolean", - "description": "If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun" - }, - "testInLive": { - "type": "boolean", - "description": "Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it" - }, - "useTestGateway": { - "type": "boolean", - "description": "If set to true then your RTI documents will be sent to HMRCs test services instead of the live service" - }, - "overrideTimestampValue": { - "maxLength": 25, - "type": "string", - "description": "If a value is provided then it will be used as the timestamp on the RTI submission. This would normally only be used for testing purposes.", - "nullable": true - }, - "contact": { - "$ref": "#/components/schemas/RtiContact" - }, - "agent": { - "$ref": "#/components/schemas/RtiAgent" - }, - "allowLinkedEps": { - "type": "boolean", - "description": "If set to true this will allow you to submit a combined Employer Payment Summary" - }, - "shouldCompressFps": { - "type": "boolean", - "description": "If set to true this will compress the FPS before submitting to HMRC" - }, - "autoSubmitEps": { - "type": "boolean", - "description": "If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun." + "summary": "Example Payslip", + "tags": [ + "Reports" + ] + } + }, + "/reportbuilder/schedules": { + "post": { + "description": "Get PaySchedules based on the provided EmployerIds and TaxYears for running custom reports.", + "operationId": "GetPaySchedulesByEmployersAndTaxYearsReportBuilder", + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayScheduleRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayScheduleRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayScheduleRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayScheduleRequest" + } + } } }, - "additionalProperties": false - }, - "RtiValidationWarning": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/RtiValidationWarningType" - }, - "employeeId": { - "type": "string", - "format": "uuid", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayScheduleResponseItem" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "RtiValidationWarningType": { - "enum": [ - "MissingAddress", - "MissingNiNo" - ], - "type": "string" - }, - "ServiceBand": { - "type": "object", - "properties": { - "description": { - "type": "string", - "nullable": true - }, - "from": { - "type": "integer", - "format": "int32" - }, - "to": { - "type": "integer", - "format": "int32" - }, - "entitlementBands": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitlementBand" + "summary": "List PaySchedules", + "tags": [ + "ReportBuilder" + ] + } + }, + "/reportbuilder/schedulesbydate": { + "post": { + "description": "Get PaySchedules based on the provided EmployerIds and pay dates for running custom reports.", + "operationId": "GetPaySchedulesByEmployerAndPayDatesReportBuilder", + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayScheduleByDateRangeRequest" + } }, - "nullable": true - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayScheduleByDateRangeRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayScheduleByDateRangeRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayScheduleByDateRangeRequest" + } + } } }, - "additionalProperties": false - }, - "ShiftWorkingPatternDay": { - "type": "object", - "properties": { - "day": { - "type": "integer", - "format": "int32" - }, - "isWorkingDay": { - "type": "boolean" - }, - "hours": { - "type": "number", - "format": "double" - }, - "workingPatternHoursType": { - "$ref": "#/components/schemas/WorkingPatternHoursType" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayScheduleResponseItem" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "SmtpEncryption": { - "enum": [ - "Auto", - "Ssl", - "Tls" - ], - "type": "string" - }, - "SmtpSettings": { - "type": "object", - "properties": { - "smtpServer": { - "type": "string", - "nullable": true - }, - "smtpPort": { - "type": "integer", - "format": "int32" - }, - "encryption": { - "$ref": "#/components/schemas/SmtpEncryption" - }, - "smtpUsername": { - "type": "string", - "nullable": true - }, - "smtpPassword": { - "type": "string", - "nullable": true + "summary": "List PaySchedules By Date Range", + "tags": [ + "ReportBuilder" + ] + } + }, + "/tenants": { + "post": { + "description": "Use this method to create a new Tenant\r\nOnly available to SuperAdmins", + "operationId": "CreateTenant", + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + } } }, - "additionalProperties": false - }, - "SpinePointReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SpinePointReportLine" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + } }, - "nullable": true - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true + "description": "Success - \r\nthe Tenant has been created and is returned in the body.\r\nThe unique URL for this Tenant is returned in the Location header." }, - "isDraft": { - "type": "boolean" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false - }, - "SpinePointReportLine": { - "type": "object", - "properties": { - "spineName": { - "type": "string", - "description": "Spine Name", - "nullable": true - }, - "spinePointName": { - "type": "string", - "description": "Spine Point Name", - "nullable": true - }, - "number": { - "type": "integer", - "description": "Spine Point Number", - "format": "int32" - }, - "effectiveDate": { - "type": "string", - "description": "Effective Date of spine point", - "format": "date" - }, - "annualValue": { - "type": "number", - "description": "Annual Value of spine point", - "format": "double" - }, - "annualValueAltMax": { - "type": "number", - "description": "Alt Max Annual Value of spine point", - "format": "double", - "nullable": true - }, - "annualValueLAInner": { - "type": "number", - "description": "Annual Value LA Inner of spine point", - "format": "double", - "nullable": true - }, - "annualValueLAInnerAltMax": { - "type": "number", - "description": "Annual Value LA Inner Alt Max of spine point", - "format": "double", - "nullable": true - }, - "annualValueLAOuter": { - "type": "number", - "description": "Annual Value LA Outer of spine point", - "format": "double", - "nullable": true - }, - "annualValueLAOuterAltMax": { - "type": "number", - "description": "Annual Value LA Outer Alt Max of spine point", - "format": "double", - "nullable": true - }, - "annualValueLAFringe": { - "type": "number", - "description": "Annual Value LA Fringe of spine point", - "format": "double", - "nullable": true - }, - "annualValueLAFringeAltMax": { - "type": "number", - "description": "Annual Value LA Fringe Alt Max of spine point", - "format": "double", - "nullable": true - }, - "employee": { - "$ref": "#/components/schemas/Item" - }, - "payrollCode": { - "type": "string", - "nullable": true + "summary": "Create a Tenant", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/bills": { + "post": { + "description": "Generates usage and creates bills for all Tenants\r\nOnly available to SuperAdmins", + "operationId": "CreateBillsTenant", + "parameters": [ + { + "in": "query", + "name": "month", + "schema": { + "format": "int32", + "type": "integer" + } }, - "department": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "year", + "schema": { + "format": "int32", + "type": "integer" + } } - }, - "additionalProperties": false - }, - "SpinePointReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + ], + "responses": { + "202": { + "description": "Started generating bills" }, - "model": { - "$ref": "#/components/schemas/SpinePointReport" + "400": { + "description": "Bad Request" }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "401": { + "description": "Unauthorized" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "StarterDeclaration": { - "enum": [ - "A", - "B", - "C", - "Unknown" - ], - "type": "string" - }, - "StarterDetails": { - "required": [ - "startDate", - "starterDeclaration" - ], - "type": "object", - "properties": { - "startDate": { - "type": "string", - "format": "date" - }, - "starterDeclaration": { - "$ref": "#/components/schemas/StarterDeclaration" - }, - "overseasEmployerDetails": { - "$ref": "#/components/schemas/OverseasEmployerDetails" - }, - "pensionerPayroll": { - "$ref": "#/components/schemas/PensionerPayroll" + "summary": "Create Bills for Period", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/reports/apimailinglist": { + "get": { + "description": "Returns a report of active users that have asked to be updated about API across all tenants.", + "operationId": "GetApiMailingListReportTenant", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "StartersLeaversFilter": { - "enum": [ - "Starters", - "Leavers" + "summary": "Api Mailing List Report", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/ritsubmissionsettings": { + "get": { + "description": "If the Tenant has BureauFeaturesEnabled then they can store RtiSubmissionSettings for use across multiple employers.\r\nThis end point returns them RtiSubmissionSettings.", + "operationId": "GetRtiSubmissionSettingsTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "query", + "name": "id", + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RtiSubmissionSettings" + } + } + }, + "description": "Success" + } + }, + "summary": "Get RtiSubmissionSettings", + "tags": [ + "Tenant" + ] }, - "StatPayFrequency": { - "enum": [ - "DaysInPeriod", - "WeeksInPeriod" + "put": { + "description": "If the Tenant has BureauFeaturesEnabled then they can store RtiSubmissionSettings for use across multiple employers.\r\nThis end point updates the RtiSubmissionSettings.", + "operationId": "UpdateRtiSubmissionSettingsTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "query", + "name": "id", + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "StatutoryPay": { - "type": "object", - "properties": { - "weeklyParentalLeaveAmount": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "weeklySickPayAmount": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "aweEligibilityThreshold": { - "type": "number", - "format": "double" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/RtiSubmissionSettings" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/RtiSubmissionSettings" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/RtiSubmissionSettings" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RtiSubmissionSettings" + } + } } }, - "additionalProperties": false, - "description": "Part of the TaxYearConfig that our engine uses to calculate Statutory Pay.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "StatutoryPayReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StatutoryPayReportLine" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RtiSubmissionSettings" + } + } }, - "nullable": true - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "periodTo": { - "type": "integer", - "format": "int32" - }, - "startPeriodName": { - "type": "string", - "nullable": true - }, - "endPeriodName": { - "type": "string", - "nullable": true - }, - "startDate": { - "type": "string", - "format": "date" - }, - "endDate": { - "type": "string", - "format": "date" - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true + "description": "Success" }, - "isDraft": { - "type": "boolean" + "400": { + "description": "Bad Request" } }, - "additionalProperties": false - }, - "StatutoryPayReportLine": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" - }, - "payrollCode": { - "type": "string", - "nullable": true - }, - "department": { - "type": "string", - "nullable": true - }, - "ssp": { - "type": "number", - "format": "double" - }, - "smp": { - "type": "number", - "format": "double" - }, - "spp": { - "type": "number", - "format": "double" - }, - "sap": { - "type": "number", - "format": "double" - }, - "shpp": { - "type": "number", - "format": "double" - }, - "spbp": { - "type": "number", - "format": "double" - }, - "hasStatPay": { - "type": "boolean", - "readOnly": true - }, - "totalStatPay": { - "type": "number", - "format": "double", - "readOnly": true + "summary": "Update RtiSubmissionSettings", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}": { + "get": { + "description": "If you are an administrator for a Tenant then you can retrieve the settings for it using this API call", + "operationId": "GetTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to retrieve.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get a Tenant", + "tags": [ + "Tenant" + ] }, - "StatutoryPayReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, + "put": { + "description": "If you are an administrator for a Tenant then you can update the settings for it using this API call", + "operationId": "UpdateTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/StatutoryPayReport" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "StringDecimalKeyValuePair": { - "type": "object", - "properties": { - "key": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + } + }, + "description": "Success" }, - "value": { - "type": "number", - "format": "double" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "StringStringDecimalValueTuple": { - "type": "object", - "properties": { - "item1": { - "type": "string", - "nullable": true + "summary": "Update a Tenant", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/admin/evc": { + "put": { + "description": "Disables or enables EVC for a tenant.", + "operationId": "SetEvcTenant", + "parameters": [ + { + "description": "The Id of the tenant", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "item2": { - "type": "string", - "nullable": true + { + "description": "A boolean value indicating whether to disable or enable EVC at tenant level.", + "in": "query", + "name": "disableEvc", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Success" }, - "item3": { - "type": "number", - "format": "double" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "StringStringKeyValuePair": { - "type": "object", - "properties": { - "key": { - "type": "string", - "nullable": true + "summary": "Set Evc", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/bills/{year}/{month}": { + "get": { + "description": "Returns a list of UsageBill for Users of this Tenant, for the Year and Month supplied", + "operationId": "BillsTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to list bills for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "value": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "year", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "path", + "name": "month", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "includeNetSuiteBills", + "schema": { + "default": false, + "type": "boolean" + } } - }, - "additionalProperties": false - }, - "StudentLoan": { - "enum": [ - "None", - "PlanOne", - "PlanTwo", - "PlanFour" ], - "type": "string" - }, - "StudentLoanRecovered": { - "type": "object", - "properties": { - "planType": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "SubmissionStatus": { - "enum": [ - "NotSubmitted", - "Submitted", - "ErrorResponse", - "Accepted" - ], - "type": "string" - }, - "Tag": { - "required": [ - "code", - "title" - ], - "type": "object", - "properties": { - "code": { - "maxLength": 20, - "minLength": 1, - "type": "string", - "description": "The unique code for this Tag" + "summary": "Get Bills", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/bills/{year}/{month}/{billId}": { + "get": { + "description": "Returns details of a UsageBill for a User of this Tenant", + "operationId": "BillTenant", + "parameters": [ + { + "description": "The Id of the Tenant the bill belongs to.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "path", + "name": "year", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "title": { - "maxLength": 50, - "minLength": 1, - "type": "string", - "description": "The title for this Tag" + { + "in": "path", + "name": "month", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "color": { - "maxLength": 6, - "type": "string", - "description": "A color to used to represent this Tag, in hex format. ie 'ff0000'", - "nullable": true + { + "description": "The Id of the UsageBill.", + "in": "path", + "name": "billId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "TaxAndNi": { - "required": [ - "niTable" ], - "type": "object", - "properties": { - "niTable": { - "type": "string", - "description": "The appropriate NI letter for this Employee" - }, - "secondaryClass1NotPayable": { - "type": "boolean", - "description": "If set to true then no Employer NI will be paid for this Employee" - }, - "postgradLoan": { - "type": "boolean", - "description": "Set to true if the Employee needs to make Post Graduate Loan repayments" - }, - "postgraduateLoanStartDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "postgraduateLoanEndDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "studentLoan": { - "$ref": "#/components/schemas/StudentLoan" - }, - "studentLoanStartDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "studentLoanEndDate": { - "type": "string", - "format": "date", - "nullable": true - }, - "taxCode": { - "maxLength": 12, - "type": "string", - "description": "The Tax Code for this Employee", - "nullable": true - }, - "week1Month1": { - "type": "boolean", - "description": "Determines whether PAYE should be calculated on a Week1/Month1 basis instead of on a cumulative basis.\r\nThis is automatically set to false for any existing Employees when you start a new Tax Year." - }, - "foreignTaxCredit": { - "type": "boolean", - "description": "If set to True you are enabling the possibility to enter an amount on payslip so you can reduce UK Tax liabilities." + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageBill" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get Bill", + "tags": [ + "Tenant" + ] }, - "TaxBracket": { - "type": "object", - "properties": { - "from": { - "type": "number", - "description": "[readonly] The starting point for applying this tax rate", - "format": "double" + "put": { + "description": "Updates the UsageBill.", + "operationId": "UpdateBillTenant", + "parameters": [ + { + "description": "The Id of the Tenant the bill belongs to.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "to": { - "type": "number", - "description": "[readonly] The end point for applying this tax rate", - "format": "double" + { + "in": "path", + "name": "year", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "multiplier": { - "type": "number", - "description": "[readonly] The tax rate to apply", - "format": "double" - } - }, - "additionalProperties": false - }, - "TaxCodeChange": { - "type": "object", - "properties": { - "suffix": { - "type": "string", - "description": "[readonly] The suffix of the Tax Code that needs to be incremented for this Tax Year", - "nullable": true + { + "in": "path", + "name": "month", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "increment": { - "type": "integer", - "description": "[readonly] The amount by which to increment Tax Codes with the given suffix", - "format": "int32" + { + "description": "The Id of the UsageBill.", + "in": "path", + "name": "billId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UsageBill" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageBill" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/UsageBill" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UsageBill" + } + } } }, - "additionalProperties": false, - "description": "Part of the TaxYearConfig that our engine uses to perform the Year End routine.\r\nIt is used internally when our engine performs the Year End routine.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "TaxCodeChangeReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxCodeChangeValues" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageBill" + } + } }, - "nullable": true - }, - "report": { - "$ref": "#/components/schemas/Report" + "description": "Success" + } + }, + "summary": "Update Bill", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/bureau-usage-stats": { + "get": { + "description": "Returns usage statistics data for all employers the logged in user has access to for the given date range.\r\nIf either of the dates are not provided then the values are defaulted to the first and last date of the previous calendar month.", + "operationId": "GetBureauUsageStatsTenant", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "in": "query", + "name": "fromDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "title": { - "type": "string", - "nullable": true + { + "in": "query", + "name": "toDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "isDraft": { - "type": "boolean" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "TaxCodeChangeReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, + "summary": "Get UsageStats Report", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/css": { + "put": { + "description": "Update the custom CSS for a Tenant", + "operationId": "UpdateCssTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/TaxCodeChangeReport" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "application/*+json": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "type": "string" + } + }, + "application/json-patch+json": { + "schema": { + "type": "string" + } + }, + "text/json": { + "schema": { + "type": "string" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "TaxCodeChangeValues": { - "type": "object", - "properties": { - "employeeId": { - "type": "integer", - "format": "int32" - }, - "employee": { - "$ref": "#/components/schemas/Item" - }, - "payrollCode": { - "type": "string", - "nullable": true - }, - "firstName": { - "type": "string", - "nullable": true - }, - "lastName": { - "type": "string", - "nullable": true - }, - "niNumber": { - "type": "string", - "nullable": true - }, - "periodChange": { - "type": "integer", - "format": "int32" - }, - "previousTaxCode": { - "type": "string", - "nullable": true - }, - "currentTaxCode": { - "type": "string", - "nullable": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "TaxYear": { - "enum": [ - "Year2017", - "Year2018", - "Year2019", - "Year2020", - "Year2021", - "Year2022", - "Year2023", - "Year2024", - "Year2025" + "summary": "Update CSS", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/css/colors": { + "put": { + "description": "Update the colors for a Tenant", + "operationId": "UpdateCssColorsTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "TaxYearConfig": { - "type": "object", - "properties": { - "taxYear": { - "type": "integer", - "description": "[readonly] The TaxYear for which this configuration applies", - "format": "int32" - }, - "isPreview": { - "type": "boolean", - "description": "[readonly] Indicates that this is a preview of the given years configuration and it shouldn't yet be used for live processing of payroll data." - }, - "defaultTaxCode": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "class1ANicsRate": { - "$ref": "#/components/schemas/DecimalTaxYearConfigPrimitiveValue" - }, - "lowerEarningsLimit": { - "$ref": "#/components/schemas/PeriodValue" - }, - "upperEarningsLimit": { - "$ref": "#/components/schemas/PeriodValue" - }, - "primaryThreshold": { - "$ref": "#/components/schemas/PeriodValue" - }, - "secondaryThreshold": { - "$ref": "#/components/schemas/PeriodValue" - }, - "upperAccrualPoint": { - "$ref": "#/components/schemas/PeriodValue" - }, - "upperSecondaryThreshold": { - "$ref": "#/components/schemas/PeriodValue" - }, - "apprenticeUpperSecondaryThreshold": { - "$ref": "#/components/schemas/PeriodValue" - }, - "freeportsUpperSecondaryThreshold": { - "$ref": "#/components/schemas/PeriodValue" - }, - "veteransUpperSecondaryThreshold": { - "$ref": "#/components/schemas/PeriodValue" - }, - "directorsProratePrimaryThreshold": { - "$ref": "#/components/schemas/PeriodValue" - }, - "plan1StudentLoanThreshold": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "plan1StudentLoanRate": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "plan2StudentLoanThreshold": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "plan2StudentLoanRate": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "plan4StudentLoanThreshold": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "plan4StudentLoanRate": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "postGradLoanThreshold": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "postGradLoanRate": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "deaProtectedEarnings": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "pensionLowerThreshold": { - "$ref": "#/components/schemas/PeriodValue" - }, - "pensionAutomaticEnrolment": { - "$ref": "#/components/schemas/PeriodValue" - }, - "pensionUpperThreshold": { - "$ref": "#/components/schemas/PeriodValue" - }, - "pensionAeEmployerContribution": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "pensionAeEmployeeContribution": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "employmentAllowancePreviousYear": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "employmentAllowance": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "fixedCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FixedCode" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/StringStringKeyValuePair" + }, + "type": "array" + } }, - "description": "[readonly]", - "nullable": true + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/StringStringKeyValuePair" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/StringStringKeyValuePair" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/StringStringKeyValuePair" + }, + "type": "array" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/StringStringKeyValuePair" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Update CSS Colors", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/email": { + "get": { + "description": "Returns a list of all emails sent for this Tenant.", + "operationId": "IndexTenantEmail", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "scottishFixedCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FixedCode" - }, - "description": "[readonly]", - "nullable": true + { + "in": "query", + "name": "pageNum", + "schema": { + "format": "int32", + "type": "integer" + } }, - "welshFixedCodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FixedCode" + { + "in": "query", + "name": "pageSize", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "description": "[readonly]", - "nullable": true - }, - "niRates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NationalInsuranceCode" + "description": "Success" + } + }, + "summary": "List Emails", + "tags": [ + "TenantEmail" + ] + } + }, + "/tenants/{id}/email/settings": { + "get": { + "description": "Returns the MailSettings for a Tenant.", + "operationId": "GetMailSettingsTenantEmail", + "parameters": [ + { + "description": "The Id of the Tenant", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MailSettings" + } + } }, - "description": "[readonly]", - "nullable": true - }, - "directorsNiRates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NationalInsuranceCode" + "description": "Success" + } + }, + "summary": "Get MailSettings", + "tags": [ + "TenantEmail" + ] + }, + "put": { + "description": "Updates the MailSettings for a Tenant.", + "operationId": "UpdateMailSettingsTenantEmail", + "parameters": [ + { + "description": "The Id of the Tenant", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/MailSettings" + } }, - "description": "[readonly]", - "nullable": true - }, - "brackets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxBracket" + "application/json": { + "schema": { + "$ref": "#/components/schemas/MailSettings" + } }, - "description": "[readonly]", - "nullable": true - }, - "scottishBrackets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxBracket" + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/MailSettings" + } }, - "description": "[readonly]", - "nullable": true - }, - "welshBrackets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxBracket" + "text/json": { + "schema": { + "$ref": "#/components/schemas/MailSettings" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MailSettings" + } + } }, - "description": "[readonly]", - "nullable": true + "description": "Success" + } + }, + "summary": "Update MailSettings", + "tags": [ + "TenantEmail" + ] + } + }, + "/tenants/{id}/email/settings/test": { + "post": { + "description": "This API call will generate a test email based on your MailSettings.", + "operationId": "TestMailSettingsTenantEmail", + "parameters": [ + { + "description": "The Id of the Tenant", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxCodeChanges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxCodeChange" + { + "description": "The address to send a test email to", + "in": "query", + "name": "email", + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmployerEmail" + } + } }, - "description": "[readonly]", - "nullable": true + "description": "Created" + } + }, + "summary": "Send test email", + "tags": [ + "TenantEmail" + ] + } + }, + "/tenants/{id}/email/{emailId}": { + "get": { + "description": "Returns the email along with its status.", + "operationId": "GetEmailTenantEmail", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "minimumWage": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NationalMinimumWage" + { + "in": "path", + "name": "emailId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantEmail" + } + } }, - "description": "[readonly]", - "nullable": true - }, - "statutoryPay": { - "$ref": "#/components/schemas/StatutoryPay" - }, - "loanCharge": { - "$ref": "#/components/schemas/LoanCharge" - }, - "carCharge": { - "$ref": "#/components/schemas/CarCharge" - }, - "govTalk": { - "$ref": "#/components/schemas/GovTalk" + "description": "Success" + } + }, + "summary": "Get Email", + "tags": [ + "TenantEmail" + ] + }, + "post": { + "description": "Re-sends an existing email.", + "operationId": "ResendEmailTenantEmail", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "mileageAllowancePaymentsRates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MileageAllowancePaymentsRate" + { + "in": "path", + "name": "emailId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantEmail" + } + } }, - "description": "[readonly]", - "nullable": true + "description": "Success" + } + }, + "summary": "Re-send Email", + "tags": [ + "TenantEmail" + ] + } + }, + "/tenants/{id}/employers/{employerId}/usage": { + "get": { + "description": "Returns all activity for the given Employer", + "operationId": "EmployerUsageTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "tieredPensions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TieredPension" + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "description": "[readonly]", - "nullable": true - }, - "nicRecoverableNormalEmployerRate": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "nicRecoverableSmallEmployerRate": { - "type": "number", - "description": "[readonly]", - "format": "double" - }, - "nicCompensationNormalEmployerRate": { - "type": "number", - "description": "[readonly]", - "format": "double" + "description": "Success" + } + }, + "summary": "Get Employer Usage", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/employers/{employerId}/users": { + "get": { + "description": "Returns all users for the given Employer", + "operationId": "EmployerUsersTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "nicCompensationSmallEmployerRate": { - "type": "number", - "description": "[readonly]", - "format": "double" + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false, - "description": "The configuation that our engine uses to perform calculations for the related TaxYear.\r\nIt is used internally when our engine performs any calculations or the Year End routine.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "TaxYearTypes": { - "enum": [ - "Year2017", - "Year2018", - "Year2019", - "Year2020", - "Year2021", - "Year2022", - "Year2023", - "Year2024" + "summary": "Get Employer Users", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/favicon": { + "put": { + "description": "Upload an image to use as favicon. We'll upload it and set the URL on the FavIcon property of the Tenant.", + "operationId": "UpdateFavIconTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "TeachersPensionAgeWarning": { - "enum": [ - "EmployeeUnder16", - "EmployeeTurns16", - "EmployeeOver75", - "EmployeeTurns75" + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + } + }, + "description": "Success" + } + }, + "summary": "Upload Favicon", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/logo": { + "put": { + "description": "Upload an image to use as your main logo. We'll upload it and set the URL on the HomeImgUrl property of the Tenant.", + "operationId": "UpdateLogoTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "TeachersPensionDetails": { - "type": "object", - "properties": { - "employmentType": { - "$ref": "#/components/schemas/TeachersPensionEmploymentType" - }, - "fullTimeSalary": { - "type": "integer", - "description": "Up to 7 digits, in pounds. eg 24000", - "format": "int32", - "nullable": true - }, - "partTimeSalaryPaid": { - "type": "integer", - "description": "Up to 7 digits, in pounds. eg 24000", - "format": "int32", - "nullable": true - }, - "mcrRoleId1": { - "maxLength": 15, - "type": "string", - "description": "Data field for the Contract used for Teachers pension administration", - "nullable": true - }, - "mcrRoleId2": { - "maxLength": 20, - "type": "string", - "description": "The Job role within the contract used for Teachers pension administration", - "nullable": true - }, - "teachersPensionAdminNiNumber": { - "maxLength": 9, - "type": "string", - "description": "Where an employee does not have an NI number yet (or doesn't know their NI number) Teachers Pensions will issue an administrative NI number", - "nullable": true + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } } }, - "additionalProperties": false, - "description": "Used to represent additional information needed for \r\nTeachers' Pensions" - }, - "TeachersPensionEmploymentType": { - "enum": [ - "FullTime", - "PartTimeRegular", - "IrregularPartTime", - "IrregularPartTime_In" - ], - "type": "string" - }, - "TeachersPensionEoyLineItem": { - "type": "object", - "properties": { - "tier": { - "type": "number", - "format": "double" - }, - "percentageRate": { - "type": "number", - "format": "double", - "readOnly": true - }, - "contributorySalary": { - "type": "number", - "format": "double", - "readOnly": true - }, - "teachersContributions": { - "type": "number", - "format": "double", - "readOnly": true - }, - "employersContributions": { - "type": "number", - "format": "double", - "readOnly": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "TeachersPensionEoyReport": { - "type": "object", - "properties": { - "pdfFileName": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "establishment": { - "$ref": "#/components/schemas/Establishment" - }, - "lineItems": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TeachersPensionEoyLineItem" + "summary": "Upload Logo", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/payrollsquad": { + "get": { + "description": "Returns all Payroll Squad for the Tenant", + "operationId": "GetPayrollSquadsTenant", + "parameters": [ + { + "description": "Current tenant id", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true, - "readOnly": true - }, - "careerAverageFlexibilities": { - "type": "number", - "format": "double", - "readOnly": true - }, - "additionalPensionPayments": { - "type": "number", - "format": "double", - "readOnly": true - }, - "additionalContributions": { - "type": "number", - "format": "double", - "readOnly": true - }, - "teachersContributions": { - "type": "number", - "format": "double", - "readOnly": true - }, - "employersContributions": { - "type": "number", - "format": "double", - "readOnly": true - }, - "totalContributions": { - "type": "number", - "format": "double", - "readOnly": true - }, - "efeArrears": { - "type": "number", - "format": "double", - "readOnly": true - }, - "prestonContributions": { - "type": "number", - "format": "double", - "readOnly": true - }, - "tr22ElectionAmounts": { - "type": "number", - "format": "double", - "readOnly": true - }, - "totalExtraContributions": { - "type": "number", - "format": "double", - "readOnly": true - }, - "overallBalance": { - "type": "number", - "format": "double", - "readOnly": true - }, - "employersContributionPercentage": { - "type": "number", - "format": "double", - "readOnly": true - }, - "totalContributorySalary": { - "type": "number", - "format": "double", - "readOnly": true - }, - "totalTeachersContributions": { - "type": "number", - "format": "double", - "readOnly": true - }, - "totalEmployersContributions": { - "type": "number", - "format": "double", - "readOnly": true - }, - "report": { - "$ref": "#/components/schemas/Report" - }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "title": { - "type": "string", - "nullable": true + "description": "Success" }, - "isDraft": { - "type": "boolean" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Get Payroll Squads", + "tags": [ + "Tenant" + ] }, - "TeachersPensionEoyReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, + "post": { + "description": "Create a Payroll Squad", + "operationId": "CreatePayrollSquadTenant", + "parameters": [ + { + "description": "Current tenant id", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/TeachersPensionEoyReport" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadRequest" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "Tenant": { - "type": "object", - "properties": { - "brandCode": { - "maxLength": 100, - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "appName": { - "type": "string", - "nullable": true - }, - "homeUrl": { - "type": "string", - "nullable": true - }, - "headContent": { - "type": "string", - "nullable": true - }, - "logOutUrl": { - "maxLength": 150, - "type": "string", - "nullable": true - }, - "loginImgUrl": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "homeImgUrl": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "favIcon": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "cssColorsFile": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "cssFile": { - "type": "string", - "description": "[readonly]", - "nullable": true - }, - "mailingList": { - "type": "boolean" - }, - "htmlInsertions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TenantHtmlInsertion" + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadResponse" + } + } }, - "nullable": true - }, - "mailSettings": { - "$ref": "#/components/schemas/MailSettings" - }, - "signupUrl": { - "maxLength": 150, - "type": "string", - "nullable": true - }, - "termsUrl": { - "maxLength": 150, - "type": "string", - "nullable": true - }, - "helpUrl": { - "maxLength": 250, - "type": "string", - "nullable": true - }, - "supportEmail": { - "maxLength": 150, - "type": "string", - "format": "email", - "nullable": true - }, - "newUserSignupEmail": { - "maxLength": 150, - "type": "string", - "format": "email", - "nullable": true - }, - "approveNewUsers": { - "type": "boolean" - }, - "enableBureauFeatures": { - "type": "boolean" - }, - "requireDdMandateBeforeAllowingBillableActivity": { - "type": "boolean" - }, - "whiteLabelMode": { - "type": "boolean" - }, - "enableReportWriterFeature": { - "type": "boolean", - "description": "Indicates if the Report Writer feature is enabled for the tenant." - }, - "disableEvc": { - "type": "boolean", - "description": "Indicates whether FPS should be submitted to EVC for employees/employers under this tenant." - }, - "tenantOwnsBilling": { - "type": "boolean", - "description": "[readonly]" - }, - "billingSettings": { - "$ref": "#/components/schemas/TenantBillingSettings" + "description": "Created" }, - "usersCanManageAccountSecuritySettings": { - "type": "boolean", - "description": "If the users are allowed manage their own account security settings through a page or portal defined by their current authentication provider" + "400": { + "description": "Bad Request" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "The Tenant model represents the brand that provides the account.\r\nThis is used by our White Label partners to manage and brand their user accounts.\r\nUnless you are an admin for a White Label account you'll have no interest in this model." - }, - "TenantBillingSettings": { - "type": "object", - "properties": { - "discount": { - "type": "number", - "format": "double" - }, - "monthlyMinimum": { - "type": "number", - "format": "double" - }, - "aggregatedPricing": { - "type": "boolean" - }, - "billTo": { - "type": "string", - "description": "If all activity for a Tenant is being biulled to a specifc user, set the email address here", - "nullable": true - }, - "pricingTable": { - "type": "string", - "description": "If BillTo is set, then specify a Pricing Table to use from the Staffology tenant, otherwise the default Staffology Pricing Table will be used", - "format": "uuid", - "nullable": true - }, - "netSuiteDefaultItemCode": { - "type": "string", - "description": "[readonly] The item code used in the NetSuite billing if not specified in the pricing table", - "nullable": true - }, - "netSuiteDefaultDescription": { - "type": "string", - "description": "[readonly] The product description used in the NetSuite billing if not specified in the pricing table", - "nullable": true + "summary": "Create Payroll Squad", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/payrollsquad/employers": { + "post": { + "description": "Update Payroll Squad Employers", + "operationId": "PayrollSquadUpdateEmployersTenant", + "parameters": [ + { + "description": "Current tenant id", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "TenantEmail": { - "required": [ - "subject", - "toEmail", - "toName" ], - "type": "object", - "properties": { - "toName": { - "maxLength": 150, - "minLength": 1, - "type": "string" - }, - "toEmail": { - "maxLength": 150, - "minLength": 1, - "type": "string" - }, - "subject": { - "maxLength": 150, - "minLength": 1, - "type": "string" - }, - "buttonText": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "buttonLink": { - "maxLength": 250, - "type": "string", - "nullable": true - }, - "bodyPreview": { - "maxLength": 100, - "type": "string", - "nullable": true - }, - "body": { - "type": "string", - "nullable": true - }, - "afterBtnBody": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/BackgroundTaskStatus" - }, - "statusDate": { - "type": "string", - "format": "date-time" - }, - "statusMessage": { - "type": "string", - "nullable": true - }, - "sendAttempts": { - "type": "integer", - "format": "int32" - }, - "webAppBaseUrl": { - "type": "string", - "nullable": true - }, - "attachments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmailAttachment" - }, - "nullable": true - }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true - } - }, - "additionalProperties": false - }, - "TenantHtmlInsertion": { - "type": "object", - "properties": { - "insertionPoint": { - "$ref": "#/components/schemas/HtmlInsertionPoint" - }, + "requestBody": { "content": { - "type": "string", - "nullable": true + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadEmployerRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadEmployerRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadEmployerRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadEmployerRequest" + } + } } }, - "additionalProperties": false - }, - "TenantItem": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string", - "nullable": true + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayrollSquadEmployerResponse" + }, + "type": "array" + } + } + }, + "description": "Created" }, - "metadata": { - "nullable": true + "400": { + "description": "Bad Request" }, - "url": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "Represents a Tenant that the user account can administrate.\r\nUnless you are an admin for a White Label account you'll have no interest in this model." - }, - "TieredPension": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/PensionContributionLevelType" - }, - "rates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TieredPensionRate" + "summary": "Update Payroll Squad Employers", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/payrollsquad/member": { + "post": { + "description": "Add Payroll Squad Member", + "operationId": "PayrollSquadAddMemberTenant", + "parameters": [ + { + "description": "Current tenant id", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadMemberRequest" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadMemberRequest" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadMemberRequest" + } }, - "nullable": true - }, - "employerContribRate": { - "type": "number", - "format": "double" + "text/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadMemberRequest" + } + } } }, - "additionalProperties": false, - "description": "Part of the TaxYearConfig that our engine uses to calculate tiered pension contributions.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "TieredPensionRate": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadMemberResponse" + } + } + }, + "description": "Created" }, - "rangeStart": { - "type": "number", - "format": "double" + "400": { + "description": "Bad Request" }, - "rate": { - "type": "number", - "format": "double" + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "Part of the TaxYearConfig that our engine uses to calculate tiered pension contributions.\r\nIt is used internally when our engine performs calculations.\r\nYou do not need to do anything with this model, it's provided purely for informational purposes." - }, - "UmbrellaPayment": { - "type": "object", - "properties": { - "payrollCode": { - "type": "string", - "description": "When importing multiple UmbrellaPayments this field is used to identify the employee", - "nullable": true - }, - "chargePerTimesheet": { - "type": "number", - "description": "Override the settings for this employer by specifying a ChargePerTimeSheet.\r\nOr leave it as null to use the settings from the Employer", - "format": "double", - "nullable": true - }, - "invoiceValue": { - "type": "number", - "format": "double" - }, - "mapsMiles": { - "type": "integer", - "format": "int32" - }, - "otherExpenses": { - "type": "number", - "format": "double" - }, - "numberOfTimesheets": { - "type": "integer", - "format": "int32" + "summary": "Add Payroll Squad Member", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/payrollsquad/{payrollSquadId}": { + "delete": { + "description": "Delete Payroll Squad with it's Members and Employers.", + "operationId": "DeletePayrollSquadTenant", + "parameters": [ + { + "description": "Current tenant id", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "hoursWorked": { - "type": "number", - "format": "double" + { + "description": "The id of payroll squad", + "in": "path", + "name": "payrollSquadId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "grossDeduction": { - "type": "number", - "format": "double" + "400": { + "description": "Bad Request" }, - "grossAddition": { - "type": "number", - "format": "double" + "404": { + "description": "Not Found" } }, - "additionalProperties": false + "summary": "Delete Payroll Squad and it's Members and Employers.", + "tags": [ + "Tenant" + ] }, - "UmbrellaReconciliationReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UmbrellaReconciliationReportLine" - }, - "nullable": true - }, - "employer": { - "$ref": "#/components/schemas/Item" - }, - "payPeriod": { - "$ref": "#/components/schemas/PayPeriods" - }, - "ordinal": { - "type": "integer", - "format": "int32" - }, - "period": { - "type": "integer", - "format": "int32" - }, - "periodTo": { - "type": "integer", - "format": "int32" - }, - "startPeriodName": { - "type": "string", - "nullable": true - }, - "endPeriodName": { - "type": "string", - "nullable": true - }, - "startDate": { - "type": "string", - "format": "date" - }, - "endDate": { - "type": "string", - "format": "date" - }, - "report": { - "$ref": "#/components/schemas/Report" + "get": { + "description": "Get a Payroll Squad", + "operationId": "GetPayrollSquadTenant", + "parameters": [ + { + "description": "Current tenant id", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "description": "The id of payroll squad", + "in": "path", + "name": "payrollSquadId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadResponse" + } + } + }, + "description": "Success" }, - "title": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "isDraft": { - "type": "boolean" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.PayrollSquadResponse" + } + } + }, + "description": "Not Found" } }, - "additionalProperties": false - }, - "UmbrellaReconciliationReportLine": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" - }, - "period": { - "type": "string", - "nullable": true - }, - "payrollCode": { - "type": "string", - "nullable": true - }, - "department": { - "type": "string", - "nullable": true - }, - "totalGross": { - "type": "number", - "format": "double" - }, - "netPay": { - "type": "number", - "format": "double" - }, - "tax": { - "type": "number", - "format": "double" - }, - "employeeNi": { - "type": "number", - "format": "double" - }, - "employerNi": { - "type": "number", - "format": "double" - }, - "employeePension": { - "type": "number", - "format": "double" - }, - "employerPension": { - "type": "number", - "format": "double" - }, - "expenses": { - "type": "number", - "format": "double" - }, - "fee": { - "type": "number", - "format": "double" - }, - "appLevy": { - "type": "number", - "format": "double" - }, - "invoiceValue": { - "type": "number", - "format": "double" - }, - "employeeCosts": { - "type": "number", - "format": "double", - "readOnly": true + "summary": "Get Payroll Squad", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/payrollsquad/{payrollSquadId}/member/{payrollSquadMemberId}": { + "delete": { + "description": "Delete a Payroll Squad Member", + "operationId": "DeletePayrollSquadMemberTenant", + "parameters": [ + { + "description": "Current tenant id", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employerCosts": { - "type": "number", - "format": "double", - "readOnly": true + { + "description": "The id of payroll squad", + "in": "path", + "name": "payrollSquadId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "total": { - "type": "number", - "format": "double", - "readOnly": true + { + "description": "The id of payroll squad member", + "in": "path", + "name": "payrollSquadMemberId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "UmbrellaReconciliationReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + ], + "responses": { + "204": { + "description": "No Content" }, - "model": { - "$ref": "#/components/schemas/UmbrellaReconciliationReport" + "400": { + "description": "Bad Request" }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "UsageBill": { - "type": "object", - "properties": { - "year": { - "type": "integer", - "format": "int32" - }, - "month": { - "type": "integer", - "format": "int32" - }, - "payslipCount": { - "type": "integer", - "format": "int32" - }, - "previouslyBilledPayslipCount": { - "type": "integer", - "description": "The number of payslips that appear in the usage, but were billed in a previous period", - "format": "int32" - }, - "netCost": { - "type": "number", - "description": "Net cost of any payslips, or the Pricing Table minimum, whichever is greater.", - "format": "double" - }, - "discount": { - "type": "number", - "format": "double" - }, - "partnerDiscountAmount": { - "type": "number", - "format": "double" - }, - "monthlyMinimum": { - "type": "number", - "description": "This is actually an offset against the NetCost and doesn't contain the full MonthlyMinimum.", - "format": "double" - }, - "total": { - "type": "number", - "format": "double", - "readOnly": true - }, - "paid": { - "type": "boolean" - }, - "usage": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + "summary": "Delete Payroll Squad Member", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/payrollsquads": { + "get": { + "description": "Returns all Payroll Squad Members for the Employer", + "operationId": "GetPayrollSquadMembersTenant", + "parameters": [ + { + "description": "Current Employer id", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true - }, - "accountingCustomerId": { - "type": "string", - "nullable": true - }, - "accountingInvoiceId": { - "type": "string", - "nullable": true - }, - "accountingInvoiceLink": { - "type": "string", - "nullable": true - }, - "useNetSuite": { - "type": "boolean" + "description": "Success" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "User": { - "type": "object", - "properties": { - "category": { - "$ref": "#/components/schemas/UserCategory" - }, - "emailAddress": { - "maxLength": 150, - "type": "string", - "format": "email", - "nullable": true - }, - "pendingEmailAddress": { - "maxLength": 150, - "type": "string", - "description": "If the user has requested to change their email address then the \r\naddress it'll be changed to after verification will be shown here.", - "format": "email", - "nullable": true - }, - "firstName": { - "maxLength": 150, - "type": "string", - "nullable": true - }, - "lastName": { - "maxLength": 150, - "type": "string", - "nullable": true - }, - "salutation": { - "maxLength": 35, - "pattern": "^[A-Za-z '\\-]{1,35}$", - "type": "string", - "nullable": true - }, - "userIdentifier": { - "maxLength": 150, - "type": "string", - "nullable": true - }, - "photo": { - "maxLength": 1000, - "type": "string", - "nullable": true - }, - "photoSasUrl": { - "type": "string", - "nullable": true - }, - "role": { - "$ref": "#/components/schemas/UserRole" - }, - "jobType": { - "$ref": "#/components/schemas/UserJobType" - }, - "jobTitle": { - "maxLength": 150, - "type": "string", - "nullable": true - }, - "telephoneNumber": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "businessName": { - "maxLength": 160, - "pattern": "^[A-Za-z0-9 ,;:'£()\\-\\.\\@\\$\\&]{1,160}$", - "type": "string", - "nullable": true - }, - "industry": { - "$ref": "#/components/schemas/UserIndustry" - }, - "address": { - "$ref": "#/components/schemas/Address" - }, - "statedEmployeeCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "emailVerified": { - "type": "boolean" - }, - "emailVerificationKey": { - "type": "string", - "format": "uuid" - }, - "gdprOptin": { - "type": "boolean" - }, - "inviteCode": { - "type": "string", - "nullable": true - }, - "registrationIp": { - "maxLength": 20, - "type": "string", - "nullable": true - }, - "registrationDate": { - "type": "string", - "format": "date" - }, - "lastLogin": { - "type": "string", - "format": "date", - "nullable": true - }, - "isActivated": { - "type": "boolean" - }, - "authorization": { - "$ref": "#/components/schemas/UserAuthorization" - }, - "isSuperAdmin": { - "type": "boolean" - }, - "canUseBureauFeatures": { - "type": "boolean" - }, - "canUseBetaFeatures": { - "type": "boolean" - }, - "canUseReportWriter": { - "type": "boolean", - "description": "Indicates whether the user has permission to use the report writer feature." - }, - "canUseRefactoredAeRoutines": { - "type": "boolean" - }, - "isBilledInNetSuite": { - "type": "boolean" - }, - "tenant": { - "$ref": "#/components/schemas/Tenant" - }, - "requestDdSetup": { - "type": "boolean", - "description": "[readonly] If true then the user is required to set up a direct debit mandate" - }, - "disabled": { - "type": "boolean", - "description": "[readonly] If true then any employers the owner managed will not be able to run new payruns.\r\nDisabledReason will give a reason why the account is disabled" - }, - "canCreateEmployers": { - "type": "boolean", - "description": "[readonly] If false then the user cannot create new employers.\r\nThis can be turned on or off by the tenant admin." - }, - "disabledReason": { - "type": "string", - "nullable": true - }, - "directDebitMandate": { - "$ref": "#/components/schemas/DirectDebitMandate" - }, - "displayPrefs": { - "$ref": "#/components/schemas/UserDisplayPreferences" - }, - "showBills": { - "type": "boolean", - "description": "[readonly] Whether or not the user can see bills. This will be false if the Tenant manages billing and the user is not an admin for the Tenant", - "nullable": true - }, - "accountingCustomerId": { - "type": "string", - "description": "[readonly] Used internally to manage billing", - "nullable": true - }, - "pricingTableId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "utmInfo": { - "$ref": "#/components/schemas/UtmInfo" - }, - "firstBillableActivityDate": { - "type": "string", - "format": "date", - "nullable": true + "summary": "Get Payroll Squad Members for Employer", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/pricingtables": { + "get": { + "description": "Returns all PricingTables for the Tenant", + "operationId": "GetPricingTablesTenant", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get PricingTables", + "tags": [ + "Tenant" + ] + }, + "post": { + "description": "Create a PricingTable", + "operationId": "CreatePricingTableTenant", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PricingTable" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PricingTable" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PricingTable" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PricingTable" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PricingTable" + } + } + }, + "description": "Created" }, - "bureauNotificationEmailAddress": { - "maxLength": 150, - "type": "string", - "description": "If an email address is provided here then Bureau-related notifications will go to this address instead of the EmailAddress", - "format": "email", - "nullable": true + "400": { + "description": "Bad Request" + } + }, + "summary": "Create PricingTable", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/pricingtables/{pricingTableId}": { + "delete": { + "description": "Delete a PricingTable", + "operationId": "DeletePricingTableTenant", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "monthlyMinimum": { - "$ref": "#/components/schemas/MonthlyMinimum" + { + "in": "path", + "name": "pricingTableId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success" }, - "apiMailingEnabled": { - "type": "boolean", - "description": "Flag to keep the user up-to-date with any API changes and inform about upcoming breaking changes." + "400": { + "description": "Bad Request" + } + }, + "summary": "Delete PricingTable", + "tags": [ + "Tenant" + ] + }, + "get": { + "description": "Get a PricingTable", + "operationId": "GetPricingTableTenant", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "loginDisabled": { - "type": "boolean", - "description": "[readonly] If true then the user will not have login permissions" + { + "in": "path", + "name": "pricingTableId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PricingTable" + } + } + }, + "description": "Success" }, - "isBureauMember": { - "type": "boolean", - "description": "Indicates whether the user is a bureau member." + "400": { + "description": "Bad Request" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PricingTable" + } + } + }, + "description": "Not Found" } }, - "additionalProperties": false, - "description": "Represents a User Account.\r\nAs well as basic details about the user it also includes details of Employers that the user account can access." + "summary": "Get PricingTable", + "tags": [ + "Tenant" + ] }, - "UserAuthorization": { - "type": "object", - "properties": { - "employers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployerItem" - }, - "description": "[readonly] A list of any Employers that the user can access", - "nullable": true + "put": { + "description": "Update a PricingTables", + "operationId": "UpdatePricingTableTenant", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "tenants": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TenantItem" + { + "in": "path", + "name": "pricingTableId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PricingTable" + } }, - "description": "[readonly] A list of any Tenants that the user can administrate", - "nullable": true + "application/json": { + "schema": { + "$ref": "#/components/schemas/PricingTable" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PricingTable" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PricingTable" + } + } } }, - "additionalProperties": false, - "description": "This model provides information about what the User is able to access.\r\nThis would usually just be a list of Employers. But if the user is an administrator for a White Label instance then this will be shown in the list of Tenants." - }, - "UserCategory": { - "enum": [ - "ActiveTrialist", - "AgedActiveTrialist", - "LapsedTrialist", - "ActiveCustomer", - "LapsedCustomer", - "SubUser", - "AgedActiveTrialistAndSubUser", - "InternalUser" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PricingTable" + } + } + }, + "description": "Success" + }, + "400": { + "description": "Bad Request" + } + }, + "summary": "Update PricingTable", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/reports/apimailinglist": { + "get": { + "description": "Returns a report of active users that have asked to be updated about API for specific tenant.", + "operationId": "GetApiMailingListReportByIdTenant", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "UserDisplayPreferences": { - "type": "object", - "properties": { - "startPage": { - "$ref": "#/components/schemas/UserstartPage" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Api Mailing List Report", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/reports/netsuitebills": { + "get": { + "description": "Returns a report detailing billing, for NetSuite, for the given year and month\r\nOnly available to SuperAdmins", + "operationId": "NetSuiteBillingTenant", + "parameters": [ + { + "description": "The Id of the Tenant", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "showZeroes": { - "type": "boolean" + { + "description": "The year of the billing period", + "in": "query", + "name": "year", + "schema": { + "format": "int32", + "type": "integer" + } }, - "showTaxCodeWhenViewingPayrunEntry": { - "type": "boolean" + { + "description": "The month of the billing period", + "in": "query", + "name": "month", + "schema": { + "format": "int32", + "type": "integer" + } }, - "allowJournalResubmit": { - "type": "boolean" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } }, - "hideSalaryOnEmployeeIndexPage": { - "type": "boolean" + { + "description": "If set to true then the report will include all Tenants to which you have access", + "in": "query", + "name": "allTenants", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "NetSuite Billing Report", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/reports/users/nobillableactivity": { + "get": { + "description": "Returns a .csv file containing users created in or before the given month that do not have billable activity.", + "operationId": "GetUsersWithNoBillableActivityTenant", + "parameters": [ + { + "description": "The Id of the Tenant", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "enableMultiEmployerImport": { - "type": "boolean" + { + "in": "query", + "name": "month", + "schema": { + "format": "int32", + "type": "integer" + } }, - "enableCovid19Features": { - "type": "boolean" + { + "in": "query", + "name": "year", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Users with no Billable Activity.", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/reports/weeklyactivity": { + "get": { + "description": "Returns a report detailing User activity, summarised by week, for the given date range", + "operationId": "WeeklyActivityTenant", + "parameters": [ + { + "description": "The Id of the Tenant", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "hidePayslipCheckboxes": { - "type": "boolean" + { + "in": "query", + "name": "fromDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "hidePayslipSearchAndSort": { - "type": "boolean" + { + "in": "query", + "name": "toDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "showYtdInPayslipView": { - "type": "boolean" + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + }, + { + "description": "If set to true then the report will include all Tenants to which you have access", + "in": "query", + "name": "allTenants", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Weekly Activity Report", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/usage/{year}/{month}": { + "get": { + "description": "Returns activity for Users of this Tenant, for the Year and Month supplied", + "operationId": "UsageTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "path", + "name": "year", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "enableDpsXmlUpload": { - "type": "boolean" + { + "in": "path", + "name": "month", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get Usage", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users": { + "get": { + "description": "Returns a list of users for the Tenant", + "operationId": "UsersTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to list Users for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "enableRtiTimestampOverride": { - "type": "boolean" + { + "in": "query", + "name": "pageNum", + "schema": { + "format": "int32", + "type": "integer" + } }, - "enablePayrunWarnings": { - "type": "boolean" + { + "in": "query", + "name": "pageSize", + "schema": { + "format": "int32", + "type": "integer" + } }, - "enableWorkingDaysOverrides": { - "type": "boolean" + { + "in": "query", + "name": "sortByLastLogin", + "schema": { + "default": false, + "type": "boolean" + } }, - "enablePayrunPagination": { - "type": "boolean" + { + "in": "query", + "name": "category", + "schema": { + "$ref": "#/components/schemas/UserCategory" + } }, - "dontHideFpsEmployeeList": { - "type": "boolean" + { + "in": "query", + "name": "isBureauMember", + "schema": { + "type": "boolean" + } } - }, - "additionalProperties": false - }, - "UserIndustry": { - "enum": [ - "NotSpecified", - "Agriculture", - "Apparel", - "Banking", - "Biotechnology", - "Chemicals", - "Communication", - "Construction", - "Consulting", - "Education", - "Engineering", - "Entertainment", - "Environmental", - "Finance", - "FoodAndBeverage", - "Government", - "Healthcare", - "Hospitality", - "Insurance", - "Legal", - "Machinery", - "Manufacturing", - "Media", - "NotForProfit", - "Other", - "Recreation", - "Retail", - "Shipping", - "Technology", - "Telecommunications", - "Transportation", - "Utilities" ], - "type": "string" - }, - "UserJobType": { - "enum": [ - "BusinessOwner", - "PayrollManager", - "Accountant", - "Developer", - "SoftwareVendor", - "Other" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List Users", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/admins": { + "delete": { + "description": "Removes the specified admin user for the Tenant", + "operationId": "RemoveAdminUserTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to remove the admin User from.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "type": "string" + } + }, + "application/json-patch+json": { + "schema": { + "type": "string" + } + }, + "text/json": { + "schema": { + "type": "string" + } + } + } + }, + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Remove Admin User", + "tags": [ + "Tenant" + ] }, - "UserRole": { - "enum": [ - "Admin", - "Editor", - "Reviewer", - "PayrollClientApprover", - "PayrollClientEditor", - "PayrollClientReviewer" + "get": { + "description": "Returns a list of admin users for the Tenant", + "operationId": "AdminUsersTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to list admin Users for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "List Admin Users", + "tags": [ + "Tenant" + ] }, - "UserstartPage": { - "enum": [ - "Dashboard", - "EmployerList", - "EmployeeList", - "Payroll", - "Rti", - "BureauDashboard" + "post": { + "description": "Adds the specified user as an admin for the Tenant", + "operationId": "AddAdminUserTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to remove the admin User from.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" - }, - "UtmInfo": { - "type": "object", - "properties": { - "source": { - "type": "string", - "nullable": true - }, - "medium": { - "type": "string", - "nullable": true - }, - "term": { - "type": "string", - "nullable": true - }, + "requestBody": { "content": { - "type": "string", - "nullable": true - }, - "campaign": { - "type": "string", - "nullable": true + "application/*+json": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "type": "string" + } + }, + "application/json-patch+json": { + "schema": { + "type": "string" + } + }, + "text/json": { + "schema": { + "type": "string" + } + } } }, - "additionalProperties": false - }, - "ValueOverride": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/PayrollValueType" - }, - "value": { - "type": "number", - "description": "The value to use in place of the original value", - "format": "double" - }, - "originalValue": { - "type": "number", - "description": "[readonly] The original value", - "format": "double" - }, - "note": { - "maxLength": 150, - "type": "string", - "description": "The reason given for the override", - "nullable": true + "responses": { + "200": { + "description": "Success" + } + }, + "summary": "Add Admin User", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/employers": { + "get": { + "description": "Returns all the employers of all the users of the Tenant", + "operationId": "GetEmployersTenant", + "parameters": [ + { + "description": "Current tenant id", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "attachmentOrderId": { - "type": "string", - "description": "The Id of the AttachmentOrder. Only relevant if the Type is set to AttachmentOrderDeductions", - "format": "uuid", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Get Employers", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/search": { + "get": { + "description": "Returns a list of users for the Tenant that match the search", + "operationId": "UsersSearchTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to search Users for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "pensionId": { - "type": "string", - "description": "The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS", - "format": "uuid", - "nullable": true + { + "in": "query", + "name": "q", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Search Users", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}": { + "get": { + "description": "Returns details of a User that belongs to the Tenant", + "operationId": "UserTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to get a User for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "leaveId": { - "type": "string", - "description": "The Id of the associated Leave.", - "format": "uuid", - "nullable": true + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "description": "Success" } }, - "additionalProperties": false + "summary": "Get a User", + "tags": [ + "Tenant" + ] }, - "VarianceReport": { - "type": "object", - "properties": { - "showDifferenceAsPercentage": { - "type": "boolean" - }, - "minimumChangePercentage": { - "type": "number", - "format": "double" - }, - "primary": { - "$ref": "#/components/schemas/GrossToNetReport" - }, - "secondary": { - "$ref": "#/components/schemas/GrossToNetReport" + "put": { + "description": "Set the details of a User that belongs to the Tenant", + "operationId": "UpdateUserTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to update a User for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "joiners": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GrossToNetReportLine" + { + "description": "The Id of the User.", + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/User" + } }, - "nullable": true, - "readOnly": true - }, - "leavers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GrossToNetReportLine" + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } }, - "nullable": true, - "readOnly": true - }, - "hasDepartments": { - "type": "boolean", - "readOnly": true + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/User" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } }, - "commonLines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GrossToNetReportLine" + "description": "The User details." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } }, - "nullable": true, - "readOnly": true - }, - "hasVariances": { - "type": "boolean", - "readOnly": true + "description": "Success" }, - "report": { - "$ref": "#/components/schemas/Report" + "404": { + "description": "Not Found" + } + }, + "summary": "Update a User", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/accounting": { + "put": { + "description": "Updates the Customer Accounting Id for a user", + "operationId": "SetAccountingIdTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "title": { - "type": "string", - "nullable": true + { + "description": "The CustomerAccountingId for the user.", + "in": "query", + "name": "accountingId", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "isDraft": { - "type": "boolean" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "VarianceReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "summary": "Set User Accounting Id", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/address": { + "put": { + "description": "Updates the Address for a User", + "operationId": "SetAddressTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, + { + "description": "The Id of the User.", + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/VarianceReport" - }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/User" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/User" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "VeteranDetails": { - "type": "object", - "properties": { - "isVeteran": { - "type": "boolean", - "description": "Set to true if the employee is a veteran" + "responses": { + "204": { + "description": "No Content" }, - "firstCivilianEmploymentDate": { - "type": "string", - "description": "Date of Veteran's first civilian employment", - "format": "date", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "Employment details for veterans" - }, - "WarningsReport": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WarningsReportLine" - }, - "nullable": true + "summary": "Set Address", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/bills": { + "get": { + "description": "Returns all UsageBills for a User", + "operationId": "UserBillsTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to get a Users UsageBills for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" } }, - "additionalProperties": false - }, - "WarningsReportLine": { - "type": "object", - "properties": { - "payrollCode": { - "type": "string", - "nullable": true + "summary": "Get User Bills", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/bureauredir": { + "put": { + "description": "Sets or removes the redirect email address for a users Bureau-related notifications", + "operationId": "SetBureauRedirectEmailAddressTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employeeName": { - "type": "string", - "nullable": true + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "warningType": { - "$ref": "#/components/schemas/PayRunEntryWarningType" + { + "description": "The email address to redirect to, or an empty string to remove the redirect.", + "in": "query", + "name": "emailAddress", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "warningMessage": { - "type": "string", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "WarningsReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true - }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + "summary": "Set Bureau Redirect", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/businessname": { + "put": { + "description": "Updates the Business Name for a User", + "operationId": "SetBusinessNameTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "model": { - "$ref": "#/components/schemas/WarningsReport" + { + "description": "The Id of the User.", + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + { + "description": "The Business Name for the User.", + "in": "query", + "name": "businessName", + "schema": { + "type": "string" + } } - }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "Webhook": { - "required": [ - "url" ], - "type": "object", - "properties": { - "webhookEvent": { - "$ref": "#/components/schemas/WebhookEvent" - }, - "url": { - "maxLength": 300, - "minLength": 1, - "type": "string", - "description": "The Url to which the payload should be sent", - "format": "uri" - }, - "active": { - "type": "boolean", - "description": "If set to false then this Webhook will not be triggered" - }, - "eventCount": { - "type": "integer", - "description": "The number of times this webhook has been triggered", - "format": "int32" - }, - "lastPayload": { - "$ref": "#/components/schemas/WebhookPayload" + "responses": { + "204": { + "description": "No Content" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "WebhookEvent": { - "enum": [ - "Employee_Created", - "Employee_Updated", - "Employee_Deleted", - "Payrun_Finalised", - "Payrun_StateChanged", - "PensionMembership_Created", - "PensionMembership_Updated", - "PensionMembership_Deleted", - "JobCompleted" - ], - "type": "string" - }, - "WebhookPayload": { - "required": [ - "url" - ], - "type": "object", - "properties": { - "name": { - "maxLength": 150, - "type": "string", - "description": "[readonly] A descriptive name for this payload", - "nullable": true - }, - "url": { - "maxLength": 300, - "minLength": 1, - "type": "string", - "description": "[readonly] The Url that payload will be sent to", - "format": "uri" - }, - "attempts": { - "type": "integer", - "description": "[readonly] The number of attempts that have been made to deliver this payload", - "format": "int32" - }, - "statusCode": { - "type": "integer", - "description": "[readonly] The status code received from the Url", - "format": "int32" - }, - "taskStatus": { - "$ref": "#/components/schemas/BackgroundTaskStatus" - }, - "statusMessage": { - "maxLength": 150, - "type": "string", - "description": "[readonly] A message to accompany the status", - "nullable": true - }, - "created": { - "type": "string", - "description": "[readonly] The date and time this payload was created", - "format": "date", - "readOnly": true + "summary": "Set User Business Name", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/country": { + "put": { + "description": "Updates the Country for a User", + "operationId": "SetCountryTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payload": { - "description": "[readonly] the JSON payload that will be sent to the URl", - "nullable": true + { + "description": "The Id of the User.", + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "description": "The Country for the User.", + "in": "query", + "name": "country", + "schema": { + "$ref": "#/components/schemas/Country" + } } - }, - "additionalProperties": false - }, - "WorkerGroup": { - "required": [ - "name" ], - "type": "object", - "properties": { - "name": { - "maxLength": 150, - "minLength": 1, - "type": "string" - }, - "contributionLevelType": { - "$ref": "#/components/schemas/PensionContributionLevelType" - }, - "employeeContribution": { - "type": "number", - "format": "double" - }, - "employeeContributionIsPercentage": { - "type": "boolean" - }, - "employerContribution": { - "type": "number", - "format": "double" - }, - "employerContributionIsPercentage": { - "type": "boolean" - }, - "employerContributionTopUpPercentage": { - "type": "number", - "description": "Increase Employer Contribution by this percentage of the Employee Contribution", - "format": "double" - }, - "employerContributionIncludesNiSaving": { - "type": "boolean", - "description": "Employer Contribution includes the Employers NI saving" - }, - "employerContributionNiSavingPercentage": { - "type": "number", - "description": "Increase Employer Contribution by this percentage of the Employers NI saving", - "format": "double" + "responses": { + "204": { + "description": "No Content" }, - "isAvc": { - "type": "boolean", - "description": "Determines whether the workergroup uses additonal voluntary contributions.\r\nThis property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC." + "404": { + "description": "Not Found" + } + }, + "summary": "Set Country", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/disabled": { + "put": { + "description": "Disables (or re-enabled) a user account", + "operationId": "DisabledTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "additionalVoluntaryContribution": { - "type": "number", - "description": "Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage.", - "format": "double", - "nullable": true + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "avcIsPercentage": { - "type": "boolean", - "description": "Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage,", - "nullable": true + { + "description": "Whether or not the account should be disabled.", + "in": "query", + "name": "disabled", + "schema": { + "type": "boolean" + } }, - "employerContributionNiSaving": { - "type": "number", - "description": "Employers NI Saving", - "format": "double" + { + "description": "Whether or not the account should have log in permissions.", + "in": "query", + "name": "loginDisabled", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "type": "string" + } + }, + "application/json-patch+json": { + "schema": { + "type": "string" + } + }, + "text/json": { + "schema": { + "type": "string" + } + } }, - "customThreshold": { - "type": "boolean" + "description": "A message to show the user explaining why the account is disabled." + }, + "responses": { + "200": { + "description": "Success" }, - "lowerLimit": { - "type": "number", - "format": "double" + "400": { + "description": "Bad Request" + } + }, + "summary": "Disable User Account", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/employeecount": { + "put": { + "description": "Updates the Employee Count for a User", + "operationId": "SetEmployeeCountTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "upperLimit": { - "type": "number", - "format": "double" + { + "description": "The Id of the User.", + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "papdisGroup": { - "maxLength": 40, - "type": "string", - "nullable": true + { + "description": "The Employee Count for the User.", + "in": "query", + "name": "employeeCount", + "schema": { + "format": "int32", + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "papdisSubGroup": { - "maxLength": 40, - "type": "string", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Set Employee Count", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/employercreation": { + "put": { + "description": "Enable (or disable) a user accounts ability to create new employers", + "operationId": "EmployerCreationTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "localAuthorityNumber": { - "maxLength": 3, - "pattern": "^(\\d{3})$", - "type": "string", - "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", - "nullable": true + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "schoolEmployerType": { - "maxLength": 4, - "pattern": "^(\\d{4})$", - "type": "string", - "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", - "nullable": true + { + "description": "Whether or not the account can create employers.", + "in": "query", + "name": "enabled", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Success" }, - "matIdentifier": { - "maxLength": 3, - "pattern": "^(\\d{3}|)$", - "type": "string", - "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", - "nullable": true + "404": { + "description": "Not Found" + } + }, + "summary": "Enable Employer Creation", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/employers": { + "get": { + "description": "Returns Employer details for a User that belongs to the Tenant", + "operationId": "UserEmployersTenant", + "parameters": [ + { + "description": "The Id of the Tenant you want to get User Employers for.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "matUniqueNumber": { - "maxLength": 4, - "pattern": "^(\\d{4}|)$", - "type": "string", - "description": "Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales", - "nullable": true + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get User Employers", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/industry": { + "put": { + "description": "Updates the Industry for a User", + "operationId": "SetIndustryTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "employerReference": { - "type": "string", - "nullable": true + { + "description": "The Id of the User.", + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "lgpsFund": { - "$ref": "#/components/schemas/LgpsFund" + { + "description": "The Industry for the User.", + "in": "query", + "name": "industry", + "schema": { + "$ref": "#/components/schemas/UserIndustry" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "workerGroupId": { - "type": "string", - "description": "[readonly]", - "format": "uuid" + "404": { + "description": "Not Found" + } + }, + "summary": "Set Industry", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/monthlyminimum": { + "put": { + "description": "Updates the MonthlyMinimum subscription charge for a user", + "operationId": "SetMonthlyMinimumTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "assumedPensionablePay": { - "$ref": "#/components/schemas/AssumedPensionablePay" + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/MonthlyMinimum" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MonthlyMinimum" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/MonthlyMinimum" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MonthlyMinimum" + } + } + } + }, + "responses": { + "204": { + "description": "No Content" }, - "pensionablePayDefinition": { - "$ref": "#/components/schemas/PensionablePayDefinition" + "404": { + "description": "Not Found" + } + }, + "summary": "Set Monthly Minimum", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/pricingtable": { + "put": { + "description": "Updates the Customer Accounting Id for a user", + "operationId": "SetPricingTableIdTenant", + "parameters": [ + { + "description": "The Id of the Tenant.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "payslipDescription": { - "maxLength": 100, - "type": "string", - "description": "Used for overwriting the pension description that is displayed on the payslip", - "nullable": true + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + { + "description": "The PricingTable Id for the user. Provide null and the user will use the Tenant default", + "in": "query", + "name": "pricingTableId", + "schema": { + "format": "uuid", + "type": "string" + } } - }, - "additionalProperties": false - }, - "WorkingPattern": { - "required": [ - "title" ], - "type": "object", - "properties": { - "title": { - "maxLength": 100, - "minLength": 1, - "type": "string" - }, - "mon": { - "type": "number", - "format": "double" + "responses": { + "204": { + "description": "No Content" }, - "tue": { - "type": "number", - "format": "double" + "404": { + "description": "Not Found" + } + }, + "summary": "Set User PricingTableId", + "tags": [ + "Tenant" + ] + } + }, + "/tenants/{id}/users/{userId}/tenant": { + "put": { + "description": "Changes the Tenant for a User. Only applicable if you manage two or more Tenants", + "operationId": "SetTenantTenant", + "parameters": [ + { + "description": "The Id of the Tenant the user is currently assigned to.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "wed": { - "type": "number", - "format": "double" + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "thu": { - "type": "number", - "format": "double" + { + "description": "The Id of the Tenant the user is to be assigned to.", + "in": "query", + "name": "newTenantId", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "fri": { - "type": "number", - "format": "double" + "404": { + "description": "Not Found" + } + }, + "summary": "Set User Tenant", + "tags": [ + "Tenant" + ] + } + }, + "/tools/calculate-net-of-on-costs": { + "get": { + "description": "Calculate the Gross Daily Pay and typical Net Costs for an employee.\r\nThis endpoint is currently being beta tested and subject to un-announced breaking changes.", + "operationId": "CalculateNetOfOnCostsTools", + "parameters": [ + { + "description": "The total chargeable rate per day.", + "in": "query", + "name": "NotionalDayRate", + "required": true, + "schema": { + "format": "double", + "type": "number" + } }, - "sat": { - "type": "number", - "format": "double" + { + "description": "Used to find associated legislative values, default Today.", + "in": "query", + "name": "CalculationDate", + "schema": { + "format": "date-time", + "type": "string" + } }, - "sun": { - "type": "number", - "format": "double" + { + "description": "The charge for providing this service, per pay period.", + "in": "query", + "name": "Fee", + "required": true, + "schema": { + "format": "double", + "type": "number" + } }, - "contractedWeeks": { - "pattern": "^([0-9]|[1234][0-9]|5[0-2])(\\.\\d{0,6})?$", - "type": "number", - "description": "The amount of weeks an employee works, utilise for employees who aren't working full time.\r\nIf Null then the default is used.", - "format": "double", - "nullable": true + { + "description": "If true, 'Fee' will be treated as a percentage.", + "in": "query", + "name": "FeeIsPercentage", + "required": true, + "schema": { + "type": "boolean" + } }, - "fullTimeContractedWeeks": { - "pattern": "^(52)(\\.\\d{0,6})?$", - "type": "number", - "description": "The amount of weeks an employee works (Full Time). If Null then the default is used.", - "format": "double", - "nullable": true + { + "description": "Override the Apprenticeship Levy Rate. 0.50 for 0.5%.", + "in": "query", + "name": "ApprenticeshipLevyRateOverride", + "schema": { + "format": "double", + "type": "number" + } }, - "fullTimeContractedHours": { - "type": "number", - "description": "The amount of hours an employee works (Full Time). If Null then the default is used.", - "format": "double", - "nullable": true + { + "description": "The employers pension contributions, per pay period.", + "in": "query", + "name": "EmployersPensionContribution", + "required": true, + "schema": { + "format": "double", + "type": "number" + } }, - "bankHolidays": { - "$ref": "#/components/schemas/BankHolidayCollection" + { + "description": "If true, EmployersPensionContribution will be treated as a percentage.", + "in": "query", + "name": "EmployersPensionContributionIsPercentage", + "required": true, + "schema": { + "type": "boolean" + } }, - "proRataRule": { - "$ref": "#/components/schemas/ProRataRule" + { + "description": "The employees pension contributions, per pay period.", + "in": "query", + "name": "EmployeesPensionContribution", + "required": true, + "schema": { + "format": "double", + "type": "number" + } }, - "bankHolidayDates": { - "type": "array", - "items": { - "type": "string", - "format": "date-time" - }, - "description": "[readonly] The dates that are classed as Bank Holidays for this WorkingPattern", - "nullable": true + { + "description": "If true, EmployeesPensionContribution will be used as a percentage.", + "in": "query", + "name": "EmployeesPensionContributionIsPercentage", + "required": true, + "schema": { + "type": "boolean" + } }, - "workingPatternHoursType": { - "$ref": "#/components/schemas/WorkingPatternHoursType" + { + "description": "If true, legislative Ae Bandings will be applied during calculation.", + "in": "query", + "name": "UseAeBandings", + "required": true, + "schema": { + "type": "boolean" + } }, - "isDefault": { - "type": "boolean" + { + "description": "The holiday weeks to use for the calculation.", + "in": "query", + "name": "HolidayWeeks", + "required": true, + "schema": { + "format": "double", + "type": "number" + } }, - "effectiveFrom": { - "type": "string", - "description": "The date when the assignment of the Working Pattern becomes effective.\r\nRequired for a Shift WorkingPattern to determine when it starts", - "format": "date", - "nullable": true + { + "description": "Number of days the employee works per week.", + "in": "query", + "name": "DaysWorkedPerWeek", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } }, - "workingPatternType": { - "$ref": "#/components/schemas/WorkingPatternType" + { + "description": "The pay frequency to be used for the calculation.", + "in": "query", + "name": "PayPeriod", + "required": true, + "schema": { + "$ref": "#/components/schemas/PayPeriods" + } }, - "shiftWorkingPatternDays": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShiftWorkingPatternDay" + { + "description": "The type of pension scheme being enrolled into, default SalarySacrifice.", + "in": "query", + "name": "PensionRule", + "schema": { + "$ref": "#/components/schemas/PensionRule" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Contract.NetOfOnCostsResponse" + } + } }, - "nullable": true + "description": "Success" }, - "workingPatternEffectiveFrom": { - "type": "string", - "format": "date", - "nullable": true + "400": { + "description": "Bad Request" }, - "id": { - "type": "string", - "description": "[readonly] The unique id of the object", - "format": "uuid", - "readOnly": true + "403": { + "description": "Forbidden" } }, - "additionalProperties": false - }, - "WorkingPatternHoursType": { - "enum": [ - "HoursPerDay", - "HoursPerWeek", - "HoursPerPattern" + "summary": "Calculate Net of On Costs", + "tags": [ + "Tools" + ] + } + }, + "/ytd": { + "get": { + "description": "Returns a CSV file containing YTD values for all Employees.", + "operationId": "YtdReports", + "parameters": [ + { + "in": "query", + "name": "employerId", + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "header", + "name": "accept", + "schema": { + "type": "string" + } + } ], - "type": "string" - }, - "WorkingPatternType": { - "enum": [ - "Standard", - "Shift" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + }, + "text/csv": { + "schema": { + "$ref": "#/components/schemas/ReportResponse" + } + } + }, + "description": "Success" + } + }, + "summary": "Year To Date Values", + "tags": [ + "Reports" + ] + } + }, + "/{employerId}/employees/AverageHolidayPay/PayHistory": { + "get": { + "operationId": "GetByEmployerAverageHolidayPayHistory", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } ], - "type": "string" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayHistoryResponse" + }, + "type": "array" + } + } + }, + "description": "Success" + } + }, + "summary": "Get AverageHolidayPayHistory for Employer", + "tags": [ + "AverageHolidayPayHistory" + ] }, - "YearEnd": { - "type": "object", - "properties": { - "endingYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "startingYear": { - "$ref": "#/components/schemas/TaxYear" - }, - "createEpsForFinalSubmission": { - "type": "boolean", - "description": "[readonly] Whether or not the system will automatically create an EPS to tell HMRC the year has ended." - }, - "createEpsForEmploymentAllowance": { - "type": "boolean", - "description": "[readonly] Whether or not the system will automatically create an EPS to tell HMRC you qualify for Employment Allowance." - }, - "createExb": { - "type": "boolean", - "description": "[readonly] Whether or not the system will automatically create an EXB to inform HMRC of Expenses and Benefits" - }, - "setEmploymentAllowance": { - "type": "number", - "description": "[readonly] If the Employment Allowance needs to be changed, this indicates the new value", - "format": "double", - "nullable": true - }, - "taxCodeChanges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/YearEndTaxCodeChange" + "post": { + "operationId": "CreateAverageHolidayPayHistory", + "parameters": [ + { + "description": "", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayHistoryRequest" + }, + "type": "array" + } }, - "description": "[readonly] Details of changes that wil be made to Tax Codes", - "nullable": true - }, - "removeWeek1Month1": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayHistoryRequest" + }, + "type": "array" + } }, - "description": "[readonly] Employees that will have the Week1Month1 flag removed from their tax code", - "nullable": true - }, - "emailP60": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayHistoryRequest" + }, + "type": "array" + } }, - "description": "[readonly] Employees who will be automatically emailed P60s", - "nullable": true + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayHistoryRequest" + }, + "type": "array" + } + } }, - "pushP60": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExternalDataProviderId" - }, - "description": "[readonly] ExternalDataProviderIds to which P60s can be pushed", - "nullable": true + "description": "" + }, + "responses": { + "200": { + "description": "Success" }, - "emailCisStatement": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Item" - }, - "description": "[readonly] Subcontractors who will be automatically sent an annual CIS Statement", - "nullable": true + "400": { + "description": "Bad Request" } }, - "additionalProperties": false, - "description": "This model gives you a summary of what will happen when you confirm the closing of one year and the start of the next" + "summary": "Create multiple AverageHolidayPayHistory for an Employer", + "tags": [ + "AverageHolidayPayHistory" + ] }, - "YearEndTaxCodeChange": { - "type": "object", - "properties": { - "employee": { - "$ref": "#/components/schemas/Item" + "put": { + "operationId": "UpdateAverageHolidayPayHistory", + "parameters": [ + { + "description": "", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/*+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayHistoryUpdateRequest" + }, + "type": "array" + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayHistoryUpdateRequest" + }, + "type": "array" + } + }, + "application/json-patch+json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayHistoryUpdateRequest" + }, + "type": "array" + } + }, + "text/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayHistoryUpdateRequest" + }, + "type": "array" + } + } }, - "currentCode": { - "type": "string", - "description": "[readonly] The Employees current tax code", - "nullable": true + "description": "" + }, + "responses": { + "200": { + "description": "Success" }, - "newCode": { - "type": "string", - "description": "[readonly] The new TaxCode for the employee", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "Forms part of the YearEnd model to list changes to Tax Codes" - }, - "YtdReport": { - "type": "object", - "properties": { - "payrun": { - "$ref": "#/components/schemas/PayRun" + "summary": "Update multiple AverageHolidayPayHistory for an Employer", + "tags": [ + "AverageHolidayPayHistory" + ] + } + }, + "/{employerId}/employees/AverageHolidayPay/PayHistory/import": { + "post": { + "description": "Import Pay History from a CSV file.", + "operationId": "ImportCsvAverageHolidayPayHistory", + "parameters": [ + { + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "lines": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmployeeYtdValues" + { + "description": "Set to true and nothing will be imported but you'll be shown a preview of the data.", + "in": "query", + "name": "previewOnly", + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "encoding": { + "file": { + "style": "form" + } + }, + "schema": { + "properties": { + "file": { + "format": "binary", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Item" + }, + "type": "array" + } + } }, - "nullable": true - }, - "report": { - "$ref": "#/components/schemas/Report" + "description": "Success" + } + }, + "summary": "Import AverageHistoryPayHistory from csv file", + "tags": [ + "AverageHolidayPayHistory" + ] + } + }, + "/{employerId}/employees/AverageHolidayPay/PayHistory/{id}": { + "delete": { + "operationId": "DeleteAverageHolidayPayHistory", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "taxYear": { - "$ref": "#/components/schemas/TaxYear" + { + "description": "The pay history unique id", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "title": { - "type": "string", - "nullable": true + "400": { + "description": "Bad Request" }, - "isDraft": { - "type": "boolean" + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "YtdReportReportResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "[readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report", - "nullable": true + "summary": "Delete an AverageHolidayPayHistory record", + "tags": [ + "AverageHolidayPayHistory" + ] + } + }, + "/{employerId}/employees/{employeeId}/AverageHolidayPay/PayHistory": { + "delete": { + "operationId": "DeleteByEmployeeIdAverageHolidayPayHistory", + "parameters": [ + { + "description": "The Id of the Employer to which the Employee belongs", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "content": { - "type": "string", - "description": "[readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value.", - "nullable": true + { + "description": "The Id of the Employee", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" }, - "model": { - "$ref": "#/components/schemas/YtdReport" + "400": { + "description": "Bad Request" }, - "stream": { - "type": "string", - "description": "byte array", - "format": "byte", - "nullable": true + "404": { + "description": "Not Found" } }, - "additionalProperties": false, - "description": "Used to encapsulate a response for any of the reports.\r\nSee the Introduction Guide for Reports for more details" - }, - "YtdValue": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/PayrollValueType" + "summary": "Delete all AverageHolidayPayHistory for an Employee", + "tags": [ + "AverageHolidayPayHistory" + ] + } + }, + "/{employerId}/employees/{employeeId}/AverageHolidayPay/PayHistory/{taxYear}": { + "get": { + "description": "List AverageHistoryPayHistory for the given Employee in the specified TaxYear", + "operationId": "GetByEmployeeAverageHolidayPayHistory", + "parameters": [ + { + "description": "The Id of the Employer.", + "in": "path", + "name": "employerId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "broughtForward": { - "type": "number", - "format": "double" + { + "description": "The Employee Id.", + "in": "path", + "name": "employeeId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } }, - "period": { - "type": "number", - "format": "double" + { + "description": "The TaxYear for which you want the history.", + "in": "path", + "name": "taxYear", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaxYear" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Contract.PayHistoryResponse" + }, + "type": "array" + } + } + }, + "description": "Success" }, - "value": { - "type": "number", - "format": "double", - "readOnly": true + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" } }, - "additionalProperties": false - }, - "ZeroPaidFilter": { - "enum": [ - "NegativePaid", - "ZeroPaid", - "NonZeroPaid" - ], - "type": "string" - } - }, - "securitySchemes": { - "Basic": { - "type": "http", - "description": "If you have an API Key then enter is as the password.
The username can be anything you like.", - "scheme": "basic" + "summary": "List AverageHolidayPayHistory for Employee", + "tags": [ + "AverageHolidayPayHistory" + ] } } }, "security": [ { - "Basic": [ ] + "Basic": [] }, { "oauth2": [ @@ -74157,4 +78972,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..bf46e1f --- /dev/null +++ b/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="synergitech" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="staffology-php" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/src/Api/AccountApi.php b/src/Api/AccountApi.php index 18ac0e7..1542b03 100644 --- a/src/Api/AccountApi.php +++ b/src/Api/AccountApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,19 +76,19 @@ class AccountApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'activateAccount' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'changeEmailAddressAccount' => [ 'application/json', ], 'createApiKeyAccount' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createDemoEmployerAccount' => [ 'application/json', @@ -115,16 +118,16 @@ class AccountApi 'application/json', ], 'profileAccount' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'setEmployerDefaultsAccount' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updatePhotoAccount' => [ 'multipart/form-data', @@ -253,36 +256,15 @@ public function activateAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\User', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\User' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\User', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -297,34 +279,11 @@ public function activateAccountWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\User'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -334,8 +293,9 @@ public function activateAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -605,36 +565,15 @@ public function changeEmailAddressAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\User', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\User' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\User', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -649,34 +588,11 @@ public function changeEmailAddressAccountWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\User'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -686,8 +602,9 @@ public function changeEmailAddressAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -927,36 +844,15 @@ public function createApiKeyAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\Item', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -971,34 +867,11 @@ public function createApiKeyAccountWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -1008,8 +881,9 @@ public function createApiKeyAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1244,10 +1118,10 @@ public function createDemoEmployerAccountWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1459,10 +1333,10 @@ public function deleteApiKeyAccountWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1698,36 +1572,15 @@ public function getAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\User', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\User' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\User', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1742,34 +1595,11 @@ public function getAccountWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\User'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1779,8 +1609,9 @@ public function getAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2036,36 +1867,15 @@ public function getApiKeyAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2080,34 +1890,11 @@ public function getApiKeyAccountWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2117,8 +1904,9 @@ public function getApiKeyAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2359,36 +2147,15 @@ public function getEmployerDefaultsAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerDefaults', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerDefaults' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerDefaults', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerDefaults', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2403,34 +2170,11 @@ public function getEmployerDefaultsAccountWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerDefaults'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerDefaults', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2440,8 +2184,9 @@ public function getEmployerDefaultsAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2661,36 +2406,15 @@ public function getInvitationsAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2705,34 +2429,11 @@ public function getInvitationsAccountWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2742,8 +2443,9 @@ public function getInvitationsAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2971,36 +2673,15 @@ public function getTenantAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Tenant', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Tenant' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Tenant', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3015,34 +2696,11 @@ public function getTenantAccountWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Tenant'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3052,8 +2710,9 @@ public function getTenantAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3309,36 +2968,15 @@ public function getUserEmployersAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerItem[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerItem[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerItem[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerItem[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3353,34 +2991,11 @@ public function getUserEmployersAccountWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerItem[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerItem[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3390,8 +3005,9 @@ public function getUserEmployersAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3627,36 +3243,15 @@ public function listApiKeysAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3671,34 +3266,11 @@ public function listApiKeysAccountWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3708,8 +3280,9 @@ public function listApiKeysAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3933,36 +3506,15 @@ public function profileAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\User', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\User' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\User', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3977,34 +3529,11 @@ public function profileAccountWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\User'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4014,8 +3543,9 @@ public function profileAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4253,36 +3783,15 @@ public function setEmployerDefaultsAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerDefaults', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerDefaults' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerDefaults', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerDefaults', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4297,34 +3806,11 @@ public function setEmployerDefaultsAccountWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerDefaults'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerDefaults', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4334,8 +3820,9 @@ public function setEmployerDefaultsAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4573,36 +4060,15 @@ public function updatePhotoAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\User', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\User' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\User', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4617,34 +4083,11 @@ public function updatePhotoAccountWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\User'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4654,8 +4097,9 @@ public function updatePhotoAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4767,19 +4211,14 @@ public function updatePhotoAccountRequest( // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -4897,10 +4336,10 @@ public function verifyAccountWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -5115,36 +4554,15 @@ public function verifyResponseAccountWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('bool', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('bool' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'bool', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'bool', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5159,34 +4577,11 @@ public function verifyResponseAccountWithHttpInfo( ); } - $returnType = 'bool'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'bool', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5196,8 +4591,9 @@ public function verifyResponseAccountWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5409,4 +4805,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/AeEmployeeAssessmentApi.php b/src/Api/AeEmployeeAssessmentApi.php new file mode 100644 index 0000000..176583c --- /dev/null +++ b/src/Api/AeEmployeeAssessmentApi.php @@ -0,0 +1,3579 @@ + [ + 'application/json', + ], + 'createAeEmployeeAssessmentAeEmployeeAssessment' => [ + 'application/*+json', + 'application/json', + 'application/json-patch+json', + 'text/json', + ], + 'emailAeLetterAeEmployeeAssessment' => [ + 'application/json', + ], + 'getAeEmployeeAssessmentsAeEmployeeAssessment' => [ + 'application/json', + ], + 'getAeLetterAeEmployeeAssessment' => [ + 'application/json', + ], + 'getEmployeeLettersAeEmployeeAssessment' => [ + 'application/json', + ], + 'getPendingLettersAeEmployeeAssessment' => [ + 'application/json', + ], + 'getPendingLettersCountAeEmployeeAssessment' => [ + 'application/json', + ], + 'getReenrolmentDatesAeEmployeeAssessment' => [ + 'application/json', + ], + 'markAeLetterAsSentAeEmployeeAssessment' => [ + 'application/json', + ], + 'markAeLettersAsSentAeEmployeeAssessment' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface|null $client + * @param Configuration|null $config + * @param HeaderSelector|null $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex(): int + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig(): Configuration + { + return $this->config; + } + + /** + * Operation assessAeEmployeeAssessment + * + * Process AE Assessment for Employee during PayRun + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param string|null $payRunId The Id of the PayRun being assessed (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['assessAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[]|null + */ + public function assessAeEmployeeAssessment( + string $employerId, + string $employeeId, + ?string $payRunId = null, + string $contentType = self::contentTypes['assessAeEmployeeAssessment'][0] + ): ?array + { + list($response) = $this->assessAeEmployeeAssessmentWithHttpInfo($employerId, $employeeId, $payRunId, $contentType); + return $response; + } + + /** + * Operation assessAeEmployeeAssessmentWithHttpInfo + * + * Process AE Assessment for Employee during PayRun + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param string|null $payRunId The Id of the PayRun being assessed (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['assessAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[], HTTP status code, HTTP response headers (array of strings) + */ + public function assessAeEmployeeAssessmentWithHttpInfo( + string $employerId, + string $employeeId, + ?string $payRunId = null, + string $contentType = self::contentTypes['assessAeEmployeeAssessment'][0] + ): array + { + $request = $this->assessAeEmployeeAssessmentRequest($employerId, $employeeId, $payRunId, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation assessAeEmployeeAssessmentAsync + * + * Process AE Assessment for Employee during PayRun + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param string|null $payRunId The Id of the PayRun being assessed (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['assessAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function assessAeEmployeeAssessmentAsync( + string $employerId, + string $employeeId, + ?string $payRunId = null, + string $contentType = self::contentTypes['assessAeEmployeeAssessment'][0] + ): PromiseInterface + { + return $this->assessAeEmployeeAssessmentAsyncWithHttpInfo($employerId, $employeeId, $payRunId, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation assessAeEmployeeAssessmentAsyncWithHttpInfo + * + * Process AE Assessment for Employee during PayRun + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param string|null $payRunId The Id of the PayRun being assessed (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['assessAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function assessAeEmployeeAssessmentAsyncWithHttpInfo( + string $employerId, + string $employeeId, + ?string $payRunId = null, + string $contentType = self::contentTypes['assessAeEmployeeAssessment'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[]'; + $request = $this->assessAeEmployeeAssessmentRequest($employerId, $employeeId, $payRunId, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'assessAeEmployeeAssessment' + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param string|null $payRunId The Id of the PayRun being assessed (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['assessAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function assessAeEmployeeAssessmentRequest( + string $employerId, + string $employeeId, + ?string $payRunId = null, + string $contentType = self::contentTypes['assessAeEmployeeAssessment'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling assessAeEmployeeAssessment' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling assessAeEmployeeAssessment' + ); + } + + + + $resourcePath = '/employers/{employerId}/aeassessments/employees/{employeeId}/assess'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $payRunId, + 'payRunId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createAeEmployeeAssessmentAeEmployeeAssessment + * + * Create employee auto enrolment assessment + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param \SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryRequest|null $contractAeEmployeeAssessmentHistoryRequest The request containing all data required for the employee assessment (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAeEmployeeAssessmentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return mixed + */ + public function createAeEmployeeAssessmentAeEmployeeAssessment( + string $employerId, + string $employeeId, + ?\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryRequest $contractAeEmployeeAssessmentHistoryRequest = null, + string $contentType = self::contentTypes['createAeEmployeeAssessmentAeEmployeeAssessment'][0] + ): mixed + { + list($response) = $this->createAeEmployeeAssessmentAeEmployeeAssessmentWithHttpInfo($employerId, $employeeId, $contractAeEmployeeAssessmentHistoryRequest, $contentType); + return $response; + } + + /** + * Operation createAeEmployeeAssessmentAeEmployeeAssessmentWithHttpInfo + * + * Create employee auto enrolment assessment + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param \SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryRequest|null $contractAeEmployeeAssessmentHistoryRequest The request containing all data required for the employee assessment (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAeEmployeeAssessmentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of mixed, HTTP status code, HTTP response headers (array of strings) + */ + public function createAeEmployeeAssessmentAeEmployeeAssessmentWithHttpInfo( + string $employerId, + string $employeeId, + ?\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryRequest $contractAeEmployeeAssessmentHistoryRequest = null, + string $contentType = self::contentTypes['createAeEmployeeAssessmentAeEmployeeAssessment'][0] + ): array + { + $request = $this->createAeEmployeeAssessmentAeEmployeeAssessmentRequest($employerId, $employeeId, $contractAeEmployeeAssessmentHistoryRequest, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'mixed', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'mixed', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'mixed', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation createAeEmployeeAssessmentAeEmployeeAssessmentAsync + * + * Create employee auto enrolment assessment + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param \SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryRequest|null $contractAeEmployeeAssessmentHistoryRequest The request containing all data required for the employee assessment (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAeEmployeeAssessmentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createAeEmployeeAssessmentAeEmployeeAssessmentAsync( + string $employerId, + string $employeeId, + ?\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryRequest $contractAeEmployeeAssessmentHistoryRequest = null, + string $contentType = self::contentTypes['createAeEmployeeAssessmentAeEmployeeAssessment'][0] + ): PromiseInterface + { + return $this->createAeEmployeeAssessmentAeEmployeeAssessmentAsyncWithHttpInfo($employerId, $employeeId, $contractAeEmployeeAssessmentHistoryRequest, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createAeEmployeeAssessmentAeEmployeeAssessmentAsyncWithHttpInfo + * + * Create employee auto enrolment assessment + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param \SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryRequest|null $contractAeEmployeeAssessmentHistoryRequest The request containing all data required for the employee assessment (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAeEmployeeAssessmentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createAeEmployeeAssessmentAeEmployeeAssessmentAsyncWithHttpInfo( + string $employerId, + string $employeeId, + ?\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryRequest $contractAeEmployeeAssessmentHistoryRequest = null, + string $contentType = self::contentTypes['createAeEmployeeAssessmentAeEmployeeAssessment'][0] + ): PromiseInterface + { + $returnType = 'mixed'; + $request = $this->createAeEmployeeAssessmentAeEmployeeAssessmentRequest($employerId, $employeeId, $contractAeEmployeeAssessmentHistoryRequest, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createAeEmployeeAssessmentAeEmployeeAssessment' + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param \SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryRequest|null $contractAeEmployeeAssessmentHistoryRequest The request containing all data required for the employee assessment (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAeEmployeeAssessmentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createAeEmployeeAssessmentAeEmployeeAssessmentRequest( + string $employerId, + string $employeeId, + ?\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryRequest $contractAeEmployeeAssessmentHistoryRequest = null, + string $contentType = self::contentTypes['createAeEmployeeAssessmentAeEmployeeAssessment'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling createAeEmployeeAssessmentAeEmployeeAssessment' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling createAeEmployeeAssessmentAeEmployeeAssessment' + ); + } + + + + $resourcePath = '/employers/{employerId}/aeassessments/employees/{employeeId}/create'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($contractAeEmployeeAssessmentHistoryRequest)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractAeEmployeeAssessmentHistoryRequest)); + } else { + $httpBody = $contractAeEmployeeAssessmentHistoryRequest; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation emailAeLetterAeEmployeeAssessment + * + * Email AeLetter + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the AeEmployeeAssessmentHistory (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailAeLetterAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\EmployerEmail + */ + public function emailAeLetterAeEmployeeAssessment( + string $employerId, + string $employeeId, + string $id, + string $contentType = self::contentTypes['emailAeLetterAeEmployeeAssessment'][0] + ): \SynergiTech\Staffology\Model\EmployerEmail + { + list($response) = $this->emailAeLetterAeEmployeeAssessmentWithHttpInfo($employerId, $employeeId, $id, $contentType); + return $response; + } + + /** + * Operation emailAeLetterAeEmployeeAssessmentWithHttpInfo + * + * Email AeLetter + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the AeEmployeeAssessmentHistory (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailAeLetterAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\EmployerEmail, HTTP status code, HTTP response headers (array of strings) + */ + public function emailAeLetterAeEmployeeAssessmentWithHttpInfo( + string $employerId, + string $employeeId, + string $id, + string $contentType = self::contentTypes['emailAeLetterAeEmployeeAssessment'][0] + ): array + { + $request = $this->emailAeLetterAeEmployeeAssessmentRequest($employerId, $employeeId, $id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEmail', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEmail', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\EmployerEmail', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation emailAeLetterAeEmployeeAssessmentAsync + * + * Email AeLetter + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the AeEmployeeAssessmentHistory (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailAeLetterAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function emailAeLetterAeEmployeeAssessmentAsync( + string $employerId, + string $employeeId, + string $id, + string $contentType = self::contentTypes['emailAeLetterAeEmployeeAssessment'][0] + ): PromiseInterface + { + return $this->emailAeLetterAeEmployeeAssessmentAsyncWithHttpInfo($employerId, $employeeId, $id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation emailAeLetterAeEmployeeAssessmentAsyncWithHttpInfo + * + * Email AeLetter + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the AeEmployeeAssessmentHistory (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailAeLetterAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function emailAeLetterAeEmployeeAssessmentAsyncWithHttpInfo( + string $employerId, + string $employeeId, + string $id, + string $contentType = self::contentTypes['emailAeLetterAeEmployeeAssessment'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\EmployerEmail'; + $request = $this->emailAeLetterAeEmployeeAssessmentRequest($employerId, $employeeId, $id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'emailAeLetterAeEmployeeAssessment' + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the AeEmployeeAssessmentHistory (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailAeLetterAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function emailAeLetterAeEmployeeAssessmentRequest( + string $employerId, + string $employeeId, + string $id, + string $contentType = self::contentTypes['emailAeLetterAeEmployeeAssessment'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling emailAeLetterAeEmployeeAssessment' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling emailAeLetterAeEmployeeAssessment' + ); + } + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling emailAeLetterAeEmployeeAssessment' + ); + } + + + $resourcePath = '/employers/{employerId}/aeassessments/employees/{employeeId}/{id}/letter/email'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAeEmployeeAssessmentsAeEmployeeAssessment + * + * List employee auto enrolment assessment + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAeEmployeeAssessmentsAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[]|null + */ + public function getAeEmployeeAssessmentsAeEmployeeAssessment( + string $employerId, + string $employeeId, + string $contentType = self::contentTypes['getAeEmployeeAssessmentsAeEmployeeAssessment'][0] + ): ?array + { + list($response) = $this->getAeEmployeeAssessmentsAeEmployeeAssessmentWithHttpInfo($employerId, $employeeId, $contentType); + return $response; + } + + /** + * Operation getAeEmployeeAssessmentsAeEmployeeAssessmentWithHttpInfo + * + * List employee auto enrolment assessment + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAeEmployeeAssessmentsAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[], HTTP status code, HTTP response headers (array of strings) + */ + public function getAeEmployeeAssessmentsAeEmployeeAssessmentWithHttpInfo( + string $employerId, + string $employeeId, + string $contentType = self::contentTypes['getAeEmployeeAssessmentsAeEmployeeAssessment'][0] + ): array + { + $request = $this->getAeEmployeeAssessmentsAeEmployeeAssessmentRequest($employerId, $employeeId, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getAeEmployeeAssessmentsAeEmployeeAssessmentAsync + * + * List employee auto enrolment assessment + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAeEmployeeAssessmentsAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getAeEmployeeAssessmentsAeEmployeeAssessmentAsync( + string $employerId, + string $employeeId, + string $contentType = self::contentTypes['getAeEmployeeAssessmentsAeEmployeeAssessment'][0] + ): PromiseInterface + { + return $this->getAeEmployeeAssessmentsAeEmployeeAssessmentAsyncWithHttpInfo($employerId, $employeeId, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAeEmployeeAssessmentsAeEmployeeAssessmentAsyncWithHttpInfo + * + * List employee auto enrolment assessment + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAeEmployeeAssessmentsAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getAeEmployeeAssessmentsAeEmployeeAssessmentAsyncWithHttpInfo( + string $employerId, + string $employeeId, + string $contentType = self::contentTypes['getAeEmployeeAssessmentsAeEmployeeAssessment'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\ContractAeEmployeeAssessmentHistoryResponse[]'; + $request = $this->getAeEmployeeAssessmentsAeEmployeeAssessmentRequest($employerId, $employeeId, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAeEmployeeAssessmentsAeEmployeeAssessment' + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAeEmployeeAssessmentsAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getAeEmployeeAssessmentsAeEmployeeAssessmentRequest( + string $employerId, + string $employeeId, + string $contentType = self::contentTypes['getAeEmployeeAssessmentsAeEmployeeAssessment'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling getAeEmployeeAssessmentsAeEmployeeAssessment' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling getAeEmployeeAssessmentsAeEmployeeAssessment' + ); + } + + + $resourcePath = '/employers/{employerId}/aeassessments/employees/{employeeId}/aeEmployeeAssessments'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAeLetterAeEmployeeAssessment + * + * Get AeLetter + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the Assessment (required) + * @param string|null $accept accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAeLetterAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\ReportResponse + */ + public function getAeLetterAeEmployeeAssessment( + string $employerId, + string $employeeId, + string $id, + ?string $accept = null, + string $contentType = self::contentTypes['getAeLetterAeEmployeeAssessment'][0] + ): \SynergiTech\Staffology\Model\ReportResponse + { + list($response) = $this->getAeLetterAeEmployeeAssessmentWithHttpInfo($employerId, $employeeId, $id, $accept, $contentType); + return $response; + } + + /** + * Operation getAeLetterAeEmployeeAssessmentWithHttpInfo + * + * Get AeLetter + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the Assessment (required) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAeLetterAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getAeLetterAeEmployeeAssessmentWithHttpInfo( + string $employerId, + string $employeeId, + string $id, + ?string $accept = null, + string $contentType = self::contentTypes['getAeLetterAeEmployeeAssessment'][0] + ): array + { + $request = $this->getAeLetterAeEmployeeAssessmentRequest($employerId, $employeeId, $id, $accept, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ReportResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getAeLetterAeEmployeeAssessmentAsync + * + * Get AeLetter + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the Assessment (required) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAeLetterAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getAeLetterAeEmployeeAssessmentAsync( + string $employerId, + string $employeeId, + string $id, + ?string $accept = null, + string $contentType = self::contentTypes['getAeLetterAeEmployeeAssessment'][0] + ): PromiseInterface + { + return $this->getAeLetterAeEmployeeAssessmentAsyncWithHttpInfo($employerId, $employeeId, $id, $accept, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAeLetterAeEmployeeAssessmentAsyncWithHttpInfo + * + * Get AeLetter + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the Assessment (required) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAeLetterAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getAeLetterAeEmployeeAssessmentAsyncWithHttpInfo( + string $employerId, + string $employeeId, + string $id, + ?string $accept = null, + string $contentType = self::contentTypes['getAeLetterAeEmployeeAssessment'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; + $request = $this->getAeLetterAeEmployeeAssessmentRequest($employerId, $employeeId, $id, $accept, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAeLetterAeEmployeeAssessment' + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the Assessment (required) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAeLetterAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getAeLetterAeEmployeeAssessmentRequest( + string $employerId, + string $employeeId, + string $id, + ?string $accept = null, + string $contentType = self::contentTypes['getAeLetterAeEmployeeAssessment'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling getAeLetterAeEmployeeAssessment' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling getAeLetterAeEmployeeAssessment' + ); + } + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling getAeLetterAeEmployeeAssessment' + ); + } + + + + $resourcePath = '/employers/{employerId}/aeassessments/employees/{employeeId}/{id}/letter'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($accept !== null) { + $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); + } + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/octet-stream', 'application/pdf', 'text/html', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getEmployeeLettersAeEmployeeAssessment + * + * Get letters for an employee based on tax year + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear for which you want to list the pension letters (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeLettersAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]|null + */ + public function getEmployeeLettersAeEmployeeAssessment( + string $employerId, + string $employeeId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $contentType = self::contentTypes['getEmployeeLettersAeEmployeeAssessment'][0] + ): ?array + { + list($response) = $this->getEmployeeLettersAeEmployeeAssessmentWithHttpInfo($employerId, $employeeId, $taxYear, $contentType); + return $response; + } + + /** + * Operation getEmployeeLettersAeEmployeeAssessmentWithHttpInfo + * + * Get letters for an employee based on tax year + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear for which you want to list the pension letters (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeLettersAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[], HTTP status code, HTTP response headers (array of strings) + */ + public function getEmployeeLettersAeEmployeeAssessmentWithHttpInfo( + string $employerId, + string $employeeId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $contentType = self::contentTypes['getEmployeeLettersAeEmployeeAssessment'][0] + ): array + { + $request = $this->getEmployeeLettersAeEmployeeAssessmentRequest($employerId, $employeeId, $taxYear, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getEmployeeLettersAeEmployeeAssessmentAsync + * + * Get letters for an employee based on tax year + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear for which you want to list the pension letters (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeLettersAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getEmployeeLettersAeEmployeeAssessmentAsync( + string $employerId, + string $employeeId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $contentType = self::contentTypes['getEmployeeLettersAeEmployeeAssessment'][0] + ): PromiseInterface + { + return $this->getEmployeeLettersAeEmployeeAssessmentAsyncWithHttpInfo($employerId, $employeeId, $taxYear, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getEmployeeLettersAeEmployeeAssessmentAsyncWithHttpInfo + * + * Get letters for an employee based on tax year + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear for which you want to list the pension letters (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeLettersAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getEmployeeLettersAeEmployeeAssessmentAsyncWithHttpInfo( + string $employerId, + string $employeeId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $contentType = self::contentTypes['getEmployeeLettersAeEmployeeAssessment'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]'; + $request = $this->getEmployeeLettersAeEmployeeAssessmentRequest($employerId, $employeeId, $taxYear, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getEmployeeLettersAeEmployeeAssessment' + * + * @param string $employerId The Id of the Employer (required) + * @param string $employeeId The Id of the Employee (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear for which you want to list the pension letters (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeLettersAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getEmployeeLettersAeEmployeeAssessmentRequest( + string $employerId, + string $employeeId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $contentType = self::contentTypes['getEmployeeLettersAeEmployeeAssessment'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling getEmployeeLettersAeEmployeeAssessment' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling getEmployeeLettersAeEmployeeAssessment' + ); + } + + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling getEmployeeLettersAeEmployeeAssessment' + ); + } + + + $resourcePath = '/employers/{employerId}/aeassessments/employees/{employeeId}/letters/{taxYear}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getPendingLettersAeEmployeeAssessment + * + * Get pending letters for an employer + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPendingLettersAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]|null + */ + public function getPendingLettersAeEmployeeAssessment( + string $employerId, + string $contentType = self::contentTypes['getPendingLettersAeEmployeeAssessment'][0] + ): ?array + { + list($response) = $this->getPendingLettersAeEmployeeAssessmentWithHttpInfo($employerId, $contentType); + return $response; + } + + /** + * Operation getPendingLettersAeEmployeeAssessmentWithHttpInfo + * + * Get pending letters for an employer + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPendingLettersAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[], HTTP status code, HTTP response headers (array of strings) + */ + public function getPendingLettersAeEmployeeAssessmentWithHttpInfo( + string $employerId, + string $contentType = self::contentTypes['getPendingLettersAeEmployeeAssessment'][0] + ): array + { + $request = $this->getPendingLettersAeEmployeeAssessmentRequest($employerId, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getPendingLettersAeEmployeeAssessmentAsync + * + * Get pending letters for an employer + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPendingLettersAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getPendingLettersAeEmployeeAssessmentAsync( + string $employerId, + string $contentType = self::contentTypes['getPendingLettersAeEmployeeAssessment'][0] + ): PromiseInterface + { + return $this->getPendingLettersAeEmployeeAssessmentAsyncWithHttpInfo($employerId, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getPendingLettersAeEmployeeAssessmentAsyncWithHttpInfo + * + * Get pending letters for an employer + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPendingLettersAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getPendingLettersAeEmployeeAssessmentAsyncWithHttpInfo( + string $employerId, + string $contentType = self::contentTypes['getPendingLettersAeEmployeeAssessment'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]'; + $request = $this->getPendingLettersAeEmployeeAssessmentRequest($employerId, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getPendingLettersAeEmployeeAssessment' + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPendingLettersAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getPendingLettersAeEmployeeAssessmentRequest( + string $employerId, + string $contentType = self::contentTypes['getPendingLettersAeEmployeeAssessment'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling getPendingLettersAeEmployeeAssessment' + ); + } + + + $resourcePath = '/employers/{employerId}/aeassessments/letters/pending'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getPendingLettersCountAeEmployeeAssessment + * + * Get count of pending pension letters for an employer + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPendingLettersCountAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]|null + */ + public function getPendingLettersCountAeEmployeeAssessment( + string $employerId, + string $contentType = self::contentTypes['getPendingLettersCountAeEmployeeAssessment'][0] + ): ?array + { + list($response) = $this->getPendingLettersCountAeEmployeeAssessmentWithHttpInfo($employerId, $contentType); + return $response; + } + + /** + * Operation getPendingLettersCountAeEmployeeAssessmentWithHttpInfo + * + * Get count of pending pension letters for an employer + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPendingLettersCountAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[], HTTP status code, HTTP response headers (array of strings) + */ + public function getPendingLettersCountAeEmployeeAssessmentWithHttpInfo( + string $employerId, + string $contentType = self::contentTypes['getPendingLettersCountAeEmployeeAssessment'][0] + ): array + { + $request = $this->getPendingLettersCountAeEmployeeAssessmentRequest($employerId, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getPendingLettersCountAeEmployeeAssessmentAsync + * + * Get count of pending pension letters for an employer + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPendingLettersCountAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getPendingLettersCountAeEmployeeAssessmentAsync( + string $employerId, + string $contentType = self::contentTypes['getPendingLettersCountAeEmployeeAssessment'][0] + ): PromiseInterface + { + return $this->getPendingLettersCountAeEmployeeAssessmentAsyncWithHttpInfo($employerId, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getPendingLettersCountAeEmployeeAssessmentAsyncWithHttpInfo + * + * Get count of pending pension letters for an employer + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPendingLettersCountAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getPendingLettersCountAeEmployeeAssessmentAsyncWithHttpInfo( + string $employerId, + string $contentType = self::contentTypes['getPendingLettersCountAeEmployeeAssessment'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\ContractAeEmployeeLetterResponse[]'; + $request = $this->getPendingLettersCountAeEmployeeAssessmentRequest($employerId, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getPendingLettersCountAeEmployeeAssessment' + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPendingLettersCountAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getPendingLettersCountAeEmployeeAssessmentRequest( + string $employerId, + string $contentType = self::contentTypes['getPendingLettersCountAeEmployeeAssessment'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling getPendingLettersCountAeEmployeeAssessment' + ); + } + + + $resourcePath = '/employers/{employerId}/aeassessments/letters/pending/count'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getReenrolmentDatesAeEmployeeAssessment + * + * Gets a list of re-enrolment dates for the employer + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getReenrolmentDatesAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \DateTime[] + */ + public function getReenrolmentDatesAeEmployeeAssessment( + string $employerId, + string $contentType = self::contentTypes['getReenrolmentDatesAeEmployeeAssessment'][0] + ): array + { + list($response) = $this->getReenrolmentDatesAeEmployeeAssessmentWithHttpInfo($employerId, $contentType); + return $response; + } + + /** + * Operation getReenrolmentDatesAeEmployeeAssessmentWithHttpInfo + * + * Gets a list of re-enrolment dates for the employer + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getReenrolmentDatesAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \DateTime[], HTTP status code, HTTP response headers (array of strings) + */ + public function getReenrolmentDatesAeEmployeeAssessmentWithHttpInfo( + string $employerId, + string $contentType = self::contentTypes['getReenrolmentDatesAeEmployeeAssessment'][0] + ): array + { + $request = $this->getReenrolmentDatesAeEmployeeAssessmentRequest($employerId, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\DateTime[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\DateTime[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\DateTime[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getReenrolmentDatesAeEmployeeAssessmentAsync + * + * Gets a list of re-enrolment dates for the employer + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getReenrolmentDatesAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getReenrolmentDatesAeEmployeeAssessmentAsync( + string $employerId, + string $contentType = self::contentTypes['getReenrolmentDatesAeEmployeeAssessment'][0] + ): PromiseInterface + { + return $this->getReenrolmentDatesAeEmployeeAssessmentAsyncWithHttpInfo($employerId, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getReenrolmentDatesAeEmployeeAssessmentAsyncWithHttpInfo + * + * Gets a list of re-enrolment dates for the employer + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getReenrolmentDatesAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getReenrolmentDatesAeEmployeeAssessmentAsyncWithHttpInfo( + string $employerId, + string $contentType = self::contentTypes['getReenrolmentDatesAeEmployeeAssessment'][0] + ): PromiseInterface + { + $returnType = '\DateTime[]'; + $request = $this->getReenrolmentDatesAeEmployeeAssessmentRequest($employerId, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getReenrolmentDatesAeEmployeeAssessment' + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getReenrolmentDatesAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getReenrolmentDatesAeEmployeeAssessmentRequest( + string $employerId, + string $contentType = self::contentTypes['getReenrolmentDatesAeEmployeeAssessment'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling getReenrolmentDatesAeEmployeeAssessment' + ); + } + + + $resourcePath = '/employers/{employerId}/aeassessments/reenrolmentdates'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation markAeLetterAsSentAeEmployeeAssessment + * + * Mark Letter as Sent + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the Assessment (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAeLetterAsSentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return void + */ + public function markAeLetterAsSentAeEmployeeAssessment( + string $employerId, + string $employeeId, + string $id, + string $contentType = self::contentTypes['markAeLetterAsSentAeEmployeeAssessment'][0] + ): void + { + $this->markAeLetterAsSentAeEmployeeAssessmentWithHttpInfo($employerId, $employeeId, $id, $contentType); + } + + /** + * Operation markAeLetterAsSentAeEmployeeAssessmentWithHttpInfo + * + * Mark Letter as Sent + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the Assessment (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAeLetterAsSentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function markAeLetterAsSentAeEmployeeAssessmentWithHttpInfo( + string $employerId, + string $employeeId, + string $id, + string $contentType = self::contentTypes['markAeLetterAsSentAeEmployeeAssessment'][0] + ): array + { + $request = $this->markAeLetterAsSentAeEmployeeAssessmentRequest($employerId, $employeeId, $id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + } + + throw $e; + } + } + + /** + * Operation markAeLetterAsSentAeEmployeeAssessmentAsync + * + * Mark Letter as Sent + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the Assessment (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAeLetterAsSentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function markAeLetterAsSentAeEmployeeAssessmentAsync( + string $employerId, + string $employeeId, + string $id, + string $contentType = self::contentTypes['markAeLetterAsSentAeEmployeeAssessment'][0] + ): PromiseInterface + { + return $this->markAeLetterAsSentAeEmployeeAssessmentAsyncWithHttpInfo($employerId, $employeeId, $id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation markAeLetterAsSentAeEmployeeAssessmentAsyncWithHttpInfo + * + * Mark Letter as Sent + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the Assessment (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAeLetterAsSentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function markAeLetterAsSentAeEmployeeAssessmentAsyncWithHttpInfo( + string $employerId, + string $employeeId, + string $id, + string $contentType = self::contentTypes['markAeLetterAsSentAeEmployeeAssessment'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->markAeLetterAsSentAeEmployeeAssessmentRequest($employerId, $employeeId, $id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'markAeLetterAsSentAeEmployeeAssessment' + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $employeeId The Id of the Employee the assessment is for (required) + * @param string $id The Id of the Assessment (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAeLetterAsSentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function markAeLetterAsSentAeEmployeeAssessmentRequest( + string $employerId, + string $employeeId, + string $id, + string $contentType = self::contentTypes['markAeLetterAsSentAeEmployeeAssessment'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling markAeLetterAsSentAeEmployeeAssessment' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling markAeLetterAsSentAeEmployeeAssessment' + ); + } + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling markAeLetterAsSentAeEmployeeAssessment' + ); + } + + + $resourcePath = '/employers/{employerId}/aeassessments/employees/{employeeId}/{id}/letter/sent'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation markAeLettersAsSentAeEmployeeAssessment + * + * Mark All Letters as Sent + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAeLettersAsSentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return void + */ + public function markAeLettersAsSentAeEmployeeAssessment( + string $employerId, + string $contentType = self::contentTypes['markAeLettersAsSentAeEmployeeAssessment'][0] + ): void + { + $this->markAeLettersAsSentAeEmployeeAssessmentWithHttpInfo($employerId, $contentType); + } + + /** + * Operation markAeLettersAsSentAeEmployeeAssessmentWithHttpInfo + * + * Mark All Letters as Sent + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAeLettersAsSentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function markAeLettersAsSentAeEmployeeAssessmentWithHttpInfo( + string $employerId, + string $contentType = self::contentTypes['markAeLettersAsSentAeEmployeeAssessment'][0] + ): array + { + $request = $this->markAeLettersAsSentAeEmployeeAssessmentRequest($employerId, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + } + + throw $e; + } + } + + /** + * Operation markAeLettersAsSentAeEmployeeAssessmentAsync + * + * Mark All Letters as Sent + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAeLettersAsSentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function markAeLettersAsSentAeEmployeeAssessmentAsync( + string $employerId, + string $contentType = self::contentTypes['markAeLettersAsSentAeEmployeeAssessment'][0] + ): PromiseInterface + { + return $this->markAeLettersAsSentAeEmployeeAssessmentAsyncWithHttpInfo($employerId, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation markAeLettersAsSentAeEmployeeAssessmentAsyncWithHttpInfo + * + * Mark All Letters as Sent + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAeLettersAsSentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function markAeLettersAsSentAeEmployeeAssessmentAsyncWithHttpInfo( + string $employerId, + string $contentType = self::contentTypes['markAeLettersAsSentAeEmployeeAssessment'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->markAeLettersAsSentAeEmployeeAssessmentRequest($employerId, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'markAeLettersAsSentAeEmployeeAssessment' + * + * @param string $employerId The Id of the Employer to which the Employee belongs (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAeLettersAsSentAeEmployeeAssessment'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function markAeLettersAsSentAeEmployeeAssessmentRequest( + string $employerId, + string $contentType = self::contentTypes['markAeLettersAsSentAeEmployeeAssessment'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling markAeLettersAsSentAeEmployeeAssessment' + ); + } + + + $resourcePath = '/employers/{employerId}/aeassessments/letters/sent'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption(): array + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/src/Api/AnalysisCategoryApi.php b/src/Api/AnalysisCategoryApi.php index 342e335..8bea697 100644 --- a/src/Api/AnalysisCategoryApi.php +++ b/src/Api/AnalysisCategoryApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,16 +76,16 @@ class AnalysisCategoryApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createAnalysisCategory' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createAnalysisCategoryCodeAnalysisCategory' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteAnalysisCategory' => [ 'application/json', @@ -103,16 +106,16 @@ class AnalysisCategoryApi 'application/json', ], 'updateAnalysisCategory' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateAnalysisCategoryCodeAnalysisCategory' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -173,13 +176,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse + * @return \SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse|null */ public function createAnalysisCategory( string $employerId, ?\SynergiTech\Staffology\Model\ContractAnalysisCategoryRequest $contractAnalysisCategoryRequest = null, string $contentType = self::contentTypes['createAnalysisCategory'][0] - ): \SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse + ): ?\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse { list($response) = $this->createAnalysisCategoryWithHttpInfo($employerId, $contractAnalysisCategoryRequest, $contentType); return $response; @@ -196,7 +199,7 @@ public function createAnalysisCategory( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse, HTTP status code, HTTP response headers (array of strings) */ public function createAnalysisCategoryWithHttpInfo( string $employerId, @@ -228,36 +231,15 @@ public function createAnalysisCategoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -272,34 +254,11 @@ public function createAnalysisCategoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -309,8 +268,9 @@ public function createAnalysisCategoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -444,7 +404,7 @@ public function createAnalysisCategoryRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -519,14 +479,14 @@ public function createAnalysisCategoryRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse + * @return \SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse|null */ public function createAnalysisCategoryCodeAnalysisCategory( string $employerId, string $analysisCategoryId, ?\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeRequest $contractAnalysisCategoryCodeRequest = null, string $contentType = self::contentTypes['createAnalysisCategoryCodeAnalysisCategory'][0] - ): \SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse + ): ?\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse { list($response) = $this->createAnalysisCategoryCodeAnalysisCategoryWithHttpInfo($employerId, $analysisCategoryId, $contractAnalysisCategoryCodeRequest, $contentType); return $response; @@ -544,7 +504,7 @@ public function createAnalysisCategoryCodeAnalysisCategory( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse, HTTP status code, HTTP response headers (array of strings) */ public function createAnalysisCategoryCodeAnalysisCategoryWithHttpInfo( string $employerId, @@ -577,36 +537,15 @@ public function createAnalysisCategoryCodeAnalysisCategoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -621,34 +560,11 @@ public function createAnalysisCategoryCodeAnalysisCategoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -658,8 +574,9 @@ public function createAnalysisCategoryCodeAnalysisCategoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -814,7 +731,7 @@ public function createAnalysisCategoryCodeAnalysisCategoryRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -944,10 +861,10 @@ public function deleteAnalysisCategoryWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1209,10 +1126,10 @@ public function deleteAnalysisCategoryCodeAnalysisCategoryWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1435,13 +1352,13 @@ public function deleteAnalysisCategoryCodeAnalysisCategoryRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse + * @return \SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse|null */ public function getAnalysisCategory( string $employerId, string $id, string $contentType = self::contentTypes['getAnalysisCategory'][0] - ): \SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse + ): ?\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse { list($response) = $this->getAnalysisCategoryWithHttpInfo($employerId, $id, $contentType); return $response; @@ -1490,36 +1407,15 @@ public function getAnalysisCategoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1534,34 +1430,11 @@ public function getAnalysisCategoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1571,8 +1444,9 @@ public function getAnalysisCategoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1720,7 +1594,7 @@ public function getAnalysisCategoryRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1788,14 +1662,14 @@ public function getAnalysisCategoryRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse + * @return \SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse|null */ public function getAnalysisCategoryCodeAnalysisCategory( string $employerId, string $analysisCategoryId, string $code, string $contentType = self::contentTypes['getAnalysisCategoryCodeAnalysisCategory'][0] - ): \SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse + ): ?\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse { list($response) = $this->getAnalysisCategoryCodeAnalysisCategoryWithHttpInfo($employerId, $analysisCategoryId, $code, $contentType); return $response; @@ -1846,36 +1720,15 @@ public function getAnalysisCategoryCodeAnalysisCategoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1890,34 +1743,11 @@ public function getAnalysisCategoryCodeAnalysisCategoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1927,8 +1757,9 @@ public function getAnalysisCategoryCodeAnalysisCategoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2097,7 +1928,7 @@ public function getAnalysisCategoryCodeAnalysisCategoryRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2219,36 +2050,15 @@ public function getCodesAnalysisCategoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2263,34 +2073,11 @@ public function getCodesAnalysisCategoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2300,8 +2087,9 @@ public function getCodesAnalysisCategoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2449,7 +2237,7 @@ public function getCodesAnalysisCategoryRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2515,12 +2303,12 @@ public function getCodesAnalysisCategoryRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Item[]|null */ public function indexAnalysisCategory( string $employerId, string $contentType = self::contentTypes['indexAnalysisCategory'][0] - ): array + ): ?array { list($response) = $this->indexAnalysisCategoryWithHttpInfo($employerId, $contentType); return $response; @@ -2567,36 +2355,15 @@ public function indexAnalysisCategoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2611,34 +2378,11 @@ public function indexAnalysisCategoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2648,8 +2392,9 @@ public function indexAnalysisCategoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2776,7 +2521,7 @@ public function indexAnalysisCategoryRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2902,36 +2647,15 @@ public function updateAnalysisCategoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2946,34 +2670,11 @@ public function updateAnalysisCategoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAnalysisCategoryResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2983,8 +2684,9 @@ public function updateAnalysisCategoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3139,7 +2841,7 @@ public function updateAnalysisCategoryRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -3276,36 +2978,15 @@ public function updateAnalysisCategoryCodeAnalysisCategoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3320,34 +3001,11 @@ public function updateAnalysisCategoryCodeAnalysisCategoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAnalysisCategoryCodeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3357,8 +3015,9 @@ public function updateAnalysisCategoryCodeAnalysisCategoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3534,7 +3193,7 @@ public function updateAnalysisCategoryCodeAnalysisCategoryRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -3615,4 +3274,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/AttachmentOrderApi.php b/src/Api/AttachmentOrderApi.php index 3ef5150..def9117 100644 --- a/src/Api/AttachmentOrderApi.php +++ b/src/Api/AttachmentOrderApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -76,10 +79,10 @@ class AttachmentOrderApi 'multipart/form-data', ], 'createAttachmentOrder' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteAttachmentOrder' => [ 'application/json', @@ -100,10 +103,10 @@ class AttachmentOrderApi 'application/json', ], 'updateAttachmentOrder' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -228,10 +231,10 @@ public function addDocumentAttachmentOrderWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -393,19 +396,14 @@ public function addDocumentAttachmentOrderRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( [], @@ -535,10 +533,10 @@ public function createAttachmentOrderWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -814,10 +812,10 @@ public function deleteAttachmentOrderWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1104,10 +1102,10 @@ public function deleteDocumentAttachmentOrderWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1352,14 +1350,14 @@ public function deleteDocumentAttachmentOrderRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\AttachmentOrder + * @return \SynergiTech\Staffology\Model\AttachmentOrder|null */ public function getAttachmentOrder( string $employerId, string $employeeId, string $id, string $contentType = self::contentTypes['getAttachmentOrder'][0] - ): \SynergiTech\Staffology\Model\AttachmentOrder + ): ?\SynergiTech\Staffology\Model\AttachmentOrder { list($response) = $this->getAttachmentOrderWithHttpInfo($employerId, $employeeId, $id, $contentType); return $response; @@ -1410,36 +1408,15 @@ public function getAttachmentOrderWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\AttachmentOrder', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AttachmentOrder' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AttachmentOrder', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AttachmentOrder', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1454,34 +1431,11 @@ public function getAttachmentOrderWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AttachmentOrder'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AttachmentOrder', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1491,8 +1445,9 @@ public function getAttachmentOrderWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1730,7 +1685,7 @@ public function getAttachmentOrderRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SplFileObject + * @return \SplFileObject|null */ public function getDocumentAttachmentOrder( string $employerId, @@ -1738,7 +1693,7 @@ public function getDocumentAttachmentOrder( string $id, string $documentId, string $contentType = self::contentTypes['getDocumentAttachmentOrder'][0] - ): \SplFileObject + ): ?\SplFileObject { list($response) = $this->getDocumentAttachmentOrderWithHttpInfo($employerId, $employeeId, $id, $documentId, $contentType); return $response; @@ -1791,36 +1746,15 @@ public function getDocumentAttachmentOrderWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SplFileObject', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SplFileObject' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1835,34 +1769,11 @@ public function getDocumentAttachmentOrderWithHttpInfo( ); } - $returnType = '\SplFileObject'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1872,8 +1783,9 @@ public function getDocumentAttachmentOrderWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2185,36 +2097,15 @@ public function indexAttachmentOrderWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2229,34 +2120,11 @@ public function indexAttachmentOrderWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2266,8 +2134,9 @@ public function indexAttachmentOrderWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2541,36 +2410,15 @@ public function paymentsAttachmentOrderWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\AttachmentOrderPayment[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AttachmentOrderPayment[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AttachmentOrderPayment[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AttachmentOrderPayment[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2585,34 +2433,11 @@ public function paymentsAttachmentOrderWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AttachmentOrderPayment[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AttachmentOrderPayment[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2622,8 +2447,9 @@ public function paymentsAttachmentOrderWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2861,7 +2687,7 @@ public function paymentsAttachmentOrderRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\AttachmentOrder + * @return \SynergiTech\Staffology\Model\AttachmentOrder|null */ public function updateAttachmentOrder( string $employerId, @@ -2869,7 +2695,7 @@ public function updateAttachmentOrder( string $id, ?\SynergiTech\Staffology\Model\AttachmentOrder $attachmentOrder = null, string $contentType = self::contentTypes['updateAttachmentOrder'][0] - ): \SynergiTech\Staffology\Model\AttachmentOrder + ): ?\SynergiTech\Staffology\Model\AttachmentOrder { list($response) = $this->updateAttachmentOrderWithHttpInfo($employerId, $employeeId, $id, $attachmentOrder, $contentType); return $response; @@ -2888,7 +2714,7 @@ public function updateAttachmentOrder( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\AttachmentOrder, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\AttachmentOrder, HTTP status code, HTTP response headers (array of strings) */ public function updateAttachmentOrderWithHttpInfo( string $employerId, @@ -2922,36 +2748,15 @@ public function updateAttachmentOrderWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\AttachmentOrder', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AttachmentOrder' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AttachmentOrder', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AttachmentOrder', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2966,34 +2771,11 @@ public function updateAttachmentOrderWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AttachmentOrder'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AttachmentOrder', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3003,8 +2785,9 @@ public function updateAttachmentOrderWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3261,4 +3044,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/AuditApi.php b/src/Api/AuditApi.php index 10fef53..cae9b41 100644 --- a/src/Api/AuditApi.php +++ b/src/Api/AuditApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -209,36 +212,15 @@ public function employerAuditListAuditWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -253,34 +235,11 @@ public function employerAuditListAuditWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -290,8 +249,9 @@ public function employerAuditListAuditWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -588,4 +548,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/AutoEnrolmentApi.php b/src/Api/AutoEnrolmentApi.php index 70465d4..5d250a4 100644 --- a/src/Api/AutoEnrolmentApi.php +++ b/src/Api/AutoEnrolmentApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -176,13 +179,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\AeAssessment + * @return \SynergiTech\Staffology\Model\AeAssessment|null */ public function assessAutoEnrolment( string $employerId, string $employeeId, string $contentType = self::contentTypes['assessAutoEnrolment'][0] - ): \SynergiTech\Staffology\Model\AeAssessment + ): ?\SynergiTech\Staffology\Model\AeAssessment { list($response) = $this->assessAutoEnrolmentWithHttpInfo($employerId, $employeeId, $contentType); return $response; @@ -231,36 +234,15 @@ public function assessAutoEnrolmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\AeAssessment', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AeAssessment' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AeAssessment', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AeAssessment', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -275,34 +257,11 @@ public function assessAutoEnrolmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AeAssessment'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AeAssessment', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -312,8 +271,9 @@ public function assessAutoEnrolmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -461,7 +421,7 @@ public function assessAutoEnrolmentRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -588,10 +548,10 @@ public function deleteAutoEnrolmentWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -866,10 +826,10 @@ public function emailAllLettersAutoEnrolmentWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1109,36 +1069,15 @@ public function emailLetterAutoEnrolmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerEmail', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerEmail' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEmail', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1153,34 +1092,11 @@ public function emailLetterAutoEnrolmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerEmail'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1190,8 +1106,9 @@ public function emailLetterAutoEnrolmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1360,7 +1277,7 @@ public function emailLetterAutoEnrolmentRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1486,36 +1403,15 @@ public function getAutoEnrolmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\AeAssessment', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AeAssessment' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AeAssessment', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AeAssessment', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1530,34 +1426,11 @@ public function getAutoEnrolmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AeAssessment'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AeAssessment', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1567,8 +1440,9 @@ public function getAutoEnrolmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1737,7 +1611,7 @@ public function getAutoEnrolmentRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1859,36 +1733,15 @@ public function getLastAutoEnrolmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\AeAssessment', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AeAssessment' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AeAssessment', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AeAssessment', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1903,34 +1756,11 @@ public function getLastAutoEnrolmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AeAssessment'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AeAssessment', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1940,8 +1770,9 @@ public function getLastAutoEnrolmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2089,7 +1920,7 @@ public function getLastAutoEnrolmentRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2219,36 +2050,15 @@ public function getLetterAutoEnrolmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2263,34 +2073,11 @@ public function getLetterAutoEnrolmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2300,8 +2087,9 @@ public function getLetterAutoEnrolmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2481,7 +2269,7 @@ public function getLetterAutoEnrolmentRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/pdf', 'text/html', 'application/octet-stream', ], + ['application/json', 'application/octet-stream', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -2603,36 +2391,15 @@ public function listAutoEnrolmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2647,34 +2414,11 @@ public function listAutoEnrolmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2684,8 +2428,9 @@ public function listAutoEnrolmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2833,7 +2578,7 @@ public function listAutoEnrolmentRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2960,10 +2705,10 @@ public function markLetterAsSentAutoEnrolmentWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -3238,10 +2983,10 @@ public function markLettersAsSentAutoEnrolmentWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -3473,36 +3218,15 @@ public function pendingLettersAutoEnrolmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3517,34 +3241,11 @@ public function pendingLettersAutoEnrolmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3554,8 +3255,9 @@ public function pendingLettersAutoEnrolmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3682,7 +3384,7 @@ public function pendingLettersAutoEnrolmentRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -3800,36 +3502,15 @@ public function pendingLettersCountAutoEnrolmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractPendingLettersCountResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPendingLettersCountResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPendingLettersCountResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPendingLettersCountResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3844,34 +3525,11 @@ public function pendingLettersCountAutoEnrolmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPendingLettersCountResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPendingLettersCountResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3881,8 +3539,9 @@ public function pendingLettersCountAutoEnrolmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4009,7 +3668,7 @@ public function pendingLettersCountAutoEnrolmentRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -4127,36 +3786,15 @@ public function pendingPostponementLettersAutoEnrolmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4171,34 +3809,11 @@ public function pendingPostponementLettersAutoEnrolmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4208,8 +3823,9 @@ public function pendingPostponementLettersAutoEnrolmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4336,7 +3952,7 @@ public function pendingPostponementLettersAutoEnrolmentRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -4403,13 +4019,13 @@ public function pendingPostponementLettersAutoEnrolmentRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Item[]|null */ public function reenrolAutoEnrolment( string $employerId, ?\DateTime $cyclicalReenrolmentDate = null, string $contentType = self::contentTypes['reenrolAutoEnrolment'][0] - ): array + ): ?array { list($response) = $this->reenrolAutoEnrolmentWithHttpInfo($employerId, $cyclicalReenrolmentDate, $contentType); return $response; @@ -4458,36 +4074,15 @@ public function reenrolAutoEnrolmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4502,34 +4097,11 @@ public function reenrolAutoEnrolmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4539,8 +4111,9 @@ public function reenrolAutoEnrolmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4683,7 +4256,7 @@ public function reenrolAutoEnrolmentRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -4757,7 +4330,7 @@ public function reenrolAutoEnrolmentRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\AeAssessment + * @return \SynergiTech\Staffology\Model\AeAssessment|null */ public function setStateAutoEnrolment( string $employerId, @@ -4770,7 +4343,7 @@ public function setStateAutoEnrolment( ?bool $startActionAlreadyReported = false, ?bool $endActionAlreadyReported = false, string $contentType = self::contentTypes['setStateAutoEnrolment'][0] - ): \SynergiTech\Staffology\Model\AeAssessment + ): ?\SynergiTech\Staffology\Model\AeAssessment { list($response) = $this->setStateAutoEnrolmentWithHttpInfo($employerId, $employeeId, $state, $status, $stateDate, $pensionId, $workerGroupId, $startActionAlreadyReported, $endActionAlreadyReported, $contentType); return $response; @@ -4833,36 +4406,15 @@ public function setStateAutoEnrolmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\AeAssessment', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AeAssessment' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AeAssessment', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AeAssessment', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4877,34 +4429,11 @@ public function setStateAutoEnrolmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AeAssessment'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AeAssessment', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -4914,8 +4443,9 @@ public function setStateAutoEnrolmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5175,7 +4705,7 @@ public function setStateAutoEnrolmentRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -5249,4 +4779,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/AverageHolidayPayHistoryApi.php b/src/Api/AverageHolidayPayHistoryApi.php index 9277b34..2b586a7 100644 --- a/src/Api/AverageHolidayPayHistoryApi.php +++ b/src/Api/AverageHolidayPayHistoryApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class AverageHolidayPayHistoryApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createAverageHolidayPayHistory' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteAverageHolidayPayHistory' => [ 'application/json', @@ -94,10 +97,10 @@ class AverageHolidayPayHistoryApi 'multipart/form-data', ], 'updateAverageHolidayPayHistory' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -214,10 +217,10 @@ public function createAverageHolidayPayHistoryWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -468,10 +471,10 @@ public function deleteAverageHolidayPayHistoryWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -729,10 +732,10 @@ public function deleteByEmployeeIdAverageHolidayPayHistoryWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -935,14 +938,14 @@ public function deleteByEmployeeIdAverageHolidayPayHistoryRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractPayHistoryResponse[] + * @return \SynergiTech\Staffology\Model\ContractPayHistoryResponse[]|null */ public function getByEmployeeAverageHolidayPayHistory( string $employerId, string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $contentType = self::contentTypes['getByEmployeeAverageHolidayPayHistory'][0] - ): array + ): ?array { list($response) = $this->getByEmployeeAverageHolidayPayHistoryWithHttpInfo($employerId, $employeeId, $taxYear, $contentType); return $response; @@ -993,36 +996,15 @@ public function getByEmployeeAverageHolidayPayHistoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractPayHistoryResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPayHistoryResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPayHistoryResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayHistoryResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1037,34 +1019,11 @@ public function getByEmployeeAverageHolidayPayHistoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPayHistoryResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayHistoryResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1074,8 +1033,9 @@ public function getByEmployeeAverageHolidayPayHistoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1362,36 +1322,15 @@ public function getByEmployerAverageHolidayPayHistoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractPayHistoryResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPayHistoryResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPayHistoryResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayHistoryResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1406,34 +1345,11 @@ public function getByEmployerAverageHolidayPayHistoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPayHistoryResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayHistoryResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1443,8 +1359,9 @@ public function getByEmployerAverageHolidayPayHistoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1697,36 +1614,15 @@ public function importCsvAverageHolidayPayHistoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1741,34 +1637,11 @@ public function importCsvAverageHolidayPayHistoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1778,8 +1651,9 @@ public function importCsvAverageHolidayPayHistoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1928,19 +1802,14 @@ public function importCsvAverageHolidayPayHistoryRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -2066,10 +1935,10 @@ public function updateAverageHolidayPayHistoryWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -2271,4 +2140,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/BenefitsApi.php b/src/Api/BenefitsApi.php index ab389cd..0e948b4 100644 --- a/src/Api/BenefitsApi.php +++ b/src/Api/BenefitsApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class BenefitsApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createBenefits' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteBenefits' => [ 'application/json', @@ -88,10 +91,10 @@ class BenefitsApi 'application/json', ], 'updateBenefits' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -212,10 +215,10 @@ public function createBenefitsWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -491,10 +494,10 @@ public function deleteBenefitsWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -718,14 +721,14 @@ public function deleteBenefitsRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Benefit + * @return \SynergiTech\Staffology\Model\Benefit|null */ public function getBenefits( string $employerId, string $employeeId, string $id, string $contentType = self::contentTypes['getBenefits'][0] - ): \SynergiTech\Staffology\Model\Benefit + ): ?\SynergiTech\Staffology\Model\Benefit { list($response) = $this->getBenefitsWithHttpInfo($employerId, $employeeId, $id, $contentType); return $response; @@ -776,36 +779,15 @@ public function getBenefitsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Benefit', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Benefit' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Benefit', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Benefit', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -820,34 +802,11 @@ public function getBenefitsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Benefit'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Benefit', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -857,8 +816,9 @@ public function getBenefitsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1149,36 +1109,15 @@ public function indexBenefitsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1193,34 +1132,11 @@ public function indexBenefitsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1230,8 +1146,9 @@ public function indexBenefitsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1448,7 +1365,7 @@ public function indexBenefitsRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Benefit + * @return \SynergiTech\Staffology\Model\Benefit|null */ public function updateBenefits( string $employerId, @@ -1456,7 +1373,7 @@ public function updateBenefits( string $id, ?\SynergiTech\Staffology\Model\Benefit $benefit = null, string $contentType = self::contentTypes['updateBenefits'][0] - ): \SynergiTech\Staffology\Model\Benefit + ): ?\SynergiTech\Staffology\Model\Benefit { list($response) = $this->updateBenefitsWithHttpInfo($employerId, $employeeId, $id, $benefit, $contentType); return $response; @@ -1509,36 +1426,15 @@ public function updateBenefitsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Benefit', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Benefit' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Benefit', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Benefit', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1553,34 +1449,11 @@ public function updateBenefitsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Benefit'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Benefit', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1590,8 +1463,9 @@ public function updateBenefitsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1848,4 +1722,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/BillingApi.php b/src/Api/BillingApi.php index 79b1c90..b7af2d0 100644 --- a/src/Api/BillingApi.php +++ b/src/Api/BillingApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -206,36 +209,15 @@ public function billBillingWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\UsageBill', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\UsageBill' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\UsageBill', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\UsageBill', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -250,34 +232,11 @@ public function billBillingWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\UsageBill'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\UsageBill', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -287,8 +246,9 @@ public function billBillingWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -533,36 +493,15 @@ public function billCsvBillingWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -577,34 +516,11 @@ public function billCsvBillingWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -614,8 +530,9 @@ public function billCsvBillingWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -856,36 +773,15 @@ public function billsBillingWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -900,34 +796,11 @@ public function billsBillingWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -937,8 +810,9 @@ public function billsBillingWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1163,10 +1037,10 @@ public function confirmDirectDebitMandateBillingWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1390,10 +1264,10 @@ public function deleteDirectDebitMandateBillingWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1600,36 +1474,15 @@ public function directDebitMandateBillingWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\DirectDebitMandate', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\DirectDebitMandate' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\DirectDebitMandate', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DirectDebitMandate', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1644,34 +1497,11 @@ public function directDebitMandateBillingWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\DirectDebitMandate'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DirectDebitMandate', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1681,8 +1511,9 @@ public function directDebitMandateBillingWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1914,36 +1745,15 @@ public function getUsageStatsBillingWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1958,34 +1768,11 @@ public function getUsageStatsBillingWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1995,8 +1782,9 @@ public function getUsageStatsBillingWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2263,36 +2051,15 @@ public function setupDirectDebitMandateBillingWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('string' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'string', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2307,34 +2074,11 @@ public function setupDirectDebitMandateBillingWithHttpInfo( ); } - $returnType = 'string'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2344,8 +2088,9 @@ public function setupDirectDebitMandateBillingWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2541,4 +2286,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/BureauApi.php b/src/Api/BureauApi.php index 8854c3e..da43caf 100644 --- a/src/Api/BureauApi.php +++ b/src/Api/BureauApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -88,10 +91,10 @@ class BureauApi 'application/json', ], 'updateSettingsBureau' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -203,36 +206,15 @@ public function employersBureauWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -247,34 +229,11 @@ public function employersBureauWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -284,8 +243,9 @@ public function employersBureauWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -473,12 +433,12 @@ public function employersBureauRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\User + * @return \SynergiTech\Staffology\Model\User|null */ public function getProcessorUserBureau( string $employerId, string $contentType = self::contentTypes['getProcessorUserBureau'][0] - ): \SynergiTech\Staffology\Model\User + ): ?\SynergiTech\Staffology\Model\User { list($response) = $this->getProcessorUserBureauWithHttpInfo($employerId, $contentType); return $response; @@ -494,7 +454,7 @@ public function getProcessorUserBureau( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\User, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\User, HTTP status code, HTTP response headers (array of strings) */ public function getProcessorUserBureauWithHttpInfo( string $employerId, @@ -525,36 +485,15 @@ public function getProcessorUserBureauWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\User', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\User' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\User', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -569,34 +508,11 @@ public function getProcessorUserBureauWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\User'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -606,8 +522,9 @@ public function getProcessorUserBureauWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -852,36 +769,15 @@ public function getReportPackBureauWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportPack', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportPack' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportPack', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportPack', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -896,34 +792,11 @@ public function getReportPackBureauWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportPack'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportPack', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -933,8 +806,9 @@ public function getReportPackBureauWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1179,36 +1053,15 @@ public function getSettingsBureauWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\BureauSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\BureauSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\BureauSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\BureauSettings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1223,34 +1076,11 @@ public function getSettingsBureauWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\BureauSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\BureauSettings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1260,8 +1090,9 @@ public function getSettingsBureauWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1502,36 +1333,15 @@ public function processorUsersBureauWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1546,34 +1356,11 @@ public function processorUsersBureauWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1583,8 +1370,9 @@ public function processorUsersBureauWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1812,36 +1600,15 @@ public function updateSettingsBureauWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\BureauSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\BureauSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\BureauSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\BureauSettings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1856,34 +1623,11 @@ public function updateSettingsBureauWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\BureauSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\BureauSettings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1893,8 +1637,9 @@ public function updateSettingsBureauWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2109,4 +1854,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/Cis300Api.php b/src/Api/Cis300Api.php index cb46e56..5f808ec 100644 --- a/src/Api/Cis300Api.php +++ b/src/Api/Cis300Api.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class Cis300Api /** @var string[] $contentTypes **/ public const contentTypes = [ 'createCis300' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteCis300' => [ 'application/json', @@ -100,10 +103,10 @@ class Cis300Api 'application/json', ], 'updateCis300' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -223,36 +226,15 @@ public function createCis300WithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\Cis300', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Cis300' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Cis300', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Cis300', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -267,34 +249,11 @@ public function createCis300WithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Cis300'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Cis300', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -304,8 +263,9 @@ public function createCis300WithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -594,10 +554,10 @@ public function deleteCis300WithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -879,36 +839,15 @@ public function getCis300WithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Cis300', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Cis300' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Cis300', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Cis300', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -923,34 +862,11 @@ public function getCis300WithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Cis300'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Cis300', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -960,8 +876,9 @@ public function getCis300WithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1256,36 +1173,15 @@ public function getXmlRequestCis300WithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('string' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'string', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1300,34 +1196,11 @@ public function getXmlRequestCis300WithHttpInfo( ); } - $returnType = 'string'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1337,8 +1210,9 @@ public function getXmlRequestCis300WithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1629,36 +1503,15 @@ public function listCis300WithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1673,34 +1526,11 @@ public function listCis300WithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1710,8 +1540,9 @@ public function listCis300WithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1985,36 +1816,15 @@ public function markAsAcceptedCis300WithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Cis300', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Cis300' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Cis300', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Cis300', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2029,34 +1839,11 @@ public function markAsAcceptedCis300WithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Cis300'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Cis300', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2066,8 +1853,9 @@ public function markAsAcceptedCis300WithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2354,36 +2142,15 @@ public function requiringAttentionCis300WithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2398,34 +2165,11 @@ public function requiringAttentionCis300WithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2435,8 +2179,9 @@ public function requiringAttentionCis300WithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2693,36 +2438,15 @@ public function submitCis300WithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Cis300', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Cis300' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Cis300', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Cis300', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2737,34 +2461,11 @@ public function submitCis300WithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Cis300'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Cis300', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2774,8 +2475,9 @@ public function submitCis300WithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3090,36 +2792,15 @@ public function updateCis300WithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Cis300', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Cis300' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Cis300', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Cis300', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3134,34 +2815,11 @@ public function updateCis300WithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Cis300'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Cis300', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3171,8 +2829,9 @@ public function updateCis300WithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3429,4 +3088,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/CisVerificationApi.php b/src/Api/CisVerificationApi.php index b0677cb..ac4b311 100644 --- a/src/Api/CisVerificationApi.php +++ b/src/Api/CisVerificationApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class CisVerificationApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createCisVerification' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteCisVerification' => [ 'application/json', @@ -100,10 +103,10 @@ class CisVerificationApi 'application/json', ], 'updateCisVerification' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -223,36 +226,15 @@ public function createCisVerificationWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\CisVerification', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CisVerification' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CisVerification', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisVerification', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -267,34 +249,11 @@ public function createCisVerificationWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CisVerification'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisVerification', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -304,8 +263,9 @@ public function createCisVerificationWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -594,10 +554,10 @@ public function deleteCisVerificationWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -879,36 +839,15 @@ public function getCisVerificationWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\CisVerification', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CisVerification' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CisVerification', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisVerification', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -923,34 +862,11 @@ public function getCisVerificationWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CisVerification'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisVerification', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -960,8 +876,9 @@ public function getCisVerificationWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1256,36 +1173,15 @@ public function getXmlRequestCisVerificationWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('string' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'string', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1300,34 +1196,11 @@ public function getXmlRequestCisVerificationWithHttpInfo( ); } - $returnType = 'string'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1337,8 +1210,9 @@ public function getXmlRequestCisVerificationWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1629,36 +1503,15 @@ public function listCisVerificationWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1673,34 +1526,11 @@ public function listCisVerificationWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1710,8 +1540,9 @@ public function listCisVerificationWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1985,36 +1816,15 @@ public function markAsAcceptedCisVerificationWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\CisVerification', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CisVerification' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CisVerification', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisVerification', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2029,34 +1839,11 @@ public function markAsAcceptedCisVerificationWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CisVerification'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisVerification', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2066,8 +1853,9 @@ public function markAsAcceptedCisVerificationWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2354,36 +2142,15 @@ public function requiringAttentionCisVerificationWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2398,34 +2165,11 @@ public function requiringAttentionCisVerificationWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2435,8 +2179,9 @@ public function requiringAttentionCisVerificationWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2693,36 +2438,15 @@ public function submitCisVerificationWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\CisVerification', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CisVerification' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CisVerification', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisVerification', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2737,34 +2461,11 @@ public function submitCisVerificationWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CisVerification'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisVerification', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2774,8 +2475,9 @@ public function submitCisVerificationWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3090,36 +2792,15 @@ public function updateCisVerificationWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\CisVerification', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CisVerification' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CisVerification', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisVerification', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3134,34 +2815,11 @@ public function updateCisVerificationWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CisVerification'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisVerification', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3171,8 +2829,9 @@ public function updateCisVerificationWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3429,4 +3088,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/CostCentreApi.php b/src/Api/CostCentreApi.php index 768a8ef..45d724d 100644 --- a/src/Api/CostCentreApi.php +++ b/src/Api/CostCentreApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class CostCentreApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createCostCentre' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteCostCentre' => [ 'application/json', @@ -94,16 +97,16 @@ class CostCentreApi 'application/json', ], 'updateCostCentre' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateCostCentreCostCentre' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -164,13 +167,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\CostCentre + * @return \SynergiTech\Staffology\Model\CostCentre|null */ public function createCostCentre( string $employerId, ?\SynergiTech\Staffology\Model\CostCentre $costCentre = null, string $contentType = self::contentTypes['createCostCentre'][0] - ): \SynergiTech\Staffology\Model\CostCentre + ): ?\SynergiTech\Staffology\Model\CostCentre { list($response) = $this->createCostCentreWithHttpInfo($employerId, $costCentre, $contentType); return $response; @@ -187,7 +190,7 @@ public function createCostCentre( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\CostCentre, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\CostCentre, HTTP status code, HTTP response headers (array of strings) */ public function createCostCentreWithHttpInfo( string $employerId, @@ -219,36 +222,15 @@ public function createCostCentreWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\CostCentre', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CostCentre' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CostCentre', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostCentre', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -263,34 +245,11 @@ public function createCostCentreWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CostCentre'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostCentre', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -300,8 +259,9 @@ public function createCostCentreWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -565,10 +525,10 @@ public function deleteCostCentreWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -826,10 +786,10 @@ public function deleteCostCentreCostCentreWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1081,36 +1041,15 @@ public function getCostCentreWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\CostCentre', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CostCentre' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CostCentre', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostCentre', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1125,34 +1064,11 @@ public function getCostCentreWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CostCentre'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostCentre', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1162,8 +1078,9 @@ public function getCostCentreWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1433,36 +1350,15 @@ public function getCostCentreCostCentreWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\CostCentre', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CostCentre' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CostCentre', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostCentre', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1477,34 +1373,11 @@ public function getCostCentreCostCentreWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CostCentre'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostCentre', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1514,8 +1387,9 @@ public function getCostCentreCostCentreWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1776,36 +1650,15 @@ public function indexCostCentreWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1820,34 +1673,11 @@ public function indexCostCentreWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1857,8 +1687,9 @@ public function indexCostCentreWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2111,36 +1942,15 @@ public function updateCostCentreWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\CostCentre', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CostCentre' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CostCentre', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostCentre', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2155,34 +1965,11 @@ public function updateCostCentreWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CostCentre'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostCentre', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2192,8 +1979,9 @@ public function updateCostCentreWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2481,36 +2269,15 @@ public function updateCostCentreCostCentreWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\CostCentre', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CostCentre' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CostCentre', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostCentre', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2525,34 +2292,11 @@ public function updateCostCentreCostCentreWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CostCentre'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostCentre', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2562,8 +2306,9 @@ public function updateCostCentreCostCentreWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2794,4 +2539,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/DepartmentApi.php b/src/Api/DepartmentApi.php index a588628..a2b7802 100644 --- a/src/Api/DepartmentApi.php +++ b/src/Api/DepartmentApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class DepartmentApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createDepartment' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteDepartment' => [ 'application/json', @@ -94,16 +97,16 @@ class DepartmentApi 'application/json', ], 'updateDepartment' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateDepartmentDepartment' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -164,13 +167,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Department + * @return \SynergiTech\Staffology\Model\Department|null */ public function createDepartment( string $employerId, ?\SynergiTech\Staffology\Model\Department $department = null, string $contentType = self::contentTypes['createDepartment'][0] - ): \SynergiTech\Staffology\Model\Department + ): ?\SynergiTech\Staffology\Model\Department { list($response) = $this->createDepartmentWithHttpInfo($employerId, $department, $contentType); return $response; @@ -187,7 +190,7 @@ public function createDepartment( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\Department, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Department, HTTP status code, HTTP response headers (array of strings) */ public function createDepartmentWithHttpInfo( string $employerId, @@ -219,36 +222,15 @@ public function createDepartmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\Department', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Department' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Department', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Department', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -263,34 +245,11 @@ public function createDepartmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Department'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Department', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -300,8 +259,9 @@ public function createDepartmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -565,10 +525,10 @@ public function deleteDepartmentWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -826,10 +786,10 @@ public function deleteDepartmentDepartmentWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1081,36 +1041,15 @@ public function getDepartmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Department', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Department' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Department', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Department', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1125,34 +1064,11 @@ public function getDepartmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Department'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Department', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1162,8 +1078,9 @@ public function getDepartmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1378,13 +1295,13 @@ public function getDepartmentRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Department + * @return \SynergiTech\Staffology\Model\Department|null */ public function getDepartmentDepartment( string $employerId, ?string $code = null, string $contentType = self::contentTypes['getDepartmentDepartment'][0] - ): \SynergiTech\Staffology\Model\Department + ): ?\SynergiTech\Staffology\Model\Department { list($response) = $this->getDepartmentDepartmentWithHttpInfo($employerId, $code, $contentType); return $response; @@ -1433,36 +1350,15 @@ public function getDepartmentDepartmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Department', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Department' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Department', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Department', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1477,34 +1373,11 @@ public function getDepartmentDepartmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Department'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Department', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1514,8 +1387,9 @@ public function getDepartmentDepartmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1776,36 +1650,15 @@ public function indexDepartmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1820,34 +1673,11 @@ public function indexDepartmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1857,8 +1687,9 @@ public function indexDepartmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2053,14 +1884,14 @@ public function indexDepartmentRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Department + * @return \SynergiTech\Staffology\Model\Department|null */ public function updateDepartment( string $employerId, string $code, ?\SynergiTech\Staffology\Model\Department $department = null, string $contentType = self::contentTypes['updateDepartment'][0] - ): \SynergiTech\Staffology\Model\Department + ): ?\SynergiTech\Staffology\Model\Department { list($response) = $this->updateDepartmentWithHttpInfo($employerId, $code, $department, $contentType); return $response; @@ -2111,36 +1942,15 @@ public function updateDepartmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Department', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Department' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Department', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Department', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2155,34 +1965,11 @@ public function updateDepartmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Department'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Department', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2192,8 +1979,9 @@ public function updateDepartmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2423,14 +2211,14 @@ public function updateDepartmentRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Department + * @return \SynergiTech\Staffology\Model\Department|null */ public function updateDepartmentDepartment( string $employerId, ?string $code = null, ?\SynergiTech\Staffology\Model\Department $department = null, string $contentType = self::contentTypes['updateDepartmentDepartment'][0] - ): \SynergiTech\Staffology\Model\Department + ): ?\SynergiTech\Staffology\Model\Department { list($response) = $this->updateDepartmentDepartmentWithHttpInfo($employerId, $code, $department, $contentType); return $response; @@ -2481,36 +2269,15 @@ public function updateDepartmentDepartmentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Department', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Department' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Department', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Department', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2525,34 +2292,11 @@ public function updateDepartmentDepartmentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Department'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Department', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2562,8 +2306,9 @@ public function updateDepartmentDepartmentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2794,4 +2539,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/DpsApi.php b/src/Api/DpsApi.php index ad9cfd9..f2587dd 100644 --- a/src/Api/DpsApi.php +++ b/src/Api/DpsApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -90,23 +93,26 @@ class DpsApi 'getDpsSettingsDps' => [ 'application/json', ], + 'listEmployeeNoticesDps' => [ + 'application/json', + ], 'listNoticesDps' => [ 'application/json', ], 'parseXmlDps' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'reapplyNoticesDps' => [ 'application/json', ], 'updateDpsSettingsDps' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -167,13 +173,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\DpsNotice + * @return \SynergiTech\Staffology\Model\DpsNotice|null */ public function applyDps( string $employerId, string $id, string $contentType = self::contentTypes['applyDps'][0] - ): \SynergiTech\Staffology\Model\DpsNotice + ): ?\SynergiTech\Staffology\Model\DpsNotice { list($response) = $this->applyDpsWithHttpInfo($employerId, $id, $contentType); return $response; @@ -222,36 +228,15 @@ public function applyDpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\DpsNotice', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\DpsNotice' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\DpsNotice', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DpsNotice', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -266,34 +251,11 @@ public function applyDpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\DpsNotice'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DpsNotice', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -303,8 +265,9 @@ public function applyDpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -570,36 +533,15 @@ public function checkForNoticesDpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('int', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('int' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'int', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'int', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -614,34 +556,11 @@ public function checkForNoticesDpsWithHttpInfo( ); } - $returnType = 'int'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'int', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -651,8 +570,9 @@ public function checkForNoticesDpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -898,10 +818,10 @@ public function deleteAllDpsWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1138,10 +1058,10 @@ public function deleteDpsWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1398,36 +1318,15 @@ public function getDpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\DpsNotice', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\DpsNotice' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\DpsNotice', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DpsNotice', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1442,34 +1341,11 @@ public function getDpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\DpsNotice'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DpsNotice', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1479,8 +1355,9 @@ public function getDpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1746,36 +1623,15 @@ public function getDpsSettingsDpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\DpsSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\DpsSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\DpsSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DpsSettings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1790,34 +1646,11 @@ public function getDpsSettingsDpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\DpsSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DpsSettings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1827,8 +1660,9 @@ public function getDpsSettingsDpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2011,6 +1845,355 @@ public function getDpsSettingsDpsRequest( ); } + /** + * Operation listEmployeeNoticesDps + * + * List Employee Notices + * + * @param string $employerId employerId (required) + * @param string $employeeId employeeId (required) + * @param int|null $pageNum pageNum (optional) + * @param int|null $pageSize pageSize (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listEmployeeNoticesDps'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\Item[] + */ + public function listEmployeeNoticesDps( + string $employerId, + string $employeeId, + ?int $pageNum = null, + ?int $pageSize = null, + string $contentType = self::contentTypes['listEmployeeNoticesDps'][0] + ): array + { + list($response) = $this->listEmployeeNoticesDpsWithHttpInfo($employerId, $employeeId, $pageNum, $pageSize, $contentType); + return $response; + } + + /** + * Operation listEmployeeNoticesDpsWithHttpInfo + * + * List Employee Notices + * + * @param string $employerId (required) + * @param string $employeeId (required) + * @param int|null $pageNum (optional) + * @param int|null $pageSize (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listEmployeeNoticesDps'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + */ + public function listEmployeeNoticesDpsWithHttpInfo( + string $employerId, + string $employeeId, + ?int $pageNum = null, + ?int $pageSize = null, + string $contentType = self::contentTypes['listEmployeeNoticesDps'][0] + ): array + { + $request = $this->listEmployeeNoticesDpsRequest($employerId, $employeeId, $pageNum, $pageSize, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\Item[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation listEmployeeNoticesDpsAsync + * + * List Employee Notices + * + * @param string $employerId (required) + * @param string $employeeId (required) + * @param int|null $pageNum (optional) + * @param int|null $pageSize (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listEmployeeNoticesDps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listEmployeeNoticesDpsAsync( + string $employerId, + string $employeeId, + ?int $pageNum = null, + ?int $pageSize = null, + string $contentType = self::contentTypes['listEmployeeNoticesDps'][0] + ): PromiseInterface + { + return $this->listEmployeeNoticesDpsAsyncWithHttpInfo($employerId, $employeeId, $pageNum, $pageSize, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listEmployeeNoticesDpsAsyncWithHttpInfo + * + * List Employee Notices + * + * @param string $employerId (required) + * @param string $employeeId (required) + * @param int|null $pageNum (optional) + * @param int|null $pageSize (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listEmployeeNoticesDps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listEmployeeNoticesDpsAsyncWithHttpInfo( + string $employerId, + string $employeeId, + ?int $pageNum = null, + ?int $pageSize = null, + string $contentType = self::contentTypes['listEmployeeNoticesDps'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\Item[]'; + $request = $this->listEmployeeNoticesDpsRequest($employerId, $employeeId, $pageNum, $pageSize, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listEmployeeNoticesDps' + * + * @param string $employerId (required) + * @param string $employeeId (required) + * @param int|null $pageNum (optional) + * @param int|null $pageSize (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listEmployeeNoticesDps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listEmployeeNoticesDpsRequest( + string $employerId, + string $employeeId, + ?int $pageNum = null, + ?int $pageSize = null, + string $contentType = self::contentTypes['listEmployeeNoticesDps'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling listEmployeeNoticesDps' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling listEmployeeNoticesDps' + ); + } + + + + + $resourcePath = '/employers/{employerId}/dps/employeeNotices/{employeeId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $pageNum, + 'pageNum', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $pageSize, + 'pageSize', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation listNoticesDps * @@ -2081,36 +2264,15 @@ public function listNoticesDpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2125,34 +2287,11 @@ public function listNoticesDpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2162,8 +2301,9 @@ public function listNoticesDpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2444,36 +2584,15 @@ public function parseXmlDpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('int', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('int' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'int', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'int', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2488,34 +2607,11 @@ public function parseXmlDpsWithHttpInfo( ); } - $returnType = 'int'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'int', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2525,8 +2621,9 @@ public function parseXmlDpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2789,36 +2886,15 @@ public function reapplyNoticesDpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractReapplyDpsNoticeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractReapplyDpsNoticeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractReapplyDpsNoticeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractReapplyDpsNoticeResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2833,34 +2909,11 @@ public function reapplyNoticesDpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractReapplyDpsNoticeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractReapplyDpsNoticeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2870,8 +2923,9 @@ public function reapplyNoticesDpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3142,36 +3196,15 @@ public function updateDpsSettingsDpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\DpsSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\DpsSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\DpsSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DpsSettings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3186,34 +3219,11 @@ public function updateDpsSettingsDpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\DpsSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DpsSettings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3223,8 +3233,9 @@ public function updateDpsSettingsDpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3439,4 +3450,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/EmailApi.php b/src/Api/EmailApi.php index 102bbec..a766314 100644 --- a/src/Api/EmailApi.php +++ b/src/Api/EmailApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -72,6 +75,9 @@ class EmailApi /** @var string[] $contentTypes **/ public const contentTypes = [ + 'authorizeEmail' => [ + 'application/json', + ], 'getEmailEmail' => [ 'application/json', ], @@ -84,14 +90,17 @@ class EmailApi 'resendEmailEmail' => [ 'application/json', ], + 'saveOAuthTokenEmail' => [ + 'application/json', + ], 'testMailSettingsEmail' => [ 'application/json', ], 'updateMailSettingsEmail' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'verifyMailSettingsEmail' => [ 'application/json', @@ -148,48 +157,44 @@ public function getConfig(): Configuration } /** - * Operation getEmailEmail + * Operation authorizeEmail * - * Get Email + * Microsoft login for authorization * * @param string $employerId employerId (required) - * @param string $emailId emailId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailEmail'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['authorizeEmail'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployerEmail + * @return string */ - public function getEmailEmail( + public function authorizeEmail( string $employerId, - string $emailId, - string $contentType = self::contentTypes['getEmailEmail'][0] - ): \SynergiTech\Staffology\Model\EmployerEmail + string $contentType = self::contentTypes['authorizeEmail'][0] + ): string { - list($response) = $this->getEmailEmailWithHttpInfo($employerId, $emailId, $contentType); + list($response) = $this->authorizeEmailWithHttpInfo($employerId, $contentType); return $response; } /** - * Operation getEmailEmailWithHttpInfo + * Operation authorizeEmailWithHttpInfo * - * Get Email + * Microsoft login for authorization * * @param string $employerId (required) - * @param string $emailId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailEmail'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['authorizeEmail'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\EmployerEmail, HTTP status code, HTTP response headers (array of strings) + * @return array of string, HTTP status code, HTTP response headers (array of strings) */ - public function getEmailEmailWithHttpInfo( + public function authorizeEmailWithHttpInfo( string $employerId, - string $emailId, - string $contentType = self::contentTypes['getEmailEmail'][0] + string $contentType = self::contentTypes['authorizeEmail'][0] ): array { - $request = $this->getEmailEmailRequest($employerId, $emailId, $contentType); + $request = $this->authorizeEmailRequest($employerId, $contentType); try { $options = $this->createHttpClientOption(); @@ -213,36 +218,15 @@ public function getEmailEmailWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerEmail', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerEmail' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -257,68 +241,44 @@ public function getEmailEmailWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerEmail'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\EmployerEmail', + 'string', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getEmailEmailAsync + * Operation authorizeEmailAsync * - * Get Email + * Microsoft login for authorization * * @param string $employerId (required) - * @param string $emailId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailEmail'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['authorizeEmail'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getEmailEmailAsync( + public function authorizeEmailAsync( string $employerId, - string $emailId, - string $contentType = self::contentTypes['getEmailEmail'][0] + string $contentType = self::contentTypes['authorizeEmail'][0] ): PromiseInterface { - return $this->getEmailEmailAsyncWithHttpInfo($employerId, $emailId, $contentType) + return $this->authorizeEmailAsyncWithHttpInfo($employerId, $contentType) ->then( function ($response) { return $response[0]; @@ -327,25 +287,23 @@ function ($response) { } /** - * Operation getEmailEmailAsyncWithHttpInfo + * Operation authorizeEmailAsyncWithHttpInfo * - * Get Email + * Microsoft login for authorization * * @param string $employerId (required) - * @param string $emailId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailEmail'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['authorizeEmail'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getEmailEmailAsyncWithHttpInfo( + public function authorizeEmailAsyncWithHttpInfo( string $employerId, - string $emailId, - string $contentType = self::contentTypes['getEmailEmail'][0] + string $contentType = self::contentTypes['authorizeEmail'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\EmployerEmail'; - $request = $this->getEmailEmailRequest($employerId, $emailId, $contentType); + $returnType = 'string'; + $request = $this->authorizeEmailRequest($employerId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -384,38 +342,29 @@ function ($exception) { } /** - * Create request for operation 'getEmailEmail' + * Create request for operation 'authorizeEmail' * * @param string $employerId (required) - * @param string $emailId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailEmail'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['authorizeEmail'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmailEmailRequest( + public function authorizeEmailRequest( string $employerId, - string $emailId, - string $contentType = self::contentTypes['getEmailEmail'][0] + string $contentType = self::contentTypes['authorizeEmail'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling getEmailEmail' - ); - } - - // verify the required parameter 'emailId' is set - if ($emailId === null || (is_array($emailId) && count($emailId) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $emailId when calling getEmailEmail' + 'Missing the required parameter $employerId when calling authorizeEmail' ); } - $resourcePath = '/employers/{employerId}/email/{emailId}'; + $resourcePath = '/employers/{employerId}/email/authorize'; $formParams = []; $queryParams = []; $headerParams = []; @@ -432,14 +381,6 @@ public function getEmailEmailRequest( $resourcePath ); } - // path params - if ($emailId !== null) { - $resourcePath = str_replace( - '{' . 'emailId' . '}', - ObjectSerializer::toPathValue($emailId), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -500,44 +441,48 @@ public function getEmailEmailRequest( } /** - * Operation getMailSettingsEmail + * Operation getEmailEmail * - * Get MailSettings + * Get Email * - * @param string $employerId The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMailSettingsEmail'] to see the possible values for this operation + * @param string $employerId employerId (required) + * @param string $emailId emailId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailEmail'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\MailSettings + * @return \SynergiTech\Staffology\Model\EmployerEmail */ - public function getMailSettingsEmail( + public function getEmailEmail( string $employerId, - string $contentType = self::contentTypes['getMailSettingsEmail'][0] - ): \SynergiTech\Staffology\Model\MailSettings + string $emailId, + string $contentType = self::contentTypes['getEmailEmail'][0] + ): \SynergiTech\Staffology\Model\EmployerEmail { - list($response) = $this->getMailSettingsEmailWithHttpInfo($employerId, $contentType); + list($response) = $this->getEmailEmailWithHttpInfo($employerId, $emailId, $contentType); return $response; } /** - * Operation getMailSettingsEmailWithHttpInfo + * Operation getEmailEmailWithHttpInfo * - * Get MailSettings + * Get Email * - * @param string $employerId The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMailSettingsEmail'] to see the possible values for this operation + * @param string $employerId (required) + * @param string $emailId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailEmail'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\MailSettings, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\EmployerEmail, HTTP status code, HTTP response headers (array of strings) */ - public function getMailSettingsEmailWithHttpInfo( + public function getEmailEmailWithHttpInfo( string $employerId, - string $contentType = self::contentTypes['getMailSettingsEmail'][0] + string $emailId, + string $contentType = self::contentTypes['getEmailEmail'][0] ): array { - $request = $this->getMailSettingsEmailRequest($employerId, $contentType); + $request = $this->getEmailEmailRequest($employerId, $emailId, $contentType); try { $options = $this->createHttpClientOption(); @@ -561,36 +506,15 @@ public function getMailSettingsEmailWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\MailSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\MailSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\MailSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEmail', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -605,66 +529,46 @@ public function getMailSettingsEmailWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\MailSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\MailSettings', + '\SynergiTech\Staffology\Model\EmployerEmail', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getMailSettingsEmailAsync + * Operation getEmailEmailAsync * - * Get MailSettings + * Get Email * - * @param string $employerId The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMailSettingsEmail'] to see the possible values for this operation + * @param string $employerId (required) + * @param string $emailId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailEmail'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getMailSettingsEmailAsync( + public function getEmailEmailAsync( string $employerId, - string $contentType = self::contentTypes['getMailSettingsEmail'][0] + string $emailId, + string $contentType = self::contentTypes['getEmailEmail'][0] ): PromiseInterface { - return $this->getMailSettingsEmailAsyncWithHttpInfo($employerId, $contentType) + return $this->getEmailEmailAsyncWithHttpInfo($employerId, $emailId, $contentType) ->then( function ($response) { return $response[0]; @@ -673,23 +577,25 @@ function ($response) { } /** - * Operation getMailSettingsEmailAsyncWithHttpInfo + * Operation getEmailEmailAsyncWithHttpInfo * - * Get MailSettings + * Get Email * - * @param string $employerId The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMailSettingsEmail'] to see the possible values for this operation + * @param string $employerId (required) + * @param string $emailId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailEmail'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getMailSettingsEmailAsyncWithHttpInfo( + public function getEmailEmailAsyncWithHttpInfo( string $employerId, - string $contentType = self::contentTypes['getMailSettingsEmail'][0] + string $emailId, + string $contentType = self::contentTypes['getEmailEmail'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\MailSettings'; - $request = $this->getMailSettingsEmailRequest($employerId, $contentType); + $returnType = '\SynergiTech\Staffology\Model\EmployerEmail'; + $request = $this->getEmailEmailRequest($employerId, $emailId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -728,29 +634,38 @@ function ($exception) { } /** - * Create request for operation 'getMailSettingsEmail' + * Create request for operation 'getEmailEmail' * - * @param string $employerId The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMailSettingsEmail'] to see the possible values for this operation + * @param string $employerId (required) + * @param string $emailId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailEmail'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getMailSettingsEmailRequest( + public function getEmailEmailRequest( string $employerId, - string $contentType = self::contentTypes['getMailSettingsEmail'][0] + string $emailId, + string $contentType = self::contentTypes['getEmailEmail'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling getMailSettingsEmail' + 'Missing the required parameter $employerId when calling getEmailEmail' + ); + } + + // verify the required parameter 'emailId' is set + if ($emailId === null || (is_array($emailId) && count($emailId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $emailId when calling getEmailEmail' ); } - $resourcePath = '/employers/{employerId}/email/settings'; + $resourcePath = '/employers/{employerId}/email/{emailId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -767,6 +682,14 @@ public function getMailSettingsEmailRequest( $resourcePath ); } + // path params + if ($emailId !== null) { + $resourcePath = str_replace( + '{' . 'emailId' . '}', + ObjectSerializer::toPathValue($emailId), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -827,52 +750,44 @@ public function getMailSettingsEmailRequest( } /** - * Operation indexEmail + * Operation getMailSettingsEmail * - * List Emails + * Get MailSettings * - * @param string $employerId employerId (required) - * @param int|null $pageNum pageNum (optional) - * @param int|null $pageSize pageSize (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmail'] to see the possible values for this operation + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMailSettingsEmail'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\MailSettings */ - public function indexEmail( + public function getMailSettingsEmail( string $employerId, - ?int $pageNum = null, - ?int $pageSize = null, - string $contentType = self::contentTypes['indexEmail'][0] - ): array + string $contentType = self::contentTypes['getMailSettingsEmail'][0] + ): \SynergiTech\Staffology\Model\MailSettings { - list($response) = $this->indexEmailWithHttpInfo($employerId, $pageNum, $pageSize, $contentType); + list($response) = $this->getMailSettingsEmailWithHttpInfo($employerId, $contentType); return $response; } /** - * Operation indexEmailWithHttpInfo + * Operation getMailSettingsEmailWithHttpInfo * - * List Emails + * Get MailSettings * - * @param string $employerId (required) - * @param int|null $pageNum (optional) - * @param int|null $pageSize (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmail'] to see the possible values for this operation + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMailSettingsEmail'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\MailSettings, HTTP status code, HTTP response headers (array of strings) */ - public function indexEmailWithHttpInfo( + public function getMailSettingsEmailWithHttpInfo( string $employerId, - ?int $pageNum = null, - ?int $pageSize = null, - string $contentType = self::contentTypes['indexEmail'][0] + string $contentType = self::contentTypes['getMailSettingsEmail'][0] ): array { - $request = $this->indexEmailRequest($employerId, $pageNum, $pageSize, $contentType); + $request = $this->getMailSettingsEmailRequest($employerId, $contentType); try { $options = $this->createHttpClientOption(); @@ -896,36 +811,627 @@ public function indexEmailWithHttpInfo( $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\MailSettings', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\MailSettings', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\MailSettings', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getMailSettingsEmailAsync + * + * Get MailSettings + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMailSettingsEmail'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getMailSettingsEmailAsync( + string $employerId, + string $contentType = self::contentTypes['getMailSettingsEmail'][0] + ): PromiseInterface + { + return $this->getMailSettingsEmailAsyncWithHttpInfo($employerId, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getMailSettingsEmailAsyncWithHttpInfo + * + * Get MailSettings + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMailSettingsEmail'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getMailSettingsEmailAsyncWithHttpInfo( + string $employerId, + string $contentType = self::contentTypes['getMailSettingsEmail'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\MailSettings'; + $request = $this->getMailSettingsEmailRequest($employerId, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getMailSettingsEmail' + * + * @param string $employerId The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMailSettingsEmail'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getMailSettingsEmailRequest( + string $employerId, + string $contentType = self::contentTypes['getMailSettingsEmail'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling getMailSettingsEmail' + ); + } + + + $resourcePath = '/employers/{employerId}/email/settings'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation indexEmail + * + * List Emails + * + * @param string $employerId employerId (required) + * @param int|null $pageNum pageNum (optional) + * @param int|null $pageSize pageSize (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmail'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\Item[] + */ + public function indexEmail( + string $employerId, + ?int $pageNum = null, + ?int $pageSize = null, + string $contentType = self::contentTypes['indexEmail'][0] + ): array + { + list($response) = $this->indexEmailWithHttpInfo($employerId, $pageNum, $pageSize, $contentType); + return $response; + } + + /** + * Operation indexEmailWithHttpInfo + * + * List Emails + * + * @param string $employerId (required) + * @param int|null $pageNum (optional) + * @param int|null $pageSize (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmail'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + */ + public function indexEmailWithHttpInfo( + string $employerId, + ?int $pageNum = null, + ?int $pageSize = null, + string $contentType = self::contentTypes['indexEmail'][0] + ): array + { + $request = $this->indexEmailRequest($employerId, $pageNum, $pageSize, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\Item[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation indexEmailAsync + * + * List Emails + * + * @param string $employerId (required) + * @param int|null $pageNum (optional) + * @param int|null $pageSize (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmail'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function indexEmailAsync( + string $employerId, + ?int $pageNum = null, + ?int $pageSize = null, + string $contentType = self::contentTypes['indexEmail'][0] + ): PromiseInterface + { + return $this->indexEmailAsyncWithHttpInfo($employerId, $pageNum, $pageSize, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation indexEmailAsyncWithHttpInfo + * + * List Emails + * + * @param string $employerId (required) + * @param int|null $pageNum (optional) + * @param int|null $pageSize (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmail'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function indexEmailAsyncWithHttpInfo( + string $employerId, + ?int $pageNum = null, + ?int $pageSize = null, + string $contentType = self::contentTypes['indexEmail'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\Item[]'; + $request = $this->indexEmailRequest($employerId, $pageNum, $pageSize, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } - switch($statusCode) { - case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } + /** + * Create request for operation 'indexEmail' + * + * @param string $employerId (required) + * @param int|null $pageNum (optional) + * @param int|null $pageSize (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmail'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function indexEmailRequest( + string $employerId, + ?int $pageNum = null, + ?int $pageSize = null, + string $contentType = self::contentTypes['indexEmail'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling indexEmail' + ); + } + + + + + $resourcePath = '/employers/{employerId}/email'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $pageNum, + 'pageNum', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $pageSize, + 'pageSize', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation resendEmailEmail + * + * Re-send Email + * + * @param string $employerId employerId (required) + * @param string $emailId emailId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resendEmailEmail'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\EmployerEmail + */ + public function resendEmailEmail( + string $employerId, + string $emailId, + string $contentType = self::contentTypes['resendEmailEmail'][0] + ): \SynergiTech\Staffology\Model\EmployerEmail + { + list($response) = $this->resendEmailEmailWithHttpInfo($employerId, $emailId, $contentType); + return $response; + } + + /** + * Operation resendEmailEmailWithHttpInfo + * + * Re-send Email + * + * @param string $employerId (required) + * @param string $emailId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resendEmailEmail'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\EmployerEmail, HTTP status code, HTTP response headers (array of strings) + */ + public function resendEmailEmailWithHttpInfo( + string $employerId, + string $emailId, + string $contentType = self::contentTypes['resendEmailEmail'][0] + ): array + { + $request = $this->resendEmailEmailRequest($employerId, $emailId, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEmail', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -940,70 +1446,46 @@ public function indexEmailWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\Item[]', + '\SynergiTech\Staffology\Model\EmployerEmail', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation indexEmailAsync + * Operation resendEmailEmailAsync * - * List Emails + * Re-send Email * * @param string $employerId (required) - * @param int|null $pageNum (optional) - * @param int|null $pageSize (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmail'] to see the possible values for this operation + * @param string $emailId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resendEmailEmail'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function indexEmailAsync( + public function resendEmailEmailAsync( string $employerId, - ?int $pageNum = null, - ?int $pageSize = null, - string $contentType = self::contentTypes['indexEmail'][0] + string $emailId, + string $contentType = self::contentTypes['resendEmailEmail'][0] ): PromiseInterface { - return $this->indexEmailAsyncWithHttpInfo($employerId, $pageNum, $pageSize, $contentType) + return $this->resendEmailEmailAsyncWithHttpInfo($employerId, $emailId, $contentType) ->then( function ($response) { return $response[0]; @@ -1012,27 +1494,25 @@ function ($response) { } /** - * Operation indexEmailAsyncWithHttpInfo + * Operation resendEmailEmailAsyncWithHttpInfo * - * List Emails + * Re-send Email * * @param string $employerId (required) - * @param int|null $pageNum (optional) - * @param int|null $pageSize (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmail'] to see the possible values for this operation + * @param string $emailId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resendEmailEmail'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function indexEmailAsyncWithHttpInfo( + public function resendEmailEmailAsyncWithHttpInfo( string $employerId, - ?int $pageNum = null, - ?int $pageSize = null, - string $contentType = self::contentTypes['indexEmail'][0] + string $emailId, + string $contentType = self::contentTypes['resendEmailEmail'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->indexEmailRequest($employerId, $pageNum, $pageSize, $contentType); + $returnType = '\SynergiTech\Staffology\Model\EmployerEmail'; + $request = $this->resendEmailEmailRequest($employerId, $emailId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1071,59 +1551,44 @@ function ($exception) { } /** - * Create request for operation 'indexEmail' + * Create request for operation 'resendEmailEmail' * * @param string $employerId (required) - * @param int|null $pageNum (optional) - * @param int|null $pageSize (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmail'] to see the possible values for this operation + * @param string $emailId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resendEmailEmail'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function indexEmailRequest( + public function resendEmailEmailRequest( string $employerId, - ?int $pageNum = null, - ?int $pageSize = null, - string $contentType = self::contentTypes['indexEmail'][0] + string $emailId, + string $contentType = self::contentTypes['resendEmailEmail'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling indexEmail' + 'Missing the required parameter $employerId when calling resendEmailEmail' ); } + // verify the required parameter 'emailId' is set + if ($emailId === null || (is_array($emailId) && count($emailId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $emailId when calling resendEmailEmail' + ); + } - - $resourcePath = '/employers/{employerId}/email'; + $resourcePath = '/employers/{employerId}/email/{emailId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $pageNum, - 'pageNum', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $pageSize, - 'pageSize', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -1134,6 +1599,14 @@ public function indexEmailRequest( $resourcePath ); } + // path params + if ($emailId !== null) { + $resourcePath = str_replace( + '{' . 'emailId' . '}', + ObjectSerializer::toPathValue($emailId), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -1186,7 +1659,7 @@ public function indexEmailRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -1194,48 +1667,47 @@ public function indexEmailRequest( } /** - * Operation resendEmailEmail + * Operation saveOAuthTokenEmail * - * Re-send Email + * Update token details by Authorization code * * @param string $employerId employerId (required) - * @param string $emailId emailId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resendEmailEmail'] to see the possible values for this operation + * @param string|null $code The authorization code returned by Microsoft after user consent. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['saveOAuthTokenEmail'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployerEmail + * @return void */ - public function resendEmailEmail( + public function saveOAuthTokenEmail( string $employerId, - string $emailId, - string $contentType = self::contentTypes['resendEmailEmail'][0] - ): \SynergiTech\Staffology\Model\EmployerEmail + ?string $code = null, + string $contentType = self::contentTypes['saveOAuthTokenEmail'][0] + ): void { - list($response) = $this->resendEmailEmailWithHttpInfo($employerId, $emailId, $contentType); - return $response; + $this->saveOAuthTokenEmailWithHttpInfo($employerId, $code, $contentType); } /** - * Operation resendEmailEmailWithHttpInfo + * Operation saveOAuthTokenEmailWithHttpInfo * - * Re-send Email + * Update token details by Authorization code * * @param string $employerId (required) - * @param string $emailId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resendEmailEmail'] to see the possible values for this operation + * @param string|null $code The authorization code returned by Microsoft after user consent. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['saveOAuthTokenEmail'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\EmployerEmail, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function resendEmailEmailWithHttpInfo( + public function saveOAuthTokenEmailWithHttpInfo( string $employerId, - string $emailId, - string $contentType = self::contentTypes['resendEmailEmail'][0] + ?string $code = null, + string $contentType = self::contentTypes['saveOAuthTokenEmail'][0] ): array { - $request = $this->resendEmailEmailRequest($employerId, $emailId, $contentType); + $request = $this->saveOAuthTokenEmailRequest($employerId, $code, $contentType); try { $options = $this->createHttpClientOption(); @@ -1260,111 +1732,34 @@ public function resendEmailEmailWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerEmail', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerEmail' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - $returnType = '\SynergiTech\Staffology\Model\EmployerEmail'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SynergiTech\Staffology\Model\EmployerEmail', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } + throw $e; } } /** - * Operation resendEmailEmailAsync + * Operation saveOAuthTokenEmailAsync * - * Re-send Email + * Update token details by Authorization code * * @param string $employerId (required) - * @param string $emailId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resendEmailEmail'] to see the possible values for this operation + * @param string|null $code The authorization code returned by Microsoft after user consent. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['saveOAuthTokenEmail'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function resendEmailEmailAsync( + public function saveOAuthTokenEmailAsync( string $employerId, - string $emailId, - string $contentType = self::contentTypes['resendEmailEmail'][0] + ?string $code = null, + string $contentType = self::contentTypes['saveOAuthTokenEmail'][0] ): PromiseInterface { - return $this->resendEmailEmailAsyncWithHttpInfo($employerId, $emailId, $contentType) + return $this->saveOAuthTokenEmailAsyncWithHttpInfo($employerId, $code, $contentType) ->then( function ($response) { return $response[0]; @@ -1373,44 +1768,31 @@ function ($response) { } /** - * Operation resendEmailEmailAsyncWithHttpInfo + * Operation saveOAuthTokenEmailAsyncWithHttpInfo * - * Re-send Email + * Update token details by Authorization code * * @param string $employerId (required) - * @param string $emailId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resendEmailEmail'] to see the possible values for this operation + * @param string|null $code The authorization code returned by Microsoft after user consent. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['saveOAuthTokenEmail'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function resendEmailEmailAsyncWithHttpInfo( + public function saveOAuthTokenEmailAsyncWithHttpInfo( string $employerId, - string $emailId, - string $contentType = self::contentTypes['resendEmailEmail'][0] + ?string $code = null, + string $contentType = self::contentTypes['saveOAuthTokenEmail'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\EmployerEmail'; - $request = $this->resendEmailEmailRequest($employerId, $emailId, $contentType); + $returnType = ''; + $request = $this->saveOAuthTokenEmailRequest($employerId, $code, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -1430,44 +1812,47 @@ function ($exception) { } /** - * Create request for operation 'resendEmailEmail' + * Create request for operation 'saveOAuthTokenEmail' * * @param string $employerId (required) - * @param string $emailId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['resendEmailEmail'] to see the possible values for this operation + * @param string|null $code The authorization code returned by Microsoft after user consent. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['saveOAuthTokenEmail'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function resendEmailEmailRequest( + public function saveOAuthTokenEmailRequest( string $employerId, - string $emailId, - string $contentType = self::contentTypes['resendEmailEmail'][0] + ?string $code = null, + string $contentType = self::contentTypes['saveOAuthTokenEmail'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling resendEmailEmail' + 'Missing the required parameter $employerId when calling saveOAuthTokenEmail' ); } - // verify the required parameter 'emailId' is set - if ($emailId === null || (is_array($emailId) && count($emailId) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $emailId when calling resendEmailEmail' - ); - } - $resourcePath = '/employers/{employerId}/email/{emailId}'; + $resourcePath = '/employers/{employerId}/email/token'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $code, + 'code', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -1478,18 +1863,10 @@ public function resendEmailEmailRequest( $resourcePath ); } - // path params - if ($emailId !== null) { - $resourcePath = str_replace( - '{' . 'emailId' . '}', - ObjectSerializer::toPathValue($emailId), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); @@ -1611,36 +1988,15 @@ public function testMailSettingsEmailWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\EmployerEmail', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerEmail' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEmail', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1655,34 +2011,11 @@ public function testMailSettingsEmailWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerEmail'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -1692,8 +2025,9 @@ public function testMailSettingsEmailWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1958,36 +2292,15 @@ public function updateMailSettingsEmailWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\MailSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\MailSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\MailSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\MailSettings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2002,34 +2315,11 @@ public function updateMailSettingsEmailWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\MailSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\MailSettings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2039,8 +2329,9 @@ public function updateMailSettingsEmailWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2300,10 +2591,10 @@ public function verifyMailSettingsEmailWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -2543,36 +2834,15 @@ public function verifyMailSettingsResponseEmailWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('bool', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('bool' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'bool', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'bool', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2587,34 +2857,11 @@ public function verifyMailSettingsResponseEmailWithHttpInfo( ); } - $returnType = 'bool'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'bool', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2624,8 +2871,9 @@ public function verifyMailSettingsResponseEmailWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2858,4 +3106,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/EmployeeApi.php b/src/Api/EmployeeApi.php index 23f17df..6d2907d 100644 --- a/src/Api/EmployeeApi.php +++ b/src/Api/EmployeeApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -76,10 +79,10 @@ class EmployeeApi 'application/json', ], 'applyPayOptionsEmployee' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'averageWeeklyEarningsEmployee' => [ 'application/json', @@ -91,19 +94,19 @@ class EmployeeApi 'application/json', ], 'createEmployee' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteEmployee' => [ 'application/json', ], 'deleteMultipleEmployee' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deletePhotoEmployee' => [ 'application/json', @@ -111,6 +114,12 @@ class EmployeeApi 'expiringRtwEmployee' => [ 'application/json', ], + 'fpsEmployeesEmployee' => [ + 'application/*+json', + 'application/json', + 'application/json-patch+json', + 'text/json', + ], 'getDepartmentMembershipsEmployee' => [ 'application/json', ], @@ -120,6 +129,12 @@ class EmployeeApi 'getEmployeeCostCentresEmployee' => [ 'application/json', ], + 'getEmployeeNavigationEmployee' => [ + 'application/json', + ], + 'getEmployeesForSupplementaryPayRunEmployee' => [ + 'application/json', + ], 'getEvcSettingsEmployee' => [ 'application/json', ], @@ -133,10 +148,10 @@ class EmployeeApi 'application/json', ], 'markAsLeaversEmployee' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'minimumWageEmployee' => [ 'application/json', @@ -148,10 +163,10 @@ class EmployeeApi 'application/json', ], 'resetEmployeeHolidayAccrualSchemeEmployee' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'searchByPayrollCodeEmployee' => [ 'application/json', @@ -160,34 +175,34 @@ class EmployeeApi 'application/json', ], 'setDepartmentMembershipsEmployee' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'setEmployeeCostCentresEmployee' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'setOnHoldEmployee' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateEmployee' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateEvcSettingsEmployee' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updatePhotoEmployee' => [ 'multipart/form-data', @@ -311,10 +326,10 @@ public function applyPayIncreaseEmployeeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -583,10 +598,10 @@ public function applyPayOptionsEmployeeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -852,36 +867,15 @@ public function averageWeeklyEarningsEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\AverageWeeklyEarnings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AverageWeeklyEarnings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AverageWeeklyEarnings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AverageWeeklyEarnings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -896,34 +890,11 @@ public function averageWeeklyEarningsEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AverageWeeklyEarnings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AverageWeeklyEarnings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -933,8 +904,9 @@ public function averageWeeklyEarningsEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1280,36 +1252,15 @@ public function baseDailyRateEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('float', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('float' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'float', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1324,34 +1275,11 @@ public function baseDailyRateEmployeeWithHttpInfo( ); } - $returnType = 'float'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1361,8 +1289,9 @@ public function baseDailyRateEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1692,36 +1621,15 @@ public function baseHourlyRateEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('float', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('float' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'float', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1736,34 +1644,11 @@ public function baseHourlyRateEmployeeWithHttpInfo( ); } - $returnType = 'float'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1773,8 +1658,9 @@ public function baseHourlyRateEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2037,13 +1923,13 @@ public function baseHourlyRateEmployeeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractEmployeeResponse + * @return \SynergiTech\Staffology\Model\ContractEmployeeResponse|null */ public function createEmployee( string $employerId, ?\SynergiTech\Staffology\Model\ContractCreateEmployeeRequest $contractCreateEmployeeRequest = null, string $contentType = self::contentTypes['createEmployee'][0] - ): \SynergiTech\Staffology\Model\ContractEmployeeResponse + ): ?\SynergiTech\Staffology\Model\ContractEmployeeResponse { list($response) = $this->createEmployeeWithHttpInfo($employerId, $contractCreateEmployeeRequest, $contentType); return $response; @@ -2092,36 +1978,15 @@ public function createEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployeeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployeeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployeeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2136,34 +2001,11 @@ public function createEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -2173,8 +2015,9 @@ public function createEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2438,10 +2281,10 @@ public function deleteEmployeeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -2699,10 +2542,10 @@ public function deleteMultipleEmployeeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -2953,10 +2796,10 @@ public function deletePhotoEmployeeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -3213,36 +3056,15 @@ public function expiringRtwEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3257,34 +3079,11 @@ public function expiringRtwEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3294,8 +3093,9 @@ public function expiringRtwEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3495,48 +3295,48 @@ public function expiringRtwEmployeeRequest( } /** - * Operation getDepartmentMembershipsEmployee + * Operation fpsEmployeesEmployee * - * Get Employee Departments + * Get list of FPS Employees for EYFPS for the given Ids * * @param string $employerId The Id of the Employer to which the Employee belongs. (required) - * @param string $id The Id of the Employee you want to retrieve Departments for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartmentMembershipsEmployee'] to see the possible values for this operation + * @param string[]|null $requestBody List of Employee Ids (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsEmployeesEmployee'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\DepartmentMembership[] + * @return \SynergiTech\Staffology\Model\ContractEmployeeResponse[] */ - public function getDepartmentMembershipsEmployee( + public function fpsEmployeesEmployee( string $employerId, - string $id, - string $contentType = self::contentTypes['getDepartmentMembershipsEmployee'][0] + ?array $requestBody = null, + string $contentType = self::contentTypes['fpsEmployeesEmployee'][0] ): array { - list($response) = $this->getDepartmentMembershipsEmployeeWithHttpInfo($employerId, $id, $contentType); + list($response) = $this->fpsEmployeesEmployeeWithHttpInfo($employerId, $requestBody, $contentType); return $response; } /** - * Operation getDepartmentMembershipsEmployeeWithHttpInfo + * Operation fpsEmployeesEmployeeWithHttpInfo * - * Get Employee Departments + * Get list of FPS Employees for EYFPS for the given Ids * * @param string $employerId The Id of the Employer to which the Employee belongs. (required) - * @param string $id The Id of the Employee you want to retrieve Departments for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartmentMembershipsEmployee'] to see the possible values for this operation + * @param string[]|null $requestBody List of Employee Ids (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsEmployeesEmployee'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\DepartmentMembership[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractEmployeeResponse[], HTTP status code, HTTP response headers (array of strings) */ - public function getDepartmentMembershipsEmployeeWithHttpInfo( + public function fpsEmployeesEmployeeWithHttpInfo( string $employerId, - string $id, - string $contentType = self::contentTypes['getDepartmentMembershipsEmployee'][0] + ?array $requestBody = null, + string $contentType = self::contentTypes['fpsEmployeesEmployee'][0] ): array { - $request = $this->getDepartmentMembershipsEmployeeRequest($employerId, $id, $contentType); + $request = $this->fpsEmployeesEmployeeRequest($employerId, $requestBody, $contentType); try { $options = $this->createHttpClientOption(); @@ -3560,36 +3360,15 @@ public function getDepartmentMembershipsEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\DepartmentMembership[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\DepartmentMembership[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\DepartmentMembership[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3604,68 +3383,46 @@ public function getDepartmentMembershipsEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\DepartmentMembership[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\DepartmentMembership[]', + '\SynergiTech\Staffology\Model\ContractEmployeeResponse[]', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getDepartmentMembershipsEmployeeAsync + * Operation fpsEmployeesEmployeeAsync * - * Get Employee Departments + * Get list of FPS Employees for EYFPS for the given Ids * * @param string $employerId The Id of the Employer to which the Employee belongs. (required) - * @param string $id The Id of the Employee you want to retrieve Departments for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartmentMembershipsEmployee'] to see the possible values for this operation + * @param string[]|null $requestBody List of Employee Ids (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsEmployeesEmployee'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getDepartmentMembershipsEmployeeAsync( + public function fpsEmployeesEmployeeAsync( string $employerId, - string $id, - string $contentType = self::contentTypes['getDepartmentMembershipsEmployee'][0] + ?array $requestBody = null, + string $contentType = self::contentTypes['fpsEmployeesEmployee'][0] ): PromiseInterface { - return $this->getDepartmentMembershipsEmployeeAsyncWithHttpInfo($employerId, $id, $contentType) + return $this->fpsEmployeesEmployeeAsyncWithHttpInfo($employerId, $requestBody, $contentType) ->then( function ($response) { return $response[0]; @@ -3674,25 +3431,25 @@ function ($response) { } /** - * Operation getDepartmentMembershipsEmployeeAsyncWithHttpInfo + * Operation fpsEmployeesEmployeeAsyncWithHttpInfo * - * Get Employee Departments + * Get list of FPS Employees for EYFPS for the given Ids * * @param string $employerId The Id of the Employer to which the Employee belongs. (required) - * @param string $id The Id of the Employee you want to retrieve Departments for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartmentMembershipsEmployee'] to see the possible values for this operation + * @param string[]|null $requestBody List of Employee Ids (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsEmployeesEmployee'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getDepartmentMembershipsEmployeeAsyncWithHttpInfo( + public function fpsEmployeesEmployeeAsyncWithHttpInfo( string $employerId, - string $id, - string $contentType = self::contentTypes['getDepartmentMembershipsEmployee'][0] + ?array $requestBody = null, + string $contentType = self::contentTypes['fpsEmployeesEmployee'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\DepartmentMembership[]'; - $request = $this->getDepartmentMembershipsEmployeeRequest($employerId, $id, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeResponse[]'; + $request = $this->fpsEmployeesEmployeeRequest($employerId, $requestBody, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3731,38 +3488,32 @@ function ($exception) { } /** - * Create request for operation 'getDepartmentMembershipsEmployee' + * Create request for operation 'fpsEmployeesEmployee' * * @param string $employerId The Id of the Employer to which the Employee belongs. (required) - * @param string $id The Id of the Employee you want to retrieve Departments for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartmentMembershipsEmployee'] to see the possible values for this operation + * @param string[]|null $requestBody List of Employee Ids (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsEmployeesEmployee'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getDepartmentMembershipsEmployeeRequest( + public function fpsEmployeesEmployeeRequest( string $employerId, - string $id, - string $contentType = self::contentTypes['getDepartmentMembershipsEmployee'][0] + ?array $requestBody = null, + string $contentType = self::contentTypes['fpsEmployeesEmployee'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling getDepartmentMembershipsEmployee' + 'Missing the required parameter $employerId when calling fpsEmployeesEmployee' ); } - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $id when calling getDepartmentMembershipsEmployee' - ); - } - $resourcePath = '/employers/{employerId}/employees/{id}/departments'; + $resourcePath = '/employers/{employerId}/employees/list'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3779,14 +3530,6 @@ public function getDepartmentMembershipsEmployeeRequest( $resourcePath ); } - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -3796,7 +3539,14 @@ public function getDepartmentMembershipsEmployeeRequest( ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($requestBody)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($requestBody)); + } else { + $httpBody = $requestBody; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -3839,7 +3589,7 @@ public function getDepartmentMembershipsEmployeeRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3847,48 +3597,991 @@ public function getDepartmentMembershipsEmployeeRequest( } /** - * Operation getEmployee + * Operation getDepartmentMembershipsEmployee + * + * Get Employee Departments + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve Departments for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartmentMembershipsEmployee'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\DepartmentMembership[] + */ + public function getDepartmentMembershipsEmployee( + string $employerId, + string $id, + string $contentType = self::contentTypes['getDepartmentMembershipsEmployee'][0] + ): array + { + list($response) = $this->getDepartmentMembershipsEmployeeWithHttpInfo($employerId, $id, $contentType); + return $response; + } + + /** + * Operation getDepartmentMembershipsEmployeeWithHttpInfo + * + * Get Employee Departments + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve Departments for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartmentMembershipsEmployee'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\DepartmentMembership[], HTTP status code, HTTP response headers (array of strings) + */ + public function getDepartmentMembershipsEmployeeWithHttpInfo( + string $employerId, + string $id, + string $contentType = self::contentTypes['getDepartmentMembershipsEmployee'][0] + ): array + { + $request = $this->getDepartmentMembershipsEmployeeRequest($employerId, $id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DepartmentMembership[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DepartmentMembership[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\DepartmentMembership[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getDepartmentMembershipsEmployeeAsync + * + * Get Employee Departments + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve Departments for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartmentMembershipsEmployee'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getDepartmentMembershipsEmployeeAsync( + string $employerId, + string $id, + string $contentType = self::contentTypes['getDepartmentMembershipsEmployee'][0] + ): PromiseInterface + { + return $this->getDepartmentMembershipsEmployeeAsyncWithHttpInfo($employerId, $id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getDepartmentMembershipsEmployeeAsyncWithHttpInfo + * + * Get Employee Departments + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve Departments for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartmentMembershipsEmployee'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getDepartmentMembershipsEmployeeAsyncWithHttpInfo( + string $employerId, + string $id, + string $contentType = self::contentTypes['getDepartmentMembershipsEmployee'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\DepartmentMembership[]'; + $request = $this->getDepartmentMembershipsEmployeeRequest($employerId, $id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getDepartmentMembershipsEmployee' + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve Departments for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDepartmentMembershipsEmployee'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getDepartmentMembershipsEmployeeRequest( + string $employerId, + string $id, + string $contentType = self::contentTypes['getDepartmentMembershipsEmployee'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling getDepartmentMembershipsEmployee' + ); + } + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling getDepartmentMembershipsEmployee' + ); + } + + + $resourcePath = '/employers/{employerId}/employees/{id}/departments'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getEmployee + * + * Get an Employee + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployee'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\ContractEmployeeResponse + */ + public function getEmployee( + string $employerId, + string $id, + string $contentType = self::contentTypes['getEmployee'][0] + ): \SynergiTech\Staffology\Model\ContractEmployeeResponse + { + list($response) = $this->getEmployeeWithHttpInfo($employerId, $id, $contentType); + return $response; + } + + /** + * Operation getEmployeeWithHttpInfo + * + * Get an Employee + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployee'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\ContractEmployeeResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getEmployeeWithHttpInfo( + string $employerId, + string $id, + string $contentType = self::contentTypes['getEmployee'][0] + ): array + { + $request = $this->getEmployeeRequest($employerId, $id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ContractEmployeeResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getEmployeeAsync + * + * Get an Employee + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployee'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getEmployeeAsync( + string $employerId, + string $id, + string $contentType = self::contentTypes['getEmployee'][0] + ): PromiseInterface + { + return $this->getEmployeeAsyncWithHttpInfo($employerId, $id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getEmployeeAsyncWithHttpInfo + * + * Get an Employee + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployee'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getEmployeeAsyncWithHttpInfo( + string $employerId, + string $id, + string $contentType = self::contentTypes['getEmployee'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeResponse'; + $request = $this->getEmployeeRequest($employerId, $id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getEmployee' + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployee'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getEmployeeRequest( + string $employerId, + string $id, + string $contentType = self::contentTypes['getEmployee'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling getEmployee' + ); + } + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling getEmployee' + ); + } + + + $resourcePath = '/employers/{employerId}/employees/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getEmployeeCostCentresEmployee + * + * Get Employee Cost Centres + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve CostCenntres for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeCostCentresEmployee'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\EmployeeCostCentre[] + */ + public function getEmployeeCostCentresEmployee( + string $employerId, + string $id, + string $contentType = self::contentTypes['getEmployeeCostCentresEmployee'][0] + ): array + { + list($response) = $this->getEmployeeCostCentresEmployeeWithHttpInfo($employerId, $id, $contentType); + return $response; + } + + /** + * Operation getEmployeeCostCentresEmployeeWithHttpInfo + * + * Get Employee Cost Centres + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve CostCenntres for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeCostCentresEmployee'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\EmployeeCostCentre[], HTTP status code, HTTP response headers (array of strings) + */ + public function getEmployeeCostCentresEmployeeWithHttpInfo( + string $employerId, + string $id, + string $contentType = self::contentTypes['getEmployeeCostCentresEmployee'][0] + ): array + { + $request = $this->getEmployeeCostCentresEmployeeRequest($employerId, $id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getEmployeeCostCentresEmployeeAsync + * + * Get Employee Cost Centres + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve CostCenntres for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeCostCentresEmployee'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getEmployeeCostCentresEmployeeAsync( + string $employerId, + string $id, + string $contentType = self::contentTypes['getEmployeeCostCentresEmployee'][0] + ): PromiseInterface + { + return $this->getEmployeeCostCentresEmployeeAsyncWithHttpInfo($employerId, $id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getEmployeeCostCentresEmployeeAsyncWithHttpInfo * - * Get an Employee + * Get Employee Cost Centres + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve CostCenntres for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeCostCentresEmployee'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getEmployeeCostCentresEmployeeAsyncWithHttpInfo( + string $employerId, + string $id, + string $contentType = self::contentTypes['getEmployeeCostCentresEmployee'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\EmployeeCostCentre[]'; + $request = $this->getEmployeeCostCentresEmployeeRequest($employerId, $id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getEmployeeCostCentresEmployee' + * + * @param string $employerId The Id of the Employer to which the Employee belongs. (required) + * @param string $id The Id of the Employee you want to retrieve CostCenntres for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeCostCentresEmployee'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getEmployeeCostCentresEmployeeRequest( + string $employerId, + string $id, + string $contentType = self::contentTypes['getEmployeeCostCentresEmployee'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling getEmployeeCostCentresEmployee' + ); + } + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling getEmployeeCostCentresEmployee' + ); + } + + + $resourcePath = '/employers/{employerId}/employees/{id}/costcentres'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getEmployeeNavigationEmployee + * + * Get employee navigation details for a specific employee * * @param string $employerId The Id of the Employer to which the Employee belongs. (required) * @param string $id The Id of the Employee you want to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployee'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\EmployeeStatus|null $employeeStatus Restrict the results to employees with the given status (optional) + * @param string|null $deptCode If specified then only employees assigned to this department code will be listed (optional) + * @param \SynergiTech\Staffology\Model\EmployeeSortBy|null $sortBy Specifies the field by which to sort the employees. Default is EmployeeSortBy.None. (optional) + * @param bool|null $sortDescending Specifies whether the sorting should be in descending order. Default is false. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeNavigationEmployee'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractEmployeeResponse + * @return \SynergiTech\Staffology\Model\ContractEmployeeNavigationResponse */ - public function getEmployee( + public function getEmployeeNavigationEmployee( string $employerId, string $id, - string $contentType = self::contentTypes['getEmployee'][0] - ): \SynergiTech\Staffology\Model\ContractEmployeeResponse + ?\SynergiTech\Staffology\Model\EmployeeStatus $employeeStatus = null, + ?string $deptCode = null, + ?\SynergiTech\Staffology\Model\EmployeeSortBy $sortBy = null, + ?bool $sortDescending = false, + string $contentType = self::contentTypes['getEmployeeNavigationEmployee'][0] + ): \SynergiTech\Staffology\Model\ContractEmployeeNavigationResponse { - list($response) = $this->getEmployeeWithHttpInfo($employerId, $id, $contentType); + list($response) = $this->getEmployeeNavigationEmployeeWithHttpInfo($employerId, $id, $employeeStatus, $deptCode, $sortBy, $sortDescending, $contentType); return $response; } /** - * Operation getEmployeeWithHttpInfo + * Operation getEmployeeNavigationEmployeeWithHttpInfo * - * Get an Employee + * Get employee navigation details for a specific employee * * @param string $employerId The Id of the Employer to which the Employee belongs. (required) * @param string $id The Id of the Employee you want to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployee'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\EmployeeStatus|null $employeeStatus Restrict the results to employees with the given status (optional) + * @param string|null $deptCode If specified then only employees assigned to this department code will be listed (optional) + * @param \SynergiTech\Staffology\Model\EmployeeSortBy|null $sortBy Specifies the field by which to sort the employees. Default is EmployeeSortBy.None. (optional) + * @param bool|null $sortDescending Specifies whether the sorting should be in descending order. Default is false. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeNavigationEmployee'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ContractEmployeeResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractEmployeeNavigationResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getEmployeeWithHttpInfo( + public function getEmployeeNavigationEmployeeWithHttpInfo( string $employerId, string $id, - string $contentType = self::contentTypes['getEmployee'][0] + ?\SynergiTech\Staffology\Model\EmployeeStatus $employeeStatus = null, + ?string $deptCode = null, + ?\SynergiTech\Staffology\Model\EmployeeSortBy $sortBy = null, + ?bool $sortDescending = false, + string $contentType = self::contentTypes['getEmployeeNavigationEmployee'][0] ): array { - $request = $this->getEmployeeRequest($employerId, $id, $contentType); + $request = $this->getEmployeeNavigationEmployeeRequest($employerId, $id, $employeeStatus, $deptCode, $sortBy, $sortDescending, $contentType); try { $options = $this->createHttpClientOption(); @@ -3912,36 +4605,15 @@ public function getEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployeeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployeeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployeeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeNavigationResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3956,68 +4628,54 @@ public function getEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeNavigationResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ContractEmployeeResponse', + '\SynergiTech\Staffology\Model\ContractEmployeeNavigationResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getEmployeeAsync + * Operation getEmployeeNavigationEmployeeAsync * - * Get an Employee + * Get employee navigation details for a specific employee * * @param string $employerId The Id of the Employer to which the Employee belongs. (required) * @param string $id The Id of the Employee you want to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployee'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\EmployeeStatus|null $employeeStatus Restrict the results to employees with the given status (optional) + * @param string|null $deptCode If specified then only employees assigned to this department code will be listed (optional) + * @param \SynergiTech\Staffology\Model\EmployeeSortBy|null $sortBy Specifies the field by which to sort the employees. Default is EmployeeSortBy.None. (optional) + * @param bool|null $sortDescending Specifies whether the sorting should be in descending order. Default is false. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeNavigationEmployee'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getEmployeeAsync( + public function getEmployeeNavigationEmployeeAsync( string $employerId, string $id, - string $contentType = self::contentTypes['getEmployee'][0] + ?\SynergiTech\Staffology\Model\EmployeeStatus $employeeStatus = null, + ?string $deptCode = null, + ?\SynergiTech\Staffology\Model\EmployeeSortBy $sortBy = null, + ?bool $sortDescending = false, + string $contentType = self::contentTypes['getEmployeeNavigationEmployee'][0] ): PromiseInterface { - return $this->getEmployeeAsyncWithHttpInfo($employerId, $id, $contentType) + return $this->getEmployeeNavigationEmployeeAsyncWithHttpInfo($employerId, $id, $employeeStatus, $deptCode, $sortBy, $sortDescending, $contentType) ->then( function ($response) { return $response[0]; @@ -4026,25 +4684,33 @@ function ($response) { } /** - * Operation getEmployeeAsyncWithHttpInfo + * Operation getEmployeeNavigationEmployeeAsyncWithHttpInfo * - * Get an Employee + * Get employee navigation details for a specific employee * * @param string $employerId The Id of the Employer to which the Employee belongs. (required) * @param string $id The Id of the Employee you want to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployee'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\EmployeeStatus|null $employeeStatus Restrict the results to employees with the given status (optional) + * @param string|null $deptCode If specified then only employees assigned to this department code will be listed (optional) + * @param \SynergiTech\Staffology\Model\EmployeeSortBy|null $sortBy Specifies the field by which to sort the employees. Default is EmployeeSortBy.None. (optional) + * @param bool|null $sortDescending Specifies whether the sorting should be in descending order. Default is false. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeNavigationEmployee'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getEmployeeAsyncWithHttpInfo( + public function getEmployeeNavigationEmployeeAsyncWithHttpInfo( string $employerId, string $id, - string $contentType = self::contentTypes['getEmployee'][0] + ?\SynergiTech\Staffology\Model\EmployeeStatus $employeeStatus = null, + ?string $deptCode = null, + ?\SynergiTech\Staffology\Model\EmployeeSortBy $sortBy = null, + ?bool $sortDescending = false, + string $contentType = self::contentTypes['getEmployeeNavigationEmployee'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeResponse'; - $request = $this->getEmployeeRequest($employerId, $id, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeNavigationResponse'; + $request = $this->getEmployeeNavigationEmployeeRequest($employerId, $id, $employeeStatus, $deptCode, $sortBy, $sortDescending, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4083,44 +4749,92 @@ function ($exception) { } /** - * Create request for operation 'getEmployee' + * Create request for operation 'getEmployeeNavigationEmployee' * * @param string $employerId The Id of the Employer to which the Employee belongs. (required) * @param string $id The Id of the Employee you want to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployee'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\EmployeeStatus|null $employeeStatus Restrict the results to employees with the given status (optional) + * @param string|null $deptCode If specified then only employees assigned to this department code will be listed (optional) + * @param \SynergiTech\Staffology\Model\EmployeeSortBy|null $sortBy Specifies the field by which to sort the employees. Default is EmployeeSortBy.None. (optional) + * @param bool|null $sortDescending Specifies whether the sorting should be in descending order. Default is false. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeNavigationEmployee'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmployeeRequest( + public function getEmployeeNavigationEmployeeRequest( string $employerId, string $id, - string $contentType = self::contentTypes['getEmployee'][0] + ?\SynergiTech\Staffology\Model\EmployeeStatus $employeeStatus = null, + ?string $deptCode = null, + ?\SynergiTech\Staffology\Model\EmployeeSortBy $sortBy = null, + ?bool $sortDescending = false, + string $contentType = self::contentTypes['getEmployeeNavigationEmployee'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling getEmployee' + 'Missing the required parameter $employerId when calling getEmployeeNavigationEmployee' ); } // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling getEmployee' + 'Missing the required parameter $id when calling getEmployeeNavigationEmployee' ); } - $resourcePath = '/employers/{employerId}/employees/{id}'; + + + + + $resourcePath = '/employers/{employerId}/employees/{id}/navigation'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $employeeStatus?->value, + 'employeeStatus', // param base name + 'EmployeeStatus', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $deptCode, + 'deptCode', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sortBy?->value, + 'sortBy', // param base name + 'EmployeeSortBy', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sortDescending, + 'sortDescending', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -4199,48 +4913,72 @@ public function getEmployeeRequest( } /** - * Operation getEmployeeCostCentresEmployee + * Operation getEmployeesForSupplementaryPayRunEmployee * - * Get Employee Cost Centres + * Get List of Employees for Supplementary PayRun * - * @param string $employerId The Id of the Employer to which the Employee belongs. (required) - * @param string $id The Id of the Employee you want to retrieve CostCenntres for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeCostCentresEmployee'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param int $ordinal The Period for which you want to get the employees for Pay Run. (required) + * @param int $periodNumber The Period for which you want to get the employees for Pay Run. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear for which you want to get the employees for Pay Run. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The Pay Period (i.e, Monthly, Weekly) for which you want to get employees for Pay Run. (required) + * @param int|null $pageNum The page number. (optional) + * @param int|null $pageSize The number of items per page. (optional) + * @param string|null $query The option to filter on a search term. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeesForSupplementaryPayRunEmployee'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployeeCostCentre[] + * @return \SynergiTech\Staffology\Model\ContractEmployeeSupplementaryPayRunResponse|null */ - public function getEmployeeCostCentresEmployee( + public function getEmployeesForSupplementaryPayRunEmployee( string $employerId, - string $id, - string $contentType = self::contentTypes['getEmployeeCostCentresEmployee'][0] - ): array + int $ordinal, + int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?int $pageNum = null, + ?int $pageSize = null, + ?string $query = null, + string $contentType = self::contentTypes['getEmployeesForSupplementaryPayRunEmployee'][0] + ): ?\SynergiTech\Staffology\Model\ContractEmployeeSupplementaryPayRunResponse { - list($response) = $this->getEmployeeCostCentresEmployeeWithHttpInfo($employerId, $id, $contentType); + list($response) = $this->getEmployeesForSupplementaryPayRunEmployeeWithHttpInfo($employerId, $ordinal, $periodNumber, $taxYear, $payPeriod, $pageNum, $pageSize, $query, $contentType); return $response; } /** - * Operation getEmployeeCostCentresEmployeeWithHttpInfo + * Operation getEmployeesForSupplementaryPayRunEmployeeWithHttpInfo * - * Get Employee Cost Centres + * Get List of Employees for Supplementary PayRun * - * @param string $employerId The Id of the Employer to which the Employee belongs. (required) - * @param string $id The Id of the Employee you want to retrieve CostCenntres for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeCostCentresEmployee'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param int $ordinal The Period for which you want to get the employees for Pay Run. (required) + * @param int $periodNumber The Period for which you want to get the employees for Pay Run. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear for which you want to get the employees for Pay Run. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The Pay Period (i.e, Monthly, Weekly) for which you want to get employees for Pay Run. (required) + * @param int|null $pageNum The page number. (optional) + * @param int|null $pageSize The number of items per page. (optional) + * @param string|null $query The option to filter on a search term. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeesForSupplementaryPayRunEmployee'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\EmployeeCostCentre[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractEmployeeSupplementaryPayRunResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getEmployeeCostCentresEmployeeWithHttpInfo( + public function getEmployeesForSupplementaryPayRunEmployeeWithHttpInfo( string $employerId, - string $id, - string $contentType = self::contentTypes['getEmployeeCostCentresEmployee'][0] + int $ordinal, + int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?int $pageNum = null, + ?int $pageSize = null, + ?string $query = null, + string $contentType = self::contentTypes['getEmployeesForSupplementaryPayRunEmployee'][0] ): array { - $request = $this->getEmployeeCostCentresEmployeeRequest($employerId, $id, $contentType); + $request = $this->getEmployeesForSupplementaryPayRunEmployeeRequest($employerId, $ordinal, $periodNumber, $taxYear, $payPeriod, $pageNum, $pageSize, $query, $contentType); try { $options = $this->createHttpClientOption(); @@ -4264,36 +5002,15 @@ public function getEmployeeCostCentresEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployeeCostCentre[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployeeCostCentre[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeSupplementaryPayRunResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4308,68 +5025,58 @@ public function getEmployeeCostCentresEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployeeCostCentre[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeSupplementaryPayRunResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', + '\SynergiTech\Staffology\Model\ContractEmployeeSupplementaryPayRunResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getEmployeeCostCentresEmployeeAsync + * Operation getEmployeesForSupplementaryPayRunEmployeeAsync * - * Get Employee Cost Centres + * Get List of Employees for Supplementary PayRun * - * @param string $employerId The Id of the Employer to which the Employee belongs. (required) - * @param string $id The Id of the Employee you want to retrieve CostCenntres for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeCostCentresEmployee'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param int $ordinal The Period for which you want to get the employees for Pay Run. (required) + * @param int $periodNumber The Period for which you want to get the employees for Pay Run. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear for which you want to get the employees for Pay Run. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The Pay Period (i.e, Monthly, Weekly) for which you want to get employees for Pay Run. (required) + * @param int|null $pageNum The page number. (optional) + * @param int|null $pageSize The number of items per page. (optional) + * @param string|null $query The option to filter on a search term. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeesForSupplementaryPayRunEmployee'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getEmployeeCostCentresEmployeeAsync( + public function getEmployeesForSupplementaryPayRunEmployeeAsync( string $employerId, - string $id, - string $contentType = self::contentTypes['getEmployeeCostCentresEmployee'][0] + int $ordinal, + int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?int $pageNum = null, + ?int $pageSize = null, + ?string $query = null, + string $contentType = self::contentTypes['getEmployeesForSupplementaryPayRunEmployee'][0] ): PromiseInterface { - return $this->getEmployeeCostCentresEmployeeAsyncWithHttpInfo($employerId, $id, $contentType) + return $this->getEmployeesForSupplementaryPayRunEmployeeAsyncWithHttpInfo($employerId, $ordinal, $periodNumber, $taxYear, $payPeriod, $pageNum, $pageSize, $query, $contentType) ->then( function ($response) { return $response[0]; @@ -4378,25 +5085,37 @@ function ($response) { } /** - * Operation getEmployeeCostCentresEmployeeAsyncWithHttpInfo + * Operation getEmployeesForSupplementaryPayRunEmployeeAsyncWithHttpInfo * - * Get Employee Cost Centres + * Get List of Employees for Supplementary PayRun * - * @param string $employerId The Id of the Employer to which the Employee belongs. (required) - * @param string $id The Id of the Employee you want to retrieve CostCenntres for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeCostCentresEmployee'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param int $ordinal The Period for which you want to get the employees for Pay Run. (required) + * @param int $periodNumber The Period for which you want to get the employees for Pay Run. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear for which you want to get the employees for Pay Run. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The Pay Period (i.e, Monthly, Weekly) for which you want to get employees for Pay Run. (required) + * @param int|null $pageNum The page number. (optional) + * @param int|null $pageSize The number of items per page. (optional) + * @param string|null $query The option to filter on a search term. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeesForSupplementaryPayRunEmployee'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getEmployeeCostCentresEmployeeAsyncWithHttpInfo( + public function getEmployeesForSupplementaryPayRunEmployeeAsyncWithHttpInfo( string $employerId, - string $id, - string $contentType = self::contentTypes['getEmployeeCostCentresEmployee'][0] + int $ordinal, + int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?int $pageNum = null, + ?int $pageSize = null, + ?string $query = null, + string $contentType = self::contentTypes['getEmployeesForSupplementaryPayRunEmployee'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\EmployeeCostCentre[]'; - $request = $this->getEmployeeCostCentresEmployeeRequest($employerId, $id, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeSupplementaryPayRunResponse'; + $request = $this->getEmployeesForSupplementaryPayRunEmployeeRequest($employerId, $ordinal, $periodNumber, $taxYear, $payPeriod, $pageNum, $pageSize, $query, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4435,44 +5154,107 @@ function ($exception) { } /** - * Create request for operation 'getEmployeeCostCentresEmployee' + * Create request for operation 'getEmployeesForSupplementaryPayRunEmployee' * - * @param string $employerId The Id of the Employer to which the Employee belongs. (required) - * @param string $id The Id of the Employee you want to retrieve CostCenntres for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeeCostCentresEmployee'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param int $ordinal The Period for which you want to get the employees for Pay Run. (required) + * @param int $periodNumber The Period for which you want to get the employees for Pay Run. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear for which you want to get the employees for Pay Run. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The Pay Period (i.e, Monthly, Weekly) for which you want to get employees for Pay Run. (required) + * @param int|null $pageNum The page number. (optional) + * @param int|null $pageSize The number of items per page. (optional) + * @param string|null $query The option to filter on a search term. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployeesForSupplementaryPayRunEmployee'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmployeeCostCentresEmployeeRequest( + public function getEmployeesForSupplementaryPayRunEmployeeRequest( string $employerId, - string $id, - string $contentType = self::contentTypes['getEmployeeCostCentresEmployee'][0] + int $ordinal, + int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?int $pageNum = null, + ?int $pageSize = null, + ?string $query = null, + string $contentType = self::contentTypes['getEmployeesForSupplementaryPayRunEmployee'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling getEmployeeCostCentresEmployee' + 'Missing the required parameter $employerId when calling getEmployeesForSupplementaryPayRunEmployee' ); } - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { + // verify the required parameter 'ordinal' is set + if ($ordinal === null || (is_array($ordinal) && count($ordinal) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling getEmployeeCostCentresEmployee' + 'Missing the required parameter $ordinal when calling getEmployeesForSupplementaryPayRunEmployee' ); } + // verify the required parameter 'periodNumber' is set + if ($periodNumber === null || (is_array($periodNumber) && count($periodNumber) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $periodNumber when calling getEmployeesForSupplementaryPayRunEmployee' + ); + } - $resourcePath = '/employers/{employerId}/employees/{id}/costcentres'; + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling getEmployeesForSupplementaryPayRunEmployee' + ); + } + + // verify the required parameter 'payPeriod' is set + if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $payPeriod when calling getEmployeesForSupplementaryPayRunEmployee' + ); + } + + + + + + $resourcePath = '/employers/{employerId}/employees/{ordinal}/{periodNumber}/{taxYear}/{payPeriod}/supplementary'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $pageNum, + 'pageNum', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $pageSize, + 'pageSize', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $query, + 'query', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -4484,10 +5266,34 @@ public function getEmployeeCostCentresEmployeeRequest( ); } // path params - if ($id !== null) { + if ($ordinal !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), + '{' . 'ordinal' . '}', + ObjectSerializer::toPathValue($ordinal), + $resourcePath + ); + } + // path params + if ($periodNumber !== null) { + $resourcePath = str_replace( + '{' . 'periodNumber' . '}', + ObjectSerializer::toPathValue($periodNumber), + $resourcePath + ); + } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } + // path params + if ($payPeriod !== null) { + $resourcePath = str_replace( + '{' . 'payPeriod' . '}', + ObjectSerializer::toPathValue($payPeriod->value), $resourcePath ); } @@ -4616,36 +5422,15 @@ public function getEvcSettingsEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EvcSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EvcSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EvcSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EvcSettings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4660,34 +5445,11 @@ public function getEvcSettingsEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EvcSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EvcSettings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4697,8 +5459,9 @@ public function getEvcSettingsEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4916,7 +5679,7 @@ public function getEvcSettingsEmployeeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Item[]|null */ public function importCsvEmployee( string $employerId, @@ -4925,7 +5688,7 @@ public function importCsvEmployee( ?bool $allowUpdates = false, ?\SplFileObject $file = null, string $contentType = self::contentTypes['importCsvEmployee'][0] - ): array + ): ?array { list($response) = $this->importCsvEmployeeWithHttpInfo($employerId, $format, $previewOnly, $allowUpdates, $file, $contentType); return $response; @@ -4980,36 +5743,15 @@ public function importCsvEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5024,34 +5766,11 @@ public function importCsvEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5061,8 +5780,9 @@ public function importCsvEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5243,19 +5963,14 @@ public function importCsvEmployeeRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -5404,36 +6119,15 @@ public function indexEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5448,34 +6142,11 @@ public function indexEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5485,8 +6156,9 @@ public function indexEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5847,36 +6519,15 @@ public function leaversEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5891,34 +6542,11 @@ public function leaversEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5928,8 +6556,9 @@ public function leaversEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -6203,10 +6832,10 @@ public function markAsLeaversEmployeeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -6496,36 +7125,15 @@ public function minimumWageEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('float', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('float' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'float', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6540,34 +7148,11 @@ public function minimumWageEmployeeWithHttpInfo( ); } - $returnType = 'float'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6577,8 +7162,9 @@ public function minimumWageEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -6889,36 +7475,15 @@ public function payRunEntriesEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6933,34 +7498,11 @@ public function payRunEntriesEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6970,8 +7512,9 @@ public function payRunEntriesEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -7263,10 +7806,10 @@ public function reHireEmployeeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -7524,10 +8067,10 @@ public function resetEmployeeHolidayAccrualSchemeEmployeeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -7777,36 +8320,15 @@ public function searchByPayrollCodeEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7821,34 +8343,11 @@ public function searchByPayrollCodeEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7858,8 +8357,9 @@ public function searchByPayrollCodeEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -8128,36 +8628,15 @@ public function searchEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8172,34 +8651,11 @@ public function searchEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8209,8 +8665,9 @@ public function searchEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -8495,36 +8952,15 @@ public function setDepartmentMembershipsEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\DepartmentMembership[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\DepartmentMembership[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\DepartmentMembership[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DepartmentMembership[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8539,34 +8975,11 @@ public function setDepartmentMembershipsEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\DepartmentMembership[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DepartmentMembership[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8576,8 +8989,9 @@ public function setDepartmentMembershipsEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -8865,36 +9279,15 @@ public function setEmployeeCostCentresEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployeeCostCentre[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployeeCostCentre[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8909,34 +9302,11 @@ public function setEmployeeCostCentresEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployeeCostCentre[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8946,8 +9316,9 @@ public function setEmployeeCostCentresEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -9236,10 +9607,10 @@ public function setOnHoldEmployeeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -9451,14 +9822,14 @@ public function setOnHoldEmployeeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractEmployeeResponse + * @return \SynergiTech\Staffology\Model\ContractEmployeeResponse|null */ public function updateEmployee( string $employerId, string $id, ?\SynergiTech\Staffology\Model\ContractUpdateEmployeeRequest $contractUpdateEmployeeRequest = null, string $contentType = self::contentTypes['updateEmployee'][0] - ): \SynergiTech\Staffology\Model\ContractEmployeeResponse + ): ?\SynergiTech\Staffology\Model\ContractEmployeeResponse { list($response) = $this->updateEmployeeWithHttpInfo($employerId, $id, $contractUpdateEmployeeRequest, $contentType); return $response; @@ -9509,36 +9880,15 @@ public function updateEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployeeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployeeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployeeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9553,34 +9903,11 @@ public function updateEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9590,8 +9917,9 @@ public function updateEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -9879,36 +10207,15 @@ public function updateEvcSettingsEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EvcSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EvcSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EvcSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EvcSettings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9923,34 +10230,11 @@ public function updateEvcSettingsEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EvcSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EvcSettings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9960,8 +10244,9 @@ public function updateEvcSettingsEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -10249,36 +10534,15 @@ public function updatePhotoEmployeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployeeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployeeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployeeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10293,34 +10557,11 @@ public function updatePhotoEmployeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10330,8 +10571,9 @@ public function updatePhotoEmployeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -10485,19 +10727,14 @@ public function updatePhotoEmployeeRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -10574,4 +10811,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/EmployeeRoleApi.php b/src/Api/EmployeeRoleApi.php index 80e7a5c..936d6b4 100644 --- a/src/Api/EmployeeRoleApi.php +++ b/src/Api/EmployeeRoleApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,16 +76,16 @@ class EmployeeRoleApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createEmployeeRole' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createRoleWorkingPatternEmployeeRole' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteEmployeeRole' => [ 'application/json', @@ -121,34 +124,34 @@ class EmployeeRoleApi 'application/json', ], 'setCostCentreMembershipsEmployeeRole' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'setDepartmentMembershipsEmployeeRole' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'setEmployeeRoleAnalysisCategoryCodesEmployeeRole' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateEmployeeRole' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateRoleWorkingPatternEmployeeRole' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -210,14 +213,14 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployeeRole + * @return \SynergiTech\Staffology\Model\EmployeeRole|null */ public function createEmployeeRole( string $employerId, string $employeeId, ?\SynergiTech\Staffology\Model\EmployeeRole $employeeRole = null, string $contentType = self::contentTypes['createEmployeeRole'][0] - ): \SynergiTech\Staffology\Model\EmployeeRole + ): ?\SynergiTech\Staffology\Model\EmployeeRole { list($response) = $this->createEmployeeRoleWithHttpInfo($employerId, $employeeId, $employeeRole, $contentType); return $response; @@ -235,7 +238,7 @@ public function createEmployeeRole( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\EmployeeRole, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\EmployeeRole, HTTP status code, HTTP response headers (array of strings) */ public function createEmployeeRoleWithHttpInfo( string $employerId, @@ -268,36 +271,15 @@ public function createEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\EmployeeRole', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployeeRole' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployeeRole', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeRole', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -312,34 +294,11 @@ public function createEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployeeRole'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeRole', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -349,8 +308,9 @@ public function createEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -581,7 +541,7 @@ public function createEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse + * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse|null */ public function createRoleWorkingPatternEmployeeRole( string $employerId, @@ -589,7 +549,7 @@ public function createRoleWorkingPatternEmployeeRole( string $id, ?\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternRequest $contractEmployeeRoleWorkingPatternRequest = null, string $contentType = self::contentTypes['createRoleWorkingPatternEmployeeRole'][0] - ): \SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse + ): ?\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse { list($response) = $this->createRoleWorkingPatternEmployeeRoleWithHttpInfo($employerId, $employeeId, $id, $contractEmployeeRoleWorkingPatternRequest, $contentType); return $response; @@ -608,7 +568,7 @@ public function createRoleWorkingPatternEmployeeRole( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse, HTTP status code, HTTP response headers (array of strings) */ public function createRoleWorkingPatternEmployeeRoleWithHttpInfo( string $employerId, @@ -642,36 +602,15 @@ public function createRoleWorkingPatternEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -686,34 +625,11 @@ public function createRoleWorkingPatternEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -723,8 +639,9 @@ public function createRoleWorkingPatternEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1034,10 +951,10 @@ public function deleteEmployeeRoleWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1324,10 +1241,10 @@ public function deleteRoleWorkingPatternEmployeeRoleWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1576,7 +1493,7 @@ public function deleteRoleWorkingPatternEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return float + * @return float|null */ public function getBaseDailyRateEmployeeRole( string $employerId, @@ -1587,7 +1504,7 @@ public function getBaseDailyRateEmployeeRole( ?float $payAmount = null, ?string $workingPatternId = null, string $contentType = self::contentTypes['getBaseDailyRateEmployeeRole'][0] - ): float + ): ?float { list($response) = $this->getBaseDailyRateEmployeeRoleWithHttpInfo($employerId, $employeeId, $roleId, $payPeriod, $payBasis, $payAmount, $workingPatternId, $contentType); return $response; @@ -1646,36 +1563,15 @@ public function getBaseDailyRateEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('float', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('float' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'float', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1690,34 +1586,11 @@ public function getBaseDailyRateEmployeeRoleWithHttpInfo( ); } - $returnType = 'float'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1727,8 +1600,9 @@ public function getBaseDailyRateEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2033,7 +1907,7 @@ public function getBaseDailyRateEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return float + * @return float|null */ public function getBaseHourlyRateEmployeeRole( string $employerId, @@ -2044,7 +1918,7 @@ public function getBaseHourlyRateEmployeeRole( ?float $payAmount = null, ?string $workingPatternId = null, string $contentType = self::contentTypes['getBaseHourlyRateEmployeeRole'][0] - ): float + ): ?float { list($response) = $this->getBaseHourlyRateEmployeeRoleWithHttpInfo($employerId, $employeeId, $roleId, $payPeriod, $payBasis, $payAmount, $workingPatternId, $contentType); return $response; @@ -2103,36 +1977,15 @@ public function getBaseHourlyRateEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('float', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('float' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'float', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2147,34 +2000,11 @@ public function getBaseHourlyRateEmployeeRoleWithHttpInfo( ); } - $returnType = 'float'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2184,8 +2014,9 @@ public function getBaseHourlyRateEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2486,14 +2317,14 @@ public function getBaseHourlyRateEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployeeCostCentre[] + * @return \SynergiTech\Staffology\Model\EmployeeCostCentre[]|null */ public function getCostCentreMembershipsEmployeeRole( string $employerId, string $employeeId, string $id, string $contentType = self::contentTypes['getCostCentreMembershipsEmployeeRole'][0] - ): array + ): ?array { list($response) = $this->getCostCentreMembershipsEmployeeRoleWithHttpInfo($employerId, $employeeId, $id, $contentType); return $response; @@ -2544,36 +2375,15 @@ public function getCostCentreMembershipsEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployeeCostCentre[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployeeCostCentre[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2588,34 +2398,11 @@ public function getCostCentreMembershipsEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployeeCostCentre[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2625,8 +2412,9 @@ public function getCostCentreMembershipsEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2863,14 +2651,14 @@ public function getCostCentreMembershipsEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\DepartmentMembership[] + * @return \SynergiTech\Staffology\Model\DepartmentMembership[]|null */ public function getDepartmentMembershipsEmployeeRole( string $employerId, string $employeeId, string $id, string $contentType = self::contentTypes['getDepartmentMembershipsEmployeeRole'][0] - ): array + ): ?array { list($response) = $this->getDepartmentMembershipsEmployeeRoleWithHttpInfo($employerId, $employeeId, $id, $contentType); return $response; @@ -2921,36 +2709,15 @@ public function getDepartmentMembershipsEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\DepartmentMembership[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\DepartmentMembership[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\DepartmentMembership[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DepartmentMembership[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2965,34 +2732,11 @@ public function getDepartmentMembershipsEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\DepartmentMembership[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DepartmentMembership[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3002,8 +2746,9 @@ public function getDepartmentMembershipsEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3240,14 +2985,14 @@ public function getDepartmentMembershipsEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleResponse + * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleResponse|null */ public function getEmployeeRole( string $employerId, string $employeeId, string $id, string $contentType = self::contentTypes['getEmployeeRole'][0] - ): \SynergiTech\Staffology\Model\ContractEmployeeRoleResponse + ): ?\SynergiTech\Staffology\Model\ContractEmployeeRoleResponse { list($response) = $this->getEmployeeRoleWithHttpInfo($employerId, $employeeId, $id, $contentType); return $response; @@ -3298,36 +3043,15 @@ public function getEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployeeRoleResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployeeRoleResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployeeRoleResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3342,34 +3066,11 @@ public function getEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeRoleResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3379,8 +3080,9 @@ public function getEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3617,14 +3319,14 @@ public function getEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[] + * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]|null */ public function getEmployeeRoleAnalysisCategoryCodesEmployeeRole( string $employerId, string $employeeId, string $id, string $contentType = self::contentTypes['getEmployeeRoleAnalysisCategoryCodesEmployeeRole'][0] - ): array + ): ?array { list($response) = $this->getEmployeeRoleAnalysisCategoryCodesEmployeeRoleWithHttpInfo($employerId, $employeeId, $id, $contentType); return $response; @@ -3675,36 +3377,15 @@ public function getEmployeeRoleAnalysisCategoryCodesEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3719,34 +3400,11 @@ public function getEmployeeRoleAnalysisCategoryCodesEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3756,8 +3414,9 @@ public function getEmployeeRoleAnalysisCategoryCodesEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3998,7 +3657,7 @@ public function getEmployeeRoleAnalysisCategoryCodesEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return float + * @return float|null */ public function getRoleAssumedPensionablePayEmployeeRole( string $employerId, @@ -4009,7 +3668,7 @@ public function getRoleAssumedPensionablePayEmployeeRole( ?\SynergiTech\Staffology\Model\LeavePayType $leavePayType = null, ?\DateTime $from = null, string $contentType = self::contentTypes['getRoleAssumedPensionablePayEmployeeRole'][0] - ): float + ): ?float { list($response) = $this->getRoleAssumedPensionablePayEmployeeRoleWithHttpInfo($employerId, $employeeId, $roleId, $payPeriod, $leaveType, $leavePayType, $from, $contentType); return $response; @@ -4068,36 +3727,15 @@ public function getRoleAssumedPensionablePayEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('float', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('float' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'float', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4112,34 +3750,11 @@ public function getRoleAssumedPensionablePayEmployeeRoleWithHttpInfo( ); } - $returnType = 'float'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4149,8 +3764,9 @@ public function getRoleAssumedPensionablePayEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4452,7 +4068,7 @@ public function getRoleAssumedPensionablePayEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse + * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse|null */ public function getRoleWorkingPatternEmployeeRole( string $employerId, @@ -4460,7 +4076,7 @@ public function getRoleWorkingPatternEmployeeRole( string $id, string $roleWorkingPatternId, string $contentType = self::contentTypes['getRoleWorkingPatternEmployeeRole'][0] - ): \SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse + ): ?\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse { list($response) = $this->getRoleWorkingPatternEmployeeRoleWithHttpInfo($employerId, $employeeId, $id, $roleWorkingPatternId, $contentType); return $response; @@ -4513,36 +4129,15 @@ public function getRoleWorkingPatternEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4557,34 +4152,11 @@ public function getRoleWorkingPatternEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4594,8 +4166,9 @@ public function getRoleWorkingPatternEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4852,13 +4425,13 @@ public function getRoleWorkingPatternEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Item[]|null */ public function indexEmployeeRole( string $employerId, string $employeeId, string $contentType = self::contentTypes['indexEmployeeRole'][0] - ): array + ): ?array { list($response) = $this->indexEmployeeRoleWithHttpInfo($employerId, $employeeId, $contentType); return $response; @@ -4907,36 +4480,15 @@ public function indexEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4951,34 +4503,11 @@ public function indexEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4988,8 +4517,9 @@ public function indexEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5205,14 +4735,14 @@ public function indexEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponseItem[] + * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponseItem[]|null */ public function listRoleWorkingPatternsEmployeeRole( string $employerId, string $employeeId, string $id, string $contentType = self::contentTypes['listRoleWorkingPatternsEmployeeRole'][0] - ): array + ): ?array { list($response) = $this->listRoleWorkingPatternsEmployeeRoleWithHttpInfo($employerId, $employeeId, $id, $contentType); return $response; @@ -5263,36 +4793,15 @@ public function listRoleWorkingPatternsEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponseItem[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponseItem[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponseItem[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponseItem[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5307,34 +4816,11 @@ public function listRoleWorkingPatternsEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponseItem[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponseItem[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5344,8 +4830,9 @@ public function listRoleWorkingPatternsEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5583,7 +5070,7 @@ public function listRoleWorkingPatternsEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployeeCostCentre[] + * @return \SynergiTech\Staffology\Model\EmployeeCostCentre[]|null */ public function setCostCentreMembershipsEmployeeRole( string $employerId, @@ -5591,7 +5078,7 @@ public function setCostCentreMembershipsEmployeeRole( string $id, ?array $employeeCostCentre = null, string $contentType = self::contentTypes['setCostCentreMembershipsEmployeeRole'][0] - ): array + ): ?array { list($response) = $this->setCostCentreMembershipsEmployeeRoleWithHttpInfo($employerId, $employeeId, $id, $employeeCostCentre, $contentType); return $response; @@ -5644,36 +5131,15 @@ public function setCostCentreMembershipsEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployeeCostCentre[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployeeCostCentre[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5688,34 +5154,11 @@ public function setCostCentreMembershipsEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployeeCostCentre[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5725,8 +5168,9 @@ public function setCostCentreMembershipsEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5978,7 +5422,7 @@ public function setCostCentreMembershipsEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\DepartmentMembership[] + * @return \SynergiTech\Staffology\Model\DepartmentMembership[]|null */ public function setDepartmentMembershipsEmployeeRole( string $employerId, @@ -5986,7 +5430,7 @@ public function setDepartmentMembershipsEmployeeRole( string $id, ?array $departmentMembership = null, string $contentType = self::contentTypes['setDepartmentMembershipsEmployeeRole'][0] - ): array + ): ?array { list($response) = $this->setDepartmentMembershipsEmployeeRoleWithHttpInfo($employerId, $employeeId, $id, $departmentMembership, $contentType); return $response; @@ -6039,36 +5483,15 @@ public function setDepartmentMembershipsEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\DepartmentMembership[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\DepartmentMembership[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\DepartmentMembership[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DepartmentMembership[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6083,34 +5506,11 @@ public function setDepartmentMembershipsEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\DepartmentMembership[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\DepartmentMembership[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6120,8 +5520,9 @@ public function setDepartmentMembershipsEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -6374,7 +5775,7 @@ public function setDepartmentMembershipsEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[] + * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]|null */ public function setEmployeeRoleAnalysisCategoryCodesEmployeeRole( string $employerId, @@ -6383,7 +5784,7 @@ public function setEmployeeRoleAnalysisCategoryCodesEmployeeRole( string $analysisCategoryId, ?array $contractEmployeeRoleAnalysisCategoryCodeRequest = null, string $contentType = self::contentTypes['setEmployeeRoleAnalysisCategoryCodesEmployeeRole'][0] - ): array + ): ?array { list($response) = $this->setEmployeeRoleAnalysisCategoryCodesEmployeeRoleWithHttpInfo($employerId, $employeeId, $id, $analysisCategoryId, $contractEmployeeRoleAnalysisCategoryCodeRequest, $contentType); return $response; @@ -6438,36 +5839,15 @@ public function setEmployeeRoleAnalysisCategoryCodesEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6482,34 +5862,11 @@ public function setEmployeeRoleAnalysisCategoryCodesEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleAnalysisCategoryCodeResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6519,8 +5876,9 @@ public function setEmployeeRoleAnalysisCategoryCodesEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -6793,7 +6151,7 @@ public function setEmployeeRoleAnalysisCategoryCodesEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployeeRole + * @return \SynergiTech\Staffology\Model\EmployeeRole|null */ public function updateEmployeeRole( string $employerId, @@ -6801,7 +6159,7 @@ public function updateEmployeeRole( string $id, ?\SynergiTech\Staffology\Model\EmployeeRole $employeeRole = null, string $contentType = self::contentTypes['updateEmployeeRole'][0] - ): \SynergiTech\Staffology\Model\EmployeeRole + ): ?\SynergiTech\Staffology\Model\EmployeeRole { list($response) = $this->updateEmployeeRoleWithHttpInfo($employerId, $employeeId, $id, $employeeRole, $contentType); return $response; @@ -6854,36 +6212,15 @@ public function updateEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployeeRole', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployeeRole' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployeeRole', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeRole', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6898,34 +6235,11 @@ public function updateEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployeeRole'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeRole', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6935,8 +6249,9 @@ public function updateEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -7189,7 +6504,7 @@ public function updateEmployeeRoleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse + * @return \SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse|null */ public function updateRoleWorkingPatternEmployeeRole( string $employerId, @@ -7198,7 +6513,7 @@ public function updateRoleWorkingPatternEmployeeRole( string $roleWorkingPatternId, ?\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternRequest $contractEmployeeRoleWorkingPatternRequest = null, string $contentType = self::contentTypes['updateRoleWorkingPatternEmployeeRole'][0] - ): \SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse + ): ?\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse { list($response) = $this->updateRoleWorkingPatternEmployeeRoleWithHttpInfo($employerId, $employeeId, $id, $roleWorkingPatternId, $contractEmployeeRoleWorkingPatternRequest, $contentType); return $response; @@ -7253,36 +6568,15 @@ public function updateRoleWorkingPatternEmployeeRoleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7297,34 +6591,11 @@ public function updateRoleWorkingPatternEmployeeRoleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployeeRoleWorkingPatternResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7334,8 +6605,9 @@ public function updateRoleWorkingPatternEmployeeRoleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -7613,4 +6885,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/EmployerApi.php b/src/Api/EmployerApi.php index dbc674d..f93ddcd 100644 --- a/src/Api/EmployerApi.php +++ b/src/Api/EmployerApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,19 +76,19 @@ class EmployerApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'applyYearEndEmployer' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'calendarEmployer' => [ 'application/json', ], 'createEmployer' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'customPayslipEmployer' => [ 'application/json', @@ -111,6 +114,12 @@ class EmployerApi 'getGroupMembershipsEmployer' => [ 'application/json', ], + 'getReenrolmentStatusEmployer' => [ + 'application/json', + ], + 'getUserEmployerEmployer' => [ + 'application/json', + ], 'importCsvEmployer' => [ 'multipart/form-data', ], @@ -136,49 +145,55 @@ class EmployerApi 'application/json', ], 'setEvcOptInEmployer' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'setGroupMembershipsEmployer' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'setOwnerEmployer' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'suggestPayCodeEmployer' => [ 'application/json', ], 'updateAutomationSettingsEmployer' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateCustomPayslipEmployer' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateEmployer' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', + ], + 'updateEmployerCanUsePremiumConnectorsEmployer' => [ 'application/*+json', + 'application/json', + 'application/json-patch+json', + 'text/json', ], 'updateEmployerOpeningBalancesEmployer' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateLogoEmployer' => [ 'multipart/form-data', @@ -242,13 +257,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\YearEnd + * @return \SynergiTech\Staffology\Model\YearEnd|null */ public function applyYearEndEmployer( string $id, ?array $requestBody = null, string $contentType = self::contentTypes['applyYearEndEmployer'][0] - ): \SynergiTech\Staffology\Model\YearEnd + ): ?\SynergiTech\Staffology\Model\YearEnd { list($response) = $this->applyYearEndEmployerWithHttpInfo($id, $requestBody, $contentType); return $response; @@ -297,36 +312,15 @@ public function applyYearEndEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\YearEnd', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\YearEnd' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\YearEnd', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\YearEnd', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -341,34 +335,11 @@ public function applyYearEndEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\YearEnd'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\YearEnd', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -378,8 +349,9 @@ public function applyYearEndEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -646,36 +618,15 @@ public function calendarEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\CalendarEntry[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CalendarEntry[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CalendarEntry[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CalendarEntry[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -690,34 +641,11 @@ public function calendarEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CalendarEntry[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CalendarEntry[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -727,8 +655,9 @@ public function calendarEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -953,12 +882,12 @@ public function calendarEmployerRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractEmployerResponse + * @return \SynergiTech\Staffology\Model\ContractEmployerResponse|null */ public function createEmployer( ?\SynergiTech\Staffology\Model\ContractEmployerRequest $contractEmployerRequest = null, string $contentType = self::contentTypes['createEmployer'][0] - ): \SynergiTech\Staffology\Model\ContractEmployerResponse + ): ?\SynergiTech\Staffology\Model\ContractEmployerResponse { list($response) = $this->createEmployerWithHttpInfo($contractEmployerRequest, $contentType); return $response; @@ -1005,36 +934,15 @@ public function createEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployerResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployerResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployerResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployerResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1049,34 +957,11 @@ public function createEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployerResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployerResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -1086,8 +971,9 @@ public function createEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1325,36 +1211,15 @@ public function customPayslipEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayslipCustomisation', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayslipCustomisation' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayslipCustomisation', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayslipCustomisation', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1369,34 +1234,11 @@ public function customPayslipEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayslipCustomisation'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayslipCustomisation', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1406,8 +1248,9 @@ public function customPayslipEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1653,10 +1496,10 @@ public function deleteEmployerWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1888,36 +1731,15 @@ public function getAutomationSettingsEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\AutomationSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AutomationSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AutomationSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AutomationSettings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1932,34 +1754,11 @@ public function getAutomationSettingsEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AutomationSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AutomationSettings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1969,8 +1768,9 @@ public function getAutomationSettingsEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2215,36 +2015,15 @@ public function getEmployeesWithAccrualHolidaySchemeEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2259,34 +2038,11 @@ public function getEmployeesWithAccrualHolidaySchemeEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2296,8 +2052,9 @@ public function getEmployeesWithAccrualHolidaySchemeEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2542,36 +2299,15 @@ public function getEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployerResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployerResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployerResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployerResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2586,34 +2322,11 @@ public function getEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployerResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployerResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2623,8 +2336,9 @@ public function getEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2869,36 +2583,15 @@ public function getEmployerOpeningBalancesEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerOpeningBalances', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerOpeningBalances' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerOpeningBalances', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerOpeningBalances', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2913,34 +2606,11 @@ public function getEmployerOpeningBalancesEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerOpeningBalances'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerOpeningBalances', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2950,8 +2620,9 @@ public function getEmployerOpeningBalancesEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3196,36 +2867,15 @@ public function getEvcOptInHistoryEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerEvcOptInHistory[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerEvcOptInHistory[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerEvcOptInHistory[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEvcOptInHistory[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3240,34 +2890,11 @@ public function getEvcOptInHistoryEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerEvcOptInHistory[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEvcOptInHistory[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3277,8 +2904,9 @@ public function getEvcOptInHistoryEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3523,36 +3151,15 @@ public function getGroupMembershipsEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerGroupMembership[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerGroupMembership[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerGroupMembership[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerGroupMembership[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3567,34 +3174,11 @@ public function getGroupMembershipsEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerGroupMembership[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerGroupMembership[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3604,8 +3188,9 @@ public function getGroupMembershipsEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3789,48 +3374,44 @@ public function getGroupMembershipsEmployerRequest( } /** - * Operation importCsvEmployer + * Operation getReenrolmentStatusEmployer * - * Import CSV + * Gets the re-enrolment status for the employer * - * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) - * @param \SplFileObject|null $file file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCsvEmployer'] to see the possible values for this operation + * @param string|null $id id (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getReenrolmentStatusEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\ReenrolmentStatus */ - public function importCsvEmployer( - ?bool $previewOnly = false, - ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importCsvEmployer'][0] - ): array + public function getReenrolmentStatusEmployer( + ?string $id = null, + string $contentType = self::contentTypes['getReenrolmentStatusEmployer'][0] + ): \SynergiTech\Staffology\Model\ReenrolmentStatus { - list($response) = $this->importCsvEmployerWithHttpInfo($previewOnly, $file, $contentType); + list($response) = $this->getReenrolmentStatusEmployerWithHttpInfo($id, $contentType); return $response; } /** - * Operation importCsvEmployerWithHttpInfo + * Operation getReenrolmentStatusEmployerWithHttpInfo * - * Import CSV + * Gets the re-enrolment status for the employer * - * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) - * @param \SplFileObject|null $file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCsvEmployer'] to see the possible values for this operation + * @param string|null $id (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getReenrolmentStatusEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ReenrolmentStatus, HTTP status code, HTTP response headers (array of strings) */ - public function importCsvEmployerWithHttpInfo( - ?bool $previewOnly = false, - ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importCsvEmployer'][0] + public function getReenrolmentStatusEmployerWithHttpInfo( + ?string $id = null, + string $contentType = self::contentTypes['getReenrolmentStatusEmployer'][0] ): array { - $request = $this->importCsvEmployerRequest($previewOnly, $file, $contentType); + $request = $this->getReenrolmentStatusEmployerRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -3854,36 +3435,15 @@ public function importCsvEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReenrolmentStatus', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3898,68 +3458,44 @@ public function importCsvEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReenrolmentStatus', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\Item[]', + '\SynergiTech\Staffology\Model\ReenrolmentStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation importCsvEmployerAsync + * Operation getReenrolmentStatusEmployerAsync * - * Import CSV + * Gets the re-enrolment status for the employer * - * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) - * @param \SplFileObject|null $file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCsvEmployer'] to see the possible values for this operation + * @param string|null $id (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getReenrolmentStatusEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function importCsvEmployerAsync( - ?bool $previewOnly = false, - ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importCsvEmployer'][0] + public function getReenrolmentStatusEmployerAsync( + ?string $id = null, + string $contentType = self::contentTypes['getReenrolmentStatusEmployer'][0] ): PromiseInterface { - return $this->importCsvEmployerAsyncWithHttpInfo($previewOnly, $file, $contentType) + return $this->getReenrolmentStatusEmployerAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -3968,25 +3504,23 @@ function ($response) { } /** - * Operation importCsvEmployerAsyncWithHttpInfo + * Operation getReenrolmentStatusEmployerAsyncWithHttpInfo * - * Import CSV + * Gets the re-enrolment status for the employer * - * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) - * @param \SplFileObject|null $file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCsvEmployer'] to see the possible values for this operation + * @param string|null $id (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getReenrolmentStatusEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function importCsvEmployerAsyncWithHttpInfo( - ?bool $previewOnly = false, - ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importCsvEmployer'][0] + public function getReenrolmentStatusEmployerAsyncWithHttpInfo( + ?string $id = null, + string $contentType = self::contentTypes['getReenrolmentStatusEmployer'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->importCsvEmployerRequest($previewOnly, $file, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ReenrolmentStatus'; + $request = $this->getReenrolmentStatusEmployerRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4025,26 +3559,23 @@ function ($exception) { } /** - * Create request for operation 'importCsvEmployer' + * Create request for operation 'getReenrolmentStatusEmployer' * - * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) - * @param \SplFileObject|null $file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCsvEmployer'] to see the possible values for this operation + * @param string|null $id (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getReenrolmentStatusEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function importCsvEmployerRequest( - ?bool $previewOnly = false, - ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importCsvEmployer'][0] + public function getReenrolmentStatusEmployerRequest( + ?string $id = null, + string $contentType = self::contentTypes['getReenrolmentStatusEmployer'][0] ): Request { - - $resourcePath = '/employers/import'; + $resourcePath = '/employers/reenrolmentstatus'; $formParams = []; $queryParams = []; $headerParams = []; @@ -4053,9 +3584,9 @@ public function importCsvEmployerRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $previewOnly, - 'previewOnly', // param base name - 'boolean', // openApiType + $id, + 'id', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -4063,20 +3594,6 @@ public function importCsvEmployerRequest( - // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -4128,7 +3645,7 @@ public function importCsvEmployerRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -4136,68 +3653,44 @@ public function importCsvEmployerRequest( } /** - * Operation indexEmployer + * Operation getUserEmployerEmployer * - * List Employers + * Get User Employer * - * @param string|null $employerGroupCode Optionally specify the code of an EmployerGroup to only see employers that are a member of that group. (optional) - * @param string|null $searchTerm Filters the employer list by Processor Name, Employer Name, Customer #, Alt ID and Employer GUID. (optional) - * @param \SynergiTech\Staffology\Model\EmployerListType|null $employerListType Filters the employer list type. (optional) - * @param int|null $pageNum Zero-based index indicating the current page. (optional) - * @param int|null $pageSize Number of items per page. (optional) - * @param \SynergiTech\Staffology\Model\EmployerSortBy|null $sortBy Field to sort employers by. (optional) - * @param bool|null $sortDescending Indicates descending sort order. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to get the User from. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserEmployerEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\UserEmployer|null */ - public function indexEmployer( - ?string $employerGroupCode = null, - ?string $searchTerm = null, - ?\SynergiTech\Staffology\Model\EmployerListType $employerListType = null, - ?int $pageNum = null, - ?int $pageSize = null, - ?\SynergiTech\Staffology\Model\EmployerSortBy $sortBy = null, - ?bool $sortDescending = null, - string $contentType = self::contentTypes['indexEmployer'][0] - ): array + public function getUserEmployerEmployer( + string $id, + string $contentType = self::contentTypes['getUserEmployerEmployer'][0] + ): ?\SynergiTech\Staffology\Model\UserEmployer { - list($response) = $this->indexEmployerWithHttpInfo($employerGroupCode, $searchTerm, $employerListType, $pageNum, $pageSize, $sortBy, $sortDescending, $contentType); + list($response) = $this->getUserEmployerEmployerWithHttpInfo($id, $contentType); return $response; } /** - * Operation indexEmployerWithHttpInfo + * Operation getUserEmployerEmployerWithHttpInfo * - * List Employers + * Get User Employer * - * @param string|null $employerGroupCode Optionally specify the code of an EmployerGroup to only see employers that are a member of that group. (optional) - * @param string|null $searchTerm Filters the employer list by Processor Name, Employer Name, Customer #, Alt ID and Employer GUID. (optional) - * @param \SynergiTech\Staffology\Model\EmployerListType|null $employerListType Filters the employer list type. (optional) - * @param int|null $pageNum Zero-based index indicating the current page. (optional) - * @param int|null $pageSize Number of items per page. (optional) - * @param \SynergiTech\Staffology\Model\EmployerSortBy|null $sortBy Field to sort employers by. (optional) - * @param bool|null $sortDescending Indicates descending sort order. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to get the User from. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserEmployerEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\UserEmployer, HTTP status code, HTTP response headers (array of strings) */ - public function indexEmployerWithHttpInfo( - ?string $employerGroupCode = null, - ?string $searchTerm = null, - ?\SynergiTech\Staffology\Model\EmployerListType $employerListType = null, - ?int $pageNum = null, - ?int $pageSize = null, - ?\SynergiTech\Staffology\Model\EmployerSortBy $sortBy = null, - ?bool $sortDescending = null, - string $contentType = self::contentTypes['indexEmployer'][0] + public function getUserEmployerEmployerWithHttpInfo( + string $id, + string $contentType = self::contentTypes['getUserEmployerEmployer'][0] ): array { - $request = $this->indexEmployerRequest($employerGroupCode, $searchTerm, $employerListType, $pageNum, $pageSize, $sortBy, $sortDescending, $contentType); + $request = $this->getUserEmployerEmployerRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -4221,36 +3714,15 @@ public function indexEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\UserEmployer', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4265,78 +3737,44 @@ public function indexEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\UserEmployer', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\Item[]', + '\SynergiTech\Staffology\Model\UserEmployer', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation indexEmployerAsync + * Operation getUserEmployerEmployerAsync * - * List Employers + * Get User Employer * - * @param string|null $employerGroupCode Optionally specify the code of an EmployerGroup to only see employers that are a member of that group. (optional) - * @param string|null $searchTerm Filters the employer list by Processor Name, Employer Name, Customer #, Alt ID and Employer GUID. (optional) - * @param \SynergiTech\Staffology\Model\EmployerListType|null $employerListType Filters the employer list type. (optional) - * @param int|null $pageNum Zero-based index indicating the current page. (optional) - * @param int|null $pageSize Number of items per page. (optional) - * @param \SynergiTech\Staffology\Model\EmployerSortBy|null $sortBy Field to sort employers by. (optional) - * @param bool|null $sortDescending Indicates descending sort order. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to get the User from. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserEmployerEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function indexEmployerAsync( - ?string $employerGroupCode = null, - ?string $searchTerm = null, - ?\SynergiTech\Staffology\Model\EmployerListType $employerListType = null, - ?int $pageNum = null, - ?int $pageSize = null, - ?\SynergiTech\Staffology\Model\EmployerSortBy $sortBy = null, - ?bool $sortDescending = null, - string $contentType = self::contentTypes['indexEmployer'][0] + public function getUserEmployerEmployerAsync( + string $id, + string $contentType = self::contentTypes['getUserEmployerEmployer'][0] ): PromiseInterface { - return $this->indexEmployerAsyncWithHttpInfo($employerGroupCode, $searchTerm, $employerListType, $pageNum, $pageSize, $sortBy, $sortDescending, $contentType) + return $this->getUserEmployerEmployerAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -4345,35 +3783,23 @@ function ($response) { } /** - * Operation indexEmployerAsyncWithHttpInfo + * Operation getUserEmployerEmployerAsyncWithHttpInfo * - * List Employers + * Get User Employer * - * @param string|null $employerGroupCode Optionally specify the code of an EmployerGroup to only see employers that are a member of that group. (optional) - * @param string|null $searchTerm Filters the employer list by Processor Name, Employer Name, Customer #, Alt ID and Employer GUID. (optional) - * @param \SynergiTech\Staffology\Model\EmployerListType|null $employerListType Filters the employer list type. (optional) - * @param int|null $pageNum Zero-based index indicating the current page. (optional) - * @param int|null $pageSize Number of items per page. (optional) - * @param \SynergiTech\Staffology\Model\EmployerSortBy|null $sortBy Field to sort employers by. (optional) - * @param bool|null $sortDescending Indicates descending sort order. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to get the User from. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserEmployerEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function indexEmployerAsyncWithHttpInfo( - ?string $employerGroupCode = null, - ?string $searchTerm = null, - ?\SynergiTech\Staffology\Model\EmployerListType $employerListType = null, - ?int $pageNum = null, - ?int $pageSize = null, - ?\SynergiTech\Staffology\Model\EmployerSortBy $sortBy = null, - ?bool $sortDescending = null, - string $contentType = self::contentTypes['indexEmployer'][0] + public function getUserEmployerEmployerAsyncWithHttpInfo( + string $id, + string $contentType = self::contentTypes['getUserEmployerEmployer'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->indexEmployerRequest($employerGroupCode, $searchTerm, $employerListType, $pageNum, $pageSize, $sortBy, $sortDescending, $contentType); + $returnType = '\SynergiTech\Staffology\Model\UserEmployer'; + $request = $this->getUserEmployerEmployerRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4412,112 +3838,45 @@ function ($exception) { } /** - * Create request for operation 'indexEmployer' + * Create request for operation 'getUserEmployerEmployer' * - * @param string|null $employerGroupCode Optionally specify the code of an EmployerGroup to only see employers that are a member of that group. (optional) - * @param string|null $searchTerm Filters the employer list by Processor Name, Employer Name, Customer #, Alt ID and Employer GUID. (optional) - * @param \SynergiTech\Staffology\Model\EmployerListType|null $employerListType Filters the employer list type. (optional) - * @param int|null $pageNum Zero-based index indicating the current page. (optional) - * @param int|null $pageSize Number of items per page. (optional) - * @param \SynergiTech\Staffology\Model\EmployerSortBy|null $sortBy Field to sort employers by. (optional) - * @param bool|null $sortDescending Indicates descending sort order. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to get the User from. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserEmployerEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function indexEmployerRequest( - ?string $employerGroupCode = null, - ?string $searchTerm = null, - ?\SynergiTech\Staffology\Model\EmployerListType $employerListType = null, - ?int $pageNum = null, - ?int $pageSize = null, - ?\SynergiTech\Staffology\Model\EmployerSortBy $sortBy = null, - ?bool $sortDescending = null, - string $contentType = self::contentTypes['indexEmployer'][0] + public function getUserEmployerEmployerRequest( + string $id, + string $contentType = self::contentTypes['getUserEmployerEmployer'][0] ): Request { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling getUserEmployerEmployer' + ); + } - - - - - - - $resourcePath = '/employers'; + $resourcePath = '/employers/{id}/users/userEmployer'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $employerGroupCode, - 'employerGroupCode', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $searchTerm, - 'searchTerm', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $employerListType?->value, - 'employerListType', // param base name - 'EmployerListType', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $pageNum, - 'pageNum', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $pageSize, - 'pageSize', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sortBy?->value, - 'sortBy', // param base name - 'EmployerSortBy', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sortDescending, - 'sortDescending', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -4578,44 +3937,48 @@ public function indexEmployerRequest( } /** - * Operation listUsersEmployer + * Operation importCsvEmployer * - * List Users + * Import CSV * - * @param string $id The Id of the Employer you want a list of Users for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersEmployer'] to see the possible values for this operation + * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) + * @param \SplFileObject|null $file file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCsvEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return \SynergiTech\Staffology\Model\Item[] */ - public function listUsersEmployer( - string $id, - string $contentType = self::contentTypes['listUsersEmployer'][0] + public function importCsvEmployer( + ?bool $previewOnly = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['importCsvEmployer'][0] ): array { - list($response) = $this->listUsersEmployerWithHttpInfo($id, $contentType); + list($response) = $this->importCsvEmployerWithHttpInfo($previewOnly, $file, $contentType); return $response; } /** - * Operation listUsersEmployerWithHttpInfo + * Operation importCsvEmployerWithHttpInfo * - * List Users + * Import CSV * - * @param string $id The Id of the Employer you want a list of Users for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersEmployer'] to see the possible values for this operation + * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) + * @param \SplFileObject|null $file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCsvEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ - public function listUsersEmployerWithHttpInfo( - string $id, - string $contentType = self::contentTypes['listUsersEmployer'][0] + public function importCsvEmployerWithHttpInfo( + ?bool $previewOnly = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['importCsvEmployer'][0] ): array { - $request = $this->listUsersEmployerRequest($id, $contentType); + $request = $this->importCsvEmployerRequest($previewOnly, $file, $contentType); try { $options = $this->createHttpClientOption(); @@ -4639,36 +4002,15 @@ public function listUsersEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4683,34 +4025,11 @@ public function listUsersEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4720,29 +4039,32 @@ public function listUsersEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation listUsersEmployerAsync + * Operation importCsvEmployerAsync * - * List Users + * Import CSV * - * @param string $id The Id of the Employer you want a list of Users for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersEmployer'] to see the possible values for this operation + * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) + * @param \SplFileObject|null $file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCsvEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function listUsersEmployerAsync( - string $id, - string $contentType = self::contentTypes['listUsersEmployer'][0] + public function importCsvEmployerAsync( + ?bool $previewOnly = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['importCsvEmployer'][0] ): PromiseInterface { - return $this->listUsersEmployerAsyncWithHttpInfo($id, $contentType) + return $this->importCsvEmployerAsyncWithHttpInfo($previewOnly, $file, $contentType) ->then( function ($response) { return $response[0]; @@ -4751,23 +4073,25 @@ function ($response) { } /** - * Operation listUsersEmployerAsyncWithHttpInfo + * Operation importCsvEmployerAsyncWithHttpInfo * - * List Users + * Import CSV * - * @param string $id The Id of the Employer you want a list of Users for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersEmployer'] to see the possible values for this operation + * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) + * @param \SplFileObject|null $file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCsvEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function listUsersEmployerAsyncWithHttpInfo( - string $id, - string $contentType = self::contentTypes['listUsersEmployer'][0] + public function importCsvEmployerAsyncWithHttpInfo( + ?bool $previewOnly = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['importCsvEmployer'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->listUsersEmployerRequest($id, $contentType); + $request = $this->importCsvEmployerRequest($previewOnly, $file, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4806,46 +4130,53 @@ function ($exception) { } /** - * Create request for operation 'listUsersEmployer' + * Create request for operation 'importCsvEmployer' * - * @param string $id The Id of the Employer you want a list of Users for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersEmployer'] to see the possible values for this operation + * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) + * @param \SplFileObject|null $file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importCsvEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listUsersEmployerRequest( - string $id, - string $contentType = self::contentTypes['listUsersEmployer'][0] + public function importCsvEmployerRequest( + ?bool $previewOnly = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['importCsvEmployer'][0] ): Request { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $id when calling listUsersEmployer' - ); - } - $resourcePath = '/employers/{id}/users'; + + $resourcePath = '/employers/import'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $previewOnly, + 'previewOnly', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } + // form params + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -4897,7 +4228,7 @@ public function listUsersEmployerRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -4905,47 +4236,68 @@ public function listUsersEmployerRequest( } /** - * Operation removeUserEmployer + * Operation indexEmployer * - * Remove User + * List Employers * - * @param string $id The Id of the Employer you want to remove the User from. (required) - * @param string $userId The Id of the User you want to remove. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeUserEmployer'] to see the possible values for this operation + * @param string|null $employerGroupCode Optionally specify the code of an EmployerGroup to only see employers that are a member of that group. (optional) + * @param string|null $searchTerm Filters the employer list by Processor Name, Employer Name, Customer #, Alt ID and Employer GUID. (optional) + * @param \SynergiTech\Staffology\Model\EmployerListType|null $employerListType Filters the employer list type. (optional) + * @param int|null $pageNum Zero-based index indicating the current page. (optional) + * @param int|null $pageSize Number of items per page. (optional) + * @param \SynergiTech\Staffology\Model\EmployerSortBy|null $sortBy Field to sort employers by. (optional) + * @param bool|null $sortDescending Indicates descending sort order. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void + * @return \SynergiTech\Staffology\Model\Item[] */ - public function removeUserEmployer( - string $id, - string $userId, - string $contentType = self::contentTypes['removeUserEmployer'][0] - ): void + public function indexEmployer( + ?string $employerGroupCode = null, + ?string $searchTerm = null, + ?\SynergiTech\Staffology\Model\EmployerListType $employerListType = null, + ?int $pageNum = null, + ?int $pageSize = null, + ?\SynergiTech\Staffology\Model\EmployerSortBy $sortBy = null, + ?bool $sortDescending = null, + string $contentType = self::contentTypes['indexEmployer'][0] + ): array { - $this->removeUserEmployerWithHttpInfo($id, $userId, $contentType); + list($response) = $this->indexEmployerWithHttpInfo($employerGroupCode, $searchTerm, $employerListType, $pageNum, $pageSize, $sortBy, $sortDescending, $contentType); + return $response; } /** - * Operation removeUserEmployerWithHttpInfo + * Operation indexEmployerWithHttpInfo * - * Remove User + * List Employers * - * @param string $id The Id of the Employer you want to remove the User from. (required) - * @param string $userId The Id of the User you want to remove. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeUserEmployer'] to see the possible values for this operation + * @param string|null $employerGroupCode Optionally specify the code of an EmployerGroup to only see employers that are a member of that group. (optional) + * @param string|null $searchTerm Filters the employer list by Processor Name, Employer Name, Customer #, Alt ID and Employer GUID. (optional) + * @param \SynergiTech\Staffology\Model\EmployerListType|null $employerListType Filters the employer list type. (optional) + * @param int|null $pageNum Zero-based index indicating the current page. (optional) + * @param int|null $pageSize Number of items per page. (optional) + * @param \SynergiTech\Staffology\Model\EmployerSortBy|null $sortBy Field to sort employers by. (optional) + * @param bool|null $sortDescending Indicates descending sort order. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ - public function removeUserEmployerWithHttpInfo( - string $id, - string $userId, - string $contentType = self::contentTypes['removeUserEmployer'][0] + public function indexEmployerWithHttpInfo( + ?string $employerGroupCode = null, + ?string $searchTerm = null, + ?\SynergiTech\Staffology\Model\EmployerListType $employerListType = null, + ?int $pageNum = null, + ?int $pageSize = null, + ?\SynergiTech\Staffology\Model\EmployerSortBy $sortBy = null, + ?bool $sortDescending = null, + string $contentType = self::contentTypes['indexEmployer'][0] ): array { - $request = $this->removeUserEmployerRequest($id, $userId, $contentType); + $request = $this->indexEmployerRequest($employerGroupCode, $searchTerm, $employerListType, $pageNum, $pageSize, $sortBy, $sortDescending, $contentType); try { $options = $this->createHttpClientOption(); @@ -4969,35 +4321,987 @@ public function removeUserEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } - throw $e; - } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\Item[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation indexEmployerAsync + * + * List Employers + * + * @param string|null $employerGroupCode Optionally specify the code of an EmployerGroup to only see employers that are a member of that group. (optional) + * @param string|null $searchTerm Filters the employer list by Processor Name, Employer Name, Customer #, Alt ID and Employer GUID. (optional) + * @param \SynergiTech\Staffology\Model\EmployerListType|null $employerListType Filters the employer list type. (optional) + * @param int|null $pageNum Zero-based index indicating the current page. (optional) + * @param int|null $pageSize Number of items per page. (optional) + * @param \SynergiTech\Staffology\Model\EmployerSortBy|null $sortBy Field to sort employers by. (optional) + * @param bool|null $sortDescending Indicates descending sort order. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmployer'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function indexEmployerAsync( + ?string $employerGroupCode = null, + ?string $searchTerm = null, + ?\SynergiTech\Staffology\Model\EmployerListType $employerListType = null, + ?int $pageNum = null, + ?int $pageSize = null, + ?\SynergiTech\Staffology\Model\EmployerSortBy $sortBy = null, + ?bool $sortDescending = null, + string $contentType = self::contentTypes['indexEmployer'][0] + ): PromiseInterface + { + return $this->indexEmployerAsyncWithHttpInfo($employerGroupCode, $searchTerm, $employerListType, $pageNum, $pageSize, $sortBy, $sortDescending, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation indexEmployerAsyncWithHttpInfo + * + * List Employers + * + * @param string|null $employerGroupCode Optionally specify the code of an EmployerGroup to only see employers that are a member of that group. (optional) + * @param string|null $searchTerm Filters the employer list by Processor Name, Employer Name, Customer #, Alt ID and Employer GUID. (optional) + * @param \SynergiTech\Staffology\Model\EmployerListType|null $employerListType Filters the employer list type. (optional) + * @param int|null $pageNum Zero-based index indicating the current page. (optional) + * @param int|null $pageSize Number of items per page. (optional) + * @param \SynergiTech\Staffology\Model\EmployerSortBy|null $sortBy Field to sort employers by. (optional) + * @param bool|null $sortDescending Indicates descending sort order. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmployer'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function indexEmployerAsyncWithHttpInfo( + ?string $employerGroupCode = null, + ?string $searchTerm = null, + ?\SynergiTech\Staffology\Model\EmployerListType $employerListType = null, + ?int $pageNum = null, + ?int $pageSize = null, + ?\SynergiTech\Staffology\Model\EmployerSortBy $sortBy = null, + ?bool $sortDescending = null, + string $contentType = self::contentTypes['indexEmployer'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\Item[]'; + $request = $this->indexEmployerRequest($employerGroupCode, $searchTerm, $employerListType, $pageNum, $pageSize, $sortBy, $sortDescending, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'indexEmployer' + * + * @param string|null $employerGroupCode Optionally specify the code of an EmployerGroup to only see employers that are a member of that group. (optional) + * @param string|null $searchTerm Filters the employer list by Processor Name, Employer Name, Customer #, Alt ID and Employer GUID. (optional) + * @param \SynergiTech\Staffology\Model\EmployerListType|null $employerListType Filters the employer list type. (optional) + * @param int|null $pageNum Zero-based index indicating the current page. (optional) + * @param int|null $pageSize Number of items per page. (optional) + * @param \SynergiTech\Staffology\Model\EmployerSortBy|null $sortBy Field to sort employers by. (optional) + * @param bool|null $sortDescending Indicates descending sort order. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexEmployer'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function indexEmployerRequest( + ?string $employerGroupCode = null, + ?string $searchTerm = null, + ?\SynergiTech\Staffology\Model\EmployerListType $employerListType = null, + ?int $pageNum = null, + ?int $pageSize = null, + ?\SynergiTech\Staffology\Model\EmployerSortBy $sortBy = null, + ?bool $sortDescending = null, + string $contentType = self::contentTypes['indexEmployer'][0] + ): Request + { + + + + + + + + + + $resourcePath = '/employers'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $employerGroupCode, + 'employerGroupCode', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $searchTerm, + 'searchTerm', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $employerListType?->value, + 'employerListType', // param base name + 'EmployerListType', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $pageNum, + 'pageNum', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $pageSize, + 'pageSize', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sortBy?->value, + 'sortBy', // param base name + 'EmployerSortBy', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sortDescending, + 'sortDescending', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listUsersEmployer + * + * List Users + * + * @param string $id The Id of the Employer you want a list of Users for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersEmployer'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\Item[] + */ + public function listUsersEmployer( + string $id, + string $contentType = self::contentTypes['listUsersEmployer'][0] + ): array + { + list($response) = $this->listUsersEmployerWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation listUsersEmployerWithHttpInfo + * + * List Users + * + * @param string $id The Id of the Employer you want a list of Users for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersEmployer'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + */ + public function listUsersEmployerWithHttpInfo( + string $id, + string $contentType = self::contentTypes['listUsersEmployer'][0] + ): array + { + $request = $this->listUsersEmployerRequest($id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\Item[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation listUsersEmployerAsync + * + * List Users + * + * @param string $id The Id of the Employer you want a list of Users for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersEmployer'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listUsersEmployerAsync( + string $id, + string $contentType = self::contentTypes['listUsersEmployer'][0] + ): PromiseInterface + { + return $this->listUsersEmployerAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listUsersEmployerAsyncWithHttpInfo + * + * List Users + * + * @param string $id The Id of the Employer you want a list of Users for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersEmployer'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listUsersEmployerAsyncWithHttpInfo( + string $id, + string $contentType = self::contentTypes['listUsersEmployer'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\Item[]'; + $request = $this->listUsersEmployerRequest($id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listUsersEmployer' + * + * @param string $id The Id of the Employer you want a list of Users for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listUsersEmployer'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listUsersEmployerRequest( + string $id, + string $contentType = self::contentTypes['listUsersEmployer'][0] + ): Request + { + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling listUsersEmployer' + ); + } + + + $resourcePath = '/employers/{id}/users'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation removeUserEmployer + * + * Remove User + * + * @param string $id The Id of the Employer you want to remove the User from. (required) + * @param string $userId The Id of the User you want to remove. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeUserEmployer'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return void + */ + public function removeUserEmployer( + string $id, + string $userId, + string $contentType = self::contentTypes['removeUserEmployer'][0] + ): void + { + $this->removeUserEmployerWithHttpInfo($id, $userId, $contentType); + } + + /** + * Operation removeUserEmployerWithHttpInfo + * + * Remove User + * + * @param string $id The Id of the Employer you want to remove the User from. (required) + * @param string $userId The Id of the User you want to remove. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeUserEmployer'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function removeUserEmployerWithHttpInfo( + string $id, + string $userId, + string $contentType = self::contentTypes['removeUserEmployer'][0] + ): array + { + $request = $this->removeUserEmployerRequest($id, $userId, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + } + + throw $e; + } + } + + /** + * Operation removeUserEmployerAsync + * + * Remove User + * + * @param string $id The Id of the Employer you want to remove the User from. (required) + * @param string $userId The Id of the User you want to remove. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeUserEmployer'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function removeUserEmployerAsync( + string $id, + string $userId, + string $contentType = self::contentTypes['removeUserEmployer'][0] + ): PromiseInterface + { + return $this->removeUserEmployerAsyncWithHttpInfo($id, $userId, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation removeUserEmployerAsyncWithHttpInfo + * + * Remove User + * + * @param string $id The Id of the Employer you want to remove the User from. (required) + * @param string $userId The Id of the User you want to remove. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeUserEmployer'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function removeUserEmployerAsyncWithHttpInfo( + string $id, + string $userId, + string $contentType = self::contentTypes['removeUserEmployer'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->removeUserEmployerRequest($id, $userId, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'removeUserEmployer' + * + * @param string $id The Id of the Employer you want to remove the User from. (required) + * @param string $userId The Id of the User you want to remove. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeUserEmployer'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function removeUserEmployerRequest( + string $id, + string $userId, + string $contentType = self::contentTypes['removeUserEmployer'][0] + ): Request + { + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling removeUserEmployer' + ); + } + + // verify the required parameter 'userId' is set + if ($userId === null || (is_array($userId) && count($userId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $userId when calling removeUserEmployer' + ); + } + + + $resourcePath = '/employers/{id}/users/{userId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + // path params + if ($userId !== null) { + $resourcePath = str_replace( + '{' . 'userId' . '}', + ObjectSerializer::toPathValue($userId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); } /** - * Operation removeUserEmployerAsync + * Operation reviewYearEndEmployer * - * Remove User + * Review Year End Changes * - * @param string $id The Id of the Employer you want to remove the User from. (required) - * @param string $userId The Id of the User you want to remove. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeUserEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reviewYearEndEmployer'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\YearEnd|null + */ + public function reviewYearEndEmployer( + string $id, + string $contentType = self::contentTypes['reviewYearEndEmployer'][0] + ): ?\SynergiTech\Staffology\Model\YearEnd + { + list($response) = $this->reviewYearEndEmployerWithHttpInfo($id, $contentType); + return $response; + } + + /** + * Operation reviewYearEndEmployerWithHttpInfo + * + * Review Year End Changes + * + * @param string $id The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reviewYearEndEmployer'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\YearEnd, HTTP status code, HTTP response headers (array of strings) + */ + public function reviewYearEndEmployerWithHttpInfo( + string $id, + string $contentType = self::contentTypes['reviewYearEndEmployer'][0] + ): array + { + $request = $this->reviewYearEndEmployerRequest($id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\YearEnd', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\YearEnd', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\YearEnd', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation reviewYearEndEmployerAsync + * + * Review Year End Changes + * + * @param string $id The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reviewYearEndEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function removeUserEmployerAsync( + public function reviewYearEndEmployerAsync( string $id, - string $userId, - string $contentType = self::contentTypes['removeUserEmployer'][0] + string $contentType = self::contentTypes['reviewYearEndEmployer'][0] ): PromiseInterface { - return $this->removeUserEmployerAsyncWithHttpInfo($id, $userId, $contentType) + return $this->reviewYearEndEmployerAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -5006,31 +5310,42 @@ function ($response) { } /** - * Operation removeUserEmployerAsyncWithHttpInfo + * Operation reviewYearEndEmployerAsyncWithHttpInfo * - * Remove User + * Review Year End Changes * - * @param string $id The Id of the Employer you want to remove the User from. (required) - * @param string $userId The Id of the User you want to remove. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeUserEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reviewYearEndEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function removeUserEmployerAsyncWithHttpInfo( + public function reviewYearEndEmployerAsyncWithHttpInfo( string $id, - string $userId, - string $contentType = self::contentTypes['removeUserEmployer'][0] + string $contentType = self::contentTypes['reviewYearEndEmployer'][0] ): PromiseInterface { - $returnType = ''; - $request = $this->removeUserEmployerRequest($id, $userId, $contentType); + $returnType = '\SynergiTech\Staffology\Model\YearEnd'; + $request = $this->reviewYearEndEmployerRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -5050,38 +5365,29 @@ function ($exception) { } /** - * Create request for operation 'removeUserEmployer' + * Create request for operation 'reviewYearEndEmployer' * - * @param string $id The Id of the Employer you want to remove the User from. (required) - * @param string $userId The Id of the User you want to remove. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeUserEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reviewYearEndEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function removeUserEmployerRequest( + public function reviewYearEndEmployerRequest( string $id, - string $userId, - string $contentType = self::contentTypes['removeUserEmployer'][0] + string $contentType = self::contentTypes['reviewYearEndEmployer'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling removeUserEmployer' - ); - } - - // verify the required parameter 'userId' is set - if ($userId === null || (is_array($userId) && count($userId) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $userId when calling removeUserEmployer' + 'Missing the required parameter $id when calling reviewYearEndEmployer' ); } - $resourcePath = '/employers/{id}/users/{userId}'; + $resourcePath = '/employers/{id}/YearEnd'; $formParams = []; $queryParams = []; $headerParams = []; @@ -5098,18 +5404,10 @@ public function removeUserEmployerRequest( $resourcePath ); } - // path params - if ($userId !== null) { - $resourcePath = str_replace( - '{' . 'userId' . '}', - ObjectSerializer::toPathValue($userId), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( - [], + ['application/json', ], $contentType, $multipart ); @@ -5158,7 +5456,7 @@ public function removeUserEmployerRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'DELETE', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -5166,44 +5464,44 @@ public function removeUserEmployerRequest( } /** - * Operation reviewYearEndEmployer + * Operation rtiRequiringAttentionEmployer * - * Review Year End Changes + * RTI Documents Requiring Attention * * @param string $id The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reviewYearEndEmployer'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rtiRequiringAttentionEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\YearEnd + * @return \SynergiTech\Staffology\Model\Item[] */ - public function reviewYearEndEmployer( + public function rtiRequiringAttentionEmployer( string $id, - string $contentType = self::contentTypes['reviewYearEndEmployer'][0] - ): \SynergiTech\Staffology\Model\YearEnd + string $contentType = self::contentTypes['rtiRequiringAttentionEmployer'][0] + ): array { - list($response) = $this->reviewYearEndEmployerWithHttpInfo($id, $contentType); + list($response) = $this->rtiRequiringAttentionEmployerWithHttpInfo($id, $contentType); return $response; } /** - * Operation reviewYearEndEmployerWithHttpInfo + * Operation rtiRequiringAttentionEmployerWithHttpInfo * - * Review Year End Changes + * RTI Documents Requiring Attention * * @param string $id The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reviewYearEndEmployer'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rtiRequiringAttentionEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\YearEnd, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ - public function reviewYearEndEmployerWithHttpInfo( + public function rtiRequiringAttentionEmployerWithHttpInfo( string $id, - string $contentType = self::contentTypes['reviewYearEndEmployer'][0] + string $contentType = self::contentTypes['rtiRequiringAttentionEmployer'][0] ): array { - $request = $this->reviewYearEndEmployerRequest($id, $contentType); + $request = $this->rtiRequiringAttentionEmployerRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -5223,40 +5521,19 @@ public function reviewYearEndEmployerWithHttpInfo( null, null ); - } - - $statusCode = $response->getStatusCode(); - - - switch($statusCode) { - case 200: - if (in_array('\SynergiTech\Staffology\Model\YearEnd', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\YearEnd' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } + } - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\YearEnd', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5271,66 +5548,44 @@ public function reviewYearEndEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\YearEnd'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\YearEnd', + '\SynergiTech\Staffology\Model\Item[]', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation reviewYearEndEmployerAsync + * Operation rtiRequiringAttentionEmployerAsync * - * Review Year End Changes + * RTI Documents Requiring Attention * * @param string $id The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reviewYearEndEmployer'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rtiRequiringAttentionEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function reviewYearEndEmployerAsync( + public function rtiRequiringAttentionEmployerAsync( string $id, - string $contentType = self::contentTypes['reviewYearEndEmployer'][0] + string $contentType = self::contentTypes['rtiRequiringAttentionEmployer'][0] ): PromiseInterface { - return $this->reviewYearEndEmployerAsyncWithHttpInfo($id, $contentType) + return $this->rtiRequiringAttentionEmployerAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -5339,23 +5594,23 @@ function ($response) { } /** - * Operation reviewYearEndEmployerAsyncWithHttpInfo + * Operation rtiRequiringAttentionEmployerAsyncWithHttpInfo * - * Review Year End Changes + * RTI Documents Requiring Attention * * @param string $id The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reviewYearEndEmployer'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rtiRequiringAttentionEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function reviewYearEndEmployerAsyncWithHttpInfo( + public function rtiRequiringAttentionEmployerAsyncWithHttpInfo( string $id, - string $contentType = self::contentTypes['reviewYearEndEmployer'][0] + string $contentType = self::contentTypes['rtiRequiringAttentionEmployer'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\YearEnd'; - $request = $this->reviewYearEndEmployerRequest($id, $contentType); + $returnType = '\SynergiTech\Staffology\Model\Item[]'; + $request = $this->rtiRequiringAttentionEmployerRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5394,29 +5649,29 @@ function ($exception) { } /** - * Create request for operation 'reviewYearEndEmployer' + * Create request for operation 'rtiRequiringAttentionEmployer' * * @param string $id The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reviewYearEndEmployer'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rtiRequiringAttentionEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function reviewYearEndEmployerRequest( + public function rtiRequiringAttentionEmployerRequest( string $id, - string $contentType = self::contentTypes['reviewYearEndEmployer'][0] + string $contentType = self::contentTypes['rtiRequiringAttentionEmployer'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling reviewYearEndEmployer' + 'Missing the required parameter $id when calling rtiRequiringAttentionEmployer' ); } - $resourcePath = '/employers/{id}/YearEnd'; + $resourcePath = '/employers/{id}/rti/requiringattention'; $formParams = []; $queryParams = []; $headerParams = []; @@ -5493,44 +5748,48 @@ public function reviewYearEndEmployerRequest( } /** - * Operation rtiRequiringAttentionEmployer + * Operation searchEmployeesEmployer * - * RTI Documents Requiring Attention + * Search Employees * - * @param string $id The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rtiRequiringAttentionEmployer'] to see the possible values for this operation + * @param string|null $query The search string (at least 3 characters). (optional) + * @param bool|null $exludeCisSubContactors If set to true, then we'll only search employees that aren't labeled as CIS Subcontractors (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployeesEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return \SynergiTech\Staffology\Model\Item[] */ - public function rtiRequiringAttentionEmployer( - string $id, - string $contentType = self::contentTypes['rtiRequiringAttentionEmployer'][0] + public function searchEmployeesEmployer( + ?string $query = null, + ?bool $exludeCisSubContactors = false, + string $contentType = self::contentTypes['searchEmployeesEmployer'][0] ): array { - list($response) = $this->rtiRequiringAttentionEmployerWithHttpInfo($id, $contentType); + list($response) = $this->searchEmployeesEmployerWithHttpInfo($query, $exludeCisSubContactors, $contentType); return $response; } /** - * Operation rtiRequiringAttentionEmployerWithHttpInfo + * Operation searchEmployeesEmployerWithHttpInfo * - * RTI Documents Requiring Attention + * Search Employees * - * @param string $id The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rtiRequiringAttentionEmployer'] to see the possible values for this operation + * @param string|null $query The search string (at least 3 characters). (optional) + * @param bool|null $exludeCisSubContactors If set to true, then we'll only search employees that aren't labeled as CIS Subcontractors (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployeesEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ - public function rtiRequiringAttentionEmployerWithHttpInfo( - string $id, - string $contentType = self::contentTypes['rtiRequiringAttentionEmployer'][0] + public function searchEmployeesEmployerWithHttpInfo( + ?string $query = null, + ?bool $exludeCisSubContactors = false, + string $contentType = self::contentTypes['searchEmployeesEmployer'][0] ): array { - $request = $this->rtiRequiringAttentionEmployerRequest($id, $contentType); + $request = $this->searchEmployeesEmployerRequest($query, $exludeCisSubContactors, $contentType); try { $options = $this->createHttpClientOption(); @@ -5554,36 +5813,15 @@ public function rtiRequiringAttentionEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5598,34 +5836,11 @@ public function rtiRequiringAttentionEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5635,29 +5850,32 @@ public function rtiRequiringAttentionEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation rtiRequiringAttentionEmployerAsync + * Operation searchEmployeesEmployerAsync * - * RTI Documents Requiring Attention + * Search Employees * - * @param string $id The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rtiRequiringAttentionEmployer'] to see the possible values for this operation + * @param string|null $query The search string (at least 3 characters). (optional) + * @param bool|null $exludeCisSubContactors If set to true, then we'll only search employees that aren't labeled as CIS Subcontractors (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployeesEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function rtiRequiringAttentionEmployerAsync( - string $id, - string $contentType = self::contentTypes['rtiRequiringAttentionEmployer'][0] + public function searchEmployeesEmployerAsync( + ?string $query = null, + ?bool $exludeCisSubContactors = false, + string $contentType = self::contentTypes['searchEmployeesEmployer'][0] ): PromiseInterface { - return $this->rtiRequiringAttentionEmployerAsyncWithHttpInfo($id, $contentType) + return $this->searchEmployeesEmployerAsyncWithHttpInfo($query, $exludeCisSubContactors, $contentType) ->then( function ($response) { return $response[0]; @@ -5666,23 +5884,25 @@ function ($response) { } /** - * Operation rtiRequiringAttentionEmployerAsyncWithHttpInfo + * Operation searchEmployeesEmployerAsyncWithHttpInfo * - * RTI Documents Requiring Attention + * Search Employees * - * @param string $id The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rtiRequiringAttentionEmployer'] to see the possible values for this operation + * @param string|null $query The search string (at least 3 characters). (optional) + * @param bool|null $exludeCisSubContactors If set to true, then we'll only search employees that aren't labeled as CIS Subcontractors (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployeesEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function rtiRequiringAttentionEmployerAsyncWithHttpInfo( - string $id, - string $contentType = self::contentTypes['rtiRequiringAttentionEmployer'][0] + public function searchEmployeesEmployerAsyncWithHttpInfo( + ?string $query = null, + ?bool $exludeCisSubContactors = false, + string $contentType = self::contentTypes['searchEmployeesEmployer'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->rtiRequiringAttentionEmployerRequest($id, $contentType); + $request = $this->searchEmployeesEmployerRequest($query, $exludeCisSubContactors, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5721,45 +5941,52 @@ function ($exception) { } /** - * Create request for operation 'rtiRequiringAttentionEmployer' + * Create request for operation 'searchEmployeesEmployer' * - * @param string $id The Id of the Employer (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rtiRequiringAttentionEmployer'] to see the possible values for this operation + * @param string|null $query The search string (at least 3 characters). (optional) + * @param bool|null $exludeCisSubContactors If set to true, then we'll only search employees that aren't labeled as CIS Subcontractors (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployeesEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function rtiRequiringAttentionEmployerRequest( - string $id, - string $contentType = self::contentTypes['rtiRequiringAttentionEmployer'][0] + public function searchEmployeesEmployerRequest( + ?string $query = null, + ?bool $exludeCisSubContactors = false, + string $contentType = self::contentTypes['searchEmployeesEmployer'][0] ): Request { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $id when calling rtiRequiringAttentionEmployer' - ); - } - $resourcePath = '/employers/{id}/rti/requiringattention'; + + $resourcePath = '/employers/employees/search'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $query, + 'query', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $exludeCisSubContactors, + 'exludeCisSubContactors', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -5820,48 +6047,44 @@ public function rtiRequiringAttentionEmployerRequest( } /** - * Operation searchEmployeesEmployer + * Operation searchEmployer * - * Search Employees + * Search Employers * - * @param string|null $query The search string (at least 3 characters). (optional) - * @param bool|null $exludeCisSubContactors If set to true, then we'll only search employees that aren't labeled as CIS Subcontractors (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployeesEmployer'] to see the possible values for this operation + * @param string|null $query query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return \SynergiTech\Staffology\Model\Item[] */ - public function searchEmployeesEmployer( + public function searchEmployer( ?string $query = null, - ?bool $exludeCisSubContactors = false, - string $contentType = self::contentTypes['searchEmployeesEmployer'][0] + string $contentType = self::contentTypes['searchEmployer'][0] ): array { - list($response) = $this->searchEmployeesEmployerWithHttpInfo($query, $exludeCisSubContactors, $contentType); + list($response) = $this->searchEmployerWithHttpInfo($query, $contentType); return $response; } /** - * Operation searchEmployeesEmployerWithHttpInfo + * Operation searchEmployerWithHttpInfo * - * Search Employees + * Search Employers * - * @param string|null $query The search string (at least 3 characters). (optional) - * @param bool|null $exludeCisSubContactors If set to true, then we'll only search employees that aren't labeled as CIS Subcontractors (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployeesEmployer'] to see the possible values for this operation + * @param string|null $query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ - public function searchEmployeesEmployerWithHttpInfo( + public function searchEmployerWithHttpInfo( ?string $query = null, - ?bool $exludeCisSubContactors = false, - string $contentType = self::contentTypes['searchEmployeesEmployer'][0] + string $contentType = self::contentTypes['searchEmployer'][0] ): array { - $request = $this->searchEmployeesEmployerRequest($query, $exludeCisSubContactors, $contentType); + $request = $this->searchEmployerRequest($query, $contentType); try { $options = $this->createHttpClientOption(); @@ -5885,36 +6108,15 @@ public function searchEmployeesEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5923,40 +6125,17 @@ public function searchEmployeesEmployerWithHttpInfo( $statusCode, (string) $request->getUri() ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5966,31 +6145,30 @@ public function searchEmployeesEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation searchEmployeesEmployerAsync + * Operation searchEmployerAsync * - * Search Employees + * Search Employers * - * @param string|null $query The search string (at least 3 characters). (optional) - * @param bool|null $exludeCisSubContactors If set to true, then we'll only search employees that aren't labeled as CIS Subcontractors (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployeesEmployer'] to see the possible values for this operation + * @param string|null $query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function searchEmployeesEmployerAsync( + public function searchEmployerAsync( ?string $query = null, - ?bool $exludeCisSubContactors = false, - string $contentType = self::contentTypes['searchEmployeesEmployer'][0] + string $contentType = self::contentTypes['searchEmployer'][0] ): PromiseInterface { - return $this->searchEmployeesEmployerAsyncWithHttpInfo($query, $exludeCisSubContactors, $contentType) + return $this->searchEmployerAsyncWithHttpInfo($query, $contentType) ->then( function ($response) { return $response[0]; @@ -5999,25 +6177,23 @@ function ($response) { } /** - * Operation searchEmployeesEmployerAsyncWithHttpInfo + * Operation searchEmployerAsyncWithHttpInfo * - * Search Employees + * Search Employers * - * @param string|null $query The search string (at least 3 characters). (optional) - * @param bool|null $exludeCisSubContactors If set to true, then we'll only search employees that aren't labeled as CIS Subcontractors (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployeesEmployer'] to see the possible values for this operation + * @param string|null $query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function searchEmployeesEmployerAsyncWithHttpInfo( + public function searchEmployerAsyncWithHttpInfo( ?string $query = null, - ?bool $exludeCisSubContactors = false, - string $contentType = self::contentTypes['searchEmployeesEmployer'][0] + string $contentType = self::contentTypes['searchEmployer'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->searchEmployeesEmployerRequest($query, $exludeCisSubContactors, $contentType); + $request = $this->searchEmployerRequest($query, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6056,26 +6232,23 @@ function ($exception) { } /** - * Create request for operation 'searchEmployeesEmployer' + * Create request for operation 'searchEmployer' * - * @param string|null $query The search string (at least 3 characters). (optional) - * @param bool|null $exludeCisSubContactors If set to true, then we'll only search employees that aren't labeled as CIS Subcontractors (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployeesEmployer'] to see the possible values for this operation + * @param string|null $query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function searchEmployeesEmployerRequest( + public function searchEmployerRequest( ?string $query = null, - ?bool $exludeCisSubContactors = false, - string $contentType = self::contentTypes['searchEmployeesEmployer'][0] + string $contentType = self::contentTypes['searchEmployer'][0] ): Request { - - $resourcePath = '/employers/employees/search'; + $resourcePath = '/employers/search'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6091,15 +6264,6 @@ public function searchEmployeesEmployerRequest( true, // explode false // required ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $exludeCisSubContactors, - 'exludeCisSubContactors', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); @@ -6162,44 +6326,47 @@ public function searchEmployeesEmployerRequest( } /** - * Operation searchEmployer + * Operation setEvcOptInEmployer * - * Search Employers + * Update EVC OptIn * - * @param string|null $query query (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer (required) + * @param bool|null $body body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcOptInEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return void */ - public function searchEmployer( - ?string $query = null, - string $contentType = self::contentTypes['searchEmployer'][0] - ): array + public function setEvcOptInEmployer( + string $id, + ?bool $body = null, + string $contentType = self::contentTypes['setEvcOptInEmployer'][0] + ): void { - list($response) = $this->searchEmployerWithHttpInfo($query, $contentType); - return $response; + $this->setEvcOptInEmployerWithHttpInfo($id, $body, $contentType); } /** - * Operation searchEmployerWithHttpInfo + * Operation setEvcOptInEmployerWithHttpInfo * - * Search Employers + * Update EVC OptIn * - * @param string|null $query (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer (required) + * @param bool|null $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcOptInEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function searchEmployerWithHttpInfo( - ?string $query = null, - string $contentType = self::contentTypes['searchEmployer'][0] + public function setEvcOptInEmployerWithHttpInfo( + string $id, + ?bool $body = null, + string $contentType = self::contentTypes['setEvcOptInEmployer'][0] ): array { - $request = $this->searchEmployerRequest($query, $contentType); + $request = $this->setEvcOptInEmployerRequest($id, $body, $contentType); try { $options = $this->createHttpClientOption(); @@ -6224,109 +6391,34 @@ public function searchEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SynergiTech\Staffology\Model\Item[]', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } + throw $e; } } /** - * Operation searchEmployerAsync + * Operation setEvcOptInEmployerAsync * - * Search Employers + * Update EVC OptIn * - * @param string|null $query (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer (required) + * @param bool|null $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcOptInEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function searchEmployerAsync( - ?string $query = null, - string $contentType = self::contentTypes['searchEmployer'][0] + public function setEvcOptInEmployerAsync( + string $id, + ?bool $body = null, + string $contentType = self::contentTypes['setEvcOptInEmployer'][0] ): PromiseInterface { - return $this->searchEmployerAsyncWithHttpInfo($query, $contentType) + return $this->setEvcOptInEmployerAsyncWithHttpInfo($id, $body, $contentType) ->then( function ($response) { return $response[0]; @@ -6335,42 +6427,31 @@ function ($response) { } /** - * Operation searchEmployerAsyncWithHttpInfo + * Operation setEvcOptInEmployerAsyncWithHttpInfo * - * Search Employers + * Update EVC OptIn * - * @param string|null $query (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer (required) + * @param bool|null $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcOptInEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function searchEmployerAsyncWithHttpInfo( - ?string $query = null, - string $contentType = self::contentTypes['searchEmployer'][0] + public function setEvcOptInEmployerAsyncWithHttpInfo( + string $id, + ?bool $body = null, + string $contentType = self::contentTypes['setEvcOptInEmployer'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->searchEmployerRequest($query, $contentType); + $returnType = ''; + $request = $this->setEvcOptInEmployerRequest($id, $body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -6390,50 +6471,65 @@ function ($exception) { } /** - * Create request for operation 'searchEmployer' + * Create request for operation 'setEvcOptInEmployer' * - * @param string|null $query (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['searchEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer (required) + * @param bool|null $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcOptInEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function searchEmployerRequest( - ?string $query = null, - string $contentType = self::contentTypes['searchEmployer'][0] + public function setEvcOptInEmployerRequest( + string $id, + ?bool $body = null, + string $contentType = self::contentTypes['setEvcOptInEmployer'][0] ): Request { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling setEvcOptInEmployer' + ); + } + - $resourcePath = '/employers/search'; + $resourcePath = '/employers/{id}/evc'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $query, - 'query', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + } else { + $httpBody = $body; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -6476,7 +6572,7 @@ public function searchEmployerRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -6484,47 +6580,48 @@ public function searchEmployerRequest( } /** - * Operation setEvcOptInEmployer + * Operation setGroupMembershipsEmployer * - * Update EVC OptIn + * Set Employer Groups * - * @param string $id The Id of the Employer (required) - * @param bool|null $body body (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcOptInEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to set Groups for. (required) + * @param \SynergiTech\Staffology\Model\EmployerGroupMembership[]|null $employerGroupMembership employerGroupMembership (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setGroupMembershipsEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void + * @return \SynergiTech\Staffology\Model\EmployerGroupMembership[] */ - public function setEvcOptInEmployer( + public function setGroupMembershipsEmployer( string $id, - ?bool $body = null, - string $contentType = self::contentTypes['setEvcOptInEmployer'][0] - ): void + ?array $employerGroupMembership = null, + string $contentType = self::contentTypes['setGroupMembershipsEmployer'][0] + ): array { - $this->setEvcOptInEmployerWithHttpInfo($id, $body, $contentType); + list($response) = $this->setGroupMembershipsEmployerWithHttpInfo($id, $employerGroupMembership, $contentType); + return $response; } /** - * Operation setEvcOptInEmployerWithHttpInfo + * Operation setGroupMembershipsEmployerWithHttpInfo * - * Update EVC OptIn + * Set Employer Groups * - * @param string $id The Id of the Employer (required) - * @param bool|null $body (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcOptInEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to set Groups for. (required) + * @param \SynergiTech\Staffology\Model\EmployerGroupMembership[]|null $employerGroupMembership (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setGroupMembershipsEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\EmployerGroupMembership[], HTTP status code, HTTP response headers (array of strings) */ - public function setEvcOptInEmployerWithHttpInfo( + public function setGroupMembershipsEmployerWithHttpInfo( string $id, - ?bool $body = null, - string $contentType = self::contentTypes['setEvcOptInEmployer'][0] + ?array $employerGroupMembership = null, + string $contentType = self::contentTypes['setGroupMembershipsEmployer'][0] ): array { - $request = $this->setEvcOptInEmployerRequest($id, $body, $contentType); + $request = $this->setGroupMembershipsEmployerRequest($id, $employerGroupMembership, $contentType); try { $options = $this->createHttpClientOption(); @@ -6548,35 +6645,69 @@ public function setEvcOptInEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerGroupMembership[]', + $request, + $response, + ); + } + - return [null, $statusCode, $response->getHeaders()]; + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerGroupMembership[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\EmployerGroupMembership[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } /** - * Operation setEvcOptInEmployerAsync + * Operation setGroupMembershipsEmployerAsync * - * Update EVC OptIn + * Set Employer Groups * - * @param string $id The Id of the Employer (required) - * @param bool|null $body (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcOptInEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to set Groups for. (required) + * @param \SynergiTech\Staffology\Model\EmployerGroupMembership[]|null $employerGroupMembership (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setGroupMembershipsEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setEvcOptInEmployerAsync( + public function setGroupMembershipsEmployerAsync( string $id, - ?bool $body = null, - string $contentType = self::contentTypes['setEvcOptInEmployer'][0] + ?array $employerGroupMembership = null, + string $contentType = self::contentTypes['setGroupMembershipsEmployer'][0] ): PromiseInterface { - return $this->setEvcOptInEmployerAsyncWithHttpInfo($id, $body, $contentType) + return $this->setGroupMembershipsEmployerAsyncWithHttpInfo($id, $employerGroupMembership, $contentType) ->then( function ($response) { return $response[0]; @@ -6585,31 +6716,44 @@ function ($response) { } /** - * Operation setEvcOptInEmployerAsyncWithHttpInfo + * Operation setGroupMembershipsEmployerAsyncWithHttpInfo * - * Update EVC OptIn + * Set Employer Groups * - * @param string $id The Id of the Employer (required) - * @param bool|null $body (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcOptInEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to set Groups for. (required) + * @param \SynergiTech\Staffology\Model\EmployerGroupMembership[]|null $employerGroupMembership (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setGroupMembershipsEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setEvcOptInEmployerAsyncWithHttpInfo( + public function setGroupMembershipsEmployerAsyncWithHttpInfo( string $id, - ?bool $body = null, - string $contentType = self::contentTypes['setEvcOptInEmployer'][0] + ?array $employerGroupMembership = null, + string $contentType = self::contentTypes['setGroupMembershipsEmployer'][0] ): PromiseInterface { - $returnType = ''; - $request = $this->setEvcOptInEmployerRequest($id, $body, $contentType); + $returnType = '\SynergiTech\Staffology\Model\EmployerGroupMembership[]'; + $request = $this->setGroupMembershipsEmployerRequest($id, $employerGroupMembership, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -6629,32 +6773,32 @@ function ($exception) { } /** - * Create request for operation 'setEvcOptInEmployer' + * Create request for operation 'setGroupMembershipsEmployer' * - * @param string $id The Id of the Employer (required) - * @param bool|null $body (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcOptInEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to set Groups for. (required) + * @param \SynergiTech\Staffology\Model\EmployerGroupMembership[]|null $employerGroupMembership (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setGroupMembershipsEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setEvcOptInEmployerRequest( + public function setGroupMembershipsEmployerRequest( string $id, - ?bool $body = null, - string $contentType = self::contentTypes['setEvcOptInEmployer'][0] + ?array $employerGroupMembership = null, + string $contentType = self::contentTypes['setGroupMembershipsEmployer'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setEvcOptInEmployer' + 'Missing the required parameter $id when calling setGroupMembershipsEmployer' ); } - $resourcePath = '/employers/{id}/evc'; + $resourcePath = '/employers/{id}/groups'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6674,18 +6818,18 @@ public function setEvcOptInEmployerRequest( $headers = $this->headerSelector->selectHeaders( - [], + ['application/json', ], $contentType, $multipart ); // for model (json/xml) - if (isset($body)) { + if (isset($employerGroupMembership)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($employerGroupMembership)); } else { - $httpBody = $body; + $httpBody = $employerGroupMembership; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -6738,48 +6882,47 @@ public function setEvcOptInEmployerRequest( } /** - * Operation setGroupMembershipsEmployer + * Operation setOwnerEmployer * - * Set Employer Groups + * Set Owner * - * @param string $id The Id of the Employer you want to set Groups for. (required) - * @param \SynergiTech\Staffology\Model\EmployerGroupMembership[]|null $employerGroupMembership employerGroupMembership (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setGroupMembershipsEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to change the ownership of. (required) + * @param string|null $body The Id of the User you want a change ownership to. They must already be a user for this employer and have the admin role assigned to them. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOwnerEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployerGroupMembership[] + * @return void */ - public function setGroupMembershipsEmployer( + public function setOwnerEmployer( string $id, - ?array $employerGroupMembership = null, - string $contentType = self::contentTypes['setGroupMembershipsEmployer'][0] - ): array + ?string $body = null, + string $contentType = self::contentTypes['setOwnerEmployer'][0] + ): void { - list($response) = $this->setGroupMembershipsEmployerWithHttpInfo($id, $employerGroupMembership, $contentType); - return $response; + $this->setOwnerEmployerWithHttpInfo($id, $body, $contentType); } /** - * Operation setGroupMembershipsEmployerWithHttpInfo + * Operation setOwnerEmployerWithHttpInfo * - * Set Employer Groups + * Set Owner * - * @param string $id The Id of the Employer you want to set Groups for. (required) - * @param \SynergiTech\Staffology\Model\EmployerGroupMembership[]|null $employerGroupMembership (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setGroupMembershipsEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to change the ownership of. (required) + * @param string|null $body The Id of the User you want a change ownership to. They must already be a user for this employer and have the admin role assigned to them. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOwnerEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\EmployerGroupMembership[], HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setGroupMembershipsEmployerWithHttpInfo( + public function setOwnerEmployerWithHttpInfo( string $id, - ?array $employerGroupMembership = null, - string $contentType = self::contentTypes['setGroupMembershipsEmployer'][0] + ?string $body = null, + string $contentType = self::contentTypes['setOwnerEmployer'][0] ): array { - $request = $this->setGroupMembershipsEmployerRequest($id, $employerGroupMembership, $contentType); + $request = $this->setOwnerEmployerRequest($id, $body, $contentType); try { $options = $this->createHttpClientOption(); @@ -6804,111 +6947,34 @@ public function setGroupMembershipsEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerGroupMembership[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerGroupMembership[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerGroupMembership[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - $returnType = '\SynergiTech\Staffology\Model\EmployerGroupMembership[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SynergiTech\Staffology\Model\EmployerGroupMembership[]', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } + throw $e; } } /** - * Operation setGroupMembershipsEmployerAsync + * Operation setOwnerEmployerAsync * - * Set Employer Groups + * Set Owner * - * @param string $id The Id of the Employer you want to set Groups for. (required) - * @param \SynergiTech\Staffology\Model\EmployerGroupMembership[]|null $employerGroupMembership (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setGroupMembershipsEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to change the ownership of. (required) + * @param string|null $body The Id of the User you want a change ownership to. They must already be a user for this employer and have the admin role assigned to them. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOwnerEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setGroupMembershipsEmployerAsync( + public function setOwnerEmployerAsync( string $id, - ?array $employerGroupMembership = null, - string $contentType = self::contentTypes['setGroupMembershipsEmployer'][0] + ?string $body = null, + string $contentType = self::contentTypes['setOwnerEmployer'][0] ): PromiseInterface { - return $this->setGroupMembershipsEmployerAsyncWithHttpInfo($id, $employerGroupMembership, $contentType) + return $this->setOwnerEmployerAsyncWithHttpInfo($id, $body, $contentType) ->then( function ($response) { return $response[0]; @@ -6917,44 +6983,31 @@ function ($response) { } /** - * Operation setGroupMembershipsEmployerAsyncWithHttpInfo - * - * Set Employer Groups + * Operation setOwnerEmployerAsyncWithHttpInfo * - * @param string $id The Id of the Employer you want to set Groups for. (required) - * @param \SynergiTech\Staffology\Model\EmployerGroupMembership[]|null $employerGroupMembership (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setGroupMembershipsEmployer'] to see the possible values for this operation + * Set Owner + * + * @param string $id The Id of the Employer you want to change the ownership of. (required) + * @param string|null $body The Id of the User you want a change ownership to. They must already be a user for this employer and have the admin role assigned to them. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOwnerEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setGroupMembershipsEmployerAsyncWithHttpInfo( + public function setOwnerEmployerAsyncWithHttpInfo( string $id, - ?array $employerGroupMembership = null, - string $contentType = self::contentTypes['setGroupMembershipsEmployer'][0] + ?string $body = null, + string $contentType = self::contentTypes['setOwnerEmployer'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\EmployerGroupMembership[]'; - $request = $this->setGroupMembershipsEmployerRequest($id, $employerGroupMembership, $contentType); + $returnType = ''; + $request = $this->setOwnerEmployerRequest($id, $body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -6974,32 +7027,32 @@ function ($exception) { } /** - * Create request for operation 'setGroupMembershipsEmployer' + * Create request for operation 'setOwnerEmployer' * - * @param string $id The Id of the Employer you want to set Groups for. (required) - * @param \SynergiTech\Staffology\Model\EmployerGroupMembership[]|null $employerGroupMembership (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setGroupMembershipsEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to change the ownership of. (required) + * @param string|null $body The Id of the User you want a change ownership to. They must already be a user for this employer and have the admin role assigned to them. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOwnerEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setGroupMembershipsEmployerRequest( + public function setOwnerEmployerRequest( string $id, - ?array $employerGroupMembership = null, - string $contentType = self::contentTypes['setGroupMembershipsEmployer'][0] + ?string $body = null, + string $contentType = self::contentTypes['setOwnerEmployer'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setGroupMembershipsEmployer' + 'Missing the required parameter $id when calling setOwnerEmployer' ); } - $resourcePath = '/employers/{id}/groups'; + $resourcePath = '/employers/{id}/users/owner'; $formParams = []; $queryParams = []; $headerParams = []; @@ -7019,18 +7072,18 @@ public function setGroupMembershipsEmployerRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); // for model (json/xml) - if (isset($employerGroupMembership)) { + if (isset($body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($employerGroupMembership)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); } else { - $httpBody = $employerGroupMembership; + $httpBody = $body; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -7083,47 +7136,44 @@ public function setGroupMembershipsEmployerRequest( } /** - * Operation setOwnerEmployer + * Operation suggestPayCodeEmployer * - * Set Owner + * Suggest Payroll Code * - * @param string $id The Id of the Employer you want to change the ownership of. (required) - * @param string|null $body The Id of the User you want a change ownership to. They must already be a user for this employer and have the admin role assigned to them. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOwnerEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want a suggestion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['suggestPayCodeEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void + * @return string */ - public function setOwnerEmployer( + public function suggestPayCodeEmployer( string $id, - ?string $body = null, - string $contentType = self::contentTypes['setOwnerEmployer'][0] - ): void + string $contentType = self::contentTypes['suggestPayCodeEmployer'][0] + ): string { - $this->setOwnerEmployerWithHttpInfo($id, $body, $contentType); + list($response) = $this->suggestPayCodeEmployerWithHttpInfo($id, $contentType); + return $response; } /** - * Operation setOwnerEmployerWithHttpInfo + * Operation suggestPayCodeEmployerWithHttpInfo * - * Set Owner + * Suggest Payroll Code * - * @param string $id The Id of the Employer you want to change the ownership of. (required) - * @param string|null $body The Id of the User you want a change ownership to. They must already be a user for this employer and have the admin role assigned to them. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOwnerEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want a suggestion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['suggestPayCodeEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of string, HTTP status code, HTTP response headers (array of strings) */ - public function setOwnerEmployerWithHttpInfo( + public function suggestPayCodeEmployerWithHttpInfo( string $id, - ?string $body = null, - string $contentType = self::contentTypes['setOwnerEmployer'][0] + string $contentType = self::contentTypes['suggestPayCodeEmployer'][0] ): array { - $request = $this->setOwnerEmployerRequest($id, $body, $contentType); + $request = $this->suggestPayCodeEmployerRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -7147,35 +7197,67 @@ public function setOwnerEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); + } + - return [null, $statusCode, $response->getHeaders()]; + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } /** - * Operation setOwnerEmployerAsync + * Operation suggestPayCodeEmployerAsync * - * Set Owner + * Suggest Payroll Code * - * @param string $id The Id of the Employer you want to change the ownership of. (required) - * @param string|null $body The Id of the User you want a change ownership to. They must already be a user for this employer and have the admin role assigned to them. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOwnerEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want a suggestion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['suggestPayCodeEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setOwnerEmployerAsync( + public function suggestPayCodeEmployerAsync( string $id, - ?string $body = null, - string $contentType = self::contentTypes['setOwnerEmployer'][0] + string $contentType = self::contentTypes['suggestPayCodeEmployer'][0] ): PromiseInterface { - return $this->setOwnerEmployerAsyncWithHttpInfo($id, $body, $contentType) + return $this->suggestPayCodeEmployerAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -7184,31 +7266,42 @@ function ($response) { } /** - * Operation setOwnerEmployerAsyncWithHttpInfo + * Operation suggestPayCodeEmployerAsyncWithHttpInfo * - * Set Owner + * Suggest Payroll Code * - * @param string $id The Id of the Employer you want to change the ownership of. (required) - * @param string|null $body The Id of the User you want a change ownership to. They must already be a user for this employer and have the admin role assigned to them. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOwnerEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want a suggestion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['suggestPayCodeEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setOwnerEmployerAsyncWithHttpInfo( + public function suggestPayCodeEmployerAsyncWithHttpInfo( string $id, - ?string $body = null, - string $contentType = self::contentTypes['setOwnerEmployer'][0] + string $contentType = self::contentTypes['suggestPayCodeEmployer'][0] ): PromiseInterface { - $returnType = ''; - $request = $this->setOwnerEmployerRequest($id, $body, $contentType); + $returnType = 'string'; + $request = $this->suggestPayCodeEmployerRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -7228,32 +7321,29 @@ function ($exception) { } /** - * Create request for operation 'setOwnerEmployer' + * Create request for operation 'suggestPayCodeEmployer' * - * @param string $id The Id of the Employer you want to change the ownership of. (required) - * @param string|null $body The Id of the User you want a change ownership to. They must already be a user for this employer and have the admin role assigned to them. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setOwnerEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want a suggestion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['suggestPayCodeEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setOwnerEmployerRequest( + public function suggestPayCodeEmployerRequest( string $id, - ?string $body = null, - string $contentType = self::contentTypes['setOwnerEmployer'][0] + string $contentType = self::contentTypes['suggestPayCodeEmployer'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setOwnerEmployer' + 'Missing the required parameter $id when calling suggestPayCodeEmployer' ); } - - $resourcePath = '/employers/{id}/users/owner'; + $resourcePath = '/employers/{id}/suggestPayrollCode'; $formParams = []; $queryParams = []; $headerParams = []; @@ -7273,20 +7363,13 @@ public function setOwnerEmployerRequest( $headers = $this->headerSelector->selectHeaders( - [], + ['application/json', ], $contentType, $multipart ); // for model (json/xml) - if (isset($body)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); - } else { - $httpBody = $body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -7329,7 +7412,7 @@ public function setOwnerEmployerRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -7337,44 +7420,48 @@ public function setOwnerEmployerRequest( } /** - * Operation suggestPayCodeEmployer + * Operation updateAutomationSettingsEmployer * - * Suggest Payroll Code + * Update Automation Settings * - * @param string $id The Id of the Employer you want a suggestion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['suggestPayCodeEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer (required) + * @param \SynergiTech\Staffology\Model\AutomationSettings|null $automationSettings automationSettings (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationSettingsEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return string + * @return \SynergiTech\Staffology\Model\AutomationSettings */ - public function suggestPayCodeEmployer( + public function updateAutomationSettingsEmployer( string $id, - string $contentType = self::contentTypes['suggestPayCodeEmployer'][0] - ): string + ?\SynergiTech\Staffology\Model\AutomationSettings $automationSettings = null, + string $contentType = self::contentTypes['updateAutomationSettingsEmployer'][0] + ): \SynergiTech\Staffology\Model\AutomationSettings { - list($response) = $this->suggestPayCodeEmployerWithHttpInfo($id, $contentType); + list($response) = $this->updateAutomationSettingsEmployerWithHttpInfo($id, $automationSettings, $contentType); return $response; } /** - * Operation suggestPayCodeEmployerWithHttpInfo + * Operation updateAutomationSettingsEmployerWithHttpInfo * - * Suggest Payroll Code + * Update Automation Settings * - * @param string $id The Id of the Employer you want a suggestion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['suggestPayCodeEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer (required) + * @param \SynergiTech\Staffology\Model\AutomationSettings|null $automationSettings (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationSettingsEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of string, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\AutomationSettings, HTTP status code, HTTP response headers (array of strings) */ - public function suggestPayCodeEmployerWithHttpInfo( + public function updateAutomationSettingsEmployerWithHttpInfo( string $id, - string $contentType = self::contentTypes['suggestPayCodeEmployer'][0] + ?\SynergiTech\Staffology\Model\AutomationSettings $automationSettings = null, + string $contentType = self::contentTypes['updateAutomationSettingsEmployer'][0] ): array { - $request = $this->suggestPayCodeEmployerRequest($id, $contentType); + $request = $this->updateAutomationSettingsEmployerRequest($id, $automationSettings, $contentType); try { $options = $this->createHttpClientOption(); @@ -7398,36 +7485,15 @@ public function suggestPayCodeEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('string' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'string', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AutomationSettings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7442,66 +7508,46 @@ public function suggestPayCodeEmployerWithHttpInfo( ); } - $returnType = 'string'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AutomationSettings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'string', + '\SynergiTech\Staffology\Model\AutomationSettings', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation suggestPayCodeEmployerAsync + * Operation updateAutomationSettingsEmployerAsync * - * Suggest Payroll Code + * Update Automation Settings * - * @param string $id The Id of the Employer you want a suggestion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['suggestPayCodeEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer (required) + * @param \SynergiTech\Staffology\Model\AutomationSettings|null $automationSettings (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationSettingsEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function suggestPayCodeEmployerAsync( + public function updateAutomationSettingsEmployerAsync( string $id, - string $contentType = self::contentTypes['suggestPayCodeEmployer'][0] + ?\SynergiTech\Staffology\Model\AutomationSettings $automationSettings = null, + string $contentType = self::contentTypes['updateAutomationSettingsEmployer'][0] ): PromiseInterface { - return $this->suggestPayCodeEmployerAsyncWithHttpInfo($id, $contentType) + return $this->updateAutomationSettingsEmployerAsyncWithHttpInfo($id, $automationSettings, $contentType) ->then( function ($response) { return $response[0]; @@ -7510,23 +7556,25 @@ function ($response) { } /** - * Operation suggestPayCodeEmployerAsyncWithHttpInfo + * Operation updateAutomationSettingsEmployerAsyncWithHttpInfo * - * Suggest Payroll Code + * Update Automation Settings * - * @param string $id The Id of the Employer you want a suggestion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['suggestPayCodeEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer (required) + * @param \SynergiTech\Staffology\Model\AutomationSettings|null $automationSettings (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationSettingsEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function suggestPayCodeEmployerAsyncWithHttpInfo( + public function updateAutomationSettingsEmployerAsyncWithHttpInfo( string $id, - string $contentType = self::contentTypes['suggestPayCodeEmployer'][0] + ?\SynergiTech\Staffology\Model\AutomationSettings $automationSettings = null, + string $contentType = self::contentTypes['updateAutomationSettingsEmployer'][0] ): PromiseInterface { - $returnType = 'string'; - $request = $this->suggestPayCodeEmployerRequest($id, $contentType); + $returnType = '\SynergiTech\Staffology\Model\AutomationSettings'; + $request = $this->updateAutomationSettingsEmployerRequest($id, $automationSettings, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7565,29 +7613,32 @@ function ($exception) { } /** - * Create request for operation 'suggestPayCodeEmployer' + * Create request for operation 'updateAutomationSettingsEmployer' * - * @param string $id The Id of the Employer you want a suggestion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['suggestPayCodeEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer (required) + * @param \SynergiTech\Staffology\Model\AutomationSettings|null $automationSettings (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationSettingsEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function suggestPayCodeEmployerRequest( + public function updateAutomationSettingsEmployerRequest( string $id, - string $contentType = self::contentTypes['suggestPayCodeEmployer'][0] + ?\SynergiTech\Staffology\Model\AutomationSettings $automationSettings = null, + string $contentType = self::contentTypes['updateAutomationSettingsEmployer'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling suggestPayCodeEmployer' + 'Missing the required parameter $id when calling updateAutomationSettingsEmployer' ); } - $resourcePath = '/employers/{id}/suggestPayrollCode'; + + $resourcePath = '/employers/{id}/automation'; $formParams = []; $queryParams = []; $headerParams = []; @@ -7613,7 +7664,14 @@ public function suggestPayCodeEmployerRequest( ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($automationSettings)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($automationSettings)); + } else { + $httpBody = $automationSettings; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -7656,7 +7714,7 @@ public function suggestPayCodeEmployerRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -7664,48 +7722,48 @@ public function suggestPayCodeEmployerRequest( } /** - * Operation updateAutomationSettingsEmployer + * Operation updateCustomPayslipEmployer * - * Update Automation Settings + * Update Payslip Customisations * - * @param string $id The Id of the Employer (required) - * @param \SynergiTech\Staffology\Model\AutomationSettings|null $automationSettings automationSettings (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationSettingsEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want customisations for. (required) + * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation payslipCustomisation (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCustomPayslipEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\AutomationSettings + * @return \SynergiTech\Staffology\Model\PayslipCustomisation */ - public function updateAutomationSettingsEmployer( + public function updateCustomPayslipEmployer( string $id, - ?\SynergiTech\Staffology\Model\AutomationSettings $automationSettings = null, - string $contentType = self::contentTypes['updateAutomationSettingsEmployer'][0] - ): \SynergiTech\Staffology\Model\AutomationSettings + ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, + string $contentType = self::contentTypes['updateCustomPayslipEmployer'][0] + ): \SynergiTech\Staffology\Model\PayslipCustomisation { - list($response) = $this->updateAutomationSettingsEmployerWithHttpInfo($id, $automationSettings, $contentType); + list($response) = $this->updateCustomPayslipEmployerWithHttpInfo($id, $payslipCustomisation, $contentType); return $response; } /** - * Operation updateAutomationSettingsEmployerWithHttpInfo + * Operation updateCustomPayslipEmployerWithHttpInfo * - * Update Automation Settings + * Update Payslip Customisations * - * @param string $id The Id of the Employer (required) - * @param \SynergiTech\Staffology\Model\AutomationSettings|null $automationSettings (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationSettingsEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want customisations for. (required) + * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCustomPayslipEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\AutomationSettings, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\PayslipCustomisation, HTTP status code, HTTP response headers (array of strings) */ - public function updateAutomationSettingsEmployerWithHttpInfo( + public function updateCustomPayslipEmployerWithHttpInfo( string $id, - ?\SynergiTech\Staffology\Model\AutomationSettings $automationSettings = null, - string $contentType = self::contentTypes['updateAutomationSettingsEmployer'][0] + ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, + string $contentType = self::contentTypes['updateCustomPayslipEmployer'][0] ): array { - $request = $this->updateAutomationSettingsEmployerRequest($id, $automationSettings, $contentType); + $request = $this->updateCustomPayslipEmployerRequest($id, $payslipCustomisation, $contentType); try { $options = $this->createHttpClientOption(); @@ -7729,36 +7787,15 @@ public function updateAutomationSettingsEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\AutomationSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AutomationSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AutomationSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayslipCustomisation', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7773,68 +7810,46 @@ public function updateAutomationSettingsEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AutomationSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayslipCustomisation', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\AutomationSettings', + '\SynergiTech\Staffology\Model\PayslipCustomisation', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation updateAutomationSettingsEmployerAsync + * Operation updateCustomPayslipEmployerAsync * - * Update Automation Settings + * Update Payslip Customisations * - * @param string $id The Id of the Employer (required) - * @param \SynergiTech\Staffology\Model\AutomationSettings|null $automationSettings (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationSettingsEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want customisations for. (required) + * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCustomPayslipEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function updateAutomationSettingsEmployerAsync( + public function updateCustomPayslipEmployerAsync( string $id, - ?\SynergiTech\Staffology\Model\AutomationSettings $automationSettings = null, - string $contentType = self::contentTypes['updateAutomationSettingsEmployer'][0] + ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, + string $contentType = self::contentTypes['updateCustomPayslipEmployer'][0] ): PromiseInterface { - return $this->updateAutomationSettingsEmployerAsyncWithHttpInfo($id, $automationSettings, $contentType) + return $this->updateCustomPayslipEmployerAsyncWithHttpInfo($id, $payslipCustomisation, $contentType) ->then( function ($response) { return $response[0]; @@ -7843,25 +7858,25 @@ function ($response) { } /** - * Operation updateAutomationSettingsEmployerAsyncWithHttpInfo + * Operation updateCustomPayslipEmployerAsyncWithHttpInfo * - * Update Automation Settings + * Update Payslip Customisations * - * @param string $id The Id of the Employer (required) - * @param \SynergiTech\Staffology\Model\AutomationSettings|null $automationSettings (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationSettingsEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want customisations for. (required) + * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCustomPayslipEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function updateAutomationSettingsEmployerAsyncWithHttpInfo( + public function updateCustomPayslipEmployerAsyncWithHttpInfo( string $id, - ?\SynergiTech\Staffology\Model\AutomationSettings $automationSettings = null, - string $contentType = self::contentTypes['updateAutomationSettingsEmployer'][0] + ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, + string $contentType = self::contentTypes['updateCustomPayslipEmployer'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\AutomationSettings'; - $request = $this->updateAutomationSettingsEmployerRequest($id, $automationSettings, $contentType); + $returnType = '\SynergiTech\Staffology\Model\PayslipCustomisation'; + $request = $this->updateCustomPayslipEmployerRequest($id, $payslipCustomisation, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7900,32 +7915,32 @@ function ($exception) { } /** - * Create request for operation 'updateAutomationSettingsEmployer' + * Create request for operation 'updateCustomPayslipEmployer' * - * @param string $id The Id of the Employer (required) - * @param \SynergiTech\Staffology\Model\AutomationSettings|null $automationSettings (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAutomationSettingsEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want customisations for. (required) + * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCustomPayslipEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateAutomationSettingsEmployerRequest( + public function updateCustomPayslipEmployerRequest( string $id, - ?\SynergiTech\Staffology\Model\AutomationSettings $automationSettings = null, - string $contentType = self::contentTypes['updateAutomationSettingsEmployer'][0] + ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, + string $contentType = self::contentTypes['updateCustomPayslipEmployer'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling updateAutomationSettingsEmployer' + 'Missing the required parameter $id when calling updateCustomPayslipEmployer' ); } - $resourcePath = '/employers/{id}/automation'; + $resourcePath = '/employers/{id}/custompayslip'; $formParams = []; $queryParams = []; $headerParams = []; @@ -7951,12 +7966,12 @@ public function updateAutomationSettingsEmployerRequest( ); // for model (json/xml) - if (isset($automationSettings)) { + if (isset($payslipCustomisation)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($automationSettings)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payslipCustomisation)); } else { - $httpBody = $automationSettings; + $httpBody = $payslipCustomisation; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -8001,7 +8016,7 @@ public function updateAutomationSettingsEmployerRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -8009,48 +8024,48 @@ public function updateAutomationSettingsEmployerRequest( } /** - * Operation updateCustomPayslipEmployer + * Operation updateEmployer * - * Update Payslip Customisations + * Update an Employer * - * @param string $id The Id of the Employer you want customisations for. (required) - * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation payslipCustomisation (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCustomPayslipEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to update. (required) + * @param \SynergiTech\Staffology\Model\ContractEmployerRequest|null $contractEmployerRequest contractEmployerRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayslipCustomisation + * @return \SynergiTech\Staffology\Model\ContractEmployerResponse|null */ - public function updateCustomPayslipEmployer( + public function updateEmployer( string $id, - ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, - string $contentType = self::contentTypes['updateCustomPayslipEmployer'][0] - ): \SynergiTech\Staffology\Model\PayslipCustomisation + ?\SynergiTech\Staffology\Model\ContractEmployerRequest $contractEmployerRequest = null, + string $contentType = self::contentTypes['updateEmployer'][0] + ): ?\SynergiTech\Staffology\Model\ContractEmployerResponse { - list($response) = $this->updateCustomPayslipEmployerWithHttpInfo($id, $payslipCustomisation, $contentType); + list($response) = $this->updateEmployerWithHttpInfo($id, $contractEmployerRequest, $contentType); return $response; } /** - * Operation updateCustomPayslipEmployerWithHttpInfo + * Operation updateEmployerWithHttpInfo * - * Update Payslip Customisations + * Update an Employer * - * @param string $id The Id of the Employer you want customisations for. (required) - * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCustomPayslipEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to update. (required) + * @param \SynergiTech\Staffology\Model\ContractEmployerRequest|null $contractEmployerRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\PayslipCustomisation, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractEmployerResponse, HTTP status code, HTTP response headers (array of strings) */ - public function updateCustomPayslipEmployerWithHttpInfo( + public function updateEmployerWithHttpInfo( string $id, - ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, - string $contentType = self::contentTypes['updateCustomPayslipEmployer'][0] + ?\SynergiTech\Staffology\Model\ContractEmployerRequest $contractEmployerRequest = null, + string $contentType = self::contentTypes['updateEmployer'][0] ): array { - $request = $this->updateCustomPayslipEmployerRequest($id, $payslipCustomisation, $contentType); + $request = $this->updateEmployerRequest($id, $contractEmployerRequest, $contentType); try { $options = $this->createHttpClientOption(); @@ -8074,36 +8089,15 @@ public function updateCustomPayslipEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayslipCustomisation', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayslipCustomisation' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayslipCustomisation', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployerResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8114,72 +8108,50 @@ public function updateCustomPayslipEmployerWithHttpInfo( ), $statusCode, $response->getHeaders(), - (string) $response->getBody() - ); - } - - $returnType = '\SynergiTech\Staffology\Model\PayslipCustomisation'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } + (string) $response->getBody() + ); } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployerResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\PayslipCustomisation', + '\SynergiTech\Staffology\Model\ContractEmployerResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation updateCustomPayslipEmployerAsync + * Operation updateEmployerAsync * - * Update Payslip Customisations + * Update an Employer * - * @param string $id The Id of the Employer you want customisations for. (required) - * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCustomPayslipEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to update. (required) + * @param \SynergiTech\Staffology\Model\ContractEmployerRequest|null $contractEmployerRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function updateCustomPayslipEmployerAsync( + public function updateEmployerAsync( string $id, - ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, - string $contentType = self::contentTypes['updateCustomPayslipEmployer'][0] + ?\SynergiTech\Staffology\Model\ContractEmployerRequest $contractEmployerRequest = null, + string $contentType = self::contentTypes['updateEmployer'][0] ): PromiseInterface { - return $this->updateCustomPayslipEmployerAsyncWithHttpInfo($id, $payslipCustomisation, $contentType) + return $this->updateEmployerAsyncWithHttpInfo($id, $contractEmployerRequest, $contentType) ->then( function ($response) { return $response[0]; @@ -8188,25 +8160,25 @@ function ($response) { } /** - * Operation updateCustomPayslipEmployerAsyncWithHttpInfo + * Operation updateEmployerAsyncWithHttpInfo * - * Update Payslip Customisations + * Update an Employer * - * @param string $id The Id of the Employer you want customisations for. (required) - * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCustomPayslipEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to update. (required) + * @param \SynergiTech\Staffology\Model\ContractEmployerRequest|null $contractEmployerRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function updateCustomPayslipEmployerAsyncWithHttpInfo( + public function updateEmployerAsyncWithHttpInfo( string $id, - ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, - string $contentType = self::contentTypes['updateCustomPayslipEmployer'][0] + ?\SynergiTech\Staffology\Model\ContractEmployerRequest $contractEmployerRequest = null, + string $contentType = self::contentTypes['updateEmployer'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\PayslipCustomisation'; - $request = $this->updateCustomPayslipEmployerRequest($id, $payslipCustomisation, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ContractEmployerResponse'; + $request = $this->updateEmployerRequest($id, $contractEmployerRequest, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8245,32 +8217,32 @@ function ($exception) { } /** - * Create request for operation 'updateCustomPayslipEmployer' + * Create request for operation 'updateEmployer' * - * @param string $id The Id of the Employer you want customisations for. (required) - * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCustomPayslipEmployer'] to see the possible values for this operation + * @param string $id The Id of the Employer you want to update. (required) + * @param \SynergiTech\Staffology\Model\ContractEmployerRequest|null $contractEmployerRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateCustomPayslipEmployerRequest( + public function updateEmployerRequest( string $id, - ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, - string $contentType = self::contentTypes['updateCustomPayslipEmployer'][0] + ?\SynergiTech\Staffology\Model\ContractEmployerRequest $contractEmployerRequest = null, + string $contentType = self::contentTypes['updateEmployer'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling updateCustomPayslipEmployer' + 'Missing the required parameter $id when calling updateEmployer' ); } - $resourcePath = '/employers/{id}/custompayslip'; + $resourcePath = '/employers/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -8296,12 +8268,12 @@ public function updateCustomPayslipEmployerRequest( ); // for model (json/xml) - if (isset($payslipCustomisation)) { + if (isset($contractEmployerRequest)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payslipCustomisation)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractEmployerRequest)); } else { - $httpBody = $payslipCustomisation; + $httpBody = $contractEmployerRequest; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -8346,7 +8318,7 @@ public function updateCustomPayslipEmployerRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -8354,48 +8326,47 @@ public function updateCustomPayslipEmployerRequest( } /** - * Operation updateEmployer + * Operation updateEmployerCanUsePremiumConnectorsEmployer * - * Update an Employer + * Update Can Use Premium Connectors Setting * * @param string $id The Id of the Employer you want to update. (required) - * @param \SynergiTech\Staffology\Model\ContractEmployerRequest|null $contractEmployerRequest contractEmployerRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployer'] to see the possible values for this operation + * @param bool|null $body body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployerCanUsePremiumConnectorsEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractEmployerResponse + * @return void */ - public function updateEmployer( + public function updateEmployerCanUsePremiumConnectorsEmployer( string $id, - ?\SynergiTech\Staffology\Model\ContractEmployerRequest $contractEmployerRequest = null, - string $contentType = self::contentTypes['updateEmployer'][0] - ): \SynergiTech\Staffology\Model\ContractEmployerResponse + ?bool $body = null, + string $contentType = self::contentTypes['updateEmployerCanUsePremiumConnectorsEmployer'][0] + ): void { - list($response) = $this->updateEmployerWithHttpInfo($id, $contractEmployerRequest, $contentType); - return $response; + $this->updateEmployerCanUsePremiumConnectorsEmployerWithHttpInfo($id, $body, $contentType); } /** - * Operation updateEmployerWithHttpInfo + * Operation updateEmployerCanUsePremiumConnectorsEmployerWithHttpInfo * - * Update an Employer + * Update Can Use Premium Connectors Setting * * @param string $id The Id of the Employer you want to update. (required) - * @param \SynergiTech\Staffology\Model\ContractEmployerRequest|null $contractEmployerRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployer'] to see the possible values for this operation + * @param bool|null $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployerCanUsePremiumConnectorsEmployer'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ContractEmployerResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateEmployerWithHttpInfo( + public function updateEmployerCanUsePremiumConnectorsEmployerWithHttpInfo( string $id, - ?\SynergiTech\Staffology\Model\ContractEmployerRequest $contractEmployerRequest = null, - string $contentType = self::contentTypes['updateEmployer'][0] + ?bool $body = null, + string $contentType = self::contentTypes['updateEmployerCanUsePremiumConnectorsEmployer'][0] ): array { - $request = $this->updateEmployerRequest($id, $contractEmployerRequest, $contentType); + $request = $this->updateEmployerCanUsePremiumConnectorsEmployerRequest($id, $body, $contentType); try { $options = $this->createHttpClientOption(); @@ -8420,111 +8391,34 @@ public function updateEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployerResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployerResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployerResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - $returnType = '\SynergiTech\Staffology\Model\ContractEmployerResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ContractEmployerResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } + throw $e; } } /** - * Operation updateEmployerAsync + * Operation updateEmployerCanUsePremiumConnectorsEmployerAsync * - * Update an Employer + * Update Can Use Premium Connectors Setting * * @param string $id The Id of the Employer you want to update. (required) - * @param \SynergiTech\Staffology\Model\ContractEmployerRequest|null $contractEmployerRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployer'] to see the possible values for this operation + * @param bool|null $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployerCanUsePremiumConnectorsEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function updateEmployerAsync( + public function updateEmployerCanUsePremiumConnectorsEmployerAsync( string $id, - ?\SynergiTech\Staffology\Model\ContractEmployerRequest $contractEmployerRequest = null, - string $contentType = self::contentTypes['updateEmployer'][0] + ?bool $body = null, + string $contentType = self::contentTypes['updateEmployerCanUsePremiumConnectorsEmployer'][0] ): PromiseInterface { - return $this->updateEmployerAsyncWithHttpInfo($id, $contractEmployerRequest, $contentType) + return $this->updateEmployerCanUsePremiumConnectorsEmployerAsyncWithHttpInfo($id, $body, $contentType) ->then( function ($response) { return $response[0]; @@ -8533,44 +8427,31 @@ function ($response) { } /** - * Operation updateEmployerAsyncWithHttpInfo + * Operation updateEmployerCanUsePremiumConnectorsEmployerAsyncWithHttpInfo * - * Update an Employer + * Update Can Use Premium Connectors Setting * * @param string $id The Id of the Employer you want to update. (required) - * @param \SynergiTech\Staffology\Model\ContractEmployerRequest|null $contractEmployerRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployer'] to see the possible values for this operation + * @param bool|null $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployerCanUsePremiumConnectorsEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function updateEmployerAsyncWithHttpInfo( + public function updateEmployerCanUsePremiumConnectorsEmployerAsyncWithHttpInfo( string $id, - ?\SynergiTech\Staffology\Model\ContractEmployerRequest $contractEmployerRequest = null, - string $contentType = self::contentTypes['updateEmployer'][0] + ?bool $body = null, + string $contentType = self::contentTypes['updateEmployerCanUsePremiumConnectorsEmployer'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ContractEmployerResponse'; - $request = $this->updateEmployerRequest($id, $contractEmployerRequest, $contentType); + $returnType = ''; + $request = $this->updateEmployerCanUsePremiumConnectorsEmployerRequest($id, $body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -8590,32 +8471,32 @@ function ($exception) { } /** - * Create request for operation 'updateEmployer' + * Create request for operation 'updateEmployerCanUsePremiumConnectorsEmployer' * * @param string $id The Id of the Employer you want to update. (required) - * @param \SynergiTech\Staffology\Model\ContractEmployerRequest|null $contractEmployerRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployer'] to see the possible values for this operation + * @param bool|null $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEmployerCanUsePremiumConnectorsEmployer'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateEmployerRequest( + public function updateEmployerCanUsePremiumConnectorsEmployerRequest( string $id, - ?\SynergiTech\Staffology\Model\ContractEmployerRequest $contractEmployerRequest = null, - string $contentType = self::contentTypes['updateEmployer'][0] + ?bool $body = null, + string $contentType = self::contentTypes['updateEmployerCanUsePremiumConnectorsEmployer'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling updateEmployer' + 'Missing the required parameter $id when calling updateEmployerCanUsePremiumConnectorsEmployer' ); } - $resourcePath = '/employers/{id}'; + $resourcePath = '/employers/{id}/can-use-premium-connectors'; $formParams = []; $queryParams = []; $headerParams = []; @@ -8635,18 +8516,18 @@ public function updateEmployerRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); // for model (json/xml) - if (isset($contractEmployerRequest)) { + if (isset($body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractEmployerRequest)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); } else { - $httpBody = $contractEmployerRequest; + $httpBody = $body; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -8764,36 +8645,15 @@ public function updateEmployerOpeningBalancesEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerOpeningBalances', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerOpeningBalances' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerOpeningBalances', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerOpeningBalances', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8808,34 +8668,11 @@ public function updateEmployerOpeningBalancesEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerOpeningBalances'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerOpeningBalances', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8845,8 +8682,9 @@ public function updateEmployerOpeningBalancesEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -9109,36 +8947,15 @@ public function updateLogoEmployerWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractEmployerResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractEmployerResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractEmployerResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployerResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9153,34 +8970,11 @@ public function updateLogoEmployerWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractEmployerResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractEmployerResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9190,8 +8984,9 @@ public function updateLogoEmployerWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -9324,19 +9119,14 @@ public function updateLogoEmployerRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -9413,4 +9203,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/EmployerGroupApi.php b/src/Api/EmployerGroupApi.php index 1d69eb2..d2f3e34 100644 --- a/src/Api/EmployerGroupApi.php +++ b/src/Api/EmployerGroupApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class EmployerGroupApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createEmployerGroup' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteEmployerGroup' => [ 'application/json', @@ -88,10 +91,10 @@ class EmployerGroupApi 'application/json', ], 'updateEmployerGroup' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -151,12 +154,12 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployerGroup + * @return \SynergiTech\Staffology\Model\EmployerGroup|null */ public function createEmployerGroup( ?\SynergiTech\Staffology\Model\EmployerGroup $employerGroup = null, string $contentType = self::contentTypes['createEmployerGroup'][0] - ): \SynergiTech\Staffology\Model\EmployerGroup + ): ?\SynergiTech\Staffology\Model\EmployerGroup { list($response) = $this->createEmployerGroupWithHttpInfo($employerGroup, $contentType); return $response; @@ -172,7 +175,7 @@ public function createEmployerGroup( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\EmployerGroup, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\EmployerGroup, HTTP status code, HTTP response headers (array of strings) */ public function createEmployerGroupWithHttpInfo( ?\SynergiTech\Staffology\Model\EmployerGroup $employerGroup = null, @@ -203,36 +206,15 @@ public function createEmployerGroupWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\EmployerGroup', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerGroup' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerGroup', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerGroup', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -247,34 +229,11 @@ public function createEmployerGroupWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerGroup'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerGroup', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -284,8 +243,9 @@ public function createEmployerGroupWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -524,10 +484,10 @@ public function deleteEmployerGroupWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -707,12 +667,12 @@ public function deleteEmployerGroupRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployerGroup + * @return \SynergiTech\Staffology\Model\EmployerGroup|null */ public function getEmployerGroup( string $code, string $contentType = self::contentTypes['getEmployerGroup'][0] - ): \SynergiTech\Staffology\Model\EmployerGroup + ): ?\SynergiTech\Staffology\Model\EmployerGroup { list($response) = $this->getEmployerGroupWithHttpInfo($code, $contentType); return $response; @@ -759,36 +719,15 @@ public function getEmployerGroupWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerGroup', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerGroup' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerGroup', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerGroup', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -803,34 +742,11 @@ public function getEmployerGroupWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerGroup'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerGroup', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -840,8 +756,9 @@ public function getEmployerGroupWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1082,36 +999,15 @@ public function indexEmployerGroupWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1126,34 +1022,11 @@ public function indexEmployerGroupWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1163,8 +1036,9 @@ public function indexEmployerGroupWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1337,13 +1211,13 @@ public function indexEmployerGroupRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployerGroup + * @return \SynergiTech\Staffology\Model\EmployerGroup|null */ public function updateEmployerGroup( string $code, ?\SynergiTech\Staffology\Model\EmployerGroup $employerGroup = null, string $contentType = self::contentTypes['updateEmployerGroup'][0] - ): \SynergiTech\Staffology\Model\EmployerGroup + ): ?\SynergiTech\Staffology\Model\EmployerGroup { list($response) = $this->updateEmployerGroupWithHttpInfo($code, $employerGroup, $contentType); return $response; @@ -1392,36 +1266,15 @@ public function updateEmployerGroupWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerGroup', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerGroup' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerGroup', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerGroup', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1436,34 +1289,11 @@ public function updateEmployerGroupWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerGroup'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerGroup', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1473,8 +1303,9 @@ public function updateEmployerGroupWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1689,4 +1520,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/EmployerTemplateApi.php b/src/Api/EmployerTemplateApi.php index 819d85a..413c116 100644 --- a/src/Api/EmployerTemplateApi.php +++ b/src/Api/EmployerTemplateApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -79,10 +82,10 @@ class EmployerTemplateApi 'application/json', ], 'updateEmployerTemplate' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -198,36 +201,15 @@ public function getEmployerTemplateWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerTemplate', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerTemplate' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerTemplate', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerTemplate', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -242,34 +224,11 @@ public function getEmployerTemplateWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerTemplate'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerTemplate', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -279,8 +238,9 @@ public function getEmployerTemplateWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -546,36 +506,15 @@ public function indexEmployerTemplateWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -590,34 +529,11 @@ public function indexEmployerTemplateWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -627,8 +543,9 @@ public function indexEmployerTemplateWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -881,36 +798,15 @@ public function updateEmployerTemplateWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployerTemplate', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerTemplate' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerTemplate', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerTemplate', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -925,34 +821,11 @@ public function updateEmployerTemplateWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerTemplate'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerTemplate', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -962,8 +835,9 @@ public function updateEmployerTemplateWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1199,4 +1073,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/EngineApi.php b/src/Api/EngineApi.php index 6e8d87b..f03866c 100644 --- a/src/Api/EngineApi.php +++ b/src/Api/EngineApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -209,36 +212,15 @@ public function calculateNiEngineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\NationalInsuranceCalculation', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\NationalInsuranceCalculation' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\NationalInsuranceCalculation', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NationalInsuranceCalculation', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -253,34 +235,11 @@ public function calculateNiEngineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\NationalInsuranceCalculation'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NationalInsuranceCalculation', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -290,8 +249,9 @@ public function calculateNiEngineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -615,36 +575,15 @@ public function calculateTaxEngineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('float', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('float' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'float', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -659,34 +598,11 @@ public function calculateTaxEngineWithHttpInfo( ); } - $returnType = 'float'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -696,8 +612,9 @@ public function calculateTaxEngineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1081,36 +998,15 @@ public function configEngineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\TaxYearConfig', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\TaxYearConfig' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\TaxYearConfig', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\TaxYearConfig', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1125,34 +1021,11 @@ public function configEngineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\TaxYearConfig'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\TaxYearConfig', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1162,8 +1035,9 @@ public function configEngineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1419,36 +1293,15 @@ public function getNationalInsuranceThresholdsEngineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\NationalInsuranceCalculationPeriodValues', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\NationalInsuranceCalculationPeriodValues' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\NationalInsuranceCalculationPeriodValues', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NationalInsuranceCalculationPeriodValues', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1463,34 +1316,11 @@ public function getNationalInsuranceThresholdsEngineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\NationalInsuranceCalculationPeriodValues'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NationalInsuranceCalculationPeriodValues', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1500,8 +1330,9 @@ public function getNationalInsuranceThresholdsEngineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1815,36 +1646,15 @@ public function getTenantBrandingEngineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Tenant', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Tenant' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Tenant', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1859,34 +1669,11 @@ public function getTenantBrandingEngineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Tenant'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1896,8 +1683,9 @@ public function getTenantBrandingEngineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2098,4 +1886,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/EpsApi.php b/src/Api/EpsApi.php index ed84dfc..0c49a38 100644 --- a/src/Api/EpsApi.php +++ b/src/Api/EpsApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -76,10 +79,10 @@ class EpsApi 'application/json', ], 'createEps' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteEps' => [ 'application/json', @@ -106,10 +109,10 @@ class EpsApi 'application/json', ], 'updateEps' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -229,36 +232,15 @@ public function apprenticeshipLevyEpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EpsApprenticeshipLevy', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EpsApprenticeshipLevy' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EpsApprenticeshipLevy', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EpsApprenticeshipLevy', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -273,34 +255,11 @@ public function apprenticeshipLevyEpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EpsApprenticeshipLevy'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EpsApprenticeshipLevy', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -310,8 +269,9 @@ public function apprenticeshipLevyEpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -606,36 +566,15 @@ public function createEpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\Eps', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Eps' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Eps', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Eps', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -650,34 +589,11 @@ public function createEpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Eps'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Eps', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -687,8 +603,9 @@ public function createEpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -977,10 +894,10 @@ public function deleteEpsWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1262,36 +1179,15 @@ public function getEpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Eps', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Eps' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Eps', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Eps', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1306,34 +1202,11 @@ public function getEpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Eps'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Eps', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1343,8 +1216,9 @@ public function getEpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1639,36 +1513,15 @@ public function getXmlRequestEpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('string' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'string', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1683,34 +1536,11 @@ public function getXmlRequestEpsWithHttpInfo( ); } - $returnType = 'string'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1720,8 +1550,9 @@ public function getXmlRequestEpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2012,36 +1843,15 @@ public function listEpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2056,34 +1866,11 @@ public function listEpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2093,8 +1880,9 @@ public function listEpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2368,36 +2156,15 @@ public function markAsAcceptedEpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Eps', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Eps' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Eps', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Eps', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2412,34 +2179,11 @@ public function markAsAcceptedEpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Eps'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Eps', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2449,8 +2193,9 @@ public function markAsAcceptedEpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2745,36 +2490,15 @@ public function recoverableAmountsEpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\RecoverableAmounts', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\RecoverableAmounts' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\RecoverableAmounts', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\RecoverableAmounts', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2789,34 +2513,11 @@ public function recoverableAmountsEpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\RecoverableAmounts'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\RecoverableAmounts', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2826,8 +2527,9 @@ public function recoverableAmountsEpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3114,36 +2816,15 @@ public function requiringAttentionEpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3158,34 +2839,11 @@ public function requiringAttentionEpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3195,8 +2853,9 @@ public function requiringAttentionEpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3453,36 +3112,15 @@ public function submitEpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Eps', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Eps' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Eps', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Eps', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3497,34 +3135,11 @@ public function submitEpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Eps'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Eps', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3534,8 +3149,9 @@ public function submitEpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3850,36 +3466,15 @@ public function updateEpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Eps', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Eps' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Eps', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Eps', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3894,34 +3489,11 @@ public function updateEpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Eps'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Eps', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3931,8 +3503,9 @@ public function updateEpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4189,4 +3762,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/ExbApi.php b/src/Api/ExbApi.php index b222888..c146f9e 100644 --- a/src/Api/ExbApi.php +++ b/src/Api/ExbApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -76,10 +79,10 @@ class ExbApi 'application/json', ], 'createExb' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteExb' => [ 'application/json', @@ -103,10 +106,10 @@ class ExbApi 'application/json', ], 'updateExb' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -222,36 +225,15 @@ public function annualValuesExbWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Exb', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Exb' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Exb', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Exb', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -266,34 +248,11 @@ public function annualValuesExbWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Exb'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Exb', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -303,8 +262,9 @@ public function annualValuesExbWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -578,36 +538,15 @@ public function createExbWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\Eps', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Eps' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Eps', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Eps', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -622,34 +561,11 @@ public function createExbWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Eps'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Eps', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -659,8 +575,9 @@ public function createExbWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -949,10 +866,10 @@ public function deleteExbWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1234,36 +1151,15 @@ public function getExbWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Exb', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Exb' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Exb', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Exb', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1278,34 +1174,11 @@ public function getExbWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Exb'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Exb', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1315,8 +1188,9 @@ public function getExbWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1611,36 +1485,15 @@ public function getXmlRequestExbWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('string' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'string', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1655,34 +1508,11 @@ public function getXmlRequestExbWithHttpInfo( ); } - $returnType = 'string'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1692,8 +1522,9 @@ public function getXmlRequestExbWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1984,36 +1815,15 @@ public function listExbWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2028,34 +1838,11 @@ public function listExbWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2065,8 +1852,9 @@ public function listExbWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2340,36 +2128,15 @@ public function markAsAcceptedExbWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Exb', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Exb' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Exb', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Exb', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2384,34 +2151,11 @@ public function markAsAcceptedExbWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Exb'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Exb', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2421,8 +2165,9 @@ public function markAsAcceptedExbWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2709,36 +2454,15 @@ public function requiringAttentionExbWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2753,34 +2477,11 @@ public function requiringAttentionExbWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2790,8 +2491,9 @@ public function requiringAttentionExbWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3048,36 +2750,15 @@ public function submitExbWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Exb', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Exb' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Exb', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Exb', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3092,34 +2773,11 @@ public function submitExbWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Exb'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Exb', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3129,8 +2787,9 @@ public function submitExbWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3445,36 +3104,15 @@ public function updateExbWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Exb', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Exb' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Exb', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Exb', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3489,34 +3127,11 @@ public function updateExbWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Exb'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Exb', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3526,8 +3141,9 @@ public function updateExbWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3784,4 +3400,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/ExternalDataApi.php b/src/Api/ExternalDataApi.php index 4bd7ac3..d93c346 100644 --- a/src/Api/ExternalDataApi.php +++ b/src/Api/ExternalDataApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -78,6 +81,9 @@ class ExternalDataApi 'companiesExternalData' => [ 'application/json', ], + 'createStackOneSessionTokenExternalData' => [ + 'application/json', + ], 'disconnectExternalData' => [ 'application/json', ], @@ -94,10 +100,10 @@ class ExternalDataApi 'application/json', ], 'importEmployeesExternalData' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'listExternalData' => [ 'application/json', @@ -148,16 +154,16 @@ class ExternalDataApi 'application/json', ], 'setConfigDataExternalData' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'setCredentialsExternalData' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'syncAllEmployeesExternalData' => [ 'application/json', @@ -172,10 +178,10 @@ class ExternalDataApi 'application/json', ], 'updateEmployeeExternalData' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -295,36 +301,15 @@ public function authorizeExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('string' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'string', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -339,34 +324,11 @@ public function authorizeExternalDataWithHttpInfo( ); } - $returnType = 'string'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -376,8 +338,9 @@ public function authorizeExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -663,36 +626,15 @@ public function companiesExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ExternalDataCompany[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ExternalDataCompany[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ExternalDataCompany[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExternalDataCompany[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -707,34 +649,11 @@ public function companiesExternalDataWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ExternalDataCompany[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExternalDataCompany[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -744,8 +663,9 @@ public function companiesExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -949,6 +869,310 @@ public function companiesExternalDataRequest( ); } + /** + * Operation createStackOneSessionTokenExternalData + * + * Get StackOne session token + * + * @param string $employerId The Id of the employer in the external data provider (required) + * @param string[]|null $categories A list of category for the premium connection (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createStackOneSessionTokenExternalData'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return string + */ + public function createStackOneSessionTokenExternalData( + string $employerId, + ?array $categories = null, + string $contentType = self::contentTypes['createStackOneSessionTokenExternalData'][0] + ): string + { + list($response) = $this->createStackOneSessionTokenExternalDataWithHttpInfo($employerId, $categories, $contentType); + return $response; + } + + /** + * Operation createStackOneSessionTokenExternalDataWithHttpInfo + * + * Get StackOne session token + * + * @param string $employerId The Id of the employer in the external data provider (required) + * @param string[]|null $categories A list of category for the premium connection (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createStackOneSessionTokenExternalData'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function createStackOneSessionTokenExternalDataWithHttpInfo( + string $employerId, + ?array $categories = null, + string $contentType = self::contentTypes['createStackOneSessionTokenExternalData'][0] + ): array + { + $request = $this->createStackOneSessionTokenExternalDataRequest($employerId, $categories, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation createStackOneSessionTokenExternalDataAsync + * + * Get StackOne session token + * + * @param string $employerId The Id of the employer in the external data provider (required) + * @param string[]|null $categories A list of category for the premium connection (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createStackOneSessionTokenExternalData'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createStackOneSessionTokenExternalDataAsync( + string $employerId, + ?array $categories = null, + string $contentType = self::contentTypes['createStackOneSessionTokenExternalData'][0] + ): PromiseInterface + { + return $this->createStackOneSessionTokenExternalDataAsyncWithHttpInfo($employerId, $categories, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createStackOneSessionTokenExternalDataAsyncWithHttpInfo + * + * Get StackOne session token + * + * @param string $employerId The Id of the employer in the external data provider (required) + * @param string[]|null $categories A list of category for the premium connection (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createStackOneSessionTokenExternalData'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createStackOneSessionTokenExternalDataAsyncWithHttpInfo( + string $employerId, + ?array $categories = null, + string $contentType = self::contentTypes['createStackOneSessionTokenExternalData'][0] + ): PromiseInterface + { + $returnType = 'string'; + $request = $this->createStackOneSessionTokenExternalDataRequest($employerId, $categories, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createStackOneSessionTokenExternalData' + * + * @param string $employerId The Id of the employer in the external data provider (required) + * @param string[]|null $categories A list of category for the premium connection (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createStackOneSessionTokenExternalData'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createStackOneSessionTokenExternalDataRequest( + string $employerId, + ?array $categories = null, + string $contentType = self::contentTypes['createStackOneSessionTokenExternalData'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling createStackOneSessionTokenExternalData' + ); + } + + + + $resourcePath = '/employers/{employerId}/external-data/create-stackone-session-token'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $categories, + 'categories', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation disconnectExternalData * @@ -1016,10 +1240,10 @@ public function disconnectExternalDataWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1280,36 +1504,15 @@ public function employeeExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ExternalEmployeeMapping', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ExternalEmployeeMapping' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ExternalEmployeeMapping', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExternalEmployeeMapping', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1324,34 +1527,11 @@ public function employeeExternalDataWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ExternalEmployeeMapping'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExternalEmployeeMapping', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1361,8 +1541,9 @@ public function employeeExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1657,36 +1838,15 @@ public function employeeLogsExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\LogEntry[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\LogEntry[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\LogEntry[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\LogEntry[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1701,34 +1861,11 @@ public function employeeLogsExternalDataWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\LogEntry[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\LogEntry[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1738,8 +1875,9 @@ public function employeeLogsExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2030,36 +2168,15 @@ public function employeesExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2074,34 +2191,11 @@ public function employeesExternalDataWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2111,8 +2205,9 @@ public function employeesExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2382,36 +2477,15 @@ public function getConfigDataExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('mixed', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('mixed' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'mixed', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'mixed', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2426,34 +2500,11 @@ public function getConfigDataExternalDataWithHttpInfo( ); } - $returnType = 'mixed'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'mixed', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2463,8 +2514,9 @@ public function getConfigDataExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2680,14 +2732,14 @@ public function getConfigDataExternalDataRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Item[]|null */ public function importEmployeesExternalData( \SynergiTech\Staffology\Model\ExternalDataProviderId $id, string $employerId, ?array $requestBody = null, string $contentType = self::contentTypes['importEmployeesExternalData'][0] - ): array + ): ?array { list($response) = $this->importEmployeesExternalDataWithHttpInfo($id, $employerId, $requestBody, $contentType); return $response; @@ -2738,36 +2790,15 @@ public function importEmployeesExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2782,34 +2813,11 @@ public function importEmployeesExternalDataWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2819,8 +2827,9 @@ public function importEmployeesExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3048,12 +3057,12 @@ public function importEmployeesExternalDataRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ExternalDataProvider[] + * @return \SynergiTech\Staffology\Model\ExternalDataProvider[]|null */ public function listExternalData( string $employerId, string $contentType = self::contentTypes['listExternalData'][0] - ): array + ): ?array { list($response) = $this->listExternalDataWithHttpInfo($employerId, $contentType); return $response; @@ -3069,7 +3078,7 @@ public function listExternalData( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ExternalDataProvider[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ExternalDataProvider[], HTTP status code, HTTP response headers (array of strings) */ public function listExternalDataWithHttpInfo( string $employerId, @@ -3100,36 +3109,15 @@ public function listExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ExternalDataProvider[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ExternalDataProvider[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ExternalDataProvider[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExternalDataProvider[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3137,41 +3125,18 @@ public function listExternalDataWithHttpInfo( '[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - $returnType = '\SynergiTech\Staffology\Model\ExternalDataProvider[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExternalDataProvider[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3181,8 +3146,9 @@ public function listExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3431,36 +3397,15 @@ public function nominalCodesExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3475,34 +3420,11 @@ public function nominalCodesExternalDataWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3512,8 +3434,9 @@ public function nominalCodesExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3803,36 +3726,15 @@ public function pensionContributionsCsvExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('string' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'string', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3847,34 +3749,11 @@ public function pensionContributionsCsvExternalDataWithHttpInfo( ); } - $returnType = 'string'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3884,8 +3763,9 @@ public function pensionContributionsCsvExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4270,36 +4150,15 @@ public function postJournalExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRunJournal', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRunJournal' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRunJournal', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunJournal', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4314,34 +4173,11 @@ public function postJournalExternalDataWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRunJournal'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunJournal', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4351,8 +4187,9 @@ public function postJournalExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4669,6 +4506,7 @@ public function postJournalExternalDataRequest( * @param bool|null $force Set to true if you want to force the payments to be posted even if it already has been (optional) * @param int|null $ordinal ordinal (optional, default to 1) * @param \DateTime|null $paymentDate Optional. If a value is provided then it'll be used in place of the payment date for the payment. (optional) + * @param int|null $version Will indicate what version of the payrun will be the source for the payments. If left empty, will post full pay run payments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPaymentsExternalData'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -4689,10 +4527,11 @@ public function postPaymentsExternalData( ?bool $force = null, ?int $ordinal = 1, ?\DateTime $paymentDate = null, + ?int $version = null, string $contentType = self::contentTypes['postPaymentsExternalData'][0] ): \SynergiTech\Staffology\Model\BankPaymentInstruction { - list($response) = $this->postPaymentsExternalDataWithHttpInfo($id, $employerId, $payPeriod, $periodNumber, $taxYear, $incEmployees, $incHmrc, $incPensions, $incAeos, $incDeductions, $force, $ordinal, $paymentDate, $contentType); + list($response) = $this->postPaymentsExternalDataWithHttpInfo($id, $employerId, $payPeriod, $periodNumber, $taxYear, $incEmployees, $incHmrc, $incPensions, $incAeos, $incDeductions, $force, $ordinal, $paymentDate, $version, $contentType); return $response; } @@ -4714,6 +4553,7 @@ public function postPaymentsExternalData( * @param bool|null $force Set to true if you want to force the payments to be posted even if it already has been (optional) * @param int|null $ordinal (optional, default to 1) * @param \DateTime|null $paymentDate Optional. If a value is provided then it'll be used in place of the payment date for the payment. (optional) + * @param int|null $version Will indicate what version of the payrun will be the source for the payments. If left empty, will post full pay run payments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPaymentsExternalData'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -4734,10 +4574,11 @@ public function postPaymentsExternalDataWithHttpInfo( ?bool $force = null, ?int $ordinal = 1, ?\DateTime $paymentDate = null, + ?int $version = null, string $contentType = self::contentTypes['postPaymentsExternalData'][0] ): array { - $request = $this->postPaymentsExternalDataRequest($id, $employerId, $payPeriod, $periodNumber, $taxYear, $incEmployees, $incHmrc, $incPensions, $incAeos, $incDeductions, $force, $ordinal, $paymentDate, $contentType); + $request = $this->postPaymentsExternalDataRequest($id, $employerId, $payPeriod, $periodNumber, $taxYear, $incEmployees, $incHmrc, $incPensions, $incAeos, $incDeductions, $force, $ordinal, $paymentDate, $version, $contentType); try { $options = $this->createHttpClientOption(); @@ -4761,36 +4602,15 @@ public function postPaymentsExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\BankPaymentInstruction', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\BankPaymentInstruction' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\BankPaymentInstruction', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\BankPaymentInstruction', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4805,34 +4625,11 @@ public function postPaymentsExternalDataWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\BankPaymentInstruction'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\BankPaymentInstruction', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4842,8 +4639,9 @@ public function postPaymentsExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4866,6 +4664,7 @@ public function postPaymentsExternalDataWithHttpInfo( * @param bool|null $force Set to true if you want to force the payments to be posted even if it already has been (optional) * @param int|null $ordinal (optional, default to 1) * @param \DateTime|null $paymentDate Optional. If a value is provided then it'll be used in place of the payment date for the payment. (optional) + * @param int|null $version Will indicate what version of the payrun will be the source for the payments. If left empty, will post full pay run payments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPaymentsExternalData'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -4885,10 +4684,11 @@ public function postPaymentsExternalDataAsync( ?bool $force = null, ?int $ordinal = 1, ?\DateTime $paymentDate = null, + ?int $version = null, string $contentType = self::contentTypes['postPaymentsExternalData'][0] ): PromiseInterface { - return $this->postPaymentsExternalDataAsyncWithHttpInfo($id, $employerId, $payPeriod, $periodNumber, $taxYear, $incEmployees, $incHmrc, $incPensions, $incAeos, $incDeductions, $force, $ordinal, $paymentDate, $contentType) + return $this->postPaymentsExternalDataAsyncWithHttpInfo($id, $employerId, $payPeriod, $periodNumber, $taxYear, $incEmployees, $incHmrc, $incPensions, $incAeos, $incDeductions, $force, $ordinal, $paymentDate, $version, $contentType) ->then( function ($response) { return $response[0]; @@ -4914,6 +4714,7 @@ function ($response) { * @param bool|null $force Set to true if you want to force the payments to be posted even if it already has been (optional) * @param int|null $ordinal (optional, default to 1) * @param \DateTime|null $paymentDate Optional. If a value is provided then it'll be used in place of the payment date for the payment. (optional) + * @param int|null $version Will indicate what version of the payrun will be the source for the payments. If left empty, will post full pay run payments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPaymentsExternalData'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -4933,11 +4734,12 @@ public function postPaymentsExternalDataAsyncWithHttpInfo( ?bool $force = null, ?int $ordinal = 1, ?\DateTime $paymentDate = null, + ?int $version = null, string $contentType = self::contentTypes['postPaymentsExternalData'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\BankPaymentInstruction'; - $request = $this->postPaymentsExternalDataRequest($id, $employerId, $payPeriod, $periodNumber, $taxYear, $incEmployees, $incHmrc, $incPensions, $incAeos, $incDeductions, $force, $ordinal, $paymentDate, $contentType); + $request = $this->postPaymentsExternalDataRequest($id, $employerId, $payPeriod, $periodNumber, $taxYear, $incEmployees, $incHmrc, $incPensions, $incAeos, $incDeductions, $force, $ordinal, $paymentDate, $version, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4991,6 +4793,7 @@ function ($exception) { * @param bool|null $force Set to true if you want to force the payments to be posted even if it already has been (optional) * @param int|null $ordinal (optional, default to 1) * @param \DateTime|null $paymentDate Optional. If a value is provided then it'll be used in place of the payment date for the payment. (optional) + * @param int|null $version Will indicate what version of the payrun will be the source for the payments. If left empty, will post full pay run payments. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postPaymentsExternalData'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -5010,6 +4813,7 @@ public function postPaymentsExternalDataRequest( ?bool $force = null, ?int $ordinal = 1, ?\DateTime $paymentDate = null, + ?int $version = null, string $contentType = self::contentTypes['postPaymentsExternalData'][0] ): Request { @@ -5058,6 +4862,7 @@ public function postPaymentsExternalDataRequest( + $resourcePath = '/employers/{employerId}/external-data/{id}/{taxYear}/{payPeriod}/{periodNumber}/payments'; $formParams = []; $queryParams = []; @@ -5137,6 +4942,15 @@ public function postPaymentsExternalDataRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -5304,36 +5118,15 @@ public function pushEmployeesExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5348,34 +5141,11 @@ public function pushEmployeesExternalDataWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5385,8 +5155,9 @@ public function pushEmployeesExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5665,10 +5436,10 @@ public function pushP11DExternalDataWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -5962,10 +5733,10 @@ public function pushP11DsExternalDataWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -6243,10 +6014,10 @@ public function pushP45ExternalDataWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -6536,10 +6307,10 @@ public function pushP45sExternalDataWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -6869,10 +6640,10 @@ public function pushP60ExternalDataWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -7166,10 +6937,10 @@ public function pushP60sExternalDataWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -7467,10 +7238,10 @@ public function pushPayslipsExternalDataWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -7832,10 +7603,10 @@ public function pushPensionLetterExternalDataWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -8125,10 +7896,10 @@ public function pushPensionLettersExternalDataWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -8386,10 +8157,10 @@ public function respondExternalDataWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -8645,36 +8416,15 @@ public function setConfigDataExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('mixed', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('mixed' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'mixed', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'mixed', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8689,34 +8439,11 @@ public function setConfigDataExternalDataWithHttpInfo( ); } - $returnType = 'mixed'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'mixed', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8726,8 +8453,9 @@ public function setConfigDataExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -9024,10 +8752,10 @@ public function setCredentialsExternalDataWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -9275,13 +9003,13 @@ public function setCredentialsExternalDataRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Item[]|null */ public function syncAllEmployeesExternalData( \SynergiTech\Staffology\Model\ExternalDataProviderId $id, string $employerId, string $contentType = self::contentTypes['syncAllEmployeesExternalData'][0] - ): array + ): ?array { list($response) = $this->syncAllEmployeesExternalDataWithHttpInfo($id, $employerId, $contentType); return $response; @@ -9330,36 +9058,15 @@ public function syncAllEmployeesExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9374,34 +9081,11 @@ public function syncAllEmployeesExternalDataWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9411,8 +9095,9 @@ public function syncAllEmployeesExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -9628,14 +9313,14 @@ public function syncAllEmployeesExternalDataRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item + * @return \SynergiTech\Staffology\Model\Item|null */ public function syncEmployeeExternalData( \SynergiTech\Staffology\Model\ExternalDataProviderId $id, string $employerId, string $employeeId, string $contentType = self::contentTypes['syncEmployeeExternalData'][0] - ): \SynergiTech\Staffology\Model\Item + ): ?\SynergiTech\Staffology\Model\Item { list($response) = $this->syncEmployeeExternalDataWithHttpInfo($id, $employerId, $employeeId, $contentType); return $response; @@ -9686,36 +9371,15 @@ public function syncEmployeeExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9730,34 +9394,11 @@ public function syncEmployeeExternalDataWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9767,8 +9408,9 @@ public function syncEmployeeExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -10076,10 +9718,10 @@ public function syncLeaveExternalDataWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -10423,36 +10065,15 @@ public function timeAndAttendanceExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayOptionsImport[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayOptionsImport[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayOptionsImport[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayOptionsImport[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10467,34 +10088,11 @@ public function timeAndAttendanceExternalDataWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayOptionsImport[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayOptionsImport[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10504,8 +10102,9 @@ public function timeAndAttendanceExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -10754,7 +10353,7 @@ public function timeAndAttendanceExternalDataRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ExternalEmployeeMapping + * @return \SynergiTech\Staffology\Model\ExternalEmployeeMapping|null */ public function updateEmployeeExternalData( \SynergiTech\Staffology\Model\ExternalDataProviderId $id, @@ -10762,7 +10361,7 @@ public function updateEmployeeExternalData( string $employeeId, ?\SynergiTech\Staffology\Model\ExternalEmployeeMapping $externalEmployeeMapping = null, string $contentType = self::contentTypes['updateEmployeeExternalData'][0] - ): \SynergiTech\Staffology\Model\ExternalEmployeeMapping + ): ?\SynergiTech\Staffology\Model\ExternalEmployeeMapping { list($response) = $this->updateEmployeeExternalDataWithHttpInfo($id, $employerId, $employeeId, $externalEmployeeMapping, $contentType); return $response; @@ -10815,36 +10414,15 @@ public function updateEmployeeExternalDataWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ExternalEmployeeMapping', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ExternalEmployeeMapping' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ExternalEmployeeMapping', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExternalEmployeeMapping', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10859,34 +10437,11 @@ public function updateEmployeeExternalDataWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ExternalEmployeeMapping'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExternalEmployeeMapping', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10896,8 +10451,9 @@ public function updateEmployeeExternalDataWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -11154,4 +10710,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/FpsApi.php b/src/Api/FpsApi.php index 3a947e5..3889fd5 100644 --- a/src/Api/FpsApi.php +++ b/src/Api/FpsApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,16 @@ class FpsApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createFps' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', + ], + 'createFpsWithMultipleEmployeesFps' => [ 'application/*+json', + 'application/json', + 'application/json-patch+json', + 'text/json', ], 'deleteFps' => [ 'application/json', @@ -84,6 +93,9 @@ class FpsApi 'getFps' => [ 'application/json', ], + 'getFpsesForEmployeeFps' => [ + 'application/json', + ], 'getXmlRequestFps' => [ 'application/json', ], @@ -96,6 +108,12 @@ class FpsApi 'mostRecentForEmployeeFps' => [ 'application/json', ], + 'mostRecentForEmployeesFps' => [ + 'application/*+json', + 'application/json', + 'application/json-patch+json', + 'text/json', + ], 'requiringAttentionFps' => [ 'application/json', ], @@ -103,10 +121,16 @@ class FpsApi 'application/json', ], 'updateFps' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', + ], + 'updateFpsWithMultipleEmployeesFps' => [ 'application/*+json', + 'application/json', + 'application/json-patch+json', + 'text/json', ], ]; @@ -226,36 +250,15 @@ public function createFpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\Fps', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Fps' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Fps', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -270,34 +273,11 @@ public function createFpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Fps'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -307,8 +287,9 @@ public function createFpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -527,51 +508,52 @@ public function createFpsRequest( } /** - * Operation deleteFps + * Operation createFpsWithMultipleEmployeesFps * - * Delete FPS + * Create FPS with multiple employees * * @param string $employerId employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) - * @param string $id id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Fps|null $fps fps (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFpsWithMultipleEmployeesFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void + * @return \SynergiTech\Staffology\Model\Fps */ - public function deleteFps( + public function createFpsWithMultipleEmployeesFps( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, - string $contentType = self::contentTypes['deleteFps'][0] - ): void + ?\SynergiTech\Staffology\Model\Fps $fps = null, + string $contentType = self::contentTypes['createFpsWithMultipleEmployeesFps'][0] + ): \SynergiTech\Staffology\Model\Fps { - $this->deleteFpsWithHttpInfo($employerId, $taxYear, $id, $contentType); + list($response) = $this->createFpsWithMultipleEmployeesFpsWithHttpInfo($employerId, $taxYear, $fps, $contentType); + return $response; } /** - * Operation deleteFpsWithHttpInfo + * Operation createFpsWithMultipleEmployeesFpsWithHttpInfo * - * Delete FPS + * Create FPS with multiple employees * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Fps|null $fps (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFpsWithMultipleEmployeesFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Fps, HTTP status code, HTTP response headers (array of strings) */ - public function deleteFpsWithHttpInfo( + public function createFpsWithMultipleEmployeesFpsWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, - string $contentType = self::contentTypes['deleteFps'][0] + ?\SynergiTech\Staffology\Model\Fps $fps = null, + string $contentType = self::contentTypes['createFpsWithMultipleEmployeesFps'][0] ): array { - $request = $this->deleteFpsRequest($employerId, $taxYear, $id, $contentType); + $request = $this->createFpsWithMultipleEmployeesFpsRequest($employerId, $taxYear, $fps, $contentType); try { $options = $this->createHttpClientOption(); @@ -595,37 +577,71 @@ public function deleteFpsWithHttpInfo( $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 201: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); + } + - return [null, $statusCode, $response->getHeaders()]; + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\Fps', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } /** - * Operation deleteFpsAsync + * Operation createFpsWithMultipleEmployeesFpsAsync * - * Delete FPS + * Create FPS with multiple employees * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Fps|null $fps (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFpsWithMultipleEmployeesFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function deleteFpsAsync( + public function createFpsWithMultipleEmployeesFpsAsync( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, - string $contentType = self::contentTypes['deleteFps'][0] + ?\SynergiTech\Staffology\Model\Fps $fps = null, + string $contentType = self::contentTypes['createFpsWithMultipleEmployeesFps'][0] ): PromiseInterface { - return $this->deleteFpsAsyncWithHttpInfo($employerId, $taxYear, $id, $contentType) + return $this->createFpsWithMultipleEmployeesFpsAsyncWithHttpInfo($employerId, $taxYear, $fps, $contentType) ->then( function ($response) { return $response[0]; @@ -634,33 +650,46 @@ function ($response) { } /** - * Operation deleteFpsAsyncWithHttpInfo + * Operation createFpsWithMultipleEmployeesFpsAsyncWithHttpInfo * - * Delete FPS + * Create FPS with multiple employees * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Fps|null $fps (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFpsWithMultipleEmployeesFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function deleteFpsAsyncWithHttpInfo( + public function createFpsWithMultipleEmployeesFpsAsyncWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, - string $contentType = self::contentTypes['deleteFps'][0] + ?\SynergiTech\Staffology\Model\Fps $fps = null, + string $contentType = self::contentTypes['createFpsWithMultipleEmployeesFps'][0] ): PromiseInterface { - $returnType = ''; - $request = $this->deleteFpsRequest($employerId, $taxYear, $id, $contentType); + $returnType = '\SynergiTech\Staffology\Model\Fps'; + $request = $this->createFpsWithMultipleEmployeesFpsRequest($employerId, $taxYear, $fps, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -680,47 +709,41 @@ function ($exception) { } /** - * Create request for operation 'deleteFps' + * Create request for operation 'createFpsWithMultipleEmployeesFps' * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Fps|null $fps (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFpsWithMultipleEmployeesFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteFpsRequest( + public function createFpsWithMultipleEmployeesFpsRequest( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, - string $contentType = self::contentTypes['deleteFps'][0] + ?\SynergiTech\Staffology\Model\Fps $fps = null, + string $contentType = self::contentTypes['createFpsWithMultipleEmployeesFps'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling deleteFps' + 'Missing the required parameter $employerId when calling createFpsWithMultipleEmployeesFps' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling deleteFps' + 'Missing the required parameter $taxYear when calling createFpsWithMultipleEmployeesFps' ); } - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $id when calling deleteFps' - ); - } - $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/{id}'; + $resourcePath = '/employers/{employerId}/rti/fps/multiple/{taxYear}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -745,24 +768,23 @@ public function deleteFpsRequest( $resourcePath ); } - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( - [], + ['application/json', ], $contentType, $multipart ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($fps)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($fps)); + } else { + $httpBody = $fps; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -805,7 +827,7 @@ public function deleteFpsRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'DELETE', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -813,52 +835,51 @@ public function deleteFpsRequest( } /** - * Operation getFps + * Operation deleteFps * - * Get FPS + * Delete FPS * * @param string $employerId employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param string $id id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Fps + * @return void */ - public function getFps( + public function deleteFps( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - string $contentType = self::contentTypes['getFps'][0] - ): \SynergiTech\Staffology\Model\Fps + string $contentType = self::contentTypes['deleteFps'][0] + ): void { - list($response) = $this->getFpsWithHttpInfo($employerId, $taxYear, $id, $contentType); - return $response; + $this->deleteFpsWithHttpInfo($employerId, $taxYear, $id, $contentType); } /** - * Operation getFpsWithHttpInfo + * Operation deleteFpsWithHttpInfo * - * Get FPS + * Delete FPS * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\Fps, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function getFpsWithHttpInfo( + public function deleteFpsWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - string $contentType = self::contentTypes['getFps'][0] + string $contentType = self::contentTypes['deleteFps'][0] ): array { - $request = $this->getFpsRequest($employerId, $taxYear, $id, $contentType); + $request = $this->deleteFpsRequest($employerId, $taxYear, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -883,113 +904,36 @@ public function getFpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - if (in_array('\SynergiTech\Staffology\Model\Fps', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Fps' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Fps', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - $returnType = '\SynergiTech\Staffology\Model\Fps'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SynergiTech\Staffology\Model\Fps', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } + throw $e; } } /** - * Operation getFpsAsync + * Operation deleteFpsAsync * - * Get FPS + * Delete FPS * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getFpsAsync( + public function deleteFpsAsync( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - string $contentType = self::contentTypes['getFps'][0] + string $contentType = self::contentTypes['deleteFps'][0] ): PromiseInterface { - return $this->getFpsAsyncWithHttpInfo($employerId, $taxYear, $id, $contentType) + return $this->deleteFpsAsyncWithHttpInfo($employerId, $taxYear, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -998,46 +942,33 @@ function ($response) { } /** - * Operation getFpsAsyncWithHttpInfo + * Operation deleteFpsAsyncWithHttpInfo * - * Get FPS + * Delete FPS * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getFpsAsyncWithHttpInfo( + public function deleteFpsAsyncWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - string $contentType = self::contentTypes['getFps'][0] + string $contentType = self::contentTypes['deleteFps'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\Fps'; - $request = $this->getFpsRequest($employerId, $taxYear, $id, $contentType); + $returnType = ''; + $request = $this->deleteFpsRequest($employerId, $taxYear, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -1057,42 +988,42 @@ function ($exception) { } /** - * Create request for operation 'getFps' + * Create request for operation 'deleteFps' * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getFpsRequest( + public function deleteFpsRequest( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - string $contentType = self::contentTypes['getFps'][0] + string $contentType = self::contentTypes['deleteFps'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling getFps' + 'Missing the required parameter $employerId when calling deleteFps' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling getFps' + 'Missing the required parameter $taxYear when calling deleteFps' ); } // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling getFps' + 'Missing the required parameter $id when calling deleteFps' ); } @@ -1133,7 +1064,7 @@ public function getFpsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + [], $contentType, $multipart ); @@ -1182,7 +1113,7 @@ public function getFpsRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -1190,56 +1121,52 @@ public function getFpsRequest( } /** - * Operation getXmlRequestFps + * Operation getFps * - * Get XML Request + * Get FPS * * @param string $employerId employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param string $id id (required) - * @param bool|null $compressed Indicates whether the FPS XML should be in compressed format. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getXmlRequestFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return string + * @return \SynergiTech\Staffology\Model\Fps */ - public function getXmlRequestFps( + public function getFps( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - ?bool $compressed = false, - string $contentType = self::contentTypes['getXmlRequestFps'][0] - ): string + string $contentType = self::contentTypes['getFps'][0] + ): \SynergiTech\Staffology\Model\Fps { - list($response) = $this->getXmlRequestFpsWithHttpInfo($employerId, $taxYear, $id, $compressed, $contentType); + list($response) = $this->getFpsWithHttpInfo($employerId, $taxYear, $id, $contentType); return $response; } /** - * Operation getXmlRequestFpsWithHttpInfo + * Operation getFpsWithHttpInfo * - * Get XML Request + * Get FPS * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param bool|null $compressed Indicates whether the FPS XML should be in compressed format. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getXmlRequestFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of string, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Fps, HTTP status code, HTTP response headers (array of strings) */ - public function getXmlRequestFpsWithHttpInfo( + public function getFpsWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - ?bool $compressed = false, - string $contentType = self::contentTypes['getXmlRequestFps'][0] + string $contentType = self::contentTypes['getFps'][0] ): array { - $request = $this->getXmlRequestFpsRequest($employerId, $taxYear, $id, $compressed, $contentType); + $request = $this->getFpsRequest($employerId, $taxYear, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1263,36 +1190,15 @@ public function getXmlRequestFpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('string' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'string', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1307,72 +1213,48 @@ public function getXmlRequestFpsWithHttpInfo( ); } - $returnType = 'string'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'string', + '\SynergiTech\Staffology\Model\Fps', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getXmlRequestFpsAsync + * Operation getFpsAsync * - * Get XML Request + * Get FPS * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param bool|null $compressed Indicates whether the FPS XML should be in compressed format. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getXmlRequestFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getXmlRequestFpsAsync( + public function getFpsAsync( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - ?bool $compressed = false, - string $contentType = self::contentTypes['getXmlRequestFps'][0] + string $contentType = self::contentTypes['getFps'][0] ): PromiseInterface { - return $this->getXmlRequestFpsAsyncWithHttpInfo($employerId, $taxYear, $id, $compressed, $contentType) + return $this->getFpsAsyncWithHttpInfo($employerId, $taxYear, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -1381,29 +1263,27 @@ function ($response) { } /** - * Operation getXmlRequestFpsAsyncWithHttpInfo + * Operation getFpsAsyncWithHttpInfo * - * Get XML Request + * Get FPS * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param bool|null $compressed Indicates whether the FPS XML should be in compressed format. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getXmlRequestFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getXmlRequestFpsAsyncWithHttpInfo( + public function getFpsAsyncWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - ?bool $compressed = false, - string $contentType = self::contentTypes['getXmlRequestFps'][0] + string $contentType = self::contentTypes['getFps'][0] ): PromiseInterface { - $returnType = 'string'; - $request = $this->getXmlRequestFpsRequest($employerId, $taxYear, $id, $compressed, $contentType); + $returnType = '\SynergiTech\Staffology\Model\Fps'; + $request = $this->getFpsRequest($employerId, $taxYear, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1442,65 +1322,53 @@ function ($exception) { } /** - * Create request for operation 'getXmlRequestFps' + * Create request for operation 'getFps' * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param bool|null $compressed Indicates whether the FPS XML should be in compressed format. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getXmlRequestFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getXmlRequestFpsRequest( + public function getFpsRequest( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - ?bool $compressed = false, - string $contentType = self::contentTypes['getXmlRequestFps'][0] + string $contentType = self::contentTypes['getFps'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling getXmlRequestFps' + 'Missing the required parameter $employerId when calling getFps' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling getXmlRequestFps' + 'Missing the required parameter $taxYear when calling getFps' ); } // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling getXmlRequestFps' + 'Missing the required parameter $id when calling getFps' ); } - - $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/{id}/xml/request'; + $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/{id}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $compressed, - 'compressed', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -1587,48 +1455,52 @@ public function getXmlRequestFpsRequest( } /** - * Operation listFps + * Operation getFpsesForEmployeeFps * - * List FPS + * Get all FPS for Employee * * @param string $employerId employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFps'] to see the possible values for this operation + * @param string $employeeId employeeId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFpsesForEmployeeFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Fps[]|null */ - public function listFps( + public function getFpsesForEmployeeFps( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $contentType = self::contentTypes['listFps'][0] - ): array + string $employeeId, + string $contentType = self::contentTypes['getFpsesForEmployeeFps'][0] + ): ?array { - list($response) = $this->listFpsWithHttpInfo($employerId, $taxYear, $contentType); + list($response) = $this->getFpsesForEmployeeFpsWithHttpInfo($employerId, $taxYear, $employeeId, $contentType); return $response; } /** - * Operation listFpsWithHttpInfo + * Operation getFpsesForEmployeeFpsWithHttpInfo * - * List FPS + * Get all FPS for Employee * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFps'] to see the possible values for this operation + * @param string $employeeId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFpsesForEmployeeFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Fps[], HTTP status code, HTTP response headers (array of strings) */ - public function listFpsWithHttpInfo( + public function getFpsesForEmployeeFpsWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $contentType = self::contentTypes['listFps'][0] + string $employeeId, + string $contentType = self::contentTypes['getFpsesForEmployeeFps'][0] ): array { - $request = $this->listFpsRequest($employerId, $taxYear, $contentType); + $request = $this->getFpsesForEmployeeFpsRequest($employerId, $taxYear, $employeeId, $contentType); try { $options = $this->createHttpClientOption(); @@ -1652,36 +1524,15 @@ public function listFpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1696,68 +1547,48 @@ public function listFpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\Item[]', + '\SynergiTech\Staffology\Model\Fps[]', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation listFpsAsync + * Operation getFpsesForEmployeeFpsAsync * - * List FPS + * Get all FPS for Employee * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFps'] to see the possible values for this operation + * @param string $employeeId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFpsesForEmployeeFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function listFpsAsync( + public function getFpsesForEmployeeFpsAsync( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $contentType = self::contentTypes['listFps'][0] + string $employeeId, + string $contentType = self::contentTypes['getFpsesForEmployeeFps'][0] ): PromiseInterface { - return $this->listFpsAsyncWithHttpInfo($employerId, $taxYear, $contentType) + return $this->getFpsesForEmployeeFpsAsyncWithHttpInfo($employerId, $taxYear, $employeeId, $contentType) ->then( function ($response) { return $response[0]; @@ -1766,25 +1597,27 @@ function ($response) { } /** - * Operation listFpsAsyncWithHttpInfo + * Operation getFpsesForEmployeeFpsAsyncWithHttpInfo * - * List FPS + * Get all FPS for Employee * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFps'] to see the possible values for this operation + * @param string $employeeId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFpsesForEmployeeFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function listFpsAsyncWithHttpInfo( + public function getFpsesForEmployeeFpsAsyncWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $contentType = self::contentTypes['listFps'][0] + string $employeeId, + string $contentType = self::contentTypes['getFpsesForEmployeeFps'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->listFpsRequest($employerId, $taxYear, $contentType); + $returnType = '\SynergiTech\Staffology\Model\Fps[]'; + $request = $this->getFpsesForEmployeeFpsRequest($employerId, $taxYear, $employeeId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1823,38 +1656,47 @@ function ($exception) { } /** - * Create request for operation 'listFps' + * Create request for operation 'getFpsesForEmployeeFps' * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFps'] to see the possible values for this operation + * @param string $employeeId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFpsesForEmployeeFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listFpsRequest( + public function getFpsesForEmployeeFpsRequest( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $contentType = self::contentTypes['listFps'][0] + string $employeeId, + string $contentType = self::contentTypes['getFpsesForEmployeeFps'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling listFps' + 'Missing the required parameter $employerId when calling getFpsesForEmployeeFps' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling listFps' + 'Missing the required parameter $taxYear when calling getFpsesForEmployeeFps' ); } + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling getFpsesForEmployeeFps' + ); + } - $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}'; + + $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/employee/{employeeId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1879,6 +1721,14 @@ public function listFpsRequest( $resourcePath ); } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -1939,52 +1789,56 @@ public function listFpsRequest( } /** - * Operation markAsAcceptedFps + * Operation getXmlRequestFps * - * Mark as Sent + * Get XML Request * * @param string $employerId employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param string $id id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAsAcceptedFps'] to see the possible values for this operation + * @param bool|null $compressed Indicates whether the FPS XML should be in compressed format. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getXmlRequestFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Fps + * @return string */ - public function markAsAcceptedFps( + public function getXmlRequestFps( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - string $contentType = self::contentTypes['markAsAcceptedFps'][0] - ): \SynergiTech\Staffology\Model\Fps - { - list($response) = $this->markAsAcceptedFpsWithHttpInfo($employerId, $taxYear, $id, $contentType); + ?bool $compressed = false, + string $contentType = self::contentTypes['getXmlRequestFps'][0] + ): string + { + list($response) = $this->getXmlRequestFpsWithHttpInfo($employerId, $taxYear, $id, $compressed, $contentType); return $response; } /** - * Operation markAsAcceptedFpsWithHttpInfo + * Operation getXmlRequestFpsWithHttpInfo * - * Mark as Sent + * Get XML Request * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAsAcceptedFps'] to see the possible values for this operation + * @param bool|null $compressed Indicates whether the FPS XML should be in compressed format. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getXmlRequestFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\Fps, HTTP status code, HTTP response headers (array of strings) + * @return array of string, HTTP status code, HTTP response headers (array of strings) */ - public function markAsAcceptedFpsWithHttpInfo( + public function getXmlRequestFpsWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - string $contentType = self::contentTypes['markAsAcceptedFps'][0] + ?bool $compressed = false, + string $contentType = self::contentTypes['getXmlRequestFps'][0] ): array { - $request = $this->markAsAcceptedFpsRequest($employerId, $taxYear, $id, $contentType); + $request = $this->getXmlRequestFpsRequest($employerId, $taxYear, $id, $compressed, $contentType); try { $options = $this->createHttpClientOption(); @@ -2008,36 +1862,15 @@ public function markAsAcceptedFpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Fps', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Fps' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Fps', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2052,70 +1885,50 @@ public function markAsAcceptedFpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Fps'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\Fps', + 'string', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation markAsAcceptedFpsAsync + * Operation getXmlRequestFpsAsync * - * Mark as Sent + * Get XML Request * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAsAcceptedFps'] to see the possible values for this operation + * @param bool|null $compressed Indicates whether the FPS XML should be in compressed format. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getXmlRequestFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function markAsAcceptedFpsAsync( + public function getXmlRequestFpsAsync( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - string $contentType = self::contentTypes['markAsAcceptedFps'][0] + ?bool $compressed = false, + string $contentType = self::contentTypes['getXmlRequestFps'][0] ): PromiseInterface { - return $this->markAsAcceptedFpsAsyncWithHttpInfo($employerId, $taxYear, $id, $contentType) + return $this->getXmlRequestFpsAsyncWithHttpInfo($employerId, $taxYear, $id, $compressed, $contentType) ->then( function ($response) { return $response[0]; @@ -2124,27 +1937,29 @@ function ($response) { } /** - * Operation markAsAcceptedFpsAsyncWithHttpInfo + * Operation getXmlRequestFpsAsyncWithHttpInfo * - * Mark as Sent + * Get XML Request * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAsAcceptedFps'] to see the possible values for this operation + * @param bool|null $compressed Indicates whether the FPS XML should be in compressed format. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getXmlRequestFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function markAsAcceptedFpsAsyncWithHttpInfo( + public function getXmlRequestFpsAsyncWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - string $contentType = self::contentTypes['markAsAcceptedFps'][0] + ?bool $compressed = false, + string $contentType = self::contentTypes['getXmlRequestFps'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\Fps'; - $request = $this->markAsAcceptedFpsRequest($employerId, $taxYear, $id, $contentType); + $returnType = 'string'; + $request = $this->getXmlRequestFpsRequest($employerId, $taxYear, $id, $compressed, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2183,53 +1998,65 @@ function ($exception) { } /** - * Create request for operation 'markAsAcceptedFps' + * Create request for operation 'getXmlRequestFps' * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAsAcceptedFps'] to see the possible values for this operation + * @param bool|null $compressed Indicates whether the FPS XML should be in compressed format. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getXmlRequestFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function markAsAcceptedFpsRequest( + public function getXmlRequestFpsRequest( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - string $contentType = self::contentTypes['markAsAcceptedFps'][0] + ?bool $compressed = false, + string $contentType = self::contentTypes['getXmlRequestFps'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling markAsAcceptedFps' + 'Missing the required parameter $employerId when calling getXmlRequestFps' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling markAsAcceptedFps' + 'Missing the required parameter $taxYear when calling getXmlRequestFps' ); } // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling markAsAcceptedFps' + 'Missing the required parameter $id when calling getXmlRequestFps' ); } - $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/{id}/markasaccepted'; + + $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/{id}/xml/request'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $compressed, + 'compressed', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -2308,7 +2135,7 @@ public function markAsAcceptedFpsRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -2316,56 +2143,48 @@ public function markAsAcceptedFpsRequest( } /** - * Operation mostRecentForEmployeeFps + * Operation listFps * - * Get most recent FPS for Employee + * List FPS * * @param string $employerId employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) - * @param string $employeeId employeeId (required) - * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeeFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item + * @return \SynergiTech\Staffology\Model\Item[] */ - public function mostRecentForEmployeeFps( + public function listFps( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $employeeId, - ?bool $correction = false, - string $contentType = self::contentTypes['mostRecentForEmployeeFps'][0] - ): \SynergiTech\Staffology\Model\Item + string $contentType = self::contentTypes['listFps'][0] + ): array { - list($response) = $this->mostRecentForEmployeeFpsWithHttpInfo($employerId, $taxYear, $employeeId, $correction, $contentType); + list($response) = $this->listFpsWithHttpInfo($employerId, $taxYear, $contentType); return $response; } /** - * Operation mostRecentForEmployeeFpsWithHttpInfo + * Operation listFpsWithHttpInfo * - * Get most recent FPS for Employee + * List FPS * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $employeeId (required) - * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeeFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\Item, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ - public function mostRecentForEmployeeFpsWithHttpInfo( + public function listFpsWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $employeeId, - ?bool $correction = false, - string $contentType = self::contentTypes['mostRecentForEmployeeFps'][0] + string $contentType = self::contentTypes['listFps'][0] ): array { - $request = $this->mostRecentForEmployeeFpsRequest($employerId, $taxYear, $employeeId, $correction, $contentType); + $request = $this->listFpsRequest($employerId, $taxYear, $contentType); try { $options = $this->createHttpClientOption(); @@ -2389,36 +2208,15 @@ public function mostRecentForEmployeeFpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2433,72 +2231,46 @@ public function mostRecentForEmployeeFpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\Item', + '\SynergiTech\Staffology\Model\Item[]', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation mostRecentForEmployeeFpsAsync + * Operation listFpsAsync * - * Get most recent FPS for Employee + * List FPS * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $employeeId (required) - * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeeFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function mostRecentForEmployeeFpsAsync( + public function listFpsAsync( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $employeeId, - ?bool $correction = false, - string $contentType = self::contentTypes['mostRecentForEmployeeFps'][0] + string $contentType = self::contentTypes['listFps'][0] ): PromiseInterface { - return $this->mostRecentForEmployeeFpsAsyncWithHttpInfo($employerId, $taxYear, $employeeId, $correction, $contentType) + return $this->listFpsAsyncWithHttpInfo($employerId, $taxYear, $contentType) ->then( function ($response) { return $response[0]; @@ -2507,29 +2279,25 @@ function ($response) { } /** - * Operation mostRecentForEmployeeFpsAsyncWithHttpInfo + * Operation listFpsAsyncWithHttpInfo * - * Get most recent FPS for Employee + * List FPS * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $employeeId (required) - * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeeFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function mostRecentForEmployeeFpsAsyncWithHttpInfo( + public function listFpsAsyncWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $employeeId, - ?bool $correction = false, - string $contentType = self::contentTypes['mostRecentForEmployeeFps'][0] + string $contentType = self::contentTypes['listFps'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\Item'; - $request = $this->mostRecentForEmployeeFpsRequest($employerId, $taxYear, $employeeId, $correction, $contentType); + $returnType = '\SynergiTech\Staffology\Model\Item[]'; + $request = $this->listFpsRequest($employerId, $taxYear, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2568,65 +2336,44 @@ function ($exception) { } /** - * Create request for operation 'mostRecentForEmployeeFps' + * Create request for operation 'listFps' * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $employeeId (required) - * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeeFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function mostRecentForEmployeeFpsRequest( + public function listFpsRequest( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $employeeId, - ?bool $correction = false, - string $contentType = self::contentTypes['mostRecentForEmployeeFps'][0] + string $contentType = self::contentTypes['listFps'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling mostRecentForEmployeeFps' + 'Missing the required parameter $employerId when calling listFps' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling mostRecentForEmployeeFps' - ); - } - - // verify the required parameter 'employeeId' is set - if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $employeeId when calling mostRecentForEmployeeFps' + 'Missing the required parameter $taxYear when calling listFps' ); } - - $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/mostrecentforemployee/{employeeId}'; + $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $correction, - 'correction', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -2645,14 +2392,6 @@ public function mostRecentForEmployeeFpsRequest( $resourcePath ); } - // path params - if ($employeeId !== null) { - $resourcePath = str_replace( - '{' . 'employeeId' . '}', - ObjectSerializer::toPathValue($employeeId), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -2713,44 +2452,52 @@ public function mostRecentForEmployeeFpsRequest( } /** - * Operation requiringAttentionFps + * Operation markAsAcceptedFps * - * FPS Requiring Attention + * Mark as Sent * * @param string $employerId employerId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requiringAttentionFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) + * @param string $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAsAcceptedFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Fps */ - public function requiringAttentionFps( + public function markAsAcceptedFps( string $employerId, - string $contentType = self::contentTypes['requiringAttentionFps'][0] - ): array - { - list($response) = $this->requiringAttentionFpsWithHttpInfo($employerId, $contentType); + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + string $contentType = self::contentTypes['markAsAcceptedFps'][0] + ): \SynergiTech\Staffology\Model\Fps + { + list($response) = $this->markAsAcceptedFpsWithHttpInfo($employerId, $taxYear, $id, $contentType); return $response; } /** - * Operation requiringAttentionFpsWithHttpInfo + * Operation markAsAcceptedFpsWithHttpInfo * - * FPS Requiring Attention + * Mark as Sent * * @param string $employerId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requiringAttentionFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAsAcceptedFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Fps, HTTP status code, HTTP response headers (array of strings) */ - public function requiringAttentionFpsWithHttpInfo( + public function markAsAcceptedFpsWithHttpInfo( string $employerId, - string $contentType = self::contentTypes['requiringAttentionFps'][0] + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + string $contentType = self::contentTypes['markAsAcceptedFps'][0] ): array { - $request = $this->requiringAttentionFpsRequest($employerId, $contentType); + $request = $this->markAsAcceptedFpsRequest($employerId, $taxYear, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -2774,36 +2521,15 @@ public function requiringAttentionFpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2818,66 +2544,48 @@ public function requiringAttentionFpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\Item[]', + '\SynergiTech\Staffology\Model\Fps', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation requiringAttentionFpsAsync + * Operation markAsAcceptedFpsAsync * - * FPS Requiring Attention + * Mark as Sent * * @param string $employerId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requiringAttentionFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAsAcceptedFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function requiringAttentionFpsAsync( + public function markAsAcceptedFpsAsync( string $employerId, - string $contentType = self::contentTypes['requiringAttentionFps'][0] + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + string $contentType = self::contentTypes['markAsAcceptedFps'][0] ): PromiseInterface { - return $this->requiringAttentionFpsAsyncWithHttpInfo($employerId, $contentType) + return $this->markAsAcceptedFpsAsyncWithHttpInfo($employerId, $taxYear, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -2886,23 +2594,1354 @@ function ($response) { } /** - * Operation requiringAttentionFpsAsyncWithHttpInfo + * Operation markAsAcceptedFpsAsyncWithHttpInfo * - * FPS Requiring Attention + * Mark as Sent * * @param string $employerId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requiringAttentionFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAsAcceptedFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function requiringAttentionFpsAsyncWithHttpInfo( + public function markAsAcceptedFpsAsyncWithHttpInfo( string $employerId, - string $contentType = self::contentTypes['requiringAttentionFps'][0] + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + string $contentType = self::contentTypes['markAsAcceptedFps'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->requiringAttentionFpsRequest($employerId, $contentType); + $returnType = '\SynergiTech\Staffology\Model\Fps'; + $request = $this->markAsAcceptedFpsRequest($employerId, $taxYear, $id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'markAsAcceptedFps' + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['markAsAcceptedFps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function markAsAcceptedFpsRequest( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + string $contentType = self::contentTypes['markAsAcceptedFps'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling markAsAcceptedFps' + ); + } + + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling markAsAcceptedFps' + ); + } + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling markAsAcceptedFps' + ); + } + + + $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/{id}/markasaccepted'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation mostRecentForEmployeeFps + * + * Get most recent FPS for Employee + * + * @param string $employerId employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) + * @param string $employeeId employeeId (required) + * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeeFps'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\Item|null + */ + public function mostRecentForEmployeeFps( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $employeeId, + ?bool $correction = false, + string $contentType = self::contentTypes['mostRecentForEmployeeFps'][0] + ): ?\SynergiTech\Staffology\Model\Item + { + list($response) = $this->mostRecentForEmployeeFpsWithHttpInfo($employerId, $taxYear, $employeeId, $correction, $contentType); + return $response; + } + + /** + * Operation mostRecentForEmployeeFpsWithHttpInfo + * + * Get most recent FPS for Employee + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $employeeId (required) + * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeeFps'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\Item, HTTP status code, HTTP response headers (array of strings) + */ + public function mostRecentForEmployeeFpsWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $employeeId, + ?bool $correction = false, + string $contentType = self::contentTypes['mostRecentForEmployeeFps'][0] + ): array + { + $request = $this->mostRecentForEmployeeFpsRequest($employerId, $taxYear, $employeeId, $correction, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\Item', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation mostRecentForEmployeeFpsAsync + * + * Get most recent FPS for Employee + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $employeeId (required) + * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeeFps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function mostRecentForEmployeeFpsAsync( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $employeeId, + ?bool $correction = false, + string $contentType = self::contentTypes['mostRecentForEmployeeFps'][0] + ): PromiseInterface + { + return $this->mostRecentForEmployeeFpsAsyncWithHttpInfo($employerId, $taxYear, $employeeId, $correction, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation mostRecentForEmployeeFpsAsyncWithHttpInfo + * + * Get most recent FPS for Employee + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $employeeId (required) + * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeeFps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function mostRecentForEmployeeFpsAsyncWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $employeeId, + ?bool $correction = false, + string $contentType = self::contentTypes['mostRecentForEmployeeFps'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\Item'; + $request = $this->mostRecentForEmployeeFpsRequest($employerId, $taxYear, $employeeId, $correction, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'mostRecentForEmployeeFps' + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $employeeId (required) + * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeeFps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function mostRecentForEmployeeFpsRequest( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $employeeId, + ?bool $correction = false, + string $contentType = self::contentTypes['mostRecentForEmployeeFps'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling mostRecentForEmployeeFps' + ); + } + + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling mostRecentForEmployeeFps' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling mostRecentForEmployeeFps' + ); + } + + + + $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/mostrecentforemployee/{employeeId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $correction, + 'correction', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation mostRecentForEmployeesFps + * + * Get most recent FPS for Employees + * + * @param string $employerId employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) + * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) + * @param string[]|null $requestBody requestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeesFps'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\Fps[]|null + */ + public function mostRecentForEmployeesFps( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?bool $correction = false, + ?array $requestBody = null, + string $contentType = self::contentTypes['mostRecentForEmployeesFps'][0] + ): ?array + { + list($response) = $this->mostRecentForEmployeesFpsWithHttpInfo($employerId, $taxYear, $correction, $requestBody, $contentType); + return $response; + } + + /** + * Operation mostRecentForEmployeesFpsWithHttpInfo + * + * Get most recent FPS for Employees + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) + * @param string[]|null $requestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeesFps'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\Fps[], HTTP status code, HTTP response headers (array of strings) + */ + public function mostRecentForEmployeesFpsWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?bool $correction = false, + ?array $requestBody = null, + string $contentType = self::contentTypes['mostRecentForEmployeesFps'][0] + ): array + { + $request = $this->mostRecentForEmployeesFpsRequest($employerId, $taxYear, $correction, $requestBody, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\Fps[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation mostRecentForEmployeesFpsAsync + * + * Get most recent FPS for Employees + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) + * @param string[]|null $requestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeesFps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function mostRecentForEmployeesFpsAsync( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?bool $correction = false, + ?array $requestBody = null, + string $contentType = self::contentTypes['mostRecentForEmployeesFps'][0] + ): PromiseInterface + { + return $this->mostRecentForEmployeesFpsAsyncWithHttpInfo($employerId, $taxYear, $correction, $requestBody, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation mostRecentForEmployeesFpsAsyncWithHttpInfo + * + * Get most recent FPS for Employees + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) + * @param string[]|null $requestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeesFps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function mostRecentForEmployeesFpsAsyncWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?bool $correction = false, + ?array $requestBody = null, + string $contentType = self::contentTypes['mostRecentForEmployeesFps'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\Fps[]'; + $request = $this->mostRecentForEmployeesFpsRequest($employerId, $taxYear, $correction, $requestBody, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'mostRecentForEmployeesFps' + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param bool|null $correction Only search for FPS's submitted as a correction to a previous year (optional, default to false) + * @param string[]|null $requestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['mostRecentForEmployeesFps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function mostRecentForEmployeesFpsRequest( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?bool $correction = false, + ?array $requestBody = null, + string $contentType = self::contentTypes['mostRecentForEmployeesFps'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling mostRecentForEmployeesFps' + ); + } + + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling mostRecentForEmployeesFps' + ); + } + + + + + $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/mostrecentforemployees'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $correction, + 'correction', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($requestBody)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($requestBody)); + } else { + $httpBody = $requestBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation requiringAttentionFps + * + * FPS Requiring Attention + * + * @param string $employerId employerId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requiringAttentionFps'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\Item[] + */ + public function requiringAttentionFps( + string $employerId, + string $contentType = self::contentTypes['requiringAttentionFps'][0] + ): array + { + list($response) = $this->requiringAttentionFpsWithHttpInfo($employerId, $contentType); + return $response; + } + + /** + * Operation requiringAttentionFpsWithHttpInfo + * + * FPS Requiring Attention + * + * @param string $employerId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requiringAttentionFps'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + */ + public function requiringAttentionFpsWithHttpInfo( + string $employerId, + string $contentType = self::contentTypes['requiringAttentionFps'][0] + ): array + { + $request = $this->requiringAttentionFpsRequest($employerId, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\Item[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation requiringAttentionFpsAsync + * + * FPS Requiring Attention + * + * @param string $employerId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requiringAttentionFps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function requiringAttentionFpsAsync( + string $employerId, + string $contentType = self::contentTypes['requiringAttentionFps'][0] + ): PromiseInterface + { + return $this->requiringAttentionFpsAsyncWithHttpInfo($employerId, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation requiringAttentionFpsAsyncWithHttpInfo + * + * FPS Requiring Attention + * + * @param string $employerId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requiringAttentionFps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function requiringAttentionFpsAsyncWithHttpInfo( + string $employerId, + string $contentType = self::contentTypes['requiringAttentionFps'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\Item[]'; + $request = $this->requiringAttentionFpsRequest($employerId, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'requiringAttentionFps' + * + * @param string $employerId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requiringAttentionFps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function requiringAttentionFpsRequest( + string $employerId, + string $contentType = self::contentTypes['requiringAttentionFps'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling requiringAttentionFps' + ); + } + + + $resourcePath = '/employers/{employerId}/rti/fps/requiringattention'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation submitFps + * + * Submit FPS + * + * @param string $employerId employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) + * @param string $id id (required) + * @param bool|null $force If the FPS has already been accepted then you will need to set this to true to force it to be resubmitted (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['submitFps'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\Fps + */ + public function submitFps( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + ?bool $force = false, + string $contentType = self::contentTypes['submitFps'][0] + ): \SynergiTech\Staffology\Model\Fps + { + list($response) = $this->submitFpsWithHttpInfo($employerId, $taxYear, $id, $force, $contentType); + return $response; + } + + /** + * Operation submitFpsWithHttpInfo + * + * Submit FPS + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id (required) + * @param bool|null $force If the FPS has already been accepted then you will need to set this to true to force it to be resubmitted (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['submitFps'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\Fps, HTTP status code, HTTP response headers (array of strings) + */ + public function submitFpsWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + ?bool $force = false, + string $contentType = self::contentTypes['submitFps'][0] + ): array + { + $request = $this->submitFpsRequest($employerId, $taxYear, $id, $force, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\Fps', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation submitFpsAsync + * + * Submit FPS + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id (required) + * @param bool|null $force If the FPS has already been accepted then you will need to set this to true to force it to be resubmitted (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['submitFps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function submitFpsAsync( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + ?bool $force = false, + string $contentType = self::contentTypes['submitFps'][0] + ): PromiseInterface + { + return $this->submitFpsAsyncWithHttpInfo($employerId, $taxYear, $id, $force, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation submitFpsAsyncWithHttpInfo + * + * Submit FPS + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id (required) + * @param bool|null $force If the FPS has already been accepted then you will need to set this to true to force it to be resubmitted (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['submitFps'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function submitFpsAsyncWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + ?bool $force = false, + string $contentType = self::contentTypes['submitFps'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\Fps'; + $request = $this->submitFpsRequest($employerId, $taxYear, $id, $force, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2941,35 +3980,65 @@ function ($exception) { } /** - * Create request for operation 'requiringAttentionFps' + * Create request for operation 'submitFps' * * @param string $employerId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requiringAttentionFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id (required) + * @param bool|null $force If the FPS has already been accepted then you will need to set this to true to force it to be resubmitted (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['submitFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function requiringAttentionFpsRequest( + public function submitFpsRequest( string $employerId, - string $contentType = self::contentTypes['requiringAttentionFps'][0] + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + ?bool $force = false, + string $contentType = self::contentTypes['submitFps'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling requiringAttentionFps' + 'Missing the required parameter $employerId when calling submitFps' ); } + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling submitFps' + ); + } - $resourcePath = '/employers/{employerId}/rti/fps/requiringattention'; + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling submitFps' + ); + } + + + + $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/{id}/submit'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $force, + 'force', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -2980,6 +4049,22 @@ public function requiringAttentionFpsRequest( $resourcePath ); } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -3032,7 +4117,7 @@ public function requiringAttentionFpsRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3040,56 +4125,56 @@ public function requiringAttentionFpsRequest( } /** - * Operation submitFps + * Operation updateFps * - * Submit FPS + * Update FPS * * @param string $employerId employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param string $id id (required) - * @param bool|null $force If the FPS has already been accepted then you will need to set this to true to force it to be resubmitted (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['submitFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Fps|null $fps fps (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return \SynergiTech\Staffology\Model\Fps */ - public function submitFps( + public function updateFps( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - ?bool $force = false, - string $contentType = self::contentTypes['submitFps'][0] + ?\SynergiTech\Staffology\Model\Fps $fps = null, + string $contentType = self::contentTypes['updateFps'][0] ): \SynergiTech\Staffology\Model\Fps { - list($response) = $this->submitFpsWithHttpInfo($employerId, $taxYear, $id, $force, $contentType); + list($response) = $this->updateFpsWithHttpInfo($employerId, $taxYear, $id, $fps, $contentType); return $response; } /** - * Operation submitFpsWithHttpInfo + * Operation updateFpsWithHttpInfo * - * Submit FPS + * Update FPS * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param bool|null $force If the FPS has already been accepted then you will need to set this to true to force it to be resubmitted (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['submitFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Fps|null $fps (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\Fps, HTTP status code, HTTP response headers (array of strings) */ - public function submitFpsWithHttpInfo( + public function updateFpsWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - ?bool $force = false, - string $contentType = self::contentTypes['submitFps'][0] + ?\SynergiTech\Staffology\Model\Fps $fps = null, + string $contentType = self::contentTypes['updateFps'][0] ): array { - $request = $this->submitFpsRequest($employerId, $taxYear, $id, $force, $contentType); + $request = $this->updateFpsRequest($employerId, $taxYear, $id, $fps, $contentType); try { $options = $this->createHttpClientOption(); @@ -3113,36 +4198,15 @@ public function submitFpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Fps', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Fps' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Fps', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3157,34 +4221,11 @@ public function submitFpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Fps'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3194,35 +4235,36 @@ public function submitFpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation submitFpsAsync + * Operation updateFpsAsync * - * Submit FPS + * Update FPS * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param bool|null $force If the FPS has already been accepted then you will need to set this to true to force it to be resubmitted (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['submitFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Fps|null $fps (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function submitFpsAsync( + public function updateFpsAsync( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - ?bool $force = false, - string $contentType = self::contentTypes['submitFps'][0] + ?\SynergiTech\Staffology\Model\Fps $fps = null, + string $contentType = self::contentTypes['updateFps'][0] ): PromiseInterface { - return $this->submitFpsAsyncWithHttpInfo($employerId, $taxYear, $id, $force, $contentType) + return $this->updateFpsAsyncWithHttpInfo($employerId, $taxYear, $id, $fps, $contentType) ->then( function ($response) { return $response[0]; @@ -3231,29 +4273,29 @@ function ($response) { } /** - * Operation submitFpsAsyncWithHttpInfo + * Operation updateFpsAsyncWithHttpInfo * - * Submit FPS + * Update FPS * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param bool|null $force If the FPS has already been accepted then you will need to set this to true to force it to be resubmitted (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['submitFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Fps|null $fps (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function submitFpsAsyncWithHttpInfo( + public function updateFpsAsyncWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - ?bool $force = false, - string $contentType = self::contentTypes['submitFps'][0] + ?\SynergiTech\Staffology\Model\Fps $fps = null, + string $contentType = self::contentTypes['updateFps'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\Fps'; - $request = $this->submitFpsRequest($employerId, $taxYear, $id, $force, $contentType); + $request = $this->updateFpsRequest($employerId, $taxYear, $id, $fps, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3292,65 +4334,56 @@ function ($exception) { } /** - * Create request for operation 'submitFps' + * Create request for operation 'updateFps' * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) - * @param bool|null $force If the FPS has already been accepted then you will need to set this to true to force it to be resubmitted (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['submitFps'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Fps|null $fps (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function submitFpsRequest( + public function updateFpsRequest( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, - ?bool $force = false, - string $contentType = self::contentTypes['submitFps'][0] + ?\SynergiTech\Staffology\Model\Fps $fps = null, + string $contentType = self::contentTypes['updateFps'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling submitFps' + 'Missing the required parameter $employerId when calling updateFps' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling submitFps' + 'Missing the required parameter $taxYear when calling updateFps' ); } // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling submitFps' + 'Missing the required parameter $id when calling updateFps' ); } - $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/{id}/submit'; + $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/{id}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $force, - 'force', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -3386,7 +4419,14 @@ public function submitFpsRequest( ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($fps)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($fps)); + } else { + $httpBody = $fps; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -3429,7 +4469,7 @@ public function submitFpsRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3437,56 +4477,56 @@ public function submitFpsRequest( } /** - * Operation updateFps + * Operation updateFpsWithMultipleEmployeesFps * - * Update FPS + * Update FPS with multiple employees * * @param string $employerId employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param string $id id (required) * @param \SynergiTech\Staffology\Model\Fps|null $fps fps (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFpsWithMultipleEmployeesFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return \SynergiTech\Staffology\Model\Fps */ - public function updateFps( + public function updateFpsWithMultipleEmployeesFps( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, ?\SynergiTech\Staffology\Model\Fps $fps = null, - string $contentType = self::contentTypes['updateFps'][0] + string $contentType = self::contentTypes['updateFpsWithMultipleEmployeesFps'][0] ): \SynergiTech\Staffology\Model\Fps { - list($response) = $this->updateFpsWithHttpInfo($employerId, $taxYear, $id, $fps, $contentType); + list($response) = $this->updateFpsWithMultipleEmployeesFpsWithHttpInfo($employerId, $taxYear, $id, $fps, $contentType); return $response; } /** - * Operation updateFpsWithHttpInfo + * Operation updateFpsWithMultipleEmployeesFpsWithHttpInfo * - * Update FPS + * Update FPS with multiple employees * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) * @param \SynergiTech\Staffology\Model\Fps|null $fps (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFpsWithMultipleEmployeesFps'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\Fps, HTTP status code, HTTP response headers (array of strings) */ - public function updateFpsWithHttpInfo( + public function updateFpsWithMultipleEmployeesFpsWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, ?\SynergiTech\Staffology\Model\Fps $fps = null, - string $contentType = self::contentTypes['updateFps'][0] + string $contentType = self::contentTypes['updateFpsWithMultipleEmployeesFps'][0] ): array { - $request = $this->updateFpsRequest($employerId, $taxYear, $id, $fps, $contentType); + $request = $this->updateFpsWithMultipleEmployeesFpsRequest($employerId, $taxYear, $id, $fps, $contentType); try { $options = $this->createHttpClientOption(); @@ -3510,36 +4550,15 @@ public function updateFpsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Fps', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Fps' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Fps', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3554,34 +4573,11 @@ public function updateFpsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Fps'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Fps', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3591,35 +4587,36 @@ public function updateFpsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation updateFpsAsync + * Operation updateFpsWithMultipleEmployeesFpsAsync * - * Update FPS + * Update FPS with multiple employees * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) * @param \SynergiTech\Staffology\Model\Fps|null $fps (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFpsWithMultipleEmployeesFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function updateFpsAsync( + public function updateFpsWithMultipleEmployeesFpsAsync( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, ?\SynergiTech\Staffology\Model\Fps $fps = null, - string $contentType = self::contentTypes['updateFps'][0] + string $contentType = self::contentTypes['updateFpsWithMultipleEmployeesFps'][0] ): PromiseInterface { - return $this->updateFpsAsyncWithHttpInfo($employerId, $taxYear, $id, $fps, $contentType) + return $this->updateFpsWithMultipleEmployeesFpsAsyncWithHttpInfo($employerId, $taxYear, $id, $fps, $contentType) ->then( function ($response) { return $response[0]; @@ -3628,29 +4625,29 @@ function ($response) { } /** - * Operation updateFpsAsyncWithHttpInfo + * Operation updateFpsWithMultipleEmployeesFpsAsyncWithHttpInfo * - * Update FPS + * Update FPS with multiple employees * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) * @param \SynergiTech\Staffology\Model\Fps|null $fps (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFpsWithMultipleEmployeesFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function updateFpsAsyncWithHttpInfo( + public function updateFpsWithMultipleEmployeesFpsAsyncWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, ?\SynergiTech\Staffology\Model\Fps $fps = null, - string $contentType = self::contentTypes['updateFps'][0] + string $contentType = self::contentTypes['updateFpsWithMultipleEmployeesFps'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\Fps'; - $request = $this->updateFpsRequest($employerId, $taxYear, $id, $fps, $contentType); + $request = $this->updateFpsWithMultipleEmployeesFpsRequest($employerId, $taxYear, $id, $fps, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3689,50 +4686,50 @@ function ($exception) { } /** - * Create request for operation 'updateFps' + * Create request for operation 'updateFpsWithMultipleEmployeesFps' * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) * @param \SynergiTech\Staffology\Model\Fps|null $fps (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFps'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateFpsWithMultipleEmployeesFps'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateFpsRequest( + public function updateFpsWithMultipleEmployeesFpsRequest( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, ?\SynergiTech\Staffology\Model\Fps $fps = null, - string $contentType = self::contentTypes['updateFps'][0] + string $contentType = self::contentTypes['updateFpsWithMultipleEmployeesFps'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling updateFps' + 'Missing the required parameter $employerId when calling updateFpsWithMultipleEmployeesFps' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling updateFps' + 'Missing the required parameter $taxYear when calling updateFpsWithMultipleEmployeesFps' ); } // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling updateFps' + 'Missing the required parameter $id when calling updateFpsWithMultipleEmployeesFps' ); } - $resourcePath = '/employers/{employerId}/rti/fps/{taxYear}/{id}'; + $resourcePath = '/employers/{employerId}/rti/fps/multiple/{taxYear}/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3849,4 +4846,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/HmrcPaymentApi.php b/src/Api/HmrcPaymentApi.php index 0d6c719..b6e2c24 100644 --- a/src/Api/HmrcPaymentApi.php +++ b/src/Api/HmrcPaymentApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -82,10 +85,10 @@ class HmrcPaymentApi 'application/json', ], 'updateHmrcPayment' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -144,6 +147,7 @@ public function getConfig(): Configuration * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param \DateTime $periodEnding periodEnding (required) * @param string|null $accept accept (optional) + * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHoliday bankHoliday (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bankPaymentHmrcPayment'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -155,10 +159,11 @@ public function bankPaymentHmrcPayment( \SynergiTech\Staffology\Model\TaxYear $taxYear, \DateTime $periodEnding, ?string $accept = null, + ?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHoliday = null, string $contentType = self::contentTypes['bankPaymentHmrcPayment'][0] ): \SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse { - list($response) = $this->bankPaymentHmrcPaymentWithHttpInfo($employerId, $taxYear, $periodEnding, $accept, $contentType); + list($response) = $this->bankPaymentHmrcPaymentWithHttpInfo($employerId, $taxYear, $periodEnding, $accept, $bankHoliday, $contentType); return $response; } @@ -171,6 +176,7 @@ public function bankPaymentHmrcPayment( * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param \DateTime $periodEnding (required) * @param string|null $accept (optional) + * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHoliday (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bankPaymentHmrcPayment'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -182,10 +188,11 @@ public function bankPaymentHmrcPaymentWithHttpInfo( \SynergiTech\Staffology\Model\TaxYear $taxYear, \DateTime $periodEnding, ?string $accept = null, + ?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHoliday = null, string $contentType = self::contentTypes['bankPaymentHmrcPayment'][0] ): array { - $request = $this->bankPaymentHmrcPaymentRequest($employerId, $taxYear, $periodEnding, $accept, $contentType); + $request = $this->bankPaymentHmrcPaymentRequest($employerId, $taxYear, $periodEnding, $accept, $bankHoliday, $contentType); try { $options = $this->createHttpClientOption(); @@ -209,36 +216,15 @@ public function bankPaymentHmrcPaymentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -253,34 +239,11 @@ public function bankPaymentHmrcPaymentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -290,8 +253,9 @@ public function bankPaymentHmrcPaymentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -305,6 +269,7 @@ public function bankPaymentHmrcPaymentWithHttpInfo( * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param \DateTime $periodEnding (required) * @param string|null $accept (optional) + * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHoliday (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bankPaymentHmrcPayment'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -315,10 +280,11 @@ public function bankPaymentHmrcPaymentAsync( \SynergiTech\Staffology\Model\TaxYear $taxYear, \DateTime $periodEnding, ?string $accept = null, + ?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHoliday = null, string $contentType = self::contentTypes['bankPaymentHmrcPayment'][0] ): PromiseInterface { - return $this->bankPaymentHmrcPaymentAsyncWithHttpInfo($employerId, $taxYear, $periodEnding, $accept, $contentType) + return $this->bankPaymentHmrcPaymentAsyncWithHttpInfo($employerId, $taxYear, $periodEnding, $accept, $bankHoliday, $contentType) ->then( function ($response) { return $response[0]; @@ -335,6 +301,7 @@ function ($response) { * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param \DateTime $periodEnding (required) * @param string|null $accept (optional) + * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHoliday (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bankPaymentHmrcPayment'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -345,11 +312,12 @@ public function bankPaymentHmrcPaymentAsyncWithHttpInfo( \SynergiTech\Staffology\Model\TaxYear $taxYear, \DateTime $periodEnding, ?string $accept = null, + ?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHoliday = null, string $contentType = self::contentTypes['bankPaymentHmrcPayment'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse'; - $request = $this->bankPaymentHmrcPaymentRequest($employerId, $taxYear, $periodEnding, $accept, $contentType); + $request = $this->bankPaymentHmrcPaymentRequest($employerId, $taxYear, $periodEnding, $accept, $bankHoliday, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -394,6 +362,7 @@ function ($exception) { * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param \DateTime $periodEnding (required) * @param string|null $accept (optional) + * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHoliday (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bankPaymentHmrcPayment'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -404,6 +373,7 @@ public function bankPaymentHmrcPaymentRequest( \SynergiTech\Staffology\Model\TaxYear $taxYear, \DateTime $periodEnding, ?string $accept = null, + ?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHoliday = null, string $contentType = self::contentTypes['bankPaymentHmrcPayment'][0] ): Request { @@ -431,6 +401,7 @@ public function bankPaymentHmrcPaymentRequest( + $resourcePath = '/employers/{employerId}/hmrcpayment/{taxYear}/{periodEnding}/bankpayment'; $formParams = []; $queryParams = []; @@ -438,6 +409,15 @@ public function bankPaymentHmrcPaymentRequest( $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $bankHoliday?->value, + 'bankHoliday', // param base name + 'BankHolidayCollection', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // header params if ($accept !== null) { @@ -597,36 +577,15 @@ public function getHmrcPaymentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\HmrcLiability', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\HmrcLiability' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\HmrcLiability', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\HmrcLiability', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -641,34 +600,11 @@ public function getHmrcPaymentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\HmrcLiability'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\HmrcLiability', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -678,8 +614,9 @@ public function getHmrcPaymentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -970,36 +907,15 @@ public function indexHmrcPaymentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1014,34 +930,11 @@ public function indexHmrcPaymentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1051,8 +944,9 @@ public function indexHmrcPaymentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1269,7 +1163,7 @@ public function indexHmrcPaymentRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\HmrcLiability + * @return \SynergiTech\Staffology\Model\HmrcLiability|null */ public function updateHmrcPayment( string $employerId, @@ -1277,7 +1171,7 @@ public function updateHmrcPayment( \DateTime $periodEnding, ?\SynergiTech\Staffology\Model\HmrcLiability $hmrcLiability = null, string $contentType = self::contentTypes['updateHmrcPayment'][0] - ): \SynergiTech\Staffology\Model\HmrcLiability + ): ?\SynergiTech\Staffology\Model\HmrcLiability { list($response) = $this->updateHmrcPaymentWithHttpInfo($employerId, $taxYear, $periodEnding, $hmrcLiability, $contentType); return $response; @@ -1330,36 +1224,15 @@ public function updateHmrcPaymentWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\HmrcLiability', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\HmrcLiability' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\HmrcLiability', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\HmrcLiability', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1374,34 +1247,11 @@ public function updateHmrcPaymentWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\HmrcLiability'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\HmrcLiability', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1411,8 +1261,9 @@ public function updateHmrcPaymentWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1669,4 +1520,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/HolidaySchemeApi.php b/src/Api/HolidaySchemeApi.php index 46b9757..502d16b 100644 --- a/src/Api/HolidaySchemeApi.php +++ b/src/Api/HolidaySchemeApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class HolidaySchemeApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createHolidayScheme' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteHolidayScheme' => [ 'application/json', @@ -88,10 +91,10 @@ class HolidaySchemeApi 'application/json', ], 'updateHolidayScheme' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -152,13 +155,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse + * @return \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse|null */ public function createHolidayScheme( string $employerId, ?\SynergiTech\Staffology\Model\ContractHolidaySchemeRequest $contractHolidaySchemeRequest = null, string $contentType = self::contentTypes['createHolidayScheme'][0] - ): \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse + ): ?\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse { list($response) = $this->createHolidaySchemeWithHttpInfo($employerId, $contractHolidaySchemeRequest, $contentType); return $response; @@ -175,7 +178,7 @@ public function createHolidayScheme( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse, HTTP status code, HTTP response headers (array of strings) */ public function createHolidaySchemeWithHttpInfo( string $employerId, @@ -207,36 +210,15 @@ public function createHolidaySchemeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -251,34 +233,11 @@ public function createHolidaySchemeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -288,8 +247,9 @@ public function createHolidaySchemeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -553,10 +513,10 @@ public function deleteHolidaySchemeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -758,13 +718,13 @@ public function deleteHolidaySchemeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse + * @return \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse|null */ public function getByIdHolidayScheme( string $employerId, string $id, string $contentType = self::contentTypes['getByIdHolidayScheme'][0] - ): \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse + ): ?\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse { list($response) = $this->getByIdHolidaySchemeWithHttpInfo($employerId, $id, $contentType); return $response; @@ -781,7 +741,7 @@ public function getByIdHolidayScheme( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse, HTTP status code, HTTP response headers (array of strings) */ public function getByIdHolidaySchemeWithHttpInfo( string $employerId, @@ -813,36 +773,15 @@ public function getByIdHolidaySchemeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -857,34 +796,11 @@ public function getByIdHolidaySchemeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -894,8 +810,9 @@ public function getByIdHolidaySchemeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1109,12 +1026,12 @@ public function getByIdHolidaySchemeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse[] + * @return \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse[]|null */ public function getHolidayScheme( string $employerId, string $contentType = self::contentTypes['getHolidayScheme'][0] - ): array + ): ?array { list($response) = $this->getHolidaySchemeWithHttpInfo($employerId, $contentType); return $response; @@ -1130,7 +1047,7 @@ public function getHolidayScheme( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse[], HTTP status code, HTTP response headers (array of strings) */ public function getHolidaySchemeWithHttpInfo( string $employerId, @@ -1161,36 +1078,15 @@ public function getHolidaySchemeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1205,34 +1101,11 @@ public function getHolidaySchemeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1242,8 +1115,9 @@ public function getHolidaySchemeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1438,14 +1312,14 @@ public function getHolidaySchemeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse + * @return \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse|null */ public function updateHolidayScheme( string $employerId, string $id, ?\SynergiTech\Staffology\Model\ContractHolidaySchemeRequest $contractHolidaySchemeRequest = null, string $contentType = self::contentTypes['updateHolidayScheme'][0] - ): \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse + ): ?\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse { list($response) = $this->updateHolidaySchemeWithHttpInfo($employerId, $id, $contractHolidaySchemeRequest, $contentType); return $response; @@ -1463,7 +1337,7 @@ public function updateHolidayScheme( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractHolidaySchemeResponse, HTTP status code, HTTP response headers (array of strings) */ public function updateHolidaySchemeWithHttpInfo( string $employerId, @@ -1496,36 +1370,15 @@ public function updateHolidaySchemeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1540,34 +1393,11 @@ public function updateHolidaySchemeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractHolidaySchemeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1577,8 +1407,9 @@ public function updateHolidaySchemeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1814,4 +1645,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/ImportApi.php b/src/Api/ImportApi.php index 1c08c41..b837561 100644 --- a/src/Api/ImportApi.php +++ b/src/Api/ImportApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class ImportApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createPaymentsCsvMappingImport' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deletePaymentCsvMappingImport' => [ 'application/json', @@ -84,17 +87,35 @@ class ImportApi 'employeeImportCsvImport' => [ 'multipart/form-data', ], - 'importEmployeePayImport' => [ - 'application/json-patch+json', + 'importBenefitsImport' => [ + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', + ], + 'importEmployeePayImport' => [ 'application/*+json', + 'application/json', + 'application/json-patch+json', + 'text/json', ], 'importLeaveImport' => [ + 'application/*+json', + 'application/json', 'application/json-patch+json', + 'text/json', + ], + 'importPayRunOverridesImport' => [ + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', + ], + 'importPaymentsImport' => [ 'application/*+json', + 'application/json', + 'application/json-patch+json', + 'text/json', ], 'importPensionMembershipsImport' => [ 'multipart/form-data', @@ -111,11 +132,14 @@ class ImportApi 'paymentsCsvMappingImport' => [ 'application/json', ], + 'pensionImportCsvImport' => [ + 'multipart/form-data', + ], 'updatePaymentsCsvMappingImport' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -232,10 +256,10 @@ public function createPaymentsCsvMappingImportWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -486,10 +510,10 @@ public function deletePaymentCsvMappingImportWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -693,7 +717,7 @@ public function deletePaymentCsvMappingImportRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractJobResponse + * @return \SynergiTech\Staffology\Model\ContractJobResponse|null */ public function employeeImportCsvImport( string $employerId, @@ -701,7 +725,7 @@ public function employeeImportCsvImport( ?bool $allowUpdates = false, ?\SplFileObject $file = null, string $contentType = self::contentTypes['employeeImportCsvImport'][0] - ): \SynergiTech\Staffology\Model\ContractJobResponse + ): ?\SynergiTech\Staffology\Model\ContractJobResponse { list($response) = $this->employeeImportCsvImportWithHttpInfo($employerId, $format, $allowUpdates, $file, $contentType); return $response; @@ -754,36 +778,15 @@ public function employeeImportCsvImportWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 202: - if (in_array('\SynergiTech\Staffology\Model\ContractJobResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractJobResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractJobResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -798,34 +801,11 @@ public function employeeImportCsvImportWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractJobResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 202: @@ -835,8 +815,9 @@ public function employeeImportCsvImportWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1001,19 +982,14 @@ public function employeeImportCsvImportRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -1073,63 +1049,48 @@ public function employeeImportCsvImportRequest( } /** - * Operation importEmployeePayImport + * Operation importBenefitsImport * - * Import Pay To Employee + * Import Benefits * - * @param string $employerId employerId (required) - * @param bool|null $linesOnly If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false. (optional, default to false) - * @param bool|null $append If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false. (optional, default to false) - * @param bool|null $updateExisting If set to true then any submitted lines that match the paycode of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines. (optional, default to false) - * @param bool|null $validateOnly If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported. (optional, default to false) - * @param \SynergiTech\Staffology\Model\PayOptionsImport[]|null $payOptionsImport payOptionsImport (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importEmployeePayImport'] to see the possible values for this operation + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\ContractBenefitImportRequest[]|null $contractBenefitImportRequest The import benefit items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importBenefitsImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void + * @return \SynergiTech\Staffology\Model\ContractJobResponse|null */ - public function importEmployeePayImport( + public function importBenefitsImport( string $employerId, - ?bool $linesOnly = false, - ?bool $append = false, - ?bool $updateExisting = false, - ?bool $validateOnly = false, - ?array $payOptionsImport = null, - string $contentType = self::contentTypes['importEmployeePayImport'][0] - ): void + ?array $contractBenefitImportRequest = null, + string $contentType = self::contentTypes['importBenefitsImport'][0] + ): ?\SynergiTech\Staffology\Model\ContractJobResponse { - $this->importEmployeePayImportWithHttpInfo($employerId, $linesOnly, $append, $updateExisting, $validateOnly, $payOptionsImport, $contentType); + list($response) = $this->importBenefitsImportWithHttpInfo($employerId, $contractBenefitImportRequest, $contentType); + return $response; } /** - * Operation importEmployeePayImportWithHttpInfo + * Operation importBenefitsImportWithHttpInfo * - * Import Pay To Employee + * Import Benefits * - * @param string $employerId (required) - * @param bool|null $linesOnly If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false. (optional, default to false) - * @param bool|null $append If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false. (optional, default to false) - * @param bool|null $updateExisting If set to true then any submitted lines that match the paycode of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines. (optional, default to false) - * @param bool|null $validateOnly If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported. (optional, default to false) - * @param \SynergiTech\Staffology\Model\PayOptionsImport[]|null $payOptionsImport (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importEmployeePayImport'] to see the possible values for this operation + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\ContractBenefitImportRequest[]|null $contractBenefitImportRequest The import benefit items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importBenefitsImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractJobResponse, HTTP status code, HTTP response headers (array of strings) */ - public function importEmployeePayImportWithHttpInfo( + public function importBenefitsImportWithHttpInfo( string $employerId, - ?bool $linesOnly = false, - ?bool $append = false, - ?bool $updateExisting = false, - ?bool $validateOnly = false, - ?array $payOptionsImport = null, - string $contentType = self::contentTypes['importEmployeePayImport'][0] + ?array $contractBenefitImportRequest = null, + string $contentType = self::contentTypes['importBenefitsImport'][0] ): array { - $request = $this->importEmployeePayImportRequest($employerId, $linesOnly, $append, $updateExisting, $validateOnly, $payOptionsImport, $contentType); + $request = $this->importBenefitsImportRequest($employerId, $contractBenefitImportRequest, $contentType); try { $options = $this->createHttpClientOption(); @@ -1153,43 +1114,69 @@ public function importEmployeePayImportWithHttpInfo( $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 202: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); + } + - return [null, $statusCode, $response->getHeaders()]; + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ContractJobResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } /** - * Operation importEmployeePayImportAsync + * Operation importBenefitsImportAsync * - * Import Pay To Employee + * Import Benefits * - * @param string $employerId (required) - * @param bool|null $linesOnly If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false. (optional, default to false) - * @param bool|null $append If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false. (optional, default to false) - * @param bool|null $updateExisting If set to true then any submitted lines that match the paycode of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines. (optional, default to false) - * @param bool|null $validateOnly If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported. (optional, default to false) - * @param \SynergiTech\Staffology\Model\PayOptionsImport[]|null $payOptionsImport (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importEmployeePayImport'] to see the possible values for this operation + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\ContractBenefitImportRequest[]|null $contractBenefitImportRequest The import benefit items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importBenefitsImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function importEmployeePayImportAsync( + public function importBenefitsImportAsync( string $employerId, - ?bool $linesOnly = false, - ?bool $append = false, - ?bool $updateExisting = false, - ?bool $validateOnly = false, - ?array $payOptionsImport = null, - string $contentType = self::contentTypes['importEmployeePayImport'][0] + ?array $contractBenefitImportRequest = null, + string $contentType = self::contentTypes['importBenefitsImport'][0] ): PromiseInterface { - return $this->importEmployeePayImportAsyncWithHttpInfo($employerId, $linesOnly, $append, $updateExisting, $validateOnly, $payOptionsImport, $contentType) + return $this->importBenefitsImportAsyncWithHttpInfo($employerId, $contractBenefitImportRequest, $contentType) ->then( function ($response) { return $response[0]; @@ -1198,39 +1185,44 @@ function ($response) { } /** - * Operation importEmployeePayImportAsyncWithHttpInfo + * Operation importBenefitsImportAsyncWithHttpInfo * - * Import Pay To Employee + * Import Benefits * - * @param string $employerId (required) - * @param bool|null $linesOnly If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false. (optional, default to false) - * @param bool|null $append If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false. (optional, default to false) - * @param bool|null $updateExisting If set to true then any submitted lines that match the paycode of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines. (optional, default to false) - * @param bool|null $validateOnly If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported. (optional, default to false) - * @param \SynergiTech\Staffology\Model\PayOptionsImport[]|null $payOptionsImport (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importEmployeePayImport'] to see the possible values for this operation + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\ContractBenefitImportRequest[]|null $contractBenefitImportRequest The import benefit items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importBenefitsImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function importEmployeePayImportAsyncWithHttpInfo( + public function importBenefitsImportAsyncWithHttpInfo( string $employerId, - ?bool $linesOnly = false, - ?bool $append = false, - ?bool $updateExisting = false, - ?bool $validateOnly = false, - ?array $payOptionsImport = null, - string $contentType = self::contentTypes['importEmployeePayImport'][0] + ?array $contractBenefitImportRequest = null, + string $contentType = self::contentTypes['importBenefitsImport'][0] ): PromiseInterface { - $returnType = ''; - $request = $this->importEmployeePayImportRequest($employerId, $linesOnly, $append, $updateExisting, $validateOnly, $payOptionsImport, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ContractJobResponse'; + $request = $this->importBenefitsImportRequest($employerId, $contractBenefitImportRequest, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -1250,86 +1242,38 @@ function ($exception) { } /** - * Create request for operation 'importEmployeePayImport' + * Create request for operation 'importBenefitsImport' * - * @param string $employerId (required) - * @param bool|null $linesOnly If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false. (optional, default to false) - * @param bool|null $append If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false. (optional, default to false) - * @param bool|null $updateExisting If set to true then any submitted lines that match the paycode of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines. (optional, default to false) - * @param bool|null $validateOnly If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported. (optional, default to false) - * @param \SynergiTech\Staffology\Model\PayOptionsImport[]|null $payOptionsImport (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importEmployeePayImport'] to see the possible values for this operation + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\ContractBenefitImportRequest[]|null $contractBenefitImportRequest The import benefit items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importBenefitsImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function importEmployeePayImportRequest( + public function importBenefitsImportRequest( string $employerId, - ?bool $linesOnly = false, - ?bool $append = false, - ?bool $updateExisting = false, - ?bool $validateOnly = false, - ?array $payOptionsImport = null, - string $contentType = self::contentTypes['importEmployeePayImport'][0] + ?array $contractBenefitImportRequest = null, + string $contentType = self::contentTypes['importBenefitsImport'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling importEmployeePayImport' + 'Missing the required parameter $employerId when calling importBenefitsImport' ); } - - - - - $resourcePath = '/employers/{employerId}/import/pay'; + $resourcePath = '/employers/{employerId}/import/benefits'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $linesOnly, - 'linesOnly', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $append, - 'append', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updateExisting, - 'updateExisting', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $validateOnly, - 'validateOnly', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -1343,18 +1287,18 @@ public function importEmployeePayImportRequest( $headers = $this->headerSelector->selectHeaders( - [], + ['application/json', ], $contentType, $multipart ); // for model (json/xml) - if (isset($payOptionsImport)) { + if (isset($contractBenefitImportRequest)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payOptionsImport)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractBenefitImportRequest)); } else { - $httpBody = $payOptionsImport; + $httpBody = $contractBenefitImportRequest; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -1407,48 +1351,1416 @@ public function importEmployeePayImportRequest( } /** - * Operation importLeaveImport + * Operation importEmployeePayImport * - * Import Leave Asynchronously + * Import Pay To Employee * - * @param string $employerId The employer id. (required) - * @param \SynergiTech\Staffology\Model\ContractLeaveImportRequest[]|null $contractLeaveImportRequest The import leave items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importLeaveImport'] to see the possible values for this operation + * @param string $employerId employerId (required) + * @param bool|null $linesOnly If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false. (optional, default to false) + * @param bool|null $append If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false. (optional, default to false) + * @param bool|null $updateExisting If set to true then any submitted lines that match the paycode of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines. (optional, default to false) + * @param bool|null $validateOnly If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported. (optional, default to false) + * @param \SynergiTech\Staffology\Model\PayOptionsImport[]|null $payOptionsImport payOptionsImport (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importEmployeePayImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractJobResponse + * @return void */ - public function importLeaveImport( + public function importEmployeePayImport( + string $employerId, + ?bool $linesOnly = false, + ?bool $append = false, + ?bool $updateExisting = false, + ?bool $validateOnly = false, + ?array $payOptionsImport = null, + string $contentType = self::contentTypes['importEmployeePayImport'][0] + ): void + { + $this->importEmployeePayImportWithHttpInfo($employerId, $linesOnly, $append, $updateExisting, $validateOnly, $payOptionsImport, $contentType); + } + + /** + * Operation importEmployeePayImportWithHttpInfo + * + * Import Pay To Employee + * + * @param string $employerId (required) + * @param bool|null $linesOnly If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false. (optional, default to false) + * @param bool|null $append If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false. (optional, default to false) + * @param bool|null $updateExisting If set to true then any submitted lines that match the paycode of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines. (optional, default to false) + * @param bool|null $validateOnly If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported. (optional, default to false) + * @param \SynergiTech\Staffology\Model\PayOptionsImport[]|null $payOptionsImport (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importEmployeePayImport'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function importEmployeePayImportWithHttpInfo( + string $employerId, + ?bool $linesOnly = false, + ?bool $append = false, + ?bool $updateExisting = false, + ?bool $validateOnly = false, + ?array $payOptionsImport = null, + string $contentType = self::contentTypes['importEmployeePayImport'][0] + ): array + { + $request = $this->importEmployeePayImportRequest($employerId, $linesOnly, $append, $updateExisting, $validateOnly, $payOptionsImport, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + } + + throw $e; + } + } + + /** + * Operation importEmployeePayImportAsync + * + * Import Pay To Employee + * + * @param string $employerId (required) + * @param bool|null $linesOnly If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false. (optional, default to false) + * @param bool|null $append If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false. (optional, default to false) + * @param bool|null $updateExisting If set to true then any submitted lines that match the paycode of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines. (optional, default to false) + * @param bool|null $validateOnly If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported. (optional, default to false) + * @param \SynergiTech\Staffology\Model\PayOptionsImport[]|null $payOptionsImport (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importEmployeePayImport'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function importEmployeePayImportAsync( + string $employerId, + ?bool $linesOnly = false, + ?bool $append = false, + ?bool $updateExisting = false, + ?bool $validateOnly = false, + ?array $payOptionsImport = null, + string $contentType = self::contentTypes['importEmployeePayImport'][0] + ): PromiseInterface + { + return $this->importEmployeePayImportAsyncWithHttpInfo($employerId, $linesOnly, $append, $updateExisting, $validateOnly, $payOptionsImport, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importEmployeePayImportAsyncWithHttpInfo + * + * Import Pay To Employee + * + * @param string $employerId (required) + * @param bool|null $linesOnly If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false. (optional, default to false) + * @param bool|null $append If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false. (optional, default to false) + * @param bool|null $updateExisting If set to true then any submitted lines that match the paycode of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines. (optional, default to false) + * @param bool|null $validateOnly If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported. (optional, default to false) + * @param \SynergiTech\Staffology\Model\PayOptionsImport[]|null $payOptionsImport (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importEmployeePayImport'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function importEmployeePayImportAsyncWithHttpInfo( + string $employerId, + ?bool $linesOnly = false, + ?bool $append = false, + ?bool $updateExisting = false, + ?bool $validateOnly = false, + ?array $payOptionsImport = null, + string $contentType = self::contentTypes['importEmployeePayImport'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->importEmployeePayImportRequest($employerId, $linesOnly, $append, $updateExisting, $validateOnly, $payOptionsImport, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importEmployeePayImport' + * + * @param string $employerId (required) + * @param bool|null $linesOnly If set to true then only lines will be imported. Changes to regular pay will be ignored. Defaults to false. (optional, default to false) + * @param bool|null $append If set to true then the lines submitted will be appended to existing lines rather than replace them. Defaults to false. (optional, default to false) + * @param bool|null $updateExisting If set to true then any submitted lines that match the paycode of one (and only one) existing line will be used to update the value of that lines. Any unmatched lines will be appended to existing lines. (optional, default to false) + * @param bool|null $validateOnly If set to true, the import will only be validated for data correctness. If false, the import is validated and then imported. (optional, default to false) + * @param \SynergiTech\Staffology\Model\PayOptionsImport[]|null $payOptionsImport (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importEmployeePayImport'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function importEmployeePayImportRequest( + string $employerId, + ?bool $linesOnly = false, + ?bool $append = false, + ?bool $updateExisting = false, + ?bool $validateOnly = false, + ?array $payOptionsImport = null, + string $contentType = self::contentTypes['importEmployeePayImport'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling importEmployeePayImport' + ); + } + + + + + + + + $resourcePath = '/employers/{employerId}/import/pay'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $linesOnly, + 'linesOnly', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $append, + 'append', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updateExisting, + 'updateExisting', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $validateOnly, + 'validateOnly', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($payOptionsImport)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payOptionsImport)); + } else { + $httpBody = $payOptionsImport; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importLeaveImport + * + * Import Leave Asynchronously + * + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\ContractLeaveImportRequest[]|null $contractLeaveImportRequest The import leave items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importLeaveImport'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\ContractJobResponse|null + */ + public function importLeaveImport( + string $employerId, + ?array $contractLeaveImportRequest = null, + string $contentType = self::contentTypes['importLeaveImport'][0] + ): ?\SynergiTech\Staffology\Model\ContractJobResponse + { + list($response) = $this->importLeaveImportWithHttpInfo($employerId, $contractLeaveImportRequest, $contentType); + return $response; + } + + /** + * Operation importLeaveImportWithHttpInfo + * + * Import Leave Asynchronously + * + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\ContractLeaveImportRequest[]|null $contractLeaveImportRequest The import leave items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importLeaveImport'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\ContractJobResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function importLeaveImportWithHttpInfo( + string $employerId, + ?array $contractLeaveImportRequest = null, + string $contentType = self::contentTypes['importLeaveImport'][0] + ): array + { + $request = $this->importLeaveImportRequest($employerId, $contractLeaveImportRequest, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 202: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ContractJobResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation importLeaveImportAsync + * + * Import Leave Asynchronously + * + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\ContractLeaveImportRequest[]|null $contractLeaveImportRequest The import leave items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importLeaveImport'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function importLeaveImportAsync( + string $employerId, + ?array $contractLeaveImportRequest = null, + string $contentType = self::contentTypes['importLeaveImport'][0] + ): PromiseInterface + { + return $this->importLeaveImportAsyncWithHttpInfo($employerId, $contractLeaveImportRequest, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importLeaveImportAsyncWithHttpInfo + * + * Import Leave Asynchronously + * + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\ContractLeaveImportRequest[]|null $contractLeaveImportRequest The import leave items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importLeaveImport'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function importLeaveImportAsyncWithHttpInfo( + string $employerId, + ?array $contractLeaveImportRequest = null, + string $contentType = self::contentTypes['importLeaveImport'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\ContractJobResponse'; + $request = $this->importLeaveImportRequest($employerId, $contractLeaveImportRequest, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importLeaveImport' + * + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\ContractLeaveImportRequest[]|null $contractLeaveImportRequest The import leave items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importLeaveImport'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function importLeaveImportRequest( + string $employerId, + ?array $contractLeaveImportRequest = null, + string $contentType = self::contentTypes['importLeaveImport'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling importLeaveImport' + ); + } + + + + $resourcePath = '/employers/{employerId}/import/leave'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($contractLeaveImportRequest)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractLeaveImportRequest)); + } else { + $httpBody = $contractLeaveImportRequest; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importPayRunOverridesImport + * + * Import Pay Run Overrides + * + * @param string $employerId The employer id (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year for the pay run overrides import. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The period number for the pay run overrides import. (required) + * @param int $periodNumber The period number for the pay run overrides import. (required) + * @param int $ordinal The ordinal for the pay run overrides import. (required) + * @param \SynergiTech\Staffology\Model\ContractPayRunOverridesImportRequest[]|null $contractPayRunOverridesImportRequest The import payrun ovverides items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPayRunOverridesImport'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\ContractJobResponse|null + */ + public function importPayRunOverridesImport( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + int $ordinal, + ?array $contractPayRunOverridesImportRequest = null, + string $contentType = self::contentTypes['importPayRunOverridesImport'][0] + ): ?\SynergiTech\Staffology\Model\ContractJobResponse + { + list($response) = $this->importPayRunOverridesImportWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $contractPayRunOverridesImportRequest, $contentType); + return $response; + } + + /** + * Operation importPayRunOverridesImportWithHttpInfo + * + * Import Pay Run Overrides + * + * @param string $employerId The employer id (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year for the pay run overrides import. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The period number for the pay run overrides import. (required) + * @param int $periodNumber The period number for the pay run overrides import. (required) + * @param int $ordinal The ordinal for the pay run overrides import. (required) + * @param \SynergiTech\Staffology\Model\ContractPayRunOverridesImportRequest[]|null $contractPayRunOverridesImportRequest The import payrun ovverides items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPayRunOverridesImport'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\ContractJobResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function importPayRunOverridesImportWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + int $ordinal, + ?array $contractPayRunOverridesImportRequest = null, + string $contentType = self::contentTypes['importPayRunOverridesImport'][0] + ): array + { + $request = $this->importPayRunOverridesImportRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $contractPayRunOverridesImportRequest, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 202: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ContractJobResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation importPayRunOverridesImportAsync + * + * Import Pay Run Overrides + * + * @param string $employerId The employer id (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year for the pay run overrides import. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The period number for the pay run overrides import. (required) + * @param int $periodNumber The period number for the pay run overrides import. (required) + * @param int $ordinal The ordinal for the pay run overrides import. (required) + * @param \SynergiTech\Staffology\Model\ContractPayRunOverridesImportRequest[]|null $contractPayRunOverridesImportRequest The import payrun ovverides items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPayRunOverridesImport'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function importPayRunOverridesImportAsync( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + int $ordinal, + ?array $contractPayRunOverridesImportRequest = null, + string $contentType = self::contentTypes['importPayRunOverridesImport'][0] + ): PromiseInterface + { + return $this->importPayRunOverridesImportAsyncWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $contractPayRunOverridesImportRequest, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importPayRunOverridesImportAsyncWithHttpInfo + * + * Import Pay Run Overrides + * + * @param string $employerId The employer id (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year for the pay run overrides import. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The period number for the pay run overrides import. (required) + * @param int $periodNumber The period number for the pay run overrides import. (required) + * @param int $ordinal The ordinal for the pay run overrides import. (required) + * @param \SynergiTech\Staffology\Model\ContractPayRunOverridesImportRequest[]|null $contractPayRunOverridesImportRequest The import payrun ovverides items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPayRunOverridesImport'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function importPayRunOverridesImportAsyncWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + int $ordinal, + ?array $contractPayRunOverridesImportRequest = null, + string $contentType = self::contentTypes['importPayRunOverridesImport'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\ContractJobResponse'; + $request = $this->importPayRunOverridesImportRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $contractPayRunOverridesImportRequest, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importPayRunOverridesImport' + * + * @param string $employerId The employer id (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year for the pay run overrides import. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The period number for the pay run overrides import. (required) + * @param int $periodNumber The period number for the pay run overrides import. (required) + * @param int $ordinal The ordinal for the pay run overrides import. (required) + * @param \SynergiTech\Staffology\Model\ContractPayRunOverridesImportRequest[]|null $contractPayRunOverridesImportRequest The import payrun ovverides items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPayRunOverridesImport'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function importPayRunOverridesImportRequest( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + int $ordinal, + ?array $contractPayRunOverridesImportRequest = null, + string $contentType = self::contentTypes['importPayRunOverridesImport'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling importPayRunOverridesImport' + ); + } + + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling importPayRunOverridesImport' + ); + } + + // verify the required parameter 'payPeriod' is set + if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $payPeriod when calling importPayRunOverridesImport' + ); + } + + // verify the required parameter 'periodNumber' is set + if ($periodNumber === null || (is_array($periodNumber) && count($periodNumber) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $periodNumber when calling importPayRunOverridesImport' + ); + } + + // verify the required parameter 'ordinal' is set + if ($ordinal === null || (is_array($ordinal) && count($ordinal) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $ordinal when calling importPayRunOverridesImport' + ); + } + + + + $resourcePath = '/employers/{employerId}/import/{taxYear}/{payPeriod}/{periodNumber}/{ordinal}/payrun-overrides'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } + // path params + if ($payPeriod !== null) { + $resourcePath = str_replace( + '{' . 'payPeriod' . '}', + ObjectSerializer::toPathValue($payPeriod->value), + $resourcePath + ); + } + // path params + if ($periodNumber !== null) { + $resourcePath = str_replace( + '{' . 'periodNumber' . '}', + ObjectSerializer::toPathValue($periodNumber), + $resourcePath + ); + } + // path params + if ($ordinal !== null) { + $resourcePath = str_replace( + '{' . 'ordinal' . '}', + ObjectSerializer::toPathValue($ordinal), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($contractPayRunOverridesImportRequest)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractPayRunOverridesImportRequest)); + } else { + $httpBody = $contractPayRunOverridesImportRequest; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importPaymentsImport + * + * Import Permanent Addition and Deductions Payments + * + * @param string $employerId The employer id. (required) + * @param bool|null $updateOpenPayrun If set to true, and there are any open pay runs, the imported values will be applied to those pay runs. (optional, default to false) + * @param \SynergiTech\Staffology\Model\ContractPaymentImportRequest[]|null $contractPaymentImportRequest The import payment items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPaymentsImport'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\ContractJobResponse|null + */ + public function importPaymentsImport( + string $employerId, + ?bool $updateOpenPayrun = false, + ?array $contractPaymentImportRequest = null, + string $contentType = self::contentTypes['importPaymentsImport'][0] + ): ?\SynergiTech\Staffology\Model\ContractJobResponse + { + list($response) = $this->importPaymentsImportWithHttpInfo($employerId, $updateOpenPayrun, $contractPaymentImportRequest, $contentType); + return $response; + } + + /** + * Operation importPaymentsImportWithHttpInfo + * + * Import Permanent Addition and Deductions Payments + * + * @param string $employerId The employer id. (required) + * @param bool|null $updateOpenPayrun If set to true, and there are any open pay runs, the imported values will be applied to those pay runs. (optional, default to false) + * @param \SynergiTech\Staffology\Model\ContractPaymentImportRequest[]|null $contractPaymentImportRequest The import payment items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPaymentsImport'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\ContractJobResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function importPaymentsImportWithHttpInfo( + string $employerId, + ?bool $updateOpenPayrun = false, + ?array $contractPaymentImportRequest = null, + string $contentType = self::contentTypes['importPaymentsImport'][0] + ): array + { + $request = $this->importPaymentsImportRequest($employerId, $updateOpenPayrun, $contractPaymentImportRequest, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 202: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ContractJobResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation importPaymentsImportAsync + * + * Import Permanent Addition and Deductions Payments + * + * @param string $employerId The employer id. (required) + * @param bool|null $updateOpenPayrun If set to true, and there are any open pay runs, the imported values will be applied to those pay runs. (optional, default to false) + * @param \SynergiTech\Staffology\Model\ContractPaymentImportRequest[]|null $contractPaymentImportRequest The import payment items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPaymentsImport'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function importPaymentsImportAsync( string $employerId, - ?array $contractLeaveImportRequest = null, - string $contentType = self::contentTypes['importLeaveImport'][0] - ): \SynergiTech\Staffology\Model\ContractJobResponse + ?bool $updateOpenPayrun = false, + ?array $contractPaymentImportRequest = null, + string $contentType = self::contentTypes['importPaymentsImport'][0] + ): PromiseInterface { - list($response) = $this->importLeaveImportWithHttpInfo($employerId, $contractLeaveImportRequest, $contentType); + return $this->importPaymentsImportAsyncWithHttpInfo($employerId, $updateOpenPayrun, $contractPaymentImportRequest, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importPaymentsImportAsyncWithHttpInfo + * + * Import Permanent Addition and Deductions Payments + * + * @param string $employerId The employer id. (required) + * @param bool|null $updateOpenPayrun If set to true, and there are any open pay runs, the imported values will be applied to those pay runs. (optional, default to false) + * @param \SynergiTech\Staffology\Model\ContractPaymentImportRequest[]|null $contractPaymentImportRequest The import payment items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPaymentsImport'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function importPaymentsImportAsyncWithHttpInfo( + string $employerId, + ?bool $updateOpenPayrun = false, + ?array $contractPaymentImportRequest = null, + string $contentType = self::contentTypes['importPaymentsImport'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\ContractJobResponse'; + $request = $this->importPaymentsImportRequest($employerId, $updateOpenPayrun, $contractPaymentImportRequest, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importPaymentsImport' + * + * @param string $employerId The employer id. (required) + * @param bool|null $updateOpenPayrun If set to true, and there are any open pay runs, the imported values will be applied to those pay runs. (optional, default to false) + * @param \SynergiTech\Staffology\Model\ContractPaymentImportRequest[]|null $contractPaymentImportRequest The import payment items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPaymentsImport'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function importPaymentsImportRequest( + string $employerId, + ?bool $updateOpenPayrun = false, + ?array $contractPaymentImportRequest = null, + string $contentType = self::contentTypes['importPaymentsImport'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling importPaymentsImport' + ); + } + + + + + $resourcePath = '/employers/{employerId}/import/payments'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updateOpenPayrun, + 'updateOpenPayrun', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($contractPaymentImportRequest)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractPaymentImportRequest)); + } else { + $httpBody = $contractPaymentImportRequest; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importPensionMembershipsImport + * + * Import PensionMemberships from csv file + * + * @param string $employerId employerId (required) + * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) + * @param bool|null $allowUpdates allowUpdates (optional, default to false) + * @param \SplFileObject|null $file file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPensionMembershipsImport'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\Item[] + */ + public function importPensionMembershipsImport( + string $employerId, + ?bool $previewOnly = false, + ?bool $allowUpdates = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['importPensionMembershipsImport'][0] + ): array + { + list($response) = $this->importPensionMembershipsImportWithHttpInfo($employerId, $previewOnly, $allowUpdates, $file, $contentType); return $response; } /** - * Operation importLeaveImportWithHttpInfo + * Operation importPensionMembershipsImportWithHttpInfo * - * Import Leave Asynchronously + * Import PensionMemberships from csv file * - * @param string $employerId The employer id. (required) - * @param \SynergiTech\Staffology\Model\ContractLeaveImportRequest[]|null $contractLeaveImportRequest The import leave items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importLeaveImport'] to see the possible values for this operation + * @param string $employerId (required) + * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) + * @param bool|null $allowUpdates (optional, default to false) + * @param \SplFileObject|null $file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPensionMembershipsImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ContractJobResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ - public function importLeaveImportWithHttpInfo( + public function importPensionMembershipsImportWithHttpInfo( string $employerId, - ?array $contractLeaveImportRequest = null, - string $contentType = self::contentTypes['importLeaveImport'][0] + ?bool $previewOnly = false, + ?bool $allowUpdates = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['importPensionMembershipsImport'][0] ): array { - $request = $this->importLeaveImportRequest($employerId, $contractLeaveImportRequest, $contentType); + $request = $this->importPensionMembershipsImportRequest($employerId, $previewOnly, $allowUpdates, $file, $contentType); try { $options = $this->createHttpClientOption(); @@ -1472,36 +2784,15 @@ public function importLeaveImportWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 202: - if (in_array('\SynergiTech\Staffology\Model\ContractJobResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractJobResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractJobResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1516,68 +2807,50 @@ public function importLeaveImportWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractJobResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { - case 202: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ContractJobResponse', + '\SynergiTech\Staffology\Model\Item[]', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation importLeaveImportAsync + * Operation importPensionMembershipsImportAsync * - * Import Leave Asynchronously + * Import PensionMemberships from csv file * - * @param string $employerId The employer id. (required) - * @param \SynergiTech\Staffology\Model\ContractLeaveImportRequest[]|null $contractLeaveImportRequest The import leave items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importLeaveImport'] to see the possible values for this operation + * @param string $employerId (required) + * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) + * @param bool|null $allowUpdates (optional, default to false) + * @param \SplFileObject|null $file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPensionMembershipsImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function importLeaveImportAsync( + public function importPensionMembershipsImportAsync( string $employerId, - ?array $contractLeaveImportRequest = null, - string $contentType = self::contentTypes['importLeaveImport'][0] + ?bool $previewOnly = false, + ?bool $allowUpdates = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['importPensionMembershipsImport'][0] ): PromiseInterface { - return $this->importLeaveImportAsyncWithHttpInfo($employerId, $contractLeaveImportRequest, $contentType) + return $this->importPensionMembershipsImportAsyncWithHttpInfo($employerId, $previewOnly, $allowUpdates, $file, $contentType) ->then( function ($response) { return $response[0]; @@ -1586,25 +2859,29 @@ function ($response) { } /** - * Operation importLeaveImportAsyncWithHttpInfo + * Operation importPensionMembershipsImportAsyncWithHttpInfo * - * Import Leave Asynchronously + * Import PensionMemberships from csv file * - * @param string $employerId The employer id. (required) - * @param \SynergiTech\Staffology\Model\ContractLeaveImportRequest[]|null $contractLeaveImportRequest The import leave items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importLeaveImport'] to see the possible values for this operation + * @param string $employerId (required) + * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) + * @param bool|null $allowUpdates (optional, default to false) + * @param \SplFileObject|null $file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPensionMembershipsImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function importLeaveImportAsyncWithHttpInfo( + public function importPensionMembershipsImportAsyncWithHttpInfo( string $employerId, - ?array $contractLeaveImportRequest = null, - string $contentType = self::contentTypes['importLeaveImport'][0] + ?bool $previewOnly = false, + ?bool $allowUpdates = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['importPensionMembershipsImport'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ContractJobResponse'; - $request = $this->importLeaveImportRequest($employerId, $contractLeaveImportRequest, $contentType); + $returnType = '\SynergiTech\Staffology\Model\Item[]'; + $request = $this->importPensionMembershipsImportRequest($employerId, $previewOnly, $allowUpdates, $file, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1643,38 +2920,62 @@ function ($exception) { } /** - * Create request for operation 'importLeaveImport' + * Create request for operation 'importPensionMembershipsImport' * - * @param string $employerId The employer id. (required) - * @param \SynergiTech\Staffology\Model\ContractLeaveImportRequest[]|null $contractLeaveImportRequest The import leave items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importLeaveImport'] to see the possible values for this operation + * @param string $employerId (required) + * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) + * @param bool|null $allowUpdates (optional, default to false) + * @param \SplFileObject|null $file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPensionMembershipsImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function importLeaveImportRequest( + public function importPensionMembershipsImportRequest( string $employerId, - ?array $contractLeaveImportRequest = null, - string $contentType = self::contentTypes['importLeaveImport'][0] + ?bool $previewOnly = false, + ?bool $allowUpdates = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['importPensionMembershipsImport'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling importLeaveImport' + 'Missing the required parameter $employerId when calling importPensionMembershipsImport' ); } - $resourcePath = '/employers/{employerId}/import/leave'; + + + $resourcePath = '/employers/{employerId}/import/pensionmemberships'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $previewOnly, + 'previewOnly', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $allowUpdates, + 'allowUpdates', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -1686,6 +2987,15 @@ public function importLeaveImportRequest( ); } + // form params + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -1694,14 +3004,7 @@ public function importLeaveImportRequest( ); // for model (json/xml) - if (isset($contractLeaveImportRequest)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractLeaveImportRequest)); - } else { - $httpBody = $contractLeaveImportRequest; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1752,56 +3055,56 @@ public function importLeaveImportRequest( } /** - * Operation importPensionMembershipsImport + * Operation importRolesImport * - * Import PensionMemberships from csv file + * Import EmployeeRoles from csv file * * @param string $employerId employerId (required) * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) * @param bool|null $allowUpdates allowUpdates (optional, default to false) * @param \SplFileObject|null $file file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPensionMembershipsImport'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importRolesImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return \SynergiTech\Staffology\Model\Item[] */ - public function importPensionMembershipsImport( + public function importRolesImport( string $employerId, ?bool $previewOnly = false, ?bool $allowUpdates = false, ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importPensionMembershipsImport'][0] + string $contentType = self::contentTypes['importRolesImport'][0] ): array { - list($response) = $this->importPensionMembershipsImportWithHttpInfo($employerId, $previewOnly, $allowUpdates, $file, $contentType); + list($response) = $this->importRolesImportWithHttpInfo($employerId, $previewOnly, $allowUpdates, $file, $contentType); return $response; } /** - * Operation importPensionMembershipsImportWithHttpInfo + * Operation importRolesImportWithHttpInfo * - * Import PensionMemberships from csv file + * Import EmployeeRoles from csv file * * @param string $employerId (required) * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) * @param bool|null $allowUpdates (optional, default to false) * @param \SplFileObject|null $file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPensionMembershipsImport'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importRolesImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ - public function importPensionMembershipsImportWithHttpInfo( + public function importRolesImportWithHttpInfo( string $employerId, ?bool $previewOnly = false, ?bool $allowUpdates = false, ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importPensionMembershipsImport'][0] + string $contentType = self::contentTypes['importRolesImport'][0] ): array { - $request = $this->importPensionMembershipsImportRequest($employerId, $previewOnly, $allowUpdates, $file, $contentType); + $request = $this->importRolesImportRequest($employerId, $previewOnly, $allowUpdates, $file, $contentType); try { $options = $this->createHttpClientOption(); @@ -1825,36 +3128,15 @@ public function importPensionMembershipsImportWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1869,34 +3151,11 @@ public function importPensionMembershipsImportWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1906,35 +3165,36 @@ public function importPensionMembershipsImportWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation importPensionMembershipsImportAsync + * Operation importRolesImportAsync * - * Import PensionMemberships from csv file + * Import EmployeeRoles from csv file * * @param string $employerId (required) * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) * @param bool|null $allowUpdates (optional, default to false) * @param \SplFileObject|null $file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPensionMembershipsImport'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importRolesImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function importPensionMembershipsImportAsync( + public function importRolesImportAsync( string $employerId, ?bool $previewOnly = false, ?bool $allowUpdates = false, ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importPensionMembershipsImport'][0] + string $contentType = self::contentTypes['importRolesImport'][0] ): PromiseInterface { - return $this->importPensionMembershipsImportAsyncWithHttpInfo($employerId, $previewOnly, $allowUpdates, $file, $contentType) + return $this->importRolesImportAsyncWithHttpInfo($employerId, $previewOnly, $allowUpdates, $file, $contentType) ->then( function ($response) { return $response[0]; @@ -1943,29 +3203,29 @@ function ($response) { } /** - * Operation importPensionMembershipsImportAsyncWithHttpInfo + * Operation importRolesImportAsyncWithHttpInfo * - * Import PensionMemberships from csv file + * Import EmployeeRoles from csv file * * @param string $employerId (required) * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) * @param bool|null $allowUpdates (optional, default to false) * @param \SplFileObject|null $file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPensionMembershipsImport'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importRolesImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function importPensionMembershipsImportAsyncWithHttpInfo( + public function importRolesImportAsyncWithHttpInfo( string $employerId, ?bool $previewOnly = false, ?bool $allowUpdates = false, ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importPensionMembershipsImport'][0] + string $contentType = self::contentTypes['importRolesImport'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->importPensionMembershipsImportRequest($employerId, $previewOnly, $allowUpdates, $file, $contentType); + $request = $this->importRolesImportRequest($employerId, $previewOnly, $allowUpdates, $file, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2004,30 +3264,30 @@ function ($exception) { } /** - * Create request for operation 'importPensionMembershipsImport' + * Create request for operation 'importRolesImport' * * @param string $employerId (required) * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) * @param bool|null $allowUpdates (optional, default to false) * @param \SplFileObject|null $file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importPensionMembershipsImport'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importRolesImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function importPensionMembershipsImportRequest( + public function importRolesImportRequest( string $employerId, ?bool $previewOnly = false, ?bool $allowUpdates = false, ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importPensionMembershipsImport'][0] + string $contentType = self::contentTypes['importRolesImport'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling importPensionMembershipsImport' + 'Missing the required parameter $employerId when calling importRolesImport' ); } @@ -2035,7 +3295,7 @@ public function importPensionMembershipsImportRequest( - $resourcePath = '/employers/{employerId}/import/pensionmemberships'; + $resourcePath = '/employers/{employerId}/import/import'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2072,19 +3332,14 @@ public function importPensionMembershipsImportRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -2144,56 +3399,44 @@ public function importPensionMembershipsImportRequest( } /** - * Operation importRolesImport + * Operation listPaymentsCsvMappingsImport * - * Import EmployeeRoles from csv file + * List PaymentsCsvMappings * - * @param string $employerId employerId (required) - * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) - * @param bool|null $allowUpdates allowUpdates (optional, default to false) - * @param \SplFileObject|null $file file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importRolesImport'] to see the possible values for this operation + * @param string $employerId The Id of the Employer for which you want to list mappings (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaymentsCsvMappingsImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return \SynergiTech\Staffology\Model\Item[] */ - public function importRolesImport( + public function listPaymentsCsvMappingsImport( string $employerId, - ?bool $previewOnly = false, - ?bool $allowUpdates = false, - ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importRolesImport'][0] + string $contentType = self::contentTypes['listPaymentsCsvMappingsImport'][0] ): array { - list($response) = $this->importRolesImportWithHttpInfo($employerId, $previewOnly, $allowUpdates, $file, $contentType); + list($response) = $this->listPaymentsCsvMappingsImportWithHttpInfo($employerId, $contentType); return $response; } /** - * Operation importRolesImportWithHttpInfo + * Operation listPaymentsCsvMappingsImportWithHttpInfo * - * Import EmployeeRoles from csv file + * List PaymentsCsvMappings * - * @param string $employerId (required) - * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) - * @param bool|null $allowUpdates (optional, default to false) - * @param \SplFileObject|null $file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importRolesImport'] to see the possible values for this operation + * @param string $employerId The Id of the Employer for which you want to list mappings (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaymentsCsvMappingsImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ - public function importRolesImportWithHttpInfo( + public function listPaymentsCsvMappingsImportWithHttpInfo( string $employerId, - ?bool $previewOnly = false, - ?bool $allowUpdates = false, - ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importRolesImport'][0] + string $contentType = self::contentTypes['listPaymentsCsvMappingsImport'][0] ): array { - $request = $this->importRolesImportRequest($employerId, $previewOnly, $allowUpdates, $file, $contentType); + $request = $this->listPaymentsCsvMappingsImportRequest($employerId, $contentType); try { $options = $this->createHttpClientOption(); @@ -2217,36 +3460,15 @@ public function importRolesImportWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2261,34 +3483,11 @@ public function importRolesImportWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2298,35 +3497,30 @@ public function importRolesImportWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation importRolesImportAsync + * Operation listPaymentsCsvMappingsImportAsync * - * Import EmployeeRoles from csv file + * List PaymentsCsvMappings * - * @param string $employerId (required) - * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) - * @param bool|null $allowUpdates (optional, default to false) - * @param \SplFileObject|null $file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importRolesImport'] to see the possible values for this operation + * @param string $employerId The Id of the Employer for which you want to list mappings (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaymentsCsvMappingsImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function importRolesImportAsync( + public function listPaymentsCsvMappingsImportAsync( string $employerId, - ?bool $previewOnly = false, - ?bool $allowUpdates = false, - ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importRolesImport'][0] + string $contentType = self::contentTypes['listPaymentsCsvMappingsImport'][0] ): PromiseInterface { - return $this->importRolesImportAsyncWithHttpInfo($employerId, $previewOnly, $allowUpdates, $file, $contentType) + return $this->listPaymentsCsvMappingsImportAsyncWithHttpInfo($employerId, $contentType) ->then( function ($response) { return $response[0]; @@ -2335,29 +3529,23 @@ function ($response) { } /** - * Operation importRolesImportAsyncWithHttpInfo + * Operation listPaymentsCsvMappingsImportAsyncWithHttpInfo * - * Import EmployeeRoles from csv file + * List PaymentsCsvMappings * - * @param string $employerId (required) - * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) - * @param bool|null $allowUpdates (optional, default to false) - * @param \SplFileObject|null $file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importRolesImport'] to see the possible values for this operation + * @param string $employerId The Id of the Employer for which you want to list mappings (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaymentsCsvMappingsImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function importRolesImportAsyncWithHttpInfo( + public function listPaymentsCsvMappingsImportAsyncWithHttpInfo( string $employerId, - ?bool $previewOnly = false, - ?bool $allowUpdates = false, - ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importRolesImport'][0] + string $contentType = self::contentTypes['listPaymentsCsvMappingsImport'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->importRolesImportRequest($employerId, $previewOnly, $allowUpdates, $file, $contentType); + $request = $this->listPaymentsCsvMappingsImportRequest($employerId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2396,62 +3584,35 @@ function ($exception) { } /** - * Create request for operation 'importRolesImport' + * Create request for operation 'listPaymentsCsvMappingsImport' * - * @param string $employerId (required) - * @param bool|null $previewOnly Set to true and nothing will be imported but you'll be shown a preview of the data. (optional, default to false) - * @param bool|null $allowUpdates (optional, default to false) - * @param \SplFileObject|null $file (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['importRolesImport'] to see the possible values for this operation + * @param string $employerId The Id of the Employer for which you want to list mappings (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaymentsCsvMappingsImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function importRolesImportRequest( + public function listPaymentsCsvMappingsImportRequest( string $employerId, - ?bool $previewOnly = false, - ?bool $allowUpdates = false, - ?\SplFileObject $file = null, - string $contentType = self::contentTypes['importRolesImport'][0] + string $contentType = self::contentTypes['listPaymentsCsvMappingsImport'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling importRolesImport' + 'Missing the required parameter $employerId when calling listPaymentsCsvMappingsImport' ); } - - - - $resourcePath = '/employers/{employerId}/import/import'; + $resourcePath = '/employers/{employerId}/import/payments/mappings'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $previewOnly, - 'previewOnly', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $allowUpdates, - 'allowUpdates', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -2463,20 +3624,6 @@ public function importRolesImportRequest( ); } - // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -2528,7 +3675,7 @@ public function importRolesImportRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -2536,44 +3683,48 @@ public function importRolesImportRequest( } /** - * Operation listPaymentsCsvMappingsImport + * Operation paymentsCsvMappingCsvFileImport * - * List PaymentsCsvMappings + * Get PaymentsCsvMapping CSV File * - * @param string $employerId The Id of the Employer for which you want to list mappings (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaymentsCsvMappingsImport'] to see the possible values for this operation + * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) + * @param string $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingCsvFileImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\ReportResponse */ - public function listPaymentsCsvMappingsImport( + public function paymentsCsvMappingCsvFileImport( string $employerId, - string $contentType = self::contentTypes['listPaymentsCsvMappingsImport'][0] - ): array + string $id, + string $contentType = self::contentTypes['paymentsCsvMappingCsvFileImport'][0] + ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->listPaymentsCsvMappingsImportWithHttpInfo($employerId, $contentType); + list($response) = $this->paymentsCsvMappingCsvFileImportWithHttpInfo($employerId, $id, $contentType); return $response; } /** - * Operation listPaymentsCsvMappingsImportWithHttpInfo + * Operation paymentsCsvMappingCsvFileImportWithHttpInfo * - * List PaymentsCsvMappings + * Get PaymentsCsvMapping CSV File * - * @param string $employerId The Id of the Employer for which you want to list mappings (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaymentsCsvMappingsImport'] to see the possible values for this operation + * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) + * @param string $id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingCsvFileImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function listPaymentsCsvMappingsImportWithHttpInfo( + public function paymentsCsvMappingCsvFileImportWithHttpInfo( string $employerId, - string $contentType = self::contentTypes['listPaymentsCsvMappingsImport'][0] + string $id, + string $contentType = self::contentTypes['paymentsCsvMappingCsvFileImport'][0] ): array { - $request = $this->listPaymentsCsvMappingsImportRequest($employerId, $contentType); + $request = $this->paymentsCsvMappingCsvFileImportRequest($employerId, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -2597,36 +3748,15 @@ public function listPaymentsCsvMappingsImportWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2641,66 +3771,46 @@ public function listPaymentsCsvMappingsImportWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\Item[]', + '\SynergiTech\Staffology\Model\ReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation listPaymentsCsvMappingsImportAsync + * Operation paymentsCsvMappingCsvFileImportAsync * - * List PaymentsCsvMappings + * Get PaymentsCsvMapping CSV File * - * @param string $employerId The Id of the Employer for which you want to list mappings (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaymentsCsvMappingsImport'] to see the possible values for this operation + * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) + * @param string $id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingCsvFileImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function listPaymentsCsvMappingsImportAsync( + public function paymentsCsvMappingCsvFileImportAsync( string $employerId, - string $contentType = self::contentTypes['listPaymentsCsvMappingsImport'][0] + string $id, + string $contentType = self::contentTypes['paymentsCsvMappingCsvFileImport'][0] ): PromiseInterface { - return $this->listPaymentsCsvMappingsImportAsyncWithHttpInfo($employerId, $contentType) + return $this->paymentsCsvMappingCsvFileImportAsyncWithHttpInfo($employerId, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -2709,23 +3819,25 @@ function ($response) { } /** - * Operation listPaymentsCsvMappingsImportAsyncWithHttpInfo + * Operation paymentsCsvMappingCsvFileImportAsyncWithHttpInfo * - * List PaymentsCsvMappings + * Get PaymentsCsvMapping CSV File * - * @param string $employerId The Id of the Employer for which you want to list mappings (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaymentsCsvMappingsImport'] to see the possible values for this operation + * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) + * @param string $id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingCsvFileImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function listPaymentsCsvMappingsImportAsyncWithHttpInfo( + public function paymentsCsvMappingCsvFileImportAsyncWithHttpInfo( string $employerId, - string $contentType = self::contentTypes['listPaymentsCsvMappingsImport'][0] + string $id, + string $contentType = self::contentTypes['paymentsCsvMappingCsvFileImport'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->listPaymentsCsvMappingsImportRequest($employerId, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; + $request = $this->paymentsCsvMappingCsvFileImportRequest($employerId, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2764,29 +3876,38 @@ function ($exception) { } /** - * Create request for operation 'listPaymentsCsvMappingsImport' + * Create request for operation 'paymentsCsvMappingCsvFileImport' * - * @param string $employerId The Id of the Employer for which you want to list mappings (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaymentsCsvMappingsImport'] to see the possible values for this operation + * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) + * @param string $id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingCsvFileImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listPaymentsCsvMappingsImportRequest( + public function paymentsCsvMappingCsvFileImportRequest( string $employerId, - string $contentType = self::contentTypes['listPaymentsCsvMappingsImport'][0] + string $id, + string $contentType = self::contentTypes['paymentsCsvMappingCsvFileImport'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling listPaymentsCsvMappingsImport' + 'Missing the required parameter $employerId when calling paymentsCsvMappingCsvFileImport' + ); + } + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling paymentsCsvMappingCsvFileImport' ); } - $resourcePath = '/employers/{employerId}/import/payments/mappings'; + $resourcePath = '/employers/{employerId}/import/payments/mappings/{id}/csv'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2803,6 +3924,14 @@ public function listPaymentsCsvMappingsImportRequest( $resourcePath ); } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -2863,48 +3992,48 @@ public function listPaymentsCsvMappingsImportRequest( } /** - * Operation paymentsCsvMappingCsvFileImport + * Operation paymentsCsvMappingImport * - * Get PaymentsCsvMapping CSV File + * Get PaymentsCsvMapping * * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) * @param string $id id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingCsvFileImport'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ReportResponse + * @return \SynergiTech\Staffology\Model\PaymentsCsvMapping */ - public function paymentsCsvMappingCsvFileImport( + public function paymentsCsvMappingImport( string $employerId, string $id, - string $contentType = self::contentTypes['paymentsCsvMappingCsvFileImport'][0] - ): \SynergiTech\Staffology\Model\ReportResponse + string $contentType = self::contentTypes['paymentsCsvMappingImport'][0] + ): \SynergiTech\Staffology\Model\PaymentsCsvMapping { - list($response) = $this->paymentsCsvMappingCsvFileImportWithHttpInfo($employerId, $id, $contentType); + list($response) = $this->paymentsCsvMappingImportWithHttpInfo($employerId, $id, $contentType); return $response; } /** - * Operation paymentsCsvMappingCsvFileImportWithHttpInfo + * Operation paymentsCsvMappingImportWithHttpInfo * - * Get PaymentsCsvMapping CSV File + * Get PaymentsCsvMapping * * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingCsvFileImport'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\PaymentsCsvMapping, HTTP status code, HTTP response headers (array of strings) */ - public function paymentsCsvMappingCsvFileImportWithHttpInfo( + public function paymentsCsvMappingImportWithHttpInfo( string $employerId, string $id, - string $contentType = self::contentTypes['paymentsCsvMappingCsvFileImport'][0] + string $contentType = self::contentTypes['paymentsCsvMappingImport'][0] ): array { - $request = $this->paymentsCsvMappingCsvFileImportRequest($employerId, $id, $contentType); + $request = $this->paymentsCsvMappingImportRequest($employerId, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -2928,36 +4057,15 @@ public function paymentsCsvMappingCsvFileImportWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaymentsCsvMapping', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2972,68 +4080,46 @@ public function paymentsCsvMappingCsvFileImportWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaymentsCsvMapping', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ReportResponse', + '\SynergiTech\Staffology\Model\PaymentsCsvMapping', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation paymentsCsvMappingCsvFileImportAsync + * Operation paymentsCsvMappingImportAsync * - * Get PaymentsCsvMapping CSV File + * Get PaymentsCsvMapping * * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingCsvFileImport'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function paymentsCsvMappingCsvFileImportAsync( + public function paymentsCsvMappingImportAsync( string $employerId, string $id, - string $contentType = self::contentTypes['paymentsCsvMappingCsvFileImport'][0] + string $contentType = self::contentTypes['paymentsCsvMappingImport'][0] ): PromiseInterface { - return $this->paymentsCsvMappingCsvFileImportAsyncWithHttpInfo($employerId, $id, $contentType) + return $this->paymentsCsvMappingImportAsyncWithHttpInfo($employerId, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -3042,25 +4128,25 @@ function ($response) { } /** - * Operation paymentsCsvMappingCsvFileImportAsyncWithHttpInfo + * Operation paymentsCsvMappingImportAsyncWithHttpInfo * - * Get PaymentsCsvMapping CSV File + * Get PaymentsCsvMapping * * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingCsvFileImport'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function paymentsCsvMappingCsvFileImportAsyncWithHttpInfo( + public function paymentsCsvMappingImportAsyncWithHttpInfo( string $employerId, string $id, - string $contentType = self::contentTypes['paymentsCsvMappingCsvFileImport'][0] + string $contentType = self::contentTypes['paymentsCsvMappingImport'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->paymentsCsvMappingCsvFileImportRequest($employerId, $id, $contentType); + $returnType = '\SynergiTech\Staffology\Model\PaymentsCsvMapping'; + $request = $this->paymentsCsvMappingImportRequest($employerId, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3099,38 +4185,38 @@ function ($exception) { } /** - * Create request for operation 'paymentsCsvMappingCsvFileImport' + * Create request for operation 'paymentsCsvMappingImport' * * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingCsvFileImport'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function paymentsCsvMappingCsvFileImportRequest( + public function paymentsCsvMappingImportRequest( string $employerId, string $id, - string $contentType = self::contentTypes['paymentsCsvMappingCsvFileImport'][0] + string $contentType = self::contentTypes['paymentsCsvMappingImport'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling paymentsCsvMappingCsvFileImport' + 'Missing the required parameter $employerId when calling paymentsCsvMappingImport' ); } // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling paymentsCsvMappingCsvFileImport' + 'Missing the required parameter $id when calling paymentsCsvMappingImport' ); } - $resourcePath = '/employers/{employerId}/import/payments/mappings/{id}/csv'; + $resourcePath = '/employers/{employerId}/import/payments/mappings/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3215,48 +4301,52 @@ public function paymentsCsvMappingCsvFileImportRequest( } /** - * Operation paymentsCsvMappingImport + * Operation pensionImportCsvImport * - * Get PaymentsCsvMapping + * Import PensionMemberships from csv file (async) * - * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) - * @param string $id id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingImport'] to see the possible values for this operation + * @param string $employerId The employer id. (required) + * @param bool|null $allowUpdates If set to true, and if the pension membership matches an existing one, then that membership will be updated. (optional, default to false) + * @param \SplFileObject|null $file file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['pensionImportCsvImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PaymentsCsvMapping + * @return \SynergiTech\Staffology\Model\ContractJobResponse|null */ - public function paymentsCsvMappingImport( + public function pensionImportCsvImport( string $employerId, - string $id, - string $contentType = self::contentTypes['paymentsCsvMappingImport'][0] - ): \SynergiTech\Staffology\Model\PaymentsCsvMapping + ?bool $allowUpdates = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['pensionImportCsvImport'][0] + ): ?\SynergiTech\Staffology\Model\ContractJobResponse { - list($response) = $this->paymentsCsvMappingImportWithHttpInfo($employerId, $id, $contentType); + list($response) = $this->pensionImportCsvImportWithHttpInfo($employerId, $allowUpdates, $file, $contentType); return $response; } /** - * Operation paymentsCsvMappingImportWithHttpInfo + * Operation pensionImportCsvImportWithHttpInfo * - * Get PaymentsCsvMapping + * Import PensionMemberships from csv file (async) * - * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) - * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingImport'] to see the possible values for this operation + * @param string $employerId The employer id. (required) + * @param bool|null $allowUpdates If set to true, and if the pension membership matches an existing one, then that membership will be updated. (optional, default to false) + * @param \SplFileObject|null $file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['pensionImportCsvImport'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\PaymentsCsvMapping, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractJobResponse, HTTP status code, HTTP response headers (array of strings) */ - public function paymentsCsvMappingImportWithHttpInfo( + public function pensionImportCsvImportWithHttpInfo( string $employerId, - string $id, - string $contentType = self::contentTypes['paymentsCsvMappingImport'][0] + ?bool $allowUpdates = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['pensionImportCsvImport'][0] ): array { - $request = $this->paymentsCsvMappingImportRequest($employerId, $id, $contentType); + $request = $this->pensionImportCsvImportRequest($employerId, $allowUpdates, $file, $contentType); try { $options = $this->createHttpClientOption(); @@ -3280,36 +4370,15 @@ public function paymentsCsvMappingImportWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - if (in_array('\SynergiTech\Staffology\Model\PaymentsCsvMapping', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PaymentsCsvMapping' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PaymentsCsvMapping', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + case 202: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3324,68 +4393,48 @@ public function paymentsCsvMappingImportWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PaymentsCsvMapping'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 202: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\PaymentsCsvMapping', + '\SynergiTech\Staffology\Model\ContractJobResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation paymentsCsvMappingImportAsync + * Operation pensionImportCsvImportAsync * - * Get PaymentsCsvMapping + * Import PensionMemberships from csv file (async) * - * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) - * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingImport'] to see the possible values for this operation + * @param string $employerId The employer id. (required) + * @param bool|null $allowUpdates If set to true, and if the pension membership matches an existing one, then that membership will be updated. (optional, default to false) + * @param \SplFileObject|null $file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['pensionImportCsvImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function paymentsCsvMappingImportAsync( + public function pensionImportCsvImportAsync( string $employerId, - string $id, - string $contentType = self::contentTypes['paymentsCsvMappingImport'][0] + ?bool $allowUpdates = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['pensionImportCsvImport'][0] ): PromiseInterface { - return $this->paymentsCsvMappingImportAsyncWithHttpInfo($employerId, $id, $contentType) + return $this->pensionImportCsvImportAsyncWithHttpInfo($employerId, $allowUpdates, $file, $contentType) ->then( function ($response) { return $response[0]; @@ -3394,25 +4443,27 @@ function ($response) { } /** - * Operation paymentsCsvMappingImportAsyncWithHttpInfo + * Operation pensionImportCsvImportAsyncWithHttpInfo * - * Get PaymentsCsvMapping + * Import PensionMemberships from csv file (async) * - * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) - * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingImport'] to see the possible values for this operation + * @param string $employerId The employer id. (required) + * @param bool|null $allowUpdates If set to true, and if the pension membership matches an existing one, then that membership will be updated. (optional, default to false) + * @param \SplFileObject|null $file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['pensionImportCsvImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function paymentsCsvMappingImportAsyncWithHttpInfo( + public function pensionImportCsvImportAsyncWithHttpInfo( string $employerId, - string $id, - string $contentType = self::contentTypes['paymentsCsvMappingImport'][0] + ?bool $allowUpdates = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['pensionImportCsvImport'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\PaymentsCsvMapping'; - $request = $this->paymentsCsvMappingImportRequest($employerId, $id, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ContractJobResponse'; + $request = $this->pensionImportCsvImportRequest($employerId, $allowUpdates, $file, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3451,44 +4502,50 @@ function ($exception) { } /** - * Create request for operation 'paymentsCsvMappingImport' + * Create request for operation 'pensionImportCsvImport' * - * @param string $employerId The Id of the Employer to which the PaymentCsvMapping belongs. (required) - * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['paymentsCsvMappingImport'] to see the possible values for this operation + * @param string $employerId The employer id. (required) + * @param bool|null $allowUpdates If set to true, and if the pension membership matches an existing one, then that membership will be updated. (optional, default to false) + * @param \SplFileObject|null $file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['pensionImportCsvImport'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function paymentsCsvMappingImportRequest( + public function pensionImportCsvImportRequest( string $employerId, - string $id, - string $contentType = self::contentTypes['paymentsCsvMappingImport'][0] + ?bool $allowUpdates = false, + ?\SplFileObject $file = null, + string $contentType = self::contentTypes['pensionImportCsvImport'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling paymentsCsvMappingImport' + 'Missing the required parameter $employerId when calling pensionImportCsvImport' ); } - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $id when calling paymentsCsvMappingImport' - ); - } - $resourcePath = '/employers/{employerId}/import/payments/mappings/{id}'; + + $resourcePath = '/employers/{employerId}/import/pensionmemberships/async'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $allowUpdates, + 'allowUpdates', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -3499,15 +4556,16 @@ public function paymentsCsvMappingImportRequest( $resourcePath ); } - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } + // form params + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -3559,7 +4617,7 @@ public function paymentsCsvMappingImportRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3636,36 +4694,15 @@ public function updatePaymentsCsvMappingImportWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PaymentsCsvMapping', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PaymentsCsvMapping' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PaymentsCsvMapping', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaymentsCsvMapping', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3680,34 +4717,11 @@ public function updatePaymentsCsvMappingImportWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PaymentsCsvMapping'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaymentsCsvMapping', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3717,8 +4731,9 @@ public function updatePaymentsCsvMappingImportWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3954,4 +4969,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/InvitationApi.php b/src/Api/InvitationApi.php index 49fff9e..8e1e06f 100644 --- a/src/Api/InvitationApi.php +++ b/src/Api/InvitationApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -76,10 +79,10 @@ class InvitationApi 'application/json', ], 'createInvitation' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteInvitation' => [ 'application/json', @@ -205,10 +208,10 @@ public function acceptInvitationWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -406,14 +409,14 @@ public function acceptInvitationRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Invitation + * @return \SynergiTech\Staffology\Model\Invitation|null */ public function createInvitation( string $employerId, ?bool $autoAccept = null, ?\SynergiTech\Staffology\Model\Invitation $invitation = null, string $contentType = self::contentTypes['createInvitation'][0] - ): \SynergiTech\Staffology\Model\Invitation + ): ?\SynergiTech\Staffology\Model\Invitation { list($response) = $this->createInvitationWithHttpInfo($employerId, $autoAccept, $invitation, $contentType); return $response; @@ -431,7 +434,7 @@ public function createInvitation( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\Invitation, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Invitation, HTTP status code, HTTP response headers (array of strings) */ public function createInvitationWithHttpInfo( string $employerId, @@ -464,36 +467,15 @@ public function createInvitationWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\Invitation', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Invitation' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Invitation', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Invitation', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -508,34 +490,11 @@ public function createInvitationWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Invitation'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Invitation', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -545,8 +504,9 @@ public function createInvitationWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -826,10 +786,10 @@ public function deleteInvitationWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1086,36 +1046,15 @@ public function getInvitationWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Invitation', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Invitation' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Invitation', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Invitation', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1130,34 +1069,11 @@ public function getInvitationWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Invitation'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Invitation', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1167,8 +1083,9 @@ public function getInvitationWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1434,36 +1351,15 @@ public function indexInvitationWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1478,34 +1374,11 @@ public function indexInvitationWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1515,8 +1388,9 @@ public function indexInvitationWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1717,4 +1591,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/JobApi.php b/src/Api/JobApi.php index b5673c0..ec7c4eb 100644 --- a/src/Api/JobApi.php +++ b/src/Api/JobApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -194,10 +197,10 @@ public function deleteCompletedJobsJobWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -358,14 +361,14 @@ public function deleteCompletedJobsJobRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractJobErrorResponse[] + * @return \SynergiTech\Staffology\Model\ContractJobErrorResponse[]|null */ public function getJobErrorsByJobIdJob( string $jobId, ?int $pageNum = 0, ?int $pageSize = 10, string $contentType = self::contentTypes['getJobErrorsByJobIdJob'][0] - ): array + ): ?array { list($response) = $this->getJobErrorsByJobIdJobWithHttpInfo($jobId, $pageNum, $pageSize, $contentType); return $response; @@ -416,36 +419,15 @@ public function getJobErrorsByJobIdJobWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractJobErrorResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractJobErrorResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractJobErrorResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobErrorResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -460,34 +442,11 @@ public function getJobErrorsByJobIdJobWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractJobErrorResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobErrorResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -497,8 +456,9 @@ public function getJobErrorsByJobIdJobWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -723,12 +683,12 @@ public function getJobErrorsByJobIdJobRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractJobResponse + * @return \SynergiTech\Staffology\Model\ContractJobResponse|null */ public function getJobJob( string $jobId, string $contentType = self::contentTypes['getJobJob'][0] - ): \SynergiTech\Staffology\Model\ContractJobResponse + ): ?\SynergiTech\Staffology\Model\ContractJobResponse { list($response) = $this->getJobJobWithHttpInfo($jobId, $contentType); return $response; @@ -775,36 +735,15 @@ public function getJobJobWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractJobResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractJobResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractJobResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -819,34 +758,11 @@ public function getJobJobWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractJobResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -856,8 +772,9 @@ public function getJobJobWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1053,7 +970,7 @@ public function getJobJobRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractJobResponse[] + * @return \SynergiTech\Staffology\Model\ContractJobResponse[]|null */ public function getJobsListJob( ?string $employerId = null, @@ -1061,7 +978,7 @@ public function getJobsListJob( ?int $pageNum = null, ?int $pageSize = null, string $contentType = self::contentTypes['getJobsListJob'][0] - ): array + ): ?array { list($response) = $this->getJobsListJobWithHttpInfo($employerId, $jobType, $pageNum, $pageSize, $contentType); return $response; @@ -1114,36 +1031,15 @@ public function getJobsListJobWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractJobResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractJobResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractJobResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1158,34 +1054,11 @@ public function getJobsListJobWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractJobResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1195,8 +1068,9 @@ public function getJobsListJobWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1432,12 +1306,12 @@ public function getJobsListJobRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SplFileObject + * @return \SplFileObject|null */ public function getReportJobResultJob( string $jobId, string $contentType = self::contentTypes['getReportJobResultJob'][0] - ): \SplFileObject + ): ?\SplFileObject { list($response) = $this->getReportJobResultJobWithHttpInfo($jobId, $contentType); return $response; @@ -1484,36 +1358,15 @@ public function getReportJobResultJobWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SplFileObject', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SplFileObject' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1528,34 +1381,11 @@ public function getReportJobResultJobWithHttpInfo( ); } - $returnType = '\SplFileObject'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1565,8 +1395,9 @@ public function getReportJobResultJobWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1767,4 +1598,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/JournalTemplateApi.php b/src/Api/JournalTemplateApi.php index e129ffe..7feb6ff 100644 --- a/src/Api/JournalTemplateApi.php +++ b/src/Api/JournalTemplateApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,19 +76,19 @@ class JournalTemplateApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createJournalTemplate' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'getJournalTemplate' => [ 'application/json', ], 'updateJournalTemplate' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -146,13 +149,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\JournalTemplate + * @return \SynergiTech\Staffology\Model\JournalTemplate|null */ public function createJournalTemplate( string $employerId, ?\SynergiTech\Staffology\Model\ContractJournalTemplateRequest $contractJournalTemplateRequest = null, string $contentType = self::contentTypes['createJournalTemplate'][0] - ): \SynergiTech\Staffology\Model\JournalTemplate + ): ?\SynergiTech\Staffology\Model\JournalTemplate { list($response) = $this->createJournalTemplateWithHttpInfo($employerId, $contractJournalTemplateRequest, $contentType); return $response; @@ -169,7 +172,7 @@ public function createJournalTemplate( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\JournalTemplate, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\JournalTemplate, HTTP status code, HTTP response headers (array of strings) */ public function createJournalTemplateWithHttpInfo( string $employerId, @@ -201,36 +204,15 @@ public function createJournalTemplateWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\JournalTemplate', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\JournalTemplate' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\JournalTemplate', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\JournalTemplate', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -245,34 +227,11 @@ public function createJournalTemplateWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\JournalTemplate'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\JournalTemplate', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -282,8 +241,9 @@ public function createJournalTemplateWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -417,7 +377,7 @@ public function createJournalTemplateRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -490,12 +450,12 @@ public function createJournalTemplateRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractJournalTemplateResponse + * @return \SynergiTech\Staffology\Model\ContractJournalTemplateResponse|null */ public function getJournalTemplate( string $employerId, string $contentType = self::contentTypes['getJournalTemplate'][0] - ): \SynergiTech\Staffology\Model\ContractJournalTemplateResponse + ): ?\SynergiTech\Staffology\Model\ContractJournalTemplateResponse { list($response) = $this->getJournalTemplateWithHttpInfo($employerId, $contentType); return $response; @@ -511,7 +471,7 @@ public function getJournalTemplate( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractJournalTemplateResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractJournalTemplateResponse, HTTP status code, HTTP response headers (array of strings) */ public function getJournalTemplateWithHttpInfo( string $employerId, @@ -542,36 +502,15 @@ public function getJournalTemplateWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractJournalTemplateResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractJournalTemplateResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractJournalTemplateResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJournalTemplateResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -586,34 +525,11 @@ public function getJournalTemplateWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractJournalTemplateResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJournalTemplateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -623,8 +539,9 @@ public function getJournalTemplateWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -751,7 +668,7 @@ public function getJournalTemplateRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -877,36 +794,15 @@ public function updateJournalTemplateWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractJournalTemplateResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractJournalTemplateResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractJournalTemplateResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJournalTemplateResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -921,34 +817,11 @@ public function updateJournalTemplateWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractJournalTemplateResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJournalTemplateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -958,8 +831,9 @@ public function updateJournalTemplateWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1114,7 +988,7 @@ public function updateJournalTemplateRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1195,4 +1069,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/JournalTokenApi.php b/src/Api/JournalTokenApi.php index 6135814..5917a9d 100644 --- a/src/Api/JournalTokenApi.php +++ b/src/Api/JournalTokenApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,22 +76,22 @@ class JournalTokenApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createCostCentreJournalOverridesJournalToken' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createDepartmentJournalOverridesJournalToken' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createJournalToken' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteJournalToken' => [ 'application/json', @@ -106,22 +109,22 @@ class JournalTokenApi 'application/json', ], 'updateCostCentreJournalOverridesJournalToken' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateDepartmentJournalOverridesJournalToken' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateJournalToken' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -183,14 +186,14 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[] + * @return \SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]|null */ public function createCostCentreJournalOverridesJournalToken( string $employerId, string $costCentreId, ?array $contractCostCentreJournalOverridesRequest = null, string $contentType = self::contentTypes['createCostCentreJournalOverridesJournalToken'][0] - ): array + ): ?array { list($response) = $this->createCostCentreJournalOverridesJournalTokenWithHttpInfo($employerId, $costCentreId, $contractCostCentreJournalOverridesRequest, $contentType); return $response; @@ -208,7 +211,7 @@ public function createCostCentreJournalOverridesJournalToken( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[], HTTP status code, HTTP response headers (array of strings) */ public function createCostCentreJournalOverridesJournalTokenWithHttpInfo( string $employerId, @@ -241,36 +244,15 @@ public function createCostCentreJournalOverridesJournalTokenWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -285,34 +267,11 @@ public function createCostCentreJournalOverridesJournalTokenWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -322,8 +281,9 @@ public function createCostCentreJournalOverridesJournalTokenWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -478,7 +438,7 @@ public function createCostCentreJournalOverridesJournalTokenRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -553,14 +513,14 @@ public function createCostCentreJournalOverridesJournalTokenRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[] + * @return \SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]|null */ public function createDepartmentJournalOverridesJournalToken( string $employerId, string $departmentId, ?array $contractDepartmentJournalOverridesRequest = null, string $contentType = self::contentTypes['createDepartmentJournalOverridesJournalToken'][0] - ): array + ): ?array { list($response) = $this->createDepartmentJournalOverridesJournalTokenWithHttpInfo($employerId, $departmentId, $contractDepartmentJournalOverridesRequest, $contentType); return $response; @@ -578,7 +538,7 @@ public function createDepartmentJournalOverridesJournalToken( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[], HTTP status code, HTTP response headers (array of strings) */ public function createDepartmentJournalOverridesJournalTokenWithHttpInfo( string $employerId, @@ -611,36 +571,15 @@ public function createDepartmentJournalOverridesJournalTokenWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -655,34 +594,11 @@ public function createDepartmentJournalOverridesJournalTokenWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -692,8 +608,9 @@ public function createDepartmentJournalOverridesJournalTokenWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -848,7 +765,7 @@ public function createDepartmentJournalOverridesJournalTokenRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -922,13 +839,13 @@ public function createDepartmentJournalOverridesJournalTokenRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractJournalTokenResponse + * @return \SynergiTech\Staffology\Model\ContractJournalTokenResponse|null */ public function createJournalToken( string $employerId, ?\SynergiTech\Staffology\Model\ContractJournalTokenRequest $contractJournalTokenRequest = null, string $contentType = self::contentTypes['createJournalToken'][0] - ): \SynergiTech\Staffology\Model\ContractJournalTokenResponse + ): ?\SynergiTech\Staffology\Model\ContractJournalTokenResponse { list($response) = $this->createJournalTokenWithHttpInfo($employerId, $contractJournalTokenRequest, $contentType); return $response; @@ -945,7 +862,7 @@ public function createJournalToken( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractJournalTokenResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractJournalTokenResponse, HTTP status code, HTTP response headers (array of strings) */ public function createJournalTokenWithHttpInfo( string $employerId, @@ -977,36 +894,15 @@ public function createJournalTokenWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractJournalTokenResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractJournalTokenResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractJournalTokenResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJournalTokenResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1021,34 +917,11 @@ public function createJournalTokenWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractJournalTokenResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJournalTokenResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -1058,8 +931,9 @@ public function createJournalTokenWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1193,7 +1067,7 @@ public function createJournalTokenRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1323,10 +1197,10 @@ public function deleteJournalTokenWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1528,13 +1402,13 @@ public function deleteJournalTokenRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponseItem[] + * @return \SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponseItem[]|null */ public function getCostCentreJournalOverridesListJournalToken( string $employerId, string $costCentreId, string $contentType = self::contentTypes['getCostCentreJournalOverridesListJournalToken'][0] - ): array + ): ?array { list($response) = $this->getCostCentreJournalOverridesListJournalTokenWithHttpInfo($employerId, $costCentreId, $contentType); return $response; @@ -1551,7 +1425,7 @@ public function getCostCentreJournalOverridesListJournalToken( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponseItem[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponseItem[], HTTP status code, HTTP response headers (array of strings) */ public function getCostCentreJournalOverridesListJournalTokenWithHttpInfo( string $employerId, @@ -1583,36 +1457,15 @@ public function getCostCentreJournalOverridesListJournalTokenWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponseItem[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponseItem[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponseItem[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponseItem[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1627,34 +1480,11 @@ public function getCostCentreJournalOverridesListJournalTokenWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponseItem[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponseItem[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1664,8 +1494,9 @@ public function getCostCentreJournalOverridesListJournalTokenWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1813,7 +1644,7 @@ public function getCostCentreJournalOverridesListJournalTokenRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1880,13 +1711,13 @@ public function getCostCentreJournalOverridesListJournalTokenRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponseItem[] + * @return \SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponseItem[]|null */ public function getDepartmentJournalOverridesListJournalToken( string $employerId, string $departmentId, string $contentType = self::contentTypes['getDepartmentJournalOverridesListJournalToken'][0] - ): array + ): ?array { list($response) = $this->getDepartmentJournalOverridesListJournalTokenWithHttpInfo($employerId, $departmentId, $contentType); return $response; @@ -1903,7 +1734,7 @@ public function getDepartmentJournalOverridesListJournalToken( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponseItem[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponseItem[], HTTP status code, HTTP response headers (array of strings) */ public function getDepartmentJournalOverridesListJournalTokenWithHttpInfo( string $employerId, @@ -1935,36 +1766,15 @@ public function getDepartmentJournalOverridesListJournalTokenWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponseItem[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponseItem[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponseItem[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponseItem[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1979,34 +1789,11 @@ public function getDepartmentJournalOverridesListJournalTokenWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponseItem[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponseItem[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2016,8 +1803,9 @@ public function getDepartmentJournalOverridesListJournalTokenWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2165,7 +1953,7 @@ public function getDepartmentJournalOverridesListJournalTokenRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2232,13 +2020,13 @@ public function getDepartmentJournalOverridesListJournalTokenRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractJournalTokenResponse + * @return \SynergiTech\Staffology\Model\ContractJournalTokenResponse|null */ public function getJournalToken( string $employerId, string $id, string $contentType = self::contentTypes['getJournalToken'][0] - ): \SynergiTech\Staffology\Model\ContractJournalTokenResponse + ): ?\SynergiTech\Staffology\Model\ContractJournalTokenResponse { list($response) = $this->getJournalTokenWithHttpInfo($employerId, $id, $contentType); return $response; @@ -2255,7 +2043,7 @@ public function getJournalToken( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractJournalTokenResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractJournalTokenResponse, HTTP status code, HTTP response headers (array of strings) */ public function getJournalTokenWithHttpInfo( string $employerId, @@ -2287,36 +2075,15 @@ public function getJournalTokenWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractJournalTokenResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractJournalTokenResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractJournalTokenResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJournalTokenResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2331,34 +2098,11 @@ public function getJournalTokenWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractJournalTokenResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJournalTokenResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2368,8 +2112,9 @@ public function getJournalTokenWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2517,7 +2262,7 @@ public function getJournalTokenRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2583,12 +2328,12 @@ public function getJournalTokenRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractJournalTokenResponseItem[] + * @return \SynergiTech\Staffology\Model\ContractJournalTokenResponseItem[]|null */ public function indexJournalToken( string $employerId, string $contentType = self::contentTypes['indexJournalToken'][0] - ): array + ): ?array { list($response) = $this->indexJournalTokenWithHttpInfo($employerId, $contentType); return $response; @@ -2604,7 +2349,7 @@ public function indexJournalToken( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractJournalTokenResponseItem[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractJournalTokenResponseItem[], HTTP status code, HTTP response headers (array of strings) */ public function indexJournalTokenWithHttpInfo( string $employerId, @@ -2635,36 +2380,15 @@ public function indexJournalTokenWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractJournalTokenResponseItem[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractJournalTokenResponseItem[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractJournalTokenResponseItem[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJournalTokenResponseItem[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2679,34 +2403,11 @@ public function indexJournalTokenWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractJournalTokenResponseItem[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJournalTokenResponseItem[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2716,8 +2417,9 @@ public function indexJournalTokenWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2844,7 +2546,7 @@ public function indexJournalTokenRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2912,14 +2614,14 @@ public function indexJournalTokenRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[] + * @return \SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]|null */ public function updateCostCentreJournalOverridesJournalToken( string $employerId, string $costCentreId, ?array $contractCostCentreJournalOverridesUpdateRequest = null, string $contentType = self::contentTypes['updateCostCentreJournalOverridesJournalToken'][0] - ): array + ): ?array { list($response) = $this->updateCostCentreJournalOverridesJournalTokenWithHttpInfo($employerId, $costCentreId, $contractCostCentreJournalOverridesUpdateRequest, $contentType); return $response; @@ -2937,7 +2639,7 @@ public function updateCostCentreJournalOverridesJournalToken( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[], HTTP status code, HTTP response headers (array of strings) */ public function updateCostCentreJournalOverridesJournalTokenWithHttpInfo( string $employerId, @@ -2970,36 +2672,15 @@ public function updateCostCentreJournalOverridesJournalTokenWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3014,34 +2695,11 @@ public function updateCostCentreJournalOverridesJournalTokenWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractCostCentreJournalOverridesResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3051,8 +2709,9 @@ public function updateCostCentreJournalOverridesJournalTokenWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3207,7 +2866,7 @@ public function updateCostCentreJournalOverridesJournalTokenRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -3282,14 +2941,14 @@ public function updateCostCentreJournalOverridesJournalTokenRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[] + * @return \SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]|null */ public function updateDepartmentJournalOverridesJournalToken( string $employerId, string $departmentId, ?array $contractDepartmentJournalOverridesUpdateRequest = null, string $contentType = self::contentTypes['updateDepartmentJournalOverridesJournalToken'][0] - ): array + ): ?array { list($response) = $this->updateDepartmentJournalOverridesJournalTokenWithHttpInfo($employerId, $departmentId, $contractDepartmentJournalOverridesUpdateRequest, $contentType); return $response; @@ -3307,7 +2966,7 @@ public function updateDepartmentJournalOverridesJournalToken( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[], HTTP status code, HTTP response headers (array of strings) */ public function updateDepartmentJournalOverridesJournalTokenWithHttpInfo( string $employerId, @@ -3340,36 +2999,15 @@ public function updateDepartmentJournalOverridesJournalTokenWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3384,34 +3022,11 @@ public function updateDepartmentJournalOverridesJournalTokenWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractDepartmentJournalOverridesResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3421,8 +3036,9 @@ public function updateDepartmentJournalOverridesJournalTokenWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3577,7 +3193,7 @@ public function updateDepartmentJournalOverridesJournalTokenRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -3710,36 +3326,15 @@ public function updateJournalTokenWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractJournalTokenResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractJournalTokenResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractJournalTokenResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJournalTokenResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3754,34 +3349,11 @@ public function updateJournalTokenWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractJournalTokenResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJournalTokenResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3791,8 +3363,9 @@ public function updateJournalTokenWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3947,7 +3520,7 @@ public function updateJournalTokenRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -4028,4 +3601,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/LeaveApi.php b/src/Api/LeaveApi.php index 4e8de5b..7c87807 100644 --- a/src/Api/LeaveApi.php +++ b/src/Api/LeaveApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -76,10 +79,10 @@ class LeaveApi 'multipart/form-data', ], 'createLeave' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteDocumentLeave' => [ 'application/json', @@ -102,14 +105,17 @@ class LeaveApi 'getOccupationalMaternityScheduleLeave' => [ 'application/json', ], + 'getRoleAssumedPensionablePayLeave' => [ + 'application/json', + ], 'indexLeave' => [ 'application/json', ], 'updateLeave' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -234,10 +240,10 @@ public function addDocumentLeaveWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -399,19 +405,14 @@ public function addDocumentLeaveRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( [], @@ -541,10 +542,10 @@ public function createLeaveWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -824,10 +825,10 @@ public function deleteDocumentLeaveWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1131,10 +1132,10 @@ public function deleteLeaveWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1428,36 +1429,15 @@ public function findLinkedPiwLeaveWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\LinkedPiw', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\LinkedPiw' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\LinkedPiw', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\LinkedPiw', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1472,34 +1452,11 @@ public function findLinkedPiwLeaveWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\LinkedPiw'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\LinkedPiw', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1509,8 +1466,9 @@ public function findLinkedPiwLeaveWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1791,7 +1749,7 @@ public function findLinkedPiwLeaveRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SplFileObject + * @return \SplFileObject|null */ public function getDocumentLeave( string $employerId, @@ -1799,7 +1757,7 @@ public function getDocumentLeave( string $id, string $documentId, string $contentType = self::contentTypes['getDocumentLeave'][0] - ): \SplFileObject + ): ?\SplFileObject { list($response) = $this->getDocumentLeaveWithHttpInfo($employerId, $employeeId, $id, $documentId, $contentType); return $response; @@ -1852,36 +1810,15 @@ public function getDocumentLeaveWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SplFileObject', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SplFileObject' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1896,34 +1833,11 @@ public function getDocumentLeaveWithHttpInfo( ); } - $returnType = '\SplFileObject'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1933,8 +1847,9 @@ public function getDocumentLeaveWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2192,14 +2107,14 @@ public function getDocumentLeaveRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Leave + * @return \SynergiTech\Staffology\Model\Leave|null */ public function getLeave( string $employerId, string $employeeId, string $id, string $contentType = self::contentTypes['getLeave'][0] - ): \SynergiTech\Staffology\Model\Leave + ): ?\SynergiTech\Staffology\Model\Leave { list($response) = $this->getLeaveWithHttpInfo($employerId, $employeeId, $id, $contentType); return $response; @@ -2250,36 +2165,15 @@ public function getLeaveWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Leave', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Leave' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Leave', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Leave', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2294,34 +2188,11 @@ public function getLeaveWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Leave'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Leave', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2331,8 +2202,9 @@ public function getLeaveWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2576,7 +2448,7 @@ public function getLeaveRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Item[]|null */ public function getMaternityLeaveScheduleLeave( string $employerId, @@ -2590,7 +2462,7 @@ public function getMaternityLeaveScheduleLeave( ?float $averageWeeklyEarnings = 0, ?bool $isReversed = false, string $contentType = self::contentTypes['getMaternityLeaveScheduleLeave'][0] - ): array + ): ?array { list($response) = $this->getMaternityLeaveScheduleLeaveWithHttpInfo($employerId, $employeeId, $babyDueDate, $leaveFrom, $leaveTo, $leaveType, $leavePayType, $payFrequency, $averageWeeklyEarnings, $isReversed, $contentType); return $response; @@ -2655,36 +2527,15 @@ public function getMaternityLeaveScheduleLeaveWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2699,34 +2550,11 @@ public function getMaternityLeaveScheduleLeaveWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2736,8 +2564,9 @@ public function getMaternityLeaveScheduleLeaveWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3081,14 +2910,14 @@ public function getMaternityLeaveScheduleLeaveRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Item[]|null */ public function getOccupationalMaternityScheduleLeave( string $employerId, string $employeeId, string $id, string $contentType = self::contentTypes['getOccupationalMaternityScheduleLeave'][0] - ): array + ): ?array { list($response) = $this->getOccupationalMaternityScheduleLeaveWithHttpInfo($employerId, $employeeId, $id, $contentType); return $response; @@ -3139,36 +2968,15 @@ public function getOccupationalMaternityScheduleLeaveWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3183,34 +2991,11 @@ public function getOccupationalMaternityScheduleLeaveWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3220,8 +3005,9 @@ public function getOccupationalMaternityScheduleLeaveWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3447,48 +3233,72 @@ public function getOccupationalMaternityScheduleLeaveRequest( } /** - * Operation indexLeave + * Operation getRoleAssumedPensionablePayLeave * - * List Leave + * Get Role Assumed Pensionable Pay * - * @param string $employerId employerId (required) - * @param string $employeeId employeeId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexLeave'] to see the possible values for this operation + * @param string $employerId The unique identifier of the employer (required) + * @param string $employeeId The unique identifier of the employee (required) + * @param string $id The unique identifier of the leave record (empty GUID for new leaves) (required) + * @param string $roleId The unique identifier of the employee role for which to calculate assumed pensionable pay (required) + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod The pay period (required for new leaves, ignored for existing leaves) (optional) + * @param \SynergiTech\Staffology\Model\LeaveType|null $leaveType The type of leave (required for new leaves, ignored for existing leaves) (optional) + * @param \SynergiTech\Staffology\Model\LeavePayType|null $leavePayType The leave payment type (required for new leaves, ignored for existing leaves) (optional) + * @param \DateTime|null $from The leave start date (required for new leaves, ignored for existing leaves) (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRoleAssumedPensionablePayLeave'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return float|null */ - public function indexLeave( + public function getRoleAssumedPensionablePayLeave( string $employerId, string $employeeId, - string $contentType = self::contentTypes['indexLeave'][0] - ): array + string $id, + string $roleId, + ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, + ?\SynergiTech\Staffology\Model\LeaveType $leaveType = null, + ?\SynergiTech\Staffology\Model\LeavePayType $leavePayType = null, + ?\DateTime $from = null, + string $contentType = self::contentTypes['getRoleAssumedPensionablePayLeave'][0] + ): ?float { - list($response) = $this->indexLeaveWithHttpInfo($employerId, $employeeId, $contentType); + list($response) = $this->getRoleAssumedPensionablePayLeaveWithHttpInfo($employerId, $employeeId, $id, $roleId, $payPeriod, $leaveType, $leavePayType, $from, $contentType); return $response; } /** - * Operation indexLeaveWithHttpInfo + * Operation getRoleAssumedPensionablePayLeaveWithHttpInfo * - * List Leave + * Get Role Assumed Pensionable Pay * - * @param string $employerId (required) - * @param string $employeeId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexLeave'] to see the possible values for this operation + * @param string $employerId The unique identifier of the employer (required) + * @param string $employeeId The unique identifier of the employee (required) + * @param string $id The unique identifier of the leave record (empty GUID for new leaves) (required) + * @param string $roleId The unique identifier of the employee role for which to calculate assumed pensionable pay (required) + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod The pay period (required for new leaves, ignored for existing leaves) (optional) + * @param \SynergiTech\Staffology\Model\LeaveType|null $leaveType The type of leave (required for new leaves, ignored for existing leaves) (optional) + * @param \SynergiTech\Staffology\Model\LeavePayType|null $leavePayType The leave payment type (required for new leaves, ignored for existing leaves) (optional) + * @param \DateTime|null $from The leave start date (required for new leaves, ignored for existing leaves) (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRoleAssumedPensionablePayLeave'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + * @return array of float, HTTP status code, HTTP response headers (array of strings) */ - public function indexLeaveWithHttpInfo( + public function getRoleAssumedPensionablePayLeaveWithHttpInfo( string $employerId, string $employeeId, - string $contentType = self::contentTypes['indexLeave'][0] + string $id, + string $roleId, + ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, + ?\SynergiTech\Staffology\Model\LeaveType $leaveType = null, + ?\SynergiTech\Staffology\Model\LeavePayType $leavePayType = null, + ?\DateTime $from = null, + string $contentType = self::contentTypes['getRoleAssumedPensionablePayLeave'][0] ): array { - $request = $this->indexLeaveRequest($employerId, $employeeId, $contentType); + $request = $this->getRoleAssumedPensionablePayLeaveRequest($employerId, $employeeId, $id, $roleId, $payPeriod, $leaveType, $leavePayType, $from, $contentType); try { $options = $this->createHttpClientOption(); @@ -3512,36 +3322,15 @@ public function indexLeaveWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3556,68 +3345,58 @@ public function indexLeaveWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\Item[]', + 'float', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation indexLeaveAsync + * Operation getRoleAssumedPensionablePayLeaveAsync * - * List Leave + * Get Role Assumed Pensionable Pay * - * @param string $employerId (required) - * @param string $employeeId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexLeave'] to see the possible values for this operation + * @param string $employerId The unique identifier of the employer (required) + * @param string $employeeId The unique identifier of the employee (required) + * @param string $id The unique identifier of the leave record (empty GUID for new leaves) (required) + * @param string $roleId The unique identifier of the employee role for which to calculate assumed pensionable pay (required) + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod The pay period (required for new leaves, ignored for existing leaves) (optional) + * @param \SynergiTech\Staffology\Model\LeaveType|null $leaveType The type of leave (required for new leaves, ignored for existing leaves) (optional) + * @param \SynergiTech\Staffology\Model\LeavePayType|null $leavePayType The leave payment type (required for new leaves, ignored for existing leaves) (optional) + * @param \DateTime|null $from The leave start date (required for new leaves, ignored for existing leaves) (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRoleAssumedPensionablePayLeave'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function indexLeaveAsync( + public function getRoleAssumedPensionablePayLeaveAsync( string $employerId, string $employeeId, - string $contentType = self::contentTypes['indexLeave'][0] + string $id, + string $roleId, + ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, + ?\SynergiTech\Staffology\Model\LeaveType $leaveType = null, + ?\SynergiTech\Staffology\Model\LeavePayType $leavePayType = null, + ?\DateTime $from = null, + string $contentType = self::contentTypes['getRoleAssumedPensionablePayLeave'][0] ): PromiseInterface { - return $this->indexLeaveAsyncWithHttpInfo($employerId, $employeeId, $contentType) + return $this->getRoleAssumedPensionablePayLeaveAsyncWithHttpInfo($employerId, $employeeId, $id, $roleId, $payPeriod, $leaveType, $leavePayType, $from, $contentType) ->then( function ($response) { return $response[0]; @@ -3626,25 +3405,37 @@ function ($response) { } /** - * Operation indexLeaveAsyncWithHttpInfo + * Operation getRoleAssumedPensionablePayLeaveAsyncWithHttpInfo * - * List Leave + * Get Role Assumed Pensionable Pay * - * @param string $employerId (required) - * @param string $employeeId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexLeave'] to see the possible values for this operation + * @param string $employerId The unique identifier of the employer (required) + * @param string $employeeId The unique identifier of the employee (required) + * @param string $id The unique identifier of the leave record (empty GUID for new leaves) (required) + * @param string $roleId The unique identifier of the employee role for which to calculate assumed pensionable pay (required) + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod The pay period (required for new leaves, ignored for existing leaves) (optional) + * @param \SynergiTech\Staffology\Model\LeaveType|null $leaveType The type of leave (required for new leaves, ignored for existing leaves) (optional) + * @param \SynergiTech\Staffology\Model\LeavePayType|null $leavePayType The leave payment type (required for new leaves, ignored for existing leaves) (optional) + * @param \DateTime|null $from The leave start date (required for new leaves, ignored for existing leaves) (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRoleAssumedPensionablePayLeave'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function indexLeaveAsyncWithHttpInfo( + public function getRoleAssumedPensionablePayLeaveAsyncWithHttpInfo( string $employerId, string $employeeId, - string $contentType = self::contentTypes['indexLeave'][0] + string $id, + string $roleId, + ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, + ?\SynergiTech\Staffology\Model\LeaveType $leaveType = null, + ?\SynergiTech\Staffology\Model\LeavePayType $leavePayType = null, + ?\DateTime $from = null, + string $contentType = self::contentTypes['getRoleAssumedPensionablePayLeave'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->indexLeaveRequest($employerId, $employeeId, $contentType); + $returnType = 'float'; + $request = $this->getRoleAssumedPensionablePayLeaveRequest($employerId, $employeeId, $id, $roleId, $payPeriod, $leaveType, $leavePayType, $from, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3683,80 +3474,471 @@ function ($exception) { } /** - * Create request for operation 'indexLeave' - * - * @param string $employerId (required) - * @param string $employeeId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexLeave'] to see the possible values for this operation + * Create request for operation 'getRoleAssumedPensionablePayLeave' + * + * @param string $employerId The unique identifier of the employer (required) + * @param string $employeeId The unique identifier of the employee (required) + * @param string $id The unique identifier of the leave record (empty GUID for new leaves) (required) + * @param string $roleId The unique identifier of the employee role for which to calculate assumed pensionable pay (required) + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod The pay period (required for new leaves, ignored for existing leaves) (optional) + * @param \SynergiTech\Staffology\Model\LeaveType|null $leaveType The type of leave (required for new leaves, ignored for existing leaves) (optional) + * @param \SynergiTech\Staffology\Model\LeavePayType|null $leavePayType The leave payment type (required for new leaves, ignored for existing leaves) (optional) + * @param \DateTime|null $from The leave start date (required for new leaves, ignored for existing leaves) (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRoleAssumedPensionablePayLeave'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function indexLeaveRequest( + public function getRoleAssumedPensionablePayLeaveRequest( string $employerId, string $employeeId, - string $contentType = self::contentTypes['indexLeave'][0] + string $id, + string $roleId, + ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, + ?\SynergiTech\Staffology\Model\LeaveType $leaveType = null, + ?\SynergiTech\Staffology\Model\LeavePayType $leavePayType = null, + ?\DateTime $from = null, + string $contentType = self::contentTypes['getRoleAssumedPensionablePayLeave'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling indexLeave' + 'Missing the required parameter $employerId when calling getRoleAssumedPensionablePayLeave' ); } // verify the required parameter 'employeeId' is set if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employeeId when calling indexLeave' + 'Missing the required parameter $employeeId when calling getRoleAssumedPensionablePayLeave' ); } - - $resourcePath = '/employers/{employerId}/employees/{employeeId}/leave'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($employerId !== null) { - $resourcePath = str_replace( - '{' . 'employerId' . '}', - ObjectSerializer::toPathValue($employerId), - $resourcePath + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling getRoleAssumedPensionablePayLeave' ); } - // path params - if ($employeeId !== null) { - $resourcePath = str_replace( - '{' . 'employeeId' . '}', - ObjectSerializer::toPathValue($employeeId), - $resourcePath + + // verify the required parameter 'roleId' is set + if ($roleId === null || (is_array($roleId) && count($roleId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $roleId when calling getRoleAssumedPensionablePayLeave' ); } - $headers = $this->headerSelector->selectHeaders( - ['application/json', ], - $contentType, - $multipart - ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem + + + + $resourcePath = '/employers/{employerId}/employees/{employeeId}/leave/{id}/role/{roleId}/assumedpensionablepay'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $payPeriod?->value, + 'payPeriod', // param base name + 'PayPeriods', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $leaveType?->value, + 'leaveType', // param base name + 'LeaveType', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $leavePayType?->value, + 'leavePayType', // param base name + 'LeavePayType', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $from, + 'from', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + // path params + if ($roleId !== null) { + $resourcePath = str_replace( + '{' . 'roleId' . '}', + ObjectSerializer::toPathValue($roleId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation indexLeave + * + * List Leave + * + * @param string $employerId employerId (required) + * @param string $employeeId employeeId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexLeave'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\Item[] + */ + public function indexLeave( + string $employerId, + string $employeeId, + string $contentType = self::contentTypes['indexLeave'][0] + ): array + { + list($response) = $this->indexLeaveWithHttpInfo($employerId, $employeeId, $contentType); + return $response; + } + + /** + * Operation indexLeaveWithHttpInfo + * + * List Leave + * + * @param string $employerId (required) + * @param string $employeeId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexLeave'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + */ + public function indexLeaveWithHttpInfo( + string $employerId, + string $employeeId, + string $contentType = self::contentTypes['indexLeave'][0] + ): array + { + $request = $this->indexLeaveRequest($employerId, $employeeId, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\Item[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation indexLeaveAsync + * + * List Leave + * + * @param string $employerId (required) + * @param string $employeeId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexLeave'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function indexLeaveAsync( + string $employerId, + string $employeeId, + string $contentType = self::contentTypes['indexLeave'][0] + ): PromiseInterface + { + return $this->indexLeaveAsyncWithHttpInfo($employerId, $employeeId, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation indexLeaveAsyncWithHttpInfo + * + * List Leave + * + * @param string $employerId (required) + * @param string $employeeId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexLeave'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function indexLeaveAsyncWithHttpInfo( + string $employerId, + string $employeeId, + string $contentType = self::contentTypes['indexLeave'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\Item[]'; + $request = $this->indexLeaveRequest($employerId, $employeeId, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'indexLeave' + * + * @param string $employerId (required) + * @param string $employeeId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['indexLeave'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function indexLeaveRequest( + string $employerId, + string $employeeId, + string $contentType = self::contentTypes['indexLeave'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling indexLeave' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling indexLeave' + ); + } + + + $resourcePath = '/employers/{employerId}/employees/{employeeId}/leave'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem ]; } } @@ -3811,7 +3993,7 @@ public function indexLeaveRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Leave + * @return \SynergiTech\Staffology\Model\Leave|null */ public function updateLeave( string $employerId, @@ -3819,7 +4001,7 @@ public function updateLeave( string $id, ?\SynergiTech\Staffology\Model\Leave $leave = null, string $contentType = self::contentTypes['updateLeave'][0] - ): \SynergiTech\Staffology\Model\Leave + ): ?\SynergiTech\Staffology\Model\Leave { list($response) = $this->updateLeaveWithHttpInfo($employerId, $employeeId, $id, $leave, $contentType); return $response; @@ -3872,36 +4054,15 @@ public function updateLeaveWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Leave', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Leave' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Leave', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Leave', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3916,34 +4077,11 @@ public function updateLeaveWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Leave'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Leave', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3953,8 +4091,9 @@ public function updateLeaveWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4211,4 +4350,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/LoanApi.php b/src/Api/LoanApi.php index 2cbd8ec..1310ee9 100644 --- a/src/Api/LoanApi.php +++ b/src/Api/LoanApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -76,10 +79,10 @@ class LoanApi 'multipart/form-data', ], 'createLoan' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteDocumentLoan' => [ 'application/json', @@ -97,10 +100,10 @@ class LoanApi 'application/json', ], 'updateLoan' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -225,10 +228,10 @@ public function addDocumentLoanWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -390,19 +393,14 @@ public function addDocumentLoanRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( [], @@ -532,10 +530,10 @@ public function createLoanWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -815,10 +813,10 @@ public function deleteDocumentLoanWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1122,10 +1120,10 @@ public function deleteLoanWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1350,7 +1348,7 @@ public function deleteLoanRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SplFileObject + * @return \SplFileObject|null */ public function getDocumentLoan( string $employerId, @@ -1358,7 +1356,7 @@ public function getDocumentLoan( string $id, string $documentId, string $contentType = self::contentTypes['getDocumentLoan'][0] - ): \SplFileObject + ): ?\SplFileObject { list($response) = $this->getDocumentLoanWithHttpInfo($employerId, $employeeId, $id, $documentId, $contentType); return $response; @@ -1411,36 +1409,15 @@ public function getDocumentLoanWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SplFileObject', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SplFileObject' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1455,34 +1432,11 @@ public function getDocumentLoanWithHttpInfo( ); } - $returnType = '\SplFileObject'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1492,8 +1446,9 @@ public function getDocumentLoanWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1751,14 +1706,14 @@ public function getDocumentLoanRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Loan + * @return \SynergiTech\Staffology\Model\Loan|null */ public function getLoan( string $employerId, string $employeeId, string $id, string $contentType = self::contentTypes['getLoan'][0] - ): \SynergiTech\Staffology\Model\Loan + ): ?\SynergiTech\Staffology\Model\Loan { list($response) = $this->getLoanWithHttpInfo($employerId, $employeeId, $id, $contentType); return $response; @@ -1809,36 +1764,15 @@ public function getLoanWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Loan', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Loan' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Loan', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Loan', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1853,34 +1787,11 @@ public function getLoanWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Loan'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Loan', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1890,8 +1801,9 @@ public function getLoanWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2182,36 +2094,15 @@ public function indexLoanWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2226,34 +2117,11 @@ public function indexLoanWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2263,8 +2131,9 @@ public function indexLoanWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2481,7 +2350,7 @@ public function indexLoanRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Loan + * @return \SynergiTech\Staffology\Model\Loan|null */ public function updateLoan( string $employerId, @@ -2489,7 +2358,7 @@ public function updateLoan( string $id, ?\SynergiTech\Staffology\Model\Loan $loan = null, string $contentType = self::contentTypes['updateLoan'][0] - ): \SynergiTech\Staffology\Model\Loan + ): ?\SynergiTech\Staffology\Model\Loan { list($response) = $this->updateLoanWithHttpInfo($employerId, $employeeId, $id, $loan, $contentType); return $response; @@ -2508,7 +2377,7 @@ public function updateLoan( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\Loan, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Loan, HTTP status code, HTTP response headers (array of strings) */ public function updateLoanWithHttpInfo( string $employerId, @@ -2542,36 +2411,15 @@ public function updateLoanWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Loan', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Loan' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Loan', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Loan', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2586,34 +2434,11 @@ public function updateLoanWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Loan'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Loan', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2623,8 +2448,9 @@ public function updateLoanWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2881,4 +2707,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/NoteApi.php b/src/Api/NoteApi.php index 393bdb1..699dd66 100644 --- a/src/Api/NoteApi.php +++ b/src/Api/NoteApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -76,10 +79,10 @@ class NoteApi 'multipart/form-data', ], 'createNote' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteDocumentNote' => [ 'application/json', @@ -97,10 +100,10 @@ class NoteApi 'application/json', ], 'updateNote' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -225,10 +228,10 @@ public function addDocumentNoteWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -390,19 +393,14 @@ public function addDocumentNoteRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( [], @@ -532,10 +530,10 @@ public function createNoteWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -815,10 +813,10 @@ public function deleteDocumentNoteWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1122,10 +1120,10 @@ public function deleteNoteWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1350,7 +1348,7 @@ public function deleteNoteRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SplFileObject + * @return \SplFileObject|null */ public function getDocumentNote( string $employerId, @@ -1358,7 +1356,7 @@ public function getDocumentNote( string $id, string $documentId, string $contentType = self::contentTypes['getDocumentNote'][0] - ): \SplFileObject + ): ?\SplFileObject { list($response) = $this->getDocumentNoteWithHttpInfo($employerId, $employeeId, $id, $documentId, $contentType); return $response; @@ -1411,36 +1409,15 @@ public function getDocumentNoteWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SplFileObject', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SplFileObject' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1455,34 +1432,11 @@ public function getDocumentNoteWithHttpInfo( ); } - $returnType = '\SplFileObject'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1492,8 +1446,9 @@ public function getDocumentNoteWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1751,14 +1706,14 @@ public function getDocumentNoteRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Note + * @return \SynergiTech\Staffology\Model\Note|null */ public function getNote( string $employerId, string $employeeId, string $id, string $contentType = self::contentTypes['getNote'][0] - ): \SynergiTech\Staffology\Model\Note + ): ?\SynergiTech\Staffology\Model\Note { list($response) = $this->getNoteWithHttpInfo($employerId, $employeeId, $id, $contentType); return $response; @@ -1809,36 +1764,15 @@ public function getNoteWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Note', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Note' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Note', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Note', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1853,34 +1787,11 @@ public function getNoteWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Note'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Note', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1890,8 +1801,9 @@ public function getNoteWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2182,36 +2094,15 @@ public function indexNoteWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2226,34 +2117,11 @@ public function indexNoteWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2263,8 +2131,9 @@ public function indexNoteWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2481,7 +2350,7 @@ public function indexNoteRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Note + * @return \SynergiTech\Staffology\Model\Note|null */ public function updateNote( string $employerId, @@ -2489,7 +2358,7 @@ public function updateNote( string $id, ?\SynergiTech\Staffology\Model\Note $note = null, string $contentType = self::contentTypes['updateNote'][0] - ): \SynergiTech\Staffology\Model\Note + ): ?\SynergiTech\Staffology\Model\Note { list($response) = $this->updateNoteWithHttpInfo($employerId, $employeeId, $id, $note, $contentType); return $response; @@ -2542,36 +2411,15 @@ public function updateNoteWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Note', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Note' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Note', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Note', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2586,34 +2434,11 @@ public function updateNoteWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Note'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Note', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2623,8 +2448,9 @@ public function updateNoteWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2881,4 +2707,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/NvrApi.php b/src/Api/NvrApi.php index e9c76c7..1e3ee95 100644 --- a/src/Api/NvrApi.php +++ b/src/Api/NvrApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class NvrApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createNvr' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteNvr' => [ 'application/json', @@ -100,10 +103,10 @@ class NvrApi 'application/json', ], 'updateNvr' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -223,36 +226,15 @@ public function createNvrWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\Nvr', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Nvr' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Nvr', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Nvr', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -267,34 +249,11 @@ public function createNvrWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Nvr'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Nvr', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -304,8 +263,9 @@ public function createNvrWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -594,10 +554,10 @@ public function deleteNvrWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -879,36 +839,15 @@ public function getNvrWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Nvr', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Nvr' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Nvr', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Nvr', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -923,34 +862,11 @@ public function getNvrWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Nvr'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Nvr', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -960,8 +876,9 @@ public function getNvrWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1256,36 +1173,15 @@ public function getXmlRequestNvrWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('string' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'string', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1300,34 +1196,11 @@ public function getXmlRequestNvrWithHttpInfo( ); } - $returnType = 'string'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1337,8 +1210,9 @@ public function getXmlRequestNvrWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1629,36 +1503,15 @@ public function listNvrWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1673,34 +1526,11 @@ public function listNvrWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1710,8 +1540,9 @@ public function listNvrWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1985,36 +1816,15 @@ public function markAsAcceptedNvrWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Nvr', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Nvr' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Nvr', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Nvr', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2029,34 +1839,11 @@ public function markAsAcceptedNvrWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Nvr'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Nvr', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2066,8 +1853,9 @@ public function markAsAcceptedNvrWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2354,36 +2142,15 @@ public function requiringAttentionNvrWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2398,34 +2165,11 @@ public function requiringAttentionNvrWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2435,8 +2179,9 @@ public function requiringAttentionNvrWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2693,36 +2438,15 @@ public function submitNvrWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Nvr', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Nvr' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Nvr', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Nvr', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2737,34 +2461,11 @@ public function submitNvrWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Nvr'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Nvr', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2774,8 +2475,9 @@ public function submitNvrWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3090,36 +2792,15 @@ public function updateNvrWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Nvr', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Nvr' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Nvr', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Nvr', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3134,34 +2815,11 @@ public function updateNvrWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Nvr'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Nvr', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3171,8 +2829,9 @@ public function updateNvrWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3429,4 +3088,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/OccupationalPolicyApi.php b/src/Api/OccupationalPolicyApi.php index fa87fb1..1fe67f5 100644 --- a/src/Api/OccupationalPolicyApi.php +++ b/src/Api/OccupationalPolicyApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class OccupationalPolicyApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createOccupationalPolicy' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteOccupationalPolicy' => [ 'application/json', @@ -88,10 +91,10 @@ class OccupationalPolicyApi 'application/json', ], 'updateOccupationalPolicy' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -152,13 +155,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\OccupationalPolicy + * @return \SynergiTech\Staffology\Model\OccupationalPolicy|null */ public function createOccupationalPolicy( string $employerId, ?\SynergiTech\Staffology\Model\OccupationalPolicy $occupationalPolicy = null, string $contentType = self::contentTypes['createOccupationalPolicy'][0] - ): \SynergiTech\Staffology\Model\OccupationalPolicy + ): ?\SynergiTech\Staffology\Model\OccupationalPolicy { list($response) = $this->createOccupationalPolicyWithHttpInfo($employerId, $occupationalPolicy, $contentType); return $response; @@ -175,7 +178,7 @@ public function createOccupationalPolicy( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\OccupationalPolicy, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\OccupationalPolicy, HTTP status code, HTTP response headers (array of strings) */ public function createOccupationalPolicyWithHttpInfo( string $employerId, @@ -207,36 +210,15 @@ public function createOccupationalPolicyWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\OccupationalPolicy', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\OccupationalPolicy' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\OccupationalPolicy', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OccupationalPolicy', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -251,34 +233,11 @@ public function createOccupationalPolicyWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\OccupationalPolicy'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OccupationalPolicy', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -288,8 +247,9 @@ public function createOccupationalPolicyWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -553,10 +513,10 @@ public function deleteOccupationalPolicyWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -758,13 +718,13 @@ public function deleteOccupationalPolicyRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\OccupationalPolicy + * @return \SynergiTech\Staffology\Model\OccupationalPolicy|null */ public function getOccupationalPolicy( string $employerId, string $id, string $contentType = self::contentTypes['getOccupationalPolicy'][0] - ): \SynergiTech\Staffology\Model\OccupationalPolicy + ): ?\SynergiTech\Staffology\Model\OccupationalPolicy { list($response) = $this->getOccupationalPolicyWithHttpInfo($employerId, $id, $contentType); return $response; @@ -813,36 +773,15 @@ public function getOccupationalPolicyWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\OccupationalPolicy', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\OccupationalPolicy' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\OccupationalPolicy', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OccupationalPolicy', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -857,34 +796,11 @@ public function getOccupationalPolicyWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\OccupationalPolicy'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OccupationalPolicy', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -894,8 +810,9 @@ public function getOccupationalPolicyWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1109,12 +1026,12 @@ public function getOccupationalPolicyRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Item[]|null */ public function indexOccupationalPolicy( string $employerId, string $contentType = self::contentTypes['indexOccupationalPolicy'][0] - ): array + ): ?array { list($response) = $this->indexOccupationalPolicyWithHttpInfo($employerId, $contentType); return $response; @@ -1161,36 +1078,15 @@ public function indexOccupationalPolicyWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1205,34 +1101,11 @@ public function indexOccupationalPolicyWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1242,8 +1115,9 @@ public function indexOccupationalPolicyWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1438,14 +1312,14 @@ public function indexOccupationalPolicyRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\OccupationalPolicy + * @return \SynergiTech\Staffology\Model\OccupationalPolicy|null */ public function updateOccupationalPolicy( string $employerId, string $id, ?\SynergiTech\Staffology\Model\OccupationalPolicy $occupationalPolicy = null, string $contentType = self::contentTypes['updateOccupationalPolicy'][0] - ): \SynergiTech\Staffology\Model\OccupationalPolicy + ): ?\SynergiTech\Staffology\Model\OccupationalPolicy { list($response) = $this->updateOccupationalPolicyWithHttpInfo($employerId, $id, $occupationalPolicy, $contentType); return $response; @@ -1496,36 +1370,15 @@ public function updateOccupationalPolicyWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\OccupationalPolicy', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\OccupationalPolicy' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\OccupationalPolicy', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OccupationalPolicy', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1540,34 +1393,11 @@ public function updateOccupationalPolicyWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\OccupationalPolicy'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OccupationalPolicy', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1577,8 +1407,9 @@ public function updateOccupationalPolicyWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1814,4 +1645,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/OccupationalSickLeaveHistoryApi.php b/src/Api/OccupationalSickLeaveHistoryApi.php index d7e4768..c49a71c 100644 --- a/src/Api/OccupationalSickLeaveHistoryApi.php +++ b/src/Api/OccupationalSickLeaveHistoryApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class OccupationalSickLeaveHistoryApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createOccupationalSickLeaveHistory' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteOccupationalSickLeaveHistory' => [ 'application/json', @@ -91,16 +94,16 @@ class OccupationalSickLeaveHistoryApi 'application/json', ], 'updateOccupationalSickLeaveHistory' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'uploadOSPHistoryOccupationalSickLeaveHistory' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -162,14 +165,14 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\OccupationalSickLeaveHistory + * @return \SynergiTech\Staffology\Model\OccupationalSickLeaveHistory|null */ public function createOccupationalSickLeaveHistory( string $employerId, string $employeeId, ?\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory $occupationalSickLeaveHistory = null, string $contentType = self::contentTypes['createOccupationalSickLeaveHistory'][0] - ): \SynergiTech\Staffology\Model\OccupationalSickLeaveHistory + ): ?\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory { list($response) = $this->createOccupationalSickLeaveHistoryWithHttpInfo($employerId, $employeeId, $occupationalSickLeaveHistory, $contentType); return $response; @@ -187,7 +190,7 @@ public function createOccupationalSickLeaveHistory( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\OccupationalSickLeaveHistory, HTTP status code, HTTP response headers (array of strings) */ public function createOccupationalSickLeaveHistoryWithHttpInfo( string $employerId, @@ -220,36 +223,15 @@ public function createOccupationalSickLeaveHistoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -264,34 +246,11 @@ public function createOccupationalSickLeaveHistoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -301,8 +260,9 @@ public function createOccupationalSickLeaveHistoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -457,7 +417,7 @@ public function createOccupationalSickLeaveHistoryRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -591,10 +551,10 @@ public function deleteOccupationalSickLeaveHistoryWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -876,36 +836,15 @@ public function getOccupationalSickLeaveHistoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -920,34 +859,11 @@ public function getOccupationalSickLeaveHistoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -957,8 +873,9 @@ public function getOccupationalSickLeaveHistoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1127,7 +1044,7 @@ public function getOccupationalSickLeaveHistoryRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1249,36 +1166,15 @@ public function importOccupationalSickLeaveHistoryCsvOccupationalSickLeaveHistor $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1293,34 +1189,11 @@ public function importOccupationalSickLeaveHistoryCsvOccupationalSickLeaveHistor ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1330,8 +1203,9 @@ public function importOccupationalSickLeaveHistoryCsvOccupationalSickLeaveHistor $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1464,22 +1338,17 @@ public function importOccupationalSickLeaveHistoryCsvOccupationalSickLeaveHistor } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1601,36 +1470,15 @@ public function occupationalSickLeaveHistoryOccupationalSickLeaveHistoryWithHttp $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1645,34 +1493,11 @@ public function occupationalSickLeaveHistoryOccupationalSickLeaveHistoryWithHttp ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1682,8 +1507,9 @@ public function occupationalSickLeaveHistoryOccupationalSickLeaveHistoryWithHttp $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1831,7 +1657,7 @@ public function occupationalSickLeaveHistoryOccupationalSickLeaveHistoryRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1900,7 +1726,7 @@ public function occupationalSickLeaveHistoryOccupationalSickLeaveHistoryRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\OccupationalSickLeaveHistory + * @return \SynergiTech\Staffology\Model\OccupationalSickLeaveHistory|null */ public function updateOccupationalSickLeaveHistory( string $employerId, @@ -1908,7 +1734,7 @@ public function updateOccupationalSickLeaveHistory( string $id, ?\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory $occupationalSickLeaveHistory = null, string $contentType = self::contentTypes['updateOccupationalSickLeaveHistory'][0] - ): \SynergiTech\Staffology\Model\OccupationalSickLeaveHistory + ): ?\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory { list($response) = $this->updateOccupationalSickLeaveHistoryWithHttpInfo($employerId, $employeeId, $id, $occupationalSickLeaveHistory, $contentType); return $response; @@ -1927,7 +1753,7 @@ public function updateOccupationalSickLeaveHistory( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\OccupationalSickLeaveHistory, HTTP status code, HTTP response headers (array of strings) */ public function updateOccupationalSickLeaveHistoryWithHttpInfo( string $employerId, @@ -1961,36 +1787,15 @@ public function updateOccupationalSickLeaveHistoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2005,34 +1810,11 @@ public function updateOccupationalSickLeaveHistoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OccupationalSickLeaveHistory', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2042,8 +1824,9 @@ public function updateOccupationalSickLeaveHistoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2219,7 +2002,7 @@ public function updateOccupationalSickLeaveHistoryRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2293,13 +2076,13 @@ public function updateOccupationalSickLeaveHistoryRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Item[]|null */ public function uploadOSPHistoryOccupationalSickLeaveHistory( string $employerId, ?array $occupationalSickLeaveHistory = null, string $contentType = self::contentTypes['uploadOSPHistoryOccupationalSickLeaveHistory'][0] - ): array + ): ?array { list($response) = $this->uploadOSPHistoryOccupationalSickLeaveHistoryWithHttpInfo($employerId, $occupationalSickLeaveHistory, $contentType); return $response; @@ -2316,7 +2099,7 @@ public function uploadOSPHistoryOccupationalSickLeaveHistory( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ public function uploadOSPHistoryOccupationalSickLeaveHistoryWithHttpInfo( string $employerId, @@ -2348,36 +2131,15 @@ public function uploadOSPHistoryOccupationalSickLeaveHistoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2392,34 +2154,11 @@ public function uploadOSPHistoryOccupationalSickLeaveHistoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -2429,8 +2168,9 @@ public function uploadOSPHistoryOccupationalSickLeaveHistoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2564,7 +2304,7 @@ public function uploadOSPHistoryOccupationalSickLeaveHistoryRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2645,4 +2385,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/OpeningBalancesApi.php b/src/Api/OpeningBalancesApi.php index 801b29d..3a849bf 100644 --- a/src/Api/OpeningBalancesApi.php +++ b/src/Api/OpeningBalancesApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class OpeningBalancesApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createNicSummaryOpeningBalances' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteNicSummaryOpeningBalances' => [ 'application/json', @@ -94,34 +97,34 @@ class OpeningBalancesApi 'application/json', ], 'updateNicSummariesOpeningBalances' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateNicSummaryOpeningBalances' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateOpeningBalances' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateP45OpeningBalances' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateTerminationPaymentsOpeningBalances' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -246,10 +249,10 @@ public function createNicSummaryOpeningBalancesWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -550,10 +553,10 @@ public function deleteNicSummaryOpeningBalancesWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -799,7 +802,7 @@ public function deleteNicSummaryOpeningBalancesRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\NicSummary[] + * @return \SynergiTech\Staffology\Model\NicSummary[]|null */ public function getNicSummariesOpeningBalances( string $employerId, @@ -807,7 +810,7 @@ public function getNicSummariesOpeningBalances( \SynergiTech\Staffology\Model\TaxYear $taxYear, ?bool $openingBalancesOnly = true, string $contentType = self::contentTypes['getNicSummariesOpeningBalances'][0] - ): array + ): ?array { list($response) = $this->getNicSummariesOpeningBalancesWithHttpInfo($employerId, $employeeId, $taxYear, $openingBalancesOnly, $contentType); return $response; @@ -860,36 +863,15 @@ public function getNicSummariesOpeningBalancesWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\NicSummary[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\NicSummary[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\NicSummary[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NicSummary[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -904,34 +886,11 @@ public function getNicSummariesOpeningBalancesWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\NicSummary[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NicSummary[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -941,8 +900,9 @@ public function getNicSummariesOpeningBalancesWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1127,7 +1087,7 @@ public function getNicSummariesOpeningBalancesRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1196,7 +1156,7 @@ public function getNicSummariesOpeningBalancesRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\NicSummary + * @return \SynergiTech\Staffology\Model\NicSummary|null */ public function getNicSummaryOpeningBalances( string $employerId, @@ -1204,7 +1164,7 @@ public function getNicSummaryOpeningBalances( \SynergiTech\Staffology\Model\TaxYear $taxYear, string $uniqueId, string $contentType = self::contentTypes['getNicSummaryOpeningBalances'][0] - ): \SynergiTech\Staffology\Model\NicSummary + ): ?\SynergiTech\Staffology\Model\NicSummary { list($response) = $this->getNicSummaryOpeningBalancesWithHttpInfo($employerId, $employeeId, $taxYear, $uniqueId, $contentType); return $response; @@ -1257,36 +1217,15 @@ public function getNicSummaryOpeningBalancesWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\NicSummary', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\NicSummary' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\NicSummary', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NicSummary', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1301,34 +1240,11 @@ public function getNicSummaryOpeningBalancesWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\NicSummary'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NicSummary', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1338,8 +1254,9 @@ public function getNicSummaryOpeningBalancesWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1529,7 +1446,7 @@ public function getNicSummaryOpeningBalancesRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1596,13 +1513,13 @@ public function getNicSummaryOpeningBalancesRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\OpeningBalances + * @return \SynergiTech\Staffology\Model\OpeningBalances|null */ public function getOpeningBalances( string $employerId, string $employeeId, string $contentType = self::contentTypes['getOpeningBalances'][0] - ): \SynergiTech\Staffology\Model\OpeningBalances + ): ?\SynergiTech\Staffology\Model\OpeningBalances { list($response) = $this->getOpeningBalancesWithHttpInfo($employerId, $employeeId, $contentType); return $response; @@ -1651,36 +1568,15 @@ public function getOpeningBalancesWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\OpeningBalances', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\OpeningBalances' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\OpeningBalances', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OpeningBalances', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1695,34 +1591,11 @@ public function getOpeningBalancesWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\OpeningBalances'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OpeningBalances', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1732,8 +1605,9 @@ public function getOpeningBalancesWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1881,7 +1755,7 @@ public function getOpeningBalancesRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1948,13 +1822,13 @@ public function getOpeningBalancesRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\OpeningBalancesTotals + * @return \SynergiTech\Staffology\Model\OpeningBalancesTotals|null */ public function getOpeningBalancesTotalsOpeningBalances( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $contentType = self::contentTypes['getOpeningBalancesTotalsOpeningBalances'][0] - ): \SynergiTech\Staffology\Model\OpeningBalancesTotals + ): ?\SynergiTech\Staffology\Model\OpeningBalancesTotals { list($response) = $this->getOpeningBalancesTotalsOpeningBalancesWithHttpInfo($employerId, $taxYear, $contentType); return $response; @@ -2003,36 +1877,15 @@ public function getOpeningBalancesTotalsOpeningBalancesWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\OpeningBalancesTotals', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\OpeningBalancesTotals' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\OpeningBalancesTotals', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OpeningBalancesTotals', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2047,34 +1900,11 @@ public function getOpeningBalancesTotalsOpeningBalancesWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\OpeningBalancesTotals'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OpeningBalancesTotals', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2084,8 +1914,9 @@ public function getOpeningBalancesTotalsOpeningBalancesWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2233,7 +2064,7 @@ public function getOpeningBalancesTotalsOpeningBalancesRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2302,7 +2133,7 @@ public function getOpeningBalancesTotalsOpeningBalancesRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\NicSummary[] + * @return \SynergiTech\Staffology\Model\NicSummary[]|null */ public function updateNicSummariesOpeningBalances( string $employerId, @@ -2310,7 +2141,7 @@ public function updateNicSummariesOpeningBalances( \SynergiTech\Staffology\Model\TaxYear $taxYear, ?array $nicSummary = null, string $contentType = self::contentTypes['updateNicSummariesOpeningBalances'][0] - ): array + ): ?array { list($response) = $this->updateNicSummariesOpeningBalancesWithHttpInfo($employerId, $employeeId, $taxYear, $nicSummary, $contentType); return $response; @@ -2363,36 +2194,15 @@ public function updateNicSummariesOpeningBalancesWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\NicSummary[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\NicSummary[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\NicSummary[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NicSummary[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2407,34 +2217,11 @@ public function updateNicSummariesOpeningBalancesWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\NicSummary[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NicSummary[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2444,8 +2231,9 @@ public function updateNicSummariesOpeningBalancesWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2621,7 +2409,7 @@ public function updateNicSummariesOpeningBalancesRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2698,7 +2486,7 @@ public function updateNicSummariesOpeningBalancesRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\NicSummary + * @return \SynergiTech\Staffology\Model\NicSummary|null */ public function updateNicSummaryOpeningBalances( string $employerId, @@ -2707,7 +2495,7 @@ public function updateNicSummaryOpeningBalances( string $uniqueId, ?\SynergiTech\Staffology\Model\NicSummary $nicSummary = null, string $contentType = self::contentTypes['updateNicSummaryOpeningBalances'][0] - ): \SynergiTech\Staffology\Model\NicSummary + ): ?\SynergiTech\Staffology\Model\NicSummary { list($response) = $this->updateNicSummaryOpeningBalancesWithHttpInfo($employerId, $employeeId, $taxYear, $uniqueId, $nicSummary, $contentType); return $response; @@ -2762,36 +2550,15 @@ public function updateNicSummaryOpeningBalancesWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\NicSummary', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\NicSummary' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\NicSummary', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NicSummary', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2806,34 +2573,11 @@ public function updateNicSummaryOpeningBalancesWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\NicSummary'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NicSummary', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2843,8 +2587,9 @@ public function updateNicSummaryOpeningBalancesWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3041,7 +2786,7 @@ public function updateNicSummaryOpeningBalancesRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -3116,14 +2861,14 @@ public function updateNicSummaryOpeningBalancesRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\OpeningBalances + * @return \SynergiTech\Staffology\Model\OpeningBalances|null */ public function updateOpeningBalances( string $employerId, string $employeeId, ?\SynergiTech\Staffology\Model\OpeningBalances $openingBalances = null, string $contentType = self::contentTypes['updateOpeningBalances'][0] - ): \SynergiTech\Staffology\Model\OpeningBalances + ): ?\SynergiTech\Staffology\Model\OpeningBalances { list($response) = $this->updateOpeningBalancesWithHttpInfo($employerId, $employeeId, $openingBalances, $contentType); return $response; @@ -3174,36 +2919,15 @@ public function updateOpeningBalancesWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\OpeningBalances', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\OpeningBalances' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\OpeningBalances', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OpeningBalances', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3218,34 +2942,11 @@ public function updateOpeningBalancesWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\OpeningBalances'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OpeningBalances', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3255,8 +2956,9 @@ public function updateOpeningBalancesWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3411,7 +3113,7 @@ public function updateOpeningBalancesRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -3486,14 +3188,14 @@ public function updateOpeningBalancesRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\OpeningBalances + * @return \SynergiTech\Staffology\Model\OpeningBalances|null */ public function updateP45OpeningBalances( string $employerId, string $employeeId, ?\SynergiTech\Staffology\Model\OpeningBalances $openingBalances = null, string $contentType = self::contentTypes['updateP45OpeningBalances'][0] - ): \SynergiTech\Staffology\Model\OpeningBalances + ): ?\SynergiTech\Staffology\Model\OpeningBalances { list($response) = $this->updateP45OpeningBalancesWithHttpInfo($employerId, $employeeId, $openingBalances, $contentType); return $response; @@ -3544,36 +3246,15 @@ public function updateP45OpeningBalancesWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\OpeningBalances', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\OpeningBalances' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\OpeningBalances', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OpeningBalances', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3588,34 +3269,11 @@ public function updateP45OpeningBalancesWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\OpeningBalances'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OpeningBalances', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3625,8 +3283,9 @@ public function updateP45OpeningBalancesWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3781,7 +3440,7 @@ public function updateP45OpeningBalancesRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -3856,14 +3515,14 @@ public function updateP45OpeningBalancesRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\OpeningBalances + * @return \SynergiTech\Staffology\Model\OpeningBalances|null */ public function updateTerminationPaymentsOpeningBalances( string $employerId, string $employeeId, ?\SynergiTech\Staffology\Model\OpeningBalances $openingBalances = null, string $contentType = self::contentTypes['updateTerminationPaymentsOpeningBalances'][0] - ): \SynergiTech\Staffology\Model\OpeningBalances + ): ?\SynergiTech\Staffology\Model\OpeningBalances { list($response) = $this->updateTerminationPaymentsOpeningBalancesWithHttpInfo($employerId, $employeeId, $openingBalances, $contentType); return $response; @@ -3914,36 +3573,15 @@ public function updateTerminationPaymentsOpeningBalancesWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\OpeningBalances', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\OpeningBalances' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\OpeningBalances', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OpeningBalances', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3958,34 +3596,11 @@ public function updateTerminationPaymentsOpeningBalancesWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\OpeningBalances'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\OpeningBalances', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3995,8 +3610,9 @@ public function updateTerminationPaymentsOpeningBalancesWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4151,7 +3767,7 @@ public function updateTerminationPaymentsOpeningBalancesRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -4232,4 +3848,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/P11HistoryApi.php b/src/Api/P11HistoryApi.php index 8d94729..8e18037 100644 --- a/src/Api/P11HistoryApi.php +++ b/src/Api/P11HistoryApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class P11HistoryApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createP11History' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteP11History' => [ 'application/json', @@ -85,10 +88,10 @@ class P11HistoryApi 'application/json', ], 'updateP11History' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -209,10 +212,10 @@ public function createP11HistoryWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -488,10 +491,10 @@ public function deleteP11HistoryWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -777,36 +780,15 @@ public function listPagedP11HistoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractP11HistoryResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractP11HistoryResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractP11HistoryResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractP11HistoryResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -821,34 +803,11 @@ public function listPagedP11HistoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractP11HistoryResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractP11HistoryResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -858,8 +817,9 @@ public function listPagedP11HistoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1108,7 +1068,7 @@ public function listPagedP11HistoryRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractP11HistoryResponse + * @return \SynergiTech\Staffology\Model\ContractP11HistoryResponse|null */ public function updateP11History( string $employerId, @@ -1116,7 +1076,7 @@ public function updateP11History( string $id, ?\SynergiTech\Staffology\Model\ContractP11HistoryRequest $contractP11HistoryRequest = null, string $contentType = self::contentTypes['updateP11History'][0] - ): \SynergiTech\Staffology\Model\ContractP11HistoryResponse + ): ?\SynergiTech\Staffology\Model\ContractP11HistoryResponse { list($response) = $this->updateP11HistoryWithHttpInfo($employerId, $employeeId, $id, $contractP11HistoryRequest, $contentType); return $response; @@ -1169,63 +1129,21 @@ public function updateP11HistoryWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractP11HistoryResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractP11HistoryResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractP11HistoryResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractP11HistoryResponse', + $request, + $response, + ); case 400: - if (in_array('\SynergiTech\Staffology\Model\ContractP11HistoryResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractP11HistoryResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractP11HistoryResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractP11HistoryResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1240,34 +1158,11 @@ public function updateP11HistoryWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractP11HistoryResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractP11HistoryResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1277,7 +1172,7 @@ public function updateP11HistoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1285,8 +1180,9 @@ public function updateP11HistoryWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1543,4 +1439,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/PayCodeApi.php b/src/Api/PayCodeApi.php index eb6ad2c..e120266 100644 --- a/src/Api/PayCodeApi.php +++ b/src/Api/PayCodeApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class PayCodeApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createPayCode' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deletePayCode' => [ 'application/json', @@ -97,22 +100,22 @@ class PayCodeApi 'application/json', ], 'updateNominalCodeMappingsPayCode' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updatePayCode' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updatePayCodePayCode' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -173,13 +176,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayCode + * @return \SynergiTech\Staffology\Model\PayCode|null */ public function createPayCode( string $employerId, ?\SynergiTech\Staffology\Model\PayCode $payCode = null, string $contentType = self::contentTypes['createPayCode'][0] - ): \SynergiTech\Staffology\Model\PayCode + ): ?\SynergiTech\Staffology\Model\PayCode { list($response) = $this->createPayCodeWithHttpInfo($employerId, $payCode, $contentType); return $response; @@ -196,7 +199,7 @@ public function createPayCode( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\PayCode, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\PayCode, HTTP status code, HTTP response headers (array of strings) */ public function createPayCodeWithHttpInfo( string $employerId, @@ -228,36 +231,15 @@ public function createPayCodeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\PayCode', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayCode' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayCode', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -272,34 +254,11 @@ public function createPayCodeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayCode'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -309,8 +268,9 @@ public function createPayCodeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -574,10 +534,10 @@ public function deletePayCodeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -835,10 +795,10 @@ public function deletePayCodePayCodeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1035,13 +995,13 @@ public function deletePayCodePayCodeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayCode + * @return \SynergiTech\Staffology\Model\PayCode|null */ public function getPayCode( string $employerId, string $code, string $contentType = self::contentTypes['getPayCode'][0] - ): \SynergiTech\Staffology\Model\PayCode + ): ?\SynergiTech\Staffology\Model\PayCode { list($response) = $this->getPayCodeWithHttpInfo($employerId, $code, $contentType); return $response; @@ -1090,36 +1050,15 @@ public function getPayCodeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayCode', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayCode' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayCode', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1134,34 +1073,11 @@ public function getPayCodeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayCode'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1171,8 +1087,9 @@ public function getPayCodeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1387,13 +1304,13 @@ public function getPayCodeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayCode + * @return \SynergiTech\Staffology\Model\PayCode|null */ public function getPayCodePayCode( string $employerId, ?string $code = null, string $contentType = self::contentTypes['getPayCodePayCode'][0] - ): \SynergiTech\Staffology\Model\PayCode + ): ?\SynergiTech\Staffology\Model\PayCode { list($response) = $this->getPayCodePayCodeWithHttpInfo($employerId, $code, $contentType); return $response; @@ -1442,36 +1359,15 @@ public function getPayCodePayCodeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayCode', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayCode' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayCode', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1486,34 +1382,11 @@ public function getPayCodePayCodeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayCode'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1523,8 +1396,9 @@ public function getPayCodePayCodeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1789,36 +1663,15 @@ public function indexPayCodeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayCode[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayCode[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayCode[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1833,34 +1686,11 @@ public function indexPayCodeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayCode[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1870,8 +1700,9 @@ public function indexPayCodeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2132,36 +1963,15 @@ public function nominalCodeMappingsPayCodeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\NominalCodeMapping[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\NominalCodeMapping[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\NominalCodeMapping[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NominalCodeMapping[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2176,34 +1986,11 @@ public function nominalCodeMappingsPayCodeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\NominalCodeMapping[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NominalCodeMapping[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2213,8 +2000,9 @@ public function nominalCodeMappingsPayCodeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2463,36 +2251,15 @@ public function updateNominalCodeMappingsPayCodeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\NominalCodeMapping[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\NominalCodeMapping[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\NominalCodeMapping[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NominalCodeMapping[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2507,34 +2274,11 @@ public function updateNominalCodeMappingsPayCodeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\NominalCodeMapping[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NominalCodeMapping[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2544,8 +2288,9 @@ public function updateNominalCodeMappingsPayCodeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2754,14 +2499,14 @@ public function updateNominalCodeMappingsPayCodeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayCode + * @return \SynergiTech\Staffology\Model\PayCode|null */ public function updatePayCode( string $employerId, string $code, ?\SynergiTech\Staffology\Model\PayCode $payCode = null, string $contentType = self::contentTypes['updatePayCode'][0] - ): \SynergiTech\Staffology\Model\PayCode + ): ?\SynergiTech\Staffology\Model\PayCode { list($response) = $this->updatePayCodeWithHttpInfo($employerId, $code, $payCode, $contentType); return $response; @@ -2812,36 +2557,15 @@ public function updatePayCodeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayCode', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayCode' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayCode', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2856,34 +2580,11 @@ public function updatePayCodeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayCode'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2893,8 +2594,9 @@ public function updatePayCodeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3124,14 +2826,14 @@ public function updatePayCodeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayCode + * @return \SynergiTech\Staffology\Model\PayCode|null */ public function updatePayCodePayCode( string $employerId, ?string $code = null, ?\SynergiTech\Staffology\Model\PayCode $payCode = null, string $contentType = self::contentTypes['updatePayCodePayCode'][0] - ): \SynergiTech\Staffology\Model\PayCode + ): ?\SynergiTech\Staffology\Model\PayCode { list($response) = $this->updatePayCodePayCodeWithHttpInfo($employerId, $code, $payCode, $contentType); return $response; @@ -3182,36 +2884,15 @@ public function updatePayCodePayCodeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayCode', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayCode' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayCode', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3226,34 +2907,11 @@ public function updatePayCodePayCodeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayCode'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3263,8 +2921,9 @@ public function updatePayCodePayCodeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3495,4 +3154,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/PayCodeSetApi.php b/src/Api/PayCodeSetApi.php index 7fa29ef..1dd30f0 100644 --- a/src/Api/PayCodeSetApi.php +++ b/src/Api/PayCodeSetApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class PayCodeSetApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createPayCodeSet' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deletePayCodeSet' => [ 'application/json', @@ -88,10 +91,10 @@ class PayCodeSetApi 'application/json', ], 'updatePayCodeSet' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -152,13 +155,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayCodeSet + * @return \SynergiTech\Staffology\Model\PayCodeSet|null */ public function createPayCodeSet( string $employerId, ?\SynergiTech\Staffology\Model\PayCodeSet $payCodeSet = null, string $contentType = self::contentTypes['createPayCodeSet'][0] - ): \SynergiTech\Staffology\Model\PayCodeSet + ): ?\SynergiTech\Staffology\Model\PayCodeSet { list($response) = $this->createPayCodeSetWithHttpInfo($employerId, $payCodeSet, $contentType); return $response; @@ -175,7 +178,7 @@ public function createPayCodeSet( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\PayCodeSet, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\PayCodeSet, HTTP status code, HTTP response headers (array of strings) */ public function createPayCodeSetWithHttpInfo( string $employerId, @@ -207,36 +210,15 @@ public function createPayCodeSetWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\PayCodeSet', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayCodeSet' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayCodeSet', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCodeSet', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -251,34 +233,11 @@ public function createPayCodeSetWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayCodeSet'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCodeSet', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -288,8 +247,9 @@ public function createPayCodeSetWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -553,10 +513,10 @@ public function deletePayCodeSetWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -758,13 +718,13 @@ public function deletePayCodeSetRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayCodeSet + * @return \SynergiTech\Staffology\Model\PayCodeSet|null */ public function getPayCodeSet( string $employerId, string $id, string $contentType = self::contentTypes['getPayCodeSet'][0] - ): \SynergiTech\Staffology\Model\PayCodeSet + ): ?\SynergiTech\Staffology\Model\PayCodeSet { list($response) = $this->getPayCodeSetWithHttpInfo($employerId, $id, $contentType); return $response; @@ -781,7 +741,7 @@ public function getPayCodeSet( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\PayCodeSet, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\PayCodeSet, HTTP status code, HTTP response headers (array of strings) */ public function getPayCodeSetWithHttpInfo( string $employerId, @@ -813,36 +773,15 @@ public function getPayCodeSetWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayCodeSet', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayCodeSet' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayCodeSet', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCodeSet', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -857,34 +796,11 @@ public function getPayCodeSetWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayCodeSet'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCodeSet', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -894,8 +810,9 @@ public function getPayCodeSetWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1161,36 +1078,15 @@ public function indexPayCodeSetWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1205,34 +1101,11 @@ public function indexPayCodeSetWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1242,8 +1115,9 @@ public function indexPayCodeSetWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1438,14 +1312,14 @@ public function indexPayCodeSetRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayCodeSet + * @return \SynergiTech\Staffology\Model\PayCodeSet|null */ public function updatePayCodeSet( string $employerId, string $id, ?\SynergiTech\Staffology\Model\PayCodeSet $payCodeSet = null, string $contentType = self::contentTypes['updatePayCodeSet'][0] - ): \SynergiTech\Staffology\Model\PayCodeSet + ): ?\SynergiTech\Staffology\Model\PayCodeSet { list($response) = $this->updatePayCodeSetWithHttpInfo($employerId, $id, $payCodeSet, $contentType); return $response; @@ -1496,36 +1370,15 @@ public function updatePayCodeSetWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayCodeSet', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayCodeSet' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayCodeSet', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCodeSet', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1540,34 +1393,11 @@ public function updatePayCodeSetWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayCodeSet'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCodeSet', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1577,8 +1407,9 @@ public function updatePayCodeSetWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1814,4 +1645,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/PayRunApi.php b/src/Api/PayRunApi.php index ff14dce..2815ebc 100644 --- a/src/Api/PayRunApi.php +++ b/src/Api/PayRunApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class PayRunApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'addPayRunEntriesPayRun' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'aeoPayRun' => [ 'application/json', @@ -93,6 +96,12 @@ class PayRunApi 'createNextPayRunPayRun' => [ 'application/json', ], + 'createSupplementaryPayRunPayRun' => [ + 'application/*+json', + 'application/json', + 'application/json-patch+json', + 'text/json', + ], 'deletePayRun' => [ 'application/json', ], @@ -100,10 +109,16 @@ class PayRunApi 'application/json', ], 'finalisePayRunPayRun' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', + ], + 'getOpenPayrunsPayRun' => [ + 'application/json', + ], + 'getPayRunEntryNavigationPayRun' => [ + 'application/json', ], 'getPayRunEntryPayRun' => [ 'application/json', @@ -130,19 +145,19 @@ class PayRunApi 'application/json', ], 'importPayPayRun' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'importTimeAndAttendancePayRun' => [ 'application/json', ], 'importUmbrellaPayPayRun' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'lastPayRunEntryForEmployeePayRun' => [ 'application/json', @@ -154,19 +169,19 @@ class PayRunApi 'application/json', ], 'payRunEntryUmbrellaPaymentPayRun' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'reOpenPayRunPayRun' => [ 'application/json', ], 'removePayRunEntriesPayRun' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'sendPayslipEmailsPayRun' => [ 'application/json', @@ -175,31 +190,31 @@ class PayRunApi 'application/json', ], 'updatePayRunEntryPayRun' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updatePayRunPayRun' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updatePaymentDatePayRun' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'ytdPayRun' => [ 'multipart/form-data', ], 'zeroisePayRunEntriesPayRun' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -331,36 +346,15 @@ public function addPayRunEntriesPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRun', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRun' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRun', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -375,34 +369,11 @@ public function addPayRunEntriesPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRun'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -412,8 +383,9 @@ public function addPayRunEntriesPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -767,36 +739,15 @@ public function aeoPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -811,34 +762,11 @@ public function aeoPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -848,8 +776,9 @@ public function aeoPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1119,6 +1048,7 @@ public function aeoPayRunRequest( * @param string $employerId The Id of the Employer to which the Employee belongs (required) * @param string $employeeId The Id of the Employee (required) * @param \DateTime $startDate The date we used to calculate average holiday pay from (required) + * @param bool|null $isDaily If set to true, will calculate based on days otherwise will calculate based on hours (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['calculateAverageHolidayPayPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -1129,10 +1059,11 @@ public function calculateAverageHolidayPayPayRun( string $employerId, string $employeeId, \DateTime $startDate, + ?bool $isDaily = false, string $contentType = self::contentTypes['calculateAverageHolidayPayPayRun'][0] ): float { - list($response) = $this->calculateAverageHolidayPayPayRunWithHttpInfo($employerId, $employeeId, $startDate, $contentType); + list($response) = $this->calculateAverageHolidayPayPayRunWithHttpInfo($employerId, $employeeId, $startDate, $isDaily, $contentType); return $response; } @@ -1144,6 +1075,7 @@ public function calculateAverageHolidayPayPayRun( * @param string $employerId The Id of the Employer to which the Employee belongs (required) * @param string $employeeId The Id of the Employee (required) * @param \DateTime $startDate The date we used to calculate average holiday pay from (required) + * @param bool|null $isDaily If set to true, will calculate based on days otherwise will calculate based on hours (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['calculateAverageHolidayPayPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -1154,10 +1086,11 @@ public function calculateAverageHolidayPayPayRunWithHttpInfo( string $employerId, string $employeeId, \DateTime $startDate, + ?bool $isDaily = false, string $contentType = self::contentTypes['calculateAverageHolidayPayPayRun'][0] ): array { - $request = $this->calculateAverageHolidayPayPayRunRequest($employerId, $employeeId, $startDate, $contentType); + $request = $this->calculateAverageHolidayPayPayRunRequest($employerId, $employeeId, $startDate, $isDaily, $contentType); try { $options = $this->createHttpClientOption(); @@ -1181,36 +1114,15 @@ public function calculateAverageHolidayPayPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('float', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('float' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'float', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1225,34 +1137,11 @@ public function calculateAverageHolidayPayPayRunWithHttpInfo( ); } - $returnType = 'float'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1262,8 +1151,9 @@ public function calculateAverageHolidayPayPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1276,6 +1166,7 @@ public function calculateAverageHolidayPayPayRunWithHttpInfo( * @param string $employerId The Id of the Employer to which the Employee belongs (required) * @param string $employeeId The Id of the Employee (required) * @param \DateTime $startDate The date we used to calculate average holiday pay from (required) + * @param bool|null $isDaily If set to true, will calculate based on days otherwise will calculate based on hours (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['calculateAverageHolidayPayPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1285,10 +1176,11 @@ public function calculateAverageHolidayPayPayRunAsync( string $employerId, string $employeeId, \DateTime $startDate, + ?bool $isDaily = false, string $contentType = self::contentTypes['calculateAverageHolidayPayPayRun'][0] ): PromiseInterface { - return $this->calculateAverageHolidayPayPayRunAsyncWithHttpInfo($employerId, $employeeId, $startDate, $contentType) + return $this->calculateAverageHolidayPayPayRunAsyncWithHttpInfo($employerId, $employeeId, $startDate, $isDaily, $contentType) ->then( function ($response) { return $response[0]; @@ -1304,6 +1196,7 @@ function ($response) { * @param string $employerId The Id of the Employer to which the Employee belongs (required) * @param string $employeeId The Id of the Employee (required) * @param \DateTime $startDate The date we used to calculate average holiday pay from (required) + * @param bool|null $isDaily If set to true, will calculate based on days otherwise will calculate based on hours (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['calculateAverageHolidayPayPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1313,11 +1206,12 @@ public function calculateAverageHolidayPayPayRunAsyncWithHttpInfo( string $employerId, string $employeeId, \DateTime $startDate, + ?bool $isDaily = false, string $contentType = self::contentTypes['calculateAverageHolidayPayPayRun'][0] ): PromiseInterface { $returnType = 'float'; - $request = $this->calculateAverageHolidayPayPayRunRequest($employerId, $employeeId, $startDate, $contentType); + $request = $this->calculateAverageHolidayPayPayRunRequest($employerId, $employeeId, $startDate, $isDaily, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1361,6 +1255,7 @@ function ($exception) { * @param string $employerId The Id of the Employer to which the Employee belongs (required) * @param string $employeeId The Id of the Employee (required) * @param \DateTime $startDate The date we used to calculate average holiday pay from (required) + * @param bool|null $isDaily If set to true, will calculate based on days otherwise will calculate based on hours (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['calculateAverageHolidayPayPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1370,6 +1265,7 @@ public function calculateAverageHolidayPayPayRunRequest( string $employerId, string $employeeId, \DateTime $startDate, + ?bool $isDaily = false, string $contentType = self::contentTypes['calculateAverageHolidayPayPayRun'][0] ): Request { @@ -1396,6 +1292,7 @@ public function calculateAverageHolidayPayPayRunRequest( } + $resourcePath = '/employers/{employerId}/payrun/employees/{employeeId}/averageholidaypayrate'; $formParams = []; $queryParams = []; @@ -1412,6 +1309,15 @@ public function calculateAverageHolidayPayPayRunRequest( true, // explode true // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $isDaily, + 'isDaily', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -1501,6 +1407,7 @@ public function calculateAverageHolidayPayPayRunRequest( * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param int|null $ordinal ordinal (optional, default to 1) * @param bool|null $significantChangesOnly significantChangesOnly (optional, default to false) + * @param int|null $version version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changesForPayRunEntryPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -1515,10 +1422,11 @@ public function changesForPayRunEntryPayRun( \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, ?bool $significantChangesOnly = false, + ?int $version = null, string $contentType = self::contentTypes['changesForPayRunEntryPayRun'][0] ): array { - list($response) = $this->changesForPayRunEntryPayRunWithHttpInfo($employerId, $id, $payPeriod, $periodNumber, $taxYear, $ordinal, $significantChangesOnly, $contentType); + list($response) = $this->changesForPayRunEntryPayRunWithHttpInfo($employerId, $id, $payPeriod, $periodNumber, $taxYear, $ordinal, $significantChangesOnly, $version, $contentType); return $response; } @@ -1534,6 +1442,7 @@ public function changesForPayRunEntryPayRun( * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) * @param bool|null $significantChangesOnly (optional, default to false) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changesForPayRunEntryPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -1548,10 +1457,11 @@ public function changesForPayRunEntryPayRunWithHttpInfo( \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, ?bool $significantChangesOnly = false, + ?int $version = null, string $contentType = self::contentTypes['changesForPayRunEntryPayRun'][0] ): array { - $request = $this->changesForPayRunEntryPayRunRequest($employerId, $id, $payPeriod, $periodNumber, $taxYear, $ordinal, $significantChangesOnly, $contentType); + $request = $this->changesForPayRunEntryPayRunRequest($employerId, $id, $payPeriod, $periodNumber, $taxYear, $ordinal, $significantChangesOnly, $version, $contentType); try { $options = $this->createHttpClientOption(); @@ -1575,36 +1485,15 @@ public function changesForPayRunEntryPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ChangeSummary[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ChangeSummary[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ChangeSummary[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ChangeSummary[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1619,34 +1508,11 @@ public function changesForPayRunEntryPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ChangeSummary[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ChangeSummary[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1656,8 +1522,9 @@ public function changesForPayRunEntryPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1674,6 +1541,7 @@ public function changesForPayRunEntryPayRunWithHttpInfo( * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) * @param bool|null $significantChangesOnly (optional, default to false) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changesForPayRunEntryPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1687,10 +1555,11 @@ public function changesForPayRunEntryPayRunAsync( \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, ?bool $significantChangesOnly = false, + ?int $version = null, string $contentType = self::contentTypes['changesForPayRunEntryPayRun'][0] ): PromiseInterface { - return $this->changesForPayRunEntryPayRunAsyncWithHttpInfo($employerId, $id, $payPeriod, $periodNumber, $taxYear, $ordinal, $significantChangesOnly, $contentType) + return $this->changesForPayRunEntryPayRunAsyncWithHttpInfo($employerId, $id, $payPeriod, $periodNumber, $taxYear, $ordinal, $significantChangesOnly, $version, $contentType) ->then( function ($response) { return $response[0]; @@ -1710,6 +1579,7 @@ function ($response) { * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) * @param bool|null $significantChangesOnly (optional, default to false) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changesForPayRunEntryPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1723,11 +1593,12 @@ public function changesForPayRunEntryPayRunAsyncWithHttpInfo( \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, ?bool $significantChangesOnly = false, + ?int $version = null, string $contentType = self::contentTypes['changesForPayRunEntryPayRun'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\ChangeSummary[]'; - $request = $this->changesForPayRunEntryPayRunRequest($employerId, $id, $payPeriod, $periodNumber, $taxYear, $ordinal, $significantChangesOnly, $contentType); + $request = $this->changesForPayRunEntryPayRunRequest($employerId, $id, $payPeriod, $periodNumber, $taxYear, $ordinal, $significantChangesOnly, $version, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1775,6 +1646,7 @@ function ($exception) { * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) * @param bool|null $significantChangesOnly (optional, default to false) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changesForPayRunEntryPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1788,6 +1660,7 @@ public function changesForPayRunEntryPayRunRequest( \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, ?bool $significantChangesOnly = false, + ?int $version = null, string $contentType = self::contentTypes['changesForPayRunEntryPayRun'][0] ): Request { @@ -1830,6 +1703,7 @@ public function changesForPayRunEntryPayRunRequest( + $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/{id}/changes'; $formParams = []; $queryParams = []; @@ -1855,6 +1729,15 @@ public function changesForPayRunEntryPayRunRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -1966,6 +1849,7 @@ public function changesForPayRunEntryPayRunRequest( * @param int $periodNumber periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param int|null $ordinal ordinal (optional, default to 1) + * @param int|null $version version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changesPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -1978,10 +1862,11 @@ public function changesPayRun( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['changesPayRun'][0] ): \SynergiTech\Staffology\Model\PayRunChanges { - list($response) = $this->changesPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + list($response) = $this->changesPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType); return $response; } @@ -1995,6 +1880,7 @@ public function changesPayRun( * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changesPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -2007,10 +1893,11 @@ public function changesPayRunWithHttpInfo( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['changesPayRun'][0] ): array { - $request = $this->changesPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + $request = $this->changesPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType); try { $options = $this->createHttpClientOption(); @@ -2034,36 +1921,15 @@ public function changesPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRunChanges', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRunChanges' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRunChanges', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunChanges', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2078,34 +1944,11 @@ public function changesPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRunChanges'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunChanges', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2115,8 +1958,9 @@ public function changesPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2131,6 +1975,7 @@ public function changesPayRunWithHttpInfo( * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changesPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -2142,10 +1987,11 @@ public function changesPayRunAsync( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['changesPayRun'][0] ): PromiseInterface { - return $this->changesPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType) + return $this->changesPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType) ->then( function ($response) { return $response[0]; @@ -2163,6 +2009,7 @@ function ($response) { * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changesPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -2174,11 +2021,12 @@ public function changesPayRunAsyncWithHttpInfo( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['changesPayRun'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\PayRunChanges'; - $request = $this->changesPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + $request = $this->changesPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2224,6 +2072,7 @@ function ($exception) { * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['changesPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -2235,6 +2084,7 @@ public function changesPayRunRequest( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['changesPayRun'][0] ): Request { @@ -2269,6 +2119,7 @@ public function changesPayRunRequest( + $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/changes'; $formParams = []; $queryParams = []; @@ -2285,6 +2136,15 @@ public function changesPayRunRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -2391,7 +2251,7 @@ public function changesPayRunRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayRun + * @return \SynergiTech\Staffology\Model\PayRun|null */ public function createNextPayRunPayRun( string $employerId, @@ -2399,7 +2259,7 @@ public function createNextPayRunPayRun( \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, string $contentType = self::contentTypes['createNextPayRunPayRun'][0] - ): \SynergiTech\Staffology\Model\PayRun + ): ?\SynergiTech\Staffology\Model\PayRun { list($response) = $this->createNextPayRunPayRunWithHttpInfo($employerId, $payPeriod, $taxYear, $ordinal, $contentType); return $response; @@ -2452,36 +2312,15 @@ public function createNextPayRunPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\PayRun', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRun' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRun', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2496,34 +2335,11 @@ public function createNextPayRunPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRun'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -2533,8 +2349,9 @@ public function createNextPayRunPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2776,59 +2593,60 @@ public function createNextPayRunPayRunRequest( } /** - * Operation deletePayRun + * Operation createSupplementaryPayRunPayRun * - * Delete a PayRun + * Creates a supplementary PayRun * * @param string $employerId employerId (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) - * @param int $periodNumber periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param int|null $ordinal ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePayRun'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\SupplementaryPayRunDetails|null $supplementaryPayRunDetails supplementaryPayRunDetails (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSupplementaryPayRunPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void + * @return \SynergiTech\Staffology\Model\PayRun|null */ - public function deletePayRun( + public function createSupplementaryPayRunPayRun( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, - string $contentType = self::contentTypes['deletePayRun'][0] - ): void + ?\SynergiTech\Staffology\Model\SupplementaryPayRunDetails $supplementaryPayRunDetails = null, + string $contentType = self::contentTypes['createSupplementaryPayRunPayRun'][0] + ): ?\SynergiTech\Staffology\Model\PayRun { - $this->deletePayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + list($response) = $this->createSupplementaryPayRunPayRunWithHttpInfo($employerId, $payPeriod, $taxYear, $ordinal, $supplementaryPayRunDetails, $contentType); + return $response; } /** - * Operation deletePayRunWithHttpInfo + * Operation createSupplementaryPayRunPayRunWithHttpInfo * - * Delete a PayRun + * Creates a supplementary PayRun * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePayRun'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\SupplementaryPayRunDetails|null $supplementaryPayRunDetails (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSupplementaryPayRunPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\PayRun, HTTP status code, HTTP response headers (array of strings) */ - public function deletePayRunWithHttpInfo( + public function createSupplementaryPayRunPayRunWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, - string $contentType = self::contentTypes['deletePayRun'][0] + ?\SynergiTech\Staffology\Model\SupplementaryPayRunDetails $supplementaryPayRunDetails = null, + string $contentType = self::contentTypes['createSupplementaryPayRunPayRun'][0] ): array { - $request = $this->deletePayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + $request = $this->createSupplementaryPayRunPayRunRequest($employerId, $payPeriod, $taxYear, $ordinal, $supplementaryPayRunDetails, $contentType); try { $options = $this->createHttpClientOption(); @@ -2852,41 +2670,75 @@ public function deletePayRunWithHttpInfo( $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 201: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); + } + - return [null, $statusCode, $response->getHeaders()]; + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\PayRun', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } /** - * Operation deletePayRunAsync + * Operation createSupplementaryPayRunPayRunAsync * - * Delete a PayRun + * Creates a supplementary PayRun * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePayRun'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\SupplementaryPayRunDetails|null $supplementaryPayRunDetails (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSupplementaryPayRunPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function deletePayRunAsync( + public function createSupplementaryPayRunPayRunAsync( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, - string $contentType = self::contentTypes['deletePayRun'][0] + ?\SynergiTech\Staffology\Model\SupplementaryPayRunDetails $supplementaryPayRunDetails = null, + string $contentType = self::contentTypes['createSupplementaryPayRunPayRun'][0] ): PromiseInterface { - return $this->deletePayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType) + return $this->createSupplementaryPayRunPayRunAsyncWithHttpInfo($employerId, $payPeriod, $taxYear, $ordinal, $supplementaryPayRunDetails, $contentType) ->then( function ($response) { return $response[0]; @@ -2895,37 +2747,50 @@ function ($response) { } /** - * Operation deletePayRunAsyncWithHttpInfo + * Operation createSupplementaryPayRunPayRunAsyncWithHttpInfo * - * Delete a PayRun + * Creates a supplementary PayRun * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePayRun'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\SupplementaryPayRunDetails|null $supplementaryPayRunDetails (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSupplementaryPayRunPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function deletePayRunAsyncWithHttpInfo( + public function createSupplementaryPayRunPayRunAsyncWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, - string $contentType = self::contentTypes['deletePayRun'][0] + ?\SynergiTech\Staffology\Model\SupplementaryPayRunDetails $supplementaryPayRunDetails = null, + string $contentType = self::contentTypes['createSupplementaryPayRunPayRun'][0] ): PromiseInterface { - $returnType = ''; - $request = $this->deletePayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + $returnType = '\SynergiTech\Staffology\Model\PayRun'; + $request = $this->createSupplementaryPayRunPayRunRequest($employerId, $payPeriod, $taxYear, $ordinal, $supplementaryPayRunDetails, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -2945,59 +2810,53 @@ function ($exception) { } /** - * Create request for operation 'deletePayRun' + * Create request for operation 'createSupplementaryPayRunPayRun' * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePayRun'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\SupplementaryPayRunDetails|null $supplementaryPayRunDetails (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSupplementaryPayRunPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deletePayRunRequest( + public function createSupplementaryPayRunPayRunRequest( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, - string $contentType = self::contentTypes['deletePayRun'][0] + ?\SynergiTech\Staffology\Model\SupplementaryPayRunDetails $supplementaryPayRunDetails = null, + string $contentType = self::contentTypes['createSupplementaryPayRunPayRun'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling deletePayRun' + 'Missing the required parameter $employerId when calling createSupplementaryPayRunPayRun' ); } // verify the required parameter 'payPeriod' is set if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $payPeriod when calling deletePayRun' - ); - } - - // verify the required parameter 'periodNumber' is set - if ($periodNumber === null || (is_array($periodNumber) && count($periodNumber) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $periodNumber when calling deletePayRun' + 'Missing the required parameter $payPeriod when calling createSupplementaryPayRunPayRun' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling deletePayRun' + 'Missing the required parameter $taxYear when calling createSupplementaryPayRunPayRun' ); } - $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}'; + + $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/supplementary'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3032,14 +2891,6 @@ public function deletePayRunRequest( ); } // path params - if ($periodNumber !== null) { - $resourcePath = str_replace( - '{' . 'periodNumber' . '}', - ObjectSerializer::toPathValue($periodNumber), - $resourcePath - ); - } - // path params if ($taxYear !== null) { $resourcePath = str_replace( '{' . 'taxYear' . '}', @@ -3050,13 +2901,20 @@ public function deletePayRunRequest( $headers = $this->headerSelector->selectHeaders( - [], + ['application/json', ], $contentType, $multipart ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($supplementaryPayRunDetails)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($supplementaryPayRunDetails)); + } else { + $httpBody = $supplementaryPayRunDetails; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -3099,7 +2957,7 @@ public function deletePayRunRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'DELETE', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3107,59 +2965,63 @@ public function deletePayRunRequest( } /** - * Operation emailMultipleP45sPayRun + * Operation deletePayRun * - * (Re)send P45 Emails + * Delete a PayRun * * @param string $employerId employerId (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) * @param int $periodNumber periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param int|null $ordinal ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailMultipleP45sPayRun'] to see the possible values for this operation + * @param int|null $version version (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function emailMultipleP45sPayRun( + public function deletePayRun( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, - string $contentType = self::contentTypes['emailMultipleP45sPayRun'][0] + ?int $version = null, + string $contentType = self::contentTypes['deletePayRun'][0] ): void { - $this->emailMultipleP45sPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + $this->deletePayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType); } /** - * Operation emailMultipleP45sPayRunWithHttpInfo + * Operation deletePayRunWithHttpInfo * - * (Re)send P45 Emails + * Delete a PayRun * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailMultipleP45sPayRun'] to see the possible values for this operation + * @param int|null $version (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function emailMultipleP45sPayRunWithHttpInfo( + public function deletePayRunWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, - string $contentType = self::contentTypes['emailMultipleP45sPayRun'][0] + ?int $version = null, + string $contentType = self::contentTypes['deletePayRun'][0] ): array { - $request = $this->emailMultipleP45sPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + $request = $this->deletePayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType); try { $options = $this->createHttpClientOption(); @@ -3185,39 +3047,41 @@ public function emailMultipleP45sPayRunWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation emailMultipleP45sPayRunAsync + * Operation deletePayRunAsync * - * (Re)send P45 Emails + * Delete a PayRun * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailMultipleP45sPayRun'] to see the possible values for this operation + * @param int|null $version (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePayRun'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function emailMultipleP45sPayRunAsync( + public function deletePayRunAsync( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, - string $contentType = self::contentTypes['emailMultipleP45sPayRun'][0] + ?int $version = null, + string $contentType = self::contentTypes['deletePayRun'][0] ): PromiseInterface { - return $this->emailMultipleP45sPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType) + return $this->deletePayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType) ->then( function ($response) { return $response[0]; @@ -3226,31 +3090,33 @@ function ($response) { } /** - * Operation emailMultipleP45sPayRunAsyncWithHttpInfo + * Operation deletePayRunAsyncWithHttpInfo * - * (Re)send P45 Emails + * Delete a PayRun * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailMultipleP45sPayRun'] to see the possible values for this operation + * @param int|null $version (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePayRun'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function emailMultipleP45sPayRunAsyncWithHttpInfo( + public function deletePayRunAsyncWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, - string $contentType = self::contentTypes['emailMultipleP45sPayRun'][0] + ?int $version = null, + string $contentType = self::contentTypes['deletePayRun'][0] ): PromiseInterface { $returnType = ''; - $request = $this->emailMultipleP45sPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + $request = $this->deletePayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3276,59 +3142,62 @@ function ($exception) { } /** - * Create request for operation 'emailMultipleP45sPayRun' + * Create request for operation 'deletePayRun' * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailMultipleP45sPayRun'] to see the possible values for this operation + * @param int|null $version (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deletePayRun'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function emailMultipleP45sPayRunRequest( + public function deletePayRunRequest( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, - string $contentType = self::contentTypes['emailMultipleP45sPayRun'][0] + ?int $version = null, + string $contentType = self::contentTypes['deletePayRun'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling emailMultipleP45sPayRun' + 'Missing the required parameter $employerId when calling deletePayRun' ); } // verify the required parameter 'payPeriod' is set if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $payPeriod when calling emailMultipleP45sPayRun' + 'Missing the required parameter $payPeriod when calling deletePayRun' ); } // verify the required parameter 'periodNumber' is set if ($periodNumber === null || (is_array($periodNumber) && count($periodNumber) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $periodNumber when calling emailMultipleP45sPayRun' + 'Missing the required parameter $periodNumber when calling deletePayRun' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling emailMultipleP45sPayRun' + 'Missing the required parameter $taxYear when calling deletePayRun' ); } - $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/p45/email'; + + $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3344,6 +3213,15 @@ public function emailMultipleP45sPayRunRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -3430,7 +3308,7 @@ public function emailMultipleP45sPayRunRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3438,64 +3316,59 @@ public function emailMultipleP45sPayRunRequest( } /** - * Operation finalisePayRunPayRun + * Operation emailMultipleP45sPayRun * - * Finalise a PayRun (deprecated) + * (Re)send P45 Emails * * @param string $employerId employerId (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) * @param int $periodNumber periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param int|null $ordinal ordinal (optional, default to 1) - * @param array|null $requestBody requestBody (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['finalisePayRunPayRun'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailMultipleP45sPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return bool + * @return void */ - public function finalisePayRunPayRun( + public function emailMultipleP45sPayRun( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, - ?array $requestBody = null, - string $contentType = self::contentTypes['finalisePayRunPayRun'][0] - ): bool + string $contentType = self::contentTypes['emailMultipleP45sPayRun'][0] + ): void { - list($response) = $this->finalisePayRunPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $requestBody, $contentType); - return $response; + $this->emailMultipleP45sPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); } /** - * Operation finalisePayRunPayRunWithHttpInfo + * Operation emailMultipleP45sPayRunWithHttpInfo * - * Finalise a PayRun (deprecated) + * (Re)send P45 Emails * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) - * @param array|null $requestBody (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['finalisePayRunPayRun'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailMultipleP45sPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of bool, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function finalisePayRunPayRunWithHttpInfo( + public function emailMultipleP45sPayRunWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, - ?array $requestBody = null, - string $contentType = self::contentTypes['finalisePayRunPayRun'][0] + string $contentType = self::contentTypes['emailMultipleP45sPayRun'][0] ): array { - $request = $this->finalisePayRunPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $requestBody, $contentType); + $request = $this->emailMultipleP45sPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); try { $options = $this->createHttpClientOption(); @@ -3520,119 +3393,1126 @@ public function finalisePayRunPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - if (in_array('bool', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('bool' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'bool', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { } + + throw $e; + } + } - $returnType = 'bool'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } + /** + * Operation emailMultipleP45sPayRunAsync + * + * (Re)send P45 Emails + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param int $periodNumber (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailMultipleP45sPayRun'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function emailMultipleP45sPayRunAsync( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $ordinal = 1, + string $contentType = self::contentTypes['emailMultipleP45sPayRun'][0] + ): PromiseInterface + { + return $this->emailMultipleP45sPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType) + ->then( + function ($response) { + return $response[0]; } + ); + } + + /** + * Operation emailMultipleP45sPayRunAsyncWithHttpInfo + * + * (Re)send P45 Emails + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param int $periodNumber (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailMultipleP45sPayRun'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function emailMultipleP45sPayRunAsyncWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $ordinal = 1, + string $contentType = self::contentTypes['emailMultipleP45sPayRun'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->emailMultipleP45sPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'emailMultipleP45sPayRun' + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param int $periodNumber (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailMultipleP45sPayRun'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function emailMultipleP45sPayRunRequest( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $ordinal = 1, + string $contentType = self::contentTypes['emailMultipleP45sPayRun'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling emailMultipleP45sPayRun' + ); + } + + // verify the required parameter 'payPeriod' is set + if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $payPeriod when calling emailMultipleP45sPayRun' + ); + } + + // verify the required parameter 'periodNumber' is set + if ($periodNumber === null || (is_array($periodNumber) && count($periodNumber) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $periodNumber when calling emailMultipleP45sPayRun' + ); + } + + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling emailMultipleP45sPayRun' + ); + } + + + + $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/p45/email'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $ordinal, + 'ordinal', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($payPeriod !== null) { + $resourcePath = str_replace( + '{' . 'payPeriod' . '}', + ObjectSerializer::toPathValue($payPeriod->value), + $resourcePath + ); + } + // path params + if ($periodNumber !== null) { + $resourcePath = str_replace( + '{' . 'periodNumber' . '}', + ObjectSerializer::toPathValue($periodNumber), + $resourcePath + ); + } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation finalisePayRunPayRun + * + * Finalise a PayRun (deprecated) + * + * @param string $employerId employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) + * @param int $periodNumber periodNumber (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) + * @param int|null $ordinal ordinal (optional, default to 1) + * @param int|null $version version (optional) + * @param array|null $requestBody requestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['finalisePayRunPayRun'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return bool + */ + public function finalisePayRunPayRun( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $ordinal = 1, + ?int $version = null, + ?array $requestBody = null, + string $contentType = self::contentTypes['finalisePayRunPayRun'][0] + ): bool + { + list($response) = $this->finalisePayRunPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $requestBody, $contentType); + return $response; + } + + /** + * Operation finalisePayRunPayRunWithHttpInfo + * + * Finalise a PayRun (deprecated) + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param int $periodNumber (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) + * @param array|null $requestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['finalisePayRunPayRun'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of bool, HTTP status code, HTTP response headers (array of strings) + */ + public function finalisePayRunPayRunWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $ordinal = 1, + ?int $version = null, + ?array $requestBody = null, + string $contentType = self::contentTypes['finalisePayRunPayRun'][0] + ): array + { + $request = $this->finalisePayRunPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $requestBody, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'bool', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'bool', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'bool', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation finalisePayRunPayRunAsync + * + * Finalise a PayRun (deprecated) + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param int $periodNumber (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) + * @param array|null $requestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['finalisePayRunPayRun'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function finalisePayRunPayRunAsync( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $ordinal = 1, + ?int $version = null, + ?array $requestBody = null, + string $contentType = self::contentTypes['finalisePayRunPayRun'][0] + ): PromiseInterface + { + return $this->finalisePayRunPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $requestBody, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation finalisePayRunPayRunAsyncWithHttpInfo + * + * Finalise a PayRun (deprecated) + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param int $periodNumber (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) + * @param array|null $requestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['finalisePayRunPayRun'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function finalisePayRunPayRunAsyncWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $ordinal = 1, + ?int $version = null, + ?array $requestBody = null, + string $contentType = self::contentTypes['finalisePayRunPayRun'][0] + ): PromiseInterface + { + $returnType = 'bool'; + $request = $this->finalisePayRunPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $requestBody, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'finalisePayRunPayRun' + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param int $periodNumber (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) + * @param array|null $requestBody (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['finalisePayRunPayRun'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function finalisePayRunPayRunRequest( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $ordinal = 1, + ?int $version = null, + ?array $requestBody = null, + string $contentType = self::contentTypes['finalisePayRunPayRun'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling finalisePayRunPayRun' + ); + } + + // verify the required parameter 'payPeriod' is set + if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $payPeriod when calling finalisePayRunPayRun' + ); + } + + // verify the required parameter 'periodNumber' is set + if ($periodNumber === null || (is_array($periodNumber) && count($periodNumber) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $periodNumber when calling finalisePayRunPayRun' + ); + } + + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling finalisePayRunPayRun' + ); + } + + + + + + $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/finalise'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $ordinal, + 'ordinal', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($payPeriod !== null) { + $resourcePath = str_replace( + '{' . 'payPeriod' . '}', + ObjectSerializer::toPathValue($payPeriod->value), + $resourcePath + ); + } + // path params + if ($periodNumber !== null) { + $resourcePath = str_replace( + '{' . 'periodNumber' . '}', + ObjectSerializer::toPathValue($periodNumber), + $resourcePath + ); + } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($requestBody)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($requestBody)); + } else { + $httpBody = $requestBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getOpenPayrunsPayRun + * + * Get list of open payruns + * + * @param string|null $employerId employerId (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOpenPayrunsPayRun'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\PayRun[] + */ + public function getOpenPayrunsPayRun( + ?string $employerId = null, + string $contentType = self::contentTypes['getOpenPayrunsPayRun'][0] + ): array + { + list($response) = $this->getOpenPayrunsPayRunWithHttpInfo($employerId, $contentType); + return $response; + } + + /** + * Operation getOpenPayrunsPayRunWithHttpInfo + * + * Get list of open payruns + * + * @param string|null $employerId (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOpenPayrunsPayRun'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\PayRun[], HTTP status code, HTTP response headers (array of strings) + */ + public function getOpenPayrunsPayRunWithHttpInfo( + ?string $employerId = null, + string $contentType = self::contentTypes['getOpenPayrunsPayRun'][0] + ): array + { + $request = $this->getOpenPayrunsPayRunRequest($employerId, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\PayRun[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getOpenPayrunsPayRunAsync + * + * Get list of open payruns + * + * @param string|null $employerId (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOpenPayrunsPayRun'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getOpenPayrunsPayRunAsync( + ?string $employerId = null, + string $contentType = self::contentTypes['getOpenPayrunsPayRun'][0] + ): PromiseInterface + { + return $this->getOpenPayrunsPayRunAsyncWithHttpInfo($employerId, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getOpenPayrunsPayRunAsyncWithHttpInfo + * + * Get list of open payruns + * + * @param string|null $employerId (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOpenPayrunsPayRun'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getOpenPayrunsPayRunAsyncWithHttpInfo( + ?string $employerId = null, + string $contentType = self::contentTypes['getOpenPayrunsPayRun'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\PayRun[]'; + $request = $this->getOpenPayrunsPayRunRequest($employerId, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getOpenPayrunsPayRun' + * + * @param string|null $employerId (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOpenPayrunsPayRun'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getOpenPayrunsPayRunRequest( + ?string $employerId = null, + string $contentType = self::contentTypes['getOpenPayrunsPayRun'][0] + ): Request + { + + + + $resourcePath = '/open'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $employerId, + 'employerId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getPayRunEntryNavigationPayRun + * + * Get PayRunEntryNavigation for a specific PayRunEntry + * + * @param string $employerId The ID of the employer. (required) + * @param string $payRunEntryId The unique identifier of the payrunentry for which to build navigation context. (required) + * @param string|null $searchTerm An optional search term to filter employees. (optional) + * @param \SynergiTech\Staffology\Model\ZeroPaidFilter|null $zeroPaid The option to filter pay run entries by negative paid, zero paid, and non-zero paid. (optional) + * @param string|null $departmentCode The option to filter on department code. (optional) + * @param \SynergiTech\Staffology\Model\StartersLeaversFilter|null $startersLeavers The option to filter on whether the employee is a starter or leaver. (optional) + * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy The option to sort by a certain field. Default is Payroll Code. (optional) + * @param bool|null $sortDescending Whether to sort in ascending or descending order. (optional, default to false) + * @param bool|null $rolledBackOnly If set to true, returns rolled back pay run entries. If false, returns all entries. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunEntryNavigationPayRun'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\PayRunEntryNavigation + */ + public function getPayRunEntryNavigationPayRun( + string $employerId, + string $payRunEntryId, + ?string $searchTerm = null, + ?\SynergiTech\Staffology\Model\ZeroPaidFilter $zeroPaid = null, + ?string $departmentCode = null, + ?\SynergiTech\Staffology\Model\StartersLeaversFilter $startersLeavers = null, + ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, + ?bool $sortDescending = false, + ?bool $rolledBackOnly = false, + string $contentType = self::contentTypes['getPayRunEntryNavigationPayRun'][0] + ): \SynergiTech\Staffology\Model\PayRunEntryNavigation + { + list($response) = $this->getPayRunEntryNavigationPayRunWithHttpInfo($employerId, $payRunEntryId, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $contentType); + return $response; + } + + /** + * Operation getPayRunEntryNavigationPayRunWithHttpInfo + * + * Get PayRunEntryNavigation for a specific PayRunEntry + * + * @param string $employerId The ID of the employer. (required) + * @param string $payRunEntryId The unique identifier of the payrunentry for which to build navigation context. (required) + * @param string|null $searchTerm An optional search term to filter employees. (optional) + * @param \SynergiTech\Staffology\Model\ZeroPaidFilter|null $zeroPaid The option to filter pay run entries by negative paid, zero paid, and non-zero paid. (optional) + * @param string|null $departmentCode The option to filter on department code. (optional) + * @param \SynergiTech\Staffology\Model\StartersLeaversFilter|null $startersLeavers The option to filter on whether the employee is a starter or leaver. (optional) + * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy The option to sort by a certain field. Default is Payroll Code. (optional) + * @param bool|null $sortDescending Whether to sort in ascending or descending order. (optional, default to false) + * @param bool|null $rolledBackOnly If set to true, returns rolled back pay run entries. If false, returns all entries. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunEntryNavigationPayRun'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\PayRunEntryNavigation, HTTP status code, HTTP response headers (array of strings) + */ + public function getPayRunEntryNavigationPayRunWithHttpInfo( + string $employerId, + string $payRunEntryId, + ?string $searchTerm = null, + ?\SynergiTech\Staffology\Model\ZeroPaidFilter $zeroPaid = null, + ?string $departmentCode = null, + ?\SynergiTech\Staffology\Model\StartersLeaversFilter $startersLeavers = null, + ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, + ?bool $sortDescending = false, + ?bool $rolledBackOnly = false, + string $contentType = self::contentTypes['getPayRunEntryNavigationPayRun'][0] + ): array + { + $request = $this->getPayRunEntryNavigationPayRunRequest($employerId, $payRunEntryId, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntryNavigation', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntryNavigation', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'bool', + '\SynergiTech\Staffology\Model\PayRunEntryNavigation', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation finalisePayRunPayRunAsync + * Operation getPayRunEntryNavigationPayRunAsync * - * Finalise a PayRun (deprecated) + * Get PayRunEntryNavigation for a specific PayRunEntry * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param int $periodNumber (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $ordinal (optional, default to 1) - * @param array|null $requestBody (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['finalisePayRunPayRun'] to see the possible values for this operation + * @param string $employerId The ID of the employer. (required) + * @param string $payRunEntryId The unique identifier of the payrunentry for which to build navigation context. (required) + * @param string|null $searchTerm An optional search term to filter employees. (optional) + * @param \SynergiTech\Staffology\Model\ZeroPaidFilter|null $zeroPaid The option to filter pay run entries by negative paid, zero paid, and non-zero paid. (optional) + * @param string|null $departmentCode The option to filter on department code. (optional) + * @param \SynergiTech\Staffology\Model\StartersLeaversFilter|null $startersLeavers The option to filter on whether the employee is a starter or leaver. (optional) + * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy The option to sort by a certain field. Default is Payroll Code. (optional) + * @param bool|null $sortDescending Whether to sort in ascending or descending order. (optional, default to false) + * @param bool|null $rolledBackOnly If set to true, returns rolled back pay run entries. If false, returns all entries. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunEntryNavigationPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function finalisePayRunPayRunAsync( + public function getPayRunEntryNavigationPayRunAsync( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - int $periodNumber, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $ordinal = 1, - ?array $requestBody = null, - string $contentType = self::contentTypes['finalisePayRunPayRun'][0] + string $payRunEntryId, + ?string $searchTerm = null, + ?\SynergiTech\Staffology\Model\ZeroPaidFilter $zeroPaid = null, + ?string $departmentCode = null, + ?\SynergiTech\Staffology\Model\StartersLeaversFilter $startersLeavers = null, + ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, + ?bool $sortDescending = false, + ?bool $rolledBackOnly = false, + string $contentType = self::contentTypes['getPayRunEntryNavigationPayRun'][0] ): PromiseInterface { - return $this->finalisePayRunPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $requestBody, $contentType) + return $this->getPayRunEntryNavigationPayRunAsyncWithHttpInfo($employerId, $payRunEntryId, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $contentType) ->then( function ($response) { return $response[0]; @@ -3641,33 +4521,39 @@ function ($response) { } /** - * Operation finalisePayRunPayRunAsyncWithHttpInfo + * Operation getPayRunEntryNavigationPayRunAsyncWithHttpInfo * - * Finalise a PayRun (deprecated) + * Get PayRunEntryNavigation for a specific PayRunEntry * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param int $periodNumber (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $ordinal (optional, default to 1) - * @param array|null $requestBody (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['finalisePayRunPayRun'] to see the possible values for this operation + * @param string $employerId The ID of the employer. (required) + * @param string $payRunEntryId The unique identifier of the payrunentry for which to build navigation context. (required) + * @param string|null $searchTerm An optional search term to filter employees. (optional) + * @param \SynergiTech\Staffology\Model\ZeroPaidFilter|null $zeroPaid The option to filter pay run entries by negative paid, zero paid, and non-zero paid. (optional) + * @param string|null $departmentCode The option to filter on department code. (optional) + * @param \SynergiTech\Staffology\Model\StartersLeaversFilter|null $startersLeavers The option to filter on whether the employee is a starter or leaver. (optional) + * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy The option to sort by a certain field. Default is Payroll Code. (optional) + * @param bool|null $sortDescending Whether to sort in ascending or descending order. (optional, default to false) + * @param bool|null $rolledBackOnly If set to true, returns rolled back pay run entries. If false, returns all entries. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunEntryNavigationPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function finalisePayRunPayRunAsyncWithHttpInfo( + public function getPayRunEntryNavigationPayRunAsyncWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - int $periodNumber, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $ordinal = 1, - ?array $requestBody = null, - string $contentType = self::contentTypes['finalisePayRunPayRun'][0] + string $payRunEntryId, + ?string $searchTerm = null, + ?\SynergiTech\Staffology\Model\ZeroPaidFilter $zeroPaid = null, + ?string $departmentCode = null, + ?\SynergiTech\Staffology\Model\StartersLeaversFilter $startersLeavers = null, + ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, + ?bool $sortDescending = false, + ?bool $rolledBackOnly = false, + string $contentType = self::contentTypes['getPayRunEntryNavigationPayRun'][0] ): PromiseInterface { - $returnType = 'bool'; - $request = $this->finalisePayRunPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $requestBody, $contentType); + $returnType = '\SynergiTech\Staffology\Model\PayRunEntryNavigation'; + $request = $this->getPayRunEntryNavigationPayRunRequest($employerId, $payRunEntryId, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3706,62 +4592,59 @@ function ($exception) { } /** - * Create request for operation 'finalisePayRunPayRun' + * Create request for operation 'getPayRunEntryNavigationPayRun' * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param int $periodNumber (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $ordinal (optional, default to 1) - * @param array|null $requestBody (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['finalisePayRunPayRun'] to see the possible values for this operation + * @param string $employerId The ID of the employer. (required) + * @param string $payRunEntryId The unique identifier of the payrunentry for which to build navigation context. (required) + * @param string|null $searchTerm An optional search term to filter employees. (optional) + * @param \SynergiTech\Staffology\Model\ZeroPaidFilter|null $zeroPaid The option to filter pay run entries by negative paid, zero paid, and non-zero paid. (optional) + * @param string|null $departmentCode The option to filter on department code. (optional) + * @param \SynergiTech\Staffology\Model\StartersLeaversFilter|null $startersLeavers The option to filter on whether the employee is a starter or leaver. (optional) + * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy The option to sort by a certain field. Default is Payroll Code. (optional) + * @param bool|null $sortDescending Whether to sort in ascending or descending order. (optional, default to false) + * @param bool|null $rolledBackOnly If set to true, returns rolled back pay run entries. If false, returns all entries. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunEntryNavigationPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function finalisePayRunPayRunRequest( + public function getPayRunEntryNavigationPayRunRequest( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - int $periodNumber, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $ordinal = 1, - ?array $requestBody = null, - string $contentType = self::contentTypes['finalisePayRunPayRun'][0] + string $payRunEntryId, + ?string $searchTerm = null, + ?\SynergiTech\Staffology\Model\ZeroPaidFilter $zeroPaid = null, + ?string $departmentCode = null, + ?\SynergiTech\Staffology\Model\StartersLeaversFilter $startersLeavers = null, + ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, + ?bool $sortDescending = false, + ?bool $rolledBackOnly = false, + string $contentType = self::contentTypes['getPayRunEntryNavigationPayRun'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling finalisePayRunPayRun' + 'Missing the required parameter $employerId when calling getPayRunEntryNavigationPayRun' ); } - // verify the required parameter 'payPeriod' is set - if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { + // verify the required parameter 'payRunEntryId' is set + if ($payRunEntryId === null || (is_array($payRunEntryId) && count($payRunEntryId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $payPeriod when calling finalisePayRunPayRun' + 'Missing the required parameter $payRunEntryId when calling getPayRunEntryNavigationPayRun' ); } - // verify the required parameter 'periodNumber' is set - if ($periodNumber === null || (is_array($periodNumber) && count($periodNumber) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $periodNumber when calling finalisePayRunPayRun' - ); - } - // verify the required parameter 'taxYear' is set - if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling finalisePayRunPayRun' - ); - } - $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/finalise'; + + + + $resourcePath = '/employers/{employerId}/payrun/navigation/{payRunEntryId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3770,9 +4653,63 @@ public function finalisePayRunPayRunRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $ordinal, - 'ordinal', // param base name - 'integer', // openApiType + $searchTerm, + 'searchTerm', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $zeroPaid?->value, + 'zeroPaid', // param base name + 'ZeroPaidFilter', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $departmentCode, + 'departmentCode', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $startersLeavers?->value, + 'startersLeavers', // param base name + 'StartersLeaversFilter', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sortBy?->value, + 'sortBy', // param base name + 'PayRunEntrySortBy', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sortDescending, + 'sortDescending', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $rolledBackOnly, + 'rolledBackOnly', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required @@ -3788,26 +4725,10 @@ public function finalisePayRunPayRunRequest( ); } // path params - if ($payPeriod !== null) { - $resourcePath = str_replace( - '{' . 'payPeriod' . '}', - ObjectSerializer::toPathValue($payPeriod->value), - $resourcePath - ); - } - // path params - if ($periodNumber !== null) { - $resourcePath = str_replace( - '{' . 'periodNumber' . '}', - ObjectSerializer::toPathValue($periodNumber), - $resourcePath - ); - } - // path params - if ($taxYear !== null) { + if ($payRunEntryId !== null) { $resourcePath = str_replace( - '{' . 'taxYear' . '}', - ObjectSerializer::toPathValue($taxYear->value), + '{' . 'payRunEntryId' . '}', + ObjectSerializer::toPathValue($payRunEntryId), $resourcePath ); } @@ -3820,14 +4741,7 @@ public function finalisePayRunPayRunRequest( ); // for model (json/xml) - if (isset($requestBody)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($requestBody)); - } else { - $httpBody = $requestBody; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -3870,7 +4784,7 @@ public function finalisePayRunPayRunRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3888,6 +4802,7 @@ public function finalisePayRunPayRunRequest( * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param string $id id (required) * @param int|null $ordinal ordinal (optional, default to 1) + * @param bool|null $differenceOnly If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunEntryPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -3901,10 +4816,11 @@ public function getPayRunEntryPayRun( \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, ?int $ordinal = 1, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['getPayRunEntryPayRun'][0] ): \SynergiTech\Staffology\Model\PayRunEntry { - list($response) = $this->getPayRunEntryPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $id, $ordinal, $contentType); + list($response) = $this->getPayRunEntryPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $id, $ordinal, $differenceOnly, $contentType); return $response; } @@ -3919,6 +4835,7 @@ public function getPayRunEntryPayRun( * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) * @param int|null $ordinal (optional, default to 1) + * @param bool|null $differenceOnly If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunEntryPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -3932,10 +4849,11 @@ public function getPayRunEntryPayRunWithHttpInfo( \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, ?int $ordinal = 1, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['getPayRunEntryPayRun'][0] ): array { - $request = $this->getPayRunEntryPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $id, $ordinal, $contentType); + $request = $this->getPayRunEntryPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $id, $ordinal, $differenceOnly, $contentType); try { $options = $this->createHttpClientOption(); @@ -3959,36 +4877,15 @@ public function getPayRunEntryPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRunEntry', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRunEntry' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRunEntry', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntry', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4003,34 +4900,11 @@ public function getPayRunEntryPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRunEntry'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntry', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4040,8 +4914,9 @@ public function getPayRunEntryPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4057,6 +4932,7 @@ public function getPayRunEntryPayRunWithHttpInfo( * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) * @param int|null $ordinal (optional, default to 1) + * @param bool|null $differenceOnly If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunEntryPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -4069,10 +4945,11 @@ public function getPayRunEntryPayRunAsync( \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, ?int $ordinal = 1, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['getPayRunEntryPayRun'][0] ): PromiseInterface { - return $this->getPayRunEntryPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $id, $ordinal, $contentType) + return $this->getPayRunEntryPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $id, $ordinal, $differenceOnly, $contentType) ->then( function ($response) { return $response[0]; @@ -4091,6 +4968,7 @@ function ($response) { * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) * @param int|null $ordinal (optional, default to 1) + * @param bool|null $differenceOnly If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunEntryPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -4103,11 +4981,12 @@ public function getPayRunEntryPayRunAsyncWithHttpInfo( \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, ?int $ordinal = 1, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['getPayRunEntryPayRun'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\PayRunEntry'; - $request = $this->getPayRunEntryPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $id, $ordinal, $contentType); + $request = $this->getPayRunEntryPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $id, $ordinal, $differenceOnly, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4154,6 +5033,7 @@ function ($exception) { * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param string $id (required) * @param int|null $ordinal (optional, default to 1) + * @param bool|null $differenceOnly If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunEntryPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -4166,6 +5046,7 @@ public function getPayRunEntryPayRunRequest( \SynergiTech\Staffology\Model\TaxYear $taxYear, string $id, ?int $ordinal = 1, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['getPayRunEntryPayRun'][0] ): Request { @@ -4207,6 +5088,7 @@ public function getPayRunEntryPayRunRequest( + $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/{id}'; $formParams = []; $queryParams = []; @@ -4223,6 +5105,15 @@ public function getPayRunEntryPayRunRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $differenceOnly, + 'differenceOnly', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -4402,36 +5293,15 @@ public function getPayRunEventsPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PaySchedulePeriodEvent[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PaySchedulePeriodEvent[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PaySchedulePeriodEvent[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedulePeriodEvent[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4446,34 +5316,11 @@ public function getPayRunEventsPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PaySchedulePeriodEvent[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedulePeriodEvent[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4483,8 +5330,9 @@ public function getPayRunEventsPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4757,6 +5605,8 @@ public function getPayRunEventsPayRunRequest( * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param int|null $ordinal ordinal (optional, default to 1) * @param bool|null $deptBreakdown Set to true and the journal will be split between any relevant Departments (optional, default to false) + * @param bool|null $includeApprenticeLevy Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable (optional, default to false) + * @param bool|null $allSchedules Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunJournalPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -4770,10 +5620,12 @@ public function getPayRunJournalPayRun( \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, ?bool $deptBreakdown = false, + ?bool $includeApprenticeLevy = false, + ?bool $allSchedules = false, string $contentType = self::contentTypes['getPayRunJournalPayRun'][0] ): \SynergiTech\Staffology\Model\PayRunJournal { - list($response) = $this->getPayRunJournalPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $deptBreakdown, $contentType); + list($response) = $this->getPayRunJournalPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $deptBreakdown, $includeApprenticeLevy, $allSchedules, $contentType); return $response; } @@ -4788,6 +5640,8 @@ public function getPayRunJournalPayRun( * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) * @param bool|null $deptBreakdown Set to true and the journal will be split between any relevant Departments (optional, default to false) + * @param bool|null $includeApprenticeLevy Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable (optional, default to false) + * @param bool|null $allSchedules Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunJournalPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -4801,10 +5655,12 @@ public function getPayRunJournalPayRunWithHttpInfo( \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, ?bool $deptBreakdown = false, + ?bool $includeApprenticeLevy = false, + ?bool $allSchedules = false, string $contentType = self::contentTypes['getPayRunJournalPayRun'][0] ): array { - $request = $this->getPayRunJournalPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $deptBreakdown, $contentType); + $request = $this->getPayRunJournalPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $deptBreakdown, $includeApprenticeLevy, $allSchedules, $contentType); try { $options = $this->createHttpClientOption(); @@ -4825,39 +5681,18 @@ public function getPayRunJournalPayRunWithHttpInfo( null ); } - - $statusCode = $response->getStatusCode(); - - - switch($statusCode) { - case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRunJournal', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRunJournal' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRunJournal', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunJournal', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4872,34 +5707,11 @@ public function getPayRunJournalPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRunJournal'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunJournal', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4909,8 +5721,9 @@ public function getPayRunJournalPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4926,6 +5739,8 @@ public function getPayRunJournalPayRunWithHttpInfo( * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) * @param bool|null $deptBreakdown Set to true and the journal will be split between any relevant Departments (optional, default to false) + * @param bool|null $includeApprenticeLevy Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable (optional, default to false) + * @param bool|null $allSchedules Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunJournalPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -4938,10 +5753,12 @@ public function getPayRunJournalPayRunAsync( \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, ?bool $deptBreakdown = false, + ?bool $includeApprenticeLevy = false, + ?bool $allSchedules = false, string $contentType = self::contentTypes['getPayRunJournalPayRun'][0] ): PromiseInterface { - return $this->getPayRunJournalPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $deptBreakdown, $contentType) + return $this->getPayRunJournalPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $deptBreakdown, $includeApprenticeLevy, $allSchedules, $contentType) ->then( function ($response) { return $response[0]; @@ -4960,6 +5777,8 @@ function ($response) { * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) * @param bool|null $deptBreakdown Set to true and the journal will be split between any relevant Departments (optional, default to false) + * @param bool|null $includeApprenticeLevy Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable (optional, default to false) + * @param bool|null $allSchedules Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunJournalPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -4972,11 +5791,13 @@ public function getPayRunJournalPayRunAsyncWithHttpInfo( \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, ?bool $deptBreakdown = false, + ?bool $includeApprenticeLevy = false, + ?bool $allSchedules = false, string $contentType = self::contentTypes['getPayRunJournalPayRun'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\PayRunJournal'; - $request = $this->getPayRunJournalPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $deptBreakdown, $contentType); + $request = $this->getPayRunJournalPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $deptBreakdown, $includeApprenticeLevy, $allSchedules, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5023,6 +5844,8 @@ function ($exception) { * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) * @param bool|null $deptBreakdown Set to true and the journal will be split between any relevant Departments (optional, default to false) + * @param bool|null $includeApprenticeLevy Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable (optional, default to false) + * @param bool|null $allSchedules Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunJournalPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -5035,6 +5858,8 @@ public function getPayRunJournalPayRunRequest( \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, ?bool $deptBreakdown = false, + ?bool $includeApprenticeLevy = false, + ?bool $allSchedules = false, string $contentType = self::contentTypes['getPayRunJournalPayRun'][0] ): Request { @@ -5070,6 +5895,8 @@ public function getPayRunJournalPayRunRequest( + + $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/journal'; $formParams = []; $queryParams = []; @@ -5095,6 +5922,24 @@ public function getPayRunJournalPayRunRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $includeApprenticeLevy, + 'includeApprenticeLevy', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $allSchedules, + 'allSchedules', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -5266,36 +6111,15 @@ public function getPayRunPayCodesPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayCode[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayCode[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayCode[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5310,34 +6134,11 @@ public function getPayRunPayCodesPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayCode[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayCode[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5347,8 +6148,9 @@ public function getPayRunPayCodesPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5629,11 +6431,13 @@ public function getPayRunPayCodesPayRunRequest( * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy The option to sort by a certain field. Default is Payroll Code (optional) * @param bool|null $sortDescending Whether to sort in ascending or descending order (optional, default to false) * @param bool|null $rolledBackOnly If set to true, returns rolled back pay run entries. If false, returns all entries. (optional, default to false) + * @param int|null $version If supplementary pay runs have been created this can be used to retrieve the specific supplementary pay run version (optional) + * @param bool|null $combinePayRuns If supplementary pay runs have been created this can be used to retrieve the combined latest version of the pay run with all latest version pay run entries (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayRun + * @return \SynergiTech\Staffology\Model\PayRun|null */ public function getPayRunPayRun( string $employerId, @@ -5650,10 +6454,12 @@ public function getPayRunPayRun( ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, ?bool $sortDescending = false, ?bool $rolledBackOnly = false, + ?int $version = null, + ?bool $combinePayRuns = false, string $contentType = self::contentTypes['getPayRunPayRun'][0] - ): \SynergiTech\Staffology\Model\PayRun + ): ?\SynergiTech\Staffology\Model\PayRun { - list($response) = $this->getPayRunPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $pageNum, $pageSize, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $contentType); + list($response) = $this->getPayRunPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $pageNum, $pageSize, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $version, $combinePayRuns, $contentType); return $response; } @@ -5676,6 +6482,8 @@ public function getPayRunPayRun( * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy The option to sort by a certain field. Default is Payroll Code (optional) * @param bool|null $sortDescending Whether to sort in ascending or descending order (optional, default to false) * @param bool|null $rolledBackOnly If set to true, returns rolled back pay run entries. If false, returns all entries. (optional, default to false) + * @param int|null $version If supplementary pay runs have been created this can be used to retrieve the specific supplementary pay run version (optional) + * @param bool|null $combinePayRuns If supplementary pay runs have been created this can be used to retrieve the combined latest version of the pay run with all latest version pay run entries (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -5697,10 +6505,12 @@ public function getPayRunPayRunWithHttpInfo( ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, ?bool $sortDescending = false, ?bool $rolledBackOnly = false, + ?int $version = null, + ?bool $combinePayRuns = false, string $contentType = self::contentTypes['getPayRunPayRun'][0] ): array { - $request = $this->getPayRunPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $pageNum, $pageSize, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $contentType); + $request = $this->getPayRunPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $pageNum, $pageSize, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $version, $combinePayRuns, $contentType); try { $options = $this->createHttpClientOption(); @@ -5724,36 +6534,15 @@ public function getPayRunPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRun', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRun' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRun', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5768,34 +6557,11 @@ public function getPayRunPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRun'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5805,8 +6571,9 @@ public function getPayRunPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5830,6 +6597,8 @@ public function getPayRunPayRunWithHttpInfo( * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy The option to sort by a certain field. Default is Payroll Code (optional) * @param bool|null $sortDescending Whether to sort in ascending or descending order (optional, default to false) * @param bool|null $rolledBackOnly If set to true, returns rolled back pay run entries. If false, returns all entries. (optional, default to false) + * @param int|null $version If supplementary pay runs have been created this can be used to retrieve the specific supplementary pay run version (optional) + * @param bool|null $combinePayRuns If supplementary pay runs have been created this can be used to retrieve the combined latest version of the pay run with all latest version pay run entries (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -5850,10 +6619,12 @@ public function getPayRunPayRunAsync( ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, ?bool $sortDescending = false, ?bool $rolledBackOnly = false, + ?int $version = null, + ?bool $combinePayRuns = false, string $contentType = self::contentTypes['getPayRunPayRun'][0] ): PromiseInterface { - return $this->getPayRunPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $pageNum, $pageSize, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $contentType) + return $this->getPayRunPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $pageNum, $pageSize, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $version, $combinePayRuns, $contentType) ->then( function ($response) { return $response[0]; @@ -5880,6 +6651,8 @@ function ($response) { * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy The option to sort by a certain field. Default is Payroll Code (optional) * @param bool|null $sortDescending Whether to sort in ascending or descending order (optional, default to false) * @param bool|null $rolledBackOnly If set to true, returns rolled back pay run entries. If false, returns all entries. (optional, default to false) + * @param int|null $version If supplementary pay runs have been created this can be used to retrieve the specific supplementary pay run version (optional) + * @param bool|null $combinePayRuns If supplementary pay runs have been created this can be used to retrieve the combined latest version of the pay run with all latest version pay run entries (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -5900,11 +6673,13 @@ public function getPayRunPayRunAsyncWithHttpInfo( ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, ?bool $sortDescending = false, ?bool $rolledBackOnly = false, + ?int $version = null, + ?bool $combinePayRuns = false, string $contentType = self::contentTypes['getPayRunPayRun'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\PayRun'; - $request = $this->getPayRunPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $pageNum, $pageSize, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $contentType); + $request = $this->getPayRunPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $pageNum, $pageSize, $searchTerm, $zeroPaid, $departmentCode, $startersLeavers, $sortBy, $sortDescending, $rolledBackOnly, $version, $combinePayRuns, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5959,6 +6734,8 @@ function ($exception) { * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy The option to sort by a certain field. Default is Payroll Code (optional) * @param bool|null $sortDescending Whether to sort in ascending or descending order (optional, default to false) * @param bool|null $rolledBackOnly If set to true, returns rolled back pay run entries. If false, returns all entries. (optional, default to false) + * @param int|null $version If supplementary pay runs have been created this can be used to retrieve the specific supplementary pay run version (optional) + * @param bool|null $combinePayRuns If supplementary pay runs have been created this can be used to retrieve the combined latest version of the pay run with all latest version pay run entries (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -5979,6 +6756,8 @@ public function getPayRunPayRunRequest( ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, ?bool $sortDescending = false, ?bool $rolledBackOnly = false, + ?int $version = null, + ?bool $combinePayRuns = false, string $contentType = self::contentTypes['getPayRunPayRun'][0] ): Request { @@ -6022,6 +6801,8 @@ public function getPayRunPayRunRequest( + + $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}'; $formParams = []; $queryParams = []; @@ -6119,6 +6900,24 @@ public function getPayRunPayRunRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $combinePayRuns, + 'combinePayRuns', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -6290,90 +7089,27 @@ public function getPayRunStateHistoryPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]', + $request, + $response, + ); case 400: - if (in_array('\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]', + $request, + $response, + ); case 404: - if (in_array('\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6388,34 +7124,11 @@ public function getPayRunStateHistoryPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayRunStateHistoryResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6425,7 +7138,7 @@ public function getPayRunStateHistoryPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6433,7 +7146,7 @@ public function getPayRunStateHistoryPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6441,8 +7154,9 @@ public function getPayRunStateHistoryPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -6790,36 +7504,15 @@ public function getPayRunWarningsPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6834,34 +7527,11 @@ public function getPayRunWarningsPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6871,8 +7541,9 @@ public function getPayRunWarningsPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -7240,36 +7911,15 @@ public function getPayRunsPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7284,34 +7934,11 @@ public function getPayRunsPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7321,8 +7948,9 @@ public function getPayRunsPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -7654,10 +8282,10 @@ public function importPayPayRunWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -8016,36 +8644,15 @@ public function importTimeAndAttendancePayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayOptionsImport[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayOptionsImport[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayOptionsImport[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayOptionsImport[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8060,34 +8667,11 @@ public function importTimeAndAttendancePayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayOptionsImport[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayOptionsImport[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8097,8 +8681,9 @@ public function importTimeAndAttendancePayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -8408,36 +8993,15 @@ public function importUmbrellaPayPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRun', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRun' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRun', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8452,34 +9016,11 @@ public function importUmbrellaPayPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRun'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8489,8 +9030,9 @@ public function importUmbrellaPayPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -8794,36 +9336,15 @@ public function lastPayRunEntryForEmployeePayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRunEntry', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRunEntry' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRunEntry', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntry', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8838,34 +9359,11 @@ public function lastPayRunEntryForEmployeePayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRunEntry'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntry', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8875,8 +9373,9 @@ public function lastPayRunEntryForEmployeePayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -9109,7 +9608,7 @@ public function lastPayRunEntryForEmployeePayRunRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayRunEntry + * @return \SynergiTech\Staffology\Model\PayRunEntry|null */ public function lastPayRunEntryWithPensionYtdValuesForEmployeePayRun( string $employerId, @@ -9117,7 +9616,7 @@ public function lastPayRunEntryWithPensionYtdValuesForEmployeePayRun( string $pensionUniqueId, \SynergiTech\Staffology\Model\TaxYear $taxYear, string $contentType = self::contentTypes['lastPayRunEntryWithPensionYtdValuesForEmployeePayRun'][0] - ): \SynergiTech\Staffology\Model\PayRunEntry + ): ?\SynergiTech\Staffology\Model\PayRunEntry { list($response) = $this->lastPayRunEntryWithPensionYtdValuesForEmployeePayRunWithHttpInfo($employerId, $employeeId, $pensionUniqueId, $taxYear, $contentType); return $response; @@ -9166,40 +9665,19 @@ public function lastPayRunEntryWithPensionYtdValuesForEmployeePayRunWithHttpInfo null, null ); - } - - $statusCode = $response->getStatusCode(); - - - switch($statusCode) { - case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRunEntry', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRunEntry' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } + } - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRunEntry', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntry', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9214,34 +9692,11 @@ public function lastPayRunEntryWithPensionYtdValuesForEmployeePayRunWithHttpInfo ); } - $returnType = '\SynergiTech\Staffology\Model\PayRunEntry'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntry', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9251,8 +9706,9 @@ public function lastPayRunEntryWithPensionYtdValuesForEmployeePayRunWithHttpInfo $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -9576,36 +10032,15 @@ public function leavePayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9620,34 +10055,11 @@ public function leavePayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9657,8 +10069,9 @@ public function leavePayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -10006,36 +10419,15 @@ public function payRunEntryUmbrellaPaymentPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRunEntry', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRunEntry' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRunEntry', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntry', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10050,34 +10442,11 @@ public function payRunEntryUmbrellaPaymentPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRunEntry'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntry', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10087,8 +10456,9 @@ public function payRunEntryUmbrellaPaymentPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -10395,6 +10765,7 @@ public function payRunEntryUmbrellaPaymentPayRunRequest( * @param int $periodNumber periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param int|null $ordinal ordinal (optional, default to 1) + * @param int|null $version version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reOpenPayRunPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -10407,10 +10778,11 @@ public function reOpenPayRunPayRun( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['reOpenPayRunPayRun'][0] ): \SynergiTech\Staffology\Model\PayRun { - list($response) = $this->reOpenPayRunPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + list($response) = $this->reOpenPayRunPayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType); return $response; } @@ -10424,6 +10796,7 @@ public function reOpenPayRunPayRun( * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reOpenPayRunPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -10436,10 +10809,11 @@ public function reOpenPayRunPayRunWithHttpInfo( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['reOpenPayRunPayRun'][0] ): array { - $request = $this->reOpenPayRunPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + $request = $this->reOpenPayRunPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType); try { $options = $this->createHttpClientOption(); @@ -10463,36 +10837,15 @@ public function reOpenPayRunPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRun', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRun' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRun', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10507,34 +10860,11 @@ public function reOpenPayRunPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRun'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10544,8 +10874,9 @@ public function reOpenPayRunPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -10560,6 +10891,7 @@ public function reOpenPayRunPayRunWithHttpInfo( * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reOpenPayRunPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -10571,10 +10903,11 @@ public function reOpenPayRunPayRunAsync( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['reOpenPayRunPayRun'][0] ): PromiseInterface { - return $this->reOpenPayRunPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType) + return $this->reOpenPayRunPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType) ->then( function ($response) { return $response[0]; @@ -10592,6 +10925,7 @@ function ($response) { * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reOpenPayRunPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -10603,11 +10937,12 @@ public function reOpenPayRunPayRunAsyncWithHttpInfo( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['reOpenPayRunPayRun'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\PayRun'; - $request = $this->reOpenPayRunPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + $request = $this->reOpenPayRunPayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10653,6 +10988,7 @@ function ($exception) { * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['reOpenPayRunPayRun'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -10664,6 +11000,7 @@ public function reOpenPayRunPayRunRequest( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['reOpenPayRunPayRun'][0] ): Request { @@ -10698,6 +11035,7 @@ public function reOpenPayRunPayRunRequest( + $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/reopen'; $formParams = []; $queryParams = []; @@ -10714,6 +11052,15 @@ public function reOpenPayRunPayRunRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -10889,36 +11236,15 @@ public function removePayRunEntriesPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRun', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRun' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRun', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10933,34 +11259,11 @@ public function removePayRunEntriesPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRun'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10970,8 +11273,9 @@ public function removePayRunEntriesPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -11330,10 +11634,10 @@ public function sendPayslipEmailsPayRunWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -11673,10 +11977,10 @@ public function startNextPayRunPayRunWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -11994,36 +12298,15 @@ public function updatePayRunEntryPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRunEntry', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRunEntry' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRunEntry', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntry', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -12038,34 +12321,11 @@ public function updatePayRunEntryPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRunEntry'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntry', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12075,8 +12335,9 @@ public function updatePayRunEntryPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -12402,12 +12663,13 @@ public function updatePayRunEntryPayRunRequest( * @param bool|null $sendPayslipEmails Only relevant if setting the State to Finalised. Set to true if you want to have payslips emailed to employees. (optional, default to false) * @param \SynergiTech\Staffology\Model\PayslipReleaseType|null $payslipReleaseType payslipReleaseType (optional) * @param \DateTime|null $payslipScheduledDateTime payslipScheduledDateTime (optional) + * @param int|null $version If supplementary pay runs have been created this can be used to update the specific supplementary pay run version (optional) * @param \SynergiTech\Staffology\Model\PayRunStateChange|null $payRunStateChange Specify the PayRun state you want to change to and the reason for the change. Only Open and Finalised states are available at the moment. Other states are used with Bureau functionality which isn't currently generally available. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePayRunPayRun'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayRun + * @return \SynergiTech\Staffology\Model\PayRun|null */ public function updatePayRunPayRun( string $employerId, @@ -12418,11 +12680,12 @@ public function updatePayRunPayRun( ?bool $sendPayslipEmails = false, ?\SynergiTech\Staffology\Model\PayslipReleaseType $payslipReleaseType = null, ?\DateTime $payslipScheduledDateTime = null, + ?int $version = null, ?\SynergiTech\Staffology\Model\PayRunStateChange $payRunStateChange = null, string $contentType = self::contentTypes['updatePayRunPayRun'][0] - ): \SynergiTech\Staffology\Model\PayRun + ): ?\SynergiTech\Staffology\Model\PayRun { - list($response) = $this->updatePayRunPayRunWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $payRunStateChange, $contentType); + list($response) = $this->updatePayRunPayRunWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $version, $payRunStateChange, $contentType); return $response; } @@ -12439,6 +12702,7 @@ public function updatePayRunPayRun( * @param bool|null $sendPayslipEmails Only relevant if setting the State to Finalised. Set to true if you want to have payslips emailed to employees. (optional, default to false) * @param \SynergiTech\Staffology\Model\PayslipReleaseType|null $payslipReleaseType (optional) * @param \DateTime|null $payslipScheduledDateTime (optional) + * @param int|null $version If supplementary pay runs have been created this can be used to update the specific supplementary pay run version (optional) * @param \SynergiTech\Staffology\Model\PayRunStateChange|null $payRunStateChange Specify the PayRun state you want to change to and the reason for the change. Only Open and Finalised states are available at the moment. Other states are used with Bureau functionality which isn't currently generally available. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePayRunPayRun'] to see the possible values for this operation * @@ -12455,11 +12719,12 @@ public function updatePayRunPayRunWithHttpInfo( ?bool $sendPayslipEmails = false, ?\SynergiTech\Staffology\Model\PayslipReleaseType $payslipReleaseType = null, ?\DateTime $payslipScheduledDateTime = null, + ?int $version = null, ?\SynergiTech\Staffology\Model\PayRunStateChange $payRunStateChange = null, string $contentType = self::contentTypes['updatePayRunPayRun'][0] ): array { - $request = $this->updatePayRunPayRunRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $payRunStateChange, $contentType); + $request = $this->updatePayRunPayRunRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $version, $payRunStateChange, $contentType); try { $options = $this->createHttpClientOption(); @@ -12483,36 +12748,15 @@ public function updatePayRunPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRun', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRun' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRun', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -12527,34 +12771,11 @@ public function updatePayRunPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRun'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12564,8 +12785,9 @@ public function updatePayRunPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -12583,6 +12805,7 @@ public function updatePayRunPayRunWithHttpInfo( * @param bool|null $sendPayslipEmails Only relevant if setting the State to Finalised. Set to true if you want to have payslips emailed to employees. (optional, default to false) * @param \SynergiTech\Staffology\Model\PayslipReleaseType|null $payslipReleaseType (optional) * @param \DateTime|null $payslipScheduledDateTime (optional) + * @param int|null $version If supplementary pay runs have been created this can be used to update the specific supplementary pay run version (optional) * @param \SynergiTech\Staffology\Model\PayRunStateChange|null $payRunStateChange Specify the PayRun state you want to change to and the reason for the change. Only Open and Finalised states are available at the moment. Other states are used with Bureau functionality which isn't currently generally available. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePayRunPayRun'] to see the possible values for this operation * @@ -12598,11 +12821,12 @@ public function updatePayRunPayRunAsync( ?bool $sendPayslipEmails = false, ?\SynergiTech\Staffology\Model\PayslipReleaseType $payslipReleaseType = null, ?\DateTime $payslipScheduledDateTime = null, + ?int $version = null, ?\SynergiTech\Staffology\Model\PayRunStateChange $payRunStateChange = null, string $contentType = self::contentTypes['updatePayRunPayRun'][0] ): PromiseInterface { - return $this->updatePayRunPayRunAsyncWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $payRunStateChange, $contentType) + return $this->updatePayRunPayRunAsyncWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $version, $payRunStateChange, $contentType) ->then( function ($response) { return $response[0]; @@ -12623,6 +12847,7 @@ function ($response) { * @param bool|null $sendPayslipEmails Only relevant if setting the State to Finalised. Set to true if you want to have payslips emailed to employees. (optional, default to false) * @param \SynergiTech\Staffology\Model\PayslipReleaseType|null $payslipReleaseType (optional) * @param \DateTime|null $payslipScheduledDateTime (optional) + * @param int|null $version If supplementary pay runs have been created this can be used to update the specific supplementary pay run version (optional) * @param \SynergiTech\Staffology\Model\PayRunStateChange|null $payRunStateChange Specify the PayRun state you want to change to and the reason for the change. Only Open and Finalised states are available at the moment. Other states are used with Bureau functionality which isn't currently generally available. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePayRunPayRun'] to see the possible values for this operation * @@ -12638,12 +12863,13 @@ public function updatePayRunPayRunAsyncWithHttpInfo( ?bool $sendPayslipEmails = false, ?\SynergiTech\Staffology\Model\PayslipReleaseType $payslipReleaseType = null, ?\DateTime $payslipScheduledDateTime = null, + ?int $version = null, ?\SynergiTech\Staffology\Model\PayRunStateChange $payRunStateChange = null, string $contentType = self::contentTypes['updatePayRunPayRun'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\PayRun'; - $request = $this->updatePayRunPayRunRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $payRunStateChange, $contentType); + $request = $this->updatePayRunPayRunRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $version, $payRunStateChange, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12692,6 +12918,7 @@ function ($exception) { * @param bool|null $sendPayslipEmails Only relevant if setting the State to Finalised. Set to true if you want to have payslips emailed to employees. (optional, default to false) * @param \SynergiTech\Staffology\Model\PayslipReleaseType|null $payslipReleaseType (optional) * @param \DateTime|null $payslipScheduledDateTime (optional) + * @param int|null $version If supplementary pay runs have been created this can be used to update the specific supplementary pay run version (optional) * @param \SynergiTech\Staffology\Model\PayRunStateChange|null $payRunStateChange Specify the PayRun state you want to change to and the reason for the change. Only Open and Finalised states are available at the moment. Other states are used with Bureau functionality which isn't currently generally available. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePayRunPayRun'] to see the possible values for this operation * @@ -12707,6 +12934,7 @@ public function updatePayRunPayRunRequest( ?bool $sendPayslipEmails = false, ?\SynergiTech\Staffology\Model\PayslipReleaseType $payslipReleaseType = null, ?\DateTime $payslipScheduledDateTime = null, + ?int $version = null, ?\SynergiTech\Staffology\Model\PayRunStateChange $payRunStateChange = null, string $contentType = self::contentTypes['updatePayRunPayRun'][0] ): Request @@ -12746,6 +12974,7 @@ public function updatePayRunPayRunRequest( + $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}'; $formParams = []; $queryParams = []; @@ -12789,6 +13018,15 @@ public function updatePayRunPayRunRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -12899,6 +13137,7 @@ public function updatePayRunPayRunRequest( * @param int $periodNumber periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param int|null $ordinal ordinal (optional, default to 1) + * @param int|null $version version (optional) * @param \DateTime|null $body body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePaymentDatePayRun'] to see the possible values for this operation * @@ -12912,11 +13151,12 @@ public function updatePaymentDatePayRun( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, ?\DateTime $body = null, string $contentType = self::contentTypes['updatePaymentDatePayRun'][0] ): \SynergiTech\Staffology\Model\PayRun { - list($response) = $this->updatePaymentDatePayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $body, $contentType); + list($response) = $this->updatePaymentDatePayRunWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $body, $contentType); return $response; } @@ -12930,6 +13170,7 @@ public function updatePaymentDatePayRun( * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param \DateTime|null $body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePaymentDatePayRun'] to see the possible values for this operation * @@ -12943,11 +13184,12 @@ public function updatePaymentDatePayRunWithHttpInfo( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, ?\DateTime $body = null, string $contentType = self::contentTypes['updatePaymentDatePayRun'][0] ): array { - $request = $this->updatePaymentDatePayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $body, $contentType); + $request = $this->updatePaymentDatePayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $body, $contentType); try { $options = $this->createHttpClientOption(); @@ -12971,36 +13213,15 @@ public function updatePaymentDatePayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRun', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRun' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRun', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -13015,34 +13236,11 @@ public function updatePaymentDatePayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRun'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13052,8 +13250,9 @@ public function updatePaymentDatePayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -13068,6 +13267,7 @@ public function updatePaymentDatePayRunWithHttpInfo( * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param \DateTime|null $body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePaymentDatePayRun'] to see the possible values for this operation * @@ -13080,11 +13280,12 @@ public function updatePaymentDatePayRunAsync( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, ?\DateTime $body = null, string $contentType = self::contentTypes['updatePaymentDatePayRun'][0] ): PromiseInterface { - return $this->updatePaymentDatePayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $body, $contentType) + return $this->updatePaymentDatePayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $body, $contentType) ->then( function ($response) { return $response[0]; @@ -13102,6 +13303,7 @@ function ($response) { * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param \DateTime|null $body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePaymentDatePayRun'] to see the possible values for this operation * @@ -13114,12 +13316,13 @@ public function updatePaymentDatePayRunAsyncWithHttpInfo( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, ?\DateTime $body = null, string $contentType = self::contentTypes['updatePaymentDatePayRun'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\PayRun'; - $request = $this->updatePaymentDatePayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $body, $contentType); + $request = $this->updatePaymentDatePayRunRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13165,6 +13368,7 @@ function ($exception) { * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param \DateTime|null $body (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updatePaymentDatePayRun'] to see the possible values for this operation * @@ -13177,6 +13381,7 @@ public function updatePaymentDatePayRunRequest( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, ?\DateTime $body = null, string $contentType = self::contentTypes['updatePaymentDatePayRun'][0] ): Request @@ -13213,6 +13418,7 @@ public function updatePaymentDatePayRunRequest( + $resourcePath = '/employers/{employerId}/payrun/{taxYear}/{payPeriod}/{periodNumber}/paymentdate'; $formParams = []; $queryParams = []; @@ -13229,6 +13435,15 @@ public function updatePaymentDatePayRunRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -13411,36 +13626,15 @@ public function ytdPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployeeYtdValues[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployeeYtdValues[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployeeYtdValues[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeYtdValues[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -13455,34 +13649,11 @@ public function ytdPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployeeYtdValues[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeYtdValues[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13492,8 +13663,9 @@ public function ytdPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -13705,19 +13877,14 @@ public function ytdPayRunRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -13858,36 +14025,15 @@ public function zeroisePayRunEntriesPayRunWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRun', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRun' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRun', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -13902,34 +14048,11 @@ public function zeroisePayRunEntriesPayRunWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRun'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13939,8 +14062,9 @@ public function zeroisePayRunEntriesPayRunWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -14234,4 +14358,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/PayRunAsyncApi.php b/src/Api/PayRunAsyncApi.php index f100b1f..018f54c 100644 --- a/src/Api/PayRunAsyncApi.php +++ b/src/Api/PayRunAsyncApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class PayRunAsyncApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'importPayPayRunAsync' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'queueCreatePayRunPayRunAsync' => [ 'application/json', @@ -85,10 +88,10 @@ class PayRunAsyncApi 'application/json', ], 'queueUpdatePayRunPayRunAsync' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -155,7 +158,7 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractJobResponse + * @return \SynergiTech\Staffology\Model\ContractJobResponse|null */ public function importPayPayRunAsync( string $employerId, @@ -167,7 +170,7 @@ public function importPayPayRunAsync( ?bool $append = null, ?bool $updateExisting = null, string $contentType = self::contentTypes['importPayPayRunAsync'][0] - ): \SynergiTech\Staffology\Model\ContractJobResponse + ): ?\SynergiTech\Staffology\Model\ContractJobResponse { list($response) = $this->importPayPayRunAsyncWithHttpInfo($employerId, $payPeriod, $ordinal, $throwOnError, $contractPayOptionsImportRequest, $linesOnly, $append, $updateExisting, $contentType); return $response; @@ -228,36 +231,15 @@ public function importPayPayRunAsyncWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 202: - if (in_array('\SynergiTech\Staffology\Model\ContractJobResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractJobResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractJobResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -272,34 +254,11 @@ public function importPayPayRunAsyncWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractJobResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 202: @@ -309,8 +268,9 @@ public function importPayPayRunAsyncWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -701,10 +661,10 @@ public function queueCreatePayRunPayRunAsyncWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -942,6 +902,7 @@ public function queueCreatePayRunPayRunAsyncRequest( * @param int $periodNumber periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param int|null $ordinal ordinal (optional, default to 1) + * @param int|null $version version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queueDeletePayRunPayRunAsync'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -954,10 +915,11 @@ public function queueDeletePayRunPayRunAsync( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['queueDeletePayRunPayRunAsync'][0] ): void { - $this->queueDeletePayRunPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + $this->queueDeletePayRunPayRunAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType); } /** @@ -970,6 +932,7 @@ public function queueDeletePayRunPayRunAsync( * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queueDeletePayRunPayRunAsync'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -982,10 +945,11 @@ public function queueDeletePayRunPayRunAsyncWithHttpInfo( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['queueDeletePayRunPayRunAsync'][0] ): array { - $request = $this->queueDeletePayRunPayRunAsyncRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + $request = $this->queueDeletePayRunPayRunAsyncRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType); try { $options = $this->createHttpClientOption(); @@ -1011,10 +975,10 @@ public function queueDeletePayRunPayRunAsyncWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1029,6 +993,7 @@ public function queueDeletePayRunPayRunAsyncWithHttpInfo( * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queueDeletePayRunPayRunAsync'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1040,10 +1005,11 @@ public function queueDeletePayRunPayRunAsyncAsync( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['queueDeletePayRunPayRunAsync'][0] ): PromiseInterface { - return $this->queueDeletePayRunPayRunAsyncAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType) + return $this->queueDeletePayRunPayRunAsyncAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType) ->then( function ($response) { return $response[0]; @@ -1061,6 +1027,7 @@ function ($response) { * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queueDeletePayRunPayRunAsync'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1072,11 +1039,12 @@ public function queueDeletePayRunPayRunAsyncAsyncWithHttpInfo( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['queueDeletePayRunPayRunAsync'][0] ): PromiseInterface { $returnType = ''; - $request = $this->queueDeletePayRunPayRunAsyncRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $contentType); + $request = $this->queueDeletePayRunPayRunAsyncRequest($employerId, $payPeriod, $periodNumber, $taxYear, $ordinal, $version, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1109,6 +1077,7 @@ function ($exception) { * @param int $periodNumber (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param int|null $ordinal (optional, default to 1) + * @param int|null $version (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queueDeletePayRunPayRunAsync'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -1120,6 +1089,7 @@ public function queueDeletePayRunPayRunAsyncRequest( int $periodNumber, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?int $ordinal = 1, + ?int $version = null, string $contentType = self::contentTypes['queueDeletePayRunPayRunAsync'][0] ): Request { @@ -1154,6 +1124,7 @@ public function queueDeletePayRunPayRunAsyncRequest( + $resourcePath = '/employers/{employerId}/payrun-async/{taxYear}/{payPeriod}/{periodNumber}'; $formParams = []; $queryParams = []; @@ -1170,6 +1141,15 @@ public function queueDeletePayRunPayRunAsyncRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -1276,12 +1256,13 @@ public function queueDeletePayRunPayRunAsyncRequest( * @param bool|null $sendPayslipEmails sendPayslipEmails (optional, default to false) * @param \SynergiTech\Staffology\Model\PayslipReleaseType|null $payslipReleaseType payslipReleaseType (optional) * @param \DateTime|null $payslipScheduledDateTime payslipScheduledDateTime (optional) + * @param int|null $version version (optional) * @param \SynergiTech\Staffology\Model\PayRunStateChange|null $payRunStateChange payRunStateChange (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queueUpdatePayRunPayRunAsync'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PayRun + * @return \SynergiTech\Staffology\Model\PayRun|null */ public function queueUpdatePayRunPayRunAsync( string $employerId, @@ -1292,11 +1273,12 @@ public function queueUpdatePayRunPayRunAsync( ?bool $sendPayslipEmails = false, ?\SynergiTech\Staffology\Model\PayslipReleaseType $payslipReleaseType = null, ?\DateTime $payslipScheduledDateTime = null, + ?int $version = null, ?\SynergiTech\Staffology\Model\PayRunStateChange $payRunStateChange = null, string $contentType = self::contentTypes['queueUpdatePayRunPayRunAsync'][0] - ): \SynergiTech\Staffology\Model\PayRun + ): ?\SynergiTech\Staffology\Model\PayRun { - list($response) = $this->queueUpdatePayRunPayRunAsyncWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $payRunStateChange, $contentType); + list($response) = $this->queueUpdatePayRunPayRunAsyncWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $version, $payRunStateChange, $contentType); return $response; } @@ -1313,6 +1295,7 @@ public function queueUpdatePayRunPayRunAsync( * @param bool|null $sendPayslipEmails (optional, default to false) * @param \SynergiTech\Staffology\Model\PayslipReleaseType|null $payslipReleaseType (optional) * @param \DateTime|null $payslipScheduledDateTime (optional) + * @param int|null $version (optional) * @param \SynergiTech\Staffology\Model\PayRunStateChange|null $payRunStateChange (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queueUpdatePayRunPayRunAsync'] to see the possible values for this operation * @@ -1329,11 +1312,12 @@ public function queueUpdatePayRunPayRunAsyncWithHttpInfo( ?bool $sendPayslipEmails = false, ?\SynergiTech\Staffology\Model\PayslipReleaseType $payslipReleaseType = null, ?\DateTime $payslipScheduledDateTime = null, + ?int $version = null, ?\SynergiTech\Staffology\Model\PayRunStateChange $payRunStateChange = null, string $contentType = self::contentTypes['queueUpdatePayRunPayRunAsync'][0] ): array { - $request = $this->queueUpdatePayRunPayRunAsyncRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $payRunStateChange, $contentType); + $request = $this->queueUpdatePayRunPayRunAsyncRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $version, $payRunStateChange, $contentType); try { $options = $this->createHttpClientOption(); @@ -1357,63 +1341,21 @@ public function queueUpdatePayRunPayRunAsyncWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRun', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRun' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRun', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); case 202: - if (in_array('\SynergiTech\Staffology\Model\PayRun', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRun' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRun', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1428,34 +1370,11 @@ public function queueUpdatePayRunPayRunAsyncWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRun'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRun', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1465,7 +1384,7 @@ public function queueUpdatePayRunPayRunAsyncWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 202: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1473,8 +1392,9 @@ public function queueUpdatePayRunPayRunAsyncWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1492,6 +1412,7 @@ public function queueUpdatePayRunPayRunAsyncWithHttpInfo( * @param bool|null $sendPayslipEmails (optional, default to false) * @param \SynergiTech\Staffology\Model\PayslipReleaseType|null $payslipReleaseType (optional) * @param \DateTime|null $payslipScheduledDateTime (optional) + * @param int|null $version (optional) * @param \SynergiTech\Staffology\Model\PayRunStateChange|null $payRunStateChange (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queueUpdatePayRunPayRunAsync'] to see the possible values for this operation * @@ -1507,11 +1428,12 @@ public function queueUpdatePayRunPayRunAsyncAsync( ?bool $sendPayslipEmails = false, ?\SynergiTech\Staffology\Model\PayslipReleaseType $payslipReleaseType = null, ?\DateTime $payslipScheduledDateTime = null, + ?int $version = null, ?\SynergiTech\Staffology\Model\PayRunStateChange $payRunStateChange = null, string $contentType = self::contentTypes['queueUpdatePayRunPayRunAsync'][0] ): PromiseInterface { - return $this->queueUpdatePayRunPayRunAsyncAsyncWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $payRunStateChange, $contentType) + return $this->queueUpdatePayRunPayRunAsyncAsyncWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $version, $payRunStateChange, $contentType) ->then( function ($response) { return $response[0]; @@ -1532,6 +1454,7 @@ function ($response) { * @param bool|null $sendPayslipEmails (optional, default to false) * @param \SynergiTech\Staffology\Model\PayslipReleaseType|null $payslipReleaseType (optional) * @param \DateTime|null $payslipScheduledDateTime (optional) + * @param int|null $version (optional) * @param \SynergiTech\Staffology\Model\PayRunStateChange|null $payRunStateChange (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queueUpdatePayRunPayRunAsync'] to see the possible values for this operation * @@ -1547,12 +1470,13 @@ public function queueUpdatePayRunPayRunAsyncAsyncWithHttpInfo( ?bool $sendPayslipEmails = false, ?\SynergiTech\Staffology\Model\PayslipReleaseType $payslipReleaseType = null, ?\DateTime $payslipScheduledDateTime = null, + ?int $version = null, ?\SynergiTech\Staffology\Model\PayRunStateChange $payRunStateChange = null, string $contentType = self::contentTypes['queueUpdatePayRunPayRunAsync'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\PayRun'; - $request = $this->queueUpdatePayRunPayRunAsyncRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $payRunStateChange, $contentType); + $request = $this->queueUpdatePayRunPayRunAsyncRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $sendPayslipEmails, $payslipReleaseType, $payslipScheduledDateTime, $version, $payRunStateChange, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1601,6 +1525,7 @@ function ($exception) { * @param bool|null $sendPayslipEmails (optional, default to false) * @param \SynergiTech\Staffology\Model\PayslipReleaseType|null $payslipReleaseType (optional) * @param \DateTime|null $payslipScheduledDateTime (optional) + * @param int|null $version (optional) * @param \SynergiTech\Staffology\Model\PayRunStateChange|null $payRunStateChange (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queueUpdatePayRunPayRunAsync'] to see the possible values for this operation * @@ -1616,6 +1541,7 @@ public function queueUpdatePayRunPayRunAsyncRequest( ?bool $sendPayslipEmails = false, ?\SynergiTech\Staffology\Model\PayslipReleaseType $payslipReleaseType = null, ?\DateTime $payslipScheduledDateTime = null, + ?int $version = null, ?\SynergiTech\Staffology\Model\PayRunStateChange $payRunStateChange = null, string $contentType = self::contentTypes['queueUpdatePayRunPayRunAsync'][0] ): Request @@ -1655,6 +1581,7 @@ public function queueUpdatePayRunPayRunAsyncRequest( + $resourcePath = '/employers/{employerId}/payrun-async/{taxYear}/{payPeriod}/{periodNumber}'; $formParams = []; $queryParams = []; @@ -1698,6 +1625,15 @@ public function queueUpdatePayRunPayRunAsyncRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -1816,4 +1752,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/PayScheduleApi.php b/src/Api/PayScheduleApi.php index 41342bf..4a24ea4 100644 --- a/src/Api/PayScheduleApi.php +++ b/src/Api/PayScheduleApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,16 +76,16 @@ class PayScheduleApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createPaySchedule' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createWithOptionalOrdinalPaySchedule' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deletePaySchedule' => [ 'application/json', @@ -90,6 +93,9 @@ class PayScheduleApi 'deleteWithOptionalOrdinalPaySchedule' => [ 'application/json', ], + 'getAllForEmployerPaySchedule' => [ + 'application/json', + ], 'getAllPaySchedule' => [ 'application/json', ], @@ -103,22 +109,22 @@ class PayScheduleApi 'application/json', ], 'savePaySchedule' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'saveWithOptionalOrdinalPaySchedule' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updatePaySchedulePeriodPaySchedule' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -247,10 +253,10 @@ public function createPayScheduleWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -576,10 +582,10 @@ public function createWithOptionalOrdinalPayScheduleWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -896,10 +902,10 @@ public function deletePayScheduleWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1207,10 +1213,10 @@ public function deleteWithOptionalOrdinalPayScheduleWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1438,6 +1444,290 @@ public function deleteWithOptionalOrdinalPayScheduleRequest( ); } + /** + * Operation getAllForEmployerPaySchedule + * + * Get PaySchedules for Employer (for active tax years) + * + * @param string $employerId The Id of the Employer for which you want to get the PaySchedule (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllForEmployerPaySchedule'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\PaySchedule[] + */ + public function getAllForEmployerPaySchedule( + string $employerId, + string $contentType = self::contentTypes['getAllForEmployerPaySchedule'][0] + ): array + { + list($response) = $this->getAllForEmployerPayScheduleWithHttpInfo($employerId, $contentType); + return $response; + } + + /** + * Operation getAllForEmployerPayScheduleWithHttpInfo + * + * Get PaySchedules for Employer (for active tax years) + * + * @param string $employerId The Id of the Employer for which you want to get the PaySchedule (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllForEmployerPaySchedule'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\PaySchedule[], HTTP status code, HTTP response headers (array of strings) + */ + public function getAllForEmployerPayScheduleWithHttpInfo( + string $employerId, + string $contentType = self::contentTypes['getAllForEmployerPaySchedule'][0] + ): array + { + $request = $this->getAllForEmployerPayScheduleRequest($employerId, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedule[]', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedule[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\PaySchedule[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getAllForEmployerPayScheduleAsync + * + * Get PaySchedules for Employer (for active tax years) + * + * @param string $employerId The Id of the Employer for which you want to get the PaySchedule (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllForEmployerPaySchedule'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getAllForEmployerPayScheduleAsync( + string $employerId, + string $contentType = self::contentTypes['getAllForEmployerPaySchedule'][0] + ): PromiseInterface + { + return $this->getAllForEmployerPayScheduleAsyncWithHttpInfo($employerId, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAllForEmployerPayScheduleAsyncWithHttpInfo + * + * Get PaySchedules for Employer (for active tax years) + * + * @param string $employerId The Id of the Employer for which you want to get the PaySchedule (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllForEmployerPaySchedule'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getAllForEmployerPayScheduleAsyncWithHttpInfo( + string $employerId, + string $contentType = self::contentTypes['getAllForEmployerPaySchedule'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\PaySchedule[]'; + $request = $this->getAllForEmployerPayScheduleRequest($employerId, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAllForEmployerPaySchedule' + * + * @param string $employerId The Id of the Employer for which you want to get the PaySchedule (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllForEmployerPaySchedule'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getAllForEmployerPayScheduleRequest( + string $employerId, + string $contentType = self::contentTypes['getAllForEmployerPaySchedule'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling getAllForEmployerPaySchedule' + ); + } + + + $resourcePath = '/employers/{employerId}/schedules/all'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation getAllPaySchedule * @@ -1504,36 +1794,15 @@ public function getAllPayScheduleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PaySchedule[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PaySchedule[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PaySchedule[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedule[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1548,34 +1817,11 @@ public function getAllPayScheduleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PaySchedule[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedule[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1585,8 +1831,9 @@ public function getAllPayScheduleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1864,36 +2111,15 @@ public function getPayScheduleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PaySchedule', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PaySchedule' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PaySchedule', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedule', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1908,34 +2134,11 @@ public function getPayScheduleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PaySchedule'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedule', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1945,8 +2148,9 @@ public function getPayScheduleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2207,7 +2411,7 @@ public function getPayScheduleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PaySchedulePeriod[] + * @return \SynergiTech\Staffology\Model\PaySchedulePeriod[]|null */ public function getPeriodsPaySchedule( string $employerId, @@ -2217,7 +2421,7 @@ public function getPeriodsPaySchedule( ?int $periodNumber = null, ?bool $includeEvents = false, string $contentType = self::contentTypes['getPeriodsPaySchedule'][0] - ): array + ): ?array { list($response) = $this->getPeriodsPayScheduleWithHttpInfo($employerId, $payPeriod, $taxYear, $ordinal, $periodNumber, $includeEvents, $contentType); return $response; @@ -2274,36 +2478,15 @@ public function getPeriodsPayScheduleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PaySchedulePeriod[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PaySchedulePeriod[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PaySchedulePeriod[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedulePeriod[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2318,34 +2501,11 @@ public function getPeriodsPayScheduleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PaySchedulePeriod[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedulePeriod[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2355,8 +2515,9 @@ public function getPeriodsPayScheduleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2708,36 +2869,15 @@ public function getWithOptionalOrdinalPayScheduleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PaySchedule', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PaySchedule' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PaySchedule', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedule', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2752,34 +2892,11 @@ public function getWithOptionalOrdinalPayScheduleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PaySchedule'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedule', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2789,8 +2906,9 @@ public function getWithOptionalOrdinalPayScheduleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3045,7 +3163,7 @@ public function getWithOptionalOrdinalPayScheduleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PaySchedule + * @return \SynergiTech\Staffology\Model\PaySchedule|null */ public function savePaySchedule( string $employerId, @@ -3054,7 +3172,7 @@ public function savePaySchedule( int $ordinal, ?\SynergiTech\Staffology\Model\PaySchedule $paySchedule = null, string $contentType = self::contentTypes['savePaySchedule'][0] - ): \SynergiTech\Staffology\Model\PaySchedule + ): ?\SynergiTech\Staffology\Model\PaySchedule { list($response) = $this->savePayScheduleWithHttpInfo($employerId, $payPeriod, $taxYear, $ordinal, $paySchedule, $contentType); return $response; @@ -3109,36 +3227,15 @@ public function savePayScheduleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PaySchedule', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PaySchedule' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PaySchedule', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedule', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3153,34 +3250,11 @@ public function savePayScheduleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PaySchedule'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedule', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3190,8 +3264,9 @@ public function savePayScheduleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3465,7 +3540,7 @@ public function savePayScheduleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PaySchedule + * @return \SynergiTech\Staffology\Model\PaySchedule|null */ public function saveWithOptionalOrdinalPaySchedule( string $employerId, @@ -3474,7 +3549,7 @@ public function saveWithOptionalOrdinalPaySchedule( ?int $ordinal = null, ?\SynergiTech\Staffology\Model\PaySchedule $paySchedule = null, string $contentType = self::contentTypes['saveWithOptionalOrdinalPaySchedule'][0] - ): \SynergiTech\Staffology\Model\PaySchedule + ): ?\SynergiTech\Staffology\Model\PaySchedule { list($response) = $this->saveWithOptionalOrdinalPayScheduleWithHttpInfo($employerId, $payPeriod, $taxYear, $ordinal, $paySchedule, $contentType); return $response; @@ -3529,36 +3604,15 @@ public function saveWithOptionalOrdinalPayScheduleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PaySchedule', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PaySchedule' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PaySchedule', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedule', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3573,34 +3627,11 @@ public function saveWithOptionalOrdinalPayScheduleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PaySchedule'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedule', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3610,8 +3641,9 @@ public function saveWithOptionalOrdinalPayScheduleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3881,7 +3913,7 @@ public function saveWithOptionalOrdinalPayScheduleRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PaySchedulePeriod + * @return \SynergiTech\Staffology\Model\PaySchedulePeriod|null */ public function updatePaySchedulePeriodPaySchedule( string $employerId, @@ -3891,7 +3923,7 @@ public function updatePaySchedulePeriodPaySchedule( int $periodNumber, ?\SynergiTech\Staffology\Model\PaySchedulePeriod $paySchedulePeriod = null, string $contentType = self::contentTypes['updatePaySchedulePeriodPaySchedule'][0] - ): \SynergiTech\Staffology\Model\PaySchedulePeriod + ): ?\SynergiTech\Staffology\Model\PaySchedulePeriod { list($response) = $this->updatePaySchedulePeriodPayScheduleWithHttpInfo($employerId, $payPeriod, $taxYear, $ordinal, $periodNumber, $paySchedulePeriod, $contentType); return $response; @@ -3948,36 +3980,15 @@ public function updatePaySchedulePeriodPayScheduleWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PaySchedulePeriod', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PaySchedulePeriod' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PaySchedulePeriod', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedulePeriod', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3992,34 +4003,11 @@ public function updatePaySchedulePeriodPayScheduleWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PaySchedulePeriod'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySchedulePeriod', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4029,8 +4017,9 @@ public function updatePaySchedulePeriodPayScheduleWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4329,4 +4318,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/PaySpineApi.php b/src/Api/PaySpineApi.php index 05889cb..1609565 100644 --- a/src/Api/PaySpineApi.php +++ b/src/Api/PaySpineApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,58 +76,58 @@ class PaySpineApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createAllowanceGradesPaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createLondonAllowancePaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createMultipleAllowanceGradesPaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createMultiplePaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createMultipleSpineAllowancePaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createPaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createPaySpineGradePaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createSpinalPointPaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createSpineAllowancePaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteAllAllowanceGradesPaySpine' => [ 'application/json', @@ -205,58 +208,58 @@ class PaySpineApi 'application/json', ], 'updateAllowanceGradePaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateLondonAllowancePaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateMultipleAllowanceGradesPaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateMultiplePaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateMultipleSpineAllowancePaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updatePayGradePaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updatePaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateSpinalPointPaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateSpineAllowancePaySpine' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -319,7 +322,7 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractAllowanceGradesResponse + * @return \SynergiTech\Staffology\Model\ContractAllowanceGradesResponse|null */ public function createAllowanceGradesPaySpine( string $employerId, @@ -327,7 +330,7 @@ public function createAllowanceGradesPaySpine( string $allowanceId, ?\SynergiTech\Staffology\Model\ContractAllowanceGradesRequest $contractAllowanceGradesRequest = null, string $contentType = self::contentTypes['createAllowanceGradesPaySpine'][0] - ): \SynergiTech\Staffology\Model\ContractAllowanceGradesResponse + ): ?\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse { list($response) = $this->createAllowanceGradesPaySpineWithHttpInfo($employerId, $paySpineId, $allowanceId, $contractAllowanceGradesRequest, $contentType); return $response; @@ -346,7 +349,7 @@ public function createAllowanceGradesPaySpine( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractAllowanceGradesResponse, HTTP status code, HTTP response headers (array of strings) */ public function createAllowanceGradesPaySpineWithHttpInfo( string $employerId, @@ -380,36 +383,15 @@ public function createAllowanceGradesPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -424,34 +406,11 @@ public function createAllowanceGradesPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -461,8 +420,9 @@ public function createAllowanceGradesPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -713,14 +673,14 @@ public function createAllowanceGradesPaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractLondonAllowanceResponse + * @return \SynergiTech\Staffology\Model\ContractLondonAllowanceResponse|null */ public function createLondonAllowancePaySpine( string $employerId, string $paySpineId, ?\SynergiTech\Staffology\Model\ContractLondonAllowanceRequest $contractLondonAllowanceRequest = null, string $contentType = self::contentTypes['createLondonAllowancePaySpine'][0] - ): \SynergiTech\Staffology\Model\ContractLondonAllowanceResponse + ): ?\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse { list($response) = $this->createLondonAllowancePaySpineWithHttpInfo($employerId, $paySpineId, $contractLondonAllowanceRequest, $contentType); return $response; @@ -738,7 +698,7 @@ public function createLondonAllowancePaySpine( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractLondonAllowanceResponse, HTTP status code, HTTP response headers (array of strings) */ public function createLondonAllowancePaySpineWithHttpInfo( string $employerId, @@ -771,36 +731,15 @@ public function createLondonAllowancePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -815,34 +754,11 @@ public function createLondonAllowancePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -852,8 +768,9 @@ public function createLondonAllowancePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1145,36 +1062,15 @@ public function createMultipleAllowanceGradesPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1189,34 +1085,11 @@ public function createMultipleAllowanceGradesPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -1226,8 +1099,9 @@ public function createMultipleAllowanceGradesPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1536,36 +1410,15 @@ public function createMultiplePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1580,34 +1433,11 @@ public function createMultiplePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -1617,8 +1447,9 @@ public function createMultiplePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1906,36 +1737,15 @@ public function createMultipleSpineAllowancePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1950,34 +1760,11 @@ public function createMultipleSpineAllowancePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -1987,8 +1774,9 @@ public function createMultipleSpineAllowancePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2217,13 +2005,13 @@ public function createMultipleSpineAllowancePaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractPaySpineResponse + * @return \SynergiTech\Staffology\Model\ContractPaySpineResponse|null */ public function createPaySpine( string $employerId, ?\SynergiTech\Staffology\Model\ContractPaySpineRequest $contractPaySpineRequest = null, string $contentType = self::contentTypes['createPaySpine'][0] - ): \SynergiTech\Staffology\Model\ContractPaySpineResponse + ): ?\SynergiTech\Staffology\Model\ContractPaySpineResponse { list($response) = $this->createPaySpineWithHttpInfo($employerId, $contractPaySpineRequest, $contentType); return $response; @@ -2240,7 +2028,7 @@ public function createPaySpine( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractPaySpineResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractPaySpineResponse, HTTP status code, HTTP response headers (array of strings) */ public function createPaySpineWithHttpInfo( string $employerId, @@ -2272,36 +2060,15 @@ public function createPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractPaySpineResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPaySpineResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPaySpineResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2316,34 +2083,11 @@ public function createPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPaySpineResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -2353,8 +2097,9 @@ public function createPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2563,14 +2308,14 @@ public function createPaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractPaySpineGradeResponse + * @return \SynergiTech\Staffology\Model\ContractPaySpineGradeResponse|null */ public function createPaySpineGradePaySpine( string $employerId, string $paySpineId, ?\SynergiTech\Staffology\Model\ContractPaySpineGradeRequest $contractPaySpineGradeRequest = null, string $contentType = self::contentTypes['createPaySpineGradePaySpine'][0] - ): \SynergiTech\Staffology\Model\ContractPaySpineGradeResponse + ): ?\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse { list($response) = $this->createPaySpineGradePaySpineWithHttpInfo($employerId, $paySpineId, $contractPaySpineGradeRequest, $contentType); return $response; @@ -2588,7 +2333,7 @@ public function createPaySpineGradePaySpine( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractPaySpineGradeResponse, HTTP status code, HTTP response headers (array of strings) */ public function createPaySpineGradePaySpineWithHttpInfo( string $employerId, @@ -2621,36 +2366,15 @@ public function createPaySpineGradePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2665,34 +2389,11 @@ public function createPaySpineGradePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -2702,8 +2403,9 @@ public function createPaySpineGradePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2933,14 +2635,14 @@ public function createPaySpineGradePaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractSpinalPointResponse + * @return \SynergiTech\Staffology\Model\ContractSpinalPointResponse|null */ public function createSpinalPointPaySpine( string $employerId, string $paySpineId, ?\SynergiTech\Staffology\Model\ContractSpinalPointRequest $contractSpinalPointRequest = null, string $contentType = self::contentTypes['createSpinalPointPaySpine'][0] - ): \SynergiTech\Staffology\Model\ContractSpinalPointResponse + ): ?\SynergiTech\Staffology\Model\ContractSpinalPointResponse { list($response) = $this->createSpinalPointPaySpineWithHttpInfo($employerId, $paySpineId, $contractSpinalPointRequest, $contentType); return $response; @@ -2958,7 +2660,7 @@ public function createSpinalPointPaySpine( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractSpinalPointResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractSpinalPointResponse, HTTP status code, HTTP response headers (array of strings) */ public function createSpinalPointPaySpineWithHttpInfo( string $employerId, @@ -2991,36 +2693,15 @@ public function createSpinalPointPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractSpinalPointResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractSpinalPointResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractSpinalPointResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3035,34 +2716,11 @@ public function createSpinalPointPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractSpinalPointResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -3072,8 +2730,9 @@ public function createSpinalPointPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3303,14 +2962,14 @@ public function createSpinalPointPaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractSpineAllowanceResponse + * @return \SynergiTech\Staffology\Model\ContractSpineAllowanceResponse|null */ public function createSpineAllowancePaySpine( string $employerId, string $paySpineId, ?\SynergiTech\Staffology\Model\ContractSpineAllowanceRequest $contractSpineAllowanceRequest = null, string $contentType = self::contentTypes['createSpineAllowancePaySpine'][0] - ): \SynergiTech\Staffology\Model\ContractSpineAllowanceResponse + ): ?\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse { list($response) = $this->createSpineAllowancePaySpineWithHttpInfo($employerId, $paySpineId, $contractSpineAllowanceRequest, $contentType); return $response; @@ -3328,7 +2987,7 @@ public function createSpineAllowancePaySpine( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractSpineAllowanceResponse, HTTP status code, HTTP response headers (array of strings) */ public function createSpineAllowancePaySpineWithHttpInfo( string $employerId, @@ -3361,36 +3020,15 @@ public function createSpineAllowancePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3405,34 +3043,11 @@ public function createSpineAllowancePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -3442,8 +3057,9 @@ public function createSpineAllowancePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3732,10 +3348,10 @@ public function deleteAllAllowanceGradesPaySpineWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -4014,10 +3630,10 @@ public function deleteAllSpinalPointsPaySpineWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -4275,10 +3891,10 @@ public function deleteAllSpineAllowancesPaySpineWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -4544,10 +4160,10 @@ public function deleteAllowanceGradePaySpineWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -4851,10 +4467,10 @@ public function deleteLondonAllowancePaySpineWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -5133,10 +4749,10 @@ public function deletePaySpineWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -5398,10 +5014,10 @@ public function deletePaySpineGradePaySpineWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -5684,10 +5300,10 @@ public function deleteSpinalPointPaySpineWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -5970,10 +5586,10 @@ public function deleteSpineAllowancePaySpineWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -6198,7 +5814,7 @@ public function deleteSpineAllowancePaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractAllowanceGradesResponse + * @return \SynergiTech\Staffology\Model\ContractAllowanceGradesResponse|null */ public function getAllowanceGradePaySpine( string $employerId, @@ -6206,7 +5822,7 @@ public function getAllowanceGradePaySpine( string $allowanceId, string $allowanceGradeId, string $contentType = self::contentTypes['getAllowanceGradePaySpine'][0] - ): \SynergiTech\Staffology\Model\ContractAllowanceGradesResponse + ): ?\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse { list($response) = $this->getAllowanceGradePaySpineWithHttpInfo($employerId, $paySpineId, $allowanceId, $allowanceGradeId, $contentType); return $response; @@ -6259,36 +5875,15 @@ public function getAllowanceGradePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6303,34 +5898,11 @@ public function getAllowanceGradePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6340,8 +5912,9 @@ public function getAllowanceGradePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -6599,14 +6172,14 @@ public function getAllowanceGradePaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[] + * @return \SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]|null */ public function getAllowanceGradesPaySpine( string $employerId, string $paySpineId, string $allowanceId, string $contentType = self::contentTypes['getAllowanceGradesPaySpine'][0] - ): array + ): ?array { list($response) = $this->getAllowanceGradesPaySpineWithHttpInfo($employerId, $paySpineId, $allowanceId, $contentType); return $response; @@ -6657,36 +6230,15 @@ public function getAllowanceGradesPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6701,34 +6253,11 @@ public function getAllowanceGradesPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6738,8 +6267,9 @@ public function getAllowanceGradesPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -6982,7 +6512,7 @@ public function getAllowanceGradesPaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PaylineCalculationData + * @return \SynergiTech\Staffology\Model\PaylineCalculationData|null */ public function getAnnualValueFromSalaryFormulaPaySpine( string $employerId, @@ -6995,7 +6525,7 @@ public function getAnnualValueFromSalaryFormulaPaySpine( ?string $workingPatternId = null, ?string $roleId = null, string $contentType = self::contentTypes['getAnnualValueFromSalaryFormulaPaySpine'][0] - ): \SynergiTech\Staffology\Model\PaylineCalculationData + ): ?\SynergiTech\Staffology\Model\PaylineCalculationData { list($response) = $this->getAnnualValueFromSalaryFormulaPaySpineWithHttpInfo($employerId, $id, $employeeId, $paySpineGradeId, $spinalPointId, $londonAllowanceType, $effectiveFrom, $workingPatternId, $roleId, $contentType); return $response; @@ -7058,36 +6588,15 @@ public function getAnnualValueFromSalaryFormulaPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PaylineCalculationData', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PaylineCalculationData' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PaylineCalculationData', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaylineCalculationData', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7102,34 +6611,11 @@ public function getAnnualValueFromSalaryFormulaPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PaylineCalculationData'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaylineCalculationData', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7139,8 +6625,9 @@ public function getAnnualValueFromSalaryFormulaPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -7467,13 +6954,13 @@ public function getAnnualValueFromSalaryFormulaPaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\LondonAllowance[] + * @return \SynergiTech\Staffology\Model\LondonAllowance[]|null */ public function getLondonAllowanceListPaySpine( string $employerId, string $paySpineId, string $contentType = self::contentTypes['getLondonAllowanceListPaySpine'][0] - ): array + ): ?array { list($response) = $this->getLondonAllowanceListPaySpineWithHttpInfo($employerId, $paySpineId, $contentType); return $response; @@ -7522,36 +7009,15 @@ public function getLondonAllowanceListPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\LondonAllowance[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\LondonAllowance[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\LondonAllowance[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\LondonAllowance[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7566,34 +7032,11 @@ public function getLondonAllowanceListPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\LondonAllowance[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\LondonAllowance[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7603,8 +7046,9 @@ public function getLondonAllowanceListPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -7820,14 +7264,14 @@ public function getLondonAllowanceListPaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractLondonAllowanceResponse + * @return \SynergiTech\Staffology\Model\ContractLondonAllowanceResponse|null */ public function getLondonAllowancePaySpine( string $employerId, string $paySpineId, string $londonAllowanceId, string $contentType = self::contentTypes['getLondonAllowancePaySpine'][0] - ): \SynergiTech\Staffology\Model\ContractLondonAllowanceResponse + ): ?\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse { list($response) = $this->getLondonAllowancePaySpineWithHttpInfo($employerId, $paySpineId, $londonAllowanceId, $contentType); return $response; @@ -7878,36 +7322,15 @@ public function getLondonAllowancePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7922,34 +7345,11 @@ public function getLondonAllowancePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7959,8 +7359,9 @@ public function getLondonAllowancePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -8196,13 +7597,13 @@ public function getLondonAllowancePaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractPaySpineResponse + * @return \SynergiTech\Staffology\Model\ContractPaySpineResponse|null */ public function getPaySpine( string $employerId, string $id, string $contentType = self::contentTypes['getPaySpine'][0] - ): \SynergiTech\Staffology\Model\ContractPaySpineResponse + ): ?\SynergiTech\Staffology\Model\ContractPaySpineResponse { list($response) = $this->getPaySpineWithHttpInfo($employerId, $id, $contentType); return $response; @@ -8251,36 +7652,15 @@ public function getPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractPaySpineResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPaySpineResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPaySpineResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8295,34 +7675,11 @@ public function getPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPaySpineResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8332,8 +7689,9 @@ public function getPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -8548,13 +7906,13 @@ public function getPaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractPaySpineGradeResponse[] + * @return \SynergiTech\Staffology\Model\ContractPaySpineGradeResponse[]|null */ public function getPaySpineGradeListPaySpine( string $employerId, string $paySpineId, string $contentType = self::contentTypes['getPaySpineGradeListPaySpine'][0] - ): array + ): ?array { list($response) = $this->getPaySpineGradeListPaySpineWithHttpInfo($employerId, $paySpineId, $contentType); return $response; @@ -8603,36 +7961,15 @@ public function getPaySpineGradeListPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8647,34 +7984,11 @@ public function getPaySpineGradeListPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8684,8 +7998,9 @@ public function getPaySpineGradeListPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -8901,14 +8216,14 @@ public function getPaySpineGradeListPaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractPaySpineGradeResponse + * @return \SynergiTech\Staffology\Model\ContractPaySpineGradeResponse|null */ public function getPaySpineGradePaySpine( string $employerId, string $paySpineId, string $payGradeId, string $contentType = self::contentTypes['getPaySpineGradePaySpine'][0] - ): \SynergiTech\Staffology\Model\ContractPaySpineGradeResponse + ): ?\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse { list($response) = $this->getPaySpineGradePaySpineWithHttpInfo($employerId, $paySpineId, $payGradeId, $contentType); return $response; @@ -8959,36 +8274,15 @@ public function getPaySpineGradePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9003,34 +8297,11 @@ public function getPaySpineGradePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9040,8 +8311,9 @@ public function getPaySpineGradePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -9277,13 +8549,13 @@ public function getPaySpineGradePaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractSpinalPointResponse[] + * @return \SynergiTech\Staffology\Model\ContractSpinalPointResponse[]|null */ public function getSpinalPointListPaySpine( string $employerId, string $paySpineId, string $contentType = self::contentTypes['getSpinalPointListPaySpine'][0] - ): array + ): ?array { list($response) = $this->getSpinalPointListPaySpineWithHttpInfo($employerId, $paySpineId, $contentType); return $response; @@ -9332,36 +8604,15 @@ public function getSpinalPointListPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9376,34 +8627,11 @@ public function getSpinalPointListPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9413,8 +8641,9 @@ public function getSpinalPointListPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -9630,14 +8859,14 @@ public function getSpinalPointListPaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractSpinalPointResponse + * @return \SynergiTech\Staffology\Model\ContractSpinalPointResponse|null */ public function getSpinalPointPaySpine( string $employerId, string $paySpineId, string $spinalPointId, string $contentType = self::contentTypes['getSpinalPointPaySpine'][0] - ): \SynergiTech\Staffology\Model\ContractSpinalPointResponse + ): ?\SynergiTech\Staffology\Model\ContractSpinalPointResponse { list($response) = $this->getSpinalPointPaySpineWithHttpInfo($employerId, $paySpineId, $spinalPointId, $contentType); return $response; @@ -9688,36 +8917,15 @@ public function getSpinalPointPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractSpinalPointResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractSpinalPointResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractSpinalPointResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9732,34 +8940,11 @@ public function getSpinalPointPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractSpinalPointResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9769,8 +8954,9 @@ public function getSpinalPointPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -10011,7 +9197,7 @@ public function getSpinalPointPaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractSpinalPointResponse + * @return \SynergiTech\Staffology\Model\ContractSpinalPointResponse|null */ public function getSpinalPointWithAnnualSalaryPaySpine( string $employerId, @@ -10022,7 +9208,7 @@ public function getSpinalPointWithAnnualSalaryPaySpine( ?string $paySpineGradeId = null, ?int $londonAllowanceType = null, string $contentType = self::contentTypes['getSpinalPointWithAnnualSalaryPaySpine'][0] - ): \SynergiTech\Staffology\Model\ContractSpinalPointResponse + ): ?\SynergiTech\Staffology\Model\ContractSpinalPointResponse { list($response) = $this->getSpinalPointWithAnnualSalaryPaySpineWithHttpInfo($employerId, $employeeId, $id, $spinalPointId, $effectiveFrom, $paySpineGradeId, $londonAllowanceType, $contentType); return $response; @@ -10081,36 +9267,15 @@ public function getSpinalPointWithAnnualSalaryPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractSpinalPointResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractSpinalPointResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractSpinalPointResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10125,34 +9290,11 @@ public function getSpinalPointWithAnnualSalaryPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractSpinalPointResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10162,8 +9304,9 @@ public function getSpinalPointWithAnnualSalaryPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -10473,13 +9616,13 @@ public function getSpinalPointWithAnnualSalaryPaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[] + * @return \SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]|null */ public function getSpineAllowanceListPaySpine( string $employerId, string $paySpineId, string $contentType = self::contentTypes['getSpineAllowanceListPaySpine'][0] - ): array + ): ?array { list($response) = $this->getSpineAllowanceListPaySpineWithHttpInfo($employerId, $paySpineId, $contentType); return $response; @@ -10528,36 +9671,15 @@ public function getSpineAllowanceListPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10572,34 +9694,11 @@ public function getSpineAllowanceListPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10609,8 +9708,9 @@ public function getSpineAllowanceListPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -10826,14 +9926,14 @@ public function getSpineAllowanceListPaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractSpineAllowanceResponse + * @return \SynergiTech\Staffology\Model\ContractSpineAllowanceResponse|null */ public function getSpineAllowancePaySpine( string $employerId, string $paySpineId, string $allowanceid, string $contentType = self::contentTypes['getSpineAllowancePaySpine'][0] - ): \SynergiTech\Staffology\Model\ContractSpineAllowanceResponse + ): ?\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse { list($response) = $this->getSpineAllowancePaySpineWithHttpInfo($employerId, $paySpineId, $allowanceid, $contentType); return $response; @@ -10884,36 +9984,15 @@ public function getSpineAllowancePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10928,34 +10007,11 @@ public function getSpineAllowancePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10965,8 +10021,9 @@ public function getSpineAllowancePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -11257,36 +10314,15 @@ public function importCsvPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -11301,34 +10337,11 @@ public function importCsvPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11338,8 +10351,9 @@ public function importCsvPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -11472,19 +10486,14 @@ public function importCsvPaySpineRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -11609,36 +10618,15 @@ public function importCsvPaySpinePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -11653,34 +10641,11 @@ public function importCsvPaySpinePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11690,8 +10655,9 @@ public function importCsvPaySpinePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -11823,20 +10789,15 @@ public function importCsvPaySpinePaySpineRequest( ); } - // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + // form params + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -11961,36 +10922,15 @@ public function importPayspineGradeCsvPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -12005,34 +10945,11 @@ public function importPayspineGradeCsvPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12042,8 +10959,9 @@ public function importPayspineGradeCsvPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -12176,19 +11094,14 @@ public function importPayspineGradeCsvPaySpineRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -12257,12 +11170,12 @@ public function importPayspineGradeCsvPaySpineRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Item[]|null */ public function indexPaySpine( string $employerId, string $contentType = self::contentTypes['indexPaySpine'][0] - ): array + ): ?array { list($response) = $this->indexPaySpineWithHttpInfo($employerId, $contentType); return $response; @@ -12309,36 +11222,15 @@ public function indexPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -12353,34 +11245,11 @@ public function indexPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12390,8 +11259,9 @@ public function indexPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -12652,36 +11522,15 @@ public function updateAllowanceGradePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -12696,34 +11545,11 @@ public function updateAllowanceGradePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12733,8 +11559,9 @@ public function updateAllowanceGradePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -13068,36 +11895,15 @@ public function updateLondonAllowancePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -13112,34 +11918,11 @@ public function updateLondonAllowancePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractLondonAllowanceResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13149,8 +11932,9 @@ public function updateLondonAllowancePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -13463,36 +12247,15 @@ public function updateMultipleAllowanceGradesPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -13507,34 +12270,11 @@ public function updateMultipleAllowanceGradesPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractAllowanceGradesResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13544,8 +12284,9 @@ public function updateMultipleAllowanceGradesPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -13854,36 +12595,15 @@ public function updateMultiplePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -13898,34 +12618,11 @@ public function updateMultiplePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13935,8 +12632,9 @@ public function updateMultiplePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -14224,36 +12922,15 @@ public function updateMultipleSpineAllowancePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -14268,34 +12945,11 @@ public function updateMultipleSpineAllowancePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14305,8 +12959,9 @@ public function updateMultipleSpineAllowancePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -14598,36 +13253,15 @@ public function updatePayGradePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -14642,34 +13276,11 @@ public function updatePayGradePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineGradeResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14679,8 +13290,9 @@ public function updatePayGradePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -14989,36 +13601,15 @@ public function updatePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractPaySpineResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPaySpineResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPaySpineResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -15033,34 +13624,11 @@ public function updatePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPaySpineResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPaySpineResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15070,8 +13638,9 @@ public function updatePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -15363,36 +13932,15 @@ public function updateSpinalPointPaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractSpinalPointResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractSpinalPointResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractSpinalPointResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -15407,34 +13955,11 @@ public function updateSpinalPointPaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractSpinalPointResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpinalPointResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15444,8 +13969,9 @@ public function updateSpinalPointPaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -15758,36 +14284,15 @@ public function updateSpineAllowancePaySpineWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -15802,34 +14307,11 @@ public function updateSpineAllowancePaySpineWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractSpineAllowanceResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15839,8 +14321,9 @@ public function updateSpineAllowancePaySpineWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -16097,4 +14580,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/PayeeApi.php b/src/Api/PayeeApi.php index b20af0d..f2445c1 100644 --- a/src/Api/PayeeApi.php +++ b/src/Api/PayeeApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class PayeeApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createPayee' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deletePayee' => [ 'application/json', @@ -88,10 +91,10 @@ class PayeeApi 'application/json', ], 'updatePayee' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -152,13 +155,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Payee + * @return \SynergiTech\Staffology\Model\Payee|null */ public function createPayee( string $employerId, ?\SynergiTech\Staffology\Model\Payee $payee = null, string $contentType = self::contentTypes['createPayee'][0] - ): \SynergiTech\Staffology\Model\Payee + ): ?\SynergiTech\Staffology\Model\Payee { list($response) = $this->createPayeeWithHttpInfo($employerId, $payee, $contentType); return $response; @@ -175,7 +178,7 @@ public function createPayee( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\Payee, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Payee, HTTP status code, HTTP response headers (array of strings) */ public function createPayeeWithHttpInfo( string $employerId, @@ -207,36 +210,15 @@ public function createPayeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\Payee', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Payee' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Payee', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Payee', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -251,34 +233,11 @@ public function createPayeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Payee'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Payee', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -288,8 +247,9 @@ public function createPayeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -553,10 +513,10 @@ public function deletePayeeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -813,36 +773,15 @@ public function getPayeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Payee', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Payee' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Payee', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Payee', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -857,34 +796,11 @@ public function getPayeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Payee'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Payee', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -894,8 +810,9 @@ public function getPayeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1161,36 +1078,15 @@ public function indexPayeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1205,34 +1101,11 @@ public function indexPayeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1242,8 +1115,9 @@ public function indexPayeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1438,14 +1312,14 @@ public function indexPayeeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Payee + * @return \SynergiTech\Staffology\Model\Payee|null */ public function updatePayee( string $employerId, string $id, ?\SynergiTech\Staffology\Model\Payee $payee = null, string $contentType = self::contentTypes['updatePayee'][0] - ): \SynergiTech\Staffology\Model\Payee + ): ?\SynergiTech\Staffology\Model\Payee { list($response) = $this->updatePayeeWithHttpInfo($employerId, $id, $payee, $contentType); return $response; @@ -1496,36 +1370,15 @@ public function updatePayeeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Payee', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Payee' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Payee', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Payee', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1540,34 +1393,11 @@ public function updatePayeeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Payee'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Payee', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1577,8 +1407,9 @@ public function updatePayeeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1814,4 +1645,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/PensionApi.php b/src/Api/PensionApi.php index 3eca389..56e049f 100644 --- a/src/Api/PensionApi.php +++ b/src/Api/PensionApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class PensionApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createPension' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'getDeprecatedPension' => [ 'application/json', @@ -97,16 +100,16 @@ class PensionApi 'application/json', ], 'updateDeprecatedPension' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updatePension' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -168,14 +171,14 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Pension + * @return \SynergiTech\Staffology\Model\Pension|null */ public function createPension( string $employerId, string $employeeId, ?\SynergiTech\Staffology\Model\Pension $pension = null, string $contentType = self::contentTypes['createPension'][0] - ): \SynergiTech\Staffology\Model\Pension + ): ?\SynergiTech\Staffology\Model\Pension { list($response) = $this->createPensionWithHttpInfo($employerId, $employeeId, $pension, $contentType); return $response; @@ -226,36 +229,15 @@ public function createPensionWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Pension', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Pension' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Pension', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Pension', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -270,34 +252,11 @@ public function createPensionWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Pension'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Pension', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -307,8 +266,9 @@ public function createPensionWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -463,7 +423,7 @@ public function createPensionRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -592,36 +552,15 @@ public function getDeprecatedPensionWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Pension', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Pension' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Pension', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Pension', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -636,34 +575,11 @@ public function getDeprecatedPensionWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Pension'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Pension', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -673,8 +589,9 @@ public function getDeprecatedPensionWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -822,7 +739,7 @@ public function getDeprecatedPensionRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -948,36 +865,15 @@ public function getPensionWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Pension', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Pension' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Pension', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Pension', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -992,34 +888,11 @@ public function getPensionWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Pension'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Pension', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1029,8 +902,9 @@ public function getPensionWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1199,7 +1073,7 @@ public function getPensionRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1329,36 +1203,15 @@ public function lastPayRunEntryWithPensionYtdValuesForEmployeePensionWithHttpInf $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRunEntry', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRunEntry' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRunEntry', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntry', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1373,34 +1226,11 @@ public function lastPayRunEntryWithPensionYtdValuesForEmployeePensionWithHttpInf ); } - $returnType = '\SynergiTech\Staffology\Model\PayRunEntry'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunEntry', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1410,8 +1240,9 @@ public function lastPayRunEntryWithPensionYtdValuesForEmployeePensionWithHttpInf $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1601,7 +1432,7 @@ public function lastPayRunEntryWithPensionYtdValuesForEmployeePensionRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -1723,36 +1554,15 @@ public function listPensionWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1767,34 +1577,11 @@ public function listPensionWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1804,8 +1591,9 @@ public function listPensionWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1953,7 +1741,7 @@ public function listPensionRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2076,10 +1864,10 @@ public function removeDeprecatedPensionWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -2341,10 +2129,10 @@ public function removePensionWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -2568,14 +2356,14 @@ public function removePensionRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Pension + * @return \SynergiTech\Staffology\Model\Pension|null */ public function updateDeprecatedPension( string $employerId, string $employeeId, ?\SynergiTech\Staffology\Model\Pension $pension = null, string $contentType = self::contentTypes['updateDeprecatedPension'][0] - ): \SynergiTech\Staffology\Model\Pension + ): ?\SynergiTech\Staffology\Model\Pension { list($response) = $this->updateDeprecatedPensionWithHttpInfo($employerId, $employeeId, $pension, $contentType); return $response; @@ -2626,36 +2414,15 @@ public function updateDeprecatedPensionWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Pension', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Pension' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Pension', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Pension', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2670,34 +2437,11 @@ public function updateDeprecatedPensionWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Pension'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Pension', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2707,8 +2451,9 @@ public function updateDeprecatedPensionWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2863,7 +2608,7 @@ public function updateDeprecatedPensionRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -2939,7 +2684,7 @@ public function updateDeprecatedPensionRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Pension + * @return \SynergiTech\Staffology\Model\Pension|null */ public function updatePension( string $employerId, @@ -2947,7 +2692,7 @@ public function updatePension( string $id, ?\SynergiTech\Staffology\Model\Pension $pension = null, string $contentType = self::contentTypes['updatePension'][0] - ): \SynergiTech\Staffology\Model\Pension + ): ?\SynergiTech\Staffology\Model\Pension { list($response) = $this->updatePensionWithHttpInfo($employerId, $employeeId, $id, $pension, $contentType); return $response; @@ -3000,36 +2745,15 @@ public function updatePensionWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Pension', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Pension' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Pension', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Pension', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3044,34 +2768,11 @@ public function updatePensionWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Pension'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Pension', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3081,8 +2782,9 @@ public function updatePensionWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3258,7 +2960,7 @@ public function updatePensionRequest( $headers = $this->headerSelector->selectHeaders( - ['text/plain', 'application/json', 'text/json', ], + ['application/json', 'text/json', 'text/plain', ], $contentType, $multipart ); @@ -3339,4 +3041,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/PensionRefundApi.php b/src/Api/PensionRefundApi.php index 550106d..c71b6c9 100644 --- a/src/Api/PensionRefundApi.php +++ b/src/Api/PensionRefundApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class PensionRefundApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createPensionRefund' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deletePensionRefund' => [ 'application/json', @@ -94,10 +97,10 @@ class PensionRefundApi 'application/json', ], 'updatePensionRefund' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -218,10 +221,10 @@ public function createPensionRefundWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -497,10 +500,10 @@ public function deletePensionRefundWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -724,14 +727,14 @@ public function deletePensionRefundRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PensionRefund + * @return \SynergiTech\Staffology\Model\PensionRefund|null */ public function getPensionRefund( string $employerId, string $employeeId, string $id, string $contentType = self::contentTypes['getPensionRefund'][0] - ): \SynergiTech\Staffology\Model\PensionRefund + ): ?\SynergiTech\Staffology\Model\PensionRefund { list($response) = $this->getPensionRefundWithHttpInfo($employerId, $employeeId, $id, $contentType); return $response; @@ -782,36 +785,15 @@ public function getPensionRefundWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PensionRefund', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PensionRefund' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PensionRefund', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionRefund', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -826,34 +808,11 @@ public function getPensionRefundWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PensionRefund'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionRefund', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -863,8 +822,9 @@ public function getPensionRefundWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1155,36 +1115,15 @@ public function indexPensionRefundWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1199,34 +1138,11 @@ public function indexPensionRefundWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1236,8 +1152,9 @@ public function indexPensionRefundWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1452,13 +1369,13 @@ public function indexPensionRefundRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PensionRefund + * @return \SynergiTech\Staffology\Model\PensionRefund|null */ public function issueRefundForCurrentPensionSchemePensionRefund( string $employerId, string $employeeId, string $contentType = self::contentTypes['issueRefundForCurrentPensionSchemePensionRefund'][0] - ): \SynergiTech\Staffology\Model\PensionRefund + ): ?\SynergiTech\Staffology\Model\PensionRefund { list($response) = $this->issueRefundForCurrentPensionSchemePensionRefundWithHttpInfo($employerId, $employeeId, $contentType); return $response; @@ -1507,36 +1424,15 @@ public function issueRefundForCurrentPensionSchemePensionRefundWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PensionRefund', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PensionRefund' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PensionRefund', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionRefund', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1551,34 +1447,11 @@ public function issueRefundForCurrentPensionSchemePensionRefundWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PensionRefund'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionRefund', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1588,8 +1461,9 @@ public function issueRefundForCurrentPensionSchemePensionRefundWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1805,14 +1679,14 @@ public function issueRefundForCurrentPensionSchemePensionRefundRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PensionRefund + * @return \SynergiTech\Staffology\Model\PensionRefund|null */ public function issueRefundForPensionPensionRefund( string $employerId, string $employeeId, string $pensionId, string $contentType = self::contentTypes['issueRefundForPensionPensionRefund'][0] - ): \SynergiTech\Staffology\Model\PensionRefund + ): ?\SynergiTech\Staffology\Model\PensionRefund { list($response) = $this->issueRefundForPensionPensionRefundWithHttpInfo($employerId, $employeeId, $pensionId, $contentType); return $response; @@ -1863,36 +1737,15 @@ public function issueRefundForPensionPensionRefundWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PensionRefund', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PensionRefund' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PensionRefund', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionRefund', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1907,34 +1760,11 @@ public function issueRefundForPensionPensionRefundWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PensionRefund'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionRefund', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1944,8 +1774,9 @@ public function issueRefundForPensionPensionRefundWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2183,7 +2014,7 @@ public function issueRefundForPensionPensionRefundRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PensionRefund + * @return \SynergiTech\Staffology\Model\PensionRefund|null */ public function updatePensionRefund( string $employerId, @@ -2191,7 +2022,7 @@ public function updatePensionRefund( string $id, ?\SynergiTech\Staffology\Model\PensionRefund $pensionRefund = null, string $contentType = self::contentTypes['updatePensionRefund'][0] - ): \SynergiTech\Staffology\Model\PensionRefund + ): ?\SynergiTech\Staffology\Model\PensionRefund { list($response) = $this->updatePensionRefundWithHttpInfo($employerId, $employeeId, $id, $pensionRefund, $contentType); return $response; @@ -2244,36 +2075,15 @@ public function updatePensionRefundWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PensionRefund', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PensionRefund' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PensionRefund', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionRefund', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2288,34 +2098,11 @@ public function updatePensionRefundWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PensionRefund'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionRefund', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2325,8 +2112,9 @@ public function updatePensionRefundWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2583,4 +2371,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/PensionSchemeApi.php b/src/Api/PensionSchemeApi.php index 26aec8a..3043837 100644 --- a/src/Api/PensionSchemeApi.php +++ b/src/Api/PensionSchemeApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -79,10 +82,10 @@ class PensionSchemeApi 'application/json', ], 'createPensionScheme' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deletePensionScheme' => [ 'application/json', @@ -106,10 +109,10 @@ class PensionSchemeApi 'application/json', ], 'updatePensionScheme' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -174,7 +177,7 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PensionContributionsSubmission + * @return \SynergiTech\Staffology\Model\PensionContributionsSubmission|null */ public function contributionsForPayrunPensionScheme( string $employerId, @@ -184,7 +187,7 @@ public function contributionsForPayrunPensionScheme( int $periodNumber, ?int $ordinal = 1, string $contentType = self::contentTypes['contributionsForPayrunPensionScheme'][0] - ): \SynergiTech\Staffology\Model\PensionContributionsSubmission + ): ?\SynergiTech\Staffology\Model\PensionContributionsSubmission { list($response) = $this->contributionsForPayrunPensionSchemeWithHttpInfo($employerId, $id, $taxYear, $payPeriod, $periodNumber, $ordinal, $contentType); return $response; @@ -205,7 +208,7 @@ public function contributionsForPayrunPensionScheme( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\PensionContributionsSubmission, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\PensionContributionsSubmission, HTTP status code, HTTP response headers (array of strings) */ public function contributionsForPayrunPensionSchemeWithHttpInfo( string $employerId, @@ -241,36 +244,15 @@ public function contributionsForPayrunPensionSchemeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PensionContributionsSubmission', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PensionContributionsSubmission' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PensionContributionsSubmission', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionContributionsSubmission', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -285,34 +267,11 @@ public function contributionsForPayrunPensionSchemeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PensionContributionsSubmission'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionContributionsSubmission', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -322,8 +281,9 @@ public function contributionsForPayrunPensionSchemeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -680,36 +640,15 @@ public function contributionsPensionSchemeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ExternalProviderConversation', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ExternalProviderConversation' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ExternalProviderConversation', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExternalProviderConversation', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -724,34 +663,11 @@ public function contributionsPensionSchemeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ExternalProviderConversation'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExternalProviderConversation', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -761,8 +677,9 @@ public function contributionsPensionSchemeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1019,13 +936,13 @@ public function contributionsPensionSchemeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PensionScheme + * @return \SynergiTech\Staffology\Model\PensionScheme|null */ public function createPensionScheme( string $employerId, ?\SynergiTech\Staffology\Model\PensionScheme $pensionScheme = null, string $contentType = self::contentTypes['createPensionScheme'][0] - ): \SynergiTech\Staffology\Model\PensionScheme + ): ?\SynergiTech\Staffology\Model\PensionScheme { list($response) = $this->createPensionSchemeWithHttpInfo($employerId, $pensionScheme, $contentType); return $response; @@ -1042,7 +959,7 @@ public function createPensionScheme( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\PensionScheme, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\PensionScheme, HTTP status code, HTTP response headers (array of strings) */ public function createPensionSchemeWithHttpInfo( string $employerId, @@ -1074,36 +991,15 @@ public function createPensionSchemeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\PensionScheme', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PensionScheme' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PensionScheme', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionScheme', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1118,34 +1014,11 @@ public function createPensionSchemeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PensionScheme'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionScheme', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -1155,8 +1028,9 @@ public function createPensionSchemeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1420,10 +1294,10 @@ public function deletePensionSchemeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1680,36 +1554,15 @@ public function employeesPensionSchemeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1724,34 +1577,11 @@ public function employeesPensionSchemeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1761,8 +1591,9 @@ public function employeesPensionSchemeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2032,36 +1863,15 @@ public function getPensionSchemeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PensionScheme', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PensionScheme' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PensionScheme', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionScheme', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2076,34 +1886,11 @@ public function getPensionSchemeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PensionScheme'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionScheme', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2113,8 +1900,9 @@ public function getPensionSchemeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2380,36 +2168,15 @@ public function indexPensionSchemeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2424,34 +2191,11 @@ public function indexPensionSchemeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2461,8 +2205,9 @@ public function indexPensionSchemeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2715,36 +2460,15 @@ public function listContributionsPensionSchemeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2759,34 +2483,11 @@ public function listContributionsPensionSchemeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2796,8 +2497,9 @@ public function listContributionsPensionSchemeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3096,36 +2798,15 @@ public function markAsSentPensionSchemeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ExternalProviderConversation', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ExternalProviderConversation' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ExternalProviderConversation', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExternalProviderConversation', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3140,34 +2821,11 @@ public function markAsSentPensionSchemeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ExternalProviderConversation'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExternalProviderConversation', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3177,8 +2835,9 @@ public function markAsSentPensionSchemeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3499,10 +3158,10 @@ public function resubmitContributionsPensionSchemeWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -3747,14 +3406,14 @@ public function resubmitContributionsPensionSchemeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PensionScheme + * @return \SynergiTech\Staffology\Model\PensionScheme|null */ public function updatePensionScheme( string $employerId, string $id, ?\SynergiTech\Staffology\Model\PensionScheme $pensionScheme = null, string $contentType = self::contentTypes['updatePensionScheme'][0] - ): \SynergiTech\Staffology\Model\PensionScheme + ): ?\SynergiTech\Staffology\Model\PensionScheme { list($response) = $this->updatePensionSchemeWithHttpInfo($employerId, $id, $pensionScheme, $contentType); return $response; @@ -3805,36 +3464,15 @@ public function updatePensionSchemeWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PensionScheme', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PensionScheme' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PensionScheme', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionScheme', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3849,34 +3487,11 @@ public function updatePensionSchemeWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PensionScheme'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionScheme', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3886,8 +3501,9 @@ public function updatePensionSchemeWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4123,4 +3739,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/ProcessingNoteApi.php b/src/Api/ProcessingNoteApi.php index 9d2ce5a..f2c6b6d 100644 --- a/src/Api/ProcessingNoteApi.php +++ b/src/Api/ProcessingNoteApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -76,10 +79,10 @@ class ProcessingNoteApi 'multipart/form-data', ], 'createProcessingNote' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteDocumentProcessingNote' => [ 'application/json', @@ -94,10 +97,10 @@ class ProcessingNoteApi 'application/json', ], 'setStatusProcessingNote' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -218,10 +221,10 @@ public function addDocumentProcessingNoteWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -362,19 +365,14 @@ public function addDocumentProcessingNoteRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( [], @@ -448,7 +446,7 @@ public function addDocumentProcessingNoteRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ProcessingNote + * @return \SynergiTech\Staffology\Model\ProcessingNote|null */ public function createProcessingNote( string $employerId, @@ -458,7 +456,7 @@ public function createProcessingNote( ?int $ordinal = 1, ?\SynergiTech\Staffology\Model\ProcessingNote $processingNote = null, string $contentType = self::contentTypes['createProcessingNote'][0] - ): \SynergiTech\Staffology\Model\ProcessingNote + ): ?\SynergiTech\Staffology\Model\ProcessingNote { list($response) = $this->createProcessingNoteWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $processingNote, $contentType); return $response; @@ -515,36 +513,15 @@ public function createProcessingNoteWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ProcessingNote', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ProcessingNote' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ProcessingNote', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ProcessingNote', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -559,34 +536,11 @@ public function createProcessingNoteWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ProcessingNote'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ProcessingNote', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -596,8 +550,9 @@ public function createProcessingNoteWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -944,10 +899,10 @@ public function deleteDocumentProcessingNoteWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1171,14 +1126,14 @@ public function deleteDocumentProcessingNoteRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SplFileObject + * @return \SplFileObject|null */ public function getDocumentProcessingNote( string $employerId, string $id, string $documentId, string $contentType = self::contentTypes['getDocumentProcessingNote'][0] - ): \SplFileObject + ): ?\SplFileObject { list($response) = $this->getDocumentProcessingNoteWithHttpInfo($employerId, $id, $documentId, $contentType); return $response; @@ -1229,36 +1184,15 @@ public function getDocumentProcessingNoteWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SplFileObject', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SplFileObject' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1273,34 +1207,11 @@ public function getDocumentProcessingNoteWithHttpInfo( ); } - $returnType = '\SplFileObject'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1310,8 +1221,9 @@ public function getDocumentProcessingNoteWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1618,36 +1530,15 @@ public function getProcessingNoteWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ProcessingNote', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ProcessingNote' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ProcessingNote', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ProcessingNote', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1662,34 +1553,11 @@ public function getProcessingNoteWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ProcessingNote'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ProcessingNote', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1699,8 +1567,9 @@ public function getProcessingNoteWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2065,36 +1934,15 @@ public function listProcessingNoteWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2109,34 +1957,11 @@ public function listProcessingNoteWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2146,8 +1971,9 @@ public function listProcessingNoteWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2441,7 +2267,7 @@ public function listProcessingNoteRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ProcessingNote + * @return \SynergiTech\Staffology\Model\ProcessingNote|null */ public function setStatusProcessingNote( string $employerId, @@ -2452,7 +2278,7 @@ public function setStatusProcessingNote( ?int $ordinal = 1, ?string $body = null, string $contentType = self::contentTypes['setStatusProcessingNote'][0] - ): \SynergiTech\Staffology\Model\ProcessingNote + ): ?\SynergiTech\Staffology\Model\ProcessingNote { list($response) = $this->setStatusProcessingNoteWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $id, $ordinal, $body, $contentType); return $response; @@ -2511,36 +2337,15 @@ public function setStatusProcessingNoteWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ProcessingNote', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ProcessingNote' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ProcessingNote', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ProcessingNote', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2555,34 +2360,11 @@ public function setStatusProcessingNoteWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ProcessingNote'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ProcessingNote', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2592,8 +2374,9 @@ public function setStatusProcessingNoteWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2908,4 +2691,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/ReportBuilderApi.php b/src/Api/ReportBuilderApi.php index 9071309..3a2762f 100644 --- a/src/Api/ReportBuilderApi.php +++ b/src/Api/ReportBuilderApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,16 +76,16 @@ class ReportBuilderApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'getPaySchedulesByEmployerAndPayDatesReportBuilder' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'getPaySchedulesByEmployersAndTaxYearsReportBuilder' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -194,36 +197,15 @@ public function getPaySchedulesByEmployerAndPayDatesReportBuilderWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractPayScheduleResponseItem[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPayScheduleResponseItem[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPayScheduleResponseItem[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayScheduleResponseItem[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -238,34 +220,11 @@ public function getPaySchedulesByEmployerAndPayDatesReportBuilderWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPayScheduleResponseItem[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayScheduleResponseItem[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -275,8 +234,9 @@ public function getPaySchedulesByEmployerAndPayDatesReportBuilderWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -514,36 +474,15 @@ public function getPaySchedulesByEmployersAndTaxYearsReportBuilderWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractPayScheduleResponseItem[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPayScheduleResponseItem[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPayScheduleResponseItem[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayScheduleResponseItem[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -558,34 +497,11 @@ public function getPaySchedulesByEmployersAndTaxYearsReportBuilderWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPayScheduleResponseItem[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayScheduleResponseItem[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -595,8 +511,9 @@ public function getPaySchedulesByEmployersAndTaxYearsReportBuilderWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -790,4 +707,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/ReportPackApi.php b/src/Api/ReportPackApi.php index c04f1b7..e8e1a46 100644 --- a/src/Api/ReportPackApi.php +++ b/src/Api/ReportPackApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class ReportPackApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createReportPack' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteReportPack' => [ 'application/json', @@ -88,10 +91,10 @@ class ReportPackApi 'application/json', ], 'updateReportPack' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -152,13 +155,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ReportPack + * @return \SynergiTech\Staffology\Model\ReportPack|null */ public function createReportPack( string $employerId, ?\SynergiTech\Staffology\Model\ReportPack $reportPack = null, string $contentType = self::contentTypes['createReportPack'][0] - ): \SynergiTech\Staffology\Model\ReportPack + ): ?\SynergiTech\Staffology\Model\ReportPack { list($response) = $this->createReportPackWithHttpInfo($employerId, $reportPack, $contentType); return $response; @@ -175,7 +178,7 @@ public function createReportPack( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ReportPack, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ReportPack, HTTP status code, HTTP response headers (array of strings) */ public function createReportPackWithHttpInfo( string $employerId, @@ -207,36 +210,15 @@ public function createReportPackWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ReportPack', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportPack' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportPack', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportPack', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -251,34 +233,11 @@ public function createReportPackWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportPack'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportPack', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -288,8 +247,9 @@ public function createReportPackWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -553,10 +513,10 @@ public function deleteReportPackWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -813,36 +773,15 @@ public function getReportPackWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportPack', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportPack' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportPack', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportPack', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -857,34 +796,11 @@ public function getReportPackWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportPack'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportPack', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -894,8 +810,9 @@ public function getReportPackWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1161,36 +1078,15 @@ public function indexReportPackWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1205,34 +1101,11 @@ public function indexReportPackWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1242,8 +1115,9 @@ public function indexReportPackWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1438,14 +1312,14 @@ public function indexReportPackRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ReportPack + * @return \SynergiTech\Staffology\Model\ReportPack|null */ public function updateReportPack( string $employerId, string $id, ?\SynergiTech\Staffology\Model\ReportPack $reportPack = null, string $contentType = self::contentTypes['updateReportPack'][0] - ): \SynergiTech\Staffology\Model\ReportPack + ): ?\SynergiTech\Staffology\Model\ReportPack { list($response) = $this->updateReportPackWithHttpInfo($employerId, $id, $reportPack, $contentType); return $response; @@ -1496,36 +1370,15 @@ public function updateReportPackWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportPack', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportPack' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportPack', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportPack', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1540,34 +1393,11 @@ public function updateReportPackWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportPack'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportPack', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1577,8 +1407,9 @@ public function updateReportPackWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1814,4 +1645,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/ReportTemplateApi.php b/src/Api/ReportTemplateApi.php index d937f1d..992efcd 100644 --- a/src/Api/ReportTemplateApi.php +++ b/src/Api/ReportTemplateApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class ReportTemplateApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createReportTemplate' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteReportTemplate' => [ 'application/json', @@ -91,16 +94,16 @@ class ReportTemplateApi 'application/json', ], 'updateReportTemplate' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'validateReportTemplateColumnsReportTemplate' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -161,13 +164,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractReportTemplateResponse + * @return \SynergiTech\Staffology\Model\ContractReportTemplateResponse|null */ public function createReportTemplate( string $employerId, ?\SynergiTech\Staffology\Model\ContractReportTemplateRequest $contractReportTemplateRequest = null, string $contentType = self::contentTypes['createReportTemplate'][0] - ): \SynergiTech\Staffology\Model\ContractReportTemplateResponse + ): ?\SynergiTech\Staffology\Model\ContractReportTemplateResponse { list($response) = $this->createReportTemplateWithHttpInfo($employerId, $contractReportTemplateRequest, $contentType); return $response; @@ -184,7 +187,7 @@ public function createReportTemplate( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\ContractReportTemplateResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractReportTemplateResponse, HTTP status code, HTTP response headers (array of strings) */ public function createReportTemplateWithHttpInfo( string $employerId, @@ -216,36 +219,15 @@ public function createReportTemplateWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractReportTemplateResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractReportTemplateResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractReportTemplateResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractReportTemplateResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -260,34 +242,11 @@ public function createReportTemplateWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractReportTemplateResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractReportTemplateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -297,8 +256,9 @@ public function createReportTemplateWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -562,10 +522,10 @@ public function deleteReportTemplateWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -814,36 +774,15 @@ public function getContentDictionaryReportTemplateWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractReportTemplateContentDictionaryResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractReportTemplateContentDictionaryResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractReportTemplateContentDictionaryResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractReportTemplateContentDictionaryResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -858,34 +797,11 @@ public function getContentDictionaryReportTemplateWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractReportTemplateContentDictionaryResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractReportTemplateContentDictionaryResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -895,8 +811,9 @@ public function getContentDictionaryReportTemplateWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1069,13 +986,13 @@ public function getContentDictionaryReportTemplateRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractReportTemplateResponse + * @return \SynergiTech\Staffology\Model\ContractReportTemplateResponse|null */ public function getReportTemplate( string $employerId, string $id, string $contentType = self::contentTypes['getReportTemplate'][0] - ): \SynergiTech\Staffology\Model\ContractReportTemplateResponse + ): ?\SynergiTech\Staffology\Model\ContractReportTemplateResponse { list($response) = $this->getReportTemplateWithHttpInfo($employerId, $id, $contentType); return $response; @@ -1124,36 +1041,15 @@ public function getReportTemplateWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractReportTemplateResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractReportTemplateResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractReportTemplateResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractReportTemplateResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1168,34 +1064,11 @@ public function getReportTemplateWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractReportTemplateResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractReportTemplateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1205,8 +1078,9 @@ public function getReportTemplateWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1472,36 +1346,15 @@ public function indexReportTemplateWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1516,34 +1369,11 @@ public function indexReportTemplateWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1553,8 +1383,9 @@ public function indexReportTemplateWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1749,14 +1580,14 @@ public function indexReportTemplateRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractReportTemplateResponse + * @return \SynergiTech\Staffology\Model\ContractReportTemplateResponse|null */ public function updateReportTemplate( string $employerId, string $id, ?\SynergiTech\Staffology\Model\ContractReportTemplateRequest $contractReportTemplateRequest = null, string $contentType = self::contentTypes['updateReportTemplate'][0] - ): \SynergiTech\Staffology\Model\ContractReportTemplateResponse + ): ?\SynergiTech\Staffology\Model\ContractReportTemplateResponse { list($response) = $this->updateReportTemplateWithHttpInfo($employerId, $id, $contractReportTemplateRequest, $contentType); return $response; @@ -1807,36 +1638,15 @@ public function updateReportTemplateWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractReportTemplateResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractReportTemplateResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractReportTemplateResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractReportTemplateResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1851,34 +1661,11 @@ public function updateReportTemplateWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractReportTemplateResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractReportTemplateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1888,8 +1675,9 @@ public function updateReportTemplateWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2170,10 +1958,10 @@ public function validateReportTemplateColumnsReportTemplateWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -2354,4 +2142,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/ReportsApi.php b/src/Api/ReportsApi.php index 313d8a2..9de63c8 100644 --- a/src/Api/ReportsApi.php +++ b/src/Api/ReportsApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -114,11 +117,14 @@ class ReportsApi 'costOfEmploymentReports' => [ 'application/json', ], + 'cyclicReenrolmentReports' => [ + 'application/json', + ], 'downloadMaternitySchedulesReports' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'emailP11DMultipleReports' => [ 'application/json', @@ -126,6 +132,9 @@ class ReportsApi 'emailP11DReports' => [ 'application/json', ], + 'emailP45MutlipleReports' => [ + 'application/json', + ], 'emailP45Reports' => [ 'application/json', ], @@ -144,11 +153,14 @@ class ReportsApi 'employeeLeaveReports' => [ 'application/json', ], + 'employeeLoanExportReports' => [ + 'application/json', + ], 'employeePaymentsReportReports' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'employeeRoleExportReports' => [ 'application/json', @@ -160,10 +172,10 @@ class ReportsApi 'application/json', ], 'examplePayslipReports' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'exbReports' => [ 'application/json', @@ -180,6 +192,9 @@ class ReportsApi 'genderPayGapReports' => [ 'application/json', ], + 'getP45AvailabilityReports' => [ + 'application/json', + ], 'getPayRunCsvReports' => [ 'application/json', ], @@ -225,6 +240,9 @@ class ReportsApi 'p32Reports' => [ 'application/json', ], + 'p45MultipleReports' => [ + 'application/json', + ], 'p45Reports' => [ 'application/json', ], @@ -451,36 +469,15 @@ public function advancedVarianceReportReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\AdvancedVarianceReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AdvancedVarianceReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AdvancedVarianceReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AdvancedVarianceReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -495,34 +492,11 @@ public function advancedVarianceReportReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AdvancedVarianceReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AdvancedVarianceReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -532,8 +506,9 @@ public function advancedVarianceReportReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -905,36 +880,15 @@ public function aeAssessmentsReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ItemListReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ItemListReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ItemListReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ItemListReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -949,34 +903,11 @@ public function aeAssessmentsReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ItemListReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ItemListReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -986,8 +917,9 @@ public function aeAssessmentsReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1255,36 +1187,15 @@ public function aeoStatementReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\AttachmentOrderReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AttachmentOrderReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AttachmentOrderReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AttachmentOrderReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1299,34 +1210,11 @@ public function aeoStatementReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AttachmentOrderReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AttachmentOrderReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1336,8 +1224,9 @@ public function aeoStatementReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1512,7 +1401,7 @@ public function aeoStatementReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -1662,36 +1551,15 @@ public function analysisReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\AnalysisReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AnalysisReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AnalysisReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AnalysisReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1706,34 +1574,11 @@ public function analysisReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AnalysisReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AnalysisReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1743,8 +1588,9 @@ public function analysisReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2130,36 +1976,15 @@ public function apprenticeshipLevyDetailsReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2174,34 +1999,11 @@ public function apprenticeshipLevyDetailsReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2211,8 +2013,9 @@ public function apprenticeshipLevyDetailsReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2371,7 +2174,7 @@ public function apprenticeshipLevyDetailsReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/pdf', 'application/json', 'text/html', ], + ['application/json', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -2513,36 +2316,15 @@ public function attachmentOrdersReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\AttachmentOrdersReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AttachmentOrdersReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AttachmentOrdersReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AttachmentOrdersReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2557,34 +2339,11 @@ public function attachmentOrdersReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AttachmentOrdersReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AttachmentOrdersReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2594,8 +2353,9 @@ public function attachmentOrdersReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2823,7 +2583,7 @@ public function attachmentOrdersReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -2961,36 +2721,15 @@ public function averageHolidayPayRateReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\AverageHolidayPayRateReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\AverageHolidayPayRateReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\AverageHolidayPayRateReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AverageHolidayPayRateReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3005,34 +2744,11 @@ public function averageHolidayPayRateReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\AverageHolidayPayRateReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\AverageHolidayPayRateReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3042,8 +2758,9 @@ public function averageHolidayPayRateReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3255,7 +2972,7 @@ public function averageHolidayPayRateReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -3328,6 +3045,7 @@ public function averageHolidayPayRateReportsRequest( * @param bool|null $incHmrc Set to true and we'll include any payment due to HMRC (optional, default to false) * @param bool|null $incAeos Set to true and we'll include any payment due as a result of AttachmentOrders (optional, default to false) * @param bool|null $incDeductions Set to true and we'll include any payment due to Deductions that are set to be paid to a Payee (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bankPaymentInstructionsReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -3347,10 +3065,11 @@ public function bankPaymentInstructionsReports( ?bool $incHmrc = false, ?bool $incAeos = false, ?bool $incDeductions = false, + ?int $version = null, string $contentType = self::contentTypes['bankPaymentInstructionsReports'][0] ): \SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse { - list($response) = $this->bankPaymentInstructionsReportsWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $paymentDate, $bankHoliday, $ordinal, $incPensions, $incHmrc, $incAeos, $incDeductions, $contentType); + list($response) = $this->bankPaymentInstructionsReportsWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $paymentDate, $bankHoliday, $ordinal, $incPensions, $incHmrc, $incAeos, $incDeductions, $version, $contentType); return $response; } @@ -3371,6 +3090,7 @@ public function bankPaymentInstructionsReports( * @param bool|null $incHmrc Set to true and we'll include any payment due to HMRC (optional, default to false) * @param bool|null $incAeos Set to true and we'll include any payment due as a result of AttachmentOrders (optional, default to false) * @param bool|null $incDeductions Set to true and we'll include any payment due to Deductions that are set to be paid to a Payee (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bankPaymentInstructionsReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -3390,10 +3110,11 @@ public function bankPaymentInstructionsReportsWithHttpInfo( ?bool $incHmrc = false, ?bool $incAeos = false, ?bool $incDeductions = false, + ?int $version = null, string $contentType = self::contentTypes['bankPaymentInstructionsReports'][0] ): array { - $request = $this->bankPaymentInstructionsReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $paymentDate, $bankHoliday, $ordinal, $incPensions, $incHmrc, $incAeos, $incDeductions, $contentType); + $request = $this->bankPaymentInstructionsReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $paymentDate, $bankHoliday, $ordinal, $incPensions, $incHmrc, $incAeos, $incDeductions, $version, $contentType); try { $options = $this->createHttpClientOption(); @@ -3417,36 +3138,15 @@ public function bankPaymentInstructionsReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3461,34 +3161,11 @@ public function bankPaymentInstructionsReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3498,8 +3175,9 @@ public function bankPaymentInstructionsReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3521,6 +3199,7 @@ public function bankPaymentInstructionsReportsWithHttpInfo( * @param bool|null $incHmrc Set to true and we'll include any payment due to HMRC (optional, default to false) * @param bool|null $incAeos Set to true and we'll include any payment due as a result of AttachmentOrders (optional, default to false) * @param bool|null $incDeductions Set to true and we'll include any payment due to Deductions that are set to be paid to a Payee (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bankPaymentInstructionsReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -3539,10 +3218,11 @@ public function bankPaymentInstructionsReportsAsync( ?bool $incHmrc = false, ?bool $incAeos = false, ?bool $incDeductions = false, + ?int $version = null, string $contentType = self::contentTypes['bankPaymentInstructionsReports'][0] ): PromiseInterface { - return $this->bankPaymentInstructionsReportsAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $paymentDate, $bankHoliday, $ordinal, $incPensions, $incHmrc, $incAeos, $incDeductions, $contentType) + return $this->bankPaymentInstructionsReportsAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $paymentDate, $bankHoliday, $ordinal, $incPensions, $incHmrc, $incAeos, $incDeductions, $version, $contentType) ->then( function ($response) { return $response[0]; @@ -3567,6 +3247,7 @@ function ($response) { * @param bool|null $incHmrc Set to true and we'll include any payment due to HMRC (optional, default to false) * @param bool|null $incAeos Set to true and we'll include any payment due as a result of AttachmentOrders (optional, default to false) * @param bool|null $incDeductions Set to true and we'll include any payment due to Deductions that are set to be paid to a Payee (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bankPaymentInstructionsReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -3585,11 +3266,12 @@ public function bankPaymentInstructionsReportsAsyncWithHttpInfo( ?bool $incHmrc = false, ?bool $incAeos = false, ?bool $incDeductions = false, + ?int $version = null, string $contentType = self::contentTypes['bankPaymentInstructionsReports'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\BankPaymentInstructionReportResponse'; - $request = $this->bankPaymentInstructionsReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $paymentDate, $bankHoliday, $ordinal, $incPensions, $incHmrc, $incAeos, $incDeductions, $contentType); + $request = $this->bankPaymentInstructionsReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $paymentDate, $bankHoliday, $ordinal, $incPensions, $incHmrc, $incAeos, $incDeductions, $version, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3642,6 +3324,7 @@ function ($exception) { * @param bool|null $incHmrc Set to true and we'll include any payment due to HMRC (optional, default to false) * @param bool|null $incAeos Set to true and we'll include any payment due as a result of AttachmentOrders (optional, default to false) * @param bool|null $incDeductions Set to true and we'll include any payment due to Deductions that are set to be paid to a Payee (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bankPaymentInstructionsReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -3660,6 +3343,7 @@ public function bankPaymentInstructionsReportsRequest( ?bool $incHmrc = false, ?bool $incAeos = false, ?bool $incDeductions = false, + ?int $version = null, string $contentType = self::contentTypes['bankPaymentInstructionsReports'][0] ): Request { @@ -3701,6 +3385,7 @@ public function bankPaymentInstructionsReportsRequest( + $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payments/employee/credit'; $formParams = []; $queryParams = []; @@ -3771,6 +3456,15 @@ public function bankPaymentInstructionsReportsRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // header params if ($accept !== null) { @@ -3812,7 +3506,7 @@ public function bankPaymentInstructionsReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'application/zip', ], + ['application/json', 'application/zip', 'text/csv', ], $contentType, $multipart ); @@ -3942,36 +3636,15 @@ public function changesReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3986,34 +3659,11 @@ public function changesReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4023,8 +3673,9 @@ public function changesReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4324,36 +3975,15 @@ public function cis300ReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Cis300ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Cis300ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Cis300ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Cis300ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4368,34 +3998,11 @@ public function cis300ReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Cis300ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Cis300ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4405,8 +4012,9 @@ public function cis300ReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4720,36 +4328,15 @@ public function cisStatementReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\CisStatementListReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CisStatementListReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CisStatementListReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisStatementListReportResponse', + $request, + $response, + ); + } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4764,34 +4351,11 @@ public function cisStatementReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CisStatementListReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisStatementListReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4801,8 +4365,9 @@ public function cisStatementReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4998,7 +4563,7 @@ public function cisStatementReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/pdf', 'application/json', ], + ['application/json', 'application/pdf', ], $contentType, $multipart ); @@ -5120,36 +4685,15 @@ public function cisSubContractorSummaryReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\CisSubContractorSummaryListReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CisSubContractorSummaryListReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CisSubContractorSummaryListReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisSubContractorSummaryListReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5164,34 +4708,11 @@ public function cisSubContractorSummaryReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CisSubContractorSummaryListReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CisSubContractorSummaryListReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5201,8 +4722,9 @@ public function cisSubContractorSummaryReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5340,7 +4862,7 @@ public function cisSubContractorSummaryReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/pdf', 'text/html', 'text/csv', 'application/json', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -5482,36 +5004,15 @@ public function costAnalysisReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\CostAnalysisReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CostAnalysisReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CostAnalysisReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostAnalysisReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5526,34 +5027,11 @@ public function costAnalysisReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CostAnalysisReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostAnalysisReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5563,8 +5041,9 @@ public function costAnalysisReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5792,7 +5271,7 @@ public function costAnalysisReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -5934,36 +5413,15 @@ public function costOfEmploymentReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\CostOfEmploymentReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\CostOfEmploymentReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\CostOfEmploymentReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostOfEmploymentReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5978,34 +5436,11 @@ public function costOfEmploymentReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\CostOfEmploymentReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CostOfEmploymentReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6015,8 +5450,9 @@ public function costOfEmploymentReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -6244,7 +5680,7 @@ public function costOfEmploymentReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -6301,56 +5737,52 @@ public function costOfEmploymentReportsRequest( } /** - * Operation downloadMaternitySchedulesReports + * Operation cyclicReenrolmentReports * - * Download Maternity Payment Schedule + * Export Cyclic Re-enrolments * - * @param string $employerId employerId (required) - * @param string|null $employeeId employeeId (optional) - * @param string|null $id id (optional) - * @param \SynergiTech\Staffology\Model\Leave|null $leave leave (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadMaternitySchedulesReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param \DateTime|null $reenrolmentDate The re-enrolment date in the format YYYY-MM-DD. (optional) + * @param string|null $accept accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cyclicReenrolmentReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ReportResponse + * @return \SynergiTech\Staffology\Model\CyclicReenrolmentReportReportResponse */ - public function downloadMaternitySchedulesReports( + public function cyclicReenrolmentReports( string $employerId, - ?string $employeeId = null, - ?string $id = null, - ?\SynergiTech\Staffology\Model\Leave $leave = null, - string $contentType = self::contentTypes['downloadMaternitySchedulesReports'][0] - ): \SynergiTech\Staffology\Model\ReportResponse + ?\DateTime $reenrolmentDate = null, + ?string $accept = null, + string $contentType = self::contentTypes['cyclicReenrolmentReports'][0] + ): \SynergiTech\Staffology\Model\CyclicReenrolmentReportReportResponse { - list($response) = $this->downloadMaternitySchedulesReportsWithHttpInfo($employerId, $employeeId, $id, $leave, $contentType); + list($response) = $this->cyclicReenrolmentReportsWithHttpInfo($employerId, $reenrolmentDate, $accept, $contentType); return $response; } /** - * Operation downloadMaternitySchedulesReportsWithHttpInfo + * Operation cyclicReenrolmentReportsWithHttpInfo * - * Download Maternity Payment Schedule + * Export Cyclic Re-enrolments * - * @param string $employerId (required) - * @param string|null $employeeId (optional) - * @param string|null $id (optional) - * @param \SynergiTech\Staffology\Model\Leave|null $leave (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadMaternitySchedulesReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param \DateTime|null $reenrolmentDate The re-enrolment date in the format YYYY-MM-DD. (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cyclicReenrolmentReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\CyclicReenrolmentReportReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function downloadMaternitySchedulesReportsWithHttpInfo( + public function cyclicReenrolmentReportsWithHttpInfo( string $employerId, - ?string $employeeId = null, - ?string $id = null, - ?\SynergiTech\Staffology\Model\Leave $leave = null, - string $contentType = self::contentTypes['downloadMaternitySchedulesReports'][0] + ?\DateTime $reenrolmentDate = null, + ?string $accept = null, + string $contentType = self::contentTypes['cyclicReenrolmentReports'][0] ): array { - $request = $this->downloadMaternitySchedulesReportsRequest($employerId, $employeeId, $id, $leave, $contentType); + $request = $this->cyclicReenrolmentReportsRequest($employerId, $reenrolmentDate, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -6374,36 +5806,15 @@ public function downloadMaternitySchedulesReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CyclicReenrolmentReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6418,72 +5829,48 @@ public function downloadMaternitySchedulesReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\CyclicReenrolmentReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ReportResponse', + '\SynergiTech\Staffology\Model\CyclicReenrolmentReportReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation downloadMaternitySchedulesReportsAsync + * Operation cyclicReenrolmentReportsAsync * - * Download Maternity Payment Schedule + * Export Cyclic Re-enrolments * - * @param string $employerId (required) - * @param string|null $employeeId (optional) - * @param string|null $id (optional) - * @param \SynergiTech\Staffology\Model\Leave|null $leave (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadMaternitySchedulesReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param \DateTime|null $reenrolmentDate The re-enrolment date in the format YYYY-MM-DD. (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cyclicReenrolmentReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function downloadMaternitySchedulesReportsAsync( + public function cyclicReenrolmentReportsAsync( string $employerId, - ?string $employeeId = null, - ?string $id = null, - ?\SynergiTech\Staffology\Model\Leave $leave = null, - string $contentType = self::contentTypes['downloadMaternitySchedulesReports'][0] + ?\DateTime $reenrolmentDate = null, + ?string $accept = null, + string $contentType = self::contentTypes['cyclicReenrolmentReports'][0] ): PromiseInterface { - return $this->downloadMaternitySchedulesReportsAsyncWithHttpInfo($employerId, $employeeId, $id, $leave, $contentType) + return $this->cyclicReenrolmentReportsAsyncWithHttpInfo($employerId, $reenrolmentDate, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -6492,29 +5879,27 @@ function ($response) { } /** - * Operation downloadMaternitySchedulesReportsAsyncWithHttpInfo + * Operation cyclicReenrolmentReportsAsyncWithHttpInfo * - * Download Maternity Payment Schedule + * Export Cyclic Re-enrolments * - * @param string $employerId (required) - * @param string|null $employeeId (optional) - * @param string|null $id (optional) - * @param \SynergiTech\Staffology\Model\Leave|null $leave (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadMaternitySchedulesReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param \DateTime|null $reenrolmentDate The re-enrolment date in the format YYYY-MM-DD. (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cyclicReenrolmentReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function downloadMaternitySchedulesReportsAsyncWithHttpInfo( + public function cyclicReenrolmentReportsAsyncWithHttpInfo( string $employerId, - ?string $employeeId = null, - ?string $id = null, - ?\SynergiTech\Staffology\Model\Leave $leave = null, - string $contentType = self::contentTypes['downloadMaternitySchedulesReports'][0] + ?\DateTime $reenrolmentDate = null, + ?string $accept = null, + string $contentType = self::contentTypes['cyclicReenrolmentReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->downloadMaternitySchedulesReportsRequest($employerId, $employeeId, $id, $leave, $contentType); + $returnType = '\SynergiTech\Staffology\Model\CyclicReenrolmentReportReportResponse'; + $request = $this->cyclicReenrolmentReportsRequest($employerId, $reenrolmentDate, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6553,38 +5938,35 @@ function ($exception) { } /** - * Create request for operation 'downloadMaternitySchedulesReports' + * Create request for operation 'cyclicReenrolmentReports' * - * @param string $employerId (required) - * @param string|null $employeeId (optional) - * @param string|null $id (optional) - * @param \SynergiTech\Staffology\Model\Leave|null $leave (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadMaternitySchedulesReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param \DateTime|null $reenrolmentDate The re-enrolment date in the format YYYY-MM-DD. (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cyclicReenrolmentReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function downloadMaternitySchedulesReportsRequest( + public function cyclicReenrolmentReportsRequest( string $employerId, - ?string $employeeId = null, - ?string $id = null, - ?\SynergiTech\Staffology\Model\Leave $leave = null, - string $contentType = self::contentTypes['downloadMaternitySchedulesReports'][0] + ?\DateTime $reenrolmentDate = null, + ?string $accept = null, + string $contentType = self::contentTypes['cyclicReenrolmentReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling downloadMaternitySchedulesReports' + 'Missing the required parameter $employerId when calling cyclicReenrolmentReports' ); } - - $resourcePath = '/employers/{employerId}/reports/downloadmaternityschedules'; + $resourcePath = '/employers/{employerId}/reports/cyclicreenrolment'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6593,23 +5975,18 @@ public function downloadMaternitySchedulesReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $employeeId, - 'employeeId', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id, - 'id', // param base name + $reenrolmentDate, + 'reenrolmentDate', // param base name 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); + // header params + if ($accept !== null) { + $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); + } // path params if ($employerId !== null) { @@ -6622,20 +5999,13 @@ public function downloadMaternitySchedulesReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/pdf', 'application/json', 'text/html', 'application/octet-stream', ], + ['application/json', 'application/pdf', 'text/html', ], $contentType, $multipart ); // for model (json/xml) - if (isset($leave)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($leave)); - } else { - $httpBody = $leave; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -6686,51 +6056,56 @@ public function downloadMaternitySchedulesReportsRequest( } /** - * Operation emailP11DMultipleReports + * Operation downloadMaternitySchedulesReports * - * Email P11D to all Employees + * Download Maternity Payment Schedule * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) - * @param bool|null $excludeEmployeesWithP11DEmailSent Exclude Employees with Already Sent P11D Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DMultipleReports'] to see the possible values for this operation + * @param string $employerId employerId (required) + * @param string|null $employeeId employeeId (optional) + * @param string|null $id id (optional) + * @param \SynergiTech\Staffology\Model\Leave|null $leave leave (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadMaternitySchedulesReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void + * @return \SynergiTech\Staffology\Model\ReportResponse */ - public function emailP11DMultipleReports( + public function downloadMaternitySchedulesReports( string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $excludeEmployeesWithP11DEmailSent = false, - string $contentType = self::contentTypes['emailP11DMultipleReports'][0] - ): void + ?string $employeeId = null, + ?string $id = null, + ?\SynergiTech\Staffology\Model\Leave $leave = null, + string $contentType = self::contentTypes['downloadMaternitySchedulesReports'][0] + ): \SynergiTech\Staffology\Model\ReportResponse { - $this->emailP11DMultipleReportsWithHttpInfo($employerId, $taxYear, $excludeEmployeesWithP11DEmailSent, $contentType); + list($response) = $this->downloadMaternitySchedulesReportsWithHttpInfo($employerId, $employeeId, $id, $leave, $contentType); + return $response; } /** - * Operation emailP11DMultipleReportsWithHttpInfo + * Operation downloadMaternitySchedulesReportsWithHttpInfo * - * Email P11D to all Employees + * Download Maternity Payment Schedule * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) - * @param bool|null $excludeEmployeesWithP11DEmailSent Exclude Employees with Already Sent P11D Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DMultipleReports'] to see the possible values for this operation + * @param string $employerId (required) + * @param string|null $employeeId (optional) + * @param string|null $id (optional) + * @param \SynergiTech\Staffology\Model\Leave|null $leave (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadMaternitySchedulesReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function emailP11DMultipleReportsWithHttpInfo( + public function downloadMaternitySchedulesReportsWithHttpInfo( string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $excludeEmployeesWithP11DEmailSent = false, - string $contentType = self::contentTypes['emailP11DMultipleReports'][0] + ?string $employeeId = null, + ?string $id = null, + ?\SynergiTech\Staffology\Model\Leave $leave = null, + string $contentType = self::contentTypes['downloadMaternitySchedulesReports'][0] ): array { - $request = $this->emailP11DMultipleReportsRequest($employerId, $taxYear, $excludeEmployeesWithP11DEmailSent, $contentType); + $request = $this->downloadMaternitySchedulesReportsRequest($employerId, $employeeId, $id, $leave, $contentType); try { $options = $this->createHttpClientOption(); @@ -6754,37 +6129,73 @@ public function emailP11DMultipleReportsWithHttpInfo( $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); + } + - return [null, $statusCode, $response->getHeaders()]; + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ReportResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } /** - * Operation emailP11DMultipleReportsAsync + * Operation downloadMaternitySchedulesReportsAsync * - * Email P11D to all Employees + * Download Maternity Payment Schedule * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) - * @param bool|null $excludeEmployeesWithP11DEmailSent Exclude Employees with Already Sent P11D Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DMultipleReports'] to see the possible values for this operation + * @param string $employerId (required) + * @param string|null $employeeId (optional) + * @param string|null $id (optional) + * @param \SynergiTech\Staffology\Model\Leave|null $leave (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadMaternitySchedulesReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function emailP11DMultipleReportsAsync( + public function downloadMaternitySchedulesReportsAsync( string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $excludeEmployeesWithP11DEmailSent = false, - string $contentType = self::contentTypes['emailP11DMultipleReports'][0] + ?string $employeeId = null, + ?string $id = null, + ?\SynergiTech\Staffology\Model\Leave $leave = null, + string $contentType = self::contentTypes['downloadMaternitySchedulesReports'][0] ): PromiseInterface { - return $this->emailP11DMultipleReportsAsyncWithHttpInfo($employerId, $taxYear, $excludeEmployeesWithP11DEmailSent, $contentType) + return $this->downloadMaternitySchedulesReportsAsyncWithHttpInfo($employerId, $employeeId, $id, $leave, $contentType) ->then( function ($response) { return $response[0]; @@ -6793,33 +6204,48 @@ function ($response) { } /** - * Operation emailP11DMultipleReportsAsyncWithHttpInfo + * Operation downloadMaternitySchedulesReportsAsyncWithHttpInfo * - * Email P11D to all Employees + * Download Maternity Payment Schedule * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) - * @param bool|null $excludeEmployeesWithP11DEmailSent Exclude Employees with Already Sent P11D Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DMultipleReports'] to see the possible values for this operation + * @param string $employerId (required) + * @param string|null $employeeId (optional) + * @param string|null $id (optional) + * @param \SynergiTech\Staffology\Model\Leave|null $leave (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadMaternitySchedulesReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function emailP11DMultipleReportsAsyncWithHttpInfo( + public function downloadMaternitySchedulesReportsAsyncWithHttpInfo( string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $excludeEmployeesWithP11DEmailSent = false, - string $contentType = self::contentTypes['emailP11DMultipleReports'][0] + ?string $employeeId = null, + ?string $id = null, + ?\SynergiTech\Staffology\Model\Leave $leave = null, + string $contentType = self::contentTypes['downloadMaternitySchedulesReports'][0] ): PromiseInterface { - $returnType = ''; - $request = $this->emailP11DMultipleReportsRequest($employerId, $taxYear, $excludeEmployeesWithP11DEmailSent, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; + $request = $this->downloadMaternitySchedulesReportsRequest($employerId, $employeeId, $id, $leave, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -6839,35 +6265,38 @@ function ($exception) { } /** - * Create request for operation 'emailP11DMultipleReports' + * Create request for operation 'downloadMaternitySchedulesReports' * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) - * @param bool|null $excludeEmployeesWithP11DEmailSent Exclude Employees with Already Sent P11D Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DMultipleReports'] to see the possible values for this operation + * @param string $employerId (required) + * @param string|null $employeeId (optional) + * @param string|null $id (optional) + * @param \SynergiTech\Staffology\Model\Leave|null $leave (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadMaternitySchedulesReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function emailP11DMultipleReportsRequest( + public function downloadMaternitySchedulesReportsRequest( string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $excludeEmployeesWithP11DEmailSent = false, - string $contentType = self::contentTypes['emailP11DMultipleReports'][0] + ?string $employeeId = null, + ?string $id = null, + ?\SynergiTech\Staffology\Model\Leave $leave = null, + string $contentType = self::contentTypes['downloadMaternitySchedulesReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling emailP11DMultipleReports' + 'Missing the required parameter $employerId when calling downloadMaternitySchedulesReports' ); } - $resourcePath = '/employers/{employerId}/reports/p11d/email'; + + $resourcePath = '/employers/{employerId}/reports/downloadmaternityschedules'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6876,18 +6305,18 @@ public function emailP11DMultipleReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $taxYear?->value, - 'taxYear', // param base name - 'TaxYear', // openApiType + $employeeId, + 'employeeId', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $excludeEmployeesWithP11DEmailSent, - 'excludeEmployeesWithP11DEmailSent', // param base name - 'boolean', // openApiType + $id, + 'id', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -6905,13 +6334,20 @@ public function emailP11DMultipleReportsRequest( $headers = $this->headerSelector->selectHeaders( - [], + ['application/json', 'application/octet-stream', 'application/pdf', 'text/html', ], $contentType, $multipart ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($leave)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($leave)); + } else { + $httpBody = $leave; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -6954,7 +6390,7 @@ public function emailP11DMultipleReportsRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -6962,51 +6398,51 @@ public function emailP11DMultipleReportsRequest( } /** - * Operation emailP11DReports + * Operation emailP11DMultipleReports * - * Email P11D to an Employee + * Email P11D to all Employees * * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee you want the email a P11D to. (required) * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DReports'] to see the possible values for this operation + * @param bool|null $excludeEmployeesWithP11DEmailSent Exclude Employees with Already Sent P11D Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DMultipleReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function emailP11DReports( + public function emailP11DMultipleReports( string $employerId, - string $employeeId, ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - string $contentType = self::contentTypes['emailP11DReports'][0] + ?bool $excludeEmployeesWithP11DEmailSent = false, + string $contentType = self::contentTypes['emailP11DMultipleReports'][0] ): void { - $this->emailP11DReportsWithHttpInfo($employerId, $employeeId, $taxYear, $contentType); + $this->emailP11DMultipleReportsWithHttpInfo($employerId, $taxYear, $excludeEmployeesWithP11DEmailSent, $contentType); } /** - * Operation emailP11DReportsWithHttpInfo + * Operation emailP11DMultipleReportsWithHttpInfo * - * Email P11D to an Employee + * Email P11D to all Employees * * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee you want the email a P11D to. (required) * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DReports'] to see the possible values for this operation + * @param bool|null $excludeEmployeesWithP11DEmailSent Exclude Employees with Already Sent P11D Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DMultipleReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function emailP11DReportsWithHttpInfo( + public function emailP11DMultipleReportsWithHttpInfo( string $employerId, - string $employeeId, ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - string $contentType = self::contentTypes['emailP11DReports'][0] + ?bool $excludeEmployeesWithP11DEmailSent = false, + string $contentType = self::contentTypes['emailP11DMultipleReports'][0] ): array { - $request = $this->emailP11DReportsRequest($employerId, $employeeId, $taxYear, $contentType); + $request = $this->emailP11DMultipleReportsRequest($employerId, $taxYear, $excludeEmployeesWithP11DEmailSent, $contentType); try { $options = $this->createHttpClientOption(); @@ -7032,35 +6468,35 @@ public function emailP11DReportsWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation emailP11DReportsAsync + * Operation emailP11DMultipleReportsAsync * - * Email P11D to an Employee + * Email P11D to all Employees * * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee you want the email a P11D to. (required) * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DReports'] to see the possible values for this operation + * @param bool|null $excludeEmployeesWithP11DEmailSent Exclude Employees with Already Sent P11D Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DMultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function emailP11DReportsAsync( + public function emailP11DMultipleReportsAsync( string $employerId, - string $employeeId, ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - string $contentType = self::contentTypes['emailP11DReports'][0] + ?bool $excludeEmployeesWithP11DEmailSent = false, + string $contentType = self::contentTypes['emailP11DMultipleReports'][0] ): PromiseInterface { - return $this->emailP11DReportsAsyncWithHttpInfo($employerId, $employeeId, $taxYear, $contentType) + return $this->emailP11DMultipleReportsAsyncWithHttpInfo($employerId, $taxYear, $excludeEmployeesWithP11DEmailSent, $contentType) ->then( function ($response) { return $response[0]; @@ -7069,27 +6505,27 @@ function ($response) { } /** - * Operation emailP11DReportsAsyncWithHttpInfo + * Operation emailP11DMultipleReportsAsyncWithHttpInfo * - * Email P11D to an Employee + * Email P11D to all Employees * * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee you want the email a P11D to. (required) * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DReports'] to see the possible values for this operation + * @param bool|null $excludeEmployeesWithP11DEmailSent Exclude Employees with Already Sent P11D Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DMultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function emailP11DReportsAsyncWithHttpInfo( + public function emailP11DMultipleReportsAsyncWithHttpInfo( string $employerId, - string $employeeId, ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - string $contentType = self::contentTypes['emailP11DReports'][0] + ?bool $excludeEmployeesWithP11DEmailSent = false, + string $contentType = self::contentTypes['emailP11DMultipleReports'][0] ): PromiseInterface { $returnType = ''; - $request = $this->emailP11DReportsRequest($employerId, $employeeId, $taxYear, $contentType); + $request = $this->emailP11DMultipleReportsRequest($employerId, $taxYear, $excludeEmployeesWithP11DEmailSent, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7115,41 +6551,35 @@ function ($exception) { } /** - * Create request for operation 'emailP11DReports' + * Create request for operation 'emailP11DMultipleReports' * * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee you want the email a P11D to. (required) * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DReports'] to see the possible values for this operation + * @param bool|null $excludeEmployeesWithP11DEmailSent Exclude Employees with Already Sent P11D Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DMultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function emailP11DReportsRequest( + public function emailP11DMultipleReportsRequest( string $employerId, - string $employeeId, ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - string $contentType = self::contentTypes['emailP11DReports'][0] + ?bool $excludeEmployeesWithP11DEmailSent = false, + string $contentType = self::contentTypes['emailP11DMultipleReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling emailP11DReports' + 'Missing the required parameter $employerId when calling emailP11DMultipleReports' ); } - // verify the required parameter 'employeeId' is set - if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $employeeId when calling emailP11DReports' - ); - } - $resourcePath = '/employers/{employerId}/reports/p11d/email/{employeeId}'; + $resourcePath = '/employers/{employerId}/reports/p11d/email'; $formParams = []; $queryParams = []; $headerParams = []; @@ -7165,6 +6595,15 @@ public function emailP11DReportsRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $excludeEmployeesWithP11DEmailSent, + 'excludeEmployeesWithP11DEmailSent', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -7175,14 +6614,6 @@ public function emailP11DReportsRequest( $resourcePath ); } - // path params - if ($employeeId !== null) { - $resourcePath = str_replace( - '{' . 'employeeId' . '}', - ObjectSerializer::toPathValue($employeeId), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -7243,47 +6674,51 @@ public function emailP11DReportsRequest( } /** - * Operation emailP45Reports + * Operation emailP11DReports * - * Email P45 to Employee + * Email P11D to an Employee * * @param string $employerId The Id of the Employer. (required) - * @param string|null $employeeId The Id of the Employee you want the email a P45 to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45Reports'] to see the possible values for this operation + * @param string $employeeId The Id of the Employee you want the email a P11D to. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function emailP45Reports( + public function emailP11DReports( string $employerId, - ?string $employeeId = null, - string $contentType = self::contentTypes['emailP45Reports'][0] + string $employeeId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + string $contentType = self::contentTypes['emailP11DReports'][0] ): void { - $this->emailP45ReportsWithHttpInfo($employerId, $employeeId, $contentType); + $this->emailP11DReportsWithHttpInfo($employerId, $employeeId, $taxYear, $contentType); } /** - * Operation emailP45ReportsWithHttpInfo + * Operation emailP11DReportsWithHttpInfo * - * Email P45 to Employee + * Email P11D to an Employee * * @param string $employerId The Id of the Employer. (required) - * @param string|null $employeeId The Id of the Employee you want the email a P45 to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45Reports'] to see the possible values for this operation + * @param string $employeeId The Id of the Employee you want the email a P11D to. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function emailP45ReportsWithHttpInfo( + public function emailP11DReportsWithHttpInfo( string $employerId, - ?string $employeeId = null, - string $contentType = self::contentTypes['emailP45Reports'][0] + string $employeeId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + string $contentType = self::contentTypes['emailP11DReports'][0] ): array { - $request = $this->emailP45ReportsRequest($employerId, $employeeId, $contentType); + $request = $this->emailP11DReportsRequest($employerId, $employeeId, $taxYear, $contentType); try { $options = $this->createHttpClientOption(); @@ -7309,33 +6744,35 @@ public function emailP45ReportsWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation emailP45ReportsAsync + * Operation emailP11DReportsAsync * - * Email P45 to Employee + * Email P11D to an Employee * * @param string $employerId The Id of the Employer. (required) - * @param string|null $employeeId The Id of the Employee you want the email a P45 to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45Reports'] to see the possible values for this operation + * @param string $employeeId The Id of the Employee you want the email a P11D to. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function emailP45ReportsAsync( + public function emailP11DReportsAsync( string $employerId, - ?string $employeeId = null, - string $contentType = self::contentTypes['emailP45Reports'][0] + string $employeeId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + string $contentType = self::contentTypes['emailP11DReports'][0] ): PromiseInterface { - return $this->emailP45ReportsAsyncWithHttpInfo($employerId, $employeeId, $contentType) + return $this->emailP11DReportsAsyncWithHttpInfo($employerId, $employeeId, $taxYear, $contentType) ->then( function ($response) { return $response[0]; @@ -7344,25 +6781,27 @@ function ($response) { } /** - * Operation emailP45ReportsAsyncWithHttpInfo + * Operation emailP11DReportsAsyncWithHttpInfo * - * Email P45 to Employee + * Email P11D to an Employee * * @param string $employerId The Id of the Employer. (required) - * @param string|null $employeeId The Id of the Employee you want the email a P45 to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45Reports'] to see the possible values for this operation + * @param string $employeeId The Id of the Employee you want the email a P11D to. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function emailP45ReportsAsyncWithHttpInfo( + public function emailP11DReportsAsyncWithHttpInfo( string $employerId, - ?string $employeeId = null, - string $contentType = self::contentTypes['emailP45Reports'][0] + string $employeeId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + string $contentType = self::contentTypes['emailP11DReports'][0] ): PromiseInterface { $returnType = ''; - $request = $this->emailP45ReportsRequest($employerId, $employeeId, $contentType); + $request = $this->emailP11DReportsRequest($employerId, $employeeId, $taxYear, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7388,32 +6827,41 @@ function ($exception) { } /** - * Create request for operation 'emailP45Reports' + * Create request for operation 'emailP11DReports' * * @param string $employerId The Id of the Employer. (required) - * @param string|null $employeeId The Id of the Employee you want the email a P45 to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45Reports'] to see the possible values for this operation + * @param string $employeeId The Id of the Employee you want the email a P11D to. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P11Ds for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP11DReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function emailP45ReportsRequest( + public function emailP11DReportsRequest( string $employerId, - ?string $employeeId = null, - string $contentType = self::contentTypes['emailP45Reports'][0] + string $employeeId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + string $contentType = self::contentTypes['emailP11DReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling emailP45Reports' + 'Missing the required parameter $employerId when calling emailP11DReports' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling emailP11DReports' ); } - $resourcePath = '/employers/{employerId}/reports/p45/email'; + $resourcePath = '/employers/{employerId}/reports/p11d/email/{employeeId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -7422,9 +6870,9 @@ public function emailP45ReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $employeeId, - 'employeeId', // param base name - 'string', // openApiType + $taxYear?->value, + 'taxYear', // param base name + 'TaxYear', // openApiType 'form', // style true, // explode false // required @@ -7439,6 +6887,14 @@ public function emailP45ReportsRequest( $resourcePath ); } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -7499,51 +6955,55 @@ public function emailP45ReportsRequest( } /** - * Operation emailP60MultipleReports + * Operation emailP45MutlipleReports * - * Email P60 to all Employees + * Email P45 to multiple employees * * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) - * @param bool|null $excludeEmployeesWithP60EmailSent Exclude Employees with Already Sent P60 Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60MultipleReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The PayPeriod of the PayRun. (required) + * @param int $period The Period of the PayRun. (required) + * @param int $ordinal The Ordinal of the PayRun. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45MutlipleReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function emailP60MultipleReports( + public function emailP45MutlipleReports( string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $excludeEmployeesWithP60EmailSent = false, - string $contentType = self::contentTypes['emailP60MultipleReports'][0] + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $period, + int $ordinal, + string $contentType = self::contentTypes['emailP45MutlipleReports'][0] ): void { - $this->emailP60MultipleReportsWithHttpInfo($employerId, $taxYear, $excludeEmployeesWithP60EmailSent, $contentType); + $this->emailP45MutlipleReportsWithHttpInfo($employerId, $payPeriod, $period, $ordinal, $contentType); } /** - * Operation emailP60MultipleReportsWithHttpInfo + * Operation emailP45MutlipleReportsWithHttpInfo * - * Email P60 to all Employees + * Email P45 to multiple employees * * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) - * @param bool|null $excludeEmployeesWithP60EmailSent Exclude Employees with Already Sent P60 Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60MultipleReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The PayPeriod of the PayRun. (required) + * @param int $period The Period of the PayRun. (required) + * @param int $ordinal The Ordinal of the PayRun. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45MutlipleReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function emailP60MultipleReportsWithHttpInfo( + public function emailP45MutlipleReportsWithHttpInfo( string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $excludeEmployeesWithP60EmailSent = false, - string $contentType = self::contentTypes['emailP60MultipleReports'][0] + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $period, + int $ordinal, + string $contentType = self::contentTypes['emailP45MutlipleReports'][0] ): array { - $request = $this->emailP60MultipleReportsRequest($employerId, $taxYear, $excludeEmployeesWithP60EmailSent, $contentType); + $request = $this->emailP45MutlipleReportsRequest($employerId, $payPeriod, $period, $ordinal, $contentType); try { $options = $this->createHttpClientOption(); @@ -7569,35 +7029,37 @@ public function emailP60MultipleReportsWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation emailP60MultipleReportsAsync + * Operation emailP45MutlipleReportsAsync * - * Email P60 to all Employees + * Email P45 to multiple employees * * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) - * @param bool|null $excludeEmployeesWithP60EmailSent Exclude Employees with Already Sent P60 Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60MultipleReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The PayPeriod of the PayRun. (required) + * @param int $period The Period of the PayRun. (required) + * @param int $ordinal The Ordinal of the PayRun. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45MutlipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function emailP60MultipleReportsAsync( + public function emailP45MutlipleReportsAsync( string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $excludeEmployeesWithP60EmailSent = false, - string $contentType = self::contentTypes['emailP60MultipleReports'][0] + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $period, + int $ordinal, + string $contentType = self::contentTypes['emailP45MutlipleReports'][0] ): PromiseInterface { - return $this->emailP60MultipleReportsAsyncWithHttpInfo($employerId, $taxYear, $excludeEmployeesWithP60EmailSent, $contentType) + return $this->emailP45MutlipleReportsAsyncWithHttpInfo($employerId, $payPeriod, $period, $ordinal, $contentType) ->then( function ($response) { return $response[0]; @@ -7606,27 +7068,29 @@ function ($response) { } /** - * Operation emailP60MultipleReportsAsyncWithHttpInfo + * Operation emailP45MutlipleReportsAsyncWithHttpInfo * - * Email P60 to all Employees + * Email P45 to multiple employees * * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) - * @param bool|null $excludeEmployeesWithP60EmailSent Exclude Employees with Already Sent P60 Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60MultipleReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The PayPeriod of the PayRun. (required) + * @param int $period The Period of the PayRun. (required) + * @param int $ordinal The Ordinal of the PayRun. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45MutlipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function emailP60MultipleReportsAsyncWithHttpInfo( + public function emailP45MutlipleReportsAsyncWithHttpInfo( string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $excludeEmployeesWithP60EmailSent = false, - string $contentType = self::contentTypes['emailP60MultipleReports'][0] + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $period, + int $ordinal, + string $contentType = self::contentTypes['emailP45MutlipleReports'][0] ): PromiseInterface { $returnType = ''; - $request = $this->emailP60MultipleReportsRequest($employerId, $taxYear, $excludeEmployeesWithP60EmailSent, $contentType); + $request = $this->emailP45MutlipleReportsRequest($employerId, $payPeriod, $period, $ordinal, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7652,59 +7116,62 @@ function ($exception) { } /** - * Create request for operation 'emailP60MultipleReports' + * Create request for operation 'emailP45MutlipleReports' * * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) - * @param bool|null $excludeEmployeesWithP60EmailSent Exclude Employees with Already Sent P60 Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60MultipleReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The PayPeriod of the PayRun. (required) + * @param int $period The Period of the PayRun. (required) + * @param int $ordinal The Ordinal of the PayRun. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45MutlipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function emailP60MultipleReportsRequest( + public function emailP45MutlipleReportsRequest( string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $excludeEmployeesWithP60EmailSent = false, - string $contentType = self::contentTypes['emailP60MultipleReports'][0] + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $period, + int $ordinal, + string $contentType = self::contentTypes['emailP45MutlipleReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling emailP60MultipleReports' + 'Missing the required parameter $employerId when calling emailP45MutlipleReports' + ); + } + + // verify the required parameter 'payPeriod' is set + if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $payPeriod when calling emailP45MutlipleReports' ); } + // verify the required parameter 'period' is set + if ($period === null || (is_array($period) && count($period) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $period when calling emailP45MutlipleReports' + ); + } + // verify the required parameter 'ordinal' is set + if ($ordinal === null || (is_array($ordinal) && count($ordinal) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $ordinal when calling emailP45MutlipleReports' + ); + } - $resourcePath = '/employers/{employerId}/reports/p60/email'; + $resourcePath = '/employers/{employerId}/reports/{payPeriod}/{period}/{ordinal}/p45-email-multiple'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $taxYear?->value, - 'taxYear', // param base name - 'TaxYear', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $excludeEmployeesWithP60EmailSent, - 'excludeEmployeesWithP60EmailSent', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -7715,6 +7182,30 @@ public function emailP60MultipleReportsRequest( $resourcePath ); } + // path params + if ($payPeriod !== null) { + $resourcePath = str_replace( + '{' . 'payPeriod' . '}', + ObjectSerializer::toPathValue($payPeriod->value), + $resourcePath + ); + } + // path params + if ($period !== null) { + $resourcePath = str_replace( + '{' . 'period' . '}', + ObjectSerializer::toPathValue($period), + $resourcePath + ); + } + // path params + if ($ordinal !== null) { + $resourcePath = str_replace( + '{' . 'ordinal' . '}', + ObjectSerializer::toPathValue($ordinal), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -7775,51 +7266,47 @@ public function emailP60MultipleReportsRequest( } /** - * Operation emailP60Reports + * Operation emailP45Reports * - * Email P60 to an Employee + * Email P45 to Employee * * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee you want the email a P60 to. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60Reports'] to see the possible values for this operation + * @param string|null $employeeId The Id of the Employee you want the email a P45 to. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45Reports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function emailP60Reports( + public function emailP45Reports( string $employerId, - string $employeeId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - string $contentType = self::contentTypes['emailP60Reports'][0] + ?string $employeeId = null, + string $contentType = self::contentTypes['emailP45Reports'][0] ): void { - $this->emailP60ReportsWithHttpInfo($employerId, $employeeId, $taxYear, $contentType); + $this->emailP45ReportsWithHttpInfo($employerId, $employeeId, $contentType); } /** - * Operation emailP60ReportsWithHttpInfo + * Operation emailP45ReportsWithHttpInfo * - * Email P60 to an Employee + * Email P45 to Employee * * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee you want the email a P60 to. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60Reports'] to see the possible values for this operation + * @param string|null $employeeId The Id of the Employee you want the email a P45 to. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45Reports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function emailP60ReportsWithHttpInfo( + public function emailP45ReportsWithHttpInfo( string $employerId, - string $employeeId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - string $contentType = self::contentTypes['emailP60Reports'][0] + ?string $employeeId = null, + string $contentType = self::contentTypes['emailP45Reports'][0] ): array { - $request = $this->emailP60ReportsRequest($employerId, $employeeId, $taxYear, $contentType); + $request = $this->emailP45ReportsRequest($employerId, $employeeId, $contentType); try { $options = $this->createHttpClientOption(); @@ -7845,35 +7332,33 @@ public function emailP60ReportsWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation emailP60ReportsAsync + * Operation emailP45ReportsAsync * - * Email P60 to an Employee + * Email P45 to Employee * * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee you want the email a P60 to. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60Reports'] to see the possible values for this operation - * + * @param string|null $employeeId The Id of the Employee you want the email a P45 to. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45Reports'] to see the possible values for this operation + * * @throws InvalidArgumentException * @return PromiseInterface */ - public function emailP60ReportsAsync( + public function emailP45ReportsAsync( string $employerId, - string $employeeId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - string $contentType = self::contentTypes['emailP60Reports'][0] + ?string $employeeId = null, + string $contentType = self::contentTypes['emailP45Reports'][0] ): PromiseInterface { - return $this->emailP60ReportsAsyncWithHttpInfo($employerId, $employeeId, $taxYear, $contentType) + return $this->emailP45ReportsAsyncWithHttpInfo($employerId, $employeeId, $contentType) ->then( function ($response) { return $response[0]; @@ -7882,27 +7367,25 @@ function ($response) { } /** - * Operation emailP60ReportsAsyncWithHttpInfo + * Operation emailP45ReportsAsyncWithHttpInfo * - * Email P60 to an Employee + * Email P45 to Employee * * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee you want the email a P60 to. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60Reports'] to see the possible values for this operation + * @param string|null $employeeId The Id of the Employee you want the email a P45 to. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45Reports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function emailP60ReportsAsyncWithHttpInfo( + public function emailP45ReportsAsyncWithHttpInfo( string $employerId, - string $employeeId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - string $contentType = self::contentTypes['emailP60Reports'][0] + ?string $employeeId = null, + string $contentType = self::contentTypes['emailP45Reports'][0] ): PromiseInterface { $returnType = ''; - $request = $this->emailP60ReportsRequest($employerId, $employeeId, $taxYear, $contentType); + $request = $this->emailP45ReportsRequest($employerId, $employeeId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7928,41 +7411,32 @@ function ($exception) { } /** - * Create request for operation 'emailP60Reports' + * Create request for operation 'emailP45Reports' * * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee you want the email a P60 to. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60Reports'] to see the possible values for this operation + * @param string|null $employeeId The Id of the Employee you want the email a P45 to. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP45Reports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function emailP60ReportsRequest( + public function emailP45ReportsRequest( string $employerId, - string $employeeId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - string $contentType = self::contentTypes['emailP60Reports'][0] + ?string $employeeId = null, + string $contentType = self::contentTypes['emailP45Reports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling emailP60Reports' - ); - } - - // verify the required parameter 'employeeId' is set - if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $employeeId when calling emailP60Reports' + 'Missing the required parameter $employerId when calling emailP45Reports' ); } - $resourcePath = '/employers/{employerId}/reports/p60/email/{employeeId}'; + $resourcePath = '/employers/{employerId}/reports/p45/email'; $formParams = []; $queryParams = []; $headerParams = []; @@ -7971,9 +7445,9 @@ public function emailP60ReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $taxYear?->value, - 'taxYear', // param base name - 'TaxYear', // openApiType + $employeeId, + 'employeeId', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -7988,14 +7462,6 @@ public function emailP60ReportsRequest( $resourcePath ); } - // path params - if ($employeeId !== null) { - $resourcePath = str_replace( - '{' . 'employeeId' . '}', - ObjectSerializer::toPathValue($employeeId), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -8056,56 +7522,51 @@ public function emailP60ReportsRequest( } /** - * Operation employeeBenefitsReports + * Operation emailP60MultipleReports * - * Employee Benefits + * Email P60 to all Employees * - * @param string $employerId employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) - * @param string|null $reportType reportType (optional) - * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeBenefitsReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) + * @param bool|null $excludeEmployeesWithP60EmailSent Exclude Employees with Already Sent P60 Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60MultipleReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse + * @return void */ - public function employeeBenefitsReports( + public function emailP60MultipleReports( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?string $reportType = null, - ?string $accept = null, - string $contentType = self::contentTypes['employeeBenefitsReports'][0] - ): \SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?bool $excludeEmployeesWithP60EmailSent = false, + string $contentType = self::contentTypes['emailP60MultipleReports'][0] + ): void { - list($response) = $this->employeeBenefitsReportsWithHttpInfo($employerId, $taxYear, $reportType, $accept, $contentType); - return $response; + $this->emailP60MultipleReportsWithHttpInfo($employerId, $taxYear, $excludeEmployeesWithP60EmailSent, $contentType); } /** - * Operation employeeBenefitsReportsWithHttpInfo + * Operation emailP60MultipleReportsWithHttpInfo * - * Employee Benefits + * Email P60 to all Employees * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string|null $reportType (optional) - * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeBenefitsReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) + * @param bool|null $excludeEmployeesWithP60EmailSent Exclude Employees with Already Sent P60 Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60MultipleReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function employeeBenefitsReportsWithHttpInfo( + public function emailP60MultipleReportsWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?string $reportType = null, - ?string $accept = null, - string $contentType = self::contentTypes['employeeBenefitsReports'][0] + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?bool $excludeEmployeesWithP60EmailSent = false, + string $contentType = self::contentTypes['emailP60MultipleReports'][0] ): array { - $request = $this->employeeBenefitsReportsRequest($employerId, $taxYear, $reportType, $accept, $contentType); + $request = $this->emailP60MultipleReportsRequest($employerId, $taxYear, $excludeEmployeesWithP60EmailSent, $contentType); try { $options = $this->createHttpClientOption(); @@ -8130,115 +7591,36 @@ public function employeeBenefitsReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - $returnType = '\SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } + throw $e; } } /** - * Operation employeeBenefitsReportsAsync + * Operation emailP60MultipleReportsAsync * - * Employee Benefits + * Email P60 to all Employees * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string|null $reportType (optional) - * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeBenefitsReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) + * @param bool|null $excludeEmployeesWithP60EmailSent Exclude Employees with Already Sent P60 Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60MultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employeeBenefitsReportsAsync( + public function emailP60MultipleReportsAsync( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?string $reportType = null, - ?string $accept = null, - string $contentType = self::contentTypes['employeeBenefitsReports'][0] + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?bool $excludeEmployeesWithP60EmailSent = false, + string $contentType = self::contentTypes['emailP60MultipleReports'][0] ): PromiseInterface { - return $this->employeeBenefitsReportsAsyncWithHttpInfo($employerId, $taxYear, $reportType, $accept, $contentType) + return $this->emailP60MultipleReportsAsyncWithHttpInfo($employerId, $taxYear, $excludeEmployeesWithP60EmailSent, $contentType) ->then( function ($response) { return $response[0]; @@ -8247,48 +7629,33 @@ function ($response) { } /** - * Operation employeeBenefitsReportsAsyncWithHttpInfo + * Operation emailP60MultipleReportsAsyncWithHttpInfo * - * Employee Benefits + * Email P60 to all Employees * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string|null $reportType (optional) - * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeBenefitsReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) + * @param bool|null $excludeEmployeesWithP60EmailSent Exclude Employees with Already Sent P60 Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60MultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employeeBenefitsReportsAsyncWithHttpInfo( + public function emailP60MultipleReportsAsyncWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?string $reportType = null, - ?string $accept = null, - string $contentType = self::contentTypes['employeeBenefitsReports'][0] + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?bool $excludeEmployeesWithP60EmailSent = false, + string $contentType = self::contentTypes['emailP60MultipleReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse'; - $request = $this->employeeBenefitsReportsRequest($employerId, $taxYear, $reportType, $accept, $contentType); + $returnType = ''; + $request = $this->emailP60MultipleReportsRequest($employerId, $taxYear, $excludeEmployeesWithP60EmailSent, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -8308,36 +7675,649 @@ function ($exception) { } /** - * Create request for operation 'employeeBenefitsReports' + * Create request for operation 'emailP60MultipleReports' * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string|null $reportType (optional) - * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeBenefitsReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) + * @param bool|null $excludeEmployeesWithP60EmailSent Exclude Employees with Already Sent P60 Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60MultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function employeeBenefitsReportsRequest( + public function emailP60MultipleReportsRequest( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?string $reportType = null, - ?string $accept = null, - string $contentType = self::contentTypes['employeeBenefitsReports'][0] + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?bool $excludeEmployeesWithP60EmailSent = false, + string $contentType = self::contentTypes['emailP60MultipleReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling employeeBenefitsReports' + 'Missing the required parameter $employerId when calling emailP60MultipleReports' ); } - // verify the required parameter 'taxYear' is set - if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { - throw new InvalidArgumentException( + + + + $resourcePath = '/employers/{employerId}/reports/p60/email'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $taxYear?->value, + 'taxYear', // param base name + 'TaxYear', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $excludeEmployeesWithP60EmailSent, + 'excludeEmployeesWithP60EmailSent', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation emailP60Reports + * + * Email P60 to an Employee + * + * @param string $employerId The Id of the Employer. (required) + * @param string $employeeId The Id of the Employee you want the email a P60 to. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60Reports'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return void + */ + public function emailP60Reports( + string $employerId, + string $employeeId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + string $contentType = self::contentTypes['emailP60Reports'][0] + ): void + { + $this->emailP60ReportsWithHttpInfo($employerId, $employeeId, $taxYear, $contentType); + } + + /** + * Operation emailP60ReportsWithHttpInfo + * + * Email P60 to an Employee + * + * @param string $employerId The Id of the Employer. (required) + * @param string $employeeId The Id of the Employee you want the email a P60 to. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60Reports'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function emailP60ReportsWithHttpInfo( + string $employerId, + string $employeeId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + string $contentType = self::contentTypes['emailP60Reports'][0] + ): array + { + $request = $this->emailP60ReportsRequest($employerId, $employeeId, $taxYear, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + } + + throw $e; + } + } + + /** + * Operation emailP60ReportsAsync + * + * Email P60 to an Employee + * + * @param string $employerId The Id of the Employer. (required) + * @param string $employeeId The Id of the Employee you want the email a P60 to. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60Reports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function emailP60ReportsAsync( + string $employerId, + string $employeeId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + string $contentType = self::contentTypes['emailP60Reports'][0] + ): PromiseInterface + { + return $this->emailP60ReportsAsyncWithHttpInfo($employerId, $employeeId, $taxYear, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation emailP60ReportsAsyncWithHttpInfo + * + * Email P60 to an Employee + * + * @param string $employerId The Id of the Employer. (required) + * @param string $employeeId The Id of the Employee you want the email a P60 to. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60Reports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function emailP60ReportsAsyncWithHttpInfo( + string $employerId, + string $employeeId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + string $contentType = self::contentTypes['emailP60Reports'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->emailP60ReportsRequest($employerId, $employeeId, $taxYear, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'emailP60Reports' + * + * @param string $employerId The Id of the Employer. (required) + * @param string $employeeId The Id of the Employee you want the email a P60 to. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear The TaxYear you want P60s for. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['emailP60Reports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function emailP60ReportsRequest( + string $employerId, + string $employeeId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + string $contentType = self::contentTypes['emailP60Reports'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling emailP60Reports' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling emailP60Reports' + ); + } + + + + $resourcePath = '/employers/{employerId}/reports/p60/email/{employeeId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $taxYear?->value, + 'taxYear', // param base name + 'TaxYear', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation employeeBenefitsReports + * + * Employee Benefits + * + * @param string $employerId employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) + * @param string|null $reportType reportType (optional) + * @param string|null $accept accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeBenefitsReports'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse + */ + public function employeeBenefitsReports( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?string $reportType = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeBenefitsReports'][0] + ): \SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse + { + list($response) = $this->employeeBenefitsReportsWithHttpInfo($employerId, $taxYear, $reportType, $accept, $contentType); + return $response; + } + + /** + * Operation employeeBenefitsReportsWithHttpInfo + * + * Employee Benefits + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string|null $reportType (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeBenefitsReports'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function employeeBenefitsReportsWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?string $reportType = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeBenefitsReports'][0] + ): array + { + $request = $this->employeeBenefitsReportsRequest($employerId, $taxYear, $reportType, $accept, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation employeeBenefitsReportsAsync + * + * Employee Benefits + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string|null $reportType (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeBenefitsReports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function employeeBenefitsReportsAsync( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?string $reportType = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeBenefitsReports'][0] + ): PromiseInterface + { + return $this->employeeBenefitsReportsAsyncWithHttpInfo($employerId, $taxYear, $reportType, $accept, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation employeeBenefitsReportsAsyncWithHttpInfo + * + * Employee Benefits + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string|null $reportType (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeBenefitsReports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function employeeBenefitsReportsAsyncWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?string $reportType = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeBenefitsReports'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\EmployeeBenefitsReportReportResponse'; + $request = $this->employeeBenefitsReportsRequest($employerId, $taxYear, $reportType, $accept, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'employeeBenefitsReports' + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string|null $reportType (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeBenefitsReports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function employeeBenefitsReportsRequest( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?string $reportType = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeBenefitsReports'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling employeeBenefitsReports' + ); + } + + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( 'Missing the required parameter $taxYear when calling employeeBenefitsReports' ); } @@ -8345,7 +8325,1084 @@ public function employeeBenefitsReportsRequest( - $resourcePath = '/employers/{employerId}/reports/{taxYear}/EmployeeBenefits'; + $resourcePath = '/employers/{employerId}/reports/{taxYear}/EmployeeBenefits'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $reportType, + 'reportType', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + // header params + if ($accept !== null) { + $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); + } + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/csv', 'text/html', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation employeeExportReports + * + * Employee Export Details + * + * @param string|null $employerId employerId (optional) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear (optional) + * @param bool|null $includeBankAccountDetails includeBankAccountDetails (optional) + * @param bool|null $includeYtd includeYtd (optional) + * @param bool|null $incPensionInfo incPensionInfo (optional) + * @param bool|null $includePayInfo includePayInfo (optional) + * @param bool|null $includeNotes includeNotes (optional) + * @param string|null $accept accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeExportReports'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\ReportResponse + */ + public function employeeExportReports( + ?string $employerId = null, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?bool $includeBankAccountDetails = null, + ?bool $includeYtd = null, + ?bool $incPensionInfo = null, + ?bool $includePayInfo = null, + ?bool $includeNotes = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeExportReports'][0] + ): \SynergiTech\Staffology\Model\ReportResponse + { + list($response) = $this->employeeExportReportsWithHttpInfo($employerId, $taxYear, $includeBankAccountDetails, $includeYtd, $incPensionInfo, $includePayInfo, $includeNotes, $accept, $contentType); + return $response; + } + + /** + * Operation employeeExportReportsWithHttpInfo + * + * Employee Export Details + * + * @param string|null $employerId (optional) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) + * @param bool|null $includeBankAccountDetails (optional) + * @param bool|null $includeYtd (optional) + * @param bool|null $incPensionInfo (optional) + * @param bool|null $includePayInfo (optional) + * @param bool|null $includeNotes (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeExportReports'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function employeeExportReportsWithHttpInfo( + ?string $employerId = null, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?bool $includeBankAccountDetails = null, + ?bool $includeYtd = null, + ?bool $incPensionInfo = null, + ?bool $includePayInfo = null, + ?bool $includeNotes = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeExportReports'][0] + ): array + { + $request = $this->employeeExportReportsRequest($employerId, $taxYear, $includeBankAccountDetails, $includeYtd, $incPensionInfo, $includePayInfo, $includeNotes, $accept, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ReportResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation employeeExportReportsAsync + * + * Employee Export Details + * + * @param string|null $employerId (optional) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) + * @param bool|null $includeBankAccountDetails (optional) + * @param bool|null $includeYtd (optional) + * @param bool|null $incPensionInfo (optional) + * @param bool|null $includePayInfo (optional) + * @param bool|null $includeNotes (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeExportReports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function employeeExportReportsAsync( + ?string $employerId = null, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?bool $includeBankAccountDetails = null, + ?bool $includeYtd = null, + ?bool $incPensionInfo = null, + ?bool $includePayInfo = null, + ?bool $includeNotes = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeExportReports'][0] + ): PromiseInterface + { + return $this->employeeExportReportsAsyncWithHttpInfo($employerId, $taxYear, $includeBankAccountDetails, $includeYtd, $incPensionInfo, $includePayInfo, $includeNotes, $accept, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation employeeExportReportsAsyncWithHttpInfo + * + * Employee Export Details + * + * @param string|null $employerId (optional) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) + * @param bool|null $includeBankAccountDetails (optional) + * @param bool|null $includeYtd (optional) + * @param bool|null $incPensionInfo (optional) + * @param bool|null $includePayInfo (optional) + * @param bool|null $includeNotes (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeExportReports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function employeeExportReportsAsyncWithHttpInfo( + ?string $employerId = null, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?bool $includeBankAccountDetails = null, + ?bool $includeYtd = null, + ?bool $incPensionInfo = null, + ?bool $includePayInfo = null, + ?bool $includeNotes = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeExportReports'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; + $request = $this->employeeExportReportsRequest($employerId, $taxYear, $includeBankAccountDetails, $includeYtd, $incPensionInfo, $includePayInfo, $includeNotes, $accept, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'employeeExportReports' + * + * @param string|null $employerId (optional) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) + * @param bool|null $includeBankAccountDetails (optional) + * @param bool|null $includeYtd (optional) + * @param bool|null $incPensionInfo (optional) + * @param bool|null $includePayInfo (optional) + * @param bool|null $includeNotes (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeExportReports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function employeeExportReportsRequest( + ?string $employerId = null, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?bool $includeBankAccountDetails = null, + ?bool $includeYtd = null, + ?bool $incPensionInfo = null, + ?bool $includePayInfo = null, + ?bool $includeNotes = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeExportReports'][0] + ): Request + { + + + + + + + + + + + $resourcePath = '/employees'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $employerId, + 'employerId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $taxYear?->value, + 'taxYear', // param base name + 'TaxYear', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $includeBankAccountDetails, + 'includeBankAccountDetails', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $includeYtd, + 'includeYtd', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $incPensionInfo, + 'incPensionInfo', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $includePayInfo, + 'includePayInfo', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $includeNotes, + 'includeNotes', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + // header params + if ($accept !== null) { + $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); + } + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/csv', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation employeeLeaveReports + * + * Employee Leave + * + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear (optional) + * @param string|null $accept accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLeaveReports'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse + */ + public function employeeLeaveReports( + string $employerId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeLeaveReports'][0] + ): \SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse + { + list($response) = $this->employeeLeaveReportsWithHttpInfo($employerId, $taxYear, $accept, $contentType); + return $response; + } + + /** + * Operation employeeLeaveReportsWithHttpInfo + * + * Employee Leave + * + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLeaveReports'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function employeeLeaveReportsWithHttpInfo( + string $employerId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeLeaveReports'][0] + ): array + { + $request = $this->employeeLeaveReportsRequest($employerId, $taxYear, $accept, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation employeeLeaveReportsAsync + * + * Employee Leave + * + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLeaveReports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function employeeLeaveReportsAsync( + string $employerId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeLeaveReports'][0] + ): PromiseInterface + { + return $this->employeeLeaveReportsAsyncWithHttpInfo($employerId, $taxYear, $accept, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation employeeLeaveReportsAsyncWithHttpInfo + * + * Employee Leave + * + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLeaveReports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function employeeLeaveReportsAsyncWithHttpInfo( + string $employerId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeLeaveReports'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse'; + $request = $this->employeeLeaveReportsRequest($employerId, $taxYear, $accept, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'employeeLeaveReports' + * + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLeaveReports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function employeeLeaveReportsRequest( + string $employerId, + ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + ?string $accept = null, + string $contentType = self::contentTypes['employeeLeaveReports'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling employeeLeaveReports' + ); + } + + + + + $resourcePath = '/employers/{employerId}/reports/employeeleave'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $taxYear?->value, + 'taxYear', // param base name + 'TaxYear', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + // header params + if ($accept !== null) { + $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); + } + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/csv', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation employeeLoanExportReports + * + * Employee Loan Export + * + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) + * @param string|null $accept accept (optional) + * @param int|null $ordinal ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLoanExportReports'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\EmployeeLoanExportReportReportResponse + */ + public function employeeLoanExportReports( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?string $accept = null, + ?int $ordinal = 1, + string $contentType = self::contentTypes['employeeLoanExportReports'][0] + ): \SynergiTech\Staffology\Model\EmployeeLoanExportReportReportResponse + { + list($response) = $this->employeeLoanExportReportsWithHttpInfo($employerId, $payPeriod, $accept, $ordinal, $contentType); + return $response; + } + + /** + * Operation employeeLoanExportReportsWithHttpInfo + * + * Employee Loan Export + * + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param string|null $accept (optional) + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLoanExportReports'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\EmployeeLoanExportReportReportResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function employeeLoanExportReportsWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?string $accept = null, + ?int $ordinal = 1, + string $contentType = self::contentTypes['employeeLoanExportReports'][0] + ): array + { + $request = $this->employeeLoanExportReportsRequest($employerId, $payPeriod, $accept, $ordinal, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeLoanExportReportReportResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeeLoanExportReportReportResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\EmployeeLoanExportReportReportResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation employeeLoanExportReportsAsync + * + * Employee Loan Export + * + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param string|null $accept (optional) + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLoanExportReports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function employeeLoanExportReportsAsync( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?string $accept = null, + ?int $ordinal = 1, + string $contentType = self::contentTypes['employeeLoanExportReports'][0] + ): PromiseInterface + { + return $this->employeeLoanExportReportsAsyncWithHttpInfo($employerId, $payPeriod, $accept, $ordinal, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation employeeLoanExportReportsAsyncWithHttpInfo + * + * Employee Loan Export + * + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param string|null $accept (optional) + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLoanExportReports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function employeeLoanExportReportsAsyncWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?string $accept = null, + ?int $ordinal = 1, + string $contentType = self::contentTypes['employeeLoanExportReports'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\EmployeeLoanExportReportReportResponse'; + $request = $this->employeeLoanExportReportsRequest($employerId, $payPeriod, $accept, $ordinal, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'employeeLoanExportReports' + * + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param string|null $accept (optional) + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLoanExportReports'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function employeeLoanExportReportsRequest( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?string $accept = null, + ?int $ordinal = 1, + string $contentType = self::contentTypes['employeeLoanExportReports'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling employeeLoanExportReports' + ); + } + + // verify the required parameter 'payPeriod' is set + if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $payPeriod when calling employeeLoanExportReports' + ); + } + + + + + $resourcePath = '/employers/{employerId}/reports/{payPeriod}/employeeloanexport'; $formParams = []; $queryParams = []; $headerParams = []; @@ -8354,9 +9411,9 @@ public function employeeBenefitsReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $reportType, - 'reportType', // param base name - 'string', // openApiType + $ordinal, + 'ordinal', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required @@ -8376,17 +9433,17 @@ public function employeeBenefitsReportsRequest( ); } // path params - if ($taxYear !== null) { + if ($payPeriod !== null) { $resourcePath = str_replace( - '{' . 'taxYear' . '}', - ObjectSerializer::toPathValue($taxYear->value), + '{' . 'payPeriod' . '}', + ObjectSerializer::toPathValue($payPeriod->value), $resourcePath ); } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', ], + ['application/json', 'text/csv', ], $contentType, $multipart ); @@ -8443,72 +9500,56 @@ public function employeeBenefitsReportsRequest( } /** - * Operation employeeExportReports + * Operation employeePaymentsReportReports * - * Employee Export Details + * Employee Payments Report * - * @param string|null $employerId employerId (optional) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear (optional) - * @param bool|null $includeBankAccountDetails includeBankAccountDetails (optional) - * @param bool|null $includeYtd includeYtd (optional) - * @param bool|null $incPensionInfo incPensionInfo (optional) - * @param bool|null $includePayInfo includePayInfo (optional) - * @param bool|null $includeNotes includeNotes (optional) + * @param string $employerId employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeExportReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest|null $contractEmployeePaymentsReportRequest contractEmployeePaymentsReportRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeePaymentsReportReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ReportResponse + * @return \SynergiTech\Staffology\Model\EmployeePaymentsReportLineListReportResponse */ - public function employeeExportReports( - ?string $employerId = null, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $includeBankAccountDetails = null, - ?bool $includeYtd = null, - ?bool $incPensionInfo = null, - ?bool $includePayInfo = null, - ?bool $includeNotes = null, + public function employeePaymentsReportReports( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, ?string $accept = null, - string $contentType = self::contentTypes['employeeExportReports'][0] - ): \SynergiTech\Staffology\Model\ReportResponse + ?\SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest $contractEmployeePaymentsReportRequest = null, + string $contentType = self::contentTypes['employeePaymentsReportReports'][0] + ): \SynergiTech\Staffology\Model\EmployeePaymentsReportLineListReportResponse { - list($response) = $this->employeeExportReportsWithHttpInfo($employerId, $taxYear, $includeBankAccountDetails, $includeYtd, $incPensionInfo, $includePayInfo, $includeNotes, $accept, $contentType); + list($response) = $this->employeePaymentsReportReportsWithHttpInfo($employerId, $payPeriod, $accept, $contractEmployeePaymentsReportRequest, $contentType); return $response; } /** - * Operation employeeExportReportsWithHttpInfo + * Operation employeePaymentsReportReportsWithHttpInfo * - * Employee Export Details + * Employee Payments Report * - * @param string|null $employerId (optional) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) - * @param bool|null $includeBankAccountDetails (optional) - * @param bool|null $includeYtd (optional) - * @param bool|null $incPensionInfo (optional) - * @param bool|null $includePayInfo (optional) - * @param bool|null $includeNotes (optional) + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeExportReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest|null $contractEmployeePaymentsReportRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeePaymentsReportReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\EmployeePaymentsReportLineListReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function employeeExportReportsWithHttpInfo( - ?string $employerId = null, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $includeBankAccountDetails = null, - ?bool $includeYtd = null, - ?bool $incPensionInfo = null, - ?bool $includePayInfo = null, - ?bool $includeNotes = null, + public function employeePaymentsReportReportsWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, ?string $accept = null, - string $contentType = self::contentTypes['employeeExportReports'][0] + ?\SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest $contractEmployeePaymentsReportRequest = null, + string $contentType = self::contentTypes['employeePaymentsReportReports'][0] ): array { - $request = $this->employeeExportReportsRequest($employerId, $taxYear, $includeBankAccountDetails, $includeYtd, $incPensionInfo, $includePayInfo, $includeNotes, $accept, $contentType); + $request = $this->employeePaymentsReportReportsRequest($employerId, $payPeriod, $accept, $contractEmployeePaymentsReportRequest, $contentType); try { $options = $this->createHttpClientOption(); @@ -8532,36 +9573,15 @@ public function employeeExportReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeePaymentsReportLineListReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8576,80 +9596,50 @@ public function employeeExportReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployeePaymentsReportLineListReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ReportResponse', + '\SynergiTech\Staffology\Model\EmployeePaymentsReportLineListReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation employeeExportReportsAsync + * Operation employeePaymentsReportReportsAsync * - * Employee Export Details + * Employee Payments Report * - * @param string|null $employerId (optional) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) - * @param bool|null $includeBankAccountDetails (optional) - * @param bool|null $includeYtd (optional) - * @param bool|null $incPensionInfo (optional) - * @param bool|null $includePayInfo (optional) - * @param bool|null $includeNotes (optional) + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeExportReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest|null $contractEmployeePaymentsReportRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeePaymentsReportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employeeExportReportsAsync( - ?string $employerId = null, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $includeBankAccountDetails = null, - ?bool $includeYtd = null, - ?bool $incPensionInfo = null, - ?bool $includePayInfo = null, - ?bool $includeNotes = null, + public function employeePaymentsReportReportsAsync( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, ?string $accept = null, - string $contentType = self::contentTypes['employeeExportReports'][0] + ?\SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest $contractEmployeePaymentsReportRequest = null, + string $contentType = self::contentTypes['employeePaymentsReportReports'][0] ): PromiseInterface { - return $this->employeeExportReportsAsyncWithHttpInfo($employerId, $taxYear, $includeBankAccountDetails, $includeYtd, $incPensionInfo, $includePayInfo, $includeNotes, $accept, $contentType) + return $this->employeePaymentsReportReportsAsyncWithHttpInfo($employerId, $payPeriod, $accept, $contractEmployeePaymentsReportRequest, $contentType) ->then( function ($response) { return $response[0]; @@ -8658,37 +9648,29 @@ function ($response) { } /** - * Operation employeeExportReportsAsyncWithHttpInfo + * Operation employeePaymentsReportReportsAsyncWithHttpInfo * - * Employee Export Details + * Employee Payments Report * - * @param string|null $employerId (optional) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) - * @param bool|null $includeBankAccountDetails (optional) - * @param bool|null $includeYtd (optional) - * @param bool|null $incPensionInfo (optional) - * @param bool|null $includePayInfo (optional) - * @param bool|null $includeNotes (optional) + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeExportReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest|null $contractEmployeePaymentsReportRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeePaymentsReportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employeeExportReportsAsyncWithHttpInfo( - ?string $employerId = null, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $includeBankAccountDetails = null, - ?bool $includeYtd = null, - ?bool $incPensionInfo = null, - ?bool $includePayInfo = null, - ?bool $includeNotes = null, + public function employeePaymentsReportReportsAsyncWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, ?string $accept = null, - string $contentType = self::contentTypes['employeeExportReports'][0] + ?\SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest $contractEmployeePaymentsReportRequest = null, + string $contentType = self::contentTypes['employeePaymentsReportReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->employeeExportReportsRequest($employerId, $taxYear, $includeBankAccountDetails, $includeYtd, $incPensionInfo, $includePayInfo, $includeNotes, $accept, $contentType); + $returnType = '\SynergiTech\Staffology\Model\EmployeePaymentsReportLineListReportResponse'; + $request = $this->employeePaymentsReportReportsRequest($employerId, $payPeriod, $accept, $contractEmployeePaymentsReportRequest, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8727,119 +9709,72 @@ function ($exception) { } /** - * Create request for operation 'employeeExportReports' + * Create request for operation 'employeePaymentsReportReports' * - * @param string|null $employerId (optional) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) - * @param bool|null $includeBankAccountDetails (optional) - * @param bool|null $includeYtd (optional) - * @param bool|null $incPensionInfo (optional) - * @param bool|null $includePayInfo (optional) - * @param bool|null $includeNotes (optional) + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeExportReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest|null $contractEmployeePaymentsReportRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeePaymentsReportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function employeeExportReportsRequest( - ?string $employerId = null, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, - ?bool $includeBankAccountDetails = null, - ?bool $includeYtd = null, - ?bool $incPensionInfo = null, - ?bool $includePayInfo = null, - ?bool $includeNotes = null, + public function employeePaymentsReportReportsRequest( + string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, ?string $accept = null, - string $contentType = self::contentTypes['employeeExportReports'][0] + ?\SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest $contractEmployeePaymentsReportRequest = null, + string $contentType = self::contentTypes['employeePaymentsReportReports'][0] ): Request { + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling employeePaymentsReportReports' + ); + } + // verify the required parameter 'payPeriod' is set + if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $payPeriod when calling employeePaymentsReportReports' + ); + } - - - - - $resourcePath = '/employees'; + $resourcePath = '/employers/{employerId}/reports/{payPeriod}/employeepayments'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $employerId, - 'employerId', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $taxYear?->value, - 'taxYear', // param base name - 'TaxYear', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $includeBankAccountDetails, - 'includeBankAccountDetails', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $includeYtd, - 'includeYtd', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $incPensionInfo, - 'incPensionInfo', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $includePayInfo, - 'includePayInfo', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $includeNotes, - 'includeNotes', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // header params if ($accept !== null) { $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); } + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($payPeriod !== null) { + $resourcePath = str_replace( + '{' . 'payPeriod' . '}', + ObjectSerializer::toPathValue($payPeriod->value), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -8849,7 +9784,14 @@ public function employeeExportReportsRequest( ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($contractEmployeePaymentsReportRequest)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractEmployeePaymentsReportRequest)); + } else { + $httpBody = $contractEmployeePaymentsReportRequest; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -8892,7 +9834,7 @@ public function employeeExportReportsRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -8900,52 +9842,48 @@ public function employeeExportReportsRequest( } /** - * Operation employeeLeaveReports + * Operation employeeRoleExportReports * - * Employee Leave + * Employee Export Roles Details * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear (optional) + * @param string|null $employerId employerId (optional) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLeaveReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeRoleExportReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse + * @return \SynergiTech\Staffology\Model\ReportResponse */ - public function employeeLeaveReports( - string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + public function employeeRoleExportReports( + ?string $employerId = null, ?string $accept = null, - string $contentType = self::contentTypes['employeeLeaveReports'][0] - ): \SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse + string $contentType = self::contentTypes['employeeRoleExportReports'][0] + ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->employeeLeaveReportsWithHttpInfo($employerId, $taxYear, $accept, $contentType); + list($response) = $this->employeeRoleExportReportsWithHttpInfo($employerId, $accept, $contentType); return $response; } /** - * Operation employeeLeaveReportsWithHttpInfo + * Operation employeeRoleExportReportsWithHttpInfo * - * Employee Leave + * Employee Export Roles Details * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) + * @param string|null $employerId (optional) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLeaveReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeRoleExportReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function employeeLeaveReportsWithHttpInfo( - string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + public function employeeRoleExportReportsWithHttpInfo( + ?string $employerId = null, ?string $accept = null, - string $contentType = self::contentTypes['employeeLeaveReports'][0] + string $contentType = self::contentTypes['employeeRoleExportReports'][0] ): array { - $request = $this->employeeLeaveReportsRequest($employerId, $taxYear, $accept, $contentType); + $request = $this->employeeRoleExportReportsRequest($employerId, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -8969,36 +9907,15 @@ public function employeeLeaveReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9013,70 +9930,46 @@ public function employeeLeaveReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse', + '\SynergiTech\Staffology\Model\ReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation employeeLeaveReportsAsync + * Operation employeeRoleExportReportsAsync * - * Employee Leave + * Employee Export Roles Details * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) + * @param string|null $employerId (optional) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLeaveReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeRoleExportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employeeLeaveReportsAsync( - string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + public function employeeRoleExportReportsAsync( + ?string $employerId = null, ?string $accept = null, - string $contentType = self::contentTypes['employeeLeaveReports'][0] + string $contentType = self::contentTypes['employeeRoleExportReports'][0] ): PromiseInterface { - return $this->employeeLeaveReportsAsyncWithHttpInfo($employerId, $taxYear, $accept, $contentType) + return $this->employeeRoleExportReportsAsyncWithHttpInfo($employerId, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -9085,27 +9978,25 @@ function ($response) { } /** - * Operation employeeLeaveReportsAsyncWithHttpInfo + * Operation employeeRoleExportReportsAsyncWithHttpInfo * - * Employee Leave + * Employee Export Roles Details * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) + * @param string|null $employerId (optional) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLeaveReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeRoleExportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employeeLeaveReportsAsyncWithHttpInfo( - string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + public function employeeRoleExportReportsAsyncWithHttpInfo( + ?string $employerId = null, ?string $accept = null, - string $contentType = self::contentTypes['employeeLeaveReports'][0] + string $contentType = self::contentTypes['employeeRoleExportReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\EmployeeLeaveReportReportResponse'; - $request = $this->employeeLeaveReportsRequest($employerId, $taxYear, $accept, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; + $request = $this->employeeRoleExportReportsRequest($employerId, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9144,35 +10035,26 @@ function ($exception) { } /** - * Create request for operation 'employeeLeaveReports' + * Create request for operation 'employeeRoleExportReports' * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear (optional) + * @param string|null $employerId (optional) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeLeaveReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeRoleExportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function employeeLeaveReportsRequest( - string $employerId, - ?\SynergiTech\Staffology\Model\TaxYear $taxYear = null, + public function employeeRoleExportReportsRequest( + ?string $employerId = null, ?string $accept = null, - string $contentType = self::contentTypes['employeeLeaveReports'][0] + string $contentType = self::contentTypes['employeeRoleExportReports'][0] ): Request { - // verify the required parameter 'employerId' is set - if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling employeeLeaveReports' - ); - } - - $resourcePath = '/employers/{employerId}/reports/employeeleave'; + $resourcePath = '/employeeroles'; $formParams = []; $queryParams = []; $headerParams = []; @@ -9181,9 +10063,9 @@ public function employeeLeaveReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $taxYear?->value, - 'taxYear', // param base name - 'TaxYear', // openApiType + $employerId, + 'employerId', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -9194,14 +10076,6 @@ public function employeeLeaveReportsRequest( $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); } - // path params - if ($employerId !== null) { - $resourcePath = str_replace( - '{' . 'employerId' . '}', - ObjectSerializer::toPathValue($employerId), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -9262,56 +10136,56 @@ public function employeeLeaveReportsRequest( } /** - * Operation employeePaymentsReportReports + * Operation employerChangesReports * - * Employee Payments Report + * Gets audit changes for a company. * - * @param string $employerId employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) + * @param string $employerId The Id of any employer to which you have access. (required) + * @param \DateTime|null $fromDate fromDate (optional) + * @param \DateTime|null $toDate toDate (optional) * @param string|null $accept accept (optional) - * @param \SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest|null $contractEmployeePaymentsReportRequest contractEmployeePaymentsReportRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeePaymentsReportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerChangesReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\EmployeePaymentsReportReportResponse + * @return \SynergiTech\Staffology\Model\ChangeSummaryListReportResponse */ - public function employeePaymentsReportReports( + public function employerChangesReports( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?\DateTime $fromDate = null, + ?\DateTime $toDate = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest $contractEmployeePaymentsReportRequest = null, - string $contentType = self::contentTypes['employeePaymentsReportReports'][0] - ): \SynergiTech\Staffology\Model\EmployeePaymentsReportReportResponse + string $contentType = self::contentTypes['employerChangesReports'][0] + ): \SynergiTech\Staffology\Model\ChangeSummaryListReportResponse { - list($response) = $this->employeePaymentsReportReportsWithHttpInfo($employerId, $payPeriod, $accept, $contractEmployeePaymentsReportRequest, $contentType); + list($response) = $this->employerChangesReportsWithHttpInfo($employerId, $fromDate, $toDate, $accept, $contentType); return $response; } /** - * Operation employeePaymentsReportReportsWithHttpInfo + * Operation employerChangesReportsWithHttpInfo * - * Employee Payments Report + * Gets audit changes for a company. * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param string $employerId The Id of any employer to which you have access. (required) + * @param \DateTime|null $fromDate (optional) + * @param \DateTime|null $toDate (optional) * @param string|null $accept (optional) - * @param \SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest|null $contractEmployeePaymentsReportRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeePaymentsReportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerChangesReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\EmployeePaymentsReportReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ChangeSummaryListReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function employeePaymentsReportReportsWithHttpInfo( + public function employerChangesReportsWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?\DateTime $fromDate = null, + ?\DateTime $toDate = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest $contractEmployeePaymentsReportRequest = null, - string $contentType = self::contentTypes['employeePaymentsReportReports'][0] + string $contentType = self::contentTypes['employerChangesReports'][0] ): array { - $request = $this->employeePaymentsReportReportsRequest($employerId, $payPeriod, $accept, $contractEmployeePaymentsReportRequest, $contentType); + $request = $this->employerChangesReportsRequest($employerId, $fromDate, $toDate, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -9335,36 +10209,15 @@ public function employeePaymentsReportReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\EmployeePaymentsReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployeePaymentsReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployeePaymentsReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9379,72 +10232,50 @@ public function employeePaymentsReportReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployeePaymentsReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\EmployeePaymentsReportReportResponse', + '\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation employeePaymentsReportReportsAsync + * Operation employerChangesReportsAsync * - * Employee Payments Report + * Gets audit changes for a company. * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param string $employerId The Id of any employer to which you have access. (required) + * @param \DateTime|null $fromDate (optional) + * @param \DateTime|null $toDate (optional) * @param string|null $accept (optional) - * @param \SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest|null $contractEmployeePaymentsReportRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeePaymentsReportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerChangesReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employeePaymentsReportReportsAsync( + public function employerChangesReportsAsync( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?\DateTime $fromDate = null, + ?\DateTime $toDate = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest $contractEmployeePaymentsReportRequest = null, - string $contentType = self::contentTypes['employeePaymentsReportReports'][0] + string $contentType = self::contentTypes['employerChangesReports'][0] ): PromiseInterface { - return $this->employeePaymentsReportReportsAsyncWithHttpInfo($employerId, $payPeriod, $accept, $contractEmployeePaymentsReportRequest, $contentType) + return $this->employerChangesReportsAsyncWithHttpInfo($employerId, $fromDate, $toDate, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -9453,29 +10284,29 @@ function ($response) { } /** - * Operation employeePaymentsReportReportsAsyncWithHttpInfo + * Operation employerChangesReportsAsyncWithHttpInfo * - * Employee Payments Report + * Gets audit changes for a company. * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param string $employerId The Id of any employer to which you have access. (required) + * @param \DateTime|null $fromDate (optional) + * @param \DateTime|null $toDate (optional) * @param string|null $accept (optional) - * @param \SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest|null $contractEmployeePaymentsReportRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeePaymentsReportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerChangesReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employeePaymentsReportReportsAsyncWithHttpInfo( + public function employerChangesReportsAsyncWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?\DateTime $fromDate = null, + ?\DateTime $toDate = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest $contractEmployeePaymentsReportRequest = null, - string $contentType = self::contentTypes['employeePaymentsReportReports'][0] + string $contentType = self::contentTypes['employerChangesReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\EmployeePaymentsReportReportResponse'; - $request = $this->employeePaymentsReportReportsRequest($employerId, $payPeriod, $accept, $contractEmployeePaymentsReportRequest, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse'; + $request = $this->employerChangesReportsRequest($employerId, $fromDate, $toDate, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9514,50 +10345,62 @@ function ($exception) { } /** - * Create request for operation 'employeePaymentsReportReports' + * Create request for operation 'employerChangesReports' * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param string $employerId The Id of any employer to which you have access. (required) + * @param \DateTime|null $fromDate (optional) + * @param \DateTime|null $toDate (optional) * @param string|null $accept (optional) - * @param \SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest|null $contractEmployeePaymentsReportRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeePaymentsReportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerChangesReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function employeePaymentsReportReportsRequest( + public function employerChangesReportsRequest( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + ?\DateTime $fromDate = null, + ?\DateTime $toDate = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\ContractEmployeePaymentsReportRequest $contractEmployeePaymentsReportRequest = null, - string $contentType = self::contentTypes['employeePaymentsReportReports'][0] + string $contentType = self::contentTypes['employerChangesReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling employeePaymentsReportReports' + 'Missing the required parameter $employerId when calling employerChangesReports' ); } - // verify the required parameter 'payPeriod' is set - if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $payPeriod when calling employeePaymentsReportReports' - ); - } - $resourcePath = '/employers/{employerId}/reports/{payPeriod}/employeepayments'; + $resourcePath = '/employers/{employerId}/reports/employerchanges'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fromDate, + 'fromDate', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $toDate, + 'toDate', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // header params if ($accept !== null) { @@ -9572,31 +10415,16 @@ public function employeePaymentsReportReportsRequest( $resourcePath ); } - // path params - if ($payPeriod !== null) { - $resourcePath = str_replace( - '{' . 'payPeriod' . '}', - ObjectSerializer::toPathValue($payPeriod->value), - $resourcePath - ); - } - - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', ], - $contentType, - $multipart - ); - // for model (json/xml) - if (isset($contractEmployeePaymentsReportRequest)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractEmployeePaymentsReportRequest)); - } else { - $httpBody = $contractEmployeePaymentsReportRequest; - } - } elseif (count($formParams) > 0) { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/csv', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -9639,7 +10467,7 @@ public function employeePaymentsReportReportsRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -9647,48 +10475,48 @@ public function employeePaymentsReportReportsRequest( } /** - * Operation employeeRoleExportReports + * Operation employerExportReports * - * Employee Export Roles Details + * Employer Export * - * @param string|null $employerId employerId (optional) + * @param string $employerId The Id of any employer to which you have access. It wont affect the report results. (required) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeRoleExportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerExportReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return \SynergiTech\Staffology\Model\ReportResponse */ - public function employeeRoleExportReports( - ?string $employerId = null, + public function employerExportReports( + string $employerId, ?string $accept = null, - string $contentType = self::contentTypes['employeeRoleExportReports'][0] + string $contentType = self::contentTypes['employerExportReports'][0] ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->employeeRoleExportReportsWithHttpInfo($employerId, $accept, $contentType); + list($response) = $this->employerExportReportsWithHttpInfo($employerId, $accept, $contentType); return $response; } /** - * Operation employeeRoleExportReportsWithHttpInfo + * Operation employerExportReportsWithHttpInfo * - * Employee Export Roles Details + * Employer Export * - * @param string|null $employerId (optional) + * @param string $employerId The Id of any employer to which you have access. It wont affect the report results. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeRoleExportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerExportReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function employeeRoleExportReportsWithHttpInfo( - ?string $employerId = null, + public function employerExportReportsWithHttpInfo( + string $employerId, ?string $accept = null, - string $contentType = self::contentTypes['employeeRoleExportReports'][0] + string $contentType = self::contentTypes['employerExportReports'][0] ): array { - $request = $this->employeeRoleExportReportsRequest($employerId, $accept, $contentType); + $request = $this->employerExportReportsRequest($employerId, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -9712,36 +10540,15 @@ public function employeeRoleExportReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9756,34 +10563,11 @@ public function employeeRoleExportReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9793,31 +10577,32 @@ public function employeeRoleExportReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation employeeRoleExportReportsAsync + * Operation employerExportReportsAsync * - * Employee Export Roles Details + * Employer Export * - * @param string|null $employerId (optional) + * @param string $employerId The Id of any employer to which you have access. It wont affect the report results. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeRoleExportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerExportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employeeRoleExportReportsAsync( - ?string $employerId = null, + public function employerExportReportsAsync( + string $employerId, ?string $accept = null, - string $contentType = self::contentTypes['employeeRoleExportReports'][0] + string $contentType = self::contentTypes['employerExportReports'][0] ): PromiseInterface { - return $this->employeeRoleExportReportsAsyncWithHttpInfo($employerId, $accept, $contentType) + return $this->employerExportReportsAsyncWithHttpInfo($employerId, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -9826,25 +10611,25 @@ function ($response) { } /** - * Operation employeeRoleExportReportsAsyncWithHttpInfo + * Operation employerExportReportsAsyncWithHttpInfo * - * Employee Export Roles Details + * Employer Export * - * @param string|null $employerId (optional) + * @param string $employerId The Id of any employer to which you have access. It wont affect the report results. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeRoleExportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerExportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employeeRoleExportReportsAsyncWithHttpInfo( - ?string $employerId = null, + public function employerExportReportsAsyncWithHttpInfo( + string $employerId, ?string $accept = null, - string $contentType = self::contentTypes['employeeRoleExportReports'][0] + string $contentType = self::contentTypes['employerExportReports'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->employeeRoleExportReportsRequest($employerId, $accept, $contentType); + $request = $this->employerExportReportsRequest($employerId, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9883,47 +10668,52 @@ function ($exception) { } /** - * Create request for operation 'employeeRoleExportReports' + * Create request for operation 'employerExportReports' * - * @param string|null $employerId (optional) + * @param string $employerId The Id of any employer to which you have access. It wont affect the report results. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employeeRoleExportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerExportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function employeeRoleExportReportsRequest( - ?string $employerId = null, + public function employerExportReportsRequest( + string $employerId, ?string $accept = null, - string $contentType = self::contentTypes['employeeRoleExportReports'][0] + string $contentType = self::contentTypes['employerExportReports'][0] ): Request { + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling employerExportReports' + ); + } - $resourcePath = '/employeeroles'; + $resourcePath = '/employers/{employerId}/reports/employers'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $employerId, - 'employerId', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // header params if ($accept !== null) { $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); } + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -9984,56 +10774,52 @@ public function employeeRoleExportReportsRequest( } /** - * Operation employerChangesReports + * Operation examplePayslipReports * - * Gets audit changes for a company. + * Example Payslip * - * @param string $employerId The Id of any employer to which you have access. (required) - * @param \DateTime|null $fromDate fromDate (optional) - * @param \DateTime|null $toDate toDate (optional) + * @param string|null $employerId employerId (optional) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerChangesReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation Your PayslipCustomisation. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['examplePayslipReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ChangeSummaryListReportResponse + * @return \SynergiTech\Staffology\Model\ReportResponse */ - public function employerChangesReports( - string $employerId, - ?\DateTime $fromDate = null, - ?\DateTime $toDate = null, + public function examplePayslipReports( + ?string $employerId = null, ?string $accept = null, - string $contentType = self::contentTypes['employerChangesReports'][0] - ): \SynergiTech\Staffology\Model\ChangeSummaryListReportResponse + ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, + string $contentType = self::contentTypes['examplePayslipReports'][0] + ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->employerChangesReportsWithHttpInfo($employerId, $fromDate, $toDate, $accept, $contentType); + list($response) = $this->examplePayslipReportsWithHttpInfo($employerId, $accept, $payslipCustomisation, $contentType); return $response; } /** - * Operation employerChangesReportsWithHttpInfo + * Operation examplePayslipReportsWithHttpInfo * - * Gets audit changes for a company. + * Example Payslip * - * @param string $employerId The Id of any employer to which you have access. (required) - * @param \DateTime|null $fromDate (optional) - * @param \DateTime|null $toDate (optional) + * @param string|null $employerId (optional) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerChangesReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation Your PayslipCustomisation. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['examplePayslipReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ChangeSummaryListReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function employerChangesReportsWithHttpInfo( - string $employerId, - ?\DateTime $fromDate = null, - ?\DateTime $toDate = null, + public function examplePayslipReportsWithHttpInfo( + ?string $employerId = null, ?string $accept = null, - string $contentType = self::contentTypes['employerChangesReports'][0] + ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, + string $contentType = self::contentTypes['examplePayslipReports'][0] ): array { - $request = $this->employerChangesReportsRequest($employerId, $fromDate, $toDate, $accept, $contentType); + $request = $this->examplePayslipReportsRequest($employerId, $accept, $payslipCustomisation, $contentType); try { $options = $this->createHttpClientOption(); @@ -10057,36 +10843,15 @@ public function employerChangesReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10101,72 +10866,48 @@ public function employerChangesReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse', + '\SynergiTech\Staffology\Model\ReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation employerChangesReportsAsync + * Operation examplePayslipReportsAsync * - * Gets audit changes for a company. + * Example Payslip * - * @param string $employerId The Id of any employer to which you have access. (required) - * @param \DateTime|null $fromDate (optional) - * @param \DateTime|null $toDate (optional) + * @param string|null $employerId (optional) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerChangesReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation Your PayslipCustomisation. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['examplePayslipReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employerChangesReportsAsync( - string $employerId, - ?\DateTime $fromDate = null, - ?\DateTime $toDate = null, + public function examplePayslipReportsAsync( + ?string $employerId = null, ?string $accept = null, - string $contentType = self::contentTypes['employerChangesReports'][0] + ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, + string $contentType = self::contentTypes['examplePayslipReports'][0] ): PromiseInterface { - return $this->employerChangesReportsAsyncWithHttpInfo($employerId, $fromDate, $toDate, $accept, $contentType) + return $this->examplePayslipReportsAsyncWithHttpInfo($employerId, $accept, $payslipCustomisation, $contentType) ->then( function ($response) { return $response[0]; @@ -10175,29 +10916,27 @@ function ($response) { } /** - * Operation employerChangesReportsAsyncWithHttpInfo + * Operation examplePayslipReportsAsyncWithHttpInfo * - * Gets audit changes for a company. + * Example Payslip * - * @param string $employerId The Id of any employer to which you have access. (required) - * @param \DateTime|null $fromDate (optional) - * @param \DateTime|null $toDate (optional) + * @param string|null $employerId (optional) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerChangesReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation Your PayslipCustomisation. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['examplePayslipReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employerChangesReportsAsyncWithHttpInfo( - string $employerId, - ?\DateTime $fromDate = null, - ?\DateTime $toDate = null, + public function examplePayslipReportsAsyncWithHttpInfo( + ?string $employerId = null, ?string $accept = null, - string $contentType = self::contentTypes['employerChangesReports'][0] + ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, + string $contentType = self::contentTypes['examplePayslipReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ChangeSummaryListReportResponse'; - $request = $this->employerChangesReportsRequest($employerId, $fromDate, $toDate, $accept, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; + $request = $this->examplePayslipReportsRequest($employerId, $accept, $payslipCustomisation, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10236,38 +10975,29 @@ function ($exception) { } /** - * Create request for operation 'employerChangesReports' + * Create request for operation 'examplePayslipReports' * - * @param string $employerId The Id of any employer to which you have access. (required) - * @param \DateTime|null $fromDate (optional) - * @param \DateTime|null $toDate (optional) + * @param string|null $employerId (optional) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerChangesReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation Your PayslipCustomisation. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['examplePayslipReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function employerChangesReportsRequest( - string $employerId, - ?\DateTime $fromDate = null, - ?\DateTime $toDate = null, + public function examplePayslipReportsRequest( + ?string $employerId = null, ?string $accept = null, - string $contentType = self::contentTypes['employerChangesReports'][0] + ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, + string $contentType = self::contentTypes['examplePayslipReports'][0] ): Request { - // verify the required parameter 'employerId' is set - if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling employerChangesReports' - ); - } - - $resourcePath = '/employers/{employerId}/reports/employerchanges'; + $resourcePath = '/payslip/example/pdf'; $formParams = []; $queryParams = []; $headerParams = []; @@ -10276,17 +11006,8 @@ public function employerChangesReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $fromDate, - 'fromDate', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $toDate, - 'toDate', // param base name + $employerId, + 'employerId', // param base name 'string', // openApiType 'form', // style true, // explode @@ -10298,24 +11019,23 @@ public function employerChangesReportsRequest( $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); } - // path params - if ($employerId !== null) { - $resourcePath = str_replace( - '{' . 'employerId' . '}', - ObjectSerializer::toPathValue($employerId), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', ], + ['application/json', 'application/pdf', 'text/html', ], $contentType, $multipart ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($payslipCustomisation)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payslipCustomisation)); + } else { + $httpBody = $payslipCustomisation; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -10358,7 +11078,7 @@ public function employerChangesReportsRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -10366,48 +11086,56 @@ public function employerChangesReportsRequest( } /** - * Operation employerExportReports + * Operation exbReports * - * Employer Export + * EXB * - * @param string $employerId The Id of any employer to which you have access. It wont affect the report results. (required) + * @param string $employerId employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) + * @param string $id The Id of EXB. (required) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerExportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exbReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ReportResponse + * @return \SynergiTech\Staffology\Model\ExbReportResponse */ - public function employerExportReports( + public function exbReports( string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, ?string $accept = null, - string $contentType = self::contentTypes['employerExportReports'][0] - ): \SynergiTech\Staffology\Model\ReportResponse + string $contentType = self::contentTypes['exbReports'][0] + ): \SynergiTech\Staffology\Model\ExbReportResponse { - list($response) = $this->employerExportReportsWithHttpInfo($employerId, $accept, $contentType); + list($response) = $this->exbReportsWithHttpInfo($employerId, $taxYear, $id, $accept, $contentType); return $response; } /** - * Operation employerExportReportsWithHttpInfo + * Operation exbReportsWithHttpInfo * - * Employer Export + * EXB * - * @param string $employerId The Id of any employer to which you have access. It wont affect the report results. (required) + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id The Id of EXB. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerExportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exbReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ExbReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function employerExportReportsWithHttpInfo( + public function exbReportsWithHttpInfo( string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, ?string $accept = null, - string $contentType = self::contentTypes['employerExportReports'][0] + string $contentType = self::contentTypes['exbReports'][0] ): array { - $request = $this->employerExportReportsRequest($employerId, $accept, $contentType); + $request = $this->exbReportsRequest($employerId, $taxYear, $id, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -10431,36 +11159,15 @@ public function employerExportReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExbReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10475,68 +11182,50 @@ public function employerExportReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ExbReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ReportResponse', + '\SynergiTech\Staffology\Model\ExbReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation employerExportReportsAsync + * Operation exbReportsAsync * - * Employer Export + * EXB * - * @param string $employerId The Id of any employer to which you have access. It wont affect the report results. (required) + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id The Id of EXB. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerExportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exbReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employerExportReportsAsync( + public function exbReportsAsync( string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, ?string $accept = null, - string $contentType = self::contentTypes['employerExportReports'][0] + string $contentType = self::contentTypes['exbReports'][0] ): PromiseInterface { - return $this->employerExportReportsAsyncWithHttpInfo($employerId, $accept, $contentType) + return $this->exbReportsAsyncWithHttpInfo($employerId, $taxYear, $id, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -10545,25 +11234,29 @@ function ($response) { } /** - * Operation employerExportReportsAsyncWithHttpInfo + * Operation exbReportsAsyncWithHttpInfo * - * Employer Export + * EXB * - * @param string $employerId The Id of any employer to which you have access. It wont affect the report results. (required) + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id The Id of EXB. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerExportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exbReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function employerExportReportsAsyncWithHttpInfo( + public function exbReportsAsyncWithHttpInfo( string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, ?string $accept = null, - string $contentType = self::contentTypes['employerExportReports'][0] + string $contentType = self::contentTypes['exbReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->employerExportReportsRequest($employerId, $accept, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ExbReportResponse'; + $request = $this->exbReportsRequest($employerId, $taxYear, $id, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10602,32 +11295,50 @@ function ($exception) { } /** - * Create request for operation 'employerExportReports' + * Create request for operation 'exbReports' * - * @param string $employerId The Id of any employer to which you have access. It wont affect the report results. (required) + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id The Id of EXB. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['employerExportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exbReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function employerExportReportsRequest( + public function exbReportsRequest( string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, ?string $accept = null, - string $contentType = self::contentTypes['employerExportReports'][0] + string $contentType = self::contentTypes['exbReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling employerExportReports' + 'Missing the required parameter $employerId when calling exbReports' + ); + } + + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling exbReports' + ); + } + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling exbReports' ); } - $resourcePath = '/employers/{employerId}/reports/employers'; + $resourcePath = '/employers/{employerId}/reports/{taxYear}/exb/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -10648,6 +11359,22 @@ public function employerExportReportsRequest( $resourcePath ); } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -10708,52 +11435,60 @@ public function employerExportReportsRequest( } /** - * Operation examplePayslipReports + * Operation fpsReports * - * Example Payslip + * FPS * - * @param string|null $employerId employerId (optional) + * @param string $employerId employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) + * @param string $id The Id of FPS. (required) + * @param bool|null $incAllEmployees If true, then any employees that were paid earlier in the year but not on this FPS will also be included (optional) * @param string|null $accept accept (optional) - * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation Your PayslipCustomisation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['examplePayslipReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ReportResponse + * @return \SynergiTech\Staffology\Model\FpsReportResponse */ - public function examplePayslipReports( - ?string $employerId = null, + public function fpsReports( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + ?bool $incAllEmployees = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, - string $contentType = self::contentTypes['examplePayslipReports'][0] - ): \SynergiTech\Staffology\Model\ReportResponse + string $contentType = self::contentTypes['fpsReports'][0] + ): \SynergiTech\Staffology\Model\FpsReportResponse { - list($response) = $this->examplePayslipReportsWithHttpInfo($employerId, $accept, $payslipCustomisation, $contentType); + list($response) = $this->fpsReportsWithHttpInfo($employerId, $taxYear, $id, $incAllEmployees, $accept, $contentType); return $response; } /** - * Operation examplePayslipReportsWithHttpInfo + * Operation fpsReportsWithHttpInfo * - * Example Payslip + * FPS * - * @param string|null $employerId (optional) + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id The Id of FPS. (required) + * @param bool|null $incAllEmployees If true, then any employees that were paid earlier in the year but not on this FPS will also be included (optional) * @param string|null $accept (optional) - * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation Your PayslipCustomisation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['examplePayslipReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\FpsReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function examplePayslipReportsWithHttpInfo( - ?string $employerId = null, + public function fpsReportsWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + ?bool $incAllEmployees = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, - string $contentType = self::contentTypes['examplePayslipReports'][0] + string $contentType = self::contentTypes['fpsReports'][0] ): array { - $request = $this->examplePayslipReportsRequest($employerId, $accept, $payslipCustomisation, $contentType); + $request = $this->fpsReportsRequest($employerId, $taxYear, $id, $incAllEmployees, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -10777,36 +11512,15 @@ public function examplePayslipReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\FpsReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -10821,70 +11535,52 @@ public function examplePayslipReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\FpsReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ReportResponse', + '\SynergiTech\Staffology\Model\FpsReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation examplePayslipReportsAsync + * Operation fpsReportsAsync * - * Example Payslip + * FPS * - * @param string|null $employerId (optional) + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id The Id of FPS. (required) + * @param bool|null $incAllEmployees If true, then any employees that were paid earlier in the year but not on this FPS will also be included (optional) * @param string|null $accept (optional) - * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation Your PayslipCustomisation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['examplePayslipReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function examplePayslipReportsAsync( - ?string $employerId = null, + public function fpsReportsAsync( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + ?bool $incAllEmployees = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, - string $contentType = self::contentTypes['examplePayslipReports'][0] + string $contentType = self::contentTypes['fpsReports'][0] ): PromiseInterface { - return $this->examplePayslipReportsAsyncWithHttpInfo($employerId, $accept, $payslipCustomisation, $contentType) + return $this->fpsReportsAsyncWithHttpInfo($employerId, $taxYear, $id, $incAllEmployees, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -10893,27 +11589,31 @@ function ($response) { } /** - * Operation examplePayslipReportsAsyncWithHttpInfo + * Operation fpsReportsAsyncWithHttpInfo * - * Example Payslip + * FPS * - * @param string|null $employerId (optional) + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id The Id of FPS. (required) + * @param bool|null $incAllEmployees If true, then any employees that were paid earlier in the year but not on this FPS will also be included (optional) * @param string|null $accept (optional) - * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation Your PayslipCustomisation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['examplePayslipReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function examplePayslipReportsAsyncWithHttpInfo( - ?string $employerId = null, + public function fpsReportsAsyncWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + ?bool $incAllEmployees = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, - string $contentType = self::contentTypes['examplePayslipReports'][0] + string $contentType = self::contentTypes['fpsReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->examplePayslipReportsRequest($employerId, $accept, $payslipCustomisation, $contentType); + $returnType = '\SynergiTech\Staffology\Model\FpsReportResponse'; + $request = $this->fpsReportsRequest($employerId, $taxYear, $id, $incAllEmployees, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10952,29 +11652,53 @@ function ($exception) { } /** - * Create request for operation 'examplePayslipReports' + * Create request for operation 'fpsReports' * - * @param string|null $employerId (optional) + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $id The Id of FPS. (required) + * @param bool|null $incAllEmployees If true, then any employees that were paid earlier in the year but not on this FPS will also be included (optional) * @param string|null $accept (optional) - * @param \SynergiTech\Staffology\Model\PayslipCustomisation|null $payslipCustomisation Your PayslipCustomisation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['examplePayslipReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function examplePayslipReportsRequest( - ?string $employerId = null, + public function fpsReportsRequest( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + string $id, + ?bool $incAllEmployees = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\PayslipCustomisation $payslipCustomisation = null, - string $contentType = self::contentTypes['examplePayslipReports'][0] + string $contentType = self::contentTypes['fpsReports'][0] ): Request { + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling fpsReports' + ); + } + + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling fpsReports' + ); + } + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling fpsReports' + ); + } - $resourcePath = '/payslip/example/pdf'; + $resourcePath = '/employers/{employerId}/reports/{taxYear}/fps/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -10983,9 +11707,9 @@ public function examplePayslipReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $employerId, - 'employerId', // param base name - 'string', // openApiType + $incAllEmployees, + 'incAllEmployees', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required @@ -10996,23 +11720,40 @@ public function examplePayslipReportsRequest( $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); } + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/pdf', 'text/html', ], + ['application/json', 'text/csv', ], $contentType, $multipart ); // for model (json/xml) - if (isset($payslipCustomisation)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($payslipCustomisation)); - } else { - $httpBody = $payslipCustomisation; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -11055,7 +11796,7 @@ public function examplePayslipReportsRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -11063,56 +11804,64 @@ public function examplePayslipReportsRequest( } /** - * Operation exbReports + * Operation fullSummaryOfPayReports * - * EXB + * Cost Of Employment * * @param string $employerId employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) - * @param string $id The Id of EXB. (required) + * @param int|null $period period (optional) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exbReports'] to see the possible values for this operation + * @param int|null $ordinal ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fullSummaryOfPayReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ExbReportResponse + * @return \SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse */ - public function exbReports( + public function fullSummaryOfPayReports( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, + ?int $period = null, ?string $accept = null, - string $contentType = self::contentTypes['exbReports'][0] - ): \SynergiTech\Staffology\Model\ExbReportResponse + ?int $ordinal = 1, + string $contentType = self::contentTypes['fullSummaryOfPayReports'][0] + ): \SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse { - list($response) = $this->exbReportsWithHttpInfo($employerId, $taxYear, $id, $accept, $contentType); + list($response) = $this->fullSummaryOfPayReportsWithHttpInfo($employerId, $payPeriod, $taxYear, $period, $accept, $ordinal, $contentType); return $response; } /** - * Operation exbReportsWithHttpInfo + * Operation fullSummaryOfPayReportsWithHttpInfo * - * EXB + * Cost Of Employment * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $id The Id of EXB. (required) + * @param int|null $period (optional) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exbReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fullSummaryOfPayReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ExbReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function exbReportsWithHttpInfo( + public function fullSummaryOfPayReportsWithHttpInfo( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, + ?int $period = null, ?string $accept = null, - string $contentType = self::contentTypes['exbReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['fullSummaryOfPayReports'][0] ): array { - $request = $this->exbReportsRequest($employerId, $taxYear, $id, $accept, $contentType); + $request = $this->fullSummaryOfPayReportsRequest($employerId, $payPeriod, $taxYear, $period, $accept, $ordinal, $contentType); try { $options = $this->createHttpClientOption(); @@ -11136,36 +11885,15 @@ public function exbReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ExbReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ExbReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ExbReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -11180,72 +11908,54 @@ public function exbReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ExbReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ExbReportResponse', + '\SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation exbReportsAsync + * Operation fullSummaryOfPayReportsAsync * - * EXB + * Cost Of Employment * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $id The Id of EXB. (required) + * @param int|null $period (optional) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exbReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fullSummaryOfPayReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function exbReportsAsync( + public function fullSummaryOfPayReportsAsync( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, + ?int $period = null, ?string $accept = null, - string $contentType = self::contentTypes['exbReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['fullSummaryOfPayReports'][0] ): PromiseInterface { - return $this->exbReportsAsyncWithHttpInfo($employerId, $taxYear, $id, $accept, $contentType) + return $this->fullSummaryOfPayReportsAsyncWithHttpInfo($employerId, $payPeriod, $taxYear, $period, $accept, $ordinal, $contentType) ->then( function ($response) { return $response[0]; @@ -11254,29 +11964,33 @@ function ($response) { } /** - * Operation exbReportsAsyncWithHttpInfo + * Operation fullSummaryOfPayReportsAsyncWithHttpInfo * - * EXB + * Cost Of Employment * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $id The Id of EXB. (required) + * @param int|null $period (optional) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exbReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fullSummaryOfPayReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function exbReportsAsyncWithHttpInfo( + public function fullSummaryOfPayReportsAsyncWithHttpInfo( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, + ?int $period = null, ?string $accept = null, - string $contentType = self::contentTypes['exbReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['fullSummaryOfPayReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ExbReportResponse'; - $request = $this->exbReportsRequest($employerId, $taxYear, $id, $accept, $contentType); + $returnType = '\SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse'; + $request = $this->fullSummaryOfPayReportsRequest($employerId, $payPeriod, $taxYear, $period, $accept, $ordinal, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11315,56 +12029,80 @@ function ($exception) { } /** - * Create request for operation 'exbReports' + * Create request for operation 'fullSummaryOfPayReports' * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $id The Id of EXB. (required) + * @param int|null $period (optional) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['exbReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fullSummaryOfPayReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function exbReportsRequest( + public function fullSummaryOfPayReportsRequest( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, + ?int $period = null, ?string $accept = null, - string $contentType = self::contentTypes['exbReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['fullSummaryOfPayReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling exbReports' + 'Missing the required parameter $employerId when calling fullSummaryOfPayReports' ); } - // verify the required parameter 'taxYear' is set - if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + // verify the required parameter 'payPeriod' is set + if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling exbReports' + 'Missing the required parameter $payPeriod when calling fullSummaryOfPayReports' ); } - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling exbReports' + 'Missing the required parameter $taxYear when calling fullSummaryOfPayReports' ); } - $resourcePath = '/employers/{employerId}/reports/{taxYear}/exb/{id}'; + + + $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/fullsummaryofpay'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $period, + 'period', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $ordinal, + 'ordinal', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // header params if ($accept !== null) { @@ -11380,25 +12118,25 @@ public function exbReportsRequest( ); } // path params - if ($taxYear !== null) { + if ($payPeriod !== null) { $resourcePath = str_replace( - '{' . 'taxYear' . '}', - ObjectSerializer::toPathValue($taxYear->value), + '{' . 'payPeriod' . '}', + ObjectSerializer::toPathValue($payPeriod->value), $resourcePath ); } // path params - if ($id !== null) { + if ($taxYear !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), $resourcePath ); } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', ], + ['application/json', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -11455,60 +12193,64 @@ public function exbReportsRequest( } /** - * Operation fpsReports + * Operation furloughReportReports * - * FPS + * FurloughReport * * @param string $employerId employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) - * @param string $id The Id of FPS. (required) - * @param bool|null $incAllEmployees If true, then any employees that were paid earlier in the year but not on this FPS will also be included (optional) + * @param int $periodNumber periodNumber (required) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsReports'] to see the possible values for this operation + * @param int|null $ordinal ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['furloughReportReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\FpsReportResponse + * @return \SynergiTech\Staffology\Model\FurloughReportReportResponse */ - public function fpsReports( + public function furloughReportReports( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, - ?bool $incAllEmployees = null, + int $periodNumber, ?string $accept = null, - string $contentType = self::contentTypes['fpsReports'][0] - ): \SynergiTech\Staffology\Model\FpsReportResponse + ?int $ordinal = 1, + string $contentType = self::contentTypes['furloughReportReports'][0] + ): \SynergiTech\Staffology\Model\FurloughReportReportResponse { - list($response) = $this->fpsReportsWithHttpInfo($employerId, $taxYear, $id, $incAllEmployees, $accept, $contentType); + list($response) = $this->furloughReportReportsWithHttpInfo($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType); return $response; } /** - * Operation fpsReportsWithHttpInfo + * Operation furloughReportReportsWithHttpInfo * - * FPS + * FurloughReport * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $id The Id of FPS. (required) - * @param bool|null $incAllEmployees If true, then any employees that were paid earlier in the year but not on this FPS will also be included (optional) + * @param int $periodNumber (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['furloughReportReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\FpsReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\FurloughReportReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function fpsReportsWithHttpInfo( + public function furloughReportReportsWithHttpInfo( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, - ?bool $incAllEmployees = null, + int $periodNumber, ?string $accept = null, - string $contentType = self::contentTypes['fpsReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['furloughReportReports'][0] ): array { - $request = $this->fpsReportsRequest($employerId, $taxYear, $id, $incAllEmployees, $accept, $contentType); + $request = $this->furloughReportReportsRequest($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType); try { $options = $this->createHttpClientOption(); @@ -11532,36 +12274,15 @@ public function fpsReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\FpsReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\FpsReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\FpsReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\FurloughReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -11576,74 +12297,54 @@ public function fpsReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\FpsReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\FurloughReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\FpsReportResponse', + '\SynergiTech\Staffology\Model\FurloughReportReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation fpsReportsAsync + * Operation furloughReportReportsAsync * - * FPS + * FurloughReport * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $id The Id of FPS. (required) - * @param bool|null $incAllEmployees If true, then any employees that were paid earlier in the year but not on this FPS will also be included (optional) + * @param int $periodNumber (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['furloughReportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function fpsReportsAsync( + public function furloughReportReportsAsync( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, - ?bool $incAllEmployees = null, + int $periodNumber, ?string $accept = null, - string $contentType = self::contentTypes['fpsReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['furloughReportReports'][0] ): PromiseInterface { - return $this->fpsReportsAsyncWithHttpInfo($employerId, $taxYear, $id, $incAllEmployees, $accept, $contentType) + return $this->furloughReportReportsAsyncWithHttpInfo($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType) ->then( function ($response) { return $response[0]; @@ -11652,31 +12353,33 @@ function ($response) { } /** - * Operation fpsReportsAsyncWithHttpInfo + * Operation furloughReportReportsAsyncWithHttpInfo * - * FPS + * FurloughReport * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $id The Id of FPS. (required) - * @param bool|null $incAllEmployees If true, then any employees that were paid earlier in the year but not on this FPS will also be included (optional) + * @param int $periodNumber (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['furloughReportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function fpsReportsAsyncWithHttpInfo( + public function furloughReportReportsAsyncWithHttpInfo( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, - ?bool $incAllEmployees = null, + int $periodNumber, ?string $accept = null, - string $contentType = self::contentTypes['fpsReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['furloughReportReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\FpsReportResponse'; - $request = $this->fpsReportsRequest($employerId, $taxYear, $id, $incAllEmployees, $accept, $contentType); + $returnType = '\SynergiTech\Staffology\Model\FurloughReportReportResponse'; + $request = $this->furloughReportReportsRequest($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11715,53 +12418,62 @@ function ($exception) { } /** - * Create request for operation 'fpsReports' + * Create request for operation 'furloughReportReports' * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param string $id The Id of FPS. (required) - * @param bool|null $incAllEmployees If true, then any employees that were paid earlier in the year but not on this FPS will also be included (optional) + * @param int $periodNumber (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fpsReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['furloughReportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function fpsReportsRequest( + public function furloughReportReportsRequest( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - string $id, - ?bool $incAllEmployees = null, + int $periodNumber, ?string $accept = null, - string $contentType = self::contentTypes['fpsReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['furloughReportReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling fpsReports' + 'Missing the required parameter $employerId when calling furloughReportReports' + ); + } + + // verify the required parameter 'payPeriod' is set + if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $payPeriod when calling furloughReportReports' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling fpsReports' + 'Missing the required parameter $taxYear when calling furloughReportReports' ); } - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { + // verify the required parameter 'periodNumber' is set + if ($periodNumber === null || (is_array($periodNumber) && count($periodNumber) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling fpsReports' + 'Missing the required parameter $periodNumber when calling furloughReportReports' ); } - $resourcePath = '/employers/{employerId}/reports/{taxYear}/fps/{id}'; + $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/furlough'; $formParams = []; $queryParams = []; $headerParams = []; @@ -11770,9 +12482,9 @@ public function fpsReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $incAllEmployees, - 'incAllEmployees', // param base name - 'boolean', // openApiType + $ordinal, + 'ordinal', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required @@ -11792,6 +12504,14 @@ public function fpsReportsRequest( ); } // path params + if ($payPeriod !== null) { + $resourcePath = str_replace( + '{' . 'payPeriod' . '}', + ObjectSerializer::toPathValue($payPeriod->value), + $resourcePath + ); + } + // path params if ($taxYear !== null) { $resourcePath = str_replace( '{' . 'taxYear' . '}', @@ -11800,17 +12520,17 @@ public function fpsReportsRequest( ); } // path params - if ($id !== null) { + if ($periodNumber !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), + '{' . 'periodNumber' . '}', + ObjectSerializer::toPathValue($periodNumber), $resourcePath ); } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -11867,64 +12587,64 @@ public function fpsReportsRequest( } /** - * Operation fullSummaryOfPayReports + * Operation genderPayGapReports * - * Cost Of Employment + * Gender Pay Gap * * @param string $employerId employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) - * @param int|null $period period (optional) + * @param \SynergiTech\Staffology\Model\GenderPayGapSnapShotDate|null $genderPayGapSnapShotDate genderPayGapSnapShotDate (optional) + * @param string|null $ordinaryPayCodeSetId ordinaryPayCodeSetId (optional) + * @param string|null $bonusPayCodeSetId bonusPayCodeSetId (optional) * @param string|null $accept accept (optional) - * @param int|null $ordinal ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fullSummaryOfPayReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['genderPayGapReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse + * @return \SynergiTech\Staffology\Model\GenderPayGapReportReportResponse */ - public function fullSummaryOfPayReports( + public function genderPayGapReports( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $period = null, + ?\SynergiTech\Staffology\Model\GenderPayGapSnapShotDate $genderPayGapSnapShotDate = null, + ?string $ordinaryPayCodeSetId = null, + ?string $bonusPayCodeSetId = null, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['fullSummaryOfPayReports'][0] - ): \SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse + string $contentType = self::contentTypes['genderPayGapReports'][0] + ): \SynergiTech\Staffology\Model\GenderPayGapReportReportResponse { - list($response) = $this->fullSummaryOfPayReportsWithHttpInfo($employerId, $payPeriod, $taxYear, $period, $accept, $ordinal, $contentType); + list($response) = $this->genderPayGapReportsWithHttpInfo($employerId, $taxYear, $genderPayGapSnapShotDate, $ordinaryPayCodeSetId, $bonusPayCodeSetId, $accept, $contentType); return $response; } /** - * Operation fullSummaryOfPayReportsWithHttpInfo + * Operation genderPayGapReportsWithHttpInfo * - * Cost Of Employment + * Gender Pay Gap * * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $period (optional) + * @param \SynergiTech\Staffology\Model\GenderPayGapSnapShotDate|null $genderPayGapSnapShotDate (optional) + * @param string|null $ordinaryPayCodeSetId (optional) + * @param string|null $bonusPayCodeSetId (optional) * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fullSummaryOfPayReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['genderPayGapReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\GenderPayGapReportReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function fullSummaryOfPayReportsWithHttpInfo( + public function genderPayGapReportsWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $period = null, + ?\SynergiTech\Staffology\Model\GenderPayGapSnapShotDate $genderPayGapSnapShotDate = null, + ?string $ordinaryPayCodeSetId = null, + ?string $bonusPayCodeSetId = null, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['fullSummaryOfPayReports'][0] + string $contentType = self::contentTypes['genderPayGapReports'][0] ): array { - $request = $this->fullSummaryOfPayReportsRequest($employerId, $payPeriod, $taxYear, $period, $accept, $ordinal, $contentType); + $request = $this->genderPayGapReportsRequest($employerId, $taxYear, $genderPayGapSnapShotDate, $ordinaryPayCodeSetId, $bonusPayCodeSetId, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -11948,36 +12668,15 @@ public function fullSummaryOfPayReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\GenderPayGapReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -11992,76 +12691,54 @@ public function fullSummaryOfPayReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\GenderPayGapReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse', + '\SynergiTech\Staffology\Model\GenderPayGapReportReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation fullSummaryOfPayReportsAsync + * Operation genderPayGapReportsAsync * - * Cost Of Employment + * Gender Pay Gap * * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $period (optional) + * @param \SynergiTech\Staffology\Model\GenderPayGapSnapShotDate|null $genderPayGapSnapShotDate (optional) + * @param string|null $ordinaryPayCodeSetId (optional) + * @param string|null $bonusPayCodeSetId (optional) * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fullSummaryOfPayReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['genderPayGapReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function fullSummaryOfPayReportsAsync( + public function genderPayGapReportsAsync( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $period = null, + ?\SynergiTech\Staffology\Model\GenderPayGapSnapShotDate $genderPayGapSnapShotDate = null, + ?string $ordinaryPayCodeSetId = null, + ?string $bonusPayCodeSetId = null, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['fullSummaryOfPayReports'][0] + string $contentType = self::contentTypes['genderPayGapReports'][0] ): PromiseInterface { - return $this->fullSummaryOfPayReportsAsyncWithHttpInfo($employerId, $payPeriod, $taxYear, $period, $accept, $ordinal, $contentType) + return $this->genderPayGapReportsAsyncWithHttpInfo($employerId, $taxYear, $genderPayGapSnapShotDate, $ordinaryPayCodeSetId, $bonusPayCodeSetId, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -12070,33 +12747,33 @@ function ($response) { } /** - * Operation fullSummaryOfPayReportsAsyncWithHttpInfo + * Operation genderPayGapReportsAsyncWithHttpInfo * - * Cost Of Employment + * Gender Pay Gap * * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $period (optional) + * @param \SynergiTech\Staffology\Model\GenderPayGapSnapShotDate|null $genderPayGapSnapShotDate (optional) + * @param string|null $ordinaryPayCodeSetId (optional) + * @param string|null $bonusPayCodeSetId (optional) * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fullSummaryOfPayReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['genderPayGapReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function fullSummaryOfPayReportsAsyncWithHttpInfo( + public function genderPayGapReportsAsyncWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $period = null, + ?\SynergiTech\Staffology\Model\GenderPayGapSnapShotDate $genderPayGapSnapShotDate = null, + ?string $ordinaryPayCodeSetId = null, + ?string $bonusPayCodeSetId = null, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['fullSummaryOfPayReports'][0] + string $contentType = self::contentTypes['genderPayGapReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\FullSummaryOfPayReportReportResponse'; - $request = $this->fullSummaryOfPayReportsRequest($employerId, $payPeriod, $taxYear, $period, $accept, $ordinal, $contentType); + $returnType = '\SynergiTech\Staffology\Model\GenderPayGapReportReportResponse'; + $request = $this->genderPayGapReportsRequest($employerId, $taxYear, $genderPayGapSnapShotDate, $ordinaryPayCodeSetId, $bonusPayCodeSetId, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12135,48 +12812,41 @@ function ($exception) { } /** - * Create request for operation 'fullSummaryOfPayReports' + * Create request for operation 'genderPayGapReports' * * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $period (optional) + * @param \SynergiTech\Staffology\Model\GenderPayGapSnapShotDate|null $genderPayGapSnapShotDate (optional) + * @param string|null $ordinaryPayCodeSetId (optional) + * @param string|null $bonusPayCodeSetId (optional) * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['fullSummaryOfPayReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['genderPayGapReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function fullSummaryOfPayReportsRequest( + public function genderPayGapReportsRequest( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $period = null, + ?\SynergiTech\Staffology\Model\GenderPayGapSnapShotDate $genderPayGapSnapShotDate = null, + ?string $ordinaryPayCodeSetId = null, + ?string $bonusPayCodeSetId = null, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['fullSummaryOfPayReports'][0] + string $contentType = self::contentTypes['genderPayGapReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling fullSummaryOfPayReports' - ); - } - - // verify the required parameter 'payPeriod' is set - if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $payPeriod when calling fullSummaryOfPayReports' + 'Missing the required parameter $employerId when calling genderPayGapReports' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling fullSummaryOfPayReports' + 'Missing the required parameter $taxYear when calling genderPayGapReports' ); } @@ -12184,7 +12854,8 @@ public function fullSummaryOfPayReportsRequest( - $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/fullsummaryofpay'; + + $resourcePath = '/employers/{employerId}/reports/{taxYear}/GenderPayGap'; $formParams = []; $queryParams = []; $headerParams = []; @@ -12193,18 +12864,27 @@ public function fullSummaryOfPayReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $period, - 'period', // param base name - 'integer', // openApiType + $genderPayGapSnapShotDate?->value, + 'genderPayGapSnapShotDate', // param base name + 'GenderPayGapSnapShotDate', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $ordinal, - 'ordinal', // param base name - 'integer', // openApiType + $ordinaryPayCodeSetId, + 'ordinaryPayCodeSetId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $bonusPayCodeSetId, + 'bonusPayCodeSetId', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -12224,14 +12904,6 @@ public function fullSummaryOfPayReportsRequest( ); } // path params - if ($payPeriod !== null) { - $resourcePath = str_replace( - '{' . 'payPeriod' . '}', - ObjectSerializer::toPathValue($payPeriod->value), - $resourcePath - ); - } - // path params if ($taxYear !== null) { $resourcePath = str_replace( '{' . 'taxYear' . '}', @@ -12242,7 +12914,7 @@ public function fullSummaryOfPayReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -12299,64 +12971,44 @@ public function fullSummaryOfPayReportsRequest( } /** - * Operation furloughReportReports + * Operation getP45AvailabilityReports * - * FurloughReport + * Get P45 Download Availability * - * @param string $employerId employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) - * @param int $periodNumber periodNumber (required) - * @param string|null $accept accept (optional) - * @param int|null $ordinal ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['furloughReportReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getP45AvailabilityReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\FurloughReportReportResponse + * @return \SynergiTech\Staffology\Model\ContractP45AvailabilityResponse[]|null */ - public function furloughReportReports( + public function getP45AvailabilityReports( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - int $periodNumber, - ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['furloughReportReports'][0] - ): \SynergiTech\Staffology\Model\FurloughReportReportResponse + string $contentType = self::contentTypes['getP45AvailabilityReports'][0] + ): ?array { - list($response) = $this->furloughReportReportsWithHttpInfo($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType); + list($response) = $this->getP45AvailabilityReportsWithHttpInfo($employerId, $contentType); return $response; } /** - * Operation furloughReportReportsWithHttpInfo + * Operation getP45AvailabilityReportsWithHttpInfo * - * FurloughReport + * Get P45 Download Availability * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int $periodNumber (required) - * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['furloughReportReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getP45AvailabilityReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\FurloughReportReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractP45AvailabilityResponse[], HTTP status code, HTTP response headers (array of strings) */ - public function furloughReportReportsWithHttpInfo( + public function getP45AvailabilityReportsWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - int $periodNumber, - ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['furloughReportReports'][0] + string $contentType = self::contentTypes['getP45AvailabilityReports'][0] ): array { - $request = $this->furloughReportReportsRequest($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType); + $request = $this->getP45AvailabilityReportsRequest($employerId, $contentType); try { $options = $this->createHttpClientOption(); @@ -12380,36 +13032,15 @@ public function furloughReportReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\FurloughReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\FurloughReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\FurloughReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractP45AvailabilityResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -12420,80 +13051,48 @@ public function furloughReportReportsWithHttpInfo( ), $statusCode, $response->getHeaders(), - (string) $response->getBody() - ); - } - - $returnType = '\SynergiTech\Staffology\Model\FurloughReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } + (string) $response->getBody() + ); } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractP45AvailabilityResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\FurloughReportReportResponse', + '\SynergiTech\Staffology\Model\ContractP45AvailabilityResponse[]', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation furloughReportReportsAsync + * Operation getP45AvailabilityReportsAsync * - * FurloughReport + * Get P45 Download Availability * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int $periodNumber (required) - * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['furloughReportReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getP45AvailabilityReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function furloughReportReportsAsync( + public function getP45AvailabilityReportsAsync( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - int $periodNumber, - ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['furloughReportReports'][0] + string $contentType = self::contentTypes['getP45AvailabilityReports'][0] ): PromiseInterface { - return $this->furloughReportReportsAsyncWithHttpInfo($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType) + return $this->getP45AvailabilityReportsAsyncWithHttpInfo($employerId, $contentType) ->then( function ($response) { return $response[0]; @@ -12502,33 +13101,23 @@ function ($response) { } /** - * Operation furloughReportReportsAsyncWithHttpInfo + * Operation getP45AvailabilityReportsAsyncWithHttpInfo * - * FurloughReport + * Get P45 Download Availability * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int $periodNumber (required) - * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['furloughReportReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getP45AvailabilityReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function furloughReportReportsAsyncWithHttpInfo( + public function getP45AvailabilityReportsAsyncWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - int $periodNumber, - ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['furloughReportReports'][0] + string $contentType = self::contentTypes['getP45AvailabilityReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\FurloughReportReportResponse'; - $request = $this->furloughReportReportsRequest($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ContractP45AvailabilityResponse[]'; + $request = $this->getP45AvailabilityReportsRequest($employerId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12567,82 +13156,36 @@ function ($exception) { } /** - * Create request for operation 'furloughReportReports' + * Create request for operation 'getP45AvailabilityReports' * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int $periodNumber (required) - * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['furloughReportReports'] to see the possible values for this operation + * @param string $employerId The Id of the Employer. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getP45AvailabilityReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function furloughReportReportsRequest( + public function getP45AvailabilityReportsRequest( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - int $periodNumber, - ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['furloughReportReports'][0] + string $contentType = self::contentTypes['getP45AvailabilityReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling furloughReportReports' - ); - } - - // verify the required parameter 'payPeriod' is set - if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $payPeriod when calling furloughReportReports' - ); - } - - // verify the required parameter 'taxYear' is set - if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling furloughReportReports' - ); - } - - // verify the required parameter 'periodNumber' is set - if ($periodNumber === null || (is_array($periodNumber) && count($periodNumber) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $periodNumber when calling furloughReportReports' + 'Missing the required parameter $employerId when calling getP45AvailabilityReports' ); } - - - $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/furlough'; + $resourcePath = '/employers/{employerId}/reports/p45-availability'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $ordinal, - 'ordinal', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // header params - if ($accept !== null) { - $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); - } // path params if ($employerId !== null) { @@ -12652,34 +13195,10 @@ public function furloughReportReportsRequest( $resourcePath ); } - // path params - if ($payPeriod !== null) { - $resourcePath = str_replace( - '{' . 'payPeriod' . '}', - ObjectSerializer::toPathValue($payPeriod->value), - $resourcePath - ); - } - // path params - if ($taxYear !== null) { - $resourcePath = str_replace( - '{' . 'taxYear' . '}', - ObjectSerializer::toPathValue($taxYear->value), - $resourcePath - ); - } - // path params - if ($periodNumber !== null) { - $resourcePath = str_replace( - '{' . 'periodNumber' . '}', - ObjectSerializer::toPathValue($periodNumber), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', ], $contentType, $multipart ); @@ -12736,64 +13255,72 @@ public function furloughReportReportsRequest( } /** - * Operation genderPayGapReports + * Operation getPayRunCsvReports * - * Gender Pay Gap + * Get PayRun CSV * * @param string $employerId employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) - * @param \SynergiTech\Staffology\Model\GenderPayGapSnapShotDate|null $genderPayGapSnapShotDate genderPayGapSnapShotDate (optional) - * @param string|null $ordinaryPayCodeSetId ordinaryPayCodeSetId (optional) - * @param string|null $bonusPayCodeSetId bonusPayCodeSetId (optional) - * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['genderPayGapReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) + * @param int $periodNumber periodNumber (required) + * @param int|null $ordinal ordinal (optional, default to 1) + * @param \SynergiTech\Staffology\Model\PayRunCsvType|null $csvType Choose the type of CSV you want to generate (optional) + * @param string|null $mappingId If you provide the id of a PaymentCsvMapping that is column based then we'll return the CSV formatted accordingly (optional) + * @param string|null $accept accept (optional, default to 'application/json') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunCsvReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\GenderPayGapReportReportResponse + * @return \SynergiTech\Staffology\Model\ReportResponse */ - public function genderPayGapReports( + public function getPayRunCsvReports( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?\SynergiTech\Staffology\Model\GenderPayGapSnapShotDate $genderPayGapSnapShotDate = null, - ?string $ordinaryPayCodeSetId = null, - ?string $bonusPayCodeSetId = null, - ?string $accept = null, - string $contentType = self::contentTypes['genderPayGapReports'][0] - ): \SynergiTech\Staffology\Model\GenderPayGapReportReportResponse + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + ?int $ordinal = 1, + ?\SynergiTech\Staffology\Model\PayRunCsvType $csvType = null, + ?string $mappingId = null, + ?string $accept = 'application/json', + string $contentType = self::contentTypes['getPayRunCsvReports'][0] + ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->genderPayGapReportsWithHttpInfo($employerId, $taxYear, $genderPayGapSnapShotDate, $ordinaryPayCodeSetId, $bonusPayCodeSetId, $accept, $contentType); + list($response) = $this->getPayRunCsvReportsWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $csvType, $mappingId, $accept, $contentType); return $response; } /** - * Operation genderPayGapReportsWithHttpInfo + * Operation getPayRunCsvReportsWithHttpInfo * - * Gender Pay Gap + * Get PayRun CSV * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param \SynergiTech\Staffology\Model\GenderPayGapSnapShotDate|null $genderPayGapSnapShotDate (optional) - * @param string|null $ordinaryPayCodeSetId (optional) - * @param string|null $bonusPayCodeSetId (optional) - * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['genderPayGapReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param int $periodNumber (required) + * @param int|null $ordinal (optional, default to 1) + * @param \SynergiTech\Staffology\Model\PayRunCsvType|null $csvType Choose the type of CSV you want to generate (optional) + * @param string|null $mappingId If you provide the id of a PaymentCsvMapping that is column based then we'll return the CSV formatted accordingly (optional) + * @param string|null $accept (optional, default to 'application/json') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunCsvReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\GenderPayGapReportReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function genderPayGapReportsWithHttpInfo( + public function getPayRunCsvReportsWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?\SynergiTech\Staffology\Model\GenderPayGapSnapShotDate $genderPayGapSnapShotDate = null, - ?string $ordinaryPayCodeSetId = null, - ?string $bonusPayCodeSetId = null, - ?string $accept = null, - string $contentType = self::contentTypes['genderPayGapReports'][0] + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + ?int $ordinal = 1, + ?\SynergiTech\Staffology\Model\PayRunCsvType $csvType = null, + ?string $mappingId = null, + ?string $accept = 'application/json', + string $contentType = self::contentTypes['getPayRunCsvReports'][0] ): array { - $request = $this->genderPayGapReportsRequest($employerId, $taxYear, $genderPayGapSnapShotDate, $ordinaryPayCodeSetId, $bonusPayCodeSetId, $accept, $contentType); + $request = $this->getPayRunCsvReportsRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $csvType, $mappingId, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -12817,36 +13344,15 @@ public function genderPayGapReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\GenderPayGapReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\GenderPayGapReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\GenderPayGapReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -12861,76 +13367,58 @@ public function genderPayGapReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\GenderPayGapReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\GenderPayGapReportReportResponse', + '\SynergiTech\Staffology\Model\ReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation genderPayGapReportsAsync + * Operation getPayRunCsvReportsAsync * - * Gender Pay Gap + * Get PayRun CSV * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param \SynergiTech\Staffology\Model\GenderPayGapSnapShotDate|null $genderPayGapSnapShotDate (optional) - * @param string|null $ordinaryPayCodeSetId (optional) - * @param string|null $bonusPayCodeSetId (optional) - * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['genderPayGapReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param int $periodNumber (required) + * @param int|null $ordinal (optional, default to 1) + * @param \SynergiTech\Staffology\Model\PayRunCsvType|null $csvType Choose the type of CSV you want to generate (optional) + * @param string|null $mappingId If you provide the id of a PaymentCsvMapping that is column based then we'll return the CSV formatted accordingly (optional) + * @param string|null $accept (optional, default to 'application/json') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunCsvReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function genderPayGapReportsAsync( + public function getPayRunCsvReportsAsync( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?\SynergiTech\Staffology\Model\GenderPayGapSnapShotDate $genderPayGapSnapShotDate = null, - ?string $ordinaryPayCodeSetId = null, - ?string $bonusPayCodeSetId = null, - ?string $accept = null, - string $contentType = self::contentTypes['genderPayGapReports'][0] + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + ?int $ordinal = 1, + ?\SynergiTech\Staffology\Model\PayRunCsvType $csvType = null, + ?string $mappingId = null, + ?string $accept = 'application/json', + string $contentType = self::contentTypes['getPayRunCsvReports'][0] ): PromiseInterface { - return $this->genderPayGapReportsAsyncWithHttpInfo($employerId, $taxYear, $genderPayGapSnapShotDate, $ordinaryPayCodeSetId, $bonusPayCodeSetId, $accept, $contentType) + return $this->getPayRunCsvReportsAsyncWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $csvType, $mappingId, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -12939,33 +13427,37 @@ function ($response) { } /** - * Operation genderPayGapReportsAsyncWithHttpInfo + * Operation getPayRunCsvReportsAsyncWithHttpInfo * - * Gender Pay Gap + * Get PayRun CSV * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param \SynergiTech\Staffology\Model\GenderPayGapSnapShotDate|null $genderPayGapSnapShotDate (optional) - * @param string|null $ordinaryPayCodeSetId (optional) - * @param string|null $bonusPayCodeSetId (optional) - * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['genderPayGapReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param int $periodNumber (required) + * @param int|null $ordinal (optional, default to 1) + * @param \SynergiTech\Staffology\Model\PayRunCsvType|null $csvType Choose the type of CSV you want to generate (optional) + * @param string|null $mappingId If you provide the id of a PaymentCsvMapping that is column based then we'll return the CSV formatted accordingly (optional) + * @param string|null $accept (optional, default to 'application/json') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunCsvReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function genderPayGapReportsAsyncWithHttpInfo( + public function getPayRunCsvReportsAsyncWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?\SynergiTech\Staffology\Model\GenderPayGapSnapShotDate $genderPayGapSnapShotDate = null, - ?string $ordinaryPayCodeSetId = null, - ?string $bonusPayCodeSetId = null, - ?string $accept = null, - string $contentType = self::contentTypes['genderPayGapReports'][0] + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + ?int $ordinal = 1, + ?\SynergiTech\Staffology\Model\PayRunCsvType $csvType = null, + ?string $mappingId = null, + ?string $accept = 'application/json', + string $contentType = self::contentTypes['getPayRunCsvReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\GenderPayGapReportReportResponse'; - $request = $this->genderPayGapReportsRequest($employerId, $taxYear, $genderPayGapSnapShotDate, $ordinaryPayCodeSetId, $bonusPayCodeSetId, $accept, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; + $request = $this->getPayRunCsvReportsRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $csvType, $mappingId, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13004,41 +13496,59 @@ function ($exception) { } /** - * Create request for operation 'genderPayGapReports' + * Create request for operation 'getPayRunCsvReports' * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param \SynergiTech\Staffology\Model\GenderPayGapSnapShotDate|null $genderPayGapSnapShotDate (optional) - * @param string|null $ordinaryPayCodeSetId (optional) - * @param string|null $bonusPayCodeSetId (optional) - * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['genderPayGapReports'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param int $periodNumber (required) + * @param int|null $ordinal (optional, default to 1) + * @param \SynergiTech\Staffology\Model\PayRunCsvType|null $csvType Choose the type of CSV you want to generate (optional) + * @param string|null $mappingId If you provide the id of a PaymentCsvMapping that is column based then we'll return the CSV formatted accordingly (optional) + * @param string|null $accept (optional, default to 'application/json') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunCsvReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function genderPayGapReportsRequest( + public function getPayRunCsvReportsRequest( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?\SynergiTech\Staffology\Model\GenderPayGapSnapShotDate $genderPayGapSnapShotDate = null, - ?string $ordinaryPayCodeSetId = null, - ?string $bonusPayCodeSetId = null, - ?string $accept = null, - string $contentType = self::contentTypes['genderPayGapReports'][0] + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $periodNumber, + ?int $ordinal = 1, + ?\SynergiTech\Staffology\Model\PayRunCsvType $csvType = null, + ?string $mappingId = null, + ?string $accept = 'application/json', + string $contentType = self::contentTypes['getPayRunCsvReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling genderPayGapReports' + 'Missing the required parameter $employerId when calling getPayRunCsvReports' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling genderPayGapReports' + 'Missing the required parameter $taxYear when calling getPayRunCsvReports' + ); + } + + // verify the required parameter 'payPeriod' is set + if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $payPeriod when calling getPayRunCsvReports' + ); + } + + // verify the required parameter 'periodNumber' is set + if ($periodNumber === null || (is_array($periodNumber) && count($periodNumber) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $periodNumber when calling getPayRunCsvReports' ); } @@ -13047,7 +13557,7 @@ public function genderPayGapReportsRequest( - $resourcePath = '/employers/{employerId}/reports/{taxYear}/GenderPayGap'; + $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payruncsv'; $formParams = []; $queryParams = []; $headerParams = []; @@ -13056,26 +13566,26 @@ public function genderPayGapReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $genderPayGapSnapShotDate?->value, - 'genderPayGapSnapShotDate', // param base name - 'GenderPayGapSnapShotDate', // openApiType + $ordinal, + 'ordinal', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $ordinaryPayCodeSetId, - 'ordinaryPayCodeSetId', // param base name - 'string', // openApiType + $csvType?->value, + 'csvType', // param base name + 'PayRunCsvType', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $bonusPayCodeSetId, - 'bonusPayCodeSetId', // param base name + $mappingId, + 'mappingId', // param base name 'string', // openApiType 'form', // style true, // explode @@ -13103,10 +13613,26 @@ public function genderPayGapReportsRequest( $resourcePath ); } + // path params + if ($payPeriod !== null) { + $resourcePath = str_replace( + '{' . 'payPeriod' . '}', + ObjectSerializer::toPathValue($payPeriod->value), + $resourcePath + ); + } + // path params + if ($periodNumber !== null) { + $resourcePath = str_replace( + '{' . 'periodNumber' . '}', + ObjectSerializer::toPathValue($periodNumber), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', ], + ['application/json', 'text/csv', ], $contentType, $multipart ); @@ -13163,72 +13689,84 @@ public function genderPayGapReportsRequest( } /** - * Operation getPayRunCsvReports + * Operation grossToNetReports * - * Get PayRun CSV + * Gross To Net * * @param string $employerId employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) - * @param int $periodNumber periodNumber (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) + * @param int|null $fromPeriod fromPeriod (optional) + * @param int|null $toPeriod toPeriod (optional) + * @param string|null $accept accept (optional) + * @param \SynergiTech\Staffology\Model\ReportSortBy|null $sortBy Defines the way to sort the data. Defaults to sorting by PayrollCode. (optional) + * @param bool|null $sortDescending Defines whether to sort the data in descending order. Defaults to false. (optional) * @param int|null $ordinal ordinal (optional, default to 1) - * @param \SynergiTech\Staffology\Model\PayRunCsvType|null $csvType Choose the type of CSV you want to generate (optional) - * @param string|null $mappingId If you provide the id of a PaymentCsvMapping that is column based then we'll return the CSV formatted accordingly (optional) - * @param string|null $accept accept (optional, default to 'application/json') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunCsvReports'] to see the possible values for this operation + * @param bool|null $forCis If true then CIS Subcontractors are reported on. If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['grossToNetReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ReportResponse + * @return \SynergiTech\Staffology\Model\GrossToNetReportReportResponse */ - public function getPayRunCsvReports( + public function grossToNetReports( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $fromPeriod = null, + ?int $toPeriod = null, + ?string $accept = null, + ?\SynergiTech\Staffology\Model\ReportSortBy $sortBy = null, + ?bool $sortDescending = null, ?int $ordinal = 1, - ?\SynergiTech\Staffology\Model\PayRunCsvType $csvType = null, - ?string $mappingId = null, - ?string $accept = 'application/json', - string $contentType = self::contentTypes['getPayRunCsvReports'][0] - ): \SynergiTech\Staffology\Model\ReportResponse + ?bool $forCis = false, + ?int $version = null, + string $contentType = self::contentTypes['grossToNetReports'][0] + ): \SynergiTech\Staffology\Model\GrossToNetReportReportResponse { - list($response) = $this->getPayRunCsvReportsWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $csvType, $mappingId, $accept, $contentType); + list($response) = $this->grossToNetReportsWithHttpInfo($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $sortBy, $sortDescending, $ordinal, $forCis, $version, $contentType); return $response; } /** - * Operation getPayRunCsvReportsWithHttpInfo + * Operation grossToNetReportsWithHttpInfo * - * Get PayRun CSV + * Gross To Net * * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param int $periodNumber (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $fromPeriod (optional) + * @param int|null $toPeriod (optional) + * @param string|null $accept (optional) + * @param \SynergiTech\Staffology\Model\ReportSortBy|null $sortBy Defines the way to sort the data. Defaults to sorting by PayrollCode. (optional) + * @param bool|null $sortDescending Defines whether to sort the data in descending order. Defaults to false. (optional) * @param int|null $ordinal (optional, default to 1) - * @param \SynergiTech\Staffology\Model\PayRunCsvType|null $csvType Choose the type of CSV you want to generate (optional) - * @param string|null $mappingId If you provide the id of a PaymentCsvMapping that is column based then we'll return the CSV formatted accordingly (optional) - * @param string|null $accept (optional, default to 'application/json') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunCsvReports'] to see the possible values for this operation + * @param bool|null $forCis If true then CIS Subcontractors are reported on. If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['grossToNetReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\GrossToNetReportReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getPayRunCsvReportsWithHttpInfo( + public function grossToNetReportsWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $fromPeriod = null, + ?int $toPeriod = null, + ?string $accept = null, + ?\SynergiTech\Staffology\Model\ReportSortBy $sortBy = null, + ?bool $sortDescending = null, ?int $ordinal = 1, - ?\SynergiTech\Staffology\Model\PayRunCsvType $csvType = null, - ?string $mappingId = null, - ?string $accept = 'application/json', - string $contentType = self::contentTypes['getPayRunCsvReports'][0] + ?bool $forCis = false, + ?int $version = null, + string $contentType = self::contentTypes['grossToNetReports'][0] ): array { - $request = $this->getPayRunCsvReportsRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $csvType, $mappingId, $accept, $contentType); + $request = $this->grossToNetReportsRequest($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $sortBy, $sortDescending, $ordinal, $forCis, $version, $contentType); try { $options = $this->createHttpClientOption(); @@ -13252,36 +13790,15 @@ public function getPayRunCsvReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\GrossToNetReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -13296,80 +13813,64 @@ public function getPayRunCsvReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\GrossToNetReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ReportResponse', + '\SynergiTech\Staffology\Model\GrossToNetReportReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getPayRunCsvReportsAsync + * Operation grossToNetReportsAsync * - * Get PayRun CSV + * Gross To Net * * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param int $periodNumber (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $fromPeriod (optional) + * @param int|null $toPeriod (optional) + * @param string|null $accept (optional) + * @param \SynergiTech\Staffology\Model\ReportSortBy|null $sortBy Defines the way to sort the data. Defaults to sorting by PayrollCode. (optional) + * @param bool|null $sortDescending Defines whether to sort the data in descending order. Defaults to false. (optional) * @param int|null $ordinal (optional, default to 1) - * @param \SynergiTech\Staffology\Model\PayRunCsvType|null $csvType Choose the type of CSV you want to generate (optional) - * @param string|null $mappingId If you provide the id of a PaymentCsvMapping that is column based then we'll return the CSV formatted accordingly (optional) - * @param string|null $accept (optional, default to 'application/json') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunCsvReports'] to see the possible values for this operation + * @param bool|null $forCis If true then CIS Subcontractors are reported on. If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['grossToNetReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getPayRunCsvReportsAsync( + public function grossToNetReportsAsync( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $fromPeriod = null, + ?int $toPeriod = null, + ?string $accept = null, + ?\SynergiTech\Staffology\Model\ReportSortBy $sortBy = null, + ?bool $sortDescending = null, ?int $ordinal = 1, - ?\SynergiTech\Staffology\Model\PayRunCsvType $csvType = null, - ?string $mappingId = null, - ?string $accept = 'application/json', - string $contentType = self::contentTypes['getPayRunCsvReports'][0] + ?bool $forCis = false, + ?int $version = null, + string $contentType = self::contentTypes['grossToNetReports'][0] ): PromiseInterface { - return $this->getPayRunCsvReportsAsyncWithHttpInfo($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $csvType, $mappingId, $accept, $contentType) + return $this->grossToNetReportsAsyncWithHttpInfo($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $sortBy, $sortDescending, $ordinal, $forCis, $version, $contentType) ->then( function ($response) { return $response[0]; @@ -13378,37 +13879,43 @@ function ($response) { } /** - * Operation getPayRunCsvReportsAsyncWithHttpInfo + * Operation grossToNetReportsAsyncWithHttpInfo * - * Get PayRun CSV + * Gross To Net * * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param int $periodNumber (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $fromPeriod (optional) + * @param int|null $toPeriod (optional) + * @param string|null $accept (optional) + * @param \SynergiTech\Staffology\Model\ReportSortBy|null $sortBy Defines the way to sort the data. Defaults to sorting by PayrollCode. (optional) + * @param bool|null $sortDescending Defines whether to sort the data in descending order. Defaults to false. (optional) * @param int|null $ordinal (optional, default to 1) - * @param \SynergiTech\Staffology\Model\PayRunCsvType|null $csvType Choose the type of CSV you want to generate (optional) - * @param string|null $mappingId If you provide the id of a PaymentCsvMapping that is column based then we'll return the CSV formatted accordingly (optional) - * @param string|null $accept (optional, default to 'application/json') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunCsvReports'] to see the possible values for this operation + * @param bool|null $forCis If true then CIS Subcontractors are reported on. If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['grossToNetReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getPayRunCsvReportsAsyncWithHttpInfo( + public function grossToNetReportsAsyncWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $fromPeriod = null, + ?int $toPeriod = null, + ?string $accept = null, + ?\SynergiTech\Staffology\Model\ReportSortBy $sortBy = null, + ?bool $sortDescending = null, ?int $ordinal = 1, - ?\SynergiTech\Staffology\Model\PayRunCsvType $csvType = null, - ?string $mappingId = null, - ?string $accept = 'application/json', - string $contentType = self::contentTypes['getPayRunCsvReports'][0] + ?bool $forCis = false, + ?int $version = null, + string $contentType = self::contentTypes['grossToNetReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->getPayRunCsvReportsRequest($employerId, $taxYear, $payPeriod, $periodNumber, $ordinal, $csvType, $mappingId, $accept, $contentType); + $returnType = '\SynergiTech\Staffology\Model\GrossToNetReportReportResponse'; + $request = $this->grossToNetReportsRequest($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $sortBy, $sortDescending, $ordinal, $forCis, $version, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13447,59 +13954,58 @@ function ($exception) { } /** - * Create request for operation 'getPayRunCsvReports' + * Create request for operation 'grossToNetReports' * * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param int $periodNumber (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $fromPeriod (optional) + * @param int|null $toPeriod (optional) + * @param string|null $accept (optional) + * @param \SynergiTech\Staffology\Model\ReportSortBy|null $sortBy Defines the way to sort the data. Defaults to sorting by PayrollCode. (optional) + * @param bool|null $sortDescending Defines whether to sort the data in descending order. Defaults to false. (optional) * @param int|null $ordinal (optional, default to 1) - * @param \SynergiTech\Staffology\Model\PayRunCsvType|null $csvType Choose the type of CSV you want to generate (optional) - * @param string|null $mappingId If you provide the id of a PaymentCsvMapping that is column based then we'll return the CSV formatted accordingly (optional) - * @param string|null $accept (optional, default to 'application/json') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayRunCsvReports'] to see the possible values for this operation + * @param bool|null $forCis If true then CIS Subcontractors are reported on. If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['grossToNetReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPayRunCsvReportsRequest( + public function grossToNetReportsRequest( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - int $periodNumber, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $fromPeriod = null, + ?int $toPeriod = null, + ?string $accept = null, + ?\SynergiTech\Staffology\Model\ReportSortBy $sortBy = null, + ?bool $sortDescending = null, ?int $ordinal = 1, - ?\SynergiTech\Staffology\Model\PayRunCsvType $csvType = null, - ?string $mappingId = null, - ?string $accept = 'application/json', - string $contentType = self::contentTypes['getPayRunCsvReports'][0] + ?bool $forCis = false, + ?int $version = null, + string $contentType = self::contentTypes['grossToNetReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling getPayRunCsvReports' - ); - } - - // verify the required parameter 'taxYear' is set - if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling getPayRunCsvReports' + 'Missing the required parameter $employerId when calling grossToNetReports' ); } // verify the required parameter 'payPeriod' is set if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $payPeriod when calling getPayRunCsvReports' + 'Missing the required parameter $payPeriod when calling grossToNetReports' ); } - // verify the required parameter 'periodNumber' is set - if ($periodNumber === null || (is_array($periodNumber) && count($periodNumber) === 0)) { + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $periodNumber when calling getPayRunCsvReports' + 'Missing the required parameter $taxYear when calling grossToNetReports' ); } @@ -13508,13 +14014,53 @@ public function getPayRunCsvReportsRequest( - $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payruncsv'; + + + + + $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/gross-to-net'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fromPeriod, + 'fromPeriod', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $toPeriod, + 'toPeriod', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sortBy?->value, + 'sortBy', // param base name + 'ReportSortBy', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sortDescending, + 'sortDescending', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $ordinal, @@ -13526,18 +14072,18 @@ public function getPayRunCsvReportsRequest( ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $csvType?->value, - 'csvType', // param base name - 'PayRunCsvType', // openApiType + $forCis, + 'forCis', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $mappingId, - 'mappingId', // param base name - 'string', // openApiType + $version, + 'version', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required @@ -13557,14 +14103,6 @@ public function getPayRunCsvReportsRequest( ); } // path params - if ($taxYear !== null) { - $resourcePath = str_replace( - '{' . 'taxYear' . '}', - ObjectSerializer::toPathValue($taxYear->value), - $resourcePath - ); - } - // path params if ($payPeriod !== null) { $resourcePath = str_replace( '{' . 'payPeriod' . '}', @@ -13573,17 +14111,17 @@ public function getPayRunCsvReportsRequest( ); } // path params - if ($periodNumber !== null) { + if ($taxYear !== null) { $resourcePath = str_replace( - '{' . 'periodNumber' . '}', - ObjectSerializer::toPathValue($periodNumber), + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), $resourcePath ); } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -13640,80 +14178,56 @@ public function getPayRunCsvReportsRequest( } /** - * Operation grossToNetReports + * Operation holidayReports * - * Gross To Net + * Holiday * * @param string $employerId employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) - * @param int|null $fromPeriod fromPeriod (optional) - * @param int|null $toPeriod toPeriod (optional) * @param string|null $accept accept (optional) - * @param \SynergiTech\Staffology\Model\ReportSortBy|null $sortBy Defines the way to sort the data. Defaults to sorting by PayrollCode. (optional) - * @param bool|null $sortDescending Defines whether to sort the data in descending order. Defaults to false. (optional) - * @param int|null $ordinal ordinal (optional, default to 1) - * @param bool|null $forCis If true then CIS Subcontractors are reported on. If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['grossToNetReports'] to see the possible values for this operation + * @param bool|null $accruals If set to true then you'll receive a report for holiday pay accruals instead of holiday allowances. Defaults to false. (optional, default to false) + * @param bool|null $accrualsHrs If set to true then you'll receive a report for holiday pay accruals hours. Defaults to false. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['holidayReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\GrossToNetReportReportResponse + * @return \SynergiTech\Staffology\Model\HolidayReportReportResponse */ - public function grossToNetReports( + public function holidayReports( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $fromPeriod = null, - ?int $toPeriod = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\ReportSortBy $sortBy = null, - ?bool $sortDescending = null, - ?int $ordinal = 1, - ?bool $forCis = false, - string $contentType = self::contentTypes['grossToNetReports'][0] - ): \SynergiTech\Staffology\Model\GrossToNetReportReportResponse + ?bool $accruals = false, + ?bool $accrualsHrs = false, + string $contentType = self::contentTypes['holidayReports'][0] + ): \SynergiTech\Staffology\Model\HolidayReportReportResponse { - list($response) = $this->grossToNetReportsWithHttpInfo($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $sortBy, $sortDescending, $ordinal, $forCis, $contentType); + list($response) = $this->holidayReportsWithHttpInfo($employerId, $accept, $accruals, $accrualsHrs, $contentType); return $response; } /** - * Operation grossToNetReportsWithHttpInfo + * Operation holidayReportsWithHttpInfo * - * Gross To Net + * Holiday * * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $fromPeriod (optional) - * @param int|null $toPeriod (optional) * @param string|null $accept (optional) - * @param \SynergiTech\Staffology\Model\ReportSortBy|null $sortBy Defines the way to sort the data. Defaults to sorting by PayrollCode. (optional) - * @param bool|null $sortDescending Defines whether to sort the data in descending order. Defaults to false. (optional) - * @param int|null $ordinal (optional, default to 1) - * @param bool|null $forCis If true then CIS Subcontractors are reported on. If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['grossToNetReports'] to see the possible values for this operation + * @param bool|null $accruals If set to true then you'll receive a report for holiday pay accruals instead of holiday allowances. Defaults to false. (optional, default to false) + * @param bool|null $accrualsHrs If set to true then you'll receive a report for holiday pay accruals hours. Defaults to false. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['holidayReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\GrossToNetReportReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\HolidayReportReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function grossToNetReportsWithHttpInfo( + public function holidayReportsWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $fromPeriod = null, - ?int $toPeriod = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\ReportSortBy $sortBy = null, - ?bool $sortDescending = null, - ?int $ordinal = 1, - ?bool $forCis = false, - string $contentType = self::contentTypes['grossToNetReports'][0] + ?bool $accruals = false, + ?bool $accrualsHrs = false, + string $contentType = self::contentTypes['holidayReports'][0] ): array { - $request = $this->grossToNetReportsRequest($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $sortBy, $sortDescending, $ordinal, $forCis, $contentType); + $request = $this->holidayReportsRequest($employerId, $accept, $accruals, $accrualsHrs, $contentType); try { $options = $this->createHttpClientOption(); @@ -13737,36 +14251,15 @@ public function grossToNetReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\GrossToNetReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\GrossToNetReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\GrossToNetReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\HolidayReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -13781,84 +14274,50 @@ public function grossToNetReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\GrossToNetReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\HolidayReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\GrossToNetReportReportResponse', + '\SynergiTech\Staffology\Model\HolidayReportReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation grossToNetReportsAsync + * Operation holidayReportsAsync * - * Gross To Net + * Holiday * * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $fromPeriod (optional) - * @param int|null $toPeriod (optional) * @param string|null $accept (optional) - * @param \SynergiTech\Staffology\Model\ReportSortBy|null $sortBy Defines the way to sort the data. Defaults to sorting by PayrollCode. (optional) - * @param bool|null $sortDescending Defines whether to sort the data in descending order. Defaults to false. (optional) - * @param int|null $ordinal (optional, default to 1) - * @param bool|null $forCis If true then CIS Subcontractors are reported on. If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['grossToNetReports'] to see the possible values for this operation + * @param bool|null $accruals If set to true then you'll receive a report for holiday pay accruals instead of holiday allowances. Defaults to false. (optional, default to false) + * @param bool|null $accrualsHrs If set to true then you'll receive a report for holiday pay accruals hours. Defaults to false. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['holidayReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function grossToNetReportsAsync( + public function holidayReportsAsync( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $fromPeriod = null, - ?int $toPeriod = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\ReportSortBy $sortBy = null, - ?bool $sortDescending = null, - ?int $ordinal = 1, - ?bool $forCis = false, - string $contentType = self::contentTypes['grossToNetReports'][0] + ?bool $accruals = false, + ?bool $accrualsHrs = false, + string $contentType = self::contentTypes['holidayReports'][0] ): PromiseInterface { - return $this->grossToNetReportsAsyncWithHttpInfo($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $sortBy, $sortDescending, $ordinal, $forCis, $contentType) + return $this->holidayReportsAsyncWithHttpInfo($employerId, $accept, $accruals, $accrualsHrs, $contentType) ->then( function ($response) { return $response[0]; @@ -13867,41 +14326,29 @@ function ($response) { } /** - * Operation grossToNetReportsAsyncWithHttpInfo + * Operation holidayReportsAsyncWithHttpInfo * - * Gross To Net + * Holiday * * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $fromPeriod (optional) - * @param int|null $toPeriod (optional) * @param string|null $accept (optional) - * @param \SynergiTech\Staffology\Model\ReportSortBy|null $sortBy Defines the way to sort the data. Defaults to sorting by PayrollCode. (optional) - * @param bool|null $sortDescending Defines whether to sort the data in descending order. Defaults to false. (optional) - * @param int|null $ordinal (optional, default to 1) - * @param bool|null $forCis If true then CIS Subcontractors are reported on. If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['grossToNetReports'] to see the possible values for this operation + * @param bool|null $accruals If set to true then you'll receive a report for holiday pay accruals instead of holiday allowances. Defaults to false. (optional, default to false) + * @param bool|null $accrualsHrs If set to true then you'll receive a report for holiday pay accruals hours. Defaults to false. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['holidayReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function grossToNetReportsAsyncWithHttpInfo( + public function holidayReportsAsyncWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $fromPeriod = null, - ?int $toPeriod = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\ReportSortBy $sortBy = null, - ?bool $sortDescending = null, - ?int $ordinal = 1, - ?bool $forCis = false, - string $contentType = self::contentTypes['grossToNetReports'][0] + ?bool $accruals = false, + ?bool $accrualsHrs = false, + string $contentType = self::contentTypes['holidayReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\GrossToNetReportReportResponse'; - $request = $this->grossToNetReportsRequest($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $sortBy, $sortDescending, $ordinal, $forCis, $contentType); + $returnType = '\SynergiTech\Staffology\Model\HolidayReportReportResponse'; + $request = $this->holidayReportsRequest($employerId, $accept, $accruals, $accrualsHrs, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13940,56 +14387,30 @@ function ($exception) { } /** - * Create request for operation 'grossToNetReports' + * Create request for operation 'holidayReports' * * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $fromPeriod (optional) - * @param int|null $toPeriod (optional) * @param string|null $accept (optional) - * @param \SynergiTech\Staffology\Model\ReportSortBy|null $sortBy Defines the way to sort the data. Defaults to sorting by PayrollCode. (optional) - * @param bool|null $sortDescending Defines whether to sort the data in descending order. Defaults to false. (optional) - * @param int|null $ordinal (optional, default to 1) - * @param bool|null $forCis If true then CIS Subcontractors are reported on. If all your employees are CIS Subcontractors then this will default to true, otherwise it defaults to false (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['grossToNetReports'] to see the possible values for this operation + * @param bool|null $accruals If set to true then you'll receive a report for holiday pay accruals instead of holiday allowances. Defaults to false. (optional, default to false) + * @param bool|null $accrualsHrs If set to true then you'll receive a report for holiday pay accruals hours. Defaults to false. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['holidayReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function grossToNetReportsRequest( + public function holidayReportsRequest( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $fromPeriod = null, - ?int $toPeriod = null, ?string $accept = null, - ?\SynergiTech\Staffology\Model\ReportSortBy $sortBy = null, - ?bool $sortDescending = null, - ?int $ordinal = 1, - ?bool $forCis = false, - string $contentType = self::contentTypes['grossToNetReports'][0] + ?bool $accruals = false, + ?bool $accrualsHrs = false, + string $contentType = self::contentTypes['holidayReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling grossToNetReports' - ); - } - - // verify the required parameter 'payPeriod' is set - if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $payPeriod when calling grossToNetReports' - ); - } - - // verify the required parameter 'taxYear' is set - if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling grossToNetReports' + 'Missing the required parameter $employerId when calling holidayReports' ); } @@ -13997,11 +14418,7 @@ public function grossToNetReportsRequest( - - - - - $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/gross-to-net'; + $resourcePath = '/employers/{employerId}/reports/holiday'; $formParams = []; $queryParams = []; $headerParams = []; @@ -14010,35 +14427,8 @@ public function grossToNetReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $fromPeriod, - 'fromPeriod', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $toPeriod, - 'toPeriod', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sortBy?->value, - 'sortBy', // param base name - 'ReportSortBy', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sortDescending, - 'sortDescending', // param base name + $accruals, + 'accruals', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -14046,17 +14436,8 @@ public function grossToNetReportsRequest( ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $ordinal, - 'ordinal', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $forCis, - 'forCis', // param base name + $accrualsHrs, + 'accrualsHrs', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -14076,26 +14457,10 @@ public function grossToNetReportsRequest( $resourcePath ); } - // path params - if ($payPeriod !== null) { - $resourcePath = str_replace( - '{' . 'payPeriod' . '}', - ObjectSerializer::toPathValue($payPeriod->value), - $resourcePath - ); - } - // path params - if ($taxYear !== null) { - $resourcePath = str_replace( - '{' . 'taxYear' . '}', - ObjectSerializer::toPathValue($taxYear->value), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -14152,56 +14517,68 @@ public function grossToNetReportsRequest( } /** - * Operation holidayReports + * Operation hourlyPayReports * - * Holiday + * Hourly Pay * * @param string $employerId employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) + * @param int|null $fromPeriod fromPeriod (optional) + * @param int|null $toPeriod toPeriod (optional) * @param string|null $accept accept (optional) - * @param bool|null $accruals If set to true then you'll receive a report for holiday pay accruals instead of holiday allowances. Defaults to false. (optional, default to false) - * @param bool|null $accrualsHrs If set to true then you'll receive a report for holiday pay accruals hours. Defaults to false. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['holidayReports'] to see the possible values for this operation + * @param int|null $ordinal ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hourlyPayReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\HolidayReportReportResponse + * @return \SynergiTech\Staffology\Model\HourlyPayReportReportResponse */ - public function holidayReports( + public function hourlyPayReports( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $fromPeriod = null, + ?int $toPeriod = null, ?string $accept = null, - ?bool $accruals = false, - ?bool $accrualsHrs = false, - string $contentType = self::contentTypes['holidayReports'][0] - ): \SynergiTech\Staffology\Model\HolidayReportReportResponse + ?int $ordinal = 1, + string $contentType = self::contentTypes['hourlyPayReports'][0] + ): \SynergiTech\Staffology\Model\HourlyPayReportReportResponse { - list($response) = $this->holidayReportsWithHttpInfo($employerId, $accept, $accruals, $accrualsHrs, $contentType); + list($response) = $this->hourlyPayReportsWithHttpInfo($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $ordinal, $contentType); return $response; } /** - * Operation holidayReportsWithHttpInfo + * Operation hourlyPayReportsWithHttpInfo * - * Holiday + * Hourly Pay * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $fromPeriod (optional) + * @param int|null $toPeriod (optional) * @param string|null $accept (optional) - * @param bool|null $accruals If set to true then you'll receive a report for holiday pay accruals instead of holiday allowances. Defaults to false. (optional, default to false) - * @param bool|null $accrualsHrs If set to true then you'll receive a report for holiday pay accruals hours. Defaults to false. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['holidayReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hourlyPayReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\HolidayReportReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\HourlyPayReportReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function holidayReportsWithHttpInfo( + public function hourlyPayReportsWithHttpInfo( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $fromPeriod = null, + ?int $toPeriod = null, ?string $accept = null, - ?bool $accruals = false, - ?bool $accrualsHrs = false, - string $contentType = self::contentTypes['holidayReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['hourlyPayReports'][0] ): array { - $request = $this->holidayReportsRequest($employerId, $accept, $accruals, $accrualsHrs, $contentType); + $request = $this->hourlyPayReportsRequest($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $ordinal, $contentType); try { $options = $this->createHttpClientOption(); @@ -14225,36 +14602,15 @@ public function holidayReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\HolidayReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\HolidayReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\HolidayReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\HourlyPayReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -14269,72 +14625,56 @@ public function holidayReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\HolidayReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\HourlyPayReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\HolidayReportReportResponse', + '\SynergiTech\Staffology\Model\HourlyPayReportReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation holidayReportsAsync + * Operation hourlyPayReportsAsync * - * Holiday + * Hourly Pay * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $fromPeriod (optional) + * @param int|null $toPeriod (optional) * @param string|null $accept (optional) - * @param bool|null $accruals If set to true then you'll receive a report for holiday pay accruals instead of holiday allowances. Defaults to false. (optional, default to false) - * @param bool|null $accrualsHrs If set to true then you'll receive a report for holiday pay accruals hours. Defaults to false. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['holidayReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hourlyPayReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function holidayReportsAsync( + public function hourlyPayReportsAsync( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $fromPeriod = null, + ?int $toPeriod = null, ?string $accept = null, - ?bool $accruals = false, - ?bool $accrualsHrs = false, - string $contentType = self::contentTypes['holidayReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['hourlyPayReports'][0] ): PromiseInterface { - return $this->holidayReportsAsyncWithHttpInfo($employerId, $accept, $accruals, $accrualsHrs, $contentType) + return $this->hourlyPayReportsAsyncWithHttpInfo($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $ordinal, $contentType) ->then( function ($response) { return $response[0]; @@ -14343,29 +14683,35 @@ function ($response) { } /** - * Operation holidayReportsAsyncWithHttpInfo + * Operation hourlyPayReportsAsyncWithHttpInfo * - * Holiday + * Hourly Pay * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $fromPeriod (optional) + * @param int|null $toPeriod (optional) * @param string|null $accept (optional) - * @param bool|null $accruals If set to true then you'll receive a report for holiday pay accruals instead of holiday allowances. Defaults to false. (optional, default to false) - * @param bool|null $accrualsHrs If set to true then you'll receive a report for holiday pay accruals hours. Defaults to false. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['holidayReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hourlyPayReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function holidayReportsAsyncWithHttpInfo( + public function hourlyPayReportsAsyncWithHttpInfo( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $fromPeriod = null, + ?int $toPeriod = null, ?string $accept = null, - ?bool $accruals = false, - ?bool $accrualsHrs = false, - string $contentType = self::contentTypes['holidayReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['hourlyPayReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\HolidayReportReportResponse'; - $request = $this->holidayReportsRequest($employerId, $accept, $accruals, $accrualsHrs, $contentType); + $returnType = '\SynergiTech\Staffology\Model\HourlyPayReportReportResponse'; + $request = $this->hourlyPayReportsRequest($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $ordinal, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14404,38 +14750,59 @@ function ($exception) { } /** - * Create request for operation 'holidayReports' + * Create request for operation 'hourlyPayReports' * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int|null $fromPeriod (optional) + * @param int|null $toPeriod (optional) * @param string|null $accept (optional) - * @param bool|null $accruals If set to true then you'll receive a report for holiday pay accruals instead of holiday allowances. Defaults to false. (optional, default to false) - * @param bool|null $accrualsHrs If set to true then you'll receive a report for holiday pay accruals hours. Defaults to false. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['holidayReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hourlyPayReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function holidayReportsRequest( + public function hourlyPayReportsRequest( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + ?int $fromPeriod = null, + ?int $toPeriod = null, ?string $accept = null, - ?bool $accruals = false, - ?bool $accrualsHrs = false, - string $contentType = self::contentTypes['holidayReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['hourlyPayReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling holidayReports' + 'Missing the required parameter $employerId when calling hourlyPayReports' ); } + // verify the required parameter 'payPeriod' is set + if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $payPeriod when calling hourlyPayReports' + ); + } + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling hourlyPayReports' + ); + } - $resourcePath = '/employers/{employerId}/reports/holiday'; + + + + $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/hourly-pay'; $formParams = []; $queryParams = []; $headerParams = []; @@ -14444,18 +14811,27 @@ public function holidayReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $accruals, - 'accruals', // param base name - 'boolean', // openApiType + $fromPeriod, + 'fromPeriod', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $accrualsHrs, - 'accrualsHrs', // param base name - 'boolean', // openApiType + $toPeriod, + 'toPeriod', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $ordinal, + 'ordinal', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required @@ -14474,10 +14850,26 @@ public function holidayReportsRequest( $resourcePath ); } + // path params + if ($payPeriod !== null) { + $resourcePath = str_replace( + '{' . 'payPeriod' . '}', + ObjectSerializer::toPathValue($payPeriod->value), + $resourcePath + ); + } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -14534,68 +14926,60 @@ public function holidayReportsRequest( } /** - * Operation hourlyPayReports + * Operation loanBalancesReports * - * Hourly Pay + * Loan Balances * - * @param string $employerId employerId (required) + * @param string $employerId The Id of the Employer. (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) - * @param int|null $fromPeriod fromPeriod (optional) - * @param int|null $toPeriod toPeriod (optional) * @param string|null $accept accept (optional) * @param int|null $ordinal ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hourlyPayReports'] to see the possible values for this operation + * @param bool|null $outstandingOnly outstandingOnly (optional, default to true) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['loanBalancesReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\HourlyPayReportReportResponse + * @return \SynergiTech\Staffology\Model\LoanBalancesReportReportResponse */ - public function hourlyPayReports( + public function loanBalancesReports( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $fromPeriod = null, - ?int $toPeriod = null, ?string $accept = null, ?int $ordinal = 1, - string $contentType = self::contentTypes['hourlyPayReports'][0] - ): \SynergiTech\Staffology\Model\HourlyPayReportReportResponse + ?bool $outstandingOnly = true, + string $contentType = self::contentTypes['loanBalancesReports'][0] + ): \SynergiTech\Staffology\Model\LoanBalancesReportReportResponse { - list($response) = $this->hourlyPayReportsWithHttpInfo($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $ordinal, $contentType); + list($response) = $this->loanBalancesReportsWithHttpInfo($employerId, $payPeriod, $accept, $ordinal, $outstandingOnly, $contentType); return $response; } /** - * Operation hourlyPayReportsWithHttpInfo + * Operation loanBalancesReportsWithHttpInfo * - * Hourly Pay + * Loan Balances * - * @param string $employerId (required) + * @param string $employerId The Id of the Employer. (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $fromPeriod (optional) - * @param int|null $toPeriod (optional) * @param string|null $accept (optional) * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hourlyPayReports'] to see the possible values for this operation + * @param bool|null $outstandingOnly (optional, default to true) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['loanBalancesReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\HourlyPayReportReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\LoanBalancesReportReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function hourlyPayReportsWithHttpInfo( + public function loanBalancesReportsWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $fromPeriod = null, - ?int $toPeriod = null, ?string $accept = null, ?int $ordinal = 1, - string $contentType = self::contentTypes['hourlyPayReports'][0] + ?bool $outstandingOnly = true, + string $contentType = self::contentTypes['loanBalancesReports'][0] ): array { - $request = $this->hourlyPayReportsRequest($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $ordinal, $contentType); + $request = $this->loanBalancesReportsRequest($employerId, $payPeriod, $accept, $ordinal, $outstandingOnly, $contentType); try { $options = $this->createHttpClientOption(); @@ -14619,36 +15003,15 @@ public function hourlyPayReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\HourlyPayReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\HourlyPayReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\HourlyPayReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\LoanBalancesReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -14663,78 +15026,52 @@ public function hourlyPayReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\HourlyPayReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\LoanBalancesReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\HourlyPayReportReportResponse', + '\SynergiTech\Staffology\Model\LoanBalancesReportReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation hourlyPayReportsAsync + * Operation loanBalancesReportsAsync * - * Hourly Pay + * Loan Balances * - * @param string $employerId (required) + * @param string $employerId The Id of the Employer. (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $fromPeriod (optional) - * @param int|null $toPeriod (optional) * @param string|null $accept (optional) * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hourlyPayReports'] to see the possible values for this operation + * @param bool|null $outstandingOnly (optional, default to true) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['loanBalancesReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function hourlyPayReportsAsync( + public function loanBalancesReportsAsync( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $fromPeriod = null, - ?int $toPeriod = null, ?string $accept = null, ?int $ordinal = 1, - string $contentType = self::contentTypes['hourlyPayReports'][0] + ?bool $outstandingOnly = true, + string $contentType = self::contentTypes['loanBalancesReports'][0] ): PromiseInterface { - return $this->hourlyPayReportsAsyncWithHttpInfo($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $ordinal, $contentType) + return $this->loanBalancesReportsAsyncWithHttpInfo($employerId, $payPeriod, $accept, $ordinal, $outstandingOnly, $contentType) ->then( function ($response) { return $response[0]; @@ -14743,35 +15080,31 @@ function ($response) { } /** - * Operation hourlyPayReportsAsyncWithHttpInfo + * Operation loanBalancesReportsAsyncWithHttpInfo * - * Hourly Pay + * Loan Balances * - * @param string $employerId (required) + * @param string $employerId The Id of the Employer. (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $fromPeriod (optional) - * @param int|null $toPeriod (optional) * @param string|null $accept (optional) * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hourlyPayReports'] to see the possible values for this operation + * @param bool|null $outstandingOnly (optional, default to true) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['loanBalancesReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function hourlyPayReportsAsyncWithHttpInfo( + public function loanBalancesReportsAsyncWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $fromPeriod = null, - ?int $toPeriod = null, ?string $accept = null, ?int $ordinal = 1, - string $contentType = self::contentTypes['hourlyPayReports'][0] + ?bool $outstandingOnly = true, + string $contentType = self::contentTypes['loanBalancesReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\HourlyPayReportReportResponse'; - $request = $this->hourlyPayReportsRequest($employerId, $payPeriod, $taxYear, $fromPeriod, $toPeriod, $accept, $ordinal, $contentType); + $returnType = '\SynergiTech\Staffology\Model\LoanBalancesReportReportResponse'; + $request = $this->loanBalancesReportsRequest($employerId, $payPeriod, $accept, $ordinal, $outstandingOnly, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14810,50 +15143,39 @@ function ($exception) { } /** - * Create request for operation 'hourlyPayReports' + * Create request for operation 'loanBalancesReports' * - * @param string $employerId (required) + * @param string $employerId The Id of the Employer. (required) * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int|null $fromPeriod (optional) - * @param int|null $toPeriod (optional) * @param string|null $accept (optional) * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hourlyPayReports'] to see the possible values for this operation + * @param bool|null $outstandingOnly (optional, default to true) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['loanBalancesReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function hourlyPayReportsRequest( + public function loanBalancesReportsRequest( string $employerId, \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - ?int $fromPeriod = null, - ?int $toPeriod = null, ?string $accept = null, ?int $ordinal = 1, - string $contentType = self::contentTypes['hourlyPayReports'][0] + ?bool $outstandingOnly = true, + string $contentType = self::contentTypes['loanBalancesReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling hourlyPayReports' + 'Missing the required parameter $employerId when calling loanBalancesReports' ); } // verify the required parameter 'payPeriod' is set if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $payPeriod when calling hourlyPayReports' - ); - } - - // verify the required parameter 'taxYear' is set - if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling hourlyPayReports' + 'Missing the required parameter $payPeriod when calling loanBalancesReports' ); } @@ -14861,27 +15183,17 @@ public function hourlyPayReportsRequest( - - $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/hourly-pay'; + $resourcePath = '/employers/{employerId}/reports/{payPeriod}/loanbalances'; $formParams = []; $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $fromPeriod, - 'fromPeriod', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + $headerParams = []; + $httpBody = ''; + $multipart = false; + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $toPeriod, - 'toPeriod', // param base name + $ordinal, + 'ordinal', // param base name 'integer', // openApiType 'form', // style true, // explode @@ -14889,9 +15201,9 @@ public function hourlyPayReportsRequest( ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $ordinal, - 'ordinal', // param base name - 'integer', // openApiType + $outstandingOnly, + 'outstandingOnly', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required @@ -14918,18 +15230,10 @@ public function hourlyPayReportsRequest( $resourcePath ); } - // path params - if ($taxYear !== null) { - $resourcePath = str_replace( - '{' . 'taxYear' . '}', - ObjectSerializer::toPathValue($taxYear->value), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -14986,56 +15290,56 @@ public function hourlyPayReportsRequest( } /** - * Operation loanBalancesReports + * Operation niLetterValidationReportEmployeesReports * - * Loan Balances + * NI Letter Validation (Employees) * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) + * @param string $employerId employerId (required) * @param string|null $accept accept (optional) - * @param int|null $ordinal ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['loanBalancesReports'] to see the possible values for this operation + * @param \DateTime|null $payDate payDate (optional) + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportEmployeesReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\LoanBalancesReportReportResponse + * @return \SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse */ - public function loanBalancesReports( + public function niLetterValidationReportEmployeesReports( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['loanBalancesReports'][0] - ): \SynergiTech\Staffology\Model\LoanBalancesReportReportResponse + ?\DateTime $payDate = null, + ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, + string $contentType = self::contentTypes['niLetterValidationReportEmployeesReports'][0] + ): \SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse { - list($response) = $this->loanBalancesReportsWithHttpInfo($employerId, $payPeriod, $accept, $ordinal, $contentType); + list($response) = $this->niLetterValidationReportEmployeesReportsWithHttpInfo($employerId, $accept, $payDate, $payPeriod, $contentType); return $response; } /** - * Operation loanBalancesReportsWithHttpInfo + * Operation niLetterValidationReportEmployeesReportsWithHttpInfo * - * Loan Balances + * NI Letter Validation (Employees) * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param string $employerId (required) * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['loanBalancesReports'] to see the possible values for this operation + * @param \DateTime|null $payDate (optional) + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportEmployeesReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\LoanBalancesReportReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function loanBalancesReportsWithHttpInfo( + public function niLetterValidationReportEmployeesReportsWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['loanBalancesReports'][0] + ?\DateTime $payDate = null, + ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, + string $contentType = self::contentTypes['niLetterValidationReportEmployeesReports'][0] ): array { - $request = $this->loanBalancesReportsRequest($employerId, $payPeriod, $accept, $ordinal, $contentType); + $request = $this->niLetterValidationReportEmployeesReportsRequest($employerId, $accept, $payDate, $payPeriod, $contentType); try { $options = $this->createHttpClientOption(); @@ -15059,36 +15363,15 @@ public function loanBalancesReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\LoanBalancesReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\LoanBalancesReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\LoanBalancesReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -15103,72 +15386,50 @@ public function loanBalancesReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\LoanBalancesReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\LoanBalancesReportReportResponse', + '\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation loanBalancesReportsAsync + * Operation niLetterValidationReportEmployeesReportsAsync * - * Loan Balances + * NI Letter Validation (Employees) * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param string $employerId (required) * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['loanBalancesReports'] to see the possible values for this operation + * @param \DateTime|null $payDate (optional) + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportEmployeesReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function loanBalancesReportsAsync( + public function niLetterValidationReportEmployeesReportsAsync( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['loanBalancesReports'][0] + ?\DateTime $payDate = null, + ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, + string $contentType = self::contentTypes['niLetterValidationReportEmployeesReports'][0] ): PromiseInterface { - return $this->loanBalancesReportsAsyncWithHttpInfo($employerId, $payPeriod, $accept, $ordinal, $contentType) + return $this->niLetterValidationReportEmployeesReportsAsyncWithHttpInfo($employerId, $accept, $payDate, $payPeriod, $contentType) ->then( function ($response) { return $response[0]; @@ -15177,29 +15438,29 @@ function ($response) { } /** - * Operation loanBalancesReportsAsyncWithHttpInfo + * Operation niLetterValidationReportEmployeesReportsAsyncWithHttpInfo * - * Loan Balances + * NI Letter Validation (Employees) * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param string $employerId (required) * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['loanBalancesReports'] to see the possible values for this operation + * @param \DateTime|null $payDate (optional) + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportEmployeesReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function loanBalancesReportsAsyncWithHttpInfo( + public function niLetterValidationReportEmployeesReportsAsyncWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['loanBalancesReports'][0] + ?\DateTime $payDate = null, + ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, + string $contentType = self::contentTypes['niLetterValidationReportEmployeesReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\LoanBalancesReportReportResponse'; - $request = $this->loanBalancesReportsRequest($employerId, $payPeriod, $accept, $ordinal, $contentType); + $returnType = '\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse'; + $request = $this->niLetterValidationReportEmployeesReportsRequest($employerId, $accept, $payDate, $payPeriod, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15238,44 +15499,38 @@ function ($exception) { } /** - * Create request for operation 'loanBalancesReports' + * Create request for operation 'niLetterValidationReportEmployeesReports' * - * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param string $employerId (required) * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['loanBalancesReports'] to see the possible values for this operation + * @param \DateTime|null $payDate (optional) + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportEmployeesReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function loanBalancesReportsRequest( + public function niLetterValidationReportEmployeesReportsRequest( string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['loanBalancesReports'][0] + ?\DateTime $payDate = null, + ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, + string $contentType = self::contentTypes['niLetterValidationReportEmployeesReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling loanBalancesReports' + 'Missing the required parameter $employerId when calling niLetterValidationReportEmployeesReports' ); } - // verify the required parameter 'payPeriod' is set - if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $payPeriod when calling loanBalancesReports' - ); - } - $resourcePath = '/employers/{employerId}/reports/{payPeriod}/loanbalances'; + $resourcePath = '/employers/{employerId}/reports/NiLetterValidationReport'; $formParams = []; $queryParams = []; $headerParams = []; @@ -15284,9 +15539,18 @@ public function loanBalancesReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $ordinal, - 'ordinal', // param base name - 'integer', // openApiType + $payDate, + 'payDate', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $payPeriod?->value, + 'payPeriod', // param base name + 'PayPeriods', // openApiType 'form', // style true, // explode false // required @@ -15305,18 +15569,10 @@ public function loanBalancesReportsRequest( $resourcePath ); } - // path params - if ($payPeriod !== null) { - $resourcePath = str_replace( - '{' . 'payPeriod' . '}', - ObjectSerializer::toPathValue($payPeriod->value), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/pdf', 'text/html', 'text/csv', ], + ['application/json', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -15373,56 +15629,64 @@ public function loanBalancesReportsRequest( } /** - * Operation niLetterValidationReportEmployeesReports + * Operation niLetterValidationReportReports * - * NI Letter Validation (Employees) + * NI Letter Validation (Payrun) * * @param string $employerId employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) + * @param int $periodNumber periodNumber (required) * @param string|null $accept accept (optional) - * @param \DateTime|null $payDate payDate (optional) - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportEmployeesReports'] to see the possible values for this operation + * @param int|null $ordinal ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return \SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse */ - public function niLetterValidationReportEmployeesReports( + public function niLetterValidationReportReports( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + int $periodNumber, ?string $accept = null, - ?\DateTime $payDate = null, - ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, - string $contentType = self::contentTypes['niLetterValidationReportEmployeesReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['niLetterValidationReportReports'][0] ): \SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse { - list($response) = $this->niLetterValidationReportEmployeesReportsWithHttpInfo($employerId, $accept, $payDate, $payPeriod, $contentType); + list($response) = $this->niLetterValidationReportReportsWithHttpInfo($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType); return $response; } /** - * Operation niLetterValidationReportEmployeesReportsWithHttpInfo + * Operation niLetterValidationReportReportsWithHttpInfo * - * NI Letter Validation (Employees) + * NI Letter Validation (Payrun) * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int $periodNumber (required) * @param string|null $accept (optional) - * @param \DateTime|null $payDate (optional) - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportEmployeesReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function niLetterValidationReportEmployeesReportsWithHttpInfo( + public function niLetterValidationReportReportsWithHttpInfo( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + int $periodNumber, ?string $accept = null, - ?\DateTime $payDate = null, - ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, - string $contentType = self::contentTypes['niLetterValidationReportEmployeesReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['niLetterValidationReportReports'][0] ): array { - $request = $this->niLetterValidationReportEmployeesReportsRequest($employerId, $accept, $payDate, $payPeriod, $contentType); + $request = $this->niLetterValidationReportReportsRequest($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType); try { $options = $this->createHttpClientOption(); @@ -15446,36 +15710,15 @@ public function niLetterValidationReportEmployeesReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -15487,37 +15730,14 @@ public function niLetterValidationReportEmployeesReportsWithHttpInfo( $statusCode, $response->getHeaders(), (string) $response->getBody() - ); - } - - $returnType = '\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } + ); } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15527,35 +15747,40 @@ public function niLetterValidationReportEmployeesReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation niLetterValidationReportEmployeesReportsAsync + * Operation niLetterValidationReportReportsAsync * - * NI Letter Validation (Employees) + * NI Letter Validation (Payrun) * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int $periodNumber (required) * @param string|null $accept (optional) - * @param \DateTime|null $payDate (optional) - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportEmployeesReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function niLetterValidationReportEmployeesReportsAsync( + public function niLetterValidationReportReportsAsync( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + int $periodNumber, ?string $accept = null, - ?\DateTime $payDate = null, - ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, - string $contentType = self::contentTypes['niLetterValidationReportEmployeesReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['niLetterValidationReportReports'][0] ): PromiseInterface { - return $this->niLetterValidationReportEmployeesReportsAsyncWithHttpInfo($employerId, $accept, $payDate, $payPeriod, $contentType) + return $this->niLetterValidationReportReportsAsyncWithHttpInfo($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType) ->then( function ($response) { return $response[0]; @@ -15564,29 +15789,33 @@ function ($response) { } /** - * Operation niLetterValidationReportEmployeesReportsAsyncWithHttpInfo + * Operation niLetterValidationReportReportsAsyncWithHttpInfo * - * NI Letter Validation (Employees) + * NI Letter Validation (Payrun) * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int $periodNumber (required) * @param string|null $accept (optional) - * @param \DateTime|null $payDate (optional) - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportEmployeesReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function niLetterValidationReportEmployeesReportsAsyncWithHttpInfo( + public function niLetterValidationReportReportsAsyncWithHttpInfo( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + int $periodNumber, ?string $accept = null, - ?\DateTime $payDate = null, - ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, - string $contentType = self::contentTypes['niLetterValidationReportEmployeesReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['niLetterValidationReportReports'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse'; - $request = $this->niLetterValidationReportEmployeesReportsRequest($employerId, $accept, $payDate, $payPeriod, $contentType); + $request = $this->niLetterValidationReportReportsRequest($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15625,38 +15854,62 @@ function ($exception) { } /** - * Create request for operation 'niLetterValidationReportEmployeesReports' + * Create request for operation 'niLetterValidationReportReports' * * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param int $periodNumber (required) * @param string|null $accept (optional) - * @param \DateTime|null $payDate (optional) - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportEmployeesReports'] to see the possible values for this operation + * @param int|null $ordinal (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function niLetterValidationReportEmployeesReportsRequest( + public function niLetterValidationReportReportsRequest( string $employerId, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + \SynergiTech\Staffology\Model\TaxYear $taxYear, + int $periodNumber, ?string $accept = null, - ?\DateTime $payDate = null, - ?\SynergiTech\Staffology\Model\PayPeriods $payPeriod = null, - string $contentType = self::contentTypes['niLetterValidationReportEmployeesReports'][0] + ?int $ordinal = 1, + string $contentType = self::contentTypes['niLetterValidationReportReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling niLetterValidationReportEmployeesReports' + 'Missing the required parameter $employerId when calling niLetterValidationReportReports' + ); + } + + // verify the required parameter 'payPeriod' is set + if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $payPeriod when calling niLetterValidationReportReports' ); } + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling niLetterValidationReportReports' + ); + } + + // verify the required parameter 'periodNumber' is set + if ($periodNumber === null || (is_array($periodNumber) && count($periodNumber) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $periodNumber when calling niLetterValidationReportReports' + ); + } - $resourcePath = '/employers/{employerId}/reports/NiLetterValidationReport'; + $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/NiLetterValidationReport'; $formParams = []; $queryParams = []; $headerParams = []; @@ -15665,18 +15918,9 @@ public function niLetterValidationReportEmployeesReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $payDate, - 'payDate', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $payPeriod?->value, - 'payPeriod', // param base name - 'PayPeriods', // openApiType + $ordinal, + 'ordinal', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required @@ -15695,10 +15939,34 @@ public function niLetterValidationReportEmployeesReportsRequest( $resourcePath ); } + // path params + if ($payPeriod !== null) { + $resourcePath = str_replace( + '{' . 'payPeriod' . '}', + ObjectSerializer::toPathValue($payPeriod->value), + $resourcePath + ); + } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } + // path params + if ($periodNumber !== null) { + $resourcePath = str_replace( + '{' . 'periodNumber' . '}', + ObjectSerializer::toPathValue($periodNumber), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -15755,64 +16023,48 @@ public function niLetterValidationReportEmployeesReportsRequest( } /** - * Operation niLetterValidationReportReports + * Operation niYtdReports * - * NI Letter Validation (Payrun) + * NI Year To Date Values * - * @param string $employerId employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) - * @param int $periodNumber periodNumber (required) + * @param string|null $employerId employerId (optional) * @param string|null $accept accept (optional) - * @param int|null $ordinal ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niYtdReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse + * @return \SynergiTech\Staffology\Model\ReportResponse */ - public function niLetterValidationReportReports( - string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - int $periodNumber, + public function niYtdReports( + ?string $employerId = null, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['niLetterValidationReportReports'][0] - ): \SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse + string $contentType = self::contentTypes['niYtdReports'][0] + ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->niLetterValidationReportReportsWithHttpInfo($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType); + list($response) = $this->niYtdReportsWithHttpInfo($employerId, $accept, $contentType); return $response; } /** - * Operation niLetterValidationReportReportsWithHttpInfo + * Operation niYtdReportsWithHttpInfo * - * NI Letter Validation (Payrun) + * NI Year To Date Values * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int $periodNumber (required) + * @param string|null $employerId (optional) * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niYtdReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function niLetterValidationReportReportsWithHttpInfo( - string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - int $periodNumber, + public function niYtdReportsWithHttpInfo( + ?string $employerId = null, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['niLetterValidationReportReports'][0] + string $contentType = self::contentTypes['niYtdReports'][0] ): array { - $request = $this->niLetterValidationReportReportsRequest($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType); + $request = $this->niYtdReportsRequest($employerId, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -15836,36 +16088,15 @@ public function niLetterValidationReportReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -15880,76 +16111,46 @@ public function niLetterValidationReportReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse', + '\SynergiTech\Staffology\Model\ReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation niLetterValidationReportReportsAsync + * Operation niYtdReportsAsync * - * NI Letter Validation (Payrun) + * NI Year To Date Values * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int $periodNumber (required) + * @param string|null $employerId (optional) * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niYtdReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function niLetterValidationReportReportsAsync( - string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - int $periodNumber, + public function niYtdReportsAsync( + ?string $employerId = null, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['niLetterValidationReportReports'][0] + string $contentType = self::contentTypes['niYtdReports'][0] ): PromiseInterface { - return $this->niLetterValidationReportReportsAsyncWithHttpInfo($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType) + return $this->niYtdReportsAsyncWithHttpInfo($employerId, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -15958,33 +16159,25 @@ function ($response) { } /** - * Operation niLetterValidationReportReportsAsyncWithHttpInfo + * Operation niYtdReportsAsyncWithHttpInfo * - * NI Letter Validation (Payrun) + * NI Year To Date Values * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int $periodNumber (required) + * @param string|null $employerId (optional) * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niYtdReports'] to see the possible values for this operation * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function niLetterValidationReportReportsAsyncWithHttpInfo( - string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - int $periodNumber, + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function niYtdReportsAsyncWithHttpInfo( + ?string $employerId = null, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['niLetterValidationReportReports'][0] + string $contentType = self::contentTypes['niYtdReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\NiLetterValidationReportReportResponse'; - $request = $this->niLetterValidationReportReportsRequest($employerId, $payPeriod, $taxYear, $periodNumber, $accept, $ordinal, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; + $request = $this->niYtdReportsRequest($employerId, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16023,62 +16216,26 @@ function ($exception) { } /** - * Create request for operation 'niLetterValidationReportReports' + * Create request for operation 'niYtdReports' * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param int $periodNumber (required) + * @param string|null $employerId (optional) * @param string|null $accept (optional) - * @param int|null $ordinal (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niLetterValidationReportReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niYtdReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function niLetterValidationReportReportsRequest( - string $employerId, - \SynergiTech\Staffology\Model\PayPeriods $payPeriod, - \SynergiTech\Staffology\Model\TaxYear $taxYear, - int $periodNumber, + public function niYtdReportsRequest( + ?string $employerId = null, ?string $accept = null, - ?int $ordinal = 1, - string $contentType = self::contentTypes['niLetterValidationReportReports'][0] + string $contentType = self::contentTypes['niYtdReports'][0] ): Request { - // verify the required parameter 'employerId' is set - if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling niLetterValidationReportReports' - ); - } - - // verify the required parameter 'payPeriod' is set - if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $payPeriod when calling niLetterValidationReportReports' - ); - } - - // verify the required parameter 'taxYear' is set - if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling niLetterValidationReportReports' - ); - } - - // verify the required parameter 'periodNumber' is set - if ($periodNumber === null || (is_array($periodNumber) && count($periodNumber) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $periodNumber when calling niLetterValidationReportReports' - ); - } - - $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/NiLetterValidationReport'; + $resourcePath = '/niytd'; $formParams = []; $queryParams = []; $headerParams = []; @@ -16087,9 +16244,9 @@ public function niLetterValidationReportReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $ordinal, - 'ordinal', // param base name - 'integer', // openApiType + $employerId, + 'employerId', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -16100,42 +16257,10 @@ public function niLetterValidationReportReportsRequest( $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); } - // path params - if ($employerId !== null) { - $resourcePath = str_replace( - '{' . 'employerId' . '}', - ObjectSerializer::toPathValue($employerId), - $resourcePath - ); - } - // path params - if ($payPeriod !== null) { - $resourcePath = str_replace( - '{' . 'payPeriod' . '}', - ObjectSerializer::toPathValue($payPeriod->value), - $resourcePath - ); - } - // path params - if ($taxYear !== null) { - $resourcePath = str_replace( - '{' . 'taxYear' . '}', - ObjectSerializer::toPathValue($taxYear->value), - $resourcePath - ); - } - // path params - if ($periodNumber !== null) { - $resourcePath = str_replace( - '{' . 'periodNumber' . '}', - ObjectSerializer::toPathValue($periodNumber), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/html', 'application/pdf', ], + ['application/json', 'text/csv', ], $contentType, $multipart ); @@ -16192,48 +16317,56 @@ public function niLetterValidationReportReportsRequest( } /** - * Operation niYtdReports + * Operation p11DMultipleReports * - * NI Year To Date Values + * All P11Ds For TaxYear * - * @param string|null $employerId employerId (optional) + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear you want P11Ds for. (required) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niYtdReports'] to see the possible values for this operation + * @param bool|null $excludeEmployeesWithP11dEmailSent Exclude Employees with Already Sent P11Ds Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DMultipleReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return \SynergiTech\Staffology\Model\ReportResponse */ - public function niYtdReports( - ?string $employerId = null, + public function p11DMultipleReports( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['niYtdReports'][0] + ?bool $excludeEmployeesWithP11dEmailSent = false, + string $contentType = self::contentTypes['p11DMultipleReports'][0] ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->niYtdReportsWithHttpInfo($employerId, $accept, $contentType); + list($response) = $this->p11DMultipleReportsWithHttpInfo($employerId, $taxYear, $accept, $excludeEmployeesWithP11dEmailSent, $contentType); return $response; } /** - * Operation niYtdReportsWithHttpInfo + * Operation p11DMultipleReportsWithHttpInfo * - * NI Year To Date Values + * All P11Ds For TaxYear * - * @param string|null $employerId (optional) + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear you want P11Ds for. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niYtdReports'] to see the possible values for this operation + * @param bool|null $excludeEmployeesWithP11dEmailSent Exclude Employees with Already Sent P11Ds Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DMultipleReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function niYtdReportsWithHttpInfo( - ?string $employerId = null, + public function p11DMultipleReportsWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['niYtdReports'][0] + ?bool $excludeEmployeesWithP11dEmailSent = false, + string $contentType = self::contentTypes['p11DMultipleReports'][0] ): array { - $request = $this->niYtdReportsRequest($employerId, $accept, $contentType); + $request = $this->p11DMultipleReportsRequest($employerId, $taxYear, $accept, $excludeEmployeesWithP11dEmailSent, $contentType); try { $options = $this->createHttpClientOption(); @@ -16257,36 +16390,15 @@ public function niYtdReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -16301,34 +16413,11 @@ public function niYtdReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -16338,31 +16427,36 @@ public function niYtdReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation niYtdReportsAsync + * Operation p11DMultipleReportsAsync * - * NI Year To Date Values + * All P11Ds For TaxYear * - * @param string|null $employerId (optional) + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear you want P11Ds for. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niYtdReports'] to see the possible values for this operation + * @param bool|null $excludeEmployeesWithP11dEmailSent Exclude Employees with Already Sent P11Ds Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DMultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function niYtdReportsAsync( - ?string $employerId = null, + public function p11DMultipleReportsAsync( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['niYtdReports'][0] + ?bool $excludeEmployeesWithP11dEmailSent = false, + string $contentType = self::contentTypes['p11DMultipleReports'][0] ): PromiseInterface { - return $this->niYtdReportsAsyncWithHttpInfo($employerId, $accept, $contentType) + return $this->p11DMultipleReportsAsyncWithHttpInfo($employerId, $taxYear, $accept, $excludeEmployeesWithP11dEmailSent, $contentType) ->then( function ($response) { return $response[0]; @@ -16371,25 +16465,29 @@ function ($response) { } /** - * Operation niYtdReportsAsyncWithHttpInfo + * Operation p11DMultipleReportsAsyncWithHttpInfo * - * NI Year To Date Values + * All P11Ds For TaxYear * - * @param string|null $employerId (optional) + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear you want P11Ds for. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niYtdReports'] to see the possible values for this operation + * @param bool|null $excludeEmployeesWithP11dEmailSent Exclude Employees with Already Sent P11Ds Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DMultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function niYtdReportsAsyncWithHttpInfo( - ?string $employerId = null, + public function p11DMultipleReportsAsyncWithHttpInfo( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['niYtdReports'][0] + ?bool $excludeEmployeesWithP11dEmailSent = false, + string $contentType = self::contentTypes['p11DMultipleReports'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->niYtdReportsRequest($employerId, $accept, $contentType); + $request = $this->p11DMultipleReportsRequest($employerId, $taxYear, $accept, $excludeEmployeesWithP11dEmailSent, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16428,26 +16526,44 @@ function ($exception) { } /** - * Create request for operation 'niYtdReports' + * Create request for operation 'p11DMultipleReports' * - * @param string|null $employerId (optional) + * @param string $employerId The Id of the Employer. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear you want P11Ds for. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['niYtdReports'] to see the possible values for this operation + * @param bool|null $excludeEmployeesWithP11dEmailSent Exclude Employees with Already Sent P11Ds Emails. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DMultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function niYtdReportsRequest( - ?string $employerId = null, + public function p11DMultipleReportsRequest( + string $employerId, + \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['niYtdReports'][0] + ?bool $excludeEmployeesWithP11dEmailSent = false, + string $contentType = self::contentTypes['p11DMultipleReports'][0] ): Request { + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling p11DMultipleReports' + ); + } + + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $taxYear when calling p11DMultipleReports' + ); + } - $resourcePath = '/niytd'; + + $resourcePath = '/employers/{employerId}/reports/{taxYear}/p11d'; $formParams = []; $queryParams = []; $headerParams = []; @@ -16456,9 +16572,9 @@ public function niYtdReportsRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $employerId, - 'employerId', // param base name - 'string', // openApiType + $excludeEmployeesWithP11dEmailSent, + 'excludeEmployeesWithP11dEmailSent', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required @@ -16469,10 +16585,26 @@ public function niYtdReportsRequest( $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); } + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + // path params + if ($taxYear !== null) { + $resourcePath = str_replace( + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', ], + ['application/json', 'application/octet-stream', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -16529,56 +16661,56 @@ public function niYtdReportsRequest( } /** - * Operation p11DMultipleReports + * Operation p11DReports * - * All P11Ds For TaxYear + * P11D For Employee * * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear you want P11Ds for. (required) + * @param string $employeeId The Id of the Employee. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear the P60 is for. (required) * @param string|null $accept accept (optional) - * @param bool|null $excludeEmployeesWithP11dEmailSent Exclude Employees with Already Sent P11Ds Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DMultipleReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return \SynergiTech\Staffology\Model\ReportResponse */ - public function p11DMultipleReports( + public function p11DReports( string $employerId, + string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - ?bool $excludeEmployeesWithP11dEmailSent = false, - string $contentType = self::contentTypes['p11DMultipleReports'][0] + string $contentType = self::contentTypes['p11DReports'][0] ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->p11DMultipleReportsWithHttpInfo($employerId, $taxYear, $accept, $excludeEmployeesWithP11dEmailSent, $contentType); + list($response) = $this->p11DReportsWithHttpInfo($employerId, $employeeId, $taxYear, $accept, $contentType); return $response; } /** - * Operation p11DMultipleReportsWithHttpInfo + * Operation p11DReportsWithHttpInfo * - * All P11Ds For TaxYear + * P11D For Employee * * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear you want P11Ds for. (required) + * @param string $employeeId The Id of the Employee. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear the P60 is for. (required) * @param string|null $accept (optional) - * @param bool|null $excludeEmployeesWithP11dEmailSent Exclude Employees with Already Sent P11Ds Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DMultipleReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function p11DMultipleReportsWithHttpInfo( + public function p11DReportsWithHttpInfo( string $employerId, + string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - ?bool $excludeEmployeesWithP11dEmailSent = false, - string $contentType = self::contentTypes['p11DMultipleReports'][0] + string $contentType = self::contentTypes['p11DReports'][0] ): array { - $request = $this->p11DMultipleReportsRequest($employerId, $taxYear, $accept, $excludeEmployeesWithP11dEmailSent, $contentType); + $request = $this->p11DReportsRequest($employerId, $employeeId, $taxYear, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -16602,36 +16734,15 @@ public function p11DMultipleReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -16646,34 +16757,11 @@ public function p11DMultipleReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -16683,35 +16771,36 @@ public function p11DMultipleReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation p11DMultipleReportsAsync + * Operation p11DReportsAsync * - * All P11Ds For TaxYear + * P11D For Employee * * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear you want P11Ds for. (required) + * @param string $employeeId The Id of the Employee. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear the P60 is for. (required) * @param string|null $accept (optional) - * @param bool|null $excludeEmployeesWithP11dEmailSent Exclude Employees with Already Sent P11Ds Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DMultipleReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p11DMultipleReportsAsync( + public function p11DReportsAsync( string $employerId, + string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - ?bool $excludeEmployeesWithP11dEmailSent = false, - string $contentType = self::contentTypes['p11DMultipleReports'][0] + string $contentType = self::contentTypes['p11DReports'][0] ): PromiseInterface { - return $this->p11DMultipleReportsAsyncWithHttpInfo($employerId, $taxYear, $accept, $excludeEmployeesWithP11dEmailSent, $contentType) + return $this->p11DReportsAsyncWithHttpInfo($employerId, $employeeId, $taxYear, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -16720,29 +16809,29 @@ function ($response) { } /** - * Operation p11DMultipleReportsAsyncWithHttpInfo + * Operation p11DReportsAsyncWithHttpInfo * - * All P11Ds For TaxYear + * P11D For Employee * * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear you want P11Ds for. (required) + * @param string $employeeId The Id of the Employee. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear the P60 is for. (required) * @param string|null $accept (optional) - * @param bool|null $excludeEmployeesWithP11dEmailSent Exclude Employees with Already Sent P11Ds Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DMultipleReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p11DMultipleReportsAsyncWithHttpInfo( + public function p11DReportsAsyncWithHttpInfo( string $employerId, + string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - ?bool $excludeEmployeesWithP11dEmailSent = false, - string $contentType = self::contentTypes['p11DMultipleReports'][0] + string $contentType = self::contentTypes['p11DReports'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->p11DMultipleReportsRequest($employerId, $taxYear, $accept, $excludeEmployeesWithP11dEmailSent, $contentType); + $request = $this->p11DReportsRequest($employerId, $employeeId, $taxYear, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16781,59 +16870,56 @@ function ($exception) { } /** - * Create request for operation 'p11DMultipleReports' + * Create request for operation 'p11DReports' * * @param string $employerId The Id of the Employer. (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear you want P11Ds for. (required) + * @param string $employeeId The Id of the Employee. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear the P60 is for. (required) * @param string|null $accept (optional) - * @param bool|null $excludeEmployeesWithP11dEmailSent Exclude Employees with Already Sent P11Ds Emails. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DMultipleReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function p11DMultipleReportsRequest( + public function p11DReportsRequest( string $employerId, + string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - ?bool $excludeEmployeesWithP11dEmailSent = false, - string $contentType = self::contentTypes['p11DMultipleReports'][0] + string $contentType = self::contentTypes['p11DReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling p11DMultipleReports' + 'Missing the required parameter $employerId when calling p11DReports' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling p11DReports' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling p11DMultipleReports' + 'Missing the required parameter $taxYear when calling p11DReports' ); } - - $resourcePath = '/employers/{employerId}/reports/{taxYear}/p11d'; + $resourcePath = '/employers/{employerId}/reports/{taxYear}/p11d/{employeeId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $excludeEmployeesWithP11dEmailSent, - 'excludeEmployeesWithP11dEmailSent', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // header params if ($accept !== null) { @@ -16849,6 +16935,14 @@ public function p11DMultipleReportsRequest( ); } // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + // path params if ($taxYear !== null) { $resourcePath = str_replace( '{' . 'taxYear' . '}', @@ -16859,7 +16953,7 @@ public function p11DMultipleReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/pdf', 'text/html', 'application/octet-stream', ], + ['application/json', 'application/octet-stream', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -16916,56 +17010,52 @@ public function p11DMultipleReportsRequest( } /** - * Operation p11DReports + * Operation p11DetailedMultipleReports * - * P11D For Employee + * All Detailed P11s For TaxYear * - * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee. (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear the P60 is for. (required) + * @param string $employerId The Id of the employer you want to report on (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedMultipleReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return \SynergiTech\Staffology\Model\ReportResponse */ - public function p11DReports( + public function p11DetailedMultipleReports( string $employerId, - string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DReports'][0] + string $contentType = self::contentTypes['p11DetailedMultipleReports'][0] ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->p11DReportsWithHttpInfo($employerId, $employeeId, $taxYear, $accept, $contentType); + list($response) = $this->p11DetailedMultipleReportsWithHttpInfo($employerId, $taxYear, $accept, $contentType); return $response; } /** - * Operation p11DReportsWithHttpInfo + * Operation p11DetailedMultipleReportsWithHttpInfo * - * P11D For Employee + * All Detailed P11s For TaxYear * - * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee. (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear the P60 is for. (required) + * @param string $employerId The Id of the employer you want to report on (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedMultipleReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function p11DReportsWithHttpInfo( + public function p11DetailedMultipleReportsWithHttpInfo( string $employerId, - string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DReports'][0] + string $contentType = self::contentTypes['p11DetailedMultipleReports'][0] ): array { - $request = $this->p11DReportsRequest($employerId, $employeeId, $taxYear, $accept, $contentType); + $request = $this->p11DetailedMultipleReportsRequest($employerId, $taxYear, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -16989,36 +17079,15 @@ public function p11DReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -17033,34 +17102,11 @@ public function p11DReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -17070,35 +17116,34 @@ public function p11DReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation p11DReportsAsync + * Operation p11DetailedMultipleReportsAsync * - * P11D For Employee + * All Detailed P11s For TaxYear * - * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee. (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear the P60 is for. (required) + * @param string $employerId The Id of the employer you want to report on (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedMultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p11DReportsAsync( + public function p11DetailedMultipleReportsAsync( string $employerId, - string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DReports'][0] + string $contentType = self::contentTypes['p11DetailedMultipleReports'][0] ): PromiseInterface { - return $this->p11DReportsAsyncWithHttpInfo($employerId, $employeeId, $taxYear, $accept, $contentType) + return $this->p11DetailedMultipleReportsAsyncWithHttpInfo($employerId, $taxYear, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -17107,29 +17152,27 @@ function ($response) { } /** - * Operation p11DReportsAsyncWithHttpInfo + * Operation p11DetailedMultipleReportsAsyncWithHttpInfo * - * P11D For Employee + * All Detailed P11s For TaxYear * - * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee. (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear the P60 is for. (required) + * @param string $employerId The Id of the employer you want to report on (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedMultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p11DReportsAsyncWithHttpInfo( + public function p11DetailedMultipleReportsAsyncWithHttpInfo( string $employerId, - string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DReports'][0] + string $contentType = self::contentTypes['p11DetailedMultipleReports'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->p11DReportsRequest($employerId, $employeeId, $taxYear, $accept, $contentType); + $request = $this->p11DetailedMultipleReportsRequest($employerId, $taxYear, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17168,50 +17211,41 @@ function ($exception) { } /** - * Create request for operation 'p11DReports' + * Create request for operation 'p11DetailedMultipleReports' * - * @param string $employerId The Id of the Employer. (required) - * @param string $employeeId The Id of the Employee. (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The TaxYear the P60 is for. (required) + * @param string $employerId The Id of the employer you want to report on (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedMultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function p11DReportsRequest( + public function p11DetailedMultipleReportsRequest( string $employerId, - string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DReports'][0] + string $contentType = self::contentTypes['p11DetailedMultipleReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling p11DReports' - ); - } - - // verify the required parameter 'employeeId' is set - if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $employeeId when calling p11DReports' + 'Missing the required parameter $employerId when calling p11DetailedMultipleReports' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling p11DReports' + 'Missing the required parameter $taxYear when calling p11DetailedMultipleReports' ); } - $resourcePath = '/employers/{employerId}/reports/{taxYear}/p11d/{employeeId}'; + $resourcePath = '/employers/{employerId}/reports/{taxYear}/p11detailed'; $formParams = []; $queryParams = []; $headerParams = []; @@ -17233,14 +17267,6 @@ public function p11DReportsRequest( ); } // path params - if ($employeeId !== null) { - $resourcePath = str_replace( - '{' . 'employeeId' . '}', - ObjectSerializer::toPathValue($employeeId), - $resourcePath - ); - } - // path params if ($taxYear !== null) { $resourcePath = str_replace( '{' . 'taxYear' . '}', @@ -17251,7 +17277,7 @@ public function p11DReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/pdf', 'text/html', 'application/octet-stream', ], + ['application/json', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -17308,52 +17334,56 @@ public function p11DReportsRequest( } /** - * Operation p11DetailedMultipleReports + * Operation p11DetailedReports * - * All Detailed P11s For TaxYear + * P11 (Detailed) * - * @param string $employerId The Id of the employer you want to report on (required) + * @param string $employerId employerId (required) + * @param string $employeeId The employee Id of the employee you want to report on (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedMultipleReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ReportResponse + * @return \SynergiTech\Staffology\Model\P11DetailedReportResponse */ - public function p11DetailedMultipleReports( + public function p11DetailedReports( string $employerId, + string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DetailedMultipleReports'][0] - ): \SynergiTech\Staffology\Model\ReportResponse + string $contentType = self::contentTypes['p11DetailedReports'][0] + ): \SynergiTech\Staffology\Model\P11DetailedReportResponse { - list($response) = $this->p11DetailedMultipleReportsWithHttpInfo($employerId, $taxYear, $accept, $contentType); + list($response) = $this->p11DetailedReportsWithHttpInfo($employerId, $employeeId, $taxYear, $accept, $contentType); return $response; } /** - * Operation p11DetailedMultipleReportsWithHttpInfo + * Operation p11DetailedReportsWithHttpInfo * - * All Detailed P11s For TaxYear + * P11 (Detailed) * - * @param string $employerId The Id of the employer you want to report on (required) + * @param string $employerId (required) + * @param string $employeeId The employee Id of the employee you want to report on (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedMultipleReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\P11DetailedReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function p11DetailedMultipleReportsWithHttpInfo( + public function p11DetailedReportsWithHttpInfo( string $employerId, + string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DetailedMultipleReports'][0] + string $contentType = self::contentTypes['p11DetailedReports'][0] ): array { - $request = $this->p11DetailedMultipleReportsRequest($employerId, $taxYear, $accept, $contentType); + $request = $this->p11DetailedReportsRequest($employerId, $employeeId, $taxYear, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -17377,36 +17407,15 @@ public function p11DetailedMultipleReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\P11DetailedReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -17421,70 +17430,50 @@ public function p11DetailedMultipleReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\P11DetailedReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ReportResponse', + '\SynergiTech\Staffology\Model\P11DetailedReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation p11DetailedMultipleReportsAsync + * Operation p11DetailedReportsAsync * - * All Detailed P11s For TaxYear + * P11 (Detailed) * - * @param string $employerId The Id of the employer you want to report on (required) + * @param string $employerId (required) + * @param string $employeeId The employee Id of the employee you want to report on (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedMultipleReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p11DetailedMultipleReportsAsync( + public function p11DetailedReportsAsync( string $employerId, + string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DetailedMultipleReports'][0] + string $contentType = self::contentTypes['p11DetailedReports'][0] ): PromiseInterface { - return $this->p11DetailedMultipleReportsAsyncWithHttpInfo($employerId, $taxYear, $accept, $contentType) + return $this->p11DetailedReportsAsyncWithHttpInfo($employerId, $employeeId, $taxYear, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -17493,27 +17482,29 @@ function ($response) { } /** - * Operation p11DetailedMultipleReportsAsyncWithHttpInfo + * Operation p11DetailedReportsAsyncWithHttpInfo * - * All Detailed P11s For TaxYear + * P11 (Detailed) * - * @param string $employerId The Id of the employer you want to report on (required) + * @param string $employerId (required) + * @param string $employeeId The employee Id of the employee you want to report on (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedMultipleReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p11DetailedMultipleReportsAsyncWithHttpInfo( + public function p11DetailedReportsAsyncWithHttpInfo( string $employerId, + string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DetailedMultipleReports'][0] + string $contentType = self::contentTypes['p11DetailedReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->p11DetailedMultipleReportsRequest($employerId, $taxYear, $accept, $contentType); + $returnType = '\SynergiTech\Staffology\Model\P11DetailedReportResponse'; + $request = $this->p11DetailedReportsRequest($employerId, $employeeId, $taxYear, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17552,41 +17543,50 @@ function ($exception) { } /** - * Create request for operation 'p11DetailedMultipleReports' + * Create request for operation 'p11DetailedReports' * - * @param string $employerId The Id of the employer you want to report on (required) + * @param string $employerId (required) + * @param string $employeeId The employee Id of the employee you want to report on (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedMultipleReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function p11DetailedMultipleReportsRequest( + public function p11DetailedReportsRequest( string $employerId, + string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DetailedMultipleReports'][0] + string $contentType = self::contentTypes['p11DetailedReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling p11DetailedMultipleReports' + 'Missing the required parameter $employerId when calling p11DetailedReports' + ); + } + + // verify the required parameter 'employeeId' is set + if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employeeId when calling p11DetailedReports' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling p11DetailedMultipleReports' + 'Missing the required parameter $taxYear when calling p11DetailedReports' ); } - $resourcePath = '/employers/{employerId}/reports/{taxYear}/p11detailed'; + $resourcePath = '/employers/{employerId}/reports/{taxYear}/{employeeId}/p11detailed'; $formParams = []; $queryParams = []; $headerParams = []; @@ -17608,6 +17608,14 @@ public function p11DetailedMultipleReportsRequest( ); } // path params + if ($employeeId !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employeeId), + $resourcePath + ); + } + // path params if ($taxYear !== null) { $resourcePath = str_replace( '{' . 'taxYear' . '}', @@ -17675,56 +17683,56 @@ public function p11DetailedMultipleReportsRequest( } /** - * Operation p11DetailedReports + * Operation p11Reports * - * P11 (Detailed) + * P11 * * @param string $employerId employerId (required) * @param string $employeeId The employee Id of the employee you want to report on (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11Reports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\P11DetailedReportResponse + * @return \SynergiTech\Staffology\Model\P11ReportResponse */ - public function p11DetailedReports( + public function p11Reports( string $employerId, string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DetailedReports'][0] - ): \SynergiTech\Staffology\Model\P11DetailedReportResponse + string $contentType = self::contentTypes['p11Reports'][0] + ): \SynergiTech\Staffology\Model\P11ReportResponse { - list($response) = $this->p11DetailedReportsWithHttpInfo($employerId, $employeeId, $taxYear, $accept, $contentType); + list($response) = $this->p11ReportsWithHttpInfo($employerId, $employeeId, $taxYear, $accept, $contentType); return $response; } /** - * Operation p11DetailedReportsWithHttpInfo + * Operation p11ReportsWithHttpInfo * - * P11 (Detailed) + * P11 * * @param string $employerId (required) * @param string $employeeId The employee Id of the employee you want to report on (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11Reports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\P11DetailedReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\P11ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function p11DetailedReportsWithHttpInfo( + public function p11ReportsWithHttpInfo( string $employerId, string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DetailedReports'][0] + string $contentType = self::contentTypes['p11Reports'][0] ): array { - $request = $this->p11DetailedReportsRequest($employerId, $employeeId, $taxYear, $accept, $contentType); + $request = $this->p11ReportsRequest($employerId, $employeeId, $taxYear, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -17748,36 +17756,15 @@ public function p11DetailedReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\P11DetailedReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\P11DetailedReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\P11DetailedReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\P11ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -17792,72 +17779,50 @@ public function p11DetailedReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\P11DetailedReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\P11ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\P11DetailedReportResponse', + '\SynergiTech\Staffology\Model\P11ReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation p11DetailedReportsAsync + * Operation p11ReportsAsync * - * P11 (Detailed) + * P11 * * @param string $employerId (required) * @param string $employeeId The employee Id of the employee you want to report on (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11Reports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p11DetailedReportsAsync( + public function p11ReportsAsync( string $employerId, string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DetailedReports'][0] + string $contentType = self::contentTypes['p11Reports'][0] ): PromiseInterface { - return $this->p11DetailedReportsAsyncWithHttpInfo($employerId, $employeeId, $taxYear, $accept, $contentType) + return $this->p11ReportsAsyncWithHttpInfo($employerId, $employeeId, $taxYear, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -17866,29 +17831,29 @@ function ($response) { } /** - * Operation p11DetailedReportsAsyncWithHttpInfo + * Operation p11ReportsAsyncWithHttpInfo * - * P11 (Detailed) + * P11 * * @param string $employerId (required) * @param string $employeeId The employee Id of the employee you want to report on (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11Reports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p11DetailedReportsAsyncWithHttpInfo( + public function p11ReportsAsyncWithHttpInfo( string $employerId, string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DetailedReports'][0] + string $contentType = self::contentTypes['p11Reports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\P11DetailedReportResponse'; - $request = $this->p11DetailedReportsRequest($employerId, $employeeId, $taxYear, $accept, $contentType); + $returnType = '\SynergiTech\Staffology\Model\P11ReportResponse'; + $request = $this->p11ReportsRequest($employerId, $employeeId, $taxYear, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17927,50 +17892,50 @@ function ($exception) { } /** - * Create request for operation 'p11DetailedReports' + * Create request for operation 'p11Reports' * * @param string $employerId (required) * @param string $employeeId The employee Id of the employee you want to report on (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11DetailedReports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11Reports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function p11DetailedReportsRequest( + public function p11ReportsRequest( string $employerId, string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, ?string $accept = null, - string $contentType = self::contentTypes['p11DetailedReports'][0] + string $contentType = self::contentTypes['p11Reports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling p11DetailedReports' + 'Missing the required parameter $employerId when calling p11Reports' ); } // verify the required parameter 'employeeId' is set if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employeeId when calling p11DetailedReports' + 'Missing the required parameter $employeeId when calling p11Reports' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling p11DetailedReports' + 'Missing the required parameter $taxYear when calling p11Reports' ); } - $resourcePath = '/employers/{employerId}/reports/{taxYear}/{employeeId}/p11detailed'; + $resourcePath = '/employers/{employerId}/reports/{taxYear}/{employeeId}/p11'; $formParams = []; $queryParams = []; $headerParams = []; @@ -18010,7 +17975,7 @@ public function p11DetailedReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/pdf', 'application/json', 'text/html', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -18067,56 +18032,56 @@ public function p11DetailedReportsRequest( } /** - * Operation p11Reports + * Operation p30Reports * - * P11 + * P30 * * @param string $employerId employerId (required) - * @param string $employeeId The employee Id of the employee you want to report on (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) + * @param \DateTime $periodEnding periodEnding (required) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p30Reports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\P11ReportResponse + * @return \SynergiTech\Staffology\Model\ReportResponse */ - public function p11Reports( + public function p30Reports( string $employerId, - string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, + \DateTime $periodEnding, ?string $accept = null, - string $contentType = self::contentTypes['p11Reports'][0] - ): \SynergiTech\Staffology\Model\P11ReportResponse + string $contentType = self::contentTypes['p30Reports'][0] + ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->p11ReportsWithHttpInfo($employerId, $employeeId, $taxYear, $accept, $contentType); + list($response) = $this->p30ReportsWithHttpInfo($employerId, $taxYear, $periodEnding, $accept, $contentType); return $response; } /** - * Operation p11ReportsWithHttpInfo + * Operation p30ReportsWithHttpInfo * - * P11 + * P30 * * @param string $employerId (required) - * @param string $employeeId The employee Id of the employee you want to report on (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param \DateTime $periodEnding (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p30Reports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\P11ReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function p11ReportsWithHttpInfo( + public function p30ReportsWithHttpInfo( string $employerId, - string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, + \DateTime $periodEnding, ?string $accept = null, - string $contentType = self::contentTypes['p11Reports'][0] + string $contentType = self::contentTypes['p30Reports'][0] ): array { - $request = $this->p11ReportsRequest($employerId, $employeeId, $taxYear, $accept, $contentType); + $request = $this->p30ReportsRequest($employerId, $taxYear, $periodEnding, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -18140,36 +18105,15 @@ public function p11ReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\P11ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\P11ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\P11ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -18184,72 +18128,50 @@ public function p11ReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\P11ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\P11ReportResponse', + '\SynergiTech\Staffology\Model\ReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation p11ReportsAsync + * Operation p30ReportsAsync * - * P11 + * P30 * * @param string $employerId (required) - * @param string $employeeId The employee Id of the employee you want to report on (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param \DateTime $periodEnding (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p30Reports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p11ReportsAsync( + public function p30ReportsAsync( string $employerId, - string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, + \DateTime $periodEnding, ?string $accept = null, - string $contentType = self::contentTypes['p11Reports'][0] + string $contentType = self::contentTypes['p30Reports'][0] ): PromiseInterface { - return $this->p11ReportsAsyncWithHttpInfo($employerId, $employeeId, $taxYear, $accept, $contentType) + return $this->p30ReportsAsyncWithHttpInfo($employerId, $taxYear, $periodEnding, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -18258,29 +18180,29 @@ function ($response) { } /** - * Operation p11ReportsAsyncWithHttpInfo + * Operation p30ReportsAsyncWithHttpInfo * - * P11 + * P30 * * @param string $employerId (required) - * @param string $employeeId The employee Id of the employee you want to report on (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param \DateTime $periodEnding (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p30Reports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p11ReportsAsyncWithHttpInfo( + public function p30ReportsAsyncWithHttpInfo( string $employerId, - string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, + \DateTime $periodEnding, ?string $accept = null, - string $contentType = self::contentTypes['p11Reports'][0] + string $contentType = self::contentTypes['p30Reports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\P11ReportResponse'; - $request = $this->p11ReportsRequest($employerId, $employeeId, $taxYear, $accept, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; + $request = $this->p30ReportsRequest($employerId, $taxYear, $periodEnding, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -18319,50 +18241,50 @@ function ($exception) { } /** - * Create request for operation 'p11Reports' + * Create request for operation 'p30Reports' * * @param string $employerId (required) - * @param string $employeeId The employee Id of the employee you want to report on (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear The tax year you want to report on. (required) + * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param \DateTime $periodEnding (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p11Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p30Reports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function p11ReportsRequest( + public function p30ReportsRequest( string $employerId, - string $employeeId, \SynergiTech\Staffology\Model\TaxYear $taxYear, + \DateTime $periodEnding, ?string $accept = null, - string $contentType = self::contentTypes['p11Reports'][0] + string $contentType = self::contentTypes['p30Reports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling p11Reports' + 'Missing the required parameter $employerId when calling p30Reports' ); } - // verify the required parameter 'employeeId' is set - if ($employeeId === null || (is_array($employeeId) && count($employeeId) === 0)) { + // verify the required parameter 'taxYear' is set + if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employeeId when calling p11Reports' + 'Missing the required parameter $taxYear when calling p30Reports' ); } - // verify the required parameter 'taxYear' is set - if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + // verify the required parameter 'periodEnding' is set + if ($periodEnding === null || (is_array($periodEnding) && count($periodEnding) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling p11Reports' + 'Missing the required parameter $periodEnding when calling p30Reports' ); } - $resourcePath = '/employers/{employerId}/reports/{taxYear}/{employeeId}/p11'; + $resourcePath = '/employers/{employerId}/reports/{taxYear}/p30/{periodEnding}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -18384,25 +18306,25 @@ public function p11ReportsRequest( ); } // path params - if ($employeeId !== null) { + if ($taxYear !== null) { $resourcePath = str_replace( - '{' . 'employeeId' . '}', - ObjectSerializer::toPathValue($employeeId), + '{' . 'taxYear' . '}', + ObjectSerializer::toPathValue($taxYear->value), $resourcePath ); } // path params - if ($taxYear !== null) { + if ($periodEnding !== null) { $resourcePath = str_replace( - '{' . 'taxYear' . '}', - ObjectSerializer::toPathValue($taxYear->value), + '{' . 'periodEnding' . '}', + ObjectSerializer::toPathValue($periodEnding), $resourcePath ); } $headers = $this->headerSelector->selectHeaders( - ['application/pdf', 'application/json', 'text/csv', 'text/html', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -18459,56 +18381,52 @@ public function p11ReportsRequest( } /** - * Operation p30Reports + * Operation p32Reports * - * P30 + * P32 * * @param string $employerId employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) - * @param \DateTime $periodEnding periodEnding (required) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p30Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p32Reports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ReportResponse + * @return \SynergiTech\Staffology\Model\P32ReportResponse */ - public function p30Reports( + public function p32Reports( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - \DateTime $periodEnding, ?string $accept = null, - string $contentType = self::contentTypes['p30Reports'][0] - ): \SynergiTech\Staffology\Model\ReportResponse + string $contentType = self::contentTypes['p32Reports'][0] + ): \SynergiTech\Staffology\Model\P32ReportResponse { - list($response) = $this->p30ReportsWithHttpInfo($employerId, $taxYear, $periodEnding, $accept, $contentType); + list($response) = $this->p32ReportsWithHttpInfo($employerId, $taxYear, $accept, $contentType); return $response; } /** - * Operation p30ReportsWithHttpInfo + * Operation p32ReportsWithHttpInfo * - * P30 + * P32 * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param \DateTime $periodEnding (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p30Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p32Reports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\P32ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function p30ReportsWithHttpInfo( + public function p32ReportsWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - \DateTime $periodEnding, ?string $accept = null, - string $contentType = self::contentTypes['p30Reports'][0] + string $contentType = self::contentTypes['p32Reports'][0] ): array { - $request = $this->p30ReportsRequest($employerId, $taxYear, $periodEnding, $accept, $contentType); + $request = $this->p32ReportsRequest($employerId, $taxYear, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -18532,36 +18450,15 @@ public function p30ReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\P32ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -18576,72 +18473,48 @@ public function p30ReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\P32ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ReportResponse', + '\SynergiTech\Staffology\Model\P32ReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation p30ReportsAsync + * Operation p32ReportsAsync * - * P30 + * P32 * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param \DateTime $periodEnding (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p30Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p32Reports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p30ReportsAsync( + public function p32ReportsAsync( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - \DateTime $periodEnding, ?string $accept = null, - string $contentType = self::contentTypes['p30Reports'][0] + string $contentType = self::contentTypes['p32Reports'][0] ): PromiseInterface { - return $this->p30ReportsAsyncWithHttpInfo($employerId, $taxYear, $periodEnding, $accept, $contentType) + return $this->p32ReportsAsyncWithHttpInfo($employerId, $taxYear, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -18650,29 +18523,27 @@ function ($response) { } /** - * Operation p30ReportsAsyncWithHttpInfo + * Operation p32ReportsAsyncWithHttpInfo * - * P30 + * P32 * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param \DateTime $periodEnding (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p30Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p32Reports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p30ReportsAsyncWithHttpInfo( + public function p32ReportsAsyncWithHttpInfo( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - \DateTime $periodEnding, ?string $accept = null, - string $contentType = self::contentTypes['p30Reports'][0] + string $contentType = self::contentTypes['p32Reports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->p30ReportsRequest($employerId, $taxYear, $periodEnding, $accept, $contentType); + $returnType = '\SynergiTech\Staffology\Model\P32ReportResponse'; + $request = $this->p32ReportsRequest($employerId, $taxYear, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -18711,50 +18582,41 @@ function ($exception) { } /** - * Create request for operation 'p30Reports' + * Create request for operation 'p32Reports' * * @param string $employerId (required) * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) - * @param \DateTime $periodEnding (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p30Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p32Reports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function p30ReportsRequest( + public function p32ReportsRequest( string $employerId, \SynergiTech\Staffology\Model\TaxYear $taxYear, - \DateTime $periodEnding, ?string $accept = null, - string $contentType = self::contentTypes['p30Reports'][0] + string $contentType = self::contentTypes['p32Reports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling p30Reports' + 'Missing the required parameter $employerId when calling p32Reports' ); } // verify the required parameter 'taxYear' is set if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling p30Reports' - ); - } - - // verify the required parameter 'periodEnding' is set - if ($periodEnding === null || (is_array($periodEnding) && count($periodEnding) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $periodEnding when calling p30Reports' + 'Missing the required parameter $taxYear when calling p32Reports' ); } - $resourcePath = '/employers/{employerId}/reports/{taxYear}/p30/{periodEnding}'; + $resourcePath = '/employers/{employerId}/reports/{taxYear}/p32'; $formParams = []; $queryParams = []; $headerParams = []; @@ -18783,14 +18645,6 @@ public function p30ReportsRequest( $resourcePath ); } - // path params - if ($periodEnding !== null) { - $resourcePath = str_replace( - '{' . 'periodEnding' . '}', - ObjectSerializer::toPathValue($periodEnding), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -18851,52 +18705,60 @@ public function p30ReportsRequest( } /** - * Operation p32Reports + * Operation p45MultipleReports * - * P32 + * P45 for Multiple Employees * - * @param string $employerId employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear taxYear (required) + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The PayPeriod of the PayRun. (required) + * @param int $period The Period of the PayRun. (required) + * @param int $ordinal The Ordinal of the PayRun. (required) * @param string|null $accept accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p32Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p45MultipleReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\P32ReportResponse + * @return \SynergiTech\Staffology\Model\ReportResponse|null */ - public function p32Reports( + public function p45MultipleReports( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $period, + int $ordinal, ?string $accept = null, - string $contentType = self::contentTypes['p32Reports'][0] - ): \SynergiTech\Staffology\Model\P32ReportResponse + string $contentType = self::contentTypes['p45MultipleReports'][0] + ): ?\SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->p32ReportsWithHttpInfo($employerId, $taxYear, $accept, $contentType); + list($response) = $this->p45MultipleReportsWithHttpInfo($employerId, $payPeriod, $period, $ordinal, $accept, $contentType); return $response; } /** - * Operation p32ReportsWithHttpInfo + * Operation p45MultipleReportsWithHttpInfo * - * P32 + * P45 for Multiple Employees * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The PayPeriod of the PayRun. (required) + * @param int $period The Period of the PayRun. (required) + * @param int $ordinal The Ordinal of the PayRun. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p32Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p45MultipleReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\P32ReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function p32ReportsWithHttpInfo( + public function p45MultipleReportsWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $period, + int $ordinal, ?string $accept = null, - string $contentType = self::contentTypes['p32Reports'][0] + string $contentType = self::contentTypes['p45MultipleReports'][0] ): array { - $request = $this->p32ReportsRequest($employerId, $taxYear, $accept, $contentType); + $request = $this->p45MultipleReportsRequest($employerId, $payPeriod, $period, $ordinal, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -18920,36 +18782,15 @@ public function p32ReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\P32ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\P32ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\P32ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -18964,70 +18805,52 @@ public function p32ReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\P32ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\P32ReportResponse', + '\SynergiTech\Staffology\Model\ReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation p32ReportsAsync + * Operation p45MultipleReportsAsync * - * P32 + * P45 for Multiple Employees * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The PayPeriod of the PayRun. (required) + * @param int $period The Period of the PayRun. (required) + * @param int $ordinal The Ordinal of the PayRun. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p32Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p45MultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p32ReportsAsync( + public function p45MultipleReportsAsync( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $period, + int $ordinal, ?string $accept = null, - string $contentType = self::contentTypes['p32Reports'][0] + string $contentType = self::contentTypes['p45MultipleReports'][0] ): PromiseInterface { - return $this->p32ReportsAsyncWithHttpInfo($employerId, $taxYear, $accept, $contentType) + return $this->p45MultipleReportsAsyncWithHttpInfo($employerId, $payPeriod, $period, $ordinal, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -19036,27 +18859,31 @@ function ($response) { } /** - * Operation p32ReportsAsyncWithHttpInfo + * Operation p45MultipleReportsAsyncWithHttpInfo * - * P32 + * P45 for Multiple Employees * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The PayPeriod of the PayRun. (required) + * @param int $period The Period of the PayRun. (required) + * @param int $ordinal The Ordinal of the PayRun. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p32Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p45MultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function p32ReportsAsyncWithHttpInfo( + public function p45MultipleReportsAsyncWithHttpInfo( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $period, + int $ordinal, ?string $accept = null, - string $contentType = self::contentTypes['p32Reports'][0] + string $contentType = self::contentTypes['p45MultipleReports'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\P32ReportResponse'; - $request = $this->p32ReportsRequest($employerId, $taxYear, $accept, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; + $request = $this->p45MultipleReportsRequest($employerId, $payPeriod, $period, $ordinal, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -19095,41 +18922,59 @@ function ($exception) { } /** - * Create request for operation 'p32Reports' + * Create request for operation 'p45MultipleReports' * - * @param string $employerId (required) - * @param \SynergiTech\Staffology\Model\TaxYear $taxYear (required) + * @param string $employerId The employer id. (required) + * @param \SynergiTech\Staffology\Model\PayPeriods $payPeriod The PayPeriod of the PayRun. (required) + * @param int $period The Period of the PayRun. (required) + * @param int $ordinal The Ordinal of the PayRun. (required) * @param string|null $accept (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p32Reports'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['p45MultipleReports'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function p32ReportsRequest( + public function p45MultipleReportsRequest( string $employerId, - \SynergiTech\Staffology\Model\TaxYear $taxYear, + \SynergiTech\Staffology\Model\PayPeriods $payPeriod, + int $period, + int $ordinal, ?string $accept = null, - string $contentType = self::contentTypes['p32Reports'][0] + string $contentType = self::contentTypes['p45MultipleReports'][0] ): Request { // verify the required parameter 'employerId' is set if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $employerId when calling p32Reports' + 'Missing the required parameter $employerId when calling p45MultipleReports' ); } - // verify the required parameter 'taxYear' is set - if ($taxYear === null || (is_array($taxYear) && count($taxYear) === 0)) { + // verify the required parameter 'payPeriod' is set + if ($payPeriod === null || (is_array($payPeriod) && count($payPeriod) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $taxYear when calling p32Reports' + 'Missing the required parameter $payPeriod when calling p45MultipleReports' + ); + } + + // verify the required parameter 'period' is set + if ($period === null || (is_array($period) && count($period) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $period when calling p45MultipleReports' + ); + } + + // verify the required parameter 'ordinal' is set + if ($ordinal === null || (is_array($ordinal) && count($ordinal) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $ordinal when calling p45MultipleReports' ); } - $resourcePath = '/employers/{employerId}/reports/{taxYear}/p32'; + $resourcePath = '/employers/{employerId}/reports/{payPeriod}/{period}/{ordinal}/p45-multiple'; $formParams = []; $queryParams = []; $headerParams = []; @@ -19151,17 +18996,33 @@ public function p32ReportsRequest( ); } // path params - if ($taxYear !== null) { + if ($payPeriod !== null) { $resourcePath = str_replace( - '{' . 'taxYear' . '}', - ObjectSerializer::toPathValue($taxYear->value), + '{' . 'payPeriod' . '}', + ObjectSerializer::toPathValue($payPeriod->value), + $resourcePath + ); + } + // path params + if ($period !== null) { + $resourcePath = str_replace( + '{' . 'period' . '}', + ObjectSerializer::toPathValue($period), + $resourcePath + ); + } + // path params + if ($ordinal !== null) { + $resourcePath = str_replace( + '{' . 'ordinal' . '}', + ObjectSerializer::toPathValue($ordinal), $resourcePath ); } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/html', 'application/pdf', 'text/csv', ], + ['application/json', 'application/octet-stream', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -19287,36 +19148,15 @@ public function p45ReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -19331,34 +19171,11 @@ public function p45ReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -19368,8 +19185,9 @@ public function p45ReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -19523,7 +19341,7 @@ public function p45ReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/pdf', 'text/html', 'application/octet-stream', ], + ['application/json', 'application/octet-stream', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -19653,36 +19471,15 @@ public function p60MultipleReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -19697,34 +19494,11 @@ public function p60MultipleReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -19734,8 +19508,9 @@ public function p60MultipleReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -19910,7 +19685,7 @@ public function p60MultipleReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/pdf', 'text/html', 'application/octet-stream', ], + ['application/json', 'application/octet-stream', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -20040,36 +19815,15 @@ public function p60ReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -20084,34 +19838,11 @@ public function p60ReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -20121,8 +19852,9 @@ public function p60ReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -20302,7 +20034,7 @@ public function p60ReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/pdf', 'text/html', 'application/octet-stream', ], + ['application/json', 'application/octet-stream', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -20448,36 +20180,15 @@ public function papdisFileReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PapdisDocumentReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PapdisDocumentReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PapdisDocumentReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PapdisDocumentReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -20492,34 +20203,11 @@ public function papdisFileReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PapdisDocumentReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PapdisDocumentReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -20529,8 +20217,9 @@ public function papdisFileReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -20779,7 +20468,7 @@ public function papdisFileReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/pdf', 'application/json', 'text/csv', 'text/xml', 'text/html', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', 'text/xml', ], $contentType, $multipart ); @@ -20901,36 +20590,15 @@ public function payCodeExportReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -20945,34 +20613,11 @@ public function payCodeExportReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -20982,8 +20627,9 @@ public function payCodeExportReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -21267,36 +20913,15 @@ public function payElementReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayElementReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayElementReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayElementReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayElementReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -21311,34 +20936,11 @@ public function payElementReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayElementReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayElementReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -21348,8 +20950,9 @@ public function payElementReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -21593,7 +21196,7 @@ public function payElementReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -21727,36 +21330,15 @@ public function payGradesReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayGradesReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayGradesReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayGradesReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayGradesReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -21771,34 +21353,11 @@ public function payGradesReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayGradesReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayGradesReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -21808,8 +21367,9 @@ public function payGradesReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -22133,40 +21693,19 @@ public function payRunCsvReportsWithHttpInfo( null, null ); - } - - $statusCode = $response->getStatusCode(); - - - switch($statusCode) { - case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } + } - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -22181,34 +21720,11 @@ public function payRunCsvReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -22218,8 +21734,9 @@ public function payRunCsvReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -22521,6 +22038,7 @@ public function payRunCsvReportsRequest( * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHoliday Specifies the region whose bank holidays are to be considered in the operation. (optional) * @param int|null $ordinal ordinal (optional, default to 1) * @param bool|null $includeNonEmployeePayments If set to true then we'll also include payments that need to be made to HMRC and PensionProviders (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payRunPaymentsReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -22536,10 +22054,11 @@ public function payRunPaymentsReports( ?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHoliday = null, ?int $ordinal = 1, ?bool $includeNonEmployeePayments = false, + ?int $version = null, string $contentType = self::contentTypes['payRunPaymentsReports'][0] ): \SynergiTech\Staffology\Model\PayrunPaymentsReportReportResponse { - list($response) = $this->payRunPaymentsReportsWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $bankHoliday, $ordinal, $includeNonEmployeePayments, $contentType); + list($response) = $this->payRunPaymentsReportsWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $bankHoliday, $ordinal, $includeNonEmployeePayments, $version, $contentType); return $response; } @@ -22556,6 +22075,7 @@ public function payRunPaymentsReports( * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHoliday Specifies the region whose bank holidays are to be considered in the operation. (optional) * @param int|null $ordinal (optional, default to 1) * @param bool|null $includeNonEmployeePayments If set to true then we'll also include payments that need to be made to HMRC and PensionProviders (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payRunPaymentsReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -22571,10 +22091,11 @@ public function payRunPaymentsReportsWithHttpInfo( ?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHoliday = null, ?int $ordinal = 1, ?bool $includeNonEmployeePayments = false, + ?int $version = null, string $contentType = self::contentTypes['payRunPaymentsReports'][0] ): array { - $request = $this->payRunPaymentsReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $bankHoliday, $ordinal, $includeNonEmployeePayments, $contentType); + $request = $this->payRunPaymentsReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $bankHoliday, $ordinal, $includeNonEmployeePayments, $version, $contentType); try { $options = $this->createHttpClientOption(); @@ -22598,36 +22119,15 @@ public function payRunPaymentsReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayrunPaymentsReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayrunPaymentsReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayrunPaymentsReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayrunPaymentsReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -22642,34 +22142,11 @@ public function payRunPaymentsReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayrunPaymentsReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayrunPaymentsReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -22679,8 +22156,9 @@ public function payRunPaymentsReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -22698,6 +22176,7 @@ public function payRunPaymentsReportsWithHttpInfo( * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHoliday Specifies the region whose bank holidays are to be considered in the operation. (optional) * @param int|null $ordinal (optional, default to 1) * @param bool|null $includeNonEmployeePayments If set to true then we'll also include payments that need to be made to HMRC and PensionProviders (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payRunPaymentsReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -22712,10 +22191,11 @@ public function payRunPaymentsReportsAsync( ?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHoliday = null, ?int $ordinal = 1, ?bool $includeNonEmployeePayments = false, + ?int $version = null, string $contentType = self::contentTypes['payRunPaymentsReports'][0] ): PromiseInterface { - return $this->payRunPaymentsReportsAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $bankHoliday, $ordinal, $includeNonEmployeePayments, $contentType) + return $this->payRunPaymentsReportsAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $bankHoliday, $ordinal, $includeNonEmployeePayments, $version, $contentType) ->then( function ($response) { return $response[0]; @@ -22736,6 +22216,7 @@ function ($response) { * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHoliday Specifies the region whose bank holidays are to be considered in the operation. (optional) * @param int|null $ordinal (optional, default to 1) * @param bool|null $includeNonEmployeePayments If set to true then we'll also include payments that need to be made to HMRC and PensionProviders (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payRunPaymentsReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -22750,11 +22231,12 @@ public function payRunPaymentsReportsAsyncWithHttpInfo( ?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHoliday = null, ?int $ordinal = 1, ?bool $includeNonEmployeePayments = false, + ?int $version = null, string $contentType = self::contentTypes['payRunPaymentsReports'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\PayrunPaymentsReportReportResponse'; - $request = $this->payRunPaymentsReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $bankHoliday, $ordinal, $includeNonEmployeePayments, $contentType); + $request = $this->payRunPaymentsReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $bankHoliday, $ordinal, $includeNonEmployeePayments, $version, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -22803,6 +22285,7 @@ function ($exception) { * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHoliday Specifies the region whose bank holidays are to be considered in the operation. (optional) * @param int|null $ordinal (optional, default to 1) * @param bool|null $includeNonEmployeePayments If set to true then we'll also include payments that need to be made to HMRC and PensionProviders (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payRunPaymentsReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -22817,6 +22300,7 @@ public function payRunPaymentsReportsRequest( ?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHoliday = null, ?int $ordinal = 1, ?bool $includeNonEmployeePayments = false, + ?int $version = null, string $contentType = self::contentTypes['payRunPaymentsReports'][0] ): Request { @@ -22854,6 +22338,7 @@ public function payRunPaymentsReportsRequest( + $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payments/employee'; $formParams = []; $queryParams = []; @@ -22888,6 +22373,15 @@ public function payRunPaymentsReportsRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // header params if ($accept !== null) { @@ -22929,7 +22423,7 @@ public function payRunPaymentsReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -23079,36 +22573,15 @@ public function payRunSummaryReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayRunSummaryLineIEnumerableReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayRunSummaryLineIEnumerableReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayRunSummaryLineIEnumerableReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunSummaryLineIEnumerableReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -23123,34 +22596,11 @@ public function payRunSummaryReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayRunSummaryLineIEnumerableReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayRunSummaryLineIEnumerableReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -23160,8 +22610,9 @@ public function payRunSummaryReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -23547,36 +22998,15 @@ public function paySpineReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PaySpineReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PaySpineReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PaySpineReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySpineReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -23591,34 +23021,11 @@ public function paySpineReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PaySpineReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PaySpineReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -23628,8 +23035,9 @@ public function paySpineReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -23929,36 +23337,15 @@ public function payrollAnalysisCostBreakdownReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -23973,34 +23360,11 @@ public function payrollAnalysisCostBreakdownReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -24010,8 +23374,9 @@ public function payrollAnalysisCostBreakdownReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -24401,36 +23766,15 @@ public function payrollAnalysisEmployeeRoleBreakdownReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -24445,34 +23789,11 @@ public function payrollAnalysisEmployeeRoleBreakdownReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -24482,8 +23803,9 @@ public function payrollAnalysisEmployeeRoleBreakdownReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -24795,6 +24117,8 @@ public function payrollAnalysisEmployeeRoleBreakdownReportsRequest( * @param string|null $accept accept (optional) * @param int|null $ordinal ordinal (optional, default to 1) * @param bool|null $deptBreakdown Set to true and the journal will be split between any relevant Departments (optional, default to false) + * @param bool|null $includeApprenticeLevy Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable (optional, default to false) + * @param bool|null $allSchedules Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollJournalCsvReportReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -24809,10 +24133,12 @@ public function payrollJournalCsvReportReports( ?string $accept = null, ?int $ordinal = 1, ?bool $deptBreakdown = false, + ?bool $includeApprenticeLevy = false, + ?bool $allSchedules = false, string $contentType = self::contentTypes['payrollJournalCsvReportReports'][0] ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->payrollJournalCsvReportReportsWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $deptBreakdown, $contentType); + list($response) = $this->payrollJournalCsvReportReportsWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $deptBreakdown, $includeApprenticeLevy, $allSchedules, $contentType); return $response; } @@ -24828,6 +24154,8 @@ public function payrollJournalCsvReportReports( * @param string|null $accept (optional) * @param int|null $ordinal (optional, default to 1) * @param bool|null $deptBreakdown Set to true and the journal will be split between any relevant Departments (optional, default to false) + * @param bool|null $includeApprenticeLevy Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable (optional, default to false) + * @param bool|null $allSchedules Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollJournalCsvReportReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -24842,10 +24170,12 @@ public function payrollJournalCsvReportReportsWithHttpInfo( ?string $accept = null, ?int $ordinal = 1, ?bool $deptBreakdown = false, + ?bool $includeApprenticeLevy = false, + ?bool $allSchedules = false, string $contentType = self::contentTypes['payrollJournalCsvReportReports'][0] ): array { - $request = $this->payrollJournalCsvReportReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $deptBreakdown, $contentType); + $request = $this->payrollJournalCsvReportReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $deptBreakdown, $includeApprenticeLevy, $allSchedules, $contentType); try { $options = $this->createHttpClientOption(); @@ -24869,36 +24199,15 @@ public function payrollJournalCsvReportReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -24913,34 +24222,11 @@ public function payrollJournalCsvReportReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -24950,8 +24236,9 @@ public function payrollJournalCsvReportReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -24968,6 +24255,8 @@ public function payrollJournalCsvReportReportsWithHttpInfo( * @param string|null $accept (optional) * @param int|null $ordinal (optional, default to 1) * @param bool|null $deptBreakdown Set to true and the journal will be split between any relevant Departments (optional, default to false) + * @param bool|null $includeApprenticeLevy Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable (optional, default to false) + * @param bool|null $allSchedules Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollJournalCsvReportReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -24981,10 +24270,12 @@ public function payrollJournalCsvReportReportsAsync( ?string $accept = null, ?int $ordinal = 1, ?bool $deptBreakdown = false, + ?bool $includeApprenticeLevy = false, + ?bool $allSchedules = false, string $contentType = self::contentTypes['payrollJournalCsvReportReports'][0] ): PromiseInterface { - return $this->payrollJournalCsvReportReportsAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $deptBreakdown, $contentType) + return $this->payrollJournalCsvReportReportsAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $deptBreakdown, $includeApprenticeLevy, $allSchedules, $contentType) ->then( function ($response) { return $response[0]; @@ -25004,6 +24295,8 @@ function ($response) { * @param string|null $accept (optional) * @param int|null $ordinal (optional, default to 1) * @param bool|null $deptBreakdown Set to true and the journal will be split between any relevant Departments (optional, default to false) + * @param bool|null $includeApprenticeLevy Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable (optional, default to false) + * @param bool|null $allSchedules Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollJournalCsvReportReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -25017,11 +24310,13 @@ public function payrollJournalCsvReportReportsAsyncWithHttpInfo( ?string $accept = null, ?int $ordinal = 1, ?bool $deptBreakdown = false, + ?bool $includeApprenticeLevy = false, + ?bool $allSchedules = false, string $contentType = self::contentTypes['payrollJournalCsvReportReports'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->payrollJournalCsvReportReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $deptBreakdown, $contentType); + $request = $this->payrollJournalCsvReportReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $deptBreakdown, $includeApprenticeLevy, $allSchedules, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -25069,6 +24364,8 @@ function ($exception) { * @param string|null $accept (optional) * @param int|null $ordinal (optional, default to 1) * @param bool|null $deptBreakdown Set to true and the journal will be split between any relevant Departments (optional, default to false) + * @param bool|null $includeApprenticeLevy Set to true to include Apprenticeship Levy amounts in the journal if the employer is liable (optional, default to false) + * @param bool|null $allSchedules Set to true to display Apprenticeship Levy amount for all schedules; otherwise, only for the selected schedule in the journal (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollJournalCsvReportReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -25082,6 +24379,8 @@ public function payrollJournalCsvReportReportsRequest( ?string $accept = null, ?int $ordinal = 1, ?bool $deptBreakdown = false, + ?bool $includeApprenticeLevy = false, + ?bool $allSchedules = false, string $contentType = self::contentTypes['payrollJournalCsvReportReports'][0] ): Request { @@ -25118,6 +24417,8 @@ public function payrollJournalCsvReportReportsRequest( + + $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payrolljournalcsv'; $formParams = []; $queryParams = []; @@ -25143,6 +24444,24 @@ public function payrollJournalCsvReportReportsRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $includeApprenticeLevy, + 'includeApprenticeLevy', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $allSchedules, + 'allSchedules', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // header params if ($accept !== null) { @@ -25322,36 +24641,15 @@ public function payrunNiYtdReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\NiYtdReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\NiYtdReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\NiYtdReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NiYtdReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -25366,34 +24664,11 @@ public function payrunNiYtdReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\NiYtdReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\NiYtdReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -25403,8 +24678,9 @@ public function payrunNiYtdReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -25621,7 +24897,7 @@ public function payrunNiYtdReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -25759,36 +25035,15 @@ public function payrunYtdReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\YtdReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\YtdReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\YtdReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\YtdReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -25803,34 +25058,11 @@ public function payrunYtdReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\YtdReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\YtdReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -25840,8 +25072,9 @@ public function payrunYtdReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -26058,7 +25291,7 @@ public function payrunYtdReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -26126,6 +25359,7 @@ public function payrunYtdReportsRequest( * @param string $id The Id of the PayRunEntry. (required) * @param string|null $accept accept (optional) * @param int|null $ordinal ordinal (optional, default to 1) + * @param bool|null $differenceOnly If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payslipReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -26140,10 +25374,11 @@ public function payslipReports( string $id, ?string $accept = null, ?int $ordinal = 1, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['payslipReports'][0] ): \SynergiTech\Staffology\Model\PayslipReportResponse { - list($response) = $this->payslipReportsWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $id, $accept, $ordinal, $contentType); + list($response) = $this->payslipReportsWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $id, $accept, $ordinal, $differenceOnly, $contentType); return $response; } @@ -26159,6 +25394,7 @@ public function payslipReports( * @param string $id The Id of the PayRunEntry. (required) * @param string|null $accept (optional) * @param int|null $ordinal (optional, default to 1) + * @param bool|null $differenceOnly If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payslipReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -26173,10 +25409,11 @@ public function payslipReportsWithHttpInfo( string $id, ?string $accept = null, ?int $ordinal = 1, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['payslipReports'][0] ): array { - $request = $this->payslipReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $id, $accept, $ordinal, $contentType); + $request = $this->payslipReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $id, $accept, $ordinal, $differenceOnly, $contentType); try { $options = $this->createHttpClientOption(); @@ -26200,36 +25437,15 @@ public function payslipReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PayslipReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PayslipReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PayslipReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayslipReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -26244,34 +25460,11 @@ public function payslipReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PayslipReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PayslipReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -26281,8 +25474,9 @@ public function payslipReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -26299,6 +25493,7 @@ public function payslipReportsWithHttpInfo( * @param string $id The Id of the PayRunEntry. (required) * @param string|null $accept (optional) * @param int|null $ordinal (optional, default to 1) + * @param bool|null $differenceOnly If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payslipReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -26312,10 +25507,11 @@ public function payslipReportsAsync( string $id, ?string $accept = null, ?int $ordinal = 1, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['payslipReports'][0] ): PromiseInterface { - return $this->payslipReportsAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $id, $accept, $ordinal, $contentType) + return $this->payslipReportsAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $id, $accept, $ordinal, $differenceOnly, $contentType) ->then( function ($response) { return $response[0]; @@ -26335,6 +25531,7 @@ function ($response) { * @param string $id The Id of the PayRunEntry. (required) * @param string|null $accept (optional) * @param int|null $ordinal (optional, default to 1) + * @param bool|null $differenceOnly If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payslipReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -26348,11 +25545,12 @@ public function payslipReportsAsyncWithHttpInfo( string $id, ?string $accept = null, ?int $ordinal = 1, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['payslipReports'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\PayslipReportResponse'; - $request = $this->payslipReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $id, $accept, $ordinal, $contentType); + $request = $this->payslipReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $id, $accept, $ordinal, $differenceOnly, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -26400,6 +25598,7 @@ function ($exception) { * @param string $id The Id of the PayRunEntry. (required) * @param string|null $accept (optional) * @param int|null $ordinal (optional, default to 1) + * @param bool|null $differenceOnly If the PayRunEntry is part of a supplementary PayRun and this is set to true, the PayRunEntry will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payslipReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -26413,6 +25612,7 @@ public function payslipReportsRequest( string $id, ?string $accept = null, ?int $ordinal = 1, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['payslipReports'][0] ): Request { @@ -26455,6 +25655,7 @@ public function payslipReportsRequest( + $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/{id}/payslip'; $formParams = []; $queryParams = []; @@ -26471,6 +25672,15 @@ public function payslipReportsRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $differenceOnly, + 'differenceOnly', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // header params if ($accept !== null) { @@ -26520,7 +25730,7 @@ public function payslipReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/pdf', 'application/json', 'text/html', 'application/octet-stream', ], + ['application/json', 'application/octet-stream', 'application/pdf', 'text/html', ], $contentType, $multipart ); @@ -26594,6 +25804,8 @@ public function payslipReportsRequest( * @param int|null $pageSize pageSize (optional) * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy sortBy (optional) * @param bool|null $sortDescending sortDescending (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) + * @param bool|null $differenceOnly If the selected pay run is supplementary run and this is set to true, this will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payslipsReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -26614,10 +25826,12 @@ public function payslipsReports( ?int $pageSize = null, ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, ?bool $sortDescending = false, + ?int $version = null, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['payslipsReports'][0] ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->payslipsReportsWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $unemailed, $deptCode, $startersLeaversFilter, $pageNum, $pageSize, $sortBy, $sortDescending, $contentType); + list($response) = $this->payslipsReportsWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $unemailed, $deptCode, $startersLeaversFilter, $pageNum, $pageSize, $sortBy, $sortDescending, $version, $differenceOnly, $contentType); return $response; } @@ -26639,6 +25853,8 @@ public function payslipsReports( * @param int|null $pageSize (optional) * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy (optional) * @param bool|null $sortDescending (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) + * @param bool|null $differenceOnly If the selected pay run is supplementary run and this is set to true, this will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payslipsReports'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -26659,10 +25875,12 @@ public function payslipsReportsWithHttpInfo( ?int $pageSize = null, ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, ?bool $sortDescending = false, + ?int $version = null, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['payslipsReports'][0] ): array { - $request = $this->payslipsReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $unemailed, $deptCode, $startersLeaversFilter, $pageNum, $pageSize, $sortBy, $sortDescending, $contentType); + $request = $this->payslipsReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $unemailed, $deptCode, $startersLeaversFilter, $pageNum, $pageSize, $sortBy, $sortDescending, $version, $differenceOnly, $contentType); try { $options = $this->createHttpClientOption(); @@ -26686,36 +25904,15 @@ public function payslipsReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -26730,34 +25927,11 @@ public function payslipsReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -26767,8 +25941,9 @@ public function payslipsReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -26791,6 +25966,8 @@ public function payslipsReportsWithHttpInfo( * @param int|null $pageSize (optional) * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy (optional) * @param bool|null $sortDescending (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) + * @param bool|null $differenceOnly If the selected pay run is supplementary run and this is set to true, this will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payslipsReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -26810,10 +25987,12 @@ public function payslipsReportsAsync( ?int $pageSize = null, ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, ?bool $sortDescending = false, + ?int $version = null, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['payslipsReports'][0] ): PromiseInterface { - return $this->payslipsReportsAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $unemailed, $deptCode, $startersLeaversFilter, $pageNum, $pageSize, $sortBy, $sortDescending, $contentType) + return $this->payslipsReportsAsyncWithHttpInfo($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $unemailed, $deptCode, $startersLeaversFilter, $pageNum, $pageSize, $sortBy, $sortDescending, $version, $differenceOnly, $contentType) ->then( function ($response) { return $response[0]; @@ -26839,6 +26018,8 @@ function ($response) { * @param int|null $pageSize (optional) * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy (optional) * @param bool|null $sortDescending (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) + * @param bool|null $differenceOnly If the selected pay run is supplementary run and this is set to true, this will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payslipsReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -26858,11 +26039,13 @@ public function payslipsReportsAsyncWithHttpInfo( ?int $pageSize = null, ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, ?bool $sortDescending = false, + ?int $version = null, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['payslipsReports'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->payslipsReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $unemailed, $deptCode, $startersLeaversFilter, $pageNum, $pageSize, $sortBy, $sortDescending, $contentType); + $request = $this->payslipsReportsRequest($employerId, $payPeriod, $periodNumber, $taxYear, $accept, $ordinal, $unemailed, $deptCode, $startersLeaversFilter, $pageNum, $pageSize, $sortBy, $sortDescending, $version, $differenceOnly, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -26916,6 +26099,8 @@ function ($exception) { * @param int|null $pageSize (optional) * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $sortBy (optional) * @param bool|null $sortDescending (optional, default to false) + * @param int|null $version Will indicate what version of the payrun will be shown. If left empty, will show full pay run. (optional) + * @param bool|null $differenceOnly If the selected pay run is supplementary run and this is set to true, this will contain the differences between the current pay run version of the PayRunEntry and its previous version (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payslipsReports'] to see the possible values for this operation * * @throws InvalidArgumentException @@ -26935,6 +26120,8 @@ public function payslipsReportsRequest( ?int $pageSize = null, ?\SynergiTech\Staffology\Model\PayRunEntrySortBy $sortBy = null, ?bool $sortDescending = false, + ?int $version = null, + ?bool $differenceOnly = false, string $contentType = self::contentTypes['payslipsReports'][0] ): Request { @@ -26977,6 +26164,8 @@ public function payslipsReportsRequest( + + $resourcePath = '/employers/{employerId}/reports/{taxYear}/{payPeriod}/{periodNumber}/payslips'; $formParams = []; $queryParams = []; @@ -27056,6 +26245,24 @@ public function payslipsReportsRequest( true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $version, + 'version', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $differenceOnly, + 'differenceOnly', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // header params if ($accept !== null) { @@ -27231,36 +26438,15 @@ public function pensionMembershipsReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PensionMembershipsReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PensionMembershipsReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PensionMembershipsReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionMembershipsReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -27275,34 +26461,11 @@ public function pensionMembershipsReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PensionMembershipsReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PensionMembershipsReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -27312,8 +26475,9 @@ public function pensionMembershipsReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -27504,7 +26668,7 @@ public function pensionMembershipsReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -27626,36 +26790,15 @@ public function rightToWorkReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\RightToWorkReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\RightToWorkReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\RightToWorkReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\RightToWorkReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -27670,34 +26813,11 @@ public function rightToWorkReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\RightToWorkReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\RightToWorkReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -27707,8 +26827,9 @@ public function rightToWorkReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -27846,7 +26967,7 @@ public function rightToWorkReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -27980,36 +27101,15 @@ public function spinePointReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\SpinePointReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\SpinePointReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\SpinePointReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\SpinePointReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -28024,34 +27124,11 @@ public function spinePointReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\SpinePointReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\SpinePointReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -28061,8 +27138,9 @@ public function spinePointReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -28394,36 +27472,15 @@ public function statutoryPayReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\StatutoryPayReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\StatutoryPayReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\StatutoryPayReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\StatutoryPayReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -28438,34 +27495,11 @@ public function statutoryPayReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\StatutoryPayReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\StatutoryPayReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -28475,8 +27509,9 @@ public function statutoryPayReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -28720,7 +27755,7 @@ public function statutoryPayReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -28846,36 +27881,15 @@ public function taxCodeChangesReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\TaxCodeChangeReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\TaxCodeChangeReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\TaxCodeChangeReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\TaxCodeChangeReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -28890,34 +27904,11 @@ public function taxCodeChangesReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\TaxCodeChangeReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\TaxCodeChangeReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -28927,8 +27918,9 @@ public function taxCodeChangesReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -29087,7 +28079,7 @@ public function taxCodeChangesReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -29221,36 +28213,15 @@ public function teachersPensionEoyReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\TeachersPensionEoyReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\TeachersPensionEoyReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\TeachersPensionEoyReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\TeachersPensionEoyReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -29265,34 +28236,11 @@ public function teachersPensionEoyReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\TeachersPensionEoyReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\TeachersPensionEoyReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -29302,8 +28250,9 @@ public function teachersPensionEoyReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -29494,7 +28443,7 @@ public function teachersPensionEoyReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -29640,36 +28589,15 @@ public function umbrellaReconciliationReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\UmbrellaReconciliationReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\UmbrellaReconciliationReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\UmbrellaReconciliationReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\UmbrellaReconciliationReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -29684,34 +28612,11 @@ public function umbrellaReconciliationReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\UmbrellaReconciliationReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\UmbrellaReconciliationReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -29721,8 +28626,9 @@ public function umbrellaReconciliationReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -29966,7 +28872,7 @@ public function umbrellaReconciliationReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -30136,36 +29042,15 @@ public function varianceReportReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\VarianceReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\VarianceReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\VarianceReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\VarianceReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -30180,34 +29065,11 @@ public function varianceReportReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\VarianceReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\VarianceReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -30217,8 +29079,9 @@ public function varianceReportReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -30558,7 +29421,7 @@ public function varianceReportReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'text/html', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', 'text/html', ], $contentType, $multipart ); @@ -30696,36 +29559,15 @@ public function warningsReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\WarningsReportReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\WarningsReportReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\WarningsReportReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\WarningsReportReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -30740,34 +29582,11 @@ public function warningsReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\WarningsReportReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\WarningsReportReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -30777,8 +29596,9 @@ public function warningsReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -30995,7 +29815,7 @@ public function warningsReportsRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'application/pdf', ], + ['application/json', 'application/pdf', 'text/csv', ], $contentType, $multipart ); @@ -31117,36 +29937,15 @@ public function ytdReportsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -31161,34 +29960,11 @@ public function ytdReportsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -31198,8 +29974,9 @@ public function ytdReportsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -31406,4 +30183,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/ReportsAsyncApi.php b/src/Api/ReportsAsyncApi.php index 374216b..86d9a59 100644 --- a/src/Api/ReportsAsyncApi.php +++ b/src/Api/ReportsAsyncApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -72,11 +75,17 @@ class ReportsAsyncApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'executeCustomReportReportsAsync' => [ - 'application/json-patch+json', + 'executeCombinedPensionContributionsReportReportsAsync' => [ + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', + ], + 'executeCustomReportReportsAsync' => [ 'application/*+json', + 'application/json', + 'application/json-patch+json', + 'text/json', ], ]; @@ -126,6 +135,308 @@ public function getConfig(): Configuration return $this->config; } + /** + * Operation executeCombinedPensionContributionsReportReportsAsync + * + * Execute Combined Pension Contributions Report + * + * @param string $employerId employerId (required) + * @param \SynergiTech\Staffology\Model\ContractCombinedPensionContributionsReportRequest|null $contractCombinedPensionContributionsReportRequest contractCombinedPensionContributionsReportRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['executeCombinedPensionContributionsReportReportsAsync'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\ContractJobResponse|null + */ + public function executeCombinedPensionContributionsReportReportsAsync( + string $employerId, + ?\SynergiTech\Staffology\Model\ContractCombinedPensionContributionsReportRequest $contractCombinedPensionContributionsReportRequest = null, + string $contentType = self::contentTypes['executeCombinedPensionContributionsReportReportsAsync'][0] + ): ?\SynergiTech\Staffology\Model\ContractJobResponse + { + list($response) = $this->executeCombinedPensionContributionsReportReportsAsyncWithHttpInfo($employerId, $contractCombinedPensionContributionsReportRequest, $contentType); + return $response; + } + + /** + * Operation executeCombinedPensionContributionsReportReportsAsyncWithHttpInfo + * + * Execute Combined Pension Contributions Report + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\ContractCombinedPensionContributionsReportRequest|null $contractCombinedPensionContributionsReportRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['executeCombinedPensionContributionsReportReportsAsync'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\ContractJobResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function executeCombinedPensionContributionsReportReportsAsyncWithHttpInfo( + string $employerId, + ?\SynergiTech\Staffology\Model\ContractCombinedPensionContributionsReportRequest $contractCombinedPensionContributionsReportRequest = null, + string $contentType = self::contentTypes['executeCombinedPensionContributionsReportReportsAsync'][0] + ): array + { + $request = $this->executeCombinedPensionContributionsReportReportsAsyncRequest($employerId, $contractCombinedPensionContributionsReportRequest, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 202: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ContractJobResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation executeCombinedPensionContributionsReportReportsAsyncAsync + * + * Execute Combined Pension Contributions Report + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\ContractCombinedPensionContributionsReportRequest|null $contractCombinedPensionContributionsReportRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['executeCombinedPensionContributionsReportReportsAsync'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function executeCombinedPensionContributionsReportReportsAsyncAsync( + string $employerId, + ?\SynergiTech\Staffology\Model\ContractCombinedPensionContributionsReportRequest $contractCombinedPensionContributionsReportRequest = null, + string $contentType = self::contentTypes['executeCombinedPensionContributionsReportReportsAsync'][0] + ): PromiseInterface + { + return $this->executeCombinedPensionContributionsReportReportsAsyncAsyncWithHttpInfo($employerId, $contractCombinedPensionContributionsReportRequest, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation executeCombinedPensionContributionsReportReportsAsyncAsyncWithHttpInfo + * + * Execute Combined Pension Contributions Report + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\ContractCombinedPensionContributionsReportRequest|null $contractCombinedPensionContributionsReportRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['executeCombinedPensionContributionsReportReportsAsync'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function executeCombinedPensionContributionsReportReportsAsyncAsyncWithHttpInfo( + string $employerId, + ?\SynergiTech\Staffology\Model\ContractCombinedPensionContributionsReportRequest $contractCombinedPensionContributionsReportRequest = null, + string $contentType = self::contentTypes['executeCombinedPensionContributionsReportReportsAsync'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\ContractJobResponse'; + $request = $this->executeCombinedPensionContributionsReportReportsAsyncRequest($employerId, $contractCombinedPensionContributionsReportRequest, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'executeCombinedPensionContributionsReportReportsAsync' + * + * @param string $employerId (required) + * @param \SynergiTech\Staffology\Model\ContractCombinedPensionContributionsReportRequest|null $contractCombinedPensionContributionsReportRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['executeCombinedPensionContributionsReportReportsAsync'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function executeCombinedPensionContributionsReportReportsAsyncRequest( + string $employerId, + ?\SynergiTech\Staffology\Model\ContractCombinedPensionContributionsReportRequest $contractCombinedPensionContributionsReportRequest = null, + string $contentType = self::contentTypes['executeCombinedPensionContributionsReportReportsAsync'][0] + ): Request + { + + // verify the required parameter 'employerId' is set + if ($employerId === null || (is_array($employerId) && count($employerId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $employerId when calling executeCombinedPensionContributionsReportReportsAsync' + ); + } + + + + $resourcePath = '/employers/{employerId}/reports-async/CombinedPensionContributions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($employerId !== null) { + $resourcePath = str_replace( + '{' . 'employerId' . '}', + ObjectSerializer::toPathValue($employerId), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($contractCombinedPensionContributionsReportRequest)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractCombinedPensionContributionsReportRequest)); + } else { + $httpBody = $contractCombinedPensionContributionsReportRequest; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation executeCustomReportReportsAsync * @@ -138,14 +449,14 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractJobResponse + * @return \SynergiTech\Staffology\Model\ContractJobResponse|null */ public function executeCustomReportReportsAsync( string $employerId, string $templateId, ?\SynergiTech\Staffology\Model\ContractCustomReportRequest $contractCustomReportRequest = null, string $contentType = self::contentTypes['executeCustomReportReportsAsync'][0] - ): \SynergiTech\Staffology\Model\ContractJobResponse + ): ?\SynergiTech\Staffology\Model\ContractJobResponse { list($response) = $this->executeCustomReportReportsAsyncWithHttpInfo($employerId, $templateId, $contractCustomReportRequest, $contentType); return $response; @@ -196,36 +507,15 @@ public function executeCustomReportReportsAsyncWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 202: - if (in_array('\SynergiTech\Staffology\Model\ContractJobResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractJobResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractJobResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -240,34 +530,11 @@ public function executeCustomReportReportsAsyncWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractJobResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractJobResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 202: @@ -277,8 +544,9 @@ public function executeCustomReportReportsAsyncWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -514,4 +782,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/TagApi.php b/src/Api/TagApi.php index ec61321..d5e7e12 100644 --- a/src/Api/TagApi.php +++ b/src/Api/TagApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class TagApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createTag' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteTag' => [ 'application/json', @@ -94,16 +97,16 @@ class TagApi 'application/json', ], 'updateTag' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateTagTag' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -164,13 +167,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Tag + * @return \SynergiTech\Staffology\Model\Tag|null */ public function createTag( string $employerId, ?\SynergiTech\Staffology\Model\Tag $tag = null, string $contentType = self::contentTypes['createTag'][0] - ): \SynergiTech\Staffology\Model\Tag + ): ?\SynergiTech\Staffology\Model\Tag { list($response) = $this->createTagWithHttpInfo($employerId, $tag, $contentType); return $response; @@ -187,7 +190,7 @@ public function createTag( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\Tag, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Tag, HTTP status code, HTTP response headers (array of strings) */ public function createTagWithHttpInfo( string $employerId, @@ -219,36 +222,15 @@ public function createTagWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\Tag', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Tag' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Tag', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tag', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -263,34 +245,11 @@ public function createTagWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Tag'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tag', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -300,8 +259,9 @@ public function createTagWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -565,10 +525,10 @@ public function deleteTagWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -826,10 +786,10 @@ public function deleteTagTagWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1081,36 +1041,15 @@ public function getTagWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Tag', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Tag' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Tag', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tag', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1125,34 +1064,11 @@ public function getTagWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Tag'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tag', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1162,8 +1078,9 @@ public function getTagWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1378,13 +1295,13 @@ public function getTagRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Tag + * @return \SynergiTech\Staffology\Model\Tag|null */ public function getTagTag( string $employerId, ?string $code = null, string $contentType = self::contentTypes['getTagTag'][0] - ): \SynergiTech\Staffology\Model\Tag + ): ?\SynergiTech\Staffology\Model\Tag { list($response) = $this->getTagTagWithHttpInfo($employerId, $code, $contentType); return $response; @@ -1433,36 +1350,15 @@ public function getTagTagWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Tag', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Tag' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Tag', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tag', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1477,34 +1373,11 @@ public function getTagTagWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Tag'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tag', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1514,8 +1387,9 @@ public function getTagTagWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1776,36 +1650,15 @@ public function indexTagWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1820,34 +1673,11 @@ public function indexTagWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1857,8 +1687,9 @@ public function indexTagWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2053,14 +1884,14 @@ public function indexTagRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Tag + * @return \SynergiTech\Staffology\Model\Tag|null */ public function updateTag( string $employerId, string $code, ?\SynergiTech\Staffology\Model\Tag $tag = null, string $contentType = self::contentTypes['updateTag'][0] - ): \SynergiTech\Staffology\Model\Tag + ): ?\SynergiTech\Staffology\Model\Tag { list($response) = $this->updateTagWithHttpInfo($employerId, $code, $tag, $contentType); return $response; @@ -2111,36 +1942,15 @@ public function updateTagWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Tag', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Tag' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Tag', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tag', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2155,34 +1965,11 @@ public function updateTagWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Tag'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tag', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2192,8 +1979,9 @@ public function updateTagWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2423,14 +2211,14 @@ public function updateTagRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Tag + * @return \SynergiTech\Staffology\Model\Tag|null */ public function updateTagTag( string $employerId, ?string $code = null, ?\SynergiTech\Staffology\Model\Tag $tag = null, string $contentType = self::contentTypes['updateTagTag'][0] - ): \SynergiTech\Staffology\Model\Tag + ): ?\SynergiTech\Staffology\Model\Tag { list($response) = $this->updateTagTagWithHttpInfo($employerId, $code, $tag, $contentType); return $response; @@ -2481,36 +2269,15 @@ public function updateTagTagWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Tag', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Tag' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Tag', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tag', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2525,34 +2292,11 @@ public function updateTagTagWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Tag'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tag', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2562,8 +2306,9 @@ public function updateTagTagWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2794,4 +2539,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/TenantApi.php b/src/Api/TenantApi.php index d3a27bd..f6b92a6 100644 --- a/src/Api/TenantApi.php +++ b/src/Api/TenantApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class TenantApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'addAdminUserTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'adminUsersTenant' => [ 'application/json', @@ -91,22 +94,22 @@ class TenantApi 'application/json', ], 'createPayrollSquadTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createPricingTableTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'createTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deletePayrollSquadMemberTenant' => [ 'application/json', @@ -118,10 +121,10 @@ class TenantApi 'application/json', ], 'disabledTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'employerCreationTenant' => [ 'application/json', @@ -138,9 +141,15 @@ class TenantApi 'getApiMailingListReportTenant' => [ 'application/json', ], + 'getBureauUsageStatsTenant' => [ + 'application/json', + ], 'getEmployersTenant' => [ 'application/json', ], + 'getPayrollSquadMembersTenant' => [ + 'application/json', + ], 'getPayrollSquadTenant' => [ 'application/json', ], @@ -166,31 +175,31 @@ class TenantApi 'application/json', ], 'payrollSquadAddMemberTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'payrollSquadUpdateEmployersTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'removeAdminUserTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'setAccountingIdTenant' => [ 'application/json', ], 'setAddressTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'setBureauRedirectEmailAddressTenant' => [ 'application/json', @@ -211,10 +220,10 @@ class TenantApi 'application/json', ], 'setMonthlyMinimumTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'setPricingTableIdTenant' => [ 'application/json', @@ -222,26 +231,23 @@ class TenantApi 'setTenantTenant' => [ 'application/json', ], - 'setUserCanUseRefactoredAeRoutinesTenant' => [ - 'application/json', - ], 'updateBillTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateCssColorsTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateCssTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateFavIconTenant' => [ 'multipart/form-data', @@ -250,28 +256,28 @@ class TenantApi 'multipart/form-data', ], 'updatePricingTableTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateRtiSubmissionSettingsTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'updateUserTenant' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'usageTenant' => [ 'application/json', @@ -409,10 +415,10 @@ public function addAdminUserTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -658,36 +664,15 @@ public function adminUsersTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -702,34 +687,11 @@ public function adminUsersTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -739,8 +701,9 @@ public function adminUsersTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -997,36 +960,15 @@ public function billTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\UsageBill', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\UsageBill' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\UsageBill', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\UsageBill', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1041,34 +983,11 @@ public function billTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\UsageBill'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\UsageBill', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1078,8 +997,9 @@ public function billTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1399,36 +1319,15 @@ public function billsTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1443,34 +1342,11 @@ public function billsTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1480,8 +1356,9 @@ public function billsTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1789,10 +1666,10 @@ public function createBillsTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -1984,13 +1861,13 @@ public function createBillsTenantRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractPayrollSquadResponse + * @return \SynergiTech\Staffology\Model\ContractPayrollSquadResponse|null */ public function createPayrollSquadTenant( string $id, ?\SynergiTech\Staffology\Model\ContractPayrollSquadRequest $contractPayrollSquadRequest = null, string $contentType = self::contentTypes['createPayrollSquadTenant'][0] - ): \SynergiTech\Staffology\Model\ContractPayrollSquadResponse + ): ?\SynergiTech\Staffology\Model\ContractPayrollSquadResponse { list($response) = $this->createPayrollSquadTenantWithHttpInfo($id, $contractPayrollSquadRequest, $contentType); return $response; @@ -2039,36 +1916,15 @@ public function createPayrollSquadTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPayrollSquadResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2083,34 +1939,11 @@ public function createPayrollSquadTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -2120,8 +1953,9 @@ public function createPayrollSquadTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2329,13 +2163,13 @@ public function createPayrollSquadTenantRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PricingTable + * @return \SynergiTech\Staffology\Model\PricingTable|null */ public function createPricingTableTenant( string $id, ?\SynergiTech\Staffology\Model\PricingTable $pricingTable = null, string $contentType = self::contentTypes['createPricingTableTenant'][0] - ): \SynergiTech\Staffology\Model\PricingTable + ): ?\SynergiTech\Staffology\Model\PricingTable { list($response) = $this->createPricingTableTenantWithHttpInfo($id, $pricingTable, $contentType); return $response; @@ -2384,36 +2218,15 @@ public function createPricingTableTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\PricingTable', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PricingTable' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PricingTable', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PricingTable', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2428,34 +2241,11 @@ public function createPricingTableTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PricingTable'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PricingTable', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -2465,8 +2255,9 @@ public function createPricingTableTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2673,12 +2464,12 @@ public function createPricingTableTenantRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Tenant + * @return \SynergiTech\Staffology\Model\Tenant|null */ public function createTenant( ?\SynergiTech\Staffology\Model\Tenant $tenant = null, string $contentType = self::contentTypes['createTenant'][0] - ): \SynergiTech\Staffology\Model\Tenant + ): ?\SynergiTech\Staffology\Model\Tenant { list($response) = $this->createTenantWithHttpInfo($tenant, $contentType); return $response; @@ -2725,36 +2516,15 @@ public function createTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\Tenant', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Tenant' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Tenant', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2769,34 +2539,11 @@ public function createTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Tenant'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -2806,8 +2553,9 @@ public function createTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -3054,10 +2802,10 @@ public function deletePayrollSquadMemberTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -3336,10 +3084,10 @@ public function deletePayrollSquadTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -3597,10 +3345,10 @@ public function deletePricingTableTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -3870,10 +3618,10 @@ public function disabledTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -4181,10 +3929,10 @@ public function employerCreationTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -4457,36 +4205,15 @@ public function employerUsageTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4501,34 +4228,11 @@ public function employerUsageTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4538,8 +4242,9 @@ public function employerUsageTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -4809,36 +4514,15 @@ public function employerUsersTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4853,34 +4537,11 @@ public function employerUsersTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4890,8 +4551,9 @@ public function employerUsersTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5157,36 +4819,15 @@ public function getApiMailingListReportByIdTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5201,34 +4842,11 @@ public function getApiMailingListReportByIdTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5238,8 +4856,9 @@ public function getApiMailingListReportByIdTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5480,36 +5099,15 @@ public function getApiMailingListReportTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5524,34 +5122,11 @@ public function getApiMailingListReportTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5561,8 +5136,9 @@ public function getApiMailingListReportTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -5725,44 +5301,56 @@ public function getApiMailingListReportTenantRequest( } /** - * Operation getEmployersTenant + * Operation getBureauUsageStatsTenant * - * Get Employers + * Get UsageStats Report * - * @param string $id Current tenant id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployersTenant'] to see the possible values for this operation + * @param string $id id (required) + * @param \DateTime|null $fromDate fromDate (optional) + * @param \DateTime|null $toDate toDate (optional) + * @param string|null $accept accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBureauUsageStatsTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\ReportResponse */ - public function getEmployersTenant( + public function getBureauUsageStatsTenant( string $id, - string $contentType = self::contentTypes['getEmployersTenant'][0] - ): array + ?\DateTime $fromDate = null, + ?\DateTime $toDate = null, + ?string $accept = null, + string $contentType = self::contentTypes['getBureauUsageStatsTenant'][0] + ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->getEmployersTenantWithHttpInfo($id, $contentType); + list($response) = $this->getBureauUsageStatsTenantWithHttpInfo($id, $fromDate, $toDate, $accept, $contentType); return $response; } /** - * Operation getEmployersTenantWithHttpInfo + * Operation getBureauUsageStatsTenantWithHttpInfo * - * Get Employers + * Get UsageStats Report * - * @param string $id Current tenant id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployersTenant'] to see the possible values for this operation + * @param string $id (required) + * @param \DateTime|null $fromDate (optional) + * @param \DateTime|null $toDate (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBureauUsageStatsTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getEmployersTenantWithHttpInfo( + public function getBureauUsageStatsTenantWithHttpInfo( string $id, - string $contentType = self::contentTypes['getEmployersTenant'][0] + ?\DateTime $fromDate = null, + ?\DateTime $toDate = null, + ?string $accept = null, + string $contentType = self::contentTypes['getBureauUsageStatsTenant'][0] ): array { - $request = $this->getEmployersTenantRequest($id, $contentType); + $request = $this->getBureauUsageStatsTenantRequest($id, $fromDate, $toDate, $accept, $contentType); try { $options = $this->createHttpClientOption(); @@ -5786,36 +5374,15 @@ public function getEmployersTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5830,66 +5397,50 @@ public function getEmployersTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\Item[]', + '\SynergiTech\Staffology\Model\ReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getEmployersTenantAsync + * Operation getBureauUsageStatsTenantAsync * - * Get Employers + * Get UsageStats Report * - * @param string $id Current tenant id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployersTenant'] to see the possible values for this operation + * @param string $id (required) + * @param \DateTime|null $fromDate (optional) + * @param \DateTime|null $toDate (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBureauUsageStatsTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getEmployersTenantAsync( + public function getBureauUsageStatsTenantAsync( string $id, - string $contentType = self::contentTypes['getEmployersTenant'][0] + ?\DateTime $fromDate = null, + ?\DateTime $toDate = null, + ?string $accept = null, + string $contentType = self::contentTypes['getBureauUsageStatsTenant'][0] ): PromiseInterface { - return $this->getEmployersTenantAsyncWithHttpInfo($id, $contentType) + return $this->getBureauUsageStatsTenantAsyncWithHttpInfo($id, $fromDate, $toDate, $accept, $contentType) ->then( function ($response) { return $response[0]; @@ -5898,23 +5449,29 @@ function ($response) { } /** - * Operation getEmployersTenantAsyncWithHttpInfo + * Operation getBureauUsageStatsTenantAsyncWithHttpInfo * - * Get Employers + * Get UsageStats Report * - * @param string $id Current tenant id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployersTenant'] to see the possible values for this operation + * @param string $id (required) + * @param \DateTime|null $fromDate (optional) + * @param \DateTime|null $toDate (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBureauUsageStatsTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getEmployersTenantAsyncWithHttpInfo( + public function getBureauUsageStatsTenantAsyncWithHttpInfo( string $id, - string $contentType = self::contentTypes['getEmployersTenant'][0] + ?\DateTime $fromDate = null, + ?\DateTime $toDate = null, + ?string $accept = null, + string $contentType = self::contentTypes['getBureauUsageStatsTenant'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->getEmployersTenantRequest($id, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; + $request = $this->getBureauUsageStatsTenantRequest($id, $fromDate, $toDate, $accept, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5953,36 +5510,67 @@ function ($exception) { } /** - * Create request for operation 'getEmployersTenant' + * Create request for operation 'getBureauUsageStatsTenant' * - * @param string $id Current tenant id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployersTenant'] to see the possible values for this operation + * @param string $id (required) + * @param \DateTime|null $fromDate (optional) + * @param \DateTime|null $toDate (optional) + * @param string|null $accept (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBureauUsageStatsTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmployersTenantRequest( + public function getBureauUsageStatsTenantRequest( string $id, - string $contentType = self::contentTypes['getEmployersTenant'][0] + ?\DateTime $fromDate = null, + ?\DateTime $toDate = null, + ?string $accept = null, + string $contentType = self::contentTypes['getBureauUsageStatsTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling getEmployersTenant' + 'Missing the required parameter $id when calling getBureauUsageStatsTenant' ); } - $resourcePath = '/tenants/{id}/users/employers'; + + + + $resourcePath = '/tenants/{id}/bureau-usage-stats'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fromDate, + 'fromDate', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $toDate, + 'toDate', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // header params + if ($accept !== null) { + $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); + } // path params if ($id !== null) { @@ -5995,7 +5583,7 @@ public function getEmployersTenantRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/json', 'text/csv', ], $contentType, $multipart ); @@ -6052,48 +5640,44 @@ public function getEmployersTenantRequest( } /** - * Operation getPayrollSquadTenant + * Operation getEmployersTenant * - * Get Payroll Squad + * Get Employers * * @param string $id Current tenant id (required) - * @param string $payrollSquadId The id of payroll squad (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadTenant'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployersTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractPayrollSquadResponse + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getPayrollSquadTenant( + public function getEmployersTenant( string $id, - string $payrollSquadId, - string $contentType = self::contentTypes['getPayrollSquadTenant'][0] - ): \SynergiTech\Staffology\Model\ContractPayrollSquadResponse + string $contentType = self::contentTypes['getEmployersTenant'][0] + ): ?array { - list($response) = $this->getPayrollSquadTenantWithHttpInfo($id, $payrollSquadId, $contentType); + list($response) = $this->getEmployersTenantWithHttpInfo($id, $contentType); return $response; } /** - * Operation getPayrollSquadTenantWithHttpInfo + * Operation getEmployersTenantWithHttpInfo * - * Get Payroll Squad + * Get Employers * * @param string $id Current tenant id (required) - * @param string $payrollSquadId The id of payroll squad (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadTenant'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployersTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ContractPayrollSquadResponse|\SynergiTech\Staffology\Model\ContractPayrollSquadResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ - public function getPayrollSquadTenantWithHttpInfo( + public function getEmployersTenantWithHttpInfo( string $id, - string $payrollSquadId, - string $contentType = self::contentTypes['getPayrollSquadTenant'][0] + string $contentType = self::contentTypes['getEmployersTenant'][0] ): array { - $request = $this->getPayrollSquadTenantRequest($id, $payrollSquadId, $contentType); + $request = $this->getEmployersTenantRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -6117,63 +5701,15 @@ public function getPayrollSquadTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPayrollSquadResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if (in_array('\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPayrollSquadResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6188,76 +5724,44 @@ public function getPayrollSquadTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', + '\SynergiTech\Staffology\Model\Item[]', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getPayrollSquadTenantAsync + * Operation getEmployersTenantAsync * - * Get Payroll Squad + * Get Employers * * @param string $id Current tenant id (required) - * @param string $payrollSquadId The id of payroll squad (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadTenant'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployersTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getPayrollSquadTenantAsync( + public function getEmployersTenantAsync( string $id, - string $payrollSquadId, - string $contentType = self::contentTypes['getPayrollSquadTenant'][0] + string $contentType = self::contentTypes['getEmployersTenant'][0] ): PromiseInterface { - return $this->getPayrollSquadTenantAsyncWithHttpInfo($id, $payrollSquadId, $contentType) + return $this->getEmployersTenantAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -6266,25 +5770,23 @@ function ($response) { } /** - * Operation getPayrollSquadTenantAsyncWithHttpInfo + * Operation getEmployersTenantAsyncWithHttpInfo * - * Get Payroll Squad + * Get Employers * * @param string $id Current tenant id (required) - * @param string $payrollSquadId The id of payroll squad (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadTenant'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployersTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getPayrollSquadTenantAsyncWithHttpInfo( + public function getEmployersTenantAsyncWithHttpInfo( string $id, - string $payrollSquadId, - string $contentType = self::contentTypes['getPayrollSquadTenant'][0] + string $contentType = self::contentTypes['getEmployersTenant'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse'; - $request = $this->getPayrollSquadTenantRequest($id, $payrollSquadId, $contentType); + $returnType = '\SynergiTech\Staffology\Model\Item[]'; + $request = $this->getEmployersTenantRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6323,38 +5825,29 @@ function ($exception) { } /** - * Create request for operation 'getPayrollSquadTenant' + * Create request for operation 'getEmployersTenant' * * @param string $id Current tenant id (required) - * @param string $payrollSquadId The id of payroll squad (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadTenant'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmployersTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPayrollSquadTenantRequest( + public function getEmployersTenantRequest( string $id, - string $payrollSquadId, - string $contentType = self::contentTypes['getPayrollSquadTenant'][0] + string $contentType = self::contentTypes['getEmployersTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling getPayrollSquadTenant' - ); - } - - // verify the required parameter 'payrollSquadId' is set - if ($payrollSquadId === null || (is_array($payrollSquadId) && count($payrollSquadId) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $payrollSquadId when calling getPayrollSquadTenant' + 'Missing the required parameter $id when calling getEmployersTenant' ); } - $resourcePath = '/tenants/{id}/payrollsquad/{payrollSquadId}'; + $resourcePath = '/tenants/{id}/users/employers'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6371,14 +5864,6 @@ public function getPayrollSquadTenantRequest( $resourcePath ); } - // path params - if ($payrollSquadId !== null) { - $resourcePath = str_replace( - '{' . 'payrollSquadId' . '}', - ObjectSerializer::toPathValue($payrollSquadId), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -6439,44 +5924,44 @@ public function getPayrollSquadTenantRequest( } /** - * Operation getPayrollSquadsTenant + * Operation getPayrollSquadMembersTenant * - * Get Payroll Squads + * Get Payroll Squad Members for Employer * - * @param string $id Current tenant id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadsTenant'] to see the possible values for this operation + * @param string $id Current Employer id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadMembersTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getPayrollSquadsTenant( + public function getPayrollSquadMembersTenant( string $id, - string $contentType = self::contentTypes['getPayrollSquadsTenant'][0] - ): array + string $contentType = self::contentTypes['getPayrollSquadMembersTenant'][0] + ): ?array { - list($response) = $this->getPayrollSquadsTenantWithHttpInfo($id, $contentType); + list($response) = $this->getPayrollSquadMembersTenantWithHttpInfo($id, $contentType); return $response; } /** - * Operation getPayrollSquadsTenantWithHttpInfo + * Operation getPayrollSquadMembersTenantWithHttpInfo * - * Get Payroll Squads + * Get Payroll Squad Members for Employer * - * @param string $id Current tenant id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadsTenant'] to see the possible values for this operation + * @param string $id Current Employer id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadMembersTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ - public function getPayrollSquadsTenantWithHttpInfo( + public function getPayrollSquadMembersTenantWithHttpInfo( string $id, - string $contentType = self::contentTypes['getPayrollSquadsTenant'][0] + string $contentType = self::contentTypes['getPayrollSquadMembersTenant'][0] ): array { - $request = $this->getPayrollSquadsTenantRequest($id, $contentType); + $request = $this->getPayrollSquadMembersTenantRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -6500,36 +5985,15 @@ public function getPayrollSquadsTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6544,34 +6008,11 @@ public function getPayrollSquadsTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6581,29 +6022,30 @@ public function getPayrollSquadsTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getPayrollSquadsTenantAsync + * Operation getPayrollSquadMembersTenantAsync * - * Get Payroll Squads + * Get Payroll Squad Members for Employer * - * @param string $id Current tenant id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadsTenant'] to see the possible values for this operation + * @param string $id Current Employer id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadMembersTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getPayrollSquadsTenantAsync( + public function getPayrollSquadMembersTenantAsync( string $id, - string $contentType = self::contentTypes['getPayrollSquadsTenant'][0] + string $contentType = self::contentTypes['getPayrollSquadMembersTenant'][0] ): PromiseInterface { - return $this->getPayrollSquadsTenantAsyncWithHttpInfo($id, $contentType) + return $this->getPayrollSquadMembersTenantAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -6612,23 +6054,23 @@ function ($response) { } /** - * Operation getPayrollSquadsTenantAsyncWithHttpInfo + * Operation getPayrollSquadMembersTenantAsyncWithHttpInfo * - * Get Payroll Squads + * Get Payroll Squad Members for Employer * - * @param string $id Current tenant id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadsTenant'] to see the possible values for this operation + * @param string $id Current Employer id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadMembersTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getPayrollSquadsTenantAsyncWithHttpInfo( + public function getPayrollSquadMembersTenantAsyncWithHttpInfo( string $id, - string $contentType = self::contentTypes['getPayrollSquadsTenant'][0] + string $contentType = self::contentTypes['getPayrollSquadMembersTenant'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->getPayrollSquadsTenantRequest($id, $contentType); + $request = $this->getPayrollSquadMembersTenantRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6667,29 +6109,29 @@ function ($exception) { } /** - * Create request for operation 'getPayrollSquadsTenant' + * Create request for operation 'getPayrollSquadMembersTenant' * - * @param string $id Current tenant id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadsTenant'] to see the possible values for this operation + * @param string $id Current Employer id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadMembersTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPayrollSquadsTenantRequest( + public function getPayrollSquadMembersTenantRequest( string $id, - string $contentType = self::contentTypes['getPayrollSquadsTenant'][0] + string $contentType = self::contentTypes['getPayrollSquadMembersTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling getPayrollSquadsTenant' + 'Missing the required parameter $id when calling getPayrollSquadMembersTenant' ); } - $resourcePath = '/tenants/{id}/payrollsquad'; + $resourcePath = '/tenants/{id}/payrollsquads'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6766,48 +6208,48 @@ public function getPayrollSquadsTenantRequest( } /** - * Operation getPricingTableTenant + * Operation getPayrollSquadTenant * - * Get PricingTable + * Get Payroll Squad * - * @param string $id id (required) - * @param string $pricingTableId pricingTableId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTableTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param string $payrollSquadId The id of payroll squad (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PricingTable + * @return \SynergiTech\Staffology\Model\ContractPayrollSquadResponse|null */ - public function getPricingTableTenant( + public function getPayrollSquadTenant( string $id, - string $pricingTableId, - string $contentType = self::contentTypes['getPricingTableTenant'][0] - ): \SynergiTech\Staffology\Model\PricingTable + string $payrollSquadId, + string $contentType = self::contentTypes['getPayrollSquadTenant'][0] + ): ?\SynergiTech\Staffology\Model\ContractPayrollSquadResponse { - list($response) = $this->getPricingTableTenantWithHttpInfo($id, $pricingTableId, $contentType); + list($response) = $this->getPayrollSquadTenantWithHttpInfo($id, $payrollSquadId, $contentType); return $response; } /** - * Operation getPricingTableTenantWithHttpInfo + * Operation getPayrollSquadTenantWithHttpInfo * - * Get PricingTable + * Get Payroll Squad * - * @param string $id (required) - * @param string $pricingTableId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTableTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param string $payrollSquadId The id of payroll squad (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\PricingTable|\SynergiTech\Staffology\Model\PricingTable, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractPayrollSquadResponse|\SynergiTech\Staffology\Model\ContractPayrollSquadResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getPricingTableTenantWithHttpInfo( + public function getPayrollSquadTenantWithHttpInfo( string $id, - string $pricingTableId, - string $contentType = self::contentTypes['getPricingTableTenant'][0] + string $payrollSquadId, + string $contentType = self::contentTypes['getPayrollSquadTenant'][0] ): array { - $request = $this->getPricingTableTenantRequest($id, $pricingTableId, $contentType); + $request = $this->getPayrollSquadTenantRequest($id, $payrollSquadId, $contentType); try { $options = $this->createHttpClientOption(); @@ -6831,63 +6273,21 @@ public function getPricingTableTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PricingTable', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PricingTable' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PricingTable', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', + $request, + $response, + ); case 404: - if (in_array('\SynergiTech\Staffology\Model\PricingTable', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PricingTable' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PricingTable', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -6902,76 +6302,54 @@ public function getPricingTableTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PricingTable'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\PricingTable', + '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\PricingTable', + '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getPricingTableTenantAsync + * Operation getPayrollSquadTenantAsync * - * Get PricingTable + * Get Payroll Squad * - * @param string $id (required) - * @param string $pricingTableId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTableTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param string $payrollSquadId The id of payroll squad (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getPricingTableTenantAsync( + public function getPayrollSquadTenantAsync( string $id, - string $pricingTableId, - string $contentType = self::contentTypes['getPricingTableTenant'][0] + string $payrollSquadId, + string $contentType = self::contentTypes['getPayrollSquadTenant'][0] ): PromiseInterface { - return $this->getPricingTableTenantAsyncWithHttpInfo($id, $pricingTableId, $contentType) + return $this->getPayrollSquadTenantAsyncWithHttpInfo($id, $payrollSquadId, $contentType) ->then( function ($response) { return $response[0]; @@ -6980,25 +6358,25 @@ function ($response) { } /** - * Operation getPricingTableTenantAsyncWithHttpInfo + * Operation getPayrollSquadTenantAsyncWithHttpInfo * - * Get PricingTable + * Get Payroll Squad * - * @param string $id (required) - * @param string $pricingTableId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTableTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param string $payrollSquadId The id of payroll squad (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getPricingTableTenantAsyncWithHttpInfo( + public function getPayrollSquadTenantAsyncWithHttpInfo( string $id, - string $pricingTableId, - string $contentType = self::contentTypes['getPricingTableTenant'][0] + string $payrollSquadId, + string $contentType = self::contentTypes['getPayrollSquadTenant'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\PricingTable'; - $request = $this->getPricingTableTenantRequest($id, $pricingTableId, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ContractPayrollSquadResponse'; + $request = $this->getPayrollSquadTenantRequest($id, $payrollSquadId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7037,38 +6415,38 @@ function ($exception) { } /** - * Create request for operation 'getPricingTableTenant' + * Create request for operation 'getPayrollSquadTenant' * - * @param string $id (required) - * @param string $pricingTableId (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTableTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param string $payrollSquadId The id of payroll squad (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPricingTableTenantRequest( + public function getPayrollSquadTenantRequest( string $id, - string $pricingTableId, - string $contentType = self::contentTypes['getPricingTableTenant'][0] + string $payrollSquadId, + string $contentType = self::contentTypes['getPayrollSquadTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling getPricingTableTenant' + 'Missing the required parameter $id when calling getPayrollSquadTenant' ); } - // verify the required parameter 'pricingTableId' is set - if ($pricingTableId === null || (is_array($pricingTableId) && count($pricingTableId) === 0)) { + // verify the required parameter 'payrollSquadId' is set + if ($payrollSquadId === null || (is_array($payrollSquadId) && count($payrollSquadId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $pricingTableId when calling getPricingTableTenant' + 'Missing the required parameter $payrollSquadId when calling getPayrollSquadTenant' ); } - $resourcePath = '/tenants/{id}/pricingtables/{pricingTableId}'; + $resourcePath = '/tenants/{id}/payrollsquad/{payrollSquadId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -7086,10 +6464,10 @@ public function getPricingTableTenantRequest( ); } // path params - if ($pricingTableId !== null) { + if ($payrollSquadId !== null) { $resourcePath = str_replace( - '{' . 'pricingTableId' . '}', - ObjectSerializer::toPathValue($pricingTableId), + '{' . 'payrollSquadId' . '}', + ObjectSerializer::toPathValue($payrollSquadId), $resourcePath ); } @@ -7153,44 +6531,44 @@ public function getPricingTableTenantRequest( } /** - * Operation getPricingTablesTenant + * Operation getPayrollSquadsTenant * - * Get PricingTables + * Get Payroll Squads * - * @param string $id id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTablesTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadsTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Item[] + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getPricingTablesTenant( + public function getPayrollSquadsTenant( string $id, - string $contentType = self::contentTypes['getPricingTablesTenant'][0] - ): array + string $contentType = self::contentTypes['getPayrollSquadsTenant'][0] + ): ?array { - list($response) = $this->getPricingTablesTenantWithHttpInfo($id, $contentType); + list($response) = $this->getPayrollSquadsTenantWithHttpInfo($id, $contentType); return $response; } /** - * Operation getPricingTablesTenantWithHttpInfo + * Operation getPayrollSquadsTenantWithHttpInfo * - * Get PricingTables + * Get Payroll Squads * - * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTablesTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadsTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ - public function getPricingTablesTenantWithHttpInfo( + public function getPayrollSquadsTenantWithHttpInfo( string $id, - string $contentType = self::contentTypes['getPricingTablesTenant'][0] + string $contentType = self::contentTypes['getPayrollSquadsTenant'][0] ): array { - $request = $this->getPricingTablesTenantRequest($id, $contentType); + $request = $this->getPayrollSquadsTenantRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -7214,36 +6592,15 @@ public function getPricingTablesTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7258,34 +6615,11 @@ public function getPricingTablesTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7295,29 +6629,30 @@ public function getPricingTablesTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getPricingTablesTenantAsync + * Operation getPayrollSquadsTenantAsync * - * Get PricingTables + * Get Payroll Squads * - * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTablesTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadsTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getPricingTablesTenantAsync( + public function getPayrollSquadsTenantAsync( string $id, - string $contentType = self::contentTypes['getPricingTablesTenant'][0] + string $contentType = self::contentTypes['getPayrollSquadsTenant'][0] ): PromiseInterface { - return $this->getPricingTablesTenantAsyncWithHttpInfo($id, $contentType) + return $this->getPayrollSquadsTenantAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -7326,23 +6661,23 @@ function ($response) { } /** - * Operation getPricingTablesTenantAsyncWithHttpInfo + * Operation getPayrollSquadsTenantAsyncWithHttpInfo * - * Get PricingTables + * Get Payroll Squads * - * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTablesTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadsTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getPricingTablesTenantAsyncWithHttpInfo( + public function getPayrollSquadsTenantAsyncWithHttpInfo( string $id, - string $contentType = self::contentTypes['getPricingTablesTenant'][0] + string $contentType = self::contentTypes['getPayrollSquadsTenant'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\Item[]'; - $request = $this->getPricingTablesTenantRequest($id, $contentType); + $request = $this->getPayrollSquadsTenantRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7381,29 +6716,29 @@ function ($exception) { } /** - * Create request for operation 'getPricingTablesTenant' + * Create request for operation 'getPayrollSquadsTenant' * - * @param string $id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTablesTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPayrollSquadsTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPricingTablesTenantRequest( + public function getPayrollSquadsTenantRequest( string $id, - string $contentType = self::contentTypes['getPricingTablesTenant'][0] + string $contentType = self::contentTypes['getPayrollSquadsTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling getPricingTablesTenant' + 'Missing the required parameter $id when calling getPayrollSquadsTenant' ); } - $resourcePath = '/tenants/{id}/pricingtables'; + $resourcePath = '/tenants/{id}/payrollsquad'; $formParams = []; $queryParams = []; $headerParams = []; @@ -7480,44 +6815,48 @@ public function getPricingTablesTenantRequest( } /** - * Operation getRtiSubmissionSettingsTenant + * Operation getPricingTableTenant * - * Get RtiSubmissionSettings + * Get PricingTable * - * @param string|null $id The Id of the Tenant. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRtiSubmissionSettingsTenant'] to see the possible values for this operation + * @param string $id id (required) + * @param string $pricingTableId pricingTableId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTableTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\RtiSubmissionSettings + * @return \SynergiTech\Staffology\Model\PricingTable|null */ - public function getRtiSubmissionSettingsTenant( - ?string $id = null, - string $contentType = self::contentTypes['getRtiSubmissionSettingsTenant'][0] - ): \SynergiTech\Staffology\Model\RtiSubmissionSettings + public function getPricingTableTenant( + string $id, + string $pricingTableId, + string $contentType = self::contentTypes['getPricingTableTenant'][0] + ): ?\SynergiTech\Staffology\Model\PricingTable { - list($response) = $this->getRtiSubmissionSettingsTenantWithHttpInfo($id, $contentType); + list($response) = $this->getPricingTableTenantWithHttpInfo($id, $pricingTableId, $contentType); return $response; } /** - * Operation getRtiSubmissionSettingsTenantWithHttpInfo + * Operation getPricingTableTenantWithHttpInfo * - * Get RtiSubmissionSettings + * Get PricingTable * - * @param string|null $id The Id of the Tenant. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRtiSubmissionSettingsTenant'] to see the possible values for this operation + * @param string $id (required) + * @param string $pricingTableId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTableTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\RtiSubmissionSettings, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\PricingTable|\SynergiTech\Staffology\Model\PricingTable, HTTP status code, HTTP response headers (array of strings) */ - public function getRtiSubmissionSettingsTenantWithHttpInfo( - ?string $id = null, - string $contentType = self::contentTypes['getRtiSubmissionSettingsTenant'][0] + public function getPricingTableTenantWithHttpInfo( + string $id, + string $pricingTableId, + string $contentType = self::contentTypes['getPricingTableTenant'][0] ): array { - $request = $this->getRtiSubmissionSettingsTenantRequest($id, $contentType); + $request = $this->getPricingTableTenantRequest($id, $pricingTableId, $contentType); try { $options = $this->createHttpClientOption(); @@ -7541,36 +6880,21 @@ public function getRtiSubmissionSettingsTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\RtiSubmissionSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\RtiSubmissionSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\RtiSubmissionSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PricingTable', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PricingTable', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7585,66 +6909,54 @@ public function getRtiSubmissionSettingsTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\RtiSubmissionSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PricingTable', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\RtiSubmissionSettings', + '\SynergiTech\Staffology\Model\PricingTable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\PricingTable', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getRtiSubmissionSettingsTenantAsync + * Operation getPricingTableTenantAsync * - * Get RtiSubmissionSettings + * Get PricingTable * - * @param string|null $id The Id of the Tenant. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRtiSubmissionSettingsTenant'] to see the possible values for this operation + * @param string $id (required) + * @param string $pricingTableId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTableTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getRtiSubmissionSettingsTenantAsync( - ?string $id = null, - string $contentType = self::contentTypes['getRtiSubmissionSettingsTenant'][0] + public function getPricingTableTenantAsync( + string $id, + string $pricingTableId, + string $contentType = self::contentTypes['getPricingTableTenant'][0] ): PromiseInterface { - return $this->getRtiSubmissionSettingsTenantAsyncWithHttpInfo($id, $contentType) + return $this->getPricingTableTenantAsyncWithHttpInfo($id, $pricingTableId, $contentType) ->then( function ($response) { return $response[0]; @@ -7653,23 +6965,25 @@ function ($response) { } /** - * Operation getRtiSubmissionSettingsTenantAsyncWithHttpInfo + * Operation getPricingTableTenantAsyncWithHttpInfo * - * Get RtiSubmissionSettings + * Get PricingTable * - * @param string|null $id The Id of the Tenant. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRtiSubmissionSettingsTenant'] to see the possible values for this operation + * @param string $id (required) + * @param string $pricingTableId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTableTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getRtiSubmissionSettingsTenantAsyncWithHttpInfo( - ?string $id = null, - string $contentType = self::contentTypes['getRtiSubmissionSettingsTenant'][0] + public function getPricingTableTenantAsyncWithHttpInfo( + string $id, + string $pricingTableId, + string $contentType = self::contentTypes['getPricingTableTenant'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\RtiSubmissionSettings'; - $request = $this->getRtiSubmissionSettingsTenantRequest($id, $contentType); + $returnType = '\SynergiTech\Staffology\Model\PricingTable'; + $request = $this->getPricingTableTenantRequest($id, $pricingTableId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7708,40 +7022,62 @@ function ($exception) { } /** - * Create request for operation 'getRtiSubmissionSettingsTenant' + * Create request for operation 'getPricingTableTenant' * - * @param string|null $id The Id of the Tenant. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRtiSubmissionSettingsTenant'] to see the possible values for this operation + * @param string $id (required) + * @param string $pricingTableId (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTableTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getRtiSubmissionSettingsTenantRequest( - ?string $id = null, - string $contentType = self::contentTypes['getRtiSubmissionSettingsTenant'][0] + public function getPricingTableTenantRequest( + string $id, + string $pricingTableId, + string $contentType = self::contentTypes['getPricingTableTenant'][0] ): Request { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling getPricingTableTenant' + ); + } + + // verify the required parameter 'pricingTableId' is set + if ($pricingTableId === null || (is_array($pricingTableId) && count($pricingTableId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $pricingTableId when calling getPricingTableTenant' + ); + } - $resourcePath = '/tenants/ritsubmissionsettings'; + $resourcePath = '/tenants/{id}/pricingtables/{pricingTableId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id, - 'id', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + // path params + if ($pricingTableId !== null) { + $resourcePath = str_replace( + '{' . 'pricingTableId' . '}', + ObjectSerializer::toPathValue($pricingTableId), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -7802,44 +7138,44 @@ public function getRtiSubmissionSettingsTenantRequest( } /** - * Operation getTenant + * Operation getPricingTablesTenant * - * Get a Tenant + * Get PricingTables * - * @param string $id The Id of the Tenant you want to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenant'] to see the possible values for this operation + * @param string $id id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTablesTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Tenant + * @return \SynergiTech\Staffology\Model\Item[] */ - public function getTenant( + public function getPricingTablesTenant( string $id, - string $contentType = self::contentTypes['getTenant'][0] - ): \SynergiTech\Staffology\Model\Tenant + string $contentType = self::contentTypes['getPricingTablesTenant'][0] + ): array { - list($response) = $this->getTenantWithHttpInfo($id, $contentType); + list($response) = $this->getPricingTablesTenantWithHttpInfo($id, $contentType); return $response; } /** - * Operation getTenantWithHttpInfo + * Operation getPricingTablesTenantWithHttpInfo * - * Get a Tenant + * Get PricingTables * - * @param string $id The Id of the Tenant you want to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenant'] to see the possible values for this operation + * @param string $id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTablesTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\Tenant, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Item[], HTTP status code, HTTP response headers (array of strings) */ - public function getTenantWithHttpInfo( + public function getPricingTablesTenantWithHttpInfo( string $id, - string $contentType = self::contentTypes['getTenant'][0] + string $contentType = self::contentTypes['getPricingTablesTenant'][0] ): array { - $request = $this->getTenantRequest($id, $contentType); + $request = $this->getPricingTablesTenantRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -7863,36 +7199,15 @@ public function getTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Tenant', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Tenant' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Tenant', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -7907,66 +7222,44 @@ public function getTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Tenant'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\Tenant', + '\SynergiTech\Staffology\Model\Item[]', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getTenantAsync + * Operation getPricingTablesTenantAsync * - * Get a Tenant + * Get PricingTables * - * @param string $id The Id of the Tenant you want to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenant'] to see the possible values for this operation + * @param string $id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTablesTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getTenantAsync( + public function getPricingTablesTenantAsync( string $id, - string $contentType = self::contentTypes['getTenant'][0] + string $contentType = self::contentTypes['getPricingTablesTenant'][0] ): PromiseInterface { - return $this->getTenantAsyncWithHttpInfo($id, $contentType) + return $this->getPricingTablesTenantAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -7975,23 +7268,23 @@ function ($response) { } /** - * Operation getTenantAsyncWithHttpInfo + * Operation getPricingTablesTenantAsyncWithHttpInfo * - * Get a Tenant + * Get PricingTables * - * @param string $id The Id of the Tenant you want to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenant'] to see the possible values for this operation + * @param string $id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTablesTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getTenantAsyncWithHttpInfo( + public function getPricingTablesTenantAsyncWithHttpInfo( string $id, - string $contentType = self::contentTypes['getTenant'][0] + string $contentType = self::contentTypes['getPricingTablesTenant'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\Tenant'; - $request = $this->getTenantRequest($id, $contentType); + $returnType = '\SynergiTech\Staffology\Model\Item[]'; + $request = $this->getPricingTablesTenantRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8030,29 +7323,29 @@ function ($exception) { } /** - * Create request for operation 'getTenant' + * Create request for operation 'getPricingTablesTenant' * - * @param string $id The Id of the Tenant you want to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenant'] to see the possible values for this operation + * @param string $id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPricingTablesTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTenantRequest( + public function getPricingTablesTenantRequest( string $id, - string $contentType = self::contentTypes['getTenant'][0] + string $contentType = self::contentTypes['getPricingTablesTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling getTenant' + 'Missing the required parameter $id when calling getPricingTablesTenant' ); } - $resourcePath = '/tenants/{id}'; + $resourcePath = '/tenants/{id}/pricingtables'; $formParams = []; $queryParams = []; $headerParams = []; @@ -8129,52 +7422,44 @@ public function getTenantRequest( } /** - * Operation getUsersWithNoBillableActivityTenant + * Operation getRtiSubmissionSettingsTenant * - * Get Users with no Billable Activity. + * Get RtiSubmissionSettings * - * @param string $id The Id of the Tenant (required) - * @param int|null $month month (optional) - * @param int|null $year year (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsersWithNoBillableActivityTenant'] to see the possible values for this operation + * @param string|null $id The Id of the Tenant. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRtiSubmissionSettingsTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ReportResponse + * @return \SynergiTech\Staffology\Model\RtiSubmissionSettings */ - public function getUsersWithNoBillableActivityTenant( - string $id, - ?int $month = null, - ?int $year = null, - string $contentType = self::contentTypes['getUsersWithNoBillableActivityTenant'][0] - ): \SynergiTech\Staffology\Model\ReportResponse + public function getRtiSubmissionSettingsTenant( + ?string $id = null, + string $contentType = self::contentTypes['getRtiSubmissionSettingsTenant'][0] + ): \SynergiTech\Staffology\Model\RtiSubmissionSettings { - list($response) = $this->getUsersWithNoBillableActivityTenantWithHttpInfo($id, $month, $year, $contentType); + list($response) = $this->getRtiSubmissionSettingsTenantWithHttpInfo($id, $contentType); return $response; } /** - * Operation getUsersWithNoBillableActivityTenantWithHttpInfo + * Operation getRtiSubmissionSettingsTenantWithHttpInfo * - * Get Users with no Billable Activity. + * Get RtiSubmissionSettings * - * @param string $id The Id of the Tenant (required) - * @param int|null $month (optional) - * @param int|null $year (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsersWithNoBillableActivityTenant'] to see the possible values for this operation + * @param string|null $id The Id of the Tenant. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRtiSubmissionSettingsTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\RtiSubmissionSettings, HTTP status code, HTTP response headers (array of strings) */ - public function getUsersWithNoBillableActivityTenantWithHttpInfo( - string $id, - ?int $month = null, - ?int $year = null, - string $contentType = self::contentTypes['getUsersWithNoBillableActivityTenant'][0] + public function getRtiSubmissionSettingsTenantWithHttpInfo( + ?string $id = null, + string $contentType = self::contentTypes['getRtiSubmissionSettingsTenant'][0] ): array { - $request = $this->getUsersWithNoBillableActivityTenantRequest($id, $month, $year, $contentType); + $request = $this->getRtiSubmissionSettingsTenantRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -8198,36 +7483,15 @@ public function getUsersWithNoBillableActivityTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\RtiSubmissionSettings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8242,70 +7506,44 @@ public function getUsersWithNoBillableActivityTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\RtiSubmissionSettings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ReportResponse', + '\SynergiTech\Staffology\Model\RtiSubmissionSettings', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation getUsersWithNoBillableActivityTenantAsync + * Operation getRtiSubmissionSettingsTenantAsync * - * Get Users with no Billable Activity. + * Get RtiSubmissionSettings * - * @param string $id The Id of the Tenant (required) - * @param int|null $month (optional) - * @param int|null $year (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsersWithNoBillableActivityTenant'] to see the possible values for this operation + * @param string|null $id The Id of the Tenant. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRtiSubmissionSettingsTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getUsersWithNoBillableActivityTenantAsync( - string $id, - ?int $month = null, - ?int $year = null, - string $contentType = self::contentTypes['getUsersWithNoBillableActivityTenant'][0] + public function getRtiSubmissionSettingsTenantAsync( + ?string $id = null, + string $contentType = self::contentTypes['getRtiSubmissionSettingsTenant'][0] ): PromiseInterface { - return $this->getUsersWithNoBillableActivityTenantAsyncWithHttpInfo($id, $month, $year, $contentType) + return $this->getRtiSubmissionSettingsTenantAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -8314,27 +7552,23 @@ function ($response) { } /** - * Operation getUsersWithNoBillableActivityTenantAsyncWithHttpInfo + * Operation getRtiSubmissionSettingsTenantAsyncWithHttpInfo * - * Get Users with no Billable Activity. + * Get RtiSubmissionSettings * - * @param string $id The Id of the Tenant (required) - * @param int|null $month (optional) - * @param int|null $year (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsersWithNoBillableActivityTenant'] to see the possible values for this operation + * @param string|null $id The Id of the Tenant. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRtiSubmissionSettingsTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function getUsersWithNoBillableActivityTenantAsyncWithHttpInfo( - string $id, - ?int $month = null, - ?int $year = null, - string $contentType = self::contentTypes['getUsersWithNoBillableActivityTenant'][0] + public function getRtiSubmissionSettingsTenantAsyncWithHttpInfo( + ?string $id = null, + string $contentType = self::contentTypes['getRtiSubmissionSettingsTenant'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->getUsersWithNoBillableActivityTenantRequest($id, $month, $year, $contentType); + $returnType = '\SynergiTech\Staffology\Model\RtiSubmissionSettings'; + $request = $this->getRtiSubmissionSettingsTenantRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8373,35 +7607,23 @@ function ($exception) { } /** - * Create request for operation 'getUsersWithNoBillableActivityTenant' + * Create request for operation 'getRtiSubmissionSettingsTenant' * - * @param string $id The Id of the Tenant (required) - * @param int|null $month (optional) - * @param int|null $year (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsersWithNoBillableActivityTenant'] to see the possible values for this operation + * @param string|null $id The Id of the Tenant. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRtiSubmissionSettingsTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUsersWithNoBillableActivityTenantRequest( - string $id, - ?int $month = null, - ?int $year = null, - string $contentType = self::contentTypes['getUsersWithNoBillableActivityTenant'][0] + public function getRtiSubmissionSettingsTenantRequest( + ?string $id = null, + string $contentType = self::contentTypes['getRtiSubmissionSettingsTenant'][0] ): Request { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $id when calling getUsersWithNoBillableActivityTenant' - ); - } - - - $resourcePath = '/tenants/{id}/reports/users/nobillableactivity'; + $resourcePath = '/tenants/ritsubmissionsettings'; $formParams = []; $queryParams = []; $headerParams = []; @@ -8410,36 +7632,19 @@ public function getUsersWithNoBillableActivityTenantRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $month, - 'month', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $year, - 'year', // param base name - 'integer', // openApiType + $id, + 'id', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', ], + ['application/json', ], $contentType, $multipart ); @@ -8496,60 +7701,44 @@ public function getUsersWithNoBillableActivityTenantRequest( } /** - * Operation netSuiteBillingTenant + * Operation getTenant * - * NetSuite Billing Report + * Get a Tenant * - * @param string $id The Id of the Tenant (required) - * @param int|null $year The year of the billing period (optional) - * @param int|null $month The month of the billing period (optional) - * @param string|null $accept accept (optional) - * @param bool|null $allTenants If set to true then the report will include all Tenants to which you have access (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['netSuiteBillingTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant you want to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ReportResponse + * @return \SynergiTech\Staffology\Model\Tenant */ - public function netSuiteBillingTenant( + public function getTenant( string $id, - ?int $year = null, - ?int $month = null, - ?string $accept = null, - ?bool $allTenants = false, - string $contentType = self::contentTypes['netSuiteBillingTenant'][0] - ): \SynergiTech\Staffology\Model\ReportResponse + string $contentType = self::contentTypes['getTenant'][0] + ): \SynergiTech\Staffology\Model\Tenant { - list($response) = $this->netSuiteBillingTenantWithHttpInfo($id, $year, $month, $accept, $allTenants, $contentType); + list($response) = $this->getTenantWithHttpInfo($id, $contentType); return $response; } /** - * Operation netSuiteBillingTenantWithHttpInfo + * Operation getTenantWithHttpInfo * - * NetSuite Billing Report + * Get a Tenant * - * @param string $id The Id of the Tenant (required) - * @param int|null $year The year of the billing period (optional) - * @param int|null $month The month of the billing period (optional) - * @param string|null $accept (optional) - * @param bool|null $allTenants If set to true then the report will include all Tenants to which you have access (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['netSuiteBillingTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant you want to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\Tenant, HTTP status code, HTTP response headers (array of strings) */ - public function netSuiteBillingTenantWithHttpInfo( + public function getTenantWithHttpInfo( string $id, - ?int $year = null, - ?int $month = null, - ?string $accept = null, - ?bool $allTenants = false, - string $contentType = self::contentTypes['netSuiteBillingTenant'][0] + string $contentType = self::contentTypes['getTenant'][0] ): array { - $request = $this->netSuiteBillingTenantRequest($id, $year, $month, $accept, $allTenants, $contentType); + $request = $this->getTenantRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -8573,36 +7762,307 @@ public function netSuiteBillingTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\Tenant', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getTenantAsync + * + * Get a Tenant + * + * @param string $id The Id of the Tenant you want to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenant'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getTenantAsync( + string $id, + string $contentType = self::contentTypes['getTenant'][0] + ): PromiseInterface + { + return $this->getTenantAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getTenantAsyncWithHttpInfo + * + * Get a Tenant + * + * @param string $id The Id of the Tenant you want to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenant'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getTenantAsyncWithHttpInfo( + string $id, + string $contentType = self::contentTypes['getTenant'][0] + ): PromiseInterface + { + $returnType = '\SynergiTech\Staffology\Model\Tenant'; + $request = $this->getTenantRequest($id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } + if ($returnType !== 'string') { + $content = json_decode($content); } } return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), + ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getTenant' + * + * @param string $id The Id of the Tenant you want to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTenant'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getTenantRequest( + string $id, + string $contentType = self::contentTypes['getTenant'][0] + ): Request + { + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling getTenant' + ); + } + + + $resourcePath = '/tenants/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getUsersWithNoBillableActivityTenant + * + * Get Users with no Billable Activity. + * + * @param string $id The Id of the Tenant (required) + * @param int|null $month month (optional) + * @param int|null $year year (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsersWithNoBillableActivityTenant'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SynergiTech\Staffology\Model\ReportResponse + */ + public function getUsersWithNoBillableActivityTenant( + string $id, + ?int $month = null, + ?int $year = null, + string $contentType = self::contentTypes['getUsersWithNoBillableActivityTenant'][0] + ): \SynergiTech\Staffology\Model\ReportResponse + { + list($response) = $this->getUsersWithNoBillableActivityTenantWithHttpInfo($id, $month, $year, $contentType); + return $response; + } + + /** + * Operation getUsersWithNoBillableActivityTenantWithHttpInfo + * + * Get Users with no Billable Activity. + * + * @param string $id The Id of the Tenant (required) + * @param int|null $month (optional) + * @param int|null $year (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsersWithNoBillableActivityTenant'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getUsersWithNoBillableActivityTenantWithHttpInfo( + string $id, + ?int $month = null, + ?int $year = null, + string $contentType = self::contentTypes['getUsersWithNoBillableActivityTenant'][0] + ): array + { + $request = $this->getUsersWithNoBillableActivityTenantRequest($id, $month, $year, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); + } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -8617,34 +8077,11 @@ public function netSuiteBillingTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8654,37 +8091,34 @@ public function netSuiteBillingTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation netSuiteBillingTenantAsync + * Operation getUsersWithNoBillableActivityTenantAsync * - * NetSuite Billing Report + * Get Users with no Billable Activity. * * @param string $id The Id of the Tenant (required) - * @param int|null $year The year of the billing period (optional) - * @param int|null $month The month of the billing period (optional) - * @param string|null $accept (optional) - * @param bool|null $allTenants If set to true then the report will include all Tenants to which you have access (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['netSuiteBillingTenant'] to see the possible values for this operation + * @param int|null $month (optional) + * @param int|null $year (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsersWithNoBillableActivityTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function netSuiteBillingTenantAsync( + public function getUsersWithNoBillableActivityTenantAsync( string $id, - ?int $year = null, ?int $month = null, - ?string $accept = null, - ?bool $allTenants = false, - string $contentType = self::contentTypes['netSuiteBillingTenant'][0] + ?int $year = null, + string $contentType = self::contentTypes['getUsersWithNoBillableActivityTenant'][0] ): PromiseInterface { - return $this->netSuiteBillingTenantAsyncWithHttpInfo($id, $year, $month, $accept, $allTenants, $contentType) + return $this->getUsersWithNoBillableActivityTenantAsyncWithHttpInfo($id, $month, $year, $contentType) ->then( function ($response) { return $response[0]; @@ -8693,31 +8127,27 @@ function ($response) { } /** - * Operation netSuiteBillingTenantAsyncWithHttpInfo + * Operation getUsersWithNoBillableActivityTenantAsyncWithHttpInfo * - * NetSuite Billing Report + * Get Users with no Billable Activity. * * @param string $id The Id of the Tenant (required) - * @param int|null $year The year of the billing period (optional) - * @param int|null $month The month of the billing period (optional) - * @param string|null $accept (optional) - * @param bool|null $allTenants If set to true then the report will include all Tenants to which you have access (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['netSuiteBillingTenant'] to see the possible values for this operation + * @param int|null $month (optional) + * @param int|null $year (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsersWithNoBillableActivityTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function netSuiteBillingTenantAsyncWithHttpInfo( + public function getUsersWithNoBillableActivityTenantAsyncWithHttpInfo( string $id, - ?int $year = null, ?int $month = null, - ?string $accept = null, - ?bool $allTenants = false, - string $contentType = self::contentTypes['netSuiteBillingTenant'][0] + ?int $year = null, + string $contentType = self::contentTypes['getUsersWithNoBillableActivityTenant'][0] ): PromiseInterface { $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - $request = $this->netSuiteBillingTenantRequest($id, $year, $month, $accept, $allTenants, $contentType); + $request = $this->getUsersWithNoBillableActivityTenantRequest($id, $month, $year, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8756,56 +8186,41 @@ function ($exception) { } /** - * Create request for operation 'netSuiteBillingTenant' + * Create request for operation 'getUsersWithNoBillableActivityTenant' * * @param string $id The Id of the Tenant (required) - * @param int|null $year The year of the billing period (optional) - * @param int|null $month The month of the billing period (optional) - * @param string|null $accept (optional) - * @param bool|null $allTenants If set to true then the report will include all Tenants to which you have access (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['netSuiteBillingTenant'] to see the possible values for this operation + * @param int|null $month (optional) + * @param int|null $year (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsersWithNoBillableActivityTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function netSuiteBillingTenantRequest( + public function getUsersWithNoBillableActivityTenantRequest( string $id, - ?int $year = null, ?int $month = null, - ?string $accept = null, - ?bool $allTenants = false, - string $contentType = self::contentTypes['netSuiteBillingTenant'][0] + ?int $year = null, + string $contentType = self::contentTypes['getUsersWithNoBillableActivityTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling netSuiteBillingTenant' + 'Missing the required parameter $id when calling getUsersWithNoBillableActivityTenant' ); } - - - $resourcePath = '/tenants/{id}/reports/netsuitebills'; + $resourcePath = '/tenants/{id}/reports/users/nobillableactivity'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $year, - 'year', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $month, @@ -8817,18 +8232,14 @@ public function netSuiteBillingTenantRequest( ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $allTenants, - 'allTenants', // param base name - 'boolean', // openApiType + $year, + 'year', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); - // header params - if ($accept !== null) { - $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); - } // path params if ($id !== null) { @@ -8898,48 +8309,60 @@ public function netSuiteBillingTenantRequest( } /** - * Operation payrollSquadAddMemberTenant + * Operation netSuiteBillingTenant * - * Add Payroll Squad Member + * NetSuite Billing Report * - * @param string $id Current tenant id (required) - * @param \SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest|null $contractPayrollSquadMemberRequest contractPayrollSquadMemberRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadAddMemberTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant (required) + * @param int|null $year The year of the billing period (optional) + * @param int|null $month The month of the billing period (optional) + * @param string|null $accept accept (optional) + * @param bool|null $allTenants If set to true then the report will include all Tenants to which you have access (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['netSuiteBillingTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse + * @return \SynergiTech\Staffology\Model\ReportResponse */ - public function payrollSquadAddMemberTenant( + public function netSuiteBillingTenant( string $id, - ?\SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest $contractPayrollSquadMemberRequest = null, - string $contentType = self::contentTypes['payrollSquadAddMemberTenant'][0] - ): \SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse + ?int $year = null, + ?int $month = null, + ?string $accept = null, + ?bool $allTenants = false, + string $contentType = self::contentTypes['netSuiteBillingTenant'][0] + ): \SynergiTech\Staffology\Model\ReportResponse { - list($response) = $this->payrollSquadAddMemberTenantWithHttpInfo($id, $contractPayrollSquadMemberRequest, $contentType); + list($response) = $this->netSuiteBillingTenantWithHttpInfo($id, $year, $month, $accept, $allTenants, $contentType); return $response; } /** - * Operation payrollSquadAddMemberTenantWithHttpInfo + * Operation netSuiteBillingTenantWithHttpInfo * - * Add Payroll Squad Member + * NetSuite Billing Report * - * @param string $id Current tenant id (required) - * @param \SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest|null $contractPayrollSquadMemberRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadAddMemberTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant (required) + * @param int|null $year The year of the billing period (optional) + * @param int|null $month The month of the billing period (optional) + * @param string|null $accept (optional) + * @param bool|null $allTenants If set to true then the report will include all Tenants to which you have access (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['netSuiteBillingTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ReportResponse, HTTP status code, HTTP response headers (array of strings) */ - public function payrollSquadAddMemberTenantWithHttpInfo( + public function netSuiteBillingTenantWithHttpInfo( string $id, - ?\SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest $contractPayrollSquadMemberRequest = null, - string $contentType = self::contentTypes['payrollSquadAddMemberTenant'][0] + ?int $year = null, + ?int $month = null, + ?string $accept = null, + ?bool $allTenants = false, + string $contentType = self::contentTypes['netSuiteBillingTenant'][0] ): array { - $request = $this->payrollSquadAddMemberTenantRequest($id, $contractPayrollSquadMemberRequest, $contentType); + $request = $this->netSuiteBillingTenantRequest($id, $year, $month, $accept, $allTenants, $contentType); try { $options = $this->createHttpClientOption(); @@ -8963,36 +8386,15 @@ public function payrollSquadAddMemberTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + case 200: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9007,68 +8409,52 @@ public function payrollSquadAddMemberTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse', + '\SynergiTech\Staffology\Model\ReportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation payrollSquadAddMemberTenantAsync + * Operation netSuiteBillingTenantAsync * - * Add Payroll Squad Member + * NetSuite Billing Report * - * @param string $id Current tenant id (required) - * @param \SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest|null $contractPayrollSquadMemberRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadAddMemberTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant (required) + * @param int|null $year The year of the billing period (optional) + * @param int|null $month The month of the billing period (optional) + * @param string|null $accept (optional) + * @param bool|null $allTenants If set to true then the report will include all Tenants to which you have access (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['netSuiteBillingTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function payrollSquadAddMemberTenantAsync( + public function netSuiteBillingTenantAsync( string $id, - ?\SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest $contractPayrollSquadMemberRequest = null, - string $contentType = self::contentTypes['payrollSquadAddMemberTenant'][0] + ?int $year = null, + ?int $month = null, + ?string $accept = null, + ?bool $allTenants = false, + string $contentType = self::contentTypes['netSuiteBillingTenant'][0] ): PromiseInterface { - return $this->payrollSquadAddMemberTenantAsyncWithHttpInfo($id, $contractPayrollSquadMemberRequest, $contentType) + return $this->netSuiteBillingTenantAsyncWithHttpInfo($id, $year, $month, $accept, $allTenants, $contentType) ->then( function ($response) { return $response[0]; @@ -9077,25 +8463,31 @@ function ($response) { } /** - * Operation payrollSquadAddMemberTenantAsyncWithHttpInfo + * Operation netSuiteBillingTenantAsyncWithHttpInfo * - * Add Payroll Squad Member + * NetSuite Billing Report * - * @param string $id Current tenant id (required) - * @param \SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest|null $contractPayrollSquadMemberRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadAddMemberTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant (required) + * @param int|null $year The year of the billing period (optional) + * @param int|null $month The month of the billing period (optional) + * @param string|null $accept (optional) + * @param bool|null $allTenants If set to true then the report will include all Tenants to which you have access (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['netSuiteBillingTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function payrollSquadAddMemberTenantAsyncWithHttpInfo( + public function netSuiteBillingTenantAsyncWithHttpInfo( string $id, - ?\SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest $contractPayrollSquadMemberRequest = null, - string $contentType = self::contentTypes['payrollSquadAddMemberTenant'][0] + ?int $year = null, + ?int $month = null, + ?string $accept = null, + ?bool $allTenants = false, + string $contentType = self::contentTypes['netSuiteBillingTenant'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse'; - $request = $this->payrollSquadAddMemberTenantRequest($id, $contractPayrollSquadMemberRequest, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; + $request = $this->netSuiteBillingTenantRequest($id, $year, $month, $accept, $allTenants, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9134,39 +8526,79 @@ function ($exception) { } /** - * Create request for operation 'payrollSquadAddMemberTenant' + * Create request for operation 'netSuiteBillingTenant' * - * @param string $id Current tenant id (required) - * @param \SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest|null $contractPayrollSquadMemberRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadAddMemberTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant (required) + * @param int|null $year The year of the billing period (optional) + * @param int|null $month The month of the billing period (optional) + * @param string|null $accept (optional) + * @param bool|null $allTenants If set to true then the report will include all Tenants to which you have access (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['netSuiteBillingTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function payrollSquadAddMemberTenantRequest( + public function netSuiteBillingTenantRequest( string $id, - ?\SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest $contractPayrollSquadMemberRequest = null, - string $contentType = self::contentTypes['payrollSquadAddMemberTenant'][0] + ?int $year = null, + ?int $month = null, + ?string $accept = null, + ?bool $allTenants = false, + string $contentType = self::contentTypes['netSuiteBillingTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling payrollSquadAddMemberTenant' + 'Missing the required parameter $id when calling netSuiteBillingTenant' ); } - $resourcePath = '/tenants/{id}/payrollsquad/member'; + + + + $resourcePath = '/tenants/{id}/reports/netsuitebills'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $year, + 'year', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $month, + 'month', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $allTenants, + 'allTenants', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // header params + if ($accept !== null) { + $headerParams['accept'] = ObjectSerializer::toHeaderValue($accept); + } // path params if ($id !== null) { @@ -9179,20 +8611,13 @@ public function payrollSquadAddMemberTenantRequest( $headers = $this->headerSelector->selectHeaders( - ['application/json', ], + ['application/json', 'text/csv', ], $contentType, $multipart ); // for model (json/xml) - if (isset($contractPayrollSquadMemberRequest)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractPayrollSquadMemberRequest)); - } else { - $httpBody = $contractPayrollSquadMemberRequest; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -9235,7 +8660,7 @@ public function payrollSquadAddMemberTenantRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -9243,48 +8668,48 @@ public function payrollSquadAddMemberTenantRequest( } /** - * Operation payrollSquadUpdateEmployersTenant + * Operation payrollSquadAddMemberTenant * - * Update Payroll Squad Employers + * Add Payroll Squad Member * * @param string $id Current tenant id (required) - * @param \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest|null $contractPayrollSquadEmployerRequest contractPayrollSquadEmployerRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadUpdateEmployersTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest|null $contractPayrollSquadMemberRequest contractPayrollSquadMemberRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadAddMemberTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[] + * @return \SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse|null */ - public function payrollSquadUpdateEmployersTenant( + public function payrollSquadAddMemberTenant( string $id, - ?\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest $contractPayrollSquadEmployerRequest = null, - string $contentType = self::contentTypes['payrollSquadUpdateEmployersTenant'][0] - ): array + ?\SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest $contractPayrollSquadMemberRequest = null, + string $contentType = self::contentTypes['payrollSquadAddMemberTenant'][0] + ): ?\SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse { - list($response) = $this->payrollSquadUpdateEmployersTenantWithHttpInfo($id, $contractPayrollSquadEmployerRequest, $contentType); + list($response) = $this->payrollSquadAddMemberTenantWithHttpInfo($id, $contractPayrollSquadMemberRequest, $contentType); return $response; } /** - * Operation payrollSquadUpdateEmployersTenantWithHttpInfo + * Operation payrollSquadAddMemberTenantWithHttpInfo * - * Update Payroll Squad Employers + * Add Payroll Squad Member * * @param string $id Current tenant id (required) - * @param \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest|null $contractPayrollSquadEmployerRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadUpdateEmployersTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest|null $contractPayrollSquadMemberRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadAddMemberTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[], HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse, HTTP status code, HTTP response headers (array of strings) */ - public function payrollSquadUpdateEmployersTenantWithHttpInfo( + public function payrollSquadAddMemberTenantWithHttpInfo( string $id, - ?\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest $contractPayrollSquadEmployerRequest = null, - string $contentType = self::contentTypes['payrollSquadUpdateEmployersTenant'][0] + ?\SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest $contractPayrollSquadMemberRequest = null, + string $contentType = self::contentTypes['payrollSquadAddMemberTenant'][0] ): array { - $request = $this->payrollSquadUpdateEmployersTenantRequest($id, $contractPayrollSquadEmployerRequest, $contentType); + $request = $this->payrollSquadAddMemberTenantRequest($id, $contractPayrollSquadMemberRequest, $contentType); try { $options = $this->createHttpClientOption(); @@ -9308,36 +8733,15 @@ public function payrollSquadUpdateEmployersTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -9352,68 +8756,46 @@ public function payrollSquadUpdateEmployersTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[]', + '\SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } /** - * Operation payrollSquadUpdateEmployersTenantAsync + * Operation payrollSquadAddMemberTenantAsync * - * Update Payroll Squad Employers + * Add Payroll Squad Member * * @param string $id Current tenant id (required) - * @param \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest|null $contractPayrollSquadEmployerRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadUpdateEmployersTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest|null $contractPayrollSquadMemberRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadAddMemberTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function payrollSquadUpdateEmployersTenantAsync( + public function payrollSquadAddMemberTenantAsync( string $id, - ?\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest $contractPayrollSquadEmployerRequest = null, - string $contentType = self::contentTypes['payrollSquadUpdateEmployersTenant'][0] + ?\SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest $contractPayrollSquadMemberRequest = null, + string $contentType = self::contentTypes['payrollSquadAddMemberTenant'][0] ): PromiseInterface { - return $this->payrollSquadUpdateEmployersTenantAsyncWithHttpInfo($id, $contractPayrollSquadEmployerRequest, $contentType) + return $this->payrollSquadAddMemberTenantAsyncWithHttpInfo($id, $contractPayrollSquadMemberRequest, $contentType) ->then( function ($response) { return $response[0]; @@ -9422,25 +8804,25 @@ function ($response) { } /** - * Operation payrollSquadUpdateEmployersTenantAsyncWithHttpInfo + * Operation payrollSquadAddMemberTenantAsyncWithHttpInfo * - * Update Payroll Squad Employers + * Add Payroll Squad Member * * @param string $id Current tenant id (required) - * @param \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest|null $contractPayrollSquadEmployerRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadUpdateEmployersTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest|null $contractPayrollSquadMemberRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadAddMemberTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function payrollSquadUpdateEmployersTenantAsyncWithHttpInfo( + public function payrollSquadAddMemberTenantAsyncWithHttpInfo( string $id, - ?\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest $contractPayrollSquadEmployerRequest = null, - string $contentType = self::contentTypes['payrollSquadUpdateEmployersTenant'][0] + ?\SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest $contractPayrollSquadMemberRequest = null, + string $contentType = self::contentTypes['payrollSquadAddMemberTenant'][0] ): PromiseInterface { - $returnType = '\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[]'; - $request = $this->payrollSquadUpdateEmployersTenantRequest($id, $contractPayrollSquadEmployerRequest, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse'; + $request = $this->payrollSquadAddMemberTenantRequest($id, $contractPayrollSquadMemberRequest, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9479,32 +8861,32 @@ function ($exception) { } /** - * Create request for operation 'payrollSquadUpdateEmployersTenant' + * Create request for operation 'payrollSquadAddMemberTenant' * * @param string $id Current tenant id (required) - * @param \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest|null $contractPayrollSquadEmployerRequest (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadUpdateEmployersTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest|null $contractPayrollSquadMemberRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadAddMemberTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function payrollSquadUpdateEmployersTenantRequest( + public function payrollSquadAddMemberTenantRequest( string $id, - ?\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest $contractPayrollSquadEmployerRequest = null, - string $contentType = self::contentTypes['payrollSquadUpdateEmployersTenant'][0] + ?\SynergiTech\Staffology\Model\ContractPayrollSquadMemberRequest $contractPayrollSquadMemberRequest = null, + string $contentType = self::contentTypes['payrollSquadAddMemberTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling payrollSquadUpdateEmployersTenant' + 'Missing the required parameter $id when calling payrollSquadAddMemberTenant' ); } - $resourcePath = '/tenants/{id}/payrollsquad/employers'; + $resourcePath = '/tenants/{id}/payrollsquad/member'; $formParams = []; $queryParams = []; $headerParams = []; @@ -9530,12 +8912,12 @@ public function payrollSquadUpdateEmployersTenantRequest( ); // for model (json/xml) - if (isset($contractPayrollSquadEmployerRequest)) { + if (isset($contractPayrollSquadMemberRequest)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractPayrollSquadEmployerRequest)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractPayrollSquadMemberRequest)); } else { - $httpBody = $contractPayrollSquadEmployerRequest; + $httpBody = $contractPayrollSquadMemberRequest; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -9588,47 +8970,48 @@ public function payrollSquadUpdateEmployersTenantRequest( } /** - * Operation removeAdminUserTenant + * Operation payrollSquadUpdateEmployersTenant * - * Remove Admin User + * Update Payroll Squad Employers * - * @param string $id The Id of the Tenant you want to remove the admin User from. (required) - * @param string|null $body body (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAdminUserTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest|null $contractPayrollSquadEmployerRequest contractPayrollSquadEmployerRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadUpdateEmployersTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void + * @return \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[]|null */ - public function removeAdminUserTenant( + public function payrollSquadUpdateEmployersTenant( string $id, - ?string $body = null, - string $contentType = self::contentTypes['removeAdminUserTenant'][0] - ): void + ?\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest $contractPayrollSquadEmployerRequest = null, + string $contentType = self::contentTypes['payrollSquadUpdateEmployersTenant'][0] + ): ?array { - $this->removeAdminUserTenantWithHttpInfo($id, $body, $contentType); + list($response) = $this->payrollSquadUpdateEmployersTenantWithHttpInfo($id, $contractPayrollSquadEmployerRequest, $contentType); + return $response; } /** - * Operation removeAdminUserTenantWithHttpInfo + * Operation payrollSquadUpdateEmployersTenantWithHttpInfo * - * Remove Admin User + * Update Payroll Squad Employers * - * @param string $id The Id of the Tenant you want to remove the admin User from. (required) - * @param string|null $body (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAdminUserTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest|null $contractPayrollSquadEmployerRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadUpdateEmployersTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[], HTTP status code, HTTP response headers (array of strings) */ - public function removeAdminUserTenantWithHttpInfo( + public function payrollSquadUpdateEmployersTenantWithHttpInfo( string $id, - ?string $body = null, - string $contentType = self::contentTypes['removeAdminUserTenant'][0] + ?\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest $contractPayrollSquadEmployerRequest = null, + string $contentType = self::contentTypes['payrollSquadUpdateEmployersTenant'][0] ): array { - $request = $this->removeAdminUserTenantRequest($id, $body, $contentType); + $request = $this->payrollSquadUpdateEmployersTenantRequest($id, $contractPayrollSquadEmployerRequest, $contentType); try { $options = $this->createHttpClientOption(); @@ -9652,35 +9035,69 @@ public function removeAdminUserTenantWithHttpInfo( $statusCode = $response->getStatusCode(); + switch($statusCode) { + case 201: + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[]', + $request, + $response, + ); + } + - return [null, $statusCode, $response->getHeaders()]; + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } + throw $e; } } /** - * Operation removeAdminUserTenantAsync + * Operation payrollSquadUpdateEmployersTenantAsync * - * Remove Admin User + * Update Payroll Squad Employers * - * @param string $id The Id of the Tenant you want to remove the admin User from. (required) - * @param string|null $body (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAdminUserTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest|null $contractPayrollSquadEmployerRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadUpdateEmployersTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function removeAdminUserTenantAsync( + public function payrollSquadUpdateEmployersTenantAsync( string $id, - ?string $body = null, - string $contentType = self::contentTypes['removeAdminUserTenant'][0] + ?\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest $contractPayrollSquadEmployerRequest = null, + string $contentType = self::contentTypes['payrollSquadUpdateEmployersTenant'][0] ): PromiseInterface { - return $this->removeAdminUserTenantAsyncWithHttpInfo($id, $body, $contentType) + return $this->payrollSquadUpdateEmployersTenantAsyncWithHttpInfo($id, $contractPayrollSquadEmployerRequest, $contentType) ->then( function ($response) { return $response[0]; @@ -9689,31 +9106,44 @@ function ($response) { } /** - * Operation removeAdminUserTenantAsyncWithHttpInfo + * Operation payrollSquadUpdateEmployersTenantAsyncWithHttpInfo * - * Remove Admin User + * Update Payroll Squad Employers * - * @param string $id The Id of the Tenant you want to remove the admin User from. (required) - * @param string|null $body (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAdminUserTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest|null $contractPayrollSquadEmployerRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadUpdateEmployersTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function removeAdminUserTenantAsyncWithHttpInfo( + public function payrollSquadUpdateEmployersTenantAsyncWithHttpInfo( string $id, - ?string $body = null, - string $contentType = self::contentTypes['removeAdminUserTenant'][0] + ?\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest $contractPayrollSquadEmployerRequest = null, + string $contentType = self::contentTypes['payrollSquadUpdateEmployersTenant'][0] ): PromiseInterface { - $returnType = ''; - $request = $this->removeAdminUserTenantRequest($id, $body, $contentType); + $returnType = '\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerResponse[]'; + $request = $this->payrollSquadUpdateEmployersTenantRequest($id, $contractPayrollSquadEmployerRequest, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -9733,32 +9163,32 @@ function ($exception) { } /** - * Create request for operation 'removeAdminUserTenant' + * Create request for operation 'payrollSquadUpdateEmployersTenant' * - * @param string $id The Id of the Tenant you want to remove the admin User from. (required) - * @param string|null $body (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAdminUserTenant'] to see the possible values for this operation + * @param string $id Current tenant id (required) + * @param \SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest|null $contractPayrollSquadEmployerRequest (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['payrollSquadUpdateEmployersTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function removeAdminUserTenantRequest( + public function payrollSquadUpdateEmployersTenantRequest( string $id, - ?string $body = null, - string $contentType = self::contentTypes['removeAdminUserTenant'][0] + ?\SynergiTech\Staffology\Model\ContractPayrollSquadEmployerRequest $contractPayrollSquadEmployerRequest = null, + string $contentType = self::contentTypes['payrollSquadUpdateEmployersTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling removeAdminUserTenant' + 'Missing the required parameter $id when calling payrollSquadUpdateEmployersTenant' ); } - $resourcePath = '/tenants/{id}/users/admins'; + $resourcePath = '/tenants/{id}/payrollsquad/employers'; $formParams = []; $queryParams = []; $headerParams = []; @@ -9778,18 +9208,18 @@ public function removeAdminUserTenantRequest( $headers = $this->headerSelector->selectHeaders( - [], + ['application/json', ], $contentType, $multipart ); // for model (json/xml) - if (isset($body)) { + if (isset($contractPayrollSquadEmployerRequest)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($contractPayrollSquadEmployerRequest)); } else { - $httpBody = $body; + $httpBody = $contractPayrollSquadEmployerRequest; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -9834,7 +9264,7 @@ public function removeAdminUserTenantRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'DELETE', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -9842,51 +9272,47 @@ public function removeAdminUserTenantRequest( } /** - * Operation setAccountingIdTenant + * Operation removeAdminUserTenant * - * Set User Accounting Id + * Remove Admin User * - * @param string $id The Id of the Tenant. (required) - * @param string $userId userId (required) - * @param string|null $accountingId The CustomerAccountingId for the user. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAccountingIdTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant you want to remove the admin User from. (required) + * @param string|null $body body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAdminUserTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function setAccountingIdTenant( + public function removeAdminUserTenant( string $id, - string $userId, - ?string $accountingId = null, - string $contentType = self::contentTypes['setAccountingIdTenant'][0] + ?string $body = null, + string $contentType = self::contentTypes['removeAdminUserTenant'][0] ): void { - $this->setAccountingIdTenantWithHttpInfo($id, $userId, $accountingId, $contentType); + $this->removeAdminUserTenantWithHttpInfo($id, $body, $contentType); } /** - * Operation setAccountingIdTenantWithHttpInfo + * Operation removeAdminUserTenantWithHttpInfo * - * Set User Accounting Id + * Remove Admin User * - * @param string $id The Id of the Tenant. (required) - * @param string $userId (required) - * @param string|null $accountingId The CustomerAccountingId for the user. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAccountingIdTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant you want to remove the admin User from. (required) + * @param string|null $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAdminUserTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setAccountingIdTenantWithHttpInfo( + public function removeAdminUserTenantWithHttpInfo( string $id, - string $userId, - ?string $accountingId = null, - string $contentType = self::contentTypes['setAccountingIdTenant'][0] + ?string $body = null, + string $contentType = self::contentTypes['removeAdminUserTenant'][0] ): array { - $request = $this->setAccountingIdTenantRequest($id, $userId, $accountingId, $contentType); + $request = $this->removeAdminUserTenantRequest($id, $body, $contentType); try { $options = $this->createHttpClientOption(); @@ -9912,35 +9338,33 @@ public function setAccountingIdTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation setAccountingIdTenantAsync + * Operation removeAdminUserTenantAsync * - * Set User Accounting Id + * Remove Admin User * - * @param string $id The Id of the Tenant. (required) - * @param string $userId (required) - * @param string|null $accountingId The CustomerAccountingId for the user. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAccountingIdTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant you want to remove the admin User from. (required) + * @param string|null $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAdminUserTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setAccountingIdTenantAsync( + public function removeAdminUserTenantAsync( string $id, - string $userId, - ?string $accountingId = null, - string $contentType = self::contentTypes['setAccountingIdTenant'][0] + ?string $body = null, + string $contentType = self::contentTypes['removeAdminUserTenant'][0] ): PromiseInterface { - return $this->setAccountingIdTenantAsyncWithHttpInfo($id, $userId, $accountingId, $contentType) + return $this->removeAdminUserTenantAsyncWithHttpInfo($id, $body, $contentType) ->then( function ($response) { return $response[0]; @@ -9949,27 +9373,25 @@ function ($response) { } /** - * Operation setAccountingIdTenantAsyncWithHttpInfo + * Operation removeAdminUserTenantAsyncWithHttpInfo * - * Set User Accounting Id + * Remove Admin User * - * @param string $id The Id of the Tenant. (required) - * @param string $userId (required) - * @param string|null $accountingId The CustomerAccountingId for the user. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAccountingIdTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant you want to remove the admin User from. (required) + * @param string|null $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAdminUserTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setAccountingIdTenantAsyncWithHttpInfo( + public function removeAdminUserTenantAsyncWithHttpInfo( string $id, - string $userId, - ?string $accountingId = null, - string $contentType = self::contentTypes['setAccountingIdTenant'][0] + ?string $body = null, + string $contentType = self::contentTypes['removeAdminUserTenant'][0] ): PromiseInterface { $returnType = ''; - $request = $this->setAccountingIdTenantRequest($id, $userId, $accountingId, $contentType); + $request = $this->removeAdminUserTenantRequest($id, $body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9995,56 +9417,38 @@ function ($exception) { } /** - * Create request for operation 'setAccountingIdTenant' + * Create request for operation 'removeAdminUserTenant' * - * @param string $id The Id of the Tenant. (required) - * @param string $userId (required) - * @param string|null $accountingId The CustomerAccountingId for the user. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAccountingIdTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant you want to remove the admin User from. (required) + * @param string|null $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAdminUserTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setAccountingIdTenantRequest( - string $id, - string $userId, - ?string $accountingId = null, - string $contentType = self::contentTypes['setAccountingIdTenant'][0] + public function removeAdminUserTenantRequest( + string $id, + ?string $body = null, + string $contentType = self::contentTypes['removeAdminUserTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setAccountingIdTenant' - ); - } - - // verify the required parameter 'userId' is set - if ($userId === null || (is_array($userId) && count($userId) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $userId when calling setAccountingIdTenant' + 'Missing the required parameter $id when calling removeAdminUserTenant' ); } - $resourcePath = '/tenants/{id}/users/{userId}/accounting'; + $resourcePath = '/tenants/{id}/users/admins'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $accountingId, - 'accountingId', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -10055,14 +9459,6 @@ public function setAccountingIdTenantRequest( $resourcePath ); } - // path params - if ($userId !== null) { - $resourcePath = str_replace( - '{' . 'userId' . '}', - ObjectSerializer::toPathValue($userId), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -10072,7 +9468,14 @@ public function setAccountingIdTenantRequest( ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + } else { + $httpBody = $body; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -10115,7 +9518,7 @@ public function setAccountingIdTenantRequest( $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -10123,51 +9526,51 @@ public function setAccountingIdTenantRequest( } /** - * Operation setAddressTenant + * Operation setAccountingIdTenant * - * Set Address + * Set User Accounting Id * * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\User|null $user user (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAddressTenant'] to see the possible values for this operation + * @param string $userId userId (required) + * @param string|null $accountingId The CustomerAccountingId for the user. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAccountingIdTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function setAddressTenant( + public function setAccountingIdTenant( string $id, string $userId, - ?\SynergiTech\Staffology\Model\User $user = null, - string $contentType = self::contentTypes['setAddressTenant'][0] + ?string $accountingId = null, + string $contentType = self::contentTypes['setAccountingIdTenant'][0] ): void { - $this->setAddressTenantWithHttpInfo($id, $userId, $user, $contentType); + $this->setAccountingIdTenantWithHttpInfo($id, $userId, $accountingId, $contentType); } /** - * Operation setAddressTenantWithHttpInfo + * Operation setAccountingIdTenantWithHttpInfo * - * Set Address + * Set User Accounting Id * * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\User|null $user (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAddressTenant'] to see the possible values for this operation + * @param string $userId (required) + * @param string|null $accountingId The CustomerAccountingId for the user. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAccountingIdTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setAddressTenantWithHttpInfo( + public function setAccountingIdTenantWithHttpInfo( string $id, string $userId, - ?\SynergiTech\Staffology\Model\User $user = null, - string $contentType = self::contentTypes['setAddressTenant'][0] + ?string $accountingId = null, + string $contentType = self::contentTypes['setAccountingIdTenant'][0] ): array { - $request = $this->setAddressTenantRequest($id, $userId, $user, $contentType); + $request = $this->setAccountingIdTenantRequest($id, $userId, $accountingId, $contentType); try { $options = $this->createHttpClientOption(); @@ -10193,35 +9596,35 @@ public function setAddressTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation setAddressTenantAsync + * Operation setAccountingIdTenantAsync * - * Set Address + * Set User Accounting Id * * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\User|null $user (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAddressTenant'] to see the possible values for this operation + * @param string $userId (required) + * @param string|null $accountingId The CustomerAccountingId for the user. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAccountingIdTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setAddressTenantAsync( + public function setAccountingIdTenantAsync( string $id, string $userId, - ?\SynergiTech\Staffology\Model\User $user = null, - string $contentType = self::contentTypes['setAddressTenant'][0] + ?string $accountingId = null, + string $contentType = self::contentTypes['setAccountingIdTenant'][0] ): PromiseInterface { - return $this->setAddressTenantAsyncWithHttpInfo($id, $userId, $user, $contentType) + return $this->setAccountingIdTenantAsyncWithHttpInfo($id, $userId, $accountingId, $contentType) ->then( function ($response) { return $response[0]; @@ -10230,27 +9633,27 @@ function ($response) { } /** - * Operation setAddressTenantAsyncWithHttpInfo + * Operation setAccountingIdTenantAsyncWithHttpInfo * - * Set Address + * Set User Accounting Id * * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\User|null $user (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAddressTenant'] to see the possible values for this operation + * @param string $userId (required) + * @param string|null $accountingId The CustomerAccountingId for the user. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAccountingIdTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setAddressTenantAsyncWithHttpInfo( + public function setAccountingIdTenantAsyncWithHttpInfo( string $id, string $userId, - ?\SynergiTech\Staffology\Model\User $user = null, - string $contentType = self::contentTypes['setAddressTenant'][0] + ?string $accountingId = null, + string $contentType = self::contentTypes['setAccountingIdTenant'][0] ): PromiseInterface { $returnType = ''; - $request = $this->setAddressTenantRequest($id, $userId, $user, $contentType); + $request = $this->setAccountingIdTenantRequest($id, $userId, $accountingId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10276,47 +9679,56 @@ function ($exception) { } /** - * Create request for operation 'setAddressTenant' + * Create request for operation 'setAccountingIdTenant' * * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\User|null $user (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAddressTenant'] to see the possible values for this operation + * @param string $userId (required) + * @param string|null $accountingId The CustomerAccountingId for the user. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAccountingIdTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setAddressTenantRequest( + public function setAccountingIdTenantRequest( string $id, string $userId, - ?\SynergiTech\Staffology\Model\User $user = null, - string $contentType = self::contentTypes['setAddressTenant'][0] + ?string $accountingId = null, + string $contentType = self::contentTypes['setAccountingIdTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setAddressTenant' + 'Missing the required parameter $id when calling setAccountingIdTenant' ); } // verify the required parameter 'userId' is set if ($userId === null || (is_array($userId) && count($userId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $userId when calling setAddressTenant' + 'Missing the required parameter $userId when calling setAccountingIdTenant' ); } - $resourcePath = '/tenants/{id}/users/{userId}/address'; + $resourcePath = '/tenants/{id}/users/{userId}/accounting'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $accountingId, + 'accountingId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -10344,14 +9756,7 @@ public function setAddressTenantRequest( ); // for model (json/xml) - if (isset($user)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($user)); - } else { - $httpBody = $user; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -10402,51 +9807,51 @@ public function setAddressTenantRequest( } /** - * Operation setBureauRedirectEmailAddressTenant + * Operation setAddressTenant * - * Set Bureau Redirect + * Set Address * * @param string $id The Id of the Tenant. (required) - * @param string $userId userId (required) - * @param string|null $emailAddress The email address to redirect to, or an empty string to remove the redirect. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBureauRedirectEmailAddressTenant'] to see the possible values for this operation + * @param string $userId The Id of the User. (required) + * @param \SynergiTech\Staffology\Model\User|null $user user (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAddressTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function setBureauRedirectEmailAddressTenant( + public function setAddressTenant( string $id, string $userId, - ?string $emailAddress = null, - string $contentType = self::contentTypes['setBureauRedirectEmailAddressTenant'][0] + ?\SynergiTech\Staffology\Model\User $user = null, + string $contentType = self::contentTypes['setAddressTenant'][0] ): void { - $this->setBureauRedirectEmailAddressTenantWithHttpInfo($id, $userId, $emailAddress, $contentType); + $this->setAddressTenantWithHttpInfo($id, $userId, $user, $contentType); } /** - * Operation setBureauRedirectEmailAddressTenantWithHttpInfo + * Operation setAddressTenantWithHttpInfo * - * Set Bureau Redirect + * Set Address * * @param string $id The Id of the Tenant. (required) - * @param string $userId (required) - * @param string|null $emailAddress The email address to redirect to, or an empty string to remove the redirect. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBureauRedirectEmailAddressTenant'] to see the possible values for this operation + * @param string $userId The Id of the User. (required) + * @param \SynergiTech\Staffology\Model\User|null $user (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAddressTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setBureauRedirectEmailAddressTenantWithHttpInfo( + public function setAddressTenantWithHttpInfo( string $id, string $userId, - ?string $emailAddress = null, - string $contentType = self::contentTypes['setBureauRedirectEmailAddressTenant'][0] + ?\SynergiTech\Staffology\Model\User $user = null, + string $contentType = self::contentTypes['setAddressTenant'][0] ): array { - $request = $this->setBureauRedirectEmailAddressTenantRequest($id, $userId, $emailAddress, $contentType); + $request = $this->setAddressTenantRequest($id, $userId, $user, $contentType); try { $options = $this->createHttpClientOption(); @@ -10472,35 +9877,35 @@ public function setBureauRedirectEmailAddressTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation setBureauRedirectEmailAddressTenantAsync + * Operation setAddressTenantAsync * - * Set Bureau Redirect + * Set Address * * @param string $id The Id of the Tenant. (required) - * @param string $userId (required) - * @param string|null $emailAddress The email address to redirect to, or an empty string to remove the redirect. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBureauRedirectEmailAddressTenant'] to see the possible values for this operation + * @param string $userId The Id of the User. (required) + * @param \SynergiTech\Staffology\Model\User|null $user (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAddressTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setBureauRedirectEmailAddressTenantAsync( + public function setAddressTenantAsync( string $id, string $userId, - ?string $emailAddress = null, - string $contentType = self::contentTypes['setBureauRedirectEmailAddressTenant'][0] + ?\SynergiTech\Staffology\Model\User $user = null, + string $contentType = self::contentTypes['setAddressTenant'][0] ): PromiseInterface { - return $this->setBureauRedirectEmailAddressTenantAsyncWithHttpInfo($id, $userId, $emailAddress, $contentType) + return $this->setAddressTenantAsyncWithHttpInfo($id, $userId, $user, $contentType) ->then( function ($response) { return $response[0]; @@ -10509,27 +9914,27 @@ function ($response) { } /** - * Operation setBureauRedirectEmailAddressTenantAsyncWithHttpInfo + * Operation setAddressTenantAsyncWithHttpInfo * - * Set Bureau Redirect + * Set Address * * @param string $id The Id of the Tenant. (required) - * @param string $userId (required) - * @param string|null $emailAddress The email address to redirect to, or an empty string to remove the redirect. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBureauRedirectEmailAddressTenant'] to see the possible values for this operation + * @param string $userId The Id of the User. (required) + * @param \SynergiTech\Staffology\Model\User|null $user (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAddressTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setBureauRedirectEmailAddressTenantAsyncWithHttpInfo( + public function setAddressTenantAsyncWithHttpInfo( string $id, string $userId, - ?string $emailAddress = null, - string $contentType = self::contentTypes['setBureauRedirectEmailAddressTenant'][0] + ?\SynergiTech\Staffology\Model\User $user = null, + string $contentType = self::contentTypes['setAddressTenant'][0] ): PromiseInterface { $returnType = ''; - $request = $this->setBureauRedirectEmailAddressTenantRequest($id, $userId, $emailAddress, $contentType); + $request = $this->setAddressTenantRequest($id, $userId, $user, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10555,56 +9960,47 @@ function ($exception) { } /** - * Create request for operation 'setBureauRedirectEmailAddressTenant' + * Create request for operation 'setAddressTenant' * * @param string $id The Id of the Tenant. (required) - * @param string $userId (required) - * @param string|null $emailAddress The email address to redirect to, or an empty string to remove the redirect. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBureauRedirectEmailAddressTenant'] to see the possible values for this operation + * @param string $userId The Id of the User. (required) + * @param \SynergiTech\Staffology\Model\User|null $user (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setAddressTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setBureauRedirectEmailAddressTenantRequest( + public function setAddressTenantRequest( string $id, string $userId, - ?string $emailAddress = null, - string $contentType = self::contentTypes['setBureauRedirectEmailAddressTenant'][0] + ?\SynergiTech\Staffology\Model\User $user = null, + string $contentType = self::contentTypes['setAddressTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setBureauRedirectEmailAddressTenant' + 'Missing the required parameter $id when calling setAddressTenant' ); } // verify the required parameter 'userId' is set if ($userId === null || (is_array($userId) && count($userId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $userId when calling setBureauRedirectEmailAddressTenant' + 'Missing the required parameter $userId when calling setAddressTenant' ); } - $resourcePath = '/tenants/{id}/users/{userId}/bureauredir'; + $resourcePath = '/tenants/{id}/users/{userId}/address'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $emailAddress, - 'emailAddress', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -10632,7 +10028,14 @@ public function setBureauRedirectEmailAddressTenantRequest( ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($user)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($user)); + } else { + $httpBody = $user; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -10683,51 +10086,51 @@ public function setBureauRedirectEmailAddressTenantRequest( } /** - * Operation setBusinessNameTenant + * Operation setBureauRedirectEmailAddressTenant * - * Set User Business Name + * Set Bureau Redirect * * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param string|null $businessName The Business Name for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBusinessNameTenant'] to see the possible values for this operation + * @param string $userId userId (required) + * @param string|null $emailAddress The email address to redirect to, or an empty string to remove the redirect. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBureauRedirectEmailAddressTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function setBusinessNameTenant( + public function setBureauRedirectEmailAddressTenant( string $id, string $userId, - ?string $businessName = null, - string $contentType = self::contentTypes['setBusinessNameTenant'][0] + ?string $emailAddress = null, + string $contentType = self::contentTypes['setBureauRedirectEmailAddressTenant'][0] ): void { - $this->setBusinessNameTenantWithHttpInfo($id, $userId, $businessName, $contentType); + $this->setBureauRedirectEmailAddressTenantWithHttpInfo($id, $userId, $emailAddress, $contentType); } /** - * Operation setBusinessNameTenantWithHttpInfo + * Operation setBureauRedirectEmailAddressTenantWithHttpInfo * - * Set User Business Name + * Set Bureau Redirect * * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param string|null $businessName The Business Name for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBusinessNameTenant'] to see the possible values for this operation + * @param string $userId (required) + * @param string|null $emailAddress The email address to redirect to, or an empty string to remove the redirect. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBureauRedirectEmailAddressTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setBusinessNameTenantWithHttpInfo( + public function setBureauRedirectEmailAddressTenantWithHttpInfo( string $id, string $userId, - ?string $businessName = null, - string $contentType = self::contentTypes['setBusinessNameTenant'][0] + ?string $emailAddress = null, + string $contentType = self::contentTypes['setBureauRedirectEmailAddressTenant'][0] ): array { - $request = $this->setBusinessNameTenantRequest($id, $userId, $businessName, $contentType); + $request = $this->setBureauRedirectEmailAddressTenantRequest($id, $userId, $emailAddress, $contentType); try { $options = $this->createHttpClientOption(); @@ -10753,35 +10156,35 @@ public function setBusinessNameTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation setBusinessNameTenantAsync + * Operation setBureauRedirectEmailAddressTenantAsync * - * Set User Business Name + * Set Bureau Redirect * * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param string|null $businessName The Business Name for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBusinessNameTenant'] to see the possible values for this operation + * @param string $userId (required) + * @param string|null $emailAddress The email address to redirect to, or an empty string to remove the redirect. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBureauRedirectEmailAddressTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setBusinessNameTenantAsync( + public function setBureauRedirectEmailAddressTenantAsync( string $id, string $userId, - ?string $businessName = null, - string $contentType = self::contentTypes['setBusinessNameTenant'][0] + ?string $emailAddress = null, + string $contentType = self::contentTypes['setBureauRedirectEmailAddressTenant'][0] ): PromiseInterface { - return $this->setBusinessNameTenantAsyncWithHttpInfo($id, $userId, $businessName, $contentType) + return $this->setBureauRedirectEmailAddressTenantAsyncWithHttpInfo($id, $userId, $emailAddress, $contentType) ->then( function ($response) { return $response[0]; @@ -10790,27 +10193,27 @@ function ($response) { } /** - * Operation setBusinessNameTenantAsyncWithHttpInfo + * Operation setBureauRedirectEmailAddressTenantAsyncWithHttpInfo * - * Set User Business Name + * Set Bureau Redirect * * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param string|null $businessName The Business Name for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBusinessNameTenant'] to see the possible values for this operation + * @param string $userId (required) + * @param string|null $emailAddress The email address to redirect to, or an empty string to remove the redirect. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBureauRedirectEmailAddressTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setBusinessNameTenantAsyncWithHttpInfo( + public function setBureauRedirectEmailAddressTenantAsyncWithHttpInfo( string $id, string $userId, - ?string $businessName = null, - string $contentType = self::contentTypes['setBusinessNameTenant'][0] + ?string $emailAddress = null, + string $contentType = self::contentTypes['setBureauRedirectEmailAddressTenant'][0] ): PromiseInterface { $returnType = ''; - $request = $this->setBusinessNameTenantRequest($id, $userId, $businessName, $contentType); + $request = $this->setBureauRedirectEmailAddressTenantRequest($id, $userId, $emailAddress, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10836,41 +10239,41 @@ function ($exception) { } /** - * Create request for operation 'setBusinessNameTenant' + * Create request for operation 'setBureauRedirectEmailAddressTenant' * * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param string|null $businessName The Business Name for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBusinessNameTenant'] to see the possible values for this operation + * @param string $userId (required) + * @param string|null $emailAddress The email address to redirect to, or an empty string to remove the redirect. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBureauRedirectEmailAddressTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setBusinessNameTenantRequest( + public function setBureauRedirectEmailAddressTenantRequest( string $id, string $userId, - ?string $businessName = null, - string $contentType = self::contentTypes['setBusinessNameTenant'][0] + ?string $emailAddress = null, + string $contentType = self::contentTypes['setBureauRedirectEmailAddressTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setBusinessNameTenant' + 'Missing the required parameter $id when calling setBureauRedirectEmailAddressTenant' ); } // verify the required parameter 'userId' is set if ($userId === null || (is_array($userId) && count($userId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $userId when calling setBusinessNameTenant' + 'Missing the required parameter $userId when calling setBureauRedirectEmailAddressTenant' ); } - $resourcePath = '/tenants/{id}/users/{userId}/businessname'; + $resourcePath = '/tenants/{id}/users/{userId}/bureauredir'; $formParams = []; $queryParams = []; $headerParams = []; @@ -10879,8 +10282,8 @@ public function setBusinessNameTenantRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $businessName, - 'businessName', // param base name + $emailAddress, + 'emailAddress', // param base name 'string', // openApiType 'form', // style true, // explode @@ -10964,51 +10367,51 @@ public function setBusinessNameTenantRequest( } /** - * Operation setCountryTenant + * Operation setBusinessNameTenant * - * Set Country + * Set User Business Name * * @param string $id The Id of the Tenant. (required) * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\Country|null $country The Country for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setCountryTenant'] to see the possible values for this operation + * @param string|null $businessName The Business Name for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBusinessNameTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function setCountryTenant( + public function setBusinessNameTenant( string $id, string $userId, - ?\SynergiTech\Staffology\Model\Country $country = null, - string $contentType = self::contentTypes['setCountryTenant'][0] + ?string $businessName = null, + string $contentType = self::contentTypes['setBusinessNameTenant'][0] ): void { - $this->setCountryTenantWithHttpInfo($id, $userId, $country, $contentType); + $this->setBusinessNameTenantWithHttpInfo($id, $userId, $businessName, $contentType); } /** - * Operation setCountryTenantWithHttpInfo + * Operation setBusinessNameTenantWithHttpInfo * - * Set Country + * Set User Business Name * * @param string $id The Id of the Tenant. (required) * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\Country|null $country The Country for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setCountryTenant'] to see the possible values for this operation + * @param string|null $businessName The Business Name for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBusinessNameTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setCountryTenantWithHttpInfo( + public function setBusinessNameTenantWithHttpInfo( string $id, string $userId, - ?\SynergiTech\Staffology\Model\Country $country = null, - string $contentType = self::contentTypes['setCountryTenant'][0] + ?string $businessName = null, + string $contentType = self::contentTypes['setBusinessNameTenant'][0] ): array { - $request = $this->setCountryTenantRequest($id, $userId, $country, $contentType); + $request = $this->setBusinessNameTenantRequest($id, $userId, $businessName, $contentType); try { $options = $this->createHttpClientOption(); @@ -11034,35 +10437,35 @@ public function setCountryTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation setCountryTenantAsync + * Operation setBusinessNameTenantAsync * - * Set Country + * Set User Business Name * * @param string $id The Id of the Tenant. (required) * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\Country|null $country The Country for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setCountryTenant'] to see the possible values for this operation + * @param string|null $businessName The Business Name for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBusinessNameTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setCountryTenantAsync( + public function setBusinessNameTenantAsync( string $id, string $userId, - ?\SynergiTech\Staffology\Model\Country $country = null, - string $contentType = self::contentTypes['setCountryTenant'][0] + ?string $businessName = null, + string $contentType = self::contentTypes['setBusinessNameTenant'][0] ): PromiseInterface { - return $this->setCountryTenantAsyncWithHttpInfo($id, $userId, $country, $contentType) + return $this->setBusinessNameTenantAsyncWithHttpInfo($id, $userId, $businessName, $contentType) ->then( function ($response) { return $response[0]; @@ -11071,27 +10474,27 @@ function ($response) { } /** - * Operation setCountryTenantAsyncWithHttpInfo + * Operation setBusinessNameTenantAsyncWithHttpInfo * - * Set Country + * Set User Business Name * * @param string $id The Id of the Tenant. (required) * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\Country|null $country The Country for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setCountryTenant'] to see the possible values for this operation + * @param string|null $businessName The Business Name for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBusinessNameTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setCountryTenantAsyncWithHttpInfo( + public function setBusinessNameTenantAsyncWithHttpInfo( string $id, string $userId, - ?\SynergiTech\Staffology\Model\Country $country = null, - string $contentType = self::contentTypes['setCountryTenant'][0] + ?string $businessName = null, + string $contentType = self::contentTypes['setBusinessNameTenant'][0] ): PromiseInterface { $returnType = ''; - $request = $this->setCountryTenantRequest($id, $userId, $country, $contentType); + $request = $this->setBusinessNameTenantRequest($id, $userId, $businessName, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11117,41 +10520,41 @@ function ($exception) { } /** - * Create request for operation 'setCountryTenant' + * Create request for operation 'setBusinessNameTenant' * * @param string $id The Id of the Tenant. (required) * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\Country|null $country The Country for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setCountryTenant'] to see the possible values for this operation + * @param string|null $businessName The Business Name for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setBusinessNameTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setCountryTenantRequest( + public function setBusinessNameTenantRequest( string $id, string $userId, - ?\SynergiTech\Staffology\Model\Country $country = null, - string $contentType = self::contentTypes['setCountryTenant'][0] + ?string $businessName = null, + string $contentType = self::contentTypes['setBusinessNameTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setCountryTenant' + 'Missing the required parameter $id when calling setBusinessNameTenant' ); } // verify the required parameter 'userId' is set if ($userId === null || (is_array($userId) && count($userId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $userId when calling setCountryTenant' + 'Missing the required parameter $userId when calling setBusinessNameTenant' ); } - $resourcePath = '/tenants/{id}/users/{userId}/country'; + $resourcePath = '/tenants/{id}/users/{userId}/businessname'; $formParams = []; $queryParams = []; $headerParams = []; @@ -11160,9 +10563,9 @@ public function setCountryTenantRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $country?->value, - 'country', // param base name - 'Country', // openApiType + $businessName, + 'businessName', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -11245,51 +10648,51 @@ public function setCountryTenantRequest( } /** - * Operation setEmployeeCountTenant + * Operation setCountryTenant * - * Set Employee Count + * Set Country * * @param string $id The Id of the Tenant. (required) * @param string $userId The Id of the User. (required) - * @param int|null $employeeCount The Employee Count for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEmployeeCountTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Country|null $country The Country for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setCountryTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function setEmployeeCountTenant( + public function setCountryTenant( string $id, string $userId, - ?int $employeeCount = null, - string $contentType = self::contentTypes['setEmployeeCountTenant'][0] + ?\SynergiTech\Staffology\Model\Country $country = null, + string $contentType = self::contentTypes['setCountryTenant'][0] ): void { - $this->setEmployeeCountTenantWithHttpInfo($id, $userId, $employeeCount, $contentType); + $this->setCountryTenantWithHttpInfo($id, $userId, $country, $contentType); } /** - * Operation setEmployeeCountTenantWithHttpInfo + * Operation setCountryTenantWithHttpInfo * - * Set Employee Count + * Set Country * * @param string $id The Id of the Tenant. (required) * @param string $userId The Id of the User. (required) - * @param int|null $employeeCount The Employee Count for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEmployeeCountTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Country|null $country The Country for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setCountryTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setEmployeeCountTenantWithHttpInfo( + public function setCountryTenantWithHttpInfo( string $id, string $userId, - ?int $employeeCount = null, - string $contentType = self::contentTypes['setEmployeeCountTenant'][0] + ?\SynergiTech\Staffology\Model\Country $country = null, + string $contentType = self::contentTypes['setCountryTenant'][0] ): array { - $request = $this->setEmployeeCountTenantRequest($id, $userId, $employeeCount, $contentType); + $request = $this->setCountryTenantRequest($id, $userId, $country, $contentType); try { $options = $this->createHttpClientOption(); @@ -11315,35 +10718,35 @@ public function setEmployeeCountTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation setEmployeeCountTenantAsync + * Operation setCountryTenantAsync * - * Set Employee Count + * Set Country * * @param string $id The Id of the Tenant. (required) * @param string $userId The Id of the User. (required) - * @param int|null $employeeCount The Employee Count for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEmployeeCountTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Country|null $country The Country for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setCountryTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setEmployeeCountTenantAsync( + public function setCountryTenantAsync( string $id, string $userId, - ?int $employeeCount = null, - string $contentType = self::contentTypes['setEmployeeCountTenant'][0] + ?\SynergiTech\Staffology\Model\Country $country = null, + string $contentType = self::contentTypes['setCountryTenant'][0] ): PromiseInterface { - return $this->setEmployeeCountTenantAsyncWithHttpInfo($id, $userId, $employeeCount, $contentType) + return $this->setCountryTenantAsyncWithHttpInfo($id, $userId, $country, $contentType) ->then( function ($response) { return $response[0]; @@ -11352,27 +10755,27 @@ function ($response) { } /** - * Operation setEmployeeCountTenantAsyncWithHttpInfo + * Operation setCountryTenantAsyncWithHttpInfo * - * Set Employee Count + * Set Country * * @param string $id The Id of the Tenant. (required) * @param string $userId The Id of the User. (required) - * @param int|null $employeeCount The Employee Count for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEmployeeCountTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Country|null $country The Country for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setCountryTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setEmployeeCountTenantAsyncWithHttpInfo( + public function setCountryTenantAsyncWithHttpInfo( string $id, - string $userId, - ?int $employeeCount = null, - string $contentType = self::contentTypes['setEmployeeCountTenant'][0] + string $userId, + ?\SynergiTech\Staffology\Model\Country $country = null, + string $contentType = self::contentTypes['setCountryTenant'][0] ): PromiseInterface { $returnType = ''; - $request = $this->setEmployeeCountTenantRequest($id, $userId, $employeeCount, $contentType); + $request = $this->setCountryTenantRequest($id, $userId, $country, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11398,41 +10801,41 @@ function ($exception) { } /** - * Create request for operation 'setEmployeeCountTenant' + * Create request for operation 'setCountryTenant' * * @param string $id The Id of the Tenant. (required) * @param string $userId The Id of the User. (required) - * @param int|null $employeeCount The Employee Count for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEmployeeCountTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\Country|null $country The Country for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setCountryTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setEmployeeCountTenantRequest( + public function setCountryTenantRequest( string $id, string $userId, - ?int $employeeCount = null, - string $contentType = self::contentTypes['setEmployeeCountTenant'][0] + ?\SynergiTech\Staffology\Model\Country $country = null, + string $contentType = self::contentTypes['setCountryTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setEmployeeCountTenant' + 'Missing the required parameter $id when calling setCountryTenant' ); } // verify the required parameter 'userId' is set if ($userId === null || (is_array($userId) && count($userId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $userId when calling setEmployeeCountTenant' + 'Missing the required parameter $userId when calling setCountryTenant' ); } - $resourcePath = '/tenants/{id}/users/{userId}/employeecount'; + $resourcePath = '/tenants/{id}/users/{userId}/country'; $formParams = []; $queryParams = []; $headerParams = []; @@ -11441,9 +10844,9 @@ public function setEmployeeCountTenantRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $employeeCount, - 'employeeCount', // param base name - 'integer', // openApiType + $country?->value, + 'country', // param base name + 'Country', // openApiType 'form', // style true, // explode false // required @@ -11526,47 +10929,51 @@ public function setEmployeeCountTenantRequest( } /** - * Operation setEvcTenant + * Operation setEmployeeCountTenant * - * Set Evc + * Set Employee Count * - * @param string $id The Id of the tenant (required) - * @param bool|null $disableEvc A boolean value indicating whether to disable or enable EVC at tenant level. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant. (required) + * @param string $userId The Id of the User. (required) + * @param int|null $employeeCount The Employee Count for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEmployeeCountTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function setEvcTenant( + public function setEmployeeCountTenant( string $id, - ?bool $disableEvc = null, - string $contentType = self::contentTypes['setEvcTenant'][0] + string $userId, + ?int $employeeCount = null, + string $contentType = self::contentTypes['setEmployeeCountTenant'][0] ): void { - $this->setEvcTenantWithHttpInfo($id, $disableEvc, $contentType); + $this->setEmployeeCountTenantWithHttpInfo($id, $userId, $employeeCount, $contentType); } /** - * Operation setEvcTenantWithHttpInfo + * Operation setEmployeeCountTenantWithHttpInfo * - * Set Evc + * Set Employee Count * - * @param string $id The Id of the tenant (required) - * @param bool|null $disableEvc A boolean value indicating whether to disable or enable EVC at tenant level. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant. (required) + * @param string $userId The Id of the User. (required) + * @param int|null $employeeCount The Employee Count for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEmployeeCountTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setEvcTenantWithHttpInfo( + public function setEmployeeCountTenantWithHttpInfo( string $id, - ?bool $disableEvc = null, - string $contentType = self::contentTypes['setEvcTenant'][0] + string $userId, + ?int $employeeCount = null, + string $contentType = self::contentTypes['setEmployeeCountTenant'][0] ): array { - $request = $this->setEvcTenantRequest($id, $disableEvc, $contentType); + $request = $this->setEmployeeCountTenantRequest($id, $userId, $employeeCount, $contentType); try { $options = $this->createHttpClientOption(); @@ -11592,33 +10999,35 @@ public function setEvcTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation setEvcTenantAsync + * Operation setEmployeeCountTenantAsync * - * Set Evc + * Set Employee Count * - * @param string $id The Id of the tenant (required) - * @param bool|null $disableEvc A boolean value indicating whether to disable or enable EVC at tenant level. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant. (required) + * @param string $userId The Id of the User. (required) + * @param int|null $employeeCount The Employee Count for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEmployeeCountTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setEvcTenantAsync( + public function setEmployeeCountTenantAsync( string $id, - ?bool $disableEvc = null, - string $contentType = self::contentTypes['setEvcTenant'][0] + string $userId, + ?int $employeeCount = null, + string $contentType = self::contentTypes['setEmployeeCountTenant'][0] ): PromiseInterface { - return $this->setEvcTenantAsyncWithHttpInfo($id, $disableEvc, $contentType) + return $this->setEmployeeCountTenantAsyncWithHttpInfo($id, $userId, $employeeCount, $contentType) ->then( function ($response) { return $response[0]; @@ -11627,25 +11036,27 @@ function ($response) { } /** - * Operation setEvcTenantAsyncWithHttpInfo + * Operation setEmployeeCountTenantAsyncWithHttpInfo * - * Set Evc + * Set Employee Count * - * @param string $id The Id of the tenant (required) - * @param bool|null $disableEvc A boolean value indicating whether to disable or enable EVC at tenant level. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant. (required) + * @param string $userId The Id of the User. (required) + * @param int|null $employeeCount The Employee Count for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEmployeeCountTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setEvcTenantAsyncWithHttpInfo( + public function setEmployeeCountTenantAsyncWithHttpInfo( string $id, - ?bool $disableEvc = null, - string $contentType = self::contentTypes['setEvcTenant'][0] + string $userId, + ?int $employeeCount = null, + string $contentType = self::contentTypes['setEmployeeCountTenant'][0] ): PromiseInterface { $returnType = ''; - $request = $this->setEvcTenantRequest($id, $disableEvc, $contentType); + $request = $this->setEmployeeCountTenantRequest($id, $userId, $employeeCount, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11671,32 +11082,41 @@ function ($exception) { } /** - * Create request for operation 'setEvcTenant' + * Create request for operation 'setEmployeeCountTenant' * - * @param string $id The Id of the tenant (required) - * @param bool|null $disableEvc A boolean value indicating whether to disable or enable EVC at tenant level. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant. (required) + * @param string $userId The Id of the User. (required) + * @param int|null $employeeCount The Employee Count for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEmployeeCountTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setEvcTenantRequest( + public function setEmployeeCountTenantRequest( string $id, - ?bool $disableEvc = null, - string $contentType = self::contentTypes['setEvcTenant'][0] + string $userId, + ?int $employeeCount = null, + string $contentType = self::contentTypes['setEmployeeCountTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setEvcTenant' + 'Missing the required parameter $id when calling setEmployeeCountTenant' ); } + // verify the required parameter 'userId' is set + if ($userId === null || (is_array($userId) && count($userId) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $userId when calling setEmployeeCountTenant' + ); + } - $resourcePath = '/tenants/{id}/admin/evc'; + + $resourcePath = '/tenants/{id}/users/{userId}/employeecount'; $formParams = []; $queryParams = []; $headerParams = []; @@ -11705,9 +11125,9 @@ public function setEvcTenantRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $disableEvc, - 'disableEvc', // param base name - 'boolean', // openApiType + $employeeCount, + 'employeeCount', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required @@ -11722,6 +11142,14 @@ public function setEvcTenantRequest( $resourcePath ); } + // path params + if ($userId !== null) { + $resourcePath = str_replace( + '{' . 'userId' . '}', + ObjectSerializer::toPathValue($userId), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -11782,51 +11210,47 @@ public function setEvcTenantRequest( } /** - * Operation setIndustryTenant + * Operation setEvcTenant * - * Set Industry + * Set Evc * - * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\UserIndustry|null $industry The Industry for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setIndustryTenant'] to see the possible values for this operation + * @param string $id The Id of the tenant (required) + * @param bool|null $disableEvc A boolean value indicating whether to disable or enable EVC at tenant level. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function setIndustryTenant( + public function setEvcTenant( string $id, - string $userId, - ?\SynergiTech\Staffology\Model\UserIndustry $industry = null, - string $contentType = self::contentTypes['setIndustryTenant'][0] + ?bool $disableEvc = null, + string $contentType = self::contentTypes['setEvcTenant'][0] ): void { - $this->setIndustryTenantWithHttpInfo($id, $userId, $industry, $contentType); + $this->setEvcTenantWithHttpInfo($id, $disableEvc, $contentType); } /** - * Operation setIndustryTenantWithHttpInfo + * Operation setEvcTenantWithHttpInfo * - * Set Industry + * Set Evc * - * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\UserIndustry|null $industry The Industry for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setIndustryTenant'] to see the possible values for this operation + * @param string $id The Id of the tenant (required) + * @param bool|null $disableEvc A boolean value indicating whether to disable or enable EVC at tenant level. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setIndustryTenantWithHttpInfo( + public function setEvcTenantWithHttpInfo( string $id, - string $userId, - ?\SynergiTech\Staffology\Model\UserIndustry $industry = null, - string $contentType = self::contentTypes['setIndustryTenant'][0] + ?bool $disableEvc = null, + string $contentType = self::contentTypes['setEvcTenant'][0] ): array { - $request = $this->setIndustryTenantRequest($id, $userId, $industry, $contentType); + $request = $this->setEvcTenantRequest($id, $disableEvc, $contentType); try { $options = $this->createHttpClientOption(); @@ -11852,35 +11276,33 @@ public function setIndustryTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation setIndustryTenantAsync + * Operation setEvcTenantAsync * - * Set Industry + * Set Evc * - * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\UserIndustry|null $industry The Industry for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setIndustryTenant'] to see the possible values for this operation + * @param string $id The Id of the tenant (required) + * @param bool|null $disableEvc A boolean value indicating whether to disable or enable EVC at tenant level. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setIndustryTenantAsync( + public function setEvcTenantAsync( string $id, - string $userId, - ?\SynergiTech\Staffology\Model\UserIndustry $industry = null, - string $contentType = self::contentTypes['setIndustryTenant'][0] + ?bool $disableEvc = null, + string $contentType = self::contentTypes['setEvcTenant'][0] ): PromiseInterface { - return $this->setIndustryTenantAsyncWithHttpInfo($id, $userId, $industry, $contentType) + return $this->setEvcTenantAsyncWithHttpInfo($id, $disableEvc, $contentType) ->then( function ($response) { return $response[0]; @@ -11889,27 +11311,25 @@ function ($response) { } /** - * Operation setIndustryTenantAsyncWithHttpInfo + * Operation setEvcTenantAsyncWithHttpInfo * - * Set Industry + * Set Evc * - * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\UserIndustry|null $industry The Industry for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setIndustryTenant'] to see the possible values for this operation + * @param string $id The Id of the tenant (required) + * @param bool|null $disableEvc A boolean value indicating whether to disable or enable EVC at tenant level. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setIndustryTenantAsyncWithHttpInfo( + public function setEvcTenantAsyncWithHttpInfo( string $id, - string $userId, - ?\SynergiTech\Staffology\Model\UserIndustry $industry = null, - string $contentType = self::contentTypes['setIndustryTenant'][0] + ?bool $disableEvc = null, + string $contentType = self::contentTypes['setEvcTenant'][0] ): PromiseInterface { $returnType = ''; - $request = $this->setIndustryTenantRequest($id, $userId, $industry, $contentType); + $request = $this->setEvcTenantRequest($id, $disableEvc, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11935,41 +11355,32 @@ function ($exception) { } /** - * Create request for operation 'setIndustryTenant' + * Create request for operation 'setEvcTenant' * - * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param \SynergiTech\Staffology\Model\UserIndustry|null $industry The Industry for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setIndustryTenant'] to see the possible values for this operation + * @param string $id The Id of the tenant (required) + * @param bool|null $disableEvc A boolean value indicating whether to disable or enable EVC at tenant level. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setEvcTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setIndustryTenantRequest( + public function setEvcTenantRequest( string $id, - string $userId, - ?\SynergiTech\Staffology\Model\UserIndustry $industry = null, - string $contentType = self::contentTypes['setIndustryTenant'][0] + ?bool $disableEvc = null, + string $contentType = self::contentTypes['setEvcTenant'][0] ): Request - { - - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setIndustryTenant' - ); - } + { - // verify the required parameter 'userId' is set - if ($userId === null || (is_array($userId) && count($userId) === 0)) { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $userId when calling setIndustryTenant' + 'Missing the required parameter $id when calling setEvcTenant' ); } - $resourcePath = '/tenants/{id}/users/{userId}/industry'; + $resourcePath = '/tenants/{id}/admin/evc'; $formParams = []; $queryParams = []; $headerParams = []; @@ -11978,9 +11389,9 @@ public function setIndustryTenantRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $industry?->value, - 'industry', // param base name - 'UserIndustry', // openApiType + $disableEvc, + 'disableEvc', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required @@ -11995,14 +11406,6 @@ public function setIndustryTenantRequest( $resourcePath ); } - // path params - if ($userId !== null) { - $resourcePath = str_replace( - '{' . 'userId' . '}', - ObjectSerializer::toPathValue($userId), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -12063,51 +11466,51 @@ public function setIndustryTenantRequest( } /** - * Operation setMonthlyMinimumTenant + * Operation setIndustryTenant * - * Set Monthly Minimum + * Set Industry * * @param string $id The Id of the Tenant. (required) - * @param string $userId userId (required) - * @param \SynergiTech\Staffology\Model\MonthlyMinimum|null $monthlyMinimum monthlyMinimum (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setMonthlyMinimumTenant'] to see the possible values for this operation + * @param string $userId The Id of the User. (required) + * @param \SynergiTech\Staffology\Model\UserIndustry|null $industry The Industry for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setIndustryTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function setMonthlyMinimumTenant( + public function setIndustryTenant( string $id, string $userId, - ?\SynergiTech\Staffology\Model\MonthlyMinimum $monthlyMinimum = null, - string $contentType = self::contentTypes['setMonthlyMinimumTenant'][0] + ?\SynergiTech\Staffology\Model\UserIndustry $industry = null, + string $contentType = self::contentTypes['setIndustryTenant'][0] ): void { - $this->setMonthlyMinimumTenantWithHttpInfo($id, $userId, $monthlyMinimum, $contentType); + $this->setIndustryTenantWithHttpInfo($id, $userId, $industry, $contentType); } /** - * Operation setMonthlyMinimumTenantWithHttpInfo + * Operation setIndustryTenantWithHttpInfo * - * Set Monthly Minimum + * Set Industry * * @param string $id The Id of the Tenant. (required) - * @param string $userId (required) - * @param \SynergiTech\Staffology\Model\MonthlyMinimum|null $monthlyMinimum (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setMonthlyMinimumTenant'] to see the possible values for this operation + * @param string $userId The Id of the User. (required) + * @param \SynergiTech\Staffology\Model\UserIndustry|null $industry The Industry for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setIndustryTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setMonthlyMinimumTenantWithHttpInfo( + public function setIndustryTenantWithHttpInfo( string $id, string $userId, - ?\SynergiTech\Staffology\Model\MonthlyMinimum $monthlyMinimum = null, - string $contentType = self::contentTypes['setMonthlyMinimumTenant'][0] + ?\SynergiTech\Staffology\Model\UserIndustry $industry = null, + string $contentType = self::contentTypes['setIndustryTenant'][0] ): array { - $request = $this->setMonthlyMinimumTenantRequest($id, $userId, $monthlyMinimum, $contentType); + $request = $this->setIndustryTenantRequest($id, $userId, $industry, $contentType); try { $options = $this->createHttpClientOption(); @@ -12133,35 +11536,35 @@ public function setMonthlyMinimumTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation setMonthlyMinimumTenantAsync + * Operation setIndustryTenantAsync * - * Set Monthly Minimum + * Set Industry * * @param string $id The Id of the Tenant. (required) - * @param string $userId (required) - * @param \SynergiTech\Staffology\Model\MonthlyMinimum|null $monthlyMinimum (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setMonthlyMinimumTenant'] to see the possible values for this operation + * @param string $userId The Id of the User. (required) + * @param \SynergiTech\Staffology\Model\UserIndustry|null $industry The Industry for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setIndustryTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setMonthlyMinimumTenantAsync( + public function setIndustryTenantAsync( string $id, string $userId, - ?\SynergiTech\Staffology\Model\MonthlyMinimum $monthlyMinimum = null, - string $contentType = self::contentTypes['setMonthlyMinimumTenant'][0] + ?\SynergiTech\Staffology\Model\UserIndustry $industry = null, + string $contentType = self::contentTypes['setIndustryTenant'][0] ): PromiseInterface { - return $this->setMonthlyMinimumTenantAsyncWithHttpInfo($id, $userId, $monthlyMinimum, $contentType) + return $this->setIndustryTenantAsyncWithHttpInfo($id, $userId, $industry, $contentType) ->then( function ($response) { return $response[0]; @@ -12170,27 +11573,27 @@ function ($response) { } /** - * Operation setMonthlyMinimumTenantAsyncWithHttpInfo + * Operation setIndustryTenantAsyncWithHttpInfo * - * Set Monthly Minimum + * Set Industry * * @param string $id The Id of the Tenant. (required) - * @param string $userId (required) - * @param \SynergiTech\Staffology\Model\MonthlyMinimum|null $monthlyMinimum (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setMonthlyMinimumTenant'] to see the possible values for this operation + * @param string $userId The Id of the User. (required) + * @param \SynergiTech\Staffology\Model\UserIndustry|null $industry The Industry for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setIndustryTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setMonthlyMinimumTenantAsyncWithHttpInfo( + public function setIndustryTenantAsyncWithHttpInfo( string $id, string $userId, - ?\SynergiTech\Staffology\Model\MonthlyMinimum $monthlyMinimum = null, - string $contentType = self::contentTypes['setMonthlyMinimumTenant'][0] + ?\SynergiTech\Staffology\Model\UserIndustry $industry = null, + string $contentType = self::contentTypes['setIndustryTenant'][0] ): PromiseInterface { $returnType = ''; - $request = $this->setMonthlyMinimumTenantRequest($id, $userId, $monthlyMinimum, $contentType); + $request = $this->setIndustryTenantRequest($id, $userId, $industry, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12216,47 +11619,56 @@ function ($exception) { } /** - * Create request for operation 'setMonthlyMinimumTenant' + * Create request for operation 'setIndustryTenant' * * @param string $id The Id of the Tenant. (required) - * @param string $userId (required) - * @param \SynergiTech\Staffology\Model\MonthlyMinimum|null $monthlyMinimum (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setMonthlyMinimumTenant'] to see the possible values for this operation + * @param string $userId The Id of the User. (required) + * @param \SynergiTech\Staffology\Model\UserIndustry|null $industry The Industry for the User. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setIndustryTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setMonthlyMinimumTenantRequest( + public function setIndustryTenantRequest( string $id, string $userId, - ?\SynergiTech\Staffology\Model\MonthlyMinimum $monthlyMinimum = null, - string $contentType = self::contentTypes['setMonthlyMinimumTenant'][0] + ?\SynergiTech\Staffology\Model\UserIndustry $industry = null, + string $contentType = self::contentTypes['setIndustryTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setMonthlyMinimumTenant' + 'Missing the required parameter $id when calling setIndustryTenant' ); } // verify the required parameter 'userId' is set if ($userId === null || (is_array($userId) && count($userId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $userId when calling setMonthlyMinimumTenant' + 'Missing the required parameter $userId when calling setIndustryTenant' ); } - $resourcePath = '/tenants/{id}/users/{userId}/monthlyminimum'; + $resourcePath = '/tenants/{id}/users/{userId}/industry'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $industry?->value, + 'industry', // param base name + 'UserIndustry', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -12284,14 +11696,7 @@ public function setMonthlyMinimumTenantRequest( ); // for model (json/xml) - if (isset($monthlyMinimum)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($monthlyMinimum)); - } else { - $httpBody = $monthlyMinimum; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -12342,51 +11747,51 @@ public function setMonthlyMinimumTenantRequest( } /** - * Operation setPricingTableIdTenant + * Operation setMonthlyMinimumTenant * - * Set User PricingTableId + * Set Monthly Minimum * * @param string $id The Id of the Tenant. (required) * @param string $userId userId (required) - * @param string|null $pricingTableId The PricingTable Id for the user. Provide null and the user will use the Tenant default (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setPricingTableIdTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\MonthlyMinimum|null $monthlyMinimum monthlyMinimum (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setMonthlyMinimumTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function setPricingTableIdTenant( + public function setMonthlyMinimumTenant( string $id, string $userId, - ?string $pricingTableId = null, - string $contentType = self::contentTypes['setPricingTableIdTenant'][0] + ?\SynergiTech\Staffology\Model\MonthlyMinimum $monthlyMinimum = null, + string $contentType = self::contentTypes['setMonthlyMinimumTenant'][0] ): void { - $this->setPricingTableIdTenantWithHttpInfo($id, $userId, $pricingTableId, $contentType); + $this->setMonthlyMinimumTenantWithHttpInfo($id, $userId, $monthlyMinimum, $contentType); } /** - * Operation setPricingTableIdTenantWithHttpInfo + * Operation setMonthlyMinimumTenantWithHttpInfo * - * Set User PricingTableId + * Set Monthly Minimum * * @param string $id The Id of the Tenant. (required) * @param string $userId (required) - * @param string|null $pricingTableId The PricingTable Id for the user. Provide null and the user will use the Tenant default (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setPricingTableIdTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\MonthlyMinimum|null $monthlyMinimum (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setMonthlyMinimumTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setPricingTableIdTenantWithHttpInfo( + public function setMonthlyMinimumTenantWithHttpInfo( string $id, string $userId, - ?string $pricingTableId = null, - string $contentType = self::contentTypes['setPricingTableIdTenant'][0] + ?\SynergiTech\Staffology\Model\MonthlyMinimum $monthlyMinimum = null, + string $contentType = self::contentTypes['setMonthlyMinimumTenant'][0] ): array { - $request = $this->setPricingTableIdTenantRequest($id, $userId, $pricingTableId, $contentType); + $request = $this->setMonthlyMinimumTenantRequest($id, $userId, $monthlyMinimum, $contentType); try { $options = $this->createHttpClientOption(); @@ -12412,35 +11817,35 @@ public function setPricingTableIdTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation setPricingTableIdTenantAsync + * Operation setMonthlyMinimumTenantAsync * - * Set User PricingTableId + * Set Monthly Minimum * * @param string $id The Id of the Tenant. (required) * @param string $userId (required) - * @param string|null $pricingTableId The PricingTable Id for the user. Provide null and the user will use the Tenant default (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setPricingTableIdTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\MonthlyMinimum|null $monthlyMinimum (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setMonthlyMinimumTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setPricingTableIdTenantAsync( + public function setMonthlyMinimumTenantAsync( string $id, string $userId, - ?string $pricingTableId = null, - string $contentType = self::contentTypes['setPricingTableIdTenant'][0] + ?\SynergiTech\Staffology\Model\MonthlyMinimum $monthlyMinimum = null, + string $contentType = self::contentTypes['setMonthlyMinimumTenant'][0] ): PromiseInterface { - return $this->setPricingTableIdTenantAsyncWithHttpInfo($id, $userId, $pricingTableId, $contentType) + return $this->setMonthlyMinimumTenantAsyncWithHttpInfo($id, $userId, $monthlyMinimum, $contentType) ->then( function ($response) { return $response[0]; @@ -12449,27 +11854,27 @@ function ($response) { } /** - * Operation setPricingTableIdTenantAsyncWithHttpInfo + * Operation setMonthlyMinimumTenantAsyncWithHttpInfo * - * Set User PricingTableId + * Set Monthly Minimum * * @param string $id The Id of the Tenant. (required) * @param string $userId (required) - * @param string|null $pricingTableId The PricingTable Id for the user. Provide null and the user will use the Tenant default (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setPricingTableIdTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\MonthlyMinimum|null $monthlyMinimum (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setMonthlyMinimumTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setPricingTableIdTenantAsyncWithHttpInfo( + public function setMonthlyMinimumTenantAsyncWithHttpInfo( string $id, string $userId, - ?string $pricingTableId = null, - string $contentType = self::contentTypes['setPricingTableIdTenant'][0] + ?\SynergiTech\Staffology\Model\MonthlyMinimum $monthlyMinimum = null, + string $contentType = self::contentTypes['setMonthlyMinimumTenant'][0] ): PromiseInterface { $returnType = ''; - $request = $this->setPricingTableIdTenantRequest($id, $userId, $pricingTableId, $contentType); + $request = $this->setMonthlyMinimumTenantRequest($id, $userId, $monthlyMinimum, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12495,56 +11900,47 @@ function ($exception) { } /** - * Create request for operation 'setPricingTableIdTenant' + * Create request for operation 'setMonthlyMinimumTenant' * * @param string $id The Id of the Tenant. (required) * @param string $userId (required) - * @param string|null $pricingTableId The PricingTable Id for the user. Provide null and the user will use the Tenant default (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setPricingTableIdTenant'] to see the possible values for this operation + * @param \SynergiTech\Staffology\Model\MonthlyMinimum|null $monthlyMinimum (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setMonthlyMinimumTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setPricingTableIdTenantRequest( + public function setMonthlyMinimumTenantRequest( string $id, string $userId, - ?string $pricingTableId = null, - string $contentType = self::contentTypes['setPricingTableIdTenant'][0] + ?\SynergiTech\Staffology\Model\MonthlyMinimum $monthlyMinimum = null, + string $contentType = self::contentTypes['setMonthlyMinimumTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setPricingTableIdTenant' + 'Missing the required parameter $id when calling setMonthlyMinimumTenant' ); } // verify the required parameter 'userId' is set if ($userId === null || (is_array($userId) && count($userId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $userId when calling setPricingTableIdTenant' + 'Missing the required parameter $userId when calling setMonthlyMinimumTenant' ); } - $resourcePath = '/tenants/{id}/users/{userId}/pricingtable'; + $resourcePath = '/tenants/{id}/users/{userId}/monthlyminimum'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $pricingTableId, - 'pricingTableId', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -12572,7 +11968,14 @@ public function setPricingTableIdTenantRequest( ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($monthlyMinimum)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($monthlyMinimum)); + } else { + $httpBody = $monthlyMinimum; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -12623,51 +12026,51 @@ public function setPricingTableIdTenantRequest( } /** - * Operation setTenantTenant + * Operation setPricingTableIdTenant * - * Set User Tenant + * Set User PricingTableId * - * @param string $id The Id of the Tenant the user is currently assigned to. (required) + * @param string $id The Id of the Tenant. (required) * @param string $userId userId (required) - * @param string|null $newTenantId The Id of the Tenant the user is to be assigned to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setTenantTenant'] to see the possible values for this operation + * @param string|null $pricingTableId The PricingTable Id for the user. Provide null and the user will use the Tenant default (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setPricingTableIdTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function setTenantTenant( + public function setPricingTableIdTenant( string $id, string $userId, - ?string $newTenantId = null, - string $contentType = self::contentTypes['setTenantTenant'][0] + ?string $pricingTableId = null, + string $contentType = self::contentTypes['setPricingTableIdTenant'][0] ): void { - $this->setTenantTenantWithHttpInfo($id, $userId, $newTenantId, $contentType); + $this->setPricingTableIdTenantWithHttpInfo($id, $userId, $pricingTableId, $contentType); } /** - * Operation setTenantTenantWithHttpInfo + * Operation setPricingTableIdTenantWithHttpInfo * - * Set User Tenant + * Set User PricingTableId * - * @param string $id The Id of the Tenant the user is currently assigned to. (required) + * @param string $id The Id of the Tenant. (required) * @param string $userId (required) - * @param string|null $newTenantId The Id of the Tenant the user is to be assigned to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setTenantTenant'] to see the possible values for this operation + * @param string|null $pricingTableId The PricingTable Id for the user. Provide null and the user will use the Tenant default (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setPricingTableIdTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setTenantTenantWithHttpInfo( + public function setPricingTableIdTenantWithHttpInfo( string $id, string $userId, - ?string $newTenantId = null, - string $contentType = self::contentTypes['setTenantTenant'][0] + ?string $pricingTableId = null, + string $contentType = self::contentTypes['setPricingTableIdTenant'][0] ): array { - $request = $this->setTenantTenantRequest($id, $userId, $newTenantId, $contentType); + $request = $this->setPricingTableIdTenantRequest($id, $userId, $pricingTableId, $contentType); try { $options = $this->createHttpClientOption(); @@ -12693,35 +12096,35 @@ public function setTenantTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation setTenantTenantAsync + * Operation setPricingTableIdTenantAsync * - * Set User Tenant + * Set User PricingTableId * - * @param string $id The Id of the Tenant the user is currently assigned to. (required) + * @param string $id The Id of the Tenant. (required) * @param string $userId (required) - * @param string|null $newTenantId The Id of the Tenant the user is to be assigned to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setTenantTenant'] to see the possible values for this operation + * @param string|null $pricingTableId The PricingTable Id for the user. Provide null and the user will use the Tenant default (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setPricingTableIdTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setTenantTenantAsync( + public function setPricingTableIdTenantAsync( string $id, string $userId, - ?string $newTenantId = null, - string $contentType = self::contentTypes['setTenantTenant'][0] + ?string $pricingTableId = null, + string $contentType = self::contentTypes['setPricingTableIdTenant'][0] ): PromiseInterface { - return $this->setTenantTenantAsyncWithHttpInfo($id, $userId, $newTenantId, $contentType) + return $this->setPricingTableIdTenantAsyncWithHttpInfo($id, $userId, $pricingTableId, $contentType) ->then( function ($response) { return $response[0]; @@ -12730,27 +12133,27 @@ function ($response) { } /** - * Operation setTenantTenantAsyncWithHttpInfo + * Operation setPricingTableIdTenantAsyncWithHttpInfo * - * Set User Tenant + * Set User PricingTableId * - * @param string $id The Id of the Tenant the user is currently assigned to. (required) + * @param string $id The Id of the Tenant. (required) * @param string $userId (required) - * @param string|null $newTenantId The Id of the Tenant the user is to be assigned to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setTenantTenant'] to see the possible values for this operation + * @param string|null $pricingTableId The PricingTable Id for the user. Provide null and the user will use the Tenant default (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setPricingTableIdTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setTenantTenantAsyncWithHttpInfo( + public function setPricingTableIdTenantAsyncWithHttpInfo( string $id, string $userId, - ?string $newTenantId = null, - string $contentType = self::contentTypes['setTenantTenant'][0] + ?string $pricingTableId = null, + string $contentType = self::contentTypes['setPricingTableIdTenant'][0] ): PromiseInterface { $returnType = ''; - $request = $this->setTenantTenantRequest($id, $userId, $newTenantId, $contentType); + $request = $this->setPricingTableIdTenantRequest($id, $userId, $pricingTableId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12776,41 +12179,41 @@ function ($exception) { } /** - * Create request for operation 'setTenantTenant' + * Create request for operation 'setPricingTableIdTenant' * - * @param string $id The Id of the Tenant the user is currently assigned to. (required) + * @param string $id The Id of the Tenant. (required) * @param string $userId (required) - * @param string|null $newTenantId The Id of the Tenant the user is to be assigned to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setTenantTenant'] to see the possible values for this operation + * @param string|null $pricingTableId The PricingTable Id for the user. Provide null and the user will use the Tenant default (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setPricingTableIdTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setTenantTenantRequest( + public function setPricingTableIdTenantRequest( string $id, string $userId, - ?string $newTenantId = null, - string $contentType = self::contentTypes['setTenantTenant'][0] + ?string $pricingTableId = null, + string $contentType = self::contentTypes['setPricingTableIdTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setTenantTenant' + 'Missing the required parameter $id when calling setPricingTableIdTenant' ); } // verify the required parameter 'userId' is set if ($userId === null || (is_array($userId) && count($userId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $userId when calling setTenantTenant' + 'Missing the required parameter $userId when calling setPricingTableIdTenant' ); } - $resourcePath = '/tenants/{id}/users/{userId}/tenant'; + $resourcePath = '/tenants/{id}/users/{userId}/pricingtable'; $formParams = []; $queryParams = []; $headerParams = []; @@ -12819,8 +12222,8 @@ public function setTenantTenantRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $newTenantId, - 'newTenantId', // param base name + $pricingTableId, + 'pricingTableId', // param base name 'string', // openApiType 'form', // style true, // explode @@ -12904,51 +12307,51 @@ public function setTenantTenantRequest( } /** - * Operation setUserCanUseRefactoredAeRoutinesTenant + * Operation setTenantTenant * - * Set CanUseRefactoredAeRoutines flag + * Set User Tenant * - * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param bool|null $canUseRefactoredAeRoutines The CanUseRefactoredAeRoutines flag for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setUserCanUseRefactoredAeRoutinesTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant the user is currently assigned to. (required) + * @param string $userId userId (required) + * @param string|null $newTenantId The Id of the Tenant the user is to be assigned to. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setTenantTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return void */ - public function setUserCanUseRefactoredAeRoutinesTenant( + public function setTenantTenant( string $id, string $userId, - ?bool $canUseRefactoredAeRoutines = null, - string $contentType = self::contentTypes['setUserCanUseRefactoredAeRoutinesTenant'][0] + ?string $newTenantId = null, + string $contentType = self::contentTypes['setTenantTenant'][0] ): void { - $this->setUserCanUseRefactoredAeRoutinesTenantWithHttpInfo($id, $userId, $canUseRefactoredAeRoutines, $contentType); + $this->setTenantTenantWithHttpInfo($id, $userId, $newTenantId, $contentType); } /** - * Operation setUserCanUseRefactoredAeRoutinesTenantWithHttpInfo + * Operation setTenantTenantWithHttpInfo * - * Set CanUseRefactoredAeRoutines flag + * Set User Tenant * - * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param bool|null $canUseRefactoredAeRoutines The CanUseRefactoredAeRoutines flag for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setUserCanUseRefactoredAeRoutinesTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant the user is currently assigned to. (required) + * @param string $userId (required) + * @param string|null $newTenantId The Id of the Tenant the user is to be assigned to. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setTenantTenant'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setUserCanUseRefactoredAeRoutinesTenantWithHttpInfo( + public function setTenantTenantWithHttpInfo( string $id, string $userId, - ?bool $canUseRefactoredAeRoutines = null, - string $contentType = self::contentTypes['setUserCanUseRefactoredAeRoutinesTenant'][0] + ?string $newTenantId = null, + string $contentType = self::contentTypes['setTenantTenant'][0] ): array { - $request = $this->setUserCanUseRefactoredAeRoutinesTenantRequest($id, $userId, $canUseRefactoredAeRoutines, $contentType); + $request = $this->setTenantTenantRequest($id, $userId, $newTenantId, $contentType); try { $options = $this->createHttpClientOption(); @@ -12974,35 +12377,35 @@ public function setUserCanUseRefactoredAeRoutinesTenantWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation setUserCanUseRefactoredAeRoutinesTenantAsync + * Operation setTenantTenantAsync * - * Set CanUseRefactoredAeRoutines flag + * Set User Tenant * - * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param bool|null $canUseRefactoredAeRoutines The CanUseRefactoredAeRoutines flag for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setUserCanUseRefactoredAeRoutinesTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant the user is currently assigned to. (required) + * @param string $userId (required) + * @param string|null $newTenantId The Id of the Tenant the user is to be assigned to. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setTenantTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setUserCanUseRefactoredAeRoutinesTenantAsync( + public function setTenantTenantAsync( string $id, string $userId, - ?bool $canUseRefactoredAeRoutines = null, - string $contentType = self::contentTypes['setUserCanUseRefactoredAeRoutinesTenant'][0] + ?string $newTenantId = null, + string $contentType = self::contentTypes['setTenantTenant'][0] ): PromiseInterface { - return $this->setUserCanUseRefactoredAeRoutinesTenantAsyncWithHttpInfo($id, $userId, $canUseRefactoredAeRoutines, $contentType) + return $this->setTenantTenantAsyncWithHttpInfo($id, $userId, $newTenantId, $contentType) ->then( function ($response) { return $response[0]; @@ -13011,27 +12414,27 @@ function ($response) { } /** - * Operation setUserCanUseRefactoredAeRoutinesTenantAsyncWithHttpInfo + * Operation setTenantTenantAsyncWithHttpInfo * - * Set CanUseRefactoredAeRoutines flag + * Set User Tenant * - * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param bool|null $canUseRefactoredAeRoutines The CanUseRefactoredAeRoutines flag for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setUserCanUseRefactoredAeRoutinesTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant the user is currently assigned to. (required) + * @param string $userId (required) + * @param string|null $newTenantId The Id of the Tenant the user is to be assigned to. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setTenantTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return PromiseInterface */ - public function setUserCanUseRefactoredAeRoutinesTenantAsyncWithHttpInfo( + public function setTenantTenantAsyncWithHttpInfo( string $id, string $userId, - ?bool $canUseRefactoredAeRoutines = null, - string $contentType = self::contentTypes['setUserCanUseRefactoredAeRoutinesTenant'][0] + ?string $newTenantId = null, + string $contentType = self::contentTypes['setTenantTenant'][0] ): PromiseInterface { $returnType = ''; - $request = $this->setUserCanUseRefactoredAeRoutinesTenantRequest($id, $userId, $canUseRefactoredAeRoutines, $contentType); + $request = $this->setTenantTenantRequest($id, $userId, $newTenantId, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13057,41 +12460,41 @@ function ($exception) { } /** - * Create request for operation 'setUserCanUseRefactoredAeRoutinesTenant' + * Create request for operation 'setTenantTenant' * - * @param string $id The Id of the Tenant. (required) - * @param string $userId The Id of the User. (required) - * @param bool|null $canUseRefactoredAeRoutines The CanUseRefactoredAeRoutines flag for the User. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setUserCanUseRefactoredAeRoutinesTenant'] to see the possible values for this operation + * @param string $id The Id of the Tenant the user is currently assigned to. (required) + * @param string $userId (required) + * @param string|null $newTenantId The Id of the Tenant the user is to be assigned to. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setTenantTenant'] to see the possible values for this operation * * @throws InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setUserCanUseRefactoredAeRoutinesTenantRequest( + public function setTenantTenantRequest( string $id, string $userId, - ?bool $canUseRefactoredAeRoutines = null, - string $contentType = self::contentTypes['setUserCanUseRefactoredAeRoutinesTenant'][0] + ?string $newTenantId = null, + string $contentType = self::contentTypes['setTenantTenant'][0] ): Request { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $id when calling setUserCanUseRefactoredAeRoutinesTenant' + 'Missing the required parameter $id when calling setTenantTenant' ); } // verify the required parameter 'userId' is set if ($userId === null || (is_array($userId) && count($userId) === 0)) { throw new InvalidArgumentException( - 'Missing the required parameter $userId when calling setUserCanUseRefactoredAeRoutinesTenant' + 'Missing the required parameter $userId when calling setTenantTenant' ); } - $resourcePath = '/tenants/{id}/users/{userId}/refactoredaeroutine'; + $resourcePath = '/tenants/{id}/users/{userId}/tenant'; $formParams = []; $queryParams = []; $headerParams = []; @@ -13100,9 +12503,9 @@ public function setUserCanUseRefactoredAeRoutinesTenantRequest( // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $canUseRefactoredAeRoutines, - 'canUseRefactoredAeRoutines', // param base name - 'boolean', // openApiType + $newTenantId, + 'newTenantId', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -13262,36 +12665,15 @@ public function updateBillTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\UsageBill', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\UsageBill' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\UsageBill', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\UsageBill', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -13306,34 +12688,11 @@ public function updateBillTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\UsageBill'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\UsageBill', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13343,8 +12702,9 @@ public function updateBillTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -13670,36 +13030,15 @@ public function updateCssColorsTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\StringStringKeyValuePair[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\StringStringKeyValuePair[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\StringStringKeyValuePair[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\StringStringKeyValuePair[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -13714,34 +13053,11 @@ public function updateCssColorsTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\StringStringKeyValuePair[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\StringStringKeyValuePair[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13751,8 +13067,9 @@ public function updateCssColorsTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -14015,36 +13332,15 @@ public function updateCssTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('string' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'string', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -14059,34 +13355,11 @@ public function updateCssTenantWithHttpInfo( ); } - $returnType = 'string'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14096,8 +13369,9 @@ public function updateCssTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -14360,36 +13634,15 @@ public function updateFavIconTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Tenant', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Tenant' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Tenant', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -14404,34 +13657,11 @@ public function updateFavIconTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Tenant'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14441,8 +13671,9 @@ public function updateFavIconTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -14575,19 +13806,14 @@ public function updateFavIconTenantRequest( } // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -14712,36 +13938,15 @@ public function updateLogoTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Tenant', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Tenant' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Tenant', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -14756,34 +13961,11 @@ public function updateLogoTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Tenant'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14793,8 +13975,9 @@ public function updateLogoTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -14926,20 +14109,15 @@ public function updateLogoTenantRequest( ); } - // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface - ? $paramFile - : \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + // form params + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -15010,14 +14188,14 @@ public function updateLogoTenantRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\PricingTable + * @return \SynergiTech\Staffology\Model\PricingTable|null */ public function updatePricingTableTenant( string $id, string $pricingTableId, ?\SynergiTech\Staffology\Model\PricingTable $pricingTable = null, string $contentType = self::contentTypes['updatePricingTableTenant'][0] - ): \SynergiTech\Staffology\Model\PricingTable + ): ?\SynergiTech\Staffology\Model\PricingTable { list($response) = $this->updatePricingTableTenantWithHttpInfo($id, $pricingTableId, $pricingTable, $contentType); return $response; @@ -15068,36 +14246,15 @@ public function updatePricingTableTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\PricingTable', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\PricingTable' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\PricingTable', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PricingTable', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -15112,34 +14269,11 @@ public function updatePricingTableTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\PricingTable'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\PricingTable', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15149,8 +14283,9 @@ public function updatePricingTableTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -15379,13 +14514,13 @@ public function updatePricingTableTenantRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\RtiSubmissionSettings + * @return \SynergiTech\Staffology\Model\RtiSubmissionSettings|null */ public function updateRtiSubmissionSettingsTenant( ?string $id = null, ?\SynergiTech\Staffology\Model\RtiSubmissionSettings $rtiSubmissionSettings = null, string $contentType = self::contentTypes['updateRtiSubmissionSettingsTenant'][0] - ): \SynergiTech\Staffology\Model\RtiSubmissionSettings + ): ?\SynergiTech\Staffology\Model\RtiSubmissionSettings { list($response) = $this->updateRtiSubmissionSettingsTenantWithHttpInfo($id, $rtiSubmissionSettings, $contentType); return $response; @@ -15402,7 +14537,7 @@ public function updateRtiSubmissionSettingsTenant( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\RtiSubmissionSettings, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\RtiSubmissionSettings, HTTP status code, HTTP response headers (array of strings) */ public function updateRtiSubmissionSettingsTenantWithHttpInfo( ?string $id = null, @@ -15434,36 +14569,15 @@ public function updateRtiSubmissionSettingsTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\RtiSubmissionSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\RtiSubmissionSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\RtiSubmissionSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\RtiSubmissionSettings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -15478,34 +14592,11 @@ public function updateRtiSubmissionSettingsTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\RtiSubmissionSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\RtiSubmissionSettings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15515,8 +14606,9 @@ public function updateRtiSubmissionSettingsTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -15719,13 +14811,13 @@ public function updateRtiSubmissionSettingsTenantRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Tenant + * @return \SynergiTech\Staffology\Model\Tenant|null */ public function updateTenant( string $id, ?\SynergiTech\Staffology\Model\Tenant $tenant = null, string $contentType = self::contentTypes['updateTenant'][0] - ): \SynergiTech\Staffology\Model\Tenant + ): ?\SynergiTech\Staffology\Model\Tenant { list($response) = $this->updateTenantWithHttpInfo($id, $tenant, $contentType); return $response; @@ -15774,36 +14866,15 @@ public function updateTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Tenant', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Tenant' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Tenant', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -15818,34 +14889,11 @@ public function updateTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Tenant'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Tenant', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15855,8 +14903,9 @@ public function updateTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -16065,14 +15114,14 @@ public function updateTenantRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\User + * @return \SynergiTech\Staffology\Model\User|null */ public function updateUserTenant( string $id, string $userId, ?\SynergiTech\Staffology\Model\User $user = null, string $contentType = self::contentTypes['updateUserTenant'][0] - ): \SynergiTech\Staffology\Model\User + ): ?\SynergiTech\Staffology\Model\User { list($response) = $this->updateUserTenantWithHttpInfo($id, $userId, $user, $contentType); return $response; @@ -16123,36 +15172,15 @@ public function updateUserTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\User', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\User' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\User', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -16167,34 +15195,11 @@ public function updateUserTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\User'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -16204,8 +15209,9 @@ public function updateUserTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -16493,36 +15499,15 @@ public function usageTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -16537,34 +15522,11 @@ public function usageTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -16574,8 +15536,9 @@ public function usageTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -16866,36 +15829,15 @@ public function userBillsTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -16910,34 +15852,11 @@ public function userBillsTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -16947,8 +15866,9 @@ public function userBillsTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -17218,36 +16138,15 @@ public function userEmployersTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -17262,34 +16161,11 @@ public function userEmployersTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -17299,8 +16175,9 @@ public function userEmployersTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -17570,36 +16447,15 @@ public function userTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\User', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\User' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\User', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -17614,34 +16470,11 @@ public function userTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\User'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\User', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -17651,8 +16484,9 @@ public function userTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -17922,36 +16756,15 @@ public function usersSearchTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -17966,34 +16779,11 @@ public function usersSearchTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -18003,8 +16793,9 @@ public function usersSearchTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -18285,36 +17076,15 @@ public function usersTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -18329,34 +17099,11 @@ public function usersTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -18366,8 +17113,9 @@ public function usersTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -18708,36 +17456,15 @@ public function weeklyActivityTenantWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ReportResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ReportResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ReportResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -18752,34 +17479,11 @@ public function weeklyActivityTenantWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ReportResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ReportResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -18789,8 +17493,9 @@ public function weeklyActivityTenantWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -19050,4 +17755,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/TenantEmailApi.php b/src/Api/TenantEmailApi.php index 220272c..ec51dca 100644 --- a/src/Api/TenantEmailApi.php +++ b/src/Api/TenantEmailApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -88,10 +91,10 @@ class TenantEmailApi 'application/json', ], 'updateMailSettingsTenantEmail' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -207,36 +210,15 @@ public function getEmailTenantEmailWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\TenantEmail', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\TenantEmail' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\TenantEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\TenantEmail', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -251,34 +233,11 @@ public function getEmailTenantEmailWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\TenantEmail'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\TenantEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -288,8 +247,9 @@ public function getEmailTenantEmailWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -555,36 +515,15 @@ public function getMailSettingsTenantEmailWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\MailSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\MailSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\MailSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\MailSettings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -599,34 +538,11 @@ public function getMailSettingsTenantEmailWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\MailSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\MailSettings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -636,8 +552,9 @@ public function getMailSettingsTenantEmailWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -890,36 +807,15 @@ public function indexTenantEmailWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -934,34 +830,11 @@ public function indexTenantEmailWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -971,8 +844,9 @@ public function indexTenantEmailWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1253,36 +1127,15 @@ public function resendEmailTenantEmailWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\TenantEmail', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\TenantEmail' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\TenantEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\TenantEmail', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1297,34 +1150,11 @@ public function resendEmailTenantEmailWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\TenantEmail'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\TenantEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1334,8 +1164,9 @@ public function resendEmailTenantEmailWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1605,36 +1436,15 @@ public function testMailSettingsTenantEmailWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\EmployerEmail', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\EmployerEmail' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\EmployerEmail', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEmail', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1649,34 +1459,11 @@ public function testMailSettingsTenantEmailWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\EmployerEmail'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\EmployerEmail', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -1686,8 +1473,9 @@ public function testMailSettingsTenantEmailWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1952,36 +1740,15 @@ public function updateMailSettingsTenantEmailWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\MailSettings', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\MailSettings' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\MailSettings', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\MailSettings', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1996,34 +1763,11 @@ public function updateMailSettingsTenantEmailWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\MailSettings'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\MailSettings', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2033,8 +1777,9 @@ public function updateMailSettingsTenantEmailWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2249,4 +1994,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/TermCalendarApi.php b/src/Api/TermCalendarApi.php index b2dca43..3ebbb1e 100644 --- a/src/Api/TermCalendarApi.php +++ b/src/Api/TermCalendarApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class TermCalendarApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createTermCalendar' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteTermCalendar' => [ 'application/json', @@ -88,10 +91,10 @@ class TermCalendarApi 'application/json', ], 'updateTermCalendar' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -152,13 +155,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractTermCalendarResponse + * @return \SynergiTech\Staffology\Model\ContractTermCalendarResponse|null */ public function createTermCalendar( string $employerId, ?\SynergiTech\Staffology\Model\ContractTermCalendarRequest $contractTermCalendarRequest = null, string $contentType = self::contentTypes['createTermCalendar'][0] - ): \SynergiTech\Staffology\Model\ContractTermCalendarResponse + ): ?\SynergiTech\Staffology\Model\ContractTermCalendarResponse { list($response) = $this->createTermCalendarWithHttpInfo($employerId, $contractTermCalendarRequest, $contentType); return $response; @@ -207,36 +210,15 @@ public function createTermCalendarWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractTermCalendarResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractTermCalendarResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractTermCalendarResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -251,34 +233,11 @@ public function createTermCalendarWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractTermCalendarResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -288,8 +247,9 @@ public function createTermCalendarWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -553,10 +513,10 @@ public function deleteTermCalendarWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -758,13 +718,13 @@ public function deleteTermCalendarRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractTermCalendarResponse + * @return \SynergiTech\Staffology\Model\ContractTermCalendarResponse|null */ public function getTermCalendar( string $employerId, string $id, string $contentType = self::contentTypes['getTermCalendar'][0] - ): \SynergiTech\Staffology\Model\ContractTermCalendarResponse + ): ?\SynergiTech\Staffology\Model\ContractTermCalendarResponse { list($response) = $this->getTermCalendarWithHttpInfo($employerId, $id, $contentType); return $response; @@ -813,36 +773,15 @@ public function getTermCalendarWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractTermCalendarResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractTermCalendarResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractTermCalendarResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -857,34 +796,11 @@ public function getTermCalendarWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractTermCalendarResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -894,8 +810,9 @@ public function getTermCalendarWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1109,12 +1026,12 @@ public function getTermCalendarRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractTermCalendarResponse[] + * @return \SynergiTech\Staffology\Model\ContractTermCalendarResponse[]|null */ public function indexTermCalendar( string $employerId, string $contentType = self::contentTypes['indexTermCalendar'][0] - ): array + ): ?array { list($response) = $this->indexTermCalendarWithHttpInfo($employerId, $contentType); return $response; @@ -1161,36 +1078,15 @@ public function indexTermCalendarWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractTermCalendarResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractTermCalendarResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractTermCalendarResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1205,34 +1101,11 @@ public function indexTermCalendarWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractTermCalendarResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1242,8 +1115,9 @@ public function indexTermCalendarWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1438,14 +1312,14 @@ public function indexTermCalendarRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractTermCalendarResponse + * @return \SynergiTech\Staffology\Model\ContractTermCalendarResponse|null */ public function updateTermCalendar( string $employerId, string $id, ?\SynergiTech\Staffology\Model\ContractTermCalendarRequest $contractTermCalendarRequest = null, string $contentType = self::contentTypes['updateTermCalendar'][0] - ): \SynergiTech\Staffology\Model\ContractTermCalendarResponse + ): ?\SynergiTech\Staffology\Model\ContractTermCalendarResponse { list($response) = $this->updateTermCalendarWithHttpInfo($employerId, $id, $contractTermCalendarRequest, $contentType); return $response; @@ -1496,36 +1370,15 @@ public function updateTermCalendarWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractTermCalendarResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractTermCalendarResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractTermCalendarResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1540,34 +1393,11 @@ public function updateTermCalendarWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractTermCalendarResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1577,8 +1407,9 @@ public function updateTermCalendarWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1814,4 +1645,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/TermCalendarYearApi.php b/src/Api/TermCalendarYearApi.php index 4363af9..00c4987 100644 --- a/src/Api/TermCalendarYearApi.php +++ b/src/Api/TermCalendarYearApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class TermCalendarYearApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createTermCalendarYear' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteTermCalendarYear' => [ 'application/json', @@ -88,10 +91,10 @@ class TermCalendarYearApi 'application/json', ], 'updateTermCalendarYear' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -153,14 +156,14 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractTermCalendarYearResponse + * @return \SynergiTech\Staffology\Model\ContractTermCalendarYearResponse|null */ public function createTermCalendarYear( string $employerId, string $termCalendarId, ?\SynergiTech\Staffology\Model\ContractTermCalendarYearRequest $contractTermCalendarYearRequest = null, string $contentType = self::contentTypes['createTermCalendarYear'][0] - ): \SynergiTech\Staffology\Model\ContractTermCalendarYearResponse + ): ?\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse { list($response) = $this->createTermCalendarYearWithHttpInfo($employerId, $termCalendarId, $contractTermCalendarYearRequest, $contentType); return $response; @@ -211,36 +214,15 @@ public function createTermCalendarYearWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -255,34 +237,11 @@ public function createTermCalendarYearWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -292,8 +251,9 @@ public function createTermCalendarYearWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -582,10 +542,10 @@ public function deleteTermCalendarYearWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -809,14 +769,14 @@ public function deleteTermCalendarYearRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractTermCalendarYearResponse + * @return \SynergiTech\Staffology\Model\ContractTermCalendarYearResponse|null */ public function getTermCalendarYear( string $employerId, string $termCalendarId, string $id, string $contentType = self::contentTypes['getTermCalendarYear'][0] - ): \SynergiTech\Staffology\Model\ContractTermCalendarYearResponse + ): ?\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse { list($response) = $this->getTermCalendarYearWithHttpInfo($employerId, $termCalendarId, $id, $contentType); return $response; @@ -867,36 +827,15 @@ public function getTermCalendarYearWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -911,34 +850,11 @@ public function getTermCalendarYearWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -948,8 +864,9 @@ public function getTermCalendarYearWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1185,13 +1102,13 @@ public function getTermCalendarYearRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractTermCalendarYearResponse[] + * @return \SynergiTech\Staffology\Model\ContractTermCalendarYearResponse[]|null */ public function indexTermCalendarYear( string $employerId, string $termCalendarId, string $contentType = self::contentTypes['indexTermCalendarYear'][0] - ): array + ): ?array { list($response) = $this->indexTermCalendarYearWithHttpInfo($employerId, $termCalendarId, $contentType); return $response; @@ -1240,36 +1157,15 @@ public function indexTermCalendarYearWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1284,34 +1180,11 @@ public function indexTermCalendarYearWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1321,8 +1194,9 @@ public function indexTermCalendarYearWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1539,7 +1413,7 @@ public function indexTermCalendarYearRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractTermCalendarYearResponse + * @return \SynergiTech\Staffology\Model\ContractTermCalendarYearResponse|null */ public function updateTermCalendarYear( string $employerId, @@ -1547,7 +1421,7 @@ public function updateTermCalendarYear( string $id, ?\SynergiTech\Staffology\Model\ContractTermCalendarYearRequest $contractTermCalendarYearRequest = null, string $contentType = self::contentTypes['updateTermCalendarYear'][0] - ): \SynergiTech\Staffology\Model\ContractTermCalendarYearResponse + ): ?\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse { list($response) = $this->updateTermCalendarYearWithHttpInfo($employerId, $termCalendarId, $id, $contractTermCalendarYearRequest, $contentType); return $response; @@ -1600,36 +1474,15 @@ public function updateTermCalendarYearWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1644,34 +1497,11 @@ public function updateTermCalendarYearWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractTermCalendarYearResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1681,8 +1511,9 @@ public function updateTermCalendarYearWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1939,4 +1770,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/TierablePayApi.php b/src/Api/TierablePayApi.php index d4b186e..3ea8ce7 100644 --- a/src/Api/TierablePayApi.php +++ b/src/Api/TierablePayApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -134,13 +137,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return float + * @return float|null */ public function getTierablePay( string $employerId, string $payrunEntryId, string $contentType = self::contentTypes['getTierablePay'][0] - ): float + ): ?float { list($response) = $this->getTierablePayWithHttpInfo($employerId, $payrunEntryId, $contentType); return $response; @@ -157,7 +160,7 @@ public function getTierablePay( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |float, HTTP status code, HTTP response headers (array of strings) + * @return array of float, HTTP status code, HTTP response headers (array of strings) */ public function getTierablePayWithHttpInfo( string $employerId, @@ -189,36 +192,15 @@ public function getTierablePayWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('float', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('float' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'float', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -233,34 +215,11 @@ public function getTierablePayWithHttpInfo( ); } - $returnType = 'float'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'float', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -270,8 +229,9 @@ public function getTierablePayWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -493,4 +453,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/ToolsApi.php b/src/Api/ToolsApi.php index 8dda13f..691aefc 100644 --- a/src/Api/ToolsApi.php +++ b/src/Api/ToolsApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -146,7 +149,7 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractNetOfOnCostsResponse + * @return \SynergiTech\Staffology\Model\ContractNetOfOnCostsResponse|null */ public function calculateNetOfOnCostsTools( float $notionalDayRate, @@ -164,7 +167,7 @@ public function calculateNetOfOnCostsTools( ?float $apprenticeshipLevyRateOverride = null, ?\SynergiTech\Staffology\Model\PensionRule $pensionRule = null, string $contentType = self::contentTypes['calculateNetOfOnCostsTools'][0] - ): \SynergiTech\Staffology\Model\ContractNetOfOnCostsResponse + ): ?\SynergiTech\Staffology\Model\ContractNetOfOnCostsResponse { list($response) = $this->calculateNetOfOnCostsToolsWithHttpInfo($notionalDayRate, $fee, $feeIsPercentage, $employersPensionContribution, $employersPensionContributionIsPercentage, $employeesPensionContribution, $employeesPensionContributionIsPercentage, $useAeBandings, $holidayWeeks, $daysWorkedPerWeek, $payPeriod, $calculationDate, $apprenticeshipLevyRateOverride, $pensionRule, $contentType); return $response; @@ -237,36 +240,15 @@ public function calculateNetOfOnCostsToolsWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractNetOfOnCostsResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractNetOfOnCostsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractNetOfOnCostsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractNetOfOnCostsResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -281,34 +263,11 @@ public function calculateNetOfOnCostsToolsWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractNetOfOnCostsResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractNetOfOnCostsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -318,8 +277,9 @@ public function calculateNetOfOnCostsToolsWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -789,4 +749,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/WebhookApi.php b/src/Api/WebhookApi.php index 7131a97..eaca4c9 100644 --- a/src/Api/WebhookApi.php +++ b/src/Api/WebhookApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class WebhookApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createWebhook' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteWebhook' => [ 'application/json', @@ -97,10 +100,10 @@ class WebhookApi 'application/json', ], 'updateWebhook' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -217,10 +220,10 @@ public function createWebhookWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -471,10 +474,10 @@ public function deleteWebhookWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -731,36 +734,15 @@ public function getWebhookWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Webhook', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Webhook' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Webhook', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Webhook', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -775,34 +757,11 @@ public function getWebhookWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Webhook'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Webhook', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -812,8 +771,9 @@ public function getWebhookWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1079,36 +1039,15 @@ public function indexWebhookWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1123,34 +1062,11 @@ public function indexWebhookWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1160,8 +1076,9 @@ public function indexWebhookWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1414,36 +1331,15 @@ public function payloadWebhookWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\WebhookPayload', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\WebhookPayload' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\WebhookPayload', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\WebhookPayload', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1458,34 +1354,11 @@ public function payloadWebhookWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\WebhookPayload'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\WebhookPayload', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1495,8 +1368,9 @@ public function payloadWebhookWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1795,36 +1669,15 @@ public function payloadsWebhookWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1839,34 +1692,11 @@ public function payloadsWebhookWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1876,8 +1706,9 @@ public function payloadsWebhookWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2179,36 +2010,15 @@ public function sampleWebhookWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('mixed', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('mixed' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'mixed', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'mixed', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2223,34 +2033,11 @@ public function sampleWebhookWithHttpInfo( ); } - $returnType = 'mixed'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'mixed', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2260,8 +2047,9 @@ public function sampleWebhookWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2477,14 +2265,14 @@ public function sampleWebhookRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\Webhook + * @return \SynergiTech\Staffology\Model\Webhook|null */ public function updateWebhook( string $employerId, string $id, ?\SynergiTech\Staffology\Model\Webhook $webhook = null, string $contentType = self::contentTypes['updateWebhook'][0] - ): \SynergiTech\Staffology\Model\Webhook + ): ?\SynergiTech\Staffology\Model\Webhook { list($response) = $this->updateWebhookWithHttpInfo($employerId, $id, $webhook, $contentType); return $response; @@ -2535,36 +2323,15 @@ public function updateWebhookWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Webhook', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Webhook' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Webhook', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Webhook', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2579,34 +2346,11 @@ public function updateWebhookWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Webhook'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Webhook', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2616,8 +2360,9 @@ public function updateWebhookWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -2853,4 +2598,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/Api/WorkingPatternApi.php b/src/Api/WorkingPatternApi.php index 394fe60..d58e80d 100644 --- a/src/Api/WorkingPatternApi.php +++ b/src/Api/WorkingPatternApi.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -36,9 +36,12 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use SynergiTech\Staffology\ApiException; use SynergiTech\Staffology\Configuration; use SynergiTech\Staffology\HeaderSelector; +use SynergiTech\Staffology\FormDataProcessor; use SynergiTech\Staffology\ObjectSerializer; /** @@ -73,10 +76,10 @@ class WorkingPatternApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'createWorkingPattern' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], 'deleteWorkingPattern' => [ 'application/json', @@ -88,10 +91,10 @@ class WorkingPatternApi 'application/json', ], 'updateWorkingPattern' => [ - 'application/json-patch+json', + 'application/*+json', 'application/json', + 'application/json-patch+json', 'text/json', - 'application/*+json', ], ]; @@ -152,13 +155,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\WorkingPattern + * @return \SynergiTech\Staffology\Model\WorkingPattern|null */ public function createWorkingPattern( string $employerId, ?\SynergiTech\Staffology\Model\ContractWorkingPatternRequest $contractWorkingPatternRequest = null, string $contentType = self::contentTypes['createWorkingPattern'][0] - ): \SynergiTech\Staffology\Model\WorkingPattern + ): ?\SynergiTech\Staffology\Model\WorkingPattern { list($response) = $this->createWorkingPatternWithHttpInfo($employerId, $contractWorkingPatternRequest, $contentType); return $response; @@ -175,7 +178,7 @@ public function createWorkingPattern( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of |\SynergiTech\Staffology\Model\WorkingPattern, HTTP status code, HTTP response headers (array of strings) + * @return array of \SynergiTech\Staffology\Model\WorkingPattern, HTTP status code, HTTP response headers (array of strings) */ public function createWorkingPatternWithHttpInfo( string $employerId, @@ -207,36 +210,15 @@ public function createWorkingPatternWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 201: - if (in_array('\SynergiTech\Staffology\Model\WorkingPattern', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\WorkingPattern' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\WorkingPattern', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\WorkingPattern', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -251,34 +233,11 @@ public function createWorkingPatternWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\WorkingPattern'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\WorkingPattern', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 201: @@ -288,8 +247,9 @@ public function createWorkingPatternWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -553,10 +513,10 @@ public function deleteWorkingPatternWithHttpInfo( return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } @@ -758,13 +718,13 @@ public function deleteWorkingPatternRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractWorkingPatternResponse + * @return \SynergiTech\Staffology\Model\ContractWorkingPatternResponse|null */ public function getAsyncWorkingPattern( string $employerId, string $id, string $contentType = self::contentTypes['getAsyncWorkingPattern'][0] - ): \SynergiTech\Staffology\Model\ContractWorkingPatternResponse + ): ?\SynergiTech\Staffology\Model\ContractWorkingPatternResponse { list($response) = $this->getAsyncWorkingPatternWithHttpInfo($employerId, $id, $contentType); return $response; @@ -813,36 +773,15 @@ public function getAsyncWorkingPatternWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractWorkingPatternResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractWorkingPatternResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractWorkingPatternResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractWorkingPatternResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -857,34 +796,11 @@ public function getAsyncWorkingPatternWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractWorkingPatternResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractWorkingPatternResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -894,8 +810,9 @@ public function getAsyncWorkingPatternWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1161,36 +1078,15 @@ public function indexAsyncWorkingPatternWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\Item[]', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\Item[]' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\Item[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1205,34 +1101,11 @@ public function indexAsyncWorkingPatternWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\Item[]'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\Item[]', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1242,8 +1115,9 @@ public function indexAsyncWorkingPatternWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1438,14 +1312,14 @@ public function indexAsyncWorkingPatternRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SynergiTech\Staffology\Model\ContractWorkingPatternResponse + * @return \SynergiTech\Staffology\Model\ContractWorkingPatternResponse|null */ public function updateWorkingPattern( string $employerId, string $id, ?\SynergiTech\Staffology\Model\ContractWorkingPatternRequest $contractWorkingPatternRequest = null, string $contentType = self::contentTypes['updateWorkingPattern'][0] - ): \SynergiTech\Staffology\Model\ContractWorkingPatternResponse + ): ?\SynergiTech\Staffology\Model\ContractWorkingPatternResponse { list($response) = $this->updateWorkingPatternWithHttpInfo($employerId, $id, $contractWorkingPatternRequest, $contentType); return $response; @@ -1496,36 +1370,15 @@ public function updateWorkingPatternWithHttpInfo( $statusCode = $response->getStatusCode(); - switch($statusCode) { case 200: - if (in_array('\SynergiTech\Staffology\Model\ContractWorkingPatternResponse', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SynergiTech\Staffology\Model\ContractWorkingPatternResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SynergiTech\Staffology\Model\ContractWorkingPatternResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractWorkingPatternResponse', + $request, + $response, + ); } + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1540,34 +1393,11 @@ public function updateWorkingPatternWithHttpInfo( ); } - $returnType = '\SynergiTech\Staffology\Model\ContractWorkingPatternResponse'; - if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SynergiTech\Staffology\Model\ContractWorkingPatternResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1577,8 +1407,9 @@ public function updateWorkingPatternWithHttpInfo( $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + throw $e; } } @@ -1814,4 +1645,47 @@ protected function createHttpClientOption(): array return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/ApiException.php b/src/ApiException.php index 601b44d..43489e6 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Configuration.php b/src/Configuration.php index 2e42e3a..f6c7ae8 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -14,11 +14,10 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ - /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/FormDataProcessor.php b/src/FormDataProcessor.php new file mode 100644 index 0000000..8d6c690 --- /dev/null +++ b/src/FormDataProcessor.php @@ -0,0 +1,241 @@ + $values the value of the form parameter + * + * @return array [key => value] of formdata + */ + public function prepare(array $values): array + { + $this->has_file = false; + $result = []; + + foreach ($values as $k => $v) { + if ($v === null) { + continue; + } + + $result[$k] = $this->makeFormSafe($v); + } + + return $result; + } + + /** + * Flattens a multi-level array of data and generates a single-level array + * compatible with formdata - a single-level array where the keys use bracket + * notation to signify nested data. + * + * credit: https://github.com/FranBar1966/FlatPHP + */ + public static function flatten(array $source, string $start = ''): array + { + $opt = [ + 'prefix' => '[', + 'suffix' => ']', + 'suffix-end' => true, + 'prefix-list' => '[', + 'suffix-list' => ']', + 'suffix-list-end' => true, + ]; + + if ($start === '') { + $currentPrefix = ''; + $currentSuffix = ''; + $currentSuffixEnd = false; + } elseif (array_is_list($source)) { + $currentPrefix = $opt['prefix-list']; + $currentSuffix = $opt['suffix-list']; + $currentSuffixEnd = $opt['suffix-list-end']; + } else { + $currentPrefix = $opt['prefix']; + $currentSuffix = $opt['suffix']; + $currentSuffixEnd = $opt['suffix-end']; + } + + $currentName = $start; + $result = []; + + foreach ($source as $key => $val) { + $currentName .= $currentPrefix . $key; + + if (is_array($val) && !empty($val)) { + $currentName .= $currentSuffix; + $result += self::flatten($val, $currentName); + } else { + if ($currentSuffixEnd) { + $currentName .= $currentSuffix; + } + + if (is_resource($val)) { + $result[$currentName] = $val; + } else { + $result[$currentName] = ObjectSerializer::toString($val); + } + } + + $currentName = $start; + } + + return $result; + } + + /** + * formdata must be limited to scalars or arrays of scalar values, + * or a resource for a file upload. Here we iterate through all available + * data and identify how to handle each scenario + * + * @param string|bool|array|DateTime|ArrayAccess|SplFileObject $value + */ + protected function makeFormSafe(mixed $value) + { + if ($value instanceof SplFileObject) { + return $this->processFiles([$value])[0]; + } + + if (is_resource($value)) { + $this->has_file = true; + + return $value; + } + + if ($value instanceof ModelInterface) { + return $this->processModel($value); + } + + if (is_array($value) || is_object($value)) { + $data = []; + + foreach ($value as $k => $v) { + $data[$k] = $this->makeFormSafe($v); + } + + return $data; + } + + return ObjectSerializer::toString($value); + } + + /** + * We are able to handle nested ModelInterface. We do not simply call + * json_decode(json_encode()) because any given model may have binary data + * or other data that cannot be serialized to a JSON string + */ + protected function processModel(ModelInterface $model): array + { + $result = []; + + foreach ($model::openAPITypes() as $name => $type) { + $value = $model->offsetGet($name); + + if ($value === null) { + continue; + } + + if (str_contains($type, '\SplFileObject')) { + $file = is_array($value) ? $value : [$value]; + $result[$name] = $this->processFiles($file); + + continue; + } + + if ($value instanceof ModelInterface) { + $result[$name] = $this->processModel($value); + + continue; + } + + if (is_array($value) || is_object($value)) { + $result[$name] = $this->makeFormSafe($value); + + continue; + } + + $result[$name] = ObjectSerializer::toString($value); + } + + return $result; + } + + /** + * Handle file data + */ + protected function processFiles(array $files): array + { + $this->has_file = true; + + $result = []; + + foreach ($files as $i => $file) { + if (is_array($file)) { + $result[$i] = $this->processFiles($file); + + continue; + } + + if ($file instanceof StreamInterface) { + $result[$i] = $file; + + continue; + } + + if ($file instanceof SplFileObject) { + $result[$i] = $this->tryFopen($file); + } + } + + return $result; + } + + private function tryFopen(SplFileObject $file) + { + return Utils::tryFopen($file->getRealPath(), 'rb'); + } +} diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php index 4717d09..92b7ce5 100644 --- a/src/HeaderSelector.php +++ b/src/HeaderSelector.php @@ -14,9 +14,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/Address.php b/src/Model/Address.php index 4dd0e57..b51d0f5 100644 --- a/src/Model/Address.php +++ b/src/Model/Address.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class Address implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'country' => '\SynergiTech\Staffology\Model\Country', + 'foreignCountry' => 'string', 'line1' => 'string', 'line2' => 'string', 'line3' => 'string', 'line4' => 'string', 'line5' => 'string', - 'postCode' => 'string', - 'country' => '\SynergiTech\Staffology\Model\Country', - 'foreignCountry' => 'string' + 'postCode' => 'string' ]; /** @@ -75,14 +75,14 @@ class Address implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'country' => null, + 'foreignCountry' => null, 'line1' => null, 'line2' => null, 'line3' => null, 'line4' => null, 'line5' => null, - 'postCode' => null, - 'country' => null, - 'foreignCountry' => null + 'postCode' => null ]; /** @@ -91,14 +91,14 @@ class Address implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'country' => false, + 'foreignCountry' => true, 'line1' => true, 'line2' => true, 'line3' => true, 'line4' => true, 'line5' => true, - 'postCode' => true, - 'country' => false, - 'foreignCountry' => true + 'postCode' => true ]; /** @@ -187,14 +187,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'country' => 'country', + 'foreignCountry' => 'foreignCountry', 'line1' => 'line1', 'line2' => 'line2', 'line3' => 'line3', 'line4' => 'line4', 'line5' => 'line5', - 'postCode' => 'postCode', - 'country' => 'country', - 'foreignCountry' => 'foreignCountry' + 'postCode' => 'postCode' ]; /** @@ -203,14 +203,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'country' => 'setCountry', + 'foreignCountry' => 'setForeignCountry', 'line1' => 'setLine1', 'line2' => 'setLine2', 'line3' => 'setLine3', 'line4' => 'setLine4', 'line5' => 'setLine5', - 'postCode' => 'setPostCode', - 'country' => 'setCountry', - 'foreignCountry' => 'setForeignCountry' + 'postCode' => 'setPostCode' ]; /** @@ -219,14 +219,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'country' => 'getCountry', + 'foreignCountry' => 'getForeignCountry', 'line1' => 'getLine1', 'line2' => 'getLine2', 'line3' => 'getLine3', 'line4' => 'getLine4', 'line5' => 'getLine5', - 'postCode' => 'getPostCode', - 'country' => 'getCountry', - 'foreignCountry' => 'getForeignCountry' + 'postCode' => 'getPostCode' ]; /** @@ -285,14 +285,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('foreignCountry', $data ?? [], null); $this->setIfExists('line1', $data ?? [], null); $this->setIfExists('line2', $data ?? [], null); $this->setIfExists('line3', $data ?? [], null); $this->setIfExists('line4', $data ?? [], null); $this->setIfExists('line5', $data ?? [], null); $this->setIfExists('postCode', $data ?? [], null); - $this->setIfExists('country', $data ?? [], null); - $this->setIfExists('foreignCountry', $data ?? [], null); } /** @@ -322,6 +322,10 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if (!is_null($this->container['foreignCountry']) && (mb_strlen($this->container['foreignCountry']) > 35)) { + $invalidProperties[] = "invalid value for 'foreignCountry', the character length must be smaller than or equal to 35."; + } + if (!is_null($this->container['line1']) && (mb_strlen($this->container['line1']) > 100)) { $invalidProperties[] = "invalid value for 'line1', the character length must be smaller than or equal to 100."; } @@ -346,10 +350,6 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'postCode', the character length must be smaller than or equal to 10."; } - if (!is_null($this->container['foreignCountry']) && (mb_strlen($this->container['foreignCountry']) > 35)) { - $invalidProperties[] = "invalid value for 'foreignCountry', the character length must be smaller than or equal to 35."; - } - return $invalidProperties; } @@ -365,6 +365,71 @@ public function valid(): bool } + /** + * Gets country + * + * @return \SynergiTech\Staffology\Model\Country|null + */ + public function getCountry(): ?\SynergiTech\Staffology\Model\Country + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param \SynergiTech\Staffology\Model\Country|null $country country + * + * @return $this + */ + public function setCountry(?\SynergiTech\Staffology\Model\Country $country): static + { + if (is_null($country)) { + throw new InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets foreignCountry + * + * @return string|null + */ + public function getForeignCountry(): ?string + { + return $this->container['foreignCountry']; + } + + /** + * Sets foreignCountry + * + * @param string|null $foreignCountry foreignCountry + * + * @return $this + */ + public function setForeignCountry(?string $foreignCountry): static + { + if (is_null($foreignCountry)) { + array_push($this->openAPINullablesSetToNull, 'foreignCountry'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('foreignCountry', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($foreignCountry) && (mb_strlen($foreignCountry) > 35)) { + throw new InvalidArgumentException('invalid length for $foreignCountry when calling Address., must be smaller than or equal to 35.'); + } + + $this->container['foreignCountry'] = $foreignCountry; + + return $this; + } + /** * Gets line1 * @@ -592,71 +657,6 @@ public function setPostCode(?string $postCode): static return $this; } - - /** - * Gets country - * - * @return \SynergiTech\Staffology\Model\Country|null - */ - public function getCountry(): ?\SynergiTech\Staffology\Model\Country - { - return $this->container['country']; - } - - /** - * Sets country - * - * @param \SynergiTech\Staffology\Model\Country|null $country country - * - * @return $this - */ - public function setCountry(?\SynergiTech\Staffology\Model\Country $country): static - { - if (is_null($country)) { - throw new InvalidArgumentException('non-nullable country cannot be null'); - } - $this->container['country'] = $country; - - return $this; - } - - /** - * Gets foreignCountry - * - * @return string|null - */ - public function getForeignCountry(): ?string - { - return $this->container['foreignCountry']; - } - - /** - * Sets foreignCountry - * - * @param string|null $foreignCountry foreignCountry - * - * @return $this - */ - public function setForeignCountry(?string $foreignCountry): static - { - if (is_null($foreignCountry)) { - array_push($this->openAPINullablesSetToNull, 'foreignCountry'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('foreignCountry', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($foreignCountry) && (mb_strlen($foreignCountry) > 35)) { - throw new InvalidArgumentException('invalid length for $foreignCountry when calling Address., must be smaller than or equal to 35.'); - } - - $this->container['foreignCountry'] = $foreignCountry; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/AdvancedVarianceReport.php b/src/Model/AdvancedVarianceReport.php index 393346f..a2ed35b 100644 --- a/src/Model/AdvancedVarianceReport.php +++ b/src/Model/AdvancedVarianceReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class AdvancedVarianceReport implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\AdvancedVarianceReportLine[]', 'payCodes' => '\SynergiTech\Staffology\Model\PayCode[]', 'primaryPeriodName' => 'string', - 'secondaryPeriodName' => 'string', 'report' => '\SynergiTech\Staffology\Model\Report', + 'secondaryPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -75,14 +75,14 @@ class AdvancedVarianceReport implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ + 'isDraft' => null, 'lines' => null, 'payCodes' => null, 'primaryPeriodName' => null, - 'secondaryPeriodName' => null, 'report' => null, + 'secondaryPeriodName' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -91,14 +91,14 @@ class AdvancedVarianceReport implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ + 'isDraft' => false, 'lines' => true, 'payCodes' => true, 'primaryPeriodName' => true, - 'secondaryPeriodName' => true, 'report' => false, + 'secondaryPeriodName' => true, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -187,14 +187,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'isDraft' => 'isDraft', 'lines' => 'lines', 'payCodes' => 'payCodes', 'primaryPeriodName' => 'primaryPeriodName', - 'secondaryPeriodName' => 'secondaryPeriodName', 'report' => 'report', + 'secondaryPeriodName' => 'secondaryPeriodName', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -203,14 +203,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', 'payCodes' => 'setPayCodes', 'primaryPeriodName' => 'setPrimaryPeriodName', - 'secondaryPeriodName' => 'setSecondaryPeriodName', 'report' => 'setReport', + 'secondaryPeriodName' => 'setSecondaryPeriodName', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -219,14 +219,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', 'payCodes' => 'getPayCodes', 'primaryPeriodName' => 'getPrimaryPeriodName', - 'secondaryPeriodName' => 'getSecondaryPeriodName', 'report' => 'getReport', + 'secondaryPeriodName' => 'getSecondaryPeriodName', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -285,14 +285,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('payCodes', $data ?? [], null); $this->setIfExists('primaryPeriodName', $data ?? [], null); - $this->setIfExists('secondaryPeriodName', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('secondaryPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -337,6 +337,33 @@ public function valid(): bool } + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + /** * Gets lines * @@ -440,62 +467,62 @@ public function setPrimaryPeriodName(?string $primaryPeriodName): static } /** - * Gets secondaryPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getSecondaryPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['secondaryPeriodName']; + return $this->container['report']; } /** - * Sets secondaryPeriodName + * Sets report * - * @param string|null $secondaryPeriodName secondaryPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setSecondaryPeriodName(?string $secondaryPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($secondaryPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'secondaryPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('secondaryPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['secondaryPeriodName'] = $secondaryPeriodName; + $this->container['report'] = $report; return $this; } /** - * Gets report + * Gets secondaryPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getSecondaryPeriodName(): ?string { - return $this->container['report']; + return $this->container['secondaryPeriodName']; } /** - * Sets report + * Sets secondaryPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $secondaryPeriodName secondaryPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setSecondaryPeriodName(?string $secondaryPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($secondaryPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'secondaryPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('secondaryPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['secondaryPeriodName'] = $secondaryPeriodName; return $this; } @@ -560,33 +587,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/AdvancedVarianceReportLine.php b/src/Model/AdvancedVarianceReportLine.php index 3cc31ff..4fee68b 100644 --- a/src/Model/AdvancedVarianceReportLine.php +++ b/src/Model/AdvancedVarianceReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,25 +59,25 @@ class AdvancedVarianceReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ + 'costCentre' => 'string', + 'department' => 'string', 'employeeCode' => 'string', 'employeeName' => 'string', - 'department' => 'string', - 'costCentre' => 'string', - 'primaryGrossTotal' => 'float', - 'secondaryGrossTotal' => 'float', + 'payCodeVarianceLines' => '\SynergiTech\Staffology\Model\PayCodeVarianceLine[]', + 'primaryEmployeeNi' => 'float', + 'primaryEmployerNi' => 'float', 'primaryGrossTaxable' => 'float', - 'secondaryGrossTaxable' => 'float', + 'primaryGrossTotal' => 'float', 'primaryNetPay' => 'float', - 'secondaryNetPay' => 'float', + 'primaryStudentOrPgLoan' => 'float', 'primaryTax' => 'float', - 'secondaryTax' => 'float', - 'primaryEmployeeNi' => 'float', 'secondaryEmployeeNi' => 'float', - 'primaryEmployerNi' => 'float', 'secondaryEmployerNi' => 'float', - 'primaryStudentOrPgLoan' => 'float', + 'secondaryGrossTaxable' => 'float', + 'secondaryGrossTotal' => 'float', + 'secondaryNetPay' => 'float', 'secondaryStudentOrPgLoan' => 'float', - 'payCodeVarianceLines' => '\SynergiTech\Staffology\Model\PayCodeVarianceLine[]' + 'secondaryTax' => 'float' ]; /** @@ -86,25 +86,25 @@ class AdvancedVarianceReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ + 'costCentre' => null, + 'department' => null, 'employeeCode' => null, 'employeeName' => null, - 'department' => null, - 'costCentre' => null, - 'primaryGrossTotal' => 'double', - 'secondaryGrossTotal' => 'double', + 'payCodeVarianceLines' => null, + 'primaryEmployeeNi' => 'double', + 'primaryEmployerNi' => 'double', 'primaryGrossTaxable' => 'double', - 'secondaryGrossTaxable' => 'double', + 'primaryGrossTotal' => 'double', 'primaryNetPay' => 'double', - 'secondaryNetPay' => 'double', + 'primaryStudentOrPgLoan' => 'double', 'primaryTax' => 'double', - 'secondaryTax' => 'double', - 'primaryEmployeeNi' => 'double', 'secondaryEmployeeNi' => 'double', - 'primaryEmployerNi' => 'double', 'secondaryEmployerNi' => 'double', - 'primaryStudentOrPgLoan' => 'double', + 'secondaryGrossTaxable' => 'double', + 'secondaryGrossTotal' => 'double', + 'secondaryNetPay' => 'double', 'secondaryStudentOrPgLoan' => 'double', - 'payCodeVarianceLines' => null + 'secondaryTax' => 'double' ]; /** @@ -113,25 +113,25 @@ class AdvancedVarianceReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ + 'costCentre' => true, + 'department' => true, 'employeeCode' => true, 'employeeName' => true, - 'department' => true, - 'costCentre' => true, - 'primaryGrossTotal' => true, - 'secondaryGrossTotal' => true, + 'payCodeVarianceLines' => true, + 'primaryEmployeeNi' => true, + 'primaryEmployerNi' => true, 'primaryGrossTaxable' => true, - 'secondaryGrossTaxable' => true, + 'primaryGrossTotal' => true, 'primaryNetPay' => true, - 'secondaryNetPay' => true, + 'primaryStudentOrPgLoan' => true, 'primaryTax' => true, - 'secondaryTax' => true, - 'primaryEmployeeNi' => true, 'secondaryEmployeeNi' => true, - 'primaryEmployerNi' => true, 'secondaryEmployerNi' => true, - 'primaryStudentOrPgLoan' => true, + 'secondaryGrossTaxable' => true, + 'secondaryGrossTotal' => true, + 'secondaryNetPay' => true, 'secondaryStudentOrPgLoan' => true, - 'payCodeVarianceLines' => true + 'secondaryTax' => true ]; /** @@ -220,25 +220,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'costCentre' => 'costCentre', + 'department' => 'department', 'employeeCode' => 'employeeCode', 'employeeName' => 'employeeName', - 'department' => 'department', - 'costCentre' => 'costCentre', - 'primaryGrossTotal' => 'primaryGrossTotal', - 'secondaryGrossTotal' => 'secondaryGrossTotal', + 'payCodeVarianceLines' => 'payCodeVarianceLines', + 'primaryEmployeeNi' => 'primaryEmployeeNi', + 'primaryEmployerNi' => 'primaryEmployerNi', 'primaryGrossTaxable' => 'primaryGrossTaxable', - 'secondaryGrossTaxable' => 'secondaryGrossTaxable', + 'primaryGrossTotal' => 'primaryGrossTotal', 'primaryNetPay' => 'primaryNetPay', - 'secondaryNetPay' => 'secondaryNetPay', + 'primaryStudentOrPgLoan' => 'primaryStudentOrPgLoan', 'primaryTax' => 'primaryTax', - 'secondaryTax' => 'secondaryTax', - 'primaryEmployeeNi' => 'primaryEmployeeNi', 'secondaryEmployeeNi' => 'secondaryEmployeeNi', - 'primaryEmployerNi' => 'primaryEmployerNi', 'secondaryEmployerNi' => 'secondaryEmployerNi', - 'primaryStudentOrPgLoan' => 'primaryStudentOrPgLoan', + 'secondaryGrossTaxable' => 'secondaryGrossTaxable', + 'secondaryGrossTotal' => 'secondaryGrossTotal', + 'secondaryNetPay' => 'secondaryNetPay', 'secondaryStudentOrPgLoan' => 'secondaryStudentOrPgLoan', - 'payCodeVarianceLines' => 'payCodeVarianceLines' + 'secondaryTax' => 'secondaryTax' ]; /** @@ -247,25 +247,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'costCentre' => 'setCostCentre', + 'department' => 'setDepartment', 'employeeCode' => 'setEmployeeCode', 'employeeName' => 'setEmployeeName', - 'department' => 'setDepartment', - 'costCentre' => 'setCostCentre', - 'primaryGrossTotal' => 'setPrimaryGrossTotal', - 'secondaryGrossTotal' => 'setSecondaryGrossTotal', + 'payCodeVarianceLines' => 'setPayCodeVarianceLines', + 'primaryEmployeeNi' => 'setPrimaryEmployeeNi', + 'primaryEmployerNi' => 'setPrimaryEmployerNi', 'primaryGrossTaxable' => 'setPrimaryGrossTaxable', - 'secondaryGrossTaxable' => 'setSecondaryGrossTaxable', + 'primaryGrossTotal' => 'setPrimaryGrossTotal', 'primaryNetPay' => 'setPrimaryNetPay', - 'secondaryNetPay' => 'setSecondaryNetPay', + 'primaryStudentOrPgLoan' => 'setPrimaryStudentOrPgLoan', 'primaryTax' => 'setPrimaryTax', - 'secondaryTax' => 'setSecondaryTax', - 'primaryEmployeeNi' => 'setPrimaryEmployeeNi', 'secondaryEmployeeNi' => 'setSecondaryEmployeeNi', - 'primaryEmployerNi' => 'setPrimaryEmployerNi', 'secondaryEmployerNi' => 'setSecondaryEmployerNi', - 'primaryStudentOrPgLoan' => 'setPrimaryStudentOrPgLoan', + 'secondaryGrossTaxable' => 'setSecondaryGrossTaxable', + 'secondaryGrossTotal' => 'setSecondaryGrossTotal', + 'secondaryNetPay' => 'setSecondaryNetPay', 'secondaryStudentOrPgLoan' => 'setSecondaryStudentOrPgLoan', - 'payCodeVarianceLines' => 'setPayCodeVarianceLines' + 'secondaryTax' => 'setSecondaryTax' ]; /** @@ -274,25 +274,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'costCentre' => 'getCostCentre', + 'department' => 'getDepartment', 'employeeCode' => 'getEmployeeCode', 'employeeName' => 'getEmployeeName', - 'department' => 'getDepartment', - 'costCentre' => 'getCostCentre', - 'primaryGrossTotal' => 'getPrimaryGrossTotal', - 'secondaryGrossTotal' => 'getSecondaryGrossTotal', + 'payCodeVarianceLines' => 'getPayCodeVarianceLines', + 'primaryEmployeeNi' => 'getPrimaryEmployeeNi', + 'primaryEmployerNi' => 'getPrimaryEmployerNi', 'primaryGrossTaxable' => 'getPrimaryGrossTaxable', - 'secondaryGrossTaxable' => 'getSecondaryGrossTaxable', + 'primaryGrossTotal' => 'getPrimaryGrossTotal', 'primaryNetPay' => 'getPrimaryNetPay', - 'secondaryNetPay' => 'getSecondaryNetPay', + 'primaryStudentOrPgLoan' => 'getPrimaryStudentOrPgLoan', 'primaryTax' => 'getPrimaryTax', - 'secondaryTax' => 'getSecondaryTax', - 'primaryEmployeeNi' => 'getPrimaryEmployeeNi', 'secondaryEmployeeNi' => 'getSecondaryEmployeeNi', - 'primaryEmployerNi' => 'getPrimaryEmployerNi', 'secondaryEmployerNi' => 'getSecondaryEmployerNi', - 'primaryStudentOrPgLoan' => 'getPrimaryStudentOrPgLoan', + 'secondaryGrossTaxable' => 'getSecondaryGrossTaxable', + 'secondaryGrossTotal' => 'getSecondaryGrossTotal', + 'secondaryNetPay' => 'getSecondaryNetPay', 'secondaryStudentOrPgLoan' => 'getSecondaryStudentOrPgLoan', - 'payCodeVarianceLines' => 'getPayCodeVarianceLines' + 'secondaryTax' => 'getSecondaryTax' ]; /** @@ -351,25 +351,25 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('costCentre', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); $this->setIfExists('employeeCode', $data ?? [], null); $this->setIfExists('employeeName', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); - $this->setIfExists('costCentre', $data ?? [], null); - $this->setIfExists('primaryGrossTotal', $data ?? [], null); - $this->setIfExists('secondaryGrossTotal', $data ?? [], null); + $this->setIfExists('payCodeVarianceLines', $data ?? [], null); + $this->setIfExists('primaryEmployeeNi', $data ?? [], null); + $this->setIfExists('primaryEmployerNi', $data ?? [], null); $this->setIfExists('primaryGrossTaxable', $data ?? [], null); - $this->setIfExists('secondaryGrossTaxable', $data ?? [], null); + $this->setIfExists('primaryGrossTotal', $data ?? [], null); $this->setIfExists('primaryNetPay', $data ?? [], null); - $this->setIfExists('secondaryNetPay', $data ?? [], null); + $this->setIfExists('primaryStudentOrPgLoan', $data ?? [], null); $this->setIfExists('primaryTax', $data ?? [], null); - $this->setIfExists('secondaryTax', $data ?? [], null); - $this->setIfExists('primaryEmployeeNi', $data ?? [], null); $this->setIfExists('secondaryEmployeeNi', $data ?? [], null); - $this->setIfExists('primaryEmployerNi', $data ?? [], null); $this->setIfExists('secondaryEmployerNi', $data ?? [], null); - $this->setIfExists('primaryStudentOrPgLoan', $data ?? [], null); + $this->setIfExists('secondaryGrossTaxable', $data ?? [], null); + $this->setIfExists('secondaryGrossTotal', $data ?? [], null); + $this->setIfExists('secondaryNetPay', $data ?? [], null); $this->setIfExists('secondaryStudentOrPgLoan', $data ?? [], null); - $this->setIfExists('payCodeVarianceLines', $data ?? [], null); + $this->setIfExists('secondaryTax', $data ?? [], null); } /** @@ -415,205 +415,239 @@ public function valid(): bool /** - * Gets employeeCode + * Gets costCentre * * @return string|null */ - public function getEmployeeCode(): ?string + public function getCostCentre(): ?string { - return $this->container['employeeCode']; + return $this->container['costCentre']; } /** - * Sets employeeCode + * Sets costCentre * - * @param string|null $employeeCode employeeCode + * @param string|null $costCentre costCentre * * @return $this */ - public function setEmployeeCode(?string $employeeCode): static + public function setCostCentre(?string $costCentre): static { - if (is_null($employeeCode)) { - array_push($this->openAPINullablesSetToNull, 'employeeCode'); + if (is_null($costCentre)) { + array_push($this->openAPINullablesSetToNull, 'costCentre'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeeCode', $nullablesSetToNull); + $index = array_search('costCentre', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employeeCode'] = $employeeCode; + $this->container['costCentre'] = $costCentre; return $this; } /** - * Gets employeeName + * Gets department * * @return string|null */ - public function getEmployeeName(): ?string + public function getDepartment(): ?string { - return $this->container['employeeName']; + return $this->container['department']; } /** - * Sets employeeName + * Sets department * - * @param string|null $employeeName employeeName + * @param string|null $department department * * @return $this */ - public function setEmployeeName(?string $employeeName): static + public function setDepartment(?string $department): static { - if (is_null($employeeName)) { - array_push($this->openAPINullablesSetToNull, 'employeeName'); + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeeName', $nullablesSetToNull); + $index = array_search('department', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employeeName'] = $employeeName; + $this->container['department'] = $department; return $this; } /** - * Gets department + * Gets employeeCode * * @return string|null */ - public function getDepartment(): ?string + public function getEmployeeCode(): ?string { - return $this->container['department']; + return $this->container['employeeCode']; } /** - * Sets department + * Sets employeeCode * - * @param string|null $department department + * @param string|null $employeeCode employeeCode * * @return $this */ - public function setDepartment(?string $department): static + public function setEmployeeCode(?string $employeeCode): static { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); + if (is_null($employeeCode)) { + array_push($this->openAPINullablesSetToNull, 'employeeCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); + $index = array_search('employeeCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['department'] = $department; + $this->container['employeeCode'] = $employeeCode; return $this; } /** - * Gets costCentre + * Gets employeeName * * @return string|null */ - public function getCostCentre(): ?string + public function getEmployeeName(): ?string { - return $this->container['costCentre']; + return $this->container['employeeName']; } /** - * Sets costCentre + * Sets employeeName * - * @param string|null $costCentre costCentre + * @param string|null $employeeName employeeName * * @return $this */ - public function setCostCentre(?string $costCentre): static + public function setEmployeeName(?string $employeeName): static { - if (is_null($costCentre)) { - array_push($this->openAPINullablesSetToNull, 'costCentre'); + if (is_null($employeeName)) { + array_push($this->openAPINullablesSetToNull, 'employeeName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costCentre', $nullablesSetToNull); + $index = array_search('employeeName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costCentre'] = $costCentre; + $this->container['employeeName'] = $employeeName; return $this; } /** - * Gets primaryGrossTotal + * Gets payCodeVarianceLines + * + * @return \SynergiTech\Staffology\Model\PayCodeVarianceLine[]|null + */ + public function getPayCodeVarianceLines(): ?array + { + return $this->container['payCodeVarianceLines']; + } + + /** + * Sets payCodeVarianceLines + * + * @param \SynergiTech\Staffology\Model\PayCodeVarianceLine[]|null $payCodeVarianceLines payCodeVarianceLines + * + * @return $this + */ + public function setPayCodeVarianceLines(?array $payCodeVarianceLines): static + { + if (is_null($payCodeVarianceLines)) { + array_push($this->openAPINullablesSetToNull, 'payCodeVarianceLines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCodeVarianceLines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payCodeVarianceLines'] = $payCodeVarianceLines; + + return $this; + } + + /** + * Gets primaryEmployeeNi * * @return float|null */ - public function getPrimaryGrossTotal(): ?float + public function getPrimaryEmployeeNi(): ?float { - return $this->container['primaryGrossTotal']; + return $this->container['primaryEmployeeNi']; } /** - * Sets primaryGrossTotal + * Sets primaryEmployeeNi * - * @param float|null $primaryGrossTotal primaryGrossTotal + * @param float|null $primaryEmployeeNi primaryEmployeeNi * * @return $this */ - public function setPrimaryGrossTotal(?float $primaryGrossTotal): static + public function setPrimaryEmployeeNi(?float $primaryEmployeeNi): static { - if (is_null($primaryGrossTotal)) { - array_push($this->openAPINullablesSetToNull, 'primaryGrossTotal'); + if (is_null($primaryEmployeeNi)) { + array_push($this->openAPINullablesSetToNull, 'primaryEmployeeNi'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('primaryGrossTotal', $nullablesSetToNull); + $index = array_search('primaryEmployeeNi', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['primaryGrossTotal'] = $primaryGrossTotal; + $this->container['primaryEmployeeNi'] = $primaryEmployeeNi; return $this; } /** - * Gets secondaryGrossTotal + * Gets primaryEmployerNi * * @return float|null */ - public function getSecondaryGrossTotal(): ?float + public function getPrimaryEmployerNi(): ?float { - return $this->container['secondaryGrossTotal']; + return $this->container['primaryEmployerNi']; } /** - * Sets secondaryGrossTotal + * Sets primaryEmployerNi * - * @param float|null $secondaryGrossTotal secondaryGrossTotal + * @param float|null $primaryEmployerNi primaryEmployerNi * * @return $this */ - public function setSecondaryGrossTotal(?float $secondaryGrossTotal): static + public function setPrimaryEmployerNi(?float $primaryEmployerNi): static { - if (is_null($secondaryGrossTotal)) { - array_push($this->openAPINullablesSetToNull, 'secondaryGrossTotal'); + if (is_null($primaryEmployerNi)) { + array_push($this->openAPINullablesSetToNull, 'primaryEmployerNi'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('secondaryGrossTotal', $nullablesSetToNull); + $index = array_search('primaryEmployerNi', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['secondaryGrossTotal'] = $secondaryGrossTotal; + $this->container['primaryEmployerNi'] = $primaryEmployerNi; return $this; } @@ -653,35 +687,35 @@ public function setPrimaryGrossTaxable(?float $primaryGrossTaxable): static } /** - * Gets secondaryGrossTaxable + * Gets primaryGrossTotal * * @return float|null */ - public function getSecondaryGrossTaxable(): ?float + public function getPrimaryGrossTotal(): ?float { - return $this->container['secondaryGrossTaxable']; + return $this->container['primaryGrossTotal']; } /** - * Sets secondaryGrossTaxable + * Sets primaryGrossTotal * - * @param float|null $secondaryGrossTaxable secondaryGrossTaxable + * @param float|null $primaryGrossTotal primaryGrossTotal * * @return $this */ - public function setSecondaryGrossTaxable(?float $secondaryGrossTaxable): static + public function setPrimaryGrossTotal(?float $primaryGrossTotal): static { - if (is_null($secondaryGrossTaxable)) { - array_push($this->openAPINullablesSetToNull, 'secondaryGrossTaxable'); + if (is_null($primaryGrossTotal)) { + array_push($this->openAPINullablesSetToNull, 'primaryGrossTotal'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('secondaryGrossTaxable', $nullablesSetToNull); + $index = array_search('primaryGrossTotal', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['secondaryGrossTaxable'] = $secondaryGrossTaxable; + $this->container['primaryGrossTotal'] = $primaryGrossTotal; return $this; } @@ -721,35 +755,35 @@ public function setPrimaryNetPay(?float $primaryNetPay): static } /** - * Gets secondaryNetPay + * Gets primaryStudentOrPgLoan * * @return float|null */ - public function getSecondaryNetPay(): ?float + public function getPrimaryStudentOrPgLoan(): ?float { - return $this->container['secondaryNetPay']; + return $this->container['primaryStudentOrPgLoan']; } /** - * Sets secondaryNetPay + * Sets primaryStudentOrPgLoan * - * @param float|null $secondaryNetPay secondaryNetPay + * @param float|null $primaryStudentOrPgLoan primaryStudentOrPgLoan * * @return $this */ - public function setSecondaryNetPay(?float $secondaryNetPay): static + public function setPrimaryStudentOrPgLoan(?float $primaryStudentOrPgLoan): static { - if (is_null($secondaryNetPay)) { - array_push($this->openAPINullablesSetToNull, 'secondaryNetPay'); + if (is_null($primaryStudentOrPgLoan)) { + array_push($this->openAPINullablesSetToNull, 'primaryStudentOrPgLoan'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('secondaryNetPay', $nullablesSetToNull); + $index = array_search('primaryStudentOrPgLoan', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['secondaryNetPay'] = $secondaryNetPay; + $this->container['primaryStudentOrPgLoan'] = $primaryStudentOrPgLoan; return $this; } @@ -789,205 +823,171 @@ public function setPrimaryTax(?float $primaryTax): static } /** - * Gets secondaryTax - * - * @return float|null - */ - public function getSecondaryTax(): ?float - { - return $this->container['secondaryTax']; - } - - /** - * Sets secondaryTax - * - * @param float|null $secondaryTax secondaryTax - * - * @return $this - */ - public function setSecondaryTax(?float $secondaryTax): static - { - if (is_null($secondaryTax)) { - array_push($this->openAPINullablesSetToNull, 'secondaryTax'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('secondaryTax', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['secondaryTax'] = $secondaryTax; - - return $this; - } - - /** - * Gets primaryEmployeeNi + * Gets secondaryEmployeeNi * * @return float|null */ - public function getPrimaryEmployeeNi(): ?float + public function getSecondaryEmployeeNi(): ?float { - return $this->container['primaryEmployeeNi']; + return $this->container['secondaryEmployeeNi']; } /** - * Sets primaryEmployeeNi + * Sets secondaryEmployeeNi * - * @param float|null $primaryEmployeeNi primaryEmployeeNi + * @param float|null $secondaryEmployeeNi secondaryEmployeeNi * * @return $this */ - public function setPrimaryEmployeeNi(?float $primaryEmployeeNi): static + public function setSecondaryEmployeeNi(?float $secondaryEmployeeNi): static { - if (is_null($primaryEmployeeNi)) { - array_push($this->openAPINullablesSetToNull, 'primaryEmployeeNi'); + if (is_null($secondaryEmployeeNi)) { + array_push($this->openAPINullablesSetToNull, 'secondaryEmployeeNi'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('primaryEmployeeNi', $nullablesSetToNull); + $index = array_search('secondaryEmployeeNi', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['primaryEmployeeNi'] = $primaryEmployeeNi; + $this->container['secondaryEmployeeNi'] = $secondaryEmployeeNi; return $this; } /** - * Gets secondaryEmployeeNi + * Gets secondaryEmployerNi * * @return float|null */ - public function getSecondaryEmployeeNi(): ?float + public function getSecondaryEmployerNi(): ?float { - return $this->container['secondaryEmployeeNi']; + return $this->container['secondaryEmployerNi']; } /** - * Sets secondaryEmployeeNi + * Sets secondaryEmployerNi * - * @param float|null $secondaryEmployeeNi secondaryEmployeeNi + * @param float|null $secondaryEmployerNi secondaryEmployerNi * * @return $this */ - public function setSecondaryEmployeeNi(?float $secondaryEmployeeNi): static + public function setSecondaryEmployerNi(?float $secondaryEmployerNi): static { - if (is_null($secondaryEmployeeNi)) { - array_push($this->openAPINullablesSetToNull, 'secondaryEmployeeNi'); + if (is_null($secondaryEmployerNi)) { + array_push($this->openAPINullablesSetToNull, 'secondaryEmployerNi'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('secondaryEmployeeNi', $nullablesSetToNull); + $index = array_search('secondaryEmployerNi', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['secondaryEmployeeNi'] = $secondaryEmployeeNi; + $this->container['secondaryEmployerNi'] = $secondaryEmployerNi; return $this; } /** - * Gets primaryEmployerNi + * Gets secondaryGrossTaxable * * @return float|null */ - public function getPrimaryEmployerNi(): ?float + public function getSecondaryGrossTaxable(): ?float { - return $this->container['primaryEmployerNi']; + return $this->container['secondaryGrossTaxable']; } /** - * Sets primaryEmployerNi + * Sets secondaryGrossTaxable * - * @param float|null $primaryEmployerNi primaryEmployerNi + * @param float|null $secondaryGrossTaxable secondaryGrossTaxable * * @return $this */ - public function setPrimaryEmployerNi(?float $primaryEmployerNi): static + public function setSecondaryGrossTaxable(?float $secondaryGrossTaxable): static { - if (is_null($primaryEmployerNi)) { - array_push($this->openAPINullablesSetToNull, 'primaryEmployerNi'); + if (is_null($secondaryGrossTaxable)) { + array_push($this->openAPINullablesSetToNull, 'secondaryGrossTaxable'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('primaryEmployerNi', $nullablesSetToNull); + $index = array_search('secondaryGrossTaxable', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['primaryEmployerNi'] = $primaryEmployerNi; + $this->container['secondaryGrossTaxable'] = $secondaryGrossTaxable; return $this; } /** - * Gets secondaryEmployerNi + * Gets secondaryGrossTotal * * @return float|null */ - public function getSecondaryEmployerNi(): ?float + public function getSecondaryGrossTotal(): ?float { - return $this->container['secondaryEmployerNi']; + return $this->container['secondaryGrossTotal']; } /** - * Sets secondaryEmployerNi + * Sets secondaryGrossTotal * - * @param float|null $secondaryEmployerNi secondaryEmployerNi + * @param float|null $secondaryGrossTotal secondaryGrossTotal * * @return $this */ - public function setSecondaryEmployerNi(?float $secondaryEmployerNi): static + public function setSecondaryGrossTotal(?float $secondaryGrossTotal): static { - if (is_null($secondaryEmployerNi)) { - array_push($this->openAPINullablesSetToNull, 'secondaryEmployerNi'); + if (is_null($secondaryGrossTotal)) { + array_push($this->openAPINullablesSetToNull, 'secondaryGrossTotal'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('secondaryEmployerNi', $nullablesSetToNull); + $index = array_search('secondaryGrossTotal', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['secondaryEmployerNi'] = $secondaryEmployerNi; + $this->container['secondaryGrossTotal'] = $secondaryGrossTotal; return $this; } /** - * Gets primaryStudentOrPgLoan + * Gets secondaryNetPay * * @return float|null */ - public function getPrimaryStudentOrPgLoan(): ?float + public function getSecondaryNetPay(): ?float { - return $this->container['primaryStudentOrPgLoan']; + return $this->container['secondaryNetPay']; } /** - * Sets primaryStudentOrPgLoan + * Sets secondaryNetPay * - * @param float|null $primaryStudentOrPgLoan primaryStudentOrPgLoan + * @param float|null $secondaryNetPay secondaryNetPay * * @return $this */ - public function setPrimaryStudentOrPgLoan(?float $primaryStudentOrPgLoan): static + public function setSecondaryNetPay(?float $secondaryNetPay): static { - if (is_null($primaryStudentOrPgLoan)) { - array_push($this->openAPINullablesSetToNull, 'primaryStudentOrPgLoan'); + if (is_null($secondaryNetPay)) { + array_push($this->openAPINullablesSetToNull, 'secondaryNetPay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('primaryStudentOrPgLoan', $nullablesSetToNull); + $index = array_search('secondaryNetPay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['primaryStudentOrPgLoan'] = $primaryStudentOrPgLoan; + $this->container['secondaryNetPay'] = $secondaryNetPay; return $this; } @@ -1027,35 +1027,35 @@ public function setSecondaryStudentOrPgLoan(?float $secondaryStudentOrPgLoan): s } /** - * Gets payCodeVarianceLines + * Gets secondaryTax * - * @return \SynergiTech\Staffology\Model\PayCodeVarianceLine[]|null + * @return float|null */ - public function getPayCodeVarianceLines(): ?array + public function getSecondaryTax(): ?float { - return $this->container['payCodeVarianceLines']; + return $this->container['secondaryTax']; } /** - * Sets payCodeVarianceLines + * Sets secondaryTax * - * @param \SynergiTech\Staffology\Model\PayCodeVarianceLine[]|null $payCodeVarianceLines payCodeVarianceLines + * @param float|null $secondaryTax secondaryTax * * @return $this */ - public function setPayCodeVarianceLines(?array $payCodeVarianceLines): static + public function setSecondaryTax(?float $secondaryTax): static { - if (is_null($payCodeVarianceLines)) { - array_push($this->openAPINullablesSetToNull, 'payCodeVarianceLines'); + if (is_null($secondaryTax)) { + array_push($this->openAPINullablesSetToNull, 'secondaryTax'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCodeVarianceLines', $nullablesSetToNull); + $index = array_search('secondaryTax', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payCodeVarianceLines'] = $payCodeVarianceLines; + $this->container['secondaryTax'] = $secondaryTax; return $this; } diff --git a/src/Model/AdvancedVarianceReportReportResponse.php b/src/Model/AdvancedVarianceReportReportResponse.php index 028b123..0229421 100644 --- a/src/Model/AdvancedVarianceReportReportResponse.php +++ b/src/Model/AdvancedVarianceReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class AdvancedVarianceReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\AdvancedVarianceReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class AdvancedVarianceReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class AdvancedVarianceReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/AeAction.php b/src/Model/AeAction.php index fff38f2..610c7e2 100644 --- a/src/Model/AeAction.php +++ b/src/Model/AeAction.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -48,6 +48,12 @@ enum AeAction: string case POSTPONE = 'Postpone'; case RE_ENROL = 'ReEnrol'; + + case ADD_TO_PENSION = 'AddToPension'; + + case OPT_OUT = 'OptOut'; + + case CEASE_MEMBERSHIP = 'CeaseMembership'; } diff --git a/src/Model/AeAssessment.php b/src/Model/AeAssessment.php index 0df628e..ede2a72 100644 --- a/src/Model/AeAssessment.php +++ b/src/Model/AeAssessment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,24 +60,25 @@ class AeAssessment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'action' => '\SynergiTech\Staffology\Model\AeAssessmentAction', + 'aeExclusionCode' => '\SynergiTech\Staffology\Model\AeExclusionCode', + 'age' => 'int', 'assessmentDate' => '\DateTime', + 'earningsInPeriod' => 'float', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'employeeState' => '\SynergiTech\Staffology\Model\AeEmployeeState', - 'age' => 'int', - 'ukWorker' => '\SynergiTech\Staffology\Model\AeUKWorker', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'endPayRunEntryId' => 'int', + 'endReportingType' => '\SynergiTech\Staffology\Model\PensionReportingType', + 'id' => 'string', 'ordinal' => 'int', - 'earningsInPeriod' => 'float', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'payRunVersion' => 'int', 'qualifyingEarningsInPeriod' => 'float', - 'aeExclusionCode' => '\SynergiTech\Staffology\Model\AeExclusionCode', - 'status' => '\SynergiTech\Staffology\Model\AeStatus', 'reason' => 'string', - 'action' => '\SynergiTech\Staffology\Model\AeAssessmentAction', - 'startReportingType' => '\SynergiTech\Staffology\Model\PensionReportingType', - 'endReportingType' => '\SynergiTech\Staffology\Model\PensionReportingType', 'startPayRunEntryId' => 'int', - 'endPayRunEntryId' => 'int', - 'employee' => '\SynergiTech\Staffology\Model\Item', - 'id' => 'string' + 'startReportingType' => '\SynergiTech\Staffology\Model\PensionReportingType', + 'status' => '\SynergiTech\Staffology\Model\AeStatus', + 'ukWorker' => '\SynergiTech\Staffology\Model\AeUKWorker' ]; /** @@ -86,24 +87,25 @@ class AeAssessment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'action' => null, + 'aeExclusionCode' => null, + 'age' => 'int32', 'assessmentDate' => 'date-time', + 'earningsInPeriod' => 'double', + 'employee' => null, 'employeeState' => null, - 'age' => 'int32', - 'ukWorker' => null, - 'payPeriod' => null, + 'endPayRunEntryId' => 'int32', + 'endReportingType' => null, + 'id' => 'uuid', 'ordinal' => 'int32', - 'earningsInPeriod' => 'double', + 'payPeriod' => null, + 'payRunVersion' => 'int32', 'qualifyingEarningsInPeriod' => 'double', - 'aeExclusionCode' => null, - 'status' => null, 'reason' => null, - 'action' => null, - 'startReportingType' => null, - 'endReportingType' => null, 'startPayRunEntryId' => 'int32', - 'endPayRunEntryId' => 'int32', - 'employee' => null, - 'id' => 'uuid' + 'startReportingType' => null, + 'status' => null, + 'ukWorker' => null ]; /** @@ -112,24 +114,25 @@ class AeAssessment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'action' => false, + 'aeExclusionCode' => false, + 'age' => false, 'assessmentDate' => false, + 'earningsInPeriod' => false, + 'employee' => false, 'employeeState' => false, - 'age' => false, - 'ukWorker' => false, - 'payPeriod' => false, + 'endPayRunEntryId' => true, + 'endReportingType' => false, + 'id' => false, 'ordinal' => false, - 'earningsInPeriod' => false, + 'payPeriod' => false, + 'payRunVersion' => false, 'qualifyingEarningsInPeriod' => false, - 'aeExclusionCode' => false, - 'status' => false, 'reason' => true, - 'action' => false, - 'startReportingType' => false, - 'endReportingType' => false, 'startPayRunEntryId' => true, - 'endPayRunEntryId' => true, - 'employee' => false, - 'id' => false + 'startReportingType' => false, + 'status' => false, + 'ukWorker' => false ]; /** @@ -218,24 +221,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'action' => 'action', + 'aeExclusionCode' => 'aeExclusionCode', + 'age' => 'age', 'assessmentDate' => 'assessmentDate', + 'earningsInPeriod' => 'earningsInPeriod', + 'employee' => 'employee', 'employeeState' => 'employeeState', - 'age' => 'age', - 'ukWorker' => 'ukWorker', - 'payPeriod' => 'payPeriod', + 'endPayRunEntryId' => 'endPayRunEntryId', + 'endReportingType' => 'endReportingType', + 'id' => 'id', 'ordinal' => 'ordinal', - 'earningsInPeriod' => 'earningsInPeriod', + 'payPeriod' => 'payPeriod', + 'payRunVersion' => 'payRunVersion', 'qualifyingEarningsInPeriod' => 'qualifyingEarningsInPeriod', - 'aeExclusionCode' => 'aeExclusionCode', - 'status' => 'status', 'reason' => 'reason', - 'action' => 'action', - 'startReportingType' => 'startReportingType', - 'endReportingType' => 'endReportingType', 'startPayRunEntryId' => 'startPayRunEntryId', - 'endPayRunEntryId' => 'endPayRunEntryId', - 'employee' => 'employee', - 'id' => 'id' + 'startReportingType' => 'startReportingType', + 'status' => 'status', + 'ukWorker' => 'ukWorker' ]; /** @@ -244,24 +248,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'action' => 'setAction', + 'aeExclusionCode' => 'setAeExclusionCode', + 'age' => 'setAge', 'assessmentDate' => 'setAssessmentDate', + 'earningsInPeriod' => 'setEarningsInPeriod', + 'employee' => 'setEmployee', 'employeeState' => 'setEmployeeState', - 'age' => 'setAge', - 'ukWorker' => 'setUkWorker', - 'payPeriod' => 'setPayPeriod', + 'endPayRunEntryId' => 'setEndPayRunEntryId', + 'endReportingType' => 'setEndReportingType', + 'id' => 'setId', 'ordinal' => 'setOrdinal', - 'earningsInPeriod' => 'setEarningsInPeriod', + 'payPeriod' => 'setPayPeriod', + 'payRunVersion' => 'setPayRunVersion', 'qualifyingEarningsInPeriod' => 'setQualifyingEarningsInPeriod', - 'aeExclusionCode' => 'setAeExclusionCode', - 'status' => 'setStatus', 'reason' => 'setReason', - 'action' => 'setAction', - 'startReportingType' => 'setStartReportingType', - 'endReportingType' => 'setEndReportingType', 'startPayRunEntryId' => 'setStartPayRunEntryId', - 'endPayRunEntryId' => 'setEndPayRunEntryId', - 'employee' => 'setEmployee', - 'id' => 'setId' + 'startReportingType' => 'setStartReportingType', + 'status' => 'setStatus', + 'ukWorker' => 'setUkWorker' ]; /** @@ -270,24 +275,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'action' => 'getAction', + 'aeExclusionCode' => 'getAeExclusionCode', + 'age' => 'getAge', 'assessmentDate' => 'getAssessmentDate', + 'earningsInPeriod' => 'getEarningsInPeriod', + 'employee' => 'getEmployee', 'employeeState' => 'getEmployeeState', - 'age' => 'getAge', - 'ukWorker' => 'getUkWorker', - 'payPeriod' => 'getPayPeriod', + 'endPayRunEntryId' => 'getEndPayRunEntryId', + 'endReportingType' => 'getEndReportingType', + 'id' => 'getId', 'ordinal' => 'getOrdinal', - 'earningsInPeriod' => 'getEarningsInPeriod', + 'payPeriod' => 'getPayPeriod', + 'payRunVersion' => 'getPayRunVersion', 'qualifyingEarningsInPeriod' => 'getQualifyingEarningsInPeriod', - 'aeExclusionCode' => 'getAeExclusionCode', - 'status' => 'getStatus', 'reason' => 'getReason', - 'action' => 'getAction', - 'startReportingType' => 'getStartReportingType', - 'endReportingType' => 'getEndReportingType', 'startPayRunEntryId' => 'getStartPayRunEntryId', - 'endPayRunEntryId' => 'getEndPayRunEntryId', - 'employee' => 'getEmployee', - 'id' => 'getId' + 'startReportingType' => 'getStartReportingType', + 'status' => 'getStatus', + 'ukWorker' => 'getUkWorker' ]; /** @@ -346,24 +352,25 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('action', $data ?? [], null); + $this->setIfExists('aeExclusionCode', $data ?? [], null); + $this->setIfExists('age', $data ?? [], null); $this->setIfExists('assessmentDate', $data ?? [], null); + $this->setIfExists('earningsInPeriod', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('employeeState', $data ?? [], null); - $this->setIfExists('age', $data ?? [], null); - $this->setIfExists('ukWorker', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('endPayRunEntryId', $data ?? [], null); + $this->setIfExists('endReportingType', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); - $this->setIfExists('earningsInPeriod', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('payRunVersion', $data ?? [], null); $this->setIfExists('qualifyingEarningsInPeriod', $data ?? [], null); - $this->setIfExists('aeExclusionCode', $data ?? [], null); - $this->setIfExists('status', $data ?? [], null); $this->setIfExists('reason', $data ?? [], null); - $this->setIfExists('action', $data ?? [], null); - $this->setIfExists('startReportingType', $data ?? [], null); - $this->setIfExists('endReportingType', $data ?? [], null); $this->setIfExists('startPayRunEntryId', $data ?? [], null); - $this->setIfExists('endPayRunEntryId', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('startReportingType', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('ukWorker', $data ?? [], null); } /** @@ -409,55 +416,55 @@ public function valid(): bool /** - * Gets assessmentDate + * Gets action * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\AeAssessmentAction|null */ - public function getAssessmentDate(): ?\DateTime + public function getAction(): ?\SynergiTech\Staffology\Model\AeAssessmentAction { - return $this->container['assessmentDate']; + return $this->container['action']; } /** - * Sets assessmentDate + * Sets action * - * @param \DateTime|null $assessmentDate assessmentDate + * @param \SynergiTech\Staffology\Model\AeAssessmentAction|null $action action * * @return $this */ - public function setAssessmentDate(?\DateTime $assessmentDate): static + public function setAction(?\SynergiTech\Staffology\Model\AeAssessmentAction $action): static { - if (is_null($assessmentDate)) { - throw new InvalidArgumentException('non-nullable assessmentDate cannot be null'); + if (is_null($action)) { + throw new InvalidArgumentException('non-nullable action cannot be null'); } - $this->container['assessmentDate'] = $assessmentDate; + $this->container['action'] = $action; return $this; } /** - * Gets employeeState + * Gets aeExclusionCode * - * @return \SynergiTech\Staffology\Model\AeEmployeeState|null + * @return \SynergiTech\Staffology\Model\AeExclusionCode|null */ - public function getEmployeeState(): ?\SynergiTech\Staffology\Model\AeEmployeeState + public function getAeExclusionCode(): ?\SynergiTech\Staffology\Model\AeExclusionCode { - return $this->container['employeeState']; + return $this->container['aeExclusionCode']; } /** - * Sets employeeState + * Sets aeExclusionCode * - * @param \SynergiTech\Staffology\Model\AeEmployeeState|null $employeeState employeeState + * @param \SynergiTech\Staffology\Model\AeExclusionCode|null $aeExclusionCode aeExclusionCode * * @return $this */ - public function setEmployeeState(?\SynergiTech\Staffology\Model\AeEmployeeState $employeeState): static + public function setAeExclusionCode(?\SynergiTech\Staffology\Model\AeExclusionCode $aeExclusionCode): static { - if (is_null($employeeState)) { - throw new InvalidArgumentException('non-nullable employeeState cannot be null'); + if (is_null($aeExclusionCode)) { + throw new InvalidArgumentException('non-nullable aeExclusionCode cannot be null'); } - $this->container['employeeState'] = $employeeState; + $this->container['aeExclusionCode'] = $aeExclusionCode; return $this; } @@ -490,305 +497,339 @@ public function setAge(?int $age): static } /** - * Gets ukWorker + * Gets assessmentDate * - * @return \SynergiTech\Staffology\Model\AeUKWorker|null + * @return \DateTime|null */ - public function getUkWorker(): ?\SynergiTech\Staffology\Model\AeUKWorker + public function getAssessmentDate(): ?\DateTime { - return $this->container['ukWorker']; + return $this->container['assessmentDate']; } /** - * Sets ukWorker + * Sets assessmentDate * - * @param \SynergiTech\Staffology\Model\AeUKWorker|null $ukWorker ukWorker + * @param \DateTime|null $assessmentDate assessmentDate * * @return $this */ - public function setUkWorker(?\SynergiTech\Staffology\Model\AeUKWorker $ukWorker): static + public function setAssessmentDate(?\DateTime $assessmentDate): static { - if (is_null($ukWorker)) { - throw new InvalidArgumentException('non-nullable ukWorker cannot be null'); + if (is_null($assessmentDate)) { + throw new InvalidArgumentException('non-nullable assessmentDate cannot be null'); } - $this->container['ukWorker'] = $ukWorker; + $this->container['assessmentDate'] = $assessmentDate; return $this; } /** - * Gets payPeriod + * Gets earningsInPeriod * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return float|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getEarningsInPeriod(): ?float { - return $this->container['payPeriod']; + return $this->container['earningsInPeriod']; } /** - * Sets payPeriod + * Sets earningsInPeriod * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param float|null $earningsInPeriod [readonly] * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setEarningsInPeriod(?float $earningsInPeriod): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($earningsInPeriod)) { + throw new InvalidArgumentException('non-nullable earningsInPeriod cannot be null'); } - $this->container['payPeriod'] = $payPeriod; + $this->container['earningsInPeriod'] = $earningsInPeriod; return $this; } /** - * Gets ordinal + * Gets employee * - * @return int|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getOrdinal(): ?int + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['ordinal']; + return $this->container['employee']; } /** - * Sets ordinal + * Sets employee * - * @param int|null $ordinal [readonly] The PaySchedule ordinal for the Employee at the time of the assessment + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setOrdinal(?int $ordinal): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['ordinal'] = $ordinal; + $this->container['employee'] = $employee; return $this; } /** - * Gets earningsInPeriod + * Gets employeeState * - * @return float|null + * @return \SynergiTech\Staffology\Model\AeEmployeeState|null */ - public function getEarningsInPeriod(): ?float + public function getEmployeeState(): ?\SynergiTech\Staffology\Model\AeEmployeeState { - return $this->container['earningsInPeriod']; + return $this->container['employeeState']; } /** - * Sets earningsInPeriod + * Sets employeeState * - * @param float|null $earningsInPeriod [readonly] + * @param \SynergiTech\Staffology\Model\AeEmployeeState|null $employeeState employeeState * * @return $this */ - public function setEarningsInPeriod(?float $earningsInPeriod): static + public function setEmployeeState(?\SynergiTech\Staffology\Model\AeEmployeeState $employeeState): static { - if (is_null($earningsInPeriod)) { - throw new InvalidArgumentException('non-nullable earningsInPeriod cannot be null'); + if (is_null($employeeState)) { + throw new InvalidArgumentException('non-nullable employeeState cannot be null'); } - $this->container['earningsInPeriod'] = $earningsInPeriod; + $this->container['employeeState'] = $employeeState; return $this; } /** - * Gets qualifyingEarningsInPeriod + * Gets endPayRunEntryId * - * @return float|null + * @return int|null */ - public function getQualifyingEarningsInPeriod(): ?float + public function getEndPayRunEntryId(): ?int { - return $this->container['qualifyingEarningsInPeriod']; + return $this->container['endPayRunEntryId']; } /** - * Sets qualifyingEarningsInPeriod + * Sets endPayRunEntryId * - * @param float|null $qualifyingEarningsInPeriod [readonly] + * @param int|null $endPayRunEntryId endPayRunEntryId * * @return $this */ - public function setQualifyingEarningsInPeriod(?float $qualifyingEarningsInPeriod): static + public function setEndPayRunEntryId(?int $endPayRunEntryId): static { - if (is_null($qualifyingEarningsInPeriod)) { - throw new InvalidArgumentException('non-nullable qualifyingEarningsInPeriod cannot be null'); + if (is_null($endPayRunEntryId)) { + array_push($this->openAPINullablesSetToNull, 'endPayRunEntryId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endPayRunEntryId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['qualifyingEarningsInPeriod'] = $qualifyingEarningsInPeriod; + $this->container['endPayRunEntryId'] = $endPayRunEntryId; return $this; } /** - * Gets aeExclusionCode + * Gets endReportingType * - * @return \SynergiTech\Staffology\Model\AeExclusionCode|null + * @return \SynergiTech\Staffology\Model\PensionReportingType|null */ - public function getAeExclusionCode(): ?\SynergiTech\Staffology\Model\AeExclusionCode + public function getEndReportingType(): ?\SynergiTech\Staffology\Model\PensionReportingType { - return $this->container['aeExclusionCode']; + return $this->container['endReportingType']; } /** - * Sets aeExclusionCode + * Sets endReportingType * - * @param \SynergiTech\Staffology\Model\AeExclusionCode|null $aeExclusionCode aeExclusionCode + * @param \SynergiTech\Staffology\Model\PensionReportingType|null $endReportingType endReportingType * * @return $this */ - public function setAeExclusionCode(?\SynergiTech\Staffology\Model\AeExclusionCode $aeExclusionCode): static + public function setEndReportingType(?\SynergiTech\Staffology\Model\PensionReportingType $endReportingType): static { - if (is_null($aeExclusionCode)) { - throw new InvalidArgumentException('non-nullable aeExclusionCode cannot be null'); + if (is_null($endReportingType)) { + throw new InvalidArgumentException('non-nullable endReportingType cannot be null'); } - $this->container['aeExclusionCode'] = $aeExclusionCode; + $this->container['endReportingType'] = $endReportingType; return $this; } /** - * Gets status + * Gets id * - * @return \SynergiTech\Staffology\Model\AeStatus|null + * @return string|null */ - public function getStatus(): ?\SynergiTech\Staffology\Model\AeStatus + public function getId(): ?string { - return $this->container['status']; + return $this->container['id']; } /** - * Sets status + * Sets id * - * @param \SynergiTech\Staffology\Model\AeStatus|null $status status + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setStatus(?\SynergiTech\Staffology\Model\AeStatus $status): static + public function setId(?string $id): static { - if (is_null($status)) { - throw new InvalidArgumentException('non-nullable status cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['status'] = $status; + $this->container['id'] = $id; return $this; } /** - * Gets reason + * Gets ordinal * - * @return string|null + * @return int|null */ - public function getReason(): ?string + public function getOrdinal(): ?int { - return $this->container['reason']; + return $this->container['ordinal']; } /** - * Sets reason + * Sets ordinal * - * @param string|null $reason [readonly] The reason for determining the Status given. + * @param int|null $ordinal [readonly] The PaySchedule ordinal for the Employee at the time of the assessment * * @return $this */ - public function setReason(?string $reason): static + public function setOrdinal(?int $ordinal): static { - if (is_null($reason)) { - array_push($this->openAPINullablesSetToNull, 'reason'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('reason', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['reason'] = $reason; + $this->container['ordinal'] = $ordinal; return $this; } /** - * Gets action + * Gets payPeriod * - * @return \SynergiTech\Staffology\Model\AeAssessmentAction|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getAction(): ?\SynergiTech\Staffology\Model\AeAssessmentAction + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['action']; + return $this->container['payPeriod']; } /** - * Sets action + * Sets payPeriod * - * @param \SynergiTech\Staffology\Model\AeAssessmentAction|null $action action + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod * * @return $this */ - public function setAction(?\SynergiTech\Staffology\Model\AeAssessmentAction $action): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static { - if (is_null($action)) { - throw new InvalidArgumentException('non-nullable action cannot be null'); + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['action'] = $action; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets startReportingType + * Gets payRunVersion * - * @return \SynergiTech\Staffology\Model\PensionReportingType|null + * @return int|null */ - public function getStartReportingType(): ?\SynergiTech\Staffology\Model\PensionReportingType + public function getPayRunVersion(): ?int { - return $this->container['startReportingType']; + return $this->container['payRunVersion']; } /** - * Sets startReportingType + * Sets payRunVersion * - * @param \SynergiTech\Staffology\Model\PensionReportingType|null $startReportingType startReportingType + * @param int|null $payRunVersion [readonly] The supplementary pay run version of this AeAssessment. * * @return $this */ - public function setStartReportingType(?\SynergiTech\Staffology\Model\PensionReportingType $startReportingType): static + public function setPayRunVersion(?int $payRunVersion): static { - if (is_null($startReportingType)) { - throw new InvalidArgumentException('non-nullable startReportingType cannot be null'); + if (is_null($payRunVersion)) { + throw new InvalidArgumentException('non-nullable payRunVersion cannot be null'); } - $this->container['startReportingType'] = $startReportingType; + $this->container['payRunVersion'] = $payRunVersion; return $this; } /** - * Gets endReportingType + * Gets qualifyingEarningsInPeriod * - * @return \SynergiTech\Staffology\Model\PensionReportingType|null + * @return float|null */ - public function getEndReportingType(): ?\SynergiTech\Staffology\Model\PensionReportingType + public function getQualifyingEarningsInPeriod(): ?float { - return $this->container['endReportingType']; + return $this->container['qualifyingEarningsInPeriod']; } /** - * Sets endReportingType + * Sets qualifyingEarningsInPeriod * - * @param \SynergiTech\Staffology\Model\PensionReportingType|null $endReportingType endReportingType + * @param float|null $qualifyingEarningsInPeriod [readonly] * * @return $this */ - public function setEndReportingType(?\SynergiTech\Staffology\Model\PensionReportingType $endReportingType): static + public function setQualifyingEarningsInPeriod(?float $qualifyingEarningsInPeriod): static { - if (is_null($endReportingType)) { - throw new InvalidArgumentException('non-nullable endReportingType cannot be null'); + if (is_null($qualifyingEarningsInPeriod)) { + throw new InvalidArgumentException('non-nullable qualifyingEarningsInPeriod cannot be null'); } - $this->container['endReportingType'] = $endReportingType; + $this->container['qualifyingEarningsInPeriod'] = $qualifyingEarningsInPeriod; + + return $this; + } + + /** + * Gets reason + * + * @return string|null + */ + public function getReason(): ?string + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param string|null $reason [readonly] The reason for determining the Status given. + * + * @return $this + */ + public function setReason(?string $reason): static + { + if (is_null($reason)) { + array_push($this->openAPINullablesSetToNull, 'reason'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('reason', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['reason'] = $reason; return $this; } @@ -828,89 +869,82 @@ public function setStartPayRunEntryId(?int $startPayRunEntryId): static } /** - * Gets endPayRunEntryId + * Gets startReportingType * - * @return int|null + * @return \SynergiTech\Staffology\Model\PensionReportingType|null */ - public function getEndPayRunEntryId(): ?int + public function getStartReportingType(): ?\SynergiTech\Staffology\Model\PensionReportingType { - return $this->container['endPayRunEntryId']; + return $this->container['startReportingType']; } /** - * Sets endPayRunEntryId + * Sets startReportingType * - * @param int|null $endPayRunEntryId endPayRunEntryId + * @param \SynergiTech\Staffology\Model\PensionReportingType|null $startReportingType startReportingType * * @return $this */ - public function setEndPayRunEntryId(?int $endPayRunEntryId): static + public function setStartReportingType(?\SynergiTech\Staffology\Model\PensionReportingType $startReportingType): static { - if (is_null($endPayRunEntryId)) { - array_push($this->openAPINullablesSetToNull, 'endPayRunEntryId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPayRunEntryId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($startReportingType)) { + throw new InvalidArgumentException('non-nullable startReportingType cannot be null'); } - $this->container['endPayRunEntryId'] = $endPayRunEntryId; + $this->container['startReportingType'] = $startReportingType; return $this; } /** - * Gets employee + * Gets status * - * @return \SynergiTech\Staffology\Model\Item|null + * @return \SynergiTech\Staffology\Model\AeStatus|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getStatus(): ?\SynergiTech\Staffology\Model\AeStatus { - return $this->container['employee']; + return $this->container['status']; } /** - * Sets employee + * Sets status * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param \SynergiTech\Staffology\Model\AeStatus|null $status status * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setStatus(?\SynergiTech\Staffology\Model\AeStatus $status): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['employee'] = $employee; + $this->container['status'] = $status; return $this; } /** - * Gets id + * Gets ukWorker * - * @return string|null + * @return \SynergiTech\Staffology\Model\AeUKWorker|null */ - public function getId(): ?string + public function getUkWorker(): ?\SynergiTech\Staffology\Model\AeUKWorker { - return $this->container['id']; + return $this->container['ukWorker']; } /** - * Sets id + * Sets ukWorker * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\AeUKWorker|null $ukWorker ukWorker * * @return $this */ - public function setId(?string $id): static + public function setUkWorker(?\SynergiTech\Staffology\Model\AeUKWorker $ukWorker): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($ukWorker)) { + throw new InvalidArgumentException('non-nullable ukWorker cannot be null'); } - $this->container['id'] = $id; + $this->container['ukWorker'] = $ukWorker; return $this; } diff --git a/src/Model/AeAssessmentAction.php b/src/Model/AeAssessmentAction.php index 04f126f..2f0e999 100644 --- a/src/Model/AeAssessmentAction.php +++ b/src/Model/AeAssessmentAction.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,13 +60,13 @@ class AeAssessmentAction implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPITypes = [ 'action' => '\SynergiTech\Staffology\Model\AeAction', - 'employeeState' => '\SynergiTech\Staffology\Model\AeEmployeeState', 'actionCompleted' => 'bool', 'actionCompletedMessage' => 'string', - 'requiredLetter' => '\SynergiTech\Staffology\Model\AeStatutoryLetter', + 'employeeState' => '\SynergiTech\Staffology\Model\AeEmployeeState', + 'letterNotYetSent' => 'bool', 'pensionSchemeId' => 'string', - 'workerGroupId' => 'string', - 'letterNotYetSent' => 'bool' + 'requiredLetter' => '\SynergiTech\Staffology\Model\AeStatutoryLetter', + 'workerGroupId' => 'string' ]; /** @@ -76,13 +76,13 @@ class AeAssessmentAction implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPIFormats = [ 'action' => null, - 'employeeState' => null, 'actionCompleted' => null, 'actionCompletedMessage' => null, - 'requiredLetter' => null, + 'employeeState' => null, + 'letterNotYetSent' => null, 'pensionSchemeId' => 'uuid', - 'workerGroupId' => 'uuid', - 'letterNotYetSent' => null + 'requiredLetter' => null, + 'workerGroupId' => 'uuid' ]; /** @@ -92,13 +92,13 @@ class AeAssessmentAction implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPINullables = [ 'action' => false, - 'employeeState' => false, 'actionCompleted' => false, 'actionCompletedMessage' => true, - 'requiredLetter' => false, + 'employeeState' => false, + 'letterNotYetSent' => false, 'pensionSchemeId' => false, - 'workerGroupId' => false, - 'letterNotYetSent' => false + 'requiredLetter' => false, + 'workerGroupId' => false ]; /** @@ -188,13 +188,13 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'action' => 'action', - 'employeeState' => 'employeeState', 'actionCompleted' => 'actionCompleted', 'actionCompletedMessage' => 'actionCompletedMessage', - 'requiredLetter' => 'requiredLetter', + 'employeeState' => 'employeeState', + 'letterNotYetSent' => 'letterNotYetSent', 'pensionSchemeId' => 'pensionSchemeId', - 'workerGroupId' => 'workerGroupId', - 'letterNotYetSent' => 'letterNotYetSent' + 'requiredLetter' => 'requiredLetter', + 'workerGroupId' => 'workerGroupId' ]; /** @@ -204,13 +204,13 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'action' => 'setAction', - 'employeeState' => 'setEmployeeState', 'actionCompleted' => 'setActionCompleted', 'actionCompletedMessage' => 'setActionCompletedMessage', - 'requiredLetter' => 'setRequiredLetter', + 'employeeState' => 'setEmployeeState', + 'letterNotYetSent' => 'setLetterNotYetSent', 'pensionSchemeId' => 'setPensionSchemeId', - 'workerGroupId' => 'setWorkerGroupId', - 'letterNotYetSent' => 'setLetterNotYetSent' + 'requiredLetter' => 'setRequiredLetter', + 'workerGroupId' => 'setWorkerGroupId' ]; /** @@ -220,13 +220,13 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'action' => 'getAction', - 'employeeState' => 'getEmployeeState', 'actionCompleted' => 'getActionCompleted', 'actionCompletedMessage' => 'getActionCompletedMessage', - 'requiredLetter' => 'getRequiredLetter', + 'employeeState' => 'getEmployeeState', + 'letterNotYetSent' => 'getLetterNotYetSent', 'pensionSchemeId' => 'getPensionSchemeId', - 'workerGroupId' => 'getWorkerGroupId', - 'letterNotYetSent' => 'getLetterNotYetSent' + 'requiredLetter' => 'getRequiredLetter', + 'workerGroupId' => 'getWorkerGroupId' ]; /** @@ -286,13 +286,13 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('action', $data ?? [], null); - $this->setIfExists('employeeState', $data ?? [], null); $this->setIfExists('actionCompleted', $data ?? [], null); $this->setIfExists('actionCompletedMessage', $data ?? [], null); - $this->setIfExists('requiredLetter', $data ?? [], null); + $this->setIfExists('employeeState', $data ?? [], null); + $this->setIfExists('letterNotYetSent', $data ?? [], null); $this->setIfExists('pensionSchemeId', $data ?? [], null); + $this->setIfExists('requiredLetter', $data ?? [], null); $this->setIfExists('workerGroupId', $data ?? [], null); - $this->setIfExists('letterNotYetSent', $data ?? [], null); } /** @@ -364,33 +364,6 @@ public function setAction(?\SynergiTech\Staffology\Model\AeAction $action): stat return $this; } - /** - * Gets employeeState - * - * @return \SynergiTech\Staffology\Model\AeEmployeeState|null - */ - public function getEmployeeState(): ?\SynergiTech\Staffology\Model\AeEmployeeState - { - return $this->container['employeeState']; - } - - /** - * Sets employeeState - * - * @param \SynergiTech\Staffology\Model\AeEmployeeState|null $employeeState employeeState - * - * @return $this - */ - public function setEmployeeState(?\SynergiTech\Staffology\Model\AeEmployeeState $employeeState): static - { - if (is_null($employeeState)) { - throw new InvalidArgumentException('non-nullable employeeState cannot be null'); - } - $this->container['employeeState'] = $employeeState; - - return $this; - } - /** * Gets actionCompleted * @@ -453,28 +426,55 @@ public function setActionCompletedMessage(?string $actionCompletedMessage): stat } /** - * Gets requiredLetter + * Gets employeeState * - * @return \SynergiTech\Staffology\Model\AeStatutoryLetter|null + * @return \SynergiTech\Staffology\Model\AeEmployeeState|null */ - public function getRequiredLetter(): ?\SynergiTech\Staffology\Model\AeStatutoryLetter + public function getEmployeeState(): ?\SynergiTech\Staffology\Model\AeEmployeeState { - return $this->container['requiredLetter']; + return $this->container['employeeState']; } /** - * Sets requiredLetter + * Sets employeeState * - * @param \SynergiTech\Staffology\Model\AeStatutoryLetter|null $requiredLetter requiredLetter + * @param \SynergiTech\Staffology\Model\AeEmployeeState|null $employeeState employeeState * * @return $this */ - public function setRequiredLetter(?\SynergiTech\Staffology\Model\AeStatutoryLetter $requiredLetter): static + public function setEmployeeState(?\SynergiTech\Staffology\Model\AeEmployeeState $employeeState): static { - if (is_null($requiredLetter)) { - throw new InvalidArgumentException('non-nullable requiredLetter cannot be null'); + if (is_null($employeeState)) { + throw new InvalidArgumentException('non-nullable employeeState cannot be null'); } - $this->container['requiredLetter'] = $requiredLetter; + $this->container['employeeState'] = $employeeState; + + return $this; + } + + /** + * Gets letterNotYetSent + * + * @return bool|null + */ + public function getLetterNotYetSent(): ?bool + { + return $this->container['letterNotYetSent']; + } + + /** + * Sets letterNotYetSent + * + * @param bool|null $letterNotYetSent [readonly] Indicates whether or not any required letter has been sent + * + * @return $this + */ + public function setLetterNotYetSent(?bool $letterNotYetSent): static + { + if (is_null($letterNotYetSent)) { + throw new InvalidArgumentException('non-nullable letterNotYetSent cannot be null'); + } + $this->container['letterNotYetSent'] = $letterNotYetSent; return $this; } @@ -507,55 +507,55 @@ public function setPensionSchemeId(?string $pensionSchemeId): static } /** - * Gets workerGroupId + * Gets requiredLetter * - * @return string|null + * @return \SynergiTech\Staffology\Model\AeStatutoryLetter|null */ - public function getWorkerGroupId(): ?string + public function getRequiredLetter(): ?\SynergiTech\Staffology\Model\AeStatutoryLetter { - return $this->container['workerGroupId']; + return $this->container['requiredLetter']; } /** - * Sets workerGroupId + * Sets requiredLetter * - * @param string|null $workerGroupId [readonly] The WorkerGroupId that a completed action relates to + * @param \SynergiTech\Staffology\Model\AeStatutoryLetter|null $requiredLetter requiredLetter * * @return $this */ - public function setWorkerGroupId(?string $workerGroupId): static + public function setRequiredLetter(?\SynergiTech\Staffology\Model\AeStatutoryLetter $requiredLetter): static { - if (is_null($workerGroupId)) { - throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); + if (is_null($requiredLetter)) { + throw new InvalidArgumentException('non-nullable requiredLetter cannot be null'); } - $this->container['workerGroupId'] = $workerGroupId; + $this->container['requiredLetter'] = $requiredLetter; return $this; } /** - * Gets letterNotYetSent + * Gets workerGroupId * - * @return bool|null + * @return string|null */ - public function getLetterNotYetSent(): ?bool + public function getWorkerGroupId(): ?string { - return $this->container['letterNotYetSent']; + return $this->container['workerGroupId']; } /** - * Sets letterNotYetSent + * Sets workerGroupId * - * @param bool|null $letterNotYetSent [readonly] Indicates whether or not any required letter has been sent + * @param string|null $workerGroupId [readonly] The WorkerGroupId that a completed action relates to * * @return $this */ - public function setLetterNotYetSent(?bool $letterNotYetSent): static + public function setWorkerGroupId(?string $workerGroupId): static { - if (is_null($letterNotYetSent)) { - throw new InvalidArgumentException('non-nullable letterNotYetSent cannot be null'); + if (is_null($workerGroupId)) { + throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); } - $this->container['letterNotYetSent'] = $letterNotYetSent; + $this->container['workerGroupId'] = $workerGroupId; return $this; } diff --git a/src/Model/AeEmployeeState.php b/src/Model/AeEmployeeState.php index 170bbf2..a4151f1 100644 --- a/src/Model/AeEmployeeState.php +++ b/src/Model/AeEmployeeState.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/AeExclusionCode.php b/src/Model/AeExclusionCode.php index a021b82..a31fde7 100644 --- a/src/Model/AeExclusionCode.php +++ b/src/Model/AeExclusionCode.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/AeLetter.php b/src/Model/AeLetter.php new file mode 100644 index 0000000..e40872b --- /dev/null +++ b/src/Model/AeLetter.php @@ -0,0 +1,51 @@ + */ protected static array $openAPITypes = [ + 'accountingCode' => 'string', 'code' => 'string', - 'title' => 'string', 'color' => 'string', - 'accountingCode' => 'string' + 'title' => 'string' ]; /** @@ -71,10 +71,10 @@ class AnalysisCategoryCode implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPIFormats = [ + 'accountingCode' => null, 'code' => null, - 'title' => null, 'color' => null, - 'accountingCode' => null + 'title' => null ]; /** @@ -83,10 +83,10 @@ class AnalysisCategoryCode implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPINullables = [ + 'accountingCode' => true, 'code' => false, - 'title' => false, 'color' => true, - 'accountingCode' => true + 'title' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'accountingCode' => 'accountingCode', 'code' => 'code', - 'title' => 'title', 'color' => 'color', - 'accountingCode' => 'accountingCode' + 'title' => 'title' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'accountingCode' => 'setAccountingCode', 'code' => 'setCode', - 'title' => 'setTitle', 'color' => 'setColor', - 'accountingCode' => 'setAccountingCode' + 'title' => 'setTitle' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'accountingCode' => 'getAccountingCode', 'code' => 'getCode', - 'title' => 'getTitle', 'color' => 'getColor', - 'accountingCode' => 'getAccountingCode' + 'title' => 'getTitle' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('accountingCode', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); - $this->setIfExists('accountingCode', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -294,6 +294,10 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if (!is_null($this->container['accountingCode']) && (mb_strlen($this->container['accountingCode']) > 50)) { + $invalidProperties[] = "invalid value for 'accountingCode', the character length must be smaller than or equal to 50."; + } + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } @@ -305,6 +309,10 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'code', the character length must be bigger than or equal to 1."; } + if (!is_null($this->container['color']) && (mb_strlen($this->container['color']) > 6)) { + $invalidProperties[] = "invalid value for 'color', the character length must be smaller than or equal to 6."; + } + if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } @@ -316,14 +324,6 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['color']) && (mb_strlen($this->container['color']) > 6)) { - $invalidProperties[] = "invalid value for 'color', the character length must be smaller than or equal to 6."; - } - - if (!is_null($this->container['accountingCode']) && (mb_strlen($this->container['accountingCode']) > 50)) { - $invalidProperties[] = "invalid value for 'accountingCode', the character length must be smaller than or equal to 50."; - } - return $invalidProperties; } @@ -340,69 +340,73 @@ public function valid(): bool /** - * Gets code + * Gets accountingCode * - * @return string + * @return string|null */ - public function getCode(): string + public function getAccountingCode(): ?string { - return $this->container['code']; + return $this->container['accountingCode']; } /** - * Sets code + * Sets accountingCode * - * @param string $code code + * @param string|null $accountingCode accountingCode * * @return $this */ - public function setCode(string $code): static + public function setAccountingCode(?string $accountingCode): static { - if (is_null($code)) { - throw new InvalidArgumentException('non-nullable code cannot be null'); - } - if ((mb_strlen($code) > 20)) { - throw new InvalidArgumentException('invalid length for $code when calling AnalysisCategoryCode., must be smaller than or equal to 20.'); + if (is_null($accountingCode)) { + array_push($this->openAPINullablesSetToNull, 'accountingCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountingCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - if ((mb_strlen($code) < 1)) { - throw new InvalidArgumentException('invalid length for $code when calling AnalysisCategoryCode., must be bigger than or equal to 1.'); + if (!is_null($accountingCode) && (mb_strlen($accountingCode) > 50)) { + throw new InvalidArgumentException('invalid length for $accountingCode when calling AnalysisCategoryCode., must be smaller than or equal to 50.'); } - $this->container['code'] = $code; + $this->container['accountingCode'] = $accountingCode; return $this; } /** - * Gets title + * Gets code * * @return string */ - public function getTitle(): string + public function getCode(): string { - return $this->container['title']; + return $this->container['code']; } /** - * Sets title + * Sets code * - * @param string $title The name of this Analysis Code + * @param string $code code * * @return $this */ - public function setTitle(string $title): static + public function setCode(string $code): static { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); + if (is_null($code)) { + throw new InvalidArgumentException('non-nullable code cannot be null'); } - if ((mb_strlen($title) > 50)) { - throw new InvalidArgumentException('invalid length for $title when calling AnalysisCategoryCode., must be smaller than or equal to 50.'); + if ((mb_strlen($code) > 20)) { + throw new InvalidArgumentException('invalid length for $code when calling AnalysisCategoryCode., must be smaller than or equal to 20.'); } - if ((mb_strlen($title) < 1)) { - throw new InvalidArgumentException('invalid length for $title when calling AnalysisCategoryCode., must be bigger than or equal to 1.'); + if ((mb_strlen($code) < 1)) { + throw new InvalidArgumentException('invalid length for $code when calling AnalysisCategoryCode., must be bigger than or equal to 1.'); } - $this->container['title'] = $title; + $this->container['code'] = $code; return $this; } @@ -446,39 +450,35 @@ public function setColor(?string $color): static } /** - * Gets accountingCode + * Gets title * - * @return string|null + * @return string */ - public function getAccountingCode(): ?string + public function getTitle(): string { - return $this->container['accountingCode']; + return $this->container['title']; } /** - * Sets accountingCode + * Sets title * - * @param string|null $accountingCode accountingCode + * @param string $title The name of this Analysis Code * * @return $this */ - public function setAccountingCode(?string $accountingCode): static + public function setTitle(string $title): static { - if (is_null($accountingCode)) { - array_push($this->openAPINullablesSetToNull, 'accountingCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountingCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); } - if (!is_null($accountingCode) && (mb_strlen($accountingCode) > 50)) { - throw new InvalidArgumentException('invalid length for $accountingCode when calling AnalysisCategoryCode., must be smaller than or equal to 50.'); + if ((mb_strlen($title) > 50)) { + throw new InvalidArgumentException('invalid length for $title when calling AnalysisCategoryCode., must be smaller than or equal to 50.'); + } + if ((mb_strlen($title) < 1)) { + throw new InvalidArgumentException('invalid length for $title when calling AnalysisCategoryCode., must be bigger than or equal to 1.'); } - $this->container['accountingCode'] = $accountingCode; + $this->container['title'] = $title; return $this; } diff --git a/src/Model/AnalysisCategoryCodes.php b/src/Model/AnalysisCategoryCodes.php index 183c607..3cc95cc 100644 --- a/src/Model/AnalysisCategoryCodes.php +++ b/src/Model/AnalysisCategoryCodes.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -61,8 +61,8 @@ class AnalysisCategoryCodes implements ModelInterface, ArrayAccess, JsonSerializ protected static array $openAPITypes = [ 'analysisCategory' => 'string', 'analysisCategoryCode' => 'string', - 'analysisCategoryId' => 'string', - 'analysisCategoryCodeId' => 'string' + 'analysisCategoryCodeId' => 'string', + 'analysisCategoryId' => 'string' ]; /** @@ -73,8 +73,8 @@ class AnalysisCategoryCodes implements ModelInterface, ArrayAccess, JsonSerializ protected static array $openAPIFormats = [ 'analysisCategory' => null, 'analysisCategoryCode' => null, - 'analysisCategoryId' => 'uuid', - 'analysisCategoryCodeId' => 'uuid' + 'analysisCategoryCodeId' => 'uuid', + 'analysisCategoryId' => 'uuid' ]; /** @@ -85,8 +85,8 @@ class AnalysisCategoryCodes implements ModelInterface, ArrayAccess, JsonSerializ protected static array $openAPINullables = [ 'analysisCategory' => true, 'analysisCategoryCode' => true, - 'analysisCategoryId' => true, - 'analysisCategoryCodeId' => true + 'analysisCategoryCodeId' => true, + 'analysisCategoryId' => true ]; /** @@ -177,8 +177,8 @@ public function isNullableSetToNull(string $property): bool protected static array $attributeMap = [ 'analysisCategory' => 'analysisCategory', 'analysisCategoryCode' => 'analysisCategoryCode', - 'analysisCategoryId' => 'analysisCategoryId', - 'analysisCategoryCodeId' => 'analysisCategoryCodeId' + 'analysisCategoryCodeId' => 'analysisCategoryCodeId', + 'analysisCategoryId' => 'analysisCategoryId' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool protected static array $setters = [ 'analysisCategory' => 'setAnalysisCategory', 'analysisCategoryCode' => 'setAnalysisCategoryCode', - 'analysisCategoryId' => 'setAnalysisCategoryId', - 'analysisCategoryCodeId' => 'setAnalysisCategoryCodeId' + 'analysisCategoryCodeId' => 'setAnalysisCategoryCodeId', + 'analysisCategoryId' => 'setAnalysisCategoryId' ]; /** @@ -201,8 +201,8 @@ public function isNullableSetToNull(string $property): bool protected static array $getters = [ 'analysisCategory' => 'getAnalysisCategory', 'analysisCategoryCode' => 'getAnalysisCategoryCode', - 'analysisCategoryId' => 'getAnalysisCategoryId', - 'analysisCategoryCodeId' => 'getAnalysisCategoryCodeId' + 'analysisCategoryCodeId' => 'getAnalysisCategoryCodeId', + 'analysisCategoryId' => 'getAnalysisCategoryId' ]; /** @@ -263,8 +263,8 @@ public function __construct(?array $data = null) { $this->setIfExists('analysisCategory', $data ?? [], null); $this->setIfExists('analysisCategoryCode', $data ?? [], null); - $this->setIfExists('analysisCategoryId', $data ?? [], null); $this->setIfExists('analysisCategoryCodeId', $data ?? [], null); + $this->setIfExists('analysisCategoryId', $data ?? [], null); } /** @@ -378,69 +378,69 @@ public function setAnalysisCategoryCode(?string $analysisCategoryCode): static } /** - * Gets analysisCategoryId + * Gets analysisCategoryCodeId * * @return string|null */ - public function getAnalysisCategoryId(): ?string + public function getAnalysisCategoryCodeId(): ?string { - return $this->container['analysisCategoryId']; + return $this->container['analysisCategoryCodeId']; } /** - * Sets analysisCategoryId + * Sets analysisCategoryCodeId * - * @param string|null $analysisCategoryId AnalysisCategory Identifier + * @param string|null $analysisCategoryCodeId AnalysisCategoryCode Identifier * * @return $this */ - public function setAnalysisCategoryId(?string $analysisCategoryId): static + public function setAnalysisCategoryCodeId(?string $analysisCategoryCodeId): static { - if (is_null($analysisCategoryId)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryId'); + if (is_null($analysisCategoryCodeId)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodeId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryId', $nullablesSetToNull); + $index = array_search('analysisCategoryCodeId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoryId'] = $analysisCategoryId; + $this->container['analysisCategoryCodeId'] = $analysisCategoryCodeId; return $this; } /** - * Gets analysisCategoryCodeId + * Gets analysisCategoryId * * @return string|null */ - public function getAnalysisCategoryCodeId(): ?string + public function getAnalysisCategoryId(): ?string { - return $this->container['analysisCategoryCodeId']; + return $this->container['analysisCategoryId']; } /** - * Sets analysisCategoryCodeId + * Sets analysisCategoryId * - * @param string|null $analysisCategoryCodeId AnalysisCategoryCode Identifier + * @param string|null $analysisCategoryId AnalysisCategory Identifier * * @return $this */ - public function setAnalysisCategoryCodeId(?string $analysisCategoryCodeId): static + public function setAnalysisCategoryId(?string $analysisCategoryId): static { - if (is_null($analysisCategoryCodeId)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodeId'); + if (is_null($analysisCategoryId)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryCodeId', $nullablesSetToNull); + $index = array_search('analysisCategoryId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoryCodeId'] = $analysisCategoryCodeId; + $this->container['analysisCategoryId'] = $analysisCategoryId; return $this; } diff --git a/src/Model/AnalysisCategoryIndex.php b/src/Model/AnalysisCategoryIndex.php index eee2376..9580f45 100644 --- a/src/Model/AnalysisCategoryIndex.php +++ b/src/Model/AnalysisCategoryIndex.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class AnalysisCategoryIndex implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', - 'index' => 'int' + 'index' => 'int', + 'name' => 'string' ]; /** @@ -69,8 +69,8 @@ class AnalysisCategoryIndex implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPIFormats = [ - 'name' => null, - 'index' => 'int32' + 'index' => 'int32', + 'name' => null ]; /** @@ -79,8 +79,8 @@ class AnalysisCategoryIndex implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPINullables = [ - 'name' => true, - 'index' => false + 'index' => false, + 'name' => true ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', - 'index' => 'index' + 'index' => 'index', + 'name' => 'name' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', - 'index' => 'setIndex' + 'index' => 'setIndex', + 'name' => 'setName' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', - 'index' => 'getIndex' + 'index' => 'getIndex', + 'name' => 'getName' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('index', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); } /** @@ -296,62 +296,62 @@ public function valid(): bool /** - * Gets name + * Gets index * - * @return string|null + * @return int|null */ - public function getName(): ?string + public function getIndex(): ?int { - return $this->container['name']; + return $this->container['index']; } /** - * Sets name + * Sets index * - * @param string|null $name name + * @param int|null $index index * * @return $this */ - public function setName(?string $name): static + public function setIndex(?int $index): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($index)) { + throw new InvalidArgumentException('non-nullable index cannot be null'); } - $this->container['name'] = $name; + $this->container['index'] = $index; return $this; } /** - * Gets index + * Gets name * - * @return int|null + * @return string|null */ - public function getIndex(): ?int + public function getName(): ?string { - return $this->container['index']; + return $this->container['name']; } /** - * Sets index + * Sets name * - * @param int|null $index index + * @param string|null $name name * * @return $this */ - public function setIndex(?int $index): static + public function setName(?string $name): static { - if (is_null($index)) { - throw new InvalidArgumentException('non-nullable index cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['index'] = $index; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/AnalysisReport.php b/src/Model/AnalysisReport.php index e13539d..8703c3f 100644 --- a/src/Model/AnalysisReport.php +++ b/src/Model/AnalysisReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,22 +59,23 @@ class AnalysisReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'employer' => '\SynergiTech\Staffology\Model\Item', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\AnalysisReportLine[]', + 'ordinal' => 'int', 'payCodes' => '\SynergiTech\Staffology\Model\PayCode[]', - 'showPayPeriodBreakdown' => 'bool', - 'employer' => '\SynergiTech\Staffology\Model\Item', 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', - 'ordinal' => 'int', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'showPayPeriodBreakdown' => 'bool', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -83,22 +84,23 @@ class AnalysisReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'employer' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'isDraft' => null, 'lines' => null, + 'ordinal' => 'int32', 'payCodes' => null, - 'showPayPeriodBreakdown' => null, - 'employer' => null, 'payPeriod' => null, - 'ordinal' => 'int32', 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'showPayPeriodBreakdown' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -107,22 +109,23 @@ class AnalysisReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'employer' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'isDraft' => false, 'lines' => true, + 'ordinal' => false, 'payCodes' => true, - 'showPayPeriodBreakdown' => false, - 'employer' => false, 'payPeriod' => false, - 'ordinal' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'showPayPeriodBreakdown' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -211,22 +214,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'employer' => 'employer', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'isDraft' => 'isDraft', 'lines' => 'lines', + 'ordinal' => 'ordinal', 'payCodes' => 'payCodes', - 'showPayPeriodBreakdown' => 'showPayPeriodBreakdown', - 'employer' => 'employer', 'payPeriod' => 'payPeriod', - 'ordinal' => 'ordinal', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'showPayPeriodBreakdown' => 'showPayPeriodBreakdown', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -235,22 +239,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'employer' => 'setEmployer', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', + 'ordinal' => 'setOrdinal', 'payCodes' => 'setPayCodes', - 'showPayPeriodBreakdown' => 'setShowPayPeriodBreakdown', - 'employer' => 'setEmployer', 'payPeriod' => 'setPayPeriod', - 'ordinal' => 'setOrdinal', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'showPayPeriodBreakdown' => 'setShowPayPeriodBreakdown', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -259,22 +264,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'employer' => 'getEmployer', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', + 'ordinal' => 'getOrdinal', 'payCodes' => 'getPayCodes', - 'showPayPeriodBreakdown' => 'getShowPayPeriodBreakdown', - 'employer' => 'getEmployer', 'payPeriod' => 'getPayPeriod', - 'ordinal' => 'getOrdinal', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'showPayPeriodBreakdown' => 'getShowPayPeriodBreakdown', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -333,22 +339,23 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('employer', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('ordinal', $data ?? [], null); $this->setIfExists('payCodes', $data ?? [], null); - $this->setIfExists('showPayPeriodBreakdown', $data ?? [], null); - $this->setIfExists('employer', $data ?? [], null); $this->setIfExists('payPeriod', $data ?? [], null); - $this->setIfExists('ordinal', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('showPayPeriodBreakdown', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -394,150 +401,150 @@ public function valid(): bool /** - * Gets lines + * Gets employer * - * @return \SynergiTech\Staffology\Model\AnalysisReportLine[]|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getLines(): ?array + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['lines']; + return $this->container['employer']; } /** - * Sets lines + * Sets employer * - * @param \SynergiTech\Staffology\Model\AnalysisReportLine[]|null $lines lines + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setLines(?array $lines): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); } - $this->container['lines'] = $lines; + $this->container['employer'] = $employer; return $this; } /** - * Gets payCodes + * Gets endDate * - * @return \SynergiTech\Staffology\Model\PayCode[]|null + * @return \DateTime|null */ - public function getPayCodes(): ?array + public function getEndDate(): ?\DateTime { - return $this->container['payCodes']; + return $this->container['endDate']; } /** - * Sets payCodes + * Sets endDate * - * @param \SynergiTech\Staffology\Model\PayCode[]|null $payCodes payCodes + * @param \DateTime|null $endDate endDate * * @return $this */ - public function setPayCodes(?array $payCodes): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($payCodes)) { - array_push($this->openAPINullablesSetToNull, 'payCodes'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCodes', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); } - $this->container['payCodes'] = $payCodes; + $this->container['endDate'] = $endDate; return $this; } /** - * Gets showPayPeriodBreakdown + * Gets endPeriodName * - * @return bool|null + * @return string|null */ - public function getShowPayPeriodBreakdown(): ?bool + public function getEndPeriodName(): ?string { - return $this->container['showPayPeriodBreakdown']; + return $this->container['endPeriodName']; } /** - * Sets showPayPeriodBreakdown + * Sets endPeriodName * - * @param bool|null $showPayPeriodBreakdown showPayPeriodBreakdown + * @param string|null $endPeriodName endPeriodName * * @return $this */ - public function setShowPayPeriodBreakdown(?bool $showPayPeriodBreakdown): static + public function setEndPeriodName(?string $endPeriodName): static { - if (is_null($showPayPeriodBreakdown)) { - throw new InvalidArgumentException('non-nullable showPayPeriodBreakdown cannot be null'); + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['showPayPeriodBreakdown'] = $showPayPeriodBreakdown; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets employer + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getIsDraft(): ?bool { - return $this->container['employer']; + return $this->container['isDraft']; } /** - * Sets employer + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param bool|null $isDraft isDraft * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['employer'] = $employer; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets payPeriod + * Gets lines * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return \SynergiTech\Staffology\Model\AnalysisReportLine[]|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getLines(): ?array { - return $this->container['payPeriod']; + return $this->container['lines']; } /** - * Sets payPeriod + * Sets lines * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param \SynergiTech\Staffology\Model\AnalysisReportLine[]|null $lines lines * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setLines(?array $lines): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriod'] = $payPeriod; + $this->container['lines'] = $lines; return $this; } @@ -569,6 +576,67 @@ public function setOrdinal(?int $ordinal): static return $this; } + /** + * Gets payCodes + * + * @return \SynergiTech\Staffology\Model\PayCode[]|null + */ + public function getPayCodes(): ?array + { + return $this->container['payCodes']; + } + + /** + * Sets payCodes + * + * @param \SynergiTech\Staffology\Model\PayCode[]|null $payCodes payCodes + * + * @return $this + */ + public function setPayCodes(?array $payCodes): static + { + if (is_null($payCodes)) { + array_push($this->openAPINullablesSetToNull, 'payCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payCodes'] = $payCodes; + + return $this; + } + + /** + * Gets payPeriod + * + * @return \SynergiTech\Staffology\Model\PayPeriods|null + */ + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + { + return $this->container['payPeriod']; + } + + /** + * Sets payPeriod + * + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * + * @return $this + */ + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + { + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + } + $this->container['payPeriod'] = $payPeriod; + + return $this; + } + /** * Gets period * @@ -624,69 +692,55 @@ public function setPeriodTo(?int $periodTo): static } /** - * Gets startPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getStartPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['startPeriodName']; + return $this->container['report']; } /** - * Sets startPeriodName + * Sets report * - * @param string|null $startPeriodName startPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setStartPeriodName(?string $startPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['startPeriodName'] = $startPeriodName; + $this->container['report'] = $report; return $this; } /** - * Gets endPeriodName + * Gets showPayPeriodBreakdown * - * @return string|null + * @return bool|null */ - public function getEndPeriodName(): ?string + public function getShowPayPeriodBreakdown(): ?bool { - return $this->container['endPeriodName']; + return $this->container['showPayPeriodBreakdown']; } /** - * Sets endPeriodName + * Sets showPayPeriodBreakdown * - * @param string|null $endPeriodName endPeriodName + * @param bool|null $showPayPeriodBreakdown showPayPeriodBreakdown * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setShowPayPeriodBreakdown(?bool $showPayPeriodBreakdown): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($showPayPeriodBreakdown)) { + throw new InvalidArgumentException('non-nullable showPayPeriodBreakdown cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['showPayPeriodBreakdown'] = $showPayPeriodBreakdown; return $this; } @@ -719,55 +773,35 @@ public function setStartDate(?\DateTime $startDate): static } /** - * Gets endDate - * - * @return \DateTime|null - */ - public function getEndDate(): ?\DateTime - { - return $this->container['endDate']; - } - - /** - * Sets endDate - * - * @param \DateTime|null $endDate endDate - * - * @return $this - */ - public function setEndDate(?\DateTime $endDate): static - { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); - } - $this->container['endDate'] = $endDate; - - return $this; - } - - /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -834,28 +868,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/AnalysisReportLine.php b/src/Model/AnalysisReportLine.php index 706b446..efab4fa 100644 --- a/src/Model/AnalysisReportLine.php +++ b/src/Model/AnalysisReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,18 +60,18 @@ class AnalysisReportLine implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPITypes = [ 'employee' => '\SynergiTech\Staffology\Model\Item', - 'taxYear' => 'string', - 'payPeriod' => 'int', + 'employerNic' => 'float', + 'employerPension' => 'float', 'gross' => 'float', + 'lines' => '\SynergiTech\Staffology\Model\AnalysisReportLineValue[]', + 'net' => 'float', + 'niSaving' => 'float', 'niableGross' => 'float', + 'payPeriod' => 'int', 'pensionableGross' => 'float', - 'net' => 'float', - 'takeHome' => 'float', - 'employerNic' => 'float', - 'employerPension' => 'float', 'showQtyColumn' => 'bool', - 'niSaving' => 'float', - 'lines' => '\SynergiTech\Staffology\Model\AnalysisReportLineValue[]' + 'takeHome' => 'float', + 'taxYear' => 'string' ]; /** @@ -81,18 +81,18 @@ class AnalysisReportLine implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPIFormats = [ 'employee' => null, - 'taxYear' => null, - 'payPeriod' => 'int32', + 'employerNic' => 'double', + 'employerPension' => 'double', 'gross' => 'double', + 'lines' => null, + 'net' => 'double', + 'niSaving' => 'double', 'niableGross' => 'double', + 'payPeriod' => 'int32', 'pensionableGross' => 'double', - 'net' => 'double', - 'takeHome' => 'double', - 'employerNic' => 'double', - 'employerPension' => 'double', 'showQtyColumn' => null, - 'niSaving' => 'double', - 'lines' => null + 'takeHome' => 'double', + 'taxYear' => null ]; /** @@ -102,18 +102,18 @@ class AnalysisReportLine implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPINullables = [ 'employee' => false, - 'taxYear' => true, - 'payPeriod' => false, + 'employerNic' => false, + 'employerPension' => false, 'gross' => false, + 'lines' => true, + 'net' => false, + 'niSaving' => false, 'niableGross' => false, + 'payPeriod' => false, 'pensionableGross' => false, - 'net' => false, - 'takeHome' => false, - 'employerNic' => false, - 'employerPension' => false, 'showQtyColumn' => false, - 'niSaving' => false, - 'lines' => true + 'takeHome' => false, + 'taxYear' => true ]; /** @@ -203,18 +203,18 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'employee' => 'employee', - 'taxYear' => 'taxYear', - 'payPeriod' => 'payPeriod', + 'employerNic' => 'employerNic', + 'employerPension' => 'employerPension', 'gross' => 'gross', + 'lines' => 'lines', + 'net' => 'net', + 'niSaving' => 'niSaving', 'niableGross' => 'niableGross', + 'payPeriod' => 'payPeriod', 'pensionableGross' => 'pensionableGross', - 'net' => 'net', - 'takeHome' => 'takeHome', - 'employerNic' => 'employerNic', - 'employerPension' => 'employerPension', 'showQtyColumn' => 'showQtyColumn', - 'niSaving' => 'niSaving', - 'lines' => 'lines' + 'takeHome' => 'takeHome', + 'taxYear' => 'taxYear' ]; /** @@ -224,18 +224,18 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'employee' => 'setEmployee', - 'taxYear' => 'setTaxYear', - 'payPeriod' => 'setPayPeriod', + 'employerNic' => 'setEmployerNic', + 'employerPension' => 'setEmployerPension', 'gross' => 'setGross', + 'lines' => 'setLines', + 'net' => 'setNet', + 'niSaving' => 'setNiSaving', 'niableGross' => 'setNiableGross', + 'payPeriod' => 'setPayPeriod', 'pensionableGross' => 'setPensionableGross', - 'net' => 'setNet', - 'takeHome' => 'setTakeHome', - 'employerNic' => 'setEmployerNic', - 'employerPension' => 'setEmployerPension', 'showQtyColumn' => 'setShowQtyColumn', - 'niSaving' => 'setNiSaving', - 'lines' => 'setLines' + 'takeHome' => 'setTakeHome', + 'taxYear' => 'setTaxYear' ]; /** @@ -245,18 +245,18 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'employee' => 'getEmployee', - 'taxYear' => 'getTaxYear', - 'payPeriod' => 'getPayPeriod', + 'employerNic' => 'getEmployerNic', + 'employerPension' => 'getEmployerPension', 'gross' => 'getGross', + 'lines' => 'getLines', + 'net' => 'getNet', + 'niSaving' => 'getNiSaving', 'niableGross' => 'getNiableGross', + 'payPeriod' => 'getPayPeriod', 'pensionableGross' => 'getPensionableGross', - 'net' => 'getNet', - 'takeHome' => 'getTakeHome', - 'employerNic' => 'getEmployerNic', - 'employerPension' => 'getEmployerPension', 'showQtyColumn' => 'getShowQtyColumn', - 'niSaving' => 'getNiSaving', - 'lines' => 'getLines' + 'takeHome' => 'getTakeHome', + 'taxYear' => 'getTaxYear' ]; /** @@ -316,18 +316,18 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('employerNic', $data ?? [], null); + $this->setIfExists('employerPension', $data ?? [], null); $this->setIfExists('gross', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('niSaving', $data ?? [], null); $this->setIfExists('niableGross', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('pensionableGross', $data ?? [], null); - $this->setIfExists('net', $data ?? [], null); - $this->setIfExists('takeHome', $data ?? [], null); - $this->setIfExists('employerNic', $data ?? [], null); - $this->setIfExists('employerPension', $data ?? [], null); $this->setIfExists('showQtyColumn', $data ?? [], null); - $this->setIfExists('niSaving', $data ?? [], null); - $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('takeHome', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); } /** @@ -400,62 +400,55 @@ public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): stat } /** - * Gets taxYear + * Gets employerNic * - * @return string|null + * @return float|null */ - public function getTaxYear(): ?string + public function getEmployerNic(): ?float { - return $this->container['taxYear']; + return $this->container['employerNic']; } /** - * Sets taxYear + * Sets employerNic * - * @param string|null $taxYear taxYear + * @param float|null $employerNic employerNic * * @return $this */ - public function setTaxYear(?string $taxYear): static + public function setEmployerNic(?float $employerNic): static { - if (is_null($taxYear)) { - array_push($this->openAPINullablesSetToNull, 'taxYear'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxYear', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employerNic)) { + throw new InvalidArgumentException('non-nullable employerNic cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['employerNic'] = $employerNic; return $this; } /** - * Gets payPeriod + * Gets employerPension * - * @return int|null + * @return float|null */ - public function getPayPeriod(): ?int + public function getEmployerPension(): ?float { - return $this->container['payPeriod']; + return $this->container['employerPension']; } /** - * Sets payPeriod + * Sets employerPension * - * @param int|null $payPeriod payPeriod + * @param float|null $employerPension employerPension * * @return $this */ - public function setPayPeriod(?int $payPeriod): static + public function setEmployerPension(?float $employerPension): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($employerPension)) { + throw new InvalidArgumentException('non-nullable employerPension cannot be null'); } - $this->container['payPeriod'] = $payPeriod; + $this->container['employerPension'] = $employerPension; return $this; } @@ -488,163 +481,170 @@ public function setGross(?float $gross): static } /** - * Gets niableGross + * Gets lines * - * @return float|null + * @return \SynergiTech\Staffology\Model\AnalysisReportLineValue[]|null */ - public function getNiableGross(): ?float + public function getLines(): ?array { - return $this->container['niableGross']; + return $this->container['lines']; } /** - * Sets niableGross + * Sets lines * - * @param float|null $niableGross niableGross + * @param \SynergiTech\Staffology\Model\AnalysisReportLineValue[]|null $lines lines * * @return $this */ - public function setNiableGross(?float $niableGross): static + public function setLines(?array $lines): static { - if (is_null($niableGross)) { - throw new InvalidArgumentException('non-nullable niableGross cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['niableGross'] = $niableGross; + $this->container['lines'] = $lines; return $this; } /** - * Gets pensionableGross + * Gets net * * @return float|null */ - public function getPensionableGross(): ?float + public function getNet(): ?float { - return $this->container['pensionableGross']; + return $this->container['net']; } /** - * Sets pensionableGross + * Sets net * - * @param float|null $pensionableGross pensionableGross + * @param float|null $net net * * @return $this */ - public function setPensionableGross(?float $pensionableGross): static + public function setNet(?float $net): static { - if (is_null($pensionableGross)) { - throw new InvalidArgumentException('non-nullable pensionableGross cannot be null'); + if (is_null($net)) { + throw new InvalidArgumentException('non-nullable net cannot be null'); } - $this->container['pensionableGross'] = $pensionableGross; + $this->container['net'] = $net; return $this; } /** - * Gets net + * Gets niSaving * * @return float|null */ - public function getNet(): ?float + public function getNiSaving(): ?float { - return $this->container['net']; + return $this->container['niSaving']; } /** - * Sets net + * Sets niSaving * - * @param float|null $net net + * @param float|null $niSaving niSaving * * @return $this */ - public function setNet(?float $net): static + public function setNiSaving(?float $niSaving): static { - if (is_null($net)) { - throw new InvalidArgumentException('non-nullable net cannot be null'); + if (is_null($niSaving)) { + throw new InvalidArgumentException('non-nullable niSaving cannot be null'); } - $this->container['net'] = $net; + $this->container['niSaving'] = $niSaving; return $this; } /** - * Gets takeHome + * Gets niableGross * * @return float|null */ - public function getTakeHome(): ?float + public function getNiableGross(): ?float { - return $this->container['takeHome']; + return $this->container['niableGross']; } /** - * Sets takeHome + * Sets niableGross * - * @param float|null $takeHome takeHome + * @param float|null $niableGross niableGross * * @return $this */ - public function setTakeHome(?float $takeHome): static + public function setNiableGross(?float $niableGross): static { - if (is_null($takeHome)) { - throw new InvalidArgumentException('non-nullable takeHome cannot be null'); + if (is_null($niableGross)) { + throw new InvalidArgumentException('non-nullable niableGross cannot be null'); } - $this->container['takeHome'] = $takeHome; + $this->container['niableGross'] = $niableGross; return $this; } /** - * Gets employerNic + * Gets payPeriod * - * @return float|null + * @return int|null */ - public function getEmployerNic(): ?float + public function getPayPeriod(): ?int { - return $this->container['employerNic']; + return $this->container['payPeriod']; } /** - * Sets employerNic + * Sets payPeriod * - * @param float|null $employerNic employerNic + * @param int|null $payPeriod payPeriod * * @return $this */ - public function setEmployerNic(?float $employerNic): static + public function setPayPeriod(?int $payPeriod): static { - if (is_null($employerNic)) { - throw new InvalidArgumentException('non-nullable employerNic cannot be null'); + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['employerNic'] = $employerNic; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets employerPension + * Gets pensionableGross * * @return float|null */ - public function getEmployerPension(): ?float + public function getPensionableGross(): ?float { - return $this->container['employerPension']; + return $this->container['pensionableGross']; } /** - * Sets employerPension + * Sets pensionableGross * - * @param float|null $employerPension employerPension + * @param float|null $pensionableGross pensionableGross * * @return $this */ - public function setEmployerPension(?float $employerPension): static + public function setPensionableGross(?float $pensionableGross): static { - if (is_null($employerPension)) { - throw new InvalidArgumentException('non-nullable employerPension cannot be null'); + if (is_null($pensionableGross)) { + throw new InvalidArgumentException('non-nullable pensionableGross cannot be null'); } - $this->container['employerPension'] = $employerPension; + $this->container['pensionableGross'] = $pensionableGross; return $this; } @@ -677,62 +677,62 @@ public function setShowQtyColumn(?bool $showQtyColumn): static } /** - * Gets niSaving + * Gets takeHome * * @return float|null */ - public function getNiSaving(): ?float + public function getTakeHome(): ?float { - return $this->container['niSaving']; + return $this->container['takeHome']; } /** - * Sets niSaving + * Sets takeHome * - * @param float|null $niSaving niSaving + * @param float|null $takeHome takeHome * * @return $this */ - public function setNiSaving(?float $niSaving): static + public function setTakeHome(?float $takeHome): static { - if (is_null($niSaving)) { - throw new InvalidArgumentException('non-nullable niSaving cannot be null'); + if (is_null($takeHome)) { + throw new InvalidArgumentException('non-nullable takeHome cannot be null'); } - $this->container['niSaving'] = $niSaving; + $this->container['takeHome'] = $takeHome; return $this; } /** - * Gets lines + * Gets taxYear * - * @return \SynergiTech\Staffology\Model\AnalysisReportLineValue[]|null + * @return string|null */ - public function getLines(): ?array + public function getTaxYear(): ?string { - return $this->container['lines']; + return $this->container['taxYear']; } /** - * Sets lines + * Sets taxYear * - * @param \SynergiTech\Staffology\Model\AnalysisReportLineValue[]|null $lines lines + * @param string|null $taxYear taxYear * * @return $this */ - public function setLines(?array $lines): static + public function setTaxYear(?string $taxYear): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); + if (is_null($taxYear)) { + array_push($this->openAPINullablesSetToNull, 'taxYear'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); + $index = array_search('taxYear', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lines'] = $lines; + $this->container['taxYear'] = $taxYear; return $this; } diff --git a/src/Model/AnalysisReportLineValue.php b/src/Model/AnalysisReportLineValue.php index 4f14322..fd551db 100644 --- a/src/Model/AnalysisReportLineValue.php +++ b/src/Model/AnalysisReportLineValue.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class AnalysisReportLineValue implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ - 'qty' => 'float', 'code' => 'string', + 'qty' => 'float', 'value' => 'float' ]; @@ -70,8 +70,8 @@ class AnalysisReportLineValue implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ - 'qty' => 'double', 'code' => null, + 'qty' => 'double', 'value' => 'double' ]; @@ -81,8 +81,8 @@ class AnalysisReportLineValue implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ - 'qty' => true, 'code' => true, + 'qty' => true, 'value' => false ]; @@ -172,8 +172,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'qty' => 'qty', 'code' => 'code', + 'qty' => 'qty', 'value' => 'value' ]; @@ -183,8 +183,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'qty' => 'setQty', 'code' => 'setCode', + 'qty' => 'setQty', 'value' => 'setValue' ]; @@ -194,8 +194,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'qty' => 'getQty', 'code' => 'getCode', + 'qty' => 'getQty', 'value' => 'getValue' ]; @@ -255,8 +255,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('qty', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('qty', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); } @@ -303,69 +303,69 @@ public function valid(): bool /** - * Gets qty + * Gets code * - * @return float|null + * @return string|null */ - public function getQty(): ?float + public function getCode(): ?string { - return $this->container['qty']; + return $this->container['code']; } /** - * Sets qty + * Sets code * - * @param float|null $qty qty + * @param string|null $code code * * @return $this */ - public function setQty(?float $qty): static + public function setCode(?string $code): static { - if (is_null($qty)) { - array_push($this->openAPINullablesSetToNull, 'qty'); + if (is_null($code)) { + array_push($this->openAPINullablesSetToNull, 'code'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('qty', $nullablesSetToNull); + $index = array_search('code', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['qty'] = $qty; + $this->container['code'] = $code; return $this; } /** - * Gets code + * Gets qty * - * @return string|null + * @return float|null */ - public function getCode(): ?string + public function getQty(): ?float { - return $this->container['code']; + return $this->container['qty']; } /** - * Sets code + * Sets qty * - * @param string|null $code code + * @param float|null $qty qty * * @return $this */ - public function setCode(?string $code): static + public function setQty(?float $qty): static { - if (is_null($code)) { - array_push($this->openAPINullablesSetToNull, 'code'); + if (is_null($qty)) { + array_push($this->openAPINullablesSetToNull, 'qty'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('code', $nullablesSetToNull); + $index = array_search('qty', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['code'] = $code; + $this->container['qty'] = $qty; return $this; } diff --git a/src/Model/AnalysisReportReportResponse.php b/src/Model/AnalysisReportReportResponse.php index 4573c95..00a1bc6 100644 --- a/src/Model/AnalysisReportReportResponse.php +++ b/src/Model/AnalysisReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class AnalysisReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\AnalysisReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class AnalysisReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class AnalysisReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/AnnualRoundingRule.php b/src/Model/AnnualRoundingRule.php index 02909a5..30becf9 100644 --- a/src/Model/AnnualRoundingRule.php +++ b/src/Model/AnnualRoundingRule.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/AssumedPensionablePay.php b/src/Model/AssumedPensionablePay.php index 2dd3386..90b00e7 100644 --- a/src/Model/AssumedPensionablePay.php +++ b/src/Model/AssumedPensionablePay.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/AttachmentOrder.php b/src/Model/AttachmentOrder.php index 307453b..16f6162 100644 --- a/src/Model/AttachmentOrder.php +++ b/src/Model/AttachmentOrder.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,34 +60,34 @@ class AttachmentOrder implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => '\SynergiTech\Staffology\Model\AttachmentOrderType', - 'carryForwardShortfall' => 'bool', 'allowProtectedEarnings' => 'bool', - 'autoDeduction' => 'bool', - 'reference' => 'string', - 'issueDate' => '\DateTime', + 'amountPreviouslyPaid' => 'float', 'applyFrom' => '\DateTime', 'applyUntil' => '\DateTime', - 'deductionIsPercentage' => 'bool', + 'autoDeduction' => 'bool', + 'bankDetails' => '\SynergiTech\Staffology\Model\BankDetails', + 'carryForwardShortfall' => 'bool', + 'chargeAdminFee' => 'bool', 'deduction' => 'float', - 'protectedEarningsIsPercentage' => 'bool', + 'deductionIsPercentage' => 'bool', + 'documentCount' => 'int', + 'documents' => '\SynergiTech\Staffology\Model\Item[]', + 'employee' => '\SynergiTech\Staffology\Model\Item', + 'id' => 'string', + 'includeBankDetails' => 'bool', + 'issueDate' => '\DateTime', + 'notes' => 'string', + 'payee' => 'string', + 'payeeName' => 'string', + 'payments' => '\SynergiTech\Staffology\Model\AttachmentOrderPayment[]', 'protectedEarnings' => 'float', - 'chargeAdminFee' => 'bool', + 'protectedEarningsIsPercentage' => 'bool', + 'reference' => 'string', 'shortfall' => 'float', 'stopWhenTotalPaid' => 'bool', - 'totalAmountToPay' => 'float', - 'amountPreviouslyPaid' => 'float', 'stopped' => 'bool', - 'notes' => 'string', - 'includeBankDetails' => 'bool', - 'bankDetails' => '\SynergiTech\Staffology\Model\BankDetails', - 'payments' => '\SynergiTech\Staffology\Model\AttachmentOrderPayment[]', - 'payee' => 'string', - 'payeeName' => 'string', - 'documentCount' => 'int', - 'documents' => '\SynergiTech\Staffology\Model\Item[]', - 'employee' => '\SynergiTech\Staffology\Model\Item', - 'id' => 'string' + 'totalAmountToPay' => 'float', + 'type' => '\SynergiTech\Staffology\Model\AttachmentOrderType' ]; /** @@ -96,34 +96,34 @@ class AttachmentOrder implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'type' => null, - 'carryForwardShortfall' => null, 'allowProtectedEarnings' => null, - 'autoDeduction' => null, - 'reference' => null, - 'issueDate' => 'date', + 'amountPreviouslyPaid' => 'double', 'applyFrom' => 'date', 'applyUntil' => 'date', - 'deductionIsPercentage' => null, + 'autoDeduction' => null, + 'bankDetails' => null, + 'carryForwardShortfall' => null, + 'chargeAdminFee' => null, 'deduction' => 'double', - 'protectedEarningsIsPercentage' => null, + 'deductionIsPercentage' => null, + 'documentCount' => 'int32', + 'documents' => null, + 'employee' => null, + 'id' => 'uuid', + 'includeBankDetails' => null, + 'issueDate' => 'date', + 'notes' => null, + 'payee' => 'uuid', + 'payeeName' => null, + 'payments' => null, 'protectedEarnings' => 'double', - 'chargeAdminFee' => null, + 'protectedEarningsIsPercentage' => null, + 'reference' => null, 'shortfall' => 'double', 'stopWhenTotalPaid' => null, - 'totalAmountToPay' => 'double', - 'amountPreviouslyPaid' => 'double', 'stopped' => null, - 'notes' => null, - 'includeBankDetails' => null, - 'bankDetails' => null, - 'payments' => null, - 'payee' => 'uuid', - 'payeeName' => null, - 'documentCount' => 'int32', - 'documents' => null, - 'employee' => null, - 'id' => 'uuid' + 'totalAmountToPay' => 'double', + 'type' => null ]; /** @@ -132,34 +132,34 @@ class AttachmentOrder implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'type' => false, - 'carryForwardShortfall' => false, 'allowProtectedEarnings' => false, - 'autoDeduction' => false, - 'reference' => true, - 'issueDate' => false, + 'amountPreviouslyPaid' => false, 'applyFrom' => false, 'applyUntil' => true, - 'deductionIsPercentage' => false, + 'autoDeduction' => false, + 'bankDetails' => false, + 'carryForwardShortfall' => false, + 'chargeAdminFee' => false, 'deduction' => false, - 'protectedEarningsIsPercentage' => false, + 'deductionIsPercentage' => false, + 'documentCount' => false, + 'documents' => true, + 'employee' => false, + 'id' => false, + 'includeBankDetails' => false, + 'issueDate' => false, + 'notes' => true, + 'payee' => true, + 'payeeName' => true, + 'payments' => true, 'protectedEarnings' => false, - 'chargeAdminFee' => false, + 'protectedEarningsIsPercentage' => false, + 'reference' => true, 'shortfall' => false, 'stopWhenTotalPaid' => false, - 'totalAmountToPay' => false, - 'amountPreviouslyPaid' => false, 'stopped' => false, - 'notes' => true, - 'includeBankDetails' => false, - 'bankDetails' => false, - 'payments' => true, - 'payee' => true, - 'payeeName' => true, - 'documentCount' => false, - 'documents' => true, - 'employee' => false, - 'id' => false + 'totalAmountToPay' => false, + 'type' => false ]; /** @@ -248,34 +248,34 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', - 'carryForwardShortfall' => 'carryForwardShortfall', 'allowProtectedEarnings' => 'allowProtectedEarnings', - 'autoDeduction' => 'autoDeduction', - 'reference' => 'reference', - 'issueDate' => 'issueDate', + 'amountPreviouslyPaid' => 'amountPreviouslyPaid', 'applyFrom' => 'applyFrom', 'applyUntil' => 'applyUntil', - 'deductionIsPercentage' => 'deductionIsPercentage', + 'autoDeduction' => 'autoDeduction', + 'bankDetails' => 'bankDetails', + 'carryForwardShortfall' => 'carryForwardShortfall', + 'chargeAdminFee' => 'chargeAdminFee', 'deduction' => 'deduction', - 'protectedEarningsIsPercentage' => 'protectedEarningsIsPercentage', + 'deductionIsPercentage' => 'deductionIsPercentage', + 'documentCount' => 'documentCount', + 'documents' => 'documents', + 'employee' => 'employee', + 'id' => 'id', + 'includeBankDetails' => 'includeBankDetails', + 'issueDate' => 'issueDate', + 'notes' => 'notes', + 'payee' => 'payee', + 'payeeName' => 'payeeName', + 'payments' => 'payments', 'protectedEarnings' => 'protectedEarnings', - 'chargeAdminFee' => 'chargeAdminFee', + 'protectedEarningsIsPercentage' => 'protectedEarningsIsPercentage', + 'reference' => 'reference', 'shortfall' => 'shortfall', 'stopWhenTotalPaid' => 'stopWhenTotalPaid', - 'totalAmountToPay' => 'totalAmountToPay', - 'amountPreviouslyPaid' => 'amountPreviouslyPaid', 'stopped' => 'stopped', - 'notes' => 'notes', - 'includeBankDetails' => 'includeBankDetails', - 'bankDetails' => 'bankDetails', - 'payments' => 'payments', - 'payee' => 'payee', - 'payeeName' => 'payeeName', - 'documentCount' => 'documentCount', - 'documents' => 'documents', - 'employee' => 'employee', - 'id' => 'id' + 'totalAmountToPay' => 'totalAmountToPay', + 'type' => 'type' ]; /** @@ -284,34 +284,34 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', - 'carryForwardShortfall' => 'setCarryForwardShortfall', 'allowProtectedEarnings' => 'setAllowProtectedEarnings', - 'autoDeduction' => 'setAutoDeduction', - 'reference' => 'setReference', - 'issueDate' => 'setIssueDate', + 'amountPreviouslyPaid' => 'setAmountPreviouslyPaid', 'applyFrom' => 'setApplyFrom', 'applyUntil' => 'setApplyUntil', - 'deductionIsPercentage' => 'setDeductionIsPercentage', + 'autoDeduction' => 'setAutoDeduction', + 'bankDetails' => 'setBankDetails', + 'carryForwardShortfall' => 'setCarryForwardShortfall', + 'chargeAdminFee' => 'setChargeAdminFee', 'deduction' => 'setDeduction', - 'protectedEarningsIsPercentage' => 'setProtectedEarningsIsPercentage', + 'deductionIsPercentage' => 'setDeductionIsPercentage', + 'documentCount' => 'setDocumentCount', + 'documents' => 'setDocuments', + 'employee' => 'setEmployee', + 'id' => 'setId', + 'includeBankDetails' => 'setIncludeBankDetails', + 'issueDate' => 'setIssueDate', + 'notes' => 'setNotes', + 'payee' => 'setPayee', + 'payeeName' => 'setPayeeName', + 'payments' => 'setPayments', 'protectedEarnings' => 'setProtectedEarnings', - 'chargeAdminFee' => 'setChargeAdminFee', + 'protectedEarningsIsPercentage' => 'setProtectedEarningsIsPercentage', + 'reference' => 'setReference', 'shortfall' => 'setShortfall', 'stopWhenTotalPaid' => 'setStopWhenTotalPaid', - 'totalAmountToPay' => 'setTotalAmountToPay', - 'amountPreviouslyPaid' => 'setAmountPreviouslyPaid', 'stopped' => 'setStopped', - 'notes' => 'setNotes', - 'includeBankDetails' => 'setIncludeBankDetails', - 'bankDetails' => 'setBankDetails', - 'payments' => 'setPayments', - 'payee' => 'setPayee', - 'payeeName' => 'setPayeeName', - 'documentCount' => 'setDocumentCount', - 'documents' => 'setDocuments', - 'employee' => 'setEmployee', - 'id' => 'setId' + 'totalAmountToPay' => 'setTotalAmountToPay', + 'type' => 'setType' ]; /** @@ -320,34 +320,34 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', - 'carryForwardShortfall' => 'getCarryForwardShortfall', 'allowProtectedEarnings' => 'getAllowProtectedEarnings', - 'autoDeduction' => 'getAutoDeduction', - 'reference' => 'getReference', - 'issueDate' => 'getIssueDate', + 'amountPreviouslyPaid' => 'getAmountPreviouslyPaid', 'applyFrom' => 'getApplyFrom', 'applyUntil' => 'getApplyUntil', - 'deductionIsPercentage' => 'getDeductionIsPercentage', + 'autoDeduction' => 'getAutoDeduction', + 'bankDetails' => 'getBankDetails', + 'carryForwardShortfall' => 'getCarryForwardShortfall', + 'chargeAdminFee' => 'getChargeAdminFee', 'deduction' => 'getDeduction', - 'protectedEarningsIsPercentage' => 'getProtectedEarningsIsPercentage', + 'deductionIsPercentage' => 'getDeductionIsPercentage', + 'documentCount' => 'getDocumentCount', + 'documents' => 'getDocuments', + 'employee' => 'getEmployee', + 'id' => 'getId', + 'includeBankDetails' => 'getIncludeBankDetails', + 'issueDate' => 'getIssueDate', + 'notes' => 'getNotes', + 'payee' => 'getPayee', + 'payeeName' => 'getPayeeName', + 'payments' => 'getPayments', 'protectedEarnings' => 'getProtectedEarnings', - 'chargeAdminFee' => 'getChargeAdminFee', + 'protectedEarningsIsPercentage' => 'getProtectedEarningsIsPercentage', + 'reference' => 'getReference', 'shortfall' => 'getShortfall', 'stopWhenTotalPaid' => 'getStopWhenTotalPaid', - 'totalAmountToPay' => 'getTotalAmountToPay', - 'amountPreviouslyPaid' => 'getAmountPreviouslyPaid', 'stopped' => 'getStopped', - 'notes' => 'getNotes', - 'includeBankDetails' => 'getIncludeBankDetails', - 'bankDetails' => 'getBankDetails', - 'payments' => 'getPayments', - 'payee' => 'getPayee', - 'payeeName' => 'getPayeeName', - 'documentCount' => 'getDocumentCount', - 'documents' => 'getDocuments', - 'employee' => 'getEmployee', - 'id' => 'getId' + 'totalAmountToPay' => 'getTotalAmountToPay', + 'type' => 'getType' ]; /** @@ -406,34 +406,34 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('carryForwardShortfall', $data ?? [], null); $this->setIfExists('allowProtectedEarnings', $data ?? [], null); - $this->setIfExists('autoDeduction', $data ?? [], null); - $this->setIfExists('reference', $data ?? [], null); - $this->setIfExists('issueDate', $data ?? [], null); + $this->setIfExists('amountPreviouslyPaid', $data ?? [], null); $this->setIfExists('applyFrom', $data ?? [], null); $this->setIfExists('applyUntil', $data ?? [], null); - $this->setIfExists('deductionIsPercentage', $data ?? [], null); - $this->setIfExists('deduction', $data ?? [], null); - $this->setIfExists('protectedEarningsIsPercentage', $data ?? [], null); - $this->setIfExists('protectedEarnings', $data ?? [], null); - $this->setIfExists('chargeAdminFee', $data ?? [], null); - $this->setIfExists('shortfall', $data ?? [], null); - $this->setIfExists('stopWhenTotalPaid', $data ?? [], null); - $this->setIfExists('totalAmountToPay', $data ?? [], null); - $this->setIfExists('amountPreviouslyPaid', $data ?? [], null); - $this->setIfExists('stopped', $data ?? [], null); - $this->setIfExists('notes', $data ?? [], null); - $this->setIfExists('includeBankDetails', $data ?? [], null); + $this->setIfExists('autoDeduction', $data ?? [], null); $this->setIfExists('bankDetails', $data ?? [], null); - $this->setIfExists('payments', $data ?? [], null); - $this->setIfExists('payee', $data ?? [], null); - $this->setIfExists('payeeName', $data ?? [], null); + $this->setIfExists('carryForwardShortfall', $data ?? [], null); + $this->setIfExists('chargeAdminFee', $data ?? [], null); + $this->setIfExists('deduction', $data ?? [], null); + $this->setIfExists('deductionIsPercentage', $data ?? [], null); $this->setIfExists('documentCount', $data ?? [], null); $this->setIfExists('documents', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('includeBankDetails', $data ?? [], null); + $this->setIfExists('issueDate', $data ?? [], null); + $this->setIfExists('notes', $data ?? [], null); + $this->setIfExists('payee', $data ?? [], null); + $this->setIfExists('payeeName', $data ?? [], null); + $this->setIfExists('payments', $data ?? [], null); + $this->setIfExists('protectedEarnings', $data ?? [], null); + $this->setIfExists('protectedEarningsIsPercentage', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('shortfall', $data ?? [], null); + $this->setIfExists('stopWhenTotalPaid', $data ?? [], null); + $this->setIfExists('stopped', $data ?? [], null); + $this->setIfExists('totalAmountToPay', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -463,14 +463,14 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (!is_null($this->container['reference']) && (mb_strlen($this->container['reference']) > 100)) { - $invalidProperties[] = "invalid value for 'reference', the character length must be smaller than or equal to 100."; - } - if (!is_null($this->container['notes']) && (mb_strlen($this->container['notes']) > 300)) { $invalidProperties[] = "invalid value for 'notes', the character length must be smaller than or equal to 300."; } + if (!is_null($this->container['reference']) && (mb_strlen($this->container['reference']) > 100)) { + $invalidProperties[] = "invalid value for 'reference', the character length must be smaller than or equal to 100."; + } + return $invalidProperties; } @@ -487,262 +487,224 @@ public function valid(): bool /** - * Gets type - * - * @return \SynergiTech\Staffology\Model\AttachmentOrderType|null - */ - public function getType(): ?\SynergiTech\Staffology\Model\AttachmentOrderType - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \SynergiTech\Staffology\Model\AttachmentOrderType|null $type type - * - * @return $this - */ - public function setType(?\SynergiTech\Staffology\Model\AttachmentOrderType $type): static - { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets carryForwardShortfall + * Gets allowProtectedEarnings * * @return bool|null */ - public function getCarryForwardShortfall(): ?bool + public function getAllowProtectedEarnings(): ?bool { - return $this->container['carryForwardShortfall']; + return $this->container['allowProtectedEarnings']; } /** - * Sets carryForwardShortfall + * Sets allowProtectedEarnings * - * @param bool|null $carryForwardShortfall [ReadOnly] Whether or not shortfalls should be carried forward + * @param bool|null $allowProtectedEarnings [ReadOnly] Whether or not shortfalls should be carried forward * * @return $this */ - public function setCarryForwardShortfall(?bool $carryForwardShortfall): static + public function setAllowProtectedEarnings(?bool $allowProtectedEarnings): static { - if (is_null($carryForwardShortfall)) { - throw new InvalidArgumentException('non-nullable carryForwardShortfall cannot be null'); + if (is_null($allowProtectedEarnings)) { + throw new InvalidArgumentException('non-nullable allowProtectedEarnings cannot be null'); } - $this->container['carryForwardShortfall'] = $carryForwardShortfall; + $this->container['allowProtectedEarnings'] = $allowProtectedEarnings; return $this; } /** - * Gets allowProtectedEarnings + * Gets amountPreviouslyPaid * - * @return bool|null + * @return float|null */ - public function getAllowProtectedEarnings(): ?bool + public function getAmountPreviouslyPaid(): ?float { - return $this->container['allowProtectedEarnings']; + return $this->container['amountPreviouslyPaid']; } /** - * Sets allowProtectedEarnings + * Sets amountPreviouslyPaid * - * @param bool|null $allowProtectedEarnings [ReadOnly] Whether or not shortfalls should be carried forward + * @param float|null $amountPreviouslyPaid Any amount that has previously been paid towards this Order * * @return $this */ - public function setAllowProtectedEarnings(?bool $allowProtectedEarnings): static + public function setAmountPreviouslyPaid(?float $amountPreviouslyPaid): static { - if (is_null($allowProtectedEarnings)) { - throw new InvalidArgumentException('non-nullable allowProtectedEarnings cannot be null'); + if (is_null($amountPreviouslyPaid)) { + throw new InvalidArgumentException('non-nullable amountPreviouslyPaid cannot be null'); } - $this->container['allowProtectedEarnings'] = $allowProtectedEarnings; + $this->container['amountPreviouslyPaid'] = $amountPreviouslyPaid; return $this; } /** - * Gets autoDeduction + * Gets applyFrom * - * @return bool|null + * @return \DateTime|null */ - public function getAutoDeduction(): ?bool + public function getApplyFrom(): ?\DateTime { - return $this->container['autoDeduction']; + return $this->container['applyFrom']; } /** - * Sets autoDeduction + * Sets applyFrom * - * @param bool|null $autoDeduction [readonly] Whether or not the amount to be deducted is automatically calculated + * @param \DateTime|null $applyFrom The date from which to apply this Order * * @return $this */ - public function setAutoDeduction(?bool $autoDeduction): static + public function setApplyFrom(?\DateTime $applyFrom): static { - if (is_null($autoDeduction)) { - throw new InvalidArgumentException('non-nullable autoDeduction cannot be null'); + if (is_null($applyFrom)) { + throw new InvalidArgumentException('non-nullable applyFrom cannot be null'); } - $this->container['autoDeduction'] = $autoDeduction; + $this->container['applyFrom'] = $applyFrom; return $this; } /** - * Gets reference + * Gets applyUntil * - * @return string|null + * @return \DateTime|null */ - public function getReference(): ?string + public function getApplyUntil(): ?\DateTime { - return $this->container['reference']; + return $this->container['applyUntil']; } /** - * Sets reference + * Sets applyUntil * - * @param string|null $reference The reference which appeared on the court paperwork + * @param \DateTime|null $applyUntil An optional date on which to stop applying this order * * @return $this */ - public function setReference(?string $reference): static + public function setApplyUntil(?\DateTime $applyUntil): static { - if (is_null($reference)) { - array_push($this->openAPINullablesSetToNull, 'reference'); + if (is_null($applyUntil)) { + array_push($this->openAPINullablesSetToNull, 'applyUntil'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('reference', $nullablesSetToNull); + $index = array_search('applyUntil', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($reference) && (mb_strlen($reference) > 100)) { - throw new InvalidArgumentException('invalid length for $reference when calling AttachmentOrder., must be smaller than or equal to 100.'); - } - - $this->container['reference'] = $reference; + $this->container['applyUntil'] = $applyUntil; return $this; } /** - * Gets issueDate + * Gets autoDeduction * - * @return \DateTime|null + * @return bool|null */ - public function getIssueDate(): ?\DateTime + public function getAutoDeduction(): ?bool { - return $this->container['issueDate']; + return $this->container['autoDeduction']; } /** - * Sets issueDate + * Sets autoDeduction * - * @param \DateTime|null $issueDate The date of issue for this Order + * @param bool|null $autoDeduction [readonly] Whether or not the amount to be deducted is automatically calculated * * @return $this */ - public function setIssueDate(?\DateTime $issueDate): static + public function setAutoDeduction(?bool $autoDeduction): static { - if (is_null($issueDate)) { - throw new InvalidArgumentException('non-nullable issueDate cannot be null'); + if (is_null($autoDeduction)) { + throw new InvalidArgumentException('non-nullable autoDeduction cannot be null'); } - $this->container['issueDate'] = $issueDate; + $this->container['autoDeduction'] = $autoDeduction; return $this; } /** - * Gets applyFrom + * Gets bankDetails * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\BankDetails|null */ - public function getApplyFrom(): ?\DateTime + public function getBankDetails(): ?\SynergiTech\Staffology\Model\BankDetails { - return $this->container['applyFrom']; + return $this->container['bankDetails']; } /** - * Sets applyFrom + * Sets bankDetails * - * @param \DateTime|null $applyFrom The date from which to apply this Order + * @param \SynergiTech\Staffology\Model\BankDetails|null $bankDetails bankDetails * * @return $this */ - public function setApplyFrom(?\DateTime $applyFrom): static + public function setBankDetails(?\SynergiTech\Staffology\Model\BankDetails $bankDetails): static { - if (is_null($applyFrom)) { - throw new InvalidArgumentException('non-nullable applyFrom cannot be null'); + if (is_null($bankDetails)) { + throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); } - $this->container['applyFrom'] = $applyFrom; + $this->container['bankDetails'] = $bankDetails; return $this; } /** - * Gets applyUntil + * Gets carryForwardShortfall * - * @return \DateTime|null + * @return bool|null */ - public function getApplyUntil(): ?\DateTime + public function getCarryForwardShortfall(): ?bool { - return $this->container['applyUntil']; + return $this->container['carryForwardShortfall']; } /** - * Sets applyUntil + * Sets carryForwardShortfall * - * @param \DateTime|null $applyUntil An optional date on which to stop applying this order + * @param bool|null $carryForwardShortfall [ReadOnly] Whether or not shortfalls should be carried forward * * @return $this */ - public function setApplyUntil(?\DateTime $applyUntil): static + public function setCarryForwardShortfall(?bool $carryForwardShortfall): static { - if (is_null($applyUntil)) { - array_push($this->openAPINullablesSetToNull, 'applyUntil'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('applyUntil', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($carryForwardShortfall)) { + throw new InvalidArgumentException('non-nullable carryForwardShortfall cannot be null'); } - $this->container['applyUntil'] = $applyUntil; + $this->container['carryForwardShortfall'] = $carryForwardShortfall; return $this; } /** - * Gets deductionIsPercentage + * Gets chargeAdminFee * * @return bool|null */ - public function getDeductionIsPercentage(): ?bool + public function getChargeAdminFee(): ?bool { - return $this->container['deductionIsPercentage']; + return $this->container['chargeAdminFee']; } /** - * Sets deductionIsPercentage + * Sets chargeAdminFee * - * @param bool|null $deductionIsPercentage Whether or not the amount given for Deduction is a percentage rather than a fixed amount + * @param bool|null $chargeAdminFee Whether or not a £1 admin fee should be deducted for this order * * @return $this */ - public function setDeductionIsPercentage(?bool $deductionIsPercentage): static + public function setChargeAdminFee(?bool $chargeAdminFee): static { - if (is_null($deductionIsPercentage)) { - throw new InvalidArgumentException('non-nullable deductionIsPercentage cannot be null'); + if (is_null($chargeAdminFee)) { + throw new InvalidArgumentException('non-nullable chargeAdminFee cannot be null'); } - $this->container['deductionIsPercentage'] = $deductionIsPercentage; + $this->container['chargeAdminFee'] = $chargeAdminFee; return $this; } @@ -775,217 +737,197 @@ public function setDeduction(?float $deduction): static } /** - * Gets protectedEarningsIsPercentage + * Gets deductionIsPercentage * * @return bool|null */ - public function getProtectedEarningsIsPercentage(): ?bool + public function getDeductionIsPercentage(): ?bool { - return $this->container['protectedEarningsIsPercentage']; + return $this->container['deductionIsPercentage']; } /** - * Sets protectedEarningsIsPercentage + * Sets deductionIsPercentage * - * @param bool|null $protectedEarningsIsPercentage Whether or not the amount for ProtectedEarnings is a percentage rather than a fixed amount. + * @param bool|null $deductionIsPercentage Whether or not the amount given for Deduction is a percentage rather than a fixed amount * * @return $this */ - public function setProtectedEarningsIsPercentage(?bool $protectedEarningsIsPercentage): static + public function setDeductionIsPercentage(?bool $deductionIsPercentage): static { - if (is_null($protectedEarningsIsPercentage)) { - throw new InvalidArgumentException('non-nullable protectedEarningsIsPercentage cannot be null'); + if (is_null($deductionIsPercentage)) { + throw new InvalidArgumentException('non-nullable deductionIsPercentage cannot be null'); } - $this->container['protectedEarningsIsPercentage'] = $protectedEarningsIsPercentage; + $this->container['deductionIsPercentage'] = $deductionIsPercentage; return $this; } /** - * Gets protectedEarnings + * Gets documentCount * - * @return float|null + * @return int|null */ - public function getProtectedEarnings(): ?float + public function getDocumentCount(): ?int { - return $this->container['protectedEarnings']; + return $this->container['documentCount']; } /** - * Sets protectedEarnings + * Sets documentCount * - * @param float|null $protectedEarnings The percentage or amount or percentage (depending on ProtectedEarningsIsPercentage) to protect + * @param int|null $documentCount [readonly] The number of attachments associated with this model * * @return $this */ - public function setProtectedEarnings(?float $protectedEarnings): static + public function setDocumentCount(?int $documentCount): static { - if (is_null($protectedEarnings)) { - throw new InvalidArgumentException('non-nullable protectedEarnings cannot be null'); + if (is_null($documentCount)) { + throw new InvalidArgumentException('non-nullable documentCount cannot be null'); } - $this->container['protectedEarnings'] = $protectedEarnings; + $this->container['documentCount'] = $documentCount; return $this; } /** - * Gets chargeAdminFee + * Gets documents * - * @return bool|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getChargeAdminFee(): ?bool + public function getDocuments(): ?array { - return $this->container['chargeAdminFee']; + return $this->container['documents']; } /** - * Sets chargeAdminFee + * Sets documents * - * @param bool|null $chargeAdminFee Whether or not a £1 admin fee should be deducted for this order + * @param \SynergiTech\Staffology\Model\Item[]|null $documents [readonly] The attachments associated with this model * * @return $this */ - public function setChargeAdminFee(?bool $chargeAdminFee): static + public function setDocuments(?array $documents): static { - if (is_null($chargeAdminFee)) { - throw new InvalidArgumentException('non-nullable chargeAdminFee cannot be null'); - } - $this->container['chargeAdminFee'] = $chargeAdminFee; - - return $this; - } - - /** - * Gets shortfall - * - * @return float|null - */ - public function getShortfall(): ?float - { - return $this->container['shortfall']; - } - - /** - * Sets shortfall - * - * @param float|null $shortfall Any shortfall that is being carried forward - * - * @return $this - */ - public function setShortfall(?float $shortfall): static - { - if (is_null($shortfall)) { - throw new InvalidArgumentException('non-nullable shortfall cannot be null'); + if (is_null($documents)) { + array_push($this->openAPINullablesSetToNull, 'documents'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('documents', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['shortfall'] = $shortfall; + $this->container['documents'] = $documents; return $this; } /** - * Gets stopWhenTotalPaid + * Gets employee * - * @return bool|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getStopWhenTotalPaid(): ?bool + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['stopWhenTotalPaid']; + return $this->container['employee']; } /** - * Sets stopWhenTotalPaid + * Sets employee * - * @param bool|null $stopWhenTotalPaid Whether or not this order should be stopped once a total amount has been paid + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setStopWhenTotalPaid(?bool $stopWhenTotalPaid): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($stopWhenTotalPaid)) { - throw new InvalidArgumentException('non-nullable stopWhenTotalPaid cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['stopWhenTotalPaid'] = $stopWhenTotalPaid; + $this->container['employee'] = $employee; return $this; } /** - * Gets totalAmountToPay + * Gets id * - * @return float|null + * @return string|null */ - public function getTotalAmountToPay(): ?float + public function getId(): ?string { - return $this->container['totalAmountToPay']; + return $this->container['id']; } /** - * Sets totalAmountToPay + * Sets id * - * @param float|null $totalAmountToPay The Total amount that needs to be paid for this Order + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setTotalAmountToPay(?float $totalAmountToPay): static + public function setId(?string $id): static { - if (is_null($totalAmountToPay)) { - throw new InvalidArgumentException('non-nullable totalAmountToPay cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['totalAmountToPay'] = $totalAmountToPay; + $this->container['id'] = $id; return $this; } /** - * Gets amountPreviouslyPaid + * Gets includeBankDetails * - * @return float|null + * @return bool|null */ - public function getAmountPreviouslyPaid(): ?float + public function getIncludeBankDetails(): ?bool { - return $this->container['amountPreviouslyPaid']; + return $this->container['includeBankDetails']; } /** - * Sets amountPreviouslyPaid + * Sets includeBankDetails * - * @param float|null $amountPreviouslyPaid Any amount that has previously been paid towards this Order + * @param bool|null $includeBankDetails includeBankDetails * * @return $this */ - public function setAmountPreviouslyPaid(?float $amountPreviouslyPaid): static + public function setIncludeBankDetails(?bool $includeBankDetails): static { - if (is_null($amountPreviouslyPaid)) { - throw new InvalidArgumentException('non-nullable amountPreviouslyPaid cannot be null'); + if (is_null($includeBankDetails)) { + throw new InvalidArgumentException('non-nullable includeBankDetails cannot be null'); } - $this->container['amountPreviouslyPaid'] = $amountPreviouslyPaid; + $this->container['includeBankDetails'] = $includeBankDetails; return $this; } /** - * Gets stopped + * Gets issueDate * - * @return bool|null + * @return \DateTime|null */ - public function getStopped(): ?bool + public function getIssueDate(): ?\DateTime { - return $this->container['stopped']; + return $this->container['issueDate']; } /** - * Sets stopped + * Sets issueDate * - * @param bool|null $stopped [readonly] Whether or not this Order has been stopped. This is set automatically when either it's paid in full or the ApplyUntil date has been reached. + * @param \DateTime|null $issueDate The date of issue for this Order * * @return $this */ - public function setStopped(?bool $stopped): static + public function setIssueDate(?\DateTime $issueDate): static { - if (is_null($stopped)) { - throw new InvalidArgumentException('non-nullable stopped cannot be null'); + if (is_null($issueDate)) { + throw new InvalidArgumentException('non-nullable issueDate cannot be null'); } - $this->container['stopped'] = $stopped; + $this->container['issueDate'] = $issueDate; return $this; } @@ -1029,55 +971,69 @@ public function setNotes(?string $notes): static } /** - * Gets includeBankDetails + * Gets payee * - * @return bool|null + * @return string|null */ - public function getIncludeBankDetails(): ?bool + public function getPayee(): ?string { - return $this->container['includeBankDetails']; + return $this->container['payee']; } /** - * Sets includeBankDetails + * Sets payee * - * @param bool|null $includeBankDetails includeBankDetails + * @param string|null $payee The Id of the Payee, if any, that deductions are to be paid to. * * @return $this */ - public function setIncludeBankDetails(?bool $includeBankDetails): static + public function setPayee(?string $payee): static { - if (is_null($includeBankDetails)) { - throw new InvalidArgumentException('non-nullable includeBankDetails cannot be null'); + if (is_null($payee)) { + array_push($this->openAPINullablesSetToNull, 'payee'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payee', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['includeBankDetails'] = $includeBankDetails; + $this->container['payee'] = $payee; return $this; } /** - * Gets bankDetails + * Gets payeeName * - * @return \SynergiTech\Staffology\Model\BankDetails|null + * @return string|null */ - public function getBankDetails(): ?\SynergiTech\Staffology\Model\BankDetails + public function getPayeeName(): ?string { - return $this->container['bankDetails']; + return $this->container['payeeName']; } /** - * Sets bankDetails + * Sets payeeName * - * @param \SynergiTech\Staffology\Model\BankDetails|null $bankDetails bankDetails + * @param string|null $payeeName The name of the Payee, if any, that deductions are to be paid to. * * @return $this */ - public function setBankDetails(?\SynergiTech\Staffology\Model\BankDetails $bankDetails): static + public function setPayeeName(?string $payeeName): static { - if (is_null($bankDetails)) { - throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); + if (is_null($payeeName)) { + array_push($this->openAPINullablesSetToNull, 'payeeName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payeeName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['bankDetails'] = $bankDetails; + $this->container['payeeName'] = $payeeName; return $this; } @@ -1117,184 +1073,228 @@ public function setPayments(?array $payments): static } /** - * Gets payee + * Gets protectedEarnings * - * @return string|null + * @return float|null */ - public function getPayee(): ?string + public function getProtectedEarnings(): ?float { - return $this->container['payee']; + return $this->container['protectedEarnings']; } /** - * Sets payee + * Sets protectedEarnings * - * @param string|null $payee The Id of the Payee, if any, that deductions are to be paid to. + * @param float|null $protectedEarnings The percentage or amount or percentage (depending on ProtectedEarningsIsPercentage) to protect * * @return $this */ - public function setPayee(?string $payee): static + public function setProtectedEarnings(?float $protectedEarnings): static { - if (is_null($payee)) { - array_push($this->openAPINullablesSetToNull, 'payee'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payee', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($protectedEarnings)) { + throw new InvalidArgumentException('non-nullable protectedEarnings cannot be null'); } - $this->container['payee'] = $payee; + $this->container['protectedEarnings'] = $protectedEarnings; return $this; } /** - * Gets payeeName + * Gets protectedEarningsIsPercentage + * + * @return bool|null + */ + public function getProtectedEarningsIsPercentage(): ?bool + { + return $this->container['protectedEarningsIsPercentage']; + } + + /** + * Sets protectedEarningsIsPercentage + * + * @param bool|null $protectedEarningsIsPercentage Whether or not the amount for ProtectedEarnings is a percentage rather than a fixed amount. + * + * @return $this + */ + public function setProtectedEarningsIsPercentage(?bool $protectedEarningsIsPercentage): static + { + if (is_null($protectedEarningsIsPercentage)) { + throw new InvalidArgumentException('non-nullable protectedEarningsIsPercentage cannot be null'); + } + $this->container['protectedEarningsIsPercentage'] = $protectedEarningsIsPercentage; + + return $this; + } + + /** + * Gets reference * * @return string|null */ - public function getPayeeName(): ?string + public function getReference(): ?string { - return $this->container['payeeName']; + return $this->container['reference']; } /** - * Sets payeeName + * Sets reference * - * @param string|null $payeeName The name of the Payee, if any, that deductions are to be paid to. + * @param string|null $reference The reference which appeared on the court paperwork * * @return $this */ - public function setPayeeName(?string $payeeName): static + public function setReference(?string $reference): static { - if (is_null($payeeName)) { - array_push($this->openAPINullablesSetToNull, 'payeeName'); + if (is_null($reference)) { + array_push($this->openAPINullablesSetToNull, 'reference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payeeName', $nullablesSetToNull); + $index = array_search('reference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payeeName'] = $payeeName; + if (!is_null($reference) && (mb_strlen($reference) > 100)) { + throw new InvalidArgumentException('invalid length for $reference when calling AttachmentOrder., must be smaller than or equal to 100.'); + } + + $this->container['reference'] = $reference; return $this; } /** - * Gets documentCount + * Gets shortfall * - * @return int|null + * @return float|null */ - public function getDocumentCount(): ?int + public function getShortfall(): ?float { - return $this->container['documentCount']; + return $this->container['shortfall']; } /** - * Sets documentCount + * Sets shortfall * - * @param int|null $documentCount [readonly] The number of attachments associated with this model + * @param float|null $shortfall Any shortfall that is being carried forward * * @return $this */ - public function setDocumentCount(?int $documentCount): static + public function setShortfall(?float $shortfall): static { - if (is_null($documentCount)) { - throw new InvalidArgumentException('non-nullable documentCount cannot be null'); + if (is_null($shortfall)) { + throw new InvalidArgumentException('non-nullable shortfall cannot be null'); } - $this->container['documentCount'] = $documentCount; + $this->container['shortfall'] = $shortfall; return $this; } /** - * Gets documents + * Gets stopWhenTotalPaid * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return bool|null */ - public function getDocuments(): ?array + public function getStopWhenTotalPaid(): ?bool { - return $this->container['documents']; + return $this->container['stopWhenTotalPaid']; } /** - * Sets documents + * Sets stopWhenTotalPaid * - * @param \SynergiTech\Staffology\Model\Item[]|null $documents [readonly] The attachments associated with this model + * @param bool|null $stopWhenTotalPaid Whether or not this order should be stopped once a total amount has been paid * * @return $this */ - public function setDocuments(?array $documents): static + public function setStopWhenTotalPaid(?bool $stopWhenTotalPaid): static { - if (is_null($documents)) { - array_push($this->openAPINullablesSetToNull, 'documents'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('documents', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($stopWhenTotalPaid)) { + throw new InvalidArgumentException('non-nullable stopWhenTotalPaid cannot be null'); } - $this->container['documents'] = $documents; + $this->container['stopWhenTotalPaid'] = $stopWhenTotalPaid; return $this; } /** - * Gets employee + * Gets stopped * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getStopped(): ?bool { - return $this->container['employee']; + return $this->container['stopped']; } /** - * Sets employee + * Sets stopped * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param bool|null $stopped [readonly] Whether or not this Order has been stopped. This is set automatically when either it's paid in full or the ApplyUntil date has been reached. * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setStopped(?bool $stopped): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($stopped)) { + throw new InvalidArgumentException('non-nullable stopped cannot be null'); } - $this->container['employee'] = $employee; + $this->container['stopped'] = $stopped; return $this; } /** - * Gets id + * Gets totalAmountToPay * - * @return string|null + * @return float|null */ - public function getId(): ?string + public function getTotalAmountToPay(): ?float { - return $this->container['id']; + return $this->container['totalAmountToPay']; } /** - * Sets id + * Sets totalAmountToPay * - * @param string|null $id [readonly] The unique id of the object + * @param float|null $totalAmountToPay The Total amount that needs to be paid for this Order * * @return $this */ - public function setId(?string $id): static + public function setTotalAmountToPay(?float $totalAmountToPay): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($totalAmountToPay)) { + throw new InvalidArgumentException('non-nullable totalAmountToPay cannot be null'); } - $this->container['id'] = $id; + $this->container['totalAmountToPay'] = $totalAmountToPay; + + return $this; + } + + /** + * Gets type + * + * @return \SynergiTech\Staffology\Model\AttachmentOrderType|null + */ + public function getType(): ?\SynergiTech\Staffology\Model\AttachmentOrderType + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \SynergiTech\Staffology\Model\AttachmentOrderType|null $type type + * + * @return $this + */ + public function setType(?\SynergiTech\Staffology\Model\AttachmentOrderType $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; return $this; } diff --git a/src/Model/AttachmentOrderPayment.php b/src/Model/AttachmentOrderPayment.php index bb82400..cf66db5 100644 --- a/src/Model/AttachmentOrderPayment.php +++ b/src/Model/AttachmentOrderPayment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,22 +60,24 @@ class AttachmentOrderPayment implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ + 'adminFee' => 'float', + 'attachablePay' => 'float', 'attachmentOrder' => '\SynergiTech\Staffology\Model\Item', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'date' => '\DateTime', 'description' => 'string', - 'attachablePay' => 'float', - 'protectedPay' => 'float', - 'otherAttachmentOrderDeductions' => 'float', 'desiredDeduction' => 'float', - 'shortfall' => 'float', - 'totalPaid' => 'float', + 'employee' => '\SynergiTech\Staffology\Model\Item', + 'id' => 'string', + 'isLatestVersion' => 'bool', + 'otherAttachmentOrderDeductions' => 'float', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'payRunVersion' => 'int', + 'protectedPay' => 'float', 'resultingDeduction' => 'float', 'resultingShortfall' => 'float', - 'adminFee' => 'float', - 'employee' => '\SynergiTech\Staffology\Model\Item', - 'id' => 'string' + 'shortfall' => 'float', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'totalPaid' => 'float' ]; /** @@ -84,22 +86,24 @@ class AttachmentOrderPayment implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ + 'adminFee' => 'double', + 'attachablePay' => 'double', 'attachmentOrder' => null, - 'taxYear' => null, - 'payPeriod' => null, 'date' => 'date', 'description' => null, - 'attachablePay' => 'double', - 'protectedPay' => 'double', - 'otherAttachmentOrderDeductions' => 'double', 'desiredDeduction' => 'double', - 'shortfall' => 'double', - 'totalPaid' => 'double', + 'employee' => null, + 'id' => 'uuid', + 'isLatestVersion' => null, + 'otherAttachmentOrderDeductions' => 'double', + 'payPeriod' => null, + 'payRunVersion' => 'int32', + 'protectedPay' => 'double', 'resultingDeduction' => 'double', 'resultingShortfall' => 'double', - 'adminFee' => 'double', - 'employee' => null, - 'id' => 'uuid' + 'shortfall' => 'double', + 'taxYear' => null, + 'totalPaid' => 'double' ]; /** @@ -108,22 +112,24 @@ class AttachmentOrderPayment implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ + 'adminFee' => false, + 'attachablePay' => false, 'attachmentOrder' => false, - 'taxYear' => false, - 'payPeriod' => false, 'date' => false, 'description' => true, - 'attachablePay' => false, - 'protectedPay' => false, - 'otherAttachmentOrderDeductions' => false, 'desiredDeduction' => false, - 'shortfall' => false, - 'totalPaid' => false, + 'employee' => false, + 'id' => false, + 'isLatestVersion' => false, + 'otherAttachmentOrderDeductions' => false, + 'payPeriod' => false, + 'payRunVersion' => false, + 'protectedPay' => false, 'resultingDeduction' => false, 'resultingShortfall' => false, - 'adminFee' => false, - 'employee' => false, - 'id' => false + 'shortfall' => false, + 'taxYear' => false, + 'totalPaid' => false ]; /** @@ -212,22 +218,24 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'adminFee' => 'adminFee', + 'attachablePay' => 'attachablePay', 'attachmentOrder' => 'attachmentOrder', - 'taxYear' => 'taxYear', - 'payPeriod' => 'payPeriod', 'date' => 'date', 'description' => 'description', - 'attachablePay' => 'attachablePay', - 'protectedPay' => 'protectedPay', - 'otherAttachmentOrderDeductions' => 'otherAttachmentOrderDeductions', 'desiredDeduction' => 'desiredDeduction', - 'shortfall' => 'shortfall', - 'totalPaid' => 'totalPaid', + 'employee' => 'employee', + 'id' => 'id', + 'isLatestVersion' => 'isLatestVersion', + 'otherAttachmentOrderDeductions' => 'otherAttachmentOrderDeductions', + 'payPeriod' => 'payPeriod', + 'payRunVersion' => 'payRunVersion', + 'protectedPay' => 'protectedPay', 'resultingDeduction' => 'resultingDeduction', 'resultingShortfall' => 'resultingShortfall', - 'adminFee' => 'adminFee', - 'employee' => 'employee', - 'id' => 'id' + 'shortfall' => 'shortfall', + 'taxYear' => 'taxYear', + 'totalPaid' => 'totalPaid' ]; /** @@ -236,22 +244,24 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'adminFee' => 'setAdminFee', + 'attachablePay' => 'setAttachablePay', 'attachmentOrder' => 'setAttachmentOrder', - 'taxYear' => 'setTaxYear', - 'payPeriod' => 'setPayPeriod', 'date' => 'setDate', 'description' => 'setDescription', - 'attachablePay' => 'setAttachablePay', - 'protectedPay' => 'setProtectedPay', - 'otherAttachmentOrderDeductions' => 'setOtherAttachmentOrderDeductions', 'desiredDeduction' => 'setDesiredDeduction', - 'shortfall' => 'setShortfall', - 'totalPaid' => 'setTotalPaid', + 'employee' => 'setEmployee', + 'id' => 'setId', + 'isLatestVersion' => 'setIsLatestVersion', + 'otherAttachmentOrderDeductions' => 'setOtherAttachmentOrderDeductions', + 'payPeriod' => 'setPayPeriod', + 'payRunVersion' => 'setPayRunVersion', + 'protectedPay' => 'setProtectedPay', 'resultingDeduction' => 'setResultingDeduction', 'resultingShortfall' => 'setResultingShortfall', - 'adminFee' => 'setAdminFee', - 'employee' => 'setEmployee', - 'id' => 'setId' + 'shortfall' => 'setShortfall', + 'taxYear' => 'setTaxYear', + 'totalPaid' => 'setTotalPaid' ]; /** @@ -260,22 +270,24 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'adminFee' => 'getAdminFee', + 'attachablePay' => 'getAttachablePay', 'attachmentOrder' => 'getAttachmentOrder', - 'taxYear' => 'getTaxYear', - 'payPeriod' => 'getPayPeriod', 'date' => 'getDate', 'description' => 'getDescription', - 'attachablePay' => 'getAttachablePay', - 'protectedPay' => 'getProtectedPay', - 'otherAttachmentOrderDeductions' => 'getOtherAttachmentOrderDeductions', 'desiredDeduction' => 'getDesiredDeduction', - 'shortfall' => 'getShortfall', - 'totalPaid' => 'getTotalPaid', + 'employee' => 'getEmployee', + 'id' => 'getId', + 'isLatestVersion' => 'getIsLatestVersion', + 'otherAttachmentOrderDeductions' => 'getOtherAttachmentOrderDeductions', + 'payPeriod' => 'getPayPeriod', + 'payRunVersion' => 'getPayRunVersion', + 'protectedPay' => 'getProtectedPay', 'resultingDeduction' => 'getResultingDeduction', 'resultingShortfall' => 'getResultingShortfall', - 'adminFee' => 'getAdminFee', - 'employee' => 'getEmployee', - 'id' => 'getId' + 'shortfall' => 'getShortfall', + 'taxYear' => 'getTaxYear', + 'totalPaid' => 'getTotalPaid' ]; /** @@ -334,22 +346,24 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('adminFee', $data ?? [], null); + $this->setIfExists('attachablePay', $data ?? [], null); $this->setIfExists('attachmentOrder', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('date', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('attachablePay', $data ?? [], null); - $this->setIfExists('protectedPay', $data ?? [], null); - $this->setIfExists('otherAttachmentOrderDeductions', $data ?? [], null); $this->setIfExists('desiredDeduction', $data ?? [], null); - $this->setIfExists('shortfall', $data ?? [], null); - $this->setIfExists('totalPaid', $data ?? [], null); - $this->setIfExists('resultingDeduction', $data ?? [], null); - $this->setIfExists('resultingShortfall', $data ?? [], null); - $this->setIfExists('adminFee', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isLatestVersion', $data ?? [], null); + $this->setIfExists('otherAttachmentOrderDeductions', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('payRunVersion', $data ?? [], null); + $this->setIfExists('protectedPay', $data ?? [], null); + $this->setIfExists('resultingDeduction', $data ?? [], null); + $this->setIfExists('resultingShortfall', $data ?? [], null); + $this->setIfExists('shortfall', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('totalPaid', $data ?? [], null); } /** @@ -395,82 +409,82 @@ public function valid(): bool /** - * Gets attachmentOrder + * Gets adminFee * - * @return \SynergiTech\Staffology\Model\Item|null + * @return float|null */ - public function getAttachmentOrder(): ?\SynergiTech\Staffology\Model\Item + public function getAdminFee(): ?float { - return $this->container['attachmentOrder']; + return $this->container['adminFee']; } /** - * Sets attachmentOrder + * Sets adminFee * - * @param \SynergiTech\Staffology\Model\Item|null $attachmentOrder attachmentOrder + * @param float|null $adminFee [readonly] Any admin fee charged * * @return $this */ - public function setAttachmentOrder(?\SynergiTech\Staffology\Model\Item $attachmentOrder): static + public function setAdminFee(?float $adminFee): static { - if (is_null($attachmentOrder)) { - throw new InvalidArgumentException('non-nullable attachmentOrder cannot be null'); + if (is_null($adminFee)) { + throw new InvalidArgumentException('non-nullable adminFee cannot be null'); } - $this->container['attachmentOrder'] = $attachmentOrder; + $this->container['adminFee'] = $adminFee; return $this; } /** - * Gets taxYear + * Gets attachablePay * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return float|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getAttachablePay(): ?float { - return $this->container['taxYear']; + return $this->container['attachablePay']; } /** - * Sets taxYear + * Sets attachablePay * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param float|null $attachablePay [readonly] The total Attachable pay for the Employee on this PayRun * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setAttachablePay(?float $attachablePay): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($attachablePay)) { + throw new InvalidArgumentException('non-nullable attachablePay cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['attachablePay'] = $attachablePay; return $this; } /** - * Gets payPeriod + * Gets attachmentOrder * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getAttachmentOrder(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['payPeriod']; + return $this->container['attachmentOrder']; } /** - * Sets payPeriod + * Sets attachmentOrder * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param \SynergiTech\Staffology\Model\Item|null $attachmentOrder attachmentOrder * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setAttachmentOrder(?\SynergiTech\Staffology\Model\Item $attachmentOrder): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($attachmentOrder)) { + throw new InvalidArgumentException('non-nullable attachmentOrder cannot be null'); } - $this->container['payPeriod'] = $payPeriod; + $this->container['attachmentOrder'] = $attachmentOrder; return $this; } @@ -537,55 +551,109 @@ public function setDescription(?string $description): static } /** - * Gets attachablePay + * Gets desiredDeduction * * @return float|null */ - public function getAttachablePay(): ?float + public function getDesiredDeduction(): ?float { - return $this->container['attachablePay']; + return $this->container['desiredDeduction']; } /** - * Sets attachablePay + * Sets desiredDeduction * - * @param float|null $attachablePay [readonly] The total Attachable pay for the Employee on this PayRun + * @param float|null $desiredDeduction [readonly] The amount that should be deducted, if arrestable pay is available. Not including any shortfall * * @return $this */ - public function setAttachablePay(?float $attachablePay): static + public function setDesiredDeduction(?float $desiredDeduction): static { - if (is_null($attachablePay)) { - throw new InvalidArgumentException('non-nullable attachablePay cannot be null'); + if (is_null($desiredDeduction)) { + throw new InvalidArgumentException('non-nullable desiredDeduction cannot be null'); } - $this->container['attachablePay'] = $attachablePay; + $this->container['desiredDeduction'] = $desiredDeduction; return $this; } /** - * Gets protectedPay + * Gets employee * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getProtectedPay(): ?float + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['protectedPay']; + return $this->container['employee']; } /** - * Sets protectedPay + * Sets employee * - * @param float|null $protectedPay [readonly] The amount of the Attachable Pay that must be protected + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setProtectedPay(?float $protectedPay): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($protectedPay)) { - throw new InvalidArgumentException('non-nullable protectedPay cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['protectedPay'] = $protectedPay; + $this->container['employee'] = $employee; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId(): ?string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id [readonly] The unique id of the object + * + * @return $this + */ + public function setId(?string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets isLatestVersion + * + * @return bool|null + */ + public function getIsLatestVersion(): ?bool + { + return $this->container['isLatestVersion']; + } + + /** + * Sets isLatestVersion + * + * @param bool|null $isLatestVersion [readonly] Indicates whether this is the latest version of the AttachmentOrderPayment. + * + * @return $this + */ + public function setIsLatestVersion(?bool $isLatestVersion): static + { + if (is_null($isLatestVersion)) { + throw new InvalidArgumentException('non-nullable isLatestVersion cannot be null'); + } + $this->container['isLatestVersion'] = $isLatestVersion; return $this; } @@ -618,82 +686,82 @@ public function setOtherAttachmentOrderDeductions(?float $otherAttachmentOrderDe } /** - * Gets desiredDeduction + * Gets payPeriod * - * @return float|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getDesiredDeduction(): ?float + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['desiredDeduction']; + return $this->container['payPeriod']; } /** - * Sets desiredDeduction + * Sets payPeriod * - * @param float|null $desiredDeduction [readonly] The amount that should be deducted, if arrestable pay is available. Not including any shortfall + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod * * @return $this */ - public function setDesiredDeduction(?float $desiredDeduction): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static { - if (is_null($desiredDeduction)) { - throw new InvalidArgumentException('non-nullable desiredDeduction cannot be null'); + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['desiredDeduction'] = $desiredDeduction; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets shortfall + * Gets payRunVersion * - * @return float|null + * @return int|null */ - public function getShortfall(): ?float + public function getPayRunVersion(): ?int { - return $this->container['shortfall']; + return $this->container['payRunVersion']; } /** - * Sets shortfall + * Sets payRunVersion * - * @param float|null $shortfall [readonly] Any shortfall (ie arrears) that existed before this PayRun. + * @param int|null $payRunVersion [readonly] The supplementary pay run version of this AttachmentOrderPayment. * * @return $this */ - public function setShortfall(?float $shortfall): static + public function setPayRunVersion(?int $payRunVersion): static { - if (is_null($shortfall)) { - throw new InvalidArgumentException('non-nullable shortfall cannot be null'); + if (is_null($payRunVersion)) { + throw new InvalidArgumentException('non-nullable payRunVersion cannot be null'); } - $this->container['shortfall'] = $shortfall; + $this->container['payRunVersion'] = $payRunVersion; return $this; } /** - * Gets totalPaid + * Gets protectedPay * * @return float|null */ - public function getTotalPaid(): ?float + public function getProtectedPay(): ?float { - return $this->container['totalPaid']; + return $this->container['protectedPay']; } /** - * Sets totalPaid + * Sets protectedPay * - * @param float|null $totalPaid [readonly] Total amount paid to date, including this deduction. + * @param float|null $protectedPay [readonly] The amount of the Attachable Pay that must be protected * * @return $this */ - public function setTotalPaid(?float $totalPaid): static + public function setProtectedPay(?float $protectedPay): static { - if (is_null($totalPaid)) { - throw new InvalidArgumentException('non-nullable totalPaid cannot be null'); + if (is_null($protectedPay)) { + throw new InvalidArgumentException('non-nullable protectedPay cannot be null'); } - $this->container['totalPaid'] = $totalPaid; + $this->container['protectedPay'] = $protectedPay; return $this; } @@ -753,82 +821,82 @@ public function setResultingShortfall(?float $resultingShortfall): static } /** - * Gets adminFee + * Gets shortfall * * @return float|null */ - public function getAdminFee(): ?float + public function getShortfall(): ?float { - return $this->container['adminFee']; + return $this->container['shortfall']; } /** - * Sets adminFee + * Sets shortfall * - * @param float|null $adminFee [readonly] Any admin fee charged + * @param float|null $shortfall [readonly] Any shortfall (ie arrears) that existed before this PayRun. * * @return $this */ - public function setAdminFee(?float $adminFee): static + public function setShortfall(?float $shortfall): static { - if (is_null($adminFee)) { - throw new InvalidArgumentException('non-nullable adminFee cannot be null'); + if (is_null($shortfall)) { + throw new InvalidArgumentException('non-nullable shortfall cannot be null'); } - $this->container['adminFee'] = $adminFee; + $this->container['shortfall'] = $shortfall; return $this; } /** - * Gets employee + * Gets taxYear * - * @return \SynergiTech\Staffology\Model\Item|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['employee']; + return $this->container['taxYear']; } /** - * Sets employee + * Sets taxYear * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['employee'] = $employee; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets id + * Gets totalPaid * - * @return string|null + * @return float|null */ - public function getId(): ?string + public function getTotalPaid(): ?float { - return $this->container['id']; + return $this->container['totalPaid']; } /** - * Sets id + * Sets totalPaid * - * @param string|null $id [readonly] The unique id of the object + * @param float|null $totalPaid [readonly] Total amount paid to date, including this deduction. * * @return $this */ - public function setId(?string $id): static + public function setTotalPaid(?float $totalPaid): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($totalPaid)) { + throw new InvalidArgumentException('non-nullable totalPaid cannot be null'); } - $this->container['id'] = $id; + $this->container['totalPaid'] = $totalPaid; return $this; } diff --git a/src/Model/AttachmentOrderReportResponse.php b/src/Model/AttachmentOrderReportResponse.php index 2799e69..a6d46a3 100644 --- a/src/Model/AttachmentOrderReportResponse.php +++ b/src/Model/AttachmentOrderReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class AttachmentOrderReportResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\AttachmentOrder', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class AttachmentOrderReportResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class AttachmentOrderReportResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/AttachmentOrderType.php b/src/Model/AttachmentOrderType.php index b4bc20c..bb7983c 100644 --- a/src/Model/AttachmentOrderType.php +++ b/src/Model/AttachmentOrderType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/AttachmentOrdersReport.php b/src/Model/AttachmentOrdersReport.php index 06e2513..bf26e4e 100644 --- a/src/Model/AttachmentOrdersReport.php +++ b/src/Model/AttachmentOrdersReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,18 +60,19 @@ class AttachmentOrdersReport implements ModelInterface, ArrayAccess, JsonSeriali */ protected static array $openAPITypes = [ 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'isDraft' => 'bool', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -81,18 +82,19 @@ class AttachmentOrdersReport implements ModelInterface, ArrayAccess, JsonSeriali */ protected static array $openAPIFormats = [ 'employer' => null, - 'payPeriod' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'isDraft' => null, 'ordinal' => 'int32', + 'payPeriod' => null, 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -102,18 +104,19 @@ class AttachmentOrdersReport implements ModelInterface, ArrayAccess, JsonSeriali */ protected static array $openAPINullables = [ 'employer' => false, - 'payPeriod' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'isDraft' => false, 'ordinal' => false, + 'payPeriod' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -203,18 +206,19 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'employer' => 'employer', - 'payPeriod' => 'payPeriod', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'isDraft' => 'isDraft', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -224,18 +228,19 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'isDraft' => 'setIsDraft', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -245,18 +250,19 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'isDraft' => 'getIsDraft', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -316,18 +322,19 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -400,28 +407,89 @@ public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): stat } /** - * Gets payPeriod + * Gets endDate * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return \DateTime|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getEndDate(): ?\DateTime { - return $this->container['payPeriod']; + return $this->container['endDate']; } /** - * Sets payPeriod + * Sets endDate * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param \DateTime|null $endDate endDate * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); } - $this->container['payPeriod'] = $payPeriod; + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets endPeriodName + * + * @return string|null + */ + public function getEndPeriodName(): ?string + { + return $this->container['endPeriodName']; + } + + /** + * Sets endPeriodName + * + * @param string|null $endPeriodName endPeriodName + * + * @return $this + */ + public function setEndPeriodName(?string $endPeriodName): static + { + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['endPeriodName'] = $endPeriodName; + + return $this; + } + + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; return $this; } @@ -453,6 +521,33 @@ public function setOrdinal(?int $ordinal): static return $this; } + /** + * Gets payPeriod + * + * @return \SynergiTech\Staffology\Model\PayPeriods|null + */ + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + { + return $this->container['payPeriod']; + } + + /** + * Sets payPeriod + * + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * + * @return $this + */ + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + { + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + } + $this->container['payPeriod'] = $payPeriod; + + return $this; + } + /** * Gets period * @@ -508,69 +603,28 @@ public function setPeriodTo(?int $periodTo): static } /** - * Gets startPeriodName - * - * @return string|null - */ - public function getStartPeriodName(): ?string - { - return $this->container['startPeriodName']; - } - - /** - * Sets startPeriodName - * - * @param string|null $startPeriodName startPeriodName - * - * @return $this - */ - public function setStartPeriodName(?string $startPeriodName): static - { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['startPeriodName'] = $startPeriodName; - - return $this; - } - - /** - * Gets endPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getEndPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['endPeriodName']; + return $this->container['report']; } /** - * Sets endPeriodName + * Sets report * - * @param string|null $endPeriodName endPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['report'] = $report; return $this; } @@ -603,55 +657,35 @@ public function setStartDate(?\DateTime $startDate): static } /** - * Gets endDate - * - * @return \DateTime|null - */ - public function getEndDate(): ?\DateTime - { - return $this->container['endDate']; - } - - /** - * Sets endDate - * - * @param \DateTime|null $endDate endDate - * - * @return $this - */ - public function setEndDate(?\DateTime $endDate): static - { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); - } - $this->container['endDate'] = $endDate; - - return $this; - } - - /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -718,28 +752,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/AttachmentOrdersReportReportResponse.php b/src/Model/AttachmentOrdersReportReportResponse.php index 53475da..68de084 100644 --- a/src/Model/AttachmentOrdersReportReportResponse.php +++ b/src/Model/AttachmentOrdersReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class AttachmentOrdersReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\AttachmentOrdersReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class AttachmentOrdersReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class AttachmentOrdersReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/AuditEventAction.php b/src/Model/AuditEventAction.php index 8569297..ef30683 100644 --- a/src/Model/AuditEventAction.php +++ b/src/Model/AuditEventAction.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/AuthScheme.php b/src/Model/AuthScheme.php index f926c4b..d100c2c 100644 --- a/src/Model/AuthScheme.php +++ b/src/Model/AuthScheme.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/AutoEnrolment.php b/src/Model/AutoEnrolment.php index d882ae2..786c534 100644 --- a/src/Model/AutoEnrolment.php +++ b/src/Model/AutoEnrolment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,16 @@ class AutoEnrolment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'state' => '\SynergiTech\Staffology\Model\AeEmployeeState', - 'stateDate' => '\DateTime', - 'ukWorker' => '\SynergiTech\Staffology\Model\AeUKWorker', + 'aeExclusionCode' => '\SynergiTech\Staffology\Model\AeExclusionCode', + 'aePostponementLetterSent' => 'bool', 'daysToDeferAssessment' => 'int', - 'postponementDate' => '\DateTime', 'deferByMonthsNotDays' => 'bool', 'exempt' => 'bool', - 'aeExclusionCode' => '\SynergiTech\Staffology\Model\AeExclusionCode', - 'aePostponementLetterSent' => 'bool', - 'lastAssessment' => '\SynergiTech\Staffology\Model\AeAssessment' + 'lastAssessment' => '\SynergiTech\Staffology\Model\AeAssessment', + 'postponementDate' => '\DateTime', + 'state' => '\SynergiTech\Staffology\Model\AeEmployeeState', + 'stateDate' => '\DateTime', + 'ukWorker' => '\SynergiTech\Staffology\Model\AeUKWorker' ]; /** @@ -77,16 +77,16 @@ class AutoEnrolment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'state' => null, - 'stateDate' => 'date', - 'ukWorker' => null, + 'aeExclusionCode' => null, + 'aePostponementLetterSent' => null, 'daysToDeferAssessment' => 'int32', - 'postponementDate' => 'date', 'deferByMonthsNotDays' => null, 'exempt' => null, - 'aeExclusionCode' => null, - 'aePostponementLetterSent' => null, - 'lastAssessment' => null + 'lastAssessment' => null, + 'postponementDate' => 'date', + 'state' => null, + 'stateDate' => 'date', + 'ukWorker' => null ]; /** @@ -95,16 +95,16 @@ class AutoEnrolment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'state' => false, - 'stateDate' => true, - 'ukWorker' => false, + 'aeExclusionCode' => false, + 'aePostponementLetterSent' => false, 'daysToDeferAssessment' => false, - 'postponementDate' => true, 'deferByMonthsNotDays' => false, 'exempt' => false, - 'aeExclusionCode' => false, - 'aePostponementLetterSent' => false, - 'lastAssessment' => false + 'lastAssessment' => false, + 'postponementDate' => true, + 'state' => false, + 'stateDate' => true, + 'ukWorker' => false ]; /** @@ -193,16 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'state' => 'state', - 'stateDate' => 'stateDate', - 'ukWorker' => 'ukWorker', + 'aeExclusionCode' => 'aeExclusionCode', + 'aePostponementLetterSent' => 'aePostponementLetterSent', 'daysToDeferAssessment' => 'daysToDeferAssessment', - 'postponementDate' => 'postponementDate', 'deferByMonthsNotDays' => 'deferByMonthsNotDays', 'exempt' => 'exempt', - 'aeExclusionCode' => 'aeExclusionCode', - 'aePostponementLetterSent' => 'aePostponementLetterSent', - 'lastAssessment' => 'lastAssessment' + 'lastAssessment' => 'lastAssessment', + 'postponementDate' => 'postponementDate', + 'state' => 'state', + 'stateDate' => 'stateDate', + 'ukWorker' => 'ukWorker' ]; /** @@ -211,16 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'state' => 'setState', - 'stateDate' => 'setStateDate', - 'ukWorker' => 'setUkWorker', + 'aeExclusionCode' => 'setAeExclusionCode', + 'aePostponementLetterSent' => 'setAePostponementLetterSent', 'daysToDeferAssessment' => 'setDaysToDeferAssessment', - 'postponementDate' => 'setPostponementDate', 'deferByMonthsNotDays' => 'setDeferByMonthsNotDays', 'exempt' => 'setExempt', - 'aeExclusionCode' => 'setAeExclusionCode', - 'aePostponementLetterSent' => 'setAePostponementLetterSent', - 'lastAssessment' => 'setLastAssessment' + 'lastAssessment' => 'setLastAssessment', + 'postponementDate' => 'setPostponementDate', + 'state' => 'setState', + 'stateDate' => 'setStateDate', + 'ukWorker' => 'setUkWorker' ]; /** @@ -229,16 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'state' => 'getState', - 'stateDate' => 'getStateDate', - 'ukWorker' => 'getUkWorker', + 'aeExclusionCode' => 'getAeExclusionCode', + 'aePostponementLetterSent' => 'getAePostponementLetterSent', 'daysToDeferAssessment' => 'getDaysToDeferAssessment', - 'postponementDate' => 'getPostponementDate', 'deferByMonthsNotDays' => 'getDeferByMonthsNotDays', 'exempt' => 'getExempt', - 'aeExclusionCode' => 'getAeExclusionCode', - 'aePostponementLetterSent' => 'getAePostponementLetterSent', - 'lastAssessment' => 'getLastAssessment' + 'lastAssessment' => 'getLastAssessment', + 'postponementDate' => 'getPostponementDate', + 'state' => 'getState', + 'stateDate' => 'getStateDate', + 'ukWorker' => 'getUkWorker' ]; /** @@ -297,16 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('state', $data ?? [], null); - $this->setIfExists('stateDate', $data ?? [], null); - $this->setIfExists('ukWorker', $data ?? [], null); + $this->setIfExists('aeExclusionCode', $data ?? [], null); + $this->setIfExists('aePostponementLetterSent', $data ?? [], null); $this->setIfExists('daysToDeferAssessment', $data ?? [], null); - $this->setIfExists('postponementDate', $data ?? [], null); $this->setIfExists('deferByMonthsNotDays', $data ?? [], null); $this->setIfExists('exempt', $data ?? [], null); - $this->setIfExists('aeExclusionCode', $data ?? [], null); - $this->setIfExists('aePostponementLetterSent', $data ?? [], null); $this->setIfExists('lastAssessment', $data ?? [], null); + $this->setIfExists('postponementDate', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('stateDate', $data ?? [], null); + $this->setIfExists('ukWorker', $data ?? [], null); } /** @@ -352,285 +352,285 @@ public function valid(): bool /** - * Gets state + * Gets aeExclusionCode * - * @return \SynergiTech\Staffology\Model\AeEmployeeState|null + * @return \SynergiTech\Staffology\Model\AeExclusionCode|null */ - public function getState(): ?\SynergiTech\Staffology\Model\AeEmployeeState + public function getAeExclusionCode(): ?\SynergiTech\Staffology\Model\AeExclusionCode { - return $this->container['state']; + return $this->container['aeExclusionCode']; } /** - * Sets state + * Sets aeExclusionCode * - * @param \SynergiTech\Staffology\Model\AeEmployeeState|null $state state + * @param \SynergiTech\Staffology\Model\AeExclusionCode|null $aeExclusionCode aeExclusionCode * * @return $this */ - public function setState(?\SynergiTech\Staffology\Model\AeEmployeeState $state): static + public function setAeExclusionCode(?\SynergiTech\Staffology\Model\AeExclusionCode $aeExclusionCode): static { - if (is_null($state)) { - throw new InvalidArgumentException('non-nullable state cannot be null'); + if (is_null($aeExclusionCode)) { + throw new InvalidArgumentException('non-nullable aeExclusionCode cannot be null'); } - $this->container['state'] = $state; + $this->container['aeExclusionCode'] = $aeExclusionCode; return $this; } /** - * Gets stateDate + * Gets aePostponementLetterSent * - * @return \DateTime|null + * @return bool|null */ - public function getStateDate(): ?\DateTime + public function getAePostponementLetterSent(): ?bool { - return $this->container['stateDate']; + return $this->container['aePostponementLetterSent']; } /** - * Sets stateDate + * Sets aePostponementLetterSent * - * @param \DateTime|null $stateDate [readonly] + * @param bool|null $aePostponementLetterSent aePostponementLetterSent * * @return $this */ - public function setStateDate(?\DateTime $stateDate): static + public function setAePostponementLetterSent(?bool $aePostponementLetterSent): static { - if (is_null($stateDate)) { - array_push($this->openAPINullablesSetToNull, 'stateDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('stateDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($aePostponementLetterSent)) { + throw new InvalidArgumentException('non-nullable aePostponementLetterSent cannot be null'); } - $this->container['stateDate'] = $stateDate; + $this->container['aePostponementLetterSent'] = $aePostponementLetterSent; return $this; } /** - * Gets ukWorker + * Gets daysToDeferAssessment * - * @return \SynergiTech\Staffology\Model\AeUKWorker|null + * @return int|null */ - public function getUkWorker(): ?\SynergiTech\Staffology\Model\AeUKWorker + public function getDaysToDeferAssessment(): ?int { - return $this->container['ukWorker']; + return $this->container['daysToDeferAssessment']; } /** - * Sets ukWorker + * Sets daysToDeferAssessment * - * @param \SynergiTech\Staffology\Model\AeUKWorker|null $ukWorker ukWorker + * @param int|null $daysToDeferAssessment The number of days, if any, to defer assessment of this employee. You're allowed to defer assessment of new employees by up to 3 months. * * @return $this */ - public function setUkWorker(?\SynergiTech\Staffology\Model\AeUKWorker $ukWorker): static + public function setDaysToDeferAssessment(?int $daysToDeferAssessment): static { - if (is_null($ukWorker)) { - throw new InvalidArgumentException('non-nullable ukWorker cannot be null'); + if (is_null($daysToDeferAssessment)) { + throw new InvalidArgumentException('non-nullable daysToDeferAssessment cannot be null'); } - $this->container['ukWorker'] = $ukWorker; + $this->container['daysToDeferAssessment'] = $daysToDeferAssessment; return $this; } /** - * Gets daysToDeferAssessment + * Gets deferByMonthsNotDays * - * @return int|null + * @return bool|null */ - public function getDaysToDeferAssessment(): ?int + public function getDeferByMonthsNotDays(): ?bool { - return $this->container['daysToDeferAssessment']; + return $this->container['deferByMonthsNotDays']; } /** - * Sets daysToDeferAssessment + * Sets deferByMonthsNotDays * - * @param int|null $daysToDeferAssessment The number of days, if any, to defer assessment of this employee. You're allowed to defer assessment of new employees by up to 3 months. + * @param bool|null $deferByMonthsNotDays If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days * * @return $this */ - public function setDaysToDeferAssessment(?int $daysToDeferAssessment): static + public function setDeferByMonthsNotDays(?bool $deferByMonthsNotDays): static { - if (is_null($daysToDeferAssessment)) { - throw new InvalidArgumentException('non-nullable daysToDeferAssessment cannot be null'); + if (is_null($deferByMonthsNotDays)) { + throw new InvalidArgumentException('non-nullable deferByMonthsNotDays cannot be null'); } - $this->container['daysToDeferAssessment'] = $daysToDeferAssessment; + $this->container['deferByMonthsNotDays'] = $deferByMonthsNotDays; return $this; } /** - * Gets postponementDate + * Gets exempt * - * @return \DateTime|null + * @return bool|null */ - public function getPostponementDate(): ?\DateTime + public function getExempt(): ?bool { - return $this->container['postponementDate']; + return $this->container['exempt']; } /** - * Sets postponementDate + * Sets exempt * - * @param \DateTime|null $postponementDate [readonly] If a value is present, then employee wont be enrolled on an AE Pension until after this date. This is automatically set to a date if the employee is deemed to be an EligibleJobHolder, but the employer has set a Postponement period and this value is currently null This is automatically set to null if it already has a value and the employee is deemed NOT to be an EligibleJobHolder - ie, they previously qualified but now do not. + * @param bool|null $exempt exempt * * @return $this */ - public function setPostponementDate(?\DateTime $postponementDate): static + public function setExempt(?bool $exempt): static { - if (is_null($postponementDate)) { - array_push($this->openAPINullablesSetToNull, 'postponementDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('postponementDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($exempt)) { + throw new InvalidArgumentException('non-nullable exempt cannot be null'); } - $this->container['postponementDate'] = $postponementDate; + $this->container['exempt'] = $exempt; return $this; } /** - * Gets deferByMonthsNotDays + * Gets lastAssessment * - * @return bool|null + * @return \SynergiTech\Staffology\Model\AeAssessment|null */ - public function getDeferByMonthsNotDays(): ?bool + public function getLastAssessment(): ?\SynergiTech\Staffology\Model\AeAssessment { - return $this->container['deferByMonthsNotDays']; + return $this->container['lastAssessment']; } /** - * Sets deferByMonthsNotDays + * Sets lastAssessment * - * @param bool|null $deferByMonthsNotDays If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days + * @param \SynergiTech\Staffology\Model\AeAssessment|null $lastAssessment lastAssessment * * @return $this */ - public function setDeferByMonthsNotDays(?bool $deferByMonthsNotDays): static + public function setLastAssessment(?\SynergiTech\Staffology\Model\AeAssessment $lastAssessment): static { - if (is_null($deferByMonthsNotDays)) { - throw new InvalidArgumentException('non-nullable deferByMonthsNotDays cannot be null'); + if (is_null($lastAssessment)) { + throw new InvalidArgumentException('non-nullable lastAssessment cannot be null'); } - $this->container['deferByMonthsNotDays'] = $deferByMonthsNotDays; + $this->container['lastAssessment'] = $lastAssessment; return $this; } /** - * Gets exempt + * Gets postponementDate * - * @return bool|null + * @return \DateTime|null */ - public function getExempt(): ?bool + public function getPostponementDate(): ?\DateTime { - return $this->container['exempt']; + return $this->container['postponementDate']; } /** - * Sets exempt + * Sets postponementDate * - * @param bool|null $exempt exempt + * @param \DateTime|null $postponementDate [readonly] If a value is present, then employee wont be enrolled on an AE Pension until after this date. This is automatically set to a date if the employee is deemed to be an EligibleJobHolder, but the employer has set a Postponement period and this value is currently null This is automatically set to null if it already has a value and the employee is deemed NOT to be an EligibleJobHolder - ie, they previously qualified but now do not. * * @return $this */ - public function setExempt(?bool $exempt): static + public function setPostponementDate(?\DateTime $postponementDate): static { - if (is_null($exempt)) { - throw new InvalidArgumentException('non-nullable exempt cannot be null'); + if (is_null($postponementDate)) { + array_push($this->openAPINullablesSetToNull, 'postponementDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('postponementDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['exempt'] = $exempt; + $this->container['postponementDate'] = $postponementDate; return $this; } /** - * Gets aeExclusionCode + * Gets state * - * @return \SynergiTech\Staffology\Model\AeExclusionCode|null + * @return \SynergiTech\Staffology\Model\AeEmployeeState|null */ - public function getAeExclusionCode(): ?\SynergiTech\Staffology\Model\AeExclusionCode + public function getState(): ?\SynergiTech\Staffology\Model\AeEmployeeState { - return $this->container['aeExclusionCode']; + return $this->container['state']; } /** - * Sets aeExclusionCode + * Sets state * - * @param \SynergiTech\Staffology\Model\AeExclusionCode|null $aeExclusionCode aeExclusionCode + * @param \SynergiTech\Staffology\Model\AeEmployeeState|null $state state * * @return $this */ - public function setAeExclusionCode(?\SynergiTech\Staffology\Model\AeExclusionCode $aeExclusionCode): static + public function setState(?\SynergiTech\Staffology\Model\AeEmployeeState $state): static { - if (is_null($aeExclusionCode)) { - throw new InvalidArgumentException('non-nullable aeExclusionCode cannot be null'); + if (is_null($state)) { + throw new InvalidArgumentException('non-nullable state cannot be null'); } - $this->container['aeExclusionCode'] = $aeExclusionCode; + $this->container['state'] = $state; return $this; } /** - * Gets aePostponementLetterSent + * Gets stateDate * - * @return bool|null + * @return \DateTime|null */ - public function getAePostponementLetterSent(): ?bool + public function getStateDate(): ?\DateTime { - return $this->container['aePostponementLetterSent']; + return $this->container['stateDate']; } /** - * Sets aePostponementLetterSent + * Sets stateDate * - * @param bool|null $aePostponementLetterSent aePostponementLetterSent + * @param \DateTime|null $stateDate [readonly] * * @return $this */ - public function setAePostponementLetterSent(?bool $aePostponementLetterSent): static + public function setStateDate(?\DateTime $stateDate): static { - if (is_null($aePostponementLetterSent)) { - throw new InvalidArgumentException('non-nullable aePostponementLetterSent cannot be null'); + if (is_null($stateDate)) { + array_push($this->openAPINullablesSetToNull, 'stateDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('stateDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['aePostponementLetterSent'] = $aePostponementLetterSent; + $this->container['stateDate'] = $stateDate; return $this; } /** - * Gets lastAssessment + * Gets ukWorker * - * @return \SynergiTech\Staffology\Model\AeAssessment|null + * @return \SynergiTech\Staffology\Model\AeUKWorker|null */ - public function getLastAssessment(): ?\SynergiTech\Staffology\Model\AeAssessment + public function getUkWorker(): ?\SynergiTech\Staffology\Model\AeUKWorker { - return $this->container['lastAssessment']; + return $this->container['ukWorker']; } /** - * Sets lastAssessment + * Sets ukWorker * - * @param \SynergiTech\Staffology\Model\AeAssessment|null $lastAssessment lastAssessment + * @param \SynergiTech\Staffology\Model\AeUKWorker|null $ukWorker ukWorker * * @return $this */ - public function setLastAssessment(?\SynergiTech\Staffology\Model\AeAssessment $lastAssessment): static + public function setUkWorker(?\SynergiTech\Staffology\Model\AeUKWorker $ukWorker): static { - if (is_null($lastAssessment)) { - throw new InvalidArgumentException('non-nullable lastAssessment cannot be null'); + if (is_null($ukWorker)) { + throw new InvalidArgumentException('non-nullable ukWorker cannot be null'); } - $this->container['lastAssessment'] = $lastAssessment; + $this->container['ukWorker'] = $ukWorker; return $this; } diff --git a/src/Model/AutoPilotFinaliseTime.php b/src/Model/AutoPilotFinaliseTime.php index 045d7d1..e8016c8 100644 --- a/src/Model/AutoPilotFinaliseTime.php +++ b/src/Model/AutoPilotFinaliseTime.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/AutomationSettings.php b/src/Model/AutomationSettings.php index 719b10e..7f0178c 100644 --- a/src/Model/AutomationSettings.php +++ b/src/Model/AutomationSettings.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,31 +60,31 @@ class AutomationSettings implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'enableAutoPilot' => 'bool', - 'autoPilotTime' => '\SynergiTech\Staffology\Model\AutoPilotFinaliseTime', 'autoPilotOffset' => 'int', - 'enableAutoOpen' => 'bool', + 'autoPilotTime' => '\SynergiTech\Staffology\Model\AutoPilotFinaliseTime', + 'autoSubmitEps' => 'bool', 'autoSubmitFps' => 'bool', - 'autoSubmitPayments' => 'bool', 'autoSubmitJournal' => 'bool', - 'autoSubmitPaymentsEmployee' => 'bool', - 'autoSubmitPayslips' => 'bool', 'autoSubmitP45s' => 'bool', - 'autoSubmitPaymentsHmrc' => 'bool', - 'autoSubmitPaymentsDeductions' => 'bool', + 'autoSubmitPayments' => 'bool', 'autoSubmitPaymentsAeos' => 'bool', + 'autoSubmitPaymentsDeductions' => 'bool', + 'autoSubmitPaymentsEmployee' => 'bool', + 'autoSubmitPaymentsHmrc' => 'bool', 'autoSubmitPaymentsPensions' => 'bool', - 'payslipReleaseType' => '\SynergiTech\Staffology\Model\PayslipReleaseType', + 'autoSubmitPayslips' => 'bool', 'autoSubmitPayslipsDaysBeforePayday' => '\SynergiTech\Staffology\Model\DaysBeforePayday', 'autoSubmitPayslipsPaymentDateRule' => '\SynergiTech\Staffology\Model\PayslipReleasePaymentDateRule', 'autoSubmitPayslipsPayslipReleaseTime' => '\SynergiTech\Staffology\Model\PayslipReleaseTime', - 'employeesWithoutEmailAddress' => 'int', - 'employeesWithEmailAddressButNotAutoSending' => 'int', - 'subcontractorsNotAutoSendingStatement' => 'int', + 'autoSubmitPensionLetters' => 'bool', 'codingNoticesAutomaticallyApplied' => 'bool', + 'employeesWithEmailAddressButNotAutoSending' => 'int', + 'employeesWithoutEmailAddress' => 'int', + 'enableAutoOpen' => 'bool', + 'enableAutoPilot' => 'bool', 'payrunEmails' => '\SynergiTech\Staffology\Model\PayrunEmail[]', - 'autoSubmitPensionLetters' => 'bool', - 'autoSubmitEps' => 'bool' + 'payslipReleaseType' => '\SynergiTech\Staffology\Model\PayslipReleaseType', + 'subcontractorsNotAutoSendingStatement' => 'int' ]; /** @@ -93,31 +93,31 @@ class AutomationSettings implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'enableAutoPilot' => null, - 'autoPilotTime' => null, 'autoPilotOffset' => 'int32', - 'enableAutoOpen' => null, + 'autoPilotTime' => null, + 'autoSubmitEps' => null, 'autoSubmitFps' => null, - 'autoSubmitPayments' => null, 'autoSubmitJournal' => null, - 'autoSubmitPaymentsEmployee' => null, - 'autoSubmitPayslips' => null, 'autoSubmitP45s' => null, - 'autoSubmitPaymentsHmrc' => null, - 'autoSubmitPaymentsDeductions' => null, + 'autoSubmitPayments' => null, 'autoSubmitPaymentsAeos' => null, + 'autoSubmitPaymentsDeductions' => null, + 'autoSubmitPaymentsEmployee' => null, + 'autoSubmitPaymentsHmrc' => null, 'autoSubmitPaymentsPensions' => null, - 'payslipReleaseType' => null, + 'autoSubmitPayslips' => null, 'autoSubmitPayslipsDaysBeforePayday' => null, 'autoSubmitPayslipsPaymentDateRule' => null, 'autoSubmitPayslipsPayslipReleaseTime' => null, - 'employeesWithoutEmailAddress' => 'int32', - 'employeesWithEmailAddressButNotAutoSending' => 'int32', - 'subcontractorsNotAutoSendingStatement' => 'int32', + 'autoSubmitPensionLetters' => null, 'codingNoticesAutomaticallyApplied' => null, + 'employeesWithEmailAddressButNotAutoSending' => 'int32', + 'employeesWithoutEmailAddress' => 'int32', + 'enableAutoOpen' => null, + 'enableAutoPilot' => null, 'payrunEmails' => null, - 'autoSubmitPensionLetters' => null, - 'autoSubmitEps' => null + 'payslipReleaseType' => null, + 'subcontractorsNotAutoSendingStatement' => 'int32' ]; /** @@ -126,31 +126,31 @@ class AutomationSettings implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'enableAutoPilot' => false, - 'autoPilotTime' => false, 'autoPilotOffset' => false, - 'enableAutoOpen' => false, + 'autoPilotTime' => false, + 'autoSubmitEps' => false, 'autoSubmitFps' => false, - 'autoSubmitPayments' => false, 'autoSubmitJournal' => false, - 'autoSubmitPaymentsEmployee' => false, - 'autoSubmitPayslips' => false, 'autoSubmitP45s' => false, - 'autoSubmitPaymentsHmrc' => false, - 'autoSubmitPaymentsDeductions' => false, + 'autoSubmitPayments' => false, 'autoSubmitPaymentsAeos' => false, + 'autoSubmitPaymentsDeductions' => false, + 'autoSubmitPaymentsEmployee' => false, + 'autoSubmitPaymentsHmrc' => false, 'autoSubmitPaymentsPensions' => false, - 'payslipReleaseType' => false, + 'autoSubmitPayslips' => false, 'autoSubmitPayslipsDaysBeforePayday' => false, 'autoSubmitPayslipsPaymentDateRule' => false, 'autoSubmitPayslipsPayslipReleaseTime' => false, - 'employeesWithoutEmailAddress' => false, - 'employeesWithEmailAddressButNotAutoSending' => false, - 'subcontractorsNotAutoSendingStatement' => false, + 'autoSubmitPensionLetters' => false, 'codingNoticesAutomaticallyApplied' => false, + 'employeesWithEmailAddressButNotAutoSending' => false, + 'employeesWithoutEmailAddress' => false, + 'enableAutoOpen' => false, + 'enableAutoPilot' => false, 'payrunEmails' => true, - 'autoSubmitPensionLetters' => false, - 'autoSubmitEps' => false + 'payslipReleaseType' => false, + 'subcontractorsNotAutoSendingStatement' => false ]; /** @@ -239,31 +239,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'enableAutoPilot' => 'enableAutoPilot', - 'autoPilotTime' => 'autoPilotTime', 'autoPilotOffset' => 'autoPilotOffset', - 'enableAutoOpen' => 'enableAutoOpen', + 'autoPilotTime' => 'autoPilotTime', + 'autoSubmitEps' => 'autoSubmitEps', 'autoSubmitFps' => 'autoSubmitFps', - 'autoSubmitPayments' => 'autoSubmitPayments', 'autoSubmitJournal' => 'autoSubmitJournal', - 'autoSubmitPaymentsEmployee' => 'autoSubmitPayments_Employee', - 'autoSubmitPayslips' => 'autoSubmitPayslips', 'autoSubmitP45s' => 'autoSubmitP45s', - 'autoSubmitPaymentsHmrc' => 'autoSubmitPayments_Hmrc', - 'autoSubmitPaymentsDeductions' => 'autoSubmitPayments_Deductions', + 'autoSubmitPayments' => 'autoSubmitPayments', 'autoSubmitPaymentsAeos' => 'autoSubmitPayments_Aeos', + 'autoSubmitPaymentsDeductions' => 'autoSubmitPayments_Deductions', + 'autoSubmitPaymentsEmployee' => 'autoSubmitPayments_Employee', + 'autoSubmitPaymentsHmrc' => 'autoSubmitPayments_Hmrc', 'autoSubmitPaymentsPensions' => 'autoSubmitPayments_Pensions', - 'payslipReleaseType' => 'payslipReleaseType', + 'autoSubmitPayslips' => 'autoSubmitPayslips', 'autoSubmitPayslipsDaysBeforePayday' => 'autoSubmitPayslips_DaysBeforePayday', 'autoSubmitPayslipsPaymentDateRule' => 'autoSubmitPayslips_PaymentDateRule', 'autoSubmitPayslipsPayslipReleaseTime' => 'autoSubmitPayslips_PayslipReleaseTime', - 'employeesWithoutEmailAddress' => 'employeesWithoutEmailAddress', - 'employeesWithEmailAddressButNotAutoSending' => 'employeesWithEmailAddressButNotAutoSending', - 'subcontractorsNotAutoSendingStatement' => 'subcontractorsNotAutoSendingStatement', + 'autoSubmitPensionLetters' => 'autoSubmitPensionLetters', 'codingNoticesAutomaticallyApplied' => 'codingNoticesAutomaticallyApplied', + 'employeesWithEmailAddressButNotAutoSending' => 'employeesWithEmailAddressButNotAutoSending', + 'employeesWithoutEmailAddress' => 'employeesWithoutEmailAddress', + 'enableAutoOpen' => 'enableAutoOpen', + 'enableAutoPilot' => 'enableAutoPilot', 'payrunEmails' => 'payrunEmails', - 'autoSubmitPensionLetters' => 'autoSubmitPensionLetters', - 'autoSubmitEps' => 'autoSubmitEps' + 'payslipReleaseType' => 'payslipReleaseType', + 'subcontractorsNotAutoSendingStatement' => 'subcontractorsNotAutoSendingStatement' ]; /** @@ -272,31 +272,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'enableAutoPilot' => 'setEnableAutoPilot', - 'autoPilotTime' => 'setAutoPilotTime', 'autoPilotOffset' => 'setAutoPilotOffset', - 'enableAutoOpen' => 'setEnableAutoOpen', + 'autoPilotTime' => 'setAutoPilotTime', + 'autoSubmitEps' => 'setAutoSubmitEps', 'autoSubmitFps' => 'setAutoSubmitFps', - 'autoSubmitPayments' => 'setAutoSubmitPayments', 'autoSubmitJournal' => 'setAutoSubmitJournal', - 'autoSubmitPaymentsEmployee' => 'setAutoSubmitPaymentsEmployee', - 'autoSubmitPayslips' => 'setAutoSubmitPayslips', 'autoSubmitP45s' => 'setAutoSubmitP45s', - 'autoSubmitPaymentsHmrc' => 'setAutoSubmitPaymentsHmrc', - 'autoSubmitPaymentsDeductions' => 'setAutoSubmitPaymentsDeductions', + 'autoSubmitPayments' => 'setAutoSubmitPayments', 'autoSubmitPaymentsAeos' => 'setAutoSubmitPaymentsAeos', + 'autoSubmitPaymentsDeductions' => 'setAutoSubmitPaymentsDeductions', + 'autoSubmitPaymentsEmployee' => 'setAutoSubmitPaymentsEmployee', + 'autoSubmitPaymentsHmrc' => 'setAutoSubmitPaymentsHmrc', 'autoSubmitPaymentsPensions' => 'setAutoSubmitPaymentsPensions', - 'payslipReleaseType' => 'setPayslipReleaseType', + 'autoSubmitPayslips' => 'setAutoSubmitPayslips', 'autoSubmitPayslipsDaysBeforePayday' => 'setAutoSubmitPayslipsDaysBeforePayday', 'autoSubmitPayslipsPaymentDateRule' => 'setAutoSubmitPayslipsPaymentDateRule', 'autoSubmitPayslipsPayslipReleaseTime' => 'setAutoSubmitPayslipsPayslipReleaseTime', - 'employeesWithoutEmailAddress' => 'setEmployeesWithoutEmailAddress', - 'employeesWithEmailAddressButNotAutoSending' => 'setEmployeesWithEmailAddressButNotAutoSending', - 'subcontractorsNotAutoSendingStatement' => 'setSubcontractorsNotAutoSendingStatement', + 'autoSubmitPensionLetters' => 'setAutoSubmitPensionLetters', 'codingNoticesAutomaticallyApplied' => 'setCodingNoticesAutomaticallyApplied', + 'employeesWithEmailAddressButNotAutoSending' => 'setEmployeesWithEmailAddressButNotAutoSending', + 'employeesWithoutEmailAddress' => 'setEmployeesWithoutEmailAddress', + 'enableAutoOpen' => 'setEnableAutoOpen', + 'enableAutoPilot' => 'setEnableAutoPilot', 'payrunEmails' => 'setPayrunEmails', - 'autoSubmitPensionLetters' => 'setAutoSubmitPensionLetters', - 'autoSubmitEps' => 'setAutoSubmitEps' + 'payslipReleaseType' => 'setPayslipReleaseType', + 'subcontractorsNotAutoSendingStatement' => 'setSubcontractorsNotAutoSendingStatement' ]; /** @@ -305,31 +305,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'enableAutoPilot' => 'getEnableAutoPilot', - 'autoPilotTime' => 'getAutoPilotTime', 'autoPilotOffset' => 'getAutoPilotOffset', - 'enableAutoOpen' => 'getEnableAutoOpen', + 'autoPilotTime' => 'getAutoPilotTime', + 'autoSubmitEps' => 'getAutoSubmitEps', 'autoSubmitFps' => 'getAutoSubmitFps', - 'autoSubmitPayments' => 'getAutoSubmitPayments', 'autoSubmitJournal' => 'getAutoSubmitJournal', - 'autoSubmitPaymentsEmployee' => 'getAutoSubmitPaymentsEmployee', - 'autoSubmitPayslips' => 'getAutoSubmitPayslips', 'autoSubmitP45s' => 'getAutoSubmitP45s', - 'autoSubmitPaymentsHmrc' => 'getAutoSubmitPaymentsHmrc', - 'autoSubmitPaymentsDeductions' => 'getAutoSubmitPaymentsDeductions', + 'autoSubmitPayments' => 'getAutoSubmitPayments', 'autoSubmitPaymentsAeos' => 'getAutoSubmitPaymentsAeos', + 'autoSubmitPaymentsDeductions' => 'getAutoSubmitPaymentsDeductions', + 'autoSubmitPaymentsEmployee' => 'getAutoSubmitPaymentsEmployee', + 'autoSubmitPaymentsHmrc' => 'getAutoSubmitPaymentsHmrc', 'autoSubmitPaymentsPensions' => 'getAutoSubmitPaymentsPensions', - 'payslipReleaseType' => 'getPayslipReleaseType', + 'autoSubmitPayslips' => 'getAutoSubmitPayslips', 'autoSubmitPayslipsDaysBeforePayday' => 'getAutoSubmitPayslipsDaysBeforePayday', 'autoSubmitPayslipsPaymentDateRule' => 'getAutoSubmitPayslipsPaymentDateRule', 'autoSubmitPayslipsPayslipReleaseTime' => 'getAutoSubmitPayslipsPayslipReleaseTime', - 'employeesWithoutEmailAddress' => 'getEmployeesWithoutEmailAddress', - 'employeesWithEmailAddressButNotAutoSending' => 'getEmployeesWithEmailAddressButNotAutoSending', - 'subcontractorsNotAutoSendingStatement' => 'getSubcontractorsNotAutoSendingStatement', + 'autoSubmitPensionLetters' => 'getAutoSubmitPensionLetters', 'codingNoticesAutomaticallyApplied' => 'getCodingNoticesAutomaticallyApplied', + 'employeesWithEmailAddressButNotAutoSending' => 'getEmployeesWithEmailAddressButNotAutoSending', + 'employeesWithoutEmailAddress' => 'getEmployeesWithoutEmailAddress', + 'enableAutoOpen' => 'getEnableAutoOpen', + 'enableAutoPilot' => 'getEnableAutoPilot', 'payrunEmails' => 'getPayrunEmails', - 'autoSubmitPensionLetters' => 'getAutoSubmitPensionLetters', - 'autoSubmitEps' => 'getAutoSubmitEps' + 'payslipReleaseType' => 'getPayslipReleaseType', + 'subcontractorsNotAutoSendingStatement' => 'getSubcontractorsNotAutoSendingStatement' ]; /** @@ -388,31 +388,31 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('enableAutoPilot', $data ?? [], null); - $this->setIfExists('autoPilotTime', $data ?? [], null); $this->setIfExists('autoPilotOffset', $data ?? [], null); - $this->setIfExists('enableAutoOpen', $data ?? [], null); + $this->setIfExists('autoPilotTime', $data ?? [], null); + $this->setIfExists('autoSubmitEps', $data ?? [], null); $this->setIfExists('autoSubmitFps', $data ?? [], null); - $this->setIfExists('autoSubmitPayments', $data ?? [], null); $this->setIfExists('autoSubmitJournal', $data ?? [], null); - $this->setIfExists('autoSubmitPaymentsEmployee', $data ?? [], null); - $this->setIfExists('autoSubmitPayslips', $data ?? [], null); $this->setIfExists('autoSubmitP45s', $data ?? [], null); - $this->setIfExists('autoSubmitPaymentsHmrc', $data ?? [], null); - $this->setIfExists('autoSubmitPaymentsDeductions', $data ?? [], null); + $this->setIfExists('autoSubmitPayments', $data ?? [], null); $this->setIfExists('autoSubmitPaymentsAeos', $data ?? [], null); + $this->setIfExists('autoSubmitPaymentsDeductions', $data ?? [], null); + $this->setIfExists('autoSubmitPaymentsEmployee', $data ?? [], null); + $this->setIfExists('autoSubmitPaymentsHmrc', $data ?? [], null); $this->setIfExists('autoSubmitPaymentsPensions', $data ?? [], null); - $this->setIfExists('payslipReleaseType', $data ?? [], null); + $this->setIfExists('autoSubmitPayslips', $data ?? [], null); $this->setIfExists('autoSubmitPayslipsDaysBeforePayday', $data ?? [], null); $this->setIfExists('autoSubmitPayslipsPaymentDateRule', $data ?? [], null); $this->setIfExists('autoSubmitPayslipsPayslipReleaseTime', $data ?? [], null); - $this->setIfExists('employeesWithoutEmailAddress', $data ?? [], null); - $this->setIfExists('employeesWithEmailAddressButNotAutoSending', $data ?? [], null); - $this->setIfExists('subcontractorsNotAutoSendingStatement', $data ?? [], null); + $this->setIfExists('autoSubmitPensionLetters', $data ?? [], null); $this->setIfExists('codingNoticesAutomaticallyApplied', $data ?? [], null); + $this->setIfExists('employeesWithEmailAddressButNotAutoSending', $data ?? [], null); + $this->setIfExists('employeesWithoutEmailAddress', $data ?? [], null); + $this->setIfExists('enableAutoOpen', $data ?? [], null); + $this->setIfExists('enableAutoPilot', $data ?? [], null); $this->setIfExists('payrunEmails', $data ?? [], null); - $this->setIfExists('autoSubmitPensionLetters', $data ?? [], null); - $this->setIfExists('autoSubmitEps', $data ?? [], null); + $this->setIfExists('payslipReleaseType', $data ?? [], null); + $this->setIfExists('subcontractorsNotAutoSendingStatement', $data ?? [], null); } /** @@ -466,28 +466,36 @@ public function valid(): bool /** - * Gets enableAutoPilot + * Gets autoPilotOffset * - * @return bool|null + * @return int|null */ - public function getEnableAutoPilot(): ?bool + public function getAutoPilotOffset(): ?int { - return $this->container['enableAutoPilot']; + return $this->container['autoPilotOffset']; } /** - * Sets enableAutoPilot + * Sets autoPilotOffset * - * @param bool|null $enableAutoPilot IF enabled then payruns will be automatically finalised on the payment date and the next payrun will be started + * @param int|null $autoPilotOffset How many days before the payment date a payrun should be finalised. Set it to 0 if you want the payrun to be automatically finalised on the payment date itself * * @return $this */ - public function setEnableAutoPilot(?bool $enableAutoPilot): static + public function setAutoPilotOffset(?int $autoPilotOffset): static { - if (is_null($enableAutoPilot)) { - throw new InvalidArgumentException('non-nullable enableAutoPilot cannot be null'); + if (is_null($autoPilotOffset)) { + throw new InvalidArgumentException('non-nullable autoPilotOffset cannot be null'); } - $this->container['enableAutoPilot'] = $enableAutoPilot; + + if (($autoPilotOffset > 6)) { + throw new InvalidArgumentException('invalid value for $autoPilotOffset when calling AutomationSettings., must be smaller than or equal to 6.'); + } + if (($autoPilotOffset < 0)) { + throw new InvalidArgumentException('invalid value for $autoPilotOffset when calling AutomationSettings., must be bigger than or equal to 0.'); + } + + $this->container['autoPilotOffset'] = $autoPilotOffset; return $this; } @@ -520,63 +528,28 @@ public function setAutoPilotTime(?\SynergiTech\Staffology\Model\AutoPilotFinalis } /** - * Gets autoPilotOffset - * - * @return int|null - */ - public function getAutoPilotOffset(): ?int - { - return $this->container['autoPilotOffset']; - } - - /** - * Sets autoPilotOffset - * - * @param int|null $autoPilotOffset How many days before the payment date a payrun should be finalised. Set it to 0 if you want the payrun to be automatically finalised on the payment date itself - * - * @return $this - */ - public function setAutoPilotOffset(?int $autoPilotOffset): static - { - if (is_null($autoPilotOffset)) { - throw new InvalidArgumentException('non-nullable autoPilotOffset cannot be null'); - } - - if (($autoPilotOffset > 6)) { - throw new InvalidArgumentException('invalid value for $autoPilotOffset when calling AutomationSettings., must be smaller than or equal to 6.'); - } - if (($autoPilotOffset < 0)) { - throw new InvalidArgumentException('invalid value for $autoPilotOffset when calling AutomationSettings., must be bigger than or equal to 0.'); - } - - $this->container['autoPilotOffset'] = $autoPilotOffset; - - return $this; - } - - /** - * Gets enableAutoOpen + * Gets autoSubmitEps * * @return bool|null */ - public function getEnableAutoOpen(): ?bool + public function getAutoSubmitEps(): ?bool { - return $this->container['enableAutoOpen']; + return $this->container['autoSubmitEps']; } /** - * Sets enableAutoOpen + * Sets autoSubmitEps * - * @param bool|null $enableAutoOpen IF enabled then whenever you close a payrun, the next one will be started. Automatically set to true if EnableAutoPilot is true + * @param bool|null $autoSubmitEps If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun. * * @return $this */ - public function setEnableAutoOpen(?bool $enableAutoOpen): static + public function setAutoSubmitEps(?bool $autoSubmitEps): static { - if (is_null($enableAutoOpen)) { - throw new InvalidArgumentException('non-nullable enableAutoOpen cannot be null'); + if (is_null($autoSubmitEps)) { + throw new InvalidArgumentException('non-nullable autoSubmitEps cannot be null'); } - $this->container['enableAutoOpen'] = $enableAutoOpen; + $this->container['autoSubmitEps'] = $autoSubmitEps; return $this; } @@ -609,34 +582,7 @@ public function setAutoSubmitFps(?bool $autoSubmitFps): static } /** - * Gets autoSubmitPayments - * - * @return bool|null - */ - public function getAutoSubmitPayments(): ?bool - { - return $this->container['autoSubmitPayments']; - } - - /** - * Sets autoSubmitPayments - * - * @param bool|null $autoSubmitPayments If set to true, we'll automatically submit payments whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'Payments'. - * - * @return $this - */ - public function setAutoSubmitPayments(?bool $autoSubmitPayments): static - { - if (is_null($autoSubmitPayments)) { - throw new InvalidArgumentException('non-nullable autoSubmitPayments cannot be null'); - } - $this->container['autoSubmitPayments'] = $autoSubmitPayments; - - return $this; - } - - /** - * Gets autoSubmitJournal + * Gets autoSubmitJournal * * @return bool|null */ @@ -663,163 +609,163 @@ public function setAutoSubmitJournal(?bool $autoSubmitJournal): static } /** - * Gets autoSubmitPaymentsEmployee + * Gets autoSubmitP45s * * @return bool|null */ - public function getAutoSubmitPaymentsEmployee(): ?bool + public function getAutoSubmitP45s(): ?bool { - return $this->container['autoSubmitPaymentsEmployee']; + return $this->container['autoSubmitP45s']; } /** - * Sets autoSubmitPaymentsEmployee + * Sets autoSubmitP45s * - * @param bool|null $autoSubmitPaymentsEmployee Used in conjunction with AutoSubmitPayments. + * @param bool|null $autoSubmitP45s If set to true, we'll automatically submit P45s whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'. * * @return $this */ - public function setAutoSubmitPaymentsEmployee(?bool $autoSubmitPaymentsEmployee): static + public function setAutoSubmitP45s(?bool $autoSubmitP45s): static { - if (is_null($autoSubmitPaymentsEmployee)) { - throw new InvalidArgumentException('non-nullable autoSubmitPaymentsEmployee cannot be null'); + if (is_null($autoSubmitP45s)) { + throw new InvalidArgumentException('non-nullable autoSubmitP45s cannot be null'); } - $this->container['autoSubmitPaymentsEmployee'] = $autoSubmitPaymentsEmployee; + $this->container['autoSubmitP45s'] = $autoSubmitP45s; return $this; } /** - * Gets autoSubmitPayslips + * Gets autoSubmitPayments * * @return bool|null */ - public function getAutoSubmitPayslips(): ?bool + public function getAutoSubmitPayments(): ?bool { - return $this->container['autoSubmitPayslips']; + return $this->container['autoSubmitPayments']; } /** - * Sets autoSubmitPayslips + * Sets autoSubmitPayments * - * @param bool|null $autoSubmitPayslips If set to true, we'll automatically submit payslips whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'. + * @param bool|null $autoSubmitPayments If set to true, we'll automatically submit payments whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'Payments'. * * @return $this */ - public function setAutoSubmitPayslips(?bool $autoSubmitPayslips): static + public function setAutoSubmitPayments(?bool $autoSubmitPayments): static { - if (is_null($autoSubmitPayslips)) { - throw new InvalidArgumentException('non-nullable autoSubmitPayslips cannot be null'); + if (is_null($autoSubmitPayments)) { + throw new InvalidArgumentException('non-nullable autoSubmitPayments cannot be null'); } - $this->container['autoSubmitPayslips'] = $autoSubmitPayslips; + $this->container['autoSubmitPayments'] = $autoSubmitPayments; return $this; } /** - * Gets autoSubmitP45s + * Gets autoSubmitPaymentsAeos * * @return bool|null */ - public function getAutoSubmitP45s(): ?bool + public function getAutoSubmitPaymentsAeos(): ?bool { - return $this->container['autoSubmitP45s']; + return $this->container['autoSubmitPaymentsAeos']; } /** - * Sets autoSubmitP45s + * Sets autoSubmitPaymentsAeos * - * @param bool|null $autoSubmitP45s If set to true, we'll automatically submit P45s whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'. + * @param bool|null $autoSubmitPaymentsAeos Used in conjunction with AutoSubmitPayments. * * @return $this */ - public function setAutoSubmitP45s(?bool $autoSubmitP45s): static + public function setAutoSubmitPaymentsAeos(?bool $autoSubmitPaymentsAeos): static { - if (is_null($autoSubmitP45s)) { - throw new InvalidArgumentException('non-nullable autoSubmitP45s cannot be null'); + if (is_null($autoSubmitPaymentsAeos)) { + throw new InvalidArgumentException('non-nullable autoSubmitPaymentsAeos cannot be null'); } - $this->container['autoSubmitP45s'] = $autoSubmitP45s; + $this->container['autoSubmitPaymentsAeos'] = $autoSubmitPaymentsAeos; return $this; } /** - * Gets autoSubmitPaymentsHmrc + * Gets autoSubmitPaymentsDeductions * * @return bool|null */ - public function getAutoSubmitPaymentsHmrc(): ?bool + public function getAutoSubmitPaymentsDeductions(): ?bool { - return $this->container['autoSubmitPaymentsHmrc']; + return $this->container['autoSubmitPaymentsDeductions']; } /** - * Sets autoSubmitPaymentsHmrc + * Sets autoSubmitPaymentsDeductions * - * @param bool|null $autoSubmitPaymentsHmrc Used in conjunction with AutoSubmitPayments. + * @param bool|null $autoSubmitPaymentsDeductions Used in conjunction with AutoSubmitPayments. * * @return $this */ - public function setAutoSubmitPaymentsHmrc(?bool $autoSubmitPaymentsHmrc): static + public function setAutoSubmitPaymentsDeductions(?bool $autoSubmitPaymentsDeductions): static { - if (is_null($autoSubmitPaymentsHmrc)) { - throw new InvalidArgumentException('non-nullable autoSubmitPaymentsHmrc cannot be null'); + if (is_null($autoSubmitPaymentsDeductions)) { + throw new InvalidArgumentException('non-nullable autoSubmitPaymentsDeductions cannot be null'); } - $this->container['autoSubmitPaymentsHmrc'] = $autoSubmitPaymentsHmrc; + $this->container['autoSubmitPaymentsDeductions'] = $autoSubmitPaymentsDeductions; return $this; } /** - * Gets autoSubmitPaymentsDeductions + * Gets autoSubmitPaymentsEmployee * * @return bool|null */ - public function getAutoSubmitPaymentsDeductions(): ?bool + public function getAutoSubmitPaymentsEmployee(): ?bool { - return $this->container['autoSubmitPaymentsDeductions']; + return $this->container['autoSubmitPaymentsEmployee']; } /** - * Sets autoSubmitPaymentsDeductions + * Sets autoSubmitPaymentsEmployee * - * @param bool|null $autoSubmitPaymentsDeductions Used in conjunction with AutoSubmitPayments. + * @param bool|null $autoSubmitPaymentsEmployee Used in conjunction with AutoSubmitPayments. * * @return $this */ - public function setAutoSubmitPaymentsDeductions(?bool $autoSubmitPaymentsDeductions): static + public function setAutoSubmitPaymentsEmployee(?bool $autoSubmitPaymentsEmployee): static { - if (is_null($autoSubmitPaymentsDeductions)) { - throw new InvalidArgumentException('non-nullable autoSubmitPaymentsDeductions cannot be null'); + if (is_null($autoSubmitPaymentsEmployee)) { + throw new InvalidArgumentException('non-nullable autoSubmitPaymentsEmployee cannot be null'); } - $this->container['autoSubmitPaymentsDeductions'] = $autoSubmitPaymentsDeductions; + $this->container['autoSubmitPaymentsEmployee'] = $autoSubmitPaymentsEmployee; return $this; } /** - * Gets autoSubmitPaymentsAeos + * Gets autoSubmitPaymentsHmrc * * @return bool|null */ - public function getAutoSubmitPaymentsAeos(): ?bool + public function getAutoSubmitPaymentsHmrc(): ?bool { - return $this->container['autoSubmitPaymentsAeos']; + return $this->container['autoSubmitPaymentsHmrc']; } /** - * Sets autoSubmitPaymentsAeos + * Sets autoSubmitPaymentsHmrc * - * @param bool|null $autoSubmitPaymentsAeos Used in conjunction with AutoSubmitPayments. + * @param bool|null $autoSubmitPaymentsHmrc Used in conjunction with AutoSubmitPayments. * * @return $this */ - public function setAutoSubmitPaymentsAeos(?bool $autoSubmitPaymentsAeos): static + public function setAutoSubmitPaymentsHmrc(?bool $autoSubmitPaymentsHmrc): static { - if (is_null($autoSubmitPaymentsAeos)) { - throw new InvalidArgumentException('non-nullable autoSubmitPaymentsAeos cannot be null'); + if (is_null($autoSubmitPaymentsHmrc)) { + throw new InvalidArgumentException('non-nullable autoSubmitPaymentsHmrc cannot be null'); } - $this->container['autoSubmitPaymentsAeos'] = $autoSubmitPaymentsAeos; + $this->container['autoSubmitPaymentsHmrc'] = $autoSubmitPaymentsHmrc; return $this; } @@ -852,28 +798,28 @@ public function setAutoSubmitPaymentsPensions(?bool $autoSubmitPaymentsPensions) } /** - * Gets payslipReleaseType + * Gets autoSubmitPayslips * - * @return \SynergiTech\Staffology\Model\PayslipReleaseType|null + * @return bool|null */ - public function getPayslipReleaseType(): ?\SynergiTech\Staffology\Model\PayslipReleaseType + public function getAutoSubmitPayslips(): ?bool { - return $this->container['payslipReleaseType']; + return $this->container['autoSubmitPayslips']; } /** - * Sets payslipReleaseType + * Sets autoSubmitPayslips * - * @param \SynergiTech\Staffology\Model\PayslipReleaseType|null $payslipReleaseType payslipReleaseType + * @param bool|null $autoSubmitPayslips If set to true, we'll automatically submit payslips whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'. * * @return $this */ - public function setPayslipReleaseType(?\SynergiTech\Staffology\Model\PayslipReleaseType $payslipReleaseType): static + public function setAutoSubmitPayslips(?bool $autoSubmitPayslips): static { - if (is_null($payslipReleaseType)) { - throw new InvalidArgumentException('non-nullable payslipReleaseType cannot be null'); + if (is_null($autoSubmitPayslips)) { + throw new InvalidArgumentException('non-nullable autoSubmitPayslips cannot be null'); } - $this->container['payslipReleaseType'] = $payslipReleaseType; + $this->container['autoSubmitPayslips'] = $autoSubmitPayslips; return $this; } @@ -960,28 +906,55 @@ public function setAutoSubmitPayslipsPayslipReleaseTime(?\SynergiTech\Staffology } /** - * Gets employeesWithoutEmailAddress + * Gets autoSubmitPensionLetters * - * @return int|null + * @return bool|null */ - public function getEmployeesWithoutEmailAddress(): ?int + public function getAutoSubmitPensionLetters(): ?bool { - return $this->container['employeesWithoutEmailAddress']; + return $this->container['autoSubmitPensionLetters']; } /** - * Sets employeesWithoutEmailAddress + * Sets autoSubmitPensionLetters * - * @param int|null $employeesWithoutEmailAddress [readonly] A count of how many employees or subcontractors for this employer do not have email addresses + * @param bool|null $autoSubmitPensionLetters If set to true, we'll automatically submit Pension Letters whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'. * * @return $this */ - public function setEmployeesWithoutEmailAddress(?int $employeesWithoutEmailAddress): static + public function setAutoSubmitPensionLetters(?bool $autoSubmitPensionLetters): static { - if (is_null($employeesWithoutEmailAddress)) { - throw new InvalidArgumentException('non-nullable employeesWithoutEmailAddress cannot be null'); + if (is_null($autoSubmitPensionLetters)) { + throw new InvalidArgumentException('non-nullable autoSubmitPensionLetters cannot be null'); } - $this->container['employeesWithoutEmailAddress'] = $employeesWithoutEmailAddress; + $this->container['autoSubmitPensionLetters'] = $autoSubmitPensionLetters; + + return $this; + } + + /** + * Gets codingNoticesAutomaticallyApplied + * + * @return bool|null + */ + public function getCodingNoticesAutomaticallyApplied(): ?bool + { + return $this->container['codingNoticesAutomaticallyApplied']; + } + + /** + * Sets codingNoticesAutomaticallyApplied + * + * @param bool|null $codingNoticesAutomaticallyApplied [readonly] An indicator of whether or not this employer is automatically applying DpsNotices + * + * @return $this + */ + public function setCodingNoticesAutomaticallyApplied(?bool $codingNoticesAutomaticallyApplied): static + { + if (is_null($codingNoticesAutomaticallyApplied)) { + throw new InvalidArgumentException('non-nullable codingNoticesAutomaticallyApplied cannot be null'); + } + $this->container['codingNoticesAutomaticallyApplied'] = $codingNoticesAutomaticallyApplied; return $this; } @@ -1014,55 +987,82 @@ public function setEmployeesWithEmailAddressButNotAutoSending(?int $employeesWit } /** - * Gets subcontractorsNotAutoSendingStatement + * Gets employeesWithoutEmailAddress * * @return int|null */ - public function getSubcontractorsNotAutoSendingStatement(): ?int + public function getEmployeesWithoutEmailAddress(): ?int { - return $this->container['subcontractorsNotAutoSendingStatement']; + return $this->container['employeesWithoutEmailAddress']; } /** - * Sets subcontractorsNotAutoSendingStatement + * Sets employeesWithoutEmailAddress * - * @param int|null $subcontractorsNotAutoSendingStatement [readonly] A count of how many subscontractors for this employer do don't have the option enabled to auto-email statement + * @param int|null $employeesWithoutEmailAddress [readonly] A count of how many employees or subcontractors for this employer do not have email addresses * * @return $this */ - public function setSubcontractorsNotAutoSendingStatement(?int $subcontractorsNotAutoSendingStatement): static + public function setEmployeesWithoutEmailAddress(?int $employeesWithoutEmailAddress): static { - if (is_null($subcontractorsNotAutoSendingStatement)) { - throw new InvalidArgumentException('non-nullable subcontractorsNotAutoSendingStatement cannot be null'); + if (is_null($employeesWithoutEmailAddress)) { + throw new InvalidArgumentException('non-nullable employeesWithoutEmailAddress cannot be null'); } - $this->container['subcontractorsNotAutoSendingStatement'] = $subcontractorsNotAutoSendingStatement; + $this->container['employeesWithoutEmailAddress'] = $employeesWithoutEmailAddress; return $this; } /** - * Gets codingNoticesAutomaticallyApplied + * Gets enableAutoOpen * * @return bool|null */ - public function getCodingNoticesAutomaticallyApplied(): ?bool + public function getEnableAutoOpen(): ?bool { - return $this->container['codingNoticesAutomaticallyApplied']; + return $this->container['enableAutoOpen']; } /** - * Sets codingNoticesAutomaticallyApplied + * Sets enableAutoOpen * - * @param bool|null $codingNoticesAutomaticallyApplied [readonly] An indicator of whether or not this employer is automatically applying DpsNotices + * @param bool|null $enableAutoOpen IF enabled then whenever you close a payrun, the next one will be started. Automatically set to true if EnableAutoPilot is true * * @return $this */ - public function setCodingNoticesAutomaticallyApplied(?bool $codingNoticesAutomaticallyApplied): static + public function setEnableAutoOpen(?bool $enableAutoOpen): static { - if (is_null($codingNoticesAutomaticallyApplied)) { - throw new InvalidArgumentException('non-nullable codingNoticesAutomaticallyApplied cannot be null'); + if (is_null($enableAutoOpen)) { + throw new InvalidArgumentException('non-nullable enableAutoOpen cannot be null'); } - $this->container['codingNoticesAutomaticallyApplied'] = $codingNoticesAutomaticallyApplied; + $this->container['enableAutoOpen'] = $enableAutoOpen; + + return $this; + } + + /** + * Gets enableAutoPilot + * + * @return bool|null + */ + public function getEnableAutoPilot(): ?bool + { + return $this->container['enableAutoPilot']; + } + + /** + * Sets enableAutoPilot + * + * @param bool|null $enableAutoPilot IF enabled then payruns will be automatically finalised on the payment date and the next payrun will be started + * + * @return $this + */ + public function setEnableAutoPilot(?bool $enableAutoPilot): static + { + if (is_null($enableAutoPilot)) { + throw new InvalidArgumentException('non-nullable enableAutoPilot cannot be null'); + } + $this->container['enableAutoPilot'] = $enableAutoPilot; return $this; } @@ -1102,55 +1102,55 @@ public function setPayrunEmails(?array $payrunEmails): static } /** - * Gets autoSubmitPensionLetters + * Gets payslipReleaseType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PayslipReleaseType|null */ - public function getAutoSubmitPensionLetters(): ?bool + public function getPayslipReleaseType(): ?\SynergiTech\Staffology\Model\PayslipReleaseType { - return $this->container['autoSubmitPensionLetters']; + return $this->container['payslipReleaseType']; } /** - * Sets autoSubmitPensionLetters + * Sets payslipReleaseType * - * @param bool|null $autoSubmitPensionLetters If set to true, we'll automatically submit Pension Letters whenever you finalise a PayRun. The employer must be connected to an ExternalDataProvider supporting Type of 'EmployeePortal'. + * @param \SynergiTech\Staffology\Model\PayslipReleaseType|null $payslipReleaseType payslipReleaseType * * @return $this */ - public function setAutoSubmitPensionLetters(?bool $autoSubmitPensionLetters): static + public function setPayslipReleaseType(?\SynergiTech\Staffology\Model\PayslipReleaseType $payslipReleaseType): static { - if (is_null($autoSubmitPensionLetters)) { - throw new InvalidArgumentException('non-nullable autoSubmitPensionLetters cannot be null'); + if (is_null($payslipReleaseType)) { + throw new InvalidArgumentException('non-nullable payslipReleaseType cannot be null'); } - $this->container['autoSubmitPensionLetters'] = $autoSubmitPensionLetters; + $this->container['payslipReleaseType'] = $payslipReleaseType; return $this; } /** - * Gets autoSubmitEps + * Gets subcontractorsNotAutoSendingStatement * - * @return bool|null + * @return int|null */ - public function getAutoSubmitEps(): ?bool + public function getSubcontractorsNotAutoSendingStatement(): ?int { - return $this->container['autoSubmitEps']; + return $this->container['subcontractorsNotAutoSendingStatement']; } /** - * Sets autoSubmitEps + * Sets subcontractorsNotAutoSendingStatement * - * @param bool|null $autoSubmitEps If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun. + * @param int|null $subcontractorsNotAutoSendingStatement [readonly] A count of how many subscontractors for this employer do don't have the option enabled to auto-email statement * * @return $this */ - public function setAutoSubmitEps(?bool $autoSubmitEps): static + public function setSubcontractorsNotAutoSendingStatement(?int $subcontractorsNotAutoSendingStatement): static { - if (is_null($autoSubmitEps)) { - throw new InvalidArgumentException('non-nullable autoSubmitEps cannot be null'); + if (is_null($subcontractorsNotAutoSendingStatement)) { + throw new InvalidArgumentException('non-nullable subcontractorsNotAutoSendingStatement cannot be null'); } - $this->container['autoSubmitEps'] = $autoSubmitEps; + $this->container['subcontractorsNotAutoSendingStatement'] = $subcontractorsNotAutoSendingStatement; return $this; } diff --git a/src/Model/AverageHolidayPayRateReport.php b/src/Model/AverageHolidayPayRateReport.php index 2c81bc8..e50ba35 100644 --- a/src/Model/AverageHolidayPayRateReport.php +++ b/src/Model/AverageHolidayPayRateReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,20 +59,21 @@ class AverageHolidayPayRateReport implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPITypes = [ - 'lines' => '\SynergiTech\Staffology\Model\AverageHolidayPayRateReportLine[]', 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'isDraft' => 'bool', + 'lines' => '\SynergiTech\Staffology\Model\AverageHolidayPayRateReportLine[]', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -81,20 +82,21 @@ class AverageHolidayPayRateReport implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPIFormats = [ - 'lines' => null, 'employer' => null, - 'payPeriod' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'isDraft' => null, + 'lines' => null, 'ordinal' => 'int32', + 'payPeriod' => null, 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -103,20 +105,21 @@ class AverageHolidayPayRateReport implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPINullables = [ - 'lines' => true, 'employer' => false, - 'payPeriod' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'isDraft' => false, + 'lines' => true, 'ordinal' => false, + 'payPeriod' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -205,20 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'lines' => 'lines', 'employer' => 'employer', - 'payPeriod' => 'payPeriod', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'isDraft' => 'isDraft', + 'lines' => 'lines', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -227,20 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'lines' => 'setLines', 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'isDraft' => 'setIsDraft', + 'lines' => 'setLines', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -249,20 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'lines' => 'getLines', 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'isDraft' => 'getIsDraft', + 'lines' => 'getLines', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -321,20 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -380,89 +387,150 @@ public function valid(): bool /** - * Gets lines + * Gets employer * - * @return \SynergiTech\Staffology\Model\AverageHolidayPayRateReportLine[]|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getLines(): ?array + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['lines']; + return $this->container['employer']; } /** - * Sets lines + * Sets employer * - * @param \SynergiTech\Staffology\Model\AverageHolidayPayRateReportLine[]|null $lines lines + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setLines(?array $lines): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); + } + $this->container['employer'] = $employer; + + return $this; + } + + /** + * Gets endDate + * + * @return \DateTime|null + */ + public function getEndDate(): ?\DateTime + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param \DateTime|null $endDate endDate + * + * @return $this + */ + public function setEndDate(?\DateTime $endDate): static + { + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets endPeriodName + * + * @return string|null + */ + public function getEndPeriodName(): ?string + { + return $this->container['endPeriodName']; + } + + /** + * Sets endPeriodName + * + * @param string|null $endPeriodName endPeriodName + * + * @return $this + */ + public function setEndPeriodName(?string $endPeriodName): static + { + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); + $index = array_search('endPeriodName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lines'] = $lines; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets employer + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getIsDraft(): ?bool { - return $this->container['employer']; + return $this->container['isDraft']; } /** - * Sets employer + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param bool|null $isDraft isDraft * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['employer'] = $employer; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets payPeriod + * Gets lines * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return \SynergiTech\Staffology\Model\AverageHolidayPayRateReportLine[]|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getLines(): ?array { - return $this->container['payPeriod']; + return $this->container['lines']; } /** - * Sets payPeriod + * Sets lines * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param \SynergiTech\Staffology\Model\AverageHolidayPayRateReportLine[]|null $lines lines * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setLines(?array $lines): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriod'] = $payPeriod; + $this->container['lines'] = $lines; return $this; } @@ -494,6 +562,33 @@ public function setOrdinal(?int $ordinal): static return $this; } + /** + * Gets payPeriod + * + * @return \SynergiTech\Staffology\Model\PayPeriods|null + */ + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + { + return $this->container['payPeriod']; + } + + /** + * Sets payPeriod + * + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * + * @return $this + */ + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + { + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + } + $this->container['payPeriod'] = $payPeriod; + + return $this; + } + /** * Gets period * @@ -549,69 +644,28 @@ public function setPeriodTo(?int $periodTo): static } /** - * Gets startPeriodName - * - * @return string|null - */ - public function getStartPeriodName(): ?string - { - return $this->container['startPeriodName']; - } - - /** - * Sets startPeriodName - * - * @param string|null $startPeriodName startPeriodName - * - * @return $this - */ - public function setStartPeriodName(?string $startPeriodName): static - { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['startPeriodName'] = $startPeriodName; - - return $this; - } - - /** - * Gets endPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getEndPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['endPeriodName']; + return $this->container['report']; } /** - * Sets endPeriodName + * Sets report * - * @param string|null $endPeriodName endPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['report'] = $report; return $this; } @@ -644,55 +698,35 @@ public function setStartDate(?\DateTime $startDate): static } /** - * Gets endDate - * - * @return \DateTime|null - */ - public function getEndDate(): ?\DateTime - { - return $this->container['endDate']; - } - - /** - * Sets endDate - * - * @param \DateTime|null $endDate endDate - * - * @return $this - */ - public function setEndDate(?\DateTime $endDate): static - { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); - } - $this->container['endDate'] = $endDate; - - return $this; - } - - /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -759,28 +793,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/AverageHolidayPayRateReportLine.php b/src/Model/AverageHolidayPayRateReportLine.php index b7d4b84..5127a7f 100644 --- a/src/Model/AverageHolidayPayRateReportLine.php +++ b/src/Model/AverageHolidayPayRateReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class AverageHolidayPayRateReportLine implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ - 'payrollCode' => 'string', + 'department' => 'string', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'firstName' => 'string', 'lastName' => 'string', 'niNumber' => 'string', + 'payrollCode' => 'string', 'period' => 'int', - 'rate' => 'float', - 'employee' => '\SynergiTech\Staffology\Model\Item', - 'department' => 'string' + 'rate' => 'float' ]; /** @@ -75,14 +75,14 @@ class AverageHolidayPayRateReportLine implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ - 'payrollCode' => null, + 'department' => null, + 'employee' => null, 'firstName' => null, 'lastName' => null, 'niNumber' => null, + 'payrollCode' => null, 'period' => 'int32', - 'rate' => 'double', - 'employee' => null, - 'department' => null + 'rate' => 'double' ]; /** @@ -91,14 +91,14 @@ class AverageHolidayPayRateReportLine implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ - 'payrollCode' => true, + 'department' => true, + 'employee' => false, 'firstName' => true, 'lastName' => true, 'niNumber' => true, + 'payrollCode' => true, 'period' => false, - 'rate' => false, - 'employee' => false, - 'department' => true + 'rate' => false ]; /** @@ -187,14 +187,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollCode' => 'payrollCode', + 'department' => 'department', + 'employee' => 'employee', 'firstName' => 'firstName', 'lastName' => 'lastName', 'niNumber' => 'niNumber', + 'payrollCode' => 'payrollCode', 'period' => 'period', - 'rate' => 'rate', - 'employee' => 'employee', - 'department' => 'department' + 'rate' => 'rate' ]; /** @@ -203,14 +203,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollCode' => 'setPayrollCode', + 'department' => 'setDepartment', + 'employee' => 'setEmployee', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', 'niNumber' => 'setNiNumber', + 'payrollCode' => 'setPayrollCode', 'period' => 'setPeriod', - 'rate' => 'setRate', - 'employee' => 'setEmployee', - 'department' => 'setDepartment' + 'rate' => 'setRate' ]; /** @@ -219,14 +219,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollCode' => 'getPayrollCode', + 'department' => 'getDepartment', + 'employee' => 'getEmployee', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', 'niNumber' => 'getNiNumber', + 'payrollCode' => 'getPayrollCode', 'period' => 'getPeriod', - 'rate' => 'getRate', - 'employee' => 'getEmployee', - 'department' => 'getDepartment' + 'rate' => 'getRate' ]; /** @@ -285,14 +285,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('niNumber', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('rate', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); } /** @@ -338,35 +338,62 @@ public function valid(): bool /** - * Gets payrollCode + * Gets department * * @return string|null */ - public function getPayrollCode(): ?string + public function getDepartment(): ?string { - return $this->container['payrollCode']; + return $this->container['department']; } /** - * Sets payrollCode + * Sets department * - * @param string|null $payrollCode Payroll code of the employee + * @param string|null $department department * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setDepartment(?string $department): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); + $index = array_search('department', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payrollCode'] = $payrollCode; + $this->container['department'] = $department; + + return $this; + } + + /** + * Gets employee + * + * @return \SynergiTech\Staffology\Model\Item|null + */ + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + { + return $this->container['employee']; + } + + /** + * Sets employee + * + * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * + * @return $this + */ + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + { + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); + } + $this->container['employee'] = $employee; return $this; } @@ -473,6 +500,40 @@ public function setNiNumber(?string $niNumber): static return $this; } + /** + * Gets payrollCode + * + * @return string|null + */ + public function getPayrollCode(): ?string + { + return $this->container['payrollCode']; + } + + /** + * Sets payrollCode + * + * @param string|null $payrollCode Payroll code of the employee + * + * @return $this + */ + public function setPayrollCode(?string $payrollCode): static + { + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payrollCode'] = $payrollCode; + + return $this; + } + /** * Gets period * @@ -526,67 +587,6 @@ public function setRate(?float $rate): static return $this; } - - /** - * Gets employee - * - * @return \SynergiTech\Staffology\Model\Item|null - */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item - { - return $this->container['employee']; - } - - /** - * Sets employee - * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee - * - * @return $this - */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static - { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); - } - $this->container['employee'] = $employee; - - return $this; - } - - /** - * Gets department - * - * @return string|null - */ - public function getDepartment(): ?string - { - return $this->container['department']; - } - - /** - * Sets department - * - * @param string|null $department department - * - * @return $this - */ - public function setDepartment(?string $department): static - { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['department'] = $department; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/AverageHolidayPayRateReportReportResponse.php b/src/Model/AverageHolidayPayRateReportReportResponse.php index c036d27..16f21b7 100644 --- a/src/Model/AverageHolidayPayRateReportReportResponse.php +++ b/src/Model/AverageHolidayPayRateReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class AverageHolidayPayRateReportReportResponse implements ModelInterface, Array * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\AverageHolidayPayRateReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class AverageHolidayPayRateReportReportResponse implements ModelInterface, Array * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class AverageHolidayPayRateReportReportResponse implements ModelInterface, Array * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/AveragePayGradesReportLine.php b/src/Model/AveragePayGradesReportLine.php index 57b598c..5f71a59 100644 --- a/src/Model/AveragePayGradesReportLine.php +++ b/src/Model/AveragePayGradesReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,15 @@ class AveragePayGradesReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ + 'department' => 'string', 'effectiveDate' => '\DateTime', - 'paySpineName' => 'string', - 'payGradeName' => 'string', - 'lowerGradePoint' => 'string', - 'upperGradePoint' => 'string', - 'upperPointAltMax' => 'bool', 'employee' => '\SynergiTech\Staffology\Model\Item', + 'lowerGradePoint' => 'string', + 'payGradeName' => 'string', + 'paySpineName' => 'string', 'payrollCode' => 'string', - 'department' => 'string' + 'upperGradePoint' => 'string', + 'upperPointAltMax' => 'bool' ]; /** @@ -76,15 +76,15 @@ class AveragePayGradesReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ + 'department' => null, 'effectiveDate' => 'date', - 'paySpineName' => null, - 'payGradeName' => null, - 'lowerGradePoint' => null, - 'upperGradePoint' => null, - 'upperPointAltMax' => null, 'employee' => null, + 'lowerGradePoint' => null, + 'payGradeName' => null, + 'paySpineName' => null, 'payrollCode' => null, - 'department' => null + 'upperGradePoint' => null, + 'upperPointAltMax' => null ]; /** @@ -93,15 +93,15 @@ class AveragePayGradesReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ + 'department' => true, 'effectiveDate' => false, - 'paySpineName' => true, - 'payGradeName' => true, - 'lowerGradePoint' => true, - 'upperGradePoint' => true, - 'upperPointAltMax' => false, 'employee' => false, + 'lowerGradePoint' => true, + 'payGradeName' => true, + 'paySpineName' => true, 'payrollCode' => true, - 'department' => true + 'upperGradePoint' => true, + 'upperPointAltMax' => false ]; /** @@ -190,15 +190,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'department' => 'department', 'effectiveDate' => 'effectiveDate', - 'paySpineName' => 'paySpineName', - 'payGradeName' => 'payGradeName', - 'lowerGradePoint' => 'lowerGradePoint', - 'upperGradePoint' => 'upperGradePoint', - 'upperPointAltMax' => 'upperPointAltMax', 'employee' => 'employee', + 'lowerGradePoint' => 'lowerGradePoint', + 'payGradeName' => 'payGradeName', + 'paySpineName' => 'paySpineName', 'payrollCode' => 'payrollCode', - 'department' => 'department' + 'upperGradePoint' => 'upperGradePoint', + 'upperPointAltMax' => 'upperPointAltMax' ]; /** @@ -207,15 +207,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'department' => 'setDepartment', 'effectiveDate' => 'setEffectiveDate', - 'paySpineName' => 'setPaySpineName', - 'payGradeName' => 'setPayGradeName', - 'lowerGradePoint' => 'setLowerGradePoint', - 'upperGradePoint' => 'setUpperGradePoint', - 'upperPointAltMax' => 'setUpperPointAltMax', 'employee' => 'setEmployee', + 'lowerGradePoint' => 'setLowerGradePoint', + 'payGradeName' => 'setPayGradeName', + 'paySpineName' => 'setPaySpineName', 'payrollCode' => 'setPayrollCode', - 'department' => 'setDepartment' + 'upperGradePoint' => 'setUpperGradePoint', + 'upperPointAltMax' => 'setUpperPointAltMax' ]; /** @@ -224,15 +224,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'department' => 'getDepartment', 'effectiveDate' => 'getEffectiveDate', - 'paySpineName' => 'getPaySpineName', - 'payGradeName' => 'getPayGradeName', - 'lowerGradePoint' => 'getLowerGradePoint', - 'upperGradePoint' => 'getUpperGradePoint', - 'upperPointAltMax' => 'getUpperPointAltMax', 'employee' => 'getEmployee', + 'lowerGradePoint' => 'getLowerGradePoint', + 'payGradeName' => 'getPayGradeName', + 'paySpineName' => 'getPaySpineName', 'payrollCode' => 'getPayrollCode', - 'department' => 'getDepartment' + 'upperGradePoint' => 'getUpperGradePoint', + 'upperPointAltMax' => 'getUpperPointAltMax' ]; /** @@ -291,15 +291,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('department', $data ?? [], null); $this->setIfExists('effectiveDate', $data ?? [], null); - $this->setIfExists('paySpineName', $data ?? [], null); - $this->setIfExists('payGradeName', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('lowerGradePoint', $data ?? [], null); + $this->setIfExists('payGradeName', $data ?? [], null); + $this->setIfExists('paySpineName', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('upperGradePoint', $data ?? [], null); $this->setIfExists('upperPointAltMax', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); } /** @@ -345,96 +345,89 @@ public function valid(): bool /** - * Gets effectiveDate + * Gets department * - * @return \DateTime|null + * @return string|null */ - public function getEffectiveDate(): ?\DateTime + public function getDepartment(): ?string { - return $this->container['effectiveDate']; + return $this->container['department']; } /** - * Sets effectiveDate + * Sets department * - * @param \DateTime|null $effectiveDate Effective date for Pay spine grade + * @param string|null $department department * * @return $this */ - public function setEffectiveDate(?\DateTime $effectiveDate): static + public function setDepartment(?string $department): static { - if (is_null($effectiveDate)) { - throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('department', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['effectiveDate'] = $effectiveDate; + $this->container['department'] = $department; return $this; } /** - * Gets paySpineName + * Gets effectiveDate * - * @return string|null + * @return \DateTime|null */ - public function getPaySpineName(): ?string + public function getEffectiveDate(): ?\DateTime { - return $this->container['paySpineName']; + return $this->container['effectiveDate']; } /** - * Sets paySpineName + * Sets effectiveDate * - * @param string|null $paySpineName Name of Pay Spine + * @param \DateTime|null $effectiveDate Effective date for Pay spine grade * * @return $this */ - public function setPaySpineName(?string $paySpineName): static + public function setEffectiveDate(?\DateTime $effectiveDate): static { - if (is_null($paySpineName)) { - array_push($this->openAPINullablesSetToNull, 'paySpineName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paySpineName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($effectiveDate)) { + throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); } - $this->container['paySpineName'] = $paySpineName; + $this->container['effectiveDate'] = $effectiveDate; return $this; } /** - * Gets payGradeName + * Gets employee * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getPayGradeName(): ?string + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['payGradeName']; + return $this->container['employee']; } /** - * Sets payGradeName + * Sets employee * - * @param string|null $payGradeName Name of Pay grade name + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setPayGradeName(?string $payGradeName): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($payGradeName)) { - array_push($this->openAPINullablesSetToNull, 'payGradeName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payGradeName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['payGradeName'] = $payGradeName; + $this->container['employee'] = $employee; return $this; } @@ -474,89 +467,69 @@ public function setLowerGradePoint(?string $lowerGradePoint): static } /** - * Gets upperGradePoint + * Gets payGradeName * * @return string|null */ - public function getUpperGradePoint(): ?string + public function getPayGradeName(): ?string { - return $this->container['upperGradePoint']; + return $this->container['payGradeName']; } /** - * Sets upperGradePoint + * Sets payGradeName * - * @param string|null $upperGradePoint Upper grade point of pay spine grade + * @param string|null $payGradeName Name of Pay grade name * * @return $this */ - public function setUpperGradePoint(?string $upperGradePoint): static + public function setPayGradeName(?string $payGradeName): static { - if (is_null($upperGradePoint)) { - array_push($this->openAPINullablesSetToNull, 'upperGradePoint'); + if (is_null($payGradeName)) { + array_push($this->openAPINullablesSetToNull, 'payGradeName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('upperGradePoint', $nullablesSetToNull); + $index = array_search('payGradeName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['upperGradePoint'] = $upperGradePoint; - - return $this; - } - - /** - * Gets upperPointAltMax - * - * @return bool|null - */ - public function getUpperPointAltMax(): ?bool - { - return $this->container['upperPointAltMax']; - } - - /** - * Sets upperPointAltMax - * - * @param bool|null $upperPointAltMax To Check Alt Max of Upper point - * - * @return $this - */ - public function setUpperPointAltMax(?bool $upperPointAltMax): static - { - if (is_null($upperPointAltMax)) { - throw new InvalidArgumentException('non-nullable upperPointAltMax cannot be null'); - } - $this->container['upperPointAltMax'] = $upperPointAltMax; + $this->container['payGradeName'] = $payGradeName; return $this; } /** - * Gets employee + * Gets paySpineName * - * @return \SynergiTech\Staffology\Model\Item|null + * @return string|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getPaySpineName(): ?string { - return $this->container['employee']; + return $this->container['paySpineName']; } /** - * Sets employee + * Sets paySpineName * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param string|null $paySpineName Name of Pay Spine * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setPaySpineName(?string $paySpineName): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($paySpineName)) { + array_push($this->openAPINullablesSetToNull, 'paySpineName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('paySpineName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employee'] = $employee; + $this->container['paySpineName'] = $paySpineName; return $this; } @@ -596,35 +569,62 @@ public function setPayrollCode(?string $payrollCode): static } /** - * Gets department + * Gets upperGradePoint * * @return string|null */ - public function getDepartment(): ?string + public function getUpperGradePoint(): ?string { - return $this->container['department']; + return $this->container['upperGradePoint']; } /** - * Sets department + * Sets upperGradePoint * - * @param string|null $department department + * @param string|null $upperGradePoint Upper grade point of pay spine grade * * @return $this */ - public function setDepartment(?string $department): static + public function setUpperGradePoint(?string $upperGradePoint): static { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); + if (is_null($upperGradePoint)) { + array_push($this->openAPINullablesSetToNull, 'upperGradePoint'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); + $index = array_search('upperGradePoint', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['department'] = $department; + $this->container['upperGradePoint'] = $upperGradePoint; + + return $this; + } + + /** + * Gets upperPointAltMax + * + * @return bool|null + */ + public function getUpperPointAltMax(): ?bool + { + return $this->container['upperPointAltMax']; + } + + /** + * Sets upperPointAltMax + * + * @param bool|null $upperPointAltMax To Check Alt Max of Upper point + * + * @return $this + */ + public function setUpperPointAltMax(?bool $upperPointAltMax): static + { + if (is_null($upperPointAltMax)) { + throw new InvalidArgumentException('non-nullable upperPointAltMax cannot be null'); + } + $this->container['upperPointAltMax'] = $upperPointAltMax; return $this; } diff --git a/src/Model/AverageWeeklyEarnings.php b/src/Model/AverageWeeklyEarnings.php index 36bb8b3..ab107b6 100644 --- a/src/Model/AverageWeeklyEarnings.php +++ b/src/Model/AverageWeeklyEarnings.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,16 @@ class AverageWeeklyEarnings implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPITypes = [ - 'result' => '\SynergiTech\Staffology\Model\AverageWeeklyEarningsResult', - 'resultDescription' => 'string', 'averageEarnings' => 'float', - 'threshold' => 'float', 'eligibilityThreshold' => 'float', - 'requestedDate' => '\DateTime', - 'relevantPeriodStart' => '\DateTime', + 'relevantPeriodEarnings' => 'float', 'relevantPeriodEnd' => '\DateTime', + 'relevantPeriodStart' => '\DateTime', 'relevantPeriodWeekCount' => 'float', - 'relevantPeriodEarnings' => 'float' + 'requestedDate' => '\DateTime', + 'result' => '\SynergiTech\Staffology\Model\AverageWeeklyEarningsResult', + 'resultDescription' => 'string', + 'threshold' => 'float' ]; /** @@ -77,16 +77,16 @@ class AverageWeeklyEarnings implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPIFormats = [ - 'result' => null, - 'resultDescription' => null, 'averageEarnings' => 'double', - 'threshold' => 'double', 'eligibilityThreshold' => 'double', - 'requestedDate' => 'date', - 'relevantPeriodStart' => 'date', + 'relevantPeriodEarnings' => 'double', 'relevantPeriodEnd' => 'date', + 'relevantPeriodStart' => 'date', 'relevantPeriodWeekCount' => 'double', - 'relevantPeriodEarnings' => 'double' + 'requestedDate' => 'date', + 'result' => null, + 'resultDescription' => null, + 'threshold' => 'double' ]; /** @@ -95,16 +95,16 @@ class AverageWeeklyEarnings implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPINullables = [ - 'result' => false, - 'resultDescription' => true, 'averageEarnings' => false, - 'threshold' => false, 'eligibilityThreshold' => false, - 'requestedDate' => false, - 'relevantPeriodStart' => false, + 'relevantPeriodEarnings' => false, 'relevantPeriodEnd' => false, + 'relevantPeriodStart' => false, 'relevantPeriodWeekCount' => false, - 'relevantPeriodEarnings' => false + 'requestedDate' => false, + 'result' => false, + 'resultDescription' => true, + 'threshold' => false ]; /** @@ -193,16 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'result' => 'result', - 'resultDescription' => 'resultDescription', 'averageEarnings' => 'averageEarnings', - 'threshold' => 'threshold', 'eligibilityThreshold' => 'eligibilityThreshold', - 'requestedDate' => 'requestedDate', - 'relevantPeriodStart' => 'relevantPeriodStart', + 'relevantPeriodEarnings' => 'relevantPeriodEarnings', 'relevantPeriodEnd' => 'relevantPeriodEnd', + 'relevantPeriodStart' => 'relevantPeriodStart', 'relevantPeriodWeekCount' => 'relevantPeriodWeekCount', - 'relevantPeriodEarnings' => 'relevantPeriodEarnings' + 'requestedDate' => 'requestedDate', + 'result' => 'result', + 'resultDescription' => 'resultDescription', + 'threshold' => 'threshold' ]; /** @@ -211,16 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'result' => 'setResult', - 'resultDescription' => 'setResultDescription', 'averageEarnings' => 'setAverageEarnings', - 'threshold' => 'setThreshold', 'eligibilityThreshold' => 'setEligibilityThreshold', - 'requestedDate' => 'setRequestedDate', - 'relevantPeriodStart' => 'setRelevantPeriodStart', + 'relevantPeriodEarnings' => 'setRelevantPeriodEarnings', 'relevantPeriodEnd' => 'setRelevantPeriodEnd', + 'relevantPeriodStart' => 'setRelevantPeriodStart', 'relevantPeriodWeekCount' => 'setRelevantPeriodWeekCount', - 'relevantPeriodEarnings' => 'setRelevantPeriodEarnings' + 'requestedDate' => 'setRequestedDate', + 'result' => 'setResult', + 'resultDescription' => 'setResultDescription', + 'threshold' => 'setThreshold' ]; /** @@ -229,16 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'result' => 'getResult', - 'resultDescription' => 'getResultDescription', 'averageEarnings' => 'getAverageEarnings', - 'threshold' => 'getThreshold', 'eligibilityThreshold' => 'getEligibilityThreshold', - 'requestedDate' => 'getRequestedDate', - 'relevantPeriodStart' => 'getRelevantPeriodStart', + 'relevantPeriodEarnings' => 'getRelevantPeriodEarnings', 'relevantPeriodEnd' => 'getRelevantPeriodEnd', + 'relevantPeriodStart' => 'getRelevantPeriodStart', 'relevantPeriodWeekCount' => 'getRelevantPeriodWeekCount', - 'relevantPeriodEarnings' => 'getRelevantPeriodEarnings' + 'requestedDate' => 'getRequestedDate', + 'result' => 'getResult', + 'resultDescription' => 'getResultDescription', + 'threshold' => 'getThreshold' ]; /** @@ -297,16 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('result', $data ?? [], null); - $this->setIfExists('resultDescription', $data ?? [], null); $this->setIfExists('averageEarnings', $data ?? [], null); - $this->setIfExists('threshold', $data ?? [], null); $this->setIfExists('eligibilityThreshold', $data ?? [], null); - $this->setIfExists('requestedDate', $data ?? [], null); - $this->setIfExists('relevantPeriodStart', $data ?? [], null); + $this->setIfExists('relevantPeriodEarnings', $data ?? [], null); $this->setIfExists('relevantPeriodEnd', $data ?? [], null); + $this->setIfExists('relevantPeriodStart', $data ?? [], null); $this->setIfExists('relevantPeriodWeekCount', $data ?? [], null); - $this->setIfExists('relevantPeriodEarnings', $data ?? [], null); + $this->setIfExists('requestedDate', $data ?? [], null); + $this->setIfExists('result', $data ?? [], null); + $this->setIfExists('resultDescription', $data ?? [], null); + $this->setIfExists('threshold', $data ?? [], null); } /** @@ -352,278 +352,278 @@ public function valid(): bool /** - * Gets result + * Gets averageEarnings * - * @return \SynergiTech\Staffology\Model\AverageWeeklyEarningsResult|null + * @return float|null */ - public function getResult(): ?\SynergiTech\Staffology\Model\AverageWeeklyEarningsResult + public function getAverageEarnings(): ?float { - return $this->container['result']; + return $this->container['averageEarnings']; } /** - * Sets result + * Sets averageEarnings * - * @param \SynergiTech\Staffology\Model\AverageWeeklyEarningsResult|null $result result + * @param float|null $averageEarnings averageEarnings * * @return $this */ - public function setResult(?\SynergiTech\Staffology\Model\AverageWeeklyEarningsResult $result): static + public function setAverageEarnings(?float $averageEarnings): static { - if (is_null($result)) { - throw new InvalidArgumentException('non-nullable result cannot be null'); + if (is_null($averageEarnings)) { + throw new InvalidArgumentException('non-nullable averageEarnings cannot be null'); } - $this->container['result'] = $result; + $this->container['averageEarnings'] = $averageEarnings; return $this; } /** - * Gets resultDescription + * Gets eligibilityThreshold * - * @return string|null + * @return float|null */ - public function getResultDescription(): ?string + public function getEligibilityThreshold(): ?float { - return $this->container['resultDescription']; + return $this->container['eligibilityThreshold']; } /** - * Sets resultDescription + * Sets eligibilityThreshold * - * @param string|null $resultDescription resultDescription + * @param float|null $eligibilityThreshold eligibilityThreshold * * @return $this */ - public function setResultDescription(?string $resultDescription): static + public function setEligibilityThreshold(?float $eligibilityThreshold): static { - if (is_null($resultDescription)) { - array_push($this->openAPINullablesSetToNull, 'resultDescription'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('resultDescription', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($eligibilityThreshold)) { + throw new InvalidArgumentException('non-nullable eligibilityThreshold cannot be null'); } - $this->container['resultDescription'] = $resultDescription; + $this->container['eligibilityThreshold'] = $eligibilityThreshold; return $this; } /** - * Gets averageEarnings + * Gets relevantPeriodEarnings * * @return float|null */ - public function getAverageEarnings(): ?float + public function getRelevantPeriodEarnings(): ?float { - return $this->container['averageEarnings']; + return $this->container['relevantPeriodEarnings']; } /** - * Sets averageEarnings + * Sets relevantPeriodEarnings * - * @param float|null $averageEarnings averageEarnings + * @param float|null $relevantPeriodEarnings relevantPeriodEarnings * * @return $this */ - public function setAverageEarnings(?float $averageEarnings): static + public function setRelevantPeriodEarnings(?float $relevantPeriodEarnings): static { - if (is_null($averageEarnings)) { - throw new InvalidArgumentException('non-nullable averageEarnings cannot be null'); + if (is_null($relevantPeriodEarnings)) { + throw new InvalidArgumentException('non-nullable relevantPeriodEarnings cannot be null'); } - $this->container['averageEarnings'] = $averageEarnings; + $this->container['relevantPeriodEarnings'] = $relevantPeriodEarnings; return $this; } /** - * Gets threshold + * Gets relevantPeriodEnd * - * @return float|null + * @return \DateTime|null */ - public function getThreshold(): ?float + public function getRelevantPeriodEnd(): ?\DateTime { - return $this->container['threshold']; + return $this->container['relevantPeriodEnd']; } /** - * Sets threshold + * Sets relevantPeriodEnd * - * @param float|null $threshold threshold + * @param \DateTime|null $relevantPeriodEnd relevantPeriodEnd * * @return $this */ - public function setThreshold(?float $threshold): static + public function setRelevantPeriodEnd(?\DateTime $relevantPeriodEnd): static { - if (is_null($threshold)) { - throw new InvalidArgumentException('non-nullable threshold cannot be null'); + if (is_null($relevantPeriodEnd)) { + throw new InvalidArgumentException('non-nullable relevantPeriodEnd cannot be null'); } - $this->container['threshold'] = $threshold; + $this->container['relevantPeriodEnd'] = $relevantPeriodEnd; return $this; } /** - * Gets eligibilityThreshold + * Gets relevantPeriodStart * - * @return float|null + * @return \DateTime|null */ - public function getEligibilityThreshold(): ?float + public function getRelevantPeriodStart(): ?\DateTime { - return $this->container['eligibilityThreshold']; + return $this->container['relevantPeriodStart']; } /** - * Sets eligibilityThreshold + * Sets relevantPeriodStart * - * @param float|null $eligibilityThreshold eligibilityThreshold + * @param \DateTime|null $relevantPeriodStart relevantPeriodStart * * @return $this */ - public function setEligibilityThreshold(?float $eligibilityThreshold): static + public function setRelevantPeriodStart(?\DateTime $relevantPeriodStart): static { - if (is_null($eligibilityThreshold)) { - throw new InvalidArgumentException('non-nullable eligibilityThreshold cannot be null'); + if (is_null($relevantPeriodStart)) { + throw new InvalidArgumentException('non-nullable relevantPeriodStart cannot be null'); } - $this->container['eligibilityThreshold'] = $eligibilityThreshold; + $this->container['relevantPeriodStart'] = $relevantPeriodStart; return $this; } /** - * Gets requestedDate + * Gets relevantPeriodWeekCount * - * @return \DateTime|null + * @return float|null */ - public function getRequestedDate(): ?\DateTime + public function getRelevantPeriodWeekCount(): ?float { - return $this->container['requestedDate']; + return $this->container['relevantPeriodWeekCount']; } /** - * Sets requestedDate + * Sets relevantPeriodWeekCount * - * @param \DateTime|null $requestedDate requestedDate + * @param float|null $relevantPeriodWeekCount relevantPeriodWeekCount * * @return $this */ - public function setRequestedDate(?\DateTime $requestedDate): static + public function setRelevantPeriodWeekCount(?float $relevantPeriodWeekCount): static { - if (is_null($requestedDate)) { - throw new InvalidArgumentException('non-nullable requestedDate cannot be null'); + if (is_null($relevantPeriodWeekCount)) { + throw new InvalidArgumentException('non-nullable relevantPeriodWeekCount cannot be null'); } - $this->container['requestedDate'] = $requestedDate; + $this->container['relevantPeriodWeekCount'] = $relevantPeriodWeekCount; return $this; } /** - * Gets relevantPeriodStart + * Gets requestedDate * * @return \DateTime|null */ - public function getRelevantPeriodStart(): ?\DateTime + public function getRequestedDate(): ?\DateTime { - return $this->container['relevantPeriodStart']; + return $this->container['requestedDate']; } /** - * Sets relevantPeriodStart + * Sets requestedDate * - * @param \DateTime|null $relevantPeriodStart relevantPeriodStart + * @param \DateTime|null $requestedDate requestedDate * * @return $this */ - public function setRelevantPeriodStart(?\DateTime $relevantPeriodStart): static + public function setRequestedDate(?\DateTime $requestedDate): static { - if (is_null($relevantPeriodStart)) { - throw new InvalidArgumentException('non-nullable relevantPeriodStart cannot be null'); + if (is_null($requestedDate)) { + throw new InvalidArgumentException('non-nullable requestedDate cannot be null'); } - $this->container['relevantPeriodStart'] = $relevantPeriodStart; + $this->container['requestedDate'] = $requestedDate; return $this; } /** - * Gets relevantPeriodEnd + * Gets result * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\AverageWeeklyEarningsResult|null */ - public function getRelevantPeriodEnd(): ?\DateTime + public function getResult(): ?\SynergiTech\Staffology\Model\AverageWeeklyEarningsResult { - return $this->container['relevantPeriodEnd']; + return $this->container['result']; } /** - * Sets relevantPeriodEnd + * Sets result * - * @param \DateTime|null $relevantPeriodEnd relevantPeriodEnd + * @param \SynergiTech\Staffology\Model\AverageWeeklyEarningsResult|null $result result * * @return $this */ - public function setRelevantPeriodEnd(?\DateTime $relevantPeriodEnd): static + public function setResult(?\SynergiTech\Staffology\Model\AverageWeeklyEarningsResult $result): static { - if (is_null($relevantPeriodEnd)) { - throw new InvalidArgumentException('non-nullable relevantPeriodEnd cannot be null'); + if (is_null($result)) { + throw new InvalidArgumentException('non-nullable result cannot be null'); } - $this->container['relevantPeriodEnd'] = $relevantPeriodEnd; + $this->container['result'] = $result; return $this; } /** - * Gets relevantPeriodWeekCount + * Gets resultDescription * - * @return float|null + * @return string|null */ - public function getRelevantPeriodWeekCount(): ?float + public function getResultDescription(): ?string { - return $this->container['relevantPeriodWeekCount']; + return $this->container['resultDescription']; } /** - * Sets relevantPeriodWeekCount + * Sets resultDescription * - * @param float|null $relevantPeriodWeekCount relevantPeriodWeekCount + * @param string|null $resultDescription resultDescription * * @return $this */ - public function setRelevantPeriodWeekCount(?float $relevantPeriodWeekCount): static + public function setResultDescription(?string $resultDescription): static { - if (is_null($relevantPeriodWeekCount)) { - throw new InvalidArgumentException('non-nullable relevantPeriodWeekCount cannot be null'); + if (is_null($resultDescription)) { + array_push($this->openAPINullablesSetToNull, 'resultDescription'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('resultDescription', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['relevantPeriodWeekCount'] = $relevantPeriodWeekCount; + $this->container['resultDescription'] = $resultDescription; return $this; } /** - * Gets relevantPeriodEarnings + * Gets threshold * * @return float|null */ - public function getRelevantPeriodEarnings(): ?float + public function getThreshold(): ?float { - return $this->container['relevantPeriodEarnings']; + return $this->container['threshold']; } /** - * Sets relevantPeriodEarnings + * Sets threshold * - * @param float|null $relevantPeriodEarnings relevantPeriodEarnings + * @param float|null $threshold threshold * * @return $this */ - public function setRelevantPeriodEarnings(?float $relevantPeriodEarnings): static + public function setThreshold(?float $threshold): static { - if (is_null($relevantPeriodEarnings)) { - throw new InvalidArgumentException('non-nullable relevantPeriodEarnings cannot be null'); + if (is_null($threshold)) { + throw new InvalidArgumentException('non-nullable threshold cannot be null'); } - $this->container['relevantPeriodEarnings'] = $relevantPeriodEarnings; + $this->container['threshold'] = $threshold; return $this; } diff --git a/src/Model/AverageWeeklyEarningsResult.php b/src/Model/AverageWeeklyEarningsResult.php index 1873178..7f15b59 100644 --- a/src/Model/AverageWeeklyEarningsResult.php +++ b/src/Model/AverageWeeklyEarningsResult.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/BackgroundTaskStatus.php b/src/Model/BackgroundTaskStatus.php index b96d791..a3a7bb3 100644 --- a/src/Model/BackgroundTaskStatus.php +++ b/src/Model/BackgroundTaskStatus.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/BankDetails.php b/src/Model/BankDetails.php index 937e0e4..519e4ed 100644 --- a/src/Model/BankDetails.php +++ b/src/Model/BankDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class BankDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'bankName' => 'string', - 'bankBranch' => 'string', - 'bankReference' => 'string', 'accountName' => 'string', 'accountNumber' => 'string', - 'sortCode' => 'string', + 'bankBranch' => 'string', + 'bankName' => 'string', + 'bankReference' => 'string', + 'buildingSocietyRollNumber' => 'string', 'note' => 'string', - 'buildingSocietyRollNumber' => 'string' + 'sortCode' => 'string' ]; /** @@ -75,14 +75,14 @@ class BankDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'bankName' => null, - 'bankBranch' => null, - 'bankReference' => null, 'accountName' => null, 'accountNumber' => null, - 'sortCode' => null, + 'bankBranch' => null, + 'bankName' => null, + 'bankReference' => null, + 'buildingSocietyRollNumber' => null, 'note' => null, - 'buildingSocietyRollNumber' => null + 'sortCode' => null ]; /** @@ -91,14 +91,14 @@ class BankDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'bankName' => true, - 'bankBranch' => true, - 'bankReference' => true, 'accountName' => true, 'accountNumber' => true, - 'sortCode' => true, + 'bankBranch' => true, + 'bankName' => true, + 'bankReference' => true, + 'buildingSocietyRollNumber' => true, 'note' => true, - 'buildingSocietyRollNumber' => true + 'sortCode' => true ]; /** @@ -187,14 +187,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'bankName' => 'bankName', - 'bankBranch' => 'bankBranch', - 'bankReference' => 'bankReference', 'accountName' => 'accountName', 'accountNumber' => 'accountNumber', - 'sortCode' => 'sortCode', + 'bankBranch' => 'bankBranch', + 'bankName' => 'bankName', + 'bankReference' => 'bankReference', + 'buildingSocietyRollNumber' => 'buildingSocietyRollNumber', 'note' => 'note', - 'buildingSocietyRollNumber' => 'buildingSocietyRollNumber' + 'sortCode' => 'sortCode' ]; /** @@ -203,14 +203,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'bankName' => 'setBankName', - 'bankBranch' => 'setBankBranch', - 'bankReference' => 'setBankReference', 'accountName' => 'setAccountName', 'accountNumber' => 'setAccountNumber', - 'sortCode' => 'setSortCode', + 'bankBranch' => 'setBankBranch', + 'bankName' => 'setBankName', + 'bankReference' => 'setBankReference', + 'buildingSocietyRollNumber' => 'setBuildingSocietyRollNumber', 'note' => 'setNote', - 'buildingSocietyRollNumber' => 'setBuildingSocietyRollNumber' + 'sortCode' => 'setSortCode' ]; /** @@ -219,14 +219,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'bankName' => 'getBankName', - 'bankBranch' => 'getBankBranch', - 'bankReference' => 'getBankReference', 'accountName' => 'getAccountName', 'accountNumber' => 'getAccountNumber', - 'sortCode' => 'getSortCode', + 'bankBranch' => 'getBankBranch', + 'bankName' => 'getBankName', + 'bankReference' => 'getBankReference', + 'buildingSocietyRollNumber' => 'getBuildingSocietyRollNumber', 'note' => 'getNote', - 'buildingSocietyRollNumber' => 'getBuildingSocietyRollNumber' + 'sortCode' => 'getSortCode' ]; /** @@ -285,14 +285,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('bankName', $data ?? [], null); - $this->setIfExists('bankBranch', $data ?? [], null); - $this->setIfExists('bankReference', $data ?? [], null); $this->setIfExists('accountName', $data ?? [], null); $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('sortCode', $data ?? [], null); - $this->setIfExists('note', $data ?? [], null); + $this->setIfExists('bankBranch', $data ?? [], null); + $this->setIfExists('bankName', $data ?? [], null); + $this->setIfExists('bankReference', $data ?? [], null); $this->setIfExists('buildingSocietyRollNumber', $data ?? [], null); + $this->setIfExists('note', $data ?? [], null); + $this->setIfExists('sortCode', $data ?? [], null); } /** @@ -322,18 +322,6 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (!is_null($this->container['bankName']) && (mb_strlen($this->container['bankName']) > 100)) { - $invalidProperties[] = "invalid value for 'bankName', the character length must be smaller than or equal to 100."; - } - - if (!is_null($this->container['bankBranch']) && (mb_strlen($this->container['bankBranch']) > 100)) { - $invalidProperties[] = "invalid value for 'bankBranch', the character length must be smaller than or equal to 100."; - } - - if (!is_null($this->container['bankReference']) && (mb_strlen($this->container['bankReference']) > 100)) { - $invalidProperties[] = "invalid value for 'bankReference', the character length must be smaller than or equal to 100."; - } - if (!is_null($this->container['accountName']) && (mb_strlen($this->container['accountName']) > 100)) { $invalidProperties[] = "invalid value for 'accountName', the character length must be smaller than or equal to 100."; } @@ -342,12 +330,16 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'accountNumber', must be conform to the pattern /^\\d{8}$/."; } - if (!is_null($this->container['sortCode']) && !preg_match("/^(\\d{6}|\\d{2}-\\d{2}-\\d{2}|\\d{2} \\d{2} \\d{2})$/", $this->container['sortCode'])) { - $invalidProperties[] = "invalid value for 'sortCode', must be conform to the pattern /^(\\d{6}|\\d{2}-\\d{2}-\\d{2}|\\d{2} \\d{2} \\d{2})$/."; + if (!is_null($this->container['bankBranch']) && (mb_strlen($this->container['bankBranch']) > 100)) { + $invalidProperties[] = "invalid value for 'bankBranch', the character length must be smaller than or equal to 100."; } - if (!is_null($this->container['note']) && (mb_strlen($this->container['note']) > 200)) { - $invalidProperties[] = "invalid value for 'note', the character length must be smaller than or equal to 200."; + if (!is_null($this->container['bankName']) && (mb_strlen($this->container['bankName']) > 100)) { + $invalidProperties[] = "invalid value for 'bankName', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['bankReference']) && (mb_strlen($this->container['bankReference']) > 100)) { + $invalidProperties[] = "invalid value for 'bankReference', the character length must be smaller than or equal to 100."; } if (!is_null($this->container['buildingSocietyRollNumber']) && (mb_strlen($this->container['buildingSocietyRollNumber']) > 18)) { @@ -362,6 +354,14 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'buildingSocietyRollNumber', must be conform to the pattern /^[a-zA-Z0-9\\s\/\\.-]+$/."; } + if (!is_null($this->container['note']) && (mb_strlen($this->container['note']) > 200)) { + $invalidProperties[] = "invalid value for 'note', the character length must be smaller than or equal to 200."; + } + + if (!is_null($this->container['sortCode']) && !preg_match("/^(\\d{6}|\\d{2}-\\d{2}-\\d{2}|\\d{2} \\d{2} \\d{2})$/", $this->container['sortCode'])) { + $invalidProperties[] = "invalid value for 'sortCode', must be conform to the pattern /^(\\d{6}|\\d{2}-\\d{2}-\\d{2}|\\d{2} \\d{2} \\d{2})$/."; + } + return $invalidProperties; } @@ -378,231 +378,236 @@ public function valid(): bool /** - * Gets bankName + * Gets accountName * * @return string|null */ - public function getBankName(): ?string + public function getAccountName(): ?string { - return $this->container['bankName']; + return $this->container['accountName']; } /** - * Sets bankName + * Sets accountName * - * @param string|null $bankName bankName + * @param string|null $accountName accountName * * @return $this */ - public function setBankName(?string $bankName): static + public function setAccountName(?string $accountName): static { - if (is_null($bankName)) { - array_push($this->openAPINullablesSetToNull, 'bankName'); + if (is_null($accountName)) { + array_push($this->openAPINullablesSetToNull, 'accountName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankName', $nullablesSetToNull); + $index = array_search('accountName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($bankName) && (mb_strlen($bankName) > 100)) { - throw new InvalidArgumentException('invalid length for $bankName when calling BankDetails., must be smaller than or equal to 100.'); + if (!is_null($accountName) && (mb_strlen($accountName) > 100)) { + throw new InvalidArgumentException('invalid length for $accountName when calling BankDetails., must be smaller than or equal to 100.'); } - $this->container['bankName'] = $bankName; + $this->container['accountName'] = $accountName; return $this; } /** - * Gets bankBranch + * Gets accountNumber * * @return string|null */ - public function getBankBranch(): ?string + public function getAccountNumber(): ?string { - return $this->container['bankBranch']; + return $this->container['accountNumber']; } /** - * Sets bankBranch + * Sets accountNumber * - * @param string|null $bankBranch bankBranch + * @param string|null $accountNumber accountNumber * * @return $this */ - public function setBankBranch(?string $bankBranch): static + public function setAccountNumber(?string $accountNumber): static { - if (is_null($bankBranch)) { - array_push($this->openAPINullablesSetToNull, 'bankBranch'); + if (is_null($accountNumber)) { + array_push($this->openAPINullablesSetToNull, 'accountNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankBranch', $nullablesSetToNull); + $index = array_search('accountNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($bankBranch) && (mb_strlen($bankBranch) > 100)) { - throw new InvalidArgumentException('invalid length for $bankBranch when calling BankDetails., must be smaller than or equal to 100.'); + + if (!is_null($accountNumber) && (!preg_match("/^\\d{8}$/", ObjectSerializer::toString($accountNumber)))) { + throw new InvalidArgumentException("invalid value for \$accountNumber when calling BankDetails., must conform to the pattern /^\\d{8}$/."); } - $this->container['bankBranch'] = $bankBranch; + $this->container['accountNumber'] = $accountNumber; return $this; } /** - * Gets bankReference + * Gets bankBranch * * @return string|null */ - public function getBankReference(): ?string + public function getBankBranch(): ?string { - return $this->container['bankReference']; + return $this->container['bankBranch']; } /** - * Sets bankReference + * Sets bankBranch * - * @param string|null $bankReference bankReference + * @param string|null $bankBranch bankBranch * * @return $this */ - public function setBankReference(?string $bankReference): static + public function setBankBranch(?string $bankBranch): static { - if (is_null($bankReference)) { - array_push($this->openAPINullablesSetToNull, 'bankReference'); + if (is_null($bankBranch)) { + array_push($this->openAPINullablesSetToNull, 'bankBranch'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankReference', $nullablesSetToNull); + $index = array_search('bankBranch', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($bankReference) && (mb_strlen($bankReference) > 100)) { - throw new InvalidArgumentException('invalid length for $bankReference when calling BankDetails., must be smaller than or equal to 100.'); + if (!is_null($bankBranch) && (mb_strlen($bankBranch) > 100)) { + throw new InvalidArgumentException('invalid length for $bankBranch when calling BankDetails., must be smaller than or equal to 100.'); } - $this->container['bankReference'] = $bankReference; + $this->container['bankBranch'] = $bankBranch; return $this; } /** - * Gets accountName + * Gets bankName * * @return string|null */ - public function getAccountName(): ?string + public function getBankName(): ?string { - return $this->container['accountName']; + return $this->container['bankName']; } /** - * Sets accountName + * Sets bankName * - * @param string|null $accountName accountName + * @param string|null $bankName bankName * * @return $this */ - public function setAccountName(?string $accountName): static + public function setBankName(?string $bankName): static { - if (is_null($accountName)) { - array_push($this->openAPINullablesSetToNull, 'accountName'); + if (is_null($bankName)) { + array_push($this->openAPINullablesSetToNull, 'bankName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountName', $nullablesSetToNull); + $index = array_search('bankName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($accountName) && (mb_strlen($accountName) > 100)) { - throw new InvalidArgumentException('invalid length for $accountName when calling BankDetails., must be smaller than or equal to 100.'); + if (!is_null($bankName) && (mb_strlen($bankName) > 100)) { + throw new InvalidArgumentException('invalid length for $bankName when calling BankDetails., must be smaller than or equal to 100.'); } - $this->container['accountName'] = $accountName; + $this->container['bankName'] = $bankName; return $this; } /** - * Gets accountNumber + * Gets bankReference * * @return string|null */ - public function getAccountNumber(): ?string + public function getBankReference(): ?string { - return $this->container['accountNumber']; + return $this->container['bankReference']; } /** - * Sets accountNumber + * Sets bankReference * - * @param string|null $accountNumber accountNumber + * @param string|null $bankReference bankReference * * @return $this */ - public function setAccountNumber(?string $accountNumber): static + public function setBankReference(?string $bankReference): static { - if (is_null($accountNumber)) { - array_push($this->openAPINullablesSetToNull, 'accountNumber'); + if (is_null($bankReference)) { + array_push($this->openAPINullablesSetToNull, 'bankReference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountNumber', $nullablesSetToNull); + $index = array_search('bankReference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - - if (!is_null($accountNumber) && (!preg_match("/^\\d{8}$/", ObjectSerializer::toString($accountNumber)))) { - throw new InvalidArgumentException("invalid value for \$accountNumber when calling BankDetails., must conform to the pattern /^\\d{8}$/."); + if (!is_null($bankReference) && (mb_strlen($bankReference) > 100)) { + throw new InvalidArgumentException('invalid length for $bankReference when calling BankDetails., must be smaller than or equal to 100.'); } - $this->container['accountNumber'] = $accountNumber; + $this->container['bankReference'] = $bankReference; return $this; } /** - * Gets sortCode + * Gets buildingSocietyRollNumber * * @return string|null */ - public function getSortCode(): ?string + public function getBuildingSocietyRollNumber(): ?string { - return $this->container['sortCode']; + return $this->container['buildingSocietyRollNumber']; } /** - * Sets sortCode + * Sets buildingSocietyRollNumber * - * @param string|null $sortCode sortCode + * @param string|null $buildingSocietyRollNumber buildingSocietyRollNumber * * @return $this */ - public function setSortCode(?string $sortCode): static + public function setBuildingSocietyRollNumber(?string $buildingSocietyRollNumber): static { - if (is_null($sortCode)) { - array_push($this->openAPINullablesSetToNull, 'sortCode'); + if (is_null($buildingSocietyRollNumber)) { + array_push($this->openAPINullablesSetToNull, 'buildingSocietyRollNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('sortCode', $nullablesSetToNull); + $index = array_search('buildingSocietyRollNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - - if (!is_null($sortCode) && (!preg_match("/^(\\d{6}|\\d{2}-\\d{2}-\\d{2}|\\d{2} \\d{2} \\d{2})$/", ObjectSerializer::toString($sortCode)))) { - throw new InvalidArgumentException("invalid value for \$sortCode when calling BankDetails., must conform to the pattern /^(\\d{6}|\\d{2}-\\d{2}-\\d{2}|\\d{2} \\d{2} \\d{2})$/."); + if (!is_null($buildingSocietyRollNumber) && (mb_strlen($buildingSocietyRollNumber) > 18)) { + throw new InvalidArgumentException('invalid length for $buildingSocietyRollNumber when calling BankDetails., must be smaller than or equal to 18.'); + } + if (!is_null($buildingSocietyRollNumber) && (mb_strlen($buildingSocietyRollNumber) < 1)) { + throw new InvalidArgumentException('invalid length for $buildingSocietyRollNumber when calling BankDetails., must be bigger than or equal to 1.'); + } + if (!is_null($buildingSocietyRollNumber) && (!preg_match("/^[a-zA-Z0-9\\s\/\\.-]+$/", ObjectSerializer::toString($buildingSocietyRollNumber)))) { + throw new InvalidArgumentException("invalid value for \$buildingSocietyRollNumber when calling BankDetails., must conform to the pattern /^[a-zA-Z0-9\\s\/\\.-]+$/."); } - $this->container['sortCode'] = $sortCode; + $this->container['buildingSocietyRollNumber'] = $buildingSocietyRollNumber; return $this; } @@ -646,45 +651,40 @@ public function setNote(?string $note): static } /** - * Gets buildingSocietyRollNumber + * Gets sortCode * * @return string|null */ - public function getBuildingSocietyRollNumber(): ?string + public function getSortCode(): ?string { - return $this->container['buildingSocietyRollNumber']; + return $this->container['sortCode']; } /** - * Sets buildingSocietyRollNumber + * Sets sortCode * - * @param string|null $buildingSocietyRollNumber buildingSocietyRollNumber + * @param string|null $sortCode sortCode * * @return $this */ - public function setBuildingSocietyRollNumber(?string $buildingSocietyRollNumber): static + public function setSortCode(?string $sortCode): static { - if (is_null($buildingSocietyRollNumber)) { - array_push($this->openAPINullablesSetToNull, 'buildingSocietyRollNumber'); + if (is_null($sortCode)) { + array_push($this->openAPINullablesSetToNull, 'sortCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('buildingSocietyRollNumber', $nullablesSetToNull); + $index = array_search('sortCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($buildingSocietyRollNumber) && (mb_strlen($buildingSocietyRollNumber) > 18)) { - throw new InvalidArgumentException('invalid length for $buildingSocietyRollNumber when calling BankDetails., must be smaller than or equal to 18.'); - } - if (!is_null($buildingSocietyRollNumber) && (mb_strlen($buildingSocietyRollNumber) < 1)) { - throw new InvalidArgumentException('invalid length for $buildingSocietyRollNumber when calling BankDetails., must be bigger than or equal to 1.'); - } - if (!is_null($buildingSocietyRollNumber) && (!preg_match("/^[a-zA-Z0-9\\s\/\\.-]+$/", ObjectSerializer::toString($buildingSocietyRollNumber)))) { - throw new InvalidArgumentException("invalid value for \$buildingSocietyRollNumber when calling BankDetails., must conform to the pattern /^[a-zA-Z0-9\\s\/\\.-]+$/."); + + if (!is_null($sortCode) && (!preg_match("/^(\\d{6}|\\d{2}-\\d{2}-\\d{2}|\\d{2} \\d{2} \\d{2})$/", ObjectSerializer::toString($sortCode)))) { + throw new InvalidArgumentException("invalid value for \$sortCode when calling BankDetails., must conform to the pattern /^(\\d{6}|\\d{2}-\\d{2}-\\d{2}|\\d{2} \\d{2} \\d{2})$/."); } - $this->container['buildingSocietyRollNumber'] = $buildingSocietyRollNumber; + $this->container['sortCode'] = $sortCode; return $this; } diff --git a/src/Model/BankHolidayCollection.php b/src/Model/BankHolidayCollection.php index 24af70f..7d5d660 100644 --- a/src/Model/BankHolidayCollection.php +++ b/src/Model/BankHolidayCollection.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/BankPaymentInstruction.php b/src/Model/BankPaymentInstruction.php index f1b8a85..f1f3232 100644 --- a/src/Model/BankPaymentInstruction.php +++ b/src/Model/BankPaymentInstruction.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class BankPaymentInstruction implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'originator' => '\SynergiTech\Staffology\Model\BankDetails', + 'allowsMultiDate' => 'bool', 'bankPayments' => '\SynergiTech\Staffology\Model\PayRunPayment[]', - 'status' => '\SynergiTech\Staffology\Model\BackgroundTaskStatus', - 'statusMessage' => 'string', + 'bureauNumber' => 'string', 'link' => 'string', + 'originator' => '\SynergiTech\Staffology\Model\BankDetails', 'serviceUserNumber' => 'string', - 'bureauNumber' => 'string', - 'allowsMultiDate' => 'bool' + 'status' => '\SynergiTech\Staffology\Model\BackgroundTaskStatus', + 'statusMessage' => 'string' ]; /** @@ -75,14 +75,14 @@ class BankPaymentInstruction implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ - 'originator' => null, + 'allowsMultiDate' => null, 'bankPayments' => null, - 'status' => null, - 'statusMessage' => null, + 'bureauNumber' => null, 'link' => null, + 'originator' => null, 'serviceUserNumber' => null, - 'bureauNumber' => null, - 'allowsMultiDate' => null + 'status' => null, + 'statusMessage' => null ]; /** @@ -91,14 +91,14 @@ class BankPaymentInstruction implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ - 'originator' => false, + 'allowsMultiDate' => false, 'bankPayments' => true, - 'status' => false, - 'statusMessage' => true, + 'bureauNumber' => true, 'link' => true, + 'originator' => false, 'serviceUserNumber' => true, - 'bureauNumber' => true, - 'allowsMultiDate' => false + 'status' => false, + 'statusMessage' => true ]; /** @@ -187,14 +187,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'originator' => 'originator', + 'allowsMultiDate' => 'allowsMultiDate', 'bankPayments' => 'bankPayments', - 'status' => 'status', - 'statusMessage' => 'statusMessage', + 'bureauNumber' => 'bureauNumber', 'link' => 'link', + 'originator' => 'originator', 'serviceUserNumber' => 'serviceUserNumber', - 'bureauNumber' => 'bureauNumber', - 'allowsMultiDate' => 'allowsMultiDate' + 'status' => 'status', + 'statusMessage' => 'statusMessage' ]; /** @@ -203,14 +203,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'originator' => 'setOriginator', + 'allowsMultiDate' => 'setAllowsMultiDate', 'bankPayments' => 'setBankPayments', - 'status' => 'setStatus', - 'statusMessage' => 'setStatusMessage', + 'bureauNumber' => 'setBureauNumber', 'link' => 'setLink', + 'originator' => 'setOriginator', 'serviceUserNumber' => 'setServiceUserNumber', - 'bureauNumber' => 'setBureauNumber', - 'allowsMultiDate' => 'setAllowsMultiDate' + 'status' => 'setStatus', + 'statusMessage' => 'setStatusMessage' ]; /** @@ -219,14 +219,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'originator' => 'getOriginator', + 'allowsMultiDate' => 'getAllowsMultiDate', 'bankPayments' => 'getBankPayments', - 'status' => 'getStatus', - 'statusMessage' => 'getStatusMessage', + 'bureauNumber' => 'getBureauNumber', 'link' => 'getLink', + 'originator' => 'getOriginator', 'serviceUserNumber' => 'getServiceUserNumber', - 'bureauNumber' => 'getBureauNumber', - 'allowsMultiDate' => 'getAllowsMultiDate' + 'status' => 'getStatus', + 'statusMessage' => 'getStatusMessage' ]; /** @@ -285,14 +285,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('originator', $data ?? [], null); + $this->setIfExists('allowsMultiDate', $data ?? [], null); $this->setIfExists('bankPayments', $data ?? [], null); - $this->setIfExists('status', $data ?? [], null); - $this->setIfExists('statusMessage', $data ?? [], null); + $this->setIfExists('bureauNumber', $data ?? [], null); $this->setIfExists('link', $data ?? [], null); + $this->setIfExists('originator', $data ?? [], null); $this->setIfExists('serviceUserNumber', $data ?? [], null); - $this->setIfExists('bureauNumber', $data ?? [], null); - $this->setIfExists('allowsMultiDate', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('statusMessage', $data ?? [], null); } /** @@ -338,28 +338,28 @@ public function valid(): bool /** - * Gets originator + * Gets allowsMultiDate * - * @return \SynergiTech\Staffology\Model\BankDetails|null + * @return bool|null */ - public function getOriginator(): ?\SynergiTech\Staffology\Model\BankDetails + public function getAllowsMultiDate(): ?bool { - return $this->container['originator']; + return $this->container['allowsMultiDate']; } /** - * Sets originator + * Sets allowsMultiDate * - * @param \SynergiTech\Staffology\Model\BankDetails|null $originator originator + * @param bool|null $allowsMultiDate Allows multiple payment dates in the file * * @return $this */ - public function setOriginator(?\SynergiTech\Staffology\Model\BankDetails $originator): static + public function setAllowsMultiDate(?bool $allowsMultiDate): static { - if (is_null($originator)) { - throw new InvalidArgumentException('non-nullable originator cannot be null'); + if (is_null($allowsMultiDate)) { + throw new InvalidArgumentException('non-nullable allowsMultiDate cannot be null'); } - $this->container['originator'] = $originator; + $this->container['allowsMultiDate'] = $allowsMultiDate; return $this; } @@ -399,62 +399,35 @@ public function setBankPayments(?array $bankPayments): static } /** - * Gets status - * - * @return \SynergiTech\Staffology\Model\BackgroundTaskStatus|null - */ - public function getStatus(): ?\SynergiTech\Staffology\Model\BackgroundTaskStatus - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param \SynergiTech\Staffology\Model\BackgroundTaskStatus|null $status status - * - * @return $this - */ - public function setStatus(?\SynergiTech\Staffology\Model\BackgroundTaskStatus $status): static - { - if (is_null($status)) { - throw new InvalidArgumentException('non-nullable status cannot be null'); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets statusMessage + * Gets bureauNumber * * @return string|null */ - public function getStatusMessage(): ?string + public function getBureauNumber(): ?string { - return $this->container['statusMessage']; + return $this->container['bureauNumber']; } /** - * Sets statusMessage + * Sets bureauNumber * - * @param string|null $statusMessage [readonly] A message to elaborate on the Status + * @param string|null $bureauNumber Bureau number to be used if available while sending payment instruction * * @return $this */ - public function setStatusMessage(?string $statusMessage): static + public function setBureauNumber(?string $bureauNumber): static { - if (is_null($statusMessage)) { - array_push($this->openAPINullablesSetToNull, 'statusMessage'); + if (is_null($bureauNumber)) { + array_push($this->openAPINullablesSetToNull, 'bureauNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('statusMessage', $nullablesSetToNull); + $index = array_search('bureauNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['statusMessage'] = $statusMessage; + $this->container['bureauNumber'] = $bureauNumber; return $this; } @@ -493,6 +466,33 @@ public function setLink(?string $link): static return $this; } + /** + * Gets originator + * + * @return \SynergiTech\Staffology\Model\BankDetails|null + */ + public function getOriginator(): ?\SynergiTech\Staffology\Model\BankDetails + { + return $this->container['originator']; + } + + /** + * Sets originator + * + * @param \SynergiTech\Staffology\Model\BankDetails|null $originator originator + * + * @return $this + */ + public function setOriginator(?\SynergiTech\Staffology\Model\BankDetails $originator): static + { + if (is_null($originator)) { + throw new InvalidArgumentException('non-nullable originator cannot be null'); + } + $this->container['originator'] = $originator; + + return $this; + } + /** * Gets serviceUserNumber * @@ -528,62 +528,62 @@ public function setServiceUserNumber(?string $serviceUserNumber): static } /** - * Gets bureauNumber + * Gets status * - * @return string|null + * @return \SynergiTech\Staffology\Model\BackgroundTaskStatus|null */ - public function getBureauNumber(): ?string + public function getStatus(): ?\SynergiTech\Staffology\Model\BackgroundTaskStatus { - return $this->container['bureauNumber']; + return $this->container['status']; } /** - * Sets bureauNumber + * Sets status * - * @param string|null $bureauNumber Bureau number to be used if available while sending payment instruction + * @param \SynergiTech\Staffology\Model\BackgroundTaskStatus|null $status status * * @return $this */ - public function setBureauNumber(?string $bureauNumber): static + public function setStatus(?\SynergiTech\Staffology\Model\BackgroundTaskStatus $status): static { - if (is_null($bureauNumber)) { - array_push($this->openAPINullablesSetToNull, 'bureauNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bureauNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['bureauNumber'] = $bureauNumber; + $this->container['status'] = $status; return $this; } /** - * Gets allowsMultiDate + * Gets statusMessage * - * @return bool|null + * @return string|null */ - public function getAllowsMultiDate(): ?bool + public function getStatusMessage(): ?string { - return $this->container['allowsMultiDate']; + return $this->container['statusMessage']; } /** - * Sets allowsMultiDate + * Sets statusMessage * - * @param bool|null $allowsMultiDate Allows multiple payment dates in the file + * @param string|null $statusMessage [readonly] A message to elaborate on the Status * * @return $this */ - public function setAllowsMultiDate(?bool $allowsMultiDate): static + public function setStatusMessage(?string $statusMessage): static { - if (is_null($allowsMultiDate)) { - throw new InvalidArgumentException('non-nullable allowsMultiDate cannot be null'); + if (is_null($statusMessage)) { + array_push($this->openAPINullablesSetToNull, 'statusMessage'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('statusMessage', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['allowsMultiDate'] = $allowsMultiDate; + $this->container['statusMessage'] = $statusMessage; return $this; } diff --git a/src/Model/BankPaymentInstructionReportResponse.php b/src/Model/BankPaymentInstructionReportResponse.php index e618244..f53ebb8 100644 --- a/src/Model/BankPaymentInstructionReportResponse.php +++ b/src/Model/BankPaymentInstructionReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class BankPaymentInstructionReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\BankPaymentInstruction', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class BankPaymentInstructionReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class BankPaymentInstructionReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/BankPaymentInstructionsCsvFormat.php b/src/Model/BankPaymentInstructionsCsvFormat.php index 4a724bd..1cd628e 100644 --- a/src/Model/BankPaymentInstructionsCsvFormat.php +++ b/src/Model/BankPaymentInstructionsCsvFormat.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -76,6 +76,16 @@ enum BankPaymentInstructionsCsvFormat: string case STANDARD18_BACS_MULTI = 'Standard18BacsMulti'; case BANKLINE_BULK_LIST_DEBIT = 'BanklineBulkListDebit'; + + case VIRGIN_MONEY = 'VirginMoney'; + + case JP_MORGAN_ACH = 'JpMorganAch'; + + case METROBANK_CSV = 'MetrobankCsv'; + + case CITIBANK_UK_ACH = 'CitibankUkAch'; + + case CITIBANK_FASTER_PAYMENTS = 'CitibankFasterPayments'; } diff --git a/src/Model/Benefit.php b/src/Model/Benefit.php index 872466f..aa54415 100644 --- a/src/Model/Benefit.php +++ b/src/Model/Benefit.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,33 +60,33 @@ class Benefit implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'type' => '\SynergiTech\Staffology\Model\BenefitType', - 'declarationType' => '\SynergiTech\Staffology\Model\BenefitDeclarationType', + 'assetType' => '\SynergiTech\Staffology\Model\BenefitDetailsAssetType', 'benefitPayrolled' => '\SynergiTech\Staffology\Model\BenefitPayrolled[]', + 'bikOutstanding' => 'float', + 'car' => '\SynergiTech\Staffology\Model\BenefitDetailsCar', + 'cashEquivalent' => 'float', + 'cashEquivalentFuel' => 'float', + 'class1AType' => '\SynergiTech\Staffology\Model\BenefitDetailsClass1AType', + 'declarationType' => '\SynergiTech\Staffology\Model\BenefitDeclarationType', 'description' => 'string', - 'value' => 'float', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'employeeContribution' => 'float', - 'startDate' => '\DateTime', 'endDate' => '\DateTime', - 'useProRata' => 'bool', - 'cashEquivalent' => 'float', - 'assetType' => '\SynergiTech\Staffology\Model\BenefitDetailsAssetType', - 'useOfAssetType' => '\SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType', - 'class1AType' => '\SynergiTech\Staffology\Model\BenefitDetailsClass1AType', - 'nonClass1AType' => '\SynergiTech\Staffology\Model\BenefitDetailsNonClass1AType', - 'paymentType' => '\SynergiTech\Staffology\Model\BenefitDetailsPaymentType', - 'tradingOrganisation' => 'bool', - 'cashEquivalentFuel' => 'float', + 'id' => 'string', + 'isPeriodValue' => 'bool', 'loan' => '\SynergiTech\Staffology\Model\BenefitDetailsLoan', - 'car' => '\SynergiTech\Staffology\Model\BenefitDetailsCar', + 'nonClass1AType' => '\SynergiTech\Staffology\Model\BenefitDetailsNonClass1AType', 'openingBalance' => 'float', - 'paid' => 'float', - 'bikOutstanding' => 'float', - 'isPeriodValue' => 'bool', 'overrideOpeningBalance' => 'bool', - 'employee' => '\SynergiTech\Staffology\Model\Item', - 'id' => 'string' + 'paid' => 'float', + 'paymentType' => '\SynergiTech\Staffology\Model\BenefitDetailsPaymentType', + 'startDate' => '\DateTime', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'tradingOrganisation' => 'bool', + 'type' => '\SynergiTech\Staffology\Model\BenefitType', + 'useOfAssetType' => '\SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType', + 'useProRata' => 'bool', + 'value' => 'float' ]; /** @@ -95,33 +95,33 @@ class Benefit implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'taxYear' => null, - 'type' => null, - 'declarationType' => null, + 'assetType' => null, 'benefitPayrolled' => null, + 'bikOutstanding' => 'double', + 'car' => null, + 'cashEquivalent' => 'double', + 'cashEquivalentFuel' => 'double', + 'class1AType' => null, + 'declarationType' => null, 'description' => null, - 'value' => 'double', + 'employee' => null, 'employeeContribution' => 'double', - 'startDate' => 'date', 'endDate' => 'date', - 'useProRata' => null, - 'cashEquivalent' => 'double', - 'assetType' => null, - 'useOfAssetType' => null, - 'class1AType' => null, - 'nonClass1AType' => null, - 'paymentType' => null, - 'tradingOrganisation' => null, - 'cashEquivalentFuel' => 'double', + 'id' => 'uuid', + 'isPeriodValue' => null, 'loan' => null, - 'car' => null, + 'nonClass1AType' => null, 'openingBalance' => 'double', - 'paid' => 'double', - 'bikOutstanding' => 'double', - 'isPeriodValue' => null, 'overrideOpeningBalance' => null, - 'employee' => null, - 'id' => 'uuid' + 'paid' => 'double', + 'paymentType' => null, + 'startDate' => 'date', + 'taxYear' => null, + 'tradingOrganisation' => null, + 'type' => null, + 'useOfAssetType' => null, + 'useProRata' => null, + 'value' => 'double' ]; /** @@ -130,33 +130,33 @@ class Benefit implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'taxYear' => false, - 'type' => false, - 'declarationType' => false, + 'assetType' => false, 'benefitPayrolled' => true, + 'bikOutstanding' => false, + 'car' => false, + 'cashEquivalent' => false, + 'cashEquivalentFuel' => false, + 'class1AType' => false, + 'declarationType' => false, 'description' => true, - 'value' => false, + 'employee' => false, 'employeeContribution' => false, - 'startDate' => true, 'endDate' => true, - 'useProRata' => false, - 'cashEquivalent' => false, - 'assetType' => false, - 'useOfAssetType' => false, - 'class1AType' => false, - 'nonClass1AType' => false, - 'paymentType' => false, - 'tradingOrganisation' => false, - 'cashEquivalentFuel' => false, + 'id' => false, + 'isPeriodValue' => false, 'loan' => false, - 'car' => false, + 'nonClass1AType' => false, 'openingBalance' => false, - 'paid' => false, - 'bikOutstanding' => false, - 'isPeriodValue' => false, 'overrideOpeningBalance' => false, - 'employee' => false, - 'id' => false + 'paid' => false, + 'paymentType' => false, + 'startDate' => true, + 'taxYear' => false, + 'tradingOrganisation' => false, + 'type' => false, + 'useOfAssetType' => false, + 'useProRata' => false, + 'value' => false ]; /** @@ -245,33 +245,33 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'taxYear' => 'taxYear', - 'type' => 'type', - 'declarationType' => 'declarationType', + 'assetType' => 'assetType', 'benefitPayrolled' => 'benefitPayrolled', + 'bikOutstanding' => 'bikOutstanding', + 'car' => 'car', + 'cashEquivalent' => 'cashEquivalent', + 'cashEquivalentFuel' => 'cashEquivalentFuel', + 'class1AType' => 'class1AType', + 'declarationType' => 'declarationType', 'description' => 'description', - 'value' => 'value', + 'employee' => 'employee', 'employeeContribution' => 'employeeContribution', - 'startDate' => 'startDate', 'endDate' => 'endDate', - 'useProRata' => 'useProRata', - 'cashEquivalent' => 'cashEquivalent', - 'assetType' => 'assetType', - 'useOfAssetType' => 'useOfAssetType', - 'class1AType' => 'class1AType', - 'nonClass1AType' => 'nonClass1AType', - 'paymentType' => 'paymentType', - 'tradingOrganisation' => 'tradingOrganisation', - 'cashEquivalentFuel' => 'cashEquivalentFuel', + 'id' => 'id', + 'isPeriodValue' => 'isPeriodValue', 'loan' => 'loan', - 'car' => 'car', + 'nonClass1AType' => 'nonClass1AType', 'openingBalance' => 'openingBalance', - 'paid' => 'paid', - 'bikOutstanding' => 'bikOutstanding', - 'isPeriodValue' => 'isPeriodValue', 'overrideOpeningBalance' => 'overrideOpeningBalance', - 'employee' => 'employee', - 'id' => 'id' + 'paid' => 'paid', + 'paymentType' => 'paymentType', + 'startDate' => 'startDate', + 'taxYear' => 'taxYear', + 'tradingOrganisation' => 'tradingOrganisation', + 'type' => 'type', + 'useOfAssetType' => 'useOfAssetType', + 'useProRata' => 'useProRata', + 'value' => 'value' ]; /** @@ -280,33 +280,33 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'taxYear' => 'setTaxYear', - 'type' => 'setType', - 'declarationType' => 'setDeclarationType', + 'assetType' => 'setAssetType', 'benefitPayrolled' => 'setBenefitPayrolled', + 'bikOutstanding' => 'setBikOutstanding', + 'car' => 'setCar', + 'cashEquivalent' => 'setCashEquivalent', + 'cashEquivalentFuel' => 'setCashEquivalentFuel', + 'class1AType' => 'setClass1AType', + 'declarationType' => 'setDeclarationType', 'description' => 'setDescription', - 'value' => 'setValue', + 'employee' => 'setEmployee', 'employeeContribution' => 'setEmployeeContribution', - 'startDate' => 'setStartDate', 'endDate' => 'setEndDate', - 'useProRata' => 'setUseProRata', - 'cashEquivalent' => 'setCashEquivalent', - 'assetType' => 'setAssetType', - 'useOfAssetType' => 'setUseOfAssetType', - 'class1AType' => 'setClass1AType', - 'nonClass1AType' => 'setNonClass1AType', - 'paymentType' => 'setPaymentType', - 'tradingOrganisation' => 'setTradingOrganisation', - 'cashEquivalentFuel' => 'setCashEquivalentFuel', + 'id' => 'setId', + 'isPeriodValue' => 'setIsPeriodValue', 'loan' => 'setLoan', - 'car' => 'setCar', + 'nonClass1AType' => 'setNonClass1AType', 'openingBalance' => 'setOpeningBalance', - 'paid' => 'setPaid', - 'bikOutstanding' => 'setBikOutstanding', - 'isPeriodValue' => 'setIsPeriodValue', 'overrideOpeningBalance' => 'setOverrideOpeningBalance', - 'employee' => 'setEmployee', - 'id' => 'setId' + 'paid' => 'setPaid', + 'paymentType' => 'setPaymentType', + 'startDate' => 'setStartDate', + 'taxYear' => 'setTaxYear', + 'tradingOrganisation' => 'setTradingOrganisation', + 'type' => 'setType', + 'useOfAssetType' => 'setUseOfAssetType', + 'useProRata' => 'setUseProRata', + 'value' => 'setValue' ]; /** @@ -315,33 +315,33 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'taxYear' => 'getTaxYear', - 'type' => 'getType', - 'declarationType' => 'getDeclarationType', + 'assetType' => 'getAssetType', 'benefitPayrolled' => 'getBenefitPayrolled', + 'bikOutstanding' => 'getBikOutstanding', + 'car' => 'getCar', + 'cashEquivalent' => 'getCashEquivalent', + 'cashEquivalentFuel' => 'getCashEquivalentFuel', + 'class1AType' => 'getClass1AType', + 'declarationType' => 'getDeclarationType', 'description' => 'getDescription', - 'value' => 'getValue', + 'employee' => 'getEmployee', 'employeeContribution' => 'getEmployeeContribution', - 'startDate' => 'getStartDate', 'endDate' => 'getEndDate', - 'useProRata' => 'getUseProRata', - 'cashEquivalent' => 'getCashEquivalent', - 'assetType' => 'getAssetType', - 'useOfAssetType' => 'getUseOfAssetType', - 'class1AType' => 'getClass1AType', - 'nonClass1AType' => 'getNonClass1AType', - 'paymentType' => 'getPaymentType', - 'tradingOrganisation' => 'getTradingOrganisation', - 'cashEquivalentFuel' => 'getCashEquivalentFuel', + 'id' => 'getId', + 'isPeriodValue' => 'getIsPeriodValue', 'loan' => 'getLoan', - 'car' => 'getCar', + 'nonClass1AType' => 'getNonClass1AType', 'openingBalance' => 'getOpeningBalance', - 'paid' => 'getPaid', - 'bikOutstanding' => 'getBikOutstanding', - 'isPeriodValue' => 'getIsPeriodValue', 'overrideOpeningBalance' => 'getOverrideOpeningBalance', - 'employee' => 'getEmployee', - 'id' => 'getId' + 'paid' => 'getPaid', + 'paymentType' => 'getPaymentType', + 'startDate' => 'getStartDate', + 'taxYear' => 'getTaxYear', + 'tradingOrganisation' => 'getTradingOrganisation', + 'type' => 'getType', + 'useOfAssetType' => 'getUseOfAssetType', + 'useProRata' => 'getUseProRata', + 'value' => 'getValue' ]; /** @@ -400,33 +400,33 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('declarationType', $data ?? [], null); + $this->setIfExists('assetType', $data ?? [], null); $this->setIfExists('benefitPayrolled', $data ?? [], null); + $this->setIfExists('bikOutstanding', $data ?? [], null); + $this->setIfExists('car', $data ?? [], null); + $this->setIfExists('cashEquivalent', $data ?? [], null); + $this->setIfExists('cashEquivalentFuel', $data ?? [], null); + $this->setIfExists('class1AType', $data ?? [], null); + $this->setIfExists('declarationType', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('employeeContribution', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); $this->setIfExists('endDate', $data ?? [], null); - $this->setIfExists('useProRata', $data ?? [], null); - $this->setIfExists('cashEquivalent', $data ?? [], null); - $this->setIfExists('assetType', $data ?? [], null); - $this->setIfExists('useOfAssetType', $data ?? [], null); - $this->setIfExists('class1AType', $data ?? [], null); - $this->setIfExists('nonClass1AType', $data ?? [], null); - $this->setIfExists('paymentType', $data ?? [], null); - $this->setIfExists('tradingOrganisation', $data ?? [], null); - $this->setIfExists('cashEquivalentFuel', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isPeriodValue', $data ?? [], null); $this->setIfExists('loan', $data ?? [], null); - $this->setIfExists('car', $data ?? [], null); + $this->setIfExists('nonClass1AType', $data ?? [], null); $this->setIfExists('openingBalance', $data ?? [], null); - $this->setIfExists('paid', $data ?? [], null); - $this->setIfExists('bikOutstanding', $data ?? [], null); - $this->setIfExists('isPeriodValue', $data ?? [], null); $this->setIfExists('overrideOpeningBalance', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('paid', $data ?? [], null); + $this->setIfExists('paymentType', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('tradingOrganisation', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('useOfAssetType', $data ?? [], null); + $this->setIfExists('useProRata', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -476,411 +476,431 @@ public function valid(): bool /** - * Gets taxYear + * Gets assetType * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return \SynergiTech\Staffology\Model\BenefitDetailsAssetType|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getAssetType(): ?\SynergiTech\Staffology\Model\BenefitDetailsAssetType { - return $this->container['taxYear']; + return $this->container['assetType']; } /** - * Sets taxYear + * Sets assetType * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param \SynergiTech\Staffology\Model\BenefitDetailsAssetType|null $assetType assetType * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setAssetType(?\SynergiTech\Staffology\Model\BenefitDetailsAssetType $assetType): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($assetType)) { + throw new InvalidArgumentException('non-nullable assetType cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['assetType'] = $assetType; return $this; } /** - * Gets type + * Gets benefitPayrolled * - * @return \SynergiTech\Staffology\Model\BenefitType|null + * @return \SynergiTech\Staffology\Model\BenefitPayrolled[]|null */ - public function getType(): ?\SynergiTech\Staffology\Model\BenefitType + public function getBenefitPayrolled(): ?array { - return $this->container['type']; + return $this->container['benefitPayrolled']; } /** - * Sets type + * Sets benefitPayrolled * - * @param \SynergiTech\Staffology\Model\BenefitType|null $type type + * @param \SynergiTech\Staffology\Model\BenefitPayrolled[]|null $benefitPayrolled benefitPayrolled * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\BenefitType $type): static + public function setBenefitPayrolled(?array $benefitPayrolled): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($benefitPayrolled)) { + array_push($this->openAPINullablesSetToNull, 'benefitPayrolled'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('benefitPayrolled', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['type'] = $type; + $this->container['benefitPayrolled'] = $benefitPayrolled; return $this; } /** - * Gets declarationType + * Gets bikOutstanding * - * @return \SynergiTech\Staffology\Model\BenefitDeclarationType|null + * @return float|null */ - public function getDeclarationType(): ?\SynergiTech\Staffology\Model\BenefitDeclarationType + public function getBikOutstanding(): ?float { - return $this->container['declarationType']; + return $this->container['bikOutstanding']; } /** - * Sets declarationType + * Sets bikOutstanding * - * @param \SynergiTech\Staffology\Model\BenefitDeclarationType|null $declarationType declarationType + * @param float|null $bikOutstanding [readonly] * * @return $this */ - public function setDeclarationType(?\SynergiTech\Staffology\Model\BenefitDeclarationType $declarationType): static + public function setBikOutstanding(?float $bikOutstanding): static { - if (is_null($declarationType)) { - throw new InvalidArgumentException('non-nullable declarationType cannot be null'); + if (is_null($bikOutstanding)) { + throw new InvalidArgumentException('non-nullable bikOutstanding cannot be null'); } - $this->container['declarationType'] = $declarationType; + $this->container['bikOutstanding'] = $bikOutstanding; return $this; } /** - * Gets benefitPayrolled + * Gets car * - * @return \SynergiTech\Staffology\Model\BenefitPayrolled[]|null + * @return \SynergiTech\Staffology\Model\BenefitDetailsCar|null */ - public function getBenefitPayrolled(): ?array + public function getCar(): ?\SynergiTech\Staffology\Model\BenefitDetailsCar { - return $this->container['benefitPayrolled']; + return $this->container['car']; } /** - * Sets benefitPayrolled + * Sets car * - * @param \SynergiTech\Staffology\Model\BenefitPayrolled[]|null $benefitPayrolled benefitPayrolled + * @param \SynergiTech\Staffology\Model\BenefitDetailsCar|null $car car * * @return $this */ - public function setBenefitPayrolled(?array $benefitPayrolled): static + public function setCar(?\SynergiTech\Staffology\Model\BenefitDetailsCar $car): static { - if (is_null($benefitPayrolled)) { - array_push($this->openAPINullablesSetToNull, 'benefitPayrolled'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('benefitPayrolled', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($car)) { + throw new InvalidArgumentException('non-nullable car cannot be null'); } - $this->container['benefitPayrolled'] = $benefitPayrolled; + $this->container['car'] = $car; return $this; } /** - * Gets description + * Gets cashEquivalent * - * @return string|null + * @return float|null */ - public function getDescription(): ?string + public function getCashEquivalent(): ?float { - return $this->container['description']; + return $this->container['cashEquivalent']; } /** - * Sets description + * Sets cashEquivalent * - * @param string|null $description A description of this benefit + * @param float|null $cashEquivalent [readonly] * * @return $this */ - public function setDescription(?string $description): static + public function setCashEquivalent(?float $cashEquivalent): static { - if (is_null($description)) { - array_push($this->openAPINullablesSetToNull, 'description'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('description', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($description) && (mb_strlen($description) > 120)) { - throw new InvalidArgumentException('invalid length for $description when calling Benefit., must be smaller than or equal to 120.'); + if (is_null($cashEquivalent)) { + throw new InvalidArgumentException('non-nullable cashEquivalent cannot be null'); } - - $this->container['description'] = $description; + $this->container['cashEquivalent'] = $cashEquivalent; return $this; } /** - * Gets value + * Gets cashEquivalentFuel * * @return float|null */ - public function getValue(): ?float + public function getCashEquivalentFuel(): ?float { - return $this->container['value']; + return $this->container['cashEquivalentFuel']; } /** - * Sets value + * Sets cashEquivalentFuel * - * @param float|null $value value + * @param float|null $cashEquivalentFuel Only relevant to Benefits with Type Vans * * @return $this */ - public function setValue(?float $value): static + public function setCashEquivalentFuel(?float $cashEquivalentFuel): static { - if (is_null($value)) { - throw new InvalidArgumentException('non-nullable value cannot be null'); + if (is_null($cashEquivalentFuel)) { + throw new InvalidArgumentException('non-nullable cashEquivalentFuel cannot be null'); } - $this->container['value'] = $value; + $this->container['cashEquivalentFuel'] = $cashEquivalentFuel; return $this; } /** - * Gets employeeContribution + * Gets class1AType * - * @return float|null + * @return \SynergiTech\Staffology\Model\BenefitDetailsClass1AType|null */ - public function getEmployeeContribution(): ?float + public function getClass1AType(): ?\SynergiTech\Staffology\Model\BenefitDetailsClass1AType { - return $this->container['employeeContribution']; + return $this->container['class1AType']; } /** - * Sets employeeContribution + * Sets class1AType * - * @param float|null $employeeContribution employeeContribution + * @param \SynergiTech\Staffology\Model\BenefitDetailsClass1AType|null $class1AType class1AType * * @return $this */ - public function setEmployeeContribution(?float $employeeContribution): static + public function setClass1AType(?\SynergiTech\Staffology\Model\BenefitDetailsClass1AType $class1AType): static { - if (is_null($employeeContribution)) { - throw new InvalidArgumentException('non-nullable employeeContribution cannot be null'); + if (is_null($class1AType)) { + throw new InvalidArgumentException('non-nullable class1AType cannot be null'); } - $this->container['employeeContribution'] = $employeeContribution; + $this->container['class1AType'] = $class1AType; return $this; } /** - * Gets startDate + * Gets declarationType * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\BenefitDeclarationType|null */ - public function getStartDate(): ?\DateTime + public function getDeclarationType(): ?\SynergiTech\Staffology\Model\BenefitDeclarationType { - return $this->container['startDate']; + return $this->container['declarationType']; } /** - * Sets startDate + * Sets declarationType * - * @param \DateTime|null $startDate The date the benefits starts if different to the start date of the TaxYear + * @param \SynergiTech\Staffology\Model\BenefitDeclarationType|null $declarationType declarationType * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setDeclarationType(?\SynergiTech\Staffology\Model\BenefitDeclarationType $declarationType): static { - if (is_null($startDate)) { - array_push($this->openAPINullablesSetToNull, 'startDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($declarationType)) { + throw new InvalidArgumentException('non-nullable declarationType cannot be null'); } - $this->container['startDate'] = $startDate; + $this->container['declarationType'] = $declarationType; return $this; } /** - * Gets endDate + * Gets description * - * @return \DateTime|null + * @return string|null */ - public function getEndDate(): ?\DateTime + public function getDescription(): ?string { - return $this->container['endDate']; + return $this->container['description']; } /** - * Sets endDate + * Sets description * - * @param \DateTime|null $endDate The date the benefits ends if different to the end date of the TaxYear + * @param string|null $description A description of this benefit * * @return $this */ - public function setEndDate(?\DateTime $endDate): static + public function setDescription(?string $description): static { - if (is_null($endDate)) { - array_push($this->openAPINullablesSetToNull, 'endDate'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endDate', $nullablesSetToNull); + $index = array_search('description', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['endDate'] = $endDate; + if (!is_null($description) && (mb_strlen($description) > 120)) { + throw new InvalidArgumentException('invalid length for $description when calling Benefit., must be smaller than or equal to 120.'); + } + + $this->container['description'] = $description; return $this; } /** - * Gets useProRata + * Gets employee * - * @return bool|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getUseProRata(): ?bool + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['useProRata']; + return $this->container['employee']; } /** - * Sets useProRata + * Sets employee * - * @param bool|null $useProRata Benefit calculation should be done on pro rata rules + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setUseProRata(?bool $useProRata): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($useProRata)) { - throw new InvalidArgumentException('non-nullable useProRata cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['useProRata'] = $useProRata; + $this->container['employee'] = $employee; return $this; } /** - * Gets cashEquivalent + * Gets employeeContribution * * @return float|null */ - public function getCashEquivalent(): ?float + public function getEmployeeContribution(): ?float { - return $this->container['cashEquivalent']; + return $this->container['employeeContribution']; } /** - * Sets cashEquivalent + * Sets employeeContribution * - * @param float|null $cashEquivalent [readonly] + * @param float|null $employeeContribution employeeContribution * * @return $this */ - public function setCashEquivalent(?float $cashEquivalent): static + public function setEmployeeContribution(?float $employeeContribution): static { - if (is_null($cashEquivalent)) { - throw new InvalidArgumentException('non-nullable cashEquivalent cannot be null'); + if (is_null($employeeContribution)) { + throw new InvalidArgumentException('non-nullable employeeContribution cannot be null'); } - $this->container['cashEquivalent'] = $cashEquivalent; + $this->container['employeeContribution'] = $employeeContribution; return $this; } /** - * Gets assetType + * Gets endDate * - * @return \SynergiTech\Staffology\Model\BenefitDetailsAssetType|null + * @return \DateTime|null */ - public function getAssetType(): ?\SynergiTech\Staffology\Model\BenefitDetailsAssetType + public function getEndDate(): ?\DateTime { - return $this->container['assetType']; + return $this->container['endDate']; } /** - * Sets assetType + * Sets endDate * - * @param \SynergiTech\Staffology\Model\BenefitDetailsAssetType|null $assetType assetType + * @param \DateTime|null $endDate The date the benefits ends if different to the end date of the TaxYear * * @return $this */ - public function setAssetType(?\SynergiTech\Staffology\Model\BenefitDetailsAssetType $assetType): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($assetType)) { - throw new InvalidArgumentException('non-nullable assetType cannot be null'); + if (is_null($endDate)) { + array_push($this->openAPINullablesSetToNull, 'endDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['assetType'] = $assetType; + $this->container['endDate'] = $endDate; return $this; } /** - * Gets useOfAssetType + * Gets id * - * @return \SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType|null + * @return string|null */ - public function getUseOfAssetType(): ?\SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType + public function getId(): ?string { - return $this->container['useOfAssetType']; + return $this->container['id']; } /** - * Sets useOfAssetType + * Sets id * - * @param \SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType|null $useOfAssetType useOfAssetType + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setUseOfAssetType(?\SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType $useOfAssetType): static + public function setId(?string $id): static { - if (is_null($useOfAssetType)) { - throw new InvalidArgumentException('non-nullable useOfAssetType cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['useOfAssetType'] = $useOfAssetType; + $this->container['id'] = $id; return $this; } /** - * Gets class1AType + * Gets isPeriodValue * - * @return \SynergiTech\Staffology\Model\BenefitDetailsClass1AType|null + * @return bool|null */ - public function getClass1AType(): ?\SynergiTech\Staffology\Model\BenefitDetailsClass1AType + public function getIsPeriodValue(): ?bool { - return $this->container['class1AType']; + return $this->container['isPeriodValue']; } /** - * Sets class1AType + * Sets isPeriodValue * - * @param \SynergiTech\Staffology\Model\BenefitDetailsClass1AType|null $class1AType class1AType + * @param bool|null $isPeriodValue To be used for the benefit period + * + * @return $this + */ + public function setIsPeriodValue(?bool $isPeriodValue): static + { + if (is_null($isPeriodValue)) { + throw new InvalidArgumentException('non-nullable isPeriodValue cannot be null'); + } + $this->container['isPeriodValue'] = $isPeriodValue; + + return $this; + } + + /** + * Gets loan + * + * @return \SynergiTech\Staffology\Model\BenefitDetailsLoan|null + */ + public function getLoan(): ?\SynergiTech\Staffology\Model\BenefitDetailsLoan + { + return $this->container['loan']; + } + + /** + * Sets loan + * + * @param \SynergiTech\Staffology\Model\BenefitDetailsLoan|null $loan loan * * @return $this */ - public function setClass1AType(?\SynergiTech\Staffology\Model\BenefitDetailsClass1AType $class1AType): static + public function setLoan(?\SynergiTech\Staffology\Model\BenefitDetailsLoan $loan): static { - if (is_null($class1AType)) { - throw new InvalidArgumentException('non-nullable class1AType cannot be null'); + if (is_null($loan)) { + throw new InvalidArgumentException('non-nullable loan cannot be null'); } - $this->container['class1AType'] = $class1AType; + $this->container['loan'] = $loan; return $this; } @@ -913,325 +933,305 @@ public function setNonClass1AType(?\SynergiTech\Staffology\Model\BenefitDetailsN } /** - * Gets paymentType + * Gets openingBalance * - * @return \SynergiTech\Staffology\Model\BenefitDetailsPaymentType|null + * @return float|null */ - public function getPaymentType(): ?\SynergiTech\Staffology\Model\BenefitDetailsPaymentType + public function getOpeningBalance(): ?float { - return $this->container['paymentType']; + return $this->container['openingBalance']; } /** - * Sets paymentType + * Sets openingBalance * - * @param \SynergiTech\Staffology\Model\BenefitDetailsPaymentType|null $paymentType paymentType + * @param float|null $openingBalance The amount of benefit paid YTD when setting up a benefit * * @return $this */ - public function setPaymentType(?\SynergiTech\Staffology\Model\BenefitDetailsPaymentType $paymentType): static + public function setOpeningBalance(?float $openingBalance): static { - if (is_null($paymentType)) { - throw new InvalidArgumentException('non-nullable paymentType cannot be null'); + if (is_null($openingBalance)) { + throw new InvalidArgumentException('non-nullable openingBalance cannot be null'); } - $this->container['paymentType'] = $paymentType; + $this->container['openingBalance'] = $openingBalance; return $this; } /** - * Gets tradingOrganisation + * Gets overrideOpeningBalance * * @return bool|null */ - public function getTradingOrganisation(): ?bool + public function getOverrideOpeningBalance(): ?bool { - return $this->container['tradingOrganisation']; + return $this->container['overrideOpeningBalance']; } /** - * Sets tradingOrganisation + * Sets overrideOpeningBalance * - * @param bool|null $tradingOrganisation Only relevant to Benefits with Type Entertainment + * @param bool|null $overrideOpeningBalance To be used to change the opening balance if the benefit has been payrolled * * @return $this */ - public function setTradingOrganisation(?bool $tradingOrganisation): static + public function setOverrideOpeningBalance(?bool $overrideOpeningBalance): static { - if (is_null($tradingOrganisation)) { - throw new InvalidArgumentException('non-nullable tradingOrganisation cannot be null'); + if (is_null($overrideOpeningBalance)) { + throw new InvalidArgumentException('non-nullable overrideOpeningBalance cannot be null'); } - $this->container['tradingOrganisation'] = $tradingOrganisation; + $this->container['overrideOpeningBalance'] = $overrideOpeningBalance; return $this; } /** - * Gets cashEquivalentFuel + * Gets paid * * @return float|null */ - public function getCashEquivalentFuel(): ?float + public function getPaid(): ?float { - return $this->container['cashEquivalentFuel']; + return $this->container['paid']; } /** - * Sets cashEquivalentFuel + * Sets paid * - * @param float|null $cashEquivalentFuel Only relevant to Benefits with Type Vans + * @param float|null $paid [readonly] * * @return $this */ - public function setCashEquivalentFuel(?float $cashEquivalentFuel): static + public function setPaid(?float $paid): static { - if (is_null($cashEquivalentFuel)) { - throw new InvalidArgumentException('non-nullable cashEquivalentFuel cannot be null'); + if (is_null($paid)) { + throw new InvalidArgumentException('non-nullable paid cannot be null'); } - $this->container['cashEquivalentFuel'] = $cashEquivalentFuel; + $this->container['paid'] = $paid; return $this; } /** - * Gets loan + * Gets paymentType * - * @return \SynergiTech\Staffology\Model\BenefitDetailsLoan|null + * @return \SynergiTech\Staffology\Model\BenefitDetailsPaymentType|null */ - public function getLoan(): ?\SynergiTech\Staffology\Model\BenefitDetailsLoan + public function getPaymentType(): ?\SynergiTech\Staffology\Model\BenefitDetailsPaymentType { - return $this->container['loan']; + return $this->container['paymentType']; } /** - * Sets loan + * Sets paymentType * - * @param \SynergiTech\Staffology\Model\BenefitDetailsLoan|null $loan loan + * @param \SynergiTech\Staffology\Model\BenefitDetailsPaymentType|null $paymentType paymentType * * @return $this */ - public function setLoan(?\SynergiTech\Staffology\Model\BenefitDetailsLoan $loan): static + public function setPaymentType(?\SynergiTech\Staffology\Model\BenefitDetailsPaymentType $paymentType): static { - if (is_null($loan)) { - throw new InvalidArgumentException('non-nullable loan cannot be null'); + if (is_null($paymentType)) { + throw new InvalidArgumentException('non-nullable paymentType cannot be null'); } - $this->container['loan'] = $loan; + $this->container['paymentType'] = $paymentType; return $this; } /** - * Gets car + * Gets startDate * - * @return \SynergiTech\Staffology\Model\BenefitDetailsCar|null + * @return \DateTime|null */ - public function getCar(): ?\SynergiTech\Staffology\Model\BenefitDetailsCar + public function getStartDate(): ?\DateTime { - return $this->container['car']; + return $this->container['startDate']; } /** - * Sets car + * Sets startDate * - * @param \SynergiTech\Staffology\Model\BenefitDetailsCar|null $car car + * @param \DateTime|null $startDate The date the benefits starts if different to the start date of the TaxYear * * @return $this */ - public function setCar(?\SynergiTech\Staffology\Model\BenefitDetailsCar $car): static + public function setStartDate(?\DateTime $startDate): static { - if (is_null($car)) { - throw new InvalidArgumentException('non-nullable car cannot be null'); + if (is_null($startDate)) { + array_push($this->openAPINullablesSetToNull, 'startDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['car'] = $car; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets openingBalance + * Gets taxYear * - * @return float|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getOpeningBalance(): ?float + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['openingBalance']; + return $this->container['taxYear']; } /** - * Sets openingBalance + * Sets taxYear * - * @param float|null $openingBalance The amount of benefit paid YTD when setting up a benefit + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setOpeningBalance(?float $openingBalance): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($openingBalance)) { - throw new InvalidArgumentException('non-nullable openingBalance cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['openingBalance'] = $openingBalance; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets paid + * Gets tradingOrganisation * - * @return float|null + * @return bool|null */ - public function getPaid(): ?float + public function getTradingOrganisation(): ?bool { - return $this->container['paid']; + return $this->container['tradingOrganisation']; } /** - * Sets paid + * Sets tradingOrganisation * - * @param float|null $paid [readonly] + * @param bool|null $tradingOrganisation Only relevant to Benefits with Type Entertainment * * @return $this */ - public function setPaid(?float $paid): static + public function setTradingOrganisation(?bool $tradingOrganisation): static { - if (is_null($paid)) { - throw new InvalidArgumentException('non-nullable paid cannot be null'); + if (is_null($tradingOrganisation)) { + throw new InvalidArgumentException('non-nullable tradingOrganisation cannot be null'); } - $this->container['paid'] = $paid; + $this->container['tradingOrganisation'] = $tradingOrganisation; return $this; } /** - * Gets bikOutstanding + * Gets type * - * @return float|null + * @return \SynergiTech\Staffology\Model\BenefitType|null */ - public function getBikOutstanding(): ?float + public function getType(): ?\SynergiTech\Staffology\Model\BenefitType { - return $this->container['bikOutstanding']; + return $this->container['type']; } /** - * Sets bikOutstanding + * Sets type * - * @param float|null $bikOutstanding [readonly] + * @param \SynergiTech\Staffology\Model\BenefitType|null $type type * * @return $this */ - public function setBikOutstanding(?float $bikOutstanding): static + public function setType(?\SynergiTech\Staffology\Model\BenefitType $type): static { - if (is_null($bikOutstanding)) { - throw new InvalidArgumentException('non-nullable bikOutstanding cannot be null'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['bikOutstanding'] = $bikOutstanding; + $this->container['type'] = $type; return $this; } /** - * Gets isPeriodValue + * Gets useOfAssetType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType|null */ - public function getIsPeriodValue(): ?bool + public function getUseOfAssetType(): ?\SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType { - return $this->container['isPeriodValue']; + return $this->container['useOfAssetType']; } /** - * Sets isPeriodValue + * Sets useOfAssetType * - * @param bool|null $isPeriodValue To be used for the benefit period + * @param \SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType|null $useOfAssetType useOfAssetType * * @return $this */ - public function setIsPeriodValue(?bool $isPeriodValue): static + public function setUseOfAssetType(?\SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType $useOfAssetType): static { - if (is_null($isPeriodValue)) { - throw new InvalidArgumentException('non-nullable isPeriodValue cannot be null'); + if (is_null($useOfAssetType)) { + throw new InvalidArgumentException('non-nullable useOfAssetType cannot be null'); } - $this->container['isPeriodValue'] = $isPeriodValue; + $this->container['useOfAssetType'] = $useOfAssetType; return $this; } /** - * Gets overrideOpeningBalance + * Gets useProRata * * @return bool|null */ - public function getOverrideOpeningBalance(): ?bool - { - return $this->container['overrideOpeningBalance']; - } - - /** - * Sets overrideOpeningBalance - * - * @param bool|null $overrideOpeningBalance To be used to change the opening balance if the benefit has been payrolled - * - * @return $this - */ - public function setOverrideOpeningBalance(?bool $overrideOpeningBalance): static - { - if (is_null($overrideOpeningBalance)) { - throw new InvalidArgumentException('non-nullable overrideOpeningBalance cannot be null'); - } - $this->container['overrideOpeningBalance'] = $overrideOpeningBalance; - - return $this; - } - - /** - * Gets employee - * - * @return \SynergiTech\Staffology\Model\Item|null - */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getUseProRata(): ?bool { - return $this->container['employee']; + return $this->container['useProRata']; } /** - * Sets employee + * Sets useProRata * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param bool|null $useProRata Benefit calculation should be done on pro rata rules * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setUseProRata(?bool $useProRata): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($useProRata)) { + throw new InvalidArgumentException('non-nullable useProRata cannot be null'); } - $this->container['employee'] = $employee; + $this->container['useProRata'] = $useProRata; return $this; } /** - * Gets id + * Gets value * - * @return string|null + * @return float|null */ - public function getId(): ?string + public function getValue(): ?float { - return $this->container['id']; + return $this->container['value']; } /** - * Sets id + * Sets value * - * @param string|null $id [readonly] The unique id of the object + * @param float|null $value value * * @return $this */ - public function setId(?string $id): static + public function setValue(?float $value): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); } - $this->container['id'] = $id; + $this->container['value'] = $value; return $this; } diff --git a/src/Model/BenefitDeclarationType.php b/src/Model/BenefitDeclarationType.php index 5748153..bef016c 100644 --- a/src/Model/BenefitDeclarationType.php +++ b/src/Model/BenefitDeclarationType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/BenefitDetailsAssetType.php b/src/Model/BenefitDetailsAssetType.php index 3ad575f..d68f8b0 100644 --- a/src/Model/BenefitDetailsAssetType.php +++ b/src/Model/BenefitDetailsAssetType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/BenefitDetailsCar.php b/src/Model/BenefitDetailsCar.php index 5bf1729..c147f1a 100644 --- a/src/Model/BenefitDetailsCar.php +++ b/src/Model/BenefitDetailsCar.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,31 +59,31 @@ class BenefitDetailsCar implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'makeAndModel' => 'string', - 'registration' => 'string', - 'firstRegistered' => '\DateTime', - 'hasApprovedEmissionsValue' => 'bool', - 'co2Emissions' => 'int', - 'engineSize' => 'int', - 'zeroEmissionsMileage' => 'int', - 'fuelType' => '\SynergiTech\Staffology\Model\BenefitDetailsCarPowerType', 'availableFrom' => '\DateTime', 'availableTo' => '\DateTime', + 'cashEquivalent' => 'float', + 'cashEquivalentFuel' => 'float', + 'chargeableValue' => 'float', + 'co2Emissions' => 'int', 'daysUnavailable' => 'int', - 'listPrice' => 'float', - 'nonStandardAccessories' => 'float', 'employeeCapitalContributions' => 'float', 'employeePrivateContributions' => 'float', + 'engineSize' => 'int', + 'firstRegistered' => '\DateTime', 'freeFuel' => 'bool', + 'freeFuelReinstated' => 'bool', 'fuelAvailableFrom' => '\DateTime', 'fuelAvailableTo' => '\DateTime', - 'freeFuelReinstated' => 'bool', - 'registeredPriorTo1998' => 'bool', - 'rate' => 'float', - 'chargeableValue' => 'float', + 'fuelType' => '\SynergiTech\Staffology\Model\BenefitDetailsCarPowerType', 'fullYearCharge' => 'float', - 'cashEquivalent' => 'float', - 'cashEquivalentFuel' => 'float' + 'hasApprovedEmissionsValue' => 'bool', + 'listPrice' => 'float', + 'makeAndModel' => 'string', + 'nonStandardAccessories' => 'float', + 'rate' => 'float', + 'registeredPriorTo1998' => 'bool', + 'registration' => 'string', + 'zeroEmissionsMileage' => 'int' ]; /** @@ -92,31 +92,31 @@ class BenefitDetailsCar implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'makeAndModel' => null, - 'registration' => null, - 'firstRegistered' => 'date', - 'hasApprovedEmissionsValue' => null, - 'co2Emissions' => 'int32', - 'engineSize' => 'int32', - 'zeroEmissionsMileage' => 'int32', - 'fuelType' => null, 'availableFrom' => 'date', 'availableTo' => 'date', + 'cashEquivalent' => 'double', + 'cashEquivalentFuel' => 'double', + 'chargeableValue' => 'double', + 'co2Emissions' => 'int32', 'daysUnavailable' => 'int32', - 'listPrice' => 'double', - 'nonStandardAccessories' => 'double', 'employeeCapitalContributions' => 'double', 'employeePrivateContributions' => 'double', + 'engineSize' => 'int32', + 'firstRegistered' => 'date', 'freeFuel' => null, + 'freeFuelReinstated' => null, 'fuelAvailableFrom' => 'date', 'fuelAvailableTo' => 'date', - 'freeFuelReinstated' => null, - 'registeredPriorTo1998' => null, - 'rate' => 'double', - 'chargeableValue' => 'double', + 'fuelType' => null, 'fullYearCharge' => 'double', - 'cashEquivalent' => 'double', - 'cashEquivalentFuel' => 'double' + 'hasApprovedEmissionsValue' => null, + 'listPrice' => 'double', + 'makeAndModel' => null, + 'nonStandardAccessories' => 'double', + 'rate' => 'double', + 'registeredPriorTo1998' => null, + 'registration' => null, + 'zeroEmissionsMileage' => 'int32' ]; /** @@ -125,31 +125,31 @@ class BenefitDetailsCar implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'makeAndModel' => true, - 'registration' => true, - 'firstRegistered' => true, - 'hasApprovedEmissionsValue' => false, - 'co2Emissions' => false, - 'engineSize' => false, - 'zeroEmissionsMileage' => false, - 'fuelType' => false, 'availableFrom' => true, 'availableTo' => true, + 'cashEquivalent' => false, + 'cashEquivalentFuel' => false, + 'chargeableValue' => false, + 'co2Emissions' => false, 'daysUnavailable' => false, - 'listPrice' => false, - 'nonStandardAccessories' => false, 'employeeCapitalContributions' => false, 'employeePrivateContributions' => false, + 'engineSize' => false, + 'firstRegistered' => true, 'freeFuel' => false, + 'freeFuelReinstated' => false, 'fuelAvailableFrom' => true, 'fuelAvailableTo' => true, - 'freeFuelReinstated' => false, - 'registeredPriorTo1998' => false, - 'rate' => false, - 'chargeableValue' => false, + 'fuelType' => false, 'fullYearCharge' => false, - 'cashEquivalent' => false, - 'cashEquivalentFuel' => false + 'hasApprovedEmissionsValue' => false, + 'listPrice' => false, + 'makeAndModel' => true, + 'nonStandardAccessories' => false, + 'rate' => false, + 'registeredPriorTo1998' => false, + 'registration' => true, + 'zeroEmissionsMileage' => false ]; /** @@ -238,31 +238,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'makeAndModel' => 'makeAndModel', - 'registration' => 'registration', - 'firstRegistered' => 'firstRegistered', - 'hasApprovedEmissionsValue' => 'hasApprovedEmissionsValue', - 'co2Emissions' => 'co2Emissions', - 'engineSize' => 'engineSize', - 'zeroEmissionsMileage' => 'zeroEmissionsMileage', - 'fuelType' => 'fuelType', 'availableFrom' => 'availableFrom', 'availableTo' => 'availableTo', + 'cashEquivalent' => 'cashEquivalent', + 'cashEquivalentFuel' => 'cashEquivalentFuel', + 'chargeableValue' => 'chargeableValue', + 'co2Emissions' => 'co2Emissions', 'daysUnavailable' => 'daysUnavailable', - 'listPrice' => 'listPrice', - 'nonStandardAccessories' => 'nonStandardAccessories', 'employeeCapitalContributions' => 'employeeCapitalContributions', 'employeePrivateContributions' => 'employeePrivateContributions', + 'engineSize' => 'engineSize', + 'firstRegistered' => 'firstRegistered', 'freeFuel' => 'freeFuel', + 'freeFuelReinstated' => 'freeFuelReinstated', 'fuelAvailableFrom' => 'fuelAvailableFrom', 'fuelAvailableTo' => 'fuelAvailableTo', - 'freeFuelReinstated' => 'freeFuelReinstated', - 'registeredPriorTo1998' => 'registeredPriorTo1998', - 'rate' => 'rate', - 'chargeableValue' => 'chargeableValue', + 'fuelType' => 'fuelType', 'fullYearCharge' => 'fullYearCharge', - 'cashEquivalent' => 'cashEquivalent', - 'cashEquivalentFuel' => 'cashEquivalentFuel' + 'hasApprovedEmissionsValue' => 'hasApprovedEmissionsValue', + 'listPrice' => 'listPrice', + 'makeAndModel' => 'makeAndModel', + 'nonStandardAccessories' => 'nonStandardAccessories', + 'rate' => 'rate', + 'registeredPriorTo1998' => 'registeredPriorTo1998', + 'registration' => 'registration', + 'zeroEmissionsMileage' => 'zeroEmissionsMileage' ]; /** @@ -271,31 +271,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'makeAndModel' => 'setMakeAndModel', - 'registration' => 'setRegistration', - 'firstRegistered' => 'setFirstRegistered', - 'hasApprovedEmissionsValue' => 'setHasApprovedEmissionsValue', - 'co2Emissions' => 'setCo2Emissions', - 'engineSize' => 'setEngineSize', - 'zeroEmissionsMileage' => 'setZeroEmissionsMileage', - 'fuelType' => 'setFuelType', 'availableFrom' => 'setAvailableFrom', 'availableTo' => 'setAvailableTo', + 'cashEquivalent' => 'setCashEquivalent', + 'cashEquivalentFuel' => 'setCashEquivalentFuel', + 'chargeableValue' => 'setChargeableValue', + 'co2Emissions' => 'setCo2Emissions', 'daysUnavailable' => 'setDaysUnavailable', - 'listPrice' => 'setListPrice', - 'nonStandardAccessories' => 'setNonStandardAccessories', 'employeeCapitalContributions' => 'setEmployeeCapitalContributions', 'employeePrivateContributions' => 'setEmployeePrivateContributions', + 'engineSize' => 'setEngineSize', + 'firstRegistered' => 'setFirstRegistered', 'freeFuel' => 'setFreeFuel', + 'freeFuelReinstated' => 'setFreeFuelReinstated', 'fuelAvailableFrom' => 'setFuelAvailableFrom', 'fuelAvailableTo' => 'setFuelAvailableTo', - 'freeFuelReinstated' => 'setFreeFuelReinstated', - 'registeredPriorTo1998' => 'setRegisteredPriorTo1998', - 'rate' => 'setRate', - 'chargeableValue' => 'setChargeableValue', + 'fuelType' => 'setFuelType', 'fullYearCharge' => 'setFullYearCharge', - 'cashEquivalent' => 'setCashEquivalent', - 'cashEquivalentFuel' => 'setCashEquivalentFuel' + 'hasApprovedEmissionsValue' => 'setHasApprovedEmissionsValue', + 'listPrice' => 'setListPrice', + 'makeAndModel' => 'setMakeAndModel', + 'nonStandardAccessories' => 'setNonStandardAccessories', + 'rate' => 'setRate', + 'registeredPriorTo1998' => 'setRegisteredPriorTo1998', + 'registration' => 'setRegistration', + 'zeroEmissionsMileage' => 'setZeroEmissionsMileage' ]; /** @@ -304,31 +304,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'makeAndModel' => 'getMakeAndModel', - 'registration' => 'getRegistration', - 'firstRegistered' => 'getFirstRegistered', - 'hasApprovedEmissionsValue' => 'getHasApprovedEmissionsValue', - 'co2Emissions' => 'getCo2Emissions', - 'engineSize' => 'getEngineSize', - 'zeroEmissionsMileage' => 'getZeroEmissionsMileage', - 'fuelType' => 'getFuelType', 'availableFrom' => 'getAvailableFrom', 'availableTo' => 'getAvailableTo', + 'cashEquivalent' => 'getCashEquivalent', + 'cashEquivalentFuel' => 'getCashEquivalentFuel', + 'chargeableValue' => 'getChargeableValue', + 'co2Emissions' => 'getCo2Emissions', 'daysUnavailable' => 'getDaysUnavailable', - 'listPrice' => 'getListPrice', - 'nonStandardAccessories' => 'getNonStandardAccessories', 'employeeCapitalContributions' => 'getEmployeeCapitalContributions', 'employeePrivateContributions' => 'getEmployeePrivateContributions', + 'engineSize' => 'getEngineSize', + 'firstRegistered' => 'getFirstRegistered', 'freeFuel' => 'getFreeFuel', + 'freeFuelReinstated' => 'getFreeFuelReinstated', 'fuelAvailableFrom' => 'getFuelAvailableFrom', 'fuelAvailableTo' => 'getFuelAvailableTo', - 'freeFuelReinstated' => 'getFreeFuelReinstated', - 'registeredPriorTo1998' => 'getRegisteredPriorTo1998', - 'rate' => 'getRate', - 'chargeableValue' => 'getChargeableValue', + 'fuelType' => 'getFuelType', 'fullYearCharge' => 'getFullYearCharge', - 'cashEquivalent' => 'getCashEquivalent', - 'cashEquivalentFuel' => 'getCashEquivalentFuel' + 'hasApprovedEmissionsValue' => 'getHasApprovedEmissionsValue', + 'listPrice' => 'getListPrice', + 'makeAndModel' => 'getMakeAndModel', + 'nonStandardAccessories' => 'getNonStandardAccessories', + 'rate' => 'getRate', + 'registeredPriorTo1998' => 'getRegisteredPriorTo1998', + 'registration' => 'getRegistration', + 'zeroEmissionsMileage' => 'getZeroEmissionsMileage' ]; /** @@ -387,31 +387,31 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('makeAndModel', $data ?? [], null); - $this->setIfExists('registration', $data ?? [], null); - $this->setIfExists('firstRegistered', $data ?? [], null); - $this->setIfExists('hasApprovedEmissionsValue', $data ?? [], null); - $this->setIfExists('co2Emissions', $data ?? [], null); - $this->setIfExists('engineSize', $data ?? [], null); - $this->setIfExists('zeroEmissionsMileage', $data ?? [], null); - $this->setIfExists('fuelType', $data ?? [], null); $this->setIfExists('availableFrom', $data ?? [], null); $this->setIfExists('availableTo', $data ?? [], null); + $this->setIfExists('cashEquivalent', $data ?? [], null); + $this->setIfExists('cashEquivalentFuel', $data ?? [], null); + $this->setIfExists('chargeableValue', $data ?? [], null); + $this->setIfExists('co2Emissions', $data ?? [], null); $this->setIfExists('daysUnavailable', $data ?? [], null); - $this->setIfExists('listPrice', $data ?? [], null); - $this->setIfExists('nonStandardAccessories', $data ?? [], null); $this->setIfExists('employeeCapitalContributions', $data ?? [], null); $this->setIfExists('employeePrivateContributions', $data ?? [], null); + $this->setIfExists('engineSize', $data ?? [], null); + $this->setIfExists('firstRegistered', $data ?? [], null); $this->setIfExists('freeFuel', $data ?? [], null); + $this->setIfExists('freeFuelReinstated', $data ?? [], null); $this->setIfExists('fuelAvailableFrom', $data ?? [], null); $this->setIfExists('fuelAvailableTo', $data ?? [], null); - $this->setIfExists('freeFuelReinstated', $data ?? [], null); - $this->setIfExists('registeredPriorTo1998', $data ?? [], null); - $this->setIfExists('rate', $data ?? [], null); - $this->setIfExists('chargeableValue', $data ?? [], null); + $this->setIfExists('fuelType', $data ?? [], null); $this->setIfExists('fullYearCharge', $data ?? [], null); - $this->setIfExists('cashEquivalent', $data ?? [], null); - $this->setIfExists('cashEquivalentFuel', $data ?? [], null); + $this->setIfExists('hasApprovedEmissionsValue', $data ?? [], null); + $this->setIfExists('listPrice', $data ?? [], null); + $this->setIfExists('makeAndModel', $data ?? [], null); + $this->setIfExists('nonStandardAccessories', $data ?? [], null); + $this->setIfExists('rate', $data ?? [], null); + $this->setIfExists('registeredPriorTo1998', $data ?? [], null); + $this->setIfExists('registration', $data ?? [], null); + $this->setIfExists('zeroEmissionsMileage', $data ?? [], null); } /** @@ -457,130 +457,150 @@ public function valid(): bool /** - * Gets makeAndModel + * Gets availableFrom * - * @return string|null + * @return \DateTime|null */ - public function getMakeAndModel(): ?string + public function getAvailableFrom(): ?\DateTime { - return $this->container['makeAndModel']; + return $this->container['availableFrom']; } /** - * Sets makeAndModel + * Sets availableFrom * - * @param string|null $makeAndModel makeAndModel + * @param \DateTime|null $availableFrom availableFrom * * @return $this */ - public function setMakeAndModel(?string $makeAndModel): static + public function setAvailableFrom(?\DateTime $availableFrom): static { - if (is_null($makeAndModel)) { - array_push($this->openAPINullablesSetToNull, 'makeAndModel'); + if (is_null($availableFrom)) { + array_push($this->openAPINullablesSetToNull, 'availableFrom'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('makeAndModel', $nullablesSetToNull); + $index = array_search('availableFrom', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['makeAndModel'] = $makeAndModel; + $this->container['availableFrom'] = $availableFrom; return $this; } /** - * Gets registration + * Gets availableTo * - * @return string|null + * @return \DateTime|null */ - public function getRegistration(): ?string + public function getAvailableTo(): ?\DateTime { - return $this->container['registration']; + return $this->container['availableTo']; } /** - * Sets registration + * Sets availableTo * - * @param string|null $registration registration + * @param \DateTime|null $availableTo availableTo * * @return $this */ - public function setRegistration(?string $registration): static + public function setAvailableTo(?\DateTime $availableTo): static { - if (is_null($registration)) { - array_push($this->openAPINullablesSetToNull, 'registration'); + if (is_null($availableTo)) { + array_push($this->openAPINullablesSetToNull, 'availableTo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('registration', $nullablesSetToNull); + $index = array_search('availableTo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['registration'] = $registration; + $this->container['availableTo'] = $availableTo; return $this; } /** - * Gets firstRegistered + * Gets cashEquivalent * - * @return \DateTime|null + * @return float|null */ - public function getFirstRegistered(): ?\DateTime + public function getCashEquivalent(): ?float { - return $this->container['firstRegistered']; + return $this->container['cashEquivalent']; } /** - * Sets firstRegistered + * Sets cashEquivalent * - * @param \DateTime|null $firstRegistered firstRegistered + * @param float|null $cashEquivalent [readonly] * * @return $this */ - public function setFirstRegistered(?\DateTime $firstRegistered): static + public function setCashEquivalent(?float $cashEquivalent): static { - if (is_null($firstRegistered)) { - array_push($this->openAPINullablesSetToNull, 'firstRegistered'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('firstRegistered', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($cashEquivalent)) { + throw new InvalidArgumentException('non-nullable cashEquivalent cannot be null'); } - $this->container['firstRegistered'] = $firstRegistered; + $this->container['cashEquivalent'] = $cashEquivalent; return $this; } /** - * Gets hasApprovedEmissionsValue + * Gets cashEquivalentFuel * - * @return bool|null + * @return float|null */ - public function getHasApprovedEmissionsValue(): ?bool + public function getCashEquivalentFuel(): ?float { - return $this->container['hasApprovedEmissionsValue']; + return $this->container['cashEquivalentFuel']; } /** - * Sets hasApprovedEmissionsValue + * Sets cashEquivalentFuel * - * @param bool|null $hasApprovedEmissionsValue hasApprovedEmissionsValue + * @param float|null $cashEquivalentFuel [readonly] * * @return $this */ - public function setHasApprovedEmissionsValue(?bool $hasApprovedEmissionsValue): static + public function setCashEquivalentFuel(?float $cashEquivalentFuel): static { - if (is_null($hasApprovedEmissionsValue)) { - throw new InvalidArgumentException('non-nullable hasApprovedEmissionsValue cannot be null'); + if (is_null($cashEquivalentFuel)) { + throw new InvalidArgumentException('non-nullable cashEquivalentFuel cannot be null'); } - $this->container['hasApprovedEmissionsValue'] = $hasApprovedEmissionsValue; + $this->container['cashEquivalentFuel'] = $cashEquivalentFuel; + + return $this; + } + + /** + * Gets chargeableValue + * + * @return float|null + */ + public function getChargeableValue(): ?float + { + return $this->container['chargeableValue']; + } + + /** + * Sets chargeableValue + * + * @param float|null $chargeableValue [readonly] The chargeable value of the car + * + * @return $this + */ + public function setChargeableValue(?float $chargeableValue): static + { + if (is_null($chargeableValue)) { + throw new InvalidArgumentException('non-nullable chargeableValue cannot be null'); + } + $this->container['chargeableValue'] = $chargeableValue; return $this; } @@ -613,434 +633,434 @@ public function setCo2Emissions(?int $co2Emissions): static } /** - * Gets engineSize + * Gets daysUnavailable * * @return int|null */ - public function getEngineSize(): ?int + public function getDaysUnavailable(): ?int { - return $this->container['engineSize']; + return $this->container['daysUnavailable']; } /** - * Sets engineSize + * Sets daysUnavailable * - * @param int|null $engineSize engineSize + * @param int|null $daysUnavailable daysUnavailable * * @return $this */ - public function setEngineSize(?int $engineSize): static + public function setDaysUnavailable(?int $daysUnavailable): static { - if (is_null($engineSize)) { - throw new InvalidArgumentException('non-nullable engineSize cannot be null'); + if (is_null($daysUnavailable)) { + throw new InvalidArgumentException('non-nullable daysUnavailable cannot be null'); } - $this->container['engineSize'] = $engineSize; + $this->container['daysUnavailable'] = $daysUnavailable; return $this; } /** - * Gets zeroEmissionsMileage + * Gets employeeCapitalContributions * - * @return int|null + * @return float|null */ - public function getZeroEmissionsMileage(): ?int + public function getEmployeeCapitalContributions(): ?float { - return $this->container['zeroEmissionsMileage']; + return $this->container['employeeCapitalContributions']; } /** - * Sets zeroEmissionsMileage + * Sets employeeCapitalContributions * - * @param int|null $zeroEmissionsMileage zeroEmissionsMileage + * @param float|null $employeeCapitalContributions employeeCapitalContributions * * @return $this */ - public function setZeroEmissionsMileage(?int $zeroEmissionsMileage): static + public function setEmployeeCapitalContributions(?float $employeeCapitalContributions): static { - if (is_null($zeroEmissionsMileage)) { - throw new InvalidArgumentException('non-nullable zeroEmissionsMileage cannot be null'); + if (is_null($employeeCapitalContributions)) { + throw new InvalidArgumentException('non-nullable employeeCapitalContributions cannot be null'); } - $this->container['zeroEmissionsMileage'] = $zeroEmissionsMileage; + $this->container['employeeCapitalContributions'] = $employeeCapitalContributions; return $this; } /** - * Gets fuelType + * Gets employeePrivateContributions * - * @return \SynergiTech\Staffology\Model\BenefitDetailsCarPowerType|null + * @return float|null */ - public function getFuelType(): ?\SynergiTech\Staffology\Model\BenefitDetailsCarPowerType + public function getEmployeePrivateContributions(): ?float { - return $this->container['fuelType']; + return $this->container['employeePrivateContributions']; } /** - * Sets fuelType + * Sets employeePrivateContributions * - * @param \SynergiTech\Staffology\Model\BenefitDetailsCarPowerType|null $fuelType fuelType + * @param float|null $employeePrivateContributions employeePrivateContributions * * @return $this */ - public function setFuelType(?\SynergiTech\Staffology\Model\BenefitDetailsCarPowerType $fuelType): static + public function setEmployeePrivateContributions(?float $employeePrivateContributions): static { - if (is_null($fuelType)) { - throw new InvalidArgumentException('non-nullable fuelType cannot be null'); + if (is_null($employeePrivateContributions)) { + throw new InvalidArgumentException('non-nullable employeePrivateContributions cannot be null'); } - $this->container['fuelType'] = $fuelType; + $this->container['employeePrivateContributions'] = $employeePrivateContributions; return $this; } /** - * Gets availableFrom + * Gets engineSize * - * @return \DateTime|null + * @return int|null */ - public function getAvailableFrom(): ?\DateTime + public function getEngineSize(): ?int { - return $this->container['availableFrom']; + return $this->container['engineSize']; } /** - * Sets availableFrom + * Sets engineSize * - * @param \DateTime|null $availableFrom availableFrom + * @param int|null $engineSize engineSize * * @return $this */ - public function setAvailableFrom(?\DateTime $availableFrom): static + public function setEngineSize(?int $engineSize): static { - if (is_null($availableFrom)) { - array_push($this->openAPINullablesSetToNull, 'availableFrom'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('availableFrom', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($engineSize)) { + throw new InvalidArgumentException('non-nullable engineSize cannot be null'); } - $this->container['availableFrom'] = $availableFrom; + $this->container['engineSize'] = $engineSize; return $this; } /** - * Gets availableTo + * Gets firstRegistered * * @return \DateTime|null */ - public function getAvailableTo(): ?\DateTime + public function getFirstRegistered(): ?\DateTime { - return $this->container['availableTo']; + return $this->container['firstRegistered']; } /** - * Sets availableTo + * Sets firstRegistered * - * @param \DateTime|null $availableTo availableTo + * @param \DateTime|null $firstRegistered firstRegistered * * @return $this */ - public function setAvailableTo(?\DateTime $availableTo): static + public function setFirstRegistered(?\DateTime $firstRegistered): static { - if (is_null($availableTo)) { - array_push($this->openAPINullablesSetToNull, 'availableTo'); + if (is_null($firstRegistered)) { + array_push($this->openAPINullablesSetToNull, 'firstRegistered'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('availableTo', $nullablesSetToNull); + $index = array_search('firstRegistered', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['availableTo'] = $availableTo; + $this->container['firstRegistered'] = $firstRegistered; return $this; } /** - * Gets daysUnavailable + * Gets freeFuel * - * @return int|null + * @return bool|null */ - public function getDaysUnavailable(): ?int + public function getFreeFuel(): ?bool { - return $this->container['daysUnavailable']; + return $this->container['freeFuel']; } /** - * Sets daysUnavailable + * Sets freeFuel * - * @param int|null $daysUnavailable daysUnavailable + * @param bool|null $freeFuel freeFuel * * @return $this */ - public function setDaysUnavailable(?int $daysUnavailable): static + public function setFreeFuel(?bool $freeFuel): static { - if (is_null($daysUnavailable)) { - throw new InvalidArgumentException('non-nullable daysUnavailable cannot be null'); + if (is_null($freeFuel)) { + throw new InvalidArgumentException('non-nullable freeFuel cannot be null'); } - $this->container['daysUnavailable'] = $daysUnavailable; + $this->container['freeFuel'] = $freeFuel; return $this; } /** - * Gets listPrice + * Gets freeFuelReinstated * - * @return float|null + * @return bool|null */ - public function getListPrice(): ?float + public function getFreeFuelReinstated(): ?bool { - return $this->container['listPrice']; + return $this->container['freeFuelReinstated']; } /** - * Sets listPrice + * Sets freeFuelReinstated * - * @param float|null $listPrice listPrice + * @param bool|null $freeFuelReinstated freeFuelReinstated * * @return $this */ - public function setListPrice(?float $listPrice): static + public function setFreeFuelReinstated(?bool $freeFuelReinstated): static { - if (is_null($listPrice)) { - throw new InvalidArgumentException('non-nullable listPrice cannot be null'); + if (is_null($freeFuelReinstated)) { + throw new InvalidArgumentException('non-nullable freeFuelReinstated cannot be null'); } - $this->container['listPrice'] = $listPrice; + $this->container['freeFuelReinstated'] = $freeFuelReinstated; return $this; } /** - * Gets nonStandardAccessories + * Gets fuelAvailableFrom * - * @return float|null + * @return \DateTime|null */ - public function getNonStandardAccessories(): ?float + public function getFuelAvailableFrom(): ?\DateTime { - return $this->container['nonStandardAccessories']; + return $this->container['fuelAvailableFrom']; } /** - * Sets nonStandardAccessories + * Sets fuelAvailableFrom * - * @param float|null $nonStandardAccessories nonStandardAccessories + * @param \DateTime|null $fuelAvailableFrom fuelAvailableFrom * * @return $this */ - public function setNonStandardAccessories(?float $nonStandardAccessories): static + public function setFuelAvailableFrom(?\DateTime $fuelAvailableFrom): static { - if (is_null($nonStandardAccessories)) { - throw new InvalidArgumentException('non-nullable nonStandardAccessories cannot be null'); + if (is_null($fuelAvailableFrom)) { + array_push($this->openAPINullablesSetToNull, 'fuelAvailableFrom'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fuelAvailableFrom', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['nonStandardAccessories'] = $nonStandardAccessories; + $this->container['fuelAvailableFrom'] = $fuelAvailableFrom; return $this; } /** - * Gets employeeCapitalContributions + * Gets fuelAvailableTo * - * @return float|null + * @return \DateTime|null */ - public function getEmployeeCapitalContributions(): ?float + public function getFuelAvailableTo(): ?\DateTime { - return $this->container['employeeCapitalContributions']; + return $this->container['fuelAvailableTo']; } /** - * Sets employeeCapitalContributions + * Sets fuelAvailableTo * - * @param float|null $employeeCapitalContributions employeeCapitalContributions + * @param \DateTime|null $fuelAvailableTo fuelAvailableTo * * @return $this */ - public function setEmployeeCapitalContributions(?float $employeeCapitalContributions): static + public function setFuelAvailableTo(?\DateTime $fuelAvailableTo): static { - if (is_null($employeeCapitalContributions)) { - throw new InvalidArgumentException('non-nullable employeeCapitalContributions cannot be null'); + if (is_null($fuelAvailableTo)) { + array_push($this->openAPINullablesSetToNull, 'fuelAvailableTo'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fuelAvailableTo', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeeCapitalContributions'] = $employeeCapitalContributions; + $this->container['fuelAvailableTo'] = $fuelAvailableTo; return $this; } /** - * Gets employeePrivateContributions + * Gets fuelType * - * @return float|null + * @return \SynergiTech\Staffology\Model\BenefitDetailsCarPowerType|null */ - public function getEmployeePrivateContributions(): ?float + public function getFuelType(): ?\SynergiTech\Staffology\Model\BenefitDetailsCarPowerType { - return $this->container['employeePrivateContributions']; + return $this->container['fuelType']; } /** - * Sets employeePrivateContributions + * Sets fuelType * - * @param float|null $employeePrivateContributions employeePrivateContributions + * @param \SynergiTech\Staffology\Model\BenefitDetailsCarPowerType|null $fuelType fuelType * * @return $this */ - public function setEmployeePrivateContributions(?float $employeePrivateContributions): static + public function setFuelType(?\SynergiTech\Staffology\Model\BenefitDetailsCarPowerType $fuelType): static { - if (is_null($employeePrivateContributions)) { - throw new InvalidArgumentException('non-nullable employeePrivateContributions cannot be null'); + if (is_null($fuelType)) { + throw new InvalidArgumentException('non-nullable fuelType cannot be null'); } - $this->container['employeePrivateContributions'] = $employeePrivateContributions; + $this->container['fuelType'] = $fuelType; return $this; } /** - * Gets freeFuel + * Gets fullYearCharge * - * @return bool|null + * @return float|null */ - public function getFreeFuel(): ?bool + public function getFullYearCharge(): ?float { - return $this->container['freeFuel']; + return $this->container['fullYearCharge']; } /** - * Sets freeFuel + * Sets fullYearCharge * - * @param bool|null $freeFuel freeFuel + * @param float|null $fullYearCharge [readonly] The charge for the car for a full year, not taking in to account available dates or EmployeePrivateContributions * * @return $this */ - public function setFreeFuel(?bool $freeFuel): static + public function setFullYearCharge(?float $fullYearCharge): static { - if (is_null($freeFuel)) { - throw new InvalidArgumentException('non-nullable freeFuel cannot be null'); + if (is_null($fullYearCharge)) { + throw new InvalidArgumentException('non-nullable fullYearCharge cannot be null'); } - $this->container['freeFuel'] = $freeFuel; + $this->container['fullYearCharge'] = $fullYearCharge; return $this; } /** - * Gets fuelAvailableFrom + * Gets hasApprovedEmissionsValue * - * @return \DateTime|null + * @return bool|null */ - public function getFuelAvailableFrom(): ?\DateTime + public function getHasApprovedEmissionsValue(): ?bool { - return $this->container['fuelAvailableFrom']; + return $this->container['hasApprovedEmissionsValue']; } /** - * Sets fuelAvailableFrom + * Sets hasApprovedEmissionsValue * - * @param \DateTime|null $fuelAvailableFrom fuelAvailableFrom + * @param bool|null $hasApprovedEmissionsValue hasApprovedEmissionsValue * * @return $this */ - public function setFuelAvailableFrom(?\DateTime $fuelAvailableFrom): static + public function setHasApprovedEmissionsValue(?bool $hasApprovedEmissionsValue): static { - if (is_null($fuelAvailableFrom)) { - array_push($this->openAPINullablesSetToNull, 'fuelAvailableFrom'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fuelAvailableFrom', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($hasApprovedEmissionsValue)) { + throw new InvalidArgumentException('non-nullable hasApprovedEmissionsValue cannot be null'); } - $this->container['fuelAvailableFrom'] = $fuelAvailableFrom; + $this->container['hasApprovedEmissionsValue'] = $hasApprovedEmissionsValue; return $this; } /** - * Gets fuelAvailableTo + * Gets listPrice * - * @return \DateTime|null + * @return float|null */ - public function getFuelAvailableTo(): ?\DateTime + public function getListPrice(): ?float { - return $this->container['fuelAvailableTo']; + return $this->container['listPrice']; } /** - * Sets fuelAvailableTo + * Sets listPrice * - * @param \DateTime|null $fuelAvailableTo fuelAvailableTo + * @param float|null $listPrice listPrice * * @return $this */ - public function setFuelAvailableTo(?\DateTime $fuelAvailableTo): static + public function setListPrice(?float $listPrice): static { - if (is_null($fuelAvailableTo)) { - array_push($this->openAPINullablesSetToNull, 'fuelAvailableTo'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fuelAvailableTo', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($listPrice)) { + throw new InvalidArgumentException('non-nullable listPrice cannot be null'); } - $this->container['fuelAvailableTo'] = $fuelAvailableTo; + $this->container['listPrice'] = $listPrice; return $this; } /** - * Gets freeFuelReinstated + * Gets makeAndModel * - * @return bool|null + * @return string|null */ - public function getFreeFuelReinstated(): ?bool + public function getMakeAndModel(): ?string { - return $this->container['freeFuelReinstated']; + return $this->container['makeAndModel']; } /** - * Sets freeFuelReinstated + * Sets makeAndModel * - * @param bool|null $freeFuelReinstated freeFuelReinstated + * @param string|null $makeAndModel makeAndModel * * @return $this */ - public function setFreeFuelReinstated(?bool $freeFuelReinstated): static + public function setMakeAndModel(?string $makeAndModel): static { - if (is_null($freeFuelReinstated)) { - throw new InvalidArgumentException('non-nullable freeFuelReinstated cannot be null'); + if (is_null($makeAndModel)) { + array_push($this->openAPINullablesSetToNull, 'makeAndModel'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('makeAndModel', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['freeFuelReinstated'] = $freeFuelReinstated; + $this->container['makeAndModel'] = $makeAndModel; return $this; } /** - * Gets registeredPriorTo1998 + * Gets nonStandardAccessories * - * @return bool|null + * @return float|null */ - public function getRegisteredPriorTo1998(): ?bool + public function getNonStandardAccessories(): ?float { - return $this->container['registeredPriorTo1998']; + return $this->container['nonStandardAccessories']; } /** - * Sets registeredPriorTo1998 + * Sets nonStandardAccessories * - * @param bool|null $registeredPriorTo1998 [readonly] + * @param float|null $nonStandardAccessories nonStandardAccessories * * @return $this */ - public function setRegisteredPriorTo1998(?bool $registeredPriorTo1998): static + public function setNonStandardAccessories(?float $nonStandardAccessories): static { - if (is_null($registeredPriorTo1998)) { - throw new InvalidArgumentException('non-nullable registeredPriorTo1998 cannot be null'); + if (is_null($nonStandardAccessories)) { + throw new InvalidArgumentException('non-nullable nonStandardAccessories cannot be null'); } - $this->container['registeredPriorTo1998'] = $registeredPriorTo1998; + $this->container['nonStandardAccessories'] = $nonStandardAccessories; return $this; } @@ -1073,109 +1093,89 @@ public function setRate(?float $rate): static } /** - * Gets chargeableValue - * - * @return float|null - */ - public function getChargeableValue(): ?float - { - return $this->container['chargeableValue']; - } - - /** - * Sets chargeableValue - * - * @param float|null $chargeableValue [readonly] The chargeable value of the car - * - * @return $this - */ - public function setChargeableValue(?float $chargeableValue): static - { - if (is_null($chargeableValue)) { - throw new InvalidArgumentException('non-nullable chargeableValue cannot be null'); - } - $this->container['chargeableValue'] = $chargeableValue; - - return $this; - } - - /** - * Gets fullYearCharge + * Gets registeredPriorTo1998 * - * @return float|null + * @return bool|null */ - public function getFullYearCharge(): ?float + public function getRegisteredPriorTo1998(): ?bool { - return $this->container['fullYearCharge']; + return $this->container['registeredPriorTo1998']; } /** - * Sets fullYearCharge + * Sets registeredPriorTo1998 * - * @param float|null $fullYearCharge [readonly] The charge for the car for a full year, not taking in to account available dates or EmployeePrivateContributions + * @param bool|null $registeredPriorTo1998 [readonly] * * @return $this */ - public function setFullYearCharge(?float $fullYearCharge): static + public function setRegisteredPriorTo1998(?bool $registeredPriorTo1998): static { - if (is_null($fullYearCharge)) { - throw new InvalidArgumentException('non-nullable fullYearCharge cannot be null'); + if (is_null($registeredPriorTo1998)) { + throw new InvalidArgumentException('non-nullable registeredPriorTo1998 cannot be null'); } - $this->container['fullYearCharge'] = $fullYearCharge; + $this->container['registeredPriorTo1998'] = $registeredPriorTo1998; return $this; } /** - * Gets cashEquivalent + * Gets registration * - * @return float|null + * @return string|null */ - public function getCashEquivalent(): ?float + public function getRegistration(): ?string { - return $this->container['cashEquivalent']; + return $this->container['registration']; } /** - * Sets cashEquivalent + * Sets registration * - * @param float|null $cashEquivalent [readonly] + * @param string|null $registration registration * * @return $this */ - public function setCashEquivalent(?float $cashEquivalent): static + public function setRegistration(?string $registration): static { - if (is_null($cashEquivalent)) { - throw new InvalidArgumentException('non-nullable cashEquivalent cannot be null'); + if (is_null($registration)) { + array_push($this->openAPINullablesSetToNull, 'registration'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('registration', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['cashEquivalent'] = $cashEquivalent; + $this->container['registration'] = $registration; return $this; } /** - * Gets cashEquivalentFuel + * Gets zeroEmissionsMileage * - * @return float|null + * @return int|null */ - public function getCashEquivalentFuel(): ?float + public function getZeroEmissionsMileage(): ?int { - return $this->container['cashEquivalentFuel']; + return $this->container['zeroEmissionsMileage']; } /** - * Sets cashEquivalentFuel + * Sets zeroEmissionsMileage * - * @param float|null $cashEquivalentFuel [readonly] + * @param int|null $zeroEmissionsMileage zeroEmissionsMileage * * @return $this */ - public function setCashEquivalentFuel(?float $cashEquivalentFuel): static + public function setZeroEmissionsMileage(?int $zeroEmissionsMileage): static { - if (is_null($cashEquivalentFuel)) { - throw new InvalidArgumentException('non-nullable cashEquivalentFuel cannot be null'); + if (is_null($zeroEmissionsMileage)) { + throw new InvalidArgumentException('non-nullable zeroEmissionsMileage cannot be null'); } - $this->container['cashEquivalentFuel'] = $cashEquivalentFuel; + $this->container['zeroEmissionsMileage'] = $zeroEmissionsMileage; return $this; } diff --git a/src/Model/BenefitDetailsCarPowerType.php b/src/Model/BenefitDetailsCarPowerType.php index 0227ff0..a7d3af2 100644 --- a/src/Model/BenefitDetailsCarPowerType.php +++ b/src/Model/BenefitDetailsCarPowerType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/BenefitDetailsClass1AType.php b/src/Model/BenefitDetailsClass1AType.php index 2b3ca84..945e430 100644 --- a/src/Model/BenefitDetailsClass1AType.php +++ b/src/Model/BenefitDetailsClass1AType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/BenefitDetailsLoan.php b/src/Model/BenefitDetailsLoan.php index ff6aaee..d10a113 100644 --- a/src/Model/BenefitDetailsLoan.php +++ b/src/Model/BenefitDetailsLoan.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,17 +59,17 @@ class BenefitDetailsLoan implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'numberOfJointBorrowers' => 'int', - 'loanMade' => '\DateTime', - 'loanDischarged' => '\DateTime', - 'startingBalance' => 'float', - 'closingBalance' => 'float', - 'maxBalanceInYear' => 'float', - 'interestPaid' => 'float', 'cashEquivalent' => 'float', + 'closingBalance' => 'float', 'fullTaxMonths' => 'int', + 'interestPaid' => 'float', + 'loanDischarged' => '\DateTime', + 'loanMade' => '\DateTime', + 'maxBalanceInYear' => 'float', 'monthlyValue' => 'float', - 'officialInterest' => 'float' + 'numberOfJointBorrowers' => 'int', + 'officialInterest' => 'float', + 'startingBalance' => 'float' ]; /** @@ -78,17 +78,17 @@ class BenefitDetailsLoan implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'numberOfJointBorrowers' => 'int32', - 'loanMade' => 'date', - 'loanDischarged' => 'date', - 'startingBalance' => 'double', - 'closingBalance' => 'double', - 'maxBalanceInYear' => 'double', - 'interestPaid' => 'double', 'cashEquivalent' => 'double', + 'closingBalance' => 'double', 'fullTaxMonths' => 'int32', + 'interestPaid' => 'double', + 'loanDischarged' => 'date', + 'loanMade' => 'date', + 'maxBalanceInYear' => 'double', 'monthlyValue' => 'double', - 'officialInterest' => 'double' + 'numberOfJointBorrowers' => 'int32', + 'officialInterest' => 'double', + 'startingBalance' => 'double' ]; /** @@ -97,17 +97,17 @@ class BenefitDetailsLoan implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'numberOfJointBorrowers' => true, - 'loanMade' => true, - 'loanDischarged' => true, - 'startingBalance' => false, - 'closingBalance' => false, - 'maxBalanceInYear' => false, - 'interestPaid' => false, 'cashEquivalent' => false, + 'closingBalance' => false, 'fullTaxMonths' => false, + 'interestPaid' => false, + 'loanDischarged' => true, + 'loanMade' => true, + 'maxBalanceInYear' => false, 'monthlyValue' => false, - 'officialInterest' => false + 'numberOfJointBorrowers' => true, + 'officialInterest' => false, + 'startingBalance' => false ]; /** @@ -196,17 +196,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'numberOfJointBorrowers' => 'numberOfJointBorrowers', - 'loanMade' => 'loanMade', - 'loanDischarged' => 'loanDischarged', - 'startingBalance' => 'startingBalance', - 'closingBalance' => 'closingBalance', - 'maxBalanceInYear' => 'maxBalanceInYear', - 'interestPaid' => 'interestPaid', 'cashEquivalent' => 'cashEquivalent', + 'closingBalance' => 'closingBalance', 'fullTaxMonths' => 'fullTaxMonths', + 'interestPaid' => 'interestPaid', + 'loanDischarged' => 'loanDischarged', + 'loanMade' => 'loanMade', + 'maxBalanceInYear' => 'maxBalanceInYear', 'monthlyValue' => 'monthlyValue', - 'officialInterest' => 'officialInterest' + 'numberOfJointBorrowers' => 'numberOfJointBorrowers', + 'officialInterest' => 'officialInterest', + 'startingBalance' => 'startingBalance' ]; /** @@ -215,17 +215,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'numberOfJointBorrowers' => 'setNumberOfJointBorrowers', - 'loanMade' => 'setLoanMade', - 'loanDischarged' => 'setLoanDischarged', - 'startingBalance' => 'setStartingBalance', - 'closingBalance' => 'setClosingBalance', - 'maxBalanceInYear' => 'setMaxBalanceInYear', - 'interestPaid' => 'setInterestPaid', 'cashEquivalent' => 'setCashEquivalent', + 'closingBalance' => 'setClosingBalance', 'fullTaxMonths' => 'setFullTaxMonths', + 'interestPaid' => 'setInterestPaid', + 'loanDischarged' => 'setLoanDischarged', + 'loanMade' => 'setLoanMade', + 'maxBalanceInYear' => 'setMaxBalanceInYear', 'monthlyValue' => 'setMonthlyValue', - 'officialInterest' => 'setOfficialInterest' + 'numberOfJointBorrowers' => 'setNumberOfJointBorrowers', + 'officialInterest' => 'setOfficialInterest', + 'startingBalance' => 'setStartingBalance' ]; /** @@ -234,17 +234,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'numberOfJointBorrowers' => 'getNumberOfJointBorrowers', - 'loanMade' => 'getLoanMade', - 'loanDischarged' => 'getLoanDischarged', - 'startingBalance' => 'getStartingBalance', - 'closingBalance' => 'getClosingBalance', - 'maxBalanceInYear' => 'getMaxBalanceInYear', - 'interestPaid' => 'getInterestPaid', 'cashEquivalent' => 'getCashEquivalent', + 'closingBalance' => 'getClosingBalance', 'fullTaxMonths' => 'getFullTaxMonths', + 'interestPaid' => 'getInterestPaid', + 'loanDischarged' => 'getLoanDischarged', + 'loanMade' => 'getLoanMade', + 'maxBalanceInYear' => 'getMaxBalanceInYear', 'monthlyValue' => 'getMonthlyValue', - 'officialInterest' => 'getOfficialInterest' + 'numberOfJointBorrowers' => 'getNumberOfJointBorrowers', + 'officialInterest' => 'getOfficialInterest', + 'startingBalance' => 'getStartingBalance' ]; /** @@ -303,17 +303,17 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('numberOfJointBorrowers', $data ?? [], null); - $this->setIfExists('loanMade', $data ?? [], null); - $this->setIfExists('loanDischarged', $data ?? [], null); - $this->setIfExists('startingBalance', $data ?? [], null); - $this->setIfExists('closingBalance', $data ?? [], null); - $this->setIfExists('maxBalanceInYear', $data ?? [], null); - $this->setIfExists('interestPaid', $data ?? [], null); $this->setIfExists('cashEquivalent', $data ?? [], null); + $this->setIfExists('closingBalance', $data ?? [], null); $this->setIfExists('fullTaxMonths', $data ?? [], null); + $this->setIfExists('interestPaid', $data ?? [], null); + $this->setIfExists('loanDischarged', $data ?? [], null); + $this->setIfExists('loanMade', $data ?? [], null); + $this->setIfExists('maxBalanceInYear', $data ?? [], null); $this->setIfExists('monthlyValue', $data ?? [], null); + $this->setIfExists('numberOfJointBorrowers', $data ?? [], null); $this->setIfExists('officialInterest', $data ?? [], null); + $this->setIfExists('startingBalance', $data ?? [], null); } /** @@ -359,319 +359,319 @@ public function valid(): bool /** - * Gets numberOfJointBorrowers + * Gets cashEquivalent * - * @return int|null + * @return float|null */ - public function getNumberOfJointBorrowers(): ?int + public function getCashEquivalent(): ?float { - return $this->container['numberOfJointBorrowers']; + return $this->container['cashEquivalent']; } /** - * Sets numberOfJointBorrowers + * Sets cashEquivalent * - * @param int|null $numberOfJointBorrowers numberOfJointBorrowers + * @param float|null $cashEquivalent [readonly] * * @return $this */ - public function setNumberOfJointBorrowers(?int $numberOfJointBorrowers): static + public function setCashEquivalent(?float $cashEquivalent): static { - if (is_null($numberOfJointBorrowers)) { - array_push($this->openAPINullablesSetToNull, 'numberOfJointBorrowers'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('numberOfJointBorrowers', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($cashEquivalent)) { + throw new InvalidArgumentException('non-nullable cashEquivalent cannot be null'); } - $this->container['numberOfJointBorrowers'] = $numberOfJointBorrowers; + $this->container['cashEquivalent'] = $cashEquivalent; return $this; } /** - * Gets loanMade + * Gets closingBalance * - * @return \DateTime|null + * @return float|null */ - public function getLoanMade(): ?\DateTime + public function getClosingBalance(): ?float { - return $this->container['loanMade']; + return $this->container['closingBalance']; } /** - * Sets loanMade + * Sets closingBalance * - * @param \DateTime|null $loanMade loanMade + * @param float|null $closingBalance closingBalance * * @return $this */ - public function setLoanMade(?\DateTime $loanMade): static + public function setClosingBalance(?float $closingBalance): static { - if (is_null($loanMade)) { - array_push($this->openAPINullablesSetToNull, 'loanMade'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('loanMade', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($closingBalance)) { + throw new InvalidArgumentException('non-nullable closingBalance cannot be null'); } - $this->container['loanMade'] = $loanMade; + $this->container['closingBalance'] = $closingBalance; return $this; } /** - * Gets loanDischarged + * Gets fullTaxMonths * - * @return \DateTime|null + * @return int|null */ - public function getLoanDischarged(): ?\DateTime + public function getFullTaxMonths(): ?int { - return $this->container['loanDischarged']; + return $this->container['fullTaxMonths']; } /** - * Sets loanDischarged + * Sets fullTaxMonths * - * @param \DateTime|null $loanDischarged loanDischarged + * @param int|null $fullTaxMonths [readonly] * * @return $this */ - public function setLoanDischarged(?\DateTime $loanDischarged): static + public function setFullTaxMonths(?int $fullTaxMonths): static { - if (is_null($loanDischarged)) { - array_push($this->openAPINullablesSetToNull, 'loanDischarged'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('loanDischarged', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($fullTaxMonths)) { + throw new InvalidArgumentException('non-nullable fullTaxMonths cannot be null'); } - $this->container['loanDischarged'] = $loanDischarged; + $this->container['fullTaxMonths'] = $fullTaxMonths; return $this; } /** - * Gets startingBalance + * Gets interestPaid * * @return float|null */ - public function getStartingBalance(): ?float + public function getInterestPaid(): ?float { - return $this->container['startingBalance']; + return $this->container['interestPaid']; } /** - * Sets startingBalance + * Sets interestPaid * - * @param float|null $startingBalance startingBalance + * @param float|null $interestPaid interestPaid * * @return $this */ - public function setStartingBalance(?float $startingBalance): static + public function setInterestPaid(?float $interestPaid): static { - if (is_null($startingBalance)) { - throw new InvalidArgumentException('non-nullable startingBalance cannot be null'); + if (is_null($interestPaid)) { + throw new InvalidArgumentException('non-nullable interestPaid cannot be null'); } - $this->container['startingBalance'] = $startingBalance; + $this->container['interestPaid'] = $interestPaid; return $this; } /** - * Gets closingBalance + * Gets loanDischarged * - * @return float|null + * @return \DateTime|null */ - public function getClosingBalance(): ?float + public function getLoanDischarged(): ?\DateTime { - return $this->container['closingBalance']; + return $this->container['loanDischarged']; } /** - * Sets closingBalance + * Sets loanDischarged * - * @param float|null $closingBalance closingBalance + * @param \DateTime|null $loanDischarged loanDischarged * * @return $this */ - public function setClosingBalance(?float $closingBalance): static + public function setLoanDischarged(?\DateTime $loanDischarged): static { - if (is_null($closingBalance)) { - throw new InvalidArgumentException('non-nullable closingBalance cannot be null'); + if (is_null($loanDischarged)) { + array_push($this->openAPINullablesSetToNull, 'loanDischarged'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('loanDischarged', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['closingBalance'] = $closingBalance; + $this->container['loanDischarged'] = $loanDischarged; return $this; } /** - * Gets maxBalanceInYear + * Gets loanMade * - * @return float|null + * @return \DateTime|null */ - public function getMaxBalanceInYear(): ?float + public function getLoanMade(): ?\DateTime { - return $this->container['maxBalanceInYear']; + return $this->container['loanMade']; } /** - * Sets maxBalanceInYear + * Sets loanMade * - * @param float|null $maxBalanceInYear maxBalanceInYear + * @param \DateTime|null $loanMade loanMade * * @return $this */ - public function setMaxBalanceInYear(?float $maxBalanceInYear): static + public function setLoanMade(?\DateTime $loanMade): static { - if (is_null($maxBalanceInYear)) { - throw new InvalidArgumentException('non-nullable maxBalanceInYear cannot be null'); + if (is_null($loanMade)) { + array_push($this->openAPINullablesSetToNull, 'loanMade'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('loanMade', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['maxBalanceInYear'] = $maxBalanceInYear; + $this->container['loanMade'] = $loanMade; return $this; } /** - * Gets interestPaid + * Gets maxBalanceInYear * * @return float|null */ - public function getInterestPaid(): ?float + public function getMaxBalanceInYear(): ?float { - return $this->container['interestPaid']; + return $this->container['maxBalanceInYear']; } /** - * Sets interestPaid + * Sets maxBalanceInYear * - * @param float|null $interestPaid interestPaid + * @param float|null $maxBalanceInYear maxBalanceInYear * * @return $this */ - public function setInterestPaid(?float $interestPaid): static + public function setMaxBalanceInYear(?float $maxBalanceInYear): static { - if (is_null($interestPaid)) { - throw new InvalidArgumentException('non-nullable interestPaid cannot be null'); + if (is_null($maxBalanceInYear)) { + throw new InvalidArgumentException('non-nullable maxBalanceInYear cannot be null'); } - $this->container['interestPaid'] = $interestPaid; + $this->container['maxBalanceInYear'] = $maxBalanceInYear; return $this; } /** - * Gets cashEquivalent + * Gets monthlyValue * * @return float|null */ - public function getCashEquivalent(): ?float + public function getMonthlyValue(): ?float { - return $this->container['cashEquivalent']; + return $this->container['monthlyValue']; } /** - * Sets cashEquivalent + * Sets monthlyValue * - * @param float|null $cashEquivalent [readonly] + * @param float|null $monthlyValue [readonly] * * @return $this */ - public function setCashEquivalent(?float $cashEquivalent): static + public function setMonthlyValue(?float $monthlyValue): static { - if (is_null($cashEquivalent)) { - throw new InvalidArgumentException('non-nullable cashEquivalent cannot be null'); + if (is_null($monthlyValue)) { + throw new InvalidArgumentException('non-nullable monthlyValue cannot be null'); } - $this->container['cashEquivalent'] = $cashEquivalent; + $this->container['monthlyValue'] = $monthlyValue; return $this; } /** - * Gets fullTaxMonths + * Gets numberOfJointBorrowers * * @return int|null */ - public function getFullTaxMonths(): ?int + public function getNumberOfJointBorrowers(): ?int { - return $this->container['fullTaxMonths']; + return $this->container['numberOfJointBorrowers']; } /** - * Sets fullTaxMonths + * Sets numberOfJointBorrowers * - * @param int|null $fullTaxMonths [readonly] + * @param int|null $numberOfJointBorrowers numberOfJointBorrowers * * @return $this */ - public function setFullTaxMonths(?int $fullTaxMonths): static + public function setNumberOfJointBorrowers(?int $numberOfJointBorrowers): static { - if (is_null($fullTaxMonths)) { - throw new InvalidArgumentException('non-nullable fullTaxMonths cannot be null'); + if (is_null($numberOfJointBorrowers)) { + array_push($this->openAPINullablesSetToNull, 'numberOfJointBorrowers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('numberOfJointBorrowers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['fullTaxMonths'] = $fullTaxMonths; + $this->container['numberOfJointBorrowers'] = $numberOfJointBorrowers; return $this; } /** - * Gets monthlyValue + * Gets officialInterest * * @return float|null */ - public function getMonthlyValue(): ?float + public function getOfficialInterest(): ?float { - return $this->container['monthlyValue']; + return $this->container['officialInterest']; } /** - * Sets monthlyValue + * Sets officialInterest * - * @param float|null $monthlyValue [readonly] + * @param float|null $officialInterest [readonly] * * @return $this */ - public function setMonthlyValue(?float $monthlyValue): static + public function setOfficialInterest(?float $officialInterest): static { - if (is_null($monthlyValue)) { - throw new InvalidArgumentException('non-nullable monthlyValue cannot be null'); + if (is_null($officialInterest)) { + throw new InvalidArgumentException('non-nullable officialInterest cannot be null'); } - $this->container['monthlyValue'] = $monthlyValue; + $this->container['officialInterest'] = $officialInterest; return $this; } /** - * Gets officialInterest + * Gets startingBalance * * @return float|null */ - public function getOfficialInterest(): ?float + public function getStartingBalance(): ?float { - return $this->container['officialInterest']; + return $this->container['startingBalance']; } /** - * Sets officialInterest + * Sets startingBalance * - * @param float|null $officialInterest [readonly] + * @param float|null $startingBalance startingBalance * * @return $this */ - public function setOfficialInterest(?float $officialInterest): static + public function setStartingBalance(?float $startingBalance): static { - if (is_null($officialInterest)) { - throw new InvalidArgumentException('non-nullable officialInterest cannot be null'); + if (is_null($startingBalance)) { + throw new InvalidArgumentException('non-nullable startingBalance cannot be null'); } - $this->container['officialInterest'] = $officialInterest; + $this->container['startingBalance'] = $startingBalance; return $this; } diff --git a/src/Model/BenefitDetailsNonClass1AType.php b/src/Model/BenefitDetailsNonClass1AType.php index 30f2330..bc96a9b 100644 --- a/src/Model/BenefitDetailsNonClass1AType.php +++ b/src/Model/BenefitDetailsNonClass1AType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/BenefitDetailsPaymentType.php b/src/Model/BenefitDetailsPaymentType.php index 9cb74e5..520b0cb 100644 --- a/src/Model/BenefitDetailsPaymentType.php +++ b/src/Model/BenefitDetailsPaymentType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/BenefitDetailsUseOfAssetType.php b/src/Model/BenefitDetailsUseOfAssetType.php index 457e8a1..579c9f2 100644 --- a/src/Model/BenefitDetailsUseOfAssetType.php +++ b/src/Model/BenefitDetailsUseOfAssetType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/BenefitPayrolled.php b/src/Model/BenefitPayrolled.php index 54aff67..2210ab7 100644 --- a/src/Model/BenefitPayrolled.php +++ b/src/Model/BenefitPayrolled.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,11 @@ class BenefitPayrolled implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'amount' => 'float', - 'id' => 'string' + 'id' => 'string', + 'isLatestVersion' => 'bool', + 'payRunVersion' => 'int', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear' ]; /** @@ -70,9 +72,11 @@ class BenefitPayrolled implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'taxYear' => null, 'amount' => 'double', - 'id' => 'uuid' + 'id' => 'uuid', + 'isLatestVersion' => null, + 'payRunVersion' => 'int32', + 'taxYear' => null ]; /** @@ -81,9 +85,11 @@ class BenefitPayrolled implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'taxYear' => false, 'amount' => false, - 'id' => false + 'id' => false, + 'isLatestVersion' => false, + 'payRunVersion' => false, + 'taxYear' => false ]; /** @@ -172,9 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'taxYear' => 'taxYear', 'amount' => 'amount', - 'id' => 'id' + 'id' => 'id', + 'isLatestVersion' => 'isLatestVersion', + 'payRunVersion' => 'payRunVersion', + 'taxYear' => 'taxYear' ]; /** @@ -183,9 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'taxYear' => 'setTaxYear', 'amount' => 'setAmount', - 'id' => 'setId' + 'id' => 'setId', + 'isLatestVersion' => 'setIsLatestVersion', + 'payRunVersion' => 'setPayRunVersion', + 'taxYear' => 'setTaxYear' ]; /** @@ -194,9 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'taxYear' => 'getTaxYear', 'amount' => 'getAmount', - 'id' => 'getId' + 'id' => 'getId', + 'isLatestVersion' => 'getIsLatestVersion', + 'payRunVersion' => 'getPayRunVersion', + 'taxYear' => 'getTaxYear' ]; /** @@ -255,9 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isLatestVersion', $data ?? [], null); + $this->setIfExists('payRunVersion', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); } /** @@ -302,33 +316,6 @@ public function valid(): bool } - /** - * Gets taxYear - * - * @return \SynergiTech\Staffology\Model\TaxYear|null - */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear - { - return $this->container['taxYear']; - } - - /** - * Sets taxYear - * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear - * - * @return $this - */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static - { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); - } - $this->container['taxYear'] = $taxYear; - - return $this; - } - /** * Gets amount * @@ -382,6 +369,87 @@ public function setId(?string $id): static return $this; } + + /** + * Gets isLatestVersion + * + * @return bool|null + */ + public function getIsLatestVersion(): ?bool + { + return $this->container['isLatestVersion']; + } + + /** + * Sets isLatestVersion + * + * @param bool|null $isLatestVersion [readonly] Indicates whether this is the latest version of the BenefitPayrolled. + * + * @return $this + */ + public function setIsLatestVersion(?bool $isLatestVersion): static + { + if (is_null($isLatestVersion)) { + throw new InvalidArgumentException('non-nullable isLatestVersion cannot be null'); + } + $this->container['isLatestVersion'] = $isLatestVersion; + + return $this; + } + + /** + * Gets payRunVersion + * + * @return int|null + */ + public function getPayRunVersion(): ?int + { + return $this->container['payRunVersion']; + } + + /** + * Sets payRunVersion + * + * @param int|null $payRunVersion [readonly] The supplementary pay run version of this BenefitPayrolled. + * + * @return $this + */ + public function setPayRunVersion(?int $payRunVersion): static + { + if (is_null($payRunVersion)) { + throw new InvalidArgumentException('non-nullable payRunVersion cannot be null'); + } + $this->container['payRunVersion'] = $payRunVersion; + + return $this; + } + + /** + * Gets taxYear + * + * @return \SynergiTech\Staffology\Model\TaxYear|null + */ + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + { + return $this->container['taxYear']; + } + + /** + * Sets taxYear + * + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * + * @return $this + */ + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + { + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + } + $this->container['taxYear'] = $taxYear; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/BenefitType.php b/src/Model/BenefitType.php index cf53282..9346acc 100644 --- a/src/Model/BenefitType.php +++ b/src/Model/BenefitType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/BureauSettings.php b/src/Model/BureauSettings.php index c75e6eb..9e9db7a 100644 --- a/src/Model/BureauSettings.php +++ b/src/Model/BureauSettings.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -61,12 +61,12 @@ class BureauSettings implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'enableApprovals' => 'bool', - 'processorUserId' => 'string', - 'reportPackId' => 'string', + 'id' => 'string', 'isBacsClient' => 'bool', 'isBacsClientForHmrc' => 'bool', - 'showContactCard' => 'bool', - 'id' => 'string' + 'processorUserId' => 'string', + 'reportPackId' => 'string', + 'showContactCard' => 'bool' ]; /** @@ -76,12 +76,12 @@ class BureauSettings implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'enableApprovals' => null, - 'processorUserId' => 'uuid', - 'reportPackId' => 'uuid', + 'id' => 'uuid', 'isBacsClient' => null, 'isBacsClientForHmrc' => null, - 'showContactCard' => null, - 'id' => 'uuid' + 'processorUserId' => 'uuid', + 'reportPackId' => 'uuid', + 'showContactCard' => null ]; /** @@ -91,12 +91,12 @@ class BureauSettings implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'enableApprovals' => false, - 'processorUserId' => true, - 'reportPackId' => true, + 'id' => false, 'isBacsClient' => false, 'isBacsClientForHmrc' => false, - 'showContactCard' => false, - 'id' => false + 'processorUserId' => true, + 'reportPackId' => true, + 'showContactCard' => false ]; /** @@ -186,12 +186,12 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'enableApprovals' => 'enableApprovals', - 'processorUserId' => 'processorUserId', - 'reportPackId' => 'reportPackId', + 'id' => 'id', 'isBacsClient' => 'isBacsClient', 'isBacsClientForHmrc' => 'isBacsClientForHmrc', - 'showContactCard' => 'showContactCard', - 'id' => 'id' + 'processorUserId' => 'processorUserId', + 'reportPackId' => 'reportPackId', + 'showContactCard' => 'showContactCard' ]; /** @@ -201,12 +201,12 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'enableApprovals' => 'setEnableApprovals', - 'processorUserId' => 'setProcessorUserId', - 'reportPackId' => 'setReportPackId', + 'id' => 'setId', 'isBacsClient' => 'setIsBacsClient', 'isBacsClientForHmrc' => 'setIsBacsClientForHmrc', - 'showContactCard' => 'setShowContactCard', - 'id' => 'setId' + 'processorUserId' => 'setProcessorUserId', + 'reportPackId' => 'setReportPackId', + 'showContactCard' => 'setShowContactCard' ]; /** @@ -216,12 +216,12 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'enableApprovals' => 'getEnableApprovals', - 'processorUserId' => 'getProcessorUserId', - 'reportPackId' => 'getReportPackId', + 'id' => 'getId', 'isBacsClient' => 'getIsBacsClient', 'isBacsClientForHmrc' => 'getIsBacsClientForHmrc', - 'showContactCard' => 'getShowContactCard', - 'id' => 'getId' + 'processorUserId' => 'getProcessorUserId', + 'reportPackId' => 'getReportPackId', + 'showContactCard' => 'getShowContactCard' ]; /** @@ -281,12 +281,12 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('enableApprovals', $data ?? [], null); - $this->setIfExists('processorUserId', $data ?? [], null); - $this->setIfExists('reportPackId', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('isBacsClient', $data ?? [], null); $this->setIfExists('isBacsClientForHmrc', $data ?? [], null); + $this->setIfExists('processorUserId', $data ?? [], null); + $this->setIfExists('reportPackId', $data ?? [], null); $this->setIfExists('showContactCard', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); } /** @@ -359,69 +359,28 @@ public function setEnableApprovals(?bool $enableApprovals): static } /** - * Gets processorUserId - * - * @return string|null - */ - public function getProcessorUserId(): ?string - { - return $this->container['processorUserId']; - } - - /** - * Sets processorUserId - * - * @param string|null $processorUserId The Id of the user, if any, that is the allocated Processor - * - * @return $this - */ - public function setProcessorUserId(?string $processorUserId): static - { - if (is_null($processorUserId)) { - array_push($this->openAPINullablesSetToNull, 'processorUserId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('processorUserId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['processorUserId'] = $processorUserId; - - return $this; - } - - /** - * Gets reportPackId + * Gets id * * @return string|null */ - public function getReportPackId(): ?string + public function getId(): ?string { - return $this->container['reportPackId']; + return $this->container['id']; } /** - * Sets reportPackId + * Sets id * - * @param string|null $reportPackId The Id of the ReportPack, if any, to present to the Payroll Client + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setReportPackId(?string $reportPackId): static + public function setId(?string $id): static { - if (is_null($reportPackId)) { - array_push($this->openAPINullablesSetToNull, 'reportPackId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('reportPackId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['reportPackId'] = $reportPackId; + $this->container['id'] = $id; return $this; } @@ -481,55 +440,96 @@ public function setIsBacsClientForHmrc(?bool $isBacsClientForHmrc): static } /** - * Gets showContactCard + * Gets processorUserId * - * @return bool|null + * @return string|null */ - public function getShowContactCard(): ?bool + public function getProcessorUserId(): ?string { - return $this->container['showContactCard']; + return $this->container['processorUserId']; } /** - * Sets showContactCard + * Sets processorUserId * - * @param bool|null $showContactCard Show a Contact card with the Processors details on the PayrollClient dashboard + * @param string|null $processorUserId The Id of the user, if any, that is the allocated Processor * * @return $this */ - public function setShowContactCard(?bool $showContactCard): static + public function setProcessorUserId(?string $processorUserId): static { - if (is_null($showContactCard)) { - throw new InvalidArgumentException('non-nullable showContactCard cannot be null'); + if (is_null($processorUserId)) { + array_push($this->openAPINullablesSetToNull, 'processorUserId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('processorUserId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['showContactCard'] = $showContactCard; + $this->container['processorUserId'] = $processorUserId; return $this; } /** - * Gets id + * Gets reportPackId * * @return string|null */ - public function getId(): ?string + public function getReportPackId(): ?string { - return $this->container['id']; + return $this->container['reportPackId']; } /** - * Sets id + * Sets reportPackId * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $reportPackId The Id of the ReportPack, if any, to present to the Payroll Client * * @return $this */ - public function setId(?string $id): static + public function setReportPackId(?string $reportPackId): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($reportPackId)) { + array_push($this->openAPINullablesSetToNull, 'reportPackId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('reportPackId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['reportPackId'] = $reportPackId; + + return $this; + } + + /** + * Gets showContactCard + * + * @return bool|null + */ + public function getShowContactCard(): ?bool + { + return $this->container['showContactCard']; + } + + /** + * Sets showContactCard + * + * @param bool|null $showContactCard Show a Contact card with the Processors details on the PayrollClient dashboard + * + * @return $this + */ + public function setShowContactCard(?bool $showContactCard): static + { + if (is_null($showContactCard)) { + throw new InvalidArgumentException('non-nullable showContactCard cannot be null'); + } + $this->container['showContactCard'] = $showContactCard; return $this; } diff --git a/src/Model/CISSubContractorType.php b/src/Model/CISSubContractorType.php index 26ce35f..dcbb261 100644 --- a/src/Model/CISSubContractorType.php +++ b/src/Model/CISSubContractorType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/CISTaxStatus.php b/src/Model/CISTaxStatus.php index 5628126..beb1cb3 100644 --- a/src/Model/CISTaxStatus.php +++ b/src/Model/CISTaxStatus.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/CalendarEntry.php b/src/Model/CalendarEntry.php index c2fb043..d36b05d 100644 --- a/src/Model/CalendarEntry.php +++ b/src/Model/CalendarEntry.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class CalendarEntry implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'title' => 'string', - 'start' => '\DateTime', 'end' => '\DateTime', + 'start' => '\DateTime', + 'title' => 'string', 'type' => '\SynergiTech\Staffology\Model\CalendarEntryType' ]; @@ -71,9 +71,9 @@ class CalendarEntry implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'title' => null, - 'start' => 'date', 'end' => 'date', + 'start' => 'date', + 'title' => null, 'type' => null ]; @@ -83,9 +83,9 @@ class CalendarEntry implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'title' => true, - 'start' => false, 'end' => false, + 'start' => false, + 'title' => true, 'type' => false ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'title' => 'title', - 'start' => 'start', 'end' => 'end', + 'start' => 'start', + 'title' => 'title', 'type' => 'type' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'title' => 'setTitle', - 'start' => 'setStart', 'end' => 'setEnd', + 'start' => 'setStart', + 'title' => 'setTitle', 'type' => 'setType' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'title' => 'getTitle', - 'start' => 'getStart', 'end' => 'getEnd', + 'start' => 'getStart', + 'title' => 'getTitle', 'type' => 'getType' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('start', $data ?? [], null); $this->setIfExists('end', $data ?? [], null); + $this->setIfExists('start', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -310,35 +310,28 @@ public function valid(): bool /** - * Gets title + * Gets end * - * @return string|null + * @return \DateTime|null */ - public function getTitle(): ?string + public function getEnd(): ?\DateTime { - return $this->container['title']; + return $this->container['end']; } /** - * Sets title + * Sets end * - * @param string|null $title title + * @param \DateTime|null $end end * * @return $this */ - public function setTitle(?string $title): static + public function setEnd(?\DateTime $end): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($end)) { + throw new InvalidArgumentException('non-nullable end cannot be null'); } - $this->container['title'] = $title; + $this->container['end'] = $end; return $this; } @@ -371,28 +364,35 @@ public function setStart(?\DateTime $start): static } /** - * Gets end + * Gets title * - * @return \DateTime|null + * @return string|null */ - public function getEnd(): ?\DateTime + public function getTitle(): ?string { - return $this->container['end']; + return $this->container['title']; } /** - * Sets end + * Sets title * - * @param \DateTime|null $end end + * @param string|null $title title * * @return $this */ - public function setEnd(?\DateTime $end): static + public function setTitle(?string $title): static { - if (is_null($end)) { - throw new InvalidArgumentException('non-nullable end cannot be null'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['end'] = $end; + $this->container['title'] = $title; return $this; } diff --git a/src/Model/CalendarEntryType.php b/src/Model/CalendarEntryType.php index e422234..df05ab7 100644 --- a/src/Model/CalendarEntryType.php +++ b/src/Model/CalendarEntryType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/CalendarMonth.php b/src/Model/CalendarMonth.php index be880ac..bebcd1d 100644 --- a/src/Model/CalendarMonth.php +++ b/src/Model/CalendarMonth.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/CarCharge.php b/src/Model/CarCharge.php index e0b4646..c59ac2a 100644 --- a/src/Model/CarCharge.php +++ b/src/Model/CarCharge.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,14 +60,14 @@ class CarCharge implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'co2Table' => '\SynergiTech\Staffology\Model\CarChargeRate[]', 'dieselSurcharge' => 'float', + 'engineSizeTable' => '\SynergiTech\Staffology\Model\CarChargeRate[]', + 'fuelCharge' => 'float', 'maxCharge' => 'float', 'minCharge' => 'float', - 'fuelCharge' => 'float', - 'newCarRateReductionDate' => '\DateTime', 'newCarRateReductionAmount' => 'float', - 'co2Table' => '\SynergiTech\Staffology\Model\CarChargeRate[]', - 'engineSizeTable' => '\SynergiTech\Staffology\Model\CarChargeRate[]', + 'newCarRateReductionDate' => '\DateTime', 'zeroEmissionsTable' => '\SynergiTech\Staffology\Model\CarChargeRate[]' ]; @@ -77,14 +77,14 @@ class CarCharge implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'co2Table' => null, 'dieselSurcharge' => 'double', + 'engineSizeTable' => null, + 'fuelCharge' => 'double', 'maxCharge' => 'double', 'minCharge' => 'double', - 'fuelCharge' => 'double', - 'newCarRateReductionDate' => 'date', 'newCarRateReductionAmount' => 'double', - 'co2Table' => null, - 'engineSizeTable' => null, + 'newCarRateReductionDate' => 'date', 'zeroEmissionsTable' => null ]; @@ -94,14 +94,14 @@ class CarCharge implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'co2Table' => true, 'dieselSurcharge' => false, + 'engineSizeTable' => true, + 'fuelCharge' => false, 'maxCharge' => false, 'minCharge' => false, - 'fuelCharge' => false, - 'newCarRateReductionDate' => true, 'newCarRateReductionAmount' => false, - 'co2Table' => true, - 'engineSizeTable' => true, + 'newCarRateReductionDate' => true, 'zeroEmissionsTable' => true ]; @@ -191,14 +191,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'co2Table' => 'co2Table', 'dieselSurcharge' => 'dieselSurcharge', + 'engineSizeTable' => 'engineSizeTable', + 'fuelCharge' => 'fuelCharge', 'maxCharge' => 'maxCharge', 'minCharge' => 'minCharge', - 'fuelCharge' => 'fuelCharge', - 'newCarRateReductionDate' => 'newCarRateReductionDate', 'newCarRateReductionAmount' => 'newCarRateReductionAmount', - 'co2Table' => 'co2Table', - 'engineSizeTable' => 'engineSizeTable', + 'newCarRateReductionDate' => 'newCarRateReductionDate', 'zeroEmissionsTable' => 'zeroEmissionsTable' ]; @@ -208,14 +208,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'co2Table' => 'setCo2Table', 'dieselSurcharge' => 'setDieselSurcharge', + 'engineSizeTable' => 'setEngineSizeTable', + 'fuelCharge' => 'setFuelCharge', 'maxCharge' => 'setMaxCharge', 'minCharge' => 'setMinCharge', - 'fuelCharge' => 'setFuelCharge', - 'newCarRateReductionDate' => 'setNewCarRateReductionDate', 'newCarRateReductionAmount' => 'setNewCarRateReductionAmount', - 'co2Table' => 'setCo2Table', - 'engineSizeTable' => 'setEngineSizeTable', + 'newCarRateReductionDate' => 'setNewCarRateReductionDate', 'zeroEmissionsTable' => 'setZeroEmissionsTable' ]; @@ -225,14 +225,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'co2Table' => 'getCo2Table', 'dieselSurcharge' => 'getDieselSurcharge', + 'engineSizeTable' => 'getEngineSizeTable', + 'fuelCharge' => 'getFuelCharge', 'maxCharge' => 'getMaxCharge', 'minCharge' => 'getMinCharge', - 'fuelCharge' => 'getFuelCharge', - 'newCarRateReductionDate' => 'getNewCarRateReductionDate', 'newCarRateReductionAmount' => 'getNewCarRateReductionAmount', - 'co2Table' => 'getCo2Table', - 'engineSizeTable' => 'getEngineSizeTable', + 'newCarRateReductionDate' => 'getNewCarRateReductionDate', 'zeroEmissionsTable' => 'getZeroEmissionsTable' ]; @@ -292,14 +292,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('co2Table', $data ?? [], null); $this->setIfExists('dieselSurcharge', $data ?? [], null); + $this->setIfExists('engineSizeTable', $data ?? [], null); + $this->setIfExists('fuelCharge', $data ?? [], null); $this->setIfExists('maxCharge', $data ?? [], null); $this->setIfExists('minCharge', $data ?? [], null); - $this->setIfExists('fuelCharge', $data ?? [], null); - $this->setIfExists('newCarRateReductionDate', $data ?? [], null); $this->setIfExists('newCarRateReductionAmount', $data ?? [], null); - $this->setIfExists('co2Table', $data ?? [], null); - $this->setIfExists('engineSizeTable', $data ?? [], null); + $this->setIfExists('newCarRateReductionDate', $data ?? [], null); $this->setIfExists('zeroEmissionsTable', $data ?? [], null); } @@ -346,82 +346,96 @@ public function valid(): bool /** - * Gets dieselSurcharge + * Gets co2Table * - * @return float|null + * @return \SynergiTech\Staffology\Model\CarChargeRate[]|null */ - public function getDieselSurcharge(): ?float + public function getCo2Table(): ?array { - return $this->container['dieselSurcharge']; + return $this->container['co2Table']; } /** - * Sets dieselSurcharge + * Sets co2Table * - * @param float|null $dieselSurcharge dieselSurcharge + * @param \SynergiTech\Staffology\Model\CarChargeRate[]|null $co2Table co2Table * * @return $this */ - public function setDieselSurcharge(?float $dieselSurcharge): static + public function setCo2Table(?array $co2Table): static { - if (is_null($dieselSurcharge)) { - throw new InvalidArgumentException('non-nullable dieselSurcharge cannot be null'); + if (is_null($co2Table)) { + array_push($this->openAPINullablesSetToNull, 'co2Table'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('co2Table', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['dieselSurcharge'] = $dieselSurcharge; + $this->container['co2Table'] = $co2Table; return $this; } /** - * Gets maxCharge + * Gets dieselSurcharge * * @return float|null */ - public function getMaxCharge(): ?float + public function getDieselSurcharge(): ?float { - return $this->container['maxCharge']; + return $this->container['dieselSurcharge']; } /** - * Sets maxCharge + * Sets dieselSurcharge * - * @param float|null $maxCharge maxCharge + * @param float|null $dieselSurcharge dieselSurcharge * * @return $this */ - public function setMaxCharge(?float $maxCharge): static + public function setDieselSurcharge(?float $dieselSurcharge): static { - if (is_null($maxCharge)) { - throw new InvalidArgumentException('non-nullable maxCharge cannot be null'); + if (is_null($dieselSurcharge)) { + throw new InvalidArgumentException('non-nullable dieselSurcharge cannot be null'); } - $this->container['maxCharge'] = $maxCharge; + $this->container['dieselSurcharge'] = $dieselSurcharge; return $this; } /** - * Gets minCharge + * Gets engineSizeTable * - * @return float|null + * @return \SynergiTech\Staffology\Model\CarChargeRate[]|null */ - public function getMinCharge(): ?float + public function getEngineSizeTable(): ?array { - return $this->container['minCharge']; + return $this->container['engineSizeTable']; } /** - * Sets minCharge + * Sets engineSizeTable * - * @param float|null $minCharge minCharge + * @param \SynergiTech\Staffology\Model\CarChargeRate[]|null $engineSizeTable engineSizeTable * * @return $this */ - public function setMinCharge(?float $minCharge): static + public function setEngineSizeTable(?array $engineSizeTable): static { - if (is_null($minCharge)) { - throw new InvalidArgumentException('non-nullable minCharge cannot be null'); + if (is_null($engineSizeTable)) { + array_push($this->openAPINullablesSetToNull, 'engineSizeTable'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('engineSizeTable', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['minCharge'] = $minCharge; + $this->container['engineSizeTable'] = $engineSizeTable; return $this; } @@ -454,130 +468,116 @@ public function setFuelCharge(?float $fuelCharge): static } /** - * Gets newCarRateReductionDate + * Gets maxCharge * - * @return \DateTime|null + * @return float|null */ - public function getNewCarRateReductionDate(): ?\DateTime + public function getMaxCharge(): ?float { - return $this->container['newCarRateReductionDate']; + return $this->container['maxCharge']; } /** - * Sets newCarRateReductionDate + * Sets maxCharge * - * @param \DateTime|null $newCarRateReductionDate newCarRateReductionDate + * @param float|null $maxCharge maxCharge * * @return $this */ - public function setNewCarRateReductionDate(?\DateTime $newCarRateReductionDate): static + public function setMaxCharge(?float $maxCharge): static { - if (is_null($newCarRateReductionDate)) { - array_push($this->openAPINullablesSetToNull, 'newCarRateReductionDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('newCarRateReductionDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($maxCharge)) { + throw new InvalidArgumentException('non-nullable maxCharge cannot be null'); } - $this->container['newCarRateReductionDate'] = $newCarRateReductionDate; + $this->container['maxCharge'] = $maxCharge; return $this; } /** - * Gets newCarRateReductionAmount + * Gets minCharge * * @return float|null */ - public function getNewCarRateReductionAmount(): ?float + public function getMinCharge(): ?float { - return $this->container['newCarRateReductionAmount']; + return $this->container['minCharge']; } /** - * Sets newCarRateReductionAmount + * Sets minCharge * - * @param float|null $newCarRateReductionAmount newCarRateReductionAmount + * @param float|null $minCharge minCharge * * @return $this */ - public function setNewCarRateReductionAmount(?float $newCarRateReductionAmount): static + public function setMinCharge(?float $minCharge): static { - if (is_null($newCarRateReductionAmount)) { - throw new InvalidArgumentException('non-nullable newCarRateReductionAmount cannot be null'); + if (is_null($minCharge)) { + throw new InvalidArgumentException('non-nullable minCharge cannot be null'); } - $this->container['newCarRateReductionAmount'] = $newCarRateReductionAmount; + $this->container['minCharge'] = $minCharge; return $this; } /** - * Gets co2Table + * Gets newCarRateReductionAmount * - * @return \SynergiTech\Staffology\Model\CarChargeRate[]|null + * @return float|null */ - public function getCo2Table(): ?array + public function getNewCarRateReductionAmount(): ?float { - return $this->container['co2Table']; + return $this->container['newCarRateReductionAmount']; } /** - * Sets co2Table + * Sets newCarRateReductionAmount * - * @param \SynergiTech\Staffology\Model\CarChargeRate[]|null $co2Table co2Table + * @param float|null $newCarRateReductionAmount newCarRateReductionAmount * * @return $this */ - public function setCo2Table(?array $co2Table): static + public function setNewCarRateReductionAmount(?float $newCarRateReductionAmount): static { - if (is_null($co2Table)) { - array_push($this->openAPINullablesSetToNull, 'co2Table'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('co2Table', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($newCarRateReductionAmount)) { + throw new InvalidArgumentException('non-nullable newCarRateReductionAmount cannot be null'); } - $this->container['co2Table'] = $co2Table; + $this->container['newCarRateReductionAmount'] = $newCarRateReductionAmount; return $this; } /** - * Gets engineSizeTable + * Gets newCarRateReductionDate * - * @return \SynergiTech\Staffology\Model\CarChargeRate[]|null + * @return \DateTime|null */ - public function getEngineSizeTable(): ?array + public function getNewCarRateReductionDate(): ?\DateTime { - return $this->container['engineSizeTable']; + return $this->container['newCarRateReductionDate']; } /** - * Sets engineSizeTable + * Sets newCarRateReductionDate * - * @param \SynergiTech\Staffology\Model\CarChargeRate[]|null $engineSizeTable engineSizeTable + * @param \DateTime|null $newCarRateReductionDate newCarRateReductionDate * * @return $this */ - public function setEngineSizeTable(?array $engineSizeTable): static + public function setNewCarRateReductionDate(?\DateTime $newCarRateReductionDate): static { - if (is_null($engineSizeTable)) { - array_push($this->openAPINullablesSetToNull, 'engineSizeTable'); + if (is_null($newCarRateReductionDate)) { + array_push($this->openAPINullablesSetToNull, 'newCarRateReductionDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('engineSizeTable', $nullablesSetToNull); + $index = array_search('newCarRateReductionDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['engineSizeTable'] = $engineSizeTable; + $this->container['newCarRateReductionDate'] = $newCarRateReductionDate; return $this; } diff --git a/src/Model/CarChargeRate.php b/src/Model/CarChargeRate.php index b50cf80..9b4d576 100644 --- a/src/Model/CarChargeRate.php +++ b/src/Model/CarChargeRate.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ChangeSummary.php b/src/Model/ChangeSummary.php index 4ef18e9..1220db9 100644 --- a/src/Model/ChangeSummary.php +++ b/src/Model/ChangeSummary.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,26 +59,26 @@ class ChangeSummary implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'auditId' => 'string', - 'previousAuditId' => 'string', - 'date' => '\DateTime', - 'name' => 'string', 'actionPerformed' => '\SynergiTech\Staffology\Model\AuditEventAction', - 'entityType' => '\SynergiTech\Staffology\Model\EntityType', - 'entityId' => 'string', - 'employeeUniqueId' => 'string', - 'employerUniqueId' => 'string', 'actionPerformedBy' => 'string', 'actionPerformedOn' => 'string', + 'auditId' => 'string', + 'changeType' => 'string', + 'date' => '\DateTime', + 'displayName' => 'string', 'employeeFirstName' => 'string', 'employeeLastName' => 'string', - 'uniqueId' => 'string', + 'employeeUniqueId' => 'string', + 'employerUniqueId' => 'string', + 'entityId' => 'string', + 'entityType' => '\SynergiTech\Staffology\Model\EntityType', + 'id' => 'string', + 'modifications' => '\SynergiTech\Staffology\Model\FieldModification[]', + 'name' => 'string', 'parentEventType' => 'string', - 'displayName' => 'string', 'payRunPeriod' => 'int', - 'changeType' => 'string', - 'modifications' => '\SynergiTech\Staffology\Model\FieldModification[]' + 'previousAuditId' => 'string', + 'uniqueId' => 'string' ]; /** @@ -87,26 +87,26 @@ class ChangeSummary implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'auditId' => 'uuid', - 'previousAuditId' => 'uuid', - 'date' => 'date', - 'name' => null, 'actionPerformed' => null, - 'entityType' => null, - 'entityId' => 'uuid', - 'employeeUniqueId' => 'uuid', - 'employerUniqueId' => 'uuid', 'actionPerformedBy' => null, 'actionPerformedOn' => null, + 'auditId' => 'uuid', + 'changeType' => null, + 'date' => 'date', + 'displayName' => null, 'employeeFirstName' => null, 'employeeLastName' => null, - 'uniqueId' => 'uuid', + 'employeeUniqueId' => 'uuid', + 'employerUniqueId' => 'uuid', + 'entityId' => 'uuid', + 'entityType' => null, + 'id' => 'uuid', + 'modifications' => null, + 'name' => null, 'parentEventType' => null, - 'displayName' => null, 'payRunPeriod' => 'int32', - 'changeType' => null, - 'modifications' => null + 'previousAuditId' => 'uuid', + 'uniqueId' => 'uuid' ]; /** @@ -115,26 +115,26 @@ class ChangeSummary implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'auditId' => false, - 'previousAuditId' => false, - 'date' => false, - 'name' => true, 'actionPerformed' => false, - 'entityType' => false, - 'entityId' => false, - 'employeeUniqueId' => false, - 'employerUniqueId' => false, 'actionPerformedBy' => true, 'actionPerformedOn' => true, + 'auditId' => false, + 'changeType' => true, + 'date' => false, + 'displayName' => true, 'employeeFirstName' => true, 'employeeLastName' => true, - 'uniqueId' => false, + 'employeeUniqueId' => false, + 'employerUniqueId' => false, + 'entityId' => false, + 'entityType' => false, + 'id' => false, + 'modifications' => true, + 'name' => true, 'parentEventType' => true, - 'displayName' => true, 'payRunPeriod' => false, - 'changeType' => true, - 'modifications' => true + 'previousAuditId' => false, + 'uniqueId' => false ]; /** @@ -223,26 +223,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'auditId' => 'auditId', - 'previousAuditId' => 'previousAuditId', - 'date' => 'date', - 'name' => 'name', 'actionPerformed' => 'actionPerformed', - 'entityType' => 'entityType', - 'entityId' => 'entityId', - 'employeeUniqueId' => 'employeeUniqueId', - 'employerUniqueId' => 'employerUniqueId', 'actionPerformedBy' => 'actionPerformedBy', 'actionPerformedOn' => 'actionPerformedOn', + 'auditId' => 'auditId', + 'changeType' => 'changeType', + 'date' => 'date', + 'displayName' => 'displayName', 'employeeFirstName' => 'employeeFirstName', 'employeeLastName' => 'employeeLastName', - 'uniqueId' => 'uniqueId', + 'employeeUniqueId' => 'employeeUniqueId', + 'employerUniqueId' => 'employerUniqueId', + 'entityId' => 'entityId', + 'entityType' => 'entityType', + 'id' => 'id', + 'modifications' => 'modifications', + 'name' => 'name', 'parentEventType' => 'parentEventType', - 'displayName' => 'displayName', 'payRunPeriod' => 'payRunPeriod', - 'changeType' => 'changeType', - 'modifications' => 'modifications' + 'previousAuditId' => 'previousAuditId', + 'uniqueId' => 'uniqueId' ]; /** @@ -251,26 +251,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'auditId' => 'setAuditId', - 'previousAuditId' => 'setPreviousAuditId', - 'date' => 'setDate', - 'name' => 'setName', 'actionPerformed' => 'setActionPerformed', - 'entityType' => 'setEntityType', - 'entityId' => 'setEntityId', - 'employeeUniqueId' => 'setEmployeeUniqueId', - 'employerUniqueId' => 'setEmployerUniqueId', 'actionPerformedBy' => 'setActionPerformedBy', 'actionPerformedOn' => 'setActionPerformedOn', + 'auditId' => 'setAuditId', + 'changeType' => 'setChangeType', + 'date' => 'setDate', + 'displayName' => 'setDisplayName', 'employeeFirstName' => 'setEmployeeFirstName', 'employeeLastName' => 'setEmployeeLastName', - 'uniqueId' => 'setUniqueId', + 'employeeUniqueId' => 'setEmployeeUniqueId', + 'employerUniqueId' => 'setEmployerUniqueId', + 'entityId' => 'setEntityId', + 'entityType' => 'setEntityType', + 'id' => 'setId', + 'modifications' => 'setModifications', + 'name' => 'setName', 'parentEventType' => 'setParentEventType', - 'displayName' => 'setDisplayName', 'payRunPeriod' => 'setPayRunPeriod', - 'changeType' => 'setChangeType', - 'modifications' => 'setModifications' + 'previousAuditId' => 'setPreviousAuditId', + 'uniqueId' => 'setUniqueId' ]; /** @@ -279,26 +279,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'auditId' => 'getAuditId', - 'previousAuditId' => 'getPreviousAuditId', - 'date' => 'getDate', - 'name' => 'getName', 'actionPerformed' => 'getActionPerformed', - 'entityType' => 'getEntityType', - 'entityId' => 'getEntityId', - 'employeeUniqueId' => 'getEmployeeUniqueId', - 'employerUniqueId' => 'getEmployerUniqueId', 'actionPerformedBy' => 'getActionPerformedBy', 'actionPerformedOn' => 'getActionPerformedOn', + 'auditId' => 'getAuditId', + 'changeType' => 'getChangeType', + 'date' => 'getDate', + 'displayName' => 'getDisplayName', 'employeeFirstName' => 'getEmployeeFirstName', 'employeeLastName' => 'getEmployeeLastName', - 'uniqueId' => 'getUniqueId', + 'employeeUniqueId' => 'getEmployeeUniqueId', + 'employerUniqueId' => 'getEmployerUniqueId', + 'entityId' => 'getEntityId', + 'entityType' => 'getEntityType', + 'id' => 'getId', + 'modifications' => 'getModifications', + 'name' => 'getName', 'parentEventType' => 'getParentEventType', - 'displayName' => 'getDisplayName', 'payRunPeriod' => 'getPayRunPeriod', - 'changeType' => 'getChangeType', - 'modifications' => 'getModifications' + 'previousAuditId' => 'getPreviousAuditId', + 'uniqueId' => 'getUniqueId' ]; /** @@ -357,26 +357,26 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('auditId', $data ?? [], null); - $this->setIfExists('previousAuditId', $data ?? [], null); - $this->setIfExists('date', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('actionPerformed', $data ?? [], null); - $this->setIfExists('entityType', $data ?? [], null); - $this->setIfExists('entityId', $data ?? [], null); - $this->setIfExists('employeeUniqueId', $data ?? [], null); - $this->setIfExists('employerUniqueId', $data ?? [], null); $this->setIfExists('actionPerformedBy', $data ?? [], null); $this->setIfExists('actionPerformedOn', $data ?? [], null); + $this->setIfExists('auditId', $data ?? [], null); + $this->setIfExists('changeType', $data ?? [], null); + $this->setIfExists('date', $data ?? [], null); + $this->setIfExists('displayName', $data ?? [], null); $this->setIfExists('employeeFirstName', $data ?? [], null); $this->setIfExists('employeeLastName', $data ?? [], null); - $this->setIfExists('uniqueId', $data ?? [], null); + $this->setIfExists('employeeUniqueId', $data ?? [], null); + $this->setIfExists('employerUniqueId', $data ?? [], null); + $this->setIfExists('entityId', $data ?? [], null); + $this->setIfExists('entityType', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('modifications', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('parentEventType', $data ?? [], null); - $this->setIfExists('displayName', $data ?? [], null); $this->setIfExists('payRunPeriod', $data ?? [], null); - $this->setIfExists('changeType', $data ?? [], null); - $this->setIfExists('modifications', $data ?? [], null); + $this->setIfExists('previousAuditId', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); } /** @@ -422,224 +422,286 @@ public function valid(): bool /** - * Gets id + * Gets actionPerformed * - * @return string|null + * @return \SynergiTech\Staffology\Model\AuditEventAction|null */ - public function getId(): ?string + public function getActionPerformed(): ?\SynergiTech\Staffology\Model\AuditEventAction { - return $this->container['id']; + return $this->container['actionPerformed']; } /** - * Sets id + * Sets actionPerformed * - * @param string|null $id id + * @param \SynergiTech\Staffology\Model\AuditEventAction|null $actionPerformed actionPerformed * * @return $this */ - public function setId(?string $id): static + public function setActionPerformed(?\SynergiTech\Staffology\Model\AuditEventAction $actionPerformed): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($actionPerformed)) { + throw new InvalidArgumentException('non-nullable actionPerformed cannot be null'); } - $this->container['id'] = $id; + $this->container['actionPerformed'] = $actionPerformed; return $this; } /** - * Gets auditId + * Gets actionPerformedBy * * @return string|null */ - public function getAuditId(): ?string + public function getActionPerformedBy(): ?string { - return $this->container['auditId']; + return $this->container['actionPerformedBy']; } /** - * Sets auditId + * Sets actionPerformedBy * - * @param string|null $auditId auditId + * @param string|null $actionPerformedBy actionPerformedBy * * @return $this */ - public function setAuditId(?string $auditId): static + public function setActionPerformedBy(?string $actionPerformedBy): static { - if (is_null($auditId)) { - throw new InvalidArgumentException('non-nullable auditId cannot be null'); + if (is_null($actionPerformedBy)) { + array_push($this->openAPINullablesSetToNull, 'actionPerformedBy'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('actionPerformedBy', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['auditId'] = $auditId; + $this->container['actionPerformedBy'] = $actionPerformedBy; return $this; } /** - * Gets previousAuditId + * Gets actionPerformedOn * * @return string|null */ - public function getPreviousAuditId(): ?string + public function getActionPerformedOn(): ?string { - return $this->container['previousAuditId']; + return $this->container['actionPerformedOn']; } /** - * Sets previousAuditId + * Sets actionPerformedOn * - * @param string|null $previousAuditId This Id is used to delete the previous audit entry once the change summary entry is created for the modifications between the current and the previous audit entry. + * @param string|null $actionPerformedOn actionPerformedOn * * @return $this */ - public function setPreviousAuditId(?string $previousAuditId): static + public function setActionPerformedOn(?string $actionPerformedOn): static { - if (is_null($previousAuditId)) { - throw new InvalidArgumentException('non-nullable previousAuditId cannot be null'); + if (is_null($actionPerformedOn)) { + array_push($this->openAPINullablesSetToNull, 'actionPerformedOn'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('actionPerformedOn', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['previousAuditId'] = $previousAuditId; + $this->container['actionPerformedOn'] = $actionPerformedOn; return $this; } /** - * Gets date + * Gets auditId * - * @return \DateTime|null + * @return string|null */ - public function getDate(): ?\DateTime + public function getAuditId(): ?string { - return $this->container['date']; + return $this->container['auditId']; } /** - * Sets date + * Sets auditId * - * @param \DateTime|null $date date + * @param string|null $auditId auditId * * @return $this */ - public function setDate(?\DateTime $date): static + public function setAuditId(?string $auditId): static { - if (is_null($date)) { - throw new InvalidArgumentException('non-nullable date cannot be null'); + if (is_null($auditId)) { + throw new InvalidArgumentException('non-nullable auditId cannot be null'); } - $this->container['date'] = $date; + $this->container['auditId'] = $auditId; return $this; } /** - * Gets name + * Gets changeType * * @return string|null */ - public function getName(): ?string + public function getChangeType(): ?string { - return $this->container['name']; + return $this->container['changeType']; } /** - * Sets name + * Sets changeType * - * @param string|null $name name + * @param string|null $changeType changeType * * @return $this */ - public function setName(?string $name): static + public function setChangeType(?string $changeType): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($changeType)) { + array_push($this->openAPINullablesSetToNull, 'changeType'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('changeType', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['changeType'] = $changeType; return $this; } /** - * Gets actionPerformed + * Gets date * - * @return \SynergiTech\Staffology\Model\AuditEventAction|null + * @return \DateTime|null */ - public function getActionPerformed(): ?\SynergiTech\Staffology\Model\AuditEventAction + public function getDate(): ?\DateTime { - return $this->container['actionPerformed']; + return $this->container['date']; } /** - * Sets actionPerformed + * Sets date * - * @param \SynergiTech\Staffology\Model\AuditEventAction|null $actionPerformed actionPerformed + * @param \DateTime|null $date date * * @return $this */ - public function setActionPerformed(?\SynergiTech\Staffology\Model\AuditEventAction $actionPerformed): static + public function setDate(?\DateTime $date): static { - if (is_null($actionPerformed)) { - throw new InvalidArgumentException('non-nullable actionPerformed cannot be null'); + if (is_null($date)) { + throw new InvalidArgumentException('non-nullable date cannot be null'); } - $this->container['actionPerformed'] = $actionPerformed; + $this->container['date'] = $date; return $this; } /** - * Gets entityType + * Gets displayName * - * @return \SynergiTech\Staffology\Model\EntityType|null + * @return string|null */ - public function getEntityType(): ?\SynergiTech\Staffology\Model\EntityType + public function getDisplayName(): ?string { - return $this->container['entityType']; + return $this->container['displayName']; } /** - * Sets entityType + * Sets displayName * - * @param \SynergiTech\Staffology\Model\EntityType|null $entityType entityType + * @param string|null $displayName displayName * * @return $this */ - public function setEntityType(?\SynergiTech\Staffology\Model\EntityType $entityType): static + public function setDisplayName(?string $displayName): static { - if (is_null($entityType)) { - throw new InvalidArgumentException('non-nullable entityType cannot be null'); + if (is_null($displayName)) { + array_push($this->openAPINullablesSetToNull, 'displayName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('displayName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['entityType'] = $entityType; + $this->container['displayName'] = $displayName; return $this; } /** - * Gets entityId + * Gets employeeFirstName * * @return string|null */ - public function getEntityId(): ?string + public function getEmployeeFirstName(): ?string { - return $this->container['entityId']; + return $this->container['employeeFirstName']; } /** - * Sets entityId + * Sets employeeFirstName * - * @param string|null $entityId Id of the underlying entity + * @param string|null $employeeFirstName employeeFirstName * * @return $this */ - public function setEntityId(?string $entityId): static + public function setEmployeeFirstName(?string $employeeFirstName): static { - if (is_null($entityId)) { - throw new InvalidArgumentException('non-nullable entityId cannot be null'); + if (is_null($employeeFirstName)) { + array_push($this->openAPINullablesSetToNull, 'employeeFirstName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employeeFirstName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['entityId'] = $entityId; + $this->container['employeeFirstName'] = $employeeFirstName; + + return $this; + } + + /** + * Gets employeeLastName + * + * @return string|null + */ + public function getEmployeeLastName(): ?string + { + return $this->container['employeeLastName']; + } + + /** + * Sets employeeLastName + * + * @param string|null $employeeLastName employeeLastName + * + * @return $this + */ + public function setEmployeeLastName(?string $employeeLastName): static + { + if (is_null($employeeLastName)) { + array_push($this->openAPINullablesSetToNull, 'employeeLastName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employeeLastName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employeeLastName'] = $employeeLastName; return $this; } @@ -699,164 +761,150 @@ public function setEmployerUniqueId(?string $employerUniqueId): static } /** - * Gets actionPerformedBy + * Gets entityId * * @return string|null */ - public function getActionPerformedBy(): ?string + public function getEntityId(): ?string { - return $this->container['actionPerformedBy']; + return $this->container['entityId']; } /** - * Sets actionPerformedBy + * Sets entityId * - * @param string|null $actionPerformedBy actionPerformedBy + * @param string|null $entityId Id of the underlying entity * * @return $this */ - public function setActionPerformedBy(?string $actionPerformedBy): static + public function setEntityId(?string $entityId): static { - if (is_null($actionPerformedBy)) { - array_push($this->openAPINullablesSetToNull, 'actionPerformedBy'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('actionPerformedBy', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($entityId)) { + throw new InvalidArgumentException('non-nullable entityId cannot be null'); } - $this->container['actionPerformedBy'] = $actionPerformedBy; + $this->container['entityId'] = $entityId; return $this; } /** - * Gets actionPerformedOn + * Gets entityType * - * @return string|null + * @return \SynergiTech\Staffology\Model\EntityType|null */ - public function getActionPerformedOn(): ?string + public function getEntityType(): ?\SynergiTech\Staffology\Model\EntityType { - return $this->container['actionPerformedOn']; + return $this->container['entityType']; } /** - * Sets actionPerformedOn + * Sets entityType * - * @param string|null $actionPerformedOn actionPerformedOn + * @param \SynergiTech\Staffology\Model\EntityType|null $entityType entityType * * @return $this */ - public function setActionPerformedOn(?string $actionPerformedOn): static + public function setEntityType(?\SynergiTech\Staffology\Model\EntityType $entityType): static { - if (is_null($actionPerformedOn)) { - array_push($this->openAPINullablesSetToNull, 'actionPerformedOn'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('actionPerformedOn', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($entityType)) { + throw new InvalidArgumentException('non-nullable entityType cannot be null'); } - $this->container['actionPerformedOn'] = $actionPerformedOn; + $this->container['entityType'] = $entityType; return $this; } /** - * Gets employeeFirstName + * Gets id * * @return string|null */ - public function getEmployeeFirstName(): ?string + public function getId(): ?string { - return $this->container['employeeFirstName']; + return $this->container['id']; } /** - * Sets employeeFirstName + * Sets id * - * @param string|null $employeeFirstName employeeFirstName + * @param string|null $id id * * @return $this */ - public function setEmployeeFirstName(?string $employeeFirstName): static + public function setId(?string $id): static { - if (is_null($employeeFirstName)) { - array_push($this->openAPINullablesSetToNull, 'employeeFirstName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeeFirstName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['employeeFirstName'] = $employeeFirstName; + $this->container['id'] = $id; return $this; } /** - * Gets employeeLastName + * Gets modifications * - * @return string|null + * @return \SynergiTech\Staffology\Model\FieldModification[]|null */ - public function getEmployeeLastName(): ?string + public function getModifications(): ?array { - return $this->container['employeeLastName']; + return $this->container['modifications']; } /** - * Sets employeeLastName + * Sets modifications * - * @param string|null $employeeLastName employeeLastName + * @param \SynergiTech\Staffology\Model\FieldModification[]|null $modifications modifications * * @return $this */ - public function setEmployeeLastName(?string $employeeLastName): static + public function setModifications(?array $modifications): static { - if (is_null($employeeLastName)) { - array_push($this->openAPINullablesSetToNull, 'employeeLastName'); + if (is_null($modifications)) { + array_push($this->openAPINullablesSetToNull, 'modifications'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeeLastName', $nullablesSetToNull); + $index = array_search('modifications', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employeeLastName'] = $employeeLastName; + $this->container['modifications'] = $modifications; return $this; } /** - * Gets uniqueId + * Gets name * * @return string|null */ - public function getUniqueId(): ?string + public function getName(): ?string { - return $this->container['uniqueId']; + return $this->container['name']; } /** - * Sets uniqueId + * Sets name * - * @param string|null $uniqueId Unique id of the owner this request belongs to + * @param string|null $name name * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setName(?string $name): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['uniqueId'] = $uniqueId; + $this->container['name'] = $name; return $this; } @@ -895,40 +943,6 @@ public function setParentEventType(?string $parentEventType): static return $this; } - /** - * Gets displayName - * - * @return string|null - */ - public function getDisplayName(): ?string - { - return $this->container['displayName']; - } - - /** - * Sets displayName - * - * @param string|null $displayName displayName - * - * @return $this - */ - public function setDisplayName(?string $displayName): static - { - if (is_null($displayName)) { - array_push($this->openAPINullablesSetToNull, 'displayName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('displayName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['displayName'] = $displayName; - - return $this; - } - /** * Gets payRunPeriod * @@ -957,69 +971,55 @@ public function setPayRunPeriod(?int $payRunPeriod): static } /** - * Gets changeType + * Gets previousAuditId * * @return string|null */ - public function getChangeType(): ?string + public function getPreviousAuditId(): ?string { - return $this->container['changeType']; + return $this->container['previousAuditId']; } /** - * Sets changeType + * Sets previousAuditId * - * @param string|null $changeType changeType + * @param string|null $previousAuditId This Id is used to delete the previous audit entry once the change summary entry is created for the modifications between the current and the previous audit entry. * * @return $this */ - public function setChangeType(?string $changeType): static + public function setPreviousAuditId(?string $previousAuditId): static { - if (is_null($changeType)) { - array_push($this->openAPINullablesSetToNull, 'changeType'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('changeType', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($previousAuditId)) { + throw new InvalidArgumentException('non-nullable previousAuditId cannot be null'); } - $this->container['changeType'] = $changeType; + $this->container['previousAuditId'] = $previousAuditId; return $this; } /** - * Gets modifications + * Gets uniqueId * - * @return \SynergiTech\Staffology\Model\FieldModification[]|null + * @return string|null */ - public function getModifications(): ?array + public function getUniqueId(): ?string { - return $this->container['modifications']; + return $this->container['uniqueId']; } /** - * Sets modifications + * Sets uniqueId * - * @param \SynergiTech\Staffology\Model\FieldModification[]|null $modifications modifications + * @param string|null $uniqueId Unique id of the owner this request belongs to * * @return $this */ - public function setModifications(?array $modifications): static + public function setUniqueId(?string $uniqueId): static { - if (is_null($modifications)) { - array_push($this->openAPINullablesSetToNull, 'modifications'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('modifications', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); } - $this->container['modifications'] = $modifications; + $this->container['uniqueId'] = $uniqueId; return $this; } diff --git a/src/Model/ChangeSummaryListReportResponse.php b/src/Model/ChangeSummaryListReportResponse.php index 1399fba..8846d9f 100644 --- a/src/Model/ChangeSummaryListReportResponse.php +++ b/src/Model/ChangeSummaryListReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class ChangeSummaryListReportResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\ChangeSummary[]', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class ChangeSummaryListReportResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class ChangeSummaryListReportResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => true, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -445,6 +411,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/Cis300.php b/src/Model/Cis300.php index 50e6354..77c86ab 100644 --- a/src/Model/Cis300.php +++ b/src/Model/Cis300.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,19 +59,19 @@ class Cis300 implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'taxMonth' => 'int', + 'cisReturn' => '\SynergiTech\Staffology\Model\CisReturn', 'employeeCount' => 'int', + 'employerReferences' => '\SynergiTech\Staffology\Model\EmpRefs', 'employmentStatusDeclaration' => 'bool', - 'verificationDeclaration' => 'bool', - 'informationCorrectDeclaration' => 'bool', - 'inactivityDeclaration' => 'bool', - 'cisReturn' => '\SynergiTech\Staffology\Model\CisReturn', + 'govTalkSubmission' => '\SynergiTech\Staffology\Model\GovTalkSubmission', 'iRmark' => 'string', - 'xml' => 'string', + 'id' => 'string', + 'inactivityDeclaration' => 'bool', + 'informationCorrectDeclaration' => 'bool', + 'taxMonth' => 'int', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'employerReferences' => '\SynergiTech\Staffology\Model\EmpRefs', - 'govTalkSubmission' => '\SynergiTech\Staffology\Model\GovTalkSubmission', - 'id' => 'string' + 'verificationDeclaration' => 'bool', + 'xml' => 'string' ]; /** @@ -80,19 +80,19 @@ class Cis300 implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'taxMonth' => 'int32', + 'cisReturn' => null, 'employeeCount' => 'int32', + 'employerReferences' => null, 'employmentStatusDeclaration' => null, - 'verificationDeclaration' => null, - 'informationCorrectDeclaration' => null, - 'inactivityDeclaration' => null, - 'cisReturn' => null, + 'govTalkSubmission' => null, 'iRmark' => null, - 'xml' => null, + 'id' => 'uuid', + 'inactivityDeclaration' => null, + 'informationCorrectDeclaration' => null, + 'taxMonth' => 'int32', 'taxYear' => null, - 'employerReferences' => null, - 'govTalkSubmission' => null, - 'id' => 'uuid' + 'verificationDeclaration' => null, + 'xml' => null ]; /** @@ -101,19 +101,19 @@ class Cis300 implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'taxMonth' => false, + 'cisReturn' => false, 'employeeCount' => false, + 'employerReferences' => false, 'employmentStatusDeclaration' => false, - 'verificationDeclaration' => false, - 'informationCorrectDeclaration' => false, - 'inactivityDeclaration' => false, - 'cisReturn' => false, + 'govTalkSubmission' => false, 'iRmark' => true, - 'xml' => true, + 'id' => false, + 'inactivityDeclaration' => false, + 'informationCorrectDeclaration' => false, + 'taxMonth' => false, 'taxYear' => false, - 'employerReferences' => false, - 'govTalkSubmission' => false, - 'id' => false + 'verificationDeclaration' => false, + 'xml' => true ]; /** @@ -202,19 +202,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'taxMonth' => 'taxMonth', + 'cisReturn' => 'cisReturn', 'employeeCount' => 'employeeCount', + 'employerReferences' => 'employerReferences', 'employmentStatusDeclaration' => 'employmentStatusDeclaration', - 'verificationDeclaration' => 'verificationDeclaration', - 'informationCorrectDeclaration' => 'informationCorrectDeclaration', - 'inactivityDeclaration' => 'inactivityDeclaration', - 'cisReturn' => 'cisReturn', + 'govTalkSubmission' => 'govTalkSubmission', 'iRmark' => 'iRmark', - 'xml' => 'xml', + 'id' => 'id', + 'inactivityDeclaration' => 'inactivityDeclaration', + 'informationCorrectDeclaration' => 'informationCorrectDeclaration', + 'taxMonth' => 'taxMonth', 'taxYear' => 'taxYear', - 'employerReferences' => 'employerReferences', - 'govTalkSubmission' => 'govTalkSubmission', - 'id' => 'id' + 'verificationDeclaration' => 'verificationDeclaration', + 'xml' => 'xml' ]; /** @@ -223,19 +223,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'taxMonth' => 'setTaxMonth', + 'cisReturn' => 'setCisReturn', 'employeeCount' => 'setEmployeeCount', + 'employerReferences' => 'setEmployerReferences', 'employmentStatusDeclaration' => 'setEmploymentStatusDeclaration', - 'verificationDeclaration' => 'setVerificationDeclaration', - 'informationCorrectDeclaration' => 'setInformationCorrectDeclaration', - 'inactivityDeclaration' => 'setInactivityDeclaration', - 'cisReturn' => 'setCisReturn', + 'govTalkSubmission' => 'setGovTalkSubmission', 'iRmark' => 'setIRmark', - 'xml' => 'setXml', + 'id' => 'setId', + 'inactivityDeclaration' => 'setInactivityDeclaration', + 'informationCorrectDeclaration' => 'setInformationCorrectDeclaration', + 'taxMonth' => 'setTaxMonth', 'taxYear' => 'setTaxYear', - 'employerReferences' => 'setEmployerReferences', - 'govTalkSubmission' => 'setGovTalkSubmission', - 'id' => 'setId' + 'verificationDeclaration' => 'setVerificationDeclaration', + 'xml' => 'setXml' ]; /** @@ -244,19 +244,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'taxMonth' => 'getTaxMonth', + 'cisReturn' => 'getCisReturn', 'employeeCount' => 'getEmployeeCount', + 'employerReferences' => 'getEmployerReferences', 'employmentStatusDeclaration' => 'getEmploymentStatusDeclaration', - 'verificationDeclaration' => 'getVerificationDeclaration', - 'informationCorrectDeclaration' => 'getInformationCorrectDeclaration', - 'inactivityDeclaration' => 'getInactivityDeclaration', - 'cisReturn' => 'getCisReturn', + 'govTalkSubmission' => 'getGovTalkSubmission', 'iRmark' => 'getIRmark', - 'xml' => 'getXml', + 'id' => 'getId', + 'inactivityDeclaration' => 'getInactivityDeclaration', + 'informationCorrectDeclaration' => 'getInformationCorrectDeclaration', + 'taxMonth' => 'getTaxMonth', 'taxYear' => 'getTaxYear', - 'employerReferences' => 'getEmployerReferences', - 'govTalkSubmission' => 'getGovTalkSubmission', - 'id' => 'getId' + 'verificationDeclaration' => 'getVerificationDeclaration', + 'xml' => 'getXml' ]; /** @@ -315,19 +315,19 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('taxMonth', $data ?? [], null); - $this->setIfExists('employeeCount', $data ?? [], null); - $this->setIfExists('employmentStatusDeclaration', $data ?? [], null); - $this->setIfExists('verificationDeclaration', $data ?? [], null); - $this->setIfExists('informationCorrectDeclaration', $data ?? [], null); - $this->setIfExists('inactivityDeclaration', $data ?? [], null); $this->setIfExists('cisReturn', $data ?? [], null); - $this->setIfExists('iRmark', $data ?? [], null); - $this->setIfExists('xml', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('employeeCount', $data ?? [], null); $this->setIfExists('employerReferences', $data ?? [], null); + $this->setIfExists('employmentStatusDeclaration', $data ?? [], null); $this->setIfExists('govTalkSubmission', $data ?? [], null); + $this->setIfExists('iRmark', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('inactivityDeclaration', $data ?? [], null); + $this->setIfExists('informationCorrectDeclaration', $data ?? [], null); + $this->setIfExists('taxMonth', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('verificationDeclaration', $data ?? [], null); + $this->setIfExists('xml', $data ?? [], null); } /** @@ -373,28 +373,28 @@ public function valid(): bool /** - * Gets taxMonth + * Gets cisReturn * - * @return int|null + * @return \SynergiTech\Staffology\Model\CisReturn|null */ - public function getTaxMonth(): ?int + public function getCisReturn(): ?\SynergiTech\Staffology\Model\CisReturn { - return $this->container['taxMonth']; + return $this->container['cisReturn']; } /** - * Sets taxMonth + * Sets cisReturn * - * @param int|null $taxMonth taxMonth + * @param \SynergiTech\Staffology\Model\CisReturn|null $cisReturn cisReturn * * @return $this */ - public function setTaxMonth(?int $taxMonth): static + public function setCisReturn(?\SynergiTech\Staffology\Model\CisReturn $cisReturn): static { - if (is_null($taxMonth)) { - throw new InvalidArgumentException('non-nullable taxMonth cannot be null'); + if (is_null($cisReturn)) { + throw new InvalidArgumentException('non-nullable cisReturn cannot be null'); } - $this->container['taxMonth'] = $taxMonth; + $this->container['cisReturn'] = $cisReturn; return $this; } @@ -426,6 +426,33 @@ public function setEmployeeCount(?int $employeeCount): static return $this; } + /** + * Gets employerReferences + * + * @return \SynergiTech\Staffology\Model\EmpRefs|null + */ + public function getEmployerReferences(): ?\SynergiTech\Staffology\Model\EmpRefs + { + return $this->container['employerReferences']; + } + + /** + * Sets employerReferences + * + * @param \SynergiTech\Staffology\Model\EmpRefs|null $employerReferences employerReferences + * + * @return $this + */ + public function setEmployerReferences(?\SynergiTech\Staffology\Model\EmpRefs $employerReferences): static + { + if (is_null($employerReferences)) { + throw new InvalidArgumentException('non-nullable employerReferences cannot be null'); + } + $this->container['employerReferences'] = $employerReferences; + + return $this; + } + /** * Gets employmentStatusDeclaration * @@ -454,177 +481,170 @@ public function setEmploymentStatusDeclaration(?bool $employmentStatusDeclaratio } /** - * Gets verificationDeclaration + * Gets govTalkSubmission * - * @return bool|null + * @return \SynergiTech\Staffology\Model\GovTalkSubmission|null */ - public function getVerificationDeclaration(): ?bool + public function getGovTalkSubmission(): ?\SynergiTech\Staffology\Model\GovTalkSubmission { - return $this->container['verificationDeclaration']; + return $this->container['govTalkSubmission']; } /** - * Sets verificationDeclaration + * Sets govTalkSubmission * - * @param bool|null $verificationDeclaration verificationDeclaration + * @param \SynergiTech\Staffology\Model\GovTalkSubmission|null $govTalkSubmission govTalkSubmission * * @return $this */ - public function setVerificationDeclaration(?bool $verificationDeclaration): static + public function setGovTalkSubmission(?\SynergiTech\Staffology\Model\GovTalkSubmission $govTalkSubmission): static { - if (is_null($verificationDeclaration)) { - throw new InvalidArgumentException('non-nullable verificationDeclaration cannot be null'); + if (is_null($govTalkSubmission)) { + throw new InvalidArgumentException('non-nullable govTalkSubmission cannot be null'); } - $this->container['verificationDeclaration'] = $verificationDeclaration; + $this->container['govTalkSubmission'] = $govTalkSubmission; return $this; } /** - * Gets informationCorrectDeclaration + * Gets iRmark * - * @return bool|null + * @return string|null */ - public function getInformationCorrectDeclaration(): ?bool + public function getIRmark(): ?string { - return $this->container['informationCorrectDeclaration']; + return $this->container['iRmark']; } /** - * Sets informationCorrectDeclaration + * Sets iRmark * - * @param bool|null $informationCorrectDeclaration informationCorrectDeclaration + * @param string|null $iRmark iRmark * * @return $this */ - public function setInformationCorrectDeclaration(?bool $informationCorrectDeclaration): static + public function setIRmark(?string $iRmark): static { - if (is_null($informationCorrectDeclaration)) { - throw new InvalidArgumentException('non-nullable informationCorrectDeclaration cannot be null'); + if (is_null($iRmark)) { + array_push($this->openAPINullablesSetToNull, 'iRmark'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('iRmark', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['informationCorrectDeclaration'] = $informationCorrectDeclaration; + $this->container['iRmark'] = $iRmark; return $this; } /** - * Gets inactivityDeclaration + * Gets id * - * @return bool|null + * @return string|null */ - public function getInactivityDeclaration(): ?bool + public function getId(): ?string { - return $this->container['inactivityDeclaration']; + return $this->container['id']; } /** - * Sets inactivityDeclaration + * Sets id * - * @param bool|null $inactivityDeclaration inactivityDeclaration + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setInactivityDeclaration(?bool $inactivityDeclaration): static + public function setId(?string $id): static { - if (is_null($inactivityDeclaration)) { - throw new InvalidArgumentException('non-nullable inactivityDeclaration cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['inactivityDeclaration'] = $inactivityDeclaration; + $this->container['id'] = $id; return $this; } /** - * Gets cisReturn + * Gets inactivityDeclaration * - * @return \SynergiTech\Staffology\Model\CisReturn|null + * @return bool|null */ - public function getCisReturn(): ?\SynergiTech\Staffology\Model\CisReturn + public function getInactivityDeclaration(): ?bool { - return $this->container['cisReturn']; + return $this->container['inactivityDeclaration']; } /** - * Sets cisReturn + * Sets inactivityDeclaration * - * @param \SynergiTech\Staffology\Model\CisReturn|null $cisReturn cisReturn + * @param bool|null $inactivityDeclaration inactivityDeclaration * * @return $this */ - public function setCisReturn(?\SynergiTech\Staffology\Model\CisReturn $cisReturn): static + public function setInactivityDeclaration(?bool $inactivityDeclaration): static { - if (is_null($cisReturn)) { - throw new InvalidArgumentException('non-nullable cisReturn cannot be null'); + if (is_null($inactivityDeclaration)) { + throw new InvalidArgumentException('non-nullable inactivityDeclaration cannot be null'); } - $this->container['cisReturn'] = $cisReturn; + $this->container['inactivityDeclaration'] = $inactivityDeclaration; return $this; } /** - * Gets iRmark + * Gets informationCorrectDeclaration * - * @return string|null + * @return bool|null */ - public function getIRmark(): ?string + public function getInformationCorrectDeclaration(): ?bool { - return $this->container['iRmark']; + return $this->container['informationCorrectDeclaration']; } /** - * Sets iRmark + * Sets informationCorrectDeclaration * - * @param string|null $iRmark iRmark + * @param bool|null $informationCorrectDeclaration informationCorrectDeclaration * * @return $this */ - public function setIRmark(?string $iRmark): static + public function setInformationCorrectDeclaration(?bool $informationCorrectDeclaration): static { - if (is_null($iRmark)) { - array_push($this->openAPINullablesSetToNull, 'iRmark'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('iRmark', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($informationCorrectDeclaration)) { + throw new InvalidArgumentException('non-nullable informationCorrectDeclaration cannot be null'); } - $this->container['iRmark'] = $iRmark; + $this->container['informationCorrectDeclaration'] = $informationCorrectDeclaration; return $this; } /** - * Gets xml + * Gets taxMonth * - * @return string|null + * @return int|null */ - public function getXml(): ?string + public function getTaxMonth(): ?int { - return $this->container['xml']; + return $this->container['taxMonth']; } /** - * Sets xml + * Sets taxMonth * - * @param string|null $xml This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. + * @param int|null $taxMonth taxMonth * * @return $this */ - public function setXml(?string $xml): static + public function setTaxMonth(?int $taxMonth): static { - if (is_null($xml)) { - array_push($this->openAPINullablesSetToNull, 'xml'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('xml', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($taxMonth)) { + throw new InvalidArgumentException('non-nullable taxMonth cannot be null'); } - $this->container['xml'] = $xml; + $this->container['taxMonth'] = $taxMonth; return $this; } @@ -657,82 +677,62 @@ public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): sta } /** - * Gets employerReferences - * - * @return \SynergiTech\Staffology\Model\EmpRefs|null - */ - public function getEmployerReferences(): ?\SynergiTech\Staffology\Model\EmpRefs - { - return $this->container['employerReferences']; - } - - /** - * Sets employerReferences - * - * @param \SynergiTech\Staffology\Model\EmpRefs|null $employerReferences employerReferences - * - * @return $this - */ - public function setEmployerReferences(?\SynergiTech\Staffology\Model\EmpRefs $employerReferences): static - { - if (is_null($employerReferences)) { - throw new InvalidArgumentException('non-nullable employerReferences cannot be null'); - } - $this->container['employerReferences'] = $employerReferences; - - return $this; - } - - /** - * Gets govTalkSubmission + * Gets verificationDeclaration * - * @return \SynergiTech\Staffology\Model\GovTalkSubmission|null + * @return bool|null */ - public function getGovTalkSubmission(): ?\SynergiTech\Staffology\Model\GovTalkSubmission + public function getVerificationDeclaration(): ?bool { - return $this->container['govTalkSubmission']; + return $this->container['verificationDeclaration']; } /** - * Sets govTalkSubmission + * Sets verificationDeclaration * - * @param \SynergiTech\Staffology\Model\GovTalkSubmission|null $govTalkSubmission govTalkSubmission + * @param bool|null $verificationDeclaration verificationDeclaration * * @return $this */ - public function setGovTalkSubmission(?\SynergiTech\Staffology\Model\GovTalkSubmission $govTalkSubmission): static + public function setVerificationDeclaration(?bool $verificationDeclaration): static { - if (is_null($govTalkSubmission)) { - throw new InvalidArgumentException('non-nullable govTalkSubmission cannot be null'); + if (is_null($verificationDeclaration)) { + throw new InvalidArgumentException('non-nullable verificationDeclaration cannot be null'); } - $this->container['govTalkSubmission'] = $govTalkSubmission; + $this->container['verificationDeclaration'] = $verificationDeclaration; return $this; } /** - * Gets id + * Gets xml * * @return string|null */ - public function getId(): ?string + public function getXml(): ?string { - return $this->container['id']; + return $this->container['xml']; } /** - * Sets id + * Sets xml * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $xml This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. * * @return $this */ - public function setId(?string $id): static + public function setXml(?string $xml): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($xml)) { + array_push($this->openAPINullablesSetToNull, 'xml'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('xml', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['xml'] = $xml; return $this; } diff --git a/src/Model/Cis300Declarations.php b/src/Model/Cis300Declarations.php index b880a6b..d9e70ef 100644 --- a/src/Model/Cis300Declarations.php +++ b/src/Model/Cis300Declarations.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,9 +60,9 @@ class Cis300Declarations implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPITypes = [ 'employmentStatus' => 'string', - 'verification' => 'string', + 'inactivity' => 'string', 'informationCorrect' => 'string', - 'inactivity' => 'string' + 'verification' => 'string' ]; /** @@ -72,9 +72,9 @@ class Cis300Declarations implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPIFormats = [ 'employmentStatus' => null, - 'verification' => null, + 'inactivity' => null, 'informationCorrect' => null, - 'inactivity' => null + 'verification' => null ]; /** @@ -84,9 +84,9 @@ class Cis300Declarations implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPINullables = [ 'employmentStatus' => true, - 'verification' => true, + 'inactivity' => true, 'informationCorrect' => true, - 'inactivity' => true + 'verification' => true ]; /** @@ -176,9 +176,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'employmentStatus' => 'employmentStatus', - 'verification' => 'verification', + 'inactivity' => 'inactivity', 'informationCorrect' => 'informationCorrect', - 'inactivity' => 'inactivity' + 'verification' => 'verification' ]; /** @@ -188,9 +188,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'employmentStatus' => 'setEmploymentStatus', - 'verification' => 'setVerification', + 'inactivity' => 'setInactivity', 'informationCorrect' => 'setInformationCorrect', - 'inactivity' => 'setInactivity' + 'verification' => 'setVerification' ]; /** @@ -200,9 +200,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'employmentStatus' => 'getEmploymentStatus', - 'verification' => 'getVerification', + 'inactivity' => 'getInactivity', 'informationCorrect' => 'getInformationCorrect', - 'inactivity' => 'getInactivity' + 'verification' => 'getVerification' ]; /** @@ -262,9 +262,9 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('employmentStatus', $data ?? [], null); - $this->setIfExists('verification', $data ?? [], null); - $this->setIfExists('informationCorrect', $data ?? [], null); $this->setIfExists('inactivity', $data ?? [], null); + $this->setIfExists('informationCorrect', $data ?? [], null); + $this->setIfExists('verification', $data ?? [], null); } /** @@ -344,35 +344,35 @@ public function setEmploymentStatus(?string $employmentStatus): static } /** - * Gets verification + * Gets inactivity * * @return string|null */ - public function getVerification(): ?string + public function getInactivity(): ?string { - return $this->container['verification']; + return $this->container['inactivity']; } /** - * Sets verification + * Sets inactivity * - * @param string|null $verification verification + * @param string|null $inactivity inactivity * * @return $this */ - public function setVerification(?string $verification): static + public function setInactivity(?string $inactivity): static { - if (is_null($verification)) { - array_push($this->openAPINullablesSetToNull, 'verification'); + if (is_null($inactivity)) { + array_push($this->openAPINullablesSetToNull, 'inactivity'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('verification', $nullablesSetToNull); + $index = array_search('inactivity', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['verification'] = $verification; + $this->container['inactivity'] = $inactivity; return $this; } @@ -412,35 +412,35 @@ public function setInformationCorrect(?string $informationCorrect): static } /** - * Gets inactivity + * Gets verification * * @return string|null */ - public function getInactivity(): ?string + public function getVerification(): ?string { - return $this->container['inactivity']; + return $this->container['verification']; } /** - * Sets inactivity + * Sets verification * - * @param string|null $inactivity inactivity + * @param string|null $verification verification * * @return $this */ - public function setInactivity(?string $inactivity): static + public function setVerification(?string $verification): static { - if (is_null($inactivity)) { - array_push($this->openAPINullablesSetToNull, 'inactivity'); + if (is_null($verification)) { + array_push($this->openAPINullablesSetToNull, 'verification'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('inactivity', $nullablesSetToNull); + $index = array_search('verification', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['inactivity'] = $inactivity; + $this->container['verification'] = $verification; return $this; } diff --git a/src/Model/Cis300ReportResponse.php b/src/Model/Cis300ReportResponse.php index 820ec7f..343d593 100644 --- a/src/Model/Cis300ReportResponse.php +++ b/src/Model/Cis300ReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class Cis300ReportResponse implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\Cis300', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class Cis300ReportResponse implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class Cis300ReportResponse implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/CisContractor.php b/src/Model/CisContractor.php index 7bbbfc0..4b9ebee 100644 --- a/src/Model/CisContractor.php +++ b/src/Model/CisContractor.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class CisContractor implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'utr' => 'string', - 'aOref' => 'string' + 'aOref' => 'string', + 'utr' => 'string' ]; /** @@ -70,8 +70,8 @@ class CisContractor implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'utr' => null, - 'aOref' => null + 'aOref' => null, + 'utr' => null ]; /** @@ -80,8 +80,8 @@ class CisContractor implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'utr' => true, - 'aOref' => true + 'aOref' => true, + 'utr' => true ]; /** @@ -170,8 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'utr' => 'utr', - 'aOref' => 'aOref' + 'aOref' => 'aOref', + 'utr' => 'utr' ]; /** @@ -180,8 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'utr' => 'setUtr', - 'aOref' => 'setAOref' + 'aOref' => 'setAOref', + 'utr' => 'setUtr' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'utr' => 'getUtr', - 'aOref' => 'getAOref' + 'aOref' => 'getAOref', + 'utr' => 'getUtr' ]; /** @@ -250,8 +250,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('utr', $data ?? [], null); $this->setIfExists('aOref', $data ?? [], null); + $this->setIfExists('utr', $data ?? [], null); } /** @@ -297,69 +297,69 @@ public function valid(): bool /** - * Gets utr + * Gets aOref * * @return string|null */ - public function getUtr(): ?string + public function getAOref(): ?string { - return $this->container['utr']; + return $this->container['aOref']; } /** - * Sets utr + * Sets aOref * - * @param string|null $utr utr + * @param string|null $aOref aOref * * @return $this */ - public function setUtr(?string $utr): static + public function setAOref(?string $aOref): static { - if (is_null($utr)) { - array_push($this->openAPINullablesSetToNull, 'utr'); + if (is_null($aOref)) { + array_push($this->openAPINullablesSetToNull, 'aOref'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('utr', $nullablesSetToNull); + $index = array_search('aOref', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['utr'] = $utr; + $this->container['aOref'] = $aOref; return $this; } /** - * Gets aOref + * Gets utr * * @return string|null */ - public function getAOref(): ?string + public function getUtr(): ?string { - return $this->container['aOref']; + return $this->container['utr']; } /** - * Sets aOref + * Sets utr * - * @param string|null $aOref aOref + * @param string|null $utr utr * * @return $this */ - public function setAOref(?string $aOref): static + public function setUtr(?string $utr): static { - if (is_null($aOref)) { - array_push($this->openAPINullablesSetToNull, 'aOref'); + if (is_null($utr)) { + array_push($this->openAPINullablesSetToNull, 'utr'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aOref', $nullablesSetToNull); + $index = array_search('utr', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['aOref'] = $aOref; + $this->container['utr'] = $utr; return $this; } diff --git a/src/Model/CisDetails.php b/src/Model/CisDetails.php index 9977f60..5611e7e 100644 --- a/src/Model/CisDetails.php +++ b/src/Model/CisDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,15 +60,15 @@ class CisDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'companyNumber' => 'string', + 'companyUtr' => 'string', + 'reverseChargeVAT' => 'bool', + 'tradingName' => 'string', 'type' => '\SynergiTech\Staffology\Model\CISSubContractorType', 'utr' => 'string', - 'tradingName' => 'string', - 'companyUtr' => 'string', - 'companyNumber' => 'string', - 'vatRegistered' => 'bool', 'vatNumber' => 'string', 'vatRate' => 'float', - 'reverseChargeVAT' => 'bool', + 'vatRegistered' => 'bool', 'verification' => '\SynergiTech\Staffology\Model\CisVerificationDetails' ]; @@ -78,15 +78,15 @@ class CisDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'companyNumber' => null, + 'companyUtr' => null, + 'reverseChargeVAT' => null, + 'tradingName' => null, 'type' => null, 'utr' => null, - 'tradingName' => null, - 'companyUtr' => null, - 'companyNumber' => null, - 'vatRegistered' => null, 'vatNumber' => null, 'vatRate' => 'double', - 'reverseChargeVAT' => null, + 'vatRegistered' => null, 'verification' => null ]; @@ -96,15 +96,15 @@ class CisDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'companyNumber' => true, + 'companyUtr' => true, + 'reverseChargeVAT' => false, + 'tradingName' => true, 'type' => false, 'utr' => true, - 'tradingName' => true, - 'companyUtr' => true, - 'companyNumber' => true, - 'vatRegistered' => false, 'vatNumber' => true, 'vatRate' => false, - 'reverseChargeVAT' => false, + 'vatRegistered' => false, 'verification' => false ]; @@ -194,15 +194,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'companyNumber' => 'companyNumber', + 'companyUtr' => 'companyUtr', + 'reverseChargeVAT' => 'reverseChargeVAT', + 'tradingName' => 'tradingName', 'type' => 'type', 'utr' => 'utr', - 'tradingName' => 'tradingName', - 'companyUtr' => 'companyUtr', - 'companyNumber' => 'companyNumber', - 'vatRegistered' => 'vatRegistered', 'vatNumber' => 'vatNumber', 'vatRate' => 'vatRate', - 'reverseChargeVAT' => 'reverseChargeVAT', + 'vatRegistered' => 'vatRegistered', 'verification' => 'verification' ]; @@ -212,15 +212,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'companyNumber' => 'setCompanyNumber', + 'companyUtr' => 'setCompanyUtr', + 'reverseChargeVAT' => 'setReverseChargeVAT', + 'tradingName' => 'setTradingName', 'type' => 'setType', 'utr' => 'setUtr', - 'tradingName' => 'setTradingName', - 'companyUtr' => 'setCompanyUtr', - 'companyNumber' => 'setCompanyNumber', - 'vatRegistered' => 'setVatRegistered', 'vatNumber' => 'setVatNumber', 'vatRate' => 'setVatRate', - 'reverseChargeVAT' => 'setReverseChargeVAT', + 'vatRegistered' => 'setVatRegistered', 'verification' => 'setVerification' ]; @@ -230,15 +230,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'companyNumber' => 'getCompanyNumber', + 'companyUtr' => 'getCompanyUtr', + 'reverseChargeVAT' => 'getReverseChargeVAT', + 'tradingName' => 'getTradingName', 'type' => 'getType', 'utr' => 'getUtr', - 'tradingName' => 'getTradingName', - 'companyUtr' => 'getCompanyUtr', - 'companyNumber' => 'getCompanyNumber', - 'vatRegistered' => 'getVatRegistered', 'vatNumber' => 'getVatNumber', 'vatRate' => 'getVatRate', - 'reverseChargeVAT' => 'getReverseChargeVAT', + 'vatRegistered' => 'getVatRegistered', 'verification' => 'getVerification' ]; @@ -298,15 +298,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('companyNumber', $data ?? [], null); + $this->setIfExists('companyUtr', $data ?? [], null); + $this->setIfExists('reverseChargeVAT', $data ?? [], null); + $this->setIfExists('tradingName', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('utr', $data ?? [], null); - $this->setIfExists('tradingName', $data ?? [], null); - $this->setIfExists('companyUtr', $data ?? [], null); - $this->setIfExists('companyNumber', $data ?? [], null); - $this->setIfExists('vatRegistered', $data ?? [], null); $this->setIfExists('vatNumber', $data ?? [], null); $this->setIfExists('vatRate', $data ?? [], null); - $this->setIfExists('reverseChargeVAT', $data ?? [], null); + $this->setIfExists('vatRegistered', $data ?? [], null); $this->setIfExists('verification', $data ?? [], null); } @@ -337,20 +337,20 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (!is_null($this->container['utr']) && (mb_strlen($this->container['utr']) > 20)) { - $invalidProperties[] = "invalid value for 'utr', the character length must be smaller than or equal to 20."; - } - - if (!is_null($this->container['tradingName']) && (mb_strlen($this->container['tradingName']) > 200)) { - $invalidProperties[] = "invalid value for 'tradingName', the character length must be smaller than or equal to 200."; + if (!is_null($this->container['companyNumber']) && (mb_strlen($this->container['companyNumber']) > 20)) { + $invalidProperties[] = "invalid value for 'companyNumber', the character length must be smaller than or equal to 20."; } if (!is_null($this->container['companyUtr']) && (mb_strlen($this->container['companyUtr']) > 20)) { $invalidProperties[] = "invalid value for 'companyUtr', the character length must be smaller than or equal to 20."; } - if (!is_null($this->container['companyNumber']) && (mb_strlen($this->container['companyNumber']) > 20)) { - $invalidProperties[] = "invalid value for 'companyNumber', the character length must be smaller than or equal to 20."; + if (!is_null($this->container['tradingName']) && (mb_strlen($this->container['tradingName']) > 200)) { + $invalidProperties[] = "invalid value for 'tradingName', the character length must be smaller than or equal to 200."; + } + + if (!is_null($this->container['utr']) && (mb_strlen($this->container['utr']) > 20)) { + $invalidProperties[] = "invalid value for 'utr', the character length must be smaller than or equal to 20."; } if (!is_null($this->container['vatNumber']) && (mb_strlen($this->container['vatNumber']) > 20)) { @@ -373,66 +373,104 @@ public function valid(): bool /** - * Gets type + * Gets companyNumber * - * @return \SynergiTech\Staffology\Model\CISSubContractorType|null + * @return string|null */ - public function getType(): ?\SynergiTech\Staffology\Model\CISSubContractorType + public function getCompanyNumber(): ?string { - return $this->container['type']; + return $this->container['companyNumber']; } /** - * Sets type + * Sets companyNumber * - * @param \SynergiTech\Staffology\Model\CISSubContractorType|null $type type + * @param string|null $companyNumber companyNumber * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\CISSubContractorType $type): static + public function setCompanyNumber(?string $companyNumber): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($companyNumber)) { + array_push($this->openAPINullablesSetToNull, 'companyNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('companyNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['type'] = $type; + if (!is_null($companyNumber) && (mb_strlen($companyNumber) > 20)) { + throw new InvalidArgumentException('invalid length for $companyNumber when calling CisDetails., must be smaller than or equal to 20.'); + } + + $this->container['companyNumber'] = $companyNumber; return $this; } /** - * Gets utr + * Gets companyUtr * * @return string|null */ - public function getUtr(): ?string + public function getCompanyUtr(): ?string { - return $this->container['utr']; + return $this->container['companyUtr']; } /** - * Sets utr + * Sets companyUtr * - * @param string|null $utr utr + * @param string|null $companyUtr companyUtr * * @return $this */ - public function setUtr(?string $utr): static + public function setCompanyUtr(?string $companyUtr): static { - if (is_null($utr)) { - array_push($this->openAPINullablesSetToNull, 'utr'); + if (is_null($companyUtr)) { + array_push($this->openAPINullablesSetToNull, 'companyUtr'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('utr', $nullablesSetToNull); + $index = array_search('companyUtr', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($utr) && (mb_strlen($utr) > 20)) { - throw new InvalidArgumentException('invalid length for $utr when calling CisDetails., must be smaller than or equal to 20.'); + if (!is_null($companyUtr) && (mb_strlen($companyUtr) > 20)) { + throw new InvalidArgumentException('invalid length for $companyUtr when calling CisDetails., must be smaller than or equal to 20.'); } - $this->container['utr'] = $utr; + $this->container['companyUtr'] = $companyUtr; + + return $this; + } + + /** + * Gets reverseChargeVAT + * + * @return bool|null + */ + public function getReverseChargeVAT(): ?bool + { + return $this->container['reverseChargeVAT']; + } + + /** + * Sets reverseChargeVAT + * + * @param bool|null $reverseChargeVAT reverseChargeVAT + * + * @return $this + */ + public function setReverseChargeVAT(?bool $reverseChargeVAT): static + { + if (is_null($reverseChargeVAT)) { + throw new InvalidArgumentException('non-nullable reverseChargeVAT cannot be null'); + } + $this->container['reverseChargeVAT'] = $reverseChargeVAT; return $this; } @@ -476,104 +514,66 @@ public function setTradingName(?string $tradingName): static } /** - * Gets companyUtr + * Gets type * - * @return string|null + * @return \SynergiTech\Staffology\Model\CISSubContractorType|null */ - public function getCompanyUtr(): ?string + public function getType(): ?\SynergiTech\Staffology\Model\CISSubContractorType { - return $this->container['companyUtr']; + return $this->container['type']; } /** - * Sets companyUtr + * Sets type * - * @param string|null $companyUtr companyUtr + * @param \SynergiTech\Staffology\Model\CISSubContractorType|null $type type * * @return $this */ - public function setCompanyUtr(?string $companyUtr): static + public function setType(?\SynergiTech\Staffology\Model\CISSubContractorType $type): static { - if (is_null($companyUtr)) { - array_push($this->openAPINullablesSetToNull, 'companyUtr'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('companyUtr', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($companyUtr) && (mb_strlen($companyUtr) > 20)) { - throw new InvalidArgumentException('invalid length for $companyUtr when calling CisDetails., must be smaller than or equal to 20.'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - - $this->container['companyUtr'] = $companyUtr; + $this->container['type'] = $type; return $this; } /** - * Gets companyNumber + * Gets utr * * @return string|null */ - public function getCompanyNumber(): ?string + public function getUtr(): ?string { - return $this->container['companyNumber']; + return $this->container['utr']; } /** - * Sets companyNumber + * Sets utr * - * @param string|null $companyNumber companyNumber + * @param string|null $utr utr * * @return $this */ - public function setCompanyNumber(?string $companyNumber): static + public function setUtr(?string $utr): static { - if (is_null($companyNumber)) { - array_push($this->openAPINullablesSetToNull, 'companyNumber'); + if (is_null($utr)) { + array_push($this->openAPINullablesSetToNull, 'utr'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('companyNumber', $nullablesSetToNull); + $index = array_search('utr', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($companyNumber) && (mb_strlen($companyNumber) > 20)) { - throw new InvalidArgumentException('invalid length for $companyNumber when calling CisDetails., must be smaller than or equal to 20.'); + if (!is_null($utr) && (mb_strlen($utr) > 20)) { + throw new InvalidArgumentException('invalid length for $utr when calling CisDetails., must be smaller than or equal to 20.'); } - $this->container['companyNumber'] = $companyNumber; - - return $this; - } - - /** - * Gets vatRegistered - * - * @return bool|null - */ - public function getVatRegistered(): ?bool - { - return $this->container['vatRegistered']; - } - - /** - * Sets vatRegistered - * - * @param bool|null $vatRegistered vatRegistered - * - * @return $this - */ - public function setVatRegistered(?bool $vatRegistered): static - { - if (is_null($vatRegistered)) { - throw new InvalidArgumentException('non-nullable vatRegistered cannot be null'); - } - $this->container['vatRegistered'] = $vatRegistered; + $this->container['utr'] = $utr; return $this; } @@ -644,28 +644,28 @@ public function setVatRate(?float $vatRate): static } /** - * Gets reverseChargeVAT + * Gets vatRegistered * * @return bool|null */ - public function getReverseChargeVAT(): ?bool + public function getVatRegistered(): ?bool { - return $this->container['reverseChargeVAT']; + return $this->container['vatRegistered']; } /** - * Sets reverseChargeVAT + * Sets vatRegistered * - * @param bool|null $reverseChargeVAT reverseChargeVAT + * @param bool|null $vatRegistered vatRegistered * * @return $this */ - public function setReverseChargeVAT(?bool $reverseChargeVAT): static + public function setVatRegistered(?bool $vatRegistered): static { - if (is_null($reverseChargeVAT)) { - throw new InvalidArgumentException('non-nullable reverseChargeVAT cannot be null'); + if (is_null($vatRegistered)) { + throw new InvalidArgumentException('non-nullable vatRegistered cannot be null'); } - $this->container['reverseChargeVAT'] = $reverseChargeVAT; + $this->container['vatRegistered'] = $vatRegistered; return $this; } diff --git a/src/Model/CisPartnership.php b/src/Model/CisPartnership.php index 3e87736..68f476d 100644 --- a/src/Model/CisPartnership.php +++ b/src/Model/CisPartnership.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/CisRequest.php b/src/Model/CisRequest.php index 258983e..5011048 100644 --- a/src/Model/CisRequest.php +++ b/src/Model/CisRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class CisRequest implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'contractor' => '\SynergiTech\Staffology\Model\CisContractor', - 'subcontractor' => '\SynergiTech\Staffology\Model\CisSubContractor[]', - 'declaration' => 'string' + 'declaration' => 'string', + 'subcontractor' => '\SynergiTech\Staffology\Model\CisSubContractor[]' ]; /** @@ -71,8 +71,8 @@ class CisRequest implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'contractor' => null, - 'subcontractor' => null, - 'declaration' => null + 'declaration' => null, + 'subcontractor' => null ]; /** @@ -82,8 +82,8 @@ class CisRequest implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'contractor' => false, - 'subcontractor' => true, - 'declaration' => true + 'declaration' => true, + 'subcontractor' => true ]; /** @@ -173,8 +173,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'contractor' => 'contractor', - 'subcontractor' => 'subcontractor', - 'declaration' => 'declaration' + 'declaration' => 'declaration', + 'subcontractor' => 'subcontractor' ]; /** @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'contractor' => 'setContractor', - 'subcontractor' => 'setSubcontractor', - 'declaration' => 'setDeclaration' + 'declaration' => 'setDeclaration', + 'subcontractor' => 'setSubcontractor' ]; /** @@ -195,8 +195,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'contractor' => 'getContractor', - 'subcontractor' => 'getSubcontractor', - 'declaration' => 'getDeclaration' + 'declaration' => 'getDeclaration', + 'subcontractor' => 'getSubcontractor' ]; /** @@ -256,8 +256,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('contractor', $data ?? [], null); - $this->setIfExists('subcontractor', $data ?? [], null); $this->setIfExists('declaration', $data ?? [], null); + $this->setIfExists('subcontractor', $data ?? [], null); } /** @@ -330,69 +330,69 @@ public function setContractor(?\SynergiTech\Staffology\Model\CisContractor $cont } /** - * Gets subcontractor + * Gets declaration * - * @return \SynergiTech\Staffology\Model\CisSubContractor[]|null + * @return string|null */ - public function getSubcontractor(): ?array + public function getDeclaration(): ?string { - return $this->container['subcontractor']; + return $this->container['declaration']; } /** - * Sets subcontractor + * Sets declaration * - * @param \SynergiTech\Staffology\Model\CisSubContractor[]|null $subcontractor subcontractor + * @param string|null $declaration declaration * * @return $this */ - public function setSubcontractor(?array $subcontractor): static + public function setDeclaration(?string $declaration): static { - if (is_null($subcontractor)) { - array_push($this->openAPINullablesSetToNull, 'subcontractor'); + if (is_null($declaration)) { + array_push($this->openAPINullablesSetToNull, 'declaration'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('subcontractor', $nullablesSetToNull); + $index = array_search('declaration', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['subcontractor'] = $subcontractor; + $this->container['declaration'] = $declaration; return $this; } /** - * Gets declaration + * Gets subcontractor * - * @return string|null + * @return \SynergiTech\Staffology\Model\CisSubContractor[]|null */ - public function getDeclaration(): ?string + public function getSubcontractor(): ?array { - return $this->container['declaration']; + return $this->container['subcontractor']; } /** - * Sets declaration + * Sets subcontractor * - * @param string|null $declaration declaration + * @param \SynergiTech\Staffology\Model\CisSubContractor[]|null $subcontractor subcontractor * * @return $this */ - public function setDeclaration(?string $declaration): static + public function setSubcontractor(?array $subcontractor): static { - if (is_null($declaration)) { - array_push($this->openAPINullablesSetToNull, 'declaration'); + if (is_null($subcontractor)) { + array_push($this->openAPINullablesSetToNull, 'subcontractor'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('declaration', $nullablesSetToNull); + $index = array_search('subcontractor', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['declaration'] = $declaration; + $this->container['subcontractor'] = $subcontractor; return $this; } diff --git a/src/Model/CisReturn.php b/src/Model/CisReturn.php index 440275f..022b4ea 100644 --- a/src/Model/CisReturn.php +++ b/src/Model/CisReturn.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,9 +60,9 @@ class CisReturn implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'contractor' => '\SynergiTech\Staffology\Model\CisContractor', - 'subcontractor' => '\SynergiTech\Staffology\Model\CisSubContractor[]', + 'declarations' => '\SynergiTech\Staffology\Model\Cis300Declarations', 'nilReturn' => 'string', - 'declarations' => '\SynergiTech\Staffology\Model\Cis300Declarations' + 'subcontractor' => '\SynergiTech\Staffology\Model\CisSubContractor[]' ]; /** @@ -72,9 +72,9 @@ class CisReturn implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'contractor' => null, - 'subcontractor' => null, + 'declarations' => null, 'nilReturn' => null, - 'declarations' => null + 'subcontractor' => null ]; /** @@ -84,9 +84,9 @@ class CisReturn implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'contractor' => false, - 'subcontractor' => true, + 'declarations' => false, 'nilReturn' => true, - 'declarations' => false + 'subcontractor' => true ]; /** @@ -176,9 +176,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'contractor' => 'contractor', - 'subcontractor' => 'subcontractor', + 'declarations' => 'declarations', 'nilReturn' => 'nilReturn', - 'declarations' => 'declarations' + 'subcontractor' => 'subcontractor' ]; /** @@ -188,9 +188,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'contractor' => 'setContractor', - 'subcontractor' => 'setSubcontractor', + 'declarations' => 'setDeclarations', 'nilReturn' => 'setNilReturn', - 'declarations' => 'setDeclarations' + 'subcontractor' => 'setSubcontractor' ]; /** @@ -200,9 +200,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'contractor' => 'getContractor', - 'subcontractor' => 'getSubcontractor', + 'declarations' => 'getDeclarations', 'nilReturn' => 'getNilReturn', - 'declarations' => 'getDeclarations' + 'subcontractor' => 'getSubcontractor' ]; /** @@ -262,9 +262,9 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('contractor', $data ?? [], null); - $this->setIfExists('subcontractor', $data ?? [], null); - $this->setIfExists('nilReturn', $data ?? [], null); $this->setIfExists('declarations', $data ?? [], null); + $this->setIfExists('nilReturn', $data ?? [], null); + $this->setIfExists('subcontractor', $data ?? [], null); } /** @@ -337,35 +337,28 @@ public function setContractor(?\SynergiTech\Staffology\Model\CisContractor $cont } /** - * Gets subcontractor + * Gets declarations * - * @return \SynergiTech\Staffology\Model\CisSubContractor[]|null + * @return \SynergiTech\Staffology\Model\Cis300Declarations|null */ - public function getSubcontractor(): ?array + public function getDeclarations(): ?\SynergiTech\Staffology\Model\Cis300Declarations { - return $this->container['subcontractor']; + return $this->container['declarations']; } /** - * Sets subcontractor + * Sets declarations * - * @param \SynergiTech\Staffology\Model\CisSubContractor[]|null $subcontractor subcontractor + * @param \SynergiTech\Staffology\Model\Cis300Declarations|null $declarations declarations * * @return $this */ - public function setSubcontractor(?array $subcontractor): static + public function setDeclarations(?\SynergiTech\Staffology\Model\Cis300Declarations $declarations): static { - if (is_null($subcontractor)) { - array_push($this->openAPINullablesSetToNull, 'subcontractor'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('subcontractor', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($declarations)) { + throw new InvalidArgumentException('non-nullable declarations cannot be null'); } - $this->container['subcontractor'] = $subcontractor; + $this->container['declarations'] = $declarations; return $this; } @@ -405,28 +398,35 @@ public function setNilReturn(?string $nilReturn): static } /** - * Gets declarations + * Gets subcontractor * - * @return \SynergiTech\Staffology\Model\Cis300Declarations|null + * @return \SynergiTech\Staffology\Model\CisSubContractor[]|null */ - public function getDeclarations(): ?\SynergiTech\Staffology\Model\Cis300Declarations + public function getSubcontractor(): ?array { - return $this->container['declarations']; + return $this->container['subcontractor']; } /** - * Sets declarations + * Sets subcontractor * - * @param \SynergiTech\Staffology\Model\Cis300Declarations|null $declarations declarations + * @param \SynergiTech\Staffology\Model\CisSubContractor[]|null $subcontractor subcontractor * * @return $this */ - public function setDeclarations(?\SynergiTech\Staffology\Model\Cis300Declarations $declarations): static + public function setSubcontractor(?array $subcontractor): static { - if (is_null($declarations)) { - throw new InvalidArgumentException('non-nullable declarations cannot be null'); + if (is_null($subcontractor)) { + array_push($this->openAPINullablesSetToNull, 'subcontractor'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('subcontractor', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['declarations'] = $declarations; + $this->container['subcontractor'] = $subcontractor; return $this; } diff --git a/src/Model/CisStatement.php b/src/Model/CisStatement.php index 0625b18..3b70f68 100644 --- a/src/Model/CisStatement.php +++ b/src/Model/CisStatement.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,20 +60,20 @@ class CisStatement implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'taxMonth' => 'int', - 'contractorName' => 'string', + 'amountDeducted' => 'float', + 'amountLiableToDeduction' => 'float', + 'amountPayable' => 'float', 'contractorAddress' => '\SynergiTech\Staffology\Model\Address', + 'contractorName' => 'string', 'contractorOfficeNumber' => 'string', 'contractorPayeReference' => 'string', - 'subcontractorName' => '\SynergiTech\Staffology\Model\RtiEmployeeName', - 'subContractorUtr' => 'string', - 'verificationNumber' => 'string', - 'grossAmountPaid' => 'float', 'costOfMaterials' => 'float', - 'amountLiableToDeduction' => 'float', - 'amountDeducted' => 'float', - 'amountPayable' => 'float' + 'grossAmountPaid' => 'float', + 'subContractorUtr' => 'string', + 'subcontractorName' => '\SynergiTech\Staffology\Model\RtiEmployeeName', + 'taxMonth' => 'int', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'verificationNumber' => 'string' ]; /** @@ -82,20 +82,20 @@ class CisStatement implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'taxYear' => null, - 'taxMonth' => 'int32', - 'contractorName' => null, + 'amountDeducted' => 'double', + 'amountLiableToDeduction' => 'double', + 'amountPayable' => 'double', 'contractorAddress' => null, + 'contractorName' => null, 'contractorOfficeNumber' => null, 'contractorPayeReference' => null, - 'subcontractorName' => null, - 'subContractorUtr' => null, - 'verificationNumber' => null, - 'grossAmountPaid' => 'double', 'costOfMaterials' => 'double', - 'amountLiableToDeduction' => 'double', - 'amountDeducted' => 'double', - 'amountPayable' => 'double' + 'grossAmountPaid' => 'double', + 'subContractorUtr' => null, + 'subcontractorName' => null, + 'taxMonth' => 'int32', + 'taxYear' => null, + 'verificationNumber' => null ]; /** @@ -104,20 +104,20 @@ class CisStatement implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'taxYear' => false, - 'taxMonth' => false, - 'contractorName' => true, + 'amountDeducted' => false, + 'amountLiableToDeduction' => false, + 'amountPayable' => false, 'contractorAddress' => false, + 'contractorName' => true, 'contractorOfficeNumber' => true, 'contractorPayeReference' => true, - 'subcontractorName' => false, - 'subContractorUtr' => true, - 'verificationNumber' => true, - 'grossAmountPaid' => false, 'costOfMaterials' => false, - 'amountLiableToDeduction' => false, - 'amountDeducted' => false, - 'amountPayable' => false + 'grossAmountPaid' => false, + 'subContractorUtr' => true, + 'subcontractorName' => false, + 'taxMonth' => false, + 'taxYear' => false, + 'verificationNumber' => true ]; /** @@ -206,20 +206,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'taxYear' => 'taxYear', - 'taxMonth' => 'taxMonth', - 'contractorName' => 'contractorName', + 'amountDeducted' => 'amountDeducted', + 'amountLiableToDeduction' => 'amountLiableToDeduction', + 'amountPayable' => 'amountPayable', 'contractorAddress' => 'contractorAddress', + 'contractorName' => 'contractorName', 'contractorOfficeNumber' => 'contractorOfficeNumber', 'contractorPayeReference' => 'contractorPayeReference', - 'subcontractorName' => 'subcontractorName', - 'subContractorUtr' => 'subContractorUtr', - 'verificationNumber' => 'verificationNumber', - 'grossAmountPaid' => 'grossAmountPaid', 'costOfMaterials' => 'costOfMaterials', - 'amountLiableToDeduction' => 'amountLiableToDeduction', - 'amountDeducted' => 'amountDeducted', - 'amountPayable' => 'amountPayable' + 'grossAmountPaid' => 'grossAmountPaid', + 'subContractorUtr' => 'subContractorUtr', + 'subcontractorName' => 'subcontractorName', + 'taxMonth' => 'taxMonth', + 'taxYear' => 'taxYear', + 'verificationNumber' => 'verificationNumber' ]; /** @@ -228,20 +228,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'taxYear' => 'setTaxYear', - 'taxMonth' => 'setTaxMonth', - 'contractorName' => 'setContractorName', + 'amountDeducted' => 'setAmountDeducted', + 'amountLiableToDeduction' => 'setAmountLiableToDeduction', + 'amountPayable' => 'setAmountPayable', 'contractorAddress' => 'setContractorAddress', + 'contractorName' => 'setContractorName', 'contractorOfficeNumber' => 'setContractorOfficeNumber', 'contractorPayeReference' => 'setContractorPayeReference', - 'subcontractorName' => 'setSubcontractorName', - 'subContractorUtr' => 'setSubContractorUtr', - 'verificationNumber' => 'setVerificationNumber', - 'grossAmountPaid' => 'setGrossAmountPaid', 'costOfMaterials' => 'setCostOfMaterials', - 'amountLiableToDeduction' => 'setAmountLiableToDeduction', - 'amountDeducted' => 'setAmountDeducted', - 'amountPayable' => 'setAmountPayable' + 'grossAmountPaid' => 'setGrossAmountPaid', + 'subContractorUtr' => 'setSubContractorUtr', + 'subcontractorName' => 'setSubcontractorName', + 'taxMonth' => 'setTaxMonth', + 'taxYear' => 'setTaxYear', + 'verificationNumber' => 'setVerificationNumber' ]; /** @@ -250,20 +250,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'taxYear' => 'getTaxYear', - 'taxMonth' => 'getTaxMonth', - 'contractorName' => 'getContractorName', + 'amountDeducted' => 'getAmountDeducted', + 'amountLiableToDeduction' => 'getAmountLiableToDeduction', + 'amountPayable' => 'getAmountPayable', 'contractorAddress' => 'getContractorAddress', + 'contractorName' => 'getContractorName', 'contractorOfficeNumber' => 'getContractorOfficeNumber', 'contractorPayeReference' => 'getContractorPayeReference', - 'subcontractorName' => 'getSubcontractorName', - 'subContractorUtr' => 'getSubContractorUtr', - 'verificationNumber' => 'getVerificationNumber', - 'grossAmountPaid' => 'getGrossAmountPaid', 'costOfMaterials' => 'getCostOfMaterials', - 'amountLiableToDeduction' => 'getAmountLiableToDeduction', - 'amountDeducted' => 'getAmountDeducted', - 'amountPayable' => 'getAmountPayable' + 'grossAmountPaid' => 'getGrossAmountPaid', + 'subContractorUtr' => 'getSubContractorUtr', + 'subcontractorName' => 'getSubcontractorName', + 'taxMonth' => 'getTaxMonth', + 'taxYear' => 'getTaxYear', + 'verificationNumber' => 'getVerificationNumber' ]; /** @@ -322,20 +322,20 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('taxMonth', $data ?? [], null); - $this->setIfExists('contractorName', $data ?? [], null); + $this->setIfExists('amountDeducted', $data ?? [], null); + $this->setIfExists('amountLiableToDeduction', $data ?? [], null); + $this->setIfExists('amountPayable', $data ?? [], null); $this->setIfExists('contractorAddress', $data ?? [], null); + $this->setIfExists('contractorName', $data ?? [], null); $this->setIfExists('contractorOfficeNumber', $data ?? [], null); $this->setIfExists('contractorPayeReference', $data ?? [], null); - $this->setIfExists('subcontractorName', $data ?? [], null); + $this->setIfExists('costOfMaterials', $data ?? [], null); + $this->setIfExists('grossAmountPaid', $data ?? [], null); $this->setIfExists('subContractorUtr', $data ?? [], null); + $this->setIfExists('subcontractorName', $data ?? [], null); + $this->setIfExists('taxMonth', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('verificationNumber', $data ?? [], null); - $this->setIfExists('grossAmountPaid', $data ?? [], null); - $this->setIfExists('costOfMaterials', $data ?? [], null); - $this->setIfExists('amountLiableToDeduction', $data ?? [], null); - $this->setIfExists('amountDeducted', $data ?? [], null); - $this->setIfExists('amountPayable', $data ?? [], null); } /** @@ -381,89 +381,82 @@ public function valid(): bool /** - * Gets taxYear + * Gets amountDeducted * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return float|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getAmountDeducted(): ?float { - return $this->container['taxYear']; + return $this->container['amountDeducted']; } /** - * Sets taxYear + * Sets amountDeducted * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param float|null $amountDeducted [readonly] * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setAmountDeducted(?float $amountDeducted): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($amountDeducted)) { + throw new InvalidArgumentException('non-nullable amountDeducted cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['amountDeducted'] = $amountDeducted; return $this; } /** - * Gets taxMonth + * Gets amountLiableToDeduction * - * @return int|null + * @return float|null */ - public function getTaxMonth(): ?int + public function getAmountLiableToDeduction(): ?float { - return $this->container['taxMonth']; + return $this->container['amountLiableToDeduction']; } /** - * Sets taxMonth + * Sets amountLiableToDeduction * - * @param int|null $taxMonth [readonly] + * @param float|null $amountLiableToDeduction [readonly] * * @return $this */ - public function setTaxMonth(?int $taxMonth): static + public function setAmountLiableToDeduction(?float $amountLiableToDeduction): static { - if (is_null($taxMonth)) { - throw new InvalidArgumentException('non-nullable taxMonth cannot be null'); + if (is_null($amountLiableToDeduction)) { + throw new InvalidArgumentException('non-nullable amountLiableToDeduction cannot be null'); } - $this->container['taxMonth'] = $taxMonth; + $this->container['amountLiableToDeduction'] = $amountLiableToDeduction; return $this; } /** - * Gets contractorName + * Gets amountPayable * - * @return string|null + * @return float|null */ - public function getContractorName(): ?string + public function getAmountPayable(): ?float { - return $this->container['contractorName']; + return $this->container['amountPayable']; } /** - * Sets contractorName + * Sets amountPayable * - * @param string|null $contractorName [readonly] + * @param float|null $amountPayable [readonly] * * @return $this */ - public function setContractorName(?string $contractorName): static + public function setAmountPayable(?float $amountPayable): static { - if (is_null($contractorName)) { - array_push($this->openAPINullablesSetToNull, 'contractorName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('contractorName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($amountPayable)) { + throw new InvalidArgumentException('non-nullable amountPayable cannot be null'); } - $this->container['contractorName'] = $contractorName; + $this->container['amountPayable'] = $amountPayable; return $this; } @@ -495,6 +488,40 @@ public function setContractorAddress(?\SynergiTech\Staffology\Model\Address $con return $this; } + /** + * Gets contractorName + * + * @return string|null + */ + public function getContractorName(): ?string + { + return $this->container['contractorName']; + } + + /** + * Sets contractorName + * + * @param string|null $contractorName [readonly] + * + * @return $this + */ + public function setContractorName(?string $contractorName): static + { + if (is_null($contractorName)) { + array_push($this->openAPINullablesSetToNull, 'contractorName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('contractorName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['contractorName'] = $contractorName; + + return $this; + } + /** * Gets contractorOfficeNumber * @@ -564,231 +591,204 @@ public function setContractorPayeReference(?string $contractorPayeReference): st } /** - * Gets subcontractorName + * Gets costOfMaterials * - * @return \SynergiTech\Staffology\Model\RtiEmployeeName|null + * @return float|null */ - public function getSubcontractorName(): ?\SynergiTech\Staffology\Model\RtiEmployeeName + public function getCostOfMaterials(): ?float { - return $this->container['subcontractorName']; + return $this->container['costOfMaterials']; } /** - * Sets subcontractorName + * Sets costOfMaterials * - * @param \SynergiTech\Staffology\Model\RtiEmployeeName|null $subcontractorName subcontractorName + * @param float|null $costOfMaterials [readonly] * * @return $this */ - public function setSubcontractorName(?\SynergiTech\Staffology\Model\RtiEmployeeName $subcontractorName): static + public function setCostOfMaterials(?float $costOfMaterials): static { - if (is_null($subcontractorName)) { - throw new InvalidArgumentException('non-nullable subcontractorName cannot be null'); + if (is_null($costOfMaterials)) { + throw new InvalidArgumentException('non-nullable costOfMaterials cannot be null'); } - $this->container['subcontractorName'] = $subcontractorName; + $this->container['costOfMaterials'] = $costOfMaterials; return $this; } /** - * Gets subContractorUtr + * Gets grossAmountPaid * - * @return string|null + * @return float|null */ - public function getSubContractorUtr(): ?string + public function getGrossAmountPaid(): ?float { - return $this->container['subContractorUtr']; + return $this->container['grossAmountPaid']; } /** - * Sets subContractorUtr + * Sets grossAmountPaid * - * @param string|null $subContractorUtr [readonly] + * @param float|null $grossAmountPaid [readonly] Gross Amount Paid (Excl VAT) * * @return $this */ - public function setSubContractorUtr(?string $subContractorUtr): static + public function setGrossAmountPaid(?float $grossAmountPaid): static { - if (is_null($subContractorUtr)) { - array_push($this->openAPINullablesSetToNull, 'subContractorUtr'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('subContractorUtr', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($grossAmountPaid)) { + throw new InvalidArgumentException('non-nullable grossAmountPaid cannot be null'); } - $this->container['subContractorUtr'] = $subContractorUtr; + $this->container['grossAmountPaid'] = $grossAmountPaid; return $this; } /** - * Gets verificationNumber + * Gets subContractorUtr * * @return string|null */ - public function getVerificationNumber(): ?string + public function getSubContractorUtr(): ?string { - return $this->container['verificationNumber']; + return $this->container['subContractorUtr']; } /** - * Sets verificationNumber + * Sets subContractorUtr * - * @param string|null $verificationNumber [readonly] + * @param string|null $subContractorUtr [readonly] * * @return $this */ - public function setVerificationNumber(?string $verificationNumber): static + public function setSubContractorUtr(?string $subContractorUtr): static { - if (is_null($verificationNumber)) { - array_push($this->openAPINullablesSetToNull, 'verificationNumber'); + if (is_null($subContractorUtr)) { + array_push($this->openAPINullablesSetToNull, 'subContractorUtr'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('verificationNumber', $nullablesSetToNull); + $index = array_search('subContractorUtr', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['verificationNumber'] = $verificationNumber; - - return $this; - } - - /** - * Gets grossAmountPaid - * - * @return float|null - */ - public function getGrossAmountPaid(): ?float - { - return $this->container['grossAmountPaid']; - } - - /** - * Sets grossAmountPaid - * - * @param float|null $grossAmountPaid [readonly] Gross Amount Paid (Excl VAT) - * - * @return $this - */ - public function setGrossAmountPaid(?float $grossAmountPaid): static - { - if (is_null($grossAmountPaid)) { - throw new InvalidArgumentException('non-nullable grossAmountPaid cannot be null'); - } - $this->container['grossAmountPaid'] = $grossAmountPaid; + $this->container['subContractorUtr'] = $subContractorUtr; return $this; } /** - * Gets costOfMaterials + * Gets subcontractorName * - * @return float|null + * @return \SynergiTech\Staffology\Model\RtiEmployeeName|null */ - public function getCostOfMaterials(): ?float + public function getSubcontractorName(): ?\SynergiTech\Staffology\Model\RtiEmployeeName { - return $this->container['costOfMaterials']; + return $this->container['subcontractorName']; } /** - * Sets costOfMaterials + * Sets subcontractorName * - * @param float|null $costOfMaterials [readonly] + * @param \SynergiTech\Staffology\Model\RtiEmployeeName|null $subcontractorName subcontractorName * * @return $this */ - public function setCostOfMaterials(?float $costOfMaterials): static + public function setSubcontractorName(?\SynergiTech\Staffology\Model\RtiEmployeeName $subcontractorName): static { - if (is_null($costOfMaterials)) { - throw new InvalidArgumentException('non-nullable costOfMaterials cannot be null'); + if (is_null($subcontractorName)) { + throw new InvalidArgumentException('non-nullable subcontractorName cannot be null'); } - $this->container['costOfMaterials'] = $costOfMaterials; + $this->container['subcontractorName'] = $subcontractorName; return $this; } /** - * Gets amountLiableToDeduction + * Gets taxMonth * - * @return float|null + * @return int|null */ - public function getAmountLiableToDeduction(): ?float + public function getTaxMonth(): ?int { - return $this->container['amountLiableToDeduction']; + return $this->container['taxMonth']; } /** - * Sets amountLiableToDeduction + * Sets taxMonth * - * @param float|null $amountLiableToDeduction [readonly] + * @param int|null $taxMonth [readonly] * * @return $this */ - public function setAmountLiableToDeduction(?float $amountLiableToDeduction): static + public function setTaxMonth(?int $taxMonth): static { - if (is_null($amountLiableToDeduction)) { - throw new InvalidArgumentException('non-nullable amountLiableToDeduction cannot be null'); + if (is_null($taxMonth)) { + throw new InvalidArgumentException('non-nullable taxMonth cannot be null'); } - $this->container['amountLiableToDeduction'] = $amountLiableToDeduction; + $this->container['taxMonth'] = $taxMonth; return $this; } /** - * Gets amountDeducted + * Gets taxYear * - * @return float|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getAmountDeducted(): ?float + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['amountDeducted']; + return $this->container['taxYear']; } /** - * Sets amountDeducted + * Sets taxYear * - * @param float|null $amountDeducted [readonly] + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setAmountDeducted(?float $amountDeducted): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($amountDeducted)) { - throw new InvalidArgumentException('non-nullable amountDeducted cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['amountDeducted'] = $amountDeducted; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets amountPayable + * Gets verificationNumber * - * @return float|null + * @return string|null */ - public function getAmountPayable(): ?float + public function getVerificationNumber(): ?string { - return $this->container['amountPayable']; + return $this->container['verificationNumber']; } /** - * Sets amountPayable + * Sets verificationNumber * - * @param float|null $amountPayable [readonly] + * @param string|null $verificationNumber [readonly] * * @return $this */ - public function setAmountPayable(?float $amountPayable): static + public function setVerificationNumber(?string $verificationNumber): static { - if (is_null($amountPayable)) { - throw new InvalidArgumentException('non-nullable amountPayable cannot be null'); + if (is_null($verificationNumber)) { + array_push($this->openAPINullablesSetToNull, 'verificationNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('verificationNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['amountPayable'] = $amountPayable; + $this->container['verificationNumber'] = $verificationNumber; return $this; } diff --git a/src/Model/CisStatementListReportResponse.php b/src/Model/CisStatementListReportResponse.php index 5b4814a..c273c79 100644 --- a/src/Model/CisStatementListReportResponse.php +++ b/src/Model/CisStatementListReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class CisStatementListReportResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\CisStatement[]', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class CisStatementListReportResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class CisStatementListReportResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => true, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -445,6 +411,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/CisSubContractor.php b/src/Model/CisSubContractor.php index 3ebaa3f..edea9b2 100644 --- a/src/Model/CisSubContractor.php +++ b/src/Model/CisSubContractor.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,35 +59,35 @@ class CisSubContractor implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'employeeUniqueId' => 'string', + 'action' => 'string', + 'address' => '\SynergiTech\Staffology\Model\RtiEmployeeAddress', + 'costOfMaterials' => 'string', + 'costOfMaterialsUnrounded' => 'string', + 'crn' => 'string', + 'displayName' => 'string', 'emailStatementTo' => 'string', - 'numberOfPayments' => 'int', + 'employeeUniqueId' => 'string', 'item' => '\SynergiTech\Staffology\Model\Item', - 'displayName' => 'string', - 'action' => 'string', - 'type' => 'string', + 'matched' => 'string', 'name' => '\SynergiTech\Staffology\Model\RtiEmployeeName', - 'tradingName' => 'string', - 'worksRef' => 'string', - 'unmatchedRate' => 'string', - 'utr' => 'string', - 'crn' => 'string', + 'netPayment' => 'string', 'nino' => 'string', + 'numberOfPayments' => 'int', 'partnership' => '\SynergiTech\Staffology\Model\CisPartnership', - 'address' => '\SynergiTech\Staffology\Model\RtiEmployeeAddress', + 'taxTreatment' => 'string', 'telephone' => 'string', + 'totalDeducted' => 'string', + 'totalPayments' => 'string', 'totalPaymentsUnrounded' => 'string', - 'costOfMaterialsUnrounded' => 'string', + 'tradingName' => 'string', + 'type' => 'string', 'umbrellaFee' => 'string', + 'unmatchedRate' => 'string', + 'utr' => 'string', 'validationMsg' => 'string', + 'vatAmount' => 'string', 'verificationNumber' => 'string', - 'totalPayments' => 'string', - 'costOfMaterials' => 'string', - 'totalDeducted' => 'string', - 'matched' => 'string', - 'taxTreatment' => 'string', - 'netPayment' => 'string', - 'vatAmount' => 'string' + 'worksRef' => 'string' ]; /** @@ -96,35 +96,35 @@ class CisSubContractor implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'employeeUniqueId' => 'uuid', + 'action' => null, + 'address' => null, + 'costOfMaterials' => null, + 'costOfMaterialsUnrounded' => null, + 'crn' => null, + 'displayName' => null, 'emailStatementTo' => null, - 'numberOfPayments' => 'int32', + 'employeeUniqueId' => 'uuid', 'item' => null, - 'displayName' => null, - 'action' => null, - 'type' => null, + 'matched' => null, 'name' => null, - 'tradingName' => null, - 'worksRef' => null, - 'unmatchedRate' => null, - 'utr' => null, - 'crn' => null, + 'netPayment' => null, 'nino' => null, + 'numberOfPayments' => 'int32', 'partnership' => null, - 'address' => null, + 'taxTreatment' => null, 'telephone' => null, + 'totalDeducted' => null, + 'totalPayments' => null, 'totalPaymentsUnrounded' => null, - 'costOfMaterialsUnrounded' => null, + 'tradingName' => null, + 'type' => null, 'umbrellaFee' => null, + 'unmatchedRate' => null, + 'utr' => null, 'validationMsg' => null, + 'vatAmount' => null, 'verificationNumber' => null, - 'totalPayments' => null, - 'costOfMaterials' => null, - 'totalDeducted' => null, - 'matched' => null, - 'taxTreatment' => null, - 'netPayment' => null, - 'vatAmount' => null + 'worksRef' => null ]; /** @@ -133,35 +133,35 @@ class CisSubContractor implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'employeeUniqueId' => false, + 'action' => true, + 'address' => false, + 'costOfMaterials' => true, + 'costOfMaterialsUnrounded' => true, + 'crn' => true, + 'displayName' => true, 'emailStatementTo' => true, - 'numberOfPayments' => false, + 'employeeUniqueId' => false, 'item' => false, - 'displayName' => true, - 'action' => true, - 'type' => true, + 'matched' => true, 'name' => false, - 'tradingName' => true, - 'worksRef' => true, - 'unmatchedRate' => true, - 'utr' => true, - 'crn' => true, + 'netPayment' => true, 'nino' => true, + 'numberOfPayments' => false, 'partnership' => false, - 'address' => false, + 'taxTreatment' => true, 'telephone' => true, + 'totalDeducted' => true, + 'totalPayments' => true, 'totalPaymentsUnrounded' => true, - 'costOfMaterialsUnrounded' => true, + 'tradingName' => true, + 'type' => true, 'umbrellaFee' => true, + 'unmatchedRate' => true, + 'utr' => true, 'validationMsg' => true, + 'vatAmount' => true, 'verificationNumber' => true, - 'totalPayments' => true, - 'costOfMaterials' => true, - 'totalDeducted' => true, - 'matched' => true, - 'taxTreatment' => true, - 'netPayment' => true, - 'vatAmount' => true + 'worksRef' => true ]; /** @@ -250,35 +250,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employeeUniqueId' => 'employeeUniqueId', + 'action' => 'action', + 'address' => 'address', + 'costOfMaterials' => 'costOfMaterials', + 'costOfMaterialsUnrounded' => 'costOfMaterialsUnrounded', + 'crn' => 'crn', + 'displayName' => 'displayName', 'emailStatementTo' => 'emailStatementTo', - 'numberOfPayments' => 'numberOfPayments', + 'employeeUniqueId' => 'employeeUniqueId', 'item' => 'item', - 'displayName' => 'displayName', - 'action' => 'action', - 'type' => 'type', + 'matched' => 'matched', 'name' => 'name', - 'tradingName' => 'tradingName', - 'worksRef' => 'worksRef', - 'unmatchedRate' => 'unmatchedRate', - 'utr' => 'utr', - 'crn' => 'crn', + 'netPayment' => 'netPayment', 'nino' => 'nino', + 'numberOfPayments' => 'numberOfPayments', 'partnership' => 'partnership', - 'address' => 'address', + 'taxTreatment' => 'taxTreatment', 'telephone' => 'telephone', + 'totalDeducted' => 'totalDeducted', + 'totalPayments' => 'totalPayments', 'totalPaymentsUnrounded' => 'totalPaymentsUnrounded', - 'costOfMaterialsUnrounded' => 'costOfMaterialsUnrounded', + 'tradingName' => 'tradingName', + 'type' => 'type', 'umbrellaFee' => 'umbrellaFee', + 'unmatchedRate' => 'unmatchedRate', + 'utr' => 'utr', 'validationMsg' => 'validationMsg', + 'vatAmount' => 'vatAmount', 'verificationNumber' => 'verificationNumber', - 'totalPayments' => 'totalPayments', - 'costOfMaterials' => 'costOfMaterials', - 'totalDeducted' => 'totalDeducted', - 'matched' => 'matched', - 'taxTreatment' => 'taxTreatment', - 'netPayment' => 'netPayment', - 'vatAmount' => 'vatAmount' + 'worksRef' => 'worksRef' ]; /** @@ -287,35 +287,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employeeUniqueId' => 'setEmployeeUniqueId', + 'action' => 'setAction', + 'address' => 'setAddress', + 'costOfMaterials' => 'setCostOfMaterials', + 'costOfMaterialsUnrounded' => 'setCostOfMaterialsUnrounded', + 'crn' => 'setCrn', + 'displayName' => 'setDisplayName', 'emailStatementTo' => 'setEmailStatementTo', - 'numberOfPayments' => 'setNumberOfPayments', + 'employeeUniqueId' => 'setEmployeeUniqueId', 'item' => 'setItem', - 'displayName' => 'setDisplayName', - 'action' => 'setAction', - 'type' => 'setType', + 'matched' => 'setMatched', 'name' => 'setName', - 'tradingName' => 'setTradingName', - 'worksRef' => 'setWorksRef', - 'unmatchedRate' => 'setUnmatchedRate', - 'utr' => 'setUtr', - 'crn' => 'setCrn', + 'netPayment' => 'setNetPayment', 'nino' => 'setNino', + 'numberOfPayments' => 'setNumberOfPayments', 'partnership' => 'setPartnership', - 'address' => 'setAddress', + 'taxTreatment' => 'setTaxTreatment', 'telephone' => 'setTelephone', + 'totalDeducted' => 'setTotalDeducted', + 'totalPayments' => 'setTotalPayments', 'totalPaymentsUnrounded' => 'setTotalPaymentsUnrounded', - 'costOfMaterialsUnrounded' => 'setCostOfMaterialsUnrounded', + 'tradingName' => 'setTradingName', + 'type' => 'setType', 'umbrellaFee' => 'setUmbrellaFee', + 'unmatchedRate' => 'setUnmatchedRate', + 'utr' => 'setUtr', 'validationMsg' => 'setValidationMsg', + 'vatAmount' => 'setVatAmount', 'verificationNumber' => 'setVerificationNumber', - 'totalPayments' => 'setTotalPayments', - 'costOfMaterials' => 'setCostOfMaterials', - 'totalDeducted' => 'setTotalDeducted', - 'matched' => 'setMatched', - 'taxTreatment' => 'setTaxTreatment', - 'netPayment' => 'setNetPayment', - 'vatAmount' => 'setVatAmount' + 'worksRef' => 'setWorksRef' ]; /** @@ -324,35 +324,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employeeUniqueId' => 'getEmployeeUniqueId', + 'action' => 'getAction', + 'address' => 'getAddress', + 'costOfMaterials' => 'getCostOfMaterials', + 'costOfMaterialsUnrounded' => 'getCostOfMaterialsUnrounded', + 'crn' => 'getCrn', + 'displayName' => 'getDisplayName', 'emailStatementTo' => 'getEmailStatementTo', - 'numberOfPayments' => 'getNumberOfPayments', + 'employeeUniqueId' => 'getEmployeeUniqueId', 'item' => 'getItem', - 'displayName' => 'getDisplayName', - 'action' => 'getAction', - 'type' => 'getType', + 'matched' => 'getMatched', 'name' => 'getName', - 'tradingName' => 'getTradingName', - 'worksRef' => 'getWorksRef', - 'unmatchedRate' => 'getUnmatchedRate', - 'utr' => 'getUtr', - 'crn' => 'getCrn', + 'netPayment' => 'getNetPayment', 'nino' => 'getNino', + 'numberOfPayments' => 'getNumberOfPayments', 'partnership' => 'getPartnership', - 'address' => 'getAddress', + 'taxTreatment' => 'getTaxTreatment', 'telephone' => 'getTelephone', + 'totalDeducted' => 'getTotalDeducted', + 'totalPayments' => 'getTotalPayments', 'totalPaymentsUnrounded' => 'getTotalPaymentsUnrounded', - 'costOfMaterialsUnrounded' => 'getCostOfMaterialsUnrounded', + 'tradingName' => 'getTradingName', + 'type' => 'getType', 'umbrellaFee' => 'getUmbrellaFee', + 'unmatchedRate' => 'getUnmatchedRate', + 'utr' => 'getUtr', 'validationMsg' => 'getValidationMsg', + 'vatAmount' => 'getVatAmount', 'verificationNumber' => 'getVerificationNumber', - 'totalPayments' => 'getTotalPayments', - 'costOfMaterials' => 'getCostOfMaterials', - 'totalDeducted' => 'getTotalDeducted', - 'matched' => 'getMatched', - 'taxTreatment' => 'getTaxTreatment', - 'netPayment' => 'getNetPayment', - 'vatAmount' => 'getVatAmount' + 'worksRef' => 'getWorksRef' ]; /** @@ -411,35 +411,35 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employeeUniqueId', $data ?? [], null); + $this->setIfExists('action', $data ?? [], null); + $this->setIfExists('address', $data ?? [], null); + $this->setIfExists('costOfMaterials', $data ?? [], null); + $this->setIfExists('costOfMaterialsUnrounded', $data ?? [], null); + $this->setIfExists('crn', $data ?? [], null); + $this->setIfExists('displayName', $data ?? [], null); $this->setIfExists('emailStatementTo', $data ?? [], null); - $this->setIfExists('numberOfPayments', $data ?? [], null); + $this->setIfExists('employeeUniqueId', $data ?? [], null); $this->setIfExists('item', $data ?? [], null); - $this->setIfExists('displayName', $data ?? [], null); - $this->setIfExists('action', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('matched', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('tradingName', $data ?? [], null); - $this->setIfExists('worksRef', $data ?? [], null); - $this->setIfExists('unmatchedRate', $data ?? [], null); - $this->setIfExists('utr', $data ?? [], null); - $this->setIfExists('crn', $data ?? [], null); + $this->setIfExists('netPayment', $data ?? [], null); $this->setIfExists('nino', $data ?? [], null); + $this->setIfExists('numberOfPayments', $data ?? [], null); $this->setIfExists('partnership', $data ?? [], null); - $this->setIfExists('address', $data ?? [], null); + $this->setIfExists('taxTreatment', $data ?? [], null); $this->setIfExists('telephone', $data ?? [], null); + $this->setIfExists('totalDeducted', $data ?? [], null); + $this->setIfExists('totalPayments', $data ?? [], null); $this->setIfExists('totalPaymentsUnrounded', $data ?? [], null); - $this->setIfExists('costOfMaterialsUnrounded', $data ?? [], null); + $this->setIfExists('tradingName', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('umbrellaFee', $data ?? [], null); + $this->setIfExists('unmatchedRate', $data ?? [], null); + $this->setIfExists('utr', $data ?? [], null); $this->setIfExists('validationMsg', $data ?? [], null); - $this->setIfExists('verificationNumber', $data ?? [], null); - $this->setIfExists('totalPayments', $data ?? [], null); - $this->setIfExists('costOfMaterials', $data ?? [], null); - $this->setIfExists('totalDeducted', $data ?? [], null); - $this->setIfExists('matched', $data ?? [], null); - $this->setIfExists('taxTreatment', $data ?? [], null); - $this->setIfExists('netPayment', $data ?? [], null); $this->setIfExists('vatAmount', $data ?? [], null); + $this->setIfExists('verificationNumber', $data ?? [], null); + $this->setIfExists('worksRef', $data ?? [], null); } /** @@ -485,415 +485,381 @@ public function valid(): bool /** - * Gets employeeUniqueId + * Gets action * * @return string|null */ - public function getEmployeeUniqueId(): ?string + public function getAction(): ?string { - return $this->container['employeeUniqueId']; + return $this->container['action']; } /** - * Sets employeeUniqueId + * Sets action * - * @param string|null $employeeUniqueId employeeUniqueId + * @param string|null $action action * * @return $this */ - public function setEmployeeUniqueId(?string $employeeUniqueId): static + public function setAction(?string $action): static { - if (is_null($employeeUniqueId)) { - throw new InvalidArgumentException('non-nullable employeeUniqueId cannot be null'); - } - $this->container['employeeUniqueId'] = $employeeUniqueId; - - return $this; - } - - /** - * Gets emailStatementTo - * - * @return string|null - */ - public function getEmailStatementTo(): ?string - { - return $this->container['emailStatementTo']; - } - - /** - * Sets emailStatementTo - * - * @param string|null $emailStatementTo emailStatementTo - * - * @return $this - */ - public function setEmailStatementTo(?string $emailStatementTo): static - { - if (is_null($emailStatementTo)) { - array_push($this->openAPINullablesSetToNull, 'emailStatementTo'); + if (is_null($action)) { + array_push($this->openAPINullablesSetToNull, 'action'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('emailStatementTo', $nullablesSetToNull); + $index = array_search('action', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['emailStatementTo'] = $emailStatementTo; + $this->container['action'] = $action; return $this; } /** - * Gets numberOfPayments + * Gets address * - * @return int|null + * @return \SynergiTech\Staffology\Model\RtiEmployeeAddress|null */ - public function getNumberOfPayments(): ?int + public function getAddress(): ?\SynergiTech\Staffology\Model\RtiEmployeeAddress { - return $this->container['numberOfPayments']; + return $this->container['address']; } /** - * Sets numberOfPayments + * Sets address * - * @param int|null $numberOfPayments numberOfPayments + * @param \SynergiTech\Staffology\Model\RtiEmployeeAddress|null $address address * * @return $this */ - public function setNumberOfPayments(?int $numberOfPayments): static + public function setAddress(?\SynergiTech\Staffology\Model\RtiEmployeeAddress $address): static { - if (is_null($numberOfPayments)) { - throw new InvalidArgumentException('non-nullable numberOfPayments cannot be null'); + if (is_null($address)) { + throw new InvalidArgumentException('non-nullable address cannot be null'); } - $this->container['numberOfPayments'] = $numberOfPayments; + $this->container['address'] = $address; return $this; } /** - * Gets item + * Gets costOfMaterials * - * @return \SynergiTech\Staffology\Model\Item|null + * @return string|null */ - public function getItem(): ?\SynergiTech\Staffology\Model\Item + public function getCostOfMaterials(): ?string { - return $this->container['item']; + return $this->container['costOfMaterials']; } /** - * Sets item + * Sets costOfMaterials * - * @param \SynergiTech\Staffology\Model\Item|null $item item + * @param string|null $costOfMaterials costOfMaterials * * @return $this */ - public function setItem(?\SynergiTech\Staffology\Model\Item $item): static + public function setCostOfMaterials(?string $costOfMaterials): static { - if (is_null($item)) { - throw new InvalidArgumentException('non-nullable item cannot be null'); + if (is_null($costOfMaterials)) { + array_push($this->openAPINullablesSetToNull, 'costOfMaterials'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('costOfMaterials', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['item'] = $item; + $this->container['costOfMaterials'] = $costOfMaterials; return $this; } /** - * Gets displayName + * Gets costOfMaterialsUnrounded * * @return string|null */ - public function getDisplayName(): ?string + public function getCostOfMaterialsUnrounded(): ?string { - return $this->container['displayName']; + return $this->container['costOfMaterialsUnrounded']; } /** - * Sets displayName + * Sets costOfMaterialsUnrounded * - * @param string|null $displayName displayName + * @param string|null $costOfMaterialsUnrounded costOfMaterialsUnrounded * * @return $this */ - public function setDisplayName(?string $displayName): static + public function setCostOfMaterialsUnrounded(?string $costOfMaterialsUnrounded): static { - if (is_null($displayName)) { - array_push($this->openAPINullablesSetToNull, 'displayName'); + if (is_null($costOfMaterialsUnrounded)) { + array_push($this->openAPINullablesSetToNull, 'costOfMaterialsUnrounded'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('displayName', $nullablesSetToNull); + $index = array_search('costOfMaterialsUnrounded', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['displayName'] = $displayName; + $this->container['costOfMaterialsUnrounded'] = $costOfMaterialsUnrounded; return $this; } /** - * Gets action + * Gets crn * * @return string|null */ - public function getAction(): ?string + public function getCrn(): ?string { - return $this->container['action']; + return $this->container['crn']; } /** - * Sets action + * Sets crn * - * @param string|null $action action + * @param string|null $crn crn * * @return $this */ - public function setAction(?string $action): static + public function setCrn(?string $crn): static { - if (is_null($action)) { - array_push($this->openAPINullablesSetToNull, 'action'); + if (is_null($crn)) { + array_push($this->openAPINullablesSetToNull, 'crn'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('action', $nullablesSetToNull); + $index = array_search('crn', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['action'] = $action; + $this->container['crn'] = $crn; return $this; } /** - * Gets type + * Gets displayName * * @return string|null */ - public function getType(): ?string + public function getDisplayName(): ?string { - return $this->container['type']; + return $this->container['displayName']; } /** - * Sets type + * Sets displayName * - * @param string|null $type type + * @param string|null $displayName displayName * * @return $this */ - public function setType(?string $type): static + public function setDisplayName(?string $displayName): static { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); + if (is_null($displayName)) { + array_push($this->openAPINullablesSetToNull, 'displayName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); + $index = array_search('displayName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['type'] = $type; + $this->container['displayName'] = $displayName; return $this; } /** - * Gets name + * Gets emailStatementTo * - * @return \SynergiTech\Staffology\Model\RtiEmployeeName|null + * @return string|null */ - public function getName(): ?\SynergiTech\Staffology\Model\RtiEmployeeName + public function getEmailStatementTo(): ?string { - return $this->container['name']; + return $this->container['emailStatementTo']; } /** - * Sets name + * Sets emailStatementTo * - * @param \SynergiTech\Staffology\Model\RtiEmployeeName|null $name name + * @param string|null $emailStatementTo emailStatementTo * * @return $this */ - public function setName(?\SynergiTech\Staffology\Model\RtiEmployeeName $name): static + public function setEmailStatementTo(?string $emailStatementTo): static { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($emailStatementTo)) { + array_push($this->openAPINullablesSetToNull, 'emailStatementTo'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('emailStatementTo', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['name'] = $name; + $this->container['emailStatementTo'] = $emailStatementTo; return $this; } /** - * Gets tradingName + * Gets employeeUniqueId * * @return string|null */ - public function getTradingName(): ?string + public function getEmployeeUniqueId(): ?string { - return $this->container['tradingName']; + return $this->container['employeeUniqueId']; } /** - * Sets tradingName + * Sets employeeUniqueId * - * @param string|null $tradingName tradingName + * @param string|null $employeeUniqueId employeeUniqueId * * @return $this */ - public function setTradingName(?string $tradingName): static + public function setEmployeeUniqueId(?string $employeeUniqueId): static { - if (is_null($tradingName)) { - array_push($this->openAPINullablesSetToNull, 'tradingName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tradingName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employeeUniqueId)) { + throw new InvalidArgumentException('non-nullable employeeUniqueId cannot be null'); } - $this->container['tradingName'] = $tradingName; + $this->container['employeeUniqueId'] = $employeeUniqueId; return $this; } /** - * Gets worksRef + * Gets item * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getWorksRef(): ?string + public function getItem(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['worksRef']; + return $this->container['item']; } /** - * Sets worksRef + * Sets item * - * @param string|null $worksRef worksRef + * @param \SynergiTech\Staffology\Model\Item|null $item item * * @return $this */ - public function setWorksRef(?string $worksRef): static + public function setItem(?\SynergiTech\Staffology\Model\Item $item): static { - if (is_null($worksRef)) { - array_push($this->openAPINullablesSetToNull, 'worksRef'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('worksRef', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($item)) { + throw new InvalidArgumentException('non-nullable item cannot be null'); } - $this->container['worksRef'] = $worksRef; + $this->container['item'] = $item; return $this; } /** - * Gets unmatchedRate + * Gets matched * * @return string|null */ - public function getUnmatchedRate(): ?string + public function getMatched(): ?string { - return $this->container['unmatchedRate']; + return $this->container['matched']; } /** - * Sets unmatchedRate + * Sets matched * - * @param string|null $unmatchedRate unmatchedRate + * @param string|null $matched matched * * @return $this */ - public function setUnmatchedRate(?string $unmatchedRate): static + public function setMatched(?string $matched): static { - if (is_null($unmatchedRate)) { - array_push($this->openAPINullablesSetToNull, 'unmatchedRate'); + if (is_null($matched)) { + array_push($this->openAPINullablesSetToNull, 'matched'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('unmatchedRate', $nullablesSetToNull); + $index = array_search('matched', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['unmatchedRate'] = $unmatchedRate; + $this->container['matched'] = $matched; return $this; } /** - * Gets utr + * Gets name * - * @return string|null + * @return \SynergiTech\Staffology\Model\RtiEmployeeName|null */ - public function getUtr(): ?string + public function getName(): ?\SynergiTech\Staffology\Model\RtiEmployeeName { - return $this->container['utr']; + return $this->container['name']; } /** - * Sets utr + * Sets name * - * @param string|null $utr utr + * @param \SynergiTech\Staffology\Model\RtiEmployeeName|null $name name * * @return $this */ - public function setUtr(?string $utr): static + public function setName(?\SynergiTech\Staffology\Model\RtiEmployeeName $name): static { - if (is_null($utr)) { - array_push($this->openAPINullablesSetToNull, 'utr'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('utr', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['utr'] = $utr; + $this->container['name'] = $name; return $this; } /** - * Gets crn + * Gets netPayment * * @return string|null */ - public function getCrn(): ?string + public function getNetPayment(): ?string { - return $this->container['crn']; + return $this->container['netPayment']; } /** - * Sets crn + * Sets netPayment * - * @param string|null $crn crn + * @param string|null $netPayment netPayment * * @return $this */ - public function setCrn(?string $crn): static + public function setNetPayment(?string $netPayment): static { - if (is_null($crn)) { - array_push($this->openAPINullablesSetToNull, 'crn'); + if (is_null($netPayment)) { + array_push($this->openAPINullablesSetToNull, 'netPayment'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('crn', $nullablesSetToNull); + $index = array_search('netPayment', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['crn'] = $crn; + $this->container['netPayment'] = $netPayment; return $this; } @@ -932,6 +898,33 @@ public function setNino(?string $nino): static return $this; } + /** + * Gets numberOfPayments + * + * @return int|null + */ + public function getNumberOfPayments(): ?int + { + return $this->container['numberOfPayments']; + } + + /** + * Sets numberOfPayments + * + * @param int|null $numberOfPayments numberOfPayments + * + * @return $this + */ + public function setNumberOfPayments(?int $numberOfPayments): static + { + if (is_null($numberOfPayments)) { + throw new InvalidArgumentException('non-nullable numberOfPayments cannot be null'); + } + $this->container['numberOfPayments'] = $numberOfPayments; + + return $this; + } + /** * Gets partnership * @@ -960,28 +953,35 @@ public function setPartnership(?\SynergiTech\Staffology\Model\CisPartnership $pa } /** - * Gets address + * Gets taxTreatment * - * @return \SynergiTech\Staffology\Model\RtiEmployeeAddress|null + * @return string|null */ - public function getAddress(): ?\SynergiTech\Staffology\Model\RtiEmployeeAddress + public function getTaxTreatment(): ?string { - return $this->container['address']; + return $this->container['taxTreatment']; } /** - * Sets address + * Sets taxTreatment * - * @param \SynergiTech\Staffology\Model\RtiEmployeeAddress|null $address address + * @param string|null $taxTreatment taxTreatment * * @return $this */ - public function setAddress(?\SynergiTech\Staffology\Model\RtiEmployeeAddress $address): static + public function setTaxTreatment(?string $taxTreatment): static { - if (is_null($address)) { - throw new InvalidArgumentException('non-nullable address cannot be null'); + if (is_null($taxTreatment)) { + array_push($this->openAPINullablesSetToNull, 'taxTreatment'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('taxTreatment', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['address'] = $address; + $this->container['taxTreatment'] = $taxTreatment; return $this; } @@ -1021,409 +1021,409 @@ public function setTelephone(?string $telephone): static } /** - * Gets totalPaymentsUnrounded + * Gets totalDeducted * * @return string|null */ - public function getTotalPaymentsUnrounded(): ?string + public function getTotalDeducted(): ?string { - return $this->container['totalPaymentsUnrounded']; + return $this->container['totalDeducted']; } /** - * Sets totalPaymentsUnrounded + * Sets totalDeducted * - * @param string|null $totalPaymentsUnrounded totalPaymentsUnrounded + * @param string|null $totalDeducted totalDeducted * * @return $this */ - public function setTotalPaymentsUnrounded(?string $totalPaymentsUnrounded): static + public function setTotalDeducted(?string $totalDeducted): static { - if (is_null($totalPaymentsUnrounded)) { - array_push($this->openAPINullablesSetToNull, 'totalPaymentsUnrounded'); + if (is_null($totalDeducted)) { + array_push($this->openAPINullablesSetToNull, 'totalDeducted'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalPaymentsUnrounded', $nullablesSetToNull); + $index = array_search('totalDeducted', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['totalPaymentsUnrounded'] = $totalPaymentsUnrounded; + $this->container['totalDeducted'] = $totalDeducted; return $this; } /** - * Gets costOfMaterialsUnrounded + * Gets totalPayments * * @return string|null */ - public function getCostOfMaterialsUnrounded(): ?string + public function getTotalPayments(): ?string { - return $this->container['costOfMaterialsUnrounded']; + return $this->container['totalPayments']; } /** - * Sets costOfMaterialsUnrounded + * Sets totalPayments * - * @param string|null $costOfMaterialsUnrounded costOfMaterialsUnrounded + * @param string|null $totalPayments totalPayments * * @return $this */ - public function setCostOfMaterialsUnrounded(?string $costOfMaterialsUnrounded): static + public function setTotalPayments(?string $totalPayments): static { - if (is_null($costOfMaterialsUnrounded)) { - array_push($this->openAPINullablesSetToNull, 'costOfMaterialsUnrounded'); + if (is_null($totalPayments)) { + array_push($this->openAPINullablesSetToNull, 'totalPayments'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costOfMaterialsUnrounded', $nullablesSetToNull); + $index = array_search('totalPayments', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costOfMaterialsUnrounded'] = $costOfMaterialsUnrounded; + $this->container['totalPayments'] = $totalPayments; return $this; } /** - * Gets umbrellaFee + * Gets totalPaymentsUnrounded * * @return string|null */ - public function getUmbrellaFee(): ?string + public function getTotalPaymentsUnrounded(): ?string { - return $this->container['umbrellaFee']; + return $this->container['totalPaymentsUnrounded']; } /** - * Sets umbrellaFee + * Sets totalPaymentsUnrounded * - * @param string|null $umbrellaFee umbrellaFee + * @param string|null $totalPaymentsUnrounded totalPaymentsUnrounded * * @return $this */ - public function setUmbrellaFee(?string $umbrellaFee): static + public function setTotalPaymentsUnrounded(?string $totalPaymentsUnrounded): static { - if (is_null($umbrellaFee)) { - array_push($this->openAPINullablesSetToNull, 'umbrellaFee'); + if (is_null($totalPaymentsUnrounded)) { + array_push($this->openAPINullablesSetToNull, 'totalPaymentsUnrounded'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('umbrellaFee', $nullablesSetToNull); + $index = array_search('totalPaymentsUnrounded', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['umbrellaFee'] = $umbrellaFee; + $this->container['totalPaymentsUnrounded'] = $totalPaymentsUnrounded; return $this; } /** - * Gets validationMsg + * Gets tradingName * * @return string|null */ - public function getValidationMsg(): ?string + public function getTradingName(): ?string { - return $this->container['validationMsg']; + return $this->container['tradingName']; } /** - * Sets validationMsg + * Sets tradingName * - * @param string|null $validationMsg validationMsg + * @param string|null $tradingName tradingName * * @return $this */ - public function setValidationMsg(?string $validationMsg): static + public function setTradingName(?string $tradingName): static { - if (is_null($validationMsg)) { - array_push($this->openAPINullablesSetToNull, 'validationMsg'); + if (is_null($tradingName)) { + array_push($this->openAPINullablesSetToNull, 'tradingName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('validationMsg', $nullablesSetToNull); + $index = array_search('tradingName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['validationMsg'] = $validationMsg; + $this->container['tradingName'] = $tradingName; return $this; } /** - * Gets verificationNumber + * Gets type * * @return string|null */ - public function getVerificationNumber(): ?string + public function getType(): ?string { - return $this->container['verificationNumber']; + return $this->container['type']; } /** - * Sets verificationNumber + * Sets type * - * @param string|null $verificationNumber verificationNumber + * @param string|null $type type * * @return $this */ - public function setVerificationNumber(?string $verificationNumber): static + public function setType(?string $type): static { - if (is_null($verificationNumber)) { - array_push($this->openAPINullablesSetToNull, 'verificationNumber'); + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('verificationNumber', $nullablesSetToNull); + $index = array_search('type', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['verificationNumber'] = $verificationNumber; + $this->container['type'] = $type; return $this; } /** - * Gets totalPayments + * Gets umbrellaFee * * @return string|null */ - public function getTotalPayments(): ?string + public function getUmbrellaFee(): ?string { - return $this->container['totalPayments']; + return $this->container['umbrellaFee']; } /** - * Sets totalPayments + * Sets umbrellaFee * - * @param string|null $totalPayments totalPayments + * @param string|null $umbrellaFee umbrellaFee * * @return $this */ - public function setTotalPayments(?string $totalPayments): static + public function setUmbrellaFee(?string $umbrellaFee): static { - if (is_null($totalPayments)) { - array_push($this->openAPINullablesSetToNull, 'totalPayments'); + if (is_null($umbrellaFee)) { + array_push($this->openAPINullablesSetToNull, 'umbrellaFee'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalPayments', $nullablesSetToNull); + $index = array_search('umbrellaFee', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['totalPayments'] = $totalPayments; + $this->container['umbrellaFee'] = $umbrellaFee; return $this; } /** - * Gets costOfMaterials + * Gets unmatchedRate * * @return string|null */ - public function getCostOfMaterials(): ?string + public function getUnmatchedRate(): ?string { - return $this->container['costOfMaterials']; + return $this->container['unmatchedRate']; } /** - * Sets costOfMaterials + * Sets unmatchedRate * - * @param string|null $costOfMaterials costOfMaterials + * @param string|null $unmatchedRate unmatchedRate * * @return $this */ - public function setCostOfMaterials(?string $costOfMaterials): static + public function setUnmatchedRate(?string $unmatchedRate): static { - if (is_null($costOfMaterials)) { - array_push($this->openAPINullablesSetToNull, 'costOfMaterials'); + if (is_null($unmatchedRate)) { + array_push($this->openAPINullablesSetToNull, 'unmatchedRate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costOfMaterials', $nullablesSetToNull); + $index = array_search('unmatchedRate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costOfMaterials'] = $costOfMaterials; + $this->container['unmatchedRate'] = $unmatchedRate; return $this; } /** - * Gets totalDeducted + * Gets utr * * @return string|null */ - public function getTotalDeducted(): ?string + public function getUtr(): ?string { - return $this->container['totalDeducted']; + return $this->container['utr']; } /** - * Sets totalDeducted + * Sets utr * - * @param string|null $totalDeducted totalDeducted + * @param string|null $utr utr * * @return $this */ - public function setTotalDeducted(?string $totalDeducted): static + public function setUtr(?string $utr): static { - if (is_null($totalDeducted)) { - array_push($this->openAPINullablesSetToNull, 'totalDeducted'); + if (is_null($utr)) { + array_push($this->openAPINullablesSetToNull, 'utr'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalDeducted', $nullablesSetToNull); + $index = array_search('utr', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['totalDeducted'] = $totalDeducted; + $this->container['utr'] = $utr; return $this; } /** - * Gets matched + * Gets validationMsg * * @return string|null */ - public function getMatched(): ?string + public function getValidationMsg(): ?string { - return $this->container['matched']; + return $this->container['validationMsg']; } /** - * Sets matched + * Sets validationMsg * - * @param string|null $matched matched + * @param string|null $validationMsg validationMsg * * @return $this */ - public function setMatched(?string $matched): static + public function setValidationMsg(?string $validationMsg): static { - if (is_null($matched)) { - array_push($this->openAPINullablesSetToNull, 'matched'); + if (is_null($validationMsg)) { + array_push($this->openAPINullablesSetToNull, 'validationMsg'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('matched', $nullablesSetToNull); + $index = array_search('validationMsg', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['matched'] = $matched; + $this->container['validationMsg'] = $validationMsg; return $this; } /** - * Gets taxTreatment + * Gets vatAmount * * @return string|null */ - public function getTaxTreatment(): ?string + public function getVatAmount(): ?string { - return $this->container['taxTreatment']; + return $this->container['vatAmount']; } /** - * Sets taxTreatment + * Sets vatAmount * - * @param string|null $taxTreatment taxTreatment + * @param string|null $vatAmount vatAmount * * @return $this */ - public function setTaxTreatment(?string $taxTreatment): static + public function setVatAmount(?string $vatAmount): static { - if (is_null($taxTreatment)) { - array_push($this->openAPINullablesSetToNull, 'taxTreatment'); + if (is_null($vatAmount)) { + array_push($this->openAPINullablesSetToNull, 'vatAmount'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxTreatment', $nullablesSetToNull); + $index = array_search('vatAmount', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxTreatment'] = $taxTreatment; + $this->container['vatAmount'] = $vatAmount; return $this; } /** - * Gets netPayment + * Gets verificationNumber * * @return string|null */ - public function getNetPayment(): ?string + public function getVerificationNumber(): ?string { - return $this->container['netPayment']; + return $this->container['verificationNumber']; } /** - * Sets netPayment + * Sets verificationNumber * - * @param string|null $netPayment netPayment + * @param string|null $verificationNumber verificationNumber * * @return $this */ - public function setNetPayment(?string $netPayment): static + public function setVerificationNumber(?string $verificationNumber): static { - if (is_null($netPayment)) { - array_push($this->openAPINullablesSetToNull, 'netPayment'); + if (is_null($verificationNumber)) { + array_push($this->openAPINullablesSetToNull, 'verificationNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('netPayment', $nullablesSetToNull); + $index = array_search('verificationNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['netPayment'] = $netPayment; + $this->container['verificationNumber'] = $verificationNumber; return $this; } /** - * Gets vatAmount + * Gets worksRef * * @return string|null */ - public function getVatAmount(): ?string + public function getWorksRef(): ?string { - return $this->container['vatAmount']; + return $this->container['worksRef']; } /** - * Sets vatAmount + * Sets worksRef * - * @param string|null $vatAmount vatAmount + * @param string|null $worksRef worksRef * * @return $this */ - public function setVatAmount(?string $vatAmount): static + public function setWorksRef(?string $worksRef): static { - if (is_null($vatAmount)) { - array_push($this->openAPINullablesSetToNull, 'vatAmount'); + if (is_null($worksRef)) { + array_push($this->openAPINullablesSetToNull, 'worksRef'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('vatAmount', $nullablesSetToNull); + $index = array_search('worksRef', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['vatAmount'] = $vatAmount; + $this->container['worksRef'] = $worksRef; return $this; } diff --git a/src/Model/CisSubContractorSummary.php b/src/Model/CisSubContractorSummary.php index 816b3cd..6d2933c 100644 --- a/src/Model/CisSubContractorSummary.php +++ b/src/Model/CisSubContractorSummary.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,17 +60,17 @@ class CisSubContractorSummary implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ - 'payrollCode' => 'string', - 'tradingName' => 'string', + 'displayName' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'niNumber' => 'string', + 'payrollCode' => 'string', + 'taxStatus' => '\SynergiTech\Staffology\Model\CISTaxStatus', + 'tradingName' => 'string', 'type' => '\SynergiTech\Staffology\Model\CISSubContractorType', 'utr' => 'string', - 'taxStatus' => '\SynergiTech\Staffology\Model\CISTaxStatus', - 'verificationNumber' => 'string', - 'displayName' => 'string', - 'validationMessage' => 'string[]' + 'validationMessage' => 'string[]', + 'verificationNumber' => 'string' ]; /** @@ -79,17 +79,17 @@ class CisSubContractorSummary implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ - 'payrollCode' => null, - 'tradingName' => null, + 'displayName' => null, 'firstName' => null, 'lastName' => null, 'niNumber' => null, + 'payrollCode' => null, + 'taxStatus' => null, + 'tradingName' => null, 'type' => null, 'utr' => null, - 'taxStatus' => null, - 'verificationNumber' => null, - 'displayName' => null, - 'validationMessage' => null + 'validationMessage' => null, + 'verificationNumber' => null ]; /** @@ -98,17 +98,17 @@ class CisSubContractorSummary implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ - 'payrollCode' => true, - 'tradingName' => true, + 'displayName' => true, 'firstName' => true, 'lastName' => true, 'niNumber' => true, + 'payrollCode' => true, + 'taxStatus' => false, + 'tradingName' => true, 'type' => false, 'utr' => true, - 'taxStatus' => false, - 'verificationNumber' => true, - 'displayName' => true, - 'validationMessage' => true + 'validationMessage' => true, + 'verificationNumber' => true ]; /** @@ -197,17 +197,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollCode' => 'payrollCode', - 'tradingName' => 'tradingName', + 'displayName' => 'displayName', 'firstName' => 'firstName', 'lastName' => 'lastName', 'niNumber' => 'niNumber', + 'payrollCode' => 'payrollCode', + 'taxStatus' => 'taxStatus', + 'tradingName' => 'tradingName', 'type' => 'type', 'utr' => 'utr', - 'taxStatus' => 'taxStatus', - 'verificationNumber' => 'verificationNumber', - 'displayName' => 'displayName', - 'validationMessage' => 'validationMessage' + 'validationMessage' => 'validationMessage', + 'verificationNumber' => 'verificationNumber' ]; /** @@ -216,17 +216,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollCode' => 'setPayrollCode', - 'tradingName' => 'setTradingName', + 'displayName' => 'setDisplayName', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', 'niNumber' => 'setNiNumber', + 'payrollCode' => 'setPayrollCode', + 'taxStatus' => 'setTaxStatus', + 'tradingName' => 'setTradingName', 'type' => 'setType', 'utr' => 'setUtr', - 'taxStatus' => 'setTaxStatus', - 'verificationNumber' => 'setVerificationNumber', - 'displayName' => 'setDisplayName', - 'validationMessage' => 'setValidationMessage' + 'validationMessage' => 'setValidationMessage', + 'verificationNumber' => 'setVerificationNumber' ]; /** @@ -235,17 +235,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollCode' => 'getPayrollCode', - 'tradingName' => 'getTradingName', + 'displayName' => 'getDisplayName', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', 'niNumber' => 'getNiNumber', + 'payrollCode' => 'getPayrollCode', + 'taxStatus' => 'getTaxStatus', + 'tradingName' => 'getTradingName', 'type' => 'getType', 'utr' => 'getUtr', - 'taxStatus' => 'getTaxStatus', - 'verificationNumber' => 'getVerificationNumber', - 'displayName' => 'getDisplayName', - 'validationMessage' => 'getValidationMessage' + 'validationMessage' => 'getValidationMessage', + 'verificationNumber' => 'getVerificationNumber' ]; /** @@ -304,17 +304,17 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('tradingName', $data ?? [], null); + $this->setIfExists('displayName', $data ?? [], null); $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('niNumber', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('taxStatus', $data ?? [], null); + $this->setIfExists('tradingName', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('utr', $data ?? [], null); - $this->setIfExists('taxStatus', $data ?? [], null); - $this->setIfExists('verificationNumber', $data ?? [], null); - $this->setIfExists('displayName', $data ?? [], null); $this->setIfExists('validationMessage', $data ?? [], null); + $this->setIfExists('verificationNumber', $data ?? [], null); } /** @@ -360,69 +360,35 @@ public function valid(): bool /** - * Gets payrollCode - * - * @return string|null - */ - public function getPayrollCode(): ?string - { - return $this->container['payrollCode']; - } - - /** - * Sets payrollCode - * - * @param string|null $payrollCode payrollCode - * - * @return $this - */ - public function setPayrollCode(?string $payrollCode): static - { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['payrollCode'] = $payrollCode; - - return $this; - } - - /** - * Gets tradingName + * Gets displayName * * @return string|null */ - public function getTradingName(): ?string + public function getDisplayName(): ?string { - return $this->container['tradingName']; + return $this->container['displayName']; } /** - * Sets tradingName + * Sets displayName * - * @param string|null $tradingName tradingName + * @param string|null $displayName displayName * * @return $this */ - public function setTradingName(?string $tradingName): static + public function setDisplayName(?string $displayName): static { - if (is_null($tradingName)) { - array_push($this->openAPINullablesSetToNull, 'tradingName'); + if (is_null($displayName)) { + array_push($this->openAPINullablesSetToNull, 'displayName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tradingName', $nullablesSetToNull); + $index = array_search('displayName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tradingName'] = $tradingName; + $this->container['displayName'] = $displayName; return $this; } @@ -530,62 +496,35 @@ public function setNiNumber(?string $niNumber): static } /** - * Gets type - * - * @return \SynergiTech\Staffology\Model\CISSubContractorType|null - */ - public function getType(): ?\SynergiTech\Staffology\Model\CISSubContractorType - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \SynergiTech\Staffology\Model\CISSubContractorType|null $type type - * - * @return $this - */ - public function setType(?\SynergiTech\Staffology\Model\CISSubContractorType $type): static - { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets utr + * Gets payrollCode * * @return string|null */ - public function getUtr(): ?string + public function getPayrollCode(): ?string { - return $this->container['utr']; + return $this->container['payrollCode']; } /** - * Sets utr + * Sets payrollCode * - * @param string|null $utr utr + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setUtr(?string $utr): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($utr)) { - array_push($this->openAPINullablesSetToNull, 'utr'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('utr', $nullablesSetToNull); + $index = array_search('payrollCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['utr'] = $utr; + $this->container['payrollCode'] = $payrollCode; return $this; } @@ -618,69 +557,96 @@ public function setTaxStatus(?\SynergiTech\Staffology\Model\CISTaxStatus $taxSta } /** - * Gets verificationNumber + * Gets tradingName * * @return string|null */ - public function getVerificationNumber(): ?string + public function getTradingName(): ?string { - return $this->container['verificationNumber']; + return $this->container['tradingName']; } /** - * Sets verificationNumber + * Sets tradingName * - * @param string|null $verificationNumber verificationNumber + * @param string|null $tradingName tradingName * * @return $this */ - public function setVerificationNumber(?string $verificationNumber): static + public function setTradingName(?string $tradingName): static { - if (is_null($verificationNumber)) { - array_push($this->openAPINullablesSetToNull, 'verificationNumber'); + if (is_null($tradingName)) { + array_push($this->openAPINullablesSetToNull, 'tradingName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('verificationNumber', $nullablesSetToNull); + $index = array_search('tradingName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['verificationNumber'] = $verificationNumber; + $this->container['tradingName'] = $tradingName; return $this; } /** - * Gets displayName + * Gets type + * + * @return \SynergiTech\Staffology\Model\CISSubContractorType|null + */ + public function getType(): ?\SynergiTech\Staffology\Model\CISSubContractorType + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \SynergiTech\Staffology\Model\CISSubContractorType|null $type type + * + * @return $this + */ + public function setType(?\SynergiTech\Staffology\Model\CISSubContractorType $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets utr * * @return string|null */ - public function getDisplayName(): ?string + public function getUtr(): ?string { - return $this->container['displayName']; + return $this->container['utr']; } /** - * Sets displayName + * Sets utr * - * @param string|null $displayName displayName + * @param string|null $utr utr * * @return $this */ - public function setDisplayName(?string $displayName): static + public function setUtr(?string $utr): static { - if (is_null($displayName)) { - array_push($this->openAPINullablesSetToNull, 'displayName'); + if (is_null($utr)) { + array_push($this->openAPINullablesSetToNull, 'utr'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('displayName', $nullablesSetToNull); + $index = array_search('utr', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['displayName'] = $displayName; + $this->container['utr'] = $utr; return $this; } @@ -718,6 +684,40 @@ public function setValidationMessage(?array $validationMessage): static return $this; } + + /** + * Gets verificationNumber + * + * @return string|null + */ + public function getVerificationNumber(): ?string + { + return $this->container['verificationNumber']; + } + + /** + * Sets verificationNumber + * + * @param string|null $verificationNumber verificationNumber + * + * @return $this + */ + public function setVerificationNumber(?string $verificationNumber): static + { + if (is_null($verificationNumber)) { + array_push($this->openAPINullablesSetToNull, 'verificationNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('verificationNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['verificationNumber'] = $verificationNumber; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/CisSubContractorSummaryListReportResponse.php b/src/Model/CisSubContractorSummaryListReportResponse.php index 445bdef..07b48a2 100644 --- a/src/Model/CisSubContractorSummaryListReportResponse.php +++ b/src/Model/CisSubContractorSummaryListReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class CisSubContractorSummaryListReportResponse implements ModelInterface, Array * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\CisSubContractorSummary[]', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class CisSubContractorSummaryListReportResponse implements ModelInterface, Array * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class CisSubContractorSummaryListReportResponse implements ModelInterface, Array * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => true, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -445,6 +411,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/CisVerification.php b/src/Model/CisVerification.php index 4790beb..a99bbd0 100644 --- a/src/Model/CisVerification.php +++ b/src/Model/CisVerification.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,16 +60,16 @@ class CisVerification implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'employees' => '\SynergiTech\Staffology\Model\Item[]', - 'employeeCount' => 'int', 'cisRequest' => '\SynergiTech\Staffology\Model\CisRequest', - 'responses' => '\SynergiTech\Staffology\Model\CisSubContractor[]', - 'iRmark' => 'string', - 'xml' => 'string', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'employeeCount' => 'int', + 'employees' => '\SynergiTech\Staffology\Model\Item[]', 'employerReferences' => '\SynergiTech\Staffology\Model\EmpRefs', 'govTalkSubmission' => '\SynergiTech\Staffology\Model\GovTalkSubmission', - 'id' => 'string' + 'iRmark' => 'string', + 'id' => 'string', + 'responses' => '\SynergiTech\Staffology\Model\CisSubContractor[]', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'xml' => 'string' ]; /** @@ -78,16 +78,16 @@ class CisVerification implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'employees' => null, - 'employeeCount' => 'int32', 'cisRequest' => null, - 'responses' => null, - 'iRmark' => null, - 'xml' => null, - 'taxYear' => null, + 'employeeCount' => 'int32', + 'employees' => null, 'employerReferences' => null, 'govTalkSubmission' => null, - 'id' => 'uuid' + 'iRmark' => null, + 'id' => 'uuid', + 'responses' => null, + 'taxYear' => null, + 'xml' => null ]; /** @@ -96,16 +96,16 @@ class CisVerification implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'employees' => true, - 'employeeCount' => false, 'cisRequest' => false, - 'responses' => true, - 'iRmark' => true, - 'xml' => true, - 'taxYear' => false, + 'employeeCount' => false, + 'employees' => true, 'employerReferences' => false, 'govTalkSubmission' => false, - 'id' => false + 'iRmark' => true, + 'id' => false, + 'responses' => true, + 'taxYear' => false, + 'xml' => true ]; /** @@ -194,16 +194,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employees' => 'employees', - 'employeeCount' => 'employeeCount', 'cisRequest' => 'cisRequest', - 'responses' => 'responses', - 'iRmark' => 'iRmark', - 'xml' => 'xml', - 'taxYear' => 'taxYear', + 'employeeCount' => 'employeeCount', + 'employees' => 'employees', 'employerReferences' => 'employerReferences', 'govTalkSubmission' => 'govTalkSubmission', - 'id' => 'id' + 'iRmark' => 'iRmark', + 'id' => 'id', + 'responses' => 'responses', + 'taxYear' => 'taxYear', + 'xml' => 'xml' ]; /** @@ -212,16 +212,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employees' => 'setEmployees', - 'employeeCount' => 'setEmployeeCount', 'cisRequest' => 'setCisRequest', - 'responses' => 'setResponses', - 'iRmark' => 'setIRmark', - 'xml' => 'setXml', - 'taxYear' => 'setTaxYear', + 'employeeCount' => 'setEmployeeCount', + 'employees' => 'setEmployees', 'employerReferences' => 'setEmployerReferences', 'govTalkSubmission' => 'setGovTalkSubmission', - 'id' => 'setId' + 'iRmark' => 'setIRmark', + 'id' => 'setId', + 'responses' => 'setResponses', + 'taxYear' => 'setTaxYear', + 'xml' => 'setXml' ]; /** @@ -230,16 +230,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employees' => 'getEmployees', - 'employeeCount' => 'getEmployeeCount', 'cisRequest' => 'getCisRequest', - 'responses' => 'getResponses', - 'iRmark' => 'getIRmark', - 'xml' => 'getXml', - 'taxYear' => 'getTaxYear', + 'employeeCount' => 'getEmployeeCount', + 'employees' => 'getEmployees', 'employerReferences' => 'getEmployerReferences', 'govTalkSubmission' => 'getGovTalkSubmission', - 'id' => 'getId' + 'iRmark' => 'getIRmark', + 'id' => 'getId', + 'responses' => 'getResponses', + 'taxYear' => 'getTaxYear', + 'xml' => 'getXml' ]; /** @@ -298,16 +298,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employees', $data ?? [], null); - $this->setIfExists('employeeCount', $data ?? [], null); $this->setIfExists('cisRequest', $data ?? [], null); - $this->setIfExists('responses', $data ?? [], null); - $this->setIfExists('iRmark', $data ?? [], null); - $this->setIfExists('xml', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('employeeCount', $data ?? [], null); + $this->setIfExists('employees', $data ?? [], null); $this->setIfExists('employerReferences', $data ?? [], null); $this->setIfExists('govTalkSubmission', $data ?? [], null); + $this->setIfExists('iRmark', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('responses', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('xml', $data ?? [], null); } /** @@ -353,35 +353,28 @@ public function valid(): bool /** - * Gets employees + * Gets cisRequest * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return \SynergiTech\Staffology\Model\CisRequest|null */ - public function getEmployees(): ?array + public function getCisRequest(): ?\SynergiTech\Staffology\Model\CisRequest { - return $this->container['employees']; + return $this->container['cisRequest']; } /** - * Sets employees + * Sets cisRequest * - * @param \SynergiTech\Staffology\Model\Item[]|null $employees employees + * @param \SynergiTech\Staffology\Model\CisRequest|null $cisRequest cisRequest * * @return $this */ - public function setEmployees(?array $employees): static + public function setCisRequest(?\SynergiTech\Staffology\Model\CisRequest $cisRequest): static { - if (is_null($employees)) { - array_push($this->openAPINullablesSetToNull, 'employees'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employees', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($cisRequest)) { + throw new InvalidArgumentException('non-nullable cisRequest cannot be null'); } - $this->container['employees'] = $employees; + $this->container['cisRequest'] = $cisRequest; return $this; } @@ -414,238 +407,245 @@ public function setEmployeeCount(?int $employeeCount): static } /** - * Gets cisRequest + * Gets employees * - * @return \SynergiTech\Staffology\Model\CisRequest|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getCisRequest(): ?\SynergiTech\Staffology\Model\CisRequest + public function getEmployees(): ?array { - return $this->container['cisRequest']; + return $this->container['employees']; } /** - * Sets cisRequest + * Sets employees * - * @param \SynergiTech\Staffology\Model\CisRequest|null $cisRequest cisRequest + * @param \SynergiTech\Staffology\Model\Item[]|null $employees employees * * @return $this */ - public function setCisRequest(?\SynergiTech\Staffology\Model\CisRequest $cisRequest): static + public function setEmployees(?array $employees): static { - if (is_null($cisRequest)) { - throw new InvalidArgumentException('non-nullable cisRequest cannot be null'); + if (is_null($employees)) { + array_push($this->openAPINullablesSetToNull, 'employees'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employees', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['cisRequest'] = $cisRequest; + $this->container['employees'] = $employees; return $this; } /** - * Gets responses + * Gets employerReferences * - * @return \SynergiTech\Staffology\Model\CisSubContractor[]|null + * @return \SynergiTech\Staffology\Model\EmpRefs|null */ - public function getResponses(): ?array + public function getEmployerReferences(): ?\SynergiTech\Staffology\Model\EmpRefs { - return $this->container['responses']; + return $this->container['employerReferences']; } /** - * Sets responses + * Sets employerReferences * - * @param \SynergiTech\Staffology\Model\CisSubContractor[]|null $responses responses + * @param \SynergiTech\Staffology\Model\EmpRefs|null $employerReferences employerReferences * * @return $this */ - public function setResponses(?array $responses): static + public function setEmployerReferences(?\SynergiTech\Staffology\Model\EmpRefs $employerReferences): static { - if (is_null($responses)) { - array_push($this->openAPINullablesSetToNull, 'responses'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('responses', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employerReferences)) { + throw new InvalidArgumentException('non-nullable employerReferences cannot be null'); } - $this->container['responses'] = $responses; + $this->container['employerReferences'] = $employerReferences; return $this; } /** - * Gets iRmark + * Gets govTalkSubmission * - * @return string|null + * @return \SynergiTech\Staffology\Model\GovTalkSubmission|null */ - public function getIRmark(): ?string + public function getGovTalkSubmission(): ?\SynergiTech\Staffology\Model\GovTalkSubmission { - return $this->container['iRmark']; + return $this->container['govTalkSubmission']; } /** - * Sets iRmark + * Sets govTalkSubmission * - * @param string|null $iRmark iRmark + * @param \SynergiTech\Staffology\Model\GovTalkSubmission|null $govTalkSubmission govTalkSubmission * * @return $this */ - public function setIRmark(?string $iRmark): static + public function setGovTalkSubmission(?\SynergiTech\Staffology\Model\GovTalkSubmission $govTalkSubmission): static { - if (is_null($iRmark)) { - array_push($this->openAPINullablesSetToNull, 'iRmark'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('iRmark', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($govTalkSubmission)) { + throw new InvalidArgumentException('non-nullable govTalkSubmission cannot be null'); } - $this->container['iRmark'] = $iRmark; + $this->container['govTalkSubmission'] = $govTalkSubmission; return $this; } /** - * Gets xml + * Gets iRmark * * @return string|null */ - public function getXml(): ?string + public function getIRmark(): ?string { - return $this->container['xml']; + return $this->container['iRmark']; } /** - * Sets xml + * Sets iRmark * - * @param string|null $xml This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. + * @param string|null $iRmark iRmark * * @return $this */ - public function setXml(?string $xml): static + public function setIRmark(?string $iRmark): static { - if (is_null($xml)) { - array_push($this->openAPINullablesSetToNull, 'xml'); + if (is_null($iRmark)) { + array_push($this->openAPINullablesSetToNull, 'iRmark'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('xml', $nullablesSetToNull); + $index = array_search('iRmark', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['xml'] = $xml; + $this->container['iRmark'] = $iRmark; return $this; } /** - * Gets taxYear + * Gets id * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return string|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getId(): ?string { - return $this->container['taxYear']; + return $this->container['id']; } /** - * Sets taxYear + * Sets id * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setId(?string $id): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['id'] = $id; return $this; } /** - * Gets employerReferences + * Gets responses * - * @return \SynergiTech\Staffology\Model\EmpRefs|null + * @return \SynergiTech\Staffology\Model\CisSubContractor[]|null */ - public function getEmployerReferences(): ?\SynergiTech\Staffology\Model\EmpRefs + public function getResponses(): ?array { - return $this->container['employerReferences']; + return $this->container['responses']; } /** - * Sets employerReferences + * Sets responses * - * @param \SynergiTech\Staffology\Model\EmpRefs|null $employerReferences employerReferences + * @param \SynergiTech\Staffology\Model\CisSubContractor[]|null $responses responses * * @return $this */ - public function setEmployerReferences(?\SynergiTech\Staffology\Model\EmpRefs $employerReferences): static + public function setResponses(?array $responses): static { - if (is_null($employerReferences)) { - throw new InvalidArgumentException('non-nullable employerReferences cannot be null'); + if (is_null($responses)) { + array_push($this->openAPINullablesSetToNull, 'responses'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('responses', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employerReferences'] = $employerReferences; + $this->container['responses'] = $responses; return $this; } /** - * Gets govTalkSubmission + * Gets taxYear * - * @return \SynergiTech\Staffology\Model\GovTalkSubmission|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getGovTalkSubmission(): ?\SynergiTech\Staffology\Model\GovTalkSubmission + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['govTalkSubmission']; + return $this->container['taxYear']; } /** - * Sets govTalkSubmission + * Sets taxYear * - * @param \SynergiTech\Staffology\Model\GovTalkSubmission|null $govTalkSubmission govTalkSubmission + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setGovTalkSubmission(?\SynergiTech\Staffology\Model\GovTalkSubmission $govTalkSubmission): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($govTalkSubmission)) { - throw new InvalidArgumentException('non-nullable govTalkSubmission cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['govTalkSubmission'] = $govTalkSubmission; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets id + * Gets xml * * @return string|null */ - public function getId(): ?string + public function getXml(): ?string { - return $this->container['id']; + return $this->container['xml']; } /** - * Sets id + * Sets xml * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $xml This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. * * @return $this */ - public function setId(?string $id): static + public function setXml(?string $xml): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($xml)) { + array_push($this->openAPINullablesSetToNull, 'xml'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('xml', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['xml'] = $xml; return $this; } diff --git a/src/Model/CisVerificationDetails.php b/src/Model/CisVerificationDetails.php index 634baa1..d05ada7 100644 --- a/src/Model/CisVerificationDetails.php +++ b/src/Model/CisVerificationDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class CisVerificationDetails implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ + 'date' => '\DateTime', 'manuallyEntered' => 'bool', 'matchInsteadOfVerify' => 'bool', 'number' => 'string', - 'date' => '\DateTime', 'taxStatus' => '\SynergiTech\Staffology\Model\CISTaxStatus', 'verificationRequest' => 'string', 'verificationResponse' => '\SynergiTech\Staffology\Model\CisSubContractor' @@ -74,10 +74,10 @@ class CisVerificationDetails implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ + 'date' => 'date', 'manuallyEntered' => null, 'matchInsteadOfVerify' => null, 'number' => null, - 'date' => 'date', 'taxStatus' => null, 'verificationRequest' => 'uuid', 'verificationResponse' => null @@ -89,10 +89,10 @@ class CisVerificationDetails implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ + 'date' => true, 'manuallyEntered' => false, 'matchInsteadOfVerify' => false, 'number' => true, - 'date' => true, 'taxStatus' => false, 'verificationRequest' => true, 'verificationResponse' => false @@ -184,10 +184,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'date' => 'date', 'manuallyEntered' => 'manuallyEntered', 'matchInsteadOfVerify' => 'matchInsteadOfVerify', 'number' => 'number', - 'date' => 'date', 'taxStatus' => 'taxStatus', 'verificationRequest' => 'verificationRequest', 'verificationResponse' => 'verificationResponse' @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'date' => 'setDate', 'manuallyEntered' => 'setManuallyEntered', 'matchInsteadOfVerify' => 'setMatchInsteadOfVerify', 'number' => 'setNumber', - 'date' => 'setDate', 'taxStatus' => 'setTaxStatus', 'verificationRequest' => 'setVerificationRequest', 'verificationResponse' => 'setVerificationResponse' @@ -214,10 +214,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'date' => 'getDate', 'manuallyEntered' => 'getManuallyEntered', 'matchInsteadOfVerify' => 'getMatchInsteadOfVerify', 'number' => 'getNumber', - 'date' => 'getDate', 'taxStatus' => 'getTaxStatus', 'verificationRequest' => 'getVerificationRequest', 'verificationResponse' => 'getVerificationResponse' @@ -279,10 +279,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('date', $data ?? [], null); $this->setIfExists('manuallyEntered', $data ?? [], null); $this->setIfExists('matchInsteadOfVerify', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); - $this->setIfExists('date', $data ?? [], null); $this->setIfExists('taxStatus', $data ?? [], null); $this->setIfExists('verificationRequest', $data ?? [], null); $this->setIfExists('verificationResponse', $data ?? [], null); @@ -330,6 +330,40 @@ public function valid(): bool } + /** + * Gets date + * + * @return \DateTime|null + */ + public function getDate(): ?\DateTime + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param \DateTime|null $date date + * + * @return $this + */ + public function setDate(?\DateTime $date): static + { + if (is_null($date)) { + array_push($this->openAPINullablesSetToNull, 'date'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('date', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['date'] = $date; + + return $this; + } + /** * Gets manuallyEntered * @@ -418,40 +452,6 @@ public function setNumber(?string $number): static return $this; } - /** - * Gets date - * - * @return \DateTime|null - */ - public function getDate(): ?\DateTime - { - return $this->container['date']; - } - - /** - * Sets date - * - * @param \DateTime|null $date date - * - * @return $this - */ - public function setDate(?\DateTime $date): static - { - if (is_null($date)) { - array_push($this->openAPINullablesSetToNull, 'date'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('date', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['date'] = $date; - - return $this; - } - /** * Gets taxStatus * diff --git a/src/Model/ContractAddress.php b/src/Model/ContractAddress.php index b78f721..c7c1436 100644 --- a/src/Model/ContractAddress.php +++ b/src/Model/ContractAddress.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class ContractAddress implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'country' => '\SynergiTech\Staffology\Model\Country', + 'foreignCountry' => 'string', 'line1' => 'string', 'line2' => 'string', 'line3' => 'string', 'line4' => 'string', 'line5' => 'string', - 'postCode' => 'string', - 'country' => '\SynergiTech\Staffology\Model\Country', - 'foreignCountry' => 'string' + 'postCode' => 'string' ]; /** @@ -75,14 +75,14 @@ class ContractAddress implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'country' => null, + 'foreignCountry' => null, 'line1' => null, 'line2' => null, 'line3' => null, 'line4' => null, 'line5' => null, - 'postCode' => null, - 'country' => null, - 'foreignCountry' => null + 'postCode' => null ]; /** @@ -91,14 +91,14 @@ class ContractAddress implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'country' => false, + 'foreignCountry' => true, 'line1' => true, 'line2' => true, 'line3' => true, 'line4' => true, 'line5' => true, - 'postCode' => true, - 'country' => false, - 'foreignCountry' => true + 'postCode' => true ]; /** @@ -187,14 +187,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'country' => 'country', + 'foreignCountry' => 'foreignCountry', 'line1' => 'line1', 'line2' => 'line2', 'line3' => 'line3', 'line4' => 'line4', 'line5' => 'line5', - 'postCode' => 'postCode', - 'country' => 'country', - 'foreignCountry' => 'foreignCountry' + 'postCode' => 'postCode' ]; /** @@ -203,14 +203,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'country' => 'setCountry', + 'foreignCountry' => 'setForeignCountry', 'line1' => 'setLine1', 'line2' => 'setLine2', 'line3' => 'setLine3', 'line4' => 'setLine4', 'line5' => 'setLine5', - 'postCode' => 'setPostCode', - 'country' => 'setCountry', - 'foreignCountry' => 'setForeignCountry' + 'postCode' => 'setPostCode' ]; /** @@ -219,14 +219,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'country' => 'getCountry', + 'foreignCountry' => 'getForeignCountry', 'line1' => 'getLine1', 'line2' => 'getLine2', 'line3' => 'getLine3', 'line4' => 'getLine4', 'line5' => 'getLine5', - 'postCode' => 'getPostCode', - 'country' => 'getCountry', - 'foreignCountry' => 'getForeignCountry' + 'postCode' => 'getPostCode' ]; /** @@ -285,14 +285,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('foreignCountry', $data ?? [], null); $this->setIfExists('line1', $data ?? [], null); $this->setIfExists('line2', $data ?? [], null); $this->setIfExists('line3', $data ?? [], null); $this->setIfExists('line4', $data ?? [], null); $this->setIfExists('line5', $data ?? [], null); $this->setIfExists('postCode', $data ?? [], null); - $this->setIfExists('country', $data ?? [], null); - $this->setIfExists('foreignCountry', $data ?? [], null); } /** @@ -337,6 +337,67 @@ public function valid(): bool } + /** + * Gets country + * + * @return \SynergiTech\Staffology\Model\Country|null + */ + public function getCountry(): ?\SynergiTech\Staffology\Model\Country + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param \SynergiTech\Staffology\Model\Country|null $country country + * + * @return $this + */ + public function setCountry(?\SynergiTech\Staffology\Model\Country $country): static + { + if (is_null($country)) { + throw new InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets foreignCountry + * + * @return string|null + */ + public function getForeignCountry(): ?string + { + return $this->container['foreignCountry']; + } + + /** + * Sets foreignCountry + * + * @param string|null $foreignCountry foreignCountry + * + * @return $this + */ + public function setForeignCountry(?string $foreignCountry): static + { + if (is_null($foreignCountry)) { + array_push($this->openAPINullablesSetToNull, 'foreignCountry'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('foreignCountry', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['foreignCountry'] = $foreignCountry; + + return $this; + } + /** * Gets line1 * @@ -540,67 +601,6 @@ public function setPostCode(?string $postCode): static return $this; } - - /** - * Gets country - * - * @return \SynergiTech\Staffology\Model\Country|null - */ - public function getCountry(): ?\SynergiTech\Staffology\Model\Country - { - return $this->container['country']; - } - - /** - * Sets country - * - * @param \SynergiTech\Staffology\Model\Country|null $country country - * - * @return $this - */ - public function setCountry(?\SynergiTech\Staffology\Model\Country $country): static - { - if (is_null($country)) { - throw new InvalidArgumentException('non-nullable country cannot be null'); - } - $this->container['country'] = $country; - - return $this; - } - - /** - * Gets foreignCountry - * - * @return string|null - */ - public function getForeignCountry(): ?string - { - return $this->container['foreignCountry']; - } - - /** - * Sets foreignCountry - * - * @param string|null $foreignCountry foreignCountry - * - * @return $this - */ - public function setForeignCountry(?string $foreignCountry): static - { - if (is_null($foreignCountry)) { - array_push($this->openAPINullablesSetToNull, 'foreignCountry'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('foreignCountry', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['foreignCountry'] = $foreignCountry; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractAeAssessmentAction.php b/src/Model/ContractAeAssessmentAction.php index 0b4dd51..df3244a 100644 --- a/src/Model/ContractAeAssessmentAction.php +++ b/src/Model/ContractAeAssessmentAction.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,13 +60,13 @@ class ContractAeAssessmentAction implements ModelInterface, ArrayAccess, JsonSer */ protected static array $openAPITypes = [ 'action' => '\SynergiTech\Staffology\Model\AeAction', - 'employeeState' => '\SynergiTech\Staffology\Model\AeEmployeeState', 'actionCompleted' => 'bool', 'actionCompletedMessage' => 'string', - 'requiredLetter' => '\SynergiTech\Staffology\Model\AeStatutoryLetter', + 'employeeState' => '\SynergiTech\Staffology\Model\AeEmployeeState', + 'letterNotYetSent' => 'bool', 'pensionSchemeId' => 'string', - 'workerGroupId' => 'string', - 'letterNotYetSent' => 'bool' + 'requiredLetter' => '\SynergiTech\Staffology\Model\AeStatutoryLetter', + 'workerGroupId' => 'string' ]; /** @@ -76,13 +76,13 @@ class ContractAeAssessmentAction implements ModelInterface, ArrayAccess, JsonSer */ protected static array $openAPIFormats = [ 'action' => null, - 'employeeState' => null, 'actionCompleted' => null, 'actionCompletedMessage' => null, - 'requiredLetter' => null, + 'employeeState' => null, + 'letterNotYetSent' => null, 'pensionSchemeId' => 'uuid', - 'workerGroupId' => 'uuid', - 'letterNotYetSent' => null + 'requiredLetter' => null, + 'workerGroupId' => 'uuid' ]; /** @@ -92,13 +92,13 @@ class ContractAeAssessmentAction implements ModelInterface, ArrayAccess, JsonSer */ protected static array $openAPINullables = [ 'action' => false, - 'employeeState' => false, 'actionCompleted' => false, 'actionCompletedMessage' => true, - 'requiredLetter' => false, + 'employeeState' => false, + 'letterNotYetSent' => false, 'pensionSchemeId' => false, - 'workerGroupId' => false, - 'letterNotYetSent' => false + 'requiredLetter' => false, + 'workerGroupId' => false ]; /** @@ -188,13 +188,13 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'action' => 'action', - 'employeeState' => 'employeeState', 'actionCompleted' => 'actionCompleted', 'actionCompletedMessage' => 'actionCompletedMessage', - 'requiredLetter' => 'requiredLetter', + 'employeeState' => 'employeeState', + 'letterNotYetSent' => 'letterNotYetSent', 'pensionSchemeId' => 'pensionSchemeId', - 'workerGroupId' => 'workerGroupId', - 'letterNotYetSent' => 'letterNotYetSent' + 'requiredLetter' => 'requiredLetter', + 'workerGroupId' => 'workerGroupId' ]; /** @@ -204,13 +204,13 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'action' => 'setAction', - 'employeeState' => 'setEmployeeState', 'actionCompleted' => 'setActionCompleted', 'actionCompletedMessage' => 'setActionCompletedMessage', - 'requiredLetter' => 'setRequiredLetter', + 'employeeState' => 'setEmployeeState', + 'letterNotYetSent' => 'setLetterNotYetSent', 'pensionSchemeId' => 'setPensionSchemeId', - 'workerGroupId' => 'setWorkerGroupId', - 'letterNotYetSent' => 'setLetterNotYetSent' + 'requiredLetter' => 'setRequiredLetter', + 'workerGroupId' => 'setWorkerGroupId' ]; /** @@ -220,13 +220,13 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'action' => 'getAction', - 'employeeState' => 'getEmployeeState', 'actionCompleted' => 'getActionCompleted', 'actionCompletedMessage' => 'getActionCompletedMessage', - 'requiredLetter' => 'getRequiredLetter', + 'employeeState' => 'getEmployeeState', + 'letterNotYetSent' => 'getLetterNotYetSent', 'pensionSchemeId' => 'getPensionSchemeId', - 'workerGroupId' => 'getWorkerGroupId', - 'letterNotYetSent' => 'getLetterNotYetSent' + 'requiredLetter' => 'getRequiredLetter', + 'workerGroupId' => 'getWorkerGroupId' ]; /** @@ -286,13 +286,13 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('action', $data ?? [], null); - $this->setIfExists('employeeState', $data ?? [], null); $this->setIfExists('actionCompleted', $data ?? [], null); $this->setIfExists('actionCompletedMessage', $data ?? [], null); - $this->setIfExists('requiredLetter', $data ?? [], null); + $this->setIfExists('employeeState', $data ?? [], null); + $this->setIfExists('letterNotYetSent', $data ?? [], null); $this->setIfExists('pensionSchemeId', $data ?? [], null); + $this->setIfExists('requiredLetter', $data ?? [], null); $this->setIfExists('workerGroupId', $data ?? [], null); - $this->setIfExists('letterNotYetSent', $data ?? [], null); } /** @@ -364,33 +364,6 @@ public function setAction(?\SynergiTech\Staffology\Model\AeAction $action): stat return $this; } - /** - * Gets employeeState - * - * @return \SynergiTech\Staffology\Model\AeEmployeeState|null - */ - public function getEmployeeState(): ?\SynergiTech\Staffology\Model\AeEmployeeState - { - return $this->container['employeeState']; - } - - /** - * Sets employeeState - * - * @param \SynergiTech\Staffology\Model\AeEmployeeState|null $employeeState employeeState - * - * @return $this - */ - public function setEmployeeState(?\SynergiTech\Staffology\Model\AeEmployeeState $employeeState): static - { - if (is_null($employeeState)) { - throw new InvalidArgumentException('non-nullable employeeState cannot be null'); - } - $this->container['employeeState'] = $employeeState; - - return $this; - } - /** * Gets actionCompleted * @@ -453,28 +426,55 @@ public function setActionCompletedMessage(?string $actionCompletedMessage): stat } /** - * Gets requiredLetter + * Gets employeeState * - * @return \SynergiTech\Staffology\Model\AeStatutoryLetter|null + * @return \SynergiTech\Staffology\Model\AeEmployeeState|null */ - public function getRequiredLetter(): ?\SynergiTech\Staffology\Model\AeStatutoryLetter + public function getEmployeeState(): ?\SynergiTech\Staffology\Model\AeEmployeeState { - return $this->container['requiredLetter']; + return $this->container['employeeState']; } /** - * Sets requiredLetter + * Sets employeeState * - * @param \SynergiTech\Staffology\Model\AeStatutoryLetter|null $requiredLetter requiredLetter + * @param \SynergiTech\Staffology\Model\AeEmployeeState|null $employeeState employeeState * * @return $this */ - public function setRequiredLetter(?\SynergiTech\Staffology\Model\AeStatutoryLetter $requiredLetter): static + public function setEmployeeState(?\SynergiTech\Staffology\Model\AeEmployeeState $employeeState): static { - if (is_null($requiredLetter)) { - throw new InvalidArgumentException('non-nullable requiredLetter cannot be null'); + if (is_null($employeeState)) { + throw new InvalidArgumentException('non-nullable employeeState cannot be null'); } - $this->container['requiredLetter'] = $requiredLetter; + $this->container['employeeState'] = $employeeState; + + return $this; + } + + /** + * Gets letterNotYetSent + * + * @return bool|null + */ + public function getLetterNotYetSent(): ?bool + { + return $this->container['letterNotYetSent']; + } + + /** + * Sets letterNotYetSent + * + * @param bool|null $letterNotYetSent Indicates whether or not any required letter has been sent + * + * @return $this + */ + public function setLetterNotYetSent(?bool $letterNotYetSent): static + { + if (is_null($letterNotYetSent)) { + throw new InvalidArgumentException('non-nullable letterNotYetSent cannot be null'); + } + $this->container['letterNotYetSent'] = $letterNotYetSent; return $this; } @@ -507,55 +507,55 @@ public function setPensionSchemeId(?string $pensionSchemeId): static } /** - * Gets workerGroupId + * Gets requiredLetter * - * @return string|null + * @return \SynergiTech\Staffology\Model\AeStatutoryLetter|null */ - public function getWorkerGroupId(): ?string + public function getRequiredLetter(): ?\SynergiTech\Staffology\Model\AeStatutoryLetter { - return $this->container['workerGroupId']; + return $this->container['requiredLetter']; } /** - * Sets workerGroupId + * Sets requiredLetter * - * @param string|null $workerGroupId The WorkerGroupId that a completed action relates to + * @param \SynergiTech\Staffology\Model\AeStatutoryLetter|null $requiredLetter requiredLetter * * @return $this */ - public function setWorkerGroupId(?string $workerGroupId): static + public function setRequiredLetter(?\SynergiTech\Staffology\Model\AeStatutoryLetter $requiredLetter): static { - if (is_null($workerGroupId)) { - throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); + if (is_null($requiredLetter)) { + throw new InvalidArgumentException('non-nullable requiredLetter cannot be null'); } - $this->container['workerGroupId'] = $workerGroupId; + $this->container['requiredLetter'] = $requiredLetter; return $this; } /** - * Gets letterNotYetSent + * Gets workerGroupId * - * @return bool|null + * @return string|null */ - public function getLetterNotYetSent(): ?bool + public function getWorkerGroupId(): ?string { - return $this->container['letterNotYetSent']; + return $this->container['workerGroupId']; } /** - * Sets letterNotYetSent + * Sets workerGroupId * - * @param bool|null $letterNotYetSent Indicates whether or not any required letter has been sent + * @param string|null $workerGroupId The WorkerGroupId that a completed action relates to * * @return $this */ - public function setLetterNotYetSent(?bool $letterNotYetSent): static + public function setWorkerGroupId(?string $workerGroupId): static { - if (is_null($letterNotYetSent)) { - throw new InvalidArgumentException('non-nullable letterNotYetSent cannot be null'); + if (is_null($workerGroupId)) { + throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); } - $this->container['letterNotYetSent'] = $letterNotYetSent; + $this->container['workerGroupId'] = $workerGroupId; return $this; } diff --git a/src/Model/ContractAeAssessmentRequest.php b/src/Model/ContractAeAssessmentRequest.php index 1529f56..16bd939 100644 --- a/src/Model/ContractAeAssessmentRequest.php +++ b/src/Model/ContractAeAssessmentRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractAeAssessmentResponse.php b/src/Model/ContractAeAssessmentResponse.php index 1f984ef..979a9fd 100644 --- a/src/Model/ContractAeAssessmentResponse.php +++ b/src/Model/ContractAeAssessmentResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,20 +59,20 @@ class ContractAeAssessmentResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'employeeState' => '\SynergiTech\Staffology\Model\AeEmployeeState', + 'action' => '\SynergiTech\Staffology\Model\ContractAeAssessmentAction', + 'aeExclusionCode' => '\SynergiTech\Staffology\Model\AeExclusionCode', 'age' => 'int', - 'ukWorker' => '\SynergiTech\Staffology\Model\AeUKWorker', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', - 'ordinal' => 'int', + 'assessmentDate' => '\DateTime', 'earningsInPeriod' => 'float', + 'employee' => '\SynergiTech\Staffology\Model\ContractEmployeeItem', + 'employeeState' => '\SynergiTech\Staffology\Model\AeEmployeeState', + 'id' => 'string', + 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'qualifyingEarningsInPeriod' => 'float', - 'aeExclusionCode' => '\SynergiTech\Staffology\Model\AeExclusionCode', - 'status' => '\SynergiTech\Staffology\Model\AeStatus', 'reason' => 'string', - 'action' => '\SynergiTech\Staffology\Model\ContractAeAssessmentAction', - 'employee' => '\SynergiTech\Staffology\Model\ContractEmployeeItem', - 'assessmentDate' => '\DateTime' + 'status' => '\SynergiTech\Staffology\Model\AeStatus', + 'ukWorker' => '\SynergiTech\Staffology\Model\AeUKWorker' ]; /** @@ -81,20 +81,20 @@ class ContractAeAssessmentResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'employeeState' => null, + 'action' => null, + 'aeExclusionCode' => null, 'age' => 'int32', - 'ukWorker' => null, - 'payPeriod' => null, - 'ordinal' => 'int32', + 'assessmentDate' => 'date', 'earningsInPeriod' => 'double', + 'employee' => null, + 'employeeState' => null, + 'id' => 'uuid', + 'ordinal' => 'int32', + 'payPeriod' => null, 'qualifyingEarningsInPeriod' => 'double', - 'aeExclusionCode' => null, - 'status' => null, 'reason' => null, - 'action' => null, - 'employee' => null, - 'assessmentDate' => 'date' + 'status' => null, + 'ukWorker' => null ]; /** @@ -103,20 +103,20 @@ class ContractAeAssessmentResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'employeeState' => false, + 'action' => false, + 'aeExclusionCode' => false, 'age' => false, - 'ukWorker' => false, - 'payPeriod' => false, - 'ordinal' => false, + 'assessmentDate' => false, 'earningsInPeriod' => false, + 'employee' => false, + 'employeeState' => false, + 'id' => false, + 'ordinal' => false, + 'payPeriod' => false, 'qualifyingEarningsInPeriod' => false, - 'aeExclusionCode' => false, - 'status' => false, 'reason' => true, - 'action' => false, - 'employee' => false, - 'assessmentDate' => false + 'status' => false, + 'ukWorker' => false ]; /** @@ -205,20 +205,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'employeeState' => 'employeeState', + 'action' => 'action', + 'aeExclusionCode' => 'aeExclusionCode', 'age' => 'age', - 'ukWorker' => 'ukWorker', - 'payPeriod' => 'payPeriod', - 'ordinal' => 'ordinal', + 'assessmentDate' => 'assessmentDate', 'earningsInPeriod' => 'earningsInPeriod', + 'employee' => 'employee', + 'employeeState' => 'employeeState', + 'id' => 'id', + 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', 'qualifyingEarningsInPeriod' => 'qualifyingEarningsInPeriod', - 'aeExclusionCode' => 'aeExclusionCode', - 'status' => 'status', 'reason' => 'reason', - 'action' => 'action', - 'employee' => 'employee', - 'assessmentDate' => 'assessmentDate' + 'status' => 'status', + 'ukWorker' => 'ukWorker' ]; /** @@ -227,20 +227,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'employeeState' => 'setEmployeeState', + 'action' => 'setAction', + 'aeExclusionCode' => 'setAeExclusionCode', 'age' => 'setAge', - 'ukWorker' => 'setUkWorker', - 'payPeriod' => 'setPayPeriod', - 'ordinal' => 'setOrdinal', + 'assessmentDate' => 'setAssessmentDate', 'earningsInPeriod' => 'setEarningsInPeriod', + 'employee' => 'setEmployee', + 'employeeState' => 'setEmployeeState', + 'id' => 'setId', + 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', 'qualifyingEarningsInPeriod' => 'setQualifyingEarningsInPeriod', - 'aeExclusionCode' => 'setAeExclusionCode', - 'status' => 'setStatus', 'reason' => 'setReason', - 'action' => 'setAction', - 'employee' => 'setEmployee', - 'assessmentDate' => 'setAssessmentDate' + 'status' => 'setStatus', + 'ukWorker' => 'setUkWorker' ]; /** @@ -249,20 +249,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'employeeState' => 'getEmployeeState', + 'action' => 'getAction', + 'aeExclusionCode' => 'getAeExclusionCode', 'age' => 'getAge', - 'ukWorker' => 'getUkWorker', - 'payPeriod' => 'getPayPeriod', - 'ordinal' => 'getOrdinal', + 'assessmentDate' => 'getAssessmentDate', 'earningsInPeriod' => 'getEarningsInPeriod', + 'employee' => 'getEmployee', + 'employeeState' => 'getEmployeeState', + 'id' => 'getId', + 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', 'qualifyingEarningsInPeriod' => 'getQualifyingEarningsInPeriod', - 'aeExclusionCode' => 'getAeExclusionCode', - 'status' => 'getStatus', 'reason' => 'getReason', - 'action' => 'getAction', - 'employee' => 'getEmployee', - 'assessmentDate' => 'getAssessmentDate' + 'status' => 'getStatus', + 'ukWorker' => 'getUkWorker' ]; /** @@ -321,20 +321,20 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('employeeState', $data ?? [], null); + $this->setIfExists('action', $data ?? [], null); + $this->setIfExists('aeExclusionCode', $data ?? [], null); $this->setIfExists('age', $data ?? [], null); - $this->setIfExists('ukWorker', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); - $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('assessmentDate', $data ?? [], null); $this->setIfExists('earningsInPeriod', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('employeeState', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('qualifyingEarningsInPeriod', $data ?? [], null); - $this->setIfExists('aeExclusionCode', $data ?? [], null); - $this->setIfExists('status', $data ?? [], null); $this->setIfExists('reason', $data ?? [], null); - $this->setIfExists('action', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('assessmentDate', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('ukWorker', $data ?? [], null); } /** @@ -380,55 +380,55 @@ public function valid(): bool /** - * Gets id + * Gets action * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractAeAssessmentAction|null */ - public function getId(): ?string + public function getAction(): ?\SynergiTech\Staffology\Model\ContractAeAssessmentAction { - return $this->container['id']; + return $this->container['action']; } /** - * Sets id + * Sets action * - * @param string|null $id The unique id of the object + * @param \SynergiTech\Staffology\Model\ContractAeAssessmentAction|null $action action * * @return $this */ - public function setId(?string $id): static + public function setAction(?\SynergiTech\Staffology\Model\ContractAeAssessmentAction $action): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($action)) { + throw new InvalidArgumentException('non-nullable action cannot be null'); } - $this->container['id'] = $id; + $this->container['action'] = $action; return $this; } /** - * Gets employeeState + * Gets aeExclusionCode * - * @return \SynergiTech\Staffology\Model\AeEmployeeState|null + * @return \SynergiTech\Staffology\Model\AeExclusionCode|null */ - public function getEmployeeState(): ?\SynergiTech\Staffology\Model\AeEmployeeState + public function getAeExclusionCode(): ?\SynergiTech\Staffology\Model\AeExclusionCode { - return $this->container['employeeState']; + return $this->container['aeExclusionCode']; } /** - * Sets employeeState + * Sets aeExclusionCode * - * @param \SynergiTech\Staffology\Model\AeEmployeeState|null $employeeState employeeState + * @param \SynergiTech\Staffology\Model\AeExclusionCode|null $aeExclusionCode aeExclusionCode * * @return $this */ - public function setEmployeeState(?\SynergiTech\Staffology\Model\AeEmployeeState $employeeState): static + public function setAeExclusionCode(?\SynergiTech\Staffology\Model\AeExclusionCode $aeExclusionCode): static { - if (is_null($employeeState)) { - throw new InvalidArgumentException('non-nullable employeeState cannot be null'); + if (is_null($aeExclusionCode)) { + throw new InvalidArgumentException('non-nullable aeExclusionCode cannot be null'); } - $this->container['employeeState'] = $employeeState; + $this->container['aeExclusionCode'] = $aeExclusionCode; return $this; } @@ -461,305 +461,305 @@ public function setAge(?int $age): static } /** - * Gets ukWorker + * Gets assessmentDate * - * @return \SynergiTech\Staffology\Model\AeUKWorker|null + * @return \DateTime|null */ - public function getUkWorker(): ?\SynergiTech\Staffology\Model\AeUKWorker + public function getAssessmentDate(): ?\DateTime { - return $this->container['ukWorker']; + return $this->container['assessmentDate']; } /** - * Sets ukWorker + * Sets assessmentDate * - * @param \SynergiTech\Staffology\Model\AeUKWorker|null $ukWorker ukWorker + * @param \DateTime|null $assessmentDate assessmentDate * * @return $this */ - public function setUkWorker(?\SynergiTech\Staffology\Model\AeUKWorker $ukWorker): static + public function setAssessmentDate(?\DateTime $assessmentDate): static { - if (is_null($ukWorker)) { - throw new InvalidArgumentException('non-nullable ukWorker cannot be null'); + if (is_null($assessmentDate)) { + throw new InvalidArgumentException('non-nullable assessmentDate cannot be null'); } - $this->container['ukWorker'] = $ukWorker; + $this->container['assessmentDate'] = $assessmentDate; return $this; } /** - * Gets payPeriod + * Gets earningsInPeriod * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return float|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getEarningsInPeriod(): ?float { - return $this->container['payPeriod']; + return $this->container['earningsInPeriod']; } /** - * Sets payPeriod + * Sets earningsInPeriod * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param float|null $earningsInPeriod earningsInPeriod * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setEarningsInPeriod(?float $earningsInPeriod): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($earningsInPeriod)) { + throw new InvalidArgumentException('non-nullable earningsInPeriod cannot be null'); } - $this->container['payPeriod'] = $payPeriod; + $this->container['earningsInPeriod'] = $earningsInPeriod; return $this; } /** - * Gets ordinal + * Gets employee * - * @return int|null + * @return \SynergiTech\Staffology\Model\ContractEmployeeItem|null */ - public function getOrdinal(): ?int + public function getEmployee(): ?\SynergiTech\Staffology\Model\ContractEmployeeItem { - return $this->container['ordinal']; + return $this->container['employee']; } /** - * Sets ordinal + * Sets employee * - * @param int|null $ordinal The PaySchedule ordinal for the Employee at the time of the assessment + * @param \SynergiTech\Staffology\Model\ContractEmployeeItem|null $employee employee * * @return $this */ - public function setOrdinal(?int $ordinal): static + public function setEmployee(?\SynergiTech\Staffology\Model\ContractEmployeeItem $employee): static { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['ordinal'] = $ordinal; + $this->container['employee'] = $employee; return $this; } /** - * Gets earningsInPeriod + * Gets employeeState * - * @return float|null + * @return \SynergiTech\Staffology\Model\AeEmployeeState|null */ - public function getEarningsInPeriod(): ?float + public function getEmployeeState(): ?\SynergiTech\Staffology\Model\AeEmployeeState { - return $this->container['earningsInPeriod']; + return $this->container['employeeState']; } /** - * Sets earningsInPeriod + * Sets employeeState * - * @param float|null $earningsInPeriod earningsInPeriod + * @param \SynergiTech\Staffology\Model\AeEmployeeState|null $employeeState employeeState * * @return $this */ - public function setEarningsInPeriod(?float $earningsInPeriod): static + public function setEmployeeState(?\SynergiTech\Staffology\Model\AeEmployeeState $employeeState): static { - if (is_null($earningsInPeriod)) { - throw new InvalidArgumentException('non-nullable earningsInPeriod cannot be null'); + if (is_null($employeeState)) { + throw new InvalidArgumentException('non-nullable employeeState cannot be null'); } - $this->container['earningsInPeriod'] = $earningsInPeriod; + $this->container['employeeState'] = $employeeState; return $this; } /** - * Gets qualifyingEarningsInPeriod + * Gets id * - * @return float|null + * @return string|null */ - public function getQualifyingEarningsInPeriod(): ?float + public function getId(): ?string { - return $this->container['qualifyingEarningsInPeriod']; + return $this->container['id']; } /** - * Sets qualifyingEarningsInPeriod + * Sets id * - * @param float|null $qualifyingEarningsInPeriod qualifyingEarningsInPeriod + * @param string|null $id The unique id of the object * * @return $this */ - public function setQualifyingEarningsInPeriod(?float $qualifyingEarningsInPeriod): static + public function setId(?string $id): static { - if (is_null($qualifyingEarningsInPeriod)) { - throw new InvalidArgumentException('non-nullable qualifyingEarningsInPeriod cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['qualifyingEarningsInPeriod'] = $qualifyingEarningsInPeriod; + $this->container['id'] = $id; return $this; } /** - * Gets aeExclusionCode + * Gets ordinal * - * @return \SynergiTech\Staffology\Model\AeExclusionCode|null + * @return int|null */ - public function getAeExclusionCode(): ?\SynergiTech\Staffology\Model\AeExclusionCode + public function getOrdinal(): ?int { - return $this->container['aeExclusionCode']; + return $this->container['ordinal']; } /** - * Sets aeExclusionCode + * Sets ordinal * - * @param \SynergiTech\Staffology\Model\AeExclusionCode|null $aeExclusionCode aeExclusionCode + * @param int|null $ordinal The PaySchedule ordinal for the Employee at the time of the assessment * * @return $this */ - public function setAeExclusionCode(?\SynergiTech\Staffology\Model\AeExclusionCode $aeExclusionCode): static + public function setOrdinal(?int $ordinal): static { - if (is_null($aeExclusionCode)) { - throw new InvalidArgumentException('non-nullable aeExclusionCode cannot be null'); + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['aeExclusionCode'] = $aeExclusionCode; + $this->container['ordinal'] = $ordinal; return $this; } /** - * Gets status + * Gets payPeriod * - * @return \SynergiTech\Staffology\Model\AeStatus|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getStatus(): ?\SynergiTech\Staffology\Model\AeStatus + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['status']; + return $this->container['payPeriod']; } /** - * Sets status + * Sets payPeriod * - * @param \SynergiTech\Staffology\Model\AeStatus|null $status status + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod * * @return $this */ - public function setStatus(?\SynergiTech\Staffology\Model\AeStatus $status): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static { - if (is_null($status)) { - throw new InvalidArgumentException('non-nullable status cannot be null'); + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['status'] = $status; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets reason + * Gets qualifyingEarningsInPeriod * - * @return string|null + * @return float|null */ - public function getReason(): ?string + public function getQualifyingEarningsInPeriod(): ?float { - return $this->container['reason']; + return $this->container['qualifyingEarningsInPeriod']; } /** - * Sets reason + * Sets qualifyingEarningsInPeriod * - * @param string|null $reason The reason for determining the Status given. + * @param float|null $qualifyingEarningsInPeriod qualifyingEarningsInPeriod * * @return $this */ - public function setReason(?string $reason): static + public function setQualifyingEarningsInPeriod(?float $qualifyingEarningsInPeriod): static { - if (is_null($reason)) { - array_push($this->openAPINullablesSetToNull, 'reason'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('reason', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($qualifyingEarningsInPeriod)) { + throw new InvalidArgumentException('non-nullable qualifyingEarningsInPeriod cannot be null'); } - $this->container['reason'] = $reason; + $this->container['qualifyingEarningsInPeriod'] = $qualifyingEarningsInPeriod; return $this; } /** - * Gets action + * Gets reason * - * @return \SynergiTech\Staffology\Model\ContractAeAssessmentAction|null + * @return string|null */ - public function getAction(): ?\SynergiTech\Staffology\Model\ContractAeAssessmentAction + public function getReason(): ?string { - return $this->container['action']; + return $this->container['reason']; } /** - * Sets action + * Sets reason * - * @param \SynergiTech\Staffology\Model\ContractAeAssessmentAction|null $action action + * @param string|null $reason The reason for determining the Status given. * * @return $this */ - public function setAction(?\SynergiTech\Staffology\Model\ContractAeAssessmentAction $action): static + public function setReason(?string $reason): static { - if (is_null($action)) { - throw new InvalidArgumentException('non-nullable action cannot be null'); + if (is_null($reason)) { + array_push($this->openAPINullablesSetToNull, 'reason'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('reason', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['action'] = $action; + $this->container['reason'] = $reason; return $this; } /** - * Gets employee + * Gets status * - * @return \SynergiTech\Staffology\Model\ContractEmployeeItem|null + * @return \SynergiTech\Staffology\Model\AeStatus|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\ContractEmployeeItem + public function getStatus(): ?\SynergiTech\Staffology\Model\AeStatus { - return $this->container['employee']; + return $this->container['status']; } /** - * Sets employee + * Sets status * - * @param \SynergiTech\Staffology\Model\ContractEmployeeItem|null $employee employee + * @param \SynergiTech\Staffology\Model\AeStatus|null $status status * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\ContractEmployeeItem $employee): static + public function setStatus(?\SynergiTech\Staffology\Model\AeStatus $status): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['employee'] = $employee; + $this->container['status'] = $status; return $this; } /** - * Gets assessmentDate + * Gets ukWorker * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\AeUKWorker|null */ - public function getAssessmentDate(): ?\DateTime + public function getUkWorker(): ?\SynergiTech\Staffology\Model\AeUKWorker { - return $this->container['assessmentDate']; + return $this->container['ukWorker']; } /** - * Sets assessmentDate + * Sets ukWorker * - * @param \DateTime|null $assessmentDate assessmentDate + * @param \SynergiTech\Staffology\Model\AeUKWorker|null $ukWorker ukWorker * * @return $this */ - public function setAssessmentDate(?\DateTime $assessmentDate): static + public function setUkWorker(?\SynergiTech\Staffology\Model\AeUKWorker $ukWorker): static { - if (is_null($assessmentDate)) { - throw new InvalidArgumentException('non-nullable assessmentDate cannot be null'); + if (is_null($ukWorker)) { + throw new InvalidArgumentException('non-nullable ukWorker cannot be null'); } - $this->container['assessmentDate'] = $assessmentDate; + $this->container['ukWorker'] = $ukWorker; return $this; } diff --git a/src/Model/ContractAeEmployeeAssessmentHistoryRequest.php b/src/Model/ContractAeEmployeeAssessmentHistoryRequest.php new file mode 100644 index 0000000..de3bd92 --- /dev/null +++ b/src/Model/ContractAeEmployeeAssessmentHistoryRequest.php @@ -0,0 +1,1246 @@ + + */ +class ContractAeEmployeeAssessmentHistoryRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.AeEmployeeAssessmentHistoryRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'action' => '\SynergiTech\Staffology\Model\AeAction', + 'actionDate' => '\DateTime', + 'age' => 'int', + 'assessmentDate' => '\DateTime', + 'isJointAssessment' => 'bool', + 'isLatestVersion' => 'bool', + 'isNewPension' => 'bool', + 'letter' => '\SynergiTech\Staffology\Model\AeLetter', + 'letterExternalDataProviderId' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', + 'letterSentDate' => '\DateTime', + 'letterSentType' => '\SynergiTech\Staffology\Model\AeLetterSentType', + 'lowerEarningsThreshold' => 'float', + 'payRunId' => 'string', + 'pensionId' => 'string', + 'pensionSchemeId' => 'string', + 'periodEndDate' => '\DateTime', + 'periodStartDate' => '\DateTime', + 'qualifyingThreshold' => 'float', + 'reason' => '\SynergiTech\Staffology\Model\AeReason', + 'reenrolmentDate' => '\DateTime', + 'roleId' => 'string', + 'status' => '\SynergiTech\Staffology\Model\AeStatus', + 'version' => 'int', + 'workerGroupId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'action' => null, + 'actionDate' => 'date', + 'age' => 'int32', + 'assessmentDate' => 'date', + 'isJointAssessment' => null, + 'isLatestVersion' => null, + 'isNewPension' => null, + 'letter' => null, + 'letterExternalDataProviderId' => null, + 'letterSentDate' => 'date', + 'letterSentType' => null, + 'lowerEarningsThreshold' => 'double', + 'payRunId' => 'uuid', + 'pensionId' => 'uuid', + 'pensionSchemeId' => 'uuid', + 'periodEndDate' => 'date', + 'periodStartDate' => 'date', + 'qualifyingThreshold' => 'double', + 'reason' => null, + 'reenrolmentDate' => 'date', + 'roleId' => 'uuid', + 'status' => null, + 'version' => 'int32', + 'workerGroupId' => 'uuid' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'action' => false, + 'actionDate' => true, + 'age' => false, + 'assessmentDate' => false, + 'isJointAssessment' => false, + 'isLatestVersion' => false, + 'isNewPension' => false, + 'letter' => false, + 'letterExternalDataProviderId' => false, + 'letterSentDate' => true, + 'letterSentType' => false, + 'lowerEarningsThreshold' => false, + 'payRunId' => true, + 'pensionId' => true, + 'pensionSchemeId' => true, + 'periodEndDate' => false, + 'periodStartDate' => false, + 'qualifyingThreshold' => false, + 'reason' => false, + 'reenrolmentDate' => true, + 'roleId' => true, + 'status' => false, + 'version' => false, + 'workerGroupId' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'action' => 'action', + 'actionDate' => 'actionDate', + 'age' => 'age', + 'assessmentDate' => 'assessmentDate', + 'isJointAssessment' => 'isJointAssessment', + 'isLatestVersion' => 'isLatestVersion', + 'isNewPension' => 'isNewPension', + 'letter' => 'letter', + 'letterExternalDataProviderId' => 'letterExternalDataProviderId', + 'letterSentDate' => 'letterSentDate', + 'letterSentType' => 'letterSentType', + 'lowerEarningsThreshold' => 'lowerEarningsThreshold', + 'payRunId' => 'payRunId', + 'pensionId' => 'pensionId', + 'pensionSchemeId' => 'pensionSchemeId', + 'periodEndDate' => 'periodEndDate', + 'periodStartDate' => 'periodStartDate', + 'qualifyingThreshold' => 'qualifyingThreshold', + 'reason' => 'reason', + 'reenrolmentDate' => 'reenrolmentDate', + 'roleId' => 'roleId', + 'status' => 'status', + 'version' => 'version', + 'workerGroupId' => 'workerGroupId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'action' => 'setAction', + 'actionDate' => 'setActionDate', + 'age' => 'setAge', + 'assessmentDate' => 'setAssessmentDate', + 'isJointAssessment' => 'setIsJointAssessment', + 'isLatestVersion' => 'setIsLatestVersion', + 'isNewPension' => 'setIsNewPension', + 'letter' => 'setLetter', + 'letterExternalDataProviderId' => 'setLetterExternalDataProviderId', + 'letterSentDate' => 'setLetterSentDate', + 'letterSentType' => 'setLetterSentType', + 'lowerEarningsThreshold' => 'setLowerEarningsThreshold', + 'payRunId' => 'setPayRunId', + 'pensionId' => 'setPensionId', + 'pensionSchemeId' => 'setPensionSchemeId', + 'periodEndDate' => 'setPeriodEndDate', + 'periodStartDate' => 'setPeriodStartDate', + 'qualifyingThreshold' => 'setQualifyingThreshold', + 'reason' => 'setReason', + 'reenrolmentDate' => 'setReenrolmentDate', + 'roleId' => 'setRoleId', + 'status' => 'setStatus', + 'version' => 'setVersion', + 'workerGroupId' => 'setWorkerGroupId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'action' => 'getAction', + 'actionDate' => 'getActionDate', + 'age' => 'getAge', + 'assessmentDate' => 'getAssessmentDate', + 'isJointAssessment' => 'getIsJointAssessment', + 'isLatestVersion' => 'getIsLatestVersion', + 'isNewPension' => 'getIsNewPension', + 'letter' => 'getLetter', + 'letterExternalDataProviderId' => 'getLetterExternalDataProviderId', + 'letterSentDate' => 'getLetterSentDate', + 'letterSentType' => 'getLetterSentType', + 'lowerEarningsThreshold' => 'getLowerEarningsThreshold', + 'payRunId' => 'getPayRunId', + 'pensionId' => 'getPensionId', + 'pensionSchemeId' => 'getPensionSchemeId', + 'periodEndDate' => 'getPeriodEndDate', + 'periodStartDate' => 'getPeriodStartDate', + 'qualifyingThreshold' => 'getQualifyingThreshold', + 'reason' => 'getReason', + 'reenrolmentDate' => 'getReenrolmentDate', + 'roleId' => 'getRoleId', + 'status' => 'getStatus', + 'version' => 'getVersion', + 'workerGroupId' => 'getWorkerGroupId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('action', $data ?? [], null); + $this->setIfExists('actionDate', $data ?? [], null); + $this->setIfExists('age', $data ?? [], null); + $this->setIfExists('assessmentDate', $data ?? [], null); + $this->setIfExists('isJointAssessment', $data ?? [], null); + $this->setIfExists('isLatestVersion', $data ?? [], null); + $this->setIfExists('isNewPension', $data ?? [], null); + $this->setIfExists('letter', $data ?? [], null); + $this->setIfExists('letterExternalDataProviderId', $data ?? [], null); + $this->setIfExists('letterSentDate', $data ?? [], null); + $this->setIfExists('letterSentType', $data ?? [], null); + $this->setIfExists('lowerEarningsThreshold', $data ?? [], null); + $this->setIfExists('payRunId', $data ?? [], null); + $this->setIfExists('pensionId', $data ?? [], null); + $this->setIfExists('pensionSchemeId', $data ?? [], null); + $this->setIfExists('periodEndDate', $data ?? [], null); + $this->setIfExists('periodStartDate', $data ?? [], null); + $this->setIfExists('qualifyingThreshold', $data ?? [], null); + $this->setIfExists('reason', $data ?? [], null); + $this->setIfExists('reenrolmentDate', $data ?? [], null); + $this->setIfExists('roleId', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); + $this->setIfExists('workerGroupId', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets action + * + * @return \SynergiTech\Staffology\Model\AeAction|null + */ + public function getAction(): ?\SynergiTech\Staffology\Model\AeAction + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param \SynergiTech\Staffology\Model\AeAction|null $action action + * + * @return $this + */ + public function setAction(?\SynergiTech\Staffology\Model\AeAction $action): static + { + if (is_null($action)) { + throw new InvalidArgumentException('non-nullable action cannot be null'); + } + $this->container['action'] = $action; + + return $this; + } + + /** + * Gets actionDate + * + * @return \DateTime|null + */ + public function getActionDate(): ?\DateTime + { + return $this->container['actionDate']; + } + + /** + * Sets actionDate + * + * @param \DateTime|null $actionDate The date when the action was applied, if applicable. + * + * @return $this + */ + public function setActionDate(?\DateTime $actionDate): static + { + if (is_null($actionDate)) { + array_push($this->openAPINullablesSetToNull, 'actionDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('actionDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['actionDate'] = $actionDate; + + return $this; + } + + /** + * Gets age + * + * @return int|null + */ + public function getAge(): ?int + { + return $this->container['age']; + } + + /** + * Sets age + * + * @param int|null $age The employee's age at the time of assessment. + * + * @return $this + */ + public function setAge(?int $age): static + { + if (is_null($age)) { + throw new InvalidArgumentException('non-nullable age cannot be null'); + } + $this->container['age'] = $age; + + return $this; + } + + /** + * Gets assessmentDate + * + * @return \DateTime|null + */ + public function getAssessmentDate(): ?\DateTime + { + return $this->container['assessmentDate']; + } + + /** + * Sets assessmentDate + * + * @param \DateTime|null $assessmentDate The actual date the assessment was performed. + * + * @return $this + */ + public function setAssessmentDate(?\DateTime $assessmentDate): static + { + if (is_null($assessmentDate)) { + throw new InvalidArgumentException('non-nullable assessmentDate cannot be null'); + } + $this->container['assessmentDate'] = $assessmentDate; + + return $this; + } + + /** + * Gets isJointAssessment + * + * @return bool|null + */ + public function getIsJointAssessment(): ?bool + { + return $this->container['isJointAssessment']; + } + + /** + * Sets isJointAssessment + * + * @param bool|null $isJointAssessment Is this a joint assessment with another role + * + * @return $this + */ + public function setIsJointAssessment(?bool $isJointAssessment): static + { + if (is_null($isJointAssessment)) { + throw new InvalidArgumentException('non-nullable isJointAssessment cannot be null'); + } + $this->container['isJointAssessment'] = $isJointAssessment; + + return $this; + } + + /** + * Gets isLatestVersion + * + * @return bool|null + */ + public function getIsLatestVersion(): ?bool + { + return $this->container['isLatestVersion']; + } + + /** + * Sets isLatestVersion + * + * @param bool|null $isLatestVersion Is the latest version of this assessment + * + * @return $this + */ + public function setIsLatestVersion(?bool $isLatestVersion): static + { + if (is_null($isLatestVersion)) { + throw new InvalidArgumentException('non-nullable isLatestVersion cannot be null'); + } + $this->container['isLatestVersion'] = $isLatestVersion; + + return $this; + } + + /** + * Gets isNewPension + * + * @return bool|null + */ + public function getIsNewPension(): ?bool + { + return $this->container['isNewPension']; + } + + /** + * Sets isNewPension + * + * @param bool|null $isNewPension Is this assessment resulting in a new pension + * + * @return $this + */ + public function setIsNewPension(?bool $isNewPension): static + { + if (is_null($isNewPension)) { + throw new InvalidArgumentException('non-nullable isNewPension cannot be null'); + } + $this->container['isNewPension'] = $isNewPension; + + return $this; + } + + /** + * Gets letter + * + * @return \SynergiTech\Staffology\Model\AeLetter|null + */ + public function getLetter(): ?\SynergiTech\Staffology\Model\AeLetter + { + return $this->container['letter']; + } + + /** + * Sets letter + * + * @param \SynergiTech\Staffology\Model\AeLetter|null $letter letter + * + * @return $this + */ + public function setLetter(?\SynergiTech\Staffology\Model\AeLetter $letter): static + { + if (is_null($letter)) { + throw new InvalidArgumentException('non-nullable letter cannot be null'); + } + $this->container['letter'] = $letter; + + return $this; + } + + /** + * Gets letterExternalDataProviderId + * + * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null + */ + public function getLetterExternalDataProviderId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId + { + return $this->container['letterExternalDataProviderId']; + } + + /** + * Sets letterExternalDataProviderId + * + * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $letterExternalDataProviderId letterExternalDataProviderId + * + * @return $this + */ + public function setLetterExternalDataProviderId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $letterExternalDataProviderId): static + { + if (is_null($letterExternalDataProviderId)) { + throw new InvalidArgumentException('non-nullable letterExternalDataProviderId cannot be null'); + } + $this->container['letterExternalDataProviderId'] = $letterExternalDataProviderId; + + return $this; + } + + /** + * Gets letterSentDate + * + * @return \DateTime|null + */ + public function getLetterSentDate(): ?\DateTime + { + return $this->container['letterSentDate']; + } + + /** + * Sets letterSentDate + * + * @param \DateTime|null $letterSentDate The date the letter was sent to employee, if applicable. + * + * @return $this + */ + public function setLetterSentDate(?\DateTime $letterSentDate): static + { + if (is_null($letterSentDate)) { + array_push($this->openAPINullablesSetToNull, 'letterSentDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('letterSentDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['letterSentDate'] = $letterSentDate; + + return $this; + } + + /** + * Gets letterSentType + * + * @return \SynergiTech\Staffology\Model\AeLetterSentType|null + */ + public function getLetterSentType(): ?\SynergiTech\Staffology\Model\AeLetterSentType + { + return $this->container['letterSentType']; + } + + /** + * Sets letterSentType + * + * @param \SynergiTech\Staffology\Model\AeLetterSentType|null $letterSentType letterSentType + * + * @return $this + */ + public function setLetterSentType(?\SynergiTech\Staffology\Model\AeLetterSentType $letterSentType): static + { + if (is_null($letterSentType)) { + throw new InvalidArgumentException('non-nullable letterSentType cannot be null'); + } + $this->container['letterSentType'] = $letterSentType; + + return $this; + } + + /** + * Gets lowerEarningsThreshold + * + * @return float|null + */ + public function getLowerEarningsThreshold(): ?float + { + return $this->container['lowerEarningsThreshold']; + } + + /** + * Sets lowerEarningsThreshold + * + * @param float|null $lowerEarningsThreshold The Lower Earnings Threshold applicable for the assessment period. + * + * @return $this + */ + public function setLowerEarningsThreshold(?float $lowerEarningsThreshold): static + { + if (is_null($lowerEarningsThreshold)) { + throw new InvalidArgumentException('non-nullable lowerEarningsThreshold cannot be null'); + } + $this->container['lowerEarningsThreshold'] = $lowerEarningsThreshold; + + return $this; + } + + /** + * Gets payRunId + * + * @return string|null + */ + public function getPayRunId(): ?string + { + return $this->container['payRunId']; + } + + /** + * Sets payRunId + * + * @param string|null $payRunId The unique identifier of the Pay Run associated with this assessment. + * + * @return $this + */ + public function setPayRunId(?string $payRunId): static + { + if (is_null($payRunId)) { + array_push($this->openAPINullablesSetToNull, 'payRunId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payRunId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payRunId'] = $payRunId; + + return $this; + } + + /** + * Gets pensionId + * + * @return string|null + */ + public function getPensionId(): ?string + { + return $this->container['pensionId']; + } + + /** + * Sets pensionId + * + * @param string|null $pensionId The unique identifier of the pension associated with this assessment, if applicable. + * + * @return $this + */ + public function setPensionId(?string $pensionId): static + { + if (is_null($pensionId)) { + array_push($this->openAPINullablesSetToNull, 'pensionId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pensionId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pensionId'] = $pensionId; + + return $this; + } + + /** + * Gets pensionSchemeId + * + * @return string|null + */ + public function getPensionSchemeId(): ?string + { + return $this->container['pensionSchemeId']; + } + + /** + * Sets pensionSchemeId + * + * @param string|null $pensionSchemeId The unique identifier of the pension scheme associated with this assessment, if applicable. + * + * @return $this + */ + public function setPensionSchemeId(?string $pensionSchemeId): static + { + if (is_null($pensionSchemeId)) { + array_push($this->openAPINullablesSetToNull, 'pensionSchemeId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pensionSchemeId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pensionSchemeId'] = $pensionSchemeId; + + return $this; + } + + /** + * Gets periodEndDate + * + * @return \DateTime|null + */ + public function getPeriodEndDate(): ?\DateTime + { + return $this->container['periodEndDate']; + } + + /** + * Sets periodEndDate + * + * @param \DateTime|null $periodEndDate The end date of the pay reference period for which this assessment applies. + * + * @return $this + */ + public function setPeriodEndDate(?\DateTime $periodEndDate): static + { + if (is_null($periodEndDate)) { + throw new InvalidArgumentException('non-nullable periodEndDate cannot be null'); + } + $this->container['periodEndDate'] = $periodEndDate; + + return $this; + } + + /** + * Gets periodStartDate + * + * @return \DateTime|null + */ + public function getPeriodStartDate(): ?\DateTime + { + return $this->container['periodStartDate']; + } + + /** + * Sets periodStartDate + * + * @param \DateTime|null $periodStartDate The start date of the pay reference period for which this assessment applies. + * + * @return $this + */ + public function setPeriodStartDate(?\DateTime $periodStartDate): static + { + if (is_null($periodStartDate)) { + throw new InvalidArgumentException('non-nullable periodStartDate cannot be null'); + } + $this->container['periodStartDate'] = $periodStartDate; + + return $this; + } + + /** + * Gets qualifyingThreshold + * + * @return float|null + */ + public function getQualifyingThreshold(): ?float + { + return $this->container['qualifyingThreshold']; + } + + /** + * Sets qualifyingThreshold + * + * @param float|null $qualifyingThreshold The Qualifying Earnings Threshold (or Auto-Enrolment Trigger) applicable for the assessment period. + * + * @return $this + */ + public function setQualifyingThreshold(?float $qualifyingThreshold): static + { + if (is_null($qualifyingThreshold)) { + throw new InvalidArgumentException('non-nullable qualifyingThreshold cannot be null'); + } + $this->container['qualifyingThreshold'] = $qualifyingThreshold; + + return $this; + } + + /** + * Gets reason + * + * @return \SynergiTech\Staffology\Model\AeReason|null + */ + public function getReason(): ?\SynergiTech\Staffology\Model\AeReason + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param \SynergiTech\Staffology\Model\AeReason|null $reason reason + * + * @return $this + */ + public function setReason(?\SynergiTech\Staffology\Model\AeReason $reason): static + { + if (is_null($reason)) { + throw new InvalidArgumentException('non-nullable reason cannot be null'); + } + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Gets reenrolmentDate + * + * @return \DateTime|null + */ + public function getReenrolmentDate(): ?\DateTime + { + return $this->container['reenrolmentDate']; + } + + /** + * Sets reenrolmentDate + * + * @param \DateTime|null $reenrolmentDate Re-enrolment date if assessment occurs during re-enrolment period + * + * @return $this + */ + public function setReenrolmentDate(?\DateTime $reenrolmentDate): static + { + if (is_null($reenrolmentDate)) { + array_push($this->openAPINullablesSetToNull, 'reenrolmentDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('reenrolmentDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['reenrolmentDate'] = $reenrolmentDate; + + return $this; + } + + /** + * Gets roleId + * + * @return string|null + */ + public function getRoleId(): ?string + { + return $this->container['roleId']; + } + + /** + * Sets roleId + * + * @param string|null $roleId The unique identifier of the Role associated with this assessment. + * + * @return $this + */ + public function setRoleId(?string $roleId): static + { + if (is_null($roleId)) { + array_push($this->openAPINullablesSetToNull, 'roleId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('roleId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['roleId'] = $roleId; + + return $this; + } + + /** + * Gets status + * + * @return \SynergiTech\Staffology\Model\AeStatus|null + */ + public function getStatus(): ?\SynergiTech\Staffology\Model\AeStatus + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \SynergiTech\Staffology\Model\AeStatus|null $status status + * + * @return $this + */ + public function setStatus(?\SynergiTech\Staffology\Model\AeStatus $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets version + * + * @return int|null + */ + public function getVersion(): ?int + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param int|null $version The version of this assessment in the current pay run + * + * @return $this + */ + public function setVersion(?int $version): static + { + if (is_null($version)) { + throw new InvalidArgumentException('non-nullable version cannot be null'); + } + $this->container['version'] = $version; + + return $this; + } + + /** + * Gets workerGroupId + * + * @return string|null + */ + public function getWorkerGroupId(): ?string + { + return $this->container['workerGroupId']; + } + + /** + * Sets workerGroupId + * + * @param string|null $workerGroupId The unique identifier of the worker group with this assessment, if applicable. + * + * @return $this + */ + public function setWorkerGroupId(?string $workerGroupId): static + { + if (is_null($workerGroupId)) { + array_push($this->openAPINullablesSetToNull, 'workerGroupId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('workerGroupId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['workerGroupId'] = $workerGroupId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractAeEmployeeAssessmentHistoryResponse.php b/src/Model/ContractAeEmployeeAssessmentHistoryResponse.php new file mode 100644 index 0000000..8099333 --- /dev/null +++ b/src/Model/ContractAeEmployeeAssessmentHistoryResponse.php @@ -0,0 +1,1192 @@ + + */ +class ContractAeEmployeeAssessmentHistoryResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.AeEmployeeAssessmentHistoryResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'action' => '\SynergiTech\Staffology\Model\AeAction', + 'actionDate' => '\DateTime', + 'age' => 'int', + 'assessmentDate' => '\DateTime', + 'employeeId' => 'string', + 'employeeRoleId' => 'string', + 'endDate' => '\DateTime', + 'isNewPension' => 'bool', + 'letter' => '\SynergiTech\Staffology\Model\AeLetter', + 'letterExternalDataProviderId' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', + 'letterSentDate' => '\DateTime', + 'letterSentType' => '\SynergiTech\Staffology\Model\AeLetterSentType', + 'lowerEarningsThreshold' => 'float', + 'payRunId' => 'string', + 'pensionId' => 'string', + 'pensionSchemeId' => 'string', + 'qualifyingThreshold' => 'float', + 'reEnrolmentDate' => '\DateTime', + 'reason' => '\SynergiTech\Staffology\Model\AeReason', + 'startDate' => '\DateTime', + 'status' => '\SynergiTech\Staffology\Model\AeStatus', + 'workerGroupId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'action' => null, + 'actionDate' => 'date', + 'age' => 'int32', + 'assessmentDate' => 'date', + 'employeeId' => 'uuid', + 'employeeRoleId' => 'uuid', + 'endDate' => 'date', + 'isNewPension' => null, + 'letter' => null, + 'letterExternalDataProviderId' => null, + 'letterSentDate' => 'date', + 'letterSentType' => null, + 'lowerEarningsThreshold' => 'double', + 'payRunId' => 'uuid', + 'pensionId' => 'uuid', + 'pensionSchemeId' => 'uuid', + 'qualifyingThreshold' => 'double', + 'reEnrolmentDate' => 'date', + 'reason' => null, + 'startDate' => 'date', + 'status' => null, + 'workerGroupId' => 'uuid' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'action' => false, + 'actionDate' => true, + 'age' => false, + 'assessmentDate' => false, + 'employeeId' => false, + 'employeeRoleId' => true, + 'endDate' => true, + 'isNewPension' => false, + 'letter' => false, + 'letterExternalDataProviderId' => false, + 'letterSentDate' => true, + 'letterSentType' => false, + 'lowerEarningsThreshold' => false, + 'payRunId' => true, + 'pensionId' => true, + 'pensionSchemeId' => true, + 'qualifyingThreshold' => false, + 'reEnrolmentDate' => true, + 'reason' => false, + 'startDate' => true, + 'status' => false, + 'workerGroupId' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'action' => 'action', + 'actionDate' => 'actionDate', + 'age' => 'age', + 'assessmentDate' => 'assessmentDate', + 'employeeId' => 'employeeId', + 'employeeRoleId' => 'employeeRoleId', + 'endDate' => 'endDate', + 'isNewPension' => 'isNewPension', + 'letter' => 'letter', + 'letterExternalDataProviderId' => 'letterExternalDataProviderId', + 'letterSentDate' => 'letterSentDate', + 'letterSentType' => 'letterSentType', + 'lowerEarningsThreshold' => 'lowerEarningsThreshold', + 'payRunId' => 'payRunId', + 'pensionId' => 'pensionId', + 'pensionSchemeId' => 'pensionSchemeId', + 'qualifyingThreshold' => 'qualifyingThreshold', + 'reEnrolmentDate' => 'reEnrolmentDate', + 'reason' => 'reason', + 'startDate' => 'startDate', + 'status' => 'status', + 'workerGroupId' => 'workerGroupId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'action' => 'setAction', + 'actionDate' => 'setActionDate', + 'age' => 'setAge', + 'assessmentDate' => 'setAssessmentDate', + 'employeeId' => 'setEmployeeId', + 'employeeRoleId' => 'setEmployeeRoleId', + 'endDate' => 'setEndDate', + 'isNewPension' => 'setIsNewPension', + 'letter' => 'setLetter', + 'letterExternalDataProviderId' => 'setLetterExternalDataProviderId', + 'letterSentDate' => 'setLetterSentDate', + 'letterSentType' => 'setLetterSentType', + 'lowerEarningsThreshold' => 'setLowerEarningsThreshold', + 'payRunId' => 'setPayRunId', + 'pensionId' => 'setPensionId', + 'pensionSchemeId' => 'setPensionSchemeId', + 'qualifyingThreshold' => 'setQualifyingThreshold', + 'reEnrolmentDate' => 'setReEnrolmentDate', + 'reason' => 'setReason', + 'startDate' => 'setStartDate', + 'status' => 'setStatus', + 'workerGroupId' => 'setWorkerGroupId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'action' => 'getAction', + 'actionDate' => 'getActionDate', + 'age' => 'getAge', + 'assessmentDate' => 'getAssessmentDate', + 'employeeId' => 'getEmployeeId', + 'employeeRoleId' => 'getEmployeeRoleId', + 'endDate' => 'getEndDate', + 'isNewPension' => 'getIsNewPension', + 'letter' => 'getLetter', + 'letterExternalDataProviderId' => 'getLetterExternalDataProviderId', + 'letterSentDate' => 'getLetterSentDate', + 'letterSentType' => 'getLetterSentType', + 'lowerEarningsThreshold' => 'getLowerEarningsThreshold', + 'payRunId' => 'getPayRunId', + 'pensionId' => 'getPensionId', + 'pensionSchemeId' => 'getPensionSchemeId', + 'qualifyingThreshold' => 'getQualifyingThreshold', + 'reEnrolmentDate' => 'getReEnrolmentDate', + 'reason' => 'getReason', + 'startDate' => 'getStartDate', + 'status' => 'getStatus', + 'workerGroupId' => 'getWorkerGroupId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('action', $data ?? [], null); + $this->setIfExists('actionDate', $data ?? [], null); + $this->setIfExists('age', $data ?? [], null); + $this->setIfExists('assessmentDate', $data ?? [], null); + $this->setIfExists('employeeId', $data ?? [], null); + $this->setIfExists('employeeRoleId', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('isNewPension', $data ?? [], null); + $this->setIfExists('letter', $data ?? [], null); + $this->setIfExists('letterExternalDataProviderId', $data ?? [], null); + $this->setIfExists('letterSentDate', $data ?? [], null); + $this->setIfExists('letterSentType', $data ?? [], null); + $this->setIfExists('lowerEarningsThreshold', $data ?? [], null); + $this->setIfExists('payRunId', $data ?? [], null); + $this->setIfExists('pensionId', $data ?? [], null); + $this->setIfExists('pensionSchemeId', $data ?? [], null); + $this->setIfExists('qualifyingThreshold', $data ?? [], null); + $this->setIfExists('reEnrolmentDate', $data ?? [], null); + $this->setIfExists('reason', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('workerGroupId', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets action + * + * @return \SynergiTech\Staffology\Model\AeAction|null + */ + public function getAction(): ?\SynergiTech\Staffology\Model\AeAction + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param \SynergiTech\Staffology\Model\AeAction|null $action action + * + * @return $this + */ + public function setAction(?\SynergiTech\Staffology\Model\AeAction $action): static + { + if (is_null($action)) { + throw new InvalidArgumentException('non-nullable action cannot be null'); + } + $this->container['action'] = $action; + + return $this; + } + + /** + * Gets actionDate + * + * @return \DateTime|null + */ + public function getActionDate(): ?\DateTime + { + return $this->container['actionDate']; + } + + /** + * Sets actionDate + * + * @param \DateTime|null $actionDate The date when the action was created + * + * @return $this + */ + public function setActionDate(?\DateTime $actionDate): static + { + if (is_null($actionDate)) { + array_push($this->openAPINullablesSetToNull, 'actionDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('actionDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['actionDate'] = $actionDate; + + return $this; + } + + /** + * Gets age + * + * @return int|null + */ + public function getAge(): ?int + { + return $this->container['age']; + } + + /** + * Sets age + * + * @param int|null $age Employee's age at the time of assessment + * + * @return $this + */ + public function setAge(?int $age): static + { + if (is_null($age)) { + throw new InvalidArgumentException('non-nullable age cannot be null'); + } + $this->container['age'] = $age; + + return $this; + } + + /** + * Gets assessmentDate + * + * @return \DateTime|null + */ + public function getAssessmentDate(): ?\DateTime + { + return $this->container['assessmentDate']; + } + + /** + * Sets assessmentDate + * + * @param \DateTime|null $assessmentDate Assessment date + * + * @return $this + */ + public function setAssessmentDate(?\DateTime $assessmentDate): static + { + if (is_null($assessmentDate)) { + throw new InvalidArgumentException('non-nullable assessmentDate cannot be null'); + } + $this->container['assessmentDate'] = $assessmentDate; + + return $this; + } + + /** + * Gets employeeId + * + * @return string|null + */ + public function getEmployeeId(): ?string + { + return $this->container['employeeId']; + } + + /** + * Sets employeeId + * + * @param string|null $employeeId The employee ID associated with this assessment + * + * @return $this + */ + public function setEmployeeId(?string $employeeId): static + { + if (is_null($employeeId)) { + throw new InvalidArgumentException('non-nullable employeeId cannot be null'); + } + $this->container['employeeId'] = $employeeId; + + return $this; + } + + /** + * Gets employeeRoleId + * + * @return string|null + */ + public function getEmployeeRoleId(): ?string + { + return $this->container['employeeRoleId']; + } + + /** + * Sets employeeRoleId + * + * @param string|null $employeeRoleId Employee role ID associated with this assessment, if applicable + * + * @return $this + */ + public function setEmployeeRoleId(?string $employeeRoleId): static + { + if (is_null($employeeRoleId)) { + array_push($this->openAPINullablesSetToNull, 'employeeRoleId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employeeRoleId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employeeRoleId'] = $employeeRoleId; + + return $this; + } + + /** + * Gets endDate + * + * @return \DateTime|null + */ + public function getEndDate(): ?\DateTime + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param \DateTime|null $endDate End date of assessment period + * + * @return $this + */ + public function setEndDate(?\DateTime $endDate): static + { + if (is_null($endDate)) { + array_push($this->openAPINullablesSetToNull, 'endDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets isNewPension + * + * @return bool|null + */ + public function getIsNewPension(): ?bool + { + return $this->container['isNewPension']; + } + + /** + * Sets isNewPension + * + * @param bool|null $isNewPension Is this assessment resulting in a new pension + * + * @return $this + */ + public function setIsNewPension(?bool $isNewPension): static + { + if (is_null($isNewPension)) { + throw new InvalidArgumentException('non-nullable isNewPension cannot be null'); + } + $this->container['isNewPension'] = $isNewPension; + + return $this; + } + + /** + * Gets letter + * + * @return \SynergiTech\Staffology\Model\AeLetter|null + */ + public function getLetter(): ?\SynergiTech\Staffology\Model\AeLetter + { + return $this->container['letter']; + } + + /** + * Sets letter + * + * @param \SynergiTech\Staffology\Model\AeLetter|null $letter letter + * + * @return $this + */ + public function setLetter(?\SynergiTech\Staffology\Model\AeLetter $letter): static + { + if (is_null($letter)) { + throw new InvalidArgumentException('non-nullable letter cannot be null'); + } + $this->container['letter'] = $letter; + + return $this; + } + + /** + * Gets letterExternalDataProviderId + * + * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null + */ + public function getLetterExternalDataProviderId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId + { + return $this->container['letterExternalDataProviderId']; + } + + /** + * Sets letterExternalDataProviderId + * + * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $letterExternalDataProviderId letterExternalDataProviderId + * + * @return $this + */ + public function setLetterExternalDataProviderId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $letterExternalDataProviderId): static + { + if (is_null($letterExternalDataProviderId)) { + throw new InvalidArgumentException('non-nullable letterExternalDataProviderId cannot be null'); + } + $this->container['letterExternalDataProviderId'] = $letterExternalDataProviderId; + + return $this; + } + + /** + * Gets letterSentDate + * + * @return \DateTime|null + */ + public function getLetterSentDate(): ?\DateTime + { + return $this->container['letterSentDate']; + } + + /** + * Sets letterSentDate + * + * @param \DateTime|null $letterSentDate The Date the letter was sent, if applicable + * + * @return $this + */ + public function setLetterSentDate(?\DateTime $letterSentDate): static + { + if (is_null($letterSentDate)) { + array_push($this->openAPINullablesSetToNull, 'letterSentDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('letterSentDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['letterSentDate'] = $letterSentDate; + + return $this; + } + + /** + * Gets letterSentType + * + * @return \SynergiTech\Staffology\Model\AeLetterSentType|null + */ + public function getLetterSentType(): ?\SynergiTech\Staffology\Model\AeLetterSentType + { + return $this->container['letterSentType']; + } + + /** + * Sets letterSentType + * + * @param \SynergiTech\Staffology\Model\AeLetterSentType|null $letterSentType letterSentType + * + * @return $this + */ + public function setLetterSentType(?\SynergiTech\Staffology\Model\AeLetterSentType $letterSentType): static + { + if (is_null($letterSentType)) { + throw new InvalidArgumentException('non-nullable letterSentType cannot be null'); + } + $this->container['letterSentType'] = $letterSentType; + + return $this; + } + + /** + * Gets lowerEarningsThreshold + * + * @return float|null + */ + public function getLowerEarningsThreshold(): ?float + { + return $this->container['lowerEarningsThreshold']; + } + + /** + * Sets lowerEarningsThreshold + * + * @param float|null $lowerEarningsThreshold Lower earnings threshold for the assessment period + * + * @return $this + */ + public function setLowerEarningsThreshold(?float $lowerEarningsThreshold): static + { + if (is_null($lowerEarningsThreshold)) { + throw new InvalidArgumentException('non-nullable lowerEarningsThreshold cannot be null'); + } + $this->container['lowerEarningsThreshold'] = $lowerEarningsThreshold; + + return $this; + } + + /** + * Gets payRunId + * + * @return string|null + */ + public function getPayRunId(): ?string + { + return $this->container['payRunId']; + } + + /** + * Sets payRunId + * + * @param string|null $payRunId The pay run ID that triggered this assessment (optional) + * + * @return $this + */ + public function setPayRunId(?string $payRunId): static + { + if (is_null($payRunId)) { + array_push($this->openAPINullablesSetToNull, 'payRunId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payRunId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payRunId'] = $payRunId; + + return $this; + } + + /** + * Gets pensionId + * + * @return string|null + */ + public function getPensionId(): ?string + { + return $this->container['pensionId']; + } + + /** + * Sets pensionId + * + * @param string|null $pensionId The unique identifier of the pension associated with this assessment, if applicable. + * + * @return $this + */ + public function setPensionId(?string $pensionId): static + { + if (is_null($pensionId)) { + array_push($this->openAPINullablesSetToNull, 'pensionId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pensionId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pensionId'] = $pensionId; + + return $this; + } + + /** + * Gets pensionSchemeId + * + * @return string|null + */ + public function getPensionSchemeId(): ?string + { + return $this->container['pensionSchemeId']; + } + + /** + * Sets pensionSchemeId + * + * @param string|null $pensionSchemeId The unique identifier of the pension scheme associated with this assessment, if applicable. + * + * @return $this + */ + public function setPensionSchemeId(?string $pensionSchemeId): static + { + if (is_null($pensionSchemeId)) { + array_push($this->openAPINullablesSetToNull, 'pensionSchemeId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pensionSchemeId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pensionSchemeId'] = $pensionSchemeId; + + return $this; + } + + /** + * Gets qualifyingThreshold + * + * @return float|null + */ + public function getQualifyingThreshold(): ?float + { + return $this->container['qualifyingThreshold']; + } + + /** + * Sets qualifyingThreshold + * + * @param float|null $qualifyingThreshold Qualifying threshold for the assessment period + * + * @return $this + */ + public function setQualifyingThreshold(?float $qualifyingThreshold): static + { + if (is_null($qualifyingThreshold)) { + throw new InvalidArgumentException('non-nullable qualifyingThreshold cannot be null'); + } + $this->container['qualifyingThreshold'] = $qualifyingThreshold; + + return $this; + } + + /** + * Gets reEnrolmentDate + * + * @return \DateTime|null + */ + public function getReEnrolmentDate(): ?\DateTime + { + return $this->container['reEnrolmentDate']; + } + + /** + * Sets reEnrolmentDate + * + * @param \DateTime|null $reEnrolmentDate Re-enrolment date if assessment occurs during re-enrolment period + * + * @return $this + */ + public function setReEnrolmentDate(?\DateTime $reEnrolmentDate): static + { + if (is_null($reEnrolmentDate)) { + array_push($this->openAPINullablesSetToNull, 'reEnrolmentDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('reEnrolmentDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['reEnrolmentDate'] = $reEnrolmentDate; + + return $this; + } + + /** + * Gets reason + * + * @return \SynergiTech\Staffology\Model\AeReason|null + */ + public function getReason(): ?\SynergiTech\Staffology\Model\AeReason + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param \SynergiTech\Staffology\Model\AeReason|null $reason reason + * + * @return $this + */ + public function setReason(?\SynergiTech\Staffology\Model\AeReason $reason): static + { + if (is_null($reason)) { + throw new InvalidArgumentException('non-nullable reason cannot be null'); + } + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Gets startDate + * + * @return \DateTime|null + */ + public function getStartDate(): ?\DateTime + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param \DateTime|null $startDate Start date of assessment period + * + * @return $this + */ + public function setStartDate(?\DateTime $startDate): static + { + if (is_null($startDate)) { + array_push($this->openAPINullablesSetToNull, 'startDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['startDate'] = $startDate; + + return $this; + } + + /** + * Gets status + * + * @return \SynergiTech\Staffology\Model\AeStatus|null + */ + public function getStatus(): ?\SynergiTech\Staffology\Model\AeStatus + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \SynergiTech\Staffology\Model\AeStatus|null $status status + * + * @return $this + */ + public function setStatus(?\SynergiTech\Staffology\Model\AeStatus $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets workerGroupId + * + * @return string|null + */ + public function getWorkerGroupId(): ?string + { + return $this->container['workerGroupId']; + } + + /** + * Sets workerGroupId + * + * @param string|null $workerGroupId The worker group ID associated with this assessment, if applicable. + * + * @return $this + */ + public function setWorkerGroupId(?string $workerGroupId): static + { + if (is_null($workerGroupId)) { + array_push($this->openAPINullablesSetToNull, 'workerGroupId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('workerGroupId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['workerGroupId'] = $workerGroupId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractAeEmployeeLetterResponse.php b/src/Model/ContractAeEmployeeLetterResponse.php new file mode 100644 index 0000000..96356c7 --- /dev/null +++ b/src/Model/ContractAeEmployeeLetterResponse.php @@ -0,0 +1,858 @@ + + */ +class ContractAeEmployeeLetterResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.AeEmployeeLetterResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'assessmentId' => 'string', + 'emailAddress' => 'string', + 'employeeId' => 'string', + 'employeeName' => 'string', + 'employeeUniqueId' => 'int', + 'externalDataProviderId' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', + 'isJointAssessment' => 'bool', + 'letterSentType' => '\SynergiTech\Staffology\Model\AeLetterSentType', + 'letterType' => '\SynergiTech\Staffology\Model\AeLetter', + 'payrollCode' => 'string', + 'period' => 'int', + 'roles' => 'string', + 'sentDate' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'assessmentId' => 'uuid', + 'emailAddress' => null, + 'employeeId' => 'uuid', + 'employeeName' => null, + 'employeeUniqueId' => 'int32', + 'externalDataProviderId' => null, + 'isJointAssessment' => null, + 'letterSentType' => null, + 'letterType' => null, + 'payrollCode' => null, + 'period' => 'int32', + 'roles' => null, + 'sentDate' => 'date' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'assessmentId' => false, + 'emailAddress' => true, + 'employeeId' => true, + 'employeeName' => true, + 'employeeUniqueId' => false, + 'externalDataProviderId' => false, + 'isJointAssessment' => false, + 'letterSentType' => false, + 'letterType' => false, + 'payrollCode' => true, + 'period' => false, + 'roles' => true, + 'sentDate' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'assessmentId' => 'assessmentId', + 'emailAddress' => 'emailAddress', + 'employeeId' => 'employeeId', + 'employeeName' => 'employeeName', + 'employeeUniqueId' => 'employeeUniqueId', + 'externalDataProviderId' => 'externalDataProviderId', + 'isJointAssessment' => 'isJointAssessment', + 'letterSentType' => 'letterSentType', + 'letterType' => 'letterType', + 'payrollCode' => 'payrollCode', + 'period' => 'period', + 'roles' => 'roles', + 'sentDate' => 'sentDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'assessmentId' => 'setAssessmentId', + 'emailAddress' => 'setEmailAddress', + 'employeeId' => 'setEmployeeId', + 'employeeName' => 'setEmployeeName', + 'employeeUniqueId' => 'setEmployeeUniqueId', + 'externalDataProviderId' => 'setExternalDataProviderId', + 'isJointAssessment' => 'setIsJointAssessment', + 'letterSentType' => 'setLetterSentType', + 'letterType' => 'setLetterType', + 'payrollCode' => 'setPayrollCode', + 'period' => 'setPeriod', + 'roles' => 'setRoles', + 'sentDate' => 'setSentDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'assessmentId' => 'getAssessmentId', + 'emailAddress' => 'getEmailAddress', + 'employeeId' => 'getEmployeeId', + 'employeeName' => 'getEmployeeName', + 'employeeUniqueId' => 'getEmployeeUniqueId', + 'externalDataProviderId' => 'getExternalDataProviderId', + 'isJointAssessment' => 'getIsJointAssessment', + 'letterSentType' => 'getLetterSentType', + 'letterType' => 'getLetterType', + 'payrollCode' => 'getPayrollCode', + 'period' => 'getPeriod', + 'roles' => 'getRoles', + 'sentDate' => 'getSentDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('assessmentId', $data ?? [], null); + $this->setIfExists('emailAddress', $data ?? [], null); + $this->setIfExists('employeeId', $data ?? [], null); + $this->setIfExists('employeeName', $data ?? [], null); + $this->setIfExists('employeeUniqueId', $data ?? [], null); + $this->setIfExists('externalDataProviderId', $data ?? [], null); + $this->setIfExists('isJointAssessment', $data ?? [], null); + $this->setIfExists('letterSentType', $data ?? [], null); + $this->setIfExists('letterType', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('period', $data ?? [], null); + $this->setIfExists('roles', $data ?? [], null); + $this->setIfExists('sentDate', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets assessmentId + * + * @return string|null + */ + public function getAssessmentId(): ?string + { + return $this->container['assessmentId']; + } + + /** + * Sets assessmentId + * + * @param string|null $assessmentId The assessment Id the letter is related to + * + * @return $this + */ + public function setAssessmentId(?string $assessmentId): static + { + if (is_null($assessmentId)) { + throw new InvalidArgumentException('non-nullable assessmentId cannot be null'); + } + $this->container['assessmentId'] = $assessmentId; + + return $this; + } + + /** + * Gets emailAddress + * + * @return string|null + */ + public function getEmailAddress(): ?string + { + return $this->container['emailAddress']; + } + + /** + * Sets emailAddress + * + * @param string|null $emailAddress The employee email address + * + * @return $this + */ + public function setEmailAddress(?string $emailAddress): static + { + if (is_null($emailAddress)) { + array_push($this->openAPINullablesSetToNull, 'emailAddress'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('emailAddress', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['emailAddress'] = $emailAddress; + + return $this; + } + + /** + * Gets employeeId + * + * @return string|null + */ + public function getEmployeeId(): ?string + { + return $this->container['employeeId']; + } + + /** + * Sets employeeId + * + * @param string|null $employeeId The employee ID + * + * @return $this + */ + public function setEmployeeId(?string $employeeId): static + { + if (is_null($employeeId)) { + array_push($this->openAPINullablesSetToNull, 'employeeId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employeeId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employeeId'] = $employeeId; + + return $this; + } + + /** + * Gets employeeName + * + * @return string|null + */ + public function getEmployeeName(): ?string + { + return $this->container['employeeName']; + } + + /** + * Sets employeeName + * + * @param string|null $employeeName The employee name + * + * @return $this + */ + public function setEmployeeName(?string $employeeName): static + { + if (is_null($employeeName)) { + array_push($this->openAPINullablesSetToNull, 'employeeName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employeeName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employeeName'] = $employeeName; + + return $this; + } + + /** + * Gets employeeUniqueId + * + * @return int|null + */ + public function getEmployeeUniqueId(): ?int + { + return $this->container['employeeUniqueId']; + } + + /** + * Sets employeeUniqueId + * + * @param int|null $employeeUniqueId The employee uniqueId + * + * @return $this + */ + public function setEmployeeUniqueId(?int $employeeUniqueId): static + { + if (is_null($employeeUniqueId)) { + throw new InvalidArgumentException('non-nullable employeeUniqueId cannot be null'); + } + $this->container['employeeUniqueId'] = $employeeUniqueId; + + return $this; + } + + /** + * Gets externalDataProviderId + * + * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null + */ + public function getExternalDataProviderId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId + { + return $this->container['externalDataProviderId']; + } + + /** + * Sets externalDataProviderId + * + * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $externalDataProviderId externalDataProviderId + * + * @return $this + */ + public function setExternalDataProviderId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $externalDataProviderId): static + { + if (is_null($externalDataProviderId)) { + throw new InvalidArgumentException('non-nullable externalDataProviderId cannot be null'); + } + $this->container['externalDataProviderId'] = $externalDataProviderId; + + return $this; + } + + /** + * Gets isJointAssessment + * + * @return bool|null + */ + public function getIsJointAssessment(): ?bool + { + return $this->container['isJointAssessment']; + } + + /** + * Sets isJointAssessment + * + * @param bool|null $isJointAssessment If the assessment was a joint assessment + * + * @return $this + */ + public function setIsJointAssessment(?bool $isJointAssessment): static + { + if (is_null($isJointAssessment)) { + throw new InvalidArgumentException('non-nullable isJointAssessment cannot be null'); + } + $this->container['isJointAssessment'] = $isJointAssessment; + + return $this; + } + + /** + * Gets letterSentType + * + * @return \SynergiTech\Staffology\Model\AeLetterSentType|null + */ + public function getLetterSentType(): ?\SynergiTech\Staffology\Model\AeLetterSentType + { + return $this->container['letterSentType']; + } + + /** + * Sets letterSentType + * + * @param \SynergiTech\Staffology\Model\AeLetterSentType|null $letterSentType letterSentType + * + * @return $this + */ + public function setLetterSentType(?\SynergiTech\Staffology\Model\AeLetterSentType $letterSentType): static + { + if (is_null($letterSentType)) { + throw new InvalidArgumentException('non-nullable letterSentType cannot be null'); + } + $this->container['letterSentType'] = $letterSentType; + + return $this; + } + + /** + * Gets letterType + * + * @return \SynergiTech\Staffology\Model\AeLetter|null + */ + public function getLetterType(): ?\SynergiTech\Staffology\Model\AeLetter + { + return $this->container['letterType']; + } + + /** + * Sets letterType + * + * @param \SynergiTech\Staffology\Model\AeLetter|null $letterType letterType + * + * @return $this + */ + public function setLetterType(?\SynergiTech\Staffology\Model\AeLetter $letterType): static + { + if (is_null($letterType)) { + throw new InvalidArgumentException('non-nullable letterType cannot be null'); + } + $this->container['letterType'] = $letterType; + + return $this; + } + + /** + * Gets payrollCode + * + * @return string|null + */ + public function getPayrollCode(): ?string + { + return $this->container['payrollCode']; + } + + /** + * Sets payrollCode + * + * @param string|null $payrollCode The employee payroll code + * + * @return $this + */ + public function setPayrollCode(?string $payrollCode): static + { + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payrollCode'] = $payrollCode; + + return $this; + } + + /** + * Gets period + * + * @return int|null + */ + public function getPeriod(): ?int + { + return $this->container['period']; + } + + /** + * Sets period + * + * @param int|null $period The tax period in which the letter was generated + * + * @return $this + */ + public function setPeriod(?int $period): static + { + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); + } + $this->container['period'] = $period; + + return $this; + } + + /** + * Gets roles + * + * @return string|null + */ + public function getRoles(): ?string + { + return $this->container['roles']; + } + + /** + * Sets roles + * + * @param string|null $roles The roles associated with the letter + * + * @return $this + */ + public function setRoles(?string $roles): static + { + if (is_null($roles)) { + array_push($this->openAPINullablesSetToNull, 'roles'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('roles', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['roles'] = $roles; + + return $this; + } + + /** + * Gets sentDate + * + * @return \DateTime|null + */ + public function getSentDate(): ?\DateTime + { + return $this->container['sentDate']; + } + + /** + * Sets sentDate + * + * @param \DateTime|null $sentDate The roles which generated the letter + * + * @return $this + */ + public function setSentDate(?\DateTime $sentDate): static + { + if (is_null($sentDate)) { + array_push($this->openAPINullablesSetToNull, 'sentDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('sentDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['sentDate'] = $sentDate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractAllowanceGradesRequest.php b/src/Model/ContractAllowanceGradesRequest.php index b0fd5ad..01acd63 100644 --- a/src/Model/ContractAllowanceGradesRequest.php +++ b/src/Model/ContractAllowanceGradesRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractAllowanceGradesRequest implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPITypes = [ - 'allowanceGradePayslipText' => 'string', 'allowanceGradeAnnualValue' => 'float', 'allowanceGradeEffectiveDate' => '\DateTime', + 'allowanceGradePayslipText' => 'string', 'allowanceName' => 'string' ]; @@ -71,9 +71,9 @@ class ContractAllowanceGradesRequest implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPIFormats = [ - 'allowanceGradePayslipText' => null, 'allowanceGradeAnnualValue' => 'double', 'allowanceGradeEffectiveDate' => 'date', + 'allowanceGradePayslipText' => null, 'allowanceName' => null ]; @@ -83,9 +83,9 @@ class ContractAllowanceGradesRequest implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPINullables = [ - 'allowanceGradePayslipText' => true, 'allowanceGradeAnnualValue' => false, 'allowanceGradeEffectiveDate' => false, + 'allowanceGradePayslipText' => true, 'allowanceName' => true ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'allowanceGradePayslipText' => 'allowanceGradePayslipText', 'allowanceGradeAnnualValue' => 'allowanceGradeAnnualValue', 'allowanceGradeEffectiveDate' => 'allowanceGradeEffectiveDate', + 'allowanceGradePayslipText' => 'allowanceGradePayslipText', 'allowanceName' => 'allowanceName' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'allowanceGradePayslipText' => 'setAllowanceGradePayslipText', 'allowanceGradeAnnualValue' => 'setAllowanceGradeAnnualValue', 'allowanceGradeEffectiveDate' => 'setAllowanceGradeEffectiveDate', + 'allowanceGradePayslipText' => 'setAllowanceGradePayslipText', 'allowanceName' => 'setAllowanceName' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'allowanceGradePayslipText' => 'getAllowanceGradePayslipText', 'allowanceGradeAnnualValue' => 'getAllowanceGradeAnnualValue', 'allowanceGradeEffectiveDate' => 'getAllowanceGradeEffectiveDate', + 'allowanceGradePayslipText' => 'getAllowanceGradePayslipText', 'allowanceName' => 'getAllowanceName' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('allowanceGradePayslipText', $data ?? [], null); $this->setIfExists('allowanceGradeAnnualValue', $data ?? [], null); $this->setIfExists('allowanceGradeEffectiveDate', $data ?? [], null); + $this->setIfExists('allowanceGradePayslipText', $data ?? [], null); $this->setIfExists('allowanceName', $data ?? [], null); } @@ -309,40 +309,6 @@ public function valid(): bool } - /** - * Gets allowanceGradePayslipText - * - * @return string|null - */ - public function getAllowanceGradePayslipText(): ?string - { - return $this->container['allowanceGradePayslipText']; - } - - /** - * Sets allowanceGradePayslipText - * - * @param string|null $allowanceGradePayslipText Alternative text for display on the payslip (i.e. TLR1A) - * - * @return $this - */ - public function setAllowanceGradePayslipText(?string $allowanceGradePayslipText): static - { - if (is_null($allowanceGradePayslipText)) { - array_push($this->openAPINullablesSetToNull, 'allowanceGradePayslipText'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('allowanceGradePayslipText', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['allowanceGradePayslipText'] = $allowanceGradePayslipText; - - return $this; - } - /** * Gets allowanceGradeAnnualValue * @@ -397,6 +363,40 @@ public function setAllowanceGradeEffectiveDate(?\DateTime $allowanceGradeEffecti return $this; } + /** + * Gets allowanceGradePayslipText + * + * @return string|null + */ + public function getAllowanceGradePayslipText(): ?string + { + return $this->container['allowanceGradePayslipText']; + } + + /** + * Sets allowanceGradePayslipText + * + * @param string|null $allowanceGradePayslipText Alternative text for display on the payslip (i.e. TLR1A) + * + * @return $this + */ + public function setAllowanceGradePayslipText(?string $allowanceGradePayslipText): static + { + if (is_null($allowanceGradePayslipText)) { + array_push($this->openAPINullablesSetToNull, 'allowanceGradePayslipText'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('allowanceGradePayslipText', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['allowanceGradePayslipText'] = $allowanceGradePayslipText; + + return $this; + } + /** * Gets allowanceName * diff --git a/src/Model/ContractAllowanceGradesResponse.php b/src/Model/ContractAllowanceGradesResponse.php index 210db3a..562abda 100644 --- a/src/Model/ContractAllowanceGradesResponse.php +++ b/src/Model/ContractAllowanceGradesResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class ContractAllowanceGradesResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ - 'allowanceGradePayslipText' => 'string', 'allowanceGradeAnnualValue' => 'float', 'allowanceGradeEffectiveDate' => '\DateTime', - 'uniqueId' => 'string', - 'allowanceName' => 'string' + 'allowanceGradePayslipText' => 'string', + 'allowanceName' => 'string', + 'uniqueId' => 'string' ]; /** @@ -72,11 +72,11 @@ class ContractAllowanceGradesResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ - 'allowanceGradePayslipText' => null, 'allowanceGradeAnnualValue' => 'double', 'allowanceGradeEffectiveDate' => 'date', - 'uniqueId' => 'uuid', - 'allowanceName' => null + 'allowanceGradePayslipText' => null, + 'allowanceName' => null, + 'uniqueId' => 'uuid' ]; /** @@ -85,11 +85,11 @@ class ContractAllowanceGradesResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ - 'allowanceGradePayslipText' => true, 'allowanceGradeAnnualValue' => false, 'allowanceGradeEffectiveDate' => false, - 'uniqueId' => false, - 'allowanceName' => true + 'allowanceGradePayslipText' => true, + 'allowanceName' => true, + 'uniqueId' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'allowanceGradePayslipText' => 'allowanceGradePayslipText', 'allowanceGradeAnnualValue' => 'allowanceGradeAnnualValue', 'allowanceGradeEffectiveDate' => 'allowanceGradeEffectiveDate', - 'uniqueId' => 'uniqueId', - 'allowanceName' => 'allowanceName' + 'allowanceGradePayslipText' => 'allowanceGradePayslipText', + 'allowanceName' => 'allowanceName', + 'uniqueId' => 'uniqueId' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'allowanceGradePayslipText' => 'setAllowanceGradePayslipText', 'allowanceGradeAnnualValue' => 'setAllowanceGradeAnnualValue', 'allowanceGradeEffectiveDate' => 'setAllowanceGradeEffectiveDate', - 'uniqueId' => 'setUniqueId', - 'allowanceName' => 'setAllowanceName' + 'allowanceGradePayslipText' => 'setAllowanceGradePayslipText', + 'allowanceName' => 'setAllowanceName', + 'uniqueId' => 'setUniqueId' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'allowanceGradePayslipText' => 'getAllowanceGradePayslipText', 'allowanceGradeAnnualValue' => 'getAllowanceGradeAnnualValue', 'allowanceGradeEffectiveDate' => 'getAllowanceGradeEffectiveDate', - 'uniqueId' => 'getUniqueId', - 'allowanceName' => 'getAllowanceName' + 'allowanceGradePayslipText' => 'getAllowanceGradePayslipText', + 'allowanceName' => 'getAllowanceName', + 'uniqueId' => 'getUniqueId' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('allowanceGradePayslipText', $data ?? [], null); $this->setIfExists('allowanceGradeAnnualValue', $data ?? [], null); $this->setIfExists('allowanceGradeEffectiveDate', $data ?? [], null); - $this->setIfExists('uniqueId', $data ?? [], null); + $this->setIfExists('allowanceGradePayslipText', $data ?? [], null); $this->setIfExists('allowanceName', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); } /** @@ -316,40 +316,6 @@ public function valid(): bool } - /** - * Gets allowanceGradePayslipText - * - * @return string|null - */ - public function getAllowanceGradePayslipText(): ?string - { - return $this->container['allowanceGradePayslipText']; - } - - /** - * Sets allowanceGradePayslipText - * - * @param string|null $allowanceGradePayslipText Alternative text for display on the payslip (i.e. TLR1A) - * - * @return $this - */ - public function setAllowanceGradePayslipText(?string $allowanceGradePayslipText): static - { - if (is_null($allowanceGradePayslipText)) { - array_push($this->openAPINullablesSetToNull, 'allowanceGradePayslipText'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('allowanceGradePayslipText', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['allowanceGradePayslipText'] = $allowanceGradePayslipText; - - return $this; - } - /** * Gets allowanceGradeAnnualValue * @@ -405,28 +371,35 @@ public function setAllowanceGradeEffectiveDate(?\DateTime $allowanceGradeEffecti } /** - * Gets uniqueId + * Gets allowanceGradePayslipText * * @return string|null */ - public function getUniqueId(): ?string + public function getAllowanceGradePayslipText(): ?string { - return $this->container['uniqueId']; + return $this->container['allowanceGradePayslipText']; } /** - * Sets uniqueId + * Sets allowanceGradePayslipText * - * @param string|null $uniqueId Spine Allowance identifier + * @param string|null $allowanceGradePayslipText Alternative text for display on the payslip (i.e. TLR1A) * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setAllowanceGradePayslipText(?string $allowanceGradePayslipText): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($allowanceGradePayslipText)) { + array_push($this->openAPINullablesSetToNull, 'allowanceGradePayslipText'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('allowanceGradePayslipText', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['uniqueId'] = $uniqueId; + $this->container['allowanceGradePayslipText'] = $allowanceGradePayslipText; return $this; } @@ -464,6 +437,33 @@ public function setAllowanceName(?string $allowanceName): static return $this; } + + /** + * Gets uniqueId + * + * @return string|null + */ + public function getUniqueId(): ?string + { + return $this->container['uniqueId']; + } + + /** + * Sets uniqueId + * + * @param string|null $uniqueId Spine Allowance identifier + * + * @return $this + */ + public function setUniqueId(?string $uniqueId): static + { + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + } + $this->container['uniqueId'] = $uniqueId; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractAllowanceGradesUpdateRequest.php b/src/Model/ContractAllowanceGradesUpdateRequest.php index 16499a2..e871eb8 100644 --- a/src/Model/ContractAllowanceGradesUpdateRequest.php +++ b/src/Model/ContractAllowanceGradesUpdateRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class ContractAllowanceGradesUpdateRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'uniqueId' => 'string', - 'allowanceGradePayslipText' => 'string', 'allowanceGradeAnnualValue' => 'float', 'allowanceGradeEffectiveDate' => '\DateTime', - 'allowanceName' => 'string' + 'allowanceGradePayslipText' => 'string', + 'allowanceName' => 'string', + 'uniqueId' => 'string' ]; /** @@ -72,11 +72,11 @@ class ContractAllowanceGradesUpdateRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'uniqueId' => 'uuid', - 'allowanceGradePayslipText' => null, 'allowanceGradeAnnualValue' => 'double', 'allowanceGradeEffectiveDate' => 'date', - 'allowanceName' => null + 'allowanceGradePayslipText' => null, + 'allowanceName' => null, + 'uniqueId' => 'uuid' ]; /** @@ -85,11 +85,11 @@ class ContractAllowanceGradesUpdateRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'uniqueId' => false, - 'allowanceGradePayslipText' => true, 'allowanceGradeAnnualValue' => false, 'allowanceGradeEffectiveDate' => false, - 'allowanceName' => true + 'allowanceGradePayslipText' => true, + 'allowanceName' => true, + 'uniqueId' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'uniqueId' => 'uniqueId', - 'allowanceGradePayslipText' => 'allowanceGradePayslipText', 'allowanceGradeAnnualValue' => 'allowanceGradeAnnualValue', 'allowanceGradeEffectiveDate' => 'allowanceGradeEffectiveDate', - 'allowanceName' => 'allowanceName' + 'allowanceGradePayslipText' => 'allowanceGradePayslipText', + 'allowanceName' => 'allowanceName', + 'uniqueId' => 'uniqueId' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'uniqueId' => 'setUniqueId', - 'allowanceGradePayslipText' => 'setAllowanceGradePayslipText', 'allowanceGradeAnnualValue' => 'setAllowanceGradeAnnualValue', 'allowanceGradeEffectiveDate' => 'setAllowanceGradeEffectiveDate', - 'allowanceName' => 'setAllowanceName' + 'allowanceGradePayslipText' => 'setAllowanceGradePayslipText', + 'allowanceName' => 'setAllowanceName', + 'uniqueId' => 'setUniqueId' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'uniqueId' => 'getUniqueId', - 'allowanceGradePayslipText' => 'getAllowanceGradePayslipText', 'allowanceGradeAnnualValue' => 'getAllowanceGradeAnnualValue', 'allowanceGradeEffectiveDate' => 'getAllowanceGradeEffectiveDate', - 'allowanceName' => 'getAllowanceName' + 'allowanceGradePayslipText' => 'getAllowanceGradePayslipText', + 'allowanceName' => 'getAllowanceName', + 'uniqueId' => 'getUniqueId' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('uniqueId', $data ?? [], null); - $this->setIfExists('allowanceGradePayslipText', $data ?? [], null); $this->setIfExists('allowanceGradeAnnualValue', $data ?? [], null); $this->setIfExists('allowanceGradeEffectiveDate', $data ?? [], null); + $this->setIfExists('allowanceGradePayslipText', $data ?? [], null); $this->setIfExists('allowanceName', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); } /** @@ -316,67 +316,6 @@ public function valid(): bool } - /** - * Gets uniqueId - * - * @return string|null - */ - public function getUniqueId(): ?string - { - return $this->container['uniqueId']; - } - - /** - * Sets uniqueId - * - * @param string|null $uniqueId Allowance Grades identifier - * - * @return $this - */ - public function setUniqueId(?string $uniqueId): static - { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); - } - $this->container['uniqueId'] = $uniqueId; - - return $this; - } - - /** - * Gets allowanceGradePayslipText - * - * @return string|null - */ - public function getAllowanceGradePayslipText(): ?string - { - return $this->container['allowanceGradePayslipText']; - } - - /** - * Sets allowanceGradePayslipText - * - * @param string|null $allowanceGradePayslipText Alternative text for display on the payslip (i.e. TLR1A) - * - * @return $this - */ - public function setAllowanceGradePayslipText(?string $allowanceGradePayslipText): static - { - if (is_null($allowanceGradePayslipText)) { - array_push($this->openAPINullablesSetToNull, 'allowanceGradePayslipText'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('allowanceGradePayslipText', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['allowanceGradePayslipText'] = $allowanceGradePayslipText; - - return $this; - } - /** * Gets allowanceGradeAnnualValue * @@ -431,6 +370,40 @@ public function setAllowanceGradeEffectiveDate(?\DateTime $allowanceGradeEffecti return $this; } + /** + * Gets allowanceGradePayslipText + * + * @return string|null + */ + public function getAllowanceGradePayslipText(): ?string + { + return $this->container['allowanceGradePayslipText']; + } + + /** + * Sets allowanceGradePayslipText + * + * @param string|null $allowanceGradePayslipText Alternative text for display on the payslip (i.e. TLR1A) + * + * @return $this + */ + public function setAllowanceGradePayslipText(?string $allowanceGradePayslipText): static + { + if (is_null($allowanceGradePayslipText)) { + array_push($this->openAPINullablesSetToNull, 'allowanceGradePayslipText'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('allowanceGradePayslipText', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['allowanceGradePayslipText'] = $allowanceGradePayslipText; + + return $this; + } + /** * Gets allowanceName * @@ -464,6 +437,33 @@ public function setAllowanceName(?string $allowanceName): static return $this; } + + /** + * Gets uniqueId + * + * @return string|null + */ + public function getUniqueId(): ?string + { + return $this->container['uniqueId']; + } + + /** + * Sets uniqueId + * + * @param string|null $uniqueId Allowance Grades identifier + * + * @return $this + */ + public function setUniqueId(?string $uniqueId): static + { + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + } + $this->container['uniqueId'] = $uniqueId; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractAnalysisCategoryCodeRequest.php b/src/Model/ContractAnalysisCategoryCodeRequest.php index 1d9661a..96b6aed 100644 --- a/src/Model/ContractAnalysisCategoryCodeRequest.php +++ b/src/Model/ContractAnalysisCategoryCodeRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractAnalysisCategoryCodeRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPITypes = [ + 'accountingCode' => 'string', 'code' => 'string', - 'title' => 'string', 'color' => 'string', - 'accountingCode' => 'string' + 'title' => 'string' ]; /** @@ -71,10 +71,10 @@ class ContractAnalysisCategoryCodeRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPIFormats = [ + 'accountingCode' => null, 'code' => null, - 'title' => null, 'color' => null, - 'accountingCode' => null + 'title' => null ]; /** @@ -83,10 +83,10 @@ class ContractAnalysisCategoryCodeRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPINullables = [ + 'accountingCode' => true, 'code' => true, - 'title' => true, 'color' => true, - 'accountingCode' => true + 'title' => true ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'accountingCode' => 'accountingCode', 'code' => 'code', - 'title' => 'title', 'color' => 'color', - 'accountingCode' => 'accountingCode' + 'title' => 'title' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'accountingCode' => 'setAccountingCode', 'code' => 'setCode', - 'title' => 'setTitle', 'color' => 'setColor', - 'accountingCode' => 'setAccountingCode' + 'title' => 'setTitle' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'accountingCode' => 'getAccountingCode', 'code' => 'getCode', - 'title' => 'getTitle', 'color' => 'getColor', - 'accountingCode' => 'getAccountingCode' + 'title' => 'getTitle' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('accountingCode', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); - $this->setIfExists('accountingCode', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -310,69 +310,69 @@ public function valid(): bool /** - * Gets code + * Gets accountingCode * * @return string|null */ - public function getCode(): ?string + public function getAccountingCode(): ?string { - return $this->container['code']; + return $this->container['accountingCode']; } /** - * Sets code + * Sets accountingCode * - * @param string|null $code code + * @param string|null $accountingCode accountingCode * * @return $this */ - public function setCode(?string $code): static + public function setAccountingCode(?string $accountingCode): static { - if (is_null($code)) { - array_push($this->openAPINullablesSetToNull, 'code'); + if (is_null($accountingCode)) { + array_push($this->openAPINullablesSetToNull, 'accountingCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('code', $nullablesSetToNull); + $index = array_search('accountingCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['code'] = $code; + $this->container['accountingCode'] = $accountingCode; return $this; } /** - * Gets title + * Gets code * * @return string|null */ - public function getTitle(): ?string + public function getCode(): ?string { - return $this->container['title']; + return $this->container['code']; } /** - * Sets title + * Sets code * - * @param string|null $title title + * @param string|null $code code * * @return $this */ - public function setTitle(?string $title): static + public function setCode(?string $code): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); + if (is_null($code)) { + array_push($this->openAPINullablesSetToNull, 'code'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); + $index = array_search('code', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['title'] = $title; + $this->container['code'] = $code; return $this; } @@ -412,35 +412,35 @@ public function setColor(?string $color): static } /** - * Gets accountingCode + * Gets title * * @return string|null */ - public function getAccountingCode(): ?string + public function getTitle(): ?string { - return $this->container['accountingCode']; + return $this->container['title']; } /** - * Sets accountingCode + * Sets title * - * @param string|null $accountingCode accountingCode + * @param string|null $title title * * @return $this */ - public function setAccountingCode(?string $accountingCode): static + public function setTitle(?string $title): static { - if (is_null($accountingCode)) { - array_push($this->openAPINullablesSetToNull, 'accountingCode'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountingCode', $nullablesSetToNull); + $index = array_search('title', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['accountingCode'] = $accountingCode; + $this->container['title'] = $title; return $this; } diff --git a/src/Model/ContractAnalysisCategoryCodeResponse.php b/src/Model/ContractAnalysisCategoryCodeResponse.php index 4c3e2da..c1b2f96 100644 --- a/src/Model/ContractAnalysisCategoryCodeResponse.php +++ b/src/Model/ContractAnalysisCategoryCodeResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class ContractAnalysisCategoryCodeResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', + 'accountingCode' => 'string', 'code' => 'string', - 'title' => 'string', 'color' => 'string', - 'accountingCode' => 'string' + 'id' => 'string', + 'title' => 'string' ]; /** @@ -72,11 +72,11 @@ class ContractAnalysisCategoryCodeResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', + 'accountingCode' => null, 'code' => null, - 'title' => null, 'color' => null, - 'accountingCode' => null + 'id' => 'uuid', + 'title' => null ]; /** @@ -85,11 +85,11 @@ class ContractAnalysisCategoryCodeResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'id' => false, + 'accountingCode' => true, 'code' => true, - 'title' => true, 'color' => true, - 'accountingCode' => true + 'id' => false, + 'title' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', + 'accountingCode' => 'accountingCode', 'code' => 'code', - 'title' => 'title', 'color' => 'color', - 'accountingCode' => 'accountingCode' + 'id' => 'id', + 'title' => 'title' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', + 'accountingCode' => 'setAccountingCode', 'code' => 'setCode', - 'title' => 'setTitle', 'color' => 'setColor', - 'accountingCode' => 'setAccountingCode' + 'id' => 'setId', + 'title' => 'setTitle' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', + 'accountingCode' => 'getAccountingCode', 'code' => 'getCode', - 'title' => 'getTitle', 'color' => 'getColor', - 'accountingCode' => 'getAccountingCode' + 'id' => 'getId', + 'title' => 'getTitle' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('accountingCode', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); - $this->setIfExists('accountingCode', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -317,28 +317,35 @@ public function valid(): bool /** - * Gets id + * Gets accountingCode * * @return string|null */ - public function getId(): ?string + public function getAccountingCode(): ?string { - return $this->container['id']; + return $this->container['accountingCode']; } /** - * Sets id + * Sets accountingCode * - * @param string|null $id Analysis Category Code identifier + * @param string|null $accountingCode accountingCode * * @return $this */ - public function setId(?string $id): static + public function setAccountingCode(?string $accountingCode): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($accountingCode)) { + array_push($this->openAPINullablesSetToNull, 'accountingCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountingCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['accountingCode'] = $accountingCode; return $this; } @@ -378,103 +385,96 @@ public function setCode(?string $code): static } /** - * Gets title + * Gets color * * @return string|null */ - public function getTitle(): ?string + public function getColor(): ?string { - return $this->container['title']; + return $this->container['color']; } /** - * Sets title + * Sets color * - * @param string|null $title title + * @param string|null $color color * * @return $this */ - public function setTitle(?string $title): static + public function setColor(?string $color): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); + if (is_null($color)) { + array_push($this->openAPINullablesSetToNull, 'color'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); + $index = array_search('color', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['title'] = $title; + $this->container['color'] = $color; return $this; } /** - * Gets color + * Gets id * * @return string|null */ - public function getColor(): ?string + public function getId(): ?string { - return $this->container['color']; + return $this->container['id']; } /** - * Sets color + * Sets id * - * @param string|null $color color + * @param string|null $id Analysis Category Code identifier * * @return $this */ - public function setColor(?string $color): static + public function setId(?string $id): static { - if (is_null($color)) { - array_push($this->openAPINullablesSetToNull, 'color'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('color', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['color'] = $color; + $this->container['id'] = $id; return $this; } /** - * Gets accountingCode + * Gets title * * @return string|null */ - public function getAccountingCode(): ?string + public function getTitle(): ?string { - return $this->container['accountingCode']; + return $this->container['title']; } /** - * Sets accountingCode + * Sets title * - * @param string|null $accountingCode accountingCode + * @param string|null $title title * * @return $this */ - public function setAccountingCode(?string $accountingCode): static + public function setTitle(?string $title): static { - if (is_null($accountingCode)) { - array_push($this->openAPINullablesSetToNull, 'accountingCode'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountingCode', $nullablesSetToNull); + $index = array_search('title', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['accountingCode'] = $accountingCode; + $this->container['title'] = $title; return $this; } diff --git a/src/Model/ContractAnalysisCategoryRequest.php b/src/Model/ContractAnalysisCategoryRequest.php index 27887ef..d08569b 100644 --- a/src/Model/ContractAnalysisCategoryRequest.php +++ b/src/Model/ContractAnalysisCategoryRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractAnalysisCategoryResponse.php b/src/Model/ContractAnalysisCategoryResponse.php index fc8ea5f..8cab81b 100644 --- a/src/Model/ContractAnalysisCategoryResponse.php +++ b/src/Model/ContractAnalysisCategoryResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractAutoEnrolmentRequest.php b/src/Model/ContractAutoEnrolmentRequest.php index e7957c9..bb1bd02 100644 --- a/src/Model/ContractAutoEnrolmentRequest.php +++ b/src/Model/ContractAutoEnrolmentRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class ContractAutoEnrolmentRequest implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'lastAssessment' => '\SynergiTech\Staffology\Model\ContractAeAssessmentRequest', - 'ukWorker' => '\SynergiTech\Staffology\Model\AeUKWorker', + 'aeExclusionCode' => '\SynergiTech\Staffology\Model\AeExclusionCode', + 'aePostponementLetterSent' => 'bool', 'daysToDeferAssessment' => 'int', 'deferByMonthsNotDays' => 'bool', 'exempt' => 'bool', - 'aeExclusionCode' => '\SynergiTech\Staffology\Model\AeExclusionCode', - 'aePostponementLetterSent' => 'bool' + 'lastAssessment' => '\SynergiTech\Staffology\Model\ContractAeAssessmentRequest', + 'ukWorker' => '\SynergiTech\Staffology\Model\AeUKWorker' ]; /** @@ -74,13 +74,13 @@ class ContractAutoEnrolmentRequest implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'lastAssessment' => null, - 'ukWorker' => null, + 'aeExclusionCode' => null, + 'aePostponementLetterSent' => null, 'daysToDeferAssessment' => 'int32', 'deferByMonthsNotDays' => null, 'exempt' => null, - 'aeExclusionCode' => null, - 'aePostponementLetterSent' => null + 'lastAssessment' => null, + 'ukWorker' => null ]; /** @@ -89,13 +89,13 @@ class ContractAutoEnrolmentRequest implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'lastAssessment' => false, - 'ukWorker' => false, + 'aeExclusionCode' => false, + 'aePostponementLetterSent' => false, 'daysToDeferAssessment' => false, 'deferByMonthsNotDays' => false, 'exempt' => false, - 'aeExclusionCode' => false, - 'aePostponementLetterSent' => false + 'lastAssessment' => false, + 'ukWorker' => false ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'lastAssessment' => 'lastAssessment', - 'ukWorker' => 'ukWorker', + 'aeExclusionCode' => 'aeExclusionCode', + 'aePostponementLetterSent' => 'aePostponementLetterSent', 'daysToDeferAssessment' => 'daysToDeferAssessment', 'deferByMonthsNotDays' => 'deferByMonthsNotDays', 'exempt' => 'exempt', - 'aeExclusionCode' => 'aeExclusionCode', - 'aePostponementLetterSent' => 'aePostponementLetterSent' + 'lastAssessment' => 'lastAssessment', + 'ukWorker' => 'ukWorker' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'lastAssessment' => 'setLastAssessment', - 'ukWorker' => 'setUkWorker', + 'aeExclusionCode' => 'setAeExclusionCode', + 'aePostponementLetterSent' => 'setAePostponementLetterSent', 'daysToDeferAssessment' => 'setDaysToDeferAssessment', 'deferByMonthsNotDays' => 'setDeferByMonthsNotDays', 'exempt' => 'setExempt', - 'aeExclusionCode' => 'setAeExclusionCode', - 'aePostponementLetterSent' => 'setAePostponementLetterSent' + 'lastAssessment' => 'setLastAssessment', + 'ukWorker' => 'setUkWorker' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'lastAssessment' => 'getLastAssessment', - 'ukWorker' => 'getUkWorker', + 'aeExclusionCode' => 'getAeExclusionCode', + 'aePostponementLetterSent' => 'getAePostponementLetterSent', 'daysToDeferAssessment' => 'getDaysToDeferAssessment', 'deferByMonthsNotDays' => 'getDeferByMonthsNotDays', 'exempt' => 'getExempt', - 'aeExclusionCode' => 'getAeExclusionCode', - 'aePostponementLetterSent' => 'getAePostponementLetterSent' + 'lastAssessment' => 'getLastAssessment', + 'ukWorker' => 'getUkWorker' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('lastAssessment', $data ?? [], null); - $this->setIfExists('ukWorker', $data ?? [], null); + $this->setIfExists('aeExclusionCode', $data ?? [], null); + $this->setIfExists('aePostponementLetterSent', $data ?? [], null); $this->setIfExists('daysToDeferAssessment', $data ?? [], null); $this->setIfExists('deferByMonthsNotDays', $data ?? [], null); $this->setIfExists('exempt', $data ?? [], null); - $this->setIfExists('aeExclusionCode', $data ?? [], null); - $this->setIfExists('aePostponementLetterSent', $data ?? [], null); + $this->setIfExists('lastAssessment', $data ?? [], null); + $this->setIfExists('ukWorker', $data ?? [], null); } /** @@ -331,55 +331,55 @@ public function valid(): bool /** - * Gets lastAssessment + * Gets aeExclusionCode * - * @return \SynergiTech\Staffology\Model\ContractAeAssessmentRequest|null + * @return \SynergiTech\Staffology\Model\AeExclusionCode|null */ - public function getLastAssessment(): ?\SynergiTech\Staffology\Model\ContractAeAssessmentRequest + public function getAeExclusionCode(): ?\SynergiTech\Staffology\Model\AeExclusionCode { - return $this->container['lastAssessment']; + return $this->container['aeExclusionCode']; } /** - * Sets lastAssessment + * Sets aeExclusionCode * - * @param \SynergiTech\Staffology\Model\ContractAeAssessmentRequest|null $lastAssessment lastAssessment + * @param \SynergiTech\Staffology\Model\AeExclusionCode|null $aeExclusionCode aeExclusionCode * * @return $this */ - public function setLastAssessment(?\SynergiTech\Staffology\Model\ContractAeAssessmentRequest $lastAssessment): static + public function setAeExclusionCode(?\SynergiTech\Staffology\Model\AeExclusionCode $aeExclusionCode): static { - if (is_null($lastAssessment)) { - throw new InvalidArgumentException('non-nullable lastAssessment cannot be null'); + if (is_null($aeExclusionCode)) { + throw new InvalidArgumentException('non-nullable aeExclusionCode cannot be null'); } - $this->container['lastAssessment'] = $lastAssessment; + $this->container['aeExclusionCode'] = $aeExclusionCode; return $this; } /** - * Gets ukWorker + * Gets aePostponementLetterSent * - * @return \SynergiTech\Staffology\Model\AeUKWorker|null + * @return bool|null */ - public function getUkWorker(): ?\SynergiTech\Staffology\Model\AeUKWorker + public function getAePostponementLetterSent(): ?bool { - return $this->container['ukWorker']; + return $this->container['aePostponementLetterSent']; } /** - * Sets ukWorker + * Sets aePostponementLetterSent * - * @param \SynergiTech\Staffology\Model\AeUKWorker|null $ukWorker ukWorker + * @param bool|null $aePostponementLetterSent aePostponementLetterSent * * @return $this */ - public function setUkWorker(?\SynergiTech\Staffology\Model\AeUKWorker $ukWorker): static + public function setAePostponementLetterSent(?bool $aePostponementLetterSent): static { - if (is_null($ukWorker)) { - throw new InvalidArgumentException('non-nullable ukWorker cannot be null'); + if (is_null($aePostponementLetterSent)) { + throw new InvalidArgumentException('non-nullable aePostponementLetterSent cannot be null'); } - $this->container['ukWorker'] = $ukWorker; + $this->container['aePostponementLetterSent'] = $aePostponementLetterSent; return $this; } @@ -466,55 +466,55 @@ public function setExempt(?bool $exempt): static } /** - * Gets aeExclusionCode + * Gets lastAssessment * - * @return \SynergiTech\Staffology\Model\AeExclusionCode|null + * @return \SynergiTech\Staffology\Model\ContractAeAssessmentRequest|null */ - public function getAeExclusionCode(): ?\SynergiTech\Staffology\Model\AeExclusionCode + public function getLastAssessment(): ?\SynergiTech\Staffology\Model\ContractAeAssessmentRequest { - return $this->container['aeExclusionCode']; + return $this->container['lastAssessment']; } /** - * Sets aeExclusionCode + * Sets lastAssessment * - * @param \SynergiTech\Staffology\Model\AeExclusionCode|null $aeExclusionCode aeExclusionCode + * @param \SynergiTech\Staffology\Model\ContractAeAssessmentRequest|null $lastAssessment lastAssessment * * @return $this */ - public function setAeExclusionCode(?\SynergiTech\Staffology\Model\AeExclusionCode $aeExclusionCode): static + public function setLastAssessment(?\SynergiTech\Staffology\Model\ContractAeAssessmentRequest $lastAssessment): static { - if (is_null($aeExclusionCode)) { - throw new InvalidArgumentException('non-nullable aeExclusionCode cannot be null'); + if (is_null($lastAssessment)) { + throw new InvalidArgumentException('non-nullable lastAssessment cannot be null'); } - $this->container['aeExclusionCode'] = $aeExclusionCode; + $this->container['lastAssessment'] = $lastAssessment; return $this; } /** - * Gets aePostponementLetterSent + * Gets ukWorker * - * @return bool|null + * @return \SynergiTech\Staffology\Model\AeUKWorker|null */ - public function getAePostponementLetterSent(): ?bool + public function getUkWorker(): ?\SynergiTech\Staffology\Model\AeUKWorker { - return $this->container['aePostponementLetterSent']; + return $this->container['ukWorker']; } /** - * Sets aePostponementLetterSent + * Sets ukWorker * - * @param bool|null $aePostponementLetterSent aePostponementLetterSent + * @param \SynergiTech\Staffology\Model\AeUKWorker|null $ukWorker ukWorker * * @return $this */ - public function setAePostponementLetterSent(?bool $aePostponementLetterSent): static + public function setUkWorker(?\SynergiTech\Staffology\Model\AeUKWorker $ukWorker): static { - if (is_null($aePostponementLetterSent)) { - throw new InvalidArgumentException('non-nullable aePostponementLetterSent cannot be null'); + if (is_null($ukWorker)) { + throw new InvalidArgumentException('non-nullable ukWorker cannot be null'); } - $this->container['aePostponementLetterSent'] = $aePostponementLetterSent; + $this->container['ukWorker'] = $ukWorker; return $this; } diff --git a/src/Model/ContractAutoEnrolmentResponse.php b/src/Model/ContractAutoEnrolmentResponse.php index b18224f..7e31c90 100644 --- a/src/Model/ContractAutoEnrolmentResponse.php +++ b/src/Model/ContractAutoEnrolmentResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,16 @@ class ContractAutoEnrolmentResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'state' => '\SynergiTech\Staffology\Model\AeEmployeeState', - 'stateDate' => '\DateTime', - 'postponementDate' => '\DateTime', - 'lastAssessment' => '\SynergiTech\Staffology\Model\ContractAeAssessmentResponse', - 'ukWorker' => '\SynergiTech\Staffology\Model\AeUKWorker', + 'aeExclusionCode' => '\SynergiTech\Staffology\Model\AeExclusionCode', + 'aePostponementLetterSent' => 'bool', 'daysToDeferAssessment' => 'int', 'deferByMonthsNotDays' => 'bool', 'exempt' => 'bool', - 'aeExclusionCode' => '\SynergiTech\Staffology\Model\AeExclusionCode', - 'aePostponementLetterSent' => 'bool' + 'lastAssessment' => '\SynergiTech\Staffology\Model\ContractAeAssessmentResponse', + 'postponementDate' => '\DateTime', + 'state' => '\SynergiTech\Staffology\Model\AeEmployeeState', + 'stateDate' => '\DateTime', + 'ukWorker' => '\SynergiTech\Staffology\Model\AeUKWorker' ]; /** @@ -77,16 +77,16 @@ class ContractAutoEnrolmentResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ - 'state' => null, - 'stateDate' => 'date', - 'postponementDate' => 'date', - 'lastAssessment' => null, - 'ukWorker' => null, + 'aeExclusionCode' => null, + 'aePostponementLetterSent' => null, 'daysToDeferAssessment' => 'int32', 'deferByMonthsNotDays' => null, 'exempt' => null, - 'aeExclusionCode' => null, - 'aePostponementLetterSent' => null + 'lastAssessment' => null, + 'postponementDate' => 'date', + 'state' => null, + 'stateDate' => 'date', + 'ukWorker' => null ]; /** @@ -95,16 +95,16 @@ class ContractAutoEnrolmentResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ - 'state' => false, - 'stateDate' => true, - 'postponementDate' => true, - 'lastAssessment' => false, - 'ukWorker' => false, + 'aeExclusionCode' => false, + 'aePostponementLetterSent' => false, 'daysToDeferAssessment' => false, 'deferByMonthsNotDays' => false, 'exempt' => false, - 'aeExclusionCode' => false, - 'aePostponementLetterSent' => false + 'lastAssessment' => false, + 'postponementDate' => true, + 'state' => false, + 'stateDate' => true, + 'ukWorker' => false ]; /** @@ -193,16 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'state' => 'state', - 'stateDate' => 'stateDate', - 'postponementDate' => 'postponementDate', - 'lastAssessment' => 'lastAssessment', - 'ukWorker' => 'ukWorker', + 'aeExclusionCode' => 'aeExclusionCode', + 'aePostponementLetterSent' => 'aePostponementLetterSent', 'daysToDeferAssessment' => 'daysToDeferAssessment', 'deferByMonthsNotDays' => 'deferByMonthsNotDays', 'exempt' => 'exempt', - 'aeExclusionCode' => 'aeExclusionCode', - 'aePostponementLetterSent' => 'aePostponementLetterSent' + 'lastAssessment' => 'lastAssessment', + 'postponementDate' => 'postponementDate', + 'state' => 'state', + 'stateDate' => 'stateDate', + 'ukWorker' => 'ukWorker' ]; /** @@ -211,16 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'state' => 'setState', - 'stateDate' => 'setStateDate', - 'postponementDate' => 'setPostponementDate', - 'lastAssessment' => 'setLastAssessment', - 'ukWorker' => 'setUkWorker', + 'aeExclusionCode' => 'setAeExclusionCode', + 'aePostponementLetterSent' => 'setAePostponementLetterSent', 'daysToDeferAssessment' => 'setDaysToDeferAssessment', 'deferByMonthsNotDays' => 'setDeferByMonthsNotDays', 'exempt' => 'setExempt', - 'aeExclusionCode' => 'setAeExclusionCode', - 'aePostponementLetterSent' => 'setAePostponementLetterSent' + 'lastAssessment' => 'setLastAssessment', + 'postponementDate' => 'setPostponementDate', + 'state' => 'setState', + 'stateDate' => 'setStateDate', + 'ukWorker' => 'setUkWorker' ]; /** @@ -229,16 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'state' => 'getState', - 'stateDate' => 'getStateDate', - 'postponementDate' => 'getPostponementDate', - 'lastAssessment' => 'getLastAssessment', - 'ukWorker' => 'getUkWorker', + 'aeExclusionCode' => 'getAeExclusionCode', + 'aePostponementLetterSent' => 'getAePostponementLetterSent', 'daysToDeferAssessment' => 'getDaysToDeferAssessment', 'deferByMonthsNotDays' => 'getDeferByMonthsNotDays', 'exempt' => 'getExempt', - 'aeExclusionCode' => 'getAeExclusionCode', - 'aePostponementLetterSent' => 'getAePostponementLetterSent' + 'lastAssessment' => 'getLastAssessment', + 'postponementDate' => 'getPostponementDate', + 'state' => 'getState', + 'stateDate' => 'getStateDate', + 'ukWorker' => 'getUkWorker' ]; /** @@ -297,16 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('state', $data ?? [], null); - $this->setIfExists('stateDate', $data ?? [], null); - $this->setIfExists('postponementDate', $data ?? [], null); - $this->setIfExists('lastAssessment', $data ?? [], null); - $this->setIfExists('ukWorker', $data ?? [], null); + $this->setIfExists('aeExclusionCode', $data ?? [], null); + $this->setIfExists('aePostponementLetterSent', $data ?? [], null); $this->setIfExists('daysToDeferAssessment', $data ?? [], null); $this->setIfExists('deferByMonthsNotDays', $data ?? [], null); $this->setIfExists('exempt', $data ?? [], null); - $this->setIfExists('aeExclusionCode', $data ?? [], null); - $this->setIfExists('aePostponementLetterSent', $data ?? [], null); + $this->setIfExists('lastAssessment', $data ?? [], null); + $this->setIfExists('postponementDate', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('stateDate', $data ?? [], null); + $this->setIfExists('ukWorker', $data ?? [], null); } /** @@ -352,285 +352,285 @@ public function valid(): bool /** - * Gets state + * Gets aeExclusionCode * - * @return \SynergiTech\Staffology\Model\AeEmployeeState|null + * @return \SynergiTech\Staffology\Model\AeExclusionCode|null */ - public function getState(): ?\SynergiTech\Staffology\Model\AeEmployeeState + public function getAeExclusionCode(): ?\SynergiTech\Staffology\Model\AeExclusionCode { - return $this->container['state']; + return $this->container['aeExclusionCode']; } /** - * Sets state + * Sets aeExclusionCode * - * @param \SynergiTech\Staffology\Model\AeEmployeeState|null $state state + * @param \SynergiTech\Staffology\Model\AeExclusionCode|null $aeExclusionCode aeExclusionCode * * @return $this */ - public function setState(?\SynergiTech\Staffology\Model\AeEmployeeState $state): static + public function setAeExclusionCode(?\SynergiTech\Staffology\Model\AeExclusionCode $aeExclusionCode): static { - if (is_null($state)) { - throw new InvalidArgumentException('non-nullable state cannot be null'); + if (is_null($aeExclusionCode)) { + throw new InvalidArgumentException('non-nullable aeExclusionCode cannot be null'); } - $this->container['state'] = $state; + $this->container['aeExclusionCode'] = $aeExclusionCode; return $this; } /** - * Gets stateDate + * Gets aePostponementLetterSent * - * @return \DateTime|null + * @return bool|null */ - public function getStateDate(): ?\DateTime + public function getAePostponementLetterSent(): ?bool { - return $this->container['stateDate']; + return $this->container['aePostponementLetterSent']; } /** - * Sets stateDate + * Sets aePostponementLetterSent * - * @param \DateTime|null $stateDate stateDate + * @param bool|null $aePostponementLetterSent aePostponementLetterSent * * @return $this */ - public function setStateDate(?\DateTime $stateDate): static + public function setAePostponementLetterSent(?bool $aePostponementLetterSent): static { - if (is_null($stateDate)) { - array_push($this->openAPINullablesSetToNull, 'stateDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('stateDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($aePostponementLetterSent)) { + throw new InvalidArgumentException('non-nullable aePostponementLetterSent cannot be null'); } - $this->container['stateDate'] = $stateDate; + $this->container['aePostponementLetterSent'] = $aePostponementLetterSent; return $this; } /** - * Gets postponementDate + * Gets daysToDeferAssessment * - * @return \DateTime|null + * @return int|null */ - public function getPostponementDate(): ?\DateTime + public function getDaysToDeferAssessment(): ?int { - return $this->container['postponementDate']; + return $this->container['daysToDeferAssessment']; } /** - * Sets postponementDate + * Sets daysToDeferAssessment * - * @param \DateTime|null $postponementDate [readonly] If a value is present, then employee wont be enrolled on an AE Pension until after this date. This is automatically set to a date if the employee is deemed to be an EligibleJobHolder, but the employer has set a Postponement period and this value is currently null This is automatically set to null if it already has a value and the employee is deemed NOT to be an EligibleJobHolder - ie, they previously qualified but now do not. + * @param int|null $daysToDeferAssessment The number of days, if any, to defer assessment of this employee. You're allowed to defer assessment of new employees by up to 3 months. * * @return $this */ - public function setPostponementDate(?\DateTime $postponementDate): static + public function setDaysToDeferAssessment(?int $daysToDeferAssessment): static { - if (is_null($postponementDate)) { - array_push($this->openAPINullablesSetToNull, 'postponementDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('postponementDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($daysToDeferAssessment)) { + throw new InvalidArgumentException('non-nullable daysToDeferAssessment cannot be null'); } - $this->container['postponementDate'] = $postponementDate; + $this->container['daysToDeferAssessment'] = $daysToDeferAssessment; return $this; } /** - * Gets lastAssessment + * Gets deferByMonthsNotDays * - * @return \SynergiTech\Staffology\Model\ContractAeAssessmentResponse|null + * @return bool|null */ - public function getLastAssessment(): ?\SynergiTech\Staffology\Model\ContractAeAssessmentResponse + public function getDeferByMonthsNotDays(): ?bool { - return $this->container['lastAssessment']; + return $this->container['deferByMonthsNotDays']; } /** - * Sets lastAssessment + * Sets deferByMonthsNotDays * - * @param \SynergiTech\Staffology\Model\ContractAeAssessmentResponse|null $lastAssessment lastAssessment + * @param bool|null $deferByMonthsNotDays If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days * * @return $this */ - public function setLastAssessment(?\SynergiTech\Staffology\Model\ContractAeAssessmentResponse $lastAssessment): static + public function setDeferByMonthsNotDays(?bool $deferByMonthsNotDays): static { - if (is_null($lastAssessment)) { - throw new InvalidArgumentException('non-nullable lastAssessment cannot be null'); + if (is_null($deferByMonthsNotDays)) { + throw new InvalidArgumentException('non-nullable deferByMonthsNotDays cannot be null'); } - $this->container['lastAssessment'] = $lastAssessment; + $this->container['deferByMonthsNotDays'] = $deferByMonthsNotDays; return $this; } /** - * Gets ukWorker + * Gets exempt * - * @return \SynergiTech\Staffology\Model\AeUKWorker|null + * @return bool|null */ - public function getUkWorker(): ?\SynergiTech\Staffology\Model\AeUKWorker + public function getExempt(): ?bool { - return $this->container['ukWorker']; + return $this->container['exempt']; } /** - * Sets ukWorker + * Sets exempt * - * @param \SynergiTech\Staffology\Model\AeUKWorker|null $ukWorker ukWorker + * @param bool|null $exempt exempt * * @return $this */ - public function setUkWorker(?\SynergiTech\Staffology\Model\AeUKWorker $ukWorker): static + public function setExempt(?bool $exempt): static { - if (is_null($ukWorker)) { - throw new InvalidArgumentException('non-nullable ukWorker cannot be null'); + if (is_null($exempt)) { + throw new InvalidArgumentException('non-nullable exempt cannot be null'); } - $this->container['ukWorker'] = $ukWorker; + $this->container['exempt'] = $exempt; return $this; } /** - * Gets daysToDeferAssessment + * Gets lastAssessment * - * @return int|null + * @return \SynergiTech\Staffology\Model\ContractAeAssessmentResponse|null */ - public function getDaysToDeferAssessment(): ?int + public function getLastAssessment(): ?\SynergiTech\Staffology\Model\ContractAeAssessmentResponse { - return $this->container['daysToDeferAssessment']; + return $this->container['lastAssessment']; } /** - * Sets daysToDeferAssessment + * Sets lastAssessment * - * @param int|null $daysToDeferAssessment The number of days, if any, to defer assessment of this employee. You're allowed to defer assessment of new employees by up to 3 months. + * @param \SynergiTech\Staffology\Model\ContractAeAssessmentResponse|null $lastAssessment lastAssessment * * @return $this */ - public function setDaysToDeferAssessment(?int $daysToDeferAssessment): static + public function setLastAssessment(?\SynergiTech\Staffology\Model\ContractAeAssessmentResponse $lastAssessment): static { - if (is_null($daysToDeferAssessment)) { - throw new InvalidArgumentException('non-nullable daysToDeferAssessment cannot be null'); + if (is_null($lastAssessment)) { + throw new InvalidArgumentException('non-nullable lastAssessment cannot be null'); } - $this->container['daysToDeferAssessment'] = $daysToDeferAssessment; + $this->container['lastAssessment'] = $lastAssessment; return $this; } /** - * Gets deferByMonthsNotDays + * Gets postponementDate * - * @return bool|null + * @return \DateTime|null */ - public function getDeferByMonthsNotDays(): ?bool + public function getPostponementDate(): ?\DateTime { - return $this->container['deferByMonthsNotDays']; + return $this->container['postponementDate']; } /** - * Sets deferByMonthsNotDays + * Sets postponementDate * - * @param bool|null $deferByMonthsNotDays If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days + * @param \DateTime|null $postponementDate [readonly] If a value is present, then employee wont be enrolled on an AE Pension until after this date. This is automatically set to a date if the employee is deemed to be an EligibleJobHolder, but the employer has set a Postponement period and this value is currently null This is automatically set to null if it already has a value and the employee is deemed NOT to be an EligibleJobHolder - ie, they previously qualified but now do not. * * @return $this */ - public function setDeferByMonthsNotDays(?bool $deferByMonthsNotDays): static + public function setPostponementDate(?\DateTime $postponementDate): static { - if (is_null($deferByMonthsNotDays)) { - throw new InvalidArgumentException('non-nullable deferByMonthsNotDays cannot be null'); + if (is_null($postponementDate)) { + array_push($this->openAPINullablesSetToNull, 'postponementDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('postponementDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['deferByMonthsNotDays'] = $deferByMonthsNotDays; + $this->container['postponementDate'] = $postponementDate; return $this; } /** - * Gets exempt + * Gets state * - * @return bool|null + * @return \SynergiTech\Staffology\Model\AeEmployeeState|null */ - public function getExempt(): ?bool + public function getState(): ?\SynergiTech\Staffology\Model\AeEmployeeState { - return $this->container['exempt']; + return $this->container['state']; } /** - * Sets exempt + * Sets state * - * @param bool|null $exempt exempt + * @param \SynergiTech\Staffology\Model\AeEmployeeState|null $state state * * @return $this */ - public function setExempt(?bool $exempt): static + public function setState(?\SynergiTech\Staffology\Model\AeEmployeeState $state): static { - if (is_null($exempt)) { - throw new InvalidArgumentException('non-nullable exempt cannot be null'); + if (is_null($state)) { + throw new InvalidArgumentException('non-nullable state cannot be null'); } - $this->container['exempt'] = $exempt; + $this->container['state'] = $state; return $this; } /** - * Gets aeExclusionCode + * Gets stateDate * - * @return \SynergiTech\Staffology\Model\AeExclusionCode|null + * @return \DateTime|null */ - public function getAeExclusionCode(): ?\SynergiTech\Staffology\Model\AeExclusionCode + public function getStateDate(): ?\DateTime { - return $this->container['aeExclusionCode']; + return $this->container['stateDate']; } /** - * Sets aeExclusionCode + * Sets stateDate * - * @param \SynergiTech\Staffology\Model\AeExclusionCode|null $aeExclusionCode aeExclusionCode + * @param \DateTime|null $stateDate stateDate * * @return $this */ - public function setAeExclusionCode(?\SynergiTech\Staffology\Model\AeExclusionCode $aeExclusionCode): static + public function setStateDate(?\DateTime $stateDate): static { - if (is_null($aeExclusionCode)) { - throw new InvalidArgumentException('non-nullable aeExclusionCode cannot be null'); + if (is_null($stateDate)) { + array_push($this->openAPINullablesSetToNull, 'stateDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('stateDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['aeExclusionCode'] = $aeExclusionCode; + $this->container['stateDate'] = $stateDate; return $this; } /** - * Gets aePostponementLetterSent + * Gets ukWorker * - * @return bool|null + * @return \SynergiTech\Staffology\Model\AeUKWorker|null */ - public function getAePostponementLetterSent(): ?bool + public function getUkWorker(): ?\SynergiTech\Staffology\Model\AeUKWorker { - return $this->container['aePostponementLetterSent']; + return $this->container['ukWorker']; } /** - * Sets aePostponementLetterSent + * Sets ukWorker * - * @param bool|null $aePostponementLetterSent aePostponementLetterSent + * @param \SynergiTech\Staffology\Model\AeUKWorker|null $ukWorker ukWorker * * @return $this */ - public function setAePostponementLetterSent(?bool $aePostponementLetterSent): static + public function setUkWorker(?\SynergiTech\Staffology\Model\AeUKWorker $ukWorker): static { - if (is_null($aePostponementLetterSent)) { - throw new InvalidArgumentException('non-nullable aePostponementLetterSent cannot be null'); + if (is_null($ukWorker)) { + throw new InvalidArgumentException('non-nullable ukWorker cannot be null'); } - $this->container['aePostponementLetterSent'] = $aePostponementLetterSent; + $this->container['ukWorker'] = $ukWorker; return $this; } diff --git a/src/Model/ContractAutoEnrolmentSettingsRequest.php b/src/Model/ContractAutoEnrolmentSettingsRequest.php index fd4471b..a8af126 100644 --- a/src/Model/ContractAutoEnrolmentSettingsRequest.php +++ b/src/Model/ContractAutoEnrolmentSettingsRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,17 +59,18 @@ class ContractAutoEnrolmentSettingsRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'stagingDate' => '\DateTime', 'cyclicalReenrolmentDate' => '\DateTime', - 'previousCyclicalReenrolmentDate' => '\DateTime', - 'defaultPension' => '\SynergiTech\Staffology\Model\ContractPensionSelectionRequest', - 'pensionSameAsDefault' => 'bool', 'daysToDeferAssessment' => 'int', + 'defaultPension' => '\SynergiTech\Staffology\Model\ContractPensionSelectionRequest', 'deferByMonthsNotDays' => 'bool', 'deferEnrolmentBy' => 'int', 'deferEnrolmentByPeriodType' => '\SynergiTech\Staffology\Model\DeferalPeriodType', - 'includeNonPensionedEmployeesInSubmission' => 'bool' + 'exemptFromAeRegulations' => 'bool', + 'id' => 'string', + 'includeNonPensionedEmployeesInSubmission' => 'bool', + 'pensionSameAsDefault' => 'bool', + 'previousCyclicalReenrolmentDate' => '\DateTime', + 'stagingDate' => '\DateTime' ]; /** @@ -78,17 +79,18 @@ class ContractAutoEnrolmentSettingsRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'stagingDate' => 'date', 'cyclicalReenrolmentDate' => 'date', - 'previousCyclicalReenrolmentDate' => 'date', - 'defaultPension' => null, - 'pensionSameAsDefault' => null, 'daysToDeferAssessment' => 'int32', + 'defaultPension' => null, 'deferByMonthsNotDays' => null, 'deferEnrolmentBy' => 'int32', 'deferEnrolmentByPeriodType' => null, - 'includeNonPensionedEmployeesInSubmission' => null + 'exemptFromAeRegulations' => null, + 'id' => 'uuid', + 'includeNonPensionedEmployeesInSubmission' => null, + 'pensionSameAsDefault' => null, + 'previousCyclicalReenrolmentDate' => 'date', + 'stagingDate' => 'date' ]; /** @@ -97,17 +99,18 @@ class ContractAutoEnrolmentSettingsRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'stagingDate' => false, 'cyclicalReenrolmentDate' => true, - 'previousCyclicalReenrolmentDate' => true, - 'defaultPension' => false, - 'pensionSameAsDefault' => false, 'daysToDeferAssessment' => false, + 'defaultPension' => false, 'deferByMonthsNotDays' => false, 'deferEnrolmentBy' => false, 'deferEnrolmentByPeriodType' => false, - 'includeNonPensionedEmployeesInSubmission' => false + 'exemptFromAeRegulations' => false, + 'id' => false, + 'includeNonPensionedEmployeesInSubmission' => false, + 'pensionSameAsDefault' => false, + 'previousCyclicalReenrolmentDate' => true, + 'stagingDate' => false ]; /** @@ -196,17 +199,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'stagingDate' => 'stagingDate', 'cyclicalReenrolmentDate' => 'cyclicalReenrolmentDate', - 'previousCyclicalReenrolmentDate' => 'previousCyclicalReenrolmentDate', - 'defaultPension' => 'defaultPension', - 'pensionSameAsDefault' => 'pensionSameAsDefault', 'daysToDeferAssessment' => 'daysToDeferAssessment', + 'defaultPension' => 'defaultPension', 'deferByMonthsNotDays' => 'deferByMonthsNotDays', 'deferEnrolmentBy' => 'deferEnrolmentBy', 'deferEnrolmentByPeriodType' => 'deferEnrolmentByPeriodType', - 'includeNonPensionedEmployeesInSubmission' => 'includeNonPensionedEmployeesInSubmission' + 'exemptFromAeRegulations' => 'exemptFromAeRegulations', + 'id' => 'id', + 'includeNonPensionedEmployeesInSubmission' => 'includeNonPensionedEmployeesInSubmission', + 'pensionSameAsDefault' => 'pensionSameAsDefault', + 'previousCyclicalReenrolmentDate' => 'previousCyclicalReenrolmentDate', + 'stagingDate' => 'stagingDate' ]; /** @@ -215,17 +219,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'stagingDate' => 'setStagingDate', 'cyclicalReenrolmentDate' => 'setCyclicalReenrolmentDate', - 'previousCyclicalReenrolmentDate' => 'setPreviousCyclicalReenrolmentDate', - 'defaultPension' => 'setDefaultPension', - 'pensionSameAsDefault' => 'setPensionSameAsDefault', 'daysToDeferAssessment' => 'setDaysToDeferAssessment', + 'defaultPension' => 'setDefaultPension', 'deferByMonthsNotDays' => 'setDeferByMonthsNotDays', 'deferEnrolmentBy' => 'setDeferEnrolmentBy', 'deferEnrolmentByPeriodType' => 'setDeferEnrolmentByPeriodType', - 'includeNonPensionedEmployeesInSubmission' => 'setIncludeNonPensionedEmployeesInSubmission' + 'exemptFromAeRegulations' => 'setExemptFromAeRegulations', + 'id' => 'setId', + 'includeNonPensionedEmployeesInSubmission' => 'setIncludeNonPensionedEmployeesInSubmission', + 'pensionSameAsDefault' => 'setPensionSameAsDefault', + 'previousCyclicalReenrolmentDate' => 'setPreviousCyclicalReenrolmentDate', + 'stagingDate' => 'setStagingDate' ]; /** @@ -234,17 +239,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'stagingDate' => 'getStagingDate', 'cyclicalReenrolmentDate' => 'getCyclicalReenrolmentDate', - 'previousCyclicalReenrolmentDate' => 'getPreviousCyclicalReenrolmentDate', - 'defaultPension' => 'getDefaultPension', - 'pensionSameAsDefault' => 'getPensionSameAsDefault', 'daysToDeferAssessment' => 'getDaysToDeferAssessment', + 'defaultPension' => 'getDefaultPension', 'deferByMonthsNotDays' => 'getDeferByMonthsNotDays', 'deferEnrolmentBy' => 'getDeferEnrolmentBy', 'deferEnrolmentByPeriodType' => 'getDeferEnrolmentByPeriodType', - 'includeNonPensionedEmployeesInSubmission' => 'getIncludeNonPensionedEmployeesInSubmission' + 'exemptFromAeRegulations' => 'getExemptFromAeRegulations', + 'id' => 'getId', + 'includeNonPensionedEmployeesInSubmission' => 'getIncludeNonPensionedEmployeesInSubmission', + 'pensionSameAsDefault' => 'getPensionSameAsDefault', + 'previousCyclicalReenrolmentDate' => 'getPreviousCyclicalReenrolmentDate', + 'stagingDate' => 'getStagingDate' ]; /** @@ -303,17 +309,18 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('stagingDate', $data ?? [], null); $this->setIfExists('cyclicalReenrolmentDate', $data ?? [], null); - $this->setIfExists('previousCyclicalReenrolmentDate', $data ?? [], null); - $this->setIfExists('defaultPension', $data ?? [], null); - $this->setIfExists('pensionSameAsDefault', $data ?? [], null); $this->setIfExists('daysToDeferAssessment', $data ?? [], null); + $this->setIfExists('defaultPension', $data ?? [], null); $this->setIfExists('deferByMonthsNotDays', $data ?? [], null); $this->setIfExists('deferEnrolmentBy', $data ?? [], null); $this->setIfExists('deferEnrolmentByPeriodType', $data ?? [], null); + $this->setIfExists('exemptFromAeRegulations', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('includeNonPensionedEmployeesInSubmission', $data ?? [], null); + $this->setIfExists('pensionSameAsDefault', $data ?? [], null); + $this->setIfExists('previousCyclicalReenrolmentDate', $data ?? [], null); + $this->setIfExists('stagingDate', $data ?? [], null); } /** @@ -358,60 +365,6 @@ public function valid(): bool } - /** - * Gets id - * - * @return string|null - */ - public function getId(): ?string - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id [readonly] The unique id of the object - * - * @return $this - */ - public function setId(?string $id): static - { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets stagingDate - * - * @return \DateTime|null - */ - public function getStagingDate(): ?\DateTime - { - return $this->container['stagingDate']; - } - - /** - * Sets stagingDate - * - * @param \DateTime|null $stagingDate stagingDate - * - * @return $this - */ - public function setStagingDate(?\DateTime $stagingDate): static - { - if (is_null($stagingDate)) { - throw new InvalidArgumentException('non-nullable stagingDate cannot be null'); - } - $this->container['stagingDate'] = $stagingDate; - - return $this; - } - /** * Gets cyclicalReenrolmentDate * @@ -447,35 +400,28 @@ public function setCyclicalReenrolmentDate(?\DateTime $cyclicalReenrolmentDate): } /** - * Gets previousCyclicalReenrolmentDate + * Gets daysToDeferAssessment * - * @return \DateTime|null + * @return int|null */ - public function getPreviousCyclicalReenrolmentDate(): ?\DateTime + public function getDaysToDeferAssessment(): ?int { - return $this->container['previousCyclicalReenrolmentDate']; + return $this->container['daysToDeferAssessment']; } /** - * Sets previousCyclicalReenrolmentDate + * Sets daysToDeferAssessment * - * @param \DateTime|null $previousCyclicalReenrolmentDate previousCyclicalReenrolmentDate + * @param int|null $daysToDeferAssessment The number of days, if any, to defer assessment of new employees. You're allowed to defer assessment of new employees by up to 3 months. This is the default value used when you create a new employee. It can be changed on a per-employee basis. * * @return $this */ - public function setPreviousCyclicalReenrolmentDate(?\DateTime $previousCyclicalReenrolmentDate): static + public function setDaysToDeferAssessment(?int $daysToDeferAssessment): static { - if (is_null($previousCyclicalReenrolmentDate)) { - array_push($this->openAPINullablesSetToNull, 'previousCyclicalReenrolmentDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('previousCyclicalReenrolmentDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($daysToDeferAssessment)) { + throw new InvalidArgumentException('non-nullable daysToDeferAssessment cannot be null'); } - $this->container['previousCyclicalReenrolmentDate'] = $previousCyclicalReenrolmentDate; + $this->container['daysToDeferAssessment'] = $daysToDeferAssessment; return $this; } @@ -508,136 +454,136 @@ public function setDefaultPension(?\SynergiTech\Staffology\Model\ContractPension } /** - * Gets pensionSameAsDefault + * Gets deferByMonthsNotDays * * @return bool|null */ - public function getPensionSameAsDefault(): ?bool + public function getDeferByMonthsNotDays(): ?bool { - return $this->container['pensionSameAsDefault']; + return $this->container['deferByMonthsNotDays']; } /** - * Sets pensionSameAsDefault + * Sets deferByMonthsNotDays * - * @param bool|null $pensionSameAsDefault pensionSameAsDefault + * @param bool|null $deferByMonthsNotDays If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days * * @return $this */ - public function setPensionSameAsDefault(?bool $pensionSameAsDefault): static + public function setDeferByMonthsNotDays(?bool $deferByMonthsNotDays): static { - if (is_null($pensionSameAsDefault)) { - throw new InvalidArgumentException('non-nullable pensionSameAsDefault cannot be null'); + if (is_null($deferByMonthsNotDays)) { + throw new InvalidArgumentException('non-nullable deferByMonthsNotDays cannot be null'); } - $this->container['pensionSameAsDefault'] = $pensionSameAsDefault; + $this->container['deferByMonthsNotDays'] = $deferByMonthsNotDays; return $this; } /** - * Gets daysToDeferAssessment + * Gets deferEnrolmentBy * * @return int|null */ - public function getDaysToDeferAssessment(): ?int + public function getDeferEnrolmentBy(): ?int { - return $this->container['daysToDeferAssessment']; + return $this->container['deferEnrolmentBy']; } /** - * Sets daysToDeferAssessment + * Sets deferEnrolmentBy * - * @param int|null $daysToDeferAssessment The number of days, if any, to defer assessment of new employees. You're allowed to defer assessment of new employees by up to 3 months. This is the default value used when you create a new employee. It can be changed on a per-employee basis. + * @param int|null $deferEnrolmentBy The number of days )or weeks, or months), if any, to defer enrolment of employees that are Eligible Jobholders. For example, if this is set to 30 days then if an employee meets the criteria for enrolment then they'll only be enrolled if they still meet the criteria 30 days later * * @return $this */ - public function setDaysToDeferAssessment(?int $daysToDeferAssessment): static + public function setDeferEnrolmentBy(?int $deferEnrolmentBy): static { - if (is_null($daysToDeferAssessment)) { - throw new InvalidArgumentException('non-nullable daysToDeferAssessment cannot be null'); + if (is_null($deferEnrolmentBy)) { + throw new InvalidArgumentException('non-nullable deferEnrolmentBy cannot be null'); } - $this->container['daysToDeferAssessment'] = $daysToDeferAssessment; + $this->container['deferEnrolmentBy'] = $deferEnrolmentBy; return $this; } /** - * Gets deferByMonthsNotDays + * Gets deferEnrolmentByPeriodType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\DeferalPeriodType|null */ - public function getDeferByMonthsNotDays(): ?bool + public function getDeferEnrolmentByPeriodType(): ?\SynergiTech\Staffology\Model\DeferalPeriodType { - return $this->container['deferByMonthsNotDays']; + return $this->container['deferEnrolmentByPeriodType']; } /** - * Sets deferByMonthsNotDays + * Sets deferEnrolmentByPeriodType * - * @param bool|null $deferByMonthsNotDays If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days + * @param \SynergiTech\Staffology\Model\DeferalPeriodType|null $deferEnrolmentByPeriodType deferEnrolmentByPeriodType * * @return $this */ - public function setDeferByMonthsNotDays(?bool $deferByMonthsNotDays): static + public function setDeferEnrolmentByPeriodType(?\SynergiTech\Staffology\Model\DeferalPeriodType $deferEnrolmentByPeriodType): static { - if (is_null($deferByMonthsNotDays)) { - throw new InvalidArgumentException('non-nullable deferByMonthsNotDays cannot be null'); + if (is_null($deferEnrolmentByPeriodType)) { + throw new InvalidArgumentException('non-nullable deferEnrolmentByPeriodType cannot be null'); } - $this->container['deferByMonthsNotDays'] = $deferByMonthsNotDays; + $this->container['deferEnrolmentByPeriodType'] = $deferEnrolmentByPeriodType; return $this; } /** - * Gets deferEnrolmentBy + * Gets exemptFromAeRegulations * - * @return int|null + * @return bool|null */ - public function getDeferEnrolmentBy(): ?int + public function getExemptFromAeRegulations(): ?bool { - return $this->container['deferEnrolmentBy']; + return $this->container['exemptFromAeRegulations']; } /** - * Sets deferEnrolmentBy + * Sets exemptFromAeRegulations * - * @param int|null $deferEnrolmentBy The number of days )or weeks, or months), if any, to defer enrolment of employees that are Eligible Jobholders. For example, if this is set to 30 days then if an employee meets the criteria for enrolment then they'll only be enrolled if they still meet the criteria 30 days later + * @param bool|null $exemptFromAeRegulations Indicates if an employer is exempt from normal AE regulations * * @return $this */ - public function setDeferEnrolmentBy(?int $deferEnrolmentBy): static + public function setExemptFromAeRegulations(?bool $exemptFromAeRegulations): static { - if (is_null($deferEnrolmentBy)) { - throw new InvalidArgumentException('non-nullable deferEnrolmentBy cannot be null'); + if (is_null($exemptFromAeRegulations)) { + throw new InvalidArgumentException('non-nullable exemptFromAeRegulations cannot be null'); } - $this->container['deferEnrolmentBy'] = $deferEnrolmentBy; + $this->container['exemptFromAeRegulations'] = $exemptFromAeRegulations; return $this; } /** - * Gets deferEnrolmentByPeriodType + * Gets id * - * @return \SynergiTech\Staffology\Model\DeferalPeriodType|null + * @return string|null */ - public function getDeferEnrolmentByPeriodType(): ?\SynergiTech\Staffology\Model\DeferalPeriodType + public function getId(): ?string { - return $this->container['deferEnrolmentByPeriodType']; + return $this->container['id']; } /** - * Sets deferEnrolmentByPeriodType + * Sets id * - * @param \SynergiTech\Staffology\Model\DeferalPeriodType|null $deferEnrolmentByPeriodType deferEnrolmentByPeriodType + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setDeferEnrolmentByPeriodType(?\SynergiTech\Staffology\Model\DeferalPeriodType $deferEnrolmentByPeriodType): static + public function setId(?string $id): static { - if (is_null($deferEnrolmentByPeriodType)) { - throw new InvalidArgumentException('non-nullable deferEnrolmentByPeriodType cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['deferEnrolmentByPeriodType'] = $deferEnrolmentByPeriodType; + $this->container['id'] = $id; return $this; } @@ -668,6 +614,94 @@ public function setIncludeNonPensionedEmployeesInSubmission(?bool $includeNonPen return $this; } + + /** + * Gets pensionSameAsDefault + * + * @return bool|null + */ + public function getPensionSameAsDefault(): ?bool + { + return $this->container['pensionSameAsDefault']; + } + + /** + * Sets pensionSameAsDefault + * + * @param bool|null $pensionSameAsDefault pensionSameAsDefault + * + * @return $this + */ + public function setPensionSameAsDefault(?bool $pensionSameAsDefault): static + { + if (is_null($pensionSameAsDefault)) { + throw new InvalidArgumentException('non-nullable pensionSameAsDefault cannot be null'); + } + $this->container['pensionSameAsDefault'] = $pensionSameAsDefault; + + return $this; + } + + /** + * Gets previousCyclicalReenrolmentDate + * + * @return \DateTime|null + */ + public function getPreviousCyclicalReenrolmentDate(): ?\DateTime + { + return $this->container['previousCyclicalReenrolmentDate']; + } + + /** + * Sets previousCyclicalReenrolmentDate + * + * @param \DateTime|null $previousCyclicalReenrolmentDate previousCyclicalReenrolmentDate + * + * @return $this + */ + public function setPreviousCyclicalReenrolmentDate(?\DateTime $previousCyclicalReenrolmentDate): static + { + if (is_null($previousCyclicalReenrolmentDate)) { + array_push($this->openAPINullablesSetToNull, 'previousCyclicalReenrolmentDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('previousCyclicalReenrolmentDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['previousCyclicalReenrolmentDate'] = $previousCyclicalReenrolmentDate; + + return $this; + } + + /** + * Gets stagingDate + * + * @return \DateTime|null + */ + public function getStagingDate(): ?\DateTime + { + return $this->container['stagingDate']; + } + + /** + * Sets stagingDate + * + * @param \DateTime|null $stagingDate stagingDate + * + * @return $this + */ + public function setStagingDate(?\DateTime $stagingDate): static + { + if (is_null($stagingDate)) { + throw new InvalidArgumentException('non-nullable stagingDate cannot be null'); + } + $this->container['stagingDate'] = $stagingDate; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractAutoEnrolmentSettingsResponse.php b/src/Model/ContractAutoEnrolmentSettingsResponse.php index 030f8f5..a923ead 100644 --- a/src/Model/ContractAutoEnrolmentSettingsResponse.php +++ b/src/Model/ContractAutoEnrolmentSettingsResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,17 +59,18 @@ class ContractAutoEnrolmentSettingsResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'stagingDate' => '\DateTime', 'cyclicalReenrolmentDate' => '\DateTime', - 'previousCyclicalReenrolmentDate' => '\DateTime', - 'defaultPension' => '\SynergiTech\Staffology\Model\ContractPensionSelectionResponse', - 'pensionSameAsDefault' => 'bool', 'daysToDeferAssessment' => 'int', + 'defaultPension' => '\SynergiTech\Staffology\Model\ContractPensionSelectionResponse', 'deferByMonthsNotDays' => 'bool', 'deferEnrolmentBy' => 'int', 'deferEnrolmentByPeriodType' => '\SynergiTech\Staffology\Model\DeferalPeriodType', - 'includeNonPensionedEmployeesInSubmission' => 'bool' + 'exemptFromAeRegulations' => 'bool', + 'id' => 'string', + 'includeNonPensionedEmployeesInSubmission' => 'bool', + 'pensionSameAsDefault' => 'bool', + 'previousCyclicalReenrolmentDate' => '\DateTime', + 'stagingDate' => '\DateTime' ]; /** @@ -78,17 +79,18 @@ class ContractAutoEnrolmentSettingsResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'stagingDate' => 'date', 'cyclicalReenrolmentDate' => 'date', - 'previousCyclicalReenrolmentDate' => 'date', - 'defaultPension' => null, - 'pensionSameAsDefault' => null, 'daysToDeferAssessment' => 'int32', + 'defaultPension' => null, 'deferByMonthsNotDays' => null, 'deferEnrolmentBy' => 'int32', 'deferEnrolmentByPeriodType' => null, - 'includeNonPensionedEmployeesInSubmission' => null + 'exemptFromAeRegulations' => null, + 'id' => 'uuid', + 'includeNonPensionedEmployeesInSubmission' => null, + 'pensionSameAsDefault' => null, + 'previousCyclicalReenrolmentDate' => 'date', + 'stagingDate' => 'date' ]; /** @@ -97,17 +99,18 @@ class ContractAutoEnrolmentSettingsResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'stagingDate' => false, 'cyclicalReenrolmentDate' => true, - 'previousCyclicalReenrolmentDate' => true, - 'defaultPension' => false, - 'pensionSameAsDefault' => false, 'daysToDeferAssessment' => false, + 'defaultPension' => false, 'deferByMonthsNotDays' => false, 'deferEnrolmentBy' => false, 'deferEnrolmentByPeriodType' => false, - 'includeNonPensionedEmployeesInSubmission' => false + 'exemptFromAeRegulations' => false, + 'id' => false, + 'includeNonPensionedEmployeesInSubmission' => false, + 'pensionSameAsDefault' => false, + 'previousCyclicalReenrolmentDate' => true, + 'stagingDate' => false ]; /** @@ -196,17 +199,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'stagingDate' => 'stagingDate', 'cyclicalReenrolmentDate' => 'cyclicalReenrolmentDate', - 'previousCyclicalReenrolmentDate' => 'previousCyclicalReenrolmentDate', - 'defaultPension' => 'defaultPension', - 'pensionSameAsDefault' => 'pensionSameAsDefault', 'daysToDeferAssessment' => 'daysToDeferAssessment', + 'defaultPension' => 'defaultPension', 'deferByMonthsNotDays' => 'deferByMonthsNotDays', 'deferEnrolmentBy' => 'deferEnrolmentBy', 'deferEnrolmentByPeriodType' => 'deferEnrolmentByPeriodType', - 'includeNonPensionedEmployeesInSubmission' => 'includeNonPensionedEmployeesInSubmission' + 'exemptFromAeRegulations' => 'exemptFromAeRegulations', + 'id' => 'id', + 'includeNonPensionedEmployeesInSubmission' => 'includeNonPensionedEmployeesInSubmission', + 'pensionSameAsDefault' => 'pensionSameAsDefault', + 'previousCyclicalReenrolmentDate' => 'previousCyclicalReenrolmentDate', + 'stagingDate' => 'stagingDate' ]; /** @@ -215,17 +219,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'stagingDate' => 'setStagingDate', 'cyclicalReenrolmentDate' => 'setCyclicalReenrolmentDate', - 'previousCyclicalReenrolmentDate' => 'setPreviousCyclicalReenrolmentDate', - 'defaultPension' => 'setDefaultPension', - 'pensionSameAsDefault' => 'setPensionSameAsDefault', 'daysToDeferAssessment' => 'setDaysToDeferAssessment', + 'defaultPension' => 'setDefaultPension', 'deferByMonthsNotDays' => 'setDeferByMonthsNotDays', 'deferEnrolmentBy' => 'setDeferEnrolmentBy', 'deferEnrolmentByPeriodType' => 'setDeferEnrolmentByPeriodType', - 'includeNonPensionedEmployeesInSubmission' => 'setIncludeNonPensionedEmployeesInSubmission' + 'exemptFromAeRegulations' => 'setExemptFromAeRegulations', + 'id' => 'setId', + 'includeNonPensionedEmployeesInSubmission' => 'setIncludeNonPensionedEmployeesInSubmission', + 'pensionSameAsDefault' => 'setPensionSameAsDefault', + 'previousCyclicalReenrolmentDate' => 'setPreviousCyclicalReenrolmentDate', + 'stagingDate' => 'setStagingDate' ]; /** @@ -234,17 +239,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'stagingDate' => 'getStagingDate', 'cyclicalReenrolmentDate' => 'getCyclicalReenrolmentDate', - 'previousCyclicalReenrolmentDate' => 'getPreviousCyclicalReenrolmentDate', - 'defaultPension' => 'getDefaultPension', - 'pensionSameAsDefault' => 'getPensionSameAsDefault', 'daysToDeferAssessment' => 'getDaysToDeferAssessment', + 'defaultPension' => 'getDefaultPension', 'deferByMonthsNotDays' => 'getDeferByMonthsNotDays', 'deferEnrolmentBy' => 'getDeferEnrolmentBy', 'deferEnrolmentByPeriodType' => 'getDeferEnrolmentByPeriodType', - 'includeNonPensionedEmployeesInSubmission' => 'getIncludeNonPensionedEmployeesInSubmission' + 'exemptFromAeRegulations' => 'getExemptFromAeRegulations', + 'id' => 'getId', + 'includeNonPensionedEmployeesInSubmission' => 'getIncludeNonPensionedEmployeesInSubmission', + 'pensionSameAsDefault' => 'getPensionSameAsDefault', + 'previousCyclicalReenrolmentDate' => 'getPreviousCyclicalReenrolmentDate', + 'stagingDate' => 'getStagingDate' ]; /** @@ -303,17 +309,18 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('stagingDate', $data ?? [], null); $this->setIfExists('cyclicalReenrolmentDate', $data ?? [], null); - $this->setIfExists('previousCyclicalReenrolmentDate', $data ?? [], null); - $this->setIfExists('defaultPension', $data ?? [], null); - $this->setIfExists('pensionSameAsDefault', $data ?? [], null); $this->setIfExists('daysToDeferAssessment', $data ?? [], null); + $this->setIfExists('defaultPension', $data ?? [], null); $this->setIfExists('deferByMonthsNotDays', $data ?? [], null); $this->setIfExists('deferEnrolmentBy', $data ?? [], null); $this->setIfExists('deferEnrolmentByPeriodType', $data ?? [], null); + $this->setIfExists('exemptFromAeRegulations', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('includeNonPensionedEmployeesInSubmission', $data ?? [], null); + $this->setIfExists('pensionSameAsDefault', $data ?? [], null); + $this->setIfExists('previousCyclicalReenrolmentDate', $data ?? [], null); + $this->setIfExists('stagingDate', $data ?? [], null); } /** @@ -358,60 +365,6 @@ public function valid(): bool } - /** - * Gets id - * - * @return string|null - */ - public function getId(): ?string - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return $this - */ - public function setId(?string $id): static - { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets stagingDate - * - * @return \DateTime|null - */ - public function getStagingDate(): ?\DateTime - { - return $this->container['stagingDate']; - } - - /** - * Sets stagingDate - * - * @param \DateTime|null $stagingDate stagingDate - * - * @return $this - */ - public function setStagingDate(?\DateTime $stagingDate): static - { - if (is_null($stagingDate)) { - throw new InvalidArgumentException('non-nullable stagingDate cannot be null'); - } - $this->container['stagingDate'] = $stagingDate; - - return $this; - } - /** * Gets cyclicalReenrolmentDate * @@ -447,35 +400,28 @@ public function setCyclicalReenrolmentDate(?\DateTime $cyclicalReenrolmentDate): } /** - * Gets previousCyclicalReenrolmentDate + * Gets daysToDeferAssessment * - * @return \DateTime|null + * @return int|null */ - public function getPreviousCyclicalReenrolmentDate(): ?\DateTime + public function getDaysToDeferAssessment(): ?int { - return $this->container['previousCyclicalReenrolmentDate']; + return $this->container['daysToDeferAssessment']; } /** - * Sets previousCyclicalReenrolmentDate + * Sets daysToDeferAssessment * - * @param \DateTime|null $previousCyclicalReenrolmentDate previousCyclicalReenrolmentDate + * @param int|null $daysToDeferAssessment The number of days, if any, to defer assessment of new employees. You're allowed to defer assessment of new employees by up to 3 months. This is the default value used when you create a new employee. It can be changed on a per-employee basis. * * @return $this */ - public function setPreviousCyclicalReenrolmentDate(?\DateTime $previousCyclicalReenrolmentDate): static + public function setDaysToDeferAssessment(?int $daysToDeferAssessment): static { - if (is_null($previousCyclicalReenrolmentDate)) { - array_push($this->openAPINullablesSetToNull, 'previousCyclicalReenrolmentDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('previousCyclicalReenrolmentDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($daysToDeferAssessment)) { + throw new InvalidArgumentException('non-nullable daysToDeferAssessment cannot be null'); } - $this->container['previousCyclicalReenrolmentDate'] = $previousCyclicalReenrolmentDate; + $this->container['daysToDeferAssessment'] = $daysToDeferAssessment; return $this; } @@ -508,136 +454,136 @@ public function setDefaultPension(?\SynergiTech\Staffology\Model\ContractPension } /** - * Gets pensionSameAsDefault + * Gets deferByMonthsNotDays * * @return bool|null */ - public function getPensionSameAsDefault(): ?bool + public function getDeferByMonthsNotDays(): ?bool { - return $this->container['pensionSameAsDefault']; + return $this->container['deferByMonthsNotDays']; } /** - * Sets pensionSameAsDefault + * Sets deferByMonthsNotDays * - * @param bool|null $pensionSameAsDefault pensionSameAsDefault + * @param bool|null $deferByMonthsNotDays If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days * * @return $this */ - public function setPensionSameAsDefault(?bool $pensionSameAsDefault): static + public function setDeferByMonthsNotDays(?bool $deferByMonthsNotDays): static { - if (is_null($pensionSameAsDefault)) { - throw new InvalidArgumentException('non-nullable pensionSameAsDefault cannot be null'); + if (is_null($deferByMonthsNotDays)) { + throw new InvalidArgumentException('non-nullable deferByMonthsNotDays cannot be null'); } - $this->container['pensionSameAsDefault'] = $pensionSameAsDefault; + $this->container['deferByMonthsNotDays'] = $deferByMonthsNotDays; return $this; } /** - * Gets daysToDeferAssessment + * Gets deferEnrolmentBy * * @return int|null */ - public function getDaysToDeferAssessment(): ?int + public function getDeferEnrolmentBy(): ?int { - return $this->container['daysToDeferAssessment']; + return $this->container['deferEnrolmentBy']; } /** - * Sets daysToDeferAssessment + * Sets deferEnrolmentBy * - * @param int|null $daysToDeferAssessment The number of days, if any, to defer assessment of new employees. You're allowed to defer assessment of new employees by up to 3 months. This is the default value used when you create a new employee. It can be changed on a per-employee basis. + * @param int|null $deferEnrolmentBy The number of days )or weeks, or months), if any, to defer enrolment of employees that are Eligible Jobholders. For example, if this is set to 30 days then if an employee meets the criteria for enrolment then they'll only be enrolled if they still meet the criteria 30 days later * * @return $this */ - public function setDaysToDeferAssessment(?int $daysToDeferAssessment): static + public function setDeferEnrolmentBy(?int $deferEnrolmentBy): static { - if (is_null($daysToDeferAssessment)) { - throw new InvalidArgumentException('non-nullable daysToDeferAssessment cannot be null'); + if (is_null($deferEnrolmentBy)) { + throw new InvalidArgumentException('non-nullable deferEnrolmentBy cannot be null'); } - $this->container['daysToDeferAssessment'] = $daysToDeferAssessment; + $this->container['deferEnrolmentBy'] = $deferEnrolmentBy; return $this; } /** - * Gets deferByMonthsNotDays + * Gets deferEnrolmentByPeriodType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\DeferalPeriodType|null */ - public function getDeferByMonthsNotDays(): ?bool + public function getDeferEnrolmentByPeriodType(): ?\SynergiTech\Staffology\Model\DeferalPeriodType { - return $this->container['deferByMonthsNotDays']; + return $this->container['deferEnrolmentByPeriodType']; } /** - * Sets deferByMonthsNotDays + * Sets deferEnrolmentByPeriodType * - * @param bool|null $deferByMonthsNotDays If set to true then the value in DaysToDeferAssessment will be treated as a number of months, not a number of days + * @param \SynergiTech\Staffology\Model\DeferalPeriodType|null $deferEnrolmentByPeriodType deferEnrolmentByPeriodType * * @return $this */ - public function setDeferByMonthsNotDays(?bool $deferByMonthsNotDays): static + public function setDeferEnrolmentByPeriodType(?\SynergiTech\Staffology\Model\DeferalPeriodType $deferEnrolmentByPeriodType): static { - if (is_null($deferByMonthsNotDays)) { - throw new InvalidArgumentException('non-nullable deferByMonthsNotDays cannot be null'); + if (is_null($deferEnrolmentByPeriodType)) { + throw new InvalidArgumentException('non-nullable deferEnrolmentByPeriodType cannot be null'); } - $this->container['deferByMonthsNotDays'] = $deferByMonthsNotDays; + $this->container['deferEnrolmentByPeriodType'] = $deferEnrolmentByPeriodType; return $this; } /** - * Gets deferEnrolmentBy + * Gets exemptFromAeRegulations * - * @return int|null + * @return bool|null */ - public function getDeferEnrolmentBy(): ?int + public function getExemptFromAeRegulations(): ?bool { - return $this->container['deferEnrolmentBy']; + return $this->container['exemptFromAeRegulations']; } /** - * Sets deferEnrolmentBy + * Sets exemptFromAeRegulations * - * @param int|null $deferEnrolmentBy The number of days )or weeks, or months), if any, to defer enrolment of employees that are Eligible Jobholders. For example, if this is set to 30 days then if an employee meets the criteria for enrolment then they'll only be enrolled if they still meet the criteria 30 days later + * @param bool|null $exemptFromAeRegulations Indicates if an employer is exempt from normal AE regulations * * @return $this */ - public function setDeferEnrolmentBy(?int $deferEnrolmentBy): static + public function setExemptFromAeRegulations(?bool $exemptFromAeRegulations): static { - if (is_null($deferEnrolmentBy)) { - throw new InvalidArgumentException('non-nullable deferEnrolmentBy cannot be null'); + if (is_null($exemptFromAeRegulations)) { + throw new InvalidArgumentException('non-nullable exemptFromAeRegulations cannot be null'); } - $this->container['deferEnrolmentBy'] = $deferEnrolmentBy; + $this->container['exemptFromAeRegulations'] = $exemptFromAeRegulations; return $this; } /** - * Gets deferEnrolmentByPeriodType + * Gets id * - * @return \SynergiTech\Staffology\Model\DeferalPeriodType|null + * @return string|null */ - public function getDeferEnrolmentByPeriodType(): ?\SynergiTech\Staffology\Model\DeferalPeriodType + public function getId(): ?string { - return $this->container['deferEnrolmentByPeriodType']; + return $this->container['id']; } /** - * Sets deferEnrolmentByPeriodType + * Sets id * - * @param \SynergiTech\Staffology\Model\DeferalPeriodType|null $deferEnrolmentByPeriodType deferEnrolmentByPeriodType + * @param string|null $id id * * @return $this */ - public function setDeferEnrolmentByPeriodType(?\SynergiTech\Staffology\Model\DeferalPeriodType $deferEnrolmentByPeriodType): static + public function setId(?string $id): static { - if (is_null($deferEnrolmentByPeriodType)) { - throw new InvalidArgumentException('non-nullable deferEnrolmentByPeriodType cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['deferEnrolmentByPeriodType'] = $deferEnrolmentByPeriodType; + $this->container['id'] = $id; return $this; } @@ -668,6 +614,94 @@ public function setIncludeNonPensionedEmployeesInSubmission(?bool $includeNonPen return $this; } + + /** + * Gets pensionSameAsDefault + * + * @return bool|null + */ + public function getPensionSameAsDefault(): ?bool + { + return $this->container['pensionSameAsDefault']; + } + + /** + * Sets pensionSameAsDefault + * + * @param bool|null $pensionSameAsDefault pensionSameAsDefault + * + * @return $this + */ + public function setPensionSameAsDefault(?bool $pensionSameAsDefault): static + { + if (is_null($pensionSameAsDefault)) { + throw new InvalidArgumentException('non-nullable pensionSameAsDefault cannot be null'); + } + $this->container['pensionSameAsDefault'] = $pensionSameAsDefault; + + return $this; + } + + /** + * Gets previousCyclicalReenrolmentDate + * + * @return \DateTime|null + */ + public function getPreviousCyclicalReenrolmentDate(): ?\DateTime + { + return $this->container['previousCyclicalReenrolmentDate']; + } + + /** + * Sets previousCyclicalReenrolmentDate + * + * @param \DateTime|null $previousCyclicalReenrolmentDate previousCyclicalReenrolmentDate + * + * @return $this + */ + public function setPreviousCyclicalReenrolmentDate(?\DateTime $previousCyclicalReenrolmentDate): static + { + if (is_null($previousCyclicalReenrolmentDate)) { + array_push($this->openAPINullablesSetToNull, 'previousCyclicalReenrolmentDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('previousCyclicalReenrolmentDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['previousCyclicalReenrolmentDate'] = $previousCyclicalReenrolmentDate; + + return $this; + } + + /** + * Gets stagingDate + * + * @return \DateTime|null + */ + public function getStagingDate(): ?\DateTime + { + return $this->container['stagingDate']; + } + + /** + * Sets stagingDate + * + * @param \DateTime|null $stagingDate stagingDate + * + * @return $this + */ + public function setStagingDate(?\DateTime $stagingDate): static + { + if (is_null($stagingDate)) { + throw new InvalidArgumentException('non-nullable stagingDate cannot be null'); + } + $this->container['stagingDate'] = $stagingDate; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractBankDetails.php b/src/Model/ContractBankDetails.php index 733597e..4b1874f 100644 --- a/src/Model/ContractBankDetails.php +++ b/src/Model/ContractBankDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class ContractBankDetails implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ - 'bankName' => 'string', - 'bankBranch' => 'string', - 'bankReference' => 'string', 'accountName' => 'string', 'accountNumber' => 'string', - 'sortCode' => 'string', + 'bankBranch' => 'string', + 'bankName' => 'string', + 'bankReference' => 'string', + 'buildingSocietyRollNumber' => 'string', 'note' => 'string', - 'buildingSocietyRollNumber' => 'string' + 'sortCode' => 'string' ]; /** @@ -75,14 +75,14 @@ class ContractBankDetails implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPIFormats = [ - 'bankName' => null, - 'bankBranch' => null, - 'bankReference' => null, 'accountName' => null, 'accountNumber' => null, - 'sortCode' => null, + 'bankBranch' => null, + 'bankName' => null, + 'bankReference' => null, + 'buildingSocietyRollNumber' => null, 'note' => null, - 'buildingSocietyRollNumber' => null + 'sortCode' => null ]; /** @@ -91,14 +91,14 @@ class ContractBankDetails implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPINullables = [ - 'bankName' => true, - 'bankBranch' => true, - 'bankReference' => true, 'accountName' => true, 'accountNumber' => true, - 'sortCode' => true, + 'bankBranch' => true, + 'bankName' => true, + 'bankReference' => true, + 'buildingSocietyRollNumber' => true, 'note' => true, - 'buildingSocietyRollNumber' => true + 'sortCode' => true ]; /** @@ -187,14 +187,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'bankName' => 'bankName', - 'bankBranch' => 'bankBranch', - 'bankReference' => 'bankReference', 'accountName' => 'accountName', 'accountNumber' => 'accountNumber', - 'sortCode' => 'sortCode', + 'bankBranch' => 'bankBranch', + 'bankName' => 'bankName', + 'bankReference' => 'bankReference', + 'buildingSocietyRollNumber' => 'buildingSocietyRollNumber', 'note' => 'note', - 'buildingSocietyRollNumber' => 'buildingSocietyRollNumber' + 'sortCode' => 'sortCode' ]; /** @@ -203,14 +203,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'bankName' => 'setBankName', - 'bankBranch' => 'setBankBranch', - 'bankReference' => 'setBankReference', 'accountName' => 'setAccountName', 'accountNumber' => 'setAccountNumber', - 'sortCode' => 'setSortCode', + 'bankBranch' => 'setBankBranch', + 'bankName' => 'setBankName', + 'bankReference' => 'setBankReference', + 'buildingSocietyRollNumber' => 'setBuildingSocietyRollNumber', 'note' => 'setNote', - 'buildingSocietyRollNumber' => 'setBuildingSocietyRollNumber' + 'sortCode' => 'setSortCode' ]; /** @@ -219,14 +219,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'bankName' => 'getBankName', - 'bankBranch' => 'getBankBranch', - 'bankReference' => 'getBankReference', 'accountName' => 'getAccountName', 'accountNumber' => 'getAccountNumber', - 'sortCode' => 'getSortCode', + 'bankBranch' => 'getBankBranch', + 'bankName' => 'getBankName', + 'bankReference' => 'getBankReference', + 'buildingSocietyRollNumber' => 'getBuildingSocietyRollNumber', 'note' => 'getNote', - 'buildingSocietyRollNumber' => 'getBuildingSocietyRollNumber' + 'sortCode' => 'getSortCode' ]; /** @@ -285,14 +285,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('bankName', $data ?? [], null); - $this->setIfExists('bankBranch', $data ?? [], null); - $this->setIfExists('bankReference', $data ?? [], null); $this->setIfExists('accountName', $data ?? [], null); $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('sortCode', $data ?? [], null); - $this->setIfExists('note', $data ?? [], null); + $this->setIfExists('bankBranch', $data ?? [], null); + $this->setIfExists('bankName', $data ?? [], null); + $this->setIfExists('bankReference', $data ?? [], null); $this->setIfExists('buildingSocietyRollNumber', $data ?? [], null); + $this->setIfExists('note', $data ?? [], null); + $this->setIfExists('sortCode', $data ?? [], null); } /** @@ -338,205 +338,205 @@ public function valid(): bool /** - * Gets bankName + * Gets accountName * * @return string|null */ - public function getBankName(): ?string + public function getAccountName(): ?string { - return $this->container['bankName']; + return $this->container['accountName']; } /** - * Sets bankName + * Sets accountName * - * @param string|null $bankName bankName + * @param string|null $accountName accountName * * @return $this */ - public function setBankName(?string $bankName): static + public function setAccountName(?string $accountName): static { - if (is_null($bankName)) { - array_push($this->openAPINullablesSetToNull, 'bankName'); + if (is_null($accountName)) { + array_push($this->openAPINullablesSetToNull, 'accountName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankName', $nullablesSetToNull); + $index = array_search('accountName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['bankName'] = $bankName; + $this->container['accountName'] = $accountName; return $this; } /** - * Gets bankBranch + * Gets accountNumber * * @return string|null */ - public function getBankBranch(): ?string + public function getAccountNumber(): ?string { - return $this->container['bankBranch']; + return $this->container['accountNumber']; } /** - * Sets bankBranch + * Sets accountNumber * - * @param string|null $bankBranch bankBranch + * @param string|null $accountNumber accountNumber * * @return $this */ - public function setBankBranch(?string $bankBranch): static + public function setAccountNumber(?string $accountNumber): static { - if (is_null($bankBranch)) { - array_push($this->openAPINullablesSetToNull, 'bankBranch'); + if (is_null($accountNumber)) { + array_push($this->openAPINullablesSetToNull, 'accountNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankBranch', $nullablesSetToNull); + $index = array_search('accountNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['bankBranch'] = $bankBranch; + $this->container['accountNumber'] = $accountNumber; return $this; } /** - * Gets bankReference + * Gets bankBranch * * @return string|null */ - public function getBankReference(): ?string + public function getBankBranch(): ?string { - return $this->container['bankReference']; + return $this->container['bankBranch']; } /** - * Sets bankReference + * Sets bankBranch * - * @param string|null $bankReference bankReference + * @param string|null $bankBranch bankBranch * * @return $this */ - public function setBankReference(?string $bankReference): static + public function setBankBranch(?string $bankBranch): static { - if (is_null($bankReference)) { - array_push($this->openAPINullablesSetToNull, 'bankReference'); + if (is_null($bankBranch)) { + array_push($this->openAPINullablesSetToNull, 'bankBranch'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankReference', $nullablesSetToNull); + $index = array_search('bankBranch', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['bankReference'] = $bankReference; + $this->container['bankBranch'] = $bankBranch; return $this; } /** - * Gets accountName + * Gets bankName * * @return string|null */ - public function getAccountName(): ?string + public function getBankName(): ?string { - return $this->container['accountName']; + return $this->container['bankName']; } /** - * Sets accountName + * Sets bankName * - * @param string|null $accountName accountName + * @param string|null $bankName bankName * * @return $this */ - public function setAccountName(?string $accountName): static + public function setBankName(?string $bankName): static { - if (is_null($accountName)) { - array_push($this->openAPINullablesSetToNull, 'accountName'); + if (is_null($bankName)) { + array_push($this->openAPINullablesSetToNull, 'bankName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountName', $nullablesSetToNull); + $index = array_search('bankName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['accountName'] = $accountName; + $this->container['bankName'] = $bankName; return $this; } /** - * Gets accountNumber + * Gets bankReference * * @return string|null */ - public function getAccountNumber(): ?string + public function getBankReference(): ?string { - return $this->container['accountNumber']; + return $this->container['bankReference']; } /** - * Sets accountNumber + * Sets bankReference * - * @param string|null $accountNumber accountNumber + * @param string|null $bankReference bankReference * * @return $this */ - public function setAccountNumber(?string $accountNumber): static + public function setBankReference(?string $bankReference): static { - if (is_null($accountNumber)) { - array_push($this->openAPINullablesSetToNull, 'accountNumber'); + if (is_null($bankReference)) { + array_push($this->openAPINullablesSetToNull, 'bankReference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountNumber', $nullablesSetToNull); + $index = array_search('bankReference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['accountNumber'] = $accountNumber; + $this->container['bankReference'] = $bankReference; return $this; } /** - * Gets sortCode + * Gets buildingSocietyRollNumber * * @return string|null */ - public function getSortCode(): ?string + public function getBuildingSocietyRollNumber(): ?string { - return $this->container['sortCode']; + return $this->container['buildingSocietyRollNumber']; } /** - * Sets sortCode + * Sets buildingSocietyRollNumber * - * @param string|null $sortCode sortCode + * @param string|null $buildingSocietyRollNumber buildingSocietyRollNumber * * @return $this */ - public function setSortCode(?string $sortCode): static + public function setBuildingSocietyRollNumber(?string $buildingSocietyRollNumber): static { - if (is_null($sortCode)) { - array_push($this->openAPINullablesSetToNull, 'sortCode'); + if (is_null($buildingSocietyRollNumber)) { + array_push($this->openAPINullablesSetToNull, 'buildingSocietyRollNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('sortCode', $nullablesSetToNull); + $index = array_search('buildingSocietyRollNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['sortCode'] = $sortCode; + $this->container['buildingSocietyRollNumber'] = $buildingSocietyRollNumber; return $this; } @@ -576,35 +576,35 @@ public function setNote(?string $note): static } /** - * Gets buildingSocietyRollNumber + * Gets sortCode * * @return string|null */ - public function getBuildingSocietyRollNumber(): ?string + public function getSortCode(): ?string { - return $this->container['buildingSocietyRollNumber']; + return $this->container['sortCode']; } /** - * Sets buildingSocietyRollNumber + * Sets sortCode * - * @param string|null $buildingSocietyRollNumber buildingSocietyRollNumber + * @param string|null $sortCode sortCode * * @return $this */ - public function setBuildingSocietyRollNumber(?string $buildingSocietyRollNumber): static + public function setSortCode(?string $sortCode): static { - if (is_null($buildingSocietyRollNumber)) { - array_push($this->openAPINullablesSetToNull, 'buildingSocietyRollNumber'); + if (is_null($sortCode)) { + array_push($this->openAPINullablesSetToNull, 'sortCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('buildingSocietyRollNumber', $nullablesSetToNull); + $index = array_search('sortCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['buildingSocietyRollNumber'] = $buildingSocietyRollNumber; + $this->container['sortCode'] = $sortCode; return $this; } diff --git a/src/Model/ContractBenefitCarImportRequest.php b/src/Model/ContractBenefitCarImportRequest.php new file mode 100644 index 0000000..fe48e76 --- /dev/null +++ b/src/Model/ContractBenefitCarImportRequest.php @@ -0,0 +1,1069 @@ + + */ +class ContractBenefitCarImportRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.BenefitCarImportRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'availableFrom' => '\DateTime', + 'availableTo' => '\DateTime', + 'co2Emissions' => 'int', + 'daysUnavailable' => 'int', + 'employeeCapitalContributions' => 'float', + 'employeePrivateContributions' => 'float', + 'engineSize' => 'int', + 'firstRegistered' => '\DateTime', + 'freeFuel' => 'bool', + 'freeFuelReinstated' => 'bool', + 'fuelAvailableFrom' => '\DateTime', + 'fuelAvailableTo' => '\DateTime', + 'fuelType' => '\SynergiTech\Staffology\Model\BenefitDetailsCarPowerType', + 'hasApprovedEmissionsValue' => 'bool', + 'listPrice' => 'float', + 'makeAndModel' => 'string', + 'nonStandardAccessories' => 'float', + 'registration' => 'string', + 'zeroEmissionsMileage' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'availableFrom' => 'date', + 'availableTo' => 'date', + 'co2Emissions' => 'int32', + 'daysUnavailable' => 'int32', + 'employeeCapitalContributions' => 'double', + 'employeePrivateContributions' => 'double', + 'engineSize' => 'int32', + 'firstRegistered' => 'date', + 'freeFuel' => null, + 'freeFuelReinstated' => null, + 'fuelAvailableFrom' => 'date', + 'fuelAvailableTo' => 'date', + 'fuelType' => null, + 'hasApprovedEmissionsValue' => null, + 'listPrice' => 'double', + 'makeAndModel' => null, + 'nonStandardAccessories' => 'double', + 'registration' => null, + 'zeroEmissionsMileage' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'availableFrom' => true, + 'availableTo' => true, + 'co2Emissions' => false, + 'daysUnavailable' => false, + 'employeeCapitalContributions' => false, + 'employeePrivateContributions' => false, + 'engineSize' => false, + 'firstRegistered' => true, + 'freeFuel' => false, + 'freeFuelReinstated' => false, + 'fuelAvailableFrom' => true, + 'fuelAvailableTo' => true, + 'fuelType' => false, + 'hasApprovedEmissionsValue' => false, + 'listPrice' => false, + 'makeAndModel' => true, + 'nonStandardAccessories' => false, + 'registration' => true, + 'zeroEmissionsMileage' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'availableFrom' => 'availableFrom', + 'availableTo' => 'availableTo', + 'co2Emissions' => 'co2Emissions', + 'daysUnavailable' => 'daysUnavailable', + 'employeeCapitalContributions' => 'employeeCapitalContributions', + 'employeePrivateContributions' => 'employeePrivateContributions', + 'engineSize' => 'engineSize', + 'firstRegistered' => 'firstRegistered', + 'freeFuel' => 'freeFuel', + 'freeFuelReinstated' => 'freeFuelReinstated', + 'fuelAvailableFrom' => 'fuelAvailableFrom', + 'fuelAvailableTo' => 'fuelAvailableTo', + 'fuelType' => 'fuelType', + 'hasApprovedEmissionsValue' => 'hasApprovedEmissionsValue', + 'listPrice' => 'listPrice', + 'makeAndModel' => 'makeAndModel', + 'nonStandardAccessories' => 'nonStandardAccessories', + 'registration' => 'registration', + 'zeroEmissionsMileage' => 'zeroEmissionsMileage' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'availableFrom' => 'setAvailableFrom', + 'availableTo' => 'setAvailableTo', + 'co2Emissions' => 'setCo2Emissions', + 'daysUnavailable' => 'setDaysUnavailable', + 'employeeCapitalContributions' => 'setEmployeeCapitalContributions', + 'employeePrivateContributions' => 'setEmployeePrivateContributions', + 'engineSize' => 'setEngineSize', + 'firstRegistered' => 'setFirstRegistered', + 'freeFuel' => 'setFreeFuel', + 'freeFuelReinstated' => 'setFreeFuelReinstated', + 'fuelAvailableFrom' => 'setFuelAvailableFrom', + 'fuelAvailableTo' => 'setFuelAvailableTo', + 'fuelType' => 'setFuelType', + 'hasApprovedEmissionsValue' => 'setHasApprovedEmissionsValue', + 'listPrice' => 'setListPrice', + 'makeAndModel' => 'setMakeAndModel', + 'nonStandardAccessories' => 'setNonStandardAccessories', + 'registration' => 'setRegistration', + 'zeroEmissionsMileage' => 'setZeroEmissionsMileage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'availableFrom' => 'getAvailableFrom', + 'availableTo' => 'getAvailableTo', + 'co2Emissions' => 'getCo2Emissions', + 'daysUnavailable' => 'getDaysUnavailable', + 'employeeCapitalContributions' => 'getEmployeeCapitalContributions', + 'employeePrivateContributions' => 'getEmployeePrivateContributions', + 'engineSize' => 'getEngineSize', + 'firstRegistered' => 'getFirstRegistered', + 'freeFuel' => 'getFreeFuel', + 'freeFuelReinstated' => 'getFreeFuelReinstated', + 'fuelAvailableFrom' => 'getFuelAvailableFrom', + 'fuelAvailableTo' => 'getFuelAvailableTo', + 'fuelType' => 'getFuelType', + 'hasApprovedEmissionsValue' => 'getHasApprovedEmissionsValue', + 'listPrice' => 'getListPrice', + 'makeAndModel' => 'getMakeAndModel', + 'nonStandardAccessories' => 'getNonStandardAccessories', + 'registration' => 'getRegistration', + 'zeroEmissionsMileage' => 'getZeroEmissionsMileage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('availableFrom', $data ?? [], null); + $this->setIfExists('availableTo', $data ?? [], null); + $this->setIfExists('co2Emissions', $data ?? [], null); + $this->setIfExists('daysUnavailable', $data ?? [], null); + $this->setIfExists('employeeCapitalContributions', $data ?? [], null); + $this->setIfExists('employeePrivateContributions', $data ?? [], null); + $this->setIfExists('engineSize', $data ?? [], null); + $this->setIfExists('firstRegistered', $data ?? [], null); + $this->setIfExists('freeFuel', $data ?? [], null); + $this->setIfExists('freeFuelReinstated', $data ?? [], null); + $this->setIfExists('fuelAvailableFrom', $data ?? [], null); + $this->setIfExists('fuelAvailableTo', $data ?? [], null); + $this->setIfExists('fuelType', $data ?? [], null); + $this->setIfExists('hasApprovedEmissionsValue', $data ?? [], null); + $this->setIfExists('listPrice', $data ?? [], null); + $this->setIfExists('makeAndModel', $data ?? [], null); + $this->setIfExists('nonStandardAccessories', $data ?? [], null); + $this->setIfExists('registration', $data ?? [], null); + $this->setIfExists('zeroEmissionsMileage', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets availableFrom + * + * @return \DateTime|null + */ + public function getAvailableFrom(): ?\DateTime + { + return $this->container['availableFrom']; + } + + /** + * Sets availableFrom + * + * @param \DateTime|null $availableFrom Date the car benefit became available + * + * @return $this + */ + public function setAvailableFrom(?\DateTime $availableFrom): static + { + if (is_null($availableFrom)) { + array_push($this->openAPINullablesSetToNull, 'availableFrom'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('availableFrom', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availableFrom'] = $availableFrom; + + return $this; + } + + /** + * Gets availableTo + * + * @return \DateTime|null + */ + public function getAvailableTo(): ?\DateTime + { + return $this->container['availableTo']; + } + + /** + * Sets availableTo + * + * @param \DateTime|null $availableTo Date the car benefit ended + * + * @return $this + */ + public function setAvailableTo(?\DateTime $availableTo): static + { + if (is_null($availableTo)) { + array_push($this->openAPINullablesSetToNull, 'availableTo'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('availableTo', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['availableTo'] = $availableTo; + + return $this; + } + + /** + * Gets co2Emissions + * + * @return int|null + */ + public function getCo2Emissions(): ?int + { + return $this->container['co2Emissions']; + } + + /** + * Sets co2Emissions + * + * @param int|null $co2Emissions CO2 emissions value + * + * @return $this + */ + public function setCo2Emissions(?int $co2Emissions): static + { + if (is_null($co2Emissions)) { + throw new InvalidArgumentException('non-nullable co2Emissions cannot be null'); + } + $this->container['co2Emissions'] = $co2Emissions; + + return $this; + } + + /** + * Gets daysUnavailable + * + * @return int|null + */ + public function getDaysUnavailable(): ?int + { + return $this->container['daysUnavailable']; + } + + /** + * Sets daysUnavailable + * + * @param int|null $daysUnavailable Total number of days the vehicle was unavailable + * + * @return $this + */ + public function setDaysUnavailable(?int $daysUnavailable): static + { + if (is_null($daysUnavailable)) { + throw new InvalidArgumentException('non-nullable daysUnavailable cannot be null'); + } + $this->container['daysUnavailable'] = $daysUnavailable; + + return $this; + } + + /** + * Gets employeeCapitalContributions + * + * @return float|null + */ + public function getEmployeeCapitalContributions(): ?float + { + return $this->container['employeeCapitalContributions']; + } + + /** + * Sets employeeCapitalContributions + * + * @param float|null $employeeCapitalContributions Employee's capital contribution + * + * @return $this + */ + public function setEmployeeCapitalContributions(?float $employeeCapitalContributions): static + { + if (is_null($employeeCapitalContributions)) { + throw new InvalidArgumentException('non-nullable employeeCapitalContributions cannot be null'); + } + $this->container['employeeCapitalContributions'] = $employeeCapitalContributions; + + return $this; + } + + /** + * Gets employeePrivateContributions + * + * @return float|null + */ + public function getEmployeePrivateContributions(): ?float + { + return $this->container['employeePrivateContributions']; + } + + /** + * Sets employeePrivateContributions + * + * @param float|null $employeePrivateContributions Employee's private contributions + * + * @return $this + */ + public function setEmployeePrivateContributions(?float $employeePrivateContributions): static + { + if (is_null($employeePrivateContributions)) { + throw new InvalidArgumentException('non-nullable employeePrivateContributions cannot be null'); + } + $this->container['employeePrivateContributions'] = $employeePrivateContributions; + + return $this; + } + + /** + * Gets engineSize + * + * @return int|null + */ + public function getEngineSize(): ?int + { + return $this->container['engineSize']; + } + + /** + * Sets engineSize + * + * @param int|null $engineSize Engine size value + * + * @return $this + */ + public function setEngineSize(?int $engineSize): static + { + if (is_null($engineSize)) { + throw new InvalidArgumentException('non-nullable engineSize cannot be null'); + } + $this->container['engineSize'] = $engineSize; + + return $this; + } + + /** + * Gets firstRegistered + * + * @return \DateTime|null + */ + public function getFirstRegistered(): ?\DateTime + { + return $this->container['firstRegistered']; + } + + /** + * Sets firstRegistered + * + * @param \DateTime|null $firstRegistered Date the vehicle was first registered + * + * @return $this + */ + public function setFirstRegistered(?\DateTime $firstRegistered): static + { + if (is_null($firstRegistered)) { + array_push($this->openAPINullablesSetToNull, 'firstRegistered'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('firstRegistered', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['firstRegistered'] = $firstRegistered; + + return $this; + } + + /** + * Gets freeFuel + * + * @return bool|null + */ + public function getFreeFuel(): ?bool + { + return $this->container['freeFuel']; + } + + /** + * Sets freeFuel + * + * @param bool|null $freeFuel Indicates if free fuel is provided + * + * @return $this + */ + public function setFreeFuel(?bool $freeFuel): static + { + if (is_null($freeFuel)) { + throw new InvalidArgumentException('non-nullable freeFuel cannot be null'); + } + $this->container['freeFuel'] = $freeFuel; + + return $this; + } + + /** + * Gets freeFuelReinstated + * + * @return bool|null + */ + public function getFreeFuelReinstated(): ?bool + { + return $this->container['freeFuelReinstated']; + } + + /** + * Sets freeFuelReinstated + * + * @param bool|null $freeFuelReinstated Whether the free fuel benefit was reinstated + * + * @return $this + */ + public function setFreeFuelReinstated(?bool $freeFuelReinstated): static + { + if (is_null($freeFuelReinstated)) { + throw new InvalidArgumentException('non-nullable freeFuelReinstated cannot be null'); + } + $this->container['freeFuelReinstated'] = $freeFuelReinstated; + + return $this; + } + + /** + * Gets fuelAvailableFrom + * + * @return \DateTime|null + */ + public function getFuelAvailableFrom(): ?\DateTime + { + return $this->container['fuelAvailableFrom']; + } + + /** + * Sets fuelAvailableFrom + * + * @param \DateTime|null $fuelAvailableFrom Date free fuel benefit started + * + * @return $this + */ + public function setFuelAvailableFrom(?\DateTime $fuelAvailableFrom): static + { + if (is_null($fuelAvailableFrom)) { + array_push($this->openAPINullablesSetToNull, 'fuelAvailableFrom'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fuelAvailableFrom', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['fuelAvailableFrom'] = $fuelAvailableFrom; + + return $this; + } + + /** + * Gets fuelAvailableTo + * + * @return \DateTime|null + */ + public function getFuelAvailableTo(): ?\DateTime + { + return $this->container['fuelAvailableTo']; + } + + /** + * Sets fuelAvailableTo + * + * @param \DateTime|null $fuelAvailableTo Date free fuel benefit ended + * + * @return $this + */ + public function setFuelAvailableTo(?\DateTime $fuelAvailableTo): static + { + if (is_null($fuelAvailableTo)) { + array_push($this->openAPINullablesSetToNull, 'fuelAvailableTo'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fuelAvailableTo', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['fuelAvailableTo'] = $fuelAvailableTo; + + return $this; + } + + /** + * Gets fuelType + * + * @return \SynergiTech\Staffology\Model\BenefitDetailsCarPowerType|null + */ + public function getFuelType(): ?\SynergiTech\Staffology\Model\BenefitDetailsCarPowerType + { + return $this->container['fuelType']; + } + + /** + * Sets fuelType + * + * @param \SynergiTech\Staffology\Model\BenefitDetailsCarPowerType|null $fuelType fuelType + * + * @return $this + */ + public function setFuelType(?\SynergiTech\Staffology\Model\BenefitDetailsCarPowerType $fuelType): static + { + if (is_null($fuelType)) { + throw new InvalidArgumentException('non-nullable fuelType cannot be null'); + } + $this->container['fuelType'] = $fuelType; + + return $this; + } + + /** + * Gets hasApprovedEmissionsValue + * + * @return bool|null + */ + public function getHasApprovedEmissionsValue(): ?bool + { + return $this->container['hasApprovedEmissionsValue']; + } + + /** + * Sets hasApprovedEmissionsValue + * + * @param bool|null $hasApprovedEmissionsValue Indicates if CO2 emissions data is approved + * + * @return $this + */ + public function setHasApprovedEmissionsValue(?bool $hasApprovedEmissionsValue): static + { + if (is_null($hasApprovedEmissionsValue)) { + throw new InvalidArgumentException('non-nullable hasApprovedEmissionsValue cannot be null'); + } + $this->container['hasApprovedEmissionsValue'] = $hasApprovedEmissionsValue; + + return $this; + } + + /** + * Gets listPrice + * + * @return float|null + */ + public function getListPrice(): ?float + { + return $this->container['listPrice']; + } + + /** + * Sets listPrice + * + * @param float|null $listPrice Original list price of the vehicle + * + * @return $this + */ + public function setListPrice(?float $listPrice): static + { + if (is_null($listPrice)) { + throw new InvalidArgumentException('non-nullable listPrice cannot be null'); + } + $this->container['listPrice'] = $listPrice; + + return $this; + } + + /** + * Gets makeAndModel + * + * @return string|null + */ + public function getMakeAndModel(): ?string + { + return $this->container['makeAndModel']; + } + + /** + * Sets makeAndModel + * + * @param string|null $makeAndModel Car make and model name + * + * @return $this + */ + public function setMakeAndModel(?string $makeAndModel): static + { + if (is_null($makeAndModel)) { + array_push($this->openAPINullablesSetToNull, 'makeAndModel'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('makeAndModel', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['makeAndModel'] = $makeAndModel; + + return $this; + } + + /** + * Gets nonStandardAccessories + * + * @return float|null + */ + public function getNonStandardAccessories(): ?float + { + return $this->container['nonStandardAccessories']; + } + + /** + * Sets nonStandardAccessories + * + * @param float|null $nonStandardAccessories Cost of any non-standard accessories + * + * @return $this + */ + public function setNonStandardAccessories(?float $nonStandardAccessories): static + { + if (is_null($nonStandardAccessories)) { + throw new InvalidArgumentException('non-nullable nonStandardAccessories cannot be null'); + } + $this->container['nonStandardAccessories'] = $nonStandardAccessories; + + return $this; + } + + /** + * Gets registration + * + * @return string|null + */ + public function getRegistration(): ?string + { + return $this->container['registration']; + } + + /** + * Sets registration + * + * @param string|null $registration Vehicle registration number + * + * @return $this + */ + public function setRegistration(?string $registration): static + { + if (is_null($registration)) { + array_push($this->openAPINullablesSetToNull, 'registration'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('registration', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['registration'] = $registration; + + return $this; + } + + /** + * Gets zeroEmissionsMileage + * + * @return int|null + */ + public function getZeroEmissionsMileage(): ?int + { + return $this->container['zeroEmissionsMileage']; + } + + /** + * Sets zeroEmissionsMileage + * + * @param int|null $zeroEmissionsMileage Mileage driven in zero-emission mode. Applicable only for Electric, Hybrid, and Petrol/Other fuel types. + * + * @return $this + */ + public function setZeroEmissionsMileage(?int $zeroEmissionsMileage): static + { + if (is_null($zeroEmissionsMileage)) { + throw new InvalidArgumentException('non-nullable zeroEmissionsMileage cannot be null'); + } + $this->container['zeroEmissionsMileage'] = $zeroEmissionsMileage; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractBenefitImportRequest.php b/src/Model/ContractBenefitImportRequest.php new file mode 100644 index 0000000..6eac19e --- /dev/null +++ b/src/Model/ContractBenefitImportRequest.php @@ -0,0 +1,1191 @@ + + */ +class ContractBenefitImportRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.BenefitImportRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'assetType' => '\SynergiTech\Staffology\Model\BenefitDetailsAssetType', + 'car' => '\SynergiTech\Staffology\Model\ContractBenefitCarImportRequest', + 'cashEquivalentFuel' => 'float', + 'class1AType' => '\SynergiTech\Staffology\Model\BenefitDetailsClass1AType', + 'declarationType' => '\SynergiTech\Staffology\Model\BenefitDeclarationType', + 'description' => 'string', + 'employeeContribution' => 'float', + 'endDate' => '\DateTime', + 'isPeriodValue' => 'bool', + 'loan' => '\SynergiTech\Staffology\Model\ContractBenefitLoanImportRequest', + 'nonClass1AType' => '\SynergiTech\Staffology\Model\BenefitDetailsNonClass1AType', + 'openingBalance' => 'float', + 'overrideOpeningBalance' => 'bool', + 'paymentType' => '\SynergiTech\Staffology\Model\BenefitDetailsPaymentType', + 'payrollCode' => 'string', + 'startDate' => '\DateTime', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'tradingOrganisation' => 'bool', + 'type' => '\SynergiTech\Staffology\Model\BenefitType', + 'uniqueId' => 'string', + 'useOfAssetType' => '\SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType', + 'useProRata' => 'bool', + 'value' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'assetType' => null, + 'car' => null, + 'cashEquivalentFuel' => 'double', + 'class1AType' => null, + 'declarationType' => null, + 'description' => null, + 'employeeContribution' => 'double', + 'endDate' => 'date', + 'isPeriodValue' => null, + 'loan' => null, + 'nonClass1AType' => null, + 'openingBalance' => 'double', + 'overrideOpeningBalance' => null, + 'paymentType' => null, + 'payrollCode' => null, + 'startDate' => 'date', + 'taxYear' => null, + 'tradingOrganisation' => null, + 'type' => null, + 'uniqueId' => 'uuid', + 'useOfAssetType' => null, + 'useProRata' => null, + 'value' => 'double' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'assetType' => false, + 'car' => false, + 'cashEquivalentFuel' => false, + 'class1AType' => false, + 'declarationType' => false, + 'description' => true, + 'employeeContribution' => false, + 'endDate' => true, + 'isPeriodValue' => false, + 'loan' => false, + 'nonClass1AType' => false, + 'openingBalance' => false, + 'overrideOpeningBalance' => false, + 'paymentType' => false, + 'payrollCode' => true, + 'startDate' => true, + 'taxYear' => false, + 'tradingOrganisation' => false, + 'type' => false, + 'uniqueId' => true, + 'useOfAssetType' => false, + 'useProRata' => false, + 'value' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'assetType' => 'assetType', + 'car' => 'car', + 'cashEquivalentFuel' => 'cashEquivalentFuel', + 'class1AType' => 'class1AType', + 'declarationType' => 'declarationType', + 'description' => 'description', + 'employeeContribution' => 'employeeContribution', + 'endDate' => 'endDate', + 'isPeriodValue' => 'isPeriodValue', + 'loan' => 'loan', + 'nonClass1AType' => 'nonClass1AType', + 'openingBalance' => 'openingBalance', + 'overrideOpeningBalance' => 'overrideOpeningBalance', + 'paymentType' => 'paymentType', + 'payrollCode' => 'payrollCode', + 'startDate' => 'startDate', + 'taxYear' => 'taxYear', + 'tradingOrganisation' => 'tradingOrganisation', + 'type' => 'type', + 'uniqueId' => 'uniqueId', + 'useOfAssetType' => 'useOfAssetType', + 'useProRata' => 'useProRata', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'assetType' => 'setAssetType', + 'car' => 'setCar', + 'cashEquivalentFuel' => 'setCashEquivalentFuel', + 'class1AType' => 'setClass1AType', + 'declarationType' => 'setDeclarationType', + 'description' => 'setDescription', + 'employeeContribution' => 'setEmployeeContribution', + 'endDate' => 'setEndDate', + 'isPeriodValue' => 'setIsPeriodValue', + 'loan' => 'setLoan', + 'nonClass1AType' => 'setNonClass1AType', + 'openingBalance' => 'setOpeningBalance', + 'overrideOpeningBalance' => 'setOverrideOpeningBalance', + 'paymentType' => 'setPaymentType', + 'payrollCode' => 'setPayrollCode', + 'startDate' => 'setStartDate', + 'taxYear' => 'setTaxYear', + 'tradingOrganisation' => 'setTradingOrganisation', + 'type' => 'setType', + 'uniqueId' => 'setUniqueId', + 'useOfAssetType' => 'setUseOfAssetType', + 'useProRata' => 'setUseProRata', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'assetType' => 'getAssetType', + 'car' => 'getCar', + 'cashEquivalentFuel' => 'getCashEquivalentFuel', + 'class1AType' => 'getClass1AType', + 'declarationType' => 'getDeclarationType', + 'description' => 'getDescription', + 'employeeContribution' => 'getEmployeeContribution', + 'endDate' => 'getEndDate', + 'isPeriodValue' => 'getIsPeriodValue', + 'loan' => 'getLoan', + 'nonClass1AType' => 'getNonClass1AType', + 'openingBalance' => 'getOpeningBalance', + 'overrideOpeningBalance' => 'getOverrideOpeningBalance', + 'paymentType' => 'getPaymentType', + 'payrollCode' => 'getPayrollCode', + 'startDate' => 'getStartDate', + 'taxYear' => 'getTaxYear', + 'tradingOrganisation' => 'getTradingOrganisation', + 'type' => 'getType', + 'uniqueId' => 'getUniqueId', + 'useOfAssetType' => 'getUseOfAssetType', + 'useProRata' => 'getUseProRata', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('assetType', $data ?? [], null); + $this->setIfExists('car', $data ?? [], null); + $this->setIfExists('cashEquivalentFuel', $data ?? [], null); + $this->setIfExists('class1AType', $data ?? [], null); + $this->setIfExists('declarationType', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('employeeContribution', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('isPeriodValue', $data ?? [], null); + $this->setIfExists('loan', $data ?? [], null); + $this->setIfExists('nonClass1AType', $data ?? [], null); + $this->setIfExists('openingBalance', $data ?? [], null); + $this->setIfExists('overrideOpeningBalance', $data ?? [], null); + $this->setIfExists('paymentType', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('tradingOrganisation', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); + $this->setIfExists('useOfAssetType', $data ?? [], null); + $this->setIfExists('useProRata', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets assetType + * + * @return \SynergiTech\Staffology\Model\BenefitDetailsAssetType|null + */ + public function getAssetType(): ?\SynergiTech\Staffology\Model\BenefitDetailsAssetType + { + return $this->container['assetType']; + } + + /** + * Sets assetType + * + * @param \SynergiTech\Staffology\Model\BenefitDetailsAssetType|null $assetType assetType + * + * @return $this + */ + public function setAssetType(?\SynergiTech\Staffology\Model\BenefitDetailsAssetType $assetType): static + { + if (is_null($assetType)) { + throw new InvalidArgumentException('non-nullable assetType cannot be null'); + } + $this->container['assetType'] = $assetType; + + return $this; + } + + /** + * Gets car + * + * @return \SynergiTech\Staffology\Model\ContractBenefitCarImportRequest|null + */ + public function getCar(): ?\SynergiTech\Staffology\Model\ContractBenefitCarImportRequest + { + return $this->container['car']; + } + + /** + * Sets car + * + * @param \SynergiTech\Staffology\Model\ContractBenefitCarImportRequest|null $car car + * + * @return $this + */ + public function setCar(?\SynergiTech\Staffology\Model\ContractBenefitCarImportRequest $car): static + { + if (is_null($car)) { + throw new InvalidArgumentException('non-nullable car cannot be null'); + } + $this->container['car'] = $car; + + return $this; + } + + /** + * Gets cashEquivalentFuel + * + * @return float|null + */ + public function getCashEquivalentFuel(): ?float + { + return $this->container['cashEquivalentFuel']; + } + + /** + * Sets cashEquivalentFuel + * + * @param float|null $cashEquivalentFuel Only relevant to Benefits with Type Vans + * + * @return $this + */ + public function setCashEquivalentFuel(?float $cashEquivalentFuel): static + { + if (is_null($cashEquivalentFuel)) { + throw new InvalidArgumentException('non-nullable cashEquivalentFuel cannot be null'); + } + $this->container['cashEquivalentFuel'] = $cashEquivalentFuel; + + return $this; + } + + /** + * Gets class1AType + * + * @return \SynergiTech\Staffology\Model\BenefitDetailsClass1AType|null + */ + public function getClass1AType(): ?\SynergiTech\Staffology\Model\BenefitDetailsClass1AType + { + return $this->container['class1AType']; + } + + /** + * Sets class1AType + * + * @param \SynergiTech\Staffology\Model\BenefitDetailsClass1AType|null $class1AType class1AType + * + * @return $this + */ + public function setClass1AType(?\SynergiTech\Staffology\Model\BenefitDetailsClass1AType $class1AType): static + { + if (is_null($class1AType)) { + throw new InvalidArgumentException('non-nullable class1AType cannot be null'); + } + $this->container['class1AType'] = $class1AType; + + return $this; + } + + /** + * Gets declarationType + * + * @return \SynergiTech\Staffology\Model\BenefitDeclarationType|null + */ + public function getDeclarationType(): ?\SynergiTech\Staffology\Model\BenefitDeclarationType + { + return $this->container['declarationType']; + } + + /** + * Sets declarationType + * + * @param \SynergiTech\Staffology\Model\BenefitDeclarationType|null $declarationType declarationType + * + * @return $this + */ + public function setDeclarationType(?\SynergiTech\Staffology\Model\BenefitDeclarationType $declarationType): static + { + if (is_null($declarationType)) { + throw new InvalidArgumentException('non-nullable declarationType cannot be null'); + } + $this->container['declarationType'] = $declarationType; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A description of this benefit + * + * @return $this + */ + public function setDescription(?string $description): static + { + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('description', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets employeeContribution + * + * @return float|null + */ + public function getEmployeeContribution(): ?float + { + return $this->container['employeeContribution']; + } + + /** + * Sets employeeContribution + * + * @param float|null $employeeContribution Amount contributed by the employee. + * + * @return $this + */ + public function setEmployeeContribution(?float $employeeContribution): static + { + if (is_null($employeeContribution)) { + throw new InvalidArgumentException('non-nullable employeeContribution cannot be null'); + } + $this->container['employeeContribution'] = $employeeContribution; + + return $this; + } + + /** + * Gets endDate + * + * @return \DateTime|null + */ + public function getEndDate(): ?\DateTime + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param \DateTime|null $endDate End date for imported benefit + * + * @return $this + */ + public function setEndDate(?\DateTime $endDate): static + { + if (is_null($endDate)) { + array_push($this->openAPINullablesSetToNull, 'endDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets isPeriodValue + * + * @return bool|null + */ + public function getIsPeriodValue(): ?bool + { + return $this->container['isPeriodValue']; + } + + /** + * Sets isPeriodValue + * + * @param bool|null $isPeriodValue To be used for the benefit period + * + * @return $this + */ + public function setIsPeriodValue(?bool $isPeriodValue): static + { + if (is_null($isPeriodValue)) { + throw new InvalidArgumentException('non-nullable isPeriodValue cannot be null'); + } + $this->container['isPeriodValue'] = $isPeriodValue; + + return $this; + } + + /** + * Gets loan + * + * @return \SynergiTech\Staffology\Model\ContractBenefitLoanImportRequest|null + */ + public function getLoan(): ?\SynergiTech\Staffology\Model\ContractBenefitLoanImportRequest + { + return $this->container['loan']; + } + + /** + * Sets loan + * + * @param \SynergiTech\Staffology\Model\ContractBenefitLoanImportRequest|null $loan loan + * + * @return $this + */ + public function setLoan(?\SynergiTech\Staffology\Model\ContractBenefitLoanImportRequest $loan): static + { + if (is_null($loan)) { + throw new InvalidArgumentException('non-nullable loan cannot be null'); + } + $this->container['loan'] = $loan; + + return $this; + } + + /** + * Gets nonClass1AType + * + * @return \SynergiTech\Staffology\Model\BenefitDetailsNonClass1AType|null + */ + public function getNonClass1AType(): ?\SynergiTech\Staffology\Model\BenefitDetailsNonClass1AType + { + return $this->container['nonClass1AType']; + } + + /** + * Sets nonClass1AType + * + * @param \SynergiTech\Staffology\Model\BenefitDetailsNonClass1AType|null $nonClass1AType nonClass1AType + * + * @return $this + */ + public function setNonClass1AType(?\SynergiTech\Staffology\Model\BenefitDetailsNonClass1AType $nonClass1AType): static + { + if (is_null($nonClass1AType)) { + throw new InvalidArgumentException('non-nullable nonClass1AType cannot be null'); + } + $this->container['nonClass1AType'] = $nonClass1AType; + + return $this; + } + + /** + * Gets openingBalance + * + * @return float|null + */ + public function getOpeningBalance(): ?float + { + return $this->container['openingBalance']; + } + + /** + * Sets openingBalance + * + * @param float|null $openingBalance The amount of benefit paid YTD when setting up a benefit + * + * @return $this + */ + public function setOpeningBalance(?float $openingBalance): static + { + if (is_null($openingBalance)) { + throw new InvalidArgumentException('non-nullable openingBalance cannot be null'); + } + $this->container['openingBalance'] = $openingBalance; + + return $this; + } + + /** + * Gets overrideOpeningBalance + * + * @return bool|null + */ + public function getOverrideOpeningBalance(): ?bool + { + return $this->container['overrideOpeningBalance']; + } + + /** + * Sets overrideOpeningBalance + * + * @param bool|null $overrideOpeningBalance To be used to change the opening balance if the benefit has been payrolled + * + * @return $this + */ + public function setOverrideOpeningBalance(?bool $overrideOpeningBalance): static + { + if (is_null($overrideOpeningBalance)) { + throw new InvalidArgumentException('non-nullable overrideOpeningBalance cannot be null'); + } + $this->container['overrideOpeningBalance'] = $overrideOpeningBalance; + + return $this; + } + + /** + * Gets paymentType + * + * @return \SynergiTech\Staffology\Model\BenefitDetailsPaymentType|null + */ + public function getPaymentType(): ?\SynergiTech\Staffology\Model\BenefitDetailsPaymentType + { + return $this->container['paymentType']; + } + + /** + * Sets paymentType + * + * @param \SynergiTech\Staffology\Model\BenefitDetailsPaymentType|null $paymentType paymentType + * + * @return $this + */ + public function setPaymentType(?\SynergiTech\Staffology\Model\BenefitDetailsPaymentType $paymentType): static + { + if (is_null($paymentType)) { + throw new InvalidArgumentException('non-nullable paymentType cannot be null'); + } + $this->container['paymentType'] = $paymentType; + + return $this; + } + + /** + * Gets payrollCode + * + * @return string|null + */ + public function getPayrollCode(): ?string + { + return $this->container['payrollCode']; + } + + /** + * Sets payrollCode + * + * @param string|null $payrollCode The payroll code of the employee to update + * + * @return $this + */ + public function setPayrollCode(?string $payrollCode): static + { + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payrollCode'] = $payrollCode; + + return $this; + } + + /** + * Gets startDate + * + * @return \DateTime|null + */ + public function getStartDate(): ?\DateTime + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param \DateTime|null $startDate Start date for imported benefit + * + * @return $this + */ + public function setStartDate(?\DateTime $startDate): static + { + if (is_null($startDate)) { + array_push($this->openAPINullablesSetToNull, 'startDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['startDate'] = $startDate; + + return $this; + } + + /** + * Gets taxYear + * + * @return \SynergiTech\Staffology\Model\TaxYear|null + */ + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + { + return $this->container['taxYear']; + } + + /** + * Sets taxYear + * + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * + * @return $this + */ + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + { + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + } + $this->container['taxYear'] = $taxYear; + + return $this; + } + + /** + * Gets tradingOrganisation + * + * @return bool|null + */ + public function getTradingOrganisation(): ?bool + { + return $this->container['tradingOrganisation']; + } + + /** + * Sets tradingOrganisation + * + * @param bool|null $tradingOrganisation Only relevant to Benefits with Type Entertainment + * + * @return $this + */ + public function setTradingOrganisation(?bool $tradingOrganisation): static + { + if (is_null($tradingOrganisation)) { + throw new InvalidArgumentException('non-nullable tradingOrganisation cannot be null'); + } + $this->container['tradingOrganisation'] = $tradingOrganisation; + + return $this; + } + + /** + * Gets type + * + * @return \SynergiTech\Staffology\Model\BenefitType|null + */ + public function getType(): ?\SynergiTech\Staffology\Model\BenefitType + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \SynergiTech\Staffology\Model\BenefitType|null $type type + * + * @return $this + */ + public function setType(?\SynergiTech\Staffology\Model\BenefitType $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets uniqueId + * + * @return string|null + */ + public function getUniqueId(): ?string + { + return $this->container['uniqueId']; + } + + /** + * Sets uniqueId + * + * @param string|null $uniqueId Optional. If value is provided then update else create benefit. + * + * @return $this + */ + public function setUniqueId(?string $uniqueId): static + { + if (is_null($uniqueId)) { + array_push($this->openAPINullablesSetToNull, 'uniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('uniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['uniqueId'] = $uniqueId; + + return $this; + } + + /** + * Gets useOfAssetType + * + * @return \SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType|null + */ + public function getUseOfAssetType(): ?\SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType + { + return $this->container['useOfAssetType']; + } + + /** + * Sets useOfAssetType + * + * @param \SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType|null $useOfAssetType useOfAssetType + * + * @return $this + */ + public function setUseOfAssetType(?\SynergiTech\Staffology\Model\BenefitDetailsUseOfAssetType $useOfAssetType): static + { + if (is_null($useOfAssetType)) { + throw new InvalidArgumentException('non-nullable useOfAssetType cannot be null'); + } + $this->container['useOfAssetType'] = $useOfAssetType; + + return $this; + } + + /** + * Gets useProRata + * + * @return bool|null + */ + public function getUseProRata(): ?bool + { + return $this->container['useProRata']; + } + + /** + * Sets useProRata + * + * @param bool|null $useProRata Benefit calculation should be done on pro rata rules + * + * @return $this + */ + public function setUseProRata(?bool $useProRata): static + { + if (is_null($useProRata)) { + throw new InvalidArgumentException('non-nullable useProRata cannot be null'); + } + $this->container['useProRata'] = $useProRata; + + return $this; + } + + /** + * Gets value + * + * @return float|null + */ + public function getValue(): ?float + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param float|null $value The total value of the benefit. + * + * @return $this + */ + public function setValue(?float $value): static + { + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractBenefitLoanImportRequest.php b/src/Model/ContractBenefitLoanImportRequest.php new file mode 100644 index 0000000..2f07dad --- /dev/null +++ b/src/Model/ContractBenefitLoanImportRequest.php @@ -0,0 +1,633 @@ + + */ +class ContractBenefitLoanImportRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.BenefitLoanImportRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'closingBalance' => 'float', + 'interestPaid' => 'float', + 'loanDischarged' => '\DateTime', + 'loanMade' => '\DateTime', + 'maxBalanceInYear' => 'float', + 'numberOfJointBorrowers' => 'int', + 'startingBalance' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'closingBalance' => 'double', + 'interestPaid' => 'double', + 'loanDischarged' => 'date', + 'loanMade' => 'date', + 'maxBalanceInYear' => 'double', + 'numberOfJointBorrowers' => 'int32', + 'startingBalance' => 'double' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'closingBalance' => false, + 'interestPaid' => false, + 'loanDischarged' => true, + 'loanMade' => true, + 'maxBalanceInYear' => false, + 'numberOfJointBorrowers' => true, + 'startingBalance' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'closingBalance' => 'closingBalance', + 'interestPaid' => 'interestPaid', + 'loanDischarged' => 'loanDischarged', + 'loanMade' => 'loanMade', + 'maxBalanceInYear' => 'maxBalanceInYear', + 'numberOfJointBorrowers' => 'numberOfJointBorrowers', + 'startingBalance' => 'startingBalance' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'closingBalance' => 'setClosingBalance', + 'interestPaid' => 'setInterestPaid', + 'loanDischarged' => 'setLoanDischarged', + 'loanMade' => 'setLoanMade', + 'maxBalanceInYear' => 'setMaxBalanceInYear', + 'numberOfJointBorrowers' => 'setNumberOfJointBorrowers', + 'startingBalance' => 'setStartingBalance' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'closingBalance' => 'getClosingBalance', + 'interestPaid' => 'getInterestPaid', + 'loanDischarged' => 'getLoanDischarged', + 'loanMade' => 'getLoanMade', + 'maxBalanceInYear' => 'getMaxBalanceInYear', + 'numberOfJointBorrowers' => 'getNumberOfJointBorrowers', + 'startingBalance' => 'getStartingBalance' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('closingBalance', $data ?? [], null); + $this->setIfExists('interestPaid', $data ?? [], null); + $this->setIfExists('loanDischarged', $data ?? [], null); + $this->setIfExists('loanMade', $data ?? [], null); + $this->setIfExists('maxBalanceInYear', $data ?? [], null); + $this->setIfExists('numberOfJointBorrowers', $data ?? [], null); + $this->setIfExists('startingBalance', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets closingBalance + * + * @return float|null + */ + public function getClosingBalance(): ?float + { + return $this->container['closingBalance']; + } + + /** + * Sets closingBalance + * + * @param float|null $closingBalance Loan amount at the end of the year + * + * @return $this + */ + public function setClosingBalance(?float $closingBalance): static + { + if (is_null($closingBalance)) { + throw new InvalidArgumentException('non-nullable closingBalance cannot be null'); + } + $this->container['closingBalance'] = $closingBalance; + + return $this; + } + + /** + * Gets interestPaid + * + * @return float|null + */ + public function getInterestPaid(): ?float + { + return $this->container['interestPaid']; + } + + /** + * Sets interestPaid + * + * @param float|null $interestPaid Interest amount paid by the employee + * + * @return $this + */ + public function setInterestPaid(?float $interestPaid): static + { + if (is_null($interestPaid)) { + throw new InvalidArgumentException('non-nullable interestPaid cannot be null'); + } + $this->container['interestPaid'] = $interestPaid; + + return $this; + } + + /** + * Gets loanDischarged + * + * @return \DateTime|null + */ + public function getLoanDischarged(): ?\DateTime + { + return $this->container['loanDischarged']; + } + + /** + * Sets loanDischarged + * + * @param \DateTime|null $loanDischarged Date when the loan ended + * + * @return $this + */ + public function setLoanDischarged(?\DateTime $loanDischarged): static + { + if (is_null($loanDischarged)) { + array_push($this->openAPINullablesSetToNull, 'loanDischarged'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('loanDischarged', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['loanDischarged'] = $loanDischarged; + + return $this; + } + + /** + * Gets loanMade + * + * @return \DateTime|null + */ + public function getLoanMade(): ?\DateTime + { + return $this->container['loanMade']; + } + + /** + * Sets loanMade + * + * @param \DateTime|null $loanMade Date when the loan started + * + * @return $this + */ + public function setLoanMade(?\DateTime $loanMade): static + { + if (is_null($loanMade)) { + array_push($this->openAPINullablesSetToNull, 'loanMade'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('loanMade', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['loanMade'] = $loanMade; + + return $this; + } + + /** + * Gets maxBalanceInYear + * + * @return float|null + */ + public function getMaxBalanceInYear(): ?float + { + return $this->container['maxBalanceInYear']; + } + + /** + * Sets maxBalanceInYear + * + * @param float|null $maxBalanceInYear Highest loan balance during the year + * + * @return $this + */ + public function setMaxBalanceInYear(?float $maxBalanceInYear): static + { + if (is_null($maxBalanceInYear)) { + throw new InvalidArgumentException('non-nullable maxBalanceInYear cannot be null'); + } + $this->container['maxBalanceInYear'] = $maxBalanceInYear; + + return $this; + } + + /** + * Gets numberOfJointBorrowers + * + * @return int|null + */ + public function getNumberOfJointBorrowers(): ?int + { + return $this->container['numberOfJointBorrowers']; + } + + /** + * Sets numberOfJointBorrowers + * + * @param int|null $numberOfJointBorrowers numberOfJointBorrowers + * + * @return $this + */ + public function setNumberOfJointBorrowers(?int $numberOfJointBorrowers): static + { + if (is_null($numberOfJointBorrowers)) { + array_push($this->openAPINullablesSetToNull, 'numberOfJointBorrowers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('numberOfJointBorrowers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['numberOfJointBorrowers'] = $numberOfJointBorrowers; + + return $this; + } + + /** + * Gets startingBalance + * + * @return float|null + */ + public function getStartingBalance(): ?float + { + return $this->container['startingBalance']; + } + + /** + * Sets startingBalance + * + * @param float|null $startingBalance Loan amount at the start of the year + * + * @return $this + */ + public function setStartingBalance(?float $startingBalance): static + { + if (is_null($startingBalance)) { + throw new InvalidArgumentException('non-nullable startingBalance cannot be null'); + } + $this->container['startingBalance'] = $startingBalance; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractCisDetailsRequest.php b/src/Model/ContractCisDetailsRequest.php index 4e0e515..a9ae0b0 100644 --- a/src/Model/ContractCisDetailsRequest.php +++ b/src/Model/ContractCisDetailsRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,16 @@ class ContractCisDetailsRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPITypes = [ - 'verification' => '\SynergiTech\Staffology\Model\ContractCisVerificationDetailsRequest', + 'companyNumber' => 'string', + 'companyUtr' => 'string', + 'reverseChargeVAT' => 'bool', + 'tradingName' => 'string', 'type' => '\SynergiTech\Staffology\Model\CISSubContractorType', 'utr' => 'string', - 'tradingName' => 'string', - 'companyUtr' => 'string', - 'companyNumber' => 'string', - 'vatRegistered' => 'bool', 'vatNumber' => 'string', 'vatRate' => 'float', - 'reverseChargeVAT' => 'bool' + 'vatRegistered' => 'bool', + 'verification' => '\SynergiTech\Staffology\Model\ContractCisVerificationDetailsRequest' ]; /** @@ -77,16 +77,16 @@ class ContractCisDetailsRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPIFormats = [ - 'verification' => null, + 'companyNumber' => null, + 'companyUtr' => null, + 'reverseChargeVAT' => null, + 'tradingName' => null, 'type' => null, 'utr' => null, - 'tradingName' => null, - 'companyUtr' => null, - 'companyNumber' => null, - 'vatRegistered' => null, 'vatNumber' => null, 'vatRate' => 'double', - 'reverseChargeVAT' => null + 'vatRegistered' => null, + 'verification' => null ]; /** @@ -95,16 +95,16 @@ class ContractCisDetailsRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPINullables = [ - 'verification' => false, + 'companyNumber' => true, + 'companyUtr' => true, + 'reverseChargeVAT' => false, + 'tradingName' => true, 'type' => false, 'utr' => true, - 'tradingName' => true, - 'companyUtr' => true, - 'companyNumber' => true, - 'vatRegistered' => false, 'vatNumber' => true, 'vatRate' => false, - 'reverseChargeVAT' => false + 'vatRegistered' => false, + 'verification' => false ]; /** @@ -193,16 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'verification' => 'verification', + 'companyNumber' => 'companyNumber', + 'companyUtr' => 'companyUtr', + 'reverseChargeVAT' => 'reverseChargeVAT', + 'tradingName' => 'tradingName', 'type' => 'type', 'utr' => 'utr', - 'tradingName' => 'tradingName', - 'companyUtr' => 'companyUtr', - 'companyNumber' => 'companyNumber', - 'vatRegistered' => 'vatRegistered', 'vatNumber' => 'vatNumber', 'vatRate' => 'vatRate', - 'reverseChargeVAT' => 'reverseChargeVAT' + 'vatRegistered' => 'vatRegistered', + 'verification' => 'verification' ]; /** @@ -211,16 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'verification' => 'setVerification', + 'companyNumber' => 'setCompanyNumber', + 'companyUtr' => 'setCompanyUtr', + 'reverseChargeVAT' => 'setReverseChargeVAT', + 'tradingName' => 'setTradingName', 'type' => 'setType', 'utr' => 'setUtr', - 'tradingName' => 'setTradingName', - 'companyUtr' => 'setCompanyUtr', - 'companyNumber' => 'setCompanyNumber', - 'vatRegistered' => 'setVatRegistered', 'vatNumber' => 'setVatNumber', 'vatRate' => 'setVatRate', - 'reverseChargeVAT' => 'setReverseChargeVAT' + 'vatRegistered' => 'setVatRegistered', + 'verification' => 'setVerification' ]; /** @@ -229,16 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'verification' => 'getVerification', + 'companyNumber' => 'getCompanyNumber', + 'companyUtr' => 'getCompanyUtr', + 'reverseChargeVAT' => 'getReverseChargeVAT', + 'tradingName' => 'getTradingName', 'type' => 'getType', 'utr' => 'getUtr', - 'tradingName' => 'getTradingName', - 'companyUtr' => 'getCompanyUtr', - 'companyNumber' => 'getCompanyNumber', - 'vatRegistered' => 'getVatRegistered', 'vatNumber' => 'getVatNumber', 'vatRate' => 'getVatRate', - 'reverseChargeVAT' => 'getReverseChargeVAT' + 'vatRegistered' => 'getVatRegistered', + 'verification' => 'getVerification' ]; /** @@ -297,16 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('verification', $data ?? [], null); + $this->setIfExists('companyNumber', $data ?? [], null); + $this->setIfExists('companyUtr', $data ?? [], null); + $this->setIfExists('reverseChargeVAT', $data ?? [], null); + $this->setIfExists('tradingName', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('utr', $data ?? [], null); - $this->setIfExists('tradingName', $data ?? [], null); - $this->setIfExists('companyUtr', $data ?? [], null); - $this->setIfExists('companyNumber', $data ?? [], null); - $this->setIfExists('vatRegistered', $data ?? [], null); $this->setIfExists('vatNumber', $data ?? [], null); $this->setIfExists('vatRate', $data ?? [], null); - $this->setIfExists('reverseChargeVAT', $data ?? [], null); + $this->setIfExists('vatRegistered', $data ?? [], null); + $this->setIfExists('verification', $data ?? [], null); } /** @@ -336,20 +336,20 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (!is_null($this->container['utr']) && (mb_strlen($this->container['utr']) > 20)) { - $invalidProperties[] = "invalid value for 'utr', the character length must be smaller than or equal to 20."; - } - - if (!is_null($this->container['tradingName']) && (mb_strlen($this->container['tradingName']) > 200)) { - $invalidProperties[] = "invalid value for 'tradingName', the character length must be smaller than or equal to 200."; + if (!is_null($this->container['companyNumber']) && (mb_strlen($this->container['companyNumber']) > 20)) { + $invalidProperties[] = "invalid value for 'companyNumber', the character length must be smaller than or equal to 20."; } if (!is_null($this->container['companyUtr']) && (mb_strlen($this->container['companyUtr']) > 20)) { $invalidProperties[] = "invalid value for 'companyUtr', the character length must be smaller than or equal to 20."; } - if (!is_null($this->container['companyNumber']) && (mb_strlen($this->container['companyNumber']) > 20)) { - $invalidProperties[] = "invalid value for 'companyNumber', the character length must be smaller than or equal to 20."; + if (!is_null($this->container['tradingName']) && (mb_strlen($this->container['tradingName']) > 200)) { + $invalidProperties[] = "invalid value for 'tradingName', the character length must be smaller than or equal to 200."; + } + + if (!is_null($this->container['utr']) && (mb_strlen($this->container['utr']) > 20)) { + $invalidProperties[] = "invalid value for 'utr', the character length must be smaller than or equal to 20."; } if (!is_null($this->container['vatNumber']) && (mb_strlen($this->container['vatNumber']) > 20)) { @@ -372,93 +372,104 @@ public function valid(): bool /** - * Gets verification + * Gets companyNumber * - * @return \SynergiTech\Staffology\Model\ContractCisVerificationDetailsRequest|null + * @return string|null */ - public function getVerification(): ?\SynergiTech\Staffology\Model\ContractCisVerificationDetailsRequest + public function getCompanyNumber(): ?string { - return $this->container['verification']; + return $this->container['companyNumber']; } /** - * Sets verification + * Sets companyNumber * - * @param \SynergiTech\Staffology\Model\ContractCisVerificationDetailsRequest|null $verification verification + * @param string|null $companyNumber companyNumber * * @return $this */ - public function setVerification(?\SynergiTech\Staffology\Model\ContractCisVerificationDetailsRequest $verification): static + public function setCompanyNumber(?string $companyNumber): static { - if (is_null($verification)) { - throw new InvalidArgumentException('non-nullable verification cannot be null'); + if (is_null($companyNumber)) { + array_push($this->openAPINullablesSetToNull, 'companyNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('companyNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['verification'] = $verification; + if (!is_null($companyNumber) && (mb_strlen($companyNumber) > 20)) { + throw new InvalidArgumentException('invalid length for $companyNumber when calling ContractCisDetailsRequest., must be smaller than or equal to 20.'); + } + + $this->container['companyNumber'] = $companyNumber; return $this; } /** - * Gets type + * Gets companyUtr * - * @return \SynergiTech\Staffology\Model\CISSubContractorType|null + * @return string|null */ - public function getType(): ?\SynergiTech\Staffology\Model\CISSubContractorType + public function getCompanyUtr(): ?string { - return $this->container['type']; + return $this->container['companyUtr']; } /** - * Sets type + * Sets companyUtr * - * @param \SynergiTech\Staffology\Model\CISSubContractorType|null $type type + * @param string|null $companyUtr companyUtr * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\CISSubContractorType $type): static + public function setCompanyUtr(?string $companyUtr): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($companyUtr)) { + array_push($this->openAPINullablesSetToNull, 'companyUtr'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('companyUtr', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['type'] = $type; + if (!is_null($companyUtr) && (mb_strlen($companyUtr) > 20)) { + throw new InvalidArgumentException('invalid length for $companyUtr when calling ContractCisDetailsRequest., must be smaller than or equal to 20.'); + } + + $this->container['companyUtr'] = $companyUtr; return $this; } /** - * Gets utr + * Gets reverseChargeVAT * - * @return string|null + * @return bool|null */ - public function getUtr(): ?string + public function getReverseChargeVAT(): ?bool { - return $this->container['utr']; + return $this->container['reverseChargeVAT']; } /** - * Sets utr + * Sets reverseChargeVAT * - * @param string|null $utr utr + * @param bool|null $reverseChargeVAT reverseChargeVAT * * @return $this */ - public function setUtr(?string $utr): static + public function setReverseChargeVAT(?bool $reverseChargeVAT): static { - if (is_null($utr)) { - array_push($this->openAPINullablesSetToNull, 'utr'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('utr', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($utr) && (mb_strlen($utr) > 20)) { - throw new InvalidArgumentException('invalid length for $utr when calling ContractCisDetailsRequest., must be smaller than or equal to 20.'); + if (is_null($reverseChargeVAT)) { + throw new InvalidArgumentException('non-nullable reverseChargeVAT cannot be null'); } - - $this->container['utr'] = $utr; + $this->container['reverseChargeVAT'] = $reverseChargeVAT; return $this; } @@ -502,104 +513,66 @@ public function setTradingName(?string $tradingName): static } /** - * Gets companyUtr + * Gets type * - * @return string|null + * @return \SynergiTech\Staffology\Model\CISSubContractorType|null */ - public function getCompanyUtr(): ?string + public function getType(): ?\SynergiTech\Staffology\Model\CISSubContractorType { - return $this->container['companyUtr']; + return $this->container['type']; } /** - * Sets companyUtr + * Sets type * - * @param string|null $companyUtr companyUtr + * @param \SynergiTech\Staffology\Model\CISSubContractorType|null $type type * * @return $this */ - public function setCompanyUtr(?string $companyUtr): static + public function setType(?\SynergiTech\Staffology\Model\CISSubContractorType $type): static { - if (is_null($companyUtr)) { - array_push($this->openAPINullablesSetToNull, 'companyUtr'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('companyUtr', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($companyUtr) && (mb_strlen($companyUtr) > 20)) { - throw new InvalidArgumentException('invalid length for $companyUtr when calling ContractCisDetailsRequest., must be smaller than or equal to 20.'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - - $this->container['companyUtr'] = $companyUtr; + $this->container['type'] = $type; return $this; } /** - * Gets companyNumber + * Gets utr * * @return string|null */ - public function getCompanyNumber(): ?string + public function getUtr(): ?string { - return $this->container['companyNumber']; + return $this->container['utr']; } /** - * Sets companyNumber + * Sets utr * - * @param string|null $companyNumber companyNumber + * @param string|null $utr utr * * @return $this */ - public function setCompanyNumber(?string $companyNumber): static + public function setUtr(?string $utr): static { - if (is_null($companyNumber)) { - array_push($this->openAPINullablesSetToNull, 'companyNumber'); + if (is_null($utr)) { + array_push($this->openAPINullablesSetToNull, 'utr'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('companyNumber', $nullablesSetToNull); + $index = array_search('utr', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($companyNumber) && (mb_strlen($companyNumber) > 20)) { - throw new InvalidArgumentException('invalid length for $companyNumber when calling ContractCisDetailsRequest., must be smaller than or equal to 20.'); + if (!is_null($utr) && (mb_strlen($utr) > 20)) { + throw new InvalidArgumentException('invalid length for $utr when calling ContractCisDetailsRequest., must be smaller than or equal to 20.'); } - $this->container['companyNumber'] = $companyNumber; - - return $this; - } - - /** - * Gets vatRegistered - * - * @return bool|null - */ - public function getVatRegistered(): ?bool - { - return $this->container['vatRegistered']; - } - - /** - * Sets vatRegistered - * - * @param bool|null $vatRegistered vatRegistered - * - * @return $this - */ - public function setVatRegistered(?bool $vatRegistered): static - { - if (is_null($vatRegistered)) { - throw new InvalidArgumentException('non-nullable vatRegistered cannot be null'); - } - $this->container['vatRegistered'] = $vatRegistered; + $this->container['utr'] = $utr; return $this; } @@ -670,28 +643,55 @@ public function setVatRate(?float $vatRate): static } /** - * Gets reverseChargeVAT + * Gets vatRegistered * * @return bool|null */ - public function getReverseChargeVAT(): ?bool + public function getVatRegistered(): ?bool { - return $this->container['reverseChargeVAT']; + return $this->container['vatRegistered']; } /** - * Sets reverseChargeVAT + * Sets vatRegistered * - * @param bool|null $reverseChargeVAT reverseChargeVAT + * @param bool|null $vatRegistered vatRegistered * * @return $this */ - public function setReverseChargeVAT(?bool $reverseChargeVAT): static + public function setVatRegistered(?bool $vatRegistered): static { - if (is_null($reverseChargeVAT)) { - throw new InvalidArgumentException('non-nullable reverseChargeVAT cannot be null'); + if (is_null($vatRegistered)) { + throw new InvalidArgumentException('non-nullable vatRegistered cannot be null'); } - $this->container['reverseChargeVAT'] = $reverseChargeVAT; + $this->container['vatRegistered'] = $vatRegistered; + + return $this; + } + + /** + * Gets verification + * + * @return \SynergiTech\Staffology\Model\ContractCisVerificationDetailsRequest|null + */ + public function getVerification(): ?\SynergiTech\Staffology\Model\ContractCisVerificationDetailsRequest + { + return $this->container['verification']; + } + + /** + * Sets verification + * + * @param \SynergiTech\Staffology\Model\ContractCisVerificationDetailsRequest|null $verification verification + * + * @return $this + */ + public function setVerification(?\SynergiTech\Staffology\Model\ContractCisVerificationDetailsRequest $verification): static + { + if (is_null($verification)) { + throw new InvalidArgumentException('non-nullable verification cannot be null'); + } + $this->container['verification'] = $verification; return $this; } diff --git a/src/Model/ContractCisDetailsResponse.php b/src/Model/ContractCisDetailsResponse.php index 236a8ab..13dd3e6 100644 --- a/src/Model/ContractCisDetailsResponse.php +++ b/src/Model/ContractCisDetailsResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,16 @@ class ContractCisDetailsResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'verification' => '\SynergiTech\Staffology\Model\ContractCisVerificationDetailsResponse', + 'companyNumber' => 'string', + 'companyUtr' => 'string', + 'reverseChargeVAT' => 'bool', + 'tradingName' => 'string', 'type' => '\SynergiTech\Staffology\Model\CISSubContractorType', 'utr' => 'string', - 'tradingName' => 'string', - 'companyUtr' => 'string', - 'companyNumber' => 'string', - 'vatRegistered' => 'bool', 'vatNumber' => 'string', 'vatRate' => 'float', - 'reverseChargeVAT' => 'bool' + 'vatRegistered' => 'bool', + 'verification' => '\SynergiTech\Staffology\Model\ContractCisVerificationDetailsResponse' ]; /** @@ -77,16 +77,16 @@ class ContractCisDetailsResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'verification' => null, + 'companyNumber' => null, + 'companyUtr' => null, + 'reverseChargeVAT' => null, + 'tradingName' => null, 'type' => null, 'utr' => null, - 'tradingName' => null, - 'companyUtr' => null, - 'companyNumber' => null, - 'vatRegistered' => null, 'vatNumber' => null, 'vatRate' => 'double', - 'reverseChargeVAT' => null + 'vatRegistered' => null, + 'verification' => null ]; /** @@ -95,16 +95,16 @@ class ContractCisDetailsResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'verification' => false, + 'companyNumber' => true, + 'companyUtr' => true, + 'reverseChargeVAT' => false, + 'tradingName' => true, 'type' => false, 'utr' => true, - 'tradingName' => true, - 'companyUtr' => true, - 'companyNumber' => true, - 'vatRegistered' => false, 'vatNumber' => true, 'vatRate' => false, - 'reverseChargeVAT' => false + 'vatRegistered' => false, + 'verification' => false ]; /** @@ -193,16 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'verification' => 'verification', + 'companyNumber' => 'companyNumber', + 'companyUtr' => 'companyUtr', + 'reverseChargeVAT' => 'reverseChargeVAT', + 'tradingName' => 'tradingName', 'type' => 'type', 'utr' => 'utr', - 'tradingName' => 'tradingName', - 'companyUtr' => 'companyUtr', - 'companyNumber' => 'companyNumber', - 'vatRegistered' => 'vatRegistered', 'vatNumber' => 'vatNumber', 'vatRate' => 'vatRate', - 'reverseChargeVAT' => 'reverseChargeVAT' + 'vatRegistered' => 'vatRegistered', + 'verification' => 'verification' ]; /** @@ -211,16 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'verification' => 'setVerification', + 'companyNumber' => 'setCompanyNumber', + 'companyUtr' => 'setCompanyUtr', + 'reverseChargeVAT' => 'setReverseChargeVAT', + 'tradingName' => 'setTradingName', 'type' => 'setType', 'utr' => 'setUtr', - 'tradingName' => 'setTradingName', - 'companyUtr' => 'setCompanyUtr', - 'companyNumber' => 'setCompanyNumber', - 'vatRegistered' => 'setVatRegistered', 'vatNumber' => 'setVatNumber', 'vatRate' => 'setVatRate', - 'reverseChargeVAT' => 'setReverseChargeVAT' + 'vatRegistered' => 'setVatRegistered', + 'verification' => 'setVerification' ]; /** @@ -229,16 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'verification' => 'getVerification', + 'companyNumber' => 'getCompanyNumber', + 'companyUtr' => 'getCompanyUtr', + 'reverseChargeVAT' => 'getReverseChargeVAT', + 'tradingName' => 'getTradingName', 'type' => 'getType', 'utr' => 'getUtr', - 'tradingName' => 'getTradingName', - 'companyUtr' => 'getCompanyUtr', - 'companyNumber' => 'getCompanyNumber', - 'vatRegistered' => 'getVatRegistered', 'vatNumber' => 'getVatNumber', 'vatRate' => 'getVatRate', - 'reverseChargeVAT' => 'getReverseChargeVAT' + 'vatRegistered' => 'getVatRegistered', + 'verification' => 'getVerification' ]; /** @@ -297,16 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('verification', $data ?? [], null); + $this->setIfExists('companyNumber', $data ?? [], null); + $this->setIfExists('companyUtr', $data ?? [], null); + $this->setIfExists('reverseChargeVAT', $data ?? [], null); + $this->setIfExists('tradingName', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('utr', $data ?? [], null); - $this->setIfExists('tradingName', $data ?? [], null); - $this->setIfExists('companyUtr', $data ?? [], null); - $this->setIfExists('companyNumber', $data ?? [], null); - $this->setIfExists('vatRegistered', $data ?? [], null); $this->setIfExists('vatNumber', $data ?? [], null); $this->setIfExists('vatRate', $data ?? [], null); - $this->setIfExists('reverseChargeVAT', $data ?? [], null); + $this->setIfExists('vatRegistered', $data ?? [], null); + $this->setIfExists('verification', $data ?? [], null); } /** @@ -336,20 +336,20 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (!is_null($this->container['utr']) && (mb_strlen($this->container['utr']) > 20)) { - $invalidProperties[] = "invalid value for 'utr', the character length must be smaller than or equal to 20."; - } - - if (!is_null($this->container['tradingName']) && (mb_strlen($this->container['tradingName']) > 200)) { - $invalidProperties[] = "invalid value for 'tradingName', the character length must be smaller than or equal to 200."; + if (!is_null($this->container['companyNumber']) && (mb_strlen($this->container['companyNumber']) > 20)) { + $invalidProperties[] = "invalid value for 'companyNumber', the character length must be smaller than or equal to 20."; } if (!is_null($this->container['companyUtr']) && (mb_strlen($this->container['companyUtr']) > 20)) { $invalidProperties[] = "invalid value for 'companyUtr', the character length must be smaller than or equal to 20."; } - if (!is_null($this->container['companyNumber']) && (mb_strlen($this->container['companyNumber']) > 20)) { - $invalidProperties[] = "invalid value for 'companyNumber', the character length must be smaller than or equal to 20."; + if (!is_null($this->container['tradingName']) && (mb_strlen($this->container['tradingName']) > 200)) { + $invalidProperties[] = "invalid value for 'tradingName', the character length must be smaller than or equal to 200."; + } + + if (!is_null($this->container['utr']) && (mb_strlen($this->container['utr']) > 20)) { + $invalidProperties[] = "invalid value for 'utr', the character length must be smaller than or equal to 20."; } if (!is_null($this->container['vatNumber']) && (mb_strlen($this->container['vatNumber']) > 20)) { @@ -372,93 +372,104 @@ public function valid(): bool /** - * Gets verification + * Gets companyNumber * - * @return \SynergiTech\Staffology\Model\ContractCisVerificationDetailsResponse|null + * @return string|null */ - public function getVerification(): ?\SynergiTech\Staffology\Model\ContractCisVerificationDetailsResponse + public function getCompanyNumber(): ?string { - return $this->container['verification']; + return $this->container['companyNumber']; } /** - * Sets verification + * Sets companyNumber * - * @param \SynergiTech\Staffology\Model\ContractCisVerificationDetailsResponse|null $verification verification + * @param string|null $companyNumber companyNumber * * @return $this */ - public function setVerification(?\SynergiTech\Staffology\Model\ContractCisVerificationDetailsResponse $verification): static + public function setCompanyNumber(?string $companyNumber): static { - if (is_null($verification)) { - throw new InvalidArgumentException('non-nullable verification cannot be null'); + if (is_null($companyNumber)) { + array_push($this->openAPINullablesSetToNull, 'companyNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('companyNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['verification'] = $verification; + if (!is_null($companyNumber) && (mb_strlen($companyNumber) > 20)) { + throw new InvalidArgumentException('invalid length for $companyNumber when calling ContractCisDetailsResponse., must be smaller than or equal to 20.'); + } + + $this->container['companyNumber'] = $companyNumber; return $this; } /** - * Gets type + * Gets companyUtr * - * @return \SynergiTech\Staffology\Model\CISSubContractorType|null + * @return string|null */ - public function getType(): ?\SynergiTech\Staffology\Model\CISSubContractorType + public function getCompanyUtr(): ?string { - return $this->container['type']; + return $this->container['companyUtr']; } /** - * Sets type + * Sets companyUtr * - * @param \SynergiTech\Staffology\Model\CISSubContractorType|null $type type + * @param string|null $companyUtr companyUtr * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\CISSubContractorType $type): static + public function setCompanyUtr(?string $companyUtr): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($companyUtr)) { + array_push($this->openAPINullablesSetToNull, 'companyUtr'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('companyUtr', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['type'] = $type; + if (!is_null($companyUtr) && (mb_strlen($companyUtr) > 20)) { + throw new InvalidArgumentException('invalid length for $companyUtr when calling ContractCisDetailsResponse., must be smaller than or equal to 20.'); + } + + $this->container['companyUtr'] = $companyUtr; return $this; } /** - * Gets utr + * Gets reverseChargeVAT * - * @return string|null + * @return bool|null */ - public function getUtr(): ?string + public function getReverseChargeVAT(): ?bool { - return $this->container['utr']; + return $this->container['reverseChargeVAT']; } /** - * Sets utr + * Sets reverseChargeVAT * - * @param string|null $utr utr + * @param bool|null $reverseChargeVAT reverseChargeVAT * * @return $this */ - public function setUtr(?string $utr): static + public function setReverseChargeVAT(?bool $reverseChargeVAT): static { - if (is_null($utr)) { - array_push($this->openAPINullablesSetToNull, 'utr'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('utr', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($utr) && (mb_strlen($utr) > 20)) { - throw new InvalidArgumentException('invalid length for $utr when calling ContractCisDetailsResponse., must be smaller than or equal to 20.'); + if (is_null($reverseChargeVAT)) { + throw new InvalidArgumentException('non-nullable reverseChargeVAT cannot be null'); } - - $this->container['utr'] = $utr; + $this->container['reverseChargeVAT'] = $reverseChargeVAT; return $this; } @@ -502,104 +513,66 @@ public function setTradingName(?string $tradingName): static } /** - * Gets companyUtr + * Gets type * - * @return string|null + * @return \SynergiTech\Staffology\Model\CISSubContractorType|null */ - public function getCompanyUtr(): ?string + public function getType(): ?\SynergiTech\Staffology\Model\CISSubContractorType { - return $this->container['companyUtr']; + return $this->container['type']; } /** - * Sets companyUtr + * Sets type * - * @param string|null $companyUtr companyUtr + * @param \SynergiTech\Staffology\Model\CISSubContractorType|null $type type * * @return $this */ - public function setCompanyUtr(?string $companyUtr): static + public function setType(?\SynergiTech\Staffology\Model\CISSubContractorType $type): static { - if (is_null($companyUtr)) { - array_push($this->openAPINullablesSetToNull, 'companyUtr'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('companyUtr', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($companyUtr) && (mb_strlen($companyUtr) > 20)) { - throw new InvalidArgumentException('invalid length for $companyUtr when calling ContractCisDetailsResponse., must be smaller than or equal to 20.'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - - $this->container['companyUtr'] = $companyUtr; + $this->container['type'] = $type; return $this; } /** - * Gets companyNumber + * Gets utr * * @return string|null */ - public function getCompanyNumber(): ?string + public function getUtr(): ?string { - return $this->container['companyNumber']; + return $this->container['utr']; } /** - * Sets companyNumber + * Sets utr * - * @param string|null $companyNumber companyNumber + * @param string|null $utr utr * * @return $this */ - public function setCompanyNumber(?string $companyNumber): static + public function setUtr(?string $utr): static { - if (is_null($companyNumber)) { - array_push($this->openAPINullablesSetToNull, 'companyNumber'); + if (is_null($utr)) { + array_push($this->openAPINullablesSetToNull, 'utr'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('companyNumber', $nullablesSetToNull); + $index = array_search('utr', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($companyNumber) && (mb_strlen($companyNumber) > 20)) { - throw new InvalidArgumentException('invalid length for $companyNumber when calling ContractCisDetailsResponse., must be smaller than or equal to 20.'); + if (!is_null($utr) && (mb_strlen($utr) > 20)) { + throw new InvalidArgumentException('invalid length for $utr when calling ContractCisDetailsResponse., must be smaller than or equal to 20.'); } - $this->container['companyNumber'] = $companyNumber; - - return $this; - } - - /** - * Gets vatRegistered - * - * @return bool|null - */ - public function getVatRegistered(): ?bool - { - return $this->container['vatRegistered']; - } - - /** - * Sets vatRegistered - * - * @param bool|null $vatRegistered vatRegistered - * - * @return $this - */ - public function setVatRegistered(?bool $vatRegistered): static - { - if (is_null($vatRegistered)) { - throw new InvalidArgumentException('non-nullable vatRegistered cannot be null'); - } - $this->container['vatRegistered'] = $vatRegistered; + $this->container['utr'] = $utr; return $this; } @@ -670,28 +643,55 @@ public function setVatRate(?float $vatRate): static } /** - * Gets reverseChargeVAT + * Gets vatRegistered * * @return bool|null */ - public function getReverseChargeVAT(): ?bool + public function getVatRegistered(): ?bool { - return $this->container['reverseChargeVAT']; + return $this->container['vatRegistered']; } /** - * Sets reverseChargeVAT + * Sets vatRegistered * - * @param bool|null $reverseChargeVAT reverseChargeVAT + * @param bool|null $vatRegistered vatRegistered * * @return $this */ - public function setReverseChargeVAT(?bool $reverseChargeVAT): static + public function setVatRegistered(?bool $vatRegistered): static { - if (is_null($reverseChargeVAT)) { - throw new InvalidArgumentException('non-nullable reverseChargeVAT cannot be null'); + if (is_null($vatRegistered)) { + throw new InvalidArgumentException('non-nullable vatRegistered cannot be null'); } - $this->container['reverseChargeVAT'] = $reverseChargeVAT; + $this->container['vatRegistered'] = $vatRegistered; + + return $this; + } + + /** + * Gets verification + * + * @return \SynergiTech\Staffology\Model\ContractCisVerificationDetailsResponse|null + */ + public function getVerification(): ?\SynergiTech\Staffology\Model\ContractCisVerificationDetailsResponse + { + return $this->container['verification']; + } + + /** + * Sets verification + * + * @param \SynergiTech\Staffology\Model\ContractCisVerificationDetailsResponse|null $verification verification + * + * @return $this + */ + public function setVerification(?\SynergiTech\Staffology\Model\ContractCisVerificationDetailsResponse $verification): static + { + if (is_null($verification)) { + throw new InvalidArgumentException('non-nullable verification cannot be null'); + } + $this->container['verification'] = $verification; return $this; } diff --git a/src/Model/ContractCisPartnership.php b/src/Model/ContractCisPartnership.php index 6586757..1aa019a 100644 --- a/src/Model/ContractCisPartnership.php +++ b/src/Model/ContractCisPartnership.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractCisSubContractor.php b/src/Model/ContractCisSubContractor.php index 5457cbd..e9c97ef 100644 --- a/src/Model/ContractCisSubContractor.php +++ b/src/Model/ContractCisSubContractor.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,34 +59,34 @@ class ContractCisSubContractor implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPITypes = [ - 'employeeUniqueId' => 'string', + 'action' => 'string', + 'address' => '\SynergiTech\Staffology\Model\ContractRtiEmployeeAddress', + 'costOfMaterials' => 'string', + 'costOfMaterialsUnrounded' => 'string', + 'crn' => 'string', + 'displayName' => 'string', 'emailStatementTo' => 'string', - 'numberOfPayments' => 'int', + 'employeeUniqueId' => 'string', 'item' => '\SynergiTech\Staffology\Model\ContractCisSubContractorItem', - 'displayName' => 'string', - 'action' => 'string', - 'type' => 'string', + 'matched' => 'string', 'name' => '\SynergiTech\Staffology\Model\ContractRtiEmployeeName', - 'tradingName' => 'string', - 'worksRef' => 'string', - 'unmatchedRate' => 'string', - 'utr' => 'string', - 'crn' => 'string', + 'netPayment' => 'string', 'nino' => 'string', + 'numberOfPayments' => 'int', 'partnership' => '\SynergiTech\Staffology\Model\ContractCisPartnership', - 'address' => '\SynergiTech\Staffology\Model\ContractRtiEmployeeAddress', + 'taxTreatment' => 'string', 'telephone' => 'string', + 'totalDeducted' => 'string', + 'totalPayments' => 'string', 'totalPaymentsUnrounded' => 'string', - 'costOfMaterialsUnrounded' => 'string', + 'tradingName' => 'string', + 'type' => 'string', 'umbrellaFee' => 'string', + 'unmatchedRate' => 'string', + 'utr' => 'string', 'validationMsg' => 'string', 'verificationNumber' => 'string', - 'totalPayments' => 'string', - 'costOfMaterials' => 'string', - 'totalDeducted' => 'string', - 'matched' => 'string', - 'taxTreatment' => 'string', - 'netPayment' => 'string' + 'worksRef' => 'string' ]; /** @@ -95,34 +95,34 @@ class ContractCisSubContractor implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPIFormats = [ - 'employeeUniqueId' => 'uuid', + 'action' => null, + 'address' => null, + 'costOfMaterials' => null, + 'costOfMaterialsUnrounded' => null, + 'crn' => null, + 'displayName' => null, 'emailStatementTo' => null, - 'numberOfPayments' => 'int32', + 'employeeUniqueId' => 'uuid', 'item' => null, - 'displayName' => null, - 'action' => null, - 'type' => null, + 'matched' => null, 'name' => null, - 'tradingName' => null, - 'worksRef' => null, - 'unmatchedRate' => null, - 'utr' => null, - 'crn' => null, + 'netPayment' => null, 'nino' => null, + 'numberOfPayments' => 'int32', 'partnership' => null, - 'address' => null, + 'taxTreatment' => null, 'telephone' => null, + 'totalDeducted' => null, + 'totalPayments' => null, 'totalPaymentsUnrounded' => null, - 'costOfMaterialsUnrounded' => null, + 'tradingName' => null, + 'type' => null, 'umbrellaFee' => null, + 'unmatchedRate' => null, + 'utr' => null, 'validationMsg' => null, 'verificationNumber' => null, - 'totalPayments' => null, - 'costOfMaterials' => null, - 'totalDeducted' => null, - 'matched' => null, - 'taxTreatment' => null, - 'netPayment' => null + 'worksRef' => null ]; /** @@ -131,34 +131,34 @@ class ContractCisSubContractor implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPINullables = [ - 'employeeUniqueId' => false, + 'action' => true, + 'address' => false, + 'costOfMaterials' => true, + 'costOfMaterialsUnrounded' => true, + 'crn' => true, + 'displayName' => true, 'emailStatementTo' => true, - 'numberOfPayments' => false, + 'employeeUniqueId' => false, 'item' => false, - 'displayName' => true, - 'action' => true, - 'type' => true, + 'matched' => true, 'name' => false, - 'tradingName' => true, - 'worksRef' => true, - 'unmatchedRate' => true, - 'utr' => true, - 'crn' => true, + 'netPayment' => true, 'nino' => true, + 'numberOfPayments' => false, 'partnership' => false, - 'address' => false, + 'taxTreatment' => true, 'telephone' => true, + 'totalDeducted' => true, + 'totalPayments' => true, 'totalPaymentsUnrounded' => true, - 'costOfMaterialsUnrounded' => true, + 'tradingName' => true, + 'type' => true, 'umbrellaFee' => true, + 'unmatchedRate' => true, + 'utr' => true, 'validationMsg' => true, 'verificationNumber' => true, - 'totalPayments' => true, - 'costOfMaterials' => true, - 'totalDeducted' => true, - 'matched' => true, - 'taxTreatment' => true, - 'netPayment' => true + 'worksRef' => true ]; /** @@ -247,34 +247,34 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employeeUniqueId' => 'employeeUniqueId', + 'action' => 'action', + 'address' => 'address', + 'costOfMaterials' => 'costOfMaterials', + 'costOfMaterialsUnrounded' => 'costOfMaterialsUnrounded', + 'crn' => 'crn', + 'displayName' => 'displayName', 'emailStatementTo' => 'emailStatementTo', - 'numberOfPayments' => 'numberOfPayments', + 'employeeUniqueId' => 'employeeUniqueId', 'item' => 'item', - 'displayName' => 'displayName', - 'action' => 'action', - 'type' => 'type', + 'matched' => 'matched', 'name' => 'name', - 'tradingName' => 'tradingName', - 'worksRef' => 'worksRef', - 'unmatchedRate' => 'unmatchedRate', - 'utr' => 'utr', - 'crn' => 'crn', + 'netPayment' => 'netPayment', 'nino' => 'nino', + 'numberOfPayments' => 'numberOfPayments', 'partnership' => 'partnership', - 'address' => 'address', + 'taxTreatment' => 'taxTreatment', 'telephone' => 'telephone', + 'totalDeducted' => 'totalDeducted', + 'totalPayments' => 'totalPayments', 'totalPaymentsUnrounded' => 'totalPaymentsUnrounded', - 'costOfMaterialsUnrounded' => 'costOfMaterialsUnrounded', + 'tradingName' => 'tradingName', + 'type' => 'type', 'umbrellaFee' => 'umbrellaFee', + 'unmatchedRate' => 'unmatchedRate', + 'utr' => 'utr', 'validationMsg' => 'validationMsg', 'verificationNumber' => 'verificationNumber', - 'totalPayments' => 'totalPayments', - 'costOfMaterials' => 'costOfMaterials', - 'totalDeducted' => 'totalDeducted', - 'matched' => 'matched', - 'taxTreatment' => 'taxTreatment', - 'netPayment' => 'netPayment' + 'worksRef' => 'worksRef' ]; /** @@ -283,34 +283,34 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employeeUniqueId' => 'setEmployeeUniqueId', + 'action' => 'setAction', + 'address' => 'setAddress', + 'costOfMaterials' => 'setCostOfMaterials', + 'costOfMaterialsUnrounded' => 'setCostOfMaterialsUnrounded', + 'crn' => 'setCrn', + 'displayName' => 'setDisplayName', 'emailStatementTo' => 'setEmailStatementTo', - 'numberOfPayments' => 'setNumberOfPayments', + 'employeeUniqueId' => 'setEmployeeUniqueId', 'item' => 'setItem', - 'displayName' => 'setDisplayName', - 'action' => 'setAction', - 'type' => 'setType', + 'matched' => 'setMatched', 'name' => 'setName', - 'tradingName' => 'setTradingName', - 'worksRef' => 'setWorksRef', - 'unmatchedRate' => 'setUnmatchedRate', - 'utr' => 'setUtr', - 'crn' => 'setCrn', + 'netPayment' => 'setNetPayment', 'nino' => 'setNino', + 'numberOfPayments' => 'setNumberOfPayments', 'partnership' => 'setPartnership', - 'address' => 'setAddress', + 'taxTreatment' => 'setTaxTreatment', 'telephone' => 'setTelephone', + 'totalDeducted' => 'setTotalDeducted', + 'totalPayments' => 'setTotalPayments', 'totalPaymentsUnrounded' => 'setTotalPaymentsUnrounded', - 'costOfMaterialsUnrounded' => 'setCostOfMaterialsUnrounded', + 'tradingName' => 'setTradingName', + 'type' => 'setType', 'umbrellaFee' => 'setUmbrellaFee', + 'unmatchedRate' => 'setUnmatchedRate', + 'utr' => 'setUtr', 'validationMsg' => 'setValidationMsg', 'verificationNumber' => 'setVerificationNumber', - 'totalPayments' => 'setTotalPayments', - 'costOfMaterials' => 'setCostOfMaterials', - 'totalDeducted' => 'setTotalDeducted', - 'matched' => 'setMatched', - 'taxTreatment' => 'setTaxTreatment', - 'netPayment' => 'setNetPayment' + 'worksRef' => 'setWorksRef' ]; /** @@ -319,34 +319,34 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employeeUniqueId' => 'getEmployeeUniqueId', + 'action' => 'getAction', + 'address' => 'getAddress', + 'costOfMaterials' => 'getCostOfMaterials', + 'costOfMaterialsUnrounded' => 'getCostOfMaterialsUnrounded', + 'crn' => 'getCrn', + 'displayName' => 'getDisplayName', 'emailStatementTo' => 'getEmailStatementTo', - 'numberOfPayments' => 'getNumberOfPayments', + 'employeeUniqueId' => 'getEmployeeUniqueId', 'item' => 'getItem', - 'displayName' => 'getDisplayName', - 'action' => 'getAction', - 'type' => 'getType', + 'matched' => 'getMatched', 'name' => 'getName', - 'tradingName' => 'getTradingName', - 'worksRef' => 'getWorksRef', - 'unmatchedRate' => 'getUnmatchedRate', - 'utr' => 'getUtr', - 'crn' => 'getCrn', + 'netPayment' => 'getNetPayment', 'nino' => 'getNino', + 'numberOfPayments' => 'getNumberOfPayments', 'partnership' => 'getPartnership', - 'address' => 'getAddress', + 'taxTreatment' => 'getTaxTreatment', 'telephone' => 'getTelephone', + 'totalDeducted' => 'getTotalDeducted', + 'totalPayments' => 'getTotalPayments', 'totalPaymentsUnrounded' => 'getTotalPaymentsUnrounded', - 'costOfMaterialsUnrounded' => 'getCostOfMaterialsUnrounded', + 'tradingName' => 'getTradingName', + 'type' => 'getType', 'umbrellaFee' => 'getUmbrellaFee', + 'unmatchedRate' => 'getUnmatchedRate', + 'utr' => 'getUtr', 'validationMsg' => 'getValidationMsg', 'verificationNumber' => 'getVerificationNumber', - 'totalPayments' => 'getTotalPayments', - 'costOfMaterials' => 'getCostOfMaterials', - 'totalDeducted' => 'getTotalDeducted', - 'matched' => 'getMatched', - 'taxTreatment' => 'getTaxTreatment', - 'netPayment' => 'getNetPayment' + 'worksRef' => 'getWorksRef' ]; /** @@ -405,34 +405,34 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employeeUniqueId', $data ?? [], null); + $this->setIfExists('action', $data ?? [], null); + $this->setIfExists('address', $data ?? [], null); + $this->setIfExists('costOfMaterials', $data ?? [], null); + $this->setIfExists('costOfMaterialsUnrounded', $data ?? [], null); + $this->setIfExists('crn', $data ?? [], null); + $this->setIfExists('displayName', $data ?? [], null); $this->setIfExists('emailStatementTo', $data ?? [], null); - $this->setIfExists('numberOfPayments', $data ?? [], null); + $this->setIfExists('employeeUniqueId', $data ?? [], null); $this->setIfExists('item', $data ?? [], null); - $this->setIfExists('displayName', $data ?? [], null); - $this->setIfExists('action', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('matched', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('tradingName', $data ?? [], null); - $this->setIfExists('worksRef', $data ?? [], null); - $this->setIfExists('unmatchedRate', $data ?? [], null); - $this->setIfExists('utr', $data ?? [], null); - $this->setIfExists('crn', $data ?? [], null); + $this->setIfExists('netPayment', $data ?? [], null); $this->setIfExists('nino', $data ?? [], null); + $this->setIfExists('numberOfPayments', $data ?? [], null); $this->setIfExists('partnership', $data ?? [], null); - $this->setIfExists('address', $data ?? [], null); + $this->setIfExists('taxTreatment', $data ?? [], null); $this->setIfExists('telephone', $data ?? [], null); + $this->setIfExists('totalDeducted', $data ?? [], null); + $this->setIfExists('totalPayments', $data ?? [], null); $this->setIfExists('totalPaymentsUnrounded', $data ?? [], null); - $this->setIfExists('costOfMaterialsUnrounded', $data ?? [], null); + $this->setIfExists('tradingName', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('umbrellaFee', $data ?? [], null); + $this->setIfExists('unmatchedRate', $data ?? [], null); + $this->setIfExists('utr', $data ?? [], null); $this->setIfExists('validationMsg', $data ?? [], null); $this->setIfExists('verificationNumber', $data ?? [], null); - $this->setIfExists('totalPayments', $data ?? [], null); - $this->setIfExists('costOfMaterials', $data ?? [], null); - $this->setIfExists('totalDeducted', $data ?? [], null); - $this->setIfExists('matched', $data ?? [], null); - $this->setIfExists('taxTreatment', $data ?? [], null); - $this->setIfExists('netPayment', $data ?? [], null); + $this->setIfExists('worksRef', $data ?? [], null); } /** @@ -478,449 +478,442 @@ public function valid(): bool /** - * Gets employeeUniqueId + * Gets action * * @return string|null */ - public function getEmployeeUniqueId(): ?string + public function getAction(): ?string { - return $this->container['employeeUniqueId']; + return $this->container['action']; } /** - * Sets employeeUniqueId + * Sets action * - * @param string|null $employeeUniqueId employeeUniqueId + * @param string|null $action action * * @return $this */ - public function setEmployeeUniqueId(?string $employeeUniqueId): static + public function setAction(?string $action): static { - if (is_null($employeeUniqueId)) { - throw new InvalidArgumentException('non-nullable employeeUniqueId cannot be null'); + if (is_null($action)) { + array_push($this->openAPINullablesSetToNull, 'action'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('action', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeeUniqueId'] = $employeeUniqueId; + $this->container['action'] = $action; return $this; } /** - * Gets emailStatementTo + * Gets address * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractRtiEmployeeAddress|null */ - public function getEmailStatementTo(): ?string + public function getAddress(): ?\SynergiTech\Staffology\Model\ContractRtiEmployeeAddress { - return $this->container['emailStatementTo']; + return $this->container['address']; } /** - * Sets emailStatementTo + * Sets address * - * @param string|null $emailStatementTo emailStatementTo + * @param \SynergiTech\Staffology\Model\ContractRtiEmployeeAddress|null $address address * * @return $this */ - public function setEmailStatementTo(?string $emailStatementTo): static + public function setAddress(?\SynergiTech\Staffology\Model\ContractRtiEmployeeAddress $address): static { - if (is_null($emailStatementTo)) { - array_push($this->openAPINullablesSetToNull, 'emailStatementTo'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('emailStatementTo', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($address)) { + throw new InvalidArgumentException('non-nullable address cannot be null'); } - $this->container['emailStatementTo'] = $emailStatementTo; + $this->container['address'] = $address; return $this; } /** - * Gets numberOfPayments + * Gets costOfMaterials * - * @return int|null + * @return string|null */ - public function getNumberOfPayments(): ?int + public function getCostOfMaterials(): ?string { - return $this->container['numberOfPayments']; + return $this->container['costOfMaterials']; } /** - * Sets numberOfPayments + * Sets costOfMaterials * - * @param int|null $numberOfPayments numberOfPayments + * @param string|null $costOfMaterials costOfMaterials * * @return $this */ - public function setNumberOfPayments(?int $numberOfPayments): static + public function setCostOfMaterials(?string $costOfMaterials): static { - if (is_null($numberOfPayments)) { - throw new InvalidArgumentException('non-nullable numberOfPayments cannot be null'); + if (is_null($costOfMaterials)) { + array_push($this->openAPINullablesSetToNull, 'costOfMaterials'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('costOfMaterials', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['numberOfPayments'] = $numberOfPayments; + $this->container['costOfMaterials'] = $costOfMaterials; return $this; } /** - * Gets item + * Gets costOfMaterialsUnrounded * - * @return \SynergiTech\Staffology\Model\ContractCisSubContractorItem|null + * @return string|null */ - public function getItem(): ?\SynergiTech\Staffology\Model\ContractCisSubContractorItem + public function getCostOfMaterialsUnrounded(): ?string { - return $this->container['item']; + return $this->container['costOfMaterialsUnrounded']; } /** - * Sets item + * Sets costOfMaterialsUnrounded * - * @param \SynergiTech\Staffology\Model\ContractCisSubContractorItem|null $item item + * @param string|null $costOfMaterialsUnrounded costOfMaterialsUnrounded * * @return $this */ - public function setItem(?\SynergiTech\Staffology\Model\ContractCisSubContractorItem $item): static + public function setCostOfMaterialsUnrounded(?string $costOfMaterialsUnrounded): static { - if (is_null($item)) { - throw new InvalidArgumentException('non-nullable item cannot be null'); + if (is_null($costOfMaterialsUnrounded)) { + array_push($this->openAPINullablesSetToNull, 'costOfMaterialsUnrounded'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('costOfMaterialsUnrounded', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['item'] = $item; + $this->container['costOfMaterialsUnrounded'] = $costOfMaterialsUnrounded; return $this; } /** - * Gets displayName + * Gets crn * * @return string|null */ - public function getDisplayName(): ?string + public function getCrn(): ?string { - return $this->container['displayName']; + return $this->container['crn']; } /** - * Sets displayName + * Sets crn * - * @param string|null $displayName displayName + * @param string|null $crn crn * * @return $this */ - public function setDisplayName(?string $displayName): static + public function setCrn(?string $crn): static { - if (is_null($displayName)) { - array_push($this->openAPINullablesSetToNull, 'displayName'); + if (is_null($crn)) { + array_push($this->openAPINullablesSetToNull, 'crn'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('displayName', $nullablesSetToNull); + $index = array_search('crn', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['displayName'] = $displayName; + $this->container['crn'] = $crn; return $this; } /** - * Gets action + * Gets displayName * * @return string|null */ - public function getAction(): ?string + public function getDisplayName(): ?string { - return $this->container['action']; + return $this->container['displayName']; } /** - * Sets action + * Sets displayName * - * @param string|null $action action + * @param string|null $displayName displayName * * @return $this */ - public function setAction(?string $action): static + public function setDisplayName(?string $displayName): static { - if (is_null($action)) { - array_push($this->openAPINullablesSetToNull, 'action'); + if (is_null($displayName)) { + array_push($this->openAPINullablesSetToNull, 'displayName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('action', $nullablesSetToNull); + $index = array_search('displayName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['action'] = $action; + $this->container['displayName'] = $displayName; return $this; } /** - * Gets type + * Gets emailStatementTo * * @return string|null */ - public function getType(): ?string + public function getEmailStatementTo(): ?string { - return $this->container['type']; + return $this->container['emailStatementTo']; } /** - * Sets type + * Sets emailStatementTo * - * @param string|null $type type + * @param string|null $emailStatementTo emailStatementTo * * @return $this */ - public function setType(?string $type): static + public function setEmailStatementTo(?string $emailStatementTo): static { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); + if (is_null($emailStatementTo)) { + array_push($this->openAPINullablesSetToNull, 'emailStatementTo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); + $index = array_search('emailStatementTo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['type'] = $type; + $this->container['emailStatementTo'] = $emailStatementTo; return $this; } /** - * Gets name + * Gets employeeUniqueId * - * @return \SynergiTech\Staffology\Model\ContractRtiEmployeeName|null + * @return string|null */ - public function getName(): ?\SynergiTech\Staffology\Model\ContractRtiEmployeeName + public function getEmployeeUniqueId(): ?string { - return $this->container['name']; + return $this->container['employeeUniqueId']; } /** - * Sets name + * Sets employeeUniqueId * - * @param \SynergiTech\Staffology\Model\ContractRtiEmployeeName|null $name name + * @param string|null $employeeUniqueId employeeUniqueId * * @return $this */ - public function setName(?\SynergiTech\Staffology\Model\ContractRtiEmployeeName $name): static + public function setEmployeeUniqueId(?string $employeeUniqueId): static { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($employeeUniqueId)) { + throw new InvalidArgumentException('non-nullable employeeUniqueId cannot be null'); } - $this->container['name'] = $name; + $this->container['employeeUniqueId'] = $employeeUniqueId; return $this; } /** - * Gets tradingName + * Gets item * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractCisSubContractorItem|null */ - public function getTradingName(): ?string + public function getItem(): ?\SynergiTech\Staffology\Model\ContractCisSubContractorItem { - return $this->container['tradingName']; + return $this->container['item']; } /** - * Sets tradingName + * Sets item * - * @param string|null $tradingName tradingName + * @param \SynergiTech\Staffology\Model\ContractCisSubContractorItem|null $item item * * @return $this */ - public function setTradingName(?string $tradingName): static + public function setItem(?\SynergiTech\Staffology\Model\ContractCisSubContractorItem $item): static { - if (is_null($tradingName)) { - array_push($this->openAPINullablesSetToNull, 'tradingName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tradingName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($item)) { + throw new InvalidArgumentException('non-nullable item cannot be null'); } - $this->container['tradingName'] = $tradingName; + $this->container['item'] = $item; return $this; } /** - * Gets worksRef + * Gets matched * * @return string|null */ - public function getWorksRef(): ?string + public function getMatched(): ?string { - return $this->container['worksRef']; + return $this->container['matched']; } /** - * Sets worksRef + * Sets matched * - * @param string|null $worksRef worksRef + * @param string|null $matched matched * * @return $this */ - public function setWorksRef(?string $worksRef): static + public function setMatched(?string $matched): static { - if (is_null($worksRef)) { - array_push($this->openAPINullablesSetToNull, 'worksRef'); + if (is_null($matched)) { + array_push($this->openAPINullablesSetToNull, 'matched'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('worksRef', $nullablesSetToNull); + $index = array_search('matched', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['worksRef'] = $worksRef; + $this->container['matched'] = $matched; return $this; } /** - * Gets unmatchedRate + * Gets name * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractRtiEmployeeName|null */ - public function getUnmatchedRate(): ?string + public function getName(): ?\SynergiTech\Staffology\Model\ContractRtiEmployeeName { - return $this->container['unmatchedRate']; + return $this->container['name']; } /** - * Sets unmatchedRate + * Sets name * - * @param string|null $unmatchedRate unmatchedRate + * @param \SynergiTech\Staffology\Model\ContractRtiEmployeeName|null $name name * * @return $this */ - public function setUnmatchedRate(?string $unmatchedRate): static + public function setName(?\SynergiTech\Staffology\Model\ContractRtiEmployeeName $name): static { - if (is_null($unmatchedRate)) { - array_push($this->openAPINullablesSetToNull, 'unmatchedRate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('unmatchedRate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['unmatchedRate'] = $unmatchedRate; + $this->container['name'] = $name; return $this; } /** - * Gets utr + * Gets netPayment * * @return string|null */ - public function getUtr(): ?string + public function getNetPayment(): ?string { - return $this->container['utr']; + return $this->container['netPayment']; } /** - * Sets utr + * Sets netPayment * - * @param string|null $utr utr + * @param string|null $netPayment netPayment * * @return $this */ - public function setUtr(?string $utr): static + public function setNetPayment(?string $netPayment): static { - if (is_null($utr)) { - array_push($this->openAPINullablesSetToNull, 'utr'); + if (is_null($netPayment)) { + array_push($this->openAPINullablesSetToNull, 'netPayment'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('utr', $nullablesSetToNull); + $index = array_search('netPayment', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['utr'] = $utr; + $this->container['netPayment'] = $netPayment; return $this; } /** - * Gets crn + * Gets nino * * @return string|null */ - public function getCrn(): ?string + public function getNino(): ?string { - return $this->container['crn']; + return $this->container['nino']; } /** - * Sets crn + * Sets nino * - * @param string|null $crn crn + * @param string|null $nino nino * * @return $this */ - public function setCrn(?string $crn): static + public function setNino(?string $nino): static { - if (is_null($crn)) { - array_push($this->openAPINullablesSetToNull, 'crn'); + if (is_null($nino)) { + array_push($this->openAPINullablesSetToNull, 'nino'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('crn', $nullablesSetToNull); + $index = array_search('nino', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['crn'] = $crn; + $this->container['nino'] = $nino; return $this; } /** - * Gets nino + * Gets numberOfPayments * - * @return string|null + * @return int|null */ - public function getNino(): ?string + public function getNumberOfPayments(): ?int { - return $this->container['nino']; + return $this->container['numberOfPayments']; } /** - * Sets nino - * - * @param string|null $nino nino + * Sets numberOfPayments * - * @return $this - */ - public function setNino(?string $nino): static - { - if (is_null($nino)) { - array_push($this->openAPINullablesSetToNull, 'nino'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nino', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + * @param int|null $numberOfPayments numberOfPayments + * + * @return $this + */ + public function setNumberOfPayments(?int $numberOfPayments): static + { + if (is_null($numberOfPayments)) { + throw new InvalidArgumentException('non-nullable numberOfPayments cannot be null'); } - $this->container['nino'] = $nino; + $this->container['numberOfPayments'] = $numberOfPayments; return $this; } @@ -953,28 +946,35 @@ public function setPartnership(?\SynergiTech\Staffology\Model\ContractCisPartner } /** - * Gets address + * Gets taxTreatment * - * @return \SynergiTech\Staffology\Model\ContractRtiEmployeeAddress|null + * @return string|null */ - public function getAddress(): ?\SynergiTech\Staffology\Model\ContractRtiEmployeeAddress + public function getTaxTreatment(): ?string { - return $this->container['address']; + return $this->container['taxTreatment']; } /** - * Sets address + * Sets taxTreatment * - * @param \SynergiTech\Staffology\Model\ContractRtiEmployeeAddress|null $address address + * @param string|null $taxTreatment taxTreatment * * @return $this */ - public function setAddress(?\SynergiTech\Staffology\Model\ContractRtiEmployeeAddress $address): static + public function setTaxTreatment(?string $taxTreatment): static { - if (is_null($address)) { - throw new InvalidArgumentException('non-nullable address cannot be null'); + if (is_null($taxTreatment)) { + array_push($this->openAPINullablesSetToNull, 'taxTreatment'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('taxTreatment', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['address'] = $address; + $this->container['taxTreatment'] = $taxTreatment; return $this; } @@ -1014,375 +1014,375 @@ public function setTelephone(?string $telephone): static } /** - * Gets totalPaymentsUnrounded + * Gets totalDeducted * * @return string|null */ - public function getTotalPaymentsUnrounded(): ?string + public function getTotalDeducted(): ?string { - return $this->container['totalPaymentsUnrounded']; + return $this->container['totalDeducted']; } /** - * Sets totalPaymentsUnrounded + * Sets totalDeducted * - * @param string|null $totalPaymentsUnrounded totalPaymentsUnrounded + * @param string|null $totalDeducted totalDeducted * * @return $this */ - public function setTotalPaymentsUnrounded(?string $totalPaymentsUnrounded): static + public function setTotalDeducted(?string $totalDeducted): static { - if (is_null($totalPaymentsUnrounded)) { - array_push($this->openAPINullablesSetToNull, 'totalPaymentsUnrounded'); + if (is_null($totalDeducted)) { + array_push($this->openAPINullablesSetToNull, 'totalDeducted'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalPaymentsUnrounded', $nullablesSetToNull); + $index = array_search('totalDeducted', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['totalPaymentsUnrounded'] = $totalPaymentsUnrounded; + $this->container['totalDeducted'] = $totalDeducted; return $this; } /** - * Gets costOfMaterialsUnrounded + * Gets totalPayments * * @return string|null */ - public function getCostOfMaterialsUnrounded(): ?string + public function getTotalPayments(): ?string { - return $this->container['costOfMaterialsUnrounded']; + return $this->container['totalPayments']; } /** - * Sets costOfMaterialsUnrounded + * Sets totalPayments * - * @param string|null $costOfMaterialsUnrounded costOfMaterialsUnrounded + * @param string|null $totalPayments totalPayments * * @return $this */ - public function setCostOfMaterialsUnrounded(?string $costOfMaterialsUnrounded): static + public function setTotalPayments(?string $totalPayments): static { - if (is_null($costOfMaterialsUnrounded)) { - array_push($this->openAPINullablesSetToNull, 'costOfMaterialsUnrounded'); + if (is_null($totalPayments)) { + array_push($this->openAPINullablesSetToNull, 'totalPayments'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costOfMaterialsUnrounded', $nullablesSetToNull); + $index = array_search('totalPayments', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costOfMaterialsUnrounded'] = $costOfMaterialsUnrounded; + $this->container['totalPayments'] = $totalPayments; return $this; } /** - * Gets umbrellaFee + * Gets totalPaymentsUnrounded * * @return string|null */ - public function getUmbrellaFee(): ?string + public function getTotalPaymentsUnrounded(): ?string { - return $this->container['umbrellaFee']; + return $this->container['totalPaymentsUnrounded']; } /** - * Sets umbrellaFee + * Sets totalPaymentsUnrounded * - * @param string|null $umbrellaFee umbrellaFee + * @param string|null $totalPaymentsUnrounded totalPaymentsUnrounded * * @return $this */ - public function setUmbrellaFee(?string $umbrellaFee): static + public function setTotalPaymentsUnrounded(?string $totalPaymentsUnrounded): static { - if (is_null($umbrellaFee)) { - array_push($this->openAPINullablesSetToNull, 'umbrellaFee'); + if (is_null($totalPaymentsUnrounded)) { + array_push($this->openAPINullablesSetToNull, 'totalPaymentsUnrounded'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('umbrellaFee', $nullablesSetToNull); + $index = array_search('totalPaymentsUnrounded', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['umbrellaFee'] = $umbrellaFee; + $this->container['totalPaymentsUnrounded'] = $totalPaymentsUnrounded; return $this; } /** - * Gets validationMsg + * Gets tradingName * * @return string|null */ - public function getValidationMsg(): ?string + public function getTradingName(): ?string { - return $this->container['validationMsg']; + return $this->container['tradingName']; } /** - * Sets validationMsg + * Sets tradingName * - * @param string|null $validationMsg validationMsg + * @param string|null $tradingName tradingName * * @return $this */ - public function setValidationMsg(?string $validationMsg): static + public function setTradingName(?string $tradingName): static { - if (is_null($validationMsg)) { - array_push($this->openAPINullablesSetToNull, 'validationMsg'); + if (is_null($tradingName)) { + array_push($this->openAPINullablesSetToNull, 'tradingName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('validationMsg', $nullablesSetToNull); + $index = array_search('tradingName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['validationMsg'] = $validationMsg; + $this->container['tradingName'] = $tradingName; return $this; } /** - * Gets verificationNumber + * Gets type * * @return string|null */ - public function getVerificationNumber(): ?string + public function getType(): ?string { - return $this->container['verificationNumber']; + return $this->container['type']; } /** - * Sets verificationNumber + * Sets type * - * @param string|null $verificationNumber verificationNumber + * @param string|null $type type * * @return $this */ - public function setVerificationNumber(?string $verificationNumber): static + public function setType(?string $type): static { - if (is_null($verificationNumber)) { - array_push($this->openAPINullablesSetToNull, 'verificationNumber'); + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('verificationNumber', $nullablesSetToNull); + $index = array_search('type', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['verificationNumber'] = $verificationNumber; + $this->container['type'] = $type; return $this; } /** - * Gets totalPayments + * Gets umbrellaFee * * @return string|null */ - public function getTotalPayments(): ?string + public function getUmbrellaFee(): ?string { - return $this->container['totalPayments']; + return $this->container['umbrellaFee']; } /** - * Sets totalPayments + * Sets umbrellaFee * - * @param string|null $totalPayments totalPayments + * @param string|null $umbrellaFee umbrellaFee * * @return $this */ - public function setTotalPayments(?string $totalPayments): static + public function setUmbrellaFee(?string $umbrellaFee): static { - if (is_null($totalPayments)) { - array_push($this->openAPINullablesSetToNull, 'totalPayments'); + if (is_null($umbrellaFee)) { + array_push($this->openAPINullablesSetToNull, 'umbrellaFee'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalPayments', $nullablesSetToNull); + $index = array_search('umbrellaFee', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['totalPayments'] = $totalPayments; + $this->container['umbrellaFee'] = $umbrellaFee; return $this; } /** - * Gets costOfMaterials + * Gets unmatchedRate * * @return string|null */ - public function getCostOfMaterials(): ?string + public function getUnmatchedRate(): ?string { - return $this->container['costOfMaterials']; + return $this->container['unmatchedRate']; } /** - * Sets costOfMaterials + * Sets unmatchedRate * - * @param string|null $costOfMaterials costOfMaterials + * @param string|null $unmatchedRate unmatchedRate * * @return $this */ - public function setCostOfMaterials(?string $costOfMaterials): static + public function setUnmatchedRate(?string $unmatchedRate): static { - if (is_null($costOfMaterials)) { - array_push($this->openAPINullablesSetToNull, 'costOfMaterials'); + if (is_null($unmatchedRate)) { + array_push($this->openAPINullablesSetToNull, 'unmatchedRate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costOfMaterials', $nullablesSetToNull); + $index = array_search('unmatchedRate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costOfMaterials'] = $costOfMaterials; + $this->container['unmatchedRate'] = $unmatchedRate; return $this; } /** - * Gets totalDeducted + * Gets utr * * @return string|null */ - public function getTotalDeducted(): ?string + public function getUtr(): ?string { - return $this->container['totalDeducted']; + return $this->container['utr']; } /** - * Sets totalDeducted + * Sets utr * - * @param string|null $totalDeducted totalDeducted + * @param string|null $utr utr * * @return $this */ - public function setTotalDeducted(?string $totalDeducted): static + public function setUtr(?string $utr): static { - if (is_null($totalDeducted)) { - array_push($this->openAPINullablesSetToNull, 'totalDeducted'); + if (is_null($utr)) { + array_push($this->openAPINullablesSetToNull, 'utr'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalDeducted', $nullablesSetToNull); + $index = array_search('utr', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['totalDeducted'] = $totalDeducted; + $this->container['utr'] = $utr; return $this; } /** - * Gets matched + * Gets validationMsg * * @return string|null */ - public function getMatched(): ?string + public function getValidationMsg(): ?string { - return $this->container['matched']; + return $this->container['validationMsg']; } /** - * Sets matched + * Sets validationMsg * - * @param string|null $matched matched + * @param string|null $validationMsg validationMsg * * @return $this */ - public function setMatched(?string $matched): static + public function setValidationMsg(?string $validationMsg): static { - if (is_null($matched)) { - array_push($this->openAPINullablesSetToNull, 'matched'); + if (is_null($validationMsg)) { + array_push($this->openAPINullablesSetToNull, 'validationMsg'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('matched', $nullablesSetToNull); + $index = array_search('validationMsg', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['matched'] = $matched; + $this->container['validationMsg'] = $validationMsg; return $this; } /** - * Gets taxTreatment + * Gets verificationNumber * * @return string|null */ - public function getTaxTreatment(): ?string + public function getVerificationNumber(): ?string { - return $this->container['taxTreatment']; + return $this->container['verificationNumber']; } /** - * Sets taxTreatment + * Sets verificationNumber * - * @param string|null $taxTreatment taxTreatment + * @param string|null $verificationNumber verificationNumber * * @return $this */ - public function setTaxTreatment(?string $taxTreatment): static + public function setVerificationNumber(?string $verificationNumber): static { - if (is_null($taxTreatment)) { - array_push($this->openAPINullablesSetToNull, 'taxTreatment'); + if (is_null($verificationNumber)) { + array_push($this->openAPINullablesSetToNull, 'verificationNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxTreatment', $nullablesSetToNull); + $index = array_search('verificationNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxTreatment'] = $taxTreatment; + $this->container['verificationNumber'] = $verificationNumber; return $this; } /** - * Gets netPayment + * Gets worksRef * * @return string|null */ - public function getNetPayment(): ?string + public function getWorksRef(): ?string { - return $this->container['netPayment']; + return $this->container['worksRef']; } /** - * Sets netPayment + * Sets worksRef * - * @param string|null $netPayment netPayment + * @param string|null $worksRef worksRef * * @return $this */ - public function setNetPayment(?string $netPayment): static + public function setWorksRef(?string $worksRef): static { - if (is_null($netPayment)) { - array_push($this->openAPINullablesSetToNull, 'netPayment'); + if (is_null($worksRef)) { + array_push($this->openAPINullablesSetToNull, 'worksRef'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('netPayment', $nullablesSetToNull); + $index = array_search('worksRef', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['netPayment'] = $netPayment; + $this->container['worksRef'] = $worksRef; return $this; } diff --git a/src/Model/ContractCisSubContractorItem.php b/src/Model/ContractCisSubContractorItem.php index 4939834..40a95ea 100644 --- a/src/Model/ContractCisSubContractorItem.php +++ b/src/Model/ContractCisSubContractorItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class ContractCisSubContractorItem implements ModelInterface, ArrayAccess, JsonS */ protected static array $openAPITypes = [ 'id' => 'string', - 'name' => 'string', 'metadata' => 'mixed', + 'name' => 'string', 'url' => 'string' ]; @@ -72,8 +72,8 @@ class ContractCisSubContractorItem implements ModelInterface, ArrayAccess, JsonS */ protected static array $openAPIFormats = [ 'id' => 'uuid', - 'name' => null, 'metadata' => null, + 'name' => null, 'url' => null ]; @@ -84,8 +84,8 @@ class ContractCisSubContractorItem implements ModelInterface, ArrayAccess, JsonS */ protected static array $openAPINullables = [ 'id' => false, - 'name' => true, 'metadata' => true, + 'name' => true, 'url' => true ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'id' => 'id', - 'name' => 'name', 'metadata' => 'metadata', + 'name' => 'name', 'url' => 'url' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'id' => 'setId', - 'name' => 'setName', 'metadata' => 'setMetadata', + 'name' => 'setName', 'url' => 'setUrl' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'id' => 'getId', - 'name' => 'getName', 'metadata' => 'getMetadata', + 'name' => 'getName', 'url' => 'getUrl' ]; @@ -262,8 +262,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); } @@ -337,69 +337,69 @@ public function setId(?string $id): static } /** - * Gets name + * Gets metadata * - * @return string|null + * @return mixed|null */ - public function getName(): ?string + public function getMetadata(): mixed { - return $this->container['name']; + return $this->container['metadata']; } /** - * Sets name + * Sets metadata * - * @param string|null $name name + * @param mixed|null $metadata metadata * * @return $this */ - public function setName(?string $name): static + public function setMetadata(mixed $metadata): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($metadata)) { + array_push($this->openAPINullablesSetToNull, 'metadata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('metadata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['metadata'] = $metadata; return $this; } /** - * Gets metadata + * Gets name * - * @return mixed|null + * @return string|null */ - public function getMetadata(): mixed + public function getName(): ?string { - return $this->container['metadata']; + return $this->container['name']; } /** - * Sets metadata + * Sets name * - * @param mixed|null $metadata metadata + * @param string|null $name name * * @return $this */ - public function setMetadata(mixed $metadata): static + public function setName(?string $name): static { - if (is_null($metadata)) { - array_push($this->openAPINullablesSetToNull, 'metadata'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('metadata', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['metadata'] = $metadata; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/ContractCisVerificationDetailsRequest.php b/src/Model/ContractCisVerificationDetailsRequest.php index eee9f37..0f409f3 100644 --- a/src/Model/ContractCisVerificationDetailsRequest.php +++ b/src/Model/ContractCisVerificationDetailsRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractCisVerificationDetailsRequest implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPITypes = [ + 'date' => '\DateTime', 'manuallyEntered' => 'bool', 'matchInsteadOfVerify' => 'bool', 'number' => 'string', - 'date' => '\DateTime', 'taxStatus' => '\SynergiTech\Staffology\Model\CISTaxStatus', 'verificationResponse' => '\SynergiTech\Staffology\Model\ContractCisSubContractor' ]; @@ -73,10 +73,10 @@ class ContractCisVerificationDetailsRequest implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPIFormats = [ + 'date' => 'date', 'manuallyEntered' => null, 'matchInsteadOfVerify' => null, 'number' => null, - 'date' => 'date', 'taxStatus' => null, 'verificationResponse' => null ]; @@ -87,10 +87,10 @@ class ContractCisVerificationDetailsRequest implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPINullables = [ + 'date' => true, 'manuallyEntered' => false, 'matchInsteadOfVerify' => false, 'number' => true, - 'date' => true, 'taxStatus' => false, 'verificationResponse' => false ]; @@ -181,10 +181,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'date' => 'date', 'manuallyEntered' => 'manuallyEntered', 'matchInsteadOfVerify' => 'matchInsteadOfVerify', 'number' => 'number', - 'date' => 'date', 'taxStatus' => 'taxStatus', 'verificationResponse' => 'verificationResponse' ]; @@ -195,10 +195,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'date' => 'setDate', 'manuallyEntered' => 'setManuallyEntered', 'matchInsteadOfVerify' => 'setMatchInsteadOfVerify', 'number' => 'setNumber', - 'date' => 'setDate', 'taxStatus' => 'setTaxStatus', 'verificationResponse' => 'setVerificationResponse' ]; @@ -209,10 +209,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'date' => 'getDate', 'manuallyEntered' => 'getManuallyEntered', 'matchInsteadOfVerify' => 'getMatchInsteadOfVerify', 'number' => 'getNumber', - 'date' => 'getDate', 'taxStatus' => 'getTaxStatus', 'verificationResponse' => 'getVerificationResponse' ]; @@ -273,10 +273,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('date', $data ?? [], null); $this->setIfExists('manuallyEntered', $data ?? [], null); $this->setIfExists('matchInsteadOfVerify', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); - $this->setIfExists('date', $data ?? [], null); $this->setIfExists('taxStatus', $data ?? [], null); $this->setIfExists('verificationResponse', $data ?? [], null); } @@ -323,6 +323,40 @@ public function valid(): bool } + /** + * Gets date + * + * @return \DateTime|null + */ + public function getDate(): ?\DateTime + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param \DateTime|null $date date + * + * @return $this + */ + public function setDate(?\DateTime $date): static + { + if (is_null($date)) { + array_push($this->openAPINullablesSetToNull, 'date'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('date', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['date'] = $date; + + return $this; + } + /** * Gets manuallyEntered * @@ -411,40 +445,6 @@ public function setNumber(?string $number): static return $this; } - /** - * Gets date - * - * @return \DateTime|null - */ - public function getDate(): ?\DateTime - { - return $this->container['date']; - } - - /** - * Sets date - * - * @param \DateTime|null $date date - * - * @return $this - */ - public function setDate(?\DateTime $date): static - { - if (is_null($date)) { - array_push($this->openAPINullablesSetToNull, 'date'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('date', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['date'] = $date; - - return $this; - } - /** * Gets taxStatus * diff --git a/src/Model/ContractCisVerificationDetailsResponse.php b/src/Model/ContractCisVerificationDetailsResponse.php index 467ecc1..63369c4 100644 --- a/src/Model/ContractCisVerificationDetailsResponse.php +++ b/src/Model/ContractCisVerificationDetailsResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class ContractCisVerificationDetailsResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPITypes = [ - 'verificationRequest' => 'string', + 'date' => '\DateTime', 'manuallyEntered' => 'bool', 'matchInsteadOfVerify' => 'bool', 'number' => 'string', - 'date' => '\DateTime', 'taxStatus' => '\SynergiTech\Staffology\Model\CISTaxStatus', + 'verificationRequest' => 'string', 'verificationResponse' => '\SynergiTech\Staffology\Model\ContractCisSubContractor' ]; @@ -74,12 +74,12 @@ class ContractCisVerificationDetailsResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPIFormats = [ - 'verificationRequest' => 'uuid', + 'date' => 'date', 'manuallyEntered' => null, 'matchInsteadOfVerify' => null, 'number' => null, - 'date' => 'date', 'taxStatus' => null, + 'verificationRequest' => 'uuid', 'verificationResponse' => null ]; @@ -89,12 +89,12 @@ class ContractCisVerificationDetailsResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPINullables = [ - 'verificationRequest' => true, + 'date' => true, 'manuallyEntered' => false, 'matchInsteadOfVerify' => false, 'number' => true, - 'date' => true, 'taxStatus' => false, + 'verificationRequest' => true, 'verificationResponse' => false ]; @@ -184,12 +184,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'verificationRequest' => 'verificationRequest', + 'date' => 'date', 'manuallyEntered' => 'manuallyEntered', 'matchInsteadOfVerify' => 'matchInsteadOfVerify', 'number' => 'number', - 'date' => 'date', 'taxStatus' => 'taxStatus', + 'verificationRequest' => 'verificationRequest', 'verificationResponse' => 'verificationResponse' ]; @@ -199,12 +199,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'verificationRequest' => 'setVerificationRequest', + 'date' => 'setDate', 'manuallyEntered' => 'setManuallyEntered', 'matchInsteadOfVerify' => 'setMatchInsteadOfVerify', 'number' => 'setNumber', - 'date' => 'setDate', 'taxStatus' => 'setTaxStatus', + 'verificationRequest' => 'setVerificationRequest', 'verificationResponse' => 'setVerificationResponse' ]; @@ -214,12 +214,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'verificationRequest' => 'getVerificationRequest', + 'date' => 'getDate', 'manuallyEntered' => 'getManuallyEntered', 'matchInsteadOfVerify' => 'getMatchInsteadOfVerify', 'number' => 'getNumber', - 'date' => 'getDate', 'taxStatus' => 'getTaxStatus', + 'verificationRequest' => 'getVerificationRequest', 'verificationResponse' => 'getVerificationResponse' ]; @@ -279,12 +279,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('verificationRequest', $data ?? [], null); + $this->setIfExists('date', $data ?? [], null); $this->setIfExists('manuallyEntered', $data ?? [], null); $this->setIfExists('matchInsteadOfVerify', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); - $this->setIfExists('date', $data ?? [], null); $this->setIfExists('taxStatus', $data ?? [], null); + $this->setIfExists('verificationRequest', $data ?? [], null); $this->setIfExists('verificationResponse', $data ?? [], null); } @@ -331,35 +331,35 @@ public function valid(): bool /** - * Gets verificationRequest + * Gets date * - * @return string|null + * @return \DateTime|null */ - public function getVerificationRequest(): ?string + public function getDate(): ?\DateTime { - return $this->container['verificationRequest']; + return $this->container['date']; } /** - * Sets verificationRequest + * Sets date * - * @param string|null $verificationRequest If a Verification request has been made for this employee then this will show its ID + * @param \DateTime|null $date date * * @return $this */ - public function setVerificationRequest(?string $verificationRequest): static + public function setDate(?\DateTime $date): static { - if (is_null($verificationRequest)) { - array_push($this->openAPINullablesSetToNull, 'verificationRequest'); + if (is_null($date)) { + array_push($this->openAPINullablesSetToNull, 'date'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('verificationRequest', $nullablesSetToNull); + $index = array_search('date', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['verificationRequest'] = $verificationRequest; + $this->container['date'] = $date; return $this; } @@ -453,62 +453,62 @@ public function setNumber(?string $number): static } /** - * Gets date + * Gets taxStatus * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\CISTaxStatus|null */ - public function getDate(): ?\DateTime + public function getTaxStatus(): ?\SynergiTech\Staffology\Model\CISTaxStatus { - return $this->container['date']; + return $this->container['taxStatus']; } /** - * Sets date + * Sets taxStatus * - * @param \DateTime|null $date date + * @param \SynergiTech\Staffology\Model\CISTaxStatus|null $taxStatus taxStatus * * @return $this */ - public function setDate(?\DateTime $date): static + public function setTaxStatus(?\SynergiTech\Staffology\Model\CISTaxStatus $taxStatus): static { - if (is_null($date)) { - array_push($this->openAPINullablesSetToNull, 'date'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('date', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($taxStatus)) { + throw new InvalidArgumentException('non-nullable taxStatus cannot be null'); } - $this->container['date'] = $date; + $this->container['taxStatus'] = $taxStatus; return $this; } /** - * Gets taxStatus + * Gets verificationRequest * - * @return \SynergiTech\Staffology\Model\CISTaxStatus|null + * @return string|null */ - public function getTaxStatus(): ?\SynergiTech\Staffology\Model\CISTaxStatus + public function getVerificationRequest(): ?string { - return $this->container['taxStatus']; + return $this->container['verificationRequest']; } /** - * Sets taxStatus + * Sets verificationRequest * - * @param \SynergiTech\Staffology\Model\CISTaxStatus|null $taxStatus taxStatus + * @param string|null $verificationRequest If a Verification request has been made for this employee then this will show its ID * * @return $this */ - public function setTaxStatus(?\SynergiTech\Staffology\Model\CISTaxStatus $taxStatus): static + public function setVerificationRequest(?string $verificationRequest): static { - if (is_null($taxStatus)) { - throw new InvalidArgumentException('non-nullable taxStatus cannot be null'); + if (is_null($verificationRequest)) { + array_push($this->openAPINullablesSetToNull, 'verificationRequest'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('verificationRequest', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['taxStatus'] = $taxStatus; + $this->container['verificationRequest'] = $verificationRequest; return $this; } diff --git a/src/Model/ContractCombinedPensionContributionsReportRequest.php b/src/Model/ContractCombinedPensionContributionsReportRequest.php new file mode 100644 index 0000000..f824ed7 --- /dev/null +++ b/src/Model/ContractCombinedPensionContributionsReportRequest.php @@ -0,0 +1,551 @@ + + */ +class ContractCombinedPensionContributionsReportRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.CombinedPensionContributionsReportRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'effectiveDateFrom' => '\DateTime', + 'effectiveDateTo' => '\DateTime', + 'payScheduleSelections' => '\SynergiTech\Staffology\Model\ContractPayPeriodOrdinalSelection[]', + 'pensionSchemeId' => 'string', + 'reportFormat' => '\SynergiTech\Staffology\Model\ReportFormat' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'effectiveDateFrom' => 'date', + 'effectiveDateTo' => 'date', + 'payScheduleSelections' => null, + 'pensionSchemeId' => 'uuid', + 'reportFormat' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'effectiveDateFrom' => false, + 'effectiveDateTo' => false, + 'payScheduleSelections' => true, + 'pensionSchemeId' => false, + 'reportFormat' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'effectiveDateFrom' => 'effectiveDateFrom', + 'effectiveDateTo' => 'effectiveDateTo', + 'payScheduleSelections' => 'payScheduleSelections', + 'pensionSchemeId' => 'pensionSchemeId', + 'reportFormat' => 'reportFormat' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'effectiveDateFrom' => 'setEffectiveDateFrom', + 'effectiveDateTo' => 'setEffectiveDateTo', + 'payScheduleSelections' => 'setPayScheduleSelections', + 'pensionSchemeId' => 'setPensionSchemeId', + 'reportFormat' => 'setReportFormat' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'effectiveDateFrom' => 'getEffectiveDateFrom', + 'effectiveDateTo' => 'getEffectiveDateTo', + 'payScheduleSelections' => 'getPayScheduleSelections', + 'pensionSchemeId' => 'getPensionSchemeId', + 'reportFormat' => 'getReportFormat' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('effectiveDateFrom', $data ?? [], null); + $this->setIfExists('effectiveDateTo', $data ?? [], null); + $this->setIfExists('payScheduleSelections', $data ?? [], null); + $this->setIfExists('pensionSchemeId', $data ?? [], null); + $this->setIfExists('reportFormat', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets effectiveDateFrom + * + * @return \DateTime|null + */ + public function getEffectiveDateFrom(): ?\DateTime + { + return $this->container['effectiveDateFrom']; + } + + /** + * Sets effectiveDateFrom + * + * @param \DateTime|null $effectiveDateFrom effectiveDateFrom + * + * @return $this + */ + public function setEffectiveDateFrom(?\DateTime $effectiveDateFrom): static + { + if (is_null($effectiveDateFrom)) { + throw new InvalidArgumentException('non-nullable effectiveDateFrom cannot be null'); + } + $this->container['effectiveDateFrom'] = $effectiveDateFrom; + + return $this; + } + + /** + * Gets effectiveDateTo + * + * @return \DateTime|null + */ + public function getEffectiveDateTo(): ?\DateTime + { + return $this->container['effectiveDateTo']; + } + + /** + * Sets effectiveDateTo + * + * @param \DateTime|null $effectiveDateTo effectiveDateTo + * + * @return $this + */ + public function setEffectiveDateTo(?\DateTime $effectiveDateTo): static + { + if (is_null($effectiveDateTo)) { + throw new InvalidArgumentException('non-nullable effectiveDateTo cannot be null'); + } + $this->container['effectiveDateTo'] = $effectiveDateTo; + + return $this; + } + + /** + * Gets payScheduleSelections + * + * @return \SynergiTech\Staffology\Model\ContractPayPeriodOrdinalSelection[]|null + */ + public function getPayScheduleSelections(): ?array + { + return $this->container['payScheduleSelections']; + } + + /** + * Sets payScheduleSelections + * + * @param \SynergiTech\Staffology\Model\ContractPayPeriodOrdinalSelection[]|null $payScheduleSelections payScheduleSelections + * + * @return $this + */ + public function setPayScheduleSelections(?array $payScheduleSelections): static + { + if (is_null($payScheduleSelections)) { + array_push($this->openAPINullablesSetToNull, 'payScheduleSelections'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payScheduleSelections', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payScheduleSelections'] = $payScheduleSelections; + + return $this; + } + + /** + * Gets pensionSchemeId + * + * @return string|null + */ + public function getPensionSchemeId(): ?string + { + return $this->container['pensionSchemeId']; + } + + /** + * Sets pensionSchemeId + * + * @param string|null $pensionSchemeId pensionSchemeId + * + * @return $this + */ + public function setPensionSchemeId(?string $pensionSchemeId): static + { + if (is_null($pensionSchemeId)) { + throw new InvalidArgumentException('non-nullable pensionSchemeId cannot be null'); + } + $this->container['pensionSchemeId'] = $pensionSchemeId; + + return $this; + } + + /** + * Gets reportFormat + * + * @return \SynergiTech\Staffology\Model\ReportFormat|null + */ + public function getReportFormat(): ?\SynergiTech\Staffology\Model\ReportFormat + { + return $this->container['reportFormat']; + } + + /** + * Sets reportFormat + * + * @param \SynergiTech\Staffology\Model\ReportFormat|null $reportFormat reportFormat + * + * @return $this + */ + public function setReportFormat(?\SynergiTech\Staffology\Model\ReportFormat $reportFormat): static + { + if (is_null($reportFormat)) { + throw new InvalidArgumentException('non-nullable reportFormat cannot be null'); + } + $this->container['reportFormat'] = $reportFormat; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractCostCentreJournalOverridesRequest.php b/src/Model/ContractCostCentreJournalOverridesRequest.php index 6cfc56d..6852d72 100644 --- a/src/Model/ContractCostCentreJournalOverridesRequest.php +++ b/src/Model/ContractCostCentreJournalOverridesRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractCostCentreJournalOverridesRequest implements ModelInterface, Array * @var array */ protected static array $openAPITypes = [ - 'tokenDescription' => 'string', + 'journalTokenPublicId' => 'string', 'mapping' => 'string', - 'journalTokenPublicId' => 'string' + 'tokenDescription' => 'string' ]; /** @@ -70,9 +70,9 @@ class ContractCostCentreJournalOverridesRequest implements ModelInterface, Array * @var array */ protected static array $openAPIFormats = [ - 'tokenDescription' => null, + 'journalTokenPublicId' => 'uuid', 'mapping' => null, - 'journalTokenPublicId' => 'uuid' + 'tokenDescription' => null ]; /** @@ -81,9 +81,9 @@ class ContractCostCentreJournalOverridesRequest implements ModelInterface, Array * @var array */ protected static array $openAPINullables = [ - 'tokenDescription' => true, + 'journalTokenPublicId' => false, 'mapping' => true, - 'journalTokenPublicId' => false + 'tokenDescription' => true ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'tokenDescription' => 'tokenDescription', + 'journalTokenPublicId' => 'journalTokenPublicId', 'mapping' => 'mapping', - 'journalTokenPublicId' => 'journalTokenPublicId' + 'tokenDescription' => 'tokenDescription' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'tokenDescription' => 'setTokenDescription', + 'journalTokenPublicId' => 'setJournalTokenPublicId', 'mapping' => 'setMapping', - 'journalTokenPublicId' => 'setJournalTokenPublicId' + 'tokenDescription' => 'setTokenDescription' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'tokenDescription' => 'getTokenDescription', + 'journalTokenPublicId' => 'getJournalTokenPublicId', 'mapping' => 'getMapping', - 'journalTokenPublicId' => 'getJournalTokenPublicId' + 'tokenDescription' => 'getTokenDescription' ]; /** @@ -255,9 +255,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('tokenDescription', $data ?? [], null); - $this->setIfExists('mapping', $data ?? [], null); $this->setIfExists('journalTokenPublicId', $data ?? [], null); + $this->setIfExists('mapping', $data ?? [], null); + $this->setIfExists('tokenDescription', $data ?? [], null); } /** @@ -303,35 +303,28 @@ public function valid(): bool /** - * Gets tokenDescription + * Gets journalTokenPublicId * * @return string|null */ - public function getTokenDescription(): ?string + public function getJournalTokenPublicId(): ?string { - return $this->container['tokenDescription']; + return $this->container['journalTokenPublicId']; } /** - * Sets tokenDescription + * Sets journalTokenPublicId * - * @param string|null $tokenDescription Token Description + * @param string|null $journalTokenPublicId Journal Token Public Id * * @return $this */ - public function setTokenDescription(?string $tokenDescription): static + public function setJournalTokenPublicId(?string $journalTokenPublicId): static { - if (is_null($tokenDescription)) { - array_push($this->openAPINullablesSetToNull, 'tokenDescription'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tokenDescription', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($journalTokenPublicId)) { + throw new InvalidArgumentException('non-nullable journalTokenPublicId cannot be null'); } - $this->container['tokenDescription'] = $tokenDescription; + $this->container['journalTokenPublicId'] = $journalTokenPublicId; return $this; } @@ -371,28 +364,35 @@ public function setMapping(?string $mapping): static } /** - * Gets journalTokenPublicId + * Gets tokenDescription * * @return string|null */ - public function getJournalTokenPublicId(): ?string + public function getTokenDescription(): ?string { - return $this->container['journalTokenPublicId']; + return $this->container['tokenDescription']; } /** - * Sets journalTokenPublicId + * Sets tokenDescription * - * @param string|null $journalTokenPublicId Journal Token Public Id + * @param string|null $tokenDescription Token Description * * @return $this */ - public function setJournalTokenPublicId(?string $journalTokenPublicId): static + public function setTokenDescription(?string $tokenDescription): static { - if (is_null($journalTokenPublicId)) { - throw new InvalidArgumentException('non-nullable journalTokenPublicId cannot be null'); + if (is_null($tokenDescription)) { + array_push($this->openAPINullablesSetToNull, 'tokenDescription'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tokenDescription', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['journalTokenPublicId'] = $journalTokenPublicId; + $this->container['tokenDescription'] = $tokenDescription; return $this; } diff --git a/src/Model/ContractCostCentreJournalOverridesResponse.php b/src/Model/ContractCostCentreJournalOverridesResponse.php index 64fdbfb..6100b3b 100644 --- a/src/Model/ContractCostCentreJournalOverridesResponse.php +++ b/src/Model/ContractCostCentreJournalOverridesResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractCostCentreJournalOverridesResponse implements ModelInterface, Arra * @var array */ protected static array $openAPITypes = [ - 'uniqueId' => 'string', - 'tokenDescription' => 'string', + 'journalTokenPublicId' => 'string', 'mapping' => 'string', - 'journalTokenPublicId' => 'string' + 'tokenDescription' => 'string', + 'uniqueId' => 'string' ]; /** @@ -71,10 +71,10 @@ class ContractCostCentreJournalOverridesResponse implements ModelInterface, Arra * @var array */ protected static array $openAPIFormats = [ - 'uniqueId' => 'uuid', - 'tokenDescription' => null, + 'journalTokenPublicId' => 'uuid', 'mapping' => null, - 'journalTokenPublicId' => 'uuid' + 'tokenDescription' => null, + 'uniqueId' => 'uuid' ]; /** @@ -83,10 +83,10 @@ class ContractCostCentreJournalOverridesResponse implements ModelInterface, Arra * @var array */ protected static array $openAPINullables = [ - 'uniqueId' => false, - 'tokenDescription' => true, + 'journalTokenPublicId' => false, 'mapping' => true, - 'journalTokenPublicId' => false + 'tokenDescription' => true, + 'uniqueId' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'uniqueId' => 'uniqueId', - 'tokenDescription' => 'tokenDescription', + 'journalTokenPublicId' => 'journalTokenPublicId', 'mapping' => 'mapping', - 'journalTokenPublicId' => 'journalTokenPublicId' + 'tokenDescription' => 'tokenDescription', + 'uniqueId' => 'uniqueId' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'uniqueId' => 'setUniqueId', - 'tokenDescription' => 'setTokenDescription', + 'journalTokenPublicId' => 'setJournalTokenPublicId', 'mapping' => 'setMapping', - 'journalTokenPublicId' => 'setJournalTokenPublicId' + 'tokenDescription' => 'setTokenDescription', + 'uniqueId' => 'setUniqueId' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'uniqueId' => 'getUniqueId', - 'tokenDescription' => 'getTokenDescription', + 'journalTokenPublicId' => 'getJournalTokenPublicId', 'mapping' => 'getMapping', - 'journalTokenPublicId' => 'getJournalTokenPublicId' + 'tokenDescription' => 'getTokenDescription', + 'uniqueId' => 'getUniqueId' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('uniqueId', $data ?? [], null); - $this->setIfExists('tokenDescription', $data ?? [], null); - $this->setIfExists('mapping', $data ?? [], null); $this->setIfExists('journalTokenPublicId', $data ?? [], null); + $this->setIfExists('mapping', $data ?? [], null); + $this->setIfExists('tokenDescription', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); } /** @@ -310,123 +310,123 @@ public function valid(): bool /** - * Gets uniqueId + * Gets journalTokenPublicId * * @return string|null */ - public function getUniqueId(): ?string + public function getJournalTokenPublicId(): ?string { - return $this->container['uniqueId']; + return $this->container['journalTokenPublicId']; } /** - * Sets uniqueId + * Sets journalTokenPublicId * - * @param string|null $uniqueId Cost Centre Journal Overrides identifier + * @param string|null $journalTokenPublicId Journal Token Public Id * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setJournalTokenPublicId(?string $journalTokenPublicId): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($journalTokenPublicId)) { + throw new InvalidArgumentException('non-nullable journalTokenPublicId cannot be null'); } - $this->container['uniqueId'] = $uniqueId; + $this->container['journalTokenPublicId'] = $journalTokenPublicId; return $this; } /** - * Gets tokenDescription + * Gets mapping * * @return string|null */ - public function getTokenDescription(): ?string + public function getMapping(): ?string { - return $this->container['tokenDescription']; + return $this->container['mapping']; } /** - * Sets tokenDescription + * Sets mapping * - * @param string|null $tokenDescription Token Description + * @param string|null $mapping CostCentre Journal Overrides Mapping * * @return $this */ - public function setTokenDescription(?string $tokenDescription): static + public function setMapping(?string $mapping): static { - if (is_null($tokenDescription)) { - array_push($this->openAPINullablesSetToNull, 'tokenDescription'); + if (is_null($mapping)) { + array_push($this->openAPINullablesSetToNull, 'mapping'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tokenDescription', $nullablesSetToNull); + $index = array_search('mapping', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tokenDescription'] = $tokenDescription; + $this->container['mapping'] = $mapping; return $this; } /** - * Gets mapping + * Gets tokenDescription * * @return string|null */ - public function getMapping(): ?string + public function getTokenDescription(): ?string { - return $this->container['mapping']; + return $this->container['tokenDescription']; } /** - * Sets mapping + * Sets tokenDescription * - * @param string|null $mapping CostCentre Journal Overrides Mapping + * @param string|null $tokenDescription Token Description * * @return $this */ - public function setMapping(?string $mapping): static + public function setTokenDescription(?string $tokenDescription): static { - if (is_null($mapping)) { - array_push($this->openAPINullablesSetToNull, 'mapping'); + if (is_null($tokenDescription)) { + array_push($this->openAPINullablesSetToNull, 'tokenDescription'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mapping', $nullablesSetToNull); + $index = array_search('tokenDescription', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['mapping'] = $mapping; + $this->container['tokenDescription'] = $tokenDescription; return $this; } /** - * Gets journalTokenPublicId + * Gets uniqueId * * @return string|null */ - public function getJournalTokenPublicId(): ?string + public function getUniqueId(): ?string { - return $this->container['journalTokenPublicId']; + return $this->container['uniqueId']; } /** - * Sets journalTokenPublicId + * Sets uniqueId * - * @param string|null $journalTokenPublicId Journal Token Public Id + * @param string|null $uniqueId Cost Centre Journal Overrides identifier * * @return $this */ - public function setJournalTokenPublicId(?string $journalTokenPublicId): static + public function setUniqueId(?string $uniqueId): static { - if (is_null($journalTokenPublicId)) { - throw new InvalidArgumentException('non-nullable journalTokenPublicId cannot be null'); + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); } - $this->container['journalTokenPublicId'] = $journalTokenPublicId; + $this->container['uniqueId'] = $uniqueId; return $this; } diff --git a/src/Model/ContractCostCentreJournalOverridesResponseItem.php b/src/Model/ContractCostCentreJournalOverridesResponseItem.php index 5d80514..39d3c45 100644 --- a/src/Model/ContractCostCentreJournalOverridesResponseItem.php +++ b/src/Model/ContractCostCentreJournalOverridesResponseItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class ContractCostCentreJournalOverridesResponseItem implements ModelInterface, */ protected static array $openAPITypes = [ 'id' => 'string', - 'name' => 'string', 'metadata' => 'mixed', + 'name' => 'string', 'url' => 'string' ]; @@ -72,8 +72,8 @@ class ContractCostCentreJournalOverridesResponseItem implements ModelInterface, */ protected static array $openAPIFormats = [ 'id' => 'uuid', - 'name' => null, 'metadata' => null, + 'name' => null, 'url' => null ]; @@ -84,8 +84,8 @@ class ContractCostCentreJournalOverridesResponseItem implements ModelInterface, */ protected static array $openAPINullables = [ 'id' => false, - 'name' => true, 'metadata' => true, + 'name' => true, 'url' => true ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'id' => 'id', - 'name' => 'name', 'metadata' => 'metadata', + 'name' => 'name', 'url' => 'url' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'id' => 'setId', - 'name' => 'setName', 'metadata' => 'setMetadata', + 'name' => 'setName', 'url' => 'setUrl' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'id' => 'getId', - 'name' => 'getName', 'metadata' => 'getMetadata', + 'name' => 'getName', 'url' => 'getUrl' ]; @@ -262,8 +262,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); } @@ -337,69 +337,69 @@ public function setId(?string $id): static } /** - * Gets name + * Gets metadata * - * @return string|null + * @return mixed|null */ - public function getName(): ?string + public function getMetadata(): mixed { - return $this->container['name']; + return $this->container['metadata']; } /** - * Sets name + * Sets metadata * - * @param string|null $name name + * @param mixed|null $metadata metadata * * @return $this */ - public function setName(?string $name): static + public function setMetadata(mixed $metadata): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($metadata)) { + array_push($this->openAPINullablesSetToNull, 'metadata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('metadata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['metadata'] = $metadata; return $this; } /** - * Gets metadata + * Gets name * - * @return mixed|null + * @return string|null */ - public function getMetadata(): mixed + public function getName(): ?string { - return $this->container['metadata']; + return $this->container['name']; } /** - * Sets metadata + * Sets name * - * @param mixed|null $metadata metadata + * @param string|null $name name * * @return $this */ - public function setMetadata(mixed $metadata): static + public function setName(?string $name): static { - if (is_null($metadata)) { - array_push($this->openAPINullablesSetToNull, 'metadata'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('metadata', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['metadata'] = $metadata; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/ContractCostCentreJournalOverridesUpdateRequest.php b/src/Model/ContractCostCentreJournalOverridesUpdateRequest.php index 99e7fab..b08f45b 100644 --- a/src/Model/ContractCostCentreJournalOverridesUpdateRequest.php +++ b/src/Model/ContractCostCentreJournalOverridesUpdateRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractCostCentreJournalOverridesUpdateRequest implements ModelInterface, * @var array */ protected static array $openAPITypes = [ - 'uniqueId' => 'string', - 'tokenDescription' => 'string', + 'journalTokenPublicId' => 'string', 'mapping' => 'string', - 'journalTokenPublicId' => 'string' + 'tokenDescription' => 'string', + 'uniqueId' => 'string' ]; /** @@ -71,10 +71,10 @@ class ContractCostCentreJournalOverridesUpdateRequest implements ModelInterface, * @var array */ protected static array $openAPIFormats = [ - 'uniqueId' => 'uuid', - 'tokenDescription' => null, + 'journalTokenPublicId' => 'uuid', 'mapping' => null, - 'journalTokenPublicId' => 'uuid' + 'tokenDescription' => null, + 'uniqueId' => 'uuid' ]; /** @@ -83,10 +83,10 @@ class ContractCostCentreJournalOverridesUpdateRequest implements ModelInterface, * @var array */ protected static array $openAPINullables = [ - 'uniqueId' => false, - 'tokenDescription' => true, + 'journalTokenPublicId' => false, 'mapping' => true, - 'journalTokenPublicId' => false + 'tokenDescription' => true, + 'uniqueId' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'uniqueId' => 'uniqueId', - 'tokenDescription' => 'tokenDescription', + 'journalTokenPublicId' => 'journalTokenPublicId', 'mapping' => 'mapping', - 'journalTokenPublicId' => 'journalTokenPublicId' + 'tokenDescription' => 'tokenDescription', + 'uniqueId' => 'uniqueId' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'uniqueId' => 'setUniqueId', - 'tokenDescription' => 'setTokenDescription', + 'journalTokenPublicId' => 'setJournalTokenPublicId', 'mapping' => 'setMapping', - 'journalTokenPublicId' => 'setJournalTokenPublicId' + 'tokenDescription' => 'setTokenDescription', + 'uniqueId' => 'setUniqueId' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'uniqueId' => 'getUniqueId', - 'tokenDescription' => 'getTokenDescription', + 'journalTokenPublicId' => 'getJournalTokenPublicId', 'mapping' => 'getMapping', - 'journalTokenPublicId' => 'getJournalTokenPublicId' + 'tokenDescription' => 'getTokenDescription', + 'uniqueId' => 'getUniqueId' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('uniqueId', $data ?? [], null); - $this->setIfExists('tokenDescription', $data ?? [], null); - $this->setIfExists('mapping', $data ?? [], null); $this->setIfExists('journalTokenPublicId', $data ?? [], null); + $this->setIfExists('mapping', $data ?? [], null); + $this->setIfExists('tokenDescription', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); } /** @@ -310,123 +310,123 @@ public function valid(): bool /** - * Gets uniqueId + * Gets journalTokenPublicId * * @return string|null */ - public function getUniqueId(): ?string + public function getJournalTokenPublicId(): ?string { - return $this->container['uniqueId']; + return $this->container['journalTokenPublicId']; } /** - * Sets uniqueId + * Sets journalTokenPublicId * - * @param string|null $uniqueId Unique Id + * @param string|null $journalTokenPublicId Journal Token Public Id * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setJournalTokenPublicId(?string $journalTokenPublicId): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($journalTokenPublicId)) { + throw new InvalidArgumentException('non-nullable journalTokenPublicId cannot be null'); } - $this->container['uniqueId'] = $uniqueId; + $this->container['journalTokenPublicId'] = $journalTokenPublicId; return $this; } /** - * Gets tokenDescription + * Gets mapping * * @return string|null */ - public function getTokenDescription(): ?string + public function getMapping(): ?string { - return $this->container['tokenDescription']; + return $this->container['mapping']; } /** - * Sets tokenDescription + * Sets mapping * - * @param string|null $tokenDescription Token Description + * @param string|null $mapping CostCentre Journal Overrides Mapping * * @return $this */ - public function setTokenDescription(?string $tokenDescription): static + public function setMapping(?string $mapping): static { - if (is_null($tokenDescription)) { - array_push($this->openAPINullablesSetToNull, 'tokenDescription'); + if (is_null($mapping)) { + array_push($this->openAPINullablesSetToNull, 'mapping'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tokenDescription', $nullablesSetToNull); + $index = array_search('mapping', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tokenDescription'] = $tokenDescription; + $this->container['mapping'] = $mapping; return $this; } /** - * Gets mapping + * Gets tokenDescription * * @return string|null */ - public function getMapping(): ?string + public function getTokenDescription(): ?string { - return $this->container['mapping']; + return $this->container['tokenDescription']; } /** - * Sets mapping + * Sets tokenDescription * - * @param string|null $mapping CostCentre Journal Overrides Mapping + * @param string|null $tokenDescription Token Description * * @return $this */ - public function setMapping(?string $mapping): static + public function setTokenDescription(?string $tokenDescription): static { - if (is_null($mapping)) { - array_push($this->openAPINullablesSetToNull, 'mapping'); + if (is_null($tokenDescription)) { + array_push($this->openAPINullablesSetToNull, 'tokenDescription'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mapping', $nullablesSetToNull); + $index = array_search('tokenDescription', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['mapping'] = $mapping; + $this->container['tokenDescription'] = $tokenDescription; return $this; } /** - * Gets journalTokenPublicId + * Gets uniqueId * * @return string|null */ - public function getJournalTokenPublicId(): ?string + public function getUniqueId(): ?string { - return $this->container['journalTokenPublicId']; + return $this->container['uniqueId']; } /** - * Sets journalTokenPublicId + * Sets uniqueId * - * @param string|null $journalTokenPublicId Journal Token Public Id + * @param string|null $uniqueId Unique Id * * @return $this */ - public function setJournalTokenPublicId(?string $journalTokenPublicId): static + public function setUniqueId(?string $uniqueId): static { - if (is_null($journalTokenPublicId)) { - throw new InvalidArgumentException('non-nullable journalTokenPublicId cannot be null'); + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); } - $this->container['journalTokenPublicId'] = $journalTokenPublicId; + $this->container['uniqueId'] = $uniqueId; return $this; } diff --git a/src/Model/ContractCreateEmployeeRequest.php b/src/Model/ContractCreateEmployeeRequest.php index a71a0cc..1847c50 100644 --- a/src/Model/ContractCreateEmployeeRequest.php +++ b/src/Model/ContractCreateEmployeeRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,18 +59,22 @@ class ContractCreateEmployeeRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'personalDetails' => '\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest', - 'employmentDetails' => '\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest', + 'aggregatedServiceDate' => '\DateTime', 'autoEnrolment' => '\SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest', - 'leaveSettings' => '\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest', - 'rightToWork' => '\SynergiTech\Staffology\Model\ContractRightToWork', 'bankDetails' => '\SynergiTech\Staffology\Model\ContractBankDetails', - 'payOptions' => '\SynergiTech\Staffology\Model\ContractPayOptionsRequest', - 'tags' => 'string[]', - 'holidaySchemeUniqueId' => 'string', - 'aggregatedServiceDate' => '\DateTime', + 'defaultPensionSchemeName' => 'string', + 'defaultPensionSchemeUniqueId' => 'string', + 'defaultWorkerGroupName' => 'string', + 'defaultWorkerGroupUniqueId' => 'string', + 'employmentDetails' => '\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest', 'evcId' => 'string', - 'sourceSystemId' => 'string' + 'holidaySchemeUniqueId' => 'string', + 'leaveSettings' => '\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest', + 'payOptions' => '\SynergiTech\Staffology\Model\ContractPayOptionsRequest', + 'personalDetails' => '\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest', + 'rightToWork' => '\SynergiTech\Staffology\Model\ContractRightToWork', + 'sourceSystemId' => 'string', + 'tags' => 'string[]' ]; /** @@ -79,18 +83,22 @@ class ContractCreateEmployeeRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ - 'personalDetails' => null, - 'employmentDetails' => null, + 'aggregatedServiceDate' => 'date', 'autoEnrolment' => null, - 'leaveSettings' => null, - 'rightToWork' => null, 'bankDetails' => null, - 'payOptions' => null, - 'tags' => null, - 'holidaySchemeUniqueId' => 'uuid', - 'aggregatedServiceDate' => 'date', + 'defaultPensionSchemeName' => null, + 'defaultPensionSchemeUniqueId' => 'uuid', + 'defaultWorkerGroupName' => null, + 'defaultWorkerGroupUniqueId' => 'uuid', + 'employmentDetails' => null, 'evcId' => 'uuid', - 'sourceSystemId' => null + 'holidaySchemeUniqueId' => 'uuid', + 'leaveSettings' => null, + 'payOptions' => null, + 'personalDetails' => null, + 'rightToWork' => null, + 'sourceSystemId' => null, + 'tags' => null ]; /** @@ -99,18 +107,22 @@ class ContractCreateEmployeeRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ - 'personalDetails' => false, - 'employmentDetails' => false, + 'aggregatedServiceDate' => true, 'autoEnrolment' => false, - 'leaveSettings' => false, - 'rightToWork' => false, 'bankDetails' => false, - 'payOptions' => false, - 'tags' => true, - 'holidaySchemeUniqueId' => true, - 'aggregatedServiceDate' => true, + 'defaultPensionSchemeName' => true, + 'defaultPensionSchemeUniqueId' => true, + 'defaultWorkerGroupName' => true, + 'defaultWorkerGroupUniqueId' => true, + 'employmentDetails' => false, 'evcId' => true, - 'sourceSystemId' => true + 'holidaySchemeUniqueId' => true, + 'leaveSettings' => false, + 'payOptions' => false, + 'personalDetails' => false, + 'rightToWork' => false, + 'sourceSystemId' => true, + 'tags' => true ]; /** @@ -199,18 +211,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'personalDetails' => 'personalDetails', - 'employmentDetails' => 'employmentDetails', + 'aggregatedServiceDate' => 'aggregatedServiceDate', 'autoEnrolment' => 'autoEnrolment', - 'leaveSettings' => 'leaveSettings', - 'rightToWork' => 'rightToWork', 'bankDetails' => 'bankDetails', - 'payOptions' => 'payOptions', - 'tags' => 'tags', - 'holidaySchemeUniqueId' => 'holidaySchemeUniqueId', - 'aggregatedServiceDate' => 'aggregatedServiceDate', + 'defaultPensionSchemeName' => 'defaultPensionSchemeName', + 'defaultPensionSchemeUniqueId' => 'defaultPensionSchemeUniqueId', + 'defaultWorkerGroupName' => 'defaultWorkerGroupName', + 'defaultWorkerGroupUniqueId' => 'defaultWorkerGroupUniqueId', + 'employmentDetails' => 'employmentDetails', 'evcId' => 'evcId', - 'sourceSystemId' => 'sourceSystemId' + 'holidaySchemeUniqueId' => 'holidaySchemeUniqueId', + 'leaveSettings' => 'leaveSettings', + 'payOptions' => 'payOptions', + 'personalDetails' => 'personalDetails', + 'rightToWork' => 'rightToWork', + 'sourceSystemId' => 'sourceSystemId', + 'tags' => 'tags' ]; /** @@ -219,18 +235,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'personalDetails' => 'setPersonalDetails', - 'employmentDetails' => 'setEmploymentDetails', + 'aggregatedServiceDate' => 'setAggregatedServiceDate', 'autoEnrolment' => 'setAutoEnrolment', - 'leaveSettings' => 'setLeaveSettings', - 'rightToWork' => 'setRightToWork', 'bankDetails' => 'setBankDetails', - 'payOptions' => 'setPayOptions', - 'tags' => 'setTags', - 'holidaySchemeUniqueId' => 'setHolidaySchemeUniqueId', - 'aggregatedServiceDate' => 'setAggregatedServiceDate', + 'defaultPensionSchemeName' => 'setDefaultPensionSchemeName', + 'defaultPensionSchemeUniqueId' => 'setDefaultPensionSchemeUniqueId', + 'defaultWorkerGroupName' => 'setDefaultWorkerGroupName', + 'defaultWorkerGroupUniqueId' => 'setDefaultWorkerGroupUniqueId', + 'employmentDetails' => 'setEmploymentDetails', 'evcId' => 'setEvcId', - 'sourceSystemId' => 'setSourceSystemId' + 'holidaySchemeUniqueId' => 'setHolidaySchemeUniqueId', + 'leaveSettings' => 'setLeaveSettings', + 'payOptions' => 'setPayOptions', + 'personalDetails' => 'setPersonalDetails', + 'rightToWork' => 'setRightToWork', + 'sourceSystemId' => 'setSourceSystemId', + 'tags' => 'setTags' ]; /** @@ -239,18 +259,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'personalDetails' => 'getPersonalDetails', - 'employmentDetails' => 'getEmploymentDetails', + 'aggregatedServiceDate' => 'getAggregatedServiceDate', 'autoEnrolment' => 'getAutoEnrolment', - 'leaveSettings' => 'getLeaveSettings', - 'rightToWork' => 'getRightToWork', 'bankDetails' => 'getBankDetails', - 'payOptions' => 'getPayOptions', - 'tags' => 'getTags', - 'holidaySchemeUniqueId' => 'getHolidaySchemeUniqueId', - 'aggregatedServiceDate' => 'getAggregatedServiceDate', + 'defaultPensionSchemeName' => 'getDefaultPensionSchemeName', + 'defaultPensionSchemeUniqueId' => 'getDefaultPensionSchemeUniqueId', + 'defaultWorkerGroupName' => 'getDefaultWorkerGroupName', + 'defaultWorkerGroupUniqueId' => 'getDefaultWorkerGroupUniqueId', + 'employmentDetails' => 'getEmploymentDetails', 'evcId' => 'getEvcId', - 'sourceSystemId' => 'getSourceSystemId' + 'holidaySchemeUniqueId' => 'getHolidaySchemeUniqueId', + 'leaveSettings' => 'getLeaveSettings', + 'payOptions' => 'getPayOptions', + 'personalDetails' => 'getPersonalDetails', + 'rightToWork' => 'getRightToWork', + 'sourceSystemId' => 'getSourceSystemId', + 'tags' => 'getTags' ]; /** @@ -309,18 +333,22 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('personalDetails', $data ?? [], null); - $this->setIfExists('employmentDetails', $data ?? [], null); + $this->setIfExists('aggregatedServiceDate', $data ?? [], null); $this->setIfExists('autoEnrolment', $data ?? [], null); - $this->setIfExists('leaveSettings', $data ?? [], null); - $this->setIfExists('rightToWork', $data ?? [], null); $this->setIfExists('bankDetails', $data ?? [], null); - $this->setIfExists('payOptions', $data ?? [], null); - $this->setIfExists('tags', $data ?? [], null); - $this->setIfExists('holidaySchemeUniqueId', $data ?? [], null); - $this->setIfExists('aggregatedServiceDate', $data ?? [], null); + $this->setIfExists('defaultPensionSchemeName', $data ?? [], null); + $this->setIfExists('defaultPensionSchemeUniqueId', $data ?? [], null); + $this->setIfExists('defaultWorkerGroupName', $data ?? [], null); + $this->setIfExists('defaultWorkerGroupUniqueId', $data ?? [], null); + $this->setIfExists('employmentDetails', $data ?? [], null); $this->setIfExists('evcId', $data ?? [], null); + $this->setIfExists('holidaySchemeUniqueId', $data ?? [], null); + $this->setIfExists('leaveSettings', $data ?? [], null); + $this->setIfExists('payOptions', $data ?? [], null); + $this->setIfExists('personalDetails', $data ?? [], null); + $this->setIfExists('rightToWork', $data ?? [], null); $this->setIfExists('sourceSystemId', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); } /** @@ -370,224 +398,286 @@ public function valid(): bool /** - * Gets personalDetails + * Gets aggregatedServiceDate * - * @return \SynergiTech\Staffology\Model\ContractPersonalDetailsRequest|null + * @return \DateTime|null */ - public function getPersonalDetails(): ?\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest + public function getAggregatedServiceDate(): ?\DateTime { - return $this->container['personalDetails']; + return $this->container['aggregatedServiceDate']; } /** - * Sets personalDetails + * Sets aggregatedServiceDate * - * @param \SynergiTech\Staffology\Model\ContractPersonalDetailsRequest|null $personalDetails personalDetails + * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate * * @return $this */ - public function setPersonalDetails(?\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest $personalDetails): static + public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static { - if (is_null($personalDetails)) { - throw new InvalidArgumentException('non-nullable personalDetails cannot be null'); + if (is_null($aggregatedServiceDate)) { + array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('aggregatedServiceDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['personalDetails'] = $personalDetails; + $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; return $this; } /** - * Gets employmentDetails + * Gets autoEnrolment * - * @return \SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest|null + * @return \SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest|null */ - public function getEmploymentDetails(): ?\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest + public function getAutoEnrolment(): ?\SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest { - return $this->container['employmentDetails']; + return $this->container['autoEnrolment']; } /** - * Sets employmentDetails + * Sets autoEnrolment * - * @param \SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest|null $employmentDetails employmentDetails + * @param \SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest|null $autoEnrolment autoEnrolment * * @return $this */ - public function setEmploymentDetails(?\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest $employmentDetails): static + public function setAutoEnrolment(?\SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest $autoEnrolment): static { - if (is_null($employmentDetails)) { - throw new InvalidArgumentException('non-nullable employmentDetails cannot be null'); + if (is_null($autoEnrolment)) { + throw new InvalidArgumentException('non-nullable autoEnrolment cannot be null'); } - $this->container['employmentDetails'] = $employmentDetails; + $this->container['autoEnrolment'] = $autoEnrolment; return $this; } /** - * Gets autoEnrolment + * Gets bankDetails * - * @return \SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest|null + * @return \SynergiTech\Staffology\Model\ContractBankDetails|null */ - public function getAutoEnrolment(): ?\SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest + public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractBankDetails { - return $this->container['autoEnrolment']; + return $this->container['bankDetails']; } /** - * Sets autoEnrolment + * Sets bankDetails * - * @param \SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest|null $autoEnrolment autoEnrolment + * @param \SynergiTech\Staffology\Model\ContractBankDetails|null $bankDetails bankDetails * * @return $this */ - public function setAutoEnrolment(?\SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest $autoEnrolment): static + public function setBankDetails(?\SynergiTech\Staffology\Model\ContractBankDetails $bankDetails): static { - if (is_null($autoEnrolment)) { - throw new InvalidArgumentException('non-nullable autoEnrolment cannot be null'); + if (is_null($bankDetails)) { + throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); } - $this->container['autoEnrolment'] = $autoEnrolment; + $this->container['bankDetails'] = $bankDetails; return $this; } /** - * Gets leaveSettings + * Gets defaultPensionSchemeName * - * @return \SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest|null + * @return string|null */ - public function getLeaveSettings(): ?\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest + public function getDefaultPensionSchemeName(): ?string { - return $this->container['leaveSettings']; + return $this->container['defaultPensionSchemeName']; } /** - * Sets leaveSettings + * Sets defaultPensionSchemeName * - * @param \SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest|null $leaveSettings leaveSettings + * @param string|null $defaultPensionSchemeName The name of the Pension Scheme that will be used for this employee. * * @return $this */ - public function setLeaveSettings(?\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest $leaveSettings): static + public function setDefaultPensionSchemeName(?string $defaultPensionSchemeName): static { - if (is_null($leaveSettings)) { - throw new InvalidArgumentException('non-nullable leaveSettings cannot be null'); + if (is_null($defaultPensionSchemeName)) { + array_push($this->openAPINullablesSetToNull, 'defaultPensionSchemeName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultPensionSchemeName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['leaveSettings'] = $leaveSettings; + $this->container['defaultPensionSchemeName'] = $defaultPensionSchemeName; return $this; } /** - * Gets rightToWork + * Gets defaultPensionSchemeUniqueId * - * @return \SynergiTech\Staffology\Model\ContractRightToWork|null + * @return string|null */ - public function getRightToWork(): ?\SynergiTech\Staffology\Model\ContractRightToWork + public function getDefaultPensionSchemeUniqueId(): ?string { - return $this->container['rightToWork']; + return $this->container['defaultPensionSchemeUniqueId']; } /** - * Sets rightToWork + * Sets defaultPensionSchemeUniqueId * - * @param \SynergiTech\Staffology\Model\ContractRightToWork|null $rightToWork rightToWork + * @param string|null $defaultPensionSchemeUniqueId The UniqueId of the Pension Scheme that will be used for this employee. * * @return $this */ - public function setRightToWork(?\SynergiTech\Staffology\Model\ContractRightToWork $rightToWork): static + public function setDefaultPensionSchemeUniqueId(?string $defaultPensionSchemeUniqueId): static { - if (is_null($rightToWork)) { - throw new InvalidArgumentException('non-nullable rightToWork cannot be null'); + if (is_null($defaultPensionSchemeUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'defaultPensionSchemeUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultPensionSchemeUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['rightToWork'] = $rightToWork; + $this->container['defaultPensionSchemeUniqueId'] = $defaultPensionSchemeUniqueId; return $this; } /** - * Gets bankDetails + * Gets defaultWorkerGroupName * - * @return \SynergiTech\Staffology\Model\ContractBankDetails|null + * @return string|null */ - public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractBankDetails + public function getDefaultWorkerGroupName(): ?string { - return $this->container['bankDetails']; + return $this->container['defaultWorkerGroupName']; } /** - * Sets bankDetails + * Sets defaultWorkerGroupName * - * @param \SynergiTech\Staffology\Model\ContractBankDetails|null $bankDetails bankDetails + * @param string|null $defaultWorkerGroupName The name of the Worker Group that will be used for this employee. * * @return $this */ - public function setBankDetails(?\SynergiTech\Staffology\Model\ContractBankDetails $bankDetails): static + public function setDefaultWorkerGroupName(?string $defaultWorkerGroupName): static { - if (is_null($bankDetails)) { - throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); + if (is_null($defaultWorkerGroupName)) { + array_push($this->openAPINullablesSetToNull, 'defaultWorkerGroupName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultWorkerGroupName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['bankDetails'] = $bankDetails; + $this->container['defaultWorkerGroupName'] = $defaultWorkerGroupName; return $this; } /** - * Gets payOptions + * Gets defaultWorkerGroupUniqueId * - * @return \SynergiTech\Staffology\Model\ContractPayOptionsRequest|null + * @return string|null */ - public function getPayOptions(): ?\SynergiTech\Staffology\Model\ContractPayOptionsRequest + public function getDefaultWorkerGroupUniqueId(): ?string { - return $this->container['payOptions']; + return $this->container['defaultWorkerGroupUniqueId']; } /** - * Sets payOptions + * Sets defaultWorkerGroupUniqueId * - * @param \SynergiTech\Staffology\Model\ContractPayOptionsRequest|null $payOptions payOptions + * @param string|null $defaultWorkerGroupUniqueId The UniqueId of the Worker Group that will be used for this employee. * * @return $this */ - public function setPayOptions(?\SynergiTech\Staffology\Model\ContractPayOptionsRequest $payOptions): static + public function setDefaultWorkerGroupUniqueId(?string $defaultWorkerGroupUniqueId): static { - if (is_null($payOptions)) { - throw new InvalidArgumentException('non-nullable payOptions cannot be null'); + if (is_null($defaultWorkerGroupUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'defaultWorkerGroupUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultWorkerGroupUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payOptions'] = $payOptions; + $this->container['defaultWorkerGroupUniqueId'] = $defaultWorkerGroupUniqueId; return $this; } /** - * Gets tags + * Gets employmentDetails * - * @return string[]|null + * @return \SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest|null */ - public function getTags(): ?array + public function getEmploymentDetails(): ?\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest { - return $this->container['tags']; + return $this->container['employmentDetails']; } /** - * Sets tags + * Sets employmentDetails * - * @param string[]|null $tags tags + * @param \SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest|null $employmentDetails employmentDetails * * @return $this */ - public function setTags(?array $tags): static + public function setEmploymentDetails(?\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest $employmentDetails): static { - if (is_null($tags)) { - array_push($this->openAPINullablesSetToNull, 'tags'); + if (is_null($employmentDetails)) { + throw new InvalidArgumentException('non-nullable employmentDetails cannot be null'); + } + $this->container['employmentDetails'] = $employmentDetails; + + return $this; + } + + /** + * Gets evcId + * + * @return string|null + */ + public function getEvcId(): ?string + { + return $this->container['evcId']; + } + + /** + * Sets evcId + * + * @param string|null $evcId If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. + * + * @return $this + */ + public function setEvcId(?string $evcId): static + { + if (is_null($evcId)) { + array_push($this->openAPINullablesSetToNull, 'evcId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tags', $nullablesSetToNull); + $index = array_search('evcId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tags'] = $tags; + $this->container['evcId'] = $evcId; return $this; } @@ -627,69 +717,109 @@ public function setHolidaySchemeUniqueId(?string $holidaySchemeUniqueId): static } /** - * Gets aggregatedServiceDate + * Gets leaveSettings * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest|null */ - public function getAggregatedServiceDate(): ?\DateTime + public function getLeaveSettings(): ?\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest { - return $this->container['aggregatedServiceDate']; + return $this->container['leaveSettings']; } /** - * Sets aggregatedServiceDate + * Sets leaveSettings * - * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate + * @param \SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest|null $leaveSettings leaveSettings * * @return $this */ - public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static + public function setLeaveSettings(?\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest $leaveSettings): static { - if (is_null($aggregatedServiceDate)) { - array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aggregatedServiceDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($leaveSettings)) { + throw new InvalidArgumentException('non-nullable leaveSettings cannot be null'); } - $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; + $this->container['leaveSettings'] = $leaveSettings; return $this; } /** - * Gets evcId + * Gets payOptions * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractPayOptionsRequest|null */ - public function getEvcId(): ?string + public function getPayOptions(): ?\SynergiTech\Staffology\Model\ContractPayOptionsRequest { - return $this->container['evcId']; + return $this->container['payOptions']; } /** - * Sets evcId + * Sets payOptions * - * @param string|null $evcId If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. + * @param \SynergiTech\Staffology\Model\ContractPayOptionsRequest|null $payOptions payOptions * * @return $this */ - public function setEvcId(?string $evcId): static + public function setPayOptions(?\SynergiTech\Staffology\Model\ContractPayOptionsRequest $payOptions): static { - if (is_null($evcId)) { - array_push($this->openAPINullablesSetToNull, 'evcId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('evcId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payOptions)) { + throw new InvalidArgumentException('non-nullable payOptions cannot be null'); } - $this->container['evcId'] = $evcId; + $this->container['payOptions'] = $payOptions; + + return $this; + } + + /** + * Gets personalDetails + * + * @return \SynergiTech\Staffology\Model\ContractPersonalDetailsRequest|null + */ + public function getPersonalDetails(): ?\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest + { + return $this->container['personalDetails']; + } + + /** + * Sets personalDetails + * + * @param \SynergiTech\Staffology\Model\ContractPersonalDetailsRequest|null $personalDetails personalDetails + * + * @return $this + */ + public function setPersonalDetails(?\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest $personalDetails): static + { + if (is_null($personalDetails)) { + throw new InvalidArgumentException('non-nullable personalDetails cannot be null'); + } + $this->container['personalDetails'] = $personalDetails; + + return $this; + } + + /** + * Gets rightToWork + * + * @return \SynergiTech\Staffology\Model\ContractRightToWork|null + */ + public function getRightToWork(): ?\SynergiTech\Staffology\Model\ContractRightToWork + { + return $this->container['rightToWork']; + } + + /** + * Sets rightToWork + * + * @param \SynergiTech\Staffology\Model\ContractRightToWork|null $rightToWork rightToWork + * + * @return $this + */ + public function setRightToWork(?\SynergiTech\Staffology\Model\ContractRightToWork $rightToWork): static + { + if (is_null($rightToWork)) { + throw new InvalidArgumentException('non-nullable rightToWork cannot be null'); + } + $this->container['rightToWork'] = $rightToWork; return $this; } @@ -731,6 +861,40 @@ public function setSourceSystemId(?string $sourceSystemId): static return $this; } + + /** + * Gets tags + * + * @return string[]|null + */ + public function getTags(): ?array + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags tags + * + * @return $this + */ + public function setTags(?array $tags): static + { + if (is_null($tags)) { + array_push($this->openAPINullablesSetToNull, 'tags'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tags', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tags'] = $tags; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractCustomReportRequest.php b/src/Model/ContractCustomReportRequest.php index 9a226e1..565aa1d 100644 --- a/src/Model/ContractCustomReportRequest.php +++ b/src/Model/ContractCustomReportRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractDepartmentJournalOverridesRequest.php b/src/Model/ContractDepartmentJournalOverridesRequest.php index 44b883d..5029310 100644 --- a/src/Model/ContractDepartmentJournalOverridesRequest.php +++ b/src/Model/ContractDepartmentJournalOverridesRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractDepartmentJournalOverridesRequest implements ModelInterface, Array * @var array */ protected static array $openAPITypes = [ - 'tokenDescription' => 'string', + 'journalTokenPublicId' => 'string', 'mapping' => 'string', - 'journalTokenPublicId' => 'string' + 'tokenDescription' => 'string' ]; /** @@ -70,9 +70,9 @@ class ContractDepartmentJournalOverridesRequest implements ModelInterface, Array * @var array */ protected static array $openAPIFormats = [ - 'tokenDescription' => null, + 'journalTokenPublicId' => 'uuid', 'mapping' => null, - 'journalTokenPublicId' => 'uuid' + 'tokenDescription' => null ]; /** @@ -81,9 +81,9 @@ class ContractDepartmentJournalOverridesRequest implements ModelInterface, Array * @var array */ protected static array $openAPINullables = [ - 'tokenDescription' => true, + 'journalTokenPublicId' => false, 'mapping' => true, - 'journalTokenPublicId' => false + 'tokenDescription' => true ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'tokenDescription' => 'tokenDescription', + 'journalTokenPublicId' => 'journalTokenPublicId', 'mapping' => 'mapping', - 'journalTokenPublicId' => 'journalTokenPublicId' + 'tokenDescription' => 'tokenDescription' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'tokenDescription' => 'setTokenDescription', + 'journalTokenPublicId' => 'setJournalTokenPublicId', 'mapping' => 'setMapping', - 'journalTokenPublicId' => 'setJournalTokenPublicId' + 'tokenDescription' => 'setTokenDescription' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'tokenDescription' => 'getTokenDescription', + 'journalTokenPublicId' => 'getJournalTokenPublicId', 'mapping' => 'getMapping', - 'journalTokenPublicId' => 'getJournalTokenPublicId' + 'tokenDescription' => 'getTokenDescription' ]; /** @@ -255,9 +255,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('tokenDescription', $data ?? [], null); - $this->setIfExists('mapping', $data ?? [], null); $this->setIfExists('journalTokenPublicId', $data ?? [], null); + $this->setIfExists('mapping', $data ?? [], null); + $this->setIfExists('tokenDescription', $data ?? [], null); } /** @@ -303,35 +303,28 @@ public function valid(): bool /** - * Gets tokenDescription + * Gets journalTokenPublicId * * @return string|null */ - public function getTokenDescription(): ?string + public function getJournalTokenPublicId(): ?string { - return $this->container['tokenDescription']; + return $this->container['journalTokenPublicId']; } /** - * Sets tokenDescription + * Sets journalTokenPublicId * - * @param string|null $tokenDescription Token Description + * @param string|null $journalTokenPublicId Journal Token Public Id * * @return $this */ - public function setTokenDescription(?string $tokenDescription): static + public function setJournalTokenPublicId(?string $journalTokenPublicId): static { - if (is_null($tokenDescription)) { - array_push($this->openAPINullablesSetToNull, 'tokenDescription'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tokenDescription', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($journalTokenPublicId)) { + throw new InvalidArgumentException('non-nullable journalTokenPublicId cannot be null'); } - $this->container['tokenDescription'] = $tokenDescription; + $this->container['journalTokenPublicId'] = $journalTokenPublicId; return $this; } @@ -371,28 +364,35 @@ public function setMapping(?string $mapping): static } /** - * Gets journalTokenPublicId + * Gets tokenDescription * * @return string|null */ - public function getJournalTokenPublicId(): ?string + public function getTokenDescription(): ?string { - return $this->container['journalTokenPublicId']; + return $this->container['tokenDescription']; } /** - * Sets journalTokenPublicId + * Sets tokenDescription * - * @param string|null $journalTokenPublicId Journal Token Public Id + * @param string|null $tokenDescription Token Description * * @return $this */ - public function setJournalTokenPublicId(?string $journalTokenPublicId): static + public function setTokenDescription(?string $tokenDescription): static { - if (is_null($journalTokenPublicId)) { - throw new InvalidArgumentException('non-nullable journalTokenPublicId cannot be null'); + if (is_null($tokenDescription)) { + array_push($this->openAPINullablesSetToNull, 'tokenDescription'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tokenDescription', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['journalTokenPublicId'] = $journalTokenPublicId; + $this->container['tokenDescription'] = $tokenDescription; return $this; } diff --git a/src/Model/ContractDepartmentJournalOverridesResponse.php b/src/Model/ContractDepartmentJournalOverridesResponse.php index aeae0d6..53fdb07 100644 --- a/src/Model/ContractDepartmentJournalOverridesResponse.php +++ b/src/Model/ContractDepartmentJournalOverridesResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractDepartmentJournalOverridesResponse implements ModelInterface, Arra * @var array */ protected static array $openAPITypes = [ - 'uniqueId' => 'string', - 'tokenDescription' => 'string', + 'journalTokenPublicId' => 'string', 'mapping' => 'string', - 'journalTokenPublicId' => 'string' + 'tokenDescription' => 'string', + 'uniqueId' => 'string' ]; /** @@ -71,10 +71,10 @@ class ContractDepartmentJournalOverridesResponse implements ModelInterface, Arra * @var array */ protected static array $openAPIFormats = [ - 'uniqueId' => 'uuid', - 'tokenDescription' => null, + 'journalTokenPublicId' => 'uuid', 'mapping' => null, - 'journalTokenPublicId' => 'uuid' + 'tokenDescription' => null, + 'uniqueId' => 'uuid' ]; /** @@ -83,10 +83,10 @@ class ContractDepartmentJournalOverridesResponse implements ModelInterface, Arra * @var array */ protected static array $openAPINullables = [ - 'uniqueId' => false, - 'tokenDescription' => true, + 'journalTokenPublicId' => false, 'mapping' => true, - 'journalTokenPublicId' => false + 'tokenDescription' => true, + 'uniqueId' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'uniqueId' => 'uniqueId', - 'tokenDescription' => 'tokenDescription', + 'journalTokenPublicId' => 'journalTokenPublicId', 'mapping' => 'mapping', - 'journalTokenPublicId' => 'journalTokenPublicId' + 'tokenDescription' => 'tokenDescription', + 'uniqueId' => 'uniqueId' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'uniqueId' => 'setUniqueId', - 'tokenDescription' => 'setTokenDescription', + 'journalTokenPublicId' => 'setJournalTokenPublicId', 'mapping' => 'setMapping', - 'journalTokenPublicId' => 'setJournalTokenPublicId' + 'tokenDescription' => 'setTokenDescription', + 'uniqueId' => 'setUniqueId' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'uniqueId' => 'getUniqueId', - 'tokenDescription' => 'getTokenDescription', + 'journalTokenPublicId' => 'getJournalTokenPublicId', 'mapping' => 'getMapping', - 'journalTokenPublicId' => 'getJournalTokenPublicId' + 'tokenDescription' => 'getTokenDescription', + 'uniqueId' => 'getUniqueId' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('uniqueId', $data ?? [], null); - $this->setIfExists('tokenDescription', $data ?? [], null); - $this->setIfExists('mapping', $data ?? [], null); $this->setIfExists('journalTokenPublicId', $data ?? [], null); + $this->setIfExists('mapping', $data ?? [], null); + $this->setIfExists('tokenDescription', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); } /** @@ -310,123 +310,123 @@ public function valid(): bool /** - * Gets uniqueId + * Gets journalTokenPublicId * * @return string|null */ - public function getUniqueId(): ?string + public function getJournalTokenPublicId(): ?string { - return $this->container['uniqueId']; + return $this->container['journalTokenPublicId']; } /** - * Sets uniqueId + * Sets journalTokenPublicId * - * @param string|null $uniqueId Department Journal Overrides identifier + * @param string|null $journalTokenPublicId Journal Token Public Id * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setJournalTokenPublicId(?string $journalTokenPublicId): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($journalTokenPublicId)) { + throw new InvalidArgumentException('non-nullable journalTokenPublicId cannot be null'); } - $this->container['uniqueId'] = $uniqueId; + $this->container['journalTokenPublicId'] = $journalTokenPublicId; return $this; } /** - * Gets tokenDescription + * Gets mapping * * @return string|null */ - public function getTokenDescription(): ?string + public function getMapping(): ?string { - return $this->container['tokenDescription']; + return $this->container['mapping']; } /** - * Sets tokenDescription + * Sets mapping * - * @param string|null $tokenDescription Token Description + * @param string|null $mapping Department Journal Overrides Mapping * * @return $this */ - public function setTokenDescription(?string $tokenDescription): static + public function setMapping(?string $mapping): static { - if (is_null($tokenDescription)) { - array_push($this->openAPINullablesSetToNull, 'tokenDescription'); + if (is_null($mapping)) { + array_push($this->openAPINullablesSetToNull, 'mapping'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tokenDescription', $nullablesSetToNull); + $index = array_search('mapping', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tokenDescription'] = $tokenDescription; + $this->container['mapping'] = $mapping; return $this; } /** - * Gets mapping + * Gets tokenDescription * * @return string|null */ - public function getMapping(): ?string + public function getTokenDescription(): ?string { - return $this->container['mapping']; + return $this->container['tokenDescription']; } /** - * Sets mapping + * Sets tokenDescription * - * @param string|null $mapping Department Journal Overrides Mapping + * @param string|null $tokenDescription Token Description * * @return $this */ - public function setMapping(?string $mapping): static + public function setTokenDescription(?string $tokenDescription): static { - if (is_null($mapping)) { - array_push($this->openAPINullablesSetToNull, 'mapping'); + if (is_null($tokenDescription)) { + array_push($this->openAPINullablesSetToNull, 'tokenDescription'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mapping', $nullablesSetToNull); + $index = array_search('tokenDescription', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['mapping'] = $mapping; + $this->container['tokenDescription'] = $tokenDescription; return $this; } /** - * Gets journalTokenPublicId + * Gets uniqueId * * @return string|null */ - public function getJournalTokenPublicId(): ?string + public function getUniqueId(): ?string { - return $this->container['journalTokenPublicId']; + return $this->container['uniqueId']; } /** - * Sets journalTokenPublicId + * Sets uniqueId * - * @param string|null $journalTokenPublicId Journal Token Public Id + * @param string|null $uniqueId Department Journal Overrides identifier * * @return $this */ - public function setJournalTokenPublicId(?string $journalTokenPublicId): static + public function setUniqueId(?string $uniqueId): static { - if (is_null($journalTokenPublicId)) { - throw new InvalidArgumentException('non-nullable journalTokenPublicId cannot be null'); + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); } - $this->container['journalTokenPublicId'] = $journalTokenPublicId; + $this->container['uniqueId'] = $uniqueId; return $this; } diff --git a/src/Model/ContractDepartmentJournalOverridesResponseItem.php b/src/Model/ContractDepartmentJournalOverridesResponseItem.php index aec4425..8519b0f 100644 --- a/src/Model/ContractDepartmentJournalOverridesResponseItem.php +++ b/src/Model/ContractDepartmentJournalOverridesResponseItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class ContractDepartmentJournalOverridesResponseItem implements ModelInterface, */ protected static array $openAPITypes = [ 'id' => 'string', - 'name' => 'string', 'metadata' => 'mixed', + 'name' => 'string', 'url' => 'string' ]; @@ -72,8 +72,8 @@ class ContractDepartmentJournalOverridesResponseItem implements ModelInterface, */ protected static array $openAPIFormats = [ 'id' => 'uuid', - 'name' => null, 'metadata' => null, + 'name' => null, 'url' => null ]; @@ -84,8 +84,8 @@ class ContractDepartmentJournalOverridesResponseItem implements ModelInterface, */ protected static array $openAPINullables = [ 'id' => false, - 'name' => true, 'metadata' => true, + 'name' => true, 'url' => true ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'id' => 'id', - 'name' => 'name', 'metadata' => 'metadata', + 'name' => 'name', 'url' => 'url' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'id' => 'setId', - 'name' => 'setName', 'metadata' => 'setMetadata', + 'name' => 'setName', 'url' => 'setUrl' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'id' => 'getId', - 'name' => 'getName', 'metadata' => 'getMetadata', + 'name' => 'getName', 'url' => 'getUrl' ]; @@ -262,8 +262,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); } @@ -337,69 +337,69 @@ public function setId(?string $id): static } /** - * Gets name + * Gets metadata * - * @return string|null + * @return mixed|null */ - public function getName(): ?string + public function getMetadata(): mixed { - return $this->container['name']; + return $this->container['metadata']; } /** - * Sets name + * Sets metadata * - * @param string|null $name name + * @param mixed|null $metadata metadata * * @return $this */ - public function setName(?string $name): static + public function setMetadata(mixed $metadata): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($metadata)) { + array_push($this->openAPINullablesSetToNull, 'metadata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('metadata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['metadata'] = $metadata; return $this; } /** - * Gets metadata + * Gets name * - * @return mixed|null + * @return string|null */ - public function getMetadata(): mixed + public function getName(): ?string { - return $this->container['metadata']; + return $this->container['name']; } /** - * Sets metadata + * Sets name * - * @param mixed|null $metadata metadata + * @param string|null $name name * * @return $this */ - public function setMetadata(mixed $metadata): static + public function setName(?string $name): static { - if (is_null($metadata)) { - array_push($this->openAPINullablesSetToNull, 'metadata'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('metadata', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['metadata'] = $metadata; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/ContractDepartmentJournalOverridesUpdateRequest.php b/src/Model/ContractDepartmentJournalOverridesUpdateRequest.php index 51b22fd..eac283f 100644 --- a/src/Model/ContractDepartmentJournalOverridesUpdateRequest.php +++ b/src/Model/ContractDepartmentJournalOverridesUpdateRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractDepartmentJournalOverridesUpdateRequest implements ModelInterface, * @var array */ protected static array $openAPITypes = [ - 'uniqueId' => 'string', - 'tokenDescription' => 'string', + 'journalTokenPublicId' => 'string', 'mapping' => 'string', - 'journalTokenPublicId' => 'string' + 'tokenDescription' => 'string', + 'uniqueId' => 'string' ]; /** @@ -71,10 +71,10 @@ class ContractDepartmentJournalOverridesUpdateRequest implements ModelInterface, * @var array */ protected static array $openAPIFormats = [ - 'uniqueId' => 'uuid', - 'tokenDescription' => null, + 'journalTokenPublicId' => 'uuid', 'mapping' => null, - 'journalTokenPublicId' => 'uuid' + 'tokenDescription' => null, + 'uniqueId' => 'uuid' ]; /** @@ -83,10 +83,10 @@ class ContractDepartmentJournalOverridesUpdateRequest implements ModelInterface, * @var array */ protected static array $openAPINullables = [ - 'uniqueId' => false, - 'tokenDescription' => true, + 'journalTokenPublicId' => false, 'mapping' => true, - 'journalTokenPublicId' => false + 'tokenDescription' => true, + 'uniqueId' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'uniqueId' => 'uniqueId', - 'tokenDescription' => 'tokenDescription', + 'journalTokenPublicId' => 'journalTokenPublicId', 'mapping' => 'mapping', - 'journalTokenPublicId' => 'journalTokenPublicId' + 'tokenDescription' => 'tokenDescription', + 'uniqueId' => 'uniqueId' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'uniqueId' => 'setUniqueId', - 'tokenDescription' => 'setTokenDescription', + 'journalTokenPublicId' => 'setJournalTokenPublicId', 'mapping' => 'setMapping', - 'journalTokenPublicId' => 'setJournalTokenPublicId' + 'tokenDescription' => 'setTokenDescription', + 'uniqueId' => 'setUniqueId' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'uniqueId' => 'getUniqueId', - 'tokenDescription' => 'getTokenDescription', + 'journalTokenPublicId' => 'getJournalTokenPublicId', 'mapping' => 'getMapping', - 'journalTokenPublicId' => 'getJournalTokenPublicId' + 'tokenDescription' => 'getTokenDescription', + 'uniqueId' => 'getUniqueId' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('uniqueId', $data ?? [], null); - $this->setIfExists('tokenDescription', $data ?? [], null); - $this->setIfExists('mapping', $data ?? [], null); $this->setIfExists('journalTokenPublicId', $data ?? [], null); + $this->setIfExists('mapping', $data ?? [], null); + $this->setIfExists('tokenDescription', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); } /** @@ -310,123 +310,123 @@ public function valid(): bool /** - * Gets uniqueId + * Gets journalTokenPublicId * * @return string|null */ - public function getUniqueId(): ?string + public function getJournalTokenPublicId(): ?string { - return $this->container['uniqueId']; + return $this->container['journalTokenPublicId']; } /** - * Sets uniqueId + * Sets journalTokenPublicId * - * @param string|null $uniqueId Unique Id + * @param string|null $journalTokenPublicId Journal Token Public Id * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setJournalTokenPublicId(?string $journalTokenPublicId): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($journalTokenPublicId)) { + throw new InvalidArgumentException('non-nullable journalTokenPublicId cannot be null'); } - $this->container['uniqueId'] = $uniqueId; + $this->container['journalTokenPublicId'] = $journalTokenPublicId; return $this; } /** - * Gets tokenDescription + * Gets mapping * * @return string|null */ - public function getTokenDescription(): ?string + public function getMapping(): ?string { - return $this->container['tokenDescription']; + return $this->container['mapping']; } /** - * Sets tokenDescription + * Sets mapping * - * @param string|null $tokenDescription Token Description + * @param string|null $mapping Department Journal Overrides Mapping * * @return $this */ - public function setTokenDescription(?string $tokenDescription): static + public function setMapping(?string $mapping): static { - if (is_null($tokenDescription)) { - array_push($this->openAPINullablesSetToNull, 'tokenDescription'); + if (is_null($mapping)) { + array_push($this->openAPINullablesSetToNull, 'mapping'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tokenDescription', $nullablesSetToNull); + $index = array_search('mapping', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tokenDescription'] = $tokenDescription; + $this->container['mapping'] = $mapping; return $this; } /** - * Gets mapping + * Gets tokenDescription * * @return string|null */ - public function getMapping(): ?string + public function getTokenDescription(): ?string { - return $this->container['mapping']; + return $this->container['tokenDescription']; } /** - * Sets mapping + * Sets tokenDescription * - * @param string|null $mapping Department Journal Overrides Mapping + * @param string|null $tokenDescription Token Description * * @return $this */ - public function setMapping(?string $mapping): static + public function setTokenDescription(?string $tokenDescription): static { - if (is_null($mapping)) { - array_push($this->openAPINullablesSetToNull, 'mapping'); + if (is_null($tokenDescription)) { + array_push($this->openAPINullablesSetToNull, 'tokenDescription'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mapping', $nullablesSetToNull); + $index = array_search('tokenDescription', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['mapping'] = $mapping; + $this->container['tokenDescription'] = $tokenDescription; return $this; } /** - * Gets journalTokenPublicId + * Gets uniqueId * * @return string|null */ - public function getJournalTokenPublicId(): ?string + public function getUniqueId(): ?string { - return $this->container['journalTokenPublicId']; + return $this->container['uniqueId']; } /** - * Sets journalTokenPublicId + * Sets uniqueId * - * @param string|null $journalTokenPublicId Journal Token Public Id + * @param string|null $uniqueId Unique Id * * @return $this */ - public function setJournalTokenPublicId(?string $journalTokenPublicId): static + public function setUniqueId(?string $uniqueId): static { - if (is_null($journalTokenPublicId)) { - throw new InvalidArgumentException('non-nullable journalTokenPublicId cannot be null'); + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); } - $this->container['journalTokenPublicId'] = $journalTokenPublicId; + $this->container['uniqueId'] = $uniqueId; return $this; } diff --git a/src/Model/ContractDepartmentRequest.php b/src/Model/ContractDepartmentRequest.php index 9bc3320..24956fe 100644 --- a/src/Model/ContractDepartmentRequest.php +++ b/src/Model/ContractDepartmentRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractDepartmentRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPITypes = [ + 'accountingCode' => 'string', 'code' => 'string', - 'title' => 'string', 'color' => 'string', - 'accountingCode' => 'string' + 'title' => 'string' ]; /** @@ -71,10 +71,10 @@ class ContractDepartmentRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPIFormats = [ + 'accountingCode' => null, 'code' => null, - 'title' => null, 'color' => null, - 'accountingCode' => null + 'title' => null ]; /** @@ -83,10 +83,10 @@ class ContractDepartmentRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPINullables = [ + 'accountingCode' => true, 'code' => false, - 'title' => false, 'color' => true, - 'accountingCode' => true + 'title' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'accountingCode' => 'accountingCode', 'code' => 'code', - 'title' => 'title', 'color' => 'color', - 'accountingCode' => 'accountingCode' + 'title' => 'title' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'accountingCode' => 'setAccountingCode', 'code' => 'setCode', - 'title' => 'setTitle', 'color' => 'setColor', - 'accountingCode' => 'setAccountingCode' + 'title' => 'setTitle' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'accountingCode' => 'getAccountingCode', 'code' => 'getCode', - 'title' => 'getTitle', 'color' => 'getColor', - 'accountingCode' => 'getAccountingCode' + 'title' => 'getTitle' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('accountingCode', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); - $this->setIfExists('accountingCode', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -294,6 +294,10 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if (!is_null($this->container['accountingCode']) && (mb_strlen($this->container['accountingCode']) > 50)) { + $invalidProperties[] = "invalid value for 'accountingCode', the character length must be smaller than or equal to 50."; + } + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } @@ -305,6 +309,10 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'code', the character length must be bigger than or equal to 1."; } + if (!is_null($this->container['color']) && (mb_strlen($this->container['color']) > 6)) { + $invalidProperties[] = "invalid value for 'color', the character length must be smaller than or equal to 6."; + } + if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } @@ -316,14 +324,6 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['color']) && (mb_strlen($this->container['color']) > 6)) { - $invalidProperties[] = "invalid value for 'color', the character length must be smaller than or equal to 6."; - } - - if (!is_null($this->container['accountingCode']) && (mb_strlen($this->container['accountingCode']) > 50)) { - $invalidProperties[] = "invalid value for 'accountingCode', the character length must be smaller than or equal to 50."; - } - return $invalidProperties; } @@ -340,69 +340,73 @@ public function valid(): bool /** - * Gets code + * Gets accountingCode * - * @return string + * @return string|null */ - public function getCode(): string + public function getAccountingCode(): ?string { - return $this->container['code']; + return $this->container['accountingCode']; } /** - * Sets code + * Sets accountingCode * - * @param string $code The unique code for this Department + * @param string|null $accountingCode accountingCode * * @return $this */ - public function setCode(string $code): static + public function setAccountingCode(?string $accountingCode): static { - if (is_null($code)) { - throw new InvalidArgumentException('non-nullable code cannot be null'); - } - if ((mb_strlen($code) > 20)) { - throw new InvalidArgumentException('invalid length for $code when calling ContractDepartmentRequest., must be smaller than or equal to 20.'); + if (is_null($accountingCode)) { + array_push($this->openAPINullablesSetToNull, 'accountingCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountingCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - if ((mb_strlen($code) < 1)) { - throw new InvalidArgumentException('invalid length for $code when calling ContractDepartmentRequest., must be bigger than or equal to 1.'); + if (!is_null($accountingCode) && (mb_strlen($accountingCode) > 50)) { + throw new InvalidArgumentException('invalid length for $accountingCode when calling ContractDepartmentRequest., must be smaller than or equal to 50.'); } - $this->container['code'] = $code; + $this->container['accountingCode'] = $accountingCode; return $this; } /** - * Gets title + * Gets code * * @return string */ - public function getTitle(): string + public function getCode(): string { - return $this->container['title']; + return $this->container['code']; } /** - * Sets title + * Sets code * - * @param string $title The name of this Department + * @param string $code The unique code for this Department * * @return $this */ - public function setTitle(string $title): static + public function setCode(string $code): static { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); + if (is_null($code)) { + throw new InvalidArgumentException('non-nullable code cannot be null'); } - if ((mb_strlen($title) > 50)) { - throw new InvalidArgumentException('invalid length for $title when calling ContractDepartmentRequest., must be smaller than or equal to 50.'); + if ((mb_strlen($code) > 20)) { + throw new InvalidArgumentException('invalid length for $code when calling ContractDepartmentRequest., must be smaller than or equal to 20.'); } - if ((mb_strlen($title) < 1)) { - throw new InvalidArgumentException('invalid length for $title when calling ContractDepartmentRequest., must be bigger than or equal to 1.'); + if ((mb_strlen($code) < 1)) { + throw new InvalidArgumentException('invalid length for $code when calling ContractDepartmentRequest., must be bigger than or equal to 1.'); } - $this->container['title'] = $title; + $this->container['code'] = $code; return $this; } @@ -446,39 +450,35 @@ public function setColor(?string $color): static } /** - * Gets accountingCode + * Gets title * - * @return string|null + * @return string */ - public function getAccountingCode(): ?string + public function getTitle(): string { - return $this->container['accountingCode']; + return $this->container['title']; } /** - * Sets accountingCode + * Sets title * - * @param string|null $accountingCode accountingCode + * @param string $title The name of this Department * * @return $this */ - public function setAccountingCode(?string $accountingCode): static + public function setTitle(string $title): static { - if (is_null($accountingCode)) { - array_push($this->openAPINullablesSetToNull, 'accountingCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountingCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); } - if (!is_null($accountingCode) && (mb_strlen($accountingCode) > 50)) { - throw new InvalidArgumentException('invalid length for $accountingCode when calling ContractDepartmentRequest., must be smaller than or equal to 50.'); + if ((mb_strlen($title) > 50)) { + throw new InvalidArgumentException('invalid length for $title when calling ContractDepartmentRequest., must be smaller than or equal to 50.'); + } + if ((mb_strlen($title) < 1)) { + throw new InvalidArgumentException('invalid length for $title when calling ContractDepartmentRequest., must be bigger than or equal to 1.'); } - $this->container['accountingCode'] = $accountingCode; + $this->container['title'] = $title; return $this; } diff --git a/src/Model/ContractDepartmentResponse.php b/src/Model/ContractDepartmentResponse.php index b7e755a..5605713 100644 --- a/src/Model/ContractDepartmentResponse.php +++ b/src/Model/ContractDepartmentResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class ContractDepartmentResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'employeeCount' => 'int', + 'accountingCode' => 'string', 'code' => 'string', - 'title' => 'string', 'color' => 'string', - 'accountingCode' => 'string' + 'employeeCount' => 'int', + 'title' => 'string' ]; /** @@ -72,11 +72,11 @@ class ContractDepartmentResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'employeeCount' => 'int32', + 'accountingCode' => null, 'code' => null, - 'title' => null, 'color' => null, - 'accountingCode' => null + 'employeeCount' => 'int32', + 'title' => null ]; /** @@ -85,11 +85,11 @@ class ContractDepartmentResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'employeeCount' => false, + 'accountingCode' => true, 'code' => false, - 'title' => false, 'color' => true, - 'accountingCode' => true + 'employeeCount' => false, + 'title' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employeeCount' => 'employeeCount', + 'accountingCode' => 'accountingCode', 'code' => 'code', - 'title' => 'title', 'color' => 'color', - 'accountingCode' => 'accountingCode' + 'employeeCount' => 'employeeCount', + 'title' => 'title' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employeeCount' => 'setEmployeeCount', + 'accountingCode' => 'setAccountingCode', 'code' => 'setCode', - 'title' => 'setTitle', 'color' => 'setColor', - 'accountingCode' => 'setAccountingCode' + 'employeeCount' => 'setEmployeeCount', + 'title' => 'setTitle' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employeeCount' => 'getEmployeeCount', + 'accountingCode' => 'getAccountingCode', 'code' => 'getCode', - 'title' => 'getTitle', 'color' => 'getColor', - 'accountingCode' => 'getAccountingCode' + 'employeeCount' => 'getEmployeeCount', + 'title' => 'getTitle' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employeeCount', $data ?? [], null); + $this->setIfExists('accountingCode', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); - $this->setIfExists('accountingCode', $data ?? [], null); + $this->setIfExists('employeeCount', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -301,6 +301,10 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if (!is_null($this->container['accountingCode']) && (mb_strlen($this->container['accountingCode']) > 50)) { + $invalidProperties[] = "invalid value for 'accountingCode', the character length must be smaller than or equal to 50."; + } + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } @@ -312,6 +316,10 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'code', the character length must be bigger than or equal to 1."; } + if (!is_null($this->container['color']) && (mb_strlen($this->container['color']) > 6)) { + $invalidProperties[] = "invalid value for 'color', the character length must be smaller than or equal to 6."; + } + if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } @@ -323,14 +331,6 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['color']) && (mb_strlen($this->container['color']) > 6)) { - $invalidProperties[] = "invalid value for 'color', the character length must be smaller than or equal to 6."; - } - - if (!is_null($this->container['accountingCode']) && (mb_strlen($this->container['accountingCode']) > 50)) { - $invalidProperties[] = "invalid value for 'accountingCode', the character length must be smaller than or equal to 50."; - } - return $invalidProperties; } @@ -347,28 +347,39 @@ public function valid(): bool /** - * Gets employeeCount + * Gets accountingCode * - * @return int|null + * @return string|null */ - public function getEmployeeCount(): ?int + public function getAccountingCode(): ?string { - return $this->container['employeeCount']; + return $this->container['accountingCode']; } /** - * Sets employeeCount + * Sets accountingCode * - * @param int|null $employeeCount The number of employees with this set as their primary department + * @param string|null $accountingCode accountingCode * * @return $this */ - public function setEmployeeCount(?int $employeeCount): static + public function setAccountingCode(?string $accountingCode): static { - if (is_null($employeeCount)) { - throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); + if (is_null($accountingCode)) { + array_push($this->openAPINullablesSetToNull, 'accountingCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountingCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeeCount'] = $employeeCount; + if (!is_null($accountingCode) && (mb_strlen($accountingCode) > 50)) { + throw new InvalidArgumentException('invalid length for $accountingCode when calling ContractDepartmentResponse., must be smaller than or equal to 50.'); + } + + $this->container['accountingCode'] = $accountingCode; return $this; } @@ -407,40 +418,6 @@ public function setCode(string $code): static return $this; } - /** - * Gets title - * - * @return string - */ - public function getTitle(): string - { - return $this->container['title']; - } - - /** - * Sets title - * - * @param string $title The name of this Department - * - * @return $this - */ - public function setTitle(string $title): static - { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); - } - if ((mb_strlen($title) > 50)) { - throw new InvalidArgumentException('invalid length for $title when calling ContractDepartmentResponse., must be smaller than or equal to 50.'); - } - if ((mb_strlen($title) < 1)) { - throw new InvalidArgumentException('invalid length for $title when calling ContractDepartmentResponse., must be bigger than or equal to 1.'); - } - - $this->container['title'] = $title; - - return $this; - } - /** * Gets color * @@ -480,39 +457,62 @@ public function setColor(?string $color): static } /** - * Gets accountingCode + * Gets employeeCount * - * @return string|null + * @return int|null */ - public function getAccountingCode(): ?string + public function getEmployeeCount(): ?int { - return $this->container['accountingCode']; + return $this->container['employeeCount']; } /** - * Sets accountingCode + * Sets employeeCount * - * @param string|null $accountingCode accountingCode + * @param int|null $employeeCount The number of employees with this set as their primary department * * @return $this */ - public function setAccountingCode(?string $accountingCode): static + public function setEmployeeCount(?int $employeeCount): static { - if (is_null($accountingCode)) { - array_push($this->openAPINullablesSetToNull, 'accountingCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountingCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employeeCount)) { + throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); } - if (!is_null($accountingCode) && (mb_strlen($accountingCode) > 50)) { - throw new InvalidArgumentException('invalid length for $accountingCode when calling ContractDepartmentResponse., must be smaller than or equal to 50.'); + $this->container['employeeCount'] = $employeeCount; + + return $this; + } + + /** + * Gets title + * + * @return string + */ + public function getTitle(): string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title The name of this Department + * + * @return $this + */ + public function setTitle(string $title): static + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if ((mb_strlen($title) > 50)) { + throw new InvalidArgumentException('invalid length for $title when calling ContractDepartmentResponse., must be smaller than or equal to 50.'); + } + if ((mb_strlen($title) < 1)) { + throw new InvalidArgumentException('invalid length for $title when calling ContractDepartmentResponse., must be bigger than or equal to 1.'); } - $this->container['accountingCode'] = $accountingCode; + $this->container['title'] = $title; return $this; } diff --git a/src/Model/ContractDirectorshipDetails.php b/src/Model/ContractDirectorshipDetails.php index be59dd8..908430f 100644 --- a/src/Model/ContractDirectorshipDetails.php +++ b/src/Model/ContractDirectorshipDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,9 +60,9 @@ class ContractDirectorshipDetails implements ModelInterface, ArrayAccess, JsonSe */ protected static array $openAPITypes = [ 'isDirector' => 'bool', - 'startDate' => '\DateTime', 'leaveDate' => '\DateTime', - 'niAlternativeMethod' => 'bool' + 'niAlternativeMethod' => 'bool', + 'startDate' => '\DateTime' ]; /** @@ -72,9 +72,9 @@ class ContractDirectorshipDetails implements ModelInterface, ArrayAccess, JsonSe */ protected static array $openAPIFormats = [ 'isDirector' => null, - 'startDate' => 'date', 'leaveDate' => 'date', - 'niAlternativeMethod' => null + 'niAlternativeMethod' => null, + 'startDate' => 'date' ]; /** @@ -84,9 +84,9 @@ class ContractDirectorshipDetails implements ModelInterface, ArrayAccess, JsonSe */ protected static array $openAPINullables = [ 'isDirector' => false, - 'startDate' => true, 'leaveDate' => true, - 'niAlternativeMethod' => false + 'niAlternativeMethod' => false, + 'startDate' => true ]; /** @@ -176,9 +176,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'isDirector' => 'isDirector', - 'startDate' => 'startDate', 'leaveDate' => 'leaveDate', - 'niAlternativeMethod' => 'niAlternativeMethod' + 'niAlternativeMethod' => 'niAlternativeMethod', + 'startDate' => 'startDate' ]; /** @@ -188,9 +188,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'isDirector' => 'setIsDirector', - 'startDate' => 'setStartDate', 'leaveDate' => 'setLeaveDate', - 'niAlternativeMethod' => 'setNiAlternativeMethod' + 'niAlternativeMethod' => 'setNiAlternativeMethod', + 'startDate' => 'setStartDate' ]; /** @@ -200,9 +200,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'isDirector' => 'getIsDirector', - 'startDate' => 'getStartDate', 'leaveDate' => 'getLeaveDate', - 'niAlternativeMethod' => 'getNiAlternativeMethod' + 'niAlternativeMethod' => 'getNiAlternativeMethod', + 'startDate' => 'getStartDate' ]; /** @@ -262,9 +262,9 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('isDirector', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); $this->setIfExists('leaveDate', $data ?? [], null); $this->setIfExists('niAlternativeMethod', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); } /** @@ -336,40 +336,6 @@ public function setIsDirector(?bool $isDirector): static return $this; } - /** - * Gets startDate - * - * @return \DateTime|null - */ - public function getStartDate(): ?\DateTime - { - return $this->container['startDate']; - } - - /** - * Sets startDate - * - * @param \DateTime|null $startDate startDate - * - * @return $this - */ - public function setStartDate(?\DateTime $startDate): static - { - if (is_null($startDate)) { - array_push($this->openAPINullablesSetToNull, 'startDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['startDate'] = $startDate; - - return $this; - } - /** * Gets leaveDate * @@ -430,6 +396,40 @@ public function setNiAlternativeMethod(?bool $niAlternativeMethod): static return $this; } + + /** + * Gets startDate + * + * @return \DateTime|null + */ + public function getStartDate(): ?\DateTime + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param \DateTime|null $startDate startDate + * + * @return $this + */ + public function setStartDate(?\DateTime $startDate): static + { + if (is_null($startDate)) { + array_push($this->openAPINullablesSetToNull, 'startDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['startDate'] = $startDate; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractEmployeeItem.php b/src/Model/ContractEmployeeItem.php index 3fb3c38..62c11c5 100644 --- a/src/Model/ContractEmployeeItem.php +++ b/src/Model/ContractEmployeeItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class ContractEmployeeItem implements ModelInterface, ArrayAccess, JsonSerializa */ protected static array $openAPITypes = [ 'id' => 'string', - 'name' => 'string', 'metadata' => 'mixed', + 'name' => 'string', 'url' => 'string' ]; @@ -72,8 +72,8 @@ class ContractEmployeeItem implements ModelInterface, ArrayAccess, JsonSerializa */ protected static array $openAPIFormats = [ 'id' => 'uuid', - 'name' => null, 'metadata' => null, + 'name' => null, 'url' => null ]; @@ -84,8 +84,8 @@ class ContractEmployeeItem implements ModelInterface, ArrayAccess, JsonSerializa */ protected static array $openAPINullables = [ 'id' => false, - 'name' => true, 'metadata' => true, + 'name' => true, 'url' => true ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'id' => 'id', - 'name' => 'name', 'metadata' => 'metadata', + 'name' => 'name', 'url' => 'url' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'id' => 'setId', - 'name' => 'setName', 'metadata' => 'setMetadata', + 'name' => 'setName', 'url' => 'setUrl' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'id' => 'getId', - 'name' => 'getName', 'metadata' => 'getMetadata', + 'name' => 'getName', 'url' => 'getUrl' ]; @@ -262,8 +262,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); } @@ -337,69 +337,69 @@ public function setId(?string $id): static } /** - * Gets name + * Gets metadata * - * @return string|null + * @return mixed|null */ - public function getName(): ?string + public function getMetadata(): mixed { - return $this->container['name']; + return $this->container['metadata']; } /** - * Sets name + * Sets metadata * - * @param string|null $name name + * @param mixed|null $metadata metadata * * @return $this */ - public function setName(?string $name): static + public function setMetadata(mixed $metadata): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($metadata)) { + array_push($this->openAPINullablesSetToNull, 'metadata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('metadata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['metadata'] = $metadata; return $this; } /** - * Gets metadata + * Gets name * - * @return mixed|null + * @return string|null */ - public function getMetadata(): mixed + public function getName(): ?string { - return $this->container['metadata']; + return $this->container['name']; } /** - * Sets metadata + * Sets name * - * @param mixed|null $metadata metadata + * @param string|null $name name * * @return $this */ - public function setMetadata(mixed $metadata): static + public function setName(?string $name): static { - if (is_null($metadata)) { - array_push($this->openAPINullablesSetToNull, 'metadata'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('metadata', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['metadata'] = $metadata; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/ContractEmployeeLeaveSettingsRequest.php b/src/Model/ContractEmployeeLeaveSettingsRequest.php index d5a84df..fe5fc7f 100644 --- a/src/Model/ContractEmployeeLeaveSettingsRequest.php +++ b/src/Model/ContractEmployeeLeaveSettingsRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,38 +59,38 @@ class ContractEmployeeLeaveSettingsRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'useDefaultHolidayType' => 'bool', - 'useDefaultAllowanceResetDate' => 'bool', - 'useDefaultAllowance' => 'bool', - 'useDefaultAccruePaymentInLieu' => 'bool', - 'useDefaultAccruePaymentInLieuRate' => 'bool', - 'useDefaultAccruePaymentInLieuAllGrossPay' => 'bool', - 'useDefaultHolidayAccrualBasis' => 'bool', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'bool', - 'useDefaultAccrueHoursPerDay' => 'bool', - 'useDefaultMaximumAccruePeriod' => 'bool', - 'allowanceResetDate' => '\DateTime', - 'allowance' => 'float', - 'adjustment' => 'float', - 'holidayType' => '\SynergiTech\Staffology\Model\HolidayType', - 'accrueSetAmount' => 'bool', 'accrueHoursPerDay' => 'float', - 'showAllowanceOnPayslip' => 'bool', - 'showAhpOnPayslip' => 'bool', - 'accruePaymentInLieuRate' => 'float', + 'accruePayCodeSetUniqueId' => 'string', 'accruePaymentInLieuAllGrossPay' => 'bool', 'accruePaymentInLieuPayAutomatically' => 'bool', - 'occupationalSicknessUniqueId' => 'string', - 'accruedPaymentAdjustment' => 'float', + 'accruePaymentInLieuRate' => 'float', + 'accrueSetAmount' => 'bool', 'accruedHoursAdjustment' => 'float', + 'accruedPaymentAdjustment' => 'float', + 'adjustment' => 'float', + 'aggregatedServiceDate' => '\DateTime', + 'allowance' => 'float', + 'allowanceResetDate' => '\DateTime', 'holidayAccrualBasis' => '\SynergiTech\Staffology\Model\HolidayAccrual', 'holidayAccrualDefaultRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', - 'aggregatedServiceDate' => '\DateTime', - 'useAggregatedServiceDate' => 'bool', - 'accruePayCodeSetUniqueId' => 'string', - 'maximumAccruePeriod' => 'float', 'holidayLeaveAccrualCustomRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', - 'useDefaultHolidayAccrualDefaultRateType' => 'bool' + 'holidayType' => '\SynergiTech\Staffology\Model\HolidayType', + 'maximumAccruePeriod' => 'float', + 'occupationalSicknessUniqueId' => 'string', + 'showAhpOnPayslip' => 'bool', + 'showAllowanceOnPayslip' => 'bool', + 'useAggregatedServiceDate' => 'bool', + 'useDefaultAccrueHoursPerDay' => 'bool', + 'useDefaultAccruePaymentInLieu' => 'bool', + 'useDefaultAccruePaymentInLieuAllGrossPay' => 'bool', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'bool', + 'useDefaultAccruePaymentInLieuRate' => 'bool', + 'useDefaultAllowance' => 'bool', + 'useDefaultAllowanceResetDate' => 'bool', + 'useDefaultHolidayAccrualBasis' => 'bool', + 'useDefaultHolidayAccrualDefaultRateType' => 'bool', + 'useDefaultHolidayType' => 'bool', + 'useDefaultMaximumAccruePeriod' => 'bool' ]; /** @@ -99,38 +99,38 @@ class ContractEmployeeLeaveSettingsRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'useDefaultHolidayType' => null, - 'useDefaultAllowanceResetDate' => null, - 'useDefaultAllowance' => null, - 'useDefaultAccruePaymentInLieu' => null, - 'useDefaultAccruePaymentInLieuRate' => null, - 'useDefaultAccruePaymentInLieuAllGrossPay' => null, - 'useDefaultHolidayAccrualBasis' => null, - 'useDefaultAccruePaymentInLieuPayAutomatically' => null, - 'useDefaultAccrueHoursPerDay' => null, - 'useDefaultMaximumAccruePeriod' => null, - 'allowanceResetDate' => 'date', - 'allowance' => 'double', - 'adjustment' => 'double', - 'holidayType' => null, - 'accrueSetAmount' => null, 'accrueHoursPerDay' => 'double', - 'showAllowanceOnPayslip' => null, - 'showAhpOnPayslip' => null, - 'accruePaymentInLieuRate' => 'double', + 'accruePayCodeSetUniqueId' => 'uuid', 'accruePaymentInLieuAllGrossPay' => null, 'accruePaymentInLieuPayAutomatically' => null, - 'occupationalSicknessUniqueId' => 'uuid', - 'accruedPaymentAdjustment' => 'double', + 'accruePaymentInLieuRate' => 'double', + 'accrueSetAmount' => null, 'accruedHoursAdjustment' => 'double', + 'accruedPaymentAdjustment' => 'double', + 'adjustment' => 'double', + 'aggregatedServiceDate' => 'date', + 'allowance' => 'double', + 'allowanceResetDate' => 'date', 'holidayAccrualBasis' => null, 'holidayAccrualDefaultRateType' => null, - 'aggregatedServiceDate' => 'date', - 'useAggregatedServiceDate' => null, - 'accruePayCodeSetUniqueId' => 'uuid', - 'maximumAccruePeriod' => 'double', 'holidayLeaveAccrualCustomRateType' => null, - 'useDefaultHolidayAccrualDefaultRateType' => null + 'holidayType' => null, + 'maximumAccruePeriod' => 'double', + 'occupationalSicknessUniqueId' => 'uuid', + 'showAhpOnPayslip' => null, + 'showAllowanceOnPayslip' => null, + 'useAggregatedServiceDate' => null, + 'useDefaultAccrueHoursPerDay' => null, + 'useDefaultAccruePaymentInLieu' => null, + 'useDefaultAccruePaymentInLieuAllGrossPay' => null, + 'useDefaultAccruePaymentInLieuPayAutomatically' => null, + 'useDefaultAccruePaymentInLieuRate' => null, + 'useDefaultAllowance' => null, + 'useDefaultAllowanceResetDate' => null, + 'useDefaultHolidayAccrualBasis' => null, + 'useDefaultHolidayAccrualDefaultRateType' => null, + 'useDefaultHolidayType' => null, + 'useDefaultMaximumAccruePeriod' => null ]; /** @@ -139,38 +139,38 @@ class ContractEmployeeLeaveSettingsRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'useDefaultHolidayType' => false, - 'useDefaultAllowanceResetDate' => false, - 'useDefaultAllowance' => false, - 'useDefaultAccruePaymentInLieu' => false, - 'useDefaultAccruePaymentInLieuRate' => false, - 'useDefaultAccruePaymentInLieuAllGrossPay' => false, - 'useDefaultHolidayAccrualBasis' => true, - 'useDefaultAccruePaymentInLieuPayAutomatically' => false, - 'useDefaultAccrueHoursPerDay' => false, - 'useDefaultMaximumAccruePeriod' => false, - 'allowanceResetDate' => false, - 'allowance' => false, - 'adjustment' => true, - 'holidayType' => false, - 'accrueSetAmount' => false, 'accrueHoursPerDay' => false, - 'showAllowanceOnPayslip' => false, - 'showAhpOnPayslip' => false, - 'accruePaymentInLieuRate' => false, + 'accruePayCodeSetUniqueId' => true, 'accruePaymentInLieuAllGrossPay' => false, 'accruePaymentInLieuPayAutomatically' => false, - 'occupationalSicknessUniqueId' => true, - 'accruedPaymentAdjustment' => false, + 'accruePaymentInLieuRate' => false, + 'accrueSetAmount' => false, 'accruedHoursAdjustment' => false, + 'accruedPaymentAdjustment' => false, + 'adjustment' => true, + 'aggregatedServiceDate' => true, + 'allowance' => false, + 'allowanceResetDate' => false, 'holidayAccrualBasis' => false, 'holidayAccrualDefaultRateType' => false, - 'aggregatedServiceDate' => true, - 'useAggregatedServiceDate' => false, - 'accruePayCodeSetUniqueId' => true, - 'maximumAccruePeriod' => true, 'holidayLeaveAccrualCustomRateType' => false, - 'useDefaultHolidayAccrualDefaultRateType' => true + 'holidayType' => false, + 'maximumAccruePeriod' => true, + 'occupationalSicknessUniqueId' => true, + 'showAhpOnPayslip' => false, + 'showAllowanceOnPayslip' => false, + 'useAggregatedServiceDate' => false, + 'useDefaultAccrueHoursPerDay' => false, + 'useDefaultAccruePaymentInLieu' => false, + 'useDefaultAccruePaymentInLieuAllGrossPay' => false, + 'useDefaultAccruePaymentInLieuPayAutomatically' => false, + 'useDefaultAccruePaymentInLieuRate' => false, + 'useDefaultAllowance' => false, + 'useDefaultAllowanceResetDate' => false, + 'useDefaultHolidayAccrualBasis' => true, + 'useDefaultHolidayAccrualDefaultRateType' => true, + 'useDefaultHolidayType' => false, + 'useDefaultMaximumAccruePeriod' => false ]; /** @@ -259,38 +259,38 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'useDefaultHolidayType' => 'useDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'useDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'useDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'useDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'useDefaultAccruePaymentInLieuRate', - 'useDefaultAccruePaymentInLieuAllGrossPay' => 'useDefaultAccruePaymentInLieuAllGrossPay', - 'useDefaultHolidayAccrualBasis' => 'useDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'useDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'useDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'useDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'allowanceResetDate', - 'allowance' => 'allowance', - 'adjustment' => 'adjustment', - 'holidayType' => 'holidayType', - 'accrueSetAmount' => 'accrueSetAmount', 'accrueHoursPerDay' => 'accrueHoursPerDay', - 'showAllowanceOnPayslip' => 'showAllowanceOnPayslip', - 'showAhpOnPayslip' => 'showAhpOnPayslip', - 'accruePaymentInLieuRate' => 'accruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'accruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'accruePaymentInLieuPayAutomatically', - 'occupationalSicknessUniqueId' => 'occupationalSicknessUniqueId', - 'accruedPaymentAdjustment' => 'accruedPaymentAdjustment', + 'accruePaymentInLieuRate' => 'accruePaymentInLieuRate', + 'accrueSetAmount' => 'accrueSetAmount', 'accruedHoursAdjustment' => 'accruedHoursAdjustment', + 'accruedPaymentAdjustment' => 'accruedPaymentAdjustment', + 'adjustment' => 'adjustment', + 'aggregatedServiceDate' => 'aggregatedServiceDate', + 'allowance' => 'allowance', + 'allowanceResetDate' => 'allowanceResetDate', 'holidayAccrualBasis' => 'holidayAccrualBasis', 'holidayAccrualDefaultRateType' => 'holidayAccrualDefaultRateType', - 'aggregatedServiceDate' => 'aggregatedServiceDate', - 'useAggregatedServiceDate' => 'useAggregatedServiceDate', - 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'maximumAccruePeriod', 'holidayLeaveAccrualCustomRateType' => 'holidayLeaveAccrualCustomRateType', - 'useDefaultHolidayAccrualDefaultRateType' => 'useDefaultHolidayAccrualDefaultRateType' + 'holidayType' => 'holidayType', + 'maximumAccruePeriod' => 'maximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'occupationalSicknessUniqueId', + 'showAhpOnPayslip' => 'showAhpOnPayslip', + 'showAllowanceOnPayslip' => 'showAllowanceOnPayslip', + 'useAggregatedServiceDate' => 'useAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'useDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'useDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuAllGrossPay' => 'useDefaultAccruePaymentInLieuAllGrossPay', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'useDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'useDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'useDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'useDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'useDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'useDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'useDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'useDefaultMaximumAccruePeriod' ]; /** @@ -299,38 +299,38 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'useDefaultHolidayType' => 'setUseDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'setUseDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'setUseDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'setUseDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'setUseDefaultAccruePaymentInLieuRate', - 'useDefaultAccruePaymentInLieuAllGrossPay' => 'setUseDefaultAccruePaymentInLieuAllGrossPay', - 'useDefaultHolidayAccrualBasis' => 'setUseDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'setUseDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'setUseDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'setUseDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'setAllowanceResetDate', - 'allowance' => 'setAllowance', - 'adjustment' => 'setAdjustment', - 'holidayType' => 'setHolidayType', - 'accrueSetAmount' => 'setAccrueSetAmount', 'accrueHoursPerDay' => 'setAccrueHoursPerDay', - 'showAllowanceOnPayslip' => 'setShowAllowanceOnPayslip', - 'showAhpOnPayslip' => 'setShowAhpOnPayslip', - 'accruePaymentInLieuRate' => 'setAccruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'setAccruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'setAccruePaymentInLieuPayAutomatically', - 'occupationalSicknessUniqueId' => 'setOccupationalSicknessUniqueId', - 'accruedPaymentAdjustment' => 'setAccruedPaymentAdjustment', + 'accruePaymentInLieuRate' => 'setAccruePaymentInLieuRate', + 'accrueSetAmount' => 'setAccrueSetAmount', 'accruedHoursAdjustment' => 'setAccruedHoursAdjustment', + 'accruedPaymentAdjustment' => 'setAccruedPaymentAdjustment', + 'adjustment' => 'setAdjustment', + 'aggregatedServiceDate' => 'setAggregatedServiceDate', + 'allowance' => 'setAllowance', + 'allowanceResetDate' => 'setAllowanceResetDate', 'holidayAccrualBasis' => 'setHolidayAccrualBasis', 'holidayAccrualDefaultRateType' => 'setHolidayAccrualDefaultRateType', - 'aggregatedServiceDate' => 'setAggregatedServiceDate', - 'useAggregatedServiceDate' => 'setUseAggregatedServiceDate', - 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'setMaximumAccruePeriod', 'holidayLeaveAccrualCustomRateType' => 'setHolidayLeaveAccrualCustomRateType', - 'useDefaultHolidayAccrualDefaultRateType' => 'setUseDefaultHolidayAccrualDefaultRateType' + 'holidayType' => 'setHolidayType', + 'maximumAccruePeriod' => 'setMaximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'setOccupationalSicknessUniqueId', + 'showAhpOnPayslip' => 'setShowAhpOnPayslip', + 'showAllowanceOnPayslip' => 'setShowAllowanceOnPayslip', + 'useAggregatedServiceDate' => 'setUseAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'setUseDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'setUseDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuAllGrossPay' => 'setUseDefaultAccruePaymentInLieuAllGrossPay', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'setUseDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'setUseDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'setUseDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'setUseDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'setUseDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'setUseDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'setUseDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'setUseDefaultMaximumAccruePeriod' ]; /** @@ -339,38 +339,38 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'useDefaultHolidayType' => 'getUseDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'getUseDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'getUseDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'getUseDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'getUseDefaultAccruePaymentInLieuRate', - 'useDefaultAccruePaymentInLieuAllGrossPay' => 'getUseDefaultAccruePaymentInLieuAllGrossPay', - 'useDefaultHolidayAccrualBasis' => 'getUseDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'getUseDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'getUseDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'getUseDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'getAllowanceResetDate', - 'allowance' => 'getAllowance', - 'adjustment' => 'getAdjustment', - 'holidayType' => 'getHolidayType', - 'accrueSetAmount' => 'getAccrueSetAmount', 'accrueHoursPerDay' => 'getAccrueHoursPerDay', - 'showAllowanceOnPayslip' => 'getShowAllowanceOnPayslip', - 'showAhpOnPayslip' => 'getShowAhpOnPayslip', - 'accruePaymentInLieuRate' => 'getAccruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'getAccruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'getAccruePaymentInLieuPayAutomatically', - 'occupationalSicknessUniqueId' => 'getOccupationalSicknessUniqueId', - 'accruedPaymentAdjustment' => 'getAccruedPaymentAdjustment', + 'accruePaymentInLieuRate' => 'getAccruePaymentInLieuRate', + 'accrueSetAmount' => 'getAccrueSetAmount', 'accruedHoursAdjustment' => 'getAccruedHoursAdjustment', + 'accruedPaymentAdjustment' => 'getAccruedPaymentAdjustment', + 'adjustment' => 'getAdjustment', + 'aggregatedServiceDate' => 'getAggregatedServiceDate', + 'allowance' => 'getAllowance', + 'allowanceResetDate' => 'getAllowanceResetDate', 'holidayAccrualBasis' => 'getHolidayAccrualBasis', 'holidayAccrualDefaultRateType' => 'getHolidayAccrualDefaultRateType', - 'aggregatedServiceDate' => 'getAggregatedServiceDate', - 'useAggregatedServiceDate' => 'getUseAggregatedServiceDate', - 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'getMaximumAccruePeriod', 'holidayLeaveAccrualCustomRateType' => 'getHolidayLeaveAccrualCustomRateType', - 'useDefaultHolidayAccrualDefaultRateType' => 'getUseDefaultHolidayAccrualDefaultRateType' + 'holidayType' => 'getHolidayType', + 'maximumAccruePeriod' => 'getMaximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'getOccupationalSicknessUniqueId', + 'showAhpOnPayslip' => 'getShowAhpOnPayslip', + 'showAllowanceOnPayslip' => 'getShowAllowanceOnPayslip', + 'useAggregatedServiceDate' => 'getUseAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'getUseDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'getUseDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuAllGrossPay' => 'getUseDefaultAccruePaymentInLieuAllGrossPay', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'getUseDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'getUseDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'getUseDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'getUseDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'getUseDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'getUseDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'getUseDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'getUseDefaultMaximumAccruePeriod' ]; /** @@ -429,38 +429,38 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('useDefaultHolidayType', $data ?? [], null); - $this->setIfExists('useDefaultAllowanceResetDate', $data ?? [], null); - $this->setIfExists('useDefaultAllowance', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieu', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieuRate', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieuAllGrossPay', $data ?? [], null); - $this->setIfExists('useDefaultHolidayAccrualBasis', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieuPayAutomatically', $data ?? [], null); - $this->setIfExists('useDefaultAccrueHoursPerDay', $data ?? [], null); - $this->setIfExists('useDefaultMaximumAccruePeriod', $data ?? [], null); - $this->setIfExists('allowanceResetDate', $data ?? [], null); - $this->setIfExists('allowance', $data ?? [], null); - $this->setIfExists('adjustment', $data ?? [], null); - $this->setIfExists('holidayType', $data ?? [], null); - $this->setIfExists('accrueSetAmount', $data ?? [], null); $this->setIfExists('accrueHoursPerDay', $data ?? [], null); - $this->setIfExists('showAllowanceOnPayslip', $data ?? [], null); - $this->setIfExists('showAhpOnPayslip', $data ?? [], null); - $this->setIfExists('accruePaymentInLieuRate', $data ?? [], null); + $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); $this->setIfExists('accruePaymentInLieuAllGrossPay', $data ?? [], null); $this->setIfExists('accruePaymentInLieuPayAutomatically', $data ?? [], null); - $this->setIfExists('occupationalSicknessUniqueId', $data ?? [], null); - $this->setIfExists('accruedPaymentAdjustment', $data ?? [], null); + $this->setIfExists('accruePaymentInLieuRate', $data ?? [], null); + $this->setIfExists('accrueSetAmount', $data ?? [], null); $this->setIfExists('accruedHoursAdjustment', $data ?? [], null); + $this->setIfExists('accruedPaymentAdjustment', $data ?? [], null); + $this->setIfExists('adjustment', $data ?? [], null); + $this->setIfExists('aggregatedServiceDate', $data ?? [], null); + $this->setIfExists('allowance', $data ?? [], null); + $this->setIfExists('allowanceResetDate', $data ?? [], null); $this->setIfExists('holidayAccrualBasis', $data ?? [], null); $this->setIfExists('holidayAccrualDefaultRateType', $data ?? [], null); - $this->setIfExists('aggregatedServiceDate', $data ?? [], null); - $this->setIfExists('useAggregatedServiceDate', $data ?? [], null); - $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); - $this->setIfExists('maximumAccruePeriod', $data ?? [], null); $this->setIfExists('holidayLeaveAccrualCustomRateType', $data ?? [], null); + $this->setIfExists('holidayType', $data ?? [], null); + $this->setIfExists('maximumAccruePeriod', $data ?? [], null); + $this->setIfExists('occupationalSicknessUniqueId', $data ?? [], null); + $this->setIfExists('showAhpOnPayslip', $data ?? [], null); + $this->setIfExists('showAllowanceOnPayslip', $data ?? [], null); + $this->setIfExists('useAggregatedServiceDate', $data ?? [], null); + $this->setIfExists('useDefaultAccrueHoursPerDay', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieu', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieuAllGrossPay', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieuPayAutomatically', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieuRate', $data ?? [], null); + $this->setIfExists('useDefaultAllowance', $data ?? [], null); + $this->setIfExists('useDefaultAllowanceResetDate', $data ?? [], null); + $this->setIfExists('useDefaultHolidayAccrualBasis', $data ?? [], null); $this->setIfExists('useDefaultHolidayAccrualDefaultRateType', $data ?? [], null); + $this->setIfExists('useDefaultHolidayType', $data ?? [], null); + $this->setIfExists('useDefaultMaximumAccruePeriod', $data ?? [], null); } /** @@ -506,280 +506,321 @@ public function valid(): bool /** - * Gets useDefaultHolidayType + * Gets accrueHoursPerDay * - * @return bool|null + * @return float|null */ - public function getUseDefaultHolidayType(): ?bool + public function getAccrueHoursPerDay(): ?float { - return $this->container['useDefaultHolidayType']; + return $this->container['accrueHoursPerDay']; } /** - * Sets useDefaultHolidayType + * Sets accrueHoursPerDay * - * @param bool|null $useDefaultHolidayType If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accrueHoursPerDay If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued * * @return $this */ - public function setUseDefaultHolidayType(?bool $useDefaultHolidayType): static + public function setAccrueHoursPerDay(?float $accrueHoursPerDay): static { - if (is_null($useDefaultHolidayType)) { - throw new InvalidArgumentException('non-nullable useDefaultHolidayType cannot be null'); + if (is_null($accrueHoursPerDay)) { + throw new InvalidArgumentException('non-nullable accrueHoursPerDay cannot be null'); } - $this->container['useDefaultHolidayType'] = $useDefaultHolidayType; + $this->container['accrueHoursPerDay'] = $accrueHoursPerDay; return $this; } /** - * Gets useDefaultAllowanceResetDate + * Gets accruePayCodeSetUniqueId * - * @return bool|null + * @return string|null */ - public function getUseDefaultAllowanceResetDate(): ?bool + public function getAccruePayCodeSetUniqueId(): ?string { - return $this->container['useDefaultAllowanceResetDate']; + return $this->container['accruePayCodeSetUniqueId']; } /** - * Sets useDefaultAllowanceResetDate + * Sets accruePayCodeSetUniqueId * - * @param bool|null $useDefaultAllowanceResetDate If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param string|null $accruePayCodeSetUniqueId Pay code set to use for accruing holiday pay * * @return $this */ - public function setUseDefaultAllowanceResetDate(?bool $useDefaultAllowanceResetDate): static + public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static { - if (is_null($useDefaultAllowanceResetDate)) { - throw new InvalidArgumentException('non-nullable useDefaultAllowanceResetDate cannot be null'); + if (is_null($accruePayCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useDefaultAllowanceResetDate'] = $useDefaultAllowanceResetDate; + $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; return $this; } /** - * Gets useDefaultAllowance + * Gets accruePaymentInLieuAllGrossPay * * @return bool|null + * @deprecated */ - public function getUseDefaultAllowance(): ?bool + public function getAccruePaymentInLieuAllGrossPay(): ?bool { - return $this->container['useDefaultAllowance']; + return $this->container['accruePaymentInLieuAllGrossPay']; } /** - * Sets useDefaultAllowance + * Sets accruePaymentInLieuAllGrossPay * - * @param bool|null $useDefaultAllowance If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) + * @param bool|null $accruePaymentInLieuAllGrossPay [Deprecated] Please use HolidayAccrualBasis instead. This filed will be removed in a later release. * * @return $this + * @deprecated */ - public function setUseDefaultAllowance(?bool $useDefaultAllowance): static + public function setAccruePaymentInLieuAllGrossPay(?bool $accruePaymentInLieuAllGrossPay): static { - if (is_null($useDefaultAllowance)) { - throw new InvalidArgumentException('non-nullable useDefaultAllowance cannot be null'); + if (is_null($accruePaymentInLieuAllGrossPay)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuAllGrossPay cannot be null'); } - $this->container['useDefaultAllowance'] = $useDefaultAllowance; + $this->container['accruePaymentInLieuAllGrossPay'] = $accruePaymentInLieuAllGrossPay; return $this; } /** - * Gets useDefaultAccruePaymentInLieu + * Gets accruePaymentInLieuPayAutomatically * * @return bool|null */ - public function getUseDefaultAccruePaymentInLieu(): ?bool + public function getAccruePaymentInLieuPayAutomatically(): ?bool { - return $this->container['useDefaultAccruePaymentInLieu']; + return $this->container['accruePaymentInLieuPayAutomatically']; } /** - * Sets useDefaultAccruePaymentInLieu + * Sets accruePaymentInLieuPayAutomatically * - * @param bool|null $useDefaultAccruePaymentInLieu If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param bool|null $accruePaymentInLieuPayAutomatically Set to true if you want employees to be automatically paid any outstanding holiday pay * * @return $this */ - public function setUseDefaultAccruePaymentInLieu(?bool $useDefaultAccruePaymentInLieu): static + public function setAccruePaymentInLieuPayAutomatically(?bool $accruePaymentInLieuPayAutomatically): static { - if (is_null($useDefaultAccruePaymentInLieu)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieu cannot be null'); + if (is_null($accruePaymentInLieuPayAutomatically)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuPayAutomatically cannot be null'); } - $this->container['useDefaultAccruePaymentInLieu'] = $useDefaultAccruePaymentInLieu; + $this->container['accruePaymentInLieuPayAutomatically'] = $accruePaymentInLieuPayAutomatically; return $this; } /** - * Gets useDefaultAccruePaymentInLieuRate + * Gets accruePaymentInLieuRate * - * @return bool|null + * @return float|null */ - public function getUseDefaultAccruePaymentInLieuRate(): ?bool + public function getAccruePaymentInLieuRate(): ?float { - return $this->container['useDefaultAccruePaymentInLieuRate']; + return $this->container['accruePaymentInLieuRate']; } /** - * Sets useDefaultAccruePaymentInLieuRate + * Sets accruePaymentInLieuRate * - * @param bool|null $useDefaultAccruePaymentInLieuRate If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accruePaymentInLieuRate The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. * * @return $this */ - public function setUseDefaultAccruePaymentInLieuRate(?bool $useDefaultAccruePaymentInLieuRate): static + public function setAccruePaymentInLieuRate(?float $accruePaymentInLieuRate): static { - if (is_null($useDefaultAccruePaymentInLieuRate)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuRate cannot be null'); + if (is_null($accruePaymentInLieuRate)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuRate cannot be null'); } - $this->container['useDefaultAccruePaymentInLieuRate'] = $useDefaultAccruePaymentInLieuRate; + $this->container['accruePaymentInLieuRate'] = $accruePaymentInLieuRate; return $this; } /** - * Gets useDefaultAccruePaymentInLieuAllGrossPay + * Gets accrueSetAmount * * @return bool|null - * @deprecated */ - public function getUseDefaultAccruePaymentInLieuAllGrossPay(): ?bool + public function getAccrueSetAmount(): ?bool { - return $this->container['useDefaultAccruePaymentInLieuAllGrossPay']; + return $this->container['accrueSetAmount']; } /** - * Sets useDefaultAccruePaymentInLieuAllGrossPay + * Sets accrueSetAmount * - * @param bool|null $useDefaultAccruePaymentInLieuAllGrossPay [Deprecated] Please use UseUseDefaultHolidayAccrualBasis instead. This filed will be removed in a later release. + * @param bool|null $accrueSetAmount If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. * * @return $this - * @deprecated */ - public function setUseDefaultAccruePaymentInLieuAllGrossPay(?bool $useDefaultAccruePaymentInLieuAllGrossPay): static + public function setAccrueSetAmount(?bool $accrueSetAmount): static { - if (is_null($useDefaultAccruePaymentInLieuAllGrossPay)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuAllGrossPay cannot be null'); + if (is_null($accrueSetAmount)) { + throw new InvalidArgumentException('non-nullable accrueSetAmount cannot be null'); } - $this->container['useDefaultAccruePaymentInLieuAllGrossPay'] = $useDefaultAccruePaymentInLieuAllGrossPay; + $this->container['accrueSetAmount'] = $accrueSetAmount; return $this; } /** - * Gets useDefaultHolidayAccrualBasis + * Gets accruedHoursAdjustment * - * @return bool|null + * @return float|null */ - public function getUseDefaultHolidayAccrualBasis(): ?bool + public function getAccruedHoursAdjustment(): ?float { - return $this->container['useDefaultHolidayAccrualBasis']; + return $this->container['accruedHoursAdjustment']; } /** - * Sets useDefaultHolidayAccrualBasis + * Sets accruedHoursAdjustment * - * @param bool|null $useDefaultHolidayAccrualBasis If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accruedHoursAdjustment Any manual adjustment to the total hours accrued * * @return $this */ - public function setUseDefaultHolidayAccrualBasis(?bool $useDefaultHolidayAccrualBasis): static + public function setAccruedHoursAdjustment(?float $accruedHoursAdjustment): static { - if (is_null($useDefaultHolidayAccrualBasis)) { - array_push($this->openAPINullablesSetToNull, 'useDefaultHolidayAccrualBasis'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('useDefaultHolidayAccrualBasis', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($accruedHoursAdjustment)) { + throw new InvalidArgumentException('non-nullable accruedHoursAdjustment cannot be null'); } - $this->container['useDefaultHolidayAccrualBasis'] = $useDefaultHolidayAccrualBasis; + $this->container['accruedHoursAdjustment'] = $accruedHoursAdjustment; return $this; } /** - * Gets useDefaultAccruePaymentInLieuPayAutomatically + * Gets accruedPaymentAdjustment * - * @return bool|null + * @return float|null */ - public function getUseDefaultAccruePaymentInLieuPayAutomatically(): ?bool + public function getAccruedPaymentAdjustment(): ?float { - return $this->container['useDefaultAccruePaymentInLieuPayAutomatically']; + return $this->container['accruedPaymentAdjustment']; } /** - * Sets useDefaultAccruePaymentInLieuPayAutomatically + * Sets accruedPaymentAdjustment + * + * @param float|null $accruedPaymentAdjustment Any manual adjustment to the total accrued + * + * @return $this + */ + public function setAccruedPaymentAdjustment(?float $accruedPaymentAdjustment): static + { + if (is_null($accruedPaymentAdjustment)) { + throw new InvalidArgumentException('non-nullable accruedPaymentAdjustment cannot be null'); + } + $this->container['accruedPaymentAdjustment'] = $accruedPaymentAdjustment; + + return $this; + } + + /** + * Gets adjustment + * + * @return float|null + */ + public function getAdjustment(): ?float + { + return $this->container['adjustment']; + } + + /** + * Sets adjustment * - * @param bool|null $useDefaultAccruePaymentInLieuPayAutomatically If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $adjustment Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setUseDefaultAccruePaymentInLieuPayAutomatically(?bool $useDefaultAccruePaymentInLieuPayAutomatically): static + public function setAdjustment(?float $adjustment): static { - if (is_null($useDefaultAccruePaymentInLieuPayAutomatically)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuPayAutomatically cannot be null'); + if (is_null($adjustment)) { + array_push($this->openAPINullablesSetToNull, 'adjustment'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('adjustment', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useDefaultAccruePaymentInLieuPayAutomatically'] = $useDefaultAccruePaymentInLieuPayAutomatically; + $this->container['adjustment'] = $adjustment; return $this; } /** - * Gets useDefaultAccrueHoursPerDay + * Gets aggregatedServiceDate * - * @return bool|null + * @return \DateTime|null */ - public function getUseDefaultAccrueHoursPerDay(): ?bool + public function getAggregatedServiceDate(): ?\DateTime { - return $this->container['useDefaultAccrueHoursPerDay']; + return $this->container['aggregatedServiceDate']; } /** - * Sets useDefaultAccrueHoursPerDay + * Sets aggregatedServiceDate * - * @param bool|null $useDefaultAccrueHoursPerDay If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate * * @return $this */ - public function setUseDefaultAccrueHoursPerDay(?bool $useDefaultAccrueHoursPerDay): static + public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static { - if (is_null($useDefaultAccrueHoursPerDay)) { - throw new InvalidArgumentException('non-nullable useDefaultAccrueHoursPerDay cannot be null'); + if (is_null($aggregatedServiceDate)) { + array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('aggregatedServiceDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useDefaultAccrueHoursPerDay'] = $useDefaultAccrueHoursPerDay; + $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; return $this; } /** - * Gets useDefaultMaximumAccruePeriod + * Gets allowance * - * @return bool|null + * @return float|null */ - public function getUseDefaultMaximumAccruePeriod(): ?bool + public function getAllowance(): ?float { - return $this->container['useDefaultMaximumAccruePeriod']; + return $this->container['allowance']; } /** - * Sets useDefaultMaximumAccruePeriod + * Sets allowance * - * @param bool|null $useDefaultMaximumAccruePeriod If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $allowance The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset * * @return $this */ - public function setUseDefaultMaximumAccruePeriod(?bool $useDefaultMaximumAccruePeriod): static + public function setAllowance(?float $allowance): static { - if (is_null($useDefaultMaximumAccruePeriod)) { - throw new InvalidArgumentException('non-nullable useDefaultMaximumAccruePeriod cannot be null'); + if (is_null($allowance)) { + throw new InvalidArgumentException('non-nullable allowance cannot be null'); } - $this->container['useDefaultMaximumAccruePeriod'] = $useDefaultMaximumAccruePeriod; + $this->container['allowance'] = $allowance; return $this; } @@ -812,170 +853,177 @@ public function setAllowanceResetDate(?\DateTime $allowanceResetDate): static } /** - * Gets allowance + * Gets holidayAccrualBasis * - * @return float|null + * @return \SynergiTech\Staffology\Model\HolidayAccrual|null */ - public function getAllowance(): ?float + public function getHolidayAccrualBasis(): ?\SynergiTech\Staffology\Model\HolidayAccrual { - return $this->container['allowance']; + return $this->container['holidayAccrualBasis']; } /** - * Sets allowance + * Sets holidayAccrualBasis * - * @param float|null $allowance The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset + * @param \SynergiTech\Staffology\Model\HolidayAccrual|null $holidayAccrualBasis holidayAccrualBasis * * @return $this */ - public function setAllowance(?float $allowance): static + public function setHolidayAccrualBasis(?\SynergiTech\Staffology\Model\HolidayAccrual $holidayAccrualBasis): static { - if (is_null($allowance)) { - throw new InvalidArgumentException('non-nullable allowance cannot be null'); + if (is_null($holidayAccrualBasis)) { + throw new InvalidArgumentException('non-nullable holidayAccrualBasis cannot be null'); } - $this->container['allowance'] = $allowance; + $this->container['holidayAccrualBasis'] = $holidayAccrualBasis; return $this; } /** - * Gets adjustment + * Gets holidayAccrualDefaultRateType * - * @return float|null + * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null */ - public function getAdjustment(): ?float + public function getHolidayAccrualDefaultRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType { - return $this->container['adjustment']; + return $this->container['holidayAccrualDefaultRateType']; } /** - * Sets adjustment + * Sets holidayAccrualDefaultRateType * - * @param float|null $adjustment Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $holidayAccrualDefaultRateType holidayAccrualDefaultRateType * * @return $this */ - public function setAdjustment(?float $adjustment): static + public function setHolidayAccrualDefaultRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $holidayAccrualDefaultRateType): static { - if (is_null($adjustment)) { - array_push($this->openAPINullablesSetToNull, 'adjustment'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('adjustment', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($holidayAccrualDefaultRateType)) { + throw new InvalidArgumentException('non-nullable holidayAccrualDefaultRateType cannot be null'); } - $this->container['adjustment'] = $adjustment; + $this->container['holidayAccrualDefaultRateType'] = $holidayAccrualDefaultRateType; return $this; } /** - * Gets holidayType + * Gets holidayLeaveAccrualCustomRateType * - * @return \SynergiTech\Staffology\Model\HolidayType|null + * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null */ - public function getHolidayType(): ?\SynergiTech\Staffology\Model\HolidayType + public function getHolidayLeaveAccrualCustomRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType { - return $this->container['holidayType']; + return $this->container['holidayLeaveAccrualCustomRateType']; } /** - * Sets holidayType + * Sets holidayLeaveAccrualCustomRateType * - * @param \SynergiTech\Staffology\Model\HolidayType|null $holidayType holidayType + * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $holidayLeaveAccrualCustomRateType holidayLeaveAccrualCustomRateType * * @return $this */ - public function setHolidayType(?\SynergiTech\Staffology\Model\HolidayType $holidayType): static + public function setHolidayLeaveAccrualCustomRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $holidayLeaveAccrualCustomRateType): static { - if (is_null($holidayType)) { - throw new InvalidArgumentException('non-nullable holidayType cannot be null'); + if (is_null($holidayLeaveAccrualCustomRateType)) { + throw new InvalidArgumentException('non-nullable holidayLeaveAccrualCustomRateType cannot be null'); } - $this->container['holidayType'] = $holidayType; + $this->container['holidayLeaveAccrualCustomRateType'] = $holidayLeaveAccrualCustomRateType; return $this; } /** - * Gets accrueSetAmount + * Gets holidayType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\HolidayType|null */ - public function getAccrueSetAmount(): ?bool + public function getHolidayType(): ?\SynergiTech\Staffology\Model\HolidayType { - return $this->container['accrueSetAmount']; + return $this->container['holidayType']; } /** - * Sets accrueSetAmount + * Sets holidayType * - * @param bool|null $accrueSetAmount If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. + * @param \SynergiTech\Staffology\Model\HolidayType|null $holidayType holidayType * * @return $this */ - public function setAccrueSetAmount(?bool $accrueSetAmount): static + public function setHolidayType(?\SynergiTech\Staffology\Model\HolidayType $holidayType): static { - if (is_null($accrueSetAmount)) { - throw new InvalidArgumentException('non-nullable accrueSetAmount cannot be null'); + if (is_null($holidayType)) { + throw new InvalidArgumentException('non-nullable holidayType cannot be null'); } - $this->container['accrueSetAmount'] = $accrueSetAmount; + $this->container['holidayType'] = $holidayType; return $this; } /** - * Gets accrueHoursPerDay + * Gets maximumAccruePeriod * * @return float|null */ - public function getAccrueHoursPerDay(): ?float + public function getMaximumAccruePeriod(): ?float { - return $this->container['accrueHoursPerDay']; + return $this->container['maximumAccruePeriod']; } /** - * Sets accrueHoursPerDay + * Sets maximumAccruePeriod * - * @param float|null $accrueHoursPerDay If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued + * @param float|null $maximumAccruePeriod The maximum number of hours capable of being accrued in a single period * * @return $this */ - public function setAccrueHoursPerDay(?float $accrueHoursPerDay): static + public function setMaximumAccruePeriod(?float $maximumAccruePeriod): static { - if (is_null($accrueHoursPerDay)) { - throw new InvalidArgumentException('non-nullable accrueHoursPerDay cannot be null'); + if (is_null($maximumAccruePeriod)) { + array_push($this->openAPINullablesSetToNull, 'maximumAccruePeriod'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('maximumAccruePeriod', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['accrueHoursPerDay'] = $accrueHoursPerDay; + $this->container['maximumAccruePeriod'] = $maximumAccruePeriod; return $this; } /** - * Gets showAllowanceOnPayslip + * Gets occupationalSicknessUniqueId * - * @return bool|null + * @return string|null */ - public function getShowAllowanceOnPayslip(): ?bool + public function getOccupationalSicknessUniqueId(): ?string { - return $this->container['showAllowanceOnPayslip']; + return $this->container['occupationalSicknessUniqueId']; } /** - * Sets showAllowanceOnPayslip + * Sets occupationalSicknessUniqueId * - * @param bool|null $showAllowanceOnPayslip If true then the remaining Allowance will be shown on the employees payslip. + * @param string|null $occupationalSicknessUniqueId occupationalSicknessUniqueId * * @return $this */ - public function setShowAllowanceOnPayslip(?bool $showAllowanceOnPayslip): static + public function setOccupationalSicknessUniqueId(?string $occupationalSicknessUniqueId): static { - if (is_null($showAllowanceOnPayslip)) { - throw new InvalidArgumentException('non-nullable showAllowanceOnPayslip cannot be null'); + if (is_null($occupationalSicknessUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'occupationalSicknessUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('occupationalSicknessUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['showAllowanceOnPayslip'] = $showAllowanceOnPayslip; + $this->container['occupationalSicknessUniqueId'] = $occupationalSicknessUniqueId; return $this; } @@ -1008,416 +1056,368 @@ public function setShowAhpOnPayslip(?bool $showAhpOnPayslip): static } /** - * Gets accruePaymentInLieuRate - * - * @return float|null - */ - public function getAccruePaymentInLieuRate(): ?float - { - return $this->container['accruePaymentInLieuRate']; - } - - /** - * Sets accruePaymentInLieuRate - * - * @param float|null $accruePaymentInLieuRate The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. - * - * @return $this - */ - public function setAccruePaymentInLieuRate(?float $accruePaymentInLieuRate): static - { - if (is_null($accruePaymentInLieuRate)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuRate cannot be null'); - } - $this->container['accruePaymentInLieuRate'] = $accruePaymentInLieuRate; - - return $this; - } - - /** - * Gets accruePaymentInLieuAllGrossPay + * Gets showAllowanceOnPayslip * * @return bool|null - * @deprecated */ - public function getAccruePaymentInLieuAllGrossPay(): ?bool + public function getShowAllowanceOnPayslip(): ?bool { - return $this->container['accruePaymentInLieuAllGrossPay']; + return $this->container['showAllowanceOnPayslip']; } /** - * Sets accruePaymentInLieuAllGrossPay + * Sets showAllowanceOnPayslip * - * @param bool|null $accruePaymentInLieuAllGrossPay [Deprecated] Please use HolidayAccrualBasis instead. This filed will be removed in a later release. + * @param bool|null $showAllowanceOnPayslip If true then the remaining Allowance will be shown on the employees payslip. * * @return $this - * @deprecated */ - public function setAccruePaymentInLieuAllGrossPay(?bool $accruePaymentInLieuAllGrossPay): static + public function setShowAllowanceOnPayslip(?bool $showAllowanceOnPayslip): static { - if (is_null($accruePaymentInLieuAllGrossPay)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuAllGrossPay cannot be null'); + if (is_null($showAllowanceOnPayslip)) { + throw new InvalidArgumentException('non-nullable showAllowanceOnPayslip cannot be null'); } - $this->container['accruePaymentInLieuAllGrossPay'] = $accruePaymentInLieuAllGrossPay; + $this->container['showAllowanceOnPayslip'] = $showAllowanceOnPayslip; return $this; } /** - * Gets accruePaymentInLieuPayAutomatically + * Gets useAggregatedServiceDate * * @return bool|null */ - public function getAccruePaymentInLieuPayAutomatically(): ?bool + public function getUseAggregatedServiceDate(): ?bool { - return $this->container['accruePaymentInLieuPayAutomatically']; + return $this->container['useAggregatedServiceDate']; } /** - * Sets accruePaymentInLieuPayAutomatically + * Sets useAggregatedServiceDate * - * @param bool|null $accruePaymentInLieuPayAutomatically Set to true if you want employees to be automatically paid any outstanding holiday pay + * @param bool|null $useAggregatedServiceDate useAggregatedServiceDate * * @return $this */ - public function setAccruePaymentInLieuPayAutomatically(?bool $accruePaymentInLieuPayAutomatically): static + public function setUseAggregatedServiceDate(?bool $useAggregatedServiceDate): static { - if (is_null($accruePaymentInLieuPayAutomatically)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuPayAutomatically cannot be null'); + if (is_null($useAggregatedServiceDate)) { + throw new InvalidArgumentException('non-nullable useAggregatedServiceDate cannot be null'); } - $this->container['accruePaymentInLieuPayAutomatically'] = $accruePaymentInLieuPayAutomatically; + $this->container['useAggregatedServiceDate'] = $useAggregatedServiceDate; return $this; } /** - * Gets occupationalSicknessUniqueId + * Gets useDefaultAccrueHoursPerDay * - * @return string|null + * @return bool|null */ - public function getOccupationalSicknessUniqueId(): ?string + public function getUseDefaultAccrueHoursPerDay(): ?bool { - return $this->container['occupationalSicknessUniqueId']; + return $this->container['useDefaultAccrueHoursPerDay']; } /** - * Sets occupationalSicknessUniqueId + * Sets useDefaultAccrueHoursPerDay * - * @param string|null $occupationalSicknessUniqueId occupationalSicknessUniqueId + * @param bool|null $useDefaultAccrueHoursPerDay If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setOccupationalSicknessUniqueId(?string $occupationalSicknessUniqueId): static + public function setUseDefaultAccrueHoursPerDay(?bool $useDefaultAccrueHoursPerDay): static { - if (is_null($occupationalSicknessUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'occupationalSicknessUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('occupationalSicknessUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useDefaultAccrueHoursPerDay)) { + throw new InvalidArgumentException('non-nullable useDefaultAccrueHoursPerDay cannot be null'); } - $this->container['occupationalSicknessUniqueId'] = $occupationalSicknessUniqueId; + $this->container['useDefaultAccrueHoursPerDay'] = $useDefaultAccrueHoursPerDay; return $this; } /** - * Gets accruedPaymentAdjustment + * Gets useDefaultAccruePaymentInLieu * - * @return float|null + * @return bool|null */ - public function getAccruedPaymentAdjustment(): ?float + public function getUseDefaultAccruePaymentInLieu(): ?bool { - return $this->container['accruedPaymentAdjustment']; + return $this->container['useDefaultAccruePaymentInLieu']; } /** - * Sets accruedPaymentAdjustment + * Sets useDefaultAccruePaymentInLieu * - * @param float|null $accruedPaymentAdjustment Any manual adjustment to the total accrued + * @param bool|null $useDefaultAccruePaymentInLieu If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setAccruedPaymentAdjustment(?float $accruedPaymentAdjustment): static + public function setUseDefaultAccruePaymentInLieu(?bool $useDefaultAccruePaymentInLieu): static { - if (is_null($accruedPaymentAdjustment)) { - throw new InvalidArgumentException('non-nullable accruedPaymentAdjustment cannot be null'); + if (is_null($useDefaultAccruePaymentInLieu)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieu cannot be null'); } - $this->container['accruedPaymentAdjustment'] = $accruedPaymentAdjustment; + $this->container['useDefaultAccruePaymentInLieu'] = $useDefaultAccruePaymentInLieu; return $this; } /** - * Gets accruedHoursAdjustment + * Gets useDefaultAccruePaymentInLieuAllGrossPay * - * @return float|null + * @return bool|null + * @deprecated */ - public function getAccruedHoursAdjustment(): ?float + public function getUseDefaultAccruePaymentInLieuAllGrossPay(): ?bool { - return $this->container['accruedHoursAdjustment']; + return $this->container['useDefaultAccruePaymentInLieuAllGrossPay']; } /** - * Sets accruedHoursAdjustment + * Sets useDefaultAccruePaymentInLieuAllGrossPay * - * @param float|null $accruedHoursAdjustment Any manual adjustment to the total hours accrued + * @param bool|null $useDefaultAccruePaymentInLieuAllGrossPay [Deprecated] Please use UseUseDefaultHolidayAccrualBasis instead. This filed will be removed in a later release. * * @return $this + * @deprecated */ - public function setAccruedHoursAdjustment(?float $accruedHoursAdjustment): static + public function setUseDefaultAccruePaymentInLieuAllGrossPay(?bool $useDefaultAccruePaymentInLieuAllGrossPay): static { - if (is_null($accruedHoursAdjustment)) { - throw new InvalidArgumentException('non-nullable accruedHoursAdjustment cannot be null'); + if (is_null($useDefaultAccruePaymentInLieuAllGrossPay)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuAllGrossPay cannot be null'); } - $this->container['accruedHoursAdjustment'] = $accruedHoursAdjustment; + $this->container['useDefaultAccruePaymentInLieuAllGrossPay'] = $useDefaultAccruePaymentInLieuAllGrossPay; return $this; } /** - * Gets holidayAccrualBasis + * Gets useDefaultAccruePaymentInLieuPayAutomatically * - * @return \SynergiTech\Staffology\Model\HolidayAccrual|null + * @return bool|null */ - public function getHolidayAccrualBasis(): ?\SynergiTech\Staffology\Model\HolidayAccrual + public function getUseDefaultAccruePaymentInLieuPayAutomatically(): ?bool { - return $this->container['holidayAccrualBasis']; + return $this->container['useDefaultAccruePaymentInLieuPayAutomatically']; } /** - * Sets holidayAccrualBasis + * Sets useDefaultAccruePaymentInLieuPayAutomatically * - * @param \SynergiTech\Staffology\Model\HolidayAccrual|null $holidayAccrualBasis holidayAccrualBasis + * @param bool|null $useDefaultAccruePaymentInLieuPayAutomatically If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setHolidayAccrualBasis(?\SynergiTech\Staffology\Model\HolidayAccrual $holidayAccrualBasis): static + public function setUseDefaultAccruePaymentInLieuPayAutomatically(?bool $useDefaultAccruePaymentInLieuPayAutomatically): static { - if (is_null($holidayAccrualBasis)) { - throw new InvalidArgumentException('non-nullable holidayAccrualBasis cannot be null'); + if (is_null($useDefaultAccruePaymentInLieuPayAutomatically)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuPayAutomatically cannot be null'); } - $this->container['holidayAccrualBasis'] = $holidayAccrualBasis; + $this->container['useDefaultAccruePaymentInLieuPayAutomatically'] = $useDefaultAccruePaymentInLieuPayAutomatically; return $this; } /** - * Gets holidayAccrualDefaultRateType + * Gets useDefaultAccruePaymentInLieuRate * - * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null + * @return bool|null */ - public function getHolidayAccrualDefaultRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType + public function getUseDefaultAccruePaymentInLieuRate(): ?bool { - return $this->container['holidayAccrualDefaultRateType']; + return $this->container['useDefaultAccruePaymentInLieuRate']; } /** - * Sets holidayAccrualDefaultRateType + * Sets useDefaultAccruePaymentInLieuRate * - * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $holidayAccrualDefaultRateType holidayAccrualDefaultRateType + * @param bool|null $useDefaultAccruePaymentInLieuRate If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setHolidayAccrualDefaultRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $holidayAccrualDefaultRateType): static + public function setUseDefaultAccruePaymentInLieuRate(?bool $useDefaultAccruePaymentInLieuRate): static { - if (is_null($holidayAccrualDefaultRateType)) { - throw new InvalidArgumentException('non-nullable holidayAccrualDefaultRateType cannot be null'); + if (is_null($useDefaultAccruePaymentInLieuRate)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuRate cannot be null'); } - $this->container['holidayAccrualDefaultRateType'] = $holidayAccrualDefaultRateType; + $this->container['useDefaultAccruePaymentInLieuRate'] = $useDefaultAccruePaymentInLieuRate; return $this; } /** - * Gets aggregatedServiceDate + * Gets useDefaultAllowance * - * @return \DateTime|null + * @return bool|null */ - public function getAggregatedServiceDate(): ?\DateTime + public function getUseDefaultAllowance(): ?bool { - return $this->container['aggregatedServiceDate']; + return $this->container['useDefaultAllowance']; } /** - * Sets aggregatedServiceDate + * Sets useDefaultAllowance * - * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate + * @param bool|null $useDefaultAllowance If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) * * @return $this */ - public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static + public function setUseDefaultAllowance(?bool $useDefaultAllowance): static { - if (is_null($aggregatedServiceDate)) { - array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aggregatedServiceDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useDefaultAllowance)) { + throw new InvalidArgumentException('non-nullable useDefaultAllowance cannot be null'); } - $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; + $this->container['useDefaultAllowance'] = $useDefaultAllowance; return $this; } /** - * Gets useAggregatedServiceDate + * Gets useDefaultAllowanceResetDate * * @return bool|null */ - public function getUseAggregatedServiceDate(): ?bool + public function getUseDefaultAllowanceResetDate(): ?bool { - return $this->container['useAggregatedServiceDate']; + return $this->container['useDefaultAllowanceResetDate']; } /** - * Sets useAggregatedServiceDate + * Sets useDefaultAllowanceResetDate * - * @param bool|null $useAggregatedServiceDate useAggregatedServiceDate + * @param bool|null $useDefaultAllowanceResetDate If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setUseAggregatedServiceDate(?bool $useAggregatedServiceDate): static + public function setUseDefaultAllowanceResetDate(?bool $useDefaultAllowanceResetDate): static { - if (is_null($useAggregatedServiceDate)) { - throw new InvalidArgumentException('non-nullable useAggregatedServiceDate cannot be null'); + if (is_null($useDefaultAllowanceResetDate)) { + throw new InvalidArgumentException('non-nullable useDefaultAllowanceResetDate cannot be null'); } - $this->container['useAggregatedServiceDate'] = $useAggregatedServiceDate; + $this->container['useDefaultAllowanceResetDate'] = $useDefaultAllowanceResetDate; return $this; } /** - * Gets accruePayCodeSetUniqueId + * Gets useDefaultHolidayAccrualBasis * - * @return string|null + * @return bool|null */ - public function getAccruePayCodeSetUniqueId(): ?string + public function getUseDefaultHolidayAccrualBasis(): ?bool { - return $this->container['accruePayCodeSetUniqueId']; + return $this->container['useDefaultHolidayAccrualBasis']; } /** - * Sets accruePayCodeSetUniqueId + * Sets useDefaultHolidayAccrualBasis * - * @param string|null $accruePayCodeSetUniqueId Pay code set to use for accruing holiday pay + * @param bool|null $useDefaultHolidayAccrualBasis If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static + public function setUseDefaultHolidayAccrualBasis(?bool $useDefaultHolidayAccrualBasis): static { - if (is_null($accruePayCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); + if (is_null($useDefaultHolidayAccrualBasis)) { + array_push($this->openAPINullablesSetToNull, 'useDefaultHolidayAccrualBasis'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); + $index = array_search('useDefaultHolidayAccrualBasis', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; + $this->container['useDefaultHolidayAccrualBasis'] = $useDefaultHolidayAccrualBasis; return $this; } /** - * Gets maximumAccruePeriod + * Gets useDefaultHolidayAccrualDefaultRateType * - * @return float|null + * @return bool|null */ - public function getMaximumAccruePeriod(): ?float + public function getUseDefaultHolidayAccrualDefaultRateType(): ?bool { - return $this->container['maximumAccruePeriod']; + return $this->container['useDefaultHolidayAccrualDefaultRateType']; } /** - * Sets maximumAccruePeriod + * Sets useDefaultHolidayAccrualDefaultRateType * - * @param float|null $maximumAccruePeriod The maximum number of hours capable of being accrued in a single period + * @param bool|null $useDefaultHolidayAccrualDefaultRateType If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. * * @return $this */ - public function setMaximumAccruePeriod(?float $maximumAccruePeriod): static + public function setUseDefaultHolidayAccrualDefaultRateType(?bool $useDefaultHolidayAccrualDefaultRateType): static { - if (is_null($maximumAccruePeriod)) { - array_push($this->openAPINullablesSetToNull, 'maximumAccruePeriod'); + if (is_null($useDefaultHolidayAccrualDefaultRateType)) { + array_push($this->openAPINullablesSetToNull, 'useDefaultHolidayAccrualDefaultRateType'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('maximumAccruePeriod', $nullablesSetToNull); + $index = array_search('useDefaultHolidayAccrualDefaultRateType', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['maximumAccruePeriod'] = $maximumAccruePeriod; + $this->container['useDefaultHolidayAccrualDefaultRateType'] = $useDefaultHolidayAccrualDefaultRateType; return $this; } /** - * Gets holidayLeaveAccrualCustomRateType + * Gets useDefaultHolidayType * - * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null + * @return bool|null */ - public function getHolidayLeaveAccrualCustomRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType + public function getUseDefaultHolidayType(): ?bool { - return $this->container['holidayLeaveAccrualCustomRateType']; + return $this->container['useDefaultHolidayType']; } /** - * Sets holidayLeaveAccrualCustomRateType + * Sets useDefaultHolidayType * - * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $holidayLeaveAccrualCustomRateType holidayLeaveAccrualCustomRateType + * @param bool|null $useDefaultHolidayType If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setHolidayLeaveAccrualCustomRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $holidayLeaveAccrualCustomRateType): static + public function setUseDefaultHolidayType(?bool $useDefaultHolidayType): static { - if (is_null($holidayLeaveAccrualCustomRateType)) { - throw new InvalidArgumentException('non-nullable holidayLeaveAccrualCustomRateType cannot be null'); + if (is_null($useDefaultHolidayType)) { + throw new InvalidArgumentException('non-nullable useDefaultHolidayType cannot be null'); } - $this->container['holidayLeaveAccrualCustomRateType'] = $holidayLeaveAccrualCustomRateType; + $this->container['useDefaultHolidayType'] = $useDefaultHolidayType; return $this; } /** - * Gets useDefaultHolidayAccrualDefaultRateType + * Gets useDefaultMaximumAccruePeriod * * @return bool|null */ - public function getUseDefaultHolidayAccrualDefaultRateType(): ?bool + public function getUseDefaultMaximumAccruePeriod(): ?bool { - return $this->container['useDefaultHolidayAccrualDefaultRateType']; + return $this->container['useDefaultMaximumAccruePeriod']; } /** - * Sets useDefaultHolidayAccrualDefaultRateType + * Sets useDefaultMaximumAccruePeriod * - * @param bool|null $useDefaultHolidayAccrualDefaultRateType If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. + * @param bool|null $useDefaultMaximumAccruePeriod If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setUseDefaultHolidayAccrualDefaultRateType(?bool $useDefaultHolidayAccrualDefaultRateType): static + public function setUseDefaultMaximumAccruePeriod(?bool $useDefaultMaximumAccruePeriod): static { - if (is_null($useDefaultHolidayAccrualDefaultRateType)) { - array_push($this->openAPINullablesSetToNull, 'useDefaultHolidayAccrualDefaultRateType'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('useDefaultHolidayAccrualDefaultRateType', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useDefaultMaximumAccruePeriod)) { + throw new InvalidArgumentException('non-nullable useDefaultMaximumAccruePeriod cannot be null'); } - $this->container['useDefaultHolidayAccrualDefaultRateType'] = $useDefaultHolidayAccrualDefaultRateType; + $this->container['useDefaultMaximumAccruePeriod'] = $useDefaultMaximumAccruePeriod; return $this; } diff --git a/src/Model/ContractEmployeeLeaveSettingsResponse.php b/src/Model/ContractEmployeeLeaveSettingsResponse.php index b2d5b6c..3a1d44e 100644 --- a/src/Model/ContractEmployeeLeaveSettingsResponse.php +++ b/src/Model/ContractEmployeeLeaveSettingsResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,48 +59,48 @@ class ContractEmployeeLeaveSettingsResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPITypes = [ - 'allowanceUsed' => 'float', - 'allowanceUsedPreviousPeriod' => 'float', - 'allowanceRemaining' => 'float', - 'accruedPaymentLiability' => 'float', - 'accruedPaymentPaid' => 'float', - 'accruedPaymentBalance' => 'float', - 'accruedHoursAmount' => 'float', - 'accruedHoursPaid' => 'float', - 'accruedHoursBalance' => 'float', - 'holidayAccrualResetDate' => '\DateTime', - 'useDefaultHolidayType' => 'bool', - 'useDefaultAllowanceResetDate' => 'bool', - 'useDefaultAllowance' => 'bool', - 'useDefaultAccruePaymentInLieu' => 'bool', - 'useDefaultAccruePaymentInLieuRate' => 'bool', - 'useDefaultAccruePaymentInLieuAllGrossPay' => 'bool', - 'useDefaultHolidayAccrualBasis' => 'bool', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'bool', - 'useDefaultAccrueHoursPerDay' => 'bool', - 'useDefaultMaximumAccruePeriod' => 'bool', - 'allowanceResetDate' => '\DateTime', - 'allowance' => 'float', - 'adjustment' => 'float', - 'holidayType' => '\SynergiTech\Staffology\Model\HolidayType', - 'accrueSetAmount' => 'bool', 'accrueHoursPerDay' => 'float', - 'showAllowanceOnPayslip' => 'bool', - 'showAhpOnPayslip' => 'bool', - 'accruePaymentInLieuRate' => 'float', + 'accruePayCodeSetUniqueId' => 'string', 'accruePaymentInLieuAllGrossPay' => 'bool', 'accruePaymentInLieuPayAutomatically' => 'bool', - 'occupationalSicknessUniqueId' => 'string', - 'accruedPaymentAdjustment' => 'float', + 'accruePaymentInLieuRate' => 'float', + 'accrueSetAmount' => 'bool', 'accruedHoursAdjustment' => 'float', + 'accruedHoursAmount' => 'float', + 'accruedHoursBalance' => 'float', + 'accruedHoursPaid' => 'float', + 'accruedPaymentAdjustment' => 'float', + 'accruedPaymentBalance' => 'float', + 'accruedPaymentLiability' => 'float', + 'accruedPaymentPaid' => 'float', + 'adjustment' => 'float', + 'aggregatedServiceDate' => '\DateTime', + 'allowance' => 'float', + 'allowanceRemaining' => 'float', + 'allowanceResetDate' => '\DateTime', + 'allowanceUsed' => 'float', + 'allowanceUsedPreviousPeriod' => 'float', 'holidayAccrualBasis' => '\SynergiTech\Staffology\Model\HolidayAccrual', 'holidayAccrualDefaultRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', - 'aggregatedServiceDate' => '\DateTime', - 'useAggregatedServiceDate' => 'bool', - 'accruePayCodeSetUniqueId' => 'string', - 'maximumAccruePeriod' => 'float', + 'holidayAccrualResetDate' => '\DateTime', 'holidayLeaveAccrualCustomRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', - 'useDefaultHolidayAccrualDefaultRateType' => 'bool' + 'holidayType' => '\SynergiTech\Staffology\Model\HolidayType', + 'maximumAccruePeriod' => 'float', + 'occupationalSicknessUniqueId' => 'string', + 'showAhpOnPayslip' => 'bool', + 'showAllowanceOnPayslip' => 'bool', + 'useAggregatedServiceDate' => 'bool', + 'useDefaultAccrueHoursPerDay' => 'bool', + 'useDefaultAccruePaymentInLieu' => 'bool', + 'useDefaultAccruePaymentInLieuAllGrossPay' => 'bool', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'bool', + 'useDefaultAccruePaymentInLieuRate' => 'bool', + 'useDefaultAllowance' => 'bool', + 'useDefaultAllowanceResetDate' => 'bool', + 'useDefaultHolidayAccrualBasis' => 'bool', + 'useDefaultHolidayAccrualDefaultRateType' => 'bool', + 'useDefaultHolidayType' => 'bool', + 'useDefaultMaximumAccruePeriod' => 'bool' ]; /** @@ -109,48 +109,48 @@ class ContractEmployeeLeaveSettingsResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPIFormats = [ - 'allowanceUsed' => 'double', - 'allowanceUsedPreviousPeriod' => 'double', - 'allowanceRemaining' => 'double', - 'accruedPaymentLiability' => 'double', - 'accruedPaymentPaid' => 'double', - 'accruedPaymentBalance' => 'double', - 'accruedHoursAmount' => 'double', - 'accruedHoursPaid' => 'double', - 'accruedHoursBalance' => 'double', - 'holidayAccrualResetDate' => 'date', - 'useDefaultHolidayType' => null, - 'useDefaultAllowanceResetDate' => null, - 'useDefaultAllowance' => null, - 'useDefaultAccruePaymentInLieu' => null, - 'useDefaultAccruePaymentInLieuRate' => null, - 'useDefaultAccruePaymentInLieuAllGrossPay' => null, - 'useDefaultHolidayAccrualBasis' => null, - 'useDefaultAccruePaymentInLieuPayAutomatically' => null, - 'useDefaultAccrueHoursPerDay' => null, - 'useDefaultMaximumAccruePeriod' => null, - 'allowanceResetDate' => 'date', - 'allowance' => 'double', - 'adjustment' => 'double', - 'holidayType' => null, - 'accrueSetAmount' => null, 'accrueHoursPerDay' => 'double', - 'showAllowanceOnPayslip' => null, - 'showAhpOnPayslip' => null, - 'accruePaymentInLieuRate' => 'double', + 'accruePayCodeSetUniqueId' => 'uuid', 'accruePaymentInLieuAllGrossPay' => null, 'accruePaymentInLieuPayAutomatically' => null, - 'occupationalSicknessUniqueId' => 'uuid', - 'accruedPaymentAdjustment' => 'double', + 'accruePaymentInLieuRate' => 'double', + 'accrueSetAmount' => null, 'accruedHoursAdjustment' => 'double', + 'accruedHoursAmount' => 'double', + 'accruedHoursBalance' => 'double', + 'accruedHoursPaid' => 'double', + 'accruedPaymentAdjustment' => 'double', + 'accruedPaymentBalance' => 'double', + 'accruedPaymentLiability' => 'double', + 'accruedPaymentPaid' => 'double', + 'adjustment' => 'double', + 'aggregatedServiceDate' => 'date', + 'allowance' => 'double', + 'allowanceRemaining' => 'double', + 'allowanceResetDate' => 'date', + 'allowanceUsed' => 'double', + 'allowanceUsedPreviousPeriod' => 'double', 'holidayAccrualBasis' => null, 'holidayAccrualDefaultRateType' => null, - 'aggregatedServiceDate' => 'date', - 'useAggregatedServiceDate' => null, - 'accruePayCodeSetUniqueId' => 'uuid', - 'maximumAccruePeriod' => 'double', + 'holidayAccrualResetDate' => 'date', 'holidayLeaveAccrualCustomRateType' => null, - 'useDefaultHolidayAccrualDefaultRateType' => null + 'holidayType' => null, + 'maximumAccruePeriod' => 'double', + 'occupationalSicknessUniqueId' => 'uuid', + 'showAhpOnPayslip' => null, + 'showAllowanceOnPayslip' => null, + 'useAggregatedServiceDate' => null, + 'useDefaultAccrueHoursPerDay' => null, + 'useDefaultAccruePaymentInLieu' => null, + 'useDefaultAccruePaymentInLieuAllGrossPay' => null, + 'useDefaultAccruePaymentInLieuPayAutomatically' => null, + 'useDefaultAccruePaymentInLieuRate' => null, + 'useDefaultAllowance' => null, + 'useDefaultAllowanceResetDate' => null, + 'useDefaultHolidayAccrualBasis' => null, + 'useDefaultHolidayAccrualDefaultRateType' => null, + 'useDefaultHolidayType' => null, + 'useDefaultMaximumAccruePeriod' => null ]; /** @@ -159,48 +159,48 @@ class ContractEmployeeLeaveSettingsResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPINullables = [ - 'allowanceUsed' => false, - 'allowanceUsedPreviousPeriod' => false, - 'allowanceRemaining' => false, - 'accruedPaymentLiability' => false, - 'accruedPaymentPaid' => false, - 'accruedPaymentBalance' => false, - 'accruedHoursAmount' => false, - 'accruedHoursPaid' => false, - 'accruedHoursBalance' => false, - 'holidayAccrualResetDate' => true, - 'useDefaultHolidayType' => false, - 'useDefaultAllowanceResetDate' => false, - 'useDefaultAllowance' => false, - 'useDefaultAccruePaymentInLieu' => false, - 'useDefaultAccruePaymentInLieuRate' => false, - 'useDefaultAccruePaymentInLieuAllGrossPay' => false, - 'useDefaultHolidayAccrualBasis' => true, - 'useDefaultAccruePaymentInLieuPayAutomatically' => false, - 'useDefaultAccrueHoursPerDay' => false, - 'useDefaultMaximumAccruePeriod' => false, - 'allowanceResetDate' => false, - 'allowance' => false, - 'adjustment' => true, - 'holidayType' => false, - 'accrueSetAmount' => false, 'accrueHoursPerDay' => false, - 'showAllowanceOnPayslip' => false, - 'showAhpOnPayslip' => false, - 'accruePaymentInLieuRate' => false, + 'accruePayCodeSetUniqueId' => true, 'accruePaymentInLieuAllGrossPay' => false, 'accruePaymentInLieuPayAutomatically' => false, - 'occupationalSicknessUniqueId' => true, - 'accruedPaymentAdjustment' => false, + 'accruePaymentInLieuRate' => false, + 'accrueSetAmount' => false, 'accruedHoursAdjustment' => false, + 'accruedHoursAmount' => false, + 'accruedHoursBalance' => false, + 'accruedHoursPaid' => false, + 'accruedPaymentAdjustment' => false, + 'accruedPaymentBalance' => false, + 'accruedPaymentLiability' => false, + 'accruedPaymentPaid' => false, + 'adjustment' => true, + 'aggregatedServiceDate' => true, + 'allowance' => false, + 'allowanceRemaining' => false, + 'allowanceResetDate' => false, + 'allowanceUsed' => false, + 'allowanceUsedPreviousPeriod' => false, 'holidayAccrualBasis' => false, 'holidayAccrualDefaultRateType' => false, - 'aggregatedServiceDate' => true, - 'useAggregatedServiceDate' => false, - 'accruePayCodeSetUniqueId' => true, - 'maximumAccruePeriod' => true, + 'holidayAccrualResetDate' => true, 'holidayLeaveAccrualCustomRateType' => false, - 'useDefaultHolidayAccrualDefaultRateType' => true + 'holidayType' => false, + 'maximumAccruePeriod' => true, + 'occupationalSicknessUniqueId' => true, + 'showAhpOnPayslip' => false, + 'showAllowanceOnPayslip' => false, + 'useAggregatedServiceDate' => false, + 'useDefaultAccrueHoursPerDay' => false, + 'useDefaultAccruePaymentInLieu' => false, + 'useDefaultAccruePaymentInLieuAllGrossPay' => false, + 'useDefaultAccruePaymentInLieuPayAutomatically' => false, + 'useDefaultAccruePaymentInLieuRate' => false, + 'useDefaultAllowance' => false, + 'useDefaultAllowanceResetDate' => false, + 'useDefaultHolidayAccrualBasis' => true, + 'useDefaultHolidayAccrualDefaultRateType' => true, + 'useDefaultHolidayType' => false, + 'useDefaultMaximumAccruePeriod' => false ]; /** @@ -289,48 +289,48 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'allowanceUsed' => 'allowanceUsed', - 'allowanceUsedPreviousPeriod' => 'allowanceUsedPreviousPeriod', - 'allowanceRemaining' => 'allowanceRemaining', - 'accruedPaymentLiability' => 'accruedPaymentLiability', - 'accruedPaymentPaid' => 'accruedPaymentPaid', - 'accruedPaymentBalance' => 'accruedPaymentBalance', - 'accruedHoursAmount' => 'accruedHoursAmount', - 'accruedHoursPaid' => 'accruedHoursPaid', - 'accruedHoursBalance' => 'accruedHoursBalance', - 'holidayAccrualResetDate' => 'holidayAccrualResetDate', - 'useDefaultHolidayType' => 'useDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'useDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'useDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'useDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'useDefaultAccruePaymentInLieuRate', - 'useDefaultAccruePaymentInLieuAllGrossPay' => 'useDefaultAccruePaymentInLieuAllGrossPay', - 'useDefaultHolidayAccrualBasis' => 'useDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'useDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'useDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'useDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'allowanceResetDate', - 'allowance' => 'allowance', - 'adjustment' => 'adjustment', - 'holidayType' => 'holidayType', - 'accrueSetAmount' => 'accrueSetAmount', 'accrueHoursPerDay' => 'accrueHoursPerDay', - 'showAllowanceOnPayslip' => 'showAllowanceOnPayslip', - 'showAhpOnPayslip' => 'showAhpOnPayslip', - 'accruePaymentInLieuRate' => 'accruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'accruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'accruePaymentInLieuPayAutomatically', - 'occupationalSicknessUniqueId' => 'occupationalSicknessUniqueId', - 'accruedPaymentAdjustment' => 'accruedPaymentAdjustment', + 'accruePaymentInLieuRate' => 'accruePaymentInLieuRate', + 'accrueSetAmount' => 'accrueSetAmount', 'accruedHoursAdjustment' => 'accruedHoursAdjustment', + 'accruedHoursAmount' => 'accruedHoursAmount', + 'accruedHoursBalance' => 'accruedHoursBalance', + 'accruedHoursPaid' => 'accruedHoursPaid', + 'accruedPaymentAdjustment' => 'accruedPaymentAdjustment', + 'accruedPaymentBalance' => 'accruedPaymentBalance', + 'accruedPaymentLiability' => 'accruedPaymentLiability', + 'accruedPaymentPaid' => 'accruedPaymentPaid', + 'adjustment' => 'adjustment', + 'aggregatedServiceDate' => 'aggregatedServiceDate', + 'allowance' => 'allowance', + 'allowanceRemaining' => 'allowanceRemaining', + 'allowanceResetDate' => 'allowanceResetDate', + 'allowanceUsed' => 'allowanceUsed', + 'allowanceUsedPreviousPeriod' => 'allowanceUsedPreviousPeriod', 'holidayAccrualBasis' => 'holidayAccrualBasis', 'holidayAccrualDefaultRateType' => 'holidayAccrualDefaultRateType', - 'aggregatedServiceDate' => 'aggregatedServiceDate', - 'useAggregatedServiceDate' => 'useAggregatedServiceDate', - 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'maximumAccruePeriod', + 'holidayAccrualResetDate' => 'holidayAccrualResetDate', 'holidayLeaveAccrualCustomRateType' => 'holidayLeaveAccrualCustomRateType', - 'useDefaultHolidayAccrualDefaultRateType' => 'useDefaultHolidayAccrualDefaultRateType' + 'holidayType' => 'holidayType', + 'maximumAccruePeriod' => 'maximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'occupationalSicknessUniqueId', + 'showAhpOnPayslip' => 'showAhpOnPayslip', + 'showAllowanceOnPayslip' => 'showAllowanceOnPayslip', + 'useAggregatedServiceDate' => 'useAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'useDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'useDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuAllGrossPay' => 'useDefaultAccruePaymentInLieuAllGrossPay', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'useDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'useDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'useDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'useDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'useDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'useDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'useDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'useDefaultMaximumAccruePeriod' ]; /** @@ -339,98 +339,98 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'allowanceUsed' => 'setAllowanceUsed', - 'allowanceUsedPreviousPeriod' => 'setAllowanceUsedPreviousPeriod', - 'allowanceRemaining' => 'setAllowanceRemaining', - 'accruedPaymentLiability' => 'setAccruedPaymentLiability', - 'accruedPaymentPaid' => 'setAccruedPaymentPaid', - 'accruedPaymentBalance' => 'setAccruedPaymentBalance', - 'accruedHoursAmount' => 'setAccruedHoursAmount', - 'accruedHoursPaid' => 'setAccruedHoursPaid', - 'accruedHoursBalance' => 'setAccruedHoursBalance', - 'holidayAccrualResetDate' => 'setHolidayAccrualResetDate', - 'useDefaultHolidayType' => 'setUseDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'setUseDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'setUseDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'setUseDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'setUseDefaultAccruePaymentInLieuRate', - 'useDefaultAccruePaymentInLieuAllGrossPay' => 'setUseDefaultAccruePaymentInLieuAllGrossPay', - 'useDefaultHolidayAccrualBasis' => 'setUseDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'setUseDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'setUseDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'setUseDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'setAllowanceResetDate', - 'allowance' => 'setAllowance', - 'adjustment' => 'setAdjustment', - 'holidayType' => 'setHolidayType', - 'accrueSetAmount' => 'setAccrueSetAmount', 'accrueHoursPerDay' => 'setAccrueHoursPerDay', - 'showAllowanceOnPayslip' => 'setShowAllowanceOnPayslip', - 'showAhpOnPayslip' => 'setShowAhpOnPayslip', - 'accruePaymentInLieuRate' => 'setAccruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'setAccruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'setAccruePaymentInLieuPayAutomatically', - 'occupationalSicknessUniqueId' => 'setOccupationalSicknessUniqueId', - 'accruedPaymentAdjustment' => 'setAccruedPaymentAdjustment', + 'accruePaymentInLieuRate' => 'setAccruePaymentInLieuRate', + 'accrueSetAmount' => 'setAccrueSetAmount', 'accruedHoursAdjustment' => 'setAccruedHoursAdjustment', + 'accruedHoursAmount' => 'setAccruedHoursAmount', + 'accruedHoursBalance' => 'setAccruedHoursBalance', + 'accruedHoursPaid' => 'setAccruedHoursPaid', + 'accruedPaymentAdjustment' => 'setAccruedPaymentAdjustment', + 'accruedPaymentBalance' => 'setAccruedPaymentBalance', + 'accruedPaymentLiability' => 'setAccruedPaymentLiability', + 'accruedPaymentPaid' => 'setAccruedPaymentPaid', + 'adjustment' => 'setAdjustment', + 'aggregatedServiceDate' => 'setAggregatedServiceDate', + 'allowance' => 'setAllowance', + 'allowanceRemaining' => 'setAllowanceRemaining', + 'allowanceResetDate' => 'setAllowanceResetDate', + 'allowanceUsed' => 'setAllowanceUsed', + 'allowanceUsedPreviousPeriod' => 'setAllowanceUsedPreviousPeriod', 'holidayAccrualBasis' => 'setHolidayAccrualBasis', 'holidayAccrualDefaultRateType' => 'setHolidayAccrualDefaultRateType', - 'aggregatedServiceDate' => 'setAggregatedServiceDate', - 'useAggregatedServiceDate' => 'setUseAggregatedServiceDate', - 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'setMaximumAccruePeriod', + 'holidayAccrualResetDate' => 'setHolidayAccrualResetDate', 'holidayLeaveAccrualCustomRateType' => 'setHolidayLeaveAccrualCustomRateType', - 'useDefaultHolidayAccrualDefaultRateType' => 'setUseDefaultHolidayAccrualDefaultRateType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var array - */ - protected static array $getters = [ - 'allowanceUsed' => 'getAllowanceUsed', - 'allowanceUsedPreviousPeriod' => 'getAllowanceUsedPreviousPeriod', - 'allowanceRemaining' => 'getAllowanceRemaining', - 'accruedPaymentLiability' => 'getAccruedPaymentLiability', - 'accruedPaymentPaid' => 'getAccruedPaymentPaid', - 'accruedPaymentBalance' => 'getAccruedPaymentBalance', - 'accruedHoursAmount' => 'getAccruedHoursAmount', - 'accruedHoursPaid' => 'getAccruedHoursPaid', - 'accruedHoursBalance' => 'getAccruedHoursBalance', - 'holidayAccrualResetDate' => 'getHolidayAccrualResetDate', - 'useDefaultHolidayType' => 'getUseDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'getUseDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'getUseDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'getUseDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'getUseDefaultAccruePaymentInLieuRate', - 'useDefaultAccruePaymentInLieuAllGrossPay' => 'getUseDefaultAccruePaymentInLieuAllGrossPay', - 'useDefaultHolidayAccrualBasis' => 'getUseDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'getUseDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'getUseDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'getUseDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'getAllowanceResetDate', - 'allowance' => 'getAllowance', - 'adjustment' => 'getAdjustment', - 'holidayType' => 'getHolidayType', - 'accrueSetAmount' => 'getAccrueSetAmount', + 'holidayType' => 'setHolidayType', + 'maximumAccruePeriod' => 'setMaximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'setOccupationalSicknessUniqueId', + 'showAhpOnPayslip' => 'setShowAhpOnPayslip', + 'showAllowanceOnPayslip' => 'setShowAllowanceOnPayslip', + 'useAggregatedServiceDate' => 'setUseAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'setUseDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'setUseDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuAllGrossPay' => 'setUseDefaultAccruePaymentInLieuAllGrossPay', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'setUseDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'setUseDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'setUseDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'setUseDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'setUseDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'setUseDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'setUseDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'setUseDefaultMaximumAccruePeriod' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ 'accrueHoursPerDay' => 'getAccrueHoursPerDay', - 'showAllowanceOnPayslip' => 'getShowAllowanceOnPayslip', - 'showAhpOnPayslip' => 'getShowAhpOnPayslip', - 'accruePaymentInLieuRate' => 'getAccruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'getAccruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'getAccruePaymentInLieuPayAutomatically', - 'occupationalSicknessUniqueId' => 'getOccupationalSicknessUniqueId', - 'accruedPaymentAdjustment' => 'getAccruedPaymentAdjustment', + 'accruePaymentInLieuRate' => 'getAccruePaymentInLieuRate', + 'accrueSetAmount' => 'getAccrueSetAmount', 'accruedHoursAdjustment' => 'getAccruedHoursAdjustment', + 'accruedHoursAmount' => 'getAccruedHoursAmount', + 'accruedHoursBalance' => 'getAccruedHoursBalance', + 'accruedHoursPaid' => 'getAccruedHoursPaid', + 'accruedPaymentAdjustment' => 'getAccruedPaymentAdjustment', + 'accruedPaymentBalance' => 'getAccruedPaymentBalance', + 'accruedPaymentLiability' => 'getAccruedPaymentLiability', + 'accruedPaymentPaid' => 'getAccruedPaymentPaid', + 'adjustment' => 'getAdjustment', + 'aggregatedServiceDate' => 'getAggregatedServiceDate', + 'allowance' => 'getAllowance', + 'allowanceRemaining' => 'getAllowanceRemaining', + 'allowanceResetDate' => 'getAllowanceResetDate', + 'allowanceUsed' => 'getAllowanceUsed', + 'allowanceUsedPreviousPeriod' => 'getAllowanceUsedPreviousPeriod', 'holidayAccrualBasis' => 'getHolidayAccrualBasis', 'holidayAccrualDefaultRateType' => 'getHolidayAccrualDefaultRateType', - 'aggregatedServiceDate' => 'getAggregatedServiceDate', - 'useAggregatedServiceDate' => 'getUseAggregatedServiceDate', - 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'getMaximumAccruePeriod', + 'holidayAccrualResetDate' => 'getHolidayAccrualResetDate', 'holidayLeaveAccrualCustomRateType' => 'getHolidayLeaveAccrualCustomRateType', - 'useDefaultHolidayAccrualDefaultRateType' => 'getUseDefaultHolidayAccrualDefaultRateType' + 'holidayType' => 'getHolidayType', + 'maximumAccruePeriod' => 'getMaximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'getOccupationalSicknessUniqueId', + 'showAhpOnPayslip' => 'getShowAhpOnPayslip', + 'showAllowanceOnPayslip' => 'getShowAllowanceOnPayslip', + 'useAggregatedServiceDate' => 'getUseAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'getUseDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'getUseDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuAllGrossPay' => 'getUseDefaultAccruePaymentInLieuAllGrossPay', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'getUseDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'getUseDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'getUseDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'getUseDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'getUseDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'getUseDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'getUseDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'getUseDefaultMaximumAccruePeriod' ]; /** @@ -489,48 +489,48 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('allowanceUsed', $data ?? [], null); - $this->setIfExists('allowanceUsedPreviousPeriod', $data ?? [], null); - $this->setIfExists('allowanceRemaining', $data ?? [], null); - $this->setIfExists('accruedPaymentLiability', $data ?? [], null); - $this->setIfExists('accruedPaymentPaid', $data ?? [], null); - $this->setIfExists('accruedPaymentBalance', $data ?? [], null); - $this->setIfExists('accruedHoursAmount', $data ?? [], null); - $this->setIfExists('accruedHoursPaid', $data ?? [], null); - $this->setIfExists('accruedHoursBalance', $data ?? [], null); - $this->setIfExists('holidayAccrualResetDate', $data ?? [], null); - $this->setIfExists('useDefaultHolidayType', $data ?? [], null); - $this->setIfExists('useDefaultAllowanceResetDate', $data ?? [], null); - $this->setIfExists('useDefaultAllowance', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieu', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieuRate', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieuAllGrossPay', $data ?? [], null); - $this->setIfExists('useDefaultHolidayAccrualBasis', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieuPayAutomatically', $data ?? [], null); - $this->setIfExists('useDefaultAccrueHoursPerDay', $data ?? [], null); - $this->setIfExists('useDefaultMaximumAccruePeriod', $data ?? [], null); - $this->setIfExists('allowanceResetDate', $data ?? [], null); - $this->setIfExists('allowance', $data ?? [], null); - $this->setIfExists('adjustment', $data ?? [], null); - $this->setIfExists('holidayType', $data ?? [], null); - $this->setIfExists('accrueSetAmount', $data ?? [], null); $this->setIfExists('accrueHoursPerDay', $data ?? [], null); - $this->setIfExists('showAllowanceOnPayslip', $data ?? [], null); - $this->setIfExists('showAhpOnPayslip', $data ?? [], null); - $this->setIfExists('accruePaymentInLieuRate', $data ?? [], null); + $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); $this->setIfExists('accruePaymentInLieuAllGrossPay', $data ?? [], null); $this->setIfExists('accruePaymentInLieuPayAutomatically', $data ?? [], null); - $this->setIfExists('occupationalSicknessUniqueId', $data ?? [], null); - $this->setIfExists('accruedPaymentAdjustment', $data ?? [], null); + $this->setIfExists('accruePaymentInLieuRate', $data ?? [], null); + $this->setIfExists('accrueSetAmount', $data ?? [], null); $this->setIfExists('accruedHoursAdjustment', $data ?? [], null); + $this->setIfExists('accruedHoursAmount', $data ?? [], null); + $this->setIfExists('accruedHoursBalance', $data ?? [], null); + $this->setIfExists('accruedHoursPaid', $data ?? [], null); + $this->setIfExists('accruedPaymentAdjustment', $data ?? [], null); + $this->setIfExists('accruedPaymentBalance', $data ?? [], null); + $this->setIfExists('accruedPaymentLiability', $data ?? [], null); + $this->setIfExists('accruedPaymentPaid', $data ?? [], null); + $this->setIfExists('adjustment', $data ?? [], null); + $this->setIfExists('aggregatedServiceDate', $data ?? [], null); + $this->setIfExists('allowance', $data ?? [], null); + $this->setIfExists('allowanceRemaining', $data ?? [], null); + $this->setIfExists('allowanceResetDate', $data ?? [], null); + $this->setIfExists('allowanceUsed', $data ?? [], null); + $this->setIfExists('allowanceUsedPreviousPeriod', $data ?? [], null); $this->setIfExists('holidayAccrualBasis', $data ?? [], null); $this->setIfExists('holidayAccrualDefaultRateType', $data ?? [], null); - $this->setIfExists('aggregatedServiceDate', $data ?? [], null); - $this->setIfExists('useAggregatedServiceDate', $data ?? [], null); - $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); - $this->setIfExists('maximumAccruePeriod', $data ?? [], null); + $this->setIfExists('holidayAccrualResetDate', $data ?? [], null); $this->setIfExists('holidayLeaveAccrualCustomRateType', $data ?? [], null); + $this->setIfExists('holidayType', $data ?? [], null); + $this->setIfExists('maximumAccruePeriod', $data ?? [], null); + $this->setIfExists('occupationalSicknessUniqueId', $data ?? [], null); + $this->setIfExists('showAhpOnPayslip', $data ?? [], null); + $this->setIfExists('showAllowanceOnPayslip', $data ?? [], null); + $this->setIfExists('useAggregatedServiceDate', $data ?? [], null); + $this->setIfExists('useDefaultAccrueHoursPerDay', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieu', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieuAllGrossPay', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieuPayAutomatically', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieuRate', $data ?? [], null); + $this->setIfExists('useDefaultAllowance', $data ?? [], null); + $this->setIfExists('useDefaultAllowanceResetDate', $data ?? [], null); + $this->setIfExists('useDefaultHolidayAccrualBasis', $data ?? [], null); $this->setIfExists('useDefaultHolidayAccrualDefaultRateType', $data ?? [], null); + $this->setIfExists('useDefaultHolidayType', $data ?? [], null); + $this->setIfExists('useDefaultMaximumAccruePeriod', $data ?? [], null); } /** @@ -576,163 +576,199 @@ public function valid(): bool /** - * Gets allowanceUsed + * Gets accrueHoursPerDay * * @return float|null */ - public function getAllowanceUsed(): ?float + public function getAccrueHoursPerDay(): ?float { - return $this->container['allowanceUsed']; + return $this->container['accrueHoursPerDay']; } /** - * Sets allowanceUsed + * Sets accrueHoursPerDay * - * @param float|null $allowanceUsed [readonly] The number of days used from the allowance since last reset + * @param float|null $accrueHoursPerDay If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued * * @return $this */ - public function setAllowanceUsed(?float $allowanceUsed): static + public function setAccrueHoursPerDay(?float $accrueHoursPerDay): static { - if (is_null($allowanceUsed)) { - throw new InvalidArgumentException('non-nullable allowanceUsed cannot be null'); + if (is_null($accrueHoursPerDay)) { + throw new InvalidArgumentException('non-nullable accrueHoursPerDay cannot be null'); } - $this->container['allowanceUsed'] = $allowanceUsed; + $this->container['accrueHoursPerDay'] = $accrueHoursPerDay; return $this; } /** - * Gets allowanceUsedPreviousPeriod + * Gets accruePayCodeSetUniqueId * - * @return float|null + * @return string|null */ - public function getAllowanceUsedPreviousPeriod(): ?float + public function getAccruePayCodeSetUniqueId(): ?string { - return $this->container['allowanceUsedPreviousPeriod']; + return $this->container['accruePayCodeSetUniqueId']; } /** - * Sets allowanceUsedPreviousPeriod + * Sets accruePayCodeSetUniqueId * - * @param float|null $allowanceUsedPreviousPeriod [readonly] The number of days used in the 12 months prior to the last reset + * @param string|null $accruePayCodeSetUniqueId Pay code set to use for accruing holiday pay * * @return $this */ - public function setAllowanceUsedPreviousPeriod(?float $allowanceUsedPreviousPeriod): static + public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static { - if (is_null($allowanceUsedPreviousPeriod)) { - throw new InvalidArgumentException('non-nullable allowanceUsedPreviousPeriod cannot be null'); + if (is_null($accruePayCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['allowanceUsedPreviousPeriod'] = $allowanceUsedPreviousPeriod; + $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; return $this; } /** - * Gets allowanceRemaining + * Gets accruePaymentInLieuAllGrossPay * - * @return float|null + * @return bool|null + * @deprecated */ - public function getAllowanceRemaining(): ?float + public function getAccruePaymentInLieuAllGrossPay(): ?bool { - return $this->container['allowanceRemaining']; + return $this->container['accruePaymentInLieuAllGrossPay']; } /** - * Sets allowanceRemaining + * Sets accruePaymentInLieuAllGrossPay * - * @param float|null $allowanceRemaining [readonly] The number of days remaining of the allowance until next reset + * @param bool|null $accruePaymentInLieuAllGrossPay [Deprecated] Please use HolidayAccrualBasis instead. This filed will be removed in a later release. * * @return $this + * @deprecated */ - public function setAllowanceRemaining(?float $allowanceRemaining): static + public function setAccruePaymentInLieuAllGrossPay(?bool $accruePaymentInLieuAllGrossPay): static { - if (is_null($allowanceRemaining)) { - throw new InvalidArgumentException('non-nullable allowanceRemaining cannot be null'); + if (is_null($accruePaymentInLieuAllGrossPay)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuAllGrossPay cannot be null'); } - $this->container['allowanceRemaining'] = $allowanceRemaining; + $this->container['accruePaymentInLieuAllGrossPay'] = $accruePaymentInLieuAllGrossPay; return $this; } /** - * Gets accruedPaymentLiability + * Gets accruePaymentInLieuPayAutomatically * - * @return float|null + * @return bool|null */ - public function getAccruedPaymentLiability(): ?float + public function getAccruePaymentInLieuPayAutomatically(): ?bool { - return $this->container['accruedPaymentLiability']; + return $this->container['accruePaymentInLieuPayAutomatically']; } /** - * Sets accruedPaymentLiability + * Sets accruePaymentInLieuPayAutomatically * - * @param float|null $accruedPaymentLiability [readonly] The total accrued payments for this employee over the lifetime of their employment so far + * @param bool|null $accruePaymentInLieuPayAutomatically Set to true if you want employees to be automatically paid any outstanding holiday pay * * @return $this */ - public function setAccruedPaymentLiability(?float $accruedPaymentLiability): static + public function setAccruePaymentInLieuPayAutomatically(?bool $accruePaymentInLieuPayAutomatically): static { - if (is_null($accruedPaymentLiability)) { - throw new InvalidArgumentException('non-nullable accruedPaymentLiability cannot be null'); + if (is_null($accruePaymentInLieuPayAutomatically)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuPayAutomatically cannot be null'); } - $this->container['accruedPaymentLiability'] = $accruedPaymentLiability; + $this->container['accruePaymentInLieuPayAutomatically'] = $accruePaymentInLieuPayAutomatically; return $this; } /** - * Gets accruedPaymentPaid + * Gets accruePaymentInLieuRate * * @return float|null */ - public function getAccruedPaymentPaid(): ?float + public function getAccruePaymentInLieuRate(): ?float { - return $this->container['accruedPaymentPaid']; + return $this->container['accruePaymentInLieuRate']; } /** - * Sets accruedPaymentPaid + * Sets accruePaymentInLieuRate * - * @param float|null $accruedPaymentPaid [readonly] The Total amount paid to this employee in lieu of holidays + * @param float|null $accruePaymentInLieuRate The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. * * @return $this */ - public function setAccruedPaymentPaid(?float $accruedPaymentPaid): static + public function setAccruePaymentInLieuRate(?float $accruePaymentInLieuRate): static { - if (is_null($accruedPaymentPaid)) { - throw new InvalidArgumentException('non-nullable accruedPaymentPaid cannot be null'); + if (is_null($accruePaymentInLieuRate)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuRate cannot be null'); + } + $this->container['accruePaymentInLieuRate'] = $accruePaymentInLieuRate; + + return $this; + } + + /** + * Gets accrueSetAmount + * + * @return bool|null + */ + public function getAccrueSetAmount(): ?bool + { + return $this->container['accrueSetAmount']; + } + + /** + * Sets accrueSetAmount + * + * @param bool|null $accrueSetAmount If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. + * + * @return $this + */ + public function setAccrueSetAmount(?bool $accrueSetAmount): static + { + if (is_null($accrueSetAmount)) { + throw new InvalidArgumentException('non-nullable accrueSetAmount cannot be null'); } - $this->container['accruedPaymentPaid'] = $accruedPaymentPaid; + $this->container['accrueSetAmount'] = $accrueSetAmount; return $this; } /** - * Gets accruedPaymentBalance + * Gets accruedHoursAdjustment * * @return float|null */ - public function getAccruedPaymentBalance(): ?float + public function getAccruedHoursAdjustment(): ?float { - return $this->container['accruedPaymentBalance']; + return $this->container['accruedHoursAdjustment']; } /** - * Sets accruedPaymentBalance + * Sets accruedHoursAdjustment * - * @param float|null $accruedPaymentBalance [readonly] The balance of what is owed to this employee in lieu of holidays + * @param float|null $accruedHoursAdjustment Any manual adjustment to the total hours accrued * * @return $this */ - public function setAccruedPaymentBalance(?float $accruedPaymentBalance): static + public function setAccruedHoursAdjustment(?float $accruedHoursAdjustment): static { - if (is_null($accruedPaymentBalance)) { - throw new InvalidArgumentException('non-nullable accruedPaymentBalance cannot be null'); + if (is_null($accruedHoursAdjustment)) { + throw new InvalidArgumentException('non-nullable accruedHoursAdjustment cannot be null'); } - $this->container['accruedPaymentBalance'] = $accruedPaymentBalance; + $this->container['accruedHoursAdjustment'] = $accruedHoursAdjustment; return $this; } @@ -765,564 +801,576 @@ public function setAccruedHoursAmount(?float $accruedHoursAmount): static } /** - * Gets accruedHoursPaid + * Gets accruedHoursBalance * * @return float|null */ - public function getAccruedHoursPaid(): ?float + public function getAccruedHoursBalance(): ?float { - return $this->container['accruedHoursPaid']; + return $this->container['accruedHoursBalance']; } /** - * Sets accruedHoursPaid + * Sets accruedHoursBalance * - * @param float|null $accruedHoursPaid [readonly] The Total amount of hours paid to this employee in lieu of holidays + * @param float|null $accruedHoursBalance [readonly] The balance of hours owed to this employee in lieu of holidays * * @return $this */ - public function setAccruedHoursPaid(?float $accruedHoursPaid): static + public function setAccruedHoursBalance(?float $accruedHoursBalance): static { - if (is_null($accruedHoursPaid)) { - throw new InvalidArgumentException('non-nullable accruedHoursPaid cannot be null'); + if (is_null($accruedHoursBalance)) { + throw new InvalidArgumentException('non-nullable accruedHoursBalance cannot be null'); } - $this->container['accruedHoursPaid'] = $accruedHoursPaid; + $this->container['accruedHoursBalance'] = $accruedHoursBalance; return $this; } /** - * Gets accruedHoursBalance + * Gets accruedHoursPaid * * @return float|null */ - public function getAccruedHoursBalance(): ?float + public function getAccruedHoursPaid(): ?float { - return $this->container['accruedHoursBalance']; + return $this->container['accruedHoursPaid']; } /** - * Sets accruedHoursBalance + * Sets accruedHoursPaid * - * @param float|null $accruedHoursBalance [readonly] The balance of hours owed to this employee in lieu of holidays + * @param float|null $accruedHoursPaid [readonly] The Total amount of hours paid to this employee in lieu of holidays * * @return $this */ - public function setAccruedHoursBalance(?float $accruedHoursBalance): static + public function setAccruedHoursPaid(?float $accruedHoursPaid): static { - if (is_null($accruedHoursBalance)) { - throw new InvalidArgumentException('non-nullable accruedHoursBalance cannot be null'); + if (is_null($accruedHoursPaid)) { + throw new InvalidArgumentException('non-nullable accruedHoursPaid cannot be null'); } - $this->container['accruedHoursBalance'] = $accruedHoursBalance; + $this->container['accruedHoursPaid'] = $accruedHoursPaid; return $this; } /** - * Gets holidayAccrualResetDate + * Gets accruedPaymentAdjustment * - * @return \DateTime|null + * @return float|null */ - public function getHolidayAccrualResetDate(): ?\DateTime + public function getAccruedPaymentAdjustment(): ?float { - return $this->container['holidayAccrualResetDate']; + return $this->container['accruedPaymentAdjustment']; } /** - * Sets holidayAccrualResetDate + * Sets accruedPaymentAdjustment * - * @param \DateTime|null $holidayAccrualResetDate [readonly] This date is used to reset holiday accrual schemes (Accrual Money or Accrual Hours). + * @param float|null $accruedPaymentAdjustment Any manual adjustment to the total accrued * * @return $this */ - public function setHolidayAccrualResetDate(?\DateTime $holidayAccrualResetDate): static + public function setAccruedPaymentAdjustment(?float $accruedPaymentAdjustment): static { - if (is_null($holidayAccrualResetDate)) { - array_push($this->openAPINullablesSetToNull, 'holidayAccrualResetDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('holidayAccrualResetDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($accruedPaymentAdjustment)) { + throw new InvalidArgumentException('non-nullable accruedPaymentAdjustment cannot be null'); } - $this->container['holidayAccrualResetDate'] = $holidayAccrualResetDate; + $this->container['accruedPaymentAdjustment'] = $accruedPaymentAdjustment; return $this; } /** - * Gets useDefaultHolidayType + * Gets accruedPaymentBalance * - * @return bool|null + * @return float|null */ - public function getUseDefaultHolidayType(): ?bool + public function getAccruedPaymentBalance(): ?float { - return $this->container['useDefaultHolidayType']; + return $this->container['accruedPaymentBalance']; } /** - * Sets useDefaultHolidayType + * Sets accruedPaymentBalance * - * @param bool|null $useDefaultHolidayType If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accruedPaymentBalance [readonly] The balance of what is owed to this employee in lieu of holidays * * @return $this */ - public function setUseDefaultHolidayType(?bool $useDefaultHolidayType): static + public function setAccruedPaymentBalance(?float $accruedPaymentBalance): static { - if (is_null($useDefaultHolidayType)) { - throw new InvalidArgumentException('non-nullable useDefaultHolidayType cannot be null'); + if (is_null($accruedPaymentBalance)) { + throw new InvalidArgumentException('non-nullable accruedPaymentBalance cannot be null'); } - $this->container['useDefaultHolidayType'] = $useDefaultHolidayType; + $this->container['accruedPaymentBalance'] = $accruedPaymentBalance; return $this; } /** - * Gets useDefaultAllowanceResetDate + * Gets accruedPaymentLiability * - * @return bool|null + * @return float|null */ - public function getUseDefaultAllowanceResetDate(): ?bool + public function getAccruedPaymentLiability(): ?float { - return $this->container['useDefaultAllowanceResetDate']; + return $this->container['accruedPaymentLiability']; } /** - * Sets useDefaultAllowanceResetDate + * Sets accruedPaymentLiability * - * @param bool|null $useDefaultAllowanceResetDate If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accruedPaymentLiability [readonly] The total accrued payments for this employee over the lifetime of their employment so far * * @return $this */ - public function setUseDefaultAllowanceResetDate(?bool $useDefaultAllowanceResetDate): static + public function setAccruedPaymentLiability(?float $accruedPaymentLiability): static { - if (is_null($useDefaultAllowanceResetDate)) { - throw new InvalidArgumentException('non-nullable useDefaultAllowanceResetDate cannot be null'); + if (is_null($accruedPaymentLiability)) { + throw new InvalidArgumentException('non-nullable accruedPaymentLiability cannot be null'); } - $this->container['useDefaultAllowanceResetDate'] = $useDefaultAllowanceResetDate; + $this->container['accruedPaymentLiability'] = $accruedPaymentLiability; return $this; } /** - * Gets useDefaultAllowance + * Gets accruedPaymentPaid * - * @return bool|null + * @return float|null */ - public function getUseDefaultAllowance(): ?bool + public function getAccruedPaymentPaid(): ?float { - return $this->container['useDefaultAllowance']; + return $this->container['accruedPaymentPaid']; } /** - * Sets useDefaultAllowance + * Sets accruedPaymentPaid * - * @param bool|null $useDefaultAllowance If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) + * @param float|null $accruedPaymentPaid [readonly] The Total amount paid to this employee in lieu of holidays * * @return $this */ - public function setUseDefaultAllowance(?bool $useDefaultAllowance): static + public function setAccruedPaymentPaid(?float $accruedPaymentPaid): static { - if (is_null($useDefaultAllowance)) { - throw new InvalidArgumentException('non-nullable useDefaultAllowance cannot be null'); + if (is_null($accruedPaymentPaid)) { + throw new InvalidArgumentException('non-nullable accruedPaymentPaid cannot be null'); } - $this->container['useDefaultAllowance'] = $useDefaultAllowance; + $this->container['accruedPaymentPaid'] = $accruedPaymentPaid; return $this; } /** - * Gets useDefaultAccruePaymentInLieu + * Gets adjustment * - * @return bool|null + * @return float|null */ - public function getUseDefaultAccruePaymentInLieu(): ?bool + public function getAdjustment(): ?float { - return $this->container['useDefaultAccruePaymentInLieu']; + return $this->container['adjustment']; } /** - * Sets useDefaultAccruePaymentInLieu + * Sets adjustment * - * @param bool|null $useDefaultAccruePaymentInLieu If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $adjustment Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setUseDefaultAccruePaymentInLieu(?bool $useDefaultAccruePaymentInLieu): static + public function setAdjustment(?float $adjustment): static { - if (is_null($useDefaultAccruePaymentInLieu)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieu cannot be null'); + if (is_null($adjustment)) { + array_push($this->openAPINullablesSetToNull, 'adjustment'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('adjustment', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useDefaultAccruePaymentInLieu'] = $useDefaultAccruePaymentInLieu; + $this->container['adjustment'] = $adjustment; return $this; } /** - * Gets useDefaultAccruePaymentInLieuRate + * Gets aggregatedServiceDate * - * @return bool|null + * @return \DateTime|null */ - public function getUseDefaultAccruePaymentInLieuRate(): ?bool + public function getAggregatedServiceDate(): ?\DateTime { - return $this->container['useDefaultAccruePaymentInLieuRate']; + return $this->container['aggregatedServiceDate']; } /** - * Sets useDefaultAccruePaymentInLieuRate + * Sets aggregatedServiceDate * - * @param bool|null $useDefaultAccruePaymentInLieuRate If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate * * @return $this */ - public function setUseDefaultAccruePaymentInLieuRate(?bool $useDefaultAccruePaymentInLieuRate): static + public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static { - if (is_null($useDefaultAccruePaymentInLieuRate)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuRate cannot be null'); + if (is_null($aggregatedServiceDate)) { + array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('aggregatedServiceDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useDefaultAccruePaymentInLieuRate'] = $useDefaultAccruePaymentInLieuRate; + $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; return $this; } /** - * Gets useDefaultAccruePaymentInLieuAllGrossPay + * Gets allowance * - * @return bool|null - * @deprecated + * @return float|null */ - public function getUseDefaultAccruePaymentInLieuAllGrossPay(): ?bool + public function getAllowance(): ?float { - return $this->container['useDefaultAccruePaymentInLieuAllGrossPay']; + return $this->container['allowance']; } /** - * Sets useDefaultAccruePaymentInLieuAllGrossPay + * Sets allowance * - * @param bool|null $useDefaultAccruePaymentInLieuAllGrossPay [Deprecated] Please use UseUseDefaultHolidayAccrualBasis instead. This filed will be removed in a later release. + * @param float|null $allowance The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset * * @return $this - * @deprecated */ - public function setUseDefaultAccruePaymentInLieuAllGrossPay(?bool $useDefaultAccruePaymentInLieuAllGrossPay): static + public function setAllowance(?float $allowance): static { - if (is_null($useDefaultAccruePaymentInLieuAllGrossPay)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuAllGrossPay cannot be null'); + if (is_null($allowance)) { + throw new InvalidArgumentException('non-nullable allowance cannot be null'); } - $this->container['useDefaultAccruePaymentInLieuAllGrossPay'] = $useDefaultAccruePaymentInLieuAllGrossPay; + $this->container['allowance'] = $allowance; return $this; } /** - * Gets useDefaultHolidayAccrualBasis + * Gets allowanceRemaining * - * @return bool|null + * @return float|null */ - public function getUseDefaultHolidayAccrualBasis(): ?bool + public function getAllowanceRemaining(): ?float { - return $this->container['useDefaultHolidayAccrualBasis']; + return $this->container['allowanceRemaining']; } /** - * Sets useDefaultHolidayAccrualBasis + * Sets allowanceRemaining * - * @param bool|null $useDefaultHolidayAccrualBasis If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $allowanceRemaining [readonly] The number of days remaining of the allowance until next reset * * @return $this */ - public function setUseDefaultHolidayAccrualBasis(?bool $useDefaultHolidayAccrualBasis): static + public function setAllowanceRemaining(?float $allowanceRemaining): static { - if (is_null($useDefaultHolidayAccrualBasis)) { - array_push($this->openAPINullablesSetToNull, 'useDefaultHolidayAccrualBasis'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('useDefaultHolidayAccrualBasis', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($allowanceRemaining)) { + throw new InvalidArgumentException('non-nullable allowanceRemaining cannot be null'); } - $this->container['useDefaultHolidayAccrualBasis'] = $useDefaultHolidayAccrualBasis; + $this->container['allowanceRemaining'] = $allowanceRemaining; return $this; } /** - * Gets useDefaultAccruePaymentInLieuPayAutomatically + * Gets allowanceResetDate * - * @return bool|null + * @return \DateTime|null */ - public function getUseDefaultAccruePaymentInLieuPayAutomatically(): ?bool + public function getAllowanceResetDate(): ?\DateTime { - return $this->container['useDefaultAccruePaymentInLieuPayAutomatically']; + return $this->container['allowanceResetDate']; } /** - * Sets useDefaultAccruePaymentInLieuPayAutomatically + * Sets allowanceResetDate * - * @param bool|null $useDefaultAccruePaymentInLieuPayAutomatically If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param \DateTime|null $allowanceResetDate The date that the holiday allowance resets. Only the day/month part of the value is relevant. * * @return $this */ - public function setUseDefaultAccruePaymentInLieuPayAutomatically(?bool $useDefaultAccruePaymentInLieuPayAutomatically): static + public function setAllowanceResetDate(?\DateTime $allowanceResetDate): static { - if (is_null($useDefaultAccruePaymentInLieuPayAutomatically)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuPayAutomatically cannot be null'); + if (is_null($allowanceResetDate)) { + throw new InvalidArgumentException('non-nullable allowanceResetDate cannot be null'); } - $this->container['useDefaultAccruePaymentInLieuPayAutomatically'] = $useDefaultAccruePaymentInLieuPayAutomatically; + $this->container['allowanceResetDate'] = $allowanceResetDate; return $this; } /** - * Gets useDefaultAccrueHoursPerDay + * Gets allowanceUsed * - * @return bool|null + * @return float|null */ - public function getUseDefaultAccrueHoursPerDay(): ?bool + public function getAllowanceUsed(): ?float { - return $this->container['useDefaultAccrueHoursPerDay']; + return $this->container['allowanceUsed']; } /** - * Sets useDefaultAccrueHoursPerDay + * Sets allowanceUsed * - * @param bool|null $useDefaultAccrueHoursPerDay If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $allowanceUsed [readonly] The number of days used from the allowance since last reset * * @return $this */ - public function setUseDefaultAccrueHoursPerDay(?bool $useDefaultAccrueHoursPerDay): static + public function setAllowanceUsed(?float $allowanceUsed): static { - if (is_null($useDefaultAccrueHoursPerDay)) { - throw new InvalidArgumentException('non-nullable useDefaultAccrueHoursPerDay cannot be null'); + if (is_null($allowanceUsed)) { + throw new InvalidArgumentException('non-nullable allowanceUsed cannot be null'); } - $this->container['useDefaultAccrueHoursPerDay'] = $useDefaultAccrueHoursPerDay; + $this->container['allowanceUsed'] = $allowanceUsed; return $this; } /** - * Gets useDefaultMaximumAccruePeriod + * Gets allowanceUsedPreviousPeriod * - * @return bool|null + * @return float|null */ - public function getUseDefaultMaximumAccruePeriod(): ?bool + public function getAllowanceUsedPreviousPeriod(): ?float { - return $this->container['useDefaultMaximumAccruePeriod']; + return $this->container['allowanceUsedPreviousPeriod']; } /** - * Sets useDefaultMaximumAccruePeriod + * Sets allowanceUsedPreviousPeriod * - * @param bool|null $useDefaultMaximumAccruePeriod If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $allowanceUsedPreviousPeriod [readonly] The number of days used in the 12 months prior to the last reset * * @return $this */ - public function setUseDefaultMaximumAccruePeriod(?bool $useDefaultMaximumAccruePeriod): static + public function setAllowanceUsedPreviousPeriod(?float $allowanceUsedPreviousPeriod): static { - if (is_null($useDefaultMaximumAccruePeriod)) { - throw new InvalidArgumentException('non-nullable useDefaultMaximumAccruePeriod cannot be null'); + if (is_null($allowanceUsedPreviousPeriod)) { + throw new InvalidArgumentException('non-nullable allowanceUsedPreviousPeriod cannot be null'); } - $this->container['useDefaultMaximumAccruePeriod'] = $useDefaultMaximumAccruePeriod; + $this->container['allowanceUsedPreviousPeriod'] = $allowanceUsedPreviousPeriod; return $this; } /** - * Gets allowanceResetDate + * Gets holidayAccrualBasis * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\HolidayAccrual|null */ - public function getAllowanceResetDate(): ?\DateTime + public function getHolidayAccrualBasis(): ?\SynergiTech\Staffology\Model\HolidayAccrual { - return $this->container['allowanceResetDate']; + return $this->container['holidayAccrualBasis']; } /** - * Sets allowanceResetDate + * Sets holidayAccrualBasis * - * @param \DateTime|null $allowanceResetDate The date that the holiday allowance resets. Only the day/month part of the value is relevant. + * @param \SynergiTech\Staffology\Model\HolidayAccrual|null $holidayAccrualBasis holidayAccrualBasis * * @return $this */ - public function setAllowanceResetDate(?\DateTime $allowanceResetDate): static + public function setHolidayAccrualBasis(?\SynergiTech\Staffology\Model\HolidayAccrual $holidayAccrualBasis): static { - if (is_null($allowanceResetDate)) { - throw new InvalidArgumentException('non-nullable allowanceResetDate cannot be null'); + if (is_null($holidayAccrualBasis)) { + throw new InvalidArgumentException('non-nullable holidayAccrualBasis cannot be null'); } - $this->container['allowanceResetDate'] = $allowanceResetDate; + $this->container['holidayAccrualBasis'] = $holidayAccrualBasis; return $this; } /** - * Gets allowance + * Gets holidayAccrualDefaultRateType * - * @return float|null + * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null */ - public function getAllowance(): ?float + public function getHolidayAccrualDefaultRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType { - return $this->container['allowance']; + return $this->container['holidayAccrualDefaultRateType']; } /** - * Sets allowance + * Sets holidayAccrualDefaultRateType * - * @param float|null $allowance The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset + * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $holidayAccrualDefaultRateType holidayAccrualDefaultRateType * * @return $this */ - public function setAllowance(?float $allowance): static + public function setHolidayAccrualDefaultRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $holidayAccrualDefaultRateType): static { - if (is_null($allowance)) { - throw new InvalidArgumentException('non-nullable allowance cannot be null'); + if (is_null($holidayAccrualDefaultRateType)) { + throw new InvalidArgumentException('non-nullable holidayAccrualDefaultRateType cannot be null'); } - $this->container['allowance'] = $allowance; + $this->container['holidayAccrualDefaultRateType'] = $holidayAccrualDefaultRateType; return $this; } /** - * Gets adjustment + * Gets holidayAccrualResetDate * - * @return float|null + * @return \DateTime|null */ - public function getAdjustment(): ?float + public function getHolidayAccrualResetDate(): ?\DateTime { - return $this->container['adjustment']; + return $this->container['holidayAccrualResetDate']; } /** - * Sets adjustment + * Sets holidayAccrualResetDate * - * @param float|null $adjustment Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param \DateTime|null $holidayAccrualResetDate [readonly] This date is used to reset holiday accrual schemes (Accrual Money or Accrual Hours). * * @return $this */ - public function setAdjustment(?float $adjustment): static + public function setHolidayAccrualResetDate(?\DateTime $holidayAccrualResetDate): static { - if (is_null($adjustment)) { - array_push($this->openAPINullablesSetToNull, 'adjustment'); + if (is_null($holidayAccrualResetDate)) { + array_push($this->openAPINullablesSetToNull, 'holidayAccrualResetDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('adjustment', $nullablesSetToNull); + $index = array_search('holidayAccrualResetDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['adjustment'] = $adjustment; + $this->container['holidayAccrualResetDate'] = $holidayAccrualResetDate; return $this; } /** - * Gets holidayType + * Gets holidayLeaveAccrualCustomRateType * - * @return \SynergiTech\Staffology\Model\HolidayType|null + * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null */ - public function getHolidayType(): ?\SynergiTech\Staffology\Model\HolidayType + public function getHolidayLeaveAccrualCustomRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType { - return $this->container['holidayType']; + return $this->container['holidayLeaveAccrualCustomRateType']; } /** - * Sets holidayType + * Sets holidayLeaveAccrualCustomRateType * - * @param \SynergiTech\Staffology\Model\HolidayType|null $holidayType holidayType + * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $holidayLeaveAccrualCustomRateType holidayLeaveAccrualCustomRateType * * @return $this */ - public function setHolidayType(?\SynergiTech\Staffology\Model\HolidayType $holidayType): static + public function setHolidayLeaveAccrualCustomRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $holidayLeaveAccrualCustomRateType): static { - if (is_null($holidayType)) { - throw new InvalidArgumentException('non-nullable holidayType cannot be null'); + if (is_null($holidayLeaveAccrualCustomRateType)) { + throw new InvalidArgumentException('non-nullable holidayLeaveAccrualCustomRateType cannot be null'); } - $this->container['holidayType'] = $holidayType; + $this->container['holidayLeaveAccrualCustomRateType'] = $holidayLeaveAccrualCustomRateType; return $this; } /** - * Gets accrueSetAmount + * Gets holidayType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\HolidayType|null */ - public function getAccrueSetAmount(): ?bool + public function getHolidayType(): ?\SynergiTech\Staffology\Model\HolidayType { - return $this->container['accrueSetAmount']; + return $this->container['holidayType']; } /** - * Sets accrueSetAmount + * Sets holidayType * - * @param bool|null $accrueSetAmount If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. + * @param \SynergiTech\Staffology\Model\HolidayType|null $holidayType holidayType * * @return $this */ - public function setAccrueSetAmount(?bool $accrueSetAmount): static + public function setHolidayType(?\SynergiTech\Staffology\Model\HolidayType $holidayType): static { - if (is_null($accrueSetAmount)) { - throw new InvalidArgumentException('non-nullable accrueSetAmount cannot be null'); + if (is_null($holidayType)) { + throw new InvalidArgumentException('non-nullable holidayType cannot be null'); } - $this->container['accrueSetAmount'] = $accrueSetAmount; + $this->container['holidayType'] = $holidayType; return $this; } /** - * Gets accrueHoursPerDay + * Gets maximumAccruePeriod * * @return float|null */ - public function getAccrueHoursPerDay(): ?float + public function getMaximumAccruePeriod(): ?float { - return $this->container['accrueHoursPerDay']; + return $this->container['maximumAccruePeriod']; } /** - * Sets accrueHoursPerDay + * Sets maximumAccruePeriod * - * @param float|null $accrueHoursPerDay If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued + * @param float|null $maximumAccruePeriod The maximum number of hours capable of being accrued in a single period * * @return $this */ - public function setAccrueHoursPerDay(?float $accrueHoursPerDay): static + public function setMaximumAccruePeriod(?float $maximumAccruePeriod): static { - if (is_null($accrueHoursPerDay)) { - throw new InvalidArgumentException('non-nullable accrueHoursPerDay cannot be null'); + if (is_null($maximumAccruePeriod)) { + array_push($this->openAPINullablesSetToNull, 'maximumAccruePeriod'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('maximumAccruePeriod', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['accrueHoursPerDay'] = $accrueHoursPerDay; + $this->container['maximumAccruePeriod'] = $maximumAccruePeriod; return $this; } /** - * Gets showAllowanceOnPayslip + * Gets occupationalSicknessUniqueId * - * @return bool|null + * @return string|null */ - public function getShowAllowanceOnPayslip(): ?bool + public function getOccupationalSicknessUniqueId(): ?string { - return $this->container['showAllowanceOnPayslip']; + return $this->container['occupationalSicknessUniqueId']; } /** - * Sets showAllowanceOnPayslip + * Sets occupationalSicknessUniqueId * - * @param bool|null $showAllowanceOnPayslip If true then the remaining Allowance will be shown on the employees payslip. + * @param string|null $occupationalSicknessUniqueId occupationalSicknessUniqueId * * @return $this */ - public function setShowAllowanceOnPayslip(?bool $showAllowanceOnPayslip): static + public function setOccupationalSicknessUniqueId(?string $occupationalSicknessUniqueId): static { - if (is_null($showAllowanceOnPayslip)) { - throw new InvalidArgumentException('non-nullable showAllowanceOnPayslip cannot be null'); + if (is_null($occupationalSicknessUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'occupationalSicknessUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('occupationalSicknessUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['showAllowanceOnPayslip'] = $showAllowanceOnPayslip; + $this->container['occupationalSicknessUniqueId'] = $occupationalSicknessUniqueId; return $this; } @@ -1355,416 +1403,368 @@ public function setShowAhpOnPayslip(?bool $showAhpOnPayslip): static } /** - * Gets accruePaymentInLieuRate - * - * @return float|null - */ - public function getAccruePaymentInLieuRate(): ?float - { - return $this->container['accruePaymentInLieuRate']; - } - - /** - * Sets accruePaymentInLieuRate - * - * @param float|null $accruePaymentInLieuRate The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. - * - * @return $this - */ - public function setAccruePaymentInLieuRate(?float $accruePaymentInLieuRate): static - { - if (is_null($accruePaymentInLieuRate)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuRate cannot be null'); - } - $this->container['accruePaymentInLieuRate'] = $accruePaymentInLieuRate; - - return $this; - } - - /** - * Gets accruePaymentInLieuAllGrossPay + * Gets showAllowanceOnPayslip * * @return bool|null - * @deprecated */ - public function getAccruePaymentInLieuAllGrossPay(): ?bool + public function getShowAllowanceOnPayslip(): ?bool { - return $this->container['accruePaymentInLieuAllGrossPay']; + return $this->container['showAllowanceOnPayslip']; } /** - * Sets accruePaymentInLieuAllGrossPay + * Sets showAllowanceOnPayslip * - * @param bool|null $accruePaymentInLieuAllGrossPay [Deprecated] Please use HolidayAccrualBasis instead. This filed will be removed in a later release. + * @param bool|null $showAllowanceOnPayslip If true then the remaining Allowance will be shown on the employees payslip. * * @return $this - * @deprecated */ - public function setAccruePaymentInLieuAllGrossPay(?bool $accruePaymentInLieuAllGrossPay): static + public function setShowAllowanceOnPayslip(?bool $showAllowanceOnPayslip): static { - if (is_null($accruePaymentInLieuAllGrossPay)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuAllGrossPay cannot be null'); + if (is_null($showAllowanceOnPayslip)) { + throw new InvalidArgumentException('non-nullable showAllowanceOnPayslip cannot be null'); } - $this->container['accruePaymentInLieuAllGrossPay'] = $accruePaymentInLieuAllGrossPay; + $this->container['showAllowanceOnPayslip'] = $showAllowanceOnPayslip; return $this; } /** - * Gets accruePaymentInLieuPayAutomatically + * Gets useAggregatedServiceDate * * @return bool|null */ - public function getAccruePaymentInLieuPayAutomatically(): ?bool + public function getUseAggregatedServiceDate(): ?bool { - return $this->container['accruePaymentInLieuPayAutomatically']; + return $this->container['useAggregatedServiceDate']; } /** - * Sets accruePaymentInLieuPayAutomatically + * Sets useAggregatedServiceDate * - * @param bool|null $accruePaymentInLieuPayAutomatically Set to true if you want employees to be automatically paid any outstanding holiday pay + * @param bool|null $useAggregatedServiceDate useAggregatedServiceDate * * @return $this */ - public function setAccruePaymentInLieuPayAutomatically(?bool $accruePaymentInLieuPayAutomatically): static + public function setUseAggregatedServiceDate(?bool $useAggregatedServiceDate): static { - if (is_null($accruePaymentInLieuPayAutomatically)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuPayAutomatically cannot be null'); + if (is_null($useAggregatedServiceDate)) { + throw new InvalidArgumentException('non-nullable useAggregatedServiceDate cannot be null'); } - $this->container['accruePaymentInLieuPayAutomatically'] = $accruePaymentInLieuPayAutomatically; + $this->container['useAggregatedServiceDate'] = $useAggregatedServiceDate; return $this; } /** - * Gets occupationalSicknessUniqueId + * Gets useDefaultAccrueHoursPerDay * - * @return string|null + * @return bool|null */ - public function getOccupationalSicknessUniqueId(): ?string + public function getUseDefaultAccrueHoursPerDay(): ?bool { - return $this->container['occupationalSicknessUniqueId']; + return $this->container['useDefaultAccrueHoursPerDay']; } /** - * Sets occupationalSicknessUniqueId + * Sets useDefaultAccrueHoursPerDay * - * @param string|null $occupationalSicknessUniqueId occupationalSicknessUniqueId + * @param bool|null $useDefaultAccrueHoursPerDay If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setOccupationalSicknessUniqueId(?string $occupationalSicknessUniqueId): static + public function setUseDefaultAccrueHoursPerDay(?bool $useDefaultAccrueHoursPerDay): static { - if (is_null($occupationalSicknessUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'occupationalSicknessUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('occupationalSicknessUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useDefaultAccrueHoursPerDay)) { + throw new InvalidArgumentException('non-nullable useDefaultAccrueHoursPerDay cannot be null'); } - $this->container['occupationalSicknessUniqueId'] = $occupationalSicknessUniqueId; + $this->container['useDefaultAccrueHoursPerDay'] = $useDefaultAccrueHoursPerDay; return $this; } /** - * Gets accruedPaymentAdjustment + * Gets useDefaultAccruePaymentInLieu * - * @return float|null + * @return bool|null */ - public function getAccruedPaymentAdjustment(): ?float + public function getUseDefaultAccruePaymentInLieu(): ?bool { - return $this->container['accruedPaymentAdjustment']; + return $this->container['useDefaultAccruePaymentInLieu']; } /** - * Sets accruedPaymentAdjustment + * Sets useDefaultAccruePaymentInLieu * - * @param float|null $accruedPaymentAdjustment Any manual adjustment to the total accrued + * @param bool|null $useDefaultAccruePaymentInLieu If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setAccruedPaymentAdjustment(?float $accruedPaymentAdjustment): static + public function setUseDefaultAccruePaymentInLieu(?bool $useDefaultAccruePaymentInLieu): static { - if (is_null($accruedPaymentAdjustment)) { - throw new InvalidArgumentException('non-nullable accruedPaymentAdjustment cannot be null'); + if (is_null($useDefaultAccruePaymentInLieu)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieu cannot be null'); } - $this->container['accruedPaymentAdjustment'] = $accruedPaymentAdjustment; + $this->container['useDefaultAccruePaymentInLieu'] = $useDefaultAccruePaymentInLieu; return $this; } /** - * Gets accruedHoursAdjustment + * Gets useDefaultAccruePaymentInLieuAllGrossPay * - * @return float|null + * @return bool|null + * @deprecated */ - public function getAccruedHoursAdjustment(): ?float + public function getUseDefaultAccruePaymentInLieuAllGrossPay(): ?bool { - return $this->container['accruedHoursAdjustment']; + return $this->container['useDefaultAccruePaymentInLieuAllGrossPay']; } /** - * Sets accruedHoursAdjustment + * Sets useDefaultAccruePaymentInLieuAllGrossPay * - * @param float|null $accruedHoursAdjustment Any manual adjustment to the total hours accrued + * @param bool|null $useDefaultAccruePaymentInLieuAllGrossPay [Deprecated] Please use UseUseDefaultHolidayAccrualBasis instead. This filed will be removed in a later release. * * @return $this + * @deprecated */ - public function setAccruedHoursAdjustment(?float $accruedHoursAdjustment): static + public function setUseDefaultAccruePaymentInLieuAllGrossPay(?bool $useDefaultAccruePaymentInLieuAllGrossPay): static { - if (is_null($accruedHoursAdjustment)) { - throw new InvalidArgumentException('non-nullable accruedHoursAdjustment cannot be null'); + if (is_null($useDefaultAccruePaymentInLieuAllGrossPay)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuAllGrossPay cannot be null'); } - $this->container['accruedHoursAdjustment'] = $accruedHoursAdjustment; + $this->container['useDefaultAccruePaymentInLieuAllGrossPay'] = $useDefaultAccruePaymentInLieuAllGrossPay; return $this; } /** - * Gets holidayAccrualBasis + * Gets useDefaultAccruePaymentInLieuPayAutomatically * - * @return \SynergiTech\Staffology\Model\HolidayAccrual|null + * @return bool|null */ - public function getHolidayAccrualBasis(): ?\SynergiTech\Staffology\Model\HolidayAccrual + public function getUseDefaultAccruePaymentInLieuPayAutomatically(): ?bool { - return $this->container['holidayAccrualBasis']; + return $this->container['useDefaultAccruePaymentInLieuPayAutomatically']; } /** - * Sets holidayAccrualBasis + * Sets useDefaultAccruePaymentInLieuPayAutomatically * - * @param \SynergiTech\Staffology\Model\HolidayAccrual|null $holidayAccrualBasis holidayAccrualBasis + * @param bool|null $useDefaultAccruePaymentInLieuPayAutomatically If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setHolidayAccrualBasis(?\SynergiTech\Staffology\Model\HolidayAccrual $holidayAccrualBasis): static + public function setUseDefaultAccruePaymentInLieuPayAutomatically(?bool $useDefaultAccruePaymentInLieuPayAutomatically): static { - if (is_null($holidayAccrualBasis)) { - throw new InvalidArgumentException('non-nullable holidayAccrualBasis cannot be null'); + if (is_null($useDefaultAccruePaymentInLieuPayAutomatically)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuPayAutomatically cannot be null'); } - $this->container['holidayAccrualBasis'] = $holidayAccrualBasis; + $this->container['useDefaultAccruePaymentInLieuPayAutomatically'] = $useDefaultAccruePaymentInLieuPayAutomatically; return $this; } /** - * Gets holidayAccrualDefaultRateType + * Gets useDefaultAccruePaymentInLieuRate * - * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null + * @return bool|null */ - public function getHolidayAccrualDefaultRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType + public function getUseDefaultAccruePaymentInLieuRate(): ?bool { - return $this->container['holidayAccrualDefaultRateType']; + return $this->container['useDefaultAccruePaymentInLieuRate']; } /** - * Sets holidayAccrualDefaultRateType + * Sets useDefaultAccruePaymentInLieuRate * - * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $holidayAccrualDefaultRateType holidayAccrualDefaultRateType + * @param bool|null $useDefaultAccruePaymentInLieuRate If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setHolidayAccrualDefaultRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $holidayAccrualDefaultRateType): static + public function setUseDefaultAccruePaymentInLieuRate(?bool $useDefaultAccruePaymentInLieuRate): static { - if (is_null($holidayAccrualDefaultRateType)) { - throw new InvalidArgumentException('non-nullable holidayAccrualDefaultRateType cannot be null'); + if (is_null($useDefaultAccruePaymentInLieuRate)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuRate cannot be null'); } - $this->container['holidayAccrualDefaultRateType'] = $holidayAccrualDefaultRateType; + $this->container['useDefaultAccruePaymentInLieuRate'] = $useDefaultAccruePaymentInLieuRate; return $this; } /** - * Gets aggregatedServiceDate + * Gets useDefaultAllowance * - * @return \DateTime|null + * @return bool|null */ - public function getAggregatedServiceDate(): ?\DateTime + public function getUseDefaultAllowance(): ?bool { - return $this->container['aggregatedServiceDate']; + return $this->container['useDefaultAllowance']; } /** - * Sets aggregatedServiceDate + * Sets useDefaultAllowance * - * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate + * @param bool|null $useDefaultAllowance If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) * * @return $this */ - public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static + public function setUseDefaultAllowance(?bool $useDefaultAllowance): static { - if (is_null($aggregatedServiceDate)) { - array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aggregatedServiceDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useDefaultAllowance)) { + throw new InvalidArgumentException('non-nullable useDefaultAllowance cannot be null'); } - $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; + $this->container['useDefaultAllowance'] = $useDefaultAllowance; return $this; } /** - * Gets useAggregatedServiceDate + * Gets useDefaultAllowanceResetDate * * @return bool|null */ - public function getUseAggregatedServiceDate(): ?bool + public function getUseDefaultAllowanceResetDate(): ?bool { - return $this->container['useAggregatedServiceDate']; + return $this->container['useDefaultAllowanceResetDate']; } /** - * Sets useAggregatedServiceDate + * Sets useDefaultAllowanceResetDate * - * @param bool|null $useAggregatedServiceDate useAggregatedServiceDate + * @param bool|null $useDefaultAllowanceResetDate If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setUseAggregatedServiceDate(?bool $useAggregatedServiceDate): static + public function setUseDefaultAllowanceResetDate(?bool $useDefaultAllowanceResetDate): static { - if (is_null($useAggregatedServiceDate)) { - throw new InvalidArgumentException('non-nullable useAggregatedServiceDate cannot be null'); + if (is_null($useDefaultAllowanceResetDate)) { + throw new InvalidArgumentException('non-nullable useDefaultAllowanceResetDate cannot be null'); } - $this->container['useAggregatedServiceDate'] = $useAggregatedServiceDate; + $this->container['useDefaultAllowanceResetDate'] = $useDefaultAllowanceResetDate; return $this; } /** - * Gets accruePayCodeSetUniqueId + * Gets useDefaultHolidayAccrualBasis * - * @return string|null + * @return bool|null */ - public function getAccruePayCodeSetUniqueId(): ?string + public function getUseDefaultHolidayAccrualBasis(): ?bool { - return $this->container['accruePayCodeSetUniqueId']; + return $this->container['useDefaultHolidayAccrualBasis']; } /** - * Sets accruePayCodeSetUniqueId + * Sets useDefaultHolidayAccrualBasis * - * @param string|null $accruePayCodeSetUniqueId Pay code set to use for accruing holiday pay + * @param bool|null $useDefaultHolidayAccrualBasis If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static + public function setUseDefaultHolidayAccrualBasis(?bool $useDefaultHolidayAccrualBasis): static { - if (is_null($accruePayCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); + if (is_null($useDefaultHolidayAccrualBasis)) { + array_push($this->openAPINullablesSetToNull, 'useDefaultHolidayAccrualBasis'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); + $index = array_search('useDefaultHolidayAccrualBasis', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; + $this->container['useDefaultHolidayAccrualBasis'] = $useDefaultHolidayAccrualBasis; return $this; } /** - * Gets maximumAccruePeriod + * Gets useDefaultHolidayAccrualDefaultRateType * - * @return float|null + * @return bool|null */ - public function getMaximumAccruePeriod(): ?float + public function getUseDefaultHolidayAccrualDefaultRateType(): ?bool { - return $this->container['maximumAccruePeriod']; + return $this->container['useDefaultHolidayAccrualDefaultRateType']; } /** - * Sets maximumAccruePeriod + * Sets useDefaultHolidayAccrualDefaultRateType * - * @param float|null $maximumAccruePeriod The maximum number of hours capable of being accrued in a single period + * @param bool|null $useDefaultHolidayAccrualDefaultRateType If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. * * @return $this */ - public function setMaximumAccruePeriod(?float $maximumAccruePeriod): static + public function setUseDefaultHolidayAccrualDefaultRateType(?bool $useDefaultHolidayAccrualDefaultRateType): static { - if (is_null($maximumAccruePeriod)) { - array_push($this->openAPINullablesSetToNull, 'maximumAccruePeriod'); + if (is_null($useDefaultHolidayAccrualDefaultRateType)) { + array_push($this->openAPINullablesSetToNull, 'useDefaultHolidayAccrualDefaultRateType'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('maximumAccruePeriod', $nullablesSetToNull); + $index = array_search('useDefaultHolidayAccrualDefaultRateType', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['maximumAccruePeriod'] = $maximumAccruePeriod; + $this->container['useDefaultHolidayAccrualDefaultRateType'] = $useDefaultHolidayAccrualDefaultRateType; return $this; } /** - * Gets holidayLeaveAccrualCustomRateType + * Gets useDefaultHolidayType * - * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null + * @return bool|null */ - public function getHolidayLeaveAccrualCustomRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType + public function getUseDefaultHolidayType(): ?bool { - return $this->container['holidayLeaveAccrualCustomRateType']; + return $this->container['useDefaultHolidayType']; } /** - * Sets holidayLeaveAccrualCustomRateType + * Sets useDefaultHolidayType * - * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $holidayLeaveAccrualCustomRateType holidayLeaveAccrualCustomRateType + * @param bool|null $useDefaultHolidayType If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setHolidayLeaveAccrualCustomRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $holidayLeaveAccrualCustomRateType): static + public function setUseDefaultHolidayType(?bool $useDefaultHolidayType): static { - if (is_null($holidayLeaveAccrualCustomRateType)) { - throw new InvalidArgumentException('non-nullable holidayLeaveAccrualCustomRateType cannot be null'); + if (is_null($useDefaultHolidayType)) { + throw new InvalidArgumentException('non-nullable useDefaultHolidayType cannot be null'); } - $this->container['holidayLeaveAccrualCustomRateType'] = $holidayLeaveAccrualCustomRateType; + $this->container['useDefaultHolidayType'] = $useDefaultHolidayType; return $this; } /** - * Gets useDefaultHolidayAccrualDefaultRateType + * Gets useDefaultMaximumAccruePeriod * * @return bool|null */ - public function getUseDefaultHolidayAccrualDefaultRateType(): ?bool + public function getUseDefaultMaximumAccruePeriod(): ?bool { - return $this->container['useDefaultHolidayAccrualDefaultRateType']; + return $this->container['useDefaultMaximumAccruePeriod']; } /** - * Sets useDefaultHolidayAccrualDefaultRateType + * Sets useDefaultMaximumAccruePeriod * - * @param bool|null $useDefaultHolidayAccrualDefaultRateType If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. + * @param bool|null $useDefaultMaximumAccruePeriod If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setUseDefaultHolidayAccrualDefaultRateType(?bool $useDefaultHolidayAccrualDefaultRateType): static + public function setUseDefaultMaximumAccruePeriod(?bool $useDefaultMaximumAccruePeriod): static { - if (is_null($useDefaultHolidayAccrualDefaultRateType)) { - array_push($this->openAPINullablesSetToNull, 'useDefaultHolidayAccrualDefaultRateType'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('useDefaultHolidayAccrualDefaultRateType', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useDefaultMaximumAccruePeriod)) { + throw new InvalidArgumentException('non-nullable useDefaultMaximumAccruePeriod cannot be null'); } - $this->container['useDefaultHolidayAccrualDefaultRateType'] = $useDefaultHolidayAccrualDefaultRateType; + $this->container['useDefaultMaximumAccruePeriod'] = $useDefaultMaximumAccruePeriod; return $this; } diff --git a/src/Model/ContractEmployeeNavigationResponse.php b/src/Model/ContractEmployeeNavigationResponse.php new file mode 100644 index 0000000..942bf08 --- /dev/null +++ b/src/Model/ContractEmployeeNavigationResponse.php @@ -0,0 +1,783 @@ + + */ +class ContractEmployeeNavigationResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.EmployeeNavigationResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'currentId' => 'string', + 'currentIndex' => 'int', + 'deptCode' => 'string', + 'employeeCount' => 'int', + 'firstId' => 'string', + 'lastId' => 'string', + 'nextId' => 'string', + 'previousId' => 'string', + 'sortBy' => '\SynergiTech\Staffology\Model\EmployeeSortBy', + 'sortDescending' => 'bool', + 'status' => '\SynergiTech\Staffology\Model\EmployeeStatus' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'currentId' => 'uuid', + 'currentIndex' => 'int32', + 'deptCode' => null, + 'employeeCount' => 'int32', + 'firstId' => 'uuid', + 'lastId' => 'uuid', + 'nextId' => 'uuid', + 'previousId' => 'uuid', + 'sortBy' => null, + 'sortDescending' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'currentId' => false, + 'currentIndex' => false, + 'deptCode' => true, + 'employeeCount' => false, + 'firstId' => true, + 'lastId' => true, + 'nextId' => true, + 'previousId' => true, + 'sortBy' => false, + 'sortDescending' => false, + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'currentId' => 'currentId', + 'currentIndex' => 'currentIndex', + 'deptCode' => 'deptCode', + 'employeeCount' => 'employeeCount', + 'firstId' => 'firstId', + 'lastId' => 'lastId', + 'nextId' => 'nextId', + 'previousId' => 'previousId', + 'sortBy' => 'sortBy', + 'sortDescending' => 'sortDescending', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'currentId' => 'setCurrentId', + 'currentIndex' => 'setCurrentIndex', + 'deptCode' => 'setDeptCode', + 'employeeCount' => 'setEmployeeCount', + 'firstId' => 'setFirstId', + 'lastId' => 'setLastId', + 'nextId' => 'setNextId', + 'previousId' => 'setPreviousId', + 'sortBy' => 'setSortBy', + 'sortDescending' => 'setSortDescending', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'currentId' => 'getCurrentId', + 'currentIndex' => 'getCurrentIndex', + 'deptCode' => 'getDeptCode', + 'employeeCount' => 'getEmployeeCount', + 'firstId' => 'getFirstId', + 'lastId' => 'getLastId', + 'nextId' => 'getNextId', + 'previousId' => 'getPreviousId', + 'sortBy' => 'getSortBy', + 'sortDescending' => 'getSortDescending', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('currentId', $data ?? [], null); + $this->setIfExists('currentIndex', $data ?? [], null); + $this->setIfExists('deptCode', $data ?? [], null); + $this->setIfExists('employeeCount', $data ?? [], null); + $this->setIfExists('firstId', $data ?? [], null); + $this->setIfExists('lastId', $data ?? [], null); + $this->setIfExists('nextId', $data ?? [], null); + $this->setIfExists('previousId', $data ?? [], null); + $this->setIfExists('sortBy', $data ?? [], null); + $this->setIfExists('sortDescending', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets currentId + * + * @return string|null + */ + public function getCurrentId(): ?string + { + return $this->container['currentId']; + } + + /** + * Sets currentId + * + * @param string|null $currentId currentId + * + * @return $this + */ + public function setCurrentId(?string $currentId): static + { + if (is_null($currentId)) { + throw new InvalidArgumentException('non-nullable currentId cannot be null'); + } + $this->container['currentId'] = $currentId; + + return $this; + } + + /** + * Gets currentIndex + * + * @return int|null + */ + public function getCurrentIndex(): ?int + { + return $this->container['currentIndex']; + } + + /** + * Sets currentIndex + * + * @param int|null $currentIndex currentIndex + * + * @return $this + */ + public function setCurrentIndex(?int $currentIndex): static + { + if (is_null($currentIndex)) { + throw new InvalidArgumentException('non-nullable currentIndex cannot be null'); + } + $this->container['currentIndex'] = $currentIndex; + + return $this; + } + + /** + * Gets deptCode + * + * @return string|null + */ + public function getDeptCode(): ?string + { + return $this->container['deptCode']; + } + + /** + * Sets deptCode + * + * @param string|null $deptCode deptCode + * + * @return $this + */ + public function setDeptCode(?string $deptCode): static + { + if (is_null($deptCode)) { + array_push($this->openAPINullablesSetToNull, 'deptCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deptCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['deptCode'] = $deptCode; + + return $this; + } + + /** + * Gets employeeCount + * + * @return int|null + */ + public function getEmployeeCount(): ?int + { + return $this->container['employeeCount']; + } + + /** + * Sets employeeCount + * + * @param int|null $employeeCount employeeCount + * + * @return $this + */ + public function setEmployeeCount(?int $employeeCount): static + { + if (is_null($employeeCount)) { + throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); + } + $this->container['employeeCount'] = $employeeCount; + + return $this; + } + + /** + * Gets firstId + * + * @return string|null + */ + public function getFirstId(): ?string + { + return $this->container['firstId']; + } + + /** + * Sets firstId + * + * @param string|null $firstId firstId + * + * @return $this + */ + public function setFirstId(?string $firstId): static + { + if (is_null($firstId)) { + array_push($this->openAPINullablesSetToNull, 'firstId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('firstId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['firstId'] = $firstId; + + return $this; + } + + /** + * Gets lastId + * + * @return string|null + */ + public function getLastId(): ?string + { + return $this->container['lastId']; + } + + /** + * Sets lastId + * + * @param string|null $lastId lastId + * + * @return $this + */ + public function setLastId(?string $lastId): static + { + if (is_null($lastId)) { + array_push($this->openAPINullablesSetToNull, 'lastId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lastId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['lastId'] = $lastId; + + return $this; + } + + /** + * Gets nextId + * + * @return string|null + */ + public function getNextId(): ?string + { + return $this->container['nextId']; + } + + /** + * Sets nextId + * + * @param string|null $nextId nextId + * + * @return $this + */ + public function setNextId(?string $nextId): static + { + if (is_null($nextId)) { + array_push($this->openAPINullablesSetToNull, 'nextId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('nextId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nextId'] = $nextId; + + return $this; + } + + /** + * Gets previousId + * + * @return string|null + */ + public function getPreviousId(): ?string + { + return $this->container['previousId']; + } + + /** + * Sets previousId + * + * @param string|null $previousId previousId + * + * @return $this + */ + public function setPreviousId(?string $previousId): static + { + if (is_null($previousId)) { + array_push($this->openAPINullablesSetToNull, 'previousId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('previousId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['previousId'] = $previousId; + + return $this; + } + + /** + * Gets sortBy + * + * @return \SynergiTech\Staffology\Model\EmployeeSortBy|null + */ + public function getSortBy(): ?\SynergiTech\Staffology\Model\EmployeeSortBy + { + return $this->container['sortBy']; + } + + /** + * Sets sortBy + * + * @param \SynergiTech\Staffology\Model\EmployeeSortBy|null $sortBy sortBy + * + * @return $this + */ + public function setSortBy(?\SynergiTech\Staffology\Model\EmployeeSortBy $sortBy): static + { + if (is_null($sortBy)) { + throw new InvalidArgumentException('non-nullable sortBy cannot be null'); + } + $this->container['sortBy'] = $sortBy; + + return $this; + } + + /** + * Gets sortDescending + * + * @return bool|null + */ + public function getSortDescending(): ?bool + { + return $this->container['sortDescending']; + } + + /** + * Sets sortDescending + * + * @param bool|null $sortDescending sortDescending + * + * @return $this + */ + public function setSortDescending(?bool $sortDescending): static + { + if (is_null($sortDescending)) { + throw new InvalidArgumentException('non-nullable sortDescending cannot be null'); + } + $this->container['sortDescending'] = $sortDescending; + + return $this; + } + + /** + * Gets status + * + * @return \SynergiTech\Staffology\Model\EmployeeStatus|null + */ + public function getStatus(): ?\SynergiTech\Staffology\Model\EmployeeStatus + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \SynergiTech\Staffology\Model\EmployeeStatus|null $status status + * + * @return $this + */ + public function setStatus(?\SynergiTech\Staffology\Model\EmployeeStatus $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractEmployeePaymentsReportRequest.php b/src/Model/ContractEmployeePaymentsReportRequest.php index ba7f435..9676bbf 100644 --- a/src/Model/ContractEmployeePaymentsReportRequest.php +++ b/src/Model/ContractEmployeePaymentsReportRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractEmployeeResponse.php b/src/Model/ContractEmployeeResponse.php index 4901290..9c5a3c2 100644 --- a/src/Model/ContractEmployeeResponse.php +++ b/src/Model/ContractEmployeeResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,21 +59,25 @@ class ContractEmployeeResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'personalDetails' => '\SynergiTech\Staffology\Model\ContractPersonalDetailsResponse', - 'employmentDetails' => '\SynergiTech\Staffology\Model\ContractEmploymentDetailsResponse', + 'aeNotEnroledWarning' => 'bool', + 'aggregatedServiceDate' => '\DateTime', 'autoEnrolment' => '\SynergiTech\Staffology\Model\ContractAutoEnrolmentResponse', - 'leaveSettings' => '\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsResponse', - 'rightToWork' => '\SynergiTech\Staffology\Model\ContractRightToWork', 'bankDetails' => '\SynergiTech\Staffology\Model\ContractBankDetails', + 'defaultPensionSchemeName' => 'string', + 'defaultPensionSchemeUniqueId' => 'string', + 'defaultWorkerGroupName' => 'string', + 'defaultWorkerGroupUniqueId' => 'string', + 'employmentDetails' => '\SynergiTech\Staffology\Model\ContractEmploymentDetailsResponse', + 'evcId' => 'string', + 'holidaySchemeUniqueId' => 'string', + 'id' => 'string', + 'leaveSettings' => '\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsResponse', 'payOptions' => '\SynergiTech\Staffology\Model\ContractPayOptionsResponse', - 'tags' => 'string[]', - 'status' => '\SynergiTech\Staffology\Model\EmployeeStatus', - 'aeNotEnroledWarning' => 'bool', + 'personalDetails' => '\SynergiTech\Staffology\Model\ContractPersonalDetailsResponse', + 'rightToWork' => '\SynergiTech\Staffology\Model\ContractRightToWork', 'sourceSystemId' => 'string', - 'aggregatedServiceDate' => '\DateTime', - 'holidaySchemeUniqueId' => 'string', - 'evcId' => 'string' + 'status' => '\SynergiTech\Staffology\Model\EmployeeStatus', + 'tags' => 'string[]' ]; /** @@ -82,21 +86,25 @@ class ContractEmployeeResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'personalDetails' => null, - 'employmentDetails' => null, + 'aeNotEnroledWarning' => null, + 'aggregatedServiceDate' => 'date', 'autoEnrolment' => null, - 'leaveSettings' => null, - 'rightToWork' => null, 'bankDetails' => null, + 'defaultPensionSchemeName' => null, + 'defaultPensionSchemeUniqueId' => 'uuid', + 'defaultWorkerGroupName' => null, + 'defaultWorkerGroupUniqueId' => 'uuid', + 'employmentDetails' => null, + 'evcId' => 'uuid', + 'holidaySchemeUniqueId' => 'uuid', + 'id' => 'uuid', + 'leaveSettings' => null, 'payOptions' => null, - 'tags' => null, - 'status' => null, - 'aeNotEnroledWarning' => null, + 'personalDetails' => null, + 'rightToWork' => null, 'sourceSystemId' => null, - 'aggregatedServiceDate' => 'date', - 'holidaySchemeUniqueId' => 'uuid', - 'evcId' => 'uuid' + 'status' => null, + 'tags' => null ]; /** @@ -105,21 +113,25 @@ class ContractEmployeeResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'personalDetails' => false, - 'employmentDetails' => false, + 'aeNotEnroledWarning' => false, + 'aggregatedServiceDate' => true, 'autoEnrolment' => false, - 'leaveSettings' => false, - 'rightToWork' => false, 'bankDetails' => false, + 'defaultPensionSchemeName' => true, + 'defaultPensionSchemeUniqueId' => true, + 'defaultWorkerGroupName' => true, + 'defaultWorkerGroupUniqueId' => true, + 'employmentDetails' => false, + 'evcId' => true, + 'holidaySchemeUniqueId' => true, + 'id' => false, + 'leaveSettings' => false, 'payOptions' => false, - 'tags' => true, - 'status' => false, - 'aeNotEnroledWarning' => false, + 'personalDetails' => false, + 'rightToWork' => false, 'sourceSystemId' => true, - 'aggregatedServiceDate' => true, - 'holidaySchemeUniqueId' => true, - 'evcId' => true + 'status' => false, + 'tags' => true ]; /** @@ -208,21 +220,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'personalDetails' => 'personalDetails', - 'employmentDetails' => 'employmentDetails', + 'aeNotEnroledWarning' => 'aeNotEnroledWarning', + 'aggregatedServiceDate' => 'aggregatedServiceDate', 'autoEnrolment' => 'autoEnrolment', - 'leaveSettings' => 'leaveSettings', - 'rightToWork' => 'rightToWork', 'bankDetails' => 'bankDetails', + 'defaultPensionSchemeName' => 'defaultPensionSchemeName', + 'defaultPensionSchemeUniqueId' => 'defaultPensionSchemeUniqueId', + 'defaultWorkerGroupName' => 'defaultWorkerGroupName', + 'defaultWorkerGroupUniqueId' => 'defaultWorkerGroupUniqueId', + 'employmentDetails' => 'employmentDetails', + 'evcId' => 'evcId', + 'holidaySchemeUniqueId' => 'holidaySchemeUniqueId', + 'id' => 'id', + 'leaveSettings' => 'leaveSettings', 'payOptions' => 'payOptions', - 'tags' => 'tags', - 'status' => 'status', - 'aeNotEnroledWarning' => 'aeNotEnroledWarning', + 'personalDetails' => 'personalDetails', + 'rightToWork' => 'rightToWork', 'sourceSystemId' => 'sourceSystemId', - 'aggregatedServiceDate' => 'aggregatedServiceDate', - 'holidaySchemeUniqueId' => 'holidaySchemeUniqueId', - 'evcId' => 'evcId' + 'status' => 'status', + 'tags' => 'tags' ]; /** @@ -231,21 +247,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'personalDetails' => 'setPersonalDetails', - 'employmentDetails' => 'setEmploymentDetails', + 'aeNotEnroledWarning' => 'setAeNotEnroledWarning', + 'aggregatedServiceDate' => 'setAggregatedServiceDate', 'autoEnrolment' => 'setAutoEnrolment', - 'leaveSettings' => 'setLeaveSettings', - 'rightToWork' => 'setRightToWork', 'bankDetails' => 'setBankDetails', + 'defaultPensionSchemeName' => 'setDefaultPensionSchemeName', + 'defaultPensionSchemeUniqueId' => 'setDefaultPensionSchemeUniqueId', + 'defaultWorkerGroupName' => 'setDefaultWorkerGroupName', + 'defaultWorkerGroupUniqueId' => 'setDefaultWorkerGroupUniqueId', + 'employmentDetails' => 'setEmploymentDetails', + 'evcId' => 'setEvcId', + 'holidaySchemeUniqueId' => 'setHolidaySchemeUniqueId', + 'id' => 'setId', + 'leaveSettings' => 'setLeaveSettings', 'payOptions' => 'setPayOptions', - 'tags' => 'setTags', - 'status' => 'setStatus', - 'aeNotEnroledWarning' => 'setAeNotEnroledWarning', + 'personalDetails' => 'setPersonalDetails', + 'rightToWork' => 'setRightToWork', 'sourceSystemId' => 'setSourceSystemId', - 'aggregatedServiceDate' => 'setAggregatedServiceDate', - 'holidaySchemeUniqueId' => 'setHolidaySchemeUniqueId', - 'evcId' => 'setEvcId' + 'status' => 'setStatus', + 'tags' => 'setTags' ]; /** @@ -254,21 +274,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'personalDetails' => 'getPersonalDetails', - 'employmentDetails' => 'getEmploymentDetails', + 'aeNotEnroledWarning' => 'getAeNotEnroledWarning', + 'aggregatedServiceDate' => 'getAggregatedServiceDate', 'autoEnrolment' => 'getAutoEnrolment', - 'leaveSettings' => 'getLeaveSettings', - 'rightToWork' => 'getRightToWork', 'bankDetails' => 'getBankDetails', + 'defaultPensionSchemeName' => 'getDefaultPensionSchemeName', + 'defaultPensionSchemeUniqueId' => 'getDefaultPensionSchemeUniqueId', + 'defaultWorkerGroupName' => 'getDefaultWorkerGroupName', + 'defaultWorkerGroupUniqueId' => 'getDefaultWorkerGroupUniqueId', + 'employmentDetails' => 'getEmploymentDetails', + 'evcId' => 'getEvcId', + 'holidaySchemeUniqueId' => 'getHolidaySchemeUniqueId', + 'id' => 'getId', + 'leaveSettings' => 'getLeaveSettings', 'payOptions' => 'getPayOptions', - 'tags' => 'getTags', - 'status' => 'getStatus', - 'aeNotEnroledWarning' => 'getAeNotEnroledWarning', + 'personalDetails' => 'getPersonalDetails', + 'rightToWork' => 'getRightToWork', 'sourceSystemId' => 'getSourceSystemId', - 'aggregatedServiceDate' => 'getAggregatedServiceDate', - 'holidaySchemeUniqueId' => 'getHolidaySchemeUniqueId', - 'evcId' => 'getEvcId' + 'status' => 'getStatus', + 'tags' => 'getTags' ]; /** @@ -327,21 +351,25 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('personalDetails', $data ?? [], null); - $this->setIfExists('employmentDetails', $data ?? [], null); + $this->setIfExists('aeNotEnroledWarning', $data ?? [], null); + $this->setIfExists('aggregatedServiceDate', $data ?? [], null); $this->setIfExists('autoEnrolment', $data ?? [], null); - $this->setIfExists('leaveSettings', $data ?? [], null); - $this->setIfExists('rightToWork', $data ?? [], null); $this->setIfExists('bankDetails', $data ?? [], null); + $this->setIfExists('defaultPensionSchemeName', $data ?? [], null); + $this->setIfExists('defaultPensionSchemeUniqueId', $data ?? [], null); + $this->setIfExists('defaultWorkerGroupName', $data ?? [], null); + $this->setIfExists('defaultWorkerGroupUniqueId', $data ?? [], null); + $this->setIfExists('employmentDetails', $data ?? [], null); + $this->setIfExists('evcId', $data ?? [], null); + $this->setIfExists('holidaySchemeUniqueId', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('leaveSettings', $data ?? [], null); $this->setIfExists('payOptions', $data ?? [], null); - $this->setIfExists('tags', $data ?? [], null); - $this->setIfExists('status', $data ?? [], null); - $this->setIfExists('aeNotEnroledWarning', $data ?? [], null); + $this->setIfExists('personalDetails', $data ?? [], null); + $this->setIfExists('rightToWork', $data ?? [], null); $this->setIfExists('sourceSystemId', $data ?? [], null); - $this->setIfExists('aggregatedServiceDate', $data ?? [], null); - $this->setIfExists('holidaySchemeUniqueId', $data ?? [], null); - $this->setIfExists('evcId', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); } /** @@ -387,441 +415,577 @@ public function valid(): bool /** - * Gets id + * Gets aeNotEnroledWarning * - * @return string|null + * @return bool|null */ - public function getId(): ?string + public function getAeNotEnroledWarning(): ?bool { - return $this->container['id']; + return $this->container['aeNotEnroledWarning']; } /** - * Sets id + * Sets aeNotEnroledWarning * - * @param string|null $id The unique id of the object + * @param bool|null $aeNotEnroledWarning aeNotEnroledWarning * * @return $this */ - public function setId(?string $id): static + public function setAeNotEnroledWarning(?bool $aeNotEnroledWarning): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($aeNotEnroledWarning)) { + throw new InvalidArgumentException('non-nullable aeNotEnroledWarning cannot be null'); } - $this->container['id'] = $id; + $this->container['aeNotEnroledWarning'] = $aeNotEnroledWarning; return $this; } /** - * Gets personalDetails + * Gets aggregatedServiceDate * - * @return \SynergiTech\Staffology\Model\ContractPersonalDetailsResponse|null + * @return \DateTime|null */ - public function getPersonalDetails(): ?\SynergiTech\Staffology\Model\ContractPersonalDetailsResponse + public function getAggregatedServiceDate(): ?\DateTime { - return $this->container['personalDetails']; + return $this->container['aggregatedServiceDate']; } /** - * Sets personalDetails + * Sets aggregatedServiceDate * - * @param \SynergiTech\Staffology\Model\ContractPersonalDetailsResponse|null $personalDetails personalDetails + * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate * * @return $this */ - public function setPersonalDetails(?\SynergiTech\Staffology\Model\ContractPersonalDetailsResponse $personalDetails): static + public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static { - if (is_null($personalDetails)) { - throw new InvalidArgumentException('non-nullable personalDetails cannot be null'); + if (is_null($aggregatedServiceDate)) { + array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('aggregatedServiceDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['personalDetails'] = $personalDetails; + $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; return $this; } /** - * Gets employmentDetails + * Gets autoEnrolment * - * @return \SynergiTech\Staffology\Model\ContractEmploymentDetailsResponse|null + * @return \SynergiTech\Staffology\Model\ContractAutoEnrolmentResponse|null */ - public function getEmploymentDetails(): ?\SynergiTech\Staffology\Model\ContractEmploymentDetailsResponse + public function getAutoEnrolment(): ?\SynergiTech\Staffology\Model\ContractAutoEnrolmentResponse { - return $this->container['employmentDetails']; + return $this->container['autoEnrolment']; } /** - * Sets employmentDetails + * Sets autoEnrolment * - * @param \SynergiTech\Staffology\Model\ContractEmploymentDetailsResponse|null $employmentDetails employmentDetails + * @param \SynergiTech\Staffology\Model\ContractAutoEnrolmentResponse|null $autoEnrolment autoEnrolment * * @return $this */ - public function setEmploymentDetails(?\SynergiTech\Staffology\Model\ContractEmploymentDetailsResponse $employmentDetails): static + public function setAutoEnrolment(?\SynergiTech\Staffology\Model\ContractAutoEnrolmentResponse $autoEnrolment): static { - if (is_null($employmentDetails)) { - throw new InvalidArgumentException('non-nullable employmentDetails cannot be null'); + if (is_null($autoEnrolment)) { + throw new InvalidArgumentException('non-nullable autoEnrolment cannot be null'); } - $this->container['employmentDetails'] = $employmentDetails; + $this->container['autoEnrolment'] = $autoEnrolment; return $this; } /** - * Gets autoEnrolment + * Gets bankDetails * - * @return \SynergiTech\Staffology\Model\ContractAutoEnrolmentResponse|null + * @return \SynergiTech\Staffology\Model\ContractBankDetails|null */ - public function getAutoEnrolment(): ?\SynergiTech\Staffology\Model\ContractAutoEnrolmentResponse + public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractBankDetails { - return $this->container['autoEnrolment']; + return $this->container['bankDetails']; } /** - * Sets autoEnrolment + * Sets bankDetails * - * @param \SynergiTech\Staffology\Model\ContractAutoEnrolmentResponse|null $autoEnrolment autoEnrolment + * @param \SynergiTech\Staffology\Model\ContractBankDetails|null $bankDetails bankDetails * * @return $this */ - public function setAutoEnrolment(?\SynergiTech\Staffology\Model\ContractAutoEnrolmentResponse $autoEnrolment): static + public function setBankDetails(?\SynergiTech\Staffology\Model\ContractBankDetails $bankDetails): static { - if (is_null($autoEnrolment)) { - throw new InvalidArgumentException('non-nullable autoEnrolment cannot be null'); + if (is_null($bankDetails)) { + throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); } - $this->container['autoEnrolment'] = $autoEnrolment; + $this->container['bankDetails'] = $bankDetails; return $this; } /** - * Gets leaveSettings + * Gets defaultPensionSchemeName * - * @return \SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsResponse|null + * @return string|null */ - public function getLeaveSettings(): ?\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsResponse + public function getDefaultPensionSchemeName(): ?string { - return $this->container['leaveSettings']; + return $this->container['defaultPensionSchemeName']; } /** - * Sets leaveSettings + * Sets defaultPensionSchemeName * - * @param \SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsResponse|null $leaveSettings leaveSettings + * @param string|null $defaultPensionSchemeName The name of the Pension Scheme that will be used for this employee. * * @return $this */ - public function setLeaveSettings(?\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsResponse $leaveSettings): static + public function setDefaultPensionSchemeName(?string $defaultPensionSchemeName): static { - if (is_null($leaveSettings)) { - throw new InvalidArgumentException('non-nullable leaveSettings cannot be null'); + if (is_null($defaultPensionSchemeName)) { + array_push($this->openAPINullablesSetToNull, 'defaultPensionSchemeName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultPensionSchemeName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['leaveSettings'] = $leaveSettings; + $this->container['defaultPensionSchemeName'] = $defaultPensionSchemeName; return $this; } /** - * Gets rightToWork + * Gets defaultPensionSchemeUniqueId * - * @return \SynergiTech\Staffology\Model\ContractRightToWork|null + * @return string|null */ - public function getRightToWork(): ?\SynergiTech\Staffology\Model\ContractRightToWork + public function getDefaultPensionSchemeUniqueId(): ?string { - return $this->container['rightToWork']; + return $this->container['defaultPensionSchemeUniqueId']; } /** - * Sets rightToWork + * Sets defaultPensionSchemeUniqueId * - * @param \SynergiTech\Staffology\Model\ContractRightToWork|null $rightToWork rightToWork + * @param string|null $defaultPensionSchemeUniqueId The UniqueId of the Pension Scheme that will be used for this employee. * * @return $this */ - public function setRightToWork(?\SynergiTech\Staffology\Model\ContractRightToWork $rightToWork): static + public function setDefaultPensionSchemeUniqueId(?string $defaultPensionSchemeUniqueId): static { - if (is_null($rightToWork)) { - throw new InvalidArgumentException('non-nullable rightToWork cannot be null'); + if (is_null($defaultPensionSchemeUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'defaultPensionSchemeUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultPensionSchemeUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['rightToWork'] = $rightToWork; + $this->container['defaultPensionSchemeUniqueId'] = $defaultPensionSchemeUniqueId; return $this; } /** - * Gets bankDetails + * Gets defaultWorkerGroupName * - * @return \SynergiTech\Staffology\Model\ContractBankDetails|null + * @return string|null */ - public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractBankDetails + public function getDefaultWorkerGroupName(): ?string { - return $this->container['bankDetails']; + return $this->container['defaultWorkerGroupName']; } /** - * Sets bankDetails + * Sets defaultWorkerGroupName * - * @param \SynergiTech\Staffology\Model\ContractBankDetails|null $bankDetails bankDetails + * @param string|null $defaultWorkerGroupName The name of the Worker Group that will be used for this employee. * * @return $this */ - public function setBankDetails(?\SynergiTech\Staffology\Model\ContractBankDetails $bankDetails): static + public function setDefaultWorkerGroupName(?string $defaultWorkerGroupName): static { - if (is_null($bankDetails)) { - throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); + if (is_null($defaultWorkerGroupName)) { + array_push($this->openAPINullablesSetToNull, 'defaultWorkerGroupName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultWorkerGroupName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['bankDetails'] = $bankDetails; + $this->container['defaultWorkerGroupName'] = $defaultWorkerGroupName; return $this; } /** - * Gets payOptions + * Gets defaultWorkerGroupUniqueId * - * @return \SynergiTech\Staffology\Model\ContractPayOptionsResponse|null + * @return string|null */ - public function getPayOptions(): ?\SynergiTech\Staffology\Model\ContractPayOptionsResponse + public function getDefaultWorkerGroupUniqueId(): ?string { - return $this->container['payOptions']; + return $this->container['defaultWorkerGroupUniqueId']; } /** - * Sets payOptions + * Sets defaultWorkerGroupUniqueId * - * @param \SynergiTech\Staffology\Model\ContractPayOptionsResponse|null $payOptions payOptions + * @param string|null $defaultWorkerGroupUniqueId The UniqueId of the Worker Group that will be used for this employee. * * @return $this */ - public function setPayOptions(?\SynergiTech\Staffology\Model\ContractPayOptionsResponse $payOptions): static + public function setDefaultWorkerGroupUniqueId(?string $defaultWorkerGroupUniqueId): static { - if (is_null($payOptions)) { - throw new InvalidArgumentException('non-nullable payOptions cannot be null'); + if (is_null($defaultWorkerGroupUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'defaultWorkerGroupUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultWorkerGroupUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payOptions'] = $payOptions; + $this->container['defaultWorkerGroupUniqueId'] = $defaultWorkerGroupUniqueId; return $this; } /** - * Gets tags + * Gets employmentDetails * - * @return string[]|null + * @return \SynergiTech\Staffology\Model\ContractEmploymentDetailsResponse|null */ - public function getTags(): ?array + public function getEmploymentDetails(): ?\SynergiTech\Staffology\Model\ContractEmploymentDetailsResponse { - return $this->container['tags']; + return $this->container['employmentDetails']; } /** - * Sets tags + * Sets employmentDetails * - * @param string[]|null $tags tags + * @param \SynergiTech\Staffology\Model\ContractEmploymentDetailsResponse|null $employmentDetails employmentDetails * * @return $this */ - public function setTags(?array $tags): static + public function setEmploymentDetails(?\SynergiTech\Staffology\Model\ContractEmploymentDetailsResponse $employmentDetails): static { - if (is_null($tags)) { - array_push($this->openAPINullablesSetToNull, 'tags'); + if (is_null($employmentDetails)) { + throw new InvalidArgumentException('non-nullable employmentDetails cannot be null'); + } + $this->container['employmentDetails'] = $employmentDetails; + + return $this; + } + + /** + * Gets evcId + * + * @return string|null + */ + public function getEvcId(): ?string + { + return $this->container['evcId']; + } + + /** + * Sets evcId + * + * @param string|null $evcId If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. + * + * @return $this + */ + public function setEvcId(?string $evcId): static + { + if (is_null($evcId)) { + array_push($this->openAPINullablesSetToNull, 'evcId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tags', $nullablesSetToNull); + $index = array_search('evcId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tags'] = $tags; + $this->container['evcId'] = $evcId; return $this; } /** - * Gets status + * Gets holidaySchemeUniqueId * - * @return \SynergiTech\Staffology\Model\EmployeeStatus|null + * @return string|null */ - public function getStatus(): ?\SynergiTech\Staffology\Model\EmployeeStatus + public function getHolidaySchemeUniqueId(): ?string { - return $this->container['status']; + return $this->container['holidaySchemeUniqueId']; } /** - * Sets status + * Sets holidaySchemeUniqueId * - * @param \SynergiTech\Staffology\Model\EmployeeStatus|null $status status + * @param string|null $holidaySchemeUniqueId holidaySchemeUniqueId * * @return $this */ - public function setStatus(?\SynergiTech\Staffology\Model\EmployeeStatus $status): static + public function setHolidaySchemeUniqueId(?string $holidaySchemeUniqueId): static { - if (is_null($status)) { - throw new InvalidArgumentException('non-nullable status cannot be null'); + if (is_null($holidaySchemeUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'holidaySchemeUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('holidaySchemeUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['status'] = $status; + $this->container['holidaySchemeUniqueId'] = $holidaySchemeUniqueId; return $this; } /** - * Gets aeNotEnroledWarning + * Gets id * - * @return bool|null + * @return string|null */ - public function getAeNotEnroledWarning(): ?bool + public function getId(): ?string { - return $this->container['aeNotEnroledWarning']; + return $this->container['id']; } /** - * Sets aeNotEnroledWarning + * Sets id * - * @param bool|null $aeNotEnroledWarning aeNotEnroledWarning + * @param string|null $id The unique id of the object * * @return $this */ - public function setAeNotEnroledWarning(?bool $aeNotEnroledWarning): static + public function setId(?string $id): static { - if (is_null($aeNotEnroledWarning)) { - throw new InvalidArgumentException('non-nullable aeNotEnroledWarning cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['aeNotEnroledWarning'] = $aeNotEnroledWarning; + $this->container['id'] = $id; return $this; } /** - * Gets sourceSystemId + * Gets leaveSettings * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsResponse|null */ - public function getSourceSystemId(): ?string + public function getLeaveSettings(): ?\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsResponse { - return $this->container['sourceSystemId']; + return $this->container['leaveSettings']; } /** - * Sets sourceSystemId + * Sets leaveSettings * - * @param string|null $sourceSystemId sourceSystemId + * @param \SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsResponse|null $leaveSettings leaveSettings * * @return $this */ - public function setSourceSystemId(?string $sourceSystemId): static + public function setLeaveSettings(?\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsResponse $leaveSettings): static { - if (is_null($sourceSystemId)) { - array_push($this->openAPINullablesSetToNull, 'sourceSystemId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('sourceSystemId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($leaveSettings)) { + throw new InvalidArgumentException('non-nullable leaveSettings cannot be null'); } - $this->container['sourceSystemId'] = $sourceSystemId; + $this->container['leaveSettings'] = $leaveSettings; return $this; } /** - * Gets aggregatedServiceDate + * Gets payOptions * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\ContractPayOptionsResponse|null */ - public function getAggregatedServiceDate(): ?\DateTime + public function getPayOptions(): ?\SynergiTech\Staffology\Model\ContractPayOptionsResponse { - return $this->container['aggregatedServiceDate']; + return $this->container['payOptions']; } /** - * Sets aggregatedServiceDate + * Sets payOptions * - * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate + * @param \SynergiTech\Staffology\Model\ContractPayOptionsResponse|null $payOptions payOptions * * @return $this */ - public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static + public function setPayOptions(?\SynergiTech\Staffology\Model\ContractPayOptionsResponse $payOptions): static { - if (is_null($aggregatedServiceDate)) { - array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aggregatedServiceDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payOptions)) { + throw new InvalidArgumentException('non-nullable payOptions cannot be null'); } - $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; + $this->container['payOptions'] = $payOptions; return $this; } /** - * Gets holidaySchemeUniqueId + * Gets personalDetails + * + * @return \SynergiTech\Staffology\Model\ContractPersonalDetailsResponse|null + */ + public function getPersonalDetails(): ?\SynergiTech\Staffology\Model\ContractPersonalDetailsResponse + { + return $this->container['personalDetails']; + } + + /** + * Sets personalDetails + * + * @param \SynergiTech\Staffology\Model\ContractPersonalDetailsResponse|null $personalDetails personalDetails + * + * @return $this + */ + public function setPersonalDetails(?\SynergiTech\Staffology\Model\ContractPersonalDetailsResponse $personalDetails): static + { + if (is_null($personalDetails)) { + throw new InvalidArgumentException('non-nullable personalDetails cannot be null'); + } + $this->container['personalDetails'] = $personalDetails; + + return $this; + } + + /** + * Gets rightToWork + * + * @return \SynergiTech\Staffology\Model\ContractRightToWork|null + */ + public function getRightToWork(): ?\SynergiTech\Staffology\Model\ContractRightToWork + { + return $this->container['rightToWork']; + } + + /** + * Sets rightToWork + * + * @param \SynergiTech\Staffology\Model\ContractRightToWork|null $rightToWork rightToWork + * + * @return $this + */ + public function setRightToWork(?\SynergiTech\Staffology\Model\ContractRightToWork $rightToWork): static + { + if (is_null($rightToWork)) { + throw new InvalidArgumentException('non-nullable rightToWork cannot be null'); + } + $this->container['rightToWork'] = $rightToWork; + + return $this; + } + + /** + * Gets sourceSystemId * * @return string|null */ - public function getHolidaySchemeUniqueId(): ?string + public function getSourceSystemId(): ?string { - return $this->container['holidaySchemeUniqueId']; + return $this->container['sourceSystemId']; } /** - * Sets holidaySchemeUniqueId + * Sets sourceSystemId * - * @param string|null $holidaySchemeUniqueId holidaySchemeUniqueId + * @param string|null $sourceSystemId sourceSystemId * * @return $this */ - public function setHolidaySchemeUniqueId(?string $holidaySchemeUniqueId): static + public function setSourceSystemId(?string $sourceSystemId): static { - if (is_null($holidaySchemeUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'holidaySchemeUniqueId'); + if (is_null($sourceSystemId)) { + array_push($this->openAPINullablesSetToNull, 'sourceSystemId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('holidaySchemeUniqueId', $nullablesSetToNull); + $index = array_search('sourceSystemId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['holidaySchemeUniqueId'] = $holidaySchemeUniqueId; + $this->container['sourceSystemId'] = $sourceSystemId; return $this; } /** - * Gets evcId + * Gets status * - * @return string|null + * @return \SynergiTech\Staffology\Model\EmployeeStatus|null */ - public function getEvcId(): ?string + public function getStatus(): ?\SynergiTech\Staffology\Model\EmployeeStatus { - return $this->container['evcId']; + return $this->container['status']; } /** - * Sets evcId + * Sets status * - * @param string|null $evcId If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. + * @param \SynergiTech\Staffology\Model\EmployeeStatus|null $status status * * @return $this */ - public function setEvcId(?string $evcId): static + public function setStatus(?\SynergiTech\Staffology\Model\EmployeeStatus $status): static { - if (is_null($evcId)) { - array_push($this->openAPINullablesSetToNull, 'evcId'); + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets tags + * + * @return string[]|null + */ + public function getTags(): ?array + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags tags + * + * @return $this + */ + public function setTags(?array $tags): static + { + if (is_null($tags)) { + array_push($this->openAPINullablesSetToNull, 'tags'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('evcId', $nullablesSetToNull); + $index = array_search('tags', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['evcId'] = $evcId; + $this->container['tags'] = $tags; return $this; } diff --git a/src/Model/ContractEmployeeRoleAnalysisCategoryCodeRequest.php b/src/Model/ContractEmployeeRoleAnalysisCategoryCodeRequest.php index 6ee0898..b902198 100644 --- a/src/Model/ContractEmployeeRoleAnalysisCategoryCodeRequest.php +++ b/src/Model/ContractEmployeeRoleAnalysisCategoryCodeRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class ContractEmployeeRoleAnalysisCategoryCodeRequest implements ModelInterface, * @var array */ protected static array $openAPITypes = [ + 'analysisCategoryName' => 'string', + 'analysisCategoryPublicId' => 'string', 'code' => 'string', 'color' => 'string', + 'isPrimary' => 'bool', 'title' => 'string', - 'weighting' => 'float', - 'analysisCategoryName' => 'string', - 'analysisCategoryPublicId' => 'string', - 'isPrimary' => 'bool' + 'weighting' => 'float' ]; /** @@ -74,13 +74,13 @@ class ContractEmployeeRoleAnalysisCategoryCodeRequest implements ModelInterface, * @var array */ protected static array $openAPIFormats = [ + 'analysisCategoryName' => null, + 'analysisCategoryPublicId' => 'uuid', 'code' => null, 'color' => null, + 'isPrimary' => null, 'title' => null, - 'weighting' => 'double', - 'analysisCategoryName' => null, - 'analysisCategoryPublicId' => 'uuid', - 'isPrimary' => null + 'weighting' => 'double' ]; /** @@ -89,13 +89,13 @@ class ContractEmployeeRoleAnalysisCategoryCodeRequest implements ModelInterface, * @var array */ protected static array $openAPINullables = [ + 'analysisCategoryName' => true, + 'analysisCategoryPublicId' => false, 'code' => true, 'color' => true, + 'isPrimary' => false, 'title' => true, - 'weighting' => false, - 'analysisCategoryName' => true, - 'analysisCategoryPublicId' => false, - 'isPrimary' => false + 'weighting' => false ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'analysisCategoryName' => 'analysisCategoryName', + 'analysisCategoryPublicId' => 'analysisCategoryPublicId', 'code' => 'code', 'color' => 'color', + 'isPrimary' => 'isPrimary', 'title' => 'title', - 'weighting' => 'weighting', - 'analysisCategoryName' => 'analysisCategoryName', - 'analysisCategoryPublicId' => 'analysisCategoryPublicId', - 'isPrimary' => 'isPrimary' + 'weighting' => 'weighting' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'analysisCategoryName' => 'setAnalysisCategoryName', + 'analysisCategoryPublicId' => 'setAnalysisCategoryPublicId', 'code' => 'setCode', 'color' => 'setColor', + 'isPrimary' => 'setIsPrimary', 'title' => 'setTitle', - 'weighting' => 'setWeighting', - 'analysisCategoryName' => 'setAnalysisCategoryName', - 'analysisCategoryPublicId' => 'setAnalysisCategoryPublicId', - 'isPrimary' => 'setIsPrimary' + 'weighting' => 'setWeighting' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'analysisCategoryName' => 'getAnalysisCategoryName', + 'analysisCategoryPublicId' => 'getAnalysisCategoryPublicId', 'code' => 'getCode', 'color' => 'getColor', + 'isPrimary' => 'getIsPrimary', 'title' => 'getTitle', - 'weighting' => 'getWeighting', - 'analysisCategoryName' => 'getAnalysisCategoryName', - 'analysisCategoryPublicId' => 'getAnalysisCategoryPublicId', - 'isPrimary' => 'getIsPrimary' + 'weighting' => 'getWeighting' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('analysisCategoryName', $data ?? [], null); + $this->setIfExists('analysisCategoryPublicId', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); + $this->setIfExists('isPrimary', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); $this->setIfExists('weighting', $data ?? [], null); - $this->setIfExists('analysisCategoryName', $data ?? [], null); - $this->setIfExists('analysisCategoryPublicId', $data ?? [], null); - $this->setIfExists('isPrimary', $data ?? [], null); } /** @@ -331,218 +331,218 @@ public function valid(): bool /** - * Gets code + * Gets analysisCategoryName * * @return string|null */ - public function getCode(): ?string + public function getAnalysisCategoryName(): ?string { - return $this->container['code']; + return $this->container['analysisCategoryName']; } /** - * Sets code + * Sets analysisCategoryName * - * @param string|null $code Analysis Category code + * @param string|null $analysisCategoryName Analysis category name for AnalysisCategory code * * @return $this */ - public function setCode(?string $code): static + public function setAnalysisCategoryName(?string $analysisCategoryName): static { - if (is_null($code)) { - array_push($this->openAPINullablesSetToNull, 'code'); + if (is_null($analysisCategoryName)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('code', $nullablesSetToNull); + $index = array_search('analysisCategoryName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['code'] = $code; + $this->container['analysisCategoryName'] = $analysisCategoryName; return $this; } /** - * Gets color + * Gets analysisCategoryPublicId * * @return string|null */ - public function getColor(): ?string + public function getAnalysisCategoryPublicId(): ?string { - return $this->container['color']; + return $this->container['analysisCategoryPublicId']; } /** - * Sets color + * Sets analysisCategoryPublicId * - * @param string|null $color Analysis Category code color + * @param string|null $analysisCategoryPublicId Analysis category identifier * * @return $this */ - public function setColor(?string $color): static + public function setAnalysisCategoryPublicId(?string $analysisCategoryPublicId): static { - if (is_null($color)) { - array_push($this->openAPINullablesSetToNull, 'color'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('color', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($analysisCategoryPublicId)) { + throw new InvalidArgumentException('non-nullable analysisCategoryPublicId cannot be null'); } - $this->container['color'] = $color; + $this->container['analysisCategoryPublicId'] = $analysisCategoryPublicId; return $this; } /** - * Gets title + * Gets code * * @return string|null */ - public function getTitle(): ?string + public function getCode(): ?string { - return $this->container['title']; + return $this->container['code']; } /** - * Sets title + * Sets code * - * @param string|null $title Analysis Category code Title + * @param string|null $code Analysis Category code * * @return $this */ - public function setTitle(?string $title): static + public function setCode(?string $code): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); + if (is_null($code)) { + array_push($this->openAPINullablesSetToNull, 'code'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); + $index = array_search('code', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['title'] = $title; + $this->container['code'] = $code; return $this; } /** - * Gets weighting + * Gets color * - * @return float|null + * @return string|null */ - public function getWeighting(): ?float + public function getColor(): ?string { - return $this->container['weighting']; + return $this->container['color']; } /** - * Sets weighting + * Sets color * - * @param float|null $weighting Weightage for analysis category code + * @param string|null $color Analysis Category code color * * @return $this */ - public function setWeighting(?float $weighting): static + public function setColor(?string $color): static { - if (is_null($weighting)) { - throw new InvalidArgumentException('non-nullable weighting cannot be null'); + if (is_null($color)) { + array_push($this->openAPINullablesSetToNull, 'color'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('color', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['weighting'] = $weighting; + $this->container['color'] = $color; return $this; } /** - * Gets analysisCategoryName + * Gets isPrimary * - * @return string|null + * @return bool|null */ - public function getAnalysisCategoryName(): ?string + public function getIsPrimary(): ?bool { - return $this->container['analysisCategoryName']; + return $this->container['isPrimary']; } /** - * Sets analysisCategoryName + * Sets isPrimary * - * @param string|null $analysisCategoryName Analysis category name for AnalysisCategory code + * @param bool|null $isPrimary Return whether Employee Role is primary for not * * @return $this */ - public function setAnalysisCategoryName(?string $analysisCategoryName): static + public function setIsPrimary(?bool $isPrimary): static { - if (is_null($analysisCategoryName)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isPrimary)) { + throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); } - $this->container['analysisCategoryName'] = $analysisCategoryName; + $this->container['isPrimary'] = $isPrimary; return $this; } /** - * Gets analysisCategoryPublicId + * Gets title * * @return string|null */ - public function getAnalysisCategoryPublicId(): ?string + public function getTitle(): ?string { - return $this->container['analysisCategoryPublicId']; + return $this->container['title']; } /** - * Sets analysisCategoryPublicId + * Sets title * - * @param string|null $analysisCategoryPublicId Analysis category identifier + * @param string|null $title Analysis Category code Title * * @return $this */ - public function setAnalysisCategoryPublicId(?string $analysisCategoryPublicId): static + public function setTitle(?string $title): static { - if (is_null($analysisCategoryPublicId)) { - throw new InvalidArgumentException('non-nullable analysisCategoryPublicId cannot be null'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['analysisCategoryPublicId'] = $analysisCategoryPublicId; + $this->container['title'] = $title; return $this; } /** - * Gets isPrimary + * Gets weighting * - * @return bool|null + * @return float|null */ - public function getIsPrimary(): ?bool + public function getWeighting(): ?float { - return $this->container['isPrimary']; + return $this->container['weighting']; } /** - * Sets isPrimary + * Sets weighting * - * @param bool|null $isPrimary Return whether Employee Role is primary for not + * @param float|null $weighting Weightage for analysis category code * * @return $this */ - public function setIsPrimary(?bool $isPrimary): static + public function setWeighting(?float $weighting): static { - if (is_null($isPrimary)) { - throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); + if (is_null($weighting)) { + throw new InvalidArgumentException('non-nullable weighting cannot be null'); } - $this->container['isPrimary'] = $isPrimary; + $this->container['weighting'] = $weighting; return $this; } diff --git a/src/Model/ContractEmployeeRoleAnalysisCategoryCodeResponse.php b/src/Model/ContractEmployeeRoleAnalysisCategoryCodeResponse.php index 9c84b8c..212348e 100644 --- a/src/Model/ContractEmployeeRoleAnalysisCategoryCodeResponse.php +++ b/src/Model/ContractEmployeeRoleAnalysisCategoryCodeResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class ContractEmployeeRoleAnalysisCategoryCodeResponse implements ModelInterface * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', + 'analysisCategoryName' => 'string', + 'analysisCategoryPublicId' => 'string', 'code' => 'string', 'color' => 'string', + 'id' => 'string', + 'isPrimary' => 'bool', 'title' => 'string', - 'weighting' => 'float', - 'analysisCategoryName' => 'string', - 'analysisCategoryPublicId' => 'string', - 'isPrimary' => 'bool' + 'weighting' => 'float' ]; /** @@ -75,14 +75,14 @@ class ContractEmployeeRoleAnalysisCategoryCodeResponse implements ModelInterface * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', + 'analysisCategoryName' => null, + 'analysisCategoryPublicId' => 'uuid', 'code' => null, 'color' => null, + 'id' => 'uuid', + 'isPrimary' => null, 'title' => null, - 'weighting' => 'double', - 'analysisCategoryName' => null, - 'analysisCategoryPublicId' => 'uuid', - 'isPrimary' => null + 'weighting' => 'double' ]; /** @@ -91,14 +91,14 @@ class ContractEmployeeRoleAnalysisCategoryCodeResponse implements ModelInterface * @var array */ protected static array $openAPINullables = [ - 'id' => false, + 'analysisCategoryName' => true, + 'analysisCategoryPublicId' => false, 'code' => true, 'color' => true, + 'id' => false, + 'isPrimary' => false, 'title' => true, - 'weighting' => false, - 'analysisCategoryName' => true, - 'analysisCategoryPublicId' => false, - 'isPrimary' => false + 'weighting' => false ]; /** @@ -187,14 +187,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', + 'analysisCategoryName' => 'analysisCategoryName', + 'analysisCategoryPublicId' => 'analysisCategoryPublicId', 'code' => 'code', 'color' => 'color', + 'id' => 'id', + 'isPrimary' => 'isPrimary', 'title' => 'title', - 'weighting' => 'weighting', - 'analysisCategoryName' => 'analysisCategoryName', - 'analysisCategoryPublicId' => 'analysisCategoryPublicId', - 'isPrimary' => 'isPrimary' + 'weighting' => 'weighting' ]; /** @@ -203,14 +203,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', + 'analysisCategoryName' => 'setAnalysisCategoryName', + 'analysisCategoryPublicId' => 'setAnalysisCategoryPublicId', 'code' => 'setCode', 'color' => 'setColor', + 'id' => 'setId', + 'isPrimary' => 'setIsPrimary', 'title' => 'setTitle', - 'weighting' => 'setWeighting', - 'analysisCategoryName' => 'setAnalysisCategoryName', - 'analysisCategoryPublicId' => 'setAnalysisCategoryPublicId', - 'isPrimary' => 'setIsPrimary' + 'weighting' => 'setWeighting' ]; /** @@ -219,14 +219,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', + 'analysisCategoryName' => 'getAnalysisCategoryName', + 'analysisCategoryPublicId' => 'getAnalysisCategoryPublicId', 'code' => 'getCode', 'color' => 'getColor', + 'id' => 'getId', + 'isPrimary' => 'getIsPrimary', 'title' => 'getTitle', - 'weighting' => 'getWeighting', - 'analysisCategoryName' => 'getAnalysisCategoryName', - 'analysisCategoryPublicId' => 'getAnalysisCategoryPublicId', - 'isPrimary' => 'getIsPrimary' + 'weighting' => 'getWeighting' ]; /** @@ -285,14 +285,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('analysisCategoryName', $data ?? [], null); + $this->setIfExists('analysisCategoryPublicId', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isPrimary', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); $this->setIfExists('weighting', $data ?? [], null); - $this->setIfExists('analysisCategoryName', $data ?? [], null); - $this->setIfExists('analysisCategoryPublicId', $data ?? [], null); - $this->setIfExists('isPrimary', $data ?? [], null); } /** @@ -338,28 +338,62 @@ public function valid(): bool /** - * Gets id + * Gets analysisCategoryName * * @return string|null */ - public function getId(): ?string + public function getAnalysisCategoryName(): ?string { - return $this->container['id']; + return $this->container['analysisCategoryName']; } /** - * Sets id + * Sets analysisCategoryName * - * @param string|null $id Employee Role Analysis Category Code identifier + * @param string|null $analysisCategoryName Analysis category name for AnalysisCategory code * * @return $this */ - public function setId(?string $id): static + public function setAnalysisCategoryName(?string $analysisCategoryName): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($analysisCategoryName)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('analysisCategoryName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['analysisCategoryName'] = $analysisCategoryName; + + return $this; + } + + /** + * Gets analysisCategoryPublicId + * + * @return string|null + */ + public function getAnalysisCategoryPublicId(): ?string + { + return $this->container['analysisCategoryPublicId']; + } + + /** + * Sets analysisCategoryPublicId + * + * @param string|null $analysisCategoryPublicId Analysis category identifier + * + * @return $this + */ + public function setAnalysisCategoryPublicId(?string $analysisCategoryPublicId): static + { + if (is_null($analysisCategoryPublicId)) { + throw new InvalidArgumentException('non-nullable analysisCategoryPublicId cannot be null'); + } + $this->container['analysisCategoryPublicId'] = $analysisCategoryPublicId; return $this; } @@ -433,150 +467,116 @@ public function setColor(?string $color): static } /** - * Gets title + * Gets id * * @return string|null */ - public function getTitle(): ?string + public function getId(): ?string { - return $this->container['title']; + return $this->container['id']; } /** - * Sets title + * Sets id * - * @param string|null $title Analysis Category code Title + * @param string|null $id Employee Role Analysis Category Code identifier * * @return $this */ - public function setTitle(?string $title): static + public function setId(?string $id): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['title'] = $title; + $this->container['id'] = $id; return $this; } /** - * Gets weighting + * Gets isPrimary * - * @return float|null + * @return bool|null */ - public function getWeighting(): ?float + public function getIsPrimary(): ?bool { - return $this->container['weighting']; + return $this->container['isPrimary']; } /** - * Sets weighting + * Sets isPrimary * - * @param float|null $weighting Weightage for analysis category code + * @param bool|null $isPrimary Return whether Employee Role is primary for not * * @return $this */ - public function setWeighting(?float $weighting): static + public function setIsPrimary(?bool $isPrimary): static { - if (is_null($weighting)) { - throw new InvalidArgumentException('non-nullable weighting cannot be null'); + if (is_null($isPrimary)) { + throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); } - $this->container['weighting'] = $weighting; + $this->container['isPrimary'] = $isPrimary; return $this; } /** - * Gets analysisCategoryName + * Gets title * * @return string|null */ - public function getAnalysisCategoryName(): ?string + public function getTitle(): ?string { - return $this->container['analysisCategoryName']; + return $this->container['title']; } /** - * Sets analysisCategoryName + * Sets title * - * @param string|null $analysisCategoryName Analysis category name for AnalysisCategory code + * @param string|null $title Analysis Category code Title * * @return $this */ - public function setAnalysisCategoryName(?string $analysisCategoryName): static + public function setTitle(?string $title): static { - if (is_null($analysisCategoryName)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryName'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryName', $nullablesSetToNull); + $index = array_search('title', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoryName'] = $analysisCategoryName; - - return $this; - } - - /** - * Gets analysisCategoryPublicId - * - * @return string|null - */ - public function getAnalysisCategoryPublicId(): ?string - { - return $this->container['analysisCategoryPublicId']; - } - - /** - * Sets analysisCategoryPublicId - * - * @param string|null $analysisCategoryPublicId Analysis category identifier - * - * @return $this - */ - public function setAnalysisCategoryPublicId(?string $analysisCategoryPublicId): static - { - if (is_null($analysisCategoryPublicId)) { - throw new InvalidArgumentException('non-nullable analysisCategoryPublicId cannot be null'); - } - $this->container['analysisCategoryPublicId'] = $analysisCategoryPublicId; + $this->container['title'] = $title; return $this; } /** - * Gets isPrimary + * Gets weighting * - * @return bool|null + * @return float|null */ - public function getIsPrimary(): ?bool + public function getWeighting(): ?float { - return $this->container['isPrimary']; + return $this->container['weighting']; } /** - * Sets isPrimary + * Sets weighting * - * @param bool|null $isPrimary Return whether Employee Role is primary for not + * @param float|null $weighting Weightage for analysis category code * * @return $this */ - public function setIsPrimary(?bool $isPrimary): static + public function setWeighting(?float $weighting): static { - if (is_null($isPrimary)) { - throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); + if (is_null($weighting)) { + throw new InvalidArgumentException('non-nullable weighting cannot be null'); } - $this->container['isPrimary'] = $isPrimary; + $this->container['weighting'] = $weighting; return $this; } diff --git a/src/Model/ContractEmployeeRoleItem.php b/src/Model/ContractEmployeeRoleItem.php index f454048..22d9b3a 100644 --- a/src/Model/ContractEmployeeRoleItem.php +++ b/src/Model/ContractEmployeeRoleItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class ContractEmployeeRoleItem implements ModelInterface, ArrayAccess, JsonSeria */ protected static array $openAPITypes = [ 'id' => 'string', - 'name' => 'string', 'metadata' => 'mixed', + 'name' => 'string', 'url' => 'string' ]; @@ -72,8 +72,8 @@ class ContractEmployeeRoleItem implements ModelInterface, ArrayAccess, JsonSeria */ protected static array $openAPIFormats = [ 'id' => 'uuid', - 'name' => null, 'metadata' => null, + 'name' => null, 'url' => null ]; @@ -84,8 +84,8 @@ class ContractEmployeeRoleItem implements ModelInterface, ArrayAccess, JsonSeria */ protected static array $openAPINullables = [ 'id' => false, - 'name' => true, 'metadata' => true, + 'name' => true, 'url' => true ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'id' => 'id', - 'name' => 'name', 'metadata' => 'metadata', + 'name' => 'name', 'url' => 'url' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'id' => 'setId', - 'name' => 'setName', 'metadata' => 'setMetadata', + 'name' => 'setName', 'url' => 'setUrl' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'id' => 'getId', - 'name' => 'getName', 'metadata' => 'getMetadata', + 'name' => 'getName', 'url' => 'getUrl' ]; @@ -262,8 +262,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); } @@ -337,69 +337,69 @@ public function setId(?string $id): static } /** - * Gets name + * Gets metadata * - * @return string|null + * @return mixed|null */ - public function getName(): ?string + public function getMetadata(): mixed { - return $this->container['name']; + return $this->container['metadata']; } /** - * Sets name + * Sets metadata * - * @param string|null $name name + * @param mixed|null $metadata metadata * * @return $this */ - public function setName(?string $name): static + public function setMetadata(mixed $metadata): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($metadata)) { + array_push($this->openAPINullablesSetToNull, 'metadata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('metadata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['metadata'] = $metadata; return $this; } /** - * Gets metadata + * Gets name * - * @return mixed|null + * @return string|null */ - public function getMetadata(): mixed + public function getName(): ?string { - return $this->container['metadata']; + return $this->container['name']; } /** - * Sets metadata + * Sets name * - * @param mixed|null $metadata metadata + * @param string|null $name name * * @return $this */ - public function setMetadata(mixed $metadata): static + public function setName(?string $name): static { - if (is_null($metadata)) { - array_push($this->openAPINullablesSetToNull, 'metadata'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('metadata', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['metadata'] = $metadata; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/ContractEmployeeRoleResponse.php b/src/Model/ContractEmployeeRoleResponse.php index fee102e..899860d 100644 --- a/src/Model/ContractEmployeeRoleResponse.php +++ b/src/Model/ContractEmployeeRoleResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,19 +59,21 @@ class ContractEmployeeRoleResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ + 'basis' => '\SynergiTech\Staffology\Model\RoleBasis', + 'defaultPensionSchemeUniqueId' => 'string', + 'defaultWorkerGroupUniqueId' => 'string', + 'displayName' => 'string', + 'endDate' => '\DateTime', 'id' => 'string', - 'jobTitle' => 'string', 'isPrimary' => 'bool', + 'jobTitle' => 'string', + 'occupationalMaternityPolicyUniqueId' => 'string', + 'occupationalSicknessPolicyUniqueId' => 'string', + 'payOptions' => '\SynergiTech\Staffology\Model\ContractPayOptionsBaseResponse', 'reference' => 'string', 'startDate' => '\DateTime', - 'endDate' => '\DateTime', - 'basis' => '\SynergiTech\Staffology\Model\RoleBasis', 'type' => '\SynergiTech\Staffology\Model\RoleType', - 'displayName' => 'string', - 'payOptions' => '\SynergiTech\Staffology\Model\ContractPayOptionsBaseResponse', - 'workingPattern' => '\SynergiTech\Staffology\Model\ContractWorkingPatternResponse', - 'occupationalMaternityPolicyUniqueId' => 'string', - 'occupationalSicknessPolicyUniqueId' => 'string' + 'workingPattern' => '\SynergiTech\Staffology\Model\ContractWorkingPatternResponse' ]; /** @@ -80,19 +82,21 @@ class ContractEmployeeRoleResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ + 'basis' => null, + 'defaultPensionSchemeUniqueId' => 'uuid', + 'defaultWorkerGroupUniqueId' => 'uuid', + 'displayName' => null, + 'endDate' => 'date', 'id' => 'uuid', - 'jobTitle' => null, 'isPrimary' => null, + 'jobTitle' => null, + 'occupationalMaternityPolicyUniqueId' => 'uuid', + 'occupationalSicknessPolicyUniqueId' => 'uuid', + 'payOptions' => null, 'reference' => null, 'startDate' => 'date', - 'endDate' => 'date', - 'basis' => null, 'type' => null, - 'displayName' => null, - 'payOptions' => null, - 'workingPattern' => null, - 'occupationalMaternityPolicyUniqueId' => 'uuid', - 'occupationalSicknessPolicyUniqueId' => 'uuid' + 'workingPattern' => null ]; /** @@ -101,19 +105,21 @@ class ContractEmployeeRoleResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ + 'basis' => false, + 'defaultPensionSchemeUniqueId' => true, + 'defaultWorkerGroupUniqueId' => true, + 'displayName' => true, + 'endDate' => true, 'id' => false, - 'jobTitle' => true, 'isPrimary' => false, + 'jobTitle' => true, + 'occupationalMaternityPolicyUniqueId' => true, + 'occupationalSicknessPolicyUniqueId' => true, + 'payOptions' => false, 'reference' => true, 'startDate' => false, - 'endDate' => true, - 'basis' => false, 'type' => false, - 'displayName' => true, - 'payOptions' => false, - 'workingPattern' => false, - 'occupationalMaternityPolicyUniqueId' => true, - 'occupationalSicknessPolicyUniqueId' => true + 'workingPattern' => false ]; /** @@ -202,19 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'basis' => 'basis', + 'defaultPensionSchemeUniqueId' => 'defaultPensionSchemeUniqueId', + 'defaultWorkerGroupUniqueId' => 'defaultWorkerGroupUniqueId', + 'displayName' => 'displayName', + 'endDate' => 'endDate', 'id' => 'id', - 'jobTitle' => 'jobTitle', 'isPrimary' => 'isPrimary', + 'jobTitle' => 'jobTitle', + 'occupationalMaternityPolicyUniqueId' => 'occupationalMaternityPolicyUniqueId', + 'occupationalSicknessPolicyUniqueId' => 'occupationalSicknessPolicyUniqueId', + 'payOptions' => 'payOptions', 'reference' => 'reference', 'startDate' => 'startDate', - 'endDate' => 'endDate', - 'basis' => 'basis', 'type' => 'type', - 'displayName' => 'displayName', - 'payOptions' => 'payOptions', - 'workingPattern' => 'workingPattern', - 'occupationalMaternityPolicyUniqueId' => 'occupationalMaternityPolicyUniqueId', - 'occupationalSicknessPolicyUniqueId' => 'occupationalSicknessPolicyUniqueId' + 'workingPattern' => 'workingPattern' ]; /** @@ -223,19 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'basis' => 'setBasis', + 'defaultPensionSchemeUniqueId' => 'setDefaultPensionSchemeUniqueId', + 'defaultWorkerGroupUniqueId' => 'setDefaultWorkerGroupUniqueId', + 'displayName' => 'setDisplayName', + 'endDate' => 'setEndDate', 'id' => 'setId', - 'jobTitle' => 'setJobTitle', 'isPrimary' => 'setIsPrimary', + 'jobTitle' => 'setJobTitle', + 'occupationalMaternityPolicyUniqueId' => 'setOccupationalMaternityPolicyUniqueId', + 'occupationalSicknessPolicyUniqueId' => 'setOccupationalSicknessPolicyUniqueId', + 'payOptions' => 'setPayOptions', 'reference' => 'setReference', 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', - 'basis' => 'setBasis', 'type' => 'setType', - 'displayName' => 'setDisplayName', - 'payOptions' => 'setPayOptions', - 'workingPattern' => 'setWorkingPattern', - 'occupationalMaternityPolicyUniqueId' => 'setOccupationalMaternityPolicyUniqueId', - 'occupationalSicknessPolicyUniqueId' => 'setOccupationalSicknessPolicyUniqueId' + 'workingPattern' => 'setWorkingPattern' ]; /** @@ -244,19 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'basis' => 'getBasis', + 'defaultPensionSchemeUniqueId' => 'getDefaultPensionSchemeUniqueId', + 'defaultWorkerGroupUniqueId' => 'getDefaultWorkerGroupUniqueId', + 'displayName' => 'getDisplayName', + 'endDate' => 'getEndDate', 'id' => 'getId', - 'jobTitle' => 'getJobTitle', 'isPrimary' => 'getIsPrimary', + 'jobTitle' => 'getJobTitle', + 'occupationalMaternityPolicyUniqueId' => 'getOccupationalMaternityPolicyUniqueId', + 'occupationalSicknessPolicyUniqueId' => 'getOccupationalSicknessPolicyUniqueId', + 'payOptions' => 'getPayOptions', 'reference' => 'getReference', 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', - 'basis' => 'getBasis', 'type' => 'getType', - 'displayName' => 'getDisplayName', - 'payOptions' => 'getPayOptions', - 'workingPattern' => 'getWorkingPattern', - 'occupationalMaternityPolicyUniqueId' => 'getOccupationalMaternityPolicyUniqueId', - 'occupationalSicknessPolicyUniqueId' => 'getOccupationalSicknessPolicyUniqueId' + 'workingPattern' => 'getWorkingPattern' ]; /** @@ -315,19 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('basis', $data ?? [], null); + $this->setIfExists('defaultPensionSchemeUniqueId', $data ?? [], null); + $this->setIfExists('defaultWorkerGroupUniqueId', $data ?? [], null); + $this->setIfExists('displayName', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('jobTitle', $data ?? [], null); $this->setIfExists('isPrimary', $data ?? [], null); + $this->setIfExists('jobTitle', $data ?? [], null); + $this->setIfExists('occupationalMaternityPolicyUniqueId', $data ?? [], null); + $this->setIfExists('occupationalSicknessPolicyUniqueId', $data ?? [], null); + $this->setIfExists('payOptions', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); - $this->setIfExists('basis', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('displayName', $data ?? [], null); - $this->setIfExists('payOptions', $data ?? [], null); $this->setIfExists('workingPattern', $data ?? [], null); - $this->setIfExists('occupationalMaternityPolicyUniqueId', $data ?? [], null); - $this->setIfExists('occupationalSicknessPolicyUniqueId', $data ?? [], null); } /** @@ -377,276 +391,320 @@ public function valid(): bool /** - * Gets id + * Gets basis * - * @return string|null + * @return \SynergiTech\Staffology\Model\RoleBasis|null */ - public function getId(): ?string + public function getBasis(): ?\SynergiTech\Staffology\Model\RoleBasis { - return $this->container['id']; + return $this->container['basis']; } /** - * Sets id + * Sets basis * - * @param string|null $id id + * @param \SynergiTech\Staffology\Model\RoleBasis|null $basis basis * * @return $this */ - public function setId(?string $id): static + public function setBasis(?\SynergiTech\Staffology\Model\RoleBasis $basis): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($basis)) { + throw new InvalidArgumentException('non-nullable basis cannot be null'); } - $this->container['id'] = $id; + $this->container['basis'] = $basis; return $this; } /** - * Gets jobTitle + * Gets defaultPensionSchemeUniqueId * * @return string|null */ - public function getJobTitle(): ?string + public function getDefaultPensionSchemeUniqueId(): ?string { - return $this->container['jobTitle']; + return $this->container['defaultPensionSchemeUniqueId']; } /** - * Sets jobTitle + * Sets defaultPensionSchemeUniqueId * - * @param string|null $jobTitle Job Title of the Role + * @param string|null $defaultPensionSchemeUniqueId defaultPensionSchemeUniqueId * * @return $this */ - public function setJobTitle(?string $jobTitle): static + public function setDefaultPensionSchemeUniqueId(?string $defaultPensionSchemeUniqueId): static { - if (is_null($jobTitle)) { - array_push($this->openAPINullablesSetToNull, 'jobTitle'); + if (is_null($defaultPensionSchemeUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'defaultPensionSchemeUniqueId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('jobTitle', $nullablesSetToNull); + $index = array_search('defaultPensionSchemeUniqueId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['jobTitle'] = $jobTitle; + $this->container['defaultPensionSchemeUniqueId'] = $defaultPensionSchemeUniqueId; return $this; } /** - * Gets isPrimary + * Gets defaultWorkerGroupUniqueId * - * @return bool|null + * @return string|null */ - public function getIsPrimary(): ?bool + public function getDefaultWorkerGroupUniqueId(): ?string { - return $this->container['isPrimary']; + return $this->container['defaultWorkerGroupUniqueId']; } /** - * Sets isPrimary + * Sets defaultWorkerGroupUniqueId * - * @param bool|null $isPrimary Set to True if this is Primary role of the Employee + * @param string|null $defaultWorkerGroupUniqueId defaultWorkerGroupUniqueId * * @return $this */ - public function setIsPrimary(?bool $isPrimary): static + public function setDefaultWorkerGroupUniqueId(?string $defaultWorkerGroupUniqueId): static { - if (is_null($isPrimary)) { - throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); + if (is_null($defaultWorkerGroupUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'defaultWorkerGroupUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultWorkerGroupUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isPrimary'] = $isPrimary; + $this->container['defaultWorkerGroupUniqueId'] = $defaultWorkerGroupUniqueId; return $this; } /** - * Gets reference + * Gets displayName * * @return string|null */ - public function getReference(): ?string + public function getDisplayName(): ?string { - return $this->container['reference']; + return $this->container['displayName']; } /** - * Sets reference + * Sets displayName * - * @param string|null $reference reference + * @param string|null $displayName displayName * * @return $this */ - public function setReference(?string $reference): static + public function setDisplayName(?string $displayName): static { - if (is_null($reference)) { - array_push($this->openAPINullablesSetToNull, 'reference'); + if (is_null($displayName)) { + array_push($this->openAPINullablesSetToNull, 'displayName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('reference', $nullablesSetToNull); + $index = array_search('displayName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($reference) && (mb_strlen($reference) > 35)) { - throw new InvalidArgumentException('invalid length for $reference when calling ContractEmployeeRoleResponse., must be smaller than or equal to 35.'); - } - - $this->container['reference'] = $reference; + $this->container['displayName'] = $displayName; return $this; } /** - * Gets startDate + * Gets endDate * * @return \DateTime|null */ - public function getStartDate(): ?\DateTime + public function getEndDate(): ?\DateTime { - return $this->container['startDate']; + return $this->container['endDate']; } /** - * Sets startDate + * Sets endDate * - * @param \DateTime|null $startDate startDate + * @param \DateTime|null $endDate endDate * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($endDate)) { + array_push($this->openAPINullablesSetToNull, 'endDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['startDate'] = $startDate; + $this->container['endDate'] = $endDate; return $this; } /** - * Gets endDate + * Gets id * - * @return \DateTime|null + * @return string|null */ - public function getEndDate(): ?\DateTime + public function getId(): ?string { - return $this->container['endDate']; + return $this->container['id']; } /** - * Sets endDate + * Sets id * - * @param \DateTime|null $endDate endDate + * @param string|null $id id * * @return $this */ - public function setEndDate(?\DateTime $endDate): static + public function setId(?string $id): static { - if (is_null($endDate)) { - array_push($this->openAPINullablesSetToNull, 'endDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['endDate'] = $endDate; + $this->container['id'] = $id; return $this; } /** - * Gets basis + * Gets isPrimary * - * @return \SynergiTech\Staffology\Model\RoleBasis|null + * @return bool|null */ - public function getBasis(): ?\SynergiTech\Staffology\Model\RoleBasis + public function getIsPrimary(): ?bool { - return $this->container['basis']; + return $this->container['isPrimary']; } /** - * Sets basis + * Sets isPrimary * - * @param \SynergiTech\Staffology\Model\RoleBasis|null $basis basis + * @param bool|null $isPrimary Set to True if this is Primary role of the Employee * * @return $this */ - public function setBasis(?\SynergiTech\Staffology\Model\RoleBasis $basis): static + public function setIsPrimary(?bool $isPrimary): static { - if (is_null($basis)) { - throw new InvalidArgumentException('non-nullable basis cannot be null'); + if (is_null($isPrimary)) { + throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); } - $this->container['basis'] = $basis; + $this->container['isPrimary'] = $isPrimary; return $this; } /** - * Gets type + * Gets jobTitle * - * @return \SynergiTech\Staffology\Model\RoleType|null + * @return string|null */ - public function getType(): ?\SynergiTech\Staffology\Model\RoleType + public function getJobTitle(): ?string { - return $this->container['type']; + return $this->container['jobTitle']; } /** - * Sets type + * Sets jobTitle * - * @param \SynergiTech\Staffology\Model\RoleType|null $type type + * @param string|null $jobTitle Job Title of the Role * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\RoleType $type): static + public function setJobTitle(?string $jobTitle): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($jobTitle)) { + array_push($this->openAPINullablesSetToNull, 'jobTitle'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('jobTitle', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['type'] = $type; + $this->container['jobTitle'] = $jobTitle; return $this; } /** - * Gets displayName + * Gets occupationalMaternityPolicyUniqueId * * @return string|null */ - public function getDisplayName(): ?string + public function getOccupationalMaternityPolicyUniqueId(): ?string { - return $this->container['displayName']; + return $this->container['occupationalMaternityPolicyUniqueId']; } /** - * Sets displayName + * Sets occupationalMaternityPolicyUniqueId * - * @param string|null $displayName displayName + * @param string|null $occupationalMaternityPolicyUniqueId occupationalMaternityPolicyUniqueId * * @return $this */ - public function setDisplayName(?string $displayName): static + public function setOccupationalMaternityPolicyUniqueId(?string $occupationalMaternityPolicyUniqueId): static { - if (is_null($displayName)) { - array_push($this->openAPINullablesSetToNull, 'displayName'); + if (is_null($occupationalMaternityPolicyUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'occupationalMaternityPolicyUniqueId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('displayName', $nullablesSetToNull); + $index = array_search('occupationalMaternityPolicyUniqueId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['displayName'] = $displayName; + $this->container['occupationalMaternityPolicyUniqueId'] = $occupationalMaternityPolicyUniqueId; + + return $this; + } + + /** + * Gets occupationalSicknessPolicyUniqueId + * + * @return string|null + */ + public function getOccupationalSicknessPolicyUniqueId(): ?string + { + return $this->container['occupationalSicknessPolicyUniqueId']; + } + + /** + * Sets occupationalSicknessPolicyUniqueId + * + * @param string|null $occupationalSicknessPolicyUniqueId occupationalSicknessPolicyUniqueId + * + * @return $this + */ + public function setOccupationalSicknessPolicyUniqueId(?string $occupationalSicknessPolicyUniqueId): static + { + if (is_null($occupationalSicknessPolicyUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'occupationalSicknessPolicyUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('occupationalSicknessPolicyUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['occupationalSicknessPolicyUniqueId'] = $occupationalSicknessPolicyUniqueId; return $this; } @@ -679,96 +737,120 @@ public function setPayOptions(?\SynergiTech\Staffology\Model\ContractPayOptionsB } /** - * Gets workingPattern + * Gets reference * - * @return \SynergiTech\Staffology\Model\ContractWorkingPatternResponse|null + * @return string|null */ - public function getWorkingPattern(): ?\SynergiTech\Staffology\Model\ContractWorkingPatternResponse + public function getReference(): ?string { - return $this->container['workingPattern']; + return $this->container['reference']; } /** - * Sets workingPattern + * Sets reference * - * @param \SynergiTech\Staffology\Model\ContractWorkingPatternResponse|null $workingPattern workingPattern + * @param string|null $reference reference * * @return $this */ - public function setWorkingPattern(?\SynergiTech\Staffology\Model\ContractWorkingPatternResponse $workingPattern): static + public function setReference(?string $reference): static { - if (is_null($workingPattern)) { - throw new InvalidArgumentException('non-nullable workingPattern cannot be null'); + if (is_null($reference)) { + array_push($this->openAPINullablesSetToNull, 'reference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('reference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['workingPattern'] = $workingPattern; + if (!is_null($reference) && (mb_strlen($reference) > 35)) { + throw new InvalidArgumentException('invalid length for $reference when calling ContractEmployeeRoleResponse., must be smaller than or equal to 35.'); + } + + $this->container['reference'] = $reference; return $this; } /** - * Gets occupationalMaternityPolicyUniqueId + * Gets startDate * - * @return string|null + * @return \DateTime|null */ - public function getOccupationalMaternityPolicyUniqueId(): ?string + public function getStartDate(): ?\DateTime { - return $this->container['occupationalMaternityPolicyUniqueId']; + return $this->container['startDate']; } /** - * Sets occupationalMaternityPolicyUniqueId + * Sets startDate * - * @param string|null $occupationalMaternityPolicyUniqueId occupationalMaternityPolicyUniqueId + * @param \DateTime|null $startDate startDate * * @return $this */ - public function setOccupationalMaternityPolicyUniqueId(?string $occupationalMaternityPolicyUniqueId): static + public function setStartDate(?\DateTime $startDate): static { - if (is_null($occupationalMaternityPolicyUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'occupationalMaternityPolicyUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('occupationalMaternityPolicyUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); } - $this->container['occupationalMaternityPolicyUniqueId'] = $occupationalMaternityPolicyUniqueId; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets occupationalSicknessPolicyUniqueId + * Gets type * - * @return string|null + * @return \SynergiTech\Staffology\Model\RoleType|null */ - public function getOccupationalSicknessPolicyUniqueId(): ?string + public function getType(): ?\SynergiTech\Staffology\Model\RoleType { - return $this->container['occupationalSicknessPolicyUniqueId']; + return $this->container['type']; } /** - * Sets occupationalSicknessPolicyUniqueId + * Sets type * - * @param string|null $occupationalSicknessPolicyUniqueId occupationalSicknessPolicyUniqueId + * @param \SynergiTech\Staffology\Model\RoleType|null $type type * * @return $this */ - public function setOccupationalSicknessPolicyUniqueId(?string $occupationalSicknessPolicyUniqueId): static + public function setType(?\SynergiTech\Staffology\Model\RoleType $type): static { - if (is_null($occupationalSicknessPolicyUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'occupationalSicknessPolicyUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('occupationalSicknessPolicyUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['occupationalSicknessPolicyUniqueId'] = $occupationalSicknessPolicyUniqueId; + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets workingPattern + * + * @return \SynergiTech\Staffology\Model\ContractWorkingPatternResponse|null + */ + public function getWorkingPattern(): ?\SynergiTech\Staffology\Model\ContractWorkingPatternResponse + { + return $this->container['workingPattern']; + } + + /** + * Sets workingPattern + * + * @param \SynergiTech\Staffology\Model\ContractWorkingPatternResponse|null $workingPattern workingPattern + * + * @return $this + */ + public function setWorkingPattern(?\SynergiTech\Staffology\Model\ContractWorkingPatternResponse $workingPattern): static + { + if (is_null($workingPattern)) { + throw new InvalidArgumentException('non-nullable workingPattern cannot be null'); + } + $this->container['workingPattern'] = $workingPattern; return $this; } diff --git a/src/Model/ContractEmployeeRoleWorkingPatternRequest.php b/src/Model/ContractEmployeeRoleWorkingPatternRequest.php index 5c3b33a..95c73c7 100644 --- a/src/Model/ContractEmployeeRoleWorkingPatternRequest.php +++ b/src/Model/ContractEmployeeRoleWorkingPatternRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractEmployeeRoleWorkingPatternResponse.php b/src/Model/ContractEmployeeRoleWorkingPatternResponse.php index fa2666b..fa547da 100644 --- a/src/Model/ContractEmployeeRoleWorkingPatternResponse.php +++ b/src/Model/ContractEmployeeRoleWorkingPatternResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractEmployeeRoleWorkingPatternResponse implements ModelInterface, Arra * @var array */ protected static array $openAPITypes = [ - 'uniqueId' => 'string', + 'effectiveFrom' => '\DateTime', 'effectiveTo' => '\DateTime', + 'uniqueId' => 'string', 'workingPattern' => '\SynergiTech\Staffology\Model\ContractWorkingPatternResponse', - 'effectiveFrom' => '\DateTime', 'workingPatternUniqueId' => 'string' ]; @@ -72,10 +72,10 @@ class ContractEmployeeRoleWorkingPatternResponse implements ModelInterface, Arra * @var array */ protected static array $openAPIFormats = [ - 'uniqueId' => 'uuid', + 'effectiveFrom' => 'date', 'effectiveTo' => 'date', + 'uniqueId' => 'uuid', 'workingPattern' => null, - 'effectiveFrom' => 'date', 'workingPatternUniqueId' => 'uuid' ]; @@ -85,10 +85,10 @@ class ContractEmployeeRoleWorkingPatternResponse implements ModelInterface, Arra * @var array */ protected static array $openAPINullables = [ - 'uniqueId' => false, + 'effectiveFrom' => false, 'effectiveTo' => false, + 'uniqueId' => false, 'workingPattern' => false, - 'effectiveFrom' => false, 'workingPatternUniqueId' => false ]; @@ -178,10 +178,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'uniqueId' => 'uniqueId', + 'effectiveFrom' => 'effectiveFrom', 'effectiveTo' => 'effectiveTo', + 'uniqueId' => 'uniqueId', 'workingPattern' => 'workingPattern', - 'effectiveFrom' => 'effectiveFrom', 'workingPatternUniqueId' => 'workingPatternUniqueId' ]; @@ -191,10 +191,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'uniqueId' => 'setUniqueId', + 'effectiveFrom' => 'setEffectiveFrom', 'effectiveTo' => 'setEffectiveTo', + 'uniqueId' => 'setUniqueId', 'workingPattern' => 'setWorkingPattern', - 'effectiveFrom' => 'setEffectiveFrom', 'workingPatternUniqueId' => 'setWorkingPatternUniqueId' ]; @@ -204,10 +204,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'uniqueId' => 'getUniqueId', + 'effectiveFrom' => 'getEffectiveFrom', 'effectiveTo' => 'getEffectiveTo', + 'uniqueId' => 'getUniqueId', 'workingPattern' => 'getWorkingPattern', - 'effectiveFrom' => 'getEffectiveFrom', 'workingPatternUniqueId' => 'getWorkingPatternUniqueId' ]; @@ -267,10 +267,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('uniqueId', $data ?? [], null); + $this->setIfExists('effectiveFrom', $data ?? [], null); $this->setIfExists('effectiveTo', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); $this->setIfExists('workingPattern', $data ?? [], null); - $this->setIfExists('effectiveFrom', $data ?? [], null); $this->setIfExists('workingPatternUniqueId', $data ?? [], null); } @@ -317,28 +317,28 @@ public function valid(): bool /** - * Gets uniqueId + * Gets effectiveFrom * - * @return string|null + * @return \DateTime|null */ - public function getUniqueId(): ?string + public function getEffectiveFrom(): ?\DateTime { - return $this->container['uniqueId']; + return $this->container['effectiveFrom']; } /** - * Sets uniqueId + * Sets effectiveFrom * - * @param string|null $uniqueId The UniqueId of the model. + * @param \DateTime|null $effectiveFrom The date when the assignment of the Working Pattern becomes effective. * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setEffectiveFrom(?\DateTime $effectiveFrom): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($effectiveFrom)) { + throw new InvalidArgumentException('non-nullable effectiveFrom cannot be null'); } - $this->container['uniqueId'] = $uniqueId; + $this->container['effectiveFrom'] = $effectiveFrom; return $this; } @@ -371,55 +371,55 @@ public function setEffectiveTo(?\DateTime $effectiveTo): static } /** - * Gets workingPattern + * Gets uniqueId * - * @return \SynergiTech\Staffology\Model\ContractWorkingPatternResponse|null + * @return string|null */ - public function getWorkingPattern(): ?\SynergiTech\Staffology\Model\ContractWorkingPatternResponse + public function getUniqueId(): ?string { - return $this->container['workingPattern']; + return $this->container['uniqueId']; } /** - * Sets workingPattern + * Sets uniqueId * - * @param \SynergiTech\Staffology\Model\ContractWorkingPatternResponse|null $workingPattern workingPattern + * @param string|null $uniqueId The UniqueId of the model. * * @return $this */ - public function setWorkingPattern(?\SynergiTech\Staffology\Model\ContractWorkingPatternResponse $workingPattern): static + public function setUniqueId(?string $uniqueId): static { - if (is_null($workingPattern)) { - throw new InvalidArgumentException('non-nullable workingPattern cannot be null'); + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); } - $this->container['workingPattern'] = $workingPattern; + $this->container['uniqueId'] = $uniqueId; return $this; } /** - * Gets effectiveFrom + * Gets workingPattern * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\ContractWorkingPatternResponse|null */ - public function getEffectiveFrom(): ?\DateTime + public function getWorkingPattern(): ?\SynergiTech\Staffology\Model\ContractWorkingPatternResponse { - return $this->container['effectiveFrom']; + return $this->container['workingPattern']; } /** - * Sets effectiveFrom + * Sets workingPattern * - * @param \DateTime|null $effectiveFrom The date when the assignment of the Working Pattern becomes effective. + * @param \SynergiTech\Staffology\Model\ContractWorkingPatternResponse|null $workingPattern workingPattern * * @return $this */ - public function setEffectiveFrom(?\DateTime $effectiveFrom): static + public function setWorkingPattern(?\SynergiTech\Staffology\Model\ContractWorkingPatternResponse $workingPattern): static { - if (is_null($effectiveFrom)) { - throw new InvalidArgumentException('non-nullable effectiveFrom cannot be null'); + if (is_null($workingPattern)) { + throw new InvalidArgumentException('non-nullable workingPattern cannot be null'); } - $this->container['effectiveFrom'] = $effectiveFrom; + $this->container['workingPattern'] = $workingPattern; return $this; } diff --git a/src/Model/ContractEmployeeRoleWorkingPatternResponseItem.php b/src/Model/ContractEmployeeRoleWorkingPatternResponseItem.php index 0fd7968..487e78b 100644 --- a/src/Model/ContractEmployeeRoleWorkingPatternResponseItem.php +++ b/src/Model/ContractEmployeeRoleWorkingPatternResponseItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,16 @@ class ContractEmployeeRoleWorkingPatternResponseItem implements ModelInterface, * @var array */ protected static array $openAPITypes = [ - 'workingPatternId' => 'string', + 'contractedWeeks' => 'float', 'effectiveFrom' => '\DateTime', 'effectiveTo' => '\DateTime', - 'totalHours' => 'float', - 'contractedWeeks' => 'float', - 'title' => 'string', 'id' => 'string', - 'name' => 'string', 'metadata' => 'mixed', - 'url' => 'string' + 'name' => 'string', + 'title' => 'string', + 'totalHours' => 'float', + 'url' => 'string', + 'workingPatternId' => 'string' ]; /** @@ -77,16 +77,16 @@ class ContractEmployeeRoleWorkingPatternResponseItem implements ModelInterface, * @var array */ protected static array $openAPIFormats = [ - 'workingPatternId' => 'uuid', + 'contractedWeeks' => 'double', 'effectiveFrom' => 'date', 'effectiveTo' => 'date', - 'totalHours' => 'double', - 'contractedWeeks' => 'double', - 'title' => null, 'id' => 'uuid', - 'name' => null, 'metadata' => null, - 'url' => null + 'name' => null, + 'title' => null, + 'totalHours' => 'double', + 'url' => null, + 'workingPatternId' => 'uuid' ]; /** @@ -95,16 +95,16 @@ class ContractEmployeeRoleWorkingPatternResponseItem implements ModelInterface, * @var array */ protected static array $openAPINullables = [ - 'workingPatternId' => false, + 'contractedWeeks' => true, 'effectiveFrom' => false, 'effectiveTo' => true, - 'totalHours' => false, - 'contractedWeeks' => true, - 'title' => true, 'id' => false, - 'name' => true, 'metadata' => true, - 'url' => true + 'name' => true, + 'title' => true, + 'totalHours' => false, + 'url' => true, + 'workingPatternId' => false ]; /** @@ -193,16 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'workingPatternId' => 'workingPatternId', + 'contractedWeeks' => 'contractedWeeks', 'effectiveFrom' => 'effectiveFrom', 'effectiveTo' => 'effectiveTo', - 'totalHours' => 'totalHours', - 'contractedWeeks' => 'contractedWeeks', - 'title' => 'title', 'id' => 'id', - 'name' => 'name', 'metadata' => 'metadata', - 'url' => 'url' + 'name' => 'name', + 'title' => 'title', + 'totalHours' => 'totalHours', + 'url' => 'url', + 'workingPatternId' => 'workingPatternId' ]; /** @@ -211,16 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'workingPatternId' => 'setWorkingPatternId', + 'contractedWeeks' => 'setContractedWeeks', 'effectiveFrom' => 'setEffectiveFrom', 'effectiveTo' => 'setEffectiveTo', - 'totalHours' => 'setTotalHours', - 'contractedWeeks' => 'setContractedWeeks', - 'title' => 'setTitle', 'id' => 'setId', - 'name' => 'setName', 'metadata' => 'setMetadata', - 'url' => 'setUrl' + 'name' => 'setName', + 'title' => 'setTitle', + 'totalHours' => 'setTotalHours', + 'url' => 'setUrl', + 'workingPatternId' => 'setWorkingPatternId' ]; /** @@ -229,16 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'workingPatternId' => 'getWorkingPatternId', + 'contractedWeeks' => 'getContractedWeeks', 'effectiveFrom' => 'getEffectiveFrom', 'effectiveTo' => 'getEffectiveTo', - 'totalHours' => 'getTotalHours', - 'contractedWeeks' => 'getContractedWeeks', - 'title' => 'getTitle', 'id' => 'getId', - 'name' => 'getName', 'metadata' => 'getMetadata', - 'url' => 'getUrl' + 'name' => 'getName', + 'title' => 'getTitle', + 'totalHours' => 'getTotalHours', + 'url' => 'getUrl', + 'workingPatternId' => 'getWorkingPatternId' ]; /** @@ -297,16 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('workingPatternId', $data ?? [], null); + $this->setIfExists('contractedWeeks', $data ?? [], null); $this->setIfExists('effectiveFrom', $data ?? [], null); $this->setIfExists('effectiveTo', $data ?? [], null); - $this->setIfExists('totalHours', $data ?? [], null); - $this->setIfExists('contractedWeeks', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('totalHours', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('workingPatternId', $data ?? [], null); } /** @@ -352,28 +352,35 @@ public function valid(): bool /** - * Gets workingPatternId + * Gets contractedWeeks * - * @return string|null + * @return float|null */ - public function getWorkingPatternId(): ?string + public function getContractedWeeks(): ?float { - return $this->container['workingPatternId']; + return $this->container['contractedWeeks']; } /** - * Sets workingPatternId + * Sets contractedWeeks * - * @param string|null $workingPatternId The unique id of the working pattern. + * @param float|null $contractedWeeks [readonly] The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. * * @return $this */ - public function setWorkingPatternId(?string $workingPatternId): static + public function setContractedWeeks(?float $contractedWeeks): static { - if (is_null($workingPatternId)) { - throw new InvalidArgumentException('non-nullable workingPatternId cannot be null'); + if (is_null($contractedWeeks)) { + array_push($this->openAPINullablesSetToNull, 'contractedWeeks'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('contractedWeeks', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['workingPatternId'] = $workingPatternId; + $this->container['contractedWeeks'] = $contractedWeeks; return $this; } @@ -440,225 +447,218 @@ public function setEffectiveTo(?\DateTime $effectiveTo): static } /** - * Gets totalHours + * Gets id * - * @return float|null + * @return string|null */ - public function getTotalHours(): ?float + public function getId(): ?string { - return $this->container['totalHours']; + return $this->container['id']; } /** - * Sets totalHours + * Sets id * - * @param float|null $totalHours [readonly] The amount of hours per working pattern. + * @param string|null $id id * * @return $this */ - public function setTotalHours(?float $totalHours): static + public function setId(?string $id): static { - if (is_null($totalHours)) { - throw new InvalidArgumentException('non-nullable totalHours cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['totalHours'] = $totalHours; + $this->container['id'] = $id; return $this; } /** - * Gets contractedWeeks + * Gets metadata * - * @return float|null + * @return mixed|null */ - public function getContractedWeeks(): ?float + public function getMetadata(): mixed { - return $this->container['contractedWeeks']; + return $this->container['metadata']; } /** - * Sets contractedWeeks + * Sets metadata * - * @param float|null $contractedWeeks [readonly] The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. + * @param mixed|null $metadata metadata * * @return $this */ - public function setContractedWeeks(?float $contractedWeeks): static + public function setMetadata(mixed $metadata): static { - if (is_null($contractedWeeks)) { - array_push($this->openAPINullablesSetToNull, 'contractedWeeks'); + if (is_null($metadata)) { + array_push($this->openAPINullablesSetToNull, 'metadata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('contractedWeeks', $nullablesSetToNull); + $index = array_search('metadata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['contractedWeeks'] = $contractedWeeks; + $this->container['metadata'] = $metadata; return $this; } /** - * Gets title + * Gets name * * @return string|null */ - public function getTitle(): ?string + public function getName(): ?string { - return $this->container['title']; + return $this->container['name']; } /** - * Sets title + * Sets name * - * @param string|null $title The title of the working pattern. + * @param string|null $name name * * @return $this */ - public function setTitle(?string $title): static + public function setName(?string $name): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['title'] = $title; + $this->container['name'] = $name; return $this; } /** - * Gets id + * Gets title * * @return string|null */ - public function getId(): ?string + public function getTitle(): ?string { - return $this->container['id']; + return $this->container['title']; } /** - * Sets id + * Sets title * - * @param string|null $id id + * @param string|null $title The title of the working pattern. * * @return $this */ - public function setId(?string $id): static + public function setTitle(?string $title): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['title'] = $title; return $this; } /** - * Gets name + * Gets totalHours * - * @return string|null + * @return float|null */ - public function getName(): ?string + public function getTotalHours(): ?float { - return $this->container['name']; + return $this->container['totalHours']; } /** - * Sets name + * Sets totalHours * - * @param string|null $name name + * @param float|null $totalHours [readonly] The amount of hours per working pattern. * * @return $this */ - public function setName(?string $name): static + public function setTotalHours(?float $totalHours): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($totalHours)) { + throw new InvalidArgumentException('non-nullable totalHours cannot be null'); } - $this->container['name'] = $name; + $this->container['totalHours'] = $totalHours; return $this; } /** - * Gets metadata + * Gets url * - * @return mixed|null + * @return string|null */ - public function getMetadata(): mixed + public function getUrl(): ?string { - return $this->container['metadata']; + return $this->container['url']; } /** - * Sets metadata + * Sets url * - * @param mixed|null $metadata metadata + * @param string|null $url url * * @return $this */ - public function setMetadata(mixed $metadata): static + public function setUrl(?string $url): static { - if (is_null($metadata)) { - array_push($this->openAPINullablesSetToNull, 'metadata'); + if (is_null($url)) { + array_push($this->openAPINullablesSetToNull, 'url'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('metadata', $nullablesSetToNull); + $index = array_search('url', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['metadata'] = $metadata; + $this->container['url'] = $url; return $this; } /** - * Gets url + * Gets workingPatternId * * @return string|null */ - public function getUrl(): ?string + public function getWorkingPatternId(): ?string { - return $this->container['url']; + return $this->container['workingPatternId']; } /** - * Sets url + * Sets workingPatternId * - * @param string|null $url url + * @param string|null $workingPatternId The unique id of the working pattern. * * @return $this */ - public function setUrl(?string $url): static + public function setWorkingPatternId(?string $workingPatternId): static { - if (is_null($url)) { - array_push($this->openAPINullablesSetToNull, 'url'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('url', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($workingPatternId)) { + throw new InvalidArgumentException('non-nullable workingPatternId cannot be null'); } - $this->container['url'] = $url; + $this->container['workingPatternId'] = $workingPatternId; return $this; } diff --git a/src/Model/ContractEmployeeSupplementaryPayRunResponse.php b/src/Model/ContractEmployeeSupplementaryPayRunResponse.php new file mode 100644 index 0000000..e6033f6 --- /dev/null +++ b/src/Model/ContractEmployeeSupplementaryPayRunResponse.php @@ -0,0 +1,449 @@ + + */ +class ContractEmployeeSupplementaryPayRunResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.EmployeeSupplementaryPayRunResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'items' => '\SynergiTech\Staffology\Model\ContractEmployeeItem[]', + 'totalItems' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'items' => null, + 'totalItems' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'items' => true, + 'totalItems' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'items' => 'items', + 'totalItems' => 'totalItems' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'items' => 'setItems', + 'totalItems' => 'setTotalItems' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'items' => 'getItems', + 'totalItems' => 'getTotalItems' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('items', $data ?? [], null); + $this->setIfExists('totalItems', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets items + * + * @return \SynergiTech\Staffology\Model\ContractEmployeeItem[]|null + */ + public function getItems(): ?array + { + return $this->container['items']; + } + + /** + * Sets items + * + * @param \SynergiTech\Staffology\Model\ContractEmployeeItem[]|null $items List of employee items. + * + * @return $this + */ + public function setItems(?array $items): static + { + if (is_null($items)) { + array_push($this->openAPINullablesSetToNull, 'items'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('items', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['items'] = $items; + + return $this; + } + + /** + * Gets totalItems + * + * @return int|null + */ + public function getTotalItems(): ?int + { + return $this->container['totalItems']; + } + + /** + * Sets totalItems + * + * @param int|null $totalItems Value indicating the total number of items. + * + * @return $this + */ + public function setTotalItems(?int $totalItems): static + { + if (is_null($totalItems)) { + throw new InvalidArgumentException('non-nullable totalItems cannot be null'); + } + $this->container['totalItems'] = $totalItems; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractEmployerBase.php b/src/Model/ContractEmployerBase.php index 5a713e5..e78a9f2 100644 --- a/src/Model/ContractEmployerBase.php +++ b/src/Model/ContractEmployerBase.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractEmployerLeaveSettingsRequest.php b/src/Model/ContractEmployerLeaveSettingsRequest.php index c2c67e8..9a79069 100644 --- a/src/Model/ContractEmployerLeaveSettingsRequest.php +++ b/src/Model/ContractEmployerLeaveSettingsRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,52 +59,52 @@ class ContractEmployerLeaveSettingsRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'useDefaultHolidayType' => 'bool', - 'useDefaultAllowanceResetDate' => 'bool', - 'useDefaultAllowance' => 'bool', - 'useDefaultAccruePaymentInLieu' => 'bool', - 'useDefaultAccruePaymentInLieuRate' => 'bool', - 'useDefaultHolidayAccrualBasis' => 'bool', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'bool', - 'useDefaultAccrueHoursPerDay' => 'bool', - 'useDefaultMaximumAccruePeriod' => 'bool', - 'allowanceResetDate' => '\DateTime', - 'allowance' => 'float', - 'adjustment' => 'float', - 'allowanceUsed' => 'float', - 'allowanceUsedPreviousPeriod' => 'float', - 'allowanceRemaining' => 'float', - 'holidayType' => '\SynergiTech\Staffology\Model\HolidayType', - 'accrueSetAmount' => 'bool', 'accrueHoursPerDay' => 'float', - 'showAllowanceOnPayslip' => 'bool', - 'showAhpOnPayslip' => 'bool', - 'accruePaymentInLieuRate' => 'float', + 'accruePayCodeSetUniqueId' => 'string', 'accruePaymentInLieuAllGrossPay' => 'bool', 'accruePaymentInLieuPayAutomatically' => 'bool', - 'accruePayCodeSetUniqueId' => 'string', - 'maximumAccruePeriod' => 'float', - 'holidayAccrualBasis' => '\SynergiTech\Staffology\Model\HolidayAccrual', - 'holidayAccrualDefaultRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', - 'occupationalSicknessUniqueId' => 'string', - 'accruedPaymentLiability' => 'float', - 'accruedPaymentAdjustment' => 'float', - 'accruedPaymentPaid' => 'float', - 'accruedPaymentBalance' => 'float', - 'accruedHoursAmount' => 'float', + 'accruePaymentInLieuRate' => 'float', + 'accrueSetAmount' => 'bool', 'accruedHoursAdjustment' => 'float', - 'accruedHoursPaid' => 'float', + 'accruedHoursAmount' => 'float', 'accruedHoursAmountLastPeriod' => 'float', - 'paidHoursAmountLastPeriod' => 'float', 'accruedHoursBalance' => 'float', + 'accruedHoursPaid' => 'float', + 'accruedPaymentAdjustment' => 'float', + 'accruedPaymentBalance' => 'float', + 'accruedPaymentLiability' => 'float', + 'accruedPaymentPaid' => 'float', + 'adjustment' => 'float', 'aggregatedServiceDate' => '\DateTime', - 'useAggregatedServiceDate' => 'bool', - 'useDefaultHolidayAccrualDefaultRateType' => 'bool', - 'unauthorisedLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'allowance' => 'float', + 'allowanceRemaining' => 'float', + 'allowanceResetDate' => '\DateTime', + 'allowanceUsed' => 'float', + 'allowanceUsedPreviousPeriod' => 'float', + 'bereavementLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'holidayAccrualBasis' => '\SynergiTech\Staffology\Model\HolidayAccrual', + 'holidayAccrualDefaultRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', 'holidayLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', - 'sickLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'holidayType' => '\SynergiTech\Staffology\Model\HolidayType', + 'maximumAccruePeriod' => 'float', + 'occupationalSicknessUniqueId' => 'string', + 'paidHoursAmountLastPeriod' => 'float', 'parentalLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', - 'bereavementLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule' + 'showAhpOnPayslip' => 'bool', + 'showAllowanceOnPayslip' => 'bool', + 'sickLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'unauthorisedLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'useAggregatedServiceDate' => 'bool', + 'useDefaultAccrueHoursPerDay' => 'bool', + 'useDefaultAccruePaymentInLieu' => 'bool', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'bool', + 'useDefaultAccruePaymentInLieuRate' => 'bool', + 'useDefaultAllowance' => 'bool', + 'useDefaultAllowanceResetDate' => 'bool', + 'useDefaultHolidayAccrualBasis' => 'bool', + 'useDefaultHolidayAccrualDefaultRateType' => 'bool', + 'useDefaultHolidayType' => 'bool', + 'useDefaultMaximumAccruePeriod' => 'bool' ]; /** @@ -113,52 +113,52 @@ class ContractEmployerLeaveSettingsRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'useDefaultHolidayType' => null, - 'useDefaultAllowanceResetDate' => null, - 'useDefaultAllowance' => null, - 'useDefaultAccruePaymentInLieu' => null, - 'useDefaultAccruePaymentInLieuRate' => null, - 'useDefaultHolidayAccrualBasis' => null, - 'useDefaultAccruePaymentInLieuPayAutomatically' => null, - 'useDefaultAccrueHoursPerDay' => null, - 'useDefaultMaximumAccruePeriod' => null, - 'allowanceResetDate' => 'date', - 'allowance' => 'double', - 'adjustment' => 'double', - 'allowanceUsed' => 'double', - 'allowanceUsedPreviousPeriod' => 'double', - 'allowanceRemaining' => 'double', - 'holidayType' => null, - 'accrueSetAmount' => null, 'accrueHoursPerDay' => 'double', - 'showAllowanceOnPayslip' => null, - 'showAhpOnPayslip' => null, - 'accruePaymentInLieuRate' => 'double', + 'accruePayCodeSetUniqueId' => 'uuid', 'accruePaymentInLieuAllGrossPay' => null, 'accruePaymentInLieuPayAutomatically' => null, - 'accruePayCodeSetUniqueId' => 'uuid', - 'maximumAccruePeriod' => 'double', - 'holidayAccrualBasis' => null, - 'holidayAccrualDefaultRateType' => null, - 'occupationalSicknessUniqueId' => 'uuid', - 'accruedPaymentLiability' => 'double', - 'accruedPaymentAdjustment' => 'double', - 'accruedPaymentPaid' => 'double', - 'accruedPaymentBalance' => 'double', - 'accruedHoursAmount' => 'double', + 'accruePaymentInLieuRate' => 'double', + 'accrueSetAmount' => null, 'accruedHoursAdjustment' => 'double', - 'accruedHoursPaid' => 'double', + 'accruedHoursAmount' => 'double', 'accruedHoursAmountLastPeriod' => 'double', - 'paidHoursAmountLastPeriod' => 'double', 'accruedHoursBalance' => 'double', + 'accruedHoursPaid' => 'double', + 'accruedPaymentAdjustment' => 'double', + 'accruedPaymentBalance' => 'double', + 'accruedPaymentLiability' => 'double', + 'accruedPaymentPaid' => 'double', + 'adjustment' => 'double', 'aggregatedServiceDate' => 'date', - 'useAggregatedServiceDate' => null, - 'useDefaultHolidayAccrualDefaultRateType' => null, - 'unauthorisedLeaveProRataRule' => null, + 'allowance' => 'double', + 'allowanceRemaining' => 'double', + 'allowanceResetDate' => 'date', + 'allowanceUsed' => 'double', + 'allowanceUsedPreviousPeriod' => 'double', + 'bereavementLeaveProRataRule' => null, + 'holidayAccrualBasis' => null, + 'holidayAccrualDefaultRateType' => null, 'holidayLeaveProRataRule' => null, - 'sickLeaveProRataRule' => null, + 'holidayType' => null, + 'maximumAccruePeriod' => 'double', + 'occupationalSicknessUniqueId' => 'uuid', + 'paidHoursAmountLastPeriod' => 'double', 'parentalLeaveProRataRule' => null, - 'bereavementLeaveProRataRule' => null + 'showAhpOnPayslip' => null, + 'showAllowanceOnPayslip' => null, + 'sickLeaveProRataRule' => null, + 'unauthorisedLeaveProRataRule' => null, + 'useAggregatedServiceDate' => null, + 'useDefaultAccrueHoursPerDay' => null, + 'useDefaultAccruePaymentInLieu' => null, + 'useDefaultAccruePaymentInLieuPayAutomatically' => null, + 'useDefaultAccruePaymentInLieuRate' => null, + 'useDefaultAllowance' => null, + 'useDefaultAllowanceResetDate' => null, + 'useDefaultHolidayAccrualBasis' => null, + 'useDefaultHolidayAccrualDefaultRateType' => null, + 'useDefaultHolidayType' => null, + 'useDefaultMaximumAccruePeriod' => null ]; /** @@ -167,52 +167,52 @@ class ContractEmployerLeaveSettingsRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'useDefaultHolidayType' => false, - 'useDefaultAllowanceResetDate' => false, - 'useDefaultAllowance' => false, - 'useDefaultAccruePaymentInLieu' => false, - 'useDefaultAccruePaymentInLieuRate' => false, - 'useDefaultHolidayAccrualBasis' => false, - 'useDefaultAccruePaymentInLieuPayAutomatically' => false, - 'useDefaultAccrueHoursPerDay' => false, - 'useDefaultMaximumAccruePeriod' => false, - 'allowanceResetDate' => false, - 'allowance' => false, - 'adjustment' => true, - 'allowanceUsed' => false, - 'allowanceUsedPreviousPeriod' => false, - 'allowanceRemaining' => false, - 'holidayType' => false, - 'accrueSetAmount' => false, 'accrueHoursPerDay' => false, - 'showAllowanceOnPayslip' => false, - 'showAhpOnPayslip' => false, - 'accruePaymentInLieuRate' => false, + 'accruePayCodeSetUniqueId' => true, 'accruePaymentInLieuAllGrossPay' => false, 'accruePaymentInLieuPayAutomatically' => false, - 'accruePayCodeSetUniqueId' => true, - 'maximumAccruePeriod' => true, - 'holidayAccrualBasis' => false, - 'holidayAccrualDefaultRateType' => false, - 'occupationalSicknessUniqueId' => true, - 'accruedPaymentLiability' => false, - 'accruedPaymentAdjustment' => false, - 'accruedPaymentPaid' => false, - 'accruedPaymentBalance' => false, - 'accruedHoursAmount' => false, + 'accruePaymentInLieuRate' => false, + 'accrueSetAmount' => false, 'accruedHoursAdjustment' => false, - 'accruedHoursPaid' => false, + 'accruedHoursAmount' => false, 'accruedHoursAmountLastPeriod' => false, - 'paidHoursAmountLastPeriod' => false, 'accruedHoursBalance' => false, + 'accruedHoursPaid' => false, + 'accruedPaymentAdjustment' => false, + 'accruedPaymentBalance' => false, + 'accruedPaymentLiability' => false, + 'accruedPaymentPaid' => false, + 'adjustment' => true, 'aggregatedServiceDate' => true, - 'useAggregatedServiceDate' => false, - 'useDefaultHolidayAccrualDefaultRateType' => false, - 'unauthorisedLeaveProRataRule' => false, + 'allowance' => false, + 'allowanceRemaining' => false, + 'allowanceResetDate' => false, + 'allowanceUsed' => false, + 'allowanceUsedPreviousPeriod' => false, + 'bereavementLeaveProRataRule' => false, + 'holidayAccrualBasis' => false, + 'holidayAccrualDefaultRateType' => false, 'holidayLeaveProRataRule' => false, - 'sickLeaveProRataRule' => false, + 'holidayType' => false, + 'maximumAccruePeriod' => true, + 'occupationalSicknessUniqueId' => true, + 'paidHoursAmountLastPeriod' => false, 'parentalLeaveProRataRule' => false, - 'bereavementLeaveProRataRule' => false + 'showAhpOnPayslip' => false, + 'showAllowanceOnPayslip' => false, + 'sickLeaveProRataRule' => false, + 'unauthorisedLeaveProRataRule' => false, + 'useAggregatedServiceDate' => false, + 'useDefaultAccrueHoursPerDay' => false, + 'useDefaultAccruePaymentInLieu' => false, + 'useDefaultAccruePaymentInLieuPayAutomatically' => false, + 'useDefaultAccruePaymentInLieuRate' => false, + 'useDefaultAllowance' => false, + 'useDefaultAllowanceResetDate' => false, + 'useDefaultHolidayAccrualBasis' => false, + 'useDefaultHolidayAccrualDefaultRateType' => false, + 'useDefaultHolidayType' => false, + 'useDefaultMaximumAccruePeriod' => false ]; /** @@ -301,52 +301,52 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'useDefaultHolidayType' => 'useDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'useDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'useDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'useDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'useDefaultAccruePaymentInLieuRate', - 'useDefaultHolidayAccrualBasis' => 'useDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'useDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'useDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'useDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'allowanceResetDate', - 'allowance' => 'allowance', - 'adjustment' => 'adjustment', - 'allowanceUsed' => 'allowanceUsed', - 'allowanceUsedPreviousPeriod' => 'allowanceUsedPreviousPeriod', - 'allowanceRemaining' => 'allowanceRemaining', - 'holidayType' => 'holidayType', - 'accrueSetAmount' => 'accrueSetAmount', 'accrueHoursPerDay' => 'accrueHoursPerDay', - 'showAllowanceOnPayslip' => 'showAllowanceOnPayslip', - 'showAhpOnPayslip' => 'showAhpOnPayslip', - 'accruePaymentInLieuRate' => 'accruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'accruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'accruePaymentInLieuPayAutomatically', - 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'maximumAccruePeriod', - 'holidayAccrualBasis' => 'holidayAccrualBasis', - 'holidayAccrualDefaultRateType' => 'holidayAccrualDefaultRateType', - 'occupationalSicknessUniqueId' => 'occupationalSicknessUniqueId', - 'accruedPaymentLiability' => 'accruedPaymentLiability', - 'accruedPaymentAdjustment' => 'accruedPaymentAdjustment', - 'accruedPaymentPaid' => 'accruedPaymentPaid', - 'accruedPaymentBalance' => 'accruedPaymentBalance', - 'accruedHoursAmount' => 'accruedHoursAmount', + 'accruePaymentInLieuRate' => 'accruePaymentInLieuRate', + 'accrueSetAmount' => 'accrueSetAmount', 'accruedHoursAdjustment' => 'accruedHoursAdjustment', - 'accruedHoursPaid' => 'accruedHoursPaid', + 'accruedHoursAmount' => 'accruedHoursAmount', 'accruedHoursAmountLastPeriod' => 'accruedHoursAmountLastPeriod', - 'paidHoursAmountLastPeriod' => 'paidHoursAmountLastPeriod', 'accruedHoursBalance' => 'accruedHoursBalance', + 'accruedHoursPaid' => 'accruedHoursPaid', + 'accruedPaymentAdjustment' => 'accruedPaymentAdjustment', + 'accruedPaymentBalance' => 'accruedPaymentBalance', + 'accruedPaymentLiability' => 'accruedPaymentLiability', + 'accruedPaymentPaid' => 'accruedPaymentPaid', + 'adjustment' => 'adjustment', 'aggregatedServiceDate' => 'aggregatedServiceDate', - 'useAggregatedServiceDate' => 'useAggregatedServiceDate', - 'useDefaultHolidayAccrualDefaultRateType' => 'useDefaultHolidayAccrualDefaultRateType', - 'unauthorisedLeaveProRataRule' => 'unauthorisedLeaveProRataRule', + 'allowance' => 'allowance', + 'allowanceRemaining' => 'allowanceRemaining', + 'allowanceResetDate' => 'allowanceResetDate', + 'allowanceUsed' => 'allowanceUsed', + 'allowanceUsedPreviousPeriod' => 'allowanceUsedPreviousPeriod', + 'bereavementLeaveProRataRule' => 'bereavementLeaveProRataRule', + 'holidayAccrualBasis' => 'holidayAccrualBasis', + 'holidayAccrualDefaultRateType' => 'holidayAccrualDefaultRateType', 'holidayLeaveProRataRule' => 'holidayLeaveProRataRule', - 'sickLeaveProRataRule' => 'sickLeaveProRataRule', + 'holidayType' => 'holidayType', + 'maximumAccruePeriod' => 'maximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'occupationalSicknessUniqueId', + 'paidHoursAmountLastPeriod' => 'paidHoursAmountLastPeriod', 'parentalLeaveProRataRule' => 'parentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'bereavementLeaveProRataRule' + 'showAhpOnPayslip' => 'showAhpOnPayslip', + 'showAllowanceOnPayslip' => 'showAllowanceOnPayslip', + 'sickLeaveProRataRule' => 'sickLeaveProRataRule', + 'unauthorisedLeaveProRataRule' => 'unauthorisedLeaveProRataRule', + 'useAggregatedServiceDate' => 'useAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'useDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'useDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'useDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'useDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'useDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'useDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'useDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'useDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'useDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'useDefaultMaximumAccruePeriod' ]; /** @@ -355,52 +355,52 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'useDefaultHolidayType' => 'setUseDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'setUseDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'setUseDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'setUseDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'setUseDefaultAccruePaymentInLieuRate', - 'useDefaultHolidayAccrualBasis' => 'setUseDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'setUseDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'setUseDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'setUseDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'setAllowanceResetDate', - 'allowance' => 'setAllowance', - 'adjustment' => 'setAdjustment', - 'allowanceUsed' => 'setAllowanceUsed', - 'allowanceUsedPreviousPeriod' => 'setAllowanceUsedPreviousPeriod', - 'allowanceRemaining' => 'setAllowanceRemaining', - 'holidayType' => 'setHolidayType', - 'accrueSetAmount' => 'setAccrueSetAmount', 'accrueHoursPerDay' => 'setAccrueHoursPerDay', - 'showAllowanceOnPayslip' => 'setShowAllowanceOnPayslip', - 'showAhpOnPayslip' => 'setShowAhpOnPayslip', - 'accruePaymentInLieuRate' => 'setAccruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'setAccruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'setAccruePaymentInLieuPayAutomatically', - 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'setMaximumAccruePeriod', - 'holidayAccrualBasis' => 'setHolidayAccrualBasis', - 'holidayAccrualDefaultRateType' => 'setHolidayAccrualDefaultRateType', - 'occupationalSicknessUniqueId' => 'setOccupationalSicknessUniqueId', - 'accruedPaymentLiability' => 'setAccruedPaymentLiability', - 'accruedPaymentAdjustment' => 'setAccruedPaymentAdjustment', - 'accruedPaymentPaid' => 'setAccruedPaymentPaid', - 'accruedPaymentBalance' => 'setAccruedPaymentBalance', - 'accruedHoursAmount' => 'setAccruedHoursAmount', + 'accruePaymentInLieuRate' => 'setAccruePaymentInLieuRate', + 'accrueSetAmount' => 'setAccrueSetAmount', 'accruedHoursAdjustment' => 'setAccruedHoursAdjustment', - 'accruedHoursPaid' => 'setAccruedHoursPaid', + 'accruedHoursAmount' => 'setAccruedHoursAmount', 'accruedHoursAmountLastPeriod' => 'setAccruedHoursAmountLastPeriod', - 'paidHoursAmountLastPeriod' => 'setPaidHoursAmountLastPeriod', 'accruedHoursBalance' => 'setAccruedHoursBalance', + 'accruedHoursPaid' => 'setAccruedHoursPaid', + 'accruedPaymentAdjustment' => 'setAccruedPaymentAdjustment', + 'accruedPaymentBalance' => 'setAccruedPaymentBalance', + 'accruedPaymentLiability' => 'setAccruedPaymentLiability', + 'accruedPaymentPaid' => 'setAccruedPaymentPaid', + 'adjustment' => 'setAdjustment', 'aggregatedServiceDate' => 'setAggregatedServiceDate', - 'useAggregatedServiceDate' => 'setUseAggregatedServiceDate', - 'useDefaultHolidayAccrualDefaultRateType' => 'setUseDefaultHolidayAccrualDefaultRateType', - 'unauthorisedLeaveProRataRule' => 'setUnauthorisedLeaveProRataRule', + 'allowance' => 'setAllowance', + 'allowanceRemaining' => 'setAllowanceRemaining', + 'allowanceResetDate' => 'setAllowanceResetDate', + 'allowanceUsed' => 'setAllowanceUsed', + 'allowanceUsedPreviousPeriod' => 'setAllowanceUsedPreviousPeriod', + 'bereavementLeaveProRataRule' => 'setBereavementLeaveProRataRule', + 'holidayAccrualBasis' => 'setHolidayAccrualBasis', + 'holidayAccrualDefaultRateType' => 'setHolidayAccrualDefaultRateType', 'holidayLeaveProRataRule' => 'setHolidayLeaveProRataRule', - 'sickLeaveProRataRule' => 'setSickLeaveProRataRule', + 'holidayType' => 'setHolidayType', + 'maximumAccruePeriod' => 'setMaximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'setOccupationalSicknessUniqueId', + 'paidHoursAmountLastPeriod' => 'setPaidHoursAmountLastPeriod', 'parentalLeaveProRataRule' => 'setParentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'setBereavementLeaveProRataRule' + 'showAhpOnPayslip' => 'setShowAhpOnPayslip', + 'showAllowanceOnPayslip' => 'setShowAllowanceOnPayslip', + 'sickLeaveProRataRule' => 'setSickLeaveProRataRule', + 'unauthorisedLeaveProRataRule' => 'setUnauthorisedLeaveProRataRule', + 'useAggregatedServiceDate' => 'setUseAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'setUseDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'setUseDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'setUseDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'setUseDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'setUseDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'setUseDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'setUseDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'setUseDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'setUseDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'setUseDefaultMaximumAccruePeriod' ]; /** @@ -409,52 +409,52 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'useDefaultHolidayType' => 'getUseDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'getUseDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'getUseDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'getUseDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'getUseDefaultAccruePaymentInLieuRate', - 'useDefaultHolidayAccrualBasis' => 'getUseDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'getUseDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'getUseDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'getUseDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'getAllowanceResetDate', - 'allowance' => 'getAllowance', - 'adjustment' => 'getAdjustment', - 'allowanceUsed' => 'getAllowanceUsed', - 'allowanceUsedPreviousPeriod' => 'getAllowanceUsedPreviousPeriod', - 'allowanceRemaining' => 'getAllowanceRemaining', - 'holidayType' => 'getHolidayType', - 'accrueSetAmount' => 'getAccrueSetAmount', 'accrueHoursPerDay' => 'getAccrueHoursPerDay', - 'showAllowanceOnPayslip' => 'getShowAllowanceOnPayslip', - 'showAhpOnPayslip' => 'getShowAhpOnPayslip', - 'accruePaymentInLieuRate' => 'getAccruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'getAccruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'getAccruePaymentInLieuPayAutomatically', - 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'getMaximumAccruePeriod', - 'holidayAccrualBasis' => 'getHolidayAccrualBasis', - 'holidayAccrualDefaultRateType' => 'getHolidayAccrualDefaultRateType', - 'occupationalSicknessUniqueId' => 'getOccupationalSicknessUniqueId', - 'accruedPaymentLiability' => 'getAccruedPaymentLiability', - 'accruedPaymentAdjustment' => 'getAccruedPaymentAdjustment', - 'accruedPaymentPaid' => 'getAccruedPaymentPaid', - 'accruedPaymentBalance' => 'getAccruedPaymentBalance', - 'accruedHoursAmount' => 'getAccruedHoursAmount', + 'accruePaymentInLieuRate' => 'getAccruePaymentInLieuRate', + 'accrueSetAmount' => 'getAccrueSetAmount', 'accruedHoursAdjustment' => 'getAccruedHoursAdjustment', - 'accruedHoursPaid' => 'getAccruedHoursPaid', + 'accruedHoursAmount' => 'getAccruedHoursAmount', 'accruedHoursAmountLastPeriod' => 'getAccruedHoursAmountLastPeriod', - 'paidHoursAmountLastPeriod' => 'getPaidHoursAmountLastPeriod', 'accruedHoursBalance' => 'getAccruedHoursBalance', + 'accruedHoursPaid' => 'getAccruedHoursPaid', + 'accruedPaymentAdjustment' => 'getAccruedPaymentAdjustment', + 'accruedPaymentBalance' => 'getAccruedPaymentBalance', + 'accruedPaymentLiability' => 'getAccruedPaymentLiability', + 'accruedPaymentPaid' => 'getAccruedPaymentPaid', + 'adjustment' => 'getAdjustment', 'aggregatedServiceDate' => 'getAggregatedServiceDate', - 'useAggregatedServiceDate' => 'getUseAggregatedServiceDate', - 'useDefaultHolidayAccrualDefaultRateType' => 'getUseDefaultHolidayAccrualDefaultRateType', - 'unauthorisedLeaveProRataRule' => 'getUnauthorisedLeaveProRataRule', + 'allowance' => 'getAllowance', + 'allowanceRemaining' => 'getAllowanceRemaining', + 'allowanceResetDate' => 'getAllowanceResetDate', + 'allowanceUsed' => 'getAllowanceUsed', + 'allowanceUsedPreviousPeriod' => 'getAllowanceUsedPreviousPeriod', + 'bereavementLeaveProRataRule' => 'getBereavementLeaveProRataRule', + 'holidayAccrualBasis' => 'getHolidayAccrualBasis', + 'holidayAccrualDefaultRateType' => 'getHolidayAccrualDefaultRateType', 'holidayLeaveProRataRule' => 'getHolidayLeaveProRataRule', - 'sickLeaveProRataRule' => 'getSickLeaveProRataRule', + 'holidayType' => 'getHolidayType', + 'maximumAccruePeriod' => 'getMaximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'getOccupationalSicknessUniqueId', + 'paidHoursAmountLastPeriod' => 'getPaidHoursAmountLastPeriod', 'parentalLeaveProRataRule' => 'getParentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'getBereavementLeaveProRataRule' + 'showAhpOnPayslip' => 'getShowAhpOnPayslip', + 'showAllowanceOnPayslip' => 'getShowAllowanceOnPayslip', + 'sickLeaveProRataRule' => 'getSickLeaveProRataRule', + 'unauthorisedLeaveProRataRule' => 'getUnauthorisedLeaveProRataRule', + 'useAggregatedServiceDate' => 'getUseAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'getUseDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'getUseDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'getUseDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'getUseDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'getUseDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'getUseDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'getUseDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'getUseDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'getUseDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'getUseDefaultMaximumAccruePeriod' ]; /** @@ -513,52 +513,52 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('useDefaultHolidayType', $data ?? [], null); - $this->setIfExists('useDefaultAllowanceResetDate', $data ?? [], null); - $this->setIfExists('useDefaultAllowance', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieu', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieuRate', $data ?? [], null); - $this->setIfExists('useDefaultHolidayAccrualBasis', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieuPayAutomatically', $data ?? [], null); - $this->setIfExists('useDefaultAccrueHoursPerDay', $data ?? [], null); - $this->setIfExists('useDefaultMaximumAccruePeriod', $data ?? [], null); - $this->setIfExists('allowanceResetDate', $data ?? [], null); - $this->setIfExists('allowance', $data ?? [], null); + $this->setIfExists('accrueHoursPerDay', $data ?? [], null); + $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); + $this->setIfExists('accruePaymentInLieuAllGrossPay', $data ?? [], null); + $this->setIfExists('accruePaymentInLieuPayAutomatically', $data ?? [], null); + $this->setIfExists('accruePaymentInLieuRate', $data ?? [], null); + $this->setIfExists('accrueSetAmount', $data ?? [], null); + $this->setIfExists('accruedHoursAdjustment', $data ?? [], null); + $this->setIfExists('accruedHoursAmount', $data ?? [], null); + $this->setIfExists('accruedHoursAmountLastPeriod', $data ?? [], null); + $this->setIfExists('accruedHoursBalance', $data ?? [], null); + $this->setIfExists('accruedHoursPaid', $data ?? [], null); + $this->setIfExists('accruedPaymentAdjustment', $data ?? [], null); + $this->setIfExists('accruedPaymentBalance', $data ?? [], null); + $this->setIfExists('accruedPaymentLiability', $data ?? [], null); + $this->setIfExists('accruedPaymentPaid', $data ?? [], null); $this->setIfExists('adjustment', $data ?? [], null); + $this->setIfExists('aggregatedServiceDate', $data ?? [], null); + $this->setIfExists('allowance', $data ?? [], null); + $this->setIfExists('allowanceRemaining', $data ?? [], null); + $this->setIfExists('allowanceResetDate', $data ?? [], null); $this->setIfExists('allowanceUsed', $data ?? [], null); $this->setIfExists('allowanceUsedPreviousPeriod', $data ?? [], null); - $this->setIfExists('allowanceRemaining', $data ?? [], null); - $this->setIfExists('holidayType', $data ?? [], null); - $this->setIfExists('accrueSetAmount', $data ?? [], null); - $this->setIfExists('accrueHoursPerDay', $data ?? [], null); - $this->setIfExists('showAllowanceOnPayslip', $data ?? [], null); - $this->setIfExists('showAhpOnPayslip', $data ?? [], null); - $this->setIfExists('accruePaymentInLieuRate', $data ?? [], null); - $this->setIfExists('accruePaymentInLieuAllGrossPay', $data ?? [], null); - $this->setIfExists('accruePaymentInLieuPayAutomatically', $data ?? [], null); - $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); - $this->setIfExists('maximumAccruePeriod', $data ?? [], null); + $this->setIfExists('bereavementLeaveProRataRule', $data ?? [], null); $this->setIfExists('holidayAccrualBasis', $data ?? [], null); $this->setIfExists('holidayAccrualDefaultRateType', $data ?? [], null); + $this->setIfExists('holidayLeaveProRataRule', $data ?? [], null); + $this->setIfExists('holidayType', $data ?? [], null); + $this->setIfExists('maximumAccruePeriod', $data ?? [], null); $this->setIfExists('occupationalSicknessUniqueId', $data ?? [], null); - $this->setIfExists('accruedPaymentLiability', $data ?? [], null); - $this->setIfExists('accruedPaymentAdjustment', $data ?? [], null); - $this->setIfExists('accruedPaymentPaid', $data ?? [], null); - $this->setIfExists('accruedPaymentBalance', $data ?? [], null); - $this->setIfExists('accruedHoursAmount', $data ?? [], null); - $this->setIfExists('accruedHoursAdjustment', $data ?? [], null); - $this->setIfExists('accruedHoursPaid', $data ?? [], null); - $this->setIfExists('accruedHoursAmountLastPeriod', $data ?? [], null); $this->setIfExists('paidHoursAmountLastPeriod', $data ?? [], null); - $this->setIfExists('accruedHoursBalance', $data ?? [], null); - $this->setIfExists('aggregatedServiceDate', $data ?? [], null); + $this->setIfExists('parentalLeaveProRataRule', $data ?? [], null); + $this->setIfExists('showAhpOnPayslip', $data ?? [], null); + $this->setIfExists('showAllowanceOnPayslip', $data ?? [], null); + $this->setIfExists('sickLeaveProRataRule', $data ?? [], null); + $this->setIfExists('unauthorisedLeaveProRataRule', $data ?? [], null); $this->setIfExists('useAggregatedServiceDate', $data ?? [], null); + $this->setIfExists('useDefaultAccrueHoursPerDay', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieu', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieuPayAutomatically', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieuRate', $data ?? [], null); + $this->setIfExists('useDefaultAllowance', $data ?? [], null); + $this->setIfExists('useDefaultAllowanceResetDate', $data ?? [], null); + $this->setIfExists('useDefaultHolidayAccrualBasis', $data ?? [], null); $this->setIfExists('useDefaultHolidayAccrualDefaultRateType', $data ?? [], null); - $this->setIfExists('unauthorisedLeaveProRataRule', $data ?? [], null); - $this->setIfExists('holidayLeaveProRataRule', $data ?? [], null); - $this->setIfExists('sickLeaveProRataRule', $data ?? [], null); - $this->setIfExists('parentalLeaveProRataRule', $data ?? [], null); - $this->setIfExists('bereavementLeaveProRataRule', $data ?? [], null); + $this->setIfExists('useDefaultHolidayType', $data ?? [], null); + $this->setIfExists('useDefaultMaximumAccruePeriod', $data ?? [], null); } /** @@ -604,697 +604,643 @@ public function valid(): bool /** - * Gets useDefaultHolidayType - * - * @return bool|null - */ - public function getUseDefaultHolidayType(): ?bool - { - return $this->container['useDefaultHolidayType']; - } - - /** - * Sets useDefaultHolidayType - * - * @param bool|null $useDefaultHolidayType If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) - * - * @return $this - */ - public function setUseDefaultHolidayType(?bool $useDefaultHolidayType): static - { - if (is_null($useDefaultHolidayType)) { - throw new InvalidArgumentException('non-nullable useDefaultHolidayType cannot be null'); - } - $this->container['useDefaultHolidayType'] = $useDefaultHolidayType; - - return $this; - } - - /** - * Gets useDefaultAllowanceResetDate - * - * @return bool|null - */ - public function getUseDefaultAllowanceResetDate(): ?bool - { - return $this->container['useDefaultAllowanceResetDate']; - } - - /** - * Sets useDefaultAllowanceResetDate - * - * @param bool|null $useDefaultAllowanceResetDate If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) - * - * @return $this - */ - public function setUseDefaultAllowanceResetDate(?bool $useDefaultAllowanceResetDate): static - { - if (is_null($useDefaultAllowanceResetDate)) { - throw new InvalidArgumentException('non-nullable useDefaultAllowanceResetDate cannot be null'); - } - $this->container['useDefaultAllowanceResetDate'] = $useDefaultAllowanceResetDate; - - return $this; - } - - /** - * Gets useDefaultAllowance + * Gets accrueHoursPerDay * - * @return bool|null + * @return float|null */ - public function getUseDefaultAllowance(): ?bool + public function getAccrueHoursPerDay(): ?float { - return $this->container['useDefaultAllowance']; + return $this->container['accrueHoursPerDay']; } /** - * Sets useDefaultAllowance + * Sets accrueHoursPerDay * - * @param bool|null $useDefaultAllowance If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) + * @param float|null $accrueHoursPerDay If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued * * @return $this */ - public function setUseDefaultAllowance(?bool $useDefaultAllowance): static + public function setAccrueHoursPerDay(?float $accrueHoursPerDay): static { - if (is_null($useDefaultAllowance)) { - throw new InvalidArgumentException('non-nullable useDefaultAllowance cannot be null'); + if (is_null($accrueHoursPerDay)) { + throw new InvalidArgumentException('non-nullable accrueHoursPerDay cannot be null'); } - $this->container['useDefaultAllowance'] = $useDefaultAllowance; + $this->container['accrueHoursPerDay'] = $accrueHoursPerDay; return $this; } /** - * Gets useDefaultAccruePaymentInLieu + * Gets accruePayCodeSetUniqueId * - * @return bool|null + * @return string|null */ - public function getUseDefaultAccruePaymentInLieu(): ?bool + public function getAccruePayCodeSetUniqueId(): ?string { - return $this->container['useDefaultAccruePaymentInLieu']; + return $this->container['accruePayCodeSetUniqueId']; } /** - * Sets useDefaultAccruePaymentInLieu + * Sets accruePayCodeSetUniqueId * - * @param bool|null $useDefaultAccruePaymentInLieu If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param string|null $accruePayCodeSetUniqueId accruePayCodeSetUniqueId * * @return $this */ - public function setUseDefaultAccruePaymentInLieu(?bool $useDefaultAccruePaymentInLieu): static + public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static { - if (is_null($useDefaultAccruePaymentInLieu)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieu cannot be null'); + if (is_null($accruePayCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useDefaultAccruePaymentInLieu'] = $useDefaultAccruePaymentInLieu; + $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; return $this; } /** - * Gets useDefaultAccruePaymentInLieuRate + * Gets accruePaymentInLieuAllGrossPay * * @return bool|null */ - public function getUseDefaultAccruePaymentInLieuRate(): ?bool + public function getAccruePaymentInLieuAllGrossPay(): ?bool { - return $this->container['useDefaultAccruePaymentInLieuRate']; + return $this->container['accruePaymentInLieuAllGrossPay']; } /** - * Sets useDefaultAccruePaymentInLieuRate + * Sets accruePaymentInLieuAllGrossPay * - * @param bool|null $useDefaultAccruePaymentInLieuRate If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param bool|null $accruePaymentInLieuAllGrossPay Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element * * @return $this */ - public function setUseDefaultAccruePaymentInLieuRate(?bool $useDefaultAccruePaymentInLieuRate): static + public function setAccruePaymentInLieuAllGrossPay(?bool $accruePaymentInLieuAllGrossPay): static { - if (is_null($useDefaultAccruePaymentInLieuRate)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuRate cannot be null'); + if (is_null($accruePaymentInLieuAllGrossPay)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuAllGrossPay cannot be null'); } - $this->container['useDefaultAccruePaymentInLieuRate'] = $useDefaultAccruePaymentInLieuRate; + $this->container['accruePaymentInLieuAllGrossPay'] = $accruePaymentInLieuAllGrossPay; return $this; } /** - * Gets useDefaultHolidayAccrualBasis + * Gets accruePaymentInLieuPayAutomatically * * @return bool|null */ - public function getUseDefaultHolidayAccrualBasis(): ?bool + public function getAccruePaymentInLieuPayAutomatically(): ?bool { - return $this->container['useDefaultHolidayAccrualBasis']; + return $this->container['accruePaymentInLieuPayAutomatically']; } /** - * Sets useDefaultHolidayAccrualBasis + * Sets accruePaymentInLieuPayAutomatically * - * @param bool|null $useDefaultHolidayAccrualBasis If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param bool|null $accruePaymentInLieuPayAutomatically Set to true if you want employees to be automatically paid any outstanding holiday pay * * @return $this */ - public function setUseDefaultHolidayAccrualBasis(?bool $useDefaultHolidayAccrualBasis): static + public function setAccruePaymentInLieuPayAutomatically(?bool $accruePaymentInLieuPayAutomatically): static { - if (is_null($useDefaultHolidayAccrualBasis)) { - throw new InvalidArgumentException('non-nullable useDefaultHolidayAccrualBasis cannot be null'); + if (is_null($accruePaymentInLieuPayAutomatically)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuPayAutomatically cannot be null'); } - $this->container['useDefaultHolidayAccrualBasis'] = $useDefaultHolidayAccrualBasis; + $this->container['accruePaymentInLieuPayAutomatically'] = $accruePaymentInLieuPayAutomatically; return $this; } /** - * Gets useDefaultAccruePaymentInLieuPayAutomatically + * Gets accruePaymentInLieuRate * - * @return bool|null + * @return float|null */ - public function getUseDefaultAccruePaymentInLieuPayAutomatically(): ?bool + public function getAccruePaymentInLieuRate(): ?float { - return $this->container['useDefaultAccruePaymentInLieuPayAutomatically']; + return $this->container['accruePaymentInLieuRate']; } /** - * Sets useDefaultAccruePaymentInLieuPayAutomatically + * Sets accruePaymentInLieuRate * - * @param bool|null $useDefaultAccruePaymentInLieuPayAutomatically If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accruePaymentInLieuRate The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. * * @return $this */ - public function setUseDefaultAccruePaymentInLieuPayAutomatically(?bool $useDefaultAccruePaymentInLieuPayAutomatically): static + public function setAccruePaymentInLieuRate(?float $accruePaymentInLieuRate): static { - if (is_null($useDefaultAccruePaymentInLieuPayAutomatically)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuPayAutomatically cannot be null'); + if (is_null($accruePaymentInLieuRate)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuRate cannot be null'); } - $this->container['useDefaultAccruePaymentInLieuPayAutomatically'] = $useDefaultAccruePaymentInLieuPayAutomatically; + $this->container['accruePaymentInLieuRate'] = $accruePaymentInLieuRate; return $this; } /** - * Gets useDefaultAccrueHoursPerDay + * Gets accrueSetAmount * * @return bool|null */ - public function getUseDefaultAccrueHoursPerDay(): ?bool + public function getAccrueSetAmount(): ?bool { - return $this->container['useDefaultAccrueHoursPerDay']; + return $this->container['accrueSetAmount']; } /** - * Sets useDefaultAccrueHoursPerDay + * Sets accrueSetAmount * - * @param bool|null $useDefaultAccrueHoursPerDay If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param bool|null $accrueSetAmount If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. * * @return $this */ - public function setUseDefaultAccrueHoursPerDay(?bool $useDefaultAccrueHoursPerDay): static + public function setAccrueSetAmount(?bool $accrueSetAmount): static { - if (is_null($useDefaultAccrueHoursPerDay)) { - throw new InvalidArgumentException('non-nullable useDefaultAccrueHoursPerDay cannot be null'); + if (is_null($accrueSetAmount)) { + throw new InvalidArgumentException('non-nullable accrueSetAmount cannot be null'); } - $this->container['useDefaultAccrueHoursPerDay'] = $useDefaultAccrueHoursPerDay; + $this->container['accrueSetAmount'] = $accrueSetAmount; return $this; } /** - * Gets useDefaultMaximumAccruePeriod + * Gets accruedHoursAdjustment * - * @return bool|null + * @return float|null */ - public function getUseDefaultMaximumAccruePeriod(): ?bool + public function getAccruedHoursAdjustment(): ?float { - return $this->container['useDefaultMaximumAccruePeriod']; + return $this->container['accruedHoursAdjustment']; } /** - * Sets useDefaultMaximumAccruePeriod + * Sets accruedHoursAdjustment * - * @param bool|null $useDefaultMaximumAccruePeriod If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accruedHoursAdjustment Any manual adjustment to the total hours accrued * * @return $this */ - public function setUseDefaultMaximumAccruePeriod(?bool $useDefaultMaximumAccruePeriod): static + public function setAccruedHoursAdjustment(?float $accruedHoursAdjustment): static { - if (is_null($useDefaultMaximumAccruePeriod)) { - throw new InvalidArgumentException('non-nullable useDefaultMaximumAccruePeriod cannot be null'); + if (is_null($accruedHoursAdjustment)) { + throw new InvalidArgumentException('non-nullable accruedHoursAdjustment cannot be null'); } - $this->container['useDefaultMaximumAccruePeriod'] = $useDefaultMaximumAccruePeriod; + $this->container['accruedHoursAdjustment'] = $accruedHoursAdjustment; return $this; } /** - * Gets allowanceResetDate + * Gets accruedHoursAmount * - * @return \DateTime|null + * @return float|null */ - public function getAllowanceResetDate(): ?\DateTime + public function getAccruedHoursAmount(): ?float { - return $this->container['allowanceResetDate']; + return $this->container['accruedHoursAmount']; } /** - * Sets allowanceResetDate + * Sets accruedHoursAmount * - * @param \DateTime|null $allowanceResetDate The date that the holiday allowance resets. Only the day/month part of the value is relevant. + * @param float|null $accruedHoursAmount [readonly] The total accrued hours for this employee over the lifetime of their employment so far * * @return $this */ - public function setAllowanceResetDate(?\DateTime $allowanceResetDate): static + public function setAccruedHoursAmount(?float $accruedHoursAmount): static { - if (is_null($allowanceResetDate)) { - throw new InvalidArgumentException('non-nullable allowanceResetDate cannot be null'); + if (is_null($accruedHoursAmount)) { + throw new InvalidArgumentException('non-nullable accruedHoursAmount cannot be null'); } - $this->container['allowanceResetDate'] = $allowanceResetDate; + $this->container['accruedHoursAmount'] = $accruedHoursAmount; return $this; } /** - * Gets allowance + * Gets accruedHoursAmountLastPeriod * * @return float|null */ - public function getAllowance(): ?float + public function getAccruedHoursAmountLastPeriod(): ?float { - return $this->container['allowance']; + return $this->container['accruedHoursAmountLastPeriod']; } /** - * Sets allowance + * Sets accruedHoursAmountLastPeriod * - * @param float|null $allowance The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset + * @param float|null $accruedHoursAmountLastPeriod [readonly] The total accrued hours for this employee in the last pay period * * @return $this */ - public function setAllowance(?float $allowance): static + public function setAccruedHoursAmountLastPeriod(?float $accruedHoursAmountLastPeriod): static { - if (is_null($allowance)) { - throw new InvalidArgumentException('non-nullable allowance cannot be null'); + if (is_null($accruedHoursAmountLastPeriod)) { + throw new InvalidArgumentException('non-nullable accruedHoursAmountLastPeriod cannot be null'); } - $this->container['allowance'] = $allowance; + $this->container['accruedHoursAmountLastPeriod'] = $accruedHoursAmountLastPeriod; return $this; } /** - * Gets adjustment + * Gets accruedHoursBalance * * @return float|null */ - public function getAdjustment(): ?float + public function getAccruedHoursBalance(): ?float { - return $this->container['adjustment']; + return $this->container['accruedHoursBalance']; } /** - * Sets adjustment + * Sets accruedHoursBalance * - * @param float|null $adjustment Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accruedHoursBalance [readonly] The balance of hours owed to this employee in lieu of holidays * * @return $this */ - public function setAdjustment(?float $adjustment): static + public function setAccruedHoursBalance(?float $accruedHoursBalance): static { - if (is_null($adjustment)) { - array_push($this->openAPINullablesSetToNull, 'adjustment'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('adjustment', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($accruedHoursBalance)) { + throw new InvalidArgumentException('non-nullable accruedHoursBalance cannot be null'); } - $this->container['adjustment'] = $adjustment; + $this->container['accruedHoursBalance'] = $accruedHoursBalance; return $this; } /** - * Gets allowanceUsed + * Gets accruedHoursPaid * * @return float|null */ - public function getAllowanceUsed(): ?float + public function getAccruedHoursPaid(): ?float { - return $this->container['allowanceUsed']; + return $this->container['accruedHoursPaid']; } /** - * Sets allowanceUsed + * Sets accruedHoursPaid * - * @param float|null $allowanceUsed [readonly] The number of days used from the allowance since last reset + * @param float|null $accruedHoursPaid [readonly] The Total amount of hours paid to this employee in lieu of holidays * * @return $this */ - public function setAllowanceUsed(?float $allowanceUsed): static + public function setAccruedHoursPaid(?float $accruedHoursPaid): static { - if (is_null($allowanceUsed)) { - throw new InvalidArgumentException('non-nullable allowanceUsed cannot be null'); + if (is_null($accruedHoursPaid)) { + throw new InvalidArgumentException('non-nullable accruedHoursPaid cannot be null'); } - $this->container['allowanceUsed'] = $allowanceUsed; + $this->container['accruedHoursPaid'] = $accruedHoursPaid; return $this; } /** - * Gets allowanceUsedPreviousPeriod + * Gets accruedPaymentAdjustment * * @return float|null */ - public function getAllowanceUsedPreviousPeriod(): ?float + public function getAccruedPaymentAdjustment(): ?float { - return $this->container['allowanceUsedPreviousPeriod']; + return $this->container['accruedPaymentAdjustment']; } /** - * Sets allowanceUsedPreviousPeriod + * Sets accruedPaymentAdjustment * - * @param float|null $allowanceUsedPreviousPeriod [readonly] The number of days used in the 12 months prior to the last reset + * @param float|null $accruedPaymentAdjustment Any manual adjustment to the total accrued * * @return $this */ - public function setAllowanceUsedPreviousPeriod(?float $allowanceUsedPreviousPeriod): static + public function setAccruedPaymentAdjustment(?float $accruedPaymentAdjustment): static { - if (is_null($allowanceUsedPreviousPeriod)) { - throw new InvalidArgumentException('non-nullable allowanceUsedPreviousPeriod cannot be null'); + if (is_null($accruedPaymentAdjustment)) { + throw new InvalidArgumentException('non-nullable accruedPaymentAdjustment cannot be null'); } - $this->container['allowanceUsedPreviousPeriod'] = $allowanceUsedPreviousPeriod; + $this->container['accruedPaymentAdjustment'] = $accruedPaymentAdjustment; return $this; } /** - * Gets allowanceRemaining + * Gets accruedPaymentBalance * * @return float|null */ - public function getAllowanceRemaining(): ?float + public function getAccruedPaymentBalance(): ?float { - return $this->container['allowanceRemaining']; + return $this->container['accruedPaymentBalance']; } /** - * Sets allowanceRemaining + * Sets accruedPaymentBalance * - * @param float|null $allowanceRemaining [readonly] The number of days remaining of the allowance until next reset + * @param float|null $accruedPaymentBalance [readonly] The balance of what is owed to this employee in lieu of holidays * * @return $this */ - public function setAllowanceRemaining(?float $allowanceRemaining): static + public function setAccruedPaymentBalance(?float $accruedPaymentBalance): static { - if (is_null($allowanceRemaining)) { - throw new InvalidArgumentException('non-nullable allowanceRemaining cannot be null'); + if (is_null($accruedPaymentBalance)) { + throw new InvalidArgumentException('non-nullable accruedPaymentBalance cannot be null'); } - $this->container['allowanceRemaining'] = $allowanceRemaining; + $this->container['accruedPaymentBalance'] = $accruedPaymentBalance; return $this; } /** - * Gets holidayType + * Gets accruedPaymentLiability * - * @return \SynergiTech\Staffology\Model\HolidayType|null + * @return float|null */ - public function getHolidayType(): ?\SynergiTech\Staffology\Model\HolidayType + public function getAccruedPaymentLiability(): ?float { - return $this->container['holidayType']; + return $this->container['accruedPaymentLiability']; } /** - * Sets holidayType + * Sets accruedPaymentLiability * - * @param \SynergiTech\Staffology\Model\HolidayType|null $holidayType holidayType + * @param float|null $accruedPaymentLiability [readonly] The total accrued payments for this employee over the lifetime of their employment so far * * @return $this */ - public function setHolidayType(?\SynergiTech\Staffology\Model\HolidayType $holidayType): static + public function setAccruedPaymentLiability(?float $accruedPaymentLiability): static { - if (is_null($holidayType)) { - throw new InvalidArgumentException('non-nullable holidayType cannot be null'); + if (is_null($accruedPaymentLiability)) { + throw new InvalidArgumentException('non-nullable accruedPaymentLiability cannot be null'); } - $this->container['holidayType'] = $holidayType; + $this->container['accruedPaymentLiability'] = $accruedPaymentLiability; return $this; } /** - * Gets accrueSetAmount + * Gets accruedPaymentPaid * - * @return bool|null + * @return float|null */ - public function getAccrueSetAmount(): ?bool + public function getAccruedPaymentPaid(): ?float { - return $this->container['accrueSetAmount']; + return $this->container['accruedPaymentPaid']; } /** - * Sets accrueSetAmount + * Sets accruedPaymentPaid * - * @param bool|null $accrueSetAmount If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. + * @param float|null $accruedPaymentPaid [readonly] The Total amount paid to this employee in lieu of holidays * * @return $this */ - public function setAccrueSetAmount(?bool $accrueSetAmount): static + public function setAccruedPaymentPaid(?float $accruedPaymentPaid): static { - if (is_null($accrueSetAmount)) { - throw new InvalidArgumentException('non-nullable accrueSetAmount cannot be null'); + if (is_null($accruedPaymentPaid)) { + throw new InvalidArgumentException('non-nullable accruedPaymentPaid cannot be null'); } - $this->container['accrueSetAmount'] = $accrueSetAmount; + $this->container['accruedPaymentPaid'] = $accruedPaymentPaid; return $this; } /** - * Gets accrueHoursPerDay + * Gets adjustment * * @return float|null */ - public function getAccrueHoursPerDay(): ?float + public function getAdjustment(): ?float { - return $this->container['accrueHoursPerDay']; + return $this->container['adjustment']; } /** - * Sets accrueHoursPerDay + * Sets adjustment * - * @param float|null $accrueHoursPerDay If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued + * @param float|null $adjustment Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setAccrueHoursPerDay(?float $accrueHoursPerDay): static + public function setAdjustment(?float $adjustment): static { - if (is_null($accrueHoursPerDay)) { - throw new InvalidArgumentException('non-nullable accrueHoursPerDay cannot be null'); + if (is_null($adjustment)) { + array_push($this->openAPINullablesSetToNull, 'adjustment'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('adjustment', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['accrueHoursPerDay'] = $accrueHoursPerDay; + $this->container['adjustment'] = $adjustment; return $this; } /** - * Gets showAllowanceOnPayslip + * Gets aggregatedServiceDate * - * @return bool|null + * @return \DateTime|null */ - public function getShowAllowanceOnPayslip(): ?bool + public function getAggregatedServiceDate(): ?\DateTime { - return $this->container['showAllowanceOnPayslip']; + return $this->container['aggregatedServiceDate']; } /** - * Sets showAllowanceOnPayslip + * Sets aggregatedServiceDate * - * @param bool|null $showAllowanceOnPayslip If true then the remaining Allowance will be shown on the employees payslip. + * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate * * @return $this */ - public function setShowAllowanceOnPayslip(?bool $showAllowanceOnPayslip): static + public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static { - if (is_null($showAllowanceOnPayslip)) { - throw new InvalidArgumentException('non-nullable showAllowanceOnPayslip cannot be null'); + if (is_null($aggregatedServiceDate)) { + array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('aggregatedServiceDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['showAllowanceOnPayslip'] = $showAllowanceOnPayslip; + $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; return $this; } /** - * Gets showAhpOnPayslip + * Gets allowance * - * @return bool|null + * @return float|null */ - public function getShowAhpOnPayslip(): ?bool + public function getAllowance(): ?float { - return $this->container['showAhpOnPayslip']; + return $this->container['allowance']; } /** - * Sets showAhpOnPayslip + * Sets allowance * - * @param bool|null $showAhpOnPayslip If true then the AHP balance will be shown on the employees payslip. + * @param float|null $allowance The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset * * @return $this */ - public function setShowAhpOnPayslip(?bool $showAhpOnPayslip): static + public function setAllowance(?float $allowance): static { - if (is_null($showAhpOnPayslip)) { - throw new InvalidArgumentException('non-nullable showAhpOnPayslip cannot be null'); + if (is_null($allowance)) { + throw new InvalidArgumentException('non-nullable allowance cannot be null'); } - $this->container['showAhpOnPayslip'] = $showAhpOnPayslip; + $this->container['allowance'] = $allowance; return $this; } /** - * Gets accruePaymentInLieuRate + * Gets allowanceRemaining * * @return float|null */ - public function getAccruePaymentInLieuRate(): ?float + public function getAllowanceRemaining(): ?float { - return $this->container['accruePaymentInLieuRate']; + return $this->container['allowanceRemaining']; } /** - * Sets accruePaymentInLieuRate + * Sets allowanceRemaining * - * @param float|null $accruePaymentInLieuRate The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. + * @param float|null $allowanceRemaining [readonly] The number of days remaining of the allowance until next reset * * @return $this */ - public function setAccruePaymentInLieuRate(?float $accruePaymentInLieuRate): static + public function setAllowanceRemaining(?float $allowanceRemaining): static { - if (is_null($accruePaymentInLieuRate)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuRate cannot be null'); + if (is_null($allowanceRemaining)) { + throw new InvalidArgumentException('non-nullable allowanceRemaining cannot be null'); } - $this->container['accruePaymentInLieuRate'] = $accruePaymentInLieuRate; + $this->container['allowanceRemaining'] = $allowanceRemaining; return $this; } /** - * Gets accruePaymentInLieuAllGrossPay + * Gets allowanceResetDate * - * @return bool|null + * @return \DateTime|null */ - public function getAccruePaymentInLieuAllGrossPay(): ?bool + public function getAllowanceResetDate(): ?\DateTime { - return $this->container['accruePaymentInLieuAllGrossPay']; + return $this->container['allowanceResetDate']; } /** - * Sets accruePaymentInLieuAllGrossPay + * Sets allowanceResetDate * - * @param bool|null $accruePaymentInLieuAllGrossPay Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element + * @param \DateTime|null $allowanceResetDate The date that the holiday allowance resets. Only the day/month part of the value is relevant. * * @return $this */ - public function setAccruePaymentInLieuAllGrossPay(?bool $accruePaymentInLieuAllGrossPay): static + public function setAllowanceResetDate(?\DateTime $allowanceResetDate): static { - if (is_null($accruePaymentInLieuAllGrossPay)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuAllGrossPay cannot be null'); + if (is_null($allowanceResetDate)) { + throw new InvalidArgumentException('non-nullable allowanceResetDate cannot be null'); } - $this->container['accruePaymentInLieuAllGrossPay'] = $accruePaymentInLieuAllGrossPay; + $this->container['allowanceResetDate'] = $allowanceResetDate; return $this; } /** - * Gets accruePaymentInLieuPayAutomatically + * Gets allowanceUsed * - * @return bool|null + * @return float|null */ - public function getAccruePaymentInLieuPayAutomatically(): ?bool + public function getAllowanceUsed(): ?float { - return $this->container['accruePaymentInLieuPayAutomatically']; + return $this->container['allowanceUsed']; } /** - * Sets accruePaymentInLieuPayAutomatically + * Sets allowanceUsed * - * @param bool|null $accruePaymentInLieuPayAutomatically Set to true if you want employees to be automatically paid any outstanding holiday pay + * @param float|null $allowanceUsed [readonly] The number of days used from the allowance since last reset * * @return $this */ - public function setAccruePaymentInLieuPayAutomatically(?bool $accruePaymentInLieuPayAutomatically): static + public function setAllowanceUsed(?float $allowanceUsed): static { - if (is_null($accruePaymentInLieuPayAutomatically)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuPayAutomatically cannot be null'); + if (is_null($allowanceUsed)) { + throw new InvalidArgumentException('non-nullable allowanceUsed cannot be null'); } - $this->container['accruePaymentInLieuPayAutomatically'] = $accruePaymentInLieuPayAutomatically; + $this->container['allowanceUsed'] = $allowanceUsed; return $this; } /** - * Gets accruePayCodeSetUniqueId + * Gets allowanceUsedPreviousPeriod * - * @return string|null + * @return float|null */ - public function getAccruePayCodeSetUniqueId(): ?string + public function getAllowanceUsedPreviousPeriod(): ?float { - return $this->container['accruePayCodeSetUniqueId']; + return $this->container['allowanceUsedPreviousPeriod']; } /** - * Sets accruePayCodeSetUniqueId + * Sets allowanceUsedPreviousPeriod * - * @param string|null $accruePayCodeSetUniqueId accruePayCodeSetUniqueId + * @param float|null $allowanceUsedPreviousPeriod [readonly] The number of days used in the 12 months prior to the last reset * * @return $this */ - public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static + public function setAllowanceUsedPreviousPeriod(?float $allowanceUsedPreviousPeriod): static { - if (is_null($accruePayCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($allowanceUsedPreviousPeriod)) { + throw new InvalidArgumentException('non-nullable allowanceUsedPreviousPeriod cannot be null'); } - $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; + $this->container['allowanceUsedPreviousPeriod'] = $allowanceUsedPreviousPeriod; return $this; } /** - * Gets maximumAccruePeriod + * Gets bereavementLeaveProRataRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getMaximumAccruePeriod(): ?float + public function getBereavementLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['maximumAccruePeriod']; + return $this->container['bereavementLeaveProRataRule']; } /** - * Sets maximumAccruePeriod + * Sets bereavementLeaveProRataRule * - * @param float|null $maximumAccruePeriod The maximum number of hours capable of being accrued in a single period + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $bereavementLeaveProRataRule bereavementLeaveProRataRule * * @return $this */ - public function setMaximumAccruePeriod(?float $maximumAccruePeriod): static + public function setBereavementLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $bereavementLeaveProRataRule): static { - if (is_null($maximumAccruePeriod)) { - array_push($this->openAPINullablesSetToNull, 'maximumAccruePeriod'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('maximumAccruePeriod', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($bereavementLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable bereavementLeaveProRataRule cannot be null'); } - $this->container['maximumAccruePeriod'] = $maximumAccruePeriod; + $this->container['bereavementLeaveProRataRule'] = $bereavementLeaveProRataRule; return $this; } @@ -1354,528 +1300,582 @@ public function setHolidayAccrualDefaultRateType(?\SynergiTech\Staffology\Model\ } /** - * Gets occupationalSicknessUniqueId + * Gets holidayLeaveProRataRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getOccupationalSicknessUniqueId(): ?string + public function getHolidayLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['occupationalSicknessUniqueId']; + return $this->container['holidayLeaveProRataRule']; } /** - * Sets occupationalSicknessUniqueId + * Sets holidayLeaveProRataRule * - * @param string|null $occupationalSicknessUniqueId occupationalSicknessUniqueId + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $holidayLeaveProRataRule holidayLeaveProRataRule * * @return $this */ - public function setOccupationalSicknessUniqueId(?string $occupationalSicknessUniqueId): static + public function setHolidayLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $holidayLeaveProRataRule): static { - if (is_null($occupationalSicknessUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'occupationalSicknessUniqueId'); + if (is_null($holidayLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable holidayLeaveProRataRule cannot be null'); + } + $this->container['holidayLeaveProRataRule'] = $holidayLeaveProRataRule; + + return $this; + } + + /** + * Gets holidayType + * + * @return \SynergiTech\Staffology\Model\HolidayType|null + */ + public function getHolidayType(): ?\SynergiTech\Staffology\Model\HolidayType + { + return $this->container['holidayType']; + } + + /** + * Sets holidayType + * + * @param \SynergiTech\Staffology\Model\HolidayType|null $holidayType holidayType + * + * @return $this + */ + public function setHolidayType(?\SynergiTech\Staffology\Model\HolidayType $holidayType): static + { + if (is_null($holidayType)) { + throw new InvalidArgumentException('non-nullable holidayType cannot be null'); + } + $this->container['holidayType'] = $holidayType; + + return $this; + } + + /** + * Gets maximumAccruePeriod + * + * @return float|null + */ + public function getMaximumAccruePeriod(): ?float + { + return $this->container['maximumAccruePeriod']; + } + + /** + * Sets maximumAccruePeriod + * + * @param float|null $maximumAccruePeriod The maximum number of hours capable of being accrued in a single period + * + * @return $this + */ + public function setMaximumAccruePeriod(?float $maximumAccruePeriod): static + { + if (is_null($maximumAccruePeriod)) { + array_push($this->openAPINullablesSetToNull, 'maximumAccruePeriod'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('occupationalSicknessUniqueId', $nullablesSetToNull); + $index = array_search('maximumAccruePeriod', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['occupationalSicknessUniqueId'] = $occupationalSicknessUniqueId; + $this->container['maximumAccruePeriod'] = $maximumAccruePeriod; return $this; } /** - * Gets accruedPaymentLiability + * Gets occupationalSicknessUniqueId * - * @return float|null + * @return string|null */ - public function getAccruedPaymentLiability(): ?float + public function getOccupationalSicknessUniqueId(): ?string { - return $this->container['accruedPaymentLiability']; + return $this->container['occupationalSicknessUniqueId']; } /** - * Sets accruedPaymentLiability + * Sets occupationalSicknessUniqueId * - * @param float|null $accruedPaymentLiability [readonly] The total accrued payments for this employee over the lifetime of their employment so far + * @param string|null $occupationalSicknessUniqueId occupationalSicknessUniqueId * * @return $this */ - public function setAccruedPaymentLiability(?float $accruedPaymentLiability): static + public function setOccupationalSicknessUniqueId(?string $occupationalSicknessUniqueId): static { - if (is_null($accruedPaymentLiability)) { - throw new InvalidArgumentException('non-nullable accruedPaymentLiability cannot be null'); + if (is_null($occupationalSicknessUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'occupationalSicknessUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('occupationalSicknessUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['accruedPaymentLiability'] = $accruedPaymentLiability; + $this->container['occupationalSicknessUniqueId'] = $occupationalSicknessUniqueId; return $this; } /** - * Gets accruedPaymentAdjustment + * Gets paidHoursAmountLastPeriod * * @return float|null */ - public function getAccruedPaymentAdjustment(): ?float + public function getPaidHoursAmountLastPeriod(): ?float { - return $this->container['accruedPaymentAdjustment']; + return $this->container['paidHoursAmountLastPeriod']; } /** - * Sets accruedPaymentAdjustment + * Sets paidHoursAmountLastPeriod * - * @param float|null $accruedPaymentAdjustment Any manual adjustment to the total accrued + * @param float|null $paidHoursAmountLastPeriod [readonly] The number of hours paid against the pay code * * @return $this */ - public function setAccruedPaymentAdjustment(?float $accruedPaymentAdjustment): static + public function setPaidHoursAmountLastPeriod(?float $paidHoursAmountLastPeriod): static { - if (is_null($accruedPaymentAdjustment)) { - throw new InvalidArgumentException('non-nullable accruedPaymentAdjustment cannot be null'); + if (is_null($paidHoursAmountLastPeriod)) { + throw new InvalidArgumentException('non-nullable paidHoursAmountLastPeriod cannot be null'); } - $this->container['accruedPaymentAdjustment'] = $accruedPaymentAdjustment; + $this->container['paidHoursAmountLastPeriod'] = $paidHoursAmountLastPeriod; return $this; } /** - * Gets accruedPaymentPaid + * Gets parentalLeaveProRataRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getAccruedPaymentPaid(): ?float + public function getParentalLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['accruedPaymentPaid']; + return $this->container['parentalLeaveProRataRule']; } /** - * Sets accruedPaymentPaid + * Sets parentalLeaveProRataRule * - * @param float|null $accruedPaymentPaid [readonly] The Total amount paid to this employee in lieu of holidays + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $parentalLeaveProRataRule parentalLeaveProRataRule * * @return $this */ - public function setAccruedPaymentPaid(?float $accruedPaymentPaid): static + public function setParentalLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $parentalLeaveProRataRule): static { - if (is_null($accruedPaymentPaid)) { - throw new InvalidArgumentException('non-nullable accruedPaymentPaid cannot be null'); + if (is_null($parentalLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable parentalLeaveProRataRule cannot be null'); } - $this->container['accruedPaymentPaid'] = $accruedPaymentPaid; + $this->container['parentalLeaveProRataRule'] = $parentalLeaveProRataRule; return $this; } /** - * Gets accruedPaymentBalance + * Gets showAhpOnPayslip * - * @return float|null + * @return bool|null */ - public function getAccruedPaymentBalance(): ?float + public function getShowAhpOnPayslip(): ?bool { - return $this->container['accruedPaymentBalance']; + return $this->container['showAhpOnPayslip']; } /** - * Sets accruedPaymentBalance + * Sets showAhpOnPayslip * - * @param float|null $accruedPaymentBalance [readonly] The balance of what is owed to this employee in lieu of holidays + * @param bool|null $showAhpOnPayslip If true then the AHP balance will be shown on the employees payslip. * * @return $this */ - public function setAccruedPaymentBalance(?float $accruedPaymentBalance): static + public function setShowAhpOnPayslip(?bool $showAhpOnPayslip): static { - if (is_null($accruedPaymentBalance)) { - throw new InvalidArgumentException('non-nullable accruedPaymentBalance cannot be null'); + if (is_null($showAhpOnPayslip)) { + throw new InvalidArgumentException('non-nullable showAhpOnPayslip cannot be null'); } - $this->container['accruedPaymentBalance'] = $accruedPaymentBalance; + $this->container['showAhpOnPayslip'] = $showAhpOnPayslip; return $this; } /** - * Gets accruedHoursAmount + * Gets showAllowanceOnPayslip * - * @return float|null + * @return bool|null */ - public function getAccruedHoursAmount(): ?float + public function getShowAllowanceOnPayslip(): ?bool { - return $this->container['accruedHoursAmount']; + return $this->container['showAllowanceOnPayslip']; } /** - * Sets accruedHoursAmount + * Sets showAllowanceOnPayslip * - * @param float|null $accruedHoursAmount [readonly] The total accrued hours for this employee over the lifetime of their employment so far + * @param bool|null $showAllowanceOnPayslip If true then the remaining Allowance will be shown on the employees payslip. * * @return $this */ - public function setAccruedHoursAmount(?float $accruedHoursAmount): static + public function setShowAllowanceOnPayslip(?bool $showAllowanceOnPayslip): static { - if (is_null($accruedHoursAmount)) { - throw new InvalidArgumentException('non-nullable accruedHoursAmount cannot be null'); + if (is_null($showAllowanceOnPayslip)) { + throw new InvalidArgumentException('non-nullable showAllowanceOnPayslip cannot be null'); } - $this->container['accruedHoursAmount'] = $accruedHoursAmount; + $this->container['showAllowanceOnPayslip'] = $showAllowanceOnPayslip; return $this; } /** - * Gets accruedHoursAdjustment + * Gets sickLeaveProRataRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getAccruedHoursAdjustment(): ?float + public function getSickLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['accruedHoursAdjustment']; + return $this->container['sickLeaveProRataRule']; } /** - * Sets accruedHoursAdjustment + * Sets sickLeaveProRataRule * - * @param float|null $accruedHoursAdjustment Any manual adjustment to the total hours accrued + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $sickLeaveProRataRule sickLeaveProRataRule * * @return $this */ - public function setAccruedHoursAdjustment(?float $accruedHoursAdjustment): static + public function setSickLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $sickLeaveProRataRule): static { - if (is_null($accruedHoursAdjustment)) { - throw new InvalidArgumentException('non-nullable accruedHoursAdjustment cannot be null'); + if (is_null($sickLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable sickLeaveProRataRule cannot be null'); } - $this->container['accruedHoursAdjustment'] = $accruedHoursAdjustment; + $this->container['sickLeaveProRataRule'] = $sickLeaveProRataRule; return $this; } /** - * Gets accruedHoursPaid + * Gets unauthorisedLeaveProRataRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getAccruedHoursPaid(): ?float + public function getUnauthorisedLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['accruedHoursPaid']; + return $this->container['unauthorisedLeaveProRataRule']; } /** - * Sets accruedHoursPaid + * Sets unauthorisedLeaveProRataRule * - * @param float|null $accruedHoursPaid [readonly] The Total amount of hours paid to this employee in lieu of holidays + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $unauthorisedLeaveProRataRule unauthorisedLeaveProRataRule * * @return $this */ - public function setAccruedHoursPaid(?float $accruedHoursPaid): static + public function setUnauthorisedLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $unauthorisedLeaveProRataRule): static { - if (is_null($accruedHoursPaid)) { - throw new InvalidArgumentException('non-nullable accruedHoursPaid cannot be null'); + if (is_null($unauthorisedLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable unauthorisedLeaveProRataRule cannot be null'); } - $this->container['accruedHoursPaid'] = $accruedHoursPaid; + $this->container['unauthorisedLeaveProRataRule'] = $unauthorisedLeaveProRataRule; return $this; } /** - * Gets accruedHoursAmountLastPeriod + * Gets useAggregatedServiceDate * - * @return float|null + * @return bool|null */ - public function getAccruedHoursAmountLastPeriod(): ?float + public function getUseAggregatedServiceDate(): ?bool { - return $this->container['accruedHoursAmountLastPeriod']; + return $this->container['useAggregatedServiceDate']; } /** - * Sets accruedHoursAmountLastPeriod + * Sets useAggregatedServiceDate * - * @param float|null $accruedHoursAmountLastPeriod [readonly] The total accrued hours for this employee in the last pay period + * @param bool|null $useAggregatedServiceDate useAggregatedServiceDate * * @return $this */ - public function setAccruedHoursAmountLastPeriod(?float $accruedHoursAmountLastPeriod): static + public function setUseAggregatedServiceDate(?bool $useAggregatedServiceDate): static { - if (is_null($accruedHoursAmountLastPeriod)) { - throw new InvalidArgumentException('non-nullable accruedHoursAmountLastPeriod cannot be null'); + if (is_null($useAggregatedServiceDate)) { + throw new InvalidArgumentException('non-nullable useAggregatedServiceDate cannot be null'); } - $this->container['accruedHoursAmountLastPeriod'] = $accruedHoursAmountLastPeriod; + $this->container['useAggregatedServiceDate'] = $useAggregatedServiceDate; return $this; } /** - * Gets paidHoursAmountLastPeriod + * Gets useDefaultAccrueHoursPerDay * - * @return float|null + * @return bool|null */ - public function getPaidHoursAmountLastPeriod(): ?float + public function getUseDefaultAccrueHoursPerDay(): ?bool { - return $this->container['paidHoursAmountLastPeriod']; + return $this->container['useDefaultAccrueHoursPerDay']; } /** - * Sets paidHoursAmountLastPeriod + * Sets useDefaultAccrueHoursPerDay * - * @param float|null $paidHoursAmountLastPeriod [readonly] The number of hours paid against the pay code + * @param bool|null $useDefaultAccrueHoursPerDay If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setPaidHoursAmountLastPeriod(?float $paidHoursAmountLastPeriod): static + public function setUseDefaultAccrueHoursPerDay(?bool $useDefaultAccrueHoursPerDay): static { - if (is_null($paidHoursAmountLastPeriod)) { - throw new InvalidArgumentException('non-nullable paidHoursAmountLastPeriod cannot be null'); + if (is_null($useDefaultAccrueHoursPerDay)) { + throw new InvalidArgumentException('non-nullable useDefaultAccrueHoursPerDay cannot be null'); } - $this->container['paidHoursAmountLastPeriod'] = $paidHoursAmountLastPeriod; + $this->container['useDefaultAccrueHoursPerDay'] = $useDefaultAccrueHoursPerDay; return $this; } /** - * Gets accruedHoursBalance + * Gets useDefaultAccruePaymentInLieu * - * @return float|null + * @return bool|null */ - public function getAccruedHoursBalance(): ?float + public function getUseDefaultAccruePaymentInLieu(): ?bool { - return $this->container['accruedHoursBalance']; + return $this->container['useDefaultAccruePaymentInLieu']; } /** - * Sets accruedHoursBalance + * Sets useDefaultAccruePaymentInLieu * - * @param float|null $accruedHoursBalance [readonly] The balance of hours owed to this employee in lieu of holidays + * @param bool|null $useDefaultAccruePaymentInLieu If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setAccruedHoursBalance(?float $accruedHoursBalance): static + public function setUseDefaultAccruePaymentInLieu(?bool $useDefaultAccruePaymentInLieu): static { - if (is_null($accruedHoursBalance)) { - throw new InvalidArgumentException('non-nullable accruedHoursBalance cannot be null'); + if (is_null($useDefaultAccruePaymentInLieu)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieu cannot be null'); } - $this->container['accruedHoursBalance'] = $accruedHoursBalance; + $this->container['useDefaultAccruePaymentInLieu'] = $useDefaultAccruePaymentInLieu; return $this; } /** - * Gets aggregatedServiceDate + * Gets useDefaultAccruePaymentInLieuPayAutomatically * - * @return \DateTime|null + * @return bool|null */ - public function getAggregatedServiceDate(): ?\DateTime + public function getUseDefaultAccruePaymentInLieuPayAutomatically(): ?bool { - return $this->container['aggregatedServiceDate']; + return $this->container['useDefaultAccruePaymentInLieuPayAutomatically']; } /** - * Sets aggregatedServiceDate + * Sets useDefaultAccruePaymentInLieuPayAutomatically * - * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate + * @param bool|null $useDefaultAccruePaymentInLieuPayAutomatically If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static + public function setUseDefaultAccruePaymentInLieuPayAutomatically(?bool $useDefaultAccruePaymentInLieuPayAutomatically): static { - if (is_null($aggregatedServiceDate)) { - array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aggregatedServiceDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useDefaultAccruePaymentInLieuPayAutomatically)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuPayAutomatically cannot be null'); } - $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; + $this->container['useDefaultAccruePaymentInLieuPayAutomatically'] = $useDefaultAccruePaymentInLieuPayAutomatically; return $this; } /** - * Gets useAggregatedServiceDate + * Gets useDefaultAccruePaymentInLieuRate * * @return bool|null */ - public function getUseAggregatedServiceDate(): ?bool + public function getUseDefaultAccruePaymentInLieuRate(): ?bool { - return $this->container['useAggregatedServiceDate']; + return $this->container['useDefaultAccruePaymentInLieuRate']; } /** - * Sets useAggregatedServiceDate + * Sets useDefaultAccruePaymentInLieuRate * - * @param bool|null $useAggregatedServiceDate useAggregatedServiceDate + * @param bool|null $useDefaultAccruePaymentInLieuRate If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setUseAggregatedServiceDate(?bool $useAggregatedServiceDate): static + public function setUseDefaultAccruePaymentInLieuRate(?bool $useDefaultAccruePaymentInLieuRate): static { - if (is_null($useAggregatedServiceDate)) { - throw new InvalidArgumentException('non-nullable useAggregatedServiceDate cannot be null'); + if (is_null($useDefaultAccruePaymentInLieuRate)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuRate cannot be null'); } - $this->container['useAggregatedServiceDate'] = $useAggregatedServiceDate; + $this->container['useDefaultAccruePaymentInLieuRate'] = $useDefaultAccruePaymentInLieuRate; return $this; } /** - * Gets useDefaultHolidayAccrualDefaultRateType + * Gets useDefaultAllowance * * @return bool|null */ - public function getUseDefaultHolidayAccrualDefaultRateType(): ?bool + public function getUseDefaultAllowance(): ?bool { - return $this->container['useDefaultHolidayAccrualDefaultRateType']; + return $this->container['useDefaultAllowance']; } /** - * Sets useDefaultHolidayAccrualDefaultRateType + * Sets useDefaultAllowance * - * @param bool|null $useDefaultHolidayAccrualDefaultRateType If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. + * @param bool|null $useDefaultAllowance If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) * * @return $this */ - public function setUseDefaultHolidayAccrualDefaultRateType(?bool $useDefaultHolidayAccrualDefaultRateType): static + public function setUseDefaultAllowance(?bool $useDefaultAllowance): static { - if (is_null($useDefaultHolidayAccrualDefaultRateType)) { - throw new InvalidArgumentException('non-nullable useDefaultHolidayAccrualDefaultRateType cannot be null'); + if (is_null($useDefaultAllowance)) { + throw new InvalidArgumentException('non-nullable useDefaultAllowance cannot be null'); } - $this->container['useDefaultHolidayAccrualDefaultRateType'] = $useDefaultHolidayAccrualDefaultRateType; + $this->container['useDefaultAllowance'] = $useDefaultAllowance; return $this; } /** - * Gets unauthorisedLeaveProRataRule + * Gets useDefaultAllowanceResetDate * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getUnauthorisedLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultAllowanceResetDate(): ?bool { - return $this->container['unauthorisedLeaveProRataRule']; + return $this->container['useDefaultAllowanceResetDate']; } /** - * Sets unauthorisedLeaveProRataRule + * Sets useDefaultAllowanceResetDate * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $unauthorisedLeaveProRataRule unauthorisedLeaveProRataRule + * @param bool|null $useDefaultAllowanceResetDate If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setUnauthorisedLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $unauthorisedLeaveProRataRule): static + public function setUseDefaultAllowanceResetDate(?bool $useDefaultAllowanceResetDate): static { - if (is_null($unauthorisedLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable unauthorisedLeaveProRataRule cannot be null'); + if (is_null($useDefaultAllowanceResetDate)) { + throw new InvalidArgumentException('non-nullable useDefaultAllowanceResetDate cannot be null'); } - $this->container['unauthorisedLeaveProRataRule'] = $unauthorisedLeaveProRataRule; + $this->container['useDefaultAllowanceResetDate'] = $useDefaultAllowanceResetDate; return $this; } /** - * Gets holidayLeaveProRataRule + * Gets useDefaultHolidayAccrualBasis * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getHolidayLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultHolidayAccrualBasis(): ?bool { - return $this->container['holidayLeaveProRataRule']; + return $this->container['useDefaultHolidayAccrualBasis']; } /** - * Sets holidayLeaveProRataRule + * Sets useDefaultHolidayAccrualBasis * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $holidayLeaveProRataRule holidayLeaveProRataRule + * @param bool|null $useDefaultHolidayAccrualBasis If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setHolidayLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $holidayLeaveProRataRule): static + public function setUseDefaultHolidayAccrualBasis(?bool $useDefaultHolidayAccrualBasis): static { - if (is_null($holidayLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable holidayLeaveProRataRule cannot be null'); + if (is_null($useDefaultHolidayAccrualBasis)) { + throw new InvalidArgumentException('non-nullable useDefaultHolidayAccrualBasis cannot be null'); } - $this->container['holidayLeaveProRataRule'] = $holidayLeaveProRataRule; + $this->container['useDefaultHolidayAccrualBasis'] = $useDefaultHolidayAccrualBasis; return $this; } /** - * Gets sickLeaveProRataRule + * Gets useDefaultHolidayAccrualDefaultRateType * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getSickLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultHolidayAccrualDefaultRateType(): ?bool { - return $this->container['sickLeaveProRataRule']; + return $this->container['useDefaultHolidayAccrualDefaultRateType']; } /** - * Sets sickLeaveProRataRule + * Sets useDefaultHolidayAccrualDefaultRateType * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $sickLeaveProRataRule sickLeaveProRataRule + * @param bool|null $useDefaultHolidayAccrualDefaultRateType If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. * * @return $this */ - public function setSickLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $sickLeaveProRataRule): static + public function setUseDefaultHolidayAccrualDefaultRateType(?bool $useDefaultHolidayAccrualDefaultRateType): static { - if (is_null($sickLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable sickLeaveProRataRule cannot be null'); + if (is_null($useDefaultHolidayAccrualDefaultRateType)) { + throw new InvalidArgumentException('non-nullable useDefaultHolidayAccrualDefaultRateType cannot be null'); } - $this->container['sickLeaveProRataRule'] = $sickLeaveProRataRule; + $this->container['useDefaultHolidayAccrualDefaultRateType'] = $useDefaultHolidayAccrualDefaultRateType; return $this; } /** - * Gets parentalLeaveProRataRule + * Gets useDefaultHolidayType * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getParentalLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultHolidayType(): ?bool { - return $this->container['parentalLeaveProRataRule']; + return $this->container['useDefaultHolidayType']; } /** - * Sets parentalLeaveProRataRule + * Sets useDefaultHolidayType * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $parentalLeaveProRataRule parentalLeaveProRataRule + * @param bool|null $useDefaultHolidayType If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setParentalLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $parentalLeaveProRataRule): static + public function setUseDefaultHolidayType(?bool $useDefaultHolidayType): static { - if (is_null($parentalLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable parentalLeaveProRataRule cannot be null'); + if (is_null($useDefaultHolidayType)) { + throw new InvalidArgumentException('non-nullable useDefaultHolidayType cannot be null'); } - $this->container['parentalLeaveProRataRule'] = $parentalLeaveProRataRule; + $this->container['useDefaultHolidayType'] = $useDefaultHolidayType; return $this; } /** - * Gets bereavementLeaveProRataRule + * Gets useDefaultMaximumAccruePeriod * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getBereavementLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultMaximumAccruePeriod(): ?bool { - return $this->container['bereavementLeaveProRataRule']; + return $this->container['useDefaultMaximumAccruePeriod']; } /** - * Sets bereavementLeaveProRataRule + * Sets useDefaultMaximumAccruePeriod * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $bereavementLeaveProRataRule bereavementLeaveProRataRule + * @param bool|null $useDefaultMaximumAccruePeriod If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setBereavementLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $bereavementLeaveProRataRule): static + public function setUseDefaultMaximumAccruePeriod(?bool $useDefaultMaximumAccruePeriod): static { - if (is_null($bereavementLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable bereavementLeaveProRataRule cannot be null'); + if (is_null($useDefaultMaximumAccruePeriod)) { + throw new InvalidArgumentException('non-nullable useDefaultMaximumAccruePeriod cannot be null'); } - $this->container['bereavementLeaveProRataRule'] = $bereavementLeaveProRataRule; + $this->container['useDefaultMaximumAccruePeriod'] = $useDefaultMaximumAccruePeriod; return $this; } diff --git a/src/Model/ContractEmployerLeaveSettingsResponse.php b/src/Model/ContractEmployerLeaveSettingsResponse.php index c306663..cefdf4a 100644 --- a/src/Model/ContractEmployerLeaveSettingsResponse.php +++ b/src/Model/ContractEmployerLeaveSettingsResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,52 +59,52 @@ class ContractEmployerLeaveSettingsResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPITypes = [ - 'useDefaultHolidayType' => 'bool', - 'useDefaultAllowanceResetDate' => 'bool', - 'useDefaultAllowance' => 'bool', - 'useDefaultAccruePaymentInLieu' => 'bool', - 'useDefaultAccruePaymentInLieuRate' => 'bool', - 'useDefaultHolidayAccrualBasis' => 'bool', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'bool', - 'useDefaultAccrueHoursPerDay' => 'bool', - 'useDefaultMaximumAccruePeriod' => 'bool', - 'allowanceResetDate' => '\DateTime', - 'allowance' => 'float', - 'adjustment' => 'float', - 'allowanceUsed' => 'float', - 'allowanceUsedPreviousPeriod' => 'float', - 'allowanceRemaining' => 'float', - 'holidayType' => '\SynergiTech\Staffology\Model\HolidayType', - 'accrueSetAmount' => 'bool', 'accrueHoursPerDay' => 'float', - 'showAllowanceOnPayslip' => 'bool', - 'showAhpOnPayslip' => 'bool', - 'accruePaymentInLieuRate' => 'float', + 'accruePayCodeSetUniqueId' => 'string', 'accruePaymentInLieuAllGrossPay' => 'bool', 'accruePaymentInLieuPayAutomatically' => 'bool', - 'accruePayCodeSetUniqueId' => 'string', - 'maximumAccruePeriod' => 'float', - 'holidayAccrualBasis' => '\SynergiTech\Staffology\Model\HolidayAccrual', - 'holidayAccrualDefaultRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', - 'occupationalSicknessUniqueId' => 'string', - 'accruedPaymentLiability' => 'float', - 'accruedPaymentAdjustment' => 'float', - 'accruedPaymentPaid' => 'float', - 'accruedPaymentBalance' => 'float', - 'accruedHoursAmount' => 'float', + 'accruePaymentInLieuRate' => 'float', + 'accrueSetAmount' => 'bool', 'accruedHoursAdjustment' => 'float', - 'accruedHoursPaid' => 'float', + 'accruedHoursAmount' => 'float', 'accruedHoursAmountLastPeriod' => 'float', - 'paidHoursAmountLastPeriod' => 'float', 'accruedHoursBalance' => 'float', + 'accruedHoursPaid' => 'float', + 'accruedPaymentAdjustment' => 'float', + 'accruedPaymentBalance' => 'float', + 'accruedPaymentLiability' => 'float', + 'accruedPaymentPaid' => 'float', + 'adjustment' => 'float', 'aggregatedServiceDate' => '\DateTime', - 'useAggregatedServiceDate' => 'bool', - 'useDefaultHolidayAccrualDefaultRateType' => 'bool', - 'unauthorisedLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'allowance' => 'float', + 'allowanceRemaining' => 'float', + 'allowanceResetDate' => '\DateTime', + 'allowanceUsed' => 'float', + 'allowanceUsedPreviousPeriod' => 'float', + 'bereavementLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'holidayAccrualBasis' => '\SynergiTech\Staffology\Model\HolidayAccrual', + 'holidayAccrualDefaultRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', 'holidayLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', - 'sickLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'holidayType' => '\SynergiTech\Staffology\Model\HolidayType', + 'maximumAccruePeriod' => 'float', + 'occupationalSicknessUniqueId' => 'string', + 'paidHoursAmountLastPeriod' => 'float', 'parentalLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', - 'bereavementLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule' + 'showAhpOnPayslip' => 'bool', + 'showAllowanceOnPayslip' => 'bool', + 'sickLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'unauthorisedLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'useAggregatedServiceDate' => 'bool', + 'useDefaultAccrueHoursPerDay' => 'bool', + 'useDefaultAccruePaymentInLieu' => 'bool', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'bool', + 'useDefaultAccruePaymentInLieuRate' => 'bool', + 'useDefaultAllowance' => 'bool', + 'useDefaultAllowanceResetDate' => 'bool', + 'useDefaultHolidayAccrualBasis' => 'bool', + 'useDefaultHolidayAccrualDefaultRateType' => 'bool', + 'useDefaultHolidayType' => 'bool', + 'useDefaultMaximumAccruePeriod' => 'bool' ]; /** @@ -113,52 +113,52 @@ class ContractEmployerLeaveSettingsResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPIFormats = [ - 'useDefaultHolidayType' => null, - 'useDefaultAllowanceResetDate' => null, - 'useDefaultAllowance' => null, - 'useDefaultAccruePaymentInLieu' => null, - 'useDefaultAccruePaymentInLieuRate' => null, - 'useDefaultHolidayAccrualBasis' => null, - 'useDefaultAccruePaymentInLieuPayAutomatically' => null, - 'useDefaultAccrueHoursPerDay' => null, - 'useDefaultMaximumAccruePeriod' => null, - 'allowanceResetDate' => 'date', - 'allowance' => 'double', - 'adjustment' => 'double', - 'allowanceUsed' => 'double', - 'allowanceUsedPreviousPeriod' => 'double', - 'allowanceRemaining' => 'double', - 'holidayType' => null, - 'accrueSetAmount' => null, 'accrueHoursPerDay' => 'double', - 'showAllowanceOnPayslip' => null, - 'showAhpOnPayslip' => null, - 'accruePaymentInLieuRate' => 'double', + 'accruePayCodeSetUniqueId' => 'uuid', 'accruePaymentInLieuAllGrossPay' => null, 'accruePaymentInLieuPayAutomatically' => null, - 'accruePayCodeSetUniqueId' => 'uuid', - 'maximumAccruePeriod' => 'double', - 'holidayAccrualBasis' => null, - 'holidayAccrualDefaultRateType' => null, - 'occupationalSicknessUniqueId' => 'uuid', - 'accruedPaymentLiability' => 'double', - 'accruedPaymentAdjustment' => 'double', - 'accruedPaymentPaid' => 'double', - 'accruedPaymentBalance' => 'double', - 'accruedHoursAmount' => 'double', + 'accruePaymentInLieuRate' => 'double', + 'accrueSetAmount' => null, 'accruedHoursAdjustment' => 'double', - 'accruedHoursPaid' => 'double', + 'accruedHoursAmount' => 'double', 'accruedHoursAmountLastPeriod' => 'double', - 'paidHoursAmountLastPeriod' => 'double', 'accruedHoursBalance' => 'double', + 'accruedHoursPaid' => 'double', + 'accruedPaymentAdjustment' => 'double', + 'accruedPaymentBalance' => 'double', + 'accruedPaymentLiability' => 'double', + 'accruedPaymentPaid' => 'double', + 'adjustment' => 'double', 'aggregatedServiceDate' => 'date', - 'useAggregatedServiceDate' => null, - 'useDefaultHolidayAccrualDefaultRateType' => null, - 'unauthorisedLeaveProRataRule' => null, + 'allowance' => 'double', + 'allowanceRemaining' => 'double', + 'allowanceResetDate' => 'date', + 'allowanceUsed' => 'double', + 'allowanceUsedPreviousPeriod' => 'double', + 'bereavementLeaveProRataRule' => null, + 'holidayAccrualBasis' => null, + 'holidayAccrualDefaultRateType' => null, 'holidayLeaveProRataRule' => null, - 'sickLeaveProRataRule' => null, + 'holidayType' => null, + 'maximumAccruePeriod' => 'double', + 'occupationalSicknessUniqueId' => 'uuid', + 'paidHoursAmountLastPeriod' => 'double', 'parentalLeaveProRataRule' => null, - 'bereavementLeaveProRataRule' => null + 'showAhpOnPayslip' => null, + 'showAllowanceOnPayslip' => null, + 'sickLeaveProRataRule' => null, + 'unauthorisedLeaveProRataRule' => null, + 'useAggregatedServiceDate' => null, + 'useDefaultAccrueHoursPerDay' => null, + 'useDefaultAccruePaymentInLieu' => null, + 'useDefaultAccruePaymentInLieuPayAutomatically' => null, + 'useDefaultAccruePaymentInLieuRate' => null, + 'useDefaultAllowance' => null, + 'useDefaultAllowanceResetDate' => null, + 'useDefaultHolidayAccrualBasis' => null, + 'useDefaultHolidayAccrualDefaultRateType' => null, + 'useDefaultHolidayType' => null, + 'useDefaultMaximumAccruePeriod' => null ]; /** @@ -167,52 +167,52 @@ class ContractEmployerLeaveSettingsResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPINullables = [ - 'useDefaultHolidayType' => false, - 'useDefaultAllowanceResetDate' => false, - 'useDefaultAllowance' => false, - 'useDefaultAccruePaymentInLieu' => false, - 'useDefaultAccruePaymentInLieuRate' => false, - 'useDefaultHolidayAccrualBasis' => false, - 'useDefaultAccruePaymentInLieuPayAutomatically' => false, - 'useDefaultAccrueHoursPerDay' => false, - 'useDefaultMaximumAccruePeriod' => false, - 'allowanceResetDate' => false, - 'allowance' => false, - 'adjustment' => true, - 'allowanceUsed' => false, - 'allowanceUsedPreviousPeriod' => false, - 'allowanceRemaining' => false, - 'holidayType' => false, - 'accrueSetAmount' => false, 'accrueHoursPerDay' => false, - 'showAllowanceOnPayslip' => false, - 'showAhpOnPayslip' => false, - 'accruePaymentInLieuRate' => false, + 'accruePayCodeSetUniqueId' => true, 'accruePaymentInLieuAllGrossPay' => false, 'accruePaymentInLieuPayAutomatically' => false, - 'accruePayCodeSetUniqueId' => true, - 'maximumAccruePeriod' => true, - 'holidayAccrualBasis' => false, - 'holidayAccrualDefaultRateType' => false, - 'occupationalSicknessUniqueId' => true, - 'accruedPaymentLiability' => false, - 'accruedPaymentAdjustment' => false, - 'accruedPaymentPaid' => false, - 'accruedPaymentBalance' => false, - 'accruedHoursAmount' => false, + 'accruePaymentInLieuRate' => false, + 'accrueSetAmount' => false, 'accruedHoursAdjustment' => false, - 'accruedHoursPaid' => false, + 'accruedHoursAmount' => false, 'accruedHoursAmountLastPeriod' => false, - 'paidHoursAmountLastPeriod' => false, 'accruedHoursBalance' => false, + 'accruedHoursPaid' => false, + 'accruedPaymentAdjustment' => false, + 'accruedPaymentBalance' => false, + 'accruedPaymentLiability' => false, + 'accruedPaymentPaid' => false, + 'adjustment' => true, 'aggregatedServiceDate' => true, - 'useAggregatedServiceDate' => false, - 'useDefaultHolidayAccrualDefaultRateType' => false, - 'unauthorisedLeaveProRataRule' => false, + 'allowance' => false, + 'allowanceRemaining' => false, + 'allowanceResetDate' => false, + 'allowanceUsed' => false, + 'allowanceUsedPreviousPeriod' => false, + 'bereavementLeaveProRataRule' => false, + 'holidayAccrualBasis' => false, + 'holidayAccrualDefaultRateType' => false, 'holidayLeaveProRataRule' => false, - 'sickLeaveProRataRule' => false, + 'holidayType' => false, + 'maximumAccruePeriod' => true, + 'occupationalSicknessUniqueId' => true, + 'paidHoursAmountLastPeriod' => false, 'parentalLeaveProRataRule' => false, - 'bereavementLeaveProRataRule' => false + 'showAhpOnPayslip' => false, + 'showAllowanceOnPayslip' => false, + 'sickLeaveProRataRule' => false, + 'unauthorisedLeaveProRataRule' => false, + 'useAggregatedServiceDate' => false, + 'useDefaultAccrueHoursPerDay' => false, + 'useDefaultAccruePaymentInLieu' => false, + 'useDefaultAccruePaymentInLieuPayAutomatically' => false, + 'useDefaultAccruePaymentInLieuRate' => false, + 'useDefaultAllowance' => false, + 'useDefaultAllowanceResetDate' => false, + 'useDefaultHolidayAccrualBasis' => false, + 'useDefaultHolidayAccrualDefaultRateType' => false, + 'useDefaultHolidayType' => false, + 'useDefaultMaximumAccruePeriod' => false ]; /** @@ -301,52 +301,52 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'useDefaultHolidayType' => 'useDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'useDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'useDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'useDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'useDefaultAccruePaymentInLieuRate', - 'useDefaultHolidayAccrualBasis' => 'useDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'useDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'useDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'useDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'allowanceResetDate', - 'allowance' => 'allowance', - 'adjustment' => 'adjustment', - 'allowanceUsed' => 'allowanceUsed', - 'allowanceUsedPreviousPeriod' => 'allowanceUsedPreviousPeriod', - 'allowanceRemaining' => 'allowanceRemaining', - 'holidayType' => 'holidayType', - 'accrueSetAmount' => 'accrueSetAmount', 'accrueHoursPerDay' => 'accrueHoursPerDay', - 'showAllowanceOnPayslip' => 'showAllowanceOnPayslip', - 'showAhpOnPayslip' => 'showAhpOnPayslip', - 'accruePaymentInLieuRate' => 'accruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'accruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'accruePaymentInLieuPayAutomatically', - 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'maximumAccruePeriod', - 'holidayAccrualBasis' => 'holidayAccrualBasis', - 'holidayAccrualDefaultRateType' => 'holidayAccrualDefaultRateType', - 'occupationalSicknessUniqueId' => 'occupationalSicknessUniqueId', - 'accruedPaymentLiability' => 'accruedPaymentLiability', - 'accruedPaymentAdjustment' => 'accruedPaymentAdjustment', - 'accruedPaymentPaid' => 'accruedPaymentPaid', - 'accruedPaymentBalance' => 'accruedPaymentBalance', - 'accruedHoursAmount' => 'accruedHoursAmount', + 'accruePaymentInLieuRate' => 'accruePaymentInLieuRate', + 'accrueSetAmount' => 'accrueSetAmount', 'accruedHoursAdjustment' => 'accruedHoursAdjustment', - 'accruedHoursPaid' => 'accruedHoursPaid', + 'accruedHoursAmount' => 'accruedHoursAmount', 'accruedHoursAmountLastPeriod' => 'accruedHoursAmountLastPeriod', - 'paidHoursAmountLastPeriod' => 'paidHoursAmountLastPeriod', 'accruedHoursBalance' => 'accruedHoursBalance', + 'accruedHoursPaid' => 'accruedHoursPaid', + 'accruedPaymentAdjustment' => 'accruedPaymentAdjustment', + 'accruedPaymentBalance' => 'accruedPaymentBalance', + 'accruedPaymentLiability' => 'accruedPaymentLiability', + 'accruedPaymentPaid' => 'accruedPaymentPaid', + 'adjustment' => 'adjustment', 'aggregatedServiceDate' => 'aggregatedServiceDate', - 'useAggregatedServiceDate' => 'useAggregatedServiceDate', - 'useDefaultHolidayAccrualDefaultRateType' => 'useDefaultHolidayAccrualDefaultRateType', - 'unauthorisedLeaveProRataRule' => 'unauthorisedLeaveProRataRule', + 'allowance' => 'allowance', + 'allowanceRemaining' => 'allowanceRemaining', + 'allowanceResetDate' => 'allowanceResetDate', + 'allowanceUsed' => 'allowanceUsed', + 'allowanceUsedPreviousPeriod' => 'allowanceUsedPreviousPeriod', + 'bereavementLeaveProRataRule' => 'bereavementLeaveProRataRule', + 'holidayAccrualBasis' => 'holidayAccrualBasis', + 'holidayAccrualDefaultRateType' => 'holidayAccrualDefaultRateType', 'holidayLeaveProRataRule' => 'holidayLeaveProRataRule', - 'sickLeaveProRataRule' => 'sickLeaveProRataRule', + 'holidayType' => 'holidayType', + 'maximumAccruePeriod' => 'maximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'occupationalSicknessUniqueId', + 'paidHoursAmountLastPeriod' => 'paidHoursAmountLastPeriod', 'parentalLeaveProRataRule' => 'parentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'bereavementLeaveProRataRule' + 'showAhpOnPayslip' => 'showAhpOnPayslip', + 'showAllowanceOnPayslip' => 'showAllowanceOnPayslip', + 'sickLeaveProRataRule' => 'sickLeaveProRataRule', + 'unauthorisedLeaveProRataRule' => 'unauthorisedLeaveProRataRule', + 'useAggregatedServiceDate' => 'useAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'useDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'useDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'useDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'useDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'useDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'useDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'useDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'useDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'useDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'useDefaultMaximumAccruePeriod' ]; /** @@ -355,52 +355,52 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'useDefaultHolidayType' => 'setUseDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'setUseDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'setUseDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'setUseDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'setUseDefaultAccruePaymentInLieuRate', - 'useDefaultHolidayAccrualBasis' => 'setUseDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'setUseDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'setUseDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'setUseDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'setAllowanceResetDate', - 'allowance' => 'setAllowance', - 'adjustment' => 'setAdjustment', - 'allowanceUsed' => 'setAllowanceUsed', - 'allowanceUsedPreviousPeriod' => 'setAllowanceUsedPreviousPeriod', - 'allowanceRemaining' => 'setAllowanceRemaining', - 'holidayType' => 'setHolidayType', - 'accrueSetAmount' => 'setAccrueSetAmount', 'accrueHoursPerDay' => 'setAccrueHoursPerDay', - 'showAllowanceOnPayslip' => 'setShowAllowanceOnPayslip', - 'showAhpOnPayslip' => 'setShowAhpOnPayslip', - 'accruePaymentInLieuRate' => 'setAccruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'setAccruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'setAccruePaymentInLieuPayAutomatically', - 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'setMaximumAccruePeriod', - 'holidayAccrualBasis' => 'setHolidayAccrualBasis', - 'holidayAccrualDefaultRateType' => 'setHolidayAccrualDefaultRateType', - 'occupationalSicknessUniqueId' => 'setOccupationalSicknessUniqueId', - 'accruedPaymentLiability' => 'setAccruedPaymentLiability', - 'accruedPaymentAdjustment' => 'setAccruedPaymentAdjustment', - 'accruedPaymentPaid' => 'setAccruedPaymentPaid', - 'accruedPaymentBalance' => 'setAccruedPaymentBalance', - 'accruedHoursAmount' => 'setAccruedHoursAmount', + 'accruePaymentInLieuRate' => 'setAccruePaymentInLieuRate', + 'accrueSetAmount' => 'setAccrueSetAmount', 'accruedHoursAdjustment' => 'setAccruedHoursAdjustment', - 'accruedHoursPaid' => 'setAccruedHoursPaid', + 'accruedHoursAmount' => 'setAccruedHoursAmount', 'accruedHoursAmountLastPeriod' => 'setAccruedHoursAmountLastPeriod', - 'paidHoursAmountLastPeriod' => 'setPaidHoursAmountLastPeriod', 'accruedHoursBalance' => 'setAccruedHoursBalance', + 'accruedHoursPaid' => 'setAccruedHoursPaid', + 'accruedPaymentAdjustment' => 'setAccruedPaymentAdjustment', + 'accruedPaymentBalance' => 'setAccruedPaymentBalance', + 'accruedPaymentLiability' => 'setAccruedPaymentLiability', + 'accruedPaymentPaid' => 'setAccruedPaymentPaid', + 'adjustment' => 'setAdjustment', 'aggregatedServiceDate' => 'setAggregatedServiceDate', - 'useAggregatedServiceDate' => 'setUseAggregatedServiceDate', - 'useDefaultHolidayAccrualDefaultRateType' => 'setUseDefaultHolidayAccrualDefaultRateType', - 'unauthorisedLeaveProRataRule' => 'setUnauthorisedLeaveProRataRule', + 'allowance' => 'setAllowance', + 'allowanceRemaining' => 'setAllowanceRemaining', + 'allowanceResetDate' => 'setAllowanceResetDate', + 'allowanceUsed' => 'setAllowanceUsed', + 'allowanceUsedPreviousPeriod' => 'setAllowanceUsedPreviousPeriod', + 'bereavementLeaveProRataRule' => 'setBereavementLeaveProRataRule', + 'holidayAccrualBasis' => 'setHolidayAccrualBasis', + 'holidayAccrualDefaultRateType' => 'setHolidayAccrualDefaultRateType', 'holidayLeaveProRataRule' => 'setHolidayLeaveProRataRule', - 'sickLeaveProRataRule' => 'setSickLeaveProRataRule', + 'holidayType' => 'setHolidayType', + 'maximumAccruePeriod' => 'setMaximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'setOccupationalSicknessUniqueId', + 'paidHoursAmountLastPeriod' => 'setPaidHoursAmountLastPeriod', 'parentalLeaveProRataRule' => 'setParentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'setBereavementLeaveProRataRule' + 'showAhpOnPayslip' => 'setShowAhpOnPayslip', + 'showAllowanceOnPayslip' => 'setShowAllowanceOnPayslip', + 'sickLeaveProRataRule' => 'setSickLeaveProRataRule', + 'unauthorisedLeaveProRataRule' => 'setUnauthorisedLeaveProRataRule', + 'useAggregatedServiceDate' => 'setUseAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'setUseDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'setUseDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'setUseDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'setUseDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'setUseDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'setUseDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'setUseDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'setUseDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'setUseDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'setUseDefaultMaximumAccruePeriod' ]; /** @@ -409,52 +409,52 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'useDefaultHolidayType' => 'getUseDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'getUseDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'getUseDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'getUseDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'getUseDefaultAccruePaymentInLieuRate', - 'useDefaultHolidayAccrualBasis' => 'getUseDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'getUseDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'getUseDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'getUseDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'getAllowanceResetDate', - 'allowance' => 'getAllowance', - 'adjustment' => 'getAdjustment', - 'allowanceUsed' => 'getAllowanceUsed', - 'allowanceUsedPreviousPeriod' => 'getAllowanceUsedPreviousPeriod', - 'allowanceRemaining' => 'getAllowanceRemaining', - 'holidayType' => 'getHolidayType', - 'accrueSetAmount' => 'getAccrueSetAmount', 'accrueHoursPerDay' => 'getAccrueHoursPerDay', - 'showAllowanceOnPayslip' => 'getShowAllowanceOnPayslip', - 'showAhpOnPayslip' => 'getShowAhpOnPayslip', - 'accruePaymentInLieuRate' => 'getAccruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'getAccruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'getAccruePaymentInLieuPayAutomatically', - 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'getMaximumAccruePeriod', - 'holidayAccrualBasis' => 'getHolidayAccrualBasis', - 'holidayAccrualDefaultRateType' => 'getHolidayAccrualDefaultRateType', - 'occupationalSicknessUniqueId' => 'getOccupationalSicknessUniqueId', - 'accruedPaymentLiability' => 'getAccruedPaymentLiability', - 'accruedPaymentAdjustment' => 'getAccruedPaymentAdjustment', - 'accruedPaymentPaid' => 'getAccruedPaymentPaid', - 'accruedPaymentBalance' => 'getAccruedPaymentBalance', - 'accruedHoursAmount' => 'getAccruedHoursAmount', + 'accruePaymentInLieuRate' => 'getAccruePaymentInLieuRate', + 'accrueSetAmount' => 'getAccrueSetAmount', 'accruedHoursAdjustment' => 'getAccruedHoursAdjustment', - 'accruedHoursPaid' => 'getAccruedHoursPaid', + 'accruedHoursAmount' => 'getAccruedHoursAmount', 'accruedHoursAmountLastPeriod' => 'getAccruedHoursAmountLastPeriod', - 'paidHoursAmountLastPeriod' => 'getPaidHoursAmountLastPeriod', 'accruedHoursBalance' => 'getAccruedHoursBalance', + 'accruedHoursPaid' => 'getAccruedHoursPaid', + 'accruedPaymentAdjustment' => 'getAccruedPaymentAdjustment', + 'accruedPaymentBalance' => 'getAccruedPaymentBalance', + 'accruedPaymentLiability' => 'getAccruedPaymentLiability', + 'accruedPaymentPaid' => 'getAccruedPaymentPaid', + 'adjustment' => 'getAdjustment', 'aggregatedServiceDate' => 'getAggregatedServiceDate', - 'useAggregatedServiceDate' => 'getUseAggregatedServiceDate', - 'useDefaultHolidayAccrualDefaultRateType' => 'getUseDefaultHolidayAccrualDefaultRateType', - 'unauthorisedLeaveProRataRule' => 'getUnauthorisedLeaveProRataRule', + 'allowance' => 'getAllowance', + 'allowanceRemaining' => 'getAllowanceRemaining', + 'allowanceResetDate' => 'getAllowanceResetDate', + 'allowanceUsed' => 'getAllowanceUsed', + 'allowanceUsedPreviousPeriod' => 'getAllowanceUsedPreviousPeriod', + 'bereavementLeaveProRataRule' => 'getBereavementLeaveProRataRule', + 'holidayAccrualBasis' => 'getHolidayAccrualBasis', + 'holidayAccrualDefaultRateType' => 'getHolidayAccrualDefaultRateType', 'holidayLeaveProRataRule' => 'getHolidayLeaveProRataRule', - 'sickLeaveProRataRule' => 'getSickLeaveProRataRule', + 'holidayType' => 'getHolidayType', + 'maximumAccruePeriod' => 'getMaximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'getOccupationalSicknessUniqueId', + 'paidHoursAmountLastPeriod' => 'getPaidHoursAmountLastPeriod', 'parentalLeaveProRataRule' => 'getParentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'getBereavementLeaveProRataRule' + 'showAhpOnPayslip' => 'getShowAhpOnPayslip', + 'showAllowanceOnPayslip' => 'getShowAllowanceOnPayslip', + 'sickLeaveProRataRule' => 'getSickLeaveProRataRule', + 'unauthorisedLeaveProRataRule' => 'getUnauthorisedLeaveProRataRule', + 'useAggregatedServiceDate' => 'getUseAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'getUseDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'getUseDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'getUseDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'getUseDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'getUseDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'getUseDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'getUseDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'getUseDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'getUseDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'getUseDefaultMaximumAccruePeriod' ]; /** @@ -513,52 +513,52 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('useDefaultHolidayType', $data ?? [], null); - $this->setIfExists('useDefaultAllowanceResetDate', $data ?? [], null); - $this->setIfExists('useDefaultAllowance', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieu', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieuRate', $data ?? [], null); - $this->setIfExists('useDefaultHolidayAccrualBasis', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieuPayAutomatically', $data ?? [], null); - $this->setIfExists('useDefaultAccrueHoursPerDay', $data ?? [], null); - $this->setIfExists('useDefaultMaximumAccruePeriod', $data ?? [], null); - $this->setIfExists('allowanceResetDate', $data ?? [], null); - $this->setIfExists('allowance', $data ?? [], null); + $this->setIfExists('accrueHoursPerDay', $data ?? [], null); + $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); + $this->setIfExists('accruePaymentInLieuAllGrossPay', $data ?? [], null); + $this->setIfExists('accruePaymentInLieuPayAutomatically', $data ?? [], null); + $this->setIfExists('accruePaymentInLieuRate', $data ?? [], null); + $this->setIfExists('accrueSetAmount', $data ?? [], null); + $this->setIfExists('accruedHoursAdjustment', $data ?? [], null); + $this->setIfExists('accruedHoursAmount', $data ?? [], null); + $this->setIfExists('accruedHoursAmountLastPeriod', $data ?? [], null); + $this->setIfExists('accruedHoursBalance', $data ?? [], null); + $this->setIfExists('accruedHoursPaid', $data ?? [], null); + $this->setIfExists('accruedPaymentAdjustment', $data ?? [], null); + $this->setIfExists('accruedPaymentBalance', $data ?? [], null); + $this->setIfExists('accruedPaymentLiability', $data ?? [], null); + $this->setIfExists('accruedPaymentPaid', $data ?? [], null); $this->setIfExists('adjustment', $data ?? [], null); + $this->setIfExists('aggregatedServiceDate', $data ?? [], null); + $this->setIfExists('allowance', $data ?? [], null); + $this->setIfExists('allowanceRemaining', $data ?? [], null); + $this->setIfExists('allowanceResetDate', $data ?? [], null); $this->setIfExists('allowanceUsed', $data ?? [], null); $this->setIfExists('allowanceUsedPreviousPeriod', $data ?? [], null); - $this->setIfExists('allowanceRemaining', $data ?? [], null); - $this->setIfExists('holidayType', $data ?? [], null); - $this->setIfExists('accrueSetAmount', $data ?? [], null); - $this->setIfExists('accrueHoursPerDay', $data ?? [], null); - $this->setIfExists('showAllowanceOnPayslip', $data ?? [], null); - $this->setIfExists('showAhpOnPayslip', $data ?? [], null); - $this->setIfExists('accruePaymentInLieuRate', $data ?? [], null); - $this->setIfExists('accruePaymentInLieuAllGrossPay', $data ?? [], null); - $this->setIfExists('accruePaymentInLieuPayAutomatically', $data ?? [], null); - $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); - $this->setIfExists('maximumAccruePeriod', $data ?? [], null); + $this->setIfExists('bereavementLeaveProRataRule', $data ?? [], null); $this->setIfExists('holidayAccrualBasis', $data ?? [], null); $this->setIfExists('holidayAccrualDefaultRateType', $data ?? [], null); + $this->setIfExists('holidayLeaveProRataRule', $data ?? [], null); + $this->setIfExists('holidayType', $data ?? [], null); + $this->setIfExists('maximumAccruePeriod', $data ?? [], null); $this->setIfExists('occupationalSicknessUniqueId', $data ?? [], null); - $this->setIfExists('accruedPaymentLiability', $data ?? [], null); - $this->setIfExists('accruedPaymentAdjustment', $data ?? [], null); - $this->setIfExists('accruedPaymentPaid', $data ?? [], null); - $this->setIfExists('accruedPaymentBalance', $data ?? [], null); - $this->setIfExists('accruedHoursAmount', $data ?? [], null); - $this->setIfExists('accruedHoursAdjustment', $data ?? [], null); - $this->setIfExists('accruedHoursPaid', $data ?? [], null); - $this->setIfExists('accruedHoursAmountLastPeriod', $data ?? [], null); $this->setIfExists('paidHoursAmountLastPeriod', $data ?? [], null); - $this->setIfExists('accruedHoursBalance', $data ?? [], null); - $this->setIfExists('aggregatedServiceDate', $data ?? [], null); + $this->setIfExists('parentalLeaveProRataRule', $data ?? [], null); + $this->setIfExists('showAhpOnPayslip', $data ?? [], null); + $this->setIfExists('showAllowanceOnPayslip', $data ?? [], null); + $this->setIfExists('sickLeaveProRataRule', $data ?? [], null); + $this->setIfExists('unauthorisedLeaveProRataRule', $data ?? [], null); $this->setIfExists('useAggregatedServiceDate', $data ?? [], null); + $this->setIfExists('useDefaultAccrueHoursPerDay', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieu', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieuPayAutomatically', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieuRate', $data ?? [], null); + $this->setIfExists('useDefaultAllowance', $data ?? [], null); + $this->setIfExists('useDefaultAllowanceResetDate', $data ?? [], null); + $this->setIfExists('useDefaultHolidayAccrualBasis', $data ?? [], null); $this->setIfExists('useDefaultHolidayAccrualDefaultRateType', $data ?? [], null); - $this->setIfExists('unauthorisedLeaveProRataRule', $data ?? [], null); - $this->setIfExists('holidayLeaveProRataRule', $data ?? [], null); - $this->setIfExists('sickLeaveProRataRule', $data ?? [], null); - $this->setIfExists('parentalLeaveProRataRule', $data ?? [], null); - $this->setIfExists('bereavementLeaveProRataRule', $data ?? [], null); + $this->setIfExists('useDefaultHolidayType', $data ?? [], null); + $this->setIfExists('useDefaultMaximumAccruePeriod', $data ?? [], null); } /** @@ -604,697 +604,643 @@ public function valid(): bool /** - * Gets useDefaultHolidayType - * - * @return bool|null - */ - public function getUseDefaultHolidayType(): ?bool - { - return $this->container['useDefaultHolidayType']; - } - - /** - * Sets useDefaultHolidayType - * - * @param bool|null $useDefaultHolidayType If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) - * - * @return $this - */ - public function setUseDefaultHolidayType(?bool $useDefaultHolidayType): static - { - if (is_null($useDefaultHolidayType)) { - throw new InvalidArgumentException('non-nullable useDefaultHolidayType cannot be null'); - } - $this->container['useDefaultHolidayType'] = $useDefaultHolidayType; - - return $this; - } - - /** - * Gets useDefaultAllowanceResetDate - * - * @return bool|null - */ - public function getUseDefaultAllowanceResetDate(): ?bool - { - return $this->container['useDefaultAllowanceResetDate']; - } - - /** - * Sets useDefaultAllowanceResetDate - * - * @param bool|null $useDefaultAllowanceResetDate If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) - * - * @return $this - */ - public function setUseDefaultAllowanceResetDate(?bool $useDefaultAllowanceResetDate): static - { - if (is_null($useDefaultAllowanceResetDate)) { - throw new InvalidArgumentException('non-nullable useDefaultAllowanceResetDate cannot be null'); - } - $this->container['useDefaultAllowanceResetDate'] = $useDefaultAllowanceResetDate; - - return $this; - } - - /** - * Gets useDefaultAllowance + * Gets accrueHoursPerDay * - * @return bool|null + * @return float|null */ - public function getUseDefaultAllowance(): ?bool + public function getAccrueHoursPerDay(): ?float { - return $this->container['useDefaultAllowance']; + return $this->container['accrueHoursPerDay']; } /** - * Sets useDefaultAllowance + * Sets accrueHoursPerDay * - * @param bool|null $useDefaultAllowance If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) + * @param float|null $accrueHoursPerDay If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued * * @return $this */ - public function setUseDefaultAllowance(?bool $useDefaultAllowance): static + public function setAccrueHoursPerDay(?float $accrueHoursPerDay): static { - if (is_null($useDefaultAllowance)) { - throw new InvalidArgumentException('non-nullable useDefaultAllowance cannot be null'); + if (is_null($accrueHoursPerDay)) { + throw new InvalidArgumentException('non-nullable accrueHoursPerDay cannot be null'); } - $this->container['useDefaultAllowance'] = $useDefaultAllowance; + $this->container['accrueHoursPerDay'] = $accrueHoursPerDay; return $this; } /** - * Gets useDefaultAccruePaymentInLieu + * Gets accruePayCodeSetUniqueId * - * @return bool|null + * @return string|null */ - public function getUseDefaultAccruePaymentInLieu(): ?bool + public function getAccruePayCodeSetUniqueId(): ?string { - return $this->container['useDefaultAccruePaymentInLieu']; + return $this->container['accruePayCodeSetUniqueId']; } /** - * Sets useDefaultAccruePaymentInLieu + * Sets accruePayCodeSetUniqueId * - * @param bool|null $useDefaultAccruePaymentInLieu If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param string|null $accruePayCodeSetUniqueId accruePayCodeSetUniqueId * * @return $this */ - public function setUseDefaultAccruePaymentInLieu(?bool $useDefaultAccruePaymentInLieu): static + public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static { - if (is_null($useDefaultAccruePaymentInLieu)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieu cannot be null'); + if (is_null($accruePayCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useDefaultAccruePaymentInLieu'] = $useDefaultAccruePaymentInLieu; + $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; return $this; } /** - * Gets useDefaultAccruePaymentInLieuRate + * Gets accruePaymentInLieuAllGrossPay * * @return bool|null */ - public function getUseDefaultAccruePaymentInLieuRate(): ?bool + public function getAccruePaymentInLieuAllGrossPay(): ?bool { - return $this->container['useDefaultAccruePaymentInLieuRate']; + return $this->container['accruePaymentInLieuAllGrossPay']; } /** - * Sets useDefaultAccruePaymentInLieuRate + * Sets accruePaymentInLieuAllGrossPay * - * @param bool|null $useDefaultAccruePaymentInLieuRate If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param bool|null $accruePaymentInLieuAllGrossPay Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element * * @return $this */ - public function setUseDefaultAccruePaymentInLieuRate(?bool $useDefaultAccruePaymentInLieuRate): static + public function setAccruePaymentInLieuAllGrossPay(?bool $accruePaymentInLieuAllGrossPay): static { - if (is_null($useDefaultAccruePaymentInLieuRate)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuRate cannot be null'); + if (is_null($accruePaymentInLieuAllGrossPay)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuAllGrossPay cannot be null'); } - $this->container['useDefaultAccruePaymentInLieuRate'] = $useDefaultAccruePaymentInLieuRate; + $this->container['accruePaymentInLieuAllGrossPay'] = $accruePaymentInLieuAllGrossPay; return $this; } /** - * Gets useDefaultHolidayAccrualBasis + * Gets accruePaymentInLieuPayAutomatically * * @return bool|null */ - public function getUseDefaultHolidayAccrualBasis(): ?bool + public function getAccruePaymentInLieuPayAutomatically(): ?bool { - return $this->container['useDefaultHolidayAccrualBasis']; + return $this->container['accruePaymentInLieuPayAutomatically']; } /** - * Sets useDefaultHolidayAccrualBasis + * Sets accruePaymentInLieuPayAutomatically * - * @param bool|null $useDefaultHolidayAccrualBasis If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param bool|null $accruePaymentInLieuPayAutomatically Set to true if you want employees to be automatically paid any outstanding holiday pay * * @return $this */ - public function setUseDefaultHolidayAccrualBasis(?bool $useDefaultHolidayAccrualBasis): static + public function setAccruePaymentInLieuPayAutomatically(?bool $accruePaymentInLieuPayAutomatically): static { - if (is_null($useDefaultHolidayAccrualBasis)) { - throw new InvalidArgumentException('non-nullable useDefaultHolidayAccrualBasis cannot be null'); + if (is_null($accruePaymentInLieuPayAutomatically)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuPayAutomatically cannot be null'); } - $this->container['useDefaultHolidayAccrualBasis'] = $useDefaultHolidayAccrualBasis; + $this->container['accruePaymentInLieuPayAutomatically'] = $accruePaymentInLieuPayAutomatically; return $this; } /** - * Gets useDefaultAccruePaymentInLieuPayAutomatically + * Gets accruePaymentInLieuRate * - * @return bool|null + * @return float|null */ - public function getUseDefaultAccruePaymentInLieuPayAutomatically(): ?bool + public function getAccruePaymentInLieuRate(): ?float { - return $this->container['useDefaultAccruePaymentInLieuPayAutomatically']; + return $this->container['accruePaymentInLieuRate']; } /** - * Sets useDefaultAccruePaymentInLieuPayAutomatically + * Sets accruePaymentInLieuRate * - * @param bool|null $useDefaultAccruePaymentInLieuPayAutomatically If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accruePaymentInLieuRate The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. * * @return $this */ - public function setUseDefaultAccruePaymentInLieuPayAutomatically(?bool $useDefaultAccruePaymentInLieuPayAutomatically): static + public function setAccruePaymentInLieuRate(?float $accruePaymentInLieuRate): static { - if (is_null($useDefaultAccruePaymentInLieuPayAutomatically)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuPayAutomatically cannot be null'); + if (is_null($accruePaymentInLieuRate)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuRate cannot be null'); } - $this->container['useDefaultAccruePaymentInLieuPayAutomatically'] = $useDefaultAccruePaymentInLieuPayAutomatically; + $this->container['accruePaymentInLieuRate'] = $accruePaymentInLieuRate; return $this; } /** - * Gets useDefaultAccrueHoursPerDay + * Gets accrueSetAmount * * @return bool|null */ - public function getUseDefaultAccrueHoursPerDay(): ?bool + public function getAccrueSetAmount(): ?bool { - return $this->container['useDefaultAccrueHoursPerDay']; + return $this->container['accrueSetAmount']; } /** - * Sets useDefaultAccrueHoursPerDay + * Sets accrueSetAmount * - * @param bool|null $useDefaultAccrueHoursPerDay If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param bool|null $accrueSetAmount If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. * * @return $this */ - public function setUseDefaultAccrueHoursPerDay(?bool $useDefaultAccrueHoursPerDay): static + public function setAccrueSetAmount(?bool $accrueSetAmount): static { - if (is_null($useDefaultAccrueHoursPerDay)) { - throw new InvalidArgumentException('non-nullable useDefaultAccrueHoursPerDay cannot be null'); + if (is_null($accrueSetAmount)) { + throw new InvalidArgumentException('non-nullable accrueSetAmount cannot be null'); } - $this->container['useDefaultAccrueHoursPerDay'] = $useDefaultAccrueHoursPerDay; + $this->container['accrueSetAmount'] = $accrueSetAmount; return $this; } /** - * Gets useDefaultMaximumAccruePeriod + * Gets accruedHoursAdjustment * - * @return bool|null + * @return float|null */ - public function getUseDefaultMaximumAccruePeriod(): ?bool + public function getAccruedHoursAdjustment(): ?float { - return $this->container['useDefaultMaximumAccruePeriod']; + return $this->container['accruedHoursAdjustment']; } /** - * Sets useDefaultMaximumAccruePeriod + * Sets accruedHoursAdjustment * - * @param bool|null $useDefaultMaximumAccruePeriod If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accruedHoursAdjustment Any manual adjustment to the total hours accrued * * @return $this */ - public function setUseDefaultMaximumAccruePeriod(?bool $useDefaultMaximumAccruePeriod): static + public function setAccruedHoursAdjustment(?float $accruedHoursAdjustment): static { - if (is_null($useDefaultMaximumAccruePeriod)) { - throw new InvalidArgumentException('non-nullable useDefaultMaximumAccruePeriod cannot be null'); + if (is_null($accruedHoursAdjustment)) { + throw new InvalidArgumentException('non-nullable accruedHoursAdjustment cannot be null'); } - $this->container['useDefaultMaximumAccruePeriod'] = $useDefaultMaximumAccruePeriod; + $this->container['accruedHoursAdjustment'] = $accruedHoursAdjustment; return $this; } /** - * Gets allowanceResetDate + * Gets accruedHoursAmount * - * @return \DateTime|null + * @return float|null */ - public function getAllowanceResetDate(): ?\DateTime + public function getAccruedHoursAmount(): ?float { - return $this->container['allowanceResetDate']; + return $this->container['accruedHoursAmount']; } /** - * Sets allowanceResetDate + * Sets accruedHoursAmount * - * @param \DateTime|null $allowanceResetDate The date that the holiday allowance resets. Only the day/month part of the value is relevant. + * @param float|null $accruedHoursAmount [readonly] The total accrued hours for this employee over the lifetime of their employment so far * * @return $this */ - public function setAllowanceResetDate(?\DateTime $allowanceResetDate): static + public function setAccruedHoursAmount(?float $accruedHoursAmount): static { - if (is_null($allowanceResetDate)) { - throw new InvalidArgumentException('non-nullable allowanceResetDate cannot be null'); + if (is_null($accruedHoursAmount)) { + throw new InvalidArgumentException('non-nullable accruedHoursAmount cannot be null'); } - $this->container['allowanceResetDate'] = $allowanceResetDate; + $this->container['accruedHoursAmount'] = $accruedHoursAmount; return $this; } /** - * Gets allowance + * Gets accruedHoursAmountLastPeriod * * @return float|null */ - public function getAllowance(): ?float + public function getAccruedHoursAmountLastPeriod(): ?float { - return $this->container['allowance']; + return $this->container['accruedHoursAmountLastPeriod']; } /** - * Sets allowance + * Sets accruedHoursAmountLastPeriod * - * @param float|null $allowance The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset + * @param float|null $accruedHoursAmountLastPeriod [readonly] The total accrued hours for this employee in the last pay period * * @return $this */ - public function setAllowance(?float $allowance): static + public function setAccruedHoursAmountLastPeriod(?float $accruedHoursAmountLastPeriod): static { - if (is_null($allowance)) { - throw new InvalidArgumentException('non-nullable allowance cannot be null'); + if (is_null($accruedHoursAmountLastPeriod)) { + throw new InvalidArgumentException('non-nullable accruedHoursAmountLastPeriod cannot be null'); } - $this->container['allowance'] = $allowance; + $this->container['accruedHoursAmountLastPeriod'] = $accruedHoursAmountLastPeriod; return $this; } /** - * Gets adjustment + * Gets accruedHoursBalance * * @return float|null */ - public function getAdjustment(): ?float + public function getAccruedHoursBalance(): ?float { - return $this->container['adjustment']; + return $this->container['accruedHoursBalance']; } /** - * Sets adjustment + * Sets accruedHoursBalance * - * @param float|null $adjustment Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accruedHoursBalance [readonly] The balance of hours owed to this employee in lieu of holidays * * @return $this */ - public function setAdjustment(?float $adjustment): static + public function setAccruedHoursBalance(?float $accruedHoursBalance): static { - if (is_null($adjustment)) { - array_push($this->openAPINullablesSetToNull, 'adjustment'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('adjustment', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($accruedHoursBalance)) { + throw new InvalidArgumentException('non-nullable accruedHoursBalance cannot be null'); } - $this->container['adjustment'] = $adjustment; + $this->container['accruedHoursBalance'] = $accruedHoursBalance; return $this; } /** - * Gets allowanceUsed + * Gets accruedHoursPaid * * @return float|null */ - public function getAllowanceUsed(): ?float + public function getAccruedHoursPaid(): ?float { - return $this->container['allowanceUsed']; + return $this->container['accruedHoursPaid']; } /** - * Sets allowanceUsed + * Sets accruedHoursPaid * - * @param float|null $allowanceUsed [readonly] The number of days used from the allowance since last reset + * @param float|null $accruedHoursPaid [readonly] The Total amount of hours paid to this employee in lieu of holidays * * @return $this */ - public function setAllowanceUsed(?float $allowanceUsed): static + public function setAccruedHoursPaid(?float $accruedHoursPaid): static { - if (is_null($allowanceUsed)) { - throw new InvalidArgumentException('non-nullable allowanceUsed cannot be null'); + if (is_null($accruedHoursPaid)) { + throw new InvalidArgumentException('non-nullable accruedHoursPaid cannot be null'); } - $this->container['allowanceUsed'] = $allowanceUsed; + $this->container['accruedHoursPaid'] = $accruedHoursPaid; return $this; } /** - * Gets allowanceUsedPreviousPeriod + * Gets accruedPaymentAdjustment * * @return float|null */ - public function getAllowanceUsedPreviousPeriod(): ?float + public function getAccruedPaymentAdjustment(): ?float { - return $this->container['allowanceUsedPreviousPeriod']; + return $this->container['accruedPaymentAdjustment']; } /** - * Sets allowanceUsedPreviousPeriod + * Sets accruedPaymentAdjustment * - * @param float|null $allowanceUsedPreviousPeriod [readonly] The number of days used in the 12 months prior to the last reset + * @param float|null $accruedPaymentAdjustment Any manual adjustment to the total accrued * * @return $this */ - public function setAllowanceUsedPreviousPeriod(?float $allowanceUsedPreviousPeriod): static + public function setAccruedPaymentAdjustment(?float $accruedPaymentAdjustment): static { - if (is_null($allowanceUsedPreviousPeriod)) { - throw new InvalidArgumentException('non-nullable allowanceUsedPreviousPeriod cannot be null'); + if (is_null($accruedPaymentAdjustment)) { + throw new InvalidArgumentException('non-nullable accruedPaymentAdjustment cannot be null'); } - $this->container['allowanceUsedPreviousPeriod'] = $allowanceUsedPreviousPeriod; + $this->container['accruedPaymentAdjustment'] = $accruedPaymentAdjustment; return $this; } /** - * Gets allowanceRemaining + * Gets accruedPaymentBalance * * @return float|null */ - public function getAllowanceRemaining(): ?float + public function getAccruedPaymentBalance(): ?float { - return $this->container['allowanceRemaining']; + return $this->container['accruedPaymentBalance']; } /** - * Sets allowanceRemaining + * Sets accruedPaymentBalance * - * @param float|null $allowanceRemaining [readonly] The number of days remaining of the allowance until next reset + * @param float|null $accruedPaymentBalance [readonly] The balance of what is owed to this employee in lieu of holidays * * @return $this */ - public function setAllowanceRemaining(?float $allowanceRemaining): static + public function setAccruedPaymentBalance(?float $accruedPaymentBalance): static { - if (is_null($allowanceRemaining)) { - throw new InvalidArgumentException('non-nullable allowanceRemaining cannot be null'); + if (is_null($accruedPaymentBalance)) { + throw new InvalidArgumentException('non-nullable accruedPaymentBalance cannot be null'); } - $this->container['allowanceRemaining'] = $allowanceRemaining; + $this->container['accruedPaymentBalance'] = $accruedPaymentBalance; return $this; } /** - * Gets holidayType + * Gets accruedPaymentLiability * - * @return \SynergiTech\Staffology\Model\HolidayType|null + * @return float|null */ - public function getHolidayType(): ?\SynergiTech\Staffology\Model\HolidayType + public function getAccruedPaymentLiability(): ?float { - return $this->container['holidayType']; + return $this->container['accruedPaymentLiability']; } /** - * Sets holidayType + * Sets accruedPaymentLiability * - * @param \SynergiTech\Staffology\Model\HolidayType|null $holidayType holidayType + * @param float|null $accruedPaymentLiability [readonly] The total accrued payments for this employee over the lifetime of their employment so far * * @return $this */ - public function setHolidayType(?\SynergiTech\Staffology\Model\HolidayType $holidayType): static + public function setAccruedPaymentLiability(?float $accruedPaymentLiability): static { - if (is_null($holidayType)) { - throw new InvalidArgumentException('non-nullable holidayType cannot be null'); + if (is_null($accruedPaymentLiability)) { + throw new InvalidArgumentException('non-nullable accruedPaymentLiability cannot be null'); } - $this->container['holidayType'] = $holidayType; + $this->container['accruedPaymentLiability'] = $accruedPaymentLiability; return $this; } /** - * Gets accrueSetAmount + * Gets accruedPaymentPaid * - * @return bool|null + * @return float|null */ - public function getAccrueSetAmount(): ?bool + public function getAccruedPaymentPaid(): ?float { - return $this->container['accrueSetAmount']; + return $this->container['accruedPaymentPaid']; } /** - * Sets accrueSetAmount + * Sets accruedPaymentPaid * - * @param bool|null $accrueSetAmount If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. + * @param float|null $accruedPaymentPaid [readonly] The Total amount paid to this employee in lieu of holidays * * @return $this */ - public function setAccrueSetAmount(?bool $accrueSetAmount): static + public function setAccruedPaymentPaid(?float $accruedPaymentPaid): static { - if (is_null($accrueSetAmount)) { - throw new InvalidArgumentException('non-nullable accrueSetAmount cannot be null'); + if (is_null($accruedPaymentPaid)) { + throw new InvalidArgumentException('non-nullable accruedPaymentPaid cannot be null'); } - $this->container['accrueSetAmount'] = $accrueSetAmount; + $this->container['accruedPaymentPaid'] = $accruedPaymentPaid; return $this; } /** - * Gets accrueHoursPerDay + * Gets adjustment * * @return float|null */ - public function getAccrueHoursPerDay(): ?float + public function getAdjustment(): ?float { - return $this->container['accrueHoursPerDay']; + return $this->container['adjustment']; } /** - * Sets accrueHoursPerDay + * Sets adjustment * - * @param float|null $accrueHoursPerDay If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued + * @param float|null $adjustment Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setAccrueHoursPerDay(?float $accrueHoursPerDay): static + public function setAdjustment(?float $adjustment): static { - if (is_null($accrueHoursPerDay)) { - throw new InvalidArgumentException('non-nullable accrueHoursPerDay cannot be null'); + if (is_null($adjustment)) { + array_push($this->openAPINullablesSetToNull, 'adjustment'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('adjustment', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['accrueHoursPerDay'] = $accrueHoursPerDay; + $this->container['adjustment'] = $adjustment; return $this; } /** - * Gets showAllowanceOnPayslip + * Gets aggregatedServiceDate * - * @return bool|null + * @return \DateTime|null */ - public function getShowAllowanceOnPayslip(): ?bool + public function getAggregatedServiceDate(): ?\DateTime { - return $this->container['showAllowanceOnPayslip']; + return $this->container['aggregatedServiceDate']; } /** - * Sets showAllowanceOnPayslip + * Sets aggregatedServiceDate * - * @param bool|null $showAllowanceOnPayslip If true then the remaining Allowance will be shown on the employees payslip. + * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate * * @return $this */ - public function setShowAllowanceOnPayslip(?bool $showAllowanceOnPayslip): static + public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static { - if (is_null($showAllowanceOnPayslip)) { - throw new InvalidArgumentException('non-nullable showAllowanceOnPayslip cannot be null'); + if (is_null($aggregatedServiceDate)) { + array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('aggregatedServiceDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['showAllowanceOnPayslip'] = $showAllowanceOnPayslip; + $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; return $this; } /** - * Gets showAhpOnPayslip + * Gets allowance * - * @return bool|null + * @return float|null */ - public function getShowAhpOnPayslip(): ?bool + public function getAllowance(): ?float { - return $this->container['showAhpOnPayslip']; + return $this->container['allowance']; } /** - * Sets showAhpOnPayslip + * Sets allowance * - * @param bool|null $showAhpOnPayslip If true then the AHP balance will be shown on the employees payslip. + * @param float|null $allowance The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset * * @return $this */ - public function setShowAhpOnPayslip(?bool $showAhpOnPayslip): static + public function setAllowance(?float $allowance): static { - if (is_null($showAhpOnPayslip)) { - throw new InvalidArgumentException('non-nullable showAhpOnPayslip cannot be null'); + if (is_null($allowance)) { + throw new InvalidArgumentException('non-nullable allowance cannot be null'); } - $this->container['showAhpOnPayslip'] = $showAhpOnPayslip; + $this->container['allowance'] = $allowance; return $this; } /** - * Gets accruePaymentInLieuRate + * Gets allowanceRemaining * * @return float|null */ - public function getAccruePaymentInLieuRate(): ?float + public function getAllowanceRemaining(): ?float { - return $this->container['accruePaymentInLieuRate']; + return $this->container['allowanceRemaining']; } /** - * Sets accruePaymentInLieuRate + * Sets allowanceRemaining * - * @param float|null $accruePaymentInLieuRate The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. + * @param float|null $allowanceRemaining [readonly] The number of days remaining of the allowance until next reset * * @return $this */ - public function setAccruePaymentInLieuRate(?float $accruePaymentInLieuRate): static + public function setAllowanceRemaining(?float $allowanceRemaining): static { - if (is_null($accruePaymentInLieuRate)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuRate cannot be null'); + if (is_null($allowanceRemaining)) { + throw new InvalidArgumentException('non-nullable allowanceRemaining cannot be null'); } - $this->container['accruePaymentInLieuRate'] = $accruePaymentInLieuRate; + $this->container['allowanceRemaining'] = $allowanceRemaining; return $this; } /** - * Gets accruePaymentInLieuAllGrossPay + * Gets allowanceResetDate * - * @return bool|null + * @return \DateTime|null */ - public function getAccruePaymentInLieuAllGrossPay(): ?bool + public function getAllowanceResetDate(): ?\DateTime { - return $this->container['accruePaymentInLieuAllGrossPay']; + return $this->container['allowanceResetDate']; } /** - * Sets accruePaymentInLieuAllGrossPay + * Sets allowanceResetDate * - * @param bool|null $accruePaymentInLieuAllGrossPay Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element + * @param \DateTime|null $allowanceResetDate The date that the holiday allowance resets. Only the day/month part of the value is relevant. * * @return $this */ - public function setAccruePaymentInLieuAllGrossPay(?bool $accruePaymentInLieuAllGrossPay): static + public function setAllowanceResetDate(?\DateTime $allowanceResetDate): static { - if (is_null($accruePaymentInLieuAllGrossPay)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuAllGrossPay cannot be null'); + if (is_null($allowanceResetDate)) { + throw new InvalidArgumentException('non-nullable allowanceResetDate cannot be null'); } - $this->container['accruePaymentInLieuAllGrossPay'] = $accruePaymentInLieuAllGrossPay; + $this->container['allowanceResetDate'] = $allowanceResetDate; return $this; } /** - * Gets accruePaymentInLieuPayAutomatically + * Gets allowanceUsed * - * @return bool|null + * @return float|null */ - public function getAccruePaymentInLieuPayAutomatically(): ?bool + public function getAllowanceUsed(): ?float { - return $this->container['accruePaymentInLieuPayAutomatically']; + return $this->container['allowanceUsed']; } /** - * Sets accruePaymentInLieuPayAutomatically + * Sets allowanceUsed * - * @param bool|null $accruePaymentInLieuPayAutomatically Set to true if you want employees to be automatically paid any outstanding holiday pay + * @param float|null $allowanceUsed [readonly] The number of days used from the allowance since last reset * * @return $this */ - public function setAccruePaymentInLieuPayAutomatically(?bool $accruePaymentInLieuPayAutomatically): static + public function setAllowanceUsed(?float $allowanceUsed): static { - if (is_null($accruePaymentInLieuPayAutomatically)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuPayAutomatically cannot be null'); + if (is_null($allowanceUsed)) { + throw new InvalidArgumentException('non-nullable allowanceUsed cannot be null'); } - $this->container['accruePaymentInLieuPayAutomatically'] = $accruePaymentInLieuPayAutomatically; + $this->container['allowanceUsed'] = $allowanceUsed; return $this; } /** - * Gets accruePayCodeSetUniqueId + * Gets allowanceUsedPreviousPeriod * - * @return string|null + * @return float|null */ - public function getAccruePayCodeSetUniqueId(): ?string + public function getAllowanceUsedPreviousPeriod(): ?float { - return $this->container['accruePayCodeSetUniqueId']; + return $this->container['allowanceUsedPreviousPeriod']; } /** - * Sets accruePayCodeSetUniqueId + * Sets allowanceUsedPreviousPeriod * - * @param string|null $accruePayCodeSetUniqueId accruePayCodeSetUniqueId + * @param float|null $allowanceUsedPreviousPeriod [readonly] The number of days used in the 12 months prior to the last reset * * @return $this */ - public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static + public function setAllowanceUsedPreviousPeriod(?float $allowanceUsedPreviousPeriod): static { - if (is_null($accruePayCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($allowanceUsedPreviousPeriod)) { + throw new InvalidArgumentException('non-nullable allowanceUsedPreviousPeriod cannot be null'); } - $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; + $this->container['allowanceUsedPreviousPeriod'] = $allowanceUsedPreviousPeriod; return $this; } /** - * Gets maximumAccruePeriod + * Gets bereavementLeaveProRataRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getMaximumAccruePeriod(): ?float + public function getBereavementLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['maximumAccruePeriod']; + return $this->container['bereavementLeaveProRataRule']; } /** - * Sets maximumAccruePeriod + * Sets bereavementLeaveProRataRule * - * @param float|null $maximumAccruePeriod The maximum number of hours capable of being accrued in a single period + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $bereavementLeaveProRataRule bereavementLeaveProRataRule * * @return $this */ - public function setMaximumAccruePeriod(?float $maximumAccruePeriod): static + public function setBereavementLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $bereavementLeaveProRataRule): static { - if (is_null($maximumAccruePeriod)) { - array_push($this->openAPINullablesSetToNull, 'maximumAccruePeriod'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('maximumAccruePeriod', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($bereavementLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable bereavementLeaveProRataRule cannot be null'); } - $this->container['maximumAccruePeriod'] = $maximumAccruePeriod; + $this->container['bereavementLeaveProRataRule'] = $bereavementLeaveProRataRule; return $this; } @@ -1354,528 +1300,582 @@ public function setHolidayAccrualDefaultRateType(?\SynergiTech\Staffology\Model\ } /** - * Gets occupationalSicknessUniqueId + * Gets holidayLeaveProRataRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getOccupationalSicknessUniqueId(): ?string + public function getHolidayLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['occupationalSicknessUniqueId']; + return $this->container['holidayLeaveProRataRule']; } /** - * Sets occupationalSicknessUniqueId + * Sets holidayLeaveProRataRule * - * @param string|null $occupationalSicknessUniqueId occupationalSicknessUniqueId + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $holidayLeaveProRataRule holidayLeaveProRataRule * * @return $this */ - public function setOccupationalSicknessUniqueId(?string $occupationalSicknessUniqueId): static + public function setHolidayLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $holidayLeaveProRataRule): static { - if (is_null($occupationalSicknessUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'occupationalSicknessUniqueId'); + if (is_null($holidayLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable holidayLeaveProRataRule cannot be null'); + } + $this->container['holidayLeaveProRataRule'] = $holidayLeaveProRataRule; + + return $this; + } + + /** + * Gets holidayType + * + * @return \SynergiTech\Staffology\Model\HolidayType|null + */ + public function getHolidayType(): ?\SynergiTech\Staffology\Model\HolidayType + { + return $this->container['holidayType']; + } + + /** + * Sets holidayType + * + * @param \SynergiTech\Staffology\Model\HolidayType|null $holidayType holidayType + * + * @return $this + */ + public function setHolidayType(?\SynergiTech\Staffology\Model\HolidayType $holidayType): static + { + if (is_null($holidayType)) { + throw new InvalidArgumentException('non-nullable holidayType cannot be null'); + } + $this->container['holidayType'] = $holidayType; + + return $this; + } + + /** + * Gets maximumAccruePeriod + * + * @return float|null + */ + public function getMaximumAccruePeriod(): ?float + { + return $this->container['maximumAccruePeriod']; + } + + /** + * Sets maximumAccruePeriod + * + * @param float|null $maximumAccruePeriod The maximum number of hours capable of being accrued in a single period + * + * @return $this + */ + public function setMaximumAccruePeriod(?float $maximumAccruePeriod): static + { + if (is_null($maximumAccruePeriod)) { + array_push($this->openAPINullablesSetToNull, 'maximumAccruePeriod'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('occupationalSicknessUniqueId', $nullablesSetToNull); + $index = array_search('maximumAccruePeriod', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['occupationalSicknessUniqueId'] = $occupationalSicknessUniqueId; + $this->container['maximumAccruePeriod'] = $maximumAccruePeriod; return $this; } /** - * Gets accruedPaymentLiability + * Gets occupationalSicknessUniqueId * - * @return float|null + * @return string|null */ - public function getAccruedPaymentLiability(): ?float + public function getOccupationalSicknessUniqueId(): ?string { - return $this->container['accruedPaymentLiability']; + return $this->container['occupationalSicknessUniqueId']; } /** - * Sets accruedPaymentLiability + * Sets occupationalSicknessUniqueId * - * @param float|null $accruedPaymentLiability [readonly] The total accrued payments for this employee over the lifetime of their employment so far + * @param string|null $occupationalSicknessUniqueId occupationalSicknessUniqueId * * @return $this */ - public function setAccruedPaymentLiability(?float $accruedPaymentLiability): static + public function setOccupationalSicknessUniqueId(?string $occupationalSicknessUniqueId): static { - if (is_null($accruedPaymentLiability)) { - throw new InvalidArgumentException('non-nullable accruedPaymentLiability cannot be null'); + if (is_null($occupationalSicknessUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'occupationalSicknessUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('occupationalSicknessUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['accruedPaymentLiability'] = $accruedPaymentLiability; + $this->container['occupationalSicknessUniqueId'] = $occupationalSicknessUniqueId; return $this; } /** - * Gets accruedPaymentAdjustment + * Gets paidHoursAmountLastPeriod * * @return float|null */ - public function getAccruedPaymentAdjustment(): ?float + public function getPaidHoursAmountLastPeriod(): ?float { - return $this->container['accruedPaymentAdjustment']; + return $this->container['paidHoursAmountLastPeriod']; } /** - * Sets accruedPaymentAdjustment + * Sets paidHoursAmountLastPeriod * - * @param float|null $accruedPaymentAdjustment Any manual adjustment to the total accrued + * @param float|null $paidHoursAmountLastPeriod [readonly] The number of hours paid against the pay code * * @return $this */ - public function setAccruedPaymentAdjustment(?float $accruedPaymentAdjustment): static + public function setPaidHoursAmountLastPeriod(?float $paidHoursAmountLastPeriod): static { - if (is_null($accruedPaymentAdjustment)) { - throw new InvalidArgumentException('non-nullable accruedPaymentAdjustment cannot be null'); + if (is_null($paidHoursAmountLastPeriod)) { + throw new InvalidArgumentException('non-nullable paidHoursAmountLastPeriod cannot be null'); } - $this->container['accruedPaymentAdjustment'] = $accruedPaymentAdjustment; + $this->container['paidHoursAmountLastPeriod'] = $paidHoursAmountLastPeriod; return $this; } /** - * Gets accruedPaymentPaid + * Gets parentalLeaveProRataRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getAccruedPaymentPaid(): ?float + public function getParentalLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['accruedPaymentPaid']; + return $this->container['parentalLeaveProRataRule']; } /** - * Sets accruedPaymentPaid + * Sets parentalLeaveProRataRule * - * @param float|null $accruedPaymentPaid [readonly] The Total amount paid to this employee in lieu of holidays + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $parentalLeaveProRataRule parentalLeaveProRataRule * * @return $this */ - public function setAccruedPaymentPaid(?float $accruedPaymentPaid): static + public function setParentalLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $parentalLeaveProRataRule): static { - if (is_null($accruedPaymentPaid)) { - throw new InvalidArgumentException('non-nullable accruedPaymentPaid cannot be null'); + if (is_null($parentalLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable parentalLeaveProRataRule cannot be null'); } - $this->container['accruedPaymentPaid'] = $accruedPaymentPaid; + $this->container['parentalLeaveProRataRule'] = $parentalLeaveProRataRule; return $this; } /** - * Gets accruedPaymentBalance + * Gets showAhpOnPayslip * - * @return float|null + * @return bool|null */ - public function getAccruedPaymentBalance(): ?float + public function getShowAhpOnPayslip(): ?bool { - return $this->container['accruedPaymentBalance']; + return $this->container['showAhpOnPayslip']; } /** - * Sets accruedPaymentBalance + * Sets showAhpOnPayslip * - * @param float|null $accruedPaymentBalance [readonly] The balance of what is owed to this employee in lieu of holidays + * @param bool|null $showAhpOnPayslip If true then the AHP balance will be shown on the employees payslip. * * @return $this */ - public function setAccruedPaymentBalance(?float $accruedPaymentBalance): static + public function setShowAhpOnPayslip(?bool $showAhpOnPayslip): static { - if (is_null($accruedPaymentBalance)) { - throw new InvalidArgumentException('non-nullable accruedPaymentBalance cannot be null'); + if (is_null($showAhpOnPayslip)) { + throw new InvalidArgumentException('non-nullable showAhpOnPayslip cannot be null'); } - $this->container['accruedPaymentBalance'] = $accruedPaymentBalance; + $this->container['showAhpOnPayslip'] = $showAhpOnPayslip; return $this; } /** - * Gets accruedHoursAmount + * Gets showAllowanceOnPayslip * - * @return float|null + * @return bool|null */ - public function getAccruedHoursAmount(): ?float + public function getShowAllowanceOnPayslip(): ?bool { - return $this->container['accruedHoursAmount']; + return $this->container['showAllowanceOnPayslip']; } /** - * Sets accruedHoursAmount + * Sets showAllowanceOnPayslip * - * @param float|null $accruedHoursAmount [readonly] The total accrued hours for this employee over the lifetime of their employment so far + * @param bool|null $showAllowanceOnPayslip If true then the remaining Allowance will be shown on the employees payslip. * * @return $this */ - public function setAccruedHoursAmount(?float $accruedHoursAmount): static + public function setShowAllowanceOnPayslip(?bool $showAllowanceOnPayslip): static { - if (is_null($accruedHoursAmount)) { - throw new InvalidArgumentException('non-nullable accruedHoursAmount cannot be null'); + if (is_null($showAllowanceOnPayslip)) { + throw new InvalidArgumentException('non-nullable showAllowanceOnPayslip cannot be null'); } - $this->container['accruedHoursAmount'] = $accruedHoursAmount; + $this->container['showAllowanceOnPayslip'] = $showAllowanceOnPayslip; return $this; } /** - * Gets accruedHoursAdjustment + * Gets sickLeaveProRataRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getAccruedHoursAdjustment(): ?float + public function getSickLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['accruedHoursAdjustment']; + return $this->container['sickLeaveProRataRule']; } /** - * Sets accruedHoursAdjustment + * Sets sickLeaveProRataRule * - * @param float|null $accruedHoursAdjustment Any manual adjustment to the total hours accrued + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $sickLeaveProRataRule sickLeaveProRataRule * * @return $this */ - public function setAccruedHoursAdjustment(?float $accruedHoursAdjustment): static + public function setSickLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $sickLeaveProRataRule): static { - if (is_null($accruedHoursAdjustment)) { - throw new InvalidArgumentException('non-nullable accruedHoursAdjustment cannot be null'); + if (is_null($sickLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable sickLeaveProRataRule cannot be null'); } - $this->container['accruedHoursAdjustment'] = $accruedHoursAdjustment; + $this->container['sickLeaveProRataRule'] = $sickLeaveProRataRule; return $this; } /** - * Gets accruedHoursPaid + * Gets unauthorisedLeaveProRataRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getAccruedHoursPaid(): ?float + public function getUnauthorisedLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['accruedHoursPaid']; + return $this->container['unauthorisedLeaveProRataRule']; } /** - * Sets accruedHoursPaid + * Sets unauthorisedLeaveProRataRule * - * @param float|null $accruedHoursPaid [readonly] The Total amount of hours paid to this employee in lieu of holidays + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $unauthorisedLeaveProRataRule unauthorisedLeaveProRataRule * * @return $this */ - public function setAccruedHoursPaid(?float $accruedHoursPaid): static + public function setUnauthorisedLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $unauthorisedLeaveProRataRule): static { - if (is_null($accruedHoursPaid)) { - throw new InvalidArgumentException('non-nullable accruedHoursPaid cannot be null'); + if (is_null($unauthorisedLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable unauthorisedLeaveProRataRule cannot be null'); } - $this->container['accruedHoursPaid'] = $accruedHoursPaid; + $this->container['unauthorisedLeaveProRataRule'] = $unauthorisedLeaveProRataRule; return $this; } /** - * Gets accruedHoursAmountLastPeriod + * Gets useAggregatedServiceDate * - * @return float|null + * @return bool|null */ - public function getAccruedHoursAmountLastPeriod(): ?float + public function getUseAggregatedServiceDate(): ?bool { - return $this->container['accruedHoursAmountLastPeriod']; + return $this->container['useAggregatedServiceDate']; } /** - * Sets accruedHoursAmountLastPeriod + * Sets useAggregatedServiceDate * - * @param float|null $accruedHoursAmountLastPeriod [readonly] The total accrued hours for this employee in the last pay period + * @param bool|null $useAggregatedServiceDate useAggregatedServiceDate * * @return $this */ - public function setAccruedHoursAmountLastPeriod(?float $accruedHoursAmountLastPeriod): static + public function setUseAggregatedServiceDate(?bool $useAggregatedServiceDate): static { - if (is_null($accruedHoursAmountLastPeriod)) { - throw new InvalidArgumentException('non-nullable accruedHoursAmountLastPeriod cannot be null'); + if (is_null($useAggregatedServiceDate)) { + throw new InvalidArgumentException('non-nullable useAggregatedServiceDate cannot be null'); } - $this->container['accruedHoursAmountLastPeriod'] = $accruedHoursAmountLastPeriod; + $this->container['useAggregatedServiceDate'] = $useAggregatedServiceDate; return $this; } /** - * Gets paidHoursAmountLastPeriod + * Gets useDefaultAccrueHoursPerDay * - * @return float|null + * @return bool|null */ - public function getPaidHoursAmountLastPeriod(): ?float + public function getUseDefaultAccrueHoursPerDay(): ?bool { - return $this->container['paidHoursAmountLastPeriod']; + return $this->container['useDefaultAccrueHoursPerDay']; } /** - * Sets paidHoursAmountLastPeriod + * Sets useDefaultAccrueHoursPerDay * - * @param float|null $paidHoursAmountLastPeriod [readonly] The number of hours paid against the pay code + * @param bool|null $useDefaultAccrueHoursPerDay If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setPaidHoursAmountLastPeriod(?float $paidHoursAmountLastPeriod): static + public function setUseDefaultAccrueHoursPerDay(?bool $useDefaultAccrueHoursPerDay): static { - if (is_null($paidHoursAmountLastPeriod)) { - throw new InvalidArgumentException('non-nullable paidHoursAmountLastPeriod cannot be null'); + if (is_null($useDefaultAccrueHoursPerDay)) { + throw new InvalidArgumentException('non-nullable useDefaultAccrueHoursPerDay cannot be null'); } - $this->container['paidHoursAmountLastPeriod'] = $paidHoursAmountLastPeriod; + $this->container['useDefaultAccrueHoursPerDay'] = $useDefaultAccrueHoursPerDay; return $this; } /** - * Gets accruedHoursBalance + * Gets useDefaultAccruePaymentInLieu * - * @return float|null + * @return bool|null */ - public function getAccruedHoursBalance(): ?float + public function getUseDefaultAccruePaymentInLieu(): ?bool { - return $this->container['accruedHoursBalance']; + return $this->container['useDefaultAccruePaymentInLieu']; } /** - * Sets accruedHoursBalance + * Sets useDefaultAccruePaymentInLieu * - * @param float|null $accruedHoursBalance [readonly] The balance of hours owed to this employee in lieu of holidays + * @param bool|null $useDefaultAccruePaymentInLieu If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setAccruedHoursBalance(?float $accruedHoursBalance): static + public function setUseDefaultAccruePaymentInLieu(?bool $useDefaultAccruePaymentInLieu): static { - if (is_null($accruedHoursBalance)) { - throw new InvalidArgumentException('non-nullable accruedHoursBalance cannot be null'); + if (is_null($useDefaultAccruePaymentInLieu)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieu cannot be null'); } - $this->container['accruedHoursBalance'] = $accruedHoursBalance; + $this->container['useDefaultAccruePaymentInLieu'] = $useDefaultAccruePaymentInLieu; return $this; } /** - * Gets aggregatedServiceDate + * Gets useDefaultAccruePaymentInLieuPayAutomatically * - * @return \DateTime|null + * @return bool|null */ - public function getAggregatedServiceDate(): ?\DateTime + public function getUseDefaultAccruePaymentInLieuPayAutomatically(): ?bool { - return $this->container['aggregatedServiceDate']; + return $this->container['useDefaultAccruePaymentInLieuPayAutomatically']; } /** - * Sets aggregatedServiceDate + * Sets useDefaultAccruePaymentInLieuPayAutomatically * - * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate + * @param bool|null $useDefaultAccruePaymentInLieuPayAutomatically If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static + public function setUseDefaultAccruePaymentInLieuPayAutomatically(?bool $useDefaultAccruePaymentInLieuPayAutomatically): static { - if (is_null($aggregatedServiceDate)) { - array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aggregatedServiceDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useDefaultAccruePaymentInLieuPayAutomatically)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuPayAutomatically cannot be null'); } - $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; + $this->container['useDefaultAccruePaymentInLieuPayAutomatically'] = $useDefaultAccruePaymentInLieuPayAutomatically; return $this; } /** - * Gets useAggregatedServiceDate + * Gets useDefaultAccruePaymentInLieuRate * * @return bool|null */ - public function getUseAggregatedServiceDate(): ?bool + public function getUseDefaultAccruePaymentInLieuRate(): ?bool { - return $this->container['useAggregatedServiceDate']; + return $this->container['useDefaultAccruePaymentInLieuRate']; } /** - * Sets useAggregatedServiceDate + * Sets useDefaultAccruePaymentInLieuRate * - * @param bool|null $useAggregatedServiceDate useAggregatedServiceDate + * @param bool|null $useDefaultAccruePaymentInLieuRate If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setUseAggregatedServiceDate(?bool $useAggregatedServiceDate): static + public function setUseDefaultAccruePaymentInLieuRate(?bool $useDefaultAccruePaymentInLieuRate): static { - if (is_null($useAggregatedServiceDate)) { - throw new InvalidArgumentException('non-nullable useAggregatedServiceDate cannot be null'); + if (is_null($useDefaultAccruePaymentInLieuRate)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuRate cannot be null'); } - $this->container['useAggregatedServiceDate'] = $useAggregatedServiceDate; + $this->container['useDefaultAccruePaymentInLieuRate'] = $useDefaultAccruePaymentInLieuRate; return $this; } /** - * Gets useDefaultHolidayAccrualDefaultRateType + * Gets useDefaultAllowance * * @return bool|null */ - public function getUseDefaultHolidayAccrualDefaultRateType(): ?bool + public function getUseDefaultAllowance(): ?bool { - return $this->container['useDefaultHolidayAccrualDefaultRateType']; + return $this->container['useDefaultAllowance']; } /** - * Sets useDefaultHolidayAccrualDefaultRateType + * Sets useDefaultAllowance * - * @param bool|null $useDefaultHolidayAccrualDefaultRateType If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. + * @param bool|null $useDefaultAllowance If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) * * @return $this */ - public function setUseDefaultHolidayAccrualDefaultRateType(?bool $useDefaultHolidayAccrualDefaultRateType): static + public function setUseDefaultAllowance(?bool $useDefaultAllowance): static { - if (is_null($useDefaultHolidayAccrualDefaultRateType)) { - throw new InvalidArgumentException('non-nullable useDefaultHolidayAccrualDefaultRateType cannot be null'); + if (is_null($useDefaultAllowance)) { + throw new InvalidArgumentException('non-nullable useDefaultAllowance cannot be null'); } - $this->container['useDefaultHolidayAccrualDefaultRateType'] = $useDefaultHolidayAccrualDefaultRateType; + $this->container['useDefaultAllowance'] = $useDefaultAllowance; return $this; } /** - * Gets unauthorisedLeaveProRataRule + * Gets useDefaultAllowanceResetDate * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getUnauthorisedLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultAllowanceResetDate(): ?bool { - return $this->container['unauthorisedLeaveProRataRule']; + return $this->container['useDefaultAllowanceResetDate']; } /** - * Sets unauthorisedLeaveProRataRule + * Sets useDefaultAllowanceResetDate * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $unauthorisedLeaveProRataRule unauthorisedLeaveProRataRule + * @param bool|null $useDefaultAllowanceResetDate If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setUnauthorisedLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $unauthorisedLeaveProRataRule): static + public function setUseDefaultAllowanceResetDate(?bool $useDefaultAllowanceResetDate): static { - if (is_null($unauthorisedLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable unauthorisedLeaveProRataRule cannot be null'); + if (is_null($useDefaultAllowanceResetDate)) { + throw new InvalidArgumentException('non-nullable useDefaultAllowanceResetDate cannot be null'); } - $this->container['unauthorisedLeaveProRataRule'] = $unauthorisedLeaveProRataRule; + $this->container['useDefaultAllowanceResetDate'] = $useDefaultAllowanceResetDate; return $this; } /** - * Gets holidayLeaveProRataRule + * Gets useDefaultHolidayAccrualBasis * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getHolidayLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultHolidayAccrualBasis(): ?bool { - return $this->container['holidayLeaveProRataRule']; + return $this->container['useDefaultHolidayAccrualBasis']; } /** - * Sets holidayLeaveProRataRule + * Sets useDefaultHolidayAccrualBasis * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $holidayLeaveProRataRule holidayLeaveProRataRule + * @param bool|null $useDefaultHolidayAccrualBasis If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setHolidayLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $holidayLeaveProRataRule): static + public function setUseDefaultHolidayAccrualBasis(?bool $useDefaultHolidayAccrualBasis): static { - if (is_null($holidayLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable holidayLeaveProRataRule cannot be null'); + if (is_null($useDefaultHolidayAccrualBasis)) { + throw new InvalidArgumentException('non-nullable useDefaultHolidayAccrualBasis cannot be null'); } - $this->container['holidayLeaveProRataRule'] = $holidayLeaveProRataRule; + $this->container['useDefaultHolidayAccrualBasis'] = $useDefaultHolidayAccrualBasis; return $this; } /** - * Gets sickLeaveProRataRule + * Gets useDefaultHolidayAccrualDefaultRateType * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getSickLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultHolidayAccrualDefaultRateType(): ?bool { - return $this->container['sickLeaveProRataRule']; + return $this->container['useDefaultHolidayAccrualDefaultRateType']; } /** - * Sets sickLeaveProRataRule + * Sets useDefaultHolidayAccrualDefaultRateType * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $sickLeaveProRataRule sickLeaveProRataRule + * @param bool|null $useDefaultHolidayAccrualDefaultRateType If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. * * @return $this */ - public function setSickLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $sickLeaveProRataRule): static + public function setUseDefaultHolidayAccrualDefaultRateType(?bool $useDefaultHolidayAccrualDefaultRateType): static { - if (is_null($sickLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable sickLeaveProRataRule cannot be null'); + if (is_null($useDefaultHolidayAccrualDefaultRateType)) { + throw new InvalidArgumentException('non-nullable useDefaultHolidayAccrualDefaultRateType cannot be null'); } - $this->container['sickLeaveProRataRule'] = $sickLeaveProRataRule; + $this->container['useDefaultHolidayAccrualDefaultRateType'] = $useDefaultHolidayAccrualDefaultRateType; return $this; } /** - * Gets parentalLeaveProRataRule + * Gets useDefaultHolidayType * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getParentalLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultHolidayType(): ?bool { - return $this->container['parentalLeaveProRataRule']; + return $this->container['useDefaultHolidayType']; } /** - * Sets parentalLeaveProRataRule + * Sets useDefaultHolidayType * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $parentalLeaveProRataRule parentalLeaveProRataRule + * @param bool|null $useDefaultHolidayType If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setParentalLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $parentalLeaveProRataRule): static + public function setUseDefaultHolidayType(?bool $useDefaultHolidayType): static { - if (is_null($parentalLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable parentalLeaveProRataRule cannot be null'); + if (is_null($useDefaultHolidayType)) { + throw new InvalidArgumentException('non-nullable useDefaultHolidayType cannot be null'); } - $this->container['parentalLeaveProRataRule'] = $parentalLeaveProRataRule; + $this->container['useDefaultHolidayType'] = $useDefaultHolidayType; return $this; } /** - * Gets bereavementLeaveProRataRule + * Gets useDefaultMaximumAccruePeriod * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getBereavementLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultMaximumAccruePeriod(): ?bool { - return $this->container['bereavementLeaveProRataRule']; + return $this->container['useDefaultMaximumAccruePeriod']; } /** - * Sets bereavementLeaveProRataRule + * Sets useDefaultMaximumAccruePeriod * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $bereavementLeaveProRataRule bereavementLeaveProRataRule + * @param bool|null $useDefaultMaximumAccruePeriod If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setBereavementLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $bereavementLeaveProRataRule): static + public function setUseDefaultMaximumAccruePeriod(?bool $useDefaultMaximumAccruePeriod): static { - if (is_null($bereavementLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable bereavementLeaveProRataRule cannot be null'); + if (is_null($useDefaultMaximumAccruePeriod)) { + throw new InvalidArgumentException('non-nullable useDefaultMaximumAccruePeriod cannot be null'); } - $this->container['bereavementLeaveProRataRule'] = $bereavementLeaveProRataRule; + $this->container['useDefaultMaximumAccruePeriod'] = $useDefaultMaximumAccruePeriod; return $this; } diff --git a/src/Model/ContractEmployerRequest.php b/src/Model/ContractEmployerRequest.php index 8a442ef..0e3ef18 100644 --- a/src/Model/ContractEmployerRequest.php +++ b/src/Model/ContractEmployerRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,59 +59,61 @@ class ContractEmployerRequest implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ + 'accruePayCodeSetUniqueId' => 'string', 'address' => '\SynergiTech\Staffology\Model\ContractAddress', - 'bankDetails' => '\SynergiTech\Staffology\Model\ContractBankDetails', - 'defaultPayOptions' => '\SynergiTech\Staffology\Model\ContractPayOptionsRequest', - 'hmrcDetails' => '\SynergiTech\Staffology\Model\ContractHmrcDetailsRequest', - 'defaultPension' => '\SynergiTech\Staffology\Model\ContractPensionSelectionRequest', - 'rtiSubmissionSettings' => '\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsRequest', - 'leaveSettings' => '\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsRequest', - 'settings' => '\SynergiTech\Staffology\Model\ContractEmployerSettingsRequest', - 'umbrellaSettings' => '\SynergiTech\Staffology\Model\ContractUmbrellaSettingsRequest', - 'autoEnrolmentSettings' => '\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsRequest', - 'id' => 'string', - 'name' => 'string', - 'sourceSystemId' => 'string', - 'crn' => 'string', - 'logoUrl' => 'string', - 'logoSasUrl' => 'string', 'alternativeId' => 'string', - 'bankPaymentsCsvFormat' => '\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat', - 'bacsServiceUserNumber' => 'string', + 'archived' => 'bool', + 'autoEnrolmentSettings' => '\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsRequest', + 'backPayEnabled' => 'bool', 'bacsBureauNumber' => 'string', - 'rejectInvalidBankDetails' => 'bool', - 'bankPaymentsReferenceFormat' => 'string', 'bacsIncludeAEO' => 'bool', 'bacsIncludeDeductions' => 'bool', 'bacsIncludeHmrc' => 'bool', 'bacsIncludePensions' => 'bool', - 'useTenantRtiSubmissionSettings' => 'bool', - 'accruePayCodeSetUniqueId' => 'string', - 'employeeCount' => 'int', - 'subcontractorCount' => 'int', - 'startYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'currentYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'supportAccessEnabled' => 'bool', - 'archived' => 'bool', + 'bacsServiceUserNumber' => 'string', + 'bankDetails' => '\SynergiTech\Staffology\Model\ContractSharedBankDetails', + 'bankPaymentsCsvFormat' => '\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat', + 'bankPaymentsReferenceFormat' => 'string', + 'bereavementLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'betaFeatures' => '\SynergiTech\Staffology\Model\EmployerBetaFeatures', 'canUseBureauFeatures' => 'bool', - 'multiRoleEnabled' => 'bool', + 'costCentreJournalOverridesEnabled' => 'bool', + 'crn' => 'string', + 'currentYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'defaultPayOptions' => '\SynergiTech\Staffology\Model\ContractPayOptionsRequest', + 'defaultPension' => '\SynergiTech\Staffology\Model\ContractPensionSelectionRequest', + 'departmentJournalOverridesEnabled' => 'bool', + 'displayName' => 'string', 'educationPayrollEnabled' => 'bool', 'effectiveDateWorkingPatternsEnabled' => 'bool', - 'backPayEnabled' => 'bool', - 'displayName' => 'string', - 'isOptedInToEvc' => 'bool', + 'employeeCount' => 'int', 'evcId' => 'string', + 'hmrcDetails' => '\SynergiTech\Staffology\Model\ContractHmrcDetailsRequest', 'holidayAccrualBasis' => '\SynergiTech\Staffology\Model\HolidayAccrual', 'holidayAccrualDefaultRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', + 'holidayLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'id' => 'string', + 'isOptedInToEvc' => 'bool', + 'leaveSettings' => '\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsRequest', + 'logoSasUrl' => 'string', + 'logoUrl' => 'string', 'mfaEnabled' => 'bool', - 'departmentJournalOverridesEnabled' => 'bool', - 'costCentreJournalOverridesEnabled' => 'bool', + 'multiRoleEnabled' => 'bool', + 'name' => 'string', + 'parentalLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'rejectInvalidBankDetails' => 'bool', + 'rtiSubmissionSettings' => '\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsRequest', + 'settings' => '\SynergiTech\Staffology\Model\ContractEmployerSettingsRequest', 'settingsSortPayrollNumbersAlphanumerically' => 'bool', - 'unauthorisedLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', - 'holidayLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', 'sickLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', - 'parentalLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', - 'bereavementLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule' + 'sourceSystemId' => 'string', + 'startYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'subcontractorCount' => 'int', + 'supportAccessEnabled' => 'bool', + 'supportAccessExpires' => '\DateTime', + 'umbrellaSettings' => '\SynergiTech\Staffology\Model\ContractUmbrellaSettingsRequest', + 'unauthorisedLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'useTenantRtiSubmissionSettings' => 'bool' ]; /** @@ -120,59 +122,61 @@ class ContractEmployerRequest implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ + 'accruePayCodeSetUniqueId' => 'uuid', 'address' => null, - 'bankDetails' => null, - 'defaultPayOptions' => null, - 'hmrcDetails' => null, - 'defaultPension' => null, - 'rtiSubmissionSettings' => null, - 'leaveSettings' => null, - 'settings' => null, - 'umbrellaSettings' => null, - 'autoEnrolmentSettings' => null, - 'id' => 'uuid', - 'name' => null, - 'sourceSystemId' => null, - 'crn' => null, - 'logoUrl' => null, - 'logoSasUrl' => null, 'alternativeId' => null, - 'bankPaymentsCsvFormat' => null, - 'bacsServiceUserNumber' => null, + 'archived' => null, + 'autoEnrolmentSettings' => null, + 'backPayEnabled' => null, 'bacsBureauNumber' => null, - 'rejectInvalidBankDetails' => null, - 'bankPaymentsReferenceFormat' => null, 'bacsIncludeAEO' => null, 'bacsIncludeDeductions' => null, 'bacsIncludeHmrc' => null, 'bacsIncludePensions' => null, - 'useTenantRtiSubmissionSettings' => null, - 'accruePayCodeSetUniqueId' => 'uuid', - 'employeeCount' => 'int32', - 'subcontractorCount' => 'int32', - 'startYear' => null, - 'currentYear' => null, - 'supportAccessEnabled' => null, - 'archived' => null, + 'bacsServiceUserNumber' => null, + 'bankDetails' => null, + 'bankPaymentsCsvFormat' => null, + 'bankPaymentsReferenceFormat' => null, + 'bereavementLeaveProRataRule' => null, + 'betaFeatures' => null, 'canUseBureauFeatures' => null, - 'multiRoleEnabled' => null, + 'costCentreJournalOverridesEnabled' => null, + 'crn' => null, + 'currentYear' => null, + 'defaultPayOptions' => null, + 'defaultPension' => null, + 'departmentJournalOverridesEnabled' => null, + 'displayName' => null, 'educationPayrollEnabled' => null, 'effectiveDateWorkingPatternsEnabled' => null, - 'backPayEnabled' => null, - 'displayName' => null, - 'isOptedInToEvc' => null, + 'employeeCount' => 'int32', 'evcId' => 'uuid', + 'hmrcDetails' => null, 'holidayAccrualBasis' => null, 'holidayAccrualDefaultRateType' => null, + 'holidayLeaveProRataRule' => null, + 'id' => 'uuid', + 'isOptedInToEvc' => null, + 'leaveSettings' => null, + 'logoSasUrl' => null, + 'logoUrl' => null, 'mfaEnabled' => null, - 'departmentJournalOverridesEnabled' => null, - 'costCentreJournalOverridesEnabled' => null, + 'multiRoleEnabled' => null, + 'name' => null, + 'parentalLeaveProRataRule' => null, + 'rejectInvalidBankDetails' => null, + 'rtiSubmissionSettings' => null, + 'settings' => null, 'settingsSortPayrollNumbersAlphanumerically' => null, - 'unauthorisedLeaveProRataRule' => null, - 'holidayLeaveProRataRule' => null, 'sickLeaveProRataRule' => null, - 'parentalLeaveProRataRule' => null, - 'bereavementLeaveProRataRule' => null + 'sourceSystemId' => null, + 'startYear' => null, + 'subcontractorCount' => 'int32', + 'supportAccessEnabled' => null, + 'supportAccessExpires' => 'date', + 'umbrellaSettings' => null, + 'unauthorisedLeaveProRataRule' => null, + 'useTenantRtiSubmissionSettings' => null ]; /** @@ -181,59 +185,61 @@ class ContractEmployerRequest implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ + 'accruePayCodeSetUniqueId' => true, 'address' => false, - 'bankDetails' => false, - 'defaultPayOptions' => false, - 'hmrcDetails' => false, - 'defaultPension' => false, - 'rtiSubmissionSettings' => false, - 'leaveSettings' => false, - 'settings' => false, - 'umbrellaSettings' => false, - 'autoEnrolmentSettings' => false, - 'id' => false, - 'name' => true, - 'sourceSystemId' => true, - 'crn' => true, - 'logoUrl' => true, - 'logoSasUrl' => true, 'alternativeId' => true, - 'bankPaymentsCsvFormat' => false, - 'bacsServiceUserNumber' => true, + 'archived' => false, + 'autoEnrolmentSettings' => false, + 'backPayEnabled' => false, 'bacsBureauNumber' => true, - 'rejectInvalidBankDetails' => false, - 'bankPaymentsReferenceFormat' => true, 'bacsIncludeAEO' => false, 'bacsIncludeDeductions' => false, 'bacsIncludeHmrc' => false, 'bacsIncludePensions' => false, - 'useTenantRtiSubmissionSettings' => false, - 'accruePayCodeSetUniqueId' => true, - 'employeeCount' => false, - 'subcontractorCount' => false, - 'startYear' => false, - 'currentYear' => false, - 'supportAccessEnabled' => false, - 'archived' => false, + 'bacsServiceUserNumber' => true, + 'bankDetails' => false, + 'bankPaymentsCsvFormat' => false, + 'bankPaymentsReferenceFormat' => true, + 'bereavementLeaveProRataRule' => false, + 'betaFeatures' => false, 'canUseBureauFeatures' => false, - 'multiRoleEnabled' => false, + 'costCentreJournalOverridesEnabled' => false, + 'crn' => true, + 'currentYear' => false, + 'defaultPayOptions' => false, + 'defaultPension' => false, + 'departmentJournalOverridesEnabled' => false, + 'displayName' => true, 'educationPayrollEnabled' => false, 'effectiveDateWorkingPatternsEnabled' => false, - 'backPayEnabled' => false, - 'displayName' => true, - 'isOptedInToEvc' => false, + 'employeeCount' => false, 'evcId' => true, + 'hmrcDetails' => false, 'holidayAccrualBasis' => false, 'holidayAccrualDefaultRateType' => false, + 'holidayLeaveProRataRule' => false, + 'id' => false, + 'isOptedInToEvc' => false, + 'leaveSettings' => false, + 'logoSasUrl' => true, + 'logoUrl' => true, 'mfaEnabled' => false, - 'departmentJournalOverridesEnabled' => false, - 'costCentreJournalOverridesEnabled' => false, + 'multiRoleEnabled' => false, + 'name' => true, + 'parentalLeaveProRataRule' => false, + 'rejectInvalidBankDetails' => false, + 'rtiSubmissionSettings' => false, + 'settings' => false, 'settingsSortPayrollNumbersAlphanumerically' => false, - 'unauthorisedLeaveProRataRule' => false, - 'holidayLeaveProRataRule' => false, 'sickLeaveProRataRule' => false, - 'parentalLeaveProRataRule' => false, - 'bereavementLeaveProRataRule' => false + 'sourceSystemId' => true, + 'startYear' => false, + 'subcontractorCount' => false, + 'supportAccessEnabled' => false, + 'supportAccessExpires' => true, + 'umbrellaSettings' => false, + 'unauthorisedLeaveProRataRule' => false, + 'useTenantRtiSubmissionSettings' => false ]; /** @@ -322,59 +328,61 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', 'address' => 'address', - 'bankDetails' => 'bankDetails', - 'defaultPayOptions' => 'defaultPayOptions', - 'hmrcDetails' => 'hmrcDetails', - 'defaultPension' => 'defaultPension', - 'rtiSubmissionSettings' => 'rtiSubmissionSettings', - 'leaveSettings' => 'leaveSettings', - 'settings' => 'settings', - 'umbrellaSettings' => 'umbrellaSettings', - 'autoEnrolmentSettings' => 'autoEnrolmentSettings', - 'id' => 'id', - 'name' => 'name', - 'sourceSystemId' => 'sourceSystemId', - 'crn' => 'crn', - 'logoUrl' => 'logoUrl', - 'logoSasUrl' => 'logoSasUrl', 'alternativeId' => 'alternativeId', - 'bankPaymentsCsvFormat' => 'bankPaymentsCsvFormat', - 'bacsServiceUserNumber' => 'bacsServiceUserNumber', + 'archived' => 'archived', + 'autoEnrolmentSettings' => 'autoEnrolmentSettings', + 'backPayEnabled' => 'backPayEnabled', 'bacsBureauNumber' => 'bacsBureauNumber', - 'rejectInvalidBankDetails' => 'rejectInvalidBankDetails', - 'bankPaymentsReferenceFormat' => 'bankPaymentsReferenceFormat', 'bacsIncludeAEO' => 'bacsIncludeAEO', 'bacsIncludeDeductions' => 'bacsIncludeDeductions', 'bacsIncludeHmrc' => 'bacsIncludeHmrc', 'bacsIncludePensions' => 'bacsIncludePensions', - 'useTenantRtiSubmissionSettings' => 'useTenantRtiSubmissionSettings', - 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', - 'employeeCount' => 'employeeCount', - 'subcontractorCount' => 'subcontractorCount', - 'startYear' => 'startYear', - 'currentYear' => 'currentYear', - 'supportAccessEnabled' => 'supportAccessEnabled', - 'archived' => 'archived', + 'bacsServiceUserNumber' => 'bacsServiceUserNumber', + 'bankDetails' => 'bankDetails', + 'bankPaymentsCsvFormat' => 'bankPaymentsCsvFormat', + 'bankPaymentsReferenceFormat' => 'bankPaymentsReferenceFormat', + 'bereavementLeaveProRataRule' => 'bereavementLeaveProRataRule', + 'betaFeatures' => 'betaFeatures', 'canUseBureauFeatures' => 'canUseBureauFeatures', - 'multiRoleEnabled' => 'multiRoleEnabled', + 'costCentreJournalOverridesEnabled' => 'costCentreJournalOverridesEnabled', + 'crn' => 'crn', + 'currentYear' => 'currentYear', + 'defaultPayOptions' => 'defaultPayOptions', + 'defaultPension' => 'defaultPension', + 'departmentJournalOverridesEnabled' => 'departmentJournalOverridesEnabled', + 'displayName' => 'displayName', 'educationPayrollEnabled' => 'educationPayrollEnabled', 'effectiveDateWorkingPatternsEnabled' => 'effectiveDateWorkingPatternsEnabled', - 'backPayEnabled' => 'backPayEnabled', - 'displayName' => 'displayName', - 'isOptedInToEvc' => 'isOptedInToEvc', + 'employeeCount' => 'employeeCount', 'evcId' => 'evcId', + 'hmrcDetails' => 'hmrcDetails', 'holidayAccrualBasis' => 'holidayAccrualBasis', 'holidayAccrualDefaultRateType' => 'holidayAccrualDefaultRateType', + 'holidayLeaveProRataRule' => 'holidayLeaveProRataRule', + 'id' => 'id', + 'isOptedInToEvc' => 'isOptedInToEvc', + 'leaveSettings' => 'leaveSettings', + 'logoSasUrl' => 'logoSasUrl', + 'logoUrl' => 'logoUrl', 'mfaEnabled' => 'mfaEnabled', - 'departmentJournalOverridesEnabled' => 'departmentJournalOverridesEnabled', - 'costCentreJournalOverridesEnabled' => 'costCentreJournalOverridesEnabled', + 'multiRoleEnabled' => 'multiRoleEnabled', + 'name' => 'name', + 'parentalLeaveProRataRule' => 'parentalLeaveProRataRule', + 'rejectInvalidBankDetails' => 'rejectInvalidBankDetails', + 'rtiSubmissionSettings' => 'rtiSubmissionSettings', + 'settings' => 'settings', 'settingsSortPayrollNumbersAlphanumerically' => 'settingsSortPayrollNumbersAlphanumerically', - 'unauthorisedLeaveProRataRule' => 'unauthorisedLeaveProRataRule', - 'holidayLeaveProRataRule' => 'holidayLeaveProRataRule', 'sickLeaveProRataRule' => 'sickLeaveProRataRule', - 'parentalLeaveProRataRule' => 'parentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'bereavementLeaveProRataRule' + 'sourceSystemId' => 'sourceSystemId', + 'startYear' => 'startYear', + 'subcontractorCount' => 'subcontractorCount', + 'supportAccessEnabled' => 'supportAccessEnabled', + 'supportAccessExpires' => 'supportAccessExpires', + 'umbrellaSettings' => 'umbrellaSettings', + 'unauthorisedLeaveProRataRule' => 'unauthorisedLeaveProRataRule', + 'useTenantRtiSubmissionSettings' => 'useTenantRtiSubmissionSettings' ]; /** @@ -383,59 +391,61 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', 'address' => 'setAddress', - 'bankDetails' => 'setBankDetails', - 'defaultPayOptions' => 'setDefaultPayOptions', - 'hmrcDetails' => 'setHmrcDetails', - 'defaultPension' => 'setDefaultPension', - 'rtiSubmissionSettings' => 'setRtiSubmissionSettings', - 'leaveSettings' => 'setLeaveSettings', - 'settings' => 'setSettings', - 'umbrellaSettings' => 'setUmbrellaSettings', - 'autoEnrolmentSettings' => 'setAutoEnrolmentSettings', - 'id' => 'setId', - 'name' => 'setName', - 'sourceSystemId' => 'setSourceSystemId', - 'crn' => 'setCrn', - 'logoUrl' => 'setLogoUrl', - 'logoSasUrl' => 'setLogoSasUrl', 'alternativeId' => 'setAlternativeId', - 'bankPaymentsCsvFormat' => 'setBankPaymentsCsvFormat', - 'bacsServiceUserNumber' => 'setBacsServiceUserNumber', + 'archived' => 'setArchived', + 'autoEnrolmentSettings' => 'setAutoEnrolmentSettings', + 'backPayEnabled' => 'setBackPayEnabled', 'bacsBureauNumber' => 'setBacsBureauNumber', - 'rejectInvalidBankDetails' => 'setRejectInvalidBankDetails', - 'bankPaymentsReferenceFormat' => 'setBankPaymentsReferenceFormat', 'bacsIncludeAEO' => 'setBacsIncludeAEO', 'bacsIncludeDeductions' => 'setBacsIncludeDeductions', 'bacsIncludeHmrc' => 'setBacsIncludeHmrc', 'bacsIncludePensions' => 'setBacsIncludePensions', - 'useTenantRtiSubmissionSettings' => 'setUseTenantRtiSubmissionSettings', - 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', - 'employeeCount' => 'setEmployeeCount', - 'subcontractorCount' => 'setSubcontractorCount', - 'startYear' => 'setStartYear', - 'currentYear' => 'setCurrentYear', - 'supportAccessEnabled' => 'setSupportAccessEnabled', - 'archived' => 'setArchived', + 'bacsServiceUserNumber' => 'setBacsServiceUserNumber', + 'bankDetails' => 'setBankDetails', + 'bankPaymentsCsvFormat' => 'setBankPaymentsCsvFormat', + 'bankPaymentsReferenceFormat' => 'setBankPaymentsReferenceFormat', + 'bereavementLeaveProRataRule' => 'setBereavementLeaveProRataRule', + 'betaFeatures' => 'setBetaFeatures', 'canUseBureauFeatures' => 'setCanUseBureauFeatures', - 'multiRoleEnabled' => 'setMultiRoleEnabled', + 'costCentreJournalOverridesEnabled' => 'setCostCentreJournalOverridesEnabled', + 'crn' => 'setCrn', + 'currentYear' => 'setCurrentYear', + 'defaultPayOptions' => 'setDefaultPayOptions', + 'defaultPension' => 'setDefaultPension', + 'departmentJournalOverridesEnabled' => 'setDepartmentJournalOverridesEnabled', + 'displayName' => 'setDisplayName', 'educationPayrollEnabled' => 'setEducationPayrollEnabled', 'effectiveDateWorkingPatternsEnabled' => 'setEffectiveDateWorkingPatternsEnabled', - 'backPayEnabled' => 'setBackPayEnabled', - 'displayName' => 'setDisplayName', - 'isOptedInToEvc' => 'setIsOptedInToEvc', + 'employeeCount' => 'setEmployeeCount', 'evcId' => 'setEvcId', + 'hmrcDetails' => 'setHmrcDetails', 'holidayAccrualBasis' => 'setHolidayAccrualBasis', 'holidayAccrualDefaultRateType' => 'setHolidayAccrualDefaultRateType', + 'holidayLeaveProRataRule' => 'setHolidayLeaveProRataRule', + 'id' => 'setId', + 'isOptedInToEvc' => 'setIsOptedInToEvc', + 'leaveSettings' => 'setLeaveSettings', + 'logoSasUrl' => 'setLogoSasUrl', + 'logoUrl' => 'setLogoUrl', 'mfaEnabled' => 'setMfaEnabled', - 'departmentJournalOverridesEnabled' => 'setDepartmentJournalOverridesEnabled', - 'costCentreJournalOverridesEnabled' => 'setCostCentreJournalOverridesEnabled', + 'multiRoleEnabled' => 'setMultiRoleEnabled', + 'name' => 'setName', + 'parentalLeaveProRataRule' => 'setParentalLeaveProRataRule', + 'rejectInvalidBankDetails' => 'setRejectInvalidBankDetails', + 'rtiSubmissionSettings' => 'setRtiSubmissionSettings', + 'settings' => 'setSettings', 'settingsSortPayrollNumbersAlphanumerically' => 'setSettingsSortPayrollNumbersAlphanumerically', - 'unauthorisedLeaveProRataRule' => 'setUnauthorisedLeaveProRataRule', - 'holidayLeaveProRataRule' => 'setHolidayLeaveProRataRule', 'sickLeaveProRataRule' => 'setSickLeaveProRataRule', - 'parentalLeaveProRataRule' => 'setParentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'setBereavementLeaveProRataRule' + 'sourceSystemId' => 'setSourceSystemId', + 'startYear' => 'setStartYear', + 'subcontractorCount' => 'setSubcontractorCount', + 'supportAccessEnabled' => 'setSupportAccessEnabled', + 'supportAccessExpires' => 'setSupportAccessExpires', + 'umbrellaSettings' => 'setUmbrellaSettings', + 'unauthorisedLeaveProRataRule' => 'setUnauthorisedLeaveProRataRule', + 'useTenantRtiSubmissionSettings' => 'setUseTenantRtiSubmissionSettings' ]; /** @@ -444,59 +454,61 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', 'address' => 'getAddress', - 'bankDetails' => 'getBankDetails', - 'defaultPayOptions' => 'getDefaultPayOptions', - 'hmrcDetails' => 'getHmrcDetails', - 'defaultPension' => 'getDefaultPension', - 'rtiSubmissionSettings' => 'getRtiSubmissionSettings', - 'leaveSettings' => 'getLeaveSettings', - 'settings' => 'getSettings', - 'umbrellaSettings' => 'getUmbrellaSettings', - 'autoEnrolmentSettings' => 'getAutoEnrolmentSettings', - 'id' => 'getId', - 'name' => 'getName', - 'sourceSystemId' => 'getSourceSystemId', - 'crn' => 'getCrn', - 'logoUrl' => 'getLogoUrl', - 'logoSasUrl' => 'getLogoSasUrl', 'alternativeId' => 'getAlternativeId', - 'bankPaymentsCsvFormat' => 'getBankPaymentsCsvFormat', - 'bacsServiceUserNumber' => 'getBacsServiceUserNumber', + 'archived' => 'getArchived', + 'autoEnrolmentSettings' => 'getAutoEnrolmentSettings', + 'backPayEnabled' => 'getBackPayEnabled', 'bacsBureauNumber' => 'getBacsBureauNumber', - 'rejectInvalidBankDetails' => 'getRejectInvalidBankDetails', - 'bankPaymentsReferenceFormat' => 'getBankPaymentsReferenceFormat', 'bacsIncludeAEO' => 'getBacsIncludeAEO', 'bacsIncludeDeductions' => 'getBacsIncludeDeductions', 'bacsIncludeHmrc' => 'getBacsIncludeHmrc', 'bacsIncludePensions' => 'getBacsIncludePensions', - 'useTenantRtiSubmissionSettings' => 'getUseTenantRtiSubmissionSettings', - 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', - 'employeeCount' => 'getEmployeeCount', - 'subcontractorCount' => 'getSubcontractorCount', - 'startYear' => 'getStartYear', - 'currentYear' => 'getCurrentYear', - 'supportAccessEnabled' => 'getSupportAccessEnabled', - 'archived' => 'getArchived', + 'bacsServiceUserNumber' => 'getBacsServiceUserNumber', + 'bankDetails' => 'getBankDetails', + 'bankPaymentsCsvFormat' => 'getBankPaymentsCsvFormat', + 'bankPaymentsReferenceFormat' => 'getBankPaymentsReferenceFormat', + 'bereavementLeaveProRataRule' => 'getBereavementLeaveProRataRule', + 'betaFeatures' => 'getBetaFeatures', 'canUseBureauFeatures' => 'getCanUseBureauFeatures', - 'multiRoleEnabled' => 'getMultiRoleEnabled', + 'costCentreJournalOverridesEnabled' => 'getCostCentreJournalOverridesEnabled', + 'crn' => 'getCrn', + 'currentYear' => 'getCurrentYear', + 'defaultPayOptions' => 'getDefaultPayOptions', + 'defaultPension' => 'getDefaultPension', + 'departmentJournalOverridesEnabled' => 'getDepartmentJournalOverridesEnabled', + 'displayName' => 'getDisplayName', 'educationPayrollEnabled' => 'getEducationPayrollEnabled', 'effectiveDateWorkingPatternsEnabled' => 'getEffectiveDateWorkingPatternsEnabled', - 'backPayEnabled' => 'getBackPayEnabled', - 'displayName' => 'getDisplayName', - 'isOptedInToEvc' => 'getIsOptedInToEvc', + 'employeeCount' => 'getEmployeeCount', 'evcId' => 'getEvcId', + 'hmrcDetails' => 'getHmrcDetails', 'holidayAccrualBasis' => 'getHolidayAccrualBasis', 'holidayAccrualDefaultRateType' => 'getHolidayAccrualDefaultRateType', + 'holidayLeaveProRataRule' => 'getHolidayLeaveProRataRule', + 'id' => 'getId', + 'isOptedInToEvc' => 'getIsOptedInToEvc', + 'leaveSettings' => 'getLeaveSettings', + 'logoSasUrl' => 'getLogoSasUrl', + 'logoUrl' => 'getLogoUrl', 'mfaEnabled' => 'getMfaEnabled', - 'departmentJournalOverridesEnabled' => 'getDepartmentJournalOverridesEnabled', - 'costCentreJournalOverridesEnabled' => 'getCostCentreJournalOverridesEnabled', + 'multiRoleEnabled' => 'getMultiRoleEnabled', + 'name' => 'getName', + 'parentalLeaveProRataRule' => 'getParentalLeaveProRataRule', + 'rejectInvalidBankDetails' => 'getRejectInvalidBankDetails', + 'rtiSubmissionSettings' => 'getRtiSubmissionSettings', + 'settings' => 'getSettings', 'settingsSortPayrollNumbersAlphanumerically' => 'getSettingsSortPayrollNumbersAlphanumerically', - 'unauthorisedLeaveProRataRule' => 'getUnauthorisedLeaveProRataRule', - 'holidayLeaveProRataRule' => 'getHolidayLeaveProRataRule', 'sickLeaveProRataRule' => 'getSickLeaveProRataRule', - 'parentalLeaveProRataRule' => 'getParentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'getBereavementLeaveProRataRule' + 'sourceSystemId' => 'getSourceSystemId', + 'startYear' => 'getStartYear', + 'subcontractorCount' => 'getSubcontractorCount', + 'supportAccessEnabled' => 'getSupportAccessEnabled', + 'supportAccessExpires' => 'getSupportAccessExpires', + 'umbrellaSettings' => 'getUmbrellaSettings', + 'unauthorisedLeaveProRataRule' => 'getUnauthorisedLeaveProRataRule', + 'useTenantRtiSubmissionSettings' => 'getUseTenantRtiSubmissionSettings' ]; /** @@ -555,59 +567,61 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); $this->setIfExists('address', $data ?? [], null); - $this->setIfExists('bankDetails', $data ?? [], null); - $this->setIfExists('defaultPayOptions', $data ?? [], null); - $this->setIfExists('hmrcDetails', $data ?? [], null); - $this->setIfExists('defaultPension', $data ?? [], null); - $this->setIfExists('rtiSubmissionSettings', $data ?? [], null); - $this->setIfExists('leaveSettings', $data ?? [], null); - $this->setIfExists('settings', $data ?? [], null); - $this->setIfExists('umbrellaSettings', $data ?? [], null); - $this->setIfExists('autoEnrolmentSettings', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('sourceSystemId', $data ?? [], null); - $this->setIfExists('crn', $data ?? [], null); - $this->setIfExists('logoUrl', $data ?? [], null); - $this->setIfExists('logoSasUrl', $data ?? [], null); $this->setIfExists('alternativeId', $data ?? [], null); - $this->setIfExists('bankPaymentsCsvFormat', $data ?? [], null); - $this->setIfExists('bacsServiceUserNumber', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('autoEnrolmentSettings', $data ?? [], null); + $this->setIfExists('backPayEnabled', $data ?? [], null); $this->setIfExists('bacsBureauNumber', $data ?? [], null); - $this->setIfExists('rejectInvalidBankDetails', $data ?? [], null); - $this->setIfExists('bankPaymentsReferenceFormat', $data ?? [], null); $this->setIfExists('bacsIncludeAEO', $data ?? [], null); $this->setIfExists('bacsIncludeDeductions', $data ?? [], null); $this->setIfExists('bacsIncludeHmrc', $data ?? [], null); $this->setIfExists('bacsIncludePensions', $data ?? [], null); - $this->setIfExists('useTenantRtiSubmissionSettings', $data ?? [], null); - $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); - $this->setIfExists('employeeCount', $data ?? [], null); - $this->setIfExists('subcontractorCount', $data ?? [], null); - $this->setIfExists('startYear', $data ?? [], null); - $this->setIfExists('currentYear', $data ?? [], null); - $this->setIfExists('supportAccessEnabled', $data ?? [], null); - $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('bacsServiceUserNumber', $data ?? [], null); + $this->setIfExists('bankDetails', $data ?? [], null); + $this->setIfExists('bankPaymentsCsvFormat', $data ?? [], null); + $this->setIfExists('bankPaymentsReferenceFormat', $data ?? [], null); + $this->setIfExists('bereavementLeaveProRataRule', $data ?? [], null); + $this->setIfExists('betaFeatures', $data ?? [], null); $this->setIfExists('canUseBureauFeatures', $data ?? [], null); - $this->setIfExists('multiRoleEnabled', $data ?? [], null); + $this->setIfExists('costCentreJournalOverridesEnabled', $data ?? [], null); + $this->setIfExists('crn', $data ?? [], null); + $this->setIfExists('currentYear', $data ?? [], null); + $this->setIfExists('defaultPayOptions', $data ?? [], null); + $this->setIfExists('defaultPension', $data ?? [], null); + $this->setIfExists('departmentJournalOverridesEnabled', $data ?? [], null); + $this->setIfExists('displayName', $data ?? [], null); $this->setIfExists('educationPayrollEnabled', $data ?? [], null); $this->setIfExists('effectiveDateWorkingPatternsEnabled', $data ?? [], null); - $this->setIfExists('backPayEnabled', $data ?? [], null); - $this->setIfExists('displayName', $data ?? [], null); - $this->setIfExists('isOptedInToEvc', $data ?? [], null); + $this->setIfExists('employeeCount', $data ?? [], null); $this->setIfExists('evcId', $data ?? [], null); + $this->setIfExists('hmrcDetails', $data ?? [], null); $this->setIfExists('holidayAccrualBasis', $data ?? [], null); $this->setIfExists('holidayAccrualDefaultRateType', $data ?? [], null); + $this->setIfExists('holidayLeaveProRataRule', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isOptedInToEvc', $data ?? [], null); + $this->setIfExists('leaveSettings', $data ?? [], null); + $this->setIfExists('logoSasUrl', $data ?? [], null); + $this->setIfExists('logoUrl', $data ?? [], null); $this->setIfExists('mfaEnabled', $data ?? [], null); - $this->setIfExists('departmentJournalOverridesEnabled', $data ?? [], null); - $this->setIfExists('costCentreJournalOverridesEnabled', $data ?? [], null); + $this->setIfExists('multiRoleEnabled', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('parentalLeaveProRataRule', $data ?? [], null); + $this->setIfExists('rejectInvalidBankDetails', $data ?? [], null); + $this->setIfExists('rtiSubmissionSettings', $data ?? [], null); + $this->setIfExists('settings', $data ?? [], null); $this->setIfExists('settingsSortPayrollNumbersAlphanumerically', $data ?? [], null); - $this->setIfExists('unauthorisedLeaveProRataRule', $data ?? [], null); - $this->setIfExists('holidayLeaveProRataRule', $data ?? [], null); $this->setIfExists('sickLeaveProRataRule', $data ?? [], null); - $this->setIfExists('parentalLeaveProRataRule', $data ?? [], null); - $this->setIfExists('bereavementLeaveProRataRule', $data ?? [], null); + $this->setIfExists('sourceSystemId', $data ?? [], null); + $this->setIfExists('startYear', $data ?? [], null); + $this->setIfExists('subcontractorCount', $data ?? [], null); + $this->setIfExists('supportAccessEnabled', $data ?? [], null); + $this->setIfExists('supportAccessExpires', $data ?? [], null); + $this->setIfExists('umbrellaSettings', $data ?? [], null); + $this->setIfExists('unauthorisedLeaveProRataRule', $data ?? [], null); + $this->setIfExists('useTenantRtiSubmissionSettings', $data ?? [], null); } /** @@ -652,6 +666,40 @@ public function valid(): bool } + /** + * Gets accruePayCodeSetUniqueId + * + * @return string|null + */ + public function getAccruePayCodeSetUniqueId(): ?string + { + return $this->container['accruePayCodeSetUniqueId']; + } + + /** + * Sets accruePayCodeSetUniqueId + * + * @param string|null $accruePayCodeSetUniqueId accruePayCodeSetUniqueId + * + * @return $this + */ + public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static + { + if (is_null($accruePayCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; + + return $this; + } + /** * Gets address * @@ -680,1489 +728,1518 @@ public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $addre } /** - * Gets bankDetails + * Gets alternativeId * - * @return \SynergiTech\Staffology\Model\ContractBankDetails|null + * @return string|null */ - public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractBankDetails + public function getAlternativeId(): ?string { - return $this->container['bankDetails']; + return $this->container['alternativeId']; } /** - * Sets bankDetails + * Sets alternativeId * - * @param \SynergiTech\Staffology\Model\ContractBankDetails|null $bankDetails bankDetails + * @param string|null $alternativeId alternativeId * * @return $this */ - public function setBankDetails(?\SynergiTech\Staffology\Model\ContractBankDetails $bankDetails): static + public function setAlternativeId(?string $alternativeId): static { - if (is_null($bankDetails)) { - throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); + if (is_null($alternativeId)) { + array_push($this->openAPINullablesSetToNull, 'alternativeId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('alternativeId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['bankDetails'] = $bankDetails; + $this->container['alternativeId'] = $alternativeId; return $this; } /** - * Gets defaultPayOptions + * Gets archived * - * @return \SynergiTech\Staffology\Model\ContractPayOptionsRequest|null + * @return bool|null */ - public function getDefaultPayOptions(): ?\SynergiTech\Staffology\Model\ContractPayOptionsRequest + public function getArchived(): ?bool { - return $this->container['defaultPayOptions']; + return $this->container['archived']; } /** - * Sets defaultPayOptions + * Sets archived * - * @param \SynergiTech\Staffology\Model\ContractPayOptionsRequest|null $defaultPayOptions defaultPayOptions + * @param bool|null $archived A flag to indicate whather or not the employer is Archived, ie no longer actively used * * @return $this */ - public function setDefaultPayOptions(?\SynergiTech\Staffology\Model\ContractPayOptionsRequest $defaultPayOptions): static + public function setArchived(?bool $archived): static { - if (is_null($defaultPayOptions)) { - throw new InvalidArgumentException('non-nullable defaultPayOptions cannot be null'); + if (is_null($archived)) { + throw new InvalidArgumentException('non-nullable archived cannot be null'); } - $this->container['defaultPayOptions'] = $defaultPayOptions; + $this->container['archived'] = $archived; return $this; } /** - * Gets hmrcDetails + * Gets autoEnrolmentSettings * - * @return \SynergiTech\Staffology\Model\ContractHmrcDetailsRequest|null + * @return \SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsRequest|null */ - public function getHmrcDetails(): ?\SynergiTech\Staffology\Model\ContractHmrcDetailsRequest + public function getAutoEnrolmentSettings(): ?\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsRequest { - return $this->container['hmrcDetails']; + return $this->container['autoEnrolmentSettings']; } /** - * Sets hmrcDetails + * Sets autoEnrolmentSettings * - * @param \SynergiTech\Staffology\Model\ContractHmrcDetailsRequest|null $hmrcDetails hmrcDetails + * @param \SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsRequest|null $autoEnrolmentSettings autoEnrolmentSettings * * @return $this */ - public function setHmrcDetails(?\SynergiTech\Staffology\Model\ContractHmrcDetailsRequest $hmrcDetails): static + public function setAutoEnrolmentSettings(?\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsRequest $autoEnrolmentSettings): static { - if (is_null($hmrcDetails)) { - throw new InvalidArgumentException('non-nullable hmrcDetails cannot be null'); + if (is_null($autoEnrolmentSettings)) { + throw new InvalidArgumentException('non-nullable autoEnrolmentSettings cannot be null'); } - $this->container['hmrcDetails'] = $hmrcDetails; + $this->container['autoEnrolmentSettings'] = $autoEnrolmentSettings; return $this; } /** - * Gets defaultPension + * Gets backPayEnabled * - * @return \SynergiTech\Staffology\Model\ContractPensionSelectionRequest|null + * @return bool|null */ - public function getDefaultPension(): ?\SynergiTech\Staffology\Model\ContractPensionSelectionRequest + public function getBackPayEnabled(): ?bool { - return $this->container['defaultPension']; + return $this->container['backPayEnabled']; } /** - * Sets defaultPension + * Sets backPayEnabled * - * @param \SynergiTech\Staffology\Model\ContractPensionSelectionRequest|null $defaultPension defaultPension + * @param bool|null $backPayEnabled backPayEnabled * * @return $this */ - public function setDefaultPension(?\SynergiTech\Staffology\Model\ContractPensionSelectionRequest $defaultPension): static + public function setBackPayEnabled(?bool $backPayEnabled): static { - if (is_null($defaultPension)) { - throw new InvalidArgumentException('non-nullable defaultPension cannot be null'); + if (is_null($backPayEnabled)) { + throw new InvalidArgumentException('non-nullable backPayEnabled cannot be null'); } - $this->container['defaultPension'] = $defaultPension; + $this->container['backPayEnabled'] = $backPayEnabled; return $this; } /** - * Gets rtiSubmissionSettings + * Gets bacsBureauNumber * - * @return \SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsRequest|null + * @return string|null */ - public function getRtiSubmissionSettings(): ?\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsRequest + public function getBacsBureauNumber(): ?string { - return $this->container['rtiSubmissionSettings']; + return $this->container['bacsBureauNumber']; } /** - * Sets rtiSubmissionSettings + * Sets bacsBureauNumber * - * @param \SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsRequest|null $rtiSubmissionSettings rtiSubmissionSettings + * @param string|null $bacsBureauNumber bacsBureauNumber * * @return $this */ - public function setRtiSubmissionSettings(?\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsRequest $rtiSubmissionSettings): static + public function setBacsBureauNumber(?string $bacsBureauNumber): static { - if (is_null($rtiSubmissionSettings)) { - throw new InvalidArgumentException('non-nullable rtiSubmissionSettings cannot be null'); + if (is_null($bacsBureauNumber)) { + array_push($this->openAPINullablesSetToNull, 'bacsBureauNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bacsBureauNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['rtiSubmissionSettings'] = $rtiSubmissionSettings; + $this->container['bacsBureauNumber'] = $bacsBureauNumber; return $this; } /** - * Gets leaveSettings + * Gets bacsIncludeAEO * - * @return \SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsRequest|null + * @return bool|null */ - public function getLeaveSettings(): ?\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsRequest + public function getBacsIncludeAEO(): ?bool { - return $this->container['leaveSettings']; + return $this->container['bacsIncludeAEO']; } /** - * Sets leaveSettings + * Sets bacsIncludeAEO * - * @param \SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsRequest|null $leaveSettings leaveSettings + * @param bool|null $bacsIncludeAEO bacsIncludeAEO * * @return $this */ - public function setLeaveSettings(?\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsRequest $leaveSettings): static + public function setBacsIncludeAEO(?bool $bacsIncludeAEO): static { - if (is_null($leaveSettings)) { - throw new InvalidArgumentException('non-nullable leaveSettings cannot be null'); + if (is_null($bacsIncludeAEO)) { + throw new InvalidArgumentException('non-nullable bacsIncludeAEO cannot be null'); } - $this->container['leaveSettings'] = $leaveSettings; + $this->container['bacsIncludeAEO'] = $bacsIncludeAEO; return $this; } /** - * Gets settings + * Gets bacsIncludeDeductions * - * @return \SynergiTech\Staffology\Model\ContractEmployerSettingsRequest|null + * @return bool|null */ - public function getSettings(): ?\SynergiTech\Staffology\Model\ContractEmployerSettingsRequest + public function getBacsIncludeDeductions(): ?bool { - return $this->container['settings']; + return $this->container['bacsIncludeDeductions']; } /** - * Sets settings + * Sets bacsIncludeDeductions * - * @param \SynergiTech\Staffology\Model\ContractEmployerSettingsRequest|null $settings settings + * @param bool|null $bacsIncludeDeductions bacsIncludeDeductions * * @return $this */ - public function setSettings(?\SynergiTech\Staffology\Model\ContractEmployerSettingsRequest $settings): static + public function setBacsIncludeDeductions(?bool $bacsIncludeDeductions): static { - if (is_null($settings)) { - throw new InvalidArgumentException('non-nullable settings cannot be null'); + if (is_null($bacsIncludeDeductions)) { + throw new InvalidArgumentException('non-nullable bacsIncludeDeductions cannot be null'); } - $this->container['settings'] = $settings; + $this->container['bacsIncludeDeductions'] = $bacsIncludeDeductions; return $this; } /** - * Gets umbrellaSettings + * Gets bacsIncludeHmrc * - * @return \SynergiTech\Staffology\Model\ContractUmbrellaSettingsRequest|null + * @return bool|null */ - public function getUmbrellaSettings(): ?\SynergiTech\Staffology\Model\ContractUmbrellaSettingsRequest + public function getBacsIncludeHmrc(): ?bool { - return $this->container['umbrellaSettings']; + return $this->container['bacsIncludeHmrc']; } /** - * Sets umbrellaSettings + * Sets bacsIncludeHmrc * - * @param \SynergiTech\Staffology\Model\ContractUmbrellaSettingsRequest|null $umbrellaSettings umbrellaSettings + * @param bool|null $bacsIncludeHmrc bacsIncludeHmrc * * @return $this */ - public function setUmbrellaSettings(?\SynergiTech\Staffology\Model\ContractUmbrellaSettingsRequest $umbrellaSettings): static + public function setBacsIncludeHmrc(?bool $bacsIncludeHmrc): static { - if (is_null($umbrellaSettings)) { - throw new InvalidArgumentException('non-nullable umbrellaSettings cannot be null'); + if (is_null($bacsIncludeHmrc)) { + throw new InvalidArgumentException('non-nullable bacsIncludeHmrc cannot be null'); } - $this->container['umbrellaSettings'] = $umbrellaSettings; + $this->container['bacsIncludeHmrc'] = $bacsIncludeHmrc; return $this; } /** - * Gets autoEnrolmentSettings + * Gets bacsIncludePensions * - * @return \SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsRequest|null + * @return bool|null */ - public function getAutoEnrolmentSettings(): ?\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsRequest + public function getBacsIncludePensions(): ?bool { - return $this->container['autoEnrolmentSettings']; + return $this->container['bacsIncludePensions']; } /** - * Sets autoEnrolmentSettings + * Sets bacsIncludePensions * - * @param \SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsRequest|null $autoEnrolmentSettings autoEnrolmentSettings + * @param bool|null $bacsIncludePensions bacsIncludePensions * * @return $this */ - public function setAutoEnrolmentSettings(?\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsRequest $autoEnrolmentSettings): static + public function setBacsIncludePensions(?bool $bacsIncludePensions): static { - if (is_null($autoEnrolmentSettings)) { - throw new InvalidArgumentException('non-nullable autoEnrolmentSettings cannot be null'); + if (is_null($bacsIncludePensions)) { + throw new InvalidArgumentException('non-nullable bacsIncludePensions cannot be null'); } - $this->container['autoEnrolmentSettings'] = $autoEnrolmentSettings; + $this->container['bacsIncludePensions'] = $bacsIncludePensions; return $this; } /** - * Gets id + * Gets bacsServiceUserNumber * * @return string|null */ - public function getId(): ?string + public function getBacsServiceUserNumber(): ?string { - return $this->container['id']; + return $this->container['bacsServiceUserNumber']; } /** - * Sets id + * Sets bacsServiceUserNumber * - * @param string|null $id id + * @param string|null $bacsServiceUserNumber bacsServiceUserNumber * * @return $this */ - public function setId(?string $id): static + public function setBacsServiceUserNumber(?string $bacsServiceUserNumber): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($bacsServiceUserNumber)) { + array_push($this->openAPINullablesSetToNull, 'bacsServiceUserNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bacsServiceUserNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['bacsServiceUserNumber'] = $bacsServiceUserNumber; return $this; } /** - * Gets name + * Gets bankDetails * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractSharedBankDetails|null */ - public function getName(): ?string + public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractSharedBankDetails { - return $this->container['name']; + return $this->container['bankDetails']; } /** - * Sets name + * Sets bankDetails * - * @param string|null $name name + * @param \SynergiTech\Staffology\Model\ContractSharedBankDetails|null $bankDetails bankDetails * * @return $this */ - public function setName(?string $name): static + public function setBankDetails(?\SynergiTech\Staffology\Model\ContractSharedBankDetails $bankDetails): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($bankDetails)) { + throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); } - $this->container['name'] = $name; + $this->container['bankDetails'] = $bankDetails; return $this; } /** - * Gets sourceSystemId + * Gets bankPaymentsCsvFormat * - * @return string|null + * @return \SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat|null */ - public function getSourceSystemId(): ?string + public function getBankPaymentsCsvFormat(): ?\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat { - return $this->container['sourceSystemId']; + return $this->container['bankPaymentsCsvFormat']; } /** - * Sets sourceSystemId + * Sets bankPaymentsCsvFormat * - * @param string|null $sourceSystemId [readonly] Can only be given a value when the employer is created. It can then never be changed. Used by external systems so they can store an immutable reference + * @param \SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat|null $bankPaymentsCsvFormat bankPaymentsCsvFormat * * @return $this */ - public function setSourceSystemId(?string $sourceSystemId): static + public function setBankPaymentsCsvFormat(?\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat $bankPaymentsCsvFormat): static { - if (is_null($sourceSystemId)) { - array_push($this->openAPINullablesSetToNull, 'sourceSystemId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('sourceSystemId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($bankPaymentsCsvFormat)) { + throw new InvalidArgumentException('non-nullable bankPaymentsCsvFormat cannot be null'); } - $this->container['sourceSystemId'] = $sourceSystemId; + $this->container['bankPaymentsCsvFormat'] = $bankPaymentsCsvFormat; return $this; } /** - * Gets crn + * Gets bankPaymentsReferenceFormat * * @return string|null */ - public function getCrn(): ?string + public function getBankPaymentsReferenceFormat(): ?string { - return $this->container['crn']; + return $this->container['bankPaymentsReferenceFormat']; } /** - * Sets crn + * Sets bankPaymentsReferenceFormat * - * @param string|null $crn Company Registration Number + * @param string|null $bankPaymentsReferenceFormat bankPaymentsReferenceFormat * * @return $this */ - public function setCrn(?string $crn): static + public function setBankPaymentsReferenceFormat(?string $bankPaymentsReferenceFormat): static { - if (is_null($crn)) { - array_push($this->openAPINullablesSetToNull, 'crn'); + if (is_null($bankPaymentsReferenceFormat)) { + array_push($this->openAPINullablesSetToNull, 'bankPaymentsReferenceFormat'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('crn', $nullablesSetToNull); + $index = array_search('bankPaymentsReferenceFormat', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['crn'] = $crn; + $this->container['bankPaymentsReferenceFormat'] = $bankPaymentsReferenceFormat; return $this; } /** - * Gets logoUrl + * Gets bereavementLeaveProRataRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getLogoUrl(): ?string + public function getBereavementLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['logoUrl']; + return $this->container['bereavementLeaveProRataRule']; } /** - * Sets logoUrl + * Sets bereavementLeaveProRataRule * - * @param string|null $logoUrl logoUrl + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $bereavementLeaveProRataRule bereavementLeaveProRataRule * * @return $this */ - public function setLogoUrl(?string $logoUrl): static + public function setBereavementLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $bereavementLeaveProRataRule): static { - if (is_null($logoUrl)) { - array_push($this->openAPINullablesSetToNull, 'logoUrl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('logoUrl', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($bereavementLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable bereavementLeaveProRataRule cannot be null'); } - $this->container['logoUrl'] = $logoUrl; + $this->container['bereavementLeaveProRataRule'] = $bereavementLeaveProRataRule; return $this; } /** - * Gets logoSasUrl + * Gets betaFeatures * - * @return string|null + * @return \SynergiTech\Staffology\Model\EmployerBetaFeatures|null */ - public function getLogoSasUrl(): ?string + public function getBetaFeatures(): ?\SynergiTech\Staffology\Model\EmployerBetaFeatures { - return $this->container['logoSasUrl']; + return $this->container['betaFeatures']; } /** - * Sets logoSasUrl + * Sets betaFeatures * - * @param string|null $logoSasUrl logoSasUrl + * @param \SynergiTech\Staffology\Model\EmployerBetaFeatures|null $betaFeatures betaFeatures * * @return $this */ - public function setLogoSasUrl(?string $logoSasUrl): static + public function setBetaFeatures(?\SynergiTech\Staffology\Model\EmployerBetaFeatures $betaFeatures): static { - if (is_null($logoSasUrl)) { - array_push($this->openAPINullablesSetToNull, 'logoSasUrl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('logoSasUrl', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($betaFeatures)) { + throw new InvalidArgumentException('non-nullable betaFeatures cannot be null'); } - $this->container['logoSasUrl'] = $logoSasUrl; + $this->container['betaFeatures'] = $betaFeatures; return $this; } /** - * Gets alternativeId + * Gets canUseBureauFeatures * - * @return string|null + * @return bool|null */ - public function getAlternativeId(): ?string + public function getCanUseBureauFeatures(): ?bool { - return $this->container['alternativeId']; + return $this->container['canUseBureauFeatures']; } /** - * Sets alternativeId + * Sets canUseBureauFeatures * - * @param string|null $alternativeId alternativeId + * @param bool|null $canUseBureauFeatures canUseBureauFeatures * * @return $this */ - public function setAlternativeId(?string $alternativeId): static + public function setCanUseBureauFeatures(?bool $canUseBureauFeatures): static { - if (is_null($alternativeId)) { - array_push($this->openAPINullablesSetToNull, 'alternativeId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('alternativeId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($canUseBureauFeatures)) { + throw new InvalidArgumentException('non-nullable canUseBureauFeatures cannot be null'); } - $this->container['alternativeId'] = $alternativeId; + $this->container['canUseBureauFeatures'] = $canUseBureauFeatures; return $this; } /** - * Gets bankPaymentsCsvFormat + * Gets costCentreJournalOverridesEnabled * - * @return \SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat|null + * @return bool|null */ - public function getBankPaymentsCsvFormat(): ?\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat + public function getCostCentreJournalOverridesEnabled(): ?bool { - return $this->container['bankPaymentsCsvFormat']; + return $this->container['costCentreJournalOverridesEnabled']; } /** - * Sets bankPaymentsCsvFormat + * Sets costCentreJournalOverridesEnabled * - * @param \SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat|null $bankPaymentsCsvFormat bankPaymentsCsvFormat + * @param bool|null $costCentreJournalOverridesEnabled Enables the journal overrides for cost centre, if set to true. * * @return $this */ - public function setBankPaymentsCsvFormat(?\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat $bankPaymentsCsvFormat): static + public function setCostCentreJournalOverridesEnabled(?bool $costCentreJournalOverridesEnabled): static { - if (is_null($bankPaymentsCsvFormat)) { - throw new InvalidArgumentException('non-nullable bankPaymentsCsvFormat cannot be null'); + if (is_null($costCentreJournalOverridesEnabled)) { + throw new InvalidArgumentException('non-nullable costCentreJournalOverridesEnabled cannot be null'); } - $this->container['bankPaymentsCsvFormat'] = $bankPaymentsCsvFormat; + $this->container['costCentreJournalOverridesEnabled'] = $costCentreJournalOverridesEnabled; return $this; } /** - * Gets bacsServiceUserNumber + * Gets crn * * @return string|null */ - public function getBacsServiceUserNumber(): ?string + public function getCrn(): ?string { - return $this->container['bacsServiceUserNumber']; + return $this->container['crn']; } /** - * Sets bacsServiceUserNumber + * Sets crn * - * @param string|null $bacsServiceUserNumber bacsServiceUserNumber + * @param string|null $crn Company Registration Number * * @return $this */ - public function setBacsServiceUserNumber(?string $bacsServiceUserNumber): static + public function setCrn(?string $crn): static { - if (is_null($bacsServiceUserNumber)) { - array_push($this->openAPINullablesSetToNull, 'bacsServiceUserNumber'); + if (is_null($crn)) { + array_push($this->openAPINullablesSetToNull, 'crn'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bacsServiceUserNumber', $nullablesSetToNull); + $index = array_search('crn', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['bacsServiceUserNumber'] = $bacsServiceUserNumber; + $this->container['crn'] = $crn; return $this; } /** - * Gets bacsBureauNumber + * Gets currentYear * - * @return string|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getBacsBureauNumber(): ?string + public function getCurrentYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['bacsBureauNumber']; + return $this->container['currentYear']; } /** - * Sets bacsBureauNumber + * Sets currentYear * - * @param string|null $bacsBureauNumber bacsBureauNumber + * @param \SynergiTech\Staffology\Model\TaxYear|null $currentYear currentYear * * @return $this */ - public function setBacsBureauNumber(?string $bacsBureauNumber): static + public function setCurrentYear(?\SynergiTech\Staffology\Model\TaxYear $currentYear): static { - if (is_null($bacsBureauNumber)) { - array_push($this->openAPINullablesSetToNull, 'bacsBureauNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bacsBureauNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($currentYear)) { + throw new InvalidArgumentException('non-nullable currentYear cannot be null'); } - $this->container['bacsBureauNumber'] = $bacsBureauNumber; + $this->container['currentYear'] = $currentYear; return $this; } /** - * Gets rejectInvalidBankDetails + * Gets defaultPayOptions * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractPayOptionsRequest|null */ - public function getRejectInvalidBankDetails(): ?bool + public function getDefaultPayOptions(): ?\SynergiTech\Staffology\Model\ContractPayOptionsRequest { - return $this->container['rejectInvalidBankDetails']; + return $this->container['defaultPayOptions']; } /** - * Sets rejectInvalidBankDetails + * Sets defaultPayOptions * - * @param bool|null $rejectInvalidBankDetails rejectInvalidBankDetails + * @param \SynergiTech\Staffology\Model\ContractPayOptionsRequest|null $defaultPayOptions defaultPayOptions * * @return $this */ - public function setRejectInvalidBankDetails(?bool $rejectInvalidBankDetails): static + public function setDefaultPayOptions(?\SynergiTech\Staffology\Model\ContractPayOptionsRequest $defaultPayOptions): static { - if (is_null($rejectInvalidBankDetails)) { - throw new InvalidArgumentException('non-nullable rejectInvalidBankDetails cannot be null'); + if (is_null($defaultPayOptions)) { + throw new InvalidArgumentException('non-nullable defaultPayOptions cannot be null'); } - $this->container['rejectInvalidBankDetails'] = $rejectInvalidBankDetails; + $this->container['defaultPayOptions'] = $defaultPayOptions; return $this; } /** - * Gets bankPaymentsReferenceFormat + * Gets defaultPension * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractPensionSelectionRequest|null */ - public function getBankPaymentsReferenceFormat(): ?string + public function getDefaultPension(): ?\SynergiTech\Staffology\Model\ContractPensionSelectionRequest { - return $this->container['bankPaymentsReferenceFormat']; + return $this->container['defaultPension']; } /** - * Sets bankPaymentsReferenceFormat + * Sets defaultPension * - * @param string|null $bankPaymentsReferenceFormat bankPaymentsReferenceFormat + * @param \SynergiTech\Staffology\Model\ContractPensionSelectionRequest|null $defaultPension defaultPension * * @return $this */ - public function setBankPaymentsReferenceFormat(?string $bankPaymentsReferenceFormat): static + public function setDefaultPension(?\SynergiTech\Staffology\Model\ContractPensionSelectionRequest $defaultPension): static { - if (is_null($bankPaymentsReferenceFormat)) { - array_push($this->openAPINullablesSetToNull, 'bankPaymentsReferenceFormat'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankPaymentsReferenceFormat', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($defaultPension)) { + throw new InvalidArgumentException('non-nullable defaultPension cannot be null'); } - $this->container['bankPaymentsReferenceFormat'] = $bankPaymentsReferenceFormat; + $this->container['defaultPension'] = $defaultPension; return $this; } /** - * Gets bacsIncludeAEO + * Gets departmentJournalOverridesEnabled * * @return bool|null */ - public function getBacsIncludeAEO(): ?bool + public function getDepartmentJournalOverridesEnabled(): ?bool { - return $this->container['bacsIncludeAEO']; + return $this->container['departmentJournalOverridesEnabled']; } /** - * Sets bacsIncludeAEO + * Sets departmentJournalOverridesEnabled * - * @param bool|null $bacsIncludeAEO bacsIncludeAEO + * @param bool|null $departmentJournalOverridesEnabled Enables the journal overrides for departments, if set to true. * * @return $this */ - public function setBacsIncludeAEO(?bool $bacsIncludeAEO): static + public function setDepartmentJournalOverridesEnabled(?bool $departmentJournalOverridesEnabled): static { - if (is_null($bacsIncludeAEO)) { - throw new InvalidArgumentException('non-nullable bacsIncludeAEO cannot be null'); + if (is_null($departmentJournalOverridesEnabled)) { + throw new InvalidArgumentException('non-nullable departmentJournalOverridesEnabled cannot be null'); } - $this->container['bacsIncludeAEO'] = $bacsIncludeAEO; + $this->container['departmentJournalOverridesEnabled'] = $departmentJournalOverridesEnabled; return $this; } /** - * Gets bacsIncludeDeductions + * Gets displayName * - * @return bool|null + * @return string|null */ - public function getBacsIncludeDeductions(): ?bool + public function getDisplayName(): ?string { - return $this->container['bacsIncludeDeductions']; + return $this->container['displayName']; } /** - * Sets bacsIncludeDeductions + * Sets displayName * - * @param bool|null $bacsIncludeDeductions bacsIncludeDeductions + * @param string|null $displayName displayName * * @return $this */ - public function setBacsIncludeDeductions(?bool $bacsIncludeDeductions): static + public function setDisplayName(?string $displayName): static { - if (is_null($bacsIncludeDeductions)) { - throw new InvalidArgumentException('non-nullable bacsIncludeDeductions cannot be null'); + if (is_null($displayName)) { + array_push($this->openAPINullablesSetToNull, 'displayName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('displayName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['bacsIncludeDeductions'] = $bacsIncludeDeductions; + $this->container['displayName'] = $displayName; return $this; } /** - * Gets bacsIncludeHmrc + * Gets educationPayrollEnabled * * @return bool|null */ - public function getBacsIncludeHmrc(): ?bool + public function getEducationPayrollEnabled(): ?bool { - return $this->container['bacsIncludeHmrc']; + return $this->container['educationPayrollEnabled']; } /** - * Sets bacsIncludeHmrc + * Sets educationPayrollEnabled * - * @param bool|null $bacsIncludeHmrc bacsIncludeHmrc + * @param bool|null $educationPayrollEnabled educationPayrollEnabled * * @return $this */ - public function setBacsIncludeHmrc(?bool $bacsIncludeHmrc): static + public function setEducationPayrollEnabled(?bool $educationPayrollEnabled): static { - if (is_null($bacsIncludeHmrc)) { - throw new InvalidArgumentException('non-nullable bacsIncludeHmrc cannot be null'); + if (is_null($educationPayrollEnabled)) { + throw new InvalidArgumentException('non-nullable educationPayrollEnabled cannot be null'); } - $this->container['bacsIncludeHmrc'] = $bacsIncludeHmrc; + $this->container['educationPayrollEnabled'] = $educationPayrollEnabled; return $this; } /** - * Gets bacsIncludePensions + * Gets effectiveDateWorkingPatternsEnabled * * @return bool|null */ - public function getBacsIncludePensions(): ?bool + public function getEffectiveDateWorkingPatternsEnabled(): ?bool { - return $this->container['bacsIncludePensions']; + return $this->container['effectiveDateWorkingPatternsEnabled']; } /** - * Sets bacsIncludePensions + * Sets effectiveDateWorkingPatternsEnabled * - * @param bool|null $bacsIncludePensions bacsIncludePensions + * @param bool|null $effectiveDateWorkingPatternsEnabled effectiveDateWorkingPatternsEnabled * * @return $this */ - public function setBacsIncludePensions(?bool $bacsIncludePensions): static + public function setEffectiveDateWorkingPatternsEnabled(?bool $effectiveDateWorkingPatternsEnabled): static { - if (is_null($bacsIncludePensions)) { - throw new InvalidArgumentException('non-nullable bacsIncludePensions cannot be null'); + if (is_null($effectiveDateWorkingPatternsEnabled)) { + throw new InvalidArgumentException('non-nullable effectiveDateWorkingPatternsEnabled cannot be null'); } - $this->container['bacsIncludePensions'] = $bacsIncludePensions; + $this->container['effectiveDateWorkingPatternsEnabled'] = $effectiveDateWorkingPatternsEnabled; return $this; } /** - * Gets useTenantRtiSubmissionSettings + * Gets employeeCount * - * @return bool|null + * @return int|null */ - public function getUseTenantRtiSubmissionSettings(): ?bool + public function getEmployeeCount(): ?int { - return $this->container['useTenantRtiSubmissionSettings']; + return $this->container['employeeCount']; } /** - * Sets useTenantRtiSubmissionSettings + * Sets employeeCount * - * @param bool|null $useTenantRtiSubmissionSettings If the Tenant for this employer has Bureau Features enabled then they can set RtiSubmissionSettings to be used across multiple employers. If this is set to true then those settings will be used instead of any set at the Employer level + * @param int|null $employeeCount [readonly] The number of Employees this Employer has, including CIS Subcontractors. * * @return $this */ - public function setUseTenantRtiSubmissionSettings(?bool $useTenantRtiSubmissionSettings): static + public function setEmployeeCount(?int $employeeCount): static { - if (is_null($useTenantRtiSubmissionSettings)) { - throw new InvalidArgumentException('non-nullable useTenantRtiSubmissionSettings cannot be null'); + if (is_null($employeeCount)) { + throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); } - $this->container['useTenantRtiSubmissionSettings'] = $useTenantRtiSubmissionSettings; + $this->container['employeeCount'] = $employeeCount; return $this; } /** - * Gets accruePayCodeSetUniqueId + * Gets evcId * * @return string|null */ - public function getAccruePayCodeSetUniqueId(): ?string + public function getEvcId(): ?string { - return $this->container['accruePayCodeSetUniqueId']; + return $this->container['evcId']; } /** - * Sets accruePayCodeSetUniqueId + * Sets evcId * - * @param string|null $accruePayCodeSetUniqueId accruePayCodeSetUniqueId + * @param string|null $evcId If set then this will be used as the Employer ID sent to EVC in place of the standard EmployerId. * * @return $this */ - public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static + public function setEvcId(?string $evcId): static { - if (is_null($accruePayCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); + if (is_null($evcId)) { + array_push($this->openAPINullablesSetToNull, 'evcId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); + $index = array_search('evcId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; + $this->container['evcId'] = $evcId; return $this; } /** - * Gets employeeCount + * Gets hmrcDetails * - * @return int|null + * @return \SynergiTech\Staffology\Model\ContractHmrcDetailsRequest|null */ - public function getEmployeeCount(): ?int + public function getHmrcDetails(): ?\SynergiTech\Staffology\Model\ContractHmrcDetailsRequest { - return $this->container['employeeCount']; + return $this->container['hmrcDetails']; } /** - * Sets employeeCount + * Sets hmrcDetails * - * @param int|null $employeeCount [readonly] The number of Employees this Employer has, including CIS Subcontractors. + * @param \SynergiTech\Staffology\Model\ContractHmrcDetailsRequest|null $hmrcDetails hmrcDetails * * @return $this */ - public function setEmployeeCount(?int $employeeCount): static + public function setHmrcDetails(?\SynergiTech\Staffology\Model\ContractHmrcDetailsRequest $hmrcDetails): static + { + if (is_null($hmrcDetails)) { + throw new InvalidArgumentException('non-nullable hmrcDetails cannot be null'); + } + $this->container['hmrcDetails'] = $hmrcDetails; + + return $this; + } + + /** + * Gets holidayAccrualBasis + * + * @return \SynergiTech\Staffology\Model\HolidayAccrual|null + */ + public function getHolidayAccrualBasis(): ?\SynergiTech\Staffology\Model\HolidayAccrual + { + return $this->container['holidayAccrualBasis']; + } + + /** + * Sets holidayAccrualBasis + * + * @param \SynergiTech\Staffology\Model\HolidayAccrual|null $holidayAccrualBasis holidayAccrualBasis + * + * @return $this + */ + public function setHolidayAccrualBasis(?\SynergiTech\Staffology\Model\HolidayAccrual $holidayAccrualBasis): static { - if (is_null($employeeCount)) { - throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); + if (is_null($holidayAccrualBasis)) { + throw new InvalidArgumentException('non-nullable holidayAccrualBasis cannot be null'); } - $this->container['employeeCount'] = $employeeCount; + $this->container['holidayAccrualBasis'] = $holidayAccrualBasis; return $this; } /** - * Gets subcontractorCount + * Gets holidayAccrualDefaultRateType * - * @return int|null + * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null */ - public function getSubcontractorCount(): ?int + public function getHolidayAccrualDefaultRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType { - return $this->container['subcontractorCount']; + return $this->container['holidayAccrualDefaultRateType']; } /** - * Sets subcontractorCount + * Sets holidayAccrualDefaultRateType * - * @param int|null $subcontractorCount [readonly] The number of CIS Subcontractors this Employer has. + * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $holidayAccrualDefaultRateType holidayAccrualDefaultRateType * * @return $this */ - public function setSubcontractorCount(?int $subcontractorCount): static + public function setHolidayAccrualDefaultRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $holidayAccrualDefaultRateType): static { - if (is_null($subcontractorCount)) { - throw new InvalidArgumentException('non-nullable subcontractorCount cannot be null'); + if (is_null($holidayAccrualDefaultRateType)) { + throw new InvalidArgumentException('non-nullable holidayAccrualDefaultRateType cannot be null'); } - $this->container['subcontractorCount'] = $subcontractorCount; + $this->container['holidayAccrualDefaultRateType'] = $holidayAccrualDefaultRateType; return $this; } /** - * Gets startYear + * Gets holidayLeaveProRataRule * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getStartYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getHolidayLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['startYear']; + return $this->container['holidayLeaveProRataRule']; } /** - * Sets startYear + * Sets holidayLeaveProRataRule * - * @param \SynergiTech\Staffology\Model\TaxYear|null $startYear startYear + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $holidayLeaveProRataRule holidayLeaveProRataRule * * @return $this */ - public function setStartYear(?\SynergiTech\Staffology\Model\TaxYear $startYear): static + public function setHolidayLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $holidayLeaveProRataRule): static { - if (is_null($startYear)) { - throw new InvalidArgumentException('non-nullable startYear cannot be null'); + if (is_null($holidayLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable holidayLeaveProRataRule cannot be null'); } - $this->container['startYear'] = $startYear; + $this->container['holidayLeaveProRataRule'] = $holidayLeaveProRataRule; return $this; } /** - * Gets currentYear + * Gets id * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return string|null */ - public function getCurrentYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getId(): ?string { - return $this->container['currentYear']; + return $this->container['id']; } /** - * Sets currentYear + * Sets id * - * @param \SynergiTech\Staffology\Model\TaxYear|null $currentYear currentYear + * @param string|null $id id * * @return $this */ - public function setCurrentYear(?\SynergiTech\Staffology\Model\TaxYear $currentYear): static + public function setId(?string $id): static { - if (is_null($currentYear)) { - throw new InvalidArgumentException('non-nullable currentYear cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['currentYear'] = $currentYear; + $this->container['id'] = $id; return $this; } /** - * Gets supportAccessEnabled + * Gets isOptedInToEvc * * @return bool|null */ - public function getSupportAccessEnabled(): ?bool + public function getIsOptedInToEvc(): ?bool { - return $this->container['supportAccessEnabled']; + return $this->container['isOptedInToEvc']; } /** - * Sets supportAccessEnabled + * Sets isOptedInToEvc * - * @param bool|null $supportAccessEnabled If set to true then the support team can access this employer to help resolve support queries + * @param bool|null $isOptedInToEvc [readonly] Indicates whether or not the Employer is opted in to the Employee Verification Programme. Value can only be changed by its dedicated API end point. * * @return $this */ - public function setSupportAccessEnabled(?bool $supportAccessEnabled): static + public function setIsOptedInToEvc(?bool $isOptedInToEvc): static { - if (is_null($supportAccessEnabled)) { - throw new InvalidArgumentException('non-nullable supportAccessEnabled cannot be null'); + if (is_null($isOptedInToEvc)) { + throw new InvalidArgumentException('non-nullable isOptedInToEvc cannot be null'); } - $this->container['supportAccessEnabled'] = $supportAccessEnabled; + $this->container['isOptedInToEvc'] = $isOptedInToEvc; return $this; } /** - * Gets archived + * Gets leaveSettings * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsRequest|null */ - public function getArchived(): ?bool + public function getLeaveSettings(): ?\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsRequest { - return $this->container['archived']; + return $this->container['leaveSettings']; } /** - * Sets archived + * Sets leaveSettings * - * @param bool|null $archived A flag to indicate whather or not the employer is Archived, ie no longer actively used + * @param \SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsRequest|null $leaveSettings leaveSettings * * @return $this */ - public function setArchived(?bool $archived): static + public function setLeaveSettings(?\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsRequest $leaveSettings): static { - if (is_null($archived)) { - throw new InvalidArgumentException('non-nullable archived cannot be null'); + if (is_null($leaveSettings)) { + throw new InvalidArgumentException('non-nullable leaveSettings cannot be null'); } - $this->container['archived'] = $archived; + $this->container['leaveSettings'] = $leaveSettings; return $this; } /** - * Gets canUseBureauFeatures + * Gets logoSasUrl * - * @return bool|null + * @return string|null */ - public function getCanUseBureauFeatures(): ?bool + public function getLogoSasUrl(): ?string { - return $this->container['canUseBureauFeatures']; + return $this->container['logoSasUrl']; } /** - * Sets canUseBureauFeatures + * Sets logoSasUrl * - * @param bool|null $canUseBureauFeatures canUseBureauFeatures + * @param string|null $logoSasUrl logoSasUrl * * @return $this */ - public function setCanUseBureauFeatures(?bool $canUseBureauFeatures): static + public function setLogoSasUrl(?string $logoSasUrl): static { - if (is_null($canUseBureauFeatures)) { - throw new InvalidArgumentException('non-nullable canUseBureauFeatures cannot be null'); + if (is_null($logoSasUrl)) { + array_push($this->openAPINullablesSetToNull, 'logoSasUrl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('logoSasUrl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['canUseBureauFeatures'] = $canUseBureauFeatures; + $this->container['logoSasUrl'] = $logoSasUrl; return $this; } /** - * Gets multiRoleEnabled + * Gets logoUrl * - * @return bool|null + * @return string|null */ - public function getMultiRoleEnabled(): ?bool + public function getLogoUrl(): ?string { - return $this->container['multiRoleEnabled']; + return $this->container['logoUrl']; } /** - * Sets multiRoleEnabled + * Sets logoUrl * - * @param bool|null $multiRoleEnabled multiRoleEnabled + * @param string|null $logoUrl logoUrl * * @return $this */ - public function setMultiRoleEnabled(?bool $multiRoleEnabled): static + public function setLogoUrl(?string $logoUrl): static { - if (is_null($multiRoleEnabled)) { - throw new InvalidArgumentException('non-nullable multiRoleEnabled cannot be null'); + if (is_null($logoUrl)) { + array_push($this->openAPINullablesSetToNull, 'logoUrl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('logoUrl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['multiRoleEnabled'] = $multiRoleEnabled; + $this->container['logoUrl'] = $logoUrl; return $this; } /** - * Gets educationPayrollEnabled + * Gets mfaEnabled * * @return bool|null */ - public function getEducationPayrollEnabled(): ?bool + public function getMfaEnabled(): ?bool { - return $this->container['educationPayrollEnabled']; + return $this->container['mfaEnabled']; } /** - * Sets educationPayrollEnabled + * Sets mfaEnabled * - * @param bool|null $educationPayrollEnabled educationPayrollEnabled + * @param bool|null $mfaEnabled if set to true requires all users to setup MFA support queries * * @return $this */ - public function setEducationPayrollEnabled(?bool $educationPayrollEnabled): static + public function setMfaEnabled(?bool $mfaEnabled): static { - if (is_null($educationPayrollEnabled)) { - throw new InvalidArgumentException('non-nullable educationPayrollEnabled cannot be null'); + if (is_null($mfaEnabled)) { + throw new InvalidArgumentException('non-nullable mfaEnabled cannot be null'); } - $this->container['educationPayrollEnabled'] = $educationPayrollEnabled; + $this->container['mfaEnabled'] = $mfaEnabled; return $this; } /** - * Gets effectiveDateWorkingPatternsEnabled + * Gets multiRoleEnabled * * @return bool|null */ - public function getEffectiveDateWorkingPatternsEnabled(): ?bool + public function getMultiRoleEnabled(): ?bool { - return $this->container['effectiveDateWorkingPatternsEnabled']; + return $this->container['multiRoleEnabled']; } /** - * Sets effectiveDateWorkingPatternsEnabled + * Sets multiRoleEnabled * - * @param bool|null $effectiveDateWorkingPatternsEnabled effectiveDateWorkingPatternsEnabled + * @param bool|null $multiRoleEnabled multiRoleEnabled * * @return $this */ - public function setEffectiveDateWorkingPatternsEnabled(?bool $effectiveDateWorkingPatternsEnabled): static + public function setMultiRoleEnabled(?bool $multiRoleEnabled): static { - if (is_null($effectiveDateWorkingPatternsEnabled)) { - throw new InvalidArgumentException('non-nullable effectiveDateWorkingPatternsEnabled cannot be null'); + if (is_null($multiRoleEnabled)) { + throw new InvalidArgumentException('non-nullable multiRoleEnabled cannot be null'); } - $this->container['effectiveDateWorkingPatternsEnabled'] = $effectiveDateWorkingPatternsEnabled; + $this->container['multiRoleEnabled'] = $multiRoleEnabled; return $this; } /** - * Gets backPayEnabled + * Gets name * - * @return bool|null + * @return string|null */ - public function getBackPayEnabled(): ?bool + public function getName(): ?string { - return $this->container['backPayEnabled']; + return $this->container['name']; } /** - * Sets backPayEnabled + * Sets name * - * @param bool|null $backPayEnabled backPayEnabled + * @param string|null $name name * * @return $this */ - public function setBackPayEnabled(?bool $backPayEnabled): static + public function setName(?string $name): static { - if (is_null($backPayEnabled)) { - throw new InvalidArgumentException('non-nullable backPayEnabled cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['backPayEnabled'] = $backPayEnabled; + $this->container['name'] = $name; return $this; } /** - * Gets displayName + * Gets parentalLeaveProRataRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getDisplayName(): ?string + public function getParentalLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['displayName']; + return $this->container['parentalLeaveProRataRule']; } /** - * Sets displayName + * Sets parentalLeaveProRataRule * - * @param string|null $displayName displayName + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $parentalLeaveProRataRule parentalLeaveProRataRule * * @return $this */ - public function setDisplayName(?string $displayName): static + public function setParentalLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $parentalLeaveProRataRule): static { - if (is_null($displayName)) { - array_push($this->openAPINullablesSetToNull, 'displayName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('displayName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($parentalLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable parentalLeaveProRataRule cannot be null'); } - $this->container['displayName'] = $displayName; + $this->container['parentalLeaveProRataRule'] = $parentalLeaveProRataRule; return $this; } /** - * Gets isOptedInToEvc + * Gets rejectInvalidBankDetails * * @return bool|null */ - public function getIsOptedInToEvc(): ?bool + public function getRejectInvalidBankDetails(): ?bool { - return $this->container['isOptedInToEvc']; + return $this->container['rejectInvalidBankDetails']; } /** - * Sets isOptedInToEvc + * Sets rejectInvalidBankDetails * - * @param bool|null $isOptedInToEvc [readonly] Indicates whether or not the Employer is opted in to the Employee Verification Programme. Value can only be changed by its dedicated API end point. + * @param bool|null $rejectInvalidBankDetails rejectInvalidBankDetails * * @return $this */ - public function setIsOptedInToEvc(?bool $isOptedInToEvc): static + public function setRejectInvalidBankDetails(?bool $rejectInvalidBankDetails): static { - if (is_null($isOptedInToEvc)) { - throw new InvalidArgumentException('non-nullable isOptedInToEvc cannot be null'); + if (is_null($rejectInvalidBankDetails)) { + throw new InvalidArgumentException('non-nullable rejectInvalidBankDetails cannot be null'); } - $this->container['isOptedInToEvc'] = $isOptedInToEvc; + $this->container['rejectInvalidBankDetails'] = $rejectInvalidBankDetails; return $this; } /** - * Gets evcId + * Gets rtiSubmissionSettings * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsRequest|null */ - public function getEvcId(): ?string + public function getRtiSubmissionSettings(): ?\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsRequest { - return $this->container['evcId']; + return $this->container['rtiSubmissionSettings']; } /** - * Sets evcId + * Sets rtiSubmissionSettings * - * @param string|null $evcId If set then this will be used as the Employer ID sent to EVC in place of the standard EmployerId. + * @param \SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsRequest|null $rtiSubmissionSettings rtiSubmissionSettings * * @return $this */ - public function setEvcId(?string $evcId): static + public function setRtiSubmissionSettings(?\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsRequest $rtiSubmissionSettings): static { - if (is_null($evcId)) { - array_push($this->openAPINullablesSetToNull, 'evcId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('evcId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($rtiSubmissionSettings)) { + throw new InvalidArgumentException('non-nullable rtiSubmissionSettings cannot be null'); } - $this->container['evcId'] = $evcId; + $this->container['rtiSubmissionSettings'] = $rtiSubmissionSettings; return $this; } /** - * Gets holidayAccrualBasis + * Gets settings * - * @return \SynergiTech\Staffology\Model\HolidayAccrual|null + * @return \SynergiTech\Staffology\Model\ContractEmployerSettingsRequest|null */ - public function getHolidayAccrualBasis(): ?\SynergiTech\Staffology\Model\HolidayAccrual + public function getSettings(): ?\SynergiTech\Staffology\Model\ContractEmployerSettingsRequest { - return $this->container['holidayAccrualBasis']; + return $this->container['settings']; } /** - * Sets holidayAccrualBasis + * Sets settings * - * @param \SynergiTech\Staffology\Model\HolidayAccrual|null $holidayAccrualBasis holidayAccrualBasis + * @param \SynergiTech\Staffology\Model\ContractEmployerSettingsRequest|null $settings settings * * @return $this */ - public function setHolidayAccrualBasis(?\SynergiTech\Staffology\Model\HolidayAccrual $holidayAccrualBasis): static + public function setSettings(?\SynergiTech\Staffology\Model\ContractEmployerSettingsRequest $settings): static { - if (is_null($holidayAccrualBasis)) { - throw new InvalidArgumentException('non-nullable holidayAccrualBasis cannot be null'); + if (is_null($settings)) { + throw new InvalidArgumentException('non-nullable settings cannot be null'); } - $this->container['holidayAccrualBasis'] = $holidayAccrualBasis; + $this->container['settings'] = $settings; return $this; } /** - * Gets holidayAccrualDefaultRateType + * Gets settingsSortPayrollNumbersAlphanumerically * - * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null + * @return bool|null */ - public function getHolidayAccrualDefaultRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType + public function getSettingsSortPayrollNumbersAlphanumerically(): ?bool { - return $this->container['holidayAccrualDefaultRateType']; + return $this->container['settingsSortPayrollNumbersAlphanumerically']; } /** - * Sets holidayAccrualDefaultRateType + * Sets settingsSortPayrollNumbersAlphanumerically * - * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $holidayAccrualDefaultRateType holidayAccrualDefaultRateType + * @param bool|null $settingsSortPayrollNumbersAlphanumerically Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied * * @return $this */ - public function setHolidayAccrualDefaultRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $holidayAccrualDefaultRateType): static + public function setSettingsSortPayrollNumbersAlphanumerically(?bool $settingsSortPayrollNumbersAlphanumerically): static { - if (is_null($holidayAccrualDefaultRateType)) { - throw new InvalidArgumentException('non-nullable holidayAccrualDefaultRateType cannot be null'); + if (is_null($settingsSortPayrollNumbersAlphanumerically)) { + throw new InvalidArgumentException('non-nullable settingsSortPayrollNumbersAlphanumerically cannot be null'); } - $this->container['holidayAccrualDefaultRateType'] = $holidayAccrualDefaultRateType; + $this->container['settingsSortPayrollNumbersAlphanumerically'] = $settingsSortPayrollNumbersAlphanumerically; return $this; } /** - * Gets mfaEnabled + * Gets sickLeaveProRataRule * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getMfaEnabled(): ?bool + public function getSickLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['mfaEnabled']; + return $this->container['sickLeaveProRataRule']; } /** - * Sets mfaEnabled + * Sets sickLeaveProRataRule * - * @param bool|null $mfaEnabled if set to true requires all users to setup MFA support queries + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $sickLeaveProRataRule sickLeaveProRataRule * * @return $this */ - public function setMfaEnabled(?bool $mfaEnabled): static + public function setSickLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $sickLeaveProRataRule): static { - if (is_null($mfaEnabled)) { - throw new InvalidArgumentException('non-nullable mfaEnabled cannot be null'); + if (is_null($sickLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable sickLeaveProRataRule cannot be null'); } - $this->container['mfaEnabled'] = $mfaEnabled; + $this->container['sickLeaveProRataRule'] = $sickLeaveProRataRule; return $this; } /** - * Gets departmentJournalOverridesEnabled + * Gets sourceSystemId * - * @return bool|null + * @return string|null */ - public function getDepartmentJournalOverridesEnabled(): ?bool + public function getSourceSystemId(): ?string { - return $this->container['departmentJournalOverridesEnabled']; + return $this->container['sourceSystemId']; } /** - * Sets departmentJournalOverridesEnabled + * Sets sourceSystemId * - * @param bool|null $departmentJournalOverridesEnabled Enables the journal overrides for departments, if set to true. + * @param string|null $sourceSystemId [readonly] Can only be given a value when the employer is created. It can then never be changed. Used by external systems so they can store an immutable reference * * @return $this */ - public function setDepartmentJournalOverridesEnabled(?bool $departmentJournalOverridesEnabled): static + public function setSourceSystemId(?string $sourceSystemId): static { - if (is_null($departmentJournalOverridesEnabled)) { - throw new InvalidArgumentException('non-nullable departmentJournalOverridesEnabled cannot be null'); + if (is_null($sourceSystemId)) { + array_push($this->openAPINullablesSetToNull, 'sourceSystemId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('sourceSystemId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['departmentJournalOverridesEnabled'] = $departmentJournalOverridesEnabled; + $this->container['sourceSystemId'] = $sourceSystemId; return $this; } /** - * Gets costCentreJournalOverridesEnabled + * Gets startYear * - * @return bool|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getCostCentreJournalOverridesEnabled(): ?bool + public function getStartYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['costCentreJournalOverridesEnabled']; + return $this->container['startYear']; } /** - * Sets costCentreJournalOverridesEnabled + * Sets startYear * - * @param bool|null $costCentreJournalOverridesEnabled Enables the journal overrides for cost centre, if set to true. + * @param \SynergiTech\Staffology\Model\TaxYear|null $startYear startYear * * @return $this */ - public function setCostCentreJournalOverridesEnabled(?bool $costCentreJournalOverridesEnabled): static + public function setStartYear(?\SynergiTech\Staffology\Model\TaxYear $startYear): static { - if (is_null($costCentreJournalOverridesEnabled)) { - throw new InvalidArgumentException('non-nullable costCentreJournalOverridesEnabled cannot be null'); + if (is_null($startYear)) { + throw new InvalidArgumentException('non-nullable startYear cannot be null'); } - $this->container['costCentreJournalOverridesEnabled'] = $costCentreJournalOverridesEnabled; + $this->container['startYear'] = $startYear; return $this; } /** - * Gets settingsSortPayrollNumbersAlphanumerically + * Gets subcontractorCount * - * @return bool|null + * @return int|null */ - public function getSettingsSortPayrollNumbersAlphanumerically(): ?bool + public function getSubcontractorCount(): ?int { - return $this->container['settingsSortPayrollNumbersAlphanumerically']; + return $this->container['subcontractorCount']; } /** - * Sets settingsSortPayrollNumbersAlphanumerically + * Sets subcontractorCount * - * @param bool|null $settingsSortPayrollNumbersAlphanumerically Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied + * @param int|null $subcontractorCount [readonly] The number of CIS Subcontractors this Employer has. * * @return $this */ - public function setSettingsSortPayrollNumbersAlphanumerically(?bool $settingsSortPayrollNumbersAlphanumerically): static + public function setSubcontractorCount(?int $subcontractorCount): static { - if (is_null($settingsSortPayrollNumbersAlphanumerically)) { - throw new InvalidArgumentException('non-nullable settingsSortPayrollNumbersAlphanumerically cannot be null'); + if (is_null($subcontractorCount)) { + throw new InvalidArgumentException('non-nullable subcontractorCount cannot be null'); } - $this->container['settingsSortPayrollNumbersAlphanumerically'] = $settingsSortPayrollNumbersAlphanumerically; + $this->container['subcontractorCount'] = $subcontractorCount; return $this; } /** - * Gets unauthorisedLeaveProRataRule + * Gets supportAccessEnabled * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null + * @deprecated */ - public function getUnauthorisedLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getSupportAccessEnabled(): ?bool { - return $this->container['unauthorisedLeaveProRataRule']; + return $this->container['supportAccessEnabled']; } /** - * Sets unauthorisedLeaveProRataRule + * Sets supportAccessEnabled * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $unauthorisedLeaveProRataRule unauthorisedLeaveProRataRule + * @param bool|null $supportAccessEnabled [Deprecated] If set to true then the support team can access this employer to help resolve support queries. If SupportAccessExpires is not provided support access will be turned off after 30 days. * * @return $this + * @deprecated */ - public function setUnauthorisedLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $unauthorisedLeaveProRataRule): static + public function setSupportAccessEnabled(?bool $supportAccessEnabled): static { - if (is_null($unauthorisedLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable unauthorisedLeaveProRataRule cannot be null'); + if (is_null($supportAccessEnabled)) { + throw new InvalidArgumentException('non-nullable supportAccessEnabled cannot be null'); } - $this->container['unauthorisedLeaveProRataRule'] = $unauthorisedLeaveProRataRule; + $this->container['supportAccessEnabled'] = $supportAccessEnabled; return $this; } /** - * Gets holidayLeaveProRataRule + * Gets supportAccessExpires * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return \DateTime|null */ - public function getHolidayLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getSupportAccessExpires(): ?\DateTime { - return $this->container['holidayLeaveProRataRule']; + return $this->container['supportAccessExpires']; } /** - * Sets holidayLeaveProRataRule + * Sets supportAccessExpires * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $holidayLeaveProRataRule holidayLeaveProRataRule + * @param \DateTime|null $supportAccessExpires The date and time when the support access expires * * @return $this */ - public function setHolidayLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $holidayLeaveProRataRule): static + public function setSupportAccessExpires(?\DateTime $supportAccessExpires): static { - if (is_null($holidayLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable holidayLeaveProRataRule cannot be null'); + if (is_null($supportAccessExpires)) { + array_push($this->openAPINullablesSetToNull, 'supportAccessExpires'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('supportAccessExpires', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['holidayLeaveProRataRule'] = $holidayLeaveProRataRule; + $this->container['supportAccessExpires'] = $supportAccessExpires; return $this; } /** - * Gets sickLeaveProRataRule + * Gets umbrellaSettings * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return \SynergiTech\Staffology\Model\ContractUmbrellaSettingsRequest|null */ - public function getSickLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUmbrellaSettings(): ?\SynergiTech\Staffology\Model\ContractUmbrellaSettingsRequest { - return $this->container['sickLeaveProRataRule']; + return $this->container['umbrellaSettings']; } /** - * Sets sickLeaveProRataRule + * Sets umbrellaSettings * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $sickLeaveProRataRule sickLeaveProRataRule + * @param \SynergiTech\Staffology\Model\ContractUmbrellaSettingsRequest|null $umbrellaSettings umbrellaSettings * * @return $this */ - public function setSickLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $sickLeaveProRataRule): static + public function setUmbrellaSettings(?\SynergiTech\Staffology\Model\ContractUmbrellaSettingsRequest $umbrellaSettings): static { - if (is_null($sickLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable sickLeaveProRataRule cannot be null'); + if (is_null($umbrellaSettings)) { + throw new InvalidArgumentException('non-nullable umbrellaSettings cannot be null'); } - $this->container['sickLeaveProRataRule'] = $sickLeaveProRataRule; + $this->container['umbrellaSettings'] = $umbrellaSettings; return $this; } /** - * Gets parentalLeaveProRataRule + * Gets unauthorisedLeaveProRataRule * * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getParentalLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUnauthorisedLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['parentalLeaveProRataRule']; + return $this->container['unauthorisedLeaveProRataRule']; } /** - * Sets parentalLeaveProRataRule + * Sets unauthorisedLeaveProRataRule * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $parentalLeaveProRataRule parentalLeaveProRataRule + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $unauthorisedLeaveProRataRule unauthorisedLeaveProRataRule * * @return $this */ - public function setParentalLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $parentalLeaveProRataRule): static + public function setUnauthorisedLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $unauthorisedLeaveProRataRule): static { - if (is_null($parentalLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable parentalLeaveProRataRule cannot be null'); + if (is_null($unauthorisedLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable unauthorisedLeaveProRataRule cannot be null'); } - $this->container['parentalLeaveProRataRule'] = $parentalLeaveProRataRule; + $this->container['unauthorisedLeaveProRataRule'] = $unauthorisedLeaveProRataRule; return $this; } /** - * Gets bereavementLeaveProRataRule + * Gets useTenantRtiSubmissionSettings * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getBereavementLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseTenantRtiSubmissionSettings(): ?bool { - return $this->container['bereavementLeaveProRataRule']; + return $this->container['useTenantRtiSubmissionSettings']; } /** - * Sets bereavementLeaveProRataRule + * Sets useTenantRtiSubmissionSettings * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $bereavementLeaveProRataRule bereavementLeaveProRataRule + * @param bool|null $useTenantRtiSubmissionSettings If the Tenant for this employer has Bureau Features enabled then they can set RtiSubmissionSettings to be used across multiple employers. If this is set to true then those settings will be used instead of any set at the Employer level * * @return $this */ - public function setBereavementLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $bereavementLeaveProRataRule): static + public function setUseTenantRtiSubmissionSettings(?bool $useTenantRtiSubmissionSettings): static { - if (is_null($bereavementLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable bereavementLeaveProRataRule cannot be null'); + if (is_null($useTenantRtiSubmissionSettings)) { + throw new InvalidArgumentException('non-nullable useTenantRtiSubmissionSettings cannot be null'); } - $this->container['bereavementLeaveProRataRule'] = $bereavementLeaveProRataRule; + $this->container['useTenantRtiSubmissionSettings'] = $useTenantRtiSubmissionSettings; return $this; } diff --git a/src/Model/ContractEmployerResponse.php b/src/Model/ContractEmployerResponse.php index fe61306..61374e1 100644 --- a/src/Model/ContractEmployerResponse.php +++ b/src/Model/ContractEmployerResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,59 +59,62 @@ class ContractEmployerResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPITypes = [ + 'accruePayCodeSetUniqueId' => 'string', 'address' => '\SynergiTech\Staffology\Model\ContractAddress', - 'bankDetails' => '\SynergiTech\Staffology\Model\ContractBankDetails', - 'defaultPayOptions' => '\SynergiTech\Staffology\Model\ContractPayOptionsResponse', - 'hmrcDetails' => '\SynergiTech\Staffology\Model\ContractHmrcDetailsResponse', - 'defaultPension' => '\SynergiTech\Staffology\Model\ContractPensionSelectionResponse', - 'rtiSubmissionSettings' => '\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsResponse', - 'leaveSettings' => '\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsResponse', - 'settings' => '\SynergiTech\Staffology\Model\ContractEmployerSettingsResponse', - 'umbrellaSettings' => '\SynergiTech\Staffology\Model\ContractUmbrellaSettingsResponse', - 'autoEnrolmentSettings' => '\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsResponse', - 'id' => 'string', - 'name' => 'string', - 'sourceSystemId' => 'string', - 'crn' => 'string', - 'logoUrl' => 'string', - 'logoSasUrl' => 'string', 'alternativeId' => 'string', - 'bankPaymentsCsvFormat' => '\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat', - 'bacsServiceUserNumber' => 'string', + 'archived' => 'bool', + 'autoEnrolmentSettings' => '\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsResponse', + 'backPayEnabled' => 'bool', 'bacsBureauNumber' => 'string', - 'rejectInvalidBankDetails' => 'bool', - 'bankPaymentsReferenceFormat' => 'string', 'bacsIncludeAEO' => 'bool', 'bacsIncludeDeductions' => 'bool', 'bacsIncludeHmrc' => 'bool', 'bacsIncludePensions' => 'bool', - 'useTenantRtiSubmissionSettings' => 'bool', - 'accruePayCodeSetUniqueId' => 'string', - 'employeeCount' => 'int', - 'subcontractorCount' => 'int', - 'startYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'currentYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'supportAccessEnabled' => 'bool', - 'archived' => 'bool', + 'bacsServiceUserNumber' => 'string', + 'bankDetails' => '\SynergiTech\Staffology\Model\ContractSharedBankDetails', + 'bankPaymentsCsvFormat' => '\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat', + 'bankPaymentsReferenceFormat' => 'string', + 'bereavementLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'betaFeatures' => '\SynergiTech\Staffology\Model\EmployerBetaFeatures', 'canUseBureauFeatures' => 'bool', - 'multiRoleEnabled' => 'bool', + 'canUsePremiumConnectors' => 'bool', + 'costCentreJournalOverridesEnabled' => 'bool', + 'crn' => 'string', + 'currentYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'defaultPayOptions' => '\SynergiTech\Staffology\Model\ContractPayOptionsResponse', + 'defaultPension' => '\SynergiTech\Staffology\Model\ContractPensionSelectionResponse', + 'departmentJournalOverridesEnabled' => 'bool', + 'displayName' => 'string', 'educationPayrollEnabled' => 'bool', 'effectiveDateWorkingPatternsEnabled' => 'bool', - 'backPayEnabled' => 'bool', - 'displayName' => 'string', - 'isOptedInToEvc' => 'bool', + 'employeeCount' => 'int', 'evcId' => 'string', + 'hmrcDetails' => '\SynergiTech\Staffology\Model\ContractHmrcDetailsResponse', 'holidayAccrualBasis' => '\SynergiTech\Staffology\Model\HolidayAccrual', 'holidayAccrualDefaultRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', + 'holidayLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'id' => 'string', + 'isOptedInToEvc' => 'bool', + 'leaveSettings' => '\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsResponse', + 'logoSasUrl' => 'string', + 'logoUrl' => 'string', 'mfaEnabled' => 'bool', - 'departmentJournalOverridesEnabled' => 'bool', - 'costCentreJournalOverridesEnabled' => 'bool', + 'multiRoleEnabled' => 'bool', + 'name' => 'string', + 'parentalLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'rejectInvalidBankDetails' => 'bool', + 'rtiSubmissionSettings' => '\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsResponse', + 'settings' => '\SynergiTech\Staffology\Model\ContractEmployerSettingsResponse', 'settingsSortPayrollNumbersAlphanumerically' => 'bool', - 'unauthorisedLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', - 'holidayLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', 'sickLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', - 'parentalLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', - 'bereavementLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule' + 'sourceSystemId' => 'string', + 'startYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'subcontractorCount' => 'int', + 'supportAccessEnabled' => 'bool', + 'supportAccessExpires' => '\DateTime', + 'umbrellaSettings' => '\SynergiTech\Staffology\Model\ContractUmbrellaSettingsResponse', + 'unauthorisedLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'useTenantRtiSubmissionSettings' => 'bool' ]; /** @@ -120,59 +123,62 @@ class ContractEmployerResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPIFormats = [ + 'accruePayCodeSetUniqueId' => 'uuid', 'address' => null, - 'bankDetails' => null, - 'defaultPayOptions' => null, - 'hmrcDetails' => null, - 'defaultPension' => null, - 'rtiSubmissionSettings' => null, - 'leaveSettings' => null, - 'settings' => null, - 'umbrellaSettings' => null, - 'autoEnrolmentSettings' => null, - 'id' => 'uuid', - 'name' => null, - 'sourceSystemId' => null, - 'crn' => null, - 'logoUrl' => null, - 'logoSasUrl' => null, 'alternativeId' => null, - 'bankPaymentsCsvFormat' => null, - 'bacsServiceUserNumber' => null, + 'archived' => null, + 'autoEnrolmentSettings' => null, + 'backPayEnabled' => null, 'bacsBureauNumber' => null, - 'rejectInvalidBankDetails' => null, - 'bankPaymentsReferenceFormat' => null, 'bacsIncludeAEO' => null, 'bacsIncludeDeductions' => null, 'bacsIncludeHmrc' => null, 'bacsIncludePensions' => null, - 'useTenantRtiSubmissionSettings' => null, - 'accruePayCodeSetUniqueId' => 'uuid', - 'employeeCount' => 'int32', - 'subcontractorCount' => 'int32', - 'startYear' => null, - 'currentYear' => null, - 'supportAccessEnabled' => null, - 'archived' => null, + 'bacsServiceUserNumber' => null, + 'bankDetails' => null, + 'bankPaymentsCsvFormat' => null, + 'bankPaymentsReferenceFormat' => null, + 'bereavementLeaveProRataRule' => null, + 'betaFeatures' => null, 'canUseBureauFeatures' => null, - 'multiRoleEnabled' => null, + 'canUsePremiumConnectors' => null, + 'costCentreJournalOverridesEnabled' => null, + 'crn' => null, + 'currentYear' => null, + 'defaultPayOptions' => null, + 'defaultPension' => null, + 'departmentJournalOverridesEnabled' => null, + 'displayName' => null, 'educationPayrollEnabled' => null, 'effectiveDateWorkingPatternsEnabled' => null, - 'backPayEnabled' => null, - 'displayName' => null, - 'isOptedInToEvc' => null, + 'employeeCount' => 'int32', 'evcId' => 'uuid', + 'hmrcDetails' => null, 'holidayAccrualBasis' => null, 'holidayAccrualDefaultRateType' => null, + 'holidayLeaveProRataRule' => null, + 'id' => 'uuid', + 'isOptedInToEvc' => null, + 'leaveSettings' => null, + 'logoSasUrl' => null, + 'logoUrl' => null, 'mfaEnabled' => null, - 'departmentJournalOverridesEnabled' => null, - 'costCentreJournalOverridesEnabled' => null, + 'multiRoleEnabled' => null, + 'name' => null, + 'parentalLeaveProRataRule' => null, + 'rejectInvalidBankDetails' => null, + 'rtiSubmissionSettings' => null, + 'settings' => null, 'settingsSortPayrollNumbersAlphanumerically' => null, - 'unauthorisedLeaveProRataRule' => null, - 'holidayLeaveProRataRule' => null, 'sickLeaveProRataRule' => null, - 'parentalLeaveProRataRule' => null, - 'bereavementLeaveProRataRule' => null + 'sourceSystemId' => null, + 'startYear' => null, + 'subcontractorCount' => 'int32', + 'supportAccessEnabled' => null, + 'supportAccessExpires' => 'date', + 'umbrellaSettings' => null, + 'unauthorisedLeaveProRataRule' => null, + 'useTenantRtiSubmissionSettings' => null ]; /** @@ -181,59 +187,62 @@ class ContractEmployerResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPINullables = [ + 'accruePayCodeSetUniqueId' => true, 'address' => false, - 'bankDetails' => false, - 'defaultPayOptions' => false, - 'hmrcDetails' => false, - 'defaultPension' => false, - 'rtiSubmissionSettings' => false, - 'leaveSettings' => false, - 'settings' => false, - 'umbrellaSettings' => false, - 'autoEnrolmentSettings' => false, - 'id' => false, - 'name' => true, - 'sourceSystemId' => true, - 'crn' => true, - 'logoUrl' => true, - 'logoSasUrl' => true, 'alternativeId' => true, - 'bankPaymentsCsvFormat' => false, - 'bacsServiceUserNumber' => true, + 'archived' => false, + 'autoEnrolmentSettings' => false, + 'backPayEnabled' => false, 'bacsBureauNumber' => true, - 'rejectInvalidBankDetails' => false, - 'bankPaymentsReferenceFormat' => true, 'bacsIncludeAEO' => false, 'bacsIncludeDeductions' => false, 'bacsIncludeHmrc' => false, 'bacsIncludePensions' => false, - 'useTenantRtiSubmissionSettings' => false, - 'accruePayCodeSetUniqueId' => true, - 'employeeCount' => false, - 'subcontractorCount' => false, - 'startYear' => false, - 'currentYear' => false, - 'supportAccessEnabled' => false, - 'archived' => false, + 'bacsServiceUserNumber' => true, + 'bankDetails' => false, + 'bankPaymentsCsvFormat' => false, + 'bankPaymentsReferenceFormat' => true, + 'bereavementLeaveProRataRule' => false, + 'betaFeatures' => false, 'canUseBureauFeatures' => false, - 'multiRoleEnabled' => false, + 'canUsePremiumConnectors' => false, + 'costCentreJournalOverridesEnabled' => false, + 'crn' => true, + 'currentYear' => false, + 'defaultPayOptions' => false, + 'defaultPension' => false, + 'departmentJournalOverridesEnabled' => false, + 'displayName' => true, 'educationPayrollEnabled' => false, 'effectiveDateWorkingPatternsEnabled' => false, - 'backPayEnabled' => false, - 'displayName' => true, - 'isOptedInToEvc' => false, + 'employeeCount' => false, 'evcId' => true, + 'hmrcDetails' => false, 'holidayAccrualBasis' => false, 'holidayAccrualDefaultRateType' => false, + 'holidayLeaveProRataRule' => false, + 'id' => false, + 'isOptedInToEvc' => false, + 'leaveSettings' => false, + 'logoSasUrl' => true, + 'logoUrl' => true, 'mfaEnabled' => false, - 'departmentJournalOverridesEnabled' => false, - 'costCentreJournalOverridesEnabled' => false, + 'multiRoleEnabled' => false, + 'name' => true, + 'parentalLeaveProRataRule' => false, + 'rejectInvalidBankDetails' => false, + 'rtiSubmissionSettings' => false, + 'settings' => false, 'settingsSortPayrollNumbersAlphanumerically' => false, - 'unauthorisedLeaveProRataRule' => false, - 'holidayLeaveProRataRule' => false, 'sickLeaveProRataRule' => false, - 'parentalLeaveProRataRule' => false, - 'bereavementLeaveProRataRule' => false + 'sourceSystemId' => true, + 'startYear' => false, + 'subcontractorCount' => false, + 'supportAccessEnabled' => false, + 'supportAccessExpires' => true, + 'umbrellaSettings' => false, + 'unauthorisedLeaveProRataRule' => false, + 'useTenantRtiSubmissionSettings' => false ]; /** @@ -322,59 +331,62 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', 'address' => 'address', - 'bankDetails' => 'bankDetails', - 'defaultPayOptions' => 'defaultPayOptions', - 'hmrcDetails' => 'hmrcDetails', - 'defaultPension' => 'defaultPension', - 'rtiSubmissionSettings' => 'rtiSubmissionSettings', - 'leaveSettings' => 'leaveSettings', - 'settings' => 'settings', - 'umbrellaSettings' => 'umbrellaSettings', - 'autoEnrolmentSettings' => 'autoEnrolmentSettings', - 'id' => 'id', - 'name' => 'name', - 'sourceSystemId' => 'sourceSystemId', - 'crn' => 'crn', - 'logoUrl' => 'logoUrl', - 'logoSasUrl' => 'logoSasUrl', 'alternativeId' => 'alternativeId', - 'bankPaymentsCsvFormat' => 'bankPaymentsCsvFormat', - 'bacsServiceUserNumber' => 'bacsServiceUserNumber', + 'archived' => 'archived', + 'autoEnrolmentSettings' => 'autoEnrolmentSettings', + 'backPayEnabled' => 'backPayEnabled', 'bacsBureauNumber' => 'bacsBureauNumber', - 'rejectInvalidBankDetails' => 'rejectInvalidBankDetails', - 'bankPaymentsReferenceFormat' => 'bankPaymentsReferenceFormat', 'bacsIncludeAEO' => 'bacsIncludeAEO', 'bacsIncludeDeductions' => 'bacsIncludeDeductions', 'bacsIncludeHmrc' => 'bacsIncludeHmrc', 'bacsIncludePensions' => 'bacsIncludePensions', - 'useTenantRtiSubmissionSettings' => 'useTenantRtiSubmissionSettings', - 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', - 'employeeCount' => 'employeeCount', - 'subcontractorCount' => 'subcontractorCount', - 'startYear' => 'startYear', - 'currentYear' => 'currentYear', - 'supportAccessEnabled' => 'supportAccessEnabled', - 'archived' => 'archived', + 'bacsServiceUserNumber' => 'bacsServiceUserNumber', + 'bankDetails' => 'bankDetails', + 'bankPaymentsCsvFormat' => 'bankPaymentsCsvFormat', + 'bankPaymentsReferenceFormat' => 'bankPaymentsReferenceFormat', + 'bereavementLeaveProRataRule' => 'bereavementLeaveProRataRule', + 'betaFeatures' => 'betaFeatures', 'canUseBureauFeatures' => 'canUseBureauFeatures', - 'multiRoleEnabled' => 'multiRoleEnabled', + 'canUsePremiumConnectors' => 'canUsePremiumConnectors', + 'costCentreJournalOverridesEnabled' => 'costCentreJournalOverridesEnabled', + 'crn' => 'crn', + 'currentYear' => 'currentYear', + 'defaultPayOptions' => 'defaultPayOptions', + 'defaultPension' => 'defaultPension', + 'departmentJournalOverridesEnabled' => 'departmentJournalOverridesEnabled', + 'displayName' => 'displayName', 'educationPayrollEnabled' => 'educationPayrollEnabled', 'effectiveDateWorkingPatternsEnabled' => 'effectiveDateWorkingPatternsEnabled', - 'backPayEnabled' => 'backPayEnabled', - 'displayName' => 'displayName', - 'isOptedInToEvc' => 'isOptedInToEvc', + 'employeeCount' => 'employeeCount', 'evcId' => 'evcId', + 'hmrcDetails' => 'hmrcDetails', 'holidayAccrualBasis' => 'holidayAccrualBasis', 'holidayAccrualDefaultRateType' => 'holidayAccrualDefaultRateType', + 'holidayLeaveProRataRule' => 'holidayLeaveProRataRule', + 'id' => 'id', + 'isOptedInToEvc' => 'isOptedInToEvc', + 'leaveSettings' => 'leaveSettings', + 'logoSasUrl' => 'logoSasUrl', + 'logoUrl' => 'logoUrl', 'mfaEnabled' => 'mfaEnabled', - 'departmentJournalOverridesEnabled' => 'departmentJournalOverridesEnabled', - 'costCentreJournalOverridesEnabled' => 'costCentreJournalOverridesEnabled', + 'multiRoleEnabled' => 'multiRoleEnabled', + 'name' => 'name', + 'parentalLeaveProRataRule' => 'parentalLeaveProRataRule', + 'rejectInvalidBankDetails' => 'rejectInvalidBankDetails', + 'rtiSubmissionSettings' => 'rtiSubmissionSettings', + 'settings' => 'settings', 'settingsSortPayrollNumbersAlphanumerically' => 'settingsSortPayrollNumbersAlphanumerically', - 'unauthorisedLeaveProRataRule' => 'unauthorisedLeaveProRataRule', - 'holidayLeaveProRataRule' => 'holidayLeaveProRataRule', 'sickLeaveProRataRule' => 'sickLeaveProRataRule', - 'parentalLeaveProRataRule' => 'parentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'bereavementLeaveProRataRule' + 'sourceSystemId' => 'sourceSystemId', + 'startYear' => 'startYear', + 'subcontractorCount' => 'subcontractorCount', + 'supportAccessEnabled' => 'supportAccessEnabled', + 'supportAccessExpires' => 'supportAccessExpires', + 'umbrellaSettings' => 'umbrellaSettings', + 'unauthorisedLeaveProRataRule' => 'unauthorisedLeaveProRataRule', + 'useTenantRtiSubmissionSettings' => 'useTenantRtiSubmissionSettings' ]; /** @@ -383,59 +395,62 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', 'address' => 'setAddress', - 'bankDetails' => 'setBankDetails', - 'defaultPayOptions' => 'setDefaultPayOptions', - 'hmrcDetails' => 'setHmrcDetails', - 'defaultPension' => 'setDefaultPension', - 'rtiSubmissionSettings' => 'setRtiSubmissionSettings', - 'leaveSettings' => 'setLeaveSettings', - 'settings' => 'setSettings', - 'umbrellaSettings' => 'setUmbrellaSettings', - 'autoEnrolmentSettings' => 'setAutoEnrolmentSettings', - 'id' => 'setId', - 'name' => 'setName', - 'sourceSystemId' => 'setSourceSystemId', - 'crn' => 'setCrn', - 'logoUrl' => 'setLogoUrl', - 'logoSasUrl' => 'setLogoSasUrl', 'alternativeId' => 'setAlternativeId', - 'bankPaymentsCsvFormat' => 'setBankPaymentsCsvFormat', - 'bacsServiceUserNumber' => 'setBacsServiceUserNumber', + 'archived' => 'setArchived', + 'autoEnrolmentSettings' => 'setAutoEnrolmentSettings', + 'backPayEnabled' => 'setBackPayEnabled', 'bacsBureauNumber' => 'setBacsBureauNumber', - 'rejectInvalidBankDetails' => 'setRejectInvalidBankDetails', - 'bankPaymentsReferenceFormat' => 'setBankPaymentsReferenceFormat', 'bacsIncludeAEO' => 'setBacsIncludeAEO', 'bacsIncludeDeductions' => 'setBacsIncludeDeductions', 'bacsIncludeHmrc' => 'setBacsIncludeHmrc', 'bacsIncludePensions' => 'setBacsIncludePensions', - 'useTenantRtiSubmissionSettings' => 'setUseTenantRtiSubmissionSettings', - 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', - 'employeeCount' => 'setEmployeeCount', - 'subcontractorCount' => 'setSubcontractorCount', - 'startYear' => 'setStartYear', - 'currentYear' => 'setCurrentYear', - 'supportAccessEnabled' => 'setSupportAccessEnabled', - 'archived' => 'setArchived', + 'bacsServiceUserNumber' => 'setBacsServiceUserNumber', + 'bankDetails' => 'setBankDetails', + 'bankPaymentsCsvFormat' => 'setBankPaymentsCsvFormat', + 'bankPaymentsReferenceFormat' => 'setBankPaymentsReferenceFormat', + 'bereavementLeaveProRataRule' => 'setBereavementLeaveProRataRule', + 'betaFeatures' => 'setBetaFeatures', 'canUseBureauFeatures' => 'setCanUseBureauFeatures', - 'multiRoleEnabled' => 'setMultiRoleEnabled', + 'canUsePremiumConnectors' => 'setCanUsePremiumConnectors', + 'costCentreJournalOverridesEnabled' => 'setCostCentreJournalOverridesEnabled', + 'crn' => 'setCrn', + 'currentYear' => 'setCurrentYear', + 'defaultPayOptions' => 'setDefaultPayOptions', + 'defaultPension' => 'setDefaultPension', + 'departmentJournalOverridesEnabled' => 'setDepartmentJournalOverridesEnabled', + 'displayName' => 'setDisplayName', 'educationPayrollEnabled' => 'setEducationPayrollEnabled', 'effectiveDateWorkingPatternsEnabled' => 'setEffectiveDateWorkingPatternsEnabled', - 'backPayEnabled' => 'setBackPayEnabled', - 'displayName' => 'setDisplayName', - 'isOptedInToEvc' => 'setIsOptedInToEvc', + 'employeeCount' => 'setEmployeeCount', 'evcId' => 'setEvcId', + 'hmrcDetails' => 'setHmrcDetails', 'holidayAccrualBasis' => 'setHolidayAccrualBasis', 'holidayAccrualDefaultRateType' => 'setHolidayAccrualDefaultRateType', + 'holidayLeaveProRataRule' => 'setHolidayLeaveProRataRule', + 'id' => 'setId', + 'isOptedInToEvc' => 'setIsOptedInToEvc', + 'leaveSettings' => 'setLeaveSettings', + 'logoSasUrl' => 'setLogoSasUrl', + 'logoUrl' => 'setLogoUrl', 'mfaEnabled' => 'setMfaEnabled', - 'departmentJournalOverridesEnabled' => 'setDepartmentJournalOverridesEnabled', - 'costCentreJournalOverridesEnabled' => 'setCostCentreJournalOverridesEnabled', + 'multiRoleEnabled' => 'setMultiRoleEnabled', + 'name' => 'setName', + 'parentalLeaveProRataRule' => 'setParentalLeaveProRataRule', + 'rejectInvalidBankDetails' => 'setRejectInvalidBankDetails', + 'rtiSubmissionSettings' => 'setRtiSubmissionSettings', + 'settings' => 'setSettings', 'settingsSortPayrollNumbersAlphanumerically' => 'setSettingsSortPayrollNumbersAlphanumerically', - 'unauthorisedLeaveProRataRule' => 'setUnauthorisedLeaveProRataRule', - 'holidayLeaveProRataRule' => 'setHolidayLeaveProRataRule', 'sickLeaveProRataRule' => 'setSickLeaveProRataRule', - 'parentalLeaveProRataRule' => 'setParentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'setBereavementLeaveProRataRule' + 'sourceSystemId' => 'setSourceSystemId', + 'startYear' => 'setStartYear', + 'subcontractorCount' => 'setSubcontractorCount', + 'supportAccessEnabled' => 'setSupportAccessEnabled', + 'supportAccessExpires' => 'setSupportAccessExpires', + 'umbrellaSettings' => 'setUmbrellaSettings', + 'unauthorisedLeaveProRataRule' => 'setUnauthorisedLeaveProRataRule', + 'useTenantRtiSubmissionSettings' => 'setUseTenantRtiSubmissionSettings' ]; /** @@ -444,59 +459,62 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', 'address' => 'getAddress', - 'bankDetails' => 'getBankDetails', - 'defaultPayOptions' => 'getDefaultPayOptions', - 'hmrcDetails' => 'getHmrcDetails', - 'defaultPension' => 'getDefaultPension', - 'rtiSubmissionSettings' => 'getRtiSubmissionSettings', - 'leaveSettings' => 'getLeaveSettings', - 'settings' => 'getSettings', - 'umbrellaSettings' => 'getUmbrellaSettings', - 'autoEnrolmentSettings' => 'getAutoEnrolmentSettings', - 'id' => 'getId', - 'name' => 'getName', - 'sourceSystemId' => 'getSourceSystemId', - 'crn' => 'getCrn', - 'logoUrl' => 'getLogoUrl', - 'logoSasUrl' => 'getLogoSasUrl', 'alternativeId' => 'getAlternativeId', - 'bankPaymentsCsvFormat' => 'getBankPaymentsCsvFormat', - 'bacsServiceUserNumber' => 'getBacsServiceUserNumber', + 'archived' => 'getArchived', + 'autoEnrolmentSettings' => 'getAutoEnrolmentSettings', + 'backPayEnabled' => 'getBackPayEnabled', 'bacsBureauNumber' => 'getBacsBureauNumber', - 'rejectInvalidBankDetails' => 'getRejectInvalidBankDetails', - 'bankPaymentsReferenceFormat' => 'getBankPaymentsReferenceFormat', 'bacsIncludeAEO' => 'getBacsIncludeAEO', 'bacsIncludeDeductions' => 'getBacsIncludeDeductions', 'bacsIncludeHmrc' => 'getBacsIncludeHmrc', 'bacsIncludePensions' => 'getBacsIncludePensions', - 'useTenantRtiSubmissionSettings' => 'getUseTenantRtiSubmissionSettings', - 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', - 'employeeCount' => 'getEmployeeCount', - 'subcontractorCount' => 'getSubcontractorCount', - 'startYear' => 'getStartYear', - 'currentYear' => 'getCurrentYear', - 'supportAccessEnabled' => 'getSupportAccessEnabled', - 'archived' => 'getArchived', + 'bacsServiceUserNumber' => 'getBacsServiceUserNumber', + 'bankDetails' => 'getBankDetails', + 'bankPaymentsCsvFormat' => 'getBankPaymentsCsvFormat', + 'bankPaymentsReferenceFormat' => 'getBankPaymentsReferenceFormat', + 'bereavementLeaveProRataRule' => 'getBereavementLeaveProRataRule', + 'betaFeatures' => 'getBetaFeatures', 'canUseBureauFeatures' => 'getCanUseBureauFeatures', - 'multiRoleEnabled' => 'getMultiRoleEnabled', + 'canUsePremiumConnectors' => 'getCanUsePremiumConnectors', + 'costCentreJournalOverridesEnabled' => 'getCostCentreJournalOverridesEnabled', + 'crn' => 'getCrn', + 'currentYear' => 'getCurrentYear', + 'defaultPayOptions' => 'getDefaultPayOptions', + 'defaultPension' => 'getDefaultPension', + 'departmentJournalOverridesEnabled' => 'getDepartmentJournalOverridesEnabled', + 'displayName' => 'getDisplayName', 'educationPayrollEnabled' => 'getEducationPayrollEnabled', 'effectiveDateWorkingPatternsEnabled' => 'getEffectiveDateWorkingPatternsEnabled', - 'backPayEnabled' => 'getBackPayEnabled', - 'displayName' => 'getDisplayName', - 'isOptedInToEvc' => 'getIsOptedInToEvc', + 'employeeCount' => 'getEmployeeCount', 'evcId' => 'getEvcId', + 'hmrcDetails' => 'getHmrcDetails', 'holidayAccrualBasis' => 'getHolidayAccrualBasis', 'holidayAccrualDefaultRateType' => 'getHolidayAccrualDefaultRateType', - 'mfaEnabled' => 'getMfaEnabled', - 'departmentJournalOverridesEnabled' => 'getDepartmentJournalOverridesEnabled', - 'costCentreJournalOverridesEnabled' => 'getCostCentreJournalOverridesEnabled', - 'settingsSortPayrollNumbersAlphanumerically' => 'getSettingsSortPayrollNumbersAlphanumerically', - 'unauthorisedLeaveProRataRule' => 'getUnauthorisedLeaveProRataRule', 'holidayLeaveProRataRule' => 'getHolidayLeaveProRataRule', + 'id' => 'getId', + 'isOptedInToEvc' => 'getIsOptedInToEvc', + 'leaveSettings' => 'getLeaveSettings', + 'logoSasUrl' => 'getLogoSasUrl', + 'logoUrl' => 'getLogoUrl', + 'mfaEnabled' => 'getMfaEnabled', + 'multiRoleEnabled' => 'getMultiRoleEnabled', + 'name' => 'getName', + 'parentalLeaveProRataRule' => 'getParentalLeaveProRataRule', + 'rejectInvalidBankDetails' => 'getRejectInvalidBankDetails', + 'rtiSubmissionSettings' => 'getRtiSubmissionSettings', + 'settings' => 'getSettings', + 'settingsSortPayrollNumbersAlphanumerically' => 'getSettingsSortPayrollNumbersAlphanumerically', 'sickLeaveProRataRule' => 'getSickLeaveProRataRule', - 'parentalLeaveProRataRule' => 'getParentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'getBereavementLeaveProRataRule' + 'sourceSystemId' => 'getSourceSystemId', + 'startYear' => 'getStartYear', + 'subcontractorCount' => 'getSubcontractorCount', + 'supportAccessEnabled' => 'getSupportAccessEnabled', + 'supportAccessExpires' => 'getSupportAccessExpires', + 'umbrellaSettings' => 'getUmbrellaSettings', + 'unauthorisedLeaveProRataRule' => 'getUnauthorisedLeaveProRataRule', + 'useTenantRtiSubmissionSettings' => 'getUseTenantRtiSubmissionSettings' ]; /** @@ -555,59 +573,62 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); $this->setIfExists('address', $data ?? [], null); - $this->setIfExists('bankDetails', $data ?? [], null); - $this->setIfExists('defaultPayOptions', $data ?? [], null); - $this->setIfExists('hmrcDetails', $data ?? [], null); - $this->setIfExists('defaultPension', $data ?? [], null); - $this->setIfExists('rtiSubmissionSettings', $data ?? [], null); - $this->setIfExists('leaveSettings', $data ?? [], null); - $this->setIfExists('settings', $data ?? [], null); - $this->setIfExists('umbrellaSettings', $data ?? [], null); - $this->setIfExists('autoEnrolmentSettings', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('sourceSystemId', $data ?? [], null); - $this->setIfExists('crn', $data ?? [], null); - $this->setIfExists('logoUrl', $data ?? [], null); - $this->setIfExists('logoSasUrl', $data ?? [], null); $this->setIfExists('alternativeId', $data ?? [], null); - $this->setIfExists('bankPaymentsCsvFormat', $data ?? [], null); - $this->setIfExists('bacsServiceUserNumber', $data ?? [], null); + $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('autoEnrolmentSettings', $data ?? [], null); + $this->setIfExists('backPayEnabled', $data ?? [], null); $this->setIfExists('bacsBureauNumber', $data ?? [], null); - $this->setIfExists('rejectInvalidBankDetails', $data ?? [], null); - $this->setIfExists('bankPaymentsReferenceFormat', $data ?? [], null); $this->setIfExists('bacsIncludeAEO', $data ?? [], null); $this->setIfExists('bacsIncludeDeductions', $data ?? [], null); $this->setIfExists('bacsIncludeHmrc', $data ?? [], null); $this->setIfExists('bacsIncludePensions', $data ?? [], null); - $this->setIfExists('useTenantRtiSubmissionSettings', $data ?? [], null); - $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); - $this->setIfExists('employeeCount', $data ?? [], null); - $this->setIfExists('subcontractorCount', $data ?? [], null); - $this->setIfExists('startYear', $data ?? [], null); - $this->setIfExists('currentYear', $data ?? [], null); - $this->setIfExists('supportAccessEnabled', $data ?? [], null); - $this->setIfExists('archived', $data ?? [], null); + $this->setIfExists('bacsServiceUserNumber', $data ?? [], null); + $this->setIfExists('bankDetails', $data ?? [], null); + $this->setIfExists('bankPaymentsCsvFormat', $data ?? [], null); + $this->setIfExists('bankPaymentsReferenceFormat', $data ?? [], null); + $this->setIfExists('bereavementLeaveProRataRule', $data ?? [], null); + $this->setIfExists('betaFeatures', $data ?? [], null); $this->setIfExists('canUseBureauFeatures', $data ?? [], null); - $this->setIfExists('multiRoleEnabled', $data ?? [], null); + $this->setIfExists('canUsePremiumConnectors', $data ?? [], null); + $this->setIfExists('costCentreJournalOverridesEnabled', $data ?? [], null); + $this->setIfExists('crn', $data ?? [], null); + $this->setIfExists('currentYear', $data ?? [], null); + $this->setIfExists('defaultPayOptions', $data ?? [], null); + $this->setIfExists('defaultPension', $data ?? [], null); + $this->setIfExists('departmentJournalOverridesEnabled', $data ?? [], null); + $this->setIfExists('displayName', $data ?? [], null); $this->setIfExists('educationPayrollEnabled', $data ?? [], null); $this->setIfExists('effectiveDateWorkingPatternsEnabled', $data ?? [], null); - $this->setIfExists('backPayEnabled', $data ?? [], null); - $this->setIfExists('displayName', $data ?? [], null); - $this->setIfExists('isOptedInToEvc', $data ?? [], null); + $this->setIfExists('employeeCount', $data ?? [], null); $this->setIfExists('evcId', $data ?? [], null); + $this->setIfExists('hmrcDetails', $data ?? [], null); $this->setIfExists('holidayAccrualBasis', $data ?? [], null); $this->setIfExists('holidayAccrualDefaultRateType', $data ?? [], null); + $this->setIfExists('holidayLeaveProRataRule', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isOptedInToEvc', $data ?? [], null); + $this->setIfExists('leaveSettings', $data ?? [], null); + $this->setIfExists('logoSasUrl', $data ?? [], null); + $this->setIfExists('logoUrl', $data ?? [], null); $this->setIfExists('mfaEnabled', $data ?? [], null); - $this->setIfExists('departmentJournalOverridesEnabled', $data ?? [], null); - $this->setIfExists('costCentreJournalOverridesEnabled', $data ?? [], null); + $this->setIfExists('multiRoleEnabled', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('parentalLeaveProRataRule', $data ?? [], null); + $this->setIfExists('rejectInvalidBankDetails', $data ?? [], null); + $this->setIfExists('rtiSubmissionSettings', $data ?? [], null); + $this->setIfExists('settings', $data ?? [], null); $this->setIfExists('settingsSortPayrollNumbersAlphanumerically', $data ?? [], null); - $this->setIfExists('unauthorisedLeaveProRataRule', $data ?? [], null); - $this->setIfExists('holidayLeaveProRataRule', $data ?? [], null); $this->setIfExists('sickLeaveProRataRule', $data ?? [], null); - $this->setIfExists('parentalLeaveProRataRule', $data ?? [], null); - $this->setIfExists('bereavementLeaveProRataRule', $data ?? [], null); + $this->setIfExists('sourceSystemId', $data ?? [], null); + $this->setIfExists('startYear', $data ?? [], null); + $this->setIfExists('subcontractorCount', $data ?? [], null); + $this->setIfExists('supportAccessEnabled', $data ?? [], null); + $this->setIfExists('supportAccessExpires', $data ?? [], null); + $this->setIfExists('umbrellaSettings', $data ?? [], null); + $this->setIfExists('unauthorisedLeaveProRataRule', $data ?? [], null); + $this->setIfExists('useTenantRtiSubmissionSettings', $data ?? [], null); } /** @@ -652,6 +673,40 @@ public function valid(): bool } + /** + * Gets accruePayCodeSetUniqueId + * + * @return string|null + */ + public function getAccruePayCodeSetUniqueId(): ?string + { + return $this->container['accruePayCodeSetUniqueId']; + } + + /** + * Sets accruePayCodeSetUniqueId + * + * @param string|null $accruePayCodeSetUniqueId accruePayCodeSetUniqueId + * + * @return $this + */ + public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static + { + if (is_null($accruePayCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; + + return $this; + } + /** * Gets address * @@ -680,1489 +735,1545 @@ public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $addre } /** - * Gets bankDetails + * Gets alternativeId * - * @return \SynergiTech\Staffology\Model\ContractBankDetails|null + * @return string|null */ - public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractBankDetails + public function getAlternativeId(): ?string { - return $this->container['bankDetails']; + return $this->container['alternativeId']; } /** - * Sets bankDetails + * Sets alternativeId * - * @param \SynergiTech\Staffology\Model\ContractBankDetails|null $bankDetails bankDetails + * @param string|null $alternativeId alternativeId * * @return $this */ - public function setBankDetails(?\SynergiTech\Staffology\Model\ContractBankDetails $bankDetails): static + public function setAlternativeId(?string $alternativeId): static { - if (is_null($bankDetails)) { - throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); + if (is_null($alternativeId)) { + array_push($this->openAPINullablesSetToNull, 'alternativeId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('alternativeId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['bankDetails'] = $bankDetails; + $this->container['alternativeId'] = $alternativeId; return $this; } /** - * Gets defaultPayOptions + * Gets archived * - * @return \SynergiTech\Staffology\Model\ContractPayOptionsResponse|null + * @return bool|null */ - public function getDefaultPayOptions(): ?\SynergiTech\Staffology\Model\ContractPayOptionsResponse + public function getArchived(): ?bool { - return $this->container['defaultPayOptions']; + return $this->container['archived']; } /** - * Sets defaultPayOptions + * Sets archived * - * @param \SynergiTech\Staffology\Model\ContractPayOptionsResponse|null $defaultPayOptions defaultPayOptions + * @param bool|null $archived A flag to indicate whather or not the employer is Archived, ie no longer actively used * * @return $this */ - public function setDefaultPayOptions(?\SynergiTech\Staffology\Model\ContractPayOptionsResponse $defaultPayOptions): static + public function setArchived(?bool $archived): static { - if (is_null($defaultPayOptions)) { - throw new InvalidArgumentException('non-nullable defaultPayOptions cannot be null'); + if (is_null($archived)) { + throw new InvalidArgumentException('non-nullable archived cannot be null'); } - $this->container['defaultPayOptions'] = $defaultPayOptions; + $this->container['archived'] = $archived; return $this; } /** - * Gets hmrcDetails + * Gets autoEnrolmentSettings * - * @return \SynergiTech\Staffology\Model\ContractHmrcDetailsResponse|null + * @return \SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsResponse|null */ - public function getHmrcDetails(): ?\SynergiTech\Staffology\Model\ContractHmrcDetailsResponse + public function getAutoEnrolmentSettings(): ?\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsResponse { - return $this->container['hmrcDetails']; + return $this->container['autoEnrolmentSettings']; } /** - * Sets hmrcDetails + * Sets autoEnrolmentSettings * - * @param \SynergiTech\Staffology\Model\ContractHmrcDetailsResponse|null $hmrcDetails hmrcDetails + * @param \SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsResponse|null $autoEnrolmentSettings autoEnrolmentSettings * * @return $this */ - public function setHmrcDetails(?\SynergiTech\Staffology\Model\ContractHmrcDetailsResponse $hmrcDetails): static + public function setAutoEnrolmentSettings(?\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsResponse $autoEnrolmentSettings): static { - if (is_null($hmrcDetails)) { - throw new InvalidArgumentException('non-nullable hmrcDetails cannot be null'); + if (is_null($autoEnrolmentSettings)) { + throw new InvalidArgumentException('non-nullable autoEnrolmentSettings cannot be null'); } - $this->container['hmrcDetails'] = $hmrcDetails; + $this->container['autoEnrolmentSettings'] = $autoEnrolmentSettings; return $this; } /** - * Gets defaultPension + * Gets backPayEnabled * - * @return \SynergiTech\Staffology\Model\ContractPensionSelectionResponse|null + * @return bool|null */ - public function getDefaultPension(): ?\SynergiTech\Staffology\Model\ContractPensionSelectionResponse + public function getBackPayEnabled(): ?bool { - return $this->container['defaultPension']; + return $this->container['backPayEnabled']; } /** - * Sets defaultPension + * Sets backPayEnabled * - * @param \SynergiTech\Staffology\Model\ContractPensionSelectionResponse|null $defaultPension defaultPension + * @param bool|null $backPayEnabled backPayEnabled * * @return $this */ - public function setDefaultPension(?\SynergiTech\Staffology\Model\ContractPensionSelectionResponse $defaultPension): static + public function setBackPayEnabled(?bool $backPayEnabled): static { - if (is_null($defaultPension)) { - throw new InvalidArgumentException('non-nullable defaultPension cannot be null'); + if (is_null($backPayEnabled)) { + throw new InvalidArgumentException('non-nullable backPayEnabled cannot be null'); } - $this->container['defaultPension'] = $defaultPension; + $this->container['backPayEnabled'] = $backPayEnabled; return $this; } /** - * Gets rtiSubmissionSettings + * Gets bacsBureauNumber * - * @return \SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsResponse|null + * @return string|null */ - public function getRtiSubmissionSettings(): ?\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsResponse + public function getBacsBureauNumber(): ?string { - return $this->container['rtiSubmissionSettings']; + return $this->container['bacsBureauNumber']; } /** - * Sets rtiSubmissionSettings + * Sets bacsBureauNumber * - * @param \SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsResponse|null $rtiSubmissionSettings rtiSubmissionSettings + * @param string|null $bacsBureauNumber bacsBureauNumber * * @return $this */ - public function setRtiSubmissionSettings(?\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsResponse $rtiSubmissionSettings): static + public function setBacsBureauNumber(?string $bacsBureauNumber): static { - if (is_null($rtiSubmissionSettings)) { - throw new InvalidArgumentException('non-nullable rtiSubmissionSettings cannot be null'); + if (is_null($bacsBureauNumber)) { + array_push($this->openAPINullablesSetToNull, 'bacsBureauNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bacsBureauNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['rtiSubmissionSettings'] = $rtiSubmissionSettings; + $this->container['bacsBureauNumber'] = $bacsBureauNumber; return $this; } /** - * Gets leaveSettings + * Gets bacsIncludeAEO * - * @return \SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsResponse|null + * @return bool|null + */ + public function getBacsIncludeAEO(): ?bool + { + return $this->container['bacsIncludeAEO']; + } + + /** + * Sets bacsIncludeAEO + * + * @param bool|null $bacsIncludeAEO bacsIncludeAEO + * + * @return $this + */ + public function setBacsIncludeAEO(?bool $bacsIncludeAEO): static + { + if (is_null($bacsIncludeAEO)) { + throw new InvalidArgumentException('non-nullable bacsIncludeAEO cannot be null'); + } + $this->container['bacsIncludeAEO'] = $bacsIncludeAEO; + + return $this; + } + + /** + * Gets bacsIncludeDeductions + * + * @return bool|null */ - public function getLeaveSettings(): ?\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsResponse + public function getBacsIncludeDeductions(): ?bool { - return $this->container['leaveSettings']; + return $this->container['bacsIncludeDeductions']; } /** - * Sets leaveSettings + * Sets bacsIncludeDeductions * - * @param \SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsResponse|null $leaveSettings leaveSettings + * @param bool|null $bacsIncludeDeductions bacsIncludeDeductions * * @return $this */ - public function setLeaveSettings(?\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsResponse $leaveSettings): static + public function setBacsIncludeDeductions(?bool $bacsIncludeDeductions): static { - if (is_null($leaveSettings)) { - throw new InvalidArgumentException('non-nullable leaveSettings cannot be null'); + if (is_null($bacsIncludeDeductions)) { + throw new InvalidArgumentException('non-nullable bacsIncludeDeductions cannot be null'); } - $this->container['leaveSettings'] = $leaveSettings; + $this->container['bacsIncludeDeductions'] = $bacsIncludeDeductions; return $this; } /** - * Gets settings + * Gets bacsIncludeHmrc * - * @return \SynergiTech\Staffology\Model\ContractEmployerSettingsResponse|null + * @return bool|null */ - public function getSettings(): ?\SynergiTech\Staffology\Model\ContractEmployerSettingsResponse + public function getBacsIncludeHmrc(): ?bool { - return $this->container['settings']; + return $this->container['bacsIncludeHmrc']; } /** - * Sets settings + * Sets bacsIncludeHmrc * - * @param \SynergiTech\Staffology\Model\ContractEmployerSettingsResponse|null $settings settings + * @param bool|null $bacsIncludeHmrc bacsIncludeHmrc * * @return $this */ - public function setSettings(?\SynergiTech\Staffology\Model\ContractEmployerSettingsResponse $settings): static + public function setBacsIncludeHmrc(?bool $bacsIncludeHmrc): static { - if (is_null($settings)) { - throw new InvalidArgumentException('non-nullable settings cannot be null'); + if (is_null($bacsIncludeHmrc)) { + throw new InvalidArgumentException('non-nullable bacsIncludeHmrc cannot be null'); } - $this->container['settings'] = $settings; + $this->container['bacsIncludeHmrc'] = $bacsIncludeHmrc; return $this; } /** - * Gets umbrellaSettings + * Gets bacsIncludePensions * - * @return \SynergiTech\Staffology\Model\ContractUmbrellaSettingsResponse|null + * @return bool|null */ - public function getUmbrellaSettings(): ?\SynergiTech\Staffology\Model\ContractUmbrellaSettingsResponse + public function getBacsIncludePensions(): ?bool { - return $this->container['umbrellaSettings']; + return $this->container['bacsIncludePensions']; } /** - * Sets umbrellaSettings + * Sets bacsIncludePensions * - * @param \SynergiTech\Staffology\Model\ContractUmbrellaSettingsResponse|null $umbrellaSettings umbrellaSettings + * @param bool|null $bacsIncludePensions bacsIncludePensions * * @return $this */ - public function setUmbrellaSettings(?\SynergiTech\Staffology\Model\ContractUmbrellaSettingsResponse $umbrellaSettings): static + public function setBacsIncludePensions(?bool $bacsIncludePensions): static { - if (is_null($umbrellaSettings)) { - throw new InvalidArgumentException('non-nullable umbrellaSettings cannot be null'); + if (is_null($bacsIncludePensions)) { + throw new InvalidArgumentException('non-nullable bacsIncludePensions cannot be null'); } - $this->container['umbrellaSettings'] = $umbrellaSettings; + $this->container['bacsIncludePensions'] = $bacsIncludePensions; return $this; } /** - * Gets autoEnrolmentSettings + * Gets bacsServiceUserNumber * - * @return \SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsResponse|null + * @return string|null */ - public function getAutoEnrolmentSettings(): ?\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsResponse + public function getBacsServiceUserNumber(): ?string { - return $this->container['autoEnrolmentSettings']; + return $this->container['bacsServiceUserNumber']; } /** - * Sets autoEnrolmentSettings + * Sets bacsServiceUserNumber * - * @param \SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsResponse|null $autoEnrolmentSettings autoEnrolmentSettings + * @param string|null $bacsServiceUserNumber bacsServiceUserNumber * * @return $this */ - public function setAutoEnrolmentSettings(?\SynergiTech\Staffology\Model\ContractAutoEnrolmentSettingsResponse $autoEnrolmentSettings): static + public function setBacsServiceUserNumber(?string $bacsServiceUserNumber): static { - if (is_null($autoEnrolmentSettings)) { - throw new InvalidArgumentException('non-nullable autoEnrolmentSettings cannot be null'); + if (is_null($bacsServiceUserNumber)) { + array_push($this->openAPINullablesSetToNull, 'bacsServiceUserNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bacsServiceUserNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['autoEnrolmentSettings'] = $autoEnrolmentSettings; + $this->container['bacsServiceUserNumber'] = $bacsServiceUserNumber; return $this; } /** - * Gets id + * Gets bankDetails * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractSharedBankDetails|null */ - public function getId(): ?string + public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractSharedBankDetails { - return $this->container['id']; + return $this->container['bankDetails']; } /** - * Sets id + * Sets bankDetails * - * @param string|null $id id + * @param \SynergiTech\Staffology\Model\ContractSharedBankDetails|null $bankDetails bankDetails * * @return $this */ - public function setId(?string $id): static + public function setBankDetails(?\SynergiTech\Staffology\Model\ContractSharedBankDetails $bankDetails): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($bankDetails)) { + throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); } - $this->container['id'] = $id; + $this->container['bankDetails'] = $bankDetails; return $this; } /** - * Gets name + * Gets bankPaymentsCsvFormat * - * @return string|null + * @return \SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat|null */ - public function getName(): ?string + public function getBankPaymentsCsvFormat(): ?\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat { - return $this->container['name']; + return $this->container['bankPaymentsCsvFormat']; } /** - * Sets name + * Sets bankPaymentsCsvFormat * - * @param string|null $name name + * @param \SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat|null $bankPaymentsCsvFormat bankPaymentsCsvFormat * * @return $this */ - public function setName(?string $name): static + public function setBankPaymentsCsvFormat(?\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat $bankPaymentsCsvFormat): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($bankPaymentsCsvFormat)) { + throw new InvalidArgumentException('non-nullable bankPaymentsCsvFormat cannot be null'); } - $this->container['name'] = $name; + $this->container['bankPaymentsCsvFormat'] = $bankPaymentsCsvFormat; return $this; } /** - * Gets sourceSystemId + * Gets bankPaymentsReferenceFormat * * @return string|null */ - public function getSourceSystemId(): ?string + public function getBankPaymentsReferenceFormat(): ?string { - return $this->container['sourceSystemId']; + return $this->container['bankPaymentsReferenceFormat']; } /** - * Sets sourceSystemId + * Sets bankPaymentsReferenceFormat * - * @param string|null $sourceSystemId [readonly] Can only be given a value when the employer is created. It can then never be changed. Used by external systems so they can store an immutable reference + * @param string|null $bankPaymentsReferenceFormat bankPaymentsReferenceFormat * * @return $this */ - public function setSourceSystemId(?string $sourceSystemId): static + public function setBankPaymentsReferenceFormat(?string $bankPaymentsReferenceFormat): static { - if (is_null($sourceSystemId)) { - array_push($this->openAPINullablesSetToNull, 'sourceSystemId'); + if (is_null($bankPaymentsReferenceFormat)) { + array_push($this->openAPINullablesSetToNull, 'bankPaymentsReferenceFormat'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('sourceSystemId', $nullablesSetToNull); + $index = array_search('bankPaymentsReferenceFormat', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['sourceSystemId'] = $sourceSystemId; + $this->container['bankPaymentsReferenceFormat'] = $bankPaymentsReferenceFormat; return $this; } /** - * Gets crn + * Gets bereavementLeaveProRataRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getCrn(): ?string + public function getBereavementLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['crn']; + return $this->container['bereavementLeaveProRataRule']; } /** - * Sets crn + * Sets bereavementLeaveProRataRule * - * @param string|null $crn Company Registration Number + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $bereavementLeaveProRataRule bereavementLeaveProRataRule * * @return $this */ - public function setCrn(?string $crn): static + public function setBereavementLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $bereavementLeaveProRataRule): static { - if (is_null($crn)) { - array_push($this->openAPINullablesSetToNull, 'crn'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('crn', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($bereavementLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable bereavementLeaveProRataRule cannot be null'); } - $this->container['crn'] = $crn; + $this->container['bereavementLeaveProRataRule'] = $bereavementLeaveProRataRule; return $this; } /** - * Gets logoUrl + * Gets betaFeatures * - * @return string|null + * @return \SynergiTech\Staffology\Model\EmployerBetaFeatures|null */ - public function getLogoUrl(): ?string + public function getBetaFeatures(): ?\SynergiTech\Staffology\Model\EmployerBetaFeatures { - return $this->container['logoUrl']; + return $this->container['betaFeatures']; } /** - * Sets logoUrl + * Sets betaFeatures * - * @param string|null $logoUrl logoUrl + * @param \SynergiTech\Staffology\Model\EmployerBetaFeatures|null $betaFeatures betaFeatures * * @return $this */ - public function setLogoUrl(?string $logoUrl): static + public function setBetaFeatures(?\SynergiTech\Staffology\Model\EmployerBetaFeatures $betaFeatures): static { - if (is_null($logoUrl)) { - array_push($this->openAPINullablesSetToNull, 'logoUrl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('logoUrl', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($betaFeatures)) { + throw new InvalidArgumentException('non-nullable betaFeatures cannot be null'); } - $this->container['logoUrl'] = $logoUrl; + $this->container['betaFeatures'] = $betaFeatures; return $this; } /** - * Gets logoSasUrl + * Gets canUseBureauFeatures * - * @return string|null + * @return bool|null */ - public function getLogoSasUrl(): ?string + public function getCanUseBureauFeatures(): ?bool { - return $this->container['logoSasUrl']; + return $this->container['canUseBureauFeatures']; } /** - * Sets logoSasUrl + * Sets canUseBureauFeatures * - * @param string|null $logoSasUrl logoSasUrl + * @param bool|null $canUseBureauFeatures canUseBureauFeatures * * @return $this */ - public function setLogoSasUrl(?string $logoSasUrl): static + public function setCanUseBureauFeatures(?bool $canUseBureauFeatures): static { - if (is_null($logoSasUrl)) { - array_push($this->openAPINullablesSetToNull, 'logoSasUrl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('logoSasUrl', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($canUseBureauFeatures)) { + throw new InvalidArgumentException('non-nullable canUseBureauFeatures cannot be null'); } - $this->container['logoSasUrl'] = $logoSasUrl; + $this->container['canUseBureauFeatures'] = $canUseBureauFeatures; return $this; } /** - * Gets alternativeId + * Gets canUsePremiumConnectors * - * @return string|null + * @return bool|null */ - public function getAlternativeId(): ?string + public function getCanUsePremiumConnectors(): ?bool { - return $this->container['alternativeId']; + return $this->container['canUsePremiumConnectors']; } /** - * Sets alternativeId + * Sets canUsePremiumConnectors * - * @param string|null $alternativeId alternativeId + * @param bool|null $canUsePremiumConnectors Indicates whether the employer has permission to use the premium connectors feature. * * @return $this */ - public function setAlternativeId(?string $alternativeId): static + public function setCanUsePremiumConnectors(?bool $canUsePremiumConnectors): static { - if (is_null($alternativeId)) { - array_push($this->openAPINullablesSetToNull, 'alternativeId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('alternativeId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($canUsePremiumConnectors)) { + throw new InvalidArgumentException('non-nullable canUsePremiumConnectors cannot be null'); } - $this->container['alternativeId'] = $alternativeId; + $this->container['canUsePremiumConnectors'] = $canUsePremiumConnectors; return $this; } /** - * Gets bankPaymentsCsvFormat + * Gets costCentreJournalOverridesEnabled * - * @return \SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat|null + * @return bool|null */ - public function getBankPaymentsCsvFormat(): ?\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat + public function getCostCentreJournalOverridesEnabled(): ?bool { - return $this->container['bankPaymentsCsvFormat']; + return $this->container['costCentreJournalOverridesEnabled']; } /** - * Sets bankPaymentsCsvFormat + * Sets costCentreJournalOverridesEnabled * - * @param \SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat|null $bankPaymentsCsvFormat bankPaymentsCsvFormat + * @param bool|null $costCentreJournalOverridesEnabled Enables the journal overrides for cost centre, if set to true. * * @return $this */ - public function setBankPaymentsCsvFormat(?\SynergiTech\Staffology\Model\BankPaymentInstructionsCsvFormat $bankPaymentsCsvFormat): static + public function setCostCentreJournalOverridesEnabled(?bool $costCentreJournalOverridesEnabled): static { - if (is_null($bankPaymentsCsvFormat)) { - throw new InvalidArgumentException('non-nullable bankPaymentsCsvFormat cannot be null'); + if (is_null($costCentreJournalOverridesEnabled)) { + throw new InvalidArgumentException('non-nullable costCentreJournalOverridesEnabled cannot be null'); } - $this->container['bankPaymentsCsvFormat'] = $bankPaymentsCsvFormat; + $this->container['costCentreJournalOverridesEnabled'] = $costCentreJournalOverridesEnabled; return $this; } /** - * Gets bacsServiceUserNumber + * Gets crn * * @return string|null */ - public function getBacsServiceUserNumber(): ?string + public function getCrn(): ?string { - return $this->container['bacsServiceUserNumber']; + return $this->container['crn']; } /** - * Sets bacsServiceUserNumber + * Sets crn * - * @param string|null $bacsServiceUserNumber bacsServiceUserNumber + * @param string|null $crn Company Registration Number * * @return $this */ - public function setBacsServiceUserNumber(?string $bacsServiceUserNumber): static + public function setCrn(?string $crn): static { - if (is_null($bacsServiceUserNumber)) { - array_push($this->openAPINullablesSetToNull, 'bacsServiceUserNumber'); + if (is_null($crn)) { + array_push($this->openAPINullablesSetToNull, 'crn'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bacsServiceUserNumber', $nullablesSetToNull); + $index = array_search('crn', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['bacsServiceUserNumber'] = $bacsServiceUserNumber; + $this->container['crn'] = $crn; return $this; } /** - * Gets bacsBureauNumber + * Gets currentYear * - * @return string|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getBacsBureauNumber(): ?string + public function getCurrentYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['bacsBureauNumber']; + return $this->container['currentYear']; } /** - * Sets bacsBureauNumber + * Sets currentYear * - * @param string|null $bacsBureauNumber bacsBureauNumber + * @param \SynergiTech\Staffology\Model\TaxYear|null $currentYear currentYear * * @return $this */ - public function setBacsBureauNumber(?string $bacsBureauNumber): static + public function setCurrentYear(?\SynergiTech\Staffology\Model\TaxYear $currentYear): static { - if (is_null($bacsBureauNumber)) { - array_push($this->openAPINullablesSetToNull, 'bacsBureauNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bacsBureauNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($currentYear)) { + throw new InvalidArgumentException('non-nullable currentYear cannot be null'); } - $this->container['bacsBureauNumber'] = $bacsBureauNumber; + $this->container['currentYear'] = $currentYear; return $this; } /** - * Gets rejectInvalidBankDetails + * Gets defaultPayOptions * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractPayOptionsResponse|null */ - public function getRejectInvalidBankDetails(): ?bool + public function getDefaultPayOptions(): ?\SynergiTech\Staffology\Model\ContractPayOptionsResponse { - return $this->container['rejectInvalidBankDetails']; + return $this->container['defaultPayOptions']; } /** - * Sets rejectInvalidBankDetails + * Sets defaultPayOptions * - * @param bool|null $rejectInvalidBankDetails rejectInvalidBankDetails + * @param \SynergiTech\Staffology\Model\ContractPayOptionsResponse|null $defaultPayOptions defaultPayOptions * * @return $this */ - public function setRejectInvalidBankDetails(?bool $rejectInvalidBankDetails): static + public function setDefaultPayOptions(?\SynergiTech\Staffology\Model\ContractPayOptionsResponse $defaultPayOptions): static { - if (is_null($rejectInvalidBankDetails)) { - throw new InvalidArgumentException('non-nullable rejectInvalidBankDetails cannot be null'); + if (is_null($defaultPayOptions)) { + throw new InvalidArgumentException('non-nullable defaultPayOptions cannot be null'); } - $this->container['rejectInvalidBankDetails'] = $rejectInvalidBankDetails; + $this->container['defaultPayOptions'] = $defaultPayOptions; return $this; } /** - * Gets bankPaymentsReferenceFormat + * Gets defaultPension * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractPensionSelectionResponse|null */ - public function getBankPaymentsReferenceFormat(): ?string + public function getDefaultPension(): ?\SynergiTech\Staffology\Model\ContractPensionSelectionResponse { - return $this->container['bankPaymentsReferenceFormat']; + return $this->container['defaultPension']; } /** - * Sets bankPaymentsReferenceFormat + * Sets defaultPension * - * @param string|null $bankPaymentsReferenceFormat bankPaymentsReferenceFormat + * @param \SynergiTech\Staffology\Model\ContractPensionSelectionResponse|null $defaultPension defaultPension * * @return $this */ - public function setBankPaymentsReferenceFormat(?string $bankPaymentsReferenceFormat): static + public function setDefaultPension(?\SynergiTech\Staffology\Model\ContractPensionSelectionResponse $defaultPension): static { - if (is_null($bankPaymentsReferenceFormat)) { - array_push($this->openAPINullablesSetToNull, 'bankPaymentsReferenceFormat'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankPaymentsReferenceFormat', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($defaultPension)) { + throw new InvalidArgumentException('non-nullable defaultPension cannot be null'); } - $this->container['bankPaymentsReferenceFormat'] = $bankPaymentsReferenceFormat; + $this->container['defaultPension'] = $defaultPension; return $this; } /** - * Gets bacsIncludeAEO + * Gets departmentJournalOverridesEnabled * * @return bool|null */ - public function getBacsIncludeAEO(): ?bool + public function getDepartmentJournalOverridesEnabled(): ?bool { - return $this->container['bacsIncludeAEO']; + return $this->container['departmentJournalOverridesEnabled']; } /** - * Sets bacsIncludeAEO + * Sets departmentJournalOverridesEnabled * - * @param bool|null $bacsIncludeAEO bacsIncludeAEO + * @param bool|null $departmentJournalOverridesEnabled Enables the journal overrides for departments, if set to true. * * @return $this */ - public function setBacsIncludeAEO(?bool $bacsIncludeAEO): static + public function setDepartmentJournalOverridesEnabled(?bool $departmentJournalOverridesEnabled): static { - if (is_null($bacsIncludeAEO)) { - throw new InvalidArgumentException('non-nullable bacsIncludeAEO cannot be null'); + if (is_null($departmentJournalOverridesEnabled)) { + throw new InvalidArgumentException('non-nullable departmentJournalOverridesEnabled cannot be null'); } - $this->container['bacsIncludeAEO'] = $bacsIncludeAEO; + $this->container['departmentJournalOverridesEnabled'] = $departmentJournalOverridesEnabled; return $this; } /** - * Gets bacsIncludeDeductions + * Gets displayName * - * @return bool|null + * @return string|null */ - public function getBacsIncludeDeductions(): ?bool + public function getDisplayName(): ?string { - return $this->container['bacsIncludeDeductions']; + return $this->container['displayName']; } /** - * Sets bacsIncludeDeductions + * Sets displayName * - * @param bool|null $bacsIncludeDeductions bacsIncludeDeductions + * @param string|null $displayName displayName * * @return $this */ - public function setBacsIncludeDeductions(?bool $bacsIncludeDeductions): static + public function setDisplayName(?string $displayName): static { - if (is_null($bacsIncludeDeductions)) { - throw new InvalidArgumentException('non-nullable bacsIncludeDeductions cannot be null'); + if (is_null($displayName)) { + array_push($this->openAPINullablesSetToNull, 'displayName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('displayName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['bacsIncludeDeductions'] = $bacsIncludeDeductions; + $this->container['displayName'] = $displayName; return $this; } /** - * Gets bacsIncludeHmrc + * Gets educationPayrollEnabled * * @return bool|null */ - public function getBacsIncludeHmrc(): ?bool + public function getEducationPayrollEnabled(): ?bool { - return $this->container['bacsIncludeHmrc']; + return $this->container['educationPayrollEnabled']; } /** - * Sets bacsIncludeHmrc + * Sets educationPayrollEnabled * - * @param bool|null $bacsIncludeHmrc bacsIncludeHmrc + * @param bool|null $educationPayrollEnabled educationPayrollEnabled * * @return $this */ - public function setBacsIncludeHmrc(?bool $bacsIncludeHmrc): static + public function setEducationPayrollEnabled(?bool $educationPayrollEnabled): static { - if (is_null($bacsIncludeHmrc)) { - throw new InvalidArgumentException('non-nullable bacsIncludeHmrc cannot be null'); + if (is_null($educationPayrollEnabled)) { + throw new InvalidArgumentException('non-nullable educationPayrollEnabled cannot be null'); } - $this->container['bacsIncludeHmrc'] = $bacsIncludeHmrc; + $this->container['educationPayrollEnabled'] = $educationPayrollEnabled; return $this; } /** - * Gets bacsIncludePensions + * Gets effectiveDateWorkingPatternsEnabled * * @return bool|null */ - public function getBacsIncludePensions(): ?bool + public function getEffectiveDateWorkingPatternsEnabled(): ?bool { - return $this->container['bacsIncludePensions']; + return $this->container['effectiveDateWorkingPatternsEnabled']; } /** - * Sets bacsIncludePensions + * Sets effectiveDateWorkingPatternsEnabled * - * @param bool|null $bacsIncludePensions bacsIncludePensions + * @param bool|null $effectiveDateWorkingPatternsEnabled effectiveDateWorkingPatternsEnabled * * @return $this */ - public function setBacsIncludePensions(?bool $bacsIncludePensions): static + public function setEffectiveDateWorkingPatternsEnabled(?bool $effectiveDateWorkingPatternsEnabled): static { - if (is_null($bacsIncludePensions)) { - throw new InvalidArgumentException('non-nullable bacsIncludePensions cannot be null'); + if (is_null($effectiveDateWorkingPatternsEnabled)) { + throw new InvalidArgumentException('non-nullable effectiveDateWorkingPatternsEnabled cannot be null'); } - $this->container['bacsIncludePensions'] = $bacsIncludePensions; + $this->container['effectiveDateWorkingPatternsEnabled'] = $effectiveDateWorkingPatternsEnabled; return $this; } /** - * Gets useTenantRtiSubmissionSettings + * Gets employeeCount * - * @return bool|null + * @return int|null */ - public function getUseTenantRtiSubmissionSettings(): ?bool + public function getEmployeeCount(): ?int { - return $this->container['useTenantRtiSubmissionSettings']; + return $this->container['employeeCount']; } /** - * Sets useTenantRtiSubmissionSettings + * Sets employeeCount * - * @param bool|null $useTenantRtiSubmissionSettings If the Tenant for this employer has Bureau Features enabled then they can set RtiSubmissionSettings to be used across multiple employers. If this is set to true then those settings will be used instead of any set at the Employer level + * @param int|null $employeeCount The default LeaveSettings. Only the Allowance and AllowanceResetDate fields are used. * * @return $this */ - public function setUseTenantRtiSubmissionSettings(?bool $useTenantRtiSubmissionSettings): static + public function setEmployeeCount(?int $employeeCount): static { - if (is_null($useTenantRtiSubmissionSettings)) { - throw new InvalidArgumentException('non-nullable useTenantRtiSubmissionSettings cannot be null'); + if (is_null($employeeCount)) { + throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); } - $this->container['useTenantRtiSubmissionSettings'] = $useTenantRtiSubmissionSettings; + $this->container['employeeCount'] = $employeeCount; return $this; } /** - * Gets accruePayCodeSetUniqueId + * Gets evcId * * @return string|null */ - public function getAccruePayCodeSetUniqueId(): ?string + public function getEvcId(): ?string { - return $this->container['accruePayCodeSetUniqueId']; + return $this->container['evcId']; } /** - * Sets accruePayCodeSetUniqueId + * Sets evcId * - * @param string|null $accruePayCodeSetUniqueId accruePayCodeSetUniqueId + * @param string|null $evcId If set then this will be used as the Employer ID sent to EVC in place of the standard EmployerId. * * @return $this */ - public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static + public function setEvcId(?string $evcId): static { - if (is_null($accruePayCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); + if (is_null($evcId)) { + array_push($this->openAPINullablesSetToNull, 'evcId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); + $index = array_search('evcId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; + $this->container['evcId'] = $evcId; return $this; } /** - * Gets employeeCount + * Gets hmrcDetails * - * @return int|null + * @return \SynergiTech\Staffology\Model\ContractHmrcDetailsResponse|null */ - public function getEmployeeCount(): ?int + public function getHmrcDetails(): ?\SynergiTech\Staffology\Model\ContractHmrcDetailsResponse { - return $this->container['employeeCount']; + return $this->container['hmrcDetails']; } /** - * Sets employeeCount + * Sets hmrcDetails * - * @param int|null $employeeCount The default LeaveSettings. Only the Allowance and AllowanceResetDate fields are used. + * @param \SynergiTech\Staffology\Model\ContractHmrcDetailsResponse|null $hmrcDetails hmrcDetails * * @return $this */ - public function setEmployeeCount(?int $employeeCount): static + public function setHmrcDetails(?\SynergiTech\Staffology\Model\ContractHmrcDetailsResponse $hmrcDetails): static + { + if (is_null($hmrcDetails)) { + throw new InvalidArgumentException('non-nullable hmrcDetails cannot be null'); + } + $this->container['hmrcDetails'] = $hmrcDetails; + + return $this; + } + + /** + * Gets holidayAccrualBasis + * + * @return \SynergiTech\Staffology\Model\HolidayAccrual|null + */ + public function getHolidayAccrualBasis(): ?\SynergiTech\Staffology\Model\HolidayAccrual + { + return $this->container['holidayAccrualBasis']; + } + + /** + * Sets holidayAccrualBasis + * + * @param \SynergiTech\Staffology\Model\HolidayAccrual|null $holidayAccrualBasis holidayAccrualBasis + * + * @return $this + */ + public function setHolidayAccrualBasis(?\SynergiTech\Staffology\Model\HolidayAccrual $holidayAccrualBasis): static { - if (is_null($employeeCount)) { - throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); + if (is_null($holidayAccrualBasis)) { + throw new InvalidArgumentException('non-nullable holidayAccrualBasis cannot be null'); } - $this->container['employeeCount'] = $employeeCount; + $this->container['holidayAccrualBasis'] = $holidayAccrualBasis; return $this; } /** - * Gets subcontractorCount + * Gets holidayAccrualDefaultRateType * - * @return int|null + * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null */ - public function getSubcontractorCount(): ?int + public function getHolidayAccrualDefaultRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType { - return $this->container['subcontractorCount']; + return $this->container['holidayAccrualDefaultRateType']; } /** - * Sets subcontractorCount + * Sets holidayAccrualDefaultRateType * - * @param int|null $subcontractorCount [readonly] The number of CIS Subcontractors this Employer has. + * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $holidayAccrualDefaultRateType holidayAccrualDefaultRateType * * @return $this */ - public function setSubcontractorCount(?int $subcontractorCount): static + public function setHolidayAccrualDefaultRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $holidayAccrualDefaultRateType): static { - if (is_null($subcontractorCount)) { - throw new InvalidArgumentException('non-nullable subcontractorCount cannot be null'); + if (is_null($holidayAccrualDefaultRateType)) { + throw new InvalidArgumentException('non-nullable holidayAccrualDefaultRateType cannot be null'); } - $this->container['subcontractorCount'] = $subcontractorCount; + $this->container['holidayAccrualDefaultRateType'] = $holidayAccrualDefaultRateType; return $this; } /** - * Gets startYear + * Gets holidayLeaveProRataRule * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getStartYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getHolidayLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['startYear']; + return $this->container['holidayLeaveProRataRule']; } /** - * Sets startYear + * Sets holidayLeaveProRataRule * - * @param \SynergiTech\Staffology\Model\TaxYear|null $startYear startYear + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $holidayLeaveProRataRule holidayLeaveProRataRule * * @return $this */ - public function setStartYear(?\SynergiTech\Staffology\Model\TaxYear $startYear): static + public function setHolidayLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $holidayLeaveProRataRule): static { - if (is_null($startYear)) { - throw new InvalidArgumentException('non-nullable startYear cannot be null'); + if (is_null($holidayLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable holidayLeaveProRataRule cannot be null'); } - $this->container['startYear'] = $startYear; + $this->container['holidayLeaveProRataRule'] = $holidayLeaveProRataRule; return $this; } /** - * Gets currentYear + * Gets id * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return string|null */ - public function getCurrentYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getId(): ?string { - return $this->container['currentYear']; + return $this->container['id']; } /** - * Sets currentYear + * Sets id * - * @param \SynergiTech\Staffology\Model\TaxYear|null $currentYear currentYear + * @param string|null $id id * * @return $this */ - public function setCurrentYear(?\SynergiTech\Staffology\Model\TaxYear $currentYear): static + public function setId(?string $id): static { - if (is_null($currentYear)) { - throw new InvalidArgumentException('non-nullable currentYear cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['currentYear'] = $currentYear; + $this->container['id'] = $id; return $this; } /** - * Gets supportAccessEnabled + * Gets isOptedInToEvc * * @return bool|null */ - public function getSupportAccessEnabled(): ?bool + public function getIsOptedInToEvc(): ?bool { - return $this->container['supportAccessEnabled']; + return $this->container['isOptedInToEvc']; } /** - * Sets supportAccessEnabled + * Sets isOptedInToEvc * - * @param bool|null $supportAccessEnabled If set to true then the support team can access this employer to help resolve support queries + * @param bool|null $isOptedInToEvc [readonly] Indicates whether or not the Employer is opted in to the Employee Verification Programme. Value can only be changed by its dedicated API end point. * * @return $this */ - public function setSupportAccessEnabled(?bool $supportAccessEnabled): static + public function setIsOptedInToEvc(?bool $isOptedInToEvc): static { - if (is_null($supportAccessEnabled)) { - throw new InvalidArgumentException('non-nullable supportAccessEnabled cannot be null'); + if (is_null($isOptedInToEvc)) { + throw new InvalidArgumentException('non-nullable isOptedInToEvc cannot be null'); } - $this->container['supportAccessEnabled'] = $supportAccessEnabled; + $this->container['isOptedInToEvc'] = $isOptedInToEvc; return $this; } /** - * Gets archived + * Gets leaveSettings * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsResponse|null */ - public function getArchived(): ?bool + public function getLeaveSettings(): ?\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsResponse { - return $this->container['archived']; + return $this->container['leaveSettings']; } /** - * Sets archived + * Sets leaveSettings * - * @param bool|null $archived A flag to indicate whather or not the employer is Archived, ie no longer actively used + * @param \SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsResponse|null $leaveSettings leaveSettings * * @return $this */ - public function setArchived(?bool $archived): static + public function setLeaveSettings(?\SynergiTech\Staffology\Model\ContractEmployerLeaveSettingsResponse $leaveSettings): static { - if (is_null($archived)) { - throw new InvalidArgumentException('non-nullable archived cannot be null'); + if (is_null($leaveSettings)) { + throw new InvalidArgumentException('non-nullable leaveSettings cannot be null'); } - $this->container['archived'] = $archived; + $this->container['leaveSettings'] = $leaveSettings; return $this; } /** - * Gets canUseBureauFeatures + * Gets logoSasUrl * - * @return bool|null + * @return string|null */ - public function getCanUseBureauFeatures(): ?bool + public function getLogoSasUrl(): ?string { - return $this->container['canUseBureauFeatures']; + return $this->container['logoSasUrl']; } /** - * Sets canUseBureauFeatures + * Sets logoSasUrl * - * @param bool|null $canUseBureauFeatures canUseBureauFeatures + * @param string|null $logoSasUrl logoSasUrl * * @return $this */ - public function setCanUseBureauFeatures(?bool $canUseBureauFeatures): static + public function setLogoSasUrl(?string $logoSasUrl): static { - if (is_null($canUseBureauFeatures)) { - throw new InvalidArgumentException('non-nullable canUseBureauFeatures cannot be null'); + if (is_null($logoSasUrl)) { + array_push($this->openAPINullablesSetToNull, 'logoSasUrl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('logoSasUrl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['canUseBureauFeatures'] = $canUseBureauFeatures; + $this->container['logoSasUrl'] = $logoSasUrl; return $this; } /** - * Gets multiRoleEnabled + * Gets logoUrl * - * @return bool|null + * @return string|null */ - public function getMultiRoleEnabled(): ?bool + public function getLogoUrl(): ?string { - return $this->container['multiRoleEnabled']; + return $this->container['logoUrl']; } /** - * Sets multiRoleEnabled + * Sets logoUrl * - * @param bool|null $multiRoleEnabled multiRoleEnabled + * @param string|null $logoUrl logoUrl * * @return $this */ - public function setMultiRoleEnabled(?bool $multiRoleEnabled): static + public function setLogoUrl(?string $logoUrl): static { - if (is_null($multiRoleEnabled)) { - throw new InvalidArgumentException('non-nullable multiRoleEnabled cannot be null'); + if (is_null($logoUrl)) { + array_push($this->openAPINullablesSetToNull, 'logoUrl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('logoUrl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['multiRoleEnabled'] = $multiRoleEnabled; + $this->container['logoUrl'] = $logoUrl; return $this; } /** - * Gets educationPayrollEnabled + * Gets mfaEnabled * * @return bool|null */ - public function getEducationPayrollEnabled(): ?bool + public function getMfaEnabled(): ?bool { - return $this->container['educationPayrollEnabled']; + return $this->container['mfaEnabled']; } /** - * Sets educationPayrollEnabled + * Sets mfaEnabled * - * @param bool|null $educationPayrollEnabled educationPayrollEnabled + * @param bool|null $mfaEnabled if set to true requires all users to setup MFA support queries * * @return $this */ - public function setEducationPayrollEnabled(?bool $educationPayrollEnabled): static + public function setMfaEnabled(?bool $mfaEnabled): static { - if (is_null($educationPayrollEnabled)) { - throw new InvalidArgumentException('non-nullable educationPayrollEnabled cannot be null'); + if (is_null($mfaEnabled)) { + throw new InvalidArgumentException('non-nullable mfaEnabled cannot be null'); } - $this->container['educationPayrollEnabled'] = $educationPayrollEnabled; + $this->container['mfaEnabled'] = $mfaEnabled; return $this; } /** - * Gets effectiveDateWorkingPatternsEnabled + * Gets multiRoleEnabled * * @return bool|null */ - public function getEffectiveDateWorkingPatternsEnabled(): ?bool + public function getMultiRoleEnabled(): ?bool { - return $this->container['effectiveDateWorkingPatternsEnabled']; + return $this->container['multiRoleEnabled']; } /** - * Sets effectiveDateWorkingPatternsEnabled + * Sets multiRoleEnabled * - * @param bool|null $effectiveDateWorkingPatternsEnabled effectiveDateWorkingPatternsEnabled + * @param bool|null $multiRoleEnabled multiRoleEnabled * * @return $this */ - public function setEffectiveDateWorkingPatternsEnabled(?bool $effectiveDateWorkingPatternsEnabled): static + public function setMultiRoleEnabled(?bool $multiRoleEnabled): static { - if (is_null($effectiveDateWorkingPatternsEnabled)) { - throw new InvalidArgumentException('non-nullable effectiveDateWorkingPatternsEnabled cannot be null'); + if (is_null($multiRoleEnabled)) { + throw new InvalidArgumentException('non-nullable multiRoleEnabled cannot be null'); } - $this->container['effectiveDateWorkingPatternsEnabled'] = $effectiveDateWorkingPatternsEnabled; + $this->container['multiRoleEnabled'] = $multiRoleEnabled; return $this; } /** - * Gets backPayEnabled + * Gets name * - * @return bool|null + * @return string|null */ - public function getBackPayEnabled(): ?bool + public function getName(): ?string { - return $this->container['backPayEnabled']; + return $this->container['name']; } /** - * Sets backPayEnabled + * Sets name * - * @param bool|null $backPayEnabled backPayEnabled + * @param string|null $name name * * @return $this */ - public function setBackPayEnabled(?bool $backPayEnabled): static + public function setName(?string $name): static { - if (is_null($backPayEnabled)) { - throw new InvalidArgumentException('non-nullable backPayEnabled cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['backPayEnabled'] = $backPayEnabled; + $this->container['name'] = $name; return $this; } /** - * Gets displayName + * Gets parentalLeaveProRataRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getDisplayName(): ?string + public function getParentalLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['displayName']; + return $this->container['parentalLeaveProRataRule']; } /** - * Sets displayName + * Sets parentalLeaveProRataRule * - * @param string|null $displayName displayName + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $parentalLeaveProRataRule parentalLeaveProRataRule * * @return $this */ - public function setDisplayName(?string $displayName): static + public function setParentalLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $parentalLeaveProRataRule): static { - if (is_null($displayName)) { - array_push($this->openAPINullablesSetToNull, 'displayName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('displayName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($parentalLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable parentalLeaveProRataRule cannot be null'); } - $this->container['displayName'] = $displayName; + $this->container['parentalLeaveProRataRule'] = $parentalLeaveProRataRule; return $this; } /** - * Gets isOptedInToEvc + * Gets rejectInvalidBankDetails * * @return bool|null */ - public function getIsOptedInToEvc(): ?bool + public function getRejectInvalidBankDetails(): ?bool { - return $this->container['isOptedInToEvc']; + return $this->container['rejectInvalidBankDetails']; } /** - * Sets isOptedInToEvc + * Sets rejectInvalidBankDetails * - * @param bool|null $isOptedInToEvc [readonly] Indicates whether or not the Employer is opted in to the Employee Verification Programme. Value can only be changed by its dedicated API end point. + * @param bool|null $rejectInvalidBankDetails rejectInvalidBankDetails * * @return $this */ - public function setIsOptedInToEvc(?bool $isOptedInToEvc): static + public function setRejectInvalidBankDetails(?bool $rejectInvalidBankDetails): static { - if (is_null($isOptedInToEvc)) { - throw new InvalidArgumentException('non-nullable isOptedInToEvc cannot be null'); + if (is_null($rejectInvalidBankDetails)) { + throw new InvalidArgumentException('non-nullable rejectInvalidBankDetails cannot be null'); } - $this->container['isOptedInToEvc'] = $isOptedInToEvc; + $this->container['rejectInvalidBankDetails'] = $rejectInvalidBankDetails; return $this; } /** - * Gets evcId + * Gets rtiSubmissionSettings * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsResponse|null */ - public function getEvcId(): ?string + public function getRtiSubmissionSettings(): ?\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsResponse { - return $this->container['evcId']; + return $this->container['rtiSubmissionSettings']; } /** - * Sets evcId + * Sets rtiSubmissionSettings * - * @param string|null $evcId If set then this will be used as the Employer ID sent to EVC in place of the standard EmployerId. + * @param \SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsResponse|null $rtiSubmissionSettings rtiSubmissionSettings * * @return $this */ - public function setEvcId(?string $evcId): static + public function setRtiSubmissionSettings(?\SynergiTech\Staffology\Model\ContractRtiSubmissionSettingsResponse $rtiSubmissionSettings): static { - if (is_null($evcId)) { - array_push($this->openAPINullablesSetToNull, 'evcId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('evcId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($rtiSubmissionSettings)) { + throw new InvalidArgumentException('non-nullable rtiSubmissionSettings cannot be null'); } - $this->container['evcId'] = $evcId; + $this->container['rtiSubmissionSettings'] = $rtiSubmissionSettings; return $this; } /** - * Gets holidayAccrualBasis + * Gets settings * - * @return \SynergiTech\Staffology\Model\HolidayAccrual|null + * @return \SynergiTech\Staffology\Model\ContractEmployerSettingsResponse|null */ - public function getHolidayAccrualBasis(): ?\SynergiTech\Staffology\Model\HolidayAccrual + public function getSettings(): ?\SynergiTech\Staffology\Model\ContractEmployerSettingsResponse { - return $this->container['holidayAccrualBasis']; + return $this->container['settings']; } /** - * Sets holidayAccrualBasis + * Sets settings * - * @param \SynergiTech\Staffology\Model\HolidayAccrual|null $holidayAccrualBasis holidayAccrualBasis + * @param \SynergiTech\Staffology\Model\ContractEmployerSettingsResponse|null $settings settings * * @return $this */ - public function setHolidayAccrualBasis(?\SynergiTech\Staffology\Model\HolidayAccrual $holidayAccrualBasis): static + public function setSettings(?\SynergiTech\Staffology\Model\ContractEmployerSettingsResponse $settings): static { - if (is_null($holidayAccrualBasis)) { - throw new InvalidArgumentException('non-nullable holidayAccrualBasis cannot be null'); + if (is_null($settings)) { + throw new InvalidArgumentException('non-nullable settings cannot be null'); } - $this->container['holidayAccrualBasis'] = $holidayAccrualBasis; + $this->container['settings'] = $settings; return $this; } /** - * Gets holidayAccrualDefaultRateType + * Gets settingsSortPayrollNumbersAlphanumerically * - * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null + * @return bool|null */ - public function getHolidayAccrualDefaultRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType + public function getSettingsSortPayrollNumbersAlphanumerically(): ?bool { - return $this->container['holidayAccrualDefaultRateType']; + return $this->container['settingsSortPayrollNumbersAlphanumerically']; } /** - * Sets holidayAccrualDefaultRateType + * Sets settingsSortPayrollNumbersAlphanumerically * - * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $holidayAccrualDefaultRateType holidayAccrualDefaultRateType + * @param bool|null $settingsSortPayrollNumbersAlphanumerically Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied * * @return $this */ - public function setHolidayAccrualDefaultRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $holidayAccrualDefaultRateType): static + public function setSettingsSortPayrollNumbersAlphanumerically(?bool $settingsSortPayrollNumbersAlphanumerically): static { - if (is_null($holidayAccrualDefaultRateType)) { - throw new InvalidArgumentException('non-nullable holidayAccrualDefaultRateType cannot be null'); + if (is_null($settingsSortPayrollNumbersAlphanumerically)) { + throw new InvalidArgumentException('non-nullable settingsSortPayrollNumbersAlphanumerically cannot be null'); } - $this->container['holidayAccrualDefaultRateType'] = $holidayAccrualDefaultRateType; + $this->container['settingsSortPayrollNumbersAlphanumerically'] = $settingsSortPayrollNumbersAlphanumerically; return $this; } /** - * Gets mfaEnabled + * Gets sickLeaveProRataRule * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getMfaEnabled(): ?bool + public function getSickLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['mfaEnabled']; + return $this->container['sickLeaveProRataRule']; } /** - * Sets mfaEnabled + * Sets sickLeaveProRataRule * - * @param bool|null $mfaEnabled if set to true requires all users to setup MFA support queries + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $sickLeaveProRataRule sickLeaveProRataRule * * @return $this */ - public function setMfaEnabled(?bool $mfaEnabled): static + public function setSickLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $sickLeaveProRataRule): static { - if (is_null($mfaEnabled)) { - throw new InvalidArgumentException('non-nullable mfaEnabled cannot be null'); + if (is_null($sickLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable sickLeaveProRataRule cannot be null'); } - $this->container['mfaEnabled'] = $mfaEnabled; + $this->container['sickLeaveProRataRule'] = $sickLeaveProRataRule; return $this; } /** - * Gets departmentJournalOverridesEnabled + * Gets sourceSystemId * - * @return bool|null + * @return string|null */ - public function getDepartmentJournalOverridesEnabled(): ?bool + public function getSourceSystemId(): ?string { - return $this->container['departmentJournalOverridesEnabled']; + return $this->container['sourceSystemId']; } /** - * Sets departmentJournalOverridesEnabled + * Sets sourceSystemId * - * @param bool|null $departmentJournalOverridesEnabled Enables the journal overrides for departments, if set to true. + * @param string|null $sourceSystemId [readonly] Can only be given a value when the employer is created. It can then never be changed. Used by external systems so they can store an immutable reference * * @return $this */ - public function setDepartmentJournalOverridesEnabled(?bool $departmentJournalOverridesEnabled): static + public function setSourceSystemId(?string $sourceSystemId): static { - if (is_null($departmentJournalOverridesEnabled)) { - throw new InvalidArgumentException('non-nullable departmentJournalOverridesEnabled cannot be null'); + if (is_null($sourceSystemId)) { + array_push($this->openAPINullablesSetToNull, 'sourceSystemId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('sourceSystemId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['departmentJournalOverridesEnabled'] = $departmentJournalOverridesEnabled; + $this->container['sourceSystemId'] = $sourceSystemId; return $this; } /** - * Gets costCentreJournalOverridesEnabled + * Gets startYear * - * @return bool|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getCostCentreJournalOverridesEnabled(): ?bool + public function getStartYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['costCentreJournalOverridesEnabled']; + return $this->container['startYear']; } /** - * Sets costCentreJournalOverridesEnabled + * Sets startYear * - * @param bool|null $costCentreJournalOverridesEnabled Enables the journal overrides for cost centre, if set to true. + * @param \SynergiTech\Staffology\Model\TaxYear|null $startYear startYear * * @return $this */ - public function setCostCentreJournalOverridesEnabled(?bool $costCentreJournalOverridesEnabled): static + public function setStartYear(?\SynergiTech\Staffology\Model\TaxYear $startYear): static { - if (is_null($costCentreJournalOverridesEnabled)) { - throw new InvalidArgumentException('non-nullable costCentreJournalOverridesEnabled cannot be null'); + if (is_null($startYear)) { + throw new InvalidArgumentException('non-nullable startYear cannot be null'); } - $this->container['costCentreJournalOverridesEnabled'] = $costCentreJournalOverridesEnabled; + $this->container['startYear'] = $startYear; return $this; } /** - * Gets settingsSortPayrollNumbersAlphanumerically + * Gets subcontractorCount * - * @return bool|null + * @return int|null */ - public function getSettingsSortPayrollNumbersAlphanumerically(): ?bool + public function getSubcontractorCount(): ?int { - return $this->container['settingsSortPayrollNumbersAlphanumerically']; + return $this->container['subcontractorCount']; } /** - * Sets settingsSortPayrollNumbersAlphanumerically + * Sets subcontractorCount * - * @param bool|null $settingsSortPayrollNumbersAlphanumerically Enables the default sorting to be alphanumerically for payroll code, if set to true else numerical sorting will be applied + * @param int|null $subcontractorCount [readonly] The number of CIS Subcontractors this Employer has. * * @return $this */ - public function setSettingsSortPayrollNumbersAlphanumerically(?bool $settingsSortPayrollNumbersAlphanumerically): static + public function setSubcontractorCount(?int $subcontractorCount): static { - if (is_null($settingsSortPayrollNumbersAlphanumerically)) { - throw new InvalidArgumentException('non-nullable settingsSortPayrollNumbersAlphanumerically cannot be null'); + if (is_null($subcontractorCount)) { + throw new InvalidArgumentException('non-nullable subcontractorCount cannot be null'); } - $this->container['settingsSortPayrollNumbersAlphanumerically'] = $settingsSortPayrollNumbersAlphanumerically; + $this->container['subcontractorCount'] = $subcontractorCount; return $this; } /** - * Gets unauthorisedLeaveProRataRule + * Gets supportAccessEnabled * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null + * @deprecated */ - public function getUnauthorisedLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getSupportAccessEnabled(): ?bool { - return $this->container['unauthorisedLeaveProRataRule']; + return $this->container['supportAccessEnabled']; } /** - * Sets unauthorisedLeaveProRataRule + * Sets supportAccessEnabled * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $unauthorisedLeaveProRataRule unauthorisedLeaveProRataRule + * @param bool|null $supportAccessEnabled [Deprecated] If set to true then the support team can access this employer to help resolve support queries. If SupportAccessExpires is not provided support access will be turned off after 30 days. * * @return $this + * @deprecated */ - public function setUnauthorisedLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $unauthorisedLeaveProRataRule): static + public function setSupportAccessEnabled(?bool $supportAccessEnabled): static { - if (is_null($unauthorisedLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable unauthorisedLeaveProRataRule cannot be null'); + if (is_null($supportAccessEnabled)) { + throw new InvalidArgumentException('non-nullable supportAccessEnabled cannot be null'); } - $this->container['unauthorisedLeaveProRataRule'] = $unauthorisedLeaveProRataRule; + $this->container['supportAccessEnabled'] = $supportAccessEnabled; return $this; } /** - * Gets holidayLeaveProRataRule + * Gets supportAccessExpires * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return \DateTime|null */ - public function getHolidayLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getSupportAccessExpires(): ?\DateTime { - return $this->container['holidayLeaveProRataRule']; + return $this->container['supportAccessExpires']; } /** - * Sets holidayLeaveProRataRule + * Sets supportAccessExpires * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $holidayLeaveProRataRule holidayLeaveProRataRule + * @param \DateTime|null $supportAccessExpires The date and time when the support access expires * * @return $this */ - public function setHolidayLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $holidayLeaveProRataRule): static + public function setSupportAccessExpires(?\DateTime $supportAccessExpires): static { - if (is_null($holidayLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable holidayLeaveProRataRule cannot be null'); + if (is_null($supportAccessExpires)) { + array_push($this->openAPINullablesSetToNull, 'supportAccessExpires'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('supportAccessExpires', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['holidayLeaveProRataRule'] = $holidayLeaveProRataRule; + $this->container['supportAccessExpires'] = $supportAccessExpires; return $this; } /** - * Gets sickLeaveProRataRule + * Gets umbrellaSettings * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return \SynergiTech\Staffology\Model\ContractUmbrellaSettingsResponse|null */ - public function getSickLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUmbrellaSettings(): ?\SynergiTech\Staffology\Model\ContractUmbrellaSettingsResponse { - return $this->container['sickLeaveProRataRule']; + return $this->container['umbrellaSettings']; } /** - * Sets sickLeaveProRataRule + * Sets umbrellaSettings * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $sickLeaveProRataRule sickLeaveProRataRule + * @param \SynergiTech\Staffology\Model\ContractUmbrellaSettingsResponse|null $umbrellaSettings umbrellaSettings * * @return $this */ - public function setSickLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $sickLeaveProRataRule): static + public function setUmbrellaSettings(?\SynergiTech\Staffology\Model\ContractUmbrellaSettingsResponse $umbrellaSettings): static { - if (is_null($sickLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable sickLeaveProRataRule cannot be null'); + if (is_null($umbrellaSettings)) { + throw new InvalidArgumentException('non-nullable umbrellaSettings cannot be null'); } - $this->container['sickLeaveProRataRule'] = $sickLeaveProRataRule; + $this->container['umbrellaSettings'] = $umbrellaSettings; return $this; } /** - * Gets parentalLeaveProRataRule + * Gets unauthorisedLeaveProRataRule * * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getParentalLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUnauthorisedLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['parentalLeaveProRataRule']; + return $this->container['unauthorisedLeaveProRataRule']; } /** - * Sets parentalLeaveProRataRule + * Sets unauthorisedLeaveProRataRule * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $parentalLeaveProRataRule parentalLeaveProRataRule + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $unauthorisedLeaveProRataRule unauthorisedLeaveProRataRule * * @return $this */ - public function setParentalLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $parentalLeaveProRataRule): static + public function setUnauthorisedLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $unauthorisedLeaveProRataRule): static { - if (is_null($parentalLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable parentalLeaveProRataRule cannot be null'); + if (is_null($unauthorisedLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable unauthorisedLeaveProRataRule cannot be null'); } - $this->container['parentalLeaveProRataRule'] = $parentalLeaveProRataRule; + $this->container['unauthorisedLeaveProRataRule'] = $unauthorisedLeaveProRataRule; return $this; } /** - * Gets bereavementLeaveProRataRule + * Gets useTenantRtiSubmissionSettings * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getBereavementLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseTenantRtiSubmissionSettings(): ?bool { - return $this->container['bereavementLeaveProRataRule']; + return $this->container['useTenantRtiSubmissionSettings']; } /** - * Sets bereavementLeaveProRataRule + * Sets useTenantRtiSubmissionSettings * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $bereavementLeaveProRataRule bereavementLeaveProRataRule + * @param bool|null $useTenantRtiSubmissionSettings If the Tenant for this employer has Bureau Features enabled then they can set RtiSubmissionSettings to be used across multiple employers. If this is set to true then those settings will be used instead of any set at the Employer level * * @return $this */ - public function setBereavementLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $bereavementLeaveProRataRule): static + public function setUseTenantRtiSubmissionSettings(?bool $useTenantRtiSubmissionSettings): static { - if (is_null($bereavementLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable bereavementLeaveProRataRule cannot be null'); + if (is_null($useTenantRtiSubmissionSettings)) { + throw new InvalidArgumentException('non-nullable useTenantRtiSubmissionSettings cannot be null'); } - $this->container['bereavementLeaveProRataRule'] = $bereavementLeaveProRataRule; + $this->container['useTenantRtiSubmissionSettings'] = $useTenantRtiSubmissionSettings; return $this; } diff --git a/src/Model/ContractEmployerSettingsRequest.php b/src/Model/ContractEmployerSettingsRequest.php index 080b72a..8274f5d 100644 --- a/src/Model/ContractEmployerSettingsRequest.php +++ b/src/Model/ContractEmployerSettingsRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,19 +60,19 @@ class ContractEmployerSettingsRequest implements ModelInterface, ArrayAccess, Js */ protected static array $openAPITypes = [ 'allowNegativePay' => 'bool', - 'manualStatutoryPayLinesEnabled' => 'bool', - 'mergeMatchingNominalsEnabled' => 'bool', 'autoCalcBackPayForNewStarters' => 'bool', - 'payCodeValidationEnabled' => 'bool', 'calculateEffectiveDateSalaryChanges' => 'bool', - 'groupPayLinesEnabled' => 'bool', 'contractedWeeks' => 'float', - 'fullTimeContractedWeeks' => 'float', - 'fullTimeContractedHours' => 'float', 'disabledPayRunWarningsList' => '\SynergiTech\Staffology\Model\PayRunEntryWarningType[]', + 'fullTimeContractedHours' => 'float', + 'fullTimeContractedWeeks' => 'float', + 'groupPayLinesEnabled' => 'bool', 'journalCsvFormat' => '\SynergiTech\Staffology\Model\JournalCsvFormat', - 'preferAsyncPayrunApiCalls' => 'bool', + 'manualStatutoryPayLinesEnabled' => 'bool', + 'mergeMatchingNominalsEnabled' => 'bool', 'nominalMappingsEnabled' => 'bool', + 'payCodeValidationEnabled' => 'bool', + 'preferAsyncPayrunApiCalls' => 'bool', 'sortPayrollNumbersAlphanumerically' => 'bool' ]; @@ -83,19 +83,19 @@ class ContractEmployerSettingsRequest implements ModelInterface, ArrayAccess, Js */ protected static array $openAPIFormats = [ 'allowNegativePay' => null, - 'manualStatutoryPayLinesEnabled' => null, - 'mergeMatchingNominalsEnabled' => null, 'autoCalcBackPayForNewStarters' => null, - 'payCodeValidationEnabled' => null, 'calculateEffectiveDateSalaryChanges' => null, - 'groupPayLinesEnabled' => null, 'contractedWeeks' => 'double', - 'fullTimeContractedWeeks' => 'double', - 'fullTimeContractedHours' => 'double', 'disabledPayRunWarningsList' => null, + 'fullTimeContractedHours' => 'double', + 'fullTimeContractedWeeks' => 'double', + 'groupPayLinesEnabled' => null, 'journalCsvFormat' => null, - 'preferAsyncPayrunApiCalls' => null, + 'manualStatutoryPayLinesEnabled' => null, + 'mergeMatchingNominalsEnabled' => null, 'nominalMappingsEnabled' => null, + 'payCodeValidationEnabled' => null, + 'preferAsyncPayrunApiCalls' => null, 'sortPayrollNumbersAlphanumerically' => null ]; @@ -106,19 +106,19 @@ class ContractEmployerSettingsRequest implements ModelInterface, ArrayAccess, Js */ protected static array $openAPINullables = [ 'allowNegativePay' => false, - 'manualStatutoryPayLinesEnabled' => false, - 'mergeMatchingNominalsEnabled' => false, 'autoCalcBackPayForNewStarters' => false, - 'payCodeValidationEnabled' => false, 'calculateEffectiveDateSalaryChanges' => false, - 'groupPayLinesEnabled' => false, 'contractedWeeks' => false, - 'fullTimeContractedWeeks' => false, - 'fullTimeContractedHours' => false, 'disabledPayRunWarningsList' => true, + 'fullTimeContractedHours' => false, + 'fullTimeContractedWeeks' => false, + 'groupPayLinesEnabled' => false, 'journalCsvFormat' => false, - 'preferAsyncPayrunApiCalls' => false, + 'manualStatutoryPayLinesEnabled' => false, + 'mergeMatchingNominalsEnabled' => false, 'nominalMappingsEnabled' => false, + 'payCodeValidationEnabled' => false, + 'preferAsyncPayrunApiCalls' => false, 'sortPayrollNumbersAlphanumerically' => false ]; @@ -209,19 +209,19 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'allowNegativePay' => 'allowNegativePay', - 'manualStatutoryPayLinesEnabled' => 'manualStatutoryPayLinesEnabled', - 'mergeMatchingNominalsEnabled' => 'mergeMatchingNominalsEnabled', 'autoCalcBackPayForNewStarters' => 'autoCalcBackPayForNewStarters', - 'payCodeValidationEnabled' => 'payCodeValidationEnabled', 'calculateEffectiveDateSalaryChanges' => 'calculateEffectiveDateSalaryChanges', - 'groupPayLinesEnabled' => 'groupPayLinesEnabled', 'contractedWeeks' => 'contractedWeeks', - 'fullTimeContractedWeeks' => 'fullTimeContractedWeeks', - 'fullTimeContractedHours' => 'fullTimeContractedHours', 'disabledPayRunWarningsList' => 'disabledPayRunWarningsList', + 'fullTimeContractedHours' => 'fullTimeContractedHours', + 'fullTimeContractedWeeks' => 'fullTimeContractedWeeks', + 'groupPayLinesEnabled' => 'groupPayLinesEnabled', 'journalCsvFormat' => 'journalCsvFormat', - 'preferAsyncPayrunApiCalls' => 'preferAsyncPayrunApiCalls', + 'manualStatutoryPayLinesEnabled' => 'manualStatutoryPayLinesEnabled', + 'mergeMatchingNominalsEnabled' => 'mergeMatchingNominalsEnabled', 'nominalMappingsEnabled' => 'nominalMappingsEnabled', + 'payCodeValidationEnabled' => 'payCodeValidationEnabled', + 'preferAsyncPayrunApiCalls' => 'preferAsyncPayrunApiCalls', 'sortPayrollNumbersAlphanumerically' => 'sortPayrollNumbersAlphanumerically' ]; @@ -232,19 +232,19 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'allowNegativePay' => 'setAllowNegativePay', - 'manualStatutoryPayLinesEnabled' => 'setManualStatutoryPayLinesEnabled', - 'mergeMatchingNominalsEnabled' => 'setMergeMatchingNominalsEnabled', 'autoCalcBackPayForNewStarters' => 'setAutoCalcBackPayForNewStarters', - 'payCodeValidationEnabled' => 'setPayCodeValidationEnabled', 'calculateEffectiveDateSalaryChanges' => 'setCalculateEffectiveDateSalaryChanges', - 'groupPayLinesEnabled' => 'setGroupPayLinesEnabled', 'contractedWeeks' => 'setContractedWeeks', - 'fullTimeContractedWeeks' => 'setFullTimeContractedWeeks', - 'fullTimeContractedHours' => 'setFullTimeContractedHours', 'disabledPayRunWarningsList' => 'setDisabledPayRunWarningsList', + 'fullTimeContractedHours' => 'setFullTimeContractedHours', + 'fullTimeContractedWeeks' => 'setFullTimeContractedWeeks', + 'groupPayLinesEnabled' => 'setGroupPayLinesEnabled', 'journalCsvFormat' => 'setJournalCsvFormat', - 'preferAsyncPayrunApiCalls' => 'setPreferAsyncPayrunApiCalls', + 'manualStatutoryPayLinesEnabled' => 'setManualStatutoryPayLinesEnabled', + 'mergeMatchingNominalsEnabled' => 'setMergeMatchingNominalsEnabled', 'nominalMappingsEnabled' => 'setNominalMappingsEnabled', + 'payCodeValidationEnabled' => 'setPayCodeValidationEnabled', + 'preferAsyncPayrunApiCalls' => 'setPreferAsyncPayrunApiCalls', 'sortPayrollNumbersAlphanumerically' => 'setSortPayrollNumbersAlphanumerically' ]; @@ -255,19 +255,19 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'allowNegativePay' => 'getAllowNegativePay', - 'manualStatutoryPayLinesEnabled' => 'getManualStatutoryPayLinesEnabled', - 'mergeMatchingNominalsEnabled' => 'getMergeMatchingNominalsEnabled', 'autoCalcBackPayForNewStarters' => 'getAutoCalcBackPayForNewStarters', - 'payCodeValidationEnabled' => 'getPayCodeValidationEnabled', 'calculateEffectiveDateSalaryChanges' => 'getCalculateEffectiveDateSalaryChanges', - 'groupPayLinesEnabled' => 'getGroupPayLinesEnabled', 'contractedWeeks' => 'getContractedWeeks', - 'fullTimeContractedWeeks' => 'getFullTimeContractedWeeks', - 'fullTimeContractedHours' => 'getFullTimeContractedHours', 'disabledPayRunWarningsList' => 'getDisabledPayRunWarningsList', + 'fullTimeContractedHours' => 'getFullTimeContractedHours', + 'fullTimeContractedWeeks' => 'getFullTimeContractedWeeks', + 'groupPayLinesEnabled' => 'getGroupPayLinesEnabled', 'journalCsvFormat' => 'getJournalCsvFormat', - 'preferAsyncPayrunApiCalls' => 'getPreferAsyncPayrunApiCalls', + 'manualStatutoryPayLinesEnabled' => 'getManualStatutoryPayLinesEnabled', + 'mergeMatchingNominalsEnabled' => 'getMergeMatchingNominalsEnabled', 'nominalMappingsEnabled' => 'getNominalMappingsEnabled', + 'payCodeValidationEnabled' => 'getPayCodeValidationEnabled', + 'preferAsyncPayrunApiCalls' => 'getPreferAsyncPayrunApiCalls', 'sortPayrollNumbersAlphanumerically' => 'getSortPayrollNumbersAlphanumerically' ]; @@ -328,19 +328,19 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('allowNegativePay', $data ?? [], null); - $this->setIfExists('manualStatutoryPayLinesEnabled', $data ?? [], null); - $this->setIfExists('mergeMatchingNominalsEnabled', $data ?? [], null); $this->setIfExists('autoCalcBackPayForNewStarters', $data ?? [], null); - $this->setIfExists('payCodeValidationEnabled', $data ?? [], null); $this->setIfExists('calculateEffectiveDateSalaryChanges', $data ?? [], null); - $this->setIfExists('groupPayLinesEnabled', $data ?? [], null); $this->setIfExists('contractedWeeks', $data ?? [], null); - $this->setIfExists('fullTimeContractedWeeks', $data ?? [], null); - $this->setIfExists('fullTimeContractedHours', $data ?? [], null); $this->setIfExists('disabledPayRunWarningsList', $data ?? [], null); + $this->setIfExists('fullTimeContractedHours', $data ?? [], null); + $this->setIfExists('fullTimeContractedWeeks', $data ?? [], null); + $this->setIfExists('groupPayLinesEnabled', $data ?? [], null); $this->setIfExists('journalCsvFormat', $data ?? [], null); - $this->setIfExists('preferAsyncPayrunApiCalls', $data ?? [], null); + $this->setIfExists('manualStatutoryPayLinesEnabled', $data ?? [], null); + $this->setIfExists('mergeMatchingNominalsEnabled', $data ?? [], null); $this->setIfExists('nominalMappingsEnabled', $data ?? [], null); + $this->setIfExists('payCodeValidationEnabled', $data ?? [], null); + $this->setIfExists('preferAsyncPayrunApiCalls', $data ?? [], null); $this->setIfExists('sortPayrollNumbersAlphanumerically', $data ?? [], null); } @@ -414,136 +414,170 @@ public function setAllowNegativePay(?bool $allowNegativePay): static } /** - * Gets manualStatutoryPayLinesEnabled + * Gets autoCalcBackPayForNewStarters * * @return bool|null */ - public function getManualStatutoryPayLinesEnabled(): ?bool + public function getAutoCalcBackPayForNewStarters(): ?bool { - return $this->container['manualStatutoryPayLinesEnabled']; + return $this->container['autoCalcBackPayForNewStarters']; } /** - * Sets manualStatutoryPayLinesEnabled + * Sets autoCalcBackPayForNewStarters * - * @param bool|null $manualStatutoryPayLinesEnabled manualStatutoryPayLinesEnabled + * @param bool|null $autoCalcBackPayForNewStarters autoCalcBackPayForNewStarters * * @return $this */ - public function setManualStatutoryPayLinesEnabled(?bool $manualStatutoryPayLinesEnabled): static + public function setAutoCalcBackPayForNewStarters(?bool $autoCalcBackPayForNewStarters): static { - if (is_null($manualStatutoryPayLinesEnabled)) { - throw new InvalidArgumentException('non-nullable manualStatutoryPayLinesEnabled cannot be null'); + if (is_null($autoCalcBackPayForNewStarters)) { + throw new InvalidArgumentException('non-nullable autoCalcBackPayForNewStarters cannot be null'); } - $this->container['manualStatutoryPayLinesEnabled'] = $manualStatutoryPayLinesEnabled; + $this->container['autoCalcBackPayForNewStarters'] = $autoCalcBackPayForNewStarters; return $this; } /** - * Gets mergeMatchingNominalsEnabled + * Gets calculateEffectiveDateSalaryChanges * * @return bool|null */ - public function getMergeMatchingNominalsEnabled(): ?bool + public function getCalculateEffectiveDateSalaryChanges(): ?bool { - return $this->container['mergeMatchingNominalsEnabled']; + return $this->container['calculateEffectiveDateSalaryChanges']; } /** - * Sets mergeMatchingNominalsEnabled + * Sets calculateEffectiveDateSalaryChanges * - * @param bool|null $mergeMatchingNominalsEnabled mergeMatchingNominalsEnabled + * @param bool|null $calculateEffectiveDateSalaryChanges calculateEffectiveDateSalaryChanges * * @return $this */ - public function setMergeMatchingNominalsEnabled(?bool $mergeMatchingNominalsEnabled): static + public function setCalculateEffectiveDateSalaryChanges(?bool $calculateEffectiveDateSalaryChanges): static { - if (is_null($mergeMatchingNominalsEnabled)) { - throw new InvalidArgumentException('non-nullable mergeMatchingNominalsEnabled cannot be null'); + if (is_null($calculateEffectiveDateSalaryChanges)) { + throw new InvalidArgumentException('non-nullable calculateEffectiveDateSalaryChanges cannot be null'); } - $this->container['mergeMatchingNominalsEnabled'] = $mergeMatchingNominalsEnabled; + $this->container['calculateEffectiveDateSalaryChanges'] = $calculateEffectiveDateSalaryChanges; return $this; } /** - * Gets autoCalcBackPayForNewStarters + * Gets contractedWeeks * - * @return bool|null + * @return float|null */ - public function getAutoCalcBackPayForNewStarters(): ?bool + public function getContractedWeeks(): ?float { - return $this->container['autoCalcBackPayForNewStarters']; + return $this->container['contractedWeeks']; } /** - * Sets autoCalcBackPayForNewStarters + * Sets contractedWeeks * - * @param bool|null $autoCalcBackPayForNewStarters autoCalcBackPayForNewStarters + * @param float|null $contractedWeeks The amount of weeks an employee works, utilise for employees who aren't working full time. This value is the default which can be inherited when creating/updating a WorkingPattern. * * @return $this */ - public function setAutoCalcBackPayForNewStarters(?bool $autoCalcBackPayForNewStarters): static + public function setContractedWeeks(?float $contractedWeeks): static { - if (is_null($autoCalcBackPayForNewStarters)) { - throw new InvalidArgumentException('non-nullable autoCalcBackPayForNewStarters cannot be null'); + if (is_null($contractedWeeks)) { + throw new InvalidArgumentException('non-nullable contractedWeeks cannot be null'); } - $this->container['autoCalcBackPayForNewStarters'] = $autoCalcBackPayForNewStarters; + $this->container['contractedWeeks'] = $contractedWeeks; return $this; } /** - * Gets payCodeValidationEnabled + * Gets disabledPayRunWarningsList * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PayRunEntryWarningType[]|null */ - public function getPayCodeValidationEnabled(): ?bool + public function getDisabledPayRunWarningsList(): ?array { - return $this->container['payCodeValidationEnabled']; + return $this->container['disabledPayRunWarningsList']; } /** - * Sets payCodeValidationEnabled + * Sets disabledPayRunWarningsList * - * @param bool|null $payCodeValidationEnabled payCodeValidationEnabled + * @param \SynergiTech\Staffology\Model\PayRunEntryWarningType[]|null $disabledPayRunWarningsList Pay run warnings that the user has opted to ignore. * * @return $this */ - public function setPayCodeValidationEnabled(?bool $payCodeValidationEnabled): static + public function setDisabledPayRunWarningsList(?array $disabledPayRunWarningsList): static { - if (is_null($payCodeValidationEnabled)) { - throw new InvalidArgumentException('non-nullable payCodeValidationEnabled cannot be null'); + if (is_null($disabledPayRunWarningsList)) { + array_push($this->openAPINullablesSetToNull, 'disabledPayRunWarningsList'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('disabledPayRunWarningsList', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payCodeValidationEnabled'] = $payCodeValidationEnabled; + $this->container['disabledPayRunWarningsList'] = $disabledPayRunWarningsList; return $this; } /** - * Gets calculateEffectiveDateSalaryChanges + * Gets fullTimeContractedHours * - * @return bool|null + * @return float|null */ - public function getCalculateEffectiveDateSalaryChanges(): ?bool + public function getFullTimeContractedHours(): ?float { - return $this->container['calculateEffectiveDateSalaryChanges']; + return $this->container['fullTimeContractedHours']; } /** - * Sets calculateEffectiveDateSalaryChanges + * Sets fullTimeContractedHours * - * @param bool|null $calculateEffectiveDateSalaryChanges calculateEffectiveDateSalaryChanges + * @param float|null $fullTimeContractedHours The amount of hours an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. * * @return $this */ - public function setCalculateEffectiveDateSalaryChanges(?bool $calculateEffectiveDateSalaryChanges): static + public function setFullTimeContractedHours(?float $fullTimeContractedHours): static { - if (is_null($calculateEffectiveDateSalaryChanges)) { - throw new InvalidArgumentException('non-nullable calculateEffectiveDateSalaryChanges cannot be null'); + if (is_null($fullTimeContractedHours)) { + throw new InvalidArgumentException('non-nullable fullTimeContractedHours cannot be null'); } - $this->container['calculateEffectiveDateSalaryChanges'] = $calculateEffectiveDateSalaryChanges; + $this->container['fullTimeContractedHours'] = $fullTimeContractedHours; + + return $this; + } + + /** + * Gets fullTimeContractedWeeks + * + * @return float|null + */ + public function getFullTimeContractedWeeks(): ?float + { + return $this->container['fullTimeContractedWeeks']; + } + + /** + * Sets fullTimeContractedWeeks + * + * @param float|null $fullTimeContractedWeeks The amount of weeks an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. + * + * @return $this + */ + public function setFullTimeContractedWeeks(?float $fullTimeContractedWeeks): static + { + if (is_null($fullTimeContractedWeeks)) { + throw new InvalidArgumentException('non-nullable fullTimeContractedWeeks cannot be null'); + } + $this->container['fullTimeContractedWeeks'] = $fullTimeContractedWeeks; return $this; } @@ -576,143 +610,136 @@ public function setGroupPayLinesEnabled(?bool $groupPayLinesEnabled): static } /** - * Gets contractedWeeks + * Gets journalCsvFormat * - * @return float|null + * @return \SynergiTech\Staffology\Model\JournalCsvFormat|null */ - public function getContractedWeeks(): ?float + public function getJournalCsvFormat(): ?\SynergiTech\Staffology\Model\JournalCsvFormat { - return $this->container['contractedWeeks']; + return $this->container['journalCsvFormat']; } /** - * Sets contractedWeeks + * Sets journalCsvFormat * - * @param float|null $contractedWeeks The amount of weeks an employee works, utilise for employees who aren't working full time. This value is the default which can be inherited when creating/updating a WorkingPattern. + * @param \SynergiTech\Staffology\Model\JournalCsvFormat|null $journalCsvFormat journalCsvFormat * * @return $this */ - public function setContractedWeeks(?float $contractedWeeks): static + public function setJournalCsvFormat(?\SynergiTech\Staffology\Model\JournalCsvFormat $journalCsvFormat): static { - if (is_null($contractedWeeks)) { - throw new InvalidArgumentException('non-nullable contractedWeeks cannot be null'); + if (is_null($journalCsvFormat)) { + throw new InvalidArgumentException('non-nullable journalCsvFormat cannot be null'); } - $this->container['contractedWeeks'] = $contractedWeeks; + $this->container['journalCsvFormat'] = $journalCsvFormat; return $this; } /** - * Gets fullTimeContractedWeeks + * Gets manualStatutoryPayLinesEnabled * - * @return float|null + * @return bool|null */ - public function getFullTimeContractedWeeks(): ?float + public function getManualStatutoryPayLinesEnabled(): ?bool { - return $this->container['fullTimeContractedWeeks']; + return $this->container['manualStatutoryPayLinesEnabled']; } /** - * Sets fullTimeContractedWeeks + * Sets manualStatutoryPayLinesEnabled * - * @param float|null $fullTimeContractedWeeks The amount of weeks an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. + * @param bool|null $manualStatutoryPayLinesEnabled manualStatutoryPayLinesEnabled * * @return $this */ - public function setFullTimeContractedWeeks(?float $fullTimeContractedWeeks): static + public function setManualStatutoryPayLinesEnabled(?bool $manualStatutoryPayLinesEnabled): static { - if (is_null($fullTimeContractedWeeks)) { - throw new InvalidArgumentException('non-nullable fullTimeContractedWeeks cannot be null'); + if (is_null($manualStatutoryPayLinesEnabled)) { + throw new InvalidArgumentException('non-nullable manualStatutoryPayLinesEnabled cannot be null'); } - $this->container['fullTimeContractedWeeks'] = $fullTimeContractedWeeks; + $this->container['manualStatutoryPayLinesEnabled'] = $manualStatutoryPayLinesEnabled; return $this; } /** - * Gets fullTimeContractedHours + * Gets mergeMatchingNominalsEnabled * - * @return float|null + * @return bool|null */ - public function getFullTimeContractedHours(): ?float + public function getMergeMatchingNominalsEnabled(): ?bool { - return $this->container['fullTimeContractedHours']; + return $this->container['mergeMatchingNominalsEnabled']; } /** - * Sets fullTimeContractedHours + * Sets mergeMatchingNominalsEnabled * - * @param float|null $fullTimeContractedHours The amount of hours an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. + * @param bool|null $mergeMatchingNominalsEnabled mergeMatchingNominalsEnabled * * @return $this */ - public function setFullTimeContractedHours(?float $fullTimeContractedHours): static + public function setMergeMatchingNominalsEnabled(?bool $mergeMatchingNominalsEnabled): static { - if (is_null($fullTimeContractedHours)) { - throw new InvalidArgumentException('non-nullable fullTimeContractedHours cannot be null'); + if (is_null($mergeMatchingNominalsEnabled)) { + throw new InvalidArgumentException('non-nullable mergeMatchingNominalsEnabled cannot be null'); } - $this->container['fullTimeContractedHours'] = $fullTimeContractedHours; + $this->container['mergeMatchingNominalsEnabled'] = $mergeMatchingNominalsEnabled; return $this; } /** - * Gets disabledPayRunWarningsList + * Gets nominalMappingsEnabled * - * @return \SynergiTech\Staffology\Model\PayRunEntryWarningType[]|null + * @return bool|null */ - public function getDisabledPayRunWarningsList(): ?array + public function getNominalMappingsEnabled(): ?bool { - return $this->container['disabledPayRunWarningsList']; + return $this->container['nominalMappingsEnabled']; } /** - * Sets disabledPayRunWarningsList + * Sets nominalMappingsEnabled * - * @param \SynergiTech\Staffology\Model\PayRunEntryWarningType[]|null $disabledPayRunWarningsList Pay run warnings that the user has opted to ignore. + * @param bool|null $nominalMappingsEnabled Enables the nominal mappings(Custom Codes,System Codes,Control Codes,Employer Codes) for the employer, if set to true. * * @return $this */ - public function setDisabledPayRunWarningsList(?array $disabledPayRunWarningsList): static + public function setNominalMappingsEnabled(?bool $nominalMappingsEnabled): static { - if (is_null($disabledPayRunWarningsList)) { - array_push($this->openAPINullablesSetToNull, 'disabledPayRunWarningsList'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('disabledPayRunWarningsList', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($nominalMappingsEnabled)) { + throw new InvalidArgumentException('non-nullable nominalMappingsEnabled cannot be null'); } - $this->container['disabledPayRunWarningsList'] = $disabledPayRunWarningsList; + $this->container['nominalMappingsEnabled'] = $nominalMappingsEnabled; return $this; } /** - * Gets journalCsvFormat + * Gets payCodeValidationEnabled * - * @return \SynergiTech\Staffology\Model\JournalCsvFormat|null + * @return bool|null */ - public function getJournalCsvFormat(): ?\SynergiTech\Staffology\Model\JournalCsvFormat + public function getPayCodeValidationEnabled(): ?bool { - return $this->container['journalCsvFormat']; + return $this->container['payCodeValidationEnabled']; } /** - * Sets journalCsvFormat + * Sets payCodeValidationEnabled * - * @param \SynergiTech\Staffology\Model\JournalCsvFormat|null $journalCsvFormat journalCsvFormat + * @param bool|null $payCodeValidationEnabled payCodeValidationEnabled * * @return $this */ - public function setJournalCsvFormat(?\SynergiTech\Staffology\Model\JournalCsvFormat $journalCsvFormat): static + public function setPayCodeValidationEnabled(?bool $payCodeValidationEnabled): static { - if (is_null($journalCsvFormat)) { - throw new InvalidArgumentException('non-nullable journalCsvFormat cannot be null'); + if (is_null($payCodeValidationEnabled)) { + throw new InvalidArgumentException('non-nullable payCodeValidationEnabled cannot be null'); } - $this->container['journalCsvFormat'] = $journalCsvFormat; + $this->container['payCodeValidationEnabled'] = $payCodeValidationEnabled; return $this; } @@ -744,33 +771,6 @@ public function setPreferAsyncPayrunApiCalls(?bool $preferAsyncPayrunApiCalls): return $this; } - /** - * Gets nominalMappingsEnabled - * - * @return bool|null - */ - public function getNominalMappingsEnabled(): ?bool - { - return $this->container['nominalMappingsEnabled']; - } - - /** - * Sets nominalMappingsEnabled - * - * @param bool|null $nominalMappingsEnabled Enables the nominal mappings(Custom Codes,System Codes,Control Codes,Employer Codes) for the employer, if set to true. - * - * @return $this - */ - public function setNominalMappingsEnabled(?bool $nominalMappingsEnabled): static - { - if (is_null($nominalMappingsEnabled)) { - throw new InvalidArgumentException('non-nullable nominalMappingsEnabled cannot be null'); - } - $this->container['nominalMappingsEnabled'] = $nominalMappingsEnabled; - - return $this; - } - /** * Gets sortPayrollNumbersAlphanumerically * diff --git a/src/Model/ContractEmployerSettingsResponse.php b/src/Model/ContractEmployerSettingsResponse.php index c16c96d..d79133b 100644 --- a/src/Model/ContractEmployerSettingsResponse.php +++ b/src/Model/ContractEmployerSettingsResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,20 +60,20 @@ class ContractEmployerSettingsResponse implements ModelInterface, ArrayAccess, J */ protected static array $openAPITypes = [ 'allowNegativePay' => 'bool', - 'manualStatutoryPayLinesEnabled' => 'bool', - 'mergeMatchingNominalsEnabled' => 'bool', 'autoCalcBackPayForNewStarters' => 'bool', - 'payCodeValidationEnabled' => 'bool', 'calculateEffectiveDateSalaryChanges' => 'bool', - 'groupPayLinesEnabled' => 'bool', 'contractedWeeks' => 'float', - 'fullTimeContractedWeeks' => 'float', - 'fullTimeContractedHours' => 'float', 'disabledPayRunWarningsBitmask' => 'int', 'disabledPayRunWarningsList' => '\SynergiTech\Staffology\Model\PayRunEntryWarningType[]', + 'fullTimeContractedHours' => 'float', + 'fullTimeContractedWeeks' => 'float', + 'groupPayLinesEnabled' => 'bool', 'journalCsvFormat' => '\SynergiTech\Staffology\Model\JournalCsvFormat', - 'preferAsyncPayrunApiCalls' => 'bool', + 'manualStatutoryPayLinesEnabled' => 'bool', + 'mergeMatchingNominalsEnabled' => 'bool', 'nominalMappingsEnabled' => 'bool', + 'payCodeValidationEnabled' => 'bool', + 'preferAsyncPayrunApiCalls' => 'bool', 'sortPayrollNumbersAlphanumerically' => 'bool' ]; @@ -84,20 +84,20 @@ class ContractEmployerSettingsResponse implements ModelInterface, ArrayAccess, J */ protected static array $openAPIFormats = [ 'allowNegativePay' => null, - 'manualStatutoryPayLinesEnabled' => null, - 'mergeMatchingNominalsEnabled' => null, 'autoCalcBackPayForNewStarters' => null, - 'payCodeValidationEnabled' => null, 'calculateEffectiveDateSalaryChanges' => null, - 'groupPayLinesEnabled' => null, 'contractedWeeks' => 'double', - 'fullTimeContractedWeeks' => 'double', - 'fullTimeContractedHours' => 'double', 'disabledPayRunWarningsBitmask' => 'int32', 'disabledPayRunWarningsList' => null, + 'fullTimeContractedHours' => 'double', + 'fullTimeContractedWeeks' => 'double', + 'groupPayLinesEnabled' => null, 'journalCsvFormat' => null, - 'preferAsyncPayrunApiCalls' => null, + 'manualStatutoryPayLinesEnabled' => null, + 'mergeMatchingNominalsEnabled' => null, 'nominalMappingsEnabled' => null, + 'payCodeValidationEnabled' => null, + 'preferAsyncPayrunApiCalls' => null, 'sortPayrollNumbersAlphanumerically' => null ]; @@ -108,20 +108,20 @@ class ContractEmployerSettingsResponse implements ModelInterface, ArrayAccess, J */ protected static array $openAPINullables = [ 'allowNegativePay' => false, - 'manualStatutoryPayLinesEnabled' => false, - 'mergeMatchingNominalsEnabled' => false, 'autoCalcBackPayForNewStarters' => false, - 'payCodeValidationEnabled' => false, 'calculateEffectiveDateSalaryChanges' => false, - 'groupPayLinesEnabled' => false, 'contractedWeeks' => false, - 'fullTimeContractedWeeks' => false, - 'fullTimeContractedHours' => false, 'disabledPayRunWarningsBitmask' => false, 'disabledPayRunWarningsList' => true, + 'fullTimeContractedHours' => false, + 'fullTimeContractedWeeks' => false, + 'groupPayLinesEnabled' => false, 'journalCsvFormat' => false, - 'preferAsyncPayrunApiCalls' => false, + 'manualStatutoryPayLinesEnabled' => false, + 'mergeMatchingNominalsEnabled' => false, 'nominalMappingsEnabled' => false, + 'payCodeValidationEnabled' => false, + 'preferAsyncPayrunApiCalls' => false, 'sortPayrollNumbersAlphanumerically' => false ]; @@ -212,20 +212,20 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'allowNegativePay' => 'allowNegativePay', - 'manualStatutoryPayLinesEnabled' => 'manualStatutoryPayLinesEnabled', - 'mergeMatchingNominalsEnabled' => 'mergeMatchingNominalsEnabled', 'autoCalcBackPayForNewStarters' => 'autoCalcBackPayForNewStarters', - 'payCodeValidationEnabled' => 'payCodeValidationEnabled', 'calculateEffectiveDateSalaryChanges' => 'calculateEffectiveDateSalaryChanges', - 'groupPayLinesEnabled' => 'groupPayLinesEnabled', 'contractedWeeks' => 'contractedWeeks', - 'fullTimeContractedWeeks' => 'fullTimeContractedWeeks', - 'fullTimeContractedHours' => 'fullTimeContractedHours', 'disabledPayRunWarningsBitmask' => 'disabledPayRunWarningsBitmask', 'disabledPayRunWarningsList' => 'disabledPayRunWarningsList', + 'fullTimeContractedHours' => 'fullTimeContractedHours', + 'fullTimeContractedWeeks' => 'fullTimeContractedWeeks', + 'groupPayLinesEnabled' => 'groupPayLinesEnabled', 'journalCsvFormat' => 'journalCsvFormat', - 'preferAsyncPayrunApiCalls' => 'preferAsyncPayrunApiCalls', + 'manualStatutoryPayLinesEnabled' => 'manualStatutoryPayLinesEnabled', + 'mergeMatchingNominalsEnabled' => 'mergeMatchingNominalsEnabled', 'nominalMappingsEnabled' => 'nominalMappingsEnabled', + 'payCodeValidationEnabled' => 'payCodeValidationEnabled', + 'preferAsyncPayrunApiCalls' => 'preferAsyncPayrunApiCalls', 'sortPayrollNumbersAlphanumerically' => 'sortPayrollNumbersAlphanumerically' ]; @@ -236,20 +236,20 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'allowNegativePay' => 'setAllowNegativePay', - 'manualStatutoryPayLinesEnabled' => 'setManualStatutoryPayLinesEnabled', - 'mergeMatchingNominalsEnabled' => 'setMergeMatchingNominalsEnabled', 'autoCalcBackPayForNewStarters' => 'setAutoCalcBackPayForNewStarters', - 'payCodeValidationEnabled' => 'setPayCodeValidationEnabled', 'calculateEffectiveDateSalaryChanges' => 'setCalculateEffectiveDateSalaryChanges', - 'groupPayLinesEnabled' => 'setGroupPayLinesEnabled', 'contractedWeeks' => 'setContractedWeeks', - 'fullTimeContractedWeeks' => 'setFullTimeContractedWeeks', - 'fullTimeContractedHours' => 'setFullTimeContractedHours', 'disabledPayRunWarningsBitmask' => 'setDisabledPayRunWarningsBitmask', 'disabledPayRunWarningsList' => 'setDisabledPayRunWarningsList', + 'fullTimeContractedHours' => 'setFullTimeContractedHours', + 'fullTimeContractedWeeks' => 'setFullTimeContractedWeeks', + 'groupPayLinesEnabled' => 'setGroupPayLinesEnabled', 'journalCsvFormat' => 'setJournalCsvFormat', - 'preferAsyncPayrunApiCalls' => 'setPreferAsyncPayrunApiCalls', + 'manualStatutoryPayLinesEnabled' => 'setManualStatutoryPayLinesEnabled', + 'mergeMatchingNominalsEnabled' => 'setMergeMatchingNominalsEnabled', 'nominalMappingsEnabled' => 'setNominalMappingsEnabled', + 'payCodeValidationEnabled' => 'setPayCodeValidationEnabled', + 'preferAsyncPayrunApiCalls' => 'setPreferAsyncPayrunApiCalls', 'sortPayrollNumbersAlphanumerically' => 'setSortPayrollNumbersAlphanumerically' ]; @@ -260,20 +260,20 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'allowNegativePay' => 'getAllowNegativePay', - 'manualStatutoryPayLinesEnabled' => 'getManualStatutoryPayLinesEnabled', - 'mergeMatchingNominalsEnabled' => 'getMergeMatchingNominalsEnabled', 'autoCalcBackPayForNewStarters' => 'getAutoCalcBackPayForNewStarters', - 'payCodeValidationEnabled' => 'getPayCodeValidationEnabled', 'calculateEffectiveDateSalaryChanges' => 'getCalculateEffectiveDateSalaryChanges', - 'groupPayLinesEnabled' => 'getGroupPayLinesEnabled', 'contractedWeeks' => 'getContractedWeeks', - 'fullTimeContractedWeeks' => 'getFullTimeContractedWeeks', - 'fullTimeContractedHours' => 'getFullTimeContractedHours', 'disabledPayRunWarningsBitmask' => 'getDisabledPayRunWarningsBitmask', 'disabledPayRunWarningsList' => 'getDisabledPayRunWarningsList', + 'fullTimeContractedHours' => 'getFullTimeContractedHours', + 'fullTimeContractedWeeks' => 'getFullTimeContractedWeeks', + 'groupPayLinesEnabled' => 'getGroupPayLinesEnabled', 'journalCsvFormat' => 'getJournalCsvFormat', - 'preferAsyncPayrunApiCalls' => 'getPreferAsyncPayrunApiCalls', + 'manualStatutoryPayLinesEnabled' => 'getManualStatutoryPayLinesEnabled', + 'mergeMatchingNominalsEnabled' => 'getMergeMatchingNominalsEnabled', 'nominalMappingsEnabled' => 'getNominalMappingsEnabled', + 'payCodeValidationEnabled' => 'getPayCodeValidationEnabled', + 'preferAsyncPayrunApiCalls' => 'getPreferAsyncPayrunApiCalls', 'sortPayrollNumbersAlphanumerically' => 'getSortPayrollNumbersAlphanumerically' ]; @@ -334,20 +334,20 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('allowNegativePay', $data ?? [], null); - $this->setIfExists('manualStatutoryPayLinesEnabled', $data ?? [], null); - $this->setIfExists('mergeMatchingNominalsEnabled', $data ?? [], null); $this->setIfExists('autoCalcBackPayForNewStarters', $data ?? [], null); - $this->setIfExists('payCodeValidationEnabled', $data ?? [], null); $this->setIfExists('calculateEffectiveDateSalaryChanges', $data ?? [], null); - $this->setIfExists('groupPayLinesEnabled', $data ?? [], null); $this->setIfExists('contractedWeeks', $data ?? [], null); - $this->setIfExists('fullTimeContractedWeeks', $data ?? [], null); - $this->setIfExists('fullTimeContractedHours', $data ?? [], null); $this->setIfExists('disabledPayRunWarningsBitmask', $data ?? [], null); $this->setIfExists('disabledPayRunWarningsList', $data ?? [], null); + $this->setIfExists('fullTimeContractedHours', $data ?? [], null); + $this->setIfExists('fullTimeContractedWeeks', $data ?? [], null); + $this->setIfExists('groupPayLinesEnabled', $data ?? [], null); $this->setIfExists('journalCsvFormat', $data ?? [], null); - $this->setIfExists('preferAsyncPayrunApiCalls', $data ?? [], null); + $this->setIfExists('manualStatutoryPayLinesEnabled', $data ?? [], null); + $this->setIfExists('mergeMatchingNominalsEnabled', $data ?? [], null); $this->setIfExists('nominalMappingsEnabled', $data ?? [], null); + $this->setIfExists('payCodeValidationEnabled', $data ?? [], null); + $this->setIfExists('preferAsyncPayrunApiCalls', $data ?? [], null); $this->setIfExists('sortPayrollNumbersAlphanumerically', $data ?? [], null); } @@ -421,386 +421,386 @@ public function setAllowNegativePay(?bool $allowNegativePay): static } /** - * Gets manualStatutoryPayLinesEnabled + * Gets autoCalcBackPayForNewStarters * * @return bool|null */ - public function getManualStatutoryPayLinesEnabled(): ?bool + public function getAutoCalcBackPayForNewStarters(): ?bool { - return $this->container['manualStatutoryPayLinesEnabled']; + return $this->container['autoCalcBackPayForNewStarters']; } /** - * Sets manualStatutoryPayLinesEnabled + * Sets autoCalcBackPayForNewStarters * - * @param bool|null $manualStatutoryPayLinesEnabled manualStatutoryPayLinesEnabled + * @param bool|null $autoCalcBackPayForNewStarters autoCalcBackPayForNewStarters * * @return $this */ - public function setManualStatutoryPayLinesEnabled(?bool $manualStatutoryPayLinesEnabled): static + public function setAutoCalcBackPayForNewStarters(?bool $autoCalcBackPayForNewStarters): static { - if (is_null($manualStatutoryPayLinesEnabled)) { - throw new InvalidArgumentException('non-nullable manualStatutoryPayLinesEnabled cannot be null'); + if (is_null($autoCalcBackPayForNewStarters)) { + throw new InvalidArgumentException('non-nullable autoCalcBackPayForNewStarters cannot be null'); } - $this->container['manualStatutoryPayLinesEnabled'] = $manualStatutoryPayLinesEnabled; + $this->container['autoCalcBackPayForNewStarters'] = $autoCalcBackPayForNewStarters; return $this; } /** - * Gets mergeMatchingNominalsEnabled + * Gets calculateEffectiveDateSalaryChanges * * @return bool|null */ - public function getMergeMatchingNominalsEnabled(): ?bool + public function getCalculateEffectiveDateSalaryChanges(): ?bool { - return $this->container['mergeMatchingNominalsEnabled']; + return $this->container['calculateEffectiveDateSalaryChanges']; } /** - * Sets mergeMatchingNominalsEnabled + * Sets calculateEffectiveDateSalaryChanges * - * @param bool|null $mergeMatchingNominalsEnabled mergeMatchingNominalsEnabled + * @param bool|null $calculateEffectiveDateSalaryChanges calculateEffectiveDateSalaryChanges * * @return $this */ - public function setMergeMatchingNominalsEnabled(?bool $mergeMatchingNominalsEnabled): static + public function setCalculateEffectiveDateSalaryChanges(?bool $calculateEffectiveDateSalaryChanges): static { - if (is_null($mergeMatchingNominalsEnabled)) { - throw new InvalidArgumentException('non-nullable mergeMatchingNominalsEnabled cannot be null'); + if (is_null($calculateEffectiveDateSalaryChanges)) { + throw new InvalidArgumentException('non-nullable calculateEffectiveDateSalaryChanges cannot be null'); } - $this->container['mergeMatchingNominalsEnabled'] = $mergeMatchingNominalsEnabled; + $this->container['calculateEffectiveDateSalaryChanges'] = $calculateEffectiveDateSalaryChanges; return $this; } /** - * Gets autoCalcBackPayForNewStarters + * Gets contractedWeeks * - * @return bool|null + * @return float|null */ - public function getAutoCalcBackPayForNewStarters(): ?bool + public function getContractedWeeks(): ?float { - return $this->container['autoCalcBackPayForNewStarters']; + return $this->container['contractedWeeks']; } /** - * Sets autoCalcBackPayForNewStarters + * Sets contractedWeeks * - * @param bool|null $autoCalcBackPayForNewStarters autoCalcBackPayForNewStarters + * @param float|null $contractedWeeks The amount of weeks an employee works, utilise for employees who aren't working full time. This value is the default which can be inherited when creating/updating a WorkingPattern. * * @return $this */ - public function setAutoCalcBackPayForNewStarters(?bool $autoCalcBackPayForNewStarters): static + public function setContractedWeeks(?float $contractedWeeks): static { - if (is_null($autoCalcBackPayForNewStarters)) { - throw new InvalidArgumentException('non-nullable autoCalcBackPayForNewStarters cannot be null'); + if (is_null($contractedWeeks)) { + throw new InvalidArgumentException('non-nullable contractedWeeks cannot be null'); } - $this->container['autoCalcBackPayForNewStarters'] = $autoCalcBackPayForNewStarters; + $this->container['contractedWeeks'] = $contractedWeeks; return $this; } /** - * Gets payCodeValidationEnabled + * Gets disabledPayRunWarningsBitmask * - * @return bool|null + * @return int|null */ - public function getPayCodeValidationEnabled(): ?bool + public function getDisabledPayRunWarningsBitmask(): ?int { - return $this->container['payCodeValidationEnabled']; + return $this->container['disabledPayRunWarningsBitmask']; } /** - * Sets payCodeValidationEnabled + * Sets disabledPayRunWarningsBitmask * - * @param bool|null $payCodeValidationEnabled payCodeValidationEnabled + * @param int|null $disabledPayRunWarningsBitmask disabledPayRunWarningsBitmask * * @return $this */ - public function setPayCodeValidationEnabled(?bool $payCodeValidationEnabled): static + public function setDisabledPayRunWarningsBitmask(?int $disabledPayRunWarningsBitmask): static { - if (is_null($payCodeValidationEnabled)) { - throw new InvalidArgumentException('non-nullable payCodeValidationEnabled cannot be null'); + if (is_null($disabledPayRunWarningsBitmask)) { + throw new InvalidArgumentException('non-nullable disabledPayRunWarningsBitmask cannot be null'); } - $this->container['payCodeValidationEnabled'] = $payCodeValidationEnabled; + $this->container['disabledPayRunWarningsBitmask'] = $disabledPayRunWarningsBitmask; return $this; } /** - * Gets calculateEffectiveDateSalaryChanges + * Gets disabledPayRunWarningsList * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PayRunEntryWarningType[]|null */ - public function getCalculateEffectiveDateSalaryChanges(): ?bool + public function getDisabledPayRunWarningsList(): ?array { - return $this->container['calculateEffectiveDateSalaryChanges']; + return $this->container['disabledPayRunWarningsList']; } /** - * Sets calculateEffectiveDateSalaryChanges + * Sets disabledPayRunWarningsList * - * @param bool|null $calculateEffectiveDateSalaryChanges calculateEffectiveDateSalaryChanges + * @param \SynergiTech\Staffology\Model\PayRunEntryWarningType[]|null $disabledPayRunWarningsList Pay run warnings that the user has opted to ignore. * * @return $this */ - public function setCalculateEffectiveDateSalaryChanges(?bool $calculateEffectiveDateSalaryChanges): static + public function setDisabledPayRunWarningsList(?array $disabledPayRunWarningsList): static { - if (is_null($calculateEffectiveDateSalaryChanges)) { - throw new InvalidArgumentException('non-nullable calculateEffectiveDateSalaryChanges cannot be null'); + if (is_null($disabledPayRunWarningsList)) { + array_push($this->openAPINullablesSetToNull, 'disabledPayRunWarningsList'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('disabledPayRunWarningsList', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['calculateEffectiveDateSalaryChanges'] = $calculateEffectiveDateSalaryChanges; + $this->container['disabledPayRunWarningsList'] = $disabledPayRunWarningsList; return $this; } /** - * Gets groupPayLinesEnabled + * Gets fullTimeContractedHours * - * @return bool|null + * @return float|null */ - public function getGroupPayLinesEnabled(): ?bool + public function getFullTimeContractedHours(): ?float { - return $this->container['groupPayLinesEnabled']; + return $this->container['fullTimeContractedHours']; } /** - * Sets groupPayLinesEnabled + * Sets fullTimeContractedHours * - * @param bool|null $groupPayLinesEnabled A flag to indicate whether paylines should be grouped. The grouping is done based on the following PayLine properties: Rate, Multiplier, Code, Description and RoleId + * @param float|null $fullTimeContractedHours The amount of hours an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. * * @return $this */ - public function setGroupPayLinesEnabled(?bool $groupPayLinesEnabled): static + public function setFullTimeContractedHours(?float $fullTimeContractedHours): static { - if (is_null($groupPayLinesEnabled)) { - throw new InvalidArgumentException('non-nullable groupPayLinesEnabled cannot be null'); + if (is_null($fullTimeContractedHours)) { + throw new InvalidArgumentException('non-nullable fullTimeContractedHours cannot be null'); } - $this->container['groupPayLinesEnabled'] = $groupPayLinesEnabled; + $this->container['fullTimeContractedHours'] = $fullTimeContractedHours; return $this; } /** - * Gets contractedWeeks + * Gets fullTimeContractedWeeks * * @return float|null */ - public function getContractedWeeks(): ?float + public function getFullTimeContractedWeeks(): ?float { - return $this->container['contractedWeeks']; + return $this->container['fullTimeContractedWeeks']; } /** - * Sets contractedWeeks + * Sets fullTimeContractedWeeks * - * @param float|null $contractedWeeks The amount of weeks an employee works, utilise for employees who aren't working full time. This value is the default which can be inherited when creating/updating a WorkingPattern. + * @param float|null $fullTimeContractedWeeks The amount of weeks an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. * * @return $this */ - public function setContractedWeeks(?float $contractedWeeks): static + public function setFullTimeContractedWeeks(?float $fullTimeContractedWeeks): static { - if (is_null($contractedWeeks)) { - throw new InvalidArgumentException('non-nullable contractedWeeks cannot be null'); + if (is_null($fullTimeContractedWeeks)) { + throw new InvalidArgumentException('non-nullable fullTimeContractedWeeks cannot be null'); } - $this->container['contractedWeeks'] = $contractedWeeks; + $this->container['fullTimeContractedWeeks'] = $fullTimeContractedWeeks; return $this; } /** - * Gets fullTimeContractedWeeks + * Gets groupPayLinesEnabled * - * @return float|null + * @return bool|null */ - public function getFullTimeContractedWeeks(): ?float + public function getGroupPayLinesEnabled(): ?bool { - return $this->container['fullTimeContractedWeeks']; + return $this->container['groupPayLinesEnabled']; } /** - * Sets fullTimeContractedWeeks + * Sets groupPayLinesEnabled * - * @param float|null $fullTimeContractedWeeks The amount of weeks an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. + * @param bool|null $groupPayLinesEnabled A flag to indicate whether paylines should be grouped. The grouping is done based on the following PayLine properties: Rate, Multiplier, Code, Description and RoleId * * @return $this */ - public function setFullTimeContractedWeeks(?float $fullTimeContractedWeeks): static + public function setGroupPayLinesEnabled(?bool $groupPayLinesEnabled): static { - if (is_null($fullTimeContractedWeeks)) { - throw new InvalidArgumentException('non-nullable fullTimeContractedWeeks cannot be null'); + if (is_null($groupPayLinesEnabled)) { + throw new InvalidArgumentException('non-nullable groupPayLinesEnabled cannot be null'); } - $this->container['fullTimeContractedWeeks'] = $fullTimeContractedWeeks; + $this->container['groupPayLinesEnabled'] = $groupPayLinesEnabled; return $this; } /** - * Gets fullTimeContractedHours + * Gets journalCsvFormat * - * @return float|null + * @return \SynergiTech\Staffology\Model\JournalCsvFormat|null */ - public function getFullTimeContractedHours(): ?float + public function getJournalCsvFormat(): ?\SynergiTech\Staffology\Model\JournalCsvFormat { - return $this->container['fullTimeContractedHours']; + return $this->container['journalCsvFormat']; } /** - * Sets fullTimeContractedHours + * Sets journalCsvFormat * - * @param float|null $fullTimeContractedHours The amount of hours an employee works (Full Time). This value is the default which can be inherited when creating/updating a WorkingPattern. + * @param \SynergiTech\Staffology\Model\JournalCsvFormat|null $journalCsvFormat journalCsvFormat * * @return $this */ - public function setFullTimeContractedHours(?float $fullTimeContractedHours): static + public function setJournalCsvFormat(?\SynergiTech\Staffology\Model\JournalCsvFormat $journalCsvFormat): static { - if (is_null($fullTimeContractedHours)) { - throw new InvalidArgumentException('non-nullable fullTimeContractedHours cannot be null'); + if (is_null($journalCsvFormat)) { + throw new InvalidArgumentException('non-nullable journalCsvFormat cannot be null'); } - $this->container['fullTimeContractedHours'] = $fullTimeContractedHours; + $this->container['journalCsvFormat'] = $journalCsvFormat; return $this; } /** - * Gets disabledPayRunWarningsBitmask + * Gets manualStatutoryPayLinesEnabled * - * @return int|null + * @return bool|null */ - public function getDisabledPayRunWarningsBitmask(): ?int + public function getManualStatutoryPayLinesEnabled(): ?bool { - return $this->container['disabledPayRunWarningsBitmask']; + return $this->container['manualStatutoryPayLinesEnabled']; } /** - * Sets disabledPayRunWarningsBitmask + * Sets manualStatutoryPayLinesEnabled * - * @param int|null $disabledPayRunWarningsBitmask disabledPayRunWarningsBitmask + * @param bool|null $manualStatutoryPayLinesEnabled manualStatutoryPayLinesEnabled * * @return $this */ - public function setDisabledPayRunWarningsBitmask(?int $disabledPayRunWarningsBitmask): static + public function setManualStatutoryPayLinesEnabled(?bool $manualStatutoryPayLinesEnabled): static { - if (is_null($disabledPayRunWarningsBitmask)) { - throw new InvalidArgumentException('non-nullable disabledPayRunWarningsBitmask cannot be null'); + if (is_null($manualStatutoryPayLinesEnabled)) { + throw new InvalidArgumentException('non-nullable manualStatutoryPayLinesEnabled cannot be null'); } - $this->container['disabledPayRunWarningsBitmask'] = $disabledPayRunWarningsBitmask; + $this->container['manualStatutoryPayLinesEnabled'] = $manualStatutoryPayLinesEnabled; return $this; } /** - * Gets disabledPayRunWarningsList + * Gets mergeMatchingNominalsEnabled * - * @return \SynergiTech\Staffology\Model\PayRunEntryWarningType[]|null + * @return bool|null */ - public function getDisabledPayRunWarningsList(): ?array + public function getMergeMatchingNominalsEnabled(): ?bool { - return $this->container['disabledPayRunWarningsList']; + return $this->container['mergeMatchingNominalsEnabled']; } /** - * Sets disabledPayRunWarningsList + * Sets mergeMatchingNominalsEnabled * - * @param \SynergiTech\Staffology\Model\PayRunEntryWarningType[]|null $disabledPayRunWarningsList Pay run warnings that the user has opted to ignore. + * @param bool|null $mergeMatchingNominalsEnabled mergeMatchingNominalsEnabled * * @return $this */ - public function setDisabledPayRunWarningsList(?array $disabledPayRunWarningsList): static + public function setMergeMatchingNominalsEnabled(?bool $mergeMatchingNominalsEnabled): static { - if (is_null($disabledPayRunWarningsList)) { - array_push($this->openAPINullablesSetToNull, 'disabledPayRunWarningsList'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('disabledPayRunWarningsList', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($mergeMatchingNominalsEnabled)) { + throw new InvalidArgumentException('non-nullable mergeMatchingNominalsEnabled cannot be null'); } - $this->container['disabledPayRunWarningsList'] = $disabledPayRunWarningsList; + $this->container['mergeMatchingNominalsEnabled'] = $mergeMatchingNominalsEnabled; return $this; } /** - * Gets journalCsvFormat + * Gets nominalMappingsEnabled * - * @return \SynergiTech\Staffology\Model\JournalCsvFormat|null + * @return bool|null */ - public function getJournalCsvFormat(): ?\SynergiTech\Staffology\Model\JournalCsvFormat + public function getNominalMappingsEnabled(): ?bool { - return $this->container['journalCsvFormat']; + return $this->container['nominalMappingsEnabled']; } /** - * Sets journalCsvFormat + * Sets nominalMappingsEnabled * - * @param \SynergiTech\Staffology\Model\JournalCsvFormat|null $journalCsvFormat journalCsvFormat + * @param bool|null $nominalMappingsEnabled Enables the nominal mappings(Custom Codes,System Codes,Control Codes,Employer Codes) for the employer, if set to true. * * @return $this */ - public function setJournalCsvFormat(?\SynergiTech\Staffology\Model\JournalCsvFormat $journalCsvFormat): static + public function setNominalMappingsEnabled(?bool $nominalMappingsEnabled): static { - if (is_null($journalCsvFormat)) { - throw new InvalidArgumentException('non-nullable journalCsvFormat cannot be null'); + if (is_null($nominalMappingsEnabled)) { + throw new InvalidArgumentException('non-nullable nominalMappingsEnabled cannot be null'); } - $this->container['journalCsvFormat'] = $journalCsvFormat; + $this->container['nominalMappingsEnabled'] = $nominalMappingsEnabled; return $this; } /** - * Gets preferAsyncPayrunApiCalls + * Gets payCodeValidationEnabled * * @return bool|null */ - public function getPreferAsyncPayrunApiCalls(): ?bool + public function getPayCodeValidationEnabled(): ?bool { - return $this->container['preferAsyncPayrunApiCalls']; + return $this->container['payCodeValidationEnabled']; } /** - * Sets preferAsyncPayrunApiCalls + * Sets payCodeValidationEnabled * - * @param bool|null $preferAsyncPayrunApiCalls This setting is only available temporarily and is only setable by users with access to beta features enabled. If set to true the the web applicaiton will use new async API calls for managing payruns + * @param bool|null $payCodeValidationEnabled payCodeValidationEnabled * * @return $this */ - public function setPreferAsyncPayrunApiCalls(?bool $preferAsyncPayrunApiCalls): static + public function setPayCodeValidationEnabled(?bool $payCodeValidationEnabled): static { - if (is_null($preferAsyncPayrunApiCalls)) { - throw new InvalidArgumentException('non-nullable preferAsyncPayrunApiCalls cannot be null'); + if (is_null($payCodeValidationEnabled)) { + throw new InvalidArgumentException('non-nullable payCodeValidationEnabled cannot be null'); } - $this->container['preferAsyncPayrunApiCalls'] = $preferAsyncPayrunApiCalls; + $this->container['payCodeValidationEnabled'] = $payCodeValidationEnabled; return $this; } /** - * Gets nominalMappingsEnabled + * Gets preferAsyncPayrunApiCalls * * @return bool|null */ - public function getNominalMappingsEnabled(): ?bool + public function getPreferAsyncPayrunApiCalls(): ?bool { - return $this->container['nominalMappingsEnabled']; + return $this->container['preferAsyncPayrunApiCalls']; } /** - * Sets nominalMappingsEnabled + * Sets preferAsyncPayrunApiCalls * - * @param bool|null $nominalMappingsEnabled Enables the nominal mappings(Custom Codes,System Codes,Control Codes,Employer Codes) for the employer, if set to true. + * @param bool|null $preferAsyncPayrunApiCalls This setting is only available temporarily and is only setable by users with access to beta features enabled. If set to true the the web applicaiton will use new async API calls for managing payruns * * @return $this */ - public function setNominalMappingsEnabled(?bool $nominalMappingsEnabled): static + public function setPreferAsyncPayrunApiCalls(?bool $preferAsyncPayrunApiCalls): static { - if (is_null($nominalMappingsEnabled)) { - throw new InvalidArgumentException('non-nullable nominalMappingsEnabled cannot be null'); + if (is_null($preferAsyncPayrunApiCalls)) { + throw new InvalidArgumentException('non-nullable preferAsyncPayrunApiCalls cannot be null'); } - $this->container['nominalMappingsEnabled'] = $nominalMappingsEnabled; + $this->container['preferAsyncPayrunApiCalls'] = $preferAsyncPayrunApiCalls; return $this; } diff --git a/src/Model/ContractEmploymentDetailsRequest.php b/src/Model/ContractEmploymentDetailsRequest.php index 22e1390..7cf6ff2 100644 --- a/src/Model/ContractEmploymentDetailsRequest.php +++ b/src/Model/ContractEmploymentDetailsRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,34 +59,34 @@ class ContractEmploymentDetailsRequest implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ + 'apprenticeshipEndDate' => '\DateTime', + 'apprenticeshipStartDate' => '\DateTime', 'cis' => '\SynergiTech\Staffology\Model\ContractCisDetailsRequest', - 'department' => '\SynergiTech\Staffology\Model\ContractDepartmentRequest', 'cisSubContractor' => 'bool', - 'payrollCode' => 'string', - 'jobTitle' => 'string', - 'workplacePostcode' => 'string', - 'onHold' => 'bool', - 'onFurlough' => 'bool', - 'furloughStart' => '\DateTime', - 'furloughEnd' => '\DateTime', + 'continuousEmploymentDate' => '\DateTime', + 'department' => '\SynergiTech\Staffology\Model\ContractDepartmentRequest', + 'directorshipDetails' => '\SynergiTech\Staffology\Model\ContractDirectorshipDetails', + 'forcePreviousPayrollCode' => 'string', 'furloughCalculationBasis' => '\SynergiTech\Staffology\Model\FurloughCalculationBasis', 'furloughCalculationBasisAmount' => 'float', - 'partialFurlough' => 'bool', + 'furloughEnd' => '\DateTime', 'furloughHoursNormallyWorked' => 'float', 'furloughHoursOnFurlough' => 'float', + 'furloughStart' => '\DateTime', 'isApprentice' => 'bool', - 'apprenticeshipStartDate' => '\DateTime', - 'apprenticeshipEndDate' => '\DateTime', - 'workingPattern' => 'string', - 'forcePreviousPayrollCode' => 'string', - 'starterDetails' => '\SynergiTech\Staffology\Model\ContractStarterDetails', - 'directorshipDetails' => '\SynergiTech\Staffology\Model\ContractDirectorshipDetails', - 'leaverDetails' => '\SynergiTech\Staffology\Model\ContractLeaverDetails', - 'roles' => '\SynergiTech\Staffology\Model\ContractEmployeeRoleItem[]', 'isWorkingInFreePort' => 'bool', 'isWorkingInInvestmentZone' => 'bool', + 'jobTitle' => 'string', + 'leaverDetails' => '\SynergiTech\Staffology\Model\ContractLeaverDetails', + 'onFurlough' => 'bool', + 'onHold' => 'bool', + 'partialFurlough' => 'bool', + 'payrollCode' => 'string', + 'roles' => '\SynergiTech\Staffology\Model\ContractEmployeeRoleItem[]', + 'starterDetails' => '\SynergiTech\Staffology\Model\ContractStarterDetails', 'veteranDetails' => '\SynergiTech\Staffology\Model\ContractVeteranDetails', - 'continuousEmploymentDate' => '\DateTime' + 'workingPattern' => 'string', + 'workplacePostcode' => 'string' ]; /** @@ -95,34 +95,34 @@ class ContractEmploymentDetailsRequest implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPIFormats = [ + 'apprenticeshipEndDate' => 'date', + 'apprenticeshipStartDate' => 'date', 'cis' => null, - 'department' => null, 'cisSubContractor' => null, - 'payrollCode' => null, - 'jobTitle' => null, - 'workplacePostcode' => null, - 'onHold' => null, - 'onFurlough' => null, - 'furloughStart' => 'date', - 'furloughEnd' => 'date', + 'continuousEmploymentDate' => 'date', + 'department' => null, + 'directorshipDetails' => null, + 'forcePreviousPayrollCode' => null, 'furloughCalculationBasis' => null, 'furloughCalculationBasisAmount' => 'double', - 'partialFurlough' => null, + 'furloughEnd' => 'date', 'furloughHoursNormallyWorked' => 'double', 'furloughHoursOnFurlough' => 'double', + 'furloughStart' => 'date', 'isApprentice' => null, - 'apprenticeshipStartDate' => 'date', - 'apprenticeshipEndDate' => 'date', - 'workingPattern' => 'uuid', - 'forcePreviousPayrollCode' => null, - 'starterDetails' => null, - 'directorshipDetails' => null, - 'leaverDetails' => null, - 'roles' => null, 'isWorkingInFreePort' => null, 'isWorkingInInvestmentZone' => null, + 'jobTitle' => null, + 'leaverDetails' => null, + 'onFurlough' => null, + 'onHold' => null, + 'partialFurlough' => null, + 'payrollCode' => null, + 'roles' => null, + 'starterDetails' => null, 'veteranDetails' => null, - 'continuousEmploymentDate' => 'date' + 'workingPattern' => 'uuid', + 'workplacePostcode' => null ]; /** @@ -131,34 +131,34 @@ class ContractEmploymentDetailsRequest implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPINullables = [ + 'apprenticeshipEndDate' => true, + 'apprenticeshipStartDate' => true, 'cis' => false, - 'department' => false, 'cisSubContractor' => false, - 'payrollCode' => false, - 'jobTitle' => true, - 'workplacePostcode' => true, - 'onHold' => false, - 'onFurlough' => false, - 'furloughStart' => true, - 'furloughEnd' => true, + 'continuousEmploymentDate' => true, + 'department' => false, + 'directorshipDetails' => false, + 'forcePreviousPayrollCode' => true, 'furloughCalculationBasis' => false, 'furloughCalculationBasisAmount' => false, - 'partialFurlough' => false, + 'furloughEnd' => true, 'furloughHoursNormallyWorked' => false, 'furloughHoursOnFurlough' => false, + 'furloughStart' => true, 'isApprentice' => false, - 'apprenticeshipStartDate' => true, - 'apprenticeshipEndDate' => true, - 'workingPattern' => true, - 'forcePreviousPayrollCode' => true, - 'starterDetails' => false, - 'directorshipDetails' => false, - 'leaverDetails' => false, - 'roles' => true, 'isWorkingInFreePort' => false, 'isWorkingInInvestmentZone' => false, + 'jobTitle' => true, + 'leaverDetails' => false, + 'onFurlough' => false, + 'onHold' => false, + 'partialFurlough' => false, + 'payrollCode' => false, + 'roles' => true, + 'starterDetails' => false, 'veteranDetails' => false, - 'continuousEmploymentDate' => true + 'workingPattern' => true, + 'workplacePostcode' => true ]; /** @@ -247,34 +247,34 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'apprenticeshipEndDate' => 'apprenticeshipEndDate', + 'apprenticeshipStartDate' => 'apprenticeshipStartDate', 'cis' => 'cis', - 'department' => 'department', 'cisSubContractor' => 'cisSubContractor', - 'payrollCode' => 'payrollCode', - 'jobTitle' => 'jobTitle', - 'workplacePostcode' => 'workplacePostcode', - 'onHold' => 'onHold', - 'onFurlough' => 'onFurlough', - 'furloughStart' => 'furloughStart', - 'furloughEnd' => 'furloughEnd', + 'continuousEmploymentDate' => 'continuousEmploymentDate', + 'department' => 'department', + 'directorshipDetails' => 'directorshipDetails', + 'forcePreviousPayrollCode' => 'forcePreviousPayrollCode', 'furloughCalculationBasis' => 'furloughCalculationBasis', 'furloughCalculationBasisAmount' => 'furloughCalculationBasisAmount', - 'partialFurlough' => 'partialFurlough', + 'furloughEnd' => 'furloughEnd', 'furloughHoursNormallyWorked' => 'furloughHoursNormallyWorked', 'furloughHoursOnFurlough' => 'furloughHoursOnFurlough', + 'furloughStart' => 'furloughStart', 'isApprentice' => 'isApprentice', - 'apprenticeshipStartDate' => 'apprenticeshipStartDate', - 'apprenticeshipEndDate' => 'apprenticeshipEndDate', - 'workingPattern' => 'workingPattern', - 'forcePreviousPayrollCode' => 'forcePreviousPayrollCode', - 'starterDetails' => 'starterDetails', - 'directorshipDetails' => 'directorshipDetails', - 'leaverDetails' => 'leaverDetails', - 'roles' => 'roles', 'isWorkingInFreePort' => 'isWorkingInFreePort', 'isWorkingInInvestmentZone' => 'isWorkingInInvestmentZone', + 'jobTitle' => 'jobTitle', + 'leaverDetails' => 'leaverDetails', + 'onFurlough' => 'onFurlough', + 'onHold' => 'onHold', + 'partialFurlough' => 'partialFurlough', + 'payrollCode' => 'payrollCode', + 'roles' => 'roles', + 'starterDetails' => 'starterDetails', 'veteranDetails' => 'veteranDetails', - 'continuousEmploymentDate' => 'continuousEmploymentDate' + 'workingPattern' => 'workingPattern', + 'workplacePostcode' => 'workplacePostcode' ]; /** @@ -283,34 +283,34 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'apprenticeshipEndDate' => 'setApprenticeshipEndDate', + 'apprenticeshipStartDate' => 'setApprenticeshipStartDate', 'cis' => 'setCis', - 'department' => 'setDepartment', 'cisSubContractor' => 'setCisSubContractor', - 'payrollCode' => 'setPayrollCode', - 'jobTitle' => 'setJobTitle', - 'workplacePostcode' => 'setWorkplacePostcode', - 'onHold' => 'setOnHold', - 'onFurlough' => 'setOnFurlough', - 'furloughStart' => 'setFurloughStart', - 'furloughEnd' => 'setFurloughEnd', + 'continuousEmploymentDate' => 'setContinuousEmploymentDate', + 'department' => 'setDepartment', + 'directorshipDetails' => 'setDirectorshipDetails', + 'forcePreviousPayrollCode' => 'setForcePreviousPayrollCode', 'furloughCalculationBasis' => 'setFurloughCalculationBasis', 'furloughCalculationBasisAmount' => 'setFurloughCalculationBasisAmount', - 'partialFurlough' => 'setPartialFurlough', + 'furloughEnd' => 'setFurloughEnd', 'furloughHoursNormallyWorked' => 'setFurloughHoursNormallyWorked', 'furloughHoursOnFurlough' => 'setFurloughHoursOnFurlough', + 'furloughStart' => 'setFurloughStart', 'isApprentice' => 'setIsApprentice', - 'apprenticeshipStartDate' => 'setApprenticeshipStartDate', - 'apprenticeshipEndDate' => 'setApprenticeshipEndDate', - 'workingPattern' => 'setWorkingPattern', - 'forcePreviousPayrollCode' => 'setForcePreviousPayrollCode', - 'starterDetails' => 'setStarterDetails', - 'directorshipDetails' => 'setDirectorshipDetails', - 'leaverDetails' => 'setLeaverDetails', - 'roles' => 'setRoles', 'isWorkingInFreePort' => 'setIsWorkingInFreePort', 'isWorkingInInvestmentZone' => 'setIsWorkingInInvestmentZone', + 'jobTitle' => 'setJobTitle', + 'leaverDetails' => 'setLeaverDetails', + 'onFurlough' => 'setOnFurlough', + 'onHold' => 'setOnHold', + 'partialFurlough' => 'setPartialFurlough', + 'payrollCode' => 'setPayrollCode', + 'roles' => 'setRoles', + 'starterDetails' => 'setStarterDetails', 'veteranDetails' => 'setVeteranDetails', - 'continuousEmploymentDate' => 'setContinuousEmploymentDate' + 'workingPattern' => 'setWorkingPattern', + 'workplacePostcode' => 'setWorkplacePostcode' ]; /** @@ -319,34 +319,34 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'apprenticeshipEndDate' => 'getApprenticeshipEndDate', + 'apprenticeshipStartDate' => 'getApprenticeshipStartDate', 'cis' => 'getCis', - 'department' => 'getDepartment', 'cisSubContractor' => 'getCisSubContractor', - 'payrollCode' => 'getPayrollCode', - 'jobTitle' => 'getJobTitle', - 'workplacePostcode' => 'getWorkplacePostcode', - 'onHold' => 'getOnHold', - 'onFurlough' => 'getOnFurlough', - 'furloughStart' => 'getFurloughStart', - 'furloughEnd' => 'getFurloughEnd', + 'continuousEmploymentDate' => 'getContinuousEmploymentDate', + 'department' => 'getDepartment', + 'directorshipDetails' => 'getDirectorshipDetails', + 'forcePreviousPayrollCode' => 'getForcePreviousPayrollCode', 'furloughCalculationBasis' => 'getFurloughCalculationBasis', 'furloughCalculationBasisAmount' => 'getFurloughCalculationBasisAmount', - 'partialFurlough' => 'getPartialFurlough', + 'furloughEnd' => 'getFurloughEnd', 'furloughHoursNormallyWorked' => 'getFurloughHoursNormallyWorked', 'furloughHoursOnFurlough' => 'getFurloughHoursOnFurlough', + 'furloughStart' => 'getFurloughStart', 'isApprentice' => 'getIsApprentice', - 'apprenticeshipStartDate' => 'getApprenticeshipStartDate', - 'apprenticeshipEndDate' => 'getApprenticeshipEndDate', - 'workingPattern' => 'getWorkingPattern', - 'forcePreviousPayrollCode' => 'getForcePreviousPayrollCode', - 'starterDetails' => 'getStarterDetails', - 'directorshipDetails' => 'getDirectorshipDetails', - 'leaverDetails' => 'getLeaverDetails', - 'roles' => 'getRoles', 'isWorkingInFreePort' => 'getIsWorkingInFreePort', 'isWorkingInInvestmentZone' => 'getIsWorkingInInvestmentZone', + 'jobTitle' => 'getJobTitle', + 'leaverDetails' => 'getLeaverDetails', + 'onFurlough' => 'getOnFurlough', + 'onHold' => 'getOnHold', + 'partialFurlough' => 'getPartialFurlough', + 'payrollCode' => 'getPayrollCode', + 'roles' => 'getRoles', + 'starterDetails' => 'getStarterDetails', 'veteranDetails' => 'getVeteranDetails', - 'continuousEmploymentDate' => 'getContinuousEmploymentDate' + 'workingPattern' => 'getWorkingPattern', + 'workplacePostcode' => 'getWorkplacePostcode' ]; /** @@ -405,34 +405,34 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('apprenticeshipEndDate', $data ?? [], null); + $this->setIfExists('apprenticeshipStartDate', $data ?? [], null); $this->setIfExists('cis', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); $this->setIfExists('cisSubContractor', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('jobTitle', $data ?? [], null); - $this->setIfExists('workplacePostcode', $data ?? [], null); - $this->setIfExists('onHold', $data ?? [], null); - $this->setIfExists('onFurlough', $data ?? [], null); - $this->setIfExists('furloughStart', $data ?? [], null); - $this->setIfExists('furloughEnd', $data ?? [], null); + $this->setIfExists('continuousEmploymentDate', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('directorshipDetails', $data ?? [], null); + $this->setIfExists('forcePreviousPayrollCode', $data ?? [], null); $this->setIfExists('furloughCalculationBasis', $data ?? [], null); $this->setIfExists('furloughCalculationBasisAmount', $data ?? [], null); - $this->setIfExists('partialFurlough', $data ?? [], null); + $this->setIfExists('furloughEnd', $data ?? [], null); $this->setIfExists('furloughHoursNormallyWorked', $data ?? [], null); $this->setIfExists('furloughHoursOnFurlough', $data ?? [], null); + $this->setIfExists('furloughStart', $data ?? [], null); $this->setIfExists('isApprentice', $data ?? [], null); - $this->setIfExists('apprenticeshipStartDate', $data ?? [], null); - $this->setIfExists('apprenticeshipEndDate', $data ?? [], null); - $this->setIfExists('workingPattern', $data ?? [], null); - $this->setIfExists('forcePreviousPayrollCode', $data ?? [], null); - $this->setIfExists('starterDetails', $data ?? [], null); - $this->setIfExists('directorshipDetails', $data ?? [], null); - $this->setIfExists('leaverDetails', $data ?? [], null); - $this->setIfExists('roles', $data ?? [], null); $this->setIfExists('isWorkingInFreePort', $data ?? [], null); $this->setIfExists('isWorkingInInvestmentZone', $data ?? [], null); + $this->setIfExists('jobTitle', $data ?? [], null); + $this->setIfExists('leaverDetails', $data ?? [], null); + $this->setIfExists('onFurlough', $data ?? [], null); + $this->setIfExists('onHold', $data ?? [], null); + $this->setIfExists('partialFurlough', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('roles', $data ?? [], null); + $this->setIfExists('starterDetails', $data ?? [], null); $this->setIfExists('veteranDetails', $data ?? [], null); - $this->setIfExists('continuousEmploymentDate', $data ?? [], null); + $this->setIfExists('workingPattern', $data ?? [], null); + $this->setIfExists('workplacePostcode', $data ?? [], null); } /** @@ -462,6 +462,14 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if (!is_null($this->container['forcePreviousPayrollCode']) && (mb_strlen($this->container['forcePreviousPayrollCode']) > 35)) { + $invalidProperties[] = "invalid value for 'forcePreviousPayrollCode', the character length must be smaller than or equal to 35."; + } + + if (!is_null($this->container['jobTitle']) && (mb_strlen($this->container['jobTitle']) > 120)) { + $invalidProperties[] = "invalid value for 'jobTitle', the character length must be smaller than or equal to 120."; + } + if ($this->container['payrollCode'] === null) { $invalidProperties[] = "'payrollCode' can't be null"; } @@ -473,18 +481,10 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'payrollCode', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['jobTitle']) && (mb_strlen($this->container['jobTitle']) > 120)) { - $invalidProperties[] = "invalid value for 'jobTitle', the character length must be smaller than or equal to 120."; - } - if (!is_null($this->container['workplacePostcode']) && (mb_strlen($this->container['workplacePostcode']) > 10)) { $invalidProperties[] = "invalid value for 'workplacePostcode', the character length must be smaller than or equal to 10."; } - if (!is_null($this->container['forcePreviousPayrollCode']) && (mb_strlen($this->container['forcePreviousPayrollCode']) > 35)) { - $invalidProperties[] = "invalid value for 'forcePreviousPayrollCode', the character length must be smaller than or equal to 35."; - } - return $invalidProperties; } @@ -501,314 +501,249 @@ public function valid(): bool /** - * Gets cis + * Gets apprenticeshipEndDate * - * @return \SynergiTech\Staffology\Model\ContractCisDetailsRequest|null + * @return \DateTime|null */ - public function getCis(): ?\SynergiTech\Staffology\Model\ContractCisDetailsRequest + public function getApprenticeshipEndDate(): ?\DateTime { - return $this->container['cis']; + return $this->container['apprenticeshipEndDate']; } /** - * Sets cis + * Sets apprenticeshipEndDate * - * @param \SynergiTech\Staffology\Model\ContractCisDetailsRequest|null $cis cis + * @param \DateTime|null $apprenticeshipEndDate apprenticeshipEndDate * * @return $this */ - public function setCis(?\SynergiTech\Staffology\Model\ContractCisDetailsRequest $cis): static - { - if (is_null($cis)) { - throw new InvalidArgumentException('non-nullable cis cannot be null'); - } - $this->container['cis'] = $cis; - - return $this; - } - - /** - * Gets department - * - * @return \SynergiTech\Staffology\Model\ContractDepartmentRequest|null - */ - public function getDepartment(): ?\SynergiTech\Staffology\Model\ContractDepartmentRequest - { - return $this->container['department']; - } - - /** - * Sets department - * - * @param \SynergiTech\Staffology\Model\ContractDepartmentRequest|null $department department - * - * @return $this - */ - public function setDepartment(?\SynergiTech\Staffology\Model\ContractDepartmentRequest $department): static + public function setApprenticeshipEndDate(?\DateTime $apprenticeshipEndDate): static { - if (is_null($department)) { - throw new InvalidArgumentException('non-nullable department cannot be null'); + if (is_null($apprenticeshipEndDate)) { + array_push($this->openAPINullablesSetToNull, 'apprenticeshipEndDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('apprenticeshipEndDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['department'] = $department; + $this->container['apprenticeshipEndDate'] = $apprenticeshipEndDate; return $this; } /** - * Gets cisSubContractor + * Gets apprenticeshipStartDate * - * @return bool|null + * @return \DateTime|null */ - public function getCisSubContractor(): ?bool + public function getApprenticeshipStartDate(): ?\DateTime { - return $this->container['cisSubContractor']; + return $this->container['apprenticeshipStartDate']; } /** - * Sets cisSubContractor + * Sets apprenticeshipStartDate * - * @param bool|null $cisSubContractor Set to True if this Employee is a CIS Subcontractor. The ```Cis``` property contains further information + * @param \DateTime|null $apprenticeshipStartDate apprenticeshipStartDate * * @return $this */ - public function setCisSubContractor(?bool $cisSubContractor): static + public function setApprenticeshipStartDate(?\DateTime $apprenticeshipStartDate): static { - if (is_null($cisSubContractor)) { - throw new InvalidArgumentException('non-nullable cisSubContractor cannot be null'); + if (is_null($apprenticeshipStartDate)) { + array_push($this->openAPINullablesSetToNull, 'apprenticeshipStartDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('apprenticeshipStartDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['cisSubContractor'] = $cisSubContractor; + $this->container['apprenticeshipStartDate'] = $apprenticeshipStartDate; return $this; } /** - * Gets payrollCode + * Gets cis * - * @return string + * @return \SynergiTech\Staffology\Model\ContractCisDetailsRequest|null */ - public function getPayrollCode(): string + public function getCis(): ?\SynergiTech\Staffology\Model\ContractCisDetailsRequest { - return $this->container['payrollCode']; + return $this->container['cis']; } /** - * Sets payrollCode + * Sets cis * - * @param string $payrollCode The Employees Payroll Code. Must be unique within the Employer. + * @param \SynergiTech\Staffology\Model\ContractCisDetailsRequest|null $cis cis * * @return $this */ - public function setPayrollCode(string $payrollCode): static + public function setCis(?\SynergiTech\Staffology\Model\ContractCisDetailsRequest $cis): static { - if (is_null($payrollCode)) { - throw new InvalidArgumentException('non-nullable payrollCode cannot be null'); - } - if ((mb_strlen($payrollCode) > 35)) { - throw new InvalidArgumentException('invalid length for $payrollCode when calling ContractEmploymentDetailsRequest., must be smaller than or equal to 35.'); - } - if ((mb_strlen($payrollCode) < 1)) { - throw new InvalidArgumentException('invalid length for $payrollCode when calling ContractEmploymentDetailsRequest., must be bigger than or equal to 1.'); + if (is_null($cis)) { + throw new InvalidArgumentException('non-nullable cis cannot be null'); } - - $this->container['payrollCode'] = $payrollCode; + $this->container['cis'] = $cis; return $this; } /** - * Gets jobTitle + * Gets cisSubContractor * - * @return string|null + * @return bool|null */ - public function getJobTitle(): ?string + public function getCisSubContractor(): ?bool { - return $this->container['jobTitle']; + return $this->container['cisSubContractor']; } /** - * Sets jobTitle + * Sets cisSubContractor * - * @param string|null $jobTitle Job Title of Primary role of the Employee + * @param bool|null $cisSubContractor Set to True if this Employee is a CIS Subcontractor. The ```Cis``` property contains further information * * @return $this */ - public function setJobTitle(?string $jobTitle): static + public function setCisSubContractor(?bool $cisSubContractor): static { - if (is_null($jobTitle)) { - array_push($this->openAPINullablesSetToNull, 'jobTitle'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('jobTitle', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($jobTitle) && (mb_strlen($jobTitle) > 120)) { - throw new InvalidArgumentException('invalid length for $jobTitle when calling ContractEmploymentDetailsRequest., must be smaller than or equal to 120.'); + if (is_null($cisSubContractor)) { + throw new InvalidArgumentException('non-nullable cisSubContractor cannot be null'); } - - $this->container['jobTitle'] = $jobTitle; + $this->container['cisSubContractor'] = $cisSubContractor; return $this; } /** - * Gets workplacePostcode + * Gets continuousEmploymentDate * - * @return string|null + * @return \DateTime|null */ - public function getWorkplacePostcode(): ?string + public function getContinuousEmploymentDate(): ?\DateTime { - return $this->container['workplacePostcode']; + return $this->container['continuousEmploymentDate']; } /** - * Sets workplacePostcode + * Sets continuousEmploymentDate * - * @param string|null $workplacePostcode Set the workplace postcode, ensuring it is no longer than 10 characters. + * @param \DateTime|null $continuousEmploymentDate Date of continuous employment * * @return $this */ - public function setWorkplacePostcode(?string $workplacePostcode): static + public function setContinuousEmploymentDate(?\DateTime $continuousEmploymentDate): static { - if (is_null($workplacePostcode)) { - array_push($this->openAPINullablesSetToNull, 'workplacePostcode'); + if (is_null($continuousEmploymentDate)) { + array_push($this->openAPINullablesSetToNull, 'continuousEmploymentDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('workplacePostcode', $nullablesSetToNull); + $index = array_search('continuousEmploymentDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($workplacePostcode) && (mb_strlen($workplacePostcode) > 10)) { - throw new InvalidArgumentException('invalid length for $workplacePostcode when calling ContractEmploymentDetailsRequest., must be smaller than or equal to 10.'); - } - - $this->container['workplacePostcode'] = $workplacePostcode; + $this->container['continuousEmploymentDate'] = $continuousEmploymentDate; return $this; } /** - * Gets onHold + * Gets department * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractDepartmentRequest|null */ - public function getOnHold(): ?bool + public function getDepartment(): ?\SynergiTech\Staffology\Model\ContractDepartmentRequest { - return $this->container['onHold']; + return $this->container['department']; } /** - * Sets onHold + * Sets department * - * @param bool|null $onHold Set to true to temporarily exclude the employee from payruns + * @param \SynergiTech\Staffology\Model\ContractDepartmentRequest|null $department department * * @return $this */ - public function setOnHold(?bool $onHold): static + public function setDepartment(?\SynergiTech\Staffology\Model\ContractDepartmentRequest $department): static { - if (is_null($onHold)) { - throw new InvalidArgumentException('non-nullable onHold cannot be null'); + if (is_null($department)) { + throw new InvalidArgumentException('non-nullable department cannot be null'); } - $this->container['onHold'] = $onHold; + $this->container['department'] = $department; return $this; } /** - * Gets onFurlough + * Gets directorshipDetails * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractDirectorshipDetails|null */ - public function getOnFurlough(): ?bool + public function getDirectorshipDetails(): ?\SynergiTech\Staffology\Model\ContractDirectorshipDetails { - return $this->container['onFurlough']; + return $this->container['directorshipDetails']; } /** - * Sets onFurlough + * Sets directorshipDetails * - * @param bool|null $onFurlough Set to true if the employee is on furlough. + * @param \SynergiTech\Staffology\Model\ContractDirectorshipDetails|null $directorshipDetails directorshipDetails * * @return $this */ - public function setOnFurlough(?bool $onFurlough): static + public function setDirectorshipDetails(?\SynergiTech\Staffology\Model\ContractDirectorshipDetails $directorshipDetails): static { - if (is_null($onFurlough)) { - throw new InvalidArgumentException('non-nullable onFurlough cannot be null'); + if (is_null($directorshipDetails)) { + throw new InvalidArgumentException('non-nullable directorshipDetails cannot be null'); } - $this->container['onFurlough'] = $onFurlough; + $this->container['directorshipDetails'] = $directorshipDetails; return $this; } /** - * Gets furloughStart + * Gets forcePreviousPayrollCode * - * @return \DateTime|null + * @return string|null */ - public function getFurloughStart(): ?\DateTime + public function getForcePreviousPayrollCode(): ?string { - return $this->container['furloughStart']; + return $this->container['forcePreviousPayrollCode']; } /** - * Sets furloughStart + * Sets forcePreviousPayrollCode * - * @param \DateTime|null $furloughStart Furlough Start Date. + * @param string|null $forcePreviousPayrollCode If this property has a non-empty value then a change of Payroll code will be declared on the next FPS. * * @return $this */ - public function setFurloughStart(?\DateTime $furloughStart): static + public function setForcePreviousPayrollCode(?string $forcePreviousPayrollCode): static { - if (is_null($furloughStart)) { - array_push($this->openAPINullablesSetToNull, 'furloughStart'); + if (is_null($forcePreviousPayrollCode)) { + array_push($this->openAPINullablesSetToNull, 'forcePreviousPayrollCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('furloughStart', $nullablesSetToNull); + $index = array_search('forcePreviousPayrollCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['furloughStart'] = $furloughStart; - - return $this; - } - - /** - * Gets furloughEnd - * - * @return \DateTime|null - */ - public function getFurloughEnd(): ?\DateTime - { - return $this->container['furloughEnd']; - } - - /** - * Sets furloughEnd - * - * @param \DateTime|null $furloughEnd Furlough End Date. - * - * @return $this - */ - public function setFurloughEnd(?\DateTime $furloughEnd): static - { - if (is_null($furloughEnd)) { - array_push($this->openAPINullablesSetToNull, 'furloughEnd'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('furloughEnd', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (!is_null($forcePreviousPayrollCode) && (mb_strlen($forcePreviousPayrollCode) > 35)) { + throw new InvalidArgumentException('invalid length for $forcePreviousPayrollCode when calling ContractEmploymentDetailsRequest., must be smaller than or equal to 35.'); } - $this->container['furloughEnd'] = $furloughEnd; + + $this->container['forcePreviousPayrollCode'] = $forcePreviousPayrollCode; return $this; } @@ -868,28 +803,35 @@ public function setFurloughCalculationBasisAmount(?float $furloughCalculationBas } /** - * Gets partialFurlough + * Gets furloughEnd * - * @return bool|null + * @return \DateTime|null */ - public function getPartialFurlough(): ?bool + public function getFurloughEnd(): ?\DateTime { - return $this->container['partialFurlough']; + return $this->container['furloughEnd']; } /** - * Sets partialFurlough + * Sets furloughEnd * - * @param bool|null $partialFurlough Set to true if the employee is partially furloughed. + * @param \DateTime|null $furloughEnd Furlough End Date. * * @return $this */ - public function setPartialFurlough(?bool $partialFurlough): static + public function setFurloughEnd(?\DateTime $furloughEnd): static { - if (is_null($partialFurlough)) { - throw new InvalidArgumentException('non-nullable partialFurlough cannot be null'); + if (is_null($furloughEnd)) { + array_push($this->openAPINullablesSetToNull, 'furloughEnd'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('furloughEnd', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['partialFurlough'] = $partialFurlough; + $this->container['furloughEnd'] = $furloughEnd; return $this; } @@ -948,6 +890,40 @@ public function setFurloughHoursOnFurlough(?float $furloughHoursOnFurlough): sta return $this; } + /** + * Gets furloughStart + * + * @return \DateTime|null + */ + public function getFurloughStart(): ?\DateTime + { + return $this->container['furloughStart']; + } + + /** + * Sets furloughStart + * + * @param \DateTime|null $furloughStart Furlough Start Date. + * + * @return $this + */ + public function setFurloughStart(?\DateTime $furloughStart): static + { + if (is_null($furloughStart)) { + array_push($this->openAPINullablesSetToNull, 'furloughStart'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('furloughStart', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['furloughStart'] = $furloughStart; + + return $this; + } + /** * Gets isApprentice * @@ -976,222 +952,235 @@ public function setIsApprentice(?bool $isApprentice): static } /** - * Gets apprenticeshipStartDate + * Gets isWorkingInFreePort * - * @return \DateTime|null + * @return bool|null */ - public function getApprenticeshipStartDate(): ?\DateTime + public function getIsWorkingInFreePort(): ?bool { - return $this->container['apprenticeshipStartDate']; + return $this->container['isWorkingInFreePort']; } /** - * Sets apprenticeshipStartDate + * Sets isWorkingInFreePort * - * @param \DateTime|null $apprenticeshipStartDate apprenticeshipStartDate + * @param bool|null $isWorkingInFreePort Flag indicating the employee is employed in a Freeport * * @return $this */ - public function setApprenticeshipStartDate(?\DateTime $apprenticeshipStartDate): static + public function setIsWorkingInFreePort(?bool $isWorkingInFreePort): static { - if (is_null($apprenticeshipStartDate)) { - array_push($this->openAPINullablesSetToNull, 'apprenticeshipStartDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('apprenticeshipStartDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isWorkingInFreePort)) { + throw new InvalidArgumentException('non-nullable isWorkingInFreePort cannot be null'); + } + $this->container['isWorkingInFreePort'] = $isWorkingInFreePort; + + return $this; + } + + /** + * Gets isWorkingInInvestmentZone + * + * @return bool|null + */ + public function getIsWorkingInInvestmentZone(): ?bool + { + return $this->container['isWorkingInInvestmentZone']; + } + + /** + * Sets isWorkingInInvestmentZone + * + * @param bool|null $isWorkingInInvestmentZone Flag indicating the employee is employed in an Investment Zone + * + * @return $this + */ + public function setIsWorkingInInvestmentZone(?bool $isWorkingInInvestmentZone): static + { + if (is_null($isWorkingInInvestmentZone)) { + throw new InvalidArgumentException('non-nullable isWorkingInInvestmentZone cannot be null'); } - $this->container['apprenticeshipStartDate'] = $apprenticeshipStartDate; + $this->container['isWorkingInInvestmentZone'] = $isWorkingInInvestmentZone; return $this; } /** - * Gets apprenticeshipEndDate + * Gets jobTitle * - * @return \DateTime|null + * @return string|null */ - public function getApprenticeshipEndDate(): ?\DateTime + public function getJobTitle(): ?string { - return $this->container['apprenticeshipEndDate']; + return $this->container['jobTitle']; } /** - * Sets apprenticeshipEndDate + * Sets jobTitle * - * @param \DateTime|null $apprenticeshipEndDate apprenticeshipEndDate + * @param string|null $jobTitle Job Title of Primary role of the Employee * * @return $this */ - public function setApprenticeshipEndDate(?\DateTime $apprenticeshipEndDate): static + public function setJobTitle(?string $jobTitle): static { - if (is_null($apprenticeshipEndDate)) { - array_push($this->openAPINullablesSetToNull, 'apprenticeshipEndDate'); + if (is_null($jobTitle)) { + array_push($this->openAPINullablesSetToNull, 'jobTitle'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('apprenticeshipEndDate', $nullablesSetToNull); + $index = array_search('jobTitle', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['apprenticeshipEndDate'] = $apprenticeshipEndDate; + if (!is_null($jobTitle) && (mb_strlen($jobTitle) > 120)) { + throw new InvalidArgumentException('invalid length for $jobTitle when calling ContractEmploymentDetailsRequest., must be smaller than or equal to 120.'); + } + + $this->container['jobTitle'] = $jobTitle; return $this; } /** - * Gets workingPattern + * Gets leaverDetails * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractLeaverDetails|null */ - public function getWorkingPattern(): ?string + public function getLeaverDetails(): ?\SynergiTech\Staffology\Model\ContractLeaverDetails { - return $this->container['workingPattern']; + return $this->container['leaverDetails']; } /** - * Sets workingPattern + * Sets leaverDetails * - * @param string|null $workingPattern Used when calculating payments for Leave. If null then the default Working Pattern is used + * @param \SynergiTech\Staffology\Model\ContractLeaverDetails|null $leaverDetails leaverDetails * * @return $this */ - public function setWorkingPattern(?string $workingPattern): static + public function setLeaverDetails(?\SynergiTech\Staffology\Model\ContractLeaverDetails $leaverDetails): static { - if (is_null($workingPattern)) { - array_push($this->openAPINullablesSetToNull, 'workingPattern'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('workingPattern', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($leaverDetails)) { + throw new InvalidArgumentException('non-nullable leaverDetails cannot be null'); } - $this->container['workingPattern'] = $workingPattern; + $this->container['leaverDetails'] = $leaverDetails; return $this; } /** - * Gets forcePreviousPayrollCode + * Gets onFurlough * - * @return string|null + * @return bool|null */ - public function getForcePreviousPayrollCode(): ?string + public function getOnFurlough(): ?bool { - return $this->container['forcePreviousPayrollCode']; + return $this->container['onFurlough']; } /** - * Sets forcePreviousPayrollCode + * Sets onFurlough * - * @param string|null $forcePreviousPayrollCode If this property has a non-empty value then a change of Payroll code will be declared on the next FPS. + * @param bool|null $onFurlough Set to true if the employee is on furlough. * * @return $this */ - public function setForcePreviousPayrollCode(?string $forcePreviousPayrollCode): static + public function setOnFurlough(?bool $onFurlough): static { - if (is_null($forcePreviousPayrollCode)) { - array_push($this->openAPINullablesSetToNull, 'forcePreviousPayrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('forcePreviousPayrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($forcePreviousPayrollCode) && (mb_strlen($forcePreviousPayrollCode) > 35)) { - throw new InvalidArgumentException('invalid length for $forcePreviousPayrollCode when calling ContractEmploymentDetailsRequest., must be smaller than or equal to 35.'); + if (is_null($onFurlough)) { + throw new InvalidArgumentException('non-nullable onFurlough cannot be null'); } - - $this->container['forcePreviousPayrollCode'] = $forcePreviousPayrollCode; + $this->container['onFurlough'] = $onFurlough; return $this; } /** - * Gets starterDetails + * Gets onHold * - * @return \SynergiTech\Staffology\Model\ContractStarterDetails|null + * @return bool|null */ - public function getStarterDetails(): ?\SynergiTech\Staffology\Model\ContractStarterDetails + public function getOnHold(): ?bool { - return $this->container['starterDetails']; + return $this->container['onHold']; } /** - * Sets starterDetails + * Sets onHold * - * @param \SynergiTech\Staffology\Model\ContractStarterDetails|null $starterDetails starterDetails + * @param bool|null $onHold Set to true to temporarily exclude the employee from payruns * * @return $this */ - public function setStarterDetails(?\SynergiTech\Staffology\Model\ContractStarterDetails $starterDetails): static + public function setOnHold(?bool $onHold): static { - if (is_null($starterDetails)) { - throw new InvalidArgumentException('non-nullable starterDetails cannot be null'); + if (is_null($onHold)) { + throw new InvalidArgumentException('non-nullable onHold cannot be null'); } - $this->container['starterDetails'] = $starterDetails; + $this->container['onHold'] = $onHold; return $this; } /** - * Gets directorshipDetails + * Gets partialFurlough * - * @return \SynergiTech\Staffology\Model\ContractDirectorshipDetails|null + * @return bool|null */ - public function getDirectorshipDetails(): ?\SynergiTech\Staffology\Model\ContractDirectorshipDetails + public function getPartialFurlough(): ?bool { - return $this->container['directorshipDetails']; + return $this->container['partialFurlough']; } /** - * Sets directorshipDetails + * Sets partialFurlough * - * @param \SynergiTech\Staffology\Model\ContractDirectorshipDetails|null $directorshipDetails directorshipDetails + * @param bool|null $partialFurlough Set to true if the employee is partially furloughed. * * @return $this */ - public function setDirectorshipDetails(?\SynergiTech\Staffology\Model\ContractDirectorshipDetails $directorshipDetails): static + public function setPartialFurlough(?bool $partialFurlough): static { - if (is_null($directorshipDetails)) { - throw new InvalidArgumentException('non-nullable directorshipDetails cannot be null'); + if (is_null($partialFurlough)) { + throw new InvalidArgumentException('non-nullable partialFurlough cannot be null'); } - $this->container['directorshipDetails'] = $directorshipDetails; + $this->container['partialFurlough'] = $partialFurlough; return $this; } /** - * Gets leaverDetails + * Gets payrollCode * - * @return \SynergiTech\Staffology\Model\ContractLeaverDetails|null + * @return string */ - public function getLeaverDetails(): ?\SynergiTech\Staffology\Model\ContractLeaverDetails + public function getPayrollCode(): string { - return $this->container['leaverDetails']; + return $this->container['payrollCode']; } /** - * Sets leaverDetails + * Sets payrollCode * - * @param \SynergiTech\Staffology\Model\ContractLeaverDetails|null $leaverDetails leaverDetails + * @param string $payrollCode The Employees Payroll Code. Must be unique within the Employer. * * @return $this */ - public function setLeaverDetails(?\SynergiTech\Staffology\Model\ContractLeaverDetails $leaverDetails): static + public function setPayrollCode(string $payrollCode): static { - if (is_null($leaverDetails)) { - throw new InvalidArgumentException('non-nullable leaverDetails cannot be null'); + if (is_null($payrollCode)) { + throw new InvalidArgumentException('non-nullable payrollCode cannot be null'); } - $this->container['leaverDetails'] = $leaverDetails; + if ((mb_strlen($payrollCode) > 35)) { + throw new InvalidArgumentException('invalid length for $payrollCode when calling ContractEmploymentDetailsRequest., must be smaller than or equal to 35.'); + } + if ((mb_strlen($payrollCode) < 1)) { + throw new InvalidArgumentException('invalid length for $payrollCode when calling ContractEmploymentDetailsRequest., must be bigger than or equal to 1.'); + } + + $this->container['payrollCode'] = $payrollCode; return $this; } @@ -1231,116 +1220,127 @@ public function setRoles(?array $roles): static } /** - * Gets isWorkingInFreePort + * Gets starterDetails * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractStarterDetails|null */ - public function getIsWorkingInFreePort(): ?bool + public function getStarterDetails(): ?\SynergiTech\Staffology\Model\ContractStarterDetails { - return $this->container['isWorkingInFreePort']; + return $this->container['starterDetails']; } /** - * Sets isWorkingInFreePort + * Sets starterDetails * - * @param bool|null $isWorkingInFreePort Flag indicating the employee is employed in a Freeport + * @param \SynergiTech\Staffology\Model\ContractStarterDetails|null $starterDetails starterDetails * * @return $this */ - public function setIsWorkingInFreePort(?bool $isWorkingInFreePort): static + public function setStarterDetails(?\SynergiTech\Staffology\Model\ContractStarterDetails $starterDetails): static { - if (is_null($isWorkingInFreePort)) { - throw new InvalidArgumentException('non-nullable isWorkingInFreePort cannot be null'); + if (is_null($starterDetails)) { + throw new InvalidArgumentException('non-nullable starterDetails cannot be null'); } - $this->container['isWorkingInFreePort'] = $isWorkingInFreePort; + $this->container['starterDetails'] = $starterDetails; return $this; } /** - * Gets isWorkingInInvestmentZone + * Gets veteranDetails * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractVeteranDetails|null */ - public function getIsWorkingInInvestmentZone(): ?bool + public function getVeteranDetails(): ?\SynergiTech\Staffology\Model\ContractVeteranDetails { - return $this->container['isWorkingInInvestmentZone']; + return $this->container['veteranDetails']; } /** - * Sets isWorkingInInvestmentZone + * Sets veteranDetails * - * @param bool|null $isWorkingInInvestmentZone Flag indicating the employee is employed in an Investment Zone + * @param \SynergiTech\Staffology\Model\ContractVeteranDetails|null $veteranDetails veteranDetails * * @return $this */ - public function setIsWorkingInInvestmentZone(?bool $isWorkingInInvestmentZone): static + public function setVeteranDetails(?\SynergiTech\Staffology\Model\ContractVeteranDetails $veteranDetails): static { - if (is_null($isWorkingInInvestmentZone)) { - throw new InvalidArgumentException('non-nullable isWorkingInInvestmentZone cannot be null'); + if (is_null($veteranDetails)) { + throw new InvalidArgumentException('non-nullable veteranDetails cannot be null'); } - $this->container['isWorkingInInvestmentZone'] = $isWorkingInInvestmentZone; + $this->container['veteranDetails'] = $veteranDetails; return $this; } /** - * Gets veteranDetails + * Gets workingPattern * - * @return \SynergiTech\Staffology\Model\ContractVeteranDetails|null + * @return string|null */ - public function getVeteranDetails(): ?\SynergiTech\Staffology\Model\ContractVeteranDetails + public function getWorkingPattern(): ?string { - return $this->container['veteranDetails']; + return $this->container['workingPattern']; } /** - * Sets veteranDetails + * Sets workingPattern * - * @param \SynergiTech\Staffology\Model\ContractVeteranDetails|null $veteranDetails veteranDetails + * @param string|null $workingPattern Used when calculating payments for Leave. If null then the default Working Pattern is used * * @return $this */ - public function setVeteranDetails(?\SynergiTech\Staffology\Model\ContractVeteranDetails $veteranDetails): static + public function setWorkingPattern(?string $workingPattern): static { - if (is_null($veteranDetails)) { - throw new InvalidArgumentException('non-nullable veteranDetails cannot be null'); + if (is_null($workingPattern)) { + array_push($this->openAPINullablesSetToNull, 'workingPattern'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('workingPattern', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['veteranDetails'] = $veteranDetails; + $this->container['workingPattern'] = $workingPattern; return $this; } /** - * Gets continuousEmploymentDate + * Gets workplacePostcode * - * @return \DateTime|null + * @return string|null */ - public function getContinuousEmploymentDate(): ?\DateTime + public function getWorkplacePostcode(): ?string { - return $this->container['continuousEmploymentDate']; + return $this->container['workplacePostcode']; } /** - * Sets continuousEmploymentDate + * Sets workplacePostcode * - * @param \DateTime|null $continuousEmploymentDate Date of continuous employment + * @param string|null $workplacePostcode Set the workplace postcode, ensuring it is no longer than 10 characters. * * @return $this */ - public function setContinuousEmploymentDate(?\DateTime $continuousEmploymentDate): static + public function setWorkplacePostcode(?string $workplacePostcode): static { - if (is_null($continuousEmploymentDate)) { - array_push($this->openAPINullablesSetToNull, 'continuousEmploymentDate'); + if (is_null($workplacePostcode)) { + array_push($this->openAPINullablesSetToNull, 'workplacePostcode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('continuousEmploymentDate', $nullablesSetToNull); + $index = array_search('workplacePostcode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['continuousEmploymentDate'] = $continuousEmploymentDate; + if (!is_null($workplacePostcode) && (mb_strlen($workplacePostcode) > 10)) { + throw new InvalidArgumentException('invalid length for $workplacePostcode when calling ContractEmploymentDetailsRequest., must be smaller than or equal to 10.'); + } + + $this->container['workplacePostcode'] = $workplacePostcode; return $this; } diff --git a/src/Model/ContractEmploymentDetailsResponse.php b/src/Model/ContractEmploymentDetailsResponse.php index d90cb14..10df578 100644 --- a/src/Model/ContractEmploymentDetailsResponse.php +++ b/src/Model/ContractEmploymentDetailsResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,35 +59,35 @@ class ContractEmploymentDetailsResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPITypes = [ + 'apprenticeshipEndDate' => '\DateTime', + 'apprenticeshipStartDate' => '\DateTime', 'cis' => '\SynergiTech\Staffology\Model\ContractCisDetailsResponse', - 'department' => '\SynergiTech\Staffology\Model\ContractDepartmentResponse', - 'includeSecondedInfoOnStarter' => 'bool', 'cisSubContractor' => 'bool', - 'payrollCode' => 'string', - 'jobTitle' => 'string', - 'workplacePostcode' => 'string', - 'onHold' => 'bool', - 'onFurlough' => 'bool', - 'furloughStart' => '\DateTime', - 'furloughEnd' => '\DateTime', + 'continuousEmploymentDate' => '\DateTime', + 'department' => '\SynergiTech\Staffology\Model\ContractDepartmentResponse', + 'directorshipDetails' => '\SynergiTech\Staffology\Model\ContractDirectorshipDetails', + 'forcePreviousPayrollCode' => 'string', 'furloughCalculationBasis' => '\SynergiTech\Staffology\Model\FurloughCalculationBasis', 'furloughCalculationBasisAmount' => 'float', - 'partialFurlough' => 'bool', + 'furloughEnd' => '\DateTime', 'furloughHoursNormallyWorked' => 'float', 'furloughHoursOnFurlough' => 'float', + 'furloughStart' => '\DateTime', + 'includeSecondedInfoOnStarter' => 'bool', 'isApprentice' => 'bool', - 'apprenticeshipStartDate' => '\DateTime', - 'apprenticeshipEndDate' => '\DateTime', - 'workingPattern' => 'string', - 'forcePreviousPayrollCode' => 'string', - 'starterDetails' => '\SynergiTech\Staffology\Model\ContractStarterDetails', - 'directorshipDetails' => '\SynergiTech\Staffology\Model\ContractDirectorshipDetails', - 'leaverDetails' => '\SynergiTech\Staffology\Model\ContractLeaverDetails', - 'roles' => '\SynergiTech\Staffology\Model\ContractEmployeeRoleItem[]', 'isWorkingInFreePort' => 'bool', 'isWorkingInInvestmentZone' => 'bool', + 'jobTitle' => 'string', + 'leaverDetails' => '\SynergiTech\Staffology\Model\ContractLeaverDetails', + 'onFurlough' => 'bool', + 'onHold' => 'bool', + 'partialFurlough' => 'bool', + 'payrollCode' => 'string', + 'roles' => '\SynergiTech\Staffology\Model\ContractEmployeeRoleItem[]', + 'starterDetails' => '\SynergiTech\Staffology\Model\ContractStarterDetails', 'veteranDetails' => '\SynergiTech\Staffology\Model\ContractVeteranDetails', - 'continuousEmploymentDate' => '\DateTime' + 'workingPattern' => 'string', + 'workplacePostcode' => 'string' ]; /** @@ -96,35 +96,35 @@ class ContractEmploymentDetailsResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPIFormats = [ + 'apprenticeshipEndDate' => 'date', + 'apprenticeshipStartDate' => 'date', 'cis' => null, - 'department' => null, - 'includeSecondedInfoOnStarter' => null, 'cisSubContractor' => null, - 'payrollCode' => null, - 'jobTitle' => null, - 'workplacePostcode' => null, - 'onHold' => null, - 'onFurlough' => null, - 'furloughStart' => 'date', - 'furloughEnd' => 'date', + 'continuousEmploymentDate' => 'date', + 'department' => null, + 'directorshipDetails' => null, + 'forcePreviousPayrollCode' => null, 'furloughCalculationBasis' => null, 'furloughCalculationBasisAmount' => 'double', - 'partialFurlough' => null, + 'furloughEnd' => 'date', 'furloughHoursNormallyWorked' => 'double', 'furloughHoursOnFurlough' => 'double', + 'furloughStart' => 'date', + 'includeSecondedInfoOnStarter' => null, 'isApprentice' => null, - 'apprenticeshipStartDate' => 'date', - 'apprenticeshipEndDate' => 'date', - 'workingPattern' => 'uuid', - 'forcePreviousPayrollCode' => null, - 'starterDetails' => null, - 'directorshipDetails' => null, - 'leaverDetails' => null, - 'roles' => null, 'isWorkingInFreePort' => null, 'isWorkingInInvestmentZone' => null, + 'jobTitle' => null, + 'leaverDetails' => null, + 'onFurlough' => null, + 'onHold' => null, + 'partialFurlough' => null, + 'payrollCode' => null, + 'roles' => null, + 'starterDetails' => null, 'veteranDetails' => null, - 'continuousEmploymentDate' => 'date' + 'workingPattern' => 'uuid', + 'workplacePostcode' => null ]; /** @@ -133,35 +133,35 @@ class ContractEmploymentDetailsResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPINullables = [ + 'apprenticeshipEndDate' => true, + 'apprenticeshipStartDate' => true, 'cis' => false, - 'department' => false, - 'includeSecondedInfoOnStarter' => false, 'cisSubContractor' => false, - 'payrollCode' => false, - 'jobTitle' => true, - 'workplacePostcode' => true, - 'onHold' => false, - 'onFurlough' => false, - 'furloughStart' => true, - 'furloughEnd' => true, + 'continuousEmploymentDate' => true, + 'department' => false, + 'directorshipDetails' => false, + 'forcePreviousPayrollCode' => true, 'furloughCalculationBasis' => false, 'furloughCalculationBasisAmount' => false, - 'partialFurlough' => false, + 'furloughEnd' => true, 'furloughHoursNormallyWorked' => false, 'furloughHoursOnFurlough' => false, + 'furloughStart' => true, + 'includeSecondedInfoOnStarter' => false, 'isApprentice' => false, - 'apprenticeshipStartDate' => true, - 'apprenticeshipEndDate' => true, - 'workingPattern' => true, - 'forcePreviousPayrollCode' => true, - 'starterDetails' => false, - 'directorshipDetails' => false, - 'leaverDetails' => false, - 'roles' => true, 'isWorkingInFreePort' => false, 'isWorkingInInvestmentZone' => false, + 'jobTitle' => true, + 'leaverDetails' => false, + 'onFurlough' => false, + 'onHold' => false, + 'partialFurlough' => false, + 'payrollCode' => false, + 'roles' => true, + 'starterDetails' => false, 'veteranDetails' => false, - 'continuousEmploymentDate' => true + 'workingPattern' => true, + 'workplacePostcode' => true ]; /** @@ -250,35 +250,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'apprenticeshipEndDate' => 'apprenticeshipEndDate', + 'apprenticeshipStartDate' => 'apprenticeshipStartDate', 'cis' => 'cis', - 'department' => 'department', - 'includeSecondedInfoOnStarter' => 'includeSecondedInfoOnStarter', 'cisSubContractor' => 'cisSubContractor', - 'payrollCode' => 'payrollCode', - 'jobTitle' => 'jobTitle', - 'workplacePostcode' => 'workplacePostcode', - 'onHold' => 'onHold', - 'onFurlough' => 'onFurlough', - 'furloughStart' => 'furloughStart', - 'furloughEnd' => 'furloughEnd', + 'continuousEmploymentDate' => 'continuousEmploymentDate', + 'department' => 'department', + 'directorshipDetails' => 'directorshipDetails', + 'forcePreviousPayrollCode' => 'forcePreviousPayrollCode', 'furloughCalculationBasis' => 'furloughCalculationBasis', 'furloughCalculationBasisAmount' => 'furloughCalculationBasisAmount', - 'partialFurlough' => 'partialFurlough', + 'furloughEnd' => 'furloughEnd', 'furloughHoursNormallyWorked' => 'furloughHoursNormallyWorked', 'furloughHoursOnFurlough' => 'furloughHoursOnFurlough', + 'furloughStart' => 'furloughStart', + 'includeSecondedInfoOnStarter' => 'includeSecondedInfoOnStarter', 'isApprentice' => 'isApprentice', - 'apprenticeshipStartDate' => 'apprenticeshipStartDate', - 'apprenticeshipEndDate' => 'apprenticeshipEndDate', - 'workingPattern' => 'workingPattern', - 'forcePreviousPayrollCode' => 'forcePreviousPayrollCode', - 'starterDetails' => 'starterDetails', - 'directorshipDetails' => 'directorshipDetails', - 'leaverDetails' => 'leaverDetails', - 'roles' => 'roles', 'isWorkingInFreePort' => 'isWorkingInFreePort', 'isWorkingInInvestmentZone' => 'isWorkingInInvestmentZone', + 'jobTitle' => 'jobTitle', + 'leaverDetails' => 'leaverDetails', + 'onFurlough' => 'onFurlough', + 'onHold' => 'onHold', + 'partialFurlough' => 'partialFurlough', + 'payrollCode' => 'payrollCode', + 'roles' => 'roles', + 'starterDetails' => 'starterDetails', 'veteranDetails' => 'veteranDetails', - 'continuousEmploymentDate' => 'continuousEmploymentDate' + 'workingPattern' => 'workingPattern', + 'workplacePostcode' => 'workplacePostcode' ]; /** @@ -287,35 +287,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'apprenticeshipEndDate' => 'setApprenticeshipEndDate', + 'apprenticeshipStartDate' => 'setApprenticeshipStartDate', 'cis' => 'setCis', - 'department' => 'setDepartment', - 'includeSecondedInfoOnStarter' => 'setIncludeSecondedInfoOnStarter', 'cisSubContractor' => 'setCisSubContractor', - 'payrollCode' => 'setPayrollCode', - 'jobTitle' => 'setJobTitle', - 'workplacePostcode' => 'setWorkplacePostcode', - 'onHold' => 'setOnHold', - 'onFurlough' => 'setOnFurlough', - 'furloughStart' => 'setFurloughStart', - 'furloughEnd' => 'setFurloughEnd', + 'continuousEmploymentDate' => 'setContinuousEmploymentDate', + 'department' => 'setDepartment', + 'directorshipDetails' => 'setDirectorshipDetails', + 'forcePreviousPayrollCode' => 'setForcePreviousPayrollCode', 'furloughCalculationBasis' => 'setFurloughCalculationBasis', 'furloughCalculationBasisAmount' => 'setFurloughCalculationBasisAmount', - 'partialFurlough' => 'setPartialFurlough', + 'furloughEnd' => 'setFurloughEnd', 'furloughHoursNormallyWorked' => 'setFurloughHoursNormallyWorked', 'furloughHoursOnFurlough' => 'setFurloughHoursOnFurlough', + 'furloughStart' => 'setFurloughStart', + 'includeSecondedInfoOnStarter' => 'setIncludeSecondedInfoOnStarter', 'isApprentice' => 'setIsApprentice', - 'apprenticeshipStartDate' => 'setApprenticeshipStartDate', - 'apprenticeshipEndDate' => 'setApprenticeshipEndDate', - 'workingPattern' => 'setWorkingPattern', - 'forcePreviousPayrollCode' => 'setForcePreviousPayrollCode', - 'starterDetails' => 'setStarterDetails', - 'directorshipDetails' => 'setDirectorshipDetails', - 'leaverDetails' => 'setLeaverDetails', - 'roles' => 'setRoles', 'isWorkingInFreePort' => 'setIsWorkingInFreePort', 'isWorkingInInvestmentZone' => 'setIsWorkingInInvestmentZone', + 'jobTitle' => 'setJobTitle', + 'leaverDetails' => 'setLeaverDetails', + 'onFurlough' => 'setOnFurlough', + 'onHold' => 'setOnHold', + 'partialFurlough' => 'setPartialFurlough', + 'payrollCode' => 'setPayrollCode', + 'roles' => 'setRoles', + 'starterDetails' => 'setStarterDetails', 'veteranDetails' => 'setVeteranDetails', - 'continuousEmploymentDate' => 'setContinuousEmploymentDate' + 'workingPattern' => 'setWorkingPattern', + 'workplacePostcode' => 'setWorkplacePostcode' ]; /** @@ -324,35 +324,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'apprenticeshipEndDate' => 'getApprenticeshipEndDate', + 'apprenticeshipStartDate' => 'getApprenticeshipStartDate', 'cis' => 'getCis', - 'department' => 'getDepartment', - 'includeSecondedInfoOnStarter' => 'getIncludeSecondedInfoOnStarter', 'cisSubContractor' => 'getCisSubContractor', - 'payrollCode' => 'getPayrollCode', - 'jobTitle' => 'getJobTitle', - 'workplacePostcode' => 'getWorkplacePostcode', - 'onHold' => 'getOnHold', - 'onFurlough' => 'getOnFurlough', - 'furloughStart' => 'getFurloughStart', - 'furloughEnd' => 'getFurloughEnd', + 'continuousEmploymentDate' => 'getContinuousEmploymentDate', + 'department' => 'getDepartment', + 'directorshipDetails' => 'getDirectorshipDetails', + 'forcePreviousPayrollCode' => 'getForcePreviousPayrollCode', 'furloughCalculationBasis' => 'getFurloughCalculationBasis', 'furloughCalculationBasisAmount' => 'getFurloughCalculationBasisAmount', - 'partialFurlough' => 'getPartialFurlough', + 'furloughEnd' => 'getFurloughEnd', 'furloughHoursNormallyWorked' => 'getFurloughHoursNormallyWorked', 'furloughHoursOnFurlough' => 'getFurloughHoursOnFurlough', + 'furloughStart' => 'getFurloughStart', + 'includeSecondedInfoOnStarter' => 'getIncludeSecondedInfoOnStarter', 'isApprentice' => 'getIsApprentice', - 'apprenticeshipStartDate' => 'getApprenticeshipStartDate', - 'apprenticeshipEndDate' => 'getApprenticeshipEndDate', - 'workingPattern' => 'getWorkingPattern', - 'forcePreviousPayrollCode' => 'getForcePreviousPayrollCode', - 'starterDetails' => 'getStarterDetails', - 'directorshipDetails' => 'getDirectorshipDetails', - 'leaverDetails' => 'getLeaverDetails', - 'roles' => 'getRoles', 'isWorkingInFreePort' => 'getIsWorkingInFreePort', 'isWorkingInInvestmentZone' => 'getIsWorkingInInvestmentZone', + 'jobTitle' => 'getJobTitle', + 'leaverDetails' => 'getLeaverDetails', + 'onFurlough' => 'getOnFurlough', + 'onHold' => 'getOnHold', + 'partialFurlough' => 'getPartialFurlough', + 'payrollCode' => 'getPayrollCode', + 'roles' => 'getRoles', + 'starterDetails' => 'getStarterDetails', 'veteranDetails' => 'getVeteranDetails', - 'continuousEmploymentDate' => 'getContinuousEmploymentDate' + 'workingPattern' => 'getWorkingPattern', + 'workplacePostcode' => 'getWorkplacePostcode' ]; /** @@ -411,35 +411,35 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('apprenticeshipEndDate', $data ?? [], null); + $this->setIfExists('apprenticeshipStartDate', $data ?? [], null); $this->setIfExists('cis', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); - $this->setIfExists('includeSecondedInfoOnStarter', $data ?? [], null); $this->setIfExists('cisSubContractor', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('jobTitle', $data ?? [], null); - $this->setIfExists('workplacePostcode', $data ?? [], null); - $this->setIfExists('onHold', $data ?? [], null); - $this->setIfExists('onFurlough', $data ?? [], null); - $this->setIfExists('furloughStart', $data ?? [], null); - $this->setIfExists('furloughEnd', $data ?? [], null); + $this->setIfExists('continuousEmploymentDate', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('directorshipDetails', $data ?? [], null); + $this->setIfExists('forcePreviousPayrollCode', $data ?? [], null); $this->setIfExists('furloughCalculationBasis', $data ?? [], null); $this->setIfExists('furloughCalculationBasisAmount', $data ?? [], null); - $this->setIfExists('partialFurlough', $data ?? [], null); + $this->setIfExists('furloughEnd', $data ?? [], null); $this->setIfExists('furloughHoursNormallyWorked', $data ?? [], null); $this->setIfExists('furloughHoursOnFurlough', $data ?? [], null); + $this->setIfExists('furloughStart', $data ?? [], null); + $this->setIfExists('includeSecondedInfoOnStarter', $data ?? [], null); $this->setIfExists('isApprentice', $data ?? [], null); - $this->setIfExists('apprenticeshipStartDate', $data ?? [], null); - $this->setIfExists('apprenticeshipEndDate', $data ?? [], null); - $this->setIfExists('workingPattern', $data ?? [], null); - $this->setIfExists('forcePreviousPayrollCode', $data ?? [], null); - $this->setIfExists('starterDetails', $data ?? [], null); - $this->setIfExists('directorshipDetails', $data ?? [], null); - $this->setIfExists('leaverDetails', $data ?? [], null); - $this->setIfExists('roles', $data ?? [], null); $this->setIfExists('isWorkingInFreePort', $data ?? [], null); $this->setIfExists('isWorkingInInvestmentZone', $data ?? [], null); + $this->setIfExists('jobTitle', $data ?? [], null); + $this->setIfExists('leaverDetails', $data ?? [], null); + $this->setIfExists('onFurlough', $data ?? [], null); + $this->setIfExists('onHold', $data ?? [], null); + $this->setIfExists('partialFurlough', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('roles', $data ?? [], null); + $this->setIfExists('starterDetails', $data ?? [], null); $this->setIfExists('veteranDetails', $data ?? [], null); - $this->setIfExists('continuousEmploymentDate', $data ?? [], null); + $this->setIfExists('workingPattern', $data ?? [], null); + $this->setIfExists('workplacePostcode', $data ?? [], null); } /** @@ -469,6 +469,14 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if (!is_null($this->container['forcePreviousPayrollCode']) && (mb_strlen($this->container['forcePreviousPayrollCode']) > 35)) { + $invalidProperties[] = "invalid value for 'forcePreviousPayrollCode', the character length must be smaller than or equal to 35."; + } + + if (!is_null($this->container['jobTitle']) && (mb_strlen($this->container['jobTitle']) > 120)) { + $invalidProperties[] = "invalid value for 'jobTitle', the character length must be smaller than or equal to 120."; + } + if ($this->container['payrollCode'] === null) { $invalidProperties[] = "'payrollCode' can't be null"; } @@ -480,18 +488,10 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'payrollCode', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['jobTitle']) && (mb_strlen($this->container['jobTitle']) > 120)) { - $invalidProperties[] = "invalid value for 'jobTitle', the character length must be smaller than or equal to 120."; - } - if (!is_null($this->container['workplacePostcode']) && (mb_strlen($this->container['workplacePostcode']) > 10)) { $invalidProperties[] = "invalid value for 'workplacePostcode', the character length must be smaller than or equal to 10."; } - if (!is_null($this->container['forcePreviousPayrollCode']) && (mb_strlen($this->container['forcePreviousPayrollCode']) > 35)) { - $invalidProperties[] = "invalid value for 'forcePreviousPayrollCode', the character length must be smaller than or equal to 35."; - } - return $invalidProperties; } @@ -508,82 +508,96 @@ public function valid(): bool /** - * Gets cis + * Gets apprenticeshipEndDate * - * @return \SynergiTech\Staffology\Model\ContractCisDetailsResponse|null + * @return \DateTime|null */ - public function getCis(): ?\SynergiTech\Staffology\Model\ContractCisDetailsResponse + public function getApprenticeshipEndDate(): ?\DateTime { - return $this->container['cis']; + return $this->container['apprenticeshipEndDate']; } /** - * Sets cis + * Sets apprenticeshipEndDate * - * @param \SynergiTech\Staffology\Model\ContractCisDetailsResponse|null $cis cis + * @param \DateTime|null $apprenticeshipEndDate apprenticeshipEndDate * * @return $this */ - public function setCis(?\SynergiTech\Staffology\Model\ContractCisDetailsResponse $cis): static + public function setApprenticeshipEndDate(?\DateTime $apprenticeshipEndDate): static { - if (is_null($cis)) { - throw new InvalidArgumentException('non-nullable cis cannot be null'); + if (is_null($apprenticeshipEndDate)) { + array_push($this->openAPINullablesSetToNull, 'apprenticeshipEndDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('apprenticeshipEndDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['cis'] = $cis; + $this->container['apprenticeshipEndDate'] = $apprenticeshipEndDate; return $this; } /** - * Gets department + * Gets apprenticeshipStartDate * - * @return \SynergiTech\Staffology\Model\ContractDepartmentResponse|null + * @return \DateTime|null */ - public function getDepartment(): ?\SynergiTech\Staffology\Model\ContractDepartmentResponse + public function getApprenticeshipStartDate(): ?\DateTime { - return $this->container['department']; + return $this->container['apprenticeshipStartDate']; } /** - * Sets department + * Sets apprenticeshipStartDate * - * @param \SynergiTech\Staffology\Model\ContractDepartmentResponse|null $department department + * @param \DateTime|null $apprenticeshipStartDate apprenticeshipStartDate * * @return $this */ - public function setDepartment(?\SynergiTech\Staffology\Model\ContractDepartmentResponse $department): static + public function setApprenticeshipStartDate(?\DateTime $apprenticeshipStartDate): static { - if (is_null($department)) { - throw new InvalidArgumentException('non-nullable department cannot be null'); + if (is_null($apprenticeshipStartDate)) { + array_push($this->openAPINullablesSetToNull, 'apprenticeshipStartDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('apprenticeshipStartDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['department'] = $department; + $this->container['apprenticeshipStartDate'] = $apprenticeshipStartDate; return $this; } /** - * Gets includeSecondedInfoOnStarter + * Gets cis * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractCisDetailsResponse|null */ - public function getIncludeSecondedInfoOnStarter(): ?bool + public function getCis(): ?\SynergiTech\Staffology\Model\ContractCisDetailsResponse { - return $this->container['includeSecondedInfoOnStarter']; + return $this->container['cis']; } /** - * Sets includeSecondedInfoOnStarter + * Sets cis * - * @param bool|null $includeSecondedInfoOnStarter includeSecondedInfoOnStarter + * @param \SynergiTech\Staffology\Model\ContractCisDetailsResponse|null $cis cis * * @return $this */ - public function setIncludeSecondedInfoOnStarter(?bool $includeSecondedInfoOnStarter): static + public function setCis(?\SynergiTech\Staffology\Model\ContractCisDetailsResponse $cis): static { - if (is_null($includeSecondedInfoOnStarter)) { - throw new InvalidArgumentException('non-nullable includeSecondedInfoOnStarter cannot be null'); + if (is_null($cis)) { + throw new InvalidArgumentException('non-nullable cis cannot be null'); } - $this->container['includeSecondedInfoOnStarter'] = $includeSecondedInfoOnStarter; + $this->container['cis'] = $cis; return $this; } @@ -616,199 +630,181 @@ public function setCisSubContractor(?bool $cisSubContractor): static } /** - * Gets payrollCode + * Gets continuousEmploymentDate * - * @return string + * @return \DateTime|null */ - public function getPayrollCode(): string + public function getContinuousEmploymentDate(): ?\DateTime { - return $this->container['payrollCode']; + return $this->container['continuousEmploymentDate']; } /** - * Sets payrollCode + * Sets continuousEmploymentDate * - * @param string $payrollCode The Employees Payroll Code. Must be unique within the Employer. + * @param \DateTime|null $continuousEmploymentDate Date of continuous employment * * @return $this */ - public function setPayrollCode(string $payrollCode): static + public function setContinuousEmploymentDate(?\DateTime $continuousEmploymentDate): static { - if (is_null($payrollCode)) { - throw new InvalidArgumentException('non-nullable payrollCode cannot be null'); - } - if ((mb_strlen($payrollCode) > 35)) { - throw new InvalidArgumentException('invalid length for $payrollCode when calling ContractEmploymentDetailsResponse., must be smaller than or equal to 35.'); - } - if ((mb_strlen($payrollCode) < 1)) { - throw new InvalidArgumentException('invalid length for $payrollCode when calling ContractEmploymentDetailsResponse., must be bigger than or equal to 1.'); + if (is_null($continuousEmploymentDate)) { + array_push($this->openAPINullablesSetToNull, 'continuousEmploymentDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('continuousEmploymentDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - - $this->container['payrollCode'] = $payrollCode; + $this->container['continuousEmploymentDate'] = $continuousEmploymentDate; return $this; } /** - * Gets jobTitle + * Gets department * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractDepartmentResponse|null */ - public function getJobTitle(): ?string + public function getDepartment(): ?\SynergiTech\Staffology\Model\ContractDepartmentResponse { - return $this->container['jobTitle']; + return $this->container['department']; } /** - * Sets jobTitle + * Sets department * - * @param string|null $jobTitle Job Title of Primary role of the Employee + * @param \SynergiTech\Staffology\Model\ContractDepartmentResponse|null $department department * * @return $this */ - public function setJobTitle(?string $jobTitle): static + public function setDepartment(?\SynergiTech\Staffology\Model\ContractDepartmentResponse $department): static { - if (is_null($jobTitle)) { - array_push($this->openAPINullablesSetToNull, 'jobTitle'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('jobTitle', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($jobTitle) && (mb_strlen($jobTitle) > 120)) { - throw new InvalidArgumentException('invalid length for $jobTitle when calling ContractEmploymentDetailsResponse., must be smaller than or equal to 120.'); + if (is_null($department)) { + throw new InvalidArgumentException('non-nullable department cannot be null'); } - - $this->container['jobTitle'] = $jobTitle; + $this->container['department'] = $department; return $this; } /** - * Gets workplacePostcode + * Gets directorshipDetails * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractDirectorshipDetails|null */ - public function getWorkplacePostcode(): ?string + public function getDirectorshipDetails(): ?\SynergiTech\Staffology\Model\ContractDirectorshipDetails { - return $this->container['workplacePostcode']; + return $this->container['directorshipDetails']; } /** - * Sets workplacePostcode + * Sets directorshipDetails * - * @param string|null $workplacePostcode Set the workplace postcode, ensuring it is no longer than 10 characters. + * @param \SynergiTech\Staffology\Model\ContractDirectorshipDetails|null $directorshipDetails directorshipDetails * * @return $this */ - public function setWorkplacePostcode(?string $workplacePostcode): static + public function setDirectorshipDetails(?\SynergiTech\Staffology\Model\ContractDirectorshipDetails $directorshipDetails): static { - if (is_null($workplacePostcode)) { - array_push($this->openAPINullablesSetToNull, 'workplacePostcode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('workplacePostcode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($workplacePostcode) && (mb_strlen($workplacePostcode) > 10)) { - throw new InvalidArgumentException('invalid length for $workplacePostcode when calling ContractEmploymentDetailsResponse., must be smaller than or equal to 10.'); + if (is_null($directorshipDetails)) { + throw new InvalidArgumentException('non-nullable directorshipDetails cannot be null'); } - - $this->container['workplacePostcode'] = $workplacePostcode; + $this->container['directorshipDetails'] = $directorshipDetails; return $this; } /** - * Gets onHold + * Gets forcePreviousPayrollCode * - * @return bool|null + * @return string|null */ - public function getOnHold(): ?bool + public function getForcePreviousPayrollCode(): ?string { - return $this->container['onHold']; + return $this->container['forcePreviousPayrollCode']; } /** - * Sets onHold + * Sets forcePreviousPayrollCode * - * @param bool|null $onHold Set to true to temporarily exclude the employee from payruns + * @param string|null $forcePreviousPayrollCode If this property has a non-empty value then a change of Payroll code will be declared on the next FPS. * * @return $this */ - public function setOnHold(?bool $onHold): static + public function setForcePreviousPayrollCode(?string $forcePreviousPayrollCode): static { - if (is_null($onHold)) { - throw new InvalidArgumentException('non-nullable onHold cannot be null'); + if (is_null($forcePreviousPayrollCode)) { + array_push($this->openAPINullablesSetToNull, 'forcePreviousPayrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('forcePreviousPayrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['onHold'] = $onHold; + if (!is_null($forcePreviousPayrollCode) && (mb_strlen($forcePreviousPayrollCode) > 35)) { + throw new InvalidArgumentException('invalid length for $forcePreviousPayrollCode when calling ContractEmploymentDetailsResponse., must be smaller than or equal to 35.'); + } + + $this->container['forcePreviousPayrollCode'] = $forcePreviousPayrollCode; return $this; } /** - * Gets onFurlough + * Gets furloughCalculationBasis * - * @return bool|null + * @return \SynergiTech\Staffology\Model\FurloughCalculationBasis|null */ - public function getOnFurlough(): ?bool + public function getFurloughCalculationBasis(): ?\SynergiTech\Staffology\Model\FurloughCalculationBasis { - return $this->container['onFurlough']; + return $this->container['furloughCalculationBasis']; } /** - * Sets onFurlough + * Sets furloughCalculationBasis * - * @param bool|null $onFurlough Set to true if the employee is on furlough. + * @param \SynergiTech\Staffology\Model\FurloughCalculationBasis|null $furloughCalculationBasis furloughCalculationBasis * * @return $this */ - public function setOnFurlough(?bool $onFurlough): static + public function setFurloughCalculationBasis(?\SynergiTech\Staffology\Model\FurloughCalculationBasis $furloughCalculationBasis): static { - if (is_null($onFurlough)) { - throw new InvalidArgumentException('non-nullable onFurlough cannot be null'); + if (is_null($furloughCalculationBasis)) { + throw new InvalidArgumentException('non-nullable furloughCalculationBasis cannot be null'); } - $this->container['onFurlough'] = $onFurlough; + $this->container['furloughCalculationBasis'] = $furloughCalculationBasis; return $this; } /** - * Gets furloughStart + * Gets furloughCalculationBasisAmount * - * @return \DateTime|null + * @return float|null */ - public function getFurloughStart(): ?\DateTime + public function getFurloughCalculationBasisAmount(): ?float { - return $this->container['furloughStart']; + return $this->container['furloughCalculationBasisAmount']; } /** - * Sets furloughStart + * Sets furloughCalculationBasisAmount * - * @param \DateTime|null $furloughStart Furlough Start Date. + * @param float|null $furloughCalculationBasisAmount furloughCalculationBasisAmount * * @return $this */ - public function setFurloughStart(?\DateTime $furloughStart): static + public function setFurloughCalculationBasisAmount(?float $furloughCalculationBasisAmount): static { - if (is_null($furloughStart)) { - array_push($this->openAPINullablesSetToNull, 'furloughStart'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('furloughStart', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($furloughCalculationBasisAmount)) { + throw new InvalidArgumentException('non-nullable furloughCalculationBasisAmount cannot be null'); } - $this->container['furloughStart'] = $furloughStart; + $this->container['furloughCalculationBasisAmount'] = $furloughCalculationBasisAmount; return $this; } @@ -848,384 +844,377 @@ public function setFurloughEnd(?\DateTime $furloughEnd): static } /** - * Gets furloughCalculationBasis + * Gets furloughHoursNormallyWorked * - * @return \SynergiTech\Staffology\Model\FurloughCalculationBasis|null + * @return float|null */ - public function getFurloughCalculationBasis(): ?\SynergiTech\Staffology\Model\FurloughCalculationBasis + public function getFurloughHoursNormallyWorked(): ?float { - return $this->container['furloughCalculationBasis']; + return $this->container['furloughHoursNormallyWorked']; } /** - * Sets furloughCalculationBasis + * Sets furloughHoursNormallyWorked * - * @param \SynergiTech\Staffology\Model\FurloughCalculationBasis|null $furloughCalculationBasis furloughCalculationBasis + * @param float|null $furloughHoursNormallyWorked furloughHoursNormallyWorked * * @return $this */ - public function setFurloughCalculationBasis(?\SynergiTech\Staffology\Model\FurloughCalculationBasis $furloughCalculationBasis): static + public function setFurloughHoursNormallyWorked(?float $furloughHoursNormallyWorked): static { - if (is_null($furloughCalculationBasis)) { - throw new InvalidArgumentException('non-nullable furloughCalculationBasis cannot be null'); + if (is_null($furloughHoursNormallyWorked)) { + throw new InvalidArgumentException('non-nullable furloughHoursNormallyWorked cannot be null'); } - $this->container['furloughCalculationBasis'] = $furloughCalculationBasis; + $this->container['furloughHoursNormallyWorked'] = $furloughHoursNormallyWorked; return $this; } /** - * Gets furloughCalculationBasisAmount + * Gets furloughHoursOnFurlough * * @return float|null */ - public function getFurloughCalculationBasisAmount(): ?float + public function getFurloughHoursOnFurlough(): ?float { - return $this->container['furloughCalculationBasisAmount']; + return $this->container['furloughHoursOnFurlough']; } /** - * Sets furloughCalculationBasisAmount + * Sets furloughHoursOnFurlough * - * @param float|null $furloughCalculationBasisAmount furloughCalculationBasisAmount + * @param float|null $furloughHoursOnFurlough furloughHoursOnFurlough * * @return $this */ - public function setFurloughCalculationBasisAmount(?float $furloughCalculationBasisAmount): static + public function setFurloughHoursOnFurlough(?float $furloughHoursOnFurlough): static { - if (is_null($furloughCalculationBasisAmount)) { - throw new InvalidArgumentException('non-nullable furloughCalculationBasisAmount cannot be null'); + if (is_null($furloughHoursOnFurlough)) { + throw new InvalidArgumentException('non-nullable furloughHoursOnFurlough cannot be null'); } - $this->container['furloughCalculationBasisAmount'] = $furloughCalculationBasisAmount; + $this->container['furloughHoursOnFurlough'] = $furloughHoursOnFurlough; return $this; } /** - * Gets partialFurlough + * Gets furloughStart * - * @return bool|null + * @return \DateTime|null */ - public function getPartialFurlough(): ?bool + public function getFurloughStart(): ?\DateTime { - return $this->container['partialFurlough']; + return $this->container['furloughStart']; } /** - * Sets partialFurlough + * Sets furloughStart * - * @param bool|null $partialFurlough Set to true if the employee is partially furloughed. + * @param \DateTime|null $furloughStart Furlough Start Date. * * @return $this */ - public function setPartialFurlough(?bool $partialFurlough): static + public function setFurloughStart(?\DateTime $furloughStart): static { - if (is_null($partialFurlough)) { - throw new InvalidArgumentException('non-nullable partialFurlough cannot be null'); + if (is_null($furloughStart)) { + array_push($this->openAPINullablesSetToNull, 'furloughStart'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('furloughStart', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['partialFurlough'] = $partialFurlough; + $this->container['furloughStart'] = $furloughStart; return $this; } /** - * Gets furloughHoursNormallyWorked + * Gets includeSecondedInfoOnStarter * - * @return float|null + * @return bool|null */ - public function getFurloughHoursNormallyWorked(): ?float + public function getIncludeSecondedInfoOnStarter(): ?bool { - return $this->container['furloughHoursNormallyWorked']; + return $this->container['includeSecondedInfoOnStarter']; } /** - * Sets furloughHoursNormallyWorked + * Sets includeSecondedInfoOnStarter * - * @param float|null $furloughHoursNormallyWorked furloughHoursNormallyWorked + * @param bool|null $includeSecondedInfoOnStarter includeSecondedInfoOnStarter * * @return $this */ - public function setFurloughHoursNormallyWorked(?float $furloughHoursNormallyWorked): static + public function setIncludeSecondedInfoOnStarter(?bool $includeSecondedInfoOnStarter): static { - if (is_null($furloughHoursNormallyWorked)) { - throw new InvalidArgumentException('non-nullable furloughHoursNormallyWorked cannot be null'); + if (is_null($includeSecondedInfoOnStarter)) { + throw new InvalidArgumentException('non-nullable includeSecondedInfoOnStarter cannot be null'); } - $this->container['furloughHoursNormallyWorked'] = $furloughHoursNormallyWorked; + $this->container['includeSecondedInfoOnStarter'] = $includeSecondedInfoOnStarter; return $this; } /** - * Gets furloughHoursOnFurlough + * Gets isApprentice * - * @return float|null + * @return bool|null */ - public function getFurloughHoursOnFurlough(): ?float + public function getIsApprentice(): ?bool { - return $this->container['furloughHoursOnFurlough']; + return $this->container['isApprentice']; } /** - * Sets furloughHoursOnFurlough + * Sets isApprentice * - * @param float|null $furloughHoursOnFurlough furloughHoursOnFurlough + * @param bool|null $isApprentice Set to True if this Employee is an apprentice. This affects the calculations for National Minimum Wage * * @return $this */ - public function setFurloughHoursOnFurlough(?float $furloughHoursOnFurlough): static + public function setIsApprentice(?bool $isApprentice): static { - if (is_null($furloughHoursOnFurlough)) { - throw new InvalidArgumentException('non-nullable furloughHoursOnFurlough cannot be null'); + if (is_null($isApprentice)) { + throw new InvalidArgumentException('non-nullable isApprentice cannot be null'); } - $this->container['furloughHoursOnFurlough'] = $furloughHoursOnFurlough; + $this->container['isApprentice'] = $isApprentice; return $this; } /** - * Gets isApprentice + * Gets isWorkingInFreePort * * @return bool|null */ - public function getIsApprentice(): ?bool + public function getIsWorkingInFreePort(): ?bool { - return $this->container['isApprentice']; + return $this->container['isWorkingInFreePort']; } /** - * Sets isApprentice + * Sets isWorkingInFreePort * - * @param bool|null $isApprentice Set to True if this Employee is an apprentice. This affects the calculations for National Minimum Wage + * @param bool|null $isWorkingInFreePort Flag indicating the employee is employed in a Freeport * * @return $this */ - public function setIsApprentice(?bool $isApprentice): static + public function setIsWorkingInFreePort(?bool $isWorkingInFreePort): static { - if (is_null($isApprentice)) { - throw new InvalidArgumentException('non-nullable isApprentice cannot be null'); + if (is_null($isWorkingInFreePort)) { + throw new InvalidArgumentException('non-nullable isWorkingInFreePort cannot be null'); } - $this->container['isApprentice'] = $isApprentice; + $this->container['isWorkingInFreePort'] = $isWorkingInFreePort; return $this; } /** - * Gets apprenticeshipStartDate + * Gets isWorkingInInvestmentZone * - * @return \DateTime|null + * @return bool|null */ - public function getApprenticeshipStartDate(): ?\DateTime + public function getIsWorkingInInvestmentZone(): ?bool { - return $this->container['apprenticeshipStartDate']; + return $this->container['isWorkingInInvestmentZone']; } /** - * Sets apprenticeshipStartDate + * Sets isWorkingInInvestmentZone * - * @param \DateTime|null $apprenticeshipStartDate apprenticeshipStartDate + * @param bool|null $isWorkingInInvestmentZone Flag indicating the employee is employed in an Investment Zone * * @return $this */ - public function setApprenticeshipStartDate(?\DateTime $apprenticeshipStartDate): static + public function setIsWorkingInInvestmentZone(?bool $isWorkingInInvestmentZone): static { - if (is_null($apprenticeshipStartDate)) { - array_push($this->openAPINullablesSetToNull, 'apprenticeshipStartDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('apprenticeshipStartDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isWorkingInInvestmentZone)) { + throw new InvalidArgumentException('non-nullable isWorkingInInvestmentZone cannot be null'); } - $this->container['apprenticeshipStartDate'] = $apprenticeshipStartDate; + $this->container['isWorkingInInvestmentZone'] = $isWorkingInInvestmentZone; return $this; } /** - * Gets apprenticeshipEndDate + * Gets jobTitle * - * @return \DateTime|null + * @return string|null */ - public function getApprenticeshipEndDate(): ?\DateTime + public function getJobTitle(): ?string { - return $this->container['apprenticeshipEndDate']; + return $this->container['jobTitle']; } /** - * Sets apprenticeshipEndDate + * Sets jobTitle * - * @param \DateTime|null $apprenticeshipEndDate apprenticeshipEndDate + * @param string|null $jobTitle Job Title of Primary role of the Employee * * @return $this */ - public function setApprenticeshipEndDate(?\DateTime $apprenticeshipEndDate): static + public function setJobTitle(?string $jobTitle): static { - if (is_null($apprenticeshipEndDate)) { - array_push($this->openAPINullablesSetToNull, 'apprenticeshipEndDate'); + if (is_null($jobTitle)) { + array_push($this->openAPINullablesSetToNull, 'jobTitle'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('apprenticeshipEndDate', $nullablesSetToNull); + $index = array_search('jobTitle', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['apprenticeshipEndDate'] = $apprenticeshipEndDate; + if (!is_null($jobTitle) && (mb_strlen($jobTitle) > 120)) { + throw new InvalidArgumentException('invalid length for $jobTitle when calling ContractEmploymentDetailsResponse., must be smaller than or equal to 120.'); + } + + $this->container['jobTitle'] = $jobTitle; return $this; } /** - * Gets workingPattern + * Gets leaverDetails * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractLeaverDetails|null */ - public function getWorkingPattern(): ?string + public function getLeaverDetails(): ?\SynergiTech\Staffology\Model\ContractLeaverDetails { - return $this->container['workingPattern']; + return $this->container['leaverDetails']; } /** - * Sets workingPattern + * Sets leaverDetails * - * @param string|null $workingPattern Used when calculating payments for Leave. If null then the default Working Pattern is used + * @param \SynergiTech\Staffology\Model\ContractLeaverDetails|null $leaverDetails leaverDetails * * @return $this */ - public function setWorkingPattern(?string $workingPattern): static + public function setLeaverDetails(?\SynergiTech\Staffology\Model\ContractLeaverDetails $leaverDetails): static { - if (is_null($workingPattern)) { - array_push($this->openAPINullablesSetToNull, 'workingPattern'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('workingPattern', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($leaverDetails)) { + throw new InvalidArgumentException('non-nullable leaverDetails cannot be null'); } - $this->container['workingPattern'] = $workingPattern; + $this->container['leaverDetails'] = $leaverDetails; return $this; } /** - * Gets forcePreviousPayrollCode + * Gets onFurlough * - * @return string|null + * @return bool|null */ - public function getForcePreviousPayrollCode(): ?string + public function getOnFurlough(): ?bool { - return $this->container['forcePreviousPayrollCode']; + return $this->container['onFurlough']; } /** - * Sets forcePreviousPayrollCode + * Sets onFurlough * - * @param string|null $forcePreviousPayrollCode If this property has a non-empty value then a change of Payroll code will be declared on the next FPS. + * @param bool|null $onFurlough Set to true if the employee is on furlough. * * @return $this */ - public function setForcePreviousPayrollCode(?string $forcePreviousPayrollCode): static + public function setOnFurlough(?bool $onFurlough): static { - if (is_null($forcePreviousPayrollCode)) { - array_push($this->openAPINullablesSetToNull, 'forcePreviousPayrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('forcePreviousPayrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($forcePreviousPayrollCode) && (mb_strlen($forcePreviousPayrollCode) > 35)) { - throw new InvalidArgumentException('invalid length for $forcePreviousPayrollCode when calling ContractEmploymentDetailsResponse., must be smaller than or equal to 35.'); + if (is_null($onFurlough)) { + throw new InvalidArgumentException('non-nullable onFurlough cannot be null'); } - - $this->container['forcePreviousPayrollCode'] = $forcePreviousPayrollCode; + $this->container['onFurlough'] = $onFurlough; return $this; } /** - * Gets starterDetails + * Gets onHold * - * @return \SynergiTech\Staffology\Model\ContractStarterDetails|null + * @return bool|null */ - public function getStarterDetails(): ?\SynergiTech\Staffology\Model\ContractStarterDetails + public function getOnHold(): ?bool { - return $this->container['starterDetails']; + return $this->container['onHold']; } /** - * Sets starterDetails + * Sets onHold * - * @param \SynergiTech\Staffology\Model\ContractStarterDetails|null $starterDetails starterDetails + * @param bool|null $onHold Set to true to temporarily exclude the employee from payruns * * @return $this */ - public function setStarterDetails(?\SynergiTech\Staffology\Model\ContractStarterDetails $starterDetails): static + public function setOnHold(?bool $onHold): static { - if (is_null($starterDetails)) { - throw new InvalidArgumentException('non-nullable starterDetails cannot be null'); + if (is_null($onHold)) { + throw new InvalidArgumentException('non-nullable onHold cannot be null'); } - $this->container['starterDetails'] = $starterDetails; + $this->container['onHold'] = $onHold; return $this; } /** - * Gets directorshipDetails + * Gets partialFurlough * - * @return \SynergiTech\Staffology\Model\ContractDirectorshipDetails|null + * @return bool|null */ - public function getDirectorshipDetails(): ?\SynergiTech\Staffology\Model\ContractDirectorshipDetails + public function getPartialFurlough(): ?bool { - return $this->container['directorshipDetails']; + return $this->container['partialFurlough']; } /** - * Sets directorshipDetails + * Sets partialFurlough * - * @param \SynergiTech\Staffology\Model\ContractDirectorshipDetails|null $directorshipDetails directorshipDetails + * @param bool|null $partialFurlough Set to true if the employee is partially furloughed. * * @return $this */ - public function setDirectorshipDetails(?\SynergiTech\Staffology\Model\ContractDirectorshipDetails $directorshipDetails): static + public function setPartialFurlough(?bool $partialFurlough): static { - if (is_null($directorshipDetails)) { - throw new InvalidArgumentException('non-nullable directorshipDetails cannot be null'); + if (is_null($partialFurlough)) { + throw new InvalidArgumentException('non-nullable partialFurlough cannot be null'); } - $this->container['directorshipDetails'] = $directorshipDetails; + $this->container['partialFurlough'] = $partialFurlough; return $this; } /** - * Gets leaverDetails + * Gets payrollCode * - * @return \SynergiTech\Staffology\Model\ContractLeaverDetails|null + * @return string */ - public function getLeaverDetails(): ?\SynergiTech\Staffology\Model\ContractLeaverDetails + public function getPayrollCode(): string { - return $this->container['leaverDetails']; + return $this->container['payrollCode']; } /** - * Sets leaverDetails + * Sets payrollCode * - * @param \SynergiTech\Staffology\Model\ContractLeaverDetails|null $leaverDetails leaverDetails + * @param string $payrollCode The Employees Payroll Code. Must be unique within the Employer. * * @return $this */ - public function setLeaverDetails(?\SynergiTech\Staffology\Model\ContractLeaverDetails $leaverDetails): static + public function setPayrollCode(string $payrollCode): static { - if (is_null($leaverDetails)) { - throw new InvalidArgumentException('non-nullable leaverDetails cannot be null'); + if (is_null($payrollCode)) { + throw new InvalidArgumentException('non-nullable payrollCode cannot be null'); } - $this->container['leaverDetails'] = $leaverDetails; + if ((mb_strlen($payrollCode) > 35)) { + throw new InvalidArgumentException('invalid length for $payrollCode when calling ContractEmploymentDetailsResponse., must be smaller than or equal to 35.'); + } + if ((mb_strlen($payrollCode) < 1)) { + throw new InvalidArgumentException('invalid length for $payrollCode when calling ContractEmploymentDetailsResponse., must be bigger than or equal to 1.'); + } + + $this->container['payrollCode'] = $payrollCode; return $this; } @@ -1265,116 +1254,127 @@ public function setRoles(?array $roles): static } /** - * Gets isWorkingInFreePort + * Gets starterDetails * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractStarterDetails|null */ - public function getIsWorkingInFreePort(): ?bool + public function getStarterDetails(): ?\SynergiTech\Staffology\Model\ContractStarterDetails { - return $this->container['isWorkingInFreePort']; + return $this->container['starterDetails']; } /** - * Sets isWorkingInFreePort + * Sets starterDetails * - * @param bool|null $isWorkingInFreePort Flag indicating the employee is employed in a Freeport + * @param \SynergiTech\Staffology\Model\ContractStarterDetails|null $starterDetails starterDetails * * @return $this */ - public function setIsWorkingInFreePort(?bool $isWorkingInFreePort): static + public function setStarterDetails(?\SynergiTech\Staffology\Model\ContractStarterDetails $starterDetails): static { - if (is_null($isWorkingInFreePort)) { - throw new InvalidArgumentException('non-nullable isWorkingInFreePort cannot be null'); + if (is_null($starterDetails)) { + throw new InvalidArgumentException('non-nullable starterDetails cannot be null'); } - $this->container['isWorkingInFreePort'] = $isWorkingInFreePort; + $this->container['starterDetails'] = $starterDetails; return $this; } /** - * Gets isWorkingInInvestmentZone + * Gets veteranDetails * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractVeteranDetails|null */ - public function getIsWorkingInInvestmentZone(): ?bool + public function getVeteranDetails(): ?\SynergiTech\Staffology\Model\ContractVeteranDetails { - return $this->container['isWorkingInInvestmentZone']; + return $this->container['veteranDetails']; } /** - * Sets isWorkingInInvestmentZone + * Sets veteranDetails * - * @param bool|null $isWorkingInInvestmentZone Flag indicating the employee is employed in an Investment Zone + * @param \SynergiTech\Staffology\Model\ContractVeteranDetails|null $veteranDetails veteranDetails * * @return $this */ - public function setIsWorkingInInvestmentZone(?bool $isWorkingInInvestmentZone): static + public function setVeteranDetails(?\SynergiTech\Staffology\Model\ContractVeteranDetails $veteranDetails): static { - if (is_null($isWorkingInInvestmentZone)) { - throw new InvalidArgumentException('non-nullable isWorkingInInvestmentZone cannot be null'); + if (is_null($veteranDetails)) { + throw new InvalidArgumentException('non-nullable veteranDetails cannot be null'); } - $this->container['isWorkingInInvestmentZone'] = $isWorkingInInvestmentZone; + $this->container['veteranDetails'] = $veteranDetails; return $this; } /** - * Gets veteranDetails + * Gets workingPattern * - * @return \SynergiTech\Staffology\Model\ContractVeteranDetails|null + * @return string|null */ - public function getVeteranDetails(): ?\SynergiTech\Staffology\Model\ContractVeteranDetails + public function getWorkingPattern(): ?string { - return $this->container['veteranDetails']; + return $this->container['workingPattern']; } /** - * Sets veteranDetails + * Sets workingPattern * - * @param \SynergiTech\Staffology\Model\ContractVeteranDetails|null $veteranDetails veteranDetails + * @param string|null $workingPattern Used when calculating payments for Leave. If null then the default Working Pattern is used * * @return $this */ - public function setVeteranDetails(?\SynergiTech\Staffology\Model\ContractVeteranDetails $veteranDetails): static + public function setWorkingPattern(?string $workingPattern): static { - if (is_null($veteranDetails)) { - throw new InvalidArgumentException('non-nullable veteranDetails cannot be null'); + if (is_null($workingPattern)) { + array_push($this->openAPINullablesSetToNull, 'workingPattern'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('workingPattern', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['veteranDetails'] = $veteranDetails; + $this->container['workingPattern'] = $workingPattern; return $this; } /** - * Gets continuousEmploymentDate + * Gets workplacePostcode * - * @return \DateTime|null + * @return string|null */ - public function getContinuousEmploymentDate(): ?\DateTime + public function getWorkplacePostcode(): ?string { - return $this->container['continuousEmploymentDate']; + return $this->container['workplacePostcode']; } /** - * Sets continuousEmploymentDate + * Sets workplacePostcode * - * @param \DateTime|null $continuousEmploymentDate Date of continuous employment + * @param string|null $workplacePostcode Set the workplace postcode, ensuring it is no longer than 10 characters. * * @return $this */ - public function setContinuousEmploymentDate(?\DateTime $continuousEmploymentDate): static + public function setWorkplacePostcode(?string $workplacePostcode): static { - if (is_null($continuousEmploymentDate)) { - array_push($this->openAPINullablesSetToNull, 'continuousEmploymentDate'); + if (is_null($workplacePostcode)) { + array_push($this->openAPINullablesSetToNull, 'workplacePostcode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('continuousEmploymentDate', $nullablesSetToNull); + $index = array_search('workplacePostcode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['continuousEmploymentDate'] = $continuousEmploymentDate; + if (!is_null($workplacePostcode) && (mb_strlen($workplacePostcode) > 10)) { + throw new InvalidArgumentException('invalid length for $workplacePostcode when calling ContractEmploymentDetailsResponse., must be smaller than or equal to 10.'); + } + + $this->container['workplacePostcode'] = $workplacePostcode; return $this; } diff --git a/src/Model/ContractExternalDataCompanyRequest.php b/src/Model/ContractExternalDataCompanyRequest.php index 4e03d67..700fff0 100644 --- a/src/Model/ContractExternalDataCompanyRequest.php +++ b/src/Model/ContractExternalDataCompanyRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractExternalDataCompanyResponse.php b/src/Model/ContractExternalDataCompanyResponse.php index 5ba9aed..2984fda 100644 --- a/src/Model/ContractExternalDataCompanyResponse.php +++ b/src/Model/ContractExternalDataCompanyResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractFpsFields.php b/src/Model/ContractFpsFields.php index 8584d3f..87b237c 100644 --- a/src/Model/ContractFpsFields.php +++ b/src/Model/ContractFpsFields.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class ContractFpsFields implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'offPayrollWorker' => 'bool', + 'excludeFromRtiSubmissions' => 'bool', + 'hoursNormallyWorked' => '\SynergiTech\Staffology\Model\HoursNormallyWorked', 'irregularPaymentPattern' => 'bool', 'nonIndividual' => 'bool', - 'excludeFromRtiSubmissions' => 'bool', - 'hoursNormallyWorked' => '\SynergiTech\Staffology\Model\HoursNormallyWorked' + 'offPayrollWorker' => 'bool' ]; /** @@ -72,11 +72,11 @@ class ContractFpsFields implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'offPayrollWorker' => null, + 'excludeFromRtiSubmissions' => null, + 'hoursNormallyWorked' => null, 'irregularPaymentPattern' => null, 'nonIndividual' => null, - 'excludeFromRtiSubmissions' => null, - 'hoursNormallyWorked' => null + 'offPayrollWorker' => null ]; /** @@ -85,11 +85,11 @@ class ContractFpsFields implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'offPayrollWorker' => false, + 'excludeFromRtiSubmissions' => false, + 'hoursNormallyWorked' => false, 'irregularPaymentPattern' => false, 'nonIndividual' => false, - 'excludeFromRtiSubmissions' => false, - 'hoursNormallyWorked' => false + 'offPayrollWorker' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'offPayrollWorker' => 'offPayrollWorker', + 'excludeFromRtiSubmissions' => 'excludeFromRtiSubmissions', + 'hoursNormallyWorked' => 'hoursNormallyWorked', 'irregularPaymentPattern' => 'irregularPaymentPattern', 'nonIndividual' => 'nonIndividual', - 'excludeFromRtiSubmissions' => 'excludeFromRtiSubmissions', - 'hoursNormallyWorked' => 'hoursNormallyWorked' + 'offPayrollWorker' => 'offPayrollWorker' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'offPayrollWorker' => 'setOffPayrollWorker', + 'excludeFromRtiSubmissions' => 'setExcludeFromRtiSubmissions', + 'hoursNormallyWorked' => 'setHoursNormallyWorked', 'irregularPaymentPattern' => 'setIrregularPaymentPattern', 'nonIndividual' => 'setNonIndividual', - 'excludeFromRtiSubmissions' => 'setExcludeFromRtiSubmissions', - 'hoursNormallyWorked' => 'setHoursNormallyWorked' + 'offPayrollWorker' => 'setOffPayrollWorker' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'offPayrollWorker' => 'getOffPayrollWorker', + 'excludeFromRtiSubmissions' => 'getExcludeFromRtiSubmissions', + 'hoursNormallyWorked' => 'getHoursNormallyWorked', 'irregularPaymentPattern' => 'getIrregularPaymentPattern', 'nonIndividual' => 'getNonIndividual', - 'excludeFromRtiSubmissions' => 'getExcludeFromRtiSubmissions', - 'hoursNormallyWorked' => 'getHoursNormallyWorked' + 'offPayrollWorker' => 'getOffPayrollWorker' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('offPayrollWorker', $data ?? [], null); - $this->setIfExists('irregularPaymentPattern', $data ?? [], null); - $this->setIfExists('nonIndividual', $data ?? [], null); $this->setIfExists('excludeFromRtiSubmissions', $data ?? [], null); $this->setIfExists('hoursNormallyWorked', $data ?? [], null); + $this->setIfExists('irregularPaymentPattern', $data ?? [], null); + $this->setIfExists('nonIndividual', $data ?? [], null); + $this->setIfExists('offPayrollWorker', $data ?? [], null); } /** @@ -317,28 +317,55 @@ public function valid(): bool /** - * Gets offPayrollWorker + * Gets excludeFromRtiSubmissions * * @return bool|null */ - public function getOffPayrollWorker(): ?bool + public function getExcludeFromRtiSubmissions(): ?bool { - return $this->container['offPayrollWorker']; + return $this->container['excludeFromRtiSubmissions']; } /** - * Sets offPayrollWorker + * Sets excludeFromRtiSubmissions * - * @param bool|null $offPayrollWorker offPayrollWorker + * @param bool|null $excludeFromRtiSubmissions True if Employee is excluded from RTI submissions * * @return $this */ - public function setOffPayrollWorker(?bool $offPayrollWorker): static + public function setExcludeFromRtiSubmissions(?bool $excludeFromRtiSubmissions): static { - if (is_null($offPayrollWorker)) { - throw new InvalidArgumentException('non-nullable offPayrollWorker cannot be null'); + if (is_null($excludeFromRtiSubmissions)) { + throw new InvalidArgumentException('non-nullable excludeFromRtiSubmissions cannot be null'); } - $this->container['offPayrollWorker'] = $offPayrollWorker; + $this->container['excludeFromRtiSubmissions'] = $excludeFromRtiSubmissions; + + return $this; + } + + /** + * Gets hoursNormallyWorked + * + * @return \SynergiTech\Staffology\Model\HoursNormallyWorked|null + */ + public function getHoursNormallyWorked(): ?\SynergiTech\Staffology\Model\HoursNormallyWorked + { + return $this->container['hoursNormallyWorked']; + } + + /** + * Sets hoursNormallyWorked + * + * @param \SynergiTech\Staffology\Model\HoursNormallyWorked|null $hoursNormallyWorked hoursNormallyWorked + * + * @return $this + */ + public function setHoursNormallyWorked(?\SynergiTech\Staffology\Model\HoursNormallyWorked $hoursNormallyWorked): static + { + if (is_null($hoursNormallyWorked)) { + throw new InvalidArgumentException('non-nullable hoursNormallyWorked cannot be null'); + } + $this->container['hoursNormallyWorked'] = $hoursNormallyWorked; return $this; } @@ -398,55 +425,28 @@ public function setNonIndividual(?bool $nonIndividual): static } /** - * Gets excludeFromRtiSubmissions + * Gets offPayrollWorker * * @return bool|null */ - public function getExcludeFromRtiSubmissions(): ?bool - { - return $this->container['excludeFromRtiSubmissions']; - } - - /** - * Sets excludeFromRtiSubmissions - * - * @param bool|null $excludeFromRtiSubmissions True if Employee is excluded from RTI submissions - * - * @return $this - */ - public function setExcludeFromRtiSubmissions(?bool $excludeFromRtiSubmissions): static - { - if (is_null($excludeFromRtiSubmissions)) { - throw new InvalidArgumentException('non-nullable excludeFromRtiSubmissions cannot be null'); - } - $this->container['excludeFromRtiSubmissions'] = $excludeFromRtiSubmissions; - - return $this; - } - - /** - * Gets hoursNormallyWorked - * - * @return \SynergiTech\Staffology\Model\HoursNormallyWorked|null - */ - public function getHoursNormallyWorked(): ?\SynergiTech\Staffology\Model\HoursNormallyWorked + public function getOffPayrollWorker(): ?bool { - return $this->container['hoursNormallyWorked']; + return $this->container['offPayrollWorker']; } /** - * Sets hoursNormallyWorked + * Sets offPayrollWorker * - * @param \SynergiTech\Staffology\Model\HoursNormallyWorked|null $hoursNormallyWorked hoursNormallyWorked + * @param bool|null $offPayrollWorker offPayrollWorker * * @return $this */ - public function setHoursNormallyWorked(?\SynergiTech\Staffology\Model\HoursNormallyWorked $hoursNormallyWorked): static + public function setOffPayrollWorker(?bool $offPayrollWorker): static { - if (is_null($hoursNormallyWorked)) { - throw new InvalidArgumentException('non-nullable hoursNormallyWorked cannot be null'); + if (is_null($offPayrollWorker)) { + throw new InvalidArgumentException('non-nullable offPayrollWorker cannot be null'); } - $this->container['hoursNormallyWorked'] = $hoursNormallyWorked; + $this->container['offPayrollWorker'] = $offPayrollWorker; return $this; } diff --git a/src/Model/ContractHmrcDetailsRequest.php b/src/Model/ContractHmrcDetailsRequest.php index 745e509..3dc553a 100644 --- a/src/Model/ContractHmrcDetailsRequest.php +++ b/src/Model/ContractHmrcDetailsRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,23 +59,23 @@ class ContractHmrcDetailsRequest implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'officeNumber' => 'string', - 'payeReference' => 'string', 'accountsOfficeReference' => 'string', - 'econ' => 'string', - 'utr' => 'string', + 'apprenticeshipLevy' => 'bool', + 'apprenticeshipLevyAllowance' => 'float', + 'carryForwardUnpaidLiabilities' => 'bool', 'coTax' => 'string', + 'econ' => 'string', 'employmentAllowance' => 'bool', 'employmentAllowanceMaxClaim' => 'float', - 'smallEmployersRelief' => 'bool', - 'apprenticeshipLevy' => 'bool', - 'apprenticeshipLevyAllowance' => 'float', - 'quarterlyPaymentSchedule' => 'bool', + 'id' => 'string', 'includeEmploymentAllowanceOnMonthlyJournal' => 'bool', - 'carryForwardUnpaidLiabilities' => 'bool', + 'officeNumber' => 'string', + 'payeReference' => 'string', + 'paymentDateDayOfMonth' => 'int', 'paymentDateRule' => '\SynergiTech\Staffology\Model\PaymentDateRule', - 'paymentDateDayOfMonth' => 'int' + 'quarterlyPaymentSchedule' => 'bool', + 'smallEmployersRelief' => 'bool', + 'utr' => 'string' ]; /** @@ -84,23 +84,23 @@ class ContractHmrcDetailsRequest implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'officeNumber' => null, - 'payeReference' => null, 'accountsOfficeReference' => null, - 'econ' => null, - 'utr' => null, + 'apprenticeshipLevy' => null, + 'apprenticeshipLevyAllowance' => 'double', + 'carryForwardUnpaidLiabilities' => null, 'coTax' => null, + 'econ' => null, 'employmentAllowance' => null, 'employmentAllowanceMaxClaim' => 'double', - 'smallEmployersRelief' => null, - 'apprenticeshipLevy' => null, - 'apprenticeshipLevyAllowance' => 'double', - 'quarterlyPaymentSchedule' => null, + 'id' => 'uuid', 'includeEmploymentAllowanceOnMonthlyJournal' => null, - 'carryForwardUnpaidLiabilities' => null, + 'officeNumber' => null, + 'payeReference' => null, + 'paymentDateDayOfMonth' => 'int32', 'paymentDateRule' => null, - 'paymentDateDayOfMonth' => 'int32' + 'quarterlyPaymentSchedule' => null, + 'smallEmployersRelief' => null, + 'utr' => null ]; /** @@ -109,23 +109,23 @@ class ContractHmrcDetailsRequest implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'officeNumber' => true, - 'payeReference' => true, 'accountsOfficeReference' => true, - 'econ' => true, - 'utr' => true, + 'apprenticeshipLevy' => false, + 'apprenticeshipLevyAllowance' => false, + 'carryForwardUnpaidLiabilities' => false, 'coTax' => true, + 'econ' => true, 'employmentAllowance' => false, 'employmentAllowanceMaxClaim' => false, - 'smallEmployersRelief' => false, - 'apprenticeshipLevy' => false, - 'apprenticeshipLevyAllowance' => false, - 'quarterlyPaymentSchedule' => false, + 'id' => false, 'includeEmploymentAllowanceOnMonthlyJournal' => false, - 'carryForwardUnpaidLiabilities' => false, + 'officeNumber' => true, + 'payeReference' => true, + 'paymentDateDayOfMonth' => true, 'paymentDateRule' => false, - 'paymentDateDayOfMonth' => true + 'quarterlyPaymentSchedule' => false, + 'smallEmployersRelief' => false, + 'utr' => true ]; /** @@ -214,23 +214,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'officeNumber' => 'officeNumber', - 'payeReference' => 'payeReference', 'accountsOfficeReference' => 'accountsOfficeReference', - 'econ' => 'econ', - 'utr' => 'utr', + 'apprenticeshipLevy' => 'apprenticeshipLevy', + 'apprenticeshipLevyAllowance' => 'apprenticeshipLevyAllowance', + 'carryForwardUnpaidLiabilities' => 'carryForwardUnpaidLiabilities', 'coTax' => 'coTax', + 'econ' => 'econ', 'employmentAllowance' => 'employmentAllowance', 'employmentAllowanceMaxClaim' => 'employmentAllowanceMaxClaim', - 'smallEmployersRelief' => 'smallEmployersRelief', - 'apprenticeshipLevy' => 'apprenticeshipLevy', - 'apprenticeshipLevyAllowance' => 'apprenticeshipLevyAllowance', - 'quarterlyPaymentSchedule' => 'quarterlyPaymentSchedule', + 'id' => 'id', 'includeEmploymentAllowanceOnMonthlyJournal' => 'includeEmploymentAllowanceOnMonthlyJournal', - 'carryForwardUnpaidLiabilities' => 'carryForwardUnpaidLiabilities', + 'officeNumber' => 'officeNumber', + 'payeReference' => 'payeReference', + 'paymentDateDayOfMonth' => 'paymentDateDayOfMonth', 'paymentDateRule' => 'paymentDateRule', - 'paymentDateDayOfMonth' => 'paymentDateDayOfMonth' + 'quarterlyPaymentSchedule' => 'quarterlyPaymentSchedule', + 'smallEmployersRelief' => 'smallEmployersRelief', + 'utr' => 'utr' ]; /** @@ -239,23 +239,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'officeNumber' => 'setOfficeNumber', - 'payeReference' => 'setPayeReference', 'accountsOfficeReference' => 'setAccountsOfficeReference', - 'econ' => 'setEcon', - 'utr' => 'setUtr', + 'apprenticeshipLevy' => 'setApprenticeshipLevy', + 'apprenticeshipLevyAllowance' => 'setApprenticeshipLevyAllowance', + 'carryForwardUnpaidLiabilities' => 'setCarryForwardUnpaidLiabilities', 'coTax' => 'setCoTax', + 'econ' => 'setEcon', 'employmentAllowance' => 'setEmploymentAllowance', 'employmentAllowanceMaxClaim' => 'setEmploymentAllowanceMaxClaim', - 'smallEmployersRelief' => 'setSmallEmployersRelief', - 'apprenticeshipLevy' => 'setApprenticeshipLevy', - 'apprenticeshipLevyAllowance' => 'setApprenticeshipLevyAllowance', - 'quarterlyPaymentSchedule' => 'setQuarterlyPaymentSchedule', + 'id' => 'setId', 'includeEmploymentAllowanceOnMonthlyJournal' => 'setIncludeEmploymentAllowanceOnMonthlyJournal', - 'carryForwardUnpaidLiabilities' => 'setCarryForwardUnpaidLiabilities', + 'officeNumber' => 'setOfficeNumber', + 'payeReference' => 'setPayeReference', + 'paymentDateDayOfMonth' => 'setPaymentDateDayOfMonth', 'paymentDateRule' => 'setPaymentDateRule', - 'paymentDateDayOfMonth' => 'setPaymentDateDayOfMonth' + 'quarterlyPaymentSchedule' => 'setQuarterlyPaymentSchedule', + 'smallEmployersRelief' => 'setSmallEmployersRelief', + 'utr' => 'setUtr' ]; /** @@ -264,23 +264,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'officeNumber' => 'getOfficeNumber', - 'payeReference' => 'getPayeReference', 'accountsOfficeReference' => 'getAccountsOfficeReference', - 'econ' => 'getEcon', - 'utr' => 'getUtr', + 'apprenticeshipLevy' => 'getApprenticeshipLevy', + 'apprenticeshipLevyAllowance' => 'getApprenticeshipLevyAllowance', + 'carryForwardUnpaidLiabilities' => 'getCarryForwardUnpaidLiabilities', 'coTax' => 'getCoTax', + 'econ' => 'getEcon', 'employmentAllowance' => 'getEmploymentAllowance', 'employmentAllowanceMaxClaim' => 'getEmploymentAllowanceMaxClaim', - 'smallEmployersRelief' => 'getSmallEmployersRelief', - 'apprenticeshipLevy' => 'getApprenticeshipLevy', - 'apprenticeshipLevyAllowance' => 'getApprenticeshipLevyAllowance', - 'quarterlyPaymentSchedule' => 'getQuarterlyPaymentSchedule', + 'id' => 'getId', 'includeEmploymentAllowanceOnMonthlyJournal' => 'getIncludeEmploymentAllowanceOnMonthlyJournal', - 'carryForwardUnpaidLiabilities' => 'getCarryForwardUnpaidLiabilities', + 'officeNumber' => 'getOfficeNumber', + 'payeReference' => 'getPayeReference', + 'paymentDateDayOfMonth' => 'getPaymentDateDayOfMonth', 'paymentDateRule' => 'getPaymentDateRule', - 'paymentDateDayOfMonth' => 'getPaymentDateDayOfMonth' + 'quarterlyPaymentSchedule' => 'getQuarterlyPaymentSchedule', + 'smallEmployersRelief' => 'getSmallEmployersRelief', + 'utr' => 'getUtr' ]; /** @@ -339,23 +339,23 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('officeNumber', $data ?? [], null); - $this->setIfExists('payeReference', $data ?? [], null); $this->setIfExists('accountsOfficeReference', $data ?? [], null); - $this->setIfExists('econ', $data ?? [], null); - $this->setIfExists('utr', $data ?? [], null); + $this->setIfExists('apprenticeshipLevy', $data ?? [], null); + $this->setIfExists('apprenticeshipLevyAllowance', $data ?? [], null); + $this->setIfExists('carryForwardUnpaidLiabilities', $data ?? [], null); $this->setIfExists('coTax', $data ?? [], null); + $this->setIfExists('econ', $data ?? [], null); $this->setIfExists('employmentAllowance', $data ?? [], null); $this->setIfExists('employmentAllowanceMaxClaim', $data ?? [], null); - $this->setIfExists('smallEmployersRelief', $data ?? [], null); - $this->setIfExists('apprenticeshipLevy', $data ?? [], null); - $this->setIfExists('apprenticeshipLevyAllowance', $data ?? [], null); - $this->setIfExists('quarterlyPaymentSchedule', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('includeEmploymentAllowanceOnMonthlyJournal', $data ?? [], null); - $this->setIfExists('carryForwardUnpaidLiabilities', $data ?? [], null); - $this->setIfExists('paymentDateRule', $data ?? [], null); + $this->setIfExists('officeNumber', $data ?? [], null); + $this->setIfExists('payeReference', $data ?? [], null); $this->setIfExists('paymentDateDayOfMonth', $data ?? [], null); + $this->setIfExists('paymentDateRule', $data ?? [], null); + $this->setIfExists('quarterlyPaymentSchedule', $data ?? [], null); + $this->setIfExists('smallEmployersRelief', $data ?? [], null); + $this->setIfExists('utr', $data ?? [], null); } /** @@ -401,232 +401,184 @@ public function valid(): bool /** - * Gets id - * - * @return string|null - */ - public function getId(): ?string - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return $this - */ - public function setId(?string $id): static - { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets officeNumber + * Gets accountsOfficeReference * * @return string|null */ - public function getOfficeNumber(): ?string + public function getAccountsOfficeReference(): ?string { - return $this->container['officeNumber']; + return $this->container['accountsOfficeReference']; } /** - * Sets officeNumber + * Sets accountsOfficeReference * - * @param string|null $officeNumber officeNumber + * @param string|null $accountsOfficeReference accountsOfficeReference * * @return $this */ - public function setOfficeNumber(?string $officeNumber): static + public function setAccountsOfficeReference(?string $accountsOfficeReference): static { - if (is_null($officeNumber)) { - array_push($this->openAPINullablesSetToNull, 'officeNumber'); + if (is_null($accountsOfficeReference)) { + array_push($this->openAPINullablesSetToNull, 'accountsOfficeReference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('officeNumber', $nullablesSetToNull); + $index = array_search('accountsOfficeReference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['officeNumber'] = $officeNumber; + $this->container['accountsOfficeReference'] = $accountsOfficeReference; return $this; } /** - * Gets payeReference + * Gets apprenticeshipLevy * - * @return string|null + * @return bool|null */ - public function getPayeReference(): ?string + public function getApprenticeshipLevy(): ?bool { - return $this->container['payeReference']; + return $this->container['apprenticeshipLevy']; } /** - * Sets payeReference + * Sets apprenticeshipLevy * - * @param string|null $payeReference payeReference + * @param bool|null $apprenticeshipLevy apprenticeshipLevy * * @return $this */ - public function setPayeReference(?string $payeReference): static + public function setApprenticeshipLevy(?bool $apprenticeshipLevy): static { - if (is_null($payeReference)) { - array_push($this->openAPINullablesSetToNull, 'payeReference'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payeReference', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($apprenticeshipLevy)) { + throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); } - $this->container['payeReference'] = $payeReference; + $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; return $this; } /** - * Gets accountsOfficeReference + * Gets apprenticeshipLevyAllowance * - * @return string|null + * @return float|null */ - public function getAccountsOfficeReference(): ?string + public function getApprenticeshipLevyAllowance(): ?float { - return $this->container['accountsOfficeReference']; + return $this->container['apprenticeshipLevyAllowance']; } /** - * Sets accountsOfficeReference + * Sets apprenticeshipLevyAllowance * - * @param string|null $accountsOfficeReference accountsOfficeReference + * @param float|null $apprenticeshipLevyAllowance apprenticeshipLevyAllowance * * @return $this */ - public function setAccountsOfficeReference(?string $accountsOfficeReference): static + public function setApprenticeshipLevyAllowance(?float $apprenticeshipLevyAllowance): static { - if (is_null($accountsOfficeReference)) { - array_push($this->openAPINullablesSetToNull, 'accountsOfficeReference'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountsOfficeReference', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($apprenticeshipLevyAllowance)) { + throw new InvalidArgumentException('non-nullable apprenticeshipLevyAllowance cannot be null'); } - $this->container['accountsOfficeReference'] = $accountsOfficeReference; + $this->container['apprenticeshipLevyAllowance'] = $apprenticeshipLevyAllowance; return $this; } /** - * Gets econ + * Gets carryForwardUnpaidLiabilities * - * @return string|null + * @return bool|null */ - public function getEcon(): ?string + public function getCarryForwardUnpaidLiabilities(): ?bool { - return $this->container['econ']; + return $this->container['carryForwardUnpaidLiabilities']; } /** - * Sets econ + * Sets carryForwardUnpaidLiabilities * - * @param string|null $econ econ + * @param bool|null $carryForwardUnpaidLiabilities If set to true then any unpaid amounts from previous periods will be brought forward to work out the liability for the current period. You'd set this to false if you don't want to track payments. * * @return $this */ - public function setEcon(?string $econ): static + public function setCarryForwardUnpaidLiabilities(?bool $carryForwardUnpaidLiabilities): static { - if (is_null($econ)) { - array_push($this->openAPINullablesSetToNull, 'econ'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('econ', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($carryForwardUnpaidLiabilities)) { + throw new InvalidArgumentException('non-nullable carryForwardUnpaidLiabilities cannot be null'); } - $this->container['econ'] = $econ; + $this->container['carryForwardUnpaidLiabilities'] = $carryForwardUnpaidLiabilities; return $this; } /** - * Gets utr + * Gets coTax * * @return string|null */ - public function getUtr(): ?string + public function getCoTax(): ?string { - return $this->container['utr']; + return $this->container['coTax']; } /** - * Sets utr + * Sets coTax * - * @param string|null $utr utr + * @param string|null $coTax coTax * * @return $this */ - public function setUtr(?string $utr): static + public function setCoTax(?string $coTax): static { - if (is_null($utr)) { - array_push($this->openAPINullablesSetToNull, 'utr'); + if (is_null($coTax)) { + array_push($this->openAPINullablesSetToNull, 'coTax'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('utr', $nullablesSetToNull); + $index = array_search('coTax', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['utr'] = $utr; + $this->container['coTax'] = $coTax; return $this; } /** - * Gets coTax + * Gets econ * * @return string|null */ - public function getCoTax(): ?string + public function getEcon(): ?string { - return $this->container['coTax']; + return $this->container['econ']; } /** - * Sets coTax + * Sets econ * - * @param string|null $coTax coTax + * @param string|null $econ econ * * @return $this */ - public function setCoTax(?string $coTax): static + public function setEcon(?string $econ): static { - if (is_null($coTax)) { - array_push($this->openAPINullablesSetToNull, 'coTax'); + if (is_null($econ)) { + array_push($this->openAPINullablesSetToNull, 'econ'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('coTax', $nullablesSetToNull); + $index = array_search('econ', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['coTax'] = $coTax; + $this->container['econ'] = $econ; return $this; } @@ -686,224 +638,272 @@ public function setEmploymentAllowanceMaxClaim(?float $employmentAllowanceMaxCla } /** - * Gets smallEmployersRelief + * Gets id * - * @return bool|null + * @return string|null */ - public function getSmallEmployersRelief(): ?bool + public function getId(): ?string { - return $this->container['smallEmployersRelief']; + return $this->container['id']; } /** - * Sets smallEmployersRelief + * Sets id * - * @param bool|null $smallEmployersRelief smallEmployersRelief + * @param string|null $id id * * @return $this */ - public function setSmallEmployersRelief(?bool $smallEmployersRelief): static + public function setId(?string $id): static { - if (is_null($smallEmployersRelief)) { - throw new InvalidArgumentException('non-nullable smallEmployersRelief cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['smallEmployersRelief'] = $smallEmployersRelief; + $this->container['id'] = $id; return $this; } /** - * Gets apprenticeshipLevy + * Gets includeEmploymentAllowanceOnMonthlyJournal * * @return bool|null */ - public function getApprenticeshipLevy(): ?bool + public function getIncludeEmploymentAllowanceOnMonthlyJournal(): ?bool { - return $this->container['apprenticeshipLevy']; + return $this->container['includeEmploymentAllowanceOnMonthlyJournal']; } /** - * Sets apprenticeshipLevy + * Sets includeEmploymentAllowanceOnMonthlyJournal * - * @param bool|null $apprenticeshipLevy apprenticeshipLevy + * @param bool|null $includeEmploymentAllowanceOnMonthlyJournal If the employer is not on a QuarterlyPaymentSchedule and is claiming EmploymentAllowance, then set this to true to include a line for Employment Allowance on the journal for the monthly schedule. * * @return $this */ - public function setApprenticeshipLevy(?bool $apprenticeshipLevy): static + public function setIncludeEmploymentAllowanceOnMonthlyJournal(?bool $includeEmploymentAllowanceOnMonthlyJournal): static { - if (is_null($apprenticeshipLevy)) { - throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); + if (is_null($includeEmploymentAllowanceOnMonthlyJournal)) { + throw new InvalidArgumentException('non-nullable includeEmploymentAllowanceOnMonthlyJournal cannot be null'); } - $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; + $this->container['includeEmploymentAllowanceOnMonthlyJournal'] = $includeEmploymentAllowanceOnMonthlyJournal; return $this; } /** - * Gets apprenticeshipLevyAllowance + * Gets officeNumber * - * @return float|null + * @return string|null */ - public function getApprenticeshipLevyAllowance(): ?float + public function getOfficeNumber(): ?string { - return $this->container['apprenticeshipLevyAllowance']; + return $this->container['officeNumber']; } /** - * Sets apprenticeshipLevyAllowance + * Sets officeNumber * - * @param float|null $apprenticeshipLevyAllowance apprenticeshipLevyAllowance + * @param string|null $officeNumber officeNumber * * @return $this */ - public function setApprenticeshipLevyAllowance(?float $apprenticeshipLevyAllowance): static + public function setOfficeNumber(?string $officeNumber): static { - if (is_null($apprenticeshipLevyAllowance)) { - throw new InvalidArgumentException('non-nullable apprenticeshipLevyAllowance cannot be null'); + if (is_null($officeNumber)) { + array_push($this->openAPINullablesSetToNull, 'officeNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('officeNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['apprenticeshipLevyAllowance'] = $apprenticeshipLevyAllowance; + $this->container['officeNumber'] = $officeNumber; return $this; } /** - * Gets quarterlyPaymentSchedule + * Gets payeReference * - * @return bool|null + * @return string|null */ - public function getQuarterlyPaymentSchedule(): ?bool + public function getPayeReference(): ?string { - return $this->container['quarterlyPaymentSchedule']; + return $this->container['payeReference']; } /** - * Sets quarterlyPaymentSchedule + * Sets payeReference * - * @param bool|null $quarterlyPaymentSchedule Set to true if the employer pays HMRC on a quarterly schedule. A value of false implies a monthly schedule. Warning: Changing this value after starting PayRuns will delete any existing payments or adjustments you may have entered. + * @param string|null $payeReference payeReference * * @return $this */ - public function setQuarterlyPaymentSchedule(?bool $quarterlyPaymentSchedule): static + public function setPayeReference(?string $payeReference): static { - if (is_null($quarterlyPaymentSchedule)) { - throw new InvalidArgumentException('non-nullable quarterlyPaymentSchedule cannot be null'); + if (is_null($payeReference)) { + array_push($this->openAPINullablesSetToNull, 'payeReference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payeReference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['quarterlyPaymentSchedule'] = $quarterlyPaymentSchedule; + $this->container['payeReference'] = $payeReference; return $this; } /** - * Gets includeEmploymentAllowanceOnMonthlyJournal + * Gets paymentDateDayOfMonth * - * @return bool|null + * @return int|null */ - public function getIncludeEmploymentAllowanceOnMonthlyJournal(): ?bool + public function getPaymentDateDayOfMonth(): ?int { - return $this->container['includeEmploymentAllowanceOnMonthlyJournal']; + return $this->container['paymentDateDayOfMonth']; } /** - * Sets includeEmploymentAllowanceOnMonthlyJournal + * Sets paymentDateDayOfMonth * - * @param bool|null $includeEmploymentAllowanceOnMonthlyJournal If the employer is not on a QuarterlyPaymentSchedule and is claiming EmploymentAllowance, then set this to true to include a line for Employment Allowance on the journal for the monthly schedule. + * @param int|null $paymentDateDayOfMonth paymentDateDayOfMonth * * @return $this */ - public function setIncludeEmploymentAllowanceOnMonthlyJournal(?bool $includeEmploymentAllowanceOnMonthlyJournal): static + public function setPaymentDateDayOfMonth(?int $paymentDateDayOfMonth): static { - if (is_null($includeEmploymentAllowanceOnMonthlyJournal)) { - throw new InvalidArgumentException('non-nullable includeEmploymentAllowanceOnMonthlyJournal cannot be null'); + if (is_null($paymentDateDayOfMonth)) { + array_push($this->openAPINullablesSetToNull, 'paymentDateDayOfMonth'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('paymentDateDayOfMonth', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['includeEmploymentAllowanceOnMonthlyJournal'] = $includeEmploymentAllowanceOnMonthlyJournal; + $this->container['paymentDateDayOfMonth'] = $paymentDateDayOfMonth; return $this; } /** - * Gets carryForwardUnpaidLiabilities + * Gets paymentDateRule + * + * @return \SynergiTech\Staffology\Model\PaymentDateRule|null + */ + public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule + { + return $this->container['paymentDateRule']; + } + + /** + * Sets paymentDateRule + * + * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule + * + * @return $this + */ + public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static + { + if (is_null($paymentDateRule)) { + throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); + } + $this->container['paymentDateRule'] = $paymentDateRule; + + return $this; + } + + /** + * Gets quarterlyPaymentSchedule * * @return bool|null */ - public function getCarryForwardUnpaidLiabilities(): ?bool + public function getQuarterlyPaymentSchedule(): ?bool { - return $this->container['carryForwardUnpaidLiabilities']; + return $this->container['quarterlyPaymentSchedule']; } /** - * Sets carryForwardUnpaidLiabilities + * Sets quarterlyPaymentSchedule * - * @param bool|null $carryForwardUnpaidLiabilities If set to true then any unpaid amounts from previous periods will be brought forward to work out the liability for the current period. You'd set this to false if you don't want to track payments. + * @param bool|null $quarterlyPaymentSchedule Set to true if the employer pays HMRC on a quarterly schedule. A value of false implies a monthly schedule. Warning: Changing this value after starting PayRuns will delete any existing payments or adjustments you may have entered. * * @return $this */ - public function setCarryForwardUnpaidLiabilities(?bool $carryForwardUnpaidLiabilities): static + public function setQuarterlyPaymentSchedule(?bool $quarterlyPaymentSchedule): static { - if (is_null($carryForwardUnpaidLiabilities)) { - throw new InvalidArgumentException('non-nullable carryForwardUnpaidLiabilities cannot be null'); + if (is_null($quarterlyPaymentSchedule)) { + throw new InvalidArgumentException('non-nullable quarterlyPaymentSchedule cannot be null'); } - $this->container['carryForwardUnpaidLiabilities'] = $carryForwardUnpaidLiabilities; + $this->container['quarterlyPaymentSchedule'] = $quarterlyPaymentSchedule; return $this; } /** - * Gets paymentDateRule + * Gets smallEmployersRelief * - * @return \SynergiTech\Staffology\Model\PaymentDateRule|null + * @return bool|null */ - public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule + public function getSmallEmployersRelief(): ?bool { - return $this->container['paymentDateRule']; + return $this->container['smallEmployersRelief']; } /** - * Sets paymentDateRule + * Sets smallEmployersRelief * - * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule + * @param bool|null $smallEmployersRelief smallEmployersRelief * * @return $this */ - public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static + public function setSmallEmployersRelief(?bool $smallEmployersRelief): static { - if (is_null($paymentDateRule)) { - throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); + if (is_null($smallEmployersRelief)) { + throw new InvalidArgumentException('non-nullable smallEmployersRelief cannot be null'); } - $this->container['paymentDateRule'] = $paymentDateRule; + $this->container['smallEmployersRelief'] = $smallEmployersRelief; return $this; } /** - * Gets paymentDateDayOfMonth + * Gets utr * - * @return int|null + * @return string|null */ - public function getPaymentDateDayOfMonth(): ?int + public function getUtr(): ?string { - return $this->container['paymentDateDayOfMonth']; + return $this->container['utr']; } /** - * Sets paymentDateDayOfMonth + * Sets utr * - * @param int|null $paymentDateDayOfMonth paymentDateDayOfMonth + * @param string|null $utr utr * * @return $this */ - public function setPaymentDateDayOfMonth(?int $paymentDateDayOfMonth): static + public function setUtr(?string $utr): static { - if (is_null($paymentDateDayOfMonth)) { - array_push($this->openAPINullablesSetToNull, 'paymentDateDayOfMonth'); + if (is_null($utr)) { + array_push($this->openAPINullablesSetToNull, 'utr'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paymentDateDayOfMonth', $nullablesSetToNull); + $index = array_search('utr', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['paymentDateDayOfMonth'] = $paymentDateDayOfMonth; + $this->container['utr'] = $utr; return $this; } diff --git a/src/Model/ContractHmrcDetailsResponse.php b/src/Model/ContractHmrcDetailsResponse.php index c23dcba..2d4a2bd 100644 --- a/src/Model/ContractHmrcDetailsResponse.php +++ b/src/Model/ContractHmrcDetailsResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,23 +59,23 @@ class ContractHmrcDetailsResponse implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'officeNumber' => 'string', - 'payeReference' => 'string', 'accountsOfficeReference' => 'string', - 'econ' => 'string', - 'utr' => 'string', + 'apprenticeshipLevy' => 'bool', + 'apprenticeshipLevyAllowance' => 'float', + 'carryForwardUnpaidLiabilities' => 'bool', 'coTax' => 'string', + 'econ' => 'string', 'employmentAllowance' => 'bool', 'employmentAllowanceMaxClaim' => 'float', - 'smallEmployersRelief' => 'bool', - 'apprenticeshipLevy' => 'bool', - 'apprenticeshipLevyAllowance' => 'float', - 'quarterlyPaymentSchedule' => 'bool', + 'id' => 'string', 'includeEmploymentAllowanceOnMonthlyJournal' => 'bool', - 'carryForwardUnpaidLiabilities' => 'bool', + 'officeNumber' => 'string', + 'payeReference' => 'string', + 'paymentDateDayOfMonth' => 'int', 'paymentDateRule' => '\SynergiTech\Staffology\Model\PaymentDateRule', - 'paymentDateDayOfMonth' => 'int' + 'quarterlyPaymentSchedule' => 'bool', + 'smallEmployersRelief' => 'bool', + 'utr' => 'string' ]; /** @@ -84,23 +84,23 @@ class ContractHmrcDetailsResponse implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'officeNumber' => null, - 'payeReference' => null, 'accountsOfficeReference' => null, - 'econ' => null, - 'utr' => null, + 'apprenticeshipLevy' => null, + 'apprenticeshipLevyAllowance' => 'double', + 'carryForwardUnpaidLiabilities' => null, 'coTax' => null, + 'econ' => null, 'employmentAllowance' => null, 'employmentAllowanceMaxClaim' => 'double', - 'smallEmployersRelief' => null, - 'apprenticeshipLevy' => null, - 'apprenticeshipLevyAllowance' => 'double', - 'quarterlyPaymentSchedule' => null, + 'id' => 'uuid', 'includeEmploymentAllowanceOnMonthlyJournal' => null, - 'carryForwardUnpaidLiabilities' => null, + 'officeNumber' => null, + 'payeReference' => null, + 'paymentDateDayOfMonth' => 'int32', 'paymentDateRule' => null, - 'paymentDateDayOfMonth' => 'int32' + 'quarterlyPaymentSchedule' => null, + 'smallEmployersRelief' => null, + 'utr' => null ]; /** @@ -109,23 +109,23 @@ class ContractHmrcDetailsResponse implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'officeNumber' => true, - 'payeReference' => true, 'accountsOfficeReference' => true, - 'econ' => true, - 'utr' => true, + 'apprenticeshipLevy' => false, + 'apprenticeshipLevyAllowance' => false, + 'carryForwardUnpaidLiabilities' => false, 'coTax' => true, + 'econ' => true, 'employmentAllowance' => false, 'employmentAllowanceMaxClaim' => false, - 'smallEmployersRelief' => false, - 'apprenticeshipLevy' => false, - 'apprenticeshipLevyAllowance' => false, - 'quarterlyPaymentSchedule' => false, + 'id' => false, 'includeEmploymentAllowanceOnMonthlyJournal' => false, - 'carryForwardUnpaidLiabilities' => false, + 'officeNumber' => true, + 'payeReference' => true, + 'paymentDateDayOfMonth' => true, 'paymentDateRule' => false, - 'paymentDateDayOfMonth' => true + 'quarterlyPaymentSchedule' => false, + 'smallEmployersRelief' => false, + 'utr' => true ]; /** @@ -214,23 +214,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'officeNumber' => 'officeNumber', - 'payeReference' => 'payeReference', 'accountsOfficeReference' => 'accountsOfficeReference', - 'econ' => 'econ', - 'utr' => 'utr', + 'apprenticeshipLevy' => 'apprenticeshipLevy', + 'apprenticeshipLevyAllowance' => 'apprenticeshipLevyAllowance', + 'carryForwardUnpaidLiabilities' => 'carryForwardUnpaidLiabilities', 'coTax' => 'coTax', + 'econ' => 'econ', 'employmentAllowance' => 'employmentAllowance', 'employmentAllowanceMaxClaim' => 'employmentAllowanceMaxClaim', - 'smallEmployersRelief' => 'smallEmployersRelief', - 'apprenticeshipLevy' => 'apprenticeshipLevy', - 'apprenticeshipLevyAllowance' => 'apprenticeshipLevyAllowance', - 'quarterlyPaymentSchedule' => 'quarterlyPaymentSchedule', + 'id' => 'id', 'includeEmploymentAllowanceOnMonthlyJournal' => 'includeEmploymentAllowanceOnMonthlyJournal', - 'carryForwardUnpaidLiabilities' => 'carryForwardUnpaidLiabilities', + 'officeNumber' => 'officeNumber', + 'payeReference' => 'payeReference', + 'paymentDateDayOfMonth' => 'paymentDateDayOfMonth', 'paymentDateRule' => 'paymentDateRule', - 'paymentDateDayOfMonth' => 'paymentDateDayOfMonth' + 'quarterlyPaymentSchedule' => 'quarterlyPaymentSchedule', + 'smallEmployersRelief' => 'smallEmployersRelief', + 'utr' => 'utr' ]; /** @@ -239,23 +239,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'officeNumber' => 'setOfficeNumber', - 'payeReference' => 'setPayeReference', 'accountsOfficeReference' => 'setAccountsOfficeReference', - 'econ' => 'setEcon', - 'utr' => 'setUtr', + 'apprenticeshipLevy' => 'setApprenticeshipLevy', + 'apprenticeshipLevyAllowance' => 'setApprenticeshipLevyAllowance', + 'carryForwardUnpaidLiabilities' => 'setCarryForwardUnpaidLiabilities', 'coTax' => 'setCoTax', + 'econ' => 'setEcon', 'employmentAllowance' => 'setEmploymentAllowance', 'employmentAllowanceMaxClaim' => 'setEmploymentAllowanceMaxClaim', - 'smallEmployersRelief' => 'setSmallEmployersRelief', - 'apprenticeshipLevy' => 'setApprenticeshipLevy', - 'apprenticeshipLevyAllowance' => 'setApprenticeshipLevyAllowance', - 'quarterlyPaymentSchedule' => 'setQuarterlyPaymentSchedule', + 'id' => 'setId', 'includeEmploymentAllowanceOnMonthlyJournal' => 'setIncludeEmploymentAllowanceOnMonthlyJournal', - 'carryForwardUnpaidLiabilities' => 'setCarryForwardUnpaidLiabilities', + 'officeNumber' => 'setOfficeNumber', + 'payeReference' => 'setPayeReference', + 'paymentDateDayOfMonth' => 'setPaymentDateDayOfMonth', 'paymentDateRule' => 'setPaymentDateRule', - 'paymentDateDayOfMonth' => 'setPaymentDateDayOfMonth' + 'quarterlyPaymentSchedule' => 'setQuarterlyPaymentSchedule', + 'smallEmployersRelief' => 'setSmallEmployersRelief', + 'utr' => 'setUtr' ]; /** @@ -264,23 +264,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'officeNumber' => 'getOfficeNumber', - 'payeReference' => 'getPayeReference', 'accountsOfficeReference' => 'getAccountsOfficeReference', - 'econ' => 'getEcon', - 'utr' => 'getUtr', + 'apprenticeshipLevy' => 'getApprenticeshipLevy', + 'apprenticeshipLevyAllowance' => 'getApprenticeshipLevyAllowance', + 'carryForwardUnpaidLiabilities' => 'getCarryForwardUnpaidLiabilities', 'coTax' => 'getCoTax', + 'econ' => 'getEcon', 'employmentAllowance' => 'getEmploymentAllowance', 'employmentAllowanceMaxClaim' => 'getEmploymentAllowanceMaxClaim', - 'smallEmployersRelief' => 'getSmallEmployersRelief', - 'apprenticeshipLevy' => 'getApprenticeshipLevy', - 'apprenticeshipLevyAllowance' => 'getApprenticeshipLevyAllowance', - 'quarterlyPaymentSchedule' => 'getQuarterlyPaymentSchedule', + 'id' => 'getId', 'includeEmploymentAllowanceOnMonthlyJournal' => 'getIncludeEmploymentAllowanceOnMonthlyJournal', - 'carryForwardUnpaidLiabilities' => 'getCarryForwardUnpaidLiabilities', + 'officeNumber' => 'getOfficeNumber', + 'payeReference' => 'getPayeReference', + 'paymentDateDayOfMonth' => 'getPaymentDateDayOfMonth', 'paymentDateRule' => 'getPaymentDateRule', - 'paymentDateDayOfMonth' => 'getPaymentDateDayOfMonth' + 'quarterlyPaymentSchedule' => 'getQuarterlyPaymentSchedule', + 'smallEmployersRelief' => 'getSmallEmployersRelief', + 'utr' => 'getUtr' ]; /** @@ -339,23 +339,23 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('officeNumber', $data ?? [], null); - $this->setIfExists('payeReference', $data ?? [], null); $this->setIfExists('accountsOfficeReference', $data ?? [], null); - $this->setIfExists('econ', $data ?? [], null); - $this->setIfExists('utr', $data ?? [], null); + $this->setIfExists('apprenticeshipLevy', $data ?? [], null); + $this->setIfExists('apprenticeshipLevyAllowance', $data ?? [], null); + $this->setIfExists('carryForwardUnpaidLiabilities', $data ?? [], null); $this->setIfExists('coTax', $data ?? [], null); + $this->setIfExists('econ', $data ?? [], null); $this->setIfExists('employmentAllowance', $data ?? [], null); $this->setIfExists('employmentAllowanceMaxClaim', $data ?? [], null); - $this->setIfExists('smallEmployersRelief', $data ?? [], null); - $this->setIfExists('apprenticeshipLevy', $data ?? [], null); - $this->setIfExists('apprenticeshipLevyAllowance', $data ?? [], null); - $this->setIfExists('quarterlyPaymentSchedule', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('includeEmploymentAllowanceOnMonthlyJournal', $data ?? [], null); - $this->setIfExists('carryForwardUnpaidLiabilities', $data ?? [], null); - $this->setIfExists('paymentDateRule', $data ?? [], null); + $this->setIfExists('officeNumber', $data ?? [], null); + $this->setIfExists('payeReference', $data ?? [], null); $this->setIfExists('paymentDateDayOfMonth', $data ?? [], null); + $this->setIfExists('paymentDateRule', $data ?? [], null); + $this->setIfExists('quarterlyPaymentSchedule', $data ?? [], null); + $this->setIfExists('smallEmployersRelief', $data ?? [], null); + $this->setIfExists('utr', $data ?? [], null); } /** @@ -401,232 +401,184 @@ public function valid(): bool /** - * Gets id - * - * @return string|null - */ - public function getId(): ?string - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return $this - */ - public function setId(?string $id): static - { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets officeNumber + * Gets accountsOfficeReference * * @return string|null */ - public function getOfficeNumber(): ?string + public function getAccountsOfficeReference(): ?string { - return $this->container['officeNumber']; + return $this->container['accountsOfficeReference']; } /** - * Sets officeNumber + * Sets accountsOfficeReference * - * @param string|null $officeNumber officeNumber + * @param string|null $accountsOfficeReference accountsOfficeReference * * @return $this */ - public function setOfficeNumber(?string $officeNumber): static + public function setAccountsOfficeReference(?string $accountsOfficeReference): static { - if (is_null($officeNumber)) { - array_push($this->openAPINullablesSetToNull, 'officeNumber'); + if (is_null($accountsOfficeReference)) { + array_push($this->openAPINullablesSetToNull, 'accountsOfficeReference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('officeNumber', $nullablesSetToNull); + $index = array_search('accountsOfficeReference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['officeNumber'] = $officeNumber; + $this->container['accountsOfficeReference'] = $accountsOfficeReference; return $this; } /** - * Gets payeReference + * Gets apprenticeshipLevy * - * @return string|null + * @return bool|null */ - public function getPayeReference(): ?string + public function getApprenticeshipLevy(): ?bool { - return $this->container['payeReference']; + return $this->container['apprenticeshipLevy']; } /** - * Sets payeReference + * Sets apprenticeshipLevy * - * @param string|null $payeReference payeReference + * @param bool|null $apprenticeshipLevy apprenticeshipLevy * * @return $this */ - public function setPayeReference(?string $payeReference): static + public function setApprenticeshipLevy(?bool $apprenticeshipLevy): static { - if (is_null($payeReference)) { - array_push($this->openAPINullablesSetToNull, 'payeReference'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payeReference', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($apprenticeshipLevy)) { + throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); } - $this->container['payeReference'] = $payeReference; + $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; return $this; } /** - * Gets accountsOfficeReference + * Gets apprenticeshipLevyAllowance * - * @return string|null + * @return float|null */ - public function getAccountsOfficeReference(): ?string + public function getApprenticeshipLevyAllowance(): ?float { - return $this->container['accountsOfficeReference']; + return $this->container['apprenticeshipLevyAllowance']; } /** - * Sets accountsOfficeReference + * Sets apprenticeshipLevyAllowance * - * @param string|null $accountsOfficeReference accountsOfficeReference + * @param float|null $apprenticeshipLevyAllowance apprenticeshipLevyAllowance * * @return $this */ - public function setAccountsOfficeReference(?string $accountsOfficeReference): static + public function setApprenticeshipLevyAllowance(?float $apprenticeshipLevyAllowance): static { - if (is_null($accountsOfficeReference)) { - array_push($this->openAPINullablesSetToNull, 'accountsOfficeReference'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountsOfficeReference', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($apprenticeshipLevyAllowance)) { + throw new InvalidArgumentException('non-nullable apprenticeshipLevyAllowance cannot be null'); } - $this->container['accountsOfficeReference'] = $accountsOfficeReference; + $this->container['apprenticeshipLevyAllowance'] = $apprenticeshipLevyAllowance; return $this; } /** - * Gets econ + * Gets carryForwardUnpaidLiabilities * - * @return string|null + * @return bool|null */ - public function getEcon(): ?string + public function getCarryForwardUnpaidLiabilities(): ?bool { - return $this->container['econ']; + return $this->container['carryForwardUnpaidLiabilities']; } /** - * Sets econ + * Sets carryForwardUnpaidLiabilities * - * @param string|null $econ econ + * @param bool|null $carryForwardUnpaidLiabilities If set to true then any unpaid amounts from previous periods will be brought forward to work out the liability for the current period. You'd set this to false if you don't want to track payments. * * @return $this */ - public function setEcon(?string $econ): static + public function setCarryForwardUnpaidLiabilities(?bool $carryForwardUnpaidLiabilities): static { - if (is_null($econ)) { - array_push($this->openAPINullablesSetToNull, 'econ'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('econ', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($carryForwardUnpaidLiabilities)) { + throw new InvalidArgumentException('non-nullable carryForwardUnpaidLiabilities cannot be null'); } - $this->container['econ'] = $econ; + $this->container['carryForwardUnpaidLiabilities'] = $carryForwardUnpaidLiabilities; return $this; } /** - * Gets utr + * Gets coTax * * @return string|null */ - public function getUtr(): ?string + public function getCoTax(): ?string { - return $this->container['utr']; + return $this->container['coTax']; } /** - * Sets utr + * Sets coTax * - * @param string|null $utr utr + * @param string|null $coTax coTax * * @return $this */ - public function setUtr(?string $utr): static + public function setCoTax(?string $coTax): static { - if (is_null($utr)) { - array_push($this->openAPINullablesSetToNull, 'utr'); + if (is_null($coTax)) { + array_push($this->openAPINullablesSetToNull, 'coTax'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('utr', $nullablesSetToNull); + $index = array_search('coTax', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['utr'] = $utr; + $this->container['coTax'] = $coTax; return $this; } /** - * Gets coTax + * Gets econ * * @return string|null */ - public function getCoTax(): ?string + public function getEcon(): ?string { - return $this->container['coTax']; + return $this->container['econ']; } /** - * Sets coTax + * Sets econ * - * @param string|null $coTax coTax + * @param string|null $econ econ * * @return $this */ - public function setCoTax(?string $coTax): static + public function setEcon(?string $econ): static { - if (is_null($coTax)) { - array_push($this->openAPINullablesSetToNull, 'coTax'); + if (is_null($econ)) { + array_push($this->openAPINullablesSetToNull, 'econ'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('coTax', $nullablesSetToNull); + $index = array_search('econ', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['coTax'] = $coTax; + $this->container['econ'] = $econ; return $this; } @@ -686,224 +638,272 @@ public function setEmploymentAllowanceMaxClaim(?float $employmentAllowanceMaxCla } /** - * Gets smallEmployersRelief + * Gets id * - * @return bool|null + * @return string|null */ - public function getSmallEmployersRelief(): ?bool + public function getId(): ?string { - return $this->container['smallEmployersRelief']; + return $this->container['id']; } /** - * Sets smallEmployersRelief + * Sets id * - * @param bool|null $smallEmployersRelief smallEmployersRelief + * @param string|null $id id * * @return $this */ - public function setSmallEmployersRelief(?bool $smallEmployersRelief): static + public function setId(?string $id): static { - if (is_null($smallEmployersRelief)) { - throw new InvalidArgumentException('non-nullable smallEmployersRelief cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['smallEmployersRelief'] = $smallEmployersRelief; + $this->container['id'] = $id; return $this; } /** - * Gets apprenticeshipLevy + * Gets includeEmploymentAllowanceOnMonthlyJournal * * @return bool|null */ - public function getApprenticeshipLevy(): ?bool + public function getIncludeEmploymentAllowanceOnMonthlyJournal(): ?bool { - return $this->container['apprenticeshipLevy']; + return $this->container['includeEmploymentAllowanceOnMonthlyJournal']; } /** - * Sets apprenticeshipLevy + * Sets includeEmploymentAllowanceOnMonthlyJournal * - * @param bool|null $apprenticeshipLevy apprenticeshipLevy + * @param bool|null $includeEmploymentAllowanceOnMonthlyJournal If the employer is not on a QuarterlyPaymentSchedule and is claiming EmploymentAllowance, then set this to true to include a line for Employment Allowance on the journal for the monthly schedule. * * @return $this */ - public function setApprenticeshipLevy(?bool $apprenticeshipLevy): static + public function setIncludeEmploymentAllowanceOnMonthlyJournal(?bool $includeEmploymentAllowanceOnMonthlyJournal): static { - if (is_null($apprenticeshipLevy)) { - throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); + if (is_null($includeEmploymentAllowanceOnMonthlyJournal)) { + throw new InvalidArgumentException('non-nullable includeEmploymentAllowanceOnMonthlyJournal cannot be null'); } - $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; + $this->container['includeEmploymentAllowanceOnMonthlyJournal'] = $includeEmploymentAllowanceOnMonthlyJournal; return $this; } /** - * Gets apprenticeshipLevyAllowance + * Gets officeNumber * - * @return float|null + * @return string|null */ - public function getApprenticeshipLevyAllowance(): ?float + public function getOfficeNumber(): ?string { - return $this->container['apprenticeshipLevyAllowance']; + return $this->container['officeNumber']; } /** - * Sets apprenticeshipLevyAllowance + * Sets officeNumber * - * @param float|null $apprenticeshipLevyAllowance apprenticeshipLevyAllowance + * @param string|null $officeNumber officeNumber * * @return $this */ - public function setApprenticeshipLevyAllowance(?float $apprenticeshipLevyAllowance): static + public function setOfficeNumber(?string $officeNumber): static { - if (is_null($apprenticeshipLevyAllowance)) { - throw new InvalidArgumentException('non-nullable apprenticeshipLevyAllowance cannot be null'); + if (is_null($officeNumber)) { + array_push($this->openAPINullablesSetToNull, 'officeNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('officeNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['apprenticeshipLevyAllowance'] = $apprenticeshipLevyAllowance; + $this->container['officeNumber'] = $officeNumber; return $this; } /** - * Gets quarterlyPaymentSchedule + * Gets payeReference * - * @return bool|null + * @return string|null */ - public function getQuarterlyPaymentSchedule(): ?bool + public function getPayeReference(): ?string { - return $this->container['quarterlyPaymentSchedule']; + return $this->container['payeReference']; } /** - * Sets quarterlyPaymentSchedule + * Sets payeReference * - * @param bool|null $quarterlyPaymentSchedule Set to true if the employer pays HMRC on a quarterly schedule. A value of false implies a monthly schedule. Warning: Changing this value after starting PayRuns will delete any existing payments or adjustments you may have entered. + * @param string|null $payeReference payeReference * * @return $this */ - public function setQuarterlyPaymentSchedule(?bool $quarterlyPaymentSchedule): static + public function setPayeReference(?string $payeReference): static { - if (is_null($quarterlyPaymentSchedule)) { - throw new InvalidArgumentException('non-nullable quarterlyPaymentSchedule cannot be null'); + if (is_null($payeReference)) { + array_push($this->openAPINullablesSetToNull, 'payeReference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payeReference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['quarterlyPaymentSchedule'] = $quarterlyPaymentSchedule; + $this->container['payeReference'] = $payeReference; return $this; } /** - * Gets includeEmploymentAllowanceOnMonthlyJournal + * Gets paymentDateDayOfMonth * - * @return bool|null + * @return int|null */ - public function getIncludeEmploymentAllowanceOnMonthlyJournal(): ?bool + public function getPaymentDateDayOfMonth(): ?int { - return $this->container['includeEmploymentAllowanceOnMonthlyJournal']; + return $this->container['paymentDateDayOfMonth']; } /** - * Sets includeEmploymentAllowanceOnMonthlyJournal + * Sets paymentDateDayOfMonth * - * @param bool|null $includeEmploymentAllowanceOnMonthlyJournal If the employer is not on a QuarterlyPaymentSchedule and is claiming EmploymentAllowance, then set this to true to include a line for Employment Allowance on the journal for the monthly schedule. + * @param int|null $paymentDateDayOfMonth paymentDateDayOfMonth * * @return $this */ - public function setIncludeEmploymentAllowanceOnMonthlyJournal(?bool $includeEmploymentAllowanceOnMonthlyJournal): static + public function setPaymentDateDayOfMonth(?int $paymentDateDayOfMonth): static { - if (is_null($includeEmploymentAllowanceOnMonthlyJournal)) { - throw new InvalidArgumentException('non-nullable includeEmploymentAllowanceOnMonthlyJournal cannot be null'); + if (is_null($paymentDateDayOfMonth)) { + array_push($this->openAPINullablesSetToNull, 'paymentDateDayOfMonth'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('paymentDateDayOfMonth', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['includeEmploymentAllowanceOnMonthlyJournal'] = $includeEmploymentAllowanceOnMonthlyJournal; + $this->container['paymentDateDayOfMonth'] = $paymentDateDayOfMonth; return $this; } /** - * Gets carryForwardUnpaidLiabilities + * Gets paymentDateRule + * + * @return \SynergiTech\Staffology\Model\PaymentDateRule|null + */ + public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule + { + return $this->container['paymentDateRule']; + } + + /** + * Sets paymentDateRule + * + * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule + * + * @return $this + */ + public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static + { + if (is_null($paymentDateRule)) { + throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); + } + $this->container['paymentDateRule'] = $paymentDateRule; + + return $this; + } + + /** + * Gets quarterlyPaymentSchedule * * @return bool|null */ - public function getCarryForwardUnpaidLiabilities(): ?bool + public function getQuarterlyPaymentSchedule(): ?bool { - return $this->container['carryForwardUnpaidLiabilities']; + return $this->container['quarterlyPaymentSchedule']; } /** - * Sets carryForwardUnpaidLiabilities + * Sets quarterlyPaymentSchedule * - * @param bool|null $carryForwardUnpaidLiabilities If set to true then any unpaid amounts from previous periods will be brought forward to work out the liability for the current period. You'd set this to false if you don't want to track payments. + * @param bool|null $quarterlyPaymentSchedule Set to true if the employer pays HMRC on a quarterly schedule. A value of false implies a monthly schedule. Warning: Changing this value after starting PayRuns will delete any existing payments or adjustments you may have entered. * * @return $this */ - public function setCarryForwardUnpaidLiabilities(?bool $carryForwardUnpaidLiabilities): static + public function setQuarterlyPaymentSchedule(?bool $quarterlyPaymentSchedule): static { - if (is_null($carryForwardUnpaidLiabilities)) { - throw new InvalidArgumentException('non-nullable carryForwardUnpaidLiabilities cannot be null'); + if (is_null($quarterlyPaymentSchedule)) { + throw new InvalidArgumentException('non-nullable quarterlyPaymentSchedule cannot be null'); } - $this->container['carryForwardUnpaidLiabilities'] = $carryForwardUnpaidLiabilities; + $this->container['quarterlyPaymentSchedule'] = $quarterlyPaymentSchedule; return $this; } /** - * Gets paymentDateRule + * Gets smallEmployersRelief * - * @return \SynergiTech\Staffology\Model\PaymentDateRule|null + * @return bool|null */ - public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule + public function getSmallEmployersRelief(): ?bool { - return $this->container['paymentDateRule']; + return $this->container['smallEmployersRelief']; } /** - * Sets paymentDateRule + * Sets smallEmployersRelief * - * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule + * @param bool|null $smallEmployersRelief smallEmployersRelief * * @return $this */ - public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static + public function setSmallEmployersRelief(?bool $smallEmployersRelief): static { - if (is_null($paymentDateRule)) { - throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); + if (is_null($smallEmployersRelief)) { + throw new InvalidArgumentException('non-nullable smallEmployersRelief cannot be null'); } - $this->container['paymentDateRule'] = $paymentDateRule; + $this->container['smallEmployersRelief'] = $smallEmployersRelief; return $this; } /** - * Gets paymentDateDayOfMonth + * Gets utr * - * @return int|null + * @return string|null */ - public function getPaymentDateDayOfMonth(): ?int + public function getUtr(): ?string { - return $this->container['paymentDateDayOfMonth']; + return $this->container['utr']; } /** - * Sets paymentDateDayOfMonth + * Sets utr * - * @param int|null $paymentDateDayOfMonth paymentDateDayOfMonth + * @param string|null $utr utr * * @return $this */ - public function setPaymentDateDayOfMonth(?int $paymentDateDayOfMonth): static + public function setUtr(?string $utr): static { - if (is_null($paymentDateDayOfMonth)) { - array_push($this->openAPINullablesSetToNull, 'paymentDateDayOfMonth'); + if (is_null($utr)) { + array_push($this->openAPINullablesSetToNull, 'utr'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paymentDateDayOfMonth', $nullablesSetToNull); + $index = array_search('utr', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['paymentDateDayOfMonth'] = $paymentDateDayOfMonth; + $this->container['utr'] = $utr; return $this; } diff --git a/src/Model/ContractHolidayEntitlementRequest.php b/src/Model/ContractHolidayEntitlementRequest.php index 5b86da0..04ca6bf 100644 --- a/src/Model/ContractHolidayEntitlementRequest.php +++ b/src/Model/ContractHolidayEntitlementRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class ContractHolidayEntitlementRequest implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPITypes = [ - 'effectiveDate' => '\DateTime', 'baseHolidayEntitlement' => 'float', + 'effectiveDate' => '\DateTime', 'yearsServiceEntitlementBasis' => '\SynergiTech\Staffology\Model\PaySpineYearsServiceEntitlementBasis', 'yearsServiceEntitlements' => '\SynergiTech\Staffology\Model\ContractYearsServiceEntitlementRequest[]' ]; @@ -71,8 +71,8 @@ class ContractHolidayEntitlementRequest implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPIFormats = [ - 'effectiveDate' => 'date', 'baseHolidayEntitlement' => 'double', + 'effectiveDate' => 'date', 'yearsServiceEntitlementBasis' => null, 'yearsServiceEntitlements' => null ]; @@ -83,8 +83,8 @@ class ContractHolidayEntitlementRequest implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPINullables = [ - 'effectiveDate' => false, 'baseHolidayEntitlement' => false, + 'effectiveDate' => false, 'yearsServiceEntitlementBasis' => false, 'yearsServiceEntitlements' => true ]; @@ -175,8 +175,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'effectiveDate' => 'effectiveDate', 'baseHolidayEntitlement' => 'baseHolidayEntitlement', + 'effectiveDate' => 'effectiveDate', 'yearsServiceEntitlementBasis' => 'yearsServiceEntitlementBasis', 'yearsServiceEntitlements' => 'yearsServiceEntitlements' ]; @@ -187,8 +187,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'effectiveDate' => 'setEffectiveDate', 'baseHolidayEntitlement' => 'setBaseHolidayEntitlement', + 'effectiveDate' => 'setEffectiveDate', 'yearsServiceEntitlementBasis' => 'setYearsServiceEntitlementBasis', 'yearsServiceEntitlements' => 'setYearsServiceEntitlements' ]; @@ -199,8 +199,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'effectiveDate' => 'getEffectiveDate', 'baseHolidayEntitlement' => 'getBaseHolidayEntitlement', + 'effectiveDate' => 'getEffectiveDate', 'yearsServiceEntitlementBasis' => 'getYearsServiceEntitlementBasis', 'yearsServiceEntitlements' => 'getYearsServiceEntitlements' ]; @@ -261,8 +261,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('effectiveDate', $data ?? [], null); $this->setIfExists('baseHolidayEntitlement', $data ?? [], null); + $this->setIfExists('effectiveDate', $data ?? [], null); $this->setIfExists('yearsServiceEntitlementBasis', $data ?? [], null); $this->setIfExists('yearsServiceEntitlements', $data ?? [], null); } @@ -294,12 +294,12 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['effectiveDate'] === null) { - $invalidProperties[] = "'effectiveDate' can't be null"; - } if ($this->container['baseHolidayEntitlement'] === null) { $invalidProperties[] = "'baseHolidayEntitlement' can't be null"; } + if ($this->container['effectiveDate'] === null) { + $invalidProperties[] = "'effectiveDate' can't be null"; + } return $invalidProperties; } @@ -316,55 +316,55 @@ public function valid(): bool /** - * Gets effectiveDate + * Gets baseHolidayEntitlement * - * @return \DateTime + * @return float */ - public function getEffectiveDate(): \DateTime + public function getBaseHolidayEntitlement(): float { - return $this->container['effectiveDate']; + return $this->container['baseHolidayEntitlement']; } /** - * Sets effectiveDate + * Sets baseHolidayEntitlement * - * @param \DateTime $effectiveDate PaySpine Holiday Entitlement Effective Date + * @param float $baseHolidayEntitlement PaySpine Base Holiday Entitlement * * @return $this */ - public function setEffectiveDate(\DateTime $effectiveDate): static + public function setBaseHolidayEntitlement(float $baseHolidayEntitlement): static { - if (is_null($effectiveDate)) { - throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); + if (is_null($baseHolidayEntitlement)) { + throw new InvalidArgumentException('non-nullable baseHolidayEntitlement cannot be null'); } - $this->container['effectiveDate'] = $effectiveDate; + $this->container['baseHolidayEntitlement'] = $baseHolidayEntitlement; return $this; } /** - * Gets baseHolidayEntitlement + * Gets effectiveDate * - * @return float + * @return \DateTime */ - public function getBaseHolidayEntitlement(): float + public function getEffectiveDate(): \DateTime { - return $this->container['baseHolidayEntitlement']; + return $this->container['effectiveDate']; } /** - * Sets baseHolidayEntitlement + * Sets effectiveDate * - * @param float $baseHolidayEntitlement PaySpine Base Holiday Entitlement + * @param \DateTime $effectiveDate PaySpine Holiday Entitlement Effective Date * * @return $this */ - public function setBaseHolidayEntitlement(float $baseHolidayEntitlement): static + public function setEffectiveDate(\DateTime $effectiveDate): static { - if (is_null($baseHolidayEntitlement)) { - throw new InvalidArgumentException('non-nullable baseHolidayEntitlement cannot be null'); + if (is_null($effectiveDate)) { + throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); } - $this->container['baseHolidayEntitlement'] = $baseHolidayEntitlement; + $this->container['effectiveDate'] = $effectiveDate; return $this; } diff --git a/src/Model/ContractHolidayEntitlementResponse.php b/src/Model/ContractHolidayEntitlementResponse.php index a42d162..8bb67b8 100644 --- a/src/Model/ContractHolidayEntitlementResponse.php +++ b/src/Model/ContractHolidayEntitlementResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractHolidayEntitlementResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPITypes = [ - 'uniqueId' => 'string', - 'effectiveDate' => '\DateTime', 'baseHolidayEntitlement' => 'float', + 'effectiveDate' => '\DateTime', + 'uniqueId' => 'string', 'yearsServiceEntitlementBasis' => '\SynergiTech\Staffology\Model\PaySpineYearsServiceEntitlementBasis', 'yearsServiceEntitlements' => '\SynergiTech\Staffology\Model\ContractYearsServiceEntitlementResponse[]' ]; @@ -72,9 +72,9 @@ class ContractHolidayEntitlementResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPIFormats = [ - 'uniqueId' => 'uuid', - 'effectiveDate' => 'date', 'baseHolidayEntitlement' => 'double', + 'effectiveDate' => 'date', + 'uniqueId' => 'uuid', 'yearsServiceEntitlementBasis' => null, 'yearsServiceEntitlements' => null ]; @@ -85,9 +85,9 @@ class ContractHolidayEntitlementResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPINullables = [ - 'uniqueId' => false, - 'effectiveDate' => false, 'baseHolidayEntitlement' => false, + 'effectiveDate' => false, + 'uniqueId' => false, 'yearsServiceEntitlementBasis' => false, 'yearsServiceEntitlements' => true ]; @@ -178,9 +178,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'uniqueId' => 'uniqueId', - 'effectiveDate' => 'effectiveDate', 'baseHolidayEntitlement' => 'baseHolidayEntitlement', + 'effectiveDate' => 'effectiveDate', + 'uniqueId' => 'uniqueId', 'yearsServiceEntitlementBasis' => 'yearsServiceEntitlementBasis', 'yearsServiceEntitlements' => 'yearsServiceEntitlements' ]; @@ -191,9 +191,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'uniqueId' => 'setUniqueId', - 'effectiveDate' => 'setEffectiveDate', 'baseHolidayEntitlement' => 'setBaseHolidayEntitlement', + 'effectiveDate' => 'setEffectiveDate', + 'uniqueId' => 'setUniqueId', 'yearsServiceEntitlementBasis' => 'setYearsServiceEntitlementBasis', 'yearsServiceEntitlements' => 'setYearsServiceEntitlements' ]; @@ -204,9 +204,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'uniqueId' => 'getUniqueId', - 'effectiveDate' => 'getEffectiveDate', 'baseHolidayEntitlement' => 'getBaseHolidayEntitlement', + 'effectiveDate' => 'getEffectiveDate', + 'uniqueId' => 'getUniqueId', 'yearsServiceEntitlementBasis' => 'getYearsServiceEntitlementBasis', 'yearsServiceEntitlements' => 'getYearsServiceEntitlements' ]; @@ -267,9 +267,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('uniqueId', $data ?? [], null); - $this->setIfExists('effectiveDate', $data ?? [], null); $this->setIfExists('baseHolidayEntitlement', $data ?? [], null); + $this->setIfExists('effectiveDate', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); $this->setIfExists('yearsServiceEntitlementBasis', $data ?? [], null); $this->setIfExists('yearsServiceEntitlements', $data ?? [], null); } @@ -301,12 +301,12 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['effectiveDate'] === null) { - $invalidProperties[] = "'effectiveDate' can't be null"; - } if ($this->container['baseHolidayEntitlement'] === null) { $invalidProperties[] = "'baseHolidayEntitlement' can't be null"; } + if ($this->container['effectiveDate'] === null) { + $invalidProperties[] = "'effectiveDate' can't be null"; + } return $invalidProperties; } @@ -323,28 +323,28 @@ public function valid(): bool /** - * Gets uniqueId + * Gets baseHolidayEntitlement * - * @return string|null + * @return float */ - public function getUniqueId(): ?string + public function getBaseHolidayEntitlement(): float { - return $this->container['uniqueId']; + return $this->container['baseHolidayEntitlement']; } /** - * Sets uniqueId + * Sets baseHolidayEntitlement * - * @param string|null $uniqueId Unique identifier for the Holiday Entitlement + * @param float $baseHolidayEntitlement PaySpine Base Holiday Entitlement * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setBaseHolidayEntitlement(float $baseHolidayEntitlement): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($baseHolidayEntitlement)) { + throw new InvalidArgumentException('non-nullable baseHolidayEntitlement cannot be null'); } - $this->container['uniqueId'] = $uniqueId; + $this->container['baseHolidayEntitlement'] = $baseHolidayEntitlement; return $this; } @@ -377,28 +377,28 @@ public function setEffectiveDate(\DateTime $effectiveDate): static } /** - * Gets baseHolidayEntitlement + * Gets uniqueId * - * @return float + * @return string|null */ - public function getBaseHolidayEntitlement(): float + public function getUniqueId(): ?string { - return $this->container['baseHolidayEntitlement']; + return $this->container['uniqueId']; } /** - * Sets baseHolidayEntitlement + * Sets uniqueId * - * @param float $baseHolidayEntitlement PaySpine Base Holiday Entitlement + * @param string|null $uniqueId Unique identifier for the Holiday Entitlement * * @return $this */ - public function setBaseHolidayEntitlement(float $baseHolidayEntitlement): static + public function setUniqueId(?string $uniqueId): static { - if (is_null($baseHolidayEntitlement)) { - throw new InvalidArgumentException('non-nullable baseHolidayEntitlement cannot be null'); + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); } - $this->container['baseHolidayEntitlement'] = $baseHolidayEntitlement; + $this->container['uniqueId'] = $uniqueId; return $this; } diff --git a/src/Model/ContractHolidayEntitlementUpdateRequest.php b/src/Model/ContractHolidayEntitlementUpdateRequest.php index 30f280f..53a3def 100644 --- a/src/Model/ContractHolidayEntitlementUpdateRequest.php +++ b/src/Model/ContractHolidayEntitlementUpdateRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractHolidayEntitlementUpdateRequest implements ModelInterface, ArrayAc * @var array */ protected static array $openAPITypes = [ - 'uniqueId' => 'string', - 'effectiveDate' => '\DateTime', 'baseHolidayEntitlement' => 'float', + 'effectiveDate' => '\DateTime', + 'uniqueId' => 'string', 'yearsServiceEntitlementBasis' => '\SynergiTech\Staffology\Model\PaySpineYearsServiceEntitlementBasis', 'yearsServiceEntitlements' => '\SynergiTech\Staffology\Model\ContractYearsServiceEntitlementUpdateRequest[]' ]; @@ -72,9 +72,9 @@ class ContractHolidayEntitlementUpdateRequest implements ModelInterface, ArrayAc * @var array */ protected static array $openAPIFormats = [ - 'uniqueId' => 'uuid', - 'effectiveDate' => 'date', 'baseHolidayEntitlement' => 'double', + 'effectiveDate' => 'date', + 'uniqueId' => 'uuid', 'yearsServiceEntitlementBasis' => null, 'yearsServiceEntitlements' => null ]; @@ -85,9 +85,9 @@ class ContractHolidayEntitlementUpdateRequest implements ModelInterface, ArrayAc * @var array */ protected static array $openAPINullables = [ - 'uniqueId' => false, - 'effectiveDate' => false, 'baseHolidayEntitlement' => false, + 'effectiveDate' => false, + 'uniqueId' => false, 'yearsServiceEntitlementBasis' => false, 'yearsServiceEntitlements' => true ]; @@ -178,9 +178,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'uniqueId' => 'uniqueId', - 'effectiveDate' => 'effectiveDate', 'baseHolidayEntitlement' => 'baseHolidayEntitlement', + 'effectiveDate' => 'effectiveDate', + 'uniqueId' => 'uniqueId', 'yearsServiceEntitlementBasis' => 'yearsServiceEntitlementBasis', 'yearsServiceEntitlements' => 'yearsServiceEntitlements' ]; @@ -191,9 +191,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'uniqueId' => 'setUniqueId', - 'effectiveDate' => 'setEffectiveDate', 'baseHolidayEntitlement' => 'setBaseHolidayEntitlement', + 'effectiveDate' => 'setEffectiveDate', + 'uniqueId' => 'setUniqueId', 'yearsServiceEntitlementBasis' => 'setYearsServiceEntitlementBasis', 'yearsServiceEntitlements' => 'setYearsServiceEntitlements' ]; @@ -204,9 +204,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'uniqueId' => 'getUniqueId', - 'effectiveDate' => 'getEffectiveDate', 'baseHolidayEntitlement' => 'getBaseHolidayEntitlement', + 'effectiveDate' => 'getEffectiveDate', + 'uniqueId' => 'getUniqueId', 'yearsServiceEntitlementBasis' => 'getYearsServiceEntitlementBasis', 'yearsServiceEntitlements' => 'getYearsServiceEntitlements' ]; @@ -267,9 +267,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('uniqueId', $data ?? [], null); - $this->setIfExists('effectiveDate', $data ?? [], null); $this->setIfExists('baseHolidayEntitlement', $data ?? [], null); + $this->setIfExists('effectiveDate', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); $this->setIfExists('yearsServiceEntitlementBasis', $data ?? [], null); $this->setIfExists('yearsServiceEntitlements', $data ?? [], null); } @@ -301,12 +301,12 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['effectiveDate'] === null) { - $invalidProperties[] = "'effectiveDate' can't be null"; - } if ($this->container['baseHolidayEntitlement'] === null) { $invalidProperties[] = "'baseHolidayEntitlement' can't be null"; } + if ($this->container['effectiveDate'] === null) { + $invalidProperties[] = "'effectiveDate' can't be null"; + } return $invalidProperties; } @@ -323,28 +323,28 @@ public function valid(): bool /** - * Gets uniqueId + * Gets baseHolidayEntitlement * - * @return string|null + * @return float */ - public function getUniqueId(): ?string + public function getBaseHolidayEntitlement(): float { - return $this->container['uniqueId']; + return $this->container['baseHolidayEntitlement']; } /** - * Sets uniqueId + * Sets baseHolidayEntitlement * - * @param string|null $uniqueId Unique identifier for the PaySpine Holiday Entitlement. + * @param float $baseHolidayEntitlement PaySpine Base Holiday Entitlement * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setBaseHolidayEntitlement(float $baseHolidayEntitlement): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($baseHolidayEntitlement)) { + throw new InvalidArgumentException('non-nullable baseHolidayEntitlement cannot be null'); } - $this->container['uniqueId'] = $uniqueId; + $this->container['baseHolidayEntitlement'] = $baseHolidayEntitlement; return $this; } @@ -377,28 +377,28 @@ public function setEffectiveDate(\DateTime $effectiveDate): static } /** - * Gets baseHolidayEntitlement + * Gets uniqueId * - * @return float + * @return string|null */ - public function getBaseHolidayEntitlement(): float + public function getUniqueId(): ?string { - return $this->container['baseHolidayEntitlement']; + return $this->container['uniqueId']; } /** - * Sets baseHolidayEntitlement + * Sets uniqueId * - * @param float $baseHolidayEntitlement PaySpine Base Holiday Entitlement + * @param string|null $uniqueId Unique identifier for the PaySpine Holiday Entitlement. * * @return $this */ - public function setBaseHolidayEntitlement(float $baseHolidayEntitlement): static + public function setUniqueId(?string $uniqueId): static { - if (is_null($baseHolidayEntitlement)) { - throw new InvalidArgumentException('non-nullable baseHolidayEntitlement cannot be null'); + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); } - $this->container['baseHolidayEntitlement'] = $baseHolidayEntitlement; + $this->container['uniqueId'] = $uniqueId; return $this; } diff --git a/src/Model/ContractHolidaySchemeRequest.php b/src/Model/ContractHolidaySchemeRequest.php index ddf5de1..1f7f5db 100644 --- a/src/Model/ContractHolidaySchemeRequest.php +++ b/src/Model/ContractHolidaySchemeRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,17 @@ class ContractHolidaySchemeRequest implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', 'averageCalculationWeeks' => 'int', - 'useOnlyPaidWeeks' => 'bool', - 'ignoreSxp' => 'bool', 'calculationDurationUnit' => '\SynergiTech\Staffology\Model\HolidaySchemeDurationType', - 'useNiPay' => 'bool', - 'useWorkingPattern' => 'bool', - 'payCodeSetForPayId' => 'string', + 'ignoreSxp' => 'bool', + 'name' => 'string', + 'payCodeSetForDaysId' => 'string', 'payCodeSetForHoursId' => 'string', - 'useFallbackRate' => 'bool' + 'payCodeSetForPayId' => 'string', + 'useFallbackRate' => 'bool', + 'useNiPay' => 'bool', + 'useOnlyPaidWeeks' => 'bool', + 'useWorkingPattern' => 'bool' ]; /** @@ -77,16 +78,17 @@ class ContractHolidaySchemeRequest implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'name' => null, 'averageCalculationWeeks' => 'int32', - 'useOnlyPaidWeeks' => null, - 'ignoreSxp' => null, 'calculationDurationUnit' => null, - 'useNiPay' => null, - 'useWorkingPattern' => null, - 'payCodeSetForPayId' => 'uuid', + 'ignoreSxp' => null, + 'name' => null, + 'payCodeSetForDaysId' => 'uuid', 'payCodeSetForHoursId' => 'uuid', - 'useFallbackRate' => null + 'payCodeSetForPayId' => 'uuid', + 'useFallbackRate' => null, + 'useNiPay' => null, + 'useOnlyPaidWeeks' => null, + 'useWorkingPattern' => null ]; /** @@ -95,16 +97,17 @@ class ContractHolidaySchemeRequest implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'name' => false, 'averageCalculationWeeks' => false, - 'useOnlyPaidWeeks' => false, - 'ignoreSxp' => false, 'calculationDurationUnit' => false, - 'useNiPay' => false, - 'useWorkingPattern' => false, - 'payCodeSetForPayId' => true, + 'ignoreSxp' => false, + 'name' => false, + 'payCodeSetForDaysId' => true, 'payCodeSetForHoursId' => true, - 'useFallbackRate' => false + 'payCodeSetForPayId' => true, + 'useFallbackRate' => false, + 'useNiPay' => false, + 'useOnlyPaidWeeks' => false, + 'useWorkingPattern' => false ]; /** @@ -193,16 +196,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', 'averageCalculationWeeks' => 'averageCalculationWeeks', - 'useOnlyPaidWeeks' => 'useOnlyPaidWeeks', - 'ignoreSxp' => 'ignoreSxp', 'calculationDurationUnit' => 'calculationDurationUnit', - 'useNiPay' => 'useNiPay', - 'useWorkingPattern' => 'useWorkingPattern', - 'payCodeSetForPayId' => 'payCodeSetForPayId', + 'ignoreSxp' => 'ignoreSxp', + 'name' => 'name', + 'payCodeSetForDaysId' => 'payCodeSetForDaysId', 'payCodeSetForHoursId' => 'payCodeSetForHoursId', - 'useFallbackRate' => 'useFallbackRate' + 'payCodeSetForPayId' => 'payCodeSetForPayId', + 'useFallbackRate' => 'useFallbackRate', + 'useNiPay' => 'useNiPay', + 'useOnlyPaidWeeks' => 'useOnlyPaidWeeks', + 'useWorkingPattern' => 'useWorkingPattern' ]; /** @@ -211,16 +215,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', 'averageCalculationWeeks' => 'setAverageCalculationWeeks', - 'useOnlyPaidWeeks' => 'setUseOnlyPaidWeeks', - 'ignoreSxp' => 'setIgnoreSxp', 'calculationDurationUnit' => 'setCalculationDurationUnit', - 'useNiPay' => 'setUseNiPay', - 'useWorkingPattern' => 'setUseWorkingPattern', - 'payCodeSetForPayId' => 'setPayCodeSetForPayId', + 'ignoreSxp' => 'setIgnoreSxp', + 'name' => 'setName', + 'payCodeSetForDaysId' => 'setPayCodeSetForDaysId', 'payCodeSetForHoursId' => 'setPayCodeSetForHoursId', - 'useFallbackRate' => 'setUseFallbackRate' + 'payCodeSetForPayId' => 'setPayCodeSetForPayId', + 'useFallbackRate' => 'setUseFallbackRate', + 'useNiPay' => 'setUseNiPay', + 'useOnlyPaidWeeks' => 'setUseOnlyPaidWeeks', + 'useWorkingPattern' => 'setUseWorkingPattern' ]; /** @@ -229,16 +234,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', 'averageCalculationWeeks' => 'getAverageCalculationWeeks', - 'useOnlyPaidWeeks' => 'getUseOnlyPaidWeeks', - 'ignoreSxp' => 'getIgnoreSxp', 'calculationDurationUnit' => 'getCalculationDurationUnit', - 'useNiPay' => 'getUseNiPay', - 'useWorkingPattern' => 'getUseWorkingPattern', - 'payCodeSetForPayId' => 'getPayCodeSetForPayId', + 'ignoreSxp' => 'getIgnoreSxp', + 'name' => 'getName', + 'payCodeSetForDaysId' => 'getPayCodeSetForDaysId', 'payCodeSetForHoursId' => 'getPayCodeSetForHoursId', - 'useFallbackRate' => 'getUseFallbackRate' + 'payCodeSetForPayId' => 'getPayCodeSetForPayId', + 'useFallbackRate' => 'getUseFallbackRate', + 'useNiPay' => 'getUseNiPay', + 'useOnlyPaidWeeks' => 'getUseOnlyPaidWeeks', + 'useWorkingPattern' => 'getUseWorkingPattern' ]; /** @@ -297,16 +303,17 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('averageCalculationWeeks', $data ?? [], null); - $this->setIfExists('useOnlyPaidWeeks', $data ?? [], null); - $this->setIfExists('ignoreSxp', $data ?? [], null); $this->setIfExists('calculationDurationUnit', $data ?? [], null); - $this->setIfExists('useNiPay', $data ?? [], null); - $this->setIfExists('useWorkingPattern', $data ?? [], null); - $this->setIfExists('payCodeSetForPayId', $data ?? [], null); + $this->setIfExists('ignoreSxp', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('payCodeSetForDaysId', $data ?? [], null); $this->setIfExists('payCodeSetForHoursId', $data ?? [], null); + $this->setIfExists('payCodeSetForPayId', $data ?? [], null); $this->setIfExists('useFallbackRate', $data ?? [], null); + $this->setIfExists('useNiPay', $data ?? [], null); + $this->setIfExists('useOnlyPaidWeeks', $data ?? [], null); + $this->setIfExists('useWorkingPattern', $data ?? [], null); } /** @@ -358,38 +365,6 @@ public function valid(): bool } - /** - * Gets name - * - * @return string - */ - public function getName(): string - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name Holiday scheme name - * - * @return $this - */ - public function setName(string $name): static - { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); - } - - if ((mb_strlen($name) < 1)) { - throw new InvalidArgumentException('invalid length for $name when calling ContractHolidaySchemeRequest., must be bigger than or equal to 1.'); - } - - $this->container['name'] = $name; - - return $this; - } - /** * Gets averageCalculationWeeks * @@ -418,28 +393,28 @@ public function setAverageCalculationWeeks(?int $averageCalculationWeeks): stati } /** - * Gets useOnlyPaidWeeks + * Gets calculationDurationUnit * - * @return bool|null + * @return \SynergiTech\Staffology\Model\HolidaySchemeDurationType|null */ - public function getUseOnlyPaidWeeks(): ?bool + public function getCalculationDurationUnit(): ?\SynergiTech\Staffology\Model\HolidaySchemeDurationType { - return $this->container['useOnlyPaidWeeks']; + return $this->container['calculationDurationUnit']; } /** - * Sets useOnlyPaidWeeks + * Sets calculationDurationUnit * - * @param bool|null $useOnlyPaidWeeks If to go back further than the stated no of weeks for calculation if there are weeks where the employee has not been paid. (Default- True) + * @param \SynergiTech\Staffology\Model\HolidaySchemeDurationType|null $calculationDurationUnit calculationDurationUnit * * @return $this */ - public function setUseOnlyPaidWeeks(?bool $useOnlyPaidWeeks): static + public function setCalculationDurationUnit(?\SynergiTech\Staffology\Model\HolidaySchemeDurationType $calculationDurationUnit): static { - if (is_null($useOnlyPaidWeeks)) { - throw new InvalidArgumentException('non-nullable useOnlyPaidWeeks cannot be null'); + if (is_null($calculationDurationUnit)) { + throw new InvalidArgumentException('non-nullable calculationDurationUnit cannot be null'); } - $this->container['useOnlyPaidWeeks'] = $useOnlyPaidWeeks; + $this->container['calculationDurationUnit'] = $calculationDurationUnit; return $this; } @@ -472,82 +447,101 @@ public function setIgnoreSxp(?bool $ignoreSxp): static } /** - * Gets calculationDurationUnit + * Gets name * - * @return \SynergiTech\Staffology\Model\HolidaySchemeDurationType|null + * @return string */ - public function getCalculationDurationUnit(): ?\SynergiTech\Staffology\Model\HolidaySchemeDurationType + public function getName(): string { - return $this->container['calculationDurationUnit']; + return $this->container['name']; } /** - * Sets calculationDurationUnit + * Sets name * - * @param \SynergiTech\Staffology\Model\HolidaySchemeDurationType|null $calculationDurationUnit calculationDurationUnit + * @param string $name Holiday scheme name * * @return $this */ - public function setCalculationDurationUnit(?\SynergiTech\Staffology\Model\HolidaySchemeDurationType $calculationDurationUnit): static + public function setName(string $name): static { - if (is_null($calculationDurationUnit)) { - throw new InvalidArgumentException('non-nullable calculationDurationUnit cannot be null'); + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['calculationDurationUnit'] = $calculationDurationUnit; + + if ((mb_strlen($name) < 1)) { + throw new InvalidArgumentException('invalid length for $name when calling ContractHolidaySchemeRequest., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; return $this; } /** - * Gets useNiPay + * Gets payCodeSetForDaysId * - * @return bool|null + * @return string|null */ - public function getUseNiPay(): ?bool + public function getPayCodeSetForDaysId(): ?string { - return $this->container['useNiPay']; + return $this->container['payCodeSetForDaysId']; } /** - * Sets useNiPay + * Sets payCodeSetForDaysId * - * @param bool|null $useNiPay If use National insurance gross taxable pay. (Default - True). + * @param string|null $payCodeSetForDaysId the Paycode set that they want to use for the Days to enable the calculation. * * @return $this */ - public function setUseNiPay(?bool $useNiPay): static + public function setPayCodeSetForDaysId(?string $payCodeSetForDaysId): static { - if (is_null($useNiPay)) { - throw new InvalidArgumentException('non-nullable useNiPay cannot be null'); + if (is_null($payCodeSetForDaysId)) { + array_push($this->openAPINullablesSetToNull, 'payCodeSetForDaysId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCodeSetForDaysId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useNiPay'] = $useNiPay; + $this->container['payCodeSetForDaysId'] = $payCodeSetForDaysId; return $this; } /** - * Gets useWorkingPattern + * Gets payCodeSetForHoursId * - * @return bool|null + * @return string|null */ - public function getUseWorkingPattern(): ?bool + public function getPayCodeSetForHoursId(): ?string { - return $this->container['useWorkingPattern']; + return $this->container['payCodeSetForHoursId']; } /** - * Sets useWorkingPattern + * Sets payCodeSetForHoursId * - * @param bool|null $useWorkingPattern If use the weekly hours or days as per their working pattern as the divisor for the average holiday rate. + * @param string|null $payCodeSetForHoursId the Paycode set that they want to use for the Hours to enable the calculation. * * @return $this */ - public function setUseWorkingPattern(?bool $useWorkingPattern): static + public function setPayCodeSetForHoursId(?string $payCodeSetForHoursId): static { - if (is_null($useWorkingPattern)) { - throw new InvalidArgumentException('non-nullable useWorkingPattern cannot be null'); + if (is_null($payCodeSetForHoursId)) { + array_push($this->openAPINullablesSetToNull, 'payCodeSetForHoursId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCodeSetForHoursId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useWorkingPattern'] = $useWorkingPattern; + $this->container['payCodeSetForHoursId'] = $payCodeSetForHoursId; return $this; } @@ -587,62 +581,109 @@ public function setPayCodeSetForPayId(?string $payCodeSetForPayId): static } /** - * Gets payCodeSetForHoursId + * Gets useFallbackRate * - * @return string|null + * @return bool|null */ - public function getPayCodeSetForHoursId(): ?string + public function getUseFallbackRate(): ?bool { - return $this->container['payCodeSetForHoursId']; + return $this->container['useFallbackRate']; } /** - * Sets payCodeSetForHoursId + * Sets useFallbackRate * - * @param string|null $payCodeSetForHoursId the Paycode set that they want to use for the Hours to enable the calculation. + * @param bool|null $useFallbackRate Indicates to use employee base hourly rate where the calculated average hourly rate is less * * @return $this */ - public function setPayCodeSetForHoursId(?string $payCodeSetForHoursId): static + public function setUseFallbackRate(?bool $useFallbackRate): static { - if (is_null($payCodeSetForHoursId)) { - array_push($this->openAPINullablesSetToNull, 'payCodeSetForHoursId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCodeSetForHoursId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useFallbackRate)) { + throw new InvalidArgumentException('non-nullable useFallbackRate cannot be null'); } - $this->container['payCodeSetForHoursId'] = $payCodeSetForHoursId; + $this->container['useFallbackRate'] = $useFallbackRate; return $this; } /** - * Gets useFallbackRate + * Gets useNiPay * * @return bool|null */ - public function getUseFallbackRate(): ?bool + public function getUseNiPay(): ?bool { - return $this->container['useFallbackRate']; + return $this->container['useNiPay']; } /** - * Sets useFallbackRate + * Sets useNiPay * - * @param bool|null $useFallbackRate Indicates to use employee base hourly rate where the calculated average hourly rate is less + * @param bool|null $useNiPay If use National insurance gross taxable pay. (Default - True). * * @return $this */ - public function setUseFallbackRate(?bool $useFallbackRate): static + public function setUseNiPay(?bool $useNiPay): static { - if (is_null($useFallbackRate)) { - throw new InvalidArgumentException('non-nullable useFallbackRate cannot be null'); + if (is_null($useNiPay)) { + throw new InvalidArgumentException('non-nullable useNiPay cannot be null'); } - $this->container['useFallbackRate'] = $useFallbackRate; + $this->container['useNiPay'] = $useNiPay; + + return $this; + } + + /** + * Gets useOnlyPaidWeeks + * + * @return bool|null + */ + public function getUseOnlyPaidWeeks(): ?bool + { + return $this->container['useOnlyPaidWeeks']; + } + + /** + * Sets useOnlyPaidWeeks + * + * @param bool|null $useOnlyPaidWeeks If to go back further than the stated no of weeks for calculation if there are weeks where the employee has not been paid. (Default- True) + * + * @return $this + */ + public function setUseOnlyPaidWeeks(?bool $useOnlyPaidWeeks): static + { + if (is_null($useOnlyPaidWeeks)) { + throw new InvalidArgumentException('non-nullable useOnlyPaidWeeks cannot be null'); + } + $this->container['useOnlyPaidWeeks'] = $useOnlyPaidWeeks; + + return $this; + } + + /** + * Gets useWorkingPattern + * + * @return bool|null + */ + public function getUseWorkingPattern(): ?bool + { + return $this->container['useWorkingPattern']; + } + + /** + * Sets useWorkingPattern + * + * @param bool|null $useWorkingPattern If use the weekly hours or days as per their working pattern as the divisor for the average holiday rate. + * + * @return $this + */ + public function setUseWorkingPattern(?bool $useWorkingPattern): static + { + if (is_null($useWorkingPattern)) { + throw new InvalidArgumentException('non-nullable useWorkingPattern cannot be null'); + } + $this->container['useWorkingPattern'] = $useWorkingPattern; return $this; } diff --git a/src/Model/ContractHolidaySchemeResponse.php b/src/Model/ContractHolidaySchemeResponse.php index 46e2961..54ae86e 100644 --- a/src/Model/ContractHolidaySchemeResponse.php +++ b/src/Model/ContractHolidaySchemeResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,17 +59,18 @@ class ContractHolidaySchemeResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'name' => 'string', 'averageCalculationWeeks' => 'int', - 'useOnlyPaidWeeks' => 'bool', - 'ignoreSxp' => 'bool', 'calculationDurationUnit' => '\SynergiTech\Staffology\Model\HolidaySchemeDurationType', - 'useNiPay' => 'bool', - 'useWorkingPattern' => 'bool', - 'payCodeSetForPayId' => 'string', + 'id' => 'string', + 'ignoreSxp' => 'bool', + 'name' => 'string', + 'payCodeSetForDaysId' => 'string', 'payCodeSetForHoursId' => 'string', - 'useFallbackRate' => 'bool' + 'payCodeSetForPayId' => 'string', + 'useFallbackRate' => 'bool', + 'useNiPay' => 'bool', + 'useOnlyPaidWeeks' => 'bool', + 'useWorkingPattern' => 'bool' ]; /** @@ -78,17 +79,18 @@ class ContractHolidaySchemeResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'name' => null, 'averageCalculationWeeks' => 'int32', - 'useOnlyPaidWeeks' => null, - 'ignoreSxp' => null, 'calculationDurationUnit' => null, - 'useNiPay' => null, - 'useWorkingPattern' => null, - 'payCodeSetForPayId' => 'uuid', + 'id' => 'uuid', + 'ignoreSxp' => null, + 'name' => null, + 'payCodeSetForDaysId' => 'uuid', 'payCodeSetForHoursId' => 'uuid', - 'useFallbackRate' => null + 'payCodeSetForPayId' => 'uuid', + 'useFallbackRate' => null, + 'useNiPay' => null, + 'useOnlyPaidWeeks' => null, + 'useWorkingPattern' => null ]; /** @@ -97,17 +99,18 @@ class ContractHolidaySchemeResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'name' => false, 'averageCalculationWeeks' => false, - 'useOnlyPaidWeeks' => false, - 'ignoreSxp' => false, 'calculationDurationUnit' => false, - 'useNiPay' => false, - 'useWorkingPattern' => false, - 'payCodeSetForPayId' => true, + 'id' => false, + 'ignoreSxp' => false, + 'name' => false, + 'payCodeSetForDaysId' => true, 'payCodeSetForHoursId' => true, - 'useFallbackRate' => false + 'payCodeSetForPayId' => true, + 'useFallbackRate' => false, + 'useNiPay' => false, + 'useOnlyPaidWeeks' => false, + 'useWorkingPattern' => false ]; /** @@ -196,17 +199,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'name' => 'name', 'averageCalculationWeeks' => 'averageCalculationWeeks', - 'useOnlyPaidWeeks' => 'useOnlyPaidWeeks', - 'ignoreSxp' => 'ignoreSxp', 'calculationDurationUnit' => 'calculationDurationUnit', - 'useNiPay' => 'useNiPay', - 'useWorkingPattern' => 'useWorkingPattern', - 'payCodeSetForPayId' => 'payCodeSetForPayId', + 'id' => 'id', + 'ignoreSxp' => 'ignoreSxp', + 'name' => 'name', + 'payCodeSetForDaysId' => 'payCodeSetForDaysId', 'payCodeSetForHoursId' => 'payCodeSetForHoursId', - 'useFallbackRate' => 'useFallbackRate' + 'payCodeSetForPayId' => 'payCodeSetForPayId', + 'useFallbackRate' => 'useFallbackRate', + 'useNiPay' => 'useNiPay', + 'useOnlyPaidWeeks' => 'useOnlyPaidWeeks', + 'useWorkingPattern' => 'useWorkingPattern' ]; /** @@ -215,17 +219,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'name' => 'setName', 'averageCalculationWeeks' => 'setAverageCalculationWeeks', - 'useOnlyPaidWeeks' => 'setUseOnlyPaidWeeks', - 'ignoreSxp' => 'setIgnoreSxp', 'calculationDurationUnit' => 'setCalculationDurationUnit', - 'useNiPay' => 'setUseNiPay', - 'useWorkingPattern' => 'setUseWorkingPattern', - 'payCodeSetForPayId' => 'setPayCodeSetForPayId', + 'id' => 'setId', + 'ignoreSxp' => 'setIgnoreSxp', + 'name' => 'setName', + 'payCodeSetForDaysId' => 'setPayCodeSetForDaysId', 'payCodeSetForHoursId' => 'setPayCodeSetForHoursId', - 'useFallbackRate' => 'setUseFallbackRate' + 'payCodeSetForPayId' => 'setPayCodeSetForPayId', + 'useFallbackRate' => 'setUseFallbackRate', + 'useNiPay' => 'setUseNiPay', + 'useOnlyPaidWeeks' => 'setUseOnlyPaidWeeks', + 'useWorkingPattern' => 'setUseWorkingPattern' ]; /** @@ -234,17 +239,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'name' => 'getName', 'averageCalculationWeeks' => 'getAverageCalculationWeeks', - 'useOnlyPaidWeeks' => 'getUseOnlyPaidWeeks', - 'ignoreSxp' => 'getIgnoreSxp', 'calculationDurationUnit' => 'getCalculationDurationUnit', - 'useNiPay' => 'getUseNiPay', - 'useWorkingPattern' => 'getUseWorkingPattern', - 'payCodeSetForPayId' => 'getPayCodeSetForPayId', + 'id' => 'getId', + 'ignoreSxp' => 'getIgnoreSxp', + 'name' => 'getName', + 'payCodeSetForDaysId' => 'getPayCodeSetForDaysId', 'payCodeSetForHoursId' => 'getPayCodeSetForHoursId', - 'useFallbackRate' => 'getUseFallbackRate' + 'payCodeSetForPayId' => 'getPayCodeSetForPayId', + 'useFallbackRate' => 'getUseFallbackRate', + 'useNiPay' => 'getUseNiPay', + 'useOnlyPaidWeeks' => 'getUseOnlyPaidWeeks', + 'useWorkingPattern' => 'getUseWorkingPattern' ]; /** @@ -303,17 +309,18 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('averageCalculationWeeks', $data ?? [], null); - $this->setIfExists('useOnlyPaidWeeks', $data ?? [], null); - $this->setIfExists('ignoreSxp', $data ?? [], null); $this->setIfExists('calculationDurationUnit', $data ?? [], null); - $this->setIfExists('useNiPay', $data ?? [], null); - $this->setIfExists('useWorkingPattern', $data ?? [], null); - $this->setIfExists('payCodeSetForPayId', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('ignoreSxp', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('payCodeSetForDaysId', $data ?? [], null); $this->setIfExists('payCodeSetForHoursId', $data ?? [], null); + $this->setIfExists('payCodeSetForPayId', $data ?? [], null); $this->setIfExists('useFallbackRate', $data ?? [], null); + $this->setIfExists('useNiPay', $data ?? [], null); + $this->setIfExists('useOnlyPaidWeeks', $data ?? [], null); + $this->setIfExists('useWorkingPattern', $data ?? [], null); } /** @@ -366,114 +373,82 @@ public function valid(): bool /** - * Gets id - * - * @return string|null - */ - public function getId(): ?string - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Holiday scheme identifier - * - * @return $this - */ - public function setId(?string $id): static - { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets name + * Gets averageCalculationWeeks * - * @return string + * @return int|null */ - public function getName(): string + public function getAverageCalculationWeeks(): ?int { - return $this->container['name']; + return $this->container['averageCalculationWeeks']; } /** - * Sets name + * Sets averageCalculationWeeks * - * @param string $name Holiday scheme name + * @param int|null $averageCalculationWeeks The number of weeks that the average holiday pay calculation is to be calculated over (Default 52) * * @return $this */ - public function setName(string $name): static + public function setAverageCalculationWeeks(?int $averageCalculationWeeks): static { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); - } - - if ((mb_strlen($name) < 1)) { - throw new InvalidArgumentException('invalid length for $name when calling ContractHolidaySchemeResponse., must be bigger than or equal to 1.'); + if (is_null($averageCalculationWeeks)) { + throw new InvalidArgumentException('non-nullable averageCalculationWeeks cannot be null'); } - - $this->container['name'] = $name; + $this->container['averageCalculationWeeks'] = $averageCalculationWeeks; return $this; } /** - * Gets averageCalculationWeeks + * Gets calculationDurationUnit * - * @return int|null + * @return \SynergiTech\Staffology\Model\HolidaySchemeDurationType|null */ - public function getAverageCalculationWeeks(): ?int + public function getCalculationDurationUnit(): ?\SynergiTech\Staffology\Model\HolidaySchemeDurationType { - return $this->container['averageCalculationWeeks']; + return $this->container['calculationDurationUnit']; } /** - * Sets averageCalculationWeeks + * Sets calculationDurationUnit * - * @param int|null $averageCalculationWeeks The number of weeks that the average holiday pay calculation is to be calculated over (Default 52) + * @param \SynergiTech\Staffology\Model\HolidaySchemeDurationType|null $calculationDurationUnit calculationDurationUnit * * @return $this */ - public function setAverageCalculationWeeks(?int $averageCalculationWeeks): static + public function setCalculationDurationUnit(?\SynergiTech\Staffology\Model\HolidaySchemeDurationType $calculationDurationUnit): static { - if (is_null($averageCalculationWeeks)) { - throw new InvalidArgumentException('non-nullable averageCalculationWeeks cannot be null'); + if (is_null($calculationDurationUnit)) { + throw new InvalidArgumentException('non-nullable calculationDurationUnit cannot be null'); } - $this->container['averageCalculationWeeks'] = $averageCalculationWeeks; + $this->container['calculationDurationUnit'] = $calculationDurationUnit; return $this; } /** - * Gets useOnlyPaidWeeks + * Gets id * - * @return bool|null + * @return string|null */ - public function getUseOnlyPaidWeeks(): ?bool + public function getId(): ?string { - return $this->container['useOnlyPaidWeeks']; + return $this->container['id']; } /** - * Sets useOnlyPaidWeeks + * Sets id * - * @param bool|null $useOnlyPaidWeeks If to go back further than the stated no of weeks for calculation if there are weeks where the employee has not been paid. (Default- True) + * @param string|null $id Holiday scheme identifier * * @return $this */ - public function setUseOnlyPaidWeeks(?bool $useOnlyPaidWeeks): static + public function setId(?string $id): static { - if (is_null($useOnlyPaidWeeks)) { - throw new InvalidArgumentException('non-nullable useOnlyPaidWeeks cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['useOnlyPaidWeeks'] = $useOnlyPaidWeeks; + $this->container['id'] = $id; return $this; } @@ -506,82 +481,101 @@ public function setIgnoreSxp(?bool $ignoreSxp): static } /** - * Gets calculationDurationUnit + * Gets name * - * @return \SynergiTech\Staffology\Model\HolidaySchemeDurationType|null + * @return string */ - public function getCalculationDurationUnit(): ?\SynergiTech\Staffology\Model\HolidaySchemeDurationType + public function getName(): string { - return $this->container['calculationDurationUnit']; + return $this->container['name']; } /** - * Sets calculationDurationUnit + * Sets name * - * @param \SynergiTech\Staffology\Model\HolidaySchemeDurationType|null $calculationDurationUnit calculationDurationUnit + * @param string $name Holiday scheme name * * @return $this */ - public function setCalculationDurationUnit(?\SynergiTech\Staffology\Model\HolidaySchemeDurationType $calculationDurationUnit): static + public function setName(string $name): static { - if (is_null($calculationDurationUnit)) { - throw new InvalidArgumentException('non-nullable calculationDurationUnit cannot be null'); + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + + if ((mb_strlen($name) < 1)) { + throw new InvalidArgumentException('invalid length for $name when calling ContractHolidaySchemeResponse., must be bigger than or equal to 1.'); } - $this->container['calculationDurationUnit'] = $calculationDurationUnit; + + $this->container['name'] = $name; return $this; } /** - * Gets useNiPay + * Gets payCodeSetForDaysId * - * @return bool|null + * @return string|null */ - public function getUseNiPay(): ?bool + public function getPayCodeSetForDaysId(): ?string { - return $this->container['useNiPay']; + return $this->container['payCodeSetForDaysId']; } /** - * Sets useNiPay + * Sets payCodeSetForDaysId * - * @param bool|null $useNiPay If use National insurance gross taxable pay. (Default - True). + * @param string|null $payCodeSetForDaysId the Paycode set that they want to use for the Days to enable the calculation. * * @return $this */ - public function setUseNiPay(?bool $useNiPay): static + public function setPayCodeSetForDaysId(?string $payCodeSetForDaysId): static { - if (is_null($useNiPay)) { - throw new InvalidArgumentException('non-nullable useNiPay cannot be null'); + if (is_null($payCodeSetForDaysId)) { + array_push($this->openAPINullablesSetToNull, 'payCodeSetForDaysId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCodeSetForDaysId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useNiPay'] = $useNiPay; + $this->container['payCodeSetForDaysId'] = $payCodeSetForDaysId; return $this; } /** - * Gets useWorkingPattern + * Gets payCodeSetForHoursId * - * @return bool|null + * @return string|null */ - public function getUseWorkingPattern(): ?bool + public function getPayCodeSetForHoursId(): ?string { - return $this->container['useWorkingPattern']; + return $this->container['payCodeSetForHoursId']; } /** - * Sets useWorkingPattern + * Sets payCodeSetForHoursId * - * @param bool|null $useWorkingPattern If use the weekly hours or days as per their working pattern as the divisor for the average holiday rate. + * @param string|null $payCodeSetForHoursId the Paycode set that they want to use for the Hours to enable the calculation. * * @return $this */ - public function setUseWorkingPattern(?bool $useWorkingPattern): static + public function setPayCodeSetForHoursId(?string $payCodeSetForHoursId): static { - if (is_null($useWorkingPattern)) { - throw new InvalidArgumentException('non-nullable useWorkingPattern cannot be null'); + if (is_null($payCodeSetForHoursId)) { + array_push($this->openAPINullablesSetToNull, 'payCodeSetForHoursId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCodeSetForHoursId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useWorkingPattern'] = $useWorkingPattern; + $this->container['payCodeSetForHoursId'] = $payCodeSetForHoursId; return $this; } @@ -621,62 +615,109 @@ public function setPayCodeSetForPayId(?string $payCodeSetForPayId): static } /** - * Gets payCodeSetForHoursId + * Gets useFallbackRate * - * @return string|null + * @return bool|null */ - public function getPayCodeSetForHoursId(): ?string + public function getUseFallbackRate(): ?bool { - return $this->container['payCodeSetForHoursId']; + return $this->container['useFallbackRate']; } /** - * Sets payCodeSetForHoursId + * Sets useFallbackRate * - * @param string|null $payCodeSetForHoursId the Paycode set that they want to use for the Hours to enable the calculation. + * @param bool|null $useFallbackRate Indicates to use employee base hourly rate where the calculated average hourly rate is less * * @return $this */ - public function setPayCodeSetForHoursId(?string $payCodeSetForHoursId): static + public function setUseFallbackRate(?bool $useFallbackRate): static { - if (is_null($payCodeSetForHoursId)) { - array_push($this->openAPINullablesSetToNull, 'payCodeSetForHoursId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCodeSetForHoursId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useFallbackRate)) { + throw new InvalidArgumentException('non-nullable useFallbackRate cannot be null'); } - $this->container['payCodeSetForHoursId'] = $payCodeSetForHoursId; + $this->container['useFallbackRate'] = $useFallbackRate; return $this; } /** - * Gets useFallbackRate + * Gets useNiPay * * @return bool|null */ - public function getUseFallbackRate(): ?bool + public function getUseNiPay(): ?bool { - return $this->container['useFallbackRate']; + return $this->container['useNiPay']; } /** - * Sets useFallbackRate + * Sets useNiPay * - * @param bool|null $useFallbackRate Indicates to use employee base hourly rate where the calculated average hourly rate is less + * @param bool|null $useNiPay If use National insurance gross taxable pay. (Default - True). * * @return $this */ - public function setUseFallbackRate(?bool $useFallbackRate): static + public function setUseNiPay(?bool $useNiPay): static { - if (is_null($useFallbackRate)) { - throw new InvalidArgumentException('non-nullable useFallbackRate cannot be null'); + if (is_null($useNiPay)) { + throw new InvalidArgumentException('non-nullable useNiPay cannot be null'); } - $this->container['useFallbackRate'] = $useFallbackRate; + $this->container['useNiPay'] = $useNiPay; + + return $this; + } + + /** + * Gets useOnlyPaidWeeks + * + * @return bool|null + */ + public function getUseOnlyPaidWeeks(): ?bool + { + return $this->container['useOnlyPaidWeeks']; + } + + /** + * Sets useOnlyPaidWeeks + * + * @param bool|null $useOnlyPaidWeeks If to go back further than the stated no of weeks for calculation if there are weeks where the employee has not been paid. (Default- True) + * + * @return $this + */ + public function setUseOnlyPaidWeeks(?bool $useOnlyPaidWeeks): static + { + if (is_null($useOnlyPaidWeeks)) { + throw new InvalidArgumentException('non-nullable useOnlyPaidWeeks cannot be null'); + } + $this->container['useOnlyPaidWeeks'] = $useOnlyPaidWeeks; + + return $this; + } + + /** + * Gets useWorkingPattern + * + * @return bool|null + */ + public function getUseWorkingPattern(): ?bool + { + return $this->container['useWorkingPattern']; + } + + /** + * Sets useWorkingPattern + * + * @param bool|null $useWorkingPattern If use the weekly hours or days as per their working pattern as the divisor for the average holiday rate. + * + * @return $this + */ + public function setUseWorkingPattern(?bool $useWorkingPattern): static + { + if (is_null($useWorkingPattern)) { + throw new InvalidArgumentException('non-nullable useWorkingPattern cannot be null'); + } + $this->container['useWorkingPattern'] = $useWorkingPattern; return $this; } diff --git a/src/Model/ContractJobErrorResponse.php b/src/Model/ContractJobErrorResponse.php index a08c948..f86f719 100644 --- a/src/Model/ContractJobErrorResponse.php +++ b/src/Model/ContractJobErrorResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class ContractJobErrorResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'jobId' => 'string', + 'createdDate' => '\DateTime', 'errorMessage' => 'string', 'errorType' => 'string', - 'createdDate' => '\DateTime' + 'id' => 'string', + 'jobId' => 'string' ]; /** @@ -72,11 +72,11 @@ class ContractJobErrorResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'jobId' => 'uuid', + 'createdDate' => 'date', 'errorMessage' => null, 'errorType' => null, - 'createdDate' => 'date' + 'id' => 'uuid', + 'jobId' => 'uuid' ]; /** @@ -85,11 +85,11 @@ class ContractJobErrorResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'jobId' => false, + 'createdDate' => false, 'errorMessage' => true, 'errorType' => true, - 'createdDate' => false + 'id' => false, + 'jobId' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'jobId' => 'jobId', + 'createdDate' => 'createdDate', 'errorMessage' => 'errorMessage', 'errorType' => 'errorType', - 'createdDate' => 'createdDate' + 'id' => 'id', + 'jobId' => 'jobId' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'jobId' => 'setJobId', + 'createdDate' => 'setCreatedDate', 'errorMessage' => 'setErrorMessage', 'errorType' => 'setErrorType', - 'createdDate' => 'setCreatedDate' + 'id' => 'setId', + 'jobId' => 'setJobId' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'jobId' => 'getJobId', + 'createdDate' => 'getCreatedDate', 'errorMessage' => 'getErrorMessage', 'errorType' => 'getErrorType', - 'createdDate' => 'getCreatedDate' + 'id' => 'getId', + 'jobId' => 'getJobId' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('jobId', $data ?? [], null); + $this->setIfExists('createdDate', $data ?? [], null); $this->setIfExists('errorMessage', $data ?? [], null); $this->setIfExists('errorType', $data ?? [], null); - $this->setIfExists('createdDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('jobId', $data ?? [], null); } /** @@ -317,55 +317,28 @@ public function valid(): bool /** - * Gets id - * - * @return string|null - */ - public function getId(): ?string - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id The unique identifier of the job error. - * - * @return $this - */ - public function setId(?string $id): static - { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets jobId + * Gets createdDate * - * @return string|null + * @return \DateTime|null */ - public function getJobId(): ?string + public function getCreatedDate(): ?\DateTime { - return $this->container['jobId']; + return $this->container['createdDate']; } /** - * Sets jobId + * Sets createdDate * - * @param string|null $jobId Job public Id + * @param \DateTime|null $createdDate Date the job error was created * * @return $this */ - public function setJobId(?string $jobId): static + public function setCreatedDate(?\DateTime $createdDate): static { - if (is_null($jobId)) { - throw new InvalidArgumentException('non-nullable jobId cannot be null'); + if (is_null($createdDate)) { + throw new InvalidArgumentException('non-nullable createdDate cannot be null'); } - $this->container['jobId'] = $jobId; + $this->container['createdDate'] = $createdDate; return $this; } @@ -439,28 +412,55 @@ public function setErrorType(?string $errorType): static } /** - * Gets createdDate + * Gets id * - * @return \DateTime|null + * @return string|null */ - public function getCreatedDate(): ?\DateTime + public function getId(): ?string { - return $this->container['createdDate']; + return $this->container['id']; } /** - * Sets createdDate + * Sets id * - * @param \DateTime|null $createdDate Date the job error was created + * @param string|null $id The unique identifier of the job error. * * @return $this */ - public function setCreatedDate(?\DateTime $createdDate): static + public function setId(?string $id): static { - if (is_null($createdDate)) { - throw new InvalidArgumentException('non-nullable createdDate cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['createdDate'] = $createdDate; + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets jobId + * + * @return string|null + */ + public function getJobId(): ?string + { + return $this->container['jobId']; + } + + /** + * Sets jobId + * + * @param string|null $jobId Job public Id + * + * @return $this + */ + public function setJobId(?string $jobId): static + { + if (is_null($jobId)) { + throw new InvalidArgumentException('non-nullable jobId cannot be null'); + } + $this->container['jobId'] = $jobId; return $this; } diff --git a/src/Model/ContractJobResponse.php b/src/Model/ContractJobResponse.php index 792ca31..af54037 100644 --- a/src/Model/ContractJobResponse.php +++ b/src/Model/ContractJobResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,20 +59,20 @@ class ContractJobResponse implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', + 'createdDate' => '\DateTime', 'employerId' => 'string', 'employerName' => 'string', - 'type' => '\SynergiTech\Staffology\Model\JobType', + 'executionStartTime' => '\DateTime', + 'executionTime' => 'int', + 'id' => 'string', 'name' => 'string', 'outputFormat' => 'string', + 'requestedByName' => 'string', + 'result' => '\SynergiTech\Staffology\Model\ContractJobResultResponse', 'status' => '\SynergiTech\Staffology\Model\JobStatus', - 'executionStartTime' => '\DateTime', 'timeInQueue' => 'int', - 'executionTime' => 'int', - 'result' => '\SynergiTech\Staffology\Model\ContractJobResultResponse', - 'createdDate' => '\DateTime', - 'updatedDate' => '\DateTime', - 'requestedByName' => 'string' + 'type' => '\SynergiTech\Staffology\Model\JobType', + 'updatedDate' => '\DateTime' ]; /** @@ -81,20 +81,20 @@ class ContractJobResponse implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', + 'createdDate' => 'date', 'employerId' => 'uuid', 'employerName' => null, - 'type' => null, + 'executionStartTime' => 'date', + 'executionTime' => 'int32', + 'id' => 'uuid', 'name' => null, 'outputFormat' => null, + 'requestedByName' => null, + 'result' => null, 'status' => null, - 'executionStartTime' => 'date', 'timeInQueue' => 'int32', - 'executionTime' => 'int32', - 'result' => null, - 'createdDate' => 'date', - 'updatedDate' => 'date', - 'requestedByName' => null + 'type' => null, + 'updatedDate' => 'date' ]; /** @@ -103,20 +103,20 @@ class ContractJobResponse implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPINullables = [ - 'id' => false, + 'createdDate' => false, 'employerId' => false, 'employerName' => true, - 'type' => false, + 'executionStartTime' => true, + 'executionTime' => true, + 'id' => false, 'name' => true, 'outputFormat' => true, + 'requestedByName' => true, + 'result' => false, 'status' => false, - 'executionStartTime' => true, 'timeInQueue' => true, - 'executionTime' => true, - 'result' => false, - 'createdDate' => false, - 'updatedDate' => true, - 'requestedByName' => true + 'type' => false, + 'updatedDate' => true ]; /** @@ -205,20 +205,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', + 'createdDate' => 'createdDate', 'employerId' => 'employerId', 'employerName' => 'employerName', - 'type' => 'type', + 'executionStartTime' => 'executionStartTime', + 'executionTime' => 'executionTime', + 'id' => 'id', 'name' => 'name', 'outputFormat' => 'outputFormat', + 'requestedByName' => 'requestedByName', + 'result' => 'result', 'status' => 'status', - 'executionStartTime' => 'executionStartTime', 'timeInQueue' => 'timeInQueue', - 'executionTime' => 'executionTime', - 'result' => 'result', - 'createdDate' => 'createdDate', - 'updatedDate' => 'updatedDate', - 'requestedByName' => 'requestedByName' + 'type' => 'type', + 'updatedDate' => 'updatedDate' ]; /** @@ -227,20 +227,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', + 'createdDate' => 'setCreatedDate', 'employerId' => 'setEmployerId', 'employerName' => 'setEmployerName', - 'type' => 'setType', + 'executionStartTime' => 'setExecutionStartTime', + 'executionTime' => 'setExecutionTime', + 'id' => 'setId', 'name' => 'setName', 'outputFormat' => 'setOutputFormat', + 'requestedByName' => 'setRequestedByName', + 'result' => 'setResult', 'status' => 'setStatus', - 'executionStartTime' => 'setExecutionStartTime', 'timeInQueue' => 'setTimeInQueue', - 'executionTime' => 'setExecutionTime', - 'result' => 'setResult', - 'createdDate' => 'setCreatedDate', - 'updatedDate' => 'setUpdatedDate', - 'requestedByName' => 'setRequestedByName' + 'type' => 'setType', + 'updatedDate' => 'setUpdatedDate' ]; /** @@ -249,20 +249,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', + 'createdDate' => 'getCreatedDate', 'employerId' => 'getEmployerId', 'employerName' => 'getEmployerName', - 'type' => 'getType', + 'executionStartTime' => 'getExecutionStartTime', + 'executionTime' => 'getExecutionTime', + 'id' => 'getId', 'name' => 'getName', 'outputFormat' => 'getOutputFormat', + 'requestedByName' => 'getRequestedByName', + 'result' => 'getResult', 'status' => 'getStatus', - 'executionStartTime' => 'getExecutionStartTime', 'timeInQueue' => 'getTimeInQueue', - 'executionTime' => 'getExecutionTime', - 'result' => 'getResult', - 'createdDate' => 'getCreatedDate', - 'updatedDate' => 'getUpdatedDate', - 'requestedByName' => 'getRequestedByName' + 'type' => 'getType', + 'updatedDate' => 'getUpdatedDate' ]; /** @@ -321,20 +321,20 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('createdDate', $data ?? [], null); $this->setIfExists('employerId', $data ?? [], null); $this->setIfExists('employerName', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('executionStartTime', $data ?? [], null); + $this->setIfExists('executionTime', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('outputFormat', $data ?? [], null); + $this->setIfExists('requestedByName', $data ?? [], null); + $this->setIfExists('result', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); - $this->setIfExists('executionStartTime', $data ?? [], null); $this->setIfExists('timeInQueue', $data ?? [], null); - $this->setIfExists('executionTime', $data ?? [], null); - $this->setIfExists('result', $data ?? [], null); - $this->setIfExists('createdDate', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('updatedDate', $data ?? [], null); - $this->setIfExists('requestedByName', $data ?? [], null); } /** @@ -380,28 +380,28 @@ public function valid(): bool /** - * Gets id + * Gets createdDate * - * @return string|null + * @return \DateTime|null */ - public function getId(): ?string + public function getCreatedDate(): ?\DateTime { - return $this->container['id']; + return $this->container['createdDate']; } /** - * Sets id + * Sets createdDate * - * @param string|null $id Job public Id. + * @param \DateTime|null $createdDate Job Created date. * * @return $this */ - public function setId(?string $id): static + public function setCreatedDate(?\DateTime $createdDate): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($createdDate)) { + throw new InvalidArgumentException('non-nullable createdDate cannot be null'); } - $this->container['id'] = $id; + $this->container['createdDate'] = $createdDate; return $this; } @@ -468,225 +468,198 @@ public function setEmployerName(?string $employerName): static } /** - * Gets type - * - * @return \SynergiTech\Staffology\Model\JobType|null - */ - public function getType(): ?\SynergiTech\Staffology\Model\JobType - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \SynergiTech\Staffology\Model\JobType|null $type type - * - * @return $this - */ - public function setType(?\SynergiTech\Staffology\Model\JobType $type): static - { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets name + * Gets executionStartTime * - * @return string|null + * @return \DateTime|null */ - public function getName(): ?string + public function getExecutionStartTime(): ?\DateTime { - return $this->container['name']; + return $this->container['executionStartTime']; } /** - * Sets name + * Sets executionStartTime * - * @param string|null $name The Job name, e.g. uploaded file for Import, or report display name for Report + * @param \DateTime|null $executionStartTime The Job excution start time. * * @return $this */ - public function setName(?string $name): static + public function setExecutionStartTime(?\DateTime $executionStartTime): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($executionStartTime)) { + array_push($this->openAPINullablesSetToNull, 'executionStartTime'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('executionStartTime', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['executionStartTime'] = $executionStartTime; return $this; } /** - * Gets outputFormat + * Gets executionTime * - * @return string|null + * @return int|null */ - public function getOutputFormat(): ?string + public function getExecutionTime(): ?int { - return $this->container['outputFormat']; + return $this->container['executionTime']; } /** - * Sets outputFormat + * Sets executionTime * - * @param string|null $outputFormat The Job output format, e.g. json/csv/pdf for Report, or something else for other Job types. + * @param int|null $executionTime The time it took the Job to execute in seconds. * * @return $this */ - public function setOutputFormat(?string $outputFormat): static + public function setExecutionTime(?int $executionTime): static { - if (is_null($outputFormat)) { - array_push($this->openAPINullablesSetToNull, 'outputFormat'); + if (is_null($executionTime)) { + array_push($this->openAPINullablesSetToNull, 'executionTime'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('outputFormat', $nullablesSetToNull); + $index = array_search('executionTime', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['outputFormat'] = $outputFormat; + $this->container['executionTime'] = $executionTime; return $this; } /** - * Gets status + * Gets id * - * @return \SynergiTech\Staffology\Model\JobStatus|null + * @return string|null */ - public function getStatus(): ?\SynergiTech\Staffology\Model\JobStatus + public function getId(): ?string { - return $this->container['status']; + return $this->container['id']; } /** - * Sets status + * Sets id * - * @param \SynergiTech\Staffology\Model\JobStatus|null $status status + * @param string|null $id Job public Id. * * @return $this */ - public function setStatus(?\SynergiTech\Staffology\Model\JobStatus $status): static + public function setId(?string $id): static { - if (is_null($status)) { - throw new InvalidArgumentException('non-nullable status cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['status'] = $status; + $this->container['id'] = $id; return $this; } /** - * Gets executionStartTime + * Gets name * - * @return \DateTime|null + * @return string|null */ - public function getExecutionStartTime(): ?\DateTime + public function getName(): ?string { - return $this->container['executionStartTime']; + return $this->container['name']; } /** - * Sets executionStartTime + * Sets name * - * @param \DateTime|null $executionStartTime The Job excution start time. + * @param string|null $name The Job name, e.g. uploaded file for Import, or report display name for Report * * @return $this */ - public function setExecutionStartTime(?\DateTime $executionStartTime): static + public function setName(?string $name): static { - if (is_null($executionStartTime)) { - array_push($this->openAPINullablesSetToNull, 'executionStartTime'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('executionStartTime', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['executionStartTime'] = $executionStartTime; + $this->container['name'] = $name; return $this; } /** - * Gets timeInQueue + * Gets outputFormat * - * @return int|null + * @return string|null */ - public function getTimeInQueue(): ?int + public function getOutputFormat(): ?string { - return $this->container['timeInQueue']; + return $this->container['outputFormat']; } /** - * Sets timeInQueue + * Sets outputFormat * - * @param int|null $timeInQueue The time the Job spent in the queue before execution in seconds. + * @param string|null $outputFormat The Job output format, e.g. json/csv/pdf for Report, or something else for other Job types. * * @return $this */ - public function setTimeInQueue(?int $timeInQueue): static + public function setOutputFormat(?string $outputFormat): static { - if (is_null($timeInQueue)) { - array_push($this->openAPINullablesSetToNull, 'timeInQueue'); + if (is_null($outputFormat)) { + array_push($this->openAPINullablesSetToNull, 'outputFormat'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('timeInQueue', $nullablesSetToNull); + $index = array_search('outputFormat', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['timeInQueue'] = $timeInQueue; + $this->container['outputFormat'] = $outputFormat; return $this; } /** - * Gets executionTime + * Gets requestedByName * - * @return int|null + * @return string|null */ - public function getExecutionTime(): ?int + public function getRequestedByName(): ?string { - return $this->container['executionTime']; + return $this->container['requestedByName']; } /** - * Sets executionTime + * Sets requestedByName * - * @param int|null $executionTime The time it took the Job to execute in seconds. + * @param string|null $requestedByName The name of the user that requested this job * * @return $this */ - public function setExecutionTime(?int $executionTime): static + public function setRequestedByName(?string $requestedByName): static { - if (is_null($executionTime)) { - array_push($this->openAPINullablesSetToNull, 'executionTime'); + if (is_null($requestedByName)) { + array_push($this->openAPINullablesSetToNull, 'requestedByName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('executionTime', $nullablesSetToNull); + $index = array_search('requestedByName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['executionTime'] = $executionTime; + $this->container['requestedByName'] = $requestedByName; return $this; } @@ -719,96 +692,123 @@ public function setResult(?\SynergiTech\Staffology\Model\ContractJobResultRespon } /** - * Gets createdDate + * Gets status * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\JobStatus|null */ - public function getCreatedDate(): ?\DateTime + public function getStatus(): ?\SynergiTech\Staffology\Model\JobStatus { - return $this->container['createdDate']; + return $this->container['status']; } /** - * Sets createdDate + * Sets status * - * @param \DateTime|null $createdDate Job Created date. + * @param \SynergiTech\Staffology\Model\JobStatus|null $status status * * @return $this */ - public function setCreatedDate(?\DateTime $createdDate): static + public function setStatus(?\SynergiTech\Staffology\Model\JobStatus $status): static { - if (is_null($createdDate)) { - throw new InvalidArgumentException('non-nullable createdDate cannot be null'); + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['createdDate'] = $createdDate; + $this->container['status'] = $status; return $this; } /** - * Gets updatedDate + * Gets timeInQueue * - * @return \DateTime|null + * @return int|null */ - public function getUpdatedDate(): ?\DateTime + public function getTimeInQueue(): ?int { - return $this->container['updatedDate']; + return $this->container['timeInQueue']; } /** - * Sets updatedDate + * Sets timeInQueue * - * @param \DateTime|null $updatedDate Job Updated date where applicable. + * @param int|null $timeInQueue The time the Job spent in the queue before execution in seconds. * * @return $this */ - public function setUpdatedDate(?\DateTime $updatedDate): static + public function setTimeInQueue(?int $timeInQueue): static { - if (is_null($updatedDate)) { - array_push($this->openAPINullablesSetToNull, 'updatedDate'); + if (is_null($timeInQueue)) { + array_push($this->openAPINullablesSetToNull, 'timeInQueue'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('updatedDate', $nullablesSetToNull); + $index = array_search('timeInQueue', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['updatedDate'] = $updatedDate; + $this->container['timeInQueue'] = $timeInQueue; return $this; } /** - * Gets requestedByName + * Gets type * - * @return string|null + * @return \SynergiTech\Staffology\Model\JobType|null */ - public function getRequestedByName(): ?string + public function getType(): ?\SynergiTech\Staffology\Model\JobType { - return $this->container['requestedByName']; + return $this->container['type']; } /** - * Sets requestedByName + * Sets type * - * @param string|null $requestedByName The name of the user that requested this job + * @param \SynergiTech\Staffology\Model\JobType|null $type type * * @return $this */ - public function setRequestedByName(?string $requestedByName): static + public function setType(?\SynergiTech\Staffology\Model\JobType $type): static { - if (is_null($requestedByName)) { - array_push($this->openAPINullablesSetToNull, 'requestedByName'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets updatedDate + * + * @return \DateTime|null + */ + public function getUpdatedDate(): ?\DateTime + { + return $this->container['updatedDate']; + } + + /** + * Sets updatedDate + * + * @param \DateTime|null $updatedDate Job Updated date where applicable. + * + * @return $this + */ + public function setUpdatedDate(?\DateTime $updatedDate): static + { + if (is_null($updatedDate)) { + array_push($this->openAPINullablesSetToNull, 'updatedDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('requestedByName', $nullablesSetToNull); + $index = array_search('updatedDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['requestedByName'] = $requestedByName; + $this->container['updatedDate'] = $updatedDate; return $this; } diff --git a/src/Model/ContractJobResultFileResponse.php b/src/Model/ContractJobResultFileResponse.php index d2cc2f8..4f7b86f 100644 --- a/src/Model/ContractJobResultFileResponse.php +++ b/src/Model/ContractJobResultFileResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractJobResultResponse.php b/src/Model/ContractJobResultResponse.php index e9afa99..02b4d46 100644 --- a/src/Model/ContractJobResultResponse.php +++ b/src/Model/ContractJobResultResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractJobResultResponse implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPITypes = [ + 'errors' => 'string[]', 'file' => '\SynergiTech\Staffology\Model\ContractJobResultFileResponse', - 'metadata' => 'array', - 'errors' => 'string[]' + 'metadata' => 'array' ]; /** @@ -70,9 +70,9 @@ class ContractJobResultResponse implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPIFormats = [ + 'errors' => null, 'file' => null, - 'metadata' => null, - 'errors' => null + 'metadata' => null ]; /** @@ -81,9 +81,9 @@ class ContractJobResultResponse implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPINullables = [ + 'errors' => true, 'file' => false, - 'metadata' => true, - 'errors' => true + 'metadata' => true ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'errors' => 'errors', 'file' => 'file', - 'metadata' => 'metadata', - 'errors' => 'errors' + 'metadata' => 'metadata' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'errors' => 'setErrors', 'file' => 'setFile', - 'metadata' => 'setMetadata', - 'errors' => 'setErrors' + 'metadata' => 'setMetadata' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'errors' => 'getErrors', 'file' => 'getFile', - 'metadata' => 'getMetadata', - 'errors' => 'getErrors' + 'metadata' => 'getMetadata' ]; /** @@ -255,9 +255,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('file', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); } /** @@ -302,6 +302,40 @@ public function valid(): bool } + /** + * Gets errors + * + * @return string[]|null + */ + public function getErrors(): ?array + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param string[]|null $errors Job execution's errors. + * + * @return $this + */ + public function setErrors(?array $errors): static + { + if (is_null($errors)) { + array_push($this->openAPINullablesSetToNull, 'errors'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('errors', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['errors'] = $errors; + + return $this; + } + /** * Gets file * @@ -362,40 +396,6 @@ public function setMetadata(?array $metadata): static return $this; } - - /** - * Gets errors - * - * @return string[]|null - */ - public function getErrors(): ?array - { - return $this->container['errors']; - } - - /** - * Sets errors - * - * @param string[]|null $errors Job execution's errors. - * - * @return $this - */ - public function setErrors(?array $errors): static - { - if (is_null($errors)) { - array_push($this->openAPINullablesSetToNull, 'errors'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('errors', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['errors'] = $errors; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractJournalTemplateRequest.php b/src/Model/ContractJournalTemplateRequest.php index 738786c..aecfe23 100644 --- a/src/Model/ContractJournalTemplateRequest.php +++ b/src/Model/ContractJournalTemplateRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class ContractJournalTemplateRequest implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPITypes = [ - 'header' => 'string', 'content' => 'string', + 'header' => 'string', 'useColumnHeaders' => 'bool' ]; @@ -70,8 +70,8 @@ class ContractJournalTemplateRequest implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPIFormats = [ - 'header' => null, 'content' => null, + 'header' => null, 'useColumnHeaders' => null ]; @@ -81,8 +81,8 @@ class ContractJournalTemplateRequest implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPINullables = [ - 'header' => true, 'content' => true, + 'header' => true, 'useColumnHeaders' => false ]; @@ -172,8 +172,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'header' => 'header', 'content' => 'content', + 'header' => 'header', 'useColumnHeaders' => 'useColumnHeaders' ]; @@ -183,8 +183,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'header' => 'setHeader', 'content' => 'setContent', + 'header' => 'setHeader', 'useColumnHeaders' => 'setUseColumnHeaders' ]; @@ -194,8 +194,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'header' => 'getHeader', 'content' => 'getContent', + 'header' => 'getHeader', 'useColumnHeaders' => 'getUseColumnHeaders' ]; @@ -255,8 +255,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('header', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('header', $data ?? [], null); $this->setIfExists('useColumnHeaders', $data ?? [], null); } @@ -303,69 +303,69 @@ public function valid(): bool /** - * Gets header + * Gets content * * @return string|null */ - public function getHeader(): ?string + public function getContent(): ?string { - return $this->container['header']; + return $this->container['content']; } /** - * Sets header + * Sets content * - * @param string|null $header Header of Journal Template + * @param string|null $content Content of Journal Template * * @return $this */ - public function setHeader(?string $header): static + public function setContent(?string $content): static { - if (is_null($header)) { - array_push($this->openAPINullablesSetToNull, 'header'); + if (is_null($content)) { + array_push($this->openAPINullablesSetToNull, 'content'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('header', $nullablesSetToNull); + $index = array_search('content', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['header'] = $header; + $this->container['content'] = $content; return $this; } /** - * Gets content + * Gets header * * @return string|null */ - public function getContent(): ?string + public function getHeader(): ?string { - return $this->container['content']; + return $this->container['header']; } /** - * Sets content + * Sets header * - * @param string|null $content Content of Journal Template + * @param string|null $header Header of Journal Template * * @return $this */ - public function setContent(?string $content): static + public function setHeader(?string $header): static { - if (is_null($content)) { - array_push($this->openAPINullablesSetToNull, 'content'); + if (is_null($header)) { + array_push($this->openAPINullablesSetToNull, 'header'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('content', $nullablesSetToNull); + $index = array_search('header', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['content'] = $content; + $this->container['header'] = $header; return $this; } diff --git a/src/Model/ContractJournalTemplateResponse.php b/src/Model/ContractJournalTemplateResponse.php index 12ebe9a..0ed0f3d 100644 --- a/src/Model/ContractJournalTemplateResponse.php +++ b/src/Model/ContractJournalTemplateResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractJournalTemplateResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ - 'uniqueId' => 'string', - 'header' => 'string', 'content' => 'string', + 'header' => 'string', + 'uniqueId' => 'string', 'useColumnHeaders' => 'bool' ]; @@ -71,9 +71,9 @@ class ContractJournalTemplateResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ - 'uniqueId' => 'uuid', - 'header' => null, 'content' => null, + 'header' => null, + 'uniqueId' => 'uuid', 'useColumnHeaders' => null ]; @@ -83,9 +83,9 @@ class ContractJournalTemplateResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ - 'uniqueId' => false, - 'header' => true, 'content' => true, + 'header' => true, + 'uniqueId' => false, 'useColumnHeaders' => false ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'uniqueId' => 'uniqueId', - 'header' => 'header', 'content' => 'content', + 'header' => 'header', + 'uniqueId' => 'uniqueId', 'useColumnHeaders' => 'useColumnHeaders' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'uniqueId' => 'setUniqueId', - 'header' => 'setHeader', 'content' => 'setContent', + 'header' => 'setHeader', + 'uniqueId' => 'setUniqueId', 'useColumnHeaders' => 'setUseColumnHeaders' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'uniqueId' => 'getUniqueId', - 'header' => 'getHeader', 'content' => 'getContent', + 'header' => 'getHeader', + 'uniqueId' => 'getUniqueId', 'useColumnHeaders' => 'getUseColumnHeaders' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('uniqueId', $data ?? [], null); - $this->setIfExists('header', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('header', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); $this->setIfExists('useColumnHeaders', $data ?? [], null); } @@ -310,28 +310,35 @@ public function valid(): bool /** - * Gets uniqueId + * Gets content * * @return string|null */ - public function getUniqueId(): ?string + public function getContent(): ?string { - return $this->container['uniqueId']; + return $this->container['content']; } /** - * Sets uniqueId + * Sets content * - * @param string|null $uniqueId Journal Template identifier + * @param string|null $content Content of Journal Template * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setContent(?string $content): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($content)) { + array_push($this->openAPINullablesSetToNull, 'content'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('content', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['uniqueId'] = $uniqueId; + $this->container['content'] = $content; return $this; } @@ -371,35 +378,28 @@ public function setHeader(?string $header): static } /** - * Gets content + * Gets uniqueId * * @return string|null */ - public function getContent(): ?string + public function getUniqueId(): ?string { - return $this->container['content']; + return $this->container['uniqueId']; } /** - * Sets content + * Sets uniqueId * - * @param string|null $content Content of Journal Template + * @param string|null $uniqueId Journal Template identifier * * @return $this */ - public function setContent(?string $content): static + public function setUniqueId(?string $uniqueId): static { - if (is_null($content)) { - array_push($this->openAPINullablesSetToNull, 'content'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('content', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); } - $this->container['content'] = $content; + $this->container['uniqueId'] = $uniqueId; return $this; } diff --git a/src/Model/ContractJournalTokenRequest.php b/src/Model/ContractJournalTokenRequest.php index a853748..340916b 100644 --- a/src/Model/ContractJournalTokenRequest.php +++ b/src/Model/ContractJournalTokenRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractJournalTokenRequest implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPITypes = [ - 'type' => '\SynergiTech\Staffology\Model\JournalTokenType', + 'description' => 'string', 'name' => 'string', - 'description' => 'string' + 'type' => '\SynergiTech\Staffology\Model\JournalTokenType' ]; /** @@ -70,9 +70,9 @@ class ContractJournalTokenRequest implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPIFormats = [ - 'type' => null, + 'description' => null, 'name' => null, - 'description' => null + 'type' => null ]; /** @@ -81,9 +81,9 @@ class ContractJournalTokenRequest implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPINullables = [ - 'type' => false, + 'description' => true, 'name' => true, - 'description' => true + 'type' => false ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', + 'description' => 'description', 'name' => 'name', - 'description' => 'description' + 'type' => 'type' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', + 'description' => 'setDescription', 'name' => 'setName', - 'description' => 'setDescription' + 'type' => 'setType' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', + 'description' => 'getDescription', 'name' => 'getName', - 'description' => 'getDescription' + 'type' => 'getType' ]; /** @@ -255,9 +255,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -303,28 +303,35 @@ public function valid(): bool /** - * Gets type + * Gets description * - * @return \SynergiTech\Staffology\Model\JournalTokenType|null + * @return string|null */ - public function getType(): ?\SynergiTech\Staffology\Model\JournalTokenType + public function getDescription(): ?string { - return $this->container['type']; + return $this->container['description']; } /** - * Sets type + * Sets description * - * @param \SynergiTech\Staffology\Model\JournalTokenType|null $type type + * @param string|null $description Description of Journal Tokens * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\JournalTokenType $type): static + public function setDescription(?string $description): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('description', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['type'] = $type; + $this->container['description'] = $description; return $this; } @@ -364,35 +371,28 @@ public function setName(?string $name): static } /** - * Gets description + * Gets type * - * @return string|null + * @return \SynergiTech\Staffology\Model\JournalTokenType|null */ - public function getDescription(): ?string + public function getType(): ?\SynergiTech\Staffology\Model\JournalTokenType { - return $this->container['description']; + return $this->container['type']; } /** - * Sets description + * Sets type * - * @param string|null $description Description of Journal Tokens + * @param \SynergiTech\Staffology\Model\JournalTokenType|null $type type * * @return $this */ - public function setDescription(?string $description): static + public function setType(?\SynergiTech\Staffology\Model\JournalTokenType $type): static { - if (is_null($description)) { - array_push($this->openAPINullablesSetToNull, 'description'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('description', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['description'] = $description; + $this->container['type'] = $type; return $this; } diff --git a/src/Model/ContractJournalTokenResponse.php b/src/Model/ContractJournalTokenResponse.php index 802b477..81e2bbd 100644 --- a/src/Model/ContractJournalTokenResponse.php +++ b/src/Model/ContractJournalTokenResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractJournalTokenResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'uniqueId' => 'string', - 'type' => '\SynergiTech\Staffology\Model\JournalTokenType', + 'description' => 'string', 'name' => 'string', - 'description' => 'string' + 'type' => '\SynergiTech\Staffology\Model\JournalTokenType', + 'uniqueId' => 'string' ]; /** @@ -71,10 +71,10 @@ class ContractJournalTokenResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'uniqueId' => 'uuid', - 'type' => null, + 'description' => null, 'name' => null, - 'description' => null + 'type' => null, + 'uniqueId' => 'uuid' ]; /** @@ -83,10 +83,10 @@ class ContractJournalTokenResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'uniqueId' => false, - 'type' => false, + 'description' => true, 'name' => true, - 'description' => true + 'type' => false, + 'uniqueId' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'uniqueId' => 'uniqueId', - 'type' => 'type', + 'description' => 'description', 'name' => 'name', - 'description' => 'description' + 'type' => 'type', + 'uniqueId' => 'uniqueId' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'uniqueId' => 'setUniqueId', - 'type' => 'setType', + 'description' => 'setDescription', 'name' => 'setName', - 'description' => 'setDescription' + 'type' => 'setType', + 'uniqueId' => 'setUniqueId' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'uniqueId' => 'getUniqueId', - 'type' => 'getType', + 'description' => 'getDescription', 'name' => 'getName', - 'description' => 'getDescription' + 'type' => 'getType', + 'uniqueId' => 'getUniqueId' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('uniqueId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); } /** @@ -310,55 +310,35 @@ public function valid(): bool /** - * Gets uniqueId + * Gets description * * @return string|null */ - public function getUniqueId(): ?string - { - return $this->container['uniqueId']; - } - - /** - * Sets uniqueId - * - * @param string|null $uniqueId Journal Token identifier - * - * @return $this - */ - public function setUniqueId(?string $uniqueId): static - { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); - } - $this->container['uniqueId'] = $uniqueId; - - return $this; - } - - /** - * Gets type - * - * @return \SynergiTech\Staffology\Model\JournalTokenType|null - */ - public function getType(): ?\SynergiTech\Staffology\Model\JournalTokenType + public function getDescription(): ?string { - return $this->container['type']; + return $this->container['description']; } /** - * Sets type + * Sets description * - * @param \SynergiTech\Staffology\Model\JournalTokenType|null $type type + * @param string|null $description Description of Journal Tokens * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\JournalTokenType $type): static + public function setDescription(?string $description): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('description', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['type'] = $type; + $this->container['description'] = $description; return $this; } @@ -398,35 +378,55 @@ public function setName(?string $name): static } /** - * Gets description + * Gets type + * + * @return \SynergiTech\Staffology\Model\JournalTokenType|null + */ + public function getType(): ?\SynergiTech\Staffology\Model\JournalTokenType + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \SynergiTech\Staffology\Model\JournalTokenType|null $type type + * + * @return $this + */ + public function setType(?\SynergiTech\Staffology\Model\JournalTokenType $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets uniqueId * * @return string|null */ - public function getDescription(): ?string + public function getUniqueId(): ?string { - return $this->container['description']; + return $this->container['uniqueId']; } /** - * Sets description + * Sets uniqueId * - * @param string|null $description Description of Journal Tokens + * @param string|null $uniqueId Journal Token identifier * * @return $this */ - public function setDescription(?string $description): static + public function setUniqueId(?string $uniqueId): static { - if (is_null($description)) { - array_push($this->openAPINullablesSetToNull, 'description'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('description', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); } - $this->container['description'] = $description; + $this->container['uniqueId'] = $uniqueId; return $this; } diff --git a/src/Model/ContractJournalTokenResponseItem.php b/src/Model/ContractJournalTokenResponseItem.php index e59ac2c..9a4c67f 100644 --- a/src/Model/ContractJournalTokenResponseItem.php +++ b/src/Model/ContractJournalTokenResponseItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class ContractJournalTokenResponseItem implements ModelInterface, ArrayAccess, J */ protected static array $openAPITypes = [ 'id' => 'string', - 'name' => 'string', 'metadata' => 'mixed', + 'name' => 'string', 'url' => 'string' ]; @@ -72,8 +72,8 @@ class ContractJournalTokenResponseItem implements ModelInterface, ArrayAccess, J */ protected static array $openAPIFormats = [ 'id' => 'uuid', - 'name' => null, 'metadata' => null, + 'name' => null, 'url' => null ]; @@ -84,8 +84,8 @@ class ContractJournalTokenResponseItem implements ModelInterface, ArrayAccess, J */ protected static array $openAPINullables = [ 'id' => false, - 'name' => true, 'metadata' => true, + 'name' => true, 'url' => true ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'id' => 'id', - 'name' => 'name', 'metadata' => 'metadata', + 'name' => 'name', 'url' => 'url' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'id' => 'setId', - 'name' => 'setName', 'metadata' => 'setMetadata', + 'name' => 'setName', 'url' => 'setUrl' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'id' => 'getId', - 'name' => 'getName', 'metadata' => 'getMetadata', + 'name' => 'getName', 'url' => 'getUrl' ]; @@ -262,8 +262,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); } @@ -337,69 +337,69 @@ public function setId(?string $id): static } /** - * Gets name + * Gets metadata * - * @return string|null + * @return mixed|null */ - public function getName(): ?string + public function getMetadata(): mixed { - return $this->container['name']; + return $this->container['metadata']; } /** - * Sets name + * Sets metadata * - * @param string|null $name name + * @param mixed|null $metadata metadata * * @return $this */ - public function setName(?string $name): static + public function setMetadata(mixed $metadata): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($metadata)) { + array_push($this->openAPINullablesSetToNull, 'metadata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('metadata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['metadata'] = $metadata; return $this; } /** - * Gets metadata + * Gets name * - * @return mixed|null + * @return string|null */ - public function getMetadata(): mixed + public function getName(): ?string { - return $this->container['metadata']; + return $this->container['name']; } /** - * Sets metadata + * Sets name * - * @param mixed|null $metadata metadata + * @param string|null $name name * * @return $this */ - public function setMetadata(mixed $metadata): static + public function setName(?string $name): static { - if (is_null($metadata)) { - array_push($this->openAPINullablesSetToNull, 'metadata'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('metadata', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['metadata'] = $metadata; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/ContractLeaveImportRequest.php b/src/Model/ContractLeaveImportRequest.php index 24fe66f..5818a37 100644 --- a/src/Model/ContractLeaveImportRequest.php +++ b/src/Model/ContractLeaveImportRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,23 +59,23 @@ class ContractLeaveImportRequest implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'payrollCode' => 'string', - 'type' => '\SynergiTech\Staffology\Model\LeaveType', - 'pay' => '\SynergiTech\Staffology\Model\LeavePayType', - 'openEndedAbsence' => 'bool', + 'assumedPensionablePay' => 'float', + 'automaticAPPCalculation' => 'bool', + 'automaticAWECalculation' => 'bool', + 'averageWeeklyEarnings' => 'float', + 'calculationType' => '\SynergiTech\Staffology\Model\LeaveCalculationType', 'from' => '\DateTime', - 'to' => '\DateTime', 'historicLeaveRequiresProcessing' => 'bool', - 'averageWeeklyEarnings' => 'float', - 'automaticAWECalculation' => 'bool', 'offsetPay' => 'bool', - 'calculationType' => '\SynergiTech\Staffology\Model\LeaveCalculationType', + 'openEndedAbsence' => 'bool', + 'pay' => '\SynergiTech\Staffology\Model\LeavePayType', + 'paySSPInAddition' => 'bool', + 'payrollCode' => 'string', 'percentOfPay' => 'float', 'strikeHoursToDeduct' => 'float', - 'paySSPInAddition' => 'bool', - 'useAssumedPensionablePay' => 'bool', - 'assumedPensionablePay' => 'float', - 'automaticAPPCalculation' => 'bool' + 'to' => '\DateTime', + 'type' => '\SynergiTech\Staffology\Model\LeaveType', + 'useAssumedPensionablePay' => 'bool' ]; /** @@ -84,23 +84,23 @@ class ContractLeaveImportRequest implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'payrollCode' => null, - 'type' => null, - 'pay' => null, - 'openEndedAbsence' => null, + 'assumedPensionablePay' => 'double', + 'automaticAPPCalculation' => null, + 'automaticAWECalculation' => null, + 'averageWeeklyEarnings' => 'double', + 'calculationType' => null, 'from' => 'date', - 'to' => 'date', 'historicLeaveRequiresProcessing' => null, - 'averageWeeklyEarnings' => 'double', - 'automaticAWECalculation' => null, 'offsetPay' => null, - 'calculationType' => null, + 'openEndedAbsence' => null, + 'pay' => null, + 'paySSPInAddition' => null, + 'payrollCode' => null, 'percentOfPay' => 'double', 'strikeHoursToDeduct' => 'double', - 'paySSPInAddition' => null, - 'useAssumedPensionablePay' => null, - 'assumedPensionablePay' => 'double', - 'automaticAPPCalculation' => null + 'to' => 'date', + 'type' => null, + 'useAssumedPensionablePay' => null ]; /** @@ -109,23 +109,23 @@ class ContractLeaveImportRequest implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'payrollCode' => true, - 'type' => false, - 'pay' => false, - 'openEndedAbsence' => false, + 'assumedPensionablePay' => true, + 'automaticAPPCalculation' => false, + 'automaticAWECalculation' => false, + 'averageWeeklyEarnings' => true, + 'calculationType' => false, 'from' => true, - 'to' => true, 'historicLeaveRequiresProcessing' => false, - 'averageWeeklyEarnings' => true, - 'automaticAWECalculation' => false, 'offsetPay' => false, - 'calculationType' => false, + 'openEndedAbsence' => false, + 'pay' => false, + 'paySSPInAddition' => false, + 'payrollCode' => true, 'percentOfPay' => true, 'strikeHoursToDeduct' => true, - 'paySSPInAddition' => false, - 'useAssumedPensionablePay' => false, - 'assumedPensionablePay' => true, - 'automaticAPPCalculation' => false + 'to' => true, + 'type' => false, + 'useAssumedPensionablePay' => false ]; /** @@ -214,23 +214,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollCode' => 'payrollCode', - 'type' => 'type', - 'pay' => 'pay', - 'openEndedAbsence' => 'openEndedAbsence', + 'assumedPensionablePay' => 'assumedPensionablePay', + 'automaticAPPCalculation' => 'automaticAPPCalculation', + 'automaticAWECalculation' => 'automaticAWECalculation', + 'averageWeeklyEarnings' => 'averageWeeklyEarnings', + 'calculationType' => 'calculationType', 'from' => 'from', - 'to' => 'to', 'historicLeaveRequiresProcessing' => 'historicLeaveRequiresProcessing', - 'averageWeeklyEarnings' => 'averageWeeklyEarnings', - 'automaticAWECalculation' => 'automaticAWECalculation', 'offsetPay' => 'offsetPay', - 'calculationType' => 'calculationType', + 'openEndedAbsence' => 'openEndedAbsence', + 'pay' => 'pay', + 'paySSPInAddition' => 'paySSPInAddition', + 'payrollCode' => 'payrollCode', 'percentOfPay' => 'percentOfPay', 'strikeHoursToDeduct' => 'strikeHoursToDeduct', - 'paySSPInAddition' => 'paySSPInAddition', - 'useAssumedPensionablePay' => 'useAssumedPensionablePay', - 'assumedPensionablePay' => 'assumedPensionablePay', - 'automaticAPPCalculation' => 'automaticAPPCalculation' + 'to' => 'to', + 'type' => 'type', + 'useAssumedPensionablePay' => 'useAssumedPensionablePay' ]; /** @@ -239,23 +239,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollCode' => 'setPayrollCode', - 'type' => 'setType', - 'pay' => 'setPay', - 'openEndedAbsence' => 'setOpenEndedAbsence', + 'assumedPensionablePay' => 'setAssumedPensionablePay', + 'automaticAPPCalculation' => 'setAutomaticAPPCalculation', + 'automaticAWECalculation' => 'setAutomaticAWECalculation', + 'averageWeeklyEarnings' => 'setAverageWeeklyEarnings', + 'calculationType' => 'setCalculationType', 'from' => 'setFrom', - 'to' => 'setTo', 'historicLeaveRequiresProcessing' => 'setHistoricLeaveRequiresProcessing', - 'averageWeeklyEarnings' => 'setAverageWeeklyEarnings', - 'automaticAWECalculation' => 'setAutomaticAWECalculation', 'offsetPay' => 'setOffsetPay', - 'calculationType' => 'setCalculationType', + 'openEndedAbsence' => 'setOpenEndedAbsence', + 'pay' => 'setPay', + 'paySSPInAddition' => 'setPaySSPInAddition', + 'payrollCode' => 'setPayrollCode', 'percentOfPay' => 'setPercentOfPay', 'strikeHoursToDeduct' => 'setStrikeHoursToDeduct', - 'paySSPInAddition' => 'setPaySSPInAddition', - 'useAssumedPensionablePay' => 'setUseAssumedPensionablePay', - 'assumedPensionablePay' => 'setAssumedPensionablePay', - 'automaticAPPCalculation' => 'setAutomaticAPPCalculation' + 'to' => 'setTo', + 'type' => 'setType', + 'useAssumedPensionablePay' => 'setUseAssumedPensionablePay' ]; /** @@ -264,23 +264,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollCode' => 'getPayrollCode', - 'type' => 'getType', - 'pay' => 'getPay', - 'openEndedAbsence' => 'getOpenEndedAbsence', + 'assumedPensionablePay' => 'getAssumedPensionablePay', + 'automaticAPPCalculation' => 'getAutomaticAPPCalculation', + 'automaticAWECalculation' => 'getAutomaticAWECalculation', + 'averageWeeklyEarnings' => 'getAverageWeeklyEarnings', + 'calculationType' => 'getCalculationType', 'from' => 'getFrom', - 'to' => 'getTo', 'historicLeaveRequiresProcessing' => 'getHistoricLeaveRequiresProcessing', - 'averageWeeklyEarnings' => 'getAverageWeeklyEarnings', - 'automaticAWECalculation' => 'getAutomaticAWECalculation', 'offsetPay' => 'getOffsetPay', - 'calculationType' => 'getCalculationType', + 'openEndedAbsence' => 'getOpenEndedAbsence', + 'pay' => 'getPay', + 'paySSPInAddition' => 'getPaySSPInAddition', + 'payrollCode' => 'getPayrollCode', 'percentOfPay' => 'getPercentOfPay', 'strikeHoursToDeduct' => 'getStrikeHoursToDeduct', - 'paySSPInAddition' => 'getPaySSPInAddition', - 'useAssumedPensionablePay' => 'getUseAssumedPensionablePay', - 'assumedPensionablePay' => 'getAssumedPensionablePay', - 'automaticAPPCalculation' => 'getAutomaticAPPCalculation' + 'to' => 'getTo', + 'type' => 'getType', + 'useAssumedPensionablePay' => 'getUseAssumedPensionablePay' ]; /** @@ -339,23 +339,23 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('pay', $data ?? [], null); - $this->setIfExists('openEndedAbsence', $data ?? [], null); + $this->setIfExists('assumedPensionablePay', $data ?? [], null); + $this->setIfExists('automaticAPPCalculation', $data ?? [], null); + $this->setIfExists('automaticAWECalculation', $data ?? [], null); + $this->setIfExists('averageWeeklyEarnings', $data ?? [], null); + $this->setIfExists('calculationType', $data ?? [], null); $this->setIfExists('from', $data ?? [], null); - $this->setIfExists('to', $data ?? [], null); $this->setIfExists('historicLeaveRequiresProcessing', $data ?? [], null); - $this->setIfExists('averageWeeklyEarnings', $data ?? [], null); - $this->setIfExists('automaticAWECalculation', $data ?? [], null); $this->setIfExists('offsetPay', $data ?? [], null); - $this->setIfExists('calculationType', $data ?? [], null); + $this->setIfExists('openEndedAbsence', $data ?? [], null); + $this->setIfExists('pay', $data ?? [], null); + $this->setIfExists('paySSPInAddition', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('percentOfPay', $data ?? [], null); $this->setIfExists('strikeHoursToDeduct', $data ?? [], null); - $this->setIfExists('paySSPInAddition', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('useAssumedPensionablePay', $data ?? [], null); - $this->setIfExists('assumedPensionablePay', $data ?? [], null); - $this->setIfExists('automaticAPPCalculation', $data ?? [], null); } /** @@ -401,184 +401,184 @@ public function valid(): bool /** - * Gets payrollCode + * Gets assumedPensionablePay * - * @return string|null + * @return float|null */ - public function getPayrollCode(): ?string + public function getAssumedPensionablePay(): ?float { - return $this->container['payrollCode']; + return $this->container['assumedPensionablePay']; } /** - * Sets payrollCode + * Sets assumedPensionablePay * - * @param string|null $payrollCode Payroll Code + * @param float|null $assumedPensionablePay Assumed Pensionable Pay (APP) is an average figure, calculated as the average pay in the 3 months (or 12 weeks if weekly/fortnightly/fourweekly paid) before the absence * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setAssumedPensionablePay(?float $assumedPensionablePay): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); + if (is_null($assumedPensionablePay)) { + array_push($this->openAPINullablesSetToNull, 'assumedPensionablePay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); + $index = array_search('assumedPensionablePay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payrollCode'] = $payrollCode; + $this->container['assumedPensionablePay'] = $assumedPensionablePay; return $this; } /** - * Gets type + * Gets automaticAPPCalculation * - * @return \SynergiTech\Staffology\Model\LeaveType|null + * @return bool|null */ - public function getType(): ?\SynergiTech\Staffology\Model\LeaveType + public function getAutomaticAPPCalculation(): ?bool { - return $this->container['type']; + return $this->container['automaticAPPCalculation']; } /** - * Sets type + * Sets automaticAPPCalculation * - * @param \SynergiTech\Staffology\Model\LeaveType|null $type type + * @param bool|null $automaticAPPCalculation If set to True then we'll automatically calculate the AssumedPensionablePay. Set it to false if you want to manually provide a figure that overrides our calculations * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\LeaveType $type): static + public function setAutomaticAPPCalculation(?bool $automaticAPPCalculation): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($automaticAPPCalculation)) { + throw new InvalidArgumentException('non-nullable automaticAPPCalculation cannot be null'); } - $this->container['type'] = $type; + $this->container['automaticAPPCalculation'] = $automaticAPPCalculation; return $this; } /** - * Gets pay + * Gets automaticAWECalculation * - * @return \SynergiTech\Staffology\Model\LeavePayType|null + * @return bool|null */ - public function getPay(): ?\SynergiTech\Staffology\Model\LeavePayType + public function getAutomaticAWECalculation(): ?bool { - return $this->container['pay']; + return $this->container['automaticAWECalculation']; } /** - * Sets pay + * Sets automaticAWECalculation * - * @param \SynergiTech\Staffology\Model\LeavePayType|null $pay pay + * @param bool|null $automaticAWECalculation Automatic Average Weekly Earnings. * * @return $this */ - public function setPay(?\SynergiTech\Staffology\Model\LeavePayType $pay): static + public function setAutomaticAWECalculation(?bool $automaticAWECalculation): static { - if (is_null($pay)) { - throw new InvalidArgumentException('non-nullable pay cannot be null'); + if (is_null($automaticAWECalculation)) { + throw new InvalidArgumentException('non-nullable automaticAWECalculation cannot be null'); } - $this->container['pay'] = $pay; + $this->container['automaticAWECalculation'] = $automaticAWECalculation; return $this; } /** - * Gets openEndedAbsence + * Gets averageWeeklyEarnings * - * @return bool|null + * @return float|null */ - public function getOpenEndedAbsence(): ?bool + public function getAverageWeeklyEarnings(): ?float { - return $this->container['openEndedAbsence']; + return $this->container['averageWeeklyEarnings']; } /** - * Sets openEndedAbsence + * Sets averageWeeklyEarnings * - * @param bool|null $openEndedAbsence Open Ended Absence + * @param float|null $averageWeeklyEarnings The employees average weekly earnings. * * @return $this */ - public function setOpenEndedAbsence(?bool $openEndedAbsence): static + public function setAverageWeeklyEarnings(?float $averageWeeklyEarnings): static { - if (is_null($openEndedAbsence)) { - throw new InvalidArgumentException('non-nullable openEndedAbsence cannot be null'); + if (is_null($averageWeeklyEarnings)) { + array_push($this->openAPINullablesSetToNull, 'averageWeeklyEarnings'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('averageWeeklyEarnings', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['openEndedAbsence'] = $openEndedAbsence; + $this->container['averageWeeklyEarnings'] = $averageWeeklyEarnings; return $this; } /** - * Gets from + * Gets calculationType * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\LeaveCalculationType|null */ - public function getFrom(): ?\DateTime + public function getCalculationType(): ?\SynergiTech\Staffology\Model\LeaveCalculationType { - return $this->container['from']; + return $this->container['calculationType']; } /** - * Sets from + * Sets calculationType * - * @param \DateTime|null $from The first day of Leave. + * @param \SynergiTech\Staffology\Model\LeaveCalculationType|null $calculationType calculationType * * @return $this */ - public function setFrom(?\DateTime $from): static + public function setCalculationType(?\SynergiTech\Staffology\Model\LeaveCalculationType $calculationType): static { - if (is_null($from)) { - array_push($this->openAPINullablesSetToNull, 'from'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('from', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($calculationType)) { + throw new InvalidArgumentException('non-nullable calculationType cannot be null'); } - $this->container['from'] = $from; + $this->container['calculationType'] = $calculationType; return $this; } /** - * Gets to + * Gets from * * @return \DateTime|null */ - public function getTo(): ?\DateTime + public function getFrom(): ?\DateTime { - return $this->container['to']; + return $this->container['from']; } /** - * Sets to + * Sets from * - * @param \DateTime|null $to The last day of Leave. + * @param \DateTime|null $from The first day of Leave. * * @return $this */ - public function setTo(?\DateTime $to): static + public function setFrom(?\DateTime $from): static { - if (is_null($to)) { - array_push($this->openAPINullablesSetToNull, 'to'); + if (is_null($from)) { + array_push($this->openAPINullablesSetToNull, 'from'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('to', $nullablesSetToNull); + $index = array_search('from', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['to'] = $to; + $this->container['from'] = $from; return $this; } @@ -611,116 +611,143 @@ public function setHistoricLeaveRequiresProcessing(?bool $historicLeaveRequiresP } /** - * Gets averageWeeklyEarnings + * Gets offsetPay * - * @return float|null + * @return bool|null */ - public function getAverageWeeklyEarnings(): ?float + public function getOffsetPay(): ?bool { - return $this->container['averageWeeklyEarnings']; + return $this->container['offsetPay']; } /** - * Sets averageWeeklyEarnings + * Sets offsetPay * - * @param float|null $averageWeeklyEarnings The employees average weekly earnings. + * @param bool|null $offsetPay Top-up pay to usual amongst (offsetting) * * @return $this */ - public function setAverageWeeklyEarnings(?float $averageWeeklyEarnings): static + public function setOffsetPay(?bool $offsetPay): static { - if (is_null($averageWeeklyEarnings)) { - array_push($this->openAPINullablesSetToNull, 'averageWeeklyEarnings'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('averageWeeklyEarnings', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($offsetPay)) { + throw new InvalidArgumentException('non-nullable offsetPay cannot be null'); } - $this->container['averageWeeklyEarnings'] = $averageWeeklyEarnings; + $this->container['offsetPay'] = $offsetPay; return $this; } /** - * Gets automaticAWECalculation + * Gets openEndedAbsence * * @return bool|null */ - public function getAutomaticAWECalculation(): ?bool + public function getOpenEndedAbsence(): ?bool { - return $this->container['automaticAWECalculation']; + return $this->container['openEndedAbsence']; } /** - * Sets automaticAWECalculation + * Sets openEndedAbsence * - * @param bool|null $automaticAWECalculation Automatic Average Weekly Earnings. + * @param bool|null $openEndedAbsence Open Ended Absence * * @return $this */ - public function setAutomaticAWECalculation(?bool $automaticAWECalculation): static + public function setOpenEndedAbsence(?bool $openEndedAbsence): static { - if (is_null($automaticAWECalculation)) { - throw new InvalidArgumentException('non-nullable automaticAWECalculation cannot be null'); + if (is_null($openEndedAbsence)) { + throw new InvalidArgumentException('non-nullable openEndedAbsence cannot be null'); } - $this->container['automaticAWECalculation'] = $automaticAWECalculation; + $this->container['openEndedAbsence'] = $openEndedAbsence; return $this; } /** - * Gets offsetPay + * Gets pay + * + * @return \SynergiTech\Staffology\Model\LeavePayType|null + */ + public function getPay(): ?\SynergiTech\Staffology\Model\LeavePayType + { + return $this->container['pay']; + } + + /** + * Sets pay + * + * @param \SynergiTech\Staffology\Model\LeavePayType|null $pay pay + * + * @return $this + */ + public function setPay(?\SynergiTech\Staffology\Model\LeavePayType $pay): static + { + if (is_null($pay)) { + throw new InvalidArgumentException('non-nullable pay cannot be null'); + } + $this->container['pay'] = $pay; + + return $this; + } + + /** + * Gets paySSPInAddition * * @return bool|null */ - public function getOffsetPay(): ?bool + public function getPaySSPInAddition(): ?bool { - return $this->container['offsetPay']; + return $this->container['paySSPInAddition']; } /** - * Sets offsetPay + * Sets paySSPInAddition * - * @param bool|null $offsetPay Top-up pay to usual amongst (offsetting) + * @param bool|null $paySSPInAddition Only provided when the leave type is 'Sick' and the payment type is 'Custom'. * * @return $this */ - public function setOffsetPay(?bool $offsetPay): static + public function setPaySSPInAddition(?bool $paySSPInAddition): static { - if (is_null($offsetPay)) { - throw new InvalidArgumentException('non-nullable offsetPay cannot be null'); + if (is_null($paySSPInAddition)) { + throw new InvalidArgumentException('non-nullable paySSPInAddition cannot be null'); } - $this->container['offsetPay'] = $offsetPay; + $this->container['paySSPInAddition'] = $paySSPInAddition; return $this; } /** - * Gets calculationType + * Gets payrollCode * - * @return \SynergiTech\Staffology\Model\LeaveCalculationType|null + * @return string|null */ - public function getCalculationType(): ?\SynergiTech\Staffology\Model\LeaveCalculationType + public function getPayrollCode(): ?string { - return $this->container['calculationType']; + return $this->container['payrollCode']; } /** - * Sets calculationType + * Sets payrollCode * - * @param \SynergiTech\Staffology\Model\LeaveCalculationType|null $calculationType calculationType + * @param string|null $payrollCode Payroll Code * * @return $this */ - public function setCalculationType(?\SynergiTech\Staffology\Model\LeaveCalculationType $calculationType): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($calculationType)) { - throw new InvalidArgumentException('non-nullable calculationType cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['calculationType'] = $calculationType; + $this->container['payrollCode'] = $payrollCode; return $this; } @@ -794,116 +821,89 @@ public function setStrikeHoursToDeduct(?float $strikeHoursToDeduct): static } /** - * Gets paySSPInAddition - * - * @return bool|null - */ - public function getPaySSPInAddition(): ?bool - { - return $this->container['paySSPInAddition']; - } - - /** - * Sets paySSPInAddition - * - * @param bool|null $paySSPInAddition Only provided when the leave type is 'Sick' and the payment type is 'Custom'. - * - * @return $this - */ - public function setPaySSPInAddition(?bool $paySSPInAddition): static - { - if (is_null($paySSPInAddition)) { - throw new InvalidArgumentException('non-nullable paySSPInAddition cannot be null'); - } - $this->container['paySSPInAddition'] = $paySSPInAddition; - - return $this; - } - - /** - * Gets useAssumedPensionablePay + * Gets to * - * @return bool|null + * @return \DateTime|null */ - public function getUseAssumedPensionablePay(): ?bool + public function getTo(): ?\DateTime { - return $this->container['useAssumedPensionablePay']; + return $this->container['to']; } /** - * Sets useAssumedPensionablePay + * Sets to * - * @param bool|null $useAssumedPensionablePay Only provided when the leave type is 'Sick' and the payment type is 'Custom', 'Occupational Policy' or 'Statutory Pay'. + * @param \DateTime|null $to The last day of Leave. * * @return $this */ - public function setUseAssumedPensionablePay(?bool $useAssumedPensionablePay): static + public function setTo(?\DateTime $to): static { - if (is_null($useAssumedPensionablePay)) { - throw new InvalidArgumentException('non-nullable useAssumedPensionablePay cannot be null'); + if (is_null($to)) { + array_push($this->openAPINullablesSetToNull, 'to'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('to', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useAssumedPensionablePay'] = $useAssumedPensionablePay; + $this->container['to'] = $to; return $this; } /** - * Gets assumedPensionablePay + * Gets type * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveType|null */ - public function getAssumedPensionablePay(): ?float + public function getType(): ?\SynergiTech\Staffology\Model\LeaveType { - return $this->container['assumedPensionablePay']; + return $this->container['type']; } /** - * Sets assumedPensionablePay + * Sets type * - * @param float|null $assumedPensionablePay Assumed Pensionable Pay (APP) is an average figure, calculated as the average pay in the 3 months (or 12 weeks if weekly/fortnightly/fourweekly paid) before the absence + * @param \SynergiTech\Staffology\Model\LeaveType|null $type type * * @return $this */ - public function setAssumedPensionablePay(?float $assumedPensionablePay): static + public function setType(?\SynergiTech\Staffology\Model\LeaveType $type): static { - if (is_null($assumedPensionablePay)) { - array_push($this->openAPINullablesSetToNull, 'assumedPensionablePay'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('assumedPensionablePay', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['assumedPensionablePay'] = $assumedPensionablePay; + $this->container['type'] = $type; return $this; } /** - * Gets automaticAPPCalculation + * Gets useAssumedPensionablePay * * @return bool|null */ - public function getAutomaticAPPCalculation(): ?bool + public function getUseAssumedPensionablePay(): ?bool { - return $this->container['automaticAPPCalculation']; + return $this->container['useAssumedPensionablePay']; } /** - * Sets automaticAPPCalculation + * Sets useAssumedPensionablePay * - * @param bool|null $automaticAPPCalculation If set to True then we'll automatically calculate the AssumedPensionablePay. Set it to false if you want to manually provide a figure that overrides our calculations + * @param bool|null $useAssumedPensionablePay Only provided when the leave type is 'Sick' and the payment type is 'Custom', 'Occupational Policy' or 'Statutory Pay'. * * @return $this */ - public function setAutomaticAPPCalculation(?bool $automaticAPPCalculation): static + public function setUseAssumedPensionablePay(?bool $useAssumedPensionablePay): static { - if (is_null($automaticAPPCalculation)) { - throw new InvalidArgumentException('non-nullable automaticAPPCalculation cannot be null'); + if (is_null($useAssumedPensionablePay)) { + throw new InvalidArgumentException('non-nullable useAssumedPensionablePay cannot be null'); } - $this->container['automaticAPPCalculation'] = $automaticAPPCalculation; + $this->container['useAssumedPensionablePay'] = $useAssumedPensionablePay; return $this; } diff --git a/src/Model/ContractLeaverDetails.php b/src/Model/ContractLeaverDetails.php index e8a1abd..f0abcf2 100644 --- a/src/Model/ContractLeaverDetails.php +++ b/src/Model/ContractLeaverDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,11 +60,11 @@ class ContractLeaverDetails implements ModelInterface, ArrayAccess, JsonSerializ */ protected static array $openAPITypes = [ 'hasLeft' => 'bool', - 'leaveDate' => '\DateTime', 'isDeceased' => 'bool', - 'paymentAfterLeaving' => 'bool', + 'leaveDate' => '\DateTime', 'p45Sent' => 'bool', 'payAccruedBalance' => 'bool', + 'paymentAfterLeaving' => 'bool', 'paymentMethodAfterLeaving' => '\SynergiTech\Staffology\Model\PaymentMethodAfterLeaving' ]; @@ -75,11 +75,11 @@ class ContractLeaverDetails implements ModelInterface, ArrayAccess, JsonSerializ */ protected static array $openAPIFormats = [ 'hasLeft' => null, - 'leaveDate' => 'date', 'isDeceased' => null, - 'paymentAfterLeaving' => null, + 'leaveDate' => 'date', 'p45Sent' => null, 'payAccruedBalance' => null, + 'paymentAfterLeaving' => null, 'paymentMethodAfterLeaving' => null ]; @@ -90,11 +90,11 @@ class ContractLeaverDetails implements ModelInterface, ArrayAccess, JsonSerializ */ protected static array $openAPINullables = [ 'hasLeft' => false, - 'leaveDate' => true, 'isDeceased' => false, - 'paymentAfterLeaving' => false, + 'leaveDate' => true, 'p45Sent' => false, 'payAccruedBalance' => false, + 'paymentAfterLeaving' => false, 'paymentMethodAfterLeaving' => false ]; @@ -185,11 +185,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'hasLeft' => 'hasLeft', - 'leaveDate' => 'leaveDate', 'isDeceased' => 'isDeceased', - 'paymentAfterLeaving' => 'paymentAfterLeaving', + 'leaveDate' => 'leaveDate', 'p45Sent' => 'p45Sent', 'payAccruedBalance' => 'payAccruedBalance', + 'paymentAfterLeaving' => 'paymentAfterLeaving', 'paymentMethodAfterLeaving' => 'paymentMethodAfterLeaving' ]; @@ -200,11 +200,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'hasLeft' => 'setHasLeft', - 'leaveDate' => 'setLeaveDate', 'isDeceased' => 'setIsDeceased', - 'paymentAfterLeaving' => 'setPaymentAfterLeaving', + 'leaveDate' => 'setLeaveDate', 'p45Sent' => 'setP45Sent', 'payAccruedBalance' => 'setPayAccruedBalance', + 'paymentAfterLeaving' => 'setPaymentAfterLeaving', 'paymentMethodAfterLeaving' => 'setPaymentMethodAfterLeaving' ]; @@ -215,11 +215,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'hasLeft' => 'getHasLeft', - 'leaveDate' => 'getLeaveDate', 'isDeceased' => 'getIsDeceased', - 'paymentAfterLeaving' => 'getPaymentAfterLeaving', + 'leaveDate' => 'getLeaveDate', 'p45Sent' => 'getP45Sent', 'payAccruedBalance' => 'getPayAccruedBalance', + 'paymentAfterLeaving' => 'getPaymentAfterLeaving', 'paymentMethodAfterLeaving' => 'getPaymentMethodAfterLeaving' ]; @@ -280,11 +280,11 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('hasLeft', $data ?? [], null); - $this->setIfExists('leaveDate', $data ?? [], null); $this->setIfExists('isDeceased', $data ?? [], null); - $this->setIfExists('paymentAfterLeaving', $data ?? [], null); + $this->setIfExists('leaveDate', $data ?? [], null); $this->setIfExists('p45Sent', $data ?? [], null); $this->setIfExists('payAccruedBalance', $data ?? [], null); + $this->setIfExists('paymentAfterLeaving', $data ?? [], null); $this->setIfExists('paymentMethodAfterLeaving', $data ?? [], null); } @@ -357,40 +357,6 @@ public function setHasLeft(?bool $hasLeft): static return $this; } - /** - * Gets leaveDate - * - * @return \DateTime|null - */ - public function getLeaveDate(): ?\DateTime - { - return $this->container['leaveDate']; - } - - /** - * Sets leaveDate - * - * @param \DateTime|null $leaveDate leaveDate - * - * @return $this - */ - public function setLeaveDate(?\DateTime $leaveDate): static - { - if (is_null($leaveDate)) { - array_push($this->openAPINullablesSetToNull, 'leaveDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('leaveDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['leaveDate'] = $leaveDate; - - return $this; - } - /** * Gets isDeceased * @@ -419,28 +385,35 @@ public function setIsDeceased(?bool $isDeceased): static } /** - * Gets paymentAfterLeaving + * Gets leaveDate * - * @return bool|null + * @return \DateTime|null */ - public function getPaymentAfterLeaving(): ?bool + public function getLeaveDate(): ?\DateTime { - return $this->container['paymentAfterLeaving']; + return $this->container['leaveDate']; } /** - * Sets paymentAfterLeaving + * Sets leaveDate * - * @param bool|null $paymentAfterLeaving paymentAfterLeaving + * @param \DateTime|null $leaveDate leaveDate * * @return $this */ - public function setPaymentAfterLeaving(?bool $paymentAfterLeaving): static + public function setLeaveDate(?\DateTime $leaveDate): static { - if (is_null($paymentAfterLeaving)) { - throw new InvalidArgumentException('non-nullable paymentAfterLeaving cannot be null'); + if (is_null($leaveDate)) { + array_push($this->openAPINullablesSetToNull, 'leaveDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('leaveDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['paymentAfterLeaving'] = $paymentAfterLeaving; + $this->container['leaveDate'] = $leaveDate; return $this; } @@ -499,6 +472,33 @@ public function setPayAccruedBalance(?bool $payAccruedBalance): static return $this; } + /** + * Gets paymentAfterLeaving + * + * @return bool|null + */ + public function getPaymentAfterLeaving(): ?bool + { + return $this->container['paymentAfterLeaving']; + } + + /** + * Sets paymentAfterLeaving + * + * @param bool|null $paymentAfterLeaving paymentAfterLeaving + * + * @return $this + */ + public function setPaymentAfterLeaving(?bool $paymentAfterLeaving): static + { + if (is_null($paymentAfterLeaving)) { + throw new InvalidArgumentException('non-nullable paymentAfterLeaving cannot be null'); + } + $this->container['paymentAfterLeaving'] = $paymentAfterLeaving; + + return $this; + } + /** * Gets paymentMethodAfterLeaving * diff --git a/src/Model/ContractLondonAllowanceRequest.php b/src/Model/ContractLondonAllowanceRequest.php index 0c24c27..78705cb 100644 --- a/src/Model/ContractLondonAllowanceRequest.php +++ b/src/Model/ContractLondonAllowanceRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class ContractLondonAllowanceRequest implements ModelInterface, ArrayAccess, Jso */ protected static array $openAPITypes = [ 'type' => '\SynergiTech\Staffology\Model\LondonAllowanceType', - 'valueType' => '\SynergiTech\Staffology\Model\LondonAllowanceValueType', - 'value' => 'float' + 'value' => 'float', + 'valueType' => '\SynergiTech\Staffology\Model\LondonAllowanceValueType' ]; /** @@ -71,8 +71,8 @@ class ContractLondonAllowanceRequest implements ModelInterface, ArrayAccess, Jso */ protected static array $openAPIFormats = [ 'type' => null, - 'valueType' => null, - 'value' => 'double' + 'value' => 'double', + 'valueType' => null ]; /** @@ -82,8 +82,8 @@ class ContractLondonAllowanceRequest implements ModelInterface, ArrayAccess, Jso */ protected static array $openAPINullables = [ 'type' => false, - 'valueType' => false, - 'value' => false + 'value' => false, + 'valueType' => false ]; /** @@ -173,8 +173,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'type' => 'type', - 'valueType' => 'valueType', - 'value' => 'value' + 'value' => 'value', + 'valueType' => 'valueType' ]; /** @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'type' => 'setType', - 'valueType' => 'setValueType', - 'value' => 'setValue' + 'value' => 'setValue', + 'valueType' => 'setValueType' ]; /** @@ -195,8 +195,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'type' => 'getType', - 'valueType' => 'getValueType', - 'value' => 'getValue' + 'value' => 'getValue', + 'valueType' => 'getValueType' ]; /** @@ -256,8 +256,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('valueType', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('valueType', $data ?? [], null); } /** @@ -330,55 +330,55 @@ public function setType(?\SynergiTech\Staffology\Model\LondonAllowanceType $type } /** - * Gets valueType + * Gets value * - * @return \SynergiTech\Staffology\Model\LondonAllowanceValueType|null + * @return float|null */ - public function getValueType(): ?\SynergiTech\Staffology\Model\LondonAllowanceValueType + public function getValue(): ?float { - return $this->container['valueType']; + return $this->container['value']; } /** - * Sets valueType + * Sets value * - * @param \SynergiTech\Staffology\Model\LondonAllowanceValueType|null $valueType valueType + * @param float|null $value Value of London Allowance * * @return $this */ - public function setValueType(?\SynergiTech\Staffology\Model\LondonAllowanceValueType $valueType): static + public function setValue(?float $value): static { - if (is_null($valueType)) { - throw new InvalidArgumentException('non-nullable valueType cannot be null'); + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); } - $this->container['valueType'] = $valueType; + $this->container['value'] = $value; return $this; } /** - * Gets value + * Gets valueType * - * @return float|null + * @return \SynergiTech\Staffology\Model\LondonAllowanceValueType|null */ - public function getValue(): ?float + public function getValueType(): ?\SynergiTech\Staffology\Model\LondonAllowanceValueType { - return $this->container['value']; + return $this->container['valueType']; } /** - * Sets value + * Sets valueType * - * @param float|null $value Value of London Allowance + * @param \SynergiTech\Staffology\Model\LondonAllowanceValueType|null $valueType valueType * * @return $this */ - public function setValue(?float $value): static + public function setValueType(?\SynergiTech\Staffology\Model\LondonAllowanceValueType $valueType): static { - if (is_null($value)) { - throw new InvalidArgumentException('non-nullable value cannot be null'); + if (is_null($valueType)) { + throw new InvalidArgumentException('non-nullable valueType cannot be null'); } - $this->container['value'] = $value; + $this->container['valueType'] = $valueType; return $this; } diff --git a/src/Model/ContractLondonAllowanceResponse.php b/src/Model/ContractLondonAllowanceResponse.php index fe33768..ce6401a 100644 --- a/src/Model/ContractLondonAllowanceResponse.php +++ b/src/Model/ContractLondonAllowanceResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,9 +60,9 @@ class ContractLondonAllowanceResponse implements ModelInterface, ArrayAccess, Js */ protected static array $openAPITypes = [ 'type' => '\SynergiTech\Staffology\Model\LondonAllowanceType', - 'valueType' => '\SynergiTech\Staffology\Model\LondonAllowanceValueType', + 'uniqueId' => 'string', 'value' => 'float', - 'uniqueId' => 'string' + 'valueType' => '\SynergiTech\Staffology\Model\LondonAllowanceValueType' ]; /** @@ -72,9 +72,9 @@ class ContractLondonAllowanceResponse implements ModelInterface, ArrayAccess, Js */ protected static array $openAPIFormats = [ 'type' => null, - 'valueType' => null, + 'uniqueId' => 'uuid', 'value' => 'double', - 'uniqueId' => 'uuid' + 'valueType' => null ]; /** @@ -84,9 +84,9 @@ class ContractLondonAllowanceResponse implements ModelInterface, ArrayAccess, Js */ protected static array $openAPINullables = [ 'type' => false, - 'valueType' => false, + 'uniqueId' => false, 'value' => false, - 'uniqueId' => false + 'valueType' => false ]; /** @@ -176,9 +176,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'type' => 'type', - 'valueType' => 'valueType', + 'uniqueId' => 'uniqueId', 'value' => 'value', - 'uniqueId' => 'uniqueId' + 'valueType' => 'valueType' ]; /** @@ -188,9 +188,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'type' => 'setType', - 'valueType' => 'setValueType', + 'uniqueId' => 'setUniqueId', 'value' => 'setValue', - 'uniqueId' => 'setUniqueId' + 'valueType' => 'setValueType' ]; /** @@ -200,9 +200,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'type' => 'getType', - 'valueType' => 'getValueType', + 'uniqueId' => 'getUniqueId', 'value' => 'getValue', - 'uniqueId' => 'getUniqueId' + 'valueType' => 'getValueType' ]; /** @@ -262,9 +262,9 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('valueType', $data ?? [], null); - $this->setIfExists('value', $data ?? [], null); $this->setIfExists('uniqueId', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('valueType', $data ?? [], null); } /** @@ -337,28 +337,28 @@ public function setType(?\SynergiTech\Staffology\Model\LondonAllowanceType $type } /** - * Gets valueType + * Gets uniqueId * - * @return \SynergiTech\Staffology\Model\LondonAllowanceValueType|null + * @return string|null */ - public function getValueType(): ?\SynergiTech\Staffology\Model\LondonAllowanceValueType + public function getUniqueId(): ?string { - return $this->container['valueType']; + return $this->container['uniqueId']; } /** - * Sets valueType + * Sets uniqueId * - * @param \SynergiTech\Staffology\Model\LondonAllowanceValueType|null $valueType valueType + * @param string|null $uniqueId London Allowance identifier * * @return $this */ - public function setValueType(?\SynergiTech\Staffology\Model\LondonAllowanceValueType $valueType): static + public function setUniqueId(?string $uniqueId): static { - if (is_null($valueType)) { - throw new InvalidArgumentException('non-nullable valueType cannot be null'); + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); } - $this->container['valueType'] = $valueType; + $this->container['uniqueId'] = $uniqueId; return $this; } @@ -391,28 +391,28 @@ public function setValue(?float $value): static } /** - * Gets uniqueId + * Gets valueType * - * @return string|null + * @return \SynergiTech\Staffology\Model\LondonAllowanceValueType|null */ - public function getUniqueId(): ?string + public function getValueType(): ?\SynergiTech\Staffology\Model\LondonAllowanceValueType { - return $this->container['uniqueId']; + return $this->container['valueType']; } /** - * Sets uniqueId + * Sets valueType * - * @param string|null $uniqueId London Allowance identifier + * @param \SynergiTech\Staffology\Model\LondonAllowanceValueType|null $valueType valueType * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setValueType(?\SynergiTech\Staffology\Model\LondonAllowanceValueType $valueType): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($valueType)) { + throw new InvalidArgumentException('non-nullable valueType cannot be null'); } - $this->container['uniqueId'] = $uniqueId; + $this->container['valueType'] = $valueType; return $this; } diff --git a/src/Model/ContractNetOfOnCostsResponse.php b/src/Model/ContractNetOfOnCostsResponse.php index 162cacd..9c3dbcb 100644 --- a/src/Model/ContractNetOfOnCostsResponse.php +++ b/src/Model/ContractNetOfOnCostsResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,17 +59,17 @@ class ContractNetOfOnCostsResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'salary' => 'float', - 'holidayPay' => 'float', - 'employersPensionContribution' => 'float', + 'apprenticeshipLevy' => 'float', 'employeesPensionContribution' => 'float', 'employersNi' => 'float', - 'apprenticeshipLevy' => 'float', + 'employersPensionContribution' => 'float', 'grossDailyRate' => 'float', - 'totalFees' => 'float', + 'holInclusiveSimulation' => '\SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse', + 'holidayPay' => 'float', 'numberOfDays' => 'float', + 'salary' => 'float', 'simulation' => '\SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse', - 'holInclusiveSimulation' => '\SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse' + 'totalFees' => 'float' ]; /** @@ -78,17 +78,17 @@ class ContractNetOfOnCostsResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'salary' => 'double', - 'holidayPay' => 'double', - 'employersPensionContribution' => 'double', + 'apprenticeshipLevy' => 'double', 'employeesPensionContribution' => 'double', 'employersNi' => 'double', - 'apprenticeshipLevy' => 'double', + 'employersPensionContribution' => 'double', 'grossDailyRate' => 'double', - 'totalFees' => 'double', + 'holInclusiveSimulation' => null, + 'holidayPay' => 'double', 'numberOfDays' => 'double', + 'salary' => 'double', 'simulation' => null, - 'holInclusiveSimulation' => null + 'totalFees' => 'double' ]; /** @@ -97,17 +97,17 @@ class ContractNetOfOnCostsResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'salary' => false, - 'holidayPay' => false, - 'employersPensionContribution' => false, + 'apprenticeshipLevy' => false, 'employeesPensionContribution' => false, 'employersNi' => false, - 'apprenticeshipLevy' => false, + 'employersPensionContribution' => false, 'grossDailyRate' => false, - 'totalFees' => false, + 'holInclusiveSimulation' => false, + 'holidayPay' => false, 'numberOfDays' => false, + 'salary' => false, 'simulation' => false, - 'holInclusiveSimulation' => false + 'totalFees' => false ]; /** @@ -196,17 +196,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'salary' => 'salary', - 'holidayPay' => 'holidayPay', - 'employersPensionContribution' => 'employersPensionContribution', + 'apprenticeshipLevy' => 'apprenticeshipLevy', 'employeesPensionContribution' => 'employeesPensionContribution', 'employersNi' => 'employersNi', - 'apprenticeshipLevy' => 'apprenticeshipLevy', + 'employersPensionContribution' => 'employersPensionContribution', 'grossDailyRate' => 'grossDailyRate', - 'totalFees' => 'totalFees', + 'holInclusiveSimulation' => 'holInclusiveSimulation', + 'holidayPay' => 'holidayPay', 'numberOfDays' => 'numberOfDays', + 'salary' => 'salary', 'simulation' => 'simulation', - 'holInclusiveSimulation' => 'holInclusiveSimulation' + 'totalFees' => 'totalFees' ]; /** @@ -215,17 +215,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'salary' => 'setSalary', - 'holidayPay' => 'setHolidayPay', - 'employersPensionContribution' => 'setEmployersPensionContribution', + 'apprenticeshipLevy' => 'setApprenticeshipLevy', 'employeesPensionContribution' => 'setEmployeesPensionContribution', 'employersNi' => 'setEmployersNi', - 'apprenticeshipLevy' => 'setApprenticeshipLevy', + 'employersPensionContribution' => 'setEmployersPensionContribution', 'grossDailyRate' => 'setGrossDailyRate', - 'totalFees' => 'setTotalFees', + 'holInclusiveSimulation' => 'setHolInclusiveSimulation', + 'holidayPay' => 'setHolidayPay', 'numberOfDays' => 'setNumberOfDays', + 'salary' => 'setSalary', 'simulation' => 'setSimulation', - 'holInclusiveSimulation' => 'setHolInclusiveSimulation' + 'totalFees' => 'setTotalFees' ]; /** @@ -234,17 +234,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'salary' => 'getSalary', - 'holidayPay' => 'getHolidayPay', - 'employersPensionContribution' => 'getEmployersPensionContribution', + 'apprenticeshipLevy' => 'getApprenticeshipLevy', 'employeesPensionContribution' => 'getEmployeesPensionContribution', 'employersNi' => 'getEmployersNi', - 'apprenticeshipLevy' => 'getApprenticeshipLevy', + 'employersPensionContribution' => 'getEmployersPensionContribution', 'grossDailyRate' => 'getGrossDailyRate', - 'totalFees' => 'getTotalFees', + 'holInclusiveSimulation' => 'getHolInclusiveSimulation', + 'holidayPay' => 'getHolidayPay', 'numberOfDays' => 'getNumberOfDays', + 'salary' => 'getSalary', 'simulation' => 'getSimulation', - 'holInclusiveSimulation' => 'getHolInclusiveSimulation' + 'totalFees' => 'getTotalFees' ]; /** @@ -303,17 +303,17 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('salary', $data ?? [], null); - $this->setIfExists('holidayPay', $data ?? [], null); - $this->setIfExists('employersPensionContribution', $data ?? [], null); + $this->setIfExists('apprenticeshipLevy', $data ?? [], null); $this->setIfExists('employeesPensionContribution', $data ?? [], null); $this->setIfExists('employersNi', $data ?? [], null); - $this->setIfExists('apprenticeshipLevy', $data ?? [], null); + $this->setIfExists('employersPensionContribution', $data ?? [], null); $this->setIfExists('grossDailyRate', $data ?? [], null); - $this->setIfExists('totalFees', $data ?? [], null); + $this->setIfExists('holInclusiveSimulation', $data ?? [], null); + $this->setIfExists('holidayPay', $data ?? [], null); $this->setIfExists('numberOfDays', $data ?? [], null); + $this->setIfExists('salary', $data ?? [], null); $this->setIfExists('simulation', $data ?? [], null); - $this->setIfExists('holInclusiveSimulation', $data ?? [], null); + $this->setIfExists('totalFees', $data ?? [], null); } /** @@ -359,82 +359,28 @@ public function valid(): bool /** - * Gets salary - * - * @return float|null - */ - public function getSalary(): ?float - { - return $this->container['salary']; - } - - /** - * Sets salary - * - * @param float|null $salary salary - * - * @return $this - */ - public function setSalary(?float $salary): static - { - if (is_null($salary)) { - throw new InvalidArgumentException('non-nullable salary cannot be null'); - } - $this->container['salary'] = $salary; - - return $this; - } - - /** - * Gets holidayPay - * - * @return float|null - */ - public function getHolidayPay(): ?float - { - return $this->container['holidayPay']; - } - - /** - * Sets holidayPay - * - * @param float|null $holidayPay holidayPay - * - * @return $this - */ - public function setHolidayPay(?float $holidayPay): static - { - if (is_null($holidayPay)) { - throw new InvalidArgumentException('non-nullable holidayPay cannot be null'); - } - $this->container['holidayPay'] = $holidayPay; - - return $this; - } - - /** - * Gets employersPensionContribution + * Gets apprenticeshipLevy * * @return float|null */ - public function getEmployersPensionContribution(): ?float + public function getApprenticeshipLevy(): ?float { - return $this->container['employersPensionContribution']; + return $this->container['apprenticeshipLevy']; } /** - * Sets employersPensionContribution + * Sets apprenticeshipLevy * - * @param float|null $employersPensionContribution employersPensionContribution + * @param float|null $apprenticeshipLevy apprenticeshipLevy * * @return $this */ - public function setEmployersPensionContribution(?float $employersPensionContribution): static + public function setApprenticeshipLevy(?float $apprenticeshipLevy): static { - if (is_null($employersPensionContribution)) { - throw new InvalidArgumentException('non-nullable employersPensionContribution cannot be null'); + if (is_null($apprenticeshipLevy)) { + throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); } - $this->container['employersPensionContribution'] = $employersPensionContribution; + $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; return $this; } @@ -494,28 +440,28 @@ public function setEmployersNi(?float $employersNi): static } /** - * Gets apprenticeshipLevy + * Gets employersPensionContribution * * @return float|null */ - public function getApprenticeshipLevy(): ?float + public function getEmployersPensionContribution(): ?float { - return $this->container['apprenticeshipLevy']; + return $this->container['employersPensionContribution']; } /** - * Sets apprenticeshipLevy + * Sets employersPensionContribution * - * @param float|null $apprenticeshipLevy apprenticeshipLevy + * @param float|null $employersPensionContribution employersPensionContribution * * @return $this */ - public function setApprenticeshipLevy(?float $apprenticeshipLevy): static + public function setEmployersPensionContribution(?float $employersPensionContribution): static { - if (is_null($apprenticeshipLevy)) { - throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); + if (is_null($employersPensionContribution)) { + throw new InvalidArgumentException('non-nullable employersPensionContribution cannot be null'); } - $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; + $this->container['employersPensionContribution'] = $employersPensionContribution; return $this; } @@ -548,28 +494,55 @@ public function setGrossDailyRate(?float $grossDailyRate): static } /** - * Gets totalFees + * Gets holInclusiveSimulation + * + * @return \SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse|null + */ + public function getHolInclusiveSimulation(): ?\SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse + { + return $this->container['holInclusiveSimulation']; + } + + /** + * Sets holInclusiveSimulation + * + * @param \SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse|null $holInclusiveSimulation holInclusiveSimulation + * + * @return $this + */ + public function setHolInclusiveSimulation(?\SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse $holInclusiveSimulation): static + { + if (is_null($holInclusiveSimulation)) { + throw new InvalidArgumentException('non-nullable holInclusiveSimulation cannot be null'); + } + $this->container['holInclusiveSimulation'] = $holInclusiveSimulation; + + return $this; + } + + /** + * Gets holidayPay * * @return float|null */ - public function getTotalFees(): ?float + public function getHolidayPay(): ?float { - return $this->container['totalFees']; + return $this->container['holidayPay']; } /** - * Sets totalFees + * Sets holidayPay * - * @param float|null $totalFees totalFees + * @param float|null $holidayPay holidayPay * * @return $this */ - public function setTotalFees(?float $totalFees): static + public function setHolidayPay(?float $holidayPay): static { - if (is_null($totalFees)) { - throw new InvalidArgumentException('non-nullable totalFees cannot be null'); + if (is_null($holidayPay)) { + throw new InvalidArgumentException('non-nullable holidayPay cannot be null'); } - $this->container['totalFees'] = $totalFees; + $this->container['holidayPay'] = $holidayPay; return $this; } @@ -601,6 +574,33 @@ public function setNumberOfDays(?float $numberOfDays): static return $this; } + /** + * Gets salary + * + * @return float|null + */ + public function getSalary(): ?float + { + return $this->container['salary']; + } + + /** + * Sets salary + * + * @param float|null $salary salary + * + * @return $this + */ + public function setSalary(?float $salary): static + { + if (is_null($salary)) { + throw new InvalidArgumentException('non-nullable salary cannot be null'); + } + $this->container['salary'] = $salary; + + return $this; + } + /** * Gets simulation * @@ -629,28 +629,28 @@ public function setSimulation(?\SynergiTech\Staffology\Model\ContractNetOfOnCost } /** - * Gets holInclusiveSimulation + * Gets totalFees * - * @return \SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse|null + * @return float|null */ - public function getHolInclusiveSimulation(): ?\SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse + public function getTotalFees(): ?float { - return $this->container['holInclusiveSimulation']; + return $this->container['totalFees']; } /** - * Sets holInclusiveSimulation + * Sets totalFees * - * @param \SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse|null $holInclusiveSimulation holInclusiveSimulation + * @param float|null $totalFees totalFees * * @return $this */ - public function setHolInclusiveSimulation(?\SynergiTech\Staffology\Model\ContractNetOfOnCostsSimulationResponse $holInclusiveSimulation): static + public function setTotalFees(?float $totalFees): static { - if (is_null($holInclusiveSimulation)) { - throw new InvalidArgumentException('non-nullable holInclusiveSimulation cannot be null'); + if (is_null($totalFees)) { + throw new InvalidArgumentException('non-nullable totalFees cannot be null'); } - $this->container['holInclusiveSimulation'] = $holInclusiveSimulation; + $this->container['totalFees'] = $totalFees; return $this; } diff --git a/src/Model/ContractNetOfOnCostsSimulationResponse.php b/src/Model/ContractNetOfOnCostsSimulationResponse.php index 52de499..980c907 100644 --- a/src/Model/ContractNetOfOnCostsSimulationResponse.php +++ b/src/Model/ContractNetOfOnCostsSimulationResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class ContractNetOfOnCostsSimulationResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPITypes = [ - 'grossPay' => 'float', 'employeePension' => 'float', - 'taxDue' => 'float', + 'grossPay' => 'float', + 'netPay' => 'float', 'niDue' => 'float', - 'netPay' => 'float' + 'taxDue' => 'float' ]; /** @@ -72,11 +72,11 @@ class ContractNetOfOnCostsSimulationResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPIFormats = [ - 'grossPay' => 'double', 'employeePension' => 'double', - 'taxDue' => 'double', + 'grossPay' => 'double', + 'netPay' => 'double', 'niDue' => 'double', - 'netPay' => 'double' + 'taxDue' => 'double' ]; /** @@ -85,11 +85,11 @@ class ContractNetOfOnCostsSimulationResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPINullables = [ - 'grossPay' => false, 'employeePension' => false, - 'taxDue' => false, + 'grossPay' => false, + 'netPay' => false, 'niDue' => false, - 'netPay' => false + 'taxDue' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'grossPay' => 'grossPay', 'employeePension' => 'employeePension', - 'taxDue' => 'taxDue', + 'grossPay' => 'grossPay', + 'netPay' => 'netPay', 'niDue' => 'niDue', - 'netPay' => 'netPay' + 'taxDue' => 'taxDue' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'grossPay' => 'setGrossPay', 'employeePension' => 'setEmployeePension', - 'taxDue' => 'setTaxDue', + 'grossPay' => 'setGrossPay', + 'netPay' => 'setNetPay', 'niDue' => 'setNiDue', - 'netPay' => 'setNetPay' + 'taxDue' => 'setTaxDue' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'grossPay' => 'getGrossPay', 'employeePension' => 'getEmployeePension', - 'taxDue' => 'getTaxDue', + 'grossPay' => 'getGrossPay', + 'netPay' => 'getNetPay', 'niDue' => 'getNiDue', - 'netPay' => 'getNetPay' + 'taxDue' => 'getTaxDue' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('grossPay', $data ?? [], null); $this->setIfExists('employeePension', $data ?? [], null); - $this->setIfExists('taxDue', $data ?? [], null); - $this->setIfExists('niDue', $data ?? [], null); + $this->setIfExists('grossPay', $data ?? [], null); $this->setIfExists('netPay', $data ?? [], null); + $this->setIfExists('niDue', $data ?? [], null); + $this->setIfExists('taxDue', $data ?? [], null); } /** @@ -317,82 +317,82 @@ public function valid(): bool /** - * Gets grossPay + * Gets employeePension * * @return float|null */ - public function getGrossPay(): ?float + public function getEmployeePension(): ?float { - return $this->container['grossPay']; + return $this->container['employeePension']; } /** - * Sets grossPay + * Sets employeePension * - * @param float|null $grossPay grossPay + * @param float|null $employeePension employeePension * * @return $this */ - public function setGrossPay(?float $grossPay): static + public function setEmployeePension(?float $employeePension): static { - if (is_null($grossPay)) { - throw new InvalidArgumentException('non-nullable grossPay cannot be null'); + if (is_null($employeePension)) { + throw new InvalidArgumentException('non-nullable employeePension cannot be null'); } - $this->container['grossPay'] = $grossPay; + $this->container['employeePension'] = $employeePension; return $this; } /** - * Gets employeePension + * Gets grossPay * * @return float|null */ - public function getEmployeePension(): ?float + public function getGrossPay(): ?float { - return $this->container['employeePension']; + return $this->container['grossPay']; } /** - * Sets employeePension + * Sets grossPay * - * @param float|null $employeePension employeePension + * @param float|null $grossPay grossPay * * @return $this */ - public function setEmployeePension(?float $employeePension): static + public function setGrossPay(?float $grossPay): static { - if (is_null($employeePension)) { - throw new InvalidArgumentException('non-nullable employeePension cannot be null'); + if (is_null($grossPay)) { + throw new InvalidArgumentException('non-nullable grossPay cannot be null'); } - $this->container['employeePension'] = $employeePension; + $this->container['grossPay'] = $grossPay; return $this; } /** - * Gets taxDue + * Gets netPay * * @return float|null */ - public function getTaxDue(): ?float + public function getNetPay(): ?float { - return $this->container['taxDue']; + return $this->container['netPay']; } /** - * Sets taxDue + * Sets netPay * - * @param float|null $taxDue taxDue + * @param float|null $netPay netPay * * @return $this */ - public function setTaxDue(?float $taxDue): static + public function setNetPay(?float $netPay): static { - if (is_null($taxDue)) { - throw new InvalidArgumentException('non-nullable taxDue cannot be null'); + if (is_null($netPay)) { + throw new InvalidArgumentException('non-nullable netPay cannot be null'); } - $this->container['taxDue'] = $taxDue; + $this->container['netPay'] = $netPay; return $this; } @@ -425,28 +425,28 @@ public function setNiDue(?float $niDue): static } /** - * Gets netPay + * Gets taxDue * * @return float|null */ - public function getNetPay(): ?float + public function getTaxDue(): ?float { - return $this->container['netPay']; + return $this->container['taxDue']; } /** - * Sets netPay + * Sets taxDue * - * @param float|null $netPay netPay + * @param float|null $taxDue taxDue * * @return $this */ - public function setNetPay(?float $netPay): static + public function setTaxDue(?float $taxDue): static { - if (is_null($netPay)) { - throw new InvalidArgumentException('non-nullable netPay cannot be null'); + if (is_null($taxDue)) { + throw new InvalidArgumentException('non-nullable taxDue cannot be null'); } - $this->container['netPay'] = $netPay; + $this->container['taxDue'] = $taxDue; return $this; } diff --git a/src/Model/ContractOverseasEmployerDetails.php b/src/Model/ContractOverseasEmployerDetails.php index fa515f6..8594564 100644 --- a/src/Model/ContractOverseasEmployerDetails.php +++ b/src/Model/ContractOverseasEmployerDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractOverseasEmployerDetails implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ - 'overseasEmployer' => 'bool', - 'overseasSecondmentStatus' => '\SynergiTech\Staffology\Model\OverseasSecondmentStatus', 'eeaCitizen' => 'bool', - 'epm6Scheme' => 'bool' + 'epm6Scheme' => 'bool', + 'overseasEmployer' => 'bool', + 'overseasSecondmentStatus' => '\SynergiTech\Staffology\Model\OverseasSecondmentStatus' ]; /** @@ -71,10 +71,10 @@ class ContractOverseasEmployerDetails implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ - 'overseasEmployer' => null, - 'overseasSecondmentStatus' => null, 'eeaCitizen' => null, - 'epm6Scheme' => null + 'epm6Scheme' => null, + 'overseasEmployer' => null, + 'overseasSecondmentStatus' => null ]; /** @@ -83,10 +83,10 @@ class ContractOverseasEmployerDetails implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ - 'overseasEmployer' => false, - 'overseasSecondmentStatus' => false, 'eeaCitizen' => false, - 'epm6Scheme' => false + 'epm6Scheme' => false, + 'overseasEmployer' => false, + 'overseasSecondmentStatus' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'overseasEmployer' => 'overseasEmployer', - 'overseasSecondmentStatus' => 'overseasSecondmentStatus', 'eeaCitizen' => 'eeaCitizen', - 'epm6Scheme' => 'epm6Scheme' + 'epm6Scheme' => 'epm6Scheme', + 'overseasEmployer' => 'overseasEmployer', + 'overseasSecondmentStatus' => 'overseasSecondmentStatus' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'overseasEmployer' => 'setOverseasEmployer', - 'overseasSecondmentStatus' => 'setOverseasSecondmentStatus', 'eeaCitizen' => 'setEeaCitizen', - 'epm6Scheme' => 'setEpm6Scheme' + 'epm6Scheme' => 'setEpm6Scheme', + 'overseasEmployer' => 'setOverseasEmployer', + 'overseasSecondmentStatus' => 'setOverseasSecondmentStatus' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'overseasEmployer' => 'getOverseasEmployer', - 'overseasSecondmentStatus' => 'getOverseasSecondmentStatus', 'eeaCitizen' => 'getEeaCitizen', - 'epm6Scheme' => 'getEpm6Scheme' + 'epm6Scheme' => 'getEpm6Scheme', + 'overseasEmployer' => 'getOverseasEmployer', + 'overseasSecondmentStatus' => 'getOverseasSecondmentStatus' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('overseasEmployer', $data ?? [], null); - $this->setIfExists('overseasSecondmentStatus', $data ?? [], null); $this->setIfExists('eeaCitizen', $data ?? [], null); $this->setIfExists('epm6Scheme', $data ?? [], null); + $this->setIfExists('overseasEmployer', $data ?? [], null); + $this->setIfExists('overseasSecondmentStatus', $data ?? [], null); } /** @@ -310,109 +310,109 @@ public function valid(): bool /** - * Gets overseasEmployer + * Gets eeaCitizen * * @return bool|null */ - public function getOverseasEmployer(): ?bool + public function getEeaCitizen(): ?bool { - return $this->container['overseasEmployer']; + return $this->container['eeaCitizen']; } /** - * Sets overseasEmployer + * Sets eeaCitizen * - * @param bool|null $overseasEmployer overseasEmployer + * @param bool|null $eeaCitizen eeaCitizen * * @return $this */ - public function setOverseasEmployer(?bool $overseasEmployer): static + public function setEeaCitizen(?bool $eeaCitizen): static { - if (is_null($overseasEmployer)) { - throw new InvalidArgumentException('non-nullable overseasEmployer cannot be null'); + if (is_null($eeaCitizen)) { + throw new InvalidArgumentException('non-nullable eeaCitizen cannot be null'); } - $this->container['overseasEmployer'] = $overseasEmployer; + $this->container['eeaCitizen'] = $eeaCitizen; return $this; } /** - * Gets overseasSecondmentStatus + * Gets epm6Scheme * - * @return \SynergiTech\Staffology\Model\OverseasSecondmentStatus|null + * @return bool|null */ - public function getOverseasSecondmentStatus(): ?\SynergiTech\Staffology\Model\OverseasSecondmentStatus + public function getEpm6Scheme(): ?bool { - return $this->container['overseasSecondmentStatus']; + return $this->container['epm6Scheme']; } /** - * Sets overseasSecondmentStatus + * Sets epm6Scheme * - * @param \SynergiTech\Staffology\Model\OverseasSecondmentStatus|null $overseasSecondmentStatus overseasSecondmentStatus + * @param bool|null $epm6Scheme epm6Scheme * * @return $this */ - public function setOverseasSecondmentStatus(?\SynergiTech\Staffology\Model\OverseasSecondmentStatus $overseasSecondmentStatus): static + public function setEpm6Scheme(?bool $epm6Scheme): static { - if (is_null($overseasSecondmentStatus)) { - throw new InvalidArgumentException('non-nullable overseasSecondmentStatus cannot be null'); + if (is_null($epm6Scheme)) { + throw new InvalidArgumentException('non-nullable epm6Scheme cannot be null'); } - $this->container['overseasSecondmentStatus'] = $overseasSecondmentStatus; + $this->container['epm6Scheme'] = $epm6Scheme; return $this; } /** - * Gets eeaCitizen + * Gets overseasEmployer * * @return bool|null */ - public function getEeaCitizen(): ?bool + public function getOverseasEmployer(): ?bool { - return $this->container['eeaCitizen']; + return $this->container['overseasEmployer']; } /** - * Sets eeaCitizen + * Sets overseasEmployer * - * @param bool|null $eeaCitizen eeaCitizen + * @param bool|null $overseasEmployer overseasEmployer * * @return $this */ - public function setEeaCitizen(?bool $eeaCitizen): static + public function setOverseasEmployer(?bool $overseasEmployer): static { - if (is_null($eeaCitizen)) { - throw new InvalidArgumentException('non-nullable eeaCitizen cannot be null'); + if (is_null($overseasEmployer)) { + throw new InvalidArgumentException('non-nullable overseasEmployer cannot be null'); } - $this->container['eeaCitizen'] = $eeaCitizen; + $this->container['overseasEmployer'] = $overseasEmployer; return $this; } /** - * Gets epm6Scheme + * Gets overseasSecondmentStatus * - * @return bool|null + * @return \SynergiTech\Staffology\Model\OverseasSecondmentStatus|null */ - public function getEpm6Scheme(): ?bool + public function getOverseasSecondmentStatus(): ?\SynergiTech\Staffology\Model\OverseasSecondmentStatus { - return $this->container['epm6Scheme']; + return $this->container['overseasSecondmentStatus']; } /** - * Sets epm6Scheme + * Sets overseasSecondmentStatus * - * @param bool|null $epm6Scheme epm6Scheme + * @param \SynergiTech\Staffology\Model\OverseasSecondmentStatus|null $overseasSecondmentStatus overseasSecondmentStatus * * @return $this */ - public function setEpm6Scheme(?bool $epm6Scheme): static + public function setOverseasSecondmentStatus(?\SynergiTech\Staffology\Model\OverseasSecondmentStatus $overseasSecondmentStatus): static { - if (is_null($epm6Scheme)) { - throw new InvalidArgumentException('non-nullable epm6Scheme cannot be null'); + if (is_null($overseasSecondmentStatus)) { + throw new InvalidArgumentException('non-nullable overseasSecondmentStatus cannot be null'); } - $this->container['epm6Scheme'] = $epm6Scheme; + $this->container['overseasSecondmentStatus'] = $overseasSecondmentStatus; return $this; } diff --git a/src/Model/ContractP11HistoryRequest.php b/src/Model/ContractP11HistoryRequest.php index 0226f73..7b62cf4 100644 --- a/src/Model/ContractP11HistoryRequest.php +++ b/src/Model/ContractP11HistoryRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class ContractP11HistoryRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPITypes = [ - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'niablePay' => 'float', + 'payDate' => '\DateTime', 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'periodNumber' => 'int', - 'niablePay' => 'float', - 'payDate' => '\DateTime' + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear' ]; /** @@ -72,11 +72,11 @@ class ContractP11HistoryRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPIFormats = [ - 'taxYear' => null, + 'niablePay' => 'double', + 'payDate' => 'date', 'payPeriod' => null, 'periodNumber' => 'int32', - 'niablePay' => 'double', - 'payDate' => 'date' + 'taxYear' => null ]; /** @@ -85,11 +85,11 @@ class ContractP11HistoryRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPINullables = [ - 'taxYear' => false, + 'niablePay' => false, + 'payDate' => false, 'payPeriod' => false, 'periodNumber' => false, - 'niablePay' => false, - 'payDate' => false + 'taxYear' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'taxYear' => 'taxYear', + 'niablePay' => 'niablePay', + 'payDate' => 'payDate', 'payPeriod' => 'payPeriod', 'periodNumber' => 'periodNumber', - 'niablePay' => 'niablePay', - 'payDate' => 'payDate' + 'taxYear' => 'taxYear' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'taxYear' => 'setTaxYear', + 'niablePay' => 'setNiablePay', + 'payDate' => 'setPayDate', 'payPeriod' => 'setPayPeriod', 'periodNumber' => 'setPeriodNumber', - 'niablePay' => 'setNiablePay', - 'payDate' => 'setPayDate' + 'taxYear' => 'setTaxYear' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'taxYear' => 'getTaxYear', + 'niablePay' => 'getNiablePay', + 'payDate' => 'getPayDate', 'payPeriod' => 'getPayPeriod', 'periodNumber' => 'getPeriodNumber', - 'niablePay' => 'getNiablePay', - 'payDate' => 'getPayDate' + 'taxYear' => 'getTaxYear' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); - $this->setIfExists('periodNumber', $data ?? [], null); $this->setIfExists('niablePay', $data ?? [], null); $this->setIfExists('payDate', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('periodNumber', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); } /** @@ -317,28 +317,55 @@ public function valid(): bool /** - * Gets taxYear + * Gets niablePay * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return float|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getNiablePay(): ?float { - return $this->container['taxYear']; + return $this->container['niablePay']; } /** - * Sets taxYear + * Sets niablePay * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param float|null $niablePay niablePay * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setNiablePay(?float $niablePay): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($niablePay)) { + throw new InvalidArgumentException('non-nullable niablePay cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['niablePay'] = $niablePay; + + return $this; + } + + /** + * Gets payDate + * + * @return \DateTime|null + */ + public function getPayDate(): ?\DateTime + { + return $this->container['payDate']; + } + + /** + * Sets payDate + * + * @param \DateTime|null $payDate payDate + * + * @return $this + */ + public function setPayDate(?\DateTime $payDate): static + { + if (is_null($payDate)) { + throw new InvalidArgumentException('non-nullable payDate cannot be null'); + } + $this->container['payDate'] = $payDate; return $this; } @@ -398,55 +425,28 @@ public function setPeriodNumber(?int $periodNumber): static } /** - * Gets niablePay - * - * @return float|null - */ - public function getNiablePay(): ?float - { - return $this->container['niablePay']; - } - - /** - * Sets niablePay - * - * @param float|null $niablePay niablePay - * - * @return $this - */ - public function setNiablePay(?float $niablePay): static - { - if (is_null($niablePay)) { - throw new InvalidArgumentException('non-nullable niablePay cannot be null'); - } - $this->container['niablePay'] = $niablePay; - - return $this; - } - - /** - * Gets payDate + * Gets taxYear * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getPayDate(): ?\DateTime + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['payDate']; + return $this->container['taxYear']; } /** - * Sets payDate + * Sets taxYear * - * @param \DateTime|null $payDate payDate + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setPayDate(?\DateTime $payDate): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($payDate)) { - throw new InvalidArgumentException('non-nullable payDate cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['payDate'] = $payDate; + $this->container['taxYear'] = $taxYear; return $this; } diff --git a/src/Model/ContractP11HistoryResponse.php b/src/Model/ContractP11HistoryResponse.php index 1eb9aee..45721e3 100644 --- a/src/Model/ContractP11HistoryResponse.php +++ b/src/Model/ContractP11HistoryResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,11 +60,11 @@ class ContractP11HistoryResponse implements ModelInterface, ArrayAccess, JsonSer */ protected static array $openAPITypes = [ 'id' => 'string', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'niablePay' => 'float', + 'payDate' => '\DateTime', 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'periodNumber' => 'int', - 'niablePay' => 'float', - 'payDate' => '\DateTime' + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear' ]; /** @@ -74,11 +74,11 @@ class ContractP11HistoryResponse implements ModelInterface, ArrayAccess, JsonSer */ protected static array $openAPIFormats = [ 'id' => 'uuid', - 'taxYear' => null, + 'niablePay' => 'double', + 'payDate' => 'date', 'payPeriod' => null, 'periodNumber' => 'int32', - 'niablePay' => 'double', - 'payDate' => 'date' + 'taxYear' => null ]; /** @@ -88,11 +88,11 @@ class ContractP11HistoryResponse implements ModelInterface, ArrayAccess, JsonSer */ protected static array $openAPINullables = [ 'id' => false, - 'taxYear' => false, + 'niablePay' => false, + 'payDate' => false, 'payPeriod' => false, 'periodNumber' => false, - 'niablePay' => false, - 'payDate' => false + 'taxYear' => false ]; /** @@ -182,11 +182,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'id' => 'id', - 'taxYear' => 'taxYear', + 'niablePay' => 'niablePay', + 'payDate' => 'payDate', 'payPeriod' => 'payPeriod', 'periodNumber' => 'periodNumber', - 'niablePay' => 'niablePay', - 'payDate' => 'payDate' + 'taxYear' => 'taxYear' ]; /** @@ -196,11 +196,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'id' => 'setId', - 'taxYear' => 'setTaxYear', + 'niablePay' => 'setNiablePay', + 'payDate' => 'setPayDate', 'payPeriod' => 'setPayPeriod', 'periodNumber' => 'setPeriodNumber', - 'niablePay' => 'setNiablePay', - 'payDate' => 'setPayDate' + 'taxYear' => 'setTaxYear' ]; /** @@ -210,11 +210,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'id' => 'getId', - 'taxYear' => 'getTaxYear', + 'niablePay' => 'getNiablePay', + 'payDate' => 'getPayDate', 'payPeriod' => 'getPayPeriod', 'periodNumber' => 'getPeriodNumber', - 'niablePay' => 'getNiablePay', - 'payDate' => 'getPayDate' + 'taxYear' => 'getTaxYear' ]; /** @@ -274,11 +274,11 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); - $this->setIfExists('periodNumber', $data ?? [], null); $this->setIfExists('niablePay', $data ?? [], null); $this->setIfExists('payDate', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('periodNumber', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); } /** @@ -351,28 +351,55 @@ public function setId(?string $id): static } /** - * Gets taxYear + * Gets niablePay * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return float|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getNiablePay(): ?float { - return $this->container['taxYear']; + return $this->container['niablePay']; } /** - * Sets taxYear + * Sets niablePay * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param float|null $niablePay niablePay * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setNiablePay(?float $niablePay): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($niablePay)) { + throw new InvalidArgumentException('non-nullable niablePay cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['niablePay'] = $niablePay; + + return $this; + } + + /** + * Gets payDate + * + * @return \DateTime|null + */ + public function getPayDate(): ?\DateTime + { + return $this->container['payDate']; + } + + /** + * Sets payDate + * + * @param \DateTime|null $payDate payDate + * + * @return $this + */ + public function setPayDate(?\DateTime $payDate): static + { + if (is_null($payDate)) { + throw new InvalidArgumentException('non-nullable payDate cannot be null'); + } + $this->container['payDate'] = $payDate; return $this; } @@ -432,55 +459,28 @@ public function setPeriodNumber(?int $periodNumber): static } /** - * Gets niablePay - * - * @return float|null - */ - public function getNiablePay(): ?float - { - return $this->container['niablePay']; - } - - /** - * Sets niablePay - * - * @param float|null $niablePay niablePay - * - * @return $this - */ - public function setNiablePay(?float $niablePay): static - { - if (is_null($niablePay)) { - throw new InvalidArgumentException('non-nullable niablePay cannot be null'); - } - $this->container['niablePay'] = $niablePay; - - return $this; - } - - /** - * Gets payDate + * Gets taxYear * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getPayDate(): ?\DateTime + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['payDate']; + return $this->container['taxYear']; } /** - * Sets payDate + * Sets taxYear * - * @param \DateTime|null $payDate payDate + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setPayDate(?\DateTime $payDate): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($payDate)) { - throw new InvalidArgumentException('non-nullable payDate cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['payDate'] = $payDate; + $this->container['taxYear'] = $taxYear; return $this; } diff --git a/src/Model/ContractP45AvailabilityResponse.php b/src/Model/ContractP45AvailabilityResponse.php new file mode 100644 index 0000000..70810bd --- /dev/null +++ b/src/Model/ContractP45AvailabilityResponse.php @@ -0,0 +1,510 @@ + + */ +class ContractP45AvailabilityResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.P45AvailabilityResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'isLeaverPresent' => 'bool', + 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'period' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'isLeaverPresent' => null, + 'ordinal' => 'int32', + 'payPeriod' => null, + 'period' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'isLeaverPresent' => false, + 'ordinal' => false, + 'payPeriod' => false, + 'period' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'isLeaverPresent' => 'isLeaverPresent', + 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', + 'period' => 'period' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'isLeaverPresent' => 'setIsLeaverPresent', + 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', + 'period' => 'setPeriod' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'isLeaverPresent' => 'getIsLeaverPresent', + 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', + 'period' => 'getPeriod' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('isLeaverPresent', $data ?? [], null); + $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('period', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets isLeaverPresent + * + * @return bool|null + */ + public function getIsLeaverPresent(): ?bool + { + return $this->container['isLeaverPresent']; + } + + /** + * Sets isLeaverPresent + * + * @param bool|null $isLeaverPresent Indicates if a leaver is present in the pay run + * + * @return $this + */ + public function setIsLeaverPresent(?bool $isLeaverPresent): static + { + if (is_null($isLeaverPresent)) { + throw new InvalidArgumentException('non-nullable isLeaverPresent cannot be null'); + } + $this->container['isLeaverPresent'] = $isLeaverPresent; + + return $this; + } + + /** + * Gets ordinal + * + * @return int|null + */ + public function getOrdinal(): ?int + { + return $this->container['ordinal']; + } + + /** + * Sets ordinal + * + * @param int|null $ordinal The Ordinal of the PayRun + * + * @return $this + */ + public function setOrdinal(?int $ordinal): static + { + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + } + $this->container['ordinal'] = $ordinal; + + return $this; + } + + /** + * Gets payPeriod + * + * @return \SynergiTech\Staffology\Model\PayPeriods|null + */ + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + { + return $this->container['payPeriod']; + } + + /** + * Sets payPeriod + * + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * + * @return $this + */ + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + { + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + } + $this->container['payPeriod'] = $payPeriod; + + return $this; + } + + /** + * Gets period + * + * @return int|null + */ + public function getPeriod(): ?int + { + return $this->container['period']; + } + + /** + * Sets period + * + * @param int|null $period The Period (i.e, Tax Week or Tax Month) of the PayRun + * + * @return $this + */ + public function setPeriod(?int $period): static + { + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); + } + $this->container['period'] = $period; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractPartnerDetails.php b/src/Model/ContractPartnerDetails.php index b3c22f0..1ff761f 100644 --- a/src/Model/ContractPartnerDetails.php +++ b/src/Model/ContractPartnerDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractPayHistoryRequest.php b/src/Model/ContractPayHistoryRequest.php index 7a06067..6ee97e7 100644 --- a/src/Model/ContractPayHistoryRequest.php +++ b/src/Model/ContractPayHistoryRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,16 @@ class ContractPayHistoryRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPITypes = [ + 'days' => 'float', 'employeeId' => 'string', 'employeeRoleId' => 'string', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYearTypes', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriodTypes', - 'periodNumber' => 'int', - 'payAmount' => 'float', 'hours' => 'float', 'isStatutoryPayOnly' => 'bool', - 'paymentDate' => '\DateTime' + 'payAmount' => 'float', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriodTypes', + 'paymentDate' => '\DateTime', + 'periodNumber' => 'int', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYearTypes' ]; /** @@ -76,15 +77,16 @@ class ContractPayHistoryRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPIFormats = [ + 'days' => 'double', 'employeeId' => 'uuid', 'employeeRoleId' => 'uuid', - 'taxYear' => null, - 'payPeriod' => null, - 'periodNumber' => 'int32', - 'payAmount' => 'double', 'hours' => 'double', 'isStatutoryPayOnly' => null, - 'paymentDate' => 'date' + 'payAmount' => 'double', + 'payPeriod' => null, + 'paymentDate' => 'date', + 'periodNumber' => 'int32', + 'taxYear' => null ]; /** @@ -93,15 +95,16 @@ class ContractPayHistoryRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPINullables = [ + 'days' => false, 'employeeId' => false, 'employeeRoleId' => false, - 'taxYear' => false, - 'payPeriod' => false, - 'periodNumber' => false, - 'payAmount' => false, 'hours' => false, 'isStatutoryPayOnly' => false, - 'paymentDate' => false + 'payAmount' => false, + 'payPeriod' => false, + 'paymentDate' => false, + 'periodNumber' => false, + 'taxYear' => false ]; /** @@ -190,15 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'days' => 'days', 'employeeId' => 'employeeId', 'employeeRoleId' => 'employeeRoleId', - 'taxYear' => 'taxYear', - 'payPeriod' => 'payPeriod', - 'periodNumber' => 'periodNumber', - 'payAmount' => 'payAmount', 'hours' => 'hours', 'isStatutoryPayOnly' => 'isStatutoryPayOnly', - 'paymentDate' => 'paymentDate' + 'payAmount' => 'payAmount', + 'payPeriod' => 'payPeriod', + 'paymentDate' => 'paymentDate', + 'periodNumber' => 'periodNumber', + 'taxYear' => 'taxYear' ]; /** @@ -207,15 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'days' => 'setDays', 'employeeId' => 'setEmployeeId', 'employeeRoleId' => 'setEmployeeRoleId', - 'taxYear' => 'setTaxYear', - 'payPeriod' => 'setPayPeriod', - 'periodNumber' => 'setPeriodNumber', - 'payAmount' => 'setPayAmount', 'hours' => 'setHours', 'isStatutoryPayOnly' => 'setIsStatutoryPayOnly', - 'paymentDate' => 'setPaymentDate' + 'payAmount' => 'setPayAmount', + 'payPeriod' => 'setPayPeriod', + 'paymentDate' => 'setPaymentDate', + 'periodNumber' => 'setPeriodNumber', + 'taxYear' => 'setTaxYear' ]; /** @@ -224,15 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'days' => 'getDays', 'employeeId' => 'getEmployeeId', 'employeeRoleId' => 'getEmployeeRoleId', - 'taxYear' => 'getTaxYear', - 'payPeriod' => 'getPayPeriod', - 'periodNumber' => 'getPeriodNumber', - 'payAmount' => 'getPayAmount', 'hours' => 'getHours', 'isStatutoryPayOnly' => 'getIsStatutoryPayOnly', - 'paymentDate' => 'getPaymentDate' + 'payAmount' => 'getPayAmount', + 'payPeriod' => 'getPayPeriod', + 'paymentDate' => 'getPaymentDate', + 'periodNumber' => 'getPeriodNumber', + 'taxYear' => 'getTaxYear' ]; /** @@ -291,15 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('days', $data ?? [], null); $this->setIfExists('employeeId', $data ?? [], null); $this->setIfExists('employeeRoleId', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); - $this->setIfExists('periodNumber', $data ?? [], null); - $this->setIfExists('payAmount', $data ?? [], null); $this->setIfExists('hours', $data ?? [], null); $this->setIfExists('isStatutoryPayOnly', $data ?? [], null); + $this->setIfExists('payAmount', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('paymentDate', $data ?? [], null); + $this->setIfExists('periodNumber', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); } /** @@ -344,6 +351,33 @@ public function valid(): bool } + /** + * Gets days + * + * @return float|null + */ + public function getDays(): ?float + { + return $this->container['days']; + } + + /** + * Sets days + * + * @param float|null $days decimal amount of days worked, if not provided then 0 + * + * @return $this + */ + public function setDays(?float $days): static + { + if (is_null($days)) { + throw new InvalidArgumentException('non-nullable days cannot be null'); + } + $this->container['days'] = $days; + + return $this; + } + /** * Gets employeeId * @@ -399,190 +433,190 @@ public function setEmployeeRoleId(?string $employeeRoleId): static } /** - * Gets taxYear + * Gets hours * - * @return \SynergiTech\Staffology\Model\TaxYearTypes|null + * @return float|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYearTypes + public function getHours(): ?float { - return $this->container['taxYear']; + return $this->container['hours']; } /** - * Sets taxYear + * Sets hours * - * @param \SynergiTech\Staffology\Model\TaxYearTypes|null $taxYear taxYear + * @param float|null $hours decimal amount of hours worked, if not provided then 0 * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYearTypes $taxYear): static + public function setHours(?float $hours): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($hours)) { + throw new InvalidArgumentException('non-nullable hours cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['hours'] = $hours; return $this; } /** - * Gets payPeriod + * Gets isStatutoryPayOnly * - * @return \SynergiTech\Staffology\Model\PayPeriodTypes|null + * @return bool|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriodTypes + public function getIsStatutoryPayOnly(): ?bool { - return $this->container['payPeriod']; + return $this->container['isStatutoryPayOnly']; } /** - * Sets payPeriod + * Sets isStatutoryPayOnly * - * @param \SynergiTech\Staffology\Model\PayPeriodTypes|null $payPeriod payPeriod + * @param bool|null $isStatutoryPayOnly optional boolean flag, if the period only had SXP present * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriodTypes $payPeriod): static + public function setIsStatutoryPayOnly(?bool $isStatutoryPayOnly): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($isStatutoryPayOnly)) { + throw new InvalidArgumentException('non-nullable isStatutoryPayOnly cannot be null'); } - $this->container['payPeriod'] = $payPeriod; + $this->container['isStatutoryPayOnly'] = $isStatutoryPayOnly; return $this; } /** - * Gets periodNumber + * Gets payAmount * - * @return int|null + * @return float|null */ - public function getPeriodNumber(): ?int + public function getPayAmount(): ?float { - return $this->container['periodNumber']; + return $this->container['payAmount']; } /** - * Sets periodNumber + * Sets payAmount * - * @param int|null $periodNumber Tax Week or Tax Month number this PayRunEntry relates to + * @param float|null $payAmount monetary amount for given period, if not provided then 0 * * @return $this */ - public function setPeriodNumber(?int $periodNumber): static + public function setPayAmount(?float $payAmount): static { - if (is_null($periodNumber)) { - throw new InvalidArgumentException('non-nullable periodNumber cannot be null'); + if (is_null($payAmount)) { + throw new InvalidArgumentException('non-nullable payAmount cannot be null'); } - $this->container['periodNumber'] = $periodNumber; + $this->container['payAmount'] = $payAmount; return $this; } /** - * Gets payAmount + * Gets payPeriod * - * @return float|null + * @return \SynergiTech\Staffology\Model\PayPeriodTypes|null */ - public function getPayAmount(): ?float + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriodTypes { - return $this->container['payAmount']; + return $this->container['payPeriod']; } /** - * Sets payAmount + * Sets payPeriod * - * @param float|null $payAmount monetary amount for given period, if not provided then 0 + * @param \SynergiTech\Staffology\Model\PayPeriodTypes|null $payPeriod payPeriod * * @return $this */ - public function setPayAmount(?float $payAmount): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriodTypes $payPeriod): static { - if (is_null($payAmount)) { - throw new InvalidArgumentException('non-nullable payAmount cannot be null'); + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['payAmount'] = $payAmount; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets hours + * Gets paymentDate * - * @return float|null + * @return \DateTime|null */ - public function getHours(): ?float + public function getPaymentDate(): ?\DateTime { - return $this->container['hours']; + return $this->container['paymentDate']; } /** - * Sets hours + * Sets paymentDate * - * @param float|null $hours decimal amount of hours worked, if not provided then 0 + * @param \DateTime|null $paymentDate The date payment was made for respective period * * @return $this */ - public function setHours(?float $hours): static + public function setPaymentDate(?\DateTime $paymentDate): static { - if (is_null($hours)) { - throw new InvalidArgumentException('non-nullable hours cannot be null'); + if (is_null($paymentDate)) { + throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); } - $this->container['hours'] = $hours; + $this->container['paymentDate'] = $paymentDate; return $this; } /** - * Gets isStatutoryPayOnly + * Gets periodNumber * - * @return bool|null + * @return int|null */ - public function getIsStatutoryPayOnly(): ?bool + public function getPeriodNumber(): ?int { - return $this->container['isStatutoryPayOnly']; + return $this->container['periodNumber']; } /** - * Sets isStatutoryPayOnly + * Sets periodNumber * - * @param bool|null $isStatutoryPayOnly optional boolean flag, if the period only had SXP present + * @param int|null $periodNumber Tax Week or Tax Month number this PayRunEntry relates to * * @return $this */ - public function setIsStatutoryPayOnly(?bool $isStatutoryPayOnly): static + public function setPeriodNumber(?int $periodNumber): static { - if (is_null($isStatutoryPayOnly)) { - throw new InvalidArgumentException('non-nullable isStatutoryPayOnly cannot be null'); + if (is_null($periodNumber)) { + throw new InvalidArgumentException('non-nullable periodNumber cannot be null'); } - $this->container['isStatutoryPayOnly'] = $isStatutoryPayOnly; + $this->container['periodNumber'] = $periodNumber; return $this; } /** - * Gets paymentDate + * Gets taxYear * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\TaxYearTypes|null */ - public function getPaymentDate(): ?\DateTime + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYearTypes { - return $this->container['paymentDate']; + return $this->container['taxYear']; } /** - * Sets paymentDate + * Sets taxYear * - * @param \DateTime|null $paymentDate The date payment was made for respective period + * @param \SynergiTech\Staffology\Model\TaxYearTypes|null $taxYear taxYear * * @return $this */ - public function setPaymentDate(?\DateTime $paymentDate): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYearTypes $taxYear): static { - if (is_null($paymentDate)) { - throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['paymentDate'] = $paymentDate; + $this->container['taxYear'] = $taxYear; return $this; } diff --git a/src/Model/ContractPayHistoryResponse.php b/src/Model/ContractPayHistoryResponse.php index dfd1c28..e6e0e7f 100644 --- a/src/Model/ContractPayHistoryResponse.php +++ b/src/Model/ContractPayHistoryResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,17 @@ class ContractPayHistoryResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', + 'days' => 'float', 'employeeId' => 'string', 'employeeRoleId' => 'string', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYearTypes', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriodTypes', - 'periodNumber' => 'int', - 'payAmount' => 'float', 'hours' => 'float', + 'id' => 'string', 'isStatutoryPayOnly' => 'bool', - 'paymentDate' => '\DateTime' + 'payAmount' => 'float', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriodTypes', + 'paymentDate' => '\DateTime', + 'periodNumber' => 'int', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYearTypes' ]; /** @@ -77,16 +78,17 @@ class ContractPayHistoryResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', + 'days' => 'double', 'employeeId' => 'uuid', 'employeeRoleId' => 'uuid', - 'taxYear' => null, - 'payPeriod' => null, - 'periodNumber' => 'int32', - 'payAmount' => 'double', 'hours' => 'double', + 'id' => 'uuid', 'isStatutoryPayOnly' => null, - 'paymentDate' => 'date' + 'payAmount' => 'double', + 'payPeriod' => null, + 'paymentDate' => 'date', + 'periodNumber' => 'int32', + 'taxYear' => null ]; /** @@ -95,16 +97,17 @@ class ContractPayHistoryResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'id' => false, + 'days' => false, 'employeeId' => false, 'employeeRoleId' => false, - 'taxYear' => false, - 'payPeriod' => false, - 'periodNumber' => false, - 'payAmount' => false, 'hours' => false, + 'id' => false, 'isStatutoryPayOnly' => false, - 'paymentDate' => false + 'payAmount' => false, + 'payPeriod' => false, + 'paymentDate' => false, + 'periodNumber' => false, + 'taxYear' => false ]; /** @@ -193,16 +196,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', + 'days' => 'days', 'employeeId' => 'employeeId', 'employeeRoleId' => 'employeeRoleId', - 'taxYear' => 'taxYear', - 'payPeriod' => 'payPeriod', - 'periodNumber' => 'periodNumber', - 'payAmount' => 'payAmount', 'hours' => 'hours', + 'id' => 'id', 'isStatutoryPayOnly' => 'isStatutoryPayOnly', - 'paymentDate' => 'paymentDate' + 'payAmount' => 'payAmount', + 'payPeriod' => 'payPeriod', + 'paymentDate' => 'paymentDate', + 'periodNumber' => 'periodNumber', + 'taxYear' => 'taxYear' ]; /** @@ -211,16 +215,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', + 'days' => 'setDays', 'employeeId' => 'setEmployeeId', 'employeeRoleId' => 'setEmployeeRoleId', - 'taxYear' => 'setTaxYear', - 'payPeriod' => 'setPayPeriod', - 'periodNumber' => 'setPeriodNumber', - 'payAmount' => 'setPayAmount', 'hours' => 'setHours', + 'id' => 'setId', 'isStatutoryPayOnly' => 'setIsStatutoryPayOnly', - 'paymentDate' => 'setPaymentDate' + 'payAmount' => 'setPayAmount', + 'payPeriod' => 'setPayPeriod', + 'paymentDate' => 'setPaymentDate', + 'periodNumber' => 'setPeriodNumber', + 'taxYear' => 'setTaxYear' ]; /** @@ -229,16 +234,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', + 'days' => 'getDays', 'employeeId' => 'getEmployeeId', 'employeeRoleId' => 'getEmployeeRoleId', - 'taxYear' => 'getTaxYear', - 'payPeriod' => 'getPayPeriod', - 'periodNumber' => 'getPeriodNumber', - 'payAmount' => 'getPayAmount', 'hours' => 'getHours', + 'id' => 'getId', 'isStatutoryPayOnly' => 'getIsStatutoryPayOnly', - 'paymentDate' => 'getPaymentDate' + 'payAmount' => 'getPayAmount', + 'payPeriod' => 'getPayPeriod', + 'paymentDate' => 'getPaymentDate', + 'periodNumber' => 'getPeriodNumber', + 'taxYear' => 'getTaxYear' ]; /** @@ -297,16 +303,17 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('days', $data ?? [], null); $this->setIfExists('employeeId', $data ?? [], null); $this->setIfExists('employeeRoleId', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); - $this->setIfExists('periodNumber', $data ?? [], null); - $this->setIfExists('payAmount', $data ?? [], null); $this->setIfExists('hours', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('isStatutoryPayOnly', $data ?? [], null); + $this->setIfExists('payAmount', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('paymentDate', $data ?? [], null); + $this->setIfExists('periodNumber', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); } /** @@ -352,28 +359,28 @@ public function valid(): bool /** - * Gets id + * Gets days * - * @return string|null + * @return float|null */ - public function getId(): ?string + public function getDays(): ?float { - return $this->container['id']; + return $this->container['days']; } /** - * Sets id + * Sets days * - * @param string|null $id Average Holiday Pay History identifier + * @param float|null $days decimal amount of days worked, if not provided then 0 * * @return $this */ - public function setId(?string $id): static + public function setDays(?float $days): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($days)) { + throw new InvalidArgumentException('non-nullable days cannot be null'); } - $this->container['id'] = $id; + $this->container['days'] = $days; return $this; } @@ -433,82 +440,82 @@ public function setEmployeeRoleId(?string $employeeRoleId): static } /** - * Gets taxYear + * Gets hours * - * @return \SynergiTech\Staffology\Model\TaxYearTypes|null + * @return float|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYearTypes + public function getHours(): ?float { - return $this->container['taxYear']; + return $this->container['hours']; } /** - * Sets taxYear + * Sets hours * - * @param \SynergiTech\Staffology\Model\TaxYearTypes|null $taxYear taxYear + * @param float|null $hours decimal amount of hours worked, if not provided then 0 * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYearTypes $taxYear): static + public function setHours(?float $hours): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($hours)) { + throw new InvalidArgumentException('non-nullable hours cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['hours'] = $hours; return $this; } /** - * Gets payPeriod + * Gets id * - * @return \SynergiTech\Staffology\Model\PayPeriodTypes|null + * @return string|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriodTypes + public function getId(): ?string { - return $this->container['payPeriod']; + return $this->container['id']; } /** - * Sets payPeriod + * Sets id * - * @param \SynergiTech\Staffology\Model\PayPeriodTypes|null $payPeriod payPeriod + * @param string|null $id Average Holiday Pay History identifier * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriodTypes $payPeriod): static + public function setId(?string $id): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['payPeriod'] = $payPeriod; + $this->container['id'] = $id; return $this; } /** - * Gets periodNumber + * Gets isStatutoryPayOnly * - * @return int|null + * @return bool|null */ - public function getPeriodNumber(): ?int + public function getIsStatutoryPayOnly(): ?bool { - return $this->container['periodNumber']; + return $this->container['isStatutoryPayOnly']; } /** - * Sets periodNumber + * Sets isStatutoryPayOnly * - * @param int|null $periodNumber Tax Week or Tax Month number this PayRunEntry relates to + * @param bool|null $isStatutoryPayOnly optional boolean flag, if the period only had SXP present * * @return $this */ - public function setPeriodNumber(?int $periodNumber): static + public function setIsStatutoryPayOnly(?bool $isStatutoryPayOnly): static { - if (is_null($periodNumber)) { - throw new InvalidArgumentException('non-nullable periodNumber cannot be null'); + if (is_null($isStatutoryPayOnly)) { + throw new InvalidArgumentException('non-nullable isStatutoryPayOnly cannot be null'); } - $this->container['periodNumber'] = $periodNumber; + $this->container['isStatutoryPayOnly'] = $isStatutoryPayOnly; return $this; } @@ -541,82 +548,109 @@ public function setPayAmount(?float $payAmount): static } /** - * Gets hours + * Gets payPeriod * - * @return float|null + * @return \SynergiTech\Staffology\Model\PayPeriodTypes|null */ - public function getHours(): ?float + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriodTypes { - return $this->container['hours']; + return $this->container['payPeriod']; } /** - * Sets hours + * Sets payPeriod * - * @param float|null $hours decimal amount of hours worked, if not provided then 0 + * @param \SynergiTech\Staffology\Model\PayPeriodTypes|null $payPeriod payPeriod * * @return $this */ - public function setHours(?float $hours): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriodTypes $payPeriod): static { - if (is_null($hours)) { - throw new InvalidArgumentException('non-nullable hours cannot be null'); + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['hours'] = $hours; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets isStatutoryPayOnly + * Gets paymentDate * - * @return bool|null + * @return \DateTime|null */ - public function getIsStatutoryPayOnly(): ?bool + public function getPaymentDate(): ?\DateTime { - return $this->container['isStatutoryPayOnly']; + return $this->container['paymentDate']; } /** - * Sets isStatutoryPayOnly + * Sets paymentDate * - * @param bool|null $isStatutoryPayOnly optional boolean flag, if the period only had SXP present + * @param \DateTime|null $paymentDate The date payment was made for respective period * * @return $this */ - public function setIsStatutoryPayOnly(?bool $isStatutoryPayOnly): static + public function setPaymentDate(?\DateTime $paymentDate): static { - if (is_null($isStatutoryPayOnly)) { - throw new InvalidArgumentException('non-nullable isStatutoryPayOnly cannot be null'); + if (is_null($paymentDate)) { + throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); } - $this->container['isStatutoryPayOnly'] = $isStatutoryPayOnly; + $this->container['paymentDate'] = $paymentDate; return $this; } /** - * Gets paymentDate + * Gets periodNumber * - * @return \DateTime|null + * @return int|null */ - public function getPaymentDate(): ?\DateTime + public function getPeriodNumber(): ?int { - return $this->container['paymentDate']; + return $this->container['periodNumber']; } /** - * Sets paymentDate + * Sets periodNumber * - * @param \DateTime|null $paymentDate The date payment was made for respective period + * @param int|null $periodNumber Tax Week or Tax Month number this PayRunEntry relates to * * @return $this */ - public function setPaymentDate(?\DateTime $paymentDate): static + public function setPeriodNumber(?int $periodNumber): static { - if (is_null($paymentDate)) { - throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); + if (is_null($periodNumber)) { + throw new InvalidArgumentException('non-nullable periodNumber cannot be null'); } - $this->container['paymentDate'] = $paymentDate; + $this->container['periodNumber'] = $periodNumber; + + return $this; + } + + /** + * Gets taxYear + * + * @return \SynergiTech\Staffology\Model\TaxYearTypes|null + */ + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYearTypes + { + return $this->container['taxYear']; + } + + /** + * Sets taxYear + * + * @param \SynergiTech\Staffology\Model\TaxYearTypes|null $taxYear taxYear + * + * @return $this + */ + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYearTypes $taxYear): static + { + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + } + $this->container['taxYear'] = $taxYear; return $this; } diff --git a/src/Model/ContractPayHistoryUpdateRequest.php b/src/Model/ContractPayHistoryUpdateRequest.php index 430bb90..6351ca4 100644 --- a/src/Model/ContractPayHistoryUpdateRequest.php +++ b/src/Model/ContractPayHistoryUpdateRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,17 @@ class ContractPayHistoryUpdateRequest implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', + 'days' => 'float', 'employeeId' => 'string', 'employeeRoleId' => 'string', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYearTypes', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriodTypes', - 'periodNumber' => 'int', - 'payAmount' => 'float', 'hours' => 'float', + 'id' => 'string', 'isStatutoryPayOnly' => 'bool', - 'paymentDate' => '\DateTime' + 'payAmount' => 'float', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriodTypes', + 'paymentDate' => '\DateTime', + 'periodNumber' => 'int', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYearTypes' ]; /** @@ -77,16 +78,17 @@ class ContractPayHistoryUpdateRequest implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', + 'days' => 'double', 'employeeId' => 'uuid', 'employeeRoleId' => 'uuid', - 'taxYear' => null, - 'payPeriod' => null, - 'periodNumber' => 'int32', - 'payAmount' => 'double', 'hours' => 'double', + 'id' => 'uuid', 'isStatutoryPayOnly' => null, - 'paymentDate' => 'date' + 'payAmount' => 'double', + 'payPeriod' => null, + 'paymentDate' => 'date', + 'periodNumber' => 'int32', + 'taxYear' => null ]; /** @@ -95,16 +97,17 @@ class ContractPayHistoryUpdateRequest implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ - 'id' => false, + 'days' => false, 'employeeId' => false, 'employeeRoleId' => false, - 'taxYear' => false, - 'payPeriod' => false, - 'periodNumber' => false, - 'payAmount' => false, 'hours' => false, + 'id' => false, 'isStatutoryPayOnly' => false, - 'paymentDate' => false + 'payAmount' => false, + 'payPeriod' => false, + 'paymentDate' => false, + 'periodNumber' => false, + 'taxYear' => false ]; /** @@ -193,16 +196,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', + 'days' => 'days', 'employeeId' => 'employeeId', 'employeeRoleId' => 'employeeRoleId', - 'taxYear' => 'taxYear', - 'payPeriod' => 'payPeriod', - 'periodNumber' => 'periodNumber', - 'payAmount' => 'payAmount', 'hours' => 'hours', + 'id' => 'id', 'isStatutoryPayOnly' => 'isStatutoryPayOnly', - 'paymentDate' => 'paymentDate' + 'payAmount' => 'payAmount', + 'payPeriod' => 'payPeriod', + 'paymentDate' => 'paymentDate', + 'periodNumber' => 'periodNumber', + 'taxYear' => 'taxYear' ]; /** @@ -211,16 +215,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', + 'days' => 'setDays', 'employeeId' => 'setEmployeeId', 'employeeRoleId' => 'setEmployeeRoleId', - 'taxYear' => 'setTaxYear', - 'payPeriod' => 'setPayPeriod', - 'periodNumber' => 'setPeriodNumber', - 'payAmount' => 'setPayAmount', 'hours' => 'setHours', + 'id' => 'setId', 'isStatutoryPayOnly' => 'setIsStatutoryPayOnly', - 'paymentDate' => 'setPaymentDate' + 'payAmount' => 'setPayAmount', + 'payPeriod' => 'setPayPeriod', + 'paymentDate' => 'setPaymentDate', + 'periodNumber' => 'setPeriodNumber', + 'taxYear' => 'setTaxYear' ]; /** @@ -229,16 +234,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', + 'days' => 'getDays', 'employeeId' => 'getEmployeeId', 'employeeRoleId' => 'getEmployeeRoleId', - 'taxYear' => 'getTaxYear', - 'payPeriod' => 'getPayPeriod', - 'periodNumber' => 'getPeriodNumber', - 'payAmount' => 'getPayAmount', 'hours' => 'getHours', + 'id' => 'getId', 'isStatutoryPayOnly' => 'getIsStatutoryPayOnly', - 'paymentDate' => 'getPaymentDate' + 'payAmount' => 'getPayAmount', + 'payPeriod' => 'getPayPeriod', + 'paymentDate' => 'getPaymentDate', + 'periodNumber' => 'getPeriodNumber', + 'taxYear' => 'getTaxYear' ]; /** @@ -297,16 +303,17 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('days', $data ?? [], null); $this->setIfExists('employeeId', $data ?? [], null); $this->setIfExists('employeeRoleId', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); - $this->setIfExists('periodNumber', $data ?? [], null); - $this->setIfExists('payAmount', $data ?? [], null); $this->setIfExists('hours', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('isStatutoryPayOnly', $data ?? [], null); + $this->setIfExists('payAmount', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('paymentDate', $data ?? [], null); + $this->setIfExists('periodNumber', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); } /** @@ -352,28 +359,28 @@ public function valid(): bool /** - * Gets id + * Gets days * - * @return string|null + * @return float|null */ - public function getId(): ?string + public function getDays(): ?float { - return $this->container['id']; + return $this->container['days']; } /** - * Sets id + * Sets days * - * @param string|null $id Average Holiday Pay History identifier + * @param float|null $days decimal amount of days worked, if not provided then 0 * * @return $this */ - public function setId(?string $id): static + public function setDays(?float $days): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($days)) { + throw new InvalidArgumentException('non-nullable days cannot be null'); } - $this->container['id'] = $id; + $this->container['days'] = $days; return $this; } @@ -433,82 +440,82 @@ public function setEmployeeRoleId(?string $employeeRoleId): static } /** - * Gets taxYear + * Gets hours * - * @return \SynergiTech\Staffology\Model\TaxYearTypes|null + * @return float|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYearTypes + public function getHours(): ?float { - return $this->container['taxYear']; + return $this->container['hours']; } /** - * Sets taxYear + * Sets hours * - * @param \SynergiTech\Staffology\Model\TaxYearTypes|null $taxYear taxYear + * @param float|null $hours decimal amount of hours worked, if not provided then 0 * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYearTypes $taxYear): static + public function setHours(?float $hours): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($hours)) { + throw new InvalidArgumentException('non-nullable hours cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['hours'] = $hours; return $this; } /** - * Gets payPeriod + * Gets id * - * @return \SynergiTech\Staffology\Model\PayPeriodTypes|null + * @return string|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriodTypes + public function getId(): ?string { - return $this->container['payPeriod']; + return $this->container['id']; } /** - * Sets payPeriod + * Sets id * - * @param \SynergiTech\Staffology\Model\PayPeriodTypes|null $payPeriod payPeriod + * @param string|null $id Average Holiday Pay History identifier * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriodTypes $payPeriod): static + public function setId(?string $id): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['payPeriod'] = $payPeriod; + $this->container['id'] = $id; return $this; } /** - * Gets periodNumber + * Gets isStatutoryPayOnly * - * @return int|null + * @return bool|null */ - public function getPeriodNumber(): ?int + public function getIsStatutoryPayOnly(): ?bool { - return $this->container['periodNumber']; + return $this->container['isStatutoryPayOnly']; } /** - * Sets periodNumber + * Sets isStatutoryPayOnly * - * @param int|null $periodNumber Tax Week or Tax Month number this PayRunEntry relates to + * @param bool|null $isStatutoryPayOnly optional boolean flag, if the period only had SXP present * * @return $this */ - public function setPeriodNumber(?int $periodNumber): static + public function setIsStatutoryPayOnly(?bool $isStatutoryPayOnly): static { - if (is_null($periodNumber)) { - throw new InvalidArgumentException('non-nullable periodNumber cannot be null'); + if (is_null($isStatutoryPayOnly)) { + throw new InvalidArgumentException('non-nullable isStatutoryPayOnly cannot be null'); } - $this->container['periodNumber'] = $periodNumber; + $this->container['isStatutoryPayOnly'] = $isStatutoryPayOnly; return $this; } @@ -541,82 +548,109 @@ public function setPayAmount(?float $payAmount): static } /** - * Gets hours + * Gets payPeriod * - * @return float|null + * @return \SynergiTech\Staffology\Model\PayPeriodTypes|null */ - public function getHours(): ?float + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriodTypes { - return $this->container['hours']; + return $this->container['payPeriod']; } /** - * Sets hours + * Sets payPeriod * - * @param float|null $hours decimal amount of hours worked, if not provided then 0 + * @param \SynergiTech\Staffology\Model\PayPeriodTypes|null $payPeriod payPeriod * * @return $this */ - public function setHours(?float $hours): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriodTypes $payPeriod): static { - if (is_null($hours)) { - throw new InvalidArgumentException('non-nullable hours cannot be null'); + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['hours'] = $hours; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets isStatutoryPayOnly + * Gets paymentDate * - * @return bool|null + * @return \DateTime|null */ - public function getIsStatutoryPayOnly(): ?bool + public function getPaymentDate(): ?\DateTime { - return $this->container['isStatutoryPayOnly']; + return $this->container['paymentDate']; } /** - * Sets isStatutoryPayOnly + * Sets paymentDate * - * @param bool|null $isStatutoryPayOnly optional boolean flag, if the period only had SXP present + * @param \DateTime|null $paymentDate The date payment was made for respective period * * @return $this */ - public function setIsStatutoryPayOnly(?bool $isStatutoryPayOnly): static + public function setPaymentDate(?\DateTime $paymentDate): static { - if (is_null($isStatutoryPayOnly)) { - throw new InvalidArgumentException('non-nullable isStatutoryPayOnly cannot be null'); + if (is_null($paymentDate)) { + throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); } - $this->container['isStatutoryPayOnly'] = $isStatutoryPayOnly; + $this->container['paymentDate'] = $paymentDate; return $this; } /** - * Gets paymentDate + * Gets periodNumber * - * @return \DateTime|null + * @return int|null */ - public function getPaymentDate(): ?\DateTime + public function getPeriodNumber(): ?int { - return $this->container['paymentDate']; + return $this->container['periodNumber']; } /** - * Sets paymentDate + * Sets periodNumber * - * @param \DateTime|null $paymentDate The date payment was made for respective period + * @param int|null $periodNumber Tax Week or Tax Month number this PayRunEntry relates to * * @return $this */ - public function setPaymentDate(?\DateTime $paymentDate): static + public function setPeriodNumber(?int $periodNumber): static { - if (is_null($paymentDate)) { - throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); + if (is_null($periodNumber)) { + throw new InvalidArgumentException('non-nullable periodNumber cannot be null'); } - $this->container['paymentDate'] = $paymentDate; + $this->container['periodNumber'] = $periodNumber; + + return $this; + } + + /** + * Gets taxYear + * + * @return \SynergiTech\Staffology\Model\TaxYearTypes|null + */ + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYearTypes + { + return $this->container['taxYear']; + } + + /** + * Sets taxYear + * + * @param \SynergiTech\Staffology\Model\TaxYearTypes|null $taxYear taxYear + * + * @return $this + */ + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYearTypes $taxYear): static + { + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + } + $this->container['taxYear'] = $taxYear; return $this; } diff --git a/src/Model/ContractPayLineRequest.php b/src/Model/ContractPayLineRequest.php index 5c7c69f..be0f5e8 100644 --- a/src/Model/ContractPayLineRequest.php +++ b/src/Model/ContractPayLineRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,43 +59,43 @@ class ContractPayLineRequest implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ + 'analysisCategoriesCodes' => '\SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]', + 'analysisCategoryCodeIds' => 'string[]', 'analysisCategoryCodesJson' => 'string', - 'value' => 'float', - 'rate' => 'float', - 'multiplier' => 'float', - 'description' => 'string', - 'code' => 'string', - 'tags' => 'string[]', + 'annualValue' => 'float', + 'autoAdjustForLeave' => 'bool', + 'calculateAsWhenPaid' => 'bool', 'childId' => 'string', - 'isNetToGross' => 'bool', - 'targetNetToGrossValue' => 'float', - 'netToGrossDiscrepancy' => 'float', + 'code' => 'string', + 'contributesToBasicPay' => 'bool', + 'costCentre' => 'string', + 'costCentreId' => 'string', + 'department' => 'string', + 'departmentId' => 'string', + 'description' => 'string', + 'earnedFrom' => '\DateTime', + 'earnedTo' => '\DateTime', 'effectiveFrom' => '\DateTime', 'effectiveTo' => '\DateTime', + 'fullTimeAnnualValue' => 'float', + 'ignoreInitialBackPay' => 'bool', 'isAutoGeneratedBasicPayLine' => 'bool', - 'percentageOfEffectiveDays' => 'float', - 'totalWorkingDays' => 'float', - 'autoAdjustForLeave' => 'bool', 'isAutomaticBackPay' => 'bool', - 'ignoreInitialBackPay' => 'bool', - 'contributesToBasicPay' => 'bool', - 'calculateAsWhenPaid' => 'bool', - 'totalPaidDays' => 'float', - 'roleId' => 'string', - 'earnedFrom' => '\DateTime', - 'earnedTo' => '\DateTime', - 'annualValue' => 'float', - 'department' => 'string', - 'costCentre' => 'string', - 'departmentId' => 'string', - 'costCentreId' => 'string', - 'analysisCategoriesCodes' => '\SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]', - 'analysisCategoryCodeIds' => 'string[]', - 'paySpineId' => 'string', + 'isNetToGross' => 'bool', + 'londonAllowanceId' => 'int', + 'multiplier' => 'float', + 'netToGrossDiscrepancy' => 'float', 'paySpineGradeId' => 'string', + 'paySpineId' => 'string', + 'percentageOfEffectiveDays' => 'float', + 'rate' => 'float', + 'roleId' => 'string', 'spinalPointId' => 'string', - 'londonAllowanceId' => 'int', - 'fullTimeAnnualValue' => 'float' + 'tags' => 'string[]', + 'targetNetToGrossValue' => 'float', + 'totalPaidDays' => 'float', + 'totalWorkingDays' => 'float', + 'value' => 'float' ]; /** @@ -104,43 +104,43 @@ class ContractPayLineRequest implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ + 'analysisCategoriesCodes' => null, + 'analysisCategoryCodeIds' => 'uuid', 'analysisCategoryCodesJson' => null, - 'value' => 'double', - 'rate' => 'double', - 'multiplier' => 'double', - 'description' => null, - 'code' => null, - 'tags' => null, + 'annualValue' => 'double', + 'autoAdjustForLeave' => null, + 'calculateAsWhenPaid' => null, 'childId' => 'uuid', - 'isNetToGross' => null, - 'targetNetToGrossValue' => 'double', - 'netToGrossDiscrepancy' => 'double', + 'code' => null, + 'contributesToBasicPay' => null, + 'costCentre' => null, + 'costCentreId' => 'uuid', + 'department' => null, + 'departmentId' => 'uuid', + 'description' => null, + 'earnedFrom' => 'date', + 'earnedTo' => 'date', 'effectiveFrom' => 'date', 'effectiveTo' => 'date', + 'fullTimeAnnualValue' => 'double', + 'ignoreInitialBackPay' => null, 'isAutoGeneratedBasicPayLine' => null, - 'percentageOfEffectiveDays' => 'double', - 'totalWorkingDays' => 'double', - 'autoAdjustForLeave' => null, 'isAutomaticBackPay' => null, - 'ignoreInitialBackPay' => null, - 'contributesToBasicPay' => null, - 'calculateAsWhenPaid' => null, - 'totalPaidDays' => 'double', - 'roleId' => 'uuid', - 'earnedFrom' => 'date', - 'earnedTo' => 'date', - 'annualValue' => 'double', - 'department' => null, - 'costCentre' => null, - 'departmentId' => 'uuid', - 'costCentreId' => 'uuid', - 'analysisCategoriesCodes' => null, - 'analysisCategoryCodeIds' => 'uuid', - 'paySpineId' => 'uuid', + 'isNetToGross' => null, + 'londonAllowanceId' => 'int32', + 'multiplier' => 'double', + 'netToGrossDiscrepancy' => 'double', 'paySpineGradeId' => 'uuid', + 'paySpineId' => 'uuid', + 'percentageOfEffectiveDays' => 'double', + 'rate' => 'double', + 'roleId' => 'uuid', 'spinalPointId' => 'uuid', - 'londonAllowanceId' => 'int32', - 'fullTimeAnnualValue' => 'double' + 'tags' => null, + 'targetNetToGrossValue' => 'double', + 'totalPaidDays' => 'double', + 'totalWorkingDays' => 'double', + 'value' => 'double' ]; /** @@ -149,43 +149,43 @@ class ContractPayLineRequest implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ + 'analysisCategoriesCodes' => true, + 'analysisCategoryCodeIds' => true, 'analysisCategoryCodesJson' => true, - 'value' => false, - 'rate' => true, - 'multiplier' => true, - 'description' => true, - 'code' => true, - 'tags' => true, + 'annualValue' => true, + 'autoAdjustForLeave' => false, + 'calculateAsWhenPaid' => false, 'childId' => true, - 'isNetToGross' => false, - 'targetNetToGrossValue' => true, - 'netToGrossDiscrepancy' => true, + 'code' => true, + 'contributesToBasicPay' => false, + 'costCentre' => true, + 'costCentreId' => true, + 'department' => true, + 'departmentId' => true, + 'description' => true, + 'earnedFrom' => true, + 'earnedTo' => true, 'effectiveFrom' => true, 'effectiveTo' => true, + 'fullTimeAnnualValue' => false, + 'ignoreInitialBackPay' => false, 'isAutoGeneratedBasicPayLine' => false, - 'percentageOfEffectiveDays' => true, - 'totalWorkingDays' => true, - 'autoAdjustForLeave' => false, 'isAutomaticBackPay' => false, - 'ignoreInitialBackPay' => false, - 'contributesToBasicPay' => false, - 'calculateAsWhenPaid' => false, - 'totalPaidDays' => true, - 'roleId' => true, - 'earnedFrom' => true, - 'earnedTo' => true, - 'annualValue' => true, - 'department' => true, - 'costCentre' => true, - 'departmentId' => true, - 'costCentreId' => true, - 'analysisCategoriesCodes' => true, - 'analysisCategoryCodeIds' => true, - 'paySpineId' => true, + 'isNetToGross' => false, + 'londonAllowanceId' => true, + 'multiplier' => true, + 'netToGrossDiscrepancy' => true, 'paySpineGradeId' => true, + 'paySpineId' => true, + 'percentageOfEffectiveDays' => true, + 'rate' => true, + 'roleId' => true, 'spinalPointId' => true, - 'londonAllowanceId' => true, - 'fullTimeAnnualValue' => false + 'tags' => true, + 'targetNetToGrossValue' => true, + 'totalPaidDays' => true, + 'totalWorkingDays' => true, + 'value' => false ]; /** @@ -274,43 +274,43 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'analysisCategoriesCodes' => 'analysisCategoriesCodes', + 'analysisCategoryCodeIds' => 'analysisCategoryCodeIds', 'analysisCategoryCodesJson' => 'analysisCategoryCodesJson', - 'value' => 'value', - 'rate' => 'rate', - 'multiplier' => 'multiplier', - 'description' => 'description', - 'code' => 'code', - 'tags' => 'tags', + 'annualValue' => 'annualValue', + 'autoAdjustForLeave' => 'autoAdjustForLeave', + 'calculateAsWhenPaid' => 'calculateAsWhenPaid', 'childId' => 'childId', - 'isNetToGross' => 'isNetToGross', - 'targetNetToGrossValue' => 'targetNetToGrossValue', - 'netToGrossDiscrepancy' => 'netToGrossDiscrepancy', + 'code' => 'code', + 'contributesToBasicPay' => 'contributesToBasicPay', + 'costCentre' => 'costCentre', + 'costCentreId' => 'costCentreId', + 'department' => 'department', + 'departmentId' => 'departmentId', + 'description' => 'description', + 'earnedFrom' => 'earnedFrom', + 'earnedTo' => 'earnedTo', 'effectiveFrom' => 'effectiveFrom', 'effectiveTo' => 'effectiveTo', + 'fullTimeAnnualValue' => 'fullTimeAnnualValue', + 'ignoreInitialBackPay' => 'ignoreInitialBackPay', 'isAutoGeneratedBasicPayLine' => 'isAutoGeneratedBasicPayLine', - 'percentageOfEffectiveDays' => 'percentageOfEffectiveDays', - 'totalWorkingDays' => 'totalWorkingDays', - 'autoAdjustForLeave' => 'autoAdjustForLeave', 'isAutomaticBackPay' => 'isAutomaticBackPay', - 'ignoreInitialBackPay' => 'ignoreInitialBackPay', - 'contributesToBasicPay' => 'contributesToBasicPay', - 'calculateAsWhenPaid' => 'calculateAsWhenPaid', - 'totalPaidDays' => 'totalPaidDays', - 'roleId' => 'roleId', - 'earnedFrom' => 'earnedFrom', - 'earnedTo' => 'earnedTo', - 'annualValue' => 'annualValue', - 'department' => 'department', - 'costCentre' => 'costCentre', - 'departmentId' => 'departmentId', - 'costCentreId' => 'costCentreId', - 'analysisCategoriesCodes' => 'analysisCategoriesCodes', - 'analysisCategoryCodeIds' => 'analysisCategoryCodeIds', - 'paySpineId' => 'paySpineId', + 'isNetToGross' => 'isNetToGross', + 'londonAllowanceId' => 'londonAllowanceId', + 'multiplier' => 'multiplier', + 'netToGrossDiscrepancy' => 'netToGrossDiscrepancy', 'paySpineGradeId' => 'paySpineGradeId', + 'paySpineId' => 'paySpineId', + 'percentageOfEffectiveDays' => 'percentageOfEffectiveDays', + 'rate' => 'rate', + 'roleId' => 'roleId', 'spinalPointId' => 'spinalPointId', - 'londonAllowanceId' => 'londonAllowanceId', - 'fullTimeAnnualValue' => 'fullTimeAnnualValue' + 'tags' => 'tags', + 'targetNetToGrossValue' => 'targetNetToGrossValue', + 'totalPaidDays' => 'totalPaidDays', + 'totalWorkingDays' => 'totalWorkingDays', + 'value' => 'value' ]; /** @@ -319,43 +319,43 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'analysisCategoriesCodes' => 'setAnalysisCategoriesCodes', + 'analysisCategoryCodeIds' => 'setAnalysisCategoryCodeIds', 'analysisCategoryCodesJson' => 'setAnalysisCategoryCodesJson', - 'value' => 'setValue', - 'rate' => 'setRate', - 'multiplier' => 'setMultiplier', - 'description' => 'setDescription', - 'code' => 'setCode', - 'tags' => 'setTags', + 'annualValue' => 'setAnnualValue', + 'autoAdjustForLeave' => 'setAutoAdjustForLeave', + 'calculateAsWhenPaid' => 'setCalculateAsWhenPaid', 'childId' => 'setChildId', - 'isNetToGross' => 'setIsNetToGross', - 'targetNetToGrossValue' => 'setTargetNetToGrossValue', - 'netToGrossDiscrepancy' => 'setNetToGrossDiscrepancy', + 'code' => 'setCode', + 'contributesToBasicPay' => 'setContributesToBasicPay', + 'costCentre' => 'setCostCentre', + 'costCentreId' => 'setCostCentreId', + 'department' => 'setDepartment', + 'departmentId' => 'setDepartmentId', + 'description' => 'setDescription', + 'earnedFrom' => 'setEarnedFrom', + 'earnedTo' => 'setEarnedTo', 'effectiveFrom' => 'setEffectiveFrom', 'effectiveTo' => 'setEffectiveTo', + 'fullTimeAnnualValue' => 'setFullTimeAnnualValue', + 'ignoreInitialBackPay' => 'setIgnoreInitialBackPay', 'isAutoGeneratedBasicPayLine' => 'setIsAutoGeneratedBasicPayLine', - 'percentageOfEffectiveDays' => 'setPercentageOfEffectiveDays', - 'totalWorkingDays' => 'setTotalWorkingDays', - 'autoAdjustForLeave' => 'setAutoAdjustForLeave', 'isAutomaticBackPay' => 'setIsAutomaticBackPay', - 'ignoreInitialBackPay' => 'setIgnoreInitialBackPay', - 'contributesToBasicPay' => 'setContributesToBasicPay', - 'calculateAsWhenPaid' => 'setCalculateAsWhenPaid', - 'totalPaidDays' => 'setTotalPaidDays', - 'roleId' => 'setRoleId', - 'earnedFrom' => 'setEarnedFrom', - 'earnedTo' => 'setEarnedTo', - 'annualValue' => 'setAnnualValue', - 'department' => 'setDepartment', - 'costCentre' => 'setCostCentre', - 'departmentId' => 'setDepartmentId', - 'costCentreId' => 'setCostCentreId', - 'analysisCategoriesCodes' => 'setAnalysisCategoriesCodes', - 'analysisCategoryCodeIds' => 'setAnalysisCategoryCodeIds', - 'paySpineId' => 'setPaySpineId', + 'isNetToGross' => 'setIsNetToGross', + 'londonAllowanceId' => 'setLondonAllowanceId', + 'multiplier' => 'setMultiplier', + 'netToGrossDiscrepancy' => 'setNetToGrossDiscrepancy', 'paySpineGradeId' => 'setPaySpineGradeId', + 'paySpineId' => 'setPaySpineId', + 'percentageOfEffectiveDays' => 'setPercentageOfEffectiveDays', + 'rate' => 'setRate', + 'roleId' => 'setRoleId', 'spinalPointId' => 'setSpinalPointId', - 'londonAllowanceId' => 'setLondonAllowanceId', - 'fullTimeAnnualValue' => 'setFullTimeAnnualValue' + 'tags' => 'setTags', + 'targetNetToGrossValue' => 'setTargetNetToGrossValue', + 'totalPaidDays' => 'setTotalPaidDays', + 'totalWorkingDays' => 'setTotalWorkingDays', + 'value' => 'setValue' ]; /** @@ -364,43 +364,43 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'analysisCategoriesCodes' => 'getAnalysisCategoriesCodes', + 'analysisCategoryCodeIds' => 'getAnalysisCategoryCodeIds', 'analysisCategoryCodesJson' => 'getAnalysisCategoryCodesJson', - 'value' => 'getValue', - 'rate' => 'getRate', - 'multiplier' => 'getMultiplier', - 'description' => 'getDescription', - 'code' => 'getCode', - 'tags' => 'getTags', + 'annualValue' => 'getAnnualValue', + 'autoAdjustForLeave' => 'getAutoAdjustForLeave', + 'calculateAsWhenPaid' => 'getCalculateAsWhenPaid', 'childId' => 'getChildId', - 'isNetToGross' => 'getIsNetToGross', - 'targetNetToGrossValue' => 'getTargetNetToGrossValue', - 'netToGrossDiscrepancy' => 'getNetToGrossDiscrepancy', + 'code' => 'getCode', + 'contributesToBasicPay' => 'getContributesToBasicPay', + 'costCentre' => 'getCostCentre', + 'costCentreId' => 'getCostCentreId', + 'department' => 'getDepartment', + 'departmentId' => 'getDepartmentId', + 'description' => 'getDescription', + 'earnedFrom' => 'getEarnedFrom', + 'earnedTo' => 'getEarnedTo', 'effectiveFrom' => 'getEffectiveFrom', 'effectiveTo' => 'getEffectiveTo', + 'fullTimeAnnualValue' => 'getFullTimeAnnualValue', + 'ignoreInitialBackPay' => 'getIgnoreInitialBackPay', 'isAutoGeneratedBasicPayLine' => 'getIsAutoGeneratedBasicPayLine', - 'percentageOfEffectiveDays' => 'getPercentageOfEffectiveDays', - 'totalWorkingDays' => 'getTotalWorkingDays', - 'autoAdjustForLeave' => 'getAutoAdjustForLeave', 'isAutomaticBackPay' => 'getIsAutomaticBackPay', - 'ignoreInitialBackPay' => 'getIgnoreInitialBackPay', - 'contributesToBasicPay' => 'getContributesToBasicPay', - 'calculateAsWhenPaid' => 'getCalculateAsWhenPaid', - 'totalPaidDays' => 'getTotalPaidDays', - 'roleId' => 'getRoleId', - 'earnedFrom' => 'getEarnedFrom', - 'earnedTo' => 'getEarnedTo', - 'annualValue' => 'getAnnualValue', - 'department' => 'getDepartment', - 'costCentre' => 'getCostCentre', - 'departmentId' => 'getDepartmentId', - 'costCentreId' => 'getCostCentreId', - 'analysisCategoriesCodes' => 'getAnalysisCategoriesCodes', - 'analysisCategoryCodeIds' => 'getAnalysisCategoryCodeIds', - 'paySpineId' => 'getPaySpineId', + 'isNetToGross' => 'getIsNetToGross', + 'londonAllowanceId' => 'getLondonAllowanceId', + 'multiplier' => 'getMultiplier', + 'netToGrossDiscrepancy' => 'getNetToGrossDiscrepancy', 'paySpineGradeId' => 'getPaySpineGradeId', + 'paySpineId' => 'getPaySpineId', + 'percentageOfEffectiveDays' => 'getPercentageOfEffectiveDays', + 'rate' => 'getRate', + 'roleId' => 'getRoleId', 'spinalPointId' => 'getSpinalPointId', - 'londonAllowanceId' => 'getLondonAllowanceId', - 'fullTimeAnnualValue' => 'getFullTimeAnnualValue' + 'tags' => 'getTags', + 'targetNetToGrossValue' => 'getTargetNetToGrossValue', + 'totalPaidDays' => 'getTotalPaidDays', + 'totalWorkingDays' => 'getTotalWorkingDays', + 'value' => 'getValue' ]; /** @@ -459,43 +459,43 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('analysisCategoriesCodes', $data ?? [], null); + $this->setIfExists('analysisCategoryCodeIds', $data ?? [], null); $this->setIfExists('analysisCategoryCodesJson', $data ?? [], null); - $this->setIfExists('value', $data ?? [], null); - $this->setIfExists('rate', $data ?? [], null); - $this->setIfExists('multiplier', $data ?? [], null); - $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('annualValue', $data ?? [], null); + $this->setIfExists('autoAdjustForLeave', $data ?? [], null); + $this->setIfExists('calculateAsWhenPaid', $data ?? [], null); $this->setIfExists('childId', $data ?? [], null); - $this->setIfExists('isNetToGross', $data ?? [], null); - $this->setIfExists('targetNetToGrossValue', $data ?? [], null); - $this->setIfExists('netToGrossDiscrepancy', $data ?? [], null); + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('contributesToBasicPay', $data ?? [], null); + $this->setIfExists('costCentre', $data ?? [], null); + $this->setIfExists('costCentreId', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('departmentId', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('earnedFrom', $data ?? [], null); + $this->setIfExists('earnedTo', $data ?? [], null); $this->setIfExists('effectiveFrom', $data ?? [], null); $this->setIfExists('effectiveTo', $data ?? [], null); + $this->setIfExists('fullTimeAnnualValue', $data ?? [], null); + $this->setIfExists('ignoreInitialBackPay', $data ?? [], null); $this->setIfExists('isAutoGeneratedBasicPayLine', $data ?? [], null); - $this->setIfExists('percentageOfEffectiveDays', $data ?? [], null); - $this->setIfExists('totalWorkingDays', $data ?? [], null); - $this->setIfExists('autoAdjustForLeave', $data ?? [], null); $this->setIfExists('isAutomaticBackPay', $data ?? [], null); - $this->setIfExists('ignoreInitialBackPay', $data ?? [], null); - $this->setIfExists('contributesToBasicPay', $data ?? [], null); - $this->setIfExists('calculateAsWhenPaid', $data ?? [], null); - $this->setIfExists('totalPaidDays', $data ?? [], null); - $this->setIfExists('roleId', $data ?? [], null); - $this->setIfExists('earnedFrom', $data ?? [], null); - $this->setIfExists('earnedTo', $data ?? [], null); - $this->setIfExists('annualValue', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); - $this->setIfExists('costCentre', $data ?? [], null); - $this->setIfExists('departmentId', $data ?? [], null); - $this->setIfExists('costCentreId', $data ?? [], null); - $this->setIfExists('analysisCategoriesCodes', $data ?? [], null); - $this->setIfExists('analysisCategoryCodeIds', $data ?? [], null); - $this->setIfExists('paySpineId', $data ?? [], null); + $this->setIfExists('isNetToGross', $data ?? [], null); + $this->setIfExists('londonAllowanceId', $data ?? [], null); + $this->setIfExists('multiplier', $data ?? [], null); + $this->setIfExists('netToGrossDiscrepancy', $data ?? [], null); $this->setIfExists('paySpineGradeId', $data ?? [], null); + $this->setIfExists('paySpineId', $data ?? [], null); + $this->setIfExists('percentageOfEffectiveDays', $data ?? [], null); + $this->setIfExists('rate', $data ?? [], null); + $this->setIfExists('roleId', $data ?? [], null); $this->setIfExists('spinalPointId', $data ?? [], null); - $this->setIfExists('londonAllowanceId', $data ?? [], null); - $this->setIfExists('fullTimeAnnualValue', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('targetNetToGrossValue', $data ?? [], null); + $this->setIfExists('totalPaidDays', $data ?? [], null); + $this->setIfExists('totalWorkingDays', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -544,6 +544,74 @@ public function valid(): bool } + /** + * Gets analysisCategoriesCodes + * + * @return \SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]|null + */ + public function getAnalysisCategoriesCodes(): ?array + { + return $this->container['analysisCategoriesCodes']; + } + + /** + * Sets analysisCategoriesCodes + * + * @param \SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]|null $analysisCategoriesCodes List of analysiscategory id and analysiscategoryCode id + * + * @return $this + */ + public function setAnalysisCategoriesCodes(?array $analysisCategoriesCodes): static + { + if (is_null($analysisCategoriesCodes)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoriesCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('analysisCategoriesCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['analysisCategoriesCodes'] = $analysisCategoriesCodes; + + return $this; + } + + /** + * Gets analysisCategoryCodeIds + * + * @return string[]|null + */ + public function getAnalysisCategoryCodeIds(): ?array + { + return $this->container['analysisCategoryCodeIds']; + } + + /** + * Sets analysisCategoryCodeIds + * + * @param string[]|null $analysisCategoryCodeIds Array of analysiscategoryCode uniqueId + * + * @return $this + */ + public function setAnalysisCategoryCodeIds(?array $analysisCategoryCodeIds): static + { + if (is_null($analysisCategoryCodeIds)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodeIds'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('analysisCategoryCodeIds', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['analysisCategoryCodeIds'] = $analysisCategoryCodeIds; + + return $this; + } + /** * Gets analysisCategoryCodesJson * @@ -579,134 +647,123 @@ public function setAnalysisCategoryCodesJson(?string $analysisCategoryCodesJson) } /** - * Gets value + * Gets annualValue * * @return float|null */ - public function getValue(): ?float + public function getAnnualValue(): ?float { - return $this->container['value']; + return $this->container['annualValue']; } /** - * Sets value + * Sets annualValue * - * @param float|null $value The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used). If the PayCode has a CalculationType other than FixedAmount then this field will be a percentage. If the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated. + * @param float|null $annualValue The original value from the PayLine before we modify it Currently only used when CalculationType is set to FixedAnnualAmount so we can determine whether the payline value needs calculating or not To recalculate set to null with annual amount recorded in Value * * @return $this */ - public function setValue(?float $value): static + public function setAnnualValue(?float $annualValue): static { - if (is_null($value)) { - throw new InvalidArgumentException('non-nullable value cannot be null'); + if (is_null($annualValue)) { + array_push($this->openAPINullablesSetToNull, 'annualValue'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('annualValue', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['value'] = $value; + $this->container['annualValue'] = $annualValue; return $this; } /** - * Gets rate + * Gets autoAdjustForLeave * - * @return float|null + * @return bool|null */ - public function getRate(): ?float + public function getAutoAdjustForLeave(): ?bool { - return $this->container['rate']; + return $this->container['autoAdjustForLeave']; } /** - * Sets rate + * Sets autoAdjustForLeave * - * @param float|null $rate If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used + * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun * * @return $this */ - public function setRate(?float $rate): static + public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static { - if (is_null($rate)) { - array_push($this->openAPINullablesSetToNull, 'rate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('rate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($autoAdjustForLeave)) { + throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); } - $this->container['rate'] = $rate; + $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; return $this; } /** - * Gets multiplier + * Gets calculateAsWhenPaid * - * @return float|null + * @return bool|null */ - public function getMultiplier(): ?float + public function getCalculateAsWhenPaid(): ?bool { - return $this->container['multiplier']; + return $this->container['calculateAsWhenPaid']; } /** - * Sets multiplier + * Sets calculateAsWhenPaid * - * @param float|null $multiplier If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours + * @param bool|null $calculateAsWhenPaid Indicates whether this pay line should be treated as When Paid rather than When Earned * * @return $this */ - public function setMultiplier(?float $multiplier): static + public function setCalculateAsWhenPaid(?bool $calculateAsWhenPaid): static { - if (is_null($multiplier)) { - array_push($this->openAPINullablesSetToNull, 'multiplier'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('multiplier', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($calculateAsWhenPaid)) { + throw new InvalidArgumentException('non-nullable calculateAsWhenPaid cannot be null'); } - $this->container['multiplier'] = $multiplier; + $this->container['calculateAsWhenPaid'] = $calculateAsWhenPaid; return $this; } /** - * Gets description + * Gets childId * * @return string|null */ - public function getDescription(): ?string + public function getChildId(): ?string { - return $this->container['description']; + return $this->container['childId']; } /** - * Sets description + * Sets childId * - * @param string|null $description A freeform description to accompany this line. It will be displayed on the payslip. + * @param string|null $childId childId * * @return $this */ - public function setDescription(?string $description): static + public function setChildId(?string $childId): static { - if (is_null($description)) { - array_push($this->openAPINullablesSetToNull, 'description'); + if (is_null($childId)) { + array_push($this->openAPINullablesSetToNull, 'childId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('description', $nullablesSetToNull); + $index = array_search('childId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($description) && (mb_strlen($description) > 100)) { - throw new InvalidArgumentException('invalid length for $description when calling ContractPayLineRequest., must be smaller than or equal to 100.'); - } - - $this->container['description'] = $description; + $this->container['childId'] = $childId; return $this; } @@ -746,381 +803,365 @@ public function setCode(?string $code): static } /** - * Gets tags + * Gets contributesToBasicPay * - * @return string[]|null + * @return bool|null */ - public function getTags(): ?array + public function getContributesToBasicPay(): ?bool { - return $this->container['tags']; + return $this->container['contributesToBasicPay']; } /** - * Sets tags + * Sets contributesToBasicPay * - * @param string[]|null $tags tags + * @param bool|null $contributesToBasicPay Indicates whether this PayLine contributes to the basic pay of the Employee. * * @return $this */ - public function setTags(?array $tags): static + public function setContributesToBasicPay(?bool $contributesToBasicPay): static { - if (is_null($tags)) { - array_push($this->openAPINullablesSetToNull, 'tags'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tags', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($contributesToBasicPay)) { + throw new InvalidArgumentException('non-nullable contributesToBasicPay cannot be null'); } - $this->container['tags'] = $tags; + $this->container['contributesToBasicPay'] = $contributesToBasicPay; return $this; } /** - * Gets childId + * Gets costCentre * * @return string|null */ - public function getChildId(): ?string + public function getCostCentre(): ?string { - return $this->container['childId']; + return $this->container['costCentre']; } /** - * Sets childId + * Sets costCentre * - * @param string|null $childId childId + * @param string|null $costCentre CostCentre code which we want to override in payline * * @return $this */ - public function setChildId(?string $childId): static + public function setCostCentre(?string $costCentre): static { - if (is_null($childId)) { - array_push($this->openAPINullablesSetToNull, 'childId'); + if (is_null($costCentre)) { + array_push($this->openAPINullablesSetToNull, 'costCentre'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('childId', $nullablesSetToNull); + $index = array_search('costCentre', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['childId'] = $childId; - - return $this; - } - - /** - * Gets isNetToGross - * - * @return bool|null - */ - public function getIsNetToGross(): ?bool - { - return $this->container['isNetToGross']; - } - - /** - * Sets isNetToGross - * - * @param bool|null $isNetToGross If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. - * - * @return $this - */ - public function setIsNetToGross(?bool $isNetToGross): static - { - if (is_null($isNetToGross)) { - throw new InvalidArgumentException('non-nullable isNetToGross cannot be null'); - } - $this->container['isNetToGross'] = $isNetToGross; + $this->container['costCentre'] = $costCentre; return $this; } /** - * Gets targetNetToGrossValue + * Gets costCentreId * - * @return float|null + * @return string|null */ - public function getTargetNetToGrossValue(): ?float + public function getCostCentreId(): ?string { - return $this->container['targetNetToGrossValue']; + return $this->container['costCentreId']; } /** - * Sets targetNetToGrossValue + * Sets costCentreId * - * @param float|null $targetNetToGrossValue The orginal net fixed addition amount that is considered to be a take home pay target. + * @param string|null $costCentreId CostCentre uniqueId which we want to override in payline * * @return $this */ - public function setTargetNetToGrossValue(?float $targetNetToGrossValue): static + public function setCostCentreId(?string $costCentreId): static { - if (is_null($targetNetToGrossValue)) { - array_push($this->openAPINullablesSetToNull, 'targetNetToGrossValue'); + if (is_null($costCentreId)) { + array_push($this->openAPINullablesSetToNull, 'costCentreId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('targetNetToGrossValue', $nullablesSetToNull); + $index = array_search('costCentreId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['targetNetToGrossValue'] = $targetNetToGrossValue; + $this->container['costCentreId'] = $costCentreId; return $this; } /** - * Gets netToGrossDiscrepancy + * Gets department * - * @return float|null + * @return string|null */ - public function getNetToGrossDiscrepancy(): ?float + public function getDepartment(): ?string { - return $this->container['netToGrossDiscrepancy']; + return $this->container['department']; } /** - * Sets netToGrossDiscrepancy + * Sets department * - * @param float|null $netToGrossDiscrepancy The discrepancy between the targeted and the calculated grossed up value durig a net to gross calculation. + * @param string|null $department Department code which we want to override in payline * * @return $this */ - public function setNetToGrossDiscrepancy(?float $netToGrossDiscrepancy): static + public function setDepartment(?string $department): static { - if (is_null($netToGrossDiscrepancy)) { - array_push($this->openAPINullablesSetToNull, 'netToGrossDiscrepancy'); + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('netToGrossDiscrepancy', $nullablesSetToNull); + $index = array_search('department', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['netToGrossDiscrepancy'] = $netToGrossDiscrepancy; + $this->container['department'] = $department; return $this; } /** - * Gets effectiveFrom + * Gets departmentId * - * @return \DateTime|null + * @return string|null */ - public function getEffectiveFrom(): ?\DateTime + public function getDepartmentId(): ?string { - return $this->container['effectiveFrom']; + return $this->container['departmentId']; } /** - * Sets effectiveFrom + * Sets departmentId * - * @param \DateTime|null $effectiveFrom The date the payline starts being calculated in payrun + * @param string|null $departmentId Department uniqueId which we want to override in payline * * @return $this */ - public function setEffectiveFrom(?\DateTime $effectiveFrom): static + public function setDepartmentId(?string $departmentId): static { - if (is_null($effectiveFrom)) { - array_push($this->openAPINullablesSetToNull, 'effectiveFrom'); + if (is_null($departmentId)) { + array_push($this->openAPINullablesSetToNull, 'departmentId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('effectiveFrom', $nullablesSetToNull); + $index = array_search('departmentId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['effectiveFrom'] = $effectiveFrom; + $this->container['departmentId'] = $departmentId; return $this; } /** - * Gets effectiveTo + * Gets description * - * @return \DateTime|null + * @return string|null */ - public function getEffectiveTo(): ?\DateTime + public function getDescription(): ?string { - return $this->container['effectiveTo']; + return $this->container['description']; } /** - * Sets effectiveTo + * Sets description * - * @param \DateTime|null $effectiveTo The date the payline stops being calculated in payrun + * @param string|null $description A freeform description to accompany this line. It will be displayed on the payslip. * * @return $this */ - public function setEffectiveTo(?\DateTime $effectiveTo): static + public function setDescription(?string $description): static { - if (is_null($effectiveTo)) { - array_push($this->openAPINullablesSetToNull, 'effectiveTo'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('effectiveTo', $nullablesSetToNull); + $index = array_search('description', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['effectiveTo'] = $effectiveTo; + if (!is_null($description) && (mb_strlen($description) > 100)) { + throw new InvalidArgumentException('invalid length for $description when calling ContractPayLineRequest., must be smaller than or equal to 100.'); + } + + $this->container['description'] = $description; return $this; } /** - * Gets isAutoGeneratedBasicPayLine + * Gets earnedFrom * - * @return bool|null + * @return \DateTime|null */ - public function getIsAutoGeneratedBasicPayLine(): ?bool + public function getEarnedFrom(): ?\DateTime { - return $this->container['isAutoGeneratedBasicPayLine']; + return $this->container['earnedFrom']; } /** - * Sets isAutoGeneratedBasicPayLine + * Sets earnedFrom * - * @param bool|null $isAutoGeneratedBasicPayLine isAutoGeneratedBasicPayLine + * @param \DateTime|null $earnedFrom earnedFrom * * @return $this */ - public function setIsAutoGeneratedBasicPayLine(?bool $isAutoGeneratedBasicPayLine): static + public function setEarnedFrom(?\DateTime $earnedFrom): static { - if (is_null($isAutoGeneratedBasicPayLine)) { - throw new InvalidArgumentException('non-nullable isAutoGeneratedBasicPayLine cannot be null'); + if (is_null($earnedFrom)) { + array_push($this->openAPINullablesSetToNull, 'earnedFrom'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('earnedFrom', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isAutoGeneratedBasicPayLine'] = $isAutoGeneratedBasicPayLine; + $this->container['earnedFrom'] = $earnedFrom; return $this; } /** - * Gets percentageOfEffectiveDays + * Gets earnedTo * - * @return float|null + * @return \DateTime|null */ - public function getPercentageOfEffectiveDays(): ?float + public function getEarnedTo(): ?\DateTime { - return $this->container['percentageOfEffectiveDays']; + return $this->container['earnedTo']; } /** - * Sets percentageOfEffectiveDays + * Sets earnedTo * - * @param float|null $percentageOfEffectiveDays The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun + * @param \DateTime|null $earnedTo earnedTo * * @return $this */ - public function setPercentageOfEffectiveDays(?float $percentageOfEffectiveDays): static + public function setEarnedTo(?\DateTime $earnedTo): static { - if (is_null($percentageOfEffectiveDays)) { - array_push($this->openAPINullablesSetToNull, 'percentageOfEffectiveDays'); + if (is_null($earnedTo)) { + array_push($this->openAPINullablesSetToNull, 'earnedTo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('percentageOfEffectiveDays', $nullablesSetToNull); + $index = array_search('earnedTo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['percentageOfEffectiveDays'] = $percentageOfEffectiveDays; + $this->container['earnedTo'] = $earnedTo; return $this; } /** - * Gets totalWorkingDays + * Gets effectiveFrom * - * @return float|null + * @return \DateTime|null */ - public function getTotalWorkingDays(): ?float + public function getEffectiveFrom(): ?\DateTime { - return $this->container['totalWorkingDays']; + return $this->container['effectiveFrom']; } /** - * Sets totalWorkingDays + * Sets effectiveFrom * - * @param float|null $totalWorkingDays totalWorkingDays + * @param \DateTime|null $effectiveFrom The date the payline starts being calculated in payrun * * @return $this */ - public function setTotalWorkingDays(?float $totalWorkingDays): static + public function setEffectiveFrom(?\DateTime $effectiveFrom): static { - if (is_null($totalWorkingDays)) { - array_push($this->openAPINullablesSetToNull, 'totalWorkingDays'); + if (is_null($effectiveFrom)) { + array_push($this->openAPINullablesSetToNull, 'effectiveFrom'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalWorkingDays', $nullablesSetToNull); + $index = array_search('effectiveFrom', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['totalWorkingDays'] = $totalWorkingDays; + $this->container['effectiveFrom'] = $effectiveFrom; return $this; } /** - * Gets autoAdjustForLeave + * Gets effectiveTo * - * @return bool|null + * @return \DateTime|null */ - public function getAutoAdjustForLeave(): ?bool + public function getEffectiveTo(): ?\DateTime { - return $this->container['autoAdjustForLeave']; + return $this->container['effectiveTo']; } /** - * Sets autoAdjustForLeave + * Sets effectiveTo * - * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun + * @param \DateTime|null $effectiveTo The date the payline stops being calculated in payrun * * @return $this */ - public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static + public function setEffectiveTo(?\DateTime $effectiveTo): static { - if (is_null($autoAdjustForLeave)) { - throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); + if (is_null($effectiveTo)) { + array_push($this->openAPINullablesSetToNull, 'effectiveTo'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('effectiveTo', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; + $this->container['effectiveTo'] = $effectiveTo; return $this; } /** - * Gets isAutomaticBackPay + * Gets fullTimeAnnualValue * - * @return bool|null + * @return float|null */ - public function getIsAutomaticBackPay(): ?bool + public function getFullTimeAnnualValue(): ?float { - return $this->container['isAutomaticBackPay']; + return $this->container['fullTimeAnnualValue']; } /** - * Sets isAutomaticBackPay + * Sets fullTimeAnnualValue * - * @param bool|null $isAutomaticBackPay Automatically calculate backpay and add or modify the necessary pay lines for this addition/deduction when a pay run is created. Applicable only to employee level addition/deduction pay lines. If set to false then you must manually handle the calculation and adding of backpay lines. + * @param float|null $fullTimeAnnualValue Used to set Full Time Annual Value for payline * * @return $this */ - public function setIsAutomaticBackPay(?bool $isAutomaticBackPay): static + public function setFullTimeAnnualValue(?float $fullTimeAnnualValue): static { - if (is_null($isAutomaticBackPay)) { - throw new InvalidArgumentException('non-nullable isAutomaticBackPay cannot be null'); + if (is_null($fullTimeAnnualValue)) { + throw new InvalidArgumentException('non-nullable fullTimeAnnualValue cannot be null'); } - $this->container['isAutomaticBackPay'] = $isAutomaticBackPay; + $this->container['fullTimeAnnualValue'] = $fullTimeAnnualValue; return $this; } @@ -1153,592 +1194,551 @@ public function setIgnoreInitialBackPay(?bool $ignoreInitialBackPay): static } /** - * Gets contributesToBasicPay + * Gets isAutoGeneratedBasicPayLine * * @return bool|null */ - public function getContributesToBasicPay(): ?bool + public function getIsAutoGeneratedBasicPayLine(): ?bool { - return $this->container['contributesToBasicPay']; + return $this->container['isAutoGeneratedBasicPayLine']; } /** - * Sets contributesToBasicPay + * Sets isAutoGeneratedBasicPayLine * - * @param bool|null $contributesToBasicPay Indicates whether this PayLine contributes to the basic pay of the Employee. + * @param bool|null $isAutoGeneratedBasicPayLine isAutoGeneratedBasicPayLine * * @return $this */ - public function setContributesToBasicPay(?bool $contributesToBasicPay): static + public function setIsAutoGeneratedBasicPayLine(?bool $isAutoGeneratedBasicPayLine): static { - if (is_null($contributesToBasicPay)) { - throw new InvalidArgumentException('non-nullable contributesToBasicPay cannot be null'); + if (is_null($isAutoGeneratedBasicPayLine)) { + throw new InvalidArgumentException('non-nullable isAutoGeneratedBasicPayLine cannot be null'); } - $this->container['contributesToBasicPay'] = $contributesToBasicPay; + $this->container['isAutoGeneratedBasicPayLine'] = $isAutoGeneratedBasicPayLine; return $this; } /** - * Gets calculateAsWhenPaid + * Gets isAutomaticBackPay * * @return bool|null */ - public function getCalculateAsWhenPaid(): ?bool - { - return $this->container['calculateAsWhenPaid']; - } - - /** - * Sets calculateAsWhenPaid - * - * @param bool|null $calculateAsWhenPaid Indicates whether this pay line should be treated as When Paid rather than When Earned - * - * @return $this - */ - public function setCalculateAsWhenPaid(?bool $calculateAsWhenPaid): static - { - if (is_null($calculateAsWhenPaid)) { - throw new InvalidArgumentException('non-nullable calculateAsWhenPaid cannot be null'); - } - $this->container['calculateAsWhenPaid'] = $calculateAsWhenPaid; - - return $this; - } - - /** - * Gets totalPaidDays - * - * @return float|null - */ - public function getTotalPaidDays(): ?float + public function getIsAutomaticBackPay(): ?bool { - return $this->container['totalPaidDays']; + return $this->container['isAutomaticBackPay']; } /** - * Sets totalPaidDays + * Sets isAutomaticBackPay * - * @param float|null $totalPaidDays totalPaidDays + * @param bool|null $isAutomaticBackPay Automatically calculate backpay and add or modify the necessary pay lines for this addition/deduction when a pay run is created. Applicable only to employee level addition/deduction pay lines. If set to false then you must manually handle the calculation and adding of backpay lines. * * @return $this */ - public function setTotalPaidDays(?float $totalPaidDays): static + public function setIsAutomaticBackPay(?bool $isAutomaticBackPay): static { - if (is_null($totalPaidDays)) { - array_push($this->openAPINullablesSetToNull, 'totalPaidDays'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalPaidDays', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isAutomaticBackPay)) { + throw new InvalidArgumentException('non-nullable isAutomaticBackPay cannot be null'); } - $this->container['totalPaidDays'] = $totalPaidDays; + $this->container['isAutomaticBackPay'] = $isAutomaticBackPay; return $this; } /** - * Gets roleId + * Gets isNetToGross * - * @return string|null + * @return bool|null */ - public function getRoleId(): ?string + public function getIsNetToGross(): ?bool { - return $this->container['roleId']; + return $this->container['isNetToGross']; } /** - * Sets roleId + * Sets isNetToGross * - * @param string|null $roleId The employee role which is associated with this pay line. If set to null, the pay line is not related with a role. + * @param bool|null $isNetToGross If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. * * @return $this */ - public function setRoleId(?string $roleId): static + public function setIsNetToGross(?bool $isNetToGross): static { - if (is_null($roleId)) { - array_push($this->openAPINullablesSetToNull, 'roleId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('roleId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isNetToGross)) { + throw new InvalidArgumentException('non-nullable isNetToGross cannot be null'); } - $this->container['roleId'] = $roleId; + $this->container['isNetToGross'] = $isNetToGross; return $this; } /** - * Gets earnedFrom + * Gets londonAllowanceId * - * @return \DateTime|null + * @return int|null */ - public function getEarnedFrom(): ?\DateTime + public function getLondonAllowanceId(): ?int { - return $this->container['earnedFrom']; + return $this->container['londonAllowanceId']; } /** - * Sets earnedFrom + * Sets londonAllowanceId * - * @param \DateTime|null $earnedFrom earnedFrom + * @param int|null $londonAllowanceId Used to set London allowance id for payline * * @return $this */ - public function setEarnedFrom(?\DateTime $earnedFrom): static + public function setLondonAllowanceId(?int $londonAllowanceId): static { - if (is_null($earnedFrom)) { - array_push($this->openAPINullablesSetToNull, 'earnedFrom'); + if (is_null($londonAllowanceId)) { + array_push($this->openAPINullablesSetToNull, 'londonAllowanceId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('earnedFrom', $nullablesSetToNull); + $index = array_search('londonAllowanceId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['earnedFrom'] = $earnedFrom; + $this->container['londonAllowanceId'] = $londonAllowanceId; return $this; } /** - * Gets earnedTo + * Gets multiplier * - * @return \DateTime|null + * @return float|null */ - public function getEarnedTo(): ?\DateTime + public function getMultiplier(): ?float { - return $this->container['earnedTo']; + return $this->container['multiplier']; } /** - * Sets earnedTo + * Sets multiplier * - * @param \DateTime|null $earnedTo earnedTo + * @param float|null $multiplier If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours * * @return $this */ - public function setEarnedTo(?\DateTime $earnedTo): static + public function setMultiplier(?float $multiplier): static { - if (is_null($earnedTo)) { - array_push($this->openAPINullablesSetToNull, 'earnedTo'); + if (is_null($multiplier)) { + array_push($this->openAPINullablesSetToNull, 'multiplier'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('earnedTo', $nullablesSetToNull); + $index = array_search('multiplier', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['earnedTo'] = $earnedTo; + $this->container['multiplier'] = $multiplier; return $this; } /** - * Gets annualValue + * Gets netToGrossDiscrepancy * * @return float|null */ - public function getAnnualValue(): ?float + public function getNetToGrossDiscrepancy(): ?float { - return $this->container['annualValue']; + return $this->container['netToGrossDiscrepancy']; } /** - * Sets annualValue + * Sets netToGrossDiscrepancy * - * @param float|null $annualValue The original value from the PayLine before we modify it Currently only used when CalculationType is set to FixedAnnualAmount so we can determine whether the payline value needs calculating or not To recalculate set to null with annual amount recorded in Value + * @param float|null $netToGrossDiscrepancy The discrepancy between the targeted and the calculated grossed up value durig a net to gross calculation. * * @return $this */ - public function setAnnualValue(?float $annualValue): static + public function setNetToGrossDiscrepancy(?float $netToGrossDiscrepancy): static { - if (is_null($annualValue)) { - array_push($this->openAPINullablesSetToNull, 'annualValue'); + if (is_null($netToGrossDiscrepancy)) { + array_push($this->openAPINullablesSetToNull, 'netToGrossDiscrepancy'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('annualValue', $nullablesSetToNull); + $index = array_search('netToGrossDiscrepancy', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['annualValue'] = $annualValue; + $this->container['netToGrossDiscrepancy'] = $netToGrossDiscrepancy; return $this; } /** - * Gets department + * Gets paySpineGradeId * * @return string|null */ - public function getDepartment(): ?string + public function getPaySpineGradeId(): ?string { - return $this->container['department']; + return $this->container['paySpineGradeId']; } /** - * Sets department + * Sets paySpineGradeId * - * @param string|null $department Department code which we want to override in payline + * @param string|null $paySpineGradeId [readonly] The Id of the associated pay spine grade. * * @return $this */ - public function setDepartment(?string $department): static + public function setPaySpineGradeId(?string $paySpineGradeId): static { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); + if (is_null($paySpineGradeId)) { + array_push($this->openAPINullablesSetToNull, 'paySpineGradeId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); + $index = array_search('paySpineGradeId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['department'] = $department; + $this->container['paySpineGradeId'] = $paySpineGradeId; return $this; } /** - * Gets costCentre + * Gets paySpineId * * @return string|null */ - public function getCostCentre(): ?string + public function getPaySpineId(): ?string { - return $this->container['costCentre']; + return $this->container['paySpineId']; } /** - * Sets costCentre + * Sets paySpineId * - * @param string|null $costCentre CostCentre code which we want to override in payline + * @param string|null $paySpineId [readonly] The Id of the associated pay spine. * * @return $this */ - public function setCostCentre(?string $costCentre): static + public function setPaySpineId(?string $paySpineId): static { - if (is_null($costCentre)) { - array_push($this->openAPINullablesSetToNull, 'costCentre'); + if (is_null($paySpineId)) { + array_push($this->openAPINullablesSetToNull, 'paySpineId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costCentre', $nullablesSetToNull); + $index = array_search('paySpineId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costCentre'] = $costCentre; + $this->container['paySpineId'] = $paySpineId; return $this; } /** - * Gets departmentId + * Gets percentageOfEffectiveDays * - * @return string|null + * @return float|null */ - public function getDepartmentId(): ?string + public function getPercentageOfEffectiveDays(): ?float { - return $this->container['departmentId']; + return $this->container['percentageOfEffectiveDays']; } /** - * Sets departmentId + * Sets percentageOfEffectiveDays * - * @param string|null $departmentId Department uniqueId which we want to override in payline + * @param float|null $percentageOfEffectiveDays The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun * * @return $this */ - public function setDepartmentId(?string $departmentId): static + public function setPercentageOfEffectiveDays(?float $percentageOfEffectiveDays): static { - if (is_null($departmentId)) { - array_push($this->openAPINullablesSetToNull, 'departmentId'); + if (is_null($percentageOfEffectiveDays)) { + array_push($this->openAPINullablesSetToNull, 'percentageOfEffectiveDays'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('departmentId', $nullablesSetToNull); + $index = array_search('percentageOfEffectiveDays', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['departmentId'] = $departmentId; + $this->container['percentageOfEffectiveDays'] = $percentageOfEffectiveDays; return $this; } /** - * Gets costCentreId + * Gets rate * - * @return string|null + * @return float|null */ - public function getCostCentreId(): ?string + public function getRate(): ?float { - return $this->container['costCentreId']; + return $this->container['rate']; } /** - * Sets costCentreId + * Sets rate * - * @param string|null $costCentreId CostCentre uniqueId which we want to override in payline + * @param float|null $rate If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used * * @return $this */ - public function setCostCentreId(?string $costCentreId): static + public function setRate(?float $rate): static { - if (is_null($costCentreId)) { - array_push($this->openAPINullablesSetToNull, 'costCentreId'); + if (is_null($rate)) { + array_push($this->openAPINullablesSetToNull, 'rate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costCentreId', $nullablesSetToNull); + $index = array_search('rate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costCentreId'] = $costCentreId; + $this->container['rate'] = $rate; return $this; } /** - * Gets analysisCategoriesCodes + * Gets roleId * - * @return \SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]|null + * @return string|null */ - public function getAnalysisCategoriesCodes(): ?array + public function getRoleId(): ?string { - return $this->container['analysisCategoriesCodes']; + return $this->container['roleId']; } /** - * Sets analysisCategoriesCodes + * Sets roleId * - * @param \SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]|null $analysisCategoriesCodes List of analysiscategory id and analysiscategoryCode id + * @param string|null $roleId The employee role which is associated with this pay line. If set to null, the pay line is not related with a role. * * @return $this */ - public function setAnalysisCategoriesCodes(?array $analysisCategoriesCodes): static + public function setRoleId(?string $roleId): static { - if (is_null($analysisCategoriesCodes)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoriesCodes'); + if (is_null($roleId)) { + array_push($this->openAPINullablesSetToNull, 'roleId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoriesCodes', $nullablesSetToNull); + $index = array_search('roleId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoriesCodes'] = $analysisCategoriesCodes; + $this->container['roleId'] = $roleId; return $this; } /** - * Gets analysisCategoryCodeIds + * Gets spinalPointId * - * @return string[]|null + * @return string|null */ - public function getAnalysisCategoryCodeIds(): ?array + public function getSpinalPointId(): ?string { - return $this->container['analysisCategoryCodeIds']; + return $this->container['spinalPointId']; } /** - * Sets analysisCategoryCodeIds + * Sets spinalPointId * - * @param string[]|null $analysisCategoryCodeIds Array of analysiscategoryCode uniqueId + * @param string|null $spinalPointId [readonly] The Id of the associated spinal point. * * @return $this */ - public function setAnalysisCategoryCodeIds(?array $analysisCategoryCodeIds): static + public function setSpinalPointId(?string $spinalPointId): static { - if (is_null($analysisCategoryCodeIds)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodeIds'); + if (is_null($spinalPointId)) { + array_push($this->openAPINullablesSetToNull, 'spinalPointId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryCodeIds', $nullablesSetToNull); + $index = array_search('spinalPointId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoryCodeIds'] = $analysisCategoryCodeIds; + $this->container['spinalPointId'] = $spinalPointId; return $this; } /** - * Gets paySpineId + * Gets tags * - * @return string|null + * @return string[]|null */ - public function getPaySpineId(): ?string + public function getTags(): ?array { - return $this->container['paySpineId']; + return $this->container['tags']; } /** - * Sets paySpineId + * Sets tags * - * @param string|null $paySpineId [readonly] The Id of the associated pay spine. + * @param string[]|null $tags tags * * @return $this */ - public function setPaySpineId(?string $paySpineId): static + public function setTags(?array $tags): static { - if (is_null($paySpineId)) { - array_push($this->openAPINullablesSetToNull, 'paySpineId'); + if (is_null($tags)) { + array_push($this->openAPINullablesSetToNull, 'tags'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paySpineId', $nullablesSetToNull); + $index = array_search('tags', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['paySpineId'] = $paySpineId; + $this->container['tags'] = $tags; return $this; } /** - * Gets paySpineGradeId + * Gets targetNetToGrossValue * - * @return string|null + * @return float|null */ - public function getPaySpineGradeId(): ?string + public function getTargetNetToGrossValue(): ?float { - return $this->container['paySpineGradeId']; + return $this->container['targetNetToGrossValue']; } /** - * Sets paySpineGradeId + * Sets targetNetToGrossValue * - * @param string|null $paySpineGradeId [readonly] The Id of the associated pay spine grade. + * @param float|null $targetNetToGrossValue The orginal net fixed addition amount that is considered to be a take home pay target. * * @return $this */ - public function setPaySpineGradeId(?string $paySpineGradeId): static + public function setTargetNetToGrossValue(?float $targetNetToGrossValue): static { - if (is_null($paySpineGradeId)) { - array_push($this->openAPINullablesSetToNull, 'paySpineGradeId'); + if (is_null($targetNetToGrossValue)) { + array_push($this->openAPINullablesSetToNull, 'targetNetToGrossValue'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paySpineGradeId', $nullablesSetToNull); + $index = array_search('targetNetToGrossValue', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['paySpineGradeId'] = $paySpineGradeId; + $this->container['targetNetToGrossValue'] = $targetNetToGrossValue; return $this; } /** - * Gets spinalPointId + * Gets totalPaidDays * - * @return string|null + * @return float|null */ - public function getSpinalPointId(): ?string + public function getTotalPaidDays(): ?float { - return $this->container['spinalPointId']; + return $this->container['totalPaidDays']; } /** - * Sets spinalPointId + * Sets totalPaidDays * - * @param string|null $spinalPointId [readonly] The Id of the associated spinal point. + * @param float|null $totalPaidDays totalPaidDays * * @return $this */ - public function setSpinalPointId(?string $spinalPointId): static + public function setTotalPaidDays(?float $totalPaidDays): static { - if (is_null($spinalPointId)) { - array_push($this->openAPINullablesSetToNull, 'spinalPointId'); + if (is_null($totalPaidDays)) { + array_push($this->openAPINullablesSetToNull, 'totalPaidDays'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('spinalPointId', $nullablesSetToNull); + $index = array_search('totalPaidDays', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['spinalPointId'] = $spinalPointId; + $this->container['totalPaidDays'] = $totalPaidDays; return $this; } /** - * Gets londonAllowanceId + * Gets totalWorkingDays * - * @return int|null + * @return float|null */ - public function getLondonAllowanceId(): ?int + public function getTotalWorkingDays(): ?float { - return $this->container['londonAllowanceId']; + return $this->container['totalWorkingDays']; } /** - * Sets londonAllowanceId + * Sets totalWorkingDays * - * @param int|null $londonAllowanceId Used to set London allowance id for payline + * @param float|null $totalWorkingDays totalWorkingDays * * @return $this */ - public function setLondonAllowanceId(?int $londonAllowanceId): static + public function setTotalWorkingDays(?float $totalWorkingDays): static { - if (is_null($londonAllowanceId)) { - array_push($this->openAPINullablesSetToNull, 'londonAllowanceId'); + if (is_null($totalWorkingDays)) { + array_push($this->openAPINullablesSetToNull, 'totalWorkingDays'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('londonAllowanceId', $nullablesSetToNull); + $index = array_search('totalWorkingDays', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['londonAllowanceId'] = $londonAllowanceId; + $this->container['totalWorkingDays'] = $totalWorkingDays; return $this; } /** - * Gets fullTimeAnnualValue + * Gets value * * @return float|null */ - public function getFullTimeAnnualValue(): ?float + public function getValue(): ?float { - return $this->container['fullTimeAnnualValue']; + return $this->container['value']; } /** - * Sets fullTimeAnnualValue + * Sets value * - * @param float|null $fullTimeAnnualValue Used to set Full Time Annual Value for payline + * @param float|null $value The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used). If the PayCode has a CalculationType other than FixedAmount then this field will be a percentage. If the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated. * * @return $this */ - public function setFullTimeAnnualValue(?float $fullTimeAnnualValue): static + public function setValue(?float $value): static { - if (is_null($fullTimeAnnualValue)) { - throw new InvalidArgumentException('non-nullable fullTimeAnnualValue cannot be null'); + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); } - $this->container['fullTimeAnnualValue'] = $fullTimeAnnualValue; + $this->container['value'] = $value; return $this; } diff --git a/src/Model/ContractPayLineResponse.php b/src/Model/ContractPayLineResponse.php index 29968a5..4b3ce87 100644 --- a/src/Model/ContractPayLineResponse.php +++ b/src/Model/ContractPayLineResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,50 +59,50 @@ class ContractPayLineResponse implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', + 'analysisCategoriesCodes' => '\SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]', + 'analysisCategoryCodeIds' => 'string[]', + 'annualValue' => 'float', 'attachmentOrderId' => 'string', - 'pensionId' => 'string', + 'autoAdjustForLeave' => 'bool', + 'calculateAsWhenPaid' => 'bool', + 'childId' => 'string', + 'code' => 'string', + 'contributesToBasicPay' => 'bool', + 'costCentre' => 'string', + 'costCentreId' => 'string', + 'department' => 'string', + 'departmentId' => 'string', + 'description' => 'string', + 'earnedFrom' => '\DateTime', + 'earnedTo' => '\DateTime', + 'effectiveFrom' => '\DateTime', + 'effectiveTo' => '\DateTime', + 'fullTimeAnnualValue' => 'float', + 'id' => 'string', + 'ignoreInitialBackPay' => 'bool', + 'initialBackPayPublicPayRunId' => 'string', + 'isAutoGeneratedBasicPayLine' => 'bool', + 'isAutomaticBackPay' => 'bool', + 'isNetToGross' => 'bool', 'leaveId' => 'string', - 'loanId' => 'string', 'leaveStatutoryDaysPaid' => 'float', 'leaveStatutoryWeeksPaid' => 'float', - 'initialBackPayPublicPayRunId' => 'string', - 'value' => 'float', - 'rate' => 'float', + 'loanId' => 'string', + 'londonAllowanceId' => 'int', 'multiplier' => 'float', - 'description' => 'string', - 'code' => 'string', - 'tags' => 'string[]', - 'childId' => 'string', - 'isNetToGross' => 'bool', - 'targetNetToGrossValue' => 'float', 'netToGrossDiscrepancy' => 'float', - 'effectiveFrom' => '\DateTime', - 'effectiveTo' => '\DateTime', - 'isAutoGeneratedBasicPayLine' => 'bool', + 'paySpineGradeId' => 'string', + 'paySpineId' => 'string', + 'pensionId' => 'string', 'percentageOfEffectiveDays' => 'float', - 'totalWorkingDays' => 'float', - 'autoAdjustForLeave' => 'bool', - 'isAutomaticBackPay' => 'bool', - 'ignoreInitialBackPay' => 'bool', - 'contributesToBasicPay' => 'bool', - 'calculateAsWhenPaid' => 'bool', - 'totalPaidDays' => 'float', + 'rate' => 'float', 'roleId' => 'string', - 'earnedFrom' => '\DateTime', - 'earnedTo' => '\DateTime', - 'annualValue' => 'float', - 'department' => 'string', - 'costCentre' => 'string', - 'departmentId' => 'string', - 'costCentreId' => 'string', - 'analysisCategoriesCodes' => '\SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]', - 'analysisCategoryCodeIds' => 'string[]', - 'paySpineId' => 'string', - 'paySpineGradeId' => 'string', 'spinalPointId' => 'string', - 'londonAllowanceId' => 'int', - 'fullTimeAnnualValue' => 'float' + 'tags' => 'string[]', + 'targetNetToGrossValue' => 'float', + 'totalPaidDays' => 'float', + 'totalWorkingDays' => 'float', + 'value' => 'float' ]; /** @@ -111,50 +111,50 @@ class ContractPayLineResponse implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', + 'analysisCategoriesCodes' => null, + 'analysisCategoryCodeIds' => 'uuid', + 'annualValue' => 'double', 'attachmentOrderId' => 'uuid', - 'pensionId' => 'uuid', + 'autoAdjustForLeave' => null, + 'calculateAsWhenPaid' => null, + 'childId' => 'uuid', + 'code' => null, + 'contributesToBasicPay' => null, + 'costCentre' => null, + 'costCentreId' => 'uuid', + 'department' => null, + 'departmentId' => 'uuid', + 'description' => null, + 'earnedFrom' => 'date', + 'earnedTo' => 'date', + 'effectiveFrom' => 'date', + 'effectiveTo' => 'date', + 'fullTimeAnnualValue' => 'double', + 'id' => 'uuid', + 'ignoreInitialBackPay' => null, + 'initialBackPayPublicPayRunId' => 'uuid', + 'isAutoGeneratedBasicPayLine' => null, + 'isAutomaticBackPay' => null, + 'isNetToGross' => null, 'leaveId' => 'uuid', - 'loanId' => 'uuid', 'leaveStatutoryDaysPaid' => 'double', 'leaveStatutoryWeeksPaid' => 'double', - 'initialBackPayPublicPayRunId' => 'uuid', - 'value' => 'double', - 'rate' => 'double', + 'loanId' => 'uuid', + 'londonAllowanceId' => 'int32', 'multiplier' => 'double', - 'description' => null, - 'code' => null, - 'tags' => null, - 'childId' => 'uuid', - 'isNetToGross' => null, - 'targetNetToGrossValue' => 'double', 'netToGrossDiscrepancy' => 'double', - 'effectiveFrom' => 'date', - 'effectiveTo' => 'date', - 'isAutoGeneratedBasicPayLine' => null, + 'paySpineGradeId' => 'uuid', + 'paySpineId' => 'uuid', + 'pensionId' => 'uuid', 'percentageOfEffectiveDays' => 'double', - 'totalWorkingDays' => 'double', - 'autoAdjustForLeave' => null, - 'isAutomaticBackPay' => null, - 'ignoreInitialBackPay' => null, - 'contributesToBasicPay' => null, - 'calculateAsWhenPaid' => null, - 'totalPaidDays' => 'double', + 'rate' => 'double', 'roleId' => 'uuid', - 'earnedFrom' => 'date', - 'earnedTo' => 'date', - 'annualValue' => 'double', - 'department' => null, - 'costCentre' => null, - 'departmentId' => 'uuid', - 'costCentreId' => 'uuid', - 'analysisCategoriesCodes' => null, - 'analysisCategoryCodeIds' => 'uuid', - 'paySpineId' => 'uuid', - 'paySpineGradeId' => 'uuid', 'spinalPointId' => 'uuid', - 'londonAllowanceId' => 'int32', - 'fullTimeAnnualValue' => 'double' + 'tags' => null, + 'targetNetToGrossValue' => 'double', + 'totalPaidDays' => 'double', + 'totalWorkingDays' => 'double', + 'value' => 'double' ]; /** @@ -163,50 +163,50 @@ class ContractPayLineResponse implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ - 'id' => false, + 'analysisCategoriesCodes' => true, + 'analysisCategoryCodeIds' => true, + 'annualValue' => true, 'attachmentOrderId' => true, - 'pensionId' => true, + 'autoAdjustForLeave' => false, + 'calculateAsWhenPaid' => false, + 'childId' => true, + 'code' => true, + 'contributesToBasicPay' => false, + 'costCentre' => true, + 'costCentreId' => true, + 'department' => true, + 'departmentId' => true, + 'description' => true, + 'earnedFrom' => true, + 'earnedTo' => true, + 'effectiveFrom' => true, + 'effectiveTo' => true, + 'fullTimeAnnualValue' => false, + 'id' => false, + 'ignoreInitialBackPay' => false, + 'initialBackPayPublicPayRunId' => true, + 'isAutoGeneratedBasicPayLine' => false, + 'isAutomaticBackPay' => false, + 'isNetToGross' => false, 'leaveId' => true, - 'loanId' => true, 'leaveStatutoryDaysPaid' => true, 'leaveStatutoryWeeksPaid' => true, - 'initialBackPayPublicPayRunId' => true, - 'value' => false, - 'rate' => true, + 'loanId' => true, + 'londonAllowanceId' => true, 'multiplier' => true, - 'description' => true, - 'code' => true, - 'tags' => true, - 'childId' => true, - 'isNetToGross' => false, - 'targetNetToGrossValue' => true, 'netToGrossDiscrepancy' => true, - 'effectiveFrom' => true, - 'effectiveTo' => true, - 'isAutoGeneratedBasicPayLine' => false, + 'paySpineGradeId' => true, + 'paySpineId' => true, + 'pensionId' => true, 'percentageOfEffectiveDays' => true, - 'totalWorkingDays' => true, - 'autoAdjustForLeave' => false, - 'isAutomaticBackPay' => false, - 'ignoreInitialBackPay' => false, - 'contributesToBasicPay' => false, - 'calculateAsWhenPaid' => false, - 'totalPaidDays' => true, + 'rate' => true, 'roleId' => true, - 'earnedFrom' => true, - 'earnedTo' => true, - 'annualValue' => true, - 'department' => true, - 'costCentre' => true, - 'departmentId' => true, - 'costCentreId' => true, - 'analysisCategoriesCodes' => true, - 'analysisCategoryCodeIds' => true, - 'paySpineId' => true, - 'paySpineGradeId' => true, 'spinalPointId' => true, - 'londonAllowanceId' => true, - 'fullTimeAnnualValue' => false + 'tags' => true, + 'targetNetToGrossValue' => true, + 'totalPaidDays' => true, + 'totalWorkingDays' => true, + 'value' => false ]; /** @@ -295,50 +295,50 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', + 'analysisCategoriesCodes' => 'analysisCategoriesCodes', + 'analysisCategoryCodeIds' => 'analysisCategoryCodeIds', + 'annualValue' => 'annualValue', 'attachmentOrderId' => 'attachmentOrderId', - 'pensionId' => 'pensionId', + 'autoAdjustForLeave' => 'autoAdjustForLeave', + 'calculateAsWhenPaid' => 'calculateAsWhenPaid', + 'childId' => 'childId', + 'code' => 'code', + 'contributesToBasicPay' => 'contributesToBasicPay', + 'costCentre' => 'costCentre', + 'costCentreId' => 'costCentreId', + 'department' => 'department', + 'departmentId' => 'departmentId', + 'description' => 'description', + 'earnedFrom' => 'earnedFrom', + 'earnedTo' => 'earnedTo', + 'effectiveFrom' => 'effectiveFrom', + 'effectiveTo' => 'effectiveTo', + 'fullTimeAnnualValue' => 'fullTimeAnnualValue', + 'id' => 'id', + 'ignoreInitialBackPay' => 'ignoreInitialBackPay', + 'initialBackPayPublicPayRunId' => 'initialBackPayPublicPayRunId', + 'isAutoGeneratedBasicPayLine' => 'isAutoGeneratedBasicPayLine', + 'isAutomaticBackPay' => 'isAutomaticBackPay', + 'isNetToGross' => 'isNetToGross', 'leaveId' => 'leaveId', - 'loanId' => 'loanId', 'leaveStatutoryDaysPaid' => 'leaveStatutoryDaysPaid', 'leaveStatutoryWeeksPaid' => 'leaveStatutoryWeeksPaid', - 'initialBackPayPublicPayRunId' => 'initialBackPayPublicPayRunId', - 'value' => 'value', - 'rate' => 'rate', + 'loanId' => 'loanId', + 'londonAllowanceId' => 'londonAllowanceId', 'multiplier' => 'multiplier', - 'description' => 'description', - 'code' => 'code', - 'tags' => 'tags', - 'childId' => 'childId', - 'isNetToGross' => 'isNetToGross', - 'targetNetToGrossValue' => 'targetNetToGrossValue', 'netToGrossDiscrepancy' => 'netToGrossDiscrepancy', - 'effectiveFrom' => 'effectiveFrom', - 'effectiveTo' => 'effectiveTo', - 'isAutoGeneratedBasicPayLine' => 'isAutoGeneratedBasicPayLine', + 'paySpineGradeId' => 'paySpineGradeId', + 'paySpineId' => 'paySpineId', + 'pensionId' => 'pensionId', 'percentageOfEffectiveDays' => 'percentageOfEffectiveDays', - 'totalWorkingDays' => 'totalWorkingDays', - 'autoAdjustForLeave' => 'autoAdjustForLeave', - 'isAutomaticBackPay' => 'isAutomaticBackPay', - 'ignoreInitialBackPay' => 'ignoreInitialBackPay', - 'contributesToBasicPay' => 'contributesToBasicPay', - 'calculateAsWhenPaid' => 'calculateAsWhenPaid', - 'totalPaidDays' => 'totalPaidDays', + 'rate' => 'rate', 'roleId' => 'roleId', - 'earnedFrom' => 'earnedFrom', - 'earnedTo' => 'earnedTo', - 'annualValue' => 'annualValue', - 'department' => 'department', - 'costCentre' => 'costCentre', - 'departmentId' => 'departmentId', - 'costCentreId' => 'costCentreId', - 'analysisCategoriesCodes' => 'analysisCategoriesCodes', - 'analysisCategoryCodeIds' => 'analysisCategoryCodeIds', - 'paySpineId' => 'paySpineId', - 'paySpineGradeId' => 'paySpineGradeId', 'spinalPointId' => 'spinalPointId', - 'londonAllowanceId' => 'londonAllowanceId', - 'fullTimeAnnualValue' => 'fullTimeAnnualValue' + 'tags' => 'tags', + 'targetNetToGrossValue' => 'targetNetToGrossValue', + 'totalPaidDays' => 'totalPaidDays', + 'totalWorkingDays' => 'totalWorkingDays', + 'value' => 'value' ]; /** @@ -347,50 +347,50 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', + 'analysisCategoriesCodes' => 'setAnalysisCategoriesCodes', + 'analysisCategoryCodeIds' => 'setAnalysisCategoryCodeIds', + 'annualValue' => 'setAnnualValue', 'attachmentOrderId' => 'setAttachmentOrderId', - 'pensionId' => 'setPensionId', + 'autoAdjustForLeave' => 'setAutoAdjustForLeave', + 'calculateAsWhenPaid' => 'setCalculateAsWhenPaid', + 'childId' => 'setChildId', + 'code' => 'setCode', + 'contributesToBasicPay' => 'setContributesToBasicPay', + 'costCentre' => 'setCostCentre', + 'costCentreId' => 'setCostCentreId', + 'department' => 'setDepartment', + 'departmentId' => 'setDepartmentId', + 'description' => 'setDescription', + 'earnedFrom' => 'setEarnedFrom', + 'earnedTo' => 'setEarnedTo', + 'effectiveFrom' => 'setEffectiveFrom', + 'effectiveTo' => 'setEffectiveTo', + 'fullTimeAnnualValue' => 'setFullTimeAnnualValue', + 'id' => 'setId', + 'ignoreInitialBackPay' => 'setIgnoreInitialBackPay', + 'initialBackPayPublicPayRunId' => 'setInitialBackPayPublicPayRunId', + 'isAutoGeneratedBasicPayLine' => 'setIsAutoGeneratedBasicPayLine', + 'isAutomaticBackPay' => 'setIsAutomaticBackPay', + 'isNetToGross' => 'setIsNetToGross', 'leaveId' => 'setLeaveId', - 'loanId' => 'setLoanId', 'leaveStatutoryDaysPaid' => 'setLeaveStatutoryDaysPaid', 'leaveStatutoryWeeksPaid' => 'setLeaveStatutoryWeeksPaid', - 'initialBackPayPublicPayRunId' => 'setInitialBackPayPublicPayRunId', - 'value' => 'setValue', - 'rate' => 'setRate', + 'loanId' => 'setLoanId', + 'londonAllowanceId' => 'setLondonAllowanceId', 'multiplier' => 'setMultiplier', - 'description' => 'setDescription', - 'code' => 'setCode', - 'tags' => 'setTags', - 'childId' => 'setChildId', - 'isNetToGross' => 'setIsNetToGross', - 'targetNetToGrossValue' => 'setTargetNetToGrossValue', 'netToGrossDiscrepancy' => 'setNetToGrossDiscrepancy', - 'effectiveFrom' => 'setEffectiveFrom', - 'effectiveTo' => 'setEffectiveTo', - 'isAutoGeneratedBasicPayLine' => 'setIsAutoGeneratedBasicPayLine', + 'paySpineGradeId' => 'setPaySpineGradeId', + 'paySpineId' => 'setPaySpineId', + 'pensionId' => 'setPensionId', 'percentageOfEffectiveDays' => 'setPercentageOfEffectiveDays', - 'totalWorkingDays' => 'setTotalWorkingDays', - 'autoAdjustForLeave' => 'setAutoAdjustForLeave', - 'isAutomaticBackPay' => 'setIsAutomaticBackPay', - 'ignoreInitialBackPay' => 'setIgnoreInitialBackPay', - 'contributesToBasicPay' => 'setContributesToBasicPay', - 'calculateAsWhenPaid' => 'setCalculateAsWhenPaid', - 'totalPaidDays' => 'setTotalPaidDays', + 'rate' => 'setRate', 'roleId' => 'setRoleId', - 'earnedFrom' => 'setEarnedFrom', - 'earnedTo' => 'setEarnedTo', - 'annualValue' => 'setAnnualValue', - 'department' => 'setDepartment', - 'costCentre' => 'setCostCentre', - 'departmentId' => 'setDepartmentId', - 'costCentreId' => 'setCostCentreId', - 'analysisCategoriesCodes' => 'setAnalysisCategoriesCodes', - 'analysisCategoryCodeIds' => 'setAnalysisCategoryCodeIds', - 'paySpineId' => 'setPaySpineId', - 'paySpineGradeId' => 'setPaySpineGradeId', 'spinalPointId' => 'setSpinalPointId', - 'londonAllowanceId' => 'setLondonAllowanceId', - 'fullTimeAnnualValue' => 'setFullTimeAnnualValue' + 'tags' => 'setTags', + 'targetNetToGrossValue' => 'setTargetNetToGrossValue', + 'totalPaidDays' => 'setTotalPaidDays', + 'totalWorkingDays' => 'setTotalWorkingDays', + 'value' => 'setValue' ]; /** @@ -399,50 +399,50 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', + 'analysisCategoriesCodes' => 'getAnalysisCategoriesCodes', + 'analysisCategoryCodeIds' => 'getAnalysisCategoryCodeIds', + 'annualValue' => 'getAnnualValue', 'attachmentOrderId' => 'getAttachmentOrderId', - 'pensionId' => 'getPensionId', + 'autoAdjustForLeave' => 'getAutoAdjustForLeave', + 'calculateAsWhenPaid' => 'getCalculateAsWhenPaid', + 'childId' => 'getChildId', + 'code' => 'getCode', + 'contributesToBasicPay' => 'getContributesToBasicPay', + 'costCentre' => 'getCostCentre', + 'costCentreId' => 'getCostCentreId', + 'department' => 'getDepartment', + 'departmentId' => 'getDepartmentId', + 'description' => 'getDescription', + 'earnedFrom' => 'getEarnedFrom', + 'earnedTo' => 'getEarnedTo', + 'effectiveFrom' => 'getEffectiveFrom', + 'effectiveTo' => 'getEffectiveTo', + 'fullTimeAnnualValue' => 'getFullTimeAnnualValue', + 'id' => 'getId', + 'ignoreInitialBackPay' => 'getIgnoreInitialBackPay', + 'initialBackPayPublicPayRunId' => 'getInitialBackPayPublicPayRunId', + 'isAutoGeneratedBasicPayLine' => 'getIsAutoGeneratedBasicPayLine', + 'isAutomaticBackPay' => 'getIsAutomaticBackPay', + 'isNetToGross' => 'getIsNetToGross', 'leaveId' => 'getLeaveId', - 'loanId' => 'getLoanId', 'leaveStatutoryDaysPaid' => 'getLeaveStatutoryDaysPaid', 'leaveStatutoryWeeksPaid' => 'getLeaveStatutoryWeeksPaid', - 'initialBackPayPublicPayRunId' => 'getInitialBackPayPublicPayRunId', - 'value' => 'getValue', - 'rate' => 'getRate', + 'loanId' => 'getLoanId', + 'londonAllowanceId' => 'getLondonAllowanceId', 'multiplier' => 'getMultiplier', - 'description' => 'getDescription', - 'code' => 'getCode', - 'tags' => 'getTags', - 'childId' => 'getChildId', - 'isNetToGross' => 'getIsNetToGross', - 'targetNetToGrossValue' => 'getTargetNetToGrossValue', 'netToGrossDiscrepancy' => 'getNetToGrossDiscrepancy', - 'effectiveFrom' => 'getEffectiveFrom', - 'effectiveTo' => 'getEffectiveTo', - 'isAutoGeneratedBasicPayLine' => 'getIsAutoGeneratedBasicPayLine', + 'paySpineGradeId' => 'getPaySpineGradeId', + 'paySpineId' => 'getPaySpineId', + 'pensionId' => 'getPensionId', 'percentageOfEffectiveDays' => 'getPercentageOfEffectiveDays', - 'totalWorkingDays' => 'getTotalWorkingDays', - 'autoAdjustForLeave' => 'getAutoAdjustForLeave', - 'isAutomaticBackPay' => 'getIsAutomaticBackPay', - 'ignoreInitialBackPay' => 'getIgnoreInitialBackPay', - 'contributesToBasicPay' => 'getContributesToBasicPay', - 'calculateAsWhenPaid' => 'getCalculateAsWhenPaid', - 'totalPaidDays' => 'getTotalPaidDays', + 'rate' => 'getRate', 'roleId' => 'getRoleId', - 'earnedFrom' => 'getEarnedFrom', - 'earnedTo' => 'getEarnedTo', - 'annualValue' => 'getAnnualValue', - 'department' => 'getDepartment', - 'costCentre' => 'getCostCentre', - 'departmentId' => 'getDepartmentId', - 'costCentreId' => 'getCostCentreId', - 'analysisCategoriesCodes' => 'getAnalysisCategoriesCodes', - 'analysisCategoryCodeIds' => 'getAnalysisCategoryCodeIds', - 'paySpineId' => 'getPaySpineId', - 'paySpineGradeId' => 'getPaySpineGradeId', 'spinalPointId' => 'getSpinalPointId', - 'londonAllowanceId' => 'getLondonAllowanceId', - 'fullTimeAnnualValue' => 'getFullTimeAnnualValue' + 'tags' => 'getTags', + 'targetNetToGrossValue' => 'getTargetNetToGrossValue', + 'totalPaidDays' => 'getTotalPaidDays', + 'totalWorkingDays' => 'getTotalWorkingDays', + 'value' => 'getValue' ]; /** @@ -501,50 +501,50 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('analysisCategoriesCodes', $data ?? [], null); + $this->setIfExists('analysisCategoryCodeIds', $data ?? [], null); + $this->setIfExists('annualValue', $data ?? [], null); $this->setIfExists('attachmentOrderId', $data ?? [], null); - $this->setIfExists('pensionId', $data ?? [], null); - $this->setIfExists('leaveId', $data ?? [], null); - $this->setIfExists('loanId', $data ?? [], null); - $this->setIfExists('leaveStatutoryDaysPaid', $data ?? [], null); - $this->setIfExists('leaveStatutoryWeeksPaid', $data ?? [], null); - $this->setIfExists('initialBackPayPublicPayRunId', $data ?? [], null); - $this->setIfExists('value', $data ?? [], null); - $this->setIfExists('rate', $data ?? [], null); - $this->setIfExists('multiplier', $data ?? [], null); - $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('autoAdjustForLeave', $data ?? [], null); + $this->setIfExists('calculateAsWhenPaid', $data ?? [], null); $this->setIfExists('childId', $data ?? [], null); + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('contributesToBasicPay', $data ?? [], null); + $this->setIfExists('costCentre', $data ?? [], null); + $this->setIfExists('costCentreId', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('departmentId', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('earnedFrom', $data ?? [], null); + $this->setIfExists('earnedTo', $data ?? [], null); + $this->setIfExists('effectiveFrom', $data ?? [], null); + $this->setIfExists('effectiveTo', $data ?? [], null); + $this->setIfExists('fullTimeAnnualValue', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('ignoreInitialBackPay', $data ?? [], null); + $this->setIfExists('initialBackPayPublicPayRunId', $data ?? [], null); + $this->setIfExists('isAutoGeneratedBasicPayLine', $data ?? [], null); + $this->setIfExists('isAutomaticBackPay', $data ?? [], null); $this->setIfExists('isNetToGross', $data ?? [], null); - $this->setIfExists('targetNetToGrossValue', $data ?? [], null); + $this->setIfExists('leaveId', $data ?? [], null); + $this->setIfExists('leaveStatutoryDaysPaid', $data ?? [], null); + $this->setIfExists('leaveStatutoryWeeksPaid', $data ?? [], null); + $this->setIfExists('loanId', $data ?? [], null); + $this->setIfExists('londonAllowanceId', $data ?? [], null); + $this->setIfExists('multiplier', $data ?? [], null); $this->setIfExists('netToGrossDiscrepancy', $data ?? [], null); - $this->setIfExists('effectiveFrom', $data ?? [], null); - $this->setIfExists('effectiveTo', $data ?? [], null); - $this->setIfExists('isAutoGeneratedBasicPayLine', $data ?? [], null); + $this->setIfExists('paySpineGradeId', $data ?? [], null); + $this->setIfExists('paySpineId', $data ?? [], null); + $this->setIfExists('pensionId', $data ?? [], null); $this->setIfExists('percentageOfEffectiveDays', $data ?? [], null); - $this->setIfExists('totalWorkingDays', $data ?? [], null); - $this->setIfExists('autoAdjustForLeave', $data ?? [], null); - $this->setIfExists('isAutomaticBackPay', $data ?? [], null); - $this->setIfExists('ignoreInitialBackPay', $data ?? [], null); - $this->setIfExists('contributesToBasicPay', $data ?? [], null); - $this->setIfExists('calculateAsWhenPaid', $data ?? [], null); - $this->setIfExists('totalPaidDays', $data ?? [], null); + $this->setIfExists('rate', $data ?? [], null); $this->setIfExists('roleId', $data ?? [], null); - $this->setIfExists('earnedFrom', $data ?? [], null); - $this->setIfExists('earnedTo', $data ?? [], null); - $this->setIfExists('annualValue', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); - $this->setIfExists('costCentre', $data ?? [], null); - $this->setIfExists('departmentId', $data ?? [], null); - $this->setIfExists('costCentreId', $data ?? [], null); - $this->setIfExists('analysisCategoriesCodes', $data ?? [], null); - $this->setIfExists('analysisCategoryCodeIds', $data ?? [], null); - $this->setIfExists('paySpineId', $data ?? [], null); - $this->setIfExists('paySpineGradeId', $data ?? [], null); $this->setIfExists('spinalPointId', $data ?? [], null); - $this->setIfExists('londonAllowanceId', $data ?? [], null); - $this->setIfExists('fullTimeAnnualValue', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('targetNetToGrossValue', $data ?? [], null); + $this->setIfExists('totalPaidDays', $data ?? [], null); + $this->setIfExists('totalWorkingDays', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -594,596 +594,528 @@ public function valid(): bool /** - * Gets id - * - * @return string|null - */ - public function getId(): ?string - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return $this - */ - public function setId(?string $id): static - { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets attachmentOrderId + * Gets analysisCategoriesCodes * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]|null */ - public function getAttachmentOrderId(): ?string + public function getAnalysisCategoriesCodes(): ?array { - return $this->container['attachmentOrderId']; + return $this->container['analysisCategoriesCodes']; } /** - * Sets attachmentOrderId + * Sets analysisCategoriesCodes * - * @param string|null $attachmentOrderId [readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO + * @param \SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]|null $analysisCategoriesCodes List of analysiscategory id and analysiscategoryCode id * * @return $this */ - public function setAttachmentOrderId(?string $attachmentOrderId): static + public function setAnalysisCategoriesCodes(?array $analysisCategoriesCodes): static { - if (is_null($attachmentOrderId)) { - array_push($this->openAPINullablesSetToNull, 'attachmentOrderId'); + if (is_null($analysisCategoriesCodes)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoriesCodes'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('attachmentOrderId', $nullablesSetToNull); + $index = array_search('analysisCategoriesCodes', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['attachmentOrderId'] = $attachmentOrderId; + $this->container['analysisCategoriesCodes'] = $analysisCategoriesCodes; return $this; } /** - * Gets pensionId + * Gets analysisCategoryCodeIds * - * @return string|null + * @return string[]|null */ - public function getPensionId(): ?string + public function getAnalysisCategoryCodeIds(): ?array { - return $this->container['pensionId']; + return $this->container['analysisCategoryCodeIds']; } /** - * Sets pensionId + * Sets analysisCategoryCodeIds * - * @param string|null $pensionId [readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS + * @param string[]|null $analysisCategoryCodeIds Array of analysiscategoryCode uniqueId * * @return $this */ - public function setPensionId(?string $pensionId): static + public function setAnalysisCategoryCodeIds(?array $analysisCategoryCodeIds): static { - if (is_null($pensionId)) { - array_push($this->openAPINullablesSetToNull, 'pensionId'); + if (is_null($analysisCategoryCodeIds)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodeIds'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionId', $nullablesSetToNull); + $index = array_search('analysisCategoryCodeIds', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionId'] = $pensionId; + $this->container['analysisCategoryCodeIds'] = $analysisCategoryCodeIds; return $this; } /** - * Gets leaveId + * Gets annualValue * - * @return string|null + * @return float|null */ - public function getLeaveId(): ?string + public function getAnnualValue(): ?float { - return $this->container['leaveId']; + return $this->container['annualValue']; } /** - * Sets leaveId + * Sets annualValue * - * @param string|null $leaveId [readonly] The Id of the associated Leave. Only included if the PayLine is a result of a Leave with Statutory pay + * @param float|null $annualValue The original value from the PayLine before we modify it Currently only used when CalculationType is set to FixedAnnualAmount so we can determine whether the payline value needs calculating or not To recalculate set to null with annual amount recorded in Value * * @return $this */ - public function setLeaveId(?string $leaveId): static + public function setAnnualValue(?float $annualValue): static { - if (is_null($leaveId)) { - array_push($this->openAPINullablesSetToNull, 'leaveId'); + if (is_null($annualValue)) { + array_push($this->openAPINullablesSetToNull, 'annualValue'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('leaveId', $nullablesSetToNull); + $index = array_search('annualValue', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['leaveId'] = $leaveId; + $this->container['annualValue'] = $annualValue; return $this; } /** - * Gets loanId + * Gets attachmentOrderId * * @return string|null */ - public function getLoanId(): ?string + public function getAttachmentOrderId(): ?string { - return $this->container['loanId']; + return $this->container['attachmentOrderId']; } /** - * Sets loanId + * Sets attachmentOrderId * - * @param string|null $loanId [readonly] The Id of the associated Loan, if any. + * @param string|null $attachmentOrderId [readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO * * @return $this */ - public function setLoanId(?string $loanId): static + public function setAttachmentOrderId(?string $attachmentOrderId): static { - if (is_null($loanId)) { - array_push($this->openAPINullablesSetToNull, 'loanId'); + if (is_null($attachmentOrderId)) { + array_push($this->openAPINullablesSetToNull, 'attachmentOrderId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('loanId', $nullablesSetToNull); + $index = array_search('attachmentOrderId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['loanId'] = $loanId; + $this->container['attachmentOrderId'] = $attachmentOrderId; return $this; } /** - * Gets leaveStatutoryDaysPaid + * Gets autoAdjustForLeave * - * @return float|null + * @return bool|null */ - public function getLeaveStatutoryDaysPaid(): ?float + public function getAutoAdjustForLeave(): ?bool { - return $this->container['leaveStatutoryDaysPaid']; + return $this->container['autoAdjustForLeave']; } /** - * Sets leaveStatutoryDaysPaid + * Sets autoAdjustForLeave * - * @param float|null $leaveStatutoryDaysPaid [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many days they've been paid for (based on their Working Pattern). + * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun * * @return $this */ - public function setLeaveStatutoryDaysPaid(?float $leaveStatutoryDaysPaid): static + public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static { - if (is_null($leaveStatutoryDaysPaid)) { - array_push($this->openAPINullablesSetToNull, 'leaveStatutoryDaysPaid'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('leaveStatutoryDaysPaid', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($autoAdjustForLeave)) { + throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); } - $this->container['leaveStatutoryDaysPaid'] = $leaveStatutoryDaysPaid; + $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; return $this; } /** - * Gets leaveStatutoryWeeksPaid + * Gets calculateAsWhenPaid * - * @return float|null + * @return bool|null */ - public function getLeaveStatutoryWeeksPaid(): ?float + public function getCalculateAsWhenPaid(): ?bool { - return $this->container['leaveStatutoryWeeksPaid']; + return $this->container['calculateAsWhenPaid']; } /** - * Sets leaveStatutoryWeeksPaid + * Sets calculateAsWhenPaid * - * @param float|null $leaveStatutoryWeeksPaid [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many weeks they've been paid for (based on their Working Pattern). + * @param bool|null $calculateAsWhenPaid Indicates whether this pay line should be treated as When Paid rather than When Earned * * @return $this */ - public function setLeaveStatutoryWeeksPaid(?float $leaveStatutoryWeeksPaid): static + public function setCalculateAsWhenPaid(?bool $calculateAsWhenPaid): static { - if (is_null($leaveStatutoryWeeksPaid)) { - array_push($this->openAPINullablesSetToNull, 'leaveStatutoryWeeksPaid'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('leaveStatutoryWeeksPaid', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($calculateAsWhenPaid)) { + throw new InvalidArgumentException('non-nullable calculateAsWhenPaid cannot be null'); } - $this->container['leaveStatutoryWeeksPaid'] = $leaveStatutoryWeeksPaid; + $this->container['calculateAsWhenPaid'] = $calculateAsWhenPaid; return $this; } /** - * Gets initialBackPayPublicPayRunId + * Gets childId * * @return string|null */ - public function getInitialBackPayPublicPayRunId(): ?string + public function getChildId(): ?string { - return $this->container['initialBackPayPublicPayRunId']; + return $this->container['childId']; } /** - * Sets initialBackPayPublicPayRunId + * Sets childId * - * @param string|null $initialBackPayPublicPayRunId [readonly] Used to mark the first payrun where this payline has been payrolled for backpay + * @param string|null $childId childId * * @return $this */ - public function setInitialBackPayPublicPayRunId(?string $initialBackPayPublicPayRunId): static + public function setChildId(?string $childId): static { - if (is_null($initialBackPayPublicPayRunId)) { - array_push($this->openAPINullablesSetToNull, 'initialBackPayPublicPayRunId'); + if (is_null($childId)) { + array_push($this->openAPINullablesSetToNull, 'childId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('initialBackPayPublicPayRunId', $nullablesSetToNull); + $index = array_search('childId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['initialBackPayPublicPayRunId'] = $initialBackPayPublicPayRunId; - - return $this; - } - - /** - * Gets value - * - * @return float|null - */ - public function getValue(): ?float - { - return $this->container['value']; - } - - /** - * Sets value - * - * @param float|null $value The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used). If the PayCode has a CalculationType other than FixedAmount then this field will be a percentage. If the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated. - * - * @return $this - */ - public function setValue(?float $value): static - { - if (is_null($value)) { - throw new InvalidArgumentException('non-nullable value cannot be null'); - } - $this->container['value'] = $value; + $this->container['childId'] = $childId; return $this; } /** - * Gets rate + * Gets code * - * @return float|null + * @return string|null */ - public function getRate(): ?float + public function getCode(): ?string { - return $this->container['rate']; + return $this->container['code']; } /** - * Sets rate + * Sets code * - * @param float|null $rate If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used + * @param string|null $code The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition. * * @return $this */ - public function setRate(?float $rate): static + public function setCode(?string $code): static { - if (is_null($rate)) { - array_push($this->openAPINullablesSetToNull, 'rate'); + if (is_null($code)) { + array_push($this->openAPINullablesSetToNull, 'code'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('rate', $nullablesSetToNull); + $index = array_search('code', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['rate'] = $rate; + $this->container['code'] = $code; return $this; } /** - * Gets multiplier + * Gets contributesToBasicPay * - * @return float|null + * @return bool|null */ - public function getMultiplier(): ?float + public function getContributesToBasicPay(): ?bool { - return $this->container['multiplier']; + return $this->container['contributesToBasicPay']; } /** - * Sets multiplier + * Sets contributesToBasicPay * - * @param float|null $multiplier If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours + * @param bool|null $contributesToBasicPay Indicates whether this PayLine contributes to the basic pay of the Employee. * * @return $this */ - public function setMultiplier(?float $multiplier): static + public function setContributesToBasicPay(?bool $contributesToBasicPay): static { - if (is_null($multiplier)) { - array_push($this->openAPINullablesSetToNull, 'multiplier'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('multiplier', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($contributesToBasicPay)) { + throw new InvalidArgumentException('non-nullable contributesToBasicPay cannot be null'); } - $this->container['multiplier'] = $multiplier; + $this->container['contributesToBasicPay'] = $contributesToBasicPay; return $this; } /** - * Gets description + * Gets costCentre * * @return string|null */ - public function getDescription(): ?string + public function getCostCentre(): ?string { - return $this->container['description']; + return $this->container['costCentre']; } /** - * Sets description + * Sets costCentre * - * @param string|null $description A freeform description to accompany this line. It will be displayed on the payslip. + * @param string|null $costCentre CostCentre code which we want to override in payline * * @return $this */ - public function setDescription(?string $description): static + public function setCostCentre(?string $costCentre): static { - if (is_null($description)) { - array_push($this->openAPINullablesSetToNull, 'description'); + if (is_null($costCentre)) { + array_push($this->openAPINullablesSetToNull, 'costCentre'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('description', $nullablesSetToNull); + $index = array_search('costCentre', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($description) && (mb_strlen($description) > 100)) { - throw new InvalidArgumentException('invalid length for $description when calling ContractPayLineResponse., must be smaller than or equal to 100.'); - } - - $this->container['description'] = $description; + $this->container['costCentre'] = $costCentre; return $this; } /** - * Gets code + * Gets costCentreId * * @return string|null */ - public function getCode(): ?string + public function getCostCentreId(): ?string { - return $this->container['code']; + return $this->container['costCentreId']; } /** - * Sets code + * Sets costCentreId * - * @param string|null $code The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition. + * @param string|null $costCentreId CostCentre uniqueId which we want to override in payline * * @return $this */ - public function setCode(?string $code): static + public function setCostCentreId(?string $costCentreId): static { - if (is_null($code)) { - array_push($this->openAPINullablesSetToNull, 'code'); + if (is_null($costCentreId)) { + array_push($this->openAPINullablesSetToNull, 'costCentreId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('code', $nullablesSetToNull); + $index = array_search('costCentreId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['code'] = $code; + $this->container['costCentreId'] = $costCentreId; return $this; } /** - * Gets tags + * Gets department * - * @return string[]|null + * @return string|null */ - public function getTags(): ?array + public function getDepartment(): ?string { - return $this->container['tags']; + return $this->container['department']; } /** - * Sets tags + * Sets department * - * @param string[]|null $tags tags + * @param string|null $department Department code which we want to override in payline * * @return $this */ - public function setTags(?array $tags): static + public function setDepartment(?string $department): static { - if (is_null($tags)) { - array_push($this->openAPINullablesSetToNull, 'tags'); + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tags', $nullablesSetToNull); + $index = array_search('department', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tags'] = $tags; + $this->container['department'] = $department; return $this; } /** - * Gets childId + * Gets departmentId * * @return string|null */ - public function getChildId(): ?string + public function getDepartmentId(): ?string { - return $this->container['childId']; + return $this->container['departmentId']; } /** - * Sets childId + * Sets departmentId * - * @param string|null $childId childId + * @param string|null $departmentId Department uniqueId which we want to override in payline * * @return $this */ - public function setChildId(?string $childId): static + public function setDepartmentId(?string $departmentId): static { - if (is_null($childId)) { - array_push($this->openAPINullablesSetToNull, 'childId'); + if (is_null($departmentId)) { + array_push($this->openAPINullablesSetToNull, 'departmentId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('childId', $nullablesSetToNull); + $index = array_search('departmentId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['childId'] = $childId; + $this->container['departmentId'] = $departmentId; return $this; } /** - * Gets isNetToGross + * Gets description * - * @return bool|null + * @return string|null */ - public function getIsNetToGross(): ?bool + public function getDescription(): ?string { - return $this->container['isNetToGross']; + return $this->container['description']; } /** - * Sets isNetToGross + * Sets description * - * @param bool|null $isNetToGross If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. + * @param string|null $description A freeform description to accompany this line. It will be displayed on the payslip. * * @return $this */ - public function setIsNetToGross(?bool $isNetToGross): static + public function setDescription(?string $description): static { - if (is_null($isNetToGross)) { - throw new InvalidArgumentException('non-nullable isNetToGross cannot be null'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('description', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isNetToGross'] = $isNetToGross; + if (!is_null($description) && (mb_strlen($description) > 100)) { + throw new InvalidArgumentException('invalid length for $description when calling ContractPayLineResponse., must be smaller than or equal to 100.'); + } + + $this->container['description'] = $description; return $this; } /** - * Gets targetNetToGrossValue + * Gets earnedFrom * - * @return float|null + * @return \DateTime|null */ - public function getTargetNetToGrossValue(): ?float + public function getEarnedFrom(): ?\DateTime { - return $this->container['targetNetToGrossValue']; + return $this->container['earnedFrom']; } /** - * Sets targetNetToGrossValue + * Sets earnedFrom * - * @param float|null $targetNetToGrossValue The orginal net fixed addition amount that is considered to be a take home pay target. + * @param \DateTime|null $earnedFrom earnedFrom * * @return $this */ - public function setTargetNetToGrossValue(?float $targetNetToGrossValue): static + public function setEarnedFrom(?\DateTime $earnedFrom): static { - if (is_null($targetNetToGrossValue)) { - array_push($this->openAPINullablesSetToNull, 'targetNetToGrossValue'); + if (is_null($earnedFrom)) { + array_push($this->openAPINullablesSetToNull, 'earnedFrom'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('targetNetToGrossValue', $nullablesSetToNull); + $index = array_search('earnedFrom', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['targetNetToGrossValue'] = $targetNetToGrossValue; + $this->container['earnedFrom'] = $earnedFrom; return $this; } /** - * Gets netToGrossDiscrepancy + * Gets earnedTo * - * @return float|null + * @return \DateTime|null */ - public function getNetToGrossDiscrepancy(): ?float + public function getEarnedTo(): ?\DateTime { - return $this->container['netToGrossDiscrepancy']; + return $this->container['earnedTo']; } /** - * Sets netToGrossDiscrepancy + * Sets earnedTo * - * @param float|null $netToGrossDiscrepancy The discrepancy between the targeted and the calculated grossed up value durig a net to gross calculation. + * @param \DateTime|null $earnedTo earnedTo * * @return $this */ - public function setNetToGrossDiscrepancy(?float $netToGrossDiscrepancy): static + public function setEarnedTo(?\DateTime $earnedTo): static { - if (is_null($netToGrossDiscrepancy)) { - array_push($this->openAPINullablesSetToNull, 'netToGrossDiscrepancy'); + if (is_null($earnedTo)) { + array_push($this->openAPINullablesSetToNull, 'earnedTo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('netToGrossDiscrepancy', $nullablesSetToNull); + $index = array_search('earnedTo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['netToGrossDiscrepancy'] = $netToGrossDiscrepancy; + $this->container['earnedTo'] = $earnedTo; return $this; } @@ -1257,123 +1189,143 @@ public function setEffectiveTo(?\DateTime $effectiveTo): static } /** - * Gets isAutoGeneratedBasicPayLine + * Gets fullTimeAnnualValue * - * @return bool|null + * @return float|null */ - public function getIsAutoGeneratedBasicPayLine(): ?bool + public function getFullTimeAnnualValue(): ?float { - return $this->container['isAutoGeneratedBasicPayLine']; + return $this->container['fullTimeAnnualValue']; } /** - * Sets isAutoGeneratedBasicPayLine + * Sets fullTimeAnnualValue * - * @param bool|null $isAutoGeneratedBasicPayLine isAutoGeneratedBasicPayLine + * @param float|null $fullTimeAnnualValue Used to set Full Time Annual Value for payline * * @return $this */ - public function setIsAutoGeneratedBasicPayLine(?bool $isAutoGeneratedBasicPayLine): static + public function setFullTimeAnnualValue(?float $fullTimeAnnualValue): static { - if (is_null($isAutoGeneratedBasicPayLine)) { - throw new InvalidArgumentException('non-nullable isAutoGeneratedBasicPayLine cannot be null'); + if (is_null($fullTimeAnnualValue)) { + throw new InvalidArgumentException('non-nullable fullTimeAnnualValue cannot be null'); } - $this->container['isAutoGeneratedBasicPayLine'] = $isAutoGeneratedBasicPayLine; + $this->container['fullTimeAnnualValue'] = $fullTimeAnnualValue; return $this; } /** - * Gets percentageOfEffectiveDays + * Gets id + * + * @return string|null + */ + public function getId(): ?string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return $this + */ + public function setId(?string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets ignoreInitialBackPay * - * @return float|null + * @return bool|null */ - public function getPercentageOfEffectiveDays(): ?float + public function getIgnoreInitialBackPay(): ?bool { - return $this->container['percentageOfEffectiveDays']; + return $this->container['ignoreInitialBackPay']; } /** - * Sets percentageOfEffectiveDays + * Sets ignoreInitialBackPay * - * @param float|null $percentageOfEffectiveDays The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun + * @param bool|null $ignoreInitialBackPay Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology. If set to false, the automatic backpay calculation will be performed on the first pay run. * * @return $this */ - public function setPercentageOfEffectiveDays(?float $percentageOfEffectiveDays): static + public function setIgnoreInitialBackPay(?bool $ignoreInitialBackPay): static { - if (is_null($percentageOfEffectiveDays)) { - array_push($this->openAPINullablesSetToNull, 'percentageOfEffectiveDays'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('percentageOfEffectiveDays', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($ignoreInitialBackPay)) { + throw new InvalidArgumentException('non-nullable ignoreInitialBackPay cannot be null'); } - $this->container['percentageOfEffectiveDays'] = $percentageOfEffectiveDays; + $this->container['ignoreInitialBackPay'] = $ignoreInitialBackPay; return $this; } /** - * Gets totalWorkingDays + * Gets initialBackPayPublicPayRunId * - * @return float|null + * @return string|null */ - public function getTotalWorkingDays(): ?float + public function getInitialBackPayPublicPayRunId(): ?string { - return $this->container['totalWorkingDays']; + return $this->container['initialBackPayPublicPayRunId']; } /** - * Sets totalWorkingDays + * Sets initialBackPayPublicPayRunId * - * @param float|null $totalWorkingDays totalWorkingDays + * @param string|null $initialBackPayPublicPayRunId [readonly] Used to mark the first payrun where this payline has been payrolled for backpay * * @return $this */ - public function setTotalWorkingDays(?float $totalWorkingDays): static + public function setInitialBackPayPublicPayRunId(?string $initialBackPayPublicPayRunId): static { - if (is_null($totalWorkingDays)) { - array_push($this->openAPINullablesSetToNull, 'totalWorkingDays'); + if (is_null($initialBackPayPublicPayRunId)) { + array_push($this->openAPINullablesSetToNull, 'initialBackPayPublicPayRunId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalWorkingDays', $nullablesSetToNull); + $index = array_search('initialBackPayPublicPayRunId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['totalWorkingDays'] = $totalWorkingDays; + $this->container['initialBackPayPublicPayRunId'] = $initialBackPayPublicPayRunId; return $this; } /** - * Gets autoAdjustForLeave + * Gets isAutoGeneratedBasicPayLine * * @return bool|null */ - public function getAutoAdjustForLeave(): ?bool + public function getIsAutoGeneratedBasicPayLine(): ?bool { - return $this->container['autoAdjustForLeave']; + return $this->container['isAutoGeneratedBasicPayLine']; } /** - * Sets autoAdjustForLeave + * Sets isAutoGeneratedBasicPayLine * - * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun + * @param bool|null $isAutoGeneratedBasicPayLine isAutoGeneratedBasicPayLine * * @return $this */ - public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static + public function setIsAutoGeneratedBasicPayLine(?bool $isAutoGeneratedBasicPayLine): static { - if (is_null($autoAdjustForLeave)) { - throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); + if (is_null($isAutoGeneratedBasicPayLine)) { + throw new InvalidArgumentException('non-nullable isAutoGeneratedBasicPayLine cannot be null'); } - $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; + $this->container['isAutoGeneratedBasicPayLine'] = $isAutoGeneratedBasicPayLine; return $this; } @@ -1406,619 +1358,667 @@ public function setIsAutomaticBackPay(?bool $isAutomaticBackPay): static } /** - * Gets ignoreInitialBackPay + * Gets isNetToGross * * @return bool|null */ - public function getIgnoreInitialBackPay(): ?bool + public function getIsNetToGross(): ?bool { - return $this->container['ignoreInitialBackPay']; + return $this->container['isNetToGross']; } /** - * Sets ignoreInitialBackPay + * Sets isNetToGross * - * @param bool|null $ignoreInitialBackPay Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology. If set to false, the automatic backpay calculation will be performed on the first pay run. + * @param bool|null $isNetToGross If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. * * @return $this */ - public function setIgnoreInitialBackPay(?bool $ignoreInitialBackPay): static + public function setIsNetToGross(?bool $isNetToGross): static { - if (is_null($ignoreInitialBackPay)) { - throw new InvalidArgumentException('non-nullable ignoreInitialBackPay cannot be null'); + if (is_null($isNetToGross)) { + throw new InvalidArgumentException('non-nullable isNetToGross cannot be null'); } - $this->container['ignoreInitialBackPay'] = $ignoreInitialBackPay; + $this->container['isNetToGross'] = $isNetToGross; return $this; } /** - * Gets contributesToBasicPay + * Gets leaveId * - * @return bool|null + * @return string|null */ - public function getContributesToBasicPay(): ?bool + public function getLeaveId(): ?string { - return $this->container['contributesToBasicPay']; + return $this->container['leaveId']; } /** - * Sets contributesToBasicPay + * Sets leaveId * - * @param bool|null $contributesToBasicPay Indicates whether this PayLine contributes to the basic pay of the Employee. + * @param string|null $leaveId [readonly] The Id of the associated Leave. Only included if the PayLine is a result of a Leave with Statutory pay * * @return $this */ - public function setContributesToBasicPay(?bool $contributesToBasicPay): static + public function setLeaveId(?string $leaveId): static { - if (is_null($contributesToBasicPay)) { - throw new InvalidArgumentException('non-nullable contributesToBasicPay cannot be null'); + if (is_null($leaveId)) { + array_push($this->openAPINullablesSetToNull, 'leaveId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('leaveId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['contributesToBasicPay'] = $contributesToBasicPay; + $this->container['leaveId'] = $leaveId; return $this; } /** - * Gets calculateAsWhenPaid + * Gets leaveStatutoryDaysPaid * - * @return bool|null + * @return float|null */ - public function getCalculateAsWhenPaid(): ?bool + public function getLeaveStatutoryDaysPaid(): ?float { - return $this->container['calculateAsWhenPaid']; + return $this->container['leaveStatutoryDaysPaid']; } /** - * Sets calculateAsWhenPaid + * Sets leaveStatutoryDaysPaid * - * @param bool|null $calculateAsWhenPaid Indicates whether this pay line should be treated as When Paid rather than When Earned + * @param float|null $leaveStatutoryDaysPaid [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many days they've been paid for (based on their Working Pattern). * * @return $this */ - public function setCalculateAsWhenPaid(?bool $calculateAsWhenPaid): static + public function setLeaveStatutoryDaysPaid(?float $leaveStatutoryDaysPaid): static { - if (is_null($calculateAsWhenPaid)) { - throw new InvalidArgumentException('non-nullable calculateAsWhenPaid cannot be null'); + if (is_null($leaveStatutoryDaysPaid)) { + array_push($this->openAPINullablesSetToNull, 'leaveStatutoryDaysPaid'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('leaveStatutoryDaysPaid', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['calculateAsWhenPaid'] = $calculateAsWhenPaid; + $this->container['leaveStatutoryDaysPaid'] = $leaveStatutoryDaysPaid; return $this; } /** - * Gets totalPaidDays + * Gets leaveStatutoryWeeksPaid * * @return float|null */ - public function getTotalPaidDays(): ?float + public function getLeaveStatutoryWeeksPaid(): ?float { - return $this->container['totalPaidDays']; + return $this->container['leaveStatutoryWeeksPaid']; } /** - * Sets totalPaidDays + * Sets leaveStatutoryWeeksPaid * - * @param float|null $totalPaidDays totalPaidDays + * @param float|null $leaveStatutoryWeeksPaid [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many weeks they've been paid for (based on their Working Pattern). * * @return $this */ - public function setTotalPaidDays(?float $totalPaidDays): static + public function setLeaveStatutoryWeeksPaid(?float $leaveStatutoryWeeksPaid): static { - if (is_null($totalPaidDays)) { - array_push($this->openAPINullablesSetToNull, 'totalPaidDays'); + if (is_null($leaveStatutoryWeeksPaid)) { + array_push($this->openAPINullablesSetToNull, 'leaveStatutoryWeeksPaid'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalPaidDays', $nullablesSetToNull); + $index = array_search('leaveStatutoryWeeksPaid', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['totalPaidDays'] = $totalPaidDays; + $this->container['leaveStatutoryWeeksPaid'] = $leaveStatutoryWeeksPaid; return $this; } /** - * Gets roleId + * Gets loanId * * @return string|null */ - public function getRoleId(): ?string + public function getLoanId(): ?string { - return $this->container['roleId']; + return $this->container['loanId']; } /** - * Sets roleId + * Sets loanId * - * @param string|null $roleId The employee role which is associated with this pay line. If set to null, the pay line is not related with a role. + * @param string|null $loanId [readonly] The Id of the associated Loan, if any. * * @return $this */ - public function setRoleId(?string $roleId): static + public function setLoanId(?string $loanId): static { - if (is_null($roleId)) { - array_push($this->openAPINullablesSetToNull, 'roleId'); + if (is_null($loanId)) { + array_push($this->openAPINullablesSetToNull, 'loanId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('roleId', $nullablesSetToNull); + $index = array_search('loanId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['roleId'] = $roleId; + $this->container['loanId'] = $loanId; return $this; } /** - * Gets earnedFrom + * Gets londonAllowanceId * - * @return \DateTime|null + * @return int|null */ - public function getEarnedFrom(): ?\DateTime + public function getLondonAllowanceId(): ?int { - return $this->container['earnedFrom']; + return $this->container['londonAllowanceId']; } /** - * Sets earnedFrom + * Sets londonAllowanceId * - * @param \DateTime|null $earnedFrom earnedFrom + * @param int|null $londonAllowanceId Used to set London allowance id for payline * * @return $this */ - public function setEarnedFrom(?\DateTime $earnedFrom): static + public function setLondonAllowanceId(?int $londonAllowanceId): static { - if (is_null($earnedFrom)) { - array_push($this->openAPINullablesSetToNull, 'earnedFrom'); + if (is_null($londonAllowanceId)) { + array_push($this->openAPINullablesSetToNull, 'londonAllowanceId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('earnedFrom', $nullablesSetToNull); + $index = array_search('londonAllowanceId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['earnedFrom'] = $earnedFrom; + $this->container['londonAllowanceId'] = $londonAllowanceId; return $this; } /** - * Gets earnedTo + * Gets multiplier * - * @return \DateTime|null + * @return float|null */ - public function getEarnedTo(): ?\DateTime + public function getMultiplier(): ?float { - return $this->container['earnedTo']; + return $this->container['multiplier']; } /** - * Sets earnedTo + * Sets multiplier * - * @param \DateTime|null $earnedTo earnedTo + * @param float|null $multiplier If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours * * @return $this */ - public function setEarnedTo(?\DateTime $earnedTo): static + public function setMultiplier(?float $multiplier): static { - if (is_null($earnedTo)) { - array_push($this->openAPINullablesSetToNull, 'earnedTo'); + if (is_null($multiplier)) { + array_push($this->openAPINullablesSetToNull, 'multiplier'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('earnedTo', $nullablesSetToNull); + $index = array_search('multiplier', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['earnedTo'] = $earnedTo; + $this->container['multiplier'] = $multiplier; + + return $this; + } + + /** + * Gets netToGrossDiscrepancy + * + * @return float|null + */ + public function getNetToGrossDiscrepancy(): ?float + { + return $this->container['netToGrossDiscrepancy']; + } + + /** + * Sets netToGrossDiscrepancy + * + * @param float|null $netToGrossDiscrepancy The discrepancy between the targeted and the calculated grossed up value durig a net to gross calculation. + * + * @return $this + */ + public function setNetToGrossDiscrepancy(?float $netToGrossDiscrepancy): static + { + if (is_null($netToGrossDiscrepancy)) { + array_push($this->openAPINullablesSetToNull, 'netToGrossDiscrepancy'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('netToGrossDiscrepancy', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['netToGrossDiscrepancy'] = $netToGrossDiscrepancy; return $this; } /** - * Gets annualValue + * Gets paySpineGradeId * - * @return float|null + * @return string|null */ - public function getAnnualValue(): ?float + public function getPaySpineGradeId(): ?string { - return $this->container['annualValue']; + return $this->container['paySpineGradeId']; } /** - * Sets annualValue + * Sets paySpineGradeId * - * @param float|null $annualValue The original value from the PayLine before we modify it Currently only used when CalculationType is set to FixedAnnualAmount so we can determine whether the payline value needs calculating or not To recalculate set to null with annual amount recorded in Value + * @param string|null $paySpineGradeId [readonly] The Id of the associated pay spine grade. * * @return $this */ - public function setAnnualValue(?float $annualValue): static + public function setPaySpineGradeId(?string $paySpineGradeId): static { - if (is_null($annualValue)) { - array_push($this->openAPINullablesSetToNull, 'annualValue'); + if (is_null($paySpineGradeId)) { + array_push($this->openAPINullablesSetToNull, 'paySpineGradeId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('annualValue', $nullablesSetToNull); + $index = array_search('paySpineGradeId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['annualValue'] = $annualValue; + $this->container['paySpineGradeId'] = $paySpineGradeId; return $this; } /** - * Gets department + * Gets paySpineId * * @return string|null */ - public function getDepartment(): ?string + public function getPaySpineId(): ?string { - return $this->container['department']; + return $this->container['paySpineId']; } /** - * Sets department + * Sets paySpineId * - * @param string|null $department Department code which we want to override in payline + * @param string|null $paySpineId [readonly] The Id of the associated pay spine. * * @return $this */ - public function setDepartment(?string $department): static + public function setPaySpineId(?string $paySpineId): static { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); + if (is_null($paySpineId)) { + array_push($this->openAPINullablesSetToNull, 'paySpineId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); + $index = array_search('paySpineId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['department'] = $department; + $this->container['paySpineId'] = $paySpineId; return $this; } /** - * Gets costCentre + * Gets pensionId * * @return string|null */ - public function getCostCentre(): ?string + public function getPensionId(): ?string { - return $this->container['costCentre']; + return $this->container['pensionId']; } /** - * Sets costCentre + * Sets pensionId * - * @param string|null $costCentre CostCentre code which we want to override in payline + * @param string|null $pensionId [readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS * * @return $this */ - public function setCostCentre(?string $costCentre): static + public function setPensionId(?string $pensionId): static { - if (is_null($costCentre)) { - array_push($this->openAPINullablesSetToNull, 'costCentre'); + if (is_null($pensionId)) { + array_push($this->openAPINullablesSetToNull, 'pensionId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costCentre', $nullablesSetToNull); + $index = array_search('pensionId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costCentre'] = $costCentre; + $this->container['pensionId'] = $pensionId; return $this; } /** - * Gets departmentId + * Gets percentageOfEffectiveDays * - * @return string|null + * @return float|null */ - public function getDepartmentId(): ?string + public function getPercentageOfEffectiveDays(): ?float { - return $this->container['departmentId']; + return $this->container['percentageOfEffectiveDays']; } /** - * Sets departmentId + * Sets percentageOfEffectiveDays * - * @param string|null $departmentId Department uniqueId which we want to override in payline + * @param float|null $percentageOfEffectiveDays The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun * * @return $this */ - public function setDepartmentId(?string $departmentId): static + public function setPercentageOfEffectiveDays(?float $percentageOfEffectiveDays): static { - if (is_null($departmentId)) { - array_push($this->openAPINullablesSetToNull, 'departmentId'); + if (is_null($percentageOfEffectiveDays)) { + array_push($this->openAPINullablesSetToNull, 'percentageOfEffectiveDays'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('departmentId', $nullablesSetToNull); + $index = array_search('percentageOfEffectiveDays', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['departmentId'] = $departmentId; + $this->container['percentageOfEffectiveDays'] = $percentageOfEffectiveDays; return $this; } /** - * Gets costCentreId + * Gets rate * - * @return string|null + * @return float|null */ - public function getCostCentreId(): ?string + public function getRate(): ?float { - return $this->container['costCentreId']; + return $this->container['rate']; } /** - * Sets costCentreId + * Sets rate * - * @param string|null $costCentreId CostCentre uniqueId which we want to override in payline + * @param float|null $rate If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used * * @return $this */ - public function setCostCentreId(?string $costCentreId): static + public function setRate(?float $rate): static { - if (is_null($costCentreId)) { - array_push($this->openAPINullablesSetToNull, 'costCentreId'); + if (is_null($rate)) { + array_push($this->openAPINullablesSetToNull, 'rate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costCentreId', $nullablesSetToNull); + $index = array_search('rate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costCentreId'] = $costCentreId; + $this->container['rate'] = $rate; return $this; } /** - * Gets analysisCategoriesCodes + * Gets roleId * - * @return \SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]|null + * @return string|null */ - public function getAnalysisCategoriesCodes(): ?array + public function getRoleId(): ?string { - return $this->container['analysisCategoriesCodes']; + return $this->container['roleId']; } /** - * Sets analysisCategoriesCodes + * Sets roleId * - * @param \SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]|null $analysisCategoriesCodes List of analysiscategory id and analysiscategoryCode id + * @param string|null $roleId The employee role which is associated with this pay line. If set to null, the pay line is not related with a role. * * @return $this */ - public function setAnalysisCategoriesCodes(?array $analysisCategoriesCodes): static + public function setRoleId(?string $roleId): static { - if (is_null($analysisCategoriesCodes)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoriesCodes'); + if (is_null($roleId)) { + array_push($this->openAPINullablesSetToNull, 'roleId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoriesCodes', $nullablesSetToNull); + $index = array_search('roleId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoriesCodes'] = $analysisCategoriesCodes; + $this->container['roleId'] = $roleId; return $this; } /** - * Gets analysisCategoryCodeIds + * Gets spinalPointId * - * @return string[]|null + * @return string|null */ - public function getAnalysisCategoryCodeIds(): ?array + public function getSpinalPointId(): ?string { - return $this->container['analysisCategoryCodeIds']; + return $this->container['spinalPointId']; } /** - * Sets analysisCategoryCodeIds + * Sets spinalPointId * - * @param string[]|null $analysisCategoryCodeIds Array of analysiscategoryCode uniqueId + * @param string|null $spinalPointId [readonly] The Id of the associated spinal point. * * @return $this */ - public function setAnalysisCategoryCodeIds(?array $analysisCategoryCodeIds): static + public function setSpinalPointId(?string $spinalPointId): static { - if (is_null($analysisCategoryCodeIds)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodeIds'); + if (is_null($spinalPointId)) { + array_push($this->openAPINullablesSetToNull, 'spinalPointId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryCodeIds', $nullablesSetToNull); + $index = array_search('spinalPointId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoryCodeIds'] = $analysisCategoryCodeIds; + $this->container['spinalPointId'] = $spinalPointId; return $this; } /** - * Gets paySpineId + * Gets tags * - * @return string|null + * @return string[]|null */ - public function getPaySpineId(): ?string + public function getTags(): ?array { - return $this->container['paySpineId']; + return $this->container['tags']; } /** - * Sets paySpineId + * Sets tags * - * @param string|null $paySpineId [readonly] The Id of the associated pay spine. + * @param string[]|null $tags tags * * @return $this */ - public function setPaySpineId(?string $paySpineId): static + public function setTags(?array $tags): static { - if (is_null($paySpineId)) { - array_push($this->openAPINullablesSetToNull, 'paySpineId'); + if (is_null($tags)) { + array_push($this->openAPINullablesSetToNull, 'tags'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paySpineId', $nullablesSetToNull); + $index = array_search('tags', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['paySpineId'] = $paySpineId; + $this->container['tags'] = $tags; return $this; } /** - * Gets paySpineGradeId + * Gets targetNetToGrossValue * - * @return string|null + * @return float|null */ - public function getPaySpineGradeId(): ?string + public function getTargetNetToGrossValue(): ?float { - return $this->container['paySpineGradeId']; + return $this->container['targetNetToGrossValue']; } /** - * Sets paySpineGradeId + * Sets targetNetToGrossValue * - * @param string|null $paySpineGradeId [readonly] The Id of the associated pay spine grade. + * @param float|null $targetNetToGrossValue The orginal net fixed addition amount that is considered to be a take home pay target. * * @return $this */ - public function setPaySpineGradeId(?string $paySpineGradeId): static + public function setTargetNetToGrossValue(?float $targetNetToGrossValue): static { - if (is_null($paySpineGradeId)) { - array_push($this->openAPINullablesSetToNull, 'paySpineGradeId'); + if (is_null($targetNetToGrossValue)) { + array_push($this->openAPINullablesSetToNull, 'targetNetToGrossValue'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paySpineGradeId', $nullablesSetToNull); + $index = array_search('targetNetToGrossValue', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['paySpineGradeId'] = $paySpineGradeId; + $this->container['targetNetToGrossValue'] = $targetNetToGrossValue; return $this; } /** - * Gets spinalPointId + * Gets totalPaidDays * - * @return string|null + * @return float|null */ - public function getSpinalPointId(): ?string + public function getTotalPaidDays(): ?float { - return $this->container['spinalPointId']; + return $this->container['totalPaidDays']; } /** - * Sets spinalPointId + * Sets totalPaidDays * - * @param string|null $spinalPointId [readonly] The Id of the associated spinal point. + * @param float|null $totalPaidDays totalPaidDays * * @return $this */ - public function setSpinalPointId(?string $spinalPointId): static + public function setTotalPaidDays(?float $totalPaidDays): static { - if (is_null($spinalPointId)) { - array_push($this->openAPINullablesSetToNull, 'spinalPointId'); + if (is_null($totalPaidDays)) { + array_push($this->openAPINullablesSetToNull, 'totalPaidDays'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('spinalPointId', $nullablesSetToNull); + $index = array_search('totalPaidDays', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['spinalPointId'] = $spinalPointId; + $this->container['totalPaidDays'] = $totalPaidDays; return $this; } /** - * Gets londonAllowanceId + * Gets totalWorkingDays * - * @return int|null + * @return float|null */ - public function getLondonAllowanceId(): ?int + public function getTotalWorkingDays(): ?float { - return $this->container['londonAllowanceId']; + return $this->container['totalWorkingDays']; } /** - * Sets londonAllowanceId + * Sets totalWorkingDays * - * @param int|null $londonAllowanceId Used to set London allowance id for payline + * @param float|null $totalWorkingDays totalWorkingDays * * @return $this */ - public function setLondonAllowanceId(?int $londonAllowanceId): static + public function setTotalWorkingDays(?float $totalWorkingDays): static { - if (is_null($londonAllowanceId)) { - array_push($this->openAPINullablesSetToNull, 'londonAllowanceId'); + if (is_null($totalWorkingDays)) { + array_push($this->openAPINullablesSetToNull, 'totalWorkingDays'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('londonAllowanceId', $nullablesSetToNull); + $index = array_search('totalWorkingDays', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['londonAllowanceId'] = $londonAllowanceId; + $this->container['totalWorkingDays'] = $totalWorkingDays; return $this; } /** - * Gets fullTimeAnnualValue + * Gets value * * @return float|null */ - public function getFullTimeAnnualValue(): ?float + public function getValue(): ?float { - return $this->container['fullTimeAnnualValue']; + return $this->container['value']; } /** - * Sets fullTimeAnnualValue + * Sets value * - * @param float|null $fullTimeAnnualValue Used to set Full Time Annual Value for payline + * @param float|null $value The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used). If the PayCode has a CalculationType other than FixedAmount then this field will be a percentage. If the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated. * * @return $this */ - public function setFullTimeAnnualValue(?float $fullTimeAnnualValue): static + public function setValue(?float $value): static { - if (is_null($fullTimeAnnualValue)) { - throw new InvalidArgumentException('non-nullable fullTimeAnnualValue cannot be null'); + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); } - $this->container['fullTimeAnnualValue'] = $fullTimeAnnualValue; + $this->container['value'] = $value; return $this; } diff --git a/src/Model/ContractPayOptionsBaseResponse.php b/src/Model/ContractPayOptionsBaseResponse.php index ae2b660..b9a4f0b 100644 --- a/src/Model/ContractPayOptionsBaseResponse.php +++ b/src/Model/ContractPayOptionsBaseResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,18 +59,18 @@ class ContractPayOptionsBaseResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPITypes = [ - 'regularPayLines' => '\SynergiTech\Staffology\Model\ContractPayLineResponse[]', + 'autoAdjustForLeave' => 'bool', + 'baseDailyRate' => 'float', + 'baseHourlyRate' => 'float', 'basis' => '\SynergiTech\Staffology\Model\PayBasis', - 'nationalMinimumWage' => 'bool', - 'payCode' => 'string', - 'mileageVehicleType' => '\SynergiTech\Staffology\Model\MileageVehicleType', 'mapsMiles' => 'int', + 'mileageVehicleType' => '\SynergiTech\Staffology\Model\MileageVehicleType', + 'nationalMinimumWage' => 'bool', + 'niTable' => 'string', 'payAmount' => 'float', 'payAmountMultiplier' => 'float', - 'baseHourlyRate' => 'float', - 'baseDailyRate' => 'float', - 'autoAdjustForLeave' => 'bool', - 'niTable' => 'string' + 'payCode' => 'string', + 'regularPayLines' => '\SynergiTech\Staffology\Model\ContractPayLineResponse[]' ]; /** @@ -79,18 +79,18 @@ class ContractPayOptionsBaseResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPIFormats = [ - 'regularPayLines' => null, + 'autoAdjustForLeave' => null, + 'baseDailyRate' => 'double', + 'baseHourlyRate' => 'double', 'basis' => null, - 'nationalMinimumWage' => null, - 'payCode' => null, - 'mileageVehicleType' => null, 'mapsMiles' => 'int32', + 'mileageVehicleType' => null, + 'nationalMinimumWage' => null, + 'niTable' => null, 'payAmount' => 'double', 'payAmountMultiplier' => 'double', - 'baseHourlyRate' => 'double', - 'baseDailyRate' => 'double', - 'autoAdjustForLeave' => null, - 'niTable' => null + 'payCode' => null, + 'regularPayLines' => null ]; /** @@ -99,18 +99,18 @@ class ContractPayOptionsBaseResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPINullables = [ - 'regularPayLines' => true, + 'autoAdjustForLeave' => false, + 'baseDailyRate' => false, + 'baseHourlyRate' => false, 'basis' => false, - 'nationalMinimumWage' => false, - 'payCode' => true, - 'mileageVehicleType' => false, 'mapsMiles' => true, + 'mileageVehicleType' => false, + 'nationalMinimumWage' => false, + 'niTable' => false, 'payAmount' => false, 'payAmountMultiplier' => false, - 'baseHourlyRate' => false, - 'baseDailyRate' => false, - 'autoAdjustForLeave' => false, - 'niTable' => false + 'payCode' => true, + 'regularPayLines' => true ]; /** @@ -199,18 +199,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'regularPayLines' => 'regularPayLines', + 'autoAdjustForLeave' => 'autoAdjustForLeave', + 'baseDailyRate' => 'baseDailyRate', + 'baseHourlyRate' => 'baseHourlyRate', 'basis' => 'basis', - 'nationalMinimumWage' => 'nationalMinimumWage', - 'payCode' => 'payCode', - 'mileageVehicleType' => 'mileageVehicleType', 'mapsMiles' => 'mapsMiles', + 'mileageVehicleType' => 'mileageVehicleType', + 'nationalMinimumWage' => 'nationalMinimumWage', + 'niTable' => 'niTable', 'payAmount' => 'payAmount', 'payAmountMultiplier' => 'payAmountMultiplier', - 'baseHourlyRate' => 'baseHourlyRate', - 'baseDailyRate' => 'baseDailyRate', - 'autoAdjustForLeave' => 'autoAdjustForLeave', - 'niTable' => 'niTable' + 'payCode' => 'payCode', + 'regularPayLines' => 'regularPayLines' ]; /** @@ -219,18 +219,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'regularPayLines' => 'setRegularPayLines', + 'autoAdjustForLeave' => 'setAutoAdjustForLeave', + 'baseDailyRate' => 'setBaseDailyRate', + 'baseHourlyRate' => 'setBaseHourlyRate', 'basis' => 'setBasis', - 'nationalMinimumWage' => 'setNationalMinimumWage', - 'payCode' => 'setPayCode', - 'mileageVehicleType' => 'setMileageVehicleType', 'mapsMiles' => 'setMapsMiles', + 'mileageVehicleType' => 'setMileageVehicleType', + 'nationalMinimumWage' => 'setNationalMinimumWage', + 'niTable' => 'setNiTable', 'payAmount' => 'setPayAmount', 'payAmountMultiplier' => 'setPayAmountMultiplier', - 'baseHourlyRate' => 'setBaseHourlyRate', - 'baseDailyRate' => 'setBaseDailyRate', - 'autoAdjustForLeave' => 'setAutoAdjustForLeave', - 'niTable' => 'setNiTable' + 'payCode' => 'setPayCode', + 'regularPayLines' => 'setRegularPayLines' ]; /** @@ -239,18 +239,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'regularPayLines' => 'getRegularPayLines', + 'autoAdjustForLeave' => 'getAutoAdjustForLeave', + 'baseDailyRate' => 'getBaseDailyRate', + 'baseHourlyRate' => 'getBaseHourlyRate', 'basis' => 'getBasis', - 'nationalMinimumWage' => 'getNationalMinimumWage', - 'payCode' => 'getPayCode', - 'mileageVehicleType' => 'getMileageVehicleType', 'mapsMiles' => 'getMapsMiles', + 'mileageVehicleType' => 'getMileageVehicleType', + 'nationalMinimumWage' => 'getNationalMinimumWage', + 'niTable' => 'getNiTable', 'payAmount' => 'getPayAmount', 'payAmountMultiplier' => 'getPayAmountMultiplier', - 'baseHourlyRate' => 'getBaseHourlyRate', - 'baseDailyRate' => 'getBaseDailyRate', - 'autoAdjustForLeave' => 'getAutoAdjustForLeave', - 'niTable' => 'getNiTable' + 'payCode' => 'getPayCode', + 'regularPayLines' => 'getRegularPayLines' ]; /** @@ -309,18 +309,18 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('regularPayLines', $data ?? [], null); + $this->setIfExists('autoAdjustForLeave', $data ?? [], null); + $this->setIfExists('baseDailyRate', $data ?? [], null); + $this->setIfExists('baseHourlyRate', $data ?? [], null); $this->setIfExists('basis', $data ?? [], null); - $this->setIfExists('nationalMinimumWage', $data ?? [], null); - $this->setIfExists('payCode', $data ?? [], null); - $this->setIfExists('mileageVehicleType', $data ?? [], null); $this->setIfExists('mapsMiles', $data ?? [], null); + $this->setIfExists('mileageVehicleType', $data ?? [], null); + $this->setIfExists('nationalMinimumWage', $data ?? [], null); + $this->setIfExists('niTable', $data ?? [], null); $this->setIfExists('payAmount', $data ?? [], null); $this->setIfExists('payAmountMultiplier', $data ?? [], null); - $this->setIfExists('baseHourlyRate', $data ?? [], null); - $this->setIfExists('baseDailyRate', $data ?? [], null); - $this->setIfExists('autoAdjustForLeave', $data ?? [], null); - $this->setIfExists('niTable', $data ?? [], null); + $this->setIfExists('payCode', $data ?? [], null); + $this->setIfExists('regularPayLines', $data ?? [], null); } /** @@ -366,150 +366,109 @@ public function valid(): bool /** - * Gets regularPayLines - * - * @return \SynergiTech\Staffology\Model\ContractPayLineResponse[]|null - */ - public function getRegularPayLines(): ?array - { - return $this->container['regularPayLines']; - } - - /** - * Sets regularPayLines - * - * @param \SynergiTech\Staffology\Model\ContractPayLineResponse[]|null $regularPayLines These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. - * - * @return $this - */ - public function setRegularPayLines(?array $regularPayLines): static - { - if (is_null($regularPayLines)) { - array_push($this->openAPINullablesSetToNull, 'regularPayLines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('regularPayLines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['regularPayLines'] = $regularPayLines; - - return $this; - } - - /** - * Gets basis + * Gets autoAdjustForLeave * - * @return \SynergiTech\Staffology\Model\PayBasis|null + * @return bool|null */ - public function getBasis(): ?\SynergiTech\Staffology\Model\PayBasis + public function getAutoAdjustForLeave(): ?bool { - return $this->container['basis']; + return $this->container['autoAdjustForLeave']; } /** - * Sets basis + * Sets autoAdjustForLeave * - * @param \SynergiTech\Staffology\Model\PayBasis|null $basis basis + * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun * * @return $this */ - public function setBasis(?\SynergiTech\Staffology\Model\PayBasis $basis): static + public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static { - if (is_null($basis)) { - throw new InvalidArgumentException('non-nullable basis cannot be null'); + if (is_null($autoAdjustForLeave)) { + throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); } - $this->container['basis'] = $basis; + $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; return $this; } /** - * Gets nationalMinimumWage + * Gets baseDailyRate * - * @return bool|null + * @return float|null */ - public function getNationalMinimumWage(): ?bool + public function getBaseDailyRate(): ?float { - return $this->container['nationalMinimumWage']; + return $this->container['baseDailyRate']; } /** - * Sets nationalMinimumWage + * Sets baseDailyRate * - * @param bool|null $nationalMinimumWage nationalMinimumWage + * @param float|null $baseDailyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields * * @return $this */ - public function setNationalMinimumWage(?bool $nationalMinimumWage): static + public function setBaseDailyRate(?float $baseDailyRate): static { - if (is_null($nationalMinimumWage)) { - throw new InvalidArgumentException('non-nullable nationalMinimumWage cannot be null'); + if (is_null($baseDailyRate)) { + throw new InvalidArgumentException('non-nullable baseDailyRate cannot be null'); } - $this->container['nationalMinimumWage'] = $nationalMinimumWage; + $this->container['baseDailyRate'] = $baseDailyRate; return $this; } /** - * Gets payCode + * Gets baseHourlyRate * - * @return string|null + * @return float|null */ - public function getPayCode(): ?string + public function getBaseHourlyRate(): ?float { - return $this->container['payCode']; + return $this->container['baseHourlyRate']; } /** - * Sets payCode + * Sets baseHourlyRate * - * @param string|null $payCode If you want the Employees pay to be allocated to a code other than BASIC, specify it here + * @param float|null $baseHourlyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields * * @return $this */ - public function setPayCode(?string $payCode): static + public function setBaseHourlyRate(?float $baseHourlyRate): static { - if (is_null($payCode)) { - array_push($this->openAPINullablesSetToNull, 'payCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($baseHourlyRate)) { + throw new InvalidArgumentException('non-nullable baseHourlyRate cannot be null'); } - $this->container['payCode'] = $payCode; + $this->container['baseHourlyRate'] = $baseHourlyRate; return $this; } /** - * Gets mileageVehicleType + * Gets basis * - * @return \SynergiTech\Staffology\Model\MileageVehicleType|null + * @return \SynergiTech\Staffology\Model\PayBasis|null */ - public function getMileageVehicleType(): ?\SynergiTech\Staffology\Model\MileageVehicleType + public function getBasis(): ?\SynergiTech\Staffology\Model\PayBasis { - return $this->container['mileageVehicleType']; + return $this->container['basis']; } /** - * Sets mileageVehicleType + * Sets basis * - * @param \SynergiTech\Staffology\Model\MileageVehicleType|null $mileageVehicleType mileageVehicleType + * @param \SynergiTech\Staffology\Model\PayBasis|null $basis basis * * @return $this */ - public function setMileageVehicleType(?\SynergiTech\Staffology\Model\MileageVehicleType $mileageVehicleType): static + public function setBasis(?\SynergiTech\Staffology\Model\PayBasis $basis): static { - if (is_null($mileageVehicleType)) { - throw new InvalidArgumentException('non-nullable mileageVehicleType cannot be null'); + if (is_null($basis)) { + throw new InvalidArgumentException('non-nullable basis cannot be null'); } - $this->container['mileageVehicleType'] = $mileageVehicleType; + $this->container['basis'] = $basis; return $this; } @@ -549,163 +508,204 @@ public function setMapsMiles(?int $mapsMiles): static } /** - * Gets payAmount + * Gets mileageVehicleType * - * @return float|null + * @return \SynergiTech\Staffology\Model\MileageVehicleType|null */ - public function getPayAmount(): ?float + public function getMileageVehicleType(): ?\SynergiTech\Staffology\Model\MileageVehicleType { - return $this->container['payAmount']; + return $this->container['mileageVehicleType']; } /** - * Sets payAmount + * Sets mileageVehicleType * - * @param float|null $payAmount The amount the Employee is regularly paid each period + * @param \SynergiTech\Staffology\Model\MileageVehicleType|null $mileageVehicleType mileageVehicleType * * @return $this */ - public function setPayAmount(?float $payAmount): static + public function setMileageVehicleType(?\SynergiTech\Staffology\Model\MileageVehicleType $mileageVehicleType): static { - if (is_null($payAmount)) { - throw new InvalidArgumentException('non-nullable payAmount cannot be null'); + if (is_null($mileageVehicleType)) { + throw new InvalidArgumentException('non-nullable mileageVehicleType cannot be null'); } - $this->container['payAmount'] = $payAmount; + $this->container['mileageVehicleType'] = $mileageVehicleType; return $this; } /** - * Gets payAmountMultiplier + * Gets nationalMinimumWage * - * @return float|null + * @return bool|null */ - public function getPayAmountMultiplier(): ?float + public function getNationalMinimumWage(): ?bool { - return $this->container['payAmountMultiplier']; + return $this->container['nationalMinimumWage']; } /** - * Sets payAmountMultiplier + * Sets nationalMinimumWage * - * @param float|null $payAmountMultiplier This property is irrelevant if the basis is Monthly. But if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period. + * @param bool|null $nationalMinimumWage nationalMinimumWage * * @return $this */ - public function setPayAmountMultiplier(?float $payAmountMultiplier): static + public function setNationalMinimumWage(?bool $nationalMinimumWage): static { - if (is_null($payAmountMultiplier)) { - throw new InvalidArgumentException('non-nullable payAmountMultiplier cannot be null'); + if (is_null($nationalMinimumWage)) { + throw new InvalidArgumentException('non-nullable nationalMinimumWage cannot be null'); } - $this->container['payAmountMultiplier'] = $payAmountMultiplier; + $this->container['nationalMinimumWage'] = $nationalMinimumWage; return $this; } /** - * Gets baseHourlyRate + * Gets niTable * - * @return float|null + * @return string|null */ - public function getBaseHourlyRate(): ?float + public function getNiTable(): ?string { - return $this->container['baseHourlyRate']; + return $this->container['niTable']; } /** - * Sets baseHourlyRate + * Sets niTable * - * @param float|null $baseHourlyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields + * @param string|null $niTable niTable * * @return $this */ - public function setBaseHourlyRate(?float $baseHourlyRate): static + public function setNiTable(?string $niTable): static { - if (is_null($baseHourlyRate)) { - throw new InvalidArgumentException('non-nullable baseHourlyRate cannot be null'); + if (is_null($niTable)) { + throw new InvalidArgumentException('non-nullable niTable cannot be null'); } - $this->container['baseHourlyRate'] = $baseHourlyRate; + $this->container['niTable'] = $niTable; return $this; } /** - * Gets baseDailyRate + * Gets payAmount * * @return float|null */ - public function getBaseDailyRate(): ?float + public function getPayAmount(): ?float { - return $this->container['baseDailyRate']; + return $this->container['payAmount']; } /** - * Sets baseDailyRate + * Sets payAmount * - * @param float|null $baseDailyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields + * @param float|null $payAmount The amount the Employee is regularly paid each period * * @return $this */ - public function setBaseDailyRate(?float $baseDailyRate): static + public function setPayAmount(?float $payAmount): static { - if (is_null($baseDailyRate)) { - throw new InvalidArgumentException('non-nullable baseDailyRate cannot be null'); + if (is_null($payAmount)) { + throw new InvalidArgumentException('non-nullable payAmount cannot be null'); } - $this->container['baseDailyRate'] = $baseDailyRate; + $this->container['payAmount'] = $payAmount; return $this; } /** - * Gets autoAdjustForLeave + * Gets payAmountMultiplier * - * @return bool|null + * @return float|null */ - public function getAutoAdjustForLeave(): ?bool + public function getPayAmountMultiplier(): ?float { - return $this->container['autoAdjustForLeave']; + return $this->container['payAmountMultiplier']; } /** - * Sets autoAdjustForLeave + * Sets payAmountMultiplier * - * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun + * @param float|null $payAmountMultiplier This property is irrelevant if the basis is Monthly. But if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period. * * @return $this */ - public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static + public function setPayAmountMultiplier(?float $payAmountMultiplier): static { - if (is_null($autoAdjustForLeave)) { - throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); + if (is_null($payAmountMultiplier)) { + throw new InvalidArgumentException('non-nullable payAmountMultiplier cannot be null'); } - $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; + $this->container['payAmountMultiplier'] = $payAmountMultiplier; return $this; } /** - * Gets niTable + * Gets payCode * * @return string|null */ - public function getNiTable(): ?string + public function getPayCode(): ?string { - return $this->container['niTable']; + return $this->container['payCode']; } /** - * Sets niTable + * Sets payCode * - * @param string|null $niTable niTable + * @param string|null $payCode If you want the Employees pay to be allocated to a code other than BASIC, specify it here * * @return $this */ - public function setNiTable(?string $niTable): static + public function setPayCode(?string $payCode): static { - if (is_null($niTable)) { - throw new InvalidArgumentException('non-nullable niTable cannot be null'); + if (is_null($payCode)) { + array_push($this->openAPINullablesSetToNull, 'payCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['niTable'] = $niTable; + $this->container['payCode'] = $payCode; + + return $this; + } + + /** + * Gets regularPayLines + * + * @return \SynergiTech\Staffology\Model\ContractPayLineResponse[]|null + */ + public function getRegularPayLines(): ?array + { + return $this->container['regularPayLines']; + } + + /** + * Sets regularPayLines + * + * @param \SynergiTech\Staffology\Model\ContractPayLineResponse[]|null $regularPayLines These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. + * + * @return $this + */ + public function setRegularPayLines(?array $regularPayLines): static + { + if (is_null($regularPayLines)) { + array_push($this->openAPINullablesSetToNull, 'regularPayLines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('regularPayLines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['regularPayLines'] = $regularPayLines; return $this; } diff --git a/src/Model/ContractPayOptionsImportRequest.php b/src/Model/ContractPayOptionsImportRequest.php index ab78111..8e4352a 100644 --- a/src/Model/ContractPayOptionsImportRequest.php +++ b/src/Model/ContractPayOptionsImportRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -77,8 +77,8 @@ class ContractPayOptionsImportRequest implements ModelInterface, ArrayAccess, Js 'payAmountMultiplier' => 'float', 'payCode' => 'string', 'payGrade' => 'string', - 'payrollCode' => 'string', 'paySpine' => 'string', + 'payrollCode' => 'string', 'roleReference' => 'string', 'spinePoint' => 'string', 'tags' => 'string[]' @@ -108,8 +108,8 @@ class ContractPayOptionsImportRequest implements ModelInterface, ArrayAccess, Js 'payAmountMultiplier' => 'double', 'payCode' => null, 'payGrade' => null, - 'payrollCode' => null, 'paySpine' => null, + 'payrollCode' => null, 'roleReference' => null, 'spinePoint' => null, 'tags' => null @@ -139,8 +139,8 @@ class ContractPayOptionsImportRequest implements ModelInterface, ArrayAccess, Js 'payAmountMultiplier' => false, 'payCode' => true, 'payGrade' => true, - 'payrollCode' => true, 'paySpine' => true, + 'payrollCode' => true, 'roleReference' => true, 'spinePoint' => true, 'tags' => true @@ -250,8 +250,8 @@ public function isNullableSetToNull(string $property): bool 'payAmountMultiplier' => 'payAmountMultiplier', 'payCode' => 'payCode', 'payGrade' => 'payGrade', - 'payrollCode' => 'payrollCode', 'paySpine' => 'paySpine', + 'payrollCode' => 'payrollCode', 'roleReference' => 'roleReference', 'spinePoint' => 'spinePoint', 'tags' => 'tags' @@ -281,8 +281,8 @@ public function isNullableSetToNull(string $property): bool 'payAmountMultiplier' => 'setPayAmountMultiplier', 'payCode' => 'setPayCode', 'payGrade' => 'setPayGrade', - 'payrollCode' => 'setPayrollCode', 'paySpine' => 'setPaySpine', + 'payrollCode' => 'setPayrollCode', 'roleReference' => 'setRoleReference', 'spinePoint' => 'setSpinePoint', 'tags' => 'setTags' @@ -312,8 +312,8 @@ public function isNullableSetToNull(string $property): bool 'payAmountMultiplier' => 'getPayAmountMultiplier', 'payCode' => 'getPayCode', 'payGrade' => 'getPayGrade', - 'payrollCode' => 'getPayrollCode', 'paySpine' => 'getPaySpine', + 'payrollCode' => 'getPayrollCode', 'roleReference' => 'getRoleReference', 'spinePoint' => 'getSpinePoint', 'tags' => 'getTags' @@ -393,8 +393,8 @@ public function __construct(?array $data = null) $this->setIfExists('payAmountMultiplier', $data ?? [], null); $this->setIfExists('payCode', $data ?? [], null); $this->setIfExists('payGrade', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('paySpine', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('roleReference', $data ?? [], null); $this->setIfExists('spinePoint', $data ?? [], null); $this->setIfExists('tags', $data ?? [], null); @@ -999,69 +999,69 @@ public function setPayGrade(?string $payGrade): static } /** - * Gets payrollCode + * Gets paySpine * * @return string|null */ - public function getPayrollCode(): ?string + public function getPaySpine(): ?string { - return $this->container['payrollCode']; + return $this->container['paySpine']; } /** - * Sets payrollCode + * Sets paySpine * - * @param string|null $payrollCode payrollCode + * @param string|null $paySpine paySpine * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setPaySpine(?string $paySpine): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); + if (is_null($paySpine)) { + array_push($this->openAPINullablesSetToNull, 'paySpine'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); + $index = array_search('paySpine', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payrollCode'] = $payrollCode; + $this->container['paySpine'] = $paySpine; return $this; } /** - * Gets paySpine + * Gets payrollCode * * @return string|null */ - public function getPaySpine(): ?string + public function getPayrollCode(): ?string { - return $this->container['paySpine']; + return $this->container['payrollCode']; } /** - * Sets paySpine + * Sets payrollCode * - * @param string|null $paySpine paySpine + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setPaySpine(?string $paySpine): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($paySpine)) { - array_push($this->openAPINullablesSetToNull, 'paySpine'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paySpine', $nullablesSetToNull); + $index = array_search('payrollCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['paySpine'] = $paySpine; + $this->container['payrollCode'] = $payrollCode; return $this; } diff --git a/src/Model/ContractPayOptionsRequest.php b/src/Model/ContractPayOptionsRequest.php index 77e8ba7..563f191 100644 --- a/src/Model/ContractPayOptionsRequest.php +++ b/src/Model/ContractPayOptionsRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,25 +59,25 @@ class ContractPayOptionsRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPITypes = [ - 'regularPayLines' => '\SynergiTech\Staffology\Model\ContractPayLineRequest[]', - 'period' => '\SynergiTech\Staffology\Model\PayPeriods', - 'ordinal' => 'int', - 'method' => '\SynergiTech\Staffology\Model\PayMethod', - 'withholdTaxRefundIfPayIsZero' => 'bool', - 'taxAndNi' => '\SynergiTech\Staffology\Model\ContractTaxAndNi', - 'fpsFields' => '\SynergiTech\Staffology\Model\ContractFpsFields', - 'tags' => 'string[]', + 'autoAdjustForLeave' => 'bool', + 'baseDailyRate' => 'float', + 'baseHourlyRate' => 'float', 'basis' => '\SynergiTech\Staffology\Model\PayBasis', - 'nationalMinimumWage' => 'bool', - 'payCode' => 'string', - 'mileageVehicleType' => '\SynergiTech\Staffology\Model\MileageVehicleType', + 'fpsFields' => '\SynergiTech\Staffology\Model\ContractFpsFields', 'mapsMiles' => 'int', + 'method' => '\SynergiTech\Staffology\Model\PayMethod', + 'mileageVehicleType' => '\SynergiTech\Staffology\Model\MileageVehicleType', + 'nationalMinimumWage' => 'bool', + 'niTable' => 'string', + 'ordinal' => 'int', 'payAmount' => 'float', 'payAmountMultiplier' => 'float', - 'baseHourlyRate' => 'float', - 'baseDailyRate' => 'float', - 'autoAdjustForLeave' => 'bool', - 'niTable' => 'string' + 'payCode' => 'string', + 'period' => '\SynergiTech\Staffology\Model\PayPeriods', + 'regularPayLines' => '\SynergiTech\Staffology\Model\ContractPayLineRequest[]', + 'tags' => 'string[]', + 'taxAndNi' => '\SynergiTech\Staffology\Model\ContractTaxAndNi', + 'withholdTaxRefundIfPayIsZero' => 'bool' ]; /** @@ -86,25 +86,25 @@ class ContractPayOptionsRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPIFormats = [ - 'regularPayLines' => null, - 'period' => null, - 'ordinal' => 'int32', - 'method' => null, - 'withholdTaxRefundIfPayIsZero' => null, - 'taxAndNi' => null, - 'fpsFields' => null, - 'tags' => null, + 'autoAdjustForLeave' => null, + 'baseDailyRate' => 'double', + 'baseHourlyRate' => 'double', 'basis' => null, - 'nationalMinimumWage' => null, - 'payCode' => null, - 'mileageVehicleType' => null, + 'fpsFields' => null, 'mapsMiles' => 'int32', + 'method' => null, + 'mileageVehicleType' => null, + 'nationalMinimumWage' => null, + 'niTable' => null, + 'ordinal' => 'int32', 'payAmount' => 'double', 'payAmountMultiplier' => 'double', - 'baseHourlyRate' => 'double', - 'baseDailyRate' => 'double', - 'autoAdjustForLeave' => null, - 'niTable' => null + 'payCode' => null, + 'period' => null, + 'regularPayLines' => null, + 'tags' => null, + 'taxAndNi' => null, + 'withholdTaxRefundIfPayIsZero' => null ]; /** @@ -113,25 +113,25 @@ class ContractPayOptionsRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPINullables = [ - 'regularPayLines' => true, - 'period' => false, - 'ordinal' => false, - 'method' => false, - 'withholdTaxRefundIfPayIsZero' => false, - 'taxAndNi' => false, - 'fpsFields' => false, - 'tags' => true, + 'autoAdjustForLeave' => false, + 'baseDailyRate' => false, + 'baseHourlyRate' => false, 'basis' => false, - 'nationalMinimumWage' => false, - 'payCode' => true, - 'mileageVehicleType' => false, + 'fpsFields' => false, 'mapsMiles' => true, + 'method' => false, + 'mileageVehicleType' => false, + 'nationalMinimumWage' => false, + 'niTable' => false, + 'ordinal' => false, 'payAmount' => false, 'payAmountMultiplier' => false, - 'baseHourlyRate' => false, - 'baseDailyRate' => false, - 'autoAdjustForLeave' => false, - 'niTable' => false + 'payCode' => true, + 'period' => false, + 'regularPayLines' => true, + 'tags' => true, + 'taxAndNi' => false, + 'withholdTaxRefundIfPayIsZero' => false ]; /** @@ -220,25 +220,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'regularPayLines' => 'regularPayLines', - 'period' => 'period', - 'ordinal' => 'ordinal', - 'method' => 'method', - 'withholdTaxRefundIfPayIsZero' => 'withholdTaxRefundIfPayIsZero', - 'taxAndNi' => 'taxAndNi', - 'fpsFields' => 'fpsFields', - 'tags' => 'tags', + 'autoAdjustForLeave' => 'autoAdjustForLeave', + 'baseDailyRate' => 'baseDailyRate', + 'baseHourlyRate' => 'baseHourlyRate', 'basis' => 'basis', - 'nationalMinimumWage' => 'nationalMinimumWage', - 'payCode' => 'payCode', - 'mileageVehicleType' => 'mileageVehicleType', + 'fpsFields' => 'fpsFields', 'mapsMiles' => 'mapsMiles', + 'method' => 'method', + 'mileageVehicleType' => 'mileageVehicleType', + 'nationalMinimumWage' => 'nationalMinimumWage', + 'niTable' => 'niTable', + 'ordinal' => 'ordinal', 'payAmount' => 'payAmount', 'payAmountMultiplier' => 'payAmountMultiplier', - 'baseHourlyRate' => 'baseHourlyRate', - 'baseDailyRate' => 'baseDailyRate', - 'autoAdjustForLeave' => 'autoAdjustForLeave', - 'niTable' => 'niTable' + 'payCode' => 'payCode', + 'period' => 'period', + 'regularPayLines' => 'regularPayLines', + 'tags' => 'tags', + 'taxAndNi' => 'taxAndNi', + 'withholdTaxRefundIfPayIsZero' => 'withholdTaxRefundIfPayIsZero' ]; /** @@ -247,25 +247,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'regularPayLines' => 'setRegularPayLines', - 'period' => 'setPeriod', - 'ordinal' => 'setOrdinal', - 'method' => 'setMethod', - 'withholdTaxRefundIfPayIsZero' => 'setWithholdTaxRefundIfPayIsZero', - 'taxAndNi' => 'setTaxAndNi', - 'fpsFields' => 'setFpsFields', - 'tags' => 'setTags', + 'autoAdjustForLeave' => 'setAutoAdjustForLeave', + 'baseDailyRate' => 'setBaseDailyRate', + 'baseHourlyRate' => 'setBaseHourlyRate', 'basis' => 'setBasis', - 'nationalMinimumWage' => 'setNationalMinimumWage', - 'payCode' => 'setPayCode', - 'mileageVehicleType' => 'setMileageVehicleType', + 'fpsFields' => 'setFpsFields', 'mapsMiles' => 'setMapsMiles', + 'method' => 'setMethod', + 'mileageVehicleType' => 'setMileageVehicleType', + 'nationalMinimumWage' => 'setNationalMinimumWage', + 'niTable' => 'setNiTable', + 'ordinal' => 'setOrdinal', 'payAmount' => 'setPayAmount', 'payAmountMultiplier' => 'setPayAmountMultiplier', - 'baseHourlyRate' => 'setBaseHourlyRate', - 'baseDailyRate' => 'setBaseDailyRate', - 'autoAdjustForLeave' => 'setAutoAdjustForLeave', - 'niTable' => 'setNiTable' + 'payCode' => 'setPayCode', + 'period' => 'setPeriod', + 'regularPayLines' => 'setRegularPayLines', + 'tags' => 'setTags', + 'taxAndNi' => 'setTaxAndNi', + 'withholdTaxRefundIfPayIsZero' => 'setWithholdTaxRefundIfPayIsZero' ]; /** @@ -274,25 +274,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'regularPayLines' => 'getRegularPayLines', - 'period' => 'getPeriod', - 'ordinal' => 'getOrdinal', - 'method' => 'getMethod', - 'withholdTaxRefundIfPayIsZero' => 'getWithholdTaxRefundIfPayIsZero', - 'taxAndNi' => 'getTaxAndNi', - 'fpsFields' => 'getFpsFields', - 'tags' => 'getTags', + 'autoAdjustForLeave' => 'getAutoAdjustForLeave', + 'baseDailyRate' => 'getBaseDailyRate', + 'baseHourlyRate' => 'getBaseHourlyRate', 'basis' => 'getBasis', - 'nationalMinimumWage' => 'getNationalMinimumWage', - 'payCode' => 'getPayCode', - 'mileageVehicleType' => 'getMileageVehicleType', + 'fpsFields' => 'getFpsFields', 'mapsMiles' => 'getMapsMiles', + 'method' => 'getMethod', + 'mileageVehicleType' => 'getMileageVehicleType', + 'nationalMinimumWage' => 'getNationalMinimumWage', + 'niTable' => 'getNiTable', + 'ordinal' => 'getOrdinal', 'payAmount' => 'getPayAmount', 'payAmountMultiplier' => 'getPayAmountMultiplier', - 'baseHourlyRate' => 'getBaseHourlyRate', - 'baseDailyRate' => 'getBaseDailyRate', - 'autoAdjustForLeave' => 'getAutoAdjustForLeave', - 'niTable' => 'getNiTable' + 'payCode' => 'getPayCode', + 'period' => 'getPeriod', + 'regularPayLines' => 'getRegularPayLines', + 'tags' => 'getTags', + 'taxAndNi' => 'getTaxAndNi', + 'withholdTaxRefundIfPayIsZero' => 'getWithholdTaxRefundIfPayIsZero' ]; /** @@ -351,25 +351,25 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('regularPayLines', $data ?? [], null); - $this->setIfExists('period', $data ?? [], null); - $this->setIfExists('ordinal', $data ?? [], null); - $this->setIfExists('method', $data ?? [], null); - $this->setIfExists('withholdTaxRefundIfPayIsZero', $data ?? [], null); - $this->setIfExists('taxAndNi', $data ?? [], null); - $this->setIfExists('fpsFields', $data ?? [], null); - $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('autoAdjustForLeave', $data ?? [], null); + $this->setIfExists('baseDailyRate', $data ?? [], null); + $this->setIfExists('baseHourlyRate', $data ?? [], null); $this->setIfExists('basis', $data ?? [], null); - $this->setIfExists('nationalMinimumWage', $data ?? [], null); - $this->setIfExists('payCode', $data ?? [], null); - $this->setIfExists('mileageVehicleType', $data ?? [], null); + $this->setIfExists('fpsFields', $data ?? [], null); $this->setIfExists('mapsMiles', $data ?? [], null); + $this->setIfExists('method', $data ?? [], null); + $this->setIfExists('mileageVehicleType', $data ?? [], null); + $this->setIfExists('nationalMinimumWage', $data ?? [], null); + $this->setIfExists('niTable', $data ?? [], null); + $this->setIfExists('ordinal', $data ?? [], null); $this->setIfExists('payAmount', $data ?? [], null); $this->setIfExists('payAmountMultiplier', $data ?? [], null); - $this->setIfExists('baseHourlyRate', $data ?? [], null); - $this->setIfExists('baseDailyRate', $data ?? [], null); - $this->setIfExists('autoAdjustForLeave', $data ?? [], null); - $this->setIfExists('niTable', $data ?? [], null); + $this->setIfExists('payCode', $data ?? [], null); + $this->setIfExists('period', $data ?? [], null); + $this->setIfExists('regularPayLines', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('taxAndNi', $data ?? [], null); + $this->setIfExists('withholdTaxRefundIfPayIsZero', $data ?? [], null); } /** @@ -415,170 +415,109 @@ public function valid(): bool /** - * Gets regularPayLines + * Gets autoAdjustForLeave * - * @return \SynergiTech\Staffology\Model\ContractPayLineRequest[]|null + * @return bool|null */ - public function getRegularPayLines(): ?array + public function getAutoAdjustForLeave(): ?bool { - return $this->container['regularPayLines']; + return $this->container['autoAdjustForLeave']; } /** - * Sets regularPayLines + * Sets autoAdjustForLeave * - * @param \SynergiTech\Staffology\Model\ContractPayLineRequest[]|null $regularPayLines These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. + * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun * * @return $this */ - public function setRegularPayLines(?array $regularPayLines): static + public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static { - if (is_null($regularPayLines)) { - array_push($this->openAPINullablesSetToNull, 'regularPayLines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('regularPayLines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($autoAdjustForLeave)) { + throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); } - $this->container['regularPayLines'] = $regularPayLines; + $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; return $this; } /** - * Gets period + * Gets baseDailyRate * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return float|null */ - public function getPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getBaseDailyRate(): ?float { - return $this->container['period']; + return $this->container['baseDailyRate']; } /** - * Sets period + * Sets baseDailyRate * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $period period + * @param float|null $baseDailyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields * * @return $this */ - public function setPeriod(?\SynergiTech\Staffology\Model\PayPeriods $period): static + public function setBaseDailyRate(?float $baseDailyRate): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($baseDailyRate)) { + throw new InvalidArgumentException('non-nullable baseDailyRate cannot be null'); } - $this->container['period'] = $period; + $this->container['baseDailyRate'] = $baseDailyRate; return $this; } /** - * Gets ordinal + * Gets baseHourlyRate * - * @return int|null + * @return float|null */ - public function getOrdinal(): ?int + public function getBaseHourlyRate(): ?float { - return $this->container['ordinal']; + return $this->container['baseHourlyRate']; } /** - * Sets ordinal + * Sets baseHourlyRate * - * @param int|null $ordinal Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod. + * @param float|null $baseHourlyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields * * @return $this */ - public function setOrdinal(?int $ordinal): static + public function setBaseHourlyRate(?float $baseHourlyRate): static { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + if (is_null($baseHourlyRate)) { + throw new InvalidArgumentException('non-nullable baseHourlyRate cannot be null'); } - $this->container['ordinal'] = $ordinal; + $this->container['baseHourlyRate'] = $baseHourlyRate; return $this; } /** - * Gets method + * Gets basis * - * @return \SynergiTech\Staffology\Model\PayMethod|null - */ - public function getMethod(): ?\SynergiTech\Staffology\Model\PayMethod - { - return $this->container['method']; - } - - /** - * Sets method - * - * @param \SynergiTech\Staffology\Model\PayMethod|null $method method - * - * @return $this - */ - public function setMethod(?\SynergiTech\Staffology\Model\PayMethod $method): static - { - if (is_null($method)) { - throw new InvalidArgumentException('non-nullable method cannot be null'); - } - $this->container['method'] = $method; - - return $this; - } - - /** - * Gets withholdTaxRefundIfPayIsZero - * - * @return bool|null - */ - public function getWithholdTaxRefundIfPayIsZero(): ?bool - { - return $this->container['withholdTaxRefundIfPayIsZero']; - } - - /** - * Sets withholdTaxRefundIfPayIsZero - * - * @param bool|null $withholdTaxRefundIfPayIsZero If you don't want negative PAYE values when the Gross pay is zero, set this to true - * - * @return $this - */ - public function setWithholdTaxRefundIfPayIsZero(?bool $withholdTaxRefundIfPayIsZero): static - { - if (is_null($withholdTaxRefundIfPayIsZero)) { - throw new InvalidArgumentException('non-nullable withholdTaxRefundIfPayIsZero cannot be null'); - } - $this->container['withholdTaxRefundIfPayIsZero'] = $withholdTaxRefundIfPayIsZero; - - return $this; - } - - /** - * Gets taxAndNi - * - * @return \SynergiTech\Staffology\Model\ContractTaxAndNi|null + * @return \SynergiTech\Staffology\Model\PayBasis|null */ - public function getTaxAndNi(): ?\SynergiTech\Staffology\Model\ContractTaxAndNi + public function getBasis(): ?\SynergiTech\Staffology\Model\PayBasis { - return $this->container['taxAndNi']; + return $this->container['basis']; } /** - * Sets taxAndNi + * Sets basis * - * @param \SynergiTech\Staffology\Model\ContractTaxAndNi|null $taxAndNi taxAndNi + * @param \SynergiTech\Staffology\Model\PayBasis|null $basis basis * * @return $this */ - public function setTaxAndNi(?\SynergiTech\Staffology\Model\ContractTaxAndNi $taxAndNi): static + public function setBasis(?\SynergiTech\Staffology\Model\PayBasis $basis): static { - if (is_null($taxAndNi)) { - throw new InvalidArgumentException('non-nullable taxAndNi cannot be null'); + if (is_null($basis)) { + throw new InvalidArgumentException('non-nullable basis cannot be null'); } - $this->container['taxAndNi'] = $taxAndNi; + $this->container['basis'] = $basis; return $this; } @@ -611,184 +550,170 @@ public function setFpsFields(?\SynergiTech\Staffology\Model\ContractFpsFields $f } /** - * Gets tags + * Gets mapsMiles * - * @return string[]|null + * @return int|null */ - public function getTags(): ?array + public function getMapsMiles(): ?int { - return $this->container['tags']; + return $this->container['mapsMiles']; } /** - * Sets tags + * Sets mapsMiles * - * @param string[]|null $tags tags + * @param int|null $mapsMiles The number of miles to pay for as Mileage Allowance Payments * * @return $this */ - public function setTags(?array $tags): static + public function setMapsMiles(?int $mapsMiles): static { - if (is_null($tags)) { - array_push($this->openAPINullablesSetToNull, 'tags'); + if (is_null($mapsMiles)) { + array_push($this->openAPINullablesSetToNull, 'mapsMiles'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tags', $nullablesSetToNull); + $index = array_search('mapsMiles', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tags'] = $tags; + $this->container['mapsMiles'] = $mapsMiles; return $this; } /** - * Gets basis + * Gets method * - * @return \SynergiTech\Staffology\Model\PayBasis|null + * @return \SynergiTech\Staffology\Model\PayMethod|null */ - public function getBasis(): ?\SynergiTech\Staffology\Model\PayBasis + public function getMethod(): ?\SynergiTech\Staffology\Model\PayMethod { - return $this->container['basis']; + return $this->container['method']; } /** - * Sets basis + * Sets method * - * @param \SynergiTech\Staffology\Model\PayBasis|null $basis basis + * @param \SynergiTech\Staffology\Model\PayMethod|null $method method * * @return $this */ - public function setBasis(?\SynergiTech\Staffology\Model\PayBasis $basis): static + public function setMethod(?\SynergiTech\Staffology\Model\PayMethod $method): static { - if (is_null($basis)) { - throw new InvalidArgumentException('non-nullable basis cannot be null'); + if (is_null($method)) { + throw new InvalidArgumentException('non-nullable method cannot be null'); } - $this->container['basis'] = $basis; + $this->container['method'] = $method; return $this; } /** - * Gets nationalMinimumWage + * Gets mileageVehicleType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\MileageVehicleType|null */ - public function getNationalMinimumWage(): ?bool + public function getMileageVehicleType(): ?\SynergiTech\Staffology\Model\MileageVehicleType { - return $this->container['nationalMinimumWage']; + return $this->container['mileageVehicleType']; } /** - * Sets nationalMinimumWage + * Sets mileageVehicleType * - * @param bool|null $nationalMinimumWage nationalMinimumWage + * @param \SynergiTech\Staffology\Model\MileageVehicleType|null $mileageVehicleType mileageVehicleType * * @return $this */ - public function setNationalMinimumWage(?bool $nationalMinimumWage): static + public function setMileageVehicleType(?\SynergiTech\Staffology\Model\MileageVehicleType $mileageVehicleType): static { - if (is_null($nationalMinimumWage)) { - throw new InvalidArgumentException('non-nullable nationalMinimumWage cannot be null'); + if (is_null($mileageVehicleType)) { + throw new InvalidArgumentException('non-nullable mileageVehicleType cannot be null'); } - $this->container['nationalMinimumWage'] = $nationalMinimumWage; + $this->container['mileageVehicleType'] = $mileageVehicleType; return $this; } /** - * Gets payCode + * Gets nationalMinimumWage * - * @return string|null + * @return bool|null */ - public function getPayCode(): ?string + public function getNationalMinimumWage(): ?bool { - return $this->container['payCode']; + return $this->container['nationalMinimumWage']; } /** - * Sets payCode + * Sets nationalMinimumWage * - * @param string|null $payCode If you want the Employees pay to be allocated to a code other than BASIC, specify it here + * @param bool|null $nationalMinimumWage nationalMinimumWage * * @return $this */ - public function setPayCode(?string $payCode): static + public function setNationalMinimumWage(?bool $nationalMinimumWage): static { - if (is_null($payCode)) { - array_push($this->openAPINullablesSetToNull, 'payCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($nationalMinimumWage)) { + throw new InvalidArgumentException('non-nullable nationalMinimumWage cannot be null'); } - $this->container['payCode'] = $payCode; + $this->container['nationalMinimumWage'] = $nationalMinimumWage; return $this; } /** - * Gets mileageVehicleType + * Gets niTable * - * @return \SynergiTech\Staffology\Model\MileageVehicleType|null + * @return string|null */ - public function getMileageVehicleType(): ?\SynergiTech\Staffology\Model\MileageVehicleType + public function getNiTable(): ?string { - return $this->container['mileageVehicleType']; + return $this->container['niTable']; } /** - * Sets mileageVehicleType + * Sets niTable * - * @param \SynergiTech\Staffology\Model\MileageVehicleType|null $mileageVehicleType mileageVehicleType + * @param string|null $niTable niTable * * @return $this */ - public function setMileageVehicleType(?\SynergiTech\Staffology\Model\MileageVehicleType $mileageVehicleType): static + public function setNiTable(?string $niTable): static { - if (is_null($mileageVehicleType)) { - throw new InvalidArgumentException('non-nullable mileageVehicleType cannot be null'); + if (is_null($niTable)) { + throw new InvalidArgumentException('non-nullable niTable cannot be null'); } - $this->container['mileageVehicleType'] = $mileageVehicleType; + $this->container['niTable'] = $niTable; return $this; } /** - * Gets mapsMiles + * Gets ordinal * * @return int|null */ - public function getMapsMiles(): ?int + public function getOrdinal(): ?int { - return $this->container['mapsMiles']; + return $this->container['ordinal']; } /** - * Sets mapsMiles + * Sets ordinal * - * @param int|null $mapsMiles The number of miles to pay for as Mileage Allowance Payments + * @param int|null $ordinal Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod. * * @return $this */ - public function setMapsMiles(?int $mapsMiles): static + public function setOrdinal(?int $ordinal): static { - if (is_null($mapsMiles)) { - array_push($this->openAPINullablesSetToNull, 'mapsMiles'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mapsMiles', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['mapsMiles'] = $mapsMiles; + $this->container['ordinal'] = $ordinal; return $this; } @@ -848,109 +773,184 @@ public function setPayAmountMultiplier(?float $payAmountMultiplier): static } /** - * Gets baseHourlyRate + * Gets payCode * - * @return float|null + * @return string|null */ - public function getBaseHourlyRate(): ?float + public function getPayCode(): ?string { - return $this->container['baseHourlyRate']; + return $this->container['payCode']; } /** - * Sets baseHourlyRate + * Sets payCode * - * @param float|null $baseHourlyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields + * @param string|null $payCode If you want the Employees pay to be allocated to a code other than BASIC, specify it here * * @return $this */ - public function setBaseHourlyRate(?float $baseHourlyRate): static + public function setPayCode(?string $payCode): static { - if (is_null($baseHourlyRate)) { - throw new InvalidArgumentException('non-nullable baseHourlyRate cannot be null'); + if (is_null($payCode)) { + array_push($this->openAPINullablesSetToNull, 'payCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['baseHourlyRate'] = $baseHourlyRate; + $this->container['payCode'] = $payCode; return $this; } /** - * Gets baseDailyRate + * Gets period * - * @return float|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getBaseDailyRate(): ?float + public function getPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['baseDailyRate']; + return $this->container['period']; } /** - * Sets baseDailyRate + * Sets period * - * @param float|null $baseDailyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields + * @param \SynergiTech\Staffology\Model\PayPeriods|null $period period * * @return $this */ - public function setBaseDailyRate(?float $baseDailyRate): static + public function setPeriod(?\SynergiTech\Staffology\Model\PayPeriods $period): static { - if (is_null($baseDailyRate)) { - throw new InvalidArgumentException('non-nullable baseDailyRate cannot be null'); + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['baseDailyRate'] = $baseDailyRate; + $this->container['period'] = $period; return $this; } /** - * Gets autoAdjustForLeave + * Gets regularPayLines * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractPayLineRequest[]|null */ - public function getAutoAdjustForLeave(): ?bool + public function getRegularPayLines(): ?array { - return $this->container['autoAdjustForLeave']; + return $this->container['regularPayLines']; } /** - * Sets autoAdjustForLeave + * Sets regularPayLines * - * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun + * @param \SynergiTech\Staffology\Model\ContractPayLineRequest[]|null $regularPayLines These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. * * @return $this */ - public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static + public function setRegularPayLines(?array $regularPayLines): static { - if (is_null($autoAdjustForLeave)) { - throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); + if (is_null($regularPayLines)) { + array_push($this->openAPINullablesSetToNull, 'regularPayLines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('regularPayLines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; + $this->container['regularPayLines'] = $regularPayLines; return $this; } /** - * Gets niTable + * Gets tags * - * @return string|null + * @return string[]|null */ - public function getNiTable(): ?string + public function getTags(): ?array { - return $this->container['niTable']; + return $this->container['tags']; } /** - * Sets niTable + * Sets tags * - * @param string|null $niTable niTable + * @param string[]|null $tags tags * * @return $this */ - public function setNiTable(?string $niTable): static + public function setTags(?array $tags): static { - if (is_null($niTable)) { - throw new InvalidArgumentException('non-nullable niTable cannot be null'); + if (is_null($tags)) { + array_push($this->openAPINullablesSetToNull, 'tags'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tags', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['niTable'] = $niTable; + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets taxAndNi + * + * @return \SynergiTech\Staffology\Model\ContractTaxAndNi|null + */ + public function getTaxAndNi(): ?\SynergiTech\Staffology\Model\ContractTaxAndNi + { + return $this->container['taxAndNi']; + } + + /** + * Sets taxAndNi + * + * @param \SynergiTech\Staffology\Model\ContractTaxAndNi|null $taxAndNi taxAndNi + * + * @return $this + */ + public function setTaxAndNi(?\SynergiTech\Staffology\Model\ContractTaxAndNi $taxAndNi): static + { + if (is_null($taxAndNi)) { + throw new InvalidArgumentException('non-nullable taxAndNi cannot be null'); + } + $this->container['taxAndNi'] = $taxAndNi; + + return $this; + } + + /** + * Gets withholdTaxRefundIfPayIsZero + * + * @return bool|null + */ + public function getWithholdTaxRefundIfPayIsZero(): ?bool + { + return $this->container['withholdTaxRefundIfPayIsZero']; + } + + /** + * Sets withholdTaxRefundIfPayIsZero + * + * @param bool|null $withholdTaxRefundIfPayIsZero If you don't want negative PAYE values when the Gross pay is zero, set this to true + * + * @return $this + */ + public function setWithholdTaxRefundIfPayIsZero(?bool $withholdTaxRefundIfPayIsZero): static + { + if (is_null($withholdTaxRefundIfPayIsZero)) { + throw new InvalidArgumentException('non-nullable withholdTaxRefundIfPayIsZero cannot be null'); + } + $this->container['withholdTaxRefundIfPayIsZero'] = $withholdTaxRefundIfPayIsZero; return $this; } diff --git a/src/Model/ContractPayOptionsResponse.php b/src/Model/ContractPayOptionsResponse.php index b7ab7c4..a36cbe4 100644 --- a/src/Model/ContractPayOptionsResponse.php +++ b/src/Model/ContractPayOptionsResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,26 +59,26 @@ class ContractPayOptionsResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'regularPayLines' => '\SynergiTech\Staffology\Model\ContractPayLineResponse[]', + 'autoAdjustForLeave' => 'bool', + 'baseDailyRate' => 'float', + 'baseHourlyRate' => 'float', 'basicPay' => 'float', - 'period' => '\SynergiTech\Staffology\Model\PayPeriods', - 'ordinal' => 'int', - 'method' => '\SynergiTech\Staffology\Model\PayMethod', - 'withholdTaxRefundIfPayIsZero' => 'bool', - 'taxAndNi' => '\SynergiTech\Staffology\Model\ContractTaxAndNi', - 'fpsFields' => '\SynergiTech\Staffology\Model\ContractFpsFields', - 'tags' => 'string[]', 'basis' => '\SynergiTech\Staffology\Model\PayBasis', - 'nationalMinimumWage' => 'bool', - 'payCode' => 'string', - 'mileageVehicleType' => '\SynergiTech\Staffology\Model\MileageVehicleType', + 'fpsFields' => '\SynergiTech\Staffology\Model\ContractFpsFields', 'mapsMiles' => 'int', + 'method' => '\SynergiTech\Staffology\Model\PayMethod', + 'mileageVehicleType' => '\SynergiTech\Staffology\Model\MileageVehicleType', + 'nationalMinimumWage' => 'bool', + 'niTable' => 'string', + 'ordinal' => 'int', 'payAmount' => 'float', 'payAmountMultiplier' => 'float', - 'baseHourlyRate' => 'float', - 'baseDailyRate' => 'float', - 'autoAdjustForLeave' => 'bool', - 'niTable' => 'string' + 'payCode' => 'string', + 'period' => '\SynergiTech\Staffology\Model\PayPeriods', + 'regularPayLines' => '\SynergiTech\Staffology\Model\ContractPayLineResponse[]', + 'tags' => 'string[]', + 'taxAndNi' => '\SynergiTech\Staffology\Model\ContractTaxAndNi', + 'withholdTaxRefundIfPayIsZero' => 'bool' ]; /** @@ -87,26 +87,26 @@ class ContractPayOptionsResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'regularPayLines' => null, + 'autoAdjustForLeave' => null, + 'baseDailyRate' => 'double', + 'baseHourlyRate' => 'double', 'basicPay' => 'double', - 'period' => null, - 'ordinal' => 'int32', - 'method' => null, - 'withholdTaxRefundIfPayIsZero' => null, - 'taxAndNi' => null, - 'fpsFields' => null, - 'tags' => null, 'basis' => null, - 'nationalMinimumWage' => null, - 'payCode' => null, - 'mileageVehicleType' => null, + 'fpsFields' => null, 'mapsMiles' => 'int32', + 'method' => null, + 'mileageVehicleType' => null, + 'nationalMinimumWage' => null, + 'niTable' => null, + 'ordinal' => 'int32', 'payAmount' => 'double', 'payAmountMultiplier' => 'double', - 'baseHourlyRate' => 'double', - 'baseDailyRate' => 'double', - 'autoAdjustForLeave' => null, - 'niTable' => null + 'payCode' => null, + 'period' => null, + 'regularPayLines' => null, + 'tags' => null, + 'taxAndNi' => null, + 'withholdTaxRefundIfPayIsZero' => null ]; /** @@ -115,26 +115,26 @@ class ContractPayOptionsResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'regularPayLines' => true, + 'autoAdjustForLeave' => false, + 'baseDailyRate' => false, + 'baseHourlyRate' => false, 'basicPay' => false, - 'period' => false, - 'ordinal' => false, - 'method' => false, - 'withholdTaxRefundIfPayIsZero' => false, - 'taxAndNi' => false, - 'fpsFields' => false, - 'tags' => true, 'basis' => false, - 'nationalMinimumWage' => false, - 'payCode' => true, - 'mileageVehicleType' => false, + 'fpsFields' => false, 'mapsMiles' => true, + 'method' => false, + 'mileageVehicleType' => false, + 'nationalMinimumWage' => false, + 'niTable' => false, + 'ordinal' => false, 'payAmount' => false, 'payAmountMultiplier' => false, - 'baseHourlyRate' => false, - 'baseDailyRate' => false, - 'autoAdjustForLeave' => false, - 'niTable' => false + 'payCode' => true, + 'period' => false, + 'regularPayLines' => true, + 'tags' => true, + 'taxAndNi' => false, + 'withholdTaxRefundIfPayIsZero' => false ]; /** @@ -223,26 +223,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'regularPayLines' => 'regularPayLines', + 'autoAdjustForLeave' => 'autoAdjustForLeave', + 'baseDailyRate' => 'baseDailyRate', + 'baseHourlyRate' => 'baseHourlyRate', 'basicPay' => 'basicPay', - 'period' => 'period', - 'ordinal' => 'ordinal', - 'method' => 'method', - 'withholdTaxRefundIfPayIsZero' => 'withholdTaxRefundIfPayIsZero', - 'taxAndNi' => 'taxAndNi', - 'fpsFields' => 'fpsFields', - 'tags' => 'tags', 'basis' => 'basis', - 'nationalMinimumWage' => 'nationalMinimumWage', - 'payCode' => 'payCode', - 'mileageVehicleType' => 'mileageVehicleType', + 'fpsFields' => 'fpsFields', 'mapsMiles' => 'mapsMiles', + 'method' => 'method', + 'mileageVehicleType' => 'mileageVehicleType', + 'nationalMinimumWage' => 'nationalMinimumWage', + 'niTable' => 'niTable', + 'ordinal' => 'ordinal', 'payAmount' => 'payAmount', 'payAmountMultiplier' => 'payAmountMultiplier', - 'baseHourlyRate' => 'baseHourlyRate', - 'baseDailyRate' => 'baseDailyRate', - 'autoAdjustForLeave' => 'autoAdjustForLeave', - 'niTable' => 'niTable' + 'payCode' => 'payCode', + 'period' => 'period', + 'regularPayLines' => 'regularPayLines', + 'tags' => 'tags', + 'taxAndNi' => 'taxAndNi', + 'withholdTaxRefundIfPayIsZero' => 'withholdTaxRefundIfPayIsZero' ]; /** @@ -251,26 +251,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'regularPayLines' => 'setRegularPayLines', + 'autoAdjustForLeave' => 'setAutoAdjustForLeave', + 'baseDailyRate' => 'setBaseDailyRate', + 'baseHourlyRate' => 'setBaseHourlyRate', 'basicPay' => 'setBasicPay', - 'period' => 'setPeriod', - 'ordinal' => 'setOrdinal', - 'method' => 'setMethod', - 'withholdTaxRefundIfPayIsZero' => 'setWithholdTaxRefundIfPayIsZero', - 'taxAndNi' => 'setTaxAndNi', - 'fpsFields' => 'setFpsFields', - 'tags' => 'setTags', 'basis' => 'setBasis', - 'nationalMinimumWage' => 'setNationalMinimumWage', - 'payCode' => 'setPayCode', - 'mileageVehicleType' => 'setMileageVehicleType', + 'fpsFields' => 'setFpsFields', 'mapsMiles' => 'setMapsMiles', + 'method' => 'setMethod', + 'mileageVehicleType' => 'setMileageVehicleType', + 'nationalMinimumWage' => 'setNationalMinimumWage', + 'niTable' => 'setNiTable', + 'ordinal' => 'setOrdinal', 'payAmount' => 'setPayAmount', 'payAmountMultiplier' => 'setPayAmountMultiplier', - 'baseHourlyRate' => 'setBaseHourlyRate', - 'baseDailyRate' => 'setBaseDailyRate', - 'autoAdjustForLeave' => 'setAutoAdjustForLeave', - 'niTable' => 'setNiTable' + 'payCode' => 'setPayCode', + 'period' => 'setPeriod', + 'regularPayLines' => 'setRegularPayLines', + 'tags' => 'setTags', + 'taxAndNi' => 'setTaxAndNi', + 'withholdTaxRefundIfPayIsZero' => 'setWithholdTaxRefundIfPayIsZero' ]; /** @@ -279,26 +279,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'regularPayLines' => 'getRegularPayLines', + 'autoAdjustForLeave' => 'getAutoAdjustForLeave', + 'baseDailyRate' => 'getBaseDailyRate', + 'baseHourlyRate' => 'getBaseHourlyRate', 'basicPay' => 'getBasicPay', - 'period' => 'getPeriod', - 'ordinal' => 'getOrdinal', - 'method' => 'getMethod', - 'withholdTaxRefundIfPayIsZero' => 'getWithholdTaxRefundIfPayIsZero', - 'taxAndNi' => 'getTaxAndNi', - 'fpsFields' => 'getFpsFields', - 'tags' => 'getTags', 'basis' => 'getBasis', - 'nationalMinimumWage' => 'getNationalMinimumWage', - 'payCode' => 'getPayCode', - 'mileageVehicleType' => 'getMileageVehicleType', + 'fpsFields' => 'getFpsFields', 'mapsMiles' => 'getMapsMiles', + 'method' => 'getMethod', + 'mileageVehicleType' => 'getMileageVehicleType', + 'nationalMinimumWage' => 'getNationalMinimumWage', + 'niTable' => 'getNiTable', + 'ordinal' => 'getOrdinal', 'payAmount' => 'getPayAmount', 'payAmountMultiplier' => 'getPayAmountMultiplier', - 'baseHourlyRate' => 'getBaseHourlyRate', - 'baseDailyRate' => 'getBaseDailyRate', - 'autoAdjustForLeave' => 'getAutoAdjustForLeave', - 'niTable' => 'getNiTable' + 'payCode' => 'getPayCode', + 'period' => 'getPeriod', + 'regularPayLines' => 'getRegularPayLines', + 'tags' => 'getTags', + 'taxAndNi' => 'getTaxAndNi', + 'withholdTaxRefundIfPayIsZero' => 'getWithholdTaxRefundIfPayIsZero' ]; /** @@ -357,26 +357,26 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('regularPayLines', $data ?? [], null); + $this->setIfExists('autoAdjustForLeave', $data ?? [], null); + $this->setIfExists('baseDailyRate', $data ?? [], null); + $this->setIfExists('baseHourlyRate', $data ?? [], null); $this->setIfExists('basicPay', $data ?? [], null); - $this->setIfExists('period', $data ?? [], null); - $this->setIfExists('ordinal', $data ?? [], null); - $this->setIfExists('method', $data ?? [], null); - $this->setIfExists('withholdTaxRefundIfPayIsZero', $data ?? [], null); - $this->setIfExists('taxAndNi', $data ?? [], null); - $this->setIfExists('fpsFields', $data ?? [], null); - $this->setIfExists('tags', $data ?? [], null); $this->setIfExists('basis', $data ?? [], null); - $this->setIfExists('nationalMinimumWage', $data ?? [], null); - $this->setIfExists('payCode', $data ?? [], null); - $this->setIfExists('mileageVehicleType', $data ?? [], null); + $this->setIfExists('fpsFields', $data ?? [], null); $this->setIfExists('mapsMiles', $data ?? [], null); + $this->setIfExists('method', $data ?? [], null); + $this->setIfExists('mileageVehicleType', $data ?? [], null); + $this->setIfExists('nationalMinimumWage', $data ?? [], null); + $this->setIfExists('niTable', $data ?? [], null); + $this->setIfExists('ordinal', $data ?? [], null); $this->setIfExists('payAmount', $data ?? [], null); $this->setIfExists('payAmountMultiplier', $data ?? [], null); - $this->setIfExists('baseHourlyRate', $data ?? [], null); - $this->setIfExists('baseDailyRate', $data ?? [], null); - $this->setIfExists('autoAdjustForLeave', $data ?? [], null); - $this->setIfExists('niTable', $data ?? [], null); + $this->setIfExists('payCode', $data ?? [], null); + $this->setIfExists('period', $data ?? [], null); + $this->setIfExists('regularPayLines', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('taxAndNi', $data ?? [], null); + $this->setIfExists('withholdTaxRefundIfPayIsZero', $data ?? [], null); } /** @@ -422,197 +422,136 @@ public function valid(): bool /** - * Gets regularPayLines + * Gets autoAdjustForLeave * - * @return \SynergiTech\Staffology\Model\ContractPayLineResponse[]|null + * @return bool|null */ - public function getRegularPayLines(): ?array + public function getAutoAdjustForLeave(): ?bool { - return $this->container['regularPayLines']; + return $this->container['autoAdjustForLeave']; } /** - * Sets regularPayLines + * Sets autoAdjustForLeave * - * @param \SynergiTech\Staffology\Model\ContractPayLineResponse[]|null $regularPayLines These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. + * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun * * @return $this */ - public function setRegularPayLines(?array $regularPayLines): static + public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static { - if (is_null($regularPayLines)) { - array_push($this->openAPINullablesSetToNull, 'regularPayLines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('regularPayLines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($autoAdjustForLeave)) { + throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); } - $this->container['regularPayLines'] = $regularPayLines; + $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; return $this; } /** - * Gets basicPay + * Gets baseDailyRate * * @return float|null */ - public function getBasicPay(): ?float + public function getBaseDailyRate(): ?float { - return $this->container['basicPay']; + return $this->container['baseDailyRate']; } /** - * Sets basicPay + * Sets baseDailyRate * - * @param float|null $basicPay The amount of basic pay the Employee is regularly paid each period This amount is the combined total of all pay elements that contribute to basic pay + * @param float|null $baseDailyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields * * @return $this */ - public function setBasicPay(?float $basicPay): static + public function setBaseDailyRate(?float $baseDailyRate): static { - if (is_null($basicPay)) { - throw new InvalidArgumentException('non-nullable basicPay cannot be null'); + if (is_null($baseDailyRate)) { + throw new InvalidArgumentException('non-nullable baseDailyRate cannot be null'); } - $this->container['basicPay'] = $basicPay; + $this->container['baseDailyRate'] = $baseDailyRate; return $this; } /** - * Gets period + * Gets baseHourlyRate * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return float|null */ - public function getPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getBaseHourlyRate(): ?float { - return $this->container['period']; + return $this->container['baseHourlyRate']; } /** - * Sets period + * Sets baseHourlyRate * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $period period + * @param float|null $baseHourlyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields * * @return $this */ - public function setPeriod(?\SynergiTech\Staffology\Model\PayPeriods $period): static + public function setBaseHourlyRate(?float $baseHourlyRate): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($baseHourlyRate)) { + throw new InvalidArgumentException('non-nullable baseHourlyRate cannot be null'); } - $this->container['period'] = $period; + $this->container['baseHourlyRate'] = $baseHourlyRate; return $this; } /** - * Gets ordinal + * Gets basicPay * - * @return int|null + * @return float|null */ - public function getOrdinal(): ?int - { - return $this->container['ordinal']; - } - - /** - * Sets ordinal - * - * @param int|null $ordinal Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod. - * - * @return $this - */ - public function setOrdinal(?int $ordinal): static - { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); - } - $this->container['ordinal'] = $ordinal; - - return $this; - } - - /** - * Gets method - * - * @return \SynergiTech\Staffology\Model\PayMethod|null - */ - public function getMethod(): ?\SynergiTech\Staffology\Model\PayMethod - { - return $this->container['method']; - } - - /** - * Sets method - * - * @param \SynergiTech\Staffology\Model\PayMethod|null $method method - * - * @return $this - */ - public function setMethod(?\SynergiTech\Staffology\Model\PayMethod $method): static - { - if (is_null($method)) { - throw new InvalidArgumentException('non-nullable method cannot be null'); - } - $this->container['method'] = $method; - - return $this; - } - - /** - * Gets withholdTaxRefundIfPayIsZero - * - * @return bool|null - */ - public function getWithholdTaxRefundIfPayIsZero(): ?bool + public function getBasicPay(): ?float { - return $this->container['withholdTaxRefundIfPayIsZero']; + return $this->container['basicPay']; } /** - * Sets withholdTaxRefundIfPayIsZero + * Sets basicPay * - * @param bool|null $withholdTaxRefundIfPayIsZero If you don't want negative PAYE values when the Gross pay is zero, set this to true + * @param float|null $basicPay The amount of basic pay the Employee is regularly paid each period This amount is the combined total of all pay elements that contribute to basic pay * * @return $this */ - public function setWithholdTaxRefundIfPayIsZero(?bool $withholdTaxRefundIfPayIsZero): static + public function setBasicPay(?float $basicPay): static { - if (is_null($withholdTaxRefundIfPayIsZero)) { - throw new InvalidArgumentException('non-nullable withholdTaxRefundIfPayIsZero cannot be null'); + if (is_null($basicPay)) { + throw new InvalidArgumentException('non-nullable basicPay cannot be null'); } - $this->container['withholdTaxRefundIfPayIsZero'] = $withholdTaxRefundIfPayIsZero; + $this->container['basicPay'] = $basicPay; return $this; } /** - * Gets taxAndNi + * Gets basis * - * @return \SynergiTech\Staffology\Model\ContractTaxAndNi|null + * @return \SynergiTech\Staffology\Model\PayBasis|null */ - public function getTaxAndNi(): ?\SynergiTech\Staffology\Model\ContractTaxAndNi + public function getBasis(): ?\SynergiTech\Staffology\Model\PayBasis { - return $this->container['taxAndNi']; + return $this->container['basis']; } /** - * Sets taxAndNi + * Sets basis * - * @param \SynergiTech\Staffology\Model\ContractTaxAndNi|null $taxAndNi taxAndNi + * @param \SynergiTech\Staffology\Model\PayBasis|null $basis basis * * @return $this */ - public function setTaxAndNi(?\SynergiTech\Staffology\Model\ContractTaxAndNi $taxAndNi): static + public function setBasis(?\SynergiTech\Staffology\Model\PayBasis $basis): static { - if (is_null($taxAndNi)) { - throw new InvalidArgumentException('non-nullable taxAndNi cannot be null'); + if (is_null($basis)) { + throw new InvalidArgumentException('non-nullable basis cannot be null'); } - $this->container['taxAndNi'] = $taxAndNi; + $this->container['basis'] = $basis; return $this; } @@ -645,184 +584,170 @@ public function setFpsFields(?\SynergiTech\Staffology\Model\ContractFpsFields $f } /** - * Gets tags + * Gets mapsMiles * - * @return string[]|null + * @return int|null */ - public function getTags(): ?array + public function getMapsMiles(): ?int { - return $this->container['tags']; + return $this->container['mapsMiles']; } /** - * Sets tags + * Sets mapsMiles * - * @param string[]|null $tags tags + * @param int|null $mapsMiles The number of miles to pay for as Mileage Allowance Payments * * @return $this */ - public function setTags(?array $tags): static + public function setMapsMiles(?int $mapsMiles): static { - if (is_null($tags)) { - array_push($this->openAPINullablesSetToNull, 'tags'); + if (is_null($mapsMiles)) { + array_push($this->openAPINullablesSetToNull, 'mapsMiles'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tags', $nullablesSetToNull); + $index = array_search('mapsMiles', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tags'] = $tags; + $this->container['mapsMiles'] = $mapsMiles; return $this; } /** - * Gets basis + * Gets method * - * @return \SynergiTech\Staffology\Model\PayBasis|null + * @return \SynergiTech\Staffology\Model\PayMethod|null */ - public function getBasis(): ?\SynergiTech\Staffology\Model\PayBasis + public function getMethod(): ?\SynergiTech\Staffology\Model\PayMethod { - return $this->container['basis']; + return $this->container['method']; } /** - * Sets basis + * Sets method * - * @param \SynergiTech\Staffology\Model\PayBasis|null $basis basis + * @param \SynergiTech\Staffology\Model\PayMethod|null $method method * * @return $this */ - public function setBasis(?\SynergiTech\Staffology\Model\PayBasis $basis): static + public function setMethod(?\SynergiTech\Staffology\Model\PayMethod $method): static { - if (is_null($basis)) { - throw new InvalidArgumentException('non-nullable basis cannot be null'); + if (is_null($method)) { + throw new InvalidArgumentException('non-nullable method cannot be null'); } - $this->container['basis'] = $basis; + $this->container['method'] = $method; return $this; } /** - * Gets nationalMinimumWage + * Gets mileageVehicleType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\MileageVehicleType|null */ - public function getNationalMinimumWage(): ?bool + public function getMileageVehicleType(): ?\SynergiTech\Staffology\Model\MileageVehicleType { - return $this->container['nationalMinimumWage']; + return $this->container['mileageVehicleType']; } /** - * Sets nationalMinimumWage + * Sets mileageVehicleType * - * @param bool|null $nationalMinimumWage nationalMinimumWage + * @param \SynergiTech\Staffology\Model\MileageVehicleType|null $mileageVehicleType mileageVehicleType * * @return $this */ - public function setNationalMinimumWage(?bool $nationalMinimumWage): static + public function setMileageVehicleType(?\SynergiTech\Staffology\Model\MileageVehicleType $mileageVehicleType): static { - if (is_null($nationalMinimumWage)) { - throw new InvalidArgumentException('non-nullable nationalMinimumWage cannot be null'); + if (is_null($mileageVehicleType)) { + throw new InvalidArgumentException('non-nullable mileageVehicleType cannot be null'); } - $this->container['nationalMinimumWage'] = $nationalMinimumWage; + $this->container['mileageVehicleType'] = $mileageVehicleType; return $this; } /** - * Gets payCode + * Gets nationalMinimumWage * - * @return string|null + * @return bool|null */ - public function getPayCode(): ?string + public function getNationalMinimumWage(): ?bool { - return $this->container['payCode']; + return $this->container['nationalMinimumWage']; } /** - * Sets payCode + * Sets nationalMinimumWage * - * @param string|null $payCode If you want the Employees pay to be allocated to a code other than BASIC, specify it here + * @param bool|null $nationalMinimumWage nationalMinimumWage * * @return $this */ - public function setPayCode(?string $payCode): static + public function setNationalMinimumWage(?bool $nationalMinimumWage): static { - if (is_null($payCode)) { - array_push($this->openAPINullablesSetToNull, 'payCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($nationalMinimumWage)) { + throw new InvalidArgumentException('non-nullable nationalMinimumWage cannot be null'); } - $this->container['payCode'] = $payCode; + $this->container['nationalMinimumWage'] = $nationalMinimumWage; return $this; } /** - * Gets mileageVehicleType + * Gets niTable * - * @return \SynergiTech\Staffology\Model\MileageVehicleType|null + * @return string|null */ - public function getMileageVehicleType(): ?\SynergiTech\Staffology\Model\MileageVehicleType + public function getNiTable(): ?string { - return $this->container['mileageVehicleType']; + return $this->container['niTable']; } /** - * Sets mileageVehicleType + * Sets niTable * - * @param \SynergiTech\Staffology\Model\MileageVehicleType|null $mileageVehicleType mileageVehicleType + * @param string|null $niTable niTable * * @return $this */ - public function setMileageVehicleType(?\SynergiTech\Staffology\Model\MileageVehicleType $mileageVehicleType): static + public function setNiTable(?string $niTable): static { - if (is_null($mileageVehicleType)) { - throw new InvalidArgumentException('non-nullable mileageVehicleType cannot be null'); + if (is_null($niTable)) { + throw new InvalidArgumentException('non-nullable niTable cannot be null'); } - $this->container['mileageVehicleType'] = $mileageVehicleType; + $this->container['niTable'] = $niTable; return $this; } /** - * Gets mapsMiles + * Gets ordinal * * @return int|null */ - public function getMapsMiles(): ?int + public function getOrdinal(): ?int { - return $this->container['mapsMiles']; + return $this->container['ordinal']; } /** - * Sets mapsMiles + * Sets ordinal * - * @param int|null $mapsMiles The number of miles to pay for as Mileage Allowance Payments + * @param int|null $ordinal Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod. * * @return $this */ - public function setMapsMiles(?int $mapsMiles): static + public function setOrdinal(?int $ordinal): static { - if (is_null($mapsMiles)) { - array_push($this->openAPINullablesSetToNull, 'mapsMiles'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mapsMiles', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['mapsMiles'] = $mapsMiles; + $this->container['ordinal'] = $ordinal; return $this; } @@ -882,109 +807,184 @@ public function setPayAmountMultiplier(?float $payAmountMultiplier): static } /** - * Gets baseHourlyRate + * Gets payCode * - * @return float|null + * @return string|null */ - public function getBaseHourlyRate(): ?float + public function getPayCode(): ?string { - return $this->container['baseHourlyRate']; + return $this->container['payCode']; } /** - * Sets baseHourlyRate + * Sets payCode * - * @param float|null $baseHourlyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields + * @param string|null $payCode If you want the Employees pay to be allocated to a code other than BASIC, specify it here * * @return $this */ - public function setBaseHourlyRate(?float $baseHourlyRate): static + public function setPayCode(?string $payCode): static { - if (is_null($baseHourlyRate)) { - throw new InvalidArgumentException('non-nullable baseHourlyRate cannot be null'); + if (is_null($payCode)) { + array_push($this->openAPINullablesSetToNull, 'payCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['baseHourlyRate'] = $baseHourlyRate; + $this->container['payCode'] = $payCode; return $this; } /** - * Gets baseDailyRate + * Gets period * - * @return float|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getBaseDailyRate(): ?float + public function getPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['baseDailyRate']; + return $this->container['period']; } /** - * Sets baseDailyRate + * Sets period * - * @param float|null $baseDailyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields + * @param \SynergiTech\Staffology\Model\PayPeriods|null $period period * * @return $this */ - public function setBaseDailyRate(?float $baseDailyRate): static + public function setPeriod(?\SynergiTech\Staffology\Model\PayPeriods $period): static { - if (is_null($baseDailyRate)) { - throw new InvalidArgumentException('non-nullable baseDailyRate cannot be null'); + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['baseDailyRate'] = $baseDailyRate; + $this->container['period'] = $period; return $this; } /** - * Gets autoAdjustForLeave + * Gets regularPayLines * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractPayLineResponse[]|null */ - public function getAutoAdjustForLeave(): ?bool + public function getRegularPayLines(): ?array { - return $this->container['autoAdjustForLeave']; + return $this->container['regularPayLines']; } /** - * Sets autoAdjustForLeave + * Sets regularPayLines * - * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun + * @param \SynergiTech\Staffology\Model\ContractPayLineResponse[]|null $regularPayLines These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. * * @return $this */ - public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static + public function setRegularPayLines(?array $regularPayLines): static { - if (is_null($autoAdjustForLeave)) { - throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); + if (is_null($regularPayLines)) { + array_push($this->openAPINullablesSetToNull, 'regularPayLines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('regularPayLines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; + $this->container['regularPayLines'] = $regularPayLines; return $this; } /** - * Gets niTable + * Gets tags * - * @return string|null + * @return string[]|null */ - public function getNiTable(): ?string + public function getTags(): ?array { - return $this->container['niTable']; + return $this->container['tags']; } /** - * Sets niTable + * Sets tags * - * @param string|null $niTable niTable + * @param string[]|null $tags tags * * @return $this */ - public function setNiTable(?string $niTable): static + public function setTags(?array $tags): static { - if (is_null($niTable)) { - throw new InvalidArgumentException('non-nullable niTable cannot be null'); + if (is_null($tags)) { + array_push($this->openAPINullablesSetToNull, 'tags'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tags', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['niTable'] = $niTable; + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets taxAndNi + * + * @return \SynergiTech\Staffology\Model\ContractTaxAndNi|null + */ + public function getTaxAndNi(): ?\SynergiTech\Staffology\Model\ContractTaxAndNi + { + return $this->container['taxAndNi']; + } + + /** + * Sets taxAndNi + * + * @param \SynergiTech\Staffology\Model\ContractTaxAndNi|null $taxAndNi taxAndNi + * + * @return $this + */ + public function setTaxAndNi(?\SynergiTech\Staffology\Model\ContractTaxAndNi $taxAndNi): static + { + if (is_null($taxAndNi)) { + throw new InvalidArgumentException('non-nullable taxAndNi cannot be null'); + } + $this->container['taxAndNi'] = $taxAndNi; + + return $this; + } + + /** + * Gets withholdTaxRefundIfPayIsZero + * + * @return bool|null + */ + public function getWithholdTaxRefundIfPayIsZero(): ?bool + { + return $this->container['withholdTaxRefundIfPayIsZero']; + } + + /** + * Sets withholdTaxRefundIfPayIsZero + * + * @param bool|null $withholdTaxRefundIfPayIsZero If you don't want negative PAYE values when the Gross pay is zero, set this to true + * + * @return $this + */ + public function setWithholdTaxRefundIfPayIsZero(?bool $withholdTaxRefundIfPayIsZero): static + { + if (is_null($withholdTaxRefundIfPayIsZero)) { + throw new InvalidArgumentException('non-nullable withholdTaxRefundIfPayIsZero cannot be null'); + } + $this->container['withholdTaxRefundIfPayIsZero'] = $withholdTaxRefundIfPayIsZero; return $this; } diff --git a/src/Model/ContractPayPeriodOrdinalSelection.php b/src/Model/ContractPayPeriodOrdinalSelection.php new file mode 100644 index 0000000..cc24dce --- /dev/null +++ b/src/Model/ContractPayPeriodOrdinalSelection.php @@ -0,0 +1,442 @@ + + */ +class ContractPayPeriodOrdinalSelection implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.PayPeriodOrdinalSelection'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'ordinal' => 'int32', + 'payPeriod' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'ordinal' => false, + 'payPeriod' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets ordinal + * + * @return int|null + */ + public function getOrdinal(): ?int + { + return $this->container['ordinal']; + } + + /** + * Sets ordinal + * + * @param int|null $ordinal ordinal + * + * @return $this + */ + public function setOrdinal(?int $ordinal): static + { + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + } + $this->container['ordinal'] = $ordinal; + + return $this; + } + + /** + * Gets payPeriod + * + * @return \SynergiTech\Staffology\Model\PayPeriods|null + */ + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + { + return $this->container['payPeriod']; + } + + /** + * Sets payPeriod + * + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * + * @return $this + */ + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + { + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + } + $this->container['payPeriod'] = $payPeriod; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractPayRunOverridesImportRequest.php b/src/Model/ContractPayRunOverridesImportRequest.php new file mode 100644 index 0000000..2b00488 --- /dev/null +++ b/src/Model/ContractPayRunOverridesImportRequest.php @@ -0,0 +1,620 @@ + + */ +class ContractPayRunOverridesImportRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.PayRunOverridesImportRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'employeeNi' => 'float', + 'employerNi' => 'float', + 'paye' => 'float', + 'payrollCode' => 'string', + 'postGradLoan' => 'float', + 'studentLoan' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'employeeNi' => 'double', + 'employerNi' => 'double', + 'paye' => 'double', + 'payrollCode' => null, + 'postGradLoan' => 'double', + 'studentLoan' => 'double' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'employeeNi' => true, + 'employerNi' => true, + 'paye' => true, + 'payrollCode' => true, + 'postGradLoan' => true, + 'studentLoan' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'employeeNi' => 'employeeNi', + 'employerNi' => 'employerNi', + 'paye' => 'paye', + 'payrollCode' => 'payrollCode', + 'postGradLoan' => 'postGradLoan', + 'studentLoan' => 'studentLoan' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'employeeNi' => 'setEmployeeNi', + 'employerNi' => 'setEmployerNi', + 'paye' => 'setPaye', + 'payrollCode' => 'setPayrollCode', + 'postGradLoan' => 'setPostGradLoan', + 'studentLoan' => 'setStudentLoan' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'employeeNi' => 'getEmployeeNi', + 'employerNi' => 'getEmployerNi', + 'paye' => 'getPaye', + 'payrollCode' => 'getPayrollCode', + 'postGradLoan' => 'getPostGradLoan', + 'studentLoan' => 'getStudentLoan' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('employeeNi', $data ?? [], null); + $this->setIfExists('employerNi', $data ?? [], null); + $this->setIfExists('paye', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('postGradLoan', $data ?? [], null); + $this->setIfExists('studentLoan', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets employeeNi + * + * @return float|null + */ + public function getEmployeeNi(): ?float + { + return $this->container['employeeNi']; + } + + /** + * Sets employeeNi + * + * @param float|null $employeeNi Employee Ni + * + * @return $this + */ + public function setEmployeeNi(?float $employeeNi): static + { + if (is_null($employeeNi)) { + array_push($this->openAPINullablesSetToNull, 'employeeNi'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employeeNi', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employeeNi'] = $employeeNi; + + return $this; + } + + /** + * Gets employerNi + * + * @return float|null + */ + public function getEmployerNi(): ?float + { + return $this->container['employerNi']; + } + + /** + * Sets employerNi + * + * @param float|null $employerNi Employer Ni + * + * @return $this + */ + public function setEmployerNi(?float $employerNi): static + { + if (is_null($employerNi)) { + array_push($this->openAPINullablesSetToNull, 'employerNi'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employerNi', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employerNi'] = $employerNi; + + return $this; + } + + /** + * Gets paye + * + * @return float|null + */ + public function getPaye(): ?float + { + return $this->container['paye']; + } + + /** + * Sets paye + * + * @param float|null $paye PAYE + * + * @return $this + */ + public function setPaye(?float $paye): static + { + if (is_null($paye)) { + array_push($this->openAPINullablesSetToNull, 'paye'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('paye', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['paye'] = $paye; + + return $this; + } + + /** + * Gets payrollCode + * + * @return string|null + */ + public function getPayrollCode(): ?string + { + return $this->container['payrollCode']; + } + + /** + * Sets payrollCode + * + * @param string|null $payrollCode The payroll code of the employee + * + * @return $this + */ + public function setPayrollCode(?string $payrollCode): static + { + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payrollCode'] = $payrollCode; + + return $this; + } + + /** + * Gets postGradLoan + * + * @return float|null + */ + public function getPostGradLoan(): ?float + { + return $this->container['postGradLoan']; + } + + /** + * Sets postGradLoan + * + * @param float|null $postGradLoan Post Graduate Loan + * + * @return $this + */ + public function setPostGradLoan(?float $postGradLoan): static + { + if (is_null($postGradLoan)) { + array_push($this->openAPINullablesSetToNull, 'postGradLoan'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('postGradLoan', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['postGradLoan'] = $postGradLoan; + + return $this; + } + + /** + * Gets studentLoan + * + * @return float|null + */ + public function getStudentLoan(): ?float + { + return $this->container['studentLoan']; + } + + /** + * Sets studentLoan + * + * @param float|null $studentLoan Student Loan + * + * @return $this + */ + public function setStudentLoan(?float $studentLoan): static + { + if (is_null($studentLoan)) { + array_push($this->openAPINullablesSetToNull, 'studentLoan'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('studentLoan', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['studentLoan'] = $studentLoan; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractPayRunResponseItem.php b/src/Model/ContractPayRunResponseItem.php index 1df6fc3..5ecdbf0 100644 --- a/src/Model/ContractPayRunResponseItem.php +++ b/src/Model/ContractPayRunResponseItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class ContractPayRunResponseItem implements ModelInterface, ArrayAccess, JsonSer */ protected static array $openAPITypes = [ 'id' => 'string', - 'name' => 'string', 'metadata' => 'mixed', + 'name' => 'string', 'url' => 'string' ]; @@ -72,8 +72,8 @@ class ContractPayRunResponseItem implements ModelInterface, ArrayAccess, JsonSer */ protected static array $openAPIFormats = [ 'id' => 'uuid', - 'name' => null, 'metadata' => null, + 'name' => null, 'url' => null ]; @@ -84,8 +84,8 @@ class ContractPayRunResponseItem implements ModelInterface, ArrayAccess, JsonSer */ protected static array $openAPINullables = [ 'id' => false, - 'name' => true, 'metadata' => true, + 'name' => true, 'url' => true ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'id' => 'id', - 'name' => 'name', 'metadata' => 'metadata', + 'name' => 'name', 'url' => 'url' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'id' => 'setId', - 'name' => 'setName', 'metadata' => 'setMetadata', + 'name' => 'setName', 'url' => 'setUrl' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'id' => 'getId', - 'name' => 'getName', 'metadata' => 'getMetadata', + 'name' => 'getName', 'url' => 'getUrl' ]; @@ -262,8 +262,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); } @@ -337,69 +337,69 @@ public function setId(?string $id): static } /** - * Gets name + * Gets metadata * - * @return string|null + * @return mixed|null */ - public function getName(): ?string + public function getMetadata(): mixed { - return $this->container['name']; + return $this->container['metadata']; } /** - * Sets name + * Sets metadata * - * @param string|null $name name + * @param mixed|null $metadata metadata * * @return $this */ - public function setName(?string $name): static + public function setMetadata(mixed $metadata): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($metadata)) { + array_push($this->openAPINullablesSetToNull, 'metadata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('metadata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['metadata'] = $metadata; return $this; } /** - * Gets metadata + * Gets name * - * @return mixed|null + * @return string|null */ - public function getMetadata(): mixed + public function getName(): ?string { - return $this->container['metadata']; + return $this->container['name']; } /** - * Sets metadata + * Sets name * - * @param mixed|null $metadata metadata + * @param string|null $name name * * @return $this */ - public function setMetadata(mixed $metadata): static + public function setName(?string $name): static { - if (is_null($metadata)) { - array_push($this->openAPINullablesSetToNull, 'metadata'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('metadata', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['metadata'] = $metadata; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/ContractPayRunStateHistoryResponse.php b/src/Model/ContractPayRunStateHistoryResponse.php index 6ff0fc9..0e9dba0 100644 --- a/src/Model/ContractPayRunStateHistoryResponse.php +++ b/src/Model/ContractPayRunStateHistoryResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class ContractPayRunStateHistoryResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPITypes = [ - 'state' => '\SynergiTech\Staffology\Model\PayRunState', - 'createdDate' => '\DateTime' + 'createdDate' => '\DateTime', + 'state' => '\SynergiTech\Staffology\Model\PayRunState' ]; /** @@ -69,8 +69,8 @@ class ContractPayRunStateHistoryResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPIFormats = [ - 'state' => null, - 'createdDate' => 'date' + 'createdDate' => 'date', + 'state' => null ]; /** @@ -79,8 +79,8 @@ class ContractPayRunStateHistoryResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPINullables = [ - 'state' => false, - 'createdDate' => false + 'createdDate' => false, + 'state' => false ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'state' => 'state', - 'createdDate' => 'createdDate' + 'createdDate' => 'createdDate', + 'state' => 'state' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'state' => 'setState', - 'createdDate' => 'setCreatedDate' + 'createdDate' => 'setCreatedDate', + 'state' => 'setState' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'state' => 'getState', - 'createdDate' => 'getCreatedDate' + 'createdDate' => 'getCreatedDate', + 'state' => 'getState' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('state', $data ?? [], null); $this->setIfExists('createdDate', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); } /** @@ -296,55 +296,55 @@ public function valid(): bool /** - * Gets state + * Gets createdDate * - * @return \SynergiTech\Staffology\Model\PayRunState|null + * @return \DateTime|null */ - public function getState(): ?\SynergiTech\Staffology\Model\PayRunState + public function getCreatedDate(): ?\DateTime { - return $this->container['state']; + return $this->container['createdDate']; } /** - * Sets state + * Sets createdDate * - * @param \SynergiTech\Staffology\Model\PayRunState|null $state state + * @param \DateTime|null $createdDate Date in which the State was changed * * @return $this */ - public function setState(?\SynergiTech\Staffology\Model\PayRunState $state): static + public function setCreatedDate(?\DateTime $createdDate): static { - if (is_null($state)) { - throw new InvalidArgumentException('non-nullable state cannot be null'); + if (is_null($createdDate)) { + throw new InvalidArgumentException('non-nullable createdDate cannot be null'); } - $this->container['state'] = $state; + $this->container['createdDate'] = $createdDate; return $this; } /** - * Gets createdDate + * Gets state * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\PayRunState|null */ - public function getCreatedDate(): ?\DateTime + public function getState(): ?\SynergiTech\Staffology\Model\PayRunState { - return $this->container['createdDate']; + return $this->container['state']; } /** - * Sets createdDate + * Sets state * - * @param \DateTime|null $createdDate Date in which the State was changed + * @param \SynergiTech\Staffology\Model\PayRunState|null $state state * * @return $this */ - public function setCreatedDate(?\DateTime $createdDate): static + public function setState(?\SynergiTech\Staffology\Model\PayRunState $state): static { - if (is_null($createdDate)) { - throw new InvalidArgumentException('non-nullable createdDate cannot be null'); + if (is_null($state)) { + throw new InvalidArgumentException('non-nullable state cannot be null'); } - $this->container['createdDate'] = $createdDate; + $this->container['state'] = $state; return $this; } diff --git a/src/Model/ContractPayScheduleByDateRangeRequest.php b/src/Model/ContractPayScheduleByDateRangeRequest.php index 6b0ee16..c3c4c8a 100644 --- a/src/Model/ContractPayScheduleByDateRangeRequest.php +++ b/src/Model/ContractPayScheduleByDateRangeRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractPayScheduleRequest.php b/src/Model/ContractPayScheduleRequest.php index 6439128..ba3620a 100644 --- a/src/Model/ContractPayScheduleRequest.php +++ b/src/Model/ContractPayScheduleRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractPayScheduleResponseItem.php b/src/Model/ContractPayScheduleResponseItem.php index 0e5672d..afceb8f 100644 --- a/src/Model/ContractPayScheduleResponseItem.php +++ b/src/Model/ContractPayScheduleResponseItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractPayScheduleResponseItem implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ - 'payRunList' => '\SynergiTech\Staffology\Model\ContractPayRunResponseItem[]', 'id' => 'string', - 'name' => 'string', 'metadata' => 'mixed', + 'name' => 'string', + 'payRunList' => '\SynergiTech\Staffology\Model\ContractPayRunResponseItem[]', 'url' => 'string' ]; @@ -72,10 +72,10 @@ class ContractPayScheduleResponseItem implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ - 'payRunList' => null, 'id' => 'uuid', - 'name' => null, 'metadata' => null, + 'name' => null, + 'payRunList' => null, 'url' => null ]; @@ -85,10 +85,10 @@ class ContractPayScheduleResponseItem implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ - 'payRunList' => true, 'id' => false, - 'name' => true, 'metadata' => true, + 'name' => true, + 'payRunList' => true, 'url' => true ]; @@ -178,10 +178,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payRunList' => 'payRunList', 'id' => 'id', - 'name' => 'name', 'metadata' => 'metadata', + 'name' => 'name', + 'payRunList' => 'payRunList', 'url' => 'url' ]; @@ -191,10 +191,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payRunList' => 'setPayRunList', 'id' => 'setId', - 'name' => 'setName', 'metadata' => 'setMetadata', + 'name' => 'setName', + 'payRunList' => 'setPayRunList', 'url' => 'setUrl' ]; @@ -204,10 +204,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payRunList' => 'getPayRunList', 'id' => 'getId', - 'name' => 'getName', 'metadata' => 'getMetadata', + 'name' => 'getName', + 'payRunList' => 'getPayRunList', 'url' => 'getUrl' ]; @@ -267,10 +267,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payRunList', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('payRunList', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); } @@ -317,62 +317,62 @@ public function valid(): bool /** - * Gets payRunList + * Gets id * - * @return \SynergiTech\Staffology\Model\ContractPayRunResponseItem[]|null + * @return string|null */ - public function getPayRunList(): ?array + public function getId(): ?string { - return $this->container['payRunList']; + return $this->container['id']; } /** - * Sets payRunList + * Sets id * - * @param \SynergiTech\Staffology\Model\ContractPayRunResponseItem[]|null $payRunList payRunList + * @param string|null $id id * * @return $this */ - public function setPayRunList(?array $payRunList): static + public function setId(?string $id): static { - if (is_null($payRunList)) { - array_push($this->openAPINullablesSetToNull, 'payRunList'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payRunList', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['payRunList'] = $payRunList; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets metadata * - * @return string|null + * @return mixed|null */ - public function getId(): ?string + public function getMetadata(): mixed { - return $this->container['id']; + return $this->container['metadata']; } /** - * Sets id + * Sets metadata * - * @param string|null $id id + * @param mixed|null $metadata metadata * * @return $this */ - public function setId(?string $id): static + public function setMetadata(mixed $metadata): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($metadata)) { + array_push($this->openAPINullablesSetToNull, 'metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['metadata'] = $metadata; return $this; } @@ -412,35 +412,35 @@ public function setName(?string $name): static } /** - * Gets metadata + * Gets payRunList * - * @return mixed|null + * @return \SynergiTech\Staffology\Model\ContractPayRunResponseItem[]|null */ - public function getMetadata(): mixed + public function getPayRunList(): ?array { - return $this->container['metadata']; + return $this->container['payRunList']; } /** - * Sets metadata + * Sets payRunList * - * @param mixed|null $metadata metadata + * @param \SynergiTech\Staffology\Model\ContractPayRunResponseItem[]|null $payRunList payRunList * * @return $this */ - public function setMetadata(mixed $metadata): static + public function setPayRunList(?array $payRunList): static { - if (is_null($metadata)) { - array_push($this->openAPINullablesSetToNull, 'metadata'); + if (is_null($payRunList)) { + array_push($this->openAPINullablesSetToNull, 'payRunList'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('metadata', $nullablesSetToNull); + $index = array_search('payRunList', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['metadata'] = $metadata; + $this->container['payRunList'] = $payRunList; return $this; } diff --git a/src/Model/ContractPaySpineGradeRequest.php b/src/Model/ContractPaySpineGradeRequest.php index 5928050..0a27cae 100644 --- a/src/Model/ContractPaySpineGradeRequest.php +++ b/src/Model/ContractPaySpineGradeRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class ContractPaySpineGradeRequest implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', + 'effectiveDate' => '\DateTime', + 'holidayEntitlement' => 'float', 'lowerPointUniqueId' => 'string', + 'name' => 'string', 'upperPointUniqueId' => 'string', - 'upperPointUseMax' => 'bool', - 'effectiveDate' => '\DateTime', - 'holidayEntitlement' => 'float' + 'upperPointUseMax' => 'bool' ]; /** @@ -73,12 +73,12 @@ class ContractPaySpineGradeRequest implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'name' => null, + 'effectiveDate' => 'date', + 'holidayEntitlement' => 'double', 'lowerPointUniqueId' => 'uuid', + 'name' => null, 'upperPointUniqueId' => 'uuid', - 'upperPointUseMax' => null, - 'effectiveDate' => 'date', - 'holidayEntitlement' => 'double' + 'upperPointUseMax' => null ]; /** @@ -87,12 +87,12 @@ class ContractPaySpineGradeRequest implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'name' => true, + 'effectiveDate' => false, + 'holidayEntitlement' => false, 'lowerPointUniqueId' => false, + 'name' => true, 'upperPointUniqueId' => false, - 'upperPointUseMax' => false, - 'effectiveDate' => false, - 'holidayEntitlement' => false + 'upperPointUseMax' => false ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', + 'effectiveDate' => 'effectiveDate', + 'holidayEntitlement' => 'holidayEntitlement', 'lowerPointUniqueId' => 'lowerPointUniqueId', + 'name' => 'name', 'upperPointUniqueId' => 'upperPointUniqueId', - 'upperPointUseMax' => 'upperPointUseMax', - 'effectiveDate' => 'effectiveDate', - 'holidayEntitlement' => 'holidayEntitlement' + 'upperPointUseMax' => 'upperPointUseMax' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', + 'effectiveDate' => 'setEffectiveDate', + 'holidayEntitlement' => 'setHolidayEntitlement', 'lowerPointUniqueId' => 'setLowerPointUniqueId', + 'name' => 'setName', 'upperPointUniqueId' => 'setUpperPointUniqueId', - 'upperPointUseMax' => 'setUpperPointUseMax', - 'effectiveDate' => 'setEffectiveDate', - 'holidayEntitlement' => 'setHolidayEntitlement' + 'upperPointUseMax' => 'setUpperPointUseMax' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', + 'effectiveDate' => 'getEffectiveDate', + 'holidayEntitlement' => 'getHolidayEntitlement', 'lowerPointUniqueId' => 'getLowerPointUniqueId', + 'name' => 'getName', 'upperPointUniqueId' => 'getUpperPointUniqueId', - 'upperPointUseMax' => 'getUpperPointUseMax', - 'effectiveDate' => 'getEffectiveDate', - 'holidayEntitlement' => 'getHolidayEntitlement' + 'upperPointUseMax' => 'getUpperPointUseMax' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('effectiveDate', $data ?? [], null); + $this->setIfExists('holidayEntitlement', $data ?? [], null); $this->setIfExists('lowerPointUniqueId', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('upperPointUniqueId', $data ?? [], null); $this->setIfExists('upperPointUseMax', $data ?? [], null); - $this->setIfExists('effectiveDate', $data ?? [], null); - $this->setIfExists('holidayEntitlement', $data ?? [], null); } /** @@ -324,170 +324,170 @@ public function valid(): bool /** - * Gets name + * Gets effectiveDate * - * @return string|null + * @return \DateTime|null */ - public function getName(): ?string + public function getEffectiveDate(): ?\DateTime { - return $this->container['name']; + return $this->container['effectiveDate']; } /** - * Sets name + * Sets effectiveDate * - * @param string|null $name Pay spine grade name + * @param \DateTime|null $effectiveDate Date that this configuration is effective from. * * @return $this */ - public function setName(?string $name): static + public function setEffectiveDate(?\DateTime $effectiveDate): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($effectiveDate)) { + throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); } - $this->container['name'] = $name; + $this->container['effectiveDate'] = $effectiveDate; return $this; } /** - * Gets lowerPointUniqueId + * Gets holidayEntitlement * - * @return string|null + * @return float|null */ - public function getLowerPointUniqueId(): ?string + public function getHolidayEntitlement(): ?float { - return $this->container['lowerPointUniqueId']; + return $this->container['holidayEntitlement']; } /** - * Sets lowerPointUniqueId + * Sets holidayEntitlement * - * @param string|null $lowerPointUniqueId Id of lower spinal point to be used. + * @param float|null $holidayEntitlement The number of holidays entitled to this pay spine grade. * * @return $this */ - public function setLowerPointUniqueId(?string $lowerPointUniqueId): static + public function setHolidayEntitlement(?float $holidayEntitlement): static { - if (is_null($lowerPointUniqueId)) { - throw new InvalidArgumentException('non-nullable lowerPointUniqueId cannot be null'); + if (is_null($holidayEntitlement)) { + throw new InvalidArgumentException('non-nullable holidayEntitlement cannot be null'); } - $this->container['lowerPointUniqueId'] = $lowerPointUniqueId; + $this->container['holidayEntitlement'] = $holidayEntitlement; return $this; } /** - * Gets upperPointUniqueId + * Gets lowerPointUniqueId * * @return string|null */ - public function getUpperPointUniqueId(): ?string + public function getLowerPointUniqueId(): ?string { - return $this->container['upperPointUniqueId']; + return $this->container['lowerPointUniqueId']; } /** - * Sets upperPointUniqueId + * Sets lowerPointUniqueId * - * @param string|null $upperPointUniqueId Id of upper spinal point to be used. + * @param string|null $lowerPointUniqueId Id of lower spinal point to be used. * * @return $this */ - public function setUpperPointUniqueId(?string $upperPointUniqueId): static + public function setLowerPointUniqueId(?string $lowerPointUniqueId): static { - if (is_null($upperPointUniqueId)) { - throw new InvalidArgumentException('non-nullable upperPointUniqueId cannot be null'); + if (is_null($lowerPointUniqueId)) { + throw new InvalidArgumentException('non-nullable lowerPointUniqueId cannot be null'); } - $this->container['upperPointUniqueId'] = $upperPointUniqueId; + $this->container['lowerPointUniqueId'] = $lowerPointUniqueId; return $this; } /** - * Gets upperPointUseMax + * Gets name * - * @return bool|null + * @return string|null */ - public function getUpperPointUseMax(): ?bool + public function getName(): ?string { - return $this->container['upperPointUseMax']; + return $this->container['name']; } /** - * Sets upperPointUseMax + * Sets name * - * @param bool|null $upperPointUseMax Use the Alt Max Value of the Upper Point. (Default false) + * @param string|null $name Pay spine grade name * * @return $this */ - public function setUpperPointUseMax(?bool $upperPointUseMax): static + public function setName(?string $name): static { - if (is_null($upperPointUseMax)) { - throw new InvalidArgumentException('non-nullable upperPointUseMax cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['upperPointUseMax'] = $upperPointUseMax; + $this->container['name'] = $name; return $this; } /** - * Gets effectiveDate + * Gets upperPointUniqueId * - * @return \DateTime|null + * @return string|null */ - public function getEffectiveDate(): ?\DateTime + public function getUpperPointUniqueId(): ?string { - return $this->container['effectiveDate']; + return $this->container['upperPointUniqueId']; } /** - * Sets effectiveDate + * Sets upperPointUniqueId * - * @param \DateTime|null $effectiveDate Date that this configuration is effective from. + * @param string|null $upperPointUniqueId Id of upper spinal point to be used. * * @return $this */ - public function setEffectiveDate(?\DateTime $effectiveDate): static + public function setUpperPointUniqueId(?string $upperPointUniqueId): static { - if (is_null($effectiveDate)) { - throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); + if (is_null($upperPointUniqueId)) { + throw new InvalidArgumentException('non-nullable upperPointUniqueId cannot be null'); } - $this->container['effectiveDate'] = $effectiveDate; + $this->container['upperPointUniqueId'] = $upperPointUniqueId; return $this; } /** - * Gets holidayEntitlement + * Gets upperPointUseMax * - * @return float|null + * @return bool|null */ - public function getHolidayEntitlement(): ?float + public function getUpperPointUseMax(): ?bool { - return $this->container['holidayEntitlement']; + return $this->container['upperPointUseMax']; } /** - * Sets holidayEntitlement + * Sets upperPointUseMax * - * @param float|null $holidayEntitlement The number of holidays entitled to this pay spine grade. + * @param bool|null $upperPointUseMax Use the Alt Max Value of the Upper Point. (Default false) * * @return $this */ - public function setHolidayEntitlement(?float $holidayEntitlement): static + public function setUpperPointUseMax(?bool $upperPointUseMax): static { - if (is_null($holidayEntitlement)) { - throw new InvalidArgumentException('non-nullable holidayEntitlement cannot be null'); + if (is_null($upperPointUseMax)) { + throw new InvalidArgumentException('non-nullable upperPointUseMax cannot be null'); } - $this->container['holidayEntitlement'] = $holidayEntitlement; + $this->container['upperPointUseMax'] = $upperPointUseMax; return $this; } diff --git a/src/Model/ContractPaySpineGradeResponse.php b/src/Model/ContractPaySpineGradeResponse.php index b5d87d6..3968f11 100644 --- a/src/Model/ContractPaySpineGradeResponse.php +++ b/src/Model/ContractPaySpineGradeResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class ContractPaySpineGradeResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', - 'lowerPointUniqueId' => 'string', - 'upperPointUniqueId' => 'string', - 'upperPointUseMax' => 'bool', 'effectiveDate' => '\DateTime', + 'holidayEntitlement' => 'float', + 'lowerPointUniqueId' => 'string', + 'name' => 'string', 'uniqueId' => 'string', - 'holidayEntitlement' => 'float' + 'upperPointUniqueId' => 'string', + 'upperPointUseMax' => 'bool' ]; /** @@ -74,13 +74,13 @@ class ContractPaySpineGradeResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ - 'name' => null, - 'lowerPointUniqueId' => 'uuid', - 'upperPointUniqueId' => 'uuid', - 'upperPointUseMax' => null, 'effectiveDate' => 'date', + 'holidayEntitlement' => 'double', + 'lowerPointUniqueId' => 'uuid', + 'name' => null, 'uniqueId' => 'uuid', - 'holidayEntitlement' => 'double' + 'upperPointUniqueId' => 'uuid', + 'upperPointUseMax' => null ]; /** @@ -89,13 +89,13 @@ class ContractPaySpineGradeResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ - 'name' => true, - 'lowerPointUniqueId' => false, - 'upperPointUniqueId' => false, - 'upperPointUseMax' => false, 'effectiveDate' => false, + 'holidayEntitlement' => false, + 'lowerPointUniqueId' => false, + 'name' => true, 'uniqueId' => false, - 'holidayEntitlement' => false + 'upperPointUniqueId' => false, + 'upperPointUseMax' => false ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', - 'lowerPointUniqueId' => 'lowerPointUniqueId', - 'upperPointUniqueId' => 'upperPointUniqueId', - 'upperPointUseMax' => 'upperPointUseMax', 'effectiveDate' => 'effectiveDate', + 'holidayEntitlement' => 'holidayEntitlement', + 'lowerPointUniqueId' => 'lowerPointUniqueId', + 'name' => 'name', 'uniqueId' => 'uniqueId', - 'holidayEntitlement' => 'holidayEntitlement' + 'upperPointUniqueId' => 'upperPointUniqueId', + 'upperPointUseMax' => 'upperPointUseMax' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', - 'lowerPointUniqueId' => 'setLowerPointUniqueId', - 'upperPointUniqueId' => 'setUpperPointUniqueId', - 'upperPointUseMax' => 'setUpperPointUseMax', 'effectiveDate' => 'setEffectiveDate', + 'holidayEntitlement' => 'setHolidayEntitlement', + 'lowerPointUniqueId' => 'setLowerPointUniqueId', + 'name' => 'setName', 'uniqueId' => 'setUniqueId', - 'holidayEntitlement' => 'setHolidayEntitlement' + 'upperPointUniqueId' => 'setUpperPointUniqueId', + 'upperPointUseMax' => 'setUpperPointUseMax' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', - 'lowerPointUniqueId' => 'getLowerPointUniqueId', - 'upperPointUniqueId' => 'getUpperPointUniqueId', - 'upperPointUseMax' => 'getUpperPointUseMax', 'effectiveDate' => 'getEffectiveDate', + 'holidayEntitlement' => 'getHolidayEntitlement', + 'lowerPointUniqueId' => 'getLowerPointUniqueId', + 'name' => 'getName', 'uniqueId' => 'getUniqueId', - 'holidayEntitlement' => 'getHolidayEntitlement' + 'upperPointUniqueId' => 'getUpperPointUniqueId', + 'upperPointUseMax' => 'getUpperPointUseMax' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('effectiveDate', $data ?? [], null); + $this->setIfExists('holidayEntitlement', $data ?? [], null); $this->setIfExists('lowerPointUniqueId', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); $this->setIfExists('upperPointUniqueId', $data ?? [], null); $this->setIfExists('upperPointUseMax', $data ?? [], null); - $this->setIfExists('effectiveDate', $data ?? [], null); - $this->setIfExists('uniqueId', $data ?? [], null); - $this->setIfExists('holidayEntitlement', $data ?? [], null); } /** @@ -331,197 +331,197 @@ public function valid(): bool /** - * Gets name + * Gets effectiveDate * - * @return string|null + * @return \DateTime|null */ - public function getName(): ?string + public function getEffectiveDate(): ?\DateTime { - return $this->container['name']; + return $this->container['effectiveDate']; } /** - * Sets name + * Sets effectiveDate * - * @param string|null $name Pay spine grade name + * @param \DateTime|null $effectiveDate Date that this configuration is effective from. * * @return $this */ - public function setName(?string $name): static + public function setEffectiveDate(?\DateTime $effectiveDate): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($effectiveDate)) { + throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); } - $this->container['name'] = $name; + $this->container['effectiveDate'] = $effectiveDate; return $this; } /** - * Gets lowerPointUniqueId + * Gets holidayEntitlement * - * @return string|null + * @return float|null */ - public function getLowerPointUniqueId(): ?string + public function getHolidayEntitlement(): ?float { - return $this->container['lowerPointUniqueId']; + return $this->container['holidayEntitlement']; } /** - * Sets lowerPointUniqueId + * Sets holidayEntitlement * - * @param string|null $lowerPointUniqueId Id of lower spinal point used. + * @param float|null $holidayEntitlement The number of holiday days entitled for this pay spine grade. * * @return $this */ - public function setLowerPointUniqueId(?string $lowerPointUniqueId): static + public function setHolidayEntitlement(?float $holidayEntitlement): static { - if (is_null($lowerPointUniqueId)) { - throw new InvalidArgumentException('non-nullable lowerPointUniqueId cannot be null'); + if (is_null($holidayEntitlement)) { + throw new InvalidArgumentException('non-nullable holidayEntitlement cannot be null'); } - $this->container['lowerPointUniqueId'] = $lowerPointUniqueId; + $this->container['holidayEntitlement'] = $holidayEntitlement; return $this; } /** - * Gets upperPointUniqueId + * Gets lowerPointUniqueId * * @return string|null */ - public function getUpperPointUniqueId(): ?string + public function getLowerPointUniqueId(): ?string { - return $this->container['upperPointUniqueId']; + return $this->container['lowerPointUniqueId']; } /** - * Sets upperPointUniqueId + * Sets lowerPointUniqueId * - * @param string|null $upperPointUniqueId Id of upper spinal point used. + * @param string|null $lowerPointUniqueId Id of lower spinal point used. * * @return $this */ - public function setUpperPointUniqueId(?string $upperPointUniqueId): static + public function setLowerPointUniqueId(?string $lowerPointUniqueId): static { - if (is_null($upperPointUniqueId)) { - throw new InvalidArgumentException('non-nullable upperPointUniqueId cannot be null'); + if (is_null($lowerPointUniqueId)) { + throw new InvalidArgumentException('non-nullable lowerPointUniqueId cannot be null'); } - $this->container['upperPointUniqueId'] = $upperPointUniqueId; + $this->container['lowerPointUniqueId'] = $lowerPointUniqueId; return $this; } /** - * Gets upperPointUseMax + * Gets name * - * @return bool|null + * @return string|null */ - public function getUpperPointUseMax(): ?bool + public function getName(): ?string { - return $this->container['upperPointUseMax']; + return $this->container['name']; } /** - * Sets upperPointUseMax + * Sets name * - * @param bool|null $upperPointUseMax Use the Alt Max Value of the Upper Point. (Default false) + * @param string|null $name Pay spine grade name * * @return $this */ - public function setUpperPointUseMax(?bool $upperPointUseMax): static + public function setName(?string $name): static { - if (is_null($upperPointUseMax)) { - throw new InvalidArgumentException('non-nullable upperPointUseMax cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['upperPointUseMax'] = $upperPointUseMax; + $this->container['name'] = $name; return $this; } /** - * Gets effectiveDate + * Gets uniqueId * - * @return \DateTime|null + * @return string|null */ - public function getEffectiveDate(): ?\DateTime + public function getUniqueId(): ?string { - return $this->container['effectiveDate']; + return $this->container['uniqueId']; } /** - * Sets effectiveDate + * Sets uniqueId * - * @param \DateTime|null $effectiveDate Date that this configuration is effective from. + * @param string|null $uniqueId Pay spine grade Id * * @return $this */ - public function setEffectiveDate(?\DateTime $effectiveDate): static + public function setUniqueId(?string $uniqueId): static { - if (is_null($effectiveDate)) { - throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); } - $this->container['effectiveDate'] = $effectiveDate; + $this->container['uniqueId'] = $uniqueId; return $this; } /** - * Gets uniqueId + * Gets upperPointUniqueId * * @return string|null */ - public function getUniqueId(): ?string + public function getUpperPointUniqueId(): ?string { - return $this->container['uniqueId']; + return $this->container['upperPointUniqueId']; } /** - * Sets uniqueId + * Sets upperPointUniqueId * - * @param string|null $uniqueId Pay spine grade Id + * @param string|null $upperPointUniqueId Id of upper spinal point used. * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setUpperPointUniqueId(?string $upperPointUniqueId): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($upperPointUniqueId)) { + throw new InvalidArgumentException('non-nullable upperPointUniqueId cannot be null'); } - $this->container['uniqueId'] = $uniqueId; + $this->container['upperPointUniqueId'] = $upperPointUniqueId; return $this; } /** - * Gets holidayEntitlement + * Gets upperPointUseMax * - * @return float|null + * @return bool|null */ - public function getHolidayEntitlement(): ?float + public function getUpperPointUseMax(): ?bool { - return $this->container['holidayEntitlement']; + return $this->container['upperPointUseMax']; } /** - * Sets holidayEntitlement + * Sets upperPointUseMax * - * @param float|null $holidayEntitlement The number of holiday days entitled for this pay spine grade. + * @param bool|null $upperPointUseMax Use the Alt Max Value of the Upper Point. (Default false) * * @return $this */ - public function setHolidayEntitlement(?float $holidayEntitlement): static + public function setUpperPointUseMax(?bool $upperPointUseMax): static { - if (is_null($holidayEntitlement)) { - throw new InvalidArgumentException('non-nullable holidayEntitlement cannot be null'); + if (is_null($upperPointUseMax)) { + throw new InvalidArgumentException('non-nullable upperPointUseMax cannot be null'); } - $this->container['holidayEntitlement'] = $holidayEntitlement; + $this->container['upperPointUseMax'] = $upperPointUseMax; return $this; } diff --git a/src/Model/ContractPaySpineRequest.php b/src/Model/ContractPaySpineRequest.php index 0ae5560..af8e60c 100644 --- a/src/Model/ContractPaySpineRequest.php +++ b/src/Model/ContractPaySpineRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,22 +59,22 @@ class ContractPaySpineRequest implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', + 'annualDecimals' => 'int', + 'annualRoundingRule' => '\SynergiTech\Staffology\Model\AnnualRoundingRule', + 'dailyDecimals' => 'int', + 'dailyDivisor' => 'float', 'fullTimeHours' => 'float', 'fullTimeWeeks' => 'float', - 'salaryFormula' => 'string', - 'hourlyDivisor' => 'float', + 'gradeEffectiveDate' => '\DateTime', + 'holidayEntitlements' => '\SynergiTech\Staffology\Model\ContractHolidayEntitlementRequest[]', 'hourlyDecimals' => 'int', - 'dailyDivisor' => 'float', - 'dailyDecimals' => 'int', - 'annualDecimals' => 'int', - 'annualRoundingRule' => '\SynergiTech\Staffology\Model\AnnualRoundingRule', + 'hourlyDivisor' => 'float', 'incrementRule' => '\SynergiTech\Staffology\Model\IncrementRule', - 'requiresLondonAllowance' => 'bool', - 'gradeEffectiveDate' => '\DateTime', + 'name' => 'string', 'pointEffectiveDate' => '\DateTime', - 'useSpineHolidayRules' => 'bool', - 'holidayEntitlements' => '\SynergiTech\Staffology\Model\ContractHolidayEntitlementRequest[]' + 'requiresLondonAllowance' => 'bool', + 'salaryFormula' => 'string', + 'useSpineHolidayRules' => 'bool' ]; /** @@ -83,22 +83,22 @@ class ContractPaySpineRequest implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ - 'name' => null, + 'annualDecimals' => 'int32', + 'annualRoundingRule' => null, + 'dailyDecimals' => 'int32', + 'dailyDivisor' => 'double', 'fullTimeHours' => 'double', 'fullTimeWeeks' => 'double', - 'salaryFormula' => null, - 'hourlyDivisor' => 'double', + 'gradeEffectiveDate' => 'date', + 'holidayEntitlements' => null, 'hourlyDecimals' => 'int32', - 'dailyDivisor' => 'double', - 'dailyDecimals' => 'int32', - 'annualDecimals' => 'int32', - 'annualRoundingRule' => null, + 'hourlyDivisor' => 'double', 'incrementRule' => null, - 'requiresLondonAllowance' => null, - 'gradeEffectiveDate' => 'date', + 'name' => null, 'pointEffectiveDate' => 'date', - 'useSpineHolidayRules' => null, - 'holidayEntitlements' => null + 'requiresLondonAllowance' => null, + 'salaryFormula' => null, + 'useSpineHolidayRules' => null ]; /** @@ -107,22 +107,22 @@ class ContractPaySpineRequest implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ - 'name' => true, + 'annualDecimals' => false, + 'annualRoundingRule' => false, + 'dailyDecimals' => false, + 'dailyDivisor' => false, 'fullTimeHours' => false, 'fullTimeWeeks' => false, - 'salaryFormula' => true, - 'hourlyDivisor' => false, + 'gradeEffectiveDate' => false, + 'holidayEntitlements' => true, 'hourlyDecimals' => false, - 'dailyDivisor' => false, - 'dailyDecimals' => false, - 'annualDecimals' => false, - 'annualRoundingRule' => false, + 'hourlyDivisor' => false, 'incrementRule' => false, - 'requiresLondonAllowance' => false, - 'gradeEffectiveDate' => false, + 'name' => true, 'pointEffectiveDate' => false, - 'useSpineHolidayRules' => false, - 'holidayEntitlements' => true + 'requiresLondonAllowance' => false, + 'salaryFormula' => true, + 'useSpineHolidayRules' => false ]; /** @@ -211,22 +211,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', + 'annualDecimals' => 'annualDecimals', + 'annualRoundingRule' => 'annualRoundingRule', + 'dailyDecimals' => 'dailyDecimals', + 'dailyDivisor' => 'dailyDivisor', 'fullTimeHours' => 'fullTimeHours', 'fullTimeWeeks' => 'fullTimeWeeks', - 'salaryFormula' => 'salaryFormula', - 'hourlyDivisor' => 'hourlyDivisor', + 'gradeEffectiveDate' => 'gradeEffectiveDate', + 'holidayEntitlements' => 'holidayEntitlements', 'hourlyDecimals' => 'hourlyDecimals', - 'dailyDivisor' => 'dailyDivisor', - 'dailyDecimals' => 'dailyDecimals', - 'annualDecimals' => 'annualDecimals', - 'annualRoundingRule' => 'annualRoundingRule', + 'hourlyDivisor' => 'hourlyDivisor', 'incrementRule' => 'incrementRule', - 'requiresLondonAllowance' => 'requiresLondonAllowance', - 'gradeEffectiveDate' => 'gradeEffectiveDate', + 'name' => 'name', 'pointEffectiveDate' => 'pointEffectiveDate', - 'useSpineHolidayRules' => 'useSpineHolidayRules', - 'holidayEntitlements' => 'holidayEntitlements' + 'requiresLondonAllowance' => 'requiresLondonAllowance', + 'salaryFormula' => 'salaryFormula', + 'useSpineHolidayRules' => 'useSpineHolidayRules' ]; /** @@ -235,22 +235,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', + 'annualDecimals' => 'setAnnualDecimals', + 'annualRoundingRule' => 'setAnnualRoundingRule', + 'dailyDecimals' => 'setDailyDecimals', + 'dailyDivisor' => 'setDailyDivisor', 'fullTimeHours' => 'setFullTimeHours', 'fullTimeWeeks' => 'setFullTimeWeeks', - 'salaryFormula' => 'setSalaryFormula', - 'hourlyDivisor' => 'setHourlyDivisor', + 'gradeEffectiveDate' => 'setGradeEffectiveDate', + 'holidayEntitlements' => 'setHolidayEntitlements', 'hourlyDecimals' => 'setHourlyDecimals', - 'dailyDivisor' => 'setDailyDivisor', - 'dailyDecimals' => 'setDailyDecimals', - 'annualDecimals' => 'setAnnualDecimals', - 'annualRoundingRule' => 'setAnnualRoundingRule', + 'hourlyDivisor' => 'setHourlyDivisor', 'incrementRule' => 'setIncrementRule', - 'requiresLondonAllowance' => 'setRequiresLondonAllowance', - 'gradeEffectiveDate' => 'setGradeEffectiveDate', + 'name' => 'setName', 'pointEffectiveDate' => 'setPointEffectiveDate', - 'useSpineHolidayRules' => 'setUseSpineHolidayRules', - 'holidayEntitlements' => 'setHolidayEntitlements' + 'requiresLondonAllowance' => 'setRequiresLondonAllowance', + 'salaryFormula' => 'setSalaryFormula', + 'useSpineHolidayRules' => 'setUseSpineHolidayRules' ]; /** @@ -259,22 +259,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', + 'annualDecimals' => 'getAnnualDecimals', + 'annualRoundingRule' => 'getAnnualRoundingRule', + 'dailyDecimals' => 'getDailyDecimals', + 'dailyDivisor' => 'getDailyDivisor', 'fullTimeHours' => 'getFullTimeHours', 'fullTimeWeeks' => 'getFullTimeWeeks', - 'salaryFormula' => 'getSalaryFormula', - 'hourlyDivisor' => 'getHourlyDivisor', + 'gradeEffectiveDate' => 'getGradeEffectiveDate', + 'holidayEntitlements' => 'getHolidayEntitlements', 'hourlyDecimals' => 'getHourlyDecimals', - 'dailyDivisor' => 'getDailyDivisor', - 'dailyDecimals' => 'getDailyDecimals', - 'annualDecimals' => 'getAnnualDecimals', - 'annualRoundingRule' => 'getAnnualRoundingRule', + 'hourlyDivisor' => 'getHourlyDivisor', 'incrementRule' => 'getIncrementRule', - 'requiresLondonAllowance' => 'getRequiresLondonAllowance', - 'gradeEffectiveDate' => 'getGradeEffectiveDate', + 'name' => 'getName', 'pointEffectiveDate' => 'getPointEffectiveDate', - 'useSpineHolidayRules' => 'getUseSpineHolidayRules', - 'holidayEntitlements' => 'getHolidayEntitlements' + 'requiresLondonAllowance' => 'getRequiresLondonAllowance', + 'salaryFormula' => 'getSalaryFormula', + 'useSpineHolidayRules' => 'getUseSpineHolidayRules' ]; /** @@ -333,22 +333,22 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('annualDecimals', $data ?? [], null); + $this->setIfExists('annualRoundingRule', $data ?? [], null); + $this->setIfExists('dailyDecimals', $data ?? [], null); + $this->setIfExists('dailyDivisor', $data ?? [], null); $this->setIfExists('fullTimeHours', $data ?? [], null); $this->setIfExists('fullTimeWeeks', $data ?? [], null); - $this->setIfExists('salaryFormula', $data ?? [], null); - $this->setIfExists('hourlyDivisor', $data ?? [], null); + $this->setIfExists('gradeEffectiveDate', $data ?? [], null); + $this->setIfExists('holidayEntitlements', $data ?? [], null); $this->setIfExists('hourlyDecimals', $data ?? [], null); - $this->setIfExists('dailyDivisor', $data ?? [], null); - $this->setIfExists('dailyDecimals', $data ?? [], null); - $this->setIfExists('annualDecimals', $data ?? [], null); - $this->setIfExists('annualRoundingRule', $data ?? [], null); + $this->setIfExists('hourlyDivisor', $data ?? [], null); $this->setIfExists('incrementRule', $data ?? [], null); - $this->setIfExists('requiresLondonAllowance', $data ?? [], null); - $this->setIfExists('gradeEffectiveDate', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('pointEffectiveDate', $data ?? [], null); + $this->setIfExists('requiresLondonAllowance', $data ?? [], null); + $this->setIfExists('salaryFormula', $data ?? [], null); $this->setIfExists('useSpineHolidayRules', $data ?? [], null); - $this->setIfExists('holidayEntitlements', $data ?? [], null); } /** @@ -394,285 +394,278 @@ public function valid(): bool /** - * Gets name + * Gets annualDecimals * - * @return string|null + * @return int|null */ - public function getName(): ?string + public function getAnnualDecimals(): ?int { - return $this->container['name']; + return $this->container['annualDecimals']; } /** - * Sets name + * Sets annualDecimals * - * @param string|null $name Name of the Pay Spine + * @param int|null $annualDecimals Number of decimal places to calculate Annual Salaries * * @return $this */ - public function setName(?string $name): static + public function setAnnualDecimals(?int $annualDecimals): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($annualDecimals)) { + throw new InvalidArgumentException('non-nullable annualDecimals cannot be null'); } - $this->container['name'] = $name; + $this->container['annualDecimals'] = $annualDecimals; return $this; } /** - * Gets fullTimeHours + * Gets annualRoundingRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\AnnualRoundingRule|null */ - public function getFullTimeHours(): ?float + public function getAnnualRoundingRule(): ?\SynergiTech\Staffology\Model\AnnualRoundingRule { - return $this->container['fullTimeHours']; + return $this->container['annualRoundingRule']; } /** - * Sets fullTimeHours + * Sets annualRoundingRule * - * @param float|null $fullTimeHours Maximum Full Time Hours on this Pay Spine + * @param \SynergiTech\Staffology\Model\AnnualRoundingRule|null $annualRoundingRule annualRoundingRule * * @return $this */ - public function setFullTimeHours(?float $fullTimeHours): static + public function setAnnualRoundingRule(?\SynergiTech\Staffology\Model\AnnualRoundingRule $annualRoundingRule): static { - if (is_null($fullTimeHours)) { - throw new InvalidArgumentException('non-nullable fullTimeHours cannot be null'); + if (is_null($annualRoundingRule)) { + throw new InvalidArgumentException('non-nullable annualRoundingRule cannot be null'); } - $this->container['fullTimeHours'] = $fullTimeHours; + $this->container['annualRoundingRule'] = $annualRoundingRule; return $this; } /** - * Gets fullTimeWeeks + * Gets dailyDecimals * - * @return float|null + * @return int|null */ - public function getFullTimeWeeks(): ?float + public function getDailyDecimals(): ?int { - return $this->container['fullTimeWeeks']; + return $this->container['dailyDecimals']; } /** - * Sets fullTimeWeeks + * Sets dailyDecimals * - * @param float|null $fullTimeWeeks Maximum Full Time Weeks on this Pay Spine + * @param int|null $dailyDecimals Number of decimal places to calculate Daily Rates * * @return $this */ - public function setFullTimeWeeks(?float $fullTimeWeeks): static + public function setDailyDecimals(?int $dailyDecimals): static { - if (is_null($fullTimeWeeks)) { - throw new InvalidArgumentException('non-nullable fullTimeWeeks cannot be null'); + if (is_null($dailyDecimals)) { + throw new InvalidArgumentException('non-nullable dailyDecimals cannot be null'); } - $this->container['fullTimeWeeks'] = $fullTimeWeeks; + $this->container['dailyDecimals'] = $dailyDecimals; return $this; } /** - * Gets salaryFormula + * Gets dailyDivisor * - * @return string|null + * @return float|null */ - public function getSalaryFormula(): ?string + public function getDailyDivisor(): ?float { - return $this->container['salaryFormula']; + return $this->container['dailyDivisor']; } /** - * Sets salaryFormula + * Sets dailyDivisor * - * @param string|null $salaryFormula Formula used to derive annual salary The salary formula consists of the following elements and Round functions: - PointValue (The value of an individual Spinal Point) - HoursWorked (The hours an employee is contracted to work for in their role) - FTHours (The full time hours specified for an employee in their role) - WeeksWorked (The contracted weeks an employee works in their role) - FTWeeks (The full weeks specified for an employee in their role) Round functions: - ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15. - ROUNDUP(Value) - ROUNDDOWN(Value) - TRUNCATE(Value) For example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" + * @param float|null $dailyDivisor Days used to determine Full time Daily Rate * * @return $this */ - public function setSalaryFormula(?string $salaryFormula): static + public function setDailyDivisor(?float $dailyDivisor): static { - if (is_null($salaryFormula)) { - array_push($this->openAPINullablesSetToNull, 'salaryFormula'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('salaryFormula', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($dailyDivisor)) { + throw new InvalidArgumentException('non-nullable dailyDivisor cannot be null'); } - $this->container['salaryFormula'] = $salaryFormula; + $this->container['dailyDivisor'] = $dailyDivisor; return $this; } /** - * Gets hourlyDivisor + * Gets fullTimeHours * * @return float|null */ - public function getHourlyDivisor(): ?float + public function getFullTimeHours(): ?float { - return $this->container['hourlyDivisor']; + return $this->container['fullTimeHours']; } /** - * Sets hourlyDivisor + * Sets fullTimeHours * - * @param float|null $hourlyDivisor Hours used to determine Hourly Rate + * @param float|null $fullTimeHours Maximum Full Time Hours on this Pay Spine * * @return $this */ - public function setHourlyDivisor(?float $hourlyDivisor): static + public function setFullTimeHours(?float $fullTimeHours): static { - if (is_null($hourlyDivisor)) { - throw new InvalidArgumentException('non-nullable hourlyDivisor cannot be null'); + if (is_null($fullTimeHours)) { + throw new InvalidArgumentException('non-nullable fullTimeHours cannot be null'); } - $this->container['hourlyDivisor'] = $hourlyDivisor; + $this->container['fullTimeHours'] = $fullTimeHours; return $this; } /** - * Gets hourlyDecimals + * Gets fullTimeWeeks * - * @return int|null + * @return float|null */ - public function getHourlyDecimals(): ?int + public function getFullTimeWeeks(): ?float { - return $this->container['hourlyDecimals']; + return $this->container['fullTimeWeeks']; } /** - * Sets hourlyDecimals + * Sets fullTimeWeeks * - * @param int|null $hourlyDecimals Number of decimal places to calculate Hourly Rates + * @param float|null $fullTimeWeeks Maximum Full Time Weeks on this Pay Spine * * @return $this */ - public function setHourlyDecimals(?int $hourlyDecimals): static + public function setFullTimeWeeks(?float $fullTimeWeeks): static { - if (is_null($hourlyDecimals)) { - throw new InvalidArgumentException('non-nullable hourlyDecimals cannot be null'); + if (is_null($fullTimeWeeks)) { + throw new InvalidArgumentException('non-nullable fullTimeWeeks cannot be null'); } - $this->container['hourlyDecimals'] = $hourlyDecimals; + $this->container['fullTimeWeeks'] = $fullTimeWeeks; return $this; } /** - * Gets dailyDivisor + * Gets gradeEffectiveDate * - * @return float|null + * @return \DateTime|null */ - public function getDailyDivisor(): ?float + public function getGradeEffectiveDate(): ?\DateTime { - return $this->container['dailyDivisor']; + return $this->container['gradeEffectiveDate']; } /** - * Sets dailyDivisor + * Sets gradeEffectiveDate * - * @param float|null $dailyDivisor Days used to determine Full time Daily Rate + * @param \DateTime|null $gradeEffectiveDate Effective date for applicable grades * * @return $this */ - public function setDailyDivisor(?float $dailyDivisor): static + public function setGradeEffectiveDate(?\DateTime $gradeEffectiveDate): static { - if (is_null($dailyDivisor)) { - throw new InvalidArgumentException('non-nullable dailyDivisor cannot be null'); + if (is_null($gradeEffectiveDate)) { + throw new InvalidArgumentException('non-nullable gradeEffectiveDate cannot be null'); } - $this->container['dailyDivisor'] = $dailyDivisor; + $this->container['gradeEffectiveDate'] = $gradeEffectiveDate; return $this; } /** - * Gets dailyDecimals + * Gets holidayEntitlements * - * @return int|null + * @return \SynergiTech\Staffology\Model\ContractHolidayEntitlementRequest[]|null */ - public function getDailyDecimals(): ?int + public function getHolidayEntitlements(): ?array { - return $this->container['dailyDecimals']; + return $this->container['holidayEntitlements']; } /** - * Sets dailyDecimals + * Sets holidayEntitlements * - * @param int|null $dailyDecimals Number of decimal places to calculate Daily Rates + * @param \SynergiTech\Staffology\Model\ContractHolidayEntitlementRequest[]|null $holidayEntitlements PaySpine Holiday Entitlements * * @return $this */ - public function setDailyDecimals(?int $dailyDecimals): static + public function setHolidayEntitlements(?array $holidayEntitlements): static { - if (is_null($dailyDecimals)) { - throw new InvalidArgumentException('non-nullable dailyDecimals cannot be null'); + if (is_null($holidayEntitlements)) { + array_push($this->openAPINullablesSetToNull, 'holidayEntitlements'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('holidayEntitlements', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['dailyDecimals'] = $dailyDecimals; + $this->container['holidayEntitlements'] = $holidayEntitlements; return $this; } /** - * Gets annualDecimals + * Gets hourlyDecimals * * @return int|null */ - public function getAnnualDecimals(): ?int + public function getHourlyDecimals(): ?int { - return $this->container['annualDecimals']; + return $this->container['hourlyDecimals']; } /** - * Sets annualDecimals + * Sets hourlyDecimals * - * @param int|null $annualDecimals Number of decimal places to calculate Annual Salaries + * @param int|null $hourlyDecimals Number of decimal places to calculate Hourly Rates * * @return $this */ - public function setAnnualDecimals(?int $annualDecimals): static + public function setHourlyDecimals(?int $hourlyDecimals): static { - if (is_null($annualDecimals)) { - throw new InvalidArgumentException('non-nullable annualDecimals cannot be null'); + if (is_null($hourlyDecimals)) { + throw new InvalidArgumentException('non-nullable hourlyDecimals cannot be null'); } - $this->container['annualDecimals'] = $annualDecimals; + $this->container['hourlyDecimals'] = $hourlyDecimals; return $this; } /** - * Gets annualRoundingRule + * Gets hourlyDivisor * - * @return \SynergiTech\Staffology\Model\AnnualRoundingRule|null + * @return float|null */ - public function getAnnualRoundingRule(): ?\SynergiTech\Staffology\Model\AnnualRoundingRule + public function getHourlyDivisor(): ?float { - return $this->container['annualRoundingRule']; + return $this->container['hourlyDivisor']; } /** - * Sets annualRoundingRule + * Sets hourlyDivisor * - * @param \SynergiTech\Staffology\Model\AnnualRoundingRule|null $annualRoundingRule annualRoundingRule + * @param float|null $hourlyDivisor Hours used to determine Hourly Rate * * @return $this */ - public function setAnnualRoundingRule(?\SynergiTech\Staffology\Model\AnnualRoundingRule $annualRoundingRule): static + public function setHourlyDivisor(?float $hourlyDivisor): static { - if (is_null($annualRoundingRule)) { - throw new InvalidArgumentException('non-nullable annualRoundingRule cannot be null'); + if (is_null($hourlyDivisor)) { + throw new InvalidArgumentException('non-nullable hourlyDivisor cannot be null'); } - $this->container['annualRoundingRule'] = $annualRoundingRule; + $this->container['hourlyDivisor'] = $hourlyDivisor; return $this; } @@ -705,143 +698,150 @@ public function setIncrementRule(?\SynergiTech\Staffology\Model\IncrementRule $i } /** - * Gets requiresLondonAllowance + * Gets name * - * @return bool|null + * @return string|null */ - public function getRequiresLondonAllowance(): ?bool + public function getName(): ?string { - return $this->container['requiresLondonAllowance']; + return $this->container['name']; } /** - * Sets requiresLondonAllowance + * Sets name * - * @param bool|null $requiresLondonAllowance Requires LA column to be completed on the spine + * @param string|null $name Name of the Pay Spine * * @return $this */ - public function setRequiresLondonAllowance(?bool $requiresLondonAllowance): static + public function setName(?string $name): static { - if (is_null($requiresLondonAllowance)) { - throw new InvalidArgumentException('non-nullable requiresLondonAllowance cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['requiresLondonAllowance'] = $requiresLondonAllowance; + $this->container['name'] = $name; return $this; } /** - * Gets gradeEffectiveDate + * Gets pointEffectiveDate * * @return \DateTime|null */ - public function getGradeEffectiveDate(): ?\DateTime + public function getPointEffectiveDate(): ?\DateTime { - return $this->container['gradeEffectiveDate']; + return $this->container['pointEffectiveDate']; } /** - * Sets gradeEffectiveDate + * Sets pointEffectiveDate * - * @param \DateTime|null $gradeEffectiveDate Effective date for applicable grades + * @param \DateTime|null $pointEffectiveDate Effective date for applicable spinal points * * @return $this */ - public function setGradeEffectiveDate(?\DateTime $gradeEffectiveDate): static + public function setPointEffectiveDate(?\DateTime $pointEffectiveDate): static { - if (is_null($gradeEffectiveDate)) { - throw new InvalidArgumentException('non-nullable gradeEffectiveDate cannot be null'); + if (is_null($pointEffectiveDate)) { + throw new InvalidArgumentException('non-nullable pointEffectiveDate cannot be null'); } - $this->container['gradeEffectiveDate'] = $gradeEffectiveDate; + $this->container['pointEffectiveDate'] = $pointEffectiveDate; return $this; } /** - * Gets pointEffectiveDate + * Gets requiresLondonAllowance * - * @return \DateTime|null + * @return bool|null */ - public function getPointEffectiveDate(): ?\DateTime + public function getRequiresLondonAllowance(): ?bool { - return $this->container['pointEffectiveDate']; + return $this->container['requiresLondonAllowance']; } /** - * Sets pointEffectiveDate + * Sets requiresLondonAllowance * - * @param \DateTime|null $pointEffectiveDate Effective date for applicable spinal points + * @param bool|null $requiresLondonAllowance Requires LA column to be completed on the spine * * @return $this */ - public function setPointEffectiveDate(?\DateTime $pointEffectiveDate): static + public function setRequiresLondonAllowance(?bool $requiresLondonAllowance): static { - if (is_null($pointEffectiveDate)) { - throw new InvalidArgumentException('non-nullable pointEffectiveDate cannot be null'); + if (is_null($requiresLondonAllowance)) { + throw new InvalidArgumentException('non-nullable requiresLondonAllowance cannot be null'); } - $this->container['pointEffectiveDate'] = $pointEffectiveDate; + $this->container['requiresLondonAllowance'] = $requiresLondonAllowance; return $this; } /** - * Gets useSpineHolidayRules + * Gets salaryFormula * - * @return bool|null + * @return string|null */ - public function getUseSpineHolidayRules(): ?bool + public function getSalaryFormula(): ?string { - return $this->container['useSpineHolidayRules']; + return $this->container['salaryFormula']; } /** - * Sets useSpineHolidayRules + * Sets salaryFormula * - * @param bool|null $useSpineHolidayRules Flag to include holiday entitlements in Payspine (Default false) + * @param string|null $salaryFormula Formula used to derive annual salary The salary formula consists of the following elements and Round functions: - PointValue (The value of an individual Spinal Point) - HoursWorked (The hours an employee is contracted to work for in their role) - FTHours (The full time hours specified for an employee in their role) - WeeksWorked (The contracted weeks an employee works in their role) - FTWeeks (The full weeks specified for an employee in their role) Round functions: - ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15. - ROUNDUP(Value) - ROUNDDOWN(Value) - TRUNCATE(Value) For example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" * * @return $this */ - public function setUseSpineHolidayRules(?bool $useSpineHolidayRules): static + public function setSalaryFormula(?string $salaryFormula): static { - if (is_null($useSpineHolidayRules)) { - throw new InvalidArgumentException('non-nullable useSpineHolidayRules cannot be null'); + if (is_null($salaryFormula)) { + array_push($this->openAPINullablesSetToNull, 'salaryFormula'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('salaryFormula', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useSpineHolidayRules'] = $useSpineHolidayRules; + $this->container['salaryFormula'] = $salaryFormula; return $this; } /** - * Gets holidayEntitlements + * Gets useSpineHolidayRules * - * @return \SynergiTech\Staffology\Model\ContractHolidayEntitlementRequest[]|null + * @return bool|null */ - public function getHolidayEntitlements(): ?array + public function getUseSpineHolidayRules(): ?bool { - return $this->container['holidayEntitlements']; + return $this->container['useSpineHolidayRules']; } /** - * Sets holidayEntitlements + * Sets useSpineHolidayRules * - * @param \SynergiTech\Staffology\Model\ContractHolidayEntitlementRequest[]|null $holidayEntitlements PaySpine Holiday Entitlements + * @param bool|null $useSpineHolidayRules Flag to include holiday entitlements in Payspine (Default false) * * @return $this */ - public function setHolidayEntitlements(?array $holidayEntitlements): static + public function setUseSpineHolidayRules(?bool $useSpineHolidayRules): static { - if (is_null($holidayEntitlements)) { - array_push($this->openAPINullablesSetToNull, 'holidayEntitlements'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('holidayEntitlements', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useSpineHolidayRules)) { + throw new InvalidArgumentException('non-nullable useSpineHolidayRules cannot be null'); } - $this->container['holidayEntitlements'] = $holidayEntitlements; + $this->container['useSpineHolidayRules'] = $useSpineHolidayRules; return $this; } diff --git a/src/Model/ContractPaySpineResponse.php b/src/Model/ContractPaySpineResponse.php index 61bef0b..1833424 100644 --- a/src/Model/ContractPaySpineResponse.php +++ b/src/Model/ContractPaySpineResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,23 +59,23 @@ class ContractPaySpineResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'name' => 'string', + 'annualDecimals' => 'int', + 'annualRoundingRule' => '\SynergiTech\Staffology\Model\AnnualRoundingRule', + 'dailyDecimals' => 'int', + 'dailyDivisor' => 'float', 'fullTimeHours' => 'float', 'fullTimeWeeks' => 'float', - 'salaryFormula' => 'string', - 'hourlyDivisor' => 'float', + 'gradeEffectiveDate' => '\DateTime', + 'holidayEntitlements' => '\SynergiTech\Staffology\Model\ContractHolidayEntitlementResponse[]', 'hourlyDecimals' => 'int', - 'dailyDivisor' => 'float', - 'dailyDecimals' => 'int', - 'annualDecimals' => 'int', - 'annualRoundingRule' => '\SynergiTech\Staffology\Model\AnnualRoundingRule', + 'hourlyDivisor' => 'float', + 'id' => 'string', 'incrementRule' => '\SynergiTech\Staffology\Model\IncrementRule', - 'requiresLondonAllowance' => 'bool', - 'gradeEffectiveDate' => '\DateTime', + 'name' => 'string', 'pointEffectiveDate' => '\DateTime', - 'useSpineHolidayRules' => 'bool', - 'holidayEntitlements' => '\SynergiTech\Staffology\Model\ContractHolidayEntitlementResponse[]' + 'requiresLondonAllowance' => 'bool', + 'salaryFormula' => 'string', + 'useSpineHolidayRules' => 'bool' ]; /** @@ -84,23 +84,23 @@ class ContractPaySpineResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'name' => null, + 'annualDecimals' => 'int32', + 'annualRoundingRule' => null, + 'dailyDecimals' => 'int32', + 'dailyDivisor' => 'double', 'fullTimeHours' => 'double', 'fullTimeWeeks' => 'double', - 'salaryFormula' => null, - 'hourlyDivisor' => 'double', + 'gradeEffectiveDate' => 'date', + 'holidayEntitlements' => null, 'hourlyDecimals' => 'int32', - 'dailyDivisor' => 'double', - 'dailyDecimals' => 'int32', - 'annualDecimals' => 'int32', - 'annualRoundingRule' => null, + 'hourlyDivisor' => 'double', + 'id' => 'uuid', 'incrementRule' => null, - 'requiresLondonAllowance' => null, - 'gradeEffectiveDate' => 'date', + 'name' => null, 'pointEffectiveDate' => 'date', - 'useSpineHolidayRules' => null, - 'holidayEntitlements' => null + 'requiresLondonAllowance' => null, + 'salaryFormula' => null, + 'useSpineHolidayRules' => null ]; /** @@ -109,23 +109,23 @@ class ContractPaySpineResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'name' => true, + 'annualDecimals' => false, + 'annualRoundingRule' => false, + 'dailyDecimals' => false, + 'dailyDivisor' => false, 'fullTimeHours' => false, 'fullTimeWeeks' => false, - 'salaryFormula' => true, - 'hourlyDivisor' => false, + 'gradeEffectiveDate' => false, + 'holidayEntitlements' => true, 'hourlyDecimals' => false, - 'dailyDivisor' => false, - 'dailyDecimals' => false, - 'annualDecimals' => false, - 'annualRoundingRule' => false, + 'hourlyDivisor' => false, + 'id' => false, 'incrementRule' => false, - 'requiresLondonAllowance' => false, - 'gradeEffectiveDate' => false, + 'name' => true, 'pointEffectiveDate' => false, - 'useSpineHolidayRules' => false, - 'holidayEntitlements' => true + 'requiresLondonAllowance' => false, + 'salaryFormula' => true, + 'useSpineHolidayRules' => false ]; /** @@ -214,23 +214,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'name' => 'name', + 'annualDecimals' => 'annualDecimals', + 'annualRoundingRule' => 'annualRoundingRule', + 'dailyDecimals' => 'dailyDecimals', + 'dailyDivisor' => 'dailyDivisor', 'fullTimeHours' => 'fullTimeHours', 'fullTimeWeeks' => 'fullTimeWeeks', - 'salaryFormula' => 'salaryFormula', - 'hourlyDivisor' => 'hourlyDivisor', + 'gradeEffectiveDate' => 'gradeEffectiveDate', + 'holidayEntitlements' => 'holidayEntitlements', 'hourlyDecimals' => 'hourlyDecimals', - 'dailyDivisor' => 'dailyDivisor', - 'dailyDecimals' => 'dailyDecimals', - 'annualDecimals' => 'annualDecimals', - 'annualRoundingRule' => 'annualRoundingRule', + 'hourlyDivisor' => 'hourlyDivisor', + 'id' => 'id', 'incrementRule' => 'incrementRule', - 'requiresLondonAllowance' => 'requiresLondonAllowance', - 'gradeEffectiveDate' => 'gradeEffectiveDate', + 'name' => 'name', 'pointEffectiveDate' => 'pointEffectiveDate', - 'useSpineHolidayRules' => 'useSpineHolidayRules', - 'holidayEntitlements' => 'holidayEntitlements' + 'requiresLondonAllowance' => 'requiresLondonAllowance', + 'salaryFormula' => 'salaryFormula', + 'useSpineHolidayRules' => 'useSpineHolidayRules' ]; /** @@ -239,23 +239,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'name' => 'setName', + 'annualDecimals' => 'setAnnualDecimals', + 'annualRoundingRule' => 'setAnnualRoundingRule', + 'dailyDecimals' => 'setDailyDecimals', + 'dailyDivisor' => 'setDailyDivisor', 'fullTimeHours' => 'setFullTimeHours', 'fullTimeWeeks' => 'setFullTimeWeeks', - 'salaryFormula' => 'setSalaryFormula', - 'hourlyDivisor' => 'setHourlyDivisor', + 'gradeEffectiveDate' => 'setGradeEffectiveDate', + 'holidayEntitlements' => 'setHolidayEntitlements', 'hourlyDecimals' => 'setHourlyDecimals', - 'dailyDivisor' => 'setDailyDivisor', - 'dailyDecimals' => 'setDailyDecimals', - 'annualDecimals' => 'setAnnualDecimals', - 'annualRoundingRule' => 'setAnnualRoundingRule', + 'hourlyDivisor' => 'setHourlyDivisor', + 'id' => 'setId', 'incrementRule' => 'setIncrementRule', - 'requiresLondonAllowance' => 'setRequiresLondonAllowance', - 'gradeEffectiveDate' => 'setGradeEffectiveDate', + 'name' => 'setName', 'pointEffectiveDate' => 'setPointEffectiveDate', - 'useSpineHolidayRules' => 'setUseSpineHolidayRules', - 'holidayEntitlements' => 'setHolidayEntitlements' + 'requiresLondonAllowance' => 'setRequiresLondonAllowance', + 'salaryFormula' => 'setSalaryFormula', + 'useSpineHolidayRules' => 'setUseSpineHolidayRules' ]; /** @@ -264,23 +264,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'name' => 'getName', + 'annualDecimals' => 'getAnnualDecimals', + 'annualRoundingRule' => 'getAnnualRoundingRule', + 'dailyDecimals' => 'getDailyDecimals', + 'dailyDivisor' => 'getDailyDivisor', 'fullTimeHours' => 'getFullTimeHours', 'fullTimeWeeks' => 'getFullTimeWeeks', - 'salaryFormula' => 'getSalaryFormula', - 'hourlyDivisor' => 'getHourlyDivisor', + 'gradeEffectiveDate' => 'getGradeEffectiveDate', + 'holidayEntitlements' => 'getHolidayEntitlements', 'hourlyDecimals' => 'getHourlyDecimals', - 'dailyDivisor' => 'getDailyDivisor', - 'dailyDecimals' => 'getDailyDecimals', - 'annualDecimals' => 'getAnnualDecimals', - 'annualRoundingRule' => 'getAnnualRoundingRule', + 'hourlyDivisor' => 'getHourlyDivisor', + 'id' => 'getId', 'incrementRule' => 'getIncrementRule', - 'requiresLondonAllowance' => 'getRequiresLondonAllowance', - 'gradeEffectiveDate' => 'getGradeEffectiveDate', + 'name' => 'getName', 'pointEffectiveDate' => 'getPointEffectiveDate', - 'useSpineHolidayRules' => 'getUseSpineHolidayRules', - 'holidayEntitlements' => 'getHolidayEntitlements' + 'requiresLondonAllowance' => 'getRequiresLondonAllowance', + 'salaryFormula' => 'getSalaryFormula', + 'useSpineHolidayRules' => 'getUseSpineHolidayRules' ]; /** @@ -339,23 +339,23 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('annualDecimals', $data ?? [], null); + $this->setIfExists('annualRoundingRule', $data ?? [], null); + $this->setIfExists('dailyDecimals', $data ?? [], null); + $this->setIfExists('dailyDivisor', $data ?? [], null); $this->setIfExists('fullTimeHours', $data ?? [], null); $this->setIfExists('fullTimeWeeks', $data ?? [], null); - $this->setIfExists('salaryFormula', $data ?? [], null); - $this->setIfExists('hourlyDivisor', $data ?? [], null); + $this->setIfExists('gradeEffectiveDate', $data ?? [], null); + $this->setIfExists('holidayEntitlements', $data ?? [], null); $this->setIfExists('hourlyDecimals', $data ?? [], null); - $this->setIfExists('dailyDivisor', $data ?? [], null); - $this->setIfExists('dailyDecimals', $data ?? [], null); - $this->setIfExists('annualDecimals', $data ?? [], null); - $this->setIfExists('annualRoundingRule', $data ?? [], null); + $this->setIfExists('hourlyDivisor', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('incrementRule', $data ?? [], null); - $this->setIfExists('requiresLondonAllowance', $data ?? [], null); - $this->setIfExists('gradeEffectiveDate', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('pointEffectiveDate', $data ?? [], null); + $this->setIfExists('requiresLondonAllowance', $data ?? [], null); + $this->setIfExists('salaryFormula', $data ?? [], null); $this->setIfExists('useSpineHolidayRules', $data ?? [], null); - $this->setIfExists('holidayEntitlements', $data ?? [], null); } /** @@ -401,62 +401,109 @@ public function valid(): bool /** - * Gets id + * Gets annualDecimals * - * @return string|null + * @return int|null */ - public function getId(): ?string + public function getAnnualDecimals(): ?int { - return $this->container['id']; + return $this->container['annualDecimals']; } /** - * Sets id + * Sets annualDecimals * - * @param string|null $id Pay Spine identifier + * @param int|null $annualDecimals Number of decimal places to calculate Annual Salaries * * @return $this */ - public function setId(?string $id): static + public function setAnnualDecimals(?int $annualDecimals): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($annualDecimals)) { + throw new InvalidArgumentException('non-nullable annualDecimals cannot be null'); } - $this->container['id'] = $id; + $this->container['annualDecimals'] = $annualDecimals; return $this; } /** - * Gets name + * Gets annualRoundingRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\AnnualRoundingRule|null */ - public function getName(): ?string + public function getAnnualRoundingRule(): ?\SynergiTech\Staffology\Model\AnnualRoundingRule { - return $this->container['name']; + return $this->container['annualRoundingRule']; } /** - * Sets name + * Sets annualRoundingRule * - * @param string|null $name Name of the Pay Spine + * @param \SynergiTech\Staffology\Model\AnnualRoundingRule|null $annualRoundingRule annualRoundingRule * * @return $this */ - public function setName(?string $name): static + public function setAnnualRoundingRule(?\SynergiTech\Staffology\Model\AnnualRoundingRule $annualRoundingRule): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($annualRoundingRule)) { + throw new InvalidArgumentException('non-nullable annualRoundingRule cannot be null'); } - $this->container['name'] = $name; + $this->container['annualRoundingRule'] = $annualRoundingRule; + + return $this; + } + + /** + * Gets dailyDecimals + * + * @return int|null + */ + public function getDailyDecimals(): ?int + { + return $this->container['dailyDecimals']; + } + + /** + * Sets dailyDecimals + * + * @param int|null $dailyDecimals Number of decimal places to calculate Daily Rates + * + * @return $this + */ + public function setDailyDecimals(?int $dailyDecimals): static + { + if (is_null($dailyDecimals)) { + throw new InvalidArgumentException('non-nullable dailyDecimals cannot be null'); + } + $this->container['dailyDecimals'] = $dailyDecimals; + + return $this; + } + + /** + * Gets dailyDivisor + * + * @return float|null + */ + public function getDailyDivisor(): ?float + { + return $this->container['dailyDivisor']; + } + + /** + * Sets dailyDivisor + * + * @param float|null $dailyDivisor Days used to determine Full time Daily Rate + * + * @return $this + */ + public function setDailyDivisor(?float $dailyDivisor): static + { + if (is_null($dailyDivisor)) { + throw new InvalidArgumentException('non-nullable dailyDivisor cannot be null'); + } + $this->container['dailyDivisor'] = $dailyDivisor; return $this; } @@ -516,62 +563,62 @@ public function setFullTimeWeeks(?float $fullTimeWeeks): static } /** - * Gets salaryFormula + * Gets gradeEffectiveDate * - * @return string|null + * @return \DateTime|null */ - public function getSalaryFormula(): ?string + public function getGradeEffectiveDate(): ?\DateTime { - return $this->container['salaryFormula']; + return $this->container['gradeEffectiveDate']; } /** - * Sets salaryFormula + * Sets gradeEffectiveDate * - * @param string|null $salaryFormula Formula used to derive annual salary The salary formula consists of the following elements and Round functions: - PointValue (The value of an individual Spinal Point) - HoursWorked (The hours an employee is contracted to work for in their role) - FTHours (The full time hours specified for an employee in their role) - WeeksWorked (The contracted weeks an employee works in their role) - FTWeeks (The full weeks specified for an employee in their role) Round functions: - ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15. - ROUNDUP(Value) - ROUNDDOWN(Value) - TRUNCATE(Value) For example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" + * @param \DateTime|null $gradeEffectiveDate Effective date for applicable grades * * @return $this */ - public function setSalaryFormula(?string $salaryFormula): static + public function setGradeEffectiveDate(?\DateTime $gradeEffectiveDate): static { - if (is_null($salaryFormula)) { - array_push($this->openAPINullablesSetToNull, 'salaryFormula'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('salaryFormula', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($gradeEffectiveDate)) { + throw new InvalidArgumentException('non-nullable gradeEffectiveDate cannot be null'); } - $this->container['salaryFormula'] = $salaryFormula; + $this->container['gradeEffectiveDate'] = $gradeEffectiveDate; return $this; } /** - * Gets hourlyDivisor + * Gets holidayEntitlements * - * @return float|null + * @return \SynergiTech\Staffology\Model\ContractHolidayEntitlementResponse[]|null */ - public function getHourlyDivisor(): ?float + public function getHolidayEntitlements(): ?array { - return $this->container['hourlyDivisor']; + return $this->container['holidayEntitlements']; } /** - * Sets hourlyDivisor + * Sets holidayEntitlements * - * @param float|null $hourlyDivisor Hours used to determine Hourly Rate + * @param \SynergiTech\Staffology\Model\ContractHolidayEntitlementResponse[]|null $holidayEntitlements holidayEntitlements * * @return $this */ - public function setHourlyDivisor(?float $hourlyDivisor): static + public function setHolidayEntitlements(?array $holidayEntitlements): static { - if (is_null($hourlyDivisor)) { - throw new InvalidArgumentException('non-nullable hourlyDivisor cannot be null'); + if (is_null($holidayEntitlements)) { + array_push($this->openAPINullablesSetToNull, 'holidayEntitlements'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('holidayEntitlements', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['hourlyDivisor'] = $hourlyDivisor; + $this->container['holidayEntitlements'] = $holidayEntitlements; return $this; } @@ -604,136 +651,143 @@ public function setHourlyDecimals(?int $hourlyDecimals): static } /** - * Gets dailyDivisor + * Gets hourlyDivisor * * @return float|null */ - public function getDailyDivisor(): ?float + public function getHourlyDivisor(): ?float { - return $this->container['dailyDivisor']; + return $this->container['hourlyDivisor']; } /** - * Sets dailyDivisor + * Sets hourlyDivisor * - * @param float|null $dailyDivisor Days used to determine Full time Daily Rate + * @param float|null $hourlyDivisor Hours used to determine Hourly Rate * * @return $this */ - public function setDailyDivisor(?float $dailyDivisor): static + public function setHourlyDivisor(?float $hourlyDivisor): static { - if (is_null($dailyDivisor)) { - throw new InvalidArgumentException('non-nullable dailyDivisor cannot be null'); + if (is_null($hourlyDivisor)) { + throw new InvalidArgumentException('non-nullable hourlyDivisor cannot be null'); } - $this->container['dailyDivisor'] = $dailyDivisor; + $this->container['hourlyDivisor'] = $hourlyDivisor; return $this; } /** - * Gets dailyDecimals + * Gets id * - * @return int|null + * @return string|null */ - public function getDailyDecimals(): ?int + public function getId(): ?string { - return $this->container['dailyDecimals']; + return $this->container['id']; } /** - * Sets dailyDecimals + * Sets id * - * @param int|null $dailyDecimals Number of decimal places to calculate Daily Rates + * @param string|null $id Pay Spine identifier * * @return $this */ - public function setDailyDecimals(?int $dailyDecimals): static + public function setId(?string $id): static { - if (is_null($dailyDecimals)) { - throw new InvalidArgumentException('non-nullable dailyDecimals cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['dailyDecimals'] = $dailyDecimals; + $this->container['id'] = $id; return $this; } /** - * Gets annualDecimals + * Gets incrementRule * - * @return int|null + * @return \SynergiTech\Staffology\Model\IncrementRule|null */ - public function getAnnualDecimals(): ?int + public function getIncrementRule(): ?\SynergiTech\Staffology\Model\IncrementRule { - return $this->container['annualDecimals']; + return $this->container['incrementRule']; } /** - * Sets annualDecimals + * Sets incrementRule * - * @param int|null $annualDecimals Number of decimal places to calculate Annual Salaries + * @param \SynergiTech\Staffology\Model\IncrementRule|null $incrementRule incrementRule * * @return $this */ - public function setAnnualDecimals(?int $annualDecimals): static + public function setIncrementRule(?\SynergiTech\Staffology\Model\IncrementRule $incrementRule): static { - if (is_null($annualDecimals)) { - throw new InvalidArgumentException('non-nullable annualDecimals cannot be null'); + if (is_null($incrementRule)) { + throw new InvalidArgumentException('non-nullable incrementRule cannot be null'); } - $this->container['annualDecimals'] = $annualDecimals; + $this->container['incrementRule'] = $incrementRule; return $this; } /** - * Gets annualRoundingRule + * Gets name * - * @return \SynergiTech\Staffology\Model\AnnualRoundingRule|null + * @return string|null */ - public function getAnnualRoundingRule(): ?\SynergiTech\Staffology\Model\AnnualRoundingRule + public function getName(): ?string { - return $this->container['annualRoundingRule']; + return $this->container['name']; } /** - * Sets annualRoundingRule + * Sets name * - * @param \SynergiTech\Staffology\Model\AnnualRoundingRule|null $annualRoundingRule annualRoundingRule + * @param string|null $name Name of the Pay Spine * * @return $this */ - public function setAnnualRoundingRule(?\SynergiTech\Staffology\Model\AnnualRoundingRule $annualRoundingRule): static + public function setName(?string $name): static { - if (is_null($annualRoundingRule)) { - throw new InvalidArgumentException('non-nullable annualRoundingRule cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['annualRoundingRule'] = $annualRoundingRule; + $this->container['name'] = $name; return $this; } /** - * Gets incrementRule + * Gets pointEffectiveDate * - * @return \SynergiTech\Staffology\Model\IncrementRule|null + * @return \DateTime|null */ - public function getIncrementRule(): ?\SynergiTech\Staffology\Model\IncrementRule + public function getPointEffectiveDate(): ?\DateTime { - return $this->container['incrementRule']; + return $this->container['pointEffectiveDate']; } /** - * Sets incrementRule + * Sets pointEffectiveDate * - * @param \SynergiTech\Staffology\Model\IncrementRule|null $incrementRule incrementRule + * @param \DateTime|null $pointEffectiveDate Effective date for applicable spinal points * * @return $this */ - public function setIncrementRule(?\SynergiTech\Staffology\Model\IncrementRule $incrementRule): static + public function setPointEffectiveDate(?\DateTime $pointEffectiveDate): static { - if (is_null($incrementRule)) { - throw new InvalidArgumentException('non-nullable incrementRule cannot be null'); + if (is_null($pointEffectiveDate)) { + throw new InvalidArgumentException('non-nullable pointEffectiveDate cannot be null'); } - $this->container['incrementRule'] = $incrementRule; + $this->container['pointEffectiveDate'] = $pointEffectiveDate; return $this; } @@ -766,55 +820,35 @@ public function setRequiresLondonAllowance(?bool $requiresLondonAllowance): stat } /** - * Gets gradeEffectiveDate - * - * @return \DateTime|null - */ - public function getGradeEffectiveDate(): ?\DateTime - { - return $this->container['gradeEffectiveDate']; - } - - /** - * Sets gradeEffectiveDate - * - * @param \DateTime|null $gradeEffectiveDate Effective date for applicable grades - * - * @return $this - */ - public function setGradeEffectiveDate(?\DateTime $gradeEffectiveDate): static - { - if (is_null($gradeEffectiveDate)) { - throw new InvalidArgumentException('non-nullable gradeEffectiveDate cannot be null'); - } - $this->container['gradeEffectiveDate'] = $gradeEffectiveDate; - - return $this; - } - - /** - * Gets pointEffectiveDate + * Gets salaryFormula * - * @return \DateTime|null + * @return string|null */ - public function getPointEffectiveDate(): ?\DateTime + public function getSalaryFormula(): ?string { - return $this->container['pointEffectiveDate']; + return $this->container['salaryFormula']; } /** - * Sets pointEffectiveDate + * Sets salaryFormula * - * @param \DateTime|null $pointEffectiveDate Effective date for applicable spinal points + * @param string|null $salaryFormula Formula used to derive annual salary The salary formula consists of the following elements and Round functions: - PointValue (The value of an individual Spinal Point) - HoursWorked (The hours an employee is contracted to work for in their role) - FTHours (The full time hours specified for an employee in their role) - WeeksWorked (The contracted weeks an employee works in their role) - FTWeeks (The full weeks specified for an employee in their role) Round functions: - ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15. - ROUNDUP(Value) - ROUNDDOWN(Value) - TRUNCATE(Value) For example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" * * @return $this */ - public function setPointEffectiveDate(?\DateTime $pointEffectiveDate): static + public function setSalaryFormula(?string $salaryFormula): static { - if (is_null($pointEffectiveDate)) { - throw new InvalidArgumentException('non-nullable pointEffectiveDate cannot be null'); + if (is_null($salaryFormula)) { + array_push($this->openAPINullablesSetToNull, 'salaryFormula'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('salaryFormula', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['pointEffectiveDate'] = $pointEffectiveDate; + $this->container['salaryFormula'] = $salaryFormula; return $this; } @@ -845,40 +879,6 @@ public function setUseSpineHolidayRules(?bool $useSpineHolidayRules): static return $this; } - - /** - * Gets holidayEntitlements - * - * @return \SynergiTech\Staffology\Model\ContractHolidayEntitlementResponse[]|null - */ - public function getHolidayEntitlements(): ?array - { - return $this->container['holidayEntitlements']; - } - - /** - * Sets holidayEntitlements - * - * @param \SynergiTech\Staffology\Model\ContractHolidayEntitlementResponse[]|null $holidayEntitlements holidayEntitlements - * - * @return $this - */ - public function setHolidayEntitlements(?array $holidayEntitlements): static - { - if (is_null($holidayEntitlements)) { - array_push($this->openAPINullablesSetToNull, 'holidayEntitlements'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('holidayEntitlements', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['holidayEntitlements'] = $holidayEntitlements; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractPaySpineUpdateRequest.php b/src/Model/ContractPaySpineUpdateRequest.php index 39a8845..423929d 100644 --- a/src/Model/ContractPaySpineUpdateRequest.php +++ b/src/Model/ContractPaySpineUpdateRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,22 +59,22 @@ class ContractPaySpineUpdateRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', + 'annualDecimals' => 'int', + 'annualRoundingRule' => '\SynergiTech\Staffology\Model\AnnualRoundingRule', + 'dailyDecimals' => 'int', + 'dailyDivisor' => 'float', 'fullTimeHours' => 'float', 'fullTimeWeeks' => 'float', - 'salaryFormula' => 'string', - 'hourlyDivisor' => 'float', + 'gradeEffectiveDate' => '\DateTime', + 'holidayEntitlements' => '\SynergiTech\Staffology\Model\ContractHolidayEntitlementUpdateRequest[]', 'hourlyDecimals' => 'int', - 'dailyDivisor' => 'float', - 'dailyDecimals' => 'int', - 'annualDecimals' => 'int', - 'annualRoundingRule' => '\SynergiTech\Staffology\Model\AnnualRoundingRule', + 'hourlyDivisor' => 'float', 'incrementRule' => '\SynergiTech\Staffology\Model\IncrementRule', - 'requiresLondonAllowance' => 'bool', - 'gradeEffectiveDate' => '\DateTime', + 'name' => 'string', 'pointEffectiveDate' => '\DateTime', - 'useSpineHolidayRules' => 'bool', - 'holidayEntitlements' => '\SynergiTech\Staffology\Model\ContractHolidayEntitlementUpdateRequest[]' + 'requiresLondonAllowance' => 'bool', + 'salaryFormula' => 'string', + 'useSpineHolidayRules' => 'bool' ]; /** @@ -83,22 +83,22 @@ class ContractPaySpineUpdateRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ - 'name' => null, + 'annualDecimals' => 'int32', + 'annualRoundingRule' => null, + 'dailyDecimals' => 'int32', + 'dailyDivisor' => 'double', 'fullTimeHours' => 'double', 'fullTimeWeeks' => 'double', - 'salaryFormula' => null, - 'hourlyDivisor' => 'double', + 'gradeEffectiveDate' => 'date', + 'holidayEntitlements' => null, 'hourlyDecimals' => 'int32', - 'dailyDivisor' => 'double', - 'dailyDecimals' => 'int32', - 'annualDecimals' => 'int32', - 'annualRoundingRule' => null, + 'hourlyDivisor' => 'double', 'incrementRule' => null, - 'requiresLondonAllowance' => null, - 'gradeEffectiveDate' => 'date', + 'name' => null, 'pointEffectiveDate' => 'date', - 'useSpineHolidayRules' => null, - 'holidayEntitlements' => null + 'requiresLondonAllowance' => null, + 'salaryFormula' => null, + 'useSpineHolidayRules' => null ]; /** @@ -107,22 +107,22 @@ class ContractPaySpineUpdateRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ - 'name' => true, + 'annualDecimals' => false, + 'annualRoundingRule' => false, + 'dailyDecimals' => false, + 'dailyDivisor' => false, 'fullTimeHours' => false, 'fullTimeWeeks' => false, - 'salaryFormula' => true, - 'hourlyDivisor' => false, + 'gradeEffectiveDate' => false, + 'holidayEntitlements' => true, 'hourlyDecimals' => false, - 'dailyDivisor' => false, - 'dailyDecimals' => false, - 'annualDecimals' => false, - 'annualRoundingRule' => false, + 'hourlyDivisor' => false, 'incrementRule' => false, - 'requiresLondonAllowance' => false, - 'gradeEffectiveDate' => false, + 'name' => true, 'pointEffectiveDate' => false, - 'useSpineHolidayRules' => false, - 'holidayEntitlements' => true + 'requiresLondonAllowance' => false, + 'salaryFormula' => true, + 'useSpineHolidayRules' => false ]; /** @@ -211,22 +211,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', + 'annualDecimals' => 'annualDecimals', + 'annualRoundingRule' => 'annualRoundingRule', + 'dailyDecimals' => 'dailyDecimals', + 'dailyDivisor' => 'dailyDivisor', 'fullTimeHours' => 'fullTimeHours', 'fullTimeWeeks' => 'fullTimeWeeks', - 'salaryFormula' => 'salaryFormula', - 'hourlyDivisor' => 'hourlyDivisor', + 'gradeEffectiveDate' => 'gradeEffectiveDate', + 'holidayEntitlements' => 'holidayEntitlements', 'hourlyDecimals' => 'hourlyDecimals', - 'dailyDivisor' => 'dailyDivisor', - 'dailyDecimals' => 'dailyDecimals', - 'annualDecimals' => 'annualDecimals', - 'annualRoundingRule' => 'annualRoundingRule', + 'hourlyDivisor' => 'hourlyDivisor', 'incrementRule' => 'incrementRule', - 'requiresLondonAllowance' => 'requiresLondonAllowance', - 'gradeEffectiveDate' => 'gradeEffectiveDate', + 'name' => 'name', 'pointEffectiveDate' => 'pointEffectiveDate', - 'useSpineHolidayRules' => 'useSpineHolidayRules', - 'holidayEntitlements' => 'holidayEntitlements' + 'requiresLondonAllowance' => 'requiresLondonAllowance', + 'salaryFormula' => 'salaryFormula', + 'useSpineHolidayRules' => 'useSpineHolidayRules' ]; /** @@ -235,22 +235,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', + 'annualDecimals' => 'setAnnualDecimals', + 'annualRoundingRule' => 'setAnnualRoundingRule', + 'dailyDecimals' => 'setDailyDecimals', + 'dailyDivisor' => 'setDailyDivisor', 'fullTimeHours' => 'setFullTimeHours', 'fullTimeWeeks' => 'setFullTimeWeeks', - 'salaryFormula' => 'setSalaryFormula', - 'hourlyDivisor' => 'setHourlyDivisor', + 'gradeEffectiveDate' => 'setGradeEffectiveDate', + 'holidayEntitlements' => 'setHolidayEntitlements', 'hourlyDecimals' => 'setHourlyDecimals', - 'dailyDivisor' => 'setDailyDivisor', - 'dailyDecimals' => 'setDailyDecimals', - 'annualDecimals' => 'setAnnualDecimals', - 'annualRoundingRule' => 'setAnnualRoundingRule', + 'hourlyDivisor' => 'setHourlyDivisor', 'incrementRule' => 'setIncrementRule', - 'requiresLondonAllowance' => 'setRequiresLondonAllowance', - 'gradeEffectiveDate' => 'setGradeEffectiveDate', + 'name' => 'setName', 'pointEffectiveDate' => 'setPointEffectiveDate', - 'useSpineHolidayRules' => 'setUseSpineHolidayRules', - 'holidayEntitlements' => 'setHolidayEntitlements' + 'requiresLondonAllowance' => 'setRequiresLondonAllowance', + 'salaryFormula' => 'setSalaryFormula', + 'useSpineHolidayRules' => 'setUseSpineHolidayRules' ]; /** @@ -259,22 +259,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', + 'annualDecimals' => 'getAnnualDecimals', + 'annualRoundingRule' => 'getAnnualRoundingRule', + 'dailyDecimals' => 'getDailyDecimals', + 'dailyDivisor' => 'getDailyDivisor', 'fullTimeHours' => 'getFullTimeHours', 'fullTimeWeeks' => 'getFullTimeWeeks', - 'salaryFormula' => 'getSalaryFormula', - 'hourlyDivisor' => 'getHourlyDivisor', + 'gradeEffectiveDate' => 'getGradeEffectiveDate', + 'holidayEntitlements' => 'getHolidayEntitlements', 'hourlyDecimals' => 'getHourlyDecimals', - 'dailyDivisor' => 'getDailyDivisor', - 'dailyDecimals' => 'getDailyDecimals', - 'annualDecimals' => 'getAnnualDecimals', - 'annualRoundingRule' => 'getAnnualRoundingRule', + 'hourlyDivisor' => 'getHourlyDivisor', 'incrementRule' => 'getIncrementRule', - 'requiresLondonAllowance' => 'getRequiresLondonAllowance', - 'gradeEffectiveDate' => 'getGradeEffectiveDate', + 'name' => 'getName', 'pointEffectiveDate' => 'getPointEffectiveDate', - 'useSpineHolidayRules' => 'getUseSpineHolidayRules', - 'holidayEntitlements' => 'getHolidayEntitlements' + 'requiresLondonAllowance' => 'getRequiresLondonAllowance', + 'salaryFormula' => 'getSalaryFormula', + 'useSpineHolidayRules' => 'getUseSpineHolidayRules' ]; /** @@ -333,22 +333,22 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('annualDecimals', $data ?? [], null); + $this->setIfExists('annualRoundingRule', $data ?? [], null); + $this->setIfExists('dailyDecimals', $data ?? [], null); + $this->setIfExists('dailyDivisor', $data ?? [], null); $this->setIfExists('fullTimeHours', $data ?? [], null); $this->setIfExists('fullTimeWeeks', $data ?? [], null); - $this->setIfExists('salaryFormula', $data ?? [], null); - $this->setIfExists('hourlyDivisor', $data ?? [], null); + $this->setIfExists('gradeEffectiveDate', $data ?? [], null); + $this->setIfExists('holidayEntitlements', $data ?? [], null); $this->setIfExists('hourlyDecimals', $data ?? [], null); - $this->setIfExists('dailyDivisor', $data ?? [], null); - $this->setIfExists('dailyDecimals', $data ?? [], null); - $this->setIfExists('annualDecimals', $data ?? [], null); - $this->setIfExists('annualRoundingRule', $data ?? [], null); + $this->setIfExists('hourlyDivisor', $data ?? [], null); $this->setIfExists('incrementRule', $data ?? [], null); - $this->setIfExists('requiresLondonAllowance', $data ?? [], null); - $this->setIfExists('gradeEffectiveDate', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('pointEffectiveDate', $data ?? [], null); + $this->setIfExists('requiresLondonAllowance', $data ?? [], null); + $this->setIfExists('salaryFormula', $data ?? [], null); $this->setIfExists('useSpineHolidayRules', $data ?? [], null); - $this->setIfExists('holidayEntitlements', $data ?? [], null); } /** @@ -394,285 +394,278 @@ public function valid(): bool /** - * Gets name + * Gets annualDecimals * - * @return string|null + * @return int|null */ - public function getName(): ?string + public function getAnnualDecimals(): ?int { - return $this->container['name']; + return $this->container['annualDecimals']; } /** - * Sets name + * Sets annualDecimals * - * @param string|null $name Name of the Pay Spine + * @param int|null $annualDecimals Number of decimal places to calculate Annual Salaries * * @return $this */ - public function setName(?string $name): static + public function setAnnualDecimals(?int $annualDecimals): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($annualDecimals)) { + throw new InvalidArgumentException('non-nullable annualDecimals cannot be null'); } - $this->container['name'] = $name; + $this->container['annualDecimals'] = $annualDecimals; return $this; } /** - * Gets fullTimeHours + * Gets annualRoundingRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\AnnualRoundingRule|null */ - public function getFullTimeHours(): ?float + public function getAnnualRoundingRule(): ?\SynergiTech\Staffology\Model\AnnualRoundingRule { - return $this->container['fullTimeHours']; + return $this->container['annualRoundingRule']; } /** - * Sets fullTimeHours + * Sets annualRoundingRule * - * @param float|null $fullTimeHours Maximum Full Time Hours on this Pay Spine + * @param \SynergiTech\Staffology\Model\AnnualRoundingRule|null $annualRoundingRule annualRoundingRule * * @return $this */ - public function setFullTimeHours(?float $fullTimeHours): static + public function setAnnualRoundingRule(?\SynergiTech\Staffology\Model\AnnualRoundingRule $annualRoundingRule): static { - if (is_null($fullTimeHours)) { - throw new InvalidArgumentException('non-nullable fullTimeHours cannot be null'); + if (is_null($annualRoundingRule)) { + throw new InvalidArgumentException('non-nullable annualRoundingRule cannot be null'); } - $this->container['fullTimeHours'] = $fullTimeHours; + $this->container['annualRoundingRule'] = $annualRoundingRule; return $this; } /** - * Gets fullTimeWeeks + * Gets dailyDecimals * - * @return float|null + * @return int|null */ - public function getFullTimeWeeks(): ?float + public function getDailyDecimals(): ?int { - return $this->container['fullTimeWeeks']; + return $this->container['dailyDecimals']; } /** - * Sets fullTimeWeeks + * Sets dailyDecimals * - * @param float|null $fullTimeWeeks Maximum Full Time Weeks on this Pay Spine + * @param int|null $dailyDecimals Number of decimal places to calculate Daily Rates * * @return $this */ - public function setFullTimeWeeks(?float $fullTimeWeeks): static + public function setDailyDecimals(?int $dailyDecimals): static { - if (is_null($fullTimeWeeks)) { - throw new InvalidArgumentException('non-nullable fullTimeWeeks cannot be null'); + if (is_null($dailyDecimals)) { + throw new InvalidArgumentException('non-nullable dailyDecimals cannot be null'); } - $this->container['fullTimeWeeks'] = $fullTimeWeeks; + $this->container['dailyDecimals'] = $dailyDecimals; return $this; } /** - * Gets salaryFormula + * Gets dailyDivisor * - * @return string|null + * @return float|null */ - public function getSalaryFormula(): ?string + public function getDailyDivisor(): ?float { - return $this->container['salaryFormula']; + return $this->container['dailyDivisor']; } /** - * Sets salaryFormula + * Sets dailyDivisor * - * @param string|null $salaryFormula Formula used to derive annual salary The salary formula consists of the following elements and Round functions: - PointValue (The value of an individual Spinal Point) - HoursWorked (The hours an employee is contracted to work for in their role) - FTHours (The full time hours specified for an employee in their role) - WeeksWorked (The contracted weeks an employee works in their role) - FTWeeks (The full weeks specified for an employee in their role) Round functions: - ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15. - ROUNDUP(Value) - ROUNDDOWN(Value) - TRUNCATE(Value) For example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" + * @param float|null $dailyDivisor Days used to determine Full time Daily Rate * * @return $this */ - public function setSalaryFormula(?string $salaryFormula): static + public function setDailyDivisor(?float $dailyDivisor): static { - if (is_null($salaryFormula)) { - array_push($this->openAPINullablesSetToNull, 'salaryFormula'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('salaryFormula', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($dailyDivisor)) { + throw new InvalidArgumentException('non-nullable dailyDivisor cannot be null'); } - $this->container['salaryFormula'] = $salaryFormula; + $this->container['dailyDivisor'] = $dailyDivisor; return $this; } /** - * Gets hourlyDivisor + * Gets fullTimeHours * * @return float|null */ - public function getHourlyDivisor(): ?float + public function getFullTimeHours(): ?float { - return $this->container['hourlyDivisor']; + return $this->container['fullTimeHours']; } /** - * Sets hourlyDivisor + * Sets fullTimeHours * - * @param float|null $hourlyDivisor Hours used to determine Hourly Rate + * @param float|null $fullTimeHours Maximum Full Time Hours on this Pay Spine * * @return $this */ - public function setHourlyDivisor(?float $hourlyDivisor): static + public function setFullTimeHours(?float $fullTimeHours): static { - if (is_null($hourlyDivisor)) { - throw new InvalidArgumentException('non-nullable hourlyDivisor cannot be null'); + if (is_null($fullTimeHours)) { + throw new InvalidArgumentException('non-nullable fullTimeHours cannot be null'); } - $this->container['hourlyDivisor'] = $hourlyDivisor; + $this->container['fullTimeHours'] = $fullTimeHours; return $this; } /** - * Gets hourlyDecimals + * Gets fullTimeWeeks * - * @return int|null + * @return float|null */ - public function getHourlyDecimals(): ?int + public function getFullTimeWeeks(): ?float { - return $this->container['hourlyDecimals']; + return $this->container['fullTimeWeeks']; } /** - * Sets hourlyDecimals + * Sets fullTimeWeeks * - * @param int|null $hourlyDecimals Number of decimal places to calculate Hourly Rates + * @param float|null $fullTimeWeeks Maximum Full Time Weeks on this Pay Spine * * @return $this */ - public function setHourlyDecimals(?int $hourlyDecimals): static + public function setFullTimeWeeks(?float $fullTimeWeeks): static { - if (is_null($hourlyDecimals)) { - throw new InvalidArgumentException('non-nullable hourlyDecimals cannot be null'); + if (is_null($fullTimeWeeks)) { + throw new InvalidArgumentException('non-nullable fullTimeWeeks cannot be null'); } - $this->container['hourlyDecimals'] = $hourlyDecimals; + $this->container['fullTimeWeeks'] = $fullTimeWeeks; return $this; } /** - * Gets dailyDivisor + * Gets gradeEffectiveDate * - * @return float|null + * @return \DateTime|null */ - public function getDailyDivisor(): ?float + public function getGradeEffectiveDate(): ?\DateTime { - return $this->container['dailyDivisor']; + return $this->container['gradeEffectiveDate']; } /** - * Sets dailyDivisor + * Sets gradeEffectiveDate * - * @param float|null $dailyDivisor Days used to determine Full time Daily Rate + * @param \DateTime|null $gradeEffectiveDate Effective date for applicable grades * * @return $this */ - public function setDailyDivisor(?float $dailyDivisor): static + public function setGradeEffectiveDate(?\DateTime $gradeEffectiveDate): static { - if (is_null($dailyDivisor)) { - throw new InvalidArgumentException('non-nullable dailyDivisor cannot be null'); + if (is_null($gradeEffectiveDate)) { + throw new InvalidArgumentException('non-nullable gradeEffectiveDate cannot be null'); } - $this->container['dailyDivisor'] = $dailyDivisor; + $this->container['gradeEffectiveDate'] = $gradeEffectiveDate; return $this; } /** - * Gets dailyDecimals + * Gets holidayEntitlements * - * @return int|null + * @return \SynergiTech\Staffology\Model\ContractHolidayEntitlementUpdateRequest[]|null */ - public function getDailyDecimals(): ?int + public function getHolidayEntitlements(): ?array { - return $this->container['dailyDecimals']; + return $this->container['holidayEntitlements']; } /** - * Sets dailyDecimals + * Sets holidayEntitlements * - * @param int|null $dailyDecimals Number of decimal places to calculate Daily Rates + * @param \SynergiTech\Staffology\Model\ContractHolidayEntitlementUpdateRequest[]|null $holidayEntitlements PaySpine Holiday Entitlements * * @return $this */ - public function setDailyDecimals(?int $dailyDecimals): static + public function setHolidayEntitlements(?array $holidayEntitlements): static { - if (is_null($dailyDecimals)) { - throw new InvalidArgumentException('non-nullable dailyDecimals cannot be null'); + if (is_null($holidayEntitlements)) { + array_push($this->openAPINullablesSetToNull, 'holidayEntitlements'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('holidayEntitlements', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['dailyDecimals'] = $dailyDecimals; + $this->container['holidayEntitlements'] = $holidayEntitlements; return $this; } /** - * Gets annualDecimals + * Gets hourlyDecimals * * @return int|null */ - public function getAnnualDecimals(): ?int + public function getHourlyDecimals(): ?int { - return $this->container['annualDecimals']; + return $this->container['hourlyDecimals']; } /** - * Sets annualDecimals + * Sets hourlyDecimals * - * @param int|null $annualDecimals Number of decimal places to calculate Annual Salaries + * @param int|null $hourlyDecimals Number of decimal places to calculate Hourly Rates * * @return $this */ - public function setAnnualDecimals(?int $annualDecimals): static + public function setHourlyDecimals(?int $hourlyDecimals): static { - if (is_null($annualDecimals)) { - throw new InvalidArgumentException('non-nullable annualDecimals cannot be null'); + if (is_null($hourlyDecimals)) { + throw new InvalidArgumentException('non-nullable hourlyDecimals cannot be null'); } - $this->container['annualDecimals'] = $annualDecimals; + $this->container['hourlyDecimals'] = $hourlyDecimals; return $this; } /** - * Gets annualRoundingRule + * Gets hourlyDivisor * - * @return \SynergiTech\Staffology\Model\AnnualRoundingRule|null + * @return float|null */ - public function getAnnualRoundingRule(): ?\SynergiTech\Staffology\Model\AnnualRoundingRule + public function getHourlyDivisor(): ?float { - return $this->container['annualRoundingRule']; + return $this->container['hourlyDivisor']; } /** - * Sets annualRoundingRule + * Sets hourlyDivisor * - * @param \SynergiTech\Staffology\Model\AnnualRoundingRule|null $annualRoundingRule annualRoundingRule + * @param float|null $hourlyDivisor Hours used to determine Hourly Rate * * @return $this */ - public function setAnnualRoundingRule(?\SynergiTech\Staffology\Model\AnnualRoundingRule $annualRoundingRule): static + public function setHourlyDivisor(?float $hourlyDivisor): static { - if (is_null($annualRoundingRule)) { - throw new InvalidArgumentException('non-nullable annualRoundingRule cannot be null'); + if (is_null($hourlyDivisor)) { + throw new InvalidArgumentException('non-nullable hourlyDivisor cannot be null'); } - $this->container['annualRoundingRule'] = $annualRoundingRule; + $this->container['hourlyDivisor'] = $hourlyDivisor; return $this; } @@ -705,143 +698,150 @@ public function setIncrementRule(?\SynergiTech\Staffology\Model\IncrementRule $i } /** - * Gets requiresLondonAllowance + * Gets name * - * @return bool|null + * @return string|null */ - public function getRequiresLondonAllowance(): ?bool + public function getName(): ?string { - return $this->container['requiresLondonAllowance']; + return $this->container['name']; } /** - * Sets requiresLondonAllowance + * Sets name * - * @param bool|null $requiresLondonAllowance Requires LA column to be completed on the spine + * @param string|null $name Name of the Pay Spine * * @return $this */ - public function setRequiresLondonAllowance(?bool $requiresLondonAllowance): static + public function setName(?string $name): static { - if (is_null($requiresLondonAllowance)) { - throw new InvalidArgumentException('non-nullable requiresLondonAllowance cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['requiresLondonAllowance'] = $requiresLondonAllowance; + $this->container['name'] = $name; return $this; } /** - * Gets gradeEffectiveDate + * Gets pointEffectiveDate * * @return \DateTime|null */ - public function getGradeEffectiveDate(): ?\DateTime + public function getPointEffectiveDate(): ?\DateTime { - return $this->container['gradeEffectiveDate']; + return $this->container['pointEffectiveDate']; } /** - * Sets gradeEffectiveDate + * Sets pointEffectiveDate * - * @param \DateTime|null $gradeEffectiveDate Effective date for applicable grades + * @param \DateTime|null $pointEffectiveDate Effective date for applicable spinal points * * @return $this */ - public function setGradeEffectiveDate(?\DateTime $gradeEffectiveDate): static + public function setPointEffectiveDate(?\DateTime $pointEffectiveDate): static { - if (is_null($gradeEffectiveDate)) { - throw new InvalidArgumentException('non-nullable gradeEffectiveDate cannot be null'); + if (is_null($pointEffectiveDate)) { + throw new InvalidArgumentException('non-nullable pointEffectiveDate cannot be null'); } - $this->container['gradeEffectiveDate'] = $gradeEffectiveDate; + $this->container['pointEffectiveDate'] = $pointEffectiveDate; return $this; } /** - * Gets pointEffectiveDate + * Gets requiresLondonAllowance * - * @return \DateTime|null + * @return bool|null */ - public function getPointEffectiveDate(): ?\DateTime + public function getRequiresLondonAllowance(): ?bool { - return $this->container['pointEffectiveDate']; + return $this->container['requiresLondonAllowance']; } /** - * Sets pointEffectiveDate + * Sets requiresLondonAllowance * - * @param \DateTime|null $pointEffectiveDate Effective date for applicable spinal points + * @param bool|null $requiresLondonAllowance Requires LA column to be completed on the spine * * @return $this */ - public function setPointEffectiveDate(?\DateTime $pointEffectiveDate): static + public function setRequiresLondonAllowance(?bool $requiresLondonAllowance): static { - if (is_null($pointEffectiveDate)) { - throw new InvalidArgumentException('non-nullable pointEffectiveDate cannot be null'); + if (is_null($requiresLondonAllowance)) { + throw new InvalidArgumentException('non-nullable requiresLondonAllowance cannot be null'); } - $this->container['pointEffectiveDate'] = $pointEffectiveDate; + $this->container['requiresLondonAllowance'] = $requiresLondonAllowance; return $this; } /** - * Gets useSpineHolidayRules + * Gets salaryFormula * - * @return bool|null + * @return string|null */ - public function getUseSpineHolidayRules(): ?bool + public function getSalaryFormula(): ?string { - return $this->container['useSpineHolidayRules']; + return $this->container['salaryFormula']; } /** - * Sets useSpineHolidayRules + * Sets salaryFormula * - * @param bool|null $useSpineHolidayRules Flag to include holiday entitlements in Payspine (Default false) + * @param string|null $salaryFormula Formula used to derive annual salary The salary formula consists of the following elements and Round functions: - PointValue (The value of an individual Spinal Point) - HoursWorked (The hours an employee is contracted to work for in their role) - FTHours (The full time hours specified for an employee in their role) - WeeksWorked (The contracted weeks an employee works in their role) - FTWeeks (The full weeks specified for an employee in their role) Round functions: - ROUND(Value,decimal places): Round the value to specific decimal places. The maximum value is between 0 and 15. - ROUNDUP(Value) - ROUNDDOWN(Value) - TRUNCATE(Value) For example: \"PointValue * ROUND(HoursWorked * WeeksWorked * (7/365),3) / FTHours\" * * @return $this */ - public function setUseSpineHolidayRules(?bool $useSpineHolidayRules): static + public function setSalaryFormula(?string $salaryFormula): static { - if (is_null($useSpineHolidayRules)) { - throw new InvalidArgumentException('non-nullable useSpineHolidayRules cannot be null'); + if (is_null($salaryFormula)) { + array_push($this->openAPINullablesSetToNull, 'salaryFormula'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('salaryFormula', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useSpineHolidayRules'] = $useSpineHolidayRules; + $this->container['salaryFormula'] = $salaryFormula; return $this; } /** - * Gets holidayEntitlements + * Gets useSpineHolidayRules * - * @return \SynergiTech\Staffology\Model\ContractHolidayEntitlementUpdateRequest[]|null + * @return bool|null */ - public function getHolidayEntitlements(): ?array + public function getUseSpineHolidayRules(): ?bool { - return $this->container['holidayEntitlements']; + return $this->container['useSpineHolidayRules']; } /** - * Sets holidayEntitlements + * Sets useSpineHolidayRules * - * @param \SynergiTech\Staffology\Model\ContractHolidayEntitlementUpdateRequest[]|null $holidayEntitlements PaySpine Holiday Entitlements + * @param bool|null $useSpineHolidayRules Flag to include holiday entitlements in Payspine (Default false) * * @return $this */ - public function setHolidayEntitlements(?array $holidayEntitlements): static + public function setUseSpineHolidayRules(?bool $useSpineHolidayRules): static { - if (is_null($holidayEntitlements)) { - array_push($this->openAPINullablesSetToNull, 'holidayEntitlements'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('holidayEntitlements', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useSpineHolidayRules)) { + throw new InvalidArgumentException('non-nullable useSpineHolidayRules cannot be null'); } - $this->container['holidayEntitlements'] = $holidayEntitlements; + $this->container['useSpineHolidayRules'] = $useSpineHolidayRules; return $this; } diff --git a/src/Model/ContractPaylineAnalysisCategoriesCodes.php b/src/Model/ContractPaylineAnalysisCategoriesCodes.php index e1d3ffd..3f57bf1 100644 --- a/src/Model/ContractPaylineAnalysisCategoriesCodes.php +++ b/src/Model/ContractPaylineAnalysisCategoriesCodes.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -61,8 +61,8 @@ class ContractPaylineAnalysisCategoriesCodes implements ModelInterface, ArrayAcc protected static array $openAPITypes = [ 'analysisCategory' => 'string', 'analysisCategoryCode' => 'string', - 'analysisCategoryId' => 'string', - 'analysisCategoryCodeId' => 'string' + 'analysisCategoryCodeId' => 'string', + 'analysisCategoryId' => 'string' ]; /** @@ -73,8 +73,8 @@ class ContractPaylineAnalysisCategoriesCodes implements ModelInterface, ArrayAcc protected static array $openAPIFormats = [ 'analysisCategory' => null, 'analysisCategoryCode' => null, - 'analysisCategoryId' => 'uuid', - 'analysisCategoryCodeId' => 'uuid' + 'analysisCategoryCodeId' => 'uuid', + 'analysisCategoryId' => 'uuid' ]; /** @@ -85,8 +85,8 @@ class ContractPaylineAnalysisCategoriesCodes implements ModelInterface, ArrayAcc protected static array $openAPINullables = [ 'analysisCategory' => true, 'analysisCategoryCode' => true, - 'analysisCategoryId' => true, - 'analysisCategoryCodeId' => true + 'analysisCategoryCodeId' => true, + 'analysisCategoryId' => true ]; /** @@ -177,8 +177,8 @@ public function isNullableSetToNull(string $property): bool protected static array $attributeMap = [ 'analysisCategory' => 'analysisCategory', 'analysisCategoryCode' => 'analysisCategoryCode', - 'analysisCategoryId' => 'analysisCategoryId', - 'analysisCategoryCodeId' => 'analysisCategoryCodeId' + 'analysisCategoryCodeId' => 'analysisCategoryCodeId', + 'analysisCategoryId' => 'analysisCategoryId' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool protected static array $setters = [ 'analysisCategory' => 'setAnalysisCategory', 'analysisCategoryCode' => 'setAnalysisCategoryCode', - 'analysisCategoryId' => 'setAnalysisCategoryId', - 'analysisCategoryCodeId' => 'setAnalysisCategoryCodeId' + 'analysisCategoryCodeId' => 'setAnalysisCategoryCodeId', + 'analysisCategoryId' => 'setAnalysisCategoryId' ]; /** @@ -201,8 +201,8 @@ public function isNullableSetToNull(string $property): bool protected static array $getters = [ 'analysisCategory' => 'getAnalysisCategory', 'analysisCategoryCode' => 'getAnalysisCategoryCode', - 'analysisCategoryId' => 'getAnalysisCategoryId', - 'analysisCategoryCodeId' => 'getAnalysisCategoryCodeId' + 'analysisCategoryCodeId' => 'getAnalysisCategoryCodeId', + 'analysisCategoryId' => 'getAnalysisCategoryId' ]; /** @@ -263,8 +263,8 @@ public function __construct(?array $data = null) { $this->setIfExists('analysisCategory', $data ?? [], null); $this->setIfExists('analysisCategoryCode', $data ?? [], null); - $this->setIfExists('analysisCategoryId', $data ?? [], null); $this->setIfExists('analysisCategoryCodeId', $data ?? [], null); + $this->setIfExists('analysisCategoryId', $data ?? [], null); } /** @@ -378,69 +378,69 @@ public function setAnalysisCategoryCode(?string $analysisCategoryCode): static } /** - * Gets analysisCategoryId + * Gets analysisCategoryCodeId * * @return string|null */ - public function getAnalysisCategoryId(): ?string + public function getAnalysisCategoryCodeId(): ?string { - return $this->container['analysisCategoryId']; + return $this->container['analysisCategoryCodeId']; } /** - * Sets analysisCategoryId + * Sets analysisCategoryCodeId * - * @param string|null $analysisCategoryId AnalysisCategory Identifier + * @param string|null $analysisCategoryCodeId AnalysisCategoryCode Identifier * * @return $this */ - public function setAnalysisCategoryId(?string $analysisCategoryId): static + public function setAnalysisCategoryCodeId(?string $analysisCategoryCodeId): static { - if (is_null($analysisCategoryId)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryId'); + if (is_null($analysisCategoryCodeId)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodeId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryId', $nullablesSetToNull); + $index = array_search('analysisCategoryCodeId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoryId'] = $analysisCategoryId; + $this->container['analysisCategoryCodeId'] = $analysisCategoryCodeId; return $this; } /** - * Gets analysisCategoryCodeId + * Gets analysisCategoryId * * @return string|null */ - public function getAnalysisCategoryCodeId(): ?string + public function getAnalysisCategoryId(): ?string { - return $this->container['analysisCategoryCodeId']; + return $this->container['analysisCategoryId']; } /** - * Sets analysisCategoryCodeId + * Sets analysisCategoryId * - * @param string|null $analysisCategoryCodeId AnalysisCategoryCode Identifier + * @param string|null $analysisCategoryId AnalysisCategory Identifier * * @return $this */ - public function setAnalysisCategoryCodeId(?string $analysisCategoryCodeId): static + public function setAnalysisCategoryId(?string $analysisCategoryId): static { - if (is_null($analysisCategoryCodeId)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodeId'); + if (is_null($analysisCategoryId)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryCodeId', $nullablesSetToNull); + $index = array_search('analysisCategoryId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoryCodeId'] = $analysisCategoryCodeId; + $this->container['analysisCategoryId'] = $analysisCategoryId; return $this; } diff --git a/src/Model/ContractPaylineRequest0.php b/src/Model/ContractPaylineRequest0.php index 4dca70b..1474b5f 100644 --- a/src/Model/ContractPaylineRequest0.php +++ b/src/Model/ContractPaylineRequest0.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class ContractPaylineRequest implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'analysisCategoryCodeIds' => 'string[]', 'analysisCategoriesCodes' => '\SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]', + 'analysisCategoryCodeIds' => 'string[]', 'annualValue' => 'float', 'autoAdjustForLeave' => 'bool', 'calculateAsWhenPaid' => 'bool', @@ -93,8 +93,8 @@ class ContractPaylineRequest implements ModelInterface, ArrayAccess, JsonSeriali 'percentageOfEffectiveDays' => 'float', 'rate' => 'float', 'roleId' => 'string', - 'spinePoint' => 'string', 'spinalPointId' => 'string', + 'spinePoint' => 'string', 'tags' => 'string[]', 'targetNetToGrossValue' => 'float', 'totalPaidDays' => 'float', @@ -108,8 +108,8 @@ class ContractPaylineRequest implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ - 'analysisCategoryCodeIds' => 'uuid', 'analysisCategoriesCodes' => null, + 'analysisCategoryCodeIds' => 'uuid', 'annualValue' => 'double', 'autoAdjustForLeave' => null, 'calculateAsWhenPaid' => null, @@ -142,8 +142,8 @@ class ContractPaylineRequest implements ModelInterface, ArrayAccess, JsonSeriali 'percentageOfEffectiveDays' => 'double', 'rate' => 'double', 'roleId' => 'uuid', - 'spinePoint' => null, 'spinalPointId' => 'uuid', + 'spinePoint' => null, 'tags' => null, 'targetNetToGrossValue' => 'double', 'totalPaidDays' => 'double', @@ -157,8 +157,8 @@ class ContractPaylineRequest implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ - 'analysisCategoryCodeIds' => true, 'analysisCategoriesCodes' => true, + 'analysisCategoryCodeIds' => true, 'annualValue' => true, 'autoAdjustForLeave' => false, 'calculateAsWhenPaid' => false, @@ -191,8 +191,8 @@ class ContractPaylineRequest implements ModelInterface, ArrayAccess, JsonSeriali 'percentageOfEffectiveDays' => true, 'rate' => true, 'roleId' => true, - 'spinePoint' => true, 'spinalPointId' => true, + 'spinePoint' => true, 'tags' => true, 'targetNetToGrossValue' => true, 'totalPaidDays' => true, @@ -286,8 +286,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'analysisCategoryCodeIds' => 'analysisCategoryCodeIds', 'analysisCategoriesCodes' => 'analysisCategoriesCodes', + 'analysisCategoryCodeIds' => 'analysisCategoryCodeIds', 'annualValue' => 'annualValue', 'autoAdjustForLeave' => 'autoAdjustForLeave', 'calculateAsWhenPaid' => 'calculateAsWhenPaid', @@ -320,8 +320,8 @@ public function isNullableSetToNull(string $property): bool 'percentageOfEffectiveDays' => 'percentageOfEffectiveDays', 'rate' => 'rate', 'roleId' => 'roleId', - 'spinePoint' => 'spinePoint', 'spinalPointId' => 'spinalPointId', + 'spinePoint' => 'spinePoint', 'tags' => 'tags', 'targetNetToGrossValue' => 'targetNetToGrossValue', 'totalPaidDays' => 'totalPaidDays', @@ -335,8 +335,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'analysisCategoryCodeIds' => 'setAnalysisCategoryCodeIds', 'analysisCategoriesCodes' => 'setAnalysisCategoriesCodes', + 'analysisCategoryCodeIds' => 'setAnalysisCategoryCodeIds', 'annualValue' => 'setAnnualValue', 'autoAdjustForLeave' => 'setAutoAdjustForLeave', 'calculateAsWhenPaid' => 'setCalculateAsWhenPaid', @@ -369,8 +369,8 @@ public function isNullableSetToNull(string $property): bool 'percentageOfEffectiveDays' => 'setPercentageOfEffectiveDays', 'rate' => 'setRate', 'roleId' => 'setRoleId', - 'spinePoint' => 'setSpinePoint', 'spinalPointId' => 'setSpinalPointId', + 'spinePoint' => 'setSpinePoint', 'tags' => 'setTags', 'targetNetToGrossValue' => 'setTargetNetToGrossValue', 'totalPaidDays' => 'setTotalPaidDays', @@ -384,8 +384,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'analysisCategoryCodeIds' => 'getAnalysisCategoryCodeIds', 'analysisCategoriesCodes' => 'getAnalysisCategoriesCodes', + 'analysisCategoryCodeIds' => 'getAnalysisCategoryCodeIds', 'annualValue' => 'getAnnualValue', 'autoAdjustForLeave' => 'getAutoAdjustForLeave', 'calculateAsWhenPaid' => 'getCalculateAsWhenPaid', @@ -418,8 +418,8 @@ public function isNullableSetToNull(string $property): bool 'percentageOfEffectiveDays' => 'getPercentageOfEffectiveDays', 'rate' => 'getRate', 'roleId' => 'getRoleId', - 'spinePoint' => 'getSpinePoint', 'spinalPointId' => 'getSpinalPointId', + 'spinePoint' => 'getSpinePoint', 'tags' => 'getTags', 'targetNetToGrossValue' => 'getTargetNetToGrossValue', 'totalPaidDays' => 'getTotalPaidDays', @@ -483,8 +483,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('analysisCategoryCodeIds', $data ?? [], null); $this->setIfExists('analysisCategoriesCodes', $data ?? [], null); + $this->setIfExists('analysisCategoryCodeIds', $data ?? [], null); $this->setIfExists('annualValue', $data ?? [], null); $this->setIfExists('autoAdjustForLeave', $data ?? [], null); $this->setIfExists('calculateAsWhenPaid', $data ?? [], null); @@ -517,8 +517,8 @@ public function __construct(?array $data = null) $this->setIfExists('percentageOfEffectiveDays', $data ?? [], null); $this->setIfExists('rate', $data ?? [], null); $this->setIfExists('roleId', $data ?? [], null); - $this->setIfExists('spinePoint', $data ?? [], null); $this->setIfExists('spinalPointId', $data ?? [], null); + $this->setIfExists('spinePoint', $data ?? [], null); $this->setIfExists('tags', $data ?? [], null); $this->setIfExists('targetNetToGrossValue', $data ?? [], null); $this->setIfExists('totalPaidDays', $data ?? [], null); @@ -569,69 +569,69 @@ public function valid(): bool /** - * Gets analysisCategoryCodeIds + * Gets analysisCategoriesCodes * - * @return string[]|null + * @return \SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]|null */ - public function getAnalysisCategoryCodeIds(): ?array + public function getAnalysisCategoriesCodes(): ?array { - return $this->container['analysisCategoryCodeIds']; + return $this->container['analysisCategoriesCodes']; } /** - * Sets analysisCategoryCodeIds + * Sets analysisCategoriesCodes * - * @param string[]|null $analysisCategoryCodeIds List of analysis category code unique ids. + * @param \SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]|null $analysisCategoriesCodes List of analysis category ids and analysis category code ids. * * @return $this */ - public function setAnalysisCategoryCodeIds(?array $analysisCategoryCodeIds): static + public function setAnalysisCategoriesCodes(?array $analysisCategoriesCodes): static { - if (is_null($analysisCategoryCodeIds)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodeIds'); + if (is_null($analysisCategoriesCodes)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoriesCodes'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryCodeIds', $nullablesSetToNull); + $index = array_search('analysisCategoriesCodes', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoryCodeIds'] = $analysisCategoryCodeIds; + $this->container['analysisCategoriesCodes'] = $analysisCategoriesCodes; return $this; } /** - * Gets analysisCategoriesCodes + * Gets analysisCategoryCodeIds * - * @return \SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]|null + * @return string[]|null */ - public function getAnalysisCategoriesCodes(): ?array + public function getAnalysisCategoryCodeIds(): ?array { - return $this->container['analysisCategoriesCodes']; + return $this->container['analysisCategoryCodeIds']; } /** - * Sets analysisCategoriesCodes + * Sets analysisCategoryCodeIds * - * @param \SynergiTech\Staffology\Model\ContractPaylineAnalysisCategoriesCodes[]|null $analysisCategoriesCodes List of analysis category ids and analysis category code ids. + * @param string[]|null $analysisCategoryCodeIds List of analysis category code unique ids. * * @return $this */ - public function setAnalysisCategoriesCodes(?array $analysisCategoriesCodes): static + public function setAnalysisCategoryCodeIds(?array $analysisCategoryCodeIds): static { - if (is_null($analysisCategoriesCodes)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoriesCodes'); + if (is_null($analysisCategoryCodeIds)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodeIds'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoriesCodes', $nullablesSetToNull); + $index = array_search('analysisCategoryCodeIds', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoriesCodes'] = $analysisCategoriesCodes; + $this->container['analysisCategoryCodeIds'] = $analysisCategoryCodeIds; return $this; } @@ -1662,69 +1662,69 @@ public function setRoleId(?string $roleId): static } /** - * Gets spinePoint + * Gets spinalPointId * * @return string|null */ - public function getSpinePoint(): ?string + public function getSpinalPointId(): ?string { - return $this->container['spinePoint']; + return $this->container['spinalPointId']; } /** - * Sets spinePoint + * Sets spinalPointId * - * @param string|null $spinePoint SpinePoint for imported pay lines + * @param string|null $spinalPointId The Id of the associated spinal point. * * @return $this */ - public function setSpinePoint(?string $spinePoint): static + public function setSpinalPointId(?string $spinalPointId): static { - if (is_null($spinePoint)) { - array_push($this->openAPINullablesSetToNull, 'spinePoint'); + if (is_null($spinalPointId)) { + array_push($this->openAPINullablesSetToNull, 'spinalPointId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('spinePoint', $nullablesSetToNull); + $index = array_search('spinalPointId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['spinePoint'] = $spinePoint; + $this->container['spinalPointId'] = $spinalPointId; return $this; } /** - * Gets spinalPointId + * Gets spinePoint * * @return string|null */ - public function getSpinalPointId(): ?string + public function getSpinePoint(): ?string { - return $this->container['spinalPointId']; + return $this->container['spinePoint']; } /** - * Sets spinalPointId + * Sets spinePoint * - * @param string|null $spinalPointId The Id of the associated spinal point. + * @param string|null $spinePoint SpinePoint for imported pay lines * * @return $this */ - public function setSpinalPointId(?string $spinalPointId): static + public function setSpinePoint(?string $spinePoint): static { - if (is_null($spinalPointId)) { - array_push($this->openAPINullablesSetToNull, 'spinalPointId'); + if (is_null($spinePoint)) { + array_push($this->openAPINullablesSetToNull, 'spinePoint'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('spinalPointId', $nullablesSetToNull); + $index = array_search('spinePoint', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['spinalPointId'] = $spinalPointId; + $this->container['spinePoint'] = $spinePoint; return $this; } diff --git a/src/Model/ContractPaymentImportRequest.php b/src/Model/ContractPaymentImportRequest.php new file mode 100644 index 0000000..f7283a8 --- /dev/null +++ b/src/Model/ContractPaymentImportRequest.php @@ -0,0 +1,1268 @@ + + */ +class ContractPaymentImportRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.PaymentImportRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'amount' => 'float', + 'contributesToBasicPay' => 'bool', + 'costCentre' => 'string', + 'days' => 'float', + 'department' => 'string', + 'description' => 'string', + 'effectiveFrom' => '\DateTime', + 'effectiveTo' => '\DateTime', + 'hours' => 'float', + 'isAlreadyPaid' => 'bool', + 'isAutomaticBackPay' => 'bool', + 'isNetToGross' => 'bool', + 'londonAllowance' => '\SynergiTech\Staffology\Model\LondonAllowanceType', + 'payCode' => 'string', + 'payGrade' => 'string', + 'paySpine' => 'string', + 'payrollCode' => 'string', + 'percentage' => 'float', + 'proRataAdjustments' => 'bool', + 'roleReference' => 'string', + 'spinalPoint' => 'string', + 'treatAsWhenPaid' => 'bool', + 'uniqueId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'amount' => 'double', + 'contributesToBasicPay' => null, + 'costCentre' => null, + 'days' => 'double', + 'department' => null, + 'description' => null, + 'effectiveFrom' => 'date', + 'effectiveTo' => 'date', + 'hours' => 'double', + 'isAlreadyPaid' => null, + 'isAutomaticBackPay' => null, + 'isNetToGross' => null, + 'londonAllowance' => null, + 'payCode' => null, + 'payGrade' => null, + 'paySpine' => null, + 'payrollCode' => null, + 'percentage' => 'double', + 'proRataAdjustments' => null, + 'roleReference' => null, + 'spinalPoint' => null, + 'treatAsWhenPaid' => null, + 'uniqueId' => 'uuid' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'amount' => true, + 'contributesToBasicPay' => false, + 'costCentre' => true, + 'days' => true, + 'department' => true, + 'description' => true, + 'effectiveFrom' => true, + 'effectiveTo' => true, + 'hours' => true, + 'isAlreadyPaid' => false, + 'isAutomaticBackPay' => false, + 'isNetToGross' => false, + 'londonAllowance' => false, + 'payCode' => true, + 'payGrade' => true, + 'paySpine' => true, + 'payrollCode' => true, + 'percentage' => true, + 'proRataAdjustments' => false, + 'roleReference' => true, + 'spinalPoint' => true, + 'treatAsWhenPaid' => false, + 'uniqueId' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'amount' => 'amount', + 'contributesToBasicPay' => 'contributesToBasicPay', + 'costCentre' => 'costCentre', + 'days' => 'days', + 'department' => 'department', + 'description' => 'description', + 'effectiveFrom' => 'effectiveFrom', + 'effectiveTo' => 'effectiveTo', + 'hours' => 'hours', + 'isAlreadyPaid' => 'isAlreadyPaid', + 'isAutomaticBackPay' => 'isAutomaticBackPay', + 'isNetToGross' => 'isNetToGross', + 'londonAllowance' => 'londonAllowance', + 'payCode' => 'payCode', + 'payGrade' => 'payGrade', + 'paySpine' => 'paySpine', + 'payrollCode' => 'payrollCode', + 'percentage' => 'percentage', + 'proRataAdjustments' => 'proRataAdjustments', + 'roleReference' => 'roleReference', + 'spinalPoint' => 'spinalPoint', + 'treatAsWhenPaid' => 'treatAsWhenPaid', + 'uniqueId' => 'uniqueId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'amount' => 'setAmount', + 'contributesToBasicPay' => 'setContributesToBasicPay', + 'costCentre' => 'setCostCentre', + 'days' => 'setDays', + 'department' => 'setDepartment', + 'description' => 'setDescription', + 'effectiveFrom' => 'setEffectiveFrom', + 'effectiveTo' => 'setEffectiveTo', + 'hours' => 'setHours', + 'isAlreadyPaid' => 'setIsAlreadyPaid', + 'isAutomaticBackPay' => 'setIsAutomaticBackPay', + 'isNetToGross' => 'setIsNetToGross', + 'londonAllowance' => 'setLondonAllowance', + 'payCode' => 'setPayCode', + 'payGrade' => 'setPayGrade', + 'paySpine' => 'setPaySpine', + 'payrollCode' => 'setPayrollCode', + 'percentage' => 'setPercentage', + 'proRataAdjustments' => 'setProRataAdjustments', + 'roleReference' => 'setRoleReference', + 'spinalPoint' => 'setSpinalPoint', + 'treatAsWhenPaid' => 'setTreatAsWhenPaid', + 'uniqueId' => 'setUniqueId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'amount' => 'getAmount', + 'contributesToBasicPay' => 'getContributesToBasicPay', + 'costCentre' => 'getCostCentre', + 'days' => 'getDays', + 'department' => 'getDepartment', + 'description' => 'getDescription', + 'effectiveFrom' => 'getEffectiveFrom', + 'effectiveTo' => 'getEffectiveTo', + 'hours' => 'getHours', + 'isAlreadyPaid' => 'getIsAlreadyPaid', + 'isAutomaticBackPay' => 'getIsAutomaticBackPay', + 'isNetToGross' => 'getIsNetToGross', + 'londonAllowance' => 'getLondonAllowance', + 'payCode' => 'getPayCode', + 'payGrade' => 'getPayGrade', + 'paySpine' => 'getPaySpine', + 'payrollCode' => 'getPayrollCode', + 'percentage' => 'getPercentage', + 'proRataAdjustments' => 'getProRataAdjustments', + 'roleReference' => 'getRoleReference', + 'spinalPoint' => 'getSpinalPoint', + 'treatAsWhenPaid' => 'getTreatAsWhenPaid', + 'uniqueId' => 'getUniqueId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('contributesToBasicPay', $data ?? [], null); + $this->setIfExists('costCentre', $data ?? [], null); + $this->setIfExists('days', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('effectiveFrom', $data ?? [], null); + $this->setIfExists('effectiveTo', $data ?? [], null); + $this->setIfExists('hours', $data ?? [], null); + $this->setIfExists('isAlreadyPaid', $data ?? [], null); + $this->setIfExists('isAutomaticBackPay', $data ?? [], null); + $this->setIfExists('isNetToGross', $data ?? [], null); + $this->setIfExists('londonAllowance', $data ?? [], null); + $this->setIfExists('payCode', $data ?? [], null); + $this->setIfExists('payGrade', $data ?? [], null); + $this->setIfExists('paySpine', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('percentage', $data ?? [], null); + $this->setIfExists('proRataAdjustments', $data ?? [], null); + $this->setIfExists('roleReference', $data ?? [], null); + $this->setIfExists('spinalPoint', $data ?? [], null); + $this->setIfExists('treatAsWhenPaid', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets amount + * + * @return float|null + */ + public function getAmount(): ?float + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param float|null $amount The amount regularly paid to the Employee + * + * @return $this + */ + public function setAmount(?float $amount): static + { + if (is_null($amount)) { + array_push($this->openAPINullablesSetToNull, 'amount'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('amount', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets contributesToBasicPay + * + * @return bool|null + */ + public function getContributesToBasicPay(): ?bool + { + return $this->container['contributesToBasicPay']; + } + + /** + * Sets contributesToBasicPay + * + * @param bool|null $contributesToBasicPay ContributesToBasicPay for imported pay lines Only import if 'Effective date salary changes' is enabled + * + * @return $this + */ + public function setContributesToBasicPay(?bool $contributesToBasicPay): static + { + if (is_null($contributesToBasicPay)) { + throw new InvalidArgumentException('non-nullable contributesToBasicPay cannot be null'); + } + $this->container['contributesToBasicPay'] = $contributesToBasicPay; + + return $this; + } + + /** + * Gets costCentre + * + * @return string|null + */ + public function getCostCentre(): ?string + { + return $this->container['costCentre']; + } + + /** + * Sets costCentre + * + * @param string|null $costCentre Associated costcentre of the employee + * + * @return $this + */ + public function setCostCentre(?string $costCentre): static + { + if (is_null($costCentre)) { + array_push($this->openAPINullablesSetToNull, 'costCentre'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('costCentre', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['costCentre'] = $costCentre; + + return $this; + } + + /** + * Gets days + * + * @return float|null + */ + public function getDays(): ?float + { + return $this->container['days']; + } + + /** + * Sets days + * + * @param float|null $days Payment Days + * + * @return $this + */ + public function setDays(?float $days): static + { + if (is_null($days)) { + array_push($this->openAPINullablesSetToNull, 'days'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('days', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['days'] = $days; + + return $this; + } + + /** + * Gets department + * + * @return string|null + */ + public function getDepartment(): ?string + { + return $this->container['department']; + } + + /** + * Sets department + * + * @param string|null $department Associated department of the employee + * + * @return $this + */ + public function setDepartment(?string $department): static + { + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('department', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['department'] = $department; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Description + * + * @return $this + */ + public function setDescription(?string $description): static + { + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('description', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets effectiveFrom + * + * @return \DateTime|null + */ + public function getEffectiveFrom(): ?\DateTime + { + return $this->container['effectiveFrom']; + } + + /** + * Sets effectiveFrom + * + * @param \DateTime|null $effectiveFrom EffectiveFrom date for imported pay lines + * + * @return $this + */ + public function setEffectiveFrom(?\DateTime $effectiveFrom): static + { + if (is_null($effectiveFrom)) { + array_push($this->openAPINullablesSetToNull, 'effectiveFrom'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('effectiveFrom', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['effectiveFrom'] = $effectiveFrom; + + return $this; + } + + /** + * Gets effectiveTo + * + * @return \DateTime|null + */ + public function getEffectiveTo(): ?\DateTime + { + return $this->container['effectiveTo']; + } + + /** + * Sets effectiveTo + * + * @param \DateTime|null $effectiveTo EffectiveTo date for imported pay lines + * + * @return $this + */ + public function setEffectiveTo(?\DateTime $effectiveTo): static + { + if (is_null($effectiveTo)) { + array_push($this->openAPINullablesSetToNull, 'effectiveTo'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('effectiveTo', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['effectiveTo'] = $effectiveTo; + + return $this; + } + + /** + * Gets hours + * + * @return float|null + */ + public function getHours(): ?float + { + return $this->container['hours']; + } + + /** + * Sets hours + * + * @param float|null $hours Payment Hours + * + * @return $this + */ + public function setHours(?float $hours): static + { + if (is_null($hours)) { + array_push($this->openAPINullablesSetToNull, 'hours'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('hours', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['hours'] = $hours; + + return $this; + } + + /** + * Gets isAlreadyPaid + * + * @return bool|null + */ + public function getIsAlreadyPaid(): ?bool + { + return $this->container['isAlreadyPaid']; + } + + /** + * Sets isAlreadyPaid + * + * @param bool|null $isAlreadyPaid IsAlreadyPaid Only import if 'Effective date salary changes' is enabled + * + * @return $this + */ + public function setIsAlreadyPaid(?bool $isAlreadyPaid): static + { + if (is_null($isAlreadyPaid)) { + throw new InvalidArgumentException('non-nullable isAlreadyPaid cannot be null'); + } + $this->container['isAlreadyPaid'] = $isAlreadyPaid; + + return $this; + } + + /** + * Gets isAutomaticBackPay + * + * @return bool|null + */ + public function getIsAutomaticBackPay(): ?bool + { + return $this->container['isAutomaticBackPay']; + } + + /** + * Sets isAutomaticBackPay + * + * @param bool|null $isAutomaticBackPay IsAutomaticBackPay for imported pay lines Only import if 'Effective date salary changes' is enabled + * + * @return $this + */ + public function setIsAutomaticBackPay(?bool $isAutomaticBackPay): static + { + if (is_null($isAutomaticBackPay)) { + throw new InvalidArgumentException('non-nullable isAutomaticBackPay cannot be null'); + } + $this->container['isAutomaticBackPay'] = $isAutomaticBackPay; + + return $this; + } + + /** + * Gets isNetToGross + * + * @return bool|null + */ + public function getIsNetToGross(): ?bool + { + return $this->container['isNetToGross']; + } + + /** + * Sets isNetToGross + * + * @param bool|null $isNetToGross IsNetToGross (True/False) + * + * @return $this + */ + public function setIsNetToGross(?bool $isNetToGross): static + { + if (is_null($isNetToGross)) { + throw new InvalidArgumentException('non-nullable isNetToGross cannot be null'); + } + $this->container['isNetToGross'] = $isNetToGross; + + return $this; + } + + /** + * Gets londonAllowance + * + * @return \SynergiTech\Staffology\Model\LondonAllowanceType|null + */ + public function getLondonAllowance(): ?\SynergiTech\Staffology\Model\LondonAllowanceType + { + return $this->container['londonAllowance']; + } + + /** + * Sets londonAllowance + * + * @param \SynergiTech\Staffology\Model\LondonAllowanceType|null $londonAllowance londonAllowance + * + * @return $this + */ + public function setLondonAllowance(?\SynergiTech\Staffology\Model\LondonAllowanceType $londonAllowance): static + { + if (is_null($londonAllowance)) { + throw new InvalidArgumentException('non-nullable londonAllowance cannot be null'); + } + $this->container['londonAllowance'] = $londonAllowance; + + return $this; + } + + /** + * Gets payCode + * + * @return string|null + */ + public function getPayCode(): ?string + { + return $this->container['payCode']; + } + + /** + * Sets payCode + * + * @param string|null $payCode If you want to override the PayCode used for the Basic Pay then set the code here, otherwise leave this blank and the default will be used. + * + * @return $this + */ + public function setPayCode(?string $payCode): static + { + if (is_null($payCode)) { + array_push($this->openAPINullablesSetToNull, 'payCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payCode'] = $payCode; + + return $this; + } + + /** + * Gets payGrade + * + * @return string|null + */ + public function getPayGrade(): ?string + { + return $this->container['payGrade']; + } + + /** + * Sets payGrade + * + * @param string|null $payGrade PayGrade for imported pay lines Only import if Pay Spines exist + * + * @return $this + */ + public function setPayGrade(?string $payGrade): static + { + if (is_null($payGrade)) { + array_push($this->openAPINullablesSetToNull, 'payGrade'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payGrade', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payGrade'] = $payGrade; + + return $this; + } + + /** + * Gets paySpine + * + * @return string|null + */ + public function getPaySpine(): ?string + { + return $this->container['paySpine']; + } + + /** + * Sets paySpine + * + * @param string|null $paySpine PaySpine for imported pay lines Only import if Pay Spines exist + * + * @return $this + */ + public function setPaySpine(?string $paySpine): static + { + if (is_null($paySpine)) { + array_push($this->openAPINullablesSetToNull, 'paySpine'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('paySpine', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['paySpine'] = $paySpine; + + return $this; + } + + /** + * Gets payrollCode + * + * @return string|null + */ + public function getPayrollCode(): ?string + { + return $this->container['payrollCode']; + } + + /** + * Sets payrollCode + * + * @param string|null $payrollCode The payroll code of the employee to update + * + * @return $this + */ + public function setPayrollCode(?string $payrollCode): static + { + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payrollCode'] = $payrollCode; + + return $this; + } + + /** + * Gets percentage + * + * @return float|null + */ + public function getPercentage(): ?float + { + return $this->container['percentage']; + } + + /** + * Sets percentage + * + * @param float|null $percentage Perentage + * + * @return $this + */ + public function setPercentage(?float $percentage): static + { + if (is_null($percentage)) { + array_push($this->openAPINullablesSetToNull, 'percentage'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('percentage', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['percentage'] = $percentage; + + return $this; + } + + /** + * Gets proRataAdjustments + * + * @return bool|null + */ + public function getProRataAdjustments(): ?bool + { + return $this->container['proRataAdjustments']; + } + + /** + * Sets proRataAdjustments + * + * @param bool|null $proRataAdjustments ProRataAdjustments (True/False) + * + * @return $this + */ + public function setProRataAdjustments(?bool $proRataAdjustments): static + { + if (is_null($proRataAdjustments)) { + throw new InvalidArgumentException('non-nullable proRataAdjustments cannot be null'); + } + $this->container['proRataAdjustments'] = $proRataAdjustments; + + return $this; + } + + /** + * Gets roleReference + * + * @return string|null + */ + public function getRoleReference(): ?string + { + return $this->container['roleReference']; + } + + /** + * Sets roleReference + * + * @param string|null $roleReference This is the unique reference of the Role that the employee is assigned to. Only import if 'Multi-Role Settings' are enabled + * + * @return $this + */ + public function setRoleReference(?string $roleReference): static + { + if (is_null($roleReference)) { + array_push($this->openAPINullablesSetToNull, 'roleReference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('roleReference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['roleReference'] = $roleReference; + + return $this; + } + + /** + * Gets spinalPoint + * + * @return string|null + */ + public function getSpinalPoint(): ?string + { + return $this->container['spinalPoint']; + } + + /** + * Sets spinalPoint + * + * @param string|null $spinalPoint SpinePoint for imported pay lines Only import if Pay Spines exist + * + * @return $this + */ + public function setSpinalPoint(?string $spinalPoint): static + { + if (is_null($spinalPoint)) { + array_push($this->openAPINullablesSetToNull, 'spinalPoint'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('spinalPoint', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['spinalPoint'] = $spinalPoint; + + return $this; + } + + /** + * Gets treatAsWhenPaid + * + * @return bool|null + */ + public function getTreatAsWhenPaid(): ?bool + { + return $this->container['treatAsWhenPaid']; + } + + /** + * Sets treatAsWhenPaid + * + * @param bool|null $treatAsWhenPaid Only import if 'Education settings' are enabled + * + * @return $this + */ + public function setTreatAsWhenPaid(?bool $treatAsWhenPaid): static + { + if (is_null($treatAsWhenPaid)) { + throw new InvalidArgumentException('non-nullable treatAsWhenPaid cannot be null'); + } + $this->container['treatAsWhenPaid'] = $treatAsWhenPaid; + + return $this; + } + + /** + * Gets uniqueId + * + * @return string|null + */ + public function getUniqueId(): ?string + { + return $this->container['uniqueId']; + } + + /** + * Sets uniqueId + * + * @param string|null $uniqueId Optional. If value is provided then update else create payline. + * + * @return $this + */ + public function setUniqueId(?string $uniqueId): static + { + if (is_null($uniqueId)) { + array_push($this->openAPINullablesSetToNull, 'uniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('uniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['uniqueId'] = $uniqueId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractPayrollSquadEmployerRequest.php b/src/Model/ContractPayrollSquadEmployerRequest.php index 9662024..abebf9e 100644 --- a/src/Model/ContractPayrollSquadEmployerRequest.php +++ b/src/Model/ContractPayrollSquadEmployerRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class ContractPayrollSquadEmployerRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPITypes = [ - 'payrollSquadId' => 'string', - 'employerIds' => 'string[]' + 'employerIds' => 'string[]', + 'payrollSquadId' => 'string' ]; /** @@ -69,8 +69,8 @@ class ContractPayrollSquadEmployerRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPIFormats = [ - 'payrollSquadId' => 'uuid', - 'employerIds' => 'uuid' + 'employerIds' => 'uuid', + 'payrollSquadId' => 'uuid' ]; /** @@ -79,8 +79,8 @@ class ContractPayrollSquadEmployerRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPINullables = [ - 'payrollSquadId' => false, - 'employerIds' => true + 'employerIds' => true, + 'payrollSquadId' => false ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollSquadId' => 'payrollSquadId', - 'employerIds' => 'employerIds' + 'employerIds' => 'employerIds', + 'payrollSquadId' => 'payrollSquadId' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollSquadId' => 'setPayrollSquadId', - 'employerIds' => 'setEmployerIds' + 'employerIds' => 'setEmployerIds', + 'payrollSquadId' => 'setPayrollSquadId' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollSquadId' => 'getPayrollSquadId', - 'employerIds' => 'getEmployerIds' + 'employerIds' => 'getEmployerIds', + 'payrollSquadId' => 'getPayrollSquadId' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollSquadId', $data ?? [], null); $this->setIfExists('employerIds', $data ?? [], null); + $this->setIfExists('payrollSquadId', $data ?? [], null); } /** @@ -295,33 +295,6 @@ public function valid(): bool } - /** - * Gets payrollSquadId - * - * @return string|null - */ - public function getPayrollSquadId(): ?string - { - return $this->container['payrollSquadId']; - } - - /** - * Sets payrollSquadId - * - * @param string|null $payrollSquadId UniqueId of Payroll Squad - * - * @return $this - */ - public function setPayrollSquadId(?string $payrollSquadId): static - { - if (is_null($payrollSquadId)) { - throw new InvalidArgumentException('non-nullable payrollSquadId cannot be null'); - } - $this->container['payrollSquadId'] = $payrollSquadId; - - return $this; - } - /** * Gets employerIds * @@ -355,6 +328,33 @@ public function setEmployerIds(?array $employerIds): static return $this; } + + /** + * Gets payrollSquadId + * + * @return string|null + */ + public function getPayrollSquadId(): ?string + { + return $this->container['payrollSquadId']; + } + + /** + * Sets payrollSquadId + * + * @param string|null $payrollSquadId UniqueId of Payroll Squad + * + * @return $this + */ + public function setPayrollSquadId(?string $payrollSquadId): static + { + if (is_null($payrollSquadId)) { + throw new InvalidArgumentException('non-nullable payrollSquadId cannot be null'); + } + $this->container['payrollSquadId'] = $payrollSquadId; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractPayrollSquadEmployerResponse.php b/src/Model/ContractPayrollSquadEmployerResponse.php index 2d770fa..679d2f4 100644 --- a/src/Model/ContractPayrollSquadEmployerResponse.php +++ b/src/Model/ContractPayrollSquadEmployerResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class ContractPayrollSquadEmployerResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'employerId' => 'string' + 'employerId' => 'string', + 'id' => 'string' ]; /** @@ -69,8 +69,8 @@ class ContractPayrollSquadEmployerResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'employerId' => 'uuid' + 'employerId' => 'uuid', + 'id' => 'uuid' ]; /** @@ -79,8 +79,8 @@ class ContractPayrollSquadEmployerResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'employerId' => false + 'employerId' => false, + 'id' => false ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'employerId' => 'employerId' + 'employerId' => 'employerId', + 'id' => 'id' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'employerId' => 'setEmployerId' + 'employerId' => 'setEmployerId', + 'id' => 'setId' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'employerId' => 'getEmployerId' + 'employerId' => 'getEmployerId', + 'id' => 'getId' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('employerId', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); } /** @@ -296,55 +296,55 @@ public function valid(): bool /** - * Gets id + * Gets employerId * * @return string|null */ - public function getId(): ?string + public function getEmployerId(): ?string { - return $this->container['id']; + return $this->container['employerId']; } /** - * Sets id + * Sets employerId * - * @param string|null $id Payroll Squad Employer Id + * @param string|null $employerId Employer Id * * @return $this */ - public function setId(?string $id): static + public function setEmployerId(?string $employerId): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($employerId)) { + throw new InvalidArgumentException('non-nullable employerId cannot be null'); } - $this->container['id'] = $id; + $this->container['employerId'] = $employerId; return $this; } /** - * Gets employerId + * Gets id * * @return string|null */ - public function getEmployerId(): ?string + public function getId(): ?string { - return $this->container['employerId']; + return $this->container['id']; } /** - * Sets employerId + * Sets id * - * @param string|null $employerId Employer Id + * @param string|null $id Payroll Squad Employer Id * * @return $this */ - public function setEmployerId(?string $employerId): static + public function setId(?string $id): static { - if (is_null($employerId)) { - throw new InvalidArgumentException('non-nullable employerId cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['employerId'] = $employerId; + $this->container['id'] = $id; return $this; } diff --git a/src/Model/ContractPayrollSquadMemberRequest.php b/src/Model/ContractPayrollSquadMemberRequest.php index 65ebf47..80e46d1 100644 --- a/src/Model/ContractPayrollSquadMemberRequest.php +++ b/src/Model/ContractPayrollSquadMemberRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractPayrollSquadMemberRequest implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPITypes = [ - 'userId' => 'string', 'payrollSquadId' => 'string', - 'role' => '\SynergiTech\Staffology\Model\UserRole' + 'role' => '\SynergiTech\Staffology\Model\UserRole', + 'userId' => 'string' ]; /** @@ -70,9 +70,9 @@ class ContractPayrollSquadMemberRequest implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPIFormats = [ - 'userId' => 'uuid', 'payrollSquadId' => 'uuid', - 'role' => null + 'role' => null, + 'userId' => 'uuid' ]; /** @@ -81,9 +81,9 @@ class ContractPayrollSquadMemberRequest implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPINullables = [ - 'userId' => false, 'payrollSquadId' => false, - 'role' => false + 'role' => false, + 'userId' => false ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'userId' => 'userId', 'payrollSquadId' => 'payrollSquadId', - 'role' => 'role' + 'role' => 'role', + 'userId' => 'userId' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'userId' => 'setUserId', 'payrollSquadId' => 'setPayrollSquadId', - 'role' => 'setRole' + 'role' => 'setRole', + 'userId' => 'setUserId' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'userId' => 'getUserId', 'payrollSquadId' => 'getPayrollSquadId', - 'role' => 'getRole' + 'role' => 'getRole', + 'userId' => 'getUserId' ]; /** @@ -255,9 +255,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('userId', $data ?? [], null); $this->setIfExists('payrollSquadId', $data ?? [], null); $this->setIfExists('role', $data ?? [], null); + $this->setIfExists('userId', $data ?? [], null); } /** @@ -302,33 +302,6 @@ public function valid(): bool } - /** - * Gets userId - * - * @return string|null - */ - public function getUserId(): ?string - { - return $this->container['userId']; - } - - /** - * Sets userId - * - * @param string|null $userId Payroll Squad Selected UserId - * - * @return $this - */ - public function setUserId(?string $userId): static - { - if (is_null($userId)) { - throw new InvalidArgumentException('non-nullable userId cannot be null'); - } - $this->container['userId'] = $userId; - - return $this; - } - /** * Gets payrollSquadId * @@ -382,6 +355,33 @@ public function setRole(?\SynergiTech\Staffology\Model\UserRole $role): static return $this; } + + /** + * Gets userId + * + * @return string|null + */ + public function getUserId(): ?string + { + return $this->container['userId']; + } + + /** + * Sets userId + * + * @param string|null $userId Payroll Squad Selected UserId + * + * @return $this + */ + public function setUserId(?string $userId): static + { + if (is_null($userId)) { + throw new InvalidArgumentException('non-nullable userId cannot be null'); + } + $this->container['userId'] = $userId; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractPayrollSquadMemberResponse.php b/src/Model/ContractPayrollSquadMemberResponse.php index c038a05..6d07129 100644 --- a/src/Model/ContractPayrollSquadMemberResponse.php +++ b/src/Model/ContractPayrollSquadMemberResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class ContractPayrollSquadMemberResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'userId' => 'string', 'displayName' => 'string', 'emailAddress' => 'string', + 'id' => 'string', 'lastLogin' => '\DateTime', - 'role' => '\SynergiTech\Staffology\Model\UserRole' + 'role' => '\SynergiTech\Staffology\Model\UserRole', + 'userId' => 'string' ]; /** @@ -73,12 +73,12 @@ class ContractPayrollSquadMemberResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'userId' => 'uuid', 'displayName' => null, 'emailAddress' => null, + 'id' => 'uuid', 'lastLogin' => 'date', - 'role' => null + 'role' => null, + 'userId' => 'uuid' ]; /** @@ -87,12 +87,12 @@ class ContractPayrollSquadMemberResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'userId' => false, 'displayName' => true, 'emailAddress' => true, + 'id' => false, 'lastLogin' => true, - 'role' => false + 'role' => false, + 'userId' => false ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'userId' => 'userId', 'displayName' => 'displayName', 'emailAddress' => 'emailAddress', + 'id' => 'id', 'lastLogin' => 'lastLogin', - 'role' => 'role' + 'role' => 'role', + 'userId' => 'userId' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'userId' => 'setUserId', 'displayName' => 'setDisplayName', 'emailAddress' => 'setEmailAddress', + 'id' => 'setId', 'lastLogin' => 'setLastLogin', - 'role' => 'setRole' + 'role' => 'setRole', + 'userId' => 'setUserId' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'userId' => 'getUserId', 'displayName' => 'getDisplayName', 'emailAddress' => 'getEmailAddress', + 'id' => 'getId', 'lastLogin' => 'getLastLogin', - 'role' => 'getRole' + 'role' => 'getRole', + 'userId' => 'getUserId' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('userId', $data ?? [], null); $this->setIfExists('displayName', $data ?? [], null); $this->setIfExists('emailAddress', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('lastLogin', $data ?? [], null); $this->setIfExists('role', $data ?? [], null); + $this->setIfExists('userId', $data ?? [], null); } /** @@ -323,60 +323,6 @@ public function valid(): bool } - /** - * Gets id - * - * @return string|null - */ - public function getId(): ?string - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Payroll Squad Member Identifier - * - * @return $this - */ - public function setId(?string $id): static - { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets userId - * - * @return string|null - */ - public function getUserId(): ?string - { - return $this->container['userId']; - } - - /** - * Sets userId - * - * @param string|null $userId Payroll Squad User Identifier - * - * @return $this - */ - public function setUserId(?string $userId): static - { - if (is_null($userId)) { - throw new InvalidArgumentException('non-nullable userId cannot be null'); - } - $this->container['userId'] = $userId; - - return $this; - } - /** * Gets displayName * @@ -445,6 +391,33 @@ public function setEmailAddress(?string $emailAddress): static return $this; } + /** + * Gets id + * + * @return string|null + */ + public function getId(): ?string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Payroll Squad Member Identifier + * + * @return $this + */ + public function setId(?string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + /** * Gets lastLogin * @@ -505,6 +478,33 @@ public function setRole(?\SynergiTech\Staffology\Model\UserRole $role): static return $this; } + + /** + * Gets userId + * + * @return string|null + */ + public function getUserId(): ?string + { + return $this->container['userId']; + } + + /** + * Sets userId + * + * @param string|null $userId Payroll Squad User Identifier + * + * @return $this + */ + public function setUserId(?string $userId): static + { + if (is_null($userId)) { + throw new InvalidArgumentException('non-nullable userId cannot be null'); + } + $this->container['userId'] = $userId; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractPayrollSquadRequest.php b/src/Model/ContractPayrollSquadRequest.php index e557b31..c7e832c 100644 --- a/src/Model/ContractPayrollSquadRequest.php +++ b/src/Model/ContractPayrollSquadRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class ContractPayrollSquadRequest implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', - 'employerIds' => 'string[]' + 'employerIds' => 'string[]', + 'name' => 'string' ]; /** @@ -69,8 +69,8 @@ class ContractPayrollSquadRequest implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPIFormats = [ - 'name' => null, - 'employerIds' => 'uuid' + 'employerIds' => 'uuid', + 'name' => null ]; /** @@ -79,8 +79,8 @@ class ContractPayrollSquadRequest implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPINullables = [ - 'name' => true, - 'employerIds' => true + 'employerIds' => true, + 'name' => true ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', - 'employerIds' => 'employerIds' + 'employerIds' => 'employerIds', + 'name' => 'name' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', - 'employerIds' => 'setEmployerIds' + 'employerIds' => 'setEmployerIds', + 'name' => 'setName' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', - 'employerIds' => 'getEmployerIds' + 'employerIds' => 'getEmployerIds', + 'name' => 'getName' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('employerIds', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); } /** @@ -296,69 +296,69 @@ public function valid(): bool /** - * Gets name + * Gets employerIds * - * @return string|null + * @return string[]|null */ - public function getName(): ?string + public function getEmployerIds(): ?array { - return $this->container['name']; + return $this->container['employerIds']; } /** - * Sets name + * Sets employerIds * - * @param string|null $name Name of Payroll Squad + * @param string[]|null $employerIds Employer ids of Payroll Squad * * @return $this */ - public function setName(?string $name): static + public function setEmployerIds(?array $employerIds): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($employerIds)) { + array_push($this->openAPINullablesSetToNull, 'employerIds'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('employerIds', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['employerIds'] = $employerIds; return $this; } /** - * Gets employerIds + * Gets name * - * @return string[]|null + * @return string|null */ - public function getEmployerIds(): ?array + public function getName(): ?string { - return $this->container['employerIds']; + return $this->container['name']; } /** - * Sets employerIds + * Sets name * - * @param string[]|null $employerIds Employer ids of Payroll Squad + * @param string|null $name Name of Payroll Squad * * @return $this */ - public function setEmployerIds(?array $employerIds): static + public function setName(?string $name): static { - if (is_null($employerIds)) { - array_push($this->openAPINullablesSetToNull, 'employerIds'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerIds', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employerIds'] = $employerIds; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/ContractPayrollSquadResponse.php b/src/Model/ContractPayrollSquadResponse.php index 740addb..288c97c 100644 --- a/src/Model/ContractPayrollSquadResponse.php +++ b/src/Model/ContractPayrollSquadResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class ContractPayrollSquadResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ + 'employers' => '\SynergiTech\Staffology\Model\ContractEmployerBase[]', 'id' => 'string', - 'tenantId' => 'string', 'members' => '\SynergiTech\Staffology\Model\ContractPayrollSquadMemberResponse[]', - 'employers' => '\SynergiTech\Staffology\Model\ContractEmployerBase[]', - 'name' => 'string' + 'name' => 'string', + 'tenantId' => 'string' ]; /** @@ -72,11 +72,11 @@ class ContractPayrollSquadResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ + 'employers' => null, 'id' => 'uuid', - 'tenantId' => 'uuid', 'members' => null, - 'employers' => null, - 'name' => null + 'name' => null, + 'tenantId' => 'uuid' ]; /** @@ -85,11 +85,11 @@ class ContractPayrollSquadResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ + 'employers' => true, 'id' => false, - 'tenantId' => false, 'members' => true, - 'employers' => true, - 'name' => true + 'name' => true, + 'tenantId' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'employers' => 'employers', 'id' => 'id', - 'tenantId' => 'tenantId', 'members' => 'members', - 'employers' => 'employers', - 'name' => 'name' + 'name' => 'name', + 'tenantId' => 'tenantId' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'employers' => 'setEmployers', 'id' => 'setId', - 'tenantId' => 'setTenantId', 'members' => 'setMembers', - 'employers' => 'setEmployers', - 'name' => 'setName' + 'name' => 'setName', + 'tenantId' => 'setTenantId' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'employers' => 'getEmployers', 'id' => 'getId', - 'tenantId' => 'getTenantId', 'members' => 'getMembers', - 'employers' => 'getEmployers', - 'name' => 'getName' + 'name' => 'getName', + 'tenantId' => 'getTenantId' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('employers', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('tenantId', $data ?? [], null); $this->setIfExists('members', $data ?? [], null); - $this->setIfExists('employers', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('tenantId', $data ?? [], null); } /** @@ -317,55 +317,62 @@ public function valid(): bool /** - * Gets id + * Gets employers * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractEmployerBase[]|null */ - public function getId(): ?string + public function getEmployers(): ?array { - return $this->container['id']; + return $this->container['employers']; } /** - * Sets id + * Sets employers * - * @param string|null $id Payroll Squad Identifier + * @param \SynergiTech\Staffology\Model\ContractEmployerBase[]|null $employers List of all Employers * * @return $this */ - public function setId(?string $id): static + public function setEmployers(?array $employers): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($employers)) { + array_push($this->openAPINullablesSetToNull, 'employers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['employers'] = $employers; return $this; } /** - * Gets tenantId + * Gets id * * @return string|null */ - public function getTenantId(): ?string + public function getId(): ?string { - return $this->container['tenantId']; + return $this->container['id']; } /** - * Sets tenantId + * Sets id * - * @param string|null $tenantId Current Tenant Id + * @param string|null $id Payroll Squad Identifier * * @return $this */ - public function setTenantId(?string $tenantId): static + public function setId(?string $id): static { - if (is_null($tenantId)) { - throw new InvalidArgumentException('non-nullable tenantId cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['tenantId'] = $tenantId; + $this->container['id'] = $id; return $this; } @@ -405,69 +412,62 @@ public function setMembers(?array $members): static } /** - * Gets employers + * Gets name * - * @return \SynergiTech\Staffology\Model\ContractEmployerBase[]|null + * @return string|null */ - public function getEmployers(): ?array + public function getName(): ?string { - return $this->container['employers']; + return $this->container['name']; } /** - * Sets employers + * Sets name * - * @param \SynergiTech\Staffology\Model\ContractEmployerBase[]|null $employers List of all Employers + * @param string|null $name Name of Payroll Squad * * @return $this */ - public function setEmployers(?array $employers): static + public function setName(?string $name): static { - if (is_null($employers)) { - array_push($this->openAPINullablesSetToNull, 'employers'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employers', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employers'] = $employers; + $this->container['name'] = $name; return $this; } /** - * Gets name + * Gets tenantId * * @return string|null */ - public function getName(): ?string + public function getTenantId(): ?string { - return $this->container['name']; + return $this->container['tenantId']; } /** - * Sets name + * Sets tenantId * - * @param string|null $name Name of Payroll Squad + * @param string|null $tenantId Current Tenant Id * * @return $this */ - public function setName(?string $name): static + public function setTenantId(?string $tenantId): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($tenantId)) { + throw new InvalidArgumentException('non-nullable tenantId cannot be null'); } - $this->container['name'] = $name; + $this->container['tenantId'] = $tenantId; return $this; } diff --git a/src/Model/ContractPendingLettersCountResponse.php b/src/Model/ContractPendingLettersCountResponse.php index 5675903..ebd15e0 100644 --- a/src/Model/ContractPendingLettersCountResponse.php +++ b/src/Model/ContractPendingLettersCountResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractPensionAdministratorRequest.php b/src/Model/ContractPensionAdministratorRequest.php index afe1cfb..a04af47 100644 --- a/src/Model/ContractPensionAdministratorRequest.php +++ b/src/Model/ContractPensionAdministratorRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractPensionAdministratorRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPITypes = [ + 'address' => '\SynergiTech\Staffology\Model\ContractAddress', + 'email' => 'string', 'id' => 'string', 'name' => 'string', - 'email' => 'string', - 'address' => '\SynergiTech\Staffology\Model\ContractAddress', 'telephone' => 'string' ]; @@ -72,10 +72,10 @@ class ContractPensionAdministratorRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPIFormats = [ + 'address' => null, + 'email' => null, 'id' => 'uuid', 'name' => null, - 'email' => null, - 'address' => null, 'telephone' => null ]; @@ -85,10 +85,10 @@ class ContractPensionAdministratorRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPINullables = [ + 'address' => false, + 'email' => true, 'id' => false, 'name' => true, - 'email' => true, - 'address' => false, 'telephone' => true ]; @@ -178,10 +178,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'address' => 'address', + 'email' => 'email', 'id' => 'id', 'name' => 'name', - 'email' => 'email', - 'address' => 'address', 'telephone' => 'telephone' ]; @@ -191,10 +191,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'address' => 'setAddress', + 'email' => 'setEmail', 'id' => 'setId', 'name' => 'setName', - 'email' => 'setEmail', - 'address' => 'setAddress', 'telephone' => 'setTelephone' ]; @@ -204,10 +204,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'address' => 'getAddress', + 'email' => 'getEmail', 'id' => 'getId', 'name' => 'getName', - 'email' => 'getEmail', - 'address' => 'getAddress', 'telephone' => 'getTelephone' ]; @@ -267,10 +267,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('address', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('email', $data ?? [], null); - $this->setIfExists('address', $data ?? [], null); $this->setIfExists('telephone', $data ?? [], null); } @@ -317,123 +317,123 @@ public function valid(): bool /** - * Gets id + * Gets address * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractAddress|null */ - public function getId(): ?string + public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress { - return $this->container['id']; + return $this->container['address']; } /** - * Sets id + * Sets address * - * @param string|null $id id + * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address * * @return $this */ - public function setId(?string $id): static + public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($address)) { + throw new InvalidArgumentException('non-nullable address cannot be null'); } - $this->container['id'] = $id; + $this->container['address'] = $address; return $this; } /** - * Gets name + * Gets email * * @return string|null */ - public function getName(): ?string + public function getEmail(): ?string { - return $this->container['name']; + return $this->container['email']; } /** - * Sets name + * Sets email * - * @param string|null $name name + * @param string|null $email email * * @return $this */ - public function setName(?string $name): static + public function setEmail(?string $email): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($email)) { + array_push($this->openAPINullablesSetToNull, 'email'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('email', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['email'] = $email; return $this; } /** - * Gets email + * Gets id * * @return string|null */ - public function getEmail(): ?string + public function getId(): ?string { - return $this->container['email']; + return $this->container['id']; } /** - * Sets email + * Sets id * - * @param string|null $email email + * @param string|null $id id * * @return $this */ - public function setEmail(?string $email): static + public function setId(?string $id): static { - if (is_null($email)) { - array_push($this->openAPINullablesSetToNull, 'email'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('email', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['email'] = $email; + $this->container['id'] = $id; return $this; } /** - * Gets address + * Gets name * - * @return \SynergiTech\Staffology\Model\ContractAddress|null + * @return string|null */ - public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress + public function getName(): ?string { - return $this->container['address']; + return $this->container['name']; } /** - * Sets address + * Sets name * - * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address + * @param string|null $name name * * @return $this */ - public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static + public function setName(?string $name): static { - if (is_null($address)) { - throw new InvalidArgumentException('non-nullable address cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['address'] = $address; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/ContractPensionAdministratorResponse.php b/src/Model/ContractPensionAdministratorResponse.php index 9d906c3..f55f4e7 100644 --- a/src/Model/ContractPensionAdministratorResponse.php +++ b/src/Model/ContractPensionAdministratorResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractPensionAdministratorResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ + 'address' => '\SynergiTech\Staffology\Model\ContractAddress', + 'email' => 'string', 'id' => 'string', 'name' => 'string', - 'email' => 'string', - 'address' => '\SynergiTech\Staffology\Model\ContractAddress', 'telephone' => 'string' ]; @@ -72,10 +72,10 @@ class ContractPensionAdministratorResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ + 'address' => null, + 'email' => null, 'id' => 'uuid', 'name' => null, - 'email' => null, - 'address' => null, 'telephone' => null ]; @@ -85,10 +85,10 @@ class ContractPensionAdministratorResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ + 'address' => false, + 'email' => true, 'id' => false, 'name' => true, - 'email' => true, - 'address' => false, 'telephone' => true ]; @@ -178,10 +178,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'address' => 'address', + 'email' => 'email', 'id' => 'id', 'name' => 'name', - 'email' => 'email', - 'address' => 'address', 'telephone' => 'telephone' ]; @@ -191,10 +191,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'address' => 'setAddress', + 'email' => 'setEmail', 'id' => 'setId', 'name' => 'setName', - 'email' => 'setEmail', - 'address' => 'setAddress', 'telephone' => 'setTelephone' ]; @@ -204,10 +204,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'address' => 'getAddress', + 'email' => 'getEmail', 'id' => 'getId', 'name' => 'getName', - 'email' => 'getEmail', - 'address' => 'getAddress', 'telephone' => 'getTelephone' ]; @@ -267,10 +267,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('address', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('email', $data ?? [], null); - $this->setIfExists('address', $data ?? [], null); $this->setIfExists('telephone', $data ?? [], null); } @@ -317,123 +317,123 @@ public function valid(): bool /** - * Gets id + * Gets address * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractAddress|null */ - public function getId(): ?string + public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress { - return $this->container['id']; + return $this->container['address']; } /** - * Sets id + * Sets address * - * @param string|null $id id + * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address * * @return $this */ - public function setId(?string $id): static + public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($address)) { + throw new InvalidArgumentException('non-nullable address cannot be null'); } - $this->container['id'] = $id; + $this->container['address'] = $address; return $this; } /** - * Gets name + * Gets email * * @return string|null */ - public function getName(): ?string + public function getEmail(): ?string { - return $this->container['name']; + return $this->container['email']; } /** - * Sets name + * Sets email * - * @param string|null $name name + * @param string|null $email email * * @return $this */ - public function setName(?string $name): static + public function setEmail(?string $email): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($email)) { + array_push($this->openAPINullablesSetToNull, 'email'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('email', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['email'] = $email; return $this; } /** - * Gets email + * Gets id * * @return string|null */ - public function getEmail(): ?string + public function getId(): ?string { - return $this->container['email']; + return $this->container['id']; } /** - * Sets email + * Sets id * - * @param string|null $email email + * @param string|null $id id * * @return $this */ - public function setEmail(?string $email): static + public function setId(?string $id): static { - if (is_null($email)) { - array_push($this->openAPINullablesSetToNull, 'email'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('email', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['email'] = $email; + $this->container['id'] = $id; return $this; } /** - * Gets address + * Gets name * - * @return \SynergiTech\Staffology\Model\ContractAddress|null + * @return string|null */ - public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress + public function getName(): ?string { - return $this->container['address']; + return $this->container['name']; } /** - * Sets address + * Sets name * - * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address + * @param string|null $name name * * @return $this */ - public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static + public function setName(?string $name): static { - if (is_null($address)) { - throw new InvalidArgumentException('non-nullable address cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['address'] = $address; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/ContractPensionProviderRequest.php b/src/Model/ContractPensionProviderRequest.php index 63a1463..a6b558b 100644 --- a/src/Model/ContractPensionProviderRequest.php +++ b/src/Model/ContractPensionProviderRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,25 +59,25 @@ class ContractPensionProviderRequest implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'name' => 'string', 'accountNo' => 'string', - 'portal' => 'string', - 'website' => 'string', 'address' => '\SynergiTech\Staffology\Model\ContractAddress', - 'telephone' => 'string', - 'papdisVersion' => '\SynergiTech\Staffology\Model\PapdisVersion', - 'papdisProviderId' => 'string', - 'papdisEmployerId' => 'string', 'csvFormat' => '\SynergiTech\Staffology\Model\PensionCsvFormat', 'excludeNilPaidFromContributions' => 'bool', - 'payPeriodDateAdjustment' => 'int', + 'id' => 'string', 'miscBoolean1' => 'bool', 'miscBoolean2' => 'bool', 'miscString1' => 'string', 'miscString2' => 'string', + 'name' => 'string', 'optOutWindow' => 'int', - 'optOutWindowIsMonths' => 'bool' + 'optOutWindowIsMonths' => 'bool', + 'papdisEmployerId' => 'string', + 'papdisProviderId' => 'string', + 'papdisVersion' => '\SynergiTech\Staffology\Model\PapdisVersion', + 'payPeriodDateAdjustment' => 'int', + 'portal' => 'string', + 'telephone' => 'string', + 'website' => 'string' ]; /** @@ -86,25 +86,25 @@ class ContractPensionProviderRequest implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'name' => null, 'accountNo' => null, - 'portal' => null, - 'website' => null, 'address' => null, - 'telephone' => null, - 'papdisVersion' => null, - 'papdisProviderId' => null, - 'papdisEmployerId' => null, 'csvFormat' => null, 'excludeNilPaidFromContributions' => null, - 'payPeriodDateAdjustment' => 'int32', + 'id' => 'uuid', 'miscBoolean1' => null, 'miscBoolean2' => null, 'miscString1' => null, 'miscString2' => null, + 'name' => null, 'optOutWindow' => 'int32', - 'optOutWindowIsMonths' => null + 'optOutWindowIsMonths' => null, + 'papdisEmployerId' => null, + 'papdisProviderId' => null, + 'papdisVersion' => null, + 'payPeriodDateAdjustment' => 'int32', + 'portal' => null, + 'telephone' => null, + 'website' => null ]; /** @@ -113,25 +113,25 @@ class ContractPensionProviderRequest implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'name' => true, 'accountNo' => true, - 'portal' => true, - 'website' => true, 'address' => false, - 'telephone' => true, - 'papdisVersion' => false, - 'papdisProviderId' => true, - 'papdisEmployerId' => true, 'csvFormat' => false, 'excludeNilPaidFromContributions' => false, - 'payPeriodDateAdjustment' => false, + 'id' => false, 'miscBoolean1' => false, 'miscBoolean2' => false, 'miscString1' => true, 'miscString2' => true, + 'name' => true, 'optOutWindow' => false, - 'optOutWindowIsMonths' => false + 'optOutWindowIsMonths' => false, + 'papdisEmployerId' => true, + 'papdisProviderId' => true, + 'papdisVersion' => false, + 'payPeriodDateAdjustment' => false, + 'portal' => true, + 'telephone' => true, + 'website' => true ]; /** @@ -220,25 +220,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'name' => 'name', 'accountNo' => 'accountNo', - 'portal' => 'portal', - 'website' => 'website', 'address' => 'address', - 'telephone' => 'telephone', - 'papdisVersion' => 'papdisVersion', - 'papdisProviderId' => 'papdisProviderId', - 'papdisEmployerId' => 'papdisEmployerId', 'csvFormat' => 'csvFormat', 'excludeNilPaidFromContributions' => 'excludeNilPaidFromContributions', - 'payPeriodDateAdjustment' => 'payPeriodDateAdjustment', + 'id' => 'id', 'miscBoolean1' => 'miscBoolean1', 'miscBoolean2' => 'miscBoolean2', 'miscString1' => 'miscString1', 'miscString2' => 'miscString2', + 'name' => 'name', 'optOutWindow' => 'optOutWindow', - 'optOutWindowIsMonths' => 'optOutWindowIsMonths' + 'optOutWindowIsMonths' => 'optOutWindowIsMonths', + 'papdisEmployerId' => 'papdisEmployerId', + 'papdisProviderId' => 'papdisProviderId', + 'papdisVersion' => 'papdisVersion', + 'payPeriodDateAdjustment' => 'payPeriodDateAdjustment', + 'portal' => 'portal', + 'telephone' => 'telephone', + 'website' => 'website' ]; /** @@ -247,25 +247,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'name' => 'setName', 'accountNo' => 'setAccountNo', - 'portal' => 'setPortal', - 'website' => 'setWebsite', 'address' => 'setAddress', - 'telephone' => 'setTelephone', - 'papdisVersion' => 'setPapdisVersion', - 'papdisProviderId' => 'setPapdisProviderId', - 'papdisEmployerId' => 'setPapdisEmployerId', 'csvFormat' => 'setCsvFormat', 'excludeNilPaidFromContributions' => 'setExcludeNilPaidFromContributions', - 'payPeriodDateAdjustment' => 'setPayPeriodDateAdjustment', + 'id' => 'setId', 'miscBoolean1' => 'setMiscBoolean1', 'miscBoolean2' => 'setMiscBoolean2', 'miscString1' => 'setMiscString1', 'miscString2' => 'setMiscString2', + 'name' => 'setName', 'optOutWindow' => 'setOptOutWindow', - 'optOutWindowIsMonths' => 'setOptOutWindowIsMonths' + 'optOutWindowIsMonths' => 'setOptOutWindowIsMonths', + 'papdisEmployerId' => 'setPapdisEmployerId', + 'papdisProviderId' => 'setPapdisProviderId', + 'papdisVersion' => 'setPapdisVersion', + 'payPeriodDateAdjustment' => 'setPayPeriodDateAdjustment', + 'portal' => 'setPortal', + 'telephone' => 'setTelephone', + 'website' => 'setWebsite' ]; /** @@ -274,25 +274,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'name' => 'getName', 'accountNo' => 'getAccountNo', - 'portal' => 'getPortal', - 'website' => 'getWebsite', 'address' => 'getAddress', - 'telephone' => 'getTelephone', - 'papdisVersion' => 'getPapdisVersion', - 'papdisProviderId' => 'getPapdisProviderId', - 'papdisEmployerId' => 'getPapdisEmployerId', 'csvFormat' => 'getCsvFormat', 'excludeNilPaidFromContributions' => 'getExcludeNilPaidFromContributions', - 'payPeriodDateAdjustment' => 'getPayPeriodDateAdjustment', + 'id' => 'getId', 'miscBoolean1' => 'getMiscBoolean1', 'miscBoolean2' => 'getMiscBoolean2', 'miscString1' => 'getMiscString1', 'miscString2' => 'getMiscString2', + 'name' => 'getName', 'optOutWindow' => 'getOptOutWindow', - 'optOutWindowIsMonths' => 'getOptOutWindowIsMonths' + 'optOutWindowIsMonths' => 'getOptOutWindowIsMonths', + 'papdisEmployerId' => 'getPapdisEmployerId', + 'papdisProviderId' => 'getPapdisProviderId', + 'papdisVersion' => 'getPapdisVersion', + 'payPeriodDateAdjustment' => 'getPayPeriodDateAdjustment', + 'portal' => 'getPortal', + 'telephone' => 'getTelephone', + 'website' => 'getWebsite' ]; /** @@ -351,25 +351,25 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('accountNo', $data ?? [], null); - $this->setIfExists('portal', $data ?? [], null); - $this->setIfExists('website', $data ?? [], null); $this->setIfExists('address', $data ?? [], null); - $this->setIfExists('telephone', $data ?? [], null); - $this->setIfExists('papdisVersion', $data ?? [], null); - $this->setIfExists('papdisProviderId', $data ?? [], null); - $this->setIfExists('papdisEmployerId', $data ?? [], null); $this->setIfExists('csvFormat', $data ?? [], null); $this->setIfExists('excludeNilPaidFromContributions', $data ?? [], null); - $this->setIfExists('payPeriodDateAdjustment', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('miscBoolean1', $data ?? [], null); $this->setIfExists('miscBoolean2', $data ?? [], null); $this->setIfExists('miscString1', $data ?? [], null); $this->setIfExists('miscString2', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('optOutWindow', $data ?? [], null); $this->setIfExists('optOutWindowIsMonths', $data ?? [], null); + $this->setIfExists('papdisEmployerId', $data ?? [], null); + $this->setIfExists('papdisProviderId', $data ?? [], null); + $this->setIfExists('papdisVersion', $data ?? [], null); + $this->setIfExists('payPeriodDateAdjustment', $data ?? [], null); + $this->setIfExists('portal', $data ?? [], null); + $this->setIfExists('telephone', $data ?? [], null); + $this->setIfExists('website', $data ?? [], null); } /** @@ -415,577 +415,577 @@ public function valid(): bool /** - * Gets id + * Gets accountNo * * @return string|null */ - public function getId(): ?string + public function getAccountNo(): ?string { - return $this->container['id']; + return $this->container['accountNo']; } /** - * Sets id + * Sets accountNo * - * @param string|null $id id + * @param string|null $accountNo accountNo * * @return $this */ - public function setId(?string $id): static + public function setAccountNo(?string $accountNo): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($accountNo)) { + array_push($this->openAPINullablesSetToNull, 'accountNo'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountNo', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['accountNo'] = $accountNo; return $this; } /** - * Gets name + * Gets address * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractAddress|null */ - public function getName(): ?string + public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress { - return $this->container['name']; + return $this->container['address']; } /** - * Sets name + * Sets address * - * @param string|null $name name + * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address * * @return $this */ - public function setName(?string $name): static + public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($address)) { + throw new InvalidArgumentException('non-nullable address cannot be null'); } - $this->container['name'] = $name; + $this->container['address'] = $address; return $this; } /** - * Gets accountNo + * Gets csvFormat * - * @return string|null + * @return \SynergiTech\Staffology\Model\PensionCsvFormat|null */ - public function getAccountNo(): ?string + public function getCsvFormat(): ?\SynergiTech\Staffology\Model\PensionCsvFormat { - return $this->container['accountNo']; + return $this->container['csvFormat']; } /** - * Sets accountNo + * Sets csvFormat * - * @param string|null $accountNo accountNo + * @param \SynergiTech\Staffology\Model\PensionCsvFormat|null $csvFormat csvFormat * * @return $this */ - public function setAccountNo(?string $accountNo): static + public function setCsvFormat(?\SynergiTech\Staffology\Model\PensionCsvFormat $csvFormat): static { - if (is_null($accountNo)) { - array_push($this->openAPINullablesSetToNull, 'accountNo'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountNo', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($csvFormat)) { + throw new InvalidArgumentException('non-nullable csvFormat cannot be null'); } - $this->container['accountNo'] = $accountNo; + $this->container['csvFormat'] = $csvFormat; return $this; } /** - * Gets portal + * Gets excludeNilPaidFromContributions * - * @return string|null + * @return bool|null */ - public function getPortal(): ?string + public function getExcludeNilPaidFromContributions(): ?bool { - return $this->container['portal']; + return $this->container['excludeNilPaidFromContributions']; } /** - * Sets portal + * Sets excludeNilPaidFromContributions * - * @param string|null $portal portal + * @param bool|null $excludeNilPaidFromContributions If we're sending contributions to an external provider then we'll include all employees that were on the payrun. If you want to exclude employees that don't have any contributions to report then set this to true. * * @return $this */ - public function setPortal(?string $portal): static + public function setExcludeNilPaidFromContributions(?bool $excludeNilPaidFromContributions): static { - if (is_null($portal)) { - array_push($this->openAPINullablesSetToNull, 'portal'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('portal', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($excludeNilPaidFromContributions)) { + throw new InvalidArgumentException('non-nullable excludeNilPaidFromContributions cannot be null'); } - $this->container['portal'] = $portal; + $this->container['excludeNilPaidFromContributions'] = $excludeNilPaidFromContributions; return $this; } /** - * Gets website + * Gets id * * @return string|null */ - public function getWebsite(): ?string + public function getId(): ?string { - return $this->container['website']; + return $this->container['id']; } /** - * Sets website + * Sets id * - * @param string|null $website website + * @param string|null $id id * * @return $this */ - public function setWebsite(?string $website): static + public function setId(?string $id): static { - if (is_null($website)) { - array_push($this->openAPINullablesSetToNull, 'website'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('website', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['website'] = $website; + $this->container['id'] = $id; return $this; } /** - * Gets address + * Gets miscBoolean1 * - * @return \SynergiTech\Staffology\Model\ContractAddress|null + * @return bool|null */ - public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress + public function getMiscBoolean1(): ?bool { - return $this->container['address']; + return $this->container['miscBoolean1']; } /** - * Sets address + * Sets miscBoolean1 * - * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address + * @param bool|null $miscBoolean1 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\" * * @return $this */ - public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static + public function setMiscBoolean1(?bool $miscBoolean1): static { - if (is_null($address)) { - throw new InvalidArgumentException('non-nullable address cannot be null'); + if (is_null($miscBoolean1)) { + throw new InvalidArgumentException('non-nullable miscBoolean1 cannot be null'); } - $this->container['address'] = $address; + $this->container['miscBoolean1'] = $miscBoolean1; return $this; } /** - * Gets telephone + * Gets miscBoolean2 * - * @return string|null + * @return bool|null */ - public function getTelephone(): ?string + public function getMiscBoolean2(): ?bool { - return $this->container['telephone']; + return $this->container['miscBoolean2']; } /** - * Sets telephone + * Sets miscBoolean2 * - * @param string|null $telephone telephone + * @param bool|null $miscBoolean2 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not to approve payments after submitting contributions * * @return $this */ - public function setTelephone(?string $telephone): static + public function setMiscBoolean2(?bool $miscBoolean2): static { - if (is_null($telephone)) { - array_push($this->openAPINullablesSetToNull, 'telephone'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('telephone', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($miscBoolean2)) { + throw new InvalidArgumentException('non-nullable miscBoolean2 cannot be null'); } - $this->container['telephone'] = $telephone; + $this->container['miscBoolean2'] = $miscBoolean2; return $this; } /** - * Gets papdisVersion + * Gets miscString1 * - * @return \SynergiTech\Staffology\Model\PapdisVersion|null + * @return string|null */ - public function getPapdisVersion(): ?\SynergiTech\Staffology\Model\PapdisVersion + public function getMiscString1(): ?string { - return $this->container['papdisVersion']; + return $this->container['miscString1']; } /** - * Sets papdisVersion + * Sets miscString1 * - * @param \SynergiTech\Staffology\Model\PapdisVersion|null $papdisVersion papdisVersion + * @param string|null $miscString1 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it dictates the PaymentSource. * * @return $this */ - public function setPapdisVersion(?\SynergiTech\Staffology\Model\PapdisVersion $papdisVersion): static + public function setMiscString1(?string $miscString1): static { - if (is_null($papdisVersion)) { - throw new InvalidArgumentException('non-nullable papdisVersion cannot be null'); + if (is_null($miscString1)) { + array_push($this->openAPINullablesSetToNull, 'miscString1'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('miscString1', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['papdisVersion'] = $papdisVersion; + $this->container['miscString1'] = $miscString1; return $this; } /** - * Gets papdisProviderId + * Gets miscString2 * * @return string|null */ - public function getPapdisProviderId(): ?string + public function getMiscString2(): ?string { - return $this->container['papdisProviderId']; + return $this->container['miscString2']; } /** - * Sets papdisProviderId + * Sets miscString2 * - * @param string|null $papdisProviderId papdisProviderId + * @param string|null $miscString2 This field has different uses dependent on the ExternalDataProvider, if any. * * @return $this */ - public function setPapdisProviderId(?string $papdisProviderId): static + public function setMiscString2(?string $miscString2): static { - if (is_null($papdisProviderId)) { - array_push($this->openAPINullablesSetToNull, 'papdisProviderId'); + if (is_null($miscString2)) { + array_push($this->openAPINullablesSetToNull, 'miscString2'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisProviderId', $nullablesSetToNull); + $index = array_search('miscString2', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['papdisProviderId'] = $papdisProviderId; + $this->container['miscString2'] = $miscString2; return $this; } /** - * Gets papdisEmployerId + * Gets name * * @return string|null */ - public function getPapdisEmployerId(): ?string + public function getName(): ?string { - return $this->container['papdisEmployerId']; + return $this->container['name']; } /** - * Sets papdisEmployerId + * Sets name * - * @param string|null $papdisEmployerId papdisEmployerId + * @param string|null $name name * * @return $this */ - public function setPapdisEmployerId(?string $papdisEmployerId): static + public function setName(?string $name): static { - if (is_null($papdisEmployerId)) { - array_push($this->openAPINullablesSetToNull, 'papdisEmployerId'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisEmployerId', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['papdisEmployerId'] = $papdisEmployerId; + $this->container['name'] = $name; return $this; } /** - * Gets csvFormat + * Gets optOutWindow * - * @return \SynergiTech\Staffology\Model\PensionCsvFormat|null + * @return int|null */ - public function getCsvFormat(): ?\SynergiTech\Staffology\Model\PensionCsvFormat + public function getOptOutWindow(): ?int { - return $this->container['csvFormat']; + return $this->container['optOutWindow']; } /** - * Sets csvFormat + * Sets optOutWindow * - * @param \SynergiTech\Staffology\Model\PensionCsvFormat|null $csvFormat csvFormat + * @param int|null $optOutWindow The number of days or months that an employee has to Opt out after being enrolled * * @return $this */ - public function setCsvFormat(?\SynergiTech\Staffology\Model\PensionCsvFormat $csvFormat): static + public function setOptOutWindow(?int $optOutWindow): static { - if (is_null($csvFormat)) { - throw new InvalidArgumentException('non-nullable csvFormat cannot be null'); + if (is_null($optOutWindow)) { + throw new InvalidArgumentException('non-nullable optOutWindow cannot be null'); } - $this->container['csvFormat'] = $csvFormat; + $this->container['optOutWindow'] = $optOutWindow; return $this; } /** - * Gets excludeNilPaidFromContributions + * Gets optOutWindowIsMonths * * @return bool|null */ - public function getExcludeNilPaidFromContributions(): ?bool + public function getOptOutWindowIsMonths(): ?bool { - return $this->container['excludeNilPaidFromContributions']; + return $this->container['optOutWindowIsMonths']; } /** - * Sets excludeNilPaidFromContributions + * Sets optOutWindowIsMonths * - * @param bool|null $excludeNilPaidFromContributions If we're sending contributions to an external provider then we'll include all employees that were on the payrun. If you want to exclude employees that don't have any contributions to report then set this to true. + * @param bool|null $optOutWindowIsMonths Determines whether the value given for OptOutWindow is in Months (true) or days (false) * * @return $this */ - public function setExcludeNilPaidFromContributions(?bool $excludeNilPaidFromContributions): static + public function setOptOutWindowIsMonths(?bool $optOutWindowIsMonths): static { - if (is_null($excludeNilPaidFromContributions)) { - throw new InvalidArgumentException('non-nullable excludeNilPaidFromContributions cannot be null'); + if (is_null($optOutWindowIsMonths)) { + throw new InvalidArgumentException('non-nullable optOutWindowIsMonths cannot be null'); } - $this->container['excludeNilPaidFromContributions'] = $excludeNilPaidFromContributions; + $this->container['optOutWindowIsMonths'] = $optOutWindowIsMonths; return $this; } /** - * Gets payPeriodDateAdjustment + * Gets papdisEmployerId * - * @return int|null + * @return string|null */ - public function getPayPeriodDateAdjustment(): ?int + public function getPapdisEmployerId(): ?string { - return $this->container['payPeriodDateAdjustment']; + return $this->container['papdisEmployerId']; } /** - * Sets payPeriodDateAdjustment + * Sets papdisEmployerId * - * @param int|null $payPeriodDateAdjustment If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here. A negative value of will move the date back in time. + * @param string|null $papdisEmployerId papdisEmployerId * * @return $this */ - public function setPayPeriodDateAdjustment(?int $payPeriodDateAdjustment): static + public function setPapdisEmployerId(?string $papdisEmployerId): static { - if (is_null($payPeriodDateAdjustment)) { - throw new InvalidArgumentException('non-nullable payPeriodDateAdjustment cannot be null'); + if (is_null($papdisEmployerId)) { + array_push($this->openAPINullablesSetToNull, 'papdisEmployerId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('papdisEmployerId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriodDateAdjustment'] = $payPeriodDateAdjustment; + $this->container['papdisEmployerId'] = $papdisEmployerId; return $this; } /** - * Gets miscBoolean1 + * Gets papdisProviderId * - * @return bool|null + * @return string|null */ - public function getMiscBoolean1(): ?bool + public function getPapdisProviderId(): ?string { - return $this->container['miscBoolean1']; + return $this->container['papdisProviderId']; } /** - * Sets miscBoolean1 + * Sets papdisProviderId * - * @param bool|null $miscBoolean1 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\" + * @param string|null $papdisProviderId papdisProviderId * * @return $this */ - public function setMiscBoolean1(?bool $miscBoolean1): static + public function setPapdisProviderId(?string $papdisProviderId): static { - if (is_null($miscBoolean1)) { - throw new InvalidArgumentException('non-nullable miscBoolean1 cannot be null'); + if (is_null($papdisProviderId)) { + array_push($this->openAPINullablesSetToNull, 'papdisProviderId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('papdisProviderId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['miscBoolean1'] = $miscBoolean1; + $this->container['papdisProviderId'] = $papdisProviderId; return $this; } /** - * Gets miscBoolean2 + * Gets papdisVersion * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PapdisVersion|null */ - public function getMiscBoolean2(): ?bool + public function getPapdisVersion(): ?\SynergiTech\Staffology\Model\PapdisVersion { - return $this->container['miscBoolean2']; + return $this->container['papdisVersion']; } /** - * Sets miscBoolean2 + * Sets papdisVersion * - * @param bool|null $miscBoolean2 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not to approve payments after submitting contributions + * @param \SynergiTech\Staffology\Model\PapdisVersion|null $papdisVersion papdisVersion * * @return $this */ - public function setMiscBoolean2(?bool $miscBoolean2): static + public function setPapdisVersion(?\SynergiTech\Staffology\Model\PapdisVersion $papdisVersion): static { - if (is_null($miscBoolean2)) { - throw new InvalidArgumentException('non-nullable miscBoolean2 cannot be null'); + if (is_null($papdisVersion)) { + throw new InvalidArgumentException('non-nullable papdisVersion cannot be null'); } - $this->container['miscBoolean2'] = $miscBoolean2; + $this->container['papdisVersion'] = $papdisVersion; return $this; } /** - * Gets miscString1 + * Gets payPeriodDateAdjustment * - * @return string|null + * @return int|null */ - public function getMiscString1(): ?string + public function getPayPeriodDateAdjustment(): ?int { - return $this->container['miscString1']; + return $this->container['payPeriodDateAdjustment']; } /** - * Sets miscString1 + * Sets payPeriodDateAdjustment * - * @param string|null $miscString1 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it dictates the PaymentSource. + * @param int|null $payPeriodDateAdjustment If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here. A negative value of will move the date back in time. * * @return $this */ - public function setMiscString1(?string $miscString1): static + public function setPayPeriodDateAdjustment(?int $payPeriodDateAdjustment): static { - if (is_null($miscString1)) { - array_push($this->openAPINullablesSetToNull, 'miscString1'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('miscString1', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payPeriodDateAdjustment)) { + throw new InvalidArgumentException('non-nullable payPeriodDateAdjustment cannot be null'); } - $this->container['miscString1'] = $miscString1; + $this->container['payPeriodDateAdjustment'] = $payPeriodDateAdjustment; return $this; } /** - * Gets miscString2 + * Gets portal * * @return string|null */ - public function getMiscString2(): ?string + public function getPortal(): ?string { - return $this->container['miscString2']; + return $this->container['portal']; } /** - * Sets miscString2 + * Sets portal * - * @param string|null $miscString2 This field has different uses dependent on the ExternalDataProvider, if any. + * @param string|null $portal portal * * @return $this */ - public function setMiscString2(?string $miscString2): static + public function setPortal(?string $portal): static { - if (is_null($miscString2)) { - array_push($this->openAPINullablesSetToNull, 'miscString2'); + if (is_null($portal)) { + array_push($this->openAPINullablesSetToNull, 'portal'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('miscString2', $nullablesSetToNull); + $index = array_search('portal', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['miscString2'] = $miscString2; + $this->container['portal'] = $portal; return $this; } /** - * Gets optOutWindow + * Gets telephone * - * @return int|null + * @return string|null */ - public function getOptOutWindow(): ?int + public function getTelephone(): ?string { - return $this->container['optOutWindow']; + return $this->container['telephone']; } /** - * Sets optOutWindow + * Sets telephone * - * @param int|null $optOutWindow The number of days or months that an employee has to Opt out after being enrolled + * @param string|null $telephone telephone * * @return $this */ - public function setOptOutWindow(?int $optOutWindow): static + public function setTelephone(?string $telephone): static { - if (is_null($optOutWindow)) { - throw new InvalidArgumentException('non-nullable optOutWindow cannot be null'); + if (is_null($telephone)) { + array_push($this->openAPINullablesSetToNull, 'telephone'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('telephone', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['optOutWindow'] = $optOutWindow; + $this->container['telephone'] = $telephone; return $this; } /** - * Gets optOutWindowIsMonths + * Gets website * - * @return bool|null + * @return string|null */ - public function getOptOutWindowIsMonths(): ?bool + public function getWebsite(): ?string { - return $this->container['optOutWindowIsMonths']; + return $this->container['website']; } /** - * Sets optOutWindowIsMonths + * Sets website * - * @param bool|null $optOutWindowIsMonths Determines whether the value given for OptOutWindow is in Months (true) or days (false) + * @param string|null $website website * * @return $this */ - public function setOptOutWindowIsMonths(?bool $optOutWindowIsMonths): static + public function setWebsite(?string $website): static { - if (is_null($optOutWindowIsMonths)) { - throw new InvalidArgumentException('non-nullable optOutWindowIsMonths cannot be null'); + if (is_null($website)) { + array_push($this->openAPINullablesSetToNull, 'website'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('website', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['optOutWindowIsMonths'] = $optOutWindowIsMonths; + $this->container['website'] = $website; return $this; } diff --git a/src/Model/ContractPensionProviderResponse.php b/src/Model/ContractPensionProviderResponse.php index 1f52a20..a71c950 100644 --- a/src/Model/ContractPensionProviderResponse.php +++ b/src/Model/ContractPensionProviderResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,25 +59,25 @@ class ContractPensionProviderResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'name' => 'string', 'accountNo' => 'string', - 'portal' => 'string', - 'website' => 'string', 'address' => '\SynergiTech\Staffology\Model\ContractAddress', - 'telephone' => 'string', - 'papdisVersion' => '\SynergiTech\Staffology\Model\PapdisVersion', - 'papdisProviderId' => 'string', - 'papdisEmployerId' => 'string', 'csvFormat' => '\SynergiTech\Staffology\Model\PensionCsvFormat', 'excludeNilPaidFromContributions' => 'bool', - 'payPeriodDateAdjustment' => 'int', + 'id' => 'string', 'miscBoolean1' => 'bool', 'miscBoolean2' => 'bool', 'miscString1' => 'string', 'miscString2' => 'string', + 'name' => 'string', 'optOutWindow' => 'int', - 'optOutWindowIsMonths' => 'bool' + 'optOutWindowIsMonths' => 'bool', + 'papdisEmployerId' => 'string', + 'papdisProviderId' => 'string', + 'papdisVersion' => '\SynergiTech\Staffology\Model\PapdisVersion', + 'payPeriodDateAdjustment' => 'int', + 'portal' => 'string', + 'telephone' => 'string', + 'website' => 'string' ]; /** @@ -86,25 +86,25 @@ class ContractPensionProviderResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'name' => null, 'accountNo' => null, - 'portal' => null, - 'website' => null, 'address' => null, - 'telephone' => null, - 'papdisVersion' => null, - 'papdisProviderId' => null, - 'papdisEmployerId' => null, 'csvFormat' => null, 'excludeNilPaidFromContributions' => null, - 'payPeriodDateAdjustment' => 'int32', + 'id' => 'uuid', 'miscBoolean1' => null, 'miscBoolean2' => null, 'miscString1' => null, 'miscString2' => null, + 'name' => null, 'optOutWindow' => 'int32', - 'optOutWindowIsMonths' => null + 'optOutWindowIsMonths' => null, + 'papdisEmployerId' => null, + 'papdisProviderId' => null, + 'papdisVersion' => null, + 'payPeriodDateAdjustment' => 'int32', + 'portal' => null, + 'telephone' => null, + 'website' => null ]; /** @@ -113,25 +113,25 @@ class ContractPensionProviderResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'name' => true, 'accountNo' => true, - 'portal' => true, - 'website' => true, 'address' => false, - 'telephone' => true, - 'papdisVersion' => false, - 'papdisProviderId' => true, - 'papdisEmployerId' => true, 'csvFormat' => false, 'excludeNilPaidFromContributions' => false, - 'payPeriodDateAdjustment' => false, + 'id' => false, 'miscBoolean1' => false, 'miscBoolean2' => false, 'miscString1' => true, 'miscString2' => true, + 'name' => true, 'optOutWindow' => false, - 'optOutWindowIsMonths' => false + 'optOutWindowIsMonths' => false, + 'papdisEmployerId' => true, + 'papdisProviderId' => true, + 'papdisVersion' => false, + 'payPeriodDateAdjustment' => false, + 'portal' => true, + 'telephone' => true, + 'website' => true ]; /** @@ -220,25 +220,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'name' => 'name', 'accountNo' => 'accountNo', - 'portal' => 'portal', - 'website' => 'website', 'address' => 'address', - 'telephone' => 'telephone', - 'papdisVersion' => 'papdisVersion', - 'papdisProviderId' => 'papdisProviderId', - 'papdisEmployerId' => 'papdisEmployerId', 'csvFormat' => 'csvFormat', 'excludeNilPaidFromContributions' => 'excludeNilPaidFromContributions', - 'payPeriodDateAdjustment' => 'payPeriodDateAdjustment', + 'id' => 'id', 'miscBoolean1' => 'miscBoolean1', 'miscBoolean2' => 'miscBoolean2', 'miscString1' => 'miscString1', 'miscString2' => 'miscString2', + 'name' => 'name', 'optOutWindow' => 'optOutWindow', - 'optOutWindowIsMonths' => 'optOutWindowIsMonths' + 'optOutWindowIsMonths' => 'optOutWindowIsMonths', + 'papdisEmployerId' => 'papdisEmployerId', + 'papdisProviderId' => 'papdisProviderId', + 'papdisVersion' => 'papdisVersion', + 'payPeriodDateAdjustment' => 'payPeriodDateAdjustment', + 'portal' => 'portal', + 'telephone' => 'telephone', + 'website' => 'website' ]; /** @@ -247,25 +247,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'name' => 'setName', 'accountNo' => 'setAccountNo', - 'portal' => 'setPortal', - 'website' => 'setWebsite', 'address' => 'setAddress', - 'telephone' => 'setTelephone', - 'papdisVersion' => 'setPapdisVersion', - 'papdisProviderId' => 'setPapdisProviderId', - 'papdisEmployerId' => 'setPapdisEmployerId', 'csvFormat' => 'setCsvFormat', 'excludeNilPaidFromContributions' => 'setExcludeNilPaidFromContributions', - 'payPeriodDateAdjustment' => 'setPayPeriodDateAdjustment', + 'id' => 'setId', 'miscBoolean1' => 'setMiscBoolean1', 'miscBoolean2' => 'setMiscBoolean2', 'miscString1' => 'setMiscString1', 'miscString2' => 'setMiscString2', + 'name' => 'setName', 'optOutWindow' => 'setOptOutWindow', - 'optOutWindowIsMonths' => 'setOptOutWindowIsMonths' + 'optOutWindowIsMonths' => 'setOptOutWindowIsMonths', + 'papdisEmployerId' => 'setPapdisEmployerId', + 'papdisProviderId' => 'setPapdisProviderId', + 'papdisVersion' => 'setPapdisVersion', + 'payPeriodDateAdjustment' => 'setPayPeriodDateAdjustment', + 'portal' => 'setPortal', + 'telephone' => 'setTelephone', + 'website' => 'setWebsite' ]; /** @@ -274,25 +274,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'name' => 'getName', 'accountNo' => 'getAccountNo', - 'portal' => 'getPortal', - 'website' => 'getWebsite', 'address' => 'getAddress', - 'telephone' => 'getTelephone', - 'papdisVersion' => 'getPapdisVersion', - 'papdisProviderId' => 'getPapdisProviderId', - 'papdisEmployerId' => 'getPapdisEmployerId', 'csvFormat' => 'getCsvFormat', 'excludeNilPaidFromContributions' => 'getExcludeNilPaidFromContributions', - 'payPeriodDateAdjustment' => 'getPayPeriodDateAdjustment', + 'id' => 'getId', 'miscBoolean1' => 'getMiscBoolean1', 'miscBoolean2' => 'getMiscBoolean2', 'miscString1' => 'getMiscString1', 'miscString2' => 'getMiscString2', + 'name' => 'getName', 'optOutWindow' => 'getOptOutWindow', - 'optOutWindowIsMonths' => 'getOptOutWindowIsMonths' + 'optOutWindowIsMonths' => 'getOptOutWindowIsMonths', + 'papdisEmployerId' => 'getPapdisEmployerId', + 'papdisProviderId' => 'getPapdisProviderId', + 'papdisVersion' => 'getPapdisVersion', + 'payPeriodDateAdjustment' => 'getPayPeriodDateAdjustment', + 'portal' => 'getPortal', + 'telephone' => 'getTelephone', + 'website' => 'getWebsite' ]; /** @@ -351,25 +351,25 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('accountNo', $data ?? [], null); - $this->setIfExists('portal', $data ?? [], null); - $this->setIfExists('website', $data ?? [], null); $this->setIfExists('address', $data ?? [], null); - $this->setIfExists('telephone', $data ?? [], null); - $this->setIfExists('papdisVersion', $data ?? [], null); - $this->setIfExists('papdisProviderId', $data ?? [], null); - $this->setIfExists('papdisEmployerId', $data ?? [], null); $this->setIfExists('csvFormat', $data ?? [], null); $this->setIfExists('excludeNilPaidFromContributions', $data ?? [], null); - $this->setIfExists('payPeriodDateAdjustment', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('miscBoolean1', $data ?? [], null); $this->setIfExists('miscBoolean2', $data ?? [], null); $this->setIfExists('miscString1', $data ?? [], null); $this->setIfExists('miscString2', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('optOutWindow', $data ?? [], null); $this->setIfExists('optOutWindowIsMonths', $data ?? [], null); + $this->setIfExists('papdisEmployerId', $data ?? [], null); + $this->setIfExists('papdisProviderId', $data ?? [], null); + $this->setIfExists('papdisVersion', $data ?? [], null); + $this->setIfExists('payPeriodDateAdjustment', $data ?? [], null); + $this->setIfExists('portal', $data ?? [], null); + $this->setIfExists('telephone', $data ?? [], null); + $this->setIfExists('website', $data ?? [], null); } /** @@ -415,577 +415,577 @@ public function valid(): bool /** - * Gets id + * Gets accountNo * * @return string|null */ - public function getId(): ?string + public function getAccountNo(): ?string { - return $this->container['id']; + return $this->container['accountNo']; } /** - * Sets id + * Sets accountNo * - * @param string|null $id id + * @param string|null $accountNo accountNo * * @return $this */ - public function setId(?string $id): static + public function setAccountNo(?string $accountNo): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($accountNo)) { + array_push($this->openAPINullablesSetToNull, 'accountNo'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountNo', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['accountNo'] = $accountNo; return $this; } /** - * Gets name + * Gets address * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractAddress|null */ - public function getName(): ?string + public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress { - return $this->container['name']; + return $this->container['address']; } /** - * Sets name + * Sets address * - * @param string|null $name name + * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address * * @return $this */ - public function setName(?string $name): static + public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($address)) { + throw new InvalidArgumentException('non-nullable address cannot be null'); } - $this->container['name'] = $name; + $this->container['address'] = $address; return $this; } /** - * Gets accountNo + * Gets csvFormat * - * @return string|null + * @return \SynergiTech\Staffology\Model\PensionCsvFormat|null */ - public function getAccountNo(): ?string + public function getCsvFormat(): ?\SynergiTech\Staffology\Model\PensionCsvFormat { - return $this->container['accountNo']; + return $this->container['csvFormat']; } /** - * Sets accountNo + * Sets csvFormat * - * @param string|null $accountNo accountNo + * @param \SynergiTech\Staffology\Model\PensionCsvFormat|null $csvFormat csvFormat * * @return $this */ - public function setAccountNo(?string $accountNo): static + public function setCsvFormat(?\SynergiTech\Staffology\Model\PensionCsvFormat $csvFormat): static { - if (is_null($accountNo)) { - array_push($this->openAPINullablesSetToNull, 'accountNo'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountNo', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($csvFormat)) { + throw new InvalidArgumentException('non-nullable csvFormat cannot be null'); } - $this->container['accountNo'] = $accountNo; + $this->container['csvFormat'] = $csvFormat; return $this; } /** - * Gets portal + * Gets excludeNilPaidFromContributions * - * @return string|null + * @return bool|null */ - public function getPortal(): ?string + public function getExcludeNilPaidFromContributions(): ?bool { - return $this->container['portal']; + return $this->container['excludeNilPaidFromContributions']; } /** - * Sets portal + * Sets excludeNilPaidFromContributions * - * @param string|null $portal portal + * @param bool|null $excludeNilPaidFromContributions If we're sending contributions to an external provider then we'll include all employees that were on the payrun. If you want to exclude employees that don't have any contributions to report then set this to true. * * @return $this */ - public function setPortal(?string $portal): static + public function setExcludeNilPaidFromContributions(?bool $excludeNilPaidFromContributions): static { - if (is_null($portal)) { - array_push($this->openAPINullablesSetToNull, 'portal'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('portal', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($excludeNilPaidFromContributions)) { + throw new InvalidArgumentException('non-nullable excludeNilPaidFromContributions cannot be null'); } - $this->container['portal'] = $portal; + $this->container['excludeNilPaidFromContributions'] = $excludeNilPaidFromContributions; return $this; } /** - * Gets website + * Gets id * * @return string|null */ - public function getWebsite(): ?string + public function getId(): ?string { - return $this->container['website']; + return $this->container['id']; } /** - * Sets website + * Sets id * - * @param string|null $website website + * @param string|null $id id * * @return $this */ - public function setWebsite(?string $website): static + public function setId(?string $id): static { - if (is_null($website)) { - array_push($this->openAPINullablesSetToNull, 'website'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('website', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['website'] = $website; + $this->container['id'] = $id; return $this; } /** - * Gets address + * Gets miscBoolean1 * - * @return \SynergiTech\Staffology\Model\ContractAddress|null + * @return bool|null */ - public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress + public function getMiscBoolean1(): ?bool { - return $this->container['address']; + return $this->container['miscBoolean1']; } /** - * Sets address + * Sets miscBoolean1 * - * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address + * @param bool|null $miscBoolean1 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\" * * @return $this */ - public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static + public function setMiscBoolean1(?bool $miscBoolean1): static { - if (is_null($address)) { - throw new InvalidArgumentException('non-nullable address cannot be null'); + if (is_null($miscBoolean1)) { + throw new InvalidArgumentException('non-nullable miscBoolean1 cannot be null'); } - $this->container['address'] = $address; + $this->container['miscBoolean1'] = $miscBoolean1; return $this; } /** - * Gets telephone + * Gets miscBoolean2 * - * @return string|null + * @return bool|null */ - public function getTelephone(): ?string + public function getMiscBoolean2(): ?bool { - return $this->container['telephone']; + return $this->container['miscBoolean2']; } /** - * Sets telephone + * Sets miscBoolean2 * - * @param string|null $telephone telephone + * @param bool|null $miscBoolean2 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not to approve payments after submitting contributions * * @return $this */ - public function setTelephone(?string $telephone): static + public function setMiscBoolean2(?bool $miscBoolean2): static { - if (is_null($telephone)) { - array_push($this->openAPINullablesSetToNull, 'telephone'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('telephone', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($miscBoolean2)) { + throw new InvalidArgumentException('non-nullable miscBoolean2 cannot be null'); } - $this->container['telephone'] = $telephone; + $this->container['miscBoolean2'] = $miscBoolean2; return $this; } /** - * Gets papdisVersion + * Gets miscString1 * - * @return \SynergiTech\Staffology\Model\PapdisVersion|null + * @return string|null */ - public function getPapdisVersion(): ?\SynergiTech\Staffology\Model\PapdisVersion + public function getMiscString1(): ?string { - return $this->container['papdisVersion']; + return $this->container['miscString1']; } /** - * Sets papdisVersion + * Sets miscString1 * - * @param \SynergiTech\Staffology\Model\PapdisVersion|null $papdisVersion papdisVersion + * @param string|null $miscString1 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it dictates the PaymentSource. * * @return $this */ - public function setPapdisVersion(?\SynergiTech\Staffology\Model\PapdisVersion $papdisVersion): static + public function setMiscString1(?string $miscString1): static { - if (is_null($papdisVersion)) { - throw new InvalidArgumentException('non-nullable papdisVersion cannot be null'); + if (is_null($miscString1)) { + array_push($this->openAPINullablesSetToNull, 'miscString1'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('miscString1', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['papdisVersion'] = $papdisVersion; + $this->container['miscString1'] = $miscString1; return $this; } /** - * Gets papdisProviderId + * Gets miscString2 * * @return string|null */ - public function getPapdisProviderId(): ?string + public function getMiscString2(): ?string { - return $this->container['papdisProviderId']; + return $this->container['miscString2']; } /** - * Sets papdisProviderId + * Sets miscString2 * - * @param string|null $papdisProviderId papdisProviderId + * @param string|null $miscString2 This field has different uses dependent on the ExternalDataProvider, if any. * * @return $this */ - public function setPapdisProviderId(?string $papdisProviderId): static + public function setMiscString2(?string $miscString2): static { - if (is_null($papdisProviderId)) { - array_push($this->openAPINullablesSetToNull, 'papdisProviderId'); + if (is_null($miscString2)) { + array_push($this->openAPINullablesSetToNull, 'miscString2'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisProviderId', $nullablesSetToNull); + $index = array_search('miscString2', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['papdisProviderId'] = $papdisProviderId; + $this->container['miscString2'] = $miscString2; return $this; } /** - * Gets papdisEmployerId + * Gets name * * @return string|null */ - public function getPapdisEmployerId(): ?string + public function getName(): ?string { - return $this->container['papdisEmployerId']; + return $this->container['name']; } /** - * Sets papdisEmployerId + * Sets name * - * @param string|null $papdisEmployerId papdisEmployerId + * @param string|null $name name * * @return $this */ - public function setPapdisEmployerId(?string $papdisEmployerId): static + public function setName(?string $name): static { - if (is_null($papdisEmployerId)) { - array_push($this->openAPINullablesSetToNull, 'papdisEmployerId'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisEmployerId', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['papdisEmployerId'] = $papdisEmployerId; + $this->container['name'] = $name; return $this; } /** - * Gets csvFormat + * Gets optOutWindow * - * @return \SynergiTech\Staffology\Model\PensionCsvFormat|null + * @return int|null */ - public function getCsvFormat(): ?\SynergiTech\Staffology\Model\PensionCsvFormat + public function getOptOutWindow(): ?int { - return $this->container['csvFormat']; + return $this->container['optOutWindow']; } /** - * Sets csvFormat + * Sets optOutWindow * - * @param \SynergiTech\Staffology\Model\PensionCsvFormat|null $csvFormat csvFormat + * @param int|null $optOutWindow The number of days or months that an employee has to Opt out after being enrolled * * @return $this */ - public function setCsvFormat(?\SynergiTech\Staffology\Model\PensionCsvFormat $csvFormat): static + public function setOptOutWindow(?int $optOutWindow): static { - if (is_null($csvFormat)) { - throw new InvalidArgumentException('non-nullable csvFormat cannot be null'); + if (is_null($optOutWindow)) { + throw new InvalidArgumentException('non-nullable optOutWindow cannot be null'); } - $this->container['csvFormat'] = $csvFormat; + $this->container['optOutWindow'] = $optOutWindow; return $this; } /** - * Gets excludeNilPaidFromContributions + * Gets optOutWindowIsMonths * * @return bool|null */ - public function getExcludeNilPaidFromContributions(): ?bool + public function getOptOutWindowIsMonths(): ?bool { - return $this->container['excludeNilPaidFromContributions']; + return $this->container['optOutWindowIsMonths']; } /** - * Sets excludeNilPaidFromContributions + * Sets optOutWindowIsMonths * - * @param bool|null $excludeNilPaidFromContributions If we're sending contributions to an external provider then we'll include all employees that were on the payrun. If you want to exclude employees that don't have any contributions to report then set this to true. + * @param bool|null $optOutWindowIsMonths Determines whether the value given for OptOutWindow is in Months (true) or days (false) * * @return $this */ - public function setExcludeNilPaidFromContributions(?bool $excludeNilPaidFromContributions): static + public function setOptOutWindowIsMonths(?bool $optOutWindowIsMonths): static { - if (is_null($excludeNilPaidFromContributions)) { - throw new InvalidArgumentException('non-nullable excludeNilPaidFromContributions cannot be null'); + if (is_null($optOutWindowIsMonths)) { + throw new InvalidArgumentException('non-nullable optOutWindowIsMonths cannot be null'); } - $this->container['excludeNilPaidFromContributions'] = $excludeNilPaidFromContributions; + $this->container['optOutWindowIsMonths'] = $optOutWindowIsMonths; return $this; } /** - * Gets payPeriodDateAdjustment + * Gets papdisEmployerId * - * @return int|null + * @return string|null */ - public function getPayPeriodDateAdjustment(): ?int + public function getPapdisEmployerId(): ?string { - return $this->container['payPeriodDateAdjustment']; + return $this->container['papdisEmployerId']; } /** - * Sets payPeriodDateAdjustment + * Sets papdisEmployerId * - * @param int|null $payPeriodDateAdjustment If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here. A negative value of will move the date back in time. + * @param string|null $papdisEmployerId papdisEmployerId * * @return $this */ - public function setPayPeriodDateAdjustment(?int $payPeriodDateAdjustment): static + public function setPapdisEmployerId(?string $papdisEmployerId): static { - if (is_null($payPeriodDateAdjustment)) { - throw new InvalidArgumentException('non-nullable payPeriodDateAdjustment cannot be null'); + if (is_null($papdisEmployerId)) { + array_push($this->openAPINullablesSetToNull, 'papdisEmployerId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('papdisEmployerId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriodDateAdjustment'] = $payPeriodDateAdjustment; + $this->container['papdisEmployerId'] = $papdisEmployerId; return $this; } /** - * Gets miscBoolean1 + * Gets papdisProviderId * - * @return bool|null + * @return string|null */ - public function getMiscBoolean1(): ?bool + public function getPapdisProviderId(): ?string { - return $this->container['miscBoolean1']; + return $this->container['papdisProviderId']; } /** - * Sets miscBoolean1 + * Sets papdisProviderId * - * @param bool|null $miscBoolean1 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\" + * @param string|null $papdisProviderId papdisProviderId * * @return $this */ - public function setMiscBoolean1(?bool $miscBoolean1): static + public function setPapdisProviderId(?string $papdisProviderId): static { - if (is_null($miscBoolean1)) { - throw new InvalidArgumentException('non-nullable miscBoolean1 cannot be null'); + if (is_null($papdisProviderId)) { + array_push($this->openAPINullablesSetToNull, 'papdisProviderId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('papdisProviderId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['miscBoolean1'] = $miscBoolean1; + $this->container['papdisProviderId'] = $papdisProviderId; return $this; } /** - * Gets miscBoolean2 + * Gets papdisVersion * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PapdisVersion|null */ - public function getMiscBoolean2(): ?bool + public function getPapdisVersion(): ?\SynergiTech\Staffology\Model\PapdisVersion { - return $this->container['miscBoolean2']; + return $this->container['papdisVersion']; } /** - * Sets miscBoolean2 + * Sets papdisVersion * - * @param bool|null $miscBoolean2 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not to approve payments after submitting contributions + * @param \SynergiTech\Staffology\Model\PapdisVersion|null $papdisVersion papdisVersion * * @return $this */ - public function setMiscBoolean2(?bool $miscBoolean2): static + public function setPapdisVersion(?\SynergiTech\Staffology\Model\PapdisVersion $papdisVersion): static { - if (is_null($miscBoolean2)) { - throw new InvalidArgumentException('non-nullable miscBoolean2 cannot be null'); + if (is_null($papdisVersion)) { + throw new InvalidArgumentException('non-nullable papdisVersion cannot be null'); } - $this->container['miscBoolean2'] = $miscBoolean2; + $this->container['papdisVersion'] = $papdisVersion; return $this; } /** - * Gets miscString1 + * Gets payPeriodDateAdjustment * - * @return string|null + * @return int|null */ - public function getMiscString1(): ?string + public function getPayPeriodDateAdjustment(): ?int { - return $this->container['miscString1']; + return $this->container['payPeriodDateAdjustment']; } /** - * Sets miscString1 + * Sets payPeriodDateAdjustment * - * @param string|null $miscString1 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it dictates the PaymentSource. + * @param int|null $payPeriodDateAdjustment If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here. A negative value of will move the date back in time. * * @return $this */ - public function setMiscString1(?string $miscString1): static + public function setPayPeriodDateAdjustment(?int $payPeriodDateAdjustment): static { - if (is_null($miscString1)) { - array_push($this->openAPINullablesSetToNull, 'miscString1'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('miscString1', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payPeriodDateAdjustment)) { + throw new InvalidArgumentException('non-nullable payPeriodDateAdjustment cannot be null'); } - $this->container['miscString1'] = $miscString1; + $this->container['payPeriodDateAdjustment'] = $payPeriodDateAdjustment; return $this; } /** - * Gets miscString2 + * Gets portal * * @return string|null */ - public function getMiscString2(): ?string + public function getPortal(): ?string { - return $this->container['miscString2']; + return $this->container['portal']; } /** - * Sets miscString2 + * Sets portal * - * @param string|null $miscString2 This field has different uses dependent on the ExternalDataProvider, if any. + * @param string|null $portal portal * * @return $this */ - public function setMiscString2(?string $miscString2): static + public function setPortal(?string $portal): static { - if (is_null($miscString2)) { - array_push($this->openAPINullablesSetToNull, 'miscString2'); + if (is_null($portal)) { + array_push($this->openAPINullablesSetToNull, 'portal'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('miscString2', $nullablesSetToNull); + $index = array_search('portal', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['miscString2'] = $miscString2; + $this->container['portal'] = $portal; return $this; } /** - * Gets optOutWindow + * Gets telephone * - * @return int|null + * @return string|null */ - public function getOptOutWindow(): ?int + public function getTelephone(): ?string { - return $this->container['optOutWindow']; + return $this->container['telephone']; } /** - * Sets optOutWindow + * Sets telephone * - * @param int|null $optOutWindow The number of days or months that an employee has to Opt out after being enrolled + * @param string|null $telephone telephone * * @return $this */ - public function setOptOutWindow(?int $optOutWindow): static + public function setTelephone(?string $telephone): static { - if (is_null($optOutWindow)) { - throw new InvalidArgumentException('non-nullable optOutWindow cannot be null'); + if (is_null($telephone)) { + array_push($this->openAPINullablesSetToNull, 'telephone'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('telephone', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['optOutWindow'] = $optOutWindow; + $this->container['telephone'] = $telephone; return $this; } /** - * Gets optOutWindowIsMonths + * Gets website * - * @return bool|null + * @return string|null */ - public function getOptOutWindowIsMonths(): ?bool + public function getWebsite(): ?string { - return $this->container['optOutWindowIsMonths']; + return $this->container['website']; } /** - * Sets optOutWindowIsMonths + * Sets website * - * @param bool|null $optOutWindowIsMonths Determines whether the value given for OptOutWindow is in Months (true) or days (false) + * @param string|null $website website * * @return $this */ - public function setOptOutWindowIsMonths(?bool $optOutWindowIsMonths): static + public function setWebsite(?string $website): static { - if (is_null($optOutWindowIsMonths)) { - throw new InvalidArgumentException('non-nullable optOutWindowIsMonths cannot be null'); + if (is_null($website)) { + array_push($this->openAPINullablesSetToNull, 'website'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('website', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['optOutWindowIsMonths'] = $optOutWindowIsMonths; + $this->container['website'] = $website; return $this; } diff --git a/src/Model/ContractPensionSchemeNominalCodeMappingRequest.php b/src/Model/ContractPensionSchemeNominalCodeMappingRequest.php index 6b86698..8a5012e 100644 --- a/src/Model/ContractPensionSchemeNominalCodeMappingRequest.php +++ b/src/Model/ContractPensionSchemeNominalCodeMappingRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractPensionSchemeNominalCodeMappingRequest implements ModelInterface, * @var array */ protected static array $openAPITypes = [ + 'journalNarrative' => 'string', 'nominalCode' => 'string', 'nominalName' => 'string', - 'journalNarrative' => 'string', 'payCode' => 'string' ]; @@ -71,9 +71,9 @@ class ContractPensionSchemeNominalCodeMappingRequest implements ModelInterface, * @var array */ protected static array $openAPIFormats = [ + 'journalNarrative' => null, 'nominalCode' => null, 'nominalName' => null, - 'journalNarrative' => null, 'payCode' => null ]; @@ -83,9 +83,9 @@ class ContractPensionSchemeNominalCodeMappingRequest implements ModelInterface, * @var array */ protected static array $openAPINullables = [ + 'journalNarrative' => true, 'nominalCode' => true, 'nominalName' => true, - 'journalNarrative' => true, 'payCode' => true ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'journalNarrative' => 'journalNarrative', 'nominalCode' => 'nominalCode', 'nominalName' => 'nominalName', - 'journalNarrative' => 'journalNarrative', 'payCode' => 'payCode' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'journalNarrative' => 'setJournalNarrative', 'nominalCode' => 'setNominalCode', 'nominalName' => 'setNominalName', - 'journalNarrative' => 'setJournalNarrative', 'payCode' => 'setPayCode' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'journalNarrative' => 'getJournalNarrative', 'nominalCode' => 'getNominalCode', 'nominalName' => 'getNominalName', - 'journalNarrative' => 'getJournalNarrative', 'payCode' => 'getPayCode' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('journalNarrative', $data ?? [], null); $this->setIfExists('nominalCode', $data ?? [], null); $this->setIfExists('nominalName', $data ?? [], null); - $this->setIfExists('journalNarrative', $data ?? [], null); $this->setIfExists('payCode', $data ?? [], null); } @@ -310,103 +310,103 @@ public function valid(): bool /** - * Gets nominalCode + * Gets journalNarrative * * @return string|null */ - public function getNominalCode(): ?string + public function getJournalNarrative(): ?string { - return $this->container['nominalCode']; + return $this->container['journalNarrative']; } /** - * Sets nominalCode + * Sets journalNarrative * - * @param string|null $nominalCode nominalCode + * @param string|null $journalNarrative journalNarrative * * @return $this */ - public function setNominalCode(?string $nominalCode): static + public function setJournalNarrative(?string $journalNarrative): static { - if (is_null($nominalCode)) { - array_push($this->openAPINullablesSetToNull, 'nominalCode'); + if (is_null($journalNarrative)) { + array_push($this->openAPINullablesSetToNull, 'journalNarrative'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalCode', $nullablesSetToNull); + $index = array_search('journalNarrative', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nominalCode'] = $nominalCode; + $this->container['journalNarrative'] = $journalNarrative; return $this; } /** - * Gets nominalName + * Gets nominalCode * * @return string|null */ - public function getNominalName(): ?string + public function getNominalCode(): ?string { - return $this->container['nominalName']; + return $this->container['nominalCode']; } /** - * Sets nominalName + * Sets nominalCode * - * @param string|null $nominalName nominalName + * @param string|null $nominalCode nominalCode * * @return $this */ - public function setNominalName(?string $nominalName): static + public function setNominalCode(?string $nominalCode): static { - if (is_null($nominalName)) { - array_push($this->openAPINullablesSetToNull, 'nominalName'); + if (is_null($nominalCode)) { + array_push($this->openAPINullablesSetToNull, 'nominalCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalName', $nullablesSetToNull); + $index = array_search('nominalCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nominalName'] = $nominalName; + $this->container['nominalCode'] = $nominalCode; return $this; } /** - * Gets journalNarrative + * Gets nominalName * * @return string|null */ - public function getJournalNarrative(): ?string + public function getNominalName(): ?string { - return $this->container['journalNarrative']; + return $this->container['nominalName']; } /** - * Sets journalNarrative + * Sets nominalName * - * @param string|null $journalNarrative journalNarrative + * @param string|null $nominalName nominalName * * @return $this */ - public function setJournalNarrative(?string $journalNarrative): static + public function setNominalName(?string $nominalName): static { - if (is_null($journalNarrative)) { - array_push($this->openAPINullablesSetToNull, 'journalNarrative'); + if (is_null($nominalName)) { + array_push($this->openAPINullablesSetToNull, 'nominalName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('journalNarrative', $nullablesSetToNull); + $index = array_search('nominalName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['journalNarrative'] = $journalNarrative; + $this->container['nominalName'] = $nominalName; return $this; } diff --git a/src/Model/ContractPensionSchemeNominalCodeMappingResponse.php b/src/Model/ContractPensionSchemeNominalCodeMappingResponse.php index 33cd9d6..988ddfe 100644 --- a/src/Model/ContractPensionSchemeNominalCodeMappingResponse.php +++ b/src/Model/ContractPensionSchemeNominalCodeMappingResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractPensionSchemeNominalCodeMappingResponse implements ModelInterface, * @var array */ protected static array $openAPITypes = [ + 'journalNarrative' => 'string', 'nominalCode' => 'string', 'nominalName' => 'string', - 'journalNarrative' => 'string', 'payCode' => 'string' ]; @@ -71,9 +71,9 @@ class ContractPensionSchemeNominalCodeMappingResponse implements ModelInterface, * @var array */ protected static array $openAPIFormats = [ + 'journalNarrative' => null, 'nominalCode' => null, 'nominalName' => null, - 'journalNarrative' => null, 'payCode' => null ]; @@ -83,9 +83,9 @@ class ContractPensionSchemeNominalCodeMappingResponse implements ModelInterface, * @var array */ protected static array $openAPINullables = [ + 'journalNarrative' => true, 'nominalCode' => true, 'nominalName' => true, - 'journalNarrative' => true, 'payCode' => true ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'journalNarrative' => 'journalNarrative', 'nominalCode' => 'nominalCode', 'nominalName' => 'nominalName', - 'journalNarrative' => 'journalNarrative', 'payCode' => 'payCode' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'journalNarrative' => 'setJournalNarrative', 'nominalCode' => 'setNominalCode', 'nominalName' => 'setNominalName', - 'journalNarrative' => 'setJournalNarrative', 'payCode' => 'setPayCode' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'journalNarrative' => 'getJournalNarrative', 'nominalCode' => 'getNominalCode', 'nominalName' => 'getNominalName', - 'journalNarrative' => 'getJournalNarrative', 'payCode' => 'getPayCode' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('journalNarrative', $data ?? [], null); $this->setIfExists('nominalCode', $data ?? [], null); $this->setIfExists('nominalName', $data ?? [], null); - $this->setIfExists('journalNarrative', $data ?? [], null); $this->setIfExists('payCode', $data ?? [], null); } @@ -310,103 +310,103 @@ public function valid(): bool /** - * Gets nominalCode + * Gets journalNarrative * * @return string|null */ - public function getNominalCode(): ?string + public function getJournalNarrative(): ?string { - return $this->container['nominalCode']; + return $this->container['journalNarrative']; } /** - * Sets nominalCode + * Sets journalNarrative * - * @param string|null $nominalCode Nominal Code for pension scheme + * @param string|null $journalNarrative Journal narrative description. * * @return $this */ - public function setNominalCode(?string $nominalCode): static + public function setJournalNarrative(?string $journalNarrative): static { - if (is_null($nominalCode)) { - array_push($this->openAPINullablesSetToNull, 'nominalCode'); + if (is_null($journalNarrative)) { + array_push($this->openAPINullablesSetToNull, 'journalNarrative'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalCode', $nullablesSetToNull); + $index = array_search('journalNarrative', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nominalCode'] = $nominalCode; + $this->container['journalNarrative'] = $journalNarrative; return $this; } /** - * Gets nominalName + * Gets nominalCode * * @return string|null */ - public function getNominalName(): ?string + public function getNominalCode(): ?string { - return $this->container['nominalName']; + return $this->container['nominalCode']; } /** - * Sets nominalName + * Sets nominalCode * - * @param string|null $nominalName Nominal Name + * @param string|null $nominalCode Nominal Code for pension scheme * * @return $this */ - public function setNominalName(?string $nominalName): static + public function setNominalCode(?string $nominalCode): static { - if (is_null($nominalName)) { - array_push($this->openAPINullablesSetToNull, 'nominalName'); + if (is_null($nominalCode)) { + array_push($this->openAPINullablesSetToNull, 'nominalCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalName', $nullablesSetToNull); + $index = array_search('nominalCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nominalName'] = $nominalName; + $this->container['nominalCode'] = $nominalCode; return $this; } /** - * Gets journalNarrative + * Gets nominalName * * @return string|null */ - public function getJournalNarrative(): ?string + public function getNominalName(): ?string { - return $this->container['journalNarrative']; + return $this->container['nominalName']; } /** - * Sets journalNarrative + * Sets nominalName * - * @param string|null $journalNarrative Journal narrative description. + * @param string|null $nominalName Nominal Name * * @return $this */ - public function setJournalNarrative(?string $journalNarrative): static + public function setNominalName(?string $nominalName): static { - if (is_null($journalNarrative)) { - array_push($this->openAPINullablesSetToNull, 'journalNarrative'); + if (is_null($nominalName)) { + array_push($this->openAPINullablesSetToNull, 'nominalName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('journalNarrative', $nullablesSetToNull); + $index = array_search('nominalName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['journalNarrative'] = $journalNarrative; + $this->container['nominalName'] = $nominalName; return $this; } diff --git a/src/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest.php b/src/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest.php index bbfe879..8564a44 100644 --- a/src/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest.php +++ b/src/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,15 @@ class ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest implements ModelInt * @var array */ protected static array $openAPITypes = [ - 'payrollNumber' => '\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber', + 'addressesForNewJoinersOnly' => 'bool', 'casualHours' => '\SynergiTech\Staffology\Model\LgpsCivicaCasualHours', - 'omitHeaderLine' => 'bool', - 'includeFolderNo' => 'bool', 'excludeSchoolEmployerName' => 'bool', - 'addressesForNewJoinersOnly' => 'bool', - 'proRatePtHoursWeeksWorked' => 'bool', 'fullTimeHoursAsOneHundred' => 'bool', - 'includeWeeksWorkedColumns' => 'bool' + 'includeFolderNo' => 'bool', + 'includeWeeksWorkedColumns' => 'bool', + 'omitHeaderLine' => 'bool', + 'payrollNumber' => '\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber', + 'proRatePtHoursWeeksWorked' => 'bool' ]; /** @@ -76,15 +76,15 @@ class ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest implements ModelInt * @var array */ protected static array $openAPIFormats = [ - 'payrollNumber' => null, + 'addressesForNewJoinersOnly' => null, 'casualHours' => null, - 'omitHeaderLine' => null, - 'includeFolderNo' => null, 'excludeSchoolEmployerName' => null, - 'addressesForNewJoinersOnly' => null, - 'proRatePtHoursWeeksWorked' => null, 'fullTimeHoursAsOneHundred' => null, - 'includeWeeksWorkedColumns' => null + 'includeFolderNo' => null, + 'includeWeeksWorkedColumns' => null, + 'omitHeaderLine' => null, + 'payrollNumber' => null, + 'proRatePtHoursWeeksWorked' => null ]; /** @@ -93,15 +93,15 @@ class ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest implements ModelInt * @var array */ protected static array $openAPINullables = [ - 'payrollNumber' => false, + 'addressesForNewJoinersOnly' => false, 'casualHours' => false, - 'omitHeaderLine' => false, - 'includeFolderNo' => false, 'excludeSchoolEmployerName' => false, - 'addressesForNewJoinersOnly' => false, - 'proRatePtHoursWeeksWorked' => false, 'fullTimeHoursAsOneHundred' => false, - 'includeWeeksWorkedColumns' => false + 'includeFolderNo' => false, + 'includeWeeksWorkedColumns' => false, + 'omitHeaderLine' => false, + 'payrollNumber' => false, + 'proRatePtHoursWeeksWorked' => false ]; /** @@ -190,15 +190,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollNumber' => 'payrollNumber', + 'addressesForNewJoinersOnly' => 'addressesForNewJoinersOnly', 'casualHours' => 'casualHours', - 'omitHeaderLine' => 'omitHeaderLine', - 'includeFolderNo' => 'includeFolderNo', 'excludeSchoolEmployerName' => 'excludeSchoolEmployerName', - 'addressesForNewJoinersOnly' => 'addressesForNewJoinersOnly', - 'proRatePtHoursWeeksWorked' => 'proRatePtHoursWeeksWorked', 'fullTimeHoursAsOneHundred' => 'fullTimeHoursAsOneHundred', - 'includeWeeksWorkedColumns' => 'includeWeeksWorkedColumns' + 'includeFolderNo' => 'includeFolderNo', + 'includeWeeksWorkedColumns' => 'includeWeeksWorkedColumns', + 'omitHeaderLine' => 'omitHeaderLine', + 'payrollNumber' => 'payrollNumber', + 'proRatePtHoursWeeksWorked' => 'proRatePtHoursWeeksWorked' ]; /** @@ -207,15 +207,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollNumber' => 'setPayrollNumber', + 'addressesForNewJoinersOnly' => 'setAddressesForNewJoinersOnly', 'casualHours' => 'setCasualHours', - 'omitHeaderLine' => 'setOmitHeaderLine', - 'includeFolderNo' => 'setIncludeFolderNo', 'excludeSchoolEmployerName' => 'setExcludeSchoolEmployerName', - 'addressesForNewJoinersOnly' => 'setAddressesForNewJoinersOnly', - 'proRatePtHoursWeeksWorked' => 'setProRatePtHoursWeeksWorked', 'fullTimeHoursAsOneHundred' => 'setFullTimeHoursAsOneHundred', - 'includeWeeksWorkedColumns' => 'setIncludeWeeksWorkedColumns' + 'includeFolderNo' => 'setIncludeFolderNo', + 'includeWeeksWorkedColumns' => 'setIncludeWeeksWorkedColumns', + 'omitHeaderLine' => 'setOmitHeaderLine', + 'payrollNumber' => 'setPayrollNumber', + 'proRatePtHoursWeeksWorked' => 'setProRatePtHoursWeeksWorked' ]; /** @@ -224,15 +224,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollNumber' => 'getPayrollNumber', + 'addressesForNewJoinersOnly' => 'getAddressesForNewJoinersOnly', 'casualHours' => 'getCasualHours', - 'omitHeaderLine' => 'getOmitHeaderLine', - 'includeFolderNo' => 'getIncludeFolderNo', 'excludeSchoolEmployerName' => 'getExcludeSchoolEmployerName', - 'addressesForNewJoinersOnly' => 'getAddressesForNewJoinersOnly', - 'proRatePtHoursWeeksWorked' => 'getProRatePtHoursWeeksWorked', 'fullTimeHoursAsOneHundred' => 'getFullTimeHoursAsOneHundred', - 'includeWeeksWorkedColumns' => 'getIncludeWeeksWorkedColumns' + 'includeFolderNo' => 'getIncludeFolderNo', + 'includeWeeksWorkedColumns' => 'getIncludeWeeksWorkedColumns', + 'omitHeaderLine' => 'getOmitHeaderLine', + 'payrollNumber' => 'getPayrollNumber', + 'proRatePtHoursWeeksWorked' => 'getProRatePtHoursWeeksWorked' ]; /** @@ -291,15 +291,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollNumber', $data ?? [], null); + $this->setIfExists('addressesForNewJoinersOnly', $data ?? [], null); $this->setIfExists('casualHours', $data ?? [], null); - $this->setIfExists('omitHeaderLine', $data ?? [], null); - $this->setIfExists('includeFolderNo', $data ?? [], null); $this->setIfExists('excludeSchoolEmployerName', $data ?? [], null); - $this->setIfExists('addressesForNewJoinersOnly', $data ?? [], null); - $this->setIfExists('proRatePtHoursWeeksWorked', $data ?? [], null); $this->setIfExists('fullTimeHoursAsOneHundred', $data ?? [], null); + $this->setIfExists('includeFolderNo', $data ?? [], null); $this->setIfExists('includeWeeksWorkedColumns', $data ?? [], null); + $this->setIfExists('omitHeaderLine', $data ?? [], null); + $this->setIfExists('payrollNumber', $data ?? [], null); + $this->setIfExists('proRatePtHoursWeeksWorked', $data ?? [], null); } /** @@ -345,28 +345,28 @@ public function valid(): bool /** - * Gets payrollNumber + * Gets addressesForNewJoinersOnly * - * @return \SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber|null + * @return bool|null */ - public function getPayrollNumber(): ?\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber + public function getAddressesForNewJoinersOnly(): ?bool { - return $this->container['payrollNumber']; + return $this->container['addressesForNewJoinersOnly']; } /** - * Sets payrollNumber + * Sets addressesForNewJoinersOnly * - * @param \SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber|null $payrollNumber payrollNumber + * @param bool|null $addressesForNewJoinersOnly addressesForNewJoinersOnly * * @return $this */ - public function setPayrollNumber(?\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber $payrollNumber): static + public function setAddressesForNewJoinersOnly(?bool $addressesForNewJoinersOnly): static { - if (is_null($payrollNumber)) { - throw new InvalidArgumentException('non-nullable payrollNumber cannot be null'); + if (is_null($addressesForNewJoinersOnly)) { + throw new InvalidArgumentException('non-nullable addressesForNewJoinersOnly cannot be null'); } - $this->container['payrollNumber'] = $payrollNumber; + $this->container['addressesForNewJoinersOnly'] = $addressesForNewJoinersOnly; return $this; } @@ -399,190 +399,190 @@ public function setCasualHours(?\SynergiTech\Staffology\Model\LgpsCivicaCasualHo } /** - * Gets omitHeaderLine + * Gets excludeSchoolEmployerName * * @return bool|null */ - public function getOmitHeaderLine(): ?bool + public function getExcludeSchoolEmployerName(): ?bool { - return $this->container['omitHeaderLine']; + return $this->container['excludeSchoolEmployerName']; } /** - * Sets omitHeaderLine + * Sets excludeSchoolEmployerName * - * @param bool|null $omitHeaderLine omitHeaderLine + * @param bool|null $excludeSchoolEmployerName excludeSchoolEmployerName * * @return $this */ - public function setOmitHeaderLine(?bool $omitHeaderLine): static + public function setExcludeSchoolEmployerName(?bool $excludeSchoolEmployerName): static { - if (is_null($omitHeaderLine)) { - throw new InvalidArgumentException('non-nullable omitHeaderLine cannot be null'); + if (is_null($excludeSchoolEmployerName)) { + throw new InvalidArgumentException('non-nullable excludeSchoolEmployerName cannot be null'); } - $this->container['omitHeaderLine'] = $omitHeaderLine; + $this->container['excludeSchoolEmployerName'] = $excludeSchoolEmployerName; return $this; } /** - * Gets includeFolderNo + * Gets fullTimeHoursAsOneHundred * * @return bool|null */ - public function getIncludeFolderNo(): ?bool + public function getFullTimeHoursAsOneHundred(): ?bool { - return $this->container['includeFolderNo']; + return $this->container['fullTimeHoursAsOneHundred']; } /** - * Sets includeFolderNo + * Sets fullTimeHoursAsOneHundred * - * @param bool|null $includeFolderNo includeFolderNo + * @param bool|null $fullTimeHoursAsOneHundred fullTimeHoursAsOneHundred * * @return $this */ - public function setIncludeFolderNo(?bool $includeFolderNo): static + public function setFullTimeHoursAsOneHundred(?bool $fullTimeHoursAsOneHundred): static { - if (is_null($includeFolderNo)) { - throw new InvalidArgumentException('non-nullable includeFolderNo cannot be null'); + if (is_null($fullTimeHoursAsOneHundred)) { + throw new InvalidArgumentException('non-nullable fullTimeHoursAsOneHundred cannot be null'); } - $this->container['includeFolderNo'] = $includeFolderNo; + $this->container['fullTimeHoursAsOneHundred'] = $fullTimeHoursAsOneHundred; return $this; } /** - * Gets excludeSchoolEmployerName + * Gets includeFolderNo * * @return bool|null */ - public function getExcludeSchoolEmployerName(): ?bool + public function getIncludeFolderNo(): ?bool { - return $this->container['excludeSchoolEmployerName']; + return $this->container['includeFolderNo']; } /** - * Sets excludeSchoolEmployerName + * Sets includeFolderNo * - * @param bool|null $excludeSchoolEmployerName excludeSchoolEmployerName + * @param bool|null $includeFolderNo includeFolderNo * * @return $this */ - public function setExcludeSchoolEmployerName(?bool $excludeSchoolEmployerName): static + public function setIncludeFolderNo(?bool $includeFolderNo): static { - if (is_null($excludeSchoolEmployerName)) { - throw new InvalidArgumentException('non-nullable excludeSchoolEmployerName cannot be null'); + if (is_null($includeFolderNo)) { + throw new InvalidArgumentException('non-nullable includeFolderNo cannot be null'); } - $this->container['excludeSchoolEmployerName'] = $excludeSchoolEmployerName; + $this->container['includeFolderNo'] = $includeFolderNo; return $this; } /** - * Gets addressesForNewJoinersOnly + * Gets includeWeeksWorkedColumns * * @return bool|null */ - public function getAddressesForNewJoinersOnly(): ?bool + public function getIncludeWeeksWorkedColumns(): ?bool { - return $this->container['addressesForNewJoinersOnly']; + return $this->container['includeWeeksWorkedColumns']; } /** - * Sets addressesForNewJoinersOnly + * Sets includeWeeksWorkedColumns * - * @param bool|null $addressesForNewJoinersOnly addressesForNewJoinersOnly + * @param bool|null $includeWeeksWorkedColumns includeWeeksWorkedColumns * * @return $this */ - public function setAddressesForNewJoinersOnly(?bool $addressesForNewJoinersOnly): static + public function setIncludeWeeksWorkedColumns(?bool $includeWeeksWorkedColumns): static { - if (is_null($addressesForNewJoinersOnly)) { - throw new InvalidArgumentException('non-nullable addressesForNewJoinersOnly cannot be null'); + if (is_null($includeWeeksWorkedColumns)) { + throw new InvalidArgumentException('non-nullable includeWeeksWorkedColumns cannot be null'); } - $this->container['addressesForNewJoinersOnly'] = $addressesForNewJoinersOnly; + $this->container['includeWeeksWorkedColumns'] = $includeWeeksWorkedColumns; return $this; } /** - * Gets proRatePtHoursWeeksWorked + * Gets omitHeaderLine * * @return bool|null */ - public function getProRatePtHoursWeeksWorked(): ?bool + public function getOmitHeaderLine(): ?bool { - return $this->container['proRatePtHoursWeeksWorked']; + return $this->container['omitHeaderLine']; } /** - * Sets proRatePtHoursWeeksWorked + * Sets omitHeaderLine * - * @param bool|null $proRatePtHoursWeeksWorked proRatePtHoursWeeksWorked + * @param bool|null $omitHeaderLine omitHeaderLine * * @return $this */ - public function setProRatePtHoursWeeksWorked(?bool $proRatePtHoursWeeksWorked): static + public function setOmitHeaderLine(?bool $omitHeaderLine): static { - if (is_null($proRatePtHoursWeeksWorked)) { - throw new InvalidArgumentException('non-nullable proRatePtHoursWeeksWorked cannot be null'); + if (is_null($omitHeaderLine)) { + throw new InvalidArgumentException('non-nullable omitHeaderLine cannot be null'); } - $this->container['proRatePtHoursWeeksWorked'] = $proRatePtHoursWeeksWorked; + $this->container['omitHeaderLine'] = $omitHeaderLine; return $this; } /** - * Gets fullTimeHoursAsOneHundred + * Gets payrollNumber * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber|null */ - public function getFullTimeHoursAsOneHundred(): ?bool + public function getPayrollNumber(): ?\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber { - return $this->container['fullTimeHoursAsOneHundred']; + return $this->container['payrollNumber']; } /** - * Sets fullTimeHoursAsOneHundred + * Sets payrollNumber * - * @param bool|null $fullTimeHoursAsOneHundred fullTimeHoursAsOneHundred + * @param \SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber|null $payrollNumber payrollNumber * * @return $this */ - public function setFullTimeHoursAsOneHundred(?bool $fullTimeHoursAsOneHundred): static + public function setPayrollNumber(?\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber $payrollNumber): static { - if (is_null($fullTimeHoursAsOneHundred)) { - throw new InvalidArgumentException('non-nullable fullTimeHoursAsOneHundred cannot be null'); + if (is_null($payrollNumber)) { + throw new InvalidArgumentException('non-nullable payrollNumber cannot be null'); } - $this->container['fullTimeHoursAsOneHundred'] = $fullTimeHoursAsOneHundred; + $this->container['payrollNumber'] = $payrollNumber; return $this; } /** - * Gets includeWeeksWorkedColumns + * Gets proRatePtHoursWeeksWorked * * @return bool|null */ - public function getIncludeWeeksWorkedColumns(): ?bool + public function getProRatePtHoursWeeksWorked(): ?bool { - return $this->container['includeWeeksWorkedColumns']; + return $this->container['proRatePtHoursWeeksWorked']; } /** - * Sets includeWeeksWorkedColumns + * Sets proRatePtHoursWeeksWorked * - * @param bool|null $includeWeeksWorkedColumns includeWeeksWorkedColumns + * @param bool|null $proRatePtHoursWeeksWorked proRatePtHoursWeeksWorked * * @return $this */ - public function setIncludeWeeksWorkedColumns(?bool $includeWeeksWorkedColumns): static + public function setProRatePtHoursWeeksWorked(?bool $proRatePtHoursWeeksWorked): static { - if (is_null($includeWeeksWorkedColumns)) { - throw new InvalidArgumentException('non-nullable includeWeeksWorkedColumns cannot be null'); + if (is_null($proRatePtHoursWeeksWorked)) { + throw new InvalidArgumentException('non-nullable proRatePtHoursWeeksWorked cannot be null'); } - $this->container['includeWeeksWorkedColumns'] = $includeWeeksWorkedColumns; + $this->container['proRatePtHoursWeeksWorked'] = $proRatePtHoursWeeksWorked; return $this; } diff --git a/src/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse.php b/src/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse.php index e4aeb57..36696a1 100644 --- a/src/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse.php +++ b/src/Model/ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,15 @@ class ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse implements ModelIn * @var array */ protected static array $openAPITypes = [ - 'payrollNumber' => '\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber', + 'addressesForNewJoinersOnly' => 'bool', 'casualHours' => '\SynergiTech\Staffology\Model\LgpsCivicaCasualHours', - 'omitHeaderLine' => 'bool', - 'includeFolderNo' => 'bool', 'excludeSchoolEmployerName' => 'bool', - 'addressesForNewJoinersOnly' => 'bool', - 'proRatePtHoursWeeksWorked' => 'bool', 'fullTimeHoursAsOneHundred' => 'bool', - 'includeWeeksWorkedColumns' => 'bool' + 'includeFolderNo' => 'bool', + 'includeWeeksWorkedColumns' => 'bool', + 'omitHeaderLine' => 'bool', + 'payrollNumber' => '\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber', + 'proRatePtHoursWeeksWorked' => 'bool' ]; /** @@ -76,15 +76,15 @@ class ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse implements ModelIn * @var array */ protected static array $openAPIFormats = [ - 'payrollNumber' => null, + 'addressesForNewJoinersOnly' => null, 'casualHours' => null, - 'omitHeaderLine' => null, - 'includeFolderNo' => null, 'excludeSchoolEmployerName' => null, - 'addressesForNewJoinersOnly' => null, - 'proRatePtHoursWeeksWorked' => null, 'fullTimeHoursAsOneHundred' => null, - 'includeWeeksWorkedColumns' => null + 'includeFolderNo' => null, + 'includeWeeksWorkedColumns' => null, + 'omitHeaderLine' => null, + 'payrollNumber' => null, + 'proRatePtHoursWeeksWorked' => null ]; /** @@ -93,15 +93,15 @@ class ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse implements ModelIn * @var array */ protected static array $openAPINullables = [ - 'payrollNumber' => false, + 'addressesForNewJoinersOnly' => false, 'casualHours' => false, - 'omitHeaderLine' => false, - 'includeFolderNo' => false, 'excludeSchoolEmployerName' => false, - 'addressesForNewJoinersOnly' => false, - 'proRatePtHoursWeeksWorked' => false, 'fullTimeHoursAsOneHundred' => false, - 'includeWeeksWorkedColumns' => false + 'includeFolderNo' => false, + 'includeWeeksWorkedColumns' => false, + 'omitHeaderLine' => false, + 'payrollNumber' => false, + 'proRatePtHoursWeeksWorked' => false ]; /** @@ -190,15 +190,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollNumber' => 'payrollNumber', + 'addressesForNewJoinersOnly' => 'addressesForNewJoinersOnly', 'casualHours' => 'casualHours', - 'omitHeaderLine' => 'omitHeaderLine', - 'includeFolderNo' => 'includeFolderNo', 'excludeSchoolEmployerName' => 'excludeSchoolEmployerName', - 'addressesForNewJoinersOnly' => 'addressesForNewJoinersOnly', - 'proRatePtHoursWeeksWorked' => 'proRatePtHoursWeeksWorked', 'fullTimeHoursAsOneHundred' => 'fullTimeHoursAsOneHundred', - 'includeWeeksWorkedColumns' => 'includeWeeksWorkedColumns' + 'includeFolderNo' => 'includeFolderNo', + 'includeWeeksWorkedColumns' => 'includeWeeksWorkedColumns', + 'omitHeaderLine' => 'omitHeaderLine', + 'payrollNumber' => 'payrollNumber', + 'proRatePtHoursWeeksWorked' => 'proRatePtHoursWeeksWorked' ]; /** @@ -207,15 +207,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollNumber' => 'setPayrollNumber', + 'addressesForNewJoinersOnly' => 'setAddressesForNewJoinersOnly', 'casualHours' => 'setCasualHours', - 'omitHeaderLine' => 'setOmitHeaderLine', - 'includeFolderNo' => 'setIncludeFolderNo', 'excludeSchoolEmployerName' => 'setExcludeSchoolEmployerName', - 'addressesForNewJoinersOnly' => 'setAddressesForNewJoinersOnly', - 'proRatePtHoursWeeksWorked' => 'setProRatePtHoursWeeksWorked', 'fullTimeHoursAsOneHundred' => 'setFullTimeHoursAsOneHundred', - 'includeWeeksWorkedColumns' => 'setIncludeWeeksWorkedColumns' + 'includeFolderNo' => 'setIncludeFolderNo', + 'includeWeeksWorkedColumns' => 'setIncludeWeeksWorkedColumns', + 'omitHeaderLine' => 'setOmitHeaderLine', + 'payrollNumber' => 'setPayrollNumber', + 'proRatePtHoursWeeksWorked' => 'setProRatePtHoursWeeksWorked' ]; /** @@ -224,15 +224,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollNumber' => 'getPayrollNumber', + 'addressesForNewJoinersOnly' => 'getAddressesForNewJoinersOnly', 'casualHours' => 'getCasualHours', - 'omitHeaderLine' => 'getOmitHeaderLine', - 'includeFolderNo' => 'getIncludeFolderNo', 'excludeSchoolEmployerName' => 'getExcludeSchoolEmployerName', - 'addressesForNewJoinersOnly' => 'getAddressesForNewJoinersOnly', - 'proRatePtHoursWeeksWorked' => 'getProRatePtHoursWeeksWorked', 'fullTimeHoursAsOneHundred' => 'getFullTimeHoursAsOneHundred', - 'includeWeeksWorkedColumns' => 'getIncludeWeeksWorkedColumns' + 'includeFolderNo' => 'getIncludeFolderNo', + 'includeWeeksWorkedColumns' => 'getIncludeWeeksWorkedColumns', + 'omitHeaderLine' => 'getOmitHeaderLine', + 'payrollNumber' => 'getPayrollNumber', + 'proRatePtHoursWeeksWorked' => 'getProRatePtHoursWeeksWorked' ]; /** @@ -291,15 +291,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollNumber', $data ?? [], null); + $this->setIfExists('addressesForNewJoinersOnly', $data ?? [], null); $this->setIfExists('casualHours', $data ?? [], null); - $this->setIfExists('omitHeaderLine', $data ?? [], null); - $this->setIfExists('includeFolderNo', $data ?? [], null); $this->setIfExists('excludeSchoolEmployerName', $data ?? [], null); - $this->setIfExists('addressesForNewJoinersOnly', $data ?? [], null); - $this->setIfExists('proRatePtHoursWeeksWorked', $data ?? [], null); $this->setIfExists('fullTimeHoursAsOneHundred', $data ?? [], null); + $this->setIfExists('includeFolderNo', $data ?? [], null); $this->setIfExists('includeWeeksWorkedColumns', $data ?? [], null); + $this->setIfExists('omitHeaderLine', $data ?? [], null); + $this->setIfExists('payrollNumber', $data ?? [], null); + $this->setIfExists('proRatePtHoursWeeksWorked', $data ?? [], null); } /** @@ -345,28 +345,28 @@ public function valid(): bool /** - * Gets payrollNumber + * Gets addressesForNewJoinersOnly * - * @return \SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber|null + * @return bool|null */ - public function getPayrollNumber(): ?\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber + public function getAddressesForNewJoinersOnly(): ?bool { - return $this->container['payrollNumber']; + return $this->container['addressesForNewJoinersOnly']; } /** - * Sets payrollNumber + * Sets addressesForNewJoinersOnly * - * @param \SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber|null $payrollNumber payrollNumber + * @param bool|null $addressesForNewJoinersOnly addressesForNewJoinersOnly * * @return $this */ - public function setPayrollNumber(?\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber $payrollNumber): static + public function setAddressesForNewJoinersOnly(?bool $addressesForNewJoinersOnly): static { - if (is_null($payrollNumber)) { - throw new InvalidArgumentException('non-nullable payrollNumber cannot be null'); + if (is_null($addressesForNewJoinersOnly)) { + throw new InvalidArgumentException('non-nullable addressesForNewJoinersOnly cannot be null'); } - $this->container['payrollNumber'] = $payrollNumber; + $this->container['addressesForNewJoinersOnly'] = $addressesForNewJoinersOnly; return $this; } @@ -399,190 +399,190 @@ public function setCasualHours(?\SynergiTech\Staffology\Model\LgpsCivicaCasualHo } /** - * Gets omitHeaderLine + * Gets excludeSchoolEmployerName * * @return bool|null */ - public function getOmitHeaderLine(): ?bool + public function getExcludeSchoolEmployerName(): ?bool { - return $this->container['omitHeaderLine']; + return $this->container['excludeSchoolEmployerName']; } /** - * Sets omitHeaderLine + * Sets excludeSchoolEmployerName * - * @param bool|null $omitHeaderLine omitHeaderLine + * @param bool|null $excludeSchoolEmployerName excludeSchoolEmployerName * * @return $this */ - public function setOmitHeaderLine(?bool $omitHeaderLine): static + public function setExcludeSchoolEmployerName(?bool $excludeSchoolEmployerName): static { - if (is_null($omitHeaderLine)) { - throw new InvalidArgumentException('non-nullable omitHeaderLine cannot be null'); + if (is_null($excludeSchoolEmployerName)) { + throw new InvalidArgumentException('non-nullable excludeSchoolEmployerName cannot be null'); } - $this->container['omitHeaderLine'] = $omitHeaderLine; + $this->container['excludeSchoolEmployerName'] = $excludeSchoolEmployerName; return $this; } /** - * Gets includeFolderNo + * Gets fullTimeHoursAsOneHundred * * @return bool|null */ - public function getIncludeFolderNo(): ?bool + public function getFullTimeHoursAsOneHundred(): ?bool { - return $this->container['includeFolderNo']; + return $this->container['fullTimeHoursAsOneHundred']; } /** - * Sets includeFolderNo + * Sets fullTimeHoursAsOneHundred * - * @param bool|null $includeFolderNo includeFolderNo + * @param bool|null $fullTimeHoursAsOneHundred fullTimeHoursAsOneHundred * * @return $this */ - public function setIncludeFolderNo(?bool $includeFolderNo): static + public function setFullTimeHoursAsOneHundred(?bool $fullTimeHoursAsOneHundred): static { - if (is_null($includeFolderNo)) { - throw new InvalidArgumentException('non-nullable includeFolderNo cannot be null'); + if (is_null($fullTimeHoursAsOneHundred)) { + throw new InvalidArgumentException('non-nullable fullTimeHoursAsOneHundred cannot be null'); } - $this->container['includeFolderNo'] = $includeFolderNo; + $this->container['fullTimeHoursAsOneHundred'] = $fullTimeHoursAsOneHundred; return $this; } /** - * Gets excludeSchoolEmployerName + * Gets includeFolderNo * * @return bool|null */ - public function getExcludeSchoolEmployerName(): ?bool + public function getIncludeFolderNo(): ?bool { - return $this->container['excludeSchoolEmployerName']; + return $this->container['includeFolderNo']; } /** - * Sets excludeSchoolEmployerName + * Sets includeFolderNo * - * @param bool|null $excludeSchoolEmployerName excludeSchoolEmployerName + * @param bool|null $includeFolderNo includeFolderNo * * @return $this */ - public function setExcludeSchoolEmployerName(?bool $excludeSchoolEmployerName): static + public function setIncludeFolderNo(?bool $includeFolderNo): static { - if (is_null($excludeSchoolEmployerName)) { - throw new InvalidArgumentException('non-nullable excludeSchoolEmployerName cannot be null'); + if (is_null($includeFolderNo)) { + throw new InvalidArgumentException('non-nullable includeFolderNo cannot be null'); } - $this->container['excludeSchoolEmployerName'] = $excludeSchoolEmployerName; + $this->container['includeFolderNo'] = $includeFolderNo; return $this; } /** - * Gets addressesForNewJoinersOnly + * Gets includeWeeksWorkedColumns * * @return bool|null */ - public function getAddressesForNewJoinersOnly(): ?bool + public function getIncludeWeeksWorkedColumns(): ?bool { - return $this->container['addressesForNewJoinersOnly']; + return $this->container['includeWeeksWorkedColumns']; } /** - * Sets addressesForNewJoinersOnly + * Sets includeWeeksWorkedColumns * - * @param bool|null $addressesForNewJoinersOnly addressesForNewJoinersOnly + * @param bool|null $includeWeeksWorkedColumns includeWeeksWorkedColumns * * @return $this */ - public function setAddressesForNewJoinersOnly(?bool $addressesForNewJoinersOnly): static + public function setIncludeWeeksWorkedColumns(?bool $includeWeeksWorkedColumns): static { - if (is_null($addressesForNewJoinersOnly)) { - throw new InvalidArgumentException('non-nullable addressesForNewJoinersOnly cannot be null'); + if (is_null($includeWeeksWorkedColumns)) { + throw new InvalidArgumentException('non-nullable includeWeeksWorkedColumns cannot be null'); } - $this->container['addressesForNewJoinersOnly'] = $addressesForNewJoinersOnly; + $this->container['includeWeeksWorkedColumns'] = $includeWeeksWorkedColumns; return $this; } /** - * Gets proRatePtHoursWeeksWorked + * Gets omitHeaderLine * * @return bool|null */ - public function getProRatePtHoursWeeksWorked(): ?bool + public function getOmitHeaderLine(): ?bool { - return $this->container['proRatePtHoursWeeksWorked']; + return $this->container['omitHeaderLine']; } /** - * Sets proRatePtHoursWeeksWorked + * Sets omitHeaderLine * - * @param bool|null $proRatePtHoursWeeksWorked proRatePtHoursWeeksWorked + * @param bool|null $omitHeaderLine omitHeaderLine * * @return $this */ - public function setProRatePtHoursWeeksWorked(?bool $proRatePtHoursWeeksWorked): static + public function setOmitHeaderLine(?bool $omitHeaderLine): static { - if (is_null($proRatePtHoursWeeksWorked)) { - throw new InvalidArgumentException('non-nullable proRatePtHoursWeeksWorked cannot be null'); + if (is_null($omitHeaderLine)) { + throw new InvalidArgumentException('non-nullable omitHeaderLine cannot be null'); } - $this->container['proRatePtHoursWeeksWorked'] = $proRatePtHoursWeeksWorked; + $this->container['omitHeaderLine'] = $omitHeaderLine; return $this; } /** - * Gets fullTimeHoursAsOneHundred + * Gets payrollNumber * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber|null */ - public function getFullTimeHoursAsOneHundred(): ?bool + public function getPayrollNumber(): ?\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber { - return $this->container['fullTimeHoursAsOneHundred']; + return $this->container['payrollNumber']; } /** - * Sets fullTimeHoursAsOneHundred + * Sets payrollNumber * - * @param bool|null $fullTimeHoursAsOneHundred fullTimeHoursAsOneHundred + * @param \SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber|null $payrollNumber payrollNumber * * @return $this */ - public function setFullTimeHoursAsOneHundred(?bool $fullTimeHoursAsOneHundred): static + public function setPayrollNumber(?\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber $payrollNumber): static { - if (is_null($fullTimeHoursAsOneHundred)) { - throw new InvalidArgumentException('non-nullable fullTimeHoursAsOneHundred cannot be null'); + if (is_null($payrollNumber)) { + throw new InvalidArgumentException('non-nullable payrollNumber cannot be null'); } - $this->container['fullTimeHoursAsOneHundred'] = $fullTimeHoursAsOneHundred; + $this->container['payrollNumber'] = $payrollNumber; return $this; } /** - * Gets includeWeeksWorkedColumns + * Gets proRatePtHoursWeeksWorked * * @return bool|null */ - public function getIncludeWeeksWorkedColumns(): ?bool + public function getProRatePtHoursWeeksWorked(): ?bool { - return $this->container['includeWeeksWorkedColumns']; + return $this->container['proRatePtHoursWeeksWorked']; } /** - * Sets includeWeeksWorkedColumns + * Sets proRatePtHoursWeeksWorked * - * @param bool|null $includeWeeksWorkedColumns includeWeeksWorkedColumns + * @param bool|null $proRatePtHoursWeeksWorked proRatePtHoursWeeksWorked * * @return $this */ - public function setIncludeWeeksWorkedColumns(?bool $includeWeeksWorkedColumns): static + public function setProRatePtHoursWeeksWorked(?bool $proRatePtHoursWeeksWorked): static { - if (is_null($includeWeeksWorkedColumns)) { - throw new InvalidArgumentException('non-nullable includeWeeksWorkedColumns cannot be null'); + if (is_null($proRatePtHoursWeeksWorked)) { + throw new InvalidArgumentException('non-nullable proRatePtHoursWeeksWorked cannot be null'); } - $this->container['includeWeeksWorkedColumns'] = $includeWeeksWorkedColumns; + $this->container['proRatePtHoursWeeksWorked'] = $proRatePtHoursWeeksWorked; return $this; } diff --git a/src/Model/ContractPensionSchemeReportOptionsLgpsIConnectRequest.php b/src/Model/ContractPensionSchemeReportOptionsLgpsIConnectRequest.php index e4495e8..8506d98 100644 --- a/src/Model/ContractPensionSchemeReportOptionsLgpsIConnectRequest.php +++ b/src/Model/ContractPensionSchemeReportOptionsLgpsIConnectRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,29 +59,29 @@ class ContractPensionSchemeReportOptionsLgpsIConnectRequest implements ModelInte * @var array */ protected static array $openAPITypes = [ + 'breakReasonSmpIndicatorOnly' => 'bool', + 'casualStaffHoursAsOne' => 'bool', + 'casualStaffIndicatorAsY' => 'bool', + 'customText' => 'string', 'fileType' => '\SynergiTech\Staffology\Model\LgpsIConnectFileType', + 'forceUpperCase' => 'bool', + 'ignoreHours' => 'bool', + 'ignoreTermTimeWeeksForFteFinalPay' => 'bool', + 'includeAeQualifyingEarnings' => 'bool', + 'includeEmploymentBreaks' => 'bool', 'payrollReference1' => '\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference', 'payrollReference2' => '\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference', 'payrollReference3' => '\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference', 'populateEmailAddress' => 'bool', - 'populateTelephoneNumber' => 'bool', + 'populateMaritalStatus' => 'bool', 'populateMobileNumber' => 'bool', - 'populateWorksPlaceName' => 'bool', + 'populateTelephoneNumber' => 'bool', 'populateWorksAddress' => 'bool', 'populateWorksEmailAddress' => 'bool', - 'includeEmploymentBreaks' => 'bool', - 'breakReasonSmpIndicatorOnly' => 'bool', - 'populateMaritalStatus' => 'bool', - 'includeAeQualifyingEarnings' => 'bool', + 'populateWorksPlaceName' => 'bool', 'proRatePtHoursByTermTimeWeeks' => 'bool', - 'ignoreTermTimeWeeksForFteFinalPay' => 'bool', - 'showFteAnnualSalaryForFteFinalPay' => 'bool', - 'casualStaffHoursAsOne' => 'bool', - 'casualStaffIndicatorAsY' => 'bool', - 'ignoreHours' => 'bool', - 'forceUpperCase' => 'bool', 'salaryType' => '\SynergiTech\Staffology\Model\LgpsIConnectSalaryType', - 'customText' => 'string' + 'showFteAnnualSalaryForFteFinalPay' => 'bool' ]; /** @@ -90,29 +90,29 @@ class ContractPensionSchemeReportOptionsLgpsIConnectRequest implements ModelInte * @var array */ protected static array $openAPIFormats = [ + 'breakReasonSmpIndicatorOnly' => null, + 'casualStaffHoursAsOne' => null, + 'casualStaffIndicatorAsY' => null, + 'customText' => null, 'fileType' => null, + 'forceUpperCase' => null, + 'ignoreHours' => null, + 'ignoreTermTimeWeeksForFteFinalPay' => null, + 'includeAeQualifyingEarnings' => null, + 'includeEmploymentBreaks' => null, 'payrollReference1' => null, 'payrollReference2' => null, 'payrollReference3' => null, 'populateEmailAddress' => null, - 'populateTelephoneNumber' => null, + 'populateMaritalStatus' => null, 'populateMobileNumber' => null, - 'populateWorksPlaceName' => null, + 'populateTelephoneNumber' => null, 'populateWorksAddress' => null, 'populateWorksEmailAddress' => null, - 'includeEmploymentBreaks' => null, - 'breakReasonSmpIndicatorOnly' => null, - 'populateMaritalStatus' => null, - 'includeAeQualifyingEarnings' => null, + 'populateWorksPlaceName' => null, 'proRatePtHoursByTermTimeWeeks' => null, - 'ignoreTermTimeWeeksForFteFinalPay' => null, - 'showFteAnnualSalaryForFteFinalPay' => null, - 'casualStaffHoursAsOne' => null, - 'casualStaffIndicatorAsY' => null, - 'ignoreHours' => null, - 'forceUpperCase' => null, 'salaryType' => null, - 'customText' => null + 'showFteAnnualSalaryForFteFinalPay' => null ]; /** @@ -121,29 +121,29 @@ class ContractPensionSchemeReportOptionsLgpsIConnectRequest implements ModelInte * @var array */ protected static array $openAPINullables = [ + 'breakReasonSmpIndicatorOnly' => false, + 'casualStaffHoursAsOne' => false, + 'casualStaffIndicatorAsY' => false, + 'customText' => true, 'fileType' => false, + 'forceUpperCase' => false, + 'ignoreHours' => false, + 'ignoreTermTimeWeeksForFteFinalPay' => false, + 'includeAeQualifyingEarnings' => false, + 'includeEmploymentBreaks' => false, 'payrollReference1' => false, 'payrollReference2' => false, 'payrollReference3' => false, 'populateEmailAddress' => false, - 'populateTelephoneNumber' => false, + 'populateMaritalStatus' => false, 'populateMobileNumber' => false, - 'populateWorksPlaceName' => false, + 'populateTelephoneNumber' => false, 'populateWorksAddress' => false, 'populateWorksEmailAddress' => false, - 'includeEmploymentBreaks' => false, - 'breakReasonSmpIndicatorOnly' => false, - 'populateMaritalStatus' => false, - 'includeAeQualifyingEarnings' => false, + 'populateWorksPlaceName' => false, 'proRatePtHoursByTermTimeWeeks' => false, - 'ignoreTermTimeWeeksForFteFinalPay' => false, - 'showFteAnnualSalaryForFteFinalPay' => false, - 'casualStaffHoursAsOne' => false, - 'casualStaffIndicatorAsY' => false, - 'ignoreHours' => false, - 'forceUpperCase' => false, 'salaryType' => false, - 'customText' => true + 'showFteAnnualSalaryForFteFinalPay' => false ]; /** @@ -232,29 +232,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'breakReasonSmpIndicatorOnly' => 'breakReasonSmpIndicatorOnly', + 'casualStaffHoursAsOne' => 'casualStaffHoursAsOne', + 'casualStaffIndicatorAsY' => 'casualStaffIndicatorAsY', + 'customText' => 'customText', 'fileType' => 'fileType', + 'forceUpperCase' => 'forceUpperCase', + 'ignoreHours' => 'ignoreHours', + 'ignoreTermTimeWeeksForFteFinalPay' => 'ignoreTermTimeWeeksForFteFinalPay', + 'includeAeQualifyingEarnings' => 'includeAeQualifyingEarnings', + 'includeEmploymentBreaks' => 'includeEmploymentBreaks', 'payrollReference1' => 'payrollReference1', 'payrollReference2' => 'payrollReference2', 'payrollReference3' => 'payrollReference3', 'populateEmailAddress' => 'populateEmailAddress', - 'populateTelephoneNumber' => 'populateTelephoneNumber', + 'populateMaritalStatus' => 'populateMaritalStatus', 'populateMobileNumber' => 'populateMobileNumber', - 'populateWorksPlaceName' => 'populateWorksPlaceName', + 'populateTelephoneNumber' => 'populateTelephoneNumber', 'populateWorksAddress' => 'populateWorksAddress', 'populateWorksEmailAddress' => 'populateWorksEmailAddress', - 'includeEmploymentBreaks' => 'includeEmploymentBreaks', - 'breakReasonSmpIndicatorOnly' => 'breakReasonSmpIndicatorOnly', - 'populateMaritalStatus' => 'populateMaritalStatus', - 'includeAeQualifyingEarnings' => 'includeAeQualifyingEarnings', + 'populateWorksPlaceName' => 'populateWorksPlaceName', 'proRatePtHoursByTermTimeWeeks' => 'proRatePtHoursByTermTimeWeeks', - 'ignoreTermTimeWeeksForFteFinalPay' => 'ignoreTermTimeWeeksForFteFinalPay', - 'showFteAnnualSalaryForFteFinalPay' => 'showFteAnnualSalaryForFteFinalPay', - 'casualStaffHoursAsOne' => 'casualStaffHoursAsOne', - 'casualStaffIndicatorAsY' => 'casualStaffIndicatorAsY', - 'ignoreHours' => 'ignoreHours', - 'forceUpperCase' => 'forceUpperCase', 'salaryType' => 'salaryType', - 'customText' => 'customText' + 'showFteAnnualSalaryForFteFinalPay' => 'showFteAnnualSalaryForFteFinalPay' ]; /** @@ -263,29 +263,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'breakReasonSmpIndicatorOnly' => 'setBreakReasonSmpIndicatorOnly', + 'casualStaffHoursAsOne' => 'setCasualStaffHoursAsOne', + 'casualStaffIndicatorAsY' => 'setCasualStaffIndicatorAsY', + 'customText' => 'setCustomText', 'fileType' => 'setFileType', + 'forceUpperCase' => 'setForceUpperCase', + 'ignoreHours' => 'setIgnoreHours', + 'ignoreTermTimeWeeksForFteFinalPay' => 'setIgnoreTermTimeWeeksForFteFinalPay', + 'includeAeQualifyingEarnings' => 'setIncludeAeQualifyingEarnings', + 'includeEmploymentBreaks' => 'setIncludeEmploymentBreaks', 'payrollReference1' => 'setPayrollReference1', 'payrollReference2' => 'setPayrollReference2', 'payrollReference3' => 'setPayrollReference3', 'populateEmailAddress' => 'setPopulateEmailAddress', - 'populateTelephoneNumber' => 'setPopulateTelephoneNumber', + 'populateMaritalStatus' => 'setPopulateMaritalStatus', 'populateMobileNumber' => 'setPopulateMobileNumber', - 'populateWorksPlaceName' => 'setPopulateWorksPlaceName', + 'populateTelephoneNumber' => 'setPopulateTelephoneNumber', 'populateWorksAddress' => 'setPopulateWorksAddress', 'populateWorksEmailAddress' => 'setPopulateWorksEmailAddress', - 'includeEmploymentBreaks' => 'setIncludeEmploymentBreaks', - 'breakReasonSmpIndicatorOnly' => 'setBreakReasonSmpIndicatorOnly', - 'populateMaritalStatus' => 'setPopulateMaritalStatus', - 'includeAeQualifyingEarnings' => 'setIncludeAeQualifyingEarnings', + 'populateWorksPlaceName' => 'setPopulateWorksPlaceName', 'proRatePtHoursByTermTimeWeeks' => 'setProRatePtHoursByTermTimeWeeks', - 'ignoreTermTimeWeeksForFteFinalPay' => 'setIgnoreTermTimeWeeksForFteFinalPay', - 'showFteAnnualSalaryForFteFinalPay' => 'setShowFteAnnualSalaryForFteFinalPay', - 'casualStaffHoursAsOne' => 'setCasualStaffHoursAsOne', - 'casualStaffIndicatorAsY' => 'setCasualStaffIndicatorAsY', - 'ignoreHours' => 'setIgnoreHours', - 'forceUpperCase' => 'setForceUpperCase', 'salaryType' => 'setSalaryType', - 'customText' => 'setCustomText' + 'showFteAnnualSalaryForFteFinalPay' => 'setShowFteAnnualSalaryForFteFinalPay' ]; /** @@ -294,29 +294,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'breakReasonSmpIndicatorOnly' => 'getBreakReasonSmpIndicatorOnly', + 'casualStaffHoursAsOne' => 'getCasualStaffHoursAsOne', + 'casualStaffIndicatorAsY' => 'getCasualStaffIndicatorAsY', + 'customText' => 'getCustomText', 'fileType' => 'getFileType', + 'forceUpperCase' => 'getForceUpperCase', + 'ignoreHours' => 'getIgnoreHours', + 'ignoreTermTimeWeeksForFteFinalPay' => 'getIgnoreTermTimeWeeksForFteFinalPay', + 'includeAeQualifyingEarnings' => 'getIncludeAeQualifyingEarnings', + 'includeEmploymentBreaks' => 'getIncludeEmploymentBreaks', 'payrollReference1' => 'getPayrollReference1', 'payrollReference2' => 'getPayrollReference2', 'payrollReference3' => 'getPayrollReference3', 'populateEmailAddress' => 'getPopulateEmailAddress', - 'populateTelephoneNumber' => 'getPopulateTelephoneNumber', + 'populateMaritalStatus' => 'getPopulateMaritalStatus', 'populateMobileNumber' => 'getPopulateMobileNumber', - 'populateWorksPlaceName' => 'getPopulateWorksPlaceName', + 'populateTelephoneNumber' => 'getPopulateTelephoneNumber', 'populateWorksAddress' => 'getPopulateWorksAddress', 'populateWorksEmailAddress' => 'getPopulateWorksEmailAddress', - 'includeEmploymentBreaks' => 'getIncludeEmploymentBreaks', - 'breakReasonSmpIndicatorOnly' => 'getBreakReasonSmpIndicatorOnly', - 'populateMaritalStatus' => 'getPopulateMaritalStatus', - 'includeAeQualifyingEarnings' => 'getIncludeAeQualifyingEarnings', + 'populateWorksPlaceName' => 'getPopulateWorksPlaceName', 'proRatePtHoursByTermTimeWeeks' => 'getProRatePtHoursByTermTimeWeeks', - 'ignoreTermTimeWeeksForFteFinalPay' => 'getIgnoreTermTimeWeeksForFteFinalPay', - 'showFteAnnualSalaryForFteFinalPay' => 'getShowFteAnnualSalaryForFteFinalPay', - 'casualStaffHoursAsOne' => 'getCasualStaffHoursAsOne', - 'casualStaffIndicatorAsY' => 'getCasualStaffIndicatorAsY', - 'ignoreHours' => 'getIgnoreHours', - 'forceUpperCase' => 'getForceUpperCase', 'salaryType' => 'getSalaryType', - 'customText' => 'getCustomText' + 'showFteAnnualSalaryForFteFinalPay' => 'getShowFteAnnualSalaryForFteFinalPay' ]; /** @@ -375,29 +375,29 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('breakReasonSmpIndicatorOnly', $data ?? [], null); + $this->setIfExists('casualStaffHoursAsOne', $data ?? [], null); + $this->setIfExists('casualStaffIndicatorAsY', $data ?? [], null); + $this->setIfExists('customText', $data ?? [], null); $this->setIfExists('fileType', $data ?? [], null); + $this->setIfExists('forceUpperCase', $data ?? [], null); + $this->setIfExists('ignoreHours', $data ?? [], null); + $this->setIfExists('ignoreTermTimeWeeksForFteFinalPay', $data ?? [], null); + $this->setIfExists('includeAeQualifyingEarnings', $data ?? [], null); + $this->setIfExists('includeEmploymentBreaks', $data ?? [], null); $this->setIfExists('payrollReference1', $data ?? [], null); $this->setIfExists('payrollReference2', $data ?? [], null); $this->setIfExists('payrollReference3', $data ?? [], null); $this->setIfExists('populateEmailAddress', $data ?? [], null); - $this->setIfExists('populateTelephoneNumber', $data ?? [], null); + $this->setIfExists('populateMaritalStatus', $data ?? [], null); $this->setIfExists('populateMobileNumber', $data ?? [], null); - $this->setIfExists('populateWorksPlaceName', $data ?? [], null); + $this->setIfExists('populateTelephoneNumber', $data ?? [], null); $this->setIfExists('populateWorksAddress', $data ?? [], null); $this->setIfExists('populateWorksEmailAddress', $data ?? [], null); - $this->setIfExists('includeEmploymentBreaks', $data ?? [], null); - $this->setIfExists('breakReasonSmpIndicatorOnly', $data ?? [], null); - $this->setIfExists('populateMaritalStatus', $data ?? [], null); - $this->setIfExists('includeAeQualifyingEarnings', $data ?? [], null); + $this->setIfExists('populateWorksPlaceName', $data ?? [], null); $this->setIfExists('proRatePtHoursByTermTimeWeeks', $data ?? [], null); - $this->setIfExists('ignoreTermTimeWeeksForFteFinalPay', $data ?? [], null); - $this->setIfExists('showFteAnnualSalaryForFteFinalPay', $data ?? [], null); - $this->setIfExists('casualStaffHoursAsOne', $data ?? [], null); - $this->setIfExists('casualStaffIndicatorAsY', $data ?? [], null); - $this->setIfExists('ignoreHours', $data ?? [], null); - $this->setIfExists('forceUpperCase', $data ?? [], null); $this->setIfExists('salaryType', $data ?? [], null); - $this->setIfExists('customText', $data ?? [], null); + $this->setIfExists('showFteAnnualSalaryForFteFinalPay', $data ?? [], null); } /** @@ -443,568 +443,575 @@ public function valid(): bool /** - * Gets fileType + * Gets breakReasonSmpIndicatorOnly * - * @return \SynergiTech\Staffology\Model\LgpsIConnectFileType|null + * @return bool|null */ - public function getFileType(): ?\SynergiTech\Staffology\Model\LgpsIConnectFileType + public function getBreakReasonSmpIndicatorOnly(): ?bool { - return $this->container['fileType']; + return $this->container['breakReasonSmpIndicatorOnly']; } /** - * Sets fileType + * Sets breakReasonSmpIndicatorOnly * - * @param \SynergiTech\Staffology\Model\LgpsIConnectFileType|null $fileType fileType + * @param bool|null $breakReasonSmpIndicatorOnly breakReasonSmpIndicatorOnly * * @return $this */ - public function setFileType(?\SynergiTech\Staffology\Model\LgpsIConnectFileType $fileType): static + public function setBreakReasonSmpIndicatorOnly(?bool $breakReasonSmpIndicatorOnly): static { - if (is_null($fileType)) { - throw new InvalidArgumentException('non-nullable fileType cannot be null'); + if (is_null($breakReasonSmpIndicatorOnly)) { + throw new InvalidArgumentException('non-nullable breakReasonSmpIndicatorOnly cannot be null'); } - $this->container['fileType'] = $fileType; + $this->container['breakReasonSmpIndicatorOnly'] = $breakReasonSmpIndicatorOnly; return $this; } /** - * Gets payrollReference1 + * Gets casualStaffHoursAsOne * - * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null + * @return bool|null */ - public function getPayrollReference1(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference + public function getCasualStaffHoursAsOne(): ?bool { - return $this->container['payrollReference1']; + return $this->container['casualStaffHoursAsOne']; } /** - * Sets payrollReference1 + * Sets casualStaffHoursAsOne * - * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference1 payrollReference1 + * @param bool|null $casualStaffHoursAsOne casualStaffHoursAsOne * * @return $this */ - public function setPayrollReference1(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference1): static + public function setCasualStaffHoursAsOne(?bool $casualStaffHoursAsOne): static { - if (is_null($payrollReference1)) { - throw new InvalidArgumentException('non-nullable payrollReference1 cannot be null'); + if (is_null($casualStaffHoursAsOne)) { + throw new InvalidArgumentException('non-nullable casualStaffHoursAsOne cannot be null'); } - $this->container['payrollReference1'] = $payrollReference1; + $this->container['casualStaffHoursAsOne'] = $casualStaffHoursAsOne; return $this; } /** - * Gets payrollReference2 + * Gets casualStaffIndicatorAsY * - * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null + * @return bool|null */ - public function getPayrollReference2(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference + public function getCasualStaffIndicatorAsY(): ?bool { - return $this->container['payrollReference2']; + return $this->container['casualStaffIndicatorAsY']; } /** - * Sets payrollReference2 + * Sets casualStaffIndicatorAsY * - * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference2 payrollReference2 + * @param bool|null $casualStaffIndicatorAsY casualStaffIndicatorAsY * * @return $this */ - public function setPayrollReference2(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference2): static + public function setCasualStaffIndicatorAsY(?bool $casualStaffIndicatorAsY): static { - if (is_null($payrollReference2)) { - throw new InvalidArgumentException('non-nullable payrollReference2 cannot be null'); + if (is_null($casualStaffIndicatorAsY)) { + throw new InvalidArgumentException('non-nullable casualStaffIndicatorAsY cannot be null'); } - $this->container['payrollReference2'] = $payrollReference2; + $this->container['casualStaffIndicatorAsY'] = $casualStaffIndicatorAsY; return $this; } /** - * Gets payrollReference3 + * Gets customText * - * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null + * @return string|null */ - public function getPayrollReference3(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference + public function getCustomText(): ?string { - return $this->container['payrollReference3']; + return $this->container['customText']; } /** - * Sets payrollReference3 + * Sets customText * - * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference3 payrollReference3 + * @param string|null $customText customText * * @return $this */ - public function setPayrollReference3(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference3): static + public function setCustomText(?string $customText): static { - if (is_null($payrollReference3)) { - throw new InvalidArgumentException('non-nullable payrollReference3 cannot be null'); + if (is_null($customText)) { + array_push($this->openAPINullablesSetToNull, 'customText'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('customText', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payrollReference3'] = $payrollReference3; + $this->container['customText'] = $customText; return $this; } /** - * Gets populateEmailAddress + * Gets fileType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsIConnectFileType|null */ - public function getPopulateEmailAddress(): ?bool + public function getFileType(): ?\SynergiTech\Staffology\Model\LgpsIConnectFileType { - return $this->container['populateEmailAddress']; + return $this->container['fileType']; } /** - * Sets populateEmailAddress + * Sets fileType * - * @param bool|null $populateEmailAddress populateEmailAddress + * @param \SynergiTech\Staffology\Model\LgpsIConnectFileType|null $fileType fileType * * @return $this */ - public function setPopulateEmailAddress(?bool $populateEmailAddress): static + public function setFileType(?\SynergiTech\Staffology\Model\LgpsIConnectFileType $fileType): static { - if (is_null($populateEmailAddress)) { - throw new InvalidArgumentException('non-nullable populateEmailAddress cannot be null'); + if (is_null($fileType)) { + throw new InvalidArgumentException('non-nullable fileType cannot be null'); } - $this->container['populateEmailAddress'] = $populateEmailAddress; + $this->container['fileType'] = $fileType; return $this; } /** - * Gets populateTelephoneNumber + * Gets forceUpperCase * * @return bool|null */ - public function getPopulateTelephoneNumber(): ?bool + public function getForceUpperCase(): ?bool { - return $this->container['populateTelephoneNumber']; + return $this->container['forceUpperCase']; } /** - * Sets populateTelephoneNumber + * Sets forceUpperCase * - * @param bool|null $populateTelephoneNumber populateTelephoneNumber + * @param bool|null $forceUpperCase forceUpperCase * * @return $this */ - public function setPopulateTelephoneNumber(?bool $populateTelephoneNumber): static + public function setForceUpperCase(?bool $forceUpperCase): static { - if (is_null($populateTelephoneNumber)) { - throw new InvalidArgumentException('non-nullable populateTelephoneNumber cannot be null'); + if (is_null($forceUpperCase)) { + throw new InvalidArgumentException('non-nullable forceUpperCase cannot be null'); } - $this->container['populateTelephoneNumber'] = $populateTelephoneNumber; + $this->container['forceUpperCase'] = $forceUpperCase; return $this; } /** - * Gets populateMobileNumber + * Gets ignoreHours * * @return bool|null */ - public function getPopulateMobileNumber(): ?bool + public function getIgnoreHours(): ?bool { - return $this->container['populateMobileNumber']; + return $this->container['ignoreHours']; } /** - * Sets populateMobileNumber + * Sets ignoreHours * - * @param bool|null $populateMobileNumber populateMobileNumber + * @param bool|null $ignoreHours ignoreHours * * @return $this */ - public function setPopulateMobileNumber(?bool $populateMobileNumber): static + public function setIgnoreHours(?bool $ignoreHours): static { - if (is_null($populateMobileNumber)) { - throw new InvalidArgumentException('non-nullable populateMobileNumber cannot be null'); + if (is_null($ignoreHours)) { + throw new InvalidArgumentException('non-nullable ignoreHours cannot be null'); } - $this->container['populateMobileNumber'] = $populateMobileNumber; + $this->container['ignoreHours'] = $ignoreHours; return $this; } /** - * Gets populateWorksPlaceName + * Gets ignoreTermTimeWeeksForFteFinalPay * * @return bool|null */ - public function getPopulateWorksPlaceName(): ?bool + public function getIgnoreTermTimeWeeksForFteFinalPay(): ?bool { - return $this->container['populateWorksPlaceName']; + return $this->container['ignoreTermTimeWeeksForFteFinalPay']; } /** - * Sets populateWorksPlaceName + * Sets ignoreTermTimeWeeksForFteFinalPay * - * @param bool|null $populateWorksPlaceName populateWorksPlaceName + * @param bool|null $ignoreTermTimeWeeksForFteFinalPay ignoreTermTimeWeeksForFteFinalPay * * @return $this */ - public function setPopulateWorksPlaceName(?bool $populateWorksPlaceName): static + public function setIgnoreTermTimeWeeksForFteFinalPay(?bool $ignoreTermTimeWeeksForFteFinalPay): static { - if (is_null($populateWorksPlaceName)) { - throw new InvalidArgumentException('non-nullable populateWorksPlaceName cannot be null'); + if (is_null($ignoreTermTimeWeeksForFteFinalPay)) { + throw new InvalidArgumentException('non-nullable ignoreTermTimeWeeksForFteFinalPay cannot be null'); } - $this->container['populateWorksPlaceName'] = $populateWorksPlaceName; + $this->container['ignoreTermTimeWeeksForFteFinalPay'] = $ignoreTermTimeWeeksForFteFinalPay; return $this; } /** - * Gets populateWorksAddress + * Gets includeAeQualifyingEarnings * * @return bool|null */ - public function getPopulateWorksAddress(): ?bool + public function getIncludeAeQualifyingEarnings(): ?bool { - return $this->container['populateWorksAddress']; + return $this->container['includeAeQualifyingEarnings']; } /** - * Sets populateWorksAddress + * Sets includeAeQualifyingEarnings * - * @param bool|null $populateWorksAddress populateWorksAddress + * @param bool|null $includeAeQualifyingEarnings includeAeQualifyingEarnings * * @return $this */ - public function setPopulateWorksAddress(?bool $populateWorksAddress): static + public function setIncludeAeQualifyingEarnings(?bool $includeAeQualifyingEarnings): static { - if (is_null($populateWorksAddress)) { - throw new InvalidArgumentException('non-nullable populateWorksAddress cannot be null'); + if (is_null($includeAeQualifyingEarnings)) { + throw new InvalidArgumentException('non-nullable includeAeQualifyingEarnings cannot be null'); } - $this->container['populateWorksAddress'] = $populateWorksAddress; + $this->container['includeAeQualifyingEarnings'] = $includeAeQualifyingEarnings; return $this; } /** - * Gets populateWorksEmailAddress + * Gets includeEmploymentBreaks * * @return bool|null */ - public function getPopulateWorksEmailAddress(): ?bool + public function getIncludeEmploymentBreaks(): ?bool { - return $this->container['populateWorksEmailAddress']; + return $this->container['includeEmploymentBreaks']; } /** - * Sets populateWorksEmailAddress + * Sets includeEmploymentBreaks * - * @param bool|null $populateWorksEmailAddress populateWorksEmailAddress + * @param bool|null $includeEmploymentBreaks includeEmploymentBreaks * * @return $this */ - public function setPopulateWorksEmailAddress(?bool $populateWorksEmailAddress): static + public function setIncludeEmploymentBreaks(?bool $includeEmploymentBreaks): static { - if (is_null($populateWorksEmailAddress)) { - throw new InvalidArgumentException('non-nullable populateWorksEmailAddress cannot be null'); + if (is_null($includeEmploymentBreaks)) { + throw new InvalidArgumentException('non-nullable includeEmploymentBreaks cannot be null'); } - $this->container['populateWorksEmailAddress'] = $populateWorksEmailAddress; + $this->container['includeEmploymentBreaks'] = $includeEmploymentBreaks; return $this; } /** - * Gets includeEmploymentBreaks + * Gets payrollReference1 * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null */ - public function getIncludeEmploymentBreaks(): ?bool + public function getPayrollReference1(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference { - return $this->container['includeEmploymentBreaks']; + return $this->container['payrollReference1']; } /** - * Sets includeEmploymentBreaks + * Sets payrollReference1 * - * @param bool|null $includeEmploymentBreaks includeEmploymentBreaks + * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference1 payrollReference1 * * @return $this */ - public function setIncludeEmploymentBreaks(?bool $includeEmploymentBreaks): static + public function setPayrollReference1(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference1): static { - if (is_null($includeEmploymentBreaks)) { - throw new InvalidArgumentException('non-nullable includeEmploymentBreaks cannot be null'); + if (is_null($payrollReference1)) { + throw new InvalidArgumentException('non-nullable payrollReference1 cannot be null'); } - $this->container['includeEmploymentBreaks'] = $includeEmploymentBreaks; + $this->container['payrollReference1'] = $payrollReference1; return $this; } /** - * Gets breakReasonSmpIndicatorOnly + * Gets payrollReference2 * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null */ - public function getBreakReasonSmpIndicatorOnly(): ?bool + public function getPayrollReference2(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference { - return $this->container['breakReasonSmpIndicatorOnly']; + return $this->container['payrollReference2']; } /** - * Sets breakReasonSmpIndicatorOnly + * Sets payrollReference2 * - * @param bool|null $breakReasonSmpIndicatorOnly breakReasonSmpIndicatorOnly + * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference2 payrollReference2 * * @return $this */ - public function setBreakReasonSmpIndicatorOnly(?bool $breakReasonSmpIndicatorOnly): static + public function setPayrollReference2(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference2): static { - if (is_null($breakReasonSmpIndicatorOnly)) { - throw new InvalidArgumentException('non-nullable breakReasonSmpIndicatorOnly cannot be null'); + if (is_null($payrollReference2)) { + throw new InvalidArgumentException('non-nullable payrollReference2 cannot be null'); } - $this->container['breakReasonSmpIndicatorOnly'] = $breakReasonSmpIndicatorOnly; + $this->container['payrollReference2'] = $payrollReference2; return $this; } /** - * Gets populateMaritalStatus + * Gets payrollReference3 * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null */ - public function getPopulateMaritalStatus(): ?bool + public function getPayrollReference3(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference { - return $this->container['populateMaritalStatus']; + return $this->container['payrollReference3']; } /** - * Sets populateMaritalStatus + * Sets payrollReference3 * - * @param bool|null $populateMaritalStatus populateMaritalStatus + * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference3 payrollReference3 * * @return $this */ - public function setPopulateMaritalStatus(?bool $populateMaritalStatus): static + public function setPayrollReference3(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference3): static { - if (is_null($populateMaritalStatus)) { - throw new InvalidArgumentException('non-nullable populateMaritalStatus cannot be null'); + if (is_null($payrollReference3)) { + throw new InvalidArgumentException('non-nullable payrollReference3 cannot be null'); } - $this->container['populateMaritalStatus'] = $populateMaritalStatus; + $this->container['payrollReference3'] = $payrollReference3; return $this; } /** - * Gets includeAeQualifyingEarnings + * Gets populateEmailAddress * * @return bool|null */ - public function getIncludeAeQualifyingEarnings(): ?bool + public function getPopulateEmailAddress(): ?bool { - return $this->container['includeAeQualifyingEarnings']; + return $this->container['populateEmailAddress']; } /** - * Sets includeAeQualifyingEarnings + * Sets populateEmailAddress * - * @param bool|null $includeAeQualifyingEarnings includeAeQualifyingEarnings + * @param bool|null $populateEmailAddress populateEmailAddress * * @return $this */ - public function setIncludeAeQualifyingEarnings(?bool $includeAeQualifyingEarnings): static + public function setPopulateEmailAddress(?bool $populateEmailAddress): static { - if (is_null($includeAeQualifyingEarnings)) { - throw new InvalidArgumentException('non-nullable includeAeQualifyingEarnings cannot be null'); + if (is_null($populateEmailAddress)) { + throw new InvalidArgumentException('non-nullable populateEmailAddress cannot be null'); } - $this->container['includeAeQualifyingEarnings'] = $includeAeQualifyingEarnings; + $this->container['populateEmailAddress'] = $populateEmailAddress; return $this; } /** - * Gets proRatePtHoursByTermTimeWeeks + * Gets populateMaritalStatus * * @return bool|null */ - public function getProRatePtHoursByTermTimeWeeks(): ?bool + public function getPopulateMaritalStatus(): ?bool { - return $this->container['proRatePtHoursByTermTimeWeeks']; + return $this->container['populateMaritalStatus']; } /** - * Sets proRatePtHoursByTermTimeWeeks + * Sets populateMaritalStatus * - * @param bool|null $proRatePtHoursByTermTimeWeeks proRatePtHoursByTermTimeWeeks + * @param bool|null $populateMaritalStatus populateMaritalStatus * * @return $this */ - public function setProRatePtHoursByTermTimeWeeks(?bool $proRatePtHoursByTermTimeWeeks): static + public function setPopulateMaritalStatus(?bool $populateMaritalStatus): static { - if (is_null($proRatePtHoursByTermTimeWeeks)) { - throw new InvalidArgumentException('non-nullable proRatePtHoursByTermTimeWeeks cannot be null'); + if (is_null($populateMaritalStatus)) { + throw new InvalidArgumentException('non-nullable populateMaritalStatus cannot be null'); } - $this->container['proRatePtHoursByTermTimeWeeks'] = $proRatePtHoursByTermTimeWeeks; + $this->container['populateMaritalStatus'] = $populateMaritalStatus; return $this; } /** - * Gets ignoreTermTimeWeeksForFteFinalPay + * Gets populateMobileNumber * * @return bool|null */ - public function getIgnoreTermTimeWeeksForFteFinalPay(): ?bool + public function getPopulateMobileNumber(): ?bool { - return $this->container['ignoreTermTimeWeeksForFteFinalPay']; + return $this->container['populateMobileNumber']; } /** - * Sets ignoreTermTimeWeeksForFteFinalPay + * Sets populateMobileNumber * - * @param bool|null $ignoreTermTimeWeeksForFteFinalPay ignoreTermTimeWeeksForFteFinalPay + * @param bool|null $populateMobileNumber populateMobileNumber * * @return $this */ - public function setIgnoreTermTimeWeeksForFteFinalPay(?bool $ignoreTermTimeWeeksForFteFinalPay): static + public function setPopulateMobileNumber(?bool $populateMobileNumber): static { - if (is_null($ignoreTermTimeWeeksForFteFinalPay)) { - throw new InvalidArgumentException('non-nullable ignoreTermTimeWeeksForFteFinalPay cannot be null'); + if (is_null($populateMobileNumber)) { + throw new InvalidArgumentException('non-nullable populateMobileNumber cannot be null'); } - $this->container['ignoreTermTimeWeeksForFteFinalPay'] = $ignoreTermTimeWeeksForFteFinalPay; + $this->container['populateMobileNumber'] = $populateMobileNumber; return $this; } /** - * Gets showFteAnnualSalaryForFteFinalPay + * Gets populateTelephoneNumber * * @return bool|null */ - public function getShowFteAnnualSalaryForFteFinalPay(): ?bool + public function getPopulateTelephoneNumber(): ?bool { - return $this->container['showFteAnnualSalaryForFteFinalPay']; + return $this->container['populateTelephoneNumber']; } /** - * Sets showFteAnnualSalaryForFteFinalPay + * Sets populateTelephoneNumber * - * @param bool|null $showFteAnnualSalaryForFteFinalPay showFteAnnualSalaryForFteFinalPay + * @param bool|null $populateTelephoneNumber populateTelephoneNumber * * @return $this */ - public function setShowFteAnnualSalaryForFteFinalPay(?bool $showFteAnnualSalaryForFteFinalPay): static + public function setPopulateTelephoneNumber(?bool $populateTelephoneNumber): static { - if (is_null($showFteAnnualSalaryForFteFinalPay)) { - throw new InvalidArgumentException('non-nullable showFteAnnualSalaryForFteFinalPay cannot be null'); + if (is_null($populateTelephoneNumber)) { + throw new InvalidArgumentException('non-nullable populateTelephoneNumber cannot be null'); } - $this->container['showFteAnnualSalaryForFteFinalPay'] = $showFteAnnualSalaryForFteFinalPay; + $this->container['populateTelephoneNumber'] = $populateTelephoneNumber; return $this; } /** - * Gets casualStaffHoursAsOne + * Gets populateWorksAddress * * @return bool|null */ - public function getCasualStaffHoursAsOne(): ?bool + public function getPopulateWorksAddress(): ?bool { - return $this->container['casualStaffHoursAsOne']; + return $this->container['populateWorksAddress']; } /** - * Sets casualStaffHoursAsOne + * Sets populateWorksAddress * - * @param bool|null $casualStaffHoursAsOne casualStaffHoursAsOne + * @param bool|null $populateWorksAddress populateWorksAddress * * @return $this */ - public function setCasualStaffHoursAsOne(?bool $casualStaffHoursAsOne): static + public function setPopulateWorksAddress(?bool $populateWorksAddress): static { - if (is_null($casualStaffHoursAsOne)) { - throw new InvalidArgumentException('non-nullable casualStaffHoursAsOne cannot be null'); + if (is_null($populateWorksAddress)) { + throw new InvalidArgumentException('non-nullable populateWorksAddress cannot be null'); } - $this->container['casualStaffHoursAsOne'] = $casualStaffHoursAsOne; + $this->container['populateWorksAddress'] = $populateWorksAddress; return $this; } /** - * Gets casualStaffIndicatorAsY + * Gets populateWorksEmailAddress * * @return bool|null */ - public function getCasualStaffIndicatorAsY(): ?bool + public function getPopulateWorksEmailAddress(): ?bool { - return $this->container['casualStaffIndicatorAsY']; + return $this->container['populateWorksEmailAddress']; } /** - * Sets casualStaffIndicatorAsY + * Sets populateWorksEmailAddress * - * @param bool|null $casualStaffIndicatorAsY casualStaffIndicatorAsY + * @param bool|null $populateWorksEmailAddress populateWorksEmailAddress * * @return $this */ - public function setCasualStaffIndicatorAsY(?bool $casualStaffIndicatorAsY): static + public function setPopulateWorksEmailAddress(?bool $populateWorksEmailAddress): static { - if (is_null($casualStaffIndicatorAsY)) { - throw new InvalidArgumentException('non-nullable casualStaffIndicatorAsY cannot be null'); + if (is_null($populateWorksEmailAddress)) { + throw new InvalidArgumentException('non-nullable populateWorksEmailAddress cannot be null'); } - $this->container['casualStaffIndicatorAsY'] = $casualStaffIndicatorAsY; + $this->container['populateWorksEmailAddress'] = $populateWorksEmailAddress; return $this; } /** - * Gets ignoreHours + * Gets populateWorksPlaceName * * @return bool|null */ - public function getIgnoreHours(): ?bool + public function getPopulateWorksPlaceName(): ?bool { - return $this->container['ignoreHours']; + return $this->container['populateWorksPlaceName']; } /** - * Sets ignoreHours + * Sets populateWorksPlaceName * - * @param bool|null $ignoreHours ignoreHours + * @param bool|null $populateWorksPlaceName populateWorksPlaceName * * @return $this */ - public function setIgnoreHours(?bool $ignoreHours): static + public function setPopulateWorksPlaceName(?bool $populateWorksPlaceName): static { - if (is_null($ignoreHours)) { - throw new InvalidArgumentException('non-nullable ignoreHours cannot be null'); + if (is_null($populateWorksPlaceName)) { + throw new InvalidArgumentException('non-nullable populateWorksPlaceName cannot be null'); } - $this->container['ignoreHours'] = $ignoreHours; + $this->container['populateWorksPlaceName'] = $populateWorksPlaceName; return $this; } /** - * Gets forceUpperCase + * Gets proRatePtHoursByTermTimeWeeks * * @return bool|null */ - public function getForceUpperCase(): ?bool + public function getProRatePtHoursByTermTimeWeeks(): ?bool { - return $this->container['forceUpperCase']; + return $this->container['proRatePtHoursByTermTimeWeeks']; } /** - * Sets forceUpperCase + * Sets proRatePtHoursByTermTimeWeeks * - * @param bool|null $forceUpperCase forceUpperCase + * @param bool|null $proRatePtHoursByTermTimeWeeks proRatePtHoursByTermTimeWeeks * * @return $this */ - public function setForceUpperCase(?bool $forceUpperCase): static + public function setProRatePtHoursByTermTimeWeeks(?bool $proRatePtHoursByTermTimeWeeks): static { - if (is_null($forceUpperCase)) { - throw new InvalidArgumentException('non-nullable forceUpperCase cannot be null'); + if (is_null($proRatePtHoursByTermTimeWeeks)) { + throw new InvalidArgumentException('non-nullable proRatePtHoursByTermTimeWeeks cannot be null'); } - $this->container['forceUpperCase'] = $forceUpperCase; + $this->container['proRatePtHoursByTermTimeWeeks'] = $proRatePtHoursByTermTimeWeeks; return $this; } @@ -1037,35 +1044,28 @@ public function setSalaryType(?\SynergiTech\Staffology\Model\LgpsIConnectSalaryT } /** - * Gets customText + * Gets showFteAnnualSalaryForFteFinalPay * - * @return string|null + * @return bool|null */ - public function getCustomText(): ?string + public function getShowFteAnnualSalaryForFteFinalPay(): ?bool { - return $this->container['customText']; + return $this->container['showFteAnnualSalaryForFteFinalPay']; } /** - * Sets customText + * Sets showFteAnnualSalaryForFteFinalPay * - * @param string|null $customText customText + * @param bool|null $showFteAnnualSalaryForFteFinalPay showFteAnnualSalaryForFteFinalPay * * @return $this */ - public function setCustomText(?string $customText): static + public function setShowFteAnnualSalaryForFteFinalPay(?bool $showFteAnnualSalaryForFteFinalPay): static { - if (is_null($customText)) { - array_push($this->openAPINullablesSetToNull, 'customText'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('customText', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($showFteAnnualSalaryForFteFinalPay)) { + throw new InvalidArgumentException('non-nullable showFteAnnualSalaryForFteFinalPay cannot be null'); } - $this->container['customText'] = $customText; + $this->container['showFteAnnualSalaryForFteFinalPay'] = $showFteAnnualSalaryForFteFinalPay; return $this; } diff --git a/src/Model/ContractPensionSchemeReportOptionsLgpsIConnectResponse.php b/src/Model/ContractPensionSchemeReportOptionsLgpsIConnectResponse.php index 7b7b047..3cbfff9 100644 --- a/src/Model/ContractPensionSchemeReportOptionsLgpsIConnectResponse.php +++ b/src/Model/ContractPensionSchemeReportOptionsLgpsIConnectResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,29 +59,29 @@ class ContractPensionSchemeReportOptionsLgpsIConnectResponse implements ModelInt * @var array */ protected static array $openAPITypes = [ + 'breakReasonSmpIndicatorOnly' => 'bool', + 'casualStaffHoursAsOne' => 'bool', + 'casualStaffIndicatorAsY' => 'bool', + 'customText' => 'string', 'fileType' => '\SynergiTech\Staffology\Model\LgpsIConnectFileType', + 'forceUpperCase' => 'bool', + 'ignoreHours' => 'bool', + 'ignoreTermTimeWeeksForFteFinalPay' => 'bool', + 'includeAeQualifyingEarnings' => 'bool', + 'includeEmploymentBreaks' => 'bool', 'payrollReference1' => '\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference', 'payrollReference2' => '\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference', 'payrollReference3' => '\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference', 'populateEmailAddress' => 'bool', - 'populateTelephoneNumber' => 'bool', + 'populateMaritalStatus' => 'bool', 'populateMobileNumber' => 'bool', - 'populateWorksPlaceName' => 'bool', + 'populateTelephoneNumber' => 'bool', 'populateWorksAddress' => 'bool', 'populateWorksEmailAddress' => 'bool', - 'includeEmploymentBreaks' => 'bool', - 'breakReasonSmpIndicatorOnly' => 'bool', - 'populateMaritalStatus' => 'bool', - 'includeAeQualifyingEarnings' => 'bool', + 'populateWorksPlaceName' => 'bool', 'proRatePtHoursByTermTimeWeeks' => 'bool', - 'ignoreTermTimeWeeksForFteFinalPay' => 'bool', - 'showFteAnnualSalaryForFteFinalPay' => 'bool', - 'casualStaffHoursAsOne' => 'bool', - 'casualStaffIndicatorAsY' => 'bool', - 'ignoreHours' => 'bool', - 'forceUpperCase' => 'bool', 'salaryType' => '\SynergiTech\Staffology\Model\LgpsIConnectSalaryType', - 'customText' => 'string' + 'showFteAnnualSalaryForFteFinalPay' => 'bool' ]; /** @@ -90,29 +90,29 @@ class ContractPensionSchemeReportOptionsLgpsIConnectResponse implements ModelInt * @var array */ protected static array $openAPIFormats = [ + 'breakReasonSmpIndicatorOnly' => null, + 'casualStaffHoursAsOne' => null, + 'casualStaffIndicatorAsY' => null, + 'customText' => null, 'fileType' => null, + 'forceUpperCase' => null, + 'ignoreHours' => null, + 'ignoreTermTimeWeeksForFteFinalPay' => null, + 'includeAeQualifyingEarnings' => null, + 'includeEmploymentBreaks' => null, 'payrollReference1' => null, 'payrollReference2' => null, 'payrollReference3' => null, 'populateEmailAddress' => null, - 'populateTelephoneNumber' => null, + 'populateMaritalStatus' => null, 'populateMobileNumber' => null, - 'populateWorksPlaceName' => null, + 'populateTelephoneNumber' => null, 'populateWorksAddress' => null, 'populateWorksEmailAddress' => null, - 'includeEmploymentBreaks' => null, - 'breakReasonSmpIndicatorOnly' => null, - 'populateMaritalStatus' => null, - 'includeAeQualifyingEarnings' => null, + 'populateWorksPlaceName' => null, 'proRatePtHoursByTermTimeWeeks' => null, - 'ignoreTermTimeWeeksForFteFinalPay' => null, - 'showFteAnnualSalaryForFteFinalPay' => null, - 'casualStaffHoursAsOne' => null, - 'casualStaffIndicatorAsY' => null, - 'ignoreHours' => null, - 'forceUpperCase' => null, 'salaryType' => null, - 'customText' => null + 'showFteAnnualSalaryForFteFinalPay' => null ]; /** @@ -121,29 +121,29 @@ class ContractPensionSchemeReportOptionsLgpsIConnectResponse implements ModelInt * @var array */ protected static array $openAPINullables = [ + 'breakReasonSmpIndicatorOnly' => false, + 'casualStaffHoursAsOne' => false, + 'casualStaffIndicatorAsY' => false, + 'customText' => true, 'fileType' => false, + 'forceUpperCase' => false, + 'ignoreHours' => false, + 'ignoreTermTimeWeeksForFteFinalPay' => false, + 'includeAeQualifyingEarnings' => false, + 'includeEmploymentBreaks' => false, 'payrollReference1' => false, 'payrollReference2' => false, 'payrollReference3' => false, 'populateEmailAddress' => false, - 'populateTelephoneNumber' => false, + 'populateMaritalStatus' => false, 'populateMobileNumber' => false, - 'populateWorksPlaceName' => false, + 'populateTelephoneNumber' => false, 'populateWorksAddress' => false, 'populateWorksEmailAddress' => false, - 'includeEmploymentBreaks' => false, - 'breakReasonSmpIndicatorOnly' => false, - 'populateMaritalStatus' => false, - 'includeAeQualifyingEarnings' => false, + 'populateWorksPlaceName' => false, 'proRatePtHoursByTermTimeWeeks' => false, - 'ignoreTermTimeWeeksForFteFinalPay' => false, - 'showFteAnnualSalaryForFteFinalPay' => false, - 'casualStaffHoursAsOne' => false, - 'casualStaffIndicatorAsY' => false, - 'ignoreHours' => false, - 'forceUpperCase' => false, 'salaryType' => false, - 'customText' => true + 'showFteAnnualSalaryForFteFinalPay' => false ]; /** @@ -232,29 +232,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'breakReasonSmpIndicatorOnly' => 'breakReasonSmpIndicatorOnly', + 'casualStaffHoursAsOne' => 'casualStaffHoursAsOne', + 'casualStaffIndicatorAsY' => 'casualStaffIndicatorAsY', + 'customText' => 'customText', 'fileType' => 'fileType', + 'forceUpperCase' => 'forceUpperCase', + 'ignoreHours' => 'ignoreHours', + 'ignoreTermTimeWeeksForFteFinalPay' => 'ignoreTermTimeWeeksForFteFinalPay', + 'includeAeQualifyingEarnings' => 'includeAeQualifyingEarnings', + 'includeEmploymentBreaks' => 'includeEmploymentBreaks', 'payrollReference1' => 'payrollReference1', 'payrollReference2' => 'payrollReference2', 'payrollReference3' => 'payrollReference3', 'populateEmailAddress' => 'populateEmailAddress', - 'populateTelephoneNumber' => 'populateTelephoneNumber', + 'populateMaritalStatus' => 'populateMaritalStatus', 'populateMobileNumber' => 'populateMobileNumber', - 'populateWorksPlaceName' => 'populateWorksPlaceName', + 'populateTelephoneNumber' => 'populateTelephoneNumber', 'populateWorksAddress' => 'populateWorksAddress', 'populateWorksEmailAddress' => 'populateWorksEmailAddress', - 'includeEmploymentBreaks' => 'includeEmploymentBreaks', - 'breakReasonSmpIndicatorOnly' => 'breakReasonSmpIndicatorOnly', - 'populateMaritalStatus' => 'populateMaritalStatus', - 'includeAeQualifyingEarnings' => 'includeAeQualifyingEarnings', + 'populateWorksPlaceName' => 'populateWorksPlaceName', 'proRatePtHoursByTermTimeWeeks' => 'proRatePtHoursByTermTimeWeeks', - 'ignoreTermTimeWeeksForFteFinalPay' => 'ignoreTermTimeWeeksForFteFinalPay', - 'showFteAnnualSalaryForFteFinalPay' => 'showFteAnnualSalaryForFteFinalPay', - 'casualStaffHoursAsOne' => 'casualStaffHoursAsOne', - 'casualStaffIndicatorAsY' => 'casualStaffIndicatorAsY', - 'ignoreHours' => 'ignoreHours', - 'forceUpperCase' => 'forceUpperCase', 'salaryType' => 'salaryType', - 'customText' => 'customText' + 'showFteAnnualSalaryForFteFinalPay' => 'showFteAnnualSalaryForFteFinalPay' ]; /** @@ -263,29 +263,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'breakReasonSmpIndicatorOnly' => 'setBreakReasonSmpIndicatorOnly', + 'casualStaffHoursAsOne' => 'setCasualStaffHoursAsOne', + 'casualStaffIndicatorAsY' => 'setCasualStaffIndicatorAsY', + 'customText' => 'setCustomText', 'fileType' => 'setFileType', + 'forceUpperCase' => 'setForceUpperCase', + 'ignoreHours' => 'setIgnoreHours', + 'ignoreTermTimeWeeksForFteFinalPay' => 'setIgnoreTermTimeWeeksForFteFinalPay', + 'includeAeQualifyingEarnings' => 'setIncludeAeQualifyingEarnings', + 'includeEmploymentBreaks' => 'setIncludeEmploymentBreaks', 'payrollReference1' => 'setPayrollReference1', 'payrollReference2' => 'setPayrollReference2', 'payrollReference3' => 'setPayrollReference3', 'populateEmailAddress' => 'setPopulateEmailAddress', - 'populateTelephoneNumber' => 'setPopulateTelephoneNumber', + 'populateMaritalStatus' => 'setPopulateMaritalStatus', 'populateMobileNumber' => 'setPopulateMobileNumber', - 'populateWorksPlaceName' => 'setPopulateWorksPlaceName', + 'populateTelephoneNumber' => 'setPopulateTelephoneNumber', 'populateWorksAddress' => 'setPopulateWorksAddress', 'populateWorksEmailAddress' => 'setPopulateWorksEmailAddress', - 'includeEmploymentBreaks' => 'setIncludeEmploymentBreaks', - 'breakReasonSmpIndicatorOnly' => 'setBreakReasonSmpIndicatorOnly', - 'populateMaritalStatus' => 'setPopulateMaritalStatus', - 'includeAeQualifyingEarnings' => 'setIncludeAeQualifyingEarnings', + 'populateWorksPlaceName' => 'setPopulateWorksPlaceName', 'proRatePtHoursByTermTimeWeeks' => 'setProRatePtHoursByTermTimeWeeks', - 'ignoreTermTimeWeeksForFteFinalPay' => 'setIgnoreTermTimeWeeksForFteFinalPay', - 'showFteAnnualSalaryForFteFinalPay' => 'setShowFteAnnualSalaryForFteFinalPay', - 'casualStaffHoursAsOne' => 'setCasualStaffHoursAsOne', - 'casualStaffIndicatorAsY' => 'setCasualStaffIndicatorAsY', - 'ignoreHours' => 'setIgnoreHours', - 'forceUpperCase' => 'setForceUpperCase', 'salaryType' => 'setSalaryType', - 'customText' => 'setCustomText' + 'showFteAnnualSalaryForFteFinalPay' => 'setShowFteAnnualSalaryForFteFinalPay' ]; /** @@ -294,29 +294,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'breakReasonSmpIndicatorOnly' => 'getBreakReasonSmpIndicatorOnly', + 'casualStaffHoursAsOne' => 'getCasualStaffHoursAsOne', + 'casualStaffIndicatorAsY' => 'getCasualStaffIndicatorAsY', + 'customText' => 'getCustomText', 'fileType' => 'getFileType', + 'forceUpperCase' => 'getForceUpperCase', + 'ignoreHours' => 'getIgnoreHours', + 'ignoreTermTimeWeeksForFteFinalPay' => 'getIgnoreTermTimeWeeksForFteFinalPay', + 'includeAeQualifyingEarnings' => 'getIncludeAeQualifyingEarnings', + 'includeEmploymentBreaks' => 'getIncludeEmploymentBreaks', 'payrollReference1' => 'getPayrollReference1', 'payrollReference2' => 'getPayrollReference2', 'payrollReference3' => 'getPayrollReference3', 'populateEmailAddress' => 'getPopulateEmailAddress', - 'populateTelephoneNumber' => 'getPopulateTelephoneNumber', + 'populateMaritalStatus' => 'getPopulateMaritalStatus', 'populateMobileNumber' => 'getPopulateMobileNumber', - 'populateWorksPlaceName' => 'getPopulateWorksPlaceName', + 'populateTelephoneNumber' => 'getPopulateTelephoneNumber', 'populateWorksAddress' => 'getPopulateWorksAddress', 'populateWorksEmailAddress' => 'getPopulateWorksEmailAddress', - 'includeEmploymentBreaks' => 'getIncludeEmploymentBreaks', - 'breakReasonSmpIndicatorOnly' => 'getBreakReasonSmpIndicatorOnly', - 'populateMaritalStatus' => 'getPopulateMaritalStatus', - 'includeAeQualifyingEarnings' => 'getIncludeAeQualifyingEarnings', + 'populateWorksPlaceName' => 'getPopulateWorksPlaceName', 'proRatePtHoursByTermTimeWeeks' => 'getProRatePtHoursByTermTimeWeeks', - 'ignoreTermTimeWeeksForFteFinalPay' => 'getIgnoreTermTimeWeeksForFteFinalPay', - 'showFteAnnualSalaryForFteFinalPay' => 'getShowFteAnnualSalaryForFteFinalPay', - 'casualStaffHoursAsOne' => 'getCasualStaffHoursAsOne', - 'casualStaffIndicatorAsY' => 'getCasualStaffIndicatorAsY', - 'ignoreHours' => 'getIgnoreHours', - 'forceUpperCase' => 'getForceUpperCase', 'salaryType' => 'getSalaryType', - 'customText' => 'getCustomText' + 'showFteAnnualSalaryForFteFinalPay' => 'getShowFteAnnualSalaryForFteFinalPay' ]; /** @@ -375,29 +375,29 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('breakReasonSmpIndicatorOnly', $data ?? [], null); + $this->setIfExists('casualStaffHoursAsOne', $data ?? [], null); + $this->setIfExists('casualStaffIndicatorAsY', $data ?? [], null); + $this->setIfExists('customText', $data ?? [], null); $this->setIfExists('fileType', $data ?? [], null); + $this->setIfExists('forceUpperCase', $data ?? [], null); + $this->setIfExists('ignoreHours', $data ?? [], null); + $this->setIfExists('ignoreTermTimeWeeksForFteFinalPay', $data ?? [], null); + $this->setIfExists('includeAeQualifyingEarnings', $data ?? [], null); + $this->setIfExists('includeEmploymentBreaks', $data ?? [], null); $this->setIfExists('payrollReference1', $data ?? [], null); $this->setIfExists('payrollReference2', $data ?? [], null); $this->setIfExists('payrollReference3', $data ?? [], null); $this->setIfExists('populateEmailAddress', $data ?? [], null); - $this->setIfExists('populateTelephoneNumber', $data ?? [], null); + $this->setIfExists('populateMaritalStatus', $data ?? [], null); $this->setIfExists('populateMobileNumber', $data ?? [], null); - $this->setIfExists('populateWorksPlaceName', $data ?? [], null); + $this->setIfExists('populateTelephoneNumber', $data ?? [], null); $this->setIfExists('populateWorksAddress', $data ?? [], null); $this->setIfExists('populateWorksEmailAddress', $data ?? [], null); - $this->setIfExists('includeEmploymentBreaks', $data ?? [], null); - $this->setIfExists('breakReasonSmpIndicatorOnly', $data ?? [], null); - $this->setIfExists('populateMaritalStatus', $data ?? [], null); - $this->setIfExists('includeAeQualifyingEarnings', $data ?? [], null); + $this->setIfExists('populateWorksPlaceName', $data ?? [], null); $this->setIfExists('proRatePtHoursByTermTimeWeeks', $data ?? [], null); - $this->setIfExists('ignoreTermTimeWeeksForFteFinalPay', $data ?? [], null); - $this->setIfExists('showFteAnnualSalaryForFteFinalPay', $data ?? [], null); - $this->setIfExists('casualStaffHoursAsOne', $data ?? [], null); - $this->setIfExists('casualStaffIndicatorAsY', $data ?? [], null); - $this->setIfExists('ignoreHours', $data ?? [], null); - $this->setIfExists('forceUpperCase', $data ?? [], null); $this->setIfExists('salaryType', $data ?? [], null); - $this->setIfExists('customText', $data ?? [], null); + $this->setIfExists('showFteAnnualSalaryForFteFinalPay', $data ?? [], null); } /** @@ -443,568 +443,575 @@ public function valid(): bool /** - * Gets fileType + * Gets breakReasonSmpIndicatorOnly * - * @return \SynergiTech\Staffology\Model\LgpsIConnectFileType|null + * @return bool|null */ - public function getFileType(): ?\SynergiTech\Staffology\Model\LgpsIConnectFileType + public function getBreakReasonSmpIndicatorOnly(): ?bool { - return $this->container['fileType']; + return $this->container['breakReasonSmpIndicatorOnly']; } /** - * Sets fileType + * Sets breakReasonSmpIndicatorOnly * - * @param \SynergiTech\Staffology\Model\LgpsIConnectFileType|null $fileType fileType + * @param bool|null $breakReasonSmpIndicatorOnly breakReasonSmpIndicatorOnly * * @return $this */ - public function setFileType(?\SynergiTech\Staffology\Model\LgpsIConnectFileType $fileType): static + public function setBreakReasonSmpIndicatorOnly(?bool $breakReasonSmpIndicatorOnly): static { - if (is_null($fileType)) { - throw new InvalidArgumentException('non-nullable fileType cannot be null'); + if (is_null($breakReasonSmpIndicatorOnly)) { + throw new InvalidArgumentException('non-nullable breakReasonSmpIndicatorOnly cannot be null'); } - $this->container['fileType'] = $fileType; + $this->container['breakReasonSmpIndicatorOnly'] = $breakReasonSmpIndicatorOnly; return $this; } /** - * Gets payrollReference1 + * Gets casualStaffHoursAsOne * - * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null + * @return bool|null */ - public function getPayrollReference1(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference + public function getCasualStaffHoursAsOne(): ?bool { - return $this->container['payrollReference1']; + return $this->container['casualStaffHoursAsOne']; } /** - * Sets payrollReference1 + * Sets casualStaffHoursAsOne * - * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference1 payrollReference1 + * @param bool|null $casualStaffHoursAsOne casualStaffHoursAsOne * * @return $this */ - public function setPayrollReference1(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference1): static + public function setCasualStaffHoursAsOne(?bool $casualStaffHoursAsOne): static { - if (is_null($payrollReference1)) { - throw new InvalidArgumentException('non-nullable payrollReference1 cannot be null'); + if (is_null($casualStaffHoursAsOne)) { + throw new InvalidArgumentException('non-nullable casualStaffHoursAsOne cannot be null'); } - $this->container['payrollReference1'] = $payrollReference1; + $this->container['casualStaffHoursAsOne'] = $casualStaffHoursAsOne; return $this; } /** - * Gets payrollReference2 + * Gets casualStaffIndicatorAsY * - * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null + * @return bool|null */ - public function getPayrollReference2(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference + public function getCasualStaffIndicatorAsY(): ?bool { - return $this->container['payrollReference2']; + return $this->container['casualStaffIndicatorAsY']; } /** - * Sets payrollReference2 + * Sets casualStaffIndicatorAsY * - * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference2 payrollReference2 + * @param bool|null $casualStaffIndicatorAsY casualStaffIndicatorAsY * * @return $this */ - public function setPayrollReference2(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference2): static + public function setCasualStaffIndicatorAsY(?bool $casualStaffIndicatorAsY): static { - if (is_null($payrollReference2)) { - throw new InvalidArgumentException('non-nullable payrollReference2 cannot be null'); + if (is_null($casualStaffIndicatorAsY)) { + throw new InvalidArgumentException('non-nullable casualStaffIndicatorAsY cannot be null'); } - $this->container['payrollReference2'] = $payrollReference2; + $this->container['casualStaffIndicatorAsY'] = $casualStaffIndicatorAsY; return $this; } /** - * Gets payrollReference3 + * Gets customText * - * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null + * @return string|null */ - public function getPayrollReference3(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference + public function getCustomText(): ?string { - return $this->container['payrollReference3']; + return $this->container['customText']; } /** - * Sets payrollReference3 + * Sets customText * - * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference3 payrollReference3 + * @param string|null $customText customText * * @return $this */ - public function setPayrollReference3(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference3): static + public function setCustomText(?string $customText): static { - if (is_null($payrollReference3)) { - throw new InvalidArgumentException('non-nullable payrollReference3 cannot be null'); + if (is_null($customText)) { + array_push($this->openAPINullablesSetToNull, 'customText'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('customText', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payrollReference3'] = $payrollReference3; + $this->container['customText'] = $customText; return $this; } /** - * Gets populateEmailAddress + * Gets fileType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsIConnectFileType|null */ - public function getPopulateEmailAddress(): ?bool + public function getFileType(): ?\SynergiTech\Staffology\Model\LgpsIConnectFileType { - return $this->container['populateEmailAddress']; + return $this->container['fileType']; } /** - * Sets populateEmailAddress + * Sets fileType * - * @param bool|null $populateEmailAddress populateEmailAddress + * @param \SynergiTech\Staffology\Model\LgpsIConnectFileType|null $fileType fileType * * @return $this */ - public function setPopulateEmailAddress(?bool $populateEmailAddress): static + public function setFileType(?\SynergiTech\Staffology\Model\LgpsIConnectFileType $fileType): static { - if (is_null($populateEmailAddress)) { - throw new InvalidArgumentException('non-nullable populateEmailAddress cannot be null'); + if (is_null($fileType)) { + throw new InvalidArgumentException('non-nullable fileType cannot be null'); } - $this->container['populateEmailAddress'] = $populateEmailAddress; + $this->container['fileType'] = $fileType; return $this; } /** - * Gets populateTelephoneNumber + * Gets forceUpperCase * * @return bool|null */ - public function getPopulateTelephoneNumber(): ?bool + public function getForceUpperCase(): ?bool { - return $this->container['populateTelephoneNumber']; + return $this->container['forceUpperCase']; } /** - * Sets populateTelephoneNumber + * Sets forceUpperCase * - * @param bool|null $populateTelephoneNumber populateTelephoneNumber + * @param bool|null $forceUpperCase forceUpperCase * * @return $this */ - public function setPopulateTelephoneNumber(?bool $populateTelephoneNumber): static + public function setForceUpperCase(?bool $forceUpperCase): static { - if (is_null($populateTelephoneNumber)) { - throw new InvalidArgumentException('non-nullable populateTelephoneNumber cannot be null'); + if (is_null($forceUpperCase)) { + throw new InvalidArgumentException('non-nullable forceUpperCase cannot be null'); } - $this->container['populateTelephoneNumber'] = $populateTelephoneNumber; + $this->container['forceUpperCase'] = $forceUpperCase; return $this; } /** - * Gets populateMobileNumber + * Gets ignoreHours * * @return bool|null */ - public function getPopulateMobileNumber(): ?bool + public function getIgnoreHours(): ?bool { - return $this->container['populateMobileNumber']; + return $this->container['ignoreHours']; } /** - * Sets populateMobileNumber + * Sets ignoreHours * - * @param bool|null $populateMobileNumber populateMobileNumber + * @param bool|null $ignoreHours ignoreHours * * @return $this */ - public function setPopulateMobileNumber(?bool $populateMobileNumber): static + public function setIgnoreHours(?bool $ignoreHours): static { - if (is_null($populateMobileNumber)) { - throw new InvalidArgumentException('non-nullable populateMobileNumber cannot be null'); + if (is_null($ignoreHours)) { + throw new InvalidArgumentException('non-nullable ignoreHours cannot be null'); } - $this->container['populateMobileNumber'] = $populateMobileNumber; + $this->container['ignoreHours'] = $ignoreHours; return $this; } /** - * Gets populateWorksPlaceName + * Gets ignoreTermTimeWeeksForFteFinalPay * * @return bool|null */ - public function getPopulateWorksPlaceName(): ?bool + public function getIgnoreTermTimeWeeksForFteFinalPay(): ?bool { - return $this->container['populateWorksPlaceName']; + return $this->container['ignoreTermTimeWeeksForFteFinalPay']; } /** - * Sets populateWorksPlaceName + * Sets ignoreTermTimeWeeksForFteFinalPay * - * @param bool|null $populateWorksPlaceName populateWorksPlaceName + * @param bool|null $ignoreTermTimeWeeksForFteFinalPay ignoreTermTimeWeeksForFteFinalPay * * @return $this */ - public function setPopulateWorksPlaceName(?bool $populateWorksPlaceName): static + public function setIgnoreTermTimeWeeksForFteFinalPay(?bool $ignoreTermTimeWeeksForFteFinalPay): static { - if (is_null($populateWorksPlaceName)) { - throw new InvalidArgumentException('non-nullable populateWorksPlaceName cannot be null'); + if (is_null($ignoreTermTimeWeeksForFteFinalPay)) { + throw new InvalidArgumentException('non-nullable ignoreTermTimeWeeksForFteFinalPay cannot be null'); } - $this->container['populateWorksPlaceName'] = $populateWorksPlaceName; + $this->container['ignoreTermTimeWeeksForFteFinalPay'] = $ignoreTermTimeWeeksForFteFinalPay; return $this; } /** - * Gets populateWorksAddress + * Gets includeAeQualifyingEarnings * * @return bool|null */ - public function getPopulateWorksAddress(): ?bool + public function getIncludeAeQualifyingEarnings(): ?bool { - return $this->container['populateWorksAddress']; + return $this->container['includeAeQualifyingEarnings']; } /** - * Sets populateWorksAddress + * Sets includeAeQualifyingEarnings * - * @param bool|null $populateWorksAddress populateWorksAddress + * @param bool|null $includeAeQualifyingEarnings includeAeQualifyingEarnings * * @return $this */ - public function setPopulateWorksAddress(?bool $populateWorksAddress): static + public function setIncludeAeQualifyingEarnings(?bool $includeAeQualifyingEarnings): static { - if (is_null($populateWorksAddress)) { - throw new InvalidArgumentException('non-nullable populateWorksAddress cannot be null'); + if (is_null($includeAeQualifyingEarnings)) { + throw new InvalidArgumentException('non-nullable includeAeQualifyingEarnings cannot be null'); } - $this->container['populateWorksAddress'] = $populateWorksAddress; + $this->container['includeAeQualifyingEarnings'] = $includeAeQualifyingEarnings; return $this; } /** - * Gets populateWorksEmailAddress + * Gets includeEmploymentBreaks * * @return bool|null */ - public function getPopulateWorksEmailAddress(): ?bool + public function getIncludeEmploymentBreaks(): ?bool { - return $this->container['populateWorksEmailAddress']; + return $this->container['includeEmploymentBreaks']; } /** - * Sets populateWorksEmailAddress + * Sets includeEmploymentBreaks * - * @param bool|null $populateWorksEmailAddress populateWorksEmailAddress + * @param bool|null $includeEmploymentBreaks includeEmploymentBreaks * * @return $this */ - public function setPopulateWorksEmailAddress(?bool $populateWorksEmailAddress): static + public function setIncludeEmploymentBreaks(?bool $includeEmploymentBreaks): static { - if (is_null($populateWorksEmailAddress)) { - throw new InvalidArgumentException('non-nullable populateWorksEmailAddress cannot be null'); + if (is_null($includeEmploymentBreaks)) { + throw new InvalidArgumentException('non-nullable includeEmploymentBreaks cannot be null'); } - $this->container['populateWorksEmailAddress'] = $populateWorksEmailAddress; + $this->container['includeEmploymentBreaks'] = $includeEmploymentBreaks; return $this; } /** - * Gets includeEmploymentBreaks + * Gets payrollReference1 * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null */ - public function getIncludeEmploymentBreaks(): ?bool + public function getPayrollReference1(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference { - return $this->container['includeEmploymentBreaks']; + return $this->container['payrollReference1']; } /** - * Sets includeEmploymentBreaks + * Sets payrollReference1 * - * @param bool|null $includeEmploymentBreaks includeEmploymentBreaks + * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference1 payrollReference1 * * @return $this */ - public function setIncludeEmploymentBreaks(?bool $includeEmploymentBreaks): static + public function setPayrollReference1(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference1): static { - if (is_null($includeEmploymentBreaks)) { - throw new InvalidArgumentException('non-nullable includeEmploymentBreaks cannot be null'); + if (is_null($payrollReference1)) { + throw new InvalidArgumentException('non-nullable payrollReference1 cannot be null'); } - $this->container['includeEmploymentBreaks'] = $includeEmploymentBreaks; + $this->container['payrollReference1'] = $payrollReference1; return $this; } /** - * Gets breakReasonSmpIndicatorOnly + * Gets payrollReference2 * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null */ - public function getBreakReasonSmpIndicatorOnly(): ?bool + public function getPayrollReference2(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference { - return $this->container['breakReasonSmpIndicatorOnly']; + return $this->container['payrollReference2']; } /** - * Sets breakReasonSmpIndicatorOnly + * Sets payrollReference2 * - * @param bool|null $breakReasonSmpIndicatorOnly breakReasonSmpIndicatorOnly + * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference2 payrollReference2 * * @return $this */ - public function setBreakReasonSmpIndicatorOnly(?bool $breakReasonSmpIndicatorOnly): static + public function setPayrollReference2(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference2): static { - if (is_null($breakReasonSmpIndicatorOnly)) { - throw new InvalidArgumentException('non-nullable breakReasonSmpIndicatorOnly cannot be null'); + if (is_null($payrollReference2)) { + throw new InvalidArgumentException('non-nullable payrollReference2 cannot be null'); } - $this->container['breakReasonSmpIndicatorOnly'] = $breakReasonSmpIndicatorOnly; + $this->container['payrollReference2'] = $payrollReference2; return $this; } /** - * Gets populateMaritalStatus + * Gets payrollReference3 * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null */ - public function getPopulateMaritalStatus(): ?bool + public function getPayrollReference3(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference { - return $this->container['populateMaritalStatus']; + return $this->container['payrollReference3']; } /** - * Sets populateMaritalStatus + * Sets payrollReference3 * - * @param bool|null $populateMaritalStatus populateMaritalStatus + * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference3 payrollReference3 * * @return $this */ - public function setPopulateMaritalStatus(?bool $populateMaritalStatus): static + public function setPayrollReference3(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference3): static { - if (is_null($populateMaritalStatus)) { - throw new InvalidArgumentException('non-nullable populateMaritalStatus cannot be null'); + if (is_null($payrollReference3)) { + throw new InvalidArgumentException('non-nullable payrollReference3 cannot be null'); } - $this->container['populateMaritalStatus'] = $populateMaritalStatus; + $this->container['payrollReference3'] = $payrollReference3; return $this; } /** - * Gets includeAeQualifyingEarnings + * Gets populateEmailAddress * * @return bool|null */ - public function getIncludeAeQualifyingEarnings(): ?bool + public function getPopulateEmailAddress(): ?bool { - return $this->container['includeAeQualifyingEarnings']; + return $this->container['populateEmailAddress']; } /** - * Sets includeAeQualifyingEarnings + * Sets populateEmailAddress * - * @param bool|null $includeAeQualifyingEarnings includeAeQualifyingEarnings + * @param bool|null $populateEmailAddress populateEmailAddress * * @return $this */ - public function setIncludeAeQualifyingEarnings(?bool $includeAeQualifyingEarnings): static + public function setPopulateEmailAddress(?bool $populateEmailAddress): static { - if (is_null($includeAeQualifyingEarnings)) { - throw new InvalidArgumentException('non-nullable includeAeQualifyingEarnings cannot be null'); + if (is_null($populateEmailAddress)) { + throw new InvalidArgumentException('non-nullable populateEmailAddress cannot be null'); } - $this->container['includeAeQualifyingEarnings'] = $includeAeQualifyingEarnings; + $this->container['populateEmailAddress'] = $populateEmailAddress; return $this; } /** - * Gets proRatePtHoursByTermTimeWeeks + * Gets populateMaritalStatus * * @return bool|null */ - public function getProRatePtHoursByTermTimeWeeks(): ?bool + public function getPopulateMaritalStatus(): ?bool { - return $this->container['proRatePtHoursByTermTimeWeeks']; + return $this->container['populateMaritalStatus']; } /** - * Sets proRatePtHoursByTermTimeWeeks + * Sets populateMaritalStatus * - * @param bool|null $proRatePtHoursByTermTimeWeeks proRatePtHoursByTermTimeWeeks + * @param bool|null $populateMaritalStatus populateMaritalStatus * * @return $this */ - public function setProRatePtHoursByTermTimeWeeks(?bool $proRatePtHoursByTermTimeWeeks): static + public function setPopulateMaritalStatus(?bool $populateMaritalStatus): static { - if (is_null($proRatePtHoursByTermTimeWeeks)) { - throw new InvalidArgumentException('non-nullable proRatePtHoursByTermTimeWeeks cannot be null'); + if (is_null($populateMaritalStatus)) { + throw new InvalidArgumentException('non-nullable populateMaritalStatus cannot be null'); } - $this->container['proRatePtHoursByTermTimeWeeks'] = $proRatePtHoursByTermTimeWeeks; + $this->container['populateMaritalStatus'] = $populateMaritalStatus; return $this; } /** - * Gets ignoreTermTimeWeeksForFteFinalPay + * Gets populateMobileNumber * * @return bool|null */ - public function getIgnoreTermTimeWeeksForFteFinalPay(): ?bool + public function getPopulateMobileNumber(): ?bool { - return $this->container['ignoreTermTimeWeeksForFteFinalPay']; + return $this->container['populateMobileNumber']; } /** - * Sets ignoreTermTimeWeeksForFteFinalPay + * Sets populateMobileNumber * - * @param bool|null $ignoreTermTimeWeeksForFteFinalPay ignoreTermTimeWeeksForFteFinalPay + * @param bool|null $populateMobileNumber populateMobileNumber * * @return $this */ - public function setIgnoreTermTimeWeeksForFteFinalPay(?bool $ignoreTermTimeWeeksForFteFinalPay): static + public function setPopulateMobileNumber(?bool $populateMobileNumber): static { - if (is_null($ignoreTermTimeWeeksForFteFinalPay)) { - throw new InvalidArgumentException('non-nullable ignoreTermTimeWeeksForFteFinalPay cannot be null'); + if (is_null($populateMobileNumber)) { + throw new InvalidArgumentException('non-nullable populateMobileNumber cannot be null'); } - $this->container['ignoreTermTimeWeeksForFteFinalPay'] = $ignoreTermTimeWeeksForFteFinalPay; + $this->container['populateMobileNumber'] = $populateMobileNumber; return $this; } /** - * Gets showFteAnnualSalaryForFteFinalPay + * Gets populateTelephoneNumber * * @return bool|null */ - public function getShowFteAnnualSalaryForFteFinalPay(): ?bool + public function getPopulateTelephoneNumber(): ?bool { - return $this->container['showFteAnnualSalaryForFteFinalPay']; + return $this->container['populateTelephoneNumber']; } /** - * Sets showFteAnnualSalaryForFteFinalPay + * Sets populateTelephoneNumber * - * @param bool|null $showFteAnnualSalaryForFteFinalPay showFteAnnualSalaryForFteFinalPay + * @param bool|null $populateTelephoneNumber populateTelephoneNumber * * @return $this */ - public function setShowFteAnnualSalaryForFteFinalPay(?bool $showFteAnnualSalaryForFteFinalPay): static + public function setPopulateTelephoneNumber(?bool $populateTelephoneNumber): static { - if (is_null($showFteAnnualSalaryForFteFinalPay)) { - throw new InvalidArgumentException('non-nullable showFteAnnualSalaryForFteFinalPay cannot be null'); + if (is_null($populateTelephoneNumber)) { + throw new InvalidArgumentException('non-nullable populateTelephoneNumber cannot be null'); } - $this->container['showFteAnnualSalaryForFteFinalPay'] = $showFteAnnualSalaryForFteFinalPay; + $this->container['populateTelephoneNumber'] = $populateTelephoneNumber; return $this; } /** - * Gets casualStaffHoursAsOne + * Gets populateWorksAddress * * @return bool|null */ - public function getCasualStaffHoursAsOne(): ?bool + public function getPopulateWorksAddress(): ?bool { - return $this->container['casualStaffHoursAsOne']; + return $this->container['populateWorksAddress']; } /** - * Sets casualStaffHoursAsOne + * Sets populateWorksAddress * - * @param bool|null $casualStaffHoursAsOne casualStaffHoursAsOne + * @param bool|null $populateWorksAddress populateWorksAddress * * @return $this */ - public function setCasualStaffHoursAsOne(?bool $casualStaffHoursAsOne): static + public function setPopulateWorksAddress(?bool $populateWorksAddress): static { - if (is_null($casualStaffHoursAsOne)) { - throw new InvalidArgumentException('non-nullable casualStaffHoursAsOne cannot be null'); + if (is_null($populateWorksAddress)) { + throw new InvalidArgumentException('non-nullable populateWorksAddress cannot be null'); } - $this->container['casualStaffHoursAsOne'] = $casualStaffHoursAsOne; + $this->container['populateWorksAddress'] = $populateWorksAddress; return $this; } /** - * Gets casualStaffIndicatorAsY + * Gets populateWorksEmailAddress * * @return bool|null */ - public function getCasualStaffIndicatorAsY(): ?bool + public function getPopulateWorksEmailAddress(): ?bool { - return $this->container['casualStaffIndicatorAsY']; + return $this->container['populateWorksEmailAddress']; } /** - * Sets casualStaffIndicatorAsY + * Sets populateWorksEmailAddress * - * @param bool|null $casualStaffIndicatorAsY casualStaffIndicatorAsY + * @param bool|null $populateWorksEmailAddress populateWorksEmailAddress * * @return $this */ - public function setCasualStaffIndicatorAsY(?bool $casualStaffIndicatorAsY): static + public function setPopulateWorksEmailAddress(?bool $populateWorksEmailAddress): static { - if (is_null($casualStaffIndicatorAsY)) { - throw new InvalidArgumentException('non-nullable casualStaffIndicatorAsY cannot be null'); + if (is_null($populateWorksEmailAddress)) { + throw new InvalidArgumentException('non-nullable populateWorksEmailAddress cannot be null'); } - $this->container['casualStaffIndicatorAsY'] = $casualStaffIndicatorAsY; + $this->container['populateWorksEmailAddress'] = $populateWorksEmailAddress; return $this; } /** - * Gets ignoreHours + * Gets populateWorksPlaceName * * @return bool|null */ - public function getIgnoreHours(): ?bool + public function getPopulateWorksPlaceName(): ?bool { - return $this->container['ignoreHours']; + return $this->container['populateWorksPlaceName']; } /** - * Sets ignoreHours + * Sets populateWorksPlaceName * - * @param bool|null $ignoreHours ignoreHours + * @param bool|null $populateWorksPlaceName populateWorksPlaceName * * @return $this */ - public function setIgnoreHours(?bool $ignoreHours): static + public function setPopulateWorksPlaceName(?bool $populateWorksPlaceName): static { - if (is_null($ignoreHours)) { - throw new InvalidArgumentException('non-nullable ignoreHours cannot be null'); + if (is_null($populateWorksPlaceName)) { + throw new InvalidArgumentException('non-nullable populateWorksPlaceName cannot be null'); } - $this->container['ignoreHours'] = $ignoreHours; + $this->container['populateWorksPlaceName'] = $populateWorksPlaceName; return $this; } /** - * Gets forceUpperCase + * Gets proRatePtHoursByTermTimeWeeks * * @return bool|null */ - public function getForceUpperCase(): ?bool + public function getProRatePtHoursByTermTimeWeeks(): ?bool { - return $this->container['forceUpperCase']; + return $this->container['proRatePtHoursByTermTimeWeeks']; } /** - * Sets forceUpperCase + * Sets proRatePtHoursByTermTimeWeeks * - * @param bool|null $forceUpperCase forceUpperCase + * @param bool|null $proRatePtHoursByTermTimeWeeks proRatePtHoursByTermTimeWeeks * * @return $this */ - public function setForceUpperCase(?bool $forceUpperCase): static + public function setProRatePtHoursByTermTimeWeeks(?bool $proRatePtHoursByTermTimeWeeks): static { - if (is_null($forceUpperCase)) { - throw new InvalidArgumentException('non-nullable forceUpperCase cannot be null'); + if (is_null($proRatePtHoursByTermTimeWeeks)) { + throw new InvalidArgumentException('non-nullable proRatePtHoursByTermTimeWeeks cannot be null'); } - $this->container['forceUpperCase'] = $forceUpperCase; + $this->container['proRatePtHoursByTermTimeWeeks'] = $proRatePtHoursByTermTimeWeeks; return $this; } @@ -1037,35 +1044,28 @@ public function setSalaryType(?\SynergiTech\Staffology\Model\LgpsIConnectSalaryT } /** - * Gets customText + * Gets showFteAnnualSalaryForFteFinalPay * - * @return string|null + * @return bool|null */ - public function getCustomText(): ?string + public function getShowFteAnnualSalaryForFteFinalPay(): ?bool { - return $this->container['customText']; + return $this->container['showFteAnnualSalaryForFteFinalPay']; } /** - * Sets customText + * Sets showFteAnnualSalaryForFteFinalPay * - * @param string|null $customText customText + * @param bool|null $showFteAnnualSalaryForFteFinalPay showFteAnnualSalaryForFteFinalPay * * @return $this */ - public function setCustomText(?string $customText): static + public function setShowFteAnnualSalaryForFteFinalPay(?bool $showFteAnnualSalaryForFteFinalPay): static { - if (is_null($customText)) { - array_push($this->openAPINullablesSetToNull, 'customText'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('customText', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($showFteAnnualSalaryForFteFinalPay)) { + throw new InvalidArgumentException('non-nullable showFteAnnualSalaryForFteFinalPay cannot be null'); } - $this->container['customText'] = $customText; + $this->container['showFteAnnualSalaryForFteFinalPay'] = $showFteAnnualSalaryForFteFinalPay; return $this; } diff --git a/src/Model/ContractPensionSchemeRequest.php b/src/Model/ContractPensionSchemeRequest.php index 4bb19a7..f15326b 100644 --- a/src/Model/ContractPensionSchemeRequest.php +++ b/src/Model/ContractPensionSchemeRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,38 +59,38 @@ class ContractPensionSchemeRequest implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'name' => 'string', - 'provider' => '\SynergiTech\Staffology\Model\ContractPensionProviderRequest', 'administrator' => '\SynergiTech\Staffology\Model\ContractPensionAdministratorRequest', - 'pensionRule' => '\SynergiTech\Staffology\Model\PensionRule', - 'qualifyingScheme' => 'bool', - 'disableAeLetters' => 'bool', - 'subtractBasicRateTax' => 'bool', - 'payMethod' => '\SynergiTech\Staffology\Model\PayMethod', 'bankDetails' => '\SynergiTech\Staffology\Model\ContractBankDetails', - 'useCustomPayCodes' => 'bool', - 'useCustomPayCodesForTierablePay' => 'bool', 'customPayCodes' => 'string[]', - 'tierablePayCustomPayCodes' => 'string[]', - 'workerGroups' => '\SynergiTech\Staffology\Model\ContractWorkerGroupRequest[]', - 'externalDataProviderId' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', - 'externalDataCompany' => '\SynergiTech\Staffology\Model\ContractExternalDataCompanyRequest', + 'deficitValue' => 'float', + 'deficitValueOrdinal' => 'int', + 'deficitValuePayPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'disableAeLetters' => 'bool', 'displayName' => 'string', - 'payCodeType' => '\SynergiTech\Staffology\Model\PensionPayCode', - 'tierablePayPayCodeType' => '\SynergiTech\Staffology\Model\PensionPayCode', + 'externalDataCompany' => '\SynergiTech\Staffology\Model\ContractExternalDataCompanyRequest', + 'externalDataProviderId' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', + 'id' => 'string', + 'includeDeficitValue' => 'bool', + 'name' => 'string', + 'nominalCodeMappings' => '\SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingRequest[]', 'payCodeSetUniqueId' => 'string', - 'tierablePayPayCodeSetUniqueId' => 'string', - 'paymentDateRule' => '\SynergiTech\Staffology\Model\PaymentDateRule', - 'paymentDateDayOfWeek' => '\SynergiTech\Staffology\Model\DayOfWeek', + 'payCodeType' => '\SynergiTech\Staffology\Model\PensionPayCode', + 'payMethod' => '\SynergiTech\Staffology\Model\PayMethod', 'paymentDateDayOfMonth' => 'int', - 'reportOptionsLgpsIConnect' => '\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsIConnectRequest', + 'paymentDateDayOfWeek' => '\SynergiTech\Staffology\Model\DayOfWeek', + 'paymentDateRule' => '\SynergiTech\Staffology\Model\PaymentDateRule', + 'pensionRule' => '\SynergiTech\Staffology\Model\PensionRule', + 'provider' => '\SynergiTech\Staffology\Model\ContractPensionProviderRequest', + 'qualifyingScheme' => 'bool', 'reportOptionsLgpsCivicaUpm' => '\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest', - 'deficitValueOrdinal' => 'int', - 'deficitValue' => 'float', - 'includeDeficitValue' => 'bool', - 'deficitValuePayPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', - 'nominalCodeMappings' => '\SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingRequest[]' + 'reportOptionsLgpsIConnect' => '\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsIConnectRequest', + 'subtractBasicRateTax' => 'bool', + 'tierablePayCustomPayCodes' => 'string[]', + 'tierablePayPayCodeSetUniqueId' => 'string', + 'tierablePayPayCodeType' => '\SynergiTech\Staffology\Model\PensionPayCode', + 'useCustomPayCodes' => 'bool', + 'useCustomPayCodesForTierablePay' => 'bool', + 'workerGroups' => '\SynergiTech\Staffology\Model\ContractWorkerGroupRequest[]' ]; /** @@ -99,38 +99,38 @@ class ContractPensionSchemeRequest implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'name' => null, - 'provider' => null, 'administrator' => null, - 'pensionRule' => null, - 'qualifyingScheme' => null, - 'disableAeLetters' => null, - 'subtractBasicRateTax' => null, - 'payMethod' => null, 'bankDetails' => null, - 'useCustomPayCodes' => null, - 'useCustomPayCodesForTierablePay' => null, 'customPayCodes' => null, - 'tierablePayCustomPayCodes' => null, - 'workerGroups' => null, - 'externalDataProviderId' => null, - 'externalDataCompany' => null, + 'deficitValue' => 'double', + 'deficitValueOrdinal' => 'int32', + 'deficitValuePayPeriod' => null, + 'disableAeLetters' => null, 'displayName' => null, - 'payCodeType' => null, - 'tierablePayPayCodeType' => null, + 'externalDataCompany' => null, + 'externalDataProviderId' => null, + 'id' => 'uuid', + 'includeDeficitValue' => null, + 'name' => null, + 'nominalCodeMappings' => null, 'payCodeSetUniqueId' => 'uuid', - 'tierablePayPayCodeSetUniqueId' => 'uuid', - 'paymentDateRule' => null, - 'paymentDateDayOfWeek' => null, + 'payCodeType' => null, + 'payMethod' => null, 'paymentDateDayOfMonth' => 'int32', - 'reportOptionsLgpsIConnect' => null, + 'paymentDateDayOfWeek' => null, + 'paymentDateRule' => null, + 'pensionRule' => null, + 'provider' => null, + 'qualifyingScheme' => null, 'reportOptionsLgpsCivicaUpm' => null, - 'deficitValueOrdinal' => 'int32', - 'deficitValue' => 'double', - 'includeDeficitValue' => null, - 'deficitValuePayPeriod' => null, - 'nominalCodeMappings' => null + 'reportOptionsLgpsIConnect' => null, + 'subtractBasicRateTax' => null, + 'tierablePayCustomPayCodes' => null, + 'tierablePayPayCodeSetUniqueId' => 'uuid', + 'tierablePayPayCodeType' => null, + 'useCustomPayCodes' => null, + 'useCustomPayCodesForTierablePay' => null, + 'workerGroups' => null ]; /** @@ -139,38 +139,38 @@ class ContractPensionSchemeRequest implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'name' => true, - 'provider' => false, 'administrator' => false, - 'pensionRule' => false, - 'qualifyingScheme' => false, - 'disableAeLetters' => false, - 'subtractBasicRateTax' => false, - 'payMethod' => false, 'bankDetails' => false, - 'useCustomPayCodes' => false, - 'useCustomPayCodesForTierablePay' => false, 'customPayCodes' => true, - 'tierablePayCustomPayCodes' => true, - 'workerGroups' => true, - 'externalDataProviderId' => false, - 'externalDataCompany' => false, + 'deficitValue' => true, + 'deficitValueOrdinal' => true, + 'deficitValuePayPeriod' => false, + 'disableAeLetters' => false, 'displayName' => true, - 'payCodeType' => false, - 'tierablePayPayCodeType' => false, + 'externalDataCompany' => false, + 'externalDataProviderId' => false, + 'id' => false, + 'includeDeficitValue' => false, + 'name' => true, + 'nominalCodeMappings' => true, 'payCodeSetUniqueId' => true, - 'tierablePayPayCodeSetUniqueId' => true, - 'paymentDateRule' => false, - 'paymentDateDayOfWeek' => false, + 'payCodeType' => false, + 'payMethod' => false, 'paymentDateDayOfMonth' => true, - 'reportOptionsLgpsIConnect' => false, + 'paymentDateDayOfWeek' => false, + 'paymentDateRule' => false, + 'pensionRule' => false, + 'provider' => false, + 'qualifyingScheme' => false, 'reportOptionsLgpsCivicaUpm' => false, - 'deficitValueOrdinal' => true, - 'deficitValue' => true, - 'includeDeficitValue' => false, - 'deficitValuePayPeriod' => false, - 'nominalCodeMappings' => true + 'reportOptionsLgpsIConnect' => false, + 'subtractBasicRateTax' => false, + 'tierablePayCustomPayCodes' => true, + 'tierablePayPayCodeSetUniqueId' => true, + 'tierablePayPayCodeType' => false, + 'useCustomPayCodes' => false, + 'useCustomPayCodesForTierablePay' => false, + 'workerGroups' => true ]; /** @@ -259,38 +259,38 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'name' => 'name', - 'provider' => 'provider', 'administrator' => 'administrator', - 'pensionRule' => 'pensionRule', - 'qualifyingScheme' => 'qualifyingScheme', - 'disableAeLetters' => 'disableAeLetters', - 'subtractBasicRateTax' => 'subtractBasicRateTax', - 'payMethod' => 'payMethod', 'bankDetails' => 'bankDetails', - 'useCustomPayCodes' => 'useCustomPayCodes', - 'useCustomPayCodesForTierablePay' => 'useCustomPayCodesForTierablePay', 'customPayCodes' => 'customPayCodes', - 'tierablePayCustomPayCodes' => 'tierablePayCustomPayCodes', - 'workerGroups' => 'workerGroups', - 'externalDataProviderId' => 'externalDataProviderId', - 'externalDataCompany' => 'externalDataCompany', + 'deficitValue' => 'deficitValue', + 'deficitValueOrdinal' => 'deficitValueOrdinal', + 'deficitValuePayPeriod' => 'deficitValuePayPeriod', + 'disableAeLetters' => 'disableAeLetters', 'displayName' => 'displayName', - 'payCodeType' => 'payCodeType', - 'tierablePayPayCodeType' => 'tierablePayPayCodeType', + 'externalDataCompany' => 'externalDataCompany', + 'externalDataProviderId' => 'externalDataProviderId', + 'id' => 'id', + 'includeDeficitValue' => 'includeDeficitValue', + 'name' => 'name', + 'nominalCodeMappings' => 'nominalCodeMappings', 'payCodeSetUniqueId' => 'payCodeSetUniqueId', - 'tierablePayPayCodeSetUniqueId' => 'tierablePayPayCodeSetUniqueId', - 'paymentDateRule' => 'paymentDateRule', - 'paymentDateDayOfWeek' => 'paymentDateDayOfWeek', + 'payCodeType' => 'payCodeType', + 'payMethod' => 'payMethod', 'paymentDateDayOfMonth' => 'paymentDateDayOfMonth', - 'reportOptionsLgpsIConnect' => 'reportOptionsLgpsIConnect', + 'paymentDateDayOfWeek' => 'paymentDateDayOfWeek', + 'paymentDateRule' => 'paymentDateRule', + 'pensionRule' => 'pensionRule', + 'provider' => 'provider', + 'qualifyingScheme' => 'qualifyingScheme', 'reportOptionsLgpsCivicaUpm' => 'reportOptionsLgpsCivicaUpm', - 'deficitValueOrdinal' => 'deficitValueOrdinal', - 'deficitValue' => 'deficitValue', - 'includeDeficitValue' => 'includeDeficitValue', - 'deficitValuePayPeriod' => 'deficitValuePayPeriod', - 'nominalCodeMappings' => 'nominalCodeMappings' + 'reportOptionsLgpsIConnect' => 'reportOptionsLgpsIConnect', + 'subtractBasicRateTax' => 'subtractBasicRateTax', + 'tierablePayCustomPayCodes' => 'tierablePayCustomPayCodes', + 'tierablePayPayCodeSetUniqueId' => 'tierablePayPayCodeSetUniqueId', + 'tierablePayPayCodeType' => 'tierablePayPayCodeType', + 'useCustomPayCodes' => 'useCustomPayCodes', + 'useCustomPayCodesForTierablePay' => 'useCustomPayCodesForTierablePay', + 'workerGroups' => 'workerGroups' ]; /** @@ -299,38 +299,38 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'name' => 'setName', - 'provider' => 'setProvider', 'administrator' => 'setAdministrator', - 'pensionRule' => 'setPensionRule', - 'qualifyingScheme' => 'setQualifyingScheme', - 'disableAeLetters' => 'setDisableAeLetters', - 'subtractBasicRateTax' => 'setSubtractBasicRateTax', - 'payMethod' => 'setPayMethod', 'bankDetails' => 'setBankDetails', - 'useCustomPayCodes' => 'setUseCustomPayCodes', - 'useCustomPayCodesForTierablePay' => 'setUseCustomPayCodesForTierablePay', 'customPayCodes' => 'setCustomPayCodes', - 'tierablePayCustomPayCodes' => 'setTierablePayCustomPayCodes', - 'workerGroups' => 'setWorkerGroups', - 'externalDataProviderId' => 'setExternalDataProviderId', - 'externalDataCompany' => 'setExternalDataCompany', + 'deficitValue' => 'setDeficitValue', + 'deficitValueOrdinal' => 'setDeficitValueOrdinal', + 'deficitValuePayPeriod' => 'setDeficitValuePayPeriod', + 'disableAeLetters' => 'setDisableAeLetters', 'displayName' => 'setDisplayName', - 'payCodeType' => 'setPayCodeType', - 'tierablePayPayCodeType' => 'setTierablePayPayCodeType', + 'externalDataCompany' => 'setExternalDataCompany', + 'externalDataProviderId' => 'setExternalDataProviderId', + 'id' => 'setId', + 'includeDeficitValue' => 'setIncludeDeficitValue', + 'name' => 'setName', + 'nominalCodeMappings' => 'setNominalCodeMappings', 'payCodeSetUniqueId' => 'setPayCodeSetUniqueId', - 'tierablePayPayCodeSetUniqueId' => 'setTierablePayPayCodeSetUniqueId', - 'paymentDateRule' => 'setPaymentDateRule', - 'paymentDateDayOfWeek' => 'setPaymentDateDayOfWeek', + 'payCodeType' => 'setPayCodeType', + 'payMethod' => 'setPayMethod', 'paymentDateDayOfMonth' => 'setPaymentDateDayOfMonth', - 'reportOptionsLgpsIConnect' => 'setReportOptionsLgpsIConnect', + 'paymentDateDayOfWeek' => 'setPaymentDateDayOfWeek', + 'paymentDateRule' => 'setPaymentDateRule', + 'pensionRule' => 'setPensionRule', + 'provider' => 'setProvider', + 'qualifyingScheme' => 'setQualifyingScheme', 'reportOptionsLgpsCivicaUpm' => 'setReportOptionsLgpsCivicaUpm', - 'deficitValueOrdinal' => 'setDeficitValueOrdinal', - 'deficitValue' => 'setDeficitValue', - 'includeDeficitValue' => 'setIncludeDeficitValue', - 'deficitValuePayPeriod' => 'setDeficitValuePayPeriod', - 'nominalCodeMappings' => 'setNominalCodeMappings' + 'reportOptionsLgpsIConnect' => 'setReportOptionsLgpsIConnect', + 'subtractBasicRateTax' => 'setSubtractBasicRateTax', + 'tierablePayCustomPayCodes' => 'setTierablePayCustomPayCodes', + 'tierablePayPayCodeSetUniqueId' => 'setTierablePayPayCodeSetUniqueId', + 'tierablePayPayCodeType' => 'setTierablePayPayCodeType', + 'useCustomPayCodes' => 'setUseCustomPayCodes', + 'useCustomPayCodesForTierablePay' => 'setUseCustomPayCodesForTierablePay', + 'workerGroups' => 'setWorkerGroups' ]; /** @@ -339,38 +339,38 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'name' => 'getName', - 'provider' => 'getProvider', 'administrator' => 'getAdministrator', - 'pensionRule' => 'getPensionRule', - 'qualifyingScheme' => 'getQualifyingScheme', - 'disableAeLetters' => 'getDisableAeLetters', - 'subtractBasicRateTax' => 'getSubtractBasicRateTax', - 'payMethod' => 'getPayMethod', 'bankDetails' => 'getBankDetails', - 'useCustomPayCodes' => 'getUseCustomPayCodes', - 'useCustomPayCodesForTierablePay' => 'getUseCustomPayCodesForTierablePay', 'customPayCodes' => 'getCustomPayCodes', - 'tierablePayCustomPayCodes' => 'getTierablePayCustomPayCodes', - 'workerGroups' => 'getWorkerGroups', - 'externalDataProviderId' => 'getExternalDataProviderId', - 'externalDataCompany' => 'getExternalDataCompany', + 'deficitValue' => 'getDeficitValue', + 'deficitValueOrdinal' => 'getDeficitValueOrdinal', + 'deficitValuePayPeriod' => 'getDeficitValuePayPeriod', + 'disableAeLetters' => 'getDisableAeLetters', 'displayName' => 'getDisplayName', - 'payCodeType' => 'getPayCodeType', - 'tierablePayPayCodeType' => 'getTierablePayPayCodeType', + 'externalDataCompany' => 'getExternalDataCompany', + 'externalDataProviderId' => 'getExternalDataProviderId', + 'id' => 'getId', + 'includeDeficitValue' => 'getIncludeDeficitValue', + 'name' => 'getName', + 'nominalCodeMappings' => 'getNominalCodeMappings', 'payCodeSetUniqueId' => 'getPayCodeSetUniqueId', - 'tierablePayPayCodeSetUniqueId' => 'getTierablePayPayCodeSetUniqueId', - 'paymentDateRule' => 'getPaymentDateRule', - 'paymentDateDayOfWeek' => 'getPaymentDateDayOfWeek', + 'payCodeType' => 'getPayCodeType', + 'payMethod' => 'getPayMethod', 'paymentDateDayOfMonth' => 'getPaymentDateDayOfMonth', - 'reportOptionsLgpsIConnect' => 'getReportOptionsLgpsIConnect', - 'reportOptionsLgpsCivicaUpm' => 'getReportOptionsLgpsCivicaUpm', - 'deficitValueOrdinal' => 'getDeficitValueOrdinal', - 'deficitValue' => 'getDeficitValue', - 'includeDeficitValue' => 'getIncludeDeficitValue', - 'deficitValuePayPeriod' => 'getDeficitValuePayPeriod', - 'nominalCodeMappings' => 'getNominalCodeMappings' + 'paymentDateDayOfWeek' => 'getPaymentDateDayOfWeek', + 'paymentDateRule' => 'getPaymentDateRule', + 'pensionRule' => 'getPensionRule', + 'provider' => 'getProvider', + 'qualifyingScheme' => 'getQualifyingScheme', + 'reportOptionsLgpsCivicaUpm' => 'getReportOptionsLgpsCivicaUpm', + 'reportOptionsLgpsIConnect' => 'getReportOptionsLgpsIConnect', + 'subtractBasicRateTax' => 'getSubtractBasicRateTax', + 'tierablePayCustomPayCodes' => 'getTierablePayCustomPayCodes', + 'tierablePayPayCodeSetUniqueId' => 'getTierablePayPayCodeSetUniqueId', + 'tierablePayPayCodeType' => 'getTierablePayPayCodeType', + 'useCustomPayCodes' => 'getUseCustomPayCodes', + 'useCustomPayCodesForTierablePay' => 'getUseCustomPayCodesForTierablePay', + 'workerGroups' => 'getWorkerGroups' ]; /** @@ -429,38 +429,38 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('administrator', $data ?? [], null); + $this->setIfExists('bankDetails', $data ?? [], null); + $this->setIfExists('customPayCodes', $data ?? [], null); + $this->setIfExists('deficitValue', $data ?? [], null); + $this->setIfExists('deficitValueOrdinal', $data ?? [], null); + $this->setIfExists('deficitValuePayPeriod', $data ?? [], null); + $this->setIfExists('disableAeLetters', $data ?? [], null); + $this->setIfExists('displayName', $data ?? [], null); + $this->setIfExists('externalDataCompany', $data ?? [], null); + $this->setIfExists('externalDataProviderId', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('includeDeficitValue', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('provider', $data ?? [], null); - $this->setIfExists('administrator', $data ?? [], null); + $this->setIfExists('nominalCodeMappings', $data ?? [], null); + $this->setIfExists('payCodeSetUniqueId', $data ?? [], null); + $this->setIfExists('payCodeType', $data ?? [], null); + $this->setIfExists('payMethod', $data ?? [], null); + $this->setIfExists('paymentDateDayOfMonth', $data ?? [], null); + $this->setIfExists('paymentDateDayOfWeek', $data ?? [], null); + $this->setIfExists('paymentDateRule', $data ?? [], null); $this->setIfExists('pensionRule', $data ?? [], null); + $this->setIfExists('provider', $data ?? [], null); $this->setIfExists('qualifyingScheme', $data ?? [], null); - $this->setIfExists('disableAeLetters', $data ?? [], null); + $this->setIfExists('reportOptionsLgpsCivicaUpm', $data ?? [], null); + $this->setIfExists('reportOptionsLgpsIConnect', $data ?? [], null); $this->setIfExists('subtractBasicRateTax', $data ?? [], null); - $this->setIfExists('payMethod', $data ?? [], null); - $this->setIfExists('bankDetails', $data ?? [], null); + $this->setIfExists('tierablePayCustomPayCodes', $data ?? [], null); + $this->setIfExists('tierablePayPayCodeSetUniqueId', $data ?? [], null); + $this->setIfExists('tierablePayPayCodeType', $data ?? [], null); $this->setIfExists('useCustomPayCodes', $data ?? [], null); $this->setIfExists('useCustomPayCodesForTierablePay', $data ?? [], null); - $this->setIfExists('customPayCodes', $data ?? [], null); - $this->setIfExists('tierablePayCustomPayCodes', $data ?? [], null); $this->setIfExists('workerGroups', $data ?? [], null); - $this->setIfExists('externalDataProviderId', $data ?? [], null); - $this->setIfExists('externalDataCompany', $data ?? [], null); - $this->setIfExists('displayName', $data ?? [], null); - $this->setIfExists('payCodeType', $data ?? [], null); - $this->setIfExists('tierablePayPayCodeType', $data ?? [], null); - $this->setIfExists('payCodeSetUniqueId', $data ?? [], null); - $this->setIfExists('tierablePayPayCodeSetUniqueId', $data ?? [], null); - $this->setIfExists('paymentDateRule', $data ?? [], null); - $this->setIfExists('paymentDateDayOfWeek', $data ?? [], null); - $this->setIfExists('paymentDateDayOfMonth', $data ?? [], null); - $this->setIfExists('reportOptionsLgpsIConnect', $data ?? [], null); - $this->setIfExists('reportOptionsLgpsCivicaUpm', $data ?? [], null); - $this->setIfExists('deficitValueOrdinal', $data ?? [], null); - $this->setIfExists('deficitValue', $data ?? [], null); - $this->setIfExists('includeDeficitValue', $data ?? [], null); - $this->setIfExists('deficitValuePayPeriod', $data ?? [], null); - $this->setIfExists('nominalCodeMappings', $data ?? [], null); } /** @@ -506,170 +506,184 @@ public function valid(): bool /** - * Gets id + * Gets administrator * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractPensionAdministratorRequest|null */ - public function getId(): ?string + public function getAdministrator(): ?\SynergiTech\Staffology\Model\ContractPensionAdministratorRequest { - return $this->container['id']; + return $this->container['administrator']; } /** - * Sets id + * Sets administrator * - * @param string|null $id id + * @param \SynergiTech\Staffology\Model\ContractPensionAdministratorRequest|null $administrator administrator * * @return $this */ - public function setId(?string $id): static + public function setAdministrator(?\SynergiTech\Staffology\Model\ContractPensionAdministratorRequest $administrator): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($administrator)) { + throw new InvalidArgumentException('non-nullable administrator cannot be null'); } - $this->container['id'] = $id; + $this->container['administrator'] = $administrator; return $this; } /** - * Gets name + * Gets bankDetails * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractBankDetails|null */ - public function getName(): ?string + public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractBankDetails { - return $this->container['name']; + return $this->container['bankDetails']; } /** - * Sets name + * Sets bankDetails * - * @param string|null $name name + * @param \SynergiTech\Staffology\Model\ContractBankDetails|null $bankDetails bankDetails * * @return $this */ - public function setName(?string $name): static + public function setBankDetails(?\SynergiTech\Staffology\Model\ContractBankDetails $bankDetails): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($bankDetails)) { + throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); } - $this->container['name'] = $name; + $this->container['bankDetails'] = $bankDetails; return $this; } /** - * Gets provider + * Gets customPayCodes * - * @return \SynergiTech\Staffology\Model\ContractPensionProviderRequest|null + * @return string[]|null */ - public function getProvider(): ?\SynergiTech\Staffology\Model\ContractPensionProviderRequest + public function getCustomPayCodes(): ?array { - return $this->container['provider']; + return $this->container['customPayCodes']; } /** - * Sets provider + * Sets customPayCodes * - * @param \SynergiTech\Staffology\Model\ContractPensionProviderRequest|null $provider provider + * @param string[]|null $customPayCodes If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code that we'll treat as being pensionable. * * @return $this */ - public function setProvider(?\SynergiTech\Staffology\Model\ContractPensionProviderRequest $provider): static + public function setCustomPayCodes(?array $customPayCodes): static { - if (is_null($provider)) { - throw new InvalidArgumentException('non-nullable provider cannot be null'); + if (is_null($customPayCodes)) { + array_push($this->openAPINullablesSetToNull, 'customPayCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('customPayCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['provider'] = $provider; + $this->container['customPayCodes'] = $customPayCodes; return $this; } /** - * Gets administrator + * Gets deficitValue * - * @return \SynergiTech\Staffology\Model\ContractPensionAdministratorRequest|null + * @return float|null */ - public function getAdministrator(): ?\SynergiTech\Staffology\Model\ContractPensionAdministratorRequest + public function getDeficitValue(): ?float { - return $this->container['administrator']; + return $this->container['deficitValue']; } /** - * Sets administrator + * Sets deficitValue * - * @param \SynergiTech\Staffology\Model\ContractPensionAdministratorRequest|null $administrator administrator + * @param float|null $deficitValue The Defict value that will be deducted in a PaySchedule * * @return $this */ - public function setAdministrator(?\SynergiTech\Staffology\Model\ContractPensionAdministratorRequest $administrator): static + public function setDeficitValue(?float $deficitValue): static { - if (is_null($administrator)) { - throw new InvalidArgumentException('non-nullable administrator cannot be null'); + if (is_null($deficitValue)) { + array_push($this->openAPINullablesSetToNull, 'deficitValue'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deficitValue', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['administrator'] = $administrator; + $this->container['deficitValue'] = $deficitValue; return $this; } /** - * Gets pensionRule + * Gets deficitValueOrdinal * - * @return \SynergiTech\Staffology\Model\PensionRule|null + * @return int|null */ - public function getPensionRule(): ?\SynergiTech\Staffology\Model\PensionRule + public function getDeficitValueOrdinal(): ?int { - return $this->container['pensionRule']; + return $this->container['deficitValueOrdinal']; } /** - * Sets pensionRule + * Sets deficitValueOrdinal * - * @param \SynergiTech\Staffology\Model\PensionRule|null $pensionRule pensionRule + * @param int|null $deficitValueOrdinal The Ordinal used to identify the PaySchedule which the Deficit will be against * * @return $this */ - public function setPensionRule(?\SynergiTech\Staffology\Model\PensionRule $pensionRule): static + public function setDeficitValueOrdinal(?int $deficitValueOrdinal): static { - if (is_null($pensionRule)) { - throw new InvalidArgumentException('non-nullable pensionRule cannot be null'); + if (is_null($deficitValueOrdinal)) { + array_push($this->openAPINullablesSetToNull, 'deficitValueOrdinal'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deficitValueOrdinal', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['pensionRule'] = $pensionRule; + $this->container['deficitValueOrdinal'] = $deficitValueOrdinal; return $this; } /** - * Gets qualifyingScheme + * Gets deficitValuePayPeriod * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getQualifyingScheme(): ?bool + public function getDeficitValuePayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['qualifyingScheme']; + return $this->container['deficitValuePayPeriod']; } /** - * Sets qualifyingScheme + * Sets deficitValuePayPeriod * - * @param bool|null $qualifyingScheme Set to true if this is a Qualifying Scheme for Auto Enrolment + * @param \SynergiTech\Staffology\Model\PayPeriods|null $deficitValuePayPeriod deficitValuePayPeriod * * @return $this */ - public function setQualifyingScheme(?bool $qualifyingScheme): static + public function setDeficitValuePayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $deficitValuePayPeriod): static { - if (is_null($qualifyingScheme)) { - throw new InvalidArgumentException('non-nullable qualifyingScheme cannot be null'); + if (is_null($deficitValuePayPeriod)) { + throw new InvalidArgumentException('non-nullable deficitValuePayPeriod cannot be null'); } - $this->container['qualifyingScheme'] = $qualifyingScheme; + $this->container['deficitValuePayPeriod'] = $deficitValuePayPeriod; return $this; } @@ -702,536 +716,495 @@ public function setDisableAeLetters(?bool $disableAeLetters): static } /** - * Gets subtractBasicRateTax + * Gets displayName * - * @return bool|null + * @return string|null */ - public function getSubtractBasicRateTax(): ?bool + public function getDisplayName(): ?string { - return $this->container['subtractBasicRateTax']; + return $this->container['displayName']; } /** - * Sets subtractBasicRateTax + * Sets displayName * - * @param bool|null $subtractBasicRateTax subtractBasicRateTax + * @param string|null $displayName displayName * * @return $this */ - public function setSubtractBasicRateTax(?bool $subtractBasicRateTax): static + public function setDisplayName(?string $displayName): static { - if (is_null($subtractBasicRateTax)) { - throw new InvalidArgumentException('non-nullable subtractBasicRateTax cannot be null'); + if (is_null($displayName)) { + array_push($this->openAPINullablesSetToNull, 'displayName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('displayName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['subtractBasicRateTax'] = $subtractBasicRateTax; + $this->container['displayName'] = $displayName; return $this; } /** - * Gets payMethod + * Gets externalDataCompany * - * @return \SynergiTech\Staffology\Model\PayMethod|null + * @return \SynergiTech\Staffology\Model\ContractExternalDataCompanyRequest|null */ - public function getPayMethod(): ?\SynergiTech\Staffology\Model\PayMethod + public function getExternalDataCompany(): ?\SynergiTech\Staffology\Model\ContractExternalDataCompanyRequest { - return $this->container['payMethod']; + return $this->container['externalDataCompany']; } /** - * Sets payMethod + * Sets externalDataCompany * - * @param \SynergiTech\Staffology\Model\PayMethod|null $payMethod payMethod + * @param \SynergiTech\Staffology\Model\ContractExternalDataCompanyRequest|null $externalDataCompany externalDataCompany * * @return $this */ - public function setPayMethod(?\SynergiTech\Staffology\Model\PayMethod $payMethod): static + public function setExternalDataCompany(?\SynergiTech\Staffology\Model\ContractExternalDataCompanyRequest $externalDataCompany): static { - if (is_null($payMethod)) { - throw new InvalidArgumentException('non-nullable payMethod cannot be null'); + if (is_null($externalDataCompany)) { + throw new InvalidArgumentException('non-nullable externalDataCompany cannot be null'); } - $this->container['payMethod'] = $payMethod; + $this->container['externalDataCompany'] = $externalDataCompany; return $this; } /** - * Gets bankDetails + * Gets externalDataProviderId * - * @return \SynergiTech\Staffology\Model\ContractBankDetails|null + * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null */ - public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractBankDetails + public function getExternalDataProviderId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId { - return $this->container['bankDetails']; + return $this->container['externalDataProviderId']; } /** - * Sets bankDetails + * Sets externalDataProviderId * - * @param \SynergiTech\Staffology\Model\ContractBankDetails|null $bankDetails bankDetails + * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $externalDataProviderId externalDataProviderId * * @return $this */ - public function setBankDetails(?\SynergiTech\Staffology\Model\ContractBankDetails $bankDetails): static + public function setExternalDataProviderId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $externalDataProviderId): static { - if (is_null($bankDetails)) { - throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); + if (is_null($externalDataProviderId)) { + throw new InvalidArgumentException('non-nullable externalDataProviderId cannot be null'); } - $this->container['bankDetails'] = $bankDetails; + $this->container['externalDataProviderId'] = $externalDataProviderId; return $this; } /** - * Gets useCustomPayCodes + * Gets id * - * @return bool|null + * @return string|null */ - public function getUseCustomPayCodes(): ?bool + public function getId(): ?string { - return $this->container['useCustomPayCodes']; + return $this->container['id']; } /** - * Sets useCustomPayCodes + * Sets id * - * @param bool|null $useCustomPayCodes If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable we'll instead treat it as pensionable if the Code is included in CustomPayCodes + * @param string|null $id id * * @return $this */ - public function setUseCustomPayCodes(?bool $useCustomPayCodes): static + public function setId(?string $id): static { - if (is_null($useCustomPayCodes)) { - throw new InvalidArgumentException('non-nullable useCustomPayCodes cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['useCustomPayCodes'] = $useCustomPayCodes; + $this->container['id'] = $id; return $this; } /** - * Gets useCustomPayCodesForTierablePay + * Gets includeDeficitValue * * @return bool|null */ - public function getUseCustomPayCodesForTierablePay(): ?bool + public function getIncludeDeficitValue(): ?bool { - return $this->container['useCustomPayCodesForTierablePay']; + return $this->container['includeDeficitValue']; } /** - * Sets useCustomPayCodesForTierablePay + * Sets includeDeficitValue * - * @param bool|null $useCustomPayCodesForTierablePay If set to true then rather than using the setting on the PayCode to determine if the pay is tierable we'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes + * @param bool|null $includeDeficitValue Set to true if this a Deficit Payment needs to be assigned to a PaySchedule * * @return $this */ - public function setUseCustomPayCodesForTierablePay(?bool $useCustomPayCodesForTierablePay): static + public function setIncludeDeficitValue(?bool $includeDeficitValue): static { - if (is_null($useCustomPayCodesForTierablePay)) { - throw new InvalidArgumentException('non-nullable useCustomPayCodesForTierablePay cannot be null'); + if (is_null($includeDeficitValue)) { + throw new InvalidArgumentException('non-nullable includeDeficitValue cannot be null'); } - $this->container['useCustomPayCodesForTierablePay'] = $useCustomPayCodesForTierablePay; + $this->container['includeDeficitValue'] = $includeDeficitValue; return $this; } /** - * Gets customPayCodes + * Gets name * - * @return string[]|null + * @return string|null */ - public function getCustomPayCodes(): ?array + public function getName(): ?string { - return $this->container['customPayCodes']; + return $this->container['name']; } /** - * Sets customPayCodes + * Sets name * - * @param string[]|null $customPayCodes If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code that we'll treat as being pensionable. + * @param string|null $name name * * @return $this */ - public function setCustomPayCodes(?array $customPayCodes): static + public function setName(?string $name): static { - if (is_null($customPayCodes)) { - array_push($this->openAPINullablesSetToNull, 'customPayCodes'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('customPayCodes', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['customPayCodes'] = $customPayCodes; + $this->container['name'] = $name; return $this; } /** - * Gets tierablePayCustomPayCodes + * Gets nominalCodeMappings * - * @return string[]|null + * @return \SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingRequest[]|null */ - public function getTierablePayCustomPayCodes(): ?array + public function getNominalCodeMappings(): ?array { - return $this->container['tierablePayCustomPayCodes']; + return $this->container['nominalCodeMappings']; } /** - * Sets tierablePayCustomPayCodes + * Sets nominalCodeMappings * - * @param string[]|null $tierablePayCustomPayCodes If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code that we'll treat as being tierable. + * @param \SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingRequest[]|null $nominalCodeMappings The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration * * @return $this */ - public function setTierablePayCustomPayCodes(?array $tierablePayCustomPayCodes): static + public function setNominalCodeMappings(?array $nominalCodeMappings): static { - if (is_null($tierablePayCustomPayCodes)) { - array_push($this->openAPINullablesSetToNull, 'tierablePayCustomPayCodes'); + if (is_null($nominalCodeMappings)) { + array_push($this->openAPINullablesSetToNull, 'nominalCodeMappings'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tierablePayCustomPayCodes', $nullablesSetToNull); + $index = array_search('nominalCodeMappings', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tierablePayCustomPayCodes'] = $tierablePayCustomPayCodes; + $this->container['nominalCodeMappings'] = $nominalCodeMappings; return $this; } /** - * Gets workerGroups + * Gets payCodeSetUniqueId * - * @return \SynergiTech\Staffology\Model\ContractWorkerGroupRequest[]|null + * @return string|null */ - public function getWorkerGroups(): ?array + public function getPayCodeSetUniqueId(): ?string { - return $this->container['workerGroups']; + return $this->container['payCodeSetUniqueId']; } /** - * Sets workerGroups + * Sets payCodeSetUniqueId * - * @param \SynergiTech\Staffology\Model\ContractWorkerGroupRequest[]|null $workerGroups A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup + * @param string|null $payCodeSetUniqueId payCodeSetUniqueId * * @return $this */ - public function setWorkerGroups(?array $workerGroups): static + public function setPayCodeSetUniqueId(?string $payCodeSetUniqueId): static { - if (is_null($workerGroups)) { - array_push($this->openAPINullablesSetToNull, 'workerGroups'); + if (is_null($payCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'payCodeSetUniqueId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('workerGroups', $nullablesSetToNull); + $index = array_search('payCodeSetUniqueId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['workerGroups'] = $workerGroups; + $this->container['payCodeSetUniqueId'] = $payCodeSetUniqueId; return $this; } /** - * Gets externalDataProviderId + * Gets payCodeType * - * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null + * @return \SynergiTech\Staffology\Model\PensionPayCode|null */ - public function getExternalDataProviderId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId + public function getPayCodeType(): ?\SynergiTech\Staffology\Model\PensionPayCode { - return $this->container['externalDataProviderId']; + return $this->container['payCodeType']; } /** - * Sets externalDataProviderId + * Sets payCodeType * - * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $externalDataProviderId externalDataProviderId + * @param \SynergiTech\Staffology\Model\PensionPayCode|null $payCodeType payCodeType * * @return $this */ - public function setExternalDataProviderId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $externalDataProviderId): static + public function setPayCodeType(?\SynergiTech\Staffology\Model\PensionPayCode $payCodeType): static { - if (is_null($externalDataProviderId)) { - throw new InvalidArgumentException('non-nullable externalDataProviderId cannot be null'); + if (is_null($payCodeType)) { + throw new InvalidArgumentException('non-nullable payCodeType cannot be null'); } - $this->container['externalDataProviderId'] = $externalDataProviderId; + $this->container['payCodeType'] = $payCodeType; return $this; } /** - * Gets externalDataCompany + * Gets payMethod * - * @return \SynergiTech\Staffology\Model\ContractExternalDataCompanyRequest|null + * @return \SynergiTech\Staffology\Model\PayMethod|null */ - public function getExternalDataCompany(): ?\SynergiTech\Staffology\Model\ContractExternalDataCompanyRequest + public function getPayMethod(): ?\SynergiTech\Staffology\Model\PayMethod { - return $this->container['externalDataCompany']; + return $this->container['payMethod']; } /** - * Sets externalDataCompany + * Sets payMethod * - * @param \SynergiTech\Staffology\Model\ContractExternalDataCompanyRequest|null $externalDataCompany externalDataCompany + * @param \SynergiTech\Staffology\Model\PayMethod|null $payMethod payMethod * * @return $this */ - public function setExternalDataCompany(?\SynergiTech\Staffology\Model\ContractExternalDataCompanyRequest $externalDataCompany): static + public function setPayMethod(?\SynergiTech\Staffology\Model\PayMethod $payMethod): static { - if (is_null($externalDataCompany)) { - throw new InvalidArgumentException('non-nullable externalDataCompany cannot be null'); + if (is_null($payMethod)) { + throw new InvalidArgumentException('non-nullable payMethod cannot be null'); } - $this->container['externalDataCompany'] = $externalDataCompany; + $this->container['payMethod'] = $payMethod; return $this; } /** - * Gets displayName + * Gets paymentDateDayOfMonth * - * @return string|null + * @return int|null */ - public function getDisplayName(): ?string + public function getPaymentDateDayOfMonth(): ?int { - return $this->container['displayName']; + return $this->container['paymentDateDayOfMonth']; } /** - * Sets displayName + * Sets paymentDateDayOfMonth * - * @param string|null $displayName displayName + * @param int|null $paymentDateDayOfMonth paymentDateDayOfMonth * * @return $this */ - public function setDisplayName(?string $displayName): static + public function setPaymentDateDayOfMonth(?int $paymentDateDayOfMonth): static { - if (is_null($displayName)) { - array_push($this->openAPINullablesSetToNull, 'displayName'); + if (is_null($paymentDateDayOfMonth)) { + array_push($this->openAPINullablesSetToNull, 'paymentDateDayOfMonth'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('displayName', $nullablesSetToNull); + $index = array_search('paymentDateDayOfMonth', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['displayName'] = $displayName; - - return $this; - } - - /** - * Gets payCodeType - * - * @return \SynergiTech\Staffology\Model\PensionPayCode|null - */ - public function getPayCodeType(): ?\SynergiTech\Staffology\Model\PensionPayCode - { - return $this->container['payCodeType']; - } - - /** - * Sets payCodeType - * - * @param \SynergiTech\Staffology\Model\PensionPayCode|null $payCodeType payCodeType - * - * @return $this - */ - public function setPayCodeType(?\SynergiTech\Staffology\Model\PensionPayCode $payCodeType): static - { - if (is_null($payCodeType)) { - throw new InvalidArgumentException('non-nullable payCodeType cannot be null'); - } - $this->container['payCodeType'] = $payCodeType; + $this->container['paymentDateDayOfMonth'] = $paymentDateDayOfMonth; return $this; } /** - * Gets tierablePayPayCodeType + * Gets paymentDateDayOfWeek * - * @return \SynergiTech\Staffology\Model\PensionPayCode|null + * @return \SynergiTech\Staffology\Model\DayOfWeek|null */ - public function getTierablePayPayCodeType(): ?\SynergiTech\Staffology\Model\PensionPayCode + public function getPaymentDateDayOfWeek(): ?\SynergiTech\Staffology\Model\DayOfWeek { - return $this->container['tierablePayPayCodeType']; + return $this->container['paymentDateDayOfWeek']; } /** - * Sets tierablePayPayCodeType + * Sets paymentDateDayOfWeek * - * @param \SynergiTech\Staffology\Model\PensionPayCode|null $tierablePayPayCodeType tierablePayPayCodeType + * @param \SynergiTech\Staffology\Model\DayOfWeek|null $paymentDateDayOfWeek paymentDateDayOfWeek * * @return $this */ - public function setTierablePayPayCodeType(?\SynergiTech\Staffology\Model\PensionPayCode $tierablePayPayCodeType): static + public function setPaymentDateDayOfWeek(?\SynergiTech\Staffology\Model\DayOfWeek $paymentDateDayOfWeek): static { - if (is_null($tierablePayPayCodeType)) { - throw new InvalidArgumentException('non-nullable tierablePayPayCodeType cannot be null'); + if (is_null($paymentDateDayOfWeek)) { + throw new InvalidArgumentException('non-nullable paymentDateDayOfWeek cannot be null'); } - $this->container['tierablePayPayCodeType'] = $tierablePayPayCodeType; + $this->container['paymentDateDayOfWeek'] = $paymentDateDayOfWeek; return $this; } /** - * Gets payCodeSetUniqueId + * Gets paymentDateRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\PaymentDateRule|null */ - public function getPayCodeSetUniqueId(): ?string + public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule { - return $this->container['payCodeSetUniqueId']; + return $this->container['paymentDateRule']; } /** - * Sets payCodeSetUniqueId - * - * @param string|null $payCodeSetUniqueId payCodeSetUniqueId - * - * @return $this - */ - public function setPayCodeSetUniqueId(?string $payCodeSetUniqueId): static - { - if (is_null($payCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'payCodeSetUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCodeSetUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + * Sets paymentDateRule + * + * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule + * + * @return $this + */ + public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static + { + if (is_null($paymentDateRule)) { + throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); } - $this->container['payCodeSetUniqueId'] = $payCodeSetUniqueId; + $this->container['paymentDateRule'] = $paymentDateRule; return $this; } /** - * Gets tierablePayPayCodeSetUniqueId + * Gets pensionRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\PensionRule|null */ - public function getTierablePayPayCodeSetUniqueId(): ?string + public function getPensionRule(): ?\SynergiTech\Staffology\Model\PensionRule { - return $this->container['tierablePayPayCodeSetUniqueId']; + return $this->container['pensionRule']; } /** - * Sets tierablePayPayCodeSetUniqueId + * Sets pensionRule * - * @param string|null $tierablePayPayCodeSetUniqueId tierablePayPayCodeSetUniqueId + * @param \SynergiTech\Staffology\Model\PensionRule|null $pensionRule pensionRule * * @return $this */ - public function setTierablePayPayCodeSetUniqueId(?string $tierablePayPayCodeSetUniqueId): static + public function setPensionRule(?\SynergiTech\Staffology\Model\PensionRule $pensionRule): static { - if (is_null($tierablePayPayCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'tierablePayPayCodeSetUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tierablePayPayCodeSetUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($pensionRule)) { + throw new InvalidArgumentException('non-nullable pensionRule cannot be null'); } - $this->container['tierablePayPayCodeSetUniqueId'] = $tierablePayPayCodeSetUniqueId; + $this->container['pensionRule'] = $pensionRule; return $this; } /** - * Gets paymentDateRule + * Gets provider * - * @return \SynergiTech\Staffology\Model\PaymentDateRule|null + * @return \SynergiTech\Staffology\Model\ContractPensionProviderRequest|null */ - public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule + public function getProvider(): ?\SynergiTech\Staffology\Model\ContractPensionProviderRequest { - return $this->container['paymentDateRule']; + return $this->container['provider']; } /** - * Sets paymentDateRule + * Sets provider * - * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule + * @param \SynergiTech\Staffology\Model\ContractPensionProviderRequest|null $provider provider * * @return $this */ - public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static + public function setProvider(?\SynergiTech\Staffology\Model\ContractPensionProviderRequest $provider): static { - if (is_null($paymentDateRule)) { - throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); + if (is_null($provider)) { + throw new InvalidArgumentException('non-nullable provider cannot be null'); } - $this->container['paymentDateRule'] = $paymentDateRule; + $this->container['provider'] = $provider; return $this; } /** - * Gets paymentDateDayOfWeek + * Gets qualifyingScheme * - * @return \SynergiTech\Staffology\Model\DayOfWeek|null + * @return bool|null */ - public function getPaymentDateDayOfWeek(): ?\SynergiTech\Staffology\Model\DayOfWeek + public function getQualifyingScheme(): ?bool { - return $this->container['paymentDateDayOfWeek']; + return $this->container['qualifyingScheme']; } /** - * Sets paymentDateDayOfWeek + * Sets qualifyingScheme * - * @param \SynergiTech\Staffology\Model\DayOfWeek|null $paymentDateDayOfWeek paymentDateDayOfWeek + * @param bool|null $qualifyingScheme Set to true if this is a Qualifying Scheme for Auto Enrolment * * @return $this */ - public function setPaymentDateDayOfWeek(?\SynergiTech\Staffology\Model\DayOfWeek $paymentDateDayOfWeek): static + public function setQualifyingScheme(?bool $qualifyingScheme): static { - if (is_null($paymentDateDayOfWeek)) { - throw new InvalidArgumentException('non-nullable paymentDateDayOfWeek cannot be null'); + if (is_null($qualifyingScheme)) { + throw new InvalidArgumentException('non-nullable qualifyingScheme cannot be null'); } - $this->container['paymentDateDayOfWeek'] = $paymentDateDayOfWeek; + $this->container['qualifyingScheme'] = $qualifyingScheme; return $this; } /** - * Gets paymentDateDayOfMonth + * Gets reportOptionsLgpsCivicaUpm * - * @return int|null + * @return \SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest|null */ - public function getPaymentDateDayOfMonth(): ?int + public function getReportOptionsLgpsCivicaUpm(): ?\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest { - return $this->container['paymentDateDayOfMonth']; + return $this->container['reportOptionsLgpsCivicaUpm']; } /** - * Sets paymentDateDayOfMonth + * Sets reportOptionsLgpsCivicaUpm * - * @param int|null $paymentDateDayOfMonth paymentDateDayOfMonth + * @param \SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest|null $reportOptionsLgpsCivicaUpm reportOptionsLgpsCivicaUpm * * @return $this */ - public function setPaymentDateDayOfMonth(?int $paymentDateDayOfMonth): static + public function setReportOptionsLgpsCivicaUpm(?\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest $reportOptionsLgpsCivicaUpm): static { - if (is_null($paymentDateDayOfMonth)) { - array_push($this->openAPINullablesSetToNull, 'paymentDateDayOfMonth'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paymentDateDayOfMonth', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($reportOptionsLgpsCivicaUpm)) { + throw new InvalidArgumentException('non-nullable reportOptionsLgpsCivicaUpm cannot be null'); } - $this->container['paymentDateDayOfMonth'] = $paymentDateDayOfMonth; + $this->container['reportOptionsLgpsCivicaUpm'] = $reportOptionsLgpsCivicaUpm; return $this; } @@ -1264,184 +1237,211 @@ public function setReportOptionsLgpsIConnect(?\SynergiTech\Staffology\Model\Cont } /** - * Gets reportOptionsLgpsCivicaUpm + * Gets subtractBasicRateTax * - * @return \SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest|null + * @return bool|null */ - public function getReportOptionsLgpsCivicaUpm(): ?\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest + public function getSubtractBasicRateTax(): ?bool { - return $this->container['reportOptionsLgpsCivicaUpm']; + return $this->container['subtractBasicRateTax']; } /** - * Sets reportOptionsLgpsCivicaUpm + * Sets subtractBasicRateTax * - * @param \SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest|null $reportOptionsLgpsCivicaUpm reportOptionsLgpsCivicaUpm + * @param bool|null $subtractBasicRateTax subtractBasicRateTax * * @return $this */ - public function setReportOptionsLgpsCivicaUpm(?\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmRequest $reportOptionsLgpsCivicaUpm): static + public function setSubtractBasicRateTax(?bool $subtractBasicRateTax): static { - if (is_null($reportOptionsLgpsCivicaUpm)) { - throw new InvalidArgumentException('non-nullable reportOptionsLgpsCivicaUpm cannot be null'); + if (is_null($subtractBasicRateTax)) { + throw new InvalidArgumentException('non-nullable subtractBasicRateTax cannot be null'); } - $this->container['reportOptionsLgpsCivicaUpm'] = $reportOptionsLgpsCivicaUpm; + $this->container['subtractBasicRateTax'] = $subtractBasicRateTax; return $this; } /** - * Gets deficitValueOrdinal + * Gets tierablePayCustomPayCodes * - * @return int|null + * @return string[]|null */ - public function getDeficitValueOrdinal(): ?int + public function getTierablePayCustomPayCodes(): ?array { - return $this->container['deficitValueOrdinal']; + return $this->container['tierablePayCustomPayCodes']; } /** - * Sets deficitValueOrdinal + * Sets tierablePayCustomPayCodes * - * @param int|null $deficitValueOrdinal The Ordinal used to identify the PaySchedule which the Deficit will be against + * @param string[]|null $tierablePayCustomPayCodes If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code that we'll treat as being tierable. * * @return $this */ - public function setDeficitValueOrdinal(?int $deficitValueOrdinal): static + public function setTierablePayCustomPayCodes(?array $tierablePayCustomPayCodes): static { - if (is_null($deficitValueOrdinal)) { - array_push($this->openAPINullablesSetToNull, 'deficitValueOrdinal'); + if (is_null($tierablePayCustomPayCodes)) { + array_push($this->openAPINullablesSetToNull, 'tierablePayCustomPayCodes'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('deficitValueOrdinal', $nullablesSetToNull); + $index = array_search('tierablePayCustomPayCodes', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['deficitValueOrdinal'] = $deficitValueOrdinal; + $this->container['tierablePayCustomPayCodes'] = $tierablePayCustomPayCodes; return $this; } /** - * Gets deficitValue + * Gets tierablePayPayCodeSetUniqueId * - * @return float|null + * @return string|null */ - public function getDeficitValue(): ?float + public function getTierablePayPayCodeSetUniqueId(): ?string { - return $this->container['deficitValue']; + return $this->container['tierablePayPayCodeSetUniqueId']; } /** - * Sets deficitValue + * Sets tierablePayPayCodeSetUniqueId * - * @param float|null $deficitValue The Defict value that will be deducted in a PaySchedule + * @param string|null $tierablePayPayCodeSetUniqueId tierablePayPayCodeSetUniqueId * * @return $this */ - public function setDeficitValue(?float $deficitValue): static + public function setTierablePayPayCodeSetUniqueId(?string $tierablePayPayCodeSetUniqueId): static { - if (is_null($deficitValue)) { - array_push($this->openAPINullablesSetToNull, 'deficitValue'); + if (is_null($tierablePayPayCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'tierablePayPayCodeSetUniqueId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('deficitValue', $nullablesSetToNull); + $index = array_search('tierablePayPayCodeSetUniqueId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['deficitValue'] = $deficitValue; + $this->container['tierablePayPayCodeSetUniqueId'] = $tierablePayPayCodeSetUniqueId; return $this; } /** - * Gets includeDeficitValue + * Gets tierablePayPayCodeType + * + * @return \SynergiTech\Staffology\Model\PensionPayCode|null + */ + public function getTierablePayPayCodeType(): ?\SynergiTech\Staffology\Model\PensionPayCode + { + return $this->container['tierablePayPayCodeType']; + } + + /** + * Sets tierablePayPayCodeType + * + * @param \SynergiTech\Staffology\Model\PensionPayCode|null $tierablePayPayCodeType tierablePayPayCodeType + * + * @return $this + */ + public function setTierablePayPayCodeType(?\SynergiTech\Staffology\Model\PensionPayCode $tierablePayPayCodeType): static + { + if (is_null($tierablePayPayCodeType)) { + throw new InvalidArgumentException('non-nullable tierablePayPayCodeType cannot be null'); + } + $this->container['tierablePayPayCodeType'] = $tierablePayPayCodeType; + + return $this; + } + + /** + * Gets useCustomPayCodes * * @return bool|null */ - public function getIncludeDeficitValue(): ?bool + public function getUseCustomPayCodes(): ?bool { - return $this->container['includeDeficitValue']; + return $this->container['useCustomPayCodes']; } /** - * Sets includeDeficitValue + * Sets useCustomPayCodes * - * @param bool|null $includeDeficitValue Set to true if this a Deficit Payment needs to be assigned to a PaySchedule + * @param bool|null $useCustomPayCodes If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable we'll instead treat it as pensionable if the Code is included in CustomPayCodes * * @return $this */ - public function setIncludeDeficitValue(?bool $includeDeficitValue): static + public function setUseCustomPayCodes(?bool $useCustomPayCodes): static { - if (is_null($includeDeficitValue)) { - throw new InvalidArgumentException('non-nullable includeDeficitValue cannot be null'); + if (is_null($useCustomPayCodes)) { + throw new InvalidArgumentException('non-nullable useCustomPayCodes cannot be null'); } - $this->container['includeDeficitValue'] = $includeDeficitValue; + $this->container['useCustomPayCodes'] = $useCustomPayCodes; return $this; } /** - * Gets deficitValuePayPeriod + * Gets useCustomPayCodesForTierablePay * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return bool|null */ - public function getDeficitValuePayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getUseCustomPayCodesForTierablePay(): ?bool { - return $this->container['deficitValuePayPeriod']; + return $this->container['useCustomPayCodesForTierablePay']; } /** - * Sets deficitValuePayPeriod + * Sets useCustomPayCodesForTierablePay * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $deficitValuePayPeriod deficitValuePayPeriod + * @param bool|null $useCustomPayCodesForTierablePay If set to true then rather than using the setting on the PayCode to determine if the pay is tierable we'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes * * @return $this */ - public function setDeficitValuePayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $deficitValuePayPeriod): static + public function setUseCustomPayCodesForTierablePay(?bool $useCustomPayCodesForTierablePay): static { - if (is_null($deficitValuePayPeriod)) { - throw new InvalidArgumentException('non-nullable deficitValuePayPeriod cannot be null'); + if (is_null($useCustomPayCodesForTierablePay)) { + throw new InvalidArgumentException('non-nullable useCustomPayCodesForTierablePay cannot be null'); } - $this->container['deficitValuePayPeriod'] = $deficitValuePayPeriod; + $this->container['useCustomPayCodesForTierablePay'] = $useCustomPayCodesForTierablePay; return $this; } /** - * Gets nominalCodeMappings + * Gets workerGroups * - * @return \SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingRequest[]|null + * @return \SynergiTech\Staffology\Model\ContractWorkerGroupRequest[]|null */ - public function getNominalCodeMappings(): ?array + public function getWorkerGroups(): ?array { - return $this->container['nominalCodeMappings']; + return $this->container['workerGroups']; } /** - * Sets nominalCodeMappings + * Sets workerGroups * - * @param \SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingRequest[]|null $nominalCodeMappings The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration + * @param \SynergiTech\Staffology\Model\ContractWorkerGroupRequest[]|null $workerGroups A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup * * @return $this */ - public function setNominalCodeMappings(?array $nominalCodeMappings): static + public function setWorkerGroups(?array $workerGroups): static { - if (is_null($nominalCodeMappings)) { - array_push($this->openAPINullablesSetToNull, 'nominalCodeMappings'); + if (is_null($workerGroups)) { + array_push($this->openAPINullablesSetToNull, 'workerGroups'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalCodeMappings', $nullablesSetToNull); + $index = array_search('workerGroups', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nominalCodeMappings'] = $nominalCodeMappings; + $this->container['workerGroups'] = $workerGroups; return $this; } diff --git a/src/Model/ContractPensionSchemeResponse.php b/src/Model/ContractPensionSchemeResponse.php index cc0b74e..cb72b32 100644 --- a/src/Model/ContractPensionSchemeResponse.php +++ b/src/Model/ContractPensionSchemeResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,38 +59,38 @@ class ContractPensionSchemeResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'name' => 'string', - 'provider' => '\SynergiTech\Staffology\Model\ContractPensionProviderResponse', 'administrator' => '\SynergiTech\Staffology\Model\ContractPensionAdministratorResponse', - 'pensionRule' => '\SynergiTech\Staffology\Model\PensionRule', - 'qualifyingScheme' => 'bool', - 'disableAeLetters' => 'bool', - 'subtractBasicRateTax' => 'bool', - 'payMethod' => '\SynergiTech\Staffology\Model\PayMethod', 'bankDetails' => '\SynergiTech\Staffology\Model\ContractBankDetails', - 'useCustomPayCodes' => 'bool', - 'useCustomPayCodesForTierablePay' => 'bool', 'customPayCodes' => 'string[]', - 'tierablePayCustomPayCodes' => 'string[]', - 'workerGroups' => '\SynergiTech\Staffology\Model\ContractWorkerGroupResponse[]', - 'externalDataProviderId' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', - 'externalDataCompany' => '\SynergiTech\Staffology\Model\ContractExternalDataCompanyResponse', + 'deficitValue' => 'float', + 'deficitValueOrdinal' => 'int', + 'deficitValuePayPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'disableAeLetters' => 'bool', 'displayName' => 'string', - 'payCodeType' => '\SynergiTech\Staffology\Model\PensionPayCode', - 'tierablePayPayCodeType' => '\SynergiTech\Staffology\Model\PensionPayCode', + 'externalDataCompany' => '\SynergiTech\Staffology\Model\ContractExternalDataCompanyResponse', + 'externalDataProviderId' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', + 'id' => 'string', + 'includeDeficitValue' => 'bool', + 'name' => 'string', + 'nominalCodeMappings' => '\SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingResponse[]', 'payCodeSetUniqueId' => 'string', - 'tierablePayPayCodeSetUniqueId' => 'string', - 'paymentDateRule' => '\SynergiTech\Staffology\Model\PaymentDateRule', - 'paymentDateDayOfWeek' => '\SynergiTech\Staffology\Model\DayOfWeek', + 'payCodeType' => '\SynergiTech\Staffology\Model\PensionPayCode', + 'payMethod' => '\SynergiTech\Staffology\Model\PayMethod', 'paymentDateDayOfMonth' => 'int', - 'reportOptionsLgpsIConnect' => '\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsIConnectResponse', + 'paymentDateDayOfWeek' => '\SynergiTech\Staffology\Model\DayOfWeek', + 'paymentDateRule' => '\SynergiTech\Staffology\Model\PaymentDateRule', + 'pensionRule' => '\SynergiTech\Staffology\Model\PensionRule', + 'provider' => '\SynergiTech\Staffology\Model\ContractPensionProviderResponse', + 'qualifyingScheme' => 'bool', 'reportOptionsLgpsCivicaUpm' => '\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse', - 'deficitValueOrdinal' => 'int', - 'deficitValue' => 'float', - 'includeDeficitValue' => 'bool', - 'deficitValuePayPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', - 'nominalCodeMappings' => '\SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingResponse[]' + 'reportOptionsLgpsIConnect' => '\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsIConnectResponse', + 'subtractBasicRateTax' => 'bool', + 'tierablePayCustomPayCodes' => 'string[]', + 'tierablePayPayCodeSetUniqueId' => 'string', + 'tierablePayPayCodeType' => '\SynergiTech\Staffology\Model\PensionPayCode', + 'useCustomPayCodes' => 'bool', + 'useCustomPayCodesForTierablePay' => 'bool', + 'workerGroups' => '\SynergiTech\Staffology\Model\ContractWorkerGroupResponse[]' ]; /** @@ -99,38 +99,38 @@ class ContractPensionSchemeResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'name' => null, - 'provider' => null, 'administrator' => null, - 'pensionRule' => null, - 'qualifyingScheme' => null, - 'disableAeLetters' => null, - 'subtractBasicRateTax' => null, - 'payMethod' => null, 'bankDetails' => null, - 'useCustomPayCodes' => null, - 'useCustomPayCodesForTierablePay' => null, 'customPayCodes' => null, - 'tierablePayCustomPayCodes' => null, - 'workerGroups' => null, - 'externalDataProviderId' => null, - 'externalDataCompany' => null, + 'deficitValue' => 'double', + 'deficitValueOrdinal' => 'int32', + 'deficitValuePayPeriod' => null, + 'disableAeLetters' => null, 'displayName' => null, - 'payCodeType' => null, - 'tierablePayPayCodeType' => null, + 'externalDataCompany' => null, + 'externalDataProviderId' => null, + 'id' => 'uuid', + 'includeDeficitValue' => null, + 'name' => null, + 'nominalCodeMappings' => null, 'payCodeSetUniqueId' => 'uuid', - 'tierablePayPayCodeSetUniqueId' => 'uuid', - 'paymentDateRule' => null, - 'paymentDateDayOfWeek' => null, + 'payCodeType' => null, + 'payMethod' => null, 'paymentDateDayOfMonth' => 'int32', - 'reportOptionsLgpsIConnect' => null, + 'paymentDateDayOfWeek' => null, + 'paymentDateRule' => null, + 'pensionRule' => null, + 'provider' => null, + 'qualifyingScheme' => null, 'reportOptionsLgpsCivicaUpm' => null, - 'deficitValueOrdinal' => 'int32', - 'deficitValue' => 'double', - 'includeDeficitValue' => null, - 'deficitValuePayPeriod' => null, - 'nominalCodeMappings' => null + 'reportOptionsLgpsIConnect' => null, + 'subtractBasicRateTax' => null, + 'tierablePayCustomPayCodes' => null, + 'tierablePayPayCodeSetUniqueId' => 'uuid', + 'tierablePayPayCodeType' => null, + 'useCustomPayCodes' => null, + 'useCustomPayCodesForTierablePay' => null, + 'workerGroups' => null ]; /** @@ -139,38 +139,38 @@ class ContractPensionSchemeResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'name' => true, - 'provider' => false, 'administrator' => false, - 'pensionRule' => false, - 'qualifyingScheme' => false, - 'disableAeLetters' => false, - 'subtractBasicRateTax' => false, - 'payMethod' => false, 'bankDetails' => false, - 'useCustomPayCodes' => false, - 'useCustomPayCodesForTierablePay' => false, 'customPayCodes' => true, - 'tierablePayCustomPayCodes' => true, - 'workerGroups' => true, - 'externalDataProviderId' => false, - 'externalDataCompany' => false, + 'deficitValue' => true, + 'deficitValueOrdinal' => true, + 'deficitValuePayPeriod' => false, + 'disableAeLetters' => false, 'displayName' => true, - 'payCodeType' => false, - 'tierablePayPayCodeType' => false, + 'externalDataCompany' => false, + 'externalDataProviderId' => false, + 'id' => false, + 'includeDeficitValue' => false, + 'name' => true, + 'nominalCodeMappings' => true, 'payCodeSetUniqueId' => true, - 'tierablePayPayCodeSetUniqueId' => true, - 'paymentDateRule' => false, - 'paymentDateDayOfWeek' => false, + 'payCodeType' => false, + 'payMethod' => false, 'paymentDateDayOfMonth' => true, - 'reportOptionsLgpsIConnect' => false, + 'paymentDateDayOfWeek' => false, + 'paymentDateRule' => false, + 'pensionRule' => false, + 'provider' => false, + 'qualifyingScheme' => false, 'reportOptionsLgpsCivicaUpm' => false, - 'deficitValueOrdinal' => true, - 'deficitValue' => true, - 'includeDeficitValue' => false, - 'deficitValuePayPeriod' => false, - 'nominalCodeMappings' => true + 'reportOptionsLgpsIConnect' => false, + 'subtractBasicRateTax' => false, + 'tierablePayCustomPayCodes' => true, + 'tierablePayPayCodeSetUniqueId' => true, + 'tierablePayPayCodeType' => false, + 'useCustomPayCodes' => false, + 'useCustomPayCodesForTierablePay' => false, + 'workerGroups' => true ]; /** @@ -259,38 +259,38 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'name' => 'name', - 'provider' => 'provider', 'administrator' => 'administrator', - 'pensionRule' => 'pensionRule', - 'qualifyingScheme' => 'qualifyingScheme', - 'disableAeLetters' => 'disableAeLetters', - 'subtractBasicRateTax' => 'subtractBasicRateTax', - 'payMethod' => 'payMethod', 'bankDetails' => 'bankDetails', - 'useCustomPayCodes' => 'useCustomPayCodes', - 'useCustomPayCodesForTierablePay' => 'useCustomPayCodesForTierablePay', 'customPayCodes' => 'customPayCodes', - 'tierablePayCustomPayCodes' => 'tierablePayCustomPayCodes', - 'workerGroups' => 'workerGroups', - 'externalDataProviderId' => 'externalDataProviderId', - 'externalDataCompany' => 'externalDataCompany', + 'deficitValue' => 'deficitValue', + 'deficitValueOrdinal' => 'deficitValueOrdinal', + 'deficitValuePayPeriod' => 'deficitValuePayPeriod', + 'disableAeLetters' => 'disableAeLetters', 'displayName' => 'displayName', - 'payCodeType' => 'payCodeType', - 'tierablePayPayCodeType' => 'tierablePayPayCodeType', + 'externalDataCompany' => 'externalDataCompany', + 'externalDataProviderId' => 'externalDataProviderId', + 'id' => 'id', + 'includeDeficitValue' => 'includeDeficitValue', + 'name' => 'name', + 'nominalCodeMappings' => 'nominalCodeMappings', 'payCodeSetUniqueId' => 'payCodeSetUniqueId', - 'tierablePayPayCodeSetUniqueId' => 'tierablePayPayCodeSetUniqueId', - 'paymentDateRule' => 'paymentDateRule', - 'paymentDateDayOfWeek' => 'paymentDateDayOfWeek', + 'payCodeType' => 'payCodeType', + 'payMethod' => 'payMethod', 'paymentDateDayOfMonth' => 'paymentDateDayOfMonth', - 'reportOptionsLgpsIConnect' => 'reportOptionsLgpsIConnect', + 'paymentDateDayOfWeek' => 'paymentDateDayOfWeek', + 'paymentDateRule' => 'paymentDateRule', + 'pensionRule' => 'pensionRule', + 'provider' => 'provider', + 'qualifyingScheme' => 'qualifyingScheme', 'reportOptionsLgpsCivicaUpm' => 'reportOptionsLgpsCivicaUpm', - 'deficitValueOrdinal' => 'deficitValueOrdinal', - 'deficitValue' => 'deficitValue', - 'includeDeficitValue' => 'includeDeficitValue', - 'deficitValuePayPeriod' => 'deficitValuePayPeriod', - 'nominalCodeMappings' => 'nominalCodeMappings' + 'reportOptionsLgpsIConnect' => 'reportOptionsLgpsIConnect', + 'subtractBasicRateTax' => 'subtractBasicRateTax', + 'tierablePayCustomPayCodes' => 'tierablePayCustomPayCodes', + 'tierablePayPayCodeSetUniqueId' => 'tierablePayPayCodeSetUniqueId', + 'tierablePayPayCodeType' => 'tierablePayPayCodeType', + 'useCustomPayCodes' => 'useCustomPayCodes', + 'useCustomPayCodesForTierablePay' => 'useCustomPayCodesForTierablePay', + 'workerGroups' => 'workerGroups' ]; /** @@ -299,38 +299,38 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'name' => 'setName', - 'provider' => 'setProvider', 'administrator' => 'setAdministrator', - 'pensionRule' => 'setPensionRule', - 'qualifyingScheme' => 'setQualifyingScheme', - 'disableAeLetters' => 'setDisableAeLetters', - 'subtractBasicRateTax' => 'setSubtractBasicRateTax', - 'payMethod' => 'setPayMethod', 'bankDetails' => 'setBankDetails', - 'useCustomPayCodes' => 'setUseCustomPayCodes', - 'useCustomPayCodesForTierablePay' => 'setUseCustomPayCodesForTierablePay', 'customPayCodes' => 'setCustomPayCodes', - 'tierablePayCustomPayCodes' => 'setTierablePayCustomPayCodes', - 'workerGroups' => 'setWorkerGroups', - 'externalDataProviderId' => 'setExternalDataProviderId', - 'externalDataCompany' => 'setExternalDataCompany', + 'deficitValue' => 'setDeficitValue', + 'deficitValueOrdinal' => 'setDeficitValueOrdinal', + 'deficitValuePayPeriod' => 'setDeficitValuePayPeriod', + 'disableAeLetters' => 'setDisableAeLetters', 'displayName' => 'setDisplayName', - 'payCodeType' => 'setPayCodeType', - 'tierablePayPayCodeType' => 'setTierablePayPayCodeType', + 'externalDataCompany' => 'setExternalDataCompany', + 'externalDataProviderId' => 'setExternalDataProviderId', + 'id' => 'setId', + 'includeDeficitValue' => 'setIncludeDeficitValue', + 'name' => 'setName', + 'nominalCodeMappings' => 'setNominalCodeMappings', 'payCodeSetUniqueId' => 'setPayCodeSetUniqueId', - 'tierablePayPayCodeSetUniqueId' => 'setTierablePayPayCodeSetUniqueId', - 'paymentDateRule' => 'setPaymentDateRule', - 'paymentDateDayOfWeek' => 'setPaymentDateDayOfWeek', + 'payCodeType' => 'setPayCodeType', + 'payMethod' => 'setPayMethod', 'paymentDateDayOfMonth' => 'setPaymentDateDayOfMonth', - 'reportOptionsLgpsIConnect' => 'setReportOptionsLgpsIConnect', + 'paymentDateDayOfWeek' => 'setPaymentDateDayOfWeek', + 'paymentDateRule' => 'setPaymentDateRule', + 'pensionRule' => 'setPensionRule', + 'provider' => 'setProvider', + 'qualifyingScheme' => 'setQualifyingScheme', 'reportOptionsLgpsCivicaUpm' => 'setReportOptionsLgpsCivicaUpm', - 'deficitValueOrdinal' => 'setDeficitValueOrdinal', - 'deficitValue' => 'setDeficitValue', - 'includeDeficitValue' => 'setIncludeDeficitValue', - 'deficitValuePayPeriod' => 'setDeficitValuePayPeriod', - 'nominalCodeMappings' => 'setNominalCodeMappings' + 'reportOptionsLgpsIConnect' => 'setReportOptionsLgpsIConnect', + 'subtractBasicRateTax' => 'setSubtractBasicRateTax', + 'tierablePayCustomPayCodes' => 'setTierablePayCustomPayCodes', + 'tierablePayPayCodeSetUniqueId' => 'setTierablePayPayCodeSetUniqueId', + 'tierablePayPayCodeType' => 'setTierablePayPayCodeType', + 'useCustomPayCodes' => 'setUseCustomPayCodes', + 'useCustomPayCodesForTierablePay' => 'setUseCustomPayCodesForTierablePay', + 'workerGroups' => 'setWorkerGroups' ]; /** @@ -339,38 +339,38 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'name' => 'getName', - 'provider' => 'getProvider', 'administrator' => 'getAdministrator', - 'pensionRule' => 'getPensionRule', - 'qualifyingScheme' => 'getQualifyingScheme', - 'disableAeLetters' => 'getDisableAeLetters', - 'subtractBasicRateTax' => 'getSubtractBasicRateTax', - 'payMethod' => 'getPayMethod', 'bankDetails' => 'getBankDetails', - 'useCustomPayCodes' => 'getUseCustomPayCodes', - 'useCustomPayCodesForTierablePay' => 'getUseCustomPayCodesForTierablePay', 'customPayCodes' => 'getCustomPayCodes', - 'tierablePayCustomPayCodes' => 'getTierablePayCustomPayCodes', - 'workerGroups' => 'getWorkerGroups', - 'externalDataProviderId' => 'getExternalDataProviderId', - 'externalDataCompany' => 'getExternalDataCompany', + 'deficitValue' => 'getDeficitValue', + 'deficitValueOrdinal' => 'getDeficitValueOrdinal', + 'deficitValuePayPeriod' => 'getDeficitValuePayPeriod', + 'disableAeLetters' => 'getDisableAeLetters', 'displayName' => 'getDisplayName', - 'payCodeType' => 'getPayCodeType', - 'tierablePayPayCodeType' => 'getTierablePayPayCodeType', + 'externalDataCompany' => 'getExternalDataCompany', + 'externalDataProviderId' => 'getExternalDataProviderId', + 'id' => 'getId', + 'includeDeficitValue' => 'getIncludeDeficitValue', + 'name' => 'getName', + 'nominalCodeMappings' => 'getNominalCodeMappings', 'payCodeSetUniqueId' => 'getPayCodeSetUniqueId', - 'tierablePayPayCodeSetUniqueId' => 'getTierablePayPayCodeSetUniqueId', - 'paymentDateRule' => 'getPaymentDateRule', - 'paymentDateDayOfWeek' => 'getPaymentDateDayOfWeek', + 'payCodeType' => 'getPayCodeType', + 'payMethod' => 'getPayMethod', 'paymentDateDayOfMonth' => 'getPaymentDateDayOfMonth', - 'reportOptionsLgpsIConnect' => 'getReportOptionsLgpsIConnect', - 'reportOptionsLgpsCivicaUpm' => 'getReportOptionsLgpsCivicaUpm', - 'deficitValueOrdinal' => 'getDeficitValueOrdinal', - 'deficitValue' => 'getDeficitValue', - 'includeDeficitValue' => 'getIncludeDeficitValue', - 'deficitValuePayPeriod' => 'getDeficitValuePayPeriod', - 'nominalCodeMappings' => 'getNominalCodeMappings' + 'paymentDateDayOfWeek' => 'getPaymentDateDayOfWeek', + 'paymentDateRule' => 'getPaymentDateRule', + 'pensionRule' => 'getPensionRule', + 'provider' => 'getProvider', + 'qualifyingScheme' => 'getQualifyingScheme', + 'reportOptionsLgpsCivicaUpm' => 'getReportOptionsLgpsCivicaUpm', + 'reportOptionsLgpsIConnect' => 'getReportOptionsLgpsIConnect', + 'subtractBasicRateTax' => 'getSubtractBasicRateTax', + 'tierablePayCustomPayCodes' => 'getTierablePayCustomPayCodes', + 'tierablePayPayCodeSetUniqueId' => 'getTierablePayPayCodeSetUniqueId', + 'tierablePayPayCodeType' => 'getTierablePayPayCodeType', + 'useCustomPayCodes' => 'getUseCustomPayCodes', + 'useCustomPayCodesForTierablePay' => 'getUseCustomPayCodesForTierablePay', + 'workerGroups' => 'getWorkerGroups' ]; /** @@ -429,38 +429,38 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('administrator', $data ?? [], null); + $this->setIfExists('bankDetails', $data ?? [], null); + $this->setIfExists('customPayCodes', $data ?? [], null); + $this->setIfExists('deficitValue', $data ?? [], null); + $this->setIfExists('deficitValueOrdinal', $data ?? [], null); + $this->setIfExists('deficitValuePayPeriod', $data ?? [], null); + $this->setIfExists('disableAeLetters', $data ?? [], null); + $this->setIfExists('displayName', $data ?? [], null); + $this->setIfExists('externalDataCompany', $data ?? [], null); + $this->setIfExists('externalDataProviderId', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('includeDeficitValue', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('provider', $data ?? [], null); - $this->setIfExists('administrator', $data ?? [], null); + $this->setIfExists('nominalCodeMappings', $data ?? [], null); + $this->setIfExists('payCodeSetUniqueId', $data ?? [], null); + $this->setIfExists('payCodeType', $data ?? [], null); + $this->setIfExists('payMethod', $data ?? [], null); + $this->setIfExists('paymentDateDayOfMonth', $data ?? [], null); + $this->setIfExists('paymentDateDayOfWeek', $data ?? [], null); + $this->setIfExists('paymentDateRule', $data ?? [], null); $this->setIfExists('pensionRule', $data ?? [], null); + $this->setIfExists('provider', $data ?? [], null); $this->setIfExists('qualifyingScheme', $data ?? [], null); - $this->setIfExists('disableAeLetters', $data ?? [], null); + $this->setIfExists('reportOptionsLgpsCivicaUpm', $data ?? [], null); + $this->setIfExists('reportOptionsLgpsIConnect', $data ?? [], null); $this->setIfExists('subtractBasicRateTax', $data ?? [], null); - $this->setIfExists('payMethod', $data ?? [], null); - $this->setIfExists('bankDetails', $data ?? [], null); + $this->setIfExists('tierablePayCustomPayCodes', $data ?? [], null); + $this->setIfExists('tierablePayPayCodeSetUniqueId', $data ?? [], null); + $this->setIfExists('tierablePayPayCodeType', $data ?? [], null); $this->setIfExists('useCustomPayCodes', $data ?? [], null); $this->setIfExists('useCustomPayCodesForTierablePay', $data ?? [], null); - $this->setIfExists('customPayCodes', $data ?? [], null); - $this->setIfExists('tierablePayCustomPayCodes', $data ?? [], null); $this->setIfExists('workerGroups', $data ?? [], null); - $this->setIfExists('externalDataProviderId', $data ?? [], null); - $this->setIfExists('externalDataCompany', $data ?? [], null); - $this->setIfExists('displayName', $data ?? [], null); - $this->setIfExists('payCodeType', $data ?? [], null); - $this->setIfExists('tierablePayPayCodeType', $data ?? [], null); - $this->setIfExists('payCodeSetUniqueId', $data ?? [], null); - $this->setIfExists('tierablePayPayCodeSetUniqueId', $data ?? [], null); - $this->setIfExists('paymentDateRule', $data ?? [], null); - $this->setIfExists('paymentDateDayOfWeek', $data ?? [], null); - $this->setIfExists('paymentDateDayOfMonth', $data ?? [], null); - $this->setIfExists('reportOptionsLgpsIConnect', $data ?? [], null); - $this->setIfExists('reportOptionsLgpsCivicaUpm', $data ?? [], null); - $this->setIfExists('deficitValueOrdinal', $data ?? [], null); - $this->setIfExists('deficitValue', $data ?? [], null); - $this->setIfExists('includeDeficitValue', $data ?? [], null); - $this->setIfExists('deficitValuePayPeriod', $data ?? [], null); - $this->setIfExists('nominalCodeMappings', $data ?? [], null); } /** @@ -506,170 +506,184 @@ public function valid(): bool /** - * Gets id + * Gets administrator * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractPensionAdministratorResponse|null */ - public function getId(): ?string + public function getAdministrator(): ?\SynergiTech\Staffology\Model\ContractPensionAdministratorResponse { - return $this->container['id']; + return $this->container['administrator']; } /** - * Sets id + * Sets administrator * - * @param string|null $id id + * @param \SynergiTech\Staffology\Model\ContractPensionAdministratorResponse|null $administrator administrator * * @return $this */ - public function setId(?string $id): static + public function setAdministrator(?\SynergiTech\Staffology\Model\ContractPensionAdministratorResponse $administrator): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($administrator)) { + throw new InvalidArgumentException('non-nullable administrator cannot be null'); } - $this->container['id'] = $id; + $this->container['administrator'] = $administrator; return $this; } /** - * Gets name + * Gets bankDetails * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractBankDetails|null */ - public function getName(): ?string + public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractBankDetails { - return $this->container['name']; + return $this->container['bankDetails']; } /** - * Sets name + * Sets bankDetails * - * @param string|null $name name + * @param \SynergiTech\Staffology\Model\ContractBankDetails|null $bankDetails bankDetails * * @return $this */ - public function setName(?string $name): static + public function setBankDetails(?\SynergiTech\Staffology\Model\ContractBankDetails $bankDetails): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($bankDetails)) { + throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); } - $this->container['name'] = $name; + $this->container['bankDetails'] = $bankDetails; return $this; } /** - * Gets provider + * Gets customPayCodes * - * @return \SynergiTech\Staffology\Model\ContractPensionProviderResponse|null + * @return string[]|null */ - public function getProvider(): ?\SynergiTech\Staffology\Model\ContractPensionProviderResponse + public function getCustomPayCodes(): ?array { - return $this->container['provider']; + return $this->container['customPayCodes']; } /** - * Sets provider + * Sets customPayCodes * - * @param \SynergiTech\Staffology\Model\ContractPensionProviderResponse|null $provider provider + * @param string[]|null $customPayCodes If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code that we'll treat as being pensionable. * * @return $this */ - public function setProvider(?\SynergiTech\Staffology\Model\ContractPensionProviderResponse $provider): static + public function setCustomPayCodes(?array $customPayCodes): static { - if (is_null($provider)) { - throw new InvalidArgumentException('non-nullable provider cannot be null'); + if (is_null($customPayCodes)) { + array_push($this->openAPINullablesSetToNull, 'customPayCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('customPayCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['provider'] = $provider; + $this->container['customPayCodes'] = $customPayCodes; return $this; } /** - * Gets administrator + * Gets deficitValue * - * @return \SynergiTech\Staffology\Model\ContractPensionAdministratorResponse|null + * @return float|null */ - public function getAdministrator(): ?\SynergiTech\Staffology\Model\ContractPensionAdministratorResponse + public function getDeficitValue(): ?float { - return $this->container['administrator']; + return $this->container['deficitValue']; } /** - * Sets administrator + * Sets deficitValue * - * @param \SynergiTech\Staffology\Model\ContractPensionAdministratorResponse|null $administrator administrator + * @param float|null $deficitValue The Defict value that will be deducted in a PaySchedule * * @return $this */ - public function setAdministrator(?\SynergiTech\Staffology\Model\ContractPensionAdministratorResponse $administrator): static + public function setDeficitValue(?float $deficitValue): static { - if (is_null($administrator)) { - throw new InvalidArgumentException('non-nullable administrator cannot be null'); + if (is_null($deficitValue)) { + array_push($this->openAPINullablesSetToNull, 'deficitValue'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deficitValue', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['administrator'] = $administrator; + $this->container['deficitValue'] = $deficitValue; return $this; } /** - * Gets pensionRule + * Gets deficitValueOrdinal * - * @return \SynergiTech\Staffology\Model\PensionRule|null + * @return int|null */ - public function getPensionRule(): ?\SynergiTech\Staffology\Model\PensionRule + public function getDeficitValueOrdinal(): ?int { - return $this->container['pensionRule']; + return $this->container['deficitValueOrdinal']; } /** - * Sets pensionRule + * Sets deficitValueOrdinal * - * @param \SynergiTech\Staffology\Model\PensionRule|null $pensionRule pensionRule + * @param int|null $deficitValueOrdinal The Ordinal used to identify the PaySchedule which the Deficit will be against * * @return $this */ - public function setPensionRule(?\SynergiTech\Staffology\Model\PensionRule $pensionRule): static + public function setDeficitValueOrdinal(?int $deficitValueOrdinal): static { - if (is_null($pensionRule)) { - throw new InvalidArgumentException('non-nullable pensionRule cannot be null'); + if (is_null($deficitValueOrdinal)) { + array_push($this->openAPINullablesSetToNull, 'deficitValueOrdinal'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deficitValueOrdinal', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['pensionRule'] = $pensionRule; + $this->container['deficitValueOrdinal'] = $deficitValueOrdinal; return $this; } /** - * Gets qualifyingScheme + * Gets deficitValuePayPeriod * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getQualifyingScheme(): ?bool + public function getDeficitValuePayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['qualifyingScheme']; + return $this->container['deficitValuePayPeriod']; } /** - * Sets qualifyingScheme + * Sets deficitValuePayPeriod * - * @param bool|null $qualifyingScheme Set to true if this is a Qualifying Scheme for Auto Enrolment + * @param \SynergiTech\Staffology\Model\PayPeriods|null $deficitValuePayPeriod deficitValuePayPeriod * * @return $this */ - public function setQualifyingScheme(?bool $qualifyingScheme): static + public function setDeficitValuePayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $deficitValuePayPeriod): static { - if (is_null($qualifyingScheme)) { - throw new InvalidArgumentException('non-nullable qualifyingScheme cannot be null'); + if (is_null($deficitValuePayPeriod)) { + throw new InvalidArgumentException('non-nullable deficitValuePayPeriod cannot be null'); } - $this->container['qualifyingScheme'] = $qualifyingScheme; + $this->container['deficitValuePayPeriod'] = $deficitValuePayPeriod; return $this; } @@ -702,536 +716,495 @@ public function setDisableAeLetters(?bool $disableAeLetters): static } /** - * Gets subtractBasicRateTax + * Gets displayName * - * @return bool|null + * @return string|null */ - public function getSubtractBasicRateTax(): ?bool + public function getDisplayName(): ?string { - return $this->container['subtractBasicRateTax']; + return $this->container['displayName']; } /** - * Sets subtractBasicRateTax + * Sets displayName * - * @param bool|null $subtractBasicRateTax subtractBasicRateTax + * @param string|null $displayName displayName * * @return $this */ - public function setSubtractBasicRateTax(?bool $subtractBasicRateTax): static + public function setDisplayName(?string $displayName): static { - if (is_null($subtractBasicRateTax)) { - throw new InvalidArgumentException('non-nullable subtractBasicRateTax cannot be null'); + if (is_null($displayName)) { + array_push($this->openAPINullablesSetToNull, 'displayName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('displayName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['subtractBasicRateTax'] = $subtractBasicRateTax; + $this->container['displayName'] = $displayName; return $this; } /** - * Gets payMethod + * Gets externalDataCompany * - * @return \SynergiTech\Staffology\Model\PayMethod|null + * @return \SynergiTech\Staffology\Model\ContractExternalDataCompanyResponse|null */ - public function getPayMethod(): ?\SynergiTech\Staffology\Model\PayMethod + public function getExternalDataCompany(): ?\SynergiTech\Staffology\Model\ContractExternalDataCompanyResponse { - return $this->container['payMethod']; + return $this->container['externalDataCompany']; } /** - * Sets payMethod + * Sets externalDataCompany * - * @param \SynergiTech\Staffology\Model\PayMethod|null $payMethod payMethod + * @param \SynergiTech\Staffology\Model\ContractExternalDataCompanyResponse|null $externalDataCompany externalDataCompany * * @return $this */ - public function setPayMethod(?\SynergiTech\Staffology\Model\PayMethod $payMethod): static + public function setExternalDataCompany(?\SynergiTech\Staffology\Model\ContractExternalDataCompanyResponse $externalDataCompany): static { - if (is_null($payMethod)) { - throw new InvalidArgumentException('non-nullable payMethod cannot be null'); + if (is_null($externalDataCompany)) { + throw new InvalidArgumentException('non-nullable externalDataCompany cannot be null'); } - $this->container['payMethod'] = $payMethod; + $this->container['externalDataCompany'] = $externalDataCompany; return $this; } /** - * Gets bankDetails + * Gets externalDataProviderId * - * @return \SynergiTech\Staffology\Model\ContractBankDetails|null + * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null */ - public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractBankDetails + public function getExternalDataProviderId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId { - return $this->container['bankDetails']; + return $this->container['externalDataProviderId']; } /** - * Sets bankDetails + * Sets externalDataProviderId * - * @param \SynergiTech\Staffology\Model\ContractBankDetails|null $bankDetails bankDetails + * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $externalDataProviderId externalDataProviderId * * @return $this */ - public function setBankDetails(?\SynergiTech\Staffology\Model\ContractBankDetails $bankDetails): static + public function setExternalDataProviderId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $externalDataProviderId): static { - if (is_null($bankDetails)) { - throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); + if (is_null($externalDataProviderId)) { + throw new InvalidArgumentException('non-nullable externalDataProviderId cannot be null'); } - $this->container['bankDetails'] = $bankDetails; + $this->container['externalDataProviderId'] = $externalDataProviderId; return $this; } /** - * Gets useCustomPayCodes + * Gets id * - * @return bool|null + * @return string|null */ - public function getUseCustomPayCodes(): ?bool + public function getId(): ?string { - return $this->container['useCustomPayCodes']; + return $this->container['id']; } /** - * Sets useCustomPayCodes + * Sets id * - * @param bool|null $useCustomPayCodes If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable we'll instead treat it as pensionable if the Code is included in CustomPayCodes + * @param string|null $id id * * @return $this */ - public function setUseCustomPayCodes(?bool $useCustomPayCodes): static + public function setId(?string $id): static { - if (is_null($useCustomPayCodes)) { - throw new InvalidArgumentException('non-nullable useCustomPayCodes cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['useCustomPayCodes'] = $useCustomPayCodes; + $this->container['id'] = $id; return $this; } /** - * Gets useCustomPayCodesForTierablePay + * Gets includeDeficitValue * * @return bool|null */ - public function getUseCustomPayCodesForTierablePay(): ?bool + public function getIncludeDeficitValue(): ?bool { - return $this->container['useCustomPayCodesForTierablePay']; + return $this->container['includeDeficitValue']; } /** - * Sets useCustomPayCodesForTierablePay + * Sets includeDeficitValue * - * @param bool|null $useCustomPayCodesForTierablePay If set to true then rather than using the setting on the PayCode to determine if the pay is tierable we'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes + * @param bool|null $includeDeficitValue Set to true if this a Deficit Payment needs to be assigned to a PaySchedule * * @return $this */ - public function setUseCustomPayCodesForTierablePay(?bool $useCustomPayCodesForTierablePay): static + public function setIncludeDeficitValue(?bool $includeDeficitValue): static { - if (is_null($useCustomPayCodesForTierablePay)) { - throw new InvalidArgumentException('non-nullable useCustomPayCodesForTierablePay cannot be null'); + if (is_null($includeDeficitValue)) { + throw new InvalidArgumentException('non-nullable includeDeficitValue cannot be null'); } - $this->container['useCustomPayCodesForTierablePay'] = $useCustomPayCodesForTierablePay; + $this->container['includeDeficitValue'] = $includeDeficitValue; return $this; } /** - * Gets customPayCodes + * Gets name * - * @return string[]|null + * @return string|null */ - public function getCustomPayCodes(): ?array + public function getName(): ?string { - return $this->container['customPayCodes']; + return $this->container['name']; } /** - * Sets customPayCodes + * Sets name * - * @param string[]|null $customPayCodes If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code that we'll treat as being pensionable. + * @param string|null $name name * * @return $this */ - public function setCustomPayCodes(?array $customPayCodes): static + public function setName(?string $name): static { - if (is_null($customPayCodes)) { - array_push($this->openAPINullablesSetToNull, 'customPayCodes'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('customPayCodes', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['customPayCodes'] = $customPayCodes; + $this->container['name'] = $name; return $this; } /** - * Gets tierablePayCustomPayCodes + * Gets nominalCodeMappings * - * @return string[]|null + * @return \SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingResponse[]|null */ - public function getTierablePayCustomPayCodes(): ?array + public function getNominalCodeMappings(): ?array { - return $this->container['tierablePayCustomPayCodes']; + return $this->container['nominalCodeMappings']; } /** - * Sets tierablePayCustomPayCodes + * Sets nominalCodeMappings * - * @param string[]|null $tierablePayCustomPayCodes If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code that we'll treat as being tierable. + * @param \SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingResponse[]|null $nominalCodeMappings The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration * * @return $this */ - public function setTierablePayCustomPayCodes(?array $tierablePayCustomPayCodes): static + public function setNominalCodeMappings(?array $nominalCodeMappings): static { - if (is_null($tierablePayCustomPayCodes)) { - array_push($this->openAPINullablesSetToNull, 'tierablePayCustomPayCodes'); + if (is_null($nominalCodeMappings)) { + array_push($this->openAPINullablesSetToNull, 'nominalCodeMappings'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tierablePayCustomPayCodes', $nullablesSetToNull); + $index = array_search('nominalCodeMappings', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tierablePayCustomPayCodes'] = $tierablePayCustomPayCodes; + $this->container['nominalCodeMappings'] = $nominalCodeMappings; return $this; } /** - * Gets workerGroups + * Gets payCodeSetUniqueId * - * @return \SynergiTech\Staffology\Model\ContractWorkerGroupResponse[]|null + * @return string|null */ - public function getWorkerGroups(): ?array + public function getPayCodeSetUniqueId(): ?string { - return $this->container['workerGroups']; + return $this->container['payCodeSetUniqueId']; } /** - * Sets workerGroups + * Sets payCodeSetUniqueId * - * @param \SynergiTech\Staffology\Model\ContractWorkerGroupResponse[]|null $workerGroups A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup + * @param string|null $payCodeSetUniqueId payCodeSetUniqueId * * @return $this */ - public function setWorkerGroups(?array $workerGroups): static + public function setPayCodeSetUniqueId(?string $payCodeSetUniqueId): static { - if (is_null($workerGroups)) { - array_push($this->openAPINullablesSetToNull, 'workerGroups'); + if (is_null($payCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'payCodeSetUniqueId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('workerGroups', $nullablesSetToNull); + $index = array_search('payCodeSetUniqueId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['workerGroups'] = $workerGroups; + $this->container['payCodeSetUniqueId'] = $payCodeSetUniqueId; return $this; } /** - * Gets externalDataProviderId + * Gets payCodeType * - * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null + * @return \SynergiTech\Staffology\Model\PensionPayCode|null */ - public function getExternalDataProviderId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId + public function getPayCodeType(): ?\SynergiTech\Staffology\Model\PensionPayCode { - return $this->container['externalDataProviderId']; + return $this->container['payCodeType']; } /** - * Sets externalDataProviderId + * Sets payCodeType * - * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $externalDataProviderId externalDataProviderId + * @param \SynergiTech\Staffology\Model\PensionPayCode|null $payCodeType payCodeType * * @return $this */ - public function setExternalDataProviderId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $externalDataProviderId): static + public function setPayCodeType(?\SynergiTech\Staffology\Model\PensionPayCode $payCodeType): static { - if (is_null($externalDataProviderId)) { - throw new InvalidArgumentException('non-nullable externalDataProviderId cannot be null'); + if (is_null($payCodeType)) { + throw new InvalidArgumentException('non-nullable payCodeType cannot be null'); } - $this->container['externalDataProviderId'] = $externalDataProviderId; + $this->container['payCodeType'] = $payCodeType; return $this; } /** - * Gets externalDataCompany + * Gets payMethod * - * @return \SynergiTech\Staffology\Model\ContractExternalDataCompanyResponse|null + * @return \SynergiTech\Staffology\Model\PayMethod|null */ - public function getExternalDataCompany(): ?\SynergiTech\Staffology\Model\ContractExternalDataCompanyResponse + public function getPayMethod(): ?\SynergiTech\Staffology\Model\PayMethod { - return $this->container['externalDataCompany']; + return $this->container['payMethod']; } /** - * Sets externalDataCompany + * Sets payMethod * - * @param \SynergiTech\Staffology\Model\ContractExternalDataCompanyResponse|null $externalDataCompany externalDataCompany + * @param \SynergiTech\Staffology\Model\PayMethod|null $payMethod payMethod * * @return $this */ - public function setExternalDataCompany(?\SynergiTech\Staffology\Model\ContractExternalDataCompanyResponse $externalDataCompany): static + public function setPayMethod(?\SynergiTech\Staffology\Model\PayMethod $payMethod): static { - if (is_null($externalDataCompany)) { - throw new InvalidArgumentException('non-nullable externalDataCompany cannot be null'); + if (is_null($payMethod)) { + throw new InvalidArgumentException('non-nullable payMethod cannot be null'); } - $this->container['externalDataCompany'] = $externalDataCompany; + $this->container['payMethod'] = $payMethod; return $this; } /** - * Gets displayName + * Gets paymentDateDayOfMonth * - * @return string|null + * @return int|null */ - public function getDisplayName(): ?string + public function getPaymentDateDayOfMonth(): ?int { - return $this->container['displayName']; + return $this->container['paymentDateDayOfMonth']; } /** - * Sets displayName + * Sets paymentDateDayOfMonth * - * @param string|null $displayName displayName + * @param int|null $paymentDateDayOfMonth paymentDateDayOfMonth * * @return $this */ - public function setDisplayName(?string $displayName): static + public function setPaymentDateDayOfMonth(?int $paymentDateDayOfMonth): static { - if (is_null($displayName)) { - array_push($this->openAPINullablesSetToNull, 'displayName'); + if (is_null($paymentDateDayOfMonth)) { + array_push($this->openAPINullablesSetToNull, 'paymentDateDayOfMonth'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('displayName', $nullablesSetToNull); + $index = array_search('paymentDateDayOfMonth', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['displayName'] = $displayName; - - return $this; - } - - /** - * Gets payCodeType - * - * @return \SynergiTech\Staffology\Model\PensionPayCode|null - */ - public function getPayCodeType(): ?\SynergiTech\Staffology\Model\PensionPayCode - { - return $this->container['payCodeType']; - } - - /** - * Sets payCodeType - * - * @param \SynergiTech\Staffology\Model\PensionPayCode|null $payCodeType payCodeType - * - * @return $this - */ - public function setPayCodeType(?\SynergiTech\Staffology\Model\PensionPayCode $payCodeType): static - { - if (is_null($payCodeType)) { - throw new InvalidArgumentException('non-nullable payCodeType cannot be null'); - } - $this->container['payCodeType'] = $payCodeType; + $this->container['paymentDateDayOfMonth'] = $paymentDateDayOfMonth; return $this; } /** - * Gets tierablePayPayCodeType + * Gets paymentDateDayOfWeek * - * @return \SynergiTech\Staffology\Model\PensionPayCode|null + * @return \SynergiTech\Staffology\Model\DayOfWeek|null */ - public function getTierablePayPayCodeType(): ?\SynergiTech\Staffology\Model\PensionPayCode + public function getPaymentDateDayOfWeek(): ?\SynergiTech\Staffology\Model\DayOfWeek { - return $this->container['tierablePayPayCodeType']; + return $this->container['paymentDateDayOfWeek']; } /** - * Sets tierablePayPayCodeType + * Sets paymentDateDayOfWeek * - * @param \SynergiTech\Staffology\Model\PensionPayCode|null $tierablePayPayCodeType tierablePayPayCodeType + * @param \SynergiTech\Staffology\Model\DayOfWeek|null $paymentDateDayOfWeek paymentDateDayOfWeek * * @return $this */ - public function setTierablePayPayCodeType(?\SynergiTech\Staffology\Model\PensionPayCode $tierablePayPayCodeType): static + public function setPaymentDateDayOfWeek(?\SynergiTech\Staffology\Model\DayOfWeek $paymentDateDayOfWeek): static { - if (is_null($tierablePayPayCodeType)) { - throw new InvalidArgumentException('non-nullable tierablePayPayCodeType cannot be null'); + if (is_null($paymentDateDayOfWeek)) { + throw new InvalidArgumentException('non-nullable paymentDateDayOfWeek cannot be null'); } - $this->container['tierablePayPayCodeType'] = $tierablePayPayCodeType; + $this->container['paymentDateDayOfWeek'] = $paymentDateDayOfWeek; return $this; } /** - * Gets payCodeSetUniqueId + * Gets paymentDateRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\PaymentDateRule|null */ - public function getPayCodeSetUniqueId(): ?string + public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule { - return $this->container['payCodeSetUniqueId']; + return $this->container['paymentDateRule']; } /** - * Sets payCodeSetUniqueId - * - * @param string|null $payCodeSetUniqueId payCodeSetUniqueId - * - * @return $this - */ - public function setPayCodeSetUniqueId(?string $payCodeSetUniqueId): static - { - if (is_null($payCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'payCodeSetUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCodeSetUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + * Sets paymentDateRule + * + * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule + * + * @return $this + */ + public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static + { + if (is_null($paymentDateRule)) { + throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); } - $this->container['payCodeSetUniqueId'] = $payCodeSetUniqueId; + $this->container['paymentDateRule'] = $paymentDateRule; return $this; } /** - * Gets tierablePayPayCodeSetUniqueId + * Gets pensionRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\PensionRule|null */ - public function getTierablePayPayCodeSetUniqueId(): ?string + public function getPensionRule(): ?\SynergiTech\Staffology\Model\PensionRule { - return $this->container['tierablePayPayCodeSetUniqueId']; + return $this->container['pensionRule']; } /** - * Sets tierablePayPayCodeSetUniqueId + * Sets pensionRule * - * @param string|null $tierablePayPayCodeSetUniqueId tierablePayPayCodeSetUniqueId + * @param \SynergiTech\Staffology\Model\PensionRule|null $pensionRule pensionRule * * @return $this */ - public function setTierablePayPayCodeSetUniqueId(?string $tierablePayPayCodeSetUniqueId): static + public function setPensionRule(?\SynergiTech\Staffology\Model\PensionRule $pensionRule): static { - if (is_null($tierablePayPayCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'tierablePayPayCodeSetUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tierablePayPayCodeSetUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($pensionRule)) { + throw new InvalidArgumentException('non-nullable pensionRule cannot be null'); } - $this->container['tierablePayPayCodeSetUniqueId'] = $tierablePayPayCodeSetUniqueId; + $this->container['pensionRule'] = $pensionRule; return $this; } /** - * Gets paymentDateRule + * Gets provider * - * @return \SynergiTech\Staffology\Model\PaymentDateRule|null + * @return \SynergiTech\Staffology\Model\ContractPensionProviderResponse|null */ - public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule + public function getProvider(): ?\SynergiTech\Staffology\Model\ContractPensionProviderResponse { - return $this->container['paymentDateRule']; + return $this->container['provider']; } /** - * Sets paymentDateRule + * Sets provider * - * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule + * @param \SynergiTech\Staffology\Model\ContractPensionProviderResponse|null $provider provider * * @return $this */ - public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static + public function setProvider(?\SynergiTech\Staffology\Model\ContractPensionProviderResponse $provider): static { - if (is_null($paymentDateRule)) { - throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); + if (is_null($provider)) { + throw new InvalidArgumentException('non-nullable provider cannot be null'); } - $this->container['paymentDateRule'] = $paymentDateRule; + $this->container['provider'] = $provider; return $this; } /** - * Gets paymentDateDayOfWeek + * Gets qualifyingScheme * - * @return \SynergiTech\Staffology\Model\DayOfWeek|null + * @return bool|null */ - public function getPaymentDateDayOfWeek(): ?\SynergiTech\Staffology\Model\DayOfWeek + public function getQualifyingScheme(): ?bool { - return $this->container['paymentDateDayOfWeek']; + return $this->container['qualifyingScheme']; } /** - * Sets paymentDateDayOfWeek + * Sets qualifyingScheme * - * @param \SynergiTech\Staffology\Model\DayOfWeek|null $paymentDateDayOfWeek paymentDateDayOfWeek + * @param bool|null $qualifyingScheme Set to true if this is a Qualifying Scheme for Auto Enrolment * * @return $this */ - public function setPaymentDateDayOfWeek(?\SynergiTech\Staffology\Model\DayOfWeek $paymentDateDayOfWeek): static + public function setQualifyingScheme(?bool $qualifyingScheme): static { - if (is_null($paymentDateDayOfWeek)) { - throw new InvalidArgumentException('non-nullable paymentDateDayOfWeek cannot be null'); + if (is_null($qualifyingScheme)) { + throw new InvalidArgumentException('non-nullable qualifyingScheme cannot be null'); } - $this->container['paymentDateDayOfWeek'] = $paymentDateDayOfWeek; + $this->container['qualifyingScheme'] = $qualifyingScheme; return $this; } /** - * Gets paymentDateDayOfMonth + * Gets reportOptionsLgpsCivicaUpm * - * @return int|null + * @return \SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse|null */ - public function getPaymentDateDayOfMonth(): ?int + public function getReportOptionsLgpsCivicaUpm(): ?\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse { - return $this->container['paymentDateDayOfMonth']; + return $this->container['reportOptionsLgpsCivicaUpm']; } /** - * Sets paymentDateDayOfMonth + * Sets reportOptionsLgpsCivicaUpm * - * @param int|null $paymentDateDayOfMonth paymentDateDayOfMonth + * @param \SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse|null $reportOptionsLgpsCivicaUpm reportOptionsLgpsCivicaUpm * * @return $this */ - public function setPaymentDateDayOfMonth(?int $paymentDateDayOfMonth): static + public function setReportOptionsLgpsCivicaUpm(?\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse $reportOptionsLgpsCivicaUpm): static { - if (is_null($paymentDateDayOfMonth)) { - array_push($this->openAPINullablesSetToNull, 'paymentDateDayOfMonth'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paymentDateDayOfMonth', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($reportOptionsLgpsCivicaUpm)) { + throw new InvalidArgumentException('non-nullable reportOptionsLgpsCivicaUpm cannot be null'); } - $this->container['paymentDateDayOfMonth'] = $paymentDateDayOfMonth; + $this->container['reportOptionsLgpsCivicaUpm'] = $reportOptionsLgpsCivicaUpm; return $this; } @@ -1264,184 +1237,211 @@ public function setReportOptionsLgpsIConnect(?\SynergiTech\Staffology\Model\Cont } /** - * Gets reportOptionsLgpsCivicaUpm + * Gets subtractBasicRateTax * - * @return \SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse|null + * @return bool|null */ - public function getReportOptionsLgpsCivicaUpm(): ?\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse + public function getSubtractBasicRateTax(): ?bool { - return $this->container['reportOptionsLgpsCivicaUpm']; + return $this->container['subtractBasicRateTax']; } /** - * Sets reportOptionsLgpsCivicaUpm + * Sets subtractBasicRateTax * - * @param \SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse|null $reportOptionsLgpsCivicaUpm reportOptionsLgpsCivicaUpm + * @param bool|null $subtractBasicRateTax subtractBasicRateTax * * @return $this */ - public function setReportOptionsLgpsCivicaUpm(?\SynergiTech\Staffology\Model\ContractPensionSchemeReportOptionsLgpsCivicaUpmResponse $reportOptionsLgpsCivicaUpm): static + public function setSubtractBasicRateTax(?bool $subtractBasicRateTax): static { - if (is_null($reportOptionsLgpsCivicaUpm)) { - throw new InvalidArgumentException('non-nullable reportOptionsLgpsCivicaUpm cannot be null'); + if (is_null($subtractBasicRateTax)) { + throw new InvalidArgumentException('non-nullable subtractBasicRateTax cannot be null'); } - $this->container['reportOptionsLgpsCivicaUpm'] = $reportOptionsLgpsCivicaUpm; + $this->container['subtractBasicRateTax'] = $subtractBasicRateTax; return $this; } /** - * Gets deficitValueOrdinal + * Gets tierablePayCustomPayCodes * - * @return int|null + * @return string[]|null */ - public function getDeficitValueOrdinal(): ?int + public function getTierablePayCustomPayCodes(): ?array { - return $this->container['deficitValueOrdinal']; + return $this->container['tierablePayCustomPayCodes']; } /** - * Sets deficitValueOrdinal + * Sets tierablePayCustomPayCodes * - * @param int|null $deficitValueOrdinal The Ordinal used to identify the PaySchedule which the Deficit will be against + * @param string[]|null $tierablePayCustomPayCodes If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code that we'll treat as being tierable. * * @return $this */ - public function setDeficitValueOrdinal(?int $deficitValueOrdinal): static + public function setTierablePayCustomPayCodes(?array $tierablePayCustomPayCodes): static { - if (is_null($deficitValueOrdinal)) { - array_push($this->openAPINullablesSetToNull, 'deficitValueOrdinal'); + if (is_null($tierablePayCustomPayCodes)) { + array_push($this->openAPINullablesSetToNull, 'tierablePayCustomPayCodes'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('deficitValueOrdinal', $nullablesSetToNull); + $index = array_search('tierablePayCustomPayCodes', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['deficitValueOrdinal'] = $deficitValueOrdinal; + $this->container['tierablePayCustomPayCodes'] = $tierablePayCustomPayCodes; return $this; } /** - * Gets deficitValue + * Gets tierablePayPayCodeSetUniqueId * - * @return float|null + * @return string|null */ - public function getDeficitValue(): ?float + public function getTierablePayPayCodeSetUniqueId(): ?string { - return $this->container['deficitValue']; + return $this->container['tierablePayPayCodeSetUniqueId']; } /** - * Sets deficitValue + * Sets tierablePayPayCodeSetUniqueId * - * @param float|null $deficitValue The Defict value that will be deducted in a PaySchedule + * @param string|null $tierablePayPayCodeSetUniqueId tierablePayPayCodeSetUniqueId * * @return $this */ - public function setDeficitValue(?float $deficitValue): static + public function setTierablePayPayCodeSetUniqueId(?string $tierablePayPayCodeSetUniqueId): static { - if (is_null($deficitValue)) { - array_push($this->openAPINullablesSetToNull, 'deficitValue'); + if (is_null($tierablePayPayCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'tierablePayPayCodeSetUniqueId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('deficitValue', $nullablesSetToNull); + $index = array_search('tierablePayPayCodeSetUniqueId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['deficitValue'] = $deficitValue; + $this->container['tierablePayPayCodeSetUniqueId'] = $tierablePayPayCodeSetUniqueId; return $this; } /** - * Gets includeDeficitValue + * Gets tierablePayPayCodeType + * + * @return \SynergiTech\Staffology\Model\PensionPayCode|null + */ + public function getTierablePayPayCodeType(): ?\SynergiTech\Staffology\Model\PensionPayCode + { + return $this->container['tierablePayPayCodeType']; + } + + /** + * Sets tierablePayPayCodeType + * + * @param \SynergiTech\Staffology\Model\PensionPayCode|null $tierablePayPayCodeType tierablePayPayCodeType + * + * @return $this + */ + public function setTierablePayPayCodeType(?\SynergiTech\Staffology\Model\PensionPayCode $tierablePayPayCodeType): static + { + if (is_null($tierablePayPayCodeType)) { + throw new InvalidArgumentException('non-nullable tierablePayPayCodeType cannot be null'); + } + $this->container['tierablePayPayCodeType'] = $tierablePayPayCodeType; + + return $this; + } + + /** + * Gets useCustomPayCodes * * @return bool|null */ - public function getIncludeDeficitValue(): ?bool + public function getUseCustomPayCodes(): ?bool { - return $this->container['includeDeficitValue']; + return $this->container['useCustomPayCodes']; } /** - * Sets includeDeficitValue + * Sets useCustomPayCodes * - * @param bool|null $includeDeficitValue Set to true if this a Deficit Payment needs to be assigned to a PaySchedule + * @param bool|null $useCustomPayCodes If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable we'll instead treat it as pensionable if the Code is included in CustomPayCodes * * @return $this */ - public function setIncludeDeficitValue(?bool $includeDeficitValue): static + public function setUseCustomPayCodes(?bool $useCustomPayCodes): static { - if (is_null($includeDeficitValue)) { - throw new InvalidArgumentException('non-nullable includeDeficitValue cannot be null'); + if (is_null($useCustomPayCodes)) { + throw new InvalidArgumentException('non-nullable useCustomPayCodes cannot be null'); } - $this->container['includeDeficitValue'] = $includeDeficitValue; + $this->container['useCustomPayCodes'] = $useCustomPayCodes; return $this; } /** - * Gets deficitValuePayPeriod + * Gets useCustomPayCodesForTierablePay * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return bool|null */ - public function getDeficitValuePayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getUseCustomPayCodesForTierablePay(): ?bool { - return $this->container['deficitValuePayPeriod']; + return $this->container['useCustomPayCodesForTierablePay']; } /** - * Sets deficitValuePayPeriod + * Sets useCustomPayCodesForTierablePay * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $deficitValuePayPeriod deficitValuePayPeriod + * @param bool|null $useCustomPayCodesForTierablePay If set to true then rather than using the setting on the PayCode to determine if the pay is tierable we'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes * * @return $this */ - public function setDeficitValuePayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $deficitValuePayPeriod): static + public function setUseCustomPayCodesForTierablePay(?bool $useCustomPayCodesForTierablePay): static { - if (is_null($deficitValuePayPeriod)) { - throw new InvalidArgumentException('non-nullable deficitValuePayPeriod cannot be null'); + if (is_null($useCustomPayCodesForTierablePay)) { + throw new InvalidArgumentException('non-nullable useCustomPayCodesForTierablePay cannot be null'); } - $this->container['deficitValuePayPeriod'] = $deficitValuePayPeriod; + $this->container['useCustomPayCodesForTierablePay'] = $useCustomPayCodesForTierablePay; return $this; } /** - * Gets nominalCodeMappings + * Gets workerGroups * - * @return \SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingResponse[]|null + * @return \SynergiTech\Staffology\Model\ContractWorkerGroupResponse[]|null */ - public function getNominalCodeMappings(): ?array + public function getWorkerGroups(): ?array { - return $this->container['nominalCodeMappings']; + return $this->container['workerGroups']; } /** - * Sets nominalCodeMappings + * Sets workerGroups * - * @param \SynergiTech\Staffology\Model\ContractPensionSchemeNominalCodeMappingResponse[]|null $nominalCodeMappings The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration + * @param \SynergiTech\Staffology\Model\ContractWorkerGroupResponse[]|null $workerGroups A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup * * @return $this */ - public function setNominalCodeMappings(?array $nominalCodeMappings): static + public function setWorkerGroups(?array $workerGroups): static { - if (is_null($nominalCodeMappings)) { - array_push($this->openAPINullablesSetToNull, 'nominalCodeMappings'); + if (is_null($workerGroups)) { + array_push($this->openAPINullablesSetToNull, 'workerGroups'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalCodeMappings', $nullablesSetToNull); + $index = array_search('workerGroups', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nominalCodeMappings'] = $nominalCodeMappings; + $this->container['workerGroups'] = $workerGroups; return $this; } diff --git a/src/Model/ContractPensionSelectionRequest.php b/src/Model/ContractPensionSelectionRequest.php index 1d5fed7..5f30361 100644 --- a/src/Model/ContractPensionSelectionRequest.php +++ b/src/Model/ContractPensionSelectionRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class ContractPensionSelectionRequest implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ + 'autoEnrolled' => 'bool', 'id' => 'string', - 'pensionSchemeId' => 'string', - 'workerGroupId' => 'string', 'pensionScheme' => '\SynergiTech\Staffology\Model\ContractPensionSchemeRequest', - 'autoEnrolled' => 'bool' + 'pensionSchemeId' => 'string', + 'workerGroupId' => 'string' ]; /** @@ -72,11 +72,11 @@ class ContractPensionSelectionRequest implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ + 'autoEnrolled' => null, 'id' => 'uuid', - 'pensionSchemeId' => 'uuid', - 'workerGroupId' => 'uuid', 'pensionScheme' => null, - 'autoEnrolled' => null + 'pensionSchemeId' => 'uuid', + 'workerGroupId' => 'uuid' ]; /** @@ -85,11 +85,11 @@ class ContractPensionSelectionRequest implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ + 'autoEnrolled' => false, 'id' => false, - 'pensionSchemeId' => false, - 'workerGroupId' => false, 'pensionScheme' => false, - 'autoEnrolled' => false + 'pensionSchemeId' => false, + 'workerGroupId' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'autoEnrolled' => 'autoEnrolled', 'id' => 'id', - 'pensionSchemeId' => 'pensionSchemeId', - 'workerGroupId' => 'workerGroupId', 'pensionScheme' => 'pensionScheme', - 'autoEnrolled' => 'autoEnrolled' + 'pensionSchemeId' => 'pensionSchemeId', + 'workerGroupId' => 'workerGroupId' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'autoEnrolled' => 'setAutoEnrolled', 'id' => 'setId', - 'pensionSchemeId' => 'setPensionSchemeId', - 'workerGroupId' => 'setWorkerGroupId', 'pensionScheme' => 'setPensionScheme', - 'autoEnrolled' => 'setAutoEnrolled' + 'pensionSchemeId' => 'setPensionSchemeId', + 'workerGroupId' => 'setWorkerGroupId' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'autoEnrolled' => 'getAutoEnrolled', 'id' => 'getId', - 'pensionSchemeId' => 'getPensionSchemeId', - 'workerGroupId' => 'getWorkerGroupId', 'pensionScheme' => 'getPensionScheme', - 'autoEnrolled' => 'getAutoEnrolled' + 'pensionSchemeId' => 'getPensionSchemeId', + 'workerGroupId' => 'getWorkerGroupId' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('autoEnrolled', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('pensionScheme', $data ?? [], null); $this->setIfExists('pensionSchemeId', $data ?? [], null); $this->setIfExists('workerGroupId', $data ?? [], null); - $this->setIfExists('pensionScheme', $data ?? [], null); - $this->setIfExists('autoEnrolled', $data ?? [], null); } /** @@ -317,136 +317,136 @@ public function valid(): bool /** - * Gets id + * Gets autoEnrolled * - * @return string|null + * @return bool|null */ - public function getId(): ?string + public function getAutoEnrolled(): ?bool { - return $this->container['id']; + return $this->container['autoEnrolled']; } /** - * Sets id + * Sets autoEnrolled * - * @param string|null $id id + * @param bool|null $autoEnrolled [readonly] Is True if the employee joined this Pension due to an AutoEnrolment action * * @return $this */ - public function setId(?string $id): static + public function setAutoEnrolled(?bool $autoEnrolled): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($autoEnrolled)) { + throw new InvalidArgumentException('non-nullable autoEnrolled cannot be null'); } - $this->container['id'] = $id; + $this->container['autoEnrolled'] = $autoEnrolled; return $this; } /** - * Gets pensionSchemeId + * Gets id * * @return string|null */ - public function getPensionSchemeId(): ?string + public function getId(): ?string { - return $this->container['pensionSchemeId']; + return $this->container['id']; } /** - * Sets pensionSchemeId + * Sets id * - * @param string|null $pensionSchemeId pensionSchemeId + * @param string|null $id id * * @return $this */ - public function setPensionSchemeId(?string $pensionSchemeId): static + public function setId(?string $id): static { - if (is_null($pensionSchemeId)) { - throw new InvalidArgumentException('non-nullable pensionSchemeId cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['pensionSchemeId'] = $pensionSchemeId; + $this->container['id'] = $id; return $this; } /** - * Gets workerGroupId + * Gets pensionScheme * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractPensionSchemeRequest|null */ - public function getWorkerGroupId(): ?string + public function getPensionScheme(): ?\SynergiTech\Staffology\Model\ContractPensionSchemeRequest { - return $this->container['workerGroupId']; + return $this->container['pensionScheme']; } /** - * Sets workerGroupId + * Sets pensionScheme * - * @param string|null $workerGroupId workerGroupId + * @param \SynergiTech\Staffology\Model\ContractPensionSchemeRequest|null $pensionScheme pensionScheme * * @return $this */ - public function setWorkerGroupId(?string $workerGroupId): static + public function setPensionScheme(?\SynergiTech\Staffology\Model\ContractPensionSchemeRequest $pensionScheme): static { - if (is_null($workerGroupId)) { - throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); + if (is_null($pensionScheme)) { + throw new InvalidArgumentException('non-nullable pensionScheme cannot be null'); } - $this->container['workerGroupId'] = $workerGroupId; + $this->container['pensionScheme'] = $pensionScheme; return $this; } /** - * Gets pensionScheme + * Gets pensionSchemeId * - * @return \SynergiTech\Staffology\Model\ContractPensionSchemeRequest|null + * @return string|null */ - public function getPensionScheme(): ?\SynergiTech\Staffology\Model\ContractPensionSchemeRequest + public function getPensionSchemeId(): ?string { - return $this->container['pensionScheme']; + return $this->container['pensionSchemeId']; } /** - * Sets pensionScheme + * Sets pensionSchemeId * - * @param \SynergiTech\Staffology\Model\ContractPensionSchemeRequest|null $pensionScheme pensionScheme + * @param string|null $pensionSchemeId pensionSchemeId * * @return $this */ - public function setPensionScheme(?\SynergiTech\Staffology\Model\ContractPensionSchemeRequest $pensionScheme): static + public function setPensionSchemeId(?string $pensionSchemeId): static { - if (is_null($pensionScheme)) { - throw new InvalidArgumentException('non-nullable pensionScheme cannot be null'); + if (is_null($pensionSchemeId)) { + throw new InvalidArgumentException('non-nullable pensionSchemeId cannot be null'); } - $this->container['pensionScheme'] = $pensionScheme; + $this->container['pensionSchemeId'] = $pensionSchemeId; return $this; } /** - * Gets autoEnrolled + * Gets workerGroupId * - * @return bool|null + * @return string|null */ - public function getAutoEnrolled(): ?bool + public function getWorkerGroupId(): ?string { - return $this->container['autoEnrolled']; + return $this->container['workerGroupId']; } /** - * Sets autoEnrolled + * Sets workerGroupId * - * @param bool|null $autoEnrolled [readonly] Is True if the employee joined this Pension due to an AutoEnrolment action + * @param string|null $workerGroupId workerGroupId * * @return $this */ - public function setAutoEnrolled(?bool $autoEnrolled): static + public function setWorkerGroupId(?string $workerGroupId): static { - if (is_null($autoEnrolled)) { - throw new InvalidArgumentException('non-nullable autoEnrolled cannot be null'); + if (is_null($workerGroupId)) { + throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); } - $this->container['autoEnrolled'] = $autoEnrolled; + $this->container['workerGroupId'] = $workerGroupId; return $this; } diff --git a/src/Model/ContractPensionSelectionResponse.php b/src/Model/ContractPensionSelectionResponse.php index 24d0d32..f15617b 100644 --- a/src/Model/ContractPensionSelectionResponse.php +++ b/src/Model/ContractPensionSelectionResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class ContractPensionSelectionResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ + 'autoEnrolled' => 'bool', 'id' => 'string', - 'pensionSchemeId' => 'string', - 'workerGroupId' => 'string', 'pensionScheme' => '\SynergiTech\Staffology\Model\ContractPensionSchemeResponse', - 'autoEnrolled' => 'bool' + 'pensionSchemeId' => 'string', + 'workerGroupId' => 'string' ]; /** @@ -72,11 +72,11 @@ class ContractPensionSelectionResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPIFormats = [ + 'autoEnrolled' => null, 'id' => 'uuid', - 'pensionSchemeId' => 'uuid', - 'workerGroupId' => 'uuid', 'pensionScheme' => null, - 'autoEnrolled' => null + 'pensionSchemeId' => 'uuid', + 'workerGroupId' => 'uuid' ]; /** @@ -85,11 +85,11 @@ class ContractPensionSelectionResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPINullables = [ + 'autoEnrolled' => false, 'id' => false, - 'pensionSchemeId' => false, - 'workerGroupId' => false, 'pensionScheme' => false, - 'autoEnrolled' => false + 'pensionSchemeId' => false, + 'workerGroupId' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'autoEnrolled' => 'autoEnrolled', 'id' => 'id', - 'pensionSchemeId' => 'pensionSchemeId', - 'workerGroupId' => 'workerGroupId', 'pensionScheme' => 'pensionScheme', - 'autoEnrolled' => 'autoEnrolled' + 'pensionSchemeId' => 'pensionSchemeId', + 'workerGroupId' => 'workerGroupId' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'autoEnrolled' => 'setAutoEnrolled', 'id' => 'setId', - 'pensionSchemeId' => 'setPensionSchemeId', - 'workerGroupId' => 'setWorkerGroupId', 'pensionScheme' => 'setPensionScheme', - 'autoEnrolled' => 'setAutoEnrolled' + 'pensionSchemeId' => 'setPensionSchemeId', + 'workerGroupId' => 'setWorkerGroupId' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'autoEnrolled' => 'getAutoEnrolled', 'id' => 'getId', - 'pensionSchemeId' => 'getPensionSchemeId', - 'workerGroupId' => 'getWorkerGroupId', 'pensionScheme' => 'getPensionScheme', - 'autoEnrolled' => 'getAutoEnrolled' + 'pensionSchemeId' => 'getPensionSchemeId', + 'workerGroupId' => 'getWorkerGroupId' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('autoEnrolled', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('pensionScheme', $data ?? [], null); $this->setIfExists('pensionSchemeId', $data ?? [], null); $this->setIfExists('workerGroupId', $data ?? [], null); - $this->setIfExists('pensionScheme', $data ?? [], null); - $this->setIfExists('autoEnrolled', $data ?? [], null); } /** @@ -317,136 +317,136 @@ public function valid(): bool /** - * Gets id + * Gets autoEnrolled * - * @return string|null + * @return bool|null */ - public function getId(): ?string + public function getAutoEnrolled(): ?bool { - return $this->container['id']; + return $this->container['autoEnrolled']; } /** - * Sets id + * Sets autoEnrolled * - * @param string|null $id id + * @param bool|null $autoEnrolled [readonly] Is True if the employee joined this Pension due to an AutoEnrolment action * * @return $this */ - public function setId(?string $id): static + public function setAutoEnrolled(?bool $autoEnrolled): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($autoEnrolled)) { + throw new InvalidArgumentException('non-nullable autoEnrolled cannot be null'); } - $this->container['id'] = $id; + $this->container['autoEnrolled'] = $autoEnrolled; return $this; } /** - * Gets pensionSchemeId + * Gets id * * @return string|null */ - public function getPensionSchemeId(): ?string + public function getId(): ?string { - return $this->container['pensionSchemeId']; + return $this->container['id']; } /** - * Sets pensionSchemeId + * Sets id * - * @param string|null $pensionSchemeId pensionSchemeId + * @param string|null $id id * * @return $this */ - public function setPensionSchemeId(?string $pensionSchemeId): static + public function setId(?string $id): static { - if (is_null($pensionSchemeId)) { - throw new InvalidArgumentException('non-nullable pensionSchemeId cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['pensionSchemeId'] = $pensionSchemeId; + $this->container['id'] = $id; return $this; } /** - * Gets workerGroupId + * Gets pensionScheme * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractPensionSchemeResponse|null */ - public function getWorkerGroupId(): ?string + public function getPensionScheme(): ?\SynergiTech\Staffology\Model\ContractPensionSchemeResponse { - return $this->container['workerGroupId']; + return $this->container['pensionScheme']; } /** - * Sets workerGroupId + * Sets pensionScheme * - * @param string|null $workerGroupId workerGroupId + * @param \SynergiTech\Staffology\Model\ContractPensionSchemeResponse|null $pensionScheme pensionScheme * * @return $this */ - public function setWorkerGroupId(?string $workerGroupId): static + public function setPensionScheme(?\SynergiTech\Staffology\Model\ContractPensionSchemeResponse $pensionScheme): static { - if (is_null($workerGroupId)) { - throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); + if (is_null($pensionScheme)) { + throw new InvalidArgumentException('non-nullable pensionScheme cannot be null'); } - $this->container['workerGroupId'] = $workerGroupId; + $this->container['pensionScheme'] = $pensionScheme; return $this; } /** - * Gets pensionScheme + * Gets pensionSchemeId * - * @return \SynergiTech\Staffology\Model\ContractPensionSchemeResponse|null + * @return string|null */ - public function getPensionScheme(): ?\SynergiTech\Staffology\Model\ContractPensionSchemeResponse + public function getPensionSchemeId(): ?string { - return $this->container['pensionScheme']; + return $this->container['pensionSchemeId']; } /** - * Sets pensionScheme + * Sets pensionSchemeId * - * @param \SynergiTech\Staffology\Model\ContractPensionSchemeResponse|null $pensionScheme pensionScheme + * @param string|null $pensionSchemeId pensionSchemeId * * @return $this */ - public function setPensionScheme(?\SynergiTech\Staffology\Model\ContractPensionSchemeResponse $pensionScheme): static + public function setPensionSchemeId(?string $pensionSchemeId): static { - if (is_null($pensionScheme)) { - throw new InvalidArgumentException('non-nullable pensionScheme cannot be null'); + if (is_null($pensionSchemeId)) { + throw new InvalidArgumentException('non-nullable pensionSchemeId cannot be null'); } - $this->container['pensionScheme'] = $pensionScheme; + $this->container['pensionSchemeId'] = $pensionSchemeId; return $this; } /** - * Gets autoEnrolled + * Gets workerGroupId * - * @return bool|null + * @return string|null */ - public function getAutoEnrolled(): ?bool + public function getWorkerGroupId(): ?string { - return $this->container['autoEnrolled']; + return $this->container['workerGroupId']; } /** - * Sets autoEnrolled + * Sets workerGroupId * - * @param bool|null $autoEnrolled [readonly] Is True if the employee joined this Pension due to an AutoEnrolment action + * @param string|null $workerGroupId workerGroupId * * @return $this */ - public function setAutoEnrolled(?bool $autoEnrolled): static + public function setWorkerGroupId(?string $workerGroupId): static { - if (is_null($autoEnrolled)) { - throw new InvalidArgumentException('non-nullable autoEnrolled cannot be null'); + if (is_null($workerGroupId)) { + throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); } - $this->container['autoEnrolled'] = $autoEnrolled; + $this->container['workerGroupId'] = $workerGroupId; return $this; } diff --git a/src/Model/ContractPensionerPayroll.php b/src/Model/ContractPensionerPayroll.php index 5794e0e..7a6eb81 100644 --- a/src/Model/ContractPensionerPayroll.php +++ b/src/Model/ContractPensionerPayroll.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractPensionerPayroll implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPITypes = [ - 'inReceiptOfPension' => 'bool', - 'bereaved' => 'bool', 'amount' => 'float', + 'bereaved' => 'bool', + 'inReceiptOfPension' => 'bool', 'startDate' => '\DateTime' ]; @@ -71,9 +71,9 @@ class ContractPensionerPayroll implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPIFormats = [ - 'inReceiptOfPension' => null, - 'bereaved' => null, 'amount' => 'double', + 'bereaved' => null, + 'inReceiptOfPension' => null, 'startDate' => 'date' ]; @@ -83,9 +83,9 @@ class ContractPensionerPayroll implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPINullables = [ - 'inReceiptOfPension' => false, - 'bereaved' => false, 'amount' => false, + 'bereaved' => false, + 'inReceiptOfPension' => false, 'startDate' => true ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'inReceiptOfPension' => 'inReceiptOfPension', - 'bereaved' => 'bereaved', 'amount' => 'amount', + 'bereaved' => 'bereaved', + 'inReceiptOfPension' => 'inReceiptOfPension', 'startDate' => 'startDate' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'inReceiptOfPension' => 'setInReceiptOfPension', - 'bereaved' => 'setBereaved', 'amount' => 'setAmount', + 'bereaved' => 'setBereaved', + 'inReceiptOfPension' => 'setInReceiptOfPension', 'startDate' => 'setStartDate' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'inReceiptOfPension' => 'getInReceiptOfPension', - 'bereaved' => 'getBereaved', 'amount' => 'getAmount', + 'bereaved' => 'getBereaved', + 'inReceiptOfPension' => 'getInReceiptOfPension', 'startDate' => 'getStartDate' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('inReceiptOfPension', $data ?? [], null); - $this->setIfExists('bereaved', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('bereaved', $data ?? [], null); + $this->setIfExists('inReceiptOfPension', $data ?? [], null); $this->setIfExists('startDate', $data ?? [], null); } @@ -310,28 +310,28 @@ public function valid(): bool /** - * Gets inReceiptOfPension + * Gets amount * - * @return bool|null + * @return float|null */ - public function getInReceiptOfPension(): ?bool + public function getAmount(): ?float { - return $this->container['inReceiptOfPension']; + return $this->container['amount']; } /** - * Sets inReceiptOfPension + * Sets amount * - * @param bool|null $inReceiptOfPension If set to true then the FPS will have the OccPenInd flag set to 'yes' + * @param float|null $amount Annual amount of occupational pension * * @return $this */ - public function setInReceiptOfPension(?bool $inReceiptOfPension): static + public function setAmount(?float $amount): static { - if (is_null($inReceiptOfPension)) { - throw new InvalidArgumentException('non-nullable inReceiptOfPension cannot be null'); + if (is_null($amount)) { + throw new InvalidArgumentException('non-nullable amount cannot be null'); } - $this->container['inReceiptOfPension'] = $inReceiptOfPension; + $this->container['amount'] = $amount; return $this; } @@ -364,28 +364,28 @@ public function setBereaved(?bool $bereaved): static } /** - * Gets amount + * Gets inReceiptOfPension * - * @return float|null + * @return bool|null */ - public function getAmount(): ?float + public function getInReceiptOfPension(): ?bool { - return $this->container['amount']; + return $this->container['inReceiptOfPension']; } /** - * Sets amount + * Sets inReceiptOfPension * - * @param float|null $amount Annual amount of occupational pension + * @param bool|null $inReceiptOfPension If set to true then the FPS will have the OccPenInd flag set to 'yes' * * @return $this */ - public function setAmount(?float $amount): static + public function setInReceiptOfPension(?bool $inReceiptOfPension): static { - if (is_null($amount)) { - throw new InvalidArgumentException('non-nullable amount cannot be null'); + if (is_null($inReceiptOfPension)) { + throw new InvalidArgumentException('non-nullable inReceiptOfPension cannot be null'); } - $this->container['amount'] = $amount; + $this->container['inReceiptOfPension'] = $inReceiptOfPension; return $this; } diff --git a/src/Model/ContractPersonalDetailsRequest.php b/src/Model/ContractPersonalDetailsRequest.php index 5e85849..8aee59c 100644 --- a/src/Model/ContractPersonalDetailsRequest.php +++ b/src/Model/ContractPersonalDetailsRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,27 +60,27 @@ class ContractPersonalDetailsRequest implements ModelInterface, ArrayAccess, Jso */ protected static array $openAPITypes = [ 'address' => '\SynergiTech\Staffology\Model\ContractAddress', - 'maritalStatus' => '\SynergiTech\Staffology\Model\MaritalStatus', - 'title' => 'string', - 'firstName' => 'string', - 'middleName' => 'string', - 'lastName' => 'string', 'alternativeEmail' => 'string', - 'previousSurName' => 'string', + 'dateOfBirth' => '\DateTime', 'email' => 'string', 'emailPayslip' => 'bool', - 'pdfPassword' => 'string', - 'pdfPasswordType' => '\SynergiTech\Staffology\Model\PdfPasswordType', 'emailStatement' => 'bool', - 'photoUrl' => 'string', - 'telephone' => 'string', - 'photoSasUrl' => 'string', - 'mobile' => 'string', - 'dateOfBirth' => '\DateTime', + 'firstName' => 'string', 'gender' => '\SynergiTech\Staffology\Model\Gender', + 'lastName' => 'string', + 'maritalStatus' => '\SynergiTech\Staffology\Model\MaritalStatus', + 'middleName' => 'string', + 'mobile' => 'string', 'niNumber' => 'string', + 'partnerDetails' => '\SynergiTech\Staffology\Model\ContractPartnerDetails', 'passportNumber' => 'string', - 'partnerDetails' => '\SynergiTech\Staffology\Model\ContractPartnerDetails' + 'pdfPassword' => 'string', + 'pdfPasswordType' => '\SynergiTech\Staffology\Model\PdfPasswordType', + 'photoSasUrl' => 'string', + 'photoUrl' => 'string', + 'previousSurName' => 'string', + 'telephone' => 'string', + 'title' => 'string' ]; /** @@ -90,27 +90,27 @@ class ContractPersonalDetailsRequest implements ModelInterface, ArrayAccess, Jso */ protected static array $openAPIFormats = [ 'address' => null, - 'maritalStatus' => null, - 'title' => null, - 'firstName' => null, - 'middleName' => null, - 'lastName' => null, 'alternativeEmail' => 'email', - 'previousSurName' => null, + 'dateOfBirth' => 'date', 'email' => null, 'emailPayslip' => null, - 'pdfPassword' => null, - 'pdfPasswordType' => null, 'emailStatement' => null, - 'photoUrl' => null, - 'telephone' => null, - 'photoSasUrl' => null, - 'mobile' => null, - 'dateOfBirth' => 'date', + 'firstName' => null, 'gender' => null, + 'lastName' => null, + 'maritalStatus' => null, + 'middleName' => null, + 'mobile' => null, 'niNumber' => null, + 'partnerDetails' => null, 'passportNumber' => null, - 'partnerDetails' => null + 'pdfPassword' => null, + 'pdfPasswordType' => null, + 'photoSasUrl' => null, + 'photoUrl' => null, + 'previousSurName' => null, + 'telephone' => null, + 'title' => null ]; /** @@ -120,27 +120,27 @@ class ContractPersonalDetailsRequest implements ModelInterface, ArrayAccess, Jso */ protected static array $openAPINullables = [ 'address' => false, - 'maritalStatus' => false, - 'title' => true, - 'firstName' => true, - 'middleName' => true, - 'lastName' => true, 'alternativeEmail' => true, - 'previousSurName' => true, + 'dateOfBirth' => false, 'email' => true, 'emailPayslip' => false, - 'pdfPassword' => true, - 'pdfPasswordType' => false, 'emailStatement' => false, - 'photoUrl' => true, - 'telephone' => true, - 'photoSasUrl' => true, - 'mobile' => true, - 'dateOfBirth' => false, + 'firstName' => true, 'gender' => false, + 'lastName' => true, + 'maritalStatus' => false, + 'middleName' => true, + 'mobile' => true, 'niNumber' => true, + 'partnerDetails' => false, 'passportNumber' => true, - 'partnerDetails' => false + 'pdfPassword' => true, + 'pdfPasswordType' => false, + 'photoSasUrl' => true, + 'photoUrl' => true, + 'previousSurName' => true, + 'telephone' => true, + 'title' => true ]; /** @@ -230,27 +230,27 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'address' => 'address', - 'maritalStatus' => 'maritalStatus', - 'title' => 'title', - 'firstName' => 'firstName', - 'middleName' => 'middleName', - 'lastName' => 'lastName', 'alternativeEmail' => 'alternativeEmail', - 'previousSurName' => 'previousSurName', + 'dateOfBirth' => 'dateOfBirth', 'email' => 'email', 'emailPayslip' => 'emailPayslip', - 'pdfPassword' => 'pdfPassword', - 'pdfPasswordType' => 'pdfPasswordType', 'emailStatement' => 'emailStatement', - 'photoUrl' => 'photoUrl', - 'telephone' => 'telephone', - 'photoSasUrl' => 'photoSasUrl', - 'mobile' => 'mobile', - 'dateOfBirth' => 'dateOfBirth', + 'firstName' => 'firstName', 'gender' => 'gender', + 'lastName' => 'lastName', + 'maritalStatus' => 'maritalStatus', + 'middleName' => 'middleName', + 'mobile' => 'mobile', 'niNumber' => 'niNumber', + 'partnerDetails' => 'partnerDetails', 'passportNumber' => 'passportNumber', - 'partnerDetails' => 'partnerDetails' + 'pdfPassword' => 'pdfPassword', + 'pdfPasswordType' => 'pdfPasswordType', + 'photoSasUrl' => 'photoSasUrl', + 'photoUrl' => 'photoUrl', + 'previousSurName' => 'previousSurName', + 'telephone' => 'telephone', + 'title' => 'title' ]; /** @@ -260,27 +260,27 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'address' => 'setAddress', - 'maritalStatus' => 'setMaritalStatus', - 'title' => 'setTitle', - 'firstName' => 'setFirstName', - 'middleName' => 'setMiddleName', - 'lastName' => 'setLastName', 'alternativeEmail' => 'setAlternativeEmail', - 'previousSurName' => 'setPreviousSurName', + 'dateOfBirth' => 'setDateOfBirth', 'email' => 'setEmail', 'emailPayslip' => 'setEmailPayslip', - 'pdfPassword' => 'setPdfPassword', - 'pdfPasswordType' => 'setPdfPasswordType', 'emailStatement' => 'setEmailStatement', - 'photoUrl' => 'setPhotoUrl', - 'telephone' => 'setTelephone', - 'photoSasUrl' => 'setPhotoSasUrl', - 'mobile' => 'setMobile', - 'dateOfBirth' => 'setDateOfBirth', + 'firstName' => 'setFirstName', 'gender' => 'setGender', + 'lastName' => 'setLastName', + 'maritalStatus' => 'setMaritalStatus', + 'middleName' => 'setMiddleName', + 'mobile' => 'setMobile', 'niNumber' => 'setNiNumber', + 'partnerDetails' => 'setPartnerDetails', 'passportNumber' => 'setPassportNumber', - 'partnerDetails' => 'setPartnerDetails' + 'pdfPassword' => 'setPdfPassword', + 'pdfPasswordType' => 'setPdfPasswordType', + 'photoSasUrl' => 'setPhotoSasUrl', + 'photoUrl' => 'setPhotoUrl', + 'previousSurName' => 'setPreviousSurName', + 'telephone' => 'setTelephone', + 'title' => 'setTitle' ]; /** @@ -290,27 +290,27 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'address' => 'getAddress', - 'maritalStatus' => 'getMaritalStatus', - 'title' => 'getTitle', - 'firstName' => 'getFirstName', - 'middleName' => 'getMiddleName', - 'lastName' => 'getLastName', 'alternativeEmail' => 'getAlternativeEmail', - 'previousSurName' => 'getPreviousSurName', + 'dateOfBirth' => 'getDateOfBirth', 'email' => 'getEmail', 'emailPayslip' => 'getEmailPayslip', - 'pdfPassword' => 'getPdfPassword', - 'pdfPasswordType' => 'getPdfPasswordType', 'emailStatement' => 'getEmailStatement', - 'photoUrl' => 'getPhotoUrl', - 'telephone' => 'getTelephone', - 'photoSasUrl' => 'getPhotoSasUrl', - 'mobile' => 'getMobile', - 'dateOfBirth' => 'getDateOfBirth', + 'firstName' => 'getFirstName', 'gender' => 'getGender', + 'lastName' => 'getLastName', + 'maritalStatus' => 'getMaritalStatus', + 'middleName' => 'getMiddleName', + 'mobile' => 'getMobile', 'niNumber' => 'getNiNumber', + 'partnerDetails' => 'getPartnerDetails', 'passportNumber' => 'getPassportNumber', - 'partnerDetails' => 'getPartnerDetails' + 'pdfPassword' => 'getPdfPassword', + 'pdfPasswordType' => 'getPdfPasswordType', + 'photoSasUrl' => 'getPhotoSasUrl', + 'photoUrl' => 'getPhotoUrl', + 'previousSurName' => 'getPreviousSurName', + 'telephone' => 'getTelephone', + 'title' => 'getTitle' ]; /** @@ -370,27 +370,27 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('address', $data ?? [], null); - $this->setIfExists('maritalStatus', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('firstName', $data ?? [], null); - $this->setIfExists('middleName', $data ?? [], null); - $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('alternativeEmail', $data ?? [], null); - $this->setIfExists('previousSurName', $data ?? [], null); + $this->setIfExists('dateOfBirth', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('emailPayslip', $data ?? [], null); - $this->setIfExists('pdfPassword', $data ?? [], null); - $this->setIfExists('pdfPasswordType', $data ?? [], null); $this->setIfExists('emailStatement', $data ?? [], null); - $this->setIfExists('photoUrl', $data ?? [], null); - $this->setIfExists('telephone', $data ?? [], null); - $this->setIfExists('photoSasUrl', $data ?? [], null); - $this->setIfExists('mobile', $data ?? [], null); - $this->setIfExists('dateOfBirth', $data ?? [], null); + $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('gender', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('maritalStatus', $data ?? [], null); + $this->setIfExists('middleName', $data ?? [], null); + $this->setIfExists('mobile', $data ?? [], null); $this->setIfExists('niNumber', $data ?? [], null); - $this->setIfExists('passportNumber', $data ?? [], null); $this->setIfExists('partnerDetails', $data ?? [], null); + $this->setIfExists('passportNumber', $data ?? [], null); + $this->setIfExists('pdfPassword', $data ?? [], null); + $this->setIfExists('pdfPasswordType', $data ?? [], null); + $this->setIfExists('photoSasUrl', $data ?? [], null); + $this->setIfExists('photoUrl', $data ?? [], null); + $this->setIfExists('previousSurName', $data ?? [], null); + $this->setIfExists('telephone', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -420,61 +420,61 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['maritalStatus'] === null) { - $invalidProperties[] = "'maritalStatus' can't be null"; + if (!is_null($this->container['alternativeEmail']) && (mb_strlen($this->container['alternativeEmail']) > 100)) { + $invalidProperties[] = "invalid value for 'alternativeEmail', the character length must be smaller than or equal to 100."; } - if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 30)) { - $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 30."; + + if ($this->container['dateOfBirth'] === null) { + $invalidProperties[] = "'dateOfBirth' can't be null"; + } + if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) > 100)) { + $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 100."; } if (!is_null($this->container['firstName']) && (mb_strlen($this->container['firstName']) > 35)) { $invalidProperties[] = "invalid value for 'firstName', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['middleName']) && (mb_strlen($this->container['middleName']) > 35)) { - $invalidProperties[] = "invalid value for 'middleName', the character length must be smaller than or equal to 35."; + if ($this->container['gender'] === null) { + $invalidProperties[] = "'gender' can't be null"; } - if (!is_null($this->container['lastName']) && (mb_strlen($this->container['lastName']) > 35)) { $invalidProperties[] = "invalid value for 'lastName', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['alternativeEmail']) && (mb_strlen($this->container['alternativeEmail']) > 100)) { - $invalidProperties[] = "invalid value for 'alternativeEmail', the character length must be smaller than or equal to 100."; + if ($this->container['maritalStatus'] === null) { + $invalidProperties[] = "'maritalStatus' can't be null"; } - - if (!is_null($this->container['previousSurName']) && (mb_strlen($this->container['previousSurName']) > 35)) { - $invalidProperties[] = "invalid value for 'previousSurName', the character length must be smaller than or equal to 35."; + if (!is_null($this->container['middleName']) && (mb_strlen($this->container['middleName']) > 35)) { + $invalidProperties[] = "invalid value for 'middleName', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) > 100)) { - $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 100."; + if (!is_null($this->container['mobile']) && (mb_strlen($this->container['mobile']) > 30)) { + $invalidProperties[] = "invalid value for 'mobile', the character length must be smaller than or equal to 30."; } - if (!is_null($this->container['photoUrl']) && (mb_strlen($this->container['photoUrl']) > 250)) { - $invalidProperties[] = "invalid value for 'photoUrl', the character length must be smaller than or equal to 250."; + if (!is_null($this->container['niNumber']) && (mb_strlen($this->container['niNumber']) > 15)) { + $invalidProperties[] = "invalid value for 'niNumber', the character length must be smaller than or equal to 15."; } - if (!is_null($this->container['telephone']) && (mb_strlen($this->container['telephone']) > 30)) { - $invalidProperties[] = "invalid value for 'telephone', the character length must be smaller than or equal to 30."; + if (!is_null($this->container['passportNumber']) && (mb_strlen($this->container['passportNumber']) > 25)) { + $invalidProperties[] = "invalid value for 'passportNumber', the character length must be smaller than or equal to 25."; } - if (!is_null($this->container['mobile']) && (mb_strlen($this->container['mobile']) > 30)) { - $invalidProperties[] = "invalid value for 'mobile', the character length must be smaller than or equal to 30."; + if (!is_null($this->container['photoUrl']) && (mb_strlen($this->container['photoUrl']) > 250)) { + $invalidProperties[] = "invalid value for 'photoUrl', the character length must be smaller than or equal to 250."; } - if ($this->container['dateOfBirth'] === null) { - $invalidProperties[] = "'dateOfBirth' can't be null"; - } - if ($this->container['gender'] === null) { - $invalidProperties[] = "'gender' can't be null"; + if (!is_null($this->container['previousSurName']) && (mb_strlen($this->container['previousSurName']) > 35)) { + $invalidProperties[] = "invalid value for 'previousSurName', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['niNumber']) && (mb_strlen($this->container['niNumber']) > 15)) { - $invalidProperties[] = "invalid value for 'niNumber', the character length must be smaller than or equal to 15."; + + if (!is_null($this->container['telephone']) && (mb_strlen($this->container['telephone']) > 30)) { + $invalidProperties[] = "invalid value for 'telephone', the character length must be smaller than or equal to 30."; } - if (!is_null($this->container['passportNumber']) && (mb_strlen($this->container['passportNumber']) > 25)) { - $invalidProperties[] = "invalid value for 'passportNumber', the character length must be smaller than or equal to 25."; + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 30)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 30."; } return $invalidProperties; @@ -520,66 +520,158 @@ public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $addre } /** - * Gets maritalStatus + * Gets alternativeEmail * - * @return \SynergiTech\Staffology\Model\MaritalStatus + * @return string|null */ - public function getMaritalStatus(): \SynergiTech\Staffology\Model\MaritalStatus + public function getAlternativeEmail(): ?string { - return $this->container['maritalStatus']; + return $this->container['alternativeEmail']; } /** - * Sets maritalStatus + * Sets alternativeEmail * - * @param \SynergiTech\Staffology\Model\MaritalStatus $maritalStatus maritalStatus + * @param string|null $alternativeEmail alternativeEmail * * @return $this */ - public function setMaritalStatus(\SynergiTech\Staffology\Model\MaritalStatus $maritalStatus): static + public function setAlternativeEmail(?string $alternativeEmail): static { - if (is_null($maritalStatus)) { - throw new InvalidArgumentException('non-nullable maritalStatus cannot be null'); + if (is_null($alternativeEmail)) { + array_push($this->openAPINullablesSetToNull, 'alternativeEmail'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('alternativeEmail', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['maritalStatus'] = $maritalStatus; + if (!is_null($alternativeEmail) && (mb_strlen($alternativeEmail) > 100)) { + throw new InvalidArgumentException('invalid length for $alternativeEmail when calling ContractPersonalDetailsRequest., must be smaller than or equal to 100.'); + } + + $this->container['alternativeEmail'] = $alternativeEmail; return $this; } /** - * Gets title + * Gets dateOfBirth + * + * @return \DateTime + */ + public function getDateOfBirth(): \DateTime + { + return $this->container['dateOfBirth']; + } + + /** + * Sets dateOfBirth + * + * @param \DateTime $dateOfBirth dateOfBirth + * + * @return $this + */ + public function setDateOfBirth(\DateTime $dateOfBirth): static + { + if (is_null($dateOfBirth)) { + throw new InvalidArgumentException('non-nullable dateOfBirth cannot be null'); + } + $this->container['dateOfBirth'] = $dateOfBirth; + + return $this; + } + + /** + * Gets email * * @return string|null */ - public function getTitle(): ?string + public function getEmail(): ?string { - return $this->container['title']; + return $this->container['email']; } /** - * Sets title + * Sets email * - * @param string|null $title title + * @param string|null $email email * * @return $this */ - public function setTitle(?string $title): static + public function setEmail(?string $email): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); + if (is_null($email)) { + array_push($this->openAPINullablesSetToNull, 'email'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); + $index = array_search('email', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($title) && (mb_strlen($title) > 30)) { - throw new InvalidArgumentException('invalid length for $title when calling ContractPersonalDetailsRequest., must be smaller than or equal to 30.'); + if (!is_null($email) && (mb_strlen($email) > 100)) { + throw new InvalidArgumentException('invalid length for $email when calling ContractPersonalDetailsRequest., must be smaller than or equal to 100.'); } - $this->container['title'] = $title; + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets emailPayslip + * + * @return bool|null + */ + public function getEmailPayslip(): ?bool + { + return $this->container['emailPayslip']; + } + + /** + * Sets emailPayslip + * + * @param bool|null $emailPayslip If set to true then the employees Payslip will be sent by email when a PayRun is finalised. + * + * @return $this + */ + public function setEmailPayslip(?bool $emailPayslip): static + { + if (is_null($emailPayslip)) { + throw new InvalidArgumentException('non-nullable emailPayslip cannot be null'); + } + $this->container['emailPayslip'] = $emailPayslip; + + return $this; + } + + /** + * Gets emailStatement + * + * @return bool|null + */ + public function getEmailStatement(): ?bool + { + return $this->container['emailStatement']; + } + + /** + * Sets emailStatement + * + * @param bool|null $emailStatement Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted. + * + * @return $this + */ + public function setEmailStatement(?bool $emailStatement): static + { + if (is_null($emailStatement)) { + throw new InvalidArgumentException('non-nullable emailStatement cannot be null'); + } + $this->container['emailStatement'] = $emailStatement; return $this; } @@ -623,39 +715,28 @@ public function setFirstName(?string $firstName): static } /** - * Gets middleName + * Gets gender * - * @return string|null + * @return \SynergiTech\Staffology\Model\Gender */ - public function getMiddleName(): ?string + public function getGender(): \SynergiTech\Staffology\Model\Gender { - return $this->container['middleName']; + return $this->container['gender']; } /** - * Sets middleName + * Sets gender * - * @param string|null $middleName middleName + * @param \SynergiTech\Staffology\Model\Gender $gender gender * * @return $this */ - public function setMiddleName(?string $middleName): static + public function setGender(\SynergiTech\Staffology\Model\Gender $gender): static { - if (is_null($middleName)) { - array_push($this->openAPINullablesSetToNull, 'middleName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('middleName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($middleName) && (mb_strlen($middleName) > 35)) { - throw new InvalidArgumentException('invalid length for $middleName when calling ContractPersonalDetailsRequest., must be smaller than or equal to 35.'); + if (is_null($gender)) { + throw new InvalidArgumentException('non-nullable gender cannot be null'); } - - $this->container['middleName'] = $middleName; + $this->container['gender'] = $gender; return $this; } @@ -699,306 +780,268 @@ public function setLastName(?string $lastName): static } /** - * Gets alternativeEmail + * Gets maritalStatus + * + * @return \SynergiTech\Staffology\Model\MaritalStatus + */ + public function getMaritalStatus(): \SynergiTech\Staffology\Model\MaritalStatus + { + return $this->container['maritalStatus']; + } + + /** + * Sets maritalStatus + * + * @param \SynergiTech\Staffology\Model\MaritalStatus $maritalStatus maritalStatus + * + * @return $this + */ + public function setMaritalStatus(\SynergiTech\Staffology\Model\MaritalStatus $maritalStatus): static + { + if (is_null($maritalStatus)) { + throw new InvalidArgumentException('non-nullable maritalStatus cannot be null'); + } + $this->container['maritalStatus'] = $maritalStatus; + + return $this; + } + + /** + * Gets middleName * * @return string|null */ - public function getAlternativeEmail(): ?string + public function getMiddleName(): ?string { - return $this->container['alternativeEmail']; + return $this->container['middleName']; } /** - * Sets alternativeEmail + * Sets middleName * - * @param string|null $alternativeEmail alternativeEmail + * @param string|null $middleName middleName * * @return $this */ - public function setAlternativeEmail(?string $alternativeEmail): static + public function setMiddleName(?string $middleName): static { - if (is_null($alternativeEmail)) { - array_push($this->openAPINullablesSetToNull, 'alternativeEmail'); + if (is_null($middleName)) { + array_push($this->openAPINullablesSetToNull, 'middleName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('alternativeEmail', $nullablesSetToNull); + $index = array_search('middleName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($alternativeEmail) && (mb_strlen($alternativeEmail) > 100)) { - throw new InvalidArgumentException('invalid length for $alternativeEmail when calling ContractPersonalDetailsRequest., must be smaller than or equal to 100.'); + if (!is_null($middleName) && (mb_strlen($middleName) > 35)) { + throw new InvalidArgumentException('invalid length for $middleName when calling ContractPersonalDetailsRequest., must be smaller than or equal to 35.'); } - $this->container['alternativeEmail'] = $alternativeEmail; + $this->container['middleName'] = $middleName; return $this; } /** - * Gets previousSurName + * Gets mobile * * @return string|null */ - public function getPreviousSurName(): ?string + public function getMobile(): ?string { - return $this->container['previousSurName']; + return $this->container['mobile']; } /** - * Sets previousSurName + * Sets mobile * - * @param string|null $previousSurName previousSurName + * @param string|null $mobile mobile * * @return $this */ - public function setPreviousSurName(?string $previousSurName): static + public function setMobile(?string $mobile): static { - if (is_null($previousSurName)) { - array_push($this->openAPINullablesSetToNull, 'previousSurName'); + if (is_null($mobile)) { + array_push($this->openAPINullablesSetToNull, 'mobile'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('previousSurName', $nullablesSetToNull); + $index = array_search('mobile', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($previousSurName) && (mb_strlen($previousSurName) > 35)) { - throw new InvalidArgumentException('invalid length for $previousSurName when calling ContractPersonalDetailsRequest., must be smaller than or equal to 35.'); + if (!is_null($mobile) && (mb_strlen($mobile) > 30)) { + throw new InvalidArgumentException('invalid length for $mobile when calling ContractPersonalDetailsRequest., must be smaller than or equal to 30.'); } - $this->container['previousSurName'] = $previousSurName; + $this->container['mobile'] = $mobile; return $this; } /** - * Gets email + * Gets niNumber * * @return string|null */ - public function getEmail(): ?string + public function getNiNumber(): ?string { - return $this->container['email']; + return $this->container['niNumber']; } /** - * Sets email + * Sets niNumber * - * @param string|null $email email + * @param string|null $niNumber niNumber * * @return $this */ - public function setEmail(?string $email): static + public function setNiNumber(?string $niNumber): static { - if (is_null($email)) { - array_push($this->openAPINullablesSetToNull, 'email'); + if (is_null($niNumber)) { + array_push($this->openAPINullablesSetToNull, 'niNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('email', $nullablesSetToNull); + $index = array_search('niNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($email) && (mb_strlen($email) > 100)) { - throw new InvalidArgumentException('invalid length for $email when calling ContractPersonalDetailsRequest., must be smaller than or equal to 100.'); + if (!is_null($niNumber) && (mb_strlen($niNumber) > 15)) { + throw new InvalidArgumentException('invalid length for $niNumber when calling ContractPersonalDetailsRequest., must be smaller than or equal to 15.'); } - $this->container['email'] = $email; + $this->container['niNumber'] = $niNumber; return $this; } /** - * Gets emailPayslip + * Gets partnerDetails * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractPartnerDetails|null */ - public function getEmailPayslip(): ?bool + public function getPartnerDetails(): ?\SynergiTech\Staffology\Model\ContractPartnerDetails { - return $this->container['emailPayslip']; + return $this->container['partnerDetails']; } /** - * Sets emailPayslip + * Sets partnerDetails * - * @param bool|null $emailPayslip If set to true then the employees Payslip will be sent by email when a PayRun is finalised. + * @param \SynergiTech\Staffology\Model\ContractPartnerDetails|null $partnerDetails partnerDetails * * @return $this */ - public function setEmailPayslip(?bool $emailPayslip): static + public function setPartnerDetails(?\SynergiTech\Staffology\Model\ContractPartnerDetails $partnerDetails): static { - if (is_null($emailPayslip)) { - throw new InvalidArgumentException('non-nullable emailPayslip cannot be null'); + if (is_null($partnerDetails)) { + throw new InvalidArgumentException('non-nullable partnerDetails cannot be null'); } - $this->container['emailPayslip'] = $emailPayslip; + $this->container['partnerDetails'] = $partnerDetails; return $this; } /** - * Gets pdfPassword + * Gets passportNumber * * @return string|null */ - public function getPdfPassword(): ?string + public function getPassportNumber(): ?string { - return $this->container['pdfPassword']; + return $this->container['passportNumber']; } /** - * Sets pdfPassword + * Sets passportNumber * - * @param string|null $pdfPassword Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property. + * @param string|null $passportNumber passportNumber * * @return $this */ - public function setPdfPassword(?string $pdfPassword): static + public function setPassportNumber(?string $passportNumber): static { - if (is_null($pdfPassword)) { - array_push($this->openAPINullablesSetToNull, 'pdfPassword'); + if (is_null($passportNumber)) { + array_push($this->openAPINullablesSetToNull, 'passportNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pdfPassword', $nullablesSetToNull); + $index = array_search('passportNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pdfPassword'] = $pdfPassword; - - return $this; - } - - /** - * Gets pdfPasswordType - * - * @return \SynergiTech\Staffology\Model\PdfPasswordType|null - */ - public function getPdfPasswordType(): ?\SynergiTech\Staffology\Model\PdfPasswordType - { - return $this->container['pdfPasswordType']; - } - - /** - * Sets pdfPasswordType - * - * @param \SynergiTech\Staffology\Model\PdfPasswordType|null $pdfPasswordType pdfPasswordType - * - * @return $this - */ - public function setPdfPasswordType(?\SynergiTech\Staffology\Model\PdfPasswordType $pdfPasswordType): static - { - if (is_null($pdfPasswordType)) { - throw new InvalidArgumentException('non-nullable pdfPasswordType cannot be null'); + if (!is_null($passportNumber) && (mb_strlen($passportNumber) > 25)) { + throw new InvalidArgumentException('invalid length for $passportNumber when calling ContractPersonalDetailsRequest., must be smaller than or equal to 25.'); } - $this->container['pdfPasswordType'] = $pdfPasswordType; - - return $this; - } - /** - * Gets emailStatement - * - * @return bool|null - */ - public function getEmailStatement(): ?bool - { - return $this->container['emailStatement']; - } - - /** - * Sets emailStatement - * - * @param bool|null $emailStatement Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted. - * - * @return $this - */ - public function setEmailStatement(?bool $emailStatement): static - { - if (is_null($emailStatement)) { - throw new InvalidArgumentException('non-nullable emailStatement cannot be null'); - } - $this->container['emailStatement'] = $emailStatement; + $this->container['passportNumber'] = $passportNumber; return $this; } /** - * Gets photoUrl + * Gets pdfPassword * * @return string|null */ - public function getPhotoUrl(): ?string + public function getPdfPassword(): ?string { - return $this->container['photoUrl']; + return $this->container['pdfPassword']; } /** - * Sets photoUrl + * Sets pdfPassword * - * @param string|null $photoUrl photoUrl + * @param string|null $pdfPassword Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property. * * @return $this */ - public function setPhotoUrl(?string $photoUrl): static + public function setPdfPassword(?string $pdfPassword): static { - if (is_null($photoUrl)) { - array_push($this->openAPINullablesSetToNull, 'photoUrl'); + if (is_null($pdfPassword)) { + array_push($this->openAPINullablesSetToNull, 'pdfPassword'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('photoUrl', $nullablesSetToNull); + $index = array_search('pdfPassword', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($photoUrl) && (mb_strlen($photoUrl) > 250)) { - throw new InvalidArgumentException('invalid length for $photoUrl when calling ContractPersonalDetailsRequest., must be smaller than or equal to 250.'); - } - - $this->container['photoUrl'] = $photoUrl; + $this->container['pdfPassword'] = $pdfPassword; return $this; } /** - * Gets telephone + * Gets pdfPasswordType * - * @return string|null + * @return \SynergiTech\Staffology\Model\PdfPasswordType|null */ - public function getTelephone(): ?string + public function getPdfPasswordType(): ?\SynergiTech\Staffology\Model\PdfPasswordType { - return $this->container['telephone']; + return $this->container['pdfPasswordType']; } /** - * Sets telephone + * Sets pdfPasswordType * - * @param string|null $telephone telephone + * @param \SynergiTech\Staffology\Model\PdfPasswordType|null $pdfPasswordType pdfPasswordType * * @return $this */ - public function setTelephone(?string $telephone): static + public function setPdfPasswordType(?\SynergiTech\Staffology\Model\PdfPasswordType $pdfPasswordType): static { - if (is_null($telephone)) { - array_push($this->openAPINullablesSetToNull, 'telephone'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('telephone', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($telephone) && (mb_strlen($telephone) > 30)) { - throw new InvalidArgumentException('invalid length for $telephone when calling ContractPersonalDetailsRequest., must be smaller than or equal to 30.'); + if (is_null($pdfPasswordType)) { + throw new InvalidArgumentException('non-nullable pdfPasswordType cannot be null'); } - - $this->container['telephone'] = $telephone; + $this->container['pdfPasswordType'] = $pdfPasswordType; return $this; } @@ -1038,196 +1081,153 @@ public function setPhotoSasUrl(?string $photoSasUrl): static } /** - * Gets mobile + * Gets photoUrl * * @return string|null */ - public function getMobile(): ?string + public function getPhotoUrl(): ?string { - return $this->container['mobile']; + return $this->container['photoUrl']; } /** - * Sets mobile + * Sets photoUrl * - * @param string|null $mobile mobile + * @param string|null $photoUrl photoUrl * * @return $this */ - public function setMobile(?string $mobile): static + public function setPhotoUrl(?string $photoUrl): static { - if (is_null($mobile)) { - array_push($this->openAPINullablesSetToNull, 'mobile'); + if (is_null($photoUrl)) { + array_push($this->openAPINullablesSetToNull, 'photoUrl'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mobile', $nullablesSetToNull); + $index = array_search('photoUrl', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($mobile) && (mb_strlen($mobile) > 30)) { - throw new InvalidArgumentException('invalid length for $mobile when calling ContractPersonalDetailsRequest., must be smaller than or equal to 30.'); + if (!is_null($photoUrl) && (mb_strlen($photoUrl) > 250)) { + throw new InvalidArgumentException('invalid length for $photoUrl when calling ContractPersonalDetailsRequest., must be smaller than or equal to 250.'); } - $this->container['mobile'] = $mobile; + $this->container['photoUrl'] = $photoUrl; return $this; } /** - * Gets dateOfBirth + * Gets previousSurName * - * @return \DateTime + * @return string|null */ - public function getDateOfBirth(): \DateTime + public function getPreviousSurName(): ?string { - return $this->container['dateOfBirth']; + return $this->container['previousSurName']; } /** - * Sets dateOfBirth + * Sets previousSurName * - * @param \DateTime $dateOfBirth dateOfBirth + * @param string|null $previousSurName previousSurName * * @return $this */ - public function setDateOfBirth(\DateTime $dateOfBirth): static + public function setPreviousSurName(?string $previousSurName): static { - if (is_null($dateOfBirth)) { - throw new InvalidArgumentException('non-nullable dateOfBirth cannot be null'); + if (is_null($previousSurName)) { + array_push($this->openAPINullablesSetToNull, 'previousSurName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('previousSurName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['dateOfBirth'] = $dateOfBirth; - - return $this; - } - - /** - * Gets gender - * - * @return \SynergiTech\Staffology\Model\Gender - */ - public function getGender(): \SynergiTech\Staffology\Model\Gender - { - return $this->container['gender']; - } - - /** - * Sets gender - * - * @param \SynergiTech\Staffology\Model\Gender $gender gender - * - * @return $this - */ - public function setGender(\SynergiTech\Staffology\Model\Gender $gender): static - { - if (is_null($gender)) { - throw new InvalidArgumentException('non-nullable gender cannot be null'); + if (!is_null($previousSurName) && (mb_strlen($previousSurName) > 35)) { + throw new InvalidArgumentException('invalid length for $previousSurName when calling ContractPersonalDetailsRequest., must be smaller than or equal to 35.'); } - $this->container['gender'] = $gender; + + $this->container['previousSurName'] = $previousSurName; return $this; } /** - * Gets niNumber + * Gets telephone * * @return string|null */ - public function getNiNumber(): ?string + public function getTelephone(): ?string { - return $this->container['niNumber']; + return $this->container['telephone']; } /** - * Sets niNumber + * Sets telephone * - * @param string|null $niNumber niNumber + * @param string|null $telephone telephone * * @return $this */ - public function setNiNumber(?string $niNumber): static + public function setTelephone(?string $telephone): static { - if (is_null($niNumber)) { - array_push($this->openAPINullablesSetToNull, 'niNumber'); + if (is_null($telephone)) { + array_push($this->openAPINullablesSetToNull, 'telephone'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niNumber', $nullablesSetToNull); + $index = array_search('telephone', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($niNumber) && (mb_strlen($niNumber) > 15)) { - throw new InvalidArgumentException('invalid length for $niNumber when calling ContractPersonalDetailsRequest., must be smaller than or equal to 15.'); + if (!is_null($telephone) && (mb_strlen($telephone) > 30)) { + throw new InvalidArgumentException('invalid length for $telephone when calling ContractPersonalDetailsRequest., must be smaller than or equal to 30.'); } - $this->container['niNumber'] = $niNumber; + $this->container['telephone'] = $telephone; return $this; } /** - * Gets passportNumber + * Gets title * * @return string|null */ - public function getPassportNumber(): ?string + public function getTitle(): ?string { - return $this->container['passportNumber']; + return $this->container['title']; } /** - * Sets passportNumber + * Sets title * - * @param string|null $passportNumber passportNumber + * @param string|null $title title * * @return $this */ - public function setPassportNumber(?string $passportNumber): static + public function setTitle(?string $title): static { - if (is_null($passportNumber)) { - array_push($this->openAPINullablesSetToNull, 'passportNumber'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('passportNumber', $nullablesSetToNull); + $index = array_search('title', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($passportNumber) && (mb_strlen($passportNumber) > 25)) { - throw new InvalidArgumentException('invalid length for $passportNumber when calling ContractPersonalDetailsRequest., must be smaller than or equal to 25.'); + if (!is_null($title) && (mb_strlen($title) > 30)) { + throw new InvalidArgumentException('invalid length for $title when calling ContractPersonalDetailsRequest., must be smaller than or equal to 30.'); } - $this->container['passportNumber'] = $passportNumber; - - return $this; - } - - /** - * Gets partnerDetails - * - * @return \SynergiTech\Staffology\Model\ContractPartnerDetails|null - */ - public function getPartnerDetails(): ?\SynergiTech\Staffology\Model\ContractPartnerDetails - { - return $this->container['partnerDetails']; - } - - /** - * Sets partnerDetails - * - * @param \SynergiTech\Staffology\Model\ContractPartnerDetails|null $partnerDetails partnerDetails - * - * @return $this - */ - public function setPartnerDetails(?\SynergiTech\Staffology\Model\ContractPartnerDetails $partnerDetails): static - { - if (is_null($partnerDetails)) { - throw new InvalidArgumentException('non-nullable partnerDetails cannot be null'); - } - $this->container['partnerDetails'] = $partnerDetails; + $this->container['title'] = $title; return $this; } diff --git a/src/Model/ContractPersonalDetailsResponse.php b/src/Model/ContractPersonalDetailsResponse.php index 6832db1..246c94d 100644 --- a/src/Model/ContractPersonalDetailsResponse.php +++ b/src/Model/ContractPersonalDetailsResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,29 +59,29 @@ class ContractPersonalDetailsResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ - 'statePensionAge' => 'int', 'address' => '\SynergiTech\Staffology\Model\ContractAddress', - 'maritalStatus' => '\SynergiTech\Staffology\Model\MaritalStatus', - 'title' => 'string', - 'firstName' => 'string', - 'middleName' => 'string', - 'lastName' => 'string', 'alternativeEmail' => 'string', - 'previousSurName' => 'string', + 'dateOfBirth' => '\DateTime', 'email' => 'string', 'emailPayslip' => 'bool', - 'pdfPassword' => 'string', - 'pdfPasswordType' => '\SynergiTech\Staffology\Model\PdfPasswordType', 'emailStatement' => 'bool', - 'photoUrl' => 'string', - 'telephone' => 'string', - 'photoSasUrl' => 'string', - 'mobile' => 'string', - 'dateOfBirth' => '\DateTime', + 'firstName' => 'string', 'gender' => '\SynergiTech\Staffology\Model\Gender', + 'lastName' => 'string', + 'maritalStatus' => '\SynergiTech\Staffology\Model\MaritalStatus', + 'middleName' => 'string', + 'mobile' => 'string', 'niNumber' => 'string', + 'partnerDetails' => '\SynergiTech\Staffology\Model\ContractPartnerDetails', 'passportNumber' => 'string', - 'partnerDetails' => '\SynergiTech\Staffology\Model\ContractPartnerDetails' + 'pdfPassword' => 'string', + 'pdfPasswordType' => '\SynergiTech\Staffology\Model\PdfPasswordType', + 'photoSasUrl' => 'string', + 'photoUrl' => 'string', + 'previousSurName' => 'string', + 'statePensionAge' => 'int', + 'telephone' => 'string', + 'title' => 'string' ]; /** @@ -90,29 +90,29 @@ class ContractPersonalDetailsResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ - 'statePensionAge' => 'int32', 'address' => null, - 'maritalStatus' => null, - 'title' => null, - 'firstName' => null, - 'middleName' => null, - 'lastName' => null, 'alternativeEmail' => 'email', - 'previousSurName' => null, + 'dateOfBirth' => 'date', 'email' => null, 'emailPayslip' => null, - 'pdfPassword' => null, - 'pdfPasswordType' => null, 'emailStatement' => null, - 'photoUrl' => null, - 'telephone' => null, - 'photoSasUrl' => null, - 'mobile' => null, - 'dateOfBirth' => 'date', + 'firstName' => null, 'gender' => null, + 'lastName' => null, + 'maritalStatus' => null, + 'middleName' => null, + 'mobile' => null, 'niNumber' => null, + 'partnerDetails' => null, 'passportNumber' => null, - 'partnerDetails' => null + 'pdfPassword' => null, + 'pdfPasswordType' => null, + 'photoSasUrl' => null, + 'photoUrl' => null, + 'previousSurName' => null, + 'statePensionAge' => 'int32', + 'telephone' => null, + 'title' => null ]; /** @@ -121,29 +121,29 @@ class ContractPersonalDetailsResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ - 'statePensionAge' => false, 'address' => false, - 'maritalStatus' => false, - 'title' => true, - 'firstName' => true, - 'middleName' => true, - 'lastName' => true, 'alternativeEmail' => true, - 'previousSurName' => true, + 'dateOfBirth' => false, 'email' => true, 'emailPayslip' => false, - 'pdfPassword' => true, - 'pdfPasswordType' => false, 'emailStatement' => false, - 'photoUrl' => true, - 'telephone' => true, - 'photoSasUrl' => true, - 'mobile' => true, - 'dateOfBirth' => false, + 'firstName' => true, 'gender' => false, + 'lastName' => true, + 'maritalStatus' => false, + 'middleName' => true, + 'mobile' => true, 'niNumber' => true, + 'partnerDetails' => false, 'passportNumber' => true, - 'partnerDetails' => false + 'pdfPassword' => true, + 'pdfPasswordType' => false, + 'photoSasUrl' => true, + 'photoUrl' => true, + 'previousSurName' => true, + 'statePensionAge' => false, + 'telephone' => true, + 'title' => true ]; /** @@ -232,29 +232,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'statePensionAge' => 'statePensionAge', 'address' => 'address', - 'maritalStatus' => 'maritalStatus', - 'title' => 'title', - 'firstName' => 'firstName', - 'middleName' => 'middleName', - 'lastName' => 'lastName', 'alternativeEmail' => 'alternativeEmail', - 'previousSurName' => 'previousSurName', + 'dateOfBirth' => 'dateOfBirth', 'email' => 'email', 'emailPayslip' => 'emailPayslip', - 'pdfPassword' => 'pdfPassword', - 'pdfPasswordType' => 'pdfPasswordType', 'emailStatement' => 'emailStatement', - 'photoUrl' => 'photoUrl', - 'telephone' => 'telephone', - 'photoSasUrl' => 'photoSasUrl', - 'mobile' => 'mobile', - 'dateOfBirth' => 'dateOfBirth', + 'firstName' => 'firstName', 'gender' => 'gender', + 'lastName' => 'lastName', + 'maritalStatus' => 'maritalStatus', + 'middleName' => 'middleName', + 'mobile' => 'mobile', 'niNumber' => 'niNumber', + 'partnerDetails' => 'partnerDetails', 'passportNumber' => 'passportNumber', - 'partnerDetails' => 'partnerDetails' + 'pdfPassword' => 'pdfPassword', + 'pdfPasswordType' => 'pdfPasswordType', + 'photoSasUrl' => 'photoSasUrl', + 'photoUrl' => 'photoUrl', + 'previousSurName' => 'previousSurName', + 'statePensionAge' => 'statePensionAge', + 'telephone' => 'telephone', + 'title' => 'title' ]; /** @@ -263,29 +263,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'statePensionAge' => 'setStatePensionAge', 'address' => 'setAddress', - 'maritalStatus' => 'setMaritalStatus', - 'title' => 'setTitle', - 'firstName' => 'setFirstName', - 'middleName' => 'setMiddleName', - 'lastName' => 'setLastName', 'alternativeEmail' => 'setAlternativeEmail', - 'previousSurName' => 'setPreviousSurName', + 'dateOfBirth' => 'setDateOfBirth', 'email' => 'setEmail', 'emailPayslip' => 'setEmailPayslip', - 'pdfPassword' => 'setPdfPassword', - 'pdfPasswordType' => 'setPdfPasswordType', 'emailStatement' => 'setEmailStatement', - 'photoUrl' => 'setPhotoUrl', - 'telephone' => 'setTelephone', - 'photoSasUrl' => 'setPhotoSasUrl', - 'mobile' => 'setMobile', - 'dateOfBirth' => 'setDateOfBirth', + 'firstName' => 'setFirstName', 'gender' => 'setGender', + 'lastName' => 'setLastName', + 'maritalStatus' => 'setMaritalStatus', + 'middleName' => 'setMiddleName', + 'mobile' => 'setMobile', 'niNumber' => 'setNiNumber', + 'partnerDetails' => 'setPartnerDetails', 'passportNumber' => 'setPassportNumber', - 'partnerDetails' => 'setPartnerDetails' + 'pdfPassword' => 'setPdfPassword', + 'pdfPasswordType' => 'setPdfPasswordType', + 'photoSasUrl' => 'setPhotoSasUrl', + 'photoUrl' => 'setPhotoUrl', + 'previousSurName' => 'setPreviousSurName', + 'statePensionAge' => 'setStatePensionAge', + 'telephone' => 'setTelephone', + 'title' => 'setTitle' ]; /** @@ -294,29 +294,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'statePensionAge' => 'getStatePensionAge', 'address' => 'getAddress', - 'maritalStatus' => 'getMaritalStatus', - 'title' => 'getTitle', - 'firstName' => 'getFirstName', - 'middleName' => 'getMiddleName', - 'lastName' => 'getLastName', 'alternativeEmail' => 'getAlternativeEmail', - 'previousSurName' => 'getPreviousSurName', + 'dateOfBirth' => 'getDateOfBirth', 'email' => 'getEmail', 'emailPayslip' => 'getEmailPayslip', - 'pdfPassword' => 'getPdfPassword', - 'pdfPasswordType' => 'getPdfPasswordType', 'emailStatement' => 'getEmailStatement', - 'photoUrl' => 'getPhotoUrl', - 'telephone' => 'getTelephone', - 'photoSasUrl' => 'getPhotoSasUrl', - 'mobile' => 'getMobile', - 'dateOfBirth' => 'getDateOfBirth', + 'firstName' => 'getFirstName', 'gender' => 'getGender', + 'lastName' => 'getLastName', + 'maritalStatus' => 'getMaritalStatus', + 'middleName' => 'getMiddleName', + 'mobile' => 'getMobile', 'niNumber' => 'getNiNumber', + 'partnerDetails' => 'getPartnerDetails', 'passportNumber' => 'getPassportNumber', - 'partnerDetails' => 'getPartnerDetails' + 'pdfPassword' => 'getPdfPassword', + 'pdfPasswordType' => 'getPdfPasswordType', + 'photoSasUrl' => 'getPhotoSasUrl', + 'photoUrl' => 'getPhotoUrl', + 'previousSurName' => 'getPreviousSurName', + 'statePensionAge' => 'getStatePensionAge', + 'telephone' => 'getTelephone', + 'title' => 'getTitle' ]; /** @@ -375,29 +375,29 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('statePensionAge', $data ?? [], null); $this->setIfExists('address', $data ?? [], null); - $this->setIfExists('maritalStatus', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('firstName', $data ?? [], null); - $this->setIfExists('middleName', $data ?? [], null); - $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('alternativeEmail', $data ?? [], null); - $this->setIfExists('previousSurName', $data ?? [], null); + $this->setIfExists('dateOfBirth', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('emailPayslip', $data ?? [], null); - $this->setIfExists('pdfPassword', $data ?? [], null); - $this->setIfExists('pdfPasswordType', $data ?? [], null); $this->setIfExists('emailStatement', $data ?? [], null); - $this->setIfExists('photoUrl', $data ?? [], null); - $this->setIfExists('telephone', $data ?? [], null); - $this->setIfExists('photoSasUrl', $data ?? [], null); - $this->setIfExists('mobile', $data ?? [], null); - $this->setIfExists('dateOfBirth', $data ?? [], null); + $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('gender', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('maritalStatus', $data ?? [], null); + $this->setIfExists('middleName', $data ?? [], null); + $this->setIfExists('mobile', $data ?? [], null); $this->setIfExists('niNumber', $data ?? [], null); - $this->setIfExists('passportNumber', $data ?? [], null); $this->setIfExists('partnerDetails', $data ?? [], null); + $this->setIfExists('passportNumber', $data ?? [], null); + $this->setIfExists('pdfPassword', $data ?? [], null); + $this->setIfExists('pdfPasswordType', $data ?? [], null); + $this->setIfExists('photoSasUrl', $data ?? [], null); + $this->setIfExists('photoUrl', $data ?? [], null); + $this->setIfExists('previousSurName', $data ?? [], null); + $this->setIfExists('statePensionAge', $data ?? [], null); + $this->setIfExists('telephone', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -427,61 +427,61 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['maritalStatus'] === null) { - $invalidProperties[] = "'maritalStatus' can't be null"; + if (!is_null($this->container['alternativeEmail']) && (mb_strlen($this->container['alternativeEmail']) > 100)) { + $invalidProperties[] = "invalid value for 'alternativeEmail', the character length must be smaller than or equal to 100."; } - if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 30)) { - $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 30."; + + if ($this->container['dateOfBirth'] === null) { + $invalidProperties[] = "'dateOfBirth' can't be null"; + } + if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) > 100)) { + $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 100."; } if (!is_null($this->container['firstName']) && (mb_strlen($this->container['firstName']) > 35)) { $invalidProperties[] = "invalid value for 'firstName', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['middleName']) && (mb_strlen($this->container['middleName']) > 35)) { - $invalidProperties[] = "invalid value for 'middleName', the character length must be smaller than or equal to 35."; + if ($this->container['gender'] === null) { + $invalidProperties[] = "'gender' can't be null"; } - if (!is_null($this->container['lastName']) && (mb_strlen($this->container['lastName']) > 35)) { $invalidProperties[] = "invalid value for 'lastName', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['alternativeEmail']) && (mb_strlen($this->container['alternativeEmail']) > 100)) { - $invalidProperties[] = "invalid value for 'alternativeEmail', the character length must be smaller than or equal to 100."; + if ($this->container['maritalStatus'] === null) { + $invalidProperties[] = "'maritalStatus' can't be null"; } - - if (!is_null($this->container['previousSurName']) && (mb_strlen($this->container['previousSurName']) > 35)) { - $invalidProperties[] = "invalid value for 'previousSurName', the character length must be smaller than or equal to 35."; + if (!is_null($this->container['middleName']) && (mb_strlen($this->container['middleName']) > 35)) { + $invalidProperties[] = "invalid value for 'middleName', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) > 100)) { - $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 100."; + if (!is_null($this->container['mobile']) && (mb_strlen($this->container['mobile']) > 30)) { + $invalidProperties[] = "invalid value for 'mobile', the character length must be smaller than or equal to 30."; } - if (!is_null($this->container['photoUrl']) && (mb_strlen($this->container['photoUrl']) > 250)) { - $invalidProperties[] = "invalid value for 'photoUrl', the character length must be smaller than or equal to 250."; + if (!is_null($this->container['niNumber']) && (mb_strlen($this->container['niNumber']) > 15)) { + $invalidProperties[] = "invalid value for 'niNumber', the character length must be smaller than or equal to 15."; } - if (!is_null($this->container['telephone']) && (mb_strlen($this->container['telephone']) > 30)) { - $invalidProperties[] = "invalid value for 'telephone', the character length must be smaller than or equal to 30."; + if (!is_null($this->container['passportNumber']) && (mb_strlen($this->container['passportNumber']) > 25)) { + $invalidProperties[] = "invalid value for 'passportNumber', the character length must be smaller than or equal to 25."; } - if (!is_null($this->container['mobile']) && (mb_strlen($this->container['mobile']) > 30)) { - $invalidProperties[] = "invalid value for 'mobile', the character length must be smaller than or equal to 30."; + if (!is_null($this->container['photoUrl']) && (mb_strlen($this->container['photoUrl']) > 250)) { + $invalidProperties[] = "invalid value for 'photoUrl', the character length must be smaller than or equal to 250."; } - if ($this->container['dateOfBirth'] === null) { - $invalidProperties[] = "'dateOfBirth' can't be null"; - } - if ($this->container['gender'] === null) { - $invalidProperties[] = "'gender' can't be null"; + if (!is_null($this->container['previousSurName']) && (mb_strlen($this->container['previousSurName']) > 35)) { + $invalidProperties[] = "invalid value for 'previousSurName', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['niNumber']) && (mb_strlen($this->container['niNumber']) > 15)) { - $invalidProperties[] = "invalid value for 'niNumber', the character length must be smaller than or equal to 15."; + + if (!is_null($this->container['telephone']) && (mb_strlen($this->container['telephone']) > 30)) { + $invalidProperties[] = "invalid value for 'telephone', the character length must be smaller than or equal to 30."; } - if (!is_null($this->container['passportNumber']) && (mb_strlen($this->container['passportNumber']) > 25)) { - $invalidProperties[] = "invalid value for 'passportNumber', the character length must be smaller than or equal to 25."; + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 30)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 30."; } return $invalidProperties; @@ -500,120 +500,185 @@ public function valid(): bool /** - * Gets statePensionAge + * Gets address * - * @return int|null + * @return \SynergiTech\Staffology\Model\ContractAddress|null */ - public function getStatePensionAge(): ?int + public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress { - return $this->container['statePensionAge']; + return $this->container['address']; } /** - * Sets statePensionAge + * Sets address * - * @param int|null $statePensionAge Automatically calculated. + * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address * * @return $this */ - public function setStatePensionAge(?int $statePensionAge): static + public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static { - if (is_null($statePensionAge)) { - throw new InvalidArgumentException('non-nullable statePensionAge cannot be null'); + if (is_null($address)) { + throw new InvalidArgumentException('non-nullable address cannot be null'); } - $this->container['statePensionAge'] = $statePensionAge; + $this->container['address'] = $address; return $this; } /** - * Gets address + * Gets alternativeEmail * - * @return \SynergiTech\Staffology\Model\ContractAddress|null + * @return string|null */ - public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress + public function getAlternativeEmail(): ?string { - return $this->container['address']; + return $this->container['alternativeEmail']; } /** - * Sets address + * Sets alternativeEmail * - * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address + * @param string|null $alternativeEmail alternativeEmail * * @return $this */ - public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static + public function setAlternativeEmail(?string $alternativeEmail): static { - if (is_null($address)) { - throw new InvalidArgumentException('non-nullable address cannot be null'); + if (is_null($alternativeEmail)) { + array_push($this->openAPINullablesSetToNull, 'alternativeEmail'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('alternativeEmail', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['address'] = $address; + if (!is_null($alternativeEmail) && (mb_strlen($alternativeEmail) > 100)) { + throw new InvalidArgumentException('invalid length for $alternativeEmail when calling ContractPersonalDetailsResponse., must be smaller than or equal to 100.'); + } + + $this->container['alternativeEmail'] = $alternativeEmail; return $this; } /** - * Gets maritalStatus + * Gets dateOfBirth * - * @return \SynergiTech\Staffology\Model\MaritalStatus + * @return \DateTime */ - public function getMaritalStatus(): \SynergiTech\Staffology\Model\MaritalStatus + public function getDateOfBirth(): \DateTime { - return $this->container['maritalStatus']; + return $this->container['dateOfBirth']; } /** - * Sets maritalStatus + * Sets dateOfBirth * - * @param \SynergiTech\Staffology\Model\MaritalStatus $maritalStatus maritalStatus + * @param \DateTime $dateOfBirth dateOfBirth * * @return $this */ - public function setMaritalStatus(\SynergiTech\Staffology\Model\MaritalStatus $maritalStatus): static + public function setDateOfBirth(\DateTime $dateOfBirth): static { - if (is_null($maritalStatus)) { - throw new InvalidArgumentException('non-nullable maritalStatus cannot be null'); + if (is_null($dateOfBirth)) { + throw new InvalidArgumentException('non-nullable dateOfBirth cannot be null'); } - $this->container['maritalStatus'] = $maritalStatus; + $this->container['dateOfBirth'] = $dateOfBirth; return $this; } /** - * Gets title + * Gets email * * @return string|null */ - public function getTitle(): ?string + public function getEmail(): ?string { - return $this->container['title']; + return $this->container['email']; } /** - * Sets title + * Sets email * - * @param string|null $title title + * @param string|null $email email * * @return $this */ - public function setTitle(?string $title): static + public function setEmail(?string $email): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); + if (is_null($email)) { + array_push($this->openAPINullablesSetToNull, 'email'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); + $index = array_search('email', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($title) && (mb_strlen($title) > 30)) { - throw new InvalidArgumentException('invalid length for $title when calling ContractPersonalDetailsResponse., must be smaller than or equal to 30.'); + if (!is_null($email) && (mb_strlen($email) > 100)) { + throw new InvalidArgumentException('invalid length for $email when calling ContractPersonalDetailsResponse., must be smaller than or equal to 100.'); } - $this->container['title'] = $title; + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets emailPayslip + * + * @return bool|null + */ + public function getEmailPayslip(): ?bool + { + return $this->container['emailPayslip']; + } + + /** + * Sets emailPayslip + * + * @param bool|null $emailPayslip If set to true then the employees Payslip will be sent by email when a PayRun is finalised. + * + * @return $this + */ + public function setEmailPayslip(?bool $emailPayslip): static + { + if (is_null($emailPayslip)) { + throw new InvalidArgumentException('non-nullable emailPayslip cannot be null'); + } + $this->container['emailPayslip'] = $emailPayslip; + + return $this; + } + + /** + * Gets emailStatement + * + * @return bool|null + */ + public function getEmailStatement(): ?bool + { + return $this->container['emailStatement']; + } + + /** + * Sets emailStatement + * + * @param bool|null $emailStatement Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted. + * + * @return $this + */ + public function setEmailStatement(?bool $emailStatement): static + { + if (is_null($emailStatement)) { + throw new InvalidArgumentException('non-nullable emailStatement cannot be null'); + } + $this->container['emailStatement'] = $emailStatement; return $this; } @@ -657,39 +722,28 @@ public function setFirstName(?string $firstName): static } /** - * Gets middleName + * Gets gender * - * @return string|null + * @return \SynergiTech\Staffology\Model\Gender */ - public function getMiddleName(): ?string + public function getGender(): \SynergiTech\Staffology\Model\Gender { - return $this->container['middleName']; + return $this->container['gender']; } /** - * Sets middleName + * Sets gender * - * @param string|null $middleName middleName + * @param \SynergiTech\Staffology\Model\Gender $gender gender * * @return $this */ - public function setMiddleName(?string $middleName): static + public function setGender(\SynergiTech\Staffology\Model\Gender $gender): static { - if (is_null($middleName)) { - array_push($this->openAPINullablesSetToNull, 'middleName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('middleName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($middleName) && (mb_strlen($middleName) > 35)) { - throw new InvalidArgumentException('invalid length for $middleName when calling ContractPersonalDetailsResponse., must be smaller than or equal to 35.'); + if (is_null($gender)) { + throw new InvalidArgumentException('non-nullable gender cannot be null'); } - - $this->container['middleName'] = $middleName; + $this->container['gender'] = $gender; return $this; } @@ -733,306 +787,268 @@ public function setLastName(?string $lastName): static } /** - * Gets alternativeEmail + * Gets maritalStatus * - * @return string|null + * @return \SynergiTech\Staffology\Model\MaritalStatus */ - public function getAlternativeEmail(): ?string + public function getMaritalStatus(): \SynergiTech\Staffology\Model\MaritalStatus { - return $this->container['alternativeEmail']; + return $this->container['maritalStatus']; } /** - * Sets alternativeEmail + * Sets maritalStatus * - * @param string|null $alternativeEmail alternativeEmail + * @param \SynergiTech\Staffology\Model\MaritalStatus $maritalStatus maritalStatus * * @return $this */ - public function setAlternativeEmail(?string $alternativeEmail): static + public function setMaritalStatus(\SynergiTech\Staffology\Model\MaritalStatus $maritalStatus): static { - if (is_null($alternativeEmail)) { - array_push($this->openAPINullablesSetToNull, 'alternativeEmail'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('alternativeEmail', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($alternativeEmail) && (mb_strlen($alternativeEmail) > 100)) { - throw new InvalidArgumentException('invalid length for $alternativeEmail when calling ContractPersonalDetailsResponse., must be smaller than or equal to 100.'); + if (is_null($maritalStatus)) { + throw new InvalidArgumentException('non-nullable maritalStatus cannot be null'); } - - $this->container['alternativeEmail'] = $alternativeEmail; + $this->container['maritalStatus'] = $maritalStatus; return $this; } /** - * Gets previousSurName + * Gets middleName * * @return string|null */ - public function getPreviousSurName(): ?string + public function getMiddleName(): ?string { - return $this->container['previousSurName']; + return $this->container['middleName']; } /** - * Sets previousSurName + * Sets middleName * - * @param string|null $previousSurName previousSurName + * @param string|null $middleName middleName * * @return $this */ - public function setPreviousSurName(?string $previousSurName): static + public function setMiddleName(?string $middleName): static { - if (is_null($previousSurName)) { - array_push($this->openAPINullablesSetToNull, 'previousSurName'); + if (is_null($middleName)) { + array_push($this->openAPINullablesSetToNull, 'middleName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('previousSurName', $nullablesSetToNull); + $index = array_search('middleName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($previousSurName) && (mb_strlen($previousSurName) > 35)) { - throw new InvalidArgumentException('invalid length for $previousSurName when calling ContractPersonalDetailsResponse., must be smaller than or equal to 35.'); + if (!is_null($middleName) && (mb_strlen($middleName) > 35)) { + throw new InvalidArgumentException('invalid length for $middleName when calling ContractPersonalDetailsResponse., must be smaller than or equal to 35.'); } - $this->container['previousSurName'] = $previousSurName; + $this->container['middleName'] = $middleName; return $this; } /** - * Gets email + * Gets mobile * * @return string|null */ - public function getEmail(): ?string + public function getMobile(): ?string { - return $this->container['email']; + return $this->container['mobile']; } /** - * Sets email + * Sets mobile * - * @param string|null $email email + * @param string|null $mobile mobile * * @return $this */ - public function setEmail(?string $email): static + public function setMobile(?string $mobile): static { - if (is_null($email)) { - array_push($this->openAPINullablesSetToNull, 'email'); + if (is_null($mobile)) { + array_push($this->openAPINullablesSetToNull, 'mobile'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('email', $nullablesSetToNull); + $index = array_search('mobile', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($email) && (mb_strlen($email) > 100)) { - throw new InvalidArgumentException('invalid length for $email when calling ContractPersonalDetailsResponse., must be smaller than or equal to 100.'); + if (!is_null($mobile) && (mb_strlen($mobile) > 30)) { + throw new InvalidArgumentException('invalid length for $mobile when calling ContractPersonalDetailsResponse., must be smaller than or equal to 30.'); } - $this->container['email'] = $email; + $this->container['mobile'] = $mobile; return $this; } /** - * Gets emailPayslip + * Gets niNumber * - * @return bool|null + * @return string|null */ - public function getEmailPayslip(): ?bool + public function getNiNumber(): ?string { - return $this->container['emailPayslip']; + return $this->container['niNumber']; } /** - * Sets emailPayslip - * - * @param bool|null $emailPayslip If set to true then the employees Payslip will be sent by email when a PayRun is finalised. - * - * @return $this - */ - public function setEmailPayslip(?bool $emailPayslip): static - { - if (is_null($emailPayslip)) { - throw new InvalidArgumentException('non-nullable emailPayslip cannot be null'); - } - $this->container['emailPayslip'] = $emailPayslip; - - return $this; - } - - /** - * Gets pdfPassword - * - * @return string|null - */ - public function getPdfPassword(): ?string - { - return $this->container['pdfPassword']; - } - - /** - * Sets pdfPassword + * Sets niNumber * - * @param string|null $pdfPassword Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property. + * @param string|null $niNumber niNumber * * @return $this */ - public function setPdfPassword(?string $pdfPassword): static + public function setNiNumber(?string $niNumber): static { - if (is_null($pdfPassword)) { - array_push($this->openAPINullablesSetToNull, 'pdfPassword'); + if (is_null($niNumber)) { + array_push($this->openAPINullablesSetToNull, 'niNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pdfPassword', $nullablesSetToNull); + $index = array_search('niNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pdfPassword'] = $pdfPassword; + if (!is_null($niNumber) && (mb_strlen($niNumber) > 15)) { + throw new InvalidArgumentException('invalid length for $niNumber when calling ContractPersonalDetailsResponse., must be smaller than or equal to 15.'); + } + + $this->container['niNumber'] = $niNumber; return $this; } /** - * Gets pdfPasswordType + * Gets partnerDetails * - * @return \SynergiTech\Staffology\Model\PdfPasswordType|null + * @return \SynergiTech\Staffology\Model\ContractPartnerDetails|null */ - public function getPdfPasswordType(): ?\SynergiTech\Staffology\Model\PdfPasswordType + public function getPartnerDetails(): ?\SynergiTech\Staffology\Model\ContractPartnerDetails { - return $this->container['pdfPasswordType']; + return $this->container['partnerDetails']; } /** - * Sets pdfPasswordType + * Sets partnerDetails * - * @param \SynergiTech\Staffology\Model\PdfPasswordType|null $pdfPasswordType pdfPasswordType + * @param \SynergiTech\Staffology\Model\ContractPartnerDetails|null $partnerDetails partnerDetails * * @return $this */ - public function setPdfPasswordType(?\SynergiTech\Staffology\Model\PdfPasswordType $pdfPasswordType): static + public function setPartnerDetails(?\SynergiTech\Staffology\Model\ContractPartnerDetails $partnerDetails): static { - if (is_null($pdfPasswordType)) { - throw new InvalidArgumentException('non-nullable pdfPasswordType cannot be null'); + if (is_null($partnerDetails)) { + throw new InvalidArgumentException('non-nullable partnerDetails cannot be null'); } - $this->container['pdfPasswordType'] = $pdfPasswordType; + $this->container['partnerDetails'] = $partnerDetails; return $this; } /** - * Gets emailStatement + * Gets passportNumber * - * @return bool|null + * @return string|null */ - public function getEmailStatement(): ?bool + public function getPassportNumber(): ?string { - return $this->container['emailStatement']; + return $this->container['passportNumber']; } /** - * Sets emailStatement + * Sets passportNumber * - * @param bool|null $emailStatement Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted. + * @param string|null $passportNumber passportNumber * * @return $this */ - public function setEmailStatement(?bool $emailStatement): static + public function setPassportNumber(?string $passportNumber): static { - if (is_null($emailStatement)) { - throw new InvalidArgumentException('non-nullable emailStatement cannot be null'); + if (is_null($passportNumber)) { + array_push($this->openAPINullablesSetToNull, 'passportNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('passportNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['emailStatement'] = $emailStatement; + if (!is_null($passportNumber) && (mb_strlen($passportNumber) > 25)) { + throw new InvalidArgumentException('invalid length for $passportNumber when calling ContractPersonalDetailsResponse., must be smaller than or equal to 25.'); + } + + $this->container['passportNumber'] = $passportNumber; return $this; } /** - * Gets photoUrl + * Gets pdfPassword * * @return string|null */ - public function getPhotoUrl(): ?string + public function getPdfPassword(): ?string { - return $this->container['photoUrl']; + return $this->container['pdfPassword']; } /** - * Sets photoUrl + * Sets pdfPassword * - * @param string|null $photoUrl photoUrl + * @param string|null $pdfPassword Set the password to be used on PDFs. If blank then we'll create a password based on the PdfPasswordType property. * * @return $this */ - public function setPhotoUrl(?string $photoUrl): static + public function setPdfPassword(?string $pdfPassword): static { - if (is_null($photoUrl)) { - array_push($this->openAPINullablesSetToNull, 'photoUrl'); + if (is_null($pdfPassword)) { + array_push($this->openAPINullablesSetToNull, 'pdfPassword'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('photoUrl', $nullablesSetToNull); + $index = array_search('pdfPassword', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($photoUrl) && (mb_strlen($photoUrl) > 250)) { - throw new InvalidArgumentException('invalid length for $photoUrl when calling ContractPersonalDetailsResponse., must be smaller than or equal to 250.'); - } - - $this->container['photoUrl'] = $photoUrl; + $this->container['pdfPassword'] = $pdfPassword; return $this; } /** - * Gets telephone + * Gets pdfPasswordType * - * @return string|null + * @return \SynergiTech\Staffology\Model\PdfPasswordType|null */ - public function getTelephone(): ?string + public function getPdfPasswordType(): ?\SynergiTech\Staffology\Model\PdfPasswordType { - return $this->container['telephone']; + return $this->container['pdfPasswordType']; } /** - * Sets telephone + * Sets pdfPasswordType * - * @param string|null $telephone telephone + * @param \SynergiTech\Staffology\Model\PdfPasswordType|null $pdfPasswordType pdfPasswordType * * @return $this */ - public function setTelephone(?string $telephone): static + public function setPdfPasswordType(?\SynergiTech\Staffology\Model\PdfPasswordType $pdfPasswordType): static { - if (is_null($telephone)) { - array_push($this->openAPINullablesSetToNull, 'telephone'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('telephone', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($telephone) && (mb_strlen($telephone) > 30)) { - throw new InvalidArgumentException('invalid length for $telephone when calling ContractPersonalDetailsResponse., must be smaller than or equal to 30.'); + if (is_null($pdfPasswordType)) { + throw new InvalidArgumentException('non-nullable pdfPasswordType cannot be null'); } - - $this->container['telephone'] = $telephone; + $this->container['pdfPasswordType'] = $pdfPasswordType; return $this; } @@ -1072,196 +1088,180 @@ public function setPhotoSasUrl(?string $photoSasUrl): static } /** - * Gets mobile + * Gets photoUrl * * @return string|null */ - public function getMobile(): ?string + public function getPhotoUrl(): ?string { - return $this->container['mobile']; + return $this->container['photoUrl']; } /** - * Sets mobile + * Sets photoUrl * - * @param string|null $mobile mobile + * @param string|null $photoUrl photoUrl * * @return $this */ - public function setMobile(?string $mobile): static + public function setPhotoUrl(?string $photoUrl): static { - if (is_null($mobile)) { - array_push($this->openAPINullablesSetToNull, 'mobile'); + if (is_null($photoUrl)) { + array_push($this->openAPINullablesSetToNull, 'photoUrl'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mobile', $nullablesSetToNull); + $index = array_search('photoUrl', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($mobile) && (mb_strlen($mobile) > 30)) { - throw new InvalidArgumentException('invalid length for $mobile when calling ContractPersonalDetailsResponse., must be smaller than or equal to 30.'); + if (!is_null($photoUrl) && (mb_strlen($photoUrl) > 250)) { + throw new InvalidArgumentException('invalid length for $photoUrl when calling ContractPersonalDetailsResponse., must be smaller than or equal to 250.'); } - $this->container['mobile'] = $mobile; + $this->container['photoUrl'] = $photoUrl; return $this; } /** - * Gets dateOfBirth + * Gets previousSurName * - * @return \DateTime + * @return string|null */ - public function getDateOfBirth(): \DateTime + public function getPreviousSurName(): ?string { - return $this->container['dateOfBirth']; + return $this->container['previousSurName']; } /** - * Sets dateOfBirth + * Sets previousSurName * - * @param \DateTime $dateOfBirth dateOfBirth + * @param string|null $previousSurName previousSurName * * @return $this */ - public function setDateOfBirth(\DateTime $dateOfBirth): static + public function setPreviousSurName(?string $previousSurName): static { - if (is_null($dateOfBirth)) { - throw new InvalidArgumentException('non-nullable dateOfBirth cannot be null'); + if (is_null($previousSurName)) { + array_push($this->openAPINullablesSetToNull, 'previousSurName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('previousSurName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($previousSurName) && (mb_strlen($previousSurName) > 35)) { + throw new InvalidArgumentException('invalid length for $previousSurName when calling ContractPersonalDetailsResponse., must be smaller than or equal to 35.'); } - $this->container['dateOfBirth'] = $dateOfBirth; + + $this->container['previousSurName'] = $previousSurName; return $this; } /** - * Gets gender + * Gets statePensionAge * - * @return \SynergiTech\Staffology\Model\Gender + * @return int|null */ - public function getGender(): \SynergiTech\Staffology\Model\Gender + public function getStatePensionAge(): ?int { - return $this->container['gender']; + return $this->container['statePensionAge']; } /** - * Sets gender + * Sets statePensionAge * - * @param \SynergiTech\Staffology\Model\Gender $gender gender + * @param int|null $statePensionAge Automatically calculated. * * @return $this */ - public function setGender(\SynergiTech\Staffology\Model\Gender $gender): static + public function setStatePensionAge(?int $statePensionAge): static { - if (is_null($gender)) { - throw new InvalidArgumentException('non-nullable gender cannot be null'); + if (is_null($statePensionAge)) { + throw new InvalidArgumentException('non-nullable statePensionAge cannot be null'); } - $this->container['gender'] = $gender; + $this->container['statePensionAge'] = $statePensionAge; return $this; } /** - * Gets niNumber + * Gets telephone * * @return string|null */ - public function getNiNumber(): ?string + public function getTelephone(): ?string { - return $this->container['niNumber']; + return $this->container['telephone']; } /** - * Sets niNumber + * Sets telephone * - * @param string|null $niNumber niNumber + * @param string|null $telephone telephone * * @return $this */ - public function setNiNumber(?string $niNumber): static + public function setTelephone(?string $telephone): static { - if (is_null($niNumber)) { - array_push($this->openAPINullablesSetToNull, 'niNumber'); + if (is_null($telephone)) { + array_push($this->openAPINullablesSetToNull, 'telephone'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niNumber', $nullablesSetToNull); + $index = array_search('telephone', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($niNumber) && (mb_strlen($niNumber) > 15)) { - throw new InvalidArgumentException('invalid length for $niNumber when calling ContractPersonalDetailsResponse., must be smaller than or equal to 15.'); + if (!is_null($telephone) && (mb_strlen($telephone) > 30)) { + throw new InvalidArgumentException('invalid length for $telephone when calling ContractPersonalDetailsResponse., must be smaller than or equal to 30.'); } - $this->container['niNumber'] = $niNumber; + $this->container['telephone'] = $telephone; return $this; } /** - * Gets passportNumber + * Gets title * * @return string|null */ - public function getPassportNumber(): ?string + public function getTitle(): ?string { - return $this->container['passportNumber']; + return $this->container['title']; } /** - * Sets passportNumber + * Sets title * - * @param string|null $passportNumber passportNumber + * @param string|null $title title * * @return $this */ - public function setPassportNumber(?string $passportNumber): static + public function setTitle(?string $title): static { - if (is_null($passportNumber)) { - array_push($this->openAPINullablesSetToNull, 'passportNumber'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('passportNumber', $nullablesSetToNull); + $index = array_search('title', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($passportNumber) && (mb_strlen($passportNumber) > 25)) { - throw new InvalidArgumentException('invalid length for $passportNumber when calling ContractPersonalDetailsResponse., must be smaller than or equal to 25.'); + if (!is_null($title) && (mb_strlen($title) > 30)) { + throw new InvalidArgumentException('invalid length for $title when calling ContractPersonalDetailsResponse., must be smaller than or equal to 30.'); } - $this->container['passportNumber'] = $passportNumber; - - return $this; - } - - /** - * Gets partnerDetails - * - * @return \SynergiTech\Staffology\Model\ContractPartnerDetails|null - */ - public function getPartnerDetails(): ?\SynergiTech\Staffology\Model\ContractPartnerDetails - { - return $this->container['partnerDetails']; - } - - /** - * Sets partnerDetails - * - * @param \SynergiTech\Staffology\Model\ContractPartnerDetails|null $partnerDetails partnerDetails - * - * @return $this - */ - public function setPartnerDetails(?\SynergiTech\Staffology\Model\ContractPartnerDetails $partnerDetails): static - { - if (is_null($partnerDetails)) { - throw new InvalidArgumentException('non-nullable partnerDetails cannot be null'); - } - $this->container['partnerDetails'] = $partnerDetails; + $this->container['title'] = $title; return $this; } diff --git a/src/Model/ContractReapplyDpsNoticeResponse.php b/src/Model/ContractReapplyDpsNoticeResponse.php index b7a0026..22f93d0 100644 --- a/src/Model/ContractReapplyDpsNoticeResponse.php +++ b/src/Model/ContractReapplyDpsNoticeResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ContractReportTemplateColumnRequest.php b/src/Model/ContractReportTemplateColumnRequest.php index c135cf9..0c618b8 100644 --- a/src/Model/ContractReportTemplateColumnRequest.php +++ b/src/Model/ContractReportTemplateColumnRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractReportTemplateColumnRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPITypes = [ - 'position' => 'int', - 'header' => 'string', 'content' => 'string', + 'header' => 'string', + 'position' => 'int', 'type' => '\SynergiTech\Staffology\Model\ReportTemplateColumnType' ]; @@ -71,9 +71,9 @@ class ContractReportTemplateColumnRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPIFormats = [ - 'position' => 'int32', - 'header' => null, 'content' => null, + 'header' => null, + 'position' => 'int32', 'type' => null ]; @@ -83,9 +83,9 @@ class ContractReportTemplateColumnRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPINullables = [ - 'position' => false, - 'header' => true, 'content' => true, + 'header' => true, + 'position' => false, 'type' => false ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'position' => 'position', - 'header' => 'header', 'content' => 'content', + 'header' => 'header', + 'position' => 'position', 'type' => 'type' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'position' => 'setPosition', - 'header' => 'setHeader', 'content' => 'setContent', + 'header' => 'setHeader', + 'position' => 'setPosition', 'type' => 'setType' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'position' => 'getPosition', - 'header' => 'getHeader', 'content' => 'getContent', + 'header' => 'getHeader', + 'position' => 'getPosition', 'type' => 'getType' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('position', $data ?? [], null); - $this->setIfExists('header', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('header', $data ?? [], null); + $this->setIfExists('position', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -310,28 +310,35 @@ public function valid(): bool /** - * Gets position + * Gets content * - * @return int|null + * @return string|null */ - public function getPosition(): ?int + public function getContent(): ?string { - return $this->container['position']; + return $this->container['content']; } /** - * Sets position + * Sets content * - * @param int|null $position The position of the column in the template + * @param string|null $content The content associated with the column * * @return $this */ - public function setPosition(?int $position): static + public function setContent(?string $content): static { - if (is_null($position)) { - throw new InvalidArgumentException('non-nullable position cannot be null'); + if (is_null($content)) { + array_push($this->openAPINullablesSetToNull, 'content'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('content', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['position'] = $position; + $this->container['content'] = $content; return $this; } @@ -371,35 +378,28 @@ public function setHeader(?string $header): static } /** - * Gets content + * Gets position * - * @return string|null + * @return int|null */ - public function getContent(): ?string + public function getPosition(): ?int { - return $this->container['content']; + return $this->container['position']; } /** - * Sets content + * Sets position * - * @param string|null $content The content associated with the column + * @param int|null $position The position of the column in the template * * @return $this */ - public function setContent(?string $content): static + public function setPosition(?int $position): static { - if (is_null($content)) { - array_push($this->openAPINullablesSetToNull, 'content'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('content', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($position)) { + throw new InvalidArgumentException('non-nullable position cannot be null'); } - $this->container['content'] = $content; + $this->container['position'] = $position; return $this; } diff --git a/src/Model/ContractReportTemplateColumnResponse.php b/src/Model/ContractReportTemplateColumnResponse.php index 97b83b0..7ff7e3c 100644 --- a/src/Model/ContractReportTemplateColumnResponse.php +++ b/src/Model/ContractReportTemplateColumnResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractReportTemplateColumnResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'position' => 'int', - 'header' => 'string', 'content' => 'string', + 'header' => 'string', + 'position' => 'int', 'type' => '\SynergiTech\Staffology\Model\ReportTemplateColumnType' ]; @@ -71,9 +71,9 @@ class ContractReportTemplateColumnResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'position' => 'int32', - 'header' => null, 'content' => null, + 'header' => null, + 'position' => 'int32', 'type' => null ]; @@ -83,9 +83,9 @@ class ContractReportTemplateColumnResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'position' => false, - 'header' => true, 'content' => true, + 'header' => true, + 'position' => false, 'type' => false ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'position' => 'position', - 'header' => 'header', 'content' => 'content', + 'header' => 'header', + 'position' => 'position', 'type' => 'type' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'position' => 'setPosition', - 'header' => 'setHeader', 'content' => 'setContent', + 'header' => 'setHeader', + 'position' => 'setPosition', 'type' => 'setType' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'position' => 'getPosition', - 'header' => 'getHeader', 'content' => 'getContent', + 'header' => 'getHeader', + 'position' => 'getPosition', 'type' => 'getType' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('position', $data ?? [], null); - $this->setIfExists('header', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('header', $data ?? [], null); + $this->setIfExists('position', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -310,28 +310,35 @@ public function valid(): bool /** - * Gets position + * Gets content * - * @return int|null + * @return string|null */ - public function getPosition(): ?int + public function getContent(): ?string { - return $this->container['position']; + return $this->container['content']; } /** - * Sets position + * Sets content * - * @param int|null $position The position of the column in the template + * @param string|null $content The content associated with the column * * @return $this */ - public function setPosition(?int $position): static + public function setContent(?string $content): static { - if (is_null($position)) { - throw new InvalidArgumentException('non-nullable position cannot be null'); + if (is_null($content)) { + array_push($this->openAPINullablesSetToNull, 'content'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('content', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['position'] = $position; + $this->container['content'] = $content; return $this; } @@ -371,35 +378,28 @@ public function setHeader(?string $header): static } /** - * Gets content + * Gets position * - * @return string|null + * @return int|null */ - public function getContent(): ?string + public function getPosition(): ?int { - return $this->container['content']; + return $this->container['position']; } /** - * Sets content + * Sets position * - * @param string|null $content The content associated with the column + * @param int|null $position The position of the column in the template * * @return $this */ - public function setContent(?string $content): static + public function setPosition(?int $position): static { - if (is_null($content)) { - array_push($this->openAPINullablesSetToNull, 'content'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('content', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($position)) { + throw new InvalidArgumentException('non-nullable position cannot be null'); } - $this->container['content'] = $content; + $this->container['position'] = $position; return $this; } diff --git a/src/Model/ContractReportTemplateContentDictionaryResponse.php b/src/Model/ContractReportTemplateContentDictionaryResponse.php index 1903fb6..ff9df4e 100644 --- a/src/Model/ContractReportTemplateContentDictionaryResponse.php +++ b/src/Model/ContractReportTemplateContentDictionaryResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class ContractReportTemplateContentDictionaryResponse implements ModelInterface, * @var array */ protected static array $openAPITypes = [ - 'type' => '\SynergiTech\Staffology\Model\ReportTemplateColumnType', - 'content' => '\SynergiTech\Staffology\Model\ContractReportTemplateContentResponse[]' + 'content' => '\SynergiTech\Staffology\Model\ContractReportTemplateContentResponse[]', + 'type' => '\SynergiTech\Staffology\Model\ReportTemplateColumnType' ]; /** @@ -69,8 +69,8 @@ class ContractReportTemplateContentDictionaryResponse implements ModelInterface, * @var array */ protected static array $openAPIFormats = [ - 'type' => null, - 'content' => null + 'content' => null, + 'type' => null ]; /** @@ -79,8 +79,8 @@ class ContractReportTemplateContentDictionaryResponse implements ModelInterface, * @var array */ protected static array $openAPINullables = [ - 'type' => false, - 'content' => true + 'content' => true, + 'type' => false ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', - 'content' => 'content' + 'content' => 'content', + 'type' => 'type' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', - 'content' => 'setContent' + 'content' => 'setContent', + 'type' => 'setType' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', - 'content' => 'getContent' + 'content' => 'getContent', + 'type' => 'getType' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -295,33 +295,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return \SynergiTech\Staffology\Model\ReportTemplateColumnType|null - */ - public function getType(): ?\SynergiTech\Staffology\Model\ReportTemplateColumnType - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \SynergiTech\Staffology\Model\ReportTemplateColumnType|null $type type - * - * @return $this - */ - public function setType(?\SynergiTech\Staffology\Model\ReportTemplateColumnType $type): static - { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -355,6 +328,33 @@ public function setContent(?array $content): static return $this; } + + /** + * Gets type + * + * @return \SynergiTech\Staffology\Model\ReportTemplateColumnType|null + */ + public function getType(): ?\SynergiTech\Staffology\Model\ReportTemplateColumnType + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \SynergiTech\Staffology\Model\ReportTemplateColumnType|null $type type + * + * @return $this + */ + public function setType(?\SynergiTech\Staffology\Model\ReportTemplateColumnType $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractReportTemplateContentResponse.php b/src/Model/ContractReportTemplateContentResponse.php index 62d4c43..bdc7911 100644 --- a/src/Model/ContractReportTemplateContentResponse.php +++ b/src/Model/ContractReportTemplateContentResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractReportTemplateContentResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPITypes = [ + 'groupName' => 'string', 'name' => 'string', - 'value' => 'string', - 'groupName' => 'string' + 'value' => 'string' ]; /** @@ -70,9 +70,9 @@ class ContractReportTemplateContentResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPIFormats = [ + 'groupName' => null, 'name' => null, - 'value' => null, - 'groupName' => null + 'value' => null ]; /** @@ -81,9 +81,9 @@ class ContractReportTemplateContentResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPINullables = [ + 'groupName' => true, 'name' => true, - 'value' => true, - 'groupName' => true + 'value' => true ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'groupName' => 'groupName', 'name' => 'name', - 'value' => 'value', - 'groupName' => 'groupName' + 'value' => 'value' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'groupName' => 'setGroupName', 'name' => 'setName', - 'value' => 'setValue', - 'groupName' => 'setGroupName' + 'value' => 'setValue' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'groupName' => 'getGroupName', 'name' => 'getName', - 'value' => 'getValue', - 'groupName' => 'getGroupName' + 'value' => 'getValue' ]; /** @@ -255,9 +255,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('groupName', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); - $this->setIfExists('groupName', $data ?? [], null); } /** @@ -303,103 +303,103 @@ public function valid(): bool /** - * Gets name + * Gets groupName * * @return string|null */ - public function getName(): ?string + public function getGroupName(): ?string { - return $this->container['name']; + return $this->container['groupName']; } /** - * Sets name + * Sets groupName * - * @param string|null $name The name of the report template content + * @param string|null $groupName Group name of the report template content * * @return $this */ - public function setName(?string $name): static + public function setGroupName(?string $groupName): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($groupName)) { + array_push($this->openAPINullablesSetToNull, 'groupName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('groupName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['groupName'] = $groupName; return $this; } /** - * Gets value + * Gets name * * @return string|null */ - public function getValue(): ?string + public function getName(): ?string { - return $this->container['value']; + return $this->container['name']; } /** - * Sets value + * Sets name * - * @param string|null $value The value of the report template content, which will be enclosed in curly braces + * @param string|null $name The name of the report template content * * @return $this */ - public function setValue(?string $value): static + public function setName(?string $name): static { - if (is_null($value)) { - array_push($this->openAPINullablesSetToNull, 'value'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('value', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['value'] = $value; + $this->container['name'] = $name; return $this; } /** - * Gets groupName + * Gets value * * @return string|null */ - public function getGroupName(): ?string + public function getValue(): ?string { - return $this->container['groupName']; + return $this->container['value']; } /** - * Sets groupName + * Sets value * - * @param string|null $groupName Group name of the report template content + * @param string|null $value The value of the report template content, which will be enclosed in curly braces * * @return $this */ - public function setGroupName(?string $groupName): static + public function setValue(?string $value): static { - if (is_null($groupName)) { - array_push($this->openAPINullablesSetToNull, 'groupName'); + if (is_null($value)) { + array_push($this->openAPINullablesSetToNull, 'value'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('groupName', $nullablesSetToNull); + $index = array_search('value', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['groupName'] = $groupName; + $this->container['value'] = $value; return $this; } diff --git a/src/Model/ContractReportTemplateRequest.php b/src/Model/ContractReportTemplateRequest.php index 474482f..835a1c3 100644 --- a/src/Model/ContractReportTemplateRequest.php +++ b/src/Model/ContractReportTemplateRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractReportTemplateRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'templateName' => 'string', 'description' => 'string', - 'reportTemplateColumns' => '\SynergiTech\Staffology\Model\ContractReportTemplateColumnRequest[]' + 'reportTemplateColumns' => '\SynergiTech\Staffology\Model\ContractReportTemplateColumnRequest[]', + 'templateName' => 'string' ]; /** @@ -70,9 +70,9 @@ class ContractReportTemplateRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ - 'templateName' => null, 'description' => null, - 'reportTemplateColumns' => null + 'reportTemplateColumns' => null, + 'templateName' => null ]; /** @@ -81,9 +81,9 @@ class ContractReportTemplateRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ - 'templateName' => false, 'description' => true, - 'reportTemplateColumns' => true + 'reportTemplateColumns' => true, + 'templateName' => false ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'templateName' => 'templateName', 'description' => 'description', - 'reportTemplateColumns' => 'reportTemplateColumns' + 'reportTemplateColumns' => 'reportTemplateColumns', + 'templateName' => 'templateName' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'templateName' => 'setTemplateName', 'description' => 'setDescription', - 'reportTemplateColumns' => 'setReportTemplateColumns' + 'reportTemplateColumns' => 'setReportTemplateColumns', + 'templateName' => 'setTemplateName' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'templateName' => 'getTemplateName', 'description' => 'getDescription', - 'reportTemplateColumns' => 'getReportTemplateColumns' + 'reportTemplateColumns' => 'getReportTemplateColumns', + 'templateName' => 'getTemplateName' ]; /** @@ -255,9 +255,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('templateName', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('reportTemplateColumns', $data ?? [], null); + $this->setIfExists('templateName', $data ?? [], null); } /** @@ -309,38 +309,6 @@ public function valid(): bool } - /** - * Gets templateName - * - * @return string - */ - public function getTemplateName(): string - { - return $this->container['templateName']; - } - - /** - * Sets templateName - * - * @param string $templateName The name of the report template - * - * @return $this - */ - public function setTemplateName(string $templateName): static - { - if (is_null($templateName)) { - throw new InvalidArgumentException('non-nullable templateName cannot be null'); - } - - if ((mb_strlen($templateName) < 1)) { - throw new InvalidArgumentException('invalid length for $templateName when calling ContractReportTemplateRequest., must be bigger than or equal to 1.'); - } - - $this->container['templateName'] = $templateName; - - return $this; - } - /** * Gets description * @@ -408,6 +376,38 @@ public function setReportTemplateColumns(?array $reportTemplateColumns): static return $this; } + + /** + * Gets templateName + * + * @return string + */ + public function getTemplateName(): string + { + return $this->container['templateName']; + } + + /** + * Sets templateName + * + * @param string $templateName The name of the report template + * + * @return $this + */ + public function setTemplateName(string $templateName): static + { + if (is_null($templateName)) { + throw new InvalidArgumentException('non-nullable templateName cannot be null'); + } + + if ((mb_strlen($templateName) < 1)) { + throw new InvalidArgumentException('invalid length for $templateName when calling ContractReportTemplateRequest., must be bigger than or equal to 1.'); + } + + $this->container['templateName'] = $templateName; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractReportTemplateResponse.php b/src/Model/ContractReportTemplateResponse.php index eccc2e4..3a48051 100644 --- a/src/Model/ContractReportTemplateResponse.php +++ b/src/Model/ContractReportTemplateResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class ContractReportTemplateResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPITypes = [ - 'uniqueId' => 'string', - 'userName' => 'string', - 'templateName' => 'string', + 'createdDate' => '\DateTime', 'description' => 'string', 'reportTemplateColumns' => '\SynergiTech\Staffology\Model\ContractReportTemplateColumnResponse[]', + 'templateName' => 'string', + 'uniqueId' => 'string', 'updatedDate' => '\DateTime', - 'createdDate' => '\DateTime' + 'userName' => 'string' ]; /** @@ -74,13 +74,13 @@ class ContractReportTemplateResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPIFormats = [ - 'uniqueId' => 'uuid', - 'userName' => null, - 'templateName' => null, + 'createdDate' => 'date', 'description' => null, 'reportTemplateColumns' => null, + 'templateName' => null, + 'uniqueId' => 'uuid', 'updatedDate' => 'date', - 'createdDate' => 'date' + 'userName' => null ]; /** @@ -89,13 +89,13 @@ class ContractReportTemplateResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPINullables = [ - 'uniqueId' => false, - 'userName' => true, - 'templateName' => true, + 'createdDate' => false, 'description' => true, 'reportTemplateColumns' => true, + 'templateName' => true, + 'uniqueId' => false, 'updatedDate' => true, - 'createdDate' => false + 'userName' => true ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'uniqueId' => 'uniqueId', - 'userName' => 'userName', - 'templateName' => 'templateName', + 'createdDate' => 'createdDate', 'description' => 'description', 'reportTemplateColumns' => 'reportTemplateColumns', + 'templateName' => 'templateName', + 'uniqueId' => 'uniqueId', 'updatedDate' => 'updatedDate', - 'createdDate' => 'createdDate' + 'userName' => 'userName' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'uniqueId' => 'setUniqueId', - 'userName' => 'setUserName', - 'templateName' => 'setTemplateName', + 'createdDate' => 'setCreatedDate', 'description' => 'setDescription', 'reportTemplateColumns' => 'setReportTemplateColumns', + 'templateName' => 'setTemplateName', + 'uniqueId' => 'setUniqueId', 'updatedDate' => 'setUpdatedDate', - 'createdDate' => 'setCreatedDate' + 'userName' => 'setUserName' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'uniqueId' => 'getUniqueId', - 'userName' => 'getUserName', - 'templateName' => 'getTemplateName', + 'createdDate' => 'getCreatedDate', 'description' => 'getDescription', 'reportTemplateColumns' => 'getReportTemplateColumns', + 'templateName' => 'getTemplateName', + 'uniqueId' => 'getUniqueId', 'updatedDate' => 'getUpdatedDate', - 'createdDate' => 'getCreatedDate' + 'userName' => 'getUserName' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('uniqueId', $data ?? [], null); - $this->setIfExists('userName', $data ?? [], null); - $this->setIfExists('templateName', $data ?? [], null); + $this->setIfExists('createdDate', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('reportTemplateColumns', $data ?? [], null); + $this->setIfExists('templateName', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); $this->setIfExists('updatedDate', $data ?? [], null); - $this->setIfExists('createdDate', $data ?? [], null); + $this->setIfExists('userName', $data ?? [], null); } /** @@ -331,164 +331,157 @@ public function valid(): bool /** - * Gets uniqueId + * Gets createdDate * - * @return string|null + * @return \DateTime|null */ - public function getUniqueId(): ?string + public function getCreatedDate(): ?\DateTime { - return $this->container['uniqueId']; + return $this->container['createdDate']; } /** - * Sets uniqueId + * Sets createdDate * - * @param string|null $uniqueId Unique Id of report template column + * @param \DateTime|null $createdDate Created date of the report template column * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setCreatedDate(?\DateTime $createdDate): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($createdDate)) { + throw new InvalidArgumentException('non-nullable createdDate cannot be null'); } - $this->container['uniqueId'] = $uniqueId; + $this->container['createdDate'] = $createdDate; return $this; } /** - * Gets userName + * Gets description * * @return string|null */ - public function getUserName(): ?string + public function getDescription(): ?string { - return $this->container['userName']; + return $this->container['description']; } /** - * Sets userName + * Sets description * - * @param string|null $userName Name of the user who created the report template + * @param string|null $description Description of the report template * * @return $this */ - public function setUserName(?string $userName): static + public function setDescription(?string $description): static { - if (is_null($userName)) { - array_push($this->openAPINullablesSetToNull, 'userName'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('userName', $nullablesSetToNull); + $index = array_search('description', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['userName'] = $userName; + $this->container['description'] = $description; return $this; } /** - * Gets templateName + * Gets reportTemplateColumns * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractReportTemplateColumnResponse[]|null */ - public function getTemplateName(): ?string + public function getReportTemplateColumns(): ?array { - return $this->container['templateName']; + return $this->container['reportTemplateColumns']; } /** - * Sets templateName + * Sets reportTemplateColumns * - * @param string|null $templateName Name of the report template + * @param \SynergiTech\Staffology\Model\ContractReportTemplateColumnResponse[]|null $reportTemplateColumns List of the report template column * * @return $this */ - public function setTemplateName(?string $templateName): static + public function setReportTemplateColumns(?array $reportTemplateColumns): static { - if (is_null($templateName)) { - array_push($this->openAPINullablesSetToNull, 'templateName'); + if (is_null($reportTemplateColumns)) { + array_push($this->openAPINullablesSetToNull, 'reportTemplateColumns'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('templateName', $nullablesSetToNull); + $index = array_search('reportTemplateColumns', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['templateName'] = $templateName; + $this->container['reportTemplateColumns'] = $reportTemplateColumns; return $this; } /** - * Gets description + * Gets templateName * * @return string|null */ - public function getDescription(): ?string + public function getTemplateName(): ?string { - return $this->container['description']; + return $this->container['templateName']; } /** - * Sets description + * Sets templateName * - * @param string|null $description Description of the report template + * @param string|null $templateName Name of the report template * * @return $this */ - public function setDescription(?string $description): static + public function setTemplateName(?string $templateName): static { - if (is_null($description)) { - array_push($this->openAPINullablesSetToNull, 'description'); + if (is_null($templateName)) { + array_push($this->openAPINullablesSetToNull, 'templateName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('description', $nullablesSetToNull); + $index = array_search('templateName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['description'] = $description; + $this->container['templateName'] = $templateName; return $this; } /** - * Gets reportTemplateColumns + * Gets uniqueId * - * @return \SynergiTech\Staffology\Model\ContractReportTemplateColumnResponse[]|null + * @return string|null */ - public function getReportTemplateColumns(): ?array + public function getUniqueId(): ?string { - return $this->container['reportTemplateColumns']; + return $this->container['uniqueId']; } /** - * Sets reportTemplateColumns + * Sets uniqueId * - * @param \SynergiTech\Staffology\Model\ContractReportTemplateColumnResponse[]|null $reportTemplateColumns List of the report template column + * @param string|null $uniqueId Unique Id of report template column * * @return $this */ - public function setReportTemplateColumns(?array $reportTemplateColumns): static + public function setUniqueId(?string $uniqueId): static { - if (is_null($reportTemplateColumns)) { - array_push($this->openAPINullablesSetToNull, 'reportTemplateColumns'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('reportTemplateColumns', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); } - $this->container['reportTemplateColumns'] = $reportTemplateColumns; + $this->container['uniqueId'] = $uniqueId; return $this; } @@ -528,28 +521,35 @@ public function setUpdatedDate(?\DateTime $updatedDate): static } /** - * Gets createdDate + * Gets userName * - * @return \DateTime|null + * @return string|null */ - public function getCreatedDate(): ?\DateTime + public function getUserName(): ?string { - return $this->container['createdDate']; + return $this->container['userName']; } /** - * Sets createdDate + * Sets userName * - * @param \DateTime|null $createdDate Created date of the report template column + * @param string|null $userName Name of the user who created the report template * * @return $this */ - public function setCreatedDate(?\DateTime $createdDate): static + public function setUserName(?string $userName): static { - if (is_null($createdDate)) { - throw new InvalidArgumentException('non-nullable createdDate cannot be null'); + if (is_null($userName)) { + array_push($this->openAPINullablesSetToNull, 'userName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('userName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['createdDate'] = $createdDate; + $this->container['userName'] = $userName; return $this; } diff --git a/src/Model/ContractRightToWork.php b/src/Model/ContractRightToWork.php index dd40baa..c75a8ad 100644 --- a/src/Model/ContractRightToWork.php +++ b/src/Model/ContractRightToWork.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,9 +60,9 @@ class ContractRightToWork implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPITypes = [ 'checked' => 'bool', - 'documentType' => '\SynergiTech\Staffology\Model\RightToWorkDocumentType', - 'documentRef' => 'string', 'documentExpiry' => '\DateTime', + 'documentRef' => 'string', + 'documentType' => '\SynergiTech\Staffology\Model\RightToWorkDocumentType', 'note' => 'string' ]; @@ -73,9 +73,9 @@ class ContractRightToWork implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPIFormats = [ 'checked' => null, - 'documentType' => null, - 'documentRef' => null, 'documentExpiry' => 'date', + 'documentRef' => null, + 'documentType' => null, 'note' => null ]; @@ -86,9 +86,9 @@ class ContractRightToWork implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPINullables = [ 'checked' => false, - 'documentType' => false, - 'documentRef' => true, 'documentExpiry' => true, + 'documentRef' => true, + 'documentType' => false, 'note' => true ]; @@ -179,9 +179,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'checked' => 'checked', - 'documentType' => 'documentType', - 'documentRef' => 'documentRef', 'documentExpiry' => 'documentExpiry', + 'documentRef' => 'documentRef', + 'documentType' => 'documentType', 'note' => 'note' ]; @@ -192,9 +192,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'checked' => 'setChecked', - 'documentType' => 'setDocumentType', - 'documentRef' => 'setDocumentRef', 'documentExpiry' => 'setDocumentExpiry', + 'documentRef' => 'setDocumentRef', + 'documentType' => 'setDocumentType', 'note' => 'setNote' ]; @@ -205,9 +205,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'checked' => 'getChecked', - 'documentType' => 'getDocumentType', - 'documentRef' => 'getDocumentRef', 'documentExpiry' => 'getDocumentExpiry', + 'documentRef' => 'getDocumentRef', + 'documentType' => 'getDocumentType', 'note' => 'getNote' ]; @@ -268,9 +268,9 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('checked', $data ?? [], null); - $this->setIfExists('documentType', $data ?? [], null); - $this->setIfExists('documentRef', $data ?? [], null); $this->setIfExists('documentExpiry', $data ?? [], null); + $this->setIfExists('documentRef', $data ?? [], null); + $this->setIfExists('documentType', $data ?? [], null); $this->setIfExists('note', $data ?? [], null); } @@ -352,28 +352,35 @@ public function setChecked(?bool $checked): static } /** - * Gets documentType + * Gets documentExpiry * - * @return \SynergiTech\Staffology\Model\RightToWorkDocumentType|null + * @return \DateTime|null */ - public function getDocumentType(): ?\SynergiTech\Staffology\Model\RightToWorkDocumentType + public function getDocumentExpiry(): ?\DateTime { - return $this->container['documentType']; + return $this->container['documentExpiry']; } /** - * Sets documentType + * Sets documentExpiry * - * @param \SynergiTech\Staffology\Model\RightToWorkDocumentType|null $documentType documentType + * @param \DateTime|null $documentExpiry documentExpiry * * @return $this */ - public function setDocumentType(?\SynergiTech\Staffology\Model\RightToWorkDocumentType $documentType): static + public function setDocumentExpiry(?\DateTime $documentExpiry): static { - if (is_null($documentType)) { - throw new InvalidArgumentException('non-nullable documentType cannot be null'); + if (is_null($documentExpiry)) { + array_push($this->openAPINullablesSetToNull, 'documentExpiry'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('documentExpiry', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['documentType'] = $documentType; + $this->container['documentExpiry'] = $documentExpiry; return $this; } @@ -417,35 +424,28 @@ public function setDocumentRef(?string $documentRef): static } /** - * Gets documentExpiry + * Gets documentType * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\RightToWorkDocumentType|null */ - public function getDocumentExpiry(): ?\DateTime + public function getDocumentType(): ?\SynergiTech\Staffology\Model\RightToWorkDocumentType { - return $this->container['documentExpiry']; + return $this->container['documentType']; } /** - * Sets documentExpiry + * Sets documentType * - * @param \DateTime|null $documentExpiry documentExpiry + * @param \SynergiTech\Staffology\Model\RightToWorkDocumentType|null $documentType documentType * * @return $this */ - public function setDocumentExpiry(?\DateTime $documentExpiry): static + public function setDocumentType(?\SynergiTech\Staffology\Model\RightToWorkDocumentType $documentType): static { - if (is_null($documentExpiry)) { - array_push($this->openAPINullablesSetToNull, 'documentExpiry'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('documentExpiry', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($documentType)) { + throw new InvalidArgumentException('non-nullable documentType cannot be null'); } - $this->container['documentExpiry'] = $documentExpiry; + $this->container['documentType'] = $documentType; return $this; } diff --git a/src/Model/ContractRtiAgentRequest.php b/src/Model/ContractRtiAgentRequest.php index 6778187..09cb841 100644 --- a/src/Model/ContractRtiAgentRequest.php +++ b/src/Model/ContractRtiAgentRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractRtiAgentRequest implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ + 'address' => '\SynergiTech\Staffology\Model\ContractAddress', 'agentId' => 'string', 'company' => 'string', - 'address' => '\SynergiTech\Staffology\Model\ContractAddress', 'contact' => '\SynergiTech\Staffology\Model\ContractRtiContactRequest' ]; @@ -71,9 +71,9 @@ class ContractRtiAgentRequest implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ + 'address' => null, 'agentId' => null, 'company' => null, - 'address' => null, 'contact' => null ]; @@ -83,9 +83,9 @@ class ContractRtiAgentRequest implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ + 'address' => false, 'agentId' => true, 'company' => true, - 'address' => false, 'contact' => false ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'address' => 'address', 'agentId' => 'agentId', 'company' => 'company', - 'address' => 'address', 'contact' => 'contact' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'address' => 'setAddress', 'agentId' => 'setAgentId', 'company' => 'setCompany', - 'address' => 'setAddress', 'contact' => 'setContact' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'address' => 'getAddress', 'agentId' => 'getAgentId', 'company' => 'getCompany', - 'address' => 'getAddress', 'contact' => 'getContact' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('address', $data ?? [], null); $this->setIfExists('agentId', $data ?? [], null); $this->setIfExists('company', $data ?? [], null); - $this->setIfExists('address', $data ?? [], null); $this->setIfExists('contact', $data ?? [], null); } @@ -309,6 +309,33 @@ public function valid(): bool } + /** + * Gets address + * + * @return \SynergiTech\Staffology\Model\ContractAddress|null + */ + public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address + * + * @return $this + */ + public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static + { + if (is_null($address)) { + throw new InvalidArgumentException('non-nullable address cannot be null'); + } + $this->container['address'] = $address; + + return $this; + } + /** * Gets agentId * @@ -377,33 +404,6 @@ public function setCompany(?string $company): static return $this; } - /** - * Gets address - * - * @return \SynergiTech\Staffology\Model\ContractAddress|null - */ - public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address - * - * @return $this - */ - public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static - { - if (is_null($address)) { - throw new InvalidArgumentException('non-nullable address cannot be null'); - } - $this->container['address'] = $address; - - return $this; - } - /** * Gets contact * diff --git a/src/Model/ContractRtiAgentResponse.php b/src/Model/ContractRtiAgentResponse.php index a9706e6..d618375 100644 --- a/src/Model/ContractRtiAgentResponse.php +++ b/src/Model/ContractRtiAgentResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractRtiAgentResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPITypes = [ + 'address' => '\SynergiTech\Staffology\Model\ContractAddress', 'agentId' => 'string', 'company' => 'string', - 'address' => '\SynergiTech\Staffology\Model\ContractAddress', 'contact' => '\SynergiTech\Staffology\Model\ContractRtiContactResponse' ]; @@ -71,9 +71,9 @@ class ContractRtiAgentResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPIFormats = [ + 'address' => null, 'agentId' => null, 'company' => null, - 'address' => null, 'contact' => null ]; @@ -83,9 +83,9 @@ class ContractRtiAgentResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPINullables = [ + 'address' => false, 'agentId' => true, 'company' => true, - 'address' => false, 'contact' => false ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'address' => 'address', 'agentId' => 'agentId', 'company' => 'company', - 'address' => 'address', 'contact' => 'contact' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'address' => 'setAddress', 'agentId' => 'setAgentId', 'company' => 'setCompany', - 'address' => 'setAddress', 'contact' => 'setContact' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'address' => 'getAddress', 'agentId' => 'getAgentId', 'company' => 'getCompany', - 'address' => 'getAddress', 'contact' => 'getContact' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('address', $data ?? [], null); $this->setIfExists('agentId', $data ?? [], null); $this->setIfExists('company', $data ?? [], null); - $this->setIfExists('address', $data ?? [], null); $this->setIfExists('contact', $data ?? [], null); } @@ -309,6 +309,33 @@ public function valid(): bool } + /** + * Gets address + * + * @return \SynergiTech\Staffology\Model\ContractAddress|null + */ + public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address + * + * @return $this + */ + public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static + { + if (is_null($address)) { + throw new InvalidArgumentException('non-nullable address cannot be null'); + } + $this->container['address'] = $address; + + return $this; + } + /** * Gets agentId * @@ -377,33 +404,6 @@ public function setCompany(?string $company): static return $this; } - /** - * Gets address - * - * @return \SynergiTech\Staffology\Model\ContractAddress|null - */ - public function getAddress(): ?\SynergiTech\Staffology\Model\ContractAddress - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param \SynergiTech\Staffology\Model\ContractAddress|null $address address - * - * @return $this - */ - public function setAddress(?\SynergiTech\Staffology\Model\ContractAddress $address): static - { - if (is_null($address)) { - throw new InvalidArgumentException('non-nullable address cannot be null'); - } - $this->container['address'] = $address; - - return $this; - } - /** * Gets contact * diff --git a/src/Model/ContractRtiContactRequest.php b/src/Model/ContractRtiContactRequest.php index 5085ba1..fd5a09e 100644 --- a/src/Model/ContractRtiContactRequest.php +++ b/src/Model/ContractRtiContactRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractRtiContactRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPITypes = [ + 'email' => 'string', 'firstName' => 'string', 'lastName' => 'string', - 'email' => 'string', 'telephone' => 'string' ]; @@ -71,9 +71,9 @@ class ContractRtiContactRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPIFormats = [ + 'email' => null, 'firstName' => null, 'lastName' => null, - 'email' => null, 'telephone' => null ]; @@ -83,9 +83,9 @@ class ContractRtiContactRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPINullables = [ + 'email' => true, 'firstName' => true, 'lastName' => true, - 'email' => true, 'telephone' => true ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'email' => 'email', 'firstName' => 'firstName', 'lastName' => 'lastName', - 'email' => 'email', 'telephone' => 'telephone' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'email' => 'setEmail', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', - 'email' => 'setEmail', 'telephone' => 'setTelephone' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'email' => 'getEmail', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', - 'email' => 'getEmail', 'telephone' => 'getTelephone' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('email', $data ?? [], null); $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); - $this->setIfExists('email', $data ?? [], null); $this->setIfExists('telephone', $data ?? [], null); } @@ -310,103 +310,103 @@ public function valid(): bool /** - * Gets firstName + * Gets email * * @return string|null */ - public function getFirstName(): ?string + public function getEmail(): ?string { - return $this->container['firstName']; + return $this->container['email']; } /** - * Sets firstName + * Sets email * - * @param string|null $firstName firstName + * @param string|null $email email * * @return $this */ - public function setFirstName(?string $firstName): static + public function setEmail(?string $email): static { - if (is_null($firstName)) { - array_push($this->openAPINullablesSetToNull, 'firstName'); + if (is_null($email)) { + array_push($this->openAPINullablesSetToNull, 'email'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('firstName', $nullablesSetToNull); + $index = array_search('email', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['firstName'] = $firstName; + $this->container['email'] = $email; return $this; } /** - * Gets lastName + * Gets firstName * * @return string|null */ - public function getLastName(): ?string + public function getFirstName(): ?string { - return $this->container['lastName']; + return $this->container['firstName']; } /** - * Sets lastName + * Sets firstName * - * @param string|null $lastName lastName + * @param string|null $firstName firstName * * @return $this */ - public function setLastName(?string $lastName): static + public function setFirstName(?string $firstName): static { - if (is_null($lastName)) { - array_push($this->openAPINullablesSetToNull, 'lastName'); + if (is_null($firstName)) { + array_push($this->openAPINullablesSetToNull, 'firstName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastName', $nullablesSetToNull); + $index = array_search('firstName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lastName'] = $lastName; + $this->container['firstName'] = $firstName; return $this; } /** - * Gets email + * Gets lastName * * @return string|null */ - public function getEmail(): ?string + public function getLastName(): ?string { - return $this->container['email']; + return $this->container['lastName']; } /** - * Sets email + * Sets lastName * - * @param string|null $email email + * @param string|null $lastName lastName * * @return $this */ - public function setEmail(?string $email): static + public function setLastName(?string $lastName): static { - if (is_null($email)) { - array_push($this->openAPINullablesSetToNull, 'email'); + if (is_null($lastName)) { + array_push($this->openAPINullablesSetToNull, 'lastName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('email', $nullablesSetToNull); + $index = array_search('lastName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['email'] = $email; + $this->container['lastName'] = $lastName; return $this; } diff --git a/src/Model/ContractRtiContactResponse.php b/src/Model/ContractRtiContactResponse.php index f0ca0c3..79cd36b 100644 --- a/src/Model/ContractRtiContactResponse.php +++ b/src/Model/ContractRtiContactResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractRtiContactResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ + 'email' => 'string', 'firstName' => 'string', 'lastName' => 'string', - 'email' => 'string', 'telephone' => 'string' ]; @@ -71,9 +71,9 @@ class ContractRtiContactResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ + 'email' => null, 'firstName' => null, 'lastName' => null, - 'email' => null, 'telephone' => null ]; @@ -83,9 +83,9 @@ class ContractRtiContactResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ + 'email' => true, 'firstName' => true, 'lastName' => true, - 'email' => true, 'telephone' => true ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'email' => 'email', 'firstName' => 'firstName', 'lastName' => 'lastName', - 'email' => 'email', 'telephone' => 'telephone' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'email' => 'setEmail', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', - 'email' => 'setEmail', 'telephone' => 'setTelephone' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'email' => 'getEmail', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', - 'email' => 'getEmail', 'telephone' => 'getTelephone' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('email', $data ?? [], null); $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); - $this->setIfExists('email', $data ?? [], null); $this->setIfExists('telephone', $data ?? [], null); } @@ -310,103 +310,103 @@ public function valid(): bool /** - * Gets firstName + * Gets email * * @return string|null */ - public function getFirstName(): ?string + public function getEmail(): ?string { - return $this->container['firstName']; + return $this->container['email']; } /** - * Sets firstName + * Sets email * - * @param string|null $firstName firstName + * @param string|null $email email * * @return $this */ - public function setFirstName(?string $firstName): static + public function setEmail(?string $email): static { - if (is_null($firstName)) { - array_push($this->openAPINullablesSetToNull, 'firstName'); + if (is_null($email)) { + array_push($this->openAPINullablesSetToNull, 'email'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('firstName', $nullablesSetToNull); + $index = array_search('email', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['firstName'] = $firstName; + $this->container['email'] = $email; return $this; } /** - * Gets lastName + * Gets firstName * * @return string|null */ - public function getLastName(): ?string + public function getFirstName(): ?string { - return $this->container['lastName']; + return $this->container['firstName']; } /** - * Sets lastName + * Sets firstName * - * @param string|null $lastName lastName + * @param string|null $firstName firstName * * @return $this */ - public function setLastName(?string $lastName): static + public function setFirstName(?string $firstName): static { - if (is_null($lastName)) { - array_push($this->openAPINullablesSetToNull, 'lastName'); + if (is_null($firstName)) { + array_push($this->openAPINullablesSetToNull, 'firstName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastName', $nullablesSetToNull); + $index = array_search('firstName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lastName'] = $lastName; + $this->container['firstName'] = $firstName; return $this; } /** - * Gets email + * Gets lastName * * @return string|null */ - public function getEmail(): ?string + public function getLastName(): ?string { - return $this->container['email']; + return $this->container['lastName']; } /** - * Sets email + * Sets lastName * - * @param string|null $email email + * @param string|null $lastName lastName * * @return $this */ - public function setEmail(?string $email): static + public function setLastName(?string $lastName): static { - if (is_null($email)) { - array_push($this->openAPINullablesSetToNull, 'email'); + if (is_null($lastName)) { + array_push($this->openAPINullablesSetToNull, 'lastName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('email', $nullablesSetToNull); + $index = array_search('lastName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['email'] = $email; + $this->container['lastName'] = $lastName; return $this; } diff --git a/src/Model/ContractRtiEmployeeAddress.php b/src/Model/ContractRtiEmployeeAddress.php index e10c2c8..aae9b6c 100644 --- a/src/Model/ContractRtiEmployeeAddress.php +++ b/src/Model/ContractRtiEmployeeAddress.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class ContractRtiEmployeeAddress implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ + 'country' => 'string', + 'foreignCountry' => 'string', 'line' => 'string[]', - 'postcode' => 'string', 'postCode' => 'string', - 'ukPostcode' => 'string', - 'country' => 'string', - 'foreignCountry' => 'string' + 'postcode' => 'string', + 'ukPostcode' => 'string' ]; /** @@ -73,12 +73,12 @@ class ContractRtiEmployeeAddress implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ + 'country' => null, + 'foreignCountry' => null, 'line' => null, - 'postcode' => null, 'postCode' => null, - 'ukPostcode' => null, - 'country' => null, - 'foreignCountry' => null + 'postcode' => null, + 'ukPostcode' => null ]; /** @@ -87,12 +87,12 @@ class ContractRtiEmployeeAddress implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ + 'country' => true, + 'foreignCountry' => true, 'line' => true, - 'postcode' => true, 'postCode' => true, - 'ukPostcode' => true, - 'country' => true, - 'foreignCountry' => true + 'postcode' => true, + 'ukPostcode' => true ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'country' => 'country', + 'foreignCountry' => 'foreignCountry', 'line' => 'line', - 'postcode' => 'postcode', 'postCode' => 'postCode', - 'ukPostcode' => 'ukPostcode', - 'country' => 'country', - 'foreignCountry' => 'foreignCountry' + 'postcode' => 'postcode', + 'ukPostcode' => 'ukPostcode' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'country' => 'setCountry', + 'foreignCountry' => 'setForeignCountry', 'line' => 'setLine', - 'postcode' => 'setPostcode', 'postCode' => 'setPostCode', - 'ukPostcode' => 'setUkPostcode', - 'country' => 'setCountry', - 'foreignCountry' => 'setForeignCountry' + 'postcode' => 'setPostcode', + 'ukPostcode' => 'setUkPostcode' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'country' => 'getCountry', + 'foreignCountry' => 'getForeignCountry', 'line' => 'getLine', - 'postcode' => 'getPostcode', 'postCode' => 'getPostCode', - 'ukPostcode' => 'getUkPostcode', - 'country' => 'getCountry', - 'foreignCountry' => 'getForeignCountry' + 'postcode' => 'getPostcode', + 'ukPostcode' => 'getUkPostcode' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('foreignCountry', $data ?? [], null); $this->setIfExists('line', $data ?? [], null); - $this->setIfExists('postcode', $data ?? [], null); $this->setIfExists('postCode', $data ?? [], null); + $this->setIfExists('postcode', $data ?? [], null); $this->setIfExists('ukPostcode', $data ?? [], null); - $this->setIfExists('country', $data ?? [], null); - $this->setIfExists('foreignCountry', $data ?? [], null); } /** @@ -324,205 +324,205 @@ public function valid(): bool /** - * Gets line + * Gets country * - * @return string[]|null + * @return string|null */ - public function getLine(): ?array + public function getCountry(): ?string { - return $this->container['line']; + return $this->container['country']; } /** - * Sets line + * Sets country * - * @param string[]|null $line line + * @param string|null $country country * * @return $this */ - public function setLine(?array $line): static + public function setCountry(?string $country): static { - if (is_null($line)) { - array_push($this->openAPINullablesSetToNull, 'line'); + if (is_null($country)) { + array_push($this->openAPINullablesSetToNull, 'country'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('line', $nullablesSetToNull); + $index = array_search('country', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['line'] = $line; + $this->container['country'] = $country; return $this; } /** - * Gets postcode + * Gets foreignCountry * * @return string|null */ - public function getPostcode(): ?string + public function getForeignCountry(): ?string { - return $this->container['postcode']; + return $this->container['foreignCountry']; } /** - * Sets postcode + * Sets foreignCountry * - * @param string|null $postcode postcode + * @param string|null $foreignCountry foreignCountry * * @return $this */ - public function setPostcode(?string $postcode): static + public function setForeignCountry(?string $foreignCountry): static { - if (is_null($postcode)) { - array_push($this->openAPINullablesSetToNull, 'postcode'); + if (is_null($foreignCountry)) { + array_push($this->openAPINullablesSetToNull, 'foreignCountry'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('postcode', $nullablesSetToNull); + $index = array_search('foreignCountry', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['postcode'] = $postcode; + $this->container['foreignCountry'] = $foreignCountry; return $this; } /** - * Gets postCode + * Gets line * - * @return string|null + * @return string[]|null */ - public function getPostCode(): ?string + public function getLine(): ?array { - return $this->container['postCode']; + return $this->container['line']; } /** - * Sets postCode + * Sets line * - * @param string|null $postCode postCode + * @param string[]|null $line line * * @return $this */ - public function setPostCode(?string $postCode): static + public function setLine(?array $line): static { - if (is_null($postCode)) { - array_push($this->openAPINullablesSetToNull, 'postCode'); + if (is_null($line)) { + array_push($this->openAPINullablesSetToNull, 'line'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('postCode', $nullablesSetToNull); + $index = array_search('line', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['postCode'] = $postCode; + $this->container['line'] = $line; return $this; } /** - * Gets ukPostcode + * Gets postCode * * @return string|null */ - public function getUkPostcode(): ?string + public function getPostCode(): ?string { - return $this->container['ukPostcode']; + return $this->container['postCode']; } /** - * Sets ukPostcode + * Sets postCode * - * @param string|null $ukPostcode ukPostcode + * @param string|null $postCode postCode * * @return $this */ - public function setUkPostcode(?string $ukPostcode): static + public function setPostCode(?string $postCode): static { - if (is_null($ukPostcode)) { - array_push($this->openAPINullablesSetToNull, 'ukPostcode'); + if (is_null($postCode)) { + array_push($this->openAPINullablesSetToNull, 'postCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('ukPostcode', $nullablesSetToNull); + $index = array_search('postCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['ukPostcode'] = $ukPostcode; + $this->container['postCode'] = $postCode; return $this; } /** - * Gets country + * Gets postcode * * @return string|null */ - public function getCountry(): ?string + public function getPostcode(): ?string { - return $this->container['country']; + return $this->container['postcode']; } /** - * Sets country + * Sets postcode * - * @param string|null $country country + * @param string|null $postcode postcode * * @return $this */ - public function setCountry(?string $country): static + public function setPostcode(?string $postcode): static { - if (is_null($country)) { - array_push($this->openAPINullablesSetToNull, 'country'); + if (is_null($postcode)) { + array_push($this->openAPINullablesSetToNull, 'postcode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('country', $nullablesSetToNull); + $index = array_search('postcode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['country'] = $country; + $this->container['postcode'] = $postcode; return $this; } /** - * Gets foreignCountry + * Gets ukPostcode * * @return string|null */ - public function getForeignCountry(): ?string + public function getUkPostcode(): ?string { - return $this->container['foreignCountry']; + return $this->container['ukPostcode']; } /** - * Sets foreignCountry + * Sets ukPostcode * - * @param string|null $foreignCountry foreignCountry + * @param string|null $ukPostcode ukPostcode * * @return $this */ - public function setForeignCountry(?string $foreignCountry): static + public function setUkPostcode(?string $ukPostcode): static { - if (is_null($foreignCountry)) { - array_push($this->openAPINullablesSetToNull, 'foreignCountry'); + if (is_null($ukPostcode)) { + array_push($this->openAPINullablesSetToNull, 'ukPostcode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('foreignCountry', $nullablesSetToNull); + $index = array_search('ukPostcode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['foreignCountry'] = $foreignCountry; + $this->container['ukPostcode'] = $ukPostcode; return $this; } diff --git a/src/Model/ContractRtiEmployeeName.php b/src/Model/ContractRtiEmployeeName.php index 20e52d4..b6e1793 100644 --- a/src/Model/ContractRtiEmployeeName.php +++ b/src/Model/ContractRtiEmployeeName.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractRtiEmployeeName implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ - 'ttl' => 'string', 'fore' => 'string[]', 'initials' => 'string', - 'sur' => 'string' + 'sur' => 'string', + 'ttl' => 'string' ]; /** @@ -71,10 +71,10 @@ class ContractRtiEmployeeName implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ - 'ttl' => null, 'fore' => null, 'initials' => null, - 'sur' => null + 'sur' => null, + 'ttl' => null ]; /** @@ -83,10 +83,10 @@ class ContractRtiEmployeeName implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ - 'ttl' => true, 'fore' => true, 'initials' => true, - 'sur' => true + 'sur' => true, + 'ttl' => true ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'ttl' => 'ttl', 'fore' => 'fore', 'initials' => 'initials', - 'sur' => 'sur' + 'sur' => 'sur', + 'ttl' => 'ttl' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'ttl' => 'setTtl', 'fore' => 'setFore', 'initials' => 'setInitials', - 'sur' => 'setSur' + 'sur' => 'setSur', + 'ttl' => 'setTtl' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'ttl' => 'getTtl', 'fore' => 'getFore', 'initials' => 'getInitials', - 'sur' => 'getSur' + 'sur' => 'getSur', + 'ttl' => 'getTtl' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('ttl', $data ?? [], null); $this->setIfExists('fore', $data ?? [], null); $this->setIfExists('initials', $data ?? [], null); $this->setIfExists('sur', $data ?? [], null); + $this->setIfExists('ttl', $data ?? [], null); } /** @@ -309,40 +309,6 @@ public function valid(): bool } - /** - * Gets ttl - * - * @return string|null - */ - public function getTtl(): ?string - { - return $this->container['ttl']; - } - - /** - * Sets ttl - * - * @param string|null $ttl ttl - * - * @return $this - */ - public function setTtl(?string $ttl): static - { - if (is_null($ttl)) { - array_push($this->openAPINullablesSetToNull, 'ttl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('ttl', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['ttl'] = $ttl; - - return $this; - } - /** * Gets fore * @@ -444,6 +410,40 @@ public function setSur(?string $sur): static return $this; } + + /** + * Gets ttl + * + * @return string|null + */ + public function getTtl(): ?string + { + return $this->container['ttl']; + } + + /** + * Sets ttl + * + * @param string|null $ttl ttl + * + * @return $this + */ + public function setTtl(?string $ttl): static + { + if (is_null($ttl)) { + array_push($this->openAPINullablesSetToNull, 'ttl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('ttl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['ttl'] = $ttl; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractRtiSubmissionSettingsRequest.php b/src/Model/ContractRtiSubmissionSettingsRequest.php index 32c917c..ed6b456 100644 --- a/src/Model/ContractRtiSubmissionSettingsRequest.php +++ b/src/Model/ContractRtiSubmissionSettingsRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,20 +59,21 @@ class ContractRtiSubmissionSettingsRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'senderType' => '\SynergiTech\Staffology\Model\RtiSenderType', - 'senderId' => 'string', - 'password' => 'string', + 'agent' => '\SynergiTech\Staffology\Model\ContractRtiAgentRequest', + 'allowLinkedEps' => 'bool', + 'autoSubmitEps' => 'bool', + 'autoSubmitFps' => 'bool', + 'contact' => '\SynergiTech\Staffology\Model\ContractRtiContactRequest', 'excludeNilPaid' => 'bool', + 'id' => 'string', 'includeHashCrossRef' => 'bool', - 'autoSubmitFps' => 'bool', - 'testInLive' => 'bool', - 'useTestGateway' => 'bool', 'overrideTimestampValue' => 'string', - 'contact' => '\SynergiTech\Staffology\Model\ContractRtiContactRequest', - 'agent' => '\SynergiTech\Staffology\Model\ContractRtiAgentRequest', - 'allowLinkedEps' => 'bool', - 'shouldCompressFps' => 'bool' + 'password' => 'string', + 'senderId' => 'string', + 'senderType' => '\SynergiTech\Staffology\Model\RtiSenderType', + 'shouldCompressFps' => 'bool', + 'testInLive' => 'bool', + 'useTestGateway' => 'bool' ]; /** @@ -81,20 +82,21 @@ class ContractRtiSubmissionSettingsRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'senderType' => null, - 'senderId' => null, - 'password' => null, + 'agent' => null, + 'allowLinkedEps' => null, + 'autoSubmitEps' => null, + 'autoSubmitFps' => null, + 'contact' => null, 'excludeNilPaid' => null, + 'id' => 'uuid', 'includeHashCrossRef' => null, - 'autoSubmitFps' => null, - 'testInLive' => null, - 'useTestGateway' => null, 'overrideTimestampValue' => null, - 'contact' => null, - 'agent' => null, - 'allowLinkedEps' => null, - 'shouldCompressFps' => null + 'password' => null, + 'senderId' => null, + 'senderType' => null, + 'shouldCompressFps' => null, + 'testInLive' => null, + 'useTestGateway' => null ]; /** @@ -103,20 +105,21 @@ class ContractRtiSubmissionSettingsRequest implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'senderType' => false, - 'senderId' => true, - 'password' => true, + 'agent' => false, + 'allowLinkedEps' => false, + 'autoSubmitEps' => false, + 'autoSubmitFps' => false, + 'contact' => false, 'excludeNilPaid' => false, + 'id' => false, 'includeHashCrossRef' => false, - 'autoSubmitFps' => false, - 'testInLive' => false, - 'useTestGateway' => false, 'overrideTimestampValue' => true, - 'contact' => false, - 'agent' => false, - 'allowLinkedEps' => false, - 'shouldCompressFps' => false + 'password' => true, + 'senderId' => true, + 'senderType' => false, + 'shouldCompressFps' => false, + 'testInLive' => false, + 'useTestGateway' => false ]; /** @@ -205,20 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'senderType' => 'senderType', - 'senderId' => 'senderId', - 'password' => 'password', + 'agent' => 'agent', + 'allowLinkedEps' => 'allowLinkedEps', + 'autoSubmitEps' => 'autoSubmitEps', + 'autoSubmitFps' => 'autoSubmitFps', + 'contact' => 'contact', 'excludeNilPaid' => 'excludeNilPaid', + 'id' => 'id', 'includeHashCrossRef' => 'includeHashCrossRef', - 'autoSubmitFps' => 'autoSubmitFps', - 'testInLive' => 'testInLive', - 'useTestGateway' => 'useTestGateway', 'overrideTimestampValue' => 'overrideTimestampValue', - 'contact' => 'contact', - 'agent' => 'agent', - 'allowLinkedEps' => 'allowLinkedEps', - 'shouldCompressFps' => 'shouldCompressFps' + 'password' => 'password', + 'senderId' => 'senderId', + 'senderType' => 'senderType', + 'shouldCompressFps' => 'shouldCompressFps', + 'testInLive' => 'testInLive', + 'useTestGateway' => 'useTestGateway' ]; /** @@ -227,20 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'senderType' => 'setSenderType', - 'senderId' => 'setSenderId', - 'password' => 'setPassword', + 'agent' => 'setAgent', + 'allowLinkedEps' => 'setAllowLinkedEps', + 'autoSubmitEps' => 'setAutoSubmitEps', + 'autoSubmitFps' => 'setAutoSubmitFps', + 'contact' => 'setContact', 'excludeNilPaid' => 'setExcludeNilPaid', + 'id' => 'setId', 'includeHashCrossRef' => 'setIncludeHashCrossRef', - 'autoSubmitFps' => 'setAutoSubmitFps', - 'testInLive' => 'setTestInLive', - 'useTestGateway' => 'setUseTestGateway', 'overrideTimestampValue' => 'setOverrideTimestampValue', - 'contact' => 'setContact', - 'agent' => 'setAgent', - 'allowLinkedEps' => 'setAllowLinkedEps', - 'shouldCompressFps' => 'setShouldCompressFps' + 'password' => 'setPassword', + 'senderId' => 'setSenderId', + 'senderType' => 'setSenderType', + 'shouldCompressFps' => 'setShouldCompressFps', + 'testInLive' => 'setTestInLive', + 'useTestGateway' => 'setUseTestGateway' ]; /** @@ -249,20 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'senderType' => 'getSenderType', - 'senderId' => 'getSenderId', - 'password' => 'getPassword', + 'agent' => 'getAgent', + 'allowLinkedEps' => 'getAllowLinkedEps', + 'autoSubmitEps' => 'getAutoSubmitEps', + 'autoSubmitFps' => 'getAutoSubmitFps', + 'contact' => 'getContact', 'excludeNilPaid' => 'getExcludeNilPaid', + 'id' => 'getId', 'includeHashCrossRef' => 'getIncludeHashCrossRef', - 'autoSubmitFps' => 'getAutoSubmitFps', - 'testInLive' => 'getTestInLive', - 'useTestGateway' => 'getUseTestGateway', 'overrideTimestampValue' => 'getOverrideTimestampValue', - 'contact' => 'getContact', - 'agent' => 'getAgent', - 'allowLinkedEps' => 'getAllowLinkedEps', - 'shouldCompressFps' => 'getShouldCompressFps' + 'password' => 'getPassword', + 'senderId' => 'getSenderId', + 'senderType' => 'getSenderType', + 'shouldCompressFps' => 'getShouldCompressFps', + 'testInLive' => 'getTestInLive', + 'useTestGateway' => 'getUseTestGateway' ]; /** @@ -321,20 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('senderType', $data ?? [], null); - $this->setIfExists('senderId', $data ?? [], null); - $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('agent', $data ?? [], null); + $this->setIfExists('allowLinkedEps', $data ?? [], null); + $this->setIfExists('autoSubmitEps', $data ?? [], null); + $this->setIfExists('autoSubmitFps', $data ?? [], null); + $this->setIfExists('contact', $data ?? [], null); $this->setIfExists('excludeNilPaid', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('includeHashCrossRef', $data ?? [], null); - $this->setIfExists('autoSubmitFps', $data ?? [], null); - $this->setIfExists('testInLive', $data ?? [], null); - $this->setIfExists('useTestGateway', $data ?? [], null); $this->setIfExists('overrideTimestampValue', $data ?? [], null); - $this->setIfExists('contact', $data ?? [], null); - $this->setIfExists('agent', $data ?? [], null); - $this->setIfExists('allowLinkedEps', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('senderId', $data ?? [], null); + $this->setIfExists('senderType', $data ?? [], null); $this->setIfExists('shouldCompressFps', $data ?? [], null); + $this->setIfExists('testInLive', $data ?? [], null); + $this->setIfExists('useTestGateway', $data ?? [], null); } /** @@ -380,123 +387,136 @@ public function valid(): bool /** - * Gets id + * Gets agent * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractRtiAgentRequest|null */ - public function getId(): ?string + public function getAgent(): ?\SynergiTech\Staffology\Model\ContractRtiAgentRequest { - return $this->container['id']; + return $this->container['agent']; } /** - * Sets id + * Sets agent * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\ContractRtiAgentRequest|null $agent agent * * @return $this */ - public function setId(?string $id): static + public function setAgent(?\SynergiTech\Staffology\Model\ContractRtiAgentRequest $agent): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($agent)) { + throw new InvalidArgumentException('non-nullable agent cannot be null'); } - $this->container['id'] = $id; + $this->container['agent'] = $agent; return $this; } /** - * Gets senderType + * Gets allowLinkedEps * - * @return \SynergiTech\Staffology\Model\RtiSenderType|null + * @return bool|null */ - public function getSenderType(): ?\SynergiTech\Staffology\Model\RtiSenderType + public function getAllowLinkedEps(): ?bool { - return $this->container['senderType']; + return $this->container['allowLinkedEps']; } /** - * Sets senderType + * Sets allowLinkedEps * - * @param \SynergiTech\Staffology\Model\RtiSenderType|null $senderType senderType + * @param bool|null $allowLinkedEps If set to true this will allow you to submit a combined Employer Payment Summary * * @return $this */ - public function setSenderType(?\SynergiTech\Staffology\Model\RtiSenderType $senderType): static + public function setAllowLinkedEps(?bool $allowLinkedEps): static { - if (is_null($senderType)) { - throw new InvalidArgumentException('non-nullable senderType cannot be null'); + if (is_null($allowLinkedEps)) { + throw new InvalidArgumentException('non-nullable allowLinkedEps cannot be null'); } - $this->container['senderType'] = $senderType; + $this->container['allowLinkedEps'] = $allowLinkedEps; return $this; } /** - * Gets senderId + * Gets autoSubmitEps * - * @return string|null + * @return bool|null */ - public function getSenderId(): ?string + public function getAutoSubmitEps(): ?bool { - return $this->container['senderId']; + return $this->container['autoSubmitEps']; } /** - * Sets senderId + * Sets autoSubmitEps * - * @param string|null $senderId The SenderId used to submit RTI documents to HMRC + * @param bool|null $autoSubmitEps If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun * * @return $this */ - public function setSenderId(?string $senderId): static + public function setAutoSubmitEps(?bool $autoSubmitEps): static { - if (is_null($senderId)) { - array_push($this->openAPINullablesSetToNull, 'senderId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('senderId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($autoSubmitEps)) { + throw new InvalidArgumentException('non-nullable autoSubmitEps cannot be null'); } - $this->container['senderId'] = $senderId; + $this->container['autoSubmitEps'] = $autoSubmitEps; return $this; } /** - * Gets password + * Gets autoSubmitFps * - * @return string|null + * @return bool|null */ - public function getPassword(): ?string + public function getAutoSubmitFps(): ?bool { - return $this->container['password']; + return $this->container['autoSubmitFps']; } /** - * Sets password + * Sets autoSubmitFps * - * @param string|null $password The Password used to submit RTI documents to HMRC + * @param bool|null $autoSubmitFps If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun * * @return $this */ - public function setPassword(?string $password): static + public function setAutoSubmitFps(?bool $autoSubmitFps): static { - if (is_null($password)) { - array_push($this->openAPINullablesSetToNull, 'password'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('password', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($autoSubmitFps)) { + throw new InvalidArgumentException('non-nullable autoSubmitFps cannot be null'); } - $this->container['password'] = $password; + $this->container['autoSubmitFps'] = $autoSubmitFps; + + return $this; + } + + /** + * Gets contact + * + * @return \SynergiTech\Staffology\Model\ContractRtiContactRequest|null + */ + public function getContact(): ?\SynergiTech\Staffology\Model\ContractRtiContactRequest + { + return $this->container['contact']; + } + + /** + * Sets contact + * + * @param \SynergiTech\Staffology\Model\ContractRtiContactRequest|null $contact contact + * + * @return $this + */ + public function setContact(?\SynergiTech\Staffology\Model\ContractRtiContactRequest $contact): static + { + if (is_null($contact)) { + throw new InvalidArgumentException('non-nullable contact cannot be null'); + } + $this->container['contact'] = $contact; return $this; } @@ -529,251 +549,265 @@ public function setExcludeNilPaid(?bool $excludeNilPaid): static } /** - * Gets includeHashCrossRef + * Gets id * - * @return bool|null + * @return string|null */ - public function getIncludeHashCrossRef(): ?bool + public function getId(): ?string { - return $this->container['includeHashCrossRef']; + return $this->container['id']; } /** - * Sets includeHashCrossRef + * Sets id * - * @param bool|null $includeHashCrossRef [readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions This is automatically set to true if you use a bank payments CSV format that supports it or set to false if not + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setIncludeHashCrossRef(?bool $includeHashCrossRef): static + public function setId(?string $id): static { - if (is_null($includeHashCrossRef)) { - throw new InvalidArgumentException('non-nullable includeHashCrossRef cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['includeHashCrossRef'] = $includeHashCrossRef; + $this->container['id'] = $id; return $this; } /** - * Gets autoSubmitFps + * Gets includeHashCrossRef * * @return bool|null */ - public function getAutoSubmitFps(): ?bool + public function getIncludeHashCrossRef(): ?bool { - return $this->container['autoSubmitFps']; + return $this->container['includeHashCrossRef']; } /** - * Sets autoSubmitFps + * Sets includeHashCrossRef * - * @param bool|null $autoSubmitFps If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun + * @param bool|null $includeHashCrossRef [readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions This is automatically set to true if you use a bank payments CSV format that supports it or set to false if not * * @return $this */ - public function setAutoSubmitFps(?bool $autoSubmitFps): static + public function setIncludeHashCrossRef(?bool $includeHashCrossRef): static { - if (is_null($autoSubmitFps)) { - throw new InvalidArgumentException('non-nullable autoSubmitFps cannot be null'); + if (is_null($includeHashCrossRef)) { + throw new InvalidArgumentException('non-nullable includeHashCrossRef cannot be null'); } - $this->container['autoSubmitFps'] = $autoSubmitFps; + $this->container['includeHashCrossRef'] = $includeHashCrossRef; return $this; } /** - * Gets testInLive + * Gets overrideTimestampValue * - * @return bool|null + * @return string|null */ - public function getTestInLive(): ?bool + public function getOverrideTimestampValue(): ?string { - return $this->container['testInLive']; + return $this->container['overrideTimestampValue']; } /** - * Sets testInLive + * Sets overrideTimestampValue * - * @param bool|null $testInLive Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it + * @param string|null $overrideTimestampValue If a value is provided then it will be used as the timestamp on the RTI submission. This would normally only be used for testing purposes. * * @return $this */ - public function setTestInLive(?bool $testInLive): static + public function setOverrideTimestampValue(?string $overrideTimestampValue): static { - if (is_null($testInLive)) { - throw new InvalidArgumentException('non-nullable testInLive cannot be null'); + if (is_null($overrideTimestampValue)) { + array_push($this->openAPINullablesSetToNull, 'overrideTimestampValue'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('overrideTimestampValue', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['testInLive'] = $testInLive; + $this->container['overrideTimestampValue'] = $overrideTimestampValue; return $this; } /** - * Gets useTestGateway + * Gets password * - * @return bool|null + * @return string|null */ - public function getUseTestGateway(): ?bool + public function getPassword(): ?string { - return $this->container['useTestGateway']; + return $this->container['password']; } /** - * Sets useTestGateway + * Sets password * - * @param bool|null $useTestGateway If set to true then your RTI documents will be sent to HMRCs test services instead of the live service + * @param string|null $password The Password used to submit RTI documents to HMRC * * @return $this */ - public function setUseTestGateway(?bool $useTestGateway): static + public function setPassword(?string $password): static { - if (is_null($useTestGateway)) { - throw new InvalidArgumentException('non-nullable useTestGateway cannot be null'); + if (is_null($password)) { + array_push($this->openAPINullablesSetToNull, 'password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useTestGateway'] = $useTestGateway; + $this->container['password'] = $password; return $this; } /** - * Gets overrideTimestampValue + * Gets senderId * * @return string|null */ - public function getOverrideTimestampValue(): ?string + public function getSenderId(): ?string { - return $this->container['overrideTimestampValue']; + return $this->container['senderId']; } /** - * Sets overrideTimestampValue + * Sets senderId * - * @param string|null $overrideTimestampValue If a value is provided then it will be used as the timestamp on the RTI submission. This would normally only be used for testing purposes. + * @param string|null $senderId The SenderId used to submit RTI documents to HMRC * * @return $this */ - public function setOverrideTimestampValue(?string $overrideTimestampValue): static + public function setSenderId(?string $senderId): static { - if (is_null($overrideTimestampValue)) { - array_push($this->openAPINullablesSetToNull, 'overrideTimestampValue'); + if (is_null($senderId)) { + array_push($this->openAPINullablesSetToNull, 'senderId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('overrideTimestampValue', $nullablesSetToNull); + $index = array_search('senderId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['overrideTimestampValue'] = $overrideTimestampValue; + $this->container['senderId'] = $senderId; return $this; } /** - * Gets contact + * Gets senderType * - * @return \SynergiTech\Staffology\Model\ContractRtiContactRequest|null + * @return \SynergiTech\Staffology\Model\RtiSenderType|null */ - public function getContact(): ?\SynergiTech\Staffology\Model\ContractRtiContactRequest + public function getSenderType(): ?\SynergiTech\Staffology\Model\RtiSenderType { - return $this->container['contact']; + return $this->container['senderType']; } /** - * Sets contact + * Sets senderType * - * @param \SynergiTech\Staffology\Model\ContractRtiContactRequest|null $contact contact + * @param \SynergiTech\Staffology\Model\RtiSenderType|null $senderType senderType * * @return $this */ - public function setContact(?\SynergiTech\Staffology\Model\ContractRtiContactRequest $contact): static + public function setSenderType(?\SynergiTech\Staffology\Model\RtiSenderType $senderType): static { - if (is_null($contact)) { - throw new InvalidArgumentException('non-nullable contact cannot be null'); + if (is_null($senderType)) { + throw new InvalidArgumentException('non-nullable senderType cannot be null'); } - $this->container['contact'] = $contact; + $this->container['senderType'] = $senderType; return $this; } /** - * Gets agent + * Gets shouldCompressFps * - * @return \SynergiTech\Staffology\Model\ContractRtiAgentRequest|null + * @return bool|null */ - public function getAgent(): ?\SynergiTech\Staffology\Model\ContractRtiAgentRequest + public function getShouldCompressFps(): ?bool { - return $this->container['agent']; + return $this->container['shouldCompressFps']; } /** - * Sets agent + * Sets shouldCompressFps * - * @param \SynergiTech\Staffology\Model\ContractRtiAgentRequest|null $agent agent + * @param bool|null $shouldCompressFps If set to true this will compress the FPS before submitting to HMRC * * @return $this */ - public function setAgent(?\SynergiTech\Staffology\Model\ContractRtiAgentRequest $agent): static + public function setShouldCompressFps(?bool $shouldCompressFps): static { - if (is_null($agent)) { - throw new InvalidArgumentException('non-nullable agent cannot be null'); + if (is_null($shouldCompressFps)) { + throw new InvalidArgumentException('non-nullable shouldCompressFps cannot be null'); } - $this->container['agent'] = $agent; + $this->container['shouldCompressFps'] = $shouldCompressFps; return $this; } /** - * Gets allowLinkedEps + * Gets testInLive * * @return bool|null */ - public function getAllowLinkedEps(): ?bool + public function getTestInLive(): ?bool { - return $this->container['allowLinkedEps']; + return $this->container['testInLive']; } /** - * Sets allowLinkedEps + * Sets testInLive * - * @param bool|null $allowLinkedEps If set to true this will allow you to submit a combined Employer Payment Summary + * @param bool|null $testInLive Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it * * @return $this */ - public function setAllowLinkedEps(?bool $allowLinkedEps): static + public function setTestInLive(?bool $testInLive): static { - if (is_null($allowLinkedEps)) { - throw new InvalidArgumentException('non-nullable allowLinkedEps cannot be null'); + if (is_null($testInLive)) { + throw new InvalidArgumentException('non-nullable testInLive cannot be null'); } - $this->container['allowLinkedEps'] = $allowLinkedEps; + $this->container['testInLive'] = $testInLive; return $this; } /** - * Gets shouldCompressFps + * Gets useTestGateway * * @return bool|null */ - public function getShouldCompressFps(): ?bool + public function getUseTestGateway(): ?bool { - return $this->container['shouldCompressFps']; + return $this->container['useTestGateway']; } /** - * Sets shouldCompressFps + * Sets useTestGateway * - * @param bool|null $shouldCompressFps If set to true this will compress the FPS before submitting to HMRC + * @param bool|null $useTestGateway If set to true then your RTI documents will be sent to HMRCs test services instead of the live service * * @return $this */ - public function setShouldCompressFps(?bool $shouldCompressFps): static + public function setUseTestGateway(?bool $useTestGateway): static { - if (is_null($shouldCompressFps)) { - throw new InvalidArgumentException('non-nullable shouldCompressFps cannot be null'); + if (is_null($useTestGateway)) { + throw new InvalidArgumentException('non-nullable useTestGateway cannot be null'); } - $this->container['shouldCompressFps'] = $shouldCompressFps; + $this->container['useTestGateway'] = $useTestGateway; return $this; } diff --git a/src/Model/ContractRtiSubmissionSettingsResponse.php b/src/Model/ContractRtiSubmissionSettingsResponse.php index 16d53d0..5d15822 100644 --- a/src/Model/ContractRtiSubmissionSettingsResponse.php +++ b/src/Model/ContractRtiSubmissionSettingsResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,20 +59,21 @@ class ContractRtiSubmissionSettingsResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'senderType' => '\SynergiTech\Staffology\Model\RtiSenderType', - 'senderId' => 'string', - 'password' => 'string', + 'agent' => '\SynergiTech\Staffology\Model\ContractRtiAgentResponse', + 'allowLinkedEps' => 'bool', + 'autoSubmitEps' => 'bool', + 'autoSubmitFps' => 'bool', + 'contact' => '\SynergiTech\Staffology\Model\ContractRtiContactResponse', 'excludeNilPaid' => 'bool', + 'id' => 'string', 'includeHashCrossRef' => 'bool', - 'autoSubmitFps' => 'bool', - 'testInLive' => 'bool', - 'useTestGateway' => 'bool', 'overrideTimestampValue' => 'string', - 'contact' => '\SynergiTech\Staffology\Model\ContractRtiContactResponse', - 'agent' => '\SynergiTech\Staffology\Model\ContractRtiAgentResponse', - 'allowLinkedEps' => 'bool', - 'shouldCompressFps' => 'bool' + 'password' => 'string', + 'senderId' => 'string', + 'senderType' => '\SynergiTech\Staffology\Model\RtiSenderType', + 'shouldCompressFps' => 'bool', + 'testInLive' => 'bool', + 'useTestGateway' => 'bool' ]; /** @@ -81,20 +82,21 @@ class ContractRtiSubmissionSettingsResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'senderType' => null, - 'senderId' => null, - 'password' => null, + 'agent' => null, + 'allowLinkedEps' => null, + 'autoSubmitEps' => null, + 'autoSubmitFps' => null, + 'contact' => null, 'excludeNilPaid' => null, + 'id' => 'uuid', 'includeHashCrossRef' => null, - 'autoSubmitFps' => null, - 'testInLive' => null, - 'useTestGateway' => null, 'overrideTimestampValue' => null, - 'contact' => null, - 'agent' => null, - 'allowLinkedEps' => null, - 'shouldCompressFps' => null + 'password' => null, + 'senderId' => null, + 'senderType' => null, + 'shouldCompressFps' => null, + 'testInLive' => null, + 'useTestGateway' => null ]; /** @@ -103,20 +105,21 @@ class ContractRtiSubmissionSettingsResponse implements ModelInterface, ArrayAcce * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'senderType' => false, - 'senderId' => true, - 'password' => true, + 'agent' => false, + 'allowLinkedEps' => false, + 'autoSubmitEps' => false, + 'autoSubmitFps' => false, + 'contact' => false, 'excludeNilPaid' => false, + 'id' => false, 'includeHashCrossRef' => false, - 'autoSubmitFps' => false, - 'testInLive' => false, - 'useTestGateway' => false, 'overrideTimestampValue' => true, - 'contact' => false, - 'agent' => false, - 'allowLinkedEps' => false, - 'shouldCompressFps' => false + 'password' => true, + 'senderId' => true, + 'senderType' => false, + 'shouldCompressFps' => false, + 'testInLive' => false, + 'useTestGateway' => false ]; /** @@ -205,20 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'senderType' => 'senderType', - 'senderId' => 'senderId', - 'password' => 'password', + 'agent' => 'agent', + 'allowLinkedEps' => 'allowLinkedEps', + 'autoSubmitEps' => 'autoSubmitEps', + 'autoSubmitFps' => 'autoSubmitFps', + 'contact' => 'contact', 'excludeNilPaid' => 'excludeNilPaid', + 'id' => 'id', 'includeHashCrossRef' => 'includeHashCrossRef', - 'autoSubmitFps' => 'autoSubmitFps', - 'testInLive' => 'testInLive', - 'useTestGateway' => 'useTestGateway', 'overrideTimestampValue' => 'overrideTimestampValue', - 'contact' => 'contact', - 'agent' => 'agent', - 'allowLinkedEps' => 'allowLinkedEps', - 'shouldCompressFps' => 'shouldCompressFps' + 'password' => 'password', + 'senderId' => 'senderId', + 'senderType' => 'senderType', + 'shouldCompressFps' => 'shouldCompressFps', + 'testInLive' => 'testInLive', + 'useTestGateway' => 'useTestGateway' ]; /** @@ -227,20 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'senderType' => 'setSenderType', - 'senderId' => 'setSenderId', - 'password' => 'setPassword', + 'agent' => 'setAgent', + 'allowLinkedEps' => 'setAllowLinkedEps', + 'autoSubmitEps' => 'setAutoSubmitEps', + 'autoSubmitFps' => 'setAutoSubmitFps', + 'contact' => 'setContact', 'excludeNilPaid' => 'setExcludeNilPaid', + 'id' => 'setId', 'includeHashCrossRef' => 'setIncludeHashCrossRef', - 'autoSubmitFps' => 'setAutoSubmitFps', - 'testInLive' => 'setTestInLive', - 'useTestGateway' => 'setUseTestGateway', 'overrideTimestampValue' => 'setOverrideTimestampValue', - 'contact' => 'setContact', - 'agent' => 'setAgent', - 'allowLinkedEps' => 'setAllowLinkedEps', - 'shouldCompressFps' => 'setShouldCompressFps' + 'password' => 'setPassword', + 'senderId' => 'setSenderId', + 'senderType' => 'setSenderType', + 'shouldCompressFps' => 'setShouldCompressFps', + 'testInLive' => 'setTestInLive', + 'useTestGateway' => 'setUseTestGateway' ]; /** @@ -249,20 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'senderType' => 'getSenderType', - 'senderId' => 'getSenderId', - 'password' => 'getPassword', + 'agent' => 'getAgent', + 'allowLinkedEps' => 'getAllowLinkedEps', + 'autoSubmitEps' => 'getAutoSubmitEps', + 'autoSubmitFps' => 'getAutoSubmitFps', + 'contact' => 'getContact', 'excludeNilPaid' => 'getExcludeNilPaid', + 'id' => 'getId', 'includeHashCrossRef' => 'getIncludeHashCrossRef', - 'autoSubmitFps' => 'getAutoSubmitFps', - 'testInLive' => 'getTestInLive', - 'useTestGateway' => 'getUseTestGateway', 'overrideTimestampValue' => 'getOverrideTimestampValue', - 'contact' => 'getContact', - 'agent' => 'getAgent', - 'allowLinkedEps' => 'getAllowLinkedEps', - 'shouldCompressFps' => 'getShouldCompressFps' + 'password' => 'getPassword', + 'senderId' => 'getSenderId', + 'senderType' => 'getSenderType', + 'shouldCompressFps' => 'getShouldCompressFps', + 'testInLive' => 'getTestInLive', + 'useTestGateway' => 'getUseTestGateway' ]; /** @@ -321,20 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('senderType', $data ?? [], null); - $this->setIfExists('senderId', $data ?? [], null); - $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('agent', $data ?? [], null); + $this->setIfExists('allowLinkedEps', $data ?? [], null); + $this->setIfExists('autoSubmitEps', $data ?? [], null); + $this->setIfExists('autoSubmitFps', $data ?? [], null); + $this->setIfExists('contact', $data ?? [], null); $this->setIfExists('excludeNilPaid', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('includeHashCrossRef', $data ?? [], null); - $this->setIfExists('autoSubmitFps', $data ?? [], null); - $this->setIfExists('testInLive', $data ?? [], null); - $this->setIfExists('useTestGateway', $data ?? [], null); $this->setIfExists('overrideTimestampValue', $data ?? [], null); - $this->setIfExists('contact', $data ?? [], null); - $this->setIfExists('agent', $data ?? [], null); - $this->setIfExists('allowLinkedEps', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('senderId', $data ?? [], null); + $this->setIfExists('senderType', $data ?? [], null); $this->setIfExists('shouldCompressFps', $data ?? [], null); + $this->setIfExists('testInLive', $data ?? [], null); + $this->setIfExists('useTestGateway', $data ?? [], null); } /** @@ -380,123 +387,136 @@ public function valid(): bool /** - * Gets id + * Gets agent * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractRtiAgentResponse|null */ - public function getId(): ?string + public function getAgent(): ?\SynergiTech\Staffology\Model\ContractRtiAgentResponse { - return $this->container['id']; + return $this->container['agent']; } /** - * Sets id + * Sets agent * - * @param string|null $id id + * @param \SynergiTech\Staffology\Model\ContractRtiAgentResponse|null $agent agent * * @return $this */ - public function setId(?string $id): static + public function setAgent(?\SynergiTech\Staffology\Model\ContractRtiAgentResponse $agent): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($agent)) { + throw new InvalidArgumentException('non-nullable agent cannot be null'); } - $this->container['id'] = $id; + $this->container['agent'] = $agent; return $this; } /** - * Gets senderType + * Gets allowLinkedEps * - * @return \SynergiTech\Staffology\Model\RtiSenderType|null + * @return bool|null */ - public function getSenderType(): ?\SynergiTech\Staffology\Model\RtiSenderType + public function getAllowLinkedEps(): ?bool { - return $this->container['senderType']; + return $this->container['allowLinkedEps']; } /** - * Sets senderType + * Sets allowLinkedEps * - * @param \SynergiTech\Staffology\Model\RtiSenderType|null $senderType senderType + * @param bool|null $allowLinkedEps If set to true this will allow you to submit a combined Employer Payment Summary * * @return $this */ - public function setSenderType(?\SynergiTech\Staffology\Model\RtiSenderType $senderType): static + public function setAllowLinkedEps(?bool $allowLinkedEps): static { - if (is_null($senderType)) { - throw new InvalidArgumentException('non-nullable senderType cannot be null'); + if (is_null($allowLinkedEps)) { + throw new InvalidArgumentException('non-nullable allowLinkedEps cannot be null'); } - $this->container['senderType'] = $senderType; + $this->container['allowLinkedEps'] = $allowLinkedEps; return $this; } /** - * Gets senderId + * Gets autoSubmitEps * - * @return string|null + * @return bool|null */ - public function getSenderId(): ?string + public function getAutoSubmitEps(): ?bool { - return $this->container['senderId']; + return $this->container['autoSubmitEps']; } /** - * Sets senderId + * Sets autoSubmitEps * - * @param string|null $senderId The SenderId used to submit RTI documents to HMRC + * @param bool|null $autoSubmitEps If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun * * @return $this */ - public function setSenderId(?string $senderId): static + public function setAutoSubmitEps(?bool $autoSubmitEps): static { - if (is_null($senderId)) { - array_push($this->openAPINullablesSetToNull, 'senderId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('senderId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($autoSubmitEps)) { + throw new InvalidArgumentException('non-nullable autoSubmitEps cannot be null'); } - $this->container['senderId'] = $senderId; + $this->container['autoSubmitEps'] = $autoSubmitEps; return $this; } /** - * Gets password + * Gets autoSubmitFps * - * @return string|null + * @return bool|null */ - public function getPassword(): ?string + public function getAutoSubmitFps(): ?bool { - return $this->container['password']; + return $this->container['autoSubmitFps']; } /** - * Sets password + * Sets autoSubmitFps * - * @param string|null $password The Password used to submit RTI documents to HMRC + * @param bool|null $autoSubmitFps If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun * * @return $this */ - public function setPassword(?string $password): static + public function setAutoSubmitFps(?bool $autoSubmitFps): static { - if (is_null($password)) { - array_push($this->openAPINullablesSetToNull, 'password'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('password', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($autoSubmitFps)) { + throw new InvalidArgumentException('non-nullable autoSubmitFps cannot be null'); } - $this->container['password'] = $password; + $this->container['autoSubmitFps'] = $autoSubmitFps; + + return $this; + } + + /** + * Gets contact + * + * @return \SynergiTech\Staffology\Model\ContractRtiContactResponse|null + */ + public function getContact(): ?\SynergiTech\Staffology\Model\ContractRtiContactResponse + { + return $this->container['contact']; + } + + /** + * Sets contact + * + * @param \SynergiTech\Staffology\Model\ContractRtiContactResponse|null $contact contact + * + * @return $this + */ + public function setContact(?\SynergiTech\Staffology\Model\ContractRtiContactResponse $contact): static + { + if (is_null($contact)) { + throw new InvalidArgumentException('non-nullable contact cannot be null'); + } + $this->container['contact'] = $contact; return $this; } @@ -529,251 +549,265 @@ public function setExcludeNilPaid(?bool $excludeNilPaid): static } /** - * Gets includeHashCrossRef + * Gets id * - * @return bool|null + * @return string|null */ - public function getIncludeHashCrossRef(): ?bool + public function getId(): ?string { - return $this->container['includeHashCrossRef']; + return $this->container['id']; } /** - * Sets includeHashCrossRef + * Sets id * - * @param bool|null $includeHashCrossRef [readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions This is automatically set to true if you use a bank payments CSV format that supports it or set to false if not + * @param string|null $id id * * @return $this */ - public function setIncludeHashCrossRef(?bool $includeHashCrossRef): static + public function setId(?string $id): static { - if (is_null($includeHashCrossRef)) { - throw new InvalidArgumentException('non-nullable includeHashCrossRef cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['includeHashCrossRef'] = $includeHashCrossRef; + $this->container['id'] = $id; return $this; } /** - * Gets autoSubmitFps + * Gets includeHashCrossRef * * @return bool|null */ - public function getAutoSubmitFps(): ?bool + public function getIncludeHashCrossRef(): ?bool { - return $this->container['autoSubmitFps']; + return $this->container['includeHashCrossRef']; } /** - * Sets autoSubmitFps + * Sets includeHashCrossRef * - * @param bool|null $autoSubmitFps If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun + * @param bool|null $includeHashCrossRef [readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions This is automatically set to true if you use a bank payments CSV format that supports it or set to false if not * * @return $this */ - public function setAutoSubmitFps(?bool $autoSubmitFps): static + public function setIncludeHashCrossRef(?bool $includeHashCrossRef): static { - if (is_null($autoSubmitFps)) { - throw new InvalidArgumentException('non-nullable autoSubmitFps cannot be null'); + if (is_null($includeHashCrossRef)) { + throw new InvalidArgumentException('non-nullable includeHashCrossRef cannot be null'); } - $this->container['autoSubmitFps'] = $autoSubmitFps; + $this->container['includeHashCrossRef'] = $includeHashCrossRef; return $this; } /** - * Gets testInLive + * Gets overrideTimestampValue * - * @return bool|null + * @return string|null */ - public function getTestInLive(): ?bool + public function getOverrideTimestampValue(): ?string { - return $this->container['testInLive']; + return $this->container['overrideTimestampValue']; } /** - * Sets testInLive + * Sets overrideTimestampValue * - * @param bool|null $testInLive Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it + * @param string|null $overrideTimestampValue If a value is provided then it will be used as the timestamp on the RTI submission. This would normally only be used for testing purposes. * * @return $this */ - public function setTestInLive(?bool $testInLive): static + public function setOverrideTimestampValue(?string $overrideTimestampValue): static { - if (is_null($testInLive)) { - throw new InvalidArgumentException('non-nullable testInLive cannot be null'); + if (is_null($overrideTimestampValue)) { + array_push($this->openAPINullablesSetToNull, 'overrideTimestampValue'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('overrideTimestampValue', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['testInLive'] = $testInLive; + $this->container['overrideTimestampValue'] = $overrideTimestampValue; return $this; } /** - * Gets useTestGateway + * Gets password * - * @return bool|null + * @return string|null */ - public function getUseTestGateway(): ?bool + public function getPassword(): ?string { - return $this->container['useTestGateway']; + return $this->container['password']; } /** - * Sets useTestGateway + * Sets password * - * @param bool|null $useTestGateway If set to true then your RTI documents will be sent to HMRCs test services instead of the live service + * @param string|null $password The Password used to submit RTI documents to HMRC * * @return $this */ - public function setUseTestGateway(?bool $useTestGateway): static + public function setPassword(?string $password): static { - if (is_null($useTestGateway)) { - throw new InvalidArgumentException('non-nullable useTestGateway cannot be null'); + if (is_null($password)) { + array_push($this->openAPINullablesSetToNull, 'password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useTestGateway'] = $useTestGateway; + $this->container['password'] = $password; return $this; } /** - * Gets overrideTimestampValue + * Gets senderId * * @return string|null */ - public function getOverrideTimestampValue(): ?string + public function getSenderId(): ?string { - return $this->container['overrideTimestampValue']; + return $this->container['senderId']; } /** - * Sets overrideTimestampValue + * Sets senderId * - * @param string|null $overrideTimestampValue If a value is provided then it will be used as the timestamp on the RTI submission. This would normally only be used for testing purposes. + * @param string|null $senderId The SenderId used to submit RTI documents to HMRC * * @return $this */ - public function setOverrideTimestampValue(?string $overrideTimestampValue): static + public function setSenderId(?string $senderId): static { - if (is_null($overrideTimestampValue)) { - array_push($this->openAPINullablesSetToNull, 'overrideTimestampValue'); + if (is_null($senderId)) { + array_push($this->openAPINullablesSetToNull, 'senderId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('overrideTimestampValue', $nullablesSetToNull); + $index = array_search('senderId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['overrideTimestampValue'] = $overrideTimestampValue; + $this->container['senderId'] = $senderId; return $this; } /** - * Gets contact + * Gets senderType * - * @return \SynergiTech\Staffology\Model\ContractRtiContactResponse|null + * @return \SynergiTech\Staffology\Model\RtiSenderType|null */ - public function getContact(): ?\SynergiTech\Staffology\Model\ContractRtiContactResponse + public function getSenderType(): ?\SynergiTech\Staffology\Model\RtiSenderType { - return $this->container['contact']; + return $this->container['senderType']; } /** - * Sets contact + * Sets senderType * - * @param \SynergiTech\Staffology\Model\ContractRtiContactResponse|null $contact contact + * @param \SynergiTech\Staffology\Model\RtiSenderType|null $senderType senderType * * @return $this */ - public function setContact(?\SynergiTech\Staffology\Model\ContractRtiContactResponse $contact): static + public function setSenderType(?\SynergiTech\Staffology\Model\RtiSenderType $senderType): static { - if (is_null($contact)) { - throw new InvalidArgumentException('non-nullable contact cannot be null'); + if (is_null($senderType)) { + throw new InvalidArgumentException('non-nullable senderType cannot be null'); } - $this->container['contact'] = $contact; + $this->container['senderType'] = $senderType; return $this; } /** - * Gets agent + * Gets shouldCompressFps * - * @return \SynergiTech\Staffology\Model\ContractRtiAgentResponse|null + * @return bool|null */ - public function getAgent(): ?\SynergiTech\Staffology\Model\ContractRtiAgentResponse + public function getShouldCompressFps(): ?bool { - return $this->container['agent']; + return $this->container['shouldCompressFps']; } /** - * Sets agent + * Sets shouldCompressFps * - * @param \SynergiTech\Staffology\Model\ContractRtiAgentResponse|null $agent agent + * @param bool|null $shouldCompressFps If set to true this will compress the FPS before submitting to HMRC * * @return $this */ - public function setAgent(?\SynergiTech\Staffology\Model\ContractRtiAgentResponse $agent): static + public function setShouldCompressFps(?bool $shouldCompressFps): static { - if (is_null($agent)) { - throw new InvalidArgumentException('non-nullable agent cannot be null'); + if (is_null($shouldCompressFps)) { + throw new InvalidArgumentException('non-nullable shouldCompressFps cannot be null'); } - $this->container['agent'] = $agent; + $this->container['shouldCompressFps'] = $shouldCompressFps; return $this; } /** - * Gets allowLinkedEps + * Gets testInLive * * @return bool|null */ - public function getAllowLinkedEps(): ?bool + public function getTestInLive(): ?bool { - return $this->container['allowLinkedEps']; + return $this->container['testInLive']; } /** - * Sets allowLinkedEps + * Sets testInLive * - * @param bool|null $allowLinkedEps If set to true this will allow you to submit a combined Employer Payment Summary + * @param bool|null $testInLive Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it * * @return $this */ - public function setAllowLinkedEps(?bool $allowLinkedEps): static + public function setTestInLive(?bool $testInLive): static { - if (is_null($allowLinkedEps)) { - throw new InvalidArgumentException('non-nullable allowLinkedEps cannot be null'); + if (is_null($testInLive)) { + throw new InvalidArgumentException('non-nullable testInLive cannot be null'); } - $this->container['allowLinkedEps'] = $allowLinkedEps; + $this->container['testInLive'] = $testInLive; return $this; } /** - * Gets shouldCompressFps + * Gets useTestGateway * * @return bool|null */ - public function getShouldCompressFps(): ?bool + public function getUseTestGateway(): ?bool { - return $this->container['shouldCompressFps']; + return $this->container['useTestGateway']; } /** - * Sets shouldCompressFps + * Sets useTestGateway * - * @param bool|null $shouldCompressFps If set to true this will compress the FPS before submitting to HMRC + * @param bool|null $useTestGateway If set to true then your RTI documents will be sent to HMRCs test services instead of the live service * * @return $this */ - public function setShouldCompressFps(?bool $shouldCompressFps): static + public function setUseTestGateway(?bool $useTestGateway): static { - if (is_null($shouldCompressFps)) { - throw new InvalidArgumentException('non-nullable shouldCompressFps cannot be null'); + if (is_null($useTestGateway)) { + throw new InvalidArgumentException('non-nullable useTestGateway cannot be null'); } - $this->container['shouldCompressFps'] = $shouldCompressFps; + $this->container['useTestGateway'] = $useTestGateway; return $this; } diff --git a/src/Model/ContractSharedBankDetails.php b/src/Model/ContractSharedBankDetails.php new file mode 100644 index 0000000..8b917e4 --- /dev/null +++ b/src/Model/ContractSharedBankDetails.php @@ -0,0 +1,834 @@ + + */ +class ContractSharedBankDetails implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'Contract.SharedBankDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'accountName' => 'string', + 'accountNumber' => 'string', + 'bankBranch' => 'string', + 'bankName' => 'string', + 'bankReference' => 'string', + 'buildingSocietyRollNumber' => 'string', + 'countryOfBank' => '\SynergiTech\Staffology\Model\CountryCode', + 'iban' => 'string', + 'note' => 'string', + 'sortCode' => 'string', + 'swiftBic' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'accountName' => null, + 'accountNumber' => null, + 'bankBranch' => null, + 'bankName' => null, + 'bankReference' => null, + 'buildingSocietyRollNumber' => null, + 'countryOfBank' => null, + 'iban' => null, + 'note' => null, + 'sortCode' => null, + 'swiftBic' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'accountName' => true, + 'accountNumber' => true, + 'bankBranch' => true, + 'bankName' => true, + 'bankReference' => true, + 'buildingSocietyRollNumber' => true, + 'countryOfBank' => false, + 'iban' => true, + 'note' => true, + 'sortCode' => true, + 'swiftBic' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'accountName' => 'accountName', + 'accountNumber' => 'accountNumber', + 'bankBranch' => 'bankBranch', + 'bankName' => 'bankName', + 'bankReference' => 'bankReference', + 'buildingSocietyRollNumber' => 'buildingSocietyRollNumber', + 'countryOfBank' => 'countryOfBank', + 'iban' => 'iban', + 'note' => 'note', + 'sortCode' => 'sortCode', + 'swiftBic' => 'swift_Bic' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'accountName' => 'setAccountName', + 'accountNumber' => 'setAccountNumber', + 'bankBranch' => 'setBankBranch', + 'bankName' => 'setBankName', + 'bankReference' => 'setBankReference', + 'buildingSocietyRollNumber' => 'setBuildingSocietyRollNumber', + 'countryOfBank' => 'setCountryOfBank', + 'iban' => 'setIban', + 'note' => 'setNote', + 'sortCode' => 'setSortCode', + 'swiftBic' => 'setSwiftBic' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'accountName' => 'getAccountName', + 'accountNumber' => 'getAccountNumber', + 'bankBranch' => 'getBankBranch', + 'bankName' => 'getBankName', + 'bankReference' => 'getBankReference', + 'buildingSocietyRollNumber' => 'getBuildingSocietyRollNumber', + 'countryOfBank' => 'getCountryOfBank', + 'iban' => 'getIban', + 'note' => 'getNote', + 'sortCode' => 'getSortCode', + 'swiftBic' => 'getSwiftBic' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('accountName', $data ?? [], null); + $this->setIfExists('accountNumber', $data ?? [], null); + $this->setIfExists('bankBranch', $data ?? [], null); + $this->setIfExists('bankName', $data ?? [], null); + $this->setIfExists('bankReference', $data ?? [], null); + $this->setIfExists('buildingSocietyRollNumber', $data ?? [], null); + $this->setIfExists('countryOfBank', $data ?? [], null); + $this->setIfExists('iban', $data ?? [], null); + $this->setIfExists('note', $data ?? [], null); + $this->setIfExists('sortCode', $data ?? [], null); + $this->setIfExists('swiftBic', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['iban']) && (mb_strlen($this->container['iban']) > 34)) { + $invalidProperties[] = "invalid value for 'iban', the character length must be smaller than or equal to 34."; + } + + if (!is_null($this->container['swiftBic']) && (mb_strlen($this->container['swiftBic']) > 11)) { + $invalidProperties[] = "invalid value for 'swiftBic', the character length must be smaller than or equal to 11."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets accountName + * + * @return string|null + */ + public function getAccountName(): ?string + { + return $this->container['accountName']; + } + + /** + * Sets accountName + * + * @param string|null $accountName accountName + * + * @return $this + */ + public function setAccountName(?string $accountName): static + { + if (is_null($accountName)) { + array_push($this->openAPINullablesSetToNull, 'accountName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['accountName'] = $accountName; + + return $this; + } + + /** + * Gets accountNumber + * + * @return string|null + */ + public function getAccountNumber(): ?string + { + return $this->container['accountNumber']; + } + + /** + * Sets accountNumber + * + * @param string|null $accountNumber accountNumber + * + * @return $this + */ + public function setAccountNumber(?string $accountNumber): static + { + if (is_null($accountNumber)) { + array_push($this->openAPINullablesSetToNull, 'accountNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['accountNumber'] = $accountNumber; + + return $this; + } + + /** + * Gets bankBranch + * + * @return string|null + */ + public function getBankBranch(): ?string + { + return $this->container['bankBranch']; + } + + /** + * Sets bankBranch + * + * @param string|null $bankBranch bankBranch + * + * @return $this + */ + public function setBankBranch(?string $bankBranch): static + { + if (is_null($bankBranch)) { + array_push($this->openAPINullablesSetToNull, 'bankBranch'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bankBranch', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['bankBranch'] = $bankBranch; + + return $this; + } + + /** + * Gets bankName + * + * @return string|null + */ + public function getBankName(): ?string + { + return $this->container['bankName']; + } + + /** + * Sets bankName + * + * @param string|null $bankName bankName + * + * @return $this + */ + public function setBankName(?string $bankName): static + { + if (is_null($bankName)) { + array_push($this->openAPINullablesSetToNull, 'bankName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bankName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['bankName'] = $bankName; + + return $this; + } + + /** + * Gets bankReference + * + * @return string|null + */ + public function getBankReference(): ?string + { + return $this->container['bankReference']; + } + + /** + * Sets bankReference + * + * @param string|null $bankReference bankReference + * + * @return $this + */ + public function setBankReference(?string $bankReference): static + { + if (is_null($bankReference)) { + array_push($this->openAPINullablesSetToNull, 'bankReference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bankReference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['bankReference'] = $bankReference; + + return $this; + } + + /** + * Gets buildingSocietyRollNumber + * + * @return string|null + */ + public function getBuildingSocietyRollNumber(): ?string + { + return $this->container['buildingSocietyRollNumber']; + } + + /** + * Sets buildingSocietyRollNumber + * + * @param string|null $buildingSocietyRollNumber buildingSocietyRollNumber + * + * @return $this + */ + public function setBuildingSocietyRollNumber(?string $buildingSocietyRollNumber): static + { + if (is_null($buildingSocietyRollNumber)) { + array_push($this->openAPINullablesSetToNull, 'buildingSocietyRollNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('buildingSocietyRollNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['buildingSocietyRollNumber'] = $buildingSocietyRollNumber; + + return $this; + } + + /** + * Gets countryOfBank + * + * @return \SynergiTech\Staffology\Model\CountryCode|null + */ + public function getCountryOfBank(): ?\SynergiTech\Staffology\Model\CountryCode + { + return $this->container['countryOfBank']; + } + + /** + * Sets countryOfBank + * + * @param \SynergiTech\Staffology\Model\CountryCode|null $countryOfBank countryOfBank + * + * @return $this + */ + public function setCountryOfBank(?\SynergiTech\Staffology\Model\CountryCode $countryOfBank): static + { + if (is_null($countryOfBank)) { + throw new InvalidArgumentException('non-nullable countryOfBank cannot be null'); + } + $this->container['countryOfBank'] = $countryOfBank; + + return $this; + } + + /** + * Gets iban + * + * @return string|null + */ + public function getIban(): ?string + { + return $this->container['iban']; + } + + /** + * Sets iban + * + * @param string|null $iban iban + * + * @return $this + */ + public function setIban(?string $iban): static + { + if (is_null($iban)) { + array_push($this->openAPINullablesSetToNull, 'iban'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('iban', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($iban) && (mb_strlen($iban) > 34)) { + throw new InvalidArgumentException('invalid length for $iban when calling ContractSharedBankDetails., must be smaller than or equal to 34.'); + } + + $this->container['iban'] = $iban; + + return $this; + } + + /** + * Gets note + * + * @return string|null + */ + public function getNote(): ?string + { + return $this->container['note']; + } + + /** + * Sets note + * + * @param string|null $note note + * + * @return $this + */ + public function setNote(?string $note): static + { + if (is_null($note)) { + array_push($this->openAPINullablesSetToNull, 'note'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('note', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['note'] = $note; + + return $this; + } + + /** + * Gets sortCode + * + * @return string|null + */ + public function getSortCode(): ?string + { + return $this->container['sortCode']; + } + + /** + * Sets sortCode + * + * @param string|null $sortCode sortCode + * + * @return $this + */ + public function setSortCode(?string $sortCode): static + { + if (is_null($sortCode)) { + array_push($this->openAPINullablesSetToNull, 'sortCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('sortCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['sortCode'] = $sortCode; + + return $this; + } + + /** + * Gets swiftBic + * + * @return string|null + */ + public function getSwiftBic(): ?string + { + return $this->container['swiftBic']; + } + + /** + * Sets swiftBic + * + * @param string|null $swiftBic swiftBic + * + * @return $this + */ + public function setSwiftBic(?string $swiftBic): static + { + if (is_null($swiftBic)) { + array_push($this->openAPINullablesSetToNull, 'swiftBic'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('swiftBic', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($swiftBic) && (mb_strlen($swiftBic) > 11)) { + throw new InvalidArgumentException('invalid length for $swiftBic when calling ContractSharedBankDetails., must be smaller than or equal to 11.'); + } + + $this->container['swiftBic'] = $swiftBic; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ContractShiftWorkingPatternDayRequest.php b/src/Model/ContractShiftWorkingPatternDayRequest.php index 82353ea..b6d0537 100644 --- a/src/Model/ContractShiftWorkingPatternDayRequest.php +++ b/src/Model/ContractShiftWorkingPatternDayRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class ContractShiftWorkingPatternDayRequest implements ModelInterface, ArrayAcce */ protected static array $openAPITypes = [ 'day' => 'int', - 'isWorkingDay' => 'bool', 'hours' => 'float', + 'isWorkingDay' => 'bool', 'workingPatternHoursType' => '\SynergiTech\Staffology\Model\WorkingPatternHoursType' ]; @@ -72,8 +72,8 @@ class ContractShiftWorkingPatternDayRequest implements ModelInterface, ArrayAcce */ protected static array $openAPIFormats = [ 'day' => 'int32', - 'isWorkingDay' => null, 'hours' => 'double', + 'isWorkingDay' => null, 'workingPatternHoursType' => null ]; @@ -84,8 +84,8 @@ class ContractShiftWorkingPatternDayRequest implements ModelInterface, ArrayAcce */ protected static array $openAPINullables = [ 'day' => false, - 'isWorkingDay' => false, 'hours' => false, + 'isWorkingDay' => false, 'workingPatternHoursType' => false ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'day' => 'day', - 'isWorkingDay' => 'isWorkingDay', 'hours' => 'hours', + 'isWorkingDay' => 'isWorkingDay', 'workingPatternHoursType' => 'workingPatternHoursType' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'day' => 'setDay', - 'isWorkingDay' => 'setIsWorkingDay', 'hours' => 'setHours', + 'isWorkingDay' => 'setIsWorkingDay', 'workingPatternHoursType' => 'setWorkingPatternHoursType' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'day' => 'getDay', - 'isWorkingDay' => 'getIsWorkingDay', 'hours' => 'getHours', + 'isWorkingDay' => 'getIsWorkingDay', 'workingPatternHoursType' => 'getWorkingPatternHoursType' ]; @@ -262,8 +262,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('day', $data ?? [], null); - $this->setIfExists('isWorkingDay', $data ?? [], null); $this->setIfExists('hours', $data ?? [], null); + $this->setIfExists('isWorkingDay', $data ?? [], null); $this->setIfExists('workingPatternHoursType', $data ?? [], null); } @@ -337,55 +337,55 @@ public function setDay(?int $day): static } /** - * Gets isWorkingDay + * Gets hours * - * @return bool|null + * @return float|null */ - public function getIsWorkingDay(): ?bool + public function getHours(): ?float { - return $this->container['isWorkingDay']; + return $this->container['hours']; } /** - * Sets isWorkingDay + * Sets hours * - * @param bool|null $isWorkingDay isWorkingDay + * @param float|null $hours hours * * @return $this */ - public function setIsWorkingDay(?bool $isWorkingDay): static + public function setHours(?float $hours): static { - if (is_null($isWorkingDay)) { - throw new InvalidArgumentException('non-nullable isWorkingDay cannot be null'); + if (is_null($hours)) { + throw new InvalidArgumentException('non-nullable hours cannot be null'); } - $this->container['isWorkingDay'] = $isWorkingDay; + $this->container['hours'] = $hours; return $this; } /** - * Gets hours + * Gets isWorkingDay * - * @return float|null + * @return bool|null */ - public function getHours(): ?float + public function getIsWorkingDay(): ?bool { - return $this->container['hours']; + return $this->container['isWorkingDay']; } /** - * Sets hours + * Sets isWorkingDay * - * @param float|null $hours hours + * @param bool|null $isWorkingDay isWorkingDay * * @return $this */ - public function setHours(?float $hours): static + public function setIsWorkingDay(?bool $isWorkingDay): static { - if (is_null($hours)) { - throw new InvalidArgumentException('non-nullable hours cannot be null'); + if (is_null($isWorkingDay)) { + throw new InvalidArgumentException('non-nullable isWorkingDay cannot be null'); } - $this->container['hours'] = $hours; + $this->container['isWorkingDay'] = $isWorkingDay; return $this; } diff --git a/src/Model/ContractShiftWorkingPatternDayResponse.php b/src/Model/ContractShiftWorkingPatternDayResponse.php index 206db56..a1ac140 100644 --- a/src/Model/ContractShiftWorkingPatternDayResponse.php +++ b/src/Model/ContractShiftWorkingPatternDayResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class ContractShiftWorkingPatternDayResponse implements ModelInterface, ArrayAcc */ protected static array $openAPITypes = [ 'day' => 'int', - 'isWorkingDay' => 'bool', - 'hours' => 'float' + 'hours' => 'float', + 'isWorkingDay' => 'bool' ]; /** @@ -71,8 +71,8 @@ class ContractShiftWorkingPatternDayResponse implements ModelInterface, ArrayAcc */ protected static array $openAPIFormats = [ 'day' => 'int32', - 'isWorkingDay' => null, - 'hours' => 'double' + 'hours' => 'double', + 'isWorkingDay' => null ]; /** @@ -82,8 +82,8 @@ class ContractShiftWorkingPatternDayResponse implements ModelInterface, ArrayAcc */ protected static array $openAPINullables = [ 'day' => false, - 'isWorkingDay' => false, - 'hours' => false + 'hours' => false, + 'isWorkingDay' => false ]; /** @@ -173,8 +173,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'day' => 'day', - 'isWorkingDay' => 'isWorkingDay', - 'hours' => 'hours' + 'hours' => 'hours', + 'isWorkingDay' => 'isWorkingDay' ]; /** @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'day' => 'setDay', - 'isWorkingDay' => 'setIsWorkingDay', - 'hours' => 'setHours' + 'hours' => 'setHours', + 'isWorkingDay' => 'setIsWorkingDay' ]; /** @@ -195,8 +195,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'day' => 'getDay', - 'isWorkingDay' => 'getIsWorkingDay', - 'hours' => 'getHours' + 'hours' => 'getHours', + 'isWorkingDay' => 'getIsWorkingDay' ]; /** @@ -256,8 +256,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('day', $data ?? [], null); - $this->setIfExists('isWorkingDay', $data ?? [], null); $this->setIfExists('hours', $data ?? [], null); + $this->setIfExists('isWorkingDay', $data ?? [], null); } /** @@ -330,55 +330,55 @@ public function setDay(?int $day): static } /** - * Gets isWorkingDay + * Gets hours * - * @return bool|null + * @return float|null */ - public function getIsWorkingDay(): ?bool + public function getHours(): ?float { - return $this->container['isWorkingDay']; + return $this->container['hours']; } /** - * Sets isWorkingDay + * Sets hours * - * @param bool|null $isWorkingDay isWorkingDay + * @param float|null $hours hours * * @return $this */ - public function setIsWorkingDay(?bool $isWorkingDay): static + public function setHours(?float $hours): static { - if (is_null($isWorkingDay)) { - throw new InvalidArgumentException('non-nullable isWorkingDay cannot be null'); + if (is_null($hours)) { + throw new InvalidArgumentException('non-nullable hours cannot be null'); } - $this->container['isWorkingDay'] = $isWorkingDay; + $this->container['hours'] = $hours; return $this; } /** - * Gets hours + * Gets isWorkingDay * - * @return float|null + * @return bool|null */ - public function getHours(): ?float + public function getIsWorkingDay(): ?bool { - return $this->container['hours']; + return $this->container['isWorkingDay']; } /** - * Sets hours + * Sets isWorkingDay * - * @param float|null $hours hours + * @param bool|null $isWorkingDay isWorkingDay * * @return $this */ - public function setHours(?float $hours): static + public function setIsWorkingDay(?bool $isWorkingDay): static { - if (is_null($hours)) { - throw new InvalidArgumentException('non-nullable hours cannot be null'); + if (is_null($isWorkingDay)) { + throw new InvalidArgumentException('non-nullable isWorkingDay cannot be null'); } - $this->container['hours'] = $hours; + $this->container['isWorkingDay'] = $isWorkingDay; return $this; } diff --git a/src/Model/ContractSpinalPointRequest.php b/src/Model/ContractSpinalPointRequest.php index 5b98591..f01ffda 100644 --- a/src/Model/ContractSpinalPointRequest.php +++ b/src/Model/ContractSpinalPointRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,17 +59,17 @@ class ContractSpinalPointRequest implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', - 'number' => 'int', 'annualValue' => 'float', 'annualValueAltMax' => 'float', + 'annualValueLAFringe' => 'float', + 'annualValueLAFringeAltMax' => 'float', 'annualValueLAInner' => 'float', 'annualValueLAInnerAltMax' => 'float', 'annualValueLAOuter' => 'float', 'annualValueLAOuterAltMax' => 'float', - 'annualValueLAFringe' => 'float', - 'annualValueLAFringeAltMax' => 'float', 'effectiveDate' => '\DateTime', + 'name' => 'string', + 'number' => 'int', 'predecessorId' => 'string' ]; @@ -79,17 +79,17 @@ class ContractSpinalPointRequest implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'name' => null, - 'number' => 'int32', 'annualValue' => 'double', 'annualValueAltMax' => 'double', + 'annualValueLAFringe' => 'double', + 'annualValueLAFringeAltMax' => 'double', 'annualValueLAInner' => 'double', 'annualValueLAInnerAltMax' => 'double', 'annualValueLAOuter' => 'double', 'annualValueLAOuterAltMax' => 'double', - 'annualValueLAFringe' => 'double', - 'annualValueLAFringeAltMax' => 'double', 'effectiveDate' => 'date', + 'name' => null, + 'number' => 'int32', 'predecessorId' => 'uuid' ]; @@ -99,17 +99,17 @@ class ContractSpinalPointRequest implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'name' => true, - 'number' => false, 'annualValue' => false, 'annualValueAltMax' => false, + 'annualValueLAFringe' => false, + 'annualValueLAFringeAltMax' => false, 'annualValueLAInner' => false, 'annualValueLAInnerAltMax' => false, 'annualValueLAOuter' => false, 'annualValueLAOuterAltMax' => false, - 'annualValueLAFringe' => false, - 'annualValueLAFringeAltMax' => false, 'effectiveDate' => false, + 'name' => true, + 'number' => false, 'predecessorId' => true ]; @@ -199,17 +199,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', - 'number' => 'number', 'annualValue' => 'annualValue', 'annualValueAltMax' => 'annualValueAltMax', + 'annualValueLAFringe' => 'annualValueLAFringe', + 'annualValueLAFringeAltMax' => 'annualValueLAFringeAltMax', 'annualValueLAInner' => 'annualValueLAInner', 'annualValueLAInnerAltMax' => 'annualValueLAInnerAltMax', 'annualValueLAOuter' => 'annualValueLAOuter', 'annualValueLAOuterAltMax' => 'annualValueLAOuterAltMax', - 'annualValueLAFringe' => 'annualValueLAFringe', - 'annualValueLAFringeAltMax' => 'annualValueLAFringeAltMax', 'effectiveDate' => 'effectiveDate', + 'name' => 'name', + 'number' => 'number', 'predecessorId' => 'predecessorId' ]; @@ -219,17 +219,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', - 'number' => 'setNumber', 'annualValue' => 'setAnnualValue', 'annualValueAltMax' => 'setAnnualValueAltMax', + 'annualValueLAFringe' => 'setAnnualValueLAFringe', + 'annualValueLAFringeAltMax' => 'setAnnualValueLAFringeAltMax', 'annualValueLAInner' => 'setAnnualValueLAInner', 'annualValueLAInnerAltMax' => 'setAnnualValueLAInnerAltMax', 'annualValueLAOuter' => 'setAnnualValueLAOuter', 'annualValueLAOuterAltMax' => 'setAnnualValueLAOuterAltMax', - 'annualValueLAFringe' => 'setAnnualValueLAFringe', - 'annualValueLAFringeAltMax' => 'setAnnualValueLAFringeAltMax', 'effectiveDate' => 'setEffectiveDate', + 'name' => 'setName', + 'number' => 'setNumber', 'predecessorId' => 'setPredecessorId' ]; @@ -239,17 +239,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', - 'number' => 'getNumber', 'annualValue' => 'getAnnualValue', 'annualValueAltMax' => 'getAnnualValueAltMax', + 'annualValueLAFringe' => 'getAnnualValueLAFringe', + 'annualValueLAFringeAltMax' => 'getAnnualValueLAFringeAltMax', 'annualValueLAInner' => 'getAnnualValueLAInner', 'annualValueLAInnerAltMax' => 'getAnnualValueLAInnerAltMax', 'annualValueLAOuter' => 'getAnnualValueLAOuter', 'annualValueLAOuterAltMax' => 'getAnnualValueLAOuterAltMax', - 'annualValueLAFringe' => 'getAnnualValueLAFringe', - 'annualValueLAFringeAltMax' => 'getAnnualValueLAFringeAltMax', 'effectiveDate' => 'getEffectiveDate', + 'name' => 'getName', + 'number' => 'getNumber', 'predecessorId' => 'getPredecessorId' ]; @@ -309,17 +309,17 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('number', $data ?? [], null); $this->setIfExists('annualValue', $data ?? [], null); $this->setIfExists('annualValueAltMax', $data ?? [], null); + $this->setIfExists('annualValueLAFringe', $data ?? [], null); + $this->setIfExists('annualValueLAFringeAltMax', $data ?? [], null); $this->setIfExists('annualValueLAInner', $data ?? [], null); $this->setIfExists('annualValueLAInnerAltMax', $data ?? [], null); $this->setIfExists('annualValueLAOuter', $data ?? [], null); $this->setIfExists('annualValueLAOuterAltMax', $data ?? [], null); - $this->setIfExists('annualValueLAFringe', $data ?? [], null); - $this->setIfExists('annualValueLAFringeAltMax', $data ?? [], null); $this->setIfExists('effectiveDate', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('number', $data ?? [], null); $this->setIfExists('predecessorId', $data ?? [], null); } @@ -366,116 +366,109 @@ public function valid(): bool /** - * Gets name + * Gets annualValue * - * @return string|null + * @return float|null */ - public function getName(): ?string + public function getAnnualValue(): ?float { - return $this->container['name']; + return $this->container['annualValue']; } /** - * Sets name + * Sets annualValue * - * @param string|null $name Name of the Spinal Point + * @param float|null $annualValue Annual Value for the Spinal Point * * @return $this */ - public function setName(?string $name): static + public function setAnnualValue(?float $annualValue): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($annualValue)) { + throw new InvalidArgumentException('non-nullable annualValue cannot be null'); } - $this->container['name'] = $name; + $this->container['annualValue'] = $annualValue; return $this; } /** - * Gets number + * Gets annualValueAltMax * - * @return int|null + * @return float|null */ - public function getNumber(): ?int + public function getAnnualValueAltMax(): ?float { - return $this->container['number']; + return $this->container['annualValueAltMax']; } /** - * Sets number + * Sets annualValueAltMax * - * @param int|null $number Number of Spinal Point within the Scale + * @param float|null $annualValueAltMax Annual Value for the Spinal Point (Alternative Max Value) * * @return $this */ - public function setNumber(?int $number): static + public function setAnnualValueAltMax(?float $annualValueAltMax): static { - if (is_null($number)) { - throw new InvalidArgumentException('non-nullable number cannot be null'); + if (is_null($annualValueAltMax)) { + throw new InvalidArgumentException('non-nullable annualValueAltMax cannot be null'); } - $this->container['number'] = $number; + $this->container['annualValueAltMax'] = $annualValueAltMax; return $this; } /** - * Gets annualValue + * Gets annualValueLAFringe * * @return float|null */ - public function getAnnualValue(): ?float + public function getAnnualValueLAFringe(): ?float { - return $this->container['annualValue']; + return $this->container['annualValueLAFringe']; } /** - * Sets annualValue + * Sets annualValueLAFringe * - * @param float|null $annualValue Annual Value for the Spinal Point + * @param float|null $annualValueLAFringe Annual Value for the Spinal Point Fringe London Allowance * * @return $this */ - public function setAnnualValue(?float $annualValue): static + public function setAnnualValueLAFringe(?float $annualValueLAFringe): static { - if (is_null($annualValue)) { - throw new InvalidArgumentException('non-nullable annualValue cannot be null'); + if (is_null($annualValueLAFringe)) { + throw new InvalidArgumentException('non-nullable annualValueLAFringe cannot be null'); } - $this->container['annualValue'] = $annualValue; + $this->container['annualValueLAFringe'] = $annualValueLAFringe; return $this; } /** - * Gets annualValueAltMax + * Gets annualValueLAFringeAltMax * * @return float|null */ - public function getAnnualValueAltMax(): ?float + public function getAnnualValueLAFringeAltMax(): ?float { - return $this->container['annualValueAltMax']; + return $this->container['annualValueLAFringeAltMax']; } /** - * Sets annualValueAltMax + * Sets annualValueLAFringeAltMax * - * @param float|null $annualValueAltMax Annual Value for the Spinal Point (Alternative Max Value) + * @param float|null $annualValueLAFringeAltMax Annual Value for the Spinal Point Fringe LA (Alt Max Value) * * @return $this */ - public function setAnnualValueAltMax(?float $annualValueAltMax): static + public function setAnnualValueLAFringeAltMax(?float $annualValueLAFringeAltMax): static { - if (is_null($annualValueAltMax)) { - throw new InvalidArgumentException('non-nullable annualValueAltMax cannot be null'); + if (is_null($annualValueLAFringeAltMax)) { + throw new InvalidArgumentException('non-nullable annualValueLAFringeAltMax cannot be null'); } - $this->container['annualValueAltMax'] = $annualValueAltMax; + $this->container['annualValueLAFringeAltMax'] = $annualValueLAFringeAltMax; return $this; } @@ -589,82 +582,89 @@ public function setAnnualValueLAOuterAltMax(?float $annualValueLAOuterAltMax): s } /** - * Gets annualValueLAFringe + * Gets effectiveDate * - * @return float|null + * @return \DateTime|null */ - public function getAnnualValueLAFringe(): ?float + public function getEffectiveDate(): ?\DateTime { - return $this->container['annualValueLAFringe']; + return $this->container['effectiveDate']; } /** - * Sets annualValueLAFringe + * Sets effectiveDate * - * @param float|null $annualValueLAFringe Annual Value for the Spinal Point Fringe London Allowance + * @param \DateTime|null $effectiveDate Date these rates became effective * * @return $this */ - public function setAnnualValueLAFringe(?float $annualValueLAFringe): static + public function setEffectiveDate(?\DateTime $effectiveDate): static { - if (is_null($annualValueLAFringe)) { - throw new InvalidArgumentException('non-nullable annualValueLAFringe cannot be null'); + if (is_null($effectiveDate)) { + throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); } - $this->container['annualValueLAFringe'] = $annualValueLAFringe; + $this->container['effectiveDate'] = $effectiveDate; return $this; } /** - * Gets annualValueLAFringeAltMax + * Gets name * - * @return float|null + * @return string|null */ - public function getAnnualValueLAFringeAltMax(): ?float + public function getName(): ?string { - return $this->container['annualValueLAFringeAltMax']; + return $this->container['name']; } /** - * Sets annualValueLAFringeAltMax + * Sets name * - * @param float|null $annualValueLAFringeAltMax Annual Value for the Spinal Point Fringe LA (Alt Max Value) + * @param string|null $name Name of the Spinal Point * * @return $this */ - public function setAnnualValueLAFringeAltMax(?float $annualValueLAFringeAltMax): static + public function setName(?string $name): static { - if (is_null($annualValueLAFringeAltMax)) { - throw new InvalidArgumentException('non-nullable annualValueLAFringeAltMax cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['annualValueLAFringeAltMax'] = $annualValueLAFringeAltMax; + $this->container['name'] = $name; return $this; } /** - * Gets effectiveDate + * Gets number * - * @return \DateTime|null + * @return int|null */ - public function getEffectiveDate(): ?\DateTime + public function getNumber(): ?int { - return $this->container['effectiveDate']; + return $this->container['number']; } /** - * Sets effectiveDate + * Sets number * - * @param \DateTime|null $effectiveDate Date these rates became effective + * @param int|null $number Number of Spinal Point within the Scale * * @return $this */ - public function setEffectiveDate(?\DateTime $effectiveDate): static + public function setNumber(?int $number): static { - if (is_null($effectiveDate)) { - throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); + if (is_null($number)) { + throw new InvalidArgumentException('non-nullable number cannot be null'); } - $this->container['effectiveDate'] = $effectiveDate; + $this->container['number'] = $number; return $this; } diff --git a/src/Model/ContractSpinalPointResponse.php b/src/Model/ContractSpinalPointResponse.php index a885d26..e6a0d4b 100644 --- a/src/Model/ContractSpinalPointResponse.php +++ b/src/Model/ContractSpinalPointResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,19 +59,19 @@ class ContractSpinalPointResponse implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'finalAnnualValue' => 'float', - 'name' => 'string', - 'number' => 'int', 'annualValue' => 'float', 'annualValueAltMax' => 'float', + 'annualValueLAFringe' => 'float', + 'annualValueLAFringeAltMax' => 'float', 'annualValueLAInner' => 'float', 'annualValueLAInnerAltMax' => 'float', 'annualValueLAOuter' => 'float', 'annualValueLAOuterAltMax' => 'float', - 'annualValueLAFringe' => 'float', - 'annualValueLAFringeAltMax' => 'float', 'effectiveDate' => '\DateTime', + 'finalAnnualValue' => 'float', + 'id' => 'string', + 'name' => 'string', + 'number' => 'int', 'predecessorId' => 'string' ]; @@ -81,19 +81,19 @@ class ContractSpinalPointResponse implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'finalAnnualValue' => 'double', - 'name' => null, - 'number' => 'int32', 'annualValue' => 'double', 'annualValueAltMax' => 'double', + 'annualValueLAFringe' => 'double', + 'annualValueLAFringeAltMax' => 'double', 'annualValueLAInner' => 'double', 'annualValueLAInnerAltMax' => 'double', 'annualValueLAOuter' => 'double', 'annualValueLAOuterAltMax' => 'double', - 'annualValueLAFringe' => 'double', - 'annualValueLAFringeAltMax' => 'double', 'effectiveDate' => 'date', + 'finalAnnualValue' => 'double', + 'id' => 'uuid', + 'name' => null, + 'number' => 'int32', 'predecessorId' => 'uuid' ]; @@ -103,19 +103,19 @@ class ContractSpinalPointResponse implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'finalAnnualValue' => false, - 'name' => true, - 'number' => false, 'annualValue' => false, 'annualValueAltMax' => false, + 'annualValueLAFringe' => false, + 'annualValueLAFringeAltMax' => false, 'annualValueLAInner' => false, 'annualValueLAInnerAltMax' => false, 'annualValueLAOuter' => false, 'annualValueLAOuterAltMax' => false, - 'annualValueLAFringe' => false, - 'annualValueLAFringeAltMax' => false, 'effectiveDate' => false, + 'finalAnnualValue' => false, + 'id' => false, + 'name' => true, + 'number' => false, 'predecessorId' => true ]; @@ -205,19 +205,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'finalAnnualValue' => 'finalAnnualValue', - 'name' => 'name', - 'number' => 'number', 'annualValue' => 'annualValue', 'annualValueAltMax' => 'annualValueAltMax', + 'annualValueLAFringe' => 'annualValueLAFringe', + 'annualValueLAFringeAltMax' => 'annualValueLAFringeAltMax', 'annualValueLAInner' => 'annualValueLAInner', 'annualValueLAInnerAltMax' => 'annualValueLAInnerAltMax', 'annualValueLAOuter' => 'annualValueLAOuter', 'annualValueLAOuterAltMax' => 'annualValueLAOuterAltMax', - 'annualValueLAFringe' => 'annualValueLAFringe', - 'annualValueLAFringeAltMax' => 'annualValueLAFringeAltMax', 'effectiveDate' => 'effectiveDate', + 'finalAnnualValue' => 'finalAnnualValue', + 'id' => 'id', + 'name' => 'name', + 'number' => 'number', 'predecessorId' => 'predecessorId' ]; @@ -227,19 +227,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'finalAnnualValue' => 'setFinalAnnualValue', - 'name' => 'setName', - 'number' => 'setNumber', 'annualValue' => 'setAnnualValue', 'annualValueAltMax' => 'setAnnualValueAltMax', + 'annualValueLAFringe' => 'setAnnualValueLAFringe', + 'annualValueLAFringeAltMax' => 'setAnnualValueLAFringeAltMax', 'annualValueLAInner' => 'setAnnualValueLAInner', 'annualValueLAInnerAltMax' => 'setAnnualValueLAInnerAltMax', 'annualValueLAOuter' => 'setAnnualValueLAOuter', 'annualValueLAOuterAltMax' => 'setAnnualValueLAOuterAltMax', - 'annualValueLAFringe' => 'setAnnualValueLAFringe', - 'annualValueLAFringeAltMax' => 'setAnnualValueLAFringeAltMax', 'effectiveDate' => 'setEffectiveDate', + 'finalAnnualValue' => 'setFinalAnnualValue', + 'id' => 'setId', + 'name' => 'setName', + 'number' => 'setNumber', 'predecessorId' => 'setPredecessorId' ]; @@ -249,19 +249,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'finalAnnualValue' => 'getFinalAnnualValue', - 'name' => 'getName', - 'number' => 'getNumber', 'annualValue' => 'getAnnualValue', 'annualValueAltMax' => 'getAnnualValueAltMax', + 'annualValueLAFringe' => 'getAnnualValueLAFringe', + 'annualValueLAFringeAltMax' => 'getAnnualValueLAFringeAltMax', 'annualValueLAInner' => 'getAnnualValueLAInner', 'annualValueLAInnerAltMax' => 'getAnnualValueLAInnerAltMax', 'annualValueLAOuter' => 'getAnnualValueLAOuter', 'annualValueLAOuterAltMax' => 'getAnnualValueLAOuterAltMax', - 'annualValueLAFringe' => 'getAnnualValueLAFringe', - 'annualValueLAFringeAltMax' => 'getAnnualValueLAFringeAltMax', 'effectiveDate' => 'getEffectiveDate', + 'finalAnnualValue' => 'getFinalAnnualValue', + 'id' => 'getId', + 'name' => 'getName', + 'number' => 'getNumber', 'predecessorId' => 'getPredecessorId' ]; @@ -321,19 +321,19 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('finalAnnualValue', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('number', $data ?? [], null); $this->setIfExists('annualValue', $data ?? [], null); $this->setIfExists('annualValueAltMax', $data ?? [], null); + $this->setIfExists('annualValueLAFringe', $data ?? [], null); + $this->setIfExists('annualValueLAFringeAltMax', $data ?? [], null); $this->setIfExists('annualValueLAInner', $data ?? [], null); $this->setIfExists('annualValueLAInnerAltMax', $data ?? [], null); $this->setIfExists('annualValueLAOuter', $data ?? [], null); $this->setIfExists('annualValueLAOuterAltMax', $data ?? [], null); - $this->setIfExists('annualValueLAFringe', $data ?? [], null); - $this->setIfExists('annualValueLAFringeAltMax', $data ?? [], null); $this->setIfExists('effectiveDate', $data ?? [], null); + $this->setIfExists('finalAnnualValue', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('number', $data ?? [], null); $this->setIfExists('predecessorId', $data ?? [], null); } @@ -380,170 +380,109 @@ public function valid(): bool /** - * Gets id - * - * @return string|null - */ - public function getId(): ?string - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Spinal Point identifier - * - * @return $this - */ - public function setId(?string $id): static - { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets finalAnnualValue + * Gets annualValue * * @return float|null */ - public function getFinalAnnualValue(): ?float - { - return $this->container['finalAnnualValue']; - } - - /** - * Sets finalAnnualValue - * - * @param float|null $finalAnnualValue Spinal Point Final Annual Value - * - * @return $this - */ - public function setFinalAnnualValue(?float $finalAnnualValue): static - { - if (is_null($finalAnnualValue)) { - throw new InvalidArgumentException('non-nullable finalAnnualValue cannot be null'); - } - $this->container['finalAnnualValue'] = $finalAnnualValue; - - return $this; - } - - /** - * Gets name - * - * @return string|null - */ - public function getName(): ?string + public function getAnnualValue(): ?float { - return $this->container['name']; + return $this->container['annualValue']; } /** - * Sets name + * Sets annualValue * - * @param string|null $name Name of the Spinal Point + * @param float|null $annualValue Annual Value for the Spinal Point * * @return $this */ - public function setName(?string $name): static + public function setAnnualValue(?float $annualValue): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($annualValue)) { + throw new InvalidArgumentException('non-nullable annualValue cannot be null'); } - $this->container['name'] = $name; + $this->container['annualValue'] = $annualValue; return $this; } /** - * Gets number + * Gets annualValueAltMax * - * @return int|null + * @return float|null */ - public function getNumber(): ?int + public function getAnnualValueAltMax(): ?float { - return $this->container['number']; + return $this->container['annualValueAltMax']; } /** - * Sets number + * Sets annualValueAltMax * - * @param int|null $number Number of Spinal Point within the Scale + * @param float|null $annualValueAltMax Annual Value for the Spinal Point (Alternative Max Value) * * @return $this */ - public function setNumber(?int $number): static + public function setAnnualValueAltMax(?float $annualValueAltMax): static { - if (is_null($number)) { - throw new InvalidArgumentException('non-nullable number cannot be null'); + if (is_null($annualValueAltMax)) { + throw new InvalidArgumentException('non-nullable annualValueAltMax cannot be null'); } - $this->container['number'] = $number; + $this->container['annualValueAltMax'] = $annualValueAltMax; return $this; } /** - * Gets annualValue + * Gets annualValueLAFringe * * @return float|null */ - public function getAnnualValue(): ?float + public function getAnnualValueLAFringe(): ?float { - return $this->container['annualValue']; + return $this->container['annualValueLAFringe']; } /** - * Sets annualValue + * Sets annualValueLAFringe * - * @param float|null $annualValue Annual Value for the Spinal Point + * @param float|null $annualValueLAFringe Annual Value for the Spinal Point Fringe London Allowance * * @return $this */ - public function setAnnualValue(?float $annualValue): static + public function setAnnualValueLAFringe(?float $annualValueLAFringe): static { - if (is_null($annualValue)) { - throw new InvalidArgumentException('non-nullable annualValue cannot be null'); + if (is_null($annualValueLAFringe)) { + throw new InvalidArgumentException('non-nullable annualValueLAFringe cannot be null'); } - $this->container['annualValue'] = $annualValue; + $this->container['annualValueLAFringe'] = $annualValueLAFringe; return $this; } /** - * Gets annualValueAltMax + * Gets annualValueLAFringeAltMax * * @return float|null */ - public function getAnnualValueAltMax(): ?float + public function getAnnualValueLAFringeAltMax(): ?float { - return $this->container['annualValueAltMax']; + return $this->container['annualValueLAFringeAltMax']; } /** - * Sets annualValueAltMax + * Sets annualValueLAFringeAltMax * - * @param float|null $annualValueAltMax Annual Value for the Spinal Point (Alternative Max Value) + * @param float|null $annualValueLAFringeAltMax Annual Value for the Spinal Point Fringe LA (Alt Max Value) * * @return $this */ - public function setAnnualValueAltMax(?float $annualValueAltMax): static + public function setAnnualValueLAFringeAltMax(?float $annualValueLAFringeAltMax): static { - if (is_null($annualValueAltMax)) { - throw new InvalidArgumentException('non-nullable annualValueAltMax cannot be null'); + if (is_null($annualValueLAFringeAltMax)) { + throw new InvalidArgumentException('non-nullable annualValueLAFringeAltMax cannot be null'); } - $this->container['annualValueAltMax'] = $annualValueAltMax; + $this->container['annualValueLAFringeAltMax'] = $annualValueLAFringeAltMax; return $this; } @@ -657,82 +596,143 @@ public function setAnnualValueLAOuterAltMax(?float $annualValueLAOuterAltMax): s } /** - * Gets annualValueLAFringe + * Gets effectiveDate * - * @return float|null + * @return \DateTime|null */ - public function getAnnualValueLAFringe(): ?float + public function getEffectiveDate(): ?\DateTime { - return $this->container['annualValueLAFringe']; + return $this->container['effectiveDate']; } /** - * Sets annualValueLAFringe + * Sets effectiveDate * - * @param float|null $annualValueLAFringe Annual Value for the Spinal Point Fringe London Allowance + * @param \DateTime|null $effectiveDate Date these rates became effective * * @return $this */ - public function setAnnualValueLAFringe(?float $annualValueLAFringe): static + public function setEffectiveDate(?\DateTime $effectiveDate): static { - if (is_null($annualValueLAFringe)) { - throw new InvalidArgumentException('non-nullable annualValueLAFringe cannot be null'); + if (is_null($effectiveDate)) { + throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); } - $this->container['annualValueLAFringe'] = $annualValueLAFringe; + $this->container['effectiveDate'] = $effectiveDate; return $this; } /** - * Gets annualValueLAFringeAltMax + * Gets finalAnnualValue * * @return float|null */ - public function getAnnualValueLAFringeAltMax(): ?float + public function getFinalAnnualValue(): ?float { - return $this->container['annualValueLAFringeAltMax']; + return $this->container['finalAnnualValue']; } /** - * Sets annualValueLAFringeAltMax + * Sets finalAnnualValue * - * @param float|null $annualValueLAFringeAltMax Annual Value for the Spinal Point Fringe LA (Alt Max Value) + * @param float|null $finalAnnualValue Spinal Point Final Annual Value * * @return $this */ - public function setAnnualValueLAFringeAltMax(?float $annualValueLAFringeAltMax): static + public function setFinalAnnualValue(?float $finalAnnualValue): static { - if (is_null($annualValueLAFringeAltMax)) { - throw new InvalidArgumentException('non-nullable annualValueLAFringeAltMax cannot be null'); + if (is_null($finalAnnualValue)) { + throw new InvalidArgumentException('non-nullable finalAnnualValue cannot be null'); } - $this->container['annualValueLAFringeAltMax'] = $annualValueLAFringeAltMax; + $this->container['finalAnnualValue'] = $finalAnnualValue; return $this; } /** - * Gets effectiveDate + * Gets id * - * @return \DateTime|null + * @return string|null */ - public function getEffectiveDate(): ?\DateTime + public function getId(): ?string { - return $this->container['effectiveDate']; + return $this->container['id']; } /** - * Sets effectiveDate + * Sets id * - * @param \DateTime|null $effectiveDate Date these rates became effective + * @param string|null $id Spinal Point identifier * * @return $this */ - public function setEffectiveDate(?\DateTime $effectiveDate): static + public function setId(?string $id): static { - if (is_null($effectiveDate)) { - throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['effectiveDate'] = $effectiveDate; + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName(): ?string + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the Spinal Point + * + * @return $this + */ + public function setName(?string $name): static + { + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets number + * + * @return int|null + */ + public function getNumber(): ?int + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param int|null $number Number of Spinal Point within the Scale + * + * @return $this + */ + public function setNumber(?int $number): static + { + if (is_null($number)) { + throw new InvalidArgumentException('non-nullable number cannot be null'); + } + $this->container['number'] = $number; return $this; } diff --git a/src/Model/ContractSpinalPointUpdateRequest.php b/src/Model/ContractSpinalPointUpdateRequest.php index c1c0299..d8911fe 100644 --- a/src/Model/ContractSpinalPointUpdateRequest.php +++ b/src/Model/ContractSpinalPointUpdateRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,19 +59,19 @@ class ContractSpinalPointUpdateRequest implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ - 'uniqueId' => 'string', - 'name' => 'string', - 'number' => 'int', 'annualValue' => 'float', 'annualValueAltMax' => 'float', + 'annualValueLAFringe' => 'float', + 'annualValueLAFringeAltMax' => 'float', 'annualValueLAInner' => 'float', 'annualValueLAInnerAltMax' => 'float', 'annualValueLAOuter' => 'float', 'annualValueLAOuterAltMax' => 'float', - 'annualValueLAFringe' => 'float', - 'annualValueLAFringeAltMax' => 'float', 'effectiveDate' => '\DateTime', - 'predecessorId' => 'string' + 'name' => 'string', + 'number' => 'int', + 'predecessorId' => 'string', + 'uniqueId' => 'string' ]; /** @@ -80,19 +80,19 @@ class ContractSpinalPointUpdateRequest implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPIFormats = [ - 'uniqueId' => 'uuid', - 'name' => null, - 'number' => 'int32', 'annualValue' => 'double', 'annualValueAltMax' => 'double', + 'annualValueLAFringe' => 'double', + 'annualValueLAFringeAltMax' => 'double', 'annualValueLAInner' => 'double', 'annualValueLAInnerAltMax' => 'double', 'annualValueLAOuter' => 'double', 'annualValueLAOuterAltMax' => 'double', - 'annualValueLAFringe' => 'double', - 'annualValueLAFringeAltMax' => 'double', 'effectiveDate' => 'date', - 'predecessorId' => 'uuid' + 'name' => null, + 'number' => 'int32', + 'predecessorId' => 'uuid', + 'uniqueId' => 'uuid' ]; /** @@ -101,19 +101,19 @@ class ContractSpinalPointUpdateRequest implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPINullables = [ - 'uniqueId' => false, - 'name' => true, - 'number' => false, 'annualValue' => false, 'annualValueAltMax' => false, + 'annualValueLAFringe' => false, + 'annualValueLAFringeAltMax' => false, 'annualValueLAInner' => false, 'annualValueLAInnerAltMax' => false, 'annualValueLAOuter' => false, 'annualValueLAOuterAltMax' => false, - 'annualValueLAFringe' => false, - 'annualValueLAFringeAltMax' => false, 'effectiveDate' => false, - 'predecessorId' => true + 'name' => true, + 'number' => false, + 'predecessorId' => true, + 'uniqueId' => false ]; /** @@ -202,19 +202,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'uniqueId' => 'uniqueId', - 'name' => 'name', - 'number' => 'number', 'annualValue' => 'annualValue', 'annualValueAltMax' => 'annualValueAltMax', + 'annualValueLAFringe' => 'annualValueLAFringe', + 'annualValueLAFringeAltMax' => 'annualValueLAFringeAltMax', 'annualValueLAInner' => 'annualValueLAInner', 'annualValueLAInnerAltMax' => 'annualValueLAInnerAltMax', 'annualValueLAOuter' => 'annualValueLAOuter', 'annualValueLAOuterAltMax' => 'annualValueLAOuterAltMax', - 'annualValueLAFringe' => 'annualValueLAFringe', - 'annualValueLAFringeAltMax' => 'annualValueLAFringeAltMax', 'effectiveDate' => 'effectiveDate', - 'predecessorId' => 'predecessorId' + 'name' => 'name', + 'number' => 'number', + 'predecessorId' => 'predecessorId', + 'uniqueId' => 'uniqueId' ]; /** @@ -223,19 +223,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'uniqueId' => 'setUniqueId', - 'name' => 'setName', - 'number' => 'setNumber', 'annualValue' => 'setAnnualValue', 'annualValueAltMax' => 'setAnnualValueAltMax', + 'annualValueLAFringe' => 'setAnnualValueLAFringe', + 'annualValueLAFringeAltMax' => 'setAnnualValueLAFringeAltMax', 'annualValueLAInner' => 'setAnnualValueLAInner', 'annualValueLAInnerAltMax' => 'setAnnualValueLAInnerAltMax', 'annualValueLAOuter' => 'setAnnualValueLAOuter', 'annualValueLAOuterAltMax' => 'setAnnualValueLAOuterAltMax', - 'annualValueLAFringe' => 'setAnnualValueLAFringe', - 'annualValueLAFringeAltMax' => 'setAnnualValueLAFringeAltMax', 'effectiveDate' => 'setEffectiveDate', - 'predecessorId' => 'setPredecessorId' + 'name' => 'setName', + 'number' => 'setNumber', + 'predecessorId' => 'setPredecessorId', + 'uniqueId' => 'setUniqueId' ]; /** @@ -244,19 +244,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'uniqueId' => 'getUniqueId', - 'name' => 'getName', - 'number' => 'getNumber', 'annualValue' => 'getAnnualValue', 'annualValueAltMax' => 'getAnnualValueAltMax', + 'annualValueLAFringe' => 'getAnnualValueLAFringe', + 'annualValueLAFringeAltMax' => 'getAnnualValueLAFringeAltMax', 'annualValueLAInner' => 'getAnnualValueLAInner', 'annualValueLAInnerAltMax' => 'getAnnualValueLAInnerAltMax', 'annualValueLAOuter' => 'getAnnualValueLAOuter', 'annualValueLAOuterAltMax' => 'getAnnualValueLAOuterAltMax', - 'annualValueLAFringe' => 'getAnnualValueLAFringe', - 'annualValueLAFringeAltMax' => 'getAnnualValueLAFringeAltMax', 'effectiveDate' => 'getEffectiveDate', - 'predecessorId' => 'getPredecessorId' + 'name' => 'getName', + 'number' => 'getNumber', + 'predecessorId' => 'getPredecessorId', + 'uniqueId' => 'getUniqueId' ]; /** @@ -315,19 +315,19 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('uniqueId', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('number', $data ?? [], null); $this->setIfExists('annualValue', $data ?? [], null); $this->setIfExists('annualValueAltMax', $data ?? [], null); + $this->setIfExists('annualValueLAFringe', $data ?? [], null); + $this->setIfExists('annualValueLAFringeAltMax', $data ?? [], null); $this->setIfExists('annualValueLAInner', $data ?? [], null); $this->setIfExists('annualValueLAInnerAltMax', $data ?? [], null); $this->setIfExists('annualValueLAOuter', $data ?? [], null); $this->setIfExists('annualValueLAOuterAltMax', $data ?? [], null); - $this->setIfExists('annualValueLAFringe', $data ?? [], null); - $this->setIfExists('annualValueLAFringeAltMax', $data ?? [], null); $this->setIfExists('effectiveDate', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('number', $data ?? [], null); $this->setIfExists('predecessorId', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); } /** @@ -373,143 +373,109 @@ public function valid(): bool /** - * Gets uniqueId - * - * @return string|null - */ - public function getUniqueId(): ?string - { - return $this->container['uniqueId']; - } - - /** - * Sets uniqueId - * - * @param string|null $uniqueId uniqueId - * - * @return $this - */ - public function setUniqueId(?string $uniqueId): static - { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); - } - $this->container['uniqueId'] = $uniqueId; - - return $this; - } - - /** - * Gets name + * Gets annualValue * - * @return string|null + * @return float|null */ - public function getName(): ?string + public function getAnnualValue(): ?float { - return $this->container['name']; + return $this->container['annualValue']; } /** - * Sets name + * Sets annualValue * - * @param string|null $name Name of the Spinal Point + * @param float|null $annualValue Annual Value for the Spinal Point * * @return $this */ - public function setName(?string $name): static + public function setAnnualValue(?float $annualValue): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($annualValue)) { + throw new InvalidArgumentException('non-nullable annualValue cannot be null'); } - $this->container['name'] = $name; + $this->container['annualValue'] = $annualValue; return $this; } /** - * Gets number + * Gets annualValueAltMax * - * @return int|null + * @return float|null */ - public function getNumber(): ?int + public function getAnnualValueAltMax(): ?float { - return $this->container['number']; + return $this->container['annualValueAltMax']; } /** - * Sets number + * Sets annualValueAltMax * - * @param int|null $number Number of Spinal Point within the Scale + * @param float|null $annualValueAltMax Annual Value for the Spinal Point (Alternative Max Value) * * @return $this */ - public function setNumber(?int $number): static + public function setAnnualValueAltMax(?float $annualValueAltMax): static { - if (is_null($number)) { - throw new InvalidArgumentException('non-nullable number cannot be null'); + if (is_null($annualValueAltMax)) { + throw new InvalidArgumentException('non-nullable annualValueAltMax cannot be null'); } - $this->container['number'] = $number; + $this->container['annualValueAltMax'] = $annualValueAltMax; return $this; } /** - * Gets annualValue + * Gets annualValueLAFringe * * @return float|null */ - public function getAnnualValue(): ?float + public function getAnnualValueLAFringe(): ?float { - return $this->container['annualValue']; + return $this->container['annualValueLAFringe']; } /** - * Sets annualValue + * Sets annualValueLAFringe * - * @param float|null $annualValue Annual Value for the Spinal Point + * @param float|null $annualValueLAFringe Annual Value for the Spinal Point Fringe London Allowance * * @return $this */ - public function setAnnualValue(?float $annualValue): static + public function setAnnualValueLAFringe(?float $annualValueLAFringe): static { - if (is_null($annualValue)) { - throw new InvalidArgumentException('non-nullable annualValue cannot be null'); + if (is_null($annualValueLAFringe)) { + throw new InvalidArgumentException('non-nullable annualValueLAFringe cannot be null'); } - $this->container['annualValue'] = $annualValue; + $this->container['annualValueLAFringe'] = $annualValueLAFringe; return $this; } /** - * Gets annualValueAltMax + * Gets annualValueLAFringeAltMax * * @return float|null */ - public function getAnnualValueAltMax(): ?float + public function getAnnualValueLAFringeAltMax(): ?float { - return $this->container['annualValueAltMax']; + return $this->container['annualValueLAFringeAltMax']; } /** - * Sets annualValueAltMax + * Sets annualValueLAFringeAltMax * - * @param float|null $annualValueAltMax Annual Value for the Spinal Point (Alternative Max Value) + * @param float|null $annualValueLAFringeAltMax Annual Value for the Spinal Point Fringe LA (Alt Max Value) * * @return $this */ - public function setAnnualValueAltMax(?float $annualValueAltMax): static + public function setAnnualValueLAFringeAltMax(?float $annualValueLAFringeAltMax): static { - if (is_null($annualValueAltMax)) { - throw new InvalidArgumentException('non-nullable annualValueAltMax cannot be null'); + if (is_null($annualValueLAFringeAltMax)) { + throw new InvalidArgumentException('non-nullable annualValueLAFringeAltMax cannot be null'); } - $this->container['annualValueAltMax'] = $annualValueAltMax; + $this->container['annualValueLAFringeAltMax'] = $annualValueLAFringeAltMax; return $this; } @@ -623,82 +589,89 @@ public function setAnnualValueLAOuterAltMax(?float $annualValueLAOuterAltMax): s } /** - * Gets annualValueLAFringe + * Gets effectiveDate * - * @return float|null + * @return \DateTime|null */ - public function getAnnualValueLAFringe(): ?float + public function getEffectiveDate(): ?\DateTime { - return $this->container['annualValueLAFringe']; + return $this->container['effectiveDate']; } /** - * Sets annualValueLAFringe + * Sets effectiveDate * - * @param float|null $annualValueLAFringe Annual Value for the Spinal Point Fringe London Allowance + * @param \DateTime|null $effectiveDate Date these rates became effective * * @return $this */ - public function setAnnualValueLAFringe(?float $annualValueLAFringe): static + public function setEffectiveDate(?\DateTime $effectiveDate): static { - if (is_null($annualValueLAFringe)) { - throw new InvalidArgumentException('non-nullable annualValueLAFringe cannot be null'); + if (is_null($effectiveDate)) { + throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); } - $this->container['annualValueLAFringe'] = $annualValueLAFringe; + $this->container['effectiveDate'] = $effectiveDate; return $this; } /** - * Gets annualValueLAFringeAltMax + * Gets name * - * @return float|null + * @return string|null */ - public function getAnnualValueLAFringeAltMax(): ?float + public function getName(): ?string { - return $this->container['annualValueLAFringeAltMax']; + return $this->container['name']; } /** - * Sets annualValueLAFringeAltMax + * Sets name * - * @param float|null $annualValueLAFringeAltMax Annual Value for the Spinal Point Fringe LA (Alt Max Value) + * @param string|null $name Name of the Spinal Point * * @return $this */ - public function setAnnualValueLAFringeAltMax(?float $annualValueLAFringeAltMax): static + public function setName(?string $name): static { - if (is_null($annualValueLAFringeAltMax)) { - throw new InvalidArgumentException('non-nullable annualValueLAFringeAltMax cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['annualValueLAFringeAltMax'] = $annualValueLAFringeAltMax; + $this->container['name'] = $name; return $this; } /** - * Gets effectiveDate + * Gets number * - * @return \DateTime|null + * @return int|null */ - public function getEffectiveDate(): ?\DateTime + public function getNumber(): ?int { - return $this->container['effectiveDate']; + return $this->container['number']; } /** - * Sets effectiveDate + * Sets number * - * @param \DateTime|null $effectiveDate Date these rates became effective + * @param int|null $number Number of Spinal Point within the Scale * * @return $this */ - public function setEffectiveDate(?\DateTime $effectiveDate): static + public function setNumber(?int $number): static { - if (is_null($effectiveDate)) { - throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); + if (is_null($number)) { + throw new InvalidArgumentException('non-nullable number cannot be null'); } - $this->container['effectiveDate'] = $effectiveDate; + $this->container['number'] = $number; return $this; } @@ -736,6 +709,33 @@ public function setPredecessorId(?string $predecessorId): static return $this; } + + /** + * Gets uniqueId + * + * @return string|null + */ + public function getUniqueId(): ?string + { + return $this->container['uniqueId']; + } + + /** + * Sets uniqueId + * + * @param string|null $uniqueId uniqueId + * + * @return $this + */ + public function setUniqueId(?string $uniqueId): static + { + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + } + $this->container['uniqueId'] = $uniqueId; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractSpineAllowanceRequest.php b/src/Model/ContractSpineAllowanceRequest.php index 95ada60..098e22a 100644 --- a/src/Model/ContractSpineAllowanceRequest.php +++ b/src/Model/ContractSpineAllowanceRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class ContractSpineAllowanceRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ + 'allowanceAlwaysFTE' => 'bool', + 'allowanceEffectiveDate' => '\DateTime', 'allowanceName' => 'string', - 'allowanceType' => '\SynergiTech\Staffology\Model\AllowanceType', - 'allowanceUsualAnnualValue' => 'float', 'allowanceRangeLowerValue' => 'float', 'allowanceRangeUpperValue' => 'float', - 'allowanceEffectiveDate' => '\DateTime', - 'allowanceAlwaysFTE' => 'bool', + 'allowanceType' => '\SynergiTech\Staffology\Model\AllowanceType', + 'allowanceUsualAnnualValue' => 'float', 'payCode' => 'string', 'payCodeTitle' => 'string' ]; @@ -76,13 +76,13 @@ class ContractSpineAllowanceRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ + 'allowanceAlwaysFTE' => null, + 'allowanceEffectiveDate' => 'date', 'allowanceName' => null, - 'allowanceType' => null, - 'allowanceUsualAnnualValue' => 'double', 'allowanceRangeLowerValue' => 'double', 'allowanceRangeUpperValue' => 'double', - 'allowanceEffectiveDate' => 'date', - 'allowanceAlwaysFTE' => null, + 'allowanceType' => null, + 'allowanceUsualAnnualValue' => 'double', 'payCode' => null, 'payCodeTitle' => null ]; @@ -93,13 +93,13 @@ class ContractSpineAllowanceRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ + 'allowanceAlwaysFTE' => false, + 'allowanceEffectiveDate' => false, 'allowanceName' => true, - 'allowanceType' => false, - 'allowanceUsualAnnualValue' => false, 'allowanceRangeLowerValue' => false, 'allowanceRangeUpperValue' => false, - 'allowanceEffectiveDate' => false, - 'allowanceAlwaysFTE' => false, + 'allowanceType' => false, + 'allowanceUsualAnnualValue' => false, 'payCode' => true, 'payCodeTitle' => true ]; @@ -190,13 +190,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'allowanceAlwaysFTE' => 'allowanceAlwaysFTE', + 'allowanceEffectiveDate' => 'allowanceEffectiveDate', 'allowanceName' => 'allowanceName', - 'allowanceType' => 'allowanceType', - 'allowanceUsualAnnualValue' => 'allowanceUsualAnnualValue', 'allowanceRangeLowerValue' => 'allowanceRangeLowerValue', 'allowanceRangeUpperValue' => 'allowanceRangeUpperValue', - 'allowanceEffectiveDate' => 'allowanceEffectiveDate', - 'allowanceAlwaysFTE' => 'allowanceAlwaysFTE', + 'allowanceType' => 'allowanceType', + 'allowanceUsualAnnualValue' => 'allowanceUsualAnnualValue', 'payCode' => 'payCode', 'payCodeTitle' => 'payCodeTitle' ]; @@ -207,13 +207,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'allowanceAlwaysFTE' => 'setAllowanceAlwaysFTE', + 'allowanceEffectiveDate' => 'setAllowanceEffectiveDate', 'allowanceName' => 'setAllowanceName', - 'allowanceType' => 'setAllowanceType', - 'allowanceUsualAnnualValue' => 'setAllowanceUsualAnnualValue', 'allowanceRangeLowerValue' => 'setAllowanceRangeLowerValue', 'allowanceRangeUpperValue' => 'setAllowanceRangeUpperValue', - 'allowanceEffectiveDate' => 'setAllowanceEffectiveDate', - 'allowanceAlwaysFTE' => 'setAllowanceAlwaysFTE', + 'allowanceType' => 'setAllowanceType', + 'allowanceUsualAnnualValue' => 'setAllowanceUsualAnnualValue', 'payCode' => 'setPayCode', 'payCodeTitle' => 'setPayCodeTitle' ]; @@ -224,13 +224,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'allowanceAlwaysFTE' => 'getAllowanceAlwaysFTE', + 'allowanceEffectiveDate' => 'getAllowanceEffectiveDate', 'allowanceName' => 'getAllowanceName', - 'allowanceType' => 'getAllowanceType', - 'allowanceUsualAnnualValue' => 'getAllowanceUsualAnnualValue', 'allowanceRangeLowerValue' => 'getAllowanceRangeLowerValue', 'allowanceRangeUpperValue' => 'getAllowanceRangeUpperValue', - 'allowanceEffectiveDate' => 'getAllowanceEffectiveDate', - 'allowanceAlwaysFTE' => 'getAllowanceAlwaysFTE', + 'allowanceType' => 'getAllowanceType', + 'allowanceUsualAnnualValue' => 'getAllowanceUsualAnnualValue', 'payCode' => 'getPayCode', 'payCodeTitle' => 'getPayCodeTitle' ]; @@ -291,13 +291,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('allowanceAlwaysFTE', $data ?? [], null); + $this->setIfExists('allowanceEffectiveDate', $data ?? [], null); $this->setIfExists('allowanceName', $data ?? [], null); - $this->setIfExists('allowanceType', $data ?? [], null); - $this->setIfExists('allowanceUsualAnnualValue', $data ?? [], null); $this->setIfExists('allowanceRangeLowerValue', $data ?? [], null); $this->setIfExists('allowanceRangeUpperValue', $data ?? [], null); - $this->setIfExists('allowanceEffectiveDate', $data ?? [], null); - $this->setIfExists('allowanceAlwaysFTE', $data ?? [], null); + $this->setIfExists('allowanceType', $data ?? [], null); + $this->setIfExists('allowanceUsualAnnualValue', $data ?? [], null); $this->setIfExists('payCode', $data ?? [], null); $this->setIfExists('payCodeTitle', $data ?? [], null); } @@ -345,89 +345,89 @@ public function valid(): bool /** - * Gets allowanceName + * Gets allowanceAlwaysFTE * - * @return string|null + * @return bool|null */ - public function getAllowanceName(): ?string + public function getAllowanceAlwaysFTE(): ?bool { - return $this->container['allowanceName']; + return $this->container['allowanceAlwaysFTE']; } /** - * Sets allowanceName + * Sets allowanceAlwaysFTE * - * @param string|null $allowanceName Name of Allowance + * @param bool|null $allowanceAlwaysFTE Allowance Always FTE or Not * * @return $this */ - public function setAllowanceName(?string $allowanceName): static + public function setAllowanceAlwaysFTE(?bool $allowanceAlwaysFTE): static { - if (is_null($allowanceName)) { - array_push($this->openAPINullablesSetToNull, 'allowanceName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('allowanceName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($allowanceAlwaysFTE)) { + throw new InvalidArgumentException('non-nullable allowanceAlwaysFTE cannot be null'); } - $this->container['allowanceName'] = $allowanceName; + $this->container['allowanceAlwaysFTE'] = $allowanceAlwaysFTE; return $this; } /** - * Gets allowanceType + * Gets allowanceEffectiveDate * - * @return \SynergiTech\Staffology\Model\AllowanceType|null + * @return \DateTime|null */ - public function getAllowanceType(): ?\SynergiTech\Staffology\Model\AllowanceType + public function getAllowanceEffectiveDate(): ?\DateTime { - return $this->container['allowanceType']; + return $this->container['allowanceEffectiveDate']; } /** - * Sets allowanceType + * Sets allowanceEffectiveDate * - * @param \SynergiTech\Staffology\Model\AllowanceType|null $allowanceType allowanceType + * @param \DateTime|null $allowanceEffectiveDate Allowance Effective Date * * @return $this */ - public function setAllowanceType(?\SynergiTech\Staffology\Model\AllowanceType $allowanceType): static + public function setAllowanceEffectiveDate(?\DateTime $allowanceEffectiveDate): static { - if (is_null($allowanceType)) { - throw new InvalidArgumentException('non-nullable allowanceType cannot be null'); + if (is_null($allowanceEffectiveDate)) { + throw new InvalidArgumentException('non-nullable allowanceEffectiveDate cannot be null'); } - $this->container['allowanceType'] = $allowanceType; + $this->container['allowanceEffectiveDate'] = $allowanceEffectiveDate; return $this; } /** - * Gets allowanceUsualAnnualValue + * Gets allowanceName * - * @return float|null + * @return string|null */ - public function getAllowanceUsualAnnualValue(): ?float + public function getAllowanceName(): ?string { - return $this->container['allowanceUsualAnnualValue']; + return $this->container['allowanceName']; } /** - * Sets allowanceUsualAnnualValue + * Sets allowanceName * - * @param float|null $allowanceUsualAnnualValue Value of Allowance Usual Annual + * @param string|null $allowanceName Name of Allowance * * @return $this */ - public function setAllowanceUsualAnnualValue(?float $allowanceUsualAnnualValue): static + public function setAllowanceName(?string $allowanceName): static { - if (is_null($allowanceUsualAnnualValue)) { - throw new InvalidArgumentException('non-nullable allowanceUsualAnnualValue cannot be null'); + if (is_null($allowanceName)) { + array_push($this->openAPINullablesSetToNull, 'allowanceName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('allowanceName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['allowanceUsualAnnualValue'] = $allowanceUsualAnnualValue; + $this->container['allowanceName'] = $allowanceName; return $this; } @@ -487,55 +487,55 @@ public function setAllowanceRangeUpperValue(?float $allowanceRangeUpperValue): s } /** - * Gets allowanceEffectiveDate + * Gets allowanceType * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\AllowanceType|null */ - public function getAllowanceEffectiveDate(): ?\DateTime + public function getAllowanceType(): ?\SynergiTech\Staffology\Model\AllowanceType { - return $this->container['allowanceEffectiveDate']; + return $this->container['allowanceType']; } /** - * Sets allowanceEffectiveDate + * Sets allowanceType * - * @param \DateTime|null $allowanceEffectiveDate Allowance Effective Date + * @param \SynergiTech\Staffology\Model\AllowanceType|null $allowanceType allowanceType * * @return $this */ - public function setAllowanceEffectiveDate(?\DateTime $allowanceEffectiveDate): static + public function setAllowanceType(?\SynergiTech\Staffology\Model\AllowanceType $allowanceType): static { - if (is_null($allowanceEffectiveDate)) { - throw new InvalidArgumentException('non-nullable allowanceEffectiveDate cannot be null'); + if (is_null($allowanceType)) { + throw new InvalidArgumentException('non-nullable allowanceType cannot be null'); } - $this->container['allowanceEffectiveDate'] = $allowanceEffectiveDate; + $this->container['allowanceType'] = $allowanceType; return $this; } /** - * Gets allowanceAlwaysFTE + * Gets allowanceUsualAnnualValue * - * @return bool|null + * @return float|null */ - public function getAllowanceAlwaysFTE(): ?bool + public function getAllowanceUsualAnnualValue(): ?float { - return $this->container['allowanceAlwaysFTE']; + return $this->container['allowanceUsualAnnualValue']; } /** - * Sets allowanceAlwaysFTE + * Sets allowanceUsualAnnualValue * - * @param bool|null $allowanceAlwaysFTE Allowance Always FTE or Not + * @param float|null $allowanceUsualAnnualValue Value of Allowance Usual Annual * * @return $this */ - public function setAllowanceAlwaysFTE(?bool $allowanceAlwaysFTE): static + public function setAllowanceUsualAnnualValue(?float $allowanceUsualAnnualValue): static { - if (is_null($allowanceAlwaysFTE)) { - throw new InvalidArgumentException('non-nullable allowanceAlwaysFTE cannot be null'); + if (is_null($allowanceUsualAnnualValue)) { + throw new InvalidArgumentException('non-nullable allowanceUsualAnnualValue cannot be null'); } - $this->container['allowanceAlwaysFTE'] = $allowanceAlwaysFTE; + $this->container['allowanceUsualAnnualValue'] = $allowanceUsualAnnualValue; return $this; } diff --git a/src/Model/ContractSpineAllowanceResponse.php b/src/Model/ContractSpineAllowanceResponse.php index 694cef8..ec1f743 100644 --- a/src/Model/ContractSpineAllowanceResponse.php +++ b/src/Model/ContractSpineAllowanceResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,16 @@ class ContractSpineAllowanceResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPITypes = [ + 'allowanceAlwaysFTE' => 'bool', + 'allowanceEffectiveDate' => '\DateTime', 'allowanceName' => 'string', - 'allowanceType' => '\SynergiTech\Staffology\Model\AllowanceType', - 'allowanceUsualAnnualValue' => 'float', 'allowanceRangeLowerValue' => 'float', 'allowanceRangeUpperValue' => 'float', - 'allowanceEffectiveDate' => '\DateTime', - 'allowanceAlwaysFTE' => 'bool', - 'uniqueId' => 'string', + 'allowanceType' => '\SynergiTech\Staffology\Model\AllowanceType', + 'allowanceUsualAnnualValue' => 'float', 'payCode' => 'string', - 'payCodeTitle' => 'string' + 'payCodeTitle' => 'string', + 'uniqueId' => 'string' ]; /** @@ -77,16 +77,16 @@ class ContractSpineAllowanceResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPIFormats = [ + 'allowanceAlwaysFTE' => null, + 'allowanceEffectiveDate' => 'date', 'allowanceName' => null, - 'allowanceType' => null, - 'allowanceUsualAnnualValue' => 'double', 'allowanceRangeLowerValue' => 'double', 'allowanceRangeUpperValue' => 'double', - 'allowanceEffectiveDate' => 'date', - 'allowanceAlwaysFTE' => null, - 'uniqueId' => 'uuid', + 'allowanceType' => null, + 'allowanceUsualAnnualValue' => 'double', 'payCode' => null, - 'payCodeTitle' => null + 'payCodeTitle' => null, + 'uniqueId' => 'uuid' ]; /** @@ -95,16 +95,16 @@ class ContractSpineAllowanceResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPINullables = [ + 'allowanceAlwaysFTE' => false, + 'allowanceEffectiveDate' => false, 'allowanceName' => true, - 'allowanceType' => false, - 'allowanceUsualAnnualValue' => false, 'allowanceRangeLowerValue' => false, 'allowanceRangeUpperValue' => false, - 'allowanceEffectiveDate' => false, - 'allowanceAlwaysFTE' => false, - 'uniqueId' => false, + 'allowanceType' => false, + 'allowanceUsualAnnualValue' => false, 'payCode' => true, - 'payCodeTitle' => true + 'payCodeTitle' => true, + 'uniqueId' => false ]; /** @@ -193,16 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'allowanceAlwaysFTE' => 'allowanceAlwaysFTE', + 'allowanceEffectiveDate' => 'allowanceEffectiveDate', 'allowanceName' => 'allowanceName', - 'allowanceType' => 'allowanceType', - 'allowanceUsualAnnualValue' => 'allowanceUsualAnnualValue', 'allowanceRangeLowerValue' => 'allowanceRangeLowerValue', 'allowanceRangeUpperValue' => 'allowanceRangeUpperValue', - 'allowanceEffectiveDate' => 'allowanceEffectiveDate', - 'allowanceAlwaysFTE' => 'allowanceAlwaysFTE', - 'uniqueId' => 'uniqueId', + 'allowanceType' => 'allowanceType', + 'allowanceUsualAnnualValue' => 'allowanceUsualAnnualValue', 'payCode' => 'payCode', - 'payCodeTitle' => 'payCodeTitle' + 'payCodeTitle' => 'payCodeTitle', + 'uniqueId' => 'uniqueId' ]; /** @@ -211,16 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'allowanceAlwaysFTE' => 'setAllowanceAlwaysFTE', + 'allowanceEffectiveDate' => 'setAllowanceEffectiveDate', 'allowanceName' => 'setAllowanceName', - 'allowanceType' => 'setAllowanceType', - 'allowanceUsualAnnualValue' => 'setAllowanceUsualAnnualValue', 'allowanceRangeLowerValue' => 'setAllowanceRangeLowerValue', 'allowanceRangeUpperValue' => 'setAllowanceRangeUpperValue', - 'allowanceEffectiveDate' => 'setAllowanceEffectiveDate', - 'allowanceAlwaysFTE' => 'setAllowanceAlwaysFTE', - 'uniqueId' => 'setUniqueId', + 'allowanceType' => 'setAllowanceType', + 'allowanceUsualAnnualValue' => 'setAllowanceUsualAnnualValue', 'payCode' => 'setPayCode', - 'payCodeTitle' => 'setPayCodeTitle' + 'payCodeTitle' => 'setPayCodeTitle', + 'uniqueId' => 'setUniqueId' ]; /** @@ -229,16 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'allowanceAlwaysFTE' => 'getAllowanceAlwaysFTE', + 'allowanceEffectiveDate' => 'getAllowanceEffectiveDate', 'allowanceName' => 'getAllowanceName', - 'allowanceType' => 'getAllowanceType', - 'allowanceUsualAnnualValue' => 'getAllowanceUsualAnnualValue', 'allowanceRangeLowerValue' => 'getAllowanceRangeLowerValue', 'allowanceRangeUpperValue' => 'getAllowanceRangeUpperValue', - 'allowanceEffectiveDate' => 'getAllowanceEffectiveDate', - 'allowanceAlwaysFTE' => 'getAllowanceAlwaysFTE', - 'uniqueId' => 'getUniqueId', + 'allowanceType' => 'getAllowanceType', + 'allowanceUsualAnnualValue' => 'getAllowanceUsualAnnualValue', 'payCode' => 'getPayCode', - 'payCodeTitle' => 'getPayCodeTitle' + 'payCodeTitle' => 'getPayCodeTitle', + 'uniqueId' => 'getUniqueId' ]; /** @@ -297,16 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('allowanceAlwaysFTE', $data ?? [], null); + $this->setIfExists('allowanceEffectiveDate', $data ?? [], null); $this->setIfExists('allowanceName', $data ?? [], null); - $this->setIfExists('allowanceType', $data ?? [], null); - $this->setIfExists('allowanceUsualAnnualValue', $data ?? [], null); $this->setIfExists('allowanceRangeLowerValue', $data ?? [], null); $this->setIfExists('allowanceRangeUpperValue', $data ?? [], null); - $this->setIfExists('allowanceEffectiveDate', $data ?? [], null); - $this->setIfExists('allowanceAlwaysFTE', $data ?? [], null); - $this->setIfExists('uniqueId', $data ?? [], null); + $this->setIfExists('allowanceType', $data ?? [], null); + $this->setIfExists('allowanceUsualAnnualValue', $data ?? [], null); $this->setIfExists('payCode', $data ?? [], null); $this->setIfExists('payCodeTitle', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); } /** @@ -352,89 +352,89 @@ public function valid(): bool /** - * Gets allowanceName + * Gets allowanceAlwaysFTE * - * @return string|null + * @return bool|null */ - public function getAllowanceName(): ?string + public function getAllowanceAlwaysFTE(): ?bool { - return $this->container['allowanceName']; + return $this->container['allowanceAlwaysFTE']; } /** - * Sets allowanceName + * Sets allowanceAlwaysFTE * - * @param string|null $allowanceName Name of Allowance + * @param bool|null $allowanceAlwaysFTE Allowance Always FTE or Not * * @return $this */ - public function setAllowanceName(?string $allowanceName): static + public function setAllowanceAlwaysFTE(?bool $allowanceAlwaysFTE): static { - if (is_null($allowanceName)) { - array_push($this->openAPINullablesSetToNull, 'allowanceName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('allowanceName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($allowanceAlwaysFTE)) { + throw new InvalidArgumentException('non-nullable allowanceAlwaysFTE cannot be null'); } - $this->container['allowanceName'] = $allowanceName; + $this->container['allowanceAlwaysFTE'] = $allowanceAlwaysFTE; return $this; } /** - * Gets allowanceType + * Gets allowanceEffectiveDate * - * @return \SynergiTech\Staffology\Model\AllowanceType|null + * @return \DateTime|null */ - public function getAllowanceType(): ?\SynergiTech\Staffology\Model\AllowanceType + public function getAllowanceEffectiveDate(): ?\DateTime { - return $this->container['allowanceType']; + return $this->container['allowanceEffectiveDate']; } /** - * Sets allowanceType + * Sets allowanceEffectiveDate * - * @param \SynergiTech\Staffology\Model\AllowanceType|null $allowanceType allowanceType + * @param \DateTime|null $allowanceEffectiveDate Allowance Effective Date * * @return $this */ - public function setAllowanceType(?\SynergiTech\Staffology\Model\AllowanceType $allowanceType): static + public function setAllowanceEffectiveDate(?\DateTime $allowanceEffectiveDate): static { - if (is_null($allowanceType)) { - throw new InvalidArgumentException('non-nullable allowanceType cannot be null'); + if (is_null($allowanceEffectiveDate)) { + throw new InvalidArgumentException('non-nullable allowanceEffectiveDate cannot be null'); } - $this->container['allowanceType'] = $allowanceType; + $this->container['allowanceEffectiveDate'] = $allowanceEffectiveDate; return $this; } /** - * Gets allowanceUsualAnnualValue + * Gets allowanceName * - * @return float|null + * @return string|null */ - public function getAllowanceUsualAnnualValue(): ?float + public function getAllowanceName(): ?string { - return $this->container['allowanceUsualAnnualValue']; + return $this->container['allowanceName']; } /** - * Sets allowanceUsualAnnualValue + * Sets allowanceName * - * @param float|null $allowanceUsualAnnualValue Value of Allowance Usual Annual + * @param string|null $allowanceName Name of Allowance * * @return $this */ - public function setAllowanceUsualAnnualValue(?float $allowanceUsualAnnualValue): static + public function setAllowanceName(?string $allowanceName): static { - if (is_null($allowanceUsualAnnualValue)) { - throw new InvalidArgumentException('non-nullable allowanceUsualAnnualValue cannot be null'); + if (is_null($allowanceName)) { + array_push($this->openAPINullablesSetToNull, 'allowanceName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('allowanceName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['allowanceUsualAnnualValue'] = $allowanceUsualAnnualValue; + $this->container['allowanceName'] = $allowanceName; return $this; } @@ -494,82 +494,55 @@ public function setAllowanceRangeUpperValue(?float $allowanceRangeUpperValue): s } /** - * Gets allowanceEffectiveDate - * - * @return \DateTime|null - */ - public function getAllowanceEffectiveDate(): ?\DateTime - { - return $this->container['allowanceEffectiveDate']; - } - - /** - * Sets allowanceEffectiveDate - * - * @param \DateTime|null $allowanceEffectiveDate Allowance Effective Date - * - * @return $this - */ - public function setAllowanceEffectiveDate(?\DateTime $allowanceEffectiveDate): static - { - if (is_null($allowanceEffectiveDate)) { - throw new InvalidArgumentException('non-nullable allowanceEffectiveDate cannot be null'); - } - $this->container['allowanceEffectiveDate'] = $allowanceEffectiveDate; - - return $this; - } - - /** - * Gets allowanceAlwaysFTE + * Gets allowanceType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\AllowanceType|null */ - public function getAllowanceAlwaysFTE(): ?bool + public function getAllowanceType(): ?\SynergiTech\Staffology\Model\AllowanceType { - return $this->container['allowanceAlwaysFTE']; + return $this->container['allowanceType']; } /** - * Sets allowanceAlwaysFTE + * Sets allowanceType * - * @param bool|null $allowanceAlwaysFTE Allowance Always FTE or Not + * @param \SynergiTech\Staffology\Model\AllowanceType|null $allowanceType allowanceType * * @return $this */ - public function setAllowanceAlwaysFTE(?bool $allowanceAlwaysFTE): static + public function setAllowanceType(?\SynergiTech\Staffology\Model\AllowanceType $allowanceType): static { - if (is_null($allowanceAlwaysFTE)) { - throw new InvalidArgumentException('non-nullable allowanceAlwaysFTE cannot be null'); + if (is_null($allowanceType)) { + throw new InvalidArgumentException('non-nullable allowanceType cannot be null'); } - $this->container['allowanceAlwaysFTE'] = $allowanceAlwaysFTE; + $this->container['allowanceType'] = $allowanceType; return $this; } /** - * Gets uniqueId + * Gets allowanceUsualAnnualValue * - * @return string|null + * @return float|null */ - public function getUniqueId(): ?string + public function getAllowanceUsualAnnualValue(): ?float { - return $this->container['uniqueId']; + return $this->container['allowanceUsualAnnualValue']; } /** - * Sets uniqueId + * Sets allowanceUsualAnnualValue * - * @param string|null $uniqueId Spine Allowance identifier + * @param float|null $allowanceUsualAnnualValue Value of Allowance Usual Annual * * @return $this */ - public function setUniqueId(?string $uniqueId): static + public function setAllowanceUsualAnnualValue(?float $allowanceUsualAnnualValue): static { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + if (is_null($allowanceUsualAnnualValue)) { + throw new InvalidArgumentException('non-nullable allowanceUsualAnnualValue cannot be null'); } - $this->container['uniqueId'] = $uniqueId; + $this->container['allowanceUsualAnnualValue'] = $allowanceUsualAnnualValue; return $this; } @@ -641,6 +614,33 @@ public function setPayCodeTitle(?string $payCodeTitle): static return $this; } + + /** + * Gets uniqueId + * + * @return string|null + */ + public function getUniqueId(): ?string + { + return $this->container['uniqueId']; + } + + /** + * Sets uniqueId + * + * @param string|null $uniqueId Spine Allowance identifier + * + * @return $this + */ + public function setUniqueId(?string $uniqueId): static + { + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + } + $this->container['uniqueId'] = $uniqueId; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractSpineAllowanceUpdateRequest.php b/src/Model/ContractSpineAllowanceUpdateRequest.php index b166886..4a790a8 100644 --- a/src/Model/ContractSpineAllowanceUpdateRequest.php +++ b/src/Model/ContractSpineAllowanceUpdateRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,16 @@ class ContractSpineAllowanceUpdateRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPITypes = [ - 'uniqueId' => 'string', + 'allowanceAlwaysFTE' => 'bool', + 'allowanceEffectiveDate' => '\DateTime', 'allowanceName' => 'string', - 'allowanceType' => '\SynergiTech\Staffology\Model\AllowanceType', - 'allowanceUsualAnnualValue' => 'float', 'allowanceRangeLowerValue' => 'float', 'allowanceRangeUpperValue' => 'float', - 'allowanceEffectiveDate' => '\DateTime', - 'allowanceAlwaysFTE' => 'bool', + 'allowanceType' => '\SynergiTech\Staffology\Model\AllowanceType', + 'allowanceUsualAnnualValue' => 'float', 'payCode' => 'string', - 'payCodeTitle' => 'string' + 'payCodeTitle' => 'string', + 'uniqueId' => 'string' ]; /** @@ -77,16 +77,16 @@ class ContractSpineAllowanceUpdateRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPIFormats = [ - 'uniqueId' => 'uuid', + 'allowanceAlwaysFTE' => null, + 'allowanceEffectiveDate' => 'date', 'allowanceName' => null, - 'allowanceType' => null, - 'allowanceUsualAnnualValue' => 'double', 'allowanceRangeLowerValue' => 'double', 'allowanceRangeUpperValue' => 'double', - 'allowanceEffectiveDate' => 'date', - 'allowanceAlwaysFTE' => null, + 'allowanceType' => null, + 'allowanceUsualAnnualValue' => 'double', 'payCode' => null, - 'payCodeTitle' => null + 'payCodeTitle' => null, + 'uniqueId' => 'uuid' ]; /** @@ -95,16 +95,16 @@ class ContractSpineAllowanceUpdateRequest implements ModelInterface, ArrayAccess * @var array */ protected static array $openAPINullables = [ - 'uniqueId' => false, + 'allowanceAlwaysFTE' => false, + 'allowanceEffectiveDate' => false, 'allowanceName' => true, - 'allowanceType' => false, - 'allowanceUsualAnnualValue' => false, 'allowanceRangeLowerValue' => false, 'allowanceRangeUpperValue' => false, - 'allowanceEffectiveDate' => false, - 'allowanceAlwaysFTE' => false, + 'allowanceType' => false, + 'allowanceUsualAnnualValue' => false, 'payCode' => true, - 'payCodeTitle' => true + 'payCodeTitle' => true, + 'uniqueId' => false ]; /** @@ -193,16 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'uniqueId' => 'uniqueId', + 'allowanceAlwaysFTE' => 'allowanceAlwaysFTE', + 'allowanceEffectiveDate' => 'allowanceEffectiveDate', 'allowanceName' => 'allowanceName', - 'allowanceType' => 'allowanceType', - 'allowanceUsualAnnualValue' => 'allowanceUsualAnnualValue', 'allowanceRangeLowerValue' => 'allowanceRangeLowerValue', 'allowanceRangeUpperValue' => 'allowanceRangeUpperValue', - 'allowanceEffectiveDate' => 'allowanceEffectiveDate', - 'allowanceAlwaysFTE' => 'allowanceAlwaysFTE', + 'allowanceType' => 'allowanceType', + 'allowanceUsualAnnualValue' => 'allowanceUsualAnnualValue', 'payCode' => 'payCode', - 'payCodeTitle' => 'payCodeTitle' + 'payCodeTitle' => 'payCodeTitle', + 'uniqueId' => 'uniqueId' ]; /** @@ -211,16 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'uniqueId' => 'setUniqueId', + 'allowanceAlwaysFTE' => 'setAllowanceAlwaysFTE', + 'allowanceEffectiveDate' => 'setAllowanceEffectiveDate', 'allowanceName' => 'setAllowanceName', - 'allowanceType' => 'setAllowanceType', - 'allowanceUsualAnnualValue' => 'setAllowanceUsualAnnualValue', 'allowanceRangeLowerValue' => 'setAllowanceRangeLowerValue', 'allowanceRangeUpperValue' => 'setAllowanceRangeUpperValue', - 'allowanceEffectiveDate' => 'setAllowanceEffectiveDate', - 'allowanceAlwaysFTE' => 'setAllowanceAlwaysFTE', + 'allowanceType' => 'setAllowanceType', + 'allowanceUsualAnnualValue' => 'setAllowanceUsualAnnualValue', 'payCode' => 'setPayCode', - 'payCodeTitle' => 'setPayCodeTitle' + 'payCodeTitle' => 'setPayCodeTitle', + 'uniqueId' => 'setUniqueId' ]; /** @@ -229,16 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'uniqueId' => 'getUniqueId', + 'allowanceAlwaysFTE' => 'getAllowanceAlwaysFTE', + 'allowanceEffectiveDate' => 'getAllowanceEffectiveDate', 'allowanceName' => 'getAllowanceName', - 'allowanceType' => 'getAllowanceType', - 'allowanceUsualAnnualValue' => 'getAllowanceUsualAnnualValue', 'allowanceRangeLowerValue' => 'getAllowanceRangeLowerValue', 'allowanceRangeUpperValue' => 'getAllowanceRangeUpperValue', - 'allowanceEffectiveDate' => 'getAllowanceEffectiveDate', - 'allowanceAlwaysFTE' => 'getAllowanceAlwaysFTE', + 'allowanceType' => 'getAllowanceType', + 'allowanceUsualAnnualValue' => 'getAllowanceUsualAnnualValue', 'payCode' => 'getPayCode', - 'payCodeTitle' => 'getPayCodeTitle' + 'payCodeTitle' => 'getPayCodeTitle', + 'uniqueId' => 'getUniqueId' ]; /** @@ -297,16 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('uniqueId', $data ?? [], null); + $this->setIfExists('allowanceAlwaysFTE', $data ?? [], null); + $this->setIfExists('allowanceEffectiveDate', $data ?? [], null); $this->setIfExists('allowanceName', $data ?? [], null); - $this->setIfExists('allowanceType', $data ?? [], null); - $this->setIfExists('allowanceUsualAnnualValue', $data ?? [], null); $this->setIfExists('allowanceRangeLowerValue', $data ?? [], null); $this->setIfExists('allowanceRangeUpperValue', $data ?? [], null); - $this->setIfExists('allowanceEffectiveDate', $data ?? [], null); - $this->setIfExists('allowanceAlwaysFTE', $data ?? [], null); + $this->setIfExists('allowanceType', $data ?? [], null); + $this->setIfExists('allowanceUsualAnnualValue', $data ?? [], null); $this->setIfExists('payCode', $data ?? [], null); $this->setIfExists('payCodeTitle', $data ?? [], null); + $this->setIfExists('uniqueId', $data ?? [], null); } /** @@ -352,116 +352,89 @@ public function valid(): bool /** - * Gets uniqueId - * - * @return string|null - */ - public function getUniqueId(): ?string - { - return $this->container['uniqueId']; - } - - /** - * Sets uniqueId - * - * @param string|null $uniqueId Spine Allowance identifier - * - * @return $this - */ - public function setUniqueId(?string $uniqueId): static - { - if (is_null($uniqueId)) { - throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); - } - $this->container['uniqueId'] = $uniqueId; - - return $this; - } - - /** - * Gets allowanceName + * Gets allowanceAlwaysFTE * - * @return string|null + * @return bool|null */ - public function getAllowanceName(): ?string + public function getAllowanceAlwaysFTE(): ?bool { - return $this->container['allowanceName']; + return $this->container['allowanceAlwaysFTE']; } /** - * Sets allowanceName + * Sets allowanceAlwaysFTE * - * @param string|null $allowanceName Name of Allowance + * @param bool|null $allowanceAlwaysFTE Allowance Always FTE or Not * * @return $this */ - public function setAllowanceName(?string $allowanceName): static + public function setAllowanceAlwaysFTE(?bool $allowanceAlwaysFTE): static { - if (is_null($allowanceName)) { - array_push($this->openAPINullablesSetToNull, 'allowanceName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('allowanceName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($allowanceAlwaysFTE)) { + throw new InvalidArgumentException('non-nullable allowanceAlwaysFTE cannot be null'); } - $this->container['allowanceName'] = $allowanceName; + $this->container['allowanceAlwaysFTE'] = $allowanceAlwaysFTE; return $this; } /** - * Gets allowanceType + * Gets allowanceEffectiveDate * - * @return \SynergiTech\Staffology\Model\AllowanceType|null + * @return \DateTime|null */ - public function getAllowanceType(): ?\SynergiTech\Staffology\Model\AllowanceType + public function getAllowanceEffectiveDate(): ?\DateTime { - return $this->container['allowanceType']; + return $this->container['allowanceEffectiveDate']; } /** - * Sets allowanceType + * Sets allowanceEffectiveDate * - * @param \SynergiTech\Staffology\Model\AllowanceType|null $allowanceType allowanceType + * @param \DateTime|null $allowanceEffectiveDate Allowance Effective Date * * @return $this */ - public function setAllowanceType(?\SynergiTech\Staffology\Model\AllowanceType $allowanceType): static + public function setAllowanceEffectiveDate(?\DateTime $allowanceEffectiveDate): static { - if (is_null($allowanceType)) { - throw new InvalidArgumentException('non-nullable allowanceType cannot be null'); + if (is_null($allowanceEffectiveDate)) { + throw new InvalidArgumentException('non-nullable allowanceEffectiveDate cannot be null'); } - $this->container['allowanceType'] = $allowanceType; + $this->container['allowanceEffectiveDate'] = $allowanceEffectiveDate; return $this; } /** - * Gets allowanceUsualAnnualValue + * Gets allowanceName * - * @return float|null + * @return string|null */ - public function getAllowanceUsualAnnualValue(): ?float + public function getAllowanceName(): ?string { - return $this->container['allowanceUsualAnnualValue']; + return $this->container['allowanceName']; } /** - * Sets allowanceUsualAnnualValue + * Sets allowanceName * - * @param float|null $allowanceUsualAnnualValue Value of Allowance Usual Annual + * @param string|null $allowanceName Name of Allowance * * @return $this */ - public function setAllowanceUsualAnnualValue(?float $allowanceUsualAnnualValue): static + public function setAllowanceName(?string $allowanceName): static { - if (is_null($allowanceUsualAnnualValue)) { - throw new InvalidArgumentException('non-nullable allowanceUsualAnnualValue cannot be null'); + if (is_null($allowanceName)) { + array_push($this->openAPINullablesSetToNull, 'allowanceName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('allowanceName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['allowanceUsualAnnualValue'] = $allowanceUsualAnnualValue; + $this->container['allowanceName'] = $allowanceName; return $this; } @@ -521,55 +494,55 @@ public function setAllowanceRangeUpperValue(?float $allowanceRangeUpperValue): s } /** - * Gets allowanceEffectiveDate + * Gets allowanceType * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\AllowanceType|null */ - public function getAllowanceEffectiveDate(): ?\DateTime + public function getAllowanceType(): ?\SynergiTech\Staffology\Model\AllowanceType { - return $this->container['allowanceEffectiveDate']; + return $this->container['allowanceType']; } /** - * Sets allowanceEffectiveDate + * Sets allowanceType * - * @param \DateTime|null $allowanceEffectiveDate Allowance Effective Date + * @param \SynergiTech\Staffology\Model\AllowanceType|null $allowanceType allowanceType * * @return $this */ - public function setAllowanceEffectiveDate(?\DateTime $allowanceEffectiveDate): static + public function setAllowanceType(?\SynergiTech\Staffology\Model\AllowanceType $allowanceType): static { - if (is_null($allowanceEffectiveDate)) { - throw new InvalidArgumentException('non-nullable allowanceEffectiveDate cannot be null'); + if (is_null($allowanceType)) { + throw new InvalidArgumentException('non-nullable allowanceType cannot be null'); } - $this->container['allowanceEffectiveDate'] = $allowanceEffectiveDate; + $this->container['allowanceType'] = $allowanceType; return $this; } /** - * Gets allowanceAlwaysFTE + * Gets allowanceUsualAnnualValue * - * @return bool|null + * @return float|null */ - public function getAllowanceAlwaysFTE(): ?bool + public function getAllowanceUsualAnnualValue(): ?float { - return $this->container['allowanceAlwaysFTE']; + return $this->container['allowanceUsualAnnualValue']; } /** - * Sets allowanceAlwaysFTE + * Sets allowanceUsualAnnualValue * - * @param bool|null $allowanceAlwaysFTE Allowance Always FTE or Not + * @param float|null $allowanceUsualAnnualValue Value of Allowance Usual Annual * * @return $this */ - public function setAllowanceAlwaysFTE(?bool $allowanceAlwaysFTE): static + public function setAllowanceUsualAnnualValue(?float $allowanceUsualAnnualValue): static { - if (is_null($allowanceAlwaysFTE)) { - throw new InvalidArgumentException('non-nullable allowanceAlwaysFTE cannot be null'); + if (is_null($allowanceUsualAnnualValue)) { + throw new InvalidArgumentException('non-nullable allowanceUsualAnnualValue cannot be null'); } - $this->container['allowanceAlwaysFTE'] = $allowanceAlwaysFTE; + $this->container['allowanceUsualAnnualValue'] = $allowanceUsualAnnualValue; return $this; } @@ -641,6 +614,33 @@ public function setPayCodeTitle(?string $payCodeTitle): static return $this; } + + /** + * Gets uniqueId + * + * @return string|null + */ + public function getUniqueId(): ?string + { + return $this->container['uniqueId']; + } + + /** + * Sets uniqueId + * + * @param string|null $uniqueId Spine Allowance identifier + * + * @return $this + */ + public function setUniqueId(?string $uniqueId): static + { + if (is_null($uniqueId)) { + throw new InvalidArgumentException('non-nullable uniqueId cannot be null'); + } + $this->container['uniqueId'] = $uniqueId; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractStarterDetails.php b/src/Model/ContractStarterDetails.php index c14a175..dfa39a7 100644 --- a/src/Model/ContractStarterDetails.php +++ b/src/Model/ContractStarterDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ContractStarterDetails implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'startDate' => '\DateTime', - 'starterDeclaration' => '\SynergiTech\Staffology\Model\StarterDeclaration', 'overseasEmployerDetails' => '\SynergiTech\Staffology\Model\ContractOverseasEmployerDetails', - 'pensionerPayroll' => '\SynergiTech\Staffology\Model\ContractPensionerPayroll' + 'pensionerPayroll' => '\SynergiTech\Staffology\Model\ContractPensionerPayroll', + 'startDate' => '\DateTime', + 'starterDeclaration' => '\SynergiTech\Staffology\Model\StarterDeclaration' ]; /** @@ -71,10 +71,10 @@ class ContractStarterDetails implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ - 'startDate' => 'date', - 'starterDeclaration' => null, 'overseasEmployerDetails' => null, - 'pensionerPayroll' => null + 'pensionerPayroll' => null, + 'startDate' => 'date', + 'starterDeclaration' => null ]; /** @@ -83,10 +83,10 @@ class ContractStarterDetails implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ - 'startDate' => false, - 'starterDeclaration' => false, 'overseasEmployerDetails' => false, - 'pensionerPayroll' => false + 'pensionerPayroll' => false, + 'startDate' => false, + 'starterDeclaration' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'startDate' => 'startDate', - 'starterDeclaration' => 'starterDeclaration', 'overseasEmployerDetails' => 'overseasEmployerDetails', - 'pensionerPayroll' => 'pensionerPayroll' + 'pensionerPayroll' => 'pensionerPayroll', + 'startDate' => 'startDate', + 'starterDeclaration' => 'starterDeclaration' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'startDate' => 'setStartDate', - 'starterDeclaration' => 'setStarterDeclaration', 'overseasEmployerDetails' => 'setOverseasEmployerDetails', - 'pensionerPayroll' => 'setPensionerPayroll' + 'pensionerPayroll' => 'setPensionerPayroll', + 'startDate' => 'setStartDate', + 'starterDeclaration' => 'setStarterDeclaration' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'startDate' => 'getStartDate', - 'starterDeclaration' => 'getStarterDeclaration', 'overseasEmployerDetails' => 'getOverseasEmployerDetails', - 'pensionerPayroll' => 'getPensionerPayroll' + 'pensionerPayroll' => 'getPensionerPayroll', + 'startDate' => 'getStartDate', + 'starterDeclaration' => 'getStarterDeclaration' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('starterDeclaration', $data ?? [], null); $this->setIfExists('overseasEmployerDetails', $data ?? [], null); $this->setIfExists('pensionerPayroll', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('starterDeclaration', $data ?? [], null); } /** @@ -316,109 +316,109 @@ public function valid(): bool /** - * Gets startDate + * Gets overseasEmployerDetails * - * @return \DateTime + * @return \SynergiTech\Staffology\Model\ContractOverseasEmployerDetails|null */ - public function getStartDate(): \DateTime + public function getOverseasEmployerDetails(): ?\SynergiTech\Staffology\Model\ContractOverseasEmployerDetails { - return $this->container['startDate']; + return $this->container['overseasEmployerDetails']; } /** - * Sets startDate + * Sets overseasEmployerDetails * - * @param \DateTime $startDate startDate + * @param \SynergiTech\Staffology\Model\ContractOverseasEmployerDetails|null $overseasEmployerDetails overseasEmployerDetails * * @return $this */ - public function setStartDate(\DateTime $startDate): static + public function setOverseasEmployerDetails(?\SynergiTech\Staffology\Model\ContractOverseasEmployerDetails $overseasEmployerDetails): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($overseasEmployerDetails)) { + throw new InvalidArgumentException('non-nullable overseasEmployerDetails cannot be null'); } - $this->container['startDate'] = $startDate; + $this->container['overseasEmployerDetails'] = $overseasEmployerDetails; return $this; } /** - * Gets starterDeclaration + * Gets pensionerPayroll * - * @return \SynergiTech\Staffology\Model\StarterDeclaration + * @return \SynergiTech\Staffology\Model\ContractPensionerPayroll|null */ - public function getStarterDeclaration(): \SynergiTech\Staffology\Model\StarterDeclaration + public function getPensionerPayroll(): ?\SynergiTech\Staffology\Model\ContractPensionerPayroll { - return $this->container['starterDeclaration']; + return $this->container['pensionerPayroll']; } /** - * Sets starterDeclaration + * Sets pensionerPayroll * - * @param \SynergiTech\Staffology\Model\StarterDeclaration $starterDeclaration starterDeclaration + * @param \SynergiTech\Staffology\Model\ContractPensionerPayroll|null $pensionerPayroll pensionerPayroll * * @return $this */ - public function setStarterDeclaration(\SynergiTech\Staffology\Model\StarterDeclaration $starterDeclaration): static + public function setPensionerPayroll(?\SynergiTech\Staffology\Model\ContractPensionerPayroll $pensionerPayroll): static { - if (is_null($starterDeclaration)) { - throw new InvalidArgumentException('non-nullable starterDeclaration cannot be null'); + if (is_null($pensionerPayroll)) { + throw new InvalidArgumentException('non-nullable pensionerPayroll cannot be null'); } - $this->container['starterDeclaration'] = $starterDeclaration; + $this->container['pensionerPayroll'] = $pensionerPayroll; return $this; } /** - * Gets overseasEmployerDetails + * Gets startDate * - * @return \SynergiTech\Staffology\Model\ContractOverseasEmployerDetails|null + * @return \DateTime */ - public function getOverseasEmployerDetails(): ?\SynergiTech\Staffology\Model\ContractOverseasEmployerDetails + public function getStartDate(): \DateTime { - return $this->container['overseasEmployerDetails']; + return $this->container['startDate']; } /** - * Sets overseasEmployerDetails + * Sets startDate * - * @param \SynergiTech\Staffology\Model\ContractOverseasEmployerDetails|null $overseasEmployerDetails overseasEmployerDetails + * @param \DateTime $startDate startDate * * @return $this */ - public function setOverseasEmployerDetails(?\SynergiTech\Staffology\Model\ContractOverseasEmployerDetails $overseasEmployerDetails): static + public function setStartDate(\DateTime $startDate): static { - if (is_null($overseasEmployerDetails)) { - throw new InvalidArgumentException('non-nullable overseasEmployerDetails cannot be null'); + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); } - $this->container['overseasEmployerDetails'] = $overseasEmployerDetails; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets pensionerPayroll + * Gets starterDeclaration * - * @return \SynergiTech\Staffology\Model\ContractPensionerPayroll|null + * @return \SynergiTech\Staffology\Model\StarterDeclaration */ - public function getPensionerPayroll(): ?\SynergiTech\Staffology\Model\ContractPensionerPayroll + public function getStarterDeclaration(): \SynergiTech\Staffology\Model\StarterDeclaration { - return $this->container['pensionerPayroll']; + return $this->container['starterDeclaration']; } /** - * Sets pensionerPayroll + * Sets starterDeclaration * - * @param \SynergiTech\Staffology\Model\ContractPensionerPayroll|null $pensionerPayroll pensionerPayroll + * @param \SynergiTech\Staffology\Model\StarterDeclaration $starterDeclaration starterDeclaration * * @return $this */ - public function setPensionerPayroll(?\SynergiTech\Staffology\Model\ContractPensionerPayroll $pensionerPayroll): static + public function setStarterDeclaration(\SynergiTech\Staffology\Model\StarterDeclaration $starterDeclaration): static { - if (is_null($pensionerPayroll)) { - throw new InvalidArgumentException('non-nullable pensionerPayroll cannot be null'); + if (is_null($starterDeclaration)) { + throw new InvalidArgumentException('non-nullable starterDeclaration cannot be null'); } - $this->container['pensionerPayroll'] = $pensionerPayroll; + $this->container['starterDeclaration'] = $starterDeclaration; return $this; } diff --git a/src/Model/ContractTaxAndNi.php b/src/Model/ContractTaxAndNi.php index e2a6cf1..9dd8241 100644 --- a/src/Model/ContractTaxAndNi.php +++ b/src/Model/ContractTaxAndNi.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,17 +59,17 @@ class ContractTaxAndNi implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'foreignTaxCredit' => 'bool', 'niTable' => 'string', - 'secondaryClass1NotPayable' => 'bool', 'postgradLoan' => 'bool', - 'postgraduateLoanStartDate' => '\DateTime', 'postgraduateLoanEndDate' => '\DateTime', + 'postgraduateLoanStartDate' => '\DateTime', + 'secondaryClass1NotPayable' => 'bool', 'studentLoan' => '\SynergiTech\Staffology\Model\StudentLoan', - 'studentLoanStartDate' => '\DateTime', 'studentLoanEndDate' => '\DateTime', + 'studentLoanStartDate' => '\DateTime', 'taxCode' => 'string', - 'week1Month1' => 'bool', - 'foreignTaxCredit' => 'bool' + 'week1Month1' => 'bool' ]; /** @@ -78,17 +78,17 @@ class ContractTaxAndNi implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'foreignTaxCredit' => null, 'niTable' => null, - 'secondaryClass1NotPayable' => null, 'postgradLoan' => null, - 'postgraduateLoanStartDate' => 'date', 'postgraduateLoanEndDate' => 'date', + 'postgraduateLoanStartDate' => 'date', + 'secondaryClass1NotPayable' => null, 'studentLoan' => null, - 'studentLoanStartDate' => 'date', 'studentLoanEndDate' => 'date', + 'studentLoanStartDate' => 'date', 'taxCode' => null, - 'week1Month1' => null, - 'foreignTaxCredit' => null + 'week1Month1' => null ]; /** @@ -97,17 +97,17 @@ class ContractTaxAndNi implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'foreignTaxCredit' => false, 'niTable' => false, - 'secondaryClass1NotPayable' => false, 'postgradLoan' => false, - 'postgraduateLoanStartDate' => true, 'postgraduateLoanEndDate' => true, + 'postgraduateLoanStartDate' => true, + 'secondaryClass1NotPayable' => false, 'studentLoan' => false, - 'studentLoanStartDate' => true, 'studentLoanEndDate' => true, + 'studentLoanStartDate' => true, 'taxCode' => true, - 'week1Month1' => false, - 'foreignTaxCredit' => false + 'week1Month1' => false ]; /** @@ -196,17 +196,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'foreignTaxCredit' => 'foreignTaxCredit', 'niTable' => 'niTable', - 'secondaryClass1NotPayable' => 'secondaryClass1NotPayable', 'postgradLoan' => 'postgradLoan', - 'postgraduateLoanStartDate' => 'postgraduateLoanStartDate', 'postgraduateLoanEndDate' => 'postgraduateLoanEndDate', + 'postgraduateLoanStartDate' => 'postgraduateLoanStartDate', + 'secondaryClass1NotPayable' => 'secondaryClass1NotPayable', 'studentLoan' => 'studentLoan', - 'studentLoanStartDate' => 'studentLoanStartDate', 'studentLoanEndDate' => 'studentLoanEndDate', + 'studentLoanStartDate' => 'studentLoanStartDate', 'taxCode' => 'taxCode', - 'week1Month1' => 'week1Month1', - 'foreignTaxCredit' => 'foreignTaxCredit' + 'week1Month1' => 'week1Month1' ]; /** @@ -215,17 +215,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'foreignTaxCredit' => 'setForeignTaxCredit', 'niTable' => 'setNiTable', - 'secondaryClass1NotPayable' => 'setSecondaryClass1NotPayable', 'postgradLoan' => 'setPostgradLoan', - 'postgraduateLoanStartDate' => 'setPostgraduateLoanStartDate', 'postgraduateLoanEndDate' => 'setPostgraduateLoanEndDate', + 'postgraduateLoanStartDate' => 'setPostgraduateLoanStartDate', + 'secondaryClass1NotPayable' => 'setSecondaryClass1NotPayable', 'studentLoan' => 'setStudentLoan', - 'studentLoanStartDate' => 'setStudentLoanStartDate', 'studentLoanEndDate' => 'setStudentLoanEndDate', + 'studentLoanStartDate' => 'setStudentLoanStartDate', 'taxCode' => 'setTaxCode', - 'week1Month1' => 'setWeek1Month1', - 'foreignTaxCredit' => 'setForeignTaxCredit' + 'week1Month1' => 'setWeek1Month1' ]; /** @@ -234,17 +234,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'foreignTaxCredit' => 'getForeignTaxCredit', 'niTable' => 'getNiTable', - 'secondaryClass1NotPayable' => 'getSecondaryClass1NotPayable', 'postgradLoan' => 'getPostgradLoan', - 'postgraduateLoanStartDate' => 'getPostgraduateLoanStartDate', 'postgraduateLoanEndDate' => 'getPostgraduateLoanEndDate', + 'postgraduateLoanStartDate' => 'getPostgraduateLoanStartDate', + 'secondaryClass1NotPayable' => 'getSecondaryClass1NotPayable', 'studentLoan' => 'getStudentLoan', - 'studentLoanStartDate' => 'getStudentLoanStartDate', 'studentLoanEndDate' => 'getStudentLoanEndDate', + 'studentLoanStartDate' => 'getStudentLoanStartDate', 'taxCode' => 'getTaxCode', - 'week1Month1' => 'getWeek1Month1', - 'foreignTaxCredit' => 'getForeignTaxCredit' + 'week1Month1' => 'getWeek1Month1' ]; /** @@ -303,17 +303,17 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('foreignTaxCredit', $data ?? [], null); $this->setIfExists('niTable', $data ?? [], null); - $this->setIfExists('secondaryClass1NotPayable', $data ?? [], null); $this->setIfExists('postgradLoan', $data ?? [], null); - $this->setIfExists('postgraduateLoanStartDate', $data ?? [], null); $this->setIfExists('postgraduateLoanEndDate', $data ?? [], null); + $this->setIfExists('postgraduateLoanStartDate', $data ?? [], null); + $this->setIfExists('secondaryClass1NotPayable', $data ?? [], null); $this->setIfExists('studentLoan', $data ?? [], null); - $this->setIfExists('studentLoanStartDate', $data ?? [], null); $this->setIfExists('studentLoanEndDate', $data ?? [], null); + $this->setIfExists('studentLoanStartDate', $data ?? [], null); $this->setIfExists('taxCode', $data ?? [], null); $this->setIfExists('week1Month1', $data ?? [], null); - $this->setIfExists('foreignTaxCredit', $data ?? [], null); } /** @@ -358,6 +358,33 @@ public function valid(): bool } + /** + * Gets foreignTaxCredit + * + * @return bool|null + */ + public function getForeignTaxCredit(): ?bool + { + return $this->container['foreignTaxCredit']; + } + + /** + * Sets foreignTaxCredit + * + * @param bool|null $foreignTaxCredit If set to True you are enabling the possibility to enter an amount on payslip so you can reduce UK Tax liabilities. + * + * @return $this + */ + public function setForeignTaxCredit(?bool $foreignTaxCredit): static + { + if (is_null($foreignTaxCredit)) { + throw new InvalidArgumentException('non-nullable foreignTaxCredit cannot be null'); + } + $this->container['foreignTaxCredit'] = $foreignTaxCredit; + + return $this; + } + /** * Gets niTable * @@ -386,55 +413,62 @@ public function setNiTable(?string $niTable): static } /** - * Gets secondaryClass1NotPayable + * Gets postgradLoan * * @return bool|null */ - public function getSecondaryClass1NotPayable(): ?bool + public function getPostgradLoan(): ?bool { - return $this->container['secondaryClass1NotPayable']; + return $this->container['postgradLoan']; } /** - * Sets secondaryClass1NotPayable + * Sets postgradLoan * - * @param bool|null $secondaryClass1NotPayable If set to true then no Employer NI will be paid for this Employee + * @param bool|null $postgradLoan Set to true if the Employee needs to make Post Graduate Loan repayments * * @return $this */ - public function setSecondaryClass1NotPayable(?bool $secondaryClass1NotPayable): static + public function setPostgradLoan(?bool $postgradLoan): static { - if (is_null($secondaryClass1NotPayable)) { - throw new InvalidArgumentException('non-nullable secondaryClass1NotPayable cannot be null'); + if (is_null($postgradLoan)) { + throw new InvalidArgumentException('non-nullable postgradLoan cannot be null'); } - $this->container['secondaryClass1NotPayable'] = $secondaryClass1NotPayable; + $this->container['postgradLoan'] = $postgradLoan; return $this; } /** - * Gets postgradLoan + * Gets postgraduateLoanEndDate * - * @return bool|null + * @return \DateTime|null */ - public function getPostgradLoan(): ?bool + public function getPostgraduateLoanEndDate(): ?\DateTime { - return $this->container['postgradLoan']; + return $this->container['postgraduateLoanEndDate']; } /** - * Sets postgradLoan + * Sets postgraduateLoanEndDate * - * @param bool|null $postgradLoan Set to true if the Employee needs to make Post Graduate Loan repayments + * @param \DateTime|null $postgraduateLoanEndDate postgraduateLoanEndDate * * @return $this */ - public function setPostgradLoan(?bool $postgradLoan): static + public function setPostgraduateLoanEndDate(?\DateTime $postgraduateLoanEndDate): static { - if (is_null($postgradLoan)) { - throw new InvalidArgumentException('non-nullable postgradLoan cannot be null'); + if (is_null($postgraduateLoanEndDate)) { + array_push($this->openAPINullablesSetToNull, 'postgraduateLoanEndDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('postgraduateLoanEndDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['postgradLoan'] = $postgradLoan; + $this->container['postgraduateLoanEndDate'] = $postgraduateLoanEndDate; return $this; } @@ -474,35 +508,28 @@ public function setPostgraduateLoanStartDate(?\DateTime $postgraduateLoanStartDa } /** - * Gets postgraduateLoanEndDate + * Gets secondaryClass1NotPayable * - * @return \DateTime|null + * @return bool|null */ - public function getPostgraduateLoanEndDate(): ?\DateTime + public function getSecondaryClass1NotPayable(): ?bool { - return $this->container['postgraduateLoanEndDate']; + return $this->container['secondaryClass1NotPayable']; } /** - * Sets postgraduateLoanEndDate + * Sets secondaryClass1NotPayable * - * @param \DateTime|null $postgraduateLoanEndDate postgraduateLoanEndDate + * @param bool|null $secondaryClass1NotPayable If set to true then no Employer NI will be paid for this Employee * * @return $this */ - public function setPostgraduateLoanEndDate(?\DateTime $postgraduateLoanEndDate): static + public function setSecondaryClass1NotPayable(?bool $secondaryClass1NotPayable): static { - if (is_null($postgraduateLoanEndDate)) { - array_push($this->openAPINullablesSetToNull, 'postgraduateLoanEndDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('postgraduateLoanEndDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($secondaryClass1NotPayable)) { + throw new InvalidArgumentException('non-nullable secondaryClass1NotPayable cannot be null'); } - $this->container['postgraduateLoanEndDate'] = $postgraduateLoanEndDate; + $this->container['secondaryClass1NotPayable'] = $secondaryClass1NotPayable; return $this; } @@ -535,69 +562,69 @@ public function setStudentLoan(?\SynergiTech\Staffology\Model\StudentLoan $stude } /** - * Gets studentLoanStartDate + * Gets studentLoanEndDate * * @return \DateTime|null */ - public function getStudentLoanStartDate(): ?\DateTime + public function getStudentLoanEndDate(): ?\DateTime { - return $this->container['studentLoanStartDate']; + return $this->container['studentLoanEndDate']; } /** - * Sets studentLoanStartDate + * Sets studentLoanEndDate * - * @param \DateTime|null $studentLoanStartDate studentLoanStartDate + * @param \DateTime|null $studentLoanEndDate studentLoanEndDate * * @return $this */ - public function setStudentLoanStartDate(?\DateTime $studentLoanStartDate): static + public function setStudentLoanEndDate(?\DateTime $studentLoanEndDate): static { - if (is_null($studentLoanStartDate)) { - array_push($this->openAPINullablesSetToNull, 'studentLoanStartDate'); + if (is_null($studentLoanEndDate)) { + array_push($this->openAPINullablesSetToNull, 'studentLoanEndDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('studentLoanStartDate', $nullablesSetToNull); + $index = array_search('studentLoanEndDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['studentLoanStartDate'] = $studentLoanStartDate; + $this->container['studentLoanEndDate'] = $studentLoanEndDate; return $this; } /** - * Gets studentLoanEndDate + * Gets studentLoanStartDate * * @return \DateTime|null */ - public function getStudentLoanEndDate(): ?\DateTime + public function getStudentLoanStartDate(): ?\DateTime { - return $this->container['studentLoanEndDate']; + return $this->container['studentLoanStartDate']; } /** - * Sets studentLoanEndDate + * Sets studentLoanStartDate * - * @param \DateTime|null $studentLoanEndDate studentLoanEndDate + * @param \DateTime|null $studentLoanStartDate studentLoanStartDate * * @return $this */ - public function setStudentLoanEndDate(?\DateTime $studentLoanEndDate): static + public function setStudentLoanStartDate(?\DateTime $studentLoanStartDate): static { - if (is_null($studentLoanEndDate)) { - array_push($this->openAPINullablesSetToNull, 'studentLoanEndDate'); + if (is_null($studentLoanStartDate)) { + array_push($this->openAPINullablesSetToNull, 'studentLoanStartDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('studentLoanEndDate', $nullablesSetToNull); + $index = array_search('studentLoanStartDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['studentLoanEndDate'] = $studentLoanEndDate; + $this->container['studentLoanStartDate'] = $studentLoanStartDate; return $this; } @@ -662,33 +689,6 @@ public function setWeek1Month1(?bool $week1Month1): static return $this; } - - /** - * Gets foreignTaxCredit - * - * @return bool|null - */ - public function getForeignTaxCredit(): ?bool - { - return $this->container['foreignTaxCredit']; - } - - /** - * Sets foreignTaxCredit - * - * @param bool|null $foreignTaxCredit If set to True you are enabling the possibility to enter an amount on payslip so you can reduce UK Tax liabilities. - * - * @return $this - */ - public function setForeignTaxCredit(?bool $foreignTaxCredit): static - { - if (is_null($foreignTaxCredit)) { - throw new InvalidArgumentException('non-nullable foreignTaxCredit cannot be null'); - } - $this->container['foreignTaxCredit'] = $foreignTaxCredit; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractTermCalendarRequest.php b/src/Model/ContractTermCalendarRequest.php index 6209637..813cbea 100644 --- a/src/Model/ContractTermCalendarRequest.php +++ b/src/Model/ContractTermCalendarRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class ContractTermCalendarRequest implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPITypes = [ - 'title' => 'string', - 'academicYearStartMonth' => '\SynergiTech\Staffology\Model\CalendarMonth' + 'academicYearStartMonth' => '\SynergiTech\Staffology\Model\CalendarMonth', + 'title' => 'string' ]; /** @@ -69,8 +69,8 @@ class ContractTermCalendarRequest implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPIFormats = [ - 'title' => null, - 'academicYearStartMonth' => null + 'academicYearStartMonth' => null, + 'title' => null ]; /** @@ -79,8 +79,8 @@ class ContractTermCalendarRequest implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPINullables = [ - 'title' => true, - 'academicYearStartMonth' => false + 'academicYearStartMonth' => false, + 'title' => true ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'title' => 'title', - 'academicYearStartMonth' => 'academicYearStartMonth' + 'academicYearStartMonth' => 'academicYearStartMonth', + 'title' => 'title' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'title' => 'setTitle', - 'academicYearStartMonth' => 'setAcademicYearStartMonth' + 'academicYearStartMonth' => 'setAcademicYearStartMonth', + 'title' => 'setTitle' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'title' => 'getTitle', - 'academicYearStartMonth' => 'getAcademicYearStartMonth' + 'academicYearStartMonth' => 'getAcademicYearStartMonth', + 'title' => 'getTitle' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('academicYearStartMonth', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -296,62 +296,62 @@ public function valid(): bool /** - * Gets title + * Gets academicYearStartMonth * - * @return string|null + * @return \SynergiTech\Staffology\Model\CalendarMonth|null */ - public function getTitle(): ?string + public function getAcademicYearStartMonth(): ?\SynergiTech\Staffology\Model\CalendarMonth { - return $this->container['title']; + return $this->container['academicYearStartMonth']; } /** - * Sets title + * Sets academicYearStartMonth * - * @param string|null $title Title of the Term Calendar + * @param \SynergiTech\Staffology\Model\CalendarMonth|null $academicYearStartMonth academicYearStartMonth * * @return $this */ - public function setTitle(?string $title): static + public function setAcademicYearStartMonth(?\SynergiTech\Staffology\Model\CalendarMonth $academicYearStartMonth): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($academicYearStartMonth)) { + throw new InvalidArgumentException('non-nullable academicYearStartMonth cannot be null'); } - $this->container['title'] = $title; + $this->container['academicYearStartMonth'] = $academicYearStartMonth; return $this; } /** - * Gets academicYearStartMonth + * Gets title * - * @return \SynergiTech\Staffology\Model\CalendarMonth|null + * @return string|null */ - public function getAcademicYearStartMonth(): ?\SynergiTech\Staffology\Model\CalendarMonth + public function getTitle(): ?string { - return $this->container['academicYearStartMonth']; + return $this->container['title']; } /** - * Sets academicYearStartMonth + * Sets title * - * @param \SynergiTech\Staffology\Model\CalendarMonth|null $academicYearStartMonth academicYearStartMonth + * @param string|null $title Title of the Term Calendar * * @return $this */ - public function setAcademicYearStartMonth(?\SynergiTech\Staffology\Model\CalendarMonth $academicYearStartMonth): static + public function setTitle(?string $title): static { - if (is_null($academicYearStartMonth)) { - throw new InvalidArgumentException('non-nullable academicYearStartMonth cannot be null'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['academicYearStartMonth'] = $academicYearStartMonth; + $this->container['title'] = $title; return $this; } diff --git a/src/Model/ContractTermCalendarResponse.php b/src/Model/ContractTermCalendarResponse.php index 2added9..6c8092d 100644 --- a/src/Model/ContractTermCalendarResponse.php +++ b/src/Model/ContractTermCalendarResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractTermCalendarResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ + 'academicYearStartMonth' => '\SynergiTech\Staffology\Model\CalendarMonth', 'id' => 'string', - 'title' => 'string', - 'academicYearStartMonth' => '\SynergiTech\Staffology\Model\CalendarMonth' + 'title' => 'string' ]; /** @@ -70,9 +70,9 @@ class ContractTermCalendarResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ + 'academicYearStartMonth' => null, 'id' => 'uuid', - 'title' => null, - 'academicYearStartMonth' => null + 'title' => null ]; /** @@ -81,9 +81,9 @@ class ContractTermCalendarResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ + 'academicYearStartMonth' => false, 'id' => false, - 'title' => true, - 'academicYearStartMonth' => false + 'title' => true ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'academicYearStartMonth' => 'academicYearStartMonth', 'id' => 'id', - 'title' => 'title', - 'academicYearStartMonth' => 'academicYearStartMonth' + 'title' => 'title' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'academicYearStartMonth' => 'setAcademicYearStartMonth', 'id' => 'setId', - 'title' => 'setTitle', - 'academicYearStartMonth' => 'setAcademicYearStartMonth' + 'title' => 'setTitle' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'academicYearStartMonth' => 'getAcademicYearStartMonth', 'id' => 'getId', - 'title' => 'getTitle', - 'academicYearStartMonth' => 'getAcademicYearStartMonth' + 'title' => 'getTitle' ]; /** @@ -255,9 +255,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('academicYearStartMonth', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('academicYearStartMonth', $data ?? [], null); } /** @@ -302,6 +302,33 @@ public function valid(): bool } + /** + * Gets academicYearStartMonth + * + * @return \SynergiTech\Staffology\Model\CalendarMonth|null + */ + public function getAcademicYearStartMonth(): ?\SynergiTech\Staffology\Model\CalendarMonth + { + return $this->container['academicYearStartMonth']; + } + + /** + * Sets academicYearStartMonth + * + * @param \SynergiTech\Staffology\Model\CalendarMonth|null $academicYearStartMonth academicYearStartMonth + * + * @return $this + */ + public function setAcademicYearStartMonth(?\SynergiTech\Staffology\Model\CalendarMonth $academicYearStartMonth): static + { + if (is_null($academicYearStartMonth)) { + throw new InvalidArgumentException('non-nullable academicYearStartMonth cannot be null'); + } + $this->container['academicYearStartMonth'] = $academicYearStartMonth; + + return $this; + } + /** * Gets id * @@ -362,33 +389,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets academicYearStartMonth - * - * @return \SynergiTech\Staffology\Model\CalendarMonth|null - */ - public function getAcademicYearStartMonth(): ?\SynergiTech\Staffology\Model\CalendarMonth - { - return $this->container['academicYearStartMonth']; - } - - /** - * Sets academicYearStartMonth - * - * @param \SynergiTech\Staffology\Model\CalendarMonth|null $academicYearStartMonth academicYearStartMonth - * - * @return $this - */ - public function setAcademicYearStartMonth(?\SynergiTech\Staffology\Model\CalendarMonth $academicYearStartMonth): static - { - if (is_null($academicYearStartMonth)) { - throw new InvalidArgumentException('non-nullable academicYearStartMonth cannot be null'); - } - $this->container['academicYearStartMonth'] = $academicYearStartMonth; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractTermCalendarYearRequest.php b/src/Model/ContractTermCalendarYearRequest.php index b043181..c5771cc 100644 --- a/src/Model/ContractTermCalendarYearRequest.php +++ b/src/Model/ContractTermCalendarYearRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class ContractTermCalendarYearRequest implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ - 'autumnTermStartDate' => '\DateTime', 'autumnTermEndDate' => '\DateTime', - 'springTermStartDate' => '\DateTime', + 'autumnTermStartDate' => '\DateTime', 'springTermEndDate' => '\DateTime', - 'summerTermStartDate' => '\DateTime', - 'summerTermEndDate' => '\DateTime' + 'springTermStartDate' => '\DateTime', + 'summerTermEndDate' => '\DateTime', + 'summerTermStartDate' => '\DateTime' ]; /** @@ -73,12 +73,12 @@ class ContractTermCalendarYearRequest implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ - 'autumnTermStartDate' => 'date', 'autumnTermEndDate' => 'date', - 'springTermStartDate' => 'date', + 'autumnTermStartDate' => 'date', 'springTermEndDate' => 'date', - 'summerTermStartDate' => 'date', - 'summerTermEndDate' => 'date' + 'springTermStartDate' => 'date', + 'summerTermEndDate' => 'date', + 'summerTermStartDate' => 'date' ]; /** @@ -87,12 +87,12 @@ class ContractTermCalendarYearRequest implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ - 'autumnTermStartDate' => false, 'autumnTermEndDate' => false, - 'springTermStartDate' => false, + 'autumnTermStartDate' => false, 'springTermEndDate' => false, - 'summerTermStartDate' => false, - 'summerTermEndDate' => false + 'springTermStartDate' => false, + 'summerTermEndDate' => false, + 'summerTermStartDate' => false ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'autumnTermStartDate' => 'autumnTermStartDate', 'autumnTermEndDate' => 'autumnTermEndDate', - 'springTermStartDate' => 'springTermStartDate', + 'autumnTermStartDate' => 'autumnTermStartDate', 'springTermEndDate' => 'springTermEndDate', - 'summerTermStartDate' => 'summerTermStartDate', - 'summerTermEndDate' => 'summerTermEndDate' + 'springTermStartDate' => 'springTermStartDate', + 'summerTermEndDate' => 'summerTermEndDate', + 'summerTermStartDate' => 'summerTermStartDate' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'autumnTermStartDate' => 'setAutumnTermStartDate', 'autumnTermEndDate' => 'setAutumnTermEndDate', - 'springTermStartDate' => 'setSpringTermStartDate', + 'autumnTermStartDate' => 'setAutumnTermStartDate', 'springTermEndDate' => 'setSpringTermEndDate', - 'summerTermStartDate' => 'setSummerTermStartDate', - 'summerTermEndDate' => 'setSummerTermEndDate' + 'springTermStartDate' => 'setSpringTermStartDate', + 'summerTermEndDate' => 'setSummerTermEndDate', + 'summerTermStartDate' => 'setSummerTermStartDate' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'autumnTermStartDate' => 'getAutumnTermStartDate', 'autumnTermEndDate' => 'getAutumnTermEndDate', - 'springTermStartDate' => 'getSpringTermStartDate', + 'autumnTermStartDate' => 'getAutumnTermStartDate', 'springTermEndDate' => 'getSpringTermEndDate', - 'summerTermStartDate' => 'getSummerTermStartDate', - 'summerTermEndDate' => 'getSummerTermEndDate' + 'springTermStartDate' => 'getSpringTermStartDate', + 'summerTermEndDate' => 'getSummerTermEndDate', + 'summerTermStartDate' => 'getSummerTermStartDate' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('autumnTermStartDate', $data ?? [], null); $this->setIfExists('autumnTermEndDate', $data ?? [], null); - $this->setIfExists('springTermStartDate', $data ?? [], null); + $this->setIfExists('autumnTermStartDate', $data ?? [], null); $this->setIfExists('springTermEndDate', $data ?? [], null); - $this->setIfExists('summerTermStartDate', $data ?? [], null); + $this->setIfExists('springTermStartDate', $data ?? [], null); $this->setIfExists('summerTermEndDate', $data ?? [], null); + $this->setIfExists('summerTermStartDate', $data ?? [], null); } /** @@ -323,33 +323,6 @@ public function valid(): bool } - /** - * Gets autumnTermStartDate - * - * @return \DateTime|null - */ - public function getAutumnTermStartDate(): ?\DateTime - { - return $this->container['autumnTermStartDate']; - } - - /** - * Sets autumnTermStartDate - * - * @param \DateTime|null $autumnTermStartDate Autumn Term Start Date of Term Calendar Year View - * - * @return $this - */ - public function setAutumnTermStartDate(?\DateTime $autumnTermStartDate): static - { - if (is_null($autumnTermStartDate)) { - throw new InvalidArgumentException('non-nullable autumnTermStartDate cannot be null'); - } - $this->container['autumnTermStartDate'] = $autumnTermStartDate; - - return $this; - } - /** * Gets autumnTermEndDate * @@ -378,28 +351,28 @@ public function setAutumnTermEndDate(?\DateTime $autumnTermEndDate): static } /** - * Gets springTermStartDate + * Gets autumnTermStartDate * * @return \DateTime|null */ - public function getSpringTermStartDate(): ?\DateTime + public function getAutumnTermStartDate(): ?\DateTime { - return $this->container['springTermStartDate']; + return $this->container['autumnTermStartDate']; } /** - * Sets springTermStartDate + * Sets autumnTermStartDate * - * @param \DateTime|null $springTermStartDate Spring Term Start Date of Term Calendar Year View + * @param \DateTime|null $autumnTermStartDate Autumn Term Start Date of Term Calendar Year View * * @return $this */ - public function setSpringTermStartDate(?\DateTime $springTermStartDate): static + public function setAutumnTermStartDate(?\DateTime $autumnTermStartDate): static { - if (is_null($springTermStartDate)) { - throw new InvalidArgumentException('non-nullable springTermStartDate cannot be null'); + if (is_null($autumnTermStartDate)) { + throw new InvalidArgumentException('non-nullable autumnTermStartDate cannot be null'); } - $this->container['springTermStartDate'] = $springTermStartDate; + $this->container['autumnTermStartDate'] = $autumnTermStartDate; return $this; } @@ -432,28 +405,28 @@ public function setSpringTermEndDate(?\DateTime $springTermEndDate): static } /** - * Gets summerTermStartDate + * Gets springTermStartDate * * @return \DateTime|null */ - public function getSummerTermStartDate(): ?\DateTime + public function getSpringTermStartDate(): ?\DateTime { - return $this->container['summerTermStartDate']; + return $this->container['springTermStartDate']; } /** - * Sets summerTermStartDate + * Sets springTermStartDate * - * @param \DateTime|null $summerTermStartDate Summer Term Start Date of Term Calendar Year View + * @param \DateTime|null $springTermStartDate Spring Term Start Date of Term Calendar Year View * * @return $this */ - public function setSummerTermStartDate(?\DateTime $summerTermStartDate): static + public function setSpringTermStartDate(?\DateTime $springTermStartDate): static { - if (is_null($summerTermStartDate)) { - throw new InvalidArgumentException('non-nullable summerTermStartDate cannot be null'); + if (is_null($springTermStartDate)) { + throw new InvalidArgumentException('non-nullable springTermStartDate cannot be null'); } - $this->container['summerTermStartDate'] = $summerTermStartDate; + $this->container['springTermStartDate'] = $springTermStartDate; return $this; } @@ -484,6 +457,33 @@ public function setSummerTermEndDate(?\DateTime $summerTermEndDate): static return $this; } + + /** + * Gets summerTermStartDate + * + * @return \DateTime|null + */ + public function getSummerTermStartDate(): ?\DateTime + { + return $this->container['summerTermStartDate']; + } + + /** + * Sets summerTermStartDate + * + * @param \DateTime|null $summerTermStartDate Summer Term Start Date of Term Calendar Year View + * + * @return $this + */ + public function setSummerTermStartDate(?\DateTime $summerTermStartDate): static + { + if (is_null($summerTermStartDate)) { + throw new InvalidArgumentException('non-nullable summerTermStartDate cannot be null'); + } + $this->container['summerTermStartDate'] = $summerTermStartDate; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractTermCalendarYearResponse.php b/src/Model/ContractTermCalendarYearResponse.php index afae6ed..b004f6c 100644 --- a/src/Model/ContractTermCalendarYearResponse.php +++ b/src/Model/ContractTermCalendarYearResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class ContractTermCalendarYearResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'autumnTermStartDate' => '\DateTime', 'autumnTermEndDate' => '\DateTime', - 'springTermStartDate' => '\DateTime', + 'autumnTermStartDate' => '\DateTime', + 'id' => 'string', 'springTermEndDate' => '\DateTime', - 'summerTermStartDate' => '\DateTime', - 'summerTermEndDate' => '\DateTime' + 'springTermStartDate' => '\DateTime', + 'summerTermEndDate' => '\DateTime', + 'summerTermStartDate' => '\DateTime' ]; /** @@ -74,13 +74,13 @@ class ContractTermCalendarYearResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'autumnTermStartDate' => 'date', 'autumnTermEndDate' => 'date', - 'springTermStartDate' => 'date', + 'autumnTermStartDate' => 'date', + 'id' => 'uuid', 'springTermEndDate' => 'date', - 'summerTermStartDate' => 'date', - 'summerTermEndDate' => 'date' + 'springTermStartDate' => 'date', + 'summerTermEndDate' => 'date', + 'summerTermStartDate' => 'date' ]; /** @@ -89,13 +89,13 @@ class ContractTermCalendarYearResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'autumnTermStartDate' => false, 'autumnTermEndDate' => false, - 'springTermStartDate' => false, + 'autumnTermStartDate' => false, + 'id' => false, 'springTermEndDate' => false, - 'summerTermStartDate' => false, - 'summerTermEndDate' => false + 'springTermStartDate' => false, + 'summerTermEndDate' => false, + 'summerTermStartDate' => false ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'autumnTermStartDate' => 'autumnTermStartDate', 'autumnTermEndDate' => 'autumnTermEndDate', - 'springTermStartDate' => 'springTermStartDate', + 'autumnTermStartDate' => 'autumnTermStartDate', + 'id' => 'id', 'springTermEndDate' => 'springTermEndDate', - 'summerTermStartDate' => 'summerTermStartDate', - 'summerTermEndDate' => 'summerTermEndDate' + 'springTermStartDate' => 'springTermStartDate', + 'summerTermEndDate' => 'summerTermEndDate', + 'summerTermStartDate' => 'summerTermStartDate' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'autumnTermStartDate' => 'setAutumnTermStartDate', 'autumnTermEndDate' => 'setAutumnTermEndDate', - 'springTermStartDate' => 'setSpringTermStartDate', + 'autumnTermStartDate' => 'setAutumnTermStartDate', + 'id' => 'setId', 'springTermEndDate' => 'setSpringTermEndDate', - 'summerTermStartDate' => 'setSummerTermStartDate', - 'summerTermEndDate' => 'setSummerTermEndDate' + 'springTermStartDate' => 'setSpringTermStartDate', + 'summerTermEndDate' => 'setSummerTermEndDate', + 'summerTermStartDate' => 'setSummerTermStartDate' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'autumnTermStartDate' => 'getAutumnTermStartDate', 'autumnTermEndDate' => 'getAutumnTermEndDate', - 'springTermStartDate' => 'getSpringTermStartDate', + 'autumnTermStartDate' => 'getAutumnTermStartDate', + 'id' => 'getId', 'springTermEndDate' => 'getSpringTermEndDate', - 'summerTermStartDate' => 'getSummerTermStartDate', - 'summerTermEndDate' => 'getSummerTermEndDate' + 'springTermStartDate' => 'getSpringTermStartDate', + 'summerTermEndDate' => 'getSummerTermEndDate', + 'summerTermStartDate' => 'getSummerTermStartDate' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('autumnTermStartDate', $data ?? [], null); $this->setIfExists('autumnTermEndDate', $data ?? [], null); - $this->setIfExists('springTermStartDate', $data ?? [], null); + $this->setIfExists('autumnTermStartDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('springTermEndDate', $data ?? [], null); - $this->setIfExists('summerTermStartDate', $data ?? [], null); + $this->setIfExists('springTermStartDate', $data ?? [], null); $this->setIfExists('summerTermEndDate', $data ?? [], null); + $this->setIfExists('summerTermStartDate', $data ?? [], null); } /** @@ -331,28 +331,28 @@ public function valid(): bool /** - * Gets id + * Gets autumnTermEndDate * - * @return string|null + * @return \DateTime|null */ - public function getId(): ?string + public function getAutumnTermEndDate(): ?\DateTime { - return $this->container['id']; + return $this->container['autumnTermEndDate']; } /** - * Sets id + * Sets autumnTermEndDate * - * @param string|null $id Term Calendar Year identifier + * @param \DateTime|null $autumnTermEndDate Autumn Term End Date of Term Calendar Year View * * @return $this */ - public function setId(?string $id): static + public function setAutumnTermEndDate(?\DateTime $autumnTermEndDate): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($autumnTermEndDate)) { + throw new InvalidArgumentException('non-nullable autumnTermEndDate cannot be null'); } - $this->container['id'] = $id; + $this->container['autumnTermEndDate'] = $autumnTermEndDate; return $this; } @@ -385,28 +385,55 @@ public function setAutumnTermStartDate(?\DateTime $autumnTermStartDate): static } /** - * Gets autumnTermEndDate + * Gets id + * + * @return string|null + */ + public function getId(): ?string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Term Calendar Year identifier + * + * @return $this + */ + public function setId(?string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets springTermEndDate * * @return \DateTime|null */ - public function getAutumnTermEndDate(): ?\DateTime + public function getSpringTermEndDate(): ?\DateTime { - return $this->container['autumnTermEndDate']; + return $this->container['springTermEndDate']; } /** - * Sets autumnTermEndDate + * Sets springTermEndDate * - * @param \DateTime|null $autumnTermEndDate Autumn Term End Date of Term Calendar Year View + * @param \DateTime|null $springTermEndDate Spring Term End Date of Term Calendar Year View * * @return $this */ - public function setAutumnTermEndDate(?\DateTime $autumnTermEndDate): static + public function setSpringTermEndDate(?\DateTime $springTermEndDate): static { - if (is_null($autumnTermEndDate)) { - throw new InvalidArgumentException('non-nullable autumnTermEndDate cannot be null'); + if (is_null($springTermEndDate)) { + throw new InvalidArgumentException('non-nullable springTermEndDate cannot be null'); } - $this->container['autumnTermEndDate'] = $autumnTermEndDate; + $this->container['springTermEndDate'] = $springTermEndDate; return $this; } @@ -439,28 +466,28 @@ public function setSpringTermStartDate(?\DateTime $springTermStartDate): static } /** - * Gets springTermEndDate + * Gets summerTermEndDate * * @return \DateTime|null */ - public function getSpringTermEndDate(): ?\DateTime + public function getSummerTermEndDate(): ?\DateTime { - return $this->container['springTermEndDate']; + return $this->container['summerTermEndDate']; } /** - * Sets springTermEndDate + * Sets summerTermEndDate * - * @param \DateTime|null $springTermEndDate Spring Term End Date of Term Calendar Year View + * @param \DateTime|null $summerTermEndDate Summer Term End Date of Term Calendar Year View * * @return $this */ - public function setSpringTermEndDate(?\DateTime $springTermEndDate): static + public function setSummerTermEndDate(?\DateTime $summerTermEndDate): static { - if (is_null($springTermEndDate)) { - throw new InvalidArgumentException('non-nullable springTermEndDate cannot be null'); + if (is_null($summerTermEndDate)) { + throw new InvalidArgumentException('non-nullable summerTermEndDate cannot be null'); } - $this->container['springTermEndDate'] = $springTermEndDate; + $this->container['summerTermEndDate'] = $summerTermEndDate; return $this; } @@ -491,33 +518,6 @@ public function setSummerTermStartDate(?\DateTime $summerTermStartDate): static return $this; } - - /** - * Gets summerTermEndDate - * - * @return \DateTime|null - */ - public function getSummerTermEndDate(): ?\DateTime - { - return $this->container['summerTermEndDate']; - } - - /** - * Sets summerTermEndDate - * - * @param \DateTime|null $summerTermEndDate Summer Term End Date of Term Calendar Year View - * - * @return $this - */ - public function setSummerTermEndDate(?\DateTime $summerTermEndDate): static - { - if (is_null($summerTermEndDate)) { - throw new InvalidArgumentException('non-nullable summerTermEndDate cannot be null'); - } - $this->container['summerTermEndDate'] = $summerTermEndDate; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractUmbrellaSettingsRequest.php b/src/Model/ContractUmbrellaSettingsRequest.php index d5c0b5b..d67d24a 100644 --- a/src/Model/ContractUmbrellaSettingsRequest.php +++ b/src/Model/ContractUmbrellaSettingsRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,16 @@ class ContractUmbrellaSettingsRequest implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ - 'enabled' => 'bool', - 'chargePerTimesheet' => 'float', 'apprenticeshipLevyDednRate' => 'float', - 'holidayRate' => 'float', + 'chargePerTimesheet' => 'float', + 'cisFeeCode' => 'string', + 'detailFeeInComment' => 'bool', 'dpsbCode' => 'string', + 'enabled' => 'bool', 'expensesCode' => 'string', 'grossDeductionCode' => 'string', 'holidayCode' => 'string', - 'cisFeeCode' => 'string', - 'detailFeeInComment' => 'bool' + 'holidayRate' => 'float' ]; /** @@ -77,16 +77,16 @@ class ContractUmbrellaSettingsRequest implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ - 'enabled' => null, - 'chargePerTimesheet' => 'double', 'apprenticeshipLevyDednRate' => 'double', - 'holidayRate' => 'double', + 'chargePerTimesheet' => 'double', + 'cisFeeCode' => null, + 'detailFeeInComment' => null, 'dpsbCode' => null, + 'enabled' => null, 'expensesCode' => null, 'grossDeductionCode' => null, 'holidayCode' => null, - 'cisFeeCode' => null, - 'detailFeeInComment' => null + 'holidayRate' => 'double' ]; /** @@ -95,16 +95,16 @@ class ContractUmbrellaSettingsRequest implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ - 'enabled' => false, - 'chargePerTimesheet' => false, 'apprenticeshipLevyDednRate' => false, - 'holidayRate' => false, + 'chargePerTimesheet' => false, + 'cisFeeCode' => true, + 'detailFeeInComment' => false, 'dpsbCode' => true, + 'enabled' => false, 'expensesCode' => true, 'grossDeductionCode' => true, 'holidayCode' => true, - 'cisFeeCode' => true, - 'detailFeeInComment' => false + 'holidayRate' => false ]; /** @@ -193,16 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'enabled' => 'enabled', - 'chargePerTimesheet' => 'chargePerTimesheet', 'apprenticeshipLevyDednRate' => 'apprenticeshipLevyDednRate', - 'holidayRate' => 'holidayRate', + 'chargePerTimesheet' => 'chargePerTimesheet', + 'cisFeeCode' => 'cisFeeCode', + 'detailFeeInComment' => 'detailFeeInComment', 'dpsbCode' => 'dpsbCode', + 'enabled' => 'enabled', 'expensesCode' => 'expensesCode', 'grossDeductionCode' => 'grossDeductionCode', 'holidayCode' => 'holidayCode', - 'cisFeeCode' => 'cisFeeCode', - 'detailFeeInComment' => 'detailFeeInComment' + 'holidayRate' => 'holidayRate' ]; /** @@ -211,16 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'enabled' => 'setEnabled', - 'chargePerTimesheet' => 'setChargePerTimesheet', 'apprenticeshipLevyDednRate' => 'setApprenticeshipLevyDednRate', - 'holidayRate' => 'setHolidayRate', + 'chargePerTimesheet' => 'setChargePerTimesheet', + 'cisFeeCode' => 'setCisFeeCode', + 'detailFeeInComment' => 'setDetailFeeInComment', 'dpsbCode' => 'setDpsbCode', + 'enabled' => 'setEnabled', 'expensesCode' => 'setExpensesCode', 'grossDeductionCode' => 'setGrossDeductionCode', 'holidayCode' => 'setHolidayCode', - 'cisFeeCode' => 'setCisFeeCode', - 'detailFeeInComment' => 'setDetailFeeInComment' + 'holidayRate' => 'setHolidayRate' ]; /** @@ -229,16 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'enabled' => 'getEnabled', - 'chargePerTimesheet' => 'getChargePerTimesheet', 'apprenticeshipLevyDednRate' => 'getApprenticeshipLevyDednRate', - 'holidayRate' => 'getHolidayRate', + 'chargePerTimesheet' => 'getChargePerTimesheet', + 'cisFeeCode' => 'getCisFeeCode', + 'detailFeeInComment' => 'getDetailFeeInComment', 'dpsbCode' => 'getDpsbCode', + 'enabled' => 'getEnabled', 'expensesCode' => 'getExpensesCode', 'grossDeductionCode' => 'getGrossDeductionCode', 'holidayCode' => 'getHolidayCode', - 'cisFeeCode' => 'getCisFeeCode', - 'detailFeeInComment' => 'getDetailFeeInComment' + 'holidayRate' => 'getHolidayRate' ]; /** @@ -297,16 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('enabled', $data ?? [], null); - $this->setIfExists('chargePerTimesheet', $data ?? [], null); $this->setIfExists('apprenticeshipLevyDednRate', $data ?? [], null); - $this->setIfExists('holidayRate', $data ?? [], null); + $this->setIfExists('chargePerTimesheet', $data ?? [], null); + $this->setIfExists('cisFeeCode', $data ?? [], null); + $this->setIfExists('detailFeeInComment', $data ?? [], null); $this->setIfExists('dpsbCode', $data ?? [], null); + $this->setIfExists('enabled', $data ?? [], null); $this->setIfExists('expensesCode', $data ?? [], null); $this->setIfExists('grossDeductionCode', $data ?? [], null); $this->setIfExists('holidayCode', $data ?? [], null); - $this->setIfExists('cisFeeCode', $data ?? [], null); - $this->setIfExists('detailFeeInComment', $data ?? [], null); + $this->setIfExists('holidayRate', $data ?? [], null); } /** @@ -352,28 +352,28 @@ public function valid(): bool /** - * Gets enabled + * Gets apprenticeshipLevyDednRate * - * @return bool|null + * @return float|null */ - public function getEnabled(): ?bool + public function getApprenticeshipLevyDednRate(): ?float { - return $this->container['enabled']; + return $this->container['apprenticeshipLevyDednRate']; } /** - * Sets enabled + * Sets apprenticeshipLevyDednRate * - * @param bool|null $enabled enabled + * @param float|null $apprenticeshipLevyDednRate apprenticeshipLevyDednRate * * @return $this */ - public function setEnabled(?bool $enabled): static + public function setApprenticeshipLevyDednRate(?float $apprenticeshipLevyDednRate): static { - if (is_null($enabled)) { - throw new InvalidArgumentException('non-nullable enabled cannot be null'); + if (is_null($apprenticeshipLevyDednRate)) { + throw new InvalidArgumentException('non-nullable apprenticeshipLevyDednRate cannot be null'); } - $this->container['enabled'] = $enabled; + $this->container['apprenticeshipLevyDednRate'] = $apprenticeshipLevyDednRate; return $this; } @@ -406,55 +406,62 @@ public function setChargePerTimesheet(?float $chargePerTimesheet): static } /** - * Gets apprenticeshipLevyDednRate + * Gets cisFeeCode * - * @return float|null + * @return string|null */ - public function getApprenticeshipLevyDednRate(): ?float + public function getCisFeeCode(): ?string { - return $this->container['apprenticeshipLevyDednRate']; + return $this->container['cisFeeCode']; } /** - * Sets apprenticeshipLevyDednRate + * Sets cisFeeCode * - * @param float|null $apprenticeshipLevyDednRate apprenticeshipLevyDednRate + * @param string|null $cisFeeCode cisFeeCode * * @return $this */ - public function setApprenticeshipLevyDednRate(?float $apprenticeshipLevyDednRate): static + public function setCisFeeCode(?string $cisFeeCode): static { - if (is_null($apprenticeshipLevyDednRate)) { - throw new InvalidArgumentException('non-nullable apprenticeshipLevyDednRate cannot be null'); + if (is_null($cisFeeCode)) { + array_push($this->openAPINullablesSetToNull, 'cisFeeCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('cisFeeCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['apprenticeshipLevyDednRate'] = $apprenticeshipLevyDednRate; + $this->container['cisFeeCode'] = $cisFeeCode; return $this; } /** - * Gets holidayRate + * Gets detailFeeInComment * - * @return float|null + * @return bool|null */ - public function getHolidayRate(): ?float + public function getDetailFeeInComment(): ?bool { - return $this->container['holidayRate']; + return $this->container['detailFeeInComment']; } /** - * Sets holidayRate + * Sets detailFeeInComment * - * @param float|null $holidayRate holidayRate + * @param bool|null $detailFeeInComment detailFeeInComment * * @return $this */ - public function setHolidayRate(?float $holidayRate): static + public function setDetailFeeInComment(?bool $detailFeeInComment): static { - if (is_null($holidayRate)) { - throw new InvalidArgumentException('non-nullable holidayRate cannot be null'); + if (is_null($detailFeeInComment)) { + throw new InvalidArgumentException('non-nullable detailFeeInComment cannot be null'); } - $this->container['holidayRate'] = $holidayRate; + $this->container['detailFeeInComment'] = $detailFeeInComment; return $this; } @@ -493,6 +500,33 @@ public function setDpsbCode(?string $dpsbCode): static return $this; } + /** + * Gets enabled + * + * @return bool|null + */ + public function getEnabled(): ?bool + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool|null $enabled enabled + * + * @return $this + */ + public function setEnabled(?bool $enabled): static + { + if (is_null($enabled)) { + throw new InvalidArgumentException('non-nullable enabled cannot be null'); + } + $this->container['enabled'] = $enabled; + + return $this; + } + /** * Gets expensesCode * @@ -596,62 +630,28 @@ public function setHolidayCode(?string $holidayCode): static } /** - * Gets cisFeeCode - * - * @return string|null - */ - public function getCisFeeCode(): ?string - { - return $this->container['cisFeeCode']; - } - - /** - * Sets cisFeeCode - * - * @param string|null $cisFeeCode cisFeeCode - * - * @return $this - */ - public function setCisFeeCode(?string $cisFeeCode): static - { - if (is_null($cisFeeCode)) { - array_push($this->openAPINullablesSetToNull, 'cisFeeCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cisFeeCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['cisFeeCode'] = $cisFeeCode; - - return $this; - } - - /** - * Gets detailFeeInComment + * Gets holidayRate * - * @return bool|null + * @return float|null */ - public function getDetailFeeInComment(): ?bool + public function getHolidayRate(): ?float { - return $this->container['detailFeeInComment']; + return $this->container['holidayRate']; } /** - * Sets detailFeeInComment + * Sets holidayRate * - * @param bool|null $detailFeeInComment detailFeeInComment + * @param float|null $holidayRate holidayRate * * @return $this */ - public function setDetailFeeInComment(?bool $detailFeeInComment): static + public function setHolidayRate(?float $holidayRate): static { - if (is_null($detailFeeInComment)) { - throw new InvalidArgumentException('non-nullable detailFeeInComment cannot be null'); + if (is_null($holidayRate)) { + throw new InvalidArgumentException('non-nullable holidayRate cannot be null'); } - $this->container['detailFeeInComment'] = $detailFeeInComment; + $this->container['holidayRate'] = $holidayRate; return $this; } diff --git a/src/Model/ContractUmbrellaSettingsResponse.php b/src/Model/ContractUmbrellaSettingsResponse.php index 65053d0..6f91b0a 100644 --- a/src/Model/ContractUmbrellaSettingsResponse.php +++ b/src/Model/ContractUmbrellaSettingsResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,16 @@ class ContractUmbrellaSettingsResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ - 'enabled' => 'bool', - 'chargePerTimesheet' => 'float', 'apprenticeshipLevyDednRate' => 'float', - 'holidayRate' => 'float', + 'chargePerTimesheet' => 'float', + 'cisFeeCode' => 'string', + 'detailFeeInComment' => 'bool', 'dpsbCode' => 'string', + 'enabled' => 'bool', 'expensesCode' => 'string', 'grossDeductionCode' => 'string', 'holidayCode' => 'string', - 'cisFeeCode' => 'string', - 'detailFeeInComment' => 'bool' + 'holidayRate' => 'float' ]; /** @@ -77,16 +77,16 @@ class ContractUmbrellaSettingsResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPIFormats = [ - 'enabled' => null, - 'chargePerTimesheet' => 'double', 'apprenticeshipLevyDednRate' => 'double', - 'holidayRate' => 'double', + 'chargePerTimesheet' => 'double', + 'cisFeeCode' => null, + 'detailFeeInComment' => null, 'dpsbCode' => null, + 'enabled' => null, 'expensesCode' => null, 'grossDeductionCode' => null, 'holidayCode' => null, - 'cisFeeCode' => null, - 'detailFeeInComment' => null + 'holidayRate' => 'double' ]; /** @@ -95,16 +95,16 @@ class ContractUmbrellaSettingsResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPINullables = [ - 'enabled' => false, - 'chargePerTimesheet' => false, 'apprenticeshipLevyDednRate' => false, - 'holidayRate' => false, + 'chargePerTimesheet' => false, + 'cisFeeCode' => true, + 'detailFeeInComment' => false, 'dpsbCode' => true, + 'enabled' => false, 'expensesCode' => true, 'grossDeductionCode' => true, 'holidayCode' => true, - 'cisFeeCode' => true, - 'detailFeeInComment' => false + 'holidayRate' => false ]; /** @@ -193,16 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'enabled' => 'enabled', - 'chargePerTimesheet' => 'chargePerTimesheet', 'apprenticeshipLevyDednRate' => 'apprenticeshipLevyDednRate', - 'holidayRate' => 'holidayRate', + 'chargePerTimesheet' => 'chargePerTimesheet', + 'cisFeeCode' => 'cisFeeCode', + 'detailFeeInComment' => 'detailFeeInComment', 'dpsbCode' => 'dpsbCode', + 'enabled' => 'enabled', 'expensesCode' => 'expensesCode', 'grossDeductionCode' => 'grossDeductionCode', 'holidayCode' => 'holidayCode', - 'cisFeeCode' => 'cisFeeCode', - 'detailFeeInComment' => 'detailFeeInComment' + 'holidayRate' => 'holidayRate' ]; /** @@ -211,16 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'enabled' => 'setEnabled', - 'chargePerTimesheet' => 'setChargePerTimesheet', 'apprenticeshipLevyDednRate' => 'setApprenticeshipLevyDednRate', - 'holidayRate' => 'setHolidayRate', + 'chargePerTimesheet' => 'setChargePerTimesheet', + 'cisFeeCode' => 'setCisFeeCode', + 'detailFeeInComment' => 'setDetailFeeInComment', 'dpsbCode' => 'setDpsbCode', + 'enabled' => 'setEnabled', 'expensesCode' => 'setExpensesCode', 'grossDeductionCode' => 'setGrossDeductionCode', 'holidayCode' => 'setHolidayCode', - 'cisFeeCode' => 'setCisFeeCode', - 'detailFeeInComment' => 'setDetailFeeInComment' + 'holidayRate' => 'setHolidayRate' ]; /** @@ -229,16 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'enabled' => 'getEnabled', - 'chargePerTimesheet' => 'getChargePerTimesheet', 'apprenticeshipLevyDednRate' => 'getApprenticeshipLevyDednRate', - 'holidayRate' => 'getHolidayRate', + 'chargePerTimesheet' => 'getChargePerTimesheet', + 'cisFeeCode' => 'getCisFeeCode', + 'detailFeeInComment' => 'getDetailFeeInComment', 'dpsbCode' => 'getDpsbCode', + 'enabled' => 'getEnabled', 'expensesCode' => 'getExpensesCode', 'grossDeductionCode' => 'getGrossDeductionCode', 'holidayCode' => 'getHolidayCode', - 'cisFeeCode' => 'getCisFeeCode', - 'detailFeeInComment' => 'getDetailFeeInComment' + 'holidayRate' => 'getHolidayRate' ]; /** @@ -297,16 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('enabled', $data ?? [], null); - $this->setIfExists('chargePerTimesheet', $data ?? [], null); $this->setIfExists('apprenticeshipLevyDednRate', $data ?? [], null); - $this->setIfExists('holidayRate', $data ?? [], null); + $this->setIfExists('chargePerTimesheet', $data ?? [], null); + $this->setIfExists('cisFeeCode', $data ?? [], null); + $this->setIfExists('detailFeeInComment', $data ?? [], null); $this->setIfExists('dpsbCode', $data ?? [], null); + $this->setIfExists('enabled', $data ?? [], null); $this->setIfExists('expensesCode', $data ?? [], null); $this->setIfExists('grossDeductionCode', $data ?? [], null); $this->setIfExists('holidayCode', $data ?? [], null); - $this->setIfExists('cisFeeCode', $data ?? [], null); - $this->setIfExists('detailFeeInComment', $data ?? [], null); + $this->setIfExists('holidayRate', $data ?? [], null); } /** @@ -352,28 +352,28 @@ public function valid(): bool /** - * Gets enabled + * Gets apprenticeshipLevyDednRate * - * @return bool|null + * @return float|null */ - public function getEnabled(): ?bool + public function getApprenticeshipLevyDednRate(): ?float { - return $this->container['enabled']; + return $this->container['apprenticeshipLevyDednRate']; } /** - * Sets enabled + * Sets apprenticeshipLevyDednRate * - * @param bool|null $enabled enabled + * @param float|null $apprenticeshipLevyDednRate apprenticeshipLevyDednRate * * @return $this */ - public function setEnabled(?bool $enabled): static + public function setApprenticeshipLevyDednRate(?float $apprenticeshipLevyDednRate): static { - if (is_null($enabled)) { - throw new InvalidArgumentException('non-nullable enabled cannot be null'); + if (is_null($apprenticeshipLevyDednRate)) { + throw new InvalidArgumentException('non-nullable apprenticeshipLevyDednRate cannot be null'); } - $this->container['enabled'] = $enabled; + $this->container['apprenticeshipLevyDednRate'] = $apprenticeshipLevyDednRate; return $this; } @@ -406,55 +406,62 @@ public function setChargePerTimesheet(?float $chargePerTimesheet): static } /** - * Gets apprenticeshipLevyDednRate + * Gets cisFeeCode * - * @return float|null + * @return string|null */ - public function getApprenticeshipLevyDednRate(): ?float + public function getCisFeeCode(): ?string { - return $this->container['apprenticeshipLevyDednRate']; + return $this->container['cisFeeCode']; } /** - * Sets apprenticeshipLevyDednRate + * Sets cisFeeCode * - * @param float|null $apprenticeshipLevyDednRate apprenticeshipLevyDednRate + * @param string|null $cisFeeCode cisFeeCode * * @return $this */ - public function setApprenticeshipLevyDednRate(?float $apprenticeshipLevyDednRate): static + public function setCisFeeCode(?string $cisFeeCode): static { - if (is_null($apprenticeshipLevyDednRate)) { - throw new InvalidArgumentException('non-nullable apprenticeshipLevyDednRate cannot be null'); + if (is_null($cisFeeCode)) { + array_push($this->openAPINullablesSetToNull, 'cisFeeCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('cisFeeCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['apprenticeshipLevyDednRate'] = $apprenticeshipLevyDednRate; + $this->container['cisFeeCode'] = $cisFeeCode; return $this; } /** - * Gets holidayRate + * Gets detailFeeInComment * - * @return float|null + * @return bool|null */ - public function getHolidayRate(): ?float + public function getDetailFeeInComment(): ?bool { - return $this->container['holidayRate']; + return $this->container['detailFeeInComment']; } /** - * Sets holidayRate + * Sets detailFeeInComment * - * @param float|null $holidayRate holidayRate + * @param bool|null $detailFeeInComment detailFeeInComment * * @return $this */ - public function setHolidayRate(?float $holidayRate): static + public function setDetailFeeInComment(?bool $detailFeeInComment): static { - if (is_null($holidayRate)) { - throw new InvalidArgumentException('non-nullable holidayRate cannot be null'); + if (is_null($detailFeeInComment)) { + throw new InvalidArgumentException('non-nullable detailFeeInComment cannot be null'); } - $this->container['holidayRate'] = $holidayRate; + $this->container['detailFeeInComment'] = $detailFeeInComment; return $this; } @@ -493,6 +500,33 @@ public function setDpsbCode(?string $dpsbCode): static return $this; } + /** + * Gets enabled + * + * @return bool|null + */ + public function getEnabled(): ?bool + { + return $this->container['enabled']; + } + + /** + * Sets enabled + * + * @param bool|null $enabled enabled + * + * @return $this + */ + public function setEnabled(?bool $enabled): static + { + if (is_null($enabled)) { + throw new InvalidArgumentException('non-nullable enabled cannot be null'); + } + $this->container['enabled'] = $enabled; + + return $this; + } + /** * Gets expensesCode * @@ -596,62 +630,28 @@ public function setHolidayCode(?string $holidayCode): static } /** - * Gets cisFeeCode - * - * @return string|null - */ - public function getCisFeeCode(): ?string - { - return $this->container['cisFeeCode']; - } - - /** - * Sets cisFeeCode - * - * @param string|null $cisFeeCode cisFeeCode - * - * @return $this - */ - public function setCisFeeCode(?string $cisFeeCode): static - { - if (is_null($cisFeeCode)) { - array_push($this->openAPINullablesSetToNull, 'cisFeeCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cisFeeCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['cisFeeCode'] = $cisFeeCode; - - return $this; - } - - /** - * Gets detailFeeInComment + * Gets holidayRate * - * @return bool|null + * @return float|null */ - public function getDetailFeeInComment(): ?bool + public function getHolidayRate(): ?float { - return $this->container['detailFeeInComment']; + return $this->container['holidayRate']; } /** - * Sets detailFeeInComment + * Sets holidayRate * - * @param bool|null $detailFeeInComment detailFeeInComment + * @param float|null $holidayRate holidayRate * * @return $this */ - public function setDetailFeeInComment(?bool $detailFeeInComment): static + public function setHolidayRate(?float $holidayRate): static { - if (is_null($detailFeeInComment)) { - throw new InvalidArgumentException('non-nullable detailFeeInComment cannot be null'); + if (is_null($holidayRate)) { + throw new InvalidArgumentException('non-nullable holidayRate cannot be null'); } - $this->container['detailFeeInComment'] = $detailFeeInComment; + $this->container['holidayRate'] = $holidayRate; return $this; } diff --git a/src/Model/ContractUpdateEmployeeRequest.php b/src/Model/ContractUpdateEmployeeRequest.php index fcfac9e..4eb6313 100644 --- a/src/Model/ContractUpdateEmployeeRequest.php +++ b/src/Model/ContractUpdateEmployeeRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,19 +59,23 @@ class ContractUpdateEmployeeRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'personalDetails' => '\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest', - 'employmentDetails' => '\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest', + 'aggregatedServiceDate' => '\DateTime', 'autoEnrolment' => '\SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest', - 'leaveSettings' => '\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest', - 'rightToWork' => '\SynergiTech\Staffology\Model\ContractRightToWork', 'bankDetails' => '\SynergiTech\Staffology\Model\ContractBankDetails', - 'payOptions' => '\SynergiTech\Staffology\Model\ContractPayOptionsRequest', - 'tags' => 'string[]', - 'holidaySchemeUniqueId' => 'string', - 'aggregatedServiceDate' => '\DateTime', + 'defaultPensionSchemeName' => 'string', + 'defaultPensionSchemeUniqueId' => 'string', + 'defaultWorkerGroupName' => 'string', + 'defaultWorkerGroupUniqueId' => 'string', + 'employmentDetails' => '\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest', 'evcId' => 'string', - 'sourceSystemId' => 'string' + 'holidaySchemeUniqueId' => 'string', + 'id' => 'string', + 'leaveSettings' => '\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest', + 'payOptions' => '\SynergiTech\Staffology\Model\ContractPayOptionsRequest', + 'personalDetails' => '\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest', + 'rightToWork' => '\SynergiTech\Staffology\Model\ContractRightToWork', + 'sourceSystemId' => 'string', + 'tags' => 'string[]' ]; /** @@ -80,19 +84,23 @@ class ContractUpdateEmployeeRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'personalDetails' => null, - 'employmentDetails' => null, + 'aggregatedServiceDate' => 'date', 'autoEnrolment' => null, - 'leaveSettings' => null, - 'rightToWork' => null, 'bankDetails' => null, - 'payOptions' => null, - 'tags' => null, - 'holidaySchemeUniqueId' => 'uuid', - 'aggregatedServiceDate' => 'date', + 'defaultPensionSchemeName' => null, + 'defaultPensionSchemeUniqueId' => 'uuid', + 'defaultWorkerGroupName' => null, + 'defaultWorkerGroupUniqueId' => 'uuid', + 'employmentDetails' => null, 'evcId' => 'uuid', - 'sourceSystemId' => null + 'holidaySchemeUniqueId' => 'uuid', + 'id' => 'uuid', + 'leaveSettings' => null, + 'payOptions' => null, + 'personalDetails' => null, + 'rightToWork' => null, + 'sourceSystemId' => null, + 'tags' => null ]; /** @@ -101,19 +109,23 @@ class ContractUpdateEmployeeRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'personalDetails' => false, - 'employmentDetails' => false, + 'aggregatedServiceDate' => true, 'autoEnrolment' => false, - 'leaveSettings' => false, - 'rightToWork' => false, 'bankDetails' => false, - 'payOptions' => false, - 'tags' => true, - 'holidaySchemeUniqueId' => true, - 'aggregatedServiceDate' => true, + 'defaultPensionSchemeName' => true, + 'defaultPensionSchemeUniqueId' => true, + 'defaultWorkerGroupName' => true, + 'defaultWorkerGroupUniqueId' => true, + 'employmentDetails' => false, 'evcId' => true, - 'sourceSystemId' => true + 'holidaySchemeUniqueId' => true, + 'id' => false, + 'leaveSettings' => false, + 'payOptions' => false, + 'personalDetails' => false, + 'rightToWork' => false, + 'sourceSystemId' => true, + 'tags' => true ]; /** @@ -202,19 +214,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'personalDetails' => 'personalDetails', - 'employmentDetails' => 'employmentDetails', + 'aggregatedServiceDate' => 'aggregatedServiceDate', 'autoEnrolment' => 'autoEnrolment', - 'leaveSettings' => 'leaveSettings', - 'rightToWork' => 'rightToWork', 'bankDetails' => 'bankDetails', - 'payOptions' => 'payOptions', - 'tags' => 'tags', - 'holidaySchemeUniqueId' => 'holidaySchemeUniqueId', - 'aggregatedServiceDate' => 'aggregatedServiceDate', + 'defaultPensionSchemeName' => 'defaultPensionSchemeName', + 'defaultPensionSchemeUniqueId' => 'defaultPensionSchemeUniqueId', + 'defaultWorkerGroupName' => 'defaultWorkerGroupName', + 'defaultWorkerGroupUniqueId' => 'defaultWorkerGroupUniqueId', + 'employmentDetails' => 'employmentDetails', 'evcId' => 'evcId', - 'sourceSystemId' => 'sourceSystemId' + 'holidaySchemeUniqueId' => 'holidaySchemeUniqueId', + 'id' => 'id', + 'leaveSettings' => 'leaveSettings', + 'payOptions' => 'payOptions', + 'personalDetails' => 'personalDetails', + 'rightToWork' => 'rightToWork', + 'sourceSystemId' => 'sourceSystemId', + 'tags' => 'tags' ]; /** @@ -223,19 +239,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'personalDetails' => 'setPersonalDetails', - 'employmentDetails' => 'setEmploymentDetails', + 'aggregatedServiceDate' => 'setAggregatedServiceDate', 'autoEnrolment' => 'setAutoEnrolment', - 'leaveSettings' => 'setLeaveSettings', - 'rightToWork' => 'setRightToWork', 'bankDetails' => 'setBankDetails', - 'payOptions' => 'setPayOptions', - 'tags' => 'setTags', - 'holidaySchemeUniqueId' => 'setHolidaySchemeUniqueId', - 'aggregatedServiceDate' => 'setAggregatedServiceDate', + 'defaultPensionSchemeName' => 'setDefaultPensionSchemeName', + 'defaultPensionSchemeUniqueId' => 'setDefaultPensionSchemeUniqueId', + 'defaultWorkerGroupName' => 'setDefaultWorkerGroupName', + 'defaultWorkerGroupUniqueId' => 'setDefaultWorkerGroupUniqueId', + 'employmentDetails' => 'setEmploymentDetails', 'evcId' => 'setEvcId', - 'sourceSystemId' => 'setSourceSystemId' + 'holidaySchemeUniqueId' => 'setHolidaySchemeUniqueId', + 'id' => 'setId', + 'leaveSettings' => 'setLeaveSettings', + 'payOptions' => 'setPayOptions', + 'personalDetails' => 'setPersonalDetails', + 'rightToWork' => 'setRightToWork', + 'sourceSystemId' => 'setSourceSystemId', + 'tags' => 'setTags' ]; /** @@ -244,19 +264,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'personalDetails' => 'getPersonalDetails', - 'employmentDetails' => 'getEmploymentDetails', + 'aggregatedServiceDate' => 'getAggregatedServiceDate', 'autoEnrolment' => 'getAutoEnrolment', - 'leaveSettings' => 'getLeaveSettings', - 'rightToWork' => 'getRightToWork', 'bankDetails' => 'getBankDetails', - 'payOptions' => 'getPayOptions', - 'tags' => 'getTags', - 'holidaySchemeUniqueId' => 'getHolidaySchemeUniqueId', - 'aggregatedServiceDate' => 'getAggregatedServiceDate', + 'defaultPensionSchemeName' => 'getDefaultPensionSchemeName', + 'defaultPensionSchemeUniqueId' => 'getDefaultPensionSchemeUniqueId', + 'defaultWorkerGroupName' => 'getDefaultWorkerGroupName', + 'defaultWorkerGroupUniqueId' => 'getDefaultWorkerGroupUniqueId', + 'employmentDetails' => 'getEmploymentDetails', 'evcId' => 'getEvcId', - 'sourceSystemId' => 'getSourceSystemId' + 'holidaySchemeUniqueId' => 'getHolidaySchemeUniqueId', + 'id' => 'getId', + 'leaveSettings' => 'getLeaveSettings', + 'payOptions' => 'getPayOptions', + 'personalDetails' => 'getPersonalDetails', + 'rightToWork' => 'getRightToWork', + 'sourceSystemId' => 'getSourceSystemId', + 'tags' => 'getTags' ]; /** @@ -315,19 +339,23 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('personalDetails', $data ?? [], null); - $this->setIfExists('employmentDetails', $data ?? [], null); + $this->setIfExists('aggregatedServiceDate', $data ?? [], null); $this->setIfExists('autoEnrolment', $data ?? [], null); - $this->setIfExists('leaveSettings', $data ?? [], null); - $this->setIfExists('rightToWork', $data ?? [], null); $this->setIfExists('bankDetails', $data ?? [], null); - $this->setIfExists('payOptions', $data ?? [], null); - $this->setIfExists('tags', $data ?? [], null); - $this->setIfExists('holidaySchemeUniqueId', $data ?? [], null); - $this->setIfExists('aggregatedServiceDate', $data ?? [], null); + $this->setIfExists('defaultPensionSchemeName', $data ?? [], null); + $this->setIfExists('defaultPensionSchemeUniqueId', $data ?? [], null); + $this->setIfExists('defaultWorkerGroupName', $data ?? [], null); + $this->setIfExists('defaultWorkerGroupUniqueId', $data ?? [], null); + $this->setIfExists('employmentDetails', $data ?? [], null); $this->setIfExists('evcId', $data ?? [], null); + $this->setIfExists('holidaySchemeUniqueId', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('leaveSettings', $data ?? [], null); + $this->setIfExists('payOptions', $data ?? [], null); + $this->setIfExists('personalDetails', $data ?? [], null); + $this->setIfExists('rightToWork', $data ?? [], null); $this->setIfExists('sourceSystemId', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); } /** @@ -377,251 +405,286 @@ public function valid(): bool /** - * Gets id + * Gets aggregatedServiceDate * - * @return string|null + * @return \DateTime|null */ - public function getId(): ?string + public function getAggregatedServiceDate(): ?\DateTime { - return $this->container['id']; + return $this->container['aggregatedServiceDate']; } /** - * Sets id + * Sets aggregatedServiceDate * - * @param string|null $id The unique id of the object + * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate * * @return $this */ - public function setId(?string $id): static + public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($aggregatedServiceDate)) { + array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('aggregatedServiceDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; return $this; } /** - * Gets personalDetails + * Gets autoEnrolment * - * @return \SynergiTech\Staffology\Model\ContractPersonalDetailsRequest|null + * @return \SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest|null */ - public function getPersonalDetails(): ?\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest + public function getAutoEnrolment(): ?\SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest { - return $this->container['personalDetails']; + return $this->container['autoEnrolment']; } /** - * Sets personalDetails + * Sets autoEnrolment * - * @param \SynergiTech\Staffology\Model\ContractPersonalDetailsRequest|null $personalDetails personalDetails + * @param \SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest|null $autoEnrolment autoEnrolment * * @return $this */ - public function setPersonalDetails(?\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest $personalDetails): static + public function setAutoEnrolment(?\SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest $autoEnrolment): static { - if (is_null($personalDetails)) { - throw new InvalidArgumentException('non-nullable personalDetails cannot be null'); + if (is_null($autoEnrolment)) { + throw new InvalidArgumentException('non-nullable autoEnrolment cannot be null'); } - $this->container['personalDetails'] = $personalDetails; + $this->container['autoEnrolment'] = $autoEnrolment; return $this; } /** - * Gets employmentDetails + * Gets bankDetails * - * @return \SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest|null + * @return \SynergiTech\Staffology\Model\ContractBankDetails|null */ - public function getEmploymentDetails(): ?\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest + public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractBankDetails { - return $this->container['employmentDetails']; + return $this->container['bankDetails']; } /** - * Sets employmentDetails + * Sets bankDetails * - * @param \SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest|null $employmentDetails employmentDetails + * @param \SynergiTech\Staffology\Model\ContractBankDetails|null $bankDetails bankDetails * * @return $this */ - public function setEmploymentDetails(?\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest $employmentDetails): static + public function setBankDetails(?\SynergiTech\Staffology\Model\ContractBankDetails $bankDetails): static { - if (is_null($employmentDetails)) { - throw new InvalidArgumentException('non-nullable employmentDetails cannot be null'); + if (is_null($bankDetails)) { + throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); } - $this->container['employmentDetails'] = $employmentDetails; + $this->container['bankDetails'] = $bankDetails; return $this; } /** - * Gets autoEnrolment + * Gets defaultPensionSchemeName * - * @return \SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest|null + * @return string|null */ - public function getAutoEnrolment(): ?\SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest + public function getDefaultPensionSchemeName(): ?string { - return $this->container['autoEnrolment']; + return $this->container['defaultPensionSchemeName']; } /** - * Sets autoEnrolment + * Sets defaultPensionSchemeName * - * @param \SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest|null $autoEnrolment autoEnrolment + * @param string|null $defaultPensionSchemeName The name of the Pension Scheme that will be used for this employee. * * @return $this */ - public function setAutoEnrolment(?\SynergiTech\Staffology\Model\ContractAutoEnrolmentRequest $autoEnrolment): static + public function setDefaultPensionSchemeName(?string $defaultPensionSchemeName): static { - if (is_null($autoEnrolment)) { - throw new InvalidArgumentException('non-nullable autoEnrolment cannot be null'); + if (is_null($defaultPensionSchemeName)) { + array_push($this->openAPINullablesSetToNull, 'defaultPensionSchemeName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultPensionSchemeName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['autoEnrolment'] = $autoEnrolment; + $this->container['defaultPensionSchemeName'] = $defaultPensionSchemeName; return $this; } /** - * Gets leaveSettings + * Gets defaultPensionSchemeUniqueId * - * @return \SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest|null + * @return string|null */ - public function getLeaveSettings(): ?\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest + public function getDefaultPensionSchemeUniqueId(): ?string { - return $this->container['leaveSettings']; + return $this->container['defaultPensionSchemeUniqueId']; } /** - * Sets leaveSettings + * Sets defaultPensionSchemeUniqueId * - * @param \SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest|null $leaveSettings leaveSettings + * @param string|null $defaultPensionSchemeUniqueId The UniqueId of the Pension Scheme that will be used for this employee. * * @return $this */ - public function setLeaveSettings(?\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest $leaveSettings): static + public function setDefaultPensionSchemeUniqueId(?string $defaultPensionSchemeUniqueId): static { - if (is_null($leaveSettings)) { - throw new InvalidArgumentException('non-nullable leaveSettings cannot be null'); + if (is_null($defaultPensionSchemeUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'defaultPensionSchemeUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultPensionSchemeUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['leaveSettings'] = $leaveSettings; + $this->container['defaultPensionSchemeUniqueId'] = $defaultPensionSchemeUniqueId; return $this; } /** - * Gets rightToWork + * Gets defaultWorkerGroupName * - * @return \SynergiTech\Staffology\Model\ContractRightToWork|null + * @return string|null */ - public function getRightToWork(): ?\SynergiTech\Staffology\Model\ContractRightToWork + public function getDefaultWorkerGroupName(): ?string { - return $this->container['rightToWork']; + return $this->container['defaultWorkerGroupName']; } /** - * Sets rightToWork + * Sets defaultWorkerGroupName * - * @param \SynergiTech\Staffology\Model\ContractRightToWork|null $rightToWork rightToWork + * @param string|null $defaultWorkerGroupName The name of the Worker Group that will be used for this employee. * * @return $this */ - public function setRightToWork(?\SynergiTech\Staffology\Model\ContractRightToWork $rightToWork): static + public function setDefaultWorkerGroupName(?string $defaultWorkerGroupName): static { - if (is_null($rightToWork)) { - throw new InvalidArgumentException('non-nullable rightToWork cannot be null'); + if (is_null($defaultWorkerGroupName)) { + array_push($this->openAPINullablesSetToNull, 'defaultWorkerGroupName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultWorkerGroupName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['rightToWork'] = $rightToWork; + $this->container['defaultWorkerGroupName'] = $defaultWorkerGroupName; return $this; } /** - * Gets bankDetails + * Gets defaultWorkerGroupUniqueId * - * @return \SynergiTech\Staffology\Model\ContractBankDetails|null + * @return string|null */ - public function getBankDetails(): ?\SynergiTech\Staffology\Model\ContractBankDetails + public function getDefaultWorkerGroupUniqueId(): ?string { - return $this->container['bankDetails']; + return $this->container['defaultWorkerGroupUniqueId']; } /** - * Sets bankDetails + * Sets defaultWorkerGroupUniqueId * - * @param \SynergiTech\Staffology\Model\ContractBankDetails|null $bankDetails bankDetails + * @param string|null $defaultWorkerGroupUniqueId The UniqueId of the Worker Group that will be used for this employee. * * @return $this */ - public function setBankDetails(?\SynergiTech\Staffology\Model\ContractBankDetails $bankDetails): static + public function setDefaultWorkerGroupUniqueId(?string $defaultWorkerGroupUniqueId): static { - if (is_null($bankDetails)) { - throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); + if (is_null($defaultWorkerGroupUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'defaultWorkerGroupUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultWorkerGroupUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['bankDetails'] = $bankDetails; + $this->container['defaultWorkerGroupUniqueId'] = $defaultWorkerGroupUniqueId; return $this; } /** - * Gets payOptions + * Gets employmentDetails * - * @return \SynergiTech\Staffology\Model\ContractPayOptionsRequest|null + * @return \SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest|null */ - public function getPayOptions(): ?\SynergiTech\Staffology\Model\ContractPayOptionsRequest + public function getEmploymentDetails(): ?\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest { - return $this->container['payOptions']; + return $this->container['employmentDetails']; } /** - * Sets payOptions + * Sets employmentDetails * - * @param \SynergiTech\Staffology\Model\ContractPayOptionsRequest|null $payOptions payOptions + * @param \SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest|null $employmentDetails employmentDetails * * @return $this */ - public function setPayOptions(?\SynergiTech\Staffology\Model\ContractPayOptionsRequest $payOptions): static + public function setEmploymentDetails(?\SynergiTech\Staffology\Model\ContractEmploymentDetailsRequest $employmentDetails): static { - if (is_null($payOptions)) { - throw new InvalidArgumentException('non-nullable payOptions cannot be null'); + if (is_null($employmentDetails)) { + throw new InvalidArgumentException('non-nullable employmentDetails cannot be null'); } - $this->container['payOptions'] = $payOptions; + $this->container['employmentDetails'] = $employmentDetails; return $this; } /** - * Gets tags + * Gets evcId * - * @return string[]|null + * @return string|null */ - public function getTags(): ?array + public function getEvcId(): ?string { - return $this->container['tags']; + return $this->container['evcId']; } /** - * Sets tags + * Sets evcId * - * @param string[]|null $tags tags + * @param string|null $evcId If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. * * @return $this */ - public function setTags(?array $tags): static + public function setEvcId(?string $evcId): static { - if (is_null($tags)) { - array_push($this->openAPINullablesSetToNull, 'tags'); + if (is_null($evcId)) { + array_push($this->openAPINullablesSetToNull, 'evcId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tags', $nullablesSetToNull); + $index = array_search('evcId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tags'] = $tags; + $this->container['evcId'] = $evcId; return $this; } @@ -661,69 +724,136 @@ public function setHolidaySchemeUniqueId(?string $holidaySchemeUniqueId): static } /** - * Gets aggregatedServiceDate + * Gets id * - * @return \DateTime|null + * @return string|null */ - public function getAggregatedServiceDate(): ?\DateTime + public function getId(): ?string { - return $this->container['aggregatedServiceDate']; + return $this->container['id']; } /** - * Sets aggregatedServiceDate + * Sets id * - * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate + * @param string|null $id The unique id of the object * * @return $this */ - public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static + public function setId(?string $id): static { - if (is_null($aggregatedServiceDate)) { - array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aggregatedServiceDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; + $this->container['id'] = $id; return $this; } /** - * Gets evcId + * Gets leaveSettings * - * @return string|null + * @return \SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest|null */ - public function getEvcId(): ?string + public function getLeaveSettings(): ?\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest { - return $this->container['evcId']; + return $this->container['leaveSettings']; } /** - * Sets evcId + * Sets leaveSettings * - * @param string|null $evcId If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. + * @param \SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest|null $leaveSettings leaveSettings * * @return $this */ - public function setEvcId(?string $evcId): static + public function setLeaveSettings(?\SynergiTech\Staffology\Model\ContractEmployeeLeaveSettingsRequest $leaveSettings): static { - if (is_null($evcId)) { - array_push($this->openAPINullablesSetToNull, 'evcId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('evcId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($leaveSettings)) { + throw new InvalidArgumentException('non-nullable leaveSettings cannot be null'); } - $this->container['evcId'] = $evcId; + $this->container['leaveSettings'] = $leaveSettings; + + return $this; + } + + /** + * Gets payOptions + * + * @return \SynergiTech\Staffology\Model\ContractPayOptionsRequest|null + */ + public function getPayOptions(): ?\SynergiTech\Staffology\Model\ContractPayOptionsRequest + { + return $this->container['payOptions']; + } + + /** + * Sets payOptions + * + * @param \SynergiTech\Staffology\Model\ContractPayOptionsRequest|null $payOptions payOptions + * + * @return $this + */ + public function setPayOptions(?\SynergiTech\Staffology\Model\ContractPayOptionsRequest $payOptions): static + { + if (is_null($payOptions)) { + throw new InvalidArgumentException('non-nullable payOptions cannot be null'); + } + $this->container['payOptions'] = $payOptions; + + return $this; + } + + /** + * Gets personalDetails + * + * @return \SynergiTech\Staffology\Model\ContractPersonalDetailsRequest|null + */ + public function getPersonalDetails(): ?\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest + { + return $this->container['personalDetails']; + } + + /** + * Sets personalDetails + * + * @param \SynergiTech\Staffology\Model\ContractPersonalDetailsRequest|null $personalDetails personalDetails + * + * @return $this + */ + public function setPersonalDetails(?\SynergiTech\Staffology\Model\ContractPersonalDetailsRequest $personalDetails): static + { + if (is_null($personalDetails)) { + throw new InvalidArgumentException('non-nullable personalDetails cannot be null'); + } + $this->container['personalDetails'] = $personalDetails; + + return $this; + } + + /** + * Gets rightToWork + * + * @return \SynergiTech\Staffology\Model\ContractRightToWork|null + */ + public function getRightToWork(): ?\SynergiTech\Staffology\Model\ContractRightToWork + { + return $this->container['rightToWork']; + } + + /** + * Sets rightToWork + * + * @param \SynergiTech\Staffology\Model\ContractRightToWork|null $rightToWork rightToWork + * + * @return $this + */ + public function setRightToWork(?\SynergiTech\Staffology\Model\ContractRightToWork $rightToWork): static + { + if (is_null($rightToWork)) { + throw new InvalidArgumentException('non-nullable rightToWork cannot be null'); + } + $this->container['rightToWork'] = $rightToWork; return $this; } @@ -765,6 +895,40 @@ public function setSourceSystemId(?string $sourceSystemId): static return $this; } + + /** + * Gets tags + * + * @return string[]|null + */ + public function getTags(): ?array + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags tags + * + * @return $this + */ + public function setTags(?array $tags): static + { + if (is_null($tags)) { + array_push($this->openAPINullablesSetToNull, 'tags'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tags', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tags'] = $tags; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractVeteranDetails.php b/src/Model/ContractVeteranDetails.php index 4e75f0b..f2b6b38 100644 --- a/src/Model/ContractVeteranDetails.php +++ b/src/Model/ContractVeteranDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class ContractVeteranDetails implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'isVeteran' => 'bool', - 'firstCivilianEmploymentDate' => '\DateTime' + 'firstCivilianEmploymentDate' => '\DateTime', + 'isVeteran' => 'bool' ]; /** @@ -69,8 +69,8 @@ class ContractVeteranDetails implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ - 'isVeteran' => null, - 'firstCivilianEmploymentDate' => 'date' + 'firstCivilianEmploymentDate' => 'date', + 'isVeteran' => null ]; /** @@ -79,8 +79,8 @@ class ContractVeteranDetails implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ - 'isVeteran' => false, - 'firstCivilianEmploymentDate' => true + 'firstCivilianEmploymentDate' => true, + 'isVeteran' => false ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'isVeteran' => 'isVeteran', - 'firstCivilianEmploymentDate' => 'firstCivilianEmploymentDate' + 'firstCivilianEmploymentDate' => 'firstCivilianEmploymentDate', + 'isVeteran' => 'isVeteran' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'isVeteran' => 'setIsVeteran', - 'firstCivilianEmploymentDate' => 'setFirstCivilianEmploymentDate' + 'firstCivilianEmploymentDate' => 'setFirstCivilianEmploymentDate', + 'isVeteran' => 'setIsVeteran' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'isVeteran' => 'getIsVeteran', - 'firstCivilianEmploymentDate' => 'getFirstCivilianEmploymentDate' + 'firstCivilianEmploymentDate' => 'getFirstCivilianEmploymentDate', + 'isVeteran' => 'getIsVeteran' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('isVeteran', $data ?? [], null); $this->setIfExists('firstCivilianEmploymentDate', $data ?? [], null); + $this->setIfExists('isVeteran', $data ?? [], null); } /** @@ -295,33 +295,6 @@ public function valid(): bool } - /** - * Gets isVeteran - * - * @return bool|null - */ - public function getIsVeteran(): ?bool - { - return $this->container['isVeteran']; - } - - /** - * Sets isVeteran - * - * @param bool|null $isVeteran Set to true if the employee is a veteran - * - * @return $this - */ - public function setIsVeteran(?bool $isVeteran): static - { - if (is_null($isVeteran)) { - throw new InvalidArgumentException('non-nullable isVeteran cannot be null'); - } - $this->container['isVeteran'] = $isVeteran; - - return $this; - } - /** * Gets firstCivilianEmploymentDate * @@ -355,6 +328,33 @@ public function setFirstCivilianEmploymentDate(?\DateTime $firstCivilianEmployme return $this; } + + /** + * Gets isVeteran + * + * @return bool|null + */ + public function getIsVeteran(): ?bool + { + return $this->container['isVeteran']; + } + + /** + * Sets isVeteran + * + * @param bool|null $isVeteran Set to true if the employee is a veteran + * + * @return $this + */ + public function setIsVeteran(?bool $isVeteran): static + { + if (is_null($isVeteran)) { + throw new InvalidArgumentException('non-nullable isVeteran cannot be null'); + } + $this->container['isVeteran'] = $isVeteran; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractWorkerGroupRequest.php b/src/Model/ContractWorkerGroupRequest.php index b91b2eb..4566d52 100644 --- a/src/Model/ContractWorkerGroupRequest.php +++ b/src/Model/ContractWorkerGroupRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,35 +59,35 @@ class ContractWorkerGroupRequest implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'name' => 'string', + 'additionalVoluntaryContribution' => 'float', + 'assumedPensionablePay' => '\SynergiTech\Staffology\Model\AssumedPensionablePay', + 'avcIsPercentage' => 'bool', 'contributionLevelType' => '\SynergiTech\Staffology\Model\PensionContributionLevelType', + 'customThreshold' => 'bool', 'employeeContribution' => 'float', 'employeeContributionIsPercentage' => 'bool', 'employerContribution' => 'float', - 'employerContributionIsPercentage' => 'bool', - 'employerContributionTopUpPercentage' => 'float', 'employerContributionIncludesNiSaving' => 'bool', + 'employerContributionIsPercentage' => 'bool', + 'employerContributionNiSaving' => 'float', 'employerContributionNiSavingPercentage' => 'float', + 'employerContributionTopUpPercentage' => 'float', + 'employerReference' => 'string', + 'id' => 'string', 'isAvc' => 'bool', - 'additionalVoluntaryContribution' => 'float', - 'avcIsPercentage' => 'bool', - 'employerContributionNiSaving' => 'float', - 'customThreshold' => 'bool', - 'lowerLimit' => 'float', - 'upperLimit' => 'float', - 'papdisGroup' => 'string', - 'papdisSubGroup' => 'string', + 'lgpsFund' => '\SynergiTech\Staffology\Model\LgpsFund', 'localAuthorityNumber' => 'string', - 'schoolEmployerType' => 'string', + 'lowerLimit' => 'float', 'matIdentifier' => 'string', 'matUniqueNumber' => 'string', - 'employerReference' => 'string', - 'lgpsFund' => '\SynergiTech\Staffology\Model\LgpsFund', - 'workerGroupId' => 'string', - 'assumedPensionablePay' => '\SynergiTech\Staffology\Model\AssumedPensionablePay', + 'name' => 'string', + 'papdisGroup' => 'string', + 'papdisSubGroup' => 'string', + 'payslipDescription' => 'string', 'pensionablePayDefinition' => '\SynergiTech\Staffology\Model\PensionablePayDefinition', - 'payslipDescription' => 'string' + 'schoolEmployerType' => 'string', + 'upperLimit' => 'float', + 'workerGroupId' => 'string' ]; /** @@ -96,35 +96,35 @@ class ContractWorkerGroupRequest implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'name' => null, + 'additionalVoluntaryContribution' => 'double', + 'assumedPensionablePay' => null, + 'avcIsPercentage' => null, 'contributionLevelType' => null, + 'customThreshold' => null, 'employeeContribution' => 'double', 'employeeContributionIsPercentage' => null, 'employerContribution' => 'double', - 'employerContributionIsPercentage' => null, - 'employerContributionTopUpPercentage' => 'double', 'employerContributionIncludesNiSaving' => null, + 'employerContributionIsPercentage' => null, + 'employerContributionNiSaving' => 'double', 'employerContributionNiSavingPercentage' => 'double', + 'employerContributionTopUpPercentage' => 'double', + 'employerReference' => null, + 'id' => 'uuid', 'isAvc' => null, - 'additionalVoluntaryContribution' => 'double', - 'avcIsPercentage' => null, - 'employerContributionNiSaving' => 'double', - 'customThreshold' => null, - 'lowerLimit' => 'double', - 'upperLimit' => 'double', - 'papdisGroup' => null, - 'papdisSubGroup' => null, + 'lgpsFund' => null, 'localAuthorityNumber' => null, - 'schoolEmployerType' => null, + 'lowerLimit' => 'double', 'matIdentifier' => null, 'matUniqueNumber' => null, - 'employerReference' => null, - 'lgpsFund' => null, - 'workerGroupId' => 'uuid', - 'assumedPensionablePay' => null, + 'name' => null, + 'papdisGroup' => null, + 'papdisSubGroup' => null, + 'payslipDescription' => null, 'pensionablePayDefinition' => null, - 'payslipDescription' => null + 'schoolEmployerType' => null, + 'upperLimit' => 'double', + 'workerGroupId' => 'uuid' ]; /** @@ -133,35 +133,35 @@ class ContractWorkerGroupRequest implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'name' => true, + 'additionalVoluntaryContribution' => true, + 'assumedPensionablePay' => false, + 'avcIsPercentage' => true, 'contributionLevelType' => false, + 'customThreshold' => false, 'employeeContribution' => false, 'employeeContributionIsPercentage' => false, 'employerContribution' => false, - 'employerContributionIsPercentage' => false, - 'employerContributionTopUpPercentage' => false, 'employerContributionIncludesNiSaving' => false, + 'employerContributionIsPercentage' => false, + 'employerContributionNiSaving' => false, 'employerContributionNiSavingPercentage' => false, + 'employerContributionTopUpPercentage' => false, + 'employerReference' => true, + 'id' => false, 'isAvc' => false, - 'additionalVoluntaryContribution' => true, - 'avcIsPercentage' => true, - 'employerContributionNiSaving' => false, - 'customThreshold' => false, - 'lowerLimit' => false, - 'upperLimit' => false, - 'papdisGroup' => true, - 'papdisSubGroup' => true, + 'lgpsFund' => false, 'localAuthorityNumber' => true, - 'schoolEmployerType' => true, + 'lowerLimit' => false, 'matIdentifier' => true, 'matUniqueNumber' => true, - 'employerReference' => true, - 'lgpsFund' => false, - 'workerGroupId' => false, - 'assumedPensionablePay' => false, + 'name' => true, + 'papdisGroup' => true, + 'papdisSubGroup' => true, + 'payslipDescription' => true, 'pensionablePayDefinition' => false, - 'payslipDescription' => true + 'schoolEmployerType' => true, + 'upperLimit' => false, + 'workerGroupId' => false ]; /** @@ -250,35 +250,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'name' => 'name', + 'additionalVoluntaryContribution' => 'additionalVoluntaryContribution', + 'assumedPensionablePay' => 'assumedPensionablePay', + 'avcIsPercentage' => 'avcIsPercentage', 'contributionLevelType' => 'contributionLevelType', + 'customThreshold' => 'customThreshold', 'employeeContribution' => 'employeeContribution', 'employeeContributionIsPercentage' => 'employeeContributionIsPercentage', 'employerContribution' => 'employerContribution', - 'employerContributionIsPercentage' => 'employerContributionIsPercentage', - 'employerContributionTopUpPercentage' => 'employerContributionTopUpPercentage', 'employerContributionIncludesNiSaving' => 'employerContributionIncludesNiSaving', + 'employerContributionIsPercentage' => 'employerContributionIsPercentage', + 'employerContributionNiSaving' => 'employerContributionNiSaving', 'employerContributionNiSavingPercentage' => 'employerContributionNiSavingPercentage', + 'employerContributionTopUpPercentage' => 'employerContributionTopUpPercentage', + 'employerReference' => 'employerReference', + 'id' => 'id', 'isAvc' => 'isAvc', - 'additionalVoluntaryContribution' => 'additionalVoluntaryContribution', - 'avcIsPercentage' => 'avcIsPercentage', - 'employerContributionNiSaving' => 'employerContributionNiSaving', - 'customThreshold' => 'customThreshold', - 'lowerLimit' => 'lowerLimit', - 'upperLimit' => 'upperLimit', - 'papdisGroup' => 'papdisGroup', - 'papdisSubGroup' => 'papdisSubGroup', + 'lgpsFund' => 'lgpsFund', 'localAuthorityNumber' => 'localAuthorityNumber', - 'schoolEmployerType' => 'schoolEmployerType', + 'lowerLimit' => 'lowerLimit', 'matIdentifier' => 'matIdentifier', 'matUniqueNumber' => 'matUniqueNumber', - 'employerReference' => 'employerReference', - 'lgpsFund' => 'lgpsFund', - 'workerGroupId' => 'workerGroupId', - 'assumedPensionablePay' => 'assumedPensionablePay', + 'name' => 'name', + 'papdisGroup' => 'papdisGroup', + 'papdisSubGroup' => 'papdisSubGroup', + 'payslipDescription' => 'payslipDescription', 'pensionablePayDefinition' => 'pensionablePayDefinition', - 'payslipDescription' => 'payslipDescription' + 'schoolEmployerType' => 'schoolEmployerType', + 'upperLimit' => 'upperLimit', + 'workerGroupId' => 'workerGroupId' ]; /** @@ -287,35 +287,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'name' => 'setName', + 'additionalVoluntaryContribution' => 'setAdditionalVoluntaryContribution', + 'assumedPensionablePay' => 'setAssumedPensionablePay', + 'avcIsPercentage' => 'setAvcIsPercentage', 'contributionLevelType' => 'setContributionLevelType', + 'customThreshold' => 'setCustomThreshold', 'employeeContribution' => 'setEmployeeContribution', 'employeeContributionIsPercentage' => 'setEmployeeContributionIsPercentage', 'employerContribution' => 'setEmployerContribution', - 'employerContributionIsPercentage' => 'setEmployerContributionIsPercentage', - 'employerContributionTopUpPercentage' => 'setEmployerContributionTopUpPercentage', 'employerContributionIncludesNiSaving' => 'setEmployerContributionIncludesNiSaving', + 'employerContributionIsPercentage' => 'setEmployerContributionIsPercentage', + 'employerContributionNiSaving' => 'setEmployerContributionNiSaving', 'employerContributionNiSavingPercentage' => 'setEmployerContributionNiSavingPercentage', + 'employerContributionTopUpPercentage' => 'setEmployerContributionTopUpPercentage', + 'employerReference' => 'setEmployerReference', + 'id' => 'setId', 'isAvc' => 'setIsAvc', - 'additionalVoluntaryContribution' => 'setAdditionalVoluntaryContribution', - 'avcIsPercentage' => 'setAvcIsPercentage', - 'employerContributionNiSaving' => 'setEmployerContributionNiSaving', - 'customThreshold' => 'setCustomThreshold', - 'lowerLimit' => 'setLowerLimit', - 'upperLimit' => 'setUpperLimit', - 'papdisGroup' => 'setPapdisGroup', - 'papdisSubGroup' => 'setPapdisSubGroup', + 'lgpsFund' => 'setLgpsFund', 'localAuthorityNumber' => 'setLocalAuthorityNumber', - 'schoolEmployerType' => 'setSchoolEmployerType', + 'lowerLimit' => 'setLowerLimit', 'matIdentifier' => 'setMatIdentifier', 'matUniqueNumber' => 'setMatUniqueNumber', - 'employerReference' => 'setEmployerReference', - 'lgpsFund' => 'setLgpsFund', - 'workerGroupId' => 'setWorkerGroupId', - 'assumedPensionablePay' => 'setAssumedPensionablePay', + 'name' => 'setName', + 'papdisGroup' => 'setPapdisGroup', + 'papdisSubGroup' => 'setPapdisSubGroup', + 'payslipDescription' => 'setPayslipDescription', 'pensionablePayDefinition' => 'setPensionablePayDefinition', - 'payslipDescription' => 'setPayslipDescription' + 'schoolEmployerType' => 'setSchoolEmployerType', + 'upperLimit' => 'setUpperLimit', + 'workerGroupId' => 'setWorkerGroupId' ]; /** @@ -324,35 +324,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'name' => 'getName', + 'additionalVoluntaryContribution' => 'getAdditionalVoluntaryContribution', + 'assumedPensionablePay' => 'getAssumedPensionablePay', + 'avcIsPercentage' => 'getAvcIsPercentage', 'contributionLevelType' => 'getContributionLevelType', + 'customThreshold' => 'getCustomThreshold', 'employeeContribution' => 'getEmployeeContribution', 'employeeContributionIsPercentage' => 'getEmployeeContributionIsPercentage', 'employerContribution' => 'getEmployerContribution', - 'employerContributionIsPercentage' => 'getEmployerContributionIsPercentage', - 'employerContributionTopUpPercentage' => 'getEmployerContributionTopUpPercentage', 'employerContributionIncludesNiSaving' => 'getEmployerContributionIncludesNiSaving', + 'employerContributionIsPercentage' => 'getEmployerContributionIsPercentage', + 'employerContributionNiSaving' => 'getEmployerContributionNiSaving', 'employerContributionNiSavingPercentage' => 'getEmployerContributionNiSavingPercentage', + 'employerContributionTopUpPercentage' => 'getEmployerContributionTopUpPercentage', + 'employerReference' => 'getEmployerReference', + 'id' => 'getId', 'isAvc' => 'getIsAvc', - 'additionalVoluntaryContribution' => 'getAdditionalVoluntaryContribution', - 'avcIsPercentage' => 'getAvcIsPercentage', - 'employerContributionNiSaving' => 'getEmployerContributionNiSaving', - 'customThreshold' => 'getCustomThreshold', - 'lowerLimit' => 'getLowerLimit', - 'upperLimit' => 'getUpperLimit', - 'papdisGroup' => 'getPapdisGroup', - 'papdisSubGroup' => 'getPapdisSubGroup', + 'lgpsFund' => 'getLgpsFund', 'localAuthorityNumber' => 'getLocalAuthorityNumber', - 'schoolEmployerType' => 'getSchoolEmployerType', + 'lowerLimit' => 'getLowerLimit', 'matIdentifier' => 'getMatIdentifier', 'matUniqueNumber' => 'getMatUniqueNumber', - 'employerReference' => 'getEmployerReference', - 'lgpsFund' => 'getLgpsFund', - 'workerGroupId' => 'getWorkerGroupId', - 'assumedPensionablePay' => 'getAssumedPensionablePay', + 'name' => 'getName', + 'papdisGroup' => 'getPapdisGroup', + 'papdisSubGroup' => 'getPapdisSubGroup', + 'payslipDescription' => 'getPayslipDescription', 'pensionablePayDefinition' => 'getPensionablePayDefinition', - 'payslipDescription' => 'getPayslipDescription' + 'schoolEmployerType' => 'getSchoolEmployerType', + 'upperLimit' => 'getUpperLimit', + 'workerGroupId' => 'getWorkerGroupId' ]; /** @@ -411,35 +411,35 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('additionalVoluntaryContribution', $data ?? [], null); + $this->setIfExists('assumedPensionablePay', $data ?? [], null); + $this->setIfExists('avcIsPercentage', $data ?? [], null); $this->setIfExists('contributionLevelType', $data ?? [], null); + $this->setIfExists('customThreshold', $data ?? [], null); $this->setIfExists('employeeContribution', $data ?? [], null); $this->setIfExists('employeeContributionIsPercentage', $data ?? [], null); $this->setIfExists('employerContribution', $data ?? [], null); - $this->setIfExists('employerContributionIsPercentage', $data ?? [], null); - $this->setIfExists('employerContributionTopUpPercentage', $data ?? [], null); $this->setIfExists('employerContributionIncludesNiSaving', $data ?? [], null); + $this->setIfExists('employerContributionIsPercentage', $data ?? [], null); + $this->setIfExists('employerContributionNiSaving', $data ?? [], null); $this->setIfExists('employerContributionNiSavingPercentage', $data ?? [], null); + $this->setIfExists('employerContributionTopUpPercentage', $data ?? [], null); + $this->setIfExists('employerReference', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('isAvc', $data ?? [], null); - $this->setIfExists('additionalVoluntaryContribution', $data ?? [], null); - $this->setIfExists('avcIsPercentage', $data ?? [], null); - $this->setIfExists('employerContributionNiSaving', $data ?? [], null); - $this->setIfExists('customThreshold', $data ?? [], null); + $this->setIfExists('lgpsFund', $data ?? [], null); + $this->setIfExists('localAuthorityNumber', $data ?? [], null); $this->setIfExists('lowerLimit', $data ?? [], null); - $this->setIfExists('upperLimit', $data ?? [], null); + $this->setIfExists('matIdentifier', $data ?? [], null); + $this->setIfExists('matUniqueNumber', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('papdisGroup', $data ?? [], null); $this->setIfExists('papdisSubGroup', $data ?? [], null); - $this->setIfExists('localAuthorityNumber', $data ?? [], null); + $this->setIfExists('payslipDescription', $data ?? [], null); + $this->setIfExists('pensionablePayDefinition', $data ?? [], null); $this->setIfExists('schoolEmployerType', $data ?? [], null); - $this->setIfExists('matIdentifier', $data ?? [], null); - $this->setIfExists('matUniqueNumber', $data ?? [], null); - $this->setIfExists('employerReference', $data ?? [], null); - $this->setIfExists('lgpsFund', $data ?? [], null); + $this->setIfExists('upperLimit', $data ?? [], null); $this->setIfExists('workerGroupId', $data ?? [], null); - $this->setIfExists('assumedPensionablePay', $data ?? [], null); - $this->setIfExists('pensionablePayDefinition', $data ?? [], null); - $this->setIfExists('payslipDescription', $data ?? [], null); } /** @@ -485,62 +485,96 @@ public function valid(): bool /** - * Gets id + * Gets additionalVoluntaryContribution * - * @return string|null + * @return float|null */ - public function getId(): ?string + public function getAdditionalVoluntaryContribution(): ?float { - return $this->container['id']; + return $this->container['additionalVoluntaryContribution']; } /** - * Sets id + * Sets additionalVoluntaryContribution * - * @param string|null $id id + * @param float|null $additionalVoluntaryContribution Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. * * @return $this */ - public function setId(?string $id): static + public function setAdditionalVoluntaryContribution(?float $additionalVoluntaryContribution): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($additionalVoluntaryContribution)) { + array_push($this->openAPINullablesSetToNull, 'additionalVoluntaryContribution'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('additionalVoluntaryContribution', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['additionalVoluntaryContribution'] = $additionalVoluntaryContribution; return $this; } /** - * Gets name + * Gets assumedPensionablePay * - * @return string|null + * @return \SynergiTech\Staffology\Model\AssumedPensionablePay|null */ - public function getName(): ?string + public function getAssumedPensionablePay(): ?\SynergiTech\Staffology\Model\AssumedPensionablePay { - return $this->container['name']; + return $this->container['assumedPensionablePay']; } /** - * Sets name + * Sets assumedPensionablePay * - * @param string|null $name name + * @param \SynergiTech\Staffology\Model\AssumedPensionablePay|null $assumedPensionablePay assumedPensionablePay * * @return $this */ - public function setName(?string $name): static + public function setAssumedPensionablePay(?\SynergiTech\Staffology\Model\AssumedPensionablePay $assumedPensionablePay): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($assumedPensionablePay)) { + throw new InvalidArgumentException('non-nullable assumedPensionablePay cannot be null'); + } + $this->container['assumedPensionablePay'] = $assumedPensionablePay; + + return $this; + } + + /** + * Gets avcIsPercentage + * + * @return bool|null + */ + public function getAvcIsPercentage(): ?bool + { + return $this->container['avcIsPercentage']; + } + + /** + * Sets avcIsPercentage + * + * @param bool|null $avcIsPercentage Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, + * + * @return $this + */ + public function setAvcIsPercentage(?bool $avcIsPercentage): static + { + if (is_null($avcIsPercentage)) { + array_push($this->openAPINullablesSetToNull, 'avcIsPercentage'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('avcIsPercentage', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['avcIsPercentage'] = $avcIsPercentage; return $this; } @@ -572,6 +606,33 @@ public function setContributionLevelType(?\SynergiTech\Staffology\Model\PensionC return $this; } + /** + * Gets customThreshold + * + * @return bool|null + */ + public function getCustomThreshold(): ?bool + { + return $this->container['customThreshold']; + } + + /** + * Sets customThreshold + * + * @param bool|null $customThreshold customThreshold + * + * @return $this + */ + public function setCustomThreshold(?bool $customThreshold): static + { + if (is_null($customThreshold)) { + throw new InvalidArgumentException('non-nullable customThreshold cannot be null'); + } + $this->container['customThreshold'] = $customThreshold; + + return $this; + } + /** * Gets employeeContribution * @@ -654,82 +715,82 @@ public function setEmployerContribution(?float $employerContribution): static } /** - * Gets employerContributionIsPercentage + * Gets employerContributionIncludesNiSaving * * @return bool|null */ - public function getEmployerContributionIsPercentage(): ?bool + public function getEmployerContributionIncludesNiSaving(): ?bool { - return $this->container['employerContributionIsPercentage']; + return $this->container['employerContributionIncludesNiSaving']; } /** - * Sets employerContributionIsPercentage + * Sets employerContributionIncludesNiSaving * - * @param bool|null $employerContributionIsPercentage employerContributionIsPercentage + * @param bool|null $employerContributionIncludesNiSaving Employer Contribution includes the Employers NI saving * * @return $this */ - public function setEmployerContributionIsPercentage(?bool $employerContributionIsPercentage): static + public function setEmployerContributionIncludesNiSaving(?bool $employerContributionIncludesNiSaving): static { - if (is_null($employerContributionIsPercentage)) { - throw new InvalidArgumentException('non-nullable employerContributionIsPercentage cannot be null'); + if (is_null($employerContributionIncludesNiSaving)) { + throw new InvalidArgumentException('non-nullable employerContributionIncludesNiSaving cannot be null'); } - $this->container['employerContributionIsPercentage'] = $employerContributionIsPercentage; + $this->container['employerContributionIncludesNiSaving'] = $employerContributionIncludesNiSaving; return $this; } /** - * Gets employerContributionTopUpPercentage + * Gets employerContributionIsPercentage * - * @return float|null + * @return bool|null */ - public function getEmployerContributionTopUpPercentage(): ?float + public function getEmployerContributionIsPercentage(): ?bool { - return $this->container['employerContributionTopUpPercentage']; + return $this->container['employerContributionIsPercentage']; } /** - * Sets employerContributionTopUpPercentage + * Sets employerContributionIsPercentage * - * @param float|null $employerContributionTopUpPercentage Increase Employer Contribution by this percentage of the Employee Contribution + * @param bool|null $employerContributionIsPercentage employerContributionIsPercentage * * @return $this */ - public function setEmployerContributionTopUpPercentage(?float $employerContributionTopUpPercentage): static + public function setEmployerContributionIsPercentage(?bool $employerContributionIsPercentage): static { - if (is_null($employerContributionTopUpPercentage)) { - throw new InvalidArgumentException('non-nullable employerContributionTopUpPercentage cannot be null'); + if (is_null($employerContributionIsPercentage)) { + throw new InvalidArgumentException('non-nullable employerContributionIsPercentage cannot be null'); } - $this->container['employerContributionTopUpPercentage'] = $employerContributionTopUpPercentage; + $this->container['employerContributionIsPercentage'] = $employerContributionIsPercentage; return $this; } /** - * Gets employerContributionIncludesNiSaving + * Gets employerContributionNiSaving * - * @return bool|null + * @return float|null */ - public function getEmployerContributionIncludesNiSaving(): ?bool + public function getEmployerContributionNiSaving(): ?float { - return $this->container['employerContributionIncludesNiSaving']; + return $this->container['employerContributionNiSaving']; } /** - * Sets employerContributionIncludesNiSaving + * Sets employerContributionNiSaving * - * @param bool|null $employerContributionIncludesNiSaving Employer Contribution includes the Employers NI saving + * @param float|null $employerContributionNiSaving Employers NI Saving * * @return $this */ - public function setEmployerContributionIncludesNiSaving(?bool $employerContributionIncludesNiSaving): static + public function setEmployerContributionNiSaving(?float $employerContributionNiSaving): static { - if (is_null($employerContributionIncludesNiSaving)) { - throw new InvalidArgumentException('non-nullable employerContributionIncludesNiSaving cannot be null'); + if (is_null($employerContributionNiSaving)) { + throw new InvalidArgumentException('non-nullable employerContributionNiSaving cannot be null'); } - $this->container['employerContributionIncludesNiSaving'] = $employerContributionIncludesNiSaving; + $this->container['employerContributionNiSaving'] = $employerContributionNiSaving; return $this; } @@ -762,584 +823,523 @@ public function setEmployerContributionNiSavingPercentage(?float $employerContri } /** - * Gets isAvc + * Gets employerContributionTopUpPercentage * - * @return bool|null + * @return float|null */ - public function getIsAvc(): ?bool + public function getEmployerContributionTopUpPercentage(): ?float { - return $this->container['isAvc']; + return $this->container['employerContributionTopUpPercentage']; } /** - * Sets isAvc + * Sets employerContributionTopUpPercentage * - * @param bool|null $isAvc Determines whether the workergroup uses additonal voluntary contributions. This property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC. + * @param float|null $employerContributionTopUpPercentage Increase Employer Contribution by this percentage of the Employee Contribution * * @return $this */ - public function setIsAvc(?bool $isAvc): static + public function setEmployerContributionTopUpPercentage(?float $employerContributionTopUpPercentage): static { - if (is_null($isAvc)) { - throw new InvalidArgumentException('non-nullable isAvc cannot be null'); + if (is_null($employerContributionTopUpPercentage)) { + throw new InvalidArgumentException('non-nullable employerContributionTopUpPercentage cannot be null'); } - $this->container['isAvc'] = $isAvc; + $this->container['employerContributionTopUpPercentage'] = $employerContributionTopUpPercentage; return $this; } /** - * Gets additionalVoluntaryContribution + * Gets employerReference * - * @return float|null + * @return string|null */ - public function getAdditionalVoluntaryContribution(): ?float + public function getEmployerReference(): ?string { - return $this->container['additionalVoluntaryContribution']; + return $this->container['employerReference']; } /** - * Sets additionalVoluntaryContribution + * Sets employerReference * - * @param float|null $additionalVoluntaryContribution Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. + * @param string|null $employerReference employerReference * * @return $this */ - public function setAdditionalVoluntaryContribution(?float $additionalVoluntaryContribution): static + public function setEmployerReference(?string $employerReference): static { - if (is_null($additionalVoluntaryContribution)) { - array_push($this->openAPINullablesSetToNull, 'additionalVoluntaryContribution'); + if (is_null($employerReference)) { + array_push($this->openAPINullablesSetToNull, 'employerReference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('additionalVoluntaryContribution', $nullablesSetToNull); + $index = array_search('employerReference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['additionalVoluntaryContribution'] = $additionalVoluntaryContribution; + $this->container['employerReference'] = $employerReference; return $this; } /** - * Gets avcIsPercentage + * Gets id * - * @return bool|null + * @return string|null */ - public function getAvcIsPercentage(): ?bool + public function getId(): ?string { - return $this->container['avcIsPercentage']; + return $this->container['id']; } /** - * Sets avcIsPercentage + * Sets id * - * @param bool|null $avcIsPercentage Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, + * @param string|null $id id * * @return $this */ - public function setAvcIsPercentage(?bool $avcIsPercentage): static + public function setId(?string $id): static { - if (is_null($avcIsPercentage)) { - array_push($this->openAPINullablesSetToNull, 'avcIsPercentage'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('avcIsPercentage', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['avcIsPercentage'] = $avcIsPercentage; + $this->container['id'] = $id; return $this; } /** - * Gets employerContributionNiSaving + * Gets isAvc * - * @return float|null + * @return bool|null */ - public function getEmployerContributionNiSaving(): ?float + public function getIsAvc(): ?bool { - return $this->container['employerContributionNiSaving']; + return $this->container['isAvc']; } /** - * Sets employerContributionNiSaving + * Sets isAvc * - * @param float|null $employerContributionNiSaving Employers NI Saving + * @param bool|null $isAvc Determines whether the workergroup uses additonal voluntary contributions. This property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC. * * @return $this */ - public function setEmployerContributionNiSaving(?float $employerContributionNiSaving): static + public function setIsAvc(?bool $isAvc): static { - if (is_null($employerContributionNiSaving)) { - throw new InvalidArgumentException('non-nullable employerContributionNiSaving cannot be null'); + if (is_null($isAvc)) { + throw new InvalidArgumentException('non-nullable isAvc cannot be null'); } - $this->container['employerContributionNiSaving'] = $employerContributionNiSaving; + $this->container['isAvc'] = $isAvc; return $this; } /** - * Gets customThreshold + * Gets lgpsFund * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsFund|null */ - public function getCustomThreshold(): ?bool + public function getLgpsFund(): ?\SynergiTech\Staffology\Model\LgpsFund { - return $this->container['customThreshold']; + return $this->container['lgpsFund']; } /** - * Sets customThreshold + * Sets lgpsFund * - * @param bool|null $customThreshold customThreshold + * @param \SynergiTech\Staffology\Model\LgpsFund|null $lgpsFund lgpsFund * * @return $this */ - public function setCustomThreshold(?bool $customThreshold): static + public function setLgpsFund(?\SynergiTech\Staffology\Model\LgpsFund $lgpsFund): static { - if (is_null($customThreshold)) { - throw new InvalidArgumentException('non-nullable customThreshold cannot be null'); + if (is_null($lgpsFund)) { + throw new InvalidArgumentException('non-nullable lgpsFund cannot be null'); } - $this->container['customThreshold'] = $customThreshold; + $this->container['lgpsFund'] = $lgpsFund; return $this; } /** - * Gets lowerLimit + * Gets localAuthorityNumber * - * @return float|null + * @return string|null */ - public function getLowerLimit(): ?float + public function getLocalAuthorityNumber(): ?string { - return $this->container['lowerLimit']; + return $this->container['localAuthorityNumber']; } /** - * Sets lowerLimit + * Sets localAuthorityNumber * - * @param float|null $lowerLimit lowerLimit + * @param string|null $localAuthorityNumber Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales * * @return $this */ - public function setLowerLimit(?float $lowerLimit): static + public function setLocalAuthorityNumber(?string $localAuthorityNumber): static { - if (is_null($lowerLimit)) { - throw new InvalidArgumentException('non-nullable lowerLimit cannot be null'); + if (is_null($localAuthorityNumber)) { + array_push($this->openAPINullablesSetToNull, 'localAuthorityNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('localAuthorityNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['lowerLimit'] = $lowerLimit; + $this->container['localAuthorityNumber'] = $localAuthorityNumber; return $this; } /** - * Gets upperLimit + * Gets lowerLimit * * @return float|null */ - public function getUpperLimit(): ?float - { - return $this->container['upperLimit']; - } - - /** - * Sets upperLimit - * - * @param float|null $upperLimit upperLimit - * - * @return $this - */ - public function setUpperLimit(?float $upperLimit): static - { - if (is_null($upperLimit)) { - throw new InvalidArgumentException('non-nullable upperLimit cannot be null'); - } - $this->container['upperLimit'] = $upperLimit; - - return $this; - } - - /** - * Gets papdisGroup - * - * @return string|null - */ - public function getPapdisGroup(): ?string + public function getLowerLimit(): ?float { - return $this->container['papdisGroup']; + return $this->container['lowerLimit']; } /** - * Sets papdisGroup + * Sets lowerLimit * - * @param string|null $papdisGroup papdisGroup + * @param float|null $lowerLimit lowerLimit * * @return $this */ - public function setPapdisGroup(?string $papdisGroup): static + public function setLowerLimit(?float $lowerLimit): static { - if (is_null($papdisGroup)) { - array_push($this->openAPINullablesSetToNull, 'papdisGroup'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisGroup', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($lowerLimit)) { + throw new InvalidArgumentException('non-nullable lowerLimit cannot be null'); } - $this->container['papdisGroup'] = $papdisGroup; + $this->container['lowerLimit'] = $lowerLimit; return $this; } /** - * Gets papdisSubGroup + * Gets matIdentifier * * @return string|null */ - public function getPapdisSubGroup(): ?string + public function getMatIdentifier(): ?string { - return $this->container['papdisSubGroup']; + return $this->container['matIdentifier']; } /** - * Sets papdisSubGroup + * Sets matIdentifier * - * @param string|null $papdisSubGroup papdisSubGroup + * @param string|null $matIdentifier Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales * * @return $this */ - public function setPapdisSubGroup(?string $papdisSubGroup): static + public function setMatIdentifier(?string $matIdentifier): static { - if (is_null($papdisSubGroup)) { - array_push($this->openAPINullablesSetToNull, 'papdisSubGroup'); + if (is_null($matIdentifier)) { + array_push($this->openAPINullablesSetToNull, 'matIdentifier'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisSubGroup', $nullablesSetToNull); + $index = array_search('matIdentifier', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['papdisSubGroup'] = $papdisSubGroup; + $this->container['matIdentifier'] = $matIdentifier; return $this; } /** - * Gets localAuthorityNumber + * Gets matUniqueNumber * * @return string|null */ - public function getLocalAuthorityNumber(): ?string + public function getMatUniqueNumber(): ?string { - return $this->container['localAuthorityNumber']; + return $this->container['matUniqueNumber']; } /** - * Sets localAuthorityNumber + * Sets matUniqueNumber * - * @param string|null $localAuthorityNumber Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales + * @param string|null $matUniqueNumber Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales * * @return $this */ - public function setLocalAuthorityNumber(?string $localAuthorityNumber): static + public function setMatUniqueNumber(?string $matUniqueNumber): static { - if (is_null($localAuthorityNumber)) { - array_push($this->openAPINullablesSetToNull, 'localAuthorityNumber'); + if (is_null($matUniqueNumber)) { + array_push($this->openAPINullablesSetToNull, 'matUniqueNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('localAuthorityNumber', $nullablesSetToNull); + $index = array_search('matUniqueNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['localAuthorityNumber'] = $localAuthorityNumber; + $this->container['matUniqueNumber'] = $matUniqueNumber; return $this; } /** - * Gets schoolEmployerType + * Gets name * * @return string|null */ - public function getSchoolEmployerType(): ?string + public function getName(): ?string { - return $this->container['schoolEmployerType']; + return $this->container['name']; } /** - * Sets schoolEmployerType + * Sets name * - * @param string|null $schoolEmployerType Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales + * @param string|null $name name * * @return $this */ - public function setSchoolEmployerType(?string $schoolEmployerType): static + public function setName(?string $name): static { - if (is_null($schoolEmployerType)) { - array_push($this->openAPINullablesSetToNull, 'schoolEmployerType'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('schoolEmployerType', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['schoolEmployerType'] = $schoolEmployerType; + $this->container['name'] = $name; return $this; } /** - * Gets matIdentifier + * Gets papdisGroup * * @return string|null */ - public function getMatIdentifier(): ?string + public function getPapdisGroup(): ?string { - return $this->container['matIdentifier']; + return $this->container['papdisGroup']; } /** - * Sets matIdentifier + * Sets papdisGroup * - * @param string|null $matIdentifier Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales + * @param string|null $papdisGroup papdisGroup * * @return $this */ - public function setMatIdentifier(?string $matIdentifier): static + public function setPapdisGroup(?string $papdisGroup): static { - if (is_null($matIdentifier)) { - array_push($this->openAPINullablesSetToNull, 'matIdentifier'); + if (is_null($papdisGroup)) { + array_push($this->openAPINullablesSetToNull, 'papdisGroup'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('matIdentifier', $nullablesSetToNull); + $index = array_search('papdisGroup', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['matIdentifier'] = $matIdentifier; + $this->container['papdisGroup'] = $papdisGroup; return $this; } /** - * Gets matUniqueNumber + * Gets papdisSubGroup * * @return string|null */ - public function getMatUniqueNumber(): ?string + public function getPapdisSubGroup(): ?string { - return $this->container['matUniqueNumber']; + return $this->container['papdisSubGroup']; } /** - * Sets matUniqueNumber + * Sets papdisSubGroup * - * @param string|null $matUniqueNumber Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales + * @param string|null $papdisSubGroup papdisSubGroup * * @return $this */ - public function setMatUniqueNumber(?string $matUniqueNumber): static + public function setPapdisSubGroup(?string $papdisSubGroup): static { - if (is_null($matUniqueNumber)) { - array_push($this->openAPINullablesSetToNull, 'matUniqueNumber'); + if (is_null($papdisSubGroup)) { + array_push($this->openAPINullablesSetToNull, 'papdisSubGroup'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('matUniqueNumber', $nullablesSetToNull); + $index = array_search('papdisSubGroup', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['matUniqueNumber'] = $matUniqueNumber; + $this->container['papdisSubGroup'] = $papdisSubGroup; return $this; } /** - * Gets employerReference + * Gets payslipDescription * * @return string|null */ - public function getEmployerReference(): ?string + public function getPayslipDescription(): ?string { - return $this->container['employerReference']; + return $this->container['payslipDescription']; } /** - * Sets employerReference + * Sets payslipDescription * - * @param string|null $employerReference employerReference + * @param string|null $payslipDescription Used for overwriting the pension description that is displayed on the payslip * * @return $this */ - public function setEmployerReference(?string $employerReference): static + public function setPayslipDescription(?string $payslipDescription): static { - if (is_null($employerReference)) { - array_push($this->openAPINullablesSetToNull, 'employerReference'); + if (is_null($payslipDescription)) { + array_push($this->openAPINullablesSetToNull, 'payslipDescription'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerReference', $nullablesSetToNull); + $index = array_search('payslipDescription', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employerReference'] = $employerReference; + $this->container['payslipDescription'] = $payslipDescription; return $this; } /** - * Gets lgpsFund + * Gets pensionablePayDefinition * - * @return \SynergiTech\Staffology\Model\LgpsFund|null + * @return \SynergiTech\Staffology\Model\PensionablePayDefinition|null */ - public function getLgpsFund(): ?\SynergiTech\Staffology\Model\LgpsFund + public function getPensionablePayDefinition(): ?\SynergiTech\Staffology\Model\PensionablePayDefinition { - return $this->container['lgpsFund']; + return $this->container['pensionablePayDefinition']; } /** - * Sets lgpsFund + * Sets pensionablePayDefinition * - * @param \SynergiTech\Staffology\Model\LgpsFund|null $lgpsFund lgpsFund + * @param \SynergiTech\Staffology\Model\PensionablePayDefinition|null $pensionablePayDefinition pensionablePayDefinition * * @return $this */ - public function setLgpsFund(?\SynergiTech\Staffology\Model\LgpsFund $lgpsFund): static + public function setPensionablePayDefinition(?\SynergiTech\Staffology\Model\PensionablePayDefinition $pensionablePayDefinition): static { - if (is_null($lgpsFund)) { - throw new InvalidArgumentException('non-nullable lgpsFund cannot be null'); + if (is_null($pensionablePayDefinition)) { + throw new InvalidArgumentException('non-nullable pensionablePayDefinition cannot be null'); } - $this->container['lgpsFund'] = $lgpsFund; + $this->container['pensionablePayDefinition'] = $pensionablePayDefinition; return $this; } /** - * Gets workerGroupId + * Gets schoolEmployerType * * @return string|null */ - public function getWorkerGroupId(): ?string - { - return $this->container['workerGroupId']; - } - - /** - * Sets workerGroupId - * - * @param string|null $workerGroupId [readonly] - * - * @return $this - */ - public function setWorkerGroupId(?string $workerGroupId): static - { - if (is_null($workerGroupId)) { - throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); - } - $this->container['workerGroupId'] = $workerGroupId; - - return $this; - } - - /** - * Gets assumedPensionablePay - * - * @return \SynergiTech\Staffology\Model\AssumedPensionablePay|null - */ - public function getAssumedPensionablePay(): ?\SynergiTech\Staffology\Model\AssumedPensionablePay + public function getSchoolEmployerType(): ?string { - return $this->container['assumedPensionablePay']; + return $this->container['schoolEmployerType']; } /** - * Sets assumedPensionablePay + * Sets schoolEmployerType * - * @param \SynergiTech\Staffology\Model\AssumedPensionablePay|null $assumedPensionablePay assumedPensionablePay + * @param string|null $schoolEmployerType Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales * * @return $this */ - public function setAssumedPensionablePay(?\SynergiTech\Staffology\Model\AssumedPensionablePay $assumedPensionablePay): static + public function setSchoolEmployerType(?string $schoolEmployerType): static { - if (is_null($assumedPensionablePay)) { - throw new InvalidArgumentException('non-nullable assumedPensionablePay cannot be null'); + if (is_null($schoolEmployerType)) { + array_push($this->openAPINullablesSetToNull, 'schoolEmployerType'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('schoolEmployerType', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['assumedPensionablePay'] = $assumedPensionablePay; + $this->container['schoolEmployerType'] = $schoolEmployerType; return $this; } /** - * Gets pensionablePayDefinition + * Gets upperLimit * - * @return \SynergiTech\Staffology\Model\PensionablePayDefinition|null + * @return float|null */ - public function getPensionablePayDefinition(): ?\SynergiTech\Staffology\Model\PensionablePayDefinition + public function getUpperLimit(): ?float { - return $this->container['pensionablePayDefinition']; + return $this->container['upperLimit']; } /** - * Sets pensionablePayDefinition + * Sets upperLimit * - * @param \SynergiTech\Staffology\Model\PensionablePayDefinition|null $pensionablePayDefinition pensionablePayDefinition + * @param float|null $upperLimit upperLimit * * @return $this */ - public function setPensionablePayDefinition(?\SynergiTech\Staffology\Model\PensionablePayDefinition $pensionablePayDefinition): static + public function setUpperLimit(?float $upperLimit): static { - if (is_null($pensionablePayDefinition)) { - throw new InvalidArgumentException('non-nullable pensionablePayDefinition cannot be null'); + if (is_null($upperLimit)) { + throw new InvalidArgumentException('non-nullable upperLimit cannot be null'); } - $this->container['pensionablePayDefinition'] = $pensionablePayDefinition; + $this->container['upperLimit'] = $upperLimit; return $this; } /** - * Gets payslipDescription + * Gets workerGroupId * * @return string|null */ - public function getPayslipDescription(): ?string + public function getWorkerGroupId(): ?string { - return $this->container['payslipDescription']; + return $this->container['workerGroupId']; } /** - * Sets payslipDescription + * Sets workerGroupId * - * @param string|null $payslipDescription Used for overwriting the pension description that is displayed on the payslip + * @param string|null $workerGroupId [readonly] * * @return $this */ - public function setPayslipDescription(?string $payslipDescription): static + public function setWorkerGroupId(?string $workerGroupId): static { - if (is_null($payslipDescription)) { - array_push($this->openAPINullablesSetToNull, 'payslipDescription'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payslipDescription', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($workerGroupId)) { + throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); } - $this->container['payslipDescription'] = $payslipDescription; + $this->container['workerGroupId'] = $workerGroupId; return $this; } diff --git a/src/Model/ContractWorkerGroupResponse.php b/src/Model/ContractWorkerGroupResponse.php index e5badbb..3957f98 100644 --- a/src/Model/ContractWorkerGroupResponse.php +++ b/src/Model/ContractWorkerGroupResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,35 +59,35 @@ class ContractWorkerGroupResponse implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPITypes = [ - 'id' => 'string', - 'name' => 'string', + 'additionalVoluntaryContribution' => 'float', + 'assumedPensionablePay' => '\SynergiTech\Staffology\Model\AssumedPensionablePay', + 'avcIsPercentage' => 'bool', 'contributionLevelType' => '\SynergiTech\Staffology\Model\PensionContributionLevelType', + 'customThreshold' => 'bool', 'employeeContribution' => 'float', 'employeeContributionIsPercentage' => 'bool', 'employerContribution' => 'float', - 'employerContributionIsPercentage' => 'bool', - 'employerContributionTopUpPercentage' => 'float', 'employerContributionIncludesNiSaving' => 'bool', + 'employerContributionIsPercentage' => 'bool', + 'employerContributionNiSaving' => 'float', 'employerContributionNiSavingPercentage' => 'float', + 'employerContributionTopUpPercentage' => 'float', + 'employerReference' => 'string', + 'id' => 'string', 'isAvc' => 'bool', - 'additionalVoluntaryContribution' => 'float', - 'avcIsPercentage' => 'bool', - 'employerContributionNiSaving' => 'float', - 'customThreshold' => 'bool', - 'lowerLimit' => 'float', - 'upperLimit' => 'float', - 'papdisGroup' => 'string', - 'papdisSubGroup' => 'string', + 'lgpsFund' => '\SynergiTech\Staffology\Model\LgpsFund', 'localAuthorityNumber' => 'string', - 'schoolEmployerType' => 'string', + 'lowerLimit' => 'float', 'matIdentifier' => 'string', 'matUniqueNumber' => 'string', - 'employerReference' => 'string', - 'lgpsFund' => '\SynergiTech\Staffology\Model\LgpsFund', - 'workerGroupId' => 'string', - 'assumedPensionablePay' => '\SynergiTech\Staffology\Model\AssumedPensionablePay', + 'name' => 'string', + 'papdisGroup' => 'string', + 'papdisSubGroup' => 'string', + 'payslipDescription' => 'string', 'pensionablePayDefinition' => '\SynergiTech\Staffology\Model\PensionablePayDefinition', - 'payslipDescription' => 'string' + 'schoolEmployerType' => 'string', + 'upperLimit' => 'float', + 'workerGroupId' => 'string' ]; /** @@ -96,35 +96,35 @@ class ContractWorkerGroupResponse implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPIFormats = [ - 'id' => 'uuid', - 'name' => null, + 'additionalVoluntaryContribution' => 'double', + 'assumedPensionablePay' => null, + 'avcIsPercentage' => null, 'contributionLevelType' => null, + 'customThreshold' => null, 'employeeContribution' => 'double', 'employeeContributionIsPercentage' => null, 'employerContribution' => 'double', - 'employerContributionIsPercentage' => null, - 'employerContributionTopUpPercentage' => 'double', 'employerContributionIncludesNiSaving' => null, + 'employerContributionIsPercentage' => null, + 'employerContributionNiSaving' => 'double', 'employerContributionNiSavingPercentage' => 'double', + 'employerContributionTopUpPercentage' => 'double', + 'employerReference' => null, + 'id' => 'uuid', 'isAvc' => null, - 'additionalVoluntaryContribution' => 'double', - 'avcIsPercentage' => null, - 'employerContributionNiSaving' => 'double', - 'customThreshold' => null, - 'lowerLimit' => 'double', - 'upperLimit' => 'double', - 'papdisGroup' => null, - 'papdisSubGroup' => null, + 'lgpsFund' => null, 'localAuthorityNumber' => null, - 'schoolEmployerType' => null, + 'lowerLimit' => 'double', 'matIdentifier' => null, 'matUniqueNumber' => null, - 'employerReference' => null, - 'lgpsFund' => null, - 'workerGroupId' => 'uuid', - 'assumedPensionablePay' => null, + 'name' => null, + 'papdisGroup' => null, + 'papdisSubGroup' => null, + 'payslipDescription' => null, 'pensionablePayDefinition' => null, - 'payslipDescription' => null + 'schoolEmployerType' => null, + 'upperLimit' => 'double', + 'workerGroupId' => 'uuid' ]; /** @@ -133,35 +133,35 @@ class ContractWorkerGroupResponse implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'name' => true, + 'additionalVoluntaryContribution' => true, + 'assumedPensionablePay' => false, + 'avcIsPercentage' => true, 'contributionLevelType' => false, + 'customThreshold' => false, 'employeeContribution' => false, 'employeeContributionIsPercentage' => false, 'employerContribution' => false, - 'employerContributionIsPercentage' => false, - 'employerContributionTopUpPercentage' => false, 'employerContributionIncludesNiSaving' => false, + 'employerContributionIsPercentage' => false, + 'employerContributionNiSaving' => false, 'employerContributionNiSavingPercentage' => false, + 'employerContributionTopUpPercentage' => false, + 'employerReference' => true, + 'id' => false, 'isAvc' => false, - 'additionalVoluntaryContribution' => true, - 'avcIsPercentage' => true, - 'employerContributionNiSaving' => false, - 'customThreshold' => false, - 'lowerLimit' => false, - 'upperLimit' => false, - 'papdisGroup' => true, - 'papdisSubGroup' => true, + 'lgpsFund' => false, 'localAuthorityNumber' => true, - 'schoolEmployerType' => true, + 'lowerLimit' => false, 'matIdentifier' => true, 'matUniqueNumber' => true, - 'employerReference' => true, - 'lgpsFund' => false, - 'workerGroupId' => false, - 'assumedPensionablePay' => false, + 'name' => true, + 'papdisGroup' => true, + 'papdisSubGroup' => true, + 'payslipDescription' => true, 'pensionablePayDefinition' => false, - 'payslipDescription' => true + 'schoolEmployerType' => true, + 'upperLimit' => false, + 'workerGroupId' => false ]; /** @@ -250,35 +250,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'name' => 'name', + 'additionalVoluntaryContribution' => 'additionalVoluntaryContribution', + 'assumedPensionablePay' => 'assumedPensionablePay', + 'avcIsPercentage' => 'avcIsPercentage', 'contributionLevelType' => 'contributionLevelType', + 'customThreshold' => 'customThreshold', 'employeeContribution' => 'employeeContribution', 'employeeContributionIsPercentage' => 'employeeContributionIsPercentage', 'employerContribution' => 'employerContribution', - 'employerContributionIsPercentage' => 'employerContributionIsPercentage', - 'employerContributionTopUpPercentage' => 'employerContributionTopUpPercentage', 'employerContributionIncludesNiSaving' => 'employerContributionIncludesNiSaving', + 'employerContributionIsPercentage' => 'employerContributionIsPercentage', + 'employerContributionNiSaving' => 'employerContributionNiSaving', 'employerContributionNiSavingPercentage' => 'employerContributionNiSavingPercentage', + 'employerContributionTopUpPercentage' => 'employerContributionTopUpPercentage', + 'employerReference' => 'employerReference', + 'id' => 'id', 'isAvc' => 'isAvc', - 'additionalVoluntaryContribution' => 'additionalVoluntaryContribution', - 'avcIsPercentage' => 'avcIsPercentage', - 'employerContributionNiSaving' => 'employerContributionNiSaving', - 'customThreshold' => 'customThreshold', - 'lowerLimit' => 'lowerLimit', - 'upperLimit' => 'upperLimit', - 'papdisGroup' => 'papdisGroup', - 'papdisSubGroup' => 'papdisSubGroup', + 'lgpsFund' => 'lgpsFund', 'localAuthorityNumber' => 'localAuthorityNumber', - 'schoolEmployerType' => 'schoolEmployerType', + 'lowerLimit' => 'lowerLimit', 'matIdentifier' => 'matIdentifier', 'matUniqueNumber' => 'matUniqueNumber', - 'employerReference' => 'employerReference', - 'lgpsFund' => 'lgpsFund', - 'workerGroupId' => 'workerGroupId', - 'assumedPensionablePay' => 'assumedPensionablePay', + 'name' => 'name', + 'papdisGroup' => 'papdisGroup', + 'papdisSubGroup' => 'papdisSubGroup', + 'payslipDescription' => 'payslipDescription', 'pensionablePayDefinition' => 'pensionablePayDefinition', - 'payslipDescription' => 'payslipDescription' + 'schoolEmployerType' => 'schoolEmployerType', + 'upperLimit' => 'upperLimit', + 'workerGroupId' => 'workerGroupId' ]; /** @@ -287,35 +287,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'name' => 'setName', + 'additionalVoluntaryContribution' => 'setAdditionalVoluntaryContribution', + 'assumedPensionablePay' => 'setAssumedPensionablePay', + 'avcIsPercentage' => 'setAvcIsPercentage', 'contributionLevelType' => 'setContributionLevelType', + 'customThreshold' => 'setCustomThreshold', 'employeeContribution' => 'setEmployeeContribution', 'employeeContributionIsPercentage' => 'setEmployeeContributionIsPercentage', 'employerContribution' => 'setEmployerContribution', - 'employerContributionIsPercentage' => 'setEmployerContributionIsPercentage', - 'employerContributionTopUpPercentage' => 'setEmployerContributionTopUpPercentage', 'employerContributionIncludesNiSaving' => 'setEmployerContributionIncludesNiSaving', + 'employerContributionIsPercentage' => 'setEmployerContributionIsPercentage', + 'employerContributionNiSaving' => 'setEmployerContributionNiSaving', 'employerContributionNiSavingPercentage' => 'setEmployerContributionNiSavingPercentage', + 'employerContributionTopUpPercentage' => 'setEmployerContributionTopUpPercentage', + 'employerReference' => 'setEmployerReference', + 'id' => 'setId', 'isAvc' => 'setIsAvc', - 'additionalVoluntaryContribution' => 'setAdditionalVoluntaryContribution', - 'avcIsPercentage' => 'setAvcIsPercentage', - 'employerContributionNiSaving' => 'setEmployerContributionNiSaving', - 'customThreshold' => 'setCustomThreshold', - 'lowerLimit' => 'setLowerLimit', - 'upperLimit' => 'setUpperLimit', - 'papdisGroup' => 'setPapdisGroup', - 'papdisSubGroup' => 'setPapdisSubGroup', + 'lgpsFund' => 'setLgpsFund', 'localAuthorityNumber' => 'setLocalAuthorityNumber', - 'schoolEmployerType' => 'setSchoolEmployerType', + 'lowerLimit' => 'setLowerLimit', 'matIdentifier' => 'setMatIdentifier', 'matUniqueNumber' => 'setMatUniqueNumber', - 'employerReference' => 'setEmployerReference', - 'lgpsFund' => 'setLgpsFund', - 'workerGroupId' => 'setWorkerGroupId', - 'assumedPensionablePay' => 'setAssumedPensionablePay', + 'name' => 'setName', + 'papdisGroup' => 'setPapdisGroup', + 'papdisSubGroup' => 'setPapdisSubGroup', + 'payslipDescription' => 'setPayslipDescription', 'pensionablePayDefinition' => 'setPensionablePayDefinition', - 'payslipDescription' => 'setPayslipDescription' + 'schoolEmployerType' => 'setSchoolEmployerType', + 'upperLimit' => 'setUpperLimit', + 'workerGroupId' => 'setWorkerGroupId' ]; /** @@ -324,35 +324,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'name' => 'getName', + 'additionalVoluntaryContribution' => 'getAdditionalVoluntaryContribution', + 'assumedPensionablePay' => 'getAssumedPensionablePay', + 'avcIsPercentage' => 'getAvcIsPercentage', 'contributionLevelType' => 'getContributionLevelType', + 'customThreshold' => 'getCustomThreshold', 'employeeContribution' => 'getEmployeeContribution', 'employeeContributionIsPercentage' => 'getEmployeeContributionIsPercentage', 'employerContribution' => 'getEmployerContribution', - 'employerContributionIsPercentage' => 'getEmployerContributionIsPercentage', - 'employerContributionTopUpPercentage' => 'getEmployerContributionTopUpPercentage', 'employerContributionIncludesNiSaving' => 'getEmployerContributionIncludesNiSaving', + 'employerContributionIsPercentage' => 'getEmployerContributionIsPercentage', + 'employerContributionNiSaving' => 'getEmployerContributionNiSaving', 'employerContributionNiSavingPercentage' => 'getEmployerContributionNiSavingPercentage', + 'employerContributionTopUpPercentage' => 'getEmployerContributionTopUpPercentage', + 'employerReference' => 'getEmployerReference', + 'id' => 'getId', 'isAvc' => 'getIsAvc', - 'additionalVoluntaryContribution' => 'getAdditionalVoluntaryContribution', - 'avcIsPercentage' => 'getAvcIsPercentage', - 'employerContributionNiSaving' => 'getEmployerContributionNiSaving', - 'customThreshold' => 'getCustomThreshold', - 'lowerLimit' => 'getLowerLimit', - 'upperLimit' => 'getUpperLimit', - 'papdisGroup' => 'getPapdisGroup', - 'papdisSubGroup' => 'getPapdisSubGroup', + 'lgpsFund' => 'getLgpsFund', 'localAuthorityNumber' => 'getLocalAuthorityNumber', - 'schoolEmployerType' => 'getSchoolEmployerType', + 'lowerLimit' => 'getLowerLimit', 'matIdentifier' => 'getMatIdentifier', 'matUniqueNumber' => 'getMatUniqueNumber', - 'employerReference' => 'getEmployerReference', - 'lgpsFund' => 'getLgpsFund', - 'workerGroupId' => 'getWorkerGroupId', - 'assumedPensionablePay' => 'getAssumedPensionablePay', + 'name' => 'getName', + 'papdisGroup' => 'getPapdisGroup', + 'papdisSubGroup' => 'getPapdisSubGroup', + 'payslipDescription' => 'getPayslipDescription', 'pensionablePayDefinition' => 'getPensionablePayDefinition', - 'payslipDescription' => 'getPayslipDescription' + 'schoolEmployerType' => 'getSchoolEmployerType', + 'upperLimit' => 'getUpperLimit', + 'workerGroupId' => 'getWorkerGroupId' ]; /** @@ -411,35 +411,35 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('additionalVoluntaryContribution', $data ?? [], null); + $this->setIfExists('assumedPensionablePay', $data ?? [], null); + $this->setIfExists('avcIsPercentage', $data ?? [], null); $this->setIfExists('contributionLevelType', $data ?? [], null); + $this->setIfExists('customThreshold', $data ?? [], null); $this->setIfExists('employeeContribution', $data ?? [], null); $this->setIfExists('employeeContributionIsPercentage', $data ?? [], null); $this->setIfExists('employerContribution', $data ?? [], null); - $this->setIfExists('employerContributionIsPercentage', $data ?? [], null); - $this->setIfExists('employerContributionTopUpPercentage', $data ?? [], null); $this->setIfExists('employerContributionIncludesNiSaving', $data ?? [], null); + $this->setIfExists('employerContributionIsPercentage', $data ?? [], null); + $this->setIfExists('employerContributionNiSaving', $data ?? [], null); $this->setIfExists('employerContributionNiSavingPercentage', $data ?? [], null); + $this->setIfExists('employerContributionTopUpPercentage', $data ?? [], null); + $this->setIfExists('employerReference', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('isAvc', $data ?? [], null); - $this->setIfExists('additionalVoluntaryContribution', $data ?? [], null); - $this->setIfExists('avcIsPercentage', $data ?? [], null); - $this->setIfExists('employerContributionNiSaving', $data ?? [], null); - $this->setIfExists('customThreshold', $data ?? [], null); + $this->setIfExists('lgpsFund', $data ?? [], null); + $this->setIfExists('localAuthorityNumber', $data ?? [], null); $this->setIfExists('lowerLimit', $data ?? [], null); - $this->setIfExists('upperLimit', $data ?? [], null); + $this->setIfExists('matIdentifier', $data ?? [], null); + $this->setIfExists('matUniqueNumber', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('papdisGroup', $data ?? [], null); $this->setIfExists('papdisSubGroup', $data ?? [], null); - $this->setIfExists('localAuthorityNumber', $data ?? [], null); + $this->setIfExists('payslipDescription', $data ?? [], null); + $this->setIfExists('pensionablePayDefinition', $data ?? [], null); $this->setIfExists('schoolEmployerType', $data ?? [], null); - $this->setIfExists('matIdentifier', $data ?? [], null); - $this->setIfExists('matUniqueNumber', $data ?? [], null); - $this->setIfExists('employerReference', $data ?? [], null); - $this->setIfExists('lgpsFund', $data ?? [], null); + $this->setIfExists('upperLimit', $data ?? [], null); $this->setIfExists('workerGroupId', $data ?? [], null); - $this->setIfExists('assumedPensionablePay', $data ?? [], null); - $this->setIfExists('pensionablePayDefinition', $data ?? [], null); - $this->setIfExists('payslipDescription', $data ?? [], null); } /** @@ -485,62 +485,96 @@ public function valid(): bool /** - * Gets id + * Gets additionalVoluntaryContribution * - * @return string|null + * @return float|null */ - public function getId(): ?string + public function getAdditionalVoluntaryContribution(): ?float { - return $this->container['id']; + return $this->container['additionalVoluntaryContribution']; } /** - * Sets id + * Sets additionalVoluntaryContribution * - * @param string|null $id id + * @param float|null $additionalVoluntaryContribution Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. * * @return $this */ - public function setId(?string $id): static + public function setAdditionalVoluntaryContribution(?float $additionalVoluntaryContribution): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($additionalVoluntaryContribution)) { + array_push($this->openAPINullablesSetToNull, 'additionalVoluntaryContribution'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('additionalVoluntaryContribution', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['additionalVoluntaryContribution'] = $additionalVoluntaryContribution; return $this; } /** - * Gets name + * Gets assumedPensionablePay * - * @return string|null + * @return \SynergiTech\Staffology\Model\AssumedPensionablePay|null */ - public function getName(): ?string + public function getAssumedPensionablePay(): ?\SynergiTech\Staffology\Model\AssumedPensionablePay { - return $this->container['name']; + return $this->container['assumedPensionablePay']; } /** - * Sets name + * Sets assumedPensionablePay * - * @param string|null $name name + * @param \SynergiTech\Staffology\Model\AssumedPensionablePay|null $assumedPensionablePay assumedPensionablePay * * @return $this */ - public function setName(?string $name): static + public function setAssumedPensionablePay(?\SynergiTech\Staffology\Model\AssumedPensionablePay $assumedPensionablePay): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($assumedPensionablePay)) { + throw new InvalidArgumentException('non-nullable assumedPensionablePay cannot be null'); + } + $this->container['assumedPensionablePay'] = $assumedPensionablePay; + + return $this; + } + + /** + * Gets avcIsPercentage + * + * @return bool|null + */ + public function getAvcIsPercentage(): ?bool + { + return $this->container['avcIsPercentage']; + } + + /** + * Sets avcIsPercentage + * + * @param bool|null $avcIsPercentage Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, + * + * @return $this + */ + public function setAvcIsPercentage(?bool $avcIsPercentage): static + { + if (is_null($avcIsPercentage)) { + array_push($this->openAPINullablesSetToNull, 'avcIsPercentage'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('avcIsPercentage', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['avcIsPercentage'] = $avcIsPercentage; return $this; } @@ -572,6 +606,33 @@ public function setContributionLevelType(?\SynergiTech\Staffology\Model\PensionC return $this; } + /** + * Gets customThreshold + * + * @return bool|null + */ + public function getCustomThreshold(): ?bool + { + return $this->container['customThreshold']; + } + + /** + * Sets customThreshold + * + * @param bool|null $customThreshold customThreshold + * + * @return $this + */ + public function setCustomThreshold(?bool $customThreshold): static + { + if (is_null($customThreshold)) { + throw new InvalidArgumentException('non-nullable customThreshold cannot be null'); + } + $this->container['customThreshold'] = $customThreshold; + + return $this; + } + /** * Gets employeeContribution * @@ -654,82 +715,82 @@ public function setEmployerContribution(?float $employerContribution): static } /** - * Gets employerContributionIsPercentage + * Gets employerContributionIncludesNiSaving * * @return bool|null */ - public function getEmployerContributionIsPercentage(): ?bool + public function getEmployerContributionIncludesNiSaving(): ?bool { - return $this->container['employerContributionIsPercentage']; + return $this->container['employerContributionIncludesNiSaving']; } /** - * Sets employerContributionIsPercentage + * Sets employerContributionIncludesNiSaving * - * @param bool|null $employerContributionIsPercentage employerContributionIsPercentage + * @param bool|null $employerContributionIncludesNiSaving Employer Contribution includes the Employers NI saving * * @return $this */ - public function setEmployerContributionIsPercentage(?bool $employerContributionIsPercentage): static + public function setEmployerContributionIncludesNiSaving(?bool $employerContributionIncludesNiSaving): static { - if (is_null($employerContributionIsPercentage)) { - throw new InvalidArgumentException('non-nullable employerContributionIsPercentage cannot be null'); + if (is_null($employerContributionIncludesNiSaving)) { + throw new InvalidArgumentException('non-nullable employerContributionIncludesNiSaving cannot be null'); } - $this->container['employerContributionIsPercentage'] = $employerContributionIsPercentage; + $this->container['employerContributionIncludesNiSaving'] = $employerContributionIncludesNiSaving; return $this; } /** - * Gets employerContributionTopUpPercentage + * Gets employerContributionIsPercentage * - * @return float|null + * @return bool|null */ - public function getEmployerContributionTopUpPercentage(): ?float + public function getEmployerContributionIsPercentage(): ?bool { - return $this->container['employerContributionTopUpPercentage']; + return $this->container['employerContributionIsPercentage']; } /** - * Sets employerContributionTopUpPercentage + * Sets employerContributionIsPercentage * - * @param float|null $employerContributionTopUpPercentage Increase Employer Contribution by this percentage of the Employee Contribution + * @param bool|null $employerContributionIsPercentage employerContributionIsPercentage * * @return $this */ - public function setEmployerContributionTopUpPercentage(?float $employerContributionTopUpPercentage): static + public function setEmployerContributionIsPercentage(?bool $employerContributionIsPercentage): static { - if (is_null($employerContributionTopUpPercentage)) { - throw new InvalidArgumentException('non-nullable employerContributionTopUpPercentage cannot be null'); + if (is_null($employerContributionIsPercentage)) { + throw new InvalidArgumentException('non-nullable employerContributionIsPercentage cannot be null'); } - $this->container['employerContributionTopUpPercentage'] = $employerContributionTopUpPercentage; + $this->container['employerContributionIsPercentage'] = $employerContributionIsPercentage; return $this; } /** - * Gets employerContributionIncludesNiSaving + * Gets employerContributionNiSaving * - * @return bool|null + * @return float|null */ - public function getEmployerContributionIncludesNiSaving(): ?bool + public function getEmployerContributionNiSaving(): ?float { - return $this->container['employerContributionIncludesNiSaving']; + return $this->container['employerContributionNiSaving']; } /** - * Sets employerContributionIncludesNiSaving + * Sets employerContributionNiSaving * - * @param bool|null $employerContributionIncludesNiSaving Employer Contribution includes the Employers NI saving + * @param float|null $employerContributionNiSaving Employers NI Saving * * @return $this */ - public function setEmployerContributionIncludesNiSaving(?bool $employerContributionIncludesNiSaving): static + public function setEmployerContributionNiSaving(?float $employerContributionNiSaving): static { - if (is_null($employerContributionIncludesNiSaving)) { - throw new InvalidArgumentException('non-nullable employerContributionIncludesNiSaving cannot be null'); + if (is_null($employerContributionNiSaving)) { + throw new InvalidArgumentException('non-nullable employerContributionNiSaving cannot be null'); } - $this->container['employerContributionIncludesNiSaving'] = $employerContributionIncludesNiSaving; + $this->container['employerContributionNiSaving'] = $employerContributionNiSaving; return $this; } @@ -762,584 +823,523 @@ public function setEmployerContributionNiSavingPercentage(?float $employerContri } /** - * Gets isAvc + * Gets employerContributionTopUpPercentage * - * @return bool|null + * @return float|null */ - public function getIsAvc(): ?bool + public function getEmployerContributionTopUpPercentage(): ?float { - return $this->container['isAvc']; + return $this->container['employerContributionTopUpPercentage']; } /** - * Sets isAvc + * Sets employerContributionTopUpPercentage * - * @param bool|null $isAvc Determines whether the workergroup uses additonal voluntary contributions. This property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC. + * @param float|null $employerContributionTopUpPercentage Increase Employer Contribution by this percentage of the Employee Contribution * * @return $this */ - public function setIsAvc(?bool $isAvc): static + public function setEmployerContributionTopUpPercentage(?float $employerContributionTopUpPercentage): static { - if (is_null($isAvc)) { - throw new InvalidArgumentException('non-nullable isAvc cannot be null'); + if (is_null($employerContributionTopUpPercentage)) { + throw new InvalidArgumentException('non-nullable employerContributionTopUpPercentage cannot be null'); } - $this->container['isAvc'] = $isAvc; + $this->container['employerContributionTopUpPercentage'] = $employerContributionTopUpPercentage; return $this; } /** - * Gets additionalVoluntaryContribution + * Gets employerReference * - * @return float|null + * @return string|null */ - public function getAdditionalVoluntaryContribution(): ?float + public function getEmployerReference(): ?string { - return $this->container['additionalVoluntaryContribution']; + return $this->container['employerReference']; } /** - * Sets additionalVoluntaryContribution + * Sets employerReference * - * @param float|null $additionalVoluntaryContribution Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. + * @param string|null $employerReference employerReference * * @return $this */ - public function setAdditionalVoluntaryContribution(?float $additionalVoluntaryContribution): static + public function setEmployerReference(?string $employerReference): static { - if (is_null($additionalVoluntaryContribution)) { - array_push($this->openAPINullablesSetToNull, 'additionalVoluntaryContribution'); + if (is_null($employerReference)) { + array_push($this->openAPINullablesSetToNull, 'employerReference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('additionalVoluntaryContribution', $nullablesSetToNull); + $index = array_search('employerReference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['additionalVoluntaryContribution'] = $additionalVoluntaryContribution; + $this->container['employerReference'] = $employerReference; return $this; } /** - * Gets avcIsPercentage + * Gets id * - * @return bool|null + * @return string|null */ - public function getAvcIsPercentage(): ?bool + public function getId(): ?string { - return $this->container['avcIsPercentage']; + return $this->container['id']; } /** - * Sets avcIsPercentage + * Sets id * - * @param bool|null $avcIsPercentage Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, + * @param string|null $id id * * @return $this */ - public function setAvcIsPercentage(?bool $avcIsPercentage): static + public function setId(?string $id): static { - if (is_null($avcIsPercentage)) { - array_push($this->openAPINullablesSetToNull, 'avcIsPercentage'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('avcIsPercentage', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['avcIsPercentage'] = $avcIsPercentage; + $this->container['id'] = $id; return $this; } /** - * Gets employerContributionNiSaving + * Gets isAvc * - * @return float|null + * @return bool|null */ - public function getEmployerContributionNiSaving(): ?float + public function getIsAvc(): ?bool { - return $this->container['employerContributionNiSaving']; + return $this->container['isAvc']; } /** - * Sets employerContributionNiSaving + * Sets isAvc * - * @param float|null $employerContributionNiSaving Employers NI Saving + * @param bool|null $isAvc Determines whether the workergroup uses additonal voluntary contributions. This property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC. * * @return $this */ - public function setEmployerContributionNiSaving(?float $employerContributionNiSaving): static + public function setIsAvc(?bool $isAvc): static { - if (is_null($employerContributionNiSaving)) { - throw new InvalidArgumentException('non-nullable employerContributionNiSaving cannot be null'); + if (is_null($isAvc)) { + throw new InvalidArgumentException('non-nullable isAvc cannot be null'); } - $this->container['employerContributionNiSaving'] = $employerContributionNiSaving; + $this->container['isAvc'] = $isAvc; return $this; } /** - * Gets customThreshold + * Gets lgpsFund * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsFund|null */ - public function getCustomThreshold(): ?bool + public function getLgpsFund(): ?\SynergiTech\Staffology\Model\LgpsFund { - return $this->container['customThreshold']; + return $this->container['lgpsFund']; } /** - * Sets customThreshold + * Sets lgpsFund * - * @param bool|null $customThreshold customThreshold + * @param \SynergiTech\Staffology\Model\LgpsFund|null $lgpsFund lgpsFund * * @return $this */ - public function setCustomThreshold(?bool $customThreshold): static + public function setLgpsFund(?\SynergiTech\Staffology\Model\LgpsFund $lgpsFund): static { - if (is_null($customThreshold)) { - throw new InvalidArgumentException('non-nullable customThreshold cannot be null'); + if (is_null($lgpsFund)) { + throw new InvalidArgumentException('non-nullable lgpsFund cannot be null'); } - $this->container['customThreshold'] = $customThreshold; + $this->container['lgpsFund'] = $lgpsFund; return $this; } /** - * Gets lowerLimit + * Gets localAuthorityNumber * - * @return float|null + * @return string|null */ - public function getLowerLimit(): ?float + public function getLocalAuthorityNumber(): ?string { - return $this->container['lowerLimit']; + return $this->container['localAuthorityNumber']; } /** - * Sets lowerLimit + * Sets localAuthorityNumber * - * @param float|null $lowerLimit lowerLimit + * @param string|null $localAuthorityNumber Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales * * @return $this */ - public function setLowerLimit(?float $lowerLimit): static + public function setLocalAuthorityNumber(?string $localAuthorityNumber): static { - if (is_null($lowerLimit)) { - throw new InvalidArgumentException('non-nullable lowerLimit cannot be null'); + if (is_null($localAuthorityNumber)) { + array_push($this->openAPINullablesSetToNull, 'localAuthorityNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('localAuthorityNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['lowerLimit'] = $lowerLimit; + $this->container['localAuthorityNumber'] = $localAuthorityNumber; return $this; } /** - * Gets upperLimit + * Gets lowerLimit * * @return float|null */ - public function getUpperLimit(): ?float - { - return $this->container['upperLimit']; - } - - /** - * Sets upperLimit - * - * @param float|null $upperLimit upperLimit - * - * @return $this - */ - public function setUpperLimit(?float $upperLimit): static - { - if (is_null($upperLimit)) { - throw new InvalidArgumentException('non-nullable upperLimit cannot be null'); - } - $this->container['upperLimit'] = $upperLimit; - - return $this; - } - - /** - * Gets papdisGroup - * - * @return string|null - */ - public function getPapdisGroup(): ?string + public function getLowerLimit(): ?float { - return $this->container['papdisGroup']; + return $this->container['lowerLimit']; } /** - * Sets papdisGroup + * Sets lowerLimit * - * @param string|null $papdisGroup papdisGroup + * @param float|null $lowerLimit lowerLimit * * @return $this */ - public function setPapdisGroup(?string $papdisGroup): static + public function setLowerLimit(?float $lowerLimit): static { - if (is_null($papdisGroup)) { - array_push($this->openAPINullablesSetToNull, 'papdisGroup'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisGroup', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($lowerLimit)) { + throw new InvalidArgumentException('non-nullable lowerLimit cannot be null'); } - $this->container['papdisGroup'] = $papdisGroup; + $this->container['lowerLimit'] = $lowerLimit; return $this; } /** - * Gets papdisSubGroup + * Gets matIdentifier * * @return string|null */ - public function getPapdisSubGroup(): ?string + public function getMatIdentifier(): ?string { - return $this->container['papdisSubGroup']; + return $this->container['matIdentifier']; } /** - * Sets papdisSubGroup + * Sets matIdentifier * - * @param string|null $papdisSubGroup papdisSubGroup + * @param string|null $matIdentifier Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales * * @return $this */ - public function setPapdisSubGroup(?string $papdisSubGroup): static + public function setMatIdentifier(?string $matIdentifier): static { - if (is_null($papdisSubGroup)) { - array_push($this->openAPINullablesSetToNull, 'papdisSubGroup'); + if (is_null($matIdentifier)) { + array_push($this->openAPINullablesSetToNull, 'matIdentifier'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisSubGroup', $nullablesSetToNull); + $index = array_search('matIdentifier', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['papdisSubGroup'] = $papdisSubGroup; + $this->container['matIdentifier'] = $matIdentifier; return $this; } /** - * Gets localAuthorityNumber + * Gets matUniqueNumber * * @return string|null */ - public function getLocalAuthorityNumber(): ?string + public function getMatUniqueNumber(): ?string { - return $this->container['localAuthorityNumber']; + return $this->container['matUniqueNumber']; } /** - * Sets localAuthorityNumber + * Sets matUniqueNumber * - * @param string|null $localAuthorityNumber Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales + * @param string|null $matUniqueNumber Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales * * @return $this */ - public function setLocalAuthorityNumber(?string $localAuthorityNumber): static + public function setMatUniqueNumber(?string $matUniqueNumber): static { - if (is_null($localAuthorityNumber)) { - array_push($this->openAPINullablesSetToNull, 'localAuthorityNumber'); + if (is_null($matUniqueNumber)) { + array_push($this->openAPINullablesSetToNull, 'matUniqueNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('localAuthorityNumber', $nullablesSetToNull); + $index = array_search('matUniqueNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['localAuthorityNumber'] = $localAuthorityNumber; + $this->container['matUniqueNumber'] = $matUniqueNumber; return $this; } /** - * Gets schoolEmployerType + * Gets name * * @return string|null */ - public function getSchoolEmployerType(): ?string + public function getName(): ?string { - return $this->container['schoolEmployerType']; + return $this->container['name']; } /** - * Sets schoolEmployerType + * Sets name * - * @param string|null $schoolEmployerType Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales + * @param string|null $name name * * @return $this */ - public function setSchoolEmployerType(?string $schoolEmployerType): static + public function setName(?string $name): static { - if (is_null($schoolEmployerType)) { - array_push($this->openAPINullablesSetToNull, 'schoolEmployerType'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('schoolEmployerType', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['schoolEmployerType'] = $schoolEmployerType; + $this->container['name'] = $name; return $this; } /** - * Gets matIdentifier + * Gets papdisGroup * * @return string|null */ - public function getMatIdentifier(): ?string + public function getPapdisGroup(): ?string { - return $this->container['matIdentifier']; + return $this->container['papdisGroup']; } /** - * Sets matIdentifier + * Sets papdisGroup * - * @param string|null $matIdentifier Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales + * @param string|null $papdisGroup papdisGroup * * @return $this */ - public function setMatIdentifier(?string $matIdentifier): static + public function setPapdisGroup(?string $papdisGroup): static { - if (is_null($matIdentifier)) { - array_push($this->openAPINullablesSetToNull, 'matIdentifier'); + if (is_null($papdisGroup)) { + array_push($this->openAPINullablesSetToNull, 'papdisGroup'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('matIdentifier', $nullablesSetToNull); + $index = array_search('papdisGroup', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['matIdentifier'] = $matIdentifier; + $this->container['papdisGroup'] = $papdisGroup; return $this; } /** - * Gets matUniqueNumber + * Gets papdisSubGroup * * @return string|null */ - public function getMatUniqueNumber(): ?string + public function getPapdisSubGroup(): ?string { - return $this->container['matUniqueNumber']; + return $this->container['papdisSubGroup']; } /** - * Sets matUniqueNumber + * Sets papdisSubGroup * - * @param string|null $matUniqueNumber Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales + * @param string|null $papdisSubGroup papdisSubGroup * * @return $this */ - public function setMatUniqueNumber(?string $matUniqueNumber): static + public function setPapdisSubGroup(?string $papdisSubGroup): static { - if (is_null($matUniqueNumber)) { - array_push($this->openAPINullablesSetToNull, 'matUniqueNumber'); + if (is_null($papdisSubGroup)) { + array_push($this->openAPINullablesSetToNull, 'papdisSubGroup'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('matUniqueNumber', $nullablesSetToNull); + $index = array_search('papdisSubGroup', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['matUniqueNumber'] = $matUniqueNumber; + $this->container['papdisSubGroup'] = $papdisSubGroup; return $this; } /** - * Gets employerReference + * Gets payslipDescription * * @return string|null */ - public function getEmployerReference(): ?string + public function getPayslipDescription(): ?string { - return $this->container['employerReference']; + return $this->container['payslipDescription']; } /** - * Sets employerReference + * Sets payslipDescription * - * @param string|null $employerReference employerReference + * @param string|null $payslipDescription Used for overwriting the pension description that is displayed on the payslip * * @return $this */ - public function setEmployerReference(?string $employerReference): static + public function setPayslipDescription(?string $payslipDescription): static { - if (is_null($employerReference)) { - array_push($this->openAPINullablesSetToNull, 'employerReference'); + if (is_null($payslipDescription)) { + array_push($this->openAPINullablesSetToNull, 'payslipDescription'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerReference', $nullablesSetToNull); + $index = array_search('payslipDescription', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employerReference'] = $employerReference; + $this->container['payslipDescription'] = $payslipDescription; return $this; } /** - * Gets lgpsFund + * Gets pensionablePayDefinition * - * @return \SynergiTech\Staffology\Model\LgpsFund|null + * @return \SynergiTech\Staffology\Model\PensionablePayDefinition|null */ - public function getLgpsFund(): ?\SynergiTech\Staffology\Model\LgpsFund + public function getPensionablePayDefinition(): ?\SynergiTech\Staffology\Model\PensionablePayDefinition { - return $this->container['lgpsFund']; + return $this->container['pensionablePayDefinition']; } /** - * Sets lgpsFund + * Sets pensionablePayDefinition * - * @param \SynergiTech\Staffology\Model\LgpsFund|null $lgpsFund lgpsFund + * @param \SynergiTech\Staffology\Model\PensionablePayDefinition|null $pensionablePayDefinition pensionablePayDefinition * * @return $this */ - public function setLgpsFund(?\SynergiTech\Staffology\Model\LgpsFund $lgpsFund): static + public function setPensionablePayDefinition(?\SynergiTech\Staffology\Model\PensionablePayDefinition $pensionablePayDefinition): static { - if (is_null($lgpsFund)) { - throw new InvalidArgumentException('non-nullable lgpsFund cannot be null'); + if (is_null($pensionablePayDefinition)) { + throw new InvalidArgumentException('non-nullable pensionablePayDefinition cannot be null'); } - $this->container['lgpsFund'] = $lgpsFund; + $this->container['pensionablePayDefinition'] = $pensionablePayDefinition; return $this; } /** - * Gets workerGroupId + * Gets schoolEmployerType * * @return string|null */ - public function getWorkerGroupId(): ?string - { - return $this->container['workerGroupId']; - } - - /** - * Sets workerGroupId - * - * @param string|null $workerGroupId workerGroupId - * - * @return $this - */ - public function setWorkerGroupId(?string $workerGroupId): static - { - if (is_null($workerGroupId)) { - throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); - } - $this->container['workerGroupId'] = $workerGroupId; - - return $this; - } - - /** - * Gets assumedPensionablePay - * - * @return \SynergiTech\Staffology\Model\AssumedPensionablePay|null - */ - public function getAssumedPensionablePay(): ?\SynergiTech\Staffology\Model\AssumedPensionablePay + public function getSchoolEmployerType(): ?string { - return $this->container['assumedPensionablePay']; + return $this->container['schoolEmployerType']; } /** - * Sets assumedPensionablePay + * Sets schoolEmployerType * - * @param \SynergiTech\Staffology\Model\AssumedPensionablePay|null $assumedPensionablePay assumedPensionablePay + * @param string|null $schoolEmployerType Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales * * @return $this */ - public function setAssumedPensionablePay(?\SynergiTech\Staffology\Model\AssumedPensionablePay $assumedPensionablePay): static + public function setSchoolEmployerType(?string $schoolEmployerType): static { - if (is_null($assumedPensionablePay)) { - throw new InvalidArgumentException('non-nullable assumedPensionablePay cannot be null'); + if (is_null($schoolEmployerType)) { + array_push($this->openAPINullablesSetToNull, 'schoolEmployerType'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('schoolEmployerType', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['assumedPensionablePay'] = $assumedPensionablePay; + $this->container['schoolEmployerType'] = $schoolEmployerType; return $this; } /** - * Gets pensionablePayDefinition + * Gets upperLimit * - * @return \SynergiTech\Staffology\Model\PensionablePayDefinition|null + * @return float|null */ - public function getPensionablePayDefinition(): ?\SynergiTech\Staffology\Model\PensionablePayDefinition + public function getUpperLimit(): ?float { - return $this->container['pensionablePayDefinition']; + return $this->container['upperLimit']; } /** - * Sets pensionablePayDefinition + * Sets upperLimit * - * @param \SynergiTech\Staffology\Model\PensionablePayDefinition|null $pensionablePayDefinition pensionablePayDefinition + * @param float|null $upperLimit upperLimit * * @return $this */ - public function setPensionablePayDefinition(?\SynergiTech\Staffology\Model\PensionablePayDefinition $pensionablePayDefinition): static + public function setUpperLimit(?float $upperLimit): static { - if (is_null($pensionablePayDefinition)) { - throw new InvalidArgumentException('non-nullable pensionablePayDefinition cannot be null'); + if (is_null($upperLimit)) { + throw new InvalidArgumentException('non-nullable upperLimit cannot be null'); } - $this->container['pensionablePayDefinition'] = $pensionablePayDefinition; + $this->container['upperLimit'] = $upperLimit; return $this; } /** - * Gets payslipDescription + * Gets workerGroupId * * @return string|null */ - public function getPayslipDescription(): ?string + public function getWorkerGroupId(): ?string { - return $this->container['payslipDescription']; + return $this->container['workerGroupId']; } /** - * Sets payslipDescription + * Sets workerGroupId * - * @param string|null $payslipDescription Used for overwriting the pension description that is displayed on the payslip + * @param string|null $workerGroupId workerGroupId * * @return $this */ - public function setPayslipDescription(?string $payslipDescription): static + public function setWorkerGroupId(?string $workerGroupId): static { - if (is_null($payslipDescription)) { - array_push($this->openAPINullablesSetToNull, 'payslipDescription'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payslipDescription', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($workerGroupId)) { + throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); } - $this->container['payslipDescription'] = $payslipDescription; + $this->container['workerGroupId'] = $workerGroupId; return $this; } diff --git a/src/Model/ContractWorkingPatternRequest.php b/src/Model/ContractWorkingPatternRequest.php index eb41e8d..cc7a45b 100644 --- a/src/Model/ContractWorkingPatternRequest.php +++ b/src/Model/ContractWorkingPatternRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,33 +59,33 @@ class ContractWorkingPatternRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ + 'bankHolidays' => '\SynergiTech\Staffology\Model\BankHolidayCollection', + 'contractedWeeks' => 'float', + 'effectiveFrom' => '\DateTime', + 'fri' => 'float', + 'friIsWorkingDay' => 'bool', + 'fullTimeContractedHours' => 'float', + 'fullTimeContractedWeeks' => 'float', 'id' => 'string', - 'title' => 'string', + 'isDefault' => 'bool', 'mon' => 'float', - 'tue' => 'float', - 'wed' => 'float', - 'thu' => 'float', - 'fri' => 'float', - 'sat' => 'float', - 'sun' => 'float', 'monIsWorkingDay' => 'bool', - 'tueIsWorkingDay' => 'bool', - 'wedIsWorkingDay' => 'bool', - 'thuIsWorkingDay' => 'bool', - 'friIsWorkingDay' => 'bool', + 'proRataRule' => '\SynergiTech\Staffology\Model\ProRataRule', + 'sat' => 'float', 'satIsWorkingDay' => 'bool', + 'shiftWorkingPatternDays' => '\SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayRequest[]', + 'sun' => 'float', 'sunIsWorkingDay' => 'bool', + 'thu' => 'float', + 'thuIsWorkingDay' => 'bool', + 'title' => 'string', 'totalHours' => 'float', - 'contractedWeeks' => 'float', - 'fullTimeContractedWeeks' => 'float', - 'fullTimeContractedHours' => 'float', - 'bankHolidays' => '\SynergiTech\Staffology\Model\BankHolidayCollection', - 'proRataRule' => '\SynergiTech\Staffology\Model\ProRataRule', + 'tue' => 'float', + 'tueIsWorkingDay' => 'bool', + 'wed' => 'float', + 'wedIsWorkingDay' => 'bool', 'workingPatternHoursType' => '\SynergiTech\Staffology\Model\WorkingPatternHoursType', - 'isDefault' => 'bool', - 'workingPatternType' => '\SynergiTech\Staffology\Model\WorkingPatternType', - 'effectiveFrom' => '\DateTime', - 'shiftWorkingPatternDays' => '\SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayRequest[]' + 'workingPatternType' => '\SynergiTech\Staffology\Model\WorkingPatternType' ]; /** @@ -94,33 +94,33 @@ class ContractWorkingPatternRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ + 'bankHolidays' => null, + 'contractedWeeks' => 'double', + 'effectiveFrom' => 'date', + 'fri' => 'double', + 'friIsWorkingDay' => null, + 'fullTimeContractedHours' => 'double', + 'fullTimeContractedWeeks' => 'double', 'id' => 'uuid', - 'title' => null, + 'isDefault' => null, 'mon' => 'double', - 'tue' => 'double', - 'wed' => 'double', - 'thu' => 'double', - 'fri' => 'double', - 'sat' => 'double', - 'sun' => 'double', 'monIsWorkingDay' => null, - 'tueIsWorkingDay' => null, - 'wedIsWorkingDay' => null, - 'thuIsWorkingDay' => null, - 'friIsWorkingDay' => null, + 'proRataRule' => null, + 'sat' => 'double', 'satIsWorkingDay' => null, + 'shiftWorkingPatternDays' => null, + 'sun' => 'double', 'sunIsWorkingDay' => null, + 'thu' => 'double', + 'thuIsWorkingDay' => null, + 'title' => null, 'totalHours' => 'double', - 'contractedWeeks' => 'double', - 'fullTimeContractedWeeks' => 'double', - 'fullTimeContractedHours' => 'double', - 'bankHolidays' => null, - 'proRataRule' => null, + 'tue' => 'double', + 'tueIsWorkingDay' => null, + 'wed' => 'double', + 'wedIsWorkingDay' => null, 'workingPatternHoursType' => null, - 'isDefault' => null, - 'workingPatternType' => null, - 'effectiveFrom' => 'date', - 'shiftWorkingPatternDays' => null + 'workingPatternType' => null ]; /** @@ -129,33 +129,33 @@ class ContractWorkingPatternRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ + 'bankHolidays' => false, + 'contractedWeeks' => true, + 'effectiveFrom' => true, + 'fri' => false, + 'friIsWorkingDay' => false, + 'fullTimeContractedHours' => true, + 'fullTimeContractedWeeks' => true, 'id' => false, - 'title' => false, + 'isDefault' => false, 'mon' => false, - 'tue' => false, - 'wed' => false, - 'thu' => false, - 'fri' => false, - 'sat' => false, - 'sun' => false, 'monIsWorkingDay' => false, - 'tueIsWorkingDay' => false, - 'wedIsWorkingDay' => false, - 'thuIsWorkingDay' => false, - 'friIsWorkingDay' => false, + 'proRataRule' => false, + 'sat' => false, 'satIsWorkingDay' => false, + 'shiftWorkingPatternDays' => true, + 'sun' => false, 'sunIsWorkingDay' => false, + 'thu' => false, + 'thuIsWorkingDay' => false, + 'title' => false, 'totalHours' => false, - 'contractedWeeks' => true, - 'fullTimeContractedWeeks' => true, - 'fullTimeContractedHours' => true, - 'bankHolidays' => false, - 'proRataRule' => false, + 'tue' => false, + 'tueIsWorkingDay' => false, + 'wed' => false, + 'wedIsWorkingDay' => false, 'workingPatternHoursType' => false, - 'isDefault' => false, - 'workingPatternType' => false, - 'effectiveFrom' => true, - 'shiftWorkingPatternDays' => true + 'workingPatternType' => false ]; /** @@ -244,33 +244,33 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'bankHolidays' => 'bankHolidays', + 'contractedWeeks' => 'contractedWeeks', + 'effectiveFrom' => 'effectiveFrom', + 'fri' => 'fri', + 'friIsWorkingDay' => 'friIsWorkingDay', + 'fullTimeContractedHours' => 'fullTimeContractedHours', + 'fullTimeContractedWeeks' => 'fullTimeContractedWeeks', 'id' => 'id', - 'title' => 'title', + 'isDefault' => 'isDefault', 'mon' => 'mon', - 'tue' => 'tue', - 'wed' => 'wed', - 'thu' => 'thu', - 'fri' => 'fri', - 'sat' => 'sat', - 'sun' => 'sun', 'monIsWorkingDay' => 'monIsWorkingDay', - 'tueIsWorkingDay' => 'tueIsWorkingDay', - 'wedIsWorkingDay' => 'wedIsWorkingDay', - 'thuIsWorkingDay' => 'thuIsWorkingDay', - 'friIsWorkingDay' => 'friIsWorkingDay', + 'proRataRule' => 'proRataRule', + 'sat' => 'sat', 'satIsWorkingDay' => 'satIsWorkingDay', + 'shiftWorkingPatternDays' => 'shiftWorkingPatternDays', + 'sun' => 'sun', 'sunIsWorkingDay' => 'sunIsWorkingDay', + 'thu' => 'thu', + 'thuIsWorkingDay' => 'thuIsWorkingDay', + 'title' => 'title', 'totalHours' => 'totalHours', - 'contractedWeeks' => 'contractedWeeks', - 'fullTimeContractedWeeks' => 'fullTimeContractedWeeks', - 'fullTimeContractedHours' => 'fullTimeContractedHours', - 'bankHolidays' => 'bankHolidays', - 'proRataRule' => 'proRataRule', + 'tue' => 'tue', + 'tueIsWorkingDay' => 'tueIsWorkingDay', + 'wed' => 'wed', + 'wedIsWorkingDay' => 'wedIsWorkingDay', 'workingPatternHoursType' => 'workingPatternHoursType', - 'isDefault' => 'isDefault', - 'workingPatternType' => 'workingPatternType', - 'effectiveFrom' => 'effectiveFrom', - 'shiftWorkingPatternDays' => 'shiftWorkingPatternDays' + 'workingPatternType' => 'workingPatternType' ]; /** @@ -279,33 +279,33 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'bankHolidays' => 'setBankHolidays', + 'contractedWeeks' => 'setContractedWeeks', + 'effectiveFrom' => 'setEffectiveFrom', + 'fri' => 'setFri', + 'friIsWorkingDay' => 'setFriIsWorkingDay', + 'fullTimeContractedHours' => 'setFullTimeContractedHours', + 'fullTimeContractedWeeks' => 'setFullTimeContractedWeeks', 'id' => 'setId', - 'title' => 'setTitle', + 'isDefault' => 'setIsDefault', 'mon' => 'setMon', - 'tue' => 'setTue', - 'wed' => 'setWed', - 'thu' => 'setThu', - 'fri' => 'setFri', - 'sat' => 'setSat', - 'sun' => 'setSun', 'monIsWorkingDay' => 'setMonIsWorkingDay', - 'tueIsWorkingDay' => 'setTueIsWorkingDay', - 'wedIsWorkingDay' => 'setWedIsWorkingDay', - 'thuIsWorkingDay' => 'setThuIsWorkingDay', - 'friIsWorkingDay' => 'setFriIsWorkingDay', + 'proRataRule' => 'setProRataRule', + 'sat' => 'setSat', 'satIsWorkingDay' => 'setSatIsWorkingDay', + 'shiftWorkingPatternDays' => 'setShiftWorkingPatternDays', + 'sun' => 'setSun', 'sunIsWorkingDay' => 'setSunIsWorkingDay', + 'thu' => 'setThu', + 'thuIsWorkingDay' => 'setThuIsWorkingDay', + 'title' => 'setTitle', 'totalHours' => 'setTotalHours', - 'contractedWeeks' => 'setContractedWeeks', - 'fullTimeContractedWeeks' => 'setFullTimeContractedWeeks', - 'fullTimeContractedHours' => 'setFullTimeContractedHours', - 'bankHolidays' => 'setBankHolidays', - 'proRataRule' => 'setProRataRule', + 'tue' => 'setTue', + 'tueIsWorkingDay' => 'setTueIsWorkingDay', + 'wed' => 'setWed', + 'wedIsWorkingDay' => 'setWedIsWorkingDay', 'workingPatternHoursType' => 'setWorkingPatternHoursType', - 'isDefault' => 'setIsDefault', - 'workingPatternType' => 'setWorkingPatternType', - 'effectiveFrom' => 'setEffectiveFrom', - 'shiftWorkingPatternDays' => 'setShiftWorkingPatternDays' + 'workingPatternType' => 'setWorkingPatternType' ]; /** @@ -314,33 +314,33 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'bankHolidays' => 'getBankHolidays', + 'contractedWeeks' => 'getContractedWeeks', + 'effectiveFrom' => 'getEffectiveFrom', + 'fri' => 'getFri', + 'friIsWorkingDay' => 'getFriIsWorkingDay', + 'fullTimeContractedHours' => 'getFullTimeContractedHours', + 'fullTimeContractedWeeks' => 'getFullTimeContractedWeeks', 'id' => 'getId', - 'title' => 'getTitle', + 'isDefault' => 'getIsDefault', 'mon' => 'getMon', - 'tue' => 'getTue', - 'wed' => 'getWed', - 'thu' => 'getThu', - 'fri' => 'getFri', - 'sat' => 'getSat', - 'sun' => 'getSun', 'monIsWorkingDay' => 'getMonIsWorkingDay', - 'tueIsWorkingDay' => 'getTueIsWorkingDay', - 'wedIsWorkingDay' => 'getWedIsWorkingDay', - 'thuIsWorkingDay' => 'getThuIsWorkingDay', - 'friIsWorkingDay' => 'getFriIsWorkingDay', + 'proRataRule' => 'getProRataRule', + 'sat' => 'getSat', 'satIsWorkingDay' => 'getSatIsWorkingDay', + 'shiftWorkingPatternDays' => 'getShiftWorkingPatternDays', + 'sun' => 'getSun', 'sunIsWorkingDay' => 'getSunIsWorkingDay', + 'thu' => 'getThu', + 'thuIsWorkingDay' => 'getThuIsWorkingDay', + 'title' => 'getTitle', 'totalHours' => 'getTotalHours', - 'contractedWeeks' => 'getContractedWeeks', - 'fullTimeContractedWeeks' => 'getFullTimeContractedWeeks', - 'fullTimeContractedHours' => 'getFullTimeContractedHours', - 'bankHolidays' => 'getBankHolidays', - 'proRataRule' => 'getProRataRule', + 'tue' => 'getTue', + 'tueIsWorkingDay' => 'getTueIsWorkingDay', + 'wed' => 'getWed', + 'wedIsWorkingDay' => 'getWedIsWorkingDay', 'workingPatternHoursType' => 'getWorkingPatternHoursType', - 'isDefault' => 'getIsDefault', - 'workingPatternType' => 'getWorkingPatternType', - 'effectiveFrom' => 'getEffectiveFrom', - 'shiftWorkingPatternDays' => 'getShiftWorkingPatternDays' + 'workingPatternType' => 'getWorkingPatternType' ]; /** @@ -399,33 +399,33 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('bankHolidays', $data ?? [], null); + $this->setIfExists('contractedWeeks', $data ?? [], null); + $this->setIfExists('effectiveFrom', $data ?? [], null); + $this->setIfExists('fri', $data ?? [], null); + $this->setIfExists('friIsWorkingDay', $data ?? [], null); + $this->setIfExists('fullTimeContractedHours', $data ?? [], null); + $this->setIfExists('fullTimeContractedWeeks', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('isDefault', $data ?? [], null); $this->setIfExists('mon', $data ?? [], null); - $this->setIfExists('tue', $data ?? [], null); - $this->setIfExists('wed', $data ?? [], null); - $this->setIfExists('thu', $data ?? [], null); - $this->setIfExists('fri', $data ?? [], null); - $this->setIfExists('sat', $data ?? [], null); - $this->setIfExists('sun', $data ?? [], null); $this->setIfExists('monIsWorkingDay', $data ?? [], null); - $this->setIfExists('tueIsWorkingDay', $data ?? [], null); - $this->setIfExists('wedIsWorkingDay', $data ?? [], null); - $this->setIfExists('thuIsWorkingDay', $data ?? [], null); - $this->setIfExists('friIsWorkingDay', $data ?? [], null); + $this->setIfExists('proRataRule', $data ?? [], null); + $this->setIfExists('sat', $data ?? [], null); $this->setIfExists('satIsWorkingDay', $data ?? [], null); + $this->setIfExists('shiftWorkingPatternDays', $data ?? [], null); + $this->setIfExists('sun', $data ?? [], null); $this->setIfExists('sunIsWorkingDay', $data ?? [], null); + $this->setIfExists('thu', $data ?? [], null); + $this->setIfExists('thuIsWorkingDay', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); $this->setIfExists('totalHours', $data ?? [], null); - $this->setIfExists('contractedWeeks', $data ?? [], null); - $this->setIfExists('fullTimeContractedWeeks', $data ?? [], null); - $this->setIfExists('fullTimeContractedHours', $data ?? [], null); - $this->setIfExists('bankHolidays', $data ?? [], null); - $this->setIfExists('proRataRule', $data ?? [], null); + $this->setIfExists('tue', $data ?? [], null); + $this->setIfExists('tueIsWorkingDay', $data ?? [], null); + $this->setIfExists('wed', $data ?? [], null); + $this->setIfExists('wedIsWorkingDay', $data ?? [], null); $this->setIfExists('workingPatternHoursType', $data ?? [], null); - $this->setIfExists('isDefault', $data ?? [], null); $this->setIfExists('workingPatternType', $data ?? [], null); - $this->setIfExists('effectiveFrom', $data ?? [], null); - $this->setIfExists('shiftWorkingPatternDays', $data ?? [], null); } /** @@ -482,251 +482,299 @@ public function valid(): bool /** - * Gets id + * Gets bankHolidays * - * @return string|null + * @return \SynergiTech\Staffology\Model\BankHolidayCollection|null */ - public function getId(): ?string + public function getBankHolidays(): ?\SynergiTech\Staffology\Model\BankHolidayCollection { - return $this->container['id']; + return $this->container['bankHolidays']; } /** - * Sets id + * Sets bankHolidays * - * @param string|null $id id + * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHolidays bankHolidays * * @return $this */ - public function setId(?string $id): static + public function setBankHolidays(?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHolidays): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($bankHolidays)) { + throw new InvalidArgumentException('non-nullable bankHolidays cannot be null'); } - $this->container['id'] = $id; + $this->container['bankHolidays'] = $bankHolidays; return $this; } /** - * Gets title + * Gets contractedWeeks * - * @return string + * @return float|null */ - public function getTitle(): string + public function getContractedWeeks(): ?float { - return $this->container['title']; + return $this->container['contractedWeeks']; } /** - * Sets title + * Sets contractedWeeks * - * @param string $title title + * @param float|null $contractedWeeks The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. * * @return $this */ - public function setTitle(string $title): static + public function setContractedWeeks(?float $contractedWeeks): static { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); - } - if ((mb_strlen($title) > 100)) { - throw new InvalidArgumentException('invalid length for $title when calling ContractWorkingPatternRequest., must be smaller than or equal to 100.'); - } - if ((mb_strlen($title) < 1)) { - throw new InvalidArgumentException('invalid length for $title when calling ContractWorkingPatternRequest., must be bigger than or equal to 1.'); + if (is_null($contractedWeeks)) { + array_push($this->openAPINullablesSetToNull, 'contractedWeeks'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('contractedWeeks', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } + $this->container['contractedWeeks'] = $contractedWeeks; - $this->container['title'] = $title; + return $this; + } + + /** + * Gets effectiveFrom + * + * @return \DateTime|null + */ + public function getEffectiveFrom(): ?\DateTime + { + return $this->container['effectiveFrom']; + } + + /** + * Sets effectiveFrom + * + * @param \DateTime|null $effectiveFrom effectiveFrom + * + * @return $this + */ + public function setEffectiveFrom(?\DateTime $effectiveFrom): static + { + if (is_null($effectiveFrom)) { + array_push($this->openAPINullablesSetToNull, 'effectiveFrom'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('effectiveFrom', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['effectiveFrom'] = $effectiveFrom; return $this; } /** - * Gets mon + * Gets fri * * @return float|null */ - public function getMon(): ?float + public function getFri(): ?float { - return $this->container['mon']; + return $this->container['fri']; } /** - * Sets mon + * Sets fri * - * @param float|null $mon mon + * @param float|null $fri fri * * @return $this */ - public function setMon(?float $mon): static + public function setFri(?float $fri): static { - if (is_null($mon)) { - throw new InvalidArgumentException('non-nullable mon cannot be null'); + if (is_null($fri)) { + throw new InvalidArgumentException('non-nullable fri cannot be null'); } - $this->container['mon'] = $mon; + $this->container['fri'] = $fri; return $this; } /** - * Gets tue + * Gets friIsWorkingDay * - * @return float|null + * @return bool|null */ - public function getTue(): ?float + public function getFriIsWorkingDay(): ?bool { - return $this->container['tue']; + return $this->container['friIsWorkingDay']; } /** - * Sets tue + * Sets friIsWorkingDay * - * @param float|null $tue tue + * @param bool|null $friIsWorkingDay friIsWorkingDay * * @return $this */ - public function setTue(?float $tue): static + public function setFriIsWorkingDay(?bool $friIsWorkingDay): static { - if (is_null($tue)) { - throw new InvalidArgumentException('non-nullable tue cannot be null'); + if (is_null($friIsWorkingDay)) { + throw new InvalidArgumentException('non-nullable friIsWorkingDay cannot be null'); } - $this->container['tue'] = $tue; + $this->container['friIsWorkingDay'] = $friIsWorkingDay; return $this; } /** - * Gets wed + * Gets fullTimeContractedHours * * @return float|null */ - public function getWed(): ?float + public function getFullTimeContractedHours(): ?float { - return $this->container['wed']; + return $this->container['fullTimeContractedHours']; } /** - * Sets wed + * Sets fullTimeContractedHours * - * @param float|null $wed wed + * @param float|null $fullTimeContractedHours The amount of hours an employee works (Full Time). If Null then the default is used. * * @return $this */ - public function setWed(?float $wed): static + public function setFullTimeContractedHours(?float $fullTimeContractedHours): static { - if (is_null($wed)) { - throw new InvalidArgumentException('non-nullable wed cannot be null'); + if (is_null($fullTimeContractedHours)) { + array_push($this->openAPINullablesSetToNull, 'fullTimeContractedHours'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fullTimeContractedHours', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['wed'] = $wed; + $this->container['fullTimeContractedHours'] = $fullTimeContractedHours; return $this; } /** - * Gets thu + * Gets fullTimeContractedWeeks * * @return float|null */ - public function getThu(): ?float + public function getFullTimeContractedWeeks(): ?float { - return $this->container['thu']; + return $this->container['fullTimeContractedWeeks']; } /** - * Sets thu + * Sets fullTimeContractedWeeks * - * @param float|null $thu thu + * @param float|null $fullTimeContractedWeeks The amount of weeks an employee works (Full Time). If Null then the default is used. * * @return $this */ - public function setThu(?float $thu): static + public function setFullTimeContractedWeeks(?float $fullTimeContractedWeeks): static { - if (is_null($thu)) { - throw new InvalidArgumentException('non-nullable thu cannot be null'); + if (is_null($fullTimeContractedWeeks)) { + array_push($this->openAPINullablesSetToNull, 'fullTimeContractedWeeks'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fullTimeContractedWeeks', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['thu'] = $thu; + $this->container['fullTimeContractedWeeks'] = $fullTimeContractedWeeks; return $this; } /** - * Gets fri + * Gets id * - * @return float|null + * @return string|null */ - public function getFri(): ?float + public function getId(): ?string { - return $this->container['fri']; + return $this->container['id']; } /** - * Sets fri + * Sets id * - * @param float|null $fri fri + * @param string|null $id id * * @return $this */ - public function setFri(?float $fri): static + public function setId(?string $id): static { - if (is_null($fri)) { - throw new InvalidArgumentException('non-nullable fri cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['fri'] = $fri; + $this->container['id'] = $id; return $this; } /** - * Gets sat + * Gets isDefault * - * @return float|null + * @return bool|null */ - public function getSat(): ?float + public function getIsDefault(): ?bool { - return $this->container['sat']; + return $this->container['isDefault']; } /** - * Sets sat + * Sets isDefault * - * @param float|null $sat sat + * @param bool|null $isDefault isDefault * * @return $this */ - public function setSat(?float $sat): static + public function setIsDefault(?bool $isDefault): static { - if (is_null($sat)) { - throw new InvalidArgumentException('non-nullable sat cannot be null'); + if (is_null($isDefault)) { + throw new InvalidArgumentException('non-nullable isDefault cannot be null'); } - $this->container['sat'] = $sat; + $this->container['isDefault'] = $isDefault; return $this; } /** - * Gets sun + * Gets mon * * @return float|null */ - public function getSun(): ?float + public function getMon(): ?float { - return $this->container['sun']; + return $this->container['mon']; } /** - * Sets sun + * Sets mon * - * @param float|null $sun sun + * @param float|null $mon mon * * @return $this */ - public function setSun(?float $sun): static + public function setMon(?float $mon): static { - if (is_null($sun)) { - throw new InvalidArgumentException('non-nullable sun cannot be null'); + if (is_null($mon)) { + throw new InvalidArgumentException('non-nullable mon cannot be null'); } - $this->container['sun'] = $sun; + $this->container['mon'] = $mon; return $this; } @@ -759,136 +807,143 @@ public function setMonIsWorkingDay(?bool $monIsWorkingDay): static } /** - * Gets tueIsWorkingDay + * Gets proRataRule * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ProRataRule|null */ - public function getTueIsWorkingDay(): ?bool + public function getProRataRule(): ?\SynergiTech\Staffology\Model\ProRataRule { - return $this->container['tueIsWorkingDay']; + return $this->container['proRataRule']; } /** - * Sets tueIsWorkingDay + * Sets proRataRule * - * @param bool|null $tueIsWorkingDay tueIsWorkingDay + * @param \SynergiTech\Staffology\Model\ProRataRule|null $proRataRule proRataRule * * @return $this */ - public function setTueIsWorkingDay(?bool $tueIsWorkingDay): static + public function setProRataRule(?\SynergiTech\Staffology\Model\ProRataRule $proRataRule): static { - if (is_null($tueIsWorkingDay)) { - throw new InvalidArgumentException('non-nullable tueIsWorkingDay cannot be null'); + if (is_null($proRataRule)) { + throw new InvalidArgumentException('non-nullable proRataRule cannot be null'); } - $this->container['tueIsWorkingDay'] = $tueIsWorkingDay; + $this->container['proRataRule'] = $proRataRule; return $this; } /** - * Gets wedIsWorkingDay + * Gets sat * - * @return bool|null + * @return float|null */ - public function getWedIsWorkingDay(): ?bool + public function getSat(): ?float { - return $this->container['wedIsWorkingDay']; + return $this->container['sat']; } /** - * Sets wedIsWorkingDay + * Sets sat * - * @param bool|null $wedIsWorkingDay wedIsWorkingDay + * @param float|null $sat sat * * @return $this */ - public function setWedIsWorkingDay(?bool $wedIsWorkingDay): static + public function setSat(?float $sat): static { - if (is_null($wedIsWorkingDay)) { - throw new InvalidArgumentException('non-nullable wedIsWorkingDay cannot be null'); + if (is_null($sat)) { + throw new InvalidArgumentException('non-nullable sat cannot be null'); } - $this->container['wedIsWorkingDay'] = $wedIsWorkingDay; + $this->container['sat'] = $sat; return $this; } /** - * Gets thuIsWorkingDay + * Gets satIsWorkingDay * * @return bool|null */ - public function getThuIsWorkingDay(): ?bool + public function getSatIsWorkingDay(): ?bool { - return $this->container['thuIsWorkingDay']; + return $this->container['satIsWorkingDay']; } /** - * Sets thuIsWorkingDay + * Sets satIsWorkingDay * - * @param bool|null $thuIsWorkingDay thuIsWorkingDay + * @param bool|null $satIsWorkingDay satIsWorkingDay * * @return $this */ - public function setThuIsWorkingDay(?bool $thuIsWorkingDay): static + public function setSatIsWorkingDay(?bool $satIsWorkingDay): static { - if (is_null($thuIsWorkingDay)) { - throw new InvalidArgumentException('non-nullable thuIsWorkingDay cannot be null'); + if (is_null($satIsWorkingDay)) { + throw new InvalidArgumentException('non-nullable satIsWorkingDay cannot be null'); } - $this->container['thuIsWorkingDay'] = $thuIsWorkingDay; + $this->container['satIsWorkingDay'] = $satIsWorkingDay; return $this; } /** - * Gets friIsWorkingDay + * Gets shiftWorkingPatternDays * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayRequest[]|null */ - public function getFriIsWorkingDay(): ?bool + public function getShiftWorkingPatternDays(): ?array { - return $this->container['friIsWorkingDay']; + return $this->container['shiftWorkingPatternDays']; } /** - * Sets friIsWorkingDay + * Sets shiftWorkingPatternDays * - * @param bool|null $friIsWorkingDay friIsWorkingDay + * @param \SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayRequest[]|null $shiftWorkingPatternDays shiftWorkingPatternDays * * @return $this */ - public function setFriIsWorkingDay(?bool $friIsWorkingDay): static + public function setShiftWorkingPatternDays(?array $shiftWorkingPatternDays): static { - if (is_null($friIsWorkingDay)) { - throw new InvalidArgumentException('non-nullable friIsWorkingDay cannot be null'); + if (is_null($shiftWorkingPatternDays)) { + array_push($this->openAPINullablesSetToNull, 'shiftWorkingPatternDays'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('shiftWorkingPatternDays', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['friIsWorkingDay'] = $friIsWorkingDay; + $this->container['shiftWorkingPatternDays'] = $shiftWorkingPatternDays; return $this; } /** - * Gets satIsWorkingDay + * Gets sun * - * @return bool|null + * @return float|null */ - public function getSatIsWorkingDay(): ?bool + public function getSun(): ?float { - return $this->container['satIsWorkingDay']; + return $this->container['sun']; } /** - * Sets satIsWorkingDay + * Sets sun * - * @param bool|null $satIsWorkingDay satIsWorkingDay + * @param float|null $sun sun * * @return $this */ - public function setSatIsWorkingDay(?bool $satIsWorkingDay): static + public function setSun(?float $sun): static { - if (is_null($satIsWorkingDay)) { - throw new InvalidArgumentException('non-nullable satIsWorkingDay cannot be null'); + if (is_null($sun)) { + throw new InvalidArgumentException('non-nullable sun cannot be null'); } - $this->container['satIsWorkingDay'] = $satIsWorkingDay; + $this->container['sun'] = $sun; return $this; } @@ -921,333 +976,278 @@ public function setSunIsWorkingDay(?bool $sunIsWorkingDay): static } /** - * Gets totalHours + * Gets thu * * @return float|null */ - public function getTotalHours(): ?float + public function getThu(): ?float { - return $this->container['totalHours']; + return $this->container['thu']; } /** - * Sets totalHours + * Sets thu * - * @param float|null $totalHours totalHours + * @param float|null $thu thu * * @return $this */ - public function setTotalHours(?float $totalHours): static + public function setThu(?float $thu): static { - if (is_null($totalHours)) { - throw new InvalidArgumentException('non-nullable totalHours cannot be null'); + if (is_null($thu)) { + throw new InvalidArgumentException('non-nullable thu cannot be null'); } - $this->container['totalHours'] = $totalHours; + $this->container['thu'] = $thu; return $this; } /** - * Gets contractedWeeks + * Gets thuIsWorkingDay * - * @return float|null + * @return bool|null */ - public function getContractedWeeks(): ?float + public function getThuIsWorkingDay(): ?bool { - return $this->container['contractedWeeks']; + return $this->container['thuIsWorkingDay']; } /** - * Sets contractedWeeks + * Sets thuIsWorkingDay * - * @param float|null $contractedWeeks The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. + * @param bool|null $thuIsWorkingDay thuIsWorkingDay * * @return $this */ - public function setContractedWeeks(?float $contractedWeeks): static + public function setThuIsWorkingDay(?bool $thuIsWorkingDay): static { - if (is_null($contractedWeeks)) { - array_push($this->openAPINullablesSetToNull, 'contractedWeeks'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('contractedWeeks', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($thuIsWorkingDay)) { + throw new InvalidArgumentException('non-nullable thuIsWorkingDay cannot be null'); } - $this->container['contractedWeeks'] = $contractedWeeks; + $this->container['thuIsWorkingDay'] = $thuIsWorkingDay; return $this; } /** - * Gets fullTimeContractedWeeks + * Gets title * - * @return float|null + * @return string */ - public function getFullTimeContractedWeeks(): ?float + public function getTitle(): string { - return $this->container['fullTimeContractedWeeks']; + return $this->container['title']; } /** - * Sets fullTimeContractedWeeks + * Sets title * - * @param float|null $fullTimeContractedWeeks The amount of weeks an employee works (Full Time). If Null then the default is used. + * @param string $title title * * @return $this */ - public function setFullTimeContractedWeeks(?float $fullTimeContractedWeeks): static + public function setTitle(string $title): static { - if (is_null($fullTimeContractedWeeks)) { - array_push($this->openAPINullablesSetToNull, 'fullTimeContractedWeeks'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fullTimeContractedWeeks', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if ((mb_strlen($title) > 100)) { + throw new InvalidArgumentException('invalid length for $title when calling ContractWorkingPatternRequest., must be smaller than or equal to 100.'); + } + if ((mb_strlen($title) < 1)) { + throw new InvalidArgumentException('invalid length for $title when calling ContractWorkingPatternRequest., must be bigger than or equal to 1.'); } - $this->container['fullTimeContractedWeeks'] = $fullTimeContractedWeeks; + + $this->container['title'] = $title; return $this; } /** - * Gets fullTimeContractedHours + * Gets totalHours * * @return float|null */ - public function getFullTimeContractedHours(): ?float + public function getTotalHours(): ?float { - return $this->container['fullTimeContractedHours']; + return $this->container['totalHours']; } /** - * Sets fullTimeContractedHours + * Sets totalHours * - * @param float|null $fullTimeContractedHours The amount of hours an employee works (Full Time). If Null then the default is used. + * @param float|null $totalHours totalHours * * @return $this */ - public function setFullTimeContractedHours(?float $fullTimeContractedHours): static + public function setTotalHours(?float $totalHours): static { - if (is_null($fullTimeContractedHours)) { - array_push($this->openAPINullablesSetToNull, 'fullTimeContractedHours'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fullTimeContractedHours', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($totalHours)) { + throw new InvalidArgumentException('non-nullable totalHours cannot be null'); } - $this->container['fullTimeContractedHours'] = $fullTimeContractedHours; + $this->container['totalHours'] = $totalHours; return $this; } /** - * Gets bankHolidays + * Gets tue * - * @return \SynergiTech\Staffology\Model\BankHolidayCollection|null + * @return float|null */ - public function getBankHolidays(): ?\SynergiTech\Staffology\Model\BankHolidayCollection + public function getTue(): ?float { - return $this->container['bankHolidays']; + return $this->container['tue']; } /** - * Sets bankHolidays + * Sets tue * - * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHolidays bankHolidays + * @param float|null $tue tue * * @return $this */ - public function setBankHolidays(?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHolidays): static + public function setTue(?float $tue): static { - if (is_null($bankHolidays)) { - throw new InvalidArgumentException('non-nullable bankHolidays cannot be null'); + if (is_null($tue)) { + throw new InvalidArgumentException('non-nullable tue cannot be null'); } - $this->container['bankHolidays'] = $bankHolidays; + $this->container['tue'] = $tue; return $this; } /** - * Gets proRataRule + * Gets tueIsWorkingDay * - * @return \SynergiTech\Staffology\Model\ProRataRule|null + * @return bool|null */ - public function getProRataRule(): ?\SynergiTech\Staffology\Model\ProRataRule + public function getTueIsWorkingDay(): ?bool { - return $this->container['proRataRule']; + return $this->container['tueIsWorkingDay']; } /** - * Sets proRataRule + * Sets tueIsWorkingDay * - * @param \SynergiTech\Staffology\Model\ProRataRule|null $proRataRule proRataRule + * @param bool|null $tueIsWorkingDay tueIsWorkingDay * * @return $this */ - public function setProRataRule(?\SynergiTech\Staffology\Model\ProRataRule $proRataRule): static + public function setTueIsWorkingDay(?bool $tueIsWorkingDay): static { - if (is_null($proRataRule)) { - throw new InvalidArgumentException('non-nullable proRataRule cannot be null'); + if (is_null($tueIsWorkingDay)) { + throw new InvalidArgumentException('non-nullable tueIsWorkingDay cannot be null'); } - $this->container['proRataRule'] = $proRataRule; + $this->container['tueIsWorkingDay'] = $tueIsWorkingDay; return $this; } /** - * Gets workingPatternHoursType + * Gets wed * - * @return \SynergiTech\Staffology\Model\WorkingPatternHoursType|null + * @return float|null */ - public function getWorkingPatternHoursType(): ?\SynergiTech\Staffology\Model\WorkingPatternHoursType + public function getWed(): ?float { - return $this->container['workingPatternHoursType']; + return $this->container['wed']; } /** - * Sets workingPatternHoursType + * Sets wed * - * @param \SynergiTech\Staffology\Model\WorkingPatternHoursType|null $workingPatternHoursType workingPatternHoursType + * @param float|null $wed wed * * @return $this */ - public function setWorkingPatternHoursType(?\SynergiTech\Staffology\Model\WorkingPatternHoursType $workingPatternHoursType): static + public function setWed(?float $wed): static { - if (is_null($workingPatternHoursType)) { - throw new InvalidArgumentException('non-nullable workingPatternHoursType cannot be null'); + if (is_null($wed)) { + throw new InvalidArgumentException('non-nullable wed cannot be null'); } - $this->container['workingPatternHoursType'] = $workingPatternHoursType; + $this->container['wed'] = $wed; return $this; } /** - * Gets isDefault + * Gets wedIsWorkingDay * * @return bool|null */ - public function getIsDefault(): ?bool - { - return $this->container['isDefault']; - } - - /** - * Sets isDefault - * - * @param bool|null $isDefault isDefault - * - * @return $this - */ - public function setIsDefault(?bool $isDefault): static - { - if (is_null($isDefault)) { - throw new InvalidArgumentException('non-nullable isDefault cannot be null'); - } - $this->container['isDefault'] = $isDefault; - - return $this; - } - - /** - * Gets workingPatternType - * - * @return \SynergiTech\Staffology\Model\WorkingPatternType|null - */ - public function getWorkingPatternType(): ?\SynergiTech\Staffology\Model\WorkingPatternType + public function getWedIsWorkingDay(): ?bool { - return $this->container['workingPatternType']; + return $this->container['wedIsWorkingDay']; } /** - * Sets workingPatternType + * Sets wedIsWorkingDay * - * @param \SynergiTech\Staffology\Model\WorkingPatternType|null $workingPatternType workingPatternType + * @param bool|null $wedIsWorkingDay wedIsWorkingDay * * @return $this */ - public function setWorkingPatternType(?\SynergiTech\Staffology\Model\WorkingPatternType $workingPatternType): static + public function setWedIsWorkingDay(?bool $wedIsWorkingDay): static { - if (is_null($workingPatternType)) { - throw new InvalidArgumentException('non-nullable workingPatternType cannot be null'); + if (is_null($wedIsWorkingDay)) { + throw new InvalidArgumentException('non-nullable wedIsWorkingDay cannot be null'); } - $this->container['workingPatternType'] = $workingPatternType; + $this->container['wedIsWorkingDay'] = $wedIsWorkingDay; return $this; } /** - * Gets effectiveFrom + * Gets workingPatternHoursType * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\WorkingPatternHoursType|null */ - public function getEffectiveFrom(): ?\DateTime + public function getWorkingPatternHoursType(): ?\SynergiTech\Staffology\Model\WorkingPatternHoursType { - return $this->container['effectiveFrom']; + return $this->container['workingPatternHoursType']; } /** - * Sets effectiveFrom + * Sets workingPatternHoursType * - * @param \DateTime|null $effectiveFrom effectiveFrom + * @param \SynergiTech\Staffology\Model\WorkingPatternHoursType|null $workingPatternHoursType workingPatternHoursType * * @return $this */ - public function setEffectiveFrom(?\DateTime $effectiveFrom): static + public function setWorkingPatternHoursType(?\SynergiTech\Staffology\Model\WorkingPatternHoursType $workingPatternHoursType): static { - if (is_null($effectiveFrom)) { - array_push($this->openAPINullablesSetToNull, 'effectiveFrom'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('effectiveFrom', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($workingPatternHoursType)) { + throw new InvalidArgumentException('non-nullable workingPatternHoursType cannot be null'); } - $this->container['effectiveFrom'] = $effectiveFrom; + $this->container['workingPatternHoursType'] = $workingPatternHoursType; return $this; } /** - * Gets shiftWorkingPatternDays + * Gets workingPatternType * - * @return \SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayRequest[]|null + * @return \SynergiTech\Staffology\Model\WorkingPatternType|null */ - public function getShiftWorkingPatternDays(): ?array + public function getWorkingPatternType(): ?\SynergiTech\Staffology\Model\WorkingPatternType { - return $this->container['shiftWorkingPatternDays']; + return $this->container['workingPatternType']; } /** - * Sets shiftWorkingPatternDays + * Sets workingPatternType * - * @param \SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayRequest[]|null $shiftWorkingPatternDays shiftWorkingPatternDays + * @param \SynergiTech\Staffology\Model\WorkingPatternType|null $workingPatternType workingPatternType * * @return $this */ - public function setShiftWorkingPatternDays(?array $shiftWorkingPatternDays): static + public function setWorkingPatternType(?\SynergiTech\Staffology\Model\WorkingPatternType $workingPatternType): static { - if (is_null($shiftWorkingPatternDays)) { - array_push($this->openAPINullablesSetToNull, 'shiftWorkingPatternDays'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('shiftWorkingPatternDays', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($workingPatternType)) { + throw new InvalidArgumentException('non-nullable workingPatternType cannot be null'); } - $this->container['shiftWorkingPatternDays'] = $shiftWorkingPatternDays; + $this->container['workingPatternType'] = $workingPatternType; return $this; } diff --git a/src/Model/ContractWorkingPatternResponse.php b/src/Model/ContractWorkingPatternResponse.php index e9f2b3a..c268d76 100644 --- a/src/Model/ContractWorkingPatternResponse.php +++ b/src/Model/ContractWorkingPatternResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,28 +59,28 @@ class ContractWorkingPatternResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPITypes = [ + 'bankHolidayDates' => '\DateTime[]', + 'bankHolidays' => '\SynergiTech\Staffology\Model\BankHolidayCollection', + 'contractedWeeks' => 'float', + 'displayName' => 'string', + 'effectiveFrom' => '\DateTime', + 'fri' => 'float', + 'fullTimeContractedHours' => 'float', + 'fullTimeContractedWeeks' => 'float', 'id' => 'string', - 'title' => 'string', + 'isDefault' => 'bool', 'mon' => 'float', - 'tue' => 'float', - 'wed' => 'float', - 'thu' => 'float', - 'fri' => 'float', + 'proRataRule' => '\SynergiTech\Staffology\Model\ProRataRule', 'sat' => 'float', + 'shiftWorkingPatternDays' => '\SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayResponse[]', 'sun' => 'float', - 'contractedWeeks' => 'float', - 'fullTimeContractedWeeks' => 'float', - 'fullTimeContractedHours' => 'float', - 'bankHolidays' => '\SynergiTech\Staffology\Model\BankHolidayCollection', - 'proRataRule' => '\SynergiTech\Staffology\Model\ProRataRule', - 'bankHolidayDates' => '\DateTime[]', - 'workingPatternHoursType' => '\SynergiTech\Staffology\Model\WorkingPatternHoursType', - 'isDefault' => 'bool', - 'displayName' => 'string', + 'thu' => 'float', + 'title' => 'string', 'totalHours' => 'float', - 'workingPatternType' => '\SynergiTech\Staffology\Model\WorkingPatternType', - 'effectiveFrom' => '\DateTime', - 'shiftWorkingPatternDays' => '\SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayResponse[]' + 'tue' => 'float', + 'wed' => 'float', + 'workingPatternHoursType' => '\SynergiTech\Staffology\Model\WorkingPatternHoursType', + 'workingPatternType' => '\SynergiTech\Staffology\Model\WorkingPatternType' ]; /** @@ -89,28 +89,28 @@ class ContractWorkingPatternResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPIFormats = [ + 'bankHolidayDates' => 'date-time', + 'bankHolidays' => null, + 'contractedWeeks' => 'double', + 'displayName' => null, + 'effectiveFrom' => 'date', + 'fri' => 'double', + 'fullTimeContractedHours' => 'double', + 'fullTimeContractedWeeks' => 'double', 'id' => 'uuid', - 'title' => null, + 'isDefault' => null, 'mon' => 'double', - 'tue' => 'double', - 'wed' => 'double', - 'thu' => 'double', - 'fri' => 'double', + 'proRataRule' => null, 'sat' => 'double', + 'shiftWorkingPatternDays' => null, 'sun' => 'double', - 'contractedWeeks' => 'double', - 'fullTimeContractedWeeks' => 'double', - 'fullTimeContractedHours' => 'double', - 'bankHolidays' => null, - 'proRataRule' => null, - 'bankHolidayDates' => 'date-time', - 'workingPatternHoursType' => null, - 'isDefault' => null, - 'displayName' => null, + 'thu' => 'double', + 'title' => null, 'totalHours' => 'double', - 'workingPatternType' => null, - 'effectiveFrom' => 'date', - 'shiftWorkingPatternDays' => null + 'tue' => 'double', + 'wed' => 'double', + 'workingPatternHoursType' => null, + 'workingPatternType' => null ]; /** @@ -119,28 +119,28 @@ class ContractWorkingPatternResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPINullables = [ + 'bankHolidayDates' => true, + 'bankHolidays' => false, + 'contractedWeeks' => true, + 'displayName' => true, + 'effectiveFrom' => true, + 'fri' => false, + 'fullTimeContractedHours' => true, + 'fullTimeContractedWeeks' => true, 'id' => false, - 'title' => false, + 'isDefault' => false, 'mon' => false, - 'tue' => false, - 'wed' => false, - 'thu' => false, - 'fri' => false, + 'proRataRule' => false, 'sat' => false, + 'shiftWorkingPatternDays' => true, 'sun' => false, - 'contractedWeeks' => true, - 'fullTimeContractedWeeks' => true, - 'fullTimeContractedHours' => true, - 'bankHolidays' => false, - 'proRataRule' => false, - 'bankHolidayDates' => true, - 'workingPatternHoursType' => false, - 'isDefault' => false, - 'displayName' => true, + 'thu' => false, + 'title' => false, 'totalHours' => false, - 'workingPatternType' => false, - 'effectiveFrom' => true, - 'shiftWorkingPatternDays' => true + 'tue' => false, + 'wed' => false, + 'workingPatternHoursType' => false, + 'workingPatternType' => false ]; /** @@ -229,28 +229,28 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'bankHolidayDates' => 'bankHolidayDates', + 'bankHolidays' => 'bankHolidays', + 'contractedWeeks' => 'contractedWeeks', + 'displayName' => 'displayName', + 'effectiveFrom' => 'effectiveFrom', + 'fri' => 'fri', + 'fullTimeContractedHours' => 'fullTimeContractedHours', + 'fullTimeContractedWeeks' => 'fullTimeContractedWeeks', 'id' => 'id', - 'title' => 'title', + 'isDefault' => 'isDefault', 'mon' => 'mon', - 'tue' => 'tue', - 'wed' => 'wed', - 'thu' => 'thu', - 'fri' => 'fri', + 'proRataRule' => 'proRataRule', 'sat' => 'sat', + 'shiftWorkingPatternDays' => 'shiftWorkingPatternDays', 'sun' => 'sun', - 'contractedWeeks' => 'contractedWeeks', - 'fullTimeContractedWeeks' => 'fullTimeContractedWeeks', - 'fullTimeContractedHours' => 'fullTimeContractedHours', - 'bankHolidays' => 'bankHolidays', - 'proRataRule' => 'proRataRule', - 'bankHolidayDates' => 'bankHolidayDates', - 'workingPatternHoursType' => 'workingPatternHoursType', - 'isDefault' => 'isDefault', - 'displayName' => 'displayName', + 'thu' => 'thu', + 'title' => 'title', 'totalHours' => 'totalHours', - 'workingPatternType' => 'workingPatternType', - 'effectiveFrom' => 'effectiveFrom', - 'shiftWorkingPatternDays' => 'shiftWorkingPatternDays' + 'tue' => 'tue', + 'wed' => 'wed', + 'workingPatternHoursType' => 'workingPatternHoursType', + 'workingPatternType' => 'workingPatternType' ]; /** @@ -259,28 +259,28 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'bankHolidayDates' => 'setBankHolidayDates', + 'bankHolidays' => 'setBankHolidays', + 'contractedWeeks' => 'setContractedWeeks', + 'displayName' => 'setDisplayName', + 'effectiveFrom' => 'setEffectiveFrom', + 'fri' => 'setFri', + 'fullTimeContractedHours' => 'setFullTimeContractedHours', + 'fullTimeContractedWeeks' => 'setFullTimeContractedWeeks', 'id' => 'setId', - 'title' => 'setTitle', + 'isDefault' => 'setIsDefault', 'mon' => 'setMon', - 'tue' => 'setTue', - 'wed' => 'setWed', - 'thu' => 'setThu', - 'fri' => 'setFri', + 'proRataRule' => 'setProRataRule', 'sat' => 'setSat', + 'shiftWorkingPatternDays' => 'setShiftWorkingPatternDays', 'sun' => 'setSun', - 'contractedWeeks' => 'setContractedWeeks', - 'fullTimeContractedWeeks' => 'setFullTimeContractedWeeks', - 'fullTimeContractedHours' => 'setFullTimeContractedHours', - 'bankHolidays' => 'setBankHolidays', - 'proRataRule' => 'setProRataRule', - 'bankHolidayDates' => 'setBankHolidayDates', - 'workingPatternHoursType' => 'setWorkingPatternHoursType', - 'isDefault' => 'setIsDefault', - 'displayName' => 'setDisplayName', + 'thu' => 'setThu', + 'title' => 'setTitle', 'totalHours' => 'setTotalHours', - 'workingPatternType' => 'setWorkingPatternType', - 'effectiveFrom' => 'setEffectiveFrom', - 'shiftWorkingPatternDays' => 'setShiftWorkingPatternDays' + 'tue' => 'setTue', + 'wed' => 'setWed', + 'workingPatternHoursType' => 'setWorkingPatternHoursType', + 'workingPatternType' => 'setWorkingPatternType' ]; /** @@ -289,28 +289,28 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'bankHolidayDates' => 'getBankHolidayDates', + 'bankHolidays' => 'getBankHolidays', + 'contractedWeeks' => 'getContractedWeeks', + 'displayName' => 'getDisplayName', + 'effectiveFrom' => 'getEffectiveFrom', + 'fri' => 'getFri', + 'fullTimeContractedHours' => 'getFullTimeContractedHours', + 'fullTimeContractedWeeks' => 'getFullTimeContractedWeeks', 'id' => 'getId', - 'title' => 'getTitle', + 'isDefault' => 'getIsDefault', 'mon' => 'getMon', - 'tue' => 'getTue', - 'wed' => 'getWed', - 'thu' => 'getThu', - 'fri' => 'getFri', + 'proRataRule' => 'getProRataRule', 'sat' => 'getSat', + 'shiftWorkingPatternDays' => 'getShiftWorkingPatternDays', 'sun' => 'getSun', - 'contractedWeeks' => 'getContractedWeeks', - 'fullTimeContractedWeeks' => 'getFullTimeContractedWeeks', - 'fullTimeContractedHours' => 'getFullTimeContractedHours', - 'bankHolidays' => 'getBankHolidays', - 'proRataRule' => 'getProRataRule', - 'bankHolidayDates' => 'getBankHolidayDates', - 'workingPatternHoursType' => 'getWorkingPatternHoursType', - 'isDefault' => 'getIsDefault', - 'displayName' => 'getDisplayName', + 'thu' => 'getThu', + 'title' => 'getTitle', 'totalHours' => 'getTotalHours', - 'workingPatternType' => 'getWorkingPatternType', - 'effectiveFrom' => 'getEffectiveFrom', - 'shiftWorkingPatternDays' => 'getShiftWorkingPatternDays' + 'tue' => 'getTue', + 'wed' => 'getWed', + 'workingPatternHoursType' => 'getWorkingPatternHoursType', + 'workingPatternType' => 'getWorkingPatternType' ]; /** @@ -369,28 +369,28 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('bankHolidayDates', $data ?? [], null); + $this->setIfExists('bankHolidays', $data ?? [], null); + $this->setIfExists('contractedWeeks', $data ?? [], null); + $this->setIfExists('displayName', $data ?? [], null); + $this->setIfExists('effectiveFrom', $data ?? [], null); + $this->setIfExists('fri', $data ?? [], null); + $this->setIfExists('fullTimeContractedHours', $data ?? [], null); + $this->setIfExists('fullTimeContractedWeeks', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('isDefault', $data ?? [], null); $this->setIfExists('mon', $data ?? [], null); - $this->setIfExists('tue', $data ?? [], null); - $this->setIfExists('wed', $data ?? [], null); - $this->setIfExists('thu', $data ?? [], null); - $this->setIfExists('fri', $data ?? [], null); + $this->setIfExists('proRataRule', $data ?? [], null); $this->setIfExists('sat', $data ?? [], null); + $this->setIfExists('shiftWorkingPatternDays', $data ?? [], null); $this->setIfExists('sun', $data ?? [], null); - $this->setIfExists('contractedWeeks', $data ?? [], null); - $this->setIfExists('fullTimeContractedWeeks', $data ?? [], null); - $this->setIfExists('fullTimeContractedHours', $data ?? [], null); - $this->setIfExists('bankHolidays', $data ?? [], null); - $this->setIfExists('proRataRule', $data ?? [], null); - $this->setIfExists('bankHolidayDates', $data ?? [], null); - $this->setIfExists('workingPatternHoursType', $data ?? [], null); - $this->setIfExists('isDefault', $data ?? [], null); - $this->setIfExists('displayName', $data ?? [], null); + $this->setIfExists('thu', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); $this->setIfExists('totalHours', $data ?? [], null); + $this->setIfExists('tue', $data ?? [], null); + $this->setIfExists('wed', $data ?? [], null); + $this->setIfExists('workingPatternHoursType', $data ?? [], null); $this->setIfExists('workingPatternType', $data ?? [], null); - $this->setIfExists('effectiveFrom', $data ?? [], null); - $this->setIfExists('shiftWorkingPatternDays', $data ?? [], null); } /** @@ -447,170 +447,164 @@ public function valid(): bool /** - * Gets id + * Gets bankHolidayDates * - * @return string|null + * @return \DateTime[]|null */ - public function getId(): ?string + public function getBankHolidayDates(): ?array { - return $this->container['id']; + return $this->container['bankHolidayDates']; } /** - * Sets id + * Sets bankHolidayDates * - * @param string|null $id id + * @param \DateTime[]|null $bankHolidayDates [readonly] The dates that are classed as Bank Holidays for this Working Pattern * * @return $this */ - public function setId(?string $id): static + public function setBankHolidayDates(?array $bankHolidayDates): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($bankHolidayDates)) { + array_push($this->openAPINullablesSetToNull, 'bankHolidayDates'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bankHolidayDates', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['bankHolidayDates'] = $bankHolidayDates; return $this; } /** - * Gets title + * Gets bankHolidays * - * @return string + * @return \SynergiTech\Staffology\Model\BankHolidayCollection|null */ - public function getTitle(): string + public function getBankHolidays(): ?\SynergiTech\Staffology\Model\BankHolidayCollection { - return $this->container['title']; + return $this->container['bankHolidays']; } /** - * Sets title + * Sets bankHolidays * - * @param string $title title + * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHolidays bankHolidays * * @return $this */ - public function setTitle(string $title): static + public function setBankHolidays(?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHolidays): static { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); - } - if ((mb_strlen($title) > 100)) { - throw new InvalidArgumentException('invalid length for $title when calling ContractWorkingPatternResponse., must be smaller than or equal to 100.'); - } - if ((mb_strlen($title) < 1)) { - throw new InvalidArgumentException('invalid length for $title when calling ContractWorkingPatternResponse., must be bigger than or equal to 1.'); - } - - $this->container['title'] = $title; - - return $this; - } - - /** - * Gets mon - * - * @return float|null - */ - public function getMon(): ?float - { - return $this->container['mon']; - } - - /** - * Sets mon - * - * @param float|null $mon mon - * - * @return $this - */ - public function setMon(?float $mon): static - { - if (is_null($mon)) { - throw new InvalidArgumentException('non-nullable mon cannot be null'); + if (is_null($bankHolidays)) { + throw new InvalidArgumentException('non-nullable bankHolidays cannot be null'); } - $this->container['mon'] = $mon; + $this->container['bankHolidays'] = $bankHolidays; return $this; } /** - * Gets tue + * Gets contractedWeeks * * @return float|null */ - public function getTue(): ?float + public function getContractedWeeks(): ?float { - return $this->container['tue']; + return $this->container['contractedWeeks']; } /** - * Sets tue + * Sets contractedWeeks * - * @param float|null $tue tue + * @param float|null $contractedWeeks The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. * * @return $this */ - public function setTue(?float $tue): static + public function setContractedWeeks(?float $contractedWeeks): static { - if (is_null($tue)) { - throw new InvalidArgumentException('non-nullable tue cannot be null'); + if (is_null($contractedWeeks)) { + array_push($this->openAPINullablesSetToNull, 'contractedWeeks'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('contractedWeeks', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['tue'] = $tue; + $this->container['contractedWeeks'] = $contractedWeeks; return $this; } /** - * Gets wed + * Gets displayName * - * @return float|null + * @return string|null */ - public function getWed(): ?float + public function getDisplayName(): ?string { - return $this->container['wed']; + return $this->container['displayName']; } /** - * Sets wed + * Sets displayName * - * @param float|null $wed wed + * @param string|null $displayName displayName * * @return $this */ - public function setWed(?float $wed): static + public function setDisplayName(?string $displayName): static { - if (is_null($wed)) { - throw new InvalidArgumentException('non-nullable wed cannot be null'); + if (is_null($displayName)) { + array_push($this->openAPINullablesSetToNull, 'displayName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('displayName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['wed'] = $wed; + $this->container['displayName'] = $displayName; return $this; } /** - * Gets thu + * Gets effectiveFrom * - * @return float|null + * @return \DateTime|null */ - public function getThu(): ?float + public function getEffectiveFrom(): ?\DateTime { - return $this->container['thu']; + return $this->container['effectiveFrom']; } /** - * Sets thu + * Sets effectiveFrom * - * @param float|null $thu thu + * @param \DateTime|null $effectiveFrom effectiveFrom * * @return $this */ - public function setThu(?float $thu): static + public function setEffectiveFrom(?\DateTime $effectiveFrom): static { - if (is_null($thu)) { - throw new InvalidArgumentException('non-nullable thu cannot be null'); + if (is_null($effectiveFrom)) { + array_push($this->openAPINullablesSetToNull, 'effectiveFrom'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('effectiveFrom', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['thu'] = $thu; + $this->container['effectiveFrom'] = $effectiveFrom; return $this; } @@ -643,333 +637,326 @@ public function setFri(?float $fri): static } /** - * Gets sat + * Gets fullTimeContractedHours * * @return float|null */ - public function getSat(): ?float + public function getFullTimeContractedHours(): ?float { - return $this->container['sat']; + return $this->container['fullTimeContractedHours']; } /** - * Sets sat + * Sets fullTimeContractedHours * - * @param float|null $sat sat + * @param float|null $fullTimeContractedHours The amount of hours an employee works (Full Time). If Null then the default is used. * * @return $this */ - public function setSat(?float $sat): static + public function setFullTimeContractedHours(?float $fullTimeContractedHours): static { - if (is_null($sat)) { - throw new InvalidArgumentException('non-nullable sat cannot be null'); + if (is_null($fullTimeContractedHours)) { + array_push($this->openAPINullablesSetToNull, 'fullTimeContractedHours'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fullTimeContractedHours', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['sat'] = $sat; + $this->container['fullTimeContractedHours'] = $fullTimeContractedHours; return $this; } /** - * Gets sun + * Gets fullTimeContractedWeeks * * @return float|null */ - public function getSun(): ?float + public function getFullTimeContractedWeeks(): ?float { - return $this->container['sun']; + return $this->container['fullTimeContractedWeeks']; } /** - * Sets sun + * Sets fullTimeContractedWeeks * - * @param float|null $sun sun + * @param float|null $fullTimeContractedWeeks The amount of weeks an employee works (Full Time). If Null then the default is used. * * @return $this */ - public function setSun(?float $sun): static + public function setFullTimeContractedWeeks(?float $fullTimeContractedWeeks): static { - if (is_null($sun)) { - throw new InvalidArgumentException('non-nullable sun cannot be null'); + if (is_null($fullTimeContractedWeeks)) { + array_push($this->openAPINullablesSetToNull, 'fullTimeContractedWeeks'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fullTimeContractedWeeks', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['sun'] = $sun; + $this->container['fullTimeContractedWeeks'] = $fullTimeContractedWeeks; return $this; } /** - * Gets contractedWeeks + * Gets id * - * @return float|null + * @return string|null */ - public function getContractedWeeks(): ?float + public function getId(): ?string { - return $this->container['contractedWeeks']; + return $this->container['id']; } /** - * Sets contractedWeeks + * Sets id * - * @param float|null $contractedWeeks The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. + * @param string|null $id id * * @return $this */ - public function setContractedWeeks(?float $contractedWeeks): static + public function setId(?string $id): static { - if (is_null($contractedWeeks)) { - array_push($this->openAPINullablesSetToNull, 'contractedWeeks'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('contractedWeeks', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['contractedWeeks'] = $contractedWeeks; + $this->container['id'] = $id; return $this; } /** - * Gets fullTimeContractedWeeks + * Gets isDefault * - * @return float|null + * @return bool|null */ - public function getFullTimeContractedWeeks(): ?float + public function getIsDefault(): ?bool { - return $this->container['fullTimeContractedWeeks']; + return $this->container['isDefault']; } /** - * Sets fullTimeContractedWeeks + * Sets isDefault * - * @param float|null $fullTimeContractedWeeks The amount of weeks an employee works (Full Time). If Null then the default is used. + * @param bool|null $isDefault isDefault * * @return $this */ - public function setFullTimeContractedWeeks(?float $fullTimeContractedWeeks): static + public function setIsDefault(?bool $isDefault): static { - if (is_null($fullTimeContractedWeeks)) { - array_push($this->openAPINullablesSetToNull, 'fullTimeContractedWeeks'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fullTimeContractedWeeks', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isDefault)) { + throw new InvalidArgumentException('non-nullable isDefault cannot be null'); } - $this->container['fullTimeContractedWeeks'] = $fullTimeContractedWeeks; + $this->container['isDefault'] = $isDefault; return $this; } /** - * Gets fullTimeContractedHours + * Gets mon * * @return float|null */ - public function getFullTimeContractedHours(): ?float + public function getMon(): ?float { - return $this->container['fullTimeContractedHours']; + return $this->container['mon']; } /** - * Sets fullTimeContractedHours + * Sets mon * - * @param float|null $fullTimeContractedHours The amount of hours an employee works (Full Time). If Null then the default is used. + * @param float|null $mon mon * * @return $this */ - public function setFullTimeContractedHours(?float $fullTimeContractedHours): static + public function setMon(?float $mon): static { - if (is_null($fullTimeContractedHours)) { - array_push($this->openAPINullablesSetToNull, 'fullTimeContractedHours'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fullTimeContractedHours', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($mon)) { + throw new InvalidArgumentException('non-nullable mon cannot be null'); } - $this->container['fullTimeContractedHours'] = $fullTimeContractedHours; + $this->container['mon'] = $mon; return $this; } /** - * Gets bankHolidays + * Gets proRataRule * - * @return \SynergiTech\Staffology\Model\BankHolidayCollection|null + * @return \SynergiTech\Staffology\Model\ProRataRule|null */ - public function getBankHolidays(): ?\SynergiTech\Staffology\Model\BankHolidayCollection + public function getProRataRule(): ?\SynergiTech\Staffology\Model\ProRataRule { - return $this->container['bankHolidays']; + return $this->container['proRataRule']; } /** - * Sets bankHolidays + * Sets proRataRule * - * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHolidays bankHolidays + * @param \SynergiTech\Staffology\Model\ProRataRule|null $proRataRule proRataRule * * @return $this */ - public function setBankHolidays(?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHolidays): static + public function setProRataRule(?\SynergiTech\Staffology\Model\ProRataRule $proRataRule): static { - if (is_null($bankHolidays)) { - throw new InvalidArgumentException('non-nullable bankHolidays cannot be null'); + if (is_null($proRataRule)) { + throw new InvalidArgumentException('non-nullable proRataRule cannot be null'); } - $this->container['bankHolidays'] = $bankHolidays; + $this->container['proRataRule'] = $proRataRule; return $this; } /** - * Gets proRataRule + * Gets sat * - * @return \SynergiTech\Staffology\Model\ProRataRule|null + * @return float|null */ - public function getProRataRule(): ?\SynergiTech\Staffology\Model\ProRataRule + public function getSat(): ?float { - return $this->container['proRataRule']; + return $this->container['sat']; } /** - * Sets proRataRule + * Sets sat * - * @param \SynergiTech\Staffology\Model\ProRataRule|null $proRataRule proRataRule + * @param float|null $sat sat * * @return $this */ - public function setProRataRule(?\SynergiTech\Staffology\Model\ProRataRule $proRataRule): static + public function setSat(?float $sat): static { - if (is_null($proRataRule)) { - throw new InvalidArgumentException('non-nullable proRataRule cannot be null'); + if (is_null($sat)) { + throw new InvalidArgumentException('non-nullable sat cannot be null'); } - $this->container['proRataRule'] = $proRataRule; + $this->container['sat'] = $sat; return $this; } /** - * Gets bankHolidayDates + * Gets shiftWorkingPatternDays * - * @return \DateTime[]|null + * @return \SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayResponse[]|null */ - public function getBankHolidayDates(): ?array + public function getShiftWorkingPatternDays(): ?array { - return $this->container['bankHolidayDates']; + return $this->container['shiftWorkingPatternDays']; } /** - * Sets bankHolidayDates + * Sets shiftWorkingPatternDays * - * @param \DateTime[]|null $bankHolidayDates [readonly] The dates that are classed as Bank Holidays for this Working Pattern + * @param \SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayResponse[]|null $shiftWorkingPatternDays shiftWorkingPatternDays * * @return $this */ - public function setBankHolidayDates(?array $bankHolidayDates): static + public function setShiftWorkingPatternDays(?array $shiftWorkingPatternDays): static { - if (is_null($bankHolidayDates)) { - array_push($this->openAPINullablesSetToNull, 'bankHolidayDates'); + if (is_null($shiftWorkingPatternDays)) { + array_push($this->openAPINullablesSetToNull, 'shiftWorkingPatternDays'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankHolidayDates', $nullablesSetToNull); + $index = array_search('shiftWorkingPatternDays', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['bankHolidayDates'] = $bankHolidayDates; + $this->container['shiftWorkingPatternDays'] = $shiftWorkingPatternDays; return $this; } /** - * Gets workingPatternHoursType + * Gets sun * - * @return \SynergiTech\Staffology\Model\WorkingPatternHoursType|null + * @return float|null */ - public function getWorkingPatternHoursType(): ?\SynergiTech\Staffology\Model\WorkingPatternHoursType + public function getSun(): ?float { - return $this->container['workingPatternHoursType']; + return $this->container['sun']; } /** - * Sets workingPatternHoursType + * Sets sun * - * @param \SynergiTech\Staffology\Model\WorkingPatternHoursType|null $workingPatternHoursType workingPatternHoursType + * @param float|null $sun sun * * @return $this */ - public function setWorkingPatternHoursType(?\SynergiTech\Staffology\Model\WorkingPatternHoursType $workingPatternHoursType): static + public function setSun(?float $sun): static { - if (is_null($workingPatternHoursType)) { - throw new InvalidArgumentException('non-nullable workingPatternHoursType cannot be null'); + if (is_null($sun)) { + throw new InvalidArgumentException('non-nullable sun cannot be null'); } - $this->container['workingPatternHoursType'] = $workingPatternHoursType; + $this->container['sun'] = $sun; return $this; } /** - * Gets isDefault + * Gets thu * - * @return bool|null + * @return float|null */ - public function getIsDefault(): ?bool + public function getThu(): ?float { - return $this->container['isDefault']; + return $this->container['thu']; } /** - * Sets isDefault + * Sets thu * - * @param bool|null $isDefault isDefault + * @param float|null $thu thu * * @return $this */ - public function setIsDefault(?bool $isDefault): static + public function setThu(?float $thu): static { - if (is_null($isDefault)) { - throw new InvalidArgumentException('non-nullable isDefault cannot be null'); + if (is_null($thu)) { + throw new InvalidArgumentException('non-nullable thu cannot be null'); } - $this->container['isDefault'] = $isDefault; + $this->container['thu'] = $thu; return $this; } /** - * Gets displayName + * Gets title * - * @return string|null + * @return string */ - public function getDisplayName(): ?string + public function getTitle(): string { - return $this->container['displayName']; + return $this->container['title']; } /** - * Sets displayName + * Sets title * - * @param string|null $displayName displayName + * @param string $title title * * @return $this */ - public function setDisplayName(?string $displayName): static + public function setTitle(string $title): static { - if (is_null($displayName)) { - array_push($this->openAPINullablesSetToNull, 'displayName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('displayName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); } - $this->container['displayName'] = $displayName; + if ((mb_strlen($title) > 100)) { + throw new InvalidArgumentException('invalid length for $title when calling ContractWorkingPatternResponse., must be smaller than or equal to 100.'); + } + if ((mb_strlen($title) < 1)) { + throw new InvalidArgumentException('invalid length for $title when calling ContractWorkingPatternResponse., must be bigger than or equal to 1.'); + } + + $this->container['title'] = $title; return $this; } @@ -1002,96 +989,109 @@ public function setTotalHours(?float $totalHours): static } /** - * Gets workingPatternType + * Gets tue * - * @return \SynergiTech\Staffology\Model\WorkingPatternType|null + * @return float|null */ - public function getWorkingPatternType(): ?\SynergiTech\Staffology\Model\WorkingPatternType + public function getTue(): ?float { - return $this->container['workingPatternType']; + return $this->container['tue']; } /** - * Sets workingPatternType + * Sets tue * - * @param \SynergiTech\Staffology\Model\WorkingPatternType|null $workingPatternType workingPatternType + * @param float|null $tue tue * * @return $this */ - public function setWorkingPatternType(?\SynergiTech\Staffology\Model\WorkingPatternType $workingPatternType): static + public function setTue(?float $tue): static { - if (is_null($workingPatternType)) { - throw new InvalidArgumentException('non-nullable workingPatternType cannot be null'); + if (is_null($tue)) { + throw new InvalidArgumentException('non-nullable tue cannot be null'); } - $this->container['workingPatternType'] = $workingPatternType; + $this->container['tue'] = $tue; return $this; } /** - * Gets effectiveFrom + * Gets wed * - * @return \DateTime|null + * @return float|null */ - public function getEffectiveFrom(): ?\DateTime + public function getWed(): ?float { - return $this->container['effectiveFrom']; + return $this->container['wed']; } /** - * Sets effectiveFrom + * Sets wed * - * @param \DateTime|null $effectiveFrom effectiveFrom + * @param float|null $wed wed * * @return $this */ - public function setEffectiveFrom(?\DateTime $effectiveFrom): static + public function setWed(?float $wed): static { - if (is_null($effectiveFrom)) { - array_push($this->openAPINullablesSetToNull, 'effectiveFrom'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('effectiveFrom', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($wed)) { + throw new InvalidArgumentException('non-nullable wed cannot be null'); } - $this->container['effectiveFrom'] = $effectiveFrom; + $this->container['wed'] = $wed; return $this; } /** - * Gets shiftWorkingPatternDays + * Gets workingPatternHoursType * - * @return \SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayResponse[]|null + * @return \SynergiTech\Staffology\Model\WorkingPatternHoursType|null */ - public function getShiftWorkingPatternDays(): ?array + public function getWorkingPatternHoursType(): ?\SynergiTech\Staffology\Model\WorkingPatternHoursType { - return $this->container['shiftWorkingPatternDays']; + return $this->container['workingPatternHoursType']; } /** - * Sets shiftWorkingPatternDays + * Sets workingPatternHoursType * - * @param \SynergiTech\Staffology\Model\ContractShiftWorkingPatternDayResponse[]|null $shiftWorkingPatternDays shiftWorkingPatternDays + * @param \SynergiTech\Staffology\Model\WorkingPatternHoursType|null $workingPatternHoursType workingPatternHoursType * * @return $this */ - public function setShiftWorkingPatternDays(?array $shiftWorkingPatternDays): static + public function setWorkingPatternHoursType(?\SynergiTech\Staffology\Model\WorkingPatternHoursType $workingPatternHoursType): static { - if (is_null($shiftWorkingPatternDays)) { - array_push($this->openAPINullablesSetToNull, 'shiftWorkingPatternDays'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('shiftWorkingPatternDays', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($workingPatternHoursType)) { + throw new InvalidArgumentException('non-nullable workingPatternHoursType cannot be null'); } - $this->container['shiftWorkingPatternDays'] = $shiftWorkingPatternDays; + $this->container['workingPatternHoursType'] = $workingPatternHoursType; + + return $this; + } + + /** + * Gets workingPatternType + * + * @return \SynergiTech\Staffology\Model\WorkingPatternType|null + */ + public function getWorkingPatternType(): ?\SynergiTech\Staffology\Model\WorkingPatternType + { + return $this->container['workingPatternType']; + } + + /** + * Sets workingPatternType + * + * @param \SynergiTech\Staffology\Model\WorkingPatternType|null $workingPatternType workingPatternType + * + * @return $this + */ + public function setWorkingPatternType(?\SynergiTech\Staffology\Model\WorkingPatternType $workingPatternType): static + { + if (is_null($workingPatternType)) { + throw new InvalidArgumentException('non-nullable workingPatternType cannot be null'); + } + $this->container['workingPatternType'] = $workingPatternType; return $this; } diff --git a/src/Model/ContractYearsServiceEntitlementRequest.php b/src/Model/ContractYearsServiceEntitlementRequest.php index b0db174..6589380 100644 --- a/src/Model/ContractYearsServiceEntitlementRequest.php +++ b/src/Model/ContractYearsServiceEntitlementRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class ContractYearsServiceEntitlementRequest implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPITypes = [ - 'yearsService' => 'int', - 'totalAdditionalDaysHoliday' => 'float' + 'totalAdditionalDaysHoliday' => 'float', + 'yearsService' => 'int' ]; /** @@ -69,8 +69,8 @@ class ContractYearsServiceEntitlementRequest implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPIFormats = [ - 'yearsService' => 'int32', - 'totalAdditionalDaysHoliday' => 'double' + 'totalAdditionalDaysHoliday' => 'double', + 'yearsService' => 'int32' ]; /** @@ -79,8 +79,8 @@ class ContractYearsServiceEntitlementRequest implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPINullables = [ - 'yearsService' => true, - 'totalAdditionalDaysHoliday' => true + 'totalAdditionalDaysHoliday' => true, + 'yearsService' => true ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'yearsService' => 'yearsService', - 'totalAdditionalDaysHoliday' => 'totalAdditionalDaysHoliday' + 'totalAdditionalDaysHoliday' => 'totalAdditionalDaysHoliday', + 'yearsService' => 'yearsService' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'yearsService' => 'setYearsService', - 'totalAdditionalDaysHoliday' => 'setTotalAdditionalDaysHoliday' + 'totalAdditionalDaysHoliday' => 'setTotalAdditionalDaysHoliday', + 'yearsService' => 'setYearsService' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'yearsService' => 'getYearsService', - 'totalAdditionalDaysHoliday' => 'getTotalAdditionalDaysHoliday' + 'totalAdditionalDaysHoliday' => 'getTotalAdditionalDaysHoliday', + 'yearsService' => 'getYearsService' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('yearsService', $data ?? [], null); $this->setIfExists('totalAdditionalDaysHoliday', $data ?? [], null); + $this->setIfExists('yearsService', $data ?? [], null); } /** @@ -296,69 +296,69 @@ public function valid(): bool /** - * Gets yearsService + * Gets totalAdditionalDaysHoliday * - * @return int|null + * @return float|null */ - public function getYearsService(): ?int + public function getTotalAdditionalDaysHoliday(): ?float { - return $this->container['yearsService']; + return $this->container['totalAdditionalDaysHoliday']; } /** - * Sets yearsService + * Sets totalAdditionalDaysHoliday * - * @param int|null $yearsService Number of years of service. + * @param float|null $totalAdditionalDaysHoliday Total additional days of holiday entitlement. * * @return $this */ - public function setYearsService(?int $yearsService): static + public function setTotalAdditionalDaysHoliday(?float $totalAdditionalDaysHoliday): static { - if (is_null($yearsService)) { - array_push($this->openAPINullablesSetToNull, 'yearsService'); + if (is_null($totalAdditionalDaysHoliday)) { + array_push($this->openAPINullablesSetToNull, 'totalAdditionalDaysHoliday'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('yearsService', $nullablesSetToNull); + $index = array_search('totalAdditionalDaysHoliday', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['yearsService'] = $yearsService; + $this->container['totalAdditionalDaysHoliday'] = $totalAdditionalDaysHoliday; return $this; } /** - * Gets totalAdditionalDaysHoliday + * Gets yearsService * - * @return float|null + * @return int|null */ - public function getTotalAdditionalDaysHoliday(): ?float + public function getYearsService(): ?int { - return $this->container['totalAdditionalDaysHoliday']; + return $this->container['yearsService']; } /** - * Sets totalAdditionalDaysHoliday + * Sets yearsService * - * @param float|null $totalAdditionalDaysHoliday Total additional days of holiday entitlement. + * @param int|null $yearsService Number of years of service. * * @return $this */ - public function setTotalAdditionalDaysHoliday(?float $totalAdditionalDaysHoliday): static + public function setYearsService(?int $yearsService): static { - if (is_null($totalAdditionalDaysHoliday)) { - array_push($this->openAPINullablesSetToNull, 'totalAdditionalDaysHoliday'); + if (is_null($yearsService)) { + array_push($this->openAPINullablesSetToNull, 'yearsService'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalAdditionalDaysHoliday', $nullablesSetToNull); + $index = array_search('yearsService', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['totalAdditionalDaysHoliday'] = $totalAdditionalDaysHoliday; + $this->container['yearsService'] = $yearsService; return $this; } diff --git a/src/Model/ContractYearsServiceEntitlementResponse.php b/src/Model/ContractYearsServiceEntitlementResponse.php index 6dca211..5083d32 100644 --- a/src/Model/ContractYearsServiceEntitlementResponse.php +++ b/src/Model/ContractYearsServiceEntitlementResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractYearsServiceEntitlementResponse implements ModelInterface, ArrayAc * @var array */ protected static array $openAPITypes = [ + 'totalAdditionalDaysHoliday' => 'float', 'uniqueId' => 'string', - 'yearsService' => 'int', - 'totalAdditionalDaysHoliday' => 'float' + 'yearsService' => 'int' ]; /** @@ -70,9 +70,9 @@ class ContractYearsServiceEntitlementResponse implements ModelInterface, ArrayAc * @var array */ protected static array $openAPIFormats = [ + 'totalAdditionalDaysHoliday' => 'double', 'uniqueId' => 'uuid', - 'yearsService' => 'int32', - 'totalAdditionalDaysHoliday' => 'double' + 'yearsService' => 'int32' ]; /** @@ -81,9 +81,9 @@ class ContractYearsServiceEntitlementResponse implements ModelInterface, ArrayAc * @var array */ protected static array $openAPINullables = [ + 'totalAdditionalDaysHoliday' => true, 'uniqueId' => false, - 'yearsService' => true, - 'totalAdditionalDaysHoliday' => true + 'yearsService' => true ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'totalAdditionalDaysHoliday' => 'totalAdditionalDaysHoliday', 'uniqueId' => 'uniqueId', - 'yearsService' => 'yearsService', - 'totalAdditionalDaysHoliday' => 'totalAdditionalDaysHoliday' + 'yearsService' => 'yearsService' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'totalAdditionalDaysHoliday' => 'setTotalAdditionalDaysHoliday', 'uniqueId' => 'setUniqueId', - 'yearsService' => 'setYearsService', - 'totalAdditionalDaysHoliday' => 'setTotalAdditionalDaysHoliday' + 'yearsService' => 'setYearsService' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'totalAdditionalDaysHoliday' => 'getTotalAdditionalDaysHoliday', 'uniqueId' => 'getUniqueId', - 'yearsService' => 'getYearsService', - 'totalAdditionalDaysHoliday' => 'getTotalAdditionalDaysHoliday' + 'yearsService' => 'getYearsService' ]; /** @@ -255,9 +255,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('totalAdditionalDaysHoliday', $data ?? [], null); $this->setIfExists('uniqueId', $data ?? [], null); $this->setIfExists('yearsService', $data ?? [], null); - $this->setIfExists('totalAdditionalDaysHoliday', $data ?? [], null); } /** @@ -302,6 +302,40 @@ public function valid(): bool } + /** + * Gets totalAdditionalDaysHoliday + * + * @return float|null + */ + public function getTotalAdditionalDaysHoliday(): ?float + { + return $this->container['totalAdditionalDaysHoliday']; + } + + /** + * Sets totalAdditionalDaysHoliday + * + * @param float|null $totalAdditionalDaysHoliday Total additional days of holiday entitlement. + * + * @return $this + */ + public function setTotalAdditionalDaysHoliday(?float $totalAdditionalDaysHoliday): static + { + if (is_null($totalAdditionalDaysHoliday)) { + array_push($this->openAPINullablesSetToNull, 'totalAdditionalDaysHoliday'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('totalAdditionalDaysHoliday', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['totalAdditionalDaysHoliday'] = $totalAdditionalDaysHoliday; + + return $this; + } + /** * Gets uniqueId * @@ -362,40 +396,6 @@ public function setYearsService(?int $yearsService): static return $this; } - - /** - * Gets totalAdditionalDaysHoliday - * - * @return float|null - */ - public function getTotalAdditionalDaysHoliday(): ?float - { - return $this->container['totalAdditionalDaysHoliday']; - } - - /** - * Sets totalAdditionalDaysHoliday - * - * @param float|null $totalAdditionalDaysHoliday Total additional days of holiday entitlement. - * - * @return $this - */ - public function setTotalAdditionalDaysHoliday(?float $totalAdditionalDaysHoliday): static - { - if (is_null($totalAdditionalDaysHoliday)) { - array_push($this->openAPINullablesSetToNull, 'totalAdditionalDaysHoliday'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalAdditionalDaysHoliday', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['totalAdditionalDaysHoliday'] = $totalAdditionalDaysHoliday; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContractYearsServiceEntitlementUpdateRequest.php b/src/Model/ContractYearsServiceEntitlementUpdateRequest.php index ff7336b..121b23d 100644 --- a/src/Model/ContractYearsServiceEntitlementUpdateRequest.php +++ b/src/Model/ContractYearsServiceEntitlementUpdateRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class ContractYearsServiceEntitlementUpdateRequest implements ModelInterface, Ar * @var array */ protected static array $openAPITypes = [ + 'totalAdditionalDaysHoliday' => 'float', 'uniqueId' => 'string', - 'yearsService' => 'int', - 'totalAdditionalDaysHoliday' => 'float' + 'yearsService' => 'int' ]; /** @@ -70,9 +70,9 @@ class ContractYearsServiceEntitlementUpdateRequest implements ModelInterface, Ar * @var array */ protected static array $openAPIFormats = [ + 'totalAdditionalDaysHoliday' => 'double', 'uniqueId' => 'uuid', - 'yearsService' => 'int32', - 'totalAdditionalDaysHoliday' => 'double' + 'yearsService' => 'int32' ]; /** @@ -81,9 +81,9 @@ class ContractYearsServiceEntitlementUpdateRequest implements ModelInterface, Ar * @var array */ protected static array $openAPINullables = [ + 'totalAdditionalDaysHoliday' => true, 'uniqueId' => false, - 'yearsService' => true, - 'totalAdditionalDaysHoliday' => true + 'yearsService' => true ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'totalAdditionalDaysHoliday' => 'totalAdditionalDaysHoliday', 'uniqueId' => 'uniqueId', - 'yearsService' => 'yearsService', - 'totalAdditionalDaysHoliday' => 'totalAdditionalDaysHoliday' + 'yearsService' => 'yearsService' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'totalAdditionalDaysHoliday' => 'setTotalAdditionalDaysHoliday', 'uniqueId' => 'setUniqueId', - 'yearsService' => 'setYearsService', - 'totalAdditionalDaysHoliday' => 'setTotalAdditionalDaysHoliday' + 'yearsService' => 'setYearsService' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'totalAdditionalDaysHoliday' => 'getTotalAdditionalDaysHoliday', 'uniqueId' => 'getUniqueId', - 'yearsService' => 'getYearsService', - 'totalAdditionalDaysHoliday' => 'getTotalAdditionalDaysHoliday' + 'yearsService' => 'getYearsService' ]; /** @@ -255,9 +255,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('totalAdditionalDaysHoliday', $data ?? [], null); $this->setIfExists('uniqueId', $data ?? [], null); $this->setIfExists('yearsService', $data ?? [], null); - $this->setIfExists('totalAdditionalDaysHoliday', $data ?? [], null); } /** @@ -302,6 +302,40 @@ public function valid(): bool } + /** + * Gets totalAdditionalDaysHoliday + * + * @return float|null + */ + public function getTotalAdditionalDaysHoliday(): ?float + { + return $this->container['totalAdditionalDaysHoliday']; + } + + /** + * Sets totalAdditionalDaysHoliday + * + * @param float|null $totalAdditionalDaysHoliday Total additional days of holiday entitlement. + * + * @return $this + */ + public function setTotalAdditionalDaysHoliday(?float $totalAdditionalDaysHoliday): static + { + if (is_null($totalAdditionalDaysHoliday)) { + array_push($this->openAPINullablesSetToNull, 'totalAdditionalDaysHoliday'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('totalAdditionalDaysHoliday', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['totalAdditionalDaysHoliday'] = $totalAdditionalDaysHoliday; + + return $this; + } + /** * Gets uniqueId * @@ -362,40 +396,6 @@ public function setYearsService(?int $yearsService): static return $this; } - - /** - * Gets totalAdditionalDaysHoliday - * - * @return float|null - */ - public function getTotalAdditionalDaysHoliday(): ?float - { - return $this->container['totalAdditionalDaysHoliday']; - } - - /** - * Sets totalAdditionalDaysHoliday - * - * @param float|null $totalAdditionalDaysHoliday Total additional days of holiday entitlement. - * - * @return $this - */ - public function setTotalAdditionalDaysHoliday(?float $totalAdditionalDaysHoliday): static - { - if (is_null($totalAdditionalDaysHoliday)) { - array_push($this->openAPINullablesSetToNull, 'totalAdditionalDaysHoliday'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalAdditionalDaysHoliday', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['totalAdditionalDaysHoliday'] = $totalAdditionalDaysHoliday; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/CostAnalysisReport.php b/src/Model/CostAnalysisReport.php index cf8d5de..410be23 100644 --- a/src/Model/CostAnalysisReport.php +++ b/src/Model/CostAnalysisReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,32 +59,33 @@ class CostAnalysisReport implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'singlePayrun' => '\SynergiTech\Staffology\Model\PayRun', - 'totalPay' => 'float', - 'pension' => 'float', 'aeoFees' => 'float', - 'totalCost' => 'float', + 'employer' => '\SynergiTech\Staffology\Model\Item', 'employerNic' => 'float', - 'netPayrollCost' => 'float', - 'maleCount' => 'int', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', 'femaleCount' => 'int', - 'leaverCount' => 'int', + 'isDraft' => 'bool', 'joinerCount' => 'int', - 'paymentAfterLeavingCount' => 'int', - 'recoverableAmounts' => '\SynergiTech\Staffology\Model\RecoverableAmounts', - 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'leaverCount' => 'int', + 'maleCount' => 'int', + 'netPayrollCost' => 'float', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'paymentAfterLeavingCount' => 'int', + 'pension' => 'float', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', + 'recoverableAmounts' => '\SynergiTech\Staffology\Model\RecoverableAmounts', 'report' => '\SynergiTech\Staffology\Model\Report', + 'singlePayrun' => '\SynergiTech\Staffology\Model\PayRun', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'totalCost' => 'float', + 'totalPay' => 'float', + 'version' => 'int' ]; /** @@ -93,32 +94,33 @@ class CostAnalysisReport implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'singlePayrun' => null, - 'totalPay' => 'double', - 'pension' => 'double', 'aeoFees' => 'double', - 'totalCost' => 'double', + 'employer' => null, 'employerNic' => 'double', - 'netPayrollCost' => 'double', - 'maleCount' => 'int32', + 'endDate' => 'date', + 'endPeriodName' => null, 'femaleCount' => 'int32', - 'leaverCount' => 'int32', + 'isDraft' => null, 'joinerCount' => 'int32', - 'paymentAfterLeavingCount' => 'int32', - 'recoverableAmounts' => null, - 'employer' => null, - 'payPeriod' => null, + 'leaverCount' => 'int32', + 'maleCount' => 'int32', + 'netPayrollCost' => 'double', 'ordinal' => 'int32', + 'payPeriod' => null, + 'paymentAfterLeavingCount' => 'int32', + 'pension' => 'double', 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', + 'recoverableAmounts' => null, 'report' => null, + 'singlePayrun' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'totalCost' => 'double', + 'totalPay' => 'double', + 'version' => 'int32' ]; /** @@ -127,32 +129,33 @@ class CostAnalysisReport implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'singlePayrun' => false, - 'totalPay' => false, - 'pension' => false, 'aeoFees' => false, - 'totalCost' => false, + 'employer' => false, 'employerNic' => false, - 'netPayrollCost' => false, - 'maleCount' => false, + 'endDate' => false, + 'endPeriodName' => true, 'femaleCount' => false, - 'leaverCount' => false, + 'isDraft' => false, 'joinerCount' => false, - 'paymentAfterLeavingCount' => false, - 'recoverableAmounts' => false, - 'employer' => false, - 'payPeriod' => false, + 'leaverCount' => false, + 'maleCount' => false, + 'netPayrollCost' => false, 'ordinal' => false, + 'payPeriod' => false, + 'paymentAfterLeavingCount' => false, + 'pension' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, + 'recoverableAmounts' => false, 'report' => false, + 'singlePayrun' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'totalCost' => false, + 'totalPay' => false, + 'version' => true ]; /** @@ -241,32 +244,33 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'singlePayrun' => 'singlePayrun', - 'totalPay' => 'totalPay', - 'pension' => 'pension', 'aeoFees' => 'aeoFees', - 'totalCost' => 'totalCost', + 'employer' => 'employer', 'employerNic' => 'employerNic', - 'netPayrollCost' => 'netPayrollCost', - 'maleCount' => 'maleCount', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', 'femaleCount' => 'femaleCount', - 'leaverCount' => 'leaverCount', + 'isDraft' => 'isDraft', 'joinerCount' => 'joinerCount', - 'paymentAfterLeavingCount' => 'paymentAfterLeavingCount', - 'recoverableAmounts' => 'recoverableAmounts', - 'employer' => 'employer', - 'payPeriod' => 'payPeriod', + 'leaverCount' => 'leaverCount', + 'maleCount' => 'maleCount', + 'netPayrollCost' => 'netPayrollCost', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', + 'paymentAfterLeavingCount' => 'paymentAfterLeavingCount', + 'pension' => 'pension', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', + 'recoverableAmounts' => 'recoverableAmounts', 'report' => 'report', + 'singlePayrun' => 'singlePayrun', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'totalCost' => 'totalCost', + 'totalPay' => 'totalPay', + 'version' => 'version' ]; /** @@ -275,32 +279,33 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'singlePayrun' => 'setSinglePayrun', - 'totalPay' => 'setTotalPay', - 'pension' => 'setPension', 'aeoFees' => 'setAeoFees', - 'totalCost' => 'setTotalCost', + 'employer' => 'setEmployer', 'employerNic' => 'setEmployerNic', - 'netPayrollCost' => 'setNetPayrollCost', - 'maleCount' => 'setMaleCount', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', 'femaleCount' => 'setFemaleCount', - 'leaverCount' => 'setLeaverCount', + 'isDraft' => 'setIsDraft', 'joinerCount' => 'setJoinerCount', - 'paymentAfterLeavingCount' => 'setPaymentAfterLeavingCount', - 'recoverableAmounts' => 'setRecoverableAmounts', - 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', + 'leaverCount' => 'setLeaverCount', + 'maleCount' => 'setMaleCount', + 'netPayrollCost' => 'setNetPayrollCost', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', + 'paymentAfterLeavingCount' => 'setPaymentAfterLeavingCount', + 'pension' => 'setPension', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', + 'recoverableAmounts' => 'setRecoverableAmounts', 'report' => 'setReport', + 'singlePayrun' => 'setSinglePayrun', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'totalCost' => 'setTotalCost', + 'totalPay' => 'setTotalPay', + 'version' => 'setVersion' ]; /** @@ -309,32 +314,33 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'singlePayrun' => 'getSinglePayrun', - 'totalPay' => 'getTotalPay', - 'pension' => 'getPension', 'aeoFees' => 'getAeoFees', - 'totalCost' => 'getTotalCost', + 'employer' => 'getEmployer', 'employerNic' => 'getEmployerNic', - 'netPayrollCost' => 'getNetPayrollCost', - 'maleCount' => 'getMaleCount', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', 'femaleCount' => 'getFemaleCount', - 'leaverCount' => 'getLeaverCount', + 'isDraft' => 'getIsDraft', 'joinerCount' => 'getJoinerCount', - 'paymentAfterLeavingCount' => 'getPaymentAfterLeavingCount', - 'recoverableAmounts' => 'getRecoverableAmounts', - 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', + 'leaverCount' => 'getLeaverCount', + 'maleCount' => 'getMaleCount', + 'netPayrollCost' => 'getNetPayrollCost', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', + 'paymentAfterLeavingCount' => 'getPaymentAfterLeavingCount', + 'pension' => 'getPension', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', + 'recoverableAmounts' => 'getRecoverableAmounts', 'report' => 'getReport', + 'singlePayrun' => 'getSinglePayrun', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'totalCost' => 'getTotalCost', + 'totalPay' => 'getTotalPay', + 'version' => 'getVersion' ]; /** @@ -393,32 +399,33 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('singlePayrun', $data ?? [], null); - $this->setIfExists('totalPay', $data ?? [], null); - $this->setIfExists('pension', $data ?? [], null); $this->setIfExists('aeoFees', $data ?? [], null); - $this->setIfExists('totalCost', $data ?? [], null); + $this->setIfExists('employer', $data ?? [], null); $this->setIfExists('employerNic', $data ?? [], null); - $this->setIfExists('netPayrollCost', $data ?? [], null); - $this->setIfExists('maleCount', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); $this->setIfExists('femaleCount', $data ?? [], null); - $this->setIfExists('leaverCount', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('joinerCount', $data ?? [], null); - $this->setIfExists('paymentAfterLeavingCount', $data ?? [], null); - $this->setIfExists('recoverableAmounts', $data ?? [], null); - $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('leaverCount', $data ?? [], null); + $this->setIfExists('maleCount', $data ?? [], null); + $this->setIfExists('netPayrollCost', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('paymentAfterLeavingCount', $data ?? [], null); + $this->setIfExists('pension', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('recoverableAmounts', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('singlePayrun', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('totalCost', $data ?? [], null); + $this->setIfExists('totalPay', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -464,244 +471,224 @@ public function valid(): bool /** - * Gets singlePayrun + * Gets aeoFees * - * @return \SynergiTech\Staffology\Model\PayRun|null + * @return float|null */ - public function getSinglePayrun(): ?\SynergiTech\Staffology\Model\PayRun + public function getAeoFees(): ?float { - return $this->container['singlePayrun']; + return $this->container['aeoFees']; } /** - * Sets singlePayrun + * Sets aeoFees * - * @param \SynergiTech\Staffology\Model\PayRun|null $singlePayrun singlePayrun + * @param float|null $aeoFees aeoFees * * @return $this */ - public function setSinglePayrun(?\SynergiTech\Staffology\Model\PayRun $singlePayrun): static + public function setAeoFees(?float $aeoFees): static { - if (is_null($singlePayrun)) { - throw new InvalidArgumentException('non-nullable singlePayrun cannot be null'); + if (is_null($aeoFees)) { + throw new InvalidArgumentException('non-nullable aeoFees cannot be null'); } - $this->container['singlePayrun'] = $singlePayrun; + $this->container['aeoFees'] = $aeoFees; return $this; } /** - * Gets totalPay + * Gets employer * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getTotalPay(): ?float + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['totalPay']; + return $this->container['employer']; } /** - * Sets totalPay + * Sets employer * - * @param float|null $totalPay totalPay + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setTotalPay(?float $totalPay): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($totalPay)) { - throw new InvalidArgumentException('non-nullable totalPay cannot be null'); + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); } - $this->container['totalPay'] = $totalPay; + $this->container['employer'] = $employer; return $this; } /** - * Gets pension + * Gets employerNic * * @return float|null */ - public function getPension(): ?float + public function getEmployerNic(): ?float { - return $this->container['pension']; - } - - /** - * Sets pension - * - * @param float|null $pension pension - * - * @return $this - */ - public function setPension(?float $pension): static - { - if (is_null($pension)) { - throw new InvalidArgumentException('non-nullable pension cannot be null'); - } - $this->container['pension'] = $pension; - - return $this; - } - - /** - * Gets aeoFees - * - * @return float|null - */ - public function getAeoFees(): ?float - { - return $this->container['aeoFees']; + return $this->container['employerNic']; } /** - * Sets aeoFees + * Sets employerNic * - * @param float|null $aeoFees aeoFees + * @param float|null $employerNic employerNic * * @return $this */ - public function setAeoFees(?float $aeoFees): static + public function setEmployerNic(?float $employerNic): static { - if (is_null($aeoFees)) { - throw new InvalidArgumentException('non-nullable aeoFees cannot be null'); + if (is_null($employerNic)) { + throw new InvalidArgumentException('non-nullable employerNic cannot be null'); } - $this->container['aeoFees'] = $aeoFees; + $this->container['employerNic'] = $employerNic; return $this; } /** - * Gets totalCost + * Gets endDate * - * @return float|null + * @return \DateTime|null */ - public function getTotalCost(): ?float + public function getEndDate(): ?\DateTime { - return $this->container['totalCost']; + return $this->container['endDate']; } /** - * Sets totalCost + * Sets endDate * - * @param float|null $totalCost totalCost + * @param \DateTime|null $endDate endDate * * @return $this */ - public function setTotalCost(?float $totalCost): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($totalCost)) { - throw new InvalidArgumentException('non-nullable totalCost cannot be null'); + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); } - $this->container['totalCost'] = $totalCost; + $this->container['endDate'] = $endDate; return $this; } /** - * Gets employerNic + * Gets endPeriodName * - * @return float|null + * @return string|null */ - public function getEmployerNic(): ?float + public function getEndPeriodName(): ?string { - return $this->container['employerNic']; + return $this->container['endPeriodName']; } /** - * Sets employerNic + * Sets endPeriodName * - * @param float|null $employerNic employerNic + * @param string|null $endPeriodName endPeriodName * * @return $this */ - public function setEmployerNic(?float $employerNic): static + public function setEndPeriodName(?string $endPeriodName): static { - if (is_null($employerNic)) { - throw new InvalidArgumentException('non-nullable employerNic cannot be null'); + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employerNic'] = $employerNic; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets netPayrollCost + * Gets femaleCount * - * @return float|null + * @return int|null */ - public function getNetPayrollCost(): ?float + public function getFemaleCount(): ?int { - return $this->container['netPayrollCost']; + return $this->container['femaleCount']; } /** - * Sets netPayrollCost + * Sets femaleCount * - * @param float|null $netPayrollCost netPayrollCost + * @param int|null $femaleCount femaleCount * * @return $this */ - public function setNetPayrollCost(?float $netPayrollCost): static + public function setFemaleCount(?int $femaleCount): static { - if (is_null($netPayrollCost)) { - throw new InvalidArgumentException('non-nullable netPayrollCost cannot be null'); + if (is_null($femaleCount)) { + throw new InvalidArgumentException('non-nullable femaleCount cannot be null'); } - $this->container['netPayrollCost'] = $netPayrollCost; + $this->container['femaleCount'] = $femaleCount; return $this; } /** - * Gets maleCount + * Gets isDraft * - * @return int|null + * @return bool|null */ - public function getMaleCount(): ?int + public function getIsDraft(): ?bool { - return $this->container['maleCount']; + return $this->container['isDraft']; } /** - * Sets maleCount + * Sets isDraft * - * @param int|null $maleCount maleCount + * @param bool|null $isDraft isDraft * * @return $this */ - public function setMaleCount(?int $maleCount): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($maleCount)) { - throw new InvalidArgumentException('non-nullable maleCount cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['maleCount'] = $maleCount; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets femaleCount + * Gets joinerCount * * @return int|null */ - public function getFemaleCount(): ?int + public function getJoinerCount(): ?int { - return $this->container['femaleCount']; + return $this->container['joinerCount']; } /** - * Sets femaleCount + * Sets joinerCount * - * @param int|null $femaleCount femaleCount + * @param int|null $joinerCount joinerCount * * @return $this */ - public function setFemaleCount(?int $femaleCount): static + public function setJoinerCount(?int $joinerCount): static { - if (is_null($femaleCount)) { - throw new InvalidArgumentException('non-nullable femaleCount cannot be null'); + if (is_null($joinerCount)) { + throw new InvalidArgumentException('non-nullable joinerCount cannot be null'); } - $this->container['femaleCount'] = $femaleCount; + $this->container['joinerCount'] = $joinerCount; return $this; } @@ -734,163 +721,163 @@ public function setLeaverCount(?int $leaverCount): static } /** - * Gets joinerCount + * Gets maleCount * * @return int|null */ - public function getJoinerCount(): ?int + public function getMaleCount(): ?int { - return $this->container['joinerCount']; + return $this->container['maleCount']; } /** - * Sets joinerCount + * Sets maleCount * - * @param int|null $joinerCount joinerCount + * @param int|null $maleCount maleCount * * @return $this */ - public function setJoinerCount(?int $joinerCount): static + public function setMaleCount(?int $maleCount): static { - if (is_null($joinerCount)) { - throw new InvalidArgumentException('non-nullable joinerCount cannot be null'); + if (is_null($maleCount)) { + throw new InvalidArgumentException('non-nullable maleCount cannot be null'); } - $this->container['joinerCount'] = $joinerCount; + $this->container['maleCount'] = $maleCount; return $this; } /** - * Gets paymentAfterLeavingCount + * Gets netPayrollCost * - * @return int|null + * @return float|null */ - public function getPaymentAfterLeavingCount(): ?int + public function getNetPayrollCost(): ?float { - return $this->container['paymentAfterLeavingCount']; + return $this->container['netPayrollCost']; } /** - * Sets paymentAfterLeavingCount + * Sets netPayrollCost * - * @param int|null $paymentAfterLeavingCount paymentAfterLeavingCount + * @param float|null $netPayrollCost netPayrollCost * * @return $this */ - public function setPaymentAfterLeavingCount(?int $paymentAfterLeavingCount): static + public function setNetPayrollCost(?float $netPayrollCost): static { - if (is_null($paymentAfterLeavingCount)) { - throw new InvalidArgumentException('non-nullable paymentAfterLeavingCount cannot be null'); + if (is_null($netPayrollCost)) { + throw new InvalidArgumentException('non-nullable netPayrollCost cannot be null'); } - $this->container['paymentAfterLeavingCount'] = $paymentAfterLeavingCount; + $this->container['netPayrollCost'] = $netPayrollCost; return $this; } /** - * Gets recoverableAmounts + * Gets ordinal * - * @return \SynergiTech\Staffology\Model\RecoverableAmounts|null + * @return int|null */ - public function getRecoverableAmounts(): ?\SynergiTech\Staffology\Model\RecoverableAmounts + public function getOrdinal(): ?int { - return $this->container['recoverableAmounts']; + return $this->container['ordinal']; } /** - * Sets recoverableAmounts + * Sets ordinal * - * @param \SynergiTech\Staffology\Model\RecoverableAmounts|null $recoverableAmounts recoverableAmounts + * @param int|null $ordinal ordinal * * @return $this */ - public function setRecoverableAmounts(?\SynergiTech\Staffology\Model\RecoverableAmounts $recoverableAmounts): static + public function setOrdinal(?int $ordinal): static { - if (is_null($recoverableAmounts)) { - throw new InvalidArgumentException('non-nullable recoverableAmounts cannot be null'); + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['recoverableAmounts'] = $recoverableAmounts; + $this->container['ordinal'] = $ordinal; return $this; } /** - * Gets employer + * Gets payPeriod * - * @return \SynergiTech\Staffology\Model\Item|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['employer']; + return $this->container['payPeriod']; } /** - * Sets employer + * Sets payPeriod * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['employer'] = $employer; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets payPeriod + * Gets paymentAfterLeavingCount * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return int|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getPaymentAfterLeavingCount(): ?int { - return $this->container['payPeriod']; + return $this->container['paymentAfterLeavingCount']; } /** - * Sets payPeriod + * Sets paymentAfterLeavingCount * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param int|null $paymentAfterLeavingCount paymentAfterLeavingCount * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setPaymentAfterLeavingCount(?int $paymentAfterLeavingCount): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($paymentAfterLeavingCount)) { + throw new InvalidArgumentException('non-nullable paymentAfterLeavingCount cannot be null'); } - $this->container['payPeriod'] = $payPeriod; + $this->container['paymentAfterLeavingCount'] = $paymentAfterLeavingCount; return $this; } /** - * Gets ordinal + * Gets pension * - * @return int|null + * @return float|null */ - public function getOrdinal(): ?int + public function getPension(): ?float { - return $this->container['ordinal']; + return $this->container['pension']; } /** - * Sets ordinal + * Sets pension * - * @param int|null $ordinal ordinal + * @param float|null $pension pension * * @return $this */ - public function setOrdinal(?int $ordinal): static + public function setPension(?float $pension): static { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + if (is_null($pension)) { + throw new InvalidArgumentException('non-nullable pension cannot be null'); } - $this->container['ordinal'] = $ordinal; + $this->container['pension'] = $pension; return $this; } @@ -950,150 +937,143 @@ public function setPeriodTo(?int $periodTo): static } /** - * Gets startPeriodName + * Gets recoverableAmounts * - * @return string|null + * @return \SynergiTech\Staffology\Model\RecoverableAmounts|null */ - public function getStartPeriodName(): ?string + public function getRecoverableAmounts(): ?\SynergiTech\Staffology\Model\RecoverableAmounts { - return $this->container['startPeriodName']; + return $this->container['recoverableAmounts']; } /** - * Sets startPeriodName + * Sets recoverableAmounts * - * @param string|null $startPeriodName startPeriodName + * @param \SynergiTech\Staffology\Model\RecoverableAmounts|null $recoverableAmounts recoverableAmounts * * @return $this */ - public function setStartPeriodName(?string $startPeriodName): static + public function setRecoverableAmounts(?\SynergiTech\Staffology\Model\RecoverableAmounts $recoverableAmounts): static { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($recoverableAmounts)) { + throw new InvalidArgumentException('non-nullable recoverableAmounts cannot be null'); } - $this->container['startPeriodName'] = $startPeriodName; + $this->container['recoverableAmounts'] = $recoverableAmounts; return $this; } /** - * Gets endPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getEndPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['endPeriodName']; + return $this->container['report']; } /** - * Sets endPeriodName + * Sets report * - * @param string|null $endPeriodName endPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['report'] = $report; return $this; } /** - * Gets startDate + * Gets singlePayrun * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\PayRun|null */ - public function getStartDate(): ?\DateTime + public function getSinglePayrun(): ?\SynergiTech\Staffology\Model\PayRun { - return $this->container['startDate']; + return $this->container['singlePayrun']; } /** - * Sets startDate + * Sets singlePayrun * - * @param \DateTime|null $startDate startDate + * @param \SynergiTech\Staffology\Model\PayRun|null $singlePayrun singlePayrun * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setSinglePayrun(?\SynergiTech\Staffology\Model\PayRun $singlePayrun): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($singlePayrun)) { + throw new InvalidArgumentException('non-nullable singlePayrun cannot be null'); } - $this->container['startDate'] = $startDate; + $this->container['singlePayrun'] = $singlePayrun; return $this; } /** - * Gets endDate + * Gets startDate * * @return \DateTime|null */ - public function getEndDate(): ?\DateTime + public function getStartDate(): ?\DateTime { - return $this->container['endDate']; + return $this->container['startDate']; } /** - * Sets endDate + * Sets startDate * - * @param \DateTime|null $endDate endDate + * @param \DateTime|null $startDate startDate * * @return $this */ - public function setEndDate(?\DateTime $endDate): static + public function setStartDate(?\DateTime $startDate): static { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); } - $this->container['endDate'] = $endDate; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -1160,28 +1140,89 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets totalCost * - * @return bool|null + * @return float|null */ - public function getIsDraft(): ?bool + public function getTotalCost(): ?float { - return $this->container['isDraft']; + return $this->container['totalCost']; } /** - * Sets isDraft + * Sets totalCost * - * @param bool|null $isDraft isDraft + * @param float|null $totalCost totalCost * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setTotalCost(?float $totalCost): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($totalCost)) { + throw new InvalidArgumentException('non-nullable totalCost cannot be null'); } - $this->container['isDraft'] = $isDraft; + $this->container['totalCost'] = $totalCost; + + return $this; + } + + /** + * Gets totalPay + * + * @return float|null + */ + public function getTotalPay(): ?float + { + return $this->container['totalPay']; + } + + /** + * Sets totalPay + * + * @param float|null $totalPay totalPay + * + * @return $this + */ + public function setTotalPay(?float $totalPay): static + { + if (is_null($totalPay)) { + throw new InvalidArgumentException('non-nullable totalPay cannot be null'); + } + $this->container['totalPay'] = $totalPay; + + return $this; + } + + /** + * Gets version + * + * @return int|null + */ + public function getVersion(): ?int + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param int|null $version version + * + * @return $this + */ + public function setVersion(?int $version): static + { + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['version'] = $version; return $this; } diff --git a/src/Model/CostAnalysisReportReportResponse.php b/src/Model/CostAnalysisReportReportResponse.php index 097893b..7f63e24 100644 --- a/src/Model/CostAnalysisReportReportResponse.php +++ b/src/Model/CostAnalysisReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class CostAnalysisReportReportResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\CostAnalysisReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class CostAnalysisReportReportResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class CostAnalysisReportReportResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/CostCentre.php b/src/Model/CostCentre.php index 6a38107..176ba98 100644 --- a/src/Model/CostCentre.php +++ b/src/Model/CostCentre.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class CostCentre implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'accountingCode' => 'string', 'code' => 'string', - 'title' => 'string', 'color' => 'string', - 'accountingCode' => 'string', 'employeeCount' => 'int', - 'hasJournalOverrides' => 'bool' + 'hasJournalOverrides' => 'bool', + 'title' => 'string' ]; /** @@ -73,12 +73,12 @@ class CostCentre implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'accountingCode' => null, 'code' => null, - 'title' => null, 'color' => null, - 'accountingCode' => null, 'employeeCount' => 'int32', - 'hasJournalOverrides' => null + 'hasJournalOverrides' => null, + 'title' => null ]; /** @@ -87,12 +87,12 @@ class CostCentre implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'accountingCode' => true, 'code' => false, - 'title' => false, 'color' => true, - 'accountingCode' => true, 'employeeCount' => false, - 'hasJournalOverrides' => false + 'hasJournalOverrides' => false, + 'title' => false ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'accountingCode' => 'accountingCode', 'code' => 'code', - 'title' => 'title', 'color' => 'color', - 'accountingCode' => 'accountingCode', 'employeeCount' => 'employeeCount', - 'hasJournalOverrides' => 'hasJournalOverrides' + 'hasJournalOverrides' => 'hasJournalOverrides', + 'title' => 'title' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'accountingCode' => 'setAccountingCode', 'code' => 'setCode', - 'title' => 'setTitle', 'color' => 'setColor', - 'accountingCode' => 'setAccountingCode', 'employeeCount' => 'setEmployeeCount', - 'hasJournalOverrides' => 'setHasJournalOverrides' + 'hasJournalOverrides' => 'setHasJournalOverrides', + 'title' => 'setTitle' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'accountingCode' => 'getAccountingCode', 'code' => 'getCode', - 'title' => 'getTitle', 'color' => 'getColor', - 'accountingCode' => 'getAccountingCode', 'employeeCount' => 'getEmployeeCount', - 'hasJournalOverrides' => 'getHasJournalOverrides' + 'hasJournalOverrides' => 'getHasJournalOverrides', + 'title' => 'getTitle' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('accountingCode', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); - $this->setIfExists('accountingCode', $data ?? [], null); $this->setIfExists('employeeCount', $data ?? [], null); $this->setIfExists('hasJournalOverrides', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -308,6 +308,10 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if (!is_null($this->container['accountingCode']) && (mb_strlen($this->container['accountingCode']) > 50)) { + $invalidProperties[] = "invalid value for 'accountingCode', the character length must be smaller than or equal to 50."; + } + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } @@ -319,6 +323,10 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'code', the character length must be bigger than or equal to 1."; } + if (!is_null($this->container['color']) && (mb_strlen($this->container['color']) > 6)) { + $invalidProperties[] = "invalid value for 'color', the character length must be smaller than or equal to 6."; + } + if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } @@ -330,14 +338,6 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['color']) && (mb_strlen($this->container['color']) > 6)) { - $invalidProperties[] = "invalid value for 'color', the character length must be smaller than or equal to 6."; - } - - if (!is_null($this->container['accountingCode']) && (mb_strlen($this->container['accountingCode']) > 50)) { - $invalidProperties[] = "invalid value for 'accountingCode', the character length must be smaller than or equal to 50."; - } - return $invalidProperties; } @@ -354,69 +354,73 @@ public function valid(): bool /** - * Gets code + * Gets accountingCode * - * @return string + * @return string|null */ - public function getCode(): string + public function getAccountingCode(): ?string { - return $this->container['code']; + return $this->container['accountingCode']; } /** - * Sets code + * Sets accountingCode * - * @param string $code The unique code for this Cost Centre + * @param string|null $accountingCode accountingCode * * @return $this */ - public function setCode(string $code): static + public function setAccountingCode(?string $accountingCode): static { - if (is_null($code)) { - throw new InvalidArgumentException('non-nullable code cannot be null'); - } - if ((mb_strlen($code) > 20)) { - throw new InvalidArgumentException('invalid length for $code when calling CostCentre., must be smaller than or equal to 20.'); + if (is_null($accountingCode)) { + array_push($this->openAPINullablesSetToNull, 'accountingCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountingCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - if ((mb_strlen($code) < 1)) { - throw new InvalidArgumentException('invalid length for $code when calling CostCentre., must be bigger than or equal to 1.'); + if (!is_null($accountingCode) && (mb_strlen($accountingCode) > 50)) { + throw new InvalidArgumentException('invalid length for $accountingCode when calling CostCentre., must be smaller than or equal to 50.'); } - $this->container['code'] = $code; + $this->container['accountingCode'] = $accountingCode; return $this; } /** - * Gets title + * Gets code * * @return string */ - public function getTitle(): string + public function getCode(): string { - return $this->container['title']; + return $this->container['code']; } /** - * Sets title + * Sets code * - * @param string $title The name of this Cost Centre + * @param string $code The unique code for this Cost Centre * * @return $this */ - public function setTitle(string $title): static + public function setCode(string $code): static { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); + if (is_null($code)) { + throw new InvalidArgumentException('non-nullable code cannot be null'); } - if ((mb_strlen($title) > 50)) { - throw new InvalidArgumentException('invalid length for $title when calling CostCentre., must be smaller than or equal to 50.'); + if ((mb_strlen($code) > 20)) { + throw new InvalidArgumentException('invalid length for $code when calling CostCentre., must be smaller than or equal to 20.'); } - if ((mb_strlen($title) < 1)) { - throw new InvalidArgumentException('invalid length for $title when calling CostCentre., must be bigger than or equal to 1.'); + if ((mb_strlen($code) < 1)) { + throw new InvalidArgumentException('invalid length for $code when calling CostCentre., must be bigger than or equal to 1.'); } - $this->container['title'] = $title; + $this->container['code'] = $code; return $this; } @@ -459,44 +463,6 @@ public function setColor(?string $color): static return $this; } - /** - * Gets accountingCode - * - * @return string|null - */ - public function getAccountingCode(): ?string - { - return $this->container['accountingCode']; - } - - /** - * Sets accountingCode - * - * @param string|null $accountingCode accountingCode - * - * @return $this - */ - public function setAccountingCode(?string $accountingCode): static - { - if (is_null($accountingCode)) { - array_push($this->openAPINullablesSetToNull, 'accountingCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountingCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($accountingCode) && (mb_strlen($accountingCode) > 50)) { - throw new InvalidArgumentException('invalid length for $accountingCode when calling CostCentre., must be smaller than or equal to 50.'); - } - - $this->container['accountingCode'] = $accountingCode; - - return $this; - } - /** * Gets employeeCount * @@ -550,6 +516,40 @@ public function setHasJournalOverrides(?bool $hasJournalOverrides): static return $this; } + + /** + * Gets title + * + * @return string + */ + public function getTitle(): string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title The name of this Cost Centre + * + * @return $this + */ + public function setTitle(string $title): static + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if ((mb_strlen($title) > 50)) { + throw new InvalidArgumentException('invalid length for $title when calling CostCentre., must be smaller than or equal to 50.'); + } + if ((mb_strlen($title) < 1)) { + throw new InvalidArgumentException('invalid length for $title when calling CostCentre., must be bigger than or equal to 1.'); + } + + $this->container['title'] = $title; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/CostOfEmploymentReport.php b/src/Model/CostOfEmploymentReport.php index b1a899a..9772600 100644 --- a/src/Model/CostOfEmploymentReport.php +++ b/src/Model/CostOfEmploymentReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,21 +59,22 @@ class CostOfEmploymentReport implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ + 'employer' => '\SynergiTech\Staffology\Model\Item', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', 'hasDepartments' => 'bool', + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\CostOfEmploymentReportLine[]', - 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -82,21 +83,22 @@ class CostOfEmploymentReport implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ + 'employer' => null, + 'endDate' => 'date', + 'endPeriodName' => null, 'hasDepartments' => null, + 'isDraft' => null, 'lines' => null, - 'employer' => null, - 'payPeriod' => null, 'ordinal' => 'int32', + 'payPeriod' => null, 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -105,21 +107,22 @@ class CostOfEmploymentReport implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ + 'employer' => false, + 'endDate' => false, + 'endPeriodName' => true, 'hasDepartments' => false, + 'isDraft' => false, 'lines' => true, - 'employer' => false, - 'payPeriod' => false, 'ordinal' => false, + 'payPeriod' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -208,21 +211,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'employer' => 'employer', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', 'hasDepartments' => 'hasDepartments', + 'isDraft' => 'isDraft', 'lines' => 'lines', - 'employer' => 'employer', - 'payPeriod' => 'payPeriod', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -231,21 +235,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'employer' => 'setEmployer', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', 'hasDepartments' => 'setHasDepartments', + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', - 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -254,21 +259,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'employer' => 'getEmployer', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', 'hasDepartments' => 'getHasDepartments', + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', - 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -327,21 +333,22 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('employer', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); $this->setIfExists('hasDepartments', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); - $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -386,6 +393,94 @@ public function valid(): bool } + /** + * Gets employer + * + * @return \SynergiTech\Staffology\Model\Item|null + */ + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + { + return $this->container['employer']; + } + + /** + * Sets employer + * + * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * + * @return $this + */ + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + { + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); + } + $this->container['employer'] = $employer; + + return $this; + } + + /** + * Gets endDate + * + * @return \DateTime|null + */ + public function getEndDate(): ?\DateTime + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param \DateTime|null $endDate endDate + * + * @return $this + */ + public function setEndDate(?\DateTime $endDate): static + { + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets endPeriodName + * + * @return string|null + */ + public function getEndPeriodName(): ?string + { + return $this->container['endPeriodName']; + } + + /** + * Sets endPeriodName + * + * @param string|null $endPeriodName endPeriodName + * + * @return $this + */ + public function setEndPeriodName(?string $endPeriodName): static + { + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['endPeriodName'] = $endPeriodName; + + return $this; + } + /** * Gets hasDepartments * @@ -413,6 +508,33 @@ public function setHasDepartments(?bool $hasDepartments): static return $this; } + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + /** * Gets lines * @@ -448,28 +570,28 @@ public function setLines(?array $lines): static } /** - * Gets employer + * Gets ordinal * - * @return \SynergiTech\Staffology\Model\Item|null + * @return int|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getOrdinal(): ?int { - return $this->container['employer']; + return $this->container['ordinal']; } /** - * Sets employer + * Sets ordinal * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param int|null $ordinal ordinal * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setOrdinal(?int $ordinal): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['employer'] = $employer; + $this->container['ordinal'] = $ordinal; return $this; } @@ -501,33 +623,6 @@ public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPerio return $this; } - /** - * Gets ordinal - * - * @return int|null - */ - public function getOrdinal(): ?int - { - return $this->container['ordinal']; - } - - /** - * Sets ordinal - * - * @param int|null $ordinal ordinal - * - * @return $this - */ - public function setOrdinal(?int $ordinal): static - { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); - } - $this->container['ordinal'] = $ordinal; - - return $this; - } - /** * Gets period * @@ -583,69 +678,28 @@ public function setPeriodTo(?int $periodTo): static } /** - * Gets startPeriodName - * - * @return string|null - */ - public function getStartPeriodName(): ?string - { - return $this->container['startPeriodName']; - } - - /** - * Sets startPeriodName - * - * @param string|null $startPeriodName startPeriodName - * - * @return $this - */ - public function setStartPeriodName(?string $startPeriodName): static - { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['startPeriodName'] = $startPeriodName; - - return $this; - } - - /** - * Gets endPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getEndPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['endPeriodName']; + return $this->container['report']; } /** - * Sets endPeriodName + * Sets report * - * @param string|null $endPeriodName endPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['report'] = $report; return $this; } @@ -678,55 +732,35 @@ public function setStartDate(?\DateTime $startDate): static } /** - * Gets endDate - * - * @return \DateTime|null - */ - public function getEndDate(): ?\DateTime - { - return $this->container['endDate']; - } - - /** - * Sets endDate - * - * @param \DateTime|null $endDate endDate - * - * @return $this - */ - public function setEndDate(?\DateTime $endDate): static - { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); - } - $this->container['endDate'] = $endDate; - - return $this; - } - - /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -793,28 +827,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/CostOfEmploymentReportLine.php b/src/Model/CostOfEmploymentReportLine.php index 64ab7ff..19b2279 100644 --- a/src/Model/CostOfEmploymentReportLine.php +++ b/src/Model/CostOfEmploymentReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,15 @@ class CostOfEmploymentReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'pay' => 'float', - 'employerNic' => 'float', - 'pension' => 'float', 'aeoFees' => 'float', - 'statPayReclaim' => 'float', - 'totalCost' => 'float', + 'department' => 'string', 'employee' => '\SynergiTech\Staffology\Model\Item', + 'employerNic' => 'float', + 'pay' => 'float', 'payrollCode' => 'string', - 'department' => 'string' + 'pension' => 'float', + 'statPayReclaim' => 'float', + 'totalCost' => 'float' ]; /** @@ -76,15 +76,15 @@ class CostOfEmploymentReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'pay' => 'double', - 'employerNic' => 'double', - 'pension' => 'double', 'aeoFees' => 'double', - 'statPayReclaim' => 'double', - 'totalCost' => 'double', + 'department' => null, 'employee' => null, + 'employerNic' => 'double', + 'pay' => 'double', 'payrollCode' => null, - 'department' => null + 'pension' => 'double', + 'statPayReclaim' => 'double', + 'totalCost' => 'double' ]; /** @@ -93,15 +93,15 @@ class CostOfEmploymentReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'pay' => false, - 'employerNic' => false, - 'pension' => false, 'aeoFees' => false, - 'statPayReclaim' => false, - 'totalCost' => false, + 'department' => true, 'employee' => false, + 'employerNic' => false, + 'pay' => false, 'payrollCode' => true, - 'department' => true + 'pension' => false, + 'statPayReclaim' => false, + 'totalCost' => false ]; /** @@ -190,15 +190,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'pay' => 'pay', - 'employerNic' => 'employerNic', - 'pension' => 'pension', 'aeoFees' => 'aeoFees', - 'statPayReclaim' => 'statPayReclaim', - 'totalCost' => 'totalCost', + 'department' => 'department', 'employee' => 'employee', + 'employerNic' => 'employerNic', + 'pay' => 'pay', 'payrollCode' => 'payrollCode', - 'department' => 'department' + 'pension' => 'pension', + 'statPayReclaim' => 'statPayReclaim', + 'totalCost' => 'totalCost' ]; /** @@ -207,15 +207,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'pay' => 'setPay', - 'employerNic' => 'setEmployerNic', - 'pension' => 'setPension', 'aeoFees' => 'setAeoFees', - 'statPayReclaim' => 'setStatPayReclaim', - 'totalCost' => 'setTotalCost', + 'department' => 'setDepartment', 'employee' => 'setEmployee', + 'employerNic' => 'setEmployerNic', + 'pay' => 'setPay', 'payrollCode' => 'setPayrollCode', - 'department' => 'setDepartment' + 'pension' => 'setPension', + 'statPayReclaim' => 'setStatPayReclaim', + 'totalCost' => 'setTotalCost' ]; /** @@ -224,15 +224,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'pay' => 'getPay', - 'employerNic' => 'getEmployerNic', - 'pension' => 'getPension', 'aeoFees' => 'getAeoFees', - 'statPayReclaim' => 'getStatPayReclaim', - 'totalCost' => 'getTotalCost', + 'department' => 'getDepartment', 'employee' => 'getEmployee', + 'employerNic' => 'getEmployerNic', + 'pay' => 'getPay', 'payrollCode' => 'getPayrollCode', - 'department' => 'getDepartment' + 'pension' => 'getPension', + 'statPayReclaim' => 'getStatPayReclaim', + 'totalCost' => 'getTotalCost' ]; /** @@ -291,15 +291,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('pay', $data ?? [], null); + $this->setIfExists('aeoFees', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('employerNic', $data ?? [], null); + $this->setIfExists('pay', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('pension', $data ?? [], null); - $this->setIfExists('aeoFees', $data ?? [], null); $this->setIfExists('statPayReclaim', $data ?? [], null); $this->setIfExists('totalCost', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); } /** @@ -345,258 +345,258 @@ public function valid(): bool /** - * Gets pay + * Gets aeoFees * * @return float|null */ - public function getPay(): ?float + public function getAeoFees(): ?float { - return $this->container['pay']; + return $this->container['aeoFees']; } /** - * Sets pay + * Sets aeoFees * - * @param float|null $pay pay + * @param float|null $aeoFees aeoFees * * @return $this */ - public function setPay(?float $pay): static + public function setAeoFees(?float $aeoFees): static { - if (is_null($pay)) { - throw new InvalidArgumentException('non-nullable pay cannot be null'); + if (is_null($aeoFees)) { + throw new InvalidArgumentException('non-nullable aeoFees cannot be null'); } - $this->container['pay'] = $pay; + $this->container['aeoFees'] = $aeoFees; return $this; } /** - * Gets employerNic + * Gets department * - * @return float|null + * @return string|null */ - public function getEmployerNic(): ?float + public function getDepartment(): ?string { - return $this->container['employerNic']; + return $this->container['department']; } /** - * Sets employerNic + * Sets department * - * @param float|null $employerNic employerNic + * @param string|null $department department * * @return $this */ - public function setEmployerNic(?float $employerNic): static + public function setDepartment(?string $department): static { - if (is_null($employerNic)) { - throw new InvalidArgumentException('non-nullable employerNic cannot be null'); + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('department', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employerNic'] = $employerNic; + $this->container['department'] = $department; return $this; } /** - * Gets pension + * Gets employee * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getPension(): ?float + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['pension']; + return $this->container['employee']; } /** - * Sets pension + * Sets employee * - * @param float|null $pension pension + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setPension(?float $pension): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($pension)) { - throw new InvalidArgumentException('non-nullable pension cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['pension'] = $pension; + $this->container['employee'] = $employee; return $this; } /** - * Gets aeoFees + * Gets employerNic * * @return float|null */ - public function getAeoFees(): ?float + public function getEmployerNic(): ?float { - return $this->container['aeoFees']; + return $this->container['employerNic']; } /** - * Sets aeoFees + * Sets employerNic * - * @param float|null $aeoFees aeoFees + * @param float|null $employerNic employerNic * * @return $this */ - public function setAeoFees(?float $aeoFees): static + public function setEmployerNic(?float $employerNic): static { - if (is_null($aeoFees)) { - throw new InvalidArgumentException('non-nullable aeoFees cannot be null'); + if (is_null($employerNic)) { + throw new InvalidArgumentException('non-nullable employerNic cannot be null'); } - $this->container['aeoFees'] = $aeoFees; + $this->container['employerNic'] = $employerNic; return $this; } /** - * Gets statPayReclaim + * Gets pay * * @return float|null */ - public function getStatPayReclaim(): ?float + public function getPay(): ?float { - return $this->container['statPayReclaim']; + return $this->container['pay']; } /** - * Sets statPayReclaim + * Sets pay * - * @param float|null $statPayReclaim statPayReclaim + * @param float|null $pay pay * * @return $this */ - public function setStatPayReclaim(?float $statPayReclaim): static + public function setPay(?float $pay): static { - if (is_null($statPayReclaim)) { - throw new InvalidArgumentException('non-nullable statPayReclaim cannot be null'); + if (is_null($pay)) { + throw new InvalidArgumentException('non-nullable pay cannot be null'); } - $this->container['statPayReclaim'] = $statPayReclaim; + $this->container['pay'] = $pay; return $this; } /** - * Gets totalCost + * Gets payrollCode * - * @return float|null + * @return string|null */ - public function getTotalCost(): ?float + public function getPayrollCode(): ?string { - return $this->container['totalCost']; + return $this->container['payrollCode']; } /** - * Sets totalCost + * Sets payrollCode * - * @param float|null $totalCost totalCost + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setTotalCost(?float $totalCost): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($totalCost)) { - throw new InvalidArgumentException('non-nullable totalCost cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['totalCost'] = $totalCost; + $this->container['payrollCode'] = $payrollCode; return $this; } /** - * Gets employee + * Gets pension * - * @return \SynergiTech\Staffology\Model\Item|null + * @return float|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getPension(): ?float { - return $this->container['employee']; + return $this->container['pension']; } /** - * Sets employee + * Sets pension * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param float|null $pension pension * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setPension(?float $pension): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($pension)) { + throw new InvalidArgumentException('non-nullable pension cannot be null'); } - $this->container['employee'] = $employee; + $this->container['pension'] = $pension; return $this; } /** - * Gets payrollCode + * Gets statPayReclaim * - * @return string|null + * @return float|null */ - public function getPayrollCode(): ?string + public function getStatPayReclaim(): ?float { - return $this->container['payrollCode']; + return $this->container['statPayReclaim']; } /** - * Sets payrollCode + * Sets statPayReclaim * - * @param string|null $payrollCode payrollCode + * @param float|null $statPayReclaim statPayReclaim * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setStatPayReclaim(?float $statPayReclaim): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($statPayReclaim)) { + throw new InvalidArgumentException('non-nullable statPayReclaim cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['statPayReclaim'] = $statPayReclaim; return $this; } /** - * Gets department + * Gets totalCost * - * @return string|null + * @return float|null */ - public function getDepartment(): ?string + public function getTotalCost(): ?float { - return $this->container['department']; + return $this->container['totalCost']; } /** - * Sets department + * Sets totalCost * - * @param string|null $department department + * @param float|null $totalCost totalCost * * @return $this */ - public function setDepartment(?string $department): static + public function setTotalCost(?float $totalCost): static { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($totalCost)) { + throw new InvalidArgumentException('non-nullable totalCost cannot be null'); } - $this->container['department'] = $department; + $this->container['totalCost'] = $totalCost; return $this; } diff --git a/src/Model/CostOfEmploymentReportReportResponse.php b/src/Model/CostOfEmploymentReportReportResponse.php index 6d9cdfc..8ddd189 100644 --- a/src/Model/CostOfEmploymentReportReportResponse.php +++ b/src/Model/CostOfEmploymentReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class CostOfEmploymentReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\CostOfEmploymentReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class CostOfEmploymentReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class CostOfEmploymentReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/Country.php b/src/Model/Country.php index d8d7cdf..fccda29 100644 --- a/src/Model/Country.php +++ b/src/Model/Country.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/CountryCode.php b/src/Model/CountryCode.php new file mode 100644 index 0000000..9800fb1 --- /dev/null +++ b/src/Model/CountryCode.php @@ -0,0 +1,219 @@ + + */ +class CyclicReenrolmentReport implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'CyclicReenrolmentReport'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'alreadyInPension' => 'int', + 'employerName' => 'string', + 'groups' => '\SynergiTech\Staffology\Model\CyclicReenrolmentReportGroup[]', + 'isDraft' => 'bool', + 'reenrolmentDate' => '\DateTime', + 'report' => '\SynergiTech\Staffology\Model\Report', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'title' => 'string', + 'totalReenrolled' => 'int', + 'totalStaff' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'alreadyInPension' => 'int32', + 'employerName' => null, + 'groups' => null, + 'isDraft' => null, + 'reenrolmentDate' => 'date', + 'report' => null, + 'taxYear' => null, + 'title' => null, + 'totalReenrolled' => 'int32', + 'totalStaff' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'alreadyInPension' => false, + 'employerName' => true, + 'groups' => true, + 'isDraft' => false, + 'reenrolmentDate' => false, + 'report' => false, + 'taxYear' => false, + 'title' => true, + 'totalReenrolled' => false, + 'totalStaff' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'alreadyInPension' => 'alreadyInPension', + 'employerName' => 'employerName', + 'groups' => 'groups', + 'isDraft' => 'isDraft', + 'reenrolmentDate' => 'reenrolmentDate', + 'report' => 'report', + 'taxYear' => 'taxYear', + 'title' => 'title', + 'totalReenrolled' => 'totalReenrolled', + 'totalStaff' => 'totalStaff' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'alreadyInPension' => 'setAlreadyInPension', + 'employerName' => 'setEmployerName', + 'groups' => 'setGroups', + 'isDraft' => 'setIsDraft', + 'reenrolmentDate' => 'setReenrolmentDate', + 'report' => 'setReport', + 'taxYear' => 'setTaxYear', + 'title' => 'setTitle', + 'totalReenrolled' => 'setTotalReenrolled', + 'totalStaff' => 'setTotalStaff' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'alreadyInPension' => 'getAlreadyInPension', + 'employerName' => 'getEmployerName', + 'groups' => 'getGroups', + 'isDraft' => 'getIsDraft', + 'reenrolmentDate' => 'getReenrolmentDate', + 'report' => 'getReport', + 'taxYear' => 'getTaxYear', + 'title' => 'getTitle', + 'totalReenrolled' => 'getTotalReenrolled', + 'totalStaff' => 'getTotalStaff' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('alreadyInPension', $data ?? [], null); + $this->setIfExists('employerName', $data ?? [], null); + $this->setIfExists('groups', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('reenrolmentDate', $data ?? [], null); + $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('totalReenrolled', $data ?? [], null); + $this->setIfExists('totalStaff', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets alreadyInPension + * + * @return int|null + */ + public function getAlreadyInPension(): ?int + { + return $this->container['alreadyInPension']; + } + + /** + * Sets alreadyInPension + * + * @param int|null $alreadyInPension alreadyInPension + * + * @return $this + */ + public function setAlreadyInPension(?int $alreadyInPension): static + { + if (is_null($alreadyInPension)) { + throw new InvalidArgumentException('non-nullable alreadyInPension cannot be null'); + } + $this->container['alreadyInPension'] = $alreadyInPension; + + return $this; + } + + /** + * Gets employerName + * + * @return string|null + */ + public function getEmployerName(): ?string + { + return $this->container['employerName']; + } + + /** + * Sets employerName + * + * @param string|null $employerName employerName + * + * @return $this + */ + public function setEmployerName(?string $employerName): static + { + if (is_null($employerName)) { + array_push($this->openAPINullablesSetToNull, 'employerName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employerName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employerName'] = $employerName; + + return $this; + } + + /** + * Gets groups + * + * @return \SynergiTech\Staffology\Model\CyclicReenrolmentReportGroup[]|null + */ + public function getGroups(): ?array + { + return $this->container['groups']; + } + + /** + * Sets groups + * + * @param \SynergiTech\Staffology\Model\CyclicReenrolmentReportGroup[]|null $groups groups + * + * @return $this + */ + public function setGroups(?array $groups): static + { + if (is_null($groups)) { + array_push($this->openAPINullablesSetToNull, 'groups'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('groups', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['groups'] = $groups; + + return $this; + } + + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + + /** + * Gets reenrolmentDate + * + * @return \DateTime|null + */ + public function getReenrolmentDate(): ?\DateTime + { + return $this->container['reenrolmentDate']; + } + + /** + * Sets reenrolmentDate + * + * @param \DateTime|null $reenrolmentDate reenrolmentDate + * + * @return $this + */ + public function setReenrolmentDate(?\DateTime $reenrolmentDate): static + { + if (is_null($reenrolmentDate)) { + throw new InvalidArgumentException('non-nullable reenrolmentDate cannot be null'); + } + $this->container['reenrolmentDate'] = $reenrolmentDate; + + return $this; + } + + /** + * Gets report + * + * @return \SynergiTech\Staffology\Model\Report|null + */ + public function getReport(): ?\SynergiTech\Staffology\Model\Report + { + return $this->container['report']; + } + + /** + * Sets report + * + * @param \SynergiTech\Staffology\Model\Report|null $report report + * + * @return $this + */ + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + { + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); + } + $this->container['report'] = $report; + + return $this; + } + + /** + * Gets taxYear + * + * @return \SynergiTech\Staffology\Model\TaxYear|null + */ + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + { + return $this->container['taxYear']; + } + + /** + * Sets taxYear + * + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * + * @return $this + */ + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + { + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + } + $this->container['taxYear'] = $taxYear; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle(): ?string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title title + * + * @return $this + */ + public function setTitle(?string $title): static + { + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets totalReenrolled + * + * @return int|null + */ + public function getTotalReenrolled(): ?int + { + return $this->container['totalReenrolled']; + } + + /** + * Sets totalReenrolled + * + * @param int|null $totalReenrolled totalReenrolled + * + * @return $this + */ + public function setTotalReenrolled(?int $totalReenrolled): static + { + if (is_null($totalReenrolled)) { + throw new InvalidArgumentException('non-nullable totalReenrolled cannot be null'); + } + $this->container['totalReenrolled'] = $totalReenrolled; + + return $this; + } + + /** + * Gets totalStaff + * + * @return int|null + */ + public function getTotalStaff(): ?int + { + return $this->container['totalStaff']; + } + + /** + * Sets totalStaff + * + * @param int|null $totalStaff totalStaff + * + * @return $this + */ + public function setTotalStaff(?int $totalStaff): static + { + if (is_null($totalStaff)) { + throw new InvalidArgumentException('non-nullable totalStaff cannot be null'); + } + $this->container['totalStaff'] = $totalStaff; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CyclicReenrolmentReportGroup.php b/src/Model/CyclicReenrolmentReportGroup.php new file mode 100644 index 0000000..eda7690 --- /dev/null +++ b/src/Model/CyclicReenrolmentReportGroup.php @@ -0,0 +1,524 @@ + + */ +class CyclicReenrolmentReportGroup implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'CyclicReenrolmentReportGroup'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'id' => 'int', + 'lines' => '\SynergiTech\Staffology\Model\CyclicReenrolmentReportLine[]', + 'name' => 'string', + 'totalStaff' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'id' => 'int32', + 'lines' => null, + 'name' => null, + 'totalStaff' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'id' => false, + 'lines' => true, + 'name' => true, + 'totalStaff' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'id' => 'id', + 'lines' => 'lines', + 'name' => 'name', + 'totalStaff' => 'totalStaff' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'id' => 'setId', + 'lines' => 'setLines', + 'name' => 'setName', + 'totalStaff' => 'setTotalStaff' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'id' => 'getId', + 'lines' => 'getLines', + 'name' => 'getName', + 'totalStaff' => 'getTotalStaff' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('totalStaff', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId(): ?int + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return $this + */ + public function setId(?int $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets lines + * + * @return \SynergiTech\Staffology\Model\CyclicReenrolmentReportLine[]|null + */ + public function getLines(): ?array + { + return $this->container['lines']; + } + + /** + * Sets lines + * + * @param \SynergiTech\Staffology\Model\CyclicReenrolmentReportLine[]|null $lines lines + * + * @return $this + */ + public function setLines(?array $lines): static + { + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['lines'] = $lines; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName(): ?string + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return $this + */ + public function setName(?string $name): static + { + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets totalStaff + * + * @return int|null + */ + public function getTotalStaff(): ?int + { + return $this->container['totalStaff']; + } + + /** + * Sets totalStaff + * + * @param int|null $totalStaff totalStaff + * + * @return $this + */ + public function setTotalStaff(?int $totalStaff): static + { + if (is_null($totalStaff)) { + throw new InvalidArgumentException('non-nullable totalStaff cannot be null'); + } + $this->container['totalStaff'] = $totalStaff; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CyclicReenrolmentReportLine.php b/src/Model/CyclicReenrolmentReportLine.php new file mode 100644 index 0000000..e93a7c7 --- /dev/null +++ b/src/Model/CyclicReenrolmentReportLine.php @@ -0,0 +1,777 @@ + + */ +class CyclicReenrolmentReportLine implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'CyclicReenrolmentReportLine'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'firstName' => 'string', + 'lastName' => 'string', + 'middleName' => 'string', + 'payScheduleName' => 'string', + 'payrollCode' => 'string', + 'pensionSchemeId' => 'int', + 'pensionSchemeName' => 'string', + 'reenrolmentDate' => '\DateTime', + 'title' => 'string', + 'workerGroupName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'firstName' => null, + 'lastName' => null, + 'middleName' => null, + 'payScheduleName' => null, + 'payrollCode' => null, + 'pensionSchemeId' => 'int32', + 'pensionSchemeName' => null, + 'reenrolmentDate' => 'date', + 'title' => null, + 'workerGroupName' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'firstName' => true, + 'lastName' => true, + 'middleName' => true, + 'payScheduleName' => true, + 'payrollCode' => true, + 'pensionSchemeId' => false, + 'pensionSchemeName' => true, + 'reenrolmentDate' => true, + 'title' => true, + 'workerGroupName' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'firstName' => 'firstName', + 'lastName' => 'lastName', + 'middleName' => 'middleName', + 'payScheduleName' => 'payScheduleName', + 'payrollCode' => 'payrollCode', + 'pensionSchemeId' => 'pensionSchemeId', + 'pensionSchemeName' => 'pensionSchemeName', + 'reenrolmentDate' => 'reenrolmentDate', + 'title' => 'title', + 'workerGroupName' => 'workerGroupName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'firstName' => 'setFirstName', + 'lastName' => 'setLastName', + 'middleName' => 'setMiddleName', + 'payScheduleName' => 'setPayScheduleName', + 'payrollCode' => 'setPayrollCode', + 'pensionSchemeId' => 'setPensionSchemeId', + 'pensionSchemeName' => 'setPensionSchemeName', + 'reenrolmentDate' => 'setReenrolmentDate', + 'title' => 'setTitle', + 'workerGroupName' => 'setWorkerGroupName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'firstName' => 'getFirstName', + 'lastName' => 'getLastName', + 'middleName' => 'getMiddleName', + 'payScheduleName' => 'getPayScheduleName', + 'payrollCode' => 'getPayrollCode', + 'pensionSchemeId' => 'getPensionSchemeId', + 'pensionSchemeName' => 'getPensionSchemeName', + 'reenrolmentDate' => 'getReenrolmentDate', + 'title' => 'getTitle', + 'workerGroupName' => 'getWorkerGroupName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('firstName', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('middleName', $data ?? [], null); + $this->setIfExists('payScheduleName', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('pensionSchemeId', $data ?? [], null); + $this->setIfExists('pensionSchemeName', $data ?? [], null); + $this->setIfExists('reenrolmentDate', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('workerGroupName', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets firstName + * + * @return string|null + */ + public function getFirstName(): ?string + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string|null $firstName firstName + * + * @return $this + */ + public function setFirstName(?string $firstName): static + { + if (is_null($firstName)) { + array_push($this->openAPINullablesSetToNull, 'firstName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('firstName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets lastName + * + * @return string|null + */ + public function getLastName(): ?string + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string|null $lastName lastName + * + * @return $this + */ + public function setLastName(?string $lastName): static + { + if (is_null($lastName)) { + array_push($this->openAPINullablesSetToNull, 'lastName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lastName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets middleName + * + * @return string|null + */ + public function getMiddleName(): ?string + { + return $this->container['middleName']; + } + + /** + * Sets middleName + * + * @param string|null $middleName middleName + * + * @return $this + */ + public function setMiddleName(?string $middleName): static + { + if (is_null($middleName)) { + array_push($this->openAPINullablesSetToNull, 'middleName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('middleName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['middleName'] = $middleName; + + return $this; + } + + /** + * Gets payScheduleName + * + * @return string|null + */ + public function getPayScheduleName(): ?string + { + return $this->container['payScheduleName']; + } + + /** + * Sets payScheduleName + * + * @param string|null $payScheduleName payScheduleName + * + * @return $this + */ + public function setPayScheduleName(?string $payScheduleName): static + { + if (is_null($payScheduleName)) { + array_push($this->openAPINullablesSetToNull, 'payScheduleName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payScheduleName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payScheduleName'] = $payScheduleName; + + return $this; + } + + /** + * Gets payrollCode + * + * @return string|null + */ + public function getPayrollCode(): ?string + { + return $this->container['payrollCode']; + } + + /** + * Sets payrollCode + * + * @param string|null $payrollCode payrollCode + * + * @return $this + */ + public function setPayrollCode(?string $payrollCode): static + { + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payrollCode'] = $payrollCode; + + return $this; + } + + /** + * Gets pensionSchemeId + * + * @return int|null + */ + public function getPensionSchemeId(): ?int + { + return $this->container['pensionSchemeId']; + } + + /** + * Sets pensionSchemeId + * + * @param int|null $pensionSchemeId pensionSchemeId + * + * @return $this + */ + public function setPensionSchemeId(?int $pensionSchemeId): static + { + if (is_null($pensionSchemeId)) { + throw new InvalidArgumentException('non-nullable pensionSchemeId cannot be null'); + } + $this->container['pensionSchemeId'] = $pensionSchemeId; + + return $this; + } + + /** + * Gets pensionSchemeName + * + * @return string|null + */ + public function getPensionSchemeName(): ?string + { + return $this->container['pensionSchemeName']; + } + + /** + * Sets pensionSchemeName + * + * @param string|null $pensionSchemeName pensionSchemeName + * + * @return $this + */ + public function setPensionSchemeName(?string $pensionSchemeName): static + { + if (is_null($pensionSchemeName)) { + array_push($this->openAPINullablesSetToNull, 'pensionSchemeName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pensionSchemeName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pensionSchemeName'] = $pensionSchemeName; + + return $this; + } + + /** + * Gets reenrolmentDate + * + * @return \DateTime|null + */ + public function getReenrolmentDate(): ?\DateTime + { + return $this->container['reenrolmentDate']; + } + + /** + * Sets reenrolmentDate + * + * @param \DateTime|null $reenrolmentDate reenrolmentDate + * + * @return $this + */ + public function setReenrolmentDate(?\DateTime $reenrolmentDate): static + { + if (is_null($reenrolmentDate)) { + array_push($this->openAPINullablesSetToNull, 'reenrolmentDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('reenrolmentDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['reenrolmentDate'] = $reenrolmentDate; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle(): ?string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title title + * + * @return $this + */ + public function setTitle(?string $title): static + { + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets workerGroupName + * + * @return string|null + */ + public function getWorkerGroupName(): ?string + { + return $this->container['workerGroupName']; + } + + /** + * Sets workerGroupName + * + * @param string|null $workerGroupName workerGroupName + * + * @return $this + */ + public function setWorkerGroupName(?string $workerGroupName): static + { + if (is_null($workerGroupName)) { + array_push($this->openAPINullablesSetToNull, 'workerGroupName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('workerGroupName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['workerGroupName'] = $workerGroupName; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CyclicReenrolmentReportReportResponse.php b/src/Model/CyclicReenrolmentReportReportResponse.php new file mode 100644 index 0000000..9877656 --- /dev/null +++ b/src/Model/CyclicReenrolmentReportReportResponse.php @@ -0,0 +1,532 @@ + + */ +class CyclicReenrolmentReportReportResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'CyclicReenrolmentReportReportResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'content' => 'string', + 'model' => '\SynergiTech\Staffology\Model\CyclicReenrolmentReport', + 'stream' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'content' => null, + 'model' => null, + 'stream' => 'byte', + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'content' => true, + 'model' => false, + 'stream' => true, + 'type' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'content' => 'content', + 'model' => 'model', + 'stream' => 'stream', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'content' => 'setContent', + 'model' => 'setModel', + 'stream' => 'setStream', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'content' => 'getContent', + 'model' => 'getModel', + 'stream' => 'getStream', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('model', $data ?? [], null); + $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets content + * + * @return string|null + */ + public function getContent(): ?string + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string|null $content [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. + * + * @return $this + */ + public function setContent(?string $content): static + { + if (is_null($content)) { + array_push($this->openAPINullablesSetToNull, 'content'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('content', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets model + * + * @return \SynergiTech\Staffology\Model\CyclicReenrolmentReport|null + */ + public function getModel(): ?\SynergiTech\Staffology\Model\CyclicReenrolmentReport + { + return $this->container['model']; + } + + /** + * Sets model + * + * @param \SynergiTech\Staffology\Model\CyclicReenrolmentReport|null $model model + * + * @return $this + */ + public function setModel(?\SynergiTech\Staffology\Model\CyclicReenrolmentReport $model): static + { + if (is_null($model)) { + throw new InvalidArgumentException('non-nullable model cannot be null'); + } + $this->container['model'] = $model; + + return $this; + } + + /** + * Gets stream + * + * @return string|null + */ + public function getStream(): ?string + { + return $this->container['stream']; + } + + /** + * Sets stream + * + * @param string|null $stream byte array + * + * @return $this + */ + public function setStream(?string $stream): static + { + if (is_null($stream)) { + array_push($this->openAPINullablesSetToNull, 'stream'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('stream', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['stream'] = $stream; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/DayOfWeek.php b/src/Model/DayOfWeek.php index 049aea1..22abc30 100644 --- a/src/Model/DayOfWeek.php +++ b/src/Model/DayOfWeek.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/DaysBeforePayday.php b/src/Model/DaysBeforePayday.php index 311dff0..da20178 100644 --- a/src/Model/DaysBeforePayday.php +++ b/src/Model/DaysBeforePayday.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/DecimalDecimalBooleanPensionRuleValueTuple.php b/src/Model/DecimalDecimalBooleanPensionRuleValueTuple.php index 645f5d9..05599c2 100644 --- a/src/Model/DecimalDecimalBooleanPensionRuleValueTuple.php +++ b/src/Model/DecimalDecimalBooleanPensionRuleValueTuple.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/DecimalTaxYearConfigPrimitiveValue.php b/src/Model/DecimalTaxYearConfigPrimitiveValue.php index 8b9e7aa..2da3abc 100644 --- a/src/Model/DecimalTaxYearConfigPrimitiveValue.php +++ b/src/Model/DecimalTaxYearConfigPrimitiveValue.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class DecimalTaxYearConfigPrimitiveValue implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPITypes = [ - 'value' => 'float', 'effectiveFrom' => '\DateTime', - 'midYearChanges' => '\SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue[]' + 'midYearChanges' => '\SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue[]', + 'value' => 'float' ]; /** @@ -70,9 +70,9 @@ class DecimalTaxYearConfigPrimitiveValue implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPIFormats = [ - 'value' => 'double', 'effectiveFrom' => 'date', - 'midYearChanges' => null + 'midYearChanges' => null, + 'value' => 'double' ]; /** @@ -81,9 +81,9 @@ class DecimalTaxYearConfigPrimitiveValue implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPINullables = [ - 'value' => false, 'effectiveFrom' => true, - 'midYearChanges' => true + 'midYearChanges' => true, + 'value' => false ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'value' => 'value', 'effectiveFrom' => 'effectiveFrom', - 'midYearChanges' => 'midYearChanges' + 'midYearChanges' => 'midYearChanges', + 'value' => 'value' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'value' => 'setValue', 'effectiveFrom' => 'setEffectiveFrom', - 'midYearChanges' => 'setMidYearChanges' + 'midYearChanges' => 'setMidYearChanges', + 'value' => 'setValue' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'value' => 'getValue', 'effectiveFrom' => 'getEffectiveFrom', - 'midYearChanges' => 'getMidYearChanges' + 'midYearChanges' => 'getMidYearChanges', + 'value' => 'getValue' ]; /** @@ -255,9 +255,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('value', $data ?? [], null); $this->setIfExists('effectiveFrom', $data ?? [], null); $this->setIfExists('midYearChanges', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -302,33 +302,6 @@ public function valid(): bool } - /** - * Gets value - * - * @return float|null - */ - public function getValue(): ?float - { - return $this->container['value']; - } - - /** - * Sets value - * - * @param float|null $value value - * - * @return $this - */ - public function setValue(?float $value): static - { - if (is_null($value)) { - throw new InvalidArgumentException('non-nullable value cannot be null'); - } - $this->container['value'] = $value; - - return $this; - } - /** * Gets effectiveFrom * @@ -396,6 +369,33 @@ public function setMidYearChanges(?array $midYearChanges): static return $this; } + + /** + * Gets value + * + * @return float|null + */ + public function getValue(): ?float + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param float|null $value value + * + * @return $this + */ + public function setValue(?float $value): static + { + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/DeferalPeriodType.php b/src/Model/DeferalPeriodType.php index f799be1..fe4ac6d 100644 --- a/src/Model/DeferalPeriodType.php +++ b/src/Model/DeferalPeriodType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/Department.php b/src/Model/Department.php index c8be93e..03e97eb 100644 --- a/src/Model/Department.php +++ b/src/Model/Department.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class Department implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'accountingCode' => 'string', 'code' => 'string', - 'title' => 'string', 'color' => 'string', 'employeeCount' => 'int', - 'accountingCode' => 'string', - 'hasJournalOverrides' => 'bool' + 'hasJournalOverrides' => 'bool', + 'title' => 'string' ]; /** @@ -73,12 +73,12 @@ class Department implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'accountingCode' => null, 'code' => null, - 'title' => null, 'color' => null, 'employeeCount' => 'int32', - 'accountingCode' => null, - 'hasJournalOverrides' => null + 'hasJournalOverrides' => null, + 'title' => null ]; /** @@ -87,12 +87,12 @@ class Department implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'accountingCode' => true, 'code' => false, - 'title' => false, 'color' => true, 'employeeCount' => false, - 'accountingCode' => true, - 'hasJournalOverrides' => false + 'hasJournalOverrides' => false, + 'title' => false ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'accountingCode' => 'accountingCode', 'code' => 'code', - 'title' => 'title', 'color' => 'color', 'employeeCount' => 'employeeCount', - 'accountingCode' => 'accountingCode', - 'hasJournalOverrides' => 'hasJournalOverrides' + 'hasJournalOverrides' => 'hasJournalOverrides', + 'title' => 'title' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'accountingCode' => 'setAccountingCode', 'code' => 'setCode', - 'title' => 'setTitle', 'color' => 'setColor', 'employeeCount' => 'setEmployeeCount', - 'accountingCode' => 'setAccountingCode', - 'hasJournalOverrides' => 'setHasJournalOverrides' + 'hasJournalOverrides' => 'setHasJournalOverrides', + 'title' => 'setTitle' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'accountingCode' => 'getAccountingCode', 'code' => 'getCode', - 'title' => 'getTitle', 'color' => 'getColor', 'employeeCount' => 'getEmployeeCount', - 'accountingCode' => 'getAccountingCode', - 'hasJournalOverrides' => 'getHasJournalOverrides' + 'hasJournalOverrides' => 'getHasJournalOverrides', + 'title' => 'getTitle' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('accountingCode', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); $this->setIfExists('employeeCount', $data ?? [], null); - $this->setIfExists('accountingCode', $data ?? [], null); $this->setIfExists('hasJournalOverrides', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -308,6 +308,10 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if (!is_null($this->container['accountingCode']) && (mb_strlen($this->container['accountingCode']) > 50)) { + $invalidProperties[] = "invalid value for 'accountingCode', the character length must be smaller than or equal to 50."; + } + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } @@ -319,6 +323,10 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'code', the character length must be bigger than or equal to 1."; } + if (!is_null($this->container['color']) && (mb_strlen($this->container['color']) > 6)) { + $invalidProperties[] = "invalid value for 'color', the character length must be smaller than or equal to 6."; + } + if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } @@ -330,14 +338,6 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['color']) && (mb_strlen($this->container['color']) > 6)) { - $invalidProperties[] = "invalid value for 'color', the character length must be smaller than or equal to 6."; - } - - if (!is_null($this->container['accountingCode']) && (mb_strlen($this->container['accountingCode']) > 50)) { - $invalidProperties[] = "invalid value for 'accountingCode', the character length must be smaller than or equal to 50."; - } - return $invalidProperties; } @@ -354,69 +354,73 @@ public function valid(): bool /** - * Gets code + * Gets accountingCode * - * @return string + * @return string|null */ - public function getCode(): string + public function getAccountingCode(): ?string { - return $this->container['code']; + return $this->container['accountingCode']; } /** - * Sets code + * Sets accountingCode * - * @param string $code The unique code for this Department + * @param string|null $accountingCode accountingCode * * @return $this */ - public function setCode(string $code): static + public function setAccountingCode(?string $accountingCode): static { - if (is_null($code)) { - throw new InvalidArgumentException('non-nullable code cannot be null'); - } - if ((mb_strlen($code) > 20)) { - throw new InvalidArgumentException('invalid length for $code when calling Department., must be smaller than or equal to 20.'); + if (is_null($accountingCode)) { + array_push($this->openAPINullablesSetToNull, 'accountingCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountingCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - if ((mb_strlen($code) < 1)) { - throw new InvalidArgumentException('invalid length for $code when calling Department., must be bigger than or equal to 1.'); + if (!is_null($accountingCode) && (mb_strlen($accountingCode) > 50)) { + throw new InvalidArgumentException('invalid length for $accountingCode when calling Department., must be smaller than or equal to 50.'); } - $this->container['code'] = $code; + $this->container['accountingCode'] = $accountingCode; return $this; } /** - * Gets title + * Gets code * * @return string */ - public function getTitle(): string + public function getCode(): string { - return $this->container['title']; + return $this->container['code']; } /** - * Sets title + * Sets code * - * @param string $title The name of this Department + * @param string $code The unique code for this Department * * @return $this */ - public function setTitle(string $title): static + public function setCode(string $code): static { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); + if (is_null($code)) { + throw new InvalidArgumentException('non-nullable code cannot be null'); } - if ((mb_strlen($title) > 50)) { - throw new InvalidArgumentException('invalid length for $title when calling Department., must be smaller than or equal to 50.'); + if ((mb_strlen($code) > 20)) { + throw new InvalidArgumentException('invalid length for $code when calling Department., must be smaller than or equal to 20.'); } - if ((mb_strlen($title) < 1)) { - throw new InvalidArgumentException('invalid length for $title when calling Department., must be bigger than or equal to 1.'); + if ((mb_strlen($code) < 1)) { + throw new InvalidArgumentException('invalid length for $code when calling Department., must be bigger than or equal to 1.'); } - $this->container['title'] = $title; + $this->container['code'] = $code; return $this; } @@ -487,66 +491,62 @@ public function setEmployeeCount(?int $employeeCount): static } /** - * Gets accountingCode + * Gets hasJournalOverrides * - * @return string|null + * @return bool|null */ - public function getAccountingCode(): ?string + public function getHasJournalOverrides(): ?bool { - return $this->container['accountingCode']; + return $this->container['hasJournalOverrides']; } /** - * Sets accountingCode + * Sets hasJournalOverrides * - * @param string|null $accountingCode accountingCode + * @param bool|null $hasJournalOverrides Has Overrides * * @return $this */ - public function setAccountingCode(?string $accountingCode): static + public function setHasJournalOverrides(?bool $hasJournalOverrides): static { - if (is_null($accountingCode)) { - array_push($this->openAPINullablesSetToNull, 'accountingCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountingCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($accountingCode) && (mb_strlen($accountingCode) > 50)) { - throw new InvalidArgumentException('invalid length for $accountingCode when calling Department., must be smaller than or equal to 50.'); + if (is_null($hasJournalOverrides)) { + throw new InvalidArgumentException('non-nullable hasJournalOverrides cannot be null'); } - - $this->container['accountingCode'] = $accountingCode; + $this->container['hasJournalOverrides'] = $hasJournalOverrides; return $this; } /** - * Gets hasJournalOverrides + * Gets title * - * @return bool|null + * @return string */ - public function getHasJournalOverrides(): ?bool + public function getTitle(): string { - return $this->container['hasJournalOverrides']; + return $this->container['title']; } /** - * Sets hasJournalOverrides + * Sets title * - * @param bool|null $hasJournalOverrides Has Overrides + * @param string $title The name of this Department * * @return $this */ - public function setHasJournalOverrides(?bool $hasJournalOverrides): static + public function setTitle(string $title): static { - if (is_null($hasJournalOverrides)) { - throw new InvalidArgumentException('non-nullable hasJournalOverrides cannot be null'); + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); } - $this->container['hasJournalOverrides'] = $hasJournalOverrides; + if ((mb_strlen($title) > 50)) { + throw new InvalidArgumentException('invalid length for $title when calling Department., must be smaller than or equal to 50.'); + } + if ((mb_strlen($title) < 1)) { + throw new InvalidArgumentException('invalid length for $title when calling Department., must be bigger than or equal to 1.'); + } + + $this->container['title'] = $title; return $this; } diff --git a/src/Model/DepartmentMembership.php b/src/Model/DepartmentMembership.php index 65aa61c..de3a6d3 100644 --- a/src/Model/DepartmentMembership.php +++ b/src/Model/DepartmentMembership.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -62,10 +62,10 @@ class DepartmentMembership implements ModelInterface, ArrayAccess, JsonSerializa protected static array $openAPITypes = [ 'code' => 'string', 'color' => 'string', - 'title' => 'string', + 'employeeRoleUniqueId' => 'string', 'primary' => 'bool', - 'weighting' => 'float', - 'employeeRoleUniqueId' => 'string' + 'title' => 'string', + 'weighting' => 'float' ]; /** @@ -76,10 +76,10 @@ class DepartmentMembership implements ModelInterface, ArrayAccess, JsonSerializa protected static array $openAPIFormats = [ 'code' => null, 'color' => null, - 'title' => null, + 'employeeRoleUniqueId' => 'uuid', 'primary' => null, - 'weighting' => 'double', - 'employeeRoleUniqueId' => 'uuid' + 'title' => null, + 'weighting' => 'double' ]; /** @@ -90,10 +90,10 @@ class DepartmentMembership implements ModelInterface, ArrayAccess, JsonSerializa protected static array $openAPINullables = [ 'code' => false, 'color' => true, - 'title' => true, + 'employeeRoleUniqueId' => false, 'primary' => false, - 'weighting' => false, - 'employeeRoleUniqueId' => false + 'title' => true, + 'weighting' => false ]; /** @@ -184,10 +184,10 @@ public function isNullableSetToNull(string $property): bool protected static array $attributeMap = [ 'code' => 'code', 'color' => 'color', - 'title' => 'title', + 'employeeRoleUniqueId' => 'employeeRoleUniqueId', 'primary' => 'primary', - 'weighting' => 'weighting', - 'employeeRoleUniqueId' => 'employeeRoleUniqueId' + 'title' => 'title', + 'weighting' => 'weighting' ]; /** @@ -198,10 +198,10 @@ public function isNullableSetToNull(string $property): bool protected static array $setters = [ 'code' => 'setCode', 'color' => 'setColor', - 'title' => 'setTitle', + 'employeeRoleUniqueId' => 'setEmployeeRoleUniqueId', 'primary' => 'setPrimary', - 'weighting' => 'setWeighting', - 'employeeRoleUniqueId' => 'setEmployeeRoleUniqueId' + 'title' => 'setTitle', + 'weighting' => 'setWeighting' ]; /** @@ -212,10 +212,10 @@ public function isNullableSetToNull(string $property): bool protected static array $getters = [ 'code' => 'getCode', 'color' => 'getColor', - 'title' => 'getTitle', + 'employeeRoleUniqueId' => 'getEmployeeRoleUniqueId', 'primary' => 'getPrimary', - 'weighting' => 'getWeighting', - 'employeeRoleUniqueId' => 'getEmployeeRoleUniqueId' + 'title' => 'getTitle', + 'weighting' => 'getWeighting' ]; /** @@ -276,10 +276,10 @@ public function __construct(?array $data = null) { $this->setIfExists('code', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('employeeRoleUniqueId', $data ?? [], null); $this->setIfExists('primary', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); $this->setIfExists('weighting', $data ?? [], null); - $this->setIfExists('employeeRoleUniqueId', $data ?? [], null); } /** @@ -398,35 +398,28 @@ public function setColor(?string $color): static } /** - * Gets title + * Gets employeeRoleUniqueId * * @return string|null */ - public function getTitle(): ?string + public function getEmployeeRoleUniqueId(): ?string { - return $this->container['title']; + return $this->container['employeeRoleUniqueId']; } /** - * Sets title + * Sets employeeRoleUniqueId * - * @param string|null $title [readonly] The Title for the Department + * @param string|null $employeeRoleUniqueId employeeRoleUniqueId * * @return $this */ - public function setTitle(?string $title): static + public function setEmployeeRoleUniqueId(?string $employeeRoleUniqueId): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employeeRoleUniqueId)) { + throw new InvalidArgumentException('non-nullable employeeRoleUniqueId cannot be null'); } - $this->container['title'] = $title; + $this->container['employeeRoleUniqueId'] = $employeeRoleUniqueId; return $this; } @@ -459,55 +452,62 @@ public function setPrimary(?bool $primary): static } /** - * Gets weighting + * Gets title * - * @return float|null + * @return string|null */ - public function getWeighting(): ?float + public function getTitle(): ?string { - return $this->container['weighting']; + return $this->container['title']; } /** - * Sets weighting + * Sets title * - * @param float|null $weighting If there is more than one Department Membership for the Employee then this determines the weighting to give to this membership. ie, if he is in two departments you might set the primary as 0.8 and the secondary as 0.2; + * @param string|null $title [readonly] The Title for the Department * * @return $this */ - public function setWeighting(?float $weighting): static + public function setTitle(?string $title): static { - if (is_null($weighting)) { - throw new InvalidArgumentException('non-nullable weighting cannot be null'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['weighting'] = $weighting; + $this->container['title'] = $title; return $this; } /** - * Gets employeeRoleUniqueId + * Gets weighting * - * @return string|null + * @return float|null */ - public function getEmployeeRoleUniqueId(): ?string + public function getWeighting(): ?float { - return $this->container['employeeRoleUniqueId']; + return $this->container['weighting']; } /** - * Sets employeeRoleUniqueId + * Sets weighting * - * @param string|null $employeeRoleUniqueId employeeRoleUniqueId + * @param float|null $weighting If there is more than one Department Membership for the Employee then this determines the weighting to give to this membership. ie, if he is in two departments you might set the primary as 0.8 and the secondary as 0.2; * * @return $this */ - public function setEmployeeRoleUniqueId(?string $employeeRoleUniqueId): static + public function setWeighting(?float $weighting): static { - if (is_null($employeeRoleUniqueId)) { - throw new InvalidArgumentException('non-nullable employeeRoleUniqueId cannot be null'); + if (is_null($weighting)) { + throw new InvalidArgumentException('non-nullable weighting cannot be null'); } - $this->container['employeeRoleUniqueId'] = $employeeRoleUniqueId; + $this->container['weighting'] = $weighting; return $this; } diff --git a/src/Model/DirectDebitMandate.php b/src/Model/DirectDebitMandate.php index 375ceae..f1472ca 100644 --- a/src/Model/DirectDebitMandate.php +++ b/src/Model/DirectDebitMandate.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class DirectDebitMandate implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'isCompleted' => 'bool', - 'mandateLink' => 'string', - 'customerLink' => 'string', - 'bankName' => 'string', 'accountNumberEnding' => 'string', - 'id' => 'string' + 'bankName' => 'string', + 'customerLink' => 'string', + 'id' => 'string', + 'isCompleted' => 'bool', + 'mandateLink' => 'string' ]; /** @@ -73,12 +73,12 @@ class DirectDebitMandate implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'isCompleted' => null, - 'mandateLink' => null, - 'customerLink' => null, - 'bankName' => null, 'accountNumberEnding' => null, - 'id' => 'uuid' + 'bankName' => null, + 'customerLink' => null, + 'id' => 'uuid', + 'isCompleted' => null, + 'mandateLink' => null ]; /** @@ -87,12 +87,12 @@ class DirectDebitMandate implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'isCompleted' => false, - 'mandateLink' => true, - 'customerLink' => true, - 'bankName' => true, 'accountNumberEnding' => true, - 'id' => false + 'bankName' => true, + 'customerLink' => true, + 'id' => false, + 'isCompleted' => false, + 'mandateLink' => true ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'isCompleted' => 'isCompleted', - 'mandateLink' => 'mandateLink', - 'customerLink' => 'customerLink', - 'bankName' => 'bankName', 'accountNumberEnding' => 'accountNumberEnding', - 'id' => 'id' + 'bankName' => 'bankName', + 'customerLink' => 'customerLink', + 'id' => 'id', + 'isCompleted' => 'isCompleted', + 'mandateLink' => 'mandateLink' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'isCompleted' => 'setIsCompleted', - 'mandateLink' => 'setMandateLink', - 'customerLink' => 'setCustomerLink', - 'bankName' => 'setBankName', 'accountNumberEnding' => 'setAccountNumberEnding', - 'id' => 'setId' + 'bankName' => 'setBankName', + 'customerLink' => 'setCustomerLink', + 'id' => 'setId', + 'isCompleted' => 'setIsCompleted', + 'mandateLink' => 'setMandateLink' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'isCompleted' => 'getIsCompleted', - 'mandateLink' => 'getMandateLink', - 'customerLink' => 'getCustomerLink', - 'bankName' => 'getBankName', 'accountNumberEnding' => 'getAccountNumberEnding', - 'id' => 'getId' + 'bankName' => 'getBankName', + 'customerLink' => 'getCustomerLink', + 'id' => 'getId', + 'isCompleted' => 'getIsCompleted', + 'mandateLink' => 'getMandateLink' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('isCompleted', $data ?? [], null); - $this->setIfExists('mandateLink', $data ?? [], null); - $this->setIfExists('customerLink', $data ?? [], null); - $this->setIfExists('bankName', $data ?? [], null); $this->setIfExists('accountNumberEnding', $data ?? [], null); + $this->setIfExists('bankName', $data ?? [], null); + $this->setIfExists('customerLink', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isCompleted', $data ?? [], null); + $this->setIfExists('mandateLink', $data ?? [], null); } /** @@ -324,62 +324,69 @@ public function valid(): bool /** - * Gets isCompleted + * Gets accountNumberEnding * - * @return bool|null + * @return string|null */ - public function getIsCompleted(): ?bool + public function getAccountNumberEnding(): ?string { - return $this->container['isCompleted']; + return $this->container['accountNumberEnding']; } /** - * Sets isCompleted + * Sets accountNumberEnding * - * @param bool|null $isCompleted isCompleted + * @param string|null $accountNumberEnding accountNumberEnding * * @return $this */ - public function setIsCompleted(?bool $isCompleted): static + public function setAccountNumberEnding(?string $accountNumberEnding): static { - if (is_null($isCompleted)) { - throw new InvalidArgumentException('non-nullable isCompleted cannot be null'); + if (is_null($accountNumberEnding)) { + array_push($this->openAPINullablesSetToNull, 'accountNumberEnding'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountNumberEnding', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isCompleted'] = $isCompleted; + $this->container['accountNumberEnding'] = $accountNumberEnding; return $this; } /** - * Gets mandateLink + * Gets bankName * * @return string|null */ - public function getMandateLink(): ?string + public function getBankName(): ?string { - return $this->container['mandateLink']; + return $this->container['bankName']; } /** - * Sets mandateLink + * Sets bankName * - * @param string|null $mandateLink mandateLink + * @param string|null $bankName bankName * * @return $this */ - public function setMandateLink(?string $mandateLink): static + public function setBankName(?string $bankName): static { - if (is_null($mandateLink)) { - array_push($this->openAPINullablesSetToNull, 'mandateLink'); + if (is_null($bankName)) { + array_push($this->openAPINullablesSetToNull, 'bankName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mandateLink', $nullablesSetToNull); + $index = array_search('bankName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['mandateLink'] = $mandateLink; + $this->container['bankName'] = $bankName; return $this; } @@ -419,96 +426,89 @@ public function setCustomerLink(?string $customerLink): static } /** - * Gets bankName + * Gets id * * @return string|null */ - public function getBankName(): ?string + public function getId(): ?string { - return $this->container['bankName']; + return $this->container['id']; } /** - * Sets bankName + * Sets id * - * @param string|null $bankName bankName + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setBankName(?string $bankName): static + public function setId(?string $id): static { - if (is_null($bankName)) { - array_push($this->openAPINullablesSetToNull, 'bankName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['bankName'] = $bankName; + $this->container['id'] = $id; return $this; } /** - * Gets accountNumberEnding + * Gets isCompleted * - * @return string|null + * @return bool|null */ - public function getAccountNumberEnding(): ?string + public function getIsCompleted(): ?bool { - return $this->container['accountNumberEnding']; + return $this->container['isCompleted']; } /** - * Sets accountNumberEnding + * Sets isCompleted * - * @param string|null $accountNumberEnding accountNumberEnding + * @param bool|null $isCompleted isCompleted * * @return $this */ - public function setAccountNumberEnding(?string $accountNumberEnding): static + public function setIsCompleted(?bool $isCompleted): static { - if (is_null($accountNumberEnding)) { - array_push($this->openAPINullablesSetToNull, 'accountNumberEnding'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountNumberEnding', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isCompleted)) { + throw new InvalidArgumentException('non-nullable isCompleted cannot be null'); } - $this->container['accountNumberEnding'] = $accountNumberEnding; + $this->container['isCompleted'] = $isCompleted; return $this; } /** - * Gets id + * Gets mandateLink * * @return string|null */ - public function getId(): ?string + public function getMandateLink(): ?string { - return $this->container['id']; + return $this->container['mandateLink']; } /** - * Sets id + * Sets mandateLink * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $mandateLink mandateLink * * @return $this */ - public function setId(?string $id): static + public function setMandateLink(?string $mandateLink): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($mandateLink)) { + array_push($this->openAPINullablesSetToNull, 'mandateLink'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('mandateLink', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['mandateLink'] = $mandateLink; return $this; } diff --git a/src/Model/DirectorshipDetails.php b/src/Model/DirectorshipDetails.php index 3cdfb3d..9783b72 100644 --- a/src/Model/DirectorshipDetails.php +++ b/src/Model/DirectorshipDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,9 +60,9 @@ class DirectorshipDetails implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPITypes = [ 'isDirector' => 'bool', - 'startDate' => '\DateTime', 'leaveDate' => '\DateTime', - 'niAlternativeMethod' => 'bool' + 'niAlternativeMethod' => 'bool', + 'startDate' => '\DateTime' ]; /** @@ -72,9 +72,9 @@ class DirectorshipDetails implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPIFormats = [ 'isDirector' => null, - 'startDate' => 'date', 'leaveDate' => 'date', - 'niAlternativeMethod' => null + 'niAlternativeMethod' => null, + 'startDate' => 'date' ]; /** @@ -84,9 +84,9 @@ class DirectorshipDetails implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPINullables = [ 'isDirector' => false, - 'startDate' => true, 'leaveDate' => true, - 'niAlternativeMethod' => false + 'niAlternativeMethod' => false, + 'startDate' => true ]; /** @@ -176,9 +176,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'isDirector' => 'isDirector', - 'startDate' => 'startDate', 'leaveDate' => 'leaveDate', - 'niAlternativeMethod' => 'niAlternativeMethod' + 'niAlternativeMethod' => 'niAlternativeMethod', + 'startDate' => 'startDate' ]; /** @@ -188,9 +188,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'isDirector' => 'setIsDirector', - 'startDate' => 'setStartDate', 'leaveDate' => 'setLeaveDate', - 'niAlternativeMethod' => 'setNiAlternativeMethod' + 'niAlternativeMethod' => 'setNiAlternativeMethod', + 'startDate' => 'setStartDate' ]; /** @@ -200,9 +200,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'isDirector' => 'getIsDirector', - 'startDate' => 'getStartDate', 'leaveDate' => 'getLeaveDate', - 'niAlternativeMethod' => 'getNiAlternativeMethod' + 'niAlternativeMethod' => 'getNiAlternativeMethod', + 'startDate' => 'getStartDate' ]; /** @@ -262,9 +262,9 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('isDirector', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); $this->setIfExists('leaveDate', $data ?? [], null); $this->setIfExists('niAlternativeMethod', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); } /** @@ -336,40 +336,6 @@ public function setIsDirector(?bool $isDirector): static return $this; } - /** - * Gets startDate - * - * @return \DateTime|null - */ - public function getStartDate(): ?\DateTime - { - return $this->container['startDate']; - } - - /** - * Sets startDate - * - * @param \DateTime|null $startDate startDate - * - * @return $this - */ - public function setStartDate(?\DateTime $startDate): static - { - if (is_null($startDate)) { - array_push($this->openAPINullablesSetToNull, 'startDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['startDate'] = $startDate; - - return $this; - } - /** * Gets leaveDate * @@ -430,6 +396,40 @@ public function setNiAlternativeMethod(?bool $niAlternativeMethod): static return $this; } + + /** + * Gets startDate + * + * @return \DateTime|null + */ + public function getStartDate(): ?\DateTime + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param \DateTime|null $startDate startDate + * + * @return $this + */ + public function setStartDate(?\DateTime $startDate): static + { + if (is_null($startDate)) { + array_push($this->openAPINullablesSetToNull, 'startDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['startDate'] = $startDate; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/DpsDataType.php b/src/Model/DpsDataType.php index 29a562c..a6825d7 100644 --- a/src/Model/DpsDataType.php +++ b/src/Model/DpsDataType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/DpsNotice.php b/src/Model/DpsNotice.php index 05986c0..020ca39 100644 --- a/src/Model/DpsNotice.php +++ b/src/Model/DpsNotice.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,24 +59,25 @@ class DpsNotice implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'issueDate' => '\DateTime', + 'appliedOn' => '\DateTime', 'effectiveDate' => '\DateTime', - 'taxYear' => 'int', - 'sequenceNumber' => 'int', - 'type' => '\SynergiTech\Staffology\Model\DpsDataType', - 'formType' => 'string', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'forename' => 'string', - 'surname' => 'string', + 'formType' => 'string', + 'id' => 'string', + 'issueDate' => '\DateTime', 'niNo' => 'string', - 'worksNumber' => 'string', + 'periodApplied' => 'int', + 'planType' => '\SynergiTech\Staffology\Model\StudentLoan', + 'previousPay' => 'float', + 'previousTax' => 'float', + 'sequenceNumber' => 'int', + 'surname' => 'string', 'taxCode' => 'string', + 'taxYear' => 'int', + 'type' => '\SynergiTech\Staffology\Model\DpsDataType', 'week1Month1' => 'bool', - 'previousTax' => 'float', - 'previousPay' => 'float', - 'planType' => '\SynergiTech\Staffology\Model\StudentLoan', - 'appliedOn' => '\DateTime', - 'employee' => '\SynergiTech\Staffology\Model\Item', - 'id' => 'string' + 'worksNumber' => 'string' ]; /** @@ -85,24 +86,25 @@ class DpsNotice implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'issueDate' => 'date', + 'appliedOn' => 'date', 'effectiveDate' => 'date', - 'taxYear' => 'int32', - 'sequenceNumber' => 'int32', - 'type' => null, - 'formType' => null, + 'employee' => null, 'forename' => null, - 'surname' => null, + 'formType' => null, + 'id' => 'uuid', + 'issueDate' => 'date', 'niNo' => null, - 'worksNumber' => null, + 'periodApplied' => 'int32', + 'planType' => null, + 'previousPay' => 'double', + 'previousTax' => 'double', + 'sequenceNumber' => 'int32', + 'surname' => null, 'taxCode' => null, + 'taxYear' => 'int32', + 'type' => null, 'week1Month1' => null, - 'previousTax' => 'double', - 'previousPay' => 'double', - 'planType' => null, - 'appliedOn' => 'date', - 'employee' => null, - 'id' => 'uuid' + 'worksNumber' => null ]; /** @@ -111,24 +113,25 @@ class DpsNotice implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'issueDate' => false, + 'appliedOn' => true, 'effectiveDate' => false, - 'taxYear' => false, - 'sequenceNumber' => false, - 'type' => false, - 'formType' => true, + 'employee' => false, 'forename' => true, - 'surname' => true, + 'formType' => true, + 'id' => false, + 'issueDate' => false, 'niNo' => true, - 'worksNumber' => true, + 'periodApplied' => true, + 'planType' => false, + 'previousPay' => true, + 'previousTax' => true, + 'sequenceNumber' => false, + 'surname' => true, 'taxCode' => true, + 'taxYear' => false, + 'type' => false, 'week1Month1' => true, - 'previousTax' => true, - 'previousPay' => true, - 'planType' => false, - 'appliedOn' => true, - 'employee' => false, - 'id' => false + 'worksNumber' => true ]; /** @@ -217,24 +220,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'issueDate' => 'issueDate', + 'appliedOn' => 'appliedOn', 'effectiveDate' => 'effectiveDate', - 'taxYear' => 'taxYear', - 'sequenceNumber' => 'sequenceNumber', - 'type' => 'type', - 'formType' => 'formType', + 'employee' => 'employee', 'forename' => 'forename', - 'surname' => 'surname', + 'formType' => 'formType', + 'id' => 'id', + 'issueDate' => 'issueDate', 'niNo' => 'niNo', - 'worksNumber' => 'worksNumber', + 'periodApplied' => 'periodApplied', + 'planType' => 'planType', + 'previousPay' => 'previousPay', + 'previousTax' => 'previousTax', + 'sequenceNumber' => 'sequenceNumber', + 'surname' => 'surname', 'taxCode' => 'taxCode', + 'taxYear' => 'taxYear', + 'type' => 'type', 'week1Month1' => 'week1Month1', - 'previousTax' => 'previousTax', - 'previousPay' => 'previousPay', - 'planType' => 'planType', - 'appliedOn' => 'appliedOn', - 'employee' => 'employee', - 'id' => 'id' + 'worksNumber' => 'worksNumber' ]; /** @@ -243,24 +247,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'issueDate' => 'setIssueDate', + 'appliedOn' => 'setAppliedOn', 'effectiveDate' => 'setEffectiveDate', - 'taxYear' => 'setTaxYear', - 'sequenceNumber' => 'setSequenceNumber', - 'type' => 'setType', - 'formType' => 'setFormType', + 'employee' => 'setEmployee', 'forename' => 'setForename', - 'surname' => 'setSurname', + 'formType' => 'setFormType', + 'id' => 'setId', + 'issueDate' => 'setIssueDate', 'niNo' => 'setNiNo', - 'worksNumber' => 'setWorksNumber', + 'periodApplied' => 'setPeriodApplied', + 'planType' => 'setPlanType', + 'previousPay' => 'setPreviousPay', + 'previousTax' => 'setPreviousTax', + 'sequenceNumber' => 'setSequenceNumber', + 'surname' => 'setSurname', 'taxCode' => 'setTaxCode', + 'taxYear' => 'setTaxYear', + 'type' => 'setType', 'week1Month1' => 'setWeek1Month1', - 'previousTax' => 'setPreviousTax', - 'previousPay' => 'setPreviousPay', - 'planType' => 'setPlanType', - 'appliedOn' => 'setAppliedOn', - 'employee' => 'setEmployee', - 'id' => 'setId' + 'worksNumber' => 'setWorksNumber' ]; /** @@ -269,24 +274,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'issueDate' => 'getIssueDate', + 'appliedOn' => 'getAppliedOn', 'effectiveDate' => 'getEffectiveDate', - 'taxYear' => 'getTaxYear', - 'sequenceNumber' => 'getSequenceNumber', - 'type' => 'getType', - 'formType' => 'getFormType', + 'employee' => 'getEmployee', 'forename' => 'getForename', - 'surname' => 'getSurname', + 'formType' => 'getFormType', + 'id' => 'getId', + 'issueDate' => 'getIssueDate', 'niNo' => 'getNiNo', - 'worksNumber' => 'getWorksNumber', + 'periodApplied' => 'getPeriodApplied', + 'planType' => 'getPlanType', + 'previousPay' => 'getPreviousPay', + 'previousTax' => 'getPreviousTax', + 'sequenceNumber' => 'getSequenceNumber', + 'surname' => 'getSurname', 'taxCode' => 'getTaxCode', + 'taxYear' => 'getTaxYear', + 'type' => 'getType', 'week1Month1' => 'getWeek1Month1', - 'previousTax' => 'getPreviousTax', - 'previousPay' => 'getPreviousPay', - 'planType' => 'getPlanType', - 'appliedOn' => 'getAppliedOn', - 'employee' => 'getEmployee', - 'id' => 'getId' + 'worksNumber' => 'getWorksNumber' ]; /** @@ -345,24 +351,25 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('issueDate', $data ?? [], null); + $this->setIfExists('appliedOn', $data ?? [], null); $this->setIfExists('effectiveDate', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('sequenceNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('formType', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('forename', $data ?? [], null); - $this->setIfExists('surname', $data ?? [], null); + $this->setIfExists('formType', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('issueDate', $data ?? [], null); $this->setIfExists('niNo', $data ?? [], null); - $this->setIfExists('worksNumber', $data ?? [], null); + $this->setIfExists('periodApplied', $data ?? [], null); + $this->setIfExists('planType', $data ?? [], null); + $this->setIfExists('previousPay', $data ?? [], null); + $this->setIfExists('previousTax', $data ?? [], null); + $this->setIfExists('sequenceNumber', $data ?? [], null); + $this->setIfExists('surname', $data ?? [], null); $this->setIfExists('taxCode', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('week1Month1', $data ?? [], null); - $this->setIfExists('previousTax', $data ?? [], null); - $this->setIfExists('previousPay', $data ?? [], null); - $this->setIfExists('planType', $data ?? [], null); - $this->setIfExists('appliedOn', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('worksNumber', $data ?? [], null); } /** @@ -408,28 +415,35 @@ public function valid(): bool /** - * Gets issueDate + * Gets appliedOn * * @return \DateTime|null */ - public function getIssueDate(): ?\DateTime + public function getAppliedOn(): ?\DateTime { - return $this->container['issueDate']; + return $this->container['appliedOn']; } /** - * Sets issueDate + * Sets appliedOn * - * @param \DateTime|null $issueDate issueDate + * @param \DateTime|null $appliedOn appliedOn * * @return $this */ - public function setIssueDate(?\DateTime $issueDate): static + public function setAppliedOn(?\DateTime $appliedOn): static { - if (is_null($issueDate)) { - throw new InvalidArgumentException('non-nullable issueDate cannot be null'); + if (is_null($appliedOn)) { + array_push($this->openAPINullablesSetToNull, 'appliedOn'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('appliedOn', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['issueDate'] = $issueDate; + $this->container['appliedOn'] = $appliedOn; return $this; } @@ -462,503 +476,530 @@ public function setEffectiveDate(?\DateTime $effectiveDate): static } /** - * Gets taxYear + * Gets employee * - * @return int|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getTaxYear(): ?int + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['taxYear']; + return $this->container['employee']; } /** - * Sets taxYear + * Sets employee * - * @param int|null $taxYear taxYear + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setTaxYear(?int $taxYear): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['employee'] = $employee; return $this; } /** - * Gets sequenceNumber + * Gets forename * - * @return int|null + * @return string|null */ - public function getSequenceNumber(): ?int + public function getForename(): ?string { - return $this->container['sequenceNumber']; + return $this->container['forename']; } /** - * Sets sequenceNumber + * Sets forename * - * @param int|null $sequenceNumber sequenceNumber + * @param string|null $forename forename * * @return $this */ - public function setSequenceNumber(?int $sequenceNumber): static + public function setForename(?string $forename): static { - if (is_null($sequenceNumber)) { - throw new InvalidArgumentException('non-nullable sequenceNumber cannot be null'); + if (is_null($forename)) { + array_push($this->openAPINullablesSetToNull, 'forename'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('forename', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['sequenceNumber'] = $sequenceNumber; + $this->container['forename'] = $forename; return $this; } /** - * Gets type + * Gets formType * - * @return \SynergiTech\Staffology\Model\DpsDataType|null + * @return string|null */ - public function getType(): ?\SynergiTech\Staffology\Model\DpsDataType + public function getFormType(): ?string { - return $this->container['type']; + return $this->container['formType']; } /** - * Sets type + * Sets formType * - * @param \SynergiTech\Staffology\Model\DpsDataType|null $type type + * @param string|null $formType formType * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\DpsDataType $type): static + public function setFormType(?string $formType): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($formType)) { + array_push($this->openAPINullablesSetToNull, 'formType'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('formType', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['type'] = $type; + $this->container['formType'] = $formType; return $this; } /** - * Gets formType + * Gets id * * @return string|null */ - public function getFormType(): ?string + public function getId(): ?string { - return $this->container['formType']; + return $this->container['id']; } /** - * Sets formType + * Sets id * - * @param string|null $formType formType + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setFormType(?string $formType): static + public function setId(?string $id): static { - if (is_null($formType)) { - array_push($this->openAPINullablesSetToNull, 'formType'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('formType', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['formType'] = $formType; + $this->container['id'] = $id; return $this; } /** - * Gets forename + * Gets issueDate * - * @return string|null + * @return \DateTime|null */ - public function getForename(): ?string + public function getIssueDate(): ?\DateTime { - return $this->container['forename']; + return $this->container['issueDate']; } /** - * Sets forename + * Sets issueDate * - * @param string|null $forename forename + * @param \DateTime|null $issueDate issueDate * * @return $this */ - public function setForename(?string $forename): static + public function setIssueDate(?\DateTime $issueDate): static { - if (is_null($forename)) { - array_push($this->openAPINullablesSetToNull, 'forename'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('forename', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($issueDate)) { + throw new InvalidArgumentException('non-nullable issueDate cannot be null'); } - $this->container['forename'] = $forename; + $this->container['issueDate'] = $issueDate; return $this; } /** - * Gets surname + * Gets niNo * * @return string|null */ - public function getSurname(): ?string + public function getNiNo(): ?string { - return $this->container['surname']; + return $this->container['niNo']; } /** - * Sets surname + * Sets niNo * - * @param string|null $surname surname + * @param string|null $niNo niNo * * @return $this */ - public function setSurname(?string $surname): static + public function setNiNo(?string $niNo): static { - if (is_null($surname)) { - array_push($this->openAPINullablesSetToNull, 'surname'); + if (is_null($niNo)) { + array_push($this->openAPINullablesSetToNull, 'niNo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('surname', $nullablesSetToNull); + $index = array_search('niNo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['surname'] = $surname; + $this->container['niNo'] = $niNo; return $this; } /** - * Gets niNo + * Gets periodApplied * - * @return string|null + * @return int|null */ - public function getNiNo(): ?string + public function getPeriodApplied(): ?int { - return $this->container['niNo']; + return $this->container['periodApplied']; } /** - * Sets niNo + * Sets periodApplied * - * @param string|null $niNo niNo + * @param int|null $periodApplied periodApplied * * @return $this */ - public function setNiNo(?string $niNo): static + public function setPeriodApplied(?int $periodApplied): static { - if (is_null($niNo)) { - array_push($this->openAPINullablesSetToNull, 'niNo'); + if (is_null($periodApplied)) { + array_push($this->openAPINullablesSetToNull, 'periodApplied'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niNo', $nullablesSetToNull); + $index = array_search('periodApplied', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['niNo'] = $niNo; + $this->container['periodApplied'] = $periodApplied; return $this; } /** - * Gets worksNumber + * Gets planType * - * @return string|null + * @return \SynergiTech\Staffology\Model\StudentLoan|null */ - public function getWorksNumber(): ?string + public function getPlanType(): ?\SynergiTech\Staffology\Model\StudentLoan { - return $this->container['worksNumber']; + return $this->container['planType']; } /** - * Sets worksNumber + * Sets planType * - * @param string|null $worksNumber worksNumber + * @param \SynergiTech\Staffology\Model\StudentLoan|null $planType planType * * @return $this */ - public function setWorksNumber(?string $worksNumber): static + public function setPlanType(?\SynergiTech\Staffology\Model\StudentLoan $planType): static { - if (is_null($worksNumber)) { - array_push($this->openAPINullablesSetToNull, 'worksNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('worksNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($planType)) { + throw new InvalidArgumentException('non-nullable planType cannot be null'); } - $this->container['worksNumber'] = $worksNumber; + $this->container['planType'] = $planType; return $this; } /** - * Gets taxCode + * Gets previousPay * - * @return string|null + * @return float|null */ - public function getTaxCode(): ?string + public function getPreviousPay(): ?float { - return $this->container['taxCode']; + return $this->container['previousPay']; } /** - * Sets taxCode + * Sets previousPay * - * @param string|null $taxCode taxCode + * @param float|null $previousPay previousPay * * @return $this */ - public function setTaxCode(?string $taxCode): static + public function setPreviousPay(?float $previousPay): static { - if (is_null($taxCode)) { - array_push($this->openAPINullablesSetToNull, 'taxCode'); + if (is_null($previousPay)) { + array_push($this->openAPINullablesSetToNull, 'previousPay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxCode', $nullablesSetToNull); + $index = array_search('previousPay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxCode'] = $taxCode; + $this->container['previousPay'] = $previousPay; return $this; } /** - * Gets week1Month1 + * Gets previousTax * - * @return bool|null + * @return float|null */ - public function getWeek1Month1(): ?bool + public function getPreviousTax(): ?float { - return $this->container['week1Month1']; + return $this->container['previousTax']; } /** - * Sets week1Month1 + * Sets previousTax * - * @param bool|null $week1Month1 week1Month1 + * @param float|null $previousTax previousTax * * @return $this */ - public function setWeek1Month1(?bool $week1Month1): static + public function setPreviousTax(?float $previousTax): static { - if (is_null($week1Month1)) { - array_push($this->openAPINullablesSetToNull, 'week1Month1'); + if (is_null($previousTax)) { + array_push($this->openAPINullablesSetToNull, 'previousTax'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('week1Month1', $nullablesSetToNull); + $index = array_search('previousTax', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['week1Month1'] = $week1Month1; + $this->container['previousTax'] = $previousTax; return $this; } /** - * Gets previousTax + * Gets sequenceNumber * - * @return float|null + * @return int|null */ - public function getPreviousTax(): ?float + public function getSequenceNumber(): ?int { - return $this->container['previousTax']; + return $this->container['sequenceNumber']; } /** - * Sets previousTax + * Sets sequenceNumber * - * @param float|null $previousTax previousTax + * @param int|null $sequenceNumber sequenceNumber * * @return $this */ - public function setPreviousTax(?float $previousTax): static + public function setSequenceNumber(?int $sequenceNumber): static { - if (is_null($previousTax)) { - array_push($this->openAPINullablesSetToNull, 'previousTax'); + if (is_null($sequenceNumber)) { + throw new InvalidArgumentException('non-nullable sequenceNumber cannot be null'); + } + $this->container['sequenceNumber'] = $sequenceNumber; + + return $this; + } + + /** + * Gets surname + * + * @return string|null + */ + public function getSurname(): ?string + { + return $this->container['surname']; + } + + /** + * Sets surname + * + * @param string|null $surname surname + * + * @return $this + */ + public function setSurname(?string $surname): static + { + if (is_null($surname)) { + array_push($this->openAPINullablesSetToNull, 'surname'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('previousTax', $nullablesSetToNull); + $index = array_search('surname', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['previousTax'] = $previousTax; + $this->container['surname'] = $surname; return $this; } /** - * Gets previousPay + * Gets taxCode * - * @return float|null + * @return string|null */ - public function getPreviousPay(): ?float + public function getTaxCode(): ?string { - return $this->container['previousPay']; + return $this->container['taxCode']; } /** - * Sets previousPay + * Sets taxCode * - * @param float|null $previousPay previousPay + * @param string|null $taxCode taxCode * * @return $this */ - public function setPreviousPay(?float $previousPay): static + public function setTaxCode(?string $taxCode): static { - if (is_null($previousPay)) { - array_push($this->openAPINullablesSetToNull, 'previousPay'); + if (is_null($taxCode)) { + array_push($this->openAPINullablesSetToNull, 'taxCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('previousPay', $nullablesSetToNull); + $index = array_search('taxCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['previousPay'] = $previousPay; + $this->container['taxCode'] = $taxCode; return $this; } /** - * Gets planType + * Gets taxYear * - * @return \SynergiTech\Staffology\Model\StudentLoan|null + * @return int|null */ - public function getPlanType(): ?\SynergiTech\Staffology\Model\StudentLoan + public function getTaxYear(): ?int { - return $this->container['planType']; + return $this->container['taxYear']; } /** - * Sets planType + * Sets taxYear * - * @param \SynergiTech\Staffology\Model\StudentLoan|null $planType planType + * @param int|null $taxYear taxYear * * @return $this */ - public function setPlanType(?\SynergiTech\Staffology\Model\StudentLoan $planType): static + public function setTaxYear(?int $taxYear): static { - if (is_null($planType)) { - throw new InvalidArgumentException('non-nullable planType cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['planType'] = $planType; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets appliedOn + * Gets type * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\DpsDataType|null */ - public function getAppliedOn(): ?\DateTime + public function getType(): ?\SynergiTech\Staffology\Model\DpsDataType { - return $this->container['appliedOn']; + return $this->container['type']; } /** - * Sets appliedOn + * Sets type * - * @param \DateTime|null $appliedOn appliedOn + * @param \SynergiTech\Staffology\Model\DpsDataType|null $type type * * @return $this */ - public function setAppliedOn(?\DateTime $appliedOn): static + public function setType(?\SynergiTech\Staffology\Model\DpsDataType $type): static { - if (is_null($appliedOn)) { - array_push($this->openAPINullablesSetToNull, 'appliedOn'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('appliedOn', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['appliedOn'] = $appliedOn; + $this->container['type'] = $type; return $this; } /** - * Gets employee + * Gets week1Month1 * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getWeek1Month1(): ?bool { - return $this->container['employee']; + return $this->container['week1Month1']; } /** - * Sets employee + * Sets week1Month1 * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param bool|null $week1Month1 week1Month1 * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setWeek1Month1(?bool $week1Month1): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($week1Month1)) { + array_push($this->openAPINullablesSetToNull, 'week1Month1'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('week1Month1', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employee'] = $employee; + $this->container['week1Month1'] = $week1Month1; return $this; } /** - * Gets id + * Gets worksNumber * * @return string|null */ - public function getId(): ?string + public function getWorksNumber(): ?string { - return $this->container['id']; + return $this->container['worksNumber']; } /** - * Sets id + * Sets worksNumber * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $worksNumber worksNumber * * @return $this */ - public function setId(?string $id): static + public function setWorksNumber(?string $worksNumber): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($worksNumber)) { + array_push($this->openAPINullablesSetToNull, 'worksNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('worksNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['worksNumber'] = $worksNumber; return $this; } diff --git a/src/Model/DpsSettings.php b/src/Model/DpsSettings.php index d8c06a5..18bff95 100644 --- a/src/Model/DpsSettings.php +++ b/src/Model/DpsSettings.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,11 +60,11 @@ class DpsSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'enabled' => 'bool', - 'retrieveFrom' => '\DateTime', 'autoApply' => 'bool', + 'enabled' => 'bool', + 'error' => 'string', 'lastChecked' => '\DateTime', - 'error' => 'string' + 'retrieveFrom' => '\DateTime' ]; /** @@ -73,11 +73,11 @@ class DpsSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'enabled' => null, - 'retrieveFrom' => 'date', 'autoApply' => null, + 'enabled' => null, + 'error' => null, 'lastChecked' => 'date', - 'error' => null + 'retrieveFrom' => 'date' ]; /** @@ -86,11 +86,11 @@ class DpsSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'enabled' => false, - 'retrieveFrom' => false, 'autoApply' => false, + 'enabled' => false, + 'error' => true, 'lastChecked' => true, - 'error' => true + 'retrieveFrom' => false ]; /** @@ -179,11 +179,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'enabled' => 'enabled', - 'retrieveFrom' => 'retrieveFrom', 'autoApply' => 'autoApply', + 'enabled' => 'enabled', + 'error' => 'error', 'lastChecked' => 'lastChecked', - 'error' => 'error' + 'retrieveFrom' => 'retrieveFrom' ]; /** @@ -192,11 +192,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'enabled' => 'setEnabled', - 'retrieveFrom' => 'setRetrieveFrom', 'autoApply' => 'setAutoApply', + 'enabled' => 'setEnabled', + 'error' => 'setError', 'lastChecked' => 'setLastChecked', - 'error' => 'setError' + 'retrieveFrom' => 'setRetrieveFrom' ]; /** @@ -205,11 +205,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'enabled' => 'getEnabled', - 'retrieveFrom' => 'getRetrieveFrom', 'autoApply' => 'getAutoApply', + 'enabled' => 'getEnabled', + 'error' => 'getError', 'lastChecked' => 'getLastChecked', - 'error' => 'getError' + 'retrieveFrom' => 'getRetrieveFrom' ]; /** @@ -268,11 +268,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('enabled', $data ?? [], null); - $this->setIfExists('retrieveFrom', $data ?? [], null); $this->setIfExists('autoApply', $data ?? [], null); - $this->setIfExists('lastChecked', $data ?? [], null); + $this->setIfExists('enabled', $data ?? [], null); $this->setIfExists('error', $data ?? [], null); + $this->setIfExists('lastChecked', $data ?? [], null); + $this->setIfExists('retrieveFrom', $data ?? [], null); } /** @@ -318,82 +318,89 @@ public function valid(): bool /** - * Gets enabled + * Gets autoApply * * @return bool|null */ - public function getEnabled(): ?bool + public function getAutoApply(): ?bool { - return $this->container['enabled']; + return $this->container['autoApply']; } /** - * Sets enabled + * Sets autoApply * - * @param bool|null $enabled If enabled, we'll automatically retrieve DPS notices from HMRC for you + * @param bool|null $autoApply If enabled, we'll automatically apply DPSNotices before starting a payrun that covers the EffectiveDate * * @return $this */ - public function setEnabled(?bool $enabled): static + public function setAutoApply(?bool $autoApply): static { - if (is_null($enabled)) { - throw new InvalidArgumentException('non-nullable enabled cannot be null'); + if (is_null($autoApply)) { + throw new InvalidArgumentException('non-nullable autoApply cannot be null'); } - $this->container['enabled'] = $enabled; + $this->container['autoApply'] = $autoApply; return $this; } /** - * Gets retrieveFrom + * Gets enabled * - * @return \DateTime|null + * @return bool|null */ - public function getRetrieveFrom(): ?\DateTime + public function getEnabled(): ?bool { - return $this->container['retrieveFrom']; + return $this->container['enabled']; } /** - * Sets retrieveFrom + * Sets enabled * - * @param \DateTime|null $retrieveFrom The date from which notices should be retrieved + * @param bool|null $enabled If enabled, we'll automatically retrieve DPS notices from HMRC for you * * @return $this */ - public function setRetrieveFrom(?\DateTime $retrieveFrom): static + public function setEnabled(?bool $enabled): static { - if (is_null($retrieveFrom)) { - throw new InvalidArgumentException('non-nullable retrieveFrom cannot be null'); + if (is_null($enabled)) { + throw new InvalidArgumentException('non-nullable enabled cannot be null'); } - $this->container['retrieveFrom'] = $retrieveFrom; + $this->container['enabled'] = $enabled; return $this; } /** - * Gets autoApply + * Gets error * - * @return bool|null + * @return string|null */ - public function getAutoApply(): ?bool + public function getError(): ?string { - return $this->container['autoApply']; + return $this->container['error']; } /** - * Sets autoApply + * Sets error * - * @param bool|null $autoApply If enabled, we'll automatically apply DPSNotices before starting a payrun that covers the EffectiveDate + * @param string|null $error [readonly] If we received an error from HMRC when checking for notices, it'll be displayed here * * @return $this */ - public function setAutoApply(?bool $autoApply): static + public function setError(?string $error): static { - if (is_null($autoApply)) { - throw new InvalidArgumentException('non-nullable autoApply cannot be null'); + if (is_null($error)) { + array_push($this->openAPINullablesSetToNull, 'error'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('error', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['autoApply'] = $autoApply; + $this->container['error'] = $error; return $this; } @@ -433,35 +440,28 @@ public function setLastChecked(?\DateTime $lastChecked): static } /** - * Gets error + * Gets retrieveFrom * - * @return string|null + * @return \DateTime|null */ - public function getError(): ?string + public function getRetrieveFrom(): ?\DateTime { - return $this->container['error']; + return $this->container['retrieveFrom']; } /** - * Sets error + * Sets retrieveFrom * - * @param string|null $error [readonly] If we received an error from HMRC when checking for notices, it'll be displayed here + * @param \DateTime|null $retrieveFrom The date from which notices should be retrieved * * @return $this */ - public function setError(?string $error): static + public function setRetrieveFrom(?\DateTime $retrieveFrom): static { - if (is_null($error)) { - array_push($this->openAPINullablesSetToNull, 'error'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('error', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($retrieveFrom)) { + throw new InvalidArgumentException('non-nullable retrieveFrom cannot be null'); } - $this->container['error'] = $error; + $this->container['retrieveFrom'] = $retrieveFrom; return $this; } diff --git a/src/Model/EmailAttachment.php b/src/Model/EmailAttachment.php index de81d37..c43a51a 100644 --- a/src/Model/EmailAttachment.php +++ b/src/Model/EmailAttachment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class EmailAttachment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'url' => 'string', 'filename' => 'string', + 'id' => 'string', 'pdfPasswordType' => '\SynergiTech\Staffology\Model\PdfPasswordType', - 'id' => 'string' + 'url' => 'string' ]; /** @@ -71,10 +71,10 @@ class EmailAttachment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'url' => null, 'filename' => null, + 'id' => 'uuid', 'pdfPasswordType' => null, - 'id' => 'uuid' + 'url' => null ]; /** @@ -83,10 +83,10 @@ class EmailAttachment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'url' => false, 'filename' => false, + 'id' => false, 'pdfPasswordType' => false, - 'id' => false + 'url' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'url' => 'url', 'filename' => 'filename', + 'id' => 'id', 'pdfPasswordType' => 'pdfPasswordType', - 'id' => 'id' + 'url' => 'url' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'url' => 'setUrl', 'filename' => 'setFilename', + 'id' => 'setId', 'pdfPasswordType' => 'setPdfPasswordType', - 'id' => 'setId' + 'url' => 'setUrl' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'url' => 'getUrl', 'filename' => 'getFilename', + 'id' => 'getId', 'pdfPasswordType' => 'getPdfPasswordType', - 'id' => 'getId' + 'url' => 'getUrl' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('url', $data ?? [], null); $this->setIfExists('filename', $data ?? [], null); - $this->setIfExists('pdfPasswordType', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('pdfPasswordType', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); } /** @@ -294,13 +294,6 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['url'] === null) { - $invalidProperties[] = "'url' can't be null"; - } - if ((mb_strlen($this->container['url']) < 1)) { - $invalidProperties[] = "invalid value for 'url', the character length must be bigger than or equal to 1."; - } - if ($this->container['filename'] === null) { $invalidProperties[] = "'filename' can't be null"; } @@ -308,6 +301,13 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'filename', the character length must be bigger than or equal to 1."; } + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; + } + if ((mb_strlen($this->container['url']) < 1)) { + $invalidProperties[] = "invalid value for 'url', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -324,65 +324,60 @@ public function valid(): bool /** - * Gets url + * Gets filename * * @return string */ - public function getUrl(): string + public function getFilename(): string { - return $this->container['url']; + return $this->container['filename']; } /** - * Sets url + * Sets filename * - * @param string $url url + * @param string $filename filename * * @return $this */ - public function setUrl(string $url): static + public function setFilename(string $filename): static { - if (is_null($url)) { - throw new InvalidArgumentException('non-nullable url cannot be null'); + if (is_null($filename)) { + throw new InvalidArgumentException('non-nullable filename cannot be null'); } - if ((mb_strlen($url) < 1)) { - throw new InvalidArgumentException('invalid length for $url when calling EmailAttachment., must be bigger than or equal to 1.'); + if ((mb_strlen($filename) < 1)) { + throw new InvalidArgumentException('invalid length for $filename when calling EmailAttachment., must be bigger than or equal to 1.'); } - $this->container['url'] = $url; + $this->container['filename'] = $filename; return $this; } /** - * Gets filename + * Gets id * - * @return string + * @return string|null */ - public function getFilename(): string + public function getId(): ?string { - return $this->container['filename']; + return $this->container['id']; } /** - * Sets filename + * Sets id * - * @param string $filename filename + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setFilename(string $filename): static + public function setId(?string $id): static { - if (is_null($filename)) { - throw new InvalidArgumentException('non-nullable filename cannot be null'); - } - - if ((mb_strlen($filename) < 1)) { - throw new InvalidArgumentException('invalid length for $filename when calling EmailAttachment., must be bigger than or equal to 1.'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - - $this->container['filename'] = $filename; + $this->container['id'] = $id; return $this; } @@ -415,28 +410,33 @@ public function setPdfPasswordType(?\SynergiTech\Staffology\Model\PdfPasswordTyp } /** - * Gets id + * Gets url * - * @return string|null + * @return string */ - public function getId(): ?string + public function getUrl(): string { - return $this->container['id']; + return $this->container['url']; } /** - * Sets id + * Sets url * - * @param string|null $id [readonly] The unique id of the object + * @param string $url url * * @return $this */ - public function setId(?string $id): static + public function setUrl(string $url): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($url)) { + throw new InvalidArgumentException('non-nullable url cannot be null'); } - $this->container['id'] = $id; + + if ((mb_strlen($url) < 1)) { + throw new InvalidArgumentException('invalid length for $url when calling EmailAttachment., must be bigger than or equal to 1.'); + } + + $this->container['url'] = $url; return $this; } diff --git a/src/Model/EmpRefs.php b/src/Model/EmpRefs.php index da32576..ce58600 100644 --- a/src/Model/EmpRefs.php +++ b/src/Model/EmpRefs.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class EmpRefs implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'officeNo' => 'string', - 'payeRef' => 'string', 'aoRef' => 'string', - 'econ' => 'string', 'cotaxRef' => 'string', + 'econ' => 'string', + 'officeNo' => 'string', + 'payeRef' => 'string', 'sautr' => 'string' ]; @@ -73,11 +73,11 @@ class EmpRefs implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'officeNo' => null, - 'payeRef' => null, 'aoRef' => null, - 'econ' => null, 'cotaxRef' => null, + 'econ' => null, + 'officeNo' => null, + 'payeRef' => null, 'sautr' => null ]; @@ -87,11 +87,11 @@ class EmpRefs implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'officeNo' => true, - 'payeRef' => true, 'aoRef' => true, - 'econ' => true, 'cotaxRef' => true, + 'econ' => true, + 'officeNo' => true, + 'payeRef' => true, 'sautr' => true ]; @@ -181,11 +181,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'officeNo' => 'officeNo', - 'payeRef' => 'payeRef', 'aoRef' => 'aoRef', - 'econ' => 'econ', 'cotaxRef' => 'cotaxRef', + 'econ' => 'econ', + 'officeNo' => 'officeNo', + 'payeRef' => 'payeRef', 'sautr' => 'sautr' ]; @@ -195,11 +195,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'officeNo' => 'setOfficeNo', - 'payeRef' => 'setPayeRef', 'aoRef' => 'setAoRef', - 'econ' => 'setEcon', 'cotaxRef' => 'setCotaxRef', + 'econ' => 'setEcon', + 'officeNo' => 'setOfficeNo', + 'payeRef' => 'setPayeRef', 'sautr' => 'setSautr' ]; @@ -209,11 +209,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'officeNo' => 'getOfficeNo', - 'payeRef' => 'getPayeRef', 'aoRef' => 'getAoRef', - 'econ' => 'getEcon', 'cotaxRef' => 'getCotaxRef', + 'econ' => 'getEcon', + 'officeNo' => 'getOfficeNo', + 'payeRef' => 'getPayeRef', 'sautr' => 'getSautr' ]; @@ -273,11 +273,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('officeNo', $data ?? [], null); - $this->setIfExists('payeRef', $data ?? [], null); $this->setIfExists('aoRef', $data ?? [], null); - $this->setIfExists('econ', $data ?? [], null); $this->setIfExists('cotaxRef', $data ?? [], null); + $this->setIfExists('econ', $data ?? [], null); + $this->setIfExists('officeNo', $data ?? [], null); + $this->setIfExists('payeRef', $data ?? [], null); $this->setIfExists('sautr', $data ?? [], null); } @@ -324,171 +324,171 @@ public function valid(): bool /** - * Gets officeNo + * Gets aoRef * * @return string|null */ - public function getOfficeNo(): ?string + public function getAoRef(): ?string { - return $this->container['officeNo']; + return $this->container['aoRef']; } /** - * Sets officeNo + * Sets aoRef * - * @param string|null $officeNo officeNo + * @param string|null $aoRef aoRef * * @return $this */ - public function setOfficeNo(?string $officeNo): static + public function setAoRef(?string $aoRef): static { - if (is_null($officeNo)) { - array_push($this->openAPINullablesSetToNull, 'officeNo'); + if (is_null($aoRef)) { + array_push($this->openAPINullablesSetToNull, 'aoRef'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('officeNo', $nullablesSetToNull); + $index = array_search('aoRef', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['officeNo'] = $officeNo; + $this->container['aoRef'] = $aoRef; return $this; } /** - * Gets payeRef + * Gets cotaxRef * * @return string|null */ - public function getPayeRef(): ?string + public function getCotaxRef(): ?string { - return $this->container['payeRef']; + return $this->container['cotaxRef']; } /** - * Sets payeRef + * Sets cotaxRef * - * @param string|null $payeRef payeRef + * @param string|null $cotaxRef cotaxRef * * @return $this */ - public function setPayeRef(?string $payeRef): static + public function setCotaxRef(?string $cotaxRef): static { - if (is_null($payeRef)) { - array_push($this->openAPINullablesSetToNull, 'payeRef'); + if (is_null($cotaxRef)) { + array_push($this->openAPINullablesSetToNull, 'cotaxRef'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payeRef', $nullablesSetToNull); + $index = array_search('cotaxRef', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payeRef'] = $payeRef; + $this->container['cotaxRef'] = $cotaxRef; return $this; } /** - * Gets aoRef + * Gets econ * * @return string|null */ - public function getAoRef(): ?string + public function getEcon(): ?string { - return $this->container['aoRef']; + return $this->container['econ']; } /** - * Sets aoRef + * Sets econ * - * @param string|null $aoRef aoRef + * @param string|null $econ econ * * @return $this */ - public function setAoRef(?string $aoRef): static + public function setEcon(?string $econ): static { - if (is_null($aoRef)) { - array_push($this->openAPINullablesSetToNull, 'aoRef'); + if (is_null($econ)) { + array_push($this->openAPINullablesSetToNull, 'econ'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aoRef', $nullablesSetToNull); + $index = array_search('econ', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['aoRef'] = $aoRef; + $this->container['econ'] = $econ; return $this; } /** - * Gets econ + * Gets officeNo * * @return string|null */ - public function getEcon(): ?string + public function getOfficeNo(): ?string { - return $this->container['econ']; + return $this->container['officeNo']; } /** - * Sets econ + * Sets officeNo * - * @param string|null $econ econ + * @param string|null $officeNo officeNo * * @return $this */ - public function setEcon(?string $econ): static + public function setOfficeNo(?string $officeNo): static { - if (is_null($econ)) { - array_push($this->openAPINullablesSetToNull, 'econ'); + if (is_null($officeNo)) { + array_push($this->openAPINullablesSetToNull, 'officeNo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('econ', $nullablesSetToNull); + $index = array_search('officeNo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['econ'] = $econ; + $this->container['officeNo'] = $officeNo; return $this; } /** - * Gets cotaxRef + * Gets payeRef * * @return string|null */ - public function getCotaxRef(): ?string + public function getPayeRef(): ?string { - return $this->container['cotaxRef']; + return $this->container['payeRef']; } /** - * Sets cotaxRef + * Sets payeRef * - * @param string|null $cotaxRef cotaxRef + * @param string|null $payeRef payeRef * * @return $this */ - public function setCotaxRef(?string $cotaxRef): static + public function setPayeRef(?string $payeRef): static { - if (is_null($cotaxRef)) { - array_push($this->openAPINullablesSetToNull, 'cotaxRef'); + if (is_null($payeRef)) { + array_push($this->openAPINullablesSetToNull, 'payeRef'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cotaxRef', $nullablesSetToNull); + $index = array_search('payeRef', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cotaxRef'] = $cotaxRef; + $this->container['payeRef'] = $payeRef; return $this; } diff --git a/src/Model/Employee.php b/src/Model/Employee.php index ffd92fb..dd59a22 100644 --- a/src/Model/Employee.php +++ b/src/Model/Employee.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,22 +59,26 @@ class Employee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'holidaySchemeUniqueId' => 'string', + 'aeNotEnroledWarning' => 'bool', 'aggregatedServiceDate' => '\DateTime', - 'leaveHolidayAccrualDefaultRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', - 'id' => 'string', - 'personalDetails' => '\SynergiTech\Staffology\Model\PersonalDetails', - 'employmentDetails' => '\SynergiTech\Staffology\Model\EmploymentDetails', 'autoEnrolment' => '\SynergiTech\Staffology\Model\AutoEnrolment', - 'leaveSettings' => '\SynergiTech\Staffology\Model\LeaveSettings', - 'rightToWork' => '\SynergiTech\Staffology\Model\RightToWork', 'bankDetails' => '\SynergiTech\Staffology\Model\BankDetails', - 'tags' => 'string[]', + 'defaultPensionSchemeName' => 'string', + 'defaultPensionSchemeUniqueId' => 'string', + 'defaultWorkerGroupName' => 'string', + 'defaultWorkerGroupUniqueId' => 'string', + 'employmentDetails' => '\SynergiTech\Staffology\Model\EmploymentDetails', + 'evcId' => 'string', + 'holidaySchemeUniqueId' => 'string', + 'id' => 'string', + 'leaveHolidayAccrualDefaultRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', + 'leaveSettings' => '\SynergiTech\Staffology\Model\LeaveSettings', 'payOptions' => '\SynergiTech\Staffology\Model\PayOptions', - 'status' => '\SynergiTech\Staffology\Model\EmployeeStatus', - 'aeNotEnroledWarning' => 'bool', + 'personalDetails' => '\SynergiTech\Staffology\Model\PersonalDetails', + 'rightToWork' => '\SynergiTech\Staffology\Model\RightToWork', 'sourceSystemId' => 'string', - 'evcId' => 'string' + 'status' => '\SynergiTech\Staffology\Model\EmployeeStatus', + 'tags' => 'string[]' ]; /** @@ -83,22 +87,26 @@ class Employee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'holidaySchemeUniqueId' => 'uuid', + 'aeNotEnroledWarning' => null, 'aggregatedServiceDate' => 'date', - 'leaveHolidayAccrualDefaultRateType' => null, - 'id' => 'uuid', - 'personalDetails' => null, - 'employmentDetails' => null, 'autoEnrolment' => null, - 'leaveSettings' => null, - 'rightToWork' => null, 'bankDetails' => null, - 'tags' => null, + 'defaultPensionSchemeName' => null, + 'defaultPensionSchemeUniqueId' => 'uuid', + 'defaultWorkerGroupName' => null, + 'defaultWorkerGroupUniqueId' => 'uuid', + 'employmentDetails' => null, + 'evcId' => 'uuid', + 'holidaySchemeUniqueId' => 'uuid', + 'id' => 'uuid', + 'leaveHolidayAccrualDefaultRateType' => null, + 'leaveSettings' => null, 'payOptions' => null, - 'status' => null, - 'aeNotEnroledWarning' => null, + 'personalDetails' => null, + 'rightToWork' => null, 'sourceSystemId' => null, - 'evcId' => 'uuid' + 'status' => null, + 'tags' => null ]; /** @@ -107,22 +115,26 @@ class Employee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'holidaySchemeUniqueId' => true, + 'aeNotEnroledWarning' => false, 'aggregatedServiceDate' => true, - 'leaveHolidayAccrualDefaultRateType' => false, - 'id' => false, - 'personalDetails' => false, - 'employmentDetails' => false, 'autoEnrolment' => false, - 'leaveSettings' => false, - 'rightToWork' => false, 'bankDetails' => false, - 'tags' => true, + 'defaultPensionSchemeName' => true, + 'defaultPensionSchemeUniqueId' => true, + 'defaultWorkerGroupName' => true, + 'defaultWorkerGroupUniqueId' => true, + 'employmentDetails' => false, + 'evcId' => true, + 'holidaySchemeUniqueId' => true, + 'id' => false, + 'leaveHolidayAccrualDefaultRateType' => false, + 'leaveSettings' => false, 'payOptions' => false, - 'status' => false, - 'aeNotEnroledWarning' => false, + 'personalDetails' => false, + 'rightToWork' => false, 'sourceSystemId' => true, - 'evcId' => true + 'status' => false, + 'tags' => true ]; /** @@ -211,22 +223,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'holidaySchemeUniqueId' => 'holidaySchemeUniqueId', + 'aeNotEnroledWarning' => 'aeNotEnroledWarning', 'aggregatedServiceDate' => 'aggregatedServiceDate', - 'leaveHolidayAccrualDefaultRateType' => 'leaveHolidayAccrualDefaultRateType', - 'id' => 'id', - 'personalDetails' => 'personalDetails', - 'employmentDetails' => 'employmentDetails', 'autoEnrolment' => 'autoEnrolment', - 'leaveSettings' => 'leaveSettings', - 'rightToWork' => 'rightToWork', 'bankDetails' => 'bankDetails', - 'tags' => 'tags', + 'defaultPensionSchemeName' => 'defaultPensionSchemeName', + 'defaultPensionSchemeUniqueId' => 'defaultPensionSchemeUniqueId', + 'defaultWorkerGroupName' => 'defaultWorkerGroupName', + 'defaultWorkerGroupUniqueId' => 'defaultWorkerGroupUniqueId', + 'employmentDetails' => 'employmentDetails', + 'evcId' => 'evcId', + 'holidaySchemeUniqueId' => 'holidaySchemeUniqueId', + 'id' => 'id', + 'leaveHolidayAccrualDefaultRateType' => 'leaveHolidayAccrualDefaultRateType', + 'leaveSettings' => 'leaveSettings', 'payOptions' => 'payOptions', - 'status' => 'status', - 'aeNotEnroledWarning' => 'aeNotEnroledWarning', + 'personalDetails' => 'personalDetails', + 'rightToWork' => 'rightToWork', 'sourceSystemId' => 'sourceSystemId', - 'evcId' => 'evcId' + 'status' => 'status', + 'tags' => 'tags' ]; /** @@ -235,22 +251,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'holidaySchemeUniqueId' => 'setHolidaySchemeUniqueId', + 'aeNotEnroledWarning' => 'setAeNotEnroledWarning', 'aggregatedServiceDate' => 'setAggregatedServiceDate', - 'leaveHolidayAccrualDefaultRateType' => 'setLeaveHolidayAccrualDefaultRateType', - 'id' => 'setId', - 'personalDetails' => 'setPersonalDetails', - 'employmentDetails' => 'setEmploymentDetails', 'autoEnrolment' => 'setAutoEnrolment', - 'leaveSettings' => 'setLeaveSettings', - 'rightToWork' => 'setRightToWork', 'bankDetails' => 'setBankDetails', - 'tags' => 'setTags', + 'defaultPensionSchemeName' => 'setDefaultPensionSchemeName', + 'defaultPensionSchemeUniqueId' => 'setDefaultPensionSchemeUniqueId', + 'defaultWorkerGroupName' => 'setDefaultWorkerGroupName', + 'defaultWorkerGroupUniqueId' => 'setDefaultWorkerGroupUniqueId', + 'employmentDetails' => 'setEmploymentDetails', + 'evcId' => 'setEvcId', + 'holidaySchemeUniqueId' => 'setHolidaySchemeUniqueId', + 'id' => 'setId', + 'leaveHolidayAccrualDefaultRateType' => 'setLeaveHolidayAccrualDefaultRateType', + 'leaveSettings' => 'setLeaveSettings', 'payOptions' => 'setPayOptions', - 'status' => 'setStatus', - 'aeNotEnroledWarning' => 'setAeNotEnroledWarning', + 'personalDetails' => 'setPersonalDetails', + 'rightToWork' => 'setRightToWork', 'sourceSystemId' => 'setSourceSystemId', - 'evcId' => 'setEvcId' + 'status' => 'setStatus', + 'tags' => 'setTags' ]; /** @@ -259,22 +279,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'holidaySchemeUniqueId' => 'getHolidaySchemeUniqueId', + 'aeNotEnroledWarning' => 'getAeNotEnroledWarning', 'aggregatedServiceDate' => 'getAggregatedServiceDate', - 'leaveHolidayAccrualDefaultRateType' => 'getLeaveHolidayAccrualDefaultRateType', - 'id' => 'getId', - 'personalDetails' => 'getPersonalDetails', - 'employmentDetails' => 'getEmploymentDetails', 'autoEnrolment' => 'getAutoEnrolment', - 'leaveSettings' => 'getLeaveSettings', - 'rightToWork' => 'getRightToWork', 'bankDetails' => 'getBankDetails', - 'tags' => 'getTags', + 'defaultPensionSchemeName' => 'getDefaultPensionSchemeName', + 'defaultPensionSchemeUniqueId' => 'getDefaultPensionSchemeUniqueId', + 'defaultWorkerGroupName' => 'getDefaultWorkerGroupName', + 'defaultWorkerGroupUniqueId' => 'getDefaultWorkerGroupUniqueId', + 'employmentDetails' => 'getEmploymentDetails', + 'evcId' => 'getEvcId', + 'holidaySchemeUniqueId' => 'getHolidaySchemeUniqueId', + 'id' => 'getId', + 'leaveHolidayAccrualDefaultRateType' => 'getLeaveHolidayAccrualDefaultRateType', + 'leaveSettings' => 'getLeaveSettings', 'payOptions' => 'getPayOptions', - 'status' => 'getStatus', - 'aeNotEnroledWarning' => 'getAeNotEnroledWarning', + 'personalDetails' => 'getPersonalDetails', + 'rightToWork' => 'getRightToWork', 'sourceSystemId' => 'getSourceSystemId', - 'evcId' => 'getEvcId' + 'status' => 'getStatus', + 'tags' => 'getTags' ]; /** @@ -333,22 +357,26 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('holidaySchemeUniqueId', $data ?? [], null); + $this->setIfExists('aeNotEnroledWarning', $data ?? [], null); $this->setIfExists('aggregatedServiceDate', $data ?? [], null); - $this->setIfExists('leaveHolidayAccrualDefaultRateType', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('personalDetails', $data ?? [], null); - $this->setIfExists('employmentDetails', $data ?? [], null); $this->setIfExists('autoEnrolment', $data ?? [], null); - $this->setIfExists('leaveSettings', $data ?? [], null); - $this->setIfExists('rightToWork', $data ?? [], null); $this->setIfExists('bankDetails', $data ?? [], null); - $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('defaultPensionSchemeName', $data ?? [], null); + $this->setIfExists('defaultPensionSchemeUniqueId', $data ?? [], null); + $this->setIfExists('defaultWorkerGroupName', $data ?? [], null); + $this->setIfExists('defaultWorkerGroupUniqueId', $data ?? [], null); + $this->setIfExists('employmentDetails', $data ?? [], null); + $this->setIfExists('evcId', $data ?? [], null); + $this->setIfExists('holidaySchemeUniqueId', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('leaveHolidayAccrualDefaultRateType', $data ?? [], null); + $this->setIfExists('leaveSettings', $data ?? [], null); $this->setIfExists('payOptions', $data ?? [], null); - $this->setIfExists('status', $data ?? [], null); - $this->setIfExists('aeNotEnroledWarning', $data ?? [], null); + $this->setIfExists('personalDetails', $data ?? [], null); + $this->setIfExists('rightToWork', $data ?? [], null); $this->setIfExists('sourceSystemId', $data ?? [], null); - $this->setIfExists('evcId', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); } /** @@ -398,35 +426,28 @@ public function valid(): bool /** - * Gets holidaySchemeUniqueId + * Gets aeNotEnroledWarning * - * @return string|null + * @return bool|null */ - public function getHolidaySchemeUniqueId(): ?string + public function getAeNotEnroledWarning(): ?bool { - return $this->container['holidaySchemeUniqueId']; + return $this->container['aeNotEnroledWarning']; } /** - * Sets holidaySchemeUniqueId + * Sets aeNotEnroledWarning * - * @param string|null $holidaySchemeUniqueId holidaySchemeUniqueId + * @param bool|null $aeNotEnroledWarning [readonly] If true then the employee should be enrolled in an Auto Enrolment Qualifying pension but isn't * * @return $this */ - public function setHolidaySchemeUniqueId(?string $holidaySchemeUniqueId): static + public function setAeNotEnroledWarning(?bool $aeNotEnroledWarning): static { - if (is_null($holidaySchemeUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'holidaySchemeUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('holidaySchemeUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($aeNotEnroledWarning)) { + throw new InvalidArgumentException('non-nullable aeNotEnroledWarning cannot be null'); } - $this->container['holidaySchemeUniqueId'] = $holidaySchemeUniqueId; + $this->container['aeNotEnroledWarning'] = $aeNotEnroledWarning; return $this; } @@ -466,82 +487,191 @@ public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): sta } /** - * Gets leaveHolidayAccrualDefaultRateType + * Gets autoEnrolment * - * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null + * @return \SynergiTech\Staffology\Model\AutoEnrolment|null */ - public function getLeaveHolidayAccrualDefaultRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType + public function getAutoEnrolment(): ?\SynergiTech\Staffology\Model\AutoEnrolment { - return $this->container['leaveHolidayAccrualDefaultRateType']; + return $this->container['autoEnrolment']; } /** - * Sets leaveHolidayAccrualDefaultRateType + * Sets autoEnrolment * - * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $leaveHolidayAccrualDefaultRateType leaveHolidayAccrualDefaultRateType + * @param \SynergiTech\Staffology\Model\AutoEnrolment|null $autoEnrolment autoEnrolment * * @return $this */ - public function setLeaveHolidayAccrualDefaultRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $leaveHolidayAccrualDefaultRateType): static + public function setAutoEnrolment(?\SynergiTech\Staffology\Model\AutoEnrolment $autoEnrolment): static { - if (is_null($leaveHolidayAccrualDefaultRateType)) { - throw new InvalidArgumentException('non-nullable leaveHolidayAccrualDefaultRateType cannot be null'); + if (is_null($autoEnrolment)) { + throw new InvalidArgumentException('non-nullable autoEnrolment cannot be null'); } - $this->container['leaveHolidayAccrualDefaultRateType'] = $leaveHolidayAccrualDefaultRateType; + $this->container['autoEnrolment'] = $autoEnrolment; return $this; } /** - * Gets id + * Gets bankDetails + * + * @return \SynergiTech\Staffology\Model\BankDetails|null + */ + public function getBankDetails(): ?\SynergiTech\Staffology\Model\BankDetails + { + return $this->container['bankDetails']; + } + + /** + * Sets bankDetails + * + * @param \SynergiTech\Staffology\Model\BankDetails|null $bankDetails bankDetails + * + * @return $this + */ + public function setBankDetails(?\SynergiTech\Staffology\Model\BankDetails $bankDetails): static + { + if (is_null($bankDetails)) { + throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); + } + $this->container['bankDetails'] = $bankDetails; + + return $this; + } + + /** + * Gets defaultPensionSchemeName * * @return string|null */ - public function getId(): ?string + public function getDefaultPensionSchemeName(): ?string { - return $this->container['id']; + return $this->container['defaultPensionSchemeName']; } /** - * Sets id + * Sets defaultPensionSchemeName * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $defaultPensionSchemeName defaultPensionSchemeName * * @return $this */ - public function setId(?string $id): static + public function setDefaultPensionSchemeName(?string $defaultPensionSchemeName): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($defaultPensionSchemeName)) { + array_push($this->openAPINullablesSetToNull, 'defaultPensionSchemeName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultPensionSchemeName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['defaultPensionSchemeName'] = $defaultPensionSchemeName; return $this; } /** - * Gets personalDetails + * Gets defaultPensionSchemeUniqueId * - * @return \SynergiTech\Staffology\Model\PersonalDetails|null + * @return string|null */ - public function getPersonalDetails(): ?\SynergiTech\Staffology\Model\PersonalDetails + public function getDefaultPensionSchemeUniqueId(): ?string { - return $this->container['personalDetails']; + return $this->container['defaultPensionSchemeUniqueId']; } /** - * Sets personalDetails + * Sets defaultPensionSchemeUniqueId * - * @param \SynergiTech\Staffology\Model\PersonalDetails|null $personalDetails personalDetails + * @param string|null $defaultPensionSchemeUniqueId defaultPensionSchemeUniqueId * * @return $this */ - public function setPersonalDetails(?\SynergiTech\Staffology\Model\PersonalDetails $personalDetails): static + public function setDefaultPensionSchemeUniqueId(?string $defaultPensionSchemeUniqueId): static { - if (is_null($personalDetails)) { - throw new InvalidArgumentException('non-nullable personalDetails cannot be null'); + if (is_null($defaultPensionSchemeUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'defaultPensionSchemeUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultPensionSchemeUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['personalDetails'] = $personalDetails; + $this->container['defaultPensionSchemeUniqueId'] = $defaultPensionSchemeUniqueId; + + return $this; + } + + /** + * Gets defaultWorkerGroupName + * + * @return string|null + */ + public function getDefaultWorkerGroupName(): ?string + { + return $this->container['defaultWorkerGroupName']; + } + + /** + * Sets defaultWorkerGroupName + * + * @param string|null $defaultWorkerGroupName defaultWorkerGroupName + * + * @return $this + */ + public function setDefaultWorkerGroupName(?string $defaultWorkerGroupName): static + { + if (is_null($defaultWorkerGroupName)) { + array_push($this->openAPINullablesSetToNull, 'defaultWorkerGroupName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultWorkerGroupName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['defaultWorkerGroupName'] = $defaultWorkerGroupName; + + return $this; + } + + /** + * Gets defaultWorkerGroupUniqueId + * + * @return string|null + */ + public function getDefaultWorkerGroupUniqueId(): ?string + { + return $this->container['defaultWorkerGroupUniqueId']; + } + + /** + * Sets defaultWorkerGroupUniqueId + * + * @param string|null $defaultWorkerGroupUniqueId defaultWorkerGroupUniqueId + * + * @return $this + */ + public function setDefaultWorkerGroupUniqueId(?string $defaultWorkerGroupUniqueId): static + { + if (is_null($defaultWorkerGroupUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'defaultWorkerGroupUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultWorkerGroupUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['defaultWorkerGroupUniqueId'] = $defaultWorkerGroupUniqueId; return $this; } @@ -574,143 +704,150 @@ public function setEmploymentDetails(?\SynergiTech\Staffology\Model\EmploymentDe } /** - * Gets autoEnrolment + * Gets evcId * - * @return \SynergiTech\Staffology\Model\AutoEnrolment|null + * @return string|null */ - public function getAutoEnrolment(): ?\SynergiTech\Staffology\Model\AutoEnrolment + public function getEvcId(): ?string { - return $this->container['autoEnrolment']; + return $this->container['evcId']; } /** - * Sets autoEnrolment + * Sets evcId * - * @param \SynergiTech\Staffology\Model\AutoEnrolment|null $autoEnrolment autoEnrolment + * @param string|null $evcId If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. * * @return $this */ - public function setAutoEnrolment(?\SynergiTech\Staffology\Model\AutoEnrolment $autoEnrolment): static + public function setEvcId(?string $evcId): static { - if (is_null($autoEnrolment)) { - throw new InvalidArgumentException('non-nullable autoEnrolment cannot be null'); + if (is_null($evcId)) { + array_push($this->openAPINullablesSetToNull, 'evcId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('evcId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['autoEnrolment'] = $autoEnrolment; + $this->container['evcId'] = $evcId; return $this; } /** - * Gets leaveSettings + * Gets holidaySchemeUniqueId * - * @return \SynergiTech\Staffology\Model\LeaveSettings|null + * @return string|null */ - public function getLeaveSettings(): ?\SynergiTech\Staffology\Model\LeaveSettings + public function getHolidaySchemeUniqueId(): ?string { - return $this->container['leaveSettings']; + return $this->container['holidaySchemeUniqueId']; } /** - * Sets leaveSettings + * Sets holidaySchemeUniqueId * - * @param \SynergiTech\Staffology\Model\LeaveSettings|null $leaveSettings leaveSettings + * @param string|null $holidaySchemeUniqueId holidaySchemeUniqueId * * @return $this */ - public function setLeaveSettings(?\SynergiTech\Staffology\Model\LeaveSettings $leaveSettings): static + public function setHolidaySchemeUniqueId(?string $holidaySchemeUniqueId): static { - if (is_null($leaveSettings)) { - throw new InvalidArgumentException('non-nullable leaveSettings cannot be null'); + if (is_null($holidaySchemeUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'holidaySchemeUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('holidaySchemeUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['leaveSettings'] = $leaveSettings; + $this->container['holidaySchemeUniqueId'] = $holidaySchemeUniqueId; return $this; } /** - * Gets rightToWork + * Gets id * - * @return \SynergiTech\Staffology\Model\RightToWork|null + * @return string|null */ - public function getRightToWork(): ?\SynergiTech\Staffology\Model\RightToWork + public function getId(): ?string { - return $this->container['rightToWork']; + return $this->container['id']; } /** - * Sets rightToWork + * Sets id * - * @param \SynergiTech\Staffology\Model\RightToWork|null $rightToWork rightToWork + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setRightToWork(?\SynergiTech\Staffology\Model\RightToWork $rightToWork): static + public function setId(?string $id): static { - if (is_null($rightToWork)) { - throw new InvalidArgumentException('non-nullable rightToWork cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['rightToWork'] = $rightToWork; + $this->container['id'] = $id; return $this; } /** - * Gets bankDetails + * Gets leaveHolidayAccrualDefaultRateType * - * @return \SynergiTech\Staffology\Model\BankDetails|null + * @return \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null */ - public function getBankDetails(): ?\SynergiTech\Staffology\Model\BankDetails + public function getLeaveHolidayAccrualDefaultRateType(): ?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType { - return $this->container['bankDetails']; + return $this->container['leaveHolidayAccrualDefaultRateType']; } /** - * Sets bankDetails + * Sets leaveHolidayAccrualDefaultRateType * - * @param \SynergiTech\Staffology\Model\BankDetails|null $bankDetails bankDetails + * @param \SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType|null $leaveHolidayAccrualDefaultRateType leaveHolidayAccrualDefaultRateType * * @return $this */ - public function setBankDetails(?\SynergiTech\Staffology\Model\BankDetails $bankDetails): static + public function setLeaveHolidayAccrualDefaultRateType(?\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType $leaveHolidayAccrualDefaultRateType): static { - if (is_null($bankDetails)) { - throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); + if (is_null($leaveHolidayAccrualDefaultRateType)) { + throw new InvalidArgumentException('non-nullable leaveHolidayAccrualDefaultRateType cannot be null'); } - $this->container['bankDetails'] = $bankDetails; + $this->container['leaveHolidayAccrualDefaultRateType'] = $leaveHolidayAccrualDefaultRateType; return $this; } /** - * Gets tags + * Gets leaveSettings * - * @return string[]|null + * @return \SynergiTech\Staffology\Model\LeaveSettings|null */ - public function getTags(): ?array + public function getLeaveSettings(): ?\SynergiTech\Staffology\Model\LeaveSettings { - return $this->container['tags']; + return $this->container['leaveSettings']; } /** - * Sets tags + * Sets leaveSettings * - * @param string[]|null $tags tags + * @param \SynergiTech\Staffology\Model\LeaveSettings|null $leaveSettings leaveSettings * * @return $this */ - public function setTags(?array $tags): static + public function setLeaveSettings(?\SynergiTech\Staffology\Model\LeaveSettings $leaveSettings): static { - if (is_null($tags)) { - array_push($this->openAPINullablesSetToNull, 'tags'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tags', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($leaveSettings)) { + throw new InvalidArgumentException('non-nullable leaveSettings cannot be null'); } - $this->container['tags'] = $tags; + $this->container['leaveSettings'] = $leaveSettings; return $this; } @@ -743,55 +880,55 @@ public function setPayOptions(?\SynergiTech\Staffology\Model\PayOptions $payOpti } /** - * Gets status + * Gets personalDetails * - * @return \SynergiTech\Staffology\Model\EmployeeStatus|null + * @return \SynergiTech\Staffology\Model\PersonalDetails|null */ - public function getStatus(): ?\SynergiTech\Staffology\Model\EmployeeStatus + public function getPersonalDetails(): ?\SynergiTech\Staffology\Model\PersonalDetails { - return $this->container['status']; + return $this->container['personalDetails']; } /** - * Sets status + * Sets personalDetails * - * @param \SynergiTech\Staffology\Model\EmployeeStatus|null $status status + * @param \SynergiTech\Staffology\Model\PersonalDetails|null $personalDetails personalDetails * * @return $this */ - public function setStatus(?\SynergiTech\Staffology\Model\EmployeeStatus $status): static + public function setPersonalDetails(?\SynergiTech\Staffology\Model\PersonalDetails $personalDetails): static { - if (is_null($status)) { - throw new InvalidArgumentException('non-nullable status cannot be null'); + if (is_null($personalDetails)) { + throw new InvalidArgumentException('non-nullable personalDetails cannot be null'); } - $this->container['status'] = $status; + $this->container['personalDetails'] = $personalDetails; return $this; } /** - * Gets aeNotEnroledWarning + * Gets rightToWork * - * @return bool|null + * @return \SynergiTech\Staffology\Model\RightToWork|null */ - public function getAeNotEnroledWarning(): ?bool + public function getRightToWork(): ?\SynergiTech\Staffology\Model\RightToWork { - return $this->container['aeNotEnroledWarning']; + return $this->container['rightToWork']; } /** - * Sets aeNotEnroledWarning + * Sets rightToWork * - * @param bool|null $aeNotEnroledWarning [readonly] If true then the employee should be enrolled in an Auto Enrolment Qualifying pension but isn't + * @param \SynergiTech\Staffology\Model\RightToWork|null $rightToWork rightToWork * * @return $this */ - public function setAeNotEnroledWarning(?bool $aeNotEnroledWarning): static + public function setRightToWork(?\SynergiTech\Staffology\Model\RightToWork $rightToWork): static { - if (is_null($aeNotEnroledWarning)) { - throw new InvalidArgumentException('non-nullable aeNotEnroledWarning cannot be null'); + if (is_null($rightToWork)) { + throw new InvalidArgumentException('non-nullable rightToWork cannot be null'); } - $this->container['aeNotEnroledWarning'] = $aeNotEnroledWarning; + $this->container['rightToWork'] = $rightToWork; return $this; } @@ -835,35 +972,62 @@ public function setSourceSystemId(?string $sourceSystemId): static } /** - * Gets evcId + * Gets status * - * @return string|null + * @return \SynergiTech\Staffology\Model\EmployeeStatus|null */ - public function getEvcId(): ?string + public function getStatus(): ?\SynergiTech\Staffology\Model\EmployeeStatus { - return $this->container['evcId']; + return $this->container['status']; } /** - * Sets evcId + * Sets status * - * @param string|null $evcId If set then this will be used as the EmployeeIDFromProduct sent to EVC in place of the standard EmployeeId. + * @param \SynergiTech\Staffology\Model\EmployeeStatus|null $status status * * @return $this */ - public function setEvcId(?string $evcId): static + public function setStatus(?\SynergiTech\Staffology\Model\EmployeeStatus $status): static { - if (is_null($evcId)) { - array_push($this->openAPINullablesSetToNull, 'evcId'); + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets tags + * + * @return string[]|null + */ + public function getTags(): ?array + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags tags + * + * @return $this + */ + public function setTags(?array $tags): static + { + if (is_null($tags)) { + array_push($this->openAPINullablesSetToNull, 'tags'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('evcId', $nullablesSetToNull); + $index = array_search('tags', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['evcId'] = $evcId; + $this->container['tags'] = $tags; return $this; } diff --git a/src/Model/EmployeeBenefitsReport.php b/src/Model/EmployeeBenefitsReport.php index 977dc55..eb49244 100644 --- a/src/Model/EmployeeBenefitsReport.php +++ b/src/Model/EmployeeBenefitsReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class EmployeeBenefitsReport implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ + 'isDraft' => 'bool', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -71,10 +71,10 @@ class EmployeeBenefitsReport implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ + 'isDraft' => null, 'report' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -83,10 +83,10 @@ class EmployeeBenefitsReport implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ + 'isDraft' => false, 'report' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'isDraft' => 'isDraft', 'report' => 'report', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'isDraft' => 'setIsDraft', 'report' => 'setReport', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'isDraft' => 'getIsDraft', 'report' => 'getReport', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -309,6 +309,33 @@ public function valid(): bool } + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + /** * Gets report * @@ -396,33 +423,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/EmployeeBenefitsReportReportResponse.php b/src/Model/EmployeeBenefitsReportReportResponse.php index d34c619..e71351b 100644 --- a/src/Model/EmployeeBenefitsReportReportResponse.php +++ b/src/Model/EmployeeBenefitsReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class EmployeeBenefitsReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\EmployeeBenefitsReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class EmployeeBenefitsReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class EmployeeBenefitsReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/EmployeeCostCentre.php b/src/Model/EmployeeCostCentre.php index fa4b1e3..7efd9f9 100644 --- a/src/Model/EmployeeCostCentre.php +++ b/src/Model/EmployeeCostCentre.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -62,11 +62,11 @@ class EmployeeCostCentre implements ModelInterface, ArrayAccess, JsonSerializabl protected static array $openAPITypes = [ 'code' => 'string', 'color' => 'string', - 'title' => 'string', - 'isPrimary' => 'bool', - 'weighting' => 'float', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'employeeRoleUniqueId' => 'string', - 'employee' => '\SynergiTech\Staffology\Model\Item' + 'isPrimary' => 'bool', + 'title' => 'string', + 'weighting' => 'float' ]; /** @@ -77,11 +77,11 @@ class EmployeeCostCentre implements ModelInterface, ArrayAccess, JsonSerializabl protected static array $openAPIFormats = [ 'code' => null, 'color' => null, - 'title' => null, - 'isPrimary' => null, - 'weighting' => 'double', + 'employee' => null, 'employeeRoleUniqueId' => 'uuid', - 'employee' => null + 'isPrimary' => null, + 'title' => null, + 'weighting' => 'double' ]; /** @@ -92,11 +92,11 @@ class EmployeeCostCentre implements ModelInterface, ArrayAccess, JsonSerializabl protected static array $openAPINullables = [ 'code' => false, 'color' => true, - 'title' => true, - 'isPrimary' => false, - 'weighting' => false, + 'employee' => false, 'employeeRoleUniqueId' => false, - 'employee' => false + 'isPrimary' => false, + 'title' => true, + 'weighting' => false ]; /** @@ -187,11 +187,11 @@ public function isNullableSetToNull(string $property): bool protected static array $attributeMap = [ 'code' => 'code', 'color' => 'color', - 'title' => 'title', - 'isPrimary' => 'isPrimary', - 'weighting' => 'weighting', + 'employee' => 'employee', 'employeeRoleUniqueId' => 'employeeRoleUniqueId', - 'employee' => 'employee' + 'isPrimary' => 'isPrimary', + 'title' => 'title', + 'weighting' => 'weighting' ]; /** @@ -202,11 +202,11 @@ public function isNullableSetToNull(string $property): bool protected static array $setters = [ 'code' => 'setCode', 'color' => 'setColor', - 'title' => 'setTitle', - 'isPrimary' => 'setIsPrimary', - 'weighting' => 'setWeighting', + 'employee' => 'setEmployee', 'employeeRoleUniqueId' => 'setEmployeeRoleUniqueId', - 'employee' => 'setEmployee' + 'isPrimary' => 'setIsPrimary', + 'title' => 'setTitle', + 'weighting' => 'setWeighting' ]; /** @@ -217,11 +217,11 @@ public function isNullableSetToNull(string $property): bool protected static array $getters = [ 'code' => 'getCode', 'color' => 'getColor', - 'title' => 'getTitle', - 'isPrimary' => 'getIsPrimary', - 'weighting' => 'getWeighting', + 'employee' => 'getEmployee', 'employeeRoleUniqueId' => 'getEmployeeRoleUniqueId', - 'employee' => 'getEmployee' + 'isPrimary' => 'getIsPrimary', + 'title' => 'getTitle', + 'weighting' => 'getWeighting' ]; /** @@ -282,11 +282,11 @@ public function __construct(?array $data = null) { $this->setIfExists('code', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('employeeRoleUniqueId', $data ?? [], null); $this->setIfExists('isPrimary', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); $this->setIfExists('weighting', $data ?? [], null); - $this->setIfExists('employeeRoleUniqueId', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); } /** @@ -405,143 +405,143 @@ public function setColor(?string $color): static } /** - * Gets title + * Gets employee * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getTitle(): ?string + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['title']; + return $this->container['employee']; } /** - * Sets title + * Sets employee * - * @param string|null $title [readonly] The Title for the Cost Centre + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setTitle(?string $title): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['title'] = $title; + $this->container['employee'] = $employee; return $this; } /** - * Gets isPrimary + * Gets employeeRoleUniqueId * - * @return bool|null + * @return string|null */ - public function getIsPrimary(): ?bool + public function getEmployeeRoleUniqueId(): ?string { - return $this->container['isPrimary']; + return $this->container['employeeRoleUniqueId']; } /** - * Sets isPrimary + * Sets employeeRoleUniqueId * - * @param bool|null $isPrimary Set to true if this is the primary Cost Centre for the Employee. Only one Cost Centre can be set as the primary. + * @param string|null $employeeRoleUniqueId employeeRoleUniqueId * * @return $this */ - public function setIsPrimary(?bool $isPrimary): static + public function setEmployeeRoleUniqueId(?string $employeeRoleUniqueId): static { - if (is_null($isPrimary)) { - throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); + if (is_null($employeeRoleUniqueId)) { + throw new InvalidArgumentException('non-nullable employeeRoleUniqueId cannot be null'); } - $this->container['isPrimary'] = $isPrimary; + $this->container['employeeRoleUniqueId'] = $employeeRoleUniqueId; return $this; } /** - * Gets weighting + * Gets isPrimary * - * @return float|null + * @return bool|null */ - public function getWeighting(): ?float + public function getIsPrimary(): ?bool { - return $this->container['weighting']; + return $this->container['isPrimary']; } /** - * Sets weighting + * Sets isPrimary * - * @param float|null $weighting If there is more than one Cost Centre Membership for the Employee then this determines the weighting to give to this membership. ie, if he is in two Cost Centre you might set the primary as 0.8 and the secondary as 0.2; + * @param bool|null $isPrimary Set to true if this is the primary Cost Centre for the Employee. Only one Cost Centre can be set as the primary. * * @return $this */ - public function setWeighting(?float $weighting): static + public function setIsPrimary(?bool $isPrimary): static { - if (is_null($weighting)) { - throw new InvalidArgumentException('non-nullable weighting cannot be null'); + if (is_null($isPrimary)) { + throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); } - $this->container['weighting'] = $weighting; + $this->container['isPrimary'] = $isPrimary; return $this; } /** - * Gets employeeRoleUniqueId + * Gets title * * @return string|null */ - public function getEmployeeRoleUniqueId(): ?string + public function getTitle(): ?string { - return $this->container['employeeRoleUniqueId']; + return $this->container['title']; } /** - * Sets employeeRoleUniqueId + * Sets title * - * @param string|null $employeeRoleUniqueId employeeRoleUniqueId + * @param string|null $title [readonly] The Title for the Cost Centre * * @return $this */ - public function setEmployeeRoleUniqueId(?string $employeeRoleUniqueId): static + public function setTitle(?string $title): static { - if (is_null($employeeRoleUniqueId)) { - throw new InvalidArgumentException('non-nullable employeeRoleUniqueId cannot be null'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeeRoleUniqueId'] = $employeeRoleUniqueId; + $this->container['title'] = $title; return $this; } /** - * Gets employee + * Gets weighting * - * @return \SynergiTech\Staffology\Model\Item|null + * @return float|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getWeighting(): ?float { - return $this->container['employee']; + return $this->container['weighting']; } /** - * Sets employee + * Sets weighting * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param float|null $weighting If there is more than one Cost Centre Membership for the Employee then this determines the weighting to give to this membership. ie, if he is in two Cost Centre you might set the primary as 0.8 and the secondary as 0.2; * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setWeighting(?float $weighting): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($weighting)) { + throw new InvalidArgumentException('non-nullable weighting cannot be null'); } - $this->container['employee'] = $employee; + $this->container['weighting'] = $weighting; return $this; } diff --git a/src/Model/EmployeeLeaveReport.php b/src/Model/EmployeeLeaveReport.php index 095a37b..94442fe 100644 --- a/src/Model/EmployeeLeaveReport.php +++ b/src/Model/EmployeeLeaveReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class EmployeeLeaveReport implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\EmployeeLeaveReportLine[]', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -72,11 +72,11 @@ class EmployeeLeaveReport implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPIFormats = [ + 'isDraft' => null, 'lines' => null, 'report' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -85,11 +85,11 @@ class EmployeeLeaveReport implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPINullables = [ + 'isDraft' => false, 'lines' => true, 'report' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'isDraft' => 'isDraft', 'lines' => 'lines', 'report' => 'report', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', 'report' => 'setReport', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', 'report' => 'getReport', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -316,6 +316,33 @@ public function valid(): bool } + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + /** * Gets lines * @@ -437,33 +464,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/EmployeeLeaveReportLine.php b/src/Model/EmployeeLeaveReportLine.php index 4fe0f69..d059567 100644 --- a/src/Model/EmployeeLeaveReportLine.php +++ b/src/Model/EmployeeLeaveReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,36 +59,36 @@ class EmployeeLeaveReportLine implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ + 'assumedPensionablePay' => 'float', + 'automaticAPPCalculation' => 'bool', + 'automaticAWECalculation' => 'bool', + 'averageWeeklyEarnings' => 'float', + 'babyBirthDate' => '\DateTime', + 'babyDueDate' => '\DateTime', + 'calculationType' => '\SynergiTech\Staffology\Model\LeaveCalculationType', + 'deathDate' => '\DateTime', + 'expectedPlacementDate' => '\DateTime', 'firstName' => 'string', + 'from' => '\DateTime', + 'historicLeaveRequiresProcessing' => 'bool', 'lastName' => 'string', - 'type' => '\SynergiTech\Staffology\Model\LeaveType', + 'matchingDate' => '\DateTime', + 'occupationalPolicy' => 'string', + 'offsetPay' => 'bool', + 'openEndedAbsence' => 'bool', + 'openingOmpPay' => 'float', + 'openingPay' => 'float', + 'payFrequency' => '\SynergiTech\Staffology\Model\StatPayFrequency', + 'paySSPInAddition' => 'bool', 'payment' => '\SynergiTech\Staffology\Model\LeavePayType', 'payrollCode' => 'string', - 'openEndedAbsence' => 'bool', 'percentOfPay' => 'float', - 'paySSPInAddition' => 'bool', - 'payFrequency' => '\SynergiTech\Staffology\Model\StatPayFrequency', - 'occupationalPolicy' => 'string', - 'from' => '\DateTime', - 'to' => '\DateTime', - 'useOpeningPay' => 'bool', - 'openingPay' => 'float', - 'openingOmpPay' => 'float', - 'babyDueDate' => '\DateTime', - 'babyBirthDate' => '\DateTime', - 'matchingDate' => '\DateTime', - 'expectedPlacementDate' => '\DateTime', 'placementDate' => '\DateTime', - 'deathDate' => '\DateTime', - 'averageWeeklyEarnings' => 'float', - 'automaticAWECalculation' => 'bool', - 'calculationType' => '\SynergiTech\Staffology\Model\LeaveCalculationType', 'strikeHoursToDeduct' => 'float', - 'historicLeaveRequiresProcessing' => 'bool', - 'offsetPay' => 'bool', + 'to' => '\DateTime', + 'type' => '\SynergiTech\Staffology\Model\LeaveType', 'useAssumedPensionablePay' => 'bool', - 'automaticAPPCalculation' => 'bool', - 'assumedPensionablePay' => 'float' + 'useOpeningPay' => 'bool' ]; /** @@ -97,36 +97,36 @@ class EmployeeLeaveReportLine implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ + 'assumedPensionablePay' => 'double', + 'automaticAPPCalculation' => null, + 'automaticAWECalculation' => null, + 'averageWeeklyEarnings' => 'double', + 'babyBirthDate' => 'date', + 'babyDueDate' => 'date', + 'calculationType' => null, + 'deathDate' => 'date', + 'expectedPlacementDate' => 'date', 'firstName' => null, + 'from' => 'date', + 'historicLeaveRequiresProcessing' => null, 'lastName' => null, - 'type' => null, + 'matchingDate' => 'date', + 'occupationalPolicy' => null, + 'offsetPay' => null, + 'openEndedAbsence' => null, + 'openingOmpPay' => 'double', + 'openingPay' => 'double', + 'payFrequency' => null, + 'paySSPInAddition' => null, 'payment' => null, 'payrollCode' => null, - 'openEndedAbsence' => null, 'percentOfPay' => 'double', - 'paySSPInAddition' => null, - 'payFrequency' => null, - 'occupationalPolicy' => null, - 'from' => 'date', - 'to' => 'date', - 'useOpeningPay' => null, - 'openingPay' => 'double', - 'openingOmpPay' => 'double', - 'babyDueDate' => 'date', - 'babyBirthDate' => 'date', - 'matchingDate' => 'date', - 'expectedPlacementDate' => 'date', 'placementDate' => 'date', - 'deathDate' => 'date', - 'averageWeeklyEarnings' => 'double', - 'automaticAWECalculation' => null, - 'calculationType' => null, 'strikeHoursToDeduct' => 'double', - 'historicLeaveRequiresProcessing' => null, - 'offsetPay' => null, + 'to' => 'date', + 'type' => null, 'useAssumedPensionablePay' => null, - 'automaticAPPCalculation' => null, - 'assumedPensionablePay' => 'double' + 'useOpeningPay' => null ]; /** @@ -135,36 +135,36 @@ class EmployeeLeaveReportLine implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ + 'assumedPensionablePay' => true, + 'automaticAPPCalculation' => false, + 'automaticAWECalculation' => false, + 'averageWeeklyEarnings' => false, + 'babyBirthDate' => true, + 'babyDueDate' => true, + 'calculationType' => false, + 'deathDate' => true, + 'expectedPlacementDate' => true, 'firstName' => true, + 'from' => false, + 'historicLeaveRequiresProcessing' => false, 'lastName' => true, - 'type' => false, + 'matchingDate' => true, + 'occupationalPolicy' => true, + 'offsetPay' => false, + 'openEndedAbsence' => false, + 'openingOmpPay' => true, + 'openingPay' => true, + 'payFrequency' => false, + 'paySSPInAddition' => false, 'payment' => false, 'payrollCode' => true, - 'openEndedAbsence' => false, 'percentOfPay' => false, - 'paySSPInAddition' => false, - 'payFrequency' => false, - 'occupationalPolicy' => true, - 'from' => false, - 'to' => false, - 'useOpeningPay' => false, - 'openingPay' => true, - 'openingOmpPay' => true, - 'babyDueDate' => true, - 'babyBirthDate' => true, - 'matchingDate' => true, - 'expectedPlacementDate' => true, 'placementDate' => true, - 'deathDate' => true, - 'averageWeeklyEarnings' => false, - 'automaticAWECalculation' => false, - 'calculationType' => false, 'strikeHoursToDeduct' => true, - 'historicLeaveRequiresProcessing' => false, - 'offsetPay' => false, + 'to' => false, + 'type' => false, 'useAssumedPensionablePay' => false, - 'automaticAPPCalculation' => false, - 'assumedPensionablePay' => true + 'useOpeningPay' => false ]; /** @@ -253,36 +253,36 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'assumedPensionablePay' => 'assumedPensionablePay', + 'automaticAPPCalculation' => 'automaticAPPCalculation', + 'automaticAWECalculation' => 'automaticAWECalculation', + 'averageWeeklyEarnings' => 'averageWeeklyEarnings', + 'babyBirthDate' => 'babyBirthDate', + 'babyDueDate' => 'babyDueDate', + 'calculationType' => 'calculationType', + 'deathDate' => 'deathDate', + 'expectedPlacementDate' => 'expectedPlacementDate', 'firstName' => 'firstName', + 'from' => 'from', + 'historicLeaveRequiresProcessing' => 'historicLeaveRequiresProcessing', 'lastName' => 'lastName', - 'type' => 'type', + 'matchingDate' => 'matchingDate', + 'occupationalPolicy' => 'occupationalPolicy', + 'offsetPay' => 'offsetPay', + 'openEndedAbsence' => 'openEndedAbsence', + 'openingOmpPay' => 'openingOmpPay', + 'openingPay' => 'openingPay', + 'payFrequency' => 'payFrequency', + 'paySSPInAddition' => 'paySSPInAddition', 'payment' => 'payment', 'payrollCode' => 'payrollCode', - 'openEndedAbsence' => 'openEndedAbsence', 'percentOfPay' => 'percentOfPay', - 'paySSPInAddition' => 'paySSPInAddition', - 'payFrequency' => 'payFrequency', - 'occupationalPolicy' => 'occupationalPolicy', - 'from' => 'from', - 'to' => 'to', - 'useOpeningPay' => 'useOpeningPay', - 'openingPay' => 'openingPay', - 'openingOmpPay' => 'openingOmpPay', - 'babyDueDate' => 'babyDueDate', - 'babyBirthDate' => 'babyBirthDate', - 'matchingDate' => 'matchingDate', - 'expectedPlacementDate' => 'expectedPlacementDate', 'placementDate' => 'placementDate', - 'deathDate' => 'deathDate', - 'averageWeeklyEarnings' => 'averageWeeklyEarnings', - 'automaticAWECalculation' => 'automaticAWECalculation', - 'calculationType' => 'calculationType', 'strikeHoursToDeduct' => 'strikeHoursToDeduct', - 'historicLeaveRequiresProcessing' => 'historicLeaveRequiresProcessing', - 'offsetPay' => 'offsetPay', + 'to' => 'to', + 'type' => 'type', 'useAssumedPensionablePay' => 'useAssumedPensionablePay', - 'automaticAPPCalculation' => 'automaticAPPCalculation', - 'assumedPensionablePay' => 'assumedPensionablePay' + 'useOpeningPay' => 'useOpeningPay' ]; /** @@ -291,36 +291,36 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'assumedPensionablePay' => 'setAssumedPensionablePay', + 'automaticAPPCalculation' => 'setAutomaticAPPCalculation', + 'automaticAWECalculation' => 'setAutomaticAWECalculation', + 'averageWeeklyEarnings' => 'setAverageWeeklyEarnings', + 'babyBirthDate' => 'setBabyBirthDate', + 'babyDueDate' => 'setBabyDueDate', + 'calculationType' => 'setCalculationType', + 'deathDate' => 'setDeathDate', + 'expectedPlacementDate' => 'setExpectedPlacementDate', 'firstName' => 'setFirstName', + 'from' => 'setFrom', + 'historicLeaveRequiresProcessing' => 'setHistoricLeaveRequiresProcessing', 'lastName' => 'setLastName', - 'type' => 'setType', + 'matchingDate' => 'setMatchingDate', + 'occupationalPolicy' => 'setOccupationalPolicy', + 'offsetPay' => 'setOffsetPay', + 'openEndedAbsence' => 'setOpenEndedAbsence', + 'openingOmpPay' => 'setOpeningOmpPay', + 'openingPay' => 'setOpeningPay', + 'payFrequency' => 'setPayFrequency', + 'paySSPInAddition' => 'setPaySSPInAddition', 'payment' => 'setPayment', 'payrollCode' => 'setPayrollCode', - 'openEndedAbsence' => 'setOpenEndedAbsence', 'percentOfPay' => 'setPercentOfPay', - 'paySSPInAddition' => 'setPaySSPInAddition', - 'payFrequency' => 'setPayFrequency', - 'occupationalPolicy' => 'setOccupationalPolicy', - 'from' => 'setFrom', - 'to' => 'setTo', - 'useOpeningPay' => 'setUseOpeningPay', - 'openingPay' => 'setOpeningPay', - 'openingOmpPay' => 'setOpeningOmpPay', - 'babyDueDate' => 'setBabyDueDate', - 'babyBirthDate' => 'setBabyBirthDate', - 'matchingDate' => 'setMatchingDate', - 'expectedPlacementDate' => 'setExpectedPlacementDate', 'placementDate' => 'setPlacementDate', - 'deathDate' => 'setDeathDate', - 'averageWeeklyEarnings' => 'setAverageWeeklyEarnings', - 'automaticAWECalculation' => 'setAutomaticAWECalculation', - 'calculationType' => 'setCalculationType', 'strikeHoursToDeduct' => 'setStrikeHoursToDeduct', - 'historicLeaveRequiresProcessing' => 'setHistoricLeaveRequiresProcessing', - 'offsetPay' => 'setOffsetPay', + 'to' => 'setTo', + 'type' => 'setType', 'useAssumedPensionablePay' => 'setUseAssumedPensionablePay', - 'automaticAPPCalculation' => 'setAutomaticAPPCalculation', - 'assumedPensionablePay' => 'setAssumedPensionablePay' + 'useOpeningPay' => 'setUseOpeningPay' ]; /** @@ -329,36 +329,36 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'assumedPensionablePay' => 'getAssumedPensionablePay', + 'automaticAPPCalculation' => 'getAutomaticAPPCalculation', + 'automaticAWECalculation' => 'getAutomaticAWECalculation', + 'averageWeeklyEarnings' => 'getAverageWeeklyEarnings', + 'babyBirthDate' => 'getBabyBirthDate', + 'babyDueDate' => 'getBabyDueDate', + 'calculationType' => 'getCalculationType', + 'deathDate' => 'getDeathDate', + 'expectedPlacementDate' => 'getExpectedPlacementDate', 'firstName' => 'getFirstName', + 'from' => 'getFrom', + 'historicLeaveRequiresProcessing' => 'getHistoricLeaveRequiresProcessing', 'lastName' => 'getLastName', - 'type' => 'getType', + 'matchingDate' => 'getMatchingDate', + 'occupationalPolicy' => 'getOccupationalPolicy', + 'offsetPay' => 'getOffsetPay', + 'openEndedAbsence' => 'getOpenEndedAbsence', + 'openingOmpPay' => 'getOpeningOmpPay', + 'openingPay' => 'getOpeningPay', + 'payFrequency' => 'getPayFrequency', + 'paySSPInAddition' => 'getPaySSPInAddition', 'payment' => 'getPayment', 'payrollCode' => 'getPayrollCode', - 'openEndedAbsence' => 'getOpenEndedAbsence', 'percentOfPay' => 'getPercentOfPay', - 'paySSPInAddition' => 'getPaySSPInAddition', - 'payFrequency' => 'getPayFrequency', - 'occupationalPolicy' => 'getOccupationalPolicy', - 'from' => 'getFrom', - 'to' => 'getTo', - 'useOpeningPay' => 'getUseOpeningPay', - 'openingPay' => 'getOpeningPay', - 'openingOmpPay' => 'getOpeningOmpPay', - 'babyDueDate' => 'getBabyDueDate', - 'babyBirthDate' => 'getBabyBirthDate', - 'matchingDate' => 'getMatchingDate', - 'expectedPlacementDate' => 'getExpectedPlacementDate', 'placementDate' => 'getPlacementDate', - 'deathDate' => 'getDeathDate', - 'averageWeeklyEarnings' => 'getAverageWeeklyEarnings', - 'automaticAWECalculation' => 'getAutomaticAWECalculation', - 'calculationType' => 'getCalculationType', 'strikeHoursToDeduct' => 'getStrikeHoursToDeduct', - 'historicLeaveRequiresProcessing' => 'getHistoricLeaveRequiresProcessing', - 'offsetPay' => 'getOffsetPay', + 'to' => 'getTo', + 'type' => 'getType', 'useAssumedPensionablePay' => 'getUseAssumedPensionablePay', - 'automaticAPPCalculation' => 'getAutomaticAPPCalculation', - 'assumedPensionablePay' => 'getAssumedPensionablePay' + 'useOpeningPay' => 'getUseOpeningPay' ]; /** @@ -417,36 +417,36 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('assumedPensionablePay', $data ?? [], null); + $this->setIfExists('automaticAPPCalculation', $data ?? [], null); + $this->setIfExists('automaticAWECalculation', $data ?? [], null); + $this->setIfExists('averageWeeklyEarnings', $data ?? [], null); + $this->setIfExists('babyBirthDate', $data ?? [], null); + $this->setIfExists('babyDueDate', $data ?? [], null); + $this->setIfExists('calculationType', $data ?? [], null); + $this->setIfExists('deathDate', $data ?? [], null); + $this->setIfExists('expectedPlacementDate', $data ?? [], null); $this->setIfExists('firstName', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('historicLeaveRequiresProcessing', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('payment', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('openEndedAbsence', $data ?? [], null); - $this->setIfExists('percentOfPay', $data ?? [], null); - $this->setIfExists('paySSPInAddition', $data ?? [], null); - $this->setIfExists('payFrequency', $data ?? [], null); + $this->setIfExists('matchingDate', $data ?? [], null); $this->setIfExists('occupationalPolicy', $data ?? [], null); - $this->setIfExists('from', $data ?? [], null); - $this->setIfExists('to', $data ?? [], null); - $this->setIfExists('useOpeningPay', $data ?? [], null); - $this->setIfExists('openingPay', $data ?? [], null); + $this->setIfExists('offsetPay', $data ?? [], null); + $this->setIfExists('openEndedAbsence', $data ?? [], null); $this->setIfExists('openingOmpPay', $data ?? [], null); - $this->setIfExists('babyDueDate', $data ?? [], null); - $this->setIfExists('babyBirthDate', $data ?? [], null); - $this->setIfExists('matchingDate', $data ?? [], null); - $this->setIfExists('expectedPlacementDate', $data ?? [], null); + $this->setIfExists('openingPay', $data ?? [], null); + $this->setIfExists('payFrequency', $data ?? [], null); + $this->setIfExists('paySSPInAddition', $data ?? [], null); + $this->setIfExists('payment', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('percentOfPay', $data ?? [], null); $this->setIfExists('placementDate', $data ?? [], null); - $this->setIfExists('deathDate', $data ?? [], null); - $this->setIfExists('averageWeeklyEarnings', $data ?? [], null); - $this->setIfExists('automaticAWECalculation', $data ?? [], null); - $this->setIfExists('calculationType', $data ?? [], null); $this->setIfExists('strikeHoursToDeduct', $data ?? [], null); - $this->setIfExists('historicLeaveRequiresProcessing', $data ?? [], null); - $this->setIfExists('offsetPay', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('useAssumedPensionablePay', $data ?? [], null); - $this->setIfExists('automaticAPPCalculation', $data ?? [], null); - $this->setIfExists('assumedPensionablePay', $data ?? [], null); + $this->setIfExists('useOpeningPay', $data ?? [], null); } /** @@ -492,299 +492,313 @@ public function valid(): bool /** - * Gets firstName + * Gets assumedPensionablePay * - * @return string|null + * @return float|null */ - public function getFirstName(): ?string + public function getAssumedPensionablePay(): ?float { - return $this->container['firstName']; + return $this->container['assumedPensionablePay']; } /** - * Sets firstName + * Sets assumedPensionablePay * - * @param string|null $firstName firstName + * @param float|null $assumedPensionablePay assumedPensionablePay * * @return $this */ - public function setFirstName(?string $firstName): static + public function setAssumedPensionablePay(?float $assumedPensionablePay): static { - if (is_null($firstName)) { - array_push($this->openAPINullablesSetToNull, 'firstName'); + if (is_null($assumedPensionablePay)) { + array_push($this->openAPINullablesSetToNull, 'assumedPensionablePay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('firstName', $nullablesSetToNull); + $index = array_search('assumedPensionablePay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['firstName'] = $firstName; + $this->container['assumedPensionablePay'] = $assumedPensionablePay; return $this; } /** - * Gets lastName + * Gets automaticAPPCalculation * - * @return string|null + * @return bool|null */ - public function getLastName(): ?string + public function getAutomaticAPPCalculation(): ?bool { - return $this->container['lastName']; + return $this->container['automaticAPPCalculation']; } /** - * Sets lastName + * Sets automaticAPPCalculation * - * @param string|null $lastName lastName + * @param bool|null $automaticAPPCalculation automaticAPPCalculation * * @return $this */ - public function setLastName(?string $lastName): static + public function setAutomaticAPPCalculation(?bool $automaticAPPCalculation): static { - if (is_null($lastName)) { - array_push($this->openAPINullablesSetToNull, 'lastName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($automaticAPPCalculation)) { + throw new InvalidArgumentException('non-nullable automaticAPPCalculation cannot be null'); } - $this->container['lastName'] = $lastName; + $this->container['automaticAPPCalculation'] = $automaticAPPCalculation; return $this; } /** - * Gets type + * Gets automaticAWECalculation * - * @return \SynergiTech\Staffology\Model\LeaveType|null + * @return bool|null */ - public function getType(): ?\SynergiTech\Staffology\Model\LeaveType + public function getAutomaticAWECalculation(): ?bool { - return $this->container['type']; + return $this->container['automaticAWECalculation']; } /** - * Sets type + * Sets automaticAWECalculation * - * @param \SynergiTech\Staffology\Model\LeaveType|null $type type + * @param bool|null $automaticAWECalculation automaticAWECalculation * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\LeaveType $type): static + public function setAutomaticAWECalculation(?bool $automaticAWECalculation): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($automaticAWECalculation)) { + throw new InvalidArgumentException('non-nullable automaticAWECalculation cannot be null'); } - $this->container['type'] = $type; + $this->container['automaticAWECalculation'] = $automaticAWECalculation; return $this; } /** - * Gets payment + * Gets averageWeeklyEarnings * - * @return \SynergiTech\Staffology\Model\LeavePayType|null + * @return float|null */ - public function getPayment(): ?\SynergiTech\Staffology\Model\LeavePayType + public function getAverageWeeklyEarnings(): ?float { - return $this->container['payment']; + return $this->container['averageWeeklyEarnings']; } /** - * Sets payment + * Sets averageWeeklyEarnings * - * @param \SynergiTech\Staffology\Model\LeavePayType|null $payment payment + * @param float|null $averageWeeklyEarnings averageWeeklyEarnings * * @return $this */ - public function setPayment(?\SynergiTech\Staffology\Model\LeavePayType $payment): static + public function setAverageWeeklyEarnings(?float $averageWeeklyEarnings): static { - if (is_null($payment)) { - throw new InvalidArgumentException('non-nullable payment cannot be null'); + if (is_null($averageWeeklyEarnings)) { + throw new InvalidArgumentException('non-nullable averageWeeklyEarnings cannot be null'); } - $this->container['payment'] = $payment; + $this->container['averageWeeklyEarnings'] = $averageWeeklyEarnings; return $this; } /** - * Gets payrollCode + * Gets babyBirthDate * - * @return string|null + * @return \DateTime|null */ - public function getPayrollCode(): ?string + public function getBabyBirthDate(): ?\DateTime { - return $this->container['payrollCode']; + return $this->container['babyBirthDate']; } /** - * Sets payrollCode + * Sets babyBirthDate * - * @param string|null $payrollCode payrollCode + * @param \DateTime|null $babyBirthDate babyBirthDate * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setBabyBirthDate(?\DateTime $babyBirthDate): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); + if (is_null($babyBirthDate)) { + array_push($this->openAPINullablesSetToNull, 'babyBirthDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); + $index = array_search('babyBirthDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payrollCode'] = $payrollCode; + $this->container['babyBirthDate'] = $babyBirthDate; return $this; } /** - * Gets openEndedAbsence + * Gets babyDueDate * - * @return bool|null + * @return \DateTime|null */ - public function getOpenEndedAbsence(): ?bool + public function getBabyDueDate(): ?\DateTime { - return $this->container['openEndedAbsence']; + return $this->container['babyDueDate']; } /** - * Sets openEndedAbsence + * Sets babyDueDate * - * @param bool|null $openEndedAbsence openEndedAbsence + * @param \DateTime|null $babyDueDate babyDueDate * * @return $this */ - public function setOpenEndedAbsence(?bool $openEndedAbsence): static + public function setBabyDueDate(?\DateTime $babyDueDate): static { - if (is_null($openEndedAbsence)) { - throw new InvalidArgumentException('non-nullable openEndedAbsence cannot be null'); + if (is_null($babyDueDate)) { + array_push($this->openAPINullablesSetToNull, 'babyDueDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('babyDueDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['openEndedAbsence'] = $openEndedAbsence; + $this->container['babyDueDate'] = $babyDueDate; return $this; } /** - * Gets percentOfPay + * Gets calculationType * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveCalculationType|null */ - public function getPercentOfPay(): ?float + public function getCalculationType(): ?\SynergiTech\Staffology\Model\LeaveCalculationType { - return $this->container['percentOfPay']; + return $this->container['calculationType']; } /** - * Sets percentOfPay + * Sets calculationType * - * @param float|null $percentOfPay percentOfPay + * @param \SynergiTech\Staffology\Model\LeaveCalculationType|null $calculationType calculationType * * @return $this */ - public function setPercentOfPay(?float $percentOfPay): static + public function setCalculationType(?\SynergiTech\Staffology\Model\LeaveCalculationType $calculationType): static { - if (is_null($percentOfPay)) { - throw new InvalidArgumentException('non-nullable percentOfPay cannot be null'); + if (is_null($calculationType)) { + throw new InvalidArgumentException('non-nullable calculationType cannot be null'); } - $this->container['percentOfPay'] = $percentOfPay; + $this->container['calculationType'] = $calculationType; return $this; } /** - * Gets paySSPInAddition + * Gets deathDate * - * @return bool|null + * @return \DateTime|null */ - public function getPaySSPInAddition(): ?bool + public function getDeathDate(): ?\DateTime { - return $this->container['paySSPInAddition']; + return $this->container['deathDate']; } /** - * Sets paySSPInAddition + * Sets deathDate * - * @param bool|null $paySSPInAddition paySSPInAddition + * @param \DateTime|null $deathDate deathDate * * @return $this */ - public function setPaySSPInAddition(?bool $paySSPInAddition): static + public function setDeathDate(?\DateTime $deathDate): static { - if (is_null($paySSPInAddition)) { - throw new InvalidArgumentException('non-nullable paySSPInAddition cannot be null'); + if (is_null($deathDate)) { + array_push($this->openAPINullablesSetToNull, 'deathDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deathDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['paySSPInAddition'] = $paySSPInAddition; + $this->container['deathDate'] = $deathDate; return $this; } /** - * Gets payFrequency + * Gets expectedPlacementDate * - * @return \SynergiTech\Staffology\Model\StatPayFrequency|null + * @return \DateTime|null */ - public function getPayFrequency(): ?\SynergiTech\Staffology\Model\StatPayFrequency + public function getExpectedPlacementDate(): ?\DateTime { - return $this->container['payFrequency']; + return $this->container['expectedPlacementDate']; } /** - * Sets payFrequency + * Sets expectedPlacementDate * - * @param \SynergiTech\Staffology\Model\StatPayFrequency|null $payFrequency payFrequency + * @param \DateTime|null $expectedPlacementDate expectedPlacementDate * * @return $this */ - public function setPayFrequency(?\SynergiTech\Staffology\Model\StatPayFrequency $payFrequency): static + public function setExpectedPlacementDate(?\DateTime $expectedPlacementDate): static { - if (is_null($payFrequency)) { - throw new InvalidArgumentException('non-nullable payFrequency cannot be null'); + if (is_null($expectedPlacementDate)) { + array_push($this->openAPINullablesSetToNull, 'expectedPlacementDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('expectedPlacementDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payFrequency'] = $payFrequency; + $this->container['expectedPlacementDate'] = $expectedPlacementDate; return $this; } /** - * Gets occupationalPolicy + * Gets firstName * * @return string|null */ - public function getOccupationalPolicy(): ?string + public function getFirstName(): ?string { - return $this->container['occupationalPolicy']; + return $this->container['firstName']; } /** - * Sets occupationalPolicy + * Sets firstName * - * @param string|null $occupationalPolicy occupationalPolicy + * @param string|null $firstName firstName * * @return $this */ - public function setOccupationalPolicy(?string $occupationalPolicy): static + public function setFirstName(?string $firstName): static { - if (is_null($occupationalPolicy)) { - array_push($this->openAPINullablesSetToNull, 'occupationalPolicy'); + if (is_null($firstName)) { + array_push($this->openAPINullablesSetToNull, 'firstName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('occupationalPolicy', $nullablesSetToNull); + $index = array_search('firstName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['occupationalPolicy'] = $occupationalPolicy; + $this->container['firstName'] = $firstName; return $this; } @@ -817,408 +831,428 @@ public function setFrom(?\DateTime $from): static } /** - * Gets to + * Gets historicLeaveRequiresProcessing * - * @return \DateTime|null + * @return bool|null */ - public function getTo(): ?\DateTime + public function getHistoricLeaveRequiresProcessing(): ?bool { - return $this->container['to']; + return $this->container['historicLeaveRequiresProcessing']; } /** - * Sets to + * Sets historicLeaveRequiresProcessing * - * @param \DateTime|null $to to + * @param bool|null $historicLeaveRequiresProcessing historicLeaveRequiresProcessing * * @return $this */ - public function setTo(?\DateTime $to): static + public function setHistoricLeaveRequiresProcessing(?bool $historicLeaveRequiresProcessing): static { - if (is_null($to)) { - throw new InvalidArgumentException('non-nullable to cannot be null'); + if (is_null($historicLeaveRequiresProcessing)) { + throw new InvalidArgumentException('non-nullable historicLeaveRequiresProcessing cannot be null'); } - $this->container['to'] = $to; + $this->container['historicLeaveRequiresProcessing'] = $historicLeaveRequiresProcessing; return $this; } /** - * Gets useOpeningPay + * Gets lastName * - * @return bool|null + * @return string|null */ - public function getUseOpeningPay(): ?bool + public function getLastName(): ?string { - return $this->container['useOpeningPay']; + return $this->container['lastName']; } /** - * Sets useOpeningPay + * Sets lastName * - * @param bool|null $useOpeningPay useOpeningPay + * @param string|null $lastName lastName * * @return $this */ - public function setUseOpeningPay(?bool $useOpeningPay): static + public function setLastName(?string $lastName): static { - if (is_null($useOpeningPay)) { - throw new InvalidArgumentException('non-nullable useOpeningPay cannot be null'); + if (is_null($lastName)) { + array_push($this->openAPINullablesSetToNull, 'lastName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lastName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useOpeningPay'] = $useOpeningPay; + $this->container['lastName'] = $lastName; return $this; } /** - * Gets openingPay + * Gets matchingDate * - * @return float|null + * @return \DateTime|null */ - public function getOpeningPay(): ?float + public function getMatchingDate(): ?\DateTime { - return $this->container['openingPay']; + return $this->container['matchingDate']; } /** - * Sets openingPay + * Sets matchingDate * - * @param float|null $openingPay openingPay + * @param \DateTime|null $matchingDate matchingDate * * @return $this */ - public function setOpeningPay(?float $openingPay): static + public function setMatchingDate(?\DateTime $matchingDate): static { - if (is_null($openingPay)) { - array_push($this->openAPINullablesSetToNull, 'openingPay'); + if (is_null($matchingDate)) { + array_push($this->openAPINullablesSetToNull, 'matchingDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('openingPay', $nullablesSetToNull); + $index = array_search('matchingDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['openingPay'] = $openingPay; + $this->container['matchingDate'] = $matchingDate; return $this; } /** - * Gets openingOmpPay + * Gets occupationalPolicy * - * @return float|null + * @return string|null */ - public function getOpeningOmpPay(): ?float + public function getOccupationalPolicy(): ?string { - return $this->container['openingOmpPay']; + return $this->container['occupationalPolicy']; } /** - * Sets openingOmpPay + * Sets occupationalPolicy * - * @param float|null $openingOmpPay openingOmpPay + * @param string|null $occupationalPolicy occupationalPolicy * * @return $this */ - public function setOpeningOmpPay(?float $openingOmpPay): static + public function setOccupationalPolicy(?string $occupationalPolicy): static { - if (is_null($openingOmpPay)) { - array_push($this->openAPINullablesSetToNull, 'openingOmpPay'); + if (is_null($occupationalPolicy)) { + array_push($this->openAPINullablesSetToNull, 'occupationalPolicy'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('openingOmpPay', $nullablesSetToNull); + $index = array_search('occupationalPolicy', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['openingOmpPay'] = $openingOmpPay; + $this->container['occupationalPolicy'] = $occupationalPolicy; return $this; } /** - * Gets babyDueDate + * Gets offsetPay * - * @return \DateTime|null + * @return bool|null */ - public function getBabyDueDate(): ?\DateTime + public function getOffsetPay(): ?bool { - return $this->container['babyDueDate']; + return $this->container['offsetPay']; } /** - * Sets babyDueDate + * Sets offsetPay * - * @param \DateTime|null $babyDueDate babyDueDate + * @param bool|null $offsetPay offsetPay * * @return $this */ - public function setBabyDueDate(?\DateTime $babyDueDate): static + public function setOffsetPay(?bool $offsetPay): static { - if (is_null($babyDueDate)) { - array_push($this->openAPINullablesSetToNull, 'babyDueDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('babyDueDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($offsetPay)) { + throw new InvalidArgumentException('non-nullable offsetPay cannot be null'); } - $this->container['babyDueDate'] = $babyDueDate; + $this->container['offsetPay'] = $offsetPay; return $this; } /** - * Gets babyBirthDate + * Gets openEndedAbsence * - * @return \DateTime|null + * @return bool|null */ - public function getBabyBirthDate(): ?\DateTime + public function getOpenEndedAbsence(): ?bool { - return $this->container['babyBirthDate']; + return $this->container['openEndedAbsence']; } /** - * Sets babyBirthDate + * Sets openEndedAbsence * - * @param \DateTime|null $babyBirthDate babyBirthDate + * @param bool|null $openEndedAbsence openEndedAbsence * * @return $this */ - public function setBabyBirthDate(?\DateTime $babyBirthDate): static + public function setOpenEndedAbsence(?bool $openEndedAbsence): static { - if (is_null($babyBirthDate)) { - array_push($this->openAPINullablesSetToNull, 'babyBirthDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('babyBirthDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($openEndedAbsence)) { + throw new InvalidArgumentException('non-nullable openEndedAbsence cannot be null'); } - $this->container['babyBirthDate'] = $babyBirthDate; + $this->container['openEndedAbsence'] = $openEndedAbsence; return $this; } /** - * Gets matchingDate + * Gets openingOmpPay * - * @return \DateTime|null + * @return float|null */ - public function getMatchingDate(): ?\DateTime + public function getOpeningOmpPay(): ?float { - return $this->container['matchingDate']; + return $this->container['openingOmpPay']; } /** - * Sets matchingDate + * Sets openingOmpPay * - * @param \DateTime|null $matchingDate matchingDate + * @param float|null $openingOmpPay openingOmpPay * * @return $this */ - public function setMatchingDate(?\DateTime $matchingDate): static + public function setOpeningOmpPay(?float $openingOmpPay): static { - if (is_null($matchingDate)) { - array_push($this->openAPINullablesSetToNull, 'matchingDate'); + if (is_null($openingOmpPay)) { + array_push($this->openAPINullablesSetToNull, 'openingOmpPay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('matchingDate', $nullablesSetToNull); + $index = array_search('openingOmpPay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['matchingDate'] = $matchingDate; + $this->container['openingOmpPay'] = $openingOmpPay; return $this; } /** - * Gets expectedPlacementDate + * Gets openingPay * - * @return \DateTime|null + * @return float|null */ - public function getExpectedPlacementDate(): ?\DateTime + public function getOpeningPay(): ?float { - return $this->container['expectedPlacementDate']; + return $this->container['openingPay']; } /** - * Sets expectedPlacementDate + * Sets openingPay * - * @param \DateTime|null $expectedPlacementDate expectedPlacementDate + * @param float|null $openingPay openingPay * * @return $this */ - public function setExpectedPlacementDate(?\DateTime $expectedPlacementDate): static + public function setOpeningPay(?float $openingPay): static { - if (is_null($expectedPlacementDate)) { - array_push($this->openAPINullablesSetToNull, 'expectedPlacementDate'); + if (is_null($openingPay)) { + array_push($this->openAPINullablesSetToNull, 'openingPay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('expectedPlacementDate', $nullablesSetToNull); + $index = array_search('openingPay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['expectedPlacementDate'] = $expectedPlacementDate; + $this->container['openingPay'] = $openingPay; return $this; } /** - * Gets placementDate + * Gets payFrequency * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\StatPayFrequency|null */ - public function getPlacementDate(): ?\DateTime + public function getPayFrequency(): ?\SynergiTech\Staffology\Model\StatPayFrequency { - return $this->container['placementDate']; + return $this->container['payFrequency']; } /** - * Sets placementDate + * Sets payFrequency * - * @param \DateTime|null $placementDate placementDate + * @param \SynergiTech\Staffology\Model\StatPayFrequency|null $payFrequency payFrequency * * @return $this */ - public function setPlacementDate(?\DateTime $placementDate): static + public function setPayFrequency(?\SynergiTech\Staffology\Model\StatPayFrequency $payFrequency): static { - if (is_null($placementDate)) { - array_push($this->openAPINullablesSetToNull, 'placementDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('placementDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payFrequency)) { + throw new InvalidArgumentException('non-nullable payFrequency cannot be null'); } - $this->container['placementDate'] = $placementDate; + $this->container['payFrequency'] = $payFrequency; return $this; } /** - * Gets deathDate + * Gets paySSPInAddition * - * @return \DateTime|null + * @return bool|null */ - public function getDeathDate(): ?\DateTime + public function getPaySSPInAddition(): ?bool { - return $this->container['deathDate']; + return $this->container['paySSPInAddition']; } /** - * Sets deathDate + * Sets paySSPInAddition * - * @param \DateTime|null $deathDate deathDate + * @param bool|null $paySSPInAddition paySSPInAddition * * @return $this */ - public function setDeathDate(?\DateTime $deathDate): static + public function setPaySSPInAddition(?bool $paySSPInAddition): static { - if (is_null($deathDate)) { - array_push($this->openAPINullablesSetToNull, 'deathDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('deathDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($paySSPInAddition)) { + throw new InvalidArgumentException('non-nullable paySSPInAddition cannot be null'); } - $this->container['deathDate'] = $deathDate; + $this->container['paySSPInAddition'] = $paySSPInAddition; return $this; } /** - * Gets averageWeeklyEarnings + * Gets payment * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeavePayType|null */ - public function getAverageWeeklyEarnings(): ?float + public function getPayment(): ?\SynergiTech\Staffology\Model\LeavePayType { - return $this->container['averageWeeklyEarnings']; + return $this->container['payment']; } /** - * Sets averageWeeklyEarnings + * Sets payment * - * @param float|null $averageWeeklyEarnings averageWeeklyEarnings + * @param \SynergiTech\Staffology\Model\LeavePayType|null $payment payment * * @return $this */ - public function setAverageWeeklyEarnings(?float $averageWeeklyEarnings): static + public function setPayment(?\SynergiTech\Staffology\Model\LeavePayType $payment): static { - if (is_null($averageWeeklyEarnings)) { - throw new InvalidArgumentException('non-nullable averageWeeklyEarnings cannot be null'); + if (is_null($payment)) { + throw new InvalidArgumentException('non-nullable payment cannot be null'); } - $this->container['averageWeeklyEarnings'] = $averageWeeklyEarnings; + $this->container['payment'] = $payment; return $this; } /** - * Gets automaticAWECalculation + * Gets payrollCode * - * @return bool|null + * @return string|null */ - public function getAutomaticAWECalculation(): ?bool + public function getPayrollCode(): ?string { - return $this->container['automaticAWECalculation']; + return $this->container['payrollCode']; } /** - * Sets automaticAWECalculation + * Sets payrollCode * - * @param bool|null $automaticAWECalculation automaticAWECalculation + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setAutomaticAWECalculation(?bool $automaticAWECalculation): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($automaticAWECalculation)) { - throw new InvalidArgumentException('non-nullable automaticAWECalculation cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['automaticAWECalculation'] = $automaticAWECalculation; + $this->container['payrollCode'] = $payrollCode; return $this; } /** - * Gets calculationType + * Gets percentOfPay * - * @return \SynergiTech\Staffology\Model\LeaveCalculationType|null + * @return float|null */ - public function getCalculationType(): ?\SynergiTech\Staffology\Model\LeaveCalculationType + public function getPercentOfPay(): ?float { - return $this->container['calculationType']; + return $this->container['percentOfPay']; } /** - * Sets calculationType + * Sets percentOfPay * - * @param \SynergiTech\Staffology\Model\LeaveCalculationType|null $calculationType calculationType + * @param float|null $percentOfPay percentOfPay * * @return $this */ - public function setCalculationType(?\SynergiTech\Staffology\Model\LeaveCalculationType $calculationType): static + public function setPercentOfPay(?float $percentOfPay): static { - if (is_null($calculationType)) { - throw new InvalidArgumentException('non-nullable calculationType cannot be null'); + if (is_null($percentOfPay)) { + throw new InvalidArgumentException('non-nullable percentOfPay cannot be null'); } - $this->container['calculationType'] = $calculationType; + $this->container['percentOfPay'] = $percentOfPay; + + return $this; + } + + /** + * Gets placementDate + * + * @return \DateTime|null + */ + public function getPlacementDate(): ?\DateTime + { + return $this->container['placementDate']; + } + + /** + * Sets placementDate + * + * @param \DateTime|null $placementDate placementDate + * + * @return $this + */ + public function setPlacementDate(?\DateTime $placementDate): static + { + if (is_null($placementDate)) { + array_push($this->openAPINullablesSetToNull, 'placementDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('placementDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['placementDate'] = $placementDate; return $this; } @@ -1258,55 +1292,55 @@ public function setStrikeHoursToDeduct(?float $strikeHoursToDeduct): static } /** - * Gets historicLeaveRequiresProcessing + * Gets to * - * @return bool|null + * @return \DateTime|null */ - public function getHistoricLeaveRequiresProcessing(): ?bool + public function getTo(): ?\DateTime { - return $this->container['historicLeaveRequiresProcessing']; + return $this->container['to']; } /** - * Sets historicLeaveRequiresProcessing + * Sets to * - * @param bool|null $historicLeaveRequiresProcessing historicLeaveRequiresProcessing + * @param \DateTime|null $to to * * @return $this */ - public function setHistoricLeaveRequiresProcessing(?bool $historicLeaveRequiresProcessing): static + public function setTo(?\DateTime $to): static { - if (is_null($historicLeaveRequiresProcessing)) { - throw new InvalidArgumentException('non-nullable historicLeaveRequiresProcessing cannot be null'); + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); } - $this->container['historicLeaveRequiresProcessing'] = $historicLeaveRequiresProcessing; + $this->container['to'] = $to; return $this; } /** - * Gets offsetPay + * Gets type * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LeaveType|null */ - public function getOffsetPay(): ?bool + public function getType(): ?\SynergiTech\Staffology\Model\LeaveType { - return $this->container['offsetPay']; + return $this->container['type']; } /** - * Sets offsetPay + * Sets type * - * @param bool|null $offsetPay offsetPay + * @param \SynergiTech\Staffology\Model\LeaveType|null $type type * * @return $this */ - public function setOffsetPay(?bool $offsetPay): static + public function setType(?\SynergiTech\Staffology\Model\LeaveType $type): static { - if (is_null($offsetPay)) { - throw new InvalidArgumentException('non-nullable offsetPay cannot be null'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['offsetPay'] = $offsetPay; + $this->container['type'] = $type; return $this; } @@ -1339,62 +1373,28 @@ public function setUseAssumedPensionablePay(?bool $useAssumedPensionablePay): st } /** - * Gets automaticAPPCalculation + * Gets useOpeningPay * * @return bool|null */ - public function getAutomaticAPPCalculation(): ?bool - { - return $this->container['automaticAPPCalculation']; - } - - /** - * Sets automaticAPPCalculation - * - * @param bool|null $automaticAPPCalculation automaticAPPCalculation - * - * @return $this - */ - public function setAutomaticAPPCalculation(?bool $automaticAPPCalculation): static - { - if (is_null($automaticAPPCalculation)) { - throw new InvalidArgumentException('non-nullable automaticAPPCalculation cannot be null'); - } - $this->container['automaticAPPCalculation'] = $automaticAPPCalculation; - - return $this; - } - - /** - * Gets assumedPensionablePay - * - * @return float|null - */ - public function getAssumedPensionablePay(): ?float + public function getUseOpeningPay(): ?bool { - return $this->container['assumedPensionablePay']; + return $this->container['useOpeningPay']; } /** - * Sets assumedPensionablePay + * Sets useOpeningPay * - * @param float|null $assumedPensionablePay assumedPensionablePay + * @param bool|null $useOpeningPay useOpeningPay * * @return $this */ - public function setAssumedPensionablePay(?float $assumedPensionablePay): static + public function setUseOpeningPay(?bool $useOpeningPay): static { - if (is_null($assumedPensionablePay)) { - array_push($this->openAPINullablesSetToNull, 'assumedPensionablePay'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('assumedPensionablePay', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useOpeningPay)) { + throw new InvalidArgumentException('non-nullable useOpeningPay cannot be null'); } - $this->container['assumedPensionablePay'] = $assumedPensionablePay; + $this->container['useOpeningPay'] = $useOpeningPay; return $this; } diff --git a/src/Model/EmployeeLeaveReportReportResponse.php b/src/Model/EmployeeLeaveReportReportResponse.php index ff7b388..fed6dcd 100644 --- a/src/Model/EmployeeLeaveReportReportResponse.php +++ b/src/Model/EmployeeLeaveReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class EmployeeLeaveReportReportResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\EmployeeLeaveReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class EmployeeLeaveReportReportResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class EmployeeLeaveReportReportResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/EmployeeLoanExportReport.php b/src/Model/EmployeeLoanExportReport.php new file mode 100644 index 0000000..cab5155 --- /dev/null +++ b/src/Model/EmployeeLoanExportReport.php @@ -0,0 +1,558 @@ + + */ +class EmployeeLoanExportReport implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'EmployeeLoanExportReport'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'isDraft' => 'bool', + 'lines' => '\SynergiTech\Staffology\Model\EmployeeLoanExportReportLine[]', + 'report' => '\SynergiTech\Staffology\Model\Report', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'isDraft' => null, + 'lines' => null, + 'report' => null, + 'taxYear' => null, + 'title' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'isDraft' => false, + 'lines' => true, + 'report' => false, + 'taxYear' => false, + 'title' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'isDraft' => 'isDraft', + 'lines' => 'lines', + 'report' => 'report', + 'taxYear' => 'taxYear', + 'title' => 'title' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'isDraft' => 'setIsDraft', + 'lines' => 'setLines', + 'report' => 'setReport', + 'taxYear' => 'setTaxYear', + 'title' => 'setTitle' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'isDraft' => 'getIsDraft', + 'lines' => 'getLines', + 'report' => 'getReport', + 'taxYear' => 'getTaxYear', + 'title' => 'getTitle' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + + /** + * Gets lines + * + * @return \SynergiTech\Staffology\Model\EmployeeLoanExportReportLine[]|null + */ + public function getLines(): ?array + { + return $this->container['lines']; + } + + /** + * Sets lines + * + * @param \SynergiTech\Staffology\Model\EmployeeLoanExportReportLine[]|null $lines lines + * + * @return $this + */ + public function setLines(?array $lines): static + { + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['lines'] = $lines; + + return $this; + } + + /** + * Gets report + * + * @return \SynergiTech\Staffology\Model\Report|null + */ + public function getReport(): ?\SynergiTech\Staffology\Model\Report + { + return $this->container['report']; + } + + /** + * Sets report + * + * @param \SynergiTech\Staffology\Model\Report|null $report report + * + * @return $this + */ + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + { + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); + } + $this->container['report'] = $report; + + return $this; + } + + /** + * Gets taxYear + * + * @return \SynergiTech\Staffology\Model\TaxYear|null + */ + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + { + return $this->container['taxYear']; + } + + /** + * Sets taxYear + * + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * + * @return $this + */ + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + { + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + } + $this->container['taxYear'] = $taxYear; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle(): ?string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title title + * + * @return $this + */ + public function setTitle(?string $title): static + { + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['title'] = $title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/EmployeeLoanExportReportLine.php b/src/Model/EmployeeLoanExportReportLine.php new file mode 100644 index 0000000..ee8d893 --- /dev/null +++ b/src/Model/EmployeeLoanExportReportLine.php @@ -0,0 +1,783 @@ + + */ +class EmployeeLoanExportReportLine implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'EmployeeLoanExportReportLine'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'firstName' => 'string', + 'issueDate' => '\DateTime', + 'loanAmount' => 'float', + 'pausePayments' => 'bool', + 'payCode' => 'string', + 'payrollCode' => 'string', + 'periodAmount' => 'float', + 'previouslyPaid' => 'float', + 'reference' => 'string', + 'surname' => 'string', + 'uniqueIdentifier' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'firstName' => null, + 'issueDate' => 'date', + 'loanAmount' => 'double', + 'pausePayments' => null, + 'payCode' => null, + 'payrollCode' => null, + 'periodAmount' => 'double', + 'previouslyPaid' => 'double', + 'reference' => null, + 'surname' => null, + 'uniqueIdentifier' => 'uuid' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'firstName' => true, + 'issueDate' => false, + 'loanAmount' => false, + 'pausePayments' => false, + 'payCode' => true, + 'payrollCode' => true, + 'periodAmount' => false, + 'previouslyPaid' => false, + 'reference' => true, + 'surname' => true, + 'uniqueIdentifier' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'firstName' => 'firstName', + 'issueDate' => 'issueDate', + 'loanAmount' => 'loanAmount', + 'pausePayments' => 'pausePayments', + 'payCode' => 'payCode', + 'payrollCode' => 'payrollCode', + 'periodAmount' => 'periodAmount', + 'previouslyPaid' => 'previouslyPaid', + 'reference' => 'reference', + 'surname' => 'surname', + 'uniqueIdentifier' => 'uniqueIdentifier' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'firstName' => 'setFirstName', + 'issueDate' => 'setIssueDate', + 'loanAmount' => 'setLoanAmount', + 'pausePayments' => 'setPausePayments', + 'payCode' => 'setPayCode', + 'payrollCode' => 'setPayrollCode', + 'periodAmount' => 'setPeriodAmount', + 'previouslyPaid' => 'setPreviouslyPaid', + 'reference' => 'setReference', + 'surname' => 'setSurname', + 'uniqueIdentifier' => 'setUniqueIdentifier' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'firstName' => 'getFirstName', + 'issueDate' => 'getIssueDate', + 'loanAmount' => 'getLoanAmount', + 'pausePayments' => 'getPausePayments', + 'payCode' => 'getPayCode', + 'payrollCode' => 'getPayrollCode', + 'periodAmount' => 'getPeriodAmount', + 'previouslyPaid' => 'getPreviouslyPaid', + 'reference' => 'getReference', + 'surname' => 'getSurname', + 'uniqueIdentifier' => 'getUniqueIdentifier' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('firstName', $data ?? [], null); + $this->setIfExists('issueDate', $data ?? [], null); + $this->setIfExists('loanAmount', $data ?? [], null); + $this->setIfExists('pausePayments', $data ?? [], null); + $this->setIfExists('payCode', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('periodAmount', $data ?? [], null); + $this->setIfExists('previouslyPaid', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('surname', $data ?? [], null); + $this->setIfExists('uniqueIdentifier', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets firstName + * + * @return string|null + */ + public function getFirstName(): ?string + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string|null $firstName firstName + * + * @return $this + */ + public function setFirstName(?string $firstName): static + { + if (is_null($firstName)) { + array_push($this->openAPINullablesSetToNull, 'firstName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('firstName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets issueDate + * + * @return \DateTime|null + */ + public function getIssueDate(): ?\DateTime + { + return $this->container['issueDate']; + } + + /** + * Sets issueDate + * + * @param \DateTime|null $issueDate issueDate + * + * @return $this + */ + public function setIssueDate(?\DateTime $issueDate): static + { + if (is_null($issueDate)) { + throw new InvalidArgumentException('non-nullable issueDate cannot be null'); + } + $this->container['issueDate'] = $issueDate; + + return $this; + } + + /** + * Gets loanAmount + * + * @return float|null + */ + public function getLoanAmount(): ?float + { + return $this->container['loanAmount']; + } + + /** + * Sets loanAmount + * + * @param float|null $loanAmount loanAmount + * + * @return $this + */ + public function setLoanAmount(?float $loanAmount): static + { + if (is_null($loanAmount)) { + throw new InvalidArgumentException('non-nullable loanAmount cannot be null'); + } + $this->container['loanAmount'] = $loanAmount; + + return $this; + } + + /** + * Gets pausePayments + * + * @return bool|null + */ + public function getPausePayments(): ?bool + { + return $this->container['pausePayments']; + } + + /** + * Sets pausePayments + * + * @param bool|null $pausePayments pausePayments + * + * @return $this + */ + public function setPausePayments(?bool $pausePayments): static + { + if (is_null($pausePayments)) { + throw new InvalidArgumentException('non-nullable pausePayments cannot be null'); + } + $this->container['pausePayments'] = $pausePayments; + + return $this; + } + + /** + * Gets payCode + * + * @return string|null + */ + public function getPayCode(): ?string + { + return $this->container['payCode']; + } + + /** + * Sets payCode + * + * @param string|null $payCode payCode + * + * @return $this + */ + public function setPayCode(?string $payCode): static + { + if (is_null($payCode)) { + array_push($this->openAPINullablesSetToNull, 'payCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payCode'] = $payCode; + + return $this; + } + + /** + * Gets payrollCode + * + * @return string|null + */ + public function getPayrollCode(): ?string + { + return $this->container['payrollCode']; + } + + /** + * Sets payrollCode + * + * @param string|null $payrollCode payrollCode + * + * @return $this + */ + public function setPayrollCode(?string $payrollCode): static + { + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payrollCode'] = $payrollCode; + + return $this; + } + + /** + * Gets periodAmount + * + * @return float|null + */ + public function getPeriodAmount(): ?float + { + return $this->container['periodAmount']; + } + + /** + * Sets periodAmount + * + * @param float|null $periodAmount periodAmount + * + * @return $this + */ + public function setPeriodAmount(?float $periodAmount): static + { + if (is_null($periodAmount)) { + throw new InvalidArgumentException('non-nullable periodAmount cannot be null'); + } + $this->container['periodAmount'] = $periodAmount; + + return $this; + } + + /** + * Gets previouslyPaid + * + * @return float|null + */ + public function getPreviouslyPaid(): ?float + { + return $this->container['previouslyPaid']; + } + + /** + * Sets previouslyPaid + * + * @param float|null $previouslyPaid previouslyPaid + * + * @return $this + */ + public function setPreviouslyPaid(?float $previouslyPaid): static + { + if (is_null($previouslyPaid)) { + throw new InvalidArgumentException('non-nullable previouslyPaid cannot be null'); + } + $this->container['previouslyPaid'] = $previouslyPaid; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference(): ?string + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference reference + * + * @return $this + */ + public function setReference(?string $reference): static + { + if (is_null($reference)) { + array_push($this->openAPINullablesSetToNull, 'reference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('reference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets surname + * + * @return string|null + */ + public function getSurname(): ?string + { + return $this->container['surname']; + } + + /** + * Sets surname + * + * @param string|null $surname surname + * + * @return $this + */ + public function setSurname(?string $surname): static + { + if (is_null($surname)) { + array_push($this->openAPINullablesSetToNull, 'surname'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('surname', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['surname'] = $surname; + + return $this; + } + + /** + * Gets uniqueIdentifier + * + * @return string|null + */ + public function getUniqueIdentifier(): ?string + { + return $this->container['uniqueIdentifier']; + } + + /** + * Sets uniqueIdentifier + * + * @param string|null $uniqueIdentifier uniqueIdentifier + * + * @return $this + */ + public function setUniqueIdentifier(?string $uniqueIdentifier): static + { + if (is_null($uniqueIdentifier)) { + throw new InvalidArgumentException('non-nullable uniqueIdentifier cannot be null'); + } + $this->container['uniqueIdentifier'] = $uniqueIdentifier; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/EmployeeLoanExportReportReportResponse.php b/src/Model/EmployeeLoanExportReportReportResponse.php new file mode 100644 index 0000000..856d030 --- /dev/null +++ b/src/Model/EmployeeLoanExportReportReportResponse.php @@ -0,0 +1,532 @@ + + */ +class EmployeeLoanExportReportReportResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'EmployeeLoanExportReportReportResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'content' => 'string', + 'model' => '\SynergiTech\Staffology\Model\EmployeeLoanExportReport', + 'stream' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'content' => null, + 'model' => null, + 'stream' => 'byte', + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'content' => true, + 'model' => false, + 'stream' => true, + 'type' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'content' => 'content', + 'model' => 'model', + 'stream' => 'stream', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'content' => 'setContent', + 'model' => 'setModel', + 'stream' => 'setStream', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'content' => 'getContent', + 'model' => 'getModel', + 'stream' => 'getStream', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('model', $data ?? [], null); + $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets content + * + * @return string|null + */ + public function getContent(): ?string + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string|null $content [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. + * + * @return $this + */ + public function setContent(?string $content): static + { + if (is_null($content)) { + array_push($this->openAPINullablesSetToNull, 'content'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('content', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets model + * + * @return \SynergiTech\Staffology\Model\EmployeeLoanExportReport|null + */ + public function getModel(): ?\SynergiTech\Staffology\Model\EmployeeLoanExportReport + { + return $this->container['model']; + } + + /** + * Sets model + * + * @param \SynergiTech\Staffology\Model\EmployeeLoanExportReport|null $model model + * + * @return $this + */ + public function setModel(?\SynergiTech\Staffology\Model\EmployeeLoanExportReport $model): static + { + if (is_null($model)) { + throw new InvalidArgumentException('non-nullable model cannot be null'); + } + $this->container['model'] = $model; + + return $this; + } + + /** + * Gets stream + * + * @return string|null + */ + public function getStream(): ?string + { + return $this->container['stream']; + } + + /** + * Sets stream + * + * @param string|null $stream byte array + * + * @return $this + */ + public function setStream(?string $stream): static + { + if (is_null($stream)) { + array_push($this->openAPINullablesSetToNull, 'stream'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('stream', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['stream'] = $stream; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/EmployeeNiYtdValues.php b/src/Model/EmployeeNiYtdValues.php index 38395b2..84e5be1 100644 --- a/src/Model/EmployeeNiYtdValues.php +++ b/src/Model/EmployeeNiYtdValues.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class EmployeeNiYtdValues implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPITypes = [ 'employee' => '\SynergiTech\Staffology\Model\Item', - 'payrollCode' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'niTable' => 'string', + 'payrollCode' => 'string', 'values' => '\SynergiTech\Staffology\Model\NiYtdValue[]' ]; @@ -74,10 +74,10 @@ class EmployeeNiYtdValues implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPIFormats = [ 'employee' => null, - 'payrollCode' => null, 'firstName' => null, 'lastName' => null, 'niTable' => null, + 'payrollCode' => null, 'values' => null ]; @@ -88,10 +88,10 @@ class EmployeeNiYtdValues implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPINullables = [ 'employee' => false, - 'payrollCode' => true, 'firstName' => true, 'lastName' => true, 'niTable' => false, + 'payrollCode' => true, 'values' => true ]; @@ -182,10 +182,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'employee' => 'employee', - 'payrollCode' => 'payrollCode', 'firstName' => 'firstName', 'lastName' => 'lastName', 'niTable' => 'niTable', + 'payrollCode' => 'payrollCode', 'values' => 'values' ]; @@ -196,10 +196,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'employee' => 'setEmployee', - 'payrollCode' => 'setPayrollCode', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', 'niTable' => 'setNiTable', + 'payrollCode' => 'setPayrollCode', 'values' => 'setValues' ]; @@ -210,10 +210,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'employee' => 'getEmployee', - 'payrollCode' => 'getPayrollCode', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', 'niTable' => 'getNiTable', + 'payrollCode' => 'getPayrollCode', 'values' => 'getValues' ]; @@ -274,10 +274,10 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('niTable', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('values', $data ?? [], null); } @@ -350,40 +350,6 @@ public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): stat return $this; } - /** - * Gets payrollCode - * - * @return string|null - */ - public function getPayrollCode(): ?string - { - return $this->container['payrollCode']; - } - - /** - * Sets payrollCode - * - * @param string|null $payrollCode payrollCode - * - * @return $this - */ - public function setPayrollCode(?string $payrollCode): static - { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['payrollCode'] = $payrollCode; - - return $this; - } - /** * Gets firstName * @@ -479,6 +445,40 @@ public function setNiTable(?string $niTable): static return $this; } + /** + * Gets payrollCode + * + * @return string|null + */ + public function getPayrollCode(): ?string + { + return $this->container['payrollCode']; + } + + /** + * Sets payrollCode + * + * @param string|null $payrollCode payrollCode + * + * @return $this + */ + public function setPayrollCode(?string $payrollCode): static + { + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payrollCode'] = $payrollCode; + + return $this; + } + /** * Gets values * diff --git a/src/Model/EmployeePayRunTotal.php b/src/Model/EmployeePayRunTotal.php index a725f55..637cce9 100644 --- a/src/Model/EmployeePayRunTotal.php +++ b/src/Model/EmployeePayRunTotal.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,18 +60,18 @@ class EmployeePayRunTotal implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ - 'payrollCode' => 'string', + 'employeeNi' => 'float', + 'employeePension' => 'float', + 'employeePensionContributionReliefAtSource' => 'float', + 'employeePensionContributionSalarySacrifice' => 'float', + 'employerNi' => 'float', + 'employerPensionContribution' => 'float', 'grossForNi' => 'float', 'grossPensionPay' => 'float', - 'employerPensionContribution' => 'float', - 'employerNi' => 'float', 'grossTaxablePay' => 'float', - 'employeeNi' => 'float', - 'tax' => 'float', + 'payrollCode' => 'string', 'studentLoanRecovered' => 'float', - 'employeePension' => 'float', - 'employeePensionContributionReliefAtSource' => 'float', - 'employeePensionContributionSalarySacrifice' => 'float' + 'tax' => 'float' ]; /** @@ -80,18 +80,18 @@ class EmployeePayRunTotal implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPIFormats = [ - 'payrollCode' => null, + 'employeeNi' => 'double', + 'employeePension' => 'double', + 'employeePensionContributionReliefAtSource' => 'double', + 'employeePensionContributionSalarySacrifice' => 'double', + 'employerNi' => 'double', + 'employerPensionContribution' => 'double', 'grossForNi' => 'double', 'grossPensionPay' => 'double', - 'employerPensionContribution' => 'double', - 'employerNi' => 'double', 'grossTaxablePay' => 'double', - 'employeeNi' => 'double', - 'tax' => 'double', + 'payrollCode' => null, 'studentLoanRecovered' => 'double', - 'employeePension' => 'double', - 'employeePensionContributionReliefAtSource' => 'double', - 'employeePensionContributionSalarySacrifice' => 'double' + 'tax' => 'double' ]; /** @@ -100,18 +100,18 @@ class EmployeePayRunTotal implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPINullables = [ - 'payrollCode' => true, + 'employeeNi' => false, + 'employeePension' => false, + 'employeePensionContributionReliefAtSource' => false, + 'employeePensionContributionSalarySacrifice' => false, + 'employerNi' => false, + 'employerPensionContribution' => false, 'grossForNi' => false, 'grossPensionPay' => false, - 'employerPensionContribution' => false, - 'employerNi' => false, 'grossTaxablePay' => false, - 'employeeNi' => false, - 'tax' => false, + 'payrollCode' => true, 'studentLoanRecovered' => false, - 'employeePension' => false, - 'employeePensionContributionReliefAtSource' => false, - 'employeePensionContributionSalarySacrifice' => false + 'tax' => false ]; /** @@ -200,18 +200,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollCode' => 'payrollCode', + 'employeeNi' => 'employeeNi', + 'employeePension' => 'employeePension', + 'employeePensionContributionReliefAtSource' => 'employeePensionContributionReliefAtSource', + 'employeePensionContributionSalarySacrifice' => 'employeePensionContributionSalarySacrifice', + 'employerNi' => 'employerNi', + 'employerPensionContribution' => 'employerPensionContribution', 'grossForNi' => 'grossForNi', 'grossPensionPay' => 'grossPensionPay', - 'employerPensionContribution' => 'employerPensionContribution', - 'employerNi' => 'employerNi', 'grossTaxablePay' => 'grossTaxablePay', - 'employeeNi' => 'employeeNi', - 'tax' => 'tax', + 'payrollCode' => 'payrollCode', 'studentLoanRecovered' => 'studentLoanRecovered', - 'employeePension' => 'employeePension', - 'employeePensionContributionReliefAtSource' => 'employeePensionContributionReliefAtSource', - 'employeePensionContributionSalarySacrifice' => 'employeePensionContributionSalarySacrifice' + 'tax' => 'tax' ]; /** @@ -220,18 +220,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollCode' => 'setPayrollCode', + 'employeeNi' => 'setEmployeeNi', + 'employeePension' => 'setEmployeePension', + 'employeePensionContributionReliefAtSource' => 'setEmployeePensionContributionReliefAtSource', + 'employeePensionContributionSalarySacrifice' => 'setEmployeePensionContributionSalarySacrifice', + 'employerNi' => 'setEmployerNi', + 'employerPensionContribution' => 'setEmployerPensionContribution', 'grossForNi' => 'setGrossForNi', 'grossPensionPay' => 'setGrossPensionPay', - 'employerPensionContribution' => 'setEmployerPensionContribution', - 'employerNi' => 'setEmployerNi', 'grossTaxablePay' => 'setGrossTaxablePay', - 'employeeNi' => 'setEmployeeNi', - 'tax' => 'setTax', + 'payrollCode' => 'setPayrollCode', 'studentLoanRecovered' => 'setStudentLoanRecovered', - 'employeePension' => 'setEmployeePension', - 'employeePensionContributionReliefAtSource' => 'setEmployeePensionContributionReliefAtSource', - 'employeePensionContributionSalarySacrifice' => 'setEmployeePensionContributionSalarySacrifice' + 'tax' => 'setTax' ]; /** @@ -240,18 +240,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollCode' => 'getPayrollCode', + 'employeeNi' => 'getEmployeeNi', + 'employeePension' => 'getEmployeePension', + 'employeePensionContributionReliefAtSource' => 'getEmployeePensionContributionReliefAtSource', + 'employeePensionContributionSalarySacrifice' => 'getEmployeePensionContributionSalarySacrifice', + 'employerNi' => 'getEmployerNi', + 'employerPensionContribution' => 'getEmployerPensionContribution', 'grossForNi' => 'getGrossForNi', 'grossPensionPay' => 'getGrossPensionPay', - 'employerPensionContribution' => 'getEmployerPensionContribution', - 'employerNi' => 'getEmployerNi', 'grossTaxablePay' => 'getGrossTaxablePay', - 'employeeNi' => 'getEmployeeNi', - 'tax' => 'getTax', + 'payrollCode' => 'getPayrollCode', 'studentLoanRecovered' => 'getStudentLoanRecovered', - 'employeePension' => 'getEmployeePension', - 'employeePensionContributionReliefAtSource' => 'getEmployeePensionContributionReliefAtSource', - 'employeePensionContributionSalarySacrifice' => 'getEmployeePensionContributionSalarySacrifice' + 'tax' => 'getTax' ]; /** @@ -310,18 +310,18 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('grossForNi', $data ?? [], null); - $this->setIfExists('grossPensionPay', $data ?? [], null); - $this->setIfExists('employerPensionContribution', $data ?? [], null); - $this->setIfExists('employerNi', $data ?? [], null); - $this->setIfExists('grossTaxablePay', $data ?? [], null); $this->setIfExists('employeeNi', $data ?? [], null); - $this->setIfExists('tax', $data ?? [], null); - $this->setIfExists('studentLoanRecovered', $data ?? [], null); $this->setIfExists('employeePension', $data ?? [], null); $this->setIfExists('employeePensionContributionReliefAtSource', $data ?? [], null); $this->setIfExists('employeePensionContributionSalarySacrifice', $data ?? [], null); + $this->setIfExists('employerNi', $data ?? [], null); + $this->setIfExists('employerPensionContribution', $data ?? [], null); + $this->setIfExists('grossForNi', $data ?? [], null); + $this->setIfExists('grossPensionPay', $data ?? [], null); + $this->setIfExists('grossTaxablePay', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('studentLoanRecovered', $data ?? [], null); + $this->setIfExists('tax', $data ?? [], null); } /** @@ -367,116 +367,109 @@ public function valid(): bool /** - * Gets payrollCode + * Gets employeeNi * - * @return string|null + * @return float|null */ - public function getPayrollCode(): ?string + public function getEmployeeNi(): ?float { - return $this->container['payrollCode']; + return $this->container['employeeNi']; } /** - * Sets payrollCode + * Sets employeeNi * - * @param string|null $payrollCode Payroll code of the employee + * @param float|null $employeeNi The Employee NI Contribution amount * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setEmployeeNi(?float $employeeNi): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employeeNi)) { + throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['employeeNi'] = $employeeNi; return $this; } /** - * Gets grossForNi + * Gets employeePension * * @return float|null */ - public function getGrossForNi(): ?float + public function getEmployeePension(): ?float { - return $this->container['grossForNi']; + return $this->container['employeePension']; } /** - * Sets grossForNi + * Sets employeePension * - * @param float|null $grossForNi The amount of the Gross that is subject to NI + * @param float|null $employeePension The value of the Pension Contribution(PENSION) being made by the Employee as a Net Pay Arrangement * * @return $this */ - public function setGrossForNi(?float $grossForNi): static + public function setEmployeePension(?float $employeePension): static { - if (is_null($grossForNi)) { - throw new InvalidArgumentException('non-nullable grossForNi cannot be null'); + if (is_null($employeePension)) { + throw new InvalidArgumentException('non-nullable employeePension cannot be null'); } - $this->container['grossForNi'] = $grossForNi; + $this->container['employeePension'] = $employeePension; return $this; } /** - * Gets grossPensionPay + * Gets employeePensionContributionReliefAtSource * * @return float|null */ - public function getGrossPensionPay(): ?float + public function getEmployeePensionContributionReliefAtSource(): ?float { - return $this->container['grossPensionPay']; + return $this->container['employeePensionContributionReliefAtSource']; } /** - * Sets grossPensionPay + * Sets employeePensionContributionReliefAtSource * - * @param float|null $grossPensionPay The amount of the Gross that is subject to PensionPay + * @param float|null $employeePensionContributionReliefAtSource The value of employee pension contributions Relief At Source(PENSIONRAS) that are not paid under 'net pay arrangements' * * @return $this */ - public function setGrossPensionPay(?float $grossPensionPay): static + public function setEmployeePensionContributionReliefAtSource(?float $employeePensionContributionReliefAtSource): static { - if (is_null($grossPensionPay)) { - throw new InvalidArgumentException('non-nullable grossPensionPay cannot be null'); + if (is_null($employeePensionContributionReliefAtSource)) { + throw new InvalidArgumentException('non-nullable employeePensionContributionReliefAtSource cannot be null'); } - $this->container['grossPensionPay'] = $grossPensionPay; + $this->container['employeePensionContributionReliefAtSource'] = $employeePensionContributionReliefAtSource; return $this; } /** - * Gets employerPensionContribution + * Gets employeePensionContributionSalarySacrifice * * @return float|null */ - public function getEmployerPensionContribution(): ?float + public function getEmployeePensionContributionSalarySacrifice(): ?float { - return $this->container['employerPensionContribution']; + return $this->container['employeePensionContributionSalarySacrifice']; } /** - * Sets employerPensionContribution + * Sets employeePensionContributionSalarySacrifice * - * @param float|null $employerPensionContribution The value of the Pension Contribution being made by the Employer for this Employee + * @param float|null $employeePensionContributionSalarySacrifice The value of the Pension Contribution Salary Sacrifice(PENSIONSS) being made by the Employee as a Salary Sacrifice * * @return $this */ - public function setEmployerPensionContribution(?float $employerPensionContribution): static + public function setEmployeePensionContributionSalarySacrifice(?float $employeePensionContributionSalarySacrifice): static { - if (is_null($employerPensionContribution)) { - throw new InvalidArgumentException('non-nullable employerPensionContribution cannot be null'); + if (is_null($employeePensionContributionSalarySacrifice)) { + throw new InvalidArgumentException('non-nullable employeePensionContributionSalarySacrifice cannot be null'); } - $this->container['employerPensionContribution'] = $employerPensionContribution; + $this->container['employeePensionContributionSalarySacrifice'] = $employeePensionContributionSalarySacrifice; return $this; } @@ -509,190 +502,197 @@ public function setEmployerNi(?float $employerNi): static } /** - * Gets grossTaxablePay + * Gets employerPensionContribution * * @return float|null */ - public function getGrossTaxablePay(): ?float + public function getEmployerPensionContribution(): ?float { - return $this->container['grossTaxablePay']; + return $this->container['employerPensionContribution']; } /** - * Sets grossTaxablePay + * Sets employerPensionContribution * - * @param float|null $grossTaxablePay The amount of the Gross that is subject to TaxablePay + * @param float|null $employerPensionContribution The value of the Pension Contribution being made by the Employer for this Employee * * @return $this */ - public function setGrossTaxablePay(?float $grossTaxablePay): static + public function setEmployerPensionContribution(?float $employerPensionContribution): static { - if (is_null($grossTaxablePay)) { - throw new InvalidArgumentException('non-nullable grossTaxablePay cannot be null'); + if (is_null($employerPensionContribution)) { + throw new InvalidArgumentException('non-nullable employerPensionContribution cannot be null'); } - $this->container['grossTaxablePay'] = $grossTaxablePay; + $this->container['employerPensionContribution'] = $employerPensionContribution; return $this; } /** - * Gets employeeNi + * Gets grossForNi * * @return float|null */ - public function getEmployeeNi(): ?float + public function getGrossForNi(): ?float { - return $this->container['employeeNi']; + return $this->container['grossForNi']; } /** - * Sets employeeNi + * Sets grossForNi * - * @param float|null $employeeNi The Employee NI Contribution amount + * @param float|null $grossForNi The amount of the Gross that is subject to NI * * @return $this */ - public function setEmployeeNi(?float $employeeNi): static + public function setGrossForNi(?float $grossForNi): static { - if (is_null($employeeNi)) { - throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); + if (is_null($grossForNi)) { + throw new InvalidArgumentException('non-nullable grossForNi cannot be null'); } - $this->container['employeeNi'] = $employeeNi; + $this->container['grossForNi'] = $grossForNi; return $this; } /** - * Gets tax + * Gets grossPensionPay * * @return float|null */ - public function getTax(): ?float + public function getGrossPensionPay(): ?float { - return $this->container['tax']; + return $this->container['grossPensionPay']; } /** - * Sets tax + * Sets grossPensionPay * - * @param float|null $tax The Employee Tax amount + * @param float|null $grossPensionPay The amount of the Gross that is subject to PensionPay * * @return $this */ - public function setTax(?float $tax): static + public function setGrossPensionPay(?float $grossPensionPay): static { - if (is_null($tax)) { - throw new InvalidArgumentException('non-nullable tax cannot be null'); + if (is_null($grossPensionPay)) { + throw new InvalidArgumentException('non-nullable grossPensionPay cannot be null'); } - $this->container['tax'] = $tax; + $this->container['grossPensionPay'] = $grossPensionPay; return $this; } /** - * Gets studentLoanRecovered + * Gets grossTaxablePay * * @return float|null */ - public function getStudentLoanRecovered(): ?float + public function getGrossTaxablePay(): ?float { - return $this->container['studentLoanRecovered']; + return $this->container['grossTaxablePay']; } /** - * Sets studentLoanRecovered + * Sets grossTaxablePay * - * @param float|null $studentLoanRecovered The Employee Student Loan recovered amount + * @param float|null $grossTaxablePay The amount of the Gross that is subject to TaxablePay * * @return $this */ - public function setStudentLoanRecovered(?float $studentLoanRecovered): static + public function setGrossTaxablePay(?float $grossTaxablePay): static { - if (is_null($studentLoanRecovered)) { - throw new InvalidArgumentException('non-nullable studentLoanRecovered cannot be null'); + if (is_null($grossTaxablePay)) { + throw new InvalidArgumentException('non-nullable grossTaxablePay cannot be null'); } - $this->container['studentLoanRecovered'] = $studentLoanRecovered; + $this->container['grossTaxablePay'] = $grossTaxablePay; return $this; } /** - * Gets employeePension + * Gets payrollCode * - * @return float|null + * @return string|null */ - public function getEmployeePension(): ?float + public function getPayrollCode(): ?string { - return $this->container['employeePension']; + return $this->container['payrollCode']; } /** - * Sets employeePension + * Sets payrollCode * - * @param float|null $employeePension The value of the Pension Contribution(PENSION) being made by the Employee as a Net Pay Arrangement + * @param string|null $payrollCode Payroll code of the employee * * @return $this */ - public function setEmployeePension(?float $employeePension): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($employeePension)) { - throw new InvalidArgumentException('non-nullable employeePension cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeePension'] = $employeePension; + $this->container['payrollCode'] = $payrollCode; return $this; } /** - * Gets employeePensionContributionReliefAtSource + * Gets studentLoanRecovered * * @return float|null */ - public function getEmployeePensionContributionReliefAtSource(): ?float + public function getStudentLoanRecovered(): ?float { - return $this->container['employeePensionContributionReliefAtSource']; + return $this->container['studentLoanRecovered']; } /** - * Sets employeePensionContributionReliefAtSource + * Sets studentLoanRecovered * - * @param float|null $employeePensionContributionReliefAtSource The value of employee pension contributions Relief At Source(PENSIONRAS) that are not paid under 'net pay arrangements' + * @param float|null $studentLoanRecovered The Employee Student Loan recovered amount * * @return $this */ - public function setEmployeePensionContributionReliefAtSource(?float $employeePensionContributionReliefAtSource): static + public function setStudentLoanRecovered(?float $studentLoanRecovered): static { - if (is_null($employeePensionContributionReliefAtSource)) { - throw new InvalidArgumentException('non-nullable employeePensionContributionReliefAtSource cannot be null'); + if (is_null($studentLoanRecovered)) { + throw new InvalidArgumentException('non-nullable studentLoanRecovered cannot be null'); } - $this->container['employeePensionContributionReliefAtSource'] = $employeePensionContributionReliefAtSource; + $this->container['studentLoanRecovered'] = $studentLoanRecovered; return $this; } /** - * Gets employeePensionContributionSalarySacrifice + * Gets tax * * @return float|null */ - public function getEmployeePensionContributionSalarySacrifice(): ?float + public function getTax(): ?float { - return $this->container['employeePensionContributionSalarySacrifice']; + return $this->container['tax']; } /** - * Sets employeePensionContributionSalarySacrifice + * Sets tax * - * @param float|null $employeePensionContributionSalarySacrifice The value of the Pension Contribution Salary Sacrifice(PENSIONSS) being made by the Employee as a Salary Sacrifice + * @param float|null $tax The Employee Tax amount * * @return $this */ - public function setEmployeePensionContributionSalarySacrifice(?float $employeePensionContributionSalarySacrifice): static + public function setTax(?float $tax): static { - if (is_null($employeePensionContributionSalarySacrifice)) { - throw new InvalidArgumentException('non-nullable employeePensionContributionSalarySacrifice cannot be null'); + if (is_null($tax)) { + throw new InvalidArgumentException('non-nullable tax cannot be null'); } - $this->container['employeePensionContributionSalarySacrifice'] = $employeePensionContributionSalarySacrifice; + $this->container['tax'] = $tax; return $this; } diff --git a/src/Model/EmployeePaymentsReportLine.php b/src/Model/EmployeePaymentsReportLine.php index 9591456..b7befdc 100644 --- a/src/Model/EmployeePaymentsReportLine.php +++ b/src/Model/EmployeePaymentsReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,35 +59,37 @@ class EmployeePaymentsReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'payrollCode' => 'string', - 'uniqueIdentifier' => 'string', 'amount' => 'float', - 'multiplierType' => 'int', - 'multiplier' => 'float', - 'hours' => 'float', + 'autoAdjustForLeave' => 'bool', + 'calculateAsWhenPaid' => 'bool', + 'contributesToBasicPay' => 'bool', + 'costCentre' => 'string', + 'costCentreId' => 'string', 'days' => 'float', - 'payCode' => 'string', + 'department' => 'string', + 'departmentId' => 'string', 'description' => 'string', 'effectiveFrom' => '\DateTime', 'effectiveTo' => '\DateTime', - 'isNetToGross' => 'bool', - 'department' => 'string', - 'costCentre' => 'string', - 'isAutomaticBackPay' => 'bool', + 'employeeName' => 'string', + 'hours' => 'float', 'ignoreInitialBackPay' => 'bool', - 'contributesToBasicPay' => 'bool', - 'autoAdjustForLeave' => 'bool', - 'roleReference' => 'string', - 'paySpine' => 'string', - 'payGrade' => 'string', - 'spinePoint' => 'string', + 'isAutomaticBackPay' => 'bool', + 'isNetToGross' => 'bool', 'londonAllowanceType' => 'string', - 'calculateAsWhenPaid' => 'bool', - 'departmentId' => 'string', - 'costCentreId' => 'string', + 'multiplier' => 'float', + 'multiplierType' => 'int', + 'payCode' => 'string', + 'payGrade' => 'string', + 'paySpine' => 'string', + 'paySpineGradeId' => 'string', 'paySpineId' => 'string', + 'payrollCode' => 'string', + 'percentage' => 'float', + 'roleReference' => 'string', 'spinalPointId' => 'string', - 'paySpineGradeId' => 'string' + 'spinePoint' => 'string', + 'uniqueIdentifier' => 'string' ]; /** @@ -96,35 +98,37 @@ class EmployeePaymentsReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'payrollCode' => null, - 'uniqueIdentifier' => 'uuid', 'amount' => 'double', - 'multiplierType' => 'int32', - 'multiplier' => 'double', - 'hours' => 'double', + 'autoAdjustForLeave' => null, + 'calculateAsWhenPaid' => null, + 'contributesToBasicPay' => null, + 'costCentre' => null, + 'costCentreId' => 'uuid', 'days' => 'double', - 'payCode' => null, + 'department' => null, + 'departmentId' => 'uuid', 'description' => null, 'effectiveFrom' => 'date', 'effectiveTo' => 'date', - 'isNetToGross' => null, - 'department' => null, - 'costCentre' => null, - 'isAutomaticBackPay' => null, + 'employeeName' => null, + 'hours' => 'double', 'ignoreInitialBackPay' => null, - 'contributesToBasicPay' => null, - 'autoAdjustForLeave' => null, - 'roleReference' => null, - 'paySpine' => null, - 'payGrade' => null, - 'spinePoint' => null, + 'isAutomaticBackPay' => null, + 'isNetToGross' => null, 'londonAllowanceType' => null, - 'calculateAsWhenPaid' => null, - 'departmentId' => 'uuid', - 'costCentreId' => 'uuid', + 'multiplier' => 'double', + 'multiplierType' => 'int32', + 'payCode' => null, + 'payGrade' => null, + 'paySpine' => null, + 'paySpineGradeId' => 'uuid', 'paySpineId' => 'uuid', + 'payrollCode' => null, + 'percentage' => 'double', + 'roleReference' => null, 'spinalPointId' => 'uuid', - 'paySpineGradeId' => 'uuid' + 'spinePoint' => null, + 'uniqueIdentifier' => 'uuid' ]; /** @@ -133,35 +137,37 @@ class EmployeePaymentsReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'payrollCode' => true, - 'uniqueIdentifier' => false, 'amount' => false, - 'multiplierType' => false, - 'multiplier' => true, - 'hours' => true, + 'autoAdjustForLeave' => false, + 'calculateAsWhenPaid' => false, + 'contributesToBasicPay' => false, + 'costCentre' => true, + 'costCentreId' => false, 'days' => true, - 'payCode' => true, + 'department' => true, + 'departmentId' => false, 'description' => true, 'effectiveFrom' => true, 'effectiveTo' => true, - 'isNetToGross' => false, - 'department' => true, - 'costCentre' => true, - 'isAutomaticBackPay' => false, + 'employeeName' => true, + 'hours' => true, 'ignoreInitialBackPay' => false, - 'contributesToBasicPay' => false, - 'autoAdjustForLeave' => false, - 'roleReference' => true, - 'paySpine' => true, - 'payGrade' => true, - 'spinePoint' => true, + 'isAutomaticBackPay' => false, + 'isNetToGross' => false, 'londonAllowanceType' => true, - 'calculateAsWhenPaid' => false, - 'departmentId' => false, - 'costCentreId' => false, + 'multiplier' => true, + 'multiplierType' => false, + 'payCode' => true, + 'payGrade' => true, + 'paySpine' => true, + 'paySpineGradeId' => false, 'paySpineId' => false, + 'payrollCode' => true, + 'percentage' => true, + 'roleReference' => true, 'spinalPointId' => false, - 'paySpineGradeId' => false + 'spinePoint' => true, + 'uniqueIdentifier' => false ]; /** @@ -250,35 +256,37 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollCode' => 'payrollCode', - 'uniqueIdentifier' => 'uniqueIdentifier', 'amount' => 'amount', - 'multiplierType' => 'multiplierType', - 'multiplier' => 'multiplier', - 'hours' => 'hours', + 'autoAdjustForLeave' => 'autoAdjustForLeave', + 'calculateAsWhenPaid' => 'calculateAsWhenPaid', + 'contributesToBasicPay' => 'contributesToBasicPay', + 'costCentre' => 'costCentre', + 'costCentreId' => 'costCentreId', 'days' => 'days', - 'payCode' => 'payCode', + 'department' => 'department', + 'departmentId' => 'departmentId', 'description' => 'description', 'effectiveFrom' => 'effectiveFrom', 'effectiveTo' => 'effectiveTo', - 'isNetToGross' => 'isNetToGross', - 'department' => 'department', - 'costCentre' => 'costCentre', - 'isAutomaticBackPay' => 'isAutomaticBackPay', + 'employeeName' => 'employeeName', + 'hours' => 'hours', 'ignoreInitialBackPay' => 'ignoreInitialBackPay', - 'contributesToBasicPay' => 'contributesToBasicPay', - 'autoAdjustForLeave' => 'autoAdjustForLeave', - 'roleReference' => 'roleReference', - 'paySpine' => 'paySpine', - 'payGrade' => 'payGrade', - 'spinePoint' => 'spinePoint', + 'isAutomaticBackPay' => 'isAutomaticBackPay', + 'isNetToGross' => 'isNetToGross', 'londonAllowanceType' => 'londonAllowanceType', - 'calculateAsWhenPaid' => 'calculateAsWhenPaid', - 'departmentId' => 'departmentId', - 'costCentreId' => 'costCentreId', + 'multiplier' => 'multiplier', + 'multiplierType' => 'multiplierType', + 'payCode' => 'payCode', + 'payGrade' => 'payGrade', + 'paySpine' => 'paySpine', + 'paySpineGradeId' => 'paySpineGradeId', 'paySpineId' => 'paySpineId', + 'payrollCode' => 'payrollCode', + 'percentage' => 'percentage', + 'roleReference' => 'roleReference', 'spinalPointId' => 'spinalPointId', - 'paySpineGradeId' => 'paySpineGradeId' + 'spinePoint' => 'spinePoint', + 'uniqueIdentifier' => 'uniqueIdentifier' ]; /** @@ -287,35 +295,37 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollCode' => 'setPayrollCode', - 'uniqueIdentifier' => 'setUniqueIdentifier', 'amount' => 'setAmount', - 'multiplierType' => 'setMultiplierType', - 'multiplier' => 'setMultiplier', - 'hours' => 'setHours', + 'autoAdjustForLeave' => 'setAutoAdjustForLeave', + 'calculateAsWhenPaid' => 'setCalculateAsWhenPaid', + 'contributesToBasicPay' => 'setContributesToBasicPay', + 'costCentre' => 'setCostCentre', + 'costCentreId' => 'setCostCentreId', 'days' => 'setDays', - 'payCode' => 'setPayCode', + 'department' => 'setDepartment', + 'departmentId' => 'setDepartmentId', 'description' => 'setDescription', 'effectiveFrom' => 'setEffectiveFrom', 'effectiveTo' => 'setEffectiveTo', - 'isNetToGross' => 'setIsNetToGross', - 'department' => 'setDepartment', - 'costCentre' => 'setCostCentre', - 'isAutomaticBackPay' => 'setIsAutomaticBackPay', + 'employeeName' => 'setEmployeeName', + 'hours' => 'setHours', 'ignoreInitialBackPay' => 'setIgnoreInitialBackPay', - 'contributesToBasicPay' => 'setContributesToBasicPay', - 'autoAdjustForLeave' => 'setAutoAdjustForLeave', - 'roleReference' => 'setRoleReference', - 'paySpine' => 'setPaySpine', - 'payGrade' => 'setPayGrade', - 'spinePoint' => 'setSpinePoint', + 'isAutomaticBackPay' => 'setIsAutomaticBackPay', + 'isNetToGross' => 'setIsNetToGross', 'londonAllowanceType' => 'setLondonAllowanceType', - 'calculateAsWhenPaid' => 'setCalculateAsWhenPaid', - 'departmentId' => 'setDepartmentId', - 'costCentreId' => 'setCostCentreId', + 'multiplier' => 'setMultiplier', + 'multiplierType' => 'setMultiplierType', + 'payCode' => 'setPayCode', + 'payGrade' => 'setPayGrade', + 'paySpine' => 'setPaySpine', + 'paySpineGradeId' => 'setPaySpineGradeId', 'paySpineId' => 'setPaySpineId', + 'payrollCode' => 'setPayrollCode', + 'percentage' => 'setPercentage', + 'roleReference' => 'setRoleReference', 'spinalPointId' => 'setSpinalPointId', - 'paySpineGradeId' => 'setPaySpineGradeId' + 'spinePoint' => 'setSpinePoint', + 'uniqueIdentifier' => 'setUniqueIdentifier' ]; /** @@ -324,35 +334,37 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollCode' => 'getPayrollCode', - 'uniqueIdentifier' => 'getUniqueIdentifier', 'amount' => 'getAmount', - 'multiplierType' => 'getMultiplierType', - 'multiplier' => 'getMultiplier', - 'hours' => 'getHours', + 'autoAdjustForLeave' => 'getAutoAdjustForLeave', + 'calculateAsWhenPaid' => 'getCalculateAsWhenPaid', + 'contributesToBasicPay' => 'getContributesToBasicPay', + 'costCentre' => 'getCostCentre', + 'costCentreId' => 'getCostCentreId', 'days' => 'getDays', - 'payCode' => 'getPayCode', + 'department' => 'getDepartment', + 'departmentId' => 'getDepartmentId', 'description' => 'getDescription', 'effectiveFrom' => 'getEffectiveFrom', 'effectiveTo' => 'getEffectiveTo', - 'isNetToGross' => 'getIsNetToGross', - 'department' => 'getDepartment', - 'costCentre' => 'getCostCentre', - 'isAutomaticBackPay' => 'getIsAutomaticBackPay', + 'employeeName' => 'getEmployeeName', + 'hours' => 'getHours', 'ignoreInitialBackPay' => 'getIgnoreInitialBackPay', - 'contributesToBasicPay' => 'getContributesToBasicPay', - 'autoAdjustForLeave' => 'getAutoAdjustForLeave', - 'roleReference' => 'getRoleReference', - 'paySpine' => 'getPaySpine', - 'payGrade' => 'getPayGrade', - 'spinePoint' => 'getSpinePoint', + 'isAutomaticBackPay' => 'getIsAutomaticBackPay', + 'isNetToGross' => 'getIsNetToGross', 'londonAllowanceType' => 'getLondonAllowanceType', - 'calculateAsWhenPaid' => 'getCalculateAsWhenPaid', - 'departmentId' => 'getDepartmentId', - 'costCentreId' => 'getCostCentreId', + 'multiplier' => 'getMultiplier', + 'multiplierType' => 'getMultiplierType', + 'payCode' => 'getPayCode', + 'payGrade' => 'getPayGrade', + 'paySpine' => 'getPaySpine', + 'paySpineGradeId' => 'getPaySpineGradeId', 'paySpineId' => 'getPaySpineId', + 'payrollCode' => 'getPayrollCode', + 'percentage' => 'getPercentage', + 'roleReference' => 'getRoleReference', 'spinalPointId' => 'getSpinalPointId', - 'paySpineGradeId' => 'getPaySpineGradeId' + 'spinePoint' => 'getSpinePoint', + 'uniqueIdentifier' => 'getUniqueIdentifier' ]; /** @@ -411,35 +423,37 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('uniqueIdentifier', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); - $this->setIfExists('multiplierType', $data ?? [], null); - $this->setIfExists('multiplier', $data ?? [], null); - $this->setIfExists('hours', $data ?? [], null); + $this->setIfExists('autoAdjustForLeave', $data ?? [], null); + $this->setIfExists('calculateAsWhenPaid', $data ?? [], null); + $this->setIfExists('contributesToBasicPay', $data ?? [], null); + $this->setIfExists('costCentre', $data ?? [], null); + $this->setIfExists('costCentreId', $data ?? [], null); $this->setIfExists('days', $data ?? [], null); - $this->setIfExists('payCode', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('departmentId', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('effectiveFrom', $data ?? [], null); $this->setIfExists('effectiveTo', $data ?? [], null); - $this->setIfExists('isNetToGross', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); - $this->setIfExists('costCentre', $data ?? [], null); - $this->setIfExists('isAutomaticBackPay', $data ?? [], null); + $this->setIfExists('employeeName', $data ?? [], null); + $this->setIfExists('hours', $data ?? [], null); $this->setIfExists('ignoreInitialBackPay', $data ?? [], null); - $this->setIfExists('contributesToBasicPay', $data ?? [], null); - $this->setIfExists('autoAdjustForLeave', $data ?? [], null); - $this->setIfExists('roleReference', $data ?? [], null); - $this->setIfExists('paySpine', $data ?? [], null); - $this->setIfExists('payGrade', $data ?? [], null); - $this->setIfExists('spinePoint', $data ?? [], null); + $this->setIfExists('isAutomaticBackPay', $data ?? [], null); + $this->setIfExists('isNetToGross', $data ?? [], null); $this->setIfExists('londonAllowanceType', $data ?? [], null); - $this->setIfExists('calculateAsWhenPaid', $data ?? [], null); - $this->setIfExists('departmentId', $data ?? [], null); - $this->setIfExists('costCentreId', $data ?? [], null); + $this->setIfExists('multiplier', $data ?? [], null); + $this->setIfExists('multiplierType', $data ?? [], null); + $this->setIfExists('payCode', $data ?? [], null); + $this->setIfExists('payGrade', $data ?? [], null); + $this->setIfExists('paySpine', $data ?? [], null); + $this->setIfExists('paySpineGradeId', $data ?? [], null); $this->setIfExists('paySpineId', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('percentage', $data ?? [], null); + $this->setIfExists('roleReference', $data ?? [], null); $this->setIfExists('spinalPointId', $data ?? [], null); - $this->setIfExists('paySpineGradeId', $data ?? [], null); + $this->setIfExists('spinePoint', $data ?? [], null); + $this->setIfExists('uniqueIdentifier', $data ?? [], null); } /** @@ -485,184 +499,170 @@ public function valid(): bool /** - * Gets payrollCode + * Gets amount * - * @return string|null + * @return float|null */ - public function getPayrollCode(): ?string + public function getAmount(): ?float { - return $this->container['payrollCode']; + return $this->container['amount']; } /** - * Sets payrollCode + * Sets amount * - * @param string|null $payrollCode Payroll Code for exported pay line + * @param float|null $amount Amount for exported pay line * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setAmount(?float $amount): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($amount)) { + throw new InvalidArgumentException('non-nullable amount cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['amount'] = $amount; return $this; } /** - * Gets uniqueIdentifier + * Gets autoAdjustForLeave * - * @return string|null + * @return bool|null */ - public function getUniqueIdentifier(): ?string + public function getAutoAdjustForLeave(): ?bool { - return $this->container['uniqueIdentifier']; + return $this->container['autoAdjustForLeave']; } /** - * Sets uniqueIdentifier + * Sets autoAdjustForLeave * - * @param string|null $uniqueIdentifier Unique Id for exported pay line + * @param bool|null $autoAdjustForLeave Indicates Auto Adjust For Leave value for exported pay line * * @return $this */ - public function setUniqueIdentifier(?string $uniqueIdentifier): static + public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static { - if (is_null($uniqueIdentifier)) { - throw new InvalidArgumentException('non-nullable uniqueIdentifier cannot be null'); + if (is_null($autoAdjustForLeave)) { + throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); } - $this->container['uniqueIdentifier'] = $uniqueIdentifier; + $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; return $this; } /** - * Gets amount + * Gets calculateAsWhenPaid * - * @return float|null + * @return bool|null */ - public function getAmount(): ?float + public function getCalculateAsWhenPaid(): ?bool { - return $this->container['amount']; + return $this->container['calculateAsWhenPaid']; } /** - * Sets amount + * Sets calculateAsWhenPaid * - * @param float|null $amount Amount for exported pay line + * @param bool|null $calculateAsWhenPaid Indicates whether this pay line should be treated as When Paid rather than When Earned * * @return $this */ - public function setAmount(?float $amount): static + public function setCalculateAsWhenPaid(?bool $calculateAsWhenPaid): static { - if (is_null($amount)) { - throw new InvalidArgumentException('non-nullable amount cannot be null'); + if (is_null($calculateAsWhenPaid)) { + throw new InvalidArgumentException('non-nullable calculateAsWhenPaid cannot be null'); } - $this->container['amount'] = $amount; + $this->container['calculateAsWhenPaid'] = $calculateAsWhenPaid; return $this; } /** - * Gets multiplierType + * Gets contributesToBasicPay * - * @return int|null + * @return bool|null */ - public function getMultiplierType(): ?int + public function getContributesToBasicPay(): ?bool { - return $this->container['multiplierType']; + return $this->container['contributesToBasicPay']; } /** - * Sets multiplierType + * Sets contributesToBasicPay * - * @param int|null $multiplierType MultiplierType of exported pay line + * @param bool|null $contributesToBasicPay Indicates Contributes To Basic Pay value for exported pay line * * @return $this */ - public function setMultiplierType(?int $multiplierType): static + public function setContributesToBasicPay(?bool $contributesToBasicPay): static { - if (is_null($multiplierType)) { - throw new InvalidArgumentException('non-nullable multiplierType cannot be null'); + if (is_null($contributesToBasicPay)) { + throw new InvalidArgumentException('non-nullable contributesToBasicPay cannot be null'); } - $this->container['multiplierType'] = $multiplierType; + $this->container['contributesToBasicPay'] = $contributesToBasicPay; return $this; } /** - * Gets multiplier + * Gets costCentre * - * @return float|null + * @return string|null */ - public function getMultiplier(): ?float + public function getCostCentre(): ?string { - return $this->container['multiplier']; + return $this->container['costCentre']; } /** - * Sets multiplier + * Sets costCentre * - * @param float|null $multiplier Multiplier for exported pay line + * @param string|null $costCentre Cost Centre for exported pay line * * @return $this */ - public function setMultiplier(?float $multiplier): static + public function setCostCentre(?string $costCentre): static { - if (is_null($multiplier)) { - array_push($this->openAPINullablesSetToNull, 'multiplier'); + if (is_null($costCentre)) { + array_push($this->openAPINullablesSetToNull, 'costCentre'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('multiplier', $nullablesSetToNull); + $index = array_search('costCentre', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['multiplier'] = $multiplier; + $this->container['costCentre'] = $costCentre; return $this; } /** - * Gets hours + * Gets costCentreId * - * @return float|null + * @return string|null */ - public function getHours(): ?float + public function getCostCentreId(): ?string { - return $this->container['hours']; + return $this->container['costCentreId']; } /** - * Sets hours + * Sets costCentreId * - * @param float|null $hours Number of Hours for exported pay line + * @param string|null $costCentreId Cost Centre ID associated with the exported payline * * @return $this */ - public function setHours(?float $hours): static + public function setCostCentreId(?string $costCentreId): static { - if (is_null($hours)) { - array_push($this->openAPINullablesSetToNull, 'hours'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('hours', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($costCentreId)) { + throw new InvalidArgumentException('non-nullable costCentreId cannot be null'); } - $this->container['hours'] = $hours; + $this->container['costCentreId'] = $costCentreId; return $this; } @@ -702,35 +702,62 @@ public function setDays(?float $days): static } /** - * Gets payCode + * Gets department * * @return string|null */ - public function getPayCode(): ?string + public function getDepartment(): ?string { - return $this->container['payCode']; + return $this->container['department']; } /** - * Sets payCode + * Sets department * - * @param string|null $payCode Pay code for exported pay line + * @param string|null $department Department for exported pay line * * @return $this */ - public function setPayCode(?string $payCode): static + public function setDepartment(?string $department): static { - if (is_null($payCode)) { - array_push($this->openAPINullablesSetToNull, 'payCode'); + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCode', $nullablesSetToNull); + $index = array_search('department', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payCode'] = $payCode; + $this->container['department'] = $department; + + return $this; + } + + /** + * Gets departmentId + * + * @return string|null + */ + public function getDepartmentId(): ?string + { + return $this->container['departmentId']; + } + + /** + * Sets departmentId + * + * @param string|null $departmentId Department ID associated with the exported payline + * + * @return $this + */ + public function setDepartmentId(?string $departmentId): static + { + if (is_null($departmentId)) { + throw new InvalidArgumentException('non-nullable departmentId cannot be null'); + } + $this->container['departmentId'] = $departmentId; return $this; } @@ -838,96 +865,96 @@ public function setEffectiveTo(?\DateTime $effectiveTo): static } /** - * Gets isNetToGross + * Gets employeeName * - * @return bool|null + * @return string|null */ - public function getIsNetToGross(): ?bool + public function getEmployeeName(): ?string { - return $this->container['isNetToGross']; + return $this->container['employeeName']; } /** - * Sets isNetToGross + * Sets employeeName * - * @param bool|null $isNetToGross Indicates Gross To Net value for exported pay line + * @param string|null $employeeName Employee Name for exported pay line * * @return $this */ - public function setIsNetToGross(?bool $isNetToGross): static + public function setEmployeeName(?string $employeeName): static { - if (is_null($isNetToGross)) { - throw new InvalidArgumentException('non-nullable isNetToGross cannot be null'); + if (is_null($employeeName)) { + array_push($this->openAPINullablesSetToNull, 'employeeName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employeeName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isNetToGross'] = $isNetToGross; + $this->container['employeeName'] = $employeeName; return $this; } /** - * Gets department + * Gets hours * - * @return string|null + * @return float|null */ - public function getDepartment(): ?string + public function getHours(): ?float { - return $this->container['department']; + return $this->container['hours']; } /** - * Sets department + * Sets hours * - * @param string|null $department Department for exported pay line + * @param float|null $hours Number of Hours for exported pay line * * @return $this */ - public function setDepartment(?string $department): static + public function setHours(?float $hours): static { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); + if (is_null($hours)) { + array_push($this->openAPINullablesSetToNull, 'hours'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); + $index = array_search('hours', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['department'] = $department; + $this->container['hours'] = $hours; return $this; } /** - * Gets costCentre + * Gets ignoreInitialBackPay * - * @return string|null + * @return bool|null */ - public function getCostCentre(): ?string + public function getIgnoreInitialBackPay(): ?bool { - return $this->container['costCentre']; + return $this->container['ignoreInitialBackPay']; } /** - * Sets costCentre + * Sets ignoreInitialBackPay * - * @param string|null $costCentre Cost Centre for exported pay line + * @param bool|null $ignoreInitialBackPay Indicates Ignore Initial Back Pay value for exported pay line * * @return $this */ - public function setCostCentre(?string $costCentre): static + public function setIgnoreInitialBackPay(?bool $ignoreInitialBackPay): static { - if (is_null($costCentre)) { - array_push($this->openAPINullablesSetToNull, 'costCentre'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costCentre', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($ignoreInitialBackPay)) { + throw new InvalidArgumentException('non-nullable ignoreInitialBackPay cannot be null'); } - $this->container['costCentre'] = $costCentre; + $this->container['ignoreInitialBackPay'] = $ignoreInitialBackPay; return $this; } @@ -960,150 +987,157 @@ public function setIsAutomaticBackPay(?bool $isAutomaticBackPay): static } /** - * Gets ignoreInitialBackPay + * Gets isNetToGross * * @return bool|null */ - public function getIgnoreInitialBackPay(): ?bool + public function getIsNetToGross(): ?bool { - return $this->container['ignoreInitialBackPay']; + return $this->container['isNetToGross']; } /** - * Sets ignoreInitialBackPay + * Sets isNetToGross * - * @param bool|null $ignoreInitialBackPay Indicates Ignore Initial Back Pay value for exported pay line + * @param bool|null $isNetToGross Indicates Gross To Net value for exported pay line * * @return $this */ - public function setIgnoreInitialBackPay(?bool $ignoreInitialBackPay): static + public function setIsNetToGross(?bool $isNetToGross): static { - if (is_null($ignoreInitialBackPay)) { - throw new InvalidArgumentException('non-nullable ignoreInitialBackPay cannot be null'); + if (is_null($isNetToGross)) { + throw new InvalidArgumentException('non-nullable isNetToGross cannot be null'); } - $this->container['ignoreInitialBackPay'] = $ignoreInitialBackPay; + $this->container['isNetToGross'] = $isNetToGross; return $this; } /** - * Gets contributesToBasicPay + * Gets londonAllowanceType * - * @return bool|null + * @return string|null */ - public function getContributesToBasicPay(): ?bool + public function getLondonAllowanceType(): ?string { - return $this->container['contributesToBasicPay']; + return $this->container['londonAllowanceType']; } /** - * Sets contributesToBasicPay + * Sets londonAllowanceType * - * @param bool|null $contributesToBasicPay Indicates Contributes To Basic Pay value for exported pay line + * @param string|null $londonAllowanceType London Allowance type for exported pay line * * @return $this */ - public function setContributesToBasicPay(?bool $contributesToBasicPay): static + public function setLondonAllowanceType(?string $londonAllowanceType): static { - if (is_null($contributesToBasicPay)) { - throw new InvalidArgumentException('non-nullable contributesToBasicPay cannot be null'); + if (is_null($londonAllowanceType)) { + array_push($this->openAPINullablesSetToNull, 'londonAllowanceType'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('londonAllowanceType', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['contributesToBasicPay'] = $contributesToBasicPay; + $this->container['londonAllowanceType'] = $londonAllowanceType; return $this; } /** - * Gets autoAdjustForLeave + * Gets multiplier * - * @return bool|null + * @return float|null */ - public function getAutoAdjustForLeave(): ?bool + public function getMultiplier(): ?float { - return $this->container['autoAdjustForLeave']; + return $this->container['multiplier']; } /** - * Sets autoAdjustForLeave + * Sets multiplier * - * @param bool|null $autoAdjustForLeave Indicates Auto Adjust For Leave value for exported pay line + * @param float|null $multiplier Multiplier for exported pay line * * @return $this */ - public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static + public function setMultiplier(?float $multiplier): static { - if (is_null($autoAdjustForLeave)) { - throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); + if (is_null($multiplier)) { + array_push($this->openAPINullablesSetToNull, 'multiplier'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('multiplier', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; + $this->container['multiplier'] = $multiplier; return $this; } /** - * Gets roleReference + * Gets multiplierType * - * @return string|null + * @return int|null */ - public function getRoleReference(): ?string + public function getMultiplierType(): ?int { - return $this->container['roleReference']; + return $this->container['multiplierType']; } /** - * Sets roleReference + * Sets multiplierType * - * @param string|null $roleReference Employee Role Reference for exported pay line + * @param int|null $multiplierType MultiplierType of exported pay line * * @return $this */ - public function setRoleReference(?string $roleReference): static + public function setMultiplierType(?int $multiplierType): static { - if (is_null($roleReference)) { - array_push($this->openAPINullablesSetToNull, 'roleReference'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('roleReference', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($multiplierType)) { + throw new InvalidArgumentException('non-nullable multiplierType cannot be null'); } - $this->container['roleReference'] = $roleReference; + $this->container['multiplierType'] = $multiplierType; return $this; } /** - * Gets paySpine + * Gets payCode * * @return string|null */ - public function getPaySpine(): ?string + public function getPayCode(): ?string { - return $this->container['paySpine']; + return $this->container['payCode']; } /** - * Sets paySpine + * Sets payCode * - * @param string|null $paySpine Pay Spine for exported pay line + * @param string|null $payCode Pay code for exported pay line * * @return $this */ - public function setPaySpine(?string $paySpine): static + public function setPayCode(?string $payCode): static { - if (is_null($paySpine)) { - array_push($this->openAPINullablesSetToNull, 'paySpine'); + if (is_null($payCode)) { + array_push($this->openAPINullablesSetToNull, 'payCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paySpine', $nullablesSetToNull); + $index = array_search('payCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['paySpine'] = $paySpine; + $this->container['payCode'] = $payCode; return $this; } @@ -1143,177 +1177,191 @@ public function setPayGrade(?string $payGrade): static } /** - * Gets spinePoint + * Gets paySpine * * @return string|null */ - public function getSpinePoint(): ?string + public function getPaySpine(): ?string { - return $this->container['spinePoint']; + return $this->container['paySpine']; } /** - * Sets spinePoint + * Sets paySpine * - * @param string|null $spinePoint Spine Point for exported pay line + * @param string|null $paySpine Pay Spine for exported pay line * * @return $this */ - public function setSpinePoint(?string $spinePoint): static + public function setPaySpine(?string $paySpine): static { - if (is_null($spinePoint)) { - array_push($this->openAPINullablesSetToNull, 'spinePoint'); + if (is_null($paySpine)) { + array_push($this->openAPINullablesSetToNull, 'paySpine'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('spinePoint', $nullablesSetToNull); + $index = array_search('paySpine', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['spinePoint'] = $spinePoint; + $this->container['paySpine'] = $paySpine; return $this; } /** - * Gets londonAllowanceType + * Gets paySpineGradeId * * @return string|null */ - public function getLondonAllowanceType(): ?string + public function getPaySpineGradeId(): ?string { - return $this->container['londonAllowanceType']; + return $this->container['paySpineGradeId']; } /** - * Sets londonAllowanceType + * Sets paySpineGradeId * - * @param string|null $londonAllowanceType London Allowance type for exported pay line + * @param string|null $paySpineGradeId Pay Spine Grade ID associated with the exported payline * * @return $this */ - public function setLondonAllowanceType(?string $londonAllowanceType): static + public function setPaySpineGradeId(?string $paySpineGradeId): static { - if (is_null($londonAllowanceType)) { - array_push($this->openAPINullablesSetToNull, 'londonAllowanceType'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('londonAllowanceType', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($paySpineGradeId)) { + throw new InvalidArgumentException('non-nullable paySpineGradeId cannot be null'); } - $this->container['londonAllowanceType'] = $londonAllowanceType; + $this->container['paySpineGradeId'] = $paySpineGradeId; return $this; } /** - * Gets calculateAsWhenPaid + * Gets paySpineId * - * @return bool|null + * @return string|null */ - public function getCalculateAsWhenPaid(): ?bool + public function getPaySpineId(): ?string { - return $this->container['calculateAsWhenPaid']; + return $this->container['paySpineId']; } /** - * Sets calculateAsWhenPaid + * Sets paySpineId * - * @param bool|null $calculateAsWhenPaid Indicates whether this pay line should be treated as When Paid rather than When Earned + * @param string|null $paySpineId Pay Spine ID associated with the exported payline * * @return $this */ - public function setCalculateAsWhenPaid(?bool $calculateAsWhenPaid): static + public function setPaySpineId(?string $paySpineId): static { - if (is_null($calculateAsWhenPaid)) { - throw new InvalidArgumentException('non-nullable calculateAsWhenPaid cannot be null'); + if (is_null($paySpineId)) { + throw new InvalidArgumentException('non-nullable paySpineId cannot be null'); } - $this->container['calculateAsWhenPaid'] = $calculateAsWhenPaid; + $this->container['paySpineId'] = $paySpineId; return $this; } /** - * Gets departmentId + * Gets payrollCode * * @return string|null */ - public function getDepartmentId(): ?string + public function getPayrollCode(): ?string { - return $this->container['departmentId']; + return $this->container['payrollCode']; } /** - * Sets departmentId + * Sets payrollCode * - * @param string|null $departmentId Department ID associated with the exported payline + * @param string|null $payrollCode Payroll Code for exported pay line * * @return $this */ - public function setDepartmentId(?string $departmentId): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($departmentId)) { - throw new InvalidArgumentException('non-nullable departmentId cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['departmentId'] = $departmentId; + $this->container['payrollCode'] = $payrollCode; return $this; } /** - * Gets costCentreId + * Gets percentage * - * @return string|null + * @return float|null */ - public function getCostCentreId(): ?string + public function getPercentage(): ?float { - return $this->container['costCentreId']; + return $this->container['percentage']; } /** - * Sets costCentreId + * Sets percentage * - * @param string|null $costCentreId Cost Centre ID associated with the exported payline + * @param float|null $percentage Amount for exported pay line * * @return $this */ - public function setCostCentreId(?string $costCentreId): static + public function setPercentage(?float $percentage): static { - if (is_null($costCentreId)) { - throw new InvalidArgumentException('non-nullable costCentreId cannot be null'); + if (is_null($percentage)) { + array_push($this->openAPINullablesSetToNull, 'percentage'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('percentage', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['costCentreId'] = $costCentreId; + $this->container['percentage'] = $percentage; return $this; } /** - * Gets paySpineId + * Gets roleReference * * @return string|null */ - public function getPaySpineId(): ?string + public function getRoleReference(): ?string { - return $this->container['paySpineId']; + return $this->container['roleReference']; } /** - * Sets paySpineId + * Sets roleReference * - * @param string|null $paySpineId Pay Spine ID associated with the exported payline + * @param string|null $roleReference Employee Role Reference for exported pay line * * @return $this */ - public function setPaySpineId(?string $paySpineId): static + public function setRoleReference(?string $roleReference): static { - if (is_null($paySpineId)) { - throw new InvalidArgumentException('non-nullable paySpineId cannot be null'); + if (is_null($roleReference)) { + array_push($this->openAPINullablesSetToNull, 'roleReference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('roleReference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['paySpineId'] = $paySpineId; + $this->container['roleReference'] = $roleReference; return $this; } @@ -1346,28 +1394,62 @@ public function setSpinalPointId(?string $spinalPointId): static } /** - * Gets paySpineGradeId + * Gets spinePoint * * @return string|null */ - public function getPaySpineGradeId(): ?string + public function getSpinePoint(): ?string { - return $this->container['paySpineGradeId']; + return $this->container['spinePoint']; } /** - * Sets paySpineGradeId + * Sets spinePoint * - * @param string|null $paySpineGradeId Pay Spine Grade ID associated with the exported payline + * @param string|null $spinePoint Spine Point for exported pay line * * @return $this */ - public function setPaySpineGradeId(?string $paySpineGradeId): static + public function setSpinePoint(?string $spinePoint): static { - if (is_null($paySpineGradeId)) { - throw new InvalidArgumentException('non-nullable paySpineGradeId cannot be null'); + if (is_null($spinePoint)) { + array_push($this->openAPINullablesSetToNull, 'spinePoint'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('spinePoint', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['paySpineGradeId'] = $paySpineGradeId; + $this->container['spinePoint'] = $spinePoint; + + return $this; + } + + /** + * Gets uniqueIdentifier + * + * @return string|null + */ + public function getUniqueIdentifier(): ?string + { + return $this->container['uniqueIdentifier']; + } + + /** + * Sets uniqueIdentifier + * + * @param string|null $uniqueIdentifier Unique Id for exported pay line + * + * @return $this + */ + public function setUniqueIdentifier(?string $uniqueIdentifier): static + { + if (is_null($uniqueIdentifier)) { + throw new InvalidArgumentException('non-nullable uniqueIdentifier cannot be null'); + } + $this->container['uniqueIdentifier'] = $uniqueIdentifier; return $this; } diff --git a/src/Model/EmployeePaymentsReportLineListReportResponse.php b/src/Model/EmployeePaymentsReportLineListReportResponse.php new file mode 100644 index 0000000..5ec8e0b --- /dev/null +++ b/src/Model/EmployeePaymentsReportLineListReportResponse.php @@ -0,0 +1,539 @@ + + */ +class EmployeePaymentsReportLineListReportResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'EmployeePaymentsReportLineListReportResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'content' => 'string', + 'model' => '\SynergiTech\Staffology\Model\EmployeePaymentsReportLine[]', + 'stream' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'content' => null, + 'model' => null, + 'stream' => 'byte', + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'content' => true, + 'model' => true, + 'stream' => true, + 'type' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'content' => 'content', + 'model' => 'model', + 'stream' => 'stream', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'content' => 'setContent', + 'model' => 'setModel', + 'stream' => 'setStream', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'content' => 'getContent', + 'model' => 'getModel', + 'stream' => 'getStream', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('model', $data ?? [], null); + $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets content + * + * @return string|null + */ + public function getContent(): ?string + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string|null $content [readonly] This could contain a link to a PDF file, HTML content or other content, depending on the Type value. + * + * @return $this + */ + public function setContent(?string $content): static + { + if (is_null($content)) { + array_push($this->openAPINullablesSetToNull, 'content'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('content', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets model + * + * @return \SynergiTech\Staffology\Model\EmployeePaymentsReportLine[]|null + */ + public function getModel(): ?array + { + return $this->container['model']; + } + + /** + * Sets model + * + * @param \SynergiTech\Staffology\Model\EmployeePaymentsReportLine[]|null $model [readonly] If the type is application.json then this will contain a JSON representation of the relevant model + * + * @return $this + */ + public function setModel(?array $model): static + { + if (is_null($model)) { + array_push($this->openAPINullablesSetToNull, 'model'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('model', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['model'] = $model; + + return $this; + } + + /** + * Gets stream + * + * @return string|null + */ + public function getStream(): ?string + { + return $this->container['stream']; + } + + /** + * Sets stream + * + * @param string|null $stream byte array + * + * @return $this + */ + public function setStream(?string $stream): static + { + if (is_null($stream)) { + array_push($this->openAPINullablesSetToNull, 'stream'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('stream', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['stream'] = $stream; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/EmployeeRole.php b/src/Model/EmployeeRole.php index c1737ec..0b55d52 100644 --- a/src/Model/EmployeeRole.php +++ b/src/Model/EmployeeRole.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,19 +59,21 @@ class EmployeeRole implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'jobTitle' => 'string', + 'basis' => '\SynergiTech\Staffology\Model\RoleBasis', + 'defaultPensionSchemeUniqueId' => 'string', + 'defaultWorkerGroupUniqueId' => 'string', + 'employee' => '\SynergiTech\Staffology\Model\Item', + 'endDate' => '\DateTime', + 'id' => 'string', 'isPrimary' => 'bool', + 'jobTitle' => 'string', + 'occupationalMaternityPolicyUniqueId' => 'string', + 'occupationalSicknessPolicyUniqueId' => 'string', + 'payOptions' => '\SynergiTech\Staffology\Model\EmployeeRolePayOptions', 'reference' => 'string', 'startDate' => '\DateTime', - 'endDate' => '\DateTime', - 'basis' => '\SynergiTech\Staffology\Model\RoleBasis', 'type' => '\SynergiTech\Staffology\Model\RoleType', - 'payOptions' => '\SynergiTech\Staffology\Model\EmployeeRolePayOptions', - 'workingPatternId' => 'string', - 'occupationalMaternityPolicyUniqueId' => 'string', - 'occupationalSicknessPolicyUniqueId' => 'string', - 'employee' => '\SynergiTech\Staffology\Model\Item', - 'id' => 'string' + 'workingPatternId' => 'string' ]; /** @@ -80,19 +82,21 @@ class EmployeeRole implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'jobTitle' => null, + 'basis' => null, + 'defaultPensionSchemeUniqueId' => 'uuid', + 'defaultWorkerGroupUniqueId' => 'uuid', + 'employee' => null, + 'endDate' => 'date', + 'id' => 'uuid', 'isPrimary' => null, + 'jobTitle' => null, + 'occupationalMaternityPolicyUniqueId' => 'uuid', + 'occupationalSicknessPolicyUniqueId' => 'uuid', + 'payOptions' => null, 'reference' => null, 'startDate' => 'date', - 'endDate' => 'date', - 'basis' => null, 'type' => null, - 'payOptions' => null, - 'workingPatternId' => 'uuid', - 'occupationalMaternityPolicyUniqueId' => 'uuid', - 'occupationalSicknessPolicyUniqueId' => 'uuid', - 'employee' => null, - 'id' => 'uuid' + 'workingPatternId' => 'uuid' ]; /** @@ -101,19 +105,21 @@ class EmployeeRole implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'jobTitle' => true, + 'basis' => false, + 'defaultPensionSchemeUniqueId' => true, + 'defaultWorkerGroupUniqueId' => true, + 'employee' => false, + 'endDate' => true, + 'id' => false, 'isPrimary' => false, + 'jobTitle' => true, + 'occupationalMaternityPolicyUniqueId' => true, + 'occupationalSicknessPolicyUniqueId' => true, + 'payOptions' => false, 'reference' => true, 'startDate' => false, - 'endDate' => true, - 'basis' => false, 'type' => false, - 'payOptions' => false, - 'workingPatternId' => true, - 'occupationalMaternityPolicyUniqueId' => true, - 'occupationalSicknessPolicyUniqueId' => true, - 'employee' => false, - 'id' => false + 'workingPatternId' => true ]; /** @@ -202,19 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'jobTitle' => 'jobTitle', + 'basis' => 'basis', + 'defaultPensionSchemeUniqueId' => 'defaultPensionSchemeUniqueId', + 'defaultWorkerGroupUniqueId' => 'defaultWorkerGroupUniqueId', + 'employee' => 'employee', + 'endDate' => 'endDate', + 'id' => 'id', 'isPrimary' => 'isPrimary', + 'jobTitle' => 'jobTitle', + 'occupationalMaternityPolicyUniqueId' => 'occupationalMaternityPolicyUniqueId', + 'occupationalSicknessPolicyUniqueId' => 'occupationalSicknessPolicyUniqueId', + 'payOptions' => 'payOptions', 'reference' => 'reference', 'startDate' => 'startDate', - 'endDate' => 'endDate', - 'basis' => 'basis', 'type' => 'type', - 'payOptions' => 'payOptions', - 'workingPatternId' => 'workingPatternId', - 'occupationalMaternityPolicyUniqueId' => 'occupationalMaternityPolicyUniqueId', - 'occupationalSicknessPolicyUniqueId' => 'occupationalSicknessPolicyUniqueId', - 'employee' => 'employee', - 'id' => 'id' + 'workingPatternId' => 'workingPatternId' ]; /** @@ -223,19 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'jobTitle' => 'setJobTitle', + 'basis' => 'setBasis', + 'defaultPensionSchemeUniqueId' => 'setDefaultPensionSchemeUniqueId', + 'defaultWorkerGroupUniqueId' => 'setDefaultWorkerGroupUniqueId', + 'employee' => 'setEmployee', + 'endDate' => 'setEndDate', + 'id' => 'setId', 'isPrimary' => 'setIsPrimary', + 'jobTitle' => 'setJobTitle', + 'occupationalMaternityPolicyUniqueId' => 'setOccupationalMaternityPolicyUniqueId', + 'occupationalSicknessPolicyUniqueId' => 'setOccupationalSicknessPolicyUniqueId', + 'payOptions' => 'setPayOptions', 'reference' => 'setReference', 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', - 'basis' => 'setBasis', 'type' => 'setType', - 'payOptions' => 'setPayOptions', - 'workingPatternId' => 'setWorkingPatternId', - 'occupationalMaternityPolicyUniqueId' => 'setOccupationalMaternityPolicyUniqueId', - 'occupationalSicknessPolicyUniqueId' => 'setOccupationalSicknessPolicyUniqueId', - 'employee' => 'setEmployee', - 'id' => 'setId' + 'workingPatternId' => 'setWorkingPatternId' ]; /** @@ -244,19 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'jobTitle' => 'getJobTitle', + 'basis' => 'getBasis', + 'defaultPensionSchemeUniqueId' => 'getDefaultPensionSchemeUniqueId', + 'defaultWorkerGroupUniqueId' => 'getDefaultWorkerGroupUniqueId', + 'employee' => 'getEmployee', + 'endDate' => 'getEndDate', + 'id' => 'getId', 'isPrimary' => 'getIsPrimary', + 'jobTitle' => 'getJobTitle', + 'occupationalMaternityPolicyUniqueId' => 'getOccupationalMaternityPolicyUniqueId', + 'occupationalSicknessPolicyUniqueId' => 'getOccupationalSicknessPolicyUniqueId', + 'payOptions' => 'getPayOptions', 'reference' => 'getReference', 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', - 'basis' => 'getBasis', 'type' => 'getType', - 'payOptions' => 'getPayOptions', - 'workingPatternId' => 'getWorkingPatternId', - 'occupationalMaternityPolicyUniqueId' => 'getOccupationalMaternityPolicyUniqueId', - 'occupationalSicknessPolicyUniqueId' => 'getOccupationalSicknessPolicyUniqueId', - 'employee' => 'getEmployee', - 'id' => 'getId' + 'workingPatternId' => 'getWorkingPatternId' ]; /** @@ -315,19 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('jobTitle', $data ?? [], null); + $this->setIfExists('basis', $data ?? [], null); + $this->setIfExists('defaultPensionSchemeUniqueId', $data ?? [], null); + $this->setIfExists('defaultWorkerGroupUniqueId', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('isPrimary', $data ?? [], null); + $this->setIfExists('jobTitle', $data ?? [], null); + $this->setIfExists('occupationalMaternityPolicyUniqueId', $data ?? [], null); + $this->setIfExists('occupationalSicknessPolicyUniqueId', $data ?? [], null); + $this->setIfExists('payOptions', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); - $this->setIfExists('basis', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('payOptions', $data ?? [], null); $this->setIfExists('workingPatternId', $data ?? [], null); - $this->setIfExists('occupationalMaternityPolicyUniqueId', $data ?? [], null); - $this->setIfExists('occupationalSicknessPolicyUniqueId', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); } /** @@ -377,127 +391,123 @@ public function valid(): bool /** - * Gets jobTitle + * Gets basis * - * @return string|null + * @return \SynergiTech\Staffology\Model\RoleBasis|null */ - public function getJobTitle(): ?string + public function getBasis(): ?\SynergiTech\Staffology\Model\RoleBasis { - return $this->container['jobTitle']; + return $this->container['basis']; } /** - * Sets jobTitle + * Sets basis * - * @param string|null $jobTitle Job Title of the Role + * @param \SynergiTech\Staffology\Model\RoleBasis|null $basis basis * * @return $this */ - public function setJobTitle(?string $jobTitle): static + public function setBasis(?\SynergiTech\Staffology\Model\RoleBasis $basis): static { - if (is_null($jobTitle)) { - array_push($this->openAPINullablesSetToNull, 'jobTitle'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('jobTitle', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($basis)) { + throw new InvalidArgumentException('non-nullable basis cannot be null'); } - $this->container['jobTitle'] = $jobTitle; + $this->container['basis'] = $basis; return $this; } /** - * Gets isPrimary + * Gets defaultPensionSchemeUniqueId * - * @return bool|null + * @return string|null */ - public function getIsPrimary(): ?bool + public function getDefaultPensionSchemeUniqueId(): ?string { - return $this->container['isPrimary']; + return $this->container['defaultPensionSchemeUniqueId']; } /** - * Sets isPrimary + * Sets defaultPensionSchemeUniqueId * - * @param bool|null $isPrimary Set to True if this is Primary role of the Employee + * @param string|null $defaultPensionSchemeUniqueId Used when employee role has attached default pension scheme Id * * @return $this */ - public function setIsPrimary(?bool $isPrimary): static + public function setDefaultPensionSchemeUniqueId(?string $defaultPensionSchemeUniqueId): static { - if (is_null($isPrimary)) { - throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); + if (is_null($defaultPensionSchemeUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'defaultPensionSchemeUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultPensionSchemeUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isPrimary'] = $isPrimary; + $this->container['defaultPensionSchemeUniqueId'] = $defaultPensionSchemeUniqueId; return $this; } /** - * Gets reference + * Gets defaultWorkerGroupUniqueId * * @return string|null */ - public function getReference(): ?string + public function getDefaultWorkerGroupUniqueId(): ?string { - return $this->container['reference']; + return $this->container['defaultWorkerGroupUniqueId']; } /** - * Sets reference + * Sets defaultWorkerGroupUniqueId * - * @param string|null $reference reference + * @param string|null $defaultWorkerGroupUniqueId Used when employee role has attached default worker group Id * * @return $this */ - public function setReference(?string $reference): static + public function setDefaultWorkerGroupUniqueId(?string $defaultWorkerGroupUniqueId): static { - if (is_null($reference)) { - array_push($this->openAPINullablesSetToNull, 'reference'); + if (is_null($defaultWorkerGroupUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'defaultWorkerGroupUniqueId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('reference', $nullablesSetToNull); + $index = array_search('defaultWorkerGroupUniqueId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($reference) && (mb_strlen($reference) > 35)) { - throw new InvalidArgumentException('invalid length for $reference when calling EmployeeRole., must be smaller than or equal to 35.'); - } - - $this->container['reference'] = $reference; + $this->container['defaultWorkerGroupUniqueId'] = $defaultWorkerGroupUniqueId; return $this; } /** - * Gets startDate + * Gets employee * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getStartDate(): ?\DateTime + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['startDate']; + return $this->container['employee']; } /** - * Sets startDate + * Sets employee * - * @param \DateTime|null $startDate startDate + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['startDate'] = $startDate; + $this->container['employee'] = $employee; return $this; } @@ -537,118 +547,89 @@ public function setEndDate(?\DateTime $endDate): static } /** - * Gets basis - * - * @return \SynergiTech\Staffology\Model\RoleBasis|null - */ - public function getBasis(): ?\SynergiTech\Staffology\Model\RoleBasis - { - return $this->container['basis']; - } - - /** - * Sets basis - * - * @param \SynergiTech\Staffology\Model\RoleBasis|null $basis basis - * - * @return $this - */ - public function setBasis(?\SynergiTech\Staffology\Model\RoleBasis $basis): static - { - if (is_null($basis)) { - throw new InvalidArgumentException('non-nullable basis cannot be null'); - } - $this->container['basis'] = $basis; - - return $this; - } - - /** - * Gets type + * Gets id * - * @return \SynergiTech\Staffology\Model\RoleType|null + * @return string|null */ - public function getType(): ?\SynergiTech\Staffology\Model\RoleType + public function getId(): ?string { - return $this->container['type']; + return $this->container['id']; } /** - * Sets type + * Sets id * - * @param \SynergiTech\Staffology\Model\RoleType|null $type type + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\RoleType $type): static + public function setId(?string $id): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['type'] = $type; + $this->container['id'] = $id; return $this; } /** - * Gets payOptions + * Gets isPrimary * - * @return \SynergiTech\Staffology\Model\EmployeeRolePayOptions|null + * @return bool|null */ - public function getPayOptions(): ?\SynergiTech\Staffology\Model\EmployeeRolePayOptions + public function getIsPrimary(): ?bool { - return $this->container['payOptions']; + return $this->container['isPrimary']; } /** - * Sets payOptions + * Sets isPrimary * - * @param \SynergiTech\Staffology\Model\EmployeeRolePayOptions|null $payOptions payOptions + * @param bool|null $isPrimary Set to True if this is Primary role of the Employee * * @return $this */ - public function setPayOptions(?\SynergiTech\Staffology\Model\EmployeeRolePayOptions $payOptions): static + public function setIsPrimary(?bool $isPrimary): static { - if (is_null($payOptions)) { - throw new InvalidArgumentException('non-nullable payOptions cannot be null'); + if (is_null($isPrimary)) { + throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); } - $this->container['payOptions'] = $payOptions; + $this->container['isPrimary'] = $isPrimary; return $this; } /** - * Gets workingPatternId + * Gets jobTitle * * @return string|null - * @deprecated */ - public function getWorkingPatternId(): ?string + public function getJobTitle(): ?string { - return $this->container['workingPatternId']; + return $this->container['jobTitle']; } /** - * Sets workingPatternId + * Sets jobTitle * - * @param string|null $workingPatternId Used when calculating payments for Leave. If null then the default Working Pattern is used + * @param string|null $jobTitle Job Title of the Role * * @return $this - * @deprecated */ - public function setWorkingPatternId(?string $workingPatternId): static + public function setJobTitle(?string $jobTitle): static { - if (is_null($workingPatternId)) { - array_push($this->openAPINullablesSetToNull, 'workingPatternId'); + if (is_null($jobTitle)) { + array_push($this->openAPINullablesSetToNull, 'jobTitle'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('workingPatternId', $nullablesSetToNull); + $index = array_search('jobTitle', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['workingPatternId'] = $workingPatternId; + $this->container['jobTitle'] = $jobTitle; return $this; } @@ -722,55 +703,156 @@ public function setOccupationalSicknessPolicyUniqueId(?string $occupationalSickn } /** - * Gets employee + * Gets payOptions * - * @return \SynergiTech\Staffology\Model\Item|null + * @return \SynergiTech\Staffology\Model\EmployeeRolePayOptions|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getPayOptions(): ?\SynergiTech\Staffology\Model\EmployeeRolePayOptions { - return $this->container['employee']; + return $this->container['payOptions']; } /** - * Sets employee + * Sets payOptions * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param \SynergiTech\Staffology\Model\EmployeeRolePayOptions|null $payOptions payOptions * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setPayOptions(?\SynergiTech\Staffology\Model\EmployeeRolePayOptions $payOptions): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($payOptions)) { + throw new InvalidArgumentException('non-nullable payOptions cannot be null'); } - $this->container['employee'] = $employee; + $this->container['payOptions'] = $payOptions; return $this; } /** - * Gets id + * Gets reference * * @return string|null */ - public function getId(): ?string + public function getReference(): ?string { - return $this->container['id']; + return $this->container['reference']; } /** - * Sets id + * Sets reference * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $reference reference * * @return $this */ - public function setId(?string $id): static + public function setReference(?string $reference): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($reference)) { + array_push($this->openAPINullablesSetToNull, 'reference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('reference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + if (!is_null($reference) && (mb_strlen($reference) > 35)) { + throw new InvalidArgumentException('invalid length for $reference when calling EmployeeRole., must be smaller than or equal to 35.'); + } + + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets startDate + * + * @return \DateTime|null + */ + public function getStartDate(): ?\DateTime + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param \DateTime|null $startDate startDate + * + * @return $this + */ + public function setStartDate(?\DateTime $startDate): static + { + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); + } + $this->container['startDate'] = $startDate; + + return $this; + } + + /** + * Gets type + * + * @return \SynergiTech\Staffology\Model\RoleType|null + */ + public function getType(): ?\SynergiTech\Staffology\Model\RoleType + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \SynergiTech\Staffology\Model\RoleType|null $type type + * + * @return $this + */ + public function setType(?\SynergiTech\Staffology\Model\RoleType $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets workingPatternId + * + * @return string|null + * @deprecated + */ + public function getWorkingPatternId(): ?string + { + return $this->container['workingPatternId']; + } + + /** + * Sets workingPatternId + * + * @param string|null $workingPatternId Used when calculating payments for Leave. If null then the default Working Pattern is used + * + * @return $this + * @deprecated + */ + public function setWorkingPatternId(?string $workingPatternId): static + { + if (is_null($workingPatternId)) { + array_push($this->openAPINullablesSetToNull, 'workingPatternId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('workingPatternId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['workingPatternId'] = $workingPatternId; return $this; } diff --git a/src/Model/EmployeeRoleAnalysisCategoryCode.php b/src/Model/EmployeeRoleAnalysisCategoryCode.php index 649b081..da3e497 100644 --- a/src/Model/EmployeeRoleAnalysisCategoryCode.php +++ b/src/Model/EmployeeRoleAnalysisCategoryCode.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,15 @@ class EmployeeRoleAnalysisCategoryCode implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ - 'code' => 'string', - 'color' => 'string', - 'title' => 'string', - 'isPrimary' => 'bool', - 'weighting' => 'float', 'analysisCategoryName' => 'string', 'analysisCategoryPublicId' => 'string', + 'code' => 'string', + 'color' => 'string', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'employeeRolePublicId' => 'string', - 'employee' => '\SynergiTech\Staffology\Model\Item' + 'isPrimary' => 'bool', + 'title' => 'string', + 'weighting' => 'float' ]; /** @@ -76,15 +76,15 @@ class EmployeeRoleAnalysisCategoryCode implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPIFormats = [ - 'code' => null, - 'color' => null, - 'title' => null, - 'isPrimary' => null, - 'weighting' => 'double', 'analysisCategoryName' => null, 'analysisCategoryPublicId' => 'uuid', + 'code' => null, + 'color' => null, + 'employee' => null, 'employeeRolePublicId' => 'uuid', - 'employee' => null + 'isPrimary' => null, + 'title' => null, + 'weighting' => 'double' ]; /** @@ -93,15 +93,15 @@ class EmployeeRoleAnalysisCategoryCode implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPINullables = [ - 'code' => false, - 'color' => true, - 'title' => true, - 'isPrimary' => false, - 'weighting' => false, 'analysisCategoryName' => true, 'analysisCategoryPublicId' => false, + 'code' => false, + 'color' => true, + 'employee' => false, 'employeeRolePublicId' => false, - 'employee' => false + 'isPrimary' => false, + 'title' => true, + 'weighting' => false ]; /** @@ -190,15 +190,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'code' => 'code', - 'color' => 'color', - 'title' => 'title', - 'isPrimary' => 'isPrimary', - 'weighting' => 'weighting', 'analysisCategoryName' => 'analysisCategoryName', 'analysisCategoryPublicId' => 'analysisCategoryPublicId', + 'code' => 'code', + 'color' => 'color', + 'employee' => 'employee', 'employeeRolePublicId' => 'employeeRolePublicId', - 'employee' => 'employee' + 'isPrimary' => 'isPrimary', + 'title' => 'title', + 'weighting' => 'weighting' ]; /** @@ -207,15 +207,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'code' => 'setCode', - 'color' => 'setColor', - 'title' => 'setTitle', - 'isPrimary' => 'setIsPrimary', - 'weighting' => 'setWeighting', 'analysisCategoryName' => 'setAnalysisCategoryName', 'analysisCategoryPublicId' => 'setAnalysisCategoryPublicId', + 'code' => 'setCode', + 'color' => 'setColor', + 'employee' => 'setEmployee', 'employeeRolePublicId' => 'setEmployeeRolePublicId', - 'employee' => 'setEmployee' + 'isPrimary' => 'setIsPrimary', + 'title' => 'setTitle', + 'weighting' => 'setWeighting' ]; /** @@ -224,15 +224,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'code' => 'getCode', - 'color' => 'getColor', - 'title' => 'getTitle', - 'isPrimary' => 'getIsPrimary', - 'weighting' => 'getWeighting', 'analysisCategoryName' => 'getAnalysisCategoryName', 'analysisCategoryPublicId' => 'getAnalysisCategoryPublicId', + 'code' => 'getCode', + 'color' => 'getColor', + 'employee' => 'getEmployee', 'employeeRolePublicId' => 'getEmployeeRolePublicId', - 'employee' => 'getEmployee' + 'isPrimary' => 'getIsPrimary', + 'title' => 'getTitle', + 'weighting' => 'getWeighting' ]; /** @@ -291,15 +291,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('analysisCategoryName', $data ?? [], null); + $this->setIfExists('analysisCategoryPublicId', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('employeeRolePublicId', $data ?? [], null); $this->setIfExists('isPrimary', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); $this->setIfExists('weighting', $data ?? [], null); - $this->setIfExists('analysisCategoryName', $data ?? [], null); - $this->setIfExists('analysisCategoryPublicId', $data ?? [], null); - $this->setIfExists('employeeRolePublicId', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); } /** @@ -351,6 +351,67 @@ public function valid(): bool } + /** + * Gets analysisCategoryName + * + * @return string|null + */ + public function getAnalysisCategoryName(): ?string + { + return $this->container['analysisCategoryName']; + } + + /** + * Sets analysisCategoryName + * + * @param string|null $analysisCategoryName Analysis Category Name + * + * @return $this + */ + public function setAnalysisCategoryName(?string $analysisCategoryName): static + { + if (is_null($analysisCategoryName)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('analysisCategoryName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['analysisCategoryName'] = $analysisCategoryName; + + return $this; + } + + /** + * Gets analysisCategoryPublicId + * + * @return string|null + */ + public function getAnalysisCategoryPublicId(): ?string + { + return $this->container['analysisCategoryPublicId']; + } + + /** + * Sets analysisCategoryPublicId + * + * @param string|null $analysisCategoryPublicId Analysis Category Public Id + * + * @return $this + */ + public function setAnalysisCategoryPublicId(?string $analysisCategoryPublicId): static + { + if (is_null($analysisCategoryPublicId)) { + throw new InvalidArgumentException('non-nullable analysisCategoryPublicId cannot be null'); + } + $this->container['analysisCategoryPublicId'] = $analysisCategoryPublicId; + + return $this; + } + /** * Gets code * @@ -418,204 +479,143 @@ public function setColor(?string $color): static } /** - * Gets title + * Gets employee * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getTitle(): ?string + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['title']; + return $this->container['employee']; } /** - * Sets title + * Sets employee * - * @param string|null $title [readonly] The Title for the AnalysisCategoryCode + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setTitle(?string $title): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['title'] = $title; + $this->container['employee'] = $employee; return $this; } /** - * Gets isPrimary + * Gets employeeRolePublicId * - * @return bool|null + * @return string|null */ - public function getIsPrimary(): ?bool + public function getEmployeeRolePublicId(): ?string { - return $this->container['isPrimary']; + return $this->container['employeeRolePublicId']; } /** - * Sets isPrimary + * Sets employeeRolePublicId * - * @param bool|null $isPrimary Set to true if this is the primary AnalysisCategoryCode for the Employee. Only one AnalysisCategoryCode can be set as the primary. + * @param string|null $employeeRolePublicId Employee Role Public Id * * @return $this */ - public function setIsPrimary(?bool $isPrimary): static + public function setEmployeeRolePublicId(?string $employeeRolePublicId): static { - if (is_null($isPrimary)) { - throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); + if (is_null($employeeRolePublicId)) { + throw new InvalidArgumentException('non-nullable employeeRolePublicId cannot be null'); } - $this->container['isPrimary'] = $isPrimary; + $this->container['employeeRolePublicId'] = $employeeRolePublicId; return $this; } /** - * Gets weighting + * Gets isPrimary * - * @return float|null + * @return bool|null */ - public function getWeighting(): ?float + public function getIsPrimary(): ?bool { - return $this->container['weighting']; + return $this->container['isPrimary']; } /** - * Sets weighting + * Sets isPrimary * - * @param float|null $weighting If there is more than one AnalysisCategoryCode Membership for the Employee then this determines the weighting to give to this membership. ie, if he is in two AnalysisCategoryCode you might set the primary as 0.8 and the secondary as 0.2; + * @param bool|null $isPrimary Set to true if this is the primary AnalysisCategoryCode for the Employee. Only one AnalysisCategoryCode can be set as the primary. * * @return $this */ - public function setWeighting(?float $weighting): static + public function setIsPrimary(?bool $isPrimary): static { - if (is_null($weighting)) { - throw new InvalidArgumentException('non-nullable weighting cannot be null'); + if (is_null($isPrimary)) { + throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); } - $this->container['weighting'] = $weighting; + $this->container['isPrimary'] = $isPrimary; return $this; } /** - * Gets analysisCategoryName + * Gets title * * @return string|null */ - public function getAnalysisCategoryName(): ?string + public function getTitle(): ?string { - return $this->container['analysisCategoryName']; + return $this->container['title']; } /** - * Sets analysisCategoryName + * Sets title * - * @param string|null $analysisCategoryName Analysis Category Name + * @param string|null $title [readonly] The Title for the AnalysisCategoryCode * * @return $this */ - public function setAnalysisCategoryName(?string $analysisCategoryName): static + public function setTitle(?string $title): static { - if (is_null($analysisCategoryName)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryName'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryName', $nullablesSetToNull); + $index = array_search('title', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoryName'] = $analysisCategoryName; - - return $this; - } - - /** - * Gets analysisCategoryPublicId - * - * @return string|null - */ - public function getAnalysisCategoryPublicId(): ?string - { - return $this->container['analysisCategoryPublicId']; - } - - /** - * Sets analysisCategoryPublicId - * - * @param string|null $analysisCategoryPublicId Analysis Category Public Id - * - * @return $this - */ - public function setAnalysisCategoryPublicId(?string $analysisCategoryPublicId): static - { - if (is_null($analysisCategoryPublicId)) { - throw new InvalidArgumentException('non-nullable analysisCategoryPublicId cannot be null'); - } - $this->container['analysisCategoryPublicId'] = $analysisCategoryPublicId; - - return $this; - } - - /** - * Gets employeeRolePublicId - * - * @return string|null - */ - public function getEmployeeRolePublicId(): ?string - { - return $this->container['employeeRolePublicId']; - } - - /** - * Sets employeeRolePublicId - * - * @param string|null $employeeRolePublicId Employee Role Public Id - * - * @return $this - */ - public function setEmployeeRolePublicId(?string $employeeRolePublicId): static - { - if (is_null($employeeRolePublicId)) { - throw new InvalidArgumentException('non-nullable employeeRolePublicId cannot be null'); - } - $this->container['employeeRolePublicId'] = $employeeRolePublicId; + $this->container['title'] = $title; return $this; } /** - * Gets employee + * Gets weighting * - * @return \SynergiTech\Staffology\Model\Item|null + * @return float|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getWeighting(): ?float { - return $this->container['employee']; + return $this->container['weighting']; } /** - * Sets employee + * Sets weighting * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param float|null $weighting If there is more than one AnalysisCategoryCode Membership for the Employee then this determines the weighting to give to this membership. ie, if he is in two AnalysisCategoryCode you might set the primary as 0.8 and the secondary as 0.2; * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setWeighting(?float $weighting): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($weighting)) { + throw new InvalidArgumentException('non-nullable weighting cannot be null'); } - $this->container['employee'] = $employee; + $this->container['weighting'] = $weighting; return $this; } diff --git a/src/Model/EmployeeRolePayItem.php b/src/Model/EmployeeRolePayItem.php index 3f740b0..ad18ec3 100644 --- a/src/Model/EmployeeRolePayItem.php +++ b/src/Model/EmployeeRolePayItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class EmployeeRolePayItem implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ - 'roleId' => 'string', - 'isPrimary' => 'bool', 'baseDailyRate' => 'float', 'baseHourlyRate' => 'float', + 'isPrimary' => 'bool', + 'roleId' => 'string', 'weight' => 'float' ]; @@ -72,10 +72,10 @@ class EmployeeRolePayItem implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPIFormats = [ - 'roleId' => 'uuid', - 'isPrimary' => null, 'baseDailyRate' => 'double', 'baseHourlyRate' => 'double', + 'isPrimary' => null, + 'roleId' => 'uuid', 'weight' => 'double' ]; @@ -85,10 +85,10 @@ class EmployeeRolePayItem implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPINullables = [ - 'roleId' => false, - 'isPrimary' => false, 'baseDailyRate' => false, 'baseHourlyRate' => false, + 'isPrimary' => false, + 'roleId' => false, 'weight' => false ]; @@ -178,10 +178,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'roleId' => 'roleId', - 'isPrimary' => 'isPrimary', 'baseDailyRate' => 'baseDailyRate', 'baseHourlyRate' => 'baseHourlyRate', + 'isPrimary' => 'isPrimary', + 'roleId' => 'roleId', 'weight' => 'weight' ]; @@ -191,10 +191,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'roleId' => 'setRoleId', - 'isPrimary' => 'setIsPrimary', 'baseDailyRate' => 'setBaseDailyRate', 'baseHourlyRate' => 'setBaseHourlyRate', + 'isPrimary' => 'setIsPrimary', + 'roleId' => 'setRoleId', 'weight' => 'setWeight' ]; @@ -204,10 +204,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'roleId' => 'getRoleId', - 'isPrimary' => 'getIsPrimary', 'baseDailyRate' => 'getBaseDailyRate', 'baseHourlyRate' => 'getBaseHourlyRate', + 'isPrimary' => 'getIsPrimary', + 'roleId' => 'getRoleId', 'weight' => 'getWeight' ]; @@ -267,10 +267,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('roleId', $data ?? [], null); - $this->setIfExists('isPrimary', $data ?? [], null); $this->setIfExists('baseDailyRate', $data ?? [], null); $this->setIfExists('baseHourlyRate', $data ?? [], null); + $this->setIfExists('isPrimary', $data ?? [], null); + $this->setIfExists('roleId', $data ?? [], null); $this->setIfExists('weight', $data ?? [], null); } @@ -317,109 +317,109 @@ public function valid(): bool /** - * Gets roleId + * Gets baseDailyRate * - * @return string|null + * @return float|null */ - public function getRoleId(): ?string + public function getBaseDailyRate(): ?float { - return $this->container['roleId']; + return $this->container['baseDailyRate']; } /** - * Sets roleId + * Sets baseDailyRate * - * @param string|null $roleId roleId + * @param float|null $baseDailyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields * * @return $this */ - public function setRoleId(?string $roleId): static + public function setBaseDailyRate(?float $baseDailyRate): static { - if (is_null($roleId)) { - throw new InvalidArgumentException('non-nullable roleId cannot be null'); + if (is_null($baseDailyRate)) { + throw new InvalidArgumentException('non-nullable baseDailyRate cannot be null'); } - $this->container['roleId'] = $roleId; + $this->container['baseDailyRate'] = $baseDailyRate; return $this; } /** - * Gets isPrimary + * Gets baseHourlyRate * - * @return bool|null + * @return float|null */ - public function getIsPrimary(): ?bool + public function getBaseHourlyRate(): ?float { - return $this->container['isPrimary']; + return $this->container['baseHourlyRate']; } /** - * Sets isPrimary + * Sets baseHourlyRate * - * @param bool|null $isPrimary isPrimary + * @param float|null $baseHourlyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields * * @return $this */ - public function setIsPrimary(?bool $isPrimary): static + public function setBaseHourlyRate(?float $baseHourlyRate): static { - if (is_null($isPrimary)) { - throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); + if (is_null($baseHourlyRate)) { + throw new InvalidArgumentException('non-nullable baseHourlyRate cannot be null'); } - $this->container['isPrimary'] = $isPrimary; + $this->container['baseHourlyRate'] = $baseHourlyRate; return $this; } /** - * Gets baseDailyRate + * Gets isPrimary * - * @return float|null + * @return bool|null */ - public function getBaseDailyRate(): ?float + public function getIsPrimary(): ?bool { - return $this->container['baseDailyRate']; + return $this->container['isPrimary']; } /** - * Sets baseDailyRate + * Sets isPrimary * - * @param float|null $baseDailyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields + * @param bool|null $isPrimary isPrimary * * @return $this */ - public function setBaseDailyRate(?float $baseDailyRate): static + public function setIsPrimary(?bool $isPrimary): static { - if (is_null($baseDailyRate)) { - throw new InvalidArgumentException('non-nullable baseDailyRate cannot be null'); + if (is_null($isPrimary)) { + throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); } - $this->container['baseDailyRate'] = $baseDailyRate; + $this->container['isPrimary'] = $isPrimary; return $this; } /** - * Gets baseHourlyRate + * Gets roleId * - * @return float|null + * @return string|null */ - public function getBaseHourlyRate(): ?float + public function getRoleId(): ?string { - return $this->container['baseHourlyRate']; + return $this->container['roleId']; } /** - * Sets baseHourlyRate + * Sets roleId * - * @param float|null $baseHourlyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields + * @param string|null $roleId roleId * * @return $this */ - public function setBaseHourlyRate(?float $baseHourlyRate): static + public function setRoleId(?string $roleId): static { - if (is_null($baseHourlyRate)) { - throw new InvalidArgumentException('non-nullable baseHourlyRate cannot be null'); + if (is_null($roleId)) { + throw new InvalidArgumentException('non-nullable roleId cannot be null'); } - $this->container['baseHourlyRate'] = $baseHourlyRate; + $this->container['roleId'] = $roleId; return $this; } diff --git a/src/Model/EmployeeRolePayOptions.php b/src/Model/EmployeeRolePayOptions.php index c52087d..d3d5a5a 100644 --- a/src/Model/EmployeeRolePayOptions.php +++ b/src/Model/EmployeeRolePayOptions.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,21 +59,21 @@ class EmployeeRolePayOptions implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ + 'autoAdjustForLeave' => 'bool', + 'baseDailyRate' => 'float', + 'baseHourlyRate' => 'float', + 'basicPay' => 'float', 'basis' => '\SynergiTech\Staffology\Model\PayBasis', - 'nationalMinimumWage' => 'bool', - 'payCode' => 'string', - 'mileageVehicleType' => '\SynergiTech\Staffology\Model\MileageVehicleType', + 'excludedRegularPayLines' => '\SynergiTech\Staffology\Model\PayLine[]', + 'id' => 'string', 'mapsMiles' => 'int', + 'mileageVehicleType' => '\SynergiTech\Staffology\Model\MileageVehicleType', + 'nationalMinimumWage' => 'bool', + 'niTable' => 'string', 'payAmount' => 'float', 'payAmountMultiplier' => 'float', - 'baseHourlyRate' => 'float', - 'baseDailyRate' => 'float', - 'basicPay' => 'float', - 'autoAdjustForLeave' => 'bool', - 'niTable' => 'string', - 'regularPayLines' => '\SynergiTech\Staffology\Model\PayLine[]', - 'excludedRegularPayLines' => '\SynergiTech\Staffology\Model\PayLine[]', - 'id' => 'string' + 'payCode' => 'string', + 'regularPayLines' => '\SynergiTech\Staffology\Model\PayLine[]' ]; /** @@ -82,21 +82,21 @@ class EmployeeRolePayOptions implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ + 'autoAdjustForLeave' => null, + 'baseDailyRate' => 'double', + 'baseHourlyRate' => 'double', + 'basicPay' => 'double', 'basis' => null, - 'nationalMinimumWage' => null, - 'payCode' => null, - 'mileageVehicleType' => null, + 'excludedRegularPayLines' => null, + 'id' => 'uuid', 'mapsMiles' => 'int32', + 'mileageVehicleType' => null, + 'nationalMinimumWage' => null, + 'niTable' => null, 'payAmount' => 'double', 'payAmountMultiplier' => 'double', - 'baseHourlyRate' => 'double', - 'baseDailyRate' => 'double', - 'basicPay' => 'double', - 'autoAdjustForLeave' => null, - 'niTable' => null, - 'regularPayLines' => null, - 'excludedRegularPayLines' => null, - 'id' => 'uuid' + 'payCode' => null, + 'regularPayLines' => null ]; /** @@ -105,21 +105,21 @@ class EmployeeRolePayOptions implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ + 'autoAdjustForLeave' => false, + 'baseDailyRate' => false, + 'baseHourlyRate' => false, + 'basicPay' => false, 'basis' => false, - 'nationalMinimumWage' => false, - 'payCode' => true, - 'mileageVehicleType' => false, + 'excludedRegularPayLines' => true, + 'id' => false, 'mapsMiles' => true, + 'mileageVehicleType' => false, + 'nationalMinimumWage' => false, + 'niTable' => false, 'payAmount' => false, 'payAmountMultiplier' => false, - 'baseHourlyRate' => false, - 'baseDailyRate' => false, - 'basicPay' => false, - 'autoAdjustForLeave' => false, - 'niTable' => false, - 'regularPayLines' => true, - 'excludedRegularPayLines' => true, - 'id' => false + 'payCode' => true, + 'regularPayLines' => true ]; /** @@ -208,21 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'autoAdjustForLeave' => 'autoAdjustForLeave', + 'baseDailyRate' => 'baseDailyRate', + 'baseHourlyRate' => 'baseHourlyRate', + 'basicPay' => 'basicPay', 'basis' => 'basis', - 'nationalMinimumWage' => 'nationalMinimumWage', - 'payCode' => 'payCode', - 'mileageVehicleType' => 'mileageVehicleType', + 'excludedRegularPayLines' => 'excludedRegularPayLines', + 'id' => 'id', 'mapsMiles' => 'mapsMiles', + 'mileageVehicleType' => 'mileageVehicleType', + 'nationalMinimumWage' => 'nationalMinimumWage', + 'niTable' => 'niTable', 'payAmount' => 'payAmount', 'payAmountMultiplier' => 'payAmountMultiplier', - 'baseHourlyRate' => 'baseHourlyRate', - 'baseDailyRate' => 'baseDailyRate', - 'basicPay' => 'basicPay', - 'autoAdjustForLeave' => 'autoAdjustForLeave', - 'niTable' => 'niTable', - 'regularPayLines' => 'regularPayLines', - 'excludedRegularPayLines' => 'excludedRegularPayLines', - 'id' => 'id' + 'payCode' => 'payCode', + 'regularPayLines' => 'regularPayLines' ]; /** @@ -231,21 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'autoAdjustForLeave' => 'setAutoAdjustForLeave', + 'baseDailyRate' => 'setBaseDailyRate', + 'baseHourlyRate' => 'setBaseHourlyRate', + 'basicPay' => 'setBasicPay', 'basis' => 'setBasis', - 'nationalMinimumWage' => 'setNationalMinimumWage', - 'payCode' => 'setPayCode', - 'mileageVehicleType' => 'setMileageVehicleType', + 'excludedRegularPayLines' => 'setExcludedRegularPayLines', + 'id' => 'setId', 'mapsMiles' => 'setMapsMiles', + 'mileageVehicleType' => 'setMileageVehicleType', + 'nationalMinimumWage' => 'setNationalMinimumWage', + 'niTable' => 'setNiTable', 'payAmount' => 'setPayAmount', 'payAmountMultiplier' => 'setPayAmountMultiplier', - 'baseHourlyRate' => 'setBaseHourlyRate', - 'baseDailyRate' => 'setBaseDailyRate', - 'basicPay' => 'setBasicPay', - 'autoAdjustForLeave' => 'setAutoAdjustForLeave', - 'niTable' => 'setNiTable', - 'regularPayLines' => 'setRegularPayLines', - 'excludedRegularPayLines' => 'setExcludedRegularPayLines', - 'id' => 'setId' + 'payCode' => 'setPayCode', + 'regularPayLines' => 'setRegularPayLines' ]; /** @@ -254,21 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'autoAdjustForLeave' => 'getAutoAdjustForLeave', + 'baseDailyRate' => 'getBaseDailyRate', + 'baseHourlyRate' => 'getBaseHourlyRate', + 'basicPay' => 'getBasicPay', 'basis' => 'getBasis', - 'nationalMinimumWage' => 'getNationalMinimumWage', - 'payCode' => 'getPayCode', - 'mileageVehicleType' => 'getMileageVehicleType', + 'excludedRegularPayLines' => 'getExcludedRegularPayLines', + 'id' => 'getId', 'mapsMiles' => 'getMapsMiles', + 'mileageVehicleType' => 'getMileageVehicleType', + 'nationalMinimumWage' => 'getNationalMinimumWage', + 'niTable' => 'getNiTable', 'payAmount' => 'getPayAmount', 'payAmountMultiplier' => 'getPayAmountMultiplier', - 'baseHourlyRate' => 'getBaseHourlyRate', - 'baseDailyRate' => 'getBaseDailyRate', - 'basicPay' => 'getBasicPay', - 'autoAdjustForLeave' => 'getAutoAdjustForLeave', - 'niTable' => 'getNiTable', - 'regularPayLines' => 'getRegularPayLines', - 'excludedRegularPayLines' => 'getExcludedRegularPayLines', - 'id' => 'getId' + 'payCode' => 'getPayCode', + 'regularPayLines' => 'getRegularPayLines' ]; /** @@ -327,21 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('autoAdjustForLeave', $data ?? [], null); + $this->setIfExists('baseDailyRate', $data ?? [], null); + $this->setIfExists('baseHourlyRate', $data ?? [], null); + $this->setIfExists('basicPay', $data ?? [], null); $this->setIfExists('basis', $data ?? [], null); - $this->setIfExists('nationalMinimumWage', $data ?? [], null); - $this->setIfExists('payCode', $data ?? [], null); - $this->setIfExists('mileageVehicleType', $data ?? [], null); + $this->setIfExists('excludedRegularPayLines', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('mapsMiles', $data ?? [], null); + $this->setIfExists('mileageVehicleType', $data ?? [], null); + $this->setIfExists('nationalMinimumWage', $data ?? [], null); + $this->setIfExists('niTable', $data ?? [], null); $this->setIfExists('payAmount', $data ?? [], null); $this->setIfExists('payAmountMultiplier', $data ?? [], null); - $this->setIfExists('baseHourlyRate', $data ?? [], null); - $this->setIfExists('baseDailyRate', $data ?? [], null); - $this->setIfExists('basicPay', $data ?? [], null); - $this->setIfExists('autoAdjustForLeave', $data ?? [], null); - $this->setIfExists('niTable', $data ?? [], null); + $this->setIfExists('payCode', $data ?? [], null); $this->setIfExists('regularPayLines', $data ?? [], null); - $this->setIfExists('excludedRegularPayLines', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); } /** @@ -387,434 +387,434 @@ public function valid(): bool /** - * Gets basis + * Gets autoAdjustForLeave * - * @return \SynergiTech\Staffology\Model\PayBasis|null + * @return bool|null */ - public function getBasis(): ?\SynergiTech\Staffology\Model\PayBasis + public function getAutoAdjustForLeave(): ?bool { - return $this->container['basis']; + return $this->container['autoAdjustForLeave']; } /** - * Sets basis + * Sets autoAdjustForLeave * - * @param \SynergiTech\Staffology\Model\PayBasis|null $basis basis + * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun * * @return $this */ - public function setBasis(?\SynergiTech\Staffology\Model\PayBasis $basis): static + public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static { - if (is_null($basis)) { - throw new InvalidArgumentException('non-nullable basis cannot be null'); + if (is_null($autoAdjustForLeave)) { + throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); } - $this->container['basis'] = $basis; + $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; return $this; } /** - * Gets nationalMinimumWage + * Gets baseDailyRate * - * @return bool|null + * @return float|null */ - public function getNationalMinimumWage(): ?bool + public function getBaseDailyRate(): ?float { - return $this->container['nationalMinimumWage']; + return $this->container['baseDailyRate']; } /** - * Sets nationalMinimumWage + * Sets baseDailyRate * - * @param bool|null $nationalMinimumWage nationalMinimumWage + * @param float|null $baseDailyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields * * @return $this */ - public function setNationalMinimumWage(?bool $nationalMinimumWage): static + public function setBaseDailyRate(?float $baseDailyRate): static { - if (is_null($nationalMinimumWage)) { - throw new InvalidArgumentException('non-nullable nationalMinimumWage cannot be null'); + if (is_null($baseDailyRate)) { + throw new InvalidArgumentException('non-nullable baseDailyRate cannot be null'); } - $this->container['nationalMinimumWage'] = $nationalMinimumWage; + $this->container['baseDailyRate'] = $baseDailyRate; return $this; } /** - * Gets payCode + * Gets baseHourlyRate * - * @return string|null + * @return float|null */ - public function getPayCode(): ?string + public function getBaseHourlyRate(): ?float { - return $this->container['payCode']; + return $this->container['baseHourlyRate']; } /** - * Sets payCode + * Sets baseHourlyRate * - * @param string|null $payCode If you want the Employees pay to be allocated to a code other than BASIC, specify it here + * @param float|null $baseHourlyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields * * @return $this */ - public function setPayCode(?string $payCode): static + public function setBaseHourlyRate(?float $baseHourlyRate): static { - if (is_null($payCode)) { - array_push($this->openAPINullablesSetToNull, 'payCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($baseHourlyRate)) { + throw new InvalidArgumentException('non-nullable baseHourlyRate cannot be null'); } - $this->container['payCode'] = $payCode; + $this->container['baseHourlyRate'] = $baseHourlyRate; return $this; } /** - * Gets mileageVehicleType + * Gets basicPay * - * @return \SynergiTech\Staffology\Model\MileageVehicleType|null + * @return float|null */ - public function getMileageVehicleType(): ?\SynergiTech\Staffology\Model\MileageVehicleType + public function getBasicPay(): ?float { - return $this->container['mileageVehicleType']; + return $this->container['basicPay']; } /** - * Sets mileageVehicleType + * Sets basicPay * - * @param \SynergiTech\Staffology\Model\MileageVehicleType|null $mileageVehicleType mileageVehicleType + * @param float|null $basicPay The amount of basic pay the Employee is regularly paid each period This amount is the combined total of all pay elements that contribute to basic pay * * @return $this */ - public function setMileageVehicleType(?\SynergiTech\Staffology\Model\MileageVehicleType $mileageVehicleType): static + public function setBasicPay(?float $basicPay): static { - if (is_null($mileageVehicleType)) { - throw new InvalidArgumentException('non-nullable mileageVehicleType cannot be null'); + if (is_null($basicPay)) { + throw new InvalidArgumentException('non-nullable basicPay cannot be null'); } - $this->container['mileageVehicleType'] = $mileageVehicleType; + $this->container['basicPay'] = $basicPay; return $this; } /** - * Gets mapsMiles + * Gets basis * - * @return int|null + * @return \SynergiTech\Staffology\Model\PayBasis|null */ - public function getMapsMiles(): ?int + public function getBasis(): ?\SynergiTech\Staffology\Model\PayBasis { - return $this->container['mapsMiles']; + return $this->container['basis']; } /** - * Sets mapsMiles + * Sets basis * - * @param int|null $mapsMiles The number of miles to pay for as Mileage Allowance Payments + * @param \SynergiTech\Staffology\Model\PayBasis|null $basis basis * * @return $this */ - public function setMapsMiles(?int $mapsMiles): static + public function setBasis(?\SynergiTech\Staffology\Model\PayBasis $basis): static { - if (is_null($mapsMiles)) { - array_push($this->openAPINullablesSetToNull, 'mapsMiles'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mapsMiles', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($basis)) { + throw new InvalidArgumentException('non-nullable basis cannot be null'); } - $this->container['mapsMiles'] = $mapsMiles; + $this->container['basis'] = $basis; return $this; } /** - * Gets payAmount + * Gets excludedRegularPayLines * - * @return float|null + * @return \SynergiTech\Staffology\Model\PayLine[]|null */ - public function getPayAmount(): ?float + public function getExcludedRegularPayLines(): ?array { - return $this->container['payAmount']; + return $this->container['excludedRegularPayLines']; } /** - * Sets payAmount + * Sets excludedRegularPayLines * - * @param float|null $payAmount The amount the Employee is regularly paid each period + * @param \SynergiTech\Staffology\Model\PayLine[]|null $excludedRegularPayLines These used to store the PayLines that have been excluded from RegularPaylines. * * @return $this */ - public function setPayAmount(?float $payAmount): static + public function setExcludedRegularPayLines(?array $excludedRegularPayLines): static { - if (is_null($payAmount)) { - throw new InvalidArgumentException('non-nullable payAmount cannot be null'); + if (is_null($excludedRegularPayLines)) { + array_push($this->openAPINullablesSetToNull, 'excludedRegularPayLines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('excludedRegularPayLines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payAmount'] = $payAmount; + $this->container['excludedRegularPayLines'] = $excludedRegularPayLines; return $this; } /** - * Gets payAmountMultiplier + * Gets id * - * @return float|null + * @return string|null */ - public function getPayAmountMultiplier(): ?float + public function getId(): ?string { - return $this->container['payAmountMultiplier']; + return $this->container['id']; } /** - * Sets payAmountMultiplier + * Sets id * - * @param float|null $payAmountMultiplier This property is irrelevant if the basis is Monthly. But if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period. + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setPayAmountMultiplier(?float $payAmountMultiplier): static + public function setId(?string $id): static { - if (is_null($payAmountMultiplier)) { - throw new InvalidArgumentException('non-nullable payAmountMultiplier cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['payAmountMultiplier'] = $payAmountMultiplier; + $this->container['id'] = $id; return $this; } /** - * Gets baseHourlyRate + * Gets mapsMiles * - * @return float|null + * @return int|null */ - public function getBaseHourlyRate(): ?float + public function getMapsMiles(): ?int { - return $this->container['baseHourlyRate']; + return $this->container['mapsMiles']; } /** - * Sets baseHourlyRate + * Sets mapsMiles * - * @param float|null $baseHourlyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields + * @param int|null $mapsMiles The number of miles to pay for as Mileage Allowance Payments * * @return $this */ - public function setBaseHourlyRate(?float $baseHourlyRate): static + public function setMapsMiles(?int $mapsMiles): static { - if (is_null($baseHourlyRate)) { - throw new InvalidArgumentException('non-nullable baseHourlyRate cannot be null'); + if (is_null($mapsMiles)) { + array_push($this->openAPINullablesSetToNull, 'mapsMiles'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('mapsMiles', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['baseHourlyRate'] = $baseHourlyRate; + $this->container['mapsMiles'] = $mapsMiles; return $this; } /** - * Gets baseDailyRate + * Gets mileageVehicleType * - * @return float|null + * @return \SynergiTech\Staffology\Model\MileageVehicleType|null */ - public function getBaseDailyRate(): ?float + public function getMileageVehicleType(): ?\SynergiTech\Staffology\Model\MileageVehicleType { - return $this->container['baseDailyRate']; + return $this->container['mileageVehicleType']; } /** - * Sets baseDailyRate + * Sets mileageVehicleType * - * @param float|null $baseDailyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields + * @param \SynergiTech\Staffology\Model\MileageVehicleType|null $mileageVehicleType mileageVehicleType * * @return $this */ - public function setBaseDailyRate(?float $baseDailyRate): static + public function setMileageVehicleType(?\SynergiTech\Staffology\Model\MileageVehicleType $mileageVehicleType): static { - if (is_null($baseDailyRate)) { - throw new InvalidArgumentException('non-nullable baseDailyRate cannot be null'); + if (is_null($mileageVehicleType)) { + throw new InvalidArgumentException('non-nullable mileageVehicleType cannot be null'); } - $this->container['baseDailyRate'] = $baseDailyRate; + $this->container['mileageVehicleType'] = $mileageVehicleType; return $this; } /** - * Gets basicPay + * Gets nationalMinimumWage * - * @return float|null + * @return bool|null */ - public function getBasicPay(): ?float + public function getNationalMinimumWage(): ?bool { - return $this->container['basicPay']; + return $this->container['nationalMinimumWage']; } /** - * Sets basicPay + * Sets nationalMinimumWage * - * @param float|null $basicPay The amount of basic pay the Employee is regularly paid each period This amount is the combined total of all pay elements that contribute to basic pay + * @param bool|null $nationalMinimumWage nationalMinimumWage * * @return $this */ - public function setBasicPay(?float $basicPay): static + public function setNationalMinimumWage(?bool $nationalMinimumWage): static { - if (is_null($basicPay)) { - throw new InvalidArgumentException('non-nullable basicPay cannot be null'); + if (is_null($nationalMinimumWage)) { + throw new InvalidArgumentException('non-nullable nationalMinimumWage cannot be null'); } - $this->container['basicPay'] = $basicPay; + $this->container['nationalMinimumWage'] = $nationalMinimumWage; return $this; } /** - * Gets autoAdjustForLeave + * Gets niTable * - * @return bool|null + * @return string|null */ - public function getAutoAdjustForLeave(): ?bool + public function getNiTable(): ?string { - return $this->container['autoAdjustForLeave']; + return $this->container['niTable']; } /** - * Sets autoAdjustForLeave + * Sets niTable * - * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun + * @param string|null $niTable niTable * * @return $this */ - public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static + public function setNiTable(?string $niTable): static { - if (is_null($autoAdjustForLeave)) { - throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); + if (is_null($niTable)) { + throw new InvalidArgumentException('non-nullable niTable cannot be null'); } - $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; + $this->container['niTable'] = $niTable; return $this; } /** - * Gets niTable + * Gets payAmount * - * @return string|null + * @return float|null */ - public function getNiTable(): ?string + public function getPayAmount(): ?float { - return $this->container['niTable']; + return $this->container['payAmount']; } /** - * Sets niTable + * Sets payAmount * - * @param string|null $niTable niTable + * @param float|null $payAmount The amount the Employee is regularly paid each period * * @return $this */ - public function setNiTable(?string $niTable): static + public function setPayAmount(?float $payAmount): static { - if (is_null($niTable)) { - throw new InvalidArgumentException('non-nullable niTable cannot be null'); + if (is_null($payAmount)) { + throw new InvalidArgumentException('non-nullable payAmount cannot be null'); } - $this->container['niTable'] = $niTable; + $this->container['payAmount'] = $payAmount; return $this; } /** - * Gets regularPayLines + * Gets payAmountMultiplier * - * @return \SynergiTech\Staffology\Model\PayLine[]|null + * @return float|null */ - public function getRegularPayLines(): ?array + public function getPayAmountMultiplier(): ?float { - return $this->container['regularPayLines']; + return $this->container['payAmountMultiplier']; } /** - * Sets regularPayLines + * Sets payAmountMultiplier * - * @param \SynergiTech\Staffology\Model\PayLine[]|null $regularPayLines These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. + * @param float|null $payAmountMultiplier This property is irrelevant if the basis is Monthly. But if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period. * * @return $this */ - public function setRegularPayLines(?array $regularPayLines): static + public function setPayAmountMultiplier(?float $payAmountMultiplier): static { - if (is_null($regularPayLines)) { - array_push($this->openAPINullablesSetToNull, 'regularPayLines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('regularPayLines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payAmountMultiplier)) { + throw new InvalidArgumentException('non-nullable payAmountMultiplier cannot be null'); } - $this->container['regularPayLines'] = $regularPayLines; + $this->container['payAmountMultiplier'] = $payAmountMultiplier; return $this; } /** - * Gets excludedRegularPayLines + * Gets payCode * - * @return \SynergiTech\Staffology\Model\PayLine[]|null + * @return string|null */ - public function getExcludedRegularPayLines(): ?array + public function getPayCode(): ?string { - return $this->container['excludedRegularPayLines']; + return $this->container['payCode']; } /** - * Sets excludedRegularPayLines + * Sets payCode * - * @param \SynergiTech\Staffology\Model\PayLine[]|null $excludedRegularPayLines These used to store the PayLines that have been excluded from RegularPaylines. + * @param string|null $payCode If you want the Employees pay to be allocated to a code other than BASIC, specify it here * * @return $this */ - public function setExcludedRegularPayLines(?array $excludedRegularPayLines): static + public function setPayCode(?string $payCode): static { - if (is_null($excludedRegularPayLines)) { - array_push($this->openAPINullablesSetToNull, 'excludedRegularPayLines'); + if (is_null($payCode)) { + array_push($this->openAPINullablesSetToNull, 'payCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('excludedRegularPayLines', $nullablesSetToNull); + $index = array_search('payCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['excludedRegularPayLines'] = $excludedRegularPayLines; + $this->container['payCode'] = $payCode; return $this; } /** - * Gets id + * Gets regularPayLines * - * @return string|null + * @return \SynergiTech\Staffology\Model\PayLine[]|null */ - public function getId(): ?string + public function getRegularPayLines(): ?array { - return $this->container['id']; + return $this->container['regularPayLines']; } /** - * Sets id + * Sets regularPayLines * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\PayLine[]|null $regularPayLines These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. * * @return $this */ - public function setId(?string $id): static + public function setRegularPayLines(?array $regularPayLines): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($regularPayLines)) { + array_push($this->openAPINullablesSetToNull, 'regularPayLines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('regularPayLines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['regularPayLines'] = $regularPayLines; return $this; } diff --git a/src/Model/EmployeeSortBy.php b/src/Model/EmployeeSortBy.php index 72251b3..0fb7424 100644 --- a/src/Model/EmployeeSortBy.php +++ b/src/Model/EmployeeSortBy.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/EmployeeStatus.php b/src/Model/EmployeeStatus.php index 366e95c..b3a576d 100644 --- a/src/Model/EmployeeStatus.php +++ b/src/Model/EmployeeStatus.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/EmployeeYtdValues.php b/src/Model/EmployeeYtdValues.php index 0b776b8..e29b5b1 100644 --- a/src/Model/EmployeeYtdValues.php +++ b/src/Model/EmployeeYtdValues.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,9 +60,9 @@ class EmployeeYtdValues implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'employee' => '\SynergiTech\Staffology\Model\Item', - 'payrollCode' => 'string', 'firstName' => 'string', 'lastName' => 'string', + 'payrollCode' => 'string', 'values' => '\SynergiTech\Staffology\Model\YtdValue[]' ]; @@ -73,9 +73,9 @@ class EmployeeYtdValues implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'employee' => null, - 'payrollCode' => null, 'firstName' => null, 'lastName' => null, + 'payrollCode' => null, 'values' => null ]; @@ -86,9 +86,9 @@ class EmployeeYtdValues implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'employee' => false, - 'payrollCode' => true, 'firstName' => true, 'lastName' => true, + 'payrollCode' => true, 'values' => true ]; @@ -179,9 +179,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'employee' => 'employee', - 'payrollCode' => 'payrollCode', 'firstName' => 'firstName', 'lastName' => 'lastName', + 'payrollCode' => 'payrollCode', 'values' => 'values' ]; @@ -192,9 +192,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'employee' => 'setEmployee', - 'payrollCode' => 'setPayrollCode', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', + 'payrollCode' => 'setPayrollCode', 'values' => 'setValues' ]; @@ -205,9 +205,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'employee' => 'getEmployee', - 'payrollCode' => 'getPayrollCode', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', + 'payrollCode' => 'getPayrollCode', 'values' => 'getValues' ]; @@ -268,9 +268,9 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('values', $data ?? [], null); } @@ -344,103 +344,103 @@ public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): stat } /** - * Gets payrollCode + * Gets firstName * * @return string|null */ - public function getPayrollCode(): ?string + public function getFirstName(): ?string { - return $this->container['payrollCode']; + return $this->container['firstName']; } /** - * Sets payrollCode + * Sets firstName * - * @param string|null $payrollCode payrollCode + * @param string|null $firstName firstName * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setFirstName(?string $firstName): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); + if (is_null($firstName)) { + array_push($this->openAPINullablesSetToNull, 'firstName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); + $index = array_search('firstName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payrollCode'] = $payrollCode; + $this->container['firstName'] = $firstName; return $this; } /** - * Gets firstName + * Gets lastName * * @return string|null */ - public function getFirstName(): ?string + public function getLastName(): ?string { - return $this->container['firstName']; + return $this->container['lastName']; } /** - * Sets firstName + * Sets lastName * - * @param string|null $firstName firstName + * @param string|null $lastName lastName * * @return $this */ - public function setFirstName(?string $firstName): static + public function setLastName(?string $lastName): static { - if (is_null($firstName)) { - array_push($this->openAPINullablesSetToNull, 'firstName'); + if (is_null($lastName)) { + array_push($this->openAPINullablesSetToNull, 'lastName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('firstName', $nullablesSetToNull); + $index = array_search('lastName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['firstName'] = $firstName; + $this->container['lastName'] = $lastName; return $this; } /** - * Gets lastName + * Gets payrollCode * * @return string|null */ - public function getLastName(): ?string + public function getPayrollCode(): ?string { - return $this->container['lastName']; + return $this->container['payrollCode']; } /** - * Sets lastName + * Sets payrollCode * - * @param string|null $lastName lastName + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setLastName(?string $lastName): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($lastName)) { - array_push($this->openAPINullablesSetToNull, 'lastName'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastName', $nullablesSetToNull); + $index = array_search('payrollCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lastName'] = $lastName; + $this->container['payrollCode'] = $payrollCode; return $this; } diff --git a/src/Model/EmployerBetaFeatures.php b/src/Model/EmployerBetaFeatures.php new file mode 100644 index 0000000..6b55820 --- /dev/null +++ b/src/Model/EmployerBetaFeatures.php @@ -0,0 +1,43 @@ + */ protected static array $openAPITypes = [ - 'employer' => '\SynergiTech\Staffology\Model\EmployerItem', - 'payCodes' => 'bool', 'csvMappings' => 'bool', 'departments' => 'bool', - 'rti' => 'bool', - 'users' => 'bool', + 'employer' => '\SynergiTech\Staffology\Model\EmployerItem', 'hmrcNoticeSettings' => 'bool', - 'payOptions' => 'bool', - 'workingPatterns' => 'bool', 'occupationalPolicies' => 'bool', - 'pensionSchemes' => 'bool', + 'payCodes' => 'bool', + 'payOptions' => 'bool', 'payees' => 'bool', - 'reportPacks' => 'bool' + 'pensionSchemes' => 'bool', + 'reportPacks' => 'bool', + 'rti' => 'bool', + 'users' => 'bool', + 'workingPatterns' => 'bool' ]; /** @@ -81,19 +81,19 @@ class EmployerDefaults implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'employer' => null, - 'payCodes' => null, 'csvMappings' => null, 'departments' => null, - 'rti' => null, - 'users' => null, + 'employer' => null, 'hmrcNoticeSettings' => null, - 'payOptions' => null, - 'workingPatterns' => null, 'occupationalPolicies' => null, - 'pensionSchemes' => null, + 'payCodes' => null, + 'payOptions' => null, 'payees' => null, - 'reportPacks' => null + 'pensionSchemes' => null, + 'reportPacks' => null, + 'rti' => null, + 'users' => null, + 'workingPatterns' => null ]; /** @@ -102,19 +102,19 @@ class EmployerDefaults implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'employer' => false, - 'payCodes' => false, 'csvMappings' => false, 'departments' => false, - 'rti' => false, - 'users' => false, + 'employer' => false, 'hmrcNoticeSettings' => false, - 'payOptions' => false, - 'workingPatterns' => false, 'occupationalPolicies' => false, - 'pensionSchemes' => false, + 'payCodes' => false, + 'payOptions' => false, 'payees' => false, - 'reportPacks' => false + 'pensionSchemes' => false, + 'reportPacks' => false, + 'rti' => false, + 'users' => false, + 'workingPatterns' => false ]; /** @@ -203,19 +203,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employer' => 'employer', - 'payCodes' => 'payCodes', 'csvMappings' => 'csvMappings', 'departments' => 'departments', - 'rti' => 'rti', - 'users' => 'users', + 'employer' => 'employer', 'hmrcNoticeSettings' => 'hmrcNoticeSettings', - 'payOptions' => 'payOptions', - 'workingPatterns' => 'workingPatterns', 'occupationalPolicies' => 'occupationalPolicies', - 'pensionSchemes' => 'pensionSchemes', + 'payCodes' => 'payCodes', + 'payOptions' => 'payOptions', 'payees' => 'payees', - 'reportPacks' => 'reportPacks' + 'pensionSchemes' => 'pensionSchemes', + 'reportPacks' => 'reportPacks', + 'rti' => 'rti', + 'users' => 'users', + 'workingPatterns' => 'workingPatterns' ]; /** @@ -224,19 +224,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employer' => 'setEmployer', - 'payCodes' => 'setPayCodes', 'csvMappings' => 'setCsvMappings', 'departments' => 'setDepartments', - 'rti' => 'setRti', - 'users' => 'setUsers', + 'employer' => 'setEmployer', 'hmrcNoticeSettings' => 'setHmrcNoticeSettings', - 'payOptions' => 'setPayOptions', - 'workingPatterns' => 'setWorkingPatterns', 'occupationalPolicies' => 'setOccupationalPolicies', - 'pensionSchemes' => 'setPensionSchemes', + 'payCodes' => 'setPayCodes', + 'payOptions' => 'setPayOptions', 'payees' => 'setPayees', - 'reportPacks' => 'setReportPacks' + 'pensionSchemes' => 'setPensionSchemes', + 'reportPacks' => 'setReportPacks', + 'rti' => 'setRti', + 'users' => 'setUsers', + 'workingPatterns' => 'setWorkingPatterns' ]; /** @@ -245,19 +245,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employer' => 'getEmployer', - 'payCodes' => 'getPayCodes', 'csvMappings' => 'getCsvMappings', 'departments' => 'getDepartments', - 'rti' => 'getRti', - 'users' => 'getUsers', + 'employer' => 'getEmployer', 'hmrcNoticeSettings' => 'getHmrcNoticeSettings', - 'payOptions' => 'getPayOptions', - 'workingPatterns' => 'getWorkingPatterns', 'occupationalPolicies' => 'getOccupationalPolicies', - 'pensionSchemes' => 'getPensionSchemes', + 'payCodes' => 'getPayCodes', + 'payOptions' => 'getPayOptions', 'payees' => 'getPayees', - 'reportPacks' => 'getReportPacks' + 'pensionSchemes' => 'getPensionSchemes', + 'reportPacks' => 'getReportPacks', + 'rti' => 'getRti', + 'users' => 'getUsers', + 'workingPatterns' => 'getWorkingPatterns' ]; /** @@ -316,19 +316,19 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payCodes', $data ?? [], null); $this->setIfExists('csvMappings', $data ?? [], null); $this->setIfExists('departments', $data ?? [], null); - $this->setIfExists('rti', $data ?? [], null); - $this->setIfExists('users', $data ?? [], null); + $this->setIfExists('employer', $data ?? [], null); $this->setIfExists('hmrcNoticeSettings', $data ?? [], null); - $this->setIfExists('payOptions', $data ?? [], null); - $this->setIfExists('workingPatterns', $data ?? [], null); $this->setIfExists('occupationalPolicies', $data ?? [], null); - $this->setIfExists('pensionSchemes', $data ?? [], null); + $this->setIfExists('payCodes', $data ?? [], null); + $this->setIfExists('payOptions', $data ?? [], null); $this->setIfExists('payees', $data ?? [], null); + $this->setIfExists('pensionSchemes', $data ?? [], null); $this->setIfExists('reportPacks', $data ?? [], null); + $this->setIfExists('rti', $data ?? [], null); + $this->setIfExists('users', $data ?? [], null); + $this->setIfExists('workingPatterns', $data ?? [], null); } /** @@ -374,352 +374,352 @@ public function valid(): bool /** - * Gets employer + * Gets csvMappings * - * @return \SynergiTech\Staffology\Model\EmployerItem|null + * @return bool|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\EmployerItem + public function getCsvMappings(): ?bool { - return $this->container['employer']; + return $this->container['csvMappings']; } /** - * Sets employer + * Sets csvMappings * - * @param \SynergiTech\Staffology\Model\EmployerItem|null $employer employer + * @param bool|null $csvMappings If true then CSV Mappings will be copied from the specified Employer * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\EmployerItem $employer): static + public function setCsvMappings(?bool $csvMappings): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($csvMappings)) { + throw new InvalidArgumentException('non-nullable csvMappings cannot be null'); } - $this->container['employer'] = $employer; + $this->container['csvMappings'] = $csvMappings; return $this; } /** - * Gets payCodes + * Gets departments * * @return bool|null */ - public function getPayCodes(): ?bool + public function getDepartments(): ?bool { - return $this->container['payCodes']; + return $this->container['departments']; } /** - * Sets payCodes + * Sets departments * - * @param bool|null $payCodes If true then PayCodes and PayCodeSets will be copied from the specified Employer + * @param bool|null $departments If true then Departments, Cost Centres and Analysis Categories will be copied from the specified Employer * * @return $this */ - public function setPayCodes(?bool $payCodes): static + public function setDepartments(?bool $departments): static { - if (is_null($payCodes)) { - throw new InvalidArgumentException('non-nullable payCodes cannot be null'); + if (is_null($departments)) { + throw new InvalidArgumentException('non-nullable departments cannot be null'); } - $this->container['payCodes'] = $payCodes; + $this->container['departments'] = $departments; return $this; } /** - * Gets csvMappings + * Gets employer * - * @return bool|null + * @return \SynergiTech\Staffology\Model\EmployerItem|null */ - public function getCsvMappings(): ?bool + public function getEmployer(): ?\SynergiTech\Staffology\Model\EmployerItem { - return $this->container['csvMappings']; + return $this->container['employer']; } /** - * Sets csvMappings + * Sets employer * - * @param bool|null $csvMappings If true then CSV Mappings will be copied from the specified Employer + * @param \SynergiTech\Staffology\Model\EmployerItem|null $employer employer * * @return $this */ - public function setCsvMappings(?bool $csvMappings): static + public function setEmployer(?\SynergiTech\Staffology\Model\EmployerItem $employer): static { - if (is_null($csvMappings)) { - throw new InvalidArgumentException('non-nullable csvMappings cannot be null'); + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); } - $this->container['csvMappings'] = $csvMappings; + $this->container['employer'] = $employer; return $this; } /** - * Gets departments + * Gets hmrcNoticeSettings * * @return bool|null */ - public function getDepartments(): ?bool + public function getHmrcNoticeSettings(): ?bool { - return $this->container['departments']; + return $this->container['hmrcNoticeSettings']; } /** - * Sets departments + * Sets hmrcNoticeSettings * - * @param bool|null $departments If true then Departments, Cost Centres and Analysis Categories will be copied from the specified Employer + * @param bool|null $hmrcNoticeSettings If true then HMRC Notice Settings will be copied from the specified Employer * * @return $this */ - public function setDepartments(?bool $departments): static + public function setHmrcNoticeSettings(?bool $hmrcNoticeSettings): static { - if (is_null($departments)) { - throw new InvalidArgumentException('non-nullable departments cannot be null'); + if (is_null($hmrcNoticeSettings)) { + throw new InvalidArgumentException('non-nullable hmrcNoticeSettings cannot be null'); } - $this->container['departments'] = $departments; + $this->container['hmrcNoticeSettings'] = $hmrcNoticeSettings; return $this; } /** - * Gets rti + * Gets occupationalPolicies * * @return bool|null */ - public function getRti(): ?bool + public function getOccupationalPolicies(): ?bool { - return $this->container['rti']; + return $this->container['occupationalPolicies']; } /** - * Sets rti + * Sets occupationalPolicies * - * @param bool|null $rti If true then RTI Settings will be copied from the specified Employer + * @param bool|null $occupationalPolicies If true then Occupational Absence Schemes will be copied from the specified Employer. * * @return $this */ - public function setRti(?bool $rti): static + public function setOccupationalPolicies(?bool $occupationalPolicies): static { - if (is_null($rti)) { - throw new InvalidArgumentException('non-nullable rti cannot be null'); + if (is_null($occupationalPolicies)) { + throw new InvalidArgumentException('non-nullable occupationalPolicies cannot be null'); } - $this->container['rti'] = $rti; + $this->container['occupationalPolicies'] = $occupationalPolicies; return $this; } /** - * Gets users + * Gets payCodes * * @return bool|null */ - public function getUsers(): ?bool + public function getPayCodes(): ?bool { - return $this->container['users']; + return $this->container['payCodes']; } /** - * Sets users + * Sets payCodes * - * @param bool|null $users If true then Users will be copied from the specified Employer + * @param bool|null $payCodes If true then PayCodes and PayCodeSets will be copied from the specified Employer * * @return $this */ - public function setUsers(?bool $users): static + public function setPayCodes(?bool $payCodes): static { - if (is_null($users)) { - throw new InvalidArgumentException('non-nullable users cannot be null'); + if (is_null($payCodes)) { + throw new InvalidArgumentException('non-nullable payCodes cannot be null'); } - $this->container['users'] = $users; + $this->container['payCodes'] = $payCodes; return $this; } /** - * Gets hmrcNoticeSettings + * Gets payOptions * * @return bool|null */ - public function getHmrcNoticeSettings(): ?bool + public function getPayOptions(): ?bool { - return $this->container['hmrcNoticeSettings']; + return $this->container['payOptions']; } /** - * Sets hmrcNoticeSettings + * Sets payOptions * - * @param bool|null $hmrcNoticeSettings If true then HMRC Notice Settings will be copied from the specified Employer + * @param bool|null $payOptions If true then Default Pay Options will be copied from the specified Employer. * * @return $this */ - public function setHmrcNoticeSettings(?bool $hmrcNoticeSettings): static + public function setPayOptions(?bool $payOptions): static { - if (is_null($hmrcNoticeSettings)) { - throw new InvalidArgumentException('non-nullable hmrcNoticeSettings cannot be null'); + if (is_null($payOptions)) { + throw new InvalidArgumentException('non-nullable payOptions cannot be null'); } - $this->container['hmrcNoticeSettings'] = $hmrcNoticeSettings; + $this->container['payOptions'] = $payOptions; return $this; } /** - * Gets payOptions + * Gets payees * * @return bool|null */ - public function getPayOptions(): ?bool + public function getPayees(): ?bool { - return $this->container['payOptions']; + return $this->container['payees']; } /** - * Sets payOptions + * Sets payees * - * @param bool|null $payOptions If true then Default Pay Options will be copied from the specified Employer. + * @param bool|null $payees If true then Payees will be copied from the specified Employer * * @return $this */ - public function setPayOptions(?bool $payOptions): static + public function setPayees(?bool $payees): static { - if (is_null($payOptions)) { - throw new InvalidArgumentException('non-nullable payOptions cannot be null'); + if (is_null($payees)) { + throw new InvalidArgumentException('non-nullable payees cannot be null'); } - $this->container['payOptions'] = $payOptions; + $this->container['payees'] = $payees; return $this; } /** - * Gets workingPatterns + * Gets pensionSchemes * * @return bool|null */ - public function getWorkingPatterns(): ?bool + public function getPensionSchemes(): ?bool { - return $this->container['workingPatterns']; + return $this->container['pensionSchemes']; } /** - * Sets workingPatterns + * Sets pensionSchemes * - * @param bool|null $workingPatterns If true then WorkingPatterns will be copied from the specified Employer + * @param bool|null $pensionSchemes If true then PensionSchemes will be copied from the specified Employer * * @return $this */ - public function setWorkingPatterns(?bool $workingPatterns): static + public function setPensionSchemes(?bool $pensionSchemes): static { - if (is_null($workingPatterns)) { - throw new InvalidArgumentException('non-nullable workingPatterns cannot be null'); + if (is_null($pensionSchemes)) { + throw new InvalidArgumentException('non-nullable pensionSchemes cannot be null'); } - $this->container['workingPatterns'] = $workingPatterns; + $this->container['pensionSchemes'] = $pensionSchemes; return $this; } /** - * Gets occupationalPolicies + * Gets reportPacks * * @return bool|null */ - public function getOccupationalPolicies(): ?bool + public function getReportPacks(): ?bool { - return $this->container['occupationalPolicies']; + return $this->container['reportPacks']; } /** - * Sets occupationalPolicies + * Sets reportPacks * - * @param bool|null $occupationalPolicies If true then Occupational Absence Schemes will be copied from the specified Employer. + * @param bool|null $reportPacks If true then ReportPacks will be copied from the specified Employer * * @return $this */ - public function setOccupationalPolicies(?bool $occupationalPolicies): static + public function setReportPacks(?bool $reportPacks): static { - if (is_null($occupationalPolicies)) { - throw new InvalidArgumentException('non-nullable occupationalPolicies cannot be null'); + if (is_null($reportPacks)) { + throw new InvalidArgumentException('non-nullable reportPacks cannot be null'); } - $this->container['occupationalPolicies'] = $occupationalPolicies; + $this->container['reportPacks'] = $reportPacks; return $this; } /** - * Gets pensionSchemes + * Gets rti * * @return bool|null */ - public function getPensionSchemes(): ?bool + public function getRti(): ?bool { - return $this->container['pensionSchemes']; + return $this->container['rti']; } /** - * Sets pensionSchemes + * Sets rti * - * @param bool|null $pensionSchemes If true then PensionSchemes will be copied from the specified Employer + * @param bool|null $rti If true then RTI Settings will be copied from the specified Employer * * @return $this */ - public function setPensionSchemes(?bool $pensionSchemes): static + public function setRti(?bool $rti): static { - if (is_null($pensionSchemes)) { - throw new InvalidArgumentException('non-nullable pensionSchemes cannot be null'); + if (is_null($rti)) { + throw new InvalidArgumentException('non-nullable rti cannot be null'); } - $this->container['pensionSchemes'] = $pensionSchemes; + $this->container['rti'] = $rti; return $this; } /** - * Gets payees + * Gets users * * @return bool|null */ - public function getPayees(): ?bool + public function getUsers(): ?bool { - return $this->container['payees']; + return $this->container['users']; } /** - * Sets payees + * Sets users * - * @param bool|null $payees If true then Payees will be copied from the specified Employer + * @param bool|null $users If true then Users will be copied from the specified Employer * * @return $this */ - public function setPayees(?bool $payees): static + public function setUsers(?bool $users): static { - if (is_null($payees)) { - throw new InvalidArgumentException('non-nullable payees cannot be null'); + if (is_null($users)) { + throw new InvalidArgumentException('non-nullable users cannot be null'); } - $this->container['payees'] = $payees; + $this->container['users'] = $users; return $this; } /** - * Gets reportPacks + * Gets workingPatterns * * @return bool|null */ - public function getReportPacks(): ?bool + public function getWorkingPatterns(): ?bool { - return $this->container['reportPacks']; + return $this->container['workingPatterns']; } /** - * Sets reportPacks + * Sets workingPatterns * - * @param bool|null $reportPacks If true then ReportPacks will be copied from the specified Employer + * @param bool|null $workingPatterns If true then WorkingPatterns will be copied from the specified Employer * * @return $this */ - public function setReportPacks(?bool $reportPacks): static + public function setWorkingPatterns(?bool $workingPatterns): static { - if (is_null($reportPacks)) { - throw new InvalidArgumentException('non-nullable reportPacks cannot be null'); + if (is_null($workingPatterns)) { + throw new InvalidArgumentException('non-nullable workingPatterns cannot be null'); } - $this->container['reportPacks'] = $reportPacks; + $this->container['workingPatterns'] = $workingPatterns; return $this; } diff --git a/src/Model/EmployerEmail.php b/src/Model/EmployerEmail.php index 31cb5c4..fa64bc5 100644 --- a/src/Model/EmployerEmail.php +++ b/src/Model/EmployerEmail.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,21 +59,21 @@ class EmployerEmail implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'toName' => 'string', - 'toEmail' => 'string', - 'subject' => 'string', - 'buttonText' => 'string', - 'buttonLink' => 'string', - 'bodyPreview' => 'string', - 'body' => 'string', 'afterBtnBody' => 'string', + 'attachments' => '\SynergiTech\Staffology\Model\EmailAttachment[]', + 'body' => 'string', + 'bodyPreview' => 'string', + 'buttonLink' => 'string', + 'buttonText' => 'string', + 'id' => 'string', + 'sendAttempts' => 'int', 'status' => '\SynergiTech\Staffology\Model\BackgroundTaskStatus', 'statusDate' => '\DateTime', 'statusMessage' => 'string', - 'sendAttempts' => 'int', - 'webAppBaseUrl' => 'string', - 'attachments' => '\SynergiTech\Staffology\Model\EmailAttachment[]', - 'id' => 'string' + 'subject' => 'string', + 'toEmail' => 'string', + 'toName' => 'string', + 'webAppBaseUrl' => 'string' ]; /** @@ -82,21 +82,21 @@ class EmployerEmail implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'toName' => null, - 'toEmail' => null, - 'subject' => null, - 'buttonText' => null, - 'buttonLink' => null, - 'bodyPreview' => null, - 'body' => null, 'afterBtnBody' => null, + 'attachments' => null, + 'body' => null, + 'bodyPreview' => null, + 'buttonLink' => null, + 'buttonText' => null, + 'id' => 'uuid', + 'sendAttempts' => 'int32', 'status' => null, 'statusDate' => 'date-time', 'statusMessage' => null, - 'sendAttempts' => 'int32', - 'webAppBaseUrl' => null, - 'attachments' => null, - 'id' => 'uuid' + 'subject' => null, + 'toEmail' => null, + 'toName' => null, + 'webAppBaseUrl' => null ]; /** @@ -105,21 +105,21 @@ class EmployerEmail implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'toName' => false, - 'toEmail' => false, - 'subject' => false, - 'buttonText' => true, - 'buttonLink' => true, - 'bodyPreview' => true, - 'body' => true, 'afterBtnBody' => true, + 'attachments' => true, + 'body' => true, + 'bodyPreview' => true, + 'buttonLink' => true, + 'buttonText' => true, + 'id' => false, + 'sendAttempts' => false, 'status' => false, 'statusDate' => false, 'statusMessage' => true, - 'sendAttempts' => false, - 'webAppBaseUrl' => true, - 'attachments' => true, - 'id' => false + 'subject' => false, + 'toEmail' => false, + 'toName' => false, + 'webAppBaseUrl' => true ]; /** @@ -208,21 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'toName' => 'toName', - 'toEmail' => 'toEmail', - 'subject' => 'subject', - 'buttonText' => 'buttonText', - 'buttonLink' => 'buttonLink', - 'bodyPreview' => 'bodyPreview', - 'body' => 'body', 'afterBtnBody' => 'afterBtnBody', + 'attachments' => 'attachments', + 'body' => 'body', + 'bodyPreview' => 'bodyPreview', + 'buttonLink' => 'buttonLink', + 'buttonText' => 'buttonText', + 'id' => 'id', + 'sendAttempts' => 'sendAttempts', 'status' => 'status', 'statusDate' => 'statusDate', 'statusMessage' => 'statusMessage', - 'sendAttempts' => 'sendAttempts', - 'webAppBaseUrl' => 'webAppBaseUrl', - 'attachments' => 'attachments', - 'id' => 'id' + 'subject' => 'subject', + 'toEmail' => 'toEmail', + 'toName' => 'toName', + 'webAppBaseUrl' => 'webAppBaseUrl' ]; /** @@ -231,21 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'toName' => 'setToName', - 'toEmail' => 'setToEmail', - 'subject' => 'setSubject', - 'buttonText' => 'setButtonText', - 'buttonLink' => 'setButtonLink', - 'bodyPreview' => 'setBodyPreview', - 'body' => 'setBody', 'afterBtnBody' => 'setAfterBtnBody', + 'attachments' => 'setAttachments', + 'body' => 'setBody', + 'bodyPreview' => 'setBodyPreview', + 'buttonLink' => 'setButtonLink', + 'buttonText' => 'setButtonText', + 'id' => 'setId', + 'sendAttempts' => 'setSendAttempts', 'status' => 'setStatus', 'statusDate' => 'setStatusDate', 'statusMessage' => 'setStatusMessage', - 'sendAttempts' => 'setSendAttempts', - 'webAppBaseUrl' => 'setWebAppBaseUrl', - 'attachments' => 'setAttachments', - 'id' => 'setId' + 'subject' => 'setSubject', + 'toEmail' => 'setToEmail', + 'toName' => 'setToName', + 'webAppBaseUrl' => 'setWebAppBaseUrl' ]; /** @@ -254,21 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'toName' => 'getToName', - 'toEmail' => 'getToEmail', - 'subject' => 'getSubject', - 'buttonText' => 'getButtonText', - 'buttonLink' => 'getButtonLink', - 'bodyPreview' => 'getBodyPreview', - 'body' => 'getBody', 'afterBtnBody' => 'getAfterBtnBody', + 'attachments' => 'getAttachments', + 'body' => 'getBody', + 'bodyPreview' => 'getBodyPreview', + 'buttonLink' => 'getButtonLink', + 'buttonText' => 'getButtonText', + 'id' => 'getId', + 'sendAttempts' => 'getSendAttempts', 'status' => 'getStatus', 'statusDate' => 'getStatusDate', 'statusMessage' => 'getStatusMessage', - 'sendAttempts' => 'getSendAttempts', - 'webAppBaseUrl' => 'getWebAppBaseUrl', - 'attachments' => 'getAttachments', - 'id' => 'getId' + 'subject' => 'getSubject', + 'toEmail' => 'getToEmail', + 'toName' => 'getToName', + 'webAppBaseUrl' => 'getWebAppBaseUrl' ]; /** @@ -327,21 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('toName', $data ?? [], null); - $this->setIfExists('toEmail', $data ?? [], null); - $this->setIfExists('subject', $data ?? [], null); - $this->setIfExists('buttonText', $data ?? [], null); - $this->setIfExists('buttonLink', $data ?? [], null); - $this->setIfExists('bodyPreview', $data ?? [], null); - $this->setIfExists('body', $data ?? [], null); $this->setIfExists('afterBtnBody', $data ?? [], null); + $this->setIfExists('attachments', $data ?? [], null); + $this->setIfExists('body', $data ?? [], null); + $this->setIfExists('bodyPreview', $data ?? [], null); + $this->setIfExists('buttonLink', $data ?? [], null); + $this->setIfExists('buttonText', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('sendAttempts', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('statusDate', $data ?? [], null); $this->setIfExists('statusMessage', $data ?? [], null); - $this->setIfExists('sendAttempts', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + $this->setIfExists('toEmail', $data ?? [], null); + $this->setIfExists('toName', $data ?? [], null); $this->setIfExists('webAppBaseUrl', $data ?? [], null); - $this->setIfExists('attachments', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); } /** @@ -371,26 +371,16 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['toName'] === null) { - $invalidProperties[] = "'toName' can't be null"; - } - if ((mb_strlen($this->container['toName']) > 150)) { - $invalidProperties[] = "invalid value for 'toName', the character length must be smaller than or equal to 150."; - } - - if ((mb_strlen($this->container['toName']) < 1)) { - $invalidProperties[] = "invalid value for 'toName', the character length must be bigger than or equal to 1."; + if (!is_null($this->container['bodyPreview']) && (mb_strlen($this->container['bodyPreview']) > 100)) { + $invalidProperties[] = "invalid value for 'bodyPreview', the character length must be smaller than or equal to 100."; } - if ($this->container['toEmail'] === null) { - $invalidProperties[] = "'toEmail' can't be null"; - } - if ((mb_strlen($this->container['toEmail']) > 150)) { - $invalidProperties[] = "invalid value for 'toEmail', the character length must be smaller than or equal to 150."; + if (!is_null($this->container['buttonLink']) && (mb_strlen($this->container['buttonLink']) > 250)) { + $invalidProperties[] = "invalid value for 'buttonLink', the character length must be smaller than or equal to 250."; } - if ((mb_strlen($this->container['toEmail']) < 1)) { - $invalidProperties[] = "invalid value for 'toEmail', the character length must be bigger than or equal to 1."; + if (!is_null($this->container['buttonText']) && (mb_strlen($this->container['buttonText']) > 100)) { + $invalidProperties[] = "invalid value for 'buttonText', the character length must be smaller than or equal to 100."; } if ($this->container['subject'] === null) { @@ -404,16 +394,26 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'subject', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['buttonText']) && (mb_strlen($this->container['buttonText']) > 100)) { - $invalidProperties[] = "invalid value for 'buttonText', the character length must be smaller than or equal to 100."; + if ($this->container['toEmail'] === null) { + $invalidProperties[] = "'toEmail' can't be null"; + } + if ((mb_strlen($this->container['toEmail']) > 150)) { + $invalidProperties[] = "invalid value for 'toEmail', the character length must be smaller than or equal to 150."; } - if (!is_null($this->container['buttonLink']) && (mb_strlen($this->container['buttonLink']) > 250)) { - $invalidProperties[] = "invalid value for 'buttonLink', the character length must be smaller than or equal to 250."; + if ((mb_strlen($this->container['toEmail']) < 1)) { + $invalidProperties[] = "invalid value for 'toEmail', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['bodyPreview']) && (mb_strlen($this->container['bodyPreview']) > 100)) { - $invalidProperties[] = "invalid value for 'bodyPreview', the character length must be smaller than or equal to 100."; + if ($this->container['toName'] === null) { + $invalidProperties[] = "'toName' can't be null"; + } + if ((mb_strlen($this->container['toName']) > 150)) { + $invalidProperties[] = "invalid value for 'toName', the character length must be smaller than or equal to 150."; + } + + if ((mb_strlen($this->container['toName']) < 1)) { + $invalidProperties[] = "invalid value for 'toName', the character length must be bigger than or equal to 1."; } return $invalidProperties; @@ -432,141 +432,141 @@ public function valid(): bool /** - * Gets toName + * Gets afterBtnBody * - * @return string + * @return string|null */ - public function getToName(): string + public function getAfterBtnBody(): ?string { - return $this->container['toName']; + return $this->container['afterBtnBody']; } /** - * Sets toName + * Sets afterBtnBody * - * @param string $toName toName + * @param string|null $afterBtnBody afterBtnBody * * @return $this */ - public function setToName(string $toName): static + public function setAfterBtnBody(?string $afterBtnBody): static { - if (is_null($toName)) { - throw new InvalidArgumentException('non-nullable toName cannot be null'); - } - if ((mb_strlen($toName) > 150)) { - throw new InvalidArgumentException('invalid length for $toName when calling EmployerEmail., must be smaller than or equal to 150.'); - } - if ((mb_strlen($toName) < 1)) { - throw new InvalidArgumentException('invalid length for $toName when calling EmployerEmail., must be bigger than or equal to 1.'); + if (is_null($afterBtnBody)) { + array_push($this->openAPINullablesSetToNull, 'afterBtnBody'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('afterBtnBody', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - - $this->container['toName'] = $toName; + $this->container['afterBtnBody'] = $afterBtnBody; return $this; } /** - * Gets toEmail + * Gets attachments * - * @return string + * @return \SynergiTech\Staffology\Model\EmailAttachment[]|null */ - public function getToEmail(): string + public function getAttachments(): ?array { - return $this->container['toEmail']; + return $this->container['attachments']; } /** - * Sets toEmail + * Sets attachments * - * @param string $toEmail toEmail + * @param \SynergiTech\Staffology\Model\EmailAttachment[]|null $attachments attachments * * @return $this */ - public function setToEmail(string $toEmail): static + public function setAttachments(?array $attachments): static { - if (is_null($toEmail)) { - throw new InvalidArgumentException('non-nullable toEmail cannot be null'); - } - if ((mb_strlen($toEmail) > 150)) { - throw new InvalidArgumentException('invalid length for $toEmail when calling EmployerEmail., must be smaller than or equal to 150.'); - } - if ((mb_strlen($toEmail) < 1)) { - throw new InvalidArgumentException('invalid length for $toEmail when calling EmployerEmail., must be bigger than or equal to 1.'); + if (is_null($attachments)) { + array_push($this->openAPINullablesSetToNull, 'attachments'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('attachments', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - - $this->container['toEmail'] = $toEmail; + $this->container['attachments'] = $attachments; return $this; } /** - * Gets subject + * Gets body * - * @return string + * @return string|null */ - public function getSubject(): string + public function getBody(): ?string { - return $this->container['subject']; + return $this->container['body']; } /** - * Sets subject + * Sets body * - * @param string $subject subject + * @param string|null $body body * * @return $this */ - public function setSubject(string $subject): static + public function setBody(?string $body): static { - if (is_null($subject)) { - throw new InvalidArgumentException('non-nullable subject cannot be null'); - } - if ((mb_strlen($subject) > 150)) { - throw new InvalidArgumentException('invalid length for $subject when calling EmployerEmail., must be smaller than or equal to 150.'); - } - if ((mb_strlen($subject) < 1)) { - throw new InvalidArgumentException('invalid length for $subject when calling EmployerEmail., must be bigger than or equal to 1.'); + if (is_null($body)) { + array_push($this->openAPINullablesSetToNull, 'body'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('body', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - - $this->container['subject'] = $subject; + $this->container['body'] = $body; return $this; } /** - * Gets buttonText + * Gets bodyPreview * * @return string|null */ - public function getButtonText(): ?string + public function getBodyPreview(): ?string { - return $this->container['buttonText']; + return $this->container['bodyPreview']; } /** - * Sets buttonText + * Sets bodyPreview * - * @param string|null $buttonText buttonText + * @param string|null $bodyPreview bodyPreview * * @return $this */ - public function setButtonText(?string $buttonText): static + public function setBodyPreview(?string $bodyPreview): static { - if (is_null($buttonText)) { - array_push($this->openAPINullablesSetToNull, 'buttonText'); + if (is_null($bodyPreview)) { + array_push($this->openAPINullablesSetToNull, 'bodyPreview'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('buttonText', $nullablesSetToNull); + $index = array_search('bodyPreview', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($buttonText) && (mb_strlen($buttonText) > 100)) { - throw new InvalidArgumentException('invalid length for $buttonText when calling EmployerEmail., must be smaller than or equal to 100.'); + if (!is_null($bodyPreview) && (mb_strlen($bodyPreview) > 100)) { + throw new InvalidArgumentException('invalid length for $bodyPreview when calling EmployerEmail., must be smaller than or equal to 100.'); } - $this->container['buttonText'] = $buttonText; + $this->container['bodyPreview'] = $bodyPreview; return $this; } @@ -610,107 +610,93 @@ public function setButtonLink(?string $buttonLink): static } /** - * Gets bodyPreview + * Gets buttonText * * @return string|null */ - public function getBodyPreview(): ?string + public function getButtonText(): ?string { - return $this->container['bodyPreview']; + return $this->container['buttonText']; } /** - * Sets bodyPreview + * Sets buttonText * - * @param string|null $bodyPreview bodyPreview + * @param string|null $buttonText buttonText * * @return $this */ - public function setBodyPreview(?string $bodyPreview): static + public function setButtonText(?string $buttonText): static { - if (is_null($bodyPreview)) { - array_push($this->openAPINullablesSetToNull, 'bodyPreview'); + if (is_null($buttonText)) { + array_push($this->openAPINullablesSetToNull, 'buttonText'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bodyPreview', $nullablesSetToNull); + $index = array_search('buttonText', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($bodyPreview) && (mb_strlen($bodyPreview) > 100)) { - throw new InvalidArgumentException('invalid length for $bodyPreview when calling EmployerEmail., must be smaller than or equal to 100.'); + if (!is_null($buttonText) && (mb_strlen($buttonText) > 100)) { + throw new InvalidArgumentException('invalid length for $buttonText when calling EmployerEmail., must be smaller than or equal to 100.'); } - $this->container['bodyPreview'] = $bodyPreview; + $this->container['buttonText'] = $buttonText; return $this; } /** - * Gets body + * Gets id * * @return string|null */ - public function getBody(): ?string + public function getId(): ?string { - return $this->container['body']; + return $this->container['id']; } /** - * Sets body + * Sets id * - * @param string|null $body body + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setBody(?string $body): static + public function setId(?string $id): static { - if (is_null($body)) { - array_push($this->openAPINullablesSetToNull, 'body'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('body', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['body'] = $body; + $this->container['id'] = $id; return $this; } /** - * Gets afterBtnBody + * Gets sendAttempts * - * @return string|null + * @return int|null */ - public function getAfterBtnBody(): ?string + public function getSendAttempts(): ?int { - return $this->container['afterBtnBody']; + return $this->container['sendAttempts']; } /** - * Sets afterBtnBody + * Sets sendAttempts * - * @param string|null $afterBtnBody afterBtnBody + * @param int|null $sendAttempts sendAttempts * * @return $this */ - public function setAfterBtnBody(?string $afterBtnBody): static + public function setSendAttempts(?int $sendAttempts): static { - if (is_null($afterBtnBody)) { - array_push($this->openAPINullablesSetToNull, 'afterBtnBody'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('afterBtnBody', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($sendAttempts)) { + throw new InvalidArgumentException('non-nullable sendAttempts cannot be null'); } - $this->container['afterBtnBody'] = $afterBtnBody; + $this->container['sendAttempts'] = $sendAttempts; return $this; } @@ -804,123 +790,137 @@ public function setStatusMessage(?string $statusMessage): static } /** - * Gets sendAttempts + * Gets subject * - * @return int|null + * @return string */ - public function getSendAttempts(): ?int + public function getSubject(): string { - return $this->container['sendAttempts']; + return $this->container['subject']; } /** - * Sets sendAttempts + * Sets subject * - * @param int|null $sendAttempts sendAttempts + * @param string $subject subject * * @return $this */ - public function setSendAttempts(?int $sendAttempts): static + public function setSubject(string $subject): static { - if (is_null($sendAttempts)) { - throw new InvalidArgumentException('non-nullable sendAttempts cannot be null'); + if (is_null($subject)) { + throw new InvalidArgumentException('non-nullable subject cannot be null'); + } + if ((mb_strlen($subject) > 150)) { + throw new InvalidArgumentException('invalid length for $subject when calling EmployerEmail., must be smaller than or equal to 150.'); + } + if ((mb_strlen($subject) < 1)) { + throw new InvalidArgumentException('invalid length for $subject when calling EmployerEmail., must be bigger than or equal to 1.'); } - $this->container['sendAttempts'] = $sendAttempts; + + $this->container['subject'] = $subject; return $this; } /** - * Gets webAppBaseUrl + * Gets toEmail * - * @return string|null + * @return string */ - public function getWebAppBaseUrl(): ?string + public function getToEmail(): string { - return $this->container['webAppBaseUrl']; + return $this->container['toEmail']; } /** - * Sets webAppBaseUrl + * Sets toEmail * - * @param string|null $webAppBaseUrl webAppBaseUrl + * @param string $toEmail toEmail * * @return $this */ - public function setWebAppBaseUrl(?string $webAppBaseUrl): static + public function setToEmail(string $toEmail): static { - if (is_null($webAppBaseUrl)) { - array_push($this->openAPINullablesSetToNull, 'webAppBaseUrl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('webAppBaseUrl', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($toEmail)) { + throw new InvalidArgumentException('non-nullable toEmail cannot be null'); + } + if ((mb_strlen($toEmail) > 150)) { + throw new InvalidArgumentException('invalid length for $toEmail when calling EmployerEmail., must be smaller than or equal to 150.'); + } + if ((mb_strlen($toEmail) < 1)) { + throw new InvalidArgumentException('invalid length for $toEmail when calling EmployerEmail., must be bigger than or equal to 1.'); } - $this->container['webAppBaseUrl'] = $webAppBaseUrl; + + $this->container['toEmail'] = $toEmail; return $this; } /** - * Gets attachments + * Gets toName * - * @return \SynergiTech\Staffology\Model\EmailAttachment[]|null + * @return string */ - public function getAttachments(): ?array + public function getToName(): string { - return $this->container['attachments']; + return $this->container['toName']; } /** - * Sets attachments + * Sets toName * - * @param \SynergiTech\Staffology\Model\EmailAttachment[]|null $attachments attachments + * @param string $toName toName * * @return $this */ - public function setAttachments(?array $attachments): static + public function setToName(string $toName): static { - if (is_null($attachments)) { - array_push($this->openAPINullablesSetToNull, 'attachments'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('attachments', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($toName)) { + throw new InvalidArgumentException('non-nullable toName cannot be null'); } - $this->container['attachments'] = $attachments; + if ((mb_strlen($toName) > 150)) { + throw new InvalidArgumentException('invalid length for $toName when calling EmployerEmail., must be smaller than or equal to 150.'); + } + if ((mb_strlen($toName) < 1)) { + throw new InvalidArgumentException('invalid length for $toName when calling EmployerEmail., must be bigger than or equal to 1.'); + } + + $this->container['toName'] = $toName; return $this; } /** - * Gets id + * Gets webAppBaseUrl * * @return string|null */ - public function getId(): ?string + public function getWebAppBaseUrl(): ?string { - return $this->container['id']; + return $this->container['webAppBaseUrl']; } /** - * Sets id + * Sets webAppBaseUrl * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $webAppBaseUrl webAppBaseUrl * * @return $this */ - public function setId(?string $id): static + public function setWebAppBaseUrl(?string $webAppBaseUrl): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($webAppBaseUrl)) { + array_push($this->openAPINullablesSetToNull, 'webAppBaseUrl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('webAppBaseUrl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['webAppBaseUrl'] = $webAppBaseUrl; return $this; } diff --git a/src/Model/EmployerEvcOptInHistory.php b/src/Model/EmployerEvcOptInHistory.php index ee54892..4d49de4 100644 --- a/src/Model/EmployerEvcOptInHistory.php +++ b/src/Model/EmployerEvcOptInHistory.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class EmployerEvcOptInHistory implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ - 'optIn' => 'bool', 'date' => '\DateTime', + 'optIn' => 'bool', 'userEmail' => 'string' ]; @@ -70,8 +70,8 @@ class EmployerEvcOptInHistory implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ - 'optIn' => null, 'date' => 'date', + 'optIn' => null, 'userEmail' => null ]; @@ -81,8 +81,8 @@ class EmployerEvcOptInHistory implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ - 'optIn' => false, 'date' => false, + 'optIn' => false, 'userEmail' => true ]; @@ -172,8 +172,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'optIn' => 'optIn', 'date' => 'date', + 'optIn' => 'optIn', 'userEmail' => 'userEmail' ]; @@ -183,8 +183,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'optIn' => 'setOptIn', 'date' => 'setDate', + 'optIn' => 'setOptIn', 'userEmail' => 'setUserEmail' ]; @@ -194,8 +194,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'optIn' => 'getOptIn', 'date' => 'getDate', + 'optIn' => 'getOptIn', 'userEmail' => 'getUserEmail' ]; @@ -255,8 +255,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('optIn', $data ?? [], null); $this->setIfExists('date', $data ?? [], null); + $this->setIfExists('optIn', $data ?? [], null); $this->setIfExists('userEmail', $data ?? [], null); } @@ -303,55 +303,55 @@ public function valid(): bool /** - * Gets optIn + * Gets date * - * @return bool|null + * @return \DateTime|null */ - public function getOptIn(): ?bool + public function getDate(): ?\DateTime { - return $this->container['optIn']; + return $this->container['date']; } /** - * Sets optIn + * Sets date * - * @param bool|null $optIn optIn + * @param \DateTime|null $date date * * @return $this */ - public function setOptIn(?bool $optIn): static + public function setDate(?\DateTime $date): static { - if (is_null($optIn)) { - throw new InvalidArgumentException('non-nullable optIn cannot be null'); + if (is_null($date)) { + throw new InvalidArgumentException('non-nullable date cannot be null'); } - $this->container['optIn'] = $optIn; + $this->container['date'] = $date; return $this; } /** - * Gets date + * Gets optIn * - * @return \DateTime|null + * @return bool|null */ - public function getDate(): ?\DateTime + public function getOptIn(): ?bool { - return $this->container['date']; + return $this->container['optIn']; } /** - * Sets date + * Sets optIn * - * @param \DateTime|null $date date + * @param bool|null $optIn optIn * * @return $this */ - public function setDate(?\DateTime $date): static + public function setOptIn(?bool $optIn): static { - if (is_null($date)) { - throw new InvalidArgumentException('non-nullable date cannot be null'); + if (is_null($optIn)) { + throw new InvalidArgumentException('non-nullable optIn cannot be null'); } - $this->container['date'] = $date; + $this->container['optIn'] = $optIn; return $this; } diff --git a/src/Model/EmployerGroup.php b/src/Model/EmployerGroup.php index e9ab748..83d8116 100644 --- a/src/Model/EmployerGroup.php +++ b/src/Model/EmployerGroup.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class EmployerGroup implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'code' => 'string', - 'employerCount' => 'int', 'color' => 'string', + 'employerCount' => 'int', 'name' => 'string' ]; @@ -72,8 +72,8 @@ class EmployerGroup implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'code' => null, - 'employerCount' => 'int32', 'color' => null, + 'employerCount' => 'int32', 'name' => null ]; @@ -84,8 +84,8 @@ class EmployerGroup implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'code' => false, - 'employerCount' => false, 'color' => true, + 'employerCount' => false, 'name' => false ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'code' => 'code', - 'employerCount' => 'employerCount', 'color' => 'color', + 'employerCount' => 'employerCount', 'name' => 'name' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'code' => 'setCode', - 'employerCount' => 'setEmployerCount', 'color' => 'setColor', + 'employerCount' => 'setEmployerCount', 'name' => 'setName' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'code' => 'getCode', - 'employerCount' => 'getEmployerCount', 'color' => 'getColor', + 'employerCount' => 'getEmployerCount', 'name' => 'getName' ]; @@ -262,8 +262,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('employerCount', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); + $this->setIfExists('employerCount', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); } @@ -369,33 +369,6 @@ public function setCode(string $code): static return $this; } - /** - * Gets employerCount - * - * @return int|null - */ - public function getEmployerCount(): ?int - { - return $this->container['employerCount']; - } - - /** - * Sets employerCount - * - * @param int|null $employerCount employerCount - * - * @return $this - */ - public function setEmployerCount(?int $employerCount): static - { - if (is_null($employerCount)) { - throw new InvalidArgumentException('non-nullable employerCount cannot be null'); - } - $this->container['employerCount'] = $employerCount; - - return $this; - } - /** * Gets color * @@ -434,6 +407,33 @@ public function setColor(?string $color): static return $this; } + /** + * Gets employerCount + * + * @return int|null + */ + public function getEmployerCount(): ?int + { + return $this->container['employerCount']; + } + + /** + * Sets employerCount + * + * @param int|null $employerCount employerCount + * + * @return $this + */ + public function setEmployerCount(?int $employerCount): static + { + if (is_null($employerCount)) { + throw new InvalidArgumentException('non-nullable employerCount cannot be null'); + } + $this->container['employerCount'] = $employerCount; + + return $this; + } + /** * Gets name * diff --git a/src/Model/EmployerGroupMembership.php b/src/Model/EmployerGroupMembership.php index 0eeeb61..fe1f6e0 100644 --- a/src/Model/EmployerGroupMembership.php +++ b/src/Model/EmployerGroupMembership.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -62,8 +62,8 @@ class EmployerGroupMembership implements ModelInterface, ArrayAccess, JsonSerial protected static array $openAPITypes = [ 'code' => 'string', 'color' => 'string', - 'title' => 'string', - 'primary' => 'bool' + 'primary' => 'bool', + 'title' => 'string' ]; /** @@ -74,8 +74,8 @@ class EmployerGroupMembership implements ModelInterface, ArrayAccess, JsonSerial protected static array $openAPIFormats = [ 'code' => null, 'color' => null, - 'title' => null, - 'primary' => null + 'primary' => null, + 'title' => null ]; /** @@ -86,8 +86,8 @@ class EmployerGroupMembership implements ModelInterface, ArrayAccess, JsonSerial protected static array $openAPINullables = [ 'code' => false, 'color' => true, - 'title' => true, - 'primary' => false + 'primary' => false, + 'title' => true ]; /** @@ -178,8 +178,8 @@ public function isNullableSetToNull(string $property): bool protected static array $attributeMap = [ 'code' => 'code', 'color' => 'color', - 'title' => 'title', - 'primary' => 'primary' + 'primary' => 'primary', + 'title' => 'title' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool protected static array $setters = [ 'code' => 'setCode', 'color' => 'setColor', - 'title' => 'setTitle', - 'primary' => 'setPrimary' + 'primary' => 'setPrimary', + 'title' => 'setTitle' ]; /** @@ -202,8 +202,8 @@ public function isNullableSetToNull(string $property): bool protected static array $getters = [ 'code' => 'getCode', 'color' => 'getColor', - 'title' => 'getTitle', - 'primary' => 'getPrimary' + 'primary' => 'getPrimary', + 'title' => 'getTitle' ]; /** @@ -264,8 +264,8 @@ public function __construct(?array $data = null) { $this->setIfExists('code', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('primary', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -384,62 +384,62 @@ public function setColor(?string $color): static } /** - * Gets title + * Gets primary * - * @return string|null + * @return bool|null */ - public function getTitle(): ?string + public function getPrimary(): ?bool { - return $this->container['title']; + return $this->container['primary']; } /** - * Sets title + * Sets primary * - * @param string|null $title [readonly] The Title for the EmployerGroup + * @param bool|null $primary Set to true if this is the primary EmployerGroup for the Employer. Only one EmployerGroup can be set as the primary. * * @return $this */ - public function setTitle(?string $title): static + public function setPrimary(?bool $primary): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($primary)) { + throw new InvalidArgumentException('non-nullable primary cannot be null'); } - $this->container['title'] = $title; + $this->container['primary'] = $primary; return $this; } /** - * Gets primary + * Gets title * - * @return bool|null + * @return string|null */ - public function getPrimary(): ?bool + public function getTitle(): ?string { - return $this->container['primary']; + return $this->container['title']; } /** - * Sets primary + * Sets title * - * @param bool|null $primary Set to true if this is the primary EmployerGroup for the Employer. Only one EmployerGroup can be set as the primary. + * @param string|null $title [readonly] The Title for the EmployerGroup * * @return $this */ - public function setPrimary(?bool $primary): static + public function setTitle(?string $title): static { - if (is_null($primary)) { - throw new InvalidArgumentException('non-nullable primary cannot be null'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['primary'] = $primary; + $this->container['title'] = $title; return $this; } diff --git a/src/Model/EmployerItem.php b/src/Model/EmployerItem.php index c8316b0..20dd287 100644 --- a/src/Model/EmployerItem.php +++ b/src/Model/EmployerItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class EmployerItem implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'isOwner' => 'bool', - 'role' => '\SynergiTech\Staffology\Model\UserRole', 'id' => 'string', - 'name' => 'string', + 'isOwner' => 'bool', 'metadata' => 'mixed', + 'name' => 'string', + 'role' => '\SynergiTech\Staffology\Model\UserRole', 'url' => 'string' ]; @@ -73,11 +73,11 @@ class EmployerItem implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'isOwner' => null, - 'role' => null, 'id' => 'uuid', - 'name' => null, + 'isOwner' => null, 'metadata' => null, + 'name' => null, + 'role' => null, 'url' => null ]; @@ -87,11 +87,11 @@ class EmployerItem implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'isOwner' => false, - 'role' => false, 'id' => false, - 'name' => true, + 'isOwner' => false, 'metadata' => true, + 'name' => true, + 'role' => false, 'url' => true ]; @@ -181,11 +181,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'isOwner' => 'isOwner', - 'role' => 'role', 'id' => 'id', - 'name' => 'name', + 'isOwner' => 'isOwner', 'metadata' => 'metadata', + 'name' => 'name', + 'role' => 'role', 'url' => 'url' ]; @@ -195,11 +195,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'isOwner' => 'setIsOwner', - 'role' => 'setRole', 'id' => 'setId', - 'name' => 'setName', + 'isOwner' => 'setIsOwner', 'metadata' => 'setMetadata', + 'name' => 'setName', + 'role' => 'setRole', 'url' => 'setUrl' ]; @@ -209,11 +209,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'isOwner' => 'getIsOwner', - 'role' => 'getRole', 'id' => 'getId', - 'name' => 'getName', + 'isOwner' => 'getIsOwner', 'metadata' => 'getMetadata', + 'name' => 'getName', + 'role' => 'getRole', 'url' => 'getUrl' ]; @@ -273,11 +273,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('isOwner', $data ?? [], null); - $this->setIfExists('role', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('isOwner', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('role', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); } @@ -324,82 +324,89 @@ public function valid(): bool /** - * Gets isOwner + * Gets id * - * @return bool|null + * @return string|null */ - public function getIsOwner(): ?bool + public function getId(): ?string { - return $this->container['isOwner']; + return $this->container['id']; } /** - * Sets isOwner + * Sets id * - * @param bool|null $isOwner isOwner + * @param string|null $id id * * @return $this */ - public function setIsOwner(?bool $isOwner): static + public function setId(?string $id): static { - if (is_null($isOwner)) { - throw new InvalidArgumentException('non-nullable isOwner cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['isOwner'] = $isOwner; + $this->container['id'] = $id; return $this; } /** - * Gets role + * Gets isOwner * - * @return \SynergiTech\Staffology\Model\UserRole|null + * @return bool|null */ - public function getRole(): ?\SynergiTech\Staffology\Model\UserRole + public function getIsOwner(): ?bool { - return $this->container['role']; + return $this->container['isOwner']; } /** - * Sets role + * Sets isOwner * - * @param \SynergiTech\Staffology\Model\UserRole|null $role role + * @param bool|null $isOwner isOwner * * @return $this */ - public function setRole(?\SynergiTech\Staffology\Model\UserRole $role): static + public function setIsOwner(?bool $isOwner): static { - if (is_null($role)) { - throw new InvalidArgumentException('non-nullable role cannot be null'); + if (is_null($isOwner)) { + throw new InvalidArgumentException('non-nullable isOwner cannot be null'); } - $this->container['role'] = $role; + $this->container['isOwner'] = $isOwner; return $this; } /** - * Gets id + * Gets metadata * - * @return string|null + * @return mixed|null */ - public function getId(): ?string + public function getMetadata(): mixed { - return $this->container['id']; + return $this->container['metadata']; } /** - * Sets id + * Sets metadata * - * @param string|null $id id + * @param mixed|null $metadata metadata * * @return $this */ - public function setId(?string $id): static + public function setMetadata(mixed $metadata): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($metadata)) { + array_push($this->openAPINullablesSetToNull, 'metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['metadata'] = $metadata; return $this; } @@ -439,35 +446,28 @@ public function setName(?string $name): static } /** - * Gets metadata + * Gets role * - * @return mixed|null + * @return \SynergiTech\Staffology\Model\UserRole|null */ - public function getMetadata(): mixed + public function getRole(): ?\SynergiTech\Staffology\Model\UserRole { - return $this->container['metadata']; + return $this->container['role']; } /** - * Sets metadata + * Sets role * - * @param mixed|null $metadata metadata + * @param \SynergiTech\Staffology\Model\UserRole|null $role role * * @return $this */ - public function setMetadata(mixed $metadata): static + public function setRole(?\SynergiTech\Staffology\Model\UserRole $role): static { - if (is_null($metadata)) { - array_push($this->openAPINullablesSetToNull, 'metadata'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('metadata', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($role)) { + throw new InvalidArgumentException('non-nullable role cannot be null'); } - $this->container['metadata'] = $metadata; + $this->container['role'] = $role; return $this; } diff --git a/src/Model/EmployerListType.php b/src/Model/EmployerListType.php index 89e2a2f..3d3eb67 100644 --- a/src/Model/EmployerListType.php +++ b/src/Model/EmployerListType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/EmployerOpeningBalances.php b/src/Model/EmployerOpeningBalances.php index a6d230b..aaa61f3 100644 --- a/src/Model/EmployerOpeningBalances.php +++ b/src/Model/EmployerOpeningBalances.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,21 +59,21 @@ class EmployerOpeningBalances implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ - 'smpRecovered' => 'float', - 'sppRecovered' => 'float', - 'sapRecovered' => 'float', - 'shPPRecovered' => 'float', - 'spbpRecovered' => 'float', - 'sncpRecovered' => 'float', + 'apprenticeshipLevy' => 'float', + 'cisDeductionsSuffered' => 'float', + 'employmentAllowance' => 'float', + 'nicCompensationOnSAP' => 'float', 'nicCompensationOnSMP' => 'float', + 'nicCompensationOnSNCP' => 'float', + 'nicCompensationOnSPBP' => 'float', 'nicCompensationOnSPP' => 'float', - 'nicCompensationOnSAP' => 'float', 'nicCompensationOnShPP' => 'float', - 'nicCompensationOnSPBP' => 'float', - 'nicCompensationOnSNCP' => 'float', - 'cisDeductionsSuffered' => 'float', - 'apprenticeshipLevy' => 'float', - 'employmentAllowance' => 'float' + 'sapRecovered' => 'float', + 'shPPRecovered' => 'float', + 'smpRecovered' => 'float', + 'sncpRecovered' => 'float', + 'spbpRecovered' => 'float', + 'sppRecovered' => 'float' ]; /** @@ -82,21 +82,21 @@ class EmployerOpeningBalances implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ - 'smpRecovered' => 'double', - 'sppRecovered' => 'double', - 'sapRecovered' => 'double', - 'shPPRecovered' => 'double', - 'spbpRecovered' => 'double', - 'sncpRecovered' => 'double', + 'apprenticeshipLevy' => 'double', + 'cisDeductionsSuffered' => 'double', + 'employmentAllowance' => 'double', + 'nicCompensationOnSAP' => 'double', 'nicCompensationOnSMP' => 'double', + 'nicCompensationOnSNCP' => 'double', + 'nicCompensationOnSPBP' => 'double', 'nicCompensationOnSPP' => 'double', - 'nicCompensationOnSAP' => 'double', 'nicCompensationOnShPP' => 'double', - 'nicCompensationOnSPBP' => 'double', - 'nicCompensationOnSNCP' => 'double', - 'cisDeductionsSuffered' => 'double', - 'apprenticeshipLevy' => 'double', - 'employmentAllowance' => 'double' + 'sapRecovered' => 'double', + 'shPPRecovered' => 'double', + 'smpRecovered' => 'double', + 'sncpRecovered' => 'double', + 'spbpRecovered' => 'double', + 'sppRecovered' => 'double' ]; /** @@ -105,21 +105,21 @@ class EmployerOpeningBalances implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ - 'smpRecovered' => false, - 'sppRecovered' => false, - 'sapRecovered' => false, - 'shPPRecovered' => false, - 'spbpRecovered' => false, - 'sncpRecovered' => false, + 'apprenticeshipLevy' => false, + 'cisDeductionsSuffered' => false, + 'employmentAllowance' => false, + 'nicCompensationOnSAP' => false, 'nicCompensationOnSMP' => false, + 'nicCompensationOnSNCP' => false, + 'nicCompensationOnSPBP' => false, 'nicCompensationOnSPP' => false, - 'nicCompensationOnSAP' => false, 'nicCompensationOnShPP' => false, - 'nicCompensationOnSPBP' => false, - 'nicCompensationOnSNCP' => false, - 'cisDeductionsSuffered' => false, - 'apprenticeshipLevy' => false, - 'employmentAllowance' => false + 'sapRecovered' => false, + 'shPPRecovered' => false, + 'smpRecovered' => false, + 'sncpRecovered' => false, + 'spbpRecovered' => false, + 'sppRecovered' => false ]; /** @@ -208,21 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'smpRecovered' => 'smpRecovered', - 'sppRecovered' => 'sppRecovered', - 'sapRecovered' => 'sapRecovered', - 'shPPRecovered' => 'shPPRecovered', - 'spbpRecovered' => 'spbpRecovered', - 'sncpRecovered' => 'sncpRecovered', + 'apprenticeshipLevy' => 'apprenticeshipLevy', + 'cisDeductionsSuffered' => 'cisDeductionsSuffered', + 'employmentAllowance' => 'employmentAllowance', + 'nicCompensationOnSAP' => 'nicCompensationOnSAP', 'nicCompensationOnSMP' => 'nicCompensationOnSMP', + 'nicCompensationOnSNCP' => 'nicCompensationOnSNCP', + 'nicCompensationOnSPBP' => 'nicCompensationOnSPBP', 'nicCompensationOnSPP' => 'nicCompensationOnSPP', - 'nicCompensationOnSAP' => 'nicCompensationOnSAP', 'nicCompensationOnShPP' => 'nicCompensationOnShPP', - 'nicCompensationOnSPBP' => 'nicCompensationOnSPBP', - 'nicCompensationOnSNCP' => 'nicCompensationOnSNCP', - 'cisDeductionsSuffered' => 'cisDeductionsSuffered', - 'apprenticeshipLevy' => 'apprenticeshipLevy', - 'employmentAllowance' => 'employmentAllowance' + 'sapRecovered' => 'sapRecovered', + 'shPPRecovered' => 'shPPRecovered', + 'smpRecovered' => 'smpRecovered', + 'sncpRecovered' => 'sncpRecovered', + 'spbpRecovered' => 'spbpRecovered', + 'sppRecovered' => 'sppRecovered' ]; /** @@ -231,21 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'smpRecovered' => 'setSmpRecovered', - 'sppRecovered' => 'setSppRecovered', - 'sapRecovered' => 'setSapRecovered', - 'shPPRecovered' => 'setShPPRecovered', - 'spbpRecovered' => 'setSpbpRecovered', - 'sncpRecovered' => 'setSncpRecovered', + 'apprenticeshipLevy' => 'setApprenticeshipLevy', + 'cisDeductionsSuffered' => 'setCisDeductionsSuffered', + 'employmentAllowance' => 'setEmploymentAllowance', + 'nicCompensationOnSAP' => 'setNicCompensationOnSAP', 'nicCompensationOnSMP' => 'setNicCompensationOnSMP', + 'nicCompensationOnSNCP' => 'setNicCompensationOnSNCP', + 'nicCompensationOnSPBP' => 'setNicCompensationOnSPBP', 'nicCompensationOnSPP' => 'setNicCompensationOnSPP', - 'nicCompensationOnSAP' => 'setNicCompensationOnSAP', 'nicCompensationOnShPP' => 'setNicCompensationOnShPP', - 'nicCompensationOnSPBP' => 'setNicCompensationOnSPBP', - 'nicCompensationOnSNCP' => 'setNicCompensationOnSNCP', - 'cisDeductionsSuffered' => 'setCisDeductionsSuffered', - 'apprenticeshipLevy' => 'setApprenticeshipLevy', - 'employmentAllowance' => 'setEmploymentAllowance' + 'sapRecovered' => 'setSapRecovered', + 'shPPRecovered' => 'setShPPRecovered', + 'smpRecovered' => 'setSmpRecovered', + 'sncpRecovered' => 'setSncpRecovered', + 'spbpRecovered' => 'setSpbpRecovered', + 'sppRecovered' => 'setSppRecovered' ]; /** @@ -254,21 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'smpRecovered' => 'getSmpRecovered', - 'sppRecovered' => 'getSppRecovered', - 'sapRecovered' => 'getSapRecovered', - 'shPPRecovered' => 'getShPPRecovered', - 'spbpRecovered' => 'getSpbpRecovered', - 'sncpRecovered' => 'getSncpRecovered', + 'apprenticeshipLevy' => 'getApprenticeshipLevy', + 'cisDeductionsSuffered' => 'getCisDeductionsSuffered', + 'employmentAllowance' => 'getEmploymentAllowance', + 'nicCompensationOnSAP' => 'getNicCompensationOnSAP', 'nicCompensationOnSMP' => 'getNicCompensationOnSMP', + 'nicCompensationOnSNCP' => 'getNicCompensationOnSNCP', + 'nicCompensationOnSPBP' => 'getNicCompensationOnSPBP', 'nicCompensationOnSPP' => 'getNicCompensationOnSPP', - 'nicCompensationOnSAP' => 'getNicCompensationOnSAP', 'nicCompensationOnShPP' => 'getNicCompensationOnShPP', - 'nicCompensationOnSPBP' => 'getNicCompensationOnSPBP', - 'nicCompensationOnSNCP' => 'getNicCompensationOnSNCP', - 'cisDeductionsSuffered' => 'getCisDeductionsSuffered', - 'apprenticeshipLevy' => 'getApprenticeshipLevy', - 'employmentAllowance' => 'getEmploymentAllowance' + 'sapRecovered' => 'getSapRecovered', + 'shPPRecovered' => 'getShPPRecovered', + 'smpRecovered' => 'getSmpRecovered', + 'sncpRecovered' => 'getSncpRecovered', + 'spbpRecovered' => 'getSpbpRecovered', + 'sppRecovered' => 'getSppRecovered' ]; /** @@ -327,21 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('smpRecovered', $data ?? [], null); - $this->setIfExists('sppRecovered', $data ?? [], null); - $this->setIfExists('sapRecovered', $data ?? [], null); - $this->setIfExists('shPPRecovered', $data ?? [], null); - $this->setIfExists('spbpRecovered', $data ?? [], null); - $this->setIfExists('sncpRecovered', $data ?? [], null); + $this->setIfExists('apprenticeshipLevy', $data ?? [], null); + $this->setIfExists('cisDeductionsSuffered', $data ?? [], null); + $this->setIfExists('employmentAllowance', $data ?? [], null); + $this->setIfExists('nicCompensationOnSAP', $data ?? [], null); $this->setIfExists('nicCompensationOnSMP', $data ?? [], null); + $this->setIfExists('nicCompensationOnSNCP', $data ?? [], null); + $this->setIfExists('nicCompensationOnSPBP', $data ?? [], null); $this->setIfExists('nicCompensationOnSPP', $data ?? [], null); - $this->setIfExists('nicCompensationOnSAP', $data ?? [], null); $this->setIfExists('nicCompensationOnShPP', $data ?? [], null); - $this->setIfExists('nicCompensationOnSPBP', $data ?? [], null); - $this->setIfExists('nicCompensationOnSNCP', $data ?? [], null); - $this->setIfExists('cisDeductionsSuffered', $data ?? [], null); - $this->setIfExists('apprenticeshipLevy', $data ?? [], null); - $this->setIfExists('employmentAllowance', $data ?? [], null); + $this->setIfExists('sapRecovered', $data ?? [], null); + $this->setIfExists('shPPRecovered', $data ?? [], null); + $this->setIfExists('smpRecovered', $data ?? [], null); + $this->setIfExists('sncpRecovered', $data ?? [], null); + $this->setIfExists('spbpRecovered', $data ?? [], null); + $this->setIfExists('sppRecovered', $data ?? [], null); } /** @@ -387,190 +387,190 @@ public function valid(): bool /** - * Gets smpRecovered + * Gets apprenticeshipLevy * * @return float|null */ - public function getSmpRecovered(): ?float + public function getApprenticeshipLevy(): ?float { - return $this->container['smpRecovered']; + return $this->container['apprenticeshipLevy']; } /** - * Sets smpRecovered + * Sets apprenticeshipLevy * - * @param float|null $smpRecovered Value of Statutory Maternity Pay recovered year to date + * @param float|null $apprenticeshipLevy Value of Apprenticeship levy paid year to date * * @return $this */ - public function setSmpRecovered(?float $smpRecovered): static + public function setApprenticeshipLevy(?float $apprenticeshipLevy): static { - if (is_null($smpRecovered)) { - throw new InvalidArgumentException('non-nullable smpRecovered cannot be null'); + if (is_null($apprenticeshipLevy)) { + throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); } - $this->container['smpRecovered'] = $smpRecovered; + $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; return $this; } /** - * Gets sppRecovered + * Gets cisDeductionsSuffered * * @return float|null */ - public function getSppRecovered(): ?float + public function getCisDeductionsSuffered(): ?float { - return $this->container['sppRecovered']; + return $this->container['cisDeductionsSuffered']; } /** - * Sets sppRecovered + * Sets cisDeductionsSuffered * - * @param float|null $sppRecovered Value of Statutory Paternity Pay recovered year to date + * @param float|null $cisDeductionsSuffered Value of CIS deductions suffered year to date * * @return $this */ - public function setSppRecovered(?float $sppRecovered): static + public function setCisDeductionsSuffered(?float $cisDeductionsSuffered): static { - if (is_null($sppRecovered)) { - throw new InvalidArgumentException('non-nullable sppRecovered cannot be null'); + if (is_null($cisDeductionsSuffered)) { + throw new InvalidArgumentException('non-nullable cisDeductionsSuffered cannot be null'); } - $this->container['sppRecovered'] = $sppRecovered; + $this->container['cisDeductionsSuffered'] = $cisDeductionsSuffered; return $this; } /** - * Gets sapRecovered + * Gets employmentAllowance * * @return float|null */ - public function getSapRecovered(): ?float + public function getEmploymentAllowance(): ?float { - return $this->container['sapRecovered']; + return $this->container['employmentAllowance']; } /** - * Sets sapRecovered + * Sets employmentAllowance * - * @param float|null $sapRecovered Value of Statutory Adoption Pay recovered year to date + * @param float|null $employmentAllowance Value of Employment Allowance claimed year to date * * @return $this */ - public function setSapRecovered(?float $sapRecovered): static + public function setEmploymentAllowance(?float $employmentAllowance): static { - if (is_null($sapRecovered)) { - throw new InvalidArgumentException('non-nullable sapRecovered cannot be null'); + if (is_null($employmentAllowance)) { + throw new InvalidArgumentException('non-nullable employmentAllowance cannot be null'); } - $this->container['sapRecovered'] = $sapRecovered; + $this->container['employmentAllowance'] = $employmentAllowance; return $this; } /** - * Gets shPPRecovered + * Gets nicCompensationOnSAP * * @return float|null */ - public function getShPPRecovered(): ?float + public function getNicCompensationOnSAP(): ?float { - return $this->container['shPPRecovered']; + return $this->container['nicCompensationOnSAP']; } /** - * Sets shPPRecovered + * Sets nicCompensationOnSAP * - * @param float|null $shPPRecovered Value of Shared Parental Pay recovered year to date + * @param float|null $nicCompensationOnSAP Value of NIC compensation on Statutory Adoption Pay year to date * * @return $this */ - public function setShPPRecovered(?float $shPPRecovered): static + public function setNicCompensationOnSAP(?float $nicCompensationOnSAP): static { - if (is_null($shPPRecovered)) { - throw new InvalidArgumentException('non-nullable shPPRecovered cannot be null'); + if (is_null($nicCompensationOnSAP)) { + throw new InvalidArgumentException('non-nullable nicCompensationOnSAP cannot be null'); } - $this->container['shPPRecovered'] = $shPPRecovered; + $this->container['nicCompensationOnSAP'] = $nicCompensationOnSAP; return $this; } /** - * Gets spbpRecovered + * Gets nicCompensationOnSMP * * @return float|null */ - public function getSpbpRecovered(): ?float + public function getNicCompensationOnSMP(): ?float { - return $this->container['spbpRecovered']; + return $this->container['nicCompensationOnSMP']; } /** - * Sets spbpRecovered + * Sets nicCompensationOnSMP * - * @param float|null $spbpRecovered Value of Statutory Parental Bereavment Pay recovered year to date + * @param float|null $nicCompensationOnSMP Value of NIC compensation on SMP year to date * * @return $this */ - public function setSpbpRecovered(?float $spbpRecovered): static + public function setNicCompensationOnSMP(?float $nicCompensationOnSMP): static { - if (is_null($spbpRecovered)) { - throw new InvalidArgumentException('non-nullable spbpRecovered cannot be null'); + if (is_null($nicCompensationOnSMP)) { + throw new InvalidArgumentException('non-nullable nicCompensationOnSMP cannot be null'); } - $this->container['spbpRecovered'] = $spbpRecovered; + $this->container['nicCompensationOnSMP'] = $nicCompensationOnSMP; return $this; } /** - * Gets sncpRecovered + * Gets nicCompensationOnSNCP * * @return float|null */ - public function getSncpRecovered(): ?float + public function getNicCompensationOnSNCP(): ?float { - return $this->container['sncpRecovered']; + return $this->container['nicCompensationOnSNCP']; } /** - * Sets sncpRecovered + * Sets nicCompensationOnSNCP * - * @param float|null $sncpRecovered Value of Statutory Neonatal Care Pay recovered year to date + * @param float|null $nicCompensationOnSNCP Value of NIC compensation on Statutory Neonatal Care Pay year to date * * @return $this */ - public function setSncpRecovered(?float $sncpRecovered): static + public function setNicCompensationOnSNCP(?float $nicCompensationOnSNCP): static { - if (is_null($sncpRecovered)) { - throw new InvalidArgumentException('non-nullable sncpRecovered cannot be null'); + if (is_null($nicCompensationOnSNCP)) { + throw new InvalidArgumentException('non-nullable nicCompensationOnSNCP cannot be null'); } - $this->container['sncpRecovered'] = $sncpRecovered; + $this->container['nicCompensationOnSNCP'] = $nicCompensationOnSNCP; return $this; } /** - * Gets nicCompensationOnSMP + * Gets nicCompensationOnSPBP * * @return float|null */ - public function getNicCompensationOnSMP(): ?float + public function getNicCompensationOnSPBP(): ?float { - return $this->container['nicCompensationOnSMP']; + return $this->container['nicCompensationOnSPBP']; } /** - * Sets nicCompensationOnSMP + * Sets nicCompensationOnSPBP * - * @param float|null $nicCompensationOnSMP Value of NIC compensation on SMP year to date + * @param float|null $nicCompensationOnSPBP Value of NIC compensation on Statutory Parental Bereavement Pay year to date * * @return $this */ - public function setNicCompensationOnSMP(?float $nicCompensationOnSMP): static + public function setNicCompensationOnSPBP(?float $nicCompensationOnSPBP): static { - if (is_null($nicCompensationOnSMP)) { - throw new InvalidArgumentException('non-nullable nicCompensationOnSMP cannot be null'); + if (is_null($nicCompensationOnSPBP)) { + throw new InvalidArgumentException('non-nullable nicCompensationOnSPBP cannot be null'); } - $this->container['nicCompensationOnSMP'] = $nicCompensationOnSMP; + $this->container['nicCompensationOnSPBP'] = $nicCompensationOnSPBP; return $this; } @@ -603,190 +603,190 @@ public function setNicCompensationOnSPP(?float $nicCompensationOnSPP): static } /** - * Gets nicCompensationOnSAP + * Gets nicCompensationOnShPP * * @return float|null */ - public function getNicCompensationOnSAP(): ?float + public function getNicCompensationOnShPP(): ?float { - return $this->container['nicCompensationOnSAP']; + return $this->container['nicCompensationOnShPP']; } /** - * Sets nicCompensationOnSAP + * Sets nicCompensationOnShPP * - * @param float|null $nicCompensationOnSAP Value of NIC compensation on Statutory Adoption Pay year to date + * @param float|null $nicCompensationOnShPP Value of NIC compensation on Shared Parental Pay year to date * * @return $this */ - public function setNicCompensationOnSAP(?float $nicCompensationOnSAP): static + public function setNicCompensationOnShPP(?float $nicCompensationOnShPP): static { - if (is_null($nicCompensationOnSAP)) { - throw new InvalidArgumentException('non-nullable nicCompensationOnSAP cannot be null'); + if (is_null($nicCompensationOnShPP)) { + throw new InvalidArgumentException('non-nullable nicCompensationOnShPP cannot be null'); } - $this->container['nicCompensationOnSAP'] = $nicCompensationOnSAP; + $this->container['nicCompensationOnShPP'] = $nicCompensationOnShPP; return $this; } /** - * Gets nicCompensationOnShPP + * Gets sapRecovered * * @return float|null */ - public function getNicCompensationOnShPP(): ?float + public function getSapRecovered(): ?float { - return $this->container['nicCompensationOnShPP']; + return $this->container['sapRecovered']; } /** - * Sets nicCompensationOnShPP + * Sets sapRecovered * - * @param float|null $nicCompensationOnShPP Value of NIC compensation on Shared Parental Pay year to date + * @param float|null $sapRecovered Value of Statutory Adoption Pay recovered year to date * * @return $this */ - public function setNicCompensationOnShPP(?float $nicCompensationOnShPP): static + public function setSapRecovered(?float $sapRecovered): static { - if (is_null($nicCompensationOnShPP)) { - throw new InvalidArgumentException('non-nullable nicCompensationOnShPP cannot be null'); + if (is_null($sapRecovered)) { + throw new InvalidArgumentException('non-nullable sapRecovered cannot be null'); } - $this->container['nicCompensationOnShPP'] = $nicCompensationOnShPP; + $this->container['sapRecovered'] = $sapRecovered; return $this; } /** - * Gets nicCompensationOnSPBP + * Gets shPPRecovered * * @return float|null */ - public function getNicCompensationOnSPBP(): ?float + public function getShPPRecovered(): ?float { - return $this->container['nicCompensationOnSPBP']; + return $this->container['shPPRecovered']; } /** - * Sets nicCompensationOnSPBP + * Sets shPPRecovered * - * @param float|null $nicCompensationOnSPBP Value of NIC compensation on Statutory Parental Bereavement Pay year to date + * @param float|null $shPPRecovered Value of Shared Parental Pay recovered year to date * * @return $this */ - public function setNicCompensationOnSPBP(?float $nicCompensationOnSPBP): static + public function setShPPRecovered(?float $shPPRecovered): static { - if (is_null($nicCompensationOnSPBP)) { - throw new InvalidArgumentException('non-nullable nicCompensationOnSPBP cannot be null'); + if (is_null($shPPRecovered)) { + throw new InvalidArgumentException('non-nullable shPPRecovered cannot be null'); } - $this->container['nicCompensationOnSPBP'] = $nicCompensationOnSPBP; + $this->container['shPPRecovered'] = $shPPRecovered; return $this; } /** - * Gets nicCompensationOnSNCP + * Gets smpRecovered * * @return float|null */ - public function getNicCompensationOnSNCP(): ?float + public function getSmpRecovered(): ?float { - return $this->container['nicCompensationOnSNCP']; + return $this->container['smpRecovered']; } /** - * Sets nicCompensationOnSNCP + * Sets smpRecovered * - * @param float|null $nicCompensationOnSNCP Value of NIC compensation on Statutory Neonatal Care Pay year to date + * @param float|null $smpRecovered Value of Statutory Maternity Pay recovered year to date * * @return $this */ - public function setNicCompensationOnSNCP(?float $nicCompensationOnSNCP): static + public function setSmpRecovered(?float $smpRecovered): static { - if (is_null($nicCompensationOnSNCP)) { - throw new InvalidArgumentException('non-nullable nicCompensationOnSNCP cannot be null'); + if (is_null($smpRecovered)) { + throw new InvalidArgumentException('non-nullable smpRecovered cannot be null'); } - $this->container['nicCompensationOnSNCP'] = $nicCompensationOnSNCP; + $this->container['smpRecovered'] = $smpRecovered; return $this; } /** - * Gets cisDeductionsSuffered + * Gets sncpRecovered * * @return float|null */ - public function getCisDeductionsSuffered(): ?float + public function getSncpRecovered(): ?float { - return $this->container['cisDeductionsSuffered']; + return $this->container['sncpRecovered']; } /** - * Sets cisDeductionsSuffered + * Sets sncpRecovered * - * @param float|null $cisDeductionsSuffered Value of CIS deductions suffered year to date + * @param float|null $sncpRecovered Value of Statutory Neonatal Care Pay recovered year to date * * @return $this */ - public function setCisDeductionsSuffered(?float $cisDeductionsSuffered): static + public function setSncpRecovered(?float $sncpRecovered): static { - if (is_null($cisDeductionsSuffered)) { - throw new InvalidArgumentException('non-nullable cisDeductionsSuffered cannot be null'); + if (is_null($sncpRecovered)) { + throw new InvalidArgumentException('non-nullable sncpRecovered cannot be null'); } - $this->container['cisDeductionsSuffered'] = $cisDeductionsSuffered; + $this->container['sncpRecovered'] = $sncpRecovered; return $this; } /** - * Gets apprenticeshipLevy + * Gets spbpRecovered * * @return float|null */ - public function getApprenticeshipLevy(): ?float + public function getSpbpRecovered(): ?float { - return $this->container['apprenticeshipLevy']; + return $this->container['spbpRecovered']; } /** - * Sets apprenticeshipLevy + * Sets spbpRecovered * - * @param float|null $apprenticeshipLevy Value of Apprenticeship levy paid year to date + * @param float|null $spbpRecovered Value of Statutory Parental Bereavment Pay recovered year to date * * @return $this */ - public function setApprenticeshipLevy(?float $apprenticeshipLevy): static + public function setSpbpRecovered(?float $spbpRecovered): static { - if (is_null($apprenticeshipLevy)) { - throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); + if (is_null($spbpRecovered)) { + throw new InvalidArgumentException('non-nullable spbpRecovered cannot be null'); } - $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; + $this->container['spbpRecovered'] = $spbpRecovered; return $this; } /** - * Gets employmentAllowance + * Gets sppRecovered * * @return float|null */ - public function getEmploymentAllowance(): ?float + public function getSppRecovered(): ?float { - return $this->container['employmentAllowance']; + return $this->container['sppRecovered']; } /** - * Sets employmentAllowance + * Sets sppRecovered * - * @param float|null $employmentAllowance Value of Employment Allowance claimed year to date + * @param float|null $sppRecovered Value of Statutory Paternity Pay recovered year to date * * @return $this */ - public function setEmploymentAllowance(?float $employmentAllowance): static + public function setSppRecovered(?float $sppRecovered): static { - if (is_null($employmentAllowance)) { - throw new InvalidArgumentException('non-nullable employmentAllowance cannot be null'); + if (is_null($sppRecovered)) { + throw new InvalidArgumentException('non-nullable sppRecovered cannot be null'); } - $this->container['employmentAllowance'] = $employmentAllowance; + $this->container['sppRecovered'] = $sppRecovered; return $this; } diff --git a/src/Model/EmployerPensionContribution.php b/src/Model/EmployerPensionContribution.php index cfaa43a..f3cf62f 100644 --- a/src/Model/EmployerPensionContribution.php +++ b/src/Model/EmployerPensionContribution.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class EmployerPensionContribution implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPITypes = [ - 'pensionName' => 'string', 'contributionAmount' => 'float', 'contributionPercentage' => 'float', - 'isPercentage' => 'bool' + 'isPercentage' => 'bool', + 'pensionName' => 'string' ]; /** @@ -71,10 +71,10 @@ class EmployerPensionContribution implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPIFormats = [ - 'pensionName' => null, 'contributionAmount' => 'double', 'contributionPercentage' => 'double', - 'isPercentage' => null + 'isPercentage' => null, + 'pensionName' => null ]; /** @@ -83,10 +83,10 @@ class EmployerPensionContribution implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPINullables = [ - 'pensionName' => true, 'contributionAmount' => false, 'contributionPercentage' => false, - 'isPercentage' => false + 'isPercentage' => false, + 'pensionName' => true ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'pensionName' => 'pensionName', 'contributionAmount' => 'contributionAmount', 'contributionPercentage' => 'contributionPercentage', - 'isPercentage' => 'isPercentage' + 'isPercentage' => 'isPercentage', + 'pensionName' => 'pensionName' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'pensionName' => 'setPensionName', 'contributionAmount' => 'setContributionAmount', 'contributionPercentage' => 'setContributionPercentage', - 'isPercentage' => 'setIsPercentage' + 'isPercentage' => 'setIsPercentage', + 'pensionName' => 'setPensionName' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'pensionName' => 'getPensionName', 'contributionAmount' => 'getContributionAmount', 'contributionPercentage' => 'getContributionPercentage', - 'isPercentage' => 'getIsPercentage' + 'isPercentage' => 'getIsPercentage', + 'pensionName' => 'getPensionName' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('pensionName', $data ?? [], null); $this->setIfExists('contributionAmount', $data ?? [], null); $this->setIfExists('contributionPercentage', $data ?? [], null); $this->setIfExists('isPercentage', $data ?? [], null); + $this->setIfExists('pensionName', $data ?? [], null); } /** @@ -309,40 +309,6 @@ public function valid(): bool } - /** - * Gets pensionName - * - * @return string|null - */ - public function getPensionName(): ?string - { - return $this->container['pensionName']; - } - - /** - * Sets pensionName - * - * @param string|null $pensionName pensionName - * - * @return $this - */ - public function setPensionName(?string $pensionName): static - { - if (is_null($pensionName)) { - array_push($this->openAPINullablesSetToNull, 'pensionName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['pensionName'] = $pensionName; - - return $this; - } - /** * Gets contributionAmount * @@ -423,6 +389,40 @@ public function setIsPercentage(?bool $isPercentage): static return $this; } + + /** + * Gets pensionName + * + * @return string|null + */ + public function getPensionName(): ?string + { + return $this->container['pensionName']; + } + + /** + * Sets pensionName + * + * @param string|null $pensionName pensionName + * + * @return $this + */ + public function setPensionName(?string $pensionName): static + { + if (is_null($pensionName)) { + array_push($this->openAPINullablesSetToNull, 'pensionName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pensionName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pensionName'] = $pensionName; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/EmployerSortBy.php b/src/Model/EmployerSortBy.php index 34df1d5..b613d99 100644 --- a/src/Model/EmployerSortBy.php +++ b/src/Model/EmployerSortBy.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/EmployerTemplate.php b/src/Model/EmployerTemplate.php index 8610e91..31f67da 100644 --- a/src/Model/EmployerTemplate.php +++ b/src/Model/EmployerTemplate.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,17 +59,17 @@ class EmployerTemplate implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => '\SynergiTech\Staffology\Model\EmployerTemplateType', - 'description' => 'string', - 'isCustom' => 'bool', 'content' => 'string', - 'subject' => 'string', 'defaultContent' => 'string', 'defaultSubject' => 'string', + 'description' => 'string', 'hasSubject' => 'bool', + 'id' => 'string', + 'isCustom' => 'bool', + 'subject' => 'string', 'tokens' => 'string[]', 'tokensExpanded' => 'bool', - 'id' => 'string' + 'type' => '\SynergiTech\Staffology\Model\EmployerTemplateType' ]; /** @@ -78,17 +78,17 @@ class EmployerTemplate implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'type' => null, - 'description' => null, - 'isCustom' => null, 'content' => null, - 'subject' => null, 'defaultContent' => null, 'defaultSubject' => null, + 'description' => null, 'hasSubject' => null, + 'id' => 'uuid', + 'isCustom' => null, + 'subject' => null, 'tokens' => null, 'tokensExpanded' => null, - 'id' => 'uuid' + 'type' => null ]; /** @@ -97,17 +97,17 @@ class EmployerTemplate implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'type' => false, - 'description' => true, - 'isCustom' => false, 'content' => true, - 'subject' => true, 'defaultContent' => true, 'defaultSubject' => true, + 'description' => true, 'hasSubject' => false, + 'id' => false, + 'isCustom' => false, + 'subject' => true, 'tokens' => true, 'tokensExpanded' => false, - 'id' => false + 'type' => false ]; /** @@ -196,17 +196,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', - 'description' => 'description', - 'isCustom' => 'isCustom', 'content' => 'content', - 'subject' => 'subject', 'defaultContent' => 'defaultContent', 'defaultSubject' => 'defaultSubject', + 'description' => 'description', 'hasSubject' => 'hasSubject', + 'id' => 'id', + 'isCustom' => 'isCustom', + 'subject' => 'subject', 'tokens' => 'tokens', 'tokensExpanded' => 'tokensExpanded', - 'id' => 'id' + 'type' => 'type' ]; /** @@ -215,17 +215,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', - 'description' => 'setDescription', - 'isCustom' => 'setIsCustom', 'content' => 'setContent', - 'subject' => 'setSubject', 'defaultContent' => 'setDefaultContent', 'defaultSubject' => 'setDefaultSubject', + 'description' => 'setDescription', 'hasSubject' => 'setHasSubject', + 'id' => 'setId', + 'isCustom' => 'setIsCustom', + 'subject' => 'setSubject', 'tokens' => 'setTokens', 'tokensExpanded' => 'setTokensExpanded', - 'id' => 'setId' + 'type' => 'setType' ]; /** @@ -234,17 +234,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', - 'description' => 'getDescription', - 'isCustom' => 'getIsCustom', 'content' => 'getContent', - 'subject' => 'getSubject', 'defaultContent' => 'getDefaultContent', 'defaultSubject' => 'getDefaultSubject', + 'description' => 'getDescription', 'hasSubject' => 'getHasSubject', + 'id' => 'getId', + 'isCustom' => 'getIsCustom', + 'subject' => 'getSubject', 'tokens' => 'getTokens', 'tokensExpanded' => 'getTokensExpanded', - 'id' => 'getId' + 'type' => 'getType' ]; /** @@ -303,17 +303,17 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('isCustom', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); - $this->setIfExists('subject', $data ?? [], null); $this->setIfExists('defaultContent', $data ?? [], null); $this->setIfExists('defaultSubject', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); $this->setIfExists('hasSubject', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isCustom', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); $this->setIfExists('tokens', $data ?? [], null); $this->setIfExists('tokensExpanded', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -363,256 +363,256 @@ public function valid(): bool /** - * Gets type + * Gets content * - * @return \SynergiTech\Staffology\Model\EmployerTemplateType|null + * @return string|null */ - public function getType(): ?\SynergiTech\Staffology\Model\EmployerTemplateType + public function getContent(): ?string { - return $this->container['type']; + return $this->container['content']; } /** - * Sets type + * Sets content * - * @param \SynergiTech\Staffology\Model\EmployerTemplateType|null $type type + * @param string|null $content content * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\EmployerTemplateType $type): static + public function setContent(?string $content): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($content)) { + array_push($this->openAPINullablesSetToNull, 'content'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('content', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['type'] = $type; + $this->container['content'] = $content; return $this; } /** - * Gets description + * Gets defaultContent * * @return string|null */ - public function getDescription(): ?string + public function getDefaultContent(): ?string { - return $this->container['description']; + return $this->container['defaultContent']; } /** - * Sets description + * Sets defaultContent * - * @param string|null $description Explains the purpose of this template + * @param string|null $defaultContent [readonly] The default content for this template * * @return $this */ - public function setDescription(?string $description): static + public function setDefaultContent(?string $defaultContent): static { - if (is_null($description)) { - array_push($this->openAPINullablesSetToNull, 'description'); + if (is_null($defaultContent)) { + array_push($this->openAPINullablesSetToNull, 'defaultContent'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('description', $nullablesSetToNull); + $index = array_search('defaultContent', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['description'] = $description; + $this->container['defaultContent'] = $defaultContent; return $this; } /** - * Gets isCustom + * Gets defaultSubject * - * @return bool|null + * @return string|null */ - public function getIsCustom(): ?bool + public function getDefaultSubject(): ?string { - return $this->container['isCustom']; + return $this->container['defaultSubject']; } /** - * Sets isCustom + * Sets defaultSubject * - * @param bool|null $isCustom Indicates whether or not this template has been changed from the default content. + * @param string|null $defaultSubject [readonly] The default subject for this template * * @return $this */ - public function setIsCustom(?bool $isCustom): static + public function setDefaultSubject(?string $defaultSubject): static { - if (is_null($isCustom)) { - throw new InvalidArgumentException('non-nullable isCustom cannot be null'); + if (is_null($defaultSubject)) { + array_push($this->openAPINullablesSetToNull, 'defaultSubject'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultSubject', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isCustom'] = $isCustom; + $this->container['defaultSubject'] = $defaultSubject; return $this; } /** - * Gets content + * Gets description * * @return string|null */ - public function getContent(): ?string + public function getDescription(): ?string { - return $this->container['content']; + return $this->container['description']; } /** - * Sets content + * Sets description * - * @param string|null $content content + * @param string|null $description Explains the purpose of this template * * @return $this */ - public function setContent(?string $content): static + public function setDescription(?string $description): static { - if (is_null($content)) { - array_push($this->openAPINullablesSetToNull, 'content'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('content', $nullablesSetToNull); + $index = array_search('description', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['content'] = $content; + $this->container['description'] = $description; return $this; } /** - * Gets subject + * Gets hasSubject * - * @return string|null + * @return bool|null */ - public function getSubject(): ?string + public function getHasSubject(): ?bool { - return $this->container['subject']; + return $this->container['hasSubject']; } /** - * Sets subject + * Sets hasSubject * - * @param string|null $subject subject + * @param bool|null $hasSubject [readonly] If false then the Subject property is not relevant for this template type * * @return $this */ - public function setSubject(?string $subject): static + public function setHasSubject(?bool $hasSubject): static { - if (is_null($subject)) { - array_push($this->openAPINullablesSetToNull, 'subject'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('subject', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($subject) && (mb_strlen($subject) > 250)) { - throw new InvalidArgumentException('invalid length for $subject when calling EmployerTemplate., must be smaller than or equal to 250.'); + if (is_null($hasSubject)) { + throw new InvalidArgumentException('non-nullable hasSubject cannot be null'); } - - $this->container['subject'] = $subject; + $this->container['hasSubject'] = $hasSubject; return $this; } /** - * Gets defaultContent + * Gets id * * @return string|null */ - public function getDefaultContent(): ?string + public function getId(): ?string { - return $this->container['defaultContent']; + return $this->container['id']; } /** - * Sets defaultContent + * Sets id * - * @param string|null $defaultContent [readonly] The default content for this template + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setDefaultContent(?string $defaultContent): static + public function setId(?string $id): static { - if (is_null($defaultContent)) { - array_push($this->openAPINullablesSetToNull, 'defaultContent'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('defaultContent', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['defaultContent'] = $defaultContent; + $this->container['id'] = $id; return $this; } /** - * Gets defaultSubject + * Gets isCustom * - * @return string|null + * @return bool|null */ - public function getDefaultSubject(): ?string + public function getIsCustom(): ?bool { - return $this->container['defaultSubject']; + return $this->container['isCustom']; } /** - * Sets defaultSubject + * Sets isCustom * - * @param string|null $defaultSubject [readonly] The default subject for this template + * @param bool|null $isCustom Indicates whether or not this template has been changed from the default content. * * @return $this */ - public function setDefaultSubject(?string $defaultSubject): static + public function setIsCustom(?bool $isCustom): static { - if (is_null($defaultSubject)) { - array_push($this->openAPINullablesSetToNull, 'defaultSubject'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('defaultSubject', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isCustom)) { + throw new InvalidArgumentException('non-nullable isCustom cannot be null'); } - $this->container['defaultSubject'] = $defaultSubject; + $this->container['isCustom'] = $isCustom; return $this; } /** - * Gets hasSubject + * Gets subject * - * @return bool|null + * @return string|null */ - public function getHasSubject(): ?bool + public function getSubject(): ?string { - return $this->container['hasSubject']; + return $this->container['subject']; } /** - * Sets hasSubject + * Sets subject * - * @param bool|null $hasSubject [readonly] If false then the Subject property is not relevant for this template type + * @param string|null $subject subject * * @return $this */ - public function setHasSubject(?bool $hasSubject): static + public function setSubject(?string $subject): static { - if (is_null($hasSubject)) { - throw new InvalidArgumentException('non-nullable hasSubject cannot be null'); + if (is_null($subject)) { + array_push($this->openAPINullablesSetToNull, 'subject'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('subject', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['hasSubject'] = $hasSubject; + if (!is_null($subject) && (mb_strlen($subject) > 250)) { + throw new InvalidArgumentException('invalid length for $subject when calling EmployerTemplate., must be smaller than or equal to 250.'); + } + + $this->container['subject'] = $subject; return $this; } @@ -679,28 +679,28 @@ public function setTokensExpanded(?bool $tokensExpanded): static } /** - * Gets id + * Gets type * - * @return string|null + * @return \SynergiTech\Staffology\Model\EmployerTemplateType|null */ - public function getId(): ?string + public function getType(): ?\SynergiTech\Staffology\Model\EmployerTemplateType { - return $this->container['id']; + return $this->container['type']; } /** - * Sets id + * Sets type * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\EmployerTemplateType|null $type type * * @return $this */ - public function setId(?string $id): static + public function setType(?\SynergiTech\Staffology\Model\EmployerTemplateType $type): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['id'] = $id; + $this->container['type'] = $type; return $this; } diff --git a/src/Model/EmployerTemplateType.php b/src/Model/EmployerTemplateType.php index 4ea5cd6..1ca1328 100644 --- a/src/Model/EmployerTemplateType.php +++ b/src/Model/EmployerTemplateType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/EmploymentDetails.php b/src/Model/EmploymentDetails.php index 2f58d7b..a61833e 100644 --- a/src/Model/EmploymentDetails.php +++ b/src/Model/EmploymentDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,35 +59,35 @@ class EmploymentDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'apprenticeshipEndDate' => '\DateTime', + 'apprenticeshipStartDate' => '\DateTime', + 'cis' => '\SynergiTech\Staffology\Model\CisDetails', 'cisSubContractor' => 'bool', - 'payrollCode' => 'string', - 'jobTitle' => 'string', - 'workplacePostcode' => 'string', - 'onHold' => 'bool', - 'onFurlough' => 'bool', - 'furloughStart' => '\DateTime', - 'furloughEnd' => '\DateTime', + 'continuousEmploymentDate' => '\DateTime', + 'department' => '\SynergiTech\Staffology\Model\Department', + 'directorshipDetails' => '\SynergiTech\Staffology\Model\DirectorshipDetails', + 'forcePreviousPayrollCode' => 'string', 'furloughCalculationBasis' => '\SynergiTech\Staffology\Model\FurloughCalculationBasis', 'furloughCalculationBasisAmount' => 'float', - 'partialFurlough' => 'bool', + 'furloughEnd' => '\DateTime', 'furloughHoursNormallyWorked' => 'float', 'furloughHoursOnFurlough' => 'float', + 'furloughStart' => '\DateTime', + 'includeSecondedInfoOnStarter' => 'bool', 'isApprentice' => 'bool', - 'apprenticeshipStartDate' => '\DateTime', - 'apprenticeshipEndDate' => '\DateTime', - 'workingPattern' => 'string', - 'forcePreviousPayrollCode' => 'string', - 'starterDetails' => '\SynergiTech\Staffology\Model\StarterDetails', - 'directorshipDetails' => '\SynergiTech\Staffology\Model\DirectorshipDetails', + 'isWorkingInFreePort' => 'bool', + 'isWorkingInInvestmentZone' => 'bool', + 'jobTitle' => 'string', 'leaverDetails' => '\SynergiTech\Staffology\Model\LeaverDetails', - 'cis' => '\SynergiTech\Staffology\Model\CisDetails', - 'department' => '\SynergiTech\Staffology\Model\Department', + 'onFurlough' => 'bool', + 'onHold' => 'bool', + 'partialFurlough' => 'bool', + 'payrollCode' => 'string', 'roles' => '\SynergiTech\Staffology\Model\Item[]', - 'isWorkingInFreePort' => 'bool', + 'starterDetails' => '\SynergiTech\Staffology\Model\StarterDetails', 'veteranDetails' => '\SynergiTech\Staffology\Model\VeteranDetails', - 'continuousEmploymentDate' => '\DateTime', - 'includeSecondedInfoOnStarter' => 'bool', - 'isWorkingInInvestmentZone' => 'bool' + 'workingPattern' => 'string', + 'workplacePostcode' => 'string' ]; /** @@ -96,35 +96,35 @@ class EmploymentDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'apprenticeshipEndDate' => 'date', + 'apprenticeshipStartDate' => 'date', + 'cis' => null, 'cisSubContractor' => null, - 'payrollCode' => null, - 'jobTitle' => null, - 'workplacePostcode' => null, - 'onHold' => null, - 'onFurlough' => null, - 'furloughStart' => 'date', - 'furloughEnd' => 'date', + 'continuousEmploymentDate' => 'date', + 'department' => null, + 'directorshipDetails' => null, + 'forcePreviousPayrollCode' => null, 'furloughCalculationBasis' => null, 'furloughCalculationBasisAmount' => 'double', - 'partialFurlough' => null, + 'furloughEnd' => 'date', 'furloughHoursNormallyWorked' => 'double', 'furloughHoursOnFurlough' => 'double', + 'furloughStart' => 'date', + 'includeSecondedInfoOnStarter' => null, 'isApprentice' => null, - 'apprenticeshipStartDate' => 'date', - 'apprenticeshipEndDate' => 'date', - 'workingPattern' => 'uuid', - 'forcePreviousPayrollCode' => null, - 'starterDetails' => null, - 'directorshipDetails' => null, + 'isWorkingInFreePort' => null, + 'isWorkingInInvestmentZone' => null, + 'jobTitle' => null, 'leaverDetails' => null, - 'cis' => null, - 'department' => null, + 'onFurlough' => null, + 'onHold' => null, + 'partialFurlough' => null, + 'payrollCode' => null, 'roles' => null, - 'isWorkingInFreePort' => null, + 'starterDetails' => null, 'veteranDetails' => null, - 'continuousEmploymentDate' => 'date', - 'includeSecondedInfoOnStarter' => null, - 'isWorkingInInvestmentZone' => null + 'workingPattern' => 'uuid', + 'workplacePostcode' => null ]; /** @@ -133,35 +133,35 @@ class EmploymentDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'apprenticeshipEndDate' => true, + 'apprenticeshipStartDate' => true, + 'cis' => false, 'cisSubContractor' => false, - 'payrollCode' => false, - 'jobTitle' => true, - 'workplacePostcode' => true, - 'onHold' => false, - 'onFurlough' => false, - 'furloughStart' => true, - 'furloughEnd' => true, + 'continuousEmploymentDate' => true, + 'department' => false, + 'directorshipDetails' => false, + 'forcePreviousPayrollCode' => true, 'furloughCalculationBasis' => false, 'furloughCalculationBasisAmount' => false, - 'partialFurlough' => false, + 'furloughEnd' => true, 'furloughHoursNormallyWorked' => false, 'furloughHoursOnFurlough' => false, + 'furloughStart' => true, + 'includeSecondedInfoOnStarter' => false, 'isApprentice' => false, - 'apprenticeshipStartDate' => true, - 'apprenticeshipEndDate' => true, - 'workingPattern' => true, - 'forcePreviousPayrollCode' => true, - 'starterDetails' => false, - 'directorshipDetails' => false, + 'isWorkingInFreePort' => false, + 'isWorkingInInvestmentZone' => false, + 'jobTitle' => true, 'leaverDetails' => false, - 'cis' => false, - 'department' => false, + 'onFurlough' => false, + 'onHold' => false, + 'partialFurlough' => false, + 'payrollCode' => false, 'roles' => true, - 'isWorkingInFreePort' => false, + 'starterDetails' => false, 'veteranDetails' => false, - 'continuousEmploymentDate' => true, - 'includeSecondedInfoOnStarter' => false, - 'isWorkingInInvestmentZone' => false + 'workingPattern' => true, + 'workplacePostcode' => true ]; /** @@ -250,35 +250,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'apprenticeshipEndDate' => 'apprenticeshipEndDate', + 'apprenticeshipStartDate' => 'apprenticeshipStartDate', + 'cis' => 'cis', 'cisSubContractor' => 'cisSubContractor', - 'payrollCode' => 'payrollCode', - 'jobTitle' => 'jobTitle', - 'workplacePostcode' => 'workplacePostcode', - 'onHold' => 'onHold', - 'onFurlough' => 'onFurlough', - 'furloughStart' => 'furloughStart', - 'furloughEnd' => 'furloughEnd', + 'continuousEmploymentDate' => 'continuousEmploymentDate', + 'department' => 'department', + 'directorshipDetails' => 'directorshipDetails', + 'forcePreviousPayrollCode' => 'forcePreviousPayrollCode', 'furloughCalculationBasis' => 'furloughCalculationBasis', 'furloughCalculationBasisAmount' => 'furloughCalculationBasisAmount', - 'partialFurlough' => 'partialFurlough', + 'furloughEnd' => 'furloughEnd', 'furloughHoursNormallyWorked' => 'furloughHoursNormallyWorked', 'furloughHoursOnFurlough' => 'furloughHoursOnFurlough', + 'furloughStart' => 'furloughStart', + 'includeSecondedInfoOnStarter' => 'includeSecondedInfoOnStarter', 'isApprentice' => 'isApprentice', - 'apprenticeshipStartDate' => 'apprenticeshipStartDate', - 'apprenticeshipEndDate' => 'apprenticeshipEndDate', - 'workingPattern' => 'workingPattern', - 'forcePreviousPayrollCode' => 'forcePreviousPayrollCode', - 'starterDetails' => 'starterDetails', - 'directorshipDetails' => 'directorshipDetails', + 'isWorkingInFreePort' => 'isWorkingInFreePort', + 'isWorkingInInvestmentZone' => 'isWorkingInInvestmentZone', + 'jobTitle' => 'jobTitle', 'leaverDetails' => 'leaverDetails', - 'cis' => 'cis', - 'department' => 'department', + 'onFurlough' => 'onFurlough', + 'onHold' => 'onHold', + 'partialFurlough' => 'partialFurlough', + 'payrollCode' => 'payrollCode', 'roles' => 'roles', - 'isWorkingInFreePort' => 'isWorkingInFreePort', + 'starterDetails' => 'starterDetails', 'veteranDetails' => 'veteranDetails', - 'continuousEmploymentDate' => 'continuousEmploymentDate', - 'includeSecondedInfoOnStarter' => 'includeSecondedInfoOnStarter', - 'isWorkingInInvestmentZone' => 'isWorkingInInvestmentZone' + 'workingPattern' => 'workingPattern', + 'workplacePostcode' => 'workplacePostcode' ]; /** @@ -287,35 +287,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'apprenticeshipEndDate' => 'setApprenticeshipEndDate', + 'apprenticeshipStartDate' => 'setApprenticeshipStartDate', + 'cis' => 'setCis', 'cisSubContractor' => 'setCisSubContractor', - 'payrollCode' => 'setPayrollCode', - 'jobTitle' => 'setJobTitle', - 'workplacePostcode' => 'setWorkplacePostcode', - 'onHold' => 'setOnHold', - 'onFurlough' => 'setOnFurlough', - 'furloughStart' => 'setFurloughStart', - 'furloughEnd' => 'setFurloughEnd', + 'continuousEmploymentDate' => 'setContinuousEmploymentDate', + 'department' => 'setDepartment', + 'directorshipDetails' => 'setDirectorshipDetails', + 'forcePreviousPayrollCode' => 'setForcePreviousPayrollCode', 'furloughCalculationBasis' => 'setFurloughCalculationBasis', 'furloughCalculationBasisAmount' => 'setFurloughCalculationBasisAmount', - 'partialFurlough' => 'setPartialFurlough', + 'furloughEnd' => 'setFurloughEnd', 'furloughHoursNormallyWorked' => 'setFurloughHoursNormallyWorked', 'furloughHoursOnFurlough' => 'setFurloughHoursOnFurlough', + 'furloughStart' => 'setFurloughStart', + 'includeSecondedInfoOnStarter' => 'setIncludeSecondedInfoOnStarter', 'isApprentice' => 'setIsApprentice', - 'apprenticeshipStartDate' => 'setApprenticeshipStartDate', - 'apprenticeshipEndDate' => 'setApprenticeshipEndDate', - 'workingPattern' => 'setWorkingPattern', - 'forcePreviousPayrollCode' => 'setForcePreviousPayrollCode', - 'starterDetails' => 'setStarterDetails', - 'directorshipDetails' => 'setDirectorshipDetails', + 'isWorkingInFreePort' => 'setIsWorkingInFreePort', + 'isWorkingInInvestmentZone' => 'setIsWorkingInInvestmentZone', + 'jobTitle' => 'setJobTitle', 'leaverDetails' => 'setLeaverDetails', - 'cis' => 'setCis', - 'department' => 'setDepartment', + 'onFurlough' => 'setOnFurlough', + 'onHold' => 'setOnHold', + 'partialFurlough' => 'setPartialFurlough', + 'payrollCode' => 'setPayrollCode', 'roles' => 'setRoles', - 'isWorkingInFreePort' => 'setIsWorkingInFreePort', + 'starterDetails' => 'setStarterDetails', 'veteranDetails' => 'setVeteranDetails', - 'continuousEmploymentDate' => 'setContinuousEmploymentDate', - 'includeSecondedInfoOnStarter' => 'setIncludeSecondedInfoOnStarter', - 'isWorkingInInvestmentZone' => 'setIsWorkingInInvestmentZone' + 'workingPattern' => 'setWorkingPattern', + 'workplacePostcode' => 'setWorkplacePostcode' ]; /** @@ -324,35 +324,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'apprenticeshipEndDate' => 'getApprenticeshipEndDate', + 'apprenticeshipStartDate' => 'getApprenticeshipStartDate', + 'cis' => 'getCis', 'cisSubContractor' => 'getCisSubContractor', - 'payrollCode' => 'getPayrollCode', - 'jobTitle' => 'getJobTitle', - 'workplacePostcode' => 'getWorkplacePostcode', - 'onHold' => 'getOnHold', - 'onFurlough' => 'getOnFurlough', - 'furloughStart' => 'getFurloughStart', - 'furloughEnd' => 'getFurloughEnd', + 'continuousEmploymentDate' => 'getContinuousEmploymentDate', + 'department' => 'getDepartment', + 'directorshipDetails' => 'getDirectorshipDetails', + 'forcePreviousPayrollCode' => 'getForcePreviousPayrollCode', 'furloughCalculationBasis' => 'getFurloughCalculationBasis', 'furloughCalculationBasisAmount' => 'getFurloughCalculationBasisAmount', - 'partialFurlough' => 'getPartialFurlough', + 'furloughEnd' => 'getFurloughEnd', 'furloughHoursNormallyWorked' => 'getFurloughHoursNormallyWorked', 'furloughHoursOnFurlough' => 'getFurloughHoursOnFurlough', + 'furloughStart' => 'getFurloughStart', + 'includeSecondedInfoOnStarter' => 'getIncludeSecondedInfoOnStarter', 'isApprentice' => 'getIsApprentice', - 'apprenticeshipStartDate' => 'getApprenticeshipStartDate', - 'apprenticeshipEndDate' => 'getApprenticeshipEndDate', - 'workingPattern' => 'getWorkingPattern', - 'forcePreviousPayrollCode' => 'getForcePreviousPayrollCode', - 'starterDetails' => 'getStarterDetails', - 'directorshipDetails' => 'getDirectorshipDetails', + 'isWorkingInFreePort' => 'getIsWorkingInFreePort', + 'isWorkingInInvestmentZone' => 'getIsWorkingInInvestmentZone', + 'jobTitle' => 'getJobTitle', 'leaverDetails' => 'getLeaverDetails', - 'cis' => 'getCis', - 'department' => 'getDepartment', + 'onFurlough' => 'getOnFurlough', + 'onHold' => 'getOnHold', + 'partialFurlough' => 'getPartialFurlough', + 'payrollCode' => 'getPayrollCode', 'roles' => 'getRoles', - 'isWorkingInFreePort' => 'getIsWorkingInFreePort', + 'starterDetails' => 'getStarterDetails', 'veteranDetails' => 'getVeteranDetails', - 'continuousEmploymentDate' => 'getContinuousEmploymentDate', - 'includeSecondedInfoOnStarter' => 'getIncludeSecondedInfoOnStarter', - 'isWorkingInInvestmentZone' => 'getIsWorkingInInvestmentZone' + 'workingPattern' => 'getWorkingPattern', + 'workplacePostcode' => 'getWorkplacePostcode' ]; /** @@ -411,35 +411,35 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('apprenticeshipEndDate', $data ?? [], null); + $this->setIfExists('apprenticeshipStartDate', $data ?? [], null); + $this->setIfExists('cis', $data ?? [], null); $this->setIfExists('cisSubContractor', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('jobTitle', $data ?? [], null); - $this->setIfExists('workplacePostcode', $data ?? [], null); - $this->setIfExists('onHold', $data ?? [], null); - $this->setIfExists('onFurlough', $data ?? [], null); - $this->setIfExists('furloughStart', $data ?? [], null); - $this->setIfExists('furloughEnd', $data ?? [], null); + $this->setIfExists('continuousEmploymentDate', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('directorshipDetails', $data ?? [], null); + $this->setIfExists('forcePreviousPayrollCode', $data ?? [], null); $this->setIfExists('furloughCalculationBasis', $data ?? [], null); $this->setIfExists('furloughCalculationBasisAmount', $data ?? [], null); - $this->setIfExists('partialFurlough', $data ?? [], null); + $this->setIfExists('furloughEnd', $data ?? [], null); $this->setIfExists('furloughHoursNormallyWorked', $data ?? [], null); $this->setIfExists('furloughHoursOnFurlough', $data ?? [], null); + $this->setIfExists('furloughStart', $data ?? [], null); + $this->setIfExists('includeSecondedInfoOnStarter', $data ?? [], null); $this->setIfExists('isApprentice', $data ?? [], null); - $this->setIfExists('apprenticeshipStartDate', $data ?? [], null); - $this->setIfExists('apprenticeshipEndDate', $data ?? [], null); - $this->setIfExists('workingPattern', $data ?? [], null); - $this->setIfExists('forcePreviousPayrollCode', $data ?? [], null); - $this->setIfExists('starterDetails', $data ?? [], null); - $this->setIfExists('directorshipDetails', $data ?? [], null); + $this->setIfExists('isWorkingInFreePort', $data ?? [], null); + $this->setIfExists('isWorkingInInvestmentZone', $data ?? [], null); + $this->setIfExists('jobTitle', $data ?? [], null); $this->setIfExists('leaverDetails', $data ?? [], null); - $this->setIfExists('cis', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('onFurlough', $data ?? [], null); + $this->setIfExists('onHold', $data ?? [], null); + $this->setIfExists('partialFurlough', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('roles', $data ?? [], null); - $this->setIfExists('isWorkingInFreePort', $data ?? [], null); + $this->setIfExists('starterDetails', $data ?? [], null); $this->setIfExists('veteranDetails', $data ?? [], null); - $this->setIfExists('continuousEmploymentDate', $data ?? [], null); - $this->setIfExists('includeSecondedInfoOnStarter', $data ?? [], null); - $this->setIfExists('isWorkingInInvestmentZone', $data ?? [], null); + $this->setIfExists('workingPattern', $data ?? [], null); + $this->setIfExists('workplacePostcode', $data ?? [], null); } /** @@ -469,6 +469,14 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if (!is_null($this->container['forcePreviousPayrollCode']) && (mb_strlen($this->container['forcePreviousPayrollCode']) > 35)) { + $invalidProperties[] = "invalid value for 'forcePreviousPayrollCode', the character length must be smaller than or equal to 35."; + } + + if (!is_null($this->container['jobTitle']) && (mb_strlen($this->container['jobTitle']) > 120)) { + $invalidProperties[] = "invalid value for 'jobTitle', the character length must be smaller than or equal to 120."; + } + if ($this->container['payrollCode'] === null) { $invalidProperties[] = "'payrollCode' can't be null"; } @@ -480,18 +488,10 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'payrollCode', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['jobTitle']) && (mb_strlen($this->container['jobTitle']) > 120)) { - $invalidProperties[] = "invalid value for 'jobTitle', the character length must be smaller than or equal to 120."; - } - if (!is_null($this->container['workplacePostcode']) && (mb_strlen($this->container['workplacePostcode']) > 10)) { $invalidProperties[] = "invalid value for 'workplacePostcode', the character length must be smaller than or equal to 10."; } - if (!is_null($this->container['forcePreviousPayrollCode']) && (mb_strlen($this->container['forcePreviousPayrollCode']) > 35)) { - $invalidProperties[] = "invalid value for 'forcePreviousPayrollCode', the character length must be smaller than or equal to 35."; - } - return $invalidProperties; } @@ -508,260 +508,249 @@ public function valid(): bool /** - * Gets cisSubContractor + * Gets apprenticeshipEndDate * - * @return bool|null + * @return \DateTime|null */ - public function getCisSubContractor(): ?bool + public function getApprenticeshipEndDate(): ?\DateTime { - return $this->container['cisSubContractor']; + return $this->container['apprenticeshipEndDate']; } /** - * Sets cisSubContractor + * Sets apprenticeshipEndDate * - * @param bool|null $cisSubContractor Set to True if this Employee is a CIS Subcontractor. The ```Cis``` property contains further information + * @param \DateTime|null $apprenticeshipEndDate apprenticeshipEndDate * * @return $this */ - public function setCisSubContractor(?bool $cisSubContractor): static + public function setApprenticeshipEndDate(?\DateTime $apprenticeshipEndDate): static { - if (is_null($cisSubContractor)) { - throw new InvalidArgumentException('non-nullable cisSubContractor cannot be null'); + if (is_null($apprenticeshipEndDate)) { + array_push($this->openAPINullablesSetToNull, 'apprenticeshipEndDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('apprenticeshipEndDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['cisSubContractor'] = $cisSubContractor; + $this->container['apprenticeshipEndDate'] = $apprenticeshipEndDate; return $this; } /** - * Gets payrollCode + * Gets apprenticeshipStartDate * - * @return string + * @return \DateTime|null */ - public function getPayrollCode(): string + public function getApprenticeshipStartDate(): ?\DateTime { - return $this->container['payrollCode']; + return $this->container['apprenticeshipStartDate']; } /** - * Sets payrollCode + * Sets apprenticeshipStartDate * - * @param string $payrollCode The Employees Payroll Code. Must be unique within the Employer. + * @param \DateTime|null $apprenticeshipStartDate apprenticeshipStartDate * * @return $this */ - public function setPayrollCode(string $payrollCode): static + public function setApprenticeshipStartDate(?\DateTime $apprenticeshipStartDate): static { - if (is_null($payrollCode)) { - throw new InvalidArgumentException('non-nullable payrollCode cannot be null'); - } - if ((mb_strlen($payrollCode) > 35)) { - throw new InvalidArgumentException('invalid length for $payrollCode when calling EmploymentDetails., must be smaller than or equal to 35.'); - } - if ((mb_strlen($payrollCode) < 1)) { - throw new InvalidArgumentException('invalid length for $payrollCode when calling EmploymentDetails., must be bigger than or equal to 1.'); + if (is_null($apprenticeshipStartDate)) { + array_push($this->openAPINullablesSetToNull, 'apprenticeshipStartDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('apprenticeshipStartDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - - $this->container['payrollCode'] = $payrollCode; + $this->container['apprenticeshipStartDate'] = $apprenticeshipStartDate; return $this; } /** - * Gets jobTitle + * Gets cis * - * @return string|null + * @return \SynergiTech\Staffology\Model\CisDetails|null */ - public function getJobTitle(): ?string + public function getCis(): ?\SynergiTech\Staffology\Model\CisDetails { - return $this->container['jobTitle']; + return $this->container['cis']; } /** - * Sets jobTitle + * Sets cis * - * @param string|null $jobTitle Job Title of Primary role of the Employee + * @param \SynergiTech\Staffology\Model\CisDetails|null $cis cis * * @return $this */ - public function setJobTitle(?string $jobTitle): static + public function setCis(?\SynergiTech\Staffology\Model\CisDetails $cis): static { - if (is_null($jobTitle)) { - array_push($this->openAPINullablesSetToNull, 'jobTitle'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('jobTitle', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($jobTitle) && (mb_strlen($jobTitle) > 120)) { - throw new InvalidArgumentException('invalid length for $jobTitle when calling EmploymentDetails., must be smaller than or equal to 120.'); + if (is_null($cis)) { + throw new InvalidArgumentException('non-nullable cis cannot be null'); } - - $this->container['jobTitle'] = $jobTitle; + $this->container['cis'] = $cis; return $this; } /** - * Gets workplacePostcode + * Gets cisSubContractor * - * @return string|null + * @return bool|null */ - public function getWorkplacePostcode(): ?string + public function getCisSubContractor(): ?bool { - return $this->container['workplacePostcode']; + return $this->container['cisSubContractor']; } /** - * Sets workplacePostcode + * Sets cisSubContractor * - * @param string|null $workplacePostcode Set the workplace postcode, ensuring it's uppercase and no longer than 10 characters. + * @param bool|null $cisSubContractor Set to True if this Employee is a CIS Subcontractor. The ```Cis``` property contains further information * * @return $this */ - public function setWorkplacePostcode(?string $workplacePostcode): static + public function setCisSubContractor(?bool $cisSubContractor): static { - if (is_null($workplacePostcode)) { - array_push($this->openAPINullablesSetToNull, 'workplacePostcode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('workplacePostcode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($workplacePostcode) && (mb_strlen($workplacePostcode) > 10)) { - throw new InvalidArgumentException('invalid length for $workplacePostcode when calling EmploymentDetails., must be smaller than or equal to 10.'); + if (is_null($cisSubContractor)) { + throw new InvalidArgumentException('non-nullable cisSubContractor cannot be null'); } - - $this->container['workplacePostcode'] = $workplacePostcode; + $this->container['cisSubContractor'] = $cisSubContractor; return $this; } /** - * Gets onHold + * Gets continuousEmploymentDate * - * @return bool|null + * @return \DateTime|null */ - public function getOnHold(): ?bool + public function getContinuousEmploymentDate(): ?\DateTime { - return $this->container['onHold']; + return $this->container['continuousEmploymentDate']; } /** - * Sets onHold + * Sets continuousEmploymentDate * - * @param bool|null $onHold Set to true to temporarily exclude the employee from payruns + * @param \DateTime|null $continuousEmploymentDate [readonly] Continuous employment date for the occupational scheme. * * @return $this */ - public function setOnHold(?bool $onHold): static + public function setContinuousEmploymentDate(?\DateTime $continuousEmploymentDate): static { - if (is_null($onHold)) { - throw new InvalidArgumentException('non-nullable onHold cannot be null'); + if (is_null($continuousEmploymentDate)) { + array_push($this->openAPINullablesSetToNull, 'continuousEmploymentDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('continuousEmploymentDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['onHold'] = $onHold; + $this->container['continuousEmploymentDate'] = $continuousEmploymentDate; return $this; } /** - * Gets onFurlough + * Gets department * - * @return bool|null + * @return \SynergiTech\Staffology\Model\Department|null */ - public function getOnFurlough(): ?bool + public function getDepartment(): ?\SynergiTech\Staffology\Model\Department { - return $this->container['onFurlough']; + return $this->container['department']; } /** - * Sets onFurlough + * Sets department * - * @param bool|null $onFurlough Set to true if the employee is on furlough. + * @param \SynergiTech\Staffology\Model\Department|null $department department * * @return $this */ - public function setOnFurlough(?bool $onFurlough): static + public function setDepartment(?\SynergiTech\Staffology\Model\Department $department): static { - if (is_null($onFurlough)) { - throw new InvalidArgumentException('non-nullable onFurlough cannot be null'); + if (is_null($department)) { + throw new InvalidArgumentException('non-nullable department cannot be null'); } - $this->container['onFurlough'] = $onFurlough; + $this->container['department'] = $department; return $this; } /** - * Gets furloughStart + * Gets directorshipDetails * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\DirectorshipDetails|null */ - public function getFurloughStart(): ?\DateTime + public function getDirectorshipDetails(): ?\SynergiTech\Staffology\Model\DirectorshipDetails { - return $this->container['furloughStart']; + return $this->container['directorshipDetails']; } /** - * Sets furloughStart + * Sets directorshipDetails * - * @param \DateTime|null $furloughStart Furlough Start Date. + * @param \SynergiTech\Staffology\Model\DirectorshipDetails|null $directorshipDetails directorshipDetails * * @return $this */ - public function setFurloughStart(?\DateTime $furloughStart): static + public function setDirectorshipDetails(?\SynergiTech\Staffology\Model\DirectorshipDetails $directorshipDetails): static { - if (is_null($furloughStart)) { - array_push($this->openAPINullablesSetToNull, 'furloughStart'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('furloughStart', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($directorshipDetails)) { + throw new InvalidArgumentException('non-nullable directorshipDetails cannot be null'); } - $this->container['furloughStart'] = $furloughStart; + $this->container['directorshipDetails'] = $directorshipDetails; return $this; } /** - * Gets furloughEnd + * Gets forcePreviousPayrollCode * - * @return \DateTime|null + * @return string|null */ - public function getFurloughEnd(): ?\DateTime + public function getForcePreviousPayrollCode(): ?string { - return $this->container['furloughEnd']; + return $this->container['forcePreviousPayrollCode']; } /** - * Sets furloughEnd + * Sets forcePreviousPayrollCode * - * @param \DateTime|null $furloughEnd Furlough End Date. + * @param string|null $forcePreviousPayrollCode If this property has a non-empty value then a change of Payroll code will be declared on the next FPS. * * @return $this */ - public function setFurloughEnd(?\DateTime $furloughEnd): static + public function setForcePreviousPayrollCode(?string $forcePreviousPayrollCode): static { - if (is_null($furloughEnd)) { - array_push($this->openAPINullablesSetToNull, 'furloughEnd'); + if (is_null($forcePreviousPayrollCode)) { + array_push($this->openAPINullablesSetToNull, 'forcePreviousPayrollCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('furloughEnd', $nullablesSetToNull); + $index = array_search('forcePreviousPayrollCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['furloughEnd'] = $furloughEnd; + if (!is_null($forcePreviousPayrollCode) && (mb_strlen($forcePreviousPayrollCode) > 35)) { + throw new InvalidArgumentException('invalid length for $forcePreviousPayrollCode when calling EmploymentDetails., must be smaller than or equal to 35.'); + } + + $this->container['forcePreviousPayrollCode'] = $forcePreviousPayrollCode; return $this; } @@ -821,28 +810,35 @@ public function setFurloughCalculationBasisAmount(?float $furloughCalculationBas } /** - * Gets partialFurlough + * Gets furloughEnd * - * @return bool|null + * @return \DateTime|null */ - public function getPartialFurlough(): ?bool + public function getFurloughEnd(): ?\DateTime { - return $this->container['partialFurlough']; + return $this->container['furloughEnd']; } /** - * Sets partialFurlough + * Sets furloughEnd * - * @param bool|null $partialFurlough Set to true if the employee is partially furloughed. + * @param \DateTime|null $furloughEnd Furlough End Date. * * @return $this */ - public function setPartialFurlough(?bool $partialFurlough): static + public function setFurloughEnd(?\DateTime $furloughEnd): static { - if (is_null($partialFurlough)) { - throw new InvalidArgumentException('non-nullable partialFurlough cannot be null'); + if (is_null($furloughEnd)) { + array_push($this->openAPINullablesSetToNull, 'furloughEnd'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('furloughEnd', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['partialFurlough'] = $partialFurlough; + $this->container['furloughEnd'] = $furloughEnd; return $this; } @@ -902,303 +898,323 @@ public function setFurloughHoursOnFurlough(?float $furloughHoursOnFurlough): sta } /** - * Gets isApprentice + * Gets furloughStart + * + * @return \DateTime|null + */ + public function getFurloughStart(): ?\DateTime + { + return $this->container['furloughStart']; + } + + /** + * Sets furloughStart + * + * @param \DateTime|null $furloughStart Furlough Start Date. + * + * @return $this + */ + public function setFurloughStart(?\DateTime $furloughStart): static + { + if (is_null($furloughStart)) { + array_push($this->openAPINullablesSetToNull, 'furloughStart'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('furloughStart', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['furloughStart'] = $furloughStart; + + return $this; + } + + /** + * Gets includeSecondedInfoOnStarter * * @return bool|null */ - public function getIsApprentice(): ?bool + public function getIncludeSecondedInfoOnStarter(): ?bool { - return $this->container['isApprentice']; + return $this->container['includeSecondedInfoOnStarter']; } /** - * Sets isApprentice + * Sets includeSecondedInfoOnStarter * - * @param bool|null $isApprentice Set to True if this Employee is an apprentice. This affects the calculations for National Minimum Wage + * @param bool|null $includeSecondedInfoOnStarter [readonly] If true then include seconded information on starter of FPS * * @return $this */ - public function setIsApprentice(?bool $isApprentice): static + public function setIncludeSecondedInfoOnStarter(?bool $includeSecondedInfoOnStarter): static { - if (is_null($isApprentice)) { - throw new InvalidArgumentException('non-nullable isApprentice cannot be null'); + if (is_null($includeSecondedInfoOnStarter)) { + throw new InvalidArgumentException('non-nullable includeSecondedInfoOnStarter cannot be null'); } - $this->container['isApprentice'] = $isApprentice; + $this->container['includeSecondedInfoOnStarter'] = $includeSecondedInfoOnStarter; return $this; } /** - * Gets apprenticeshipStartDate + * Gets isApprentice * - * @return \DateTime|null + * @return bool|null */ - public function getApprenticeshipStartDate(): ?\DateTime + public function getIsApprentice(): ?bool { - return $this->container['apprenticeshipStartDate']; + return $this->container['isApprentice']; } /** - * Sets apprenticeshipStartDate + * Sets isApprentice * - * @param \DateTime|null $apprenticeshipStartDate apprenticeshipStartDate + * @param bool|null $isApprentice Set to True if this Employee is an apprentice. This affects the calculations for National Minimum Wage * * @return $this */ - public function setApprenticeshipStartDate(?\DateTime $apprenticeshipStartDate): static + public function setIsApprentice(?bool $isApprentice): static { - if (is_null($apprenticeshipStartDate)) { - array_push($this->openAPINullablesSetToNull, 'apprenticeshipStartDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('apprenticeshipStartDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isApprentice)) { + throw new InvalidArgumentException('non-nullable isApprentice cannot be null'); } - $this->container['apprenticeshipStartDate'] = $apprenticeshipStartDate; + $this->container['isApprentice'] = $isApprentice; return $this; } /** - * Gets apprenticeshipEndDate + * Gets isWorkingInFreePort * - * @return \DateTime|null + * @return bool|null */ - public function getApprenticeshipEndDate(): ?\DateTime + public function getIsWorkingInFreePort(): ?bool { - return $this->container['apprenticeshipEndDate']; + return $this->container['isWorkingInFreePort']; } /** - * Sets apprenticeshipEndDate + * Sets isWorkingInFreePort * - * @param \DateTime|null $apprenticeshipEndDate apprenticeshipEndDate + * @param bool|null $isWorkingInFreePort Flag indicating the employee is employed in a Freeport * * @return $this */ - public function setApprenticeshipEndDate(?\DateTime $apprenticeshipEndDate): static + public function setIsWorkingInFreePort(?bool $isWorkingInFreePort): static { - if (is_null($apprenticeshipEndDate)) { - array_push($this->openAPINullablesSetToNull, 'apprenticeshipEndDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('apprenticeshipEndDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isWorkingInFreePort)) { + throw new InvalidArgumentException('non-nullable isWorkingInFreePort cannot be null'); } - $this->container['apprenticeshipEndDate'] = $apprenticeshipEndDate; + $this->container['isWorkingInFreePort'] = $isWorkingInFreePort; return $this; } /** - * Gets workingPattern + * Gets isWorkingInInvestmentZone * - * @return string|null + * @return bool|null */ - public function getWorkingPattern(): ?string + public function getIsWorkingInInvestmentZone(): ?bool { - return $this->container['workingPattern']; + return $this->container['isWorkingInInvestmentZone']; } /** - * Sets workingPattern + * Sets isWorkingInInvestmentZone * - * @param string|null $workingPattern Used when calculating payments for Leave. If null then the default Working Pattern is used + * @param bool|null $isWorkingInInvestmentZone Flag indicating the employee is employed in an Investment Zone * * @return $this */ - public function setWorkingPattern(?string $workingPattern): static + public function setIsWorkingInInvestmentZone(?bool $isWorkingInInvestmentZone): static { - if (is_null($workingPattern)) { - array_push($this->openAPINullablesSetToNull, 'workingPattern'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('workingPattern', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isWorkingInInvestmentZone)) { + throw new InvalidArgumentException('non-nullable isWorkingInInvestmentZone cannot be null'); } - $this->container['workingPattern'] = $workingPattern; + $this->container['isWorkingInInvestmentZone'] = $isWorkingInInvestmentZone; return $this; } /** - * Gets forcePreviousPayrollCode + * Gets jobTitle * * @return string|null */ - public function getForcePreviousPayrollCode(): ?string + public function getJobTitle(): ?string { - return $this->container['forcePreviousPayrollCode']; + return $this->container['jobTitle']; } /** - * Sets forcePreviousPayrollCode + * Sets jobTitle * - * @param string|null $forcePreviousPayrollCode If this property has a non-empty value then a change of Payroll code will be declared on the next FPS. + * @param string|null $jobTitle Job Title of Primary role of the Employee * * @return $this */ - public function setForcePreviousPayrollCode(?string $forcePreviousPayrollCode): static + public function setJobTitle(?string $jobTitle): static { - if (is_null($forcePreviousPayrollCode)) { - array_push($this->openAPINullablesSetToNull, 'forcePreviousPayrollCode'); + if (is_null($jobTitle)) { + array_push($this->openAPINullablesSetToNull, 'jobTitle'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('forcePreviousPayrollCode', $nullablesSetToNull); + $index = array_search('jobTitle', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($forcePreviousPayrollCode) && (mb_strlen($forcePreviousPayrollCode) > 35)) { - throw new InvalidArgumentException('invalid length for $forcePreviousPayrollCode when calling EmploymentDetails., must be smaller than or equal to 35.'); + if (!is_null($jobTitle) && (mb_strlen($jobTitle) > 120)) { + throw new InvalidArgumentException('invalid length for $jobTitle when calling EmploymentDetails., must be smaller than or equal to 120.'); } - $this->container['forcePreviousPayrollCode'] = $forcePreviousPayrollCode; + $this->container['jobTitle'] = $jobTitle; return $this; } /** - * Gets starterDetails + * Gets leaverDetails * - * @return \SynergiTech\Staffology\Model\StarterDetails|null + * @return \SynergiTech\Staffology\Model\LeaverDetails|null */ - public function getStarterDetails(): ?\SynergiTech\Staffology\Model\StarterDetails + public function getLeaverDetails(): ?\SynergiTech\Staffology\Model\LeaverDetails { - return $this->container['starterDetails']; + return $this->container['leaverDetails']; } /** - * Sets starterDetails + * Sets leaverDetails * - * @param \SynergiTech\Staffology\Model\StarterDetails|null $starterDetails starterDetails + * @param \SynergiTech\Staffology\Model\LeaverDetails|null $leaverDetails leaverDetails * * @return $this */ - public function setStarterDetails(?\SynergiTech\Staffology\Model\StarterDetails $starterDetails): static + public function setLeaverDetails(?\SynergiTech\Staffology\Model\LeaverDetails $leaverDetails): static { - if (is_null($starterDetails)) { - throw new InvalidArgumentException('non-nullable starterDetails cannot be null'); + if (is_null($leaverDetails)) { + throw new InvalidArgumentException('non-nullable leaverDetails cannot be null'); } - $this->container['starterDetails'] = $starterDetails; + $this->container['leaverDetails'] = $leaverDetails; return $this; } /** - * Gets directorshipDetails + * Gets onFurlough * - * @return \SynergiTech\Staffology\Model\DirectorshipDetails|null + * @return bool|null */ - public function getDirectorshipDetails(): ?\SynergiTech\Staffology\Model\DirectorshipDetails + public function getOnFurlough(): ?bool { - return $this->container['directorshipDetails']; + return $this->container['onFurlough']; } /** - * Sets directorshipDetails + * Sets onFurlough * - * @param \SynergiTech\Staffology\Model\DirectorshipDetails|null $directorshipDetails directorshipDetails + * @param bool|null $onFurlough Set to true if the employee is on furlough. * * @return $this */ - public function setDirectorshipDetails(?\SynergiTech\Staffology\Model\DirectorshipDetails $directorshipDetails): static + public function setOnFurlough(?bool $onFurlough): static { - if (is_null($directorshipDetails)) { - throw new InvalidArgumentException('non-nullable directorshipDetails cannot be null'); + if (is_null($onFurlough)) { + throw new InvalidArgumentException('non-nullable onFurlough cannot be null'); } - $this->container['directorshipDetails'] = $directorshipDetails; + $this->container['onFurlough'] = $onFurlough; return $this; } /** - * Gets leaverDetails + * Gets onHold * - * @return \SynergiTech\Staffology\Model\LeaverDetails|null + * @return bool|null */ - public function getLeaverDetails(): ?\SynergiTech\Staffology\Model\LeaverDetails + public function getOnHold(): ?bool { - return $this->container['leaverDetails']; + return $this->container['onHold']; } /** - * Sets leaverDetails + * Sets onHold * - * @param \SynergiTech\Staffology\Model\LeaverDetails|null $leaverDetails leaverDetails + * @param bool|null $onHold Set to true to temporarily exclude the employee from payruns * * @return $this */ - public function setLeaverDetails(?\SynergiTech\Staffology\Model\LeaverDetails $leaverDetails): static + public function setOnHold(?bool $onHold): static { - if (is_null($leaverDetails)) { - throw new InvalidArgumentException('non-nullable leaverDetails cannot be null'); + if (is_null($onHold)) { + throw new InvalidArgumentException('non-nullable onHold cannot be null'); } - $this->container['leaverDetails'] = $leaverDetails; + $this->container['onHold'] = $onHold; return $this; } /** - * Gets cis + * Gets partialFurlough * - * @return \SynergiTech\Staffology\Model\CisDetails|null + * @return bool|null */ - public function getCis(): ?\SynergiTech\Staffology\Model\CisDetails + public function getPartialFurlough(): ?bool { - return $this->container['cis']; + return $this->container['partialFurlough']; } /** - * Sets cis + * Sets partialFurlough * - * @param \SynergiTech\Staffology\Model\CisDetails|null $cis cis + * @param bool|null $partialFurlough Set to true if the employee is partially furloughed. * * @return $this */ - public function setCis(?\SynergiTech\Staffology\Model\CisDetails $cis): static + public function setPartialFurlough(?bool $partialFurlough): static { - if (is_null($cis)) { - throw new InvalidArgumentException('non-nullable cis cannot be null'); + if (is_null($partialFurlough)) { + throw new InvalidArgumentException('non-nullable partialFurlough cannot be null'); } - $this->container['cis'] = $cis; + $this->container['partialFurlough'] = $partialFurlough; return $this; } /** - * Gets department + * Gets payrollCode * - * @return \SynergiTech\Staffology\Model\Department|null + * @return string */ - public function getDepartment(): ?\SynergiTech\Staffology\Model\Department + public function getPayrollCode(): string { - return $this->container['department']; + return $this->container['payrollCode']; } /** - * Sets department + * Sets payrollCode * - * @param \SynergiTech\Staffology\Model\Department|null $department department + * @param string $payrollCode The Employees Payroll Code. Must be unique within the Employer. * * @return $this */ - public function setDepartment(?\SynergiTech\Staffology\Model\Department $department): static + public function setPayrollCode(string $payrollCode): static { - if (is_null($department)) { - throw new InvalidArgumentException('non-nullable department cannot be null'); + if (is_null($payrollCode)) { + throw new InvalidArgumentException('non-nullable payrollCode cannot be null'); + } + if ((mb_strlen($payrollCode) > 35)) { + throw new InvalidArgumentException('invalid length for $payrollCode when calling EmploymentDetails., must be smaller than or equal to 35.'); + } + if ((mb_strlen($payrollCode) < 1)) { + throw new InvalidArgumentException('invalid length for $payrollCode when calling EmploymentDetails., must be bigger than or equal to 1.'); } - $this->container['department'] = $department; + + $this->container['payrollCode'] = $payrollCode; return $this; } @@ -1238,28 +1254,28 @@ public function setRoles(?array $roles): static } /** - * Gets isWorkingInFreePort + * Gets starterDetails * - * @return bool|null + * @return \SynergiTech\Staffology\Model\StarterDetails|null */ - public function getIsWorkingInFreePort(): ?bool + public function getStarterDetails(): ?\SynergiTech\Staffology\Model\StarterDetails { - return $this->container['isWorkingInFreePort']; + return $this->container['starterDetails']; } /** - * Sets isWorkingInFreePort + * Sets starterDetails * - * @param bool|null $isWorkingInFreePort Flag indicating the employee is employed in a Freeport + * @param \SynergiTech\Staffology\Model\StarterDetails|null $starterDetails starterDetails * * @return $this */ - public function setIsWorkingInFreePort(?bool $isWorkingInFreePort): static + public function setStarterDetails(?\SynergiTech\Staffology\Model\StarterDetails $starterDetails): static { - if (is_null($isWorkingInFreePort)) { - throw new InvalidArgumentException('non-nullable isWorkingInFreePort cannot be null'); + if (is_null($starterDetails)) { + throw new InvalidArgumentException('non-nullable starterDetails cannot be null'); } - $this->container['isWorkingInFreePort'] = $isWorkingInFreePort; + $this->container['starterDetails'] = $starterDetails; return $this; } @@ -1292,89 +1308,73 @@ public function setVeteranDetails(?\SynergiTech\Staffology\Model\VeteranDetails } /** - * Gets continuousEmploymentDate + * Gets workingPattern * - * @return \DateTime|null + * @return string|null */ - public function getContinuousEmploymentDate(): ?\DateTime + public function getWorkingPattern(): ?string { - return $this->container['continuousEmploymentDate']; + return $this->container['workingPattern']; } /** - * Sets continuousEmploymentDate + * Sets workingPattern * - * @param \DateTime|null $continuousEmploymentDate [readonly] Continuous employment date for the occupational scheme. + * @param string|null $workingPattern Used when calculating payments for Leave. If null then the default Working Pattern is used * * @return $this */ - public function setContinuousEmploymentDate(?\DateTime $continuousEmploymentDate): static + public function setWorkingPattern(?string $workingPattern): static { - if (is_null($continuousEmploymentDate)) { - array_push($this->openAPINullablesSetToNull, 'continuousEmploymentDate'); + if (is_null($workingPattern)) { + array_push($this->openAPINullablesSetToNull, 'workingPattern'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('continuousEmploymentDate', $nullablesSetToNull); + $index = array_search('workingPattern', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['continuousEmploymentDate'] = $continuousEmploymentDate; + $this->container['workingPattern'] = $workingPattern; return $this; } /** - * Gets includeSecondedInfoOnStarter + * Gets workplacePostcode * - * @return bool|null + * @return string|null */ - public function getIncludeSecondedInfoOnStarter(): ?bool + public function getWorkplacePostcode(): ?string { - return $this->container['includeSecondedInfoOnStarter']; + return $this->container['workplacePostcode']; } /** - * Sets includeSecondedInfoOnStarter + * Sets workplacePostcode * - * @param bool|null $includeSecondedInfoOnStarter [readonly] If true then include seconded information on starter of FPS + * @param string|null $workplacePostcode Set the workplace postcode, ensuring it's uppercase and no longer than 10 characters. * * @return $this */ - public function setIncludeSecondedInfoOnStarter(?bool $includeSecondedInfoOnStarter): static + public function setWorkplacePostcode(?string $workplacePostcode): static { - if (is_null($includeSecondedInfoOnStarter)) { - throw new InvalidArgumentException('non-nullable includeSecondedInfoOnStarter cannot be null'); + if (is_null($workplacePostcode)) { + array_push($this->openAPINullablesSetToNull, 'workplacePostcode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('workplacePostcode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['includeSecondedInfoOnStarter'] = $includeSecondedInfoOnStarter; - - return $this; - } - - /** - * Gets isWorkingInInvestmentZone - * - * @return bool|null - */ - public function getIsWorkingInInvestmentZone(): ?bool - { - return $this->container['isWorkingInInvestmentZone']; - } - - /** - * Sets isWorkingInInvestmentZone - * - * @param bool|null $isWorkingInInvestmentZone Flag indicating the employee is employed in an Investment Zone - * - * @return $this - */ - public function setIsWorkingInInvestmentZone(?bool $isWorkingInInvestmentZone): static - { - if (is_null($isWorkingInInvestmentZone)) { - throw new InvalidArgumentException('non-nullable isWorkingInInvestmentZone cannot be null'); + if (!is_null($workplacePostcode) && (mb_strlen($workplacePostcode) > 10)) { + throw new InvalidArgumentException('invalid length for $workplacePostcode when calling EmploymentDetails., must be smaller than or equal to 10.'); } - $this->container['isWorkingInInvestmentZone'] = $isWorkingInInvestmentZone; + + $this->container['workplacePostcode'] = $workplacePostcode; return $this; } diff --git a/src/Model/EntitlementBand.php b/src/Model/EntitlementBand.php index de93813..f594fce 100644 --- a/src/Model/EntitlementBand.php +++ b/src/Model/EntitlementBand.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class EntitlementBand implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'percentOfPay' => 'float', - 'period' => 'int', - 'paySspInAddition' => 'bool', + 'id' => 'string', 'order' => 'int', - 'id' => 'string' + 'paySspInAddition' => 'bool', + 'percentOfPay' => 'float', + 'period' => 'int' ]; /** @@ -72,11 +72,11 @@ class EntitlementBand implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'percentOfPay' => 'double', - 'period' => 'int32', - 'paySspInAddition' => null, + 'id' => 'uuid', 'order' => 'int32', - 'id' => 'uuid' + 'paySspInAddition' => null, + 'percentOfPay' => 'double', + 'period' => 'int32' ]; /** @@ -85,11 +85,11 @@ class EntitlementBand implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'percentOfPay' => false, - 'period' => false, - 'paySspInAddition' => false, + 'id' => false, 'order' => false, - 'id' => false + 'paySspInAddition' => false, + 'percentOfPay' => false, + 'period' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'percentOfPay' => 'percentOfPay', - 'period' => 'period', - 'paySspInAddition' => 'paySspInAddition', + 'id' => 'id', 'order' => 'order', - 'id' => 'id' + 'paySspInAddition' => 'paySspInAddition', + 'percentOfPay' => 'percentOfPay', + 'period' => 'period' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'percentOfPay' => 'setPercentOfPay', - 'period' => 'setPeriod', - 'paySspInAddition' => 'setPaySspInAddition', + 'id' => 'setId', 'order' => 'setOrder', - 'id' => 'setId' + 'paySspInAddition' => 'setPaySspInAddition', + 'percentOfPay' => 'setPercentOfPay', + 'period' => 'setPeriod' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'percentOfPay' => 'getPercentOfPay', - 'period' => 'getPeriod', - 'paySspInAddition' => 'getPaySspInAddition', + 'id' => 'getId', 'order' => 'getOrder', - 'id' => 'getId' + 'paySspInAddition' => 'getPaySspInAddition', + 'percentOfPay' => 'getPercentOfPay', + 'period' => 'getPeriod' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('order', $data ?? [], null); + $this->setIfExists('paySspInAddition', $data ?? [], null); $this->setIfExists('percentOfPay', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); - $this->setIfExists('paySspInAddition', $data ?? [], null); - $this->setIfExists('order', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); } /** @@ -317,55 +317,55 @@ public function valid(): bool /** - * Gets percentOfPay + * Gets id * - * @return float|null + * @return string|null */ - public function getPercentOfPay(): ?float + public function getId(): ?string { - return $this->container['percentOfPay']; + return $this->container['id']; } /** - * Sets percentOfPay + * Sets id * - * @param float|null $percentOfPay percentOfPay + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setPercentOfPay(?float $percentOfPay): static + public function setId(?string $id): static { - if (is_null($percentOfPay)) { - throw new InvalidArgumentException('non-nullable percentOfPay cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['percentOfPay'] = $percentOfPay; + $this->container['id'] = $id; return $this; } /** - * Gets period + * Gets order * * @return int|null */ - public function getPeriod(): ?int + public function getOrder(): ?int { - return $this->container['period']; + return $this->container['order']; } /** - * Sets period + * Sets order * - * @param int|null $period period + * @param int|null $order order * * @return $this */ - public function setPeriod(?int $period): static + public function setOrder(?int $order): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($order)) { + throw new InvalidArgumentException('non-nullable order cannot be null'); } - $this->container['period'] = $period; + $this->container['order'] = $order; return $this; } @@ -398,55 +398,55 @@ public function setPaySspInAddition(?bool $paySspInAddition): static } /** - * Gets order + * Gets percentOfPay * - * @return int|null + * @return float|null */ - public function getOrder(): ?int + public function getPercentOfPay(): ?float { - return $this->container['order']; + return $this->container['percentOfPay']; } /** - * Sets order + * Sets percentOfPay * - * @param int|null $order order + * @param float|null $percentOfPay percentOfPay * * @return $this */ - public function setOrder(?int $order): static + public function setPercentOfPay(?float $percentOfPay): static { - if (is_null($order)) { - throw new InvalidArgumentException('non-nullable order cannot be null'); + if (is_null($percentOfPay)) { + throw new InvalidArgumentException('non-nullable percentOfPay cannot be null'); } - $this->container['order'] = $order; + $this->container['percentOfPay'] = $percentOfPay; return $this; } /** - * Gets id + * Gets period * - * @return string|null + * @return int|null */ - public function getId(): ?string + public function getPeriod(): ?int { - return $this->container['id']; + return $this->container['period']; } /** - * Sets id + * Sets period * - * @param string|null $id [readonly] The unique id of the object + * @param int|null $period period * * @return $this */ - public function setId(?string $id): static + public function setPeriod(?int $period): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['id'] = $id; + $this->container['period'] = $period; return $this; } diff --git a/src/Model/EntityType.php b/src/Model/EntityType.php index da32746..4af57e1 100644 --- a/src/Model/EntityType.php +++ b/src/Model/EntityType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/Eps.php b/src/Model/Eps.php index 09d0696..ccbfbee 100644 --- a/src/Model/Eps.php +++ b/src/Model/Eps.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,20 +59,20 @@ class Eps implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'periodOfInactivity' => '\SynergiTech\Staffology\Model\FromToDates', - 'noPaymentForPeriod' => '\SynergiTech\Staffology\Model\FromToDates', - 'finalSubmission' => '\SynergiTech\Staffology\Model\EpsFinalSubmission', - 'recoverableAmounts' => '\SynergiTech\Staffology\Model\RecoverableAmounts', - 'apprenticeshipLevy' => '\SynergiTech\Staffology\Model\EpsApprenticeshipLevy', 'account' => '\SynergiTech\Staffology\Model\EpsAccount', - 'eligibleForEmploymentAllowance' => 'bool', + 'apprenticeshipLevy' => '\SynergiTech\Staffology\Model\EpsApprenticeshipLevy', 'deMinimisStateAid' => '\SynergiTech\Staffology\Model\EpsDeMinimisStateAid', - 'iRmark' => 'string', - 'xml' => 'string', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'eligibleForEmploymentAllowance' => 'bool', 'employerReferences' => '\SynergiTech\Staffology\Model\EmpRefs', + 'finalSubmission' => '\SynergiTech\Staffology\Model\EpsFinalSubmission', 'govTalkSubmission' => '\SynergiTech\Staffology\Model\GovTalkSubmission', - 'id' => 'string' + 'iRmark' => 'string', + 'id' => 'string', + 'noPaymentForPeriod' => '\SynergiTech\Staffology\Model\FromToDates', + 'periodOfInactivity' => '\SynergiTech\Staffology\Model\FromToDates', + 'recoverableAmounts' => '\SynergiTech\Staffology\Model\RecoverableAmounts', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'xml' => 'string' ]; /** @@ -81,20 +81,20 @@ class Eps implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'periodOfInactivity' => null, - 'noPaymentForPeriod' => null, - 'finalSubmission' => null, - 'recoverableAmounts' => null, - 'apprenticeshipLevy' => null, 'account' => null, - 'eligibleForEmploymentAllowance' => null, + 'apprenticeshipLevy' => null, 'deMinimisStateAid' => null, - 'iRmark' => null, - 'xml' => null, - 'taxYear' => null, + 'eligibleForEmploymentAllowance' => null, 'employerReferences' => null, + 'finalSubmission' => null, 'govTalkSubmission' => null, - 'id' => 'uuid' + 'iRmark' => null, + 'id' => 'uuid', + 'noPaymentForPeriod' => null, + 'periodOfInactivity' => null, + 'recoverableAmounts' => null, + 'taxYear' => null, + 'xml' => null ]; /** @@ -103,20 +103,20 @@ class Eps implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'periodOfInactivity' => false, - 'noPaymentForPeriod' => false, - 'finalSubmission' => false, - 'recoverableAmounts' => false, - 'apprenticeshipLevy' => false, 'account' => false, - 'eligibleForEmploymentAllowance' => true, + 'apprenticeshipLevy' => false, 'deMinimisStateAid' => false, - 'iRmark' => true, - 'xml' => true, - 'taxYear' => false, + 'eligibleForEmploymentAllowance' => true, 'employerReferences' => false, + 'finalSubmission' => false, 'govTalkSubmission' => false, - 'id' => false + 'iRmark' => true, + 'id' => false, + 'noPaymentForPeriod' => false, + 'periodOfInactivity' => false, + 'recoverableAmounts' => false, + 'taxYear' => false, + 'xml' => true ]; /** @@ -205,20 +205,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'periodOfInactivity' => 'periodOfInactivity', - 'noPaymentForPeriod' => 'noPaymentForPeriod', - 'finalSubmission' => 'finalSubmission', - 'recoverableAmounts' => 'recoverableAmounts', - 'apprenticeshipLevy' => 'apprenticeshipLevy', 'account' => 'account', - 'eligibleForEmploymentAllowance' => 'eligibleForEmploymentAllowance', + 'apprenticeshipLevy' => 'apprenticeshipLevy', 'deMinimisStateAid' => 'deMinimisStateAid', - 'iRmark' => 'iRmark', - 'xml' => 'xml', - 'taxYear' => 'taxYear', + 'eligibleForEmploymentAllowance' => 'eligibleForEmploymentAllowance', 'employerReferences' => 'employerReferences', + 'finalSubmission' => 'finalSubmission', 'govTalkSubmission' => 'govTalkSubmission', - 'id' => 'id' + 'iRmark' => 'iRmark', + 'id' => 'id', + 'noPaymentForPeriod' => 'noPaymentForPeriod', + 'periodOfInactivity' => 'periodOfInactivity', + 'recoverableAmounts' => 'recoverableAmounts', + 'taxYear' => 'taxYear', + 'xml' => 'xml' ]; /** @@ -227,20 +227,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'periodOfInactivity' => 'setPeriodOfInactivity', - 'noPaymentForPeriod' => 'setNoPaymentForPeriod', - 'finalSubmission' => 'setFinalSubmission', - 'recoverableAmounts' => 'setRecoverableAmounts', - 'apprenticeshipLevy' => 'setApprenticeshipLevy', 'account' => 'setAccount', - 'eligibleForEmploymentAllowance' => 'setEligibleForEmploymentAllowance', + 'apprenticeshipLevy' => 'setApprenticeshipLevy', 'deMinimisStateAid' => 'setDeMinimisStateAid', - 'iRmark' => 'setIRmark', - 'xml' => 'setXml', - 'taxYear' => 'setTaxYear', + 'eligibleForEmploymentAllowance' => 'setEligibleForEmploymentAllowance', 'employerReferences' => 'setEmployerReferences', + 'finalSubmission' => 'setFinalSubmission', 'govTalkSubmission' => 'setGovTalkSubmission', - 'id' => 'setId' + 'iRmark' => 'setIRmark', + 'id' => 'setId', + 'noPaymentForPeriod' => 'setNoPaymentForPeriod', + 'periodOfInactivity' => 'setPeriodOfInactivity', + 'recoverableAmounts' => 'setRecoverableAmounts', + 'taxYear' => 'setTaxYear', + 'xml' => 'setXml' ]; /** @@ -249,20 +249,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'periodOfInactivity' => 'getPeriodOfInactivity', - 'noPaymentForPeriod' => 'getNoPaymentForPeriod', - 'finalSubmission' => 'getFinalSubmission', - 'recoverableAmounts' => 'getRecoverableAmounts', - 'apprenticeshipLevy' => 'getApprenticeshipLevy', 'account' => 'getAccount', - 'eligibleForEmploymentAllowance' => 'getEligibleForEmploymentAllowance', + 'apprenticeshipLevy' => 'getApprenticeshipLevy', 'deMinimisStateAid' => 'getDeMinimisStateAid', - 'iRmark' => 'getIRmark', - 'xml' => 'getXml', - 'taxYear' => 'getTaxYear', + 'eligibleForEmploymentAllowance' => 'getEligibleForEmploymentAllowance', 'employerReferences' => 'getEmployerReferences', + 'finalSubmission' => 'getFinalSubmission', 'govTalkSubmission' => 'getGovTalkSubmission', - 'id' => 'getId' + 'iRmark' => 'getIRmark', + 'id' => 'getId', + 'noPaymentForPeriod' => 'getNoPaymentForPeriod', + 'periodOfInactivity' => 'getPeriodOfInactivity', + 'recoverableAmounts' => 'getRecoverableAmounts', + 'taxYear' => 'getTaxYear', + 'xml' => 'getXml' ]; /** @@ -321,20 +321,20 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('periodOfInactivity', $data ?? [], null); - $this->setIfExists('noPaymentForPeriod', $data ?? [], null); - $this->setIfExists('finalSubmission', $data ?? [], null); - $this->setIfExists('recoverableAmounts', $data ?? [], null); - $this->setIfExists('apprenticeshipLevy', $data ?? [], null); $this->setIfExists('account', $data ?? [], null); - $this->setIfExists('eligibleForEmploymentAllowance', $data ?? [], null); + $this->setIfExists('apprenticeshipLevy', $data ?? [], null); $this->setIfExists('deMinimisStateAid', $data ?? [], null); - $this->setIfExists('iRmark', $data ?? [], null); - $this->setIfExists('xml', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('eligibleForEmploymentAllowance', $data ?? [], null); $this->setIfExists('employerReferences', $data ?? [], null); + $this->setIfExists('finalSubmission', $data ?? [], null); $this->setIfExists('govTalkSubmission', $data ?? [], null); + $this->setIfExists('iRmark', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('noPaymentForPeriod', $data ?? [], null); + $this->setIfExists('periodOfInactivity', $data ?? [], null); + $this->setIfExists('recoverableAmounts', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('xml', $data ?? [], null); } /** @@ -380,224 +380,197 @@ public function valid(): bool /** - * Gets periodOfInactivity - * - * @return \SynergiTech\Staffology\Model\FromToDates|null - */ - public function getPeriodOfInactivity(): ?\SynergiTech\Staffology\Model\FromToDates - { - return $this->container['periodOfInactivity']; - } - - /** - * Sets periodOfInactivity - * - * @param \SynergiTech\Staffology\Model\FromToDates|null $periodOfInactivity periodOfInactivity - * - * @return $this - */ - public function setPeriodOfInactivity(?\SynergiTech\Staffology\Model\FromToDates $periodOfInactivity): static - { - if (is_null($periodOfInactivity)) { - throw new InvalidArgumentException('non-nullable periodOfInactivity cannot be null'); - } - $this->container['periodOfInactivity'] = $periodOfInactivity; - - return $this; - } - - /** - * Gets noPaymentForPeriod + * Gets account * - * @return \SynergiTech\Staffology\Model\FromToDates|null + * @return \SynergiTech\Staffology\Model\EpsAccount|null */ - public function getNoPaymentForPeriod(): ?\SynergiTech\Staffology\Model\FromToDates + public function getAccount(): ?\SynergiTech\Staffology\Model\EpsAccount { - return $this->container['noPaymentForPeriod']; + return $this->container['account']; } /** - * Sets noPaymentForPeriod + * Sets account * - * @param \SynergiTech\Staffology\Model\FromToDates|null $noPaymentForPeriod noPaymentForPeriod + * @param \SynergiTech\Staffology\Model\EpsAccount|null $account account * * @return $this */ - public function setNoPaymentForPeriod(?\SynergiTech\Staffology\Model\FromToDates $noPaymentForPeriod): static + public function setAccount(?\SynergiTech\Staffology\Model\EpsAccount $account): static { - if (is_null($noPaymentForPeriod)) { - throw new InvalidArgumentException('non-nullable noPaymentForPeriod cannot be null'); + if (is_null($account)) { + throw new InvalidArgumentException('non-nullable account cannot be null'); } - $this->container['noPaymentForPeriod'] = $noPaymentForPeriod; + $this->container['account'] = $account; return $this; } /** - * Gets finalSubmission + * Gets apprenticeshipLevy * - * @return \SynergiTech\Staffology\Model\EpsFinalSubmission|null + * @return \SynergiTech\Staffology\Model\EpsApprenticeshipLevy|null */ - public function getFinalSubmission(): ?\SynergiTech\Staffology\Model\EpsFinalSubmission + public function getApprenticeshipLevy(): ?\SynergiTech\Staffology\Model\EpsApprenticeshipLevy { - return $this->container['finalSubmission']; + return $this->container['apprenticeshipLevy']; } /** - * Sets finalSubmission + * Sets apprenticeshipLevy * - * @param \SynergiTech\Staffology\Model\EpsFinalSubmission|null $finalSubmission finalSubmission + * @param \SynergiTech\Staffology\Model\EpsApprenticeshipLevy|null $apprenticeshipLevy apprenticeshipLevy * * @return $this */ - public function setFinalSubmission(?\SynergiTech\Staffology\Model\EpsFinalSubmission $finalSubmission): static + public function setApprenticeshipLevy(?\SynergiTech\Staffology\Model\EpsApprenticeshipLevy $apprenticeshipLevy): static { - if (is_null($finalSubmission)) { - throw new InvalidArgumentException('non-nullable finalSubmission cannot be null'); + if (is_null($apprenticeshipLevy)) { + throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); } - $this->container['finalSubmission'] = $finalSubmission; + $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; return $this; } /** - * Gets recoverableAmounts + * Gets deMinimisStateAid * - * @return \SynergiTech\Staffology\Model\RecoverableAmounts|null + * @return \SynergiTech\Staffology\Model\EpsDeMinimisStateAid|null */ - public function getRecoverableAmounts(): ?\SynergiTech\Staffology\Model\RecoverableAmounts + public function getDeMinimisStateAid(): ?\SynergiTech\Staffology\Model\EpsDeMinimisStateAid { - return $this->container['recoverableAmounts']; + return $this->container['deMinimisStateAid']; } /** - * Sets recoverableAmounts + * Sets deMinimisStateAid * - * @param \SynergiTech\Staffology\Model\RecoverableAmounts|null $recoverableAmounts recoverableAmounts + * @param \SynergiTech\Staffology\Model\EpsDeMinimisStateAid|null $deMinimisStateAid deMinimisStateAid * * @return $this */ - public function setRecoverableAmounts(?\SynergiTech\Staffology\Model\RecoverableAmounts $recoverableAmounts): static + public function setDeMinimisStateAid(?\SynergiTech\Staffology\Model\EpsDeMinimisStateAid $deMinimisStateAid): static { - if (is_null($recoverableAmounts)) { - throw new InvalidArgumentException('non-nullable recoverableAmounts cannot be null'); + if (is_null($deMinimisStateAid)) { + throw new InvalidArgumentException('non-nullable deMinimisStateAid cannot be null'); } - $this->container['recoverableAmounts'] = $recoverableAmounts; + $this->container['deMinimisStateAid'] = $deMinimisStateAid; return $this; } /** - * Gets apprenticeshipLevy + * Gets eligibleForEmploymentAllowance * - * @return \SynergiTech\Staffology\Model\EpsApprenticeshipLevy|null + * @return bool|null */ - public function getApprenticeshipLevy(): ?\SynergiTech\Staffology\Model\EpsApprenticeshipLevy + public function getEligibleForEmploymentAllowance(): ?bool { - return $this->container['apprenticeshipLevy']; + return $this->container['eligibleForEmploymentAllowance']; } /** - * Sets apprenticeshipLevy + * Sets eligibleForEmploymentAllowance * - * @param \SynergiTech\Staffology\Model\EpsApprenticeshipLevy|null $apprenticeshipLevy apprenticeshipLevy + * @param bool|null $eligibleForEmploymentAllowance eligibleForEmploymentAllowance * * @return $this */ - public function setApprenticeshipLevy(?\SynergiTech\Staffology\Model\EpsApprenticeshipLevy $apprenticeshipLevy): static + public function setEligibleForEmploymentAllowance(?bool $eligibleForEmploymentAllowance): static { - if (is_null($apprenticeshipLevy)) { - throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); + if (is_null($eligibleForEmploymentAllowance)) { + array_push($this->openAPINullablesSetToNull, 'eligibleForEmploymentAllowance'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('eligibleForEmploymentAllowance', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; + $this->container['eligibleForEmploymentAllowance'] = $eligibleForEmploymentAllowance; return $this; } /** - * Gets account + * Gets employerReferences * - * @return \SynergiTech\Staffology\Model\EpsAccount|null + * @return \SynergiTech\Staffology\Model\EmpRefs|null */ - public function getAccount(): ?\SynergiTech\Staffology\Model\EpsAccount + public function getEmployerReferences(): ?\SynergiTech\Staffology\Model\EmpRefs { - return $this->container['account']; + return $this->container['employerReferences']; } /** - * Sets account + * Sets employerReferences * - * @param \SynergiTech\Staffology\Model\EpsAccount|null $account account + * @param \SynergiTech\Staffology\Model\EmpRefs|null $employerReferences employerReferences * * @return $this */ - public function setAccount(?\SynergiTech\Staffology\Model\EpsAccount $account): static + public function setEmployerReferences(?\SynergiTech\Staffology\Model\EmpRefs $employerReferences): static { - if (is_null($account)) { - throw new InvalidArgumentException('non-nullable account cannot be null'); + if (is_null($employerReferences)) { + throw new InvalidArgumentException('non-nullable employerReferences cannot be null'); } - $this->container['account'] = $account; + $this->container['employerReferences'] = $employerReferences; return $this; } /** - * Gets eligibleForEmploymentAllowance + * Gets finalSubmission * - * @return bool|null + * @return \SynergiTech\Staffology\Model\EpsFinalSubmission|null */ - public function getEligibleForEmploymentAllowance(): ?bool + public function getFinalSubmission(): ?\SynergiTech\Staffology\Model\EpsFinalSubmission { - return $this->container['eligibleForEmploymentAllowance']; + return $this->container['finalSubmission']; } /** - * Sets eligibleForEmploymentAllowance + * Sets finalSubmission * - * @param bool|null $eligibleForEmploymentAllowance eligibleForEmploymentAllowance + * @param \SynergiTech\Staffology\Model\EpsFinalSubmission|null $finalSubmission finalSubmission * * @return $this */ - public function setEligibleForEmploymentAllowance(?bool $eligibleForEmploymentAllowance): static + public function setFinalSubmission(?\SynergiTech\Staffology\Model\EpsFinalSubmission $finalSubmission): static { - if (is_null($eligibleForEmploymentAllowance)) { - array_push($this->openAPINullablesSetToNull, 'eligibleForEmploymentAllowance'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('eligibleForEmploymentAllowance', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($finalSubmission)) { + throw new InvalidArgumentException('non-nullable finalSubmission cannot be null'); } - $this->container['eligibleForEmploymentAllowance'] = $eligibleForEmploymentAllowance; + $this->container['finalSubmission'] = $finalSubmission; return $this; } /** - * Gets deMinimisStateAid + * Gets govTalkSubmission * - * @return \SynergiTech\Staffology\Model\EpsDeMinimisStateAid|null + * @return \SynergiTech\Staffology\Model\GovTalkSubmission|null */ - public function getDeMinimisStateAid(): ?\SynergiTech\Staffology\Model\EpsDeMinimisStateAid + public function getGovTalkSubmission(): ?\SynergiTech\Staffology\Model\GovTalkSubmission { - return $this->container['deMinimisStateAid']; + return $this->container['govTalkSubmission']; } /** - * Sets deMinimisStateAid + * Sets govTalkSubmission * - * @param \SynergiTech\Staffology\Model\EpsDeMinimisStateAid|null $deMinimisStateAid deMinimisStateAid + * @param \SynergiTech\Staffology\Model\GovTalkSubmission|null $govTalkSubmission govTalkSubmission * * @return $this */ - public function setDeMinimisStateAid(?\SynergiTech\Staffology\Model\EpsDeMinimisStateAid $deMinimisStateAid): static + public function setGovTalkSubmission(?\SynergiTech\Staffology\Model\GovTalkSubmission $govTalkSubmission): static { - if (is_null($deMinimisStateAid)) { - throw new InvalidArgumentException('non-nullable deMinimisStateAid cannot be null'); + if (is_null($govTalkSubmission)) { + throw new InvalidArgumentException('non-nullable govTalkSubmission cannot be null'); } - $this->container['deMinimisStateAid'] = $deMinimisStateAid; + $this->container['govTalkSubmission'] = $govTalkSubmission; return $this; } @@ -637,143 +610,170 @@ public function setIRmark(?string $iRmark): static } /** - * Gets xml + * Gets id * * @return string|null */ - public function getXml(): ?string + public function getId(): ?string { - return $this->container['xml']; + return $this->container['id']; } /** - * Sets xml + * Sets id * - * @param string|null $xml This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setXml(?string $xml): static + public function setId(?string $id): static { - if (is_null($xml)) { - array_push($this->openAPINullablesSetToNull, 'xml'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('xml', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['xml'] = $xml; + $this->container['id'] = $id; return $this; } /** - * Gets taxYear + * Gets noPaymentForPeriod * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return \SynergiTech\Staffology\Model\FromToDates|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getNoPaymentForPeriod(): ?\SynergiTech\Staffology\Model\FromToDates { - return $this->container['taxYear']; + return $this->container['noPaymentForPeriod']; } /** - * Sets taxYear + * Sets noPaymentForPeriod * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param \SynergiTech\Staffology\Model\FromToDates|null $noPaymentForPeriod noPaymentForPeriod * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setNoPaymentForPeriod(?\SynergiTech\Staffology\Model\FromToDates $noPaymentForPeriod): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($noPaymentForPeriod)) { + throw new InvalidArgumentException('non-nullable noPaymentForPeriod cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['noPaymentForPeriod'] = $noPaymentForPeriod; return $this; } /** - * Gets employerReferences + * Gets periodOfInactivity * - * @return \SynergiTech\Staffology\Model\EmpRefs|null + * @return \SynergiTech\Staffology\Model\FromToDates|null */ - public function getEmployerReferences(): ?\SynergiTech\Staffology\Model\EmpRefs + public function getPeriodOfInactivity(): ?\SynergiTech\Staffology\Model\FromToDates { - return $this->container['employerReferences']; + return $this->container['periodOfInactivity']; } /** - * Sets employerReferences + * Sets periodOfInactivity * - * @param \SynergiTech\Staffology\Model\EmpRefs|null $employerReferences employerReferences + * @param \SynergiTech\Staffology\Model\FromToDates|null $periodOfInactivity periodOfInactivity * * @return $this */ - public function setEmployerReferences(?\SynergiTech\Staffology\Model\EmpRefs $employerReferences): static + public function setPeriodOfInactivity(?\SynergiTech\Staffology\Model\FromToDates $periodOfInactivity): static { - if (is_null($employerReferences)) { - throw new InvalidArgumentException('non-nullable employerReferences cannot be null'); + if (is_null($periodOfInactivity)) { + throw new InvalidArgumentException('non-nullable periodOfInactivity cannot be null'); } - $this->container['employerReferences'] = $employerReferences; + $this->container['periodOfInactivity'] = $periodOfInactivity; return $this; } /** - * Gets govTalkSubmission + * Gets recoverableAmounts * - * @return \SynergiTech\Staffology\Model\GovTalkSubmission|null + * @return \SynergiTech\Staffology\Model\RecoverableAmounts|null */ - public function getGovTalkSubmission(): ?\SynergiTech\Staffology\Model\GovTalkSubmission + public function getRecoverableAmounts(): ?\SynergiTech\Staffology\Model\RecoverableAmounts { - return $this->container['govTalkSubmission']; + return $this->container['recoverableAmounts']; } /** - * Sets govTalkSubmission + * Sets recoverableAmounts * - * @param \SynergiTech\Staffology\Model\GovTalkSubmission|null $govTalkSubmission govTalkSubmission + * @param \SynergiTech\Staffology\Model\RecoverableAmounts|null $recoverableAmounts recoverableAmounts * * @return $this */ - public function setGovTalkSubmission(?\SynergiTech\Staffology\Model\GovTalkSubmission $govTalkSubmission): static + public function setRecoverableAmounts(?\SynergiTech\Staffology\Model\RecoverableAmounts $recoverableAmounts): static { - if (is_null($govTalkSubmission)) { - throw new InvalidArgumentException('non-nullable govTalkSubmission cannot be null'); + if (is_null($recoverableAmounts)) { + throw new InvalidArgumentException('non-nullable recoverableAmounts cannot be null'); } - $this->container['govTalkSubmission'] = $govTalkSubmission; + $this->container['recoverableAmounts'] = $recoverableAmounts; return $this; } /** - * Gets id + * Gets taxYear + * + * @return \SynergiTech\Staffology\Model\TaxYear|null + */ + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + { + return $this->container['taxYear']; + } + + /** + * Sets taxYear + * + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * + * @return $this + */ + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + { + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + } + $this->container['taxYear'] = $taxYear; + + return $this; + } + + /** + * Gets xml * * @return string|null */ - public function getId(): ?string + public function getXml(): ?string { - return $this->container['id']; + return $this->container['xml']; } /** - * Sets id + * Sets xml * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $xml This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. * * @return $this */ - public function setId(?string $id): static + public function setXml(?string $xml): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($xml)) { + array_push($this->openAPINullablesSetToNull, 'xml'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('xml', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['xml'] = $xml; return $this; } diff --git a/src/Model/EpsAccount.php b/src/Model/EpsAccount.php index 9a5c4e8..665e306 100644 --- a/src/Model/EpsAccount.php +++ b/src/Model/EpsAccount.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -62,8 +62,8 @@ class EpsAccount implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPITypes = [ 'accountHoldersName' => 'string', 'accountNo' => 'string', - 'sortCode' => 'string', - 'buildingSocRef' => 'string' + 'buildingSocRef' => 'string', + 'sortCode' => 'string' ]; /** @@ -74,8 +74,8 @@ class EpsAccount implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPIFormats = [ 'accountHoldersName' => null, 'accountNo' => null, - 'sortCode' => null, - 'buildingSocRef' => null + 'buildingSocRef' => null, + 'sortCode' => null ]; /** @@ -86,8 +86,8 @@ class EpsAccount implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPINullables = [ 'accountHoldersName' => true, 'accountNo' => true, - 'sortCode' => true, - 'buildingSocRef' => true + 'buildingSocRef' => true, + 'sortCode' => true ]; /** @@ -178,8 +178,8 @@ public function isNullableSetToNull(string $property): bool protected static array $attributeMap = [ 'accountHoldersName' => 'accountHoldersName', 'accountNo' => 'accountNo', - 'sortCode' => 'sortCode', - 'buildingSocRef' => 'buildingSocRef' + 'buildingSocRef' => 'buildingSocRef', + 'sortCode' => 'sortCode' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool protected static array $setters = [ 'accountHoldersName' => 'setAccountHoldersName', 'accountNo' => 'setAccountNo', - 'sortCode' => 'setSortCode', - 'buildingSocRef' => 'setBuildingSocRef' + 'buildingSocRef' => 'setBuildingSocRef', + 'sortCode' => 'setSortCode' ]; /** @@ -202,8 +202,8 @@ public function isNullableSetToNull(string $property): bool protected static array $getters = [ 'accountHoldersName' => 'getAccountHoldersName', 'accountNo' => 'getAccountNo', - 'sortCode' => 'getSortCode', - 'buildingSocRef' => 'getBuildingSocRef' + 'buildingSocRef' => 'getBuildingSocRef', + 'sortCode' => 'getSortCode' ]; /** @@ -264,8 +264,8 @@ public function __construct(?array $data = null) { $this->setIfExists('accountHoldersName', $data ?? [], null); $this->setIfExists('accountNo', $data ?? [], null); - $this->setIfExists('sortCode', $data ?? [], null); $this->setIfExists('buildingSocRef', $data ?? [], null); + $this->setIfExists('sortCode', $data ?? [], null); } /** @@ -379,69 +379,69 @@ public function setAccountNo(?string $accountNo): static } /** - * Gets sortCode + * Gets buildingSocRef * * @return string|null */ - public function getSortCode(): ?string + public function getBuildingSocRef(): ?string { - return $this->container['sortCode']; + return $this->container['buildingSocRef']; } /** - * Sets sortCode + * Sets buildingSocRef * - * @param string|null $sortCode sortCode + * @param string|null $buildingSocRef buildingSocRef * * @return $this */ - public function setSortCode(?string $sortCode): static + public function setBuildingSocRef(?string $buildingSocRef): static { - if (is_null($sortCode)) { - array_push($this->openAPINullablesSetToNull, 'sortCode'); + if (is_null($buildingSocRef)) { + array_push($this->openAPINullablesSetToNull, 'buildingSocRef'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('sortCode', $nullablesSetToNull); + $index = array_search('buildingSocRef', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['sortCode'] = $sortCode; + $this->container['buildingSocRef'] = $buildingSocRef; return $this; } /** - * Gets buildingSocRef + * Gets sortCode * * @return string|null */ - public function getBuildingSocRef(): ?string + public function getSortCode(): ?string { - return $this->container['buildingSocRef']; + return $this->container['sortCode']; } /** - * Sets buildingSocRef + * Sets sortCode * - * @param string|null $buildingSocRef buildingSocRef + * @param string|null $sortCode sortCode * * @return $this */ - public function setBuildingSocRef(?string $buildingSocRef): static + public function setSortCode(?string $sortCode): static { - if (is_null($buildingSocRef)) { - array_push($this->openAPINullablesSetToNull, 'buildingSocRef'); + if (is_null($sortCode)) { + array_push($this->openAPINullablesSetToNull, 'sortCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('buildingSocRef', $nullablesSetToNull); + $index = array_search('sortCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['buildingSocRef'] = $buildingSocRef; + $this->container['sortCode'] = $sortCode; return $this; } diff --git a/src/Model/EpsApprenticeshipLevy.php b/src/Model/EpsApprenticeshipLevy.php index 1e41715..881fcd5 100644 --- a/src/Model/EpsApprenticeshipLevy.php +++ b/src/Model/EpsApprenticeshipLevy.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,9 +60,9 @@ class EpsApprenticeshipLevy implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPITypes = [ - 'taxMonth' => 'int', + 'annualAllce' => 'float', 'levyDueYTD' => 'float', - 'annualAllce' => 'float' + 'taxMonth' => 'int' ]; /** @@ -71,9 +71,9 @@ class EpsApprenticeshipLevy implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPIFormats = [ - 'taxMonth' => 'int32', + 'annualAllce' => 'double', 'levyDueYTD' => 'double', - 'annualAllce' => 'double' + 'taxMonth' => 'int32' ]; /** @@ -82,9 +82,9 @@ class EpsApprenticeshipLevy implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPINullables = [ - 'taxMonth' => false, + 'annualAllce' => false, 'levyDueYTD' => false, - 'annualAllce' => false + 'taxMonth' => false ]; /** @@ -173,9 +173,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'taxMonth' => 'taxMonth', + 'annualAllce' => 'annualAllce', 'levyDueYTD' => 'levyDueYTD', - 'annualAllce' => 'annualAllce' + 'taxMonth' => 'taxMonth' ]; /** @@ -184,9 +184,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'taxMonth' => 'setTaxMonth', + 'annualAllce' => 'setAnnualAllce', 'levyDueYTD' => 'setLevyDueYTD', - 'annualAllce' => 'setAnnualAllce' + 'taxMonth' => 'setTaxMonth' ]; /** @@ -195,9 +195,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'taxMonth' => 'getTaxMonth', + 'annualAllce' => 'getAnnualAllce', 'levyDueYTD' => 'getLevyDueYTD', - 'annualAllce' => 'getAnnualAllce' + 'taxMonth' => 'getTaxMonth' ]; /** @@ -256,9 +256,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('taxMonth', $data ?? [], null); - $this->setIfExists('levyDueYTD', $data ?? [], null); $this->setIfExists('annualAllce', $data ?? [], null); + $this->setIfExists('levyDueYTD', $data ?? [], null); + $this->setIfExists('taxMonth', $data ?? [], null); } /** @@ -304,28 +304,28 @@ public function valid(): bool /** - * Gets taxMonth + * Gets annualAllce * - * @return int|null + * @return float|null */ - public function getTaxMonth(): ?int + public function getAnnualAllce(): ?float { - return $this->container['taxMonth']; + return $this->container['annualAllce']; } /** - * Sets taxMonth + * Sets annualAllce * - * @param int|null $taxMonth taxMonth + * @param float|null $annualAllce annualAllce * * @return $this */ - public function setTaxMonth(?int $taxMonth): static + public function setAnnualAllce(?float $annualAllce): static { - if (is_null($taxMonth)) { - throw new InvalidArgumentException('non-nullable taxMonth cannot be null'); + if (is_null($annualAllce)) { + throw new InvalidArgumentException('non-nullable annualAllce cannot be null'); } - $this->container['taxMonth'] = $taxMonth; + $this->container['annualAllce'] = $annualAllce; return $this; } @@ -358,28 +358,28 @@ public function setLevyDueYTD(?float $levyDueYTD): static } /** - * Gets annualAllce + * Gets taxMonth * - * @return float|null + * @return int|null */ - public function getAnnualAllce(): ?float + public function getTaxMonth(): ?int { - return $this->container['annualAllce']; + return $this->container['taxMonth']; } /** - * Sets annualAllce + * Sets taxMonth * - * @param float|null $annualAllce annualAllce + * @param int|null $taxMonth taxMonth * * @return $this */ - public function setAnnualAllce(?float $annualAllce): static + public function setTaxMonth(?int $taxMonth): static { - if (is_null($annualAllce)) { - throw new InvalidArgumentException('non-nullable annualAllce cannot be null'); + if (is_null($taxMonth)) { + throw new InvalidArgumentException('non-nullable taxMonth cannot be null'); } - $this->container['annualAllce'] = $annualAllce; + $this->container['taxMonth'] = $taxMonth; return $this; } diff --git a/src/Model/EpsDeMinimisStateAid.php b/src/Model/EpsDeMinimisStateAid.php index 8f44a68..b1bd252 100644 --- a/src/Model/EpsDeMinimisStateAid.php +++ b/src/Model/EpsDeMinimisStateAid.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -62,8 +62,8 @@ class EpsDeMinimisStateAid implements ModelInterface, ArrayAccess, JsonSerializa protected static array $openAPITypes = [ 'agri' => 'bool', 'fisheriesAqua' => 'bool', - 'roadTrans' => 'bool', - 'indust' => 'bool' + 'indust' => 'bool', + 'roadTrans' => 'bool' ]; /** @@ -74,8 +74,8 @@ class EpsDeMinimisStateAid implements ModelInterface, ArrayAccess, JsonSerializa protected static array $openAPIFormats = [ 'agri' => null, 'fisheriesAqua' => null, - 'roadTrans' => null, - 'indust' => null + 'indust' => null, + 'roadTrans' => null ]; /** @@ -86,8 +86,8 @@ class EpsDeMinimisStateAid implements ModelInterface, ArrayAccess, JsonSerializa protected static array $openAPINullables = [ 'agri' => false, 'fisheriesAqua' => false, - 'roadTrans' => false, - 'indust' => false + 'indust' => false, + 'roadTrans' => false ]; /** @@ -178,8 +178,8 @@ public function isNullableSetToNull(string $property): bool protected static array $attributeMap = [ 'agri' => 'agri', 'fisheriesAqua' => 'fisheriesAqua', - 'roadTrans' => 'roadTrans', - 'indust' => 'indust' + 'indust' => 'indust', + 'roadTrans' => 'roadTrans' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool protected static array $setters = [ 'agri' => 'setAgri', 'fisheriesAqua' => 'setFisheriesAqua', - 'roadTrans' => 'setRoadTrans', - 'indust' => 'setIndust' + 'indust' => 'setIndust', + 'roadTrans' => 'setRoadTrans' ]; /** @@ -202,8 +202,8 @@ public function isNullableSetToNull(string $property): bool protected static array $getters = [ 'agri' => 'getAgri', 'fisheriesAqua' => 'getFisheriesAqua', - 'roadTrans' => 'getRoadTrans', - 'indust' => 'getIndust' + 'indust' => 'getIndust', + 'roadTrans' => 'getRoadTrans' ]; /** @@ -264,8 +264,8 @@ public function __construct(?array $data = null) { $this->setIfExists('agri', $data ?? [], null); $this->setIfExists('fisheriesAqua', $data ?? [], null); - $this->setIfExists('roadTrans', $data ?? [], null); $this->setIfExists('indust', $data ?? [], null); + $this->setIfExists('roadTrans', $data ?? [], null); } /** @@ -365,55 +365,55 @@ public function setFisheriesAqua(?bool $fisheriesAqua): static } /** - * Gets roadTrans + * Gets indust * * @return bool|null */ - public function getRoadTrans(): ?bool + public function getIndust(): ?bool { - return $this->container['roadTrans']; + return $this->container['indust']; } /** - * Sets roadTrans + * Sets indust * - * @param bool|null $roadTrans roadTrans + * @param bool|null $indust indust * * @return $this */ - public function setRoadTrans(?bool $roadTrans): static + public function setIndust(?bool $indust): static { - if (is_null($roadTrans)) { - throw new InvalidArgumentException('non-nullable roadTrans cannot be null'); + if (is_null($indust)) { + throw new InvalidArgumentException('non-nullable indust cannot be null'); } - $this->container['roadTrans'] = $roadTrans; + $this->container['indust'] = $indust; return $this; } /** - * Gets indust + * Gets roadTrans * * @return bool|null */ - public function getIndust(): ?bool + public function getRoadTrans(): ?bool { - return $this->container['indust']; + return $this->container['roadTrans']; } /** - * Sets indust + * Sets roadTrans * - * @param bool|null $indust indust + * @param bool|null $roadTrans roadTrans * * @return $this */ - public function setIndust(?bool $indust): static + public function setRoadTrans(?bool $roadTrans): static { - if (is_null($indust)) { - throw new InvalidArgumentException('non-nullable indust cannot be null'); + if (is_null($roadTrans)) { + throw new InvalidArgumentException('non-nullable roadTrans cannot be null'); } - $this->container['indust'] = $indust; + $this->container['roadTrans'] = $roadTrans; return $this; } diff --git a/src/Model/EpsFinalSubmission.php b/src/Model/EpsFinalSubmission.php index 283f75d..9aa20b4 100644 --- a/src/Model/EpsFinalSubmission.php +++ b/src/Model/EpsFinalSubmission.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,9 +60,9 @@ class EpsFinalSubmission implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'isFinalSubmission' => 'bool', 'becauseSchemeCeased' => 'bool', - 'dateCeased' => '\DateTime' + 'dateCeased' => '\DateTime', + 'isFinalSubmission' => 'bool' ]; /** @@ -71,9 +71,9 @@ class EpsFinalSubmission implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'isFinalSubmission' => null, 'becauseSchemeCeased' => null, - 'dateCeased' => 'date' + 'dateCeased' => 'date', + 'isFinalSubmission' => null ]; /** @@ -82,9 +82,9 @@ class EpsFinalSubmission implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'isFinalSubmission' => false, 'becauseSchemeCeased' => false, - 'dateCeased' => true + 'dateCeased' => true, + 'isFinalSubmission' => false ]; /** @@ -173,9 +173,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'isFinalSubmission' => 'isFinalSubmission', 'becauseSchemeCeased' => 'becauseSchemeCeased', - 'dateCeased' => 'dateCeased' + 'dateCeased' => 'dateCeased', + 'isFinalSubmission' => 'isFinalSubmission' ]; /** @@ -184,9 +184,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'isFinalSubmission' => 'setIsFinalSubmission', 'becauseSchemeCeased' => 'setBecauseSchemeCeased', - 'dateCeased' => 'setDateCeased' + 'dateCeased' => 'setDateCeased', + 'isFinalSubmission' => 'setIsFinalSubmission' ]; /** @@ -195,9 +195,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'isFinalSubmission' => 'getIsFinalSubmission', 'becauseSchemeCeased' => 'getBecauseSchemeCeased', - 'dateCeased' => 'getDateCeased' + 'dateCeased' => 'getDateCeased', + 'isFinalSubmission' => 'getIsFinalSubmission' ]; /** @@ -256,9 +256,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('isFinalSubmission', $data ?? [], null); $this->setIfExists('becauseSchemeCeased', $data ?? [], null); $this->setIfExists('dateCeased', $data ?? [], null); + $this->setIfExists('isFinalSubmission', $data ?? [], null); } /** @@ -303,33 +303,6 @@ public function valid(): bool } - /** - * Gets isFinalSubmission - * - * @return bool|null - */ - public function getIsFinalSubmission(): ?bool - { - return $this->container['isFinalSubmission']; - } - - /** - * Sets isFinalSubmission - * - * @param bool|null $isFinalSubmission isFinalSubmission - * - * @return $this - */ - public function setIsFinalSubmission(?bool $isFinalSubmission): static - { - if (is_null($isFinalSubmission)) { - throw new InvalidArgumentException('non-nullable isFinalSubmission cannot be null'); - } - $this->container['isFinalSubmission'] = $isFinalSubmission; - - return $this; - } - /** * Gets becauseSchemeCeased * @@ -390,6 +363,33 @@ public function setDateCeased(?\DateTime $dateCeased): static return $this; } + + /** + * Gets isFinalSubmission + * + * @return bool|null + */ + public function getIsFinalSubmission(): ?bool + { + return $this->container['isFinalSubmission']; + } + + /** + * Sets isFinalSubmission + * + * @param bool|null $isFinalSubmission isFinalSubmission + * + * @return $this + */ + public function setIsFinalSubmission(?bool $isFinalSubmission): static + { + if (is_null($isFinalSubmission)) { + throw new InvalidArgumentException('non-nullable isFinalSubmission cannot be null'); + } + $this->container['isFinalSubmission'] = $isFinalSubmission; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/Establishment.php b/src/Model/Establishment.php index 7a1c2ee..0a69750 100644 --- a/src/Model/Establishment.php +++ b/src/Model/Establishment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class Establishment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'localAuthorityNumber' => 'string', - 'schoolEmployerType' => 'string', 'establishmentCode' => 'string', - 'id' => 'string' + 'id' => 'string', + 'localAuthorityNumber' => 'string', + 'schoolEmployerType' => 'string' ]; /** @@ -71,10 +71,10 @@ class Establishment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'localAuthorityNumber' => null, - 'schoolEmployerType' => null, 'establishmentCode' => null, - 'id' => 'uuid' + 'id' => 'uuid', + 'localAuthorityNumber' => null, + 'schoolEmployerType' => null ]; /** @@ -83,10 +83,10 @@ class Establishment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'localAuthorityNumber' => true, - 'schoolEmployerType' => true, 'establishmentCode' => true, - 'id' => false + 'id' => false, + 'localAuthorityNumber' => true, + 'schoolEmployerType' => true ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'localAuthorityNumber' => 'localAuthorityNumber', - 'schoolEmployerType' => 'schoolEmployerType', 'establishmentCode' => 'establishmentCode', - 'id' => 'id' + 'id' => 'id', + 'localAuthorityNumber' => 'localAuthorityNumber', + 'schoolEmployerType' => 'schoolEmployerType' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'localAuthorityNumber' => 'setLocalAuthorityNumber', - 'schoolEmployerType' => 'setSchoolEmployerType', 'establishmentCode' => 'setEstablishmentCode', - 'id' => 'setId' + 'id' => 'setId', + 'localAuthorityNumber' => 'setLocalAuthorityNumber', + 'schoolEmployerType' => 'setSchoolEmployerType' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'localAuthorityNumber' => 'getLocalAuthorityNumber', - 'schoolEmployerType' => 'getSchoolEmployerType', 'establishmentCode' => 'getEstablishmentCode', - 'id' => 'getId' + 'id' => 'getId', + 'localAuthorityNumber' => 'getLocalAuthorityNumber', + 'schoolEmployerType' => 'getSchoolEmployerType' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('localAuthorityNumber', $data ?? [], null); - $this->setIfExists('schoolEmployerType', $data ?? [], null); $this->setIfExists('establishmentCode', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('localAuthorityNumber', $data ?? [], null); + $this->setIfExists('schoolEmployerType', $data ?? [], null); } /** @@ -310,130 +310,130 @@ public function valid(): bool /** - * Gets localAuthorityNumber + * Gets establishmentCode * * @return string|null */ - public function getLocalAuthorityNumber(): ?string + public function getEstablishmentCode(): ?string { - return $this->container['localAuthorityNumber']; + return $this->container['establishmentCode']; } /** - * Sets localAuthorityNumber + * Sets establishmentCode * - * @param string|null $localAuthorityNumber localAuthorityNumber + * @param string|null $establishmentCode establishmentCode * * @return $this */ - public function setLocalAuthorityNumber(?string $localAuthorityNumber): static + public function setEstablishmentCode(?string $establishmentCode): static { - if (is_null($localAuthorityNumber)) { - array_push($this->openAPINullablesSetToNull, 'localAuthorityNumber'); + if (is_null($establishmentCode)) { + array_push($this->openAPINullablesSetToNull, 'establishmentCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('localAuthorityNumber', $nullablesSetToNull); + $index = array_search('establishmentCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['localAuthorityNumber'] = $localAuthorityNumber; + $this->container['establishmentCode'] = $establishmentCode; return $this; } /** - * Gets schoolEmployerType + * Gets id * * @return string|null */ - public function getSchoolEmployerType(): ?string + public function getId(): ?string { - return $this->container['schoolEmployerType']; + return $this->container['id']; } /** - * Sets schoolEmployerType + * Sets id * - * @param string|null $schoolEmployerType schoolEmployerType + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setSchoolEmployerType(?string $schoolEmployerType): static + public function setId(?string $id): static { - if (is_null($schoolEmployerType)) { - array_push($this->openAPINullablesSetToNull, 'schoolEmployerType'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('schoolEmployerType', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['schoolEmployerType'] = $schoolEmployerType; + $this->container['id'] = $id; return $this; } /** - * Gets establishmentCode + * Gets localAuthorityNumber * * @return string|null */ - public function getEstablishmentCode(): ?string + public function getLocalAuthorityNumber(): ?string { - return $this->container['establishmentCode']; + return $this->container['localAuthorityNumber']; } /** - * Sets establishmentCode + * Sets localAuthorityNumber * - * @param string|null $establishmentCode establishmentCode + * @param string|null $localAuthorityNumber localAuthorityNumber * * @return $this */ - public function setEstablishmentCode(?string $establishmentCode): static + public function setLocalAuthorityNumber(?string $localAuthorityNumber): static { - if (is_null($establishmentCode)) { - array_push($this->openAPINullablesSetToNull, 'establishmentCode'); + if (is_null($localAuthorityNumber)) { + array_push($this->openAPINullablesSetToNull, 'localAuthorityNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('establishmentCode', $nullablesSetToNull); + $index = array_search('localAuthorityNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['establishmentCode'] = $establishmentCode; + $this->container['localAuthorityNumber'] = $localAuthorityNumber; return $this; } /** - * Gets id + * Gets schoolEmployerType * * @return string|null */ - public function getId(): ?string + public function getSchoolEmployerType(): ?string { - return $this->container['id']; + return $this->container['schoolEmployerType']; } /** - * Sets id + * Sets schoolEmployerType * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $schoolEmployerType schoolEmployerType * * @return $this */ - public function setId(?string $id): static + public function setSchoolEmployerType(?string $schoolEmployerType): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($schoolEmployerType)) { + array_push($this->openAPINullablesSetToNull, 'schoolEmployerType'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('schoolEmployerType', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['schoolEmployerType'] = $schoolEmployerType; return $this; } diff --git a/src/Model/EvcSettings.php b/src/Model/EvcSettings.php index c422578..d2f2576 100644 --- a/src/Model/EvcSettings.php +++ b/src/Model/EvcSettings.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class EvcSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'rightToRestrict' => 'bool', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'rightToDelete' => 'bool', - 'subjectAccessRequest' => 'bool', - 'employee' => '\SynergiTech\Staffology\Model\Item' + 'rightToRestrict' => 'bool', + 'subjectAccessRequest' => 'bool' ]; /** @@ -72,10 +72,10 @@ class EvcSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'rightToRestrict' => null, + 'employee' => null, 'rightToDelete' => null, - 'subjectAccessRequest' => null, - 'employee' => null + 'rightToRestrict' => null, + 'subjectAccessRequest' => null ]; /** @@ -84,10 +84,10 @@ class EvcSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'rightToRestrict' => false, + 'employee' => false, 'rightToDelete' => false, - 'subjectAccessRequest' => false, - 'employee' => false + 'rightToRestrict' => false, + 'subjectAccessRequest' => false ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'rightToRestrict' => 'rightToRestrict', + 'employee' => 'employee', 'rightToDelete' => 'rightToDelete', - 'subjectAccessRequest' => 'subjectAccessRequest', - 'employee' => 'employee' + 'rightToRestrict' => 'rightToRestrict', + 'subjectAccessRequest' => 'subjectAccessRequest' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'rightToRestrict' => 'setRightToRestrict', + 'employee' => 'setEmployee', 'rightToDelete' => 'setRightToDelete', - 'subjectAccessRequest' => 'setSubjectAccessRequest', - 'employee' => 'setEmployee' + 'rightToRestrict' => 'setRightToRestrict', + 'subjectAccessRequest' => 'setSubjectAccessRequest' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'rightToRestrict' => 'getRightToRestrict', + 'employee' => 'getEmployee', 'rightToDelete' => 'getRightToDelete', - 'subjectAccessRequest' => 'getSubjectAccessRequest', - 'employee' => 'getEmployee' + 'rightToRestrict' => 'getRightToRestrict', + 'subjectAccessRequest' => 'getSubjectAccessRequest' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('rightToRestrict', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('rightToDelete', $data ?? [], null); + $this->setIfExists('rightToRestrict', $data ?? [], null); $this->setIfExists('subjectAccessRequest', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); } /** @@ -311,28 +311,28 @@ public function valid(): bool /** - * Gets rightToRestrict + * Gets employee * - * @return bool|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getRightToRestrict(): ?bool + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['rightToRestrict']; + return $this->container['employee']; } /** - * Sets rightToRestrict + * Sets employee * - * @param bool|null $rightToRestrict If set to True then this employee shouldn't be included in data sent to EVC + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setRightToRestrict(?bool $rightToRestrict): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($rightToRestrict)) { - throw new InvalidArgumentException('non-nullable rightToRestrict cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['rightToRestrict'] = $rightToRestrict; + $this->container['employee'] = $employee; return $this; } @@ -365,55 +365,55 @@ public function setRightToDelete(?bool $rightToDelete): static } /** - * Gets subjectAccessRequest + * Gets rightToRestrict * * @return bool|null */ - public function getSubjectAccessRequest(): ?bool + public function getRightToRestrict(): ?bool { - return $this->container['subjectAccessRequest']; + return $this->container['rightToRestrict']; } /** - * Sets subjectAccessRequest + * Sets rightToRestrict * - * @param bool|null $subjectAccessRequest If set to True then the EVC service will be informed that the employee has made a Subject Access Request + * @param bool|null $rightToRestrict If set to True then this employee shouldn't be included in data sent to EVC * * @return $this */ - public function setSubjectAccessRequest(?bool $subjectAccessRequest): static + public function setRightToRestrict(?bool $rightToRestrict): static { - if (is_null($subjectAccessRequest)) { - throw new InvalidArgumentException('non-nullable subjectAccessRequest cannot be null'); + if (is_null($rightToRestrict)) { + throw new InvalidArgumentException('non-nullable rightToRestrict cannot be null'); } - $this->container['subjectAccessRequest'] = $subjectAccessRequest; + $this->container['rightToRestrict'] = $rightToRestrict; return $this; } /** - * Gets employee + * Gets subjectAccessRequest * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getSubjectAccessRequest(): ?bool { - return $this->container['employee']; + return $this->container['subjectAccessRequest']; } /** - * Sets employee + * Sets subjectAccessRequest * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param bool|null $subjectAccessRequest If set to True then the EVC service will be informed that the employee has made a Subject Access Request * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setSubjectAccessRequest(?bool $subjectAccessRequest): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($subjectAccessRequest)) { + throw new InvalidArgumentException('non-nullable subjectAccessRequest cannot be null'); } - $this->container['employee'] = $employee; + $this->container['subjectAccessRequest'] = $subjectAccessRequest; return $this; } diff --git a/src/Model/Exb.php b/src/Model/Exb.php index d63d72a..1e7175d 100644 --- a/src/Model/Exb.php +++ b/src/Model/Exb.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -64,17 +64,17 @@ class Exb implements ModelInterface, ArrayAccess, JsonSerializable 'deductionsAmount' => 'float', 'deductionsDescription' => 'string', 'employeeCount' => 'int', - 'totalBenefits' => 'float', - 'totalAdjustedBenefits' => 'float', - 'nicsRate' => 'float', - 'nicsPayable' => 'float', + 'employerReferences' => '\SynergiTech\Staffology\Model\EmpRefs', 'expensesAndBenefits' => '\SynergiTech\Staffology\Model\ExpensesAndBenefits', + 'govTalkSubmission' => '\SynergiTech\Staffology\Model\GovTalkSubmission', 'iRmark' => 'string', - 'xml' => 'string', + 'id' => 'string', + 'nicsPayable' => 'float', + 'nicsRate' => 'float', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'employerReferences' => '\SynergiTech\Staffology\Model\EmpRefs', - 'govTalkSubmission' => '\SynergiTech\Staffology\Model\GovTalkSubmission', - 'id' => 'string' + 'totalAdjustedBenefits' => 'float', + 'totalBenefits' => 'float', + 'xml' => 'string' ]; /** @@ -88,17 +88,17 @@ class Exb implements ModelInterface, ArrayAccess, JsonSerializable 'deductionsAmount' => 'double', 'deductionsDescription' => null, 'employeeCount' => 'int32', - 'totalBenefits' => 'double', - 'totalAdjustedBenefits' => 'double', - 'nicsRate' => 'double', - 'nicsPayable' => 'double', + 'employerReferences' => null, 'expensesAndBenefits' => null, + 'govTalkSubmission' => null, 'iRmark' => null, - 'xml' => null, + 'id' => 'uuid', + 'nicsPayable' => 'double', + 'nicsRate' => 'double', 'taxYear' => null, - 'employerReferences' => null, - 'govTalkSubmission' => null, - 'id' => 'uuid' + 'totalAdjustedBenefits' => 'double', + 'totalBenefits' => 'double', + 'xml' => null ]; /** @@ -112,17 +112,17 @@ class Exb implements ModelInterface, ArrayAccess, JsonSerializable 'deductionsAmount' => false, 'deductionsDescription' => true, 'employeeCount' => false, - 'totalBenefits' => false, - 'totalAdjustedBenefits' => false, - 'nicsRate' => false, - 'nicsPayable' => false, + 'employerReferences' => false, 'expensesAndBenefits' => false, + 'govTalkSubmission' => false, 'iRmark' => true, - 'xml' => true, + 'id' => false, + 'nicsPayable' => false, + 'nicsRate' => false, 'taxYear' => false, - 'employerReferences' => false, - 'govTalkSubmission' => false, - 'id' => false + 'totalAdjustedBenefits' => false, + 'totalBenefits' => false, + 'xml' => true ]; /** @@ -216,17 +216,17 @@ public function isNullableSetToNull(string $property): bool 'deductionsAmount' => 'deductionsAmount', 'deductionsDescription' => 'deductionsDescription', 'employeeCount' => 'employeeCount', - 'totalBenefits' => 'totalBenefits', - 'totalAdjustedBenefits' => 'totalAdjustedBenefits', - 'nicsRate' => 'nicsRate', - 'nicsPayable' => 'nicsPayable', + 'employerReferences' => 'employerReferences', 'expensesAndBenefits' => 'expensesAndBenefits', + 'govTalkSubmission' => 'govTalkSubmission', 'iRmark' => 'iRmark', - 'xml' => 'xml', + 'id' => 'id', + 'nicsPayable' => 'nicsPayable', + 'nicsRate' => 'nicsRate', 'taxYear' => 'taxYear', - 'employerReferences' => 'employerReferences', - 'govTalkSubmission' => 'govTalkSubmission', - 'id' => 'id' + 'totalAdjustedBenefits' => 'totalAdjustedBenefits', + 'totalBenefits' => 'totalBenefits', + 'xml' => 'xml' ]; /** @@ -240,17 +240,17 @@ public function isNullableSetToNull(string $property): bool 'deductionsAmount' => 'setDeductionsAmount', 'deductionsDescription' => 'setDeductionsDescription', 'employeeCount' => 'setEmployeeCount', - 'totalBenefits' => 'setTotalBenefits', - 'totalAdjustedBenefits' => 'setTotalAdjustedBenefits', - 'nicsRate' => 'setNicsRate', - 'nicsPayable' => 'setNicsPayable', + 'employerReferences' => 'setEmployerReferences', 'expensesAndBenefits' => 'setExpensesAndBenefits', + 'govTalkSubmission' => 'setGovTalkSubmission', 'iRmark' => 'setIRmark', - 'xml' => 'setXml', + 'id' => 'setId', + 'nicsPayable' => 'setNicsPayable', + 'nicsRate' => 'setNicsRate', 'taxYear' => 'setTaxYear', - 'employerReferences' => 'setEmployerReferences', - 'govTalkSubmission' => 'setGovTalkSubmission', - 'id' => 'setId' + 'totalAdjustedBenefits' => 'setTotalAdjustedBenefits', + 'totalBenefits' => 'setTotalBenefits', + 'xml' => 'setXml' ]; /** @@ -264,17 +264,17 @@ public function isNullableSetToNull(string $property): bool 'deductionsAmount' => 'getDeductionsAmount', 'deductionsDescription' => 'getDeductionsDescription', 'employeeCount' => 'getEmployeeCount', - 'totalBenefits' => 'getTotalBenefits', - 'totalAdjustedBenefits' => 'getTotalAdjustedBenefits', - 'nicsRate' => 'getNicsRate', - 'nicsPayable' => 'getNicsPayable', + 'employerReferences' => 'getEmployerReferences', 'expensesAndBenefits' => 'getExpensesAndBenefits', + 'govTalkSubmission' => 'getGovTalkSubmission', 'iRmark' => 'getIRmark', - 'xml' => 'getXml', + 'id' => 'getId', + 'nicsPayable' => 'getNicsPayable', + 'nicsRate' => 'getNicsRate', 'taxYear' => 'getTaxYear', - 'employerReferences' => 'getEmployerReferences', - 'govTalkSubmission' => 'getGovTalkSubmission', - 'id' => 'getId' + 'totalAdjustedBenefits' => 'getTotalAdjustedBenefits', + 'totalBenefits' => 'getTotalBenefits', + 'xml' => 'getXml' ]; /** @@ -338,17 +338,17 @@ public function __construct(?array $data = null) $this->setIfExists('deductionsAmount', $data ?? [], null); $this->setIfExists('deductionsDescription', $data ?? [], null); $this->setIfExists('employeeCount', $data ?? [], null); - $this->setIfExists('totalBenefits', $data ?? [], null); - $this->setIfExists('totalAdjustedBenefits', $data ?? [], null); - $this->setIfExists('nicsRate', $data ?? [], null); - $this->setIfExists('nicsPayable', $data ?? [], null); - $this->setIfExists('expensesAndBenefits', $data ?? [], null); - $this->setIfExists('iRmark', $data ?? [], null); - $this->setIfExists('xml', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('employerReferences', $data ?? [], null); + $this->setIfExists('expensesAndBenefits', $data ?? [], null); $this->setIfExists('govTalkSubmission', $data ?? [], null); + $this->setIfExists('iRmark', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('nicsPayable', $data ?? [], null); + $this->setIfExists('nicsRate', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('totalAdjustedBenefits', $data ?? [], null); + $this->setIfExists('totalBenefits', $data ?? [], null); + $this->setIfExists('xml', $data ?? [], null); } /** @@ -559,204 +559,197 @@ public function setEmployeeCount(?int $employeeCount): static } /** - * Gets totalBenefits + * Gets employerReferences * - * @return float|null + * @return \SynergiTech\Staffology\Model\EmpRefs|null */ - public function getTotalBenefits(): ?float + public function getEmployerReferences(): ?\SynergiTech\Staffology\Model\EmpRefs { - return $this->container['totalBenefits']; + return $this->container['employerReferences']; } /** - * Sets totalBenefits + * Sets employerReferences * - * @param float|null $totalBenefits [readonly] Total value of benefits, not including any deductions or additions + * @param \SynergiTech\Staffology\Model\EmpRefs|null $employerReferences employerReferences * * @return $this */ - public function setTotalBenefits(?float $totalBenefits): static + public function setEmployerReferences(?\SynergiTech\Staffology\Model\EmpRefs $employerReferences): static { - if (is_null($totalBenefits)) { - throw new InvalidArgumentException('non-nullable totalBenefits cannot be null'); + if (is_null($employerReferences)) { + throw new InvalidArgumentException('non-nullable employerReferences cannot be null'); } - $this->container['totalBenefits'] = $totalBenefits; + $this->container['employerReferences'] = $employerReferences; return $this; } /** - * Gets totalAdjustedBenefits + * Gets expensesAndBenefits * - * @return float|null + * @return \SynergiTech\Staffology\Model\ExpensesAndBenefits|null */ - public function getTotalAdjustedBenefits(): ?float + public function getExpensesAndBenefits(): ?\SynergiTech\Staffology\Model\ExpensesAndBenefits { - return $this->container['totalAdjustedBenefits']; + return $this->container['expensesAndBenefits']; } /** - * Sets totalAdjustedBenefits + * Sets expensesAndBenefits * - * @param float|null $totalAdjustedBenefits [readonly] Total value of benefits + * @param \SynergiTech\Staffology\Model\ExpensesAndBenefits|null $expensesAndBenefits expensesAndBenefits * * @return $this */ - public function setTotalAdjustedBenefits(?float $totalAdjustedBenefits): static + public function setExpensesAndBenefits(?\SynergiTech\Staffology\Model\ExpensesAndBenefits $expensesAndBenefits): static { - if (is_null($totalAdjustedBenefits)) { - throw new InvalidArgumentException('non-nullable totalAdjustedBenefits cannot be null'); + if (is_null($expensesAndBenefits)) { + throw new InvalidArgumentException('non-nullable expensesAndBenefits cannot be null'); } - $this->container['totalAdjustedBenefits'] = $totalAdjustedBenefits; + $this->container['expensesAndBenefits'] = $expensesAndBenefits; return $this; } /** - * Gets nicsRate + * Gets govTalkSubmission * - * @return float|null + * @return \SynergiTech\Staffology\Model\GovTalkSubmission|null */ - public function getNicsRate(): ?float + public function getGovTalkSubmission(): ?\SynergiTech\Staffology\Model\GovTalkSubmission { - return $this->container['nicsRate']; + return $this->container['govTalkSubmission']; } /** - * Sets nicsRate + * Sets govTalkSubmission * - * @param float|null $nicsRate [readonly] The Class 1A NICS Rate + * @param \SynergiTech\Staffology\Model\GovTalkSubmission|null $govTalkSubmission govTalkSubmission * * @return $this */ - public function setNicsRate(?float $nicsRate): static + public function setGovTalkSubmission(?\SynergiTech\Staffology\Model\GovTalkSubmission $govTalkSubmission): static { - if (is_null($nicsRate)) { - throw new InvalidArgumentException('non-nullable nicsRate cannot be null'); + if (is_null($govTalkSubmission)) { + throw new InvalidArgumentException('non-nullable govTalkSubmission cannot be null'); } - $this->container['nicsRate'] = $nicsRate; + $this->container['govTalkSubmission'] = $govTalkSubmission; return $this; } /** - * Gets nicsPayable + * Gets iRmark * - * @return float|null + * @return string|null */ - public function getNicsPayable(): ?float + public function getIRmark(): ?string { - return $this->container['nicsPayable']; + return $this->container['iRmark']; } /** - * Sets nicsPayable + * Sets iRmark * - * @param float|null $nicsPayable [readonly] NICs Payable + * @param string|null $iRmark iRmark * * @return $this */ - public function setNicsPayable(?float $nicsPayable): static + public function setIRmark(?string $iRmark): static { - if (is_null($nicsPayable)) { - throw new InvalidArgumentException('non-nullable nicsPayable cannot be null'); + if (is_null($iRmark)) { + array_push($this->openAPINullablesSetToNull, 'iRmark'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('iRmark', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['nicsPayable'] = $nicsPayable; + $this->container['iRmark'] = $iRmark; return $this; } /** - * Gets expensesAndBenefits + * Gets id * - * @return \SynergiTech\Staffology\Model\ExpensesAndBenefits|null + * @return string|null */ - public function getExpensesAndBenefits(): ?\SynergiTech\Staffology\Model\ExpensesAndBenefits + public function getId(): ?string { - return $this->container['expensesAndBenefits']; + return $this->container['id']; } /** - * Sets expensesAndBenefits + * Sets id * - * @param \SynergiTech\Staffology\Model\ExpensesAndBenefits|null $expensesAndBenefits expensesAndBenefits + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setExpensesAndBenefits(?\SynergiTech\Staffology\Model\ExpensesAndBenefits $expensesAndBenefits): static + public function setId(?string $id): static { - if (is_null($expensesAndBenefits)) { - throw new InvalidArgumentException('non-nullable expensesAndBenefits cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['expensesAndBenefits'] = $expensesAndBenefits; + $this->container['id'] = $id; return $this; } /** - * Gets iRmark + * Gets nicsPayable * - * @return string|null + * @return float|null */ - public function getIRmark(): ?string + public function getNicsPayable(): ?float { - return $this->container['iRmark']; + return $this->container['nicsPayable']; } /** - * Sets iRmark + * Sets nicsPayable * - * @param string|null $iRmark iRmark + * @param float|null $nicsPayable [readonly] NICs Payable * * @return $this */ - public function setIRmark(?string $iRmark): static + public function setNicsPayable(?float $nicsPayable): static { - if (is_null($iRmark)) { - array_push($this->openAPINullablesSetToNull, 'iRmark'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('iRmark', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($nicsPayable)) { + throw new InvalidArgumentException('non-nullable nicsPayable cannot be null'); } - $this->container['iRmark'] = $iRmark; + $this->container['nicsPayable'] = $nicsPayable; return $this; } /** - * Gets xml + * Gets nicsRate * - * @return string|null + * @return float|null */ - public function getXml(): ?string + public function getNicsRate(): ?float { - return $this->container['xml']; + return $this->container['nicsRate']; } /** - * Sets xml + * Sets nicsRate * - * @param string|null $xml This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. + * @param float|null $nicsRate [readonly] The Class 1A NICS Rate * * @return $this */ - public function setXml(?string $xml): static + public function setNicsRate(?float $nicsRate): static { - if (is_null($xml)) { - array_push($this->openAPINullablesSetToNull, 'xml'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('xml', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($nicsRate)) { + throw new InvalidArgumentException('non-nullable nicsRate cannot be null'); } - $this->container['xml'] = $xml; + $this->container['nicsRate'] = $nicsRate; return $this; } @@ -789,82 +782,89 @@ public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): sta } /** - * Gets employerReferences + * Gets totalAdjustedBenefits * - * @return \SynergiTech\Staffology\Model\EmpRefs|null + * @return float|null */ - public function getEmployerReferences(): ?\SynergiTech\Staffology\Model\EmpRefs + public function getTotalAdjustedBenefits(): ?float { - return $this->container['employerReferences']; + return $this->container['totalAdjustedBenefits']; } /** - * Sets employerReferences + * Sets totalAdjustedBenefits * - * @param \SynergiTech\Staffology\Model\EmpRefs|null $employerReferences employerReferences + * @param float|null $totalAdjustedBenefits [readonly] Total value of benefits * * @return $this */ - public function setEmployerReferences(?\SynergiTech\Staffology\Model\EmpRefs $employerReferences): static + public function setTotalAdjustedBenefits(?float $totalAdjustedBenefits): static { - if (is_null($employerReferences)) { - throw new InvalidArgumentException('non-nullable employerReferences cannot be null'); + if (is_null($totalAdjustedBenefits)) { + throw new InvalidArgumentException('non-nullable totalAdjustedBenefits cannot be null'); } - $this->container['employerReferences'] = $employerReferences; + $this->container['totalAdjustedBenefits'] = $totalAdjustedBenefits; return $this; } /** - * Gets govTalkSubmission + * Gets totalBenefits * - * @return \SynergiTech\Staffology\Model\GovTalkSubmission|null + * @return float|null */ - public function getGovTalkSubmission(): ?\SynergiTech\Staffology\Model\GovTalkSubmission + public function getTotalBenefits(): ?float { - return $this->container['govTalkSubmission']; + return $this->container['totalBenefits']; } /** - * Sets govTalkSubmission + * Sets totalBenefits * - * @param \SynergiTech\Staffology\Model\GovTalkSubmission|null $govTalkSubmission govTalkSubmission + * @param float|null $totalBenefits [readonly] Total value of benefits, not including any deductions or additions * * @return $this */ - public function setGovTalkSubmission(?\SynergiTech\Staffology\Model\GovTalkSubmission $govTalkSubmission): static + public function setTotalBenefits(?float $totalBenefits): static { - if (is_null($govTalkSubmission)) { - throw new InvalidArgumentException('non-nullable govTalkSubmission cannot be null'); + if (is_null($totalBenefits)) { + throw new InvalidArgumentException('non-nullable totalBenefits cannot be null'); } - $this->container['govTalkSubmission'] = $govTalkSubmission; + $this->container['totalBenefits'] = $totalBenefits; return $this; } /** - * Gets id + * Gets xml * * @return string|null */ - public function getId(): ?string + public function getXml(): ?string { - return $this->container['id']; + return $this->container['xml']; } /** - * Sets id + * Sets xml * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $xml This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. * * @return $this */ - public function setId(?string $id): static + public function setXml(?string $xml): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($xml)) { + array_push($this->openAPINullablesSetToNull, 'xml'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('xml', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['xml'] = $xml; return $this; } diff --git a/src/Model/ExbDeclarations.php b/src/Model/ExbDeclarations.php index 6cd85ca..dd4d99a 100644 --- a/src/Model/ExbDeclarations.php +++ b/src/Model/ExbDeclarations.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ExbEmployer.php b/src/Model/ExbEmployer.php index 14ab798..76f82ca 100644 --- a/src/Model/ExbEmployer.php +++ b/src/Model/ExbEmployer.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ExbP11d.php b/src/Model/ExbP11d.php index c58b179..f8a0e91 100644 --- a/src/Model/ExbP11d.php +++ b/src/Model/ExbP11d.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,21 +59,21 @@ class ExbP11d implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'assetsAvail' => '\SynergiTech\Staffology\Model\P11DAssetAvailableCollection', + 'cars' => '\SynergiTech\Staffology\Model\P11DCarCollection', 'employee' => '\SynergiTech\Staffology\Model\ExbP11dEmployee', - 'transferred' => '\SynergiTech\Staffology\Model\P11DAssetTransferredCollection', - 'payments' => '\SynergiTech\Staffology\Model\P11DPaymentCollection', - 'vouchersOrCCs' => '\SynergiTech\Staffology\Model\P11DSingleItem', + 'expPaid' => '\SynergiTech\Staffology\Model\P11dExpenses', 'livingAccom' => '\SynergiTech\Staffology\Model\P11DSingleItem', - 'mileageAllow' => '\SynergiTech\Staffology\Model\P11DSingleItem', - 'cars' => '\SynergiTech\Staffology\Model\P11DCarCollection', - 'vans' => '\SynergiTech\Staffology\Model\P11dVans', 'loans' => '\SynergiTech\Staffology\Model\P11DLoanCollection', 'medical' => '\SynergiTech\Staffology\Model\P11DSingleItem', + 'mileageAllow' => '\SynergiTech\Staffology\Model\P11DSingleItem', + 'other' => '\SynergiTech\Staffology\Model\P11DOther', + 'payments' => '\SynergiTech\Staffology\Model\P11DPaymentCollection', 'relocation' => '\SynergiTech\Staffology\Model\P11DSingleItem', 'services' => '\SynergiTech\Staffology\Model\P11DSingleItem', - 'assetsAvail' => '\SynergiTech\Staffology\Model\P11DAssetAvailableCollection', - 'other' => '\SynergiTech\Staffology\Model\P11DOther', - 'expPaid' => '\SynergiTech\Staffology\Model\P11dExpenses' + 'transferred' => '\SynergiTech\Staffology\Model\P11DAssetTransferredCollection', + 'vans' => '\SynergiTech\Staffology\Model\P11dVans', + 'vouchersOrCCs' => '\SynergiTech\Staffology\Model\P11DSingleItem' ]; /** @@ -82,21 +82,21 @@ class ExbP11d implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'assetsAvail' => null, + 'cars' => null, 'employee' => null, - 'transferred' => null, - 'payments' => null, - 'vouchersOrCCs' => null, + 'expPaid' => null, 'livingAccom' => null, - 'mileageAllow' => null, - 'cars' => null, - 'vans' => null, 'loans' => null, 'medical' => null, + 'mileageAllow' => null, + 'other' => null, + 'payments' => null, 'relocation' => null, 'services' => null, - 'assetsAvail' => null, - 'other' => null, - 'expPaid' => null + 'transferred' => null, + 'vans' => null, + 'vouchersOrCCs' => null ]; /** @@ -105,21 +105,21 @@ class ExbP11d implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'assetsAvail' => false, + 'cars' => false, 'employee' => false, - 'transferred' => false, - 'payments' => false, - 'vouchersOrCCs' => false, + 'expPaid' => false, 'livingAccom' => false, - 'mileageAllow' => false, - 'cars' => false, - 'vans' => false, 'loans' => false, 'medical' => false, + 'mileageAllow' => false, + 'other' => false, + 'payments' => false, 'relocation' => false, 'services' => false, - 'assetsAvail' => false, - 'other' => false, - 'expPaid' => false + 'transferred' => false, + 'vans' => false, + 'vouchersOrCCs' => false ]; /** @@ -208,21 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'assetsAvail' => 'assetsAvail', + 'cars' => 'cars', 'employee' => 'employee', - 'transferred' => 'transferred', - 'payments' => 'payments', - 'vouchersOrCCs' => 'vouchersOrCCs', + 'expPaid' => 'expPaid', 'livingAccom' => 'livingAccom', - 'mileageAllow' => 'mileageAllow', - 'cars' => 'cars', - 'vans' => 'vans', 'loans' => 'loans', 'medical' => 'medical', + 'mileageAllow' => 'mileageAllow', + 'other' => 'other', + 'payments' => 'payments', 'relocation' => 'relocation', 'services' => 'services', - 'assetsAvail' => 'assetsAvail', - 'other' => 'other', - 'expPaid' => 'expPaid' + 'transferred' => 'transferred', + 'vans' => 'vans', + 'vouchersOrCCs' => 'vouchersOrCCs' ]; /** @@ -231,21 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'assetsAvail' => 'setAssetsAvail', + 'cars' => 'setCars', 'employee' => 'setEmployee', - 'transferred' => 'setTransferred', - 'payments' => 'setPayments', - 'vouchersOrCCs' => 'setVouchersOrCCs', + 'expPaid' => 'setExpPaid', 'livingAccom' => 'setLivingAccom', - 'mileageAllow' => 'setMileageAllow', - 'cars' => 'setCars', - 'vans' => 'setVans', 'loans' => 'setLoans', 'medical' => 'setMedical', + 'mileageAllow' => 'setMileageAllow', + 'other' => 'setOther', + 'payments' => 'setPayments', 'relocation' => 'setRelocation', 'services' => 'setServices', - 'assetsAvail' => 'setAssetsAvail', - 'other' => 'setOther', - 'expPaid' => 'setExpPaid' + 'transferred' => 'setTransferred', + 'vans' => 'setVans', + 'vouchersOrCCs' => 'setVouchersOrCCs' ]; /** @@ -254,21 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'assetsAvail' => 'getAssetsAvail', + 'cars' => 'getCars', 'employee' => 'getEmployee', - 'transferred' => 'getTransferred', - 'payments' => 'getPayments', - 'vouchersOrCCs' => 'getVouchersOrCCs', + 'expPaid' => 'getExpPaid', 'livingAccom' => 'getLivingAccom', - 'mileageAllow' => 'getMileageAllow', - 'cars' => 'getCars', - 'vans' => 'getVans', 'loans' => 'getLoans', 'medical' => 'getMedical', + 'mileageAllow' => 'getMileageAllow', + 'other' => 'getOther', + 'payments' => 'getPayments', 'relocation' => 'getRelocation', 'services' => 'getServices', - 'assetsAvail' => 'getAssetsAvail', - 'other' => 'getOther', - 'expPaid' => 'getExpPaid' + 'transferred' => 'getTransferred', + 'vans' => 'getVans', + 'vouchersOrCCs' => 'getVouchersOrCCs' ]; /** @@ -327,21 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('assetsAvail', $data ?? [], null); + $this->setIfExists('cars', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('transferred', $data ?? [], null); - $this->setIfExists('payments', $data ?? [], null); - $this->setIfExists('vouchersOrCCs', $data ?? [], null); + $this->setIfExists('expPaid', $data ?? [], null); $this->setIfExists('livingAccom', $data ?? [], null); - $this->setIfExists('mileageAllow', $data ?? [], null); - $this->setIfExists('cars', $data ?? [], null); - $this->setIfExists('vans', $data ?? [], null); $this->setIfExists('loans', $data ?? [], null); $this->setIfExists('medical', $data ?? [], null); + $this->setIfExists('mileageAllow', $data ?? [], null); + $this->setIfExists('other', $data ?? [], null); + $this->setIfExists('payments', $data ?? [], null); $this->setIfExists('relocation', $data ?? [], null); $this->setIfExists('services', $data ?? [], null); - $this->setIfExists('assetsAvail', $data ?? [], null); - $this->setIfExists('other', $data ?? [], null); - $this->setIfExists('expPaid', $data ?? [], null); + $this->setIfExists('transferred', $data ?? [], null); + $this->setIfExists('vans', $data ?? [], null); + $this->setIfExists('vouchersOrCCs', $data ?? [], null); } /** @@ -387,109 +387,109 @@ public function valid(): bool /** - * Gets employee + * Gets assetsAvail * - * @return \SynergiTech\Staffology\Model\ExbP11dEmployee|null + * @return \SynergiTech\Staffology\Model\P11DAssetAvailableCollection|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\ExbP11dEmployee + public function getAssetsAvail(): ?\SynergiTech\Staffology\Model\P11DAssetAvailableCollection { - return $this->container['employee']; + return $this->container['assetsAvail']; } /** - * Sets employee + * Sets assetsAvail * - * @param \SynergiTech\Staffology\Model\ExbP11dEmployee|null $employee employee + * @param \SynergiTech\Staffology\Model\P11DAssetAvailableCollection|null $assetsAvail assetsAvail * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\ExbP11dEmployee $employee): static + public function setAssetsAvail(?\SynergiTech\Staffology\Model\P11DAssetAvailableCollection $assetsAvail): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($assetsAvail)) { + throw new InvalidArgumentException('non-nullable assetsAvail cannot be null'); } - $this->container['employee'] = $employee; + $this->container['assetsAvail'] = $assetsAvail; return $this; } /** - * Gets transferred + * Gets cars * - * @return \SynergiTech\Staffology\Model\P11DAssetTransferredCollection|null + * @return \SynergiTech\Staffology\Model\P11DCarCollection|null */ - public function getTransferred(): ?\SynergiTech\Staffology\Model\P11DAssetTransferredCollection + public function getCars(): ?\SynergiTech\Staffology\Model\P11DCarCollection { - return $this->container['transferred']; + return $this->container['cars']; } /** - * Sets transferred + * Sets cars * - * @param \SynergiTech\Staffology\Model\P11DAssetTransferredCollection|null $transferred transferred + * @param \SynergiTech\Staffology\Model\P11DCarCollection|null $cars cars * * @return $this */ - public function setTransferred(?\SynergiTech\Staffology\Model\P11DAssetTransferredCollection $transferred): static + public function setCars(?\SynergiTech\Staffology\Model\P11DCarCollection $cars): static { - if (is_null($transferred)) { - throw new InvalidArgumentException('non-nullable transferred cannot be null'); + if (is_null($cars)) { + throw new InvalidArgumentException('non-nullable cars cannot be null'); } - $this->container['transferred'] = $transferred; + $this->container['cars'] = $cars; return $this; } /** - * Gets payments + * Gets employee * - * @return \SynergiTech\Staffology\Model\P11DPaymentCollection|null + * @return \SynergiTech\Staffology\Model\ExbP11dEmployee|null */ - public function getPayments(): ?\SynergiTech\Staffology\Model\P11DPaymentCollection + public function getEmployee(): ?\SynergiTech\Staffology\Model\ExbP11dEmployee { - return $this->container['payments']; + return $this->container['employee']; } /** - * Sets payments + * Sets employee * - * @param \SynergiTech\Staffology\Model\P11DPaymentCollection|null $payments payments + * @param \SynergiTech\Staffology\Model\ExbP11dEmployee|null $employee employee * * @return $this */ - public function setPayments(?\SynergiTech\Staffology\Model\P11DPaymentCollection $payments): static + public function setEmployee(?\SynergiTech\Staffology\Model\ExbP11dEmployee $employee): static { - if (is_null($payments)) { - throw new InvalidArgumentException('non-nullable payments cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['payments'] = $payments; + $this->container['employee'] = $employee; return $this; } /** - * Gets vouchersOrCCs + * Gets expPaid * - * @return \SynergiTech\Staffology\Model\P11DSingleItem|null + * @return \SynergiTech\Staffology\Model\P11dExpenses|null */ - public function getVouchersOrCCs(): ?\SynergiTech\Staffology\Model\P11DSingleItem + public function getExpPaid(): ?\SynergiTech\Staffology\Model\P11dExpenses { - return $this->container['vouchersOrCCs']; + return $this->container['expPaid']; } /** - * Sets vouchersOrCCs + * Sets expPaid * - * @param \SynergiTech\Staffology\Model\P11DSingleItem|null $vouchersOrCCs vouchersOrCCs + * @param \SynergiTech\Staffology\Model\P11dExpenses|null $expPaid expPaid * * @return $this */ - public function setVouchersOrCCs(?\SynergiTech\Staffology\Model\P11DSingleItem $vouchersOrCCs): static + public function setExpPaid(?\SynergiTech\Staffology\Model\P11dExpenses $expPaid): static { - if (is_null($vouchersOrCCs)) { - throw new InvalidArgumentException('non-nullable vouchersOrCCs cannot be null'); + if (is_null($expPaid)) { + throw new InvalidArgumentException('non-nullable expPaid cannot be null'); } - $this->container['vouchersOrCCs'] = $vouchersOrCCs; + $this->container['expPaid'] = $expPaid; return $this; } @@ -522,136 +522,136 @@ public function setLivingAccom(?\SynergiTech\Staffology\Model\P11DSingleItem $li } /** - * Gets mileageAllow + * Gets loans * - * @return \SynergiTech\Staffology\Model\P11DSingleItem|null + * @return \SynergiTech\Staffology\Model\P11DLoanCollection|null */ - public function getMileageAllow(): ?\SynergiTech\Staffology\Model\P11DSingleItem + public function getLoans(): ?\SynergiTech\Staffology\Model\P11DLoanCollection { - return $this->container['mileageAllow']; + return $this->container['loans']; } /** - * Sets mileageAllow + * Sets loans * - * @param \SynergiTech\Staffology\Model\P11DSingleItem|null $mileageAllow mileageAllow + * @param \SynergiTech\Staffology\Model\P11DLoanCollection|null $loans loans * * @return $this */ - public function setMileageAllow(?\SynergiTech\Staffology\Model\P11DSingleItem $mileageAllow): static + public function setLoans(?\SynergiTech\Staffology\Model\P11DLoanCollection $loans): static { - if (is_null($mileageAllow)) { - throw new InvalidArgumentException('non-nullable mileageAllow cannot be null'); + if (is_null($loans)) { + throw new InvalidArgumentException('non-nullable loans cannot be null'); } - $this->container['mileageAllow'] = $mileageAllow; + $this->container['loans'] = $loans; return $this; } /** - * Gets cars + * Gets medical * - * @return \SynergiTech\Staffology\Model\P11DCarCollection|null + * @return \SynergiTech\Staffology\Model\P11DSingleItem|null */ - public function getCars(): ?\SynergiTech\Staffology\Model\P11DCarCollection + public function getMedical(): ?\SynergiTech\Staffology\Model\P11DSingleItem { - return $this->container['cars']; + return $this->container['medical']; } /** - * Sets cars + * Sets medical * - * @param \SynergiTech\Staffology\Model\P11DCarCollection|null $cars cars + * @param \SynergiTech\Staffology\Model\P11DSingleItem|null $medical medical * * @return $this */ - public function setCars(?\SynergiTech\Staffology\Model\P11DCarCollection $cars): static + public function setMedical(?\SynergiTech\Staffology\Model\P11DSingleItem $medical): static { - if (is_null($cars)) { - throw new InvalidArgumentException('non-nullable cars cannot be null'); + if (is_null($medical)) { + throw new InvalidArgumentException('non-nullable medical cannot be null'); } - $this->container['cars'] = $cars; + $this->container['medical'] = $medical; return $this; } /** - * Gets vans + * Gets mileageAllow * - * @return \SynergiTech\Staffology\Model\P11dVans|null + * @return \SynergiTech\Staffology\Model\P11DSingleItem|null */ - public function getVans(): ?\SynergiTech\Staffology\Model\P11dVans + public function getMileageAllow(): ?\SynergiTech\Staffology\Model\P11DSingleItem { - return $this->container['vans']; + return $this->container['mileageAllow']; } /** - * Sets vans + * Sets mileageAllow * - * @param \SynergiTech\Staffology\Model\P11dVans|null $vans vans + * @param \SynergiTech\Staffology\Model\P11DSingleItem|null $mileageAllow mileageAllow * * @return $this */ - public function setVans(?\SynergiTech\Staffology\Model\P11dVans $vans): static + public function setMileageAllow(?\SynergiTech\Staffology\Model\P11DSingleItem $mileageAllow): static { - if (is_null($vans)) { - throw new InvalidArgumentException('non-nullable vans cannot be null'); + if (is_null($mileageAllow)) { + throw new InvalidArgumentException('non-nullable mileageAllow cannot be null'); } - $this->container['vans'] = $vans; + $this->container['mileageAllow'] = $mileageAllow; return $this; } /** - * Gets loans + * Gets other * - * @return \SynergiTech\Staffology\Model\P11DLoanCollection|null + * @return \SynergiTech\Staffology\Model\P11DOther|null */ - public function getLoans(): ?\SynergiTech\Staffology\Model\P11DLoanCollection + public function getOther(): ?\SynergiTech\Staffology\Model\P11DOther { - return $this->container['loans']; + return $this->container['other']; } /** - * Sets loans + * Sets other * - * @param \SynergiTech\Staffology\Model\P11DLoanCollection|null $loans loans + * @param \SynergiTech\Staffology\Model\P11DOther|null $other other * * @return $this */ - public function setLoans(?\SynergiTech\Staffology\Model\P11DLoanCollection $loans): static + public function setOther(?\SynergiTech\Staffology\Model\P11DOther $other): static { - if (is_null($loans)) { - throw new InvalidArgumentException('non-nullable loans cannot be null'); + if (is_null($other)) { + throw new InvalidArgumentException('non-nullable other cannot be null'); } - $this->container['loans'] = $loans; + $this->container['other'] = $other; return $this; } /** - * Gets medical + * Gets payments * - * @return \SynergiTech\Staffology\Model\P11DSingleItem|null + * @return \SynergiTech\Staffology\Model\P11DPaymentCollection|null */ - public function getMedical(): ?\SynergiTech\Staffology\Model\P11DSingleItem + public function getPayments(): ?\SynergiTech\Staffology\Model\P11DPaymentCollection { - return $this->container['medical']; + return $this->container['payments']; } /** - * Sets medical + * Sets payments * - * @param \SynergiTech\Staffology\Model\P11DSingleItem|null $medical medical + * @param \SynergiTech\Staffology\Model\P11DPaymentCollection|null $payments payments * * @return $this */ - public function setMedical(?\SynergiTech\Staffology\Model\P11DSingleItem $medical): static + public function setPayments(?\SynergiTech\Staffology\Model\P11DPaymentCollection $payments): static { - if (is_null($medical)) { - throw new InvalidArgumentException('non-nullable medical cannot be null'); + if (is_null($payments)) { + throw new InvalidArgumentException('non-nullable payments cannot be null'); } - $this->container['medical'] = $medical; + $this->container['payments'] = $payments; return $this; } @@ -711,82 +711,82 @@ public function setServices(?\SynergiTech\Staffology\Model\P11DSingleItem $servi } /** - * Gets assetsAvail + * Gets transferred * - * @return \SynergiTech\Staffology\Model\P11DAssetAvailableCollection|null + * @return \SynergiTech\Staffology\Model\P11DAssetTransferredCollection|null */ - public function getAssetsAvail(): ?\SynergiTech\Staffology\Model\P11DAssetAvailableCollection + public function getTransferred(): ?\SynergiTech\Staffology\Model\P11DAssetTransferredCollection { - return $this->container['assetsAvail']; + return $this->container['transferred']; } /** - * Sets assetsAvail + * Sets transferred * - * @param \SynergiTech\Staffology\Model\P11DAssetAvailableCollection|null $assetsAvail assetsAvail + * @param \SynergiTech\Staffology\Model\P11DAssetTransferredCollection|null $transferred transferred * * @return $this */ - public function setAssetsAvail(?\SynergiTech\Staffology\Model\P11DAssetAvailableCollection $assetsAvail): static + public function setTransferred(?\SynergiTech\Staffology\Model\P11DAssetTransferredCollection $transferred): static { - if (is_null($assetsAvail)) { - throw new InvalidArgumentException('non-nullable assetsAvail cannot be null'); + if (is_null($transferred)) { + throw new InvalidArgumentException('non-nullable transferred cannot be null'); } - $this->container['assetsAvail'] = $assetsAvail; + $this->container['transferred'] = $transferred; return $this; } /** - * Gets other + * Gets vans * - * @return \SynergiTech\Staffology\Model\P11DOther|null + * @return \SynergiTech\Staffology\Model\P11dVans|null */ - public function getOther(): ?\SynergiTech\Staffology\Model\P11DOther + public function getVans(): ?\SynergiTech\Staffology\Model\P11dVans { - return $this->container['other']; + return $this->container['vans']; } /** - * Sets other + * Sets vans * - * @param \SynergiTech\Staffology\Model\P11DOther|null $other other + * @param \SynergiTech\Staffology\Model\P11dVans|null $vans vans * * @return $this */ - public function setOther(?\SynergiTech\Staffology\Model\P11DOther $other): static + public function setVans(?\SynergiTech\Staffology\Model\P11dVans $vans): static { - if (is_null($other)) { - throw new InvalidArgumentException('non-nullable other cannot be null'); + if (is_null($vans)) { + throw new InvalidArgumentException('non-nullable vans cannot be null'); } - $this->container['other'] = $other; + $this->container['vans'] = $vans; return $this; } /** - * Gets expPaid + * Gets vouchersOrCCs * - * @return \SynergiTech\Staffology\Model\P11dExpenses|null + * @return \SynergiTech\Staffology\Model\P11DSingleItem|null */ - public function getExpPaid(): ?\SynergiTech\Staffology\Model\P11dExpenses + public function getVouchersOrCCs(): ?\SynergiTech\Staffology\Model\P11DSingleItem { - return $this->container['expPaid']; + return $this->container['vouchersOrCCs']; } /** - * Sets expPaid + * Sets vouchersOrCCs * - * @param \SynergiTech\Staffology\Model\P11dExpenses|null $expPaid expPaid + * @param \SynergiTech\Staffology\Model\P11DSingleItem|null $vouchersOrCCs vouchersOrCCs * * @return $this */ - public function setExpPaid(?\SynergiTech\Staffology\Model\P11dExpenses $expPaid): static + public function setVouchersOrCCs(?\SynergiTech\Staffology\Model\P11DSingleItem $vouchersOrCCs): static { - if (is_null($expPaid)) { - throw new InvalidArgumentException('non-nullable expPaid cannot be null'); + if (is_null($vouchersOrCCs)) { + throw new InvalidArgumentException('non-nullable vouchersOrCCs cannot be null'); } - $this->container['expPaid'] = $expPaid; + $this->container['vouchersOrCCs'] = $vouchersOrCCs; return $this; } diff --git a/src/Model/ExbP11dEmployee.php b/src/Model/ExbP11dEmployee.php index b3d66ad..2bf32e9 100644 --- a/src/Model/ExbP11dEmployee.php +++ b/src/Model/ExbP11dEmployee.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class ExbP11dEmployee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'employeeUniqueId' => 'string', + 'birthDate' => 'string', 'dirInd' => 'string', + 'employeeUniqueId' => 'string', + 'gender' => 'string', 'name' => '\SynergiTech\Staffology\Model\RtiEmployeeName', - 'wksNo' => 'string', 'nino' => 'string', - 'birthDate' => 'string', - 'gender' => 'string' + 'wksNo' => 'string' ]; /** @@ -74,13 +74,13 @@ class ExbP11dEmployee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'employeeUniqueId' => 'uuid', + 'birthDate' => null, 'dirInd' => null, + 'employeeUniqueId' => 'uuid', + 'gender' => null, 'name' => null, - 'wksNo' => null, 'nino' => null, - 'birthDate' => null, - 'gender' => null + 'wksNo' => null ]; /** @@ -89,13 +89,13 @@ class ExbP11dEmployee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'employeeUniqueId' => false, + 'birthDate' => true, 'dirInd' => true, + 'employeeUniqueId' => false, + 'gender' => true, 'name' => false, - 'wksNo' => true, 'nino' => true, - 'birthDate' => true, - 'gender' => true + 'wksNo' => true ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employeeUniqueId' => 'employeeUniqueId', + 'birthDate' => 'birthDate', 'dirInd' => 'dirInd', + 'employeeUniqueId' => 'employeeUniqueId', + 'gender' => 'gender', 'name' => 'name', - 'wksNo' => 'wksNo', 'nino' => 'nino', - 'birthDate' => 'birthDate', - 'gender' => 'gender' + 'wksNo' => 'wksNo' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employeeUniqueId' => 'setEmployeeUniqueId', + 'birthDate' => 'setBirthDate', 'dirInd' => 'setDirInd', + 'employeeUniqueId' => 'setEmployeeUniqueId', + 'gender' => 'setGender', 'name' => 'setName', - 'wksNo' => 'setWksNo', 'nino' => 'setNino', - 'birthDate' => 'setBirthDate', - 'gender' => 'setGender' + 'wksNo' => 'setWksNo' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employeeUniqueId' => 'getEmployeeUniqueId', + 'birthDate' => 'getBirthDate', 'dirInd' => 'getDirInd', + 'employeeUniqueId' => 'getEmployeeUniqueId', + 'gender' => 'getGender', 'name' => 'getName', - 'wksNo' => 'getWksNo', 'nino' => 'getNino', - 'birthDate' => 'getBirthDate', - 'gender' => 'getGender' + 'wksNo' => 'getWksNo' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employeeUniqueId', $data ?? [], null); + $this->setIfExists('birthDate', $data ?? [], null); $this->setIfExists('dirInd', $data ?? [], null); + $this->setIfExists('employeeUniqueId', $data ?? [], null); + $this->setIfExists('gender', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('wksNo', $data ?? [], null); $this->setIfExists('nino', $data ?? [], null); - $this->setIfExists('birthDate', $data ?? [], null); - $this->setIfExists('gender', $data ?? [], null); + $this->setIfExists('wksNo', $data ?? [], null); } /** @@ -331,28 +331,35 @@ public function valid(): bool /** - * Gets employeeUniqueId + * Gets birthDate * * @return string|null */ - public function getEmployeeUniqueId(): ?string + public function getBirthDate(): ?string { - return $this->container['employeeUniqueId']; + return $this->container['birthDate']; } /** - * Sets employeeUniqueId + * Sets birthDate * - * @param string|null $employeeUniqueId employeeUniqueId + * @param string|null $birthDate birthDate * * @return $this */ - public function setEmployeeUniqueId(?string $employeeUniqueId): static + public function setBirthDate(?string $birthDate): static { - if (is_null($employeeUniqueId)) { - throw new InvalidArgumentException('non-nullable employeeUniqueId cannot be null'); + if (is_null($birthDate)) { + array_push($this->openAPINullablesSetToNull, 'birthDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('birthDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeeUniqueId'] = $employeeUniqueId; + $this->container['birthDate'] = $birthDate; return $this; } @@ -392,164 +399,157 @@ public function setDirInd(?string $dirInd): static } /** - * Gets name + * Gets employeeUniqueId * - * @return \SynergiTech\Staffology\Model\RtiEmployeeName|null + * @return string|null */ - public function getName(): ?\SynergiTech\Staffology\Model\RtiEmployeeName + public function getEmployeeUniqueId(): ?string { - return $this->container['name']; + return $this->container['employeeUniqueId']; } /** - * Sets name + * Sets employeeUniqueId * - * @param \SynergiTech\Staffology\Model\RtiEmployeeName|null $name name + * @param string|null $employeeUniqueId employeeUniqueId * * @return $this */ - public function setName(?\SynergiTech\Staffology\Model\RtiEmployeeName $name): static + public function setEmployeeUniqueId(?string $employeeUniqueId): static { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($employeeUniqueId)) { + throw new InvalidArgumentException('non-nullable employeeUniqueId cannot be null'); } - $this->container['name'] = $name; + $this->container['employeeUniqueId'] = $employeeUniqueId; return $this; } /** - * Gets wksNo + * Gets gender * * @return string|null */ - public function getWksNo(): ?string + public function getGender(): ?string { - return $this->container['wksNo']; + return $this->container['gender']; } /** - * Sets wksNo + * Sets gender * - * @param string|null $wksNo wksNo + * @param string|null $gender gender * * @return $this */ - public function setWksNo(?string $wksNo): static + public function setGender(?string $gender): static { - if (is_null($wksNo)) { - array_push($this->openAPINullablesSetToNull, 'wksNo'); + if (is_null($gender)) { + array_push($this->openAPINullablesSetToNull, 'gender'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('wksNo', $nullablesSetToNull); + $index = array_search('gender', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['wksNo'] = $wksNo; + $this->container['gender'] = $gender; return $this; } /** - * Gets nino + * Gets name * - * @return string|null + * @return \SynergiTech\Staffology\Model\RtiEmployeeName|null */ - public function getNino(): ?string + public function getName(): ?\SynergiTech\Staffology\Model\RtiEmployeeName { - return $this->container['nino']; + return $this->container['name']; } /** - * Sets nino + * Sets name * - * @param string|null $nino nino + * @param \SynergiTech\Staffology\Model\RtiEmployeeName|null $name name * * @return $this */ - public function setNino(?string $nino): static + public function setName(?\SynergiTech\Staffology\Model\RtiEmployeeName $name): static { - if (is_null($nino)) { - array_push($this->openAPINullablesSetToNull, 'nino'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nino', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['nino'] = $nino; + $this->container['name'] = $name; return $this; } /** - * Gets birthDate + * Gets nino * * @return string|null */ - public function getBirthDate(): ?string + public function getNino(): ?string { - return $this->container['birthDate']; + return $this->container['nino']; } /** - * Sets birthDate + * Sets nino * - * @param string|null $birthDate birthDate + * @param string|null $nino nino * * @return $this */ - public function setBirthDate(?string $birthDate): static + public function setNino(?string $nino): static { - if (is_null($birthDate)) { - array_push($this->openAPINullablesSetToNull, 'birthDate'); + if (is_null($nino)) { + array_push($this->openAPINullablesSetToNull, 'nino'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('birthDate', $nullablesSetToNull); + $index = array_search('nino', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['birthDate'] = $birthDate; + $this->container['nino'] = $nino; return $this; } /** - * Gets gender + * Gets wksNo * * @return string|null */ - public function getGender(): ?string + public function getWksNo(): ?string { - return $this->container['gender']; + return $this->container['wksNo']; } /** - * Sets gender + * Sets wksNo * - * @param string|null $gender gender + * @param string|null $wksNo wksNo * * @return $this */ - public function setGender(?string $gender): static + public function setWksNo(?string $wksNo): static { - if (is_null($gender)) { - array_push($this->openAPINullablesSetToNull, 'gender'); + if (is_null($wksNo)) { + array_push($this->openAPINullablesSetToNull, 'wksNo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('gender', $nullablesSetToNull); + $index = array_search('wksNo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['gender'] = $gender; + $this->container['wksNo'] = $wksNo; return $this; } diff --git a/src/Model/ExbP11db.php b/src/Model/ExbP11db.php index d83cb41..41aee1d 100644 --- a/src/Model/ExbP11db.php +++ b/src/Model/ExbP11db.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ExbP11dbClass1A.php b/src/Model/ExbP11dbClass1A.php index 04917af..c3e4764 100644 --- a/src/Model/ExbP11dbClass1A.php +++ b/src/Model/ExbP11dbClass1A.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class ExbP11dbClass1A implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'niCsRate' => 'string', - 'totalBenefit' => '\SynergiTech\Staffology\Model\ExbP11dbClass1ATotalBenefit', 'adjustments' => '\SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustments', - 'niCpayable' => 'string' + 'niCpayable' => 'string', + 'niCsRate' => 'string', + 'totalBenefit' => '\SynergiTech\Staffology\Model\ExbP11dbClass1ATotalBenefit' ]; /** @@ -71,10 +71,10 @@ class ExbP11dbClass1A implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'niCsRate' => null, - 'totalBenefit' => null, 'adjustments' => null, - 'niCpayable' => null + 'niCpayable' => null, + 'niCsRate' => null, + 'totalBenefit' => null ]; /** @@ -83,10 +83,10 @@ class ExbP11dbClass1A implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'niCsRate' => true, - 'totalBenefit' => false, 'adjustments' => false, - 'niCpayable' => true + 'niCpayable' => true, + 'niCsRate' => true, + 'totalBenefit' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'niCsRate' => 'niCsRate', - 'totalBenefit' => 'totalBenefit', 'adjustments' => 'adjustments', - 'niCpayable' => 'niCpayable' + 'niCpayable' => 'niCpayable', + 'niCsRate' => 'niCsRate', + 'totalBenefit' => 'totalBenefit' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'niCsRate' => 'setNiCsRate', - 'totalBenefit' => 'setTotalBenefit', 'adjustments' => 'setAdjustments', - 'niCpayable' => 'setNiCpayable' + 'niCpayable' => 'setNiCpayable', + 'niCsRate' => 'setNiCsRate', + 'totalBenefit' => 'setTotalBenefit' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'niCsRate' => 'getNiCsRate', - 'totalBenefit' => 'getTotalBenefit', 'adjustments' => 'getAdjustments', - 'niCpayable' => 'getNiCpayable' + 'niCpayable' => 'getNiCpayable', + 'niCsRate' => 'getNiCsRate', + 'totalBenefit' => 'getTotalBenefit' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('niCsRate', $data ?? [], null); - $this->setIfExists('totalBenefit', $data ?? [], null); $this->setIfExists('adjustments', $data ?? [], null); $this->setIfExists('niCpayable', $data ?? [], null); + $this->setIfExists('niCsRate', $data ?? [], null); + $this->setIfExists('totalBenefit', $data ?? [], null); } /** @@ -310,123 +310,123 @@ public function valid(): bool /** - * Gets niCsRate + * Gets adjustments * - * @return string|null + * @return \SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustments|null */ - public function getNiCsRate(): ?string + public function getAdjustments(): ?\SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustments { - return $this->container['niCsRate']; + return $this->container['adjustments']; } /** - * Sets niCsRate + * Sets adjustments * - * @param string|null $niCsRate niCsRate + * @param \SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustments|null $adjustments adjustments * * @return $this */ - public function setNiCsRate(?string $niCsRate): static + public function setAdjustments(?\SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustments $adjustments): static { - if (is_null($niCsRate)) { - array_push($this->openAPINullablesSetToNull, 'niCsRate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niCsRate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($adjustments)) { + throw new InvalidArgumentException('non-nullable adjustments cannot be null'); } - $this->container['niCsRate'] = $niCsRate; + $this->container['adjustments'] = $adjustments; return $this; } /** - * Gets totalBenefit + * Gets niCpayable * - * @return \SynergiTech\Staffology\Model\ExbP11dbClass1ATotalBenefit|null + * @return string|null */ - public function getTotalBenefit(): ?\SynergiTech\Staffology\Model\ExbP11dbClass1ATotalBenefit + public function getNiCpayable(): ?string { - return $this->container['totalBenefit']; + return $this->container['niCpayable']; } /** - * Sets totalBenefit + * Sets niCpayable * - * @param \SynergiTech\Staffology\Model\ExbP11dbClass1ATotalBenefit|null $totalBenefit totalBenefit + * @param string|null $niCpayable niCpayable * * @return $this */ - public function setTotalBenefit(?\SynergiTech\Staffology\Model\ExbP11dbClass1ATotalBenefit $totalBenefit): static + public function setNiCpayable(?string $niCpayable): static { - if (is_null($totalBenefit)) { - throw new InvalidArgumentException('non-nullable totalBenefit cannot be null'); + if (is_null($niCpayable)) { + array_push($this->openAPINullablesSetToNull, 'niCpayable'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('niCpayable', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['totalBenefit'] = $totalBenefit; + $this->container['niCpayable'] = $niCpayable; return $this; } /** - * Gets adjustments + * Gets niCsRate * - * @return \SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustments|null + * @return string|null */ - public function getAdjustments(): ?\SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustments + public function getNiCsRate(): ?string { - return $this->container['adjustments']; + return $this->container['niCsRate']; } /** - * Sets adjustments + * Sets niCsRate * - * @param \SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustments|null $adjustments adjustments + * @param string|null $niCsRate niCsRate * * @return $this */ - public function setAdjustments(?\SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustments $adjustments): static + public function setNiCsRate(?string $niCsRate): static { - if (is_null($adjustments)) { - throw new InvalidArgumentException('non-nullable adjustments cannot be null'); + if (is_null($niCsRate)) { + array_push($this->openAPINullablesSetToNull, 'niCsRate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('niCsRate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['adjustments'] = $adjustments; + $this->container['niCsRate'] = $niCsRate; return $this; } /** - * Gets niCpayable + * Gets totalBenefit * - * @return string|null + * @return \SynergiTech\Staffology\Model\ExbP11dbClass1ATotalBenefit|null */ - public function getNiCpayable(): ?string + public function getTotalBenefit(): ?\SynergiTech\Staffology\Model\ExbP11dbClass1ATotalBenefit { - return $this->container['niCpayable']; + return $this->container['totalBenefit']; } /** - * Sets niCpayable + * Sets totalBenefit * - * @param string|null $niCpayable niCpayable + * @param \SynergiTech\Staffology\Model\ExbP11dbClass1ATotalBenefit|null $totalBenefit totalBenefit * * @return $this */ - public function setNiCpayable(?string $niCpayable): static + public function setTotalBenefit(?\SynergiTech\Staffology\Model\ExbP11dbClass1ATotalBenefit $totalBenefit): static { - if (is_null($niCpayable)) { - array_push($this->openAPINullablesSetToNull, 'niCpayable'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niCpayable', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($totalBenefit)) { + throw new InvalidArgumentException('non-nullable totalBenefit cannot be null'); } - $this->container['niCpayable'] = $niCpayable; + $this->container['totalBenefit'] = $totalBenefit; return $this; } diff --git a/src/Model/ExbP11dbClass1AAdjustment.php b/src/Model/ExbP11dbClass1AAdjustment.php index 894e445..fe02362 100644 --- a/src/Model/ExbP11dbClass1AAdjustment.php +++ b/src/Model/ExbP11dbClass1AAdjustment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class ExbP11dbClass1AAdjustment implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPITypes = [ - 'description' => 'string', - 'adjustment' => 'string' + 'adjustment' => 'string', + 'description' => 'string' ]; /** @@ -69,8 +69,8 @@ class ExbP11dbClass1AAdjustment implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPIFormats = [ - 'description' => null, - 'adjustment' => null + 'adjustment' => null, + 'description' => null ]; /** @@ -79,8 +79,8 @@ class ExbP11dbClass1AAdjustment implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPINullables = [ - 'description' => true, - 'adjustment' => true + 'adjustment' => true, + 'description' => true ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'description' => 'description', - 'adjustment' => 'adjustment' + 'adjustment' => 'adjustment', + 'description' => 'description' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'description' => 'setDescription', - 'adjustment' => 'setAdjustment' + 'adjustment' => 'setAdjustment', + 'description' => 'setDescription' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'description' => 'getDescription', - 'adjustment' => 'getAdjustment' + 'adjustment' => 'getAdjustment', + 'description' => 'getDescription' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('description', $data ?? [], null); $this->setIfExists('adjustment', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); } /** @@ -296,69 +296,69 @@ public function valid(): bool /** - * Gets description + * Gets adjustment * * @return string|null */ - public function getDescription(): ?string + public function getAdjustment(): ?string { - return $this->container['description']; + return $this->container['adjustment']; } /** - * Sets description + * Sets adjustment * - * @param string|null $description description + * @param string|null $adjustment adjustment * * @return $this */ - public function setDescription(?string $description): static + public function setAdjustment(?string $adjustment): static { - if (is_null($description)) { - array_push($this->openAPINullablesSetToNull, 'description'); + if (is_null($adjustment)) { + array_push($this->openAPINullablesSetToNull, 'adjustment'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('description', $nullablesSetToNull); + $index = array_search('adjustment', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['description'] = $description; + $this->container['adjustment'] = $adjustment; return $this; } /** - * Gets adjustment + * Gets description * * @return string|null */ - public function getAdjustment(): ?string + public function getDescription(): ?string { - return $this->container['adjustment']; + return $this->container['description']; } /** - * Sets adjustment + * Sets description * - * @param string|null $adjustment adjustment + * @param string|null $description description * * @return $this */ - public function setAdjustment(?string $adjustment): static + public function setDescription(?string $description): static { - if (is_null($adjustment)) { - array_push($this->openAPINullablesSetToNull, 'adjustment'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('adjustment', $nullablesSetToNull); + $index = array_search('description', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['adjustment'] = $adjustment; + $this->container['description'] = $description; return $this; } diff --git a/src/Model/ExbP11dbClass1AAdjustments.php b/src/Model/ExbP11dbClass1AAdjustments.php index a957fba..5c1531f 100644 --- a/src/Model/ExbP11dbClass1AAdjustments.php +++ b/src/Model/ExbP11dbClass1AAdjustments.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class ExbP11dbClass1AAdjustments implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'totalBenefit' => 'string', 'amountDue' => '\SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustment', 'amountNotDue' => '\SynergiTech\Staffology\Model\ExbP11dbClass1AAdjustment', + 'payable' => 'string', 'total' => 'string', - 'payable' => 'string' + 'totalBenefit' => 'string' ]; /** @@ -72,11 +72,11 @@ class ExbP11dbClass1AAdjustments implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'totalBenefit' => null, 'amountDue' => null, 'amountNotDue' => null, + 'payable' => null, 'total' => null, - 'payable' => null + 'totalBenefit' => null ]; /** @@ -85,11 +85,11 @@ class ExbP11dbClass1AAdjustments implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'totalBenefit' => true, 'amountDue' => false, 'amountNotDue' => false, + 'payable' => true, 'total' => true, - 'payable' => true + 'totalBenefit' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'totalBenefit' => 'totalBenefit', 'amountDue' => 'amountDue', 'amountNotDue' => 'amountNotDue', + 'payable' => 'payable', 'total' => 'total', - 'payable' => 'payable' + 'totalBenefit' => 'totalBenefit' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'totalBenefit' => 'setTotalBenefit', 'amountDue' => 'setAmountDue', 'amountNotDue' => 'setAmountNotDue', + 'payable' => 'setPayable', 'total' => 'setTotal', - 'payable' => 'setPayable' + 'totalBenefit' => 'setTotalBenefit' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'totalBenefit' => 'getTotalBenefit', 'amountDue' => 'getAmountDue', 'amountNotDue' => 'getAmountNotDue', + 'payable' => 'getPayable', 'total' => 'getTotal', - 'payable' => 'getPayable' + 'totalBenefit' => 'getTotalBenefit' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('totalBenefit', $data ?? [], null); $this->setIfExists('amountDue', $data ?? [], null); $this->setIfExists('amountNotDue', $data ?? [], null); - $this->setIfExists('total', $data ?? [], null); $this->setIfExists('payable', $data ?? [], null); + $this->setIfExists('total', $data ?? [], null); + $this->setIfExists('totalBenefit', $data ?? [], null); } /** @@ -316,40 +316,6 @@ public function valid(): bool } - /** - * Gets totalBenefit - * - * @return string|null - */ - public function getTotalBenefit(): ?string - { - return $this->container['totalBenefit']; - } - - /** - * Sets totalBenefit - * - * @param string|null $totalBenefit totalBenefit - * - * @return $this - */ - public function setTotalBenefit(?string $totalBenefit): static - { - if (is_null($totalBenefit)) { - array_push($this->openAPINullablesSetToNull, 'totalBenefit'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalBenefit', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['totalBenefit'] = $totalBenefit; - - return $this; - } - /** * Gets amountDue * @@ -404,6 +370,40 @@ public function setAmountNotDue(?\SynergiTech\Staffology\Model\ExbP11dbClass1AAd return $this; } + /** + * Gets payable + * + * @return string|null + */ + public function getPayable(): ?string + { + return $this->container['payable']; + } + + /** + * Sets payable + * + * @param string|null $payable payable + * + * @return $this + */ + public function setPayable(?string $payable): static + { + if (is_null($payable)) { + array_push($this->openAPINullablesSetToNull, 'payable'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payable', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payable'] = $payable; + + return $this; + } + /** * Gets total * @@ -439,35 +439,35 @@ public function setTotal(?string $total): static } /** - * Gets payable + * Gets totalBenefit * * @return string|null */ - public function getPayable(): ?string + public function getTotalBenefit(): ?string { - return $this->container['payable']; + return $this->container['totalBenefit']; } /** - * Sets payable + * Sets totalBenefit * - * @param string|null $payable payable + * @param string|null $totalBenefit totalBenefit * * @return $this */ - public function setPayable(?string $payable): static + public function setTotalBenefit(?string $totalBenefit): static { - if (is_null($payable)) { - array_push($this->openAPINullablesSetToNull, 'payable'); + if (is_null($totalBenefit)) { + array_push($this->openAPINullablesSetToNull, 'totalBenefit'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payable', $nullablesSetToNull); + $index = array_search('totalBenefit', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payable'] = $payable; + $this->container['totalBenefit'] = $totalBenefit; return $this; } diff --git a/src/Model/ExbP11dbClass1ATotalBenefit.php b/src/Model/ExbP11dbClass1ATotalBenefit.php index eb52556..dea66f5 100644 --- a/src/Model/ExbP11dbClass1ATotalBenefit.php +++ b/src/Model/ExbP11dbClass1ATotalBenefit.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ExbReportResponse.php b/src/Model/ExbReportResponse.php index 7b4ca35..db34a33 100644 --- a/src/Model/ExbReportResponse.php +++ b/src/Model/ExbReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class ExbReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\Exb', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class ExbReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class ExbReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ExpensesAndBenefits.php b/src/Model/ExpensesAndBenefits.php index 65dea6e..b373d4f 100644 --- a/src/Model/ExpensesAndBenefits.php +++ b/src/Model/ExpensesAndBenefits.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class ExpensesAndBenefits implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ - 'employer' => '\SynergiTech\Staffology\Model\ExbEmployer', 'declarations' => '\SynergiTech\Staffology\Model\ExbDeclarations', + 'employer' => '\SynergiTech\Staffology\Model\ExbEmployer', + 'p11D' => '\SynergiTech\Staffology\Model\ExbP11d[]', 'p11Db' => '\SynergiTech\Staffology\Model\ExbP11db', 'p11DrecordCount' => 'int', 'p46CarRecordCount' => 'int', - 'p11D' => '\SynergiTech\Staffology\Model\ExbP11d[]', 'relatedTaxYear' => 'string' ]; @@ -74,12 +74,12 @@ class ExpensesAndBenefits implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPIFormats = [ - 'employer' => null, 'declarations' => null, + 'employer' => null, + 'p11D' => null, 'p11Db' => null, 'p11DrecordCount' => 'int32', 'p46CarRecordCount' => 'int32', - 'p11D' => null, 'relatedTaxYear' => null ]; @@ -89,12 +89,12 @@ class ExpensesAndBenefits implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPINullables = [ - 'employer' => false, 'declarations' => false, + 'employer' => false, + 'p11D' => true, 'p11Db' => false, 'p11DrecordCount' => false, 'p46CarRecordCount' => false, - 'p11D' => true, 'relatedTaxYear' => true ]; @@ -184,12 +184,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employer' => 'employer', 'declarations' => 'declarations', + 'employer' => 'employer', + 'p11D' => 'p11D', 'p11Db' => 'p11Db', 'p11DrecordCount' => 'p11DrecordCount', 'p46CarRecordCount' => 'p46CarRecordCount', - 'p11D' => 'p11D', 'relatedTaxYear' => 'relatedTaxYear' ]; @@ -199,12 +199,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employer' => 'setEmployer', 'declarations' => 'setDeclarations', + 'employer' => 'setEmployer', + 'p11D' => 'setP11D', 'p11Db' => 'setP11Db', 'p11DrecordCount' => 'setP11DrecordCount', 'p46CarRecordCount' => 'setP46CarRecordCount', - 'p11D' => 'setP11D', 'relatedTaxYear' => 'setRelatedTaxYear' ]; @@ -214,12 +214,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employer' => 'getEmployer', 'declarations' => 'getDeclarations', + 'employer' => 'getEmployer', + 'p11D' => 'getP11D', 'p11Db' => 'getP11Db', 'p11DrecordCount' => 'getP11DrecordCount', 'p46CarRecordCount' => 'getP46CarRecordCount', - 'p11D' => 'getP11D', 'relatedTaxYear' => 'getRelatedTaxYear' ]; @@ -279,12 +279,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employer', $data ?? [], null); $this->setIfExists('declarations', $data ?? [], null); + $this->setIfExists('employer', $data ?? [], null); + $this->setIfExists('p11D', $data ?? [], null); $this->setIfExists('p11Db', $data ?? [], null); $this->setIfExists('p11DrecordCount', $data ?? [], null); $this->setIfExists('p46CarRecordCount', $data ?? [], null); - $this->setIfExists('p11D', $data ?? [], null); $this->setIfExists('relatedTaxYear', $data ?? [], null); } @@ -330,6 +330,33 @@ public function valid(): bool } + /** + * Gets declarations + * + * @return \SynergiTech\Staffology\Model\ExbDeclarations|null + */ + public function getDeclarations(): ?\SynergiTech\Staffology\Model\ExbDeclarations + { + return $this->container['declarations']; + } + + /** + * Sets declarations + * + * @param \SynergiTech\Staffology\Model\ExbDeclarations|null $declarations declarations + * + * @return $this + */ + public function setDeclarations(?\SynergiTech\Staffology\Model\ExbDeclarations $declarations): static + { + if (is_null($declarations)) { + throw new InvalidArgumentException('non-nullable declarations cannot be null'); + } + $this->container['declarations'] = $declarations; + + return $this; + } + /** * Gets employer * @@ -358,28 +385,35 @@ public function setEmployer(?\SynergiTech\Staffology\Model\ExbEmployer $employer } /** - * Gets declarations + * Gets p11D * - * @return \SynergiTech\Staffology\Model\ExbDeclarations|null + * @return \SynergiTech\Staffology\Model\ExbP11d[]|null */ - public function getDeclarations(): ?\SynergiTech\Staffology\Model\ExbDeclarations + public function getP11D(): ?array { - return $this->container['declarations']; + return $this->container['p11D']; } /** - * Sets declarations + * Sets p11D * - * @param \SynergiTech\Staffology\Model\ExbDeclarations|null $declarations declarations + * @param \SynergiTech\Staffology\Model\ExbP11d[]|null $p11D p11D * * @return $this */ - public function setDeclarations(?\SynergiTech\Staffology\Model\ExbDeclarations $declarations): static + public function setP11D(?array $p11D): static { - if (is_null($declarations)) { - throw new InvalidArgumentException('non-nullable declarations cannot be null'); + if (is_null($p11D)) { + array_push($this->openAPINullablesSetToNull, 'p11D'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('p11D', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['declarations'] = $declarations; + $this->container['p11D'] = $p11D; return $this; } @@ -465,40 +499,6 @@ public function setP46CarRecordCount(?int $p46CarRecordCount): static return $this; } - /** - * Gets p11D - * - * @return \SynergiTech\Staffology\Model\ExbP11d[]|null - */ - public function getP11D(): ?array - { - return $this->container['p11D']; - } - - /** - * Sets p11D - * - * @param \SynergiTech\Staffology\Model\ExbP11d[]|null $p11D p11D - * - * @return $this - */ - public function setP11D(?array $p11D): static - { - if (is_null($p11D)) { - array_push($this->openAPINullablesSetToNull, 'p11D'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('p11D', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['p11D'] = $p11D; - - return $this; - } - /** * Gets relatedTaxYear * diff --git a/src/Model/ExternalDataCompany.php b/src/Model/ExternalDataCompany.php index fe4ed0c..1e2a88a 100644 --- a/src/Model/ExternalDataCompany.php +++ b/src/Model/ExternalDataCompany.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ExternalDataProvider.php b/src/Model/ExternalDataProvider.php index df8456e..49b8cc5 100644 --- a/src/Model/ExternalDataProvider.php +++ b/src/Model/ExternalDataProvider.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,15 @@ class ExternalDataProvider implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', - 'id' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', 'authScheme' => '\SynergiTech\Staffology\Model\AuthScheme', - 'logoUrl' => 'string', - 'iconUrl' => 'string', 'connected' => 'bool', 'connectedAs' => 'string', - 'requiresConfig' => 'bool', 'deferralUrl' => 'string', + 'iconUrl' => 'string', + 'id' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', + 'logoUrl' => 'string', + 'name' => 'string', + 'requiresConfig' => 'bool', 'types' => '\SynergiTech\Staffology\Model\ExternalDataProviderType[]' ]; @@ -77,15 +77,15 @@ class ExternalDataProvider implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPIFormats = [ - 'name' => null, - 'id' => null, 'authScheme' => null, - 'logoUrl' => null, - 'iconUrl' => null, 'connected' => null, 'connectedAs' => null, - 'requiresConfig' => null, 'deferralUrl' => null, + 'iconUrl' => null, + 'id' => null, + 'logoUrl' => null, + 'name' => null, + 'requiresConfig' => null, 'types' => null ]; @@ -95,15 +95,15 @@ class ExternalDataProvider implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPINullables = [ - 'name' => true, - 'id' => false, 'authScheme' => false, - 'logoUrl' => true, - 'iconUrl' => true, 'connected' => false, 'connectedAs' => true, - 'requiresConfig' => false, 'deferralUrl' => true, + 'iconUrl' => true, + 'id' => false, + 'logoUrl' => true, + 'name' => true, + 'requiresConfig' => false, 'types' => true ]; @@ -193,15 +193,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', - 'id' => 'id', 'authScheme' => 'authScheme', - 'logoUrl' => 'logoUrl', - 'iconUrl' => 'iconUrl', 'connected' => 'connected', 'connectedAs' => 'connectedAs', - 'requiresConfig' => 'requiresConfig', 'deferralUrl' => 'deferralUrl', + 'iconUrl' => 'iconUrl', + 'id' => 'id', + 'logoUrl' => 'logoUrl', + 'name' => 'name', + 'requiresConfig' => 'requiresConfig', 'types' => 'types' ]; @@ -211,15 +211,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', - 'id' => 'setId', 'authScheme' => 'setAuthScheme', - 'logoUrl' => 'setLogoUrl', - 'iconUrl' => 'setIconUrl', 'connected' => 'setConnected', 'connectedAs' => 'setConnectedAs', - 'requiresConfig' => 'setRequiresConfig', 'deferralUrl' => 'setDeferralUrl', + 'iconUrl' => 'setIconUrl', + 'id' => 'setId', + 'logoUrl' => 'setLogoUrl', + 'name' => 'setName', + 'requiresConfig' => 'setRequiresConfig', 'types' => 'setTypes' ]; @@ -229,15 +229,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', - 'id' => 'getId', 'authScheme' => 'getAuthScheme', - 'logoUrl' => 'getLogoUrl', - 'iconUrl' => 'getIconUrl', 'connected' => 'getConnected', 'connectedAs' => 'getConnectedAs', - 'requiresConfig' => 'getRequiresConfig', 'deferralUrl' => 'getDeferralUrl', + 'iconUrl' => 'getIconUrl', + 'id' => 'getId', + 'logoUrl' => 'getLogoUrl', + 'name' => 'getName', + 'requiresConfig' => 'getRequiresConfig', 'types' => 'getTypes' ]; @@ -297,15 +297,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('authScheme', $data ?? [], null); - $this->setIfExists('logoUrl', $data ?? [], null); - $this->setIfExists('iconUrl', $data ?? [], null); $this->setIfExists('connected', $data ?? [], null); $this->setIfExists('connectedAs', $data ?? [], null); - $this->setIfExists('requiresConfig', $data ?? [], null); $this->setIfExists('deferralUrl', $data ?? [], null); + $this->setIfExists('iconUrl', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('logoUrl', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('requiresConfig', $data ?? [], null); $this->setIfExists('types', $data ?? [], null); } @@ -352,123 +352,123 @@ public function valid(): bool /** - * Gets name + * Gets authScheme * - * @return string|null + * @return \SynergiTech\Staffology\Model\AuthScheme|null */ - public function getName(): ?string + public function getAuthScheme(): ?\SynergiTech\Staffology\Model\AuthScheme { - return $this->container['name']; + return $this->container['authScheme']; } /** - * Sets name + * Sets authScheme * - * @param string|null $name name + * @param \SynergiTech\Staffology\Model\AuthScheme|null $authScheme authScheme * * @return $this */ - public function setName(?string $name): static + public function setAuthScheme(?\SynergiTech\Staffology\Model\AuthScheme $authScheme): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($authScheme)) { + throw new InvalidArgumentException('non-nullable authScheme cannot be null'); } - $this->container['name'] = $name; + $this->container['authScheme'] = $authScheme; return $this; } /** - * Gets id + * Gets connected * - * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null + * @return bool|null */ - public function getId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId + public function getConnected(): ?bool { - return $this->container['id']; + return $this->container['connected']; } /** - * Sets id + * Sets connected * - * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $id id + * @param bool|null $connected connected * * @return $this */ - public function setId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $id): static + public function setConnected(?bool $connected): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($connected)) { + throw new InvalidArgumentException('non-nullable connected cannot be null'); } - $this->container['id'] = $id; + $this->container['connected'] = $connected; return $this; } /** - * Gets authScheme + * Gets connectedAs * - * @return \SynergiTech\Staffology\Model\AuthScheme|null + * @return string|null */ - public function getAuthScheme(): ?\SynergiTech\Staffology\Model\AuthScheme + public function getConnectedAs(): ?string { - return $this->container['authScheme']; + return $this->container['connectedAs']; } /** - * Sets authScheme + * Sets connectedAs * - * @param \SynergiTech\Staffology\Model\AuthScheme|null $authScheme authScheme + * @param string|null $connectedAs connectedAs * * @return $this */ - public function setAuthScheme(?\SynergiTech\Staffology\Model\AuthScheme $authScheme): static + public function setConnectedAs(?string $connectedAs): static { - if (is_null($authScheme)) { - throw new InvalidArgumentException('non-nullable authScheme cannot be null'); + if (is_null($connectedAs)) { + array_push($this->openAPINullablesSetToNull, 'connectedAs'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('connectedAs', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['authScheme'] = $authScheme; + $this->container['connectedAs'] = $connectedAs; return $this; } /** - * Gets logoUrl + * Gets deferralUrl * * @return string|null */ - public function getLogoUrl(): ?string + public function getDeferralUrl(): ?string { - return $this->container['logoUrl']; + return $this->container['deferralUrl']; } /** - * Sets logoUrl + * Sets deferralUrl * - * @param string|null $logoUrl logoUrl + * @param string|null $deferralUrl deferralUrl * * @return $this */ - public function setLogoUrl(?string $logoUrl): static + public function setDeferralUrl(?string $deferralUrl): static { - if (is_null($logoUrl)) { - array_push($this->openAPINullablesSetToNull, 'logoUrl'); + if (is_null($deferralUrl)) { + array_push($this->openAPINullablesSetToNull, 'deferralUrl'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('logoUrl', $nullablesSetToNull); + $index = array_search('deferralUrl', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['logoUrl'] = $logoUrl; + $this->container['deferralUrl'] = $deferralUrl; return $this; } @@ -508,123 +508,123 @@ public function setIconUrl(?string $iconUrl): static } /** - * Gets connected + * Gets id * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null */ - public function getConnected(): ?bool + public function getId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId { - return $this->container['connected']; + return $this->container['id']; } /** - * Sets connected + * Sets id * - * @param bool|null $connected connected + * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $id id * * @return $this */ - public function setConnected(?bool $connected): static + public function setId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $id): static { - if (is_null($connected)) { - throw new InvalidArgumentException('non-nullable connected cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['connected'] = $connected; + $this->container['id'] = $id; return $this; } /** - * Gets connectedAs + * Gets logoUrl * * @return string|null */ - public function getConnectedAs(): ?string + public function getLogoUrl(): ?string { - return $this->container['connectedAs']; + return $this->container['logoUrl']; } /** - * Sets connectedAs + * Sets logoUrl * - * @param string|null $connectedAs connectedAs + * @param string|null $logoUrl logoUrl * * @return $this */ - public function setConnectedAs(?string $connectedAs): static + public function setLogoUrl(?string $logoUrl): static { - if (is_null($connectedAs)) { - array_push($this->openAPINullablesSetToNull, 'connectedAs'); + if (is_null($logoUrl)) { + array_push($this->openAPINullablesSetToNull, 'logoUrl'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('connectedAs', $nullablesSetToNull); + $index = array_search('logoUrl', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['connectedAs'] = $connectedAs; + $this->container['logoUrl'] = $logoUrl; return $this; } /** - * Gets requiresConfig + * Gets name * - * @return bool|null + * @return string|null */ - public function getRequiresConfig(): ?bool + public function getName(): ?string { - return $this->container['requiresConfig']; + return $this->container['name']; } /** - * Sets requiresConfig + * Sets name * - * @param bool|null $requiresConfig requiresConfig + * @param string|null $name name * * @return $this */ - public function setRequiresConfig(?bool $requiresConfig): static + public function setName(?string $name): static { - if (is_null($requiresConfig)) { - throw new InvalidArgumentException('non-nullable requiresConfig cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['requiresConfig'] = $requiresConfig; + $this->container['name'] = $name; return $this; } /** - * Gets deferralUrl + * Gets requiresConfig * - * @return string|null + * @return bool|null */ - public function getDeferralUrl(): ?string + public function getRequiresConfig(): ?bool { - return $this->container['deferralUrl']; + return $this->container['requiresConfig']; } /** - * Sets deferralUrl + * Sets requiresConfig * - * @param string|null $deferralUrl deferralUrl + * @param bool|null $requiresConfig requiresConfig * * @return $this */ - public function setDeferralUrl(?string $deferralUrl): static + public function setRequiresConfig(?bool $requiresConfig): static { - if (is_null($deferralUrl)) { - array_push($this->openAPINullablesSetToNull, 'deferralUrl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('deferralUrl', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($requiresConfig)) { + throw new InvalidArgumentException('non-nullable requiresConfig cannot be null'); } - $this->container['deferralUrl'] = $deferralUrl; + $this->container['requiresConfig'] = $requiresConfig; return $this; } diff --git a/src/Model/ExternalDataProviderId.php b/src/Model/ExternalDataProviderId.php index a52aa97..f2f054d 100644 --- a/src/Model/ExternalDataProviderId.php +++ b/src/Model/ExternalDataProviderId.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -98,6 +98,8 @@ enum ExternalDataProviderId: string case E_PAY_SLIPS = 'EPaySlips'; case NET_SUITE = 'NetSuite'; + + case STACK_ONE = 'StackOne'; } diff --git a/src/Model/ExternalDataProviderType.php b/src/Model/ExternalDataProviderType.php index 3c8388e..1584752 100644 --- a/src/Model/ExternalDataProviderType.php +++ b/src/Model/ExternalDataProviderType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -48,6 +48,8 @@ enum ExternalDataProviderType: string case TIME_AND_ATTENDANCE = 'TimeAndAttendance'; case EMPLOYEE_PORTAL = 'EmployeePortal'; + + case PREMIUM_CONNECTED_SERVICES = 'PremiumConnectedServices'; } diff --git a/src/Model/ExternalEmployeeMapping.php b/src/Model/ExternalEmployeeMapping.php index a6f680d..5afc939 100644 --- a/src/Model/ExternalEmployeeMapping.php +++ b/src/Model/ExternalEmployeeMapping.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,12 +60,12 @@ class ExternalEmployeeMapping implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ - 'externalId' => 'string', - 'providerId' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', - 'status' => '\SynergiTech\Staffology\Model\ExternalEmployeeMappingStatus', 'employee' => '\SynergiTech\Staffology\Model\Item', 'externalEmployee' => '\SynergiTech\Staffology\Model\Employee', - 'lastSyncDate' => '\DateTime' + 'externalId' => 'string', + 'lastSyncDate' => '\DateTime', + 'providerId' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', + 'status' => '\SynergiTech\Staffology\Model\ExternalEmployeeMappingStatus' ]; /** @@ -74,12 +74,12 @@ class ExternalEmployeeMapping implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ - 'externalId' => null, - 'providerId' => null, - 'status' => null, 'employee' => null, 'externalEmployee' => null, - 'lastSyncDate' => 'date' + 'externalId' => null, + 'lastSyncDate' => 'date', + 'providerId' => null, + 'status' => null ]; /** @@ -88,12 +88,12 @@ class ExternalEmployeeMapping implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ - 'externalId' => true, - 'providerId' => false, - 'status' => false, 'employee' => false, 'externalEmployee' => false, - 'lastSyncDate' => true + 'externalId' => true, + 'lastSyncDate' => true, + 'providerId' => false, + 'status' => false ]; /** @@ -182,12 +182,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'externalId' => 'externalId', - 'providerId' => 'providerId', - 'status' => 'status', 'employee' => 'employee', 'externalEmployee' => 'externalEmployee', - 'lastSyncDate' => 'lastSyncDate' + 'externalId' => 'externalId', + 'lastSyncDate' => 'lastSyncDate', + 'providerId' => 'providerId', + 'status' => 'status' ]; /** @@ -196,12 +196,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'externalId' => 'setExternalId', - 'providerId' => 'setProviderId', - 'status' => 'setStatus', 'employee' => 'setEmployee', 'externalEmployee' => 'setExternalEmployee', - 'lastSyncDate' => 'setLastSyncDate' + 'externalId' => 'setExternalId', + 'lastSyncDate' => 'setLastSyncDate', + 'providerId' => 'setProviderId', + 'status' => 'setStatus' ]; /** @@ -210,12 +210,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'externalId' => 'getExternalId', - 'providerId' => 'getProviderId', - 'status' => 'getStatus', 'employee' => 'getEmployee', 'externalEmployee' => 'getExternalEmployee', - 'lastSyncDate' => 'getLastSyncDate' + 'externalId' => 'getExternalId', + 'lastSyncDate' => 'getLastSyncDate', + 'providerId' => 'getProviderId', + 'status' => 'getStatus' ]; /** @@ -274,12 +274,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('externalId', $data ?? [], null); - $this->setIfExists('providerId', $data ?? [], null); - $this->setIfExists('status', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('externalEmployee', $data ?? [], null); + $this->setIfExists('externalId', $data ?? [], null); $this->setIfExists('lastSyncDate', $data ?? [], null); + $this->setIfExists('providerId', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); } /** @@ -325,177 +325,177 @@ public function valid(): bool /** - * Gets externalId + * Gets employee * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getExternalId(): ?string + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['externalId']; + return $this->container['employee']; } /** - * Sets externalId + * Sets employee * - * @param string|null $externalId [readonly] The id for the employee in the external system + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setExternalId(?string $externalId): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($externalId)) { - array_push($this->openAPINullablesSetToNull, 'externalId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('externalId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['externalId'] = $externalId; + $this->container['employee'] = $employee; return $this; } /** - * Gets providerId + * Gets externalEmployee * - * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null + * @return \SynergiTech\Staffology\Model\Employee|null */ - public function getProviderId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId + public function getExternalEmployee(): ?\SynergiTech\Staffology\Model\Employee { - return $this->container['providerId']; + return $this->container['externalEmployee']; } /** - * Sets providerId + * Sets externalEmployee * - * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $providerId providerId + * @param \SynergiTech\Staffology\Model\Employee|null $externalEmployee externalEmployee * * @return $this */ - public function setProviderId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $providerId): static + public function setExternalEmployee(?\SynergiTech\Staffology\Model\Employee $externalEmployee): static { - if (is_null($providerId)) { - throw new InvalidArgumentException('non-nullable providerId cannot be null'); + if (is_null($externalEmployee)) { + throw new InvalidArgumentException('non-nullable externalEmployee cannot be null'); } - $this->container['providerId'] = $providerId; + $this->container['externalEmployee'] = $externalEmployee; return $this; } /** - * Gets status + * Gets externalId * - * @return \SynergiTech\Staffology\Model\ExternalEmployeeMappingStatus|null + * @return string|null */ - public function getStatus(): ?\SynergiTech\Staffology\Model\ExternalEmployeeMappingStatus + public function getExternalId(): ?string { - return $this->container['status']; + return $this->container['externalId']; } /** - * Sets status + * Sets externalId * - * @param \SynergiTech\Staffology\Model\ExternalEmployeeMappingStatus|null $status status + * @param string|null $externalId [readonly] The id for the employee in the external system * * @return $this */ - public function setStatus(?\SynergiTech\Staffology\Model\ExternalEmployeeMappingStatus $status): static + public function setExternalId(?string $externalId): static { - if (is_null($status)) { - throw new InvalidArgumentException('non-nullable status cannot be null'); + if (is_null($externalId)) { + array_push($this->openAPINullablesSetToNull, 'externalId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('externalId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['status'] = $status; + $this->container['externalId'] = $externalId; return $this; } /** - * Gets employee + * Gets lastSyncDate * - * @return \SynergiTech\Staffology\Model\Item|null + * @return \DateTime|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getLastSyncDate(): ?\DateTime { - return $this->container['employee']; + return $this->container['lastSyncDate']; } /** - * Sets employee + * Sets lastSyncDate * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param \DateTime|null $lastSyncDate [readonly] The date and time this mapping was last synchronised * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setLastSyncDate(?\DateTime $lastSyncDate): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($lastSyncDate)) { + array_push($this->openAPINullablesSetToNull, 'lastSyncDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lastSyncDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employee'] = $employee; + $this->container['lastSyncDate'] = $lastSyncDate; return $this; } /** - * Gets externalEmployee + * Gets providerId * - * @return \SynergiTech\Staffology\Model\Employee|null + * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null */ - public function getExternalEmployee(): ?\SynergiTech\Staffology\Model\Employee + public function getProviderId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId { - return $this->container['externalEmployee']; + return $this->container['providerId']; } /** - * Sets externalEmployee + * Sets providerId * - * @param \SynergiTech\Staffology\Model\Employee|null $externalEmployee externalEmployee + * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $providerId providerId * * @return $this */ - public function setExternalEmployee(?\SynergiTech\Staffology\Model\Employee $externalEmployee): static + public function setProviderId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $providerId): static { - if (is_null($externalEmployee)) { - throw new InvalidArgumentException('non-nullable externalEmployee cannot be null'); + if (is_null($providerId)) { + throw new InvalidArgumentException('non-nullable providerId cannot be null'); } - $this->container['externalEmployee'] = $externalEmployee; + $this->container['providerId'] = $providerId; return $this; } /** - * Gets lastSyncDate + * Gets status * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\ExternalEmployeeMappingStatus|null */ - public function getLastSyncDate(): ?\DateTime + public function getStatus(): ?\SynergiTech\Staffology\Model\ExternalEmployeeMappingStatus { - return $this->container['lastSyncDate']; + return $this->container['status']; } /** - * Sets lastSyncDate + * Sets status * - * @param \DateTime|null $lastSyncDate [readonly] The date and time this mapping was last synchronised + * @param \SynergiTech\Staffology\Model\ExternalEmployeeMappingStatus|null $status status * * @return $this */ - public function setLastSyncDate(?\DateTime $lastSyncDate): static + public function setStatus(?\SynergiTech\Staffology\Model\ExternalEmployeeMappingStatus $status): static { - if (is_null($lastSyncDate)) { - array_push($this->openAPINullablesSetToNull, 'lastSyncDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastSyncDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['lastSyncDate'] = $lastSyncDate; + $this->container['status'] = $status; return $this; } diff --git a/src/Model/ExternalEmployeeMappingStatus.php b/src/Model/ExternalEmployeeMappingStatus.php index 7d3ec7d..772d0dd 100644 --- a/src/Model/ExternalEmployeeMappingStatus.php +++ b/src/Model/ExternalEmployeeMappingStatus.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ExternalProviderConversation.php b/src/Model/ExternalProviderConversation.php index c9203d2..b677c32 100644 --- a/src/Model/ExternalProviderConversation.php +++ b/src/Model/ExternalProviderConversation.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,13 +60,13 @@ class ExternalProviderConversation implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'title' => 'string', 'contentType' => 'string', - 'url' => 'string', 'request' => 'string', 'response' => 'string', 'status' => '\SynergiTech\Staffology\Model\BackgroundTaskStatus', - 'statusMessage' => 'string' + 'statusMessage' => 'string', + 'title' => 'string', + 'url' => 'string' ]; /** @@ -75,13 +75,13 @@ class ExternalProviderConversation implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'title' => null, 'contentType' => null, - 'url' => null, 'request' => null, 'response' => null, 'status' => null, - 'statusMessage' => null + 'statusMessage' => null, + 'title' => null, + 'url' => null ]; /** @@ -90,13 +90,13 @@ class ExternalProviderConversation implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'title' => true, 'contentType' => true, - 'url' => true, 'request' => true, 'response' => true, 'status' => false, - 'statusMessage' => true + 'statusMessage' => true, + 'title' => true, + 'url' => true ]; /** @@ -185,13 +185,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'title' => 'title', 'contentType' => 'contentType', - 'url' => 'url', 'request' => 'request', 'response' => 'response', 'status' => 'status', - 'statusMessage' => 'statusMessage' + 'statusMessage' => 'statusMessage', + 'title' => 'title', + 'url' => 'url' ]; /** @@ -200,13 +200,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'title' => 'setTitle', 'contentType' => 'setContentType', - 'url' => 'setUrl', 'request' => 'setRequest', 'response' => 'setResponse', 'status' => 'setStatus', - 'statusMessage' => 'setStatusMessage' + 'statusMessage' => 'setStatusMessage', + 'title' => 'setTitle', + 'url' => 'setUrl' ]; /** @@ -215,13 +215,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'title' => 'getTitle', 'contentType' => 'getContentType', - 'url' => 'getUrl', 'request' => 'getRequest', 'response' => 'getResponse', 'status' => 'getStatus', - 'statusMessage' => 'getStatusMessage' + 'statusMessage' => 'getStatusMessage', + 'title' => 'getTitle', + 'url' => 'getUrl' ]; /** @@ -280,13 +280,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('contentType', $data ?? [], null); - $this->setIfExists('url', $data ?? [], null); $this->setIfExists('request', $data ?? [], null); $this->setIfExists('response', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('statusMessage', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); } /** @@ -331,40 +331,6 @@ public function valid(): bool } - /** - * Gets title - * - * @return string|null - */ - public function getTitle(): ?string - { - return $this->container['title']; - } - - /** - * Sets title - * - * @param string|null $title title - * - * @return $this - */ - public function setTitle(?string $title): static - { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['title'] = $title; - - return $this; - } - /** * Gets contentType * @@ -399,40 +365,6 @@ public function setContentType(?string $contentType): static return $this; } - /** - * Gets url - * - * @return string|null - */ - public function getUrl(): ?string - { - return $this->container['url']; - } - - /** - * Sets url - * - * @param string|null $url url - * - * @return $this - */ - public function setUrl(?string $url): static - { - if (is_null($url)) { - array_push($this->openAPINullablesSetToNull, 'url'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('url', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['url'] = $url; - - return $this; - } - /** * Gets request * @@ -561,6 +493,74 @@ public function setStatusMessage(?string $statusMessage): static return $this; } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle(): ?string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title title + * + * @return $this + */ + public function setTitle(?string $title): static + { + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets url + * + * @return string|null + */ + public function getUrl(): ?string + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string|null $url url + * + * @return $this + */ + public function setUrl(?string $url): static + { + if (is_null($url)) { + array_push($this->openAPINullablesSetToNull, 'url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['url'] = $url; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/FieldModification.php b/src/Model/FieldModification.php index 2d14102..77b7eb1 100644 --- a/src/Model/FieldModification.php +++ b/src/Model/FieldModification.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -61,8 +61,8 @@ class FieldModification implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPITypes = [ 'fieldName' => 'string', 'isSignificant' => 'bool', - 'oldValue' => 'string', - 'newValue' => 'string' + 'newValue' => 'string', + 'oldValue' => 'string' ]; /** @@ -73,8 +73,8 @@ class FieldModification implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPIFormats = [ 'fieldName' => null, 'isSignificant' => null, - 'oldValue' => null, - 'newValue' => null + 'newValue' => null, + 'oldValue' => null ]; /** @@ -85,8 +85,8 @@ class FieldModification implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPINullables = [ 'fieldName' => true, 'isSignificant' => false, - 'oldValue' => true, - 'newValue' => true + 'newValue' => true, + 'oldValue' => true ]; /** @@ -177,8 +177,8 @@ public function isNullableSetToNull(string $property): bool protected static array $attributeMap = [ 'fieldName' => 'fieldName', 'isSignificant' => 'isSignificant', - 'oldValue' => 'oldValue', - 'newValue' => 'newValue' + 'newValue' => 'newValue', + 'oldValue' => 'oldValue' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool protected static array $setters = [ 'fieldName' => 'setFieldName', 'isSignificant' => 'setIsSignificant', - 'oldValue' => 'setOldValue', - 'newValue' => 'setNewValue' + 'newValue' => 'setNewValue', + 'oldValue' => 'setOldValue' ]; /** @@ -201,8 +201,8 @@ public function isNullableSetToNull(string $property): bool protected static array $getters = [ 'fieldName' => 'getFieldName', 'isSignificant' => 'getIsSignificant', - 'oldValue' => 'getOldValue', - 'newValue' => 'getNewValue' + 'newValue' => 'getNewValue', + 'oldValue' => 'getOldValue' ]; /** @@ -263,8 +263,8 @@ public function __construct(?array $data = null) { $this->setIfExists('fieldName', $data ?? [], null); $this->setIfExists('isSignificant', $data ?? [], null); - $this->setIfExists('oldValue', $data ?? [], null); $this->setIfExists('newValue', $data ?? [], null); + $this->setIfExists('oldValue', $data ?? [], null); } /** @@ -371,69 +371,69 @@ public function setIsSignificant(?bool $isSignificant): static } /** - * Gets oldValue + * Gets newValue * * @return string|null */ - public function getOldValue(): ?string + public function getNewValue(): ?string { - return $this->container['oldValue']; + return $this->container['newValue']; } /** - * Sets oldValue + * Sets newValue * - * @param string|null $oldValue oldValue + * @param string|null $newValue newValue * * @return $this */ - public function setOldValue(?string $oldValue): static + public function setNewValue(?string $newValue): static { - if (is_null($oldValue)) { - array_push($this->openAPINullablesSetToNull, 'oldValue'); + if (is_null($newValue)) { + array_push($this->openAPINullablesSetToNull, 'newValue'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('oldValue', $nullablesSetToNull); + $index = array_search('newValue', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['oldValue'] = $oldValue; + $this->container['newValue'] = $newValue; return $this; } /** - * Gets newValue + * Gets oldValue * * @return string|null */ - public function getNewValue(): ?string + public function getOldValue(): ?string { - return $this->container['newValue']; + return $this->container['oldValue']; } /** - * Sets newValue + * Sets oldValue * - * @param string|null $newValue newValue + * @param string|null $oldValue oldValue * * @return $this */ - public function setNewValue(?string $newValue): static + public function setOldValue(?string $oldValue): static { - if (is_null($newValue)) { - array_push($this->openAPINullablesSetToNull, 'newValue'); + if (is_null($oldValue)) { + array_push($this->openAPINullablesSetToNull, 'oldValue'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('newValue', $nullablesSetToNull); + $index = array_search('oldValue', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['newValue'] = $newValue; + $this->container['oldValue'] = $oldValue; return $this; } diff --git a/src/Model/FixedCode.php b/src/Model/FixedCode.php index 69bcfe3..8521543 100644 --- a/src/Model/FixedCode.php +++ b/src/Model/FixedCode.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/FlexibleDrawdown.php b/src/Model/FlexibleDrawdown.php index 15b2266..2ed276f 100644 --- a/src/Model/FlexibleDrawdown.php +++ b/src/Model/FlexibleDrawdown.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/Fps.php b/src/Model/Fps.php index 4969e77..a0c7829 100644 --- a/src/Model/Fps.php +++ b/src/Model/Fps.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,21 +59,23 @@ class Fps implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'lateReason' => '\SynergiTech\Staffology\Model\FpsLateReason', - 'paymentDate' => '\DateTime', - 'overridePaymentDate' => '\DateTime', + 'correctionEmployees' => 'int[]', 'employeeCount' => 'int', - 'isCorrection' => 'bool', - 'supersededCount' => 'int', + 'employerReferences' => '\SynergiTech\Staffology\Model\EmpRefs', 'fullPaymentSubmission' => '\SynergiTech\Staffology\Model\FullPaymentSubmission', - 'versions' => '\SynergiTech\Staffology\Model\FpsPriorVersion[]', - 'validationWarnings' => '\SynergiTech\Staffology\Model\RtiValidationWarning[]', + 'govTalkSubmission' => '\SynergiTech\Staffology\Model\GovTalkSubmission', 'iRmark' => 'string', - 'xml' => 'string', + 'id' => 'string', + 'isCorrection' => 'bool', + 'lateReason' => '\SynergiTech\Staffology\Model\FpsLateReason', + 'overridePaymentDate' => '\DateTime', + 'payRunVersion' => 'int', + 'paymentDate' => '\DateTime', + 'supersededCount' => 'int', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'employerReferences' => '\SynergiTech\Staffology\Model\EmpRefs', - 'govTalkSubmission' => '\SynergiTech\Staffology\Model\GovTalkSubmission', - 'id' => 'string' + 'validationWarnings' => '\SynergiTech\Staffology\Model\RtiValidationWarning[]', + 'versions' => '\SynergiTech\Staffology\Model\FpsPriorVersion[]', + 'xml' => 'string' ]; /** @@ -82,21 +84,23 @@ class Fps implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'lateReason' => null, - 'paymentDate' => 'date', - 'overridePaymentDate' => 'date', + 'correctionEmployees' => 'int32', 'employeeCount' => 'int32', - 'isCorrection' => null, - 'supersededCount' => 'int32', + 'employerReferences' => null, 'fullPaymentSubmission' => null, - 'versions' => null, - 'validationWarnings' => null, + 'govTalkSubmission' => null, 'iRmark' => null, - 'xml' => null, + 'id' => 'uuid', + 'isCorrection' => null, + 'lateReason' => null, + 'overridePaymentDate' => 'date', + 'payRunVersion' => 'int32', + 'paymentDate' => 'date', + 'supersededCount' => 'int32', 'taxYear' => null, - 'employerReferences' => null, - 'govTalkSubmission' => null, - 'id' => 'uuid' + 'validationWarnings' => null, + 'versions' => null, + 'xml' => null ]; /** @@ -105,21 +109,23 @@ class Fps implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'lateReason' => false, - 'paymentDate' => false, - 'overridePaymentDate' => true, + 'correctionEmployees' => true, 'employeeCount' => false, - 'isCorrection' => false, - 'supersededCount' => false, + 'employerReferences' => false, 'fullPaymentSubmission' => false, - 'versions' => true, - 'validationWarnings' => true, + 'govTalkSubmission' => false, 'iRmark' => true, - 'xml' => true, + 'id' => false, + 'isCorrection' => false, + 'lateReason' => false, + 'overridePaymentDate' => true, + 'payRunVersion' => false, + 'paymentDate' => false, + 'supersededCount' => false, 'taxYear' => false, - 'employerReferences' => false, - 'govTalkSubmission' => false, - 'id' => false + 'validationWarnings' => true, + 'versions' => true, + 'xml' => true ]; /** @@ -208,21 +214,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'lateReason' => 'lateReason', - 'paymentDate' => 'paymentDate', - 'overridePaymentDate' => 'overridePaymentDate', + 'correctionEmployees' => 'correctionEmployees', 'employeeCount' => 'employeeCount', - 'isCorrection' => 'isCorrection', - 'supersededCount' => 'supersededCount', + 'employerReferences' => 'employerReferences', 'fullPaymentSubmission' => 'fullPaymentSubmission', - 'versions' => 'versions', - 'validationWarnings' => 'validationWarnings', + 'govTalkSubmission' => 'govTalkSubmission', 'iRmark' => 'iRmark', - 'xml' => 'xml', + 'id' => 'id', + 'isCorrection' => 'isCorrection', + 'lateReason' => 'lateReason', + 'overridePaymentDate' => 'overridePaymentDate', + 'payRunVersion' => 'payRunVersion', + 'paymentDate' => 'paymentDate', + 'supersededCount' => 'supersededCount', 'taxYear' => 'taxYear', - 'employerReferences' => 'employerReferences', - 'govTalkSubmission' => 'govTalkSubmission', - 'id' => 'id' + 'validationWarnings' => 'validationWarnings', + 'versions' => 'versions', + 'xml' => 'xml' ]; /** @@ -231,21 +239,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'lateReason' => 'setLateReason', - 'paymentDate' => 'setPaymentDate', - 'overridePaymentDate' => 'setOverridePaymentDate', + 'correctionEmployees' => 'setCorrectionEmployees', 'employeeCount' => 'setEmployeeCount', - 'isCorrection' => 'setIsCorrection', - 'supersededCount' => 'setSupersededCount', + 'employerReferences' => 'setEmployerReferences', 'fullPaymentSubmission' => 'setFullPaymentSubmission', - 'versions' => 'setVersions', - 'validationWarnings' => 'setValidationWarnings', + 'govTalkSubmission' => 'setGovTalkSubmission', 'iRmark' => 'setIRmark', - 'xml' => 'setXml', + 'id' => 'setId', + 'isCorrection' => 'setIsCorrection', + 'lateReason' => 'setLateReason', + 'overridePaymentDate' => 'setOverridePaymentDate', + 'payRunVersion' => 'setPayRunVersion', + 'paymentDate' => 'setPaymentDate', + 'supersededCount' => 'setSupersededCount', 'taxYear' => 'setTaxYear', - 'employerReferences' => 'setEmployerReferences', - 'govTalkSubmission' => 'setGovTalkSubmission', - 'id' => 'setId' + 'validationWarnings' => 'setValidationWarnings', + 'versions' => 'setVersions', + 'xml' => 'setXml' ]; /** @@ -254,21 +264,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'lateReason' => 'getLateReason', - 'paymentDate' => 'getPaymentDate', - 'overridePaymentDate' => 'getOverridePaymentDate', + 'correctionEmployees' => 'getCorrectionEmployees', 'employeeCount' => 'getEmployeeCount', - 'isCorrection' => 'getIsCorrection', - 'supersededCount' => 'getSupersededCount', + 'employerReferences' => 'getEmployerReferences', 'fullPaymentSubmission' => 'getFullPaymentSubmission', - 'versions' => 'getVersions', - 'validationWarnings' => 'getValidationWarnings', + 'govTalkSubmission' => 'getGovTalkSubmission', 'iRmark' => 'getIRmark', - 'xml' => 'getXml', + 'id' => 'getId', + 'isCorrection' => 'getIsCorrection', + 'lateReason' => 'getLateReason', + 'overridePaymentDate' => 'getOverridePaymentDate', + 'payRunVersion' => 'getPayRunVersion', + 'paymentDate' => 'getPaymentDate', + 'supersededCount' => 'getSupersededCount', 'taxYear' => 'getTaxYear', - 'employerReferences' => 'getEmployerReferences', - 'govTalkSubmission' => 'getGovTalkSubmission', - 'id' => 'getId' + 'validationWarnings' => 'getValidationWarnings', + 'versions' => 'getVersions', + 'xml' => 'getXml' ]; /** @@ -327,21 +339,23 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('lateReason', $data ?? [], null); - $this->setIfExists('paymentDate', $data ?? [], null); - $this->setIfExists('overridePaymentDate', $data ?? [], null); + $this->setIfExists('correctionEmployees', $data ?? [], null); $this->setIfExists('employeeCount', $data ?? [], null); + $this->setIfExists('employerReferences', $data ?? [], null); + $this->setIfExists('fullPaymentSubmission', $data ?? [], null); + $this->setIfExists('govTalkSubmission', $data ?? [], null); + $this->setIfExists('iRmark', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('isCorrection', $data ?? [], null); + $this->setIfExists('lateReason', $data ?? [], null); + $this->setIfExists('overridePaymentDate', $data ?? [], null); + $this->setIfExists('payRunVersion', $data ?? [], null); + $this->setIfExists('paymentDate', $data ?? [], null); $this->setIfExists('supersededCount', $data ?? [], null); - $this->setIfExists('fullPaymentSubmission', $data ?? [], null); - $this->setIfExists('versions', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('validationWarnings', $data ?? [], null); - $this->setIfExists('iRmark', $data ?? [], null); + $this->setIfExists('versions', $data ?? [], null); $this->setIfExists('xml', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('employerReferences', $data ?? [], null); - $this->setIfExists('govTalkSubmission', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); } /** @@ -387,333 +401,373 @@ public function valid(): bool /** - * Gets lateReason + * Gets correctionEmployees * - * @return \SynergiTech\Staffology\Model\FpsLateReason|null + * @return int[]|null */ - public function getLateReason(): ?\SynergiTech\Staffology\Model\FpsLateReason + public function getCorrectionEmployees(): ?array { - return $this->container['lateReason']; + return $this->container['correctionEmployees']; } /** - * Sets lateReason + * Sets correctionEmployees * - * @param \SynergiTech\Staffology\Model\FpsLateReason|null $lateReason lateReason + * @param int[]|null $correctionEmployees correctionEmployees * * @return $this */ - public function setLateReason(?\SynergiTech\Staffology\Model\FpsLateReason $lateReason): static + public function setCorrectionEmployees(?array $correctionEmployees): static { - if (is_null($lateReason)) { - throw new InvalidArgumentException('non-nullable lateReason cannot be null'); + if (is_null($correctionEmployees)) { + array_push($this->openAPINullablesSetToNull, 'correctionEmployees'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('correctionEmployees', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['lateReason'] = $lateReason; + $this->container['correctionEmployees'] = $correctionEmployees; return $this; } /** - * Gets paymentDate + * Gets employeeCount * - * @return \DateTime|null + * @return int|null */ - public function getPaymentDate(): ?\DateTime + public function getEmployeeCount(): ?int { - return $this->container['paymentDate']; + return $this->container['employeeCount']; } /** - * Sets paymentDate + * Sets employeeCount * - * @param \DateTime|null $paymentDate paymentDate + * @param int|null $employeeCount employeeCount * * @return $this */ - public function setPaymentDate(?\DateTime $paymentDate): static + public function setEmployeeCount(?int $employeeCount): static { - if (is_null($paymentDate)) { - throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); + if (is_null($employeeCount)) { + throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); } - $this->container['paymentDate'] = $paymentDate; + $this->container['employeeCount'] = $employeeCount; return $this; } /** - * Gets overridePaymentDate + * Gets employerReferences * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\EmpRefs|null */ - public function getOverridePaymentDate(): ?\DateTime + public function getEmployerReferences(): ?\SynergiTech\Staffology\Model\EmpRefs { - return $this->container['overridePaymentDate']; + return $this->container['employerReferences']; } /** - * Sets overridePaymentDate + * Sets employerReferences * - * @param \DateTime|null $overridePaymentDate If a value if provided here then it will be used in place of the actual PaymentDate on the FPS. The value must fall in to the same Tax Period as the PaymentDate + * @param \SynergiTech\Staffology\Model\EmpRefs|null $employerReferences employerReferences * * @return $this */ - public function setOverridePaymentDate(?\DateTime $overridePaymentDate): static + public function setEmployerReferences(?\SynergiTech\Staffology\Model\EmpRefs $employerReferences): static { - if (is_null($overridePaymentDate)) { - array_push($this->openAPINullablesSetToNull, 'overridePaymentDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('overridePaymentDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employerReferences)) { + throw new InvalidArgumentException('non-nullable employerReferences cannot be null'); } - $this->container['overridePaymentDate'] = $overridePaymentDate; + $this->container['employerReferences'] = $employerReferences; return $this; } /** - * Gets employeeCount + * Gets fullPaymentSubmission * - * @return int|null + * @return \SynergiTech\Staffology\Model\FullPaymentSubmission|null */ - public function getEmployeeCount(): ?int + public function getFullPaymentSubmission(): ?\SynergiTech\Staffology\Model\FullPaymentSubmission { - return $this->container['employeeCount']; + return $this->container['fullPaymentSubmission']; } /** - * Sets employeeCount + * Sets fullPaymentSubmission * - * @param int|null $employeeCount employeeCount + * @param \SynergiTech\Staffology\Model\FullPaymentSubmission|null $fullPaymentSubmission fullPaymentSubmission * * @return $this */ - public function setEmployeeCount(?int $employeeCount): static + public function setFullPaymentSubmission(?\SynergiTech\Staffology\Model\FullPaymentSubmission $fullPaymentSubmission): static { - if (is_null($employeeCount)) { - throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); + if (is_null($fullPaymentSubmission)) { + throw new InvalidArgumentException('non-nullable fullPaymentSubmission cannot be null'); } - $this->container['employeeCount'] = $employeeCount; + $this->container['fullPaymentSubmission'] = $fullPaymentSubmission; return $this; } /** - * Gets isCorrection + * Gets govTalkSubmission * - * @return bool|null + * @return \SynergiTech\Staffology\Model\GovTalkSubmission|null */ - public function getIsCorrection(): ?bool + public function getGovTalkSubmission(): ?\SynergiTech\Staffology\Model\GovTalkSubmission { - return $this->container['isCorrection']; + return $this->container['govTalkSubmission']; } /** - * Sets isCorrection + * Sets govTalkSubmission * - * @param bool|null $isCorrection isCorrection + * @param \SynergiTech\Staffology\Model\GovTalkSubmission|null $govTalkSubmission govTalkSubmission * * @return $this */ - public function setIsCorrection(?bool $isCorrection): static + public function setGovTalkSubmission(?\SynergiTech\Staffology\Model\GovTalkSubmission $govTalkSubmission): static { - if (is_null($isCorrection)) { - throw new InvalidArgumentException('non-nullable isCorrection cannot be null'); + if (is_null($govTalkSubmission)) { + throw new InvalidArgumentException('non-nullable govTalkSubmission cannot be null'); } - $this->container['isCorrection'] = $isCorrection; + $this->container['govTalkSubmission'] = $govTalkSubmission; return $this; } /** - * Gets supersededCount + * Gets iRmark * - * @return int|null + * @return string|null */ - public function getSupersededCount(): ?int + public function getIRmark(): ?string { - return $this->container['supersededCount']; + return $this->container['iRmark']; } /** - * Sets supersededCount + * Sets iRmark * - * @param int|null $supersededCount The number of payments on this FPS that have been superseded by later versions + * @param string|null $iRmark iRmark * * @return $this */ - public function setSupersededCount(?int $supersededCount): static + public function setIRmark(?string $iRmark): static { - if (is_null($supersededCount)) { - throw new InvalidArgumentException('non-nullable supersededCount cannot be null'); + if (is_null($iRmark)) { + array_push($this->openAPINullablesSetToNull, 'iRmark'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('iRmark', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['supersededCount'] = $supersededCount; + $this->container['iRmark'] = $iRmark; return $this; } /** - * Gets fullPaymentSubmission + * Gets id * - * @return \SynergiTech\Staffology\Model\FullPaymentSubmission|null + * @return string|null */ - public function getFullPaymentSubmission(): ?\SynergiTech\Staffology\Model\FullPaymentSubmission + public function getId(): ?string { - return $this->container['fullPaymentSubmission']; + return $this->container['id']; } /** - * Sets fullPaymentSubmission + * Sets id * - * @param \SynergiTech\Staffology\Model\FullPaymentSubmission|null $fullPaymentSubmission fullPaymentSubmission + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setFullPaymentSubmission(?\SynergiTech\Staffology\Model\FullPaymentSubmission $fullPaymentSubmission): static + public function setId(?string $id): static { - if (is_null($fullPaymentSubmission)) { - throw new InvalidArgumentException('non-nullable fullPaymentSubmission cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['fullPaymentSubmission'] = $fullPaymentSubmission; + $this->container['id'] = $id; return $this; } /** - * Gets versions + * Gets isCorrection * - * @return \SynergiTech\Staffology\Model\FpsPriorVersion[]|null + * @return bool|null */ - public function getVersions(): ?array + public function getIsCorrection(): ?bool { - return $this->container['versions']; + return $this->container['isCorrection']; } /** - * Sets versions + * Sets isCorrection * - * @param \SynergiTech\Staffology\Model\FpsPriorVersion[]|null $versions If any of the payments on this FPS appear on another FPS then then there will be an entry here for each of them. If there is an entry where the FpsId matches this FPS then that means the FpsEmployee on this Fps is itself a prior version (ie, it's been superseded) + * @param bool|null $isCorrection isCorrection * * @return $this */ - public function setVersions(?array $versions): static + public function setIsCorrection(?bool $isCorrection): static { - if (is_null($versions)) { - array_push($this->openAPINullablesSetToNull, 'versions'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('versions', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isCorrection)) { + throw new InvalidArgumentException('non-nullable isCorrection cannot be null'); } - $this->container['versions'] = $versions; + $this->container['isCorrection'] = $isCorrection; return $this; } /** - * Gets validationWarnings + * Gets lateReason * - * @return \SynergiTech\Staffology\Model\RtiValidationWarning[]|null + * @return \SynergiTech\Staffology\Model\FpsLateReason|null */ - public function getValidationWarnings(): ?array + public function getLateReason(): ?\SynergiTech\Staffology\Model\FpsLateReason { - return $this->container['validationWarnings']; + return $this->container['lateReason']; } /** - * Sets validationWarnings + * Sets lateReason * - * @param \SynergiTech\Staffology\Model\RtiValidationWarning[]|null $validationWarnings validationWarnings + * @param \SynergiTech\Staffology\Model\FpsLateReason|null $lateReason lateReason * * @return $this */ - public function setValidationWarnings(?array $validationWarnings): static + public function setLateReason(?\SynergiTech\Staffology\Model\FpsLateReason $lateReason): static { - if (is_null($validationWarnings)) { - array_push($this->openAPINullablesSetToNull, 'validationWarnings'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('validationWarnings', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($lateReason)) { + throw new InvalidArgumentException('non-nullable lateReason cannot be null'); } - $this->container['validationWarnings'] = $validationWarnings; + $this->container['lateReason'] = $lateReason; return $this; } /** - * Gets iRmark + * Gets overridePaymentDate * - * @return string|null + * @return \DateTime|null */ - public function getIRmark(): ?string + public function getOverridePaymentDate(): ?\DateTime { - return $this->container['iRmark']; + return $this->container['overridePaymentDate']; } /** - * Sets iRmark + * Sets overridePaymentDate * - * @param string|null $iRmark iRmark + * @param \DateTime|null $overridePaymentDate If a value if provided here then it will be used in place of the actual PaymentDate on the FPS. The value must fall in to the same Tax Period as the PaymentDate * * @return $this */ - public function setIRmark(?string $iRmark): static + public function setOverridePaymentDate(?\DateTime $overridePaymentDate): static { - if (is_null($iRmark)) { - array_push($this->openAPINullablesSetToNull, 'iRmark'); + if (is_null($overridePaymentDate)) { + array_push($this->openAPINullablesSetToNull, 'overridePaymentDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('iRmark', $nullablesSetToNull); + $index = array_search('overridePaymentDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['iRmark'] = $iRmark; + $this->container['overridePaymentDate'] = $overridePaymentDate; return $this; } /** - * Gets xml + * Gets payRunVersion * - * @return string|null + * @return int|null */ - public function getXml(): ?string + public function getPayRunVersion(): ?int { - return $this->container['xml']; + return $this->container['payRunVersion']; } /** - * Sets xml + * Sets payRunVersion * - * @param string|null $xml This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. + * @param int|null $payRunVersion The supplementary pay run version of this FPS. * * @return $this */ - public function setXml(?string $xml): static + public function setPayRunVersion(?int $payRunVersion): static { - if (is_null($xml)) { - array_push($this->openAPINullablesSetToNull, 'xml'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('xml', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payRunVersion)) { + throw new InvalidArgumentException('non-nullable payRunVersion cannot be null'); } - $this->container['xml'] = $xml; + $this->container['payRunVersion'] = $payRunVersion; + + return $this; + } + + /** + * Gets paymentDate + * + * @return \DateTime|null + */ + public function getPaymentDate(): ?\DateTime + { + return $this->container['paymentDate']; + } + + /** + * Sets paymentDate + * + * @param \DateTime|null $paymentDate paymentDate + * + * @return $this + */ + public function setPaymentDate(?\DateTime $paymentDate): static + { + if (is_null($paymentDate)) { + throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); + } + $this->container['paymentDate'] = $paymentDate; + + return $this; + } + + /** + * Gets supersededCount + * + * @return int|null + */ + public function getSupersededCount(): ?int + { + return $this->container['supersededCount']; + } + + /** + * Sets supersededCount + * + * @param int|null $supersededCount The number of payments on this FPS that have been superseded by later versions + * + * @return $this + */ + public function setSupersededCount(?int $supersededCount): static + { + if (is_null($supersededCount)) { + throw new InvalidArgumentException('non-nullable supersededCount cannot be null'); + } + $this->container['supersededCount'] = $supersededCount; return $this; } @@ -746,82 +800,103 @@ public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): sta } /** - * Gets employerReferences + * Gets validationWarnings * - * @return \SynergiTech\Staffology\Model\EmpRefs|null + * @return \SynergiTech\Staffology\Model\RtiValidationWarning[]|null */ - public function getEmployerReferences(): ?\SynergiTech\Staffology\Model\EmpRefs + public function getValidationWarnings(): ?array { - return $this->container['employerReferences']; + return $this->container['validationWarnings']; } /** - * Sets employerReferences + * Sets validationWarnings * - * @param \SynergiTech\Staffology\Model\EmpRefs|null $employerReferences employerReferences + * @param \SynergiTech\Staffology\Model\RtiValidationWarning[]|null $validationWarnings validationWarnings * * @return $this */ - public function setEmployerReferences(?\SynergiTech\Staffology\Model\EmpRefs $employerReferences): static + public function setValidationWarnings(?array $validationWarnings): static { - if (is_null($employerReferences)) { - throw new InvalidArgumentException('non-nullable employerReferences cannot be null'); + if (is_null($validationWarnings)) { + array_push($this->openAPINullablesSetToNull, 'validationWarnings'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('validationWarnings', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employerReferences'] = $employerReferences; + $this->container['validationWarnings'] = $validationWarnings; return $this; } /** - * Gets govTalkSubmission + * Gets versions * - * @return \SynergiTech\Staffology\Model\GovTalkSubmission|null + * @return \SynergiTech\Staffology\Model\FpsPriorVersion[]|null */ - public function getGovTalkSubmission(): ?\SynergiTech\Staffology\Model\GovTalkSubmission + public function getVersions(): ?array { - return $this->container['govTalkSubmission']; + return $this->container['versions']; } /** - * Sets govTalkSubmission + * Sets versions * - * @param \SynergiTech\Staffology\Model\GovTalkSubmission|null $govTalkSubmission govTalkSubmission + * @param \SynergiTech\Staffology\Model\FpsPriorVersion[]|null $versions If any of the payments on this FPS appear on another FPS then then there will be an entry here for each of them. If there is an entry where the FpsId matches this FPS then that means the FpsEmployee on this Fps is itself a prior version (ie, it's been superseded) * * @return $this */ - public function setGovTalkSubmission(?\SynergiTech\Staffology\Model\GovTalkSubmission $govTalkSubmission): static + public function setVersions(?array $versions): static { - if (is_null($govTalkSubmission)) { - throw new InvalidArgumentException('non-nullable govTalkSubmission cannot be null'); + if (is_null($versions)) { + array_push($this->openAPINullablesSetToNull, 'versions'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('versions', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['govTalkSubmission'] = $govTalkSubmission; + $this->container['versions'] = $versions; return $this; } /** - * Gets id + * Gets xml * * @return string|null */ - public function getId(): ?string + public function getXml(): ?string { - return $this->container['id']; + return $this->container['xml']; } /** - * Sets id + * Sets xml * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $xml This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. * * @return $this */ - public function setId(?string $id): static + public function setXml(?string $xml): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($xml)) { + array_push($this->openAPINullablesSetToNull, 'xml'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('xml', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['xml'] = $xml; return $this; } diff --git a/src/Model/FpsBenefit.php b/src/Model/FpsBenefit.php index d3bf889..3608304 100644 --- a/src/Model/FpsBenefit.php +++ b/src/Model/FpsBenefit.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/FpsCar.php b/src/Model/FpsCar.php index f9fbd71..c90ef67 100644 --- a/src/Model/FpsCar.php +++ b/src/Model/FpsCar.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,18 +59,18 @@ class FpsCar implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'make' => 'string', - 'firstRegd' => 'string', + 'amendment' => 'string', + 'availFrom' => 'string', + 'availTo' => 'string', 'cO2' => 'string', - 'zeroEmissionsMileage' => 'string', + 'cashEquiv' => 'string', + 'firstRegd' => 'string', + 'freeFuel' => '\SynergiTech\Staffology\Model\FpsCarFuel', 'fuel' => 'string', 'id' => 'string', - 'amendment' => 'string', + 'make' => 'string', 'price' => 'string', - 'availFrom' => 'string', - 'cashEquiv' => 'string', - 'availTo' => 'string', - 'freeFuel' => '\SynergiTech\Staffology\Model\FpsCarFuel' + 'zeroEmissionsMileage' => 'string' ]; /** @@ -79,18 +79,18 @@ class FpsCar implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'make' => null, - 'firstRegd' => null, + 'amendment' => null, + 'availFrom' => null, + 'availTo' => null, 'cO2' => null, - 'zeroEmissionsMileage' => null, + 'cashEquiv' => null, + 'firstRegd' => null, + 'freeFuel' => null, 'fuel' => null, 'id' => null, - 'amendment' => null, + 'make' => null, 'price' => null, - 'availFrom' => null, - 'cashEquiv' => null, - 'availTo' => null, - 'freeFuel' => null + 'zeroEmissionsMileage' => null ]; /** @@ -99,18 +99,18 @@ class FpsCar implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'make' => true, - 'firstRegd' => true, + 'amendment' => true, + 'availFrom' => true, + 'availTo' => true, 'cO2' => true, - 'zeroEmissionsMileage' => true, + 'cashEquiv' => true, + 'firstRegd' => true, + 'freeFuel' => false, 'fuel' => true, 'id' => true, - 'amendment' => true, + 'make' => true, 'price' => true, - 'availFrom' => true, - 'cashEquiv' => true, - 'availTo' => true, - 'freeFuel' => false + 'zeroEmissionsMileage' => true ]; /** @@ -199,18 +199,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'make' => 'make', - 'firstRegd' => 'firstRegd', + 'amendment' => 'amendment', + 'availFrom' => 'availFrom', + 'availTo' => 'availTo', 'cO2' => 'cO2', - 'zeroEmissionsMileage' => 'zeroEmissionsMileage', + 'cashEquiv' => 'cashEquiv', + 'firstRegd' => 'firstRegd', + 'freeFuel' => 'freeFuel', 'fuel' => 'fuel', 'id' => 'id', - 'amendment' => 'amendment', + 'make' => 'make', 'price' => 'price', - 'availFrom' => 'availFrom', - 'cashEquiv' => 'cashEquiv', - 'availTo' => 'availTo', - 'freeFuel' => 'freeFuel' + 'zeroEmissionsMileage' => 'zeroEmissionsMileage' ]; /** @@ -219,18 +219,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'make' => 'setMake', - 'firstRegd' => 'setFirstRegd', + 'amendment' => 'setAmendment', + 'availFrom' => 'setAvailFrom', + 'availTo' => 'setAvailTo', 'cO2' => 'setCO2', - 'zeroEmissionsMileage' => 'setZeroEmissionsMileage', + 'cashEquiv' => 'setCashEquiv', + 'firstRegd' => 'setFirstRegd', + 'freeFuel' => 'setFreeFuel', 'fuel' => 'setFuel', 'id' => 'setId', - 'amendment' => 'setAmendment', + 'make' => 'setMake', 'price' => 'setPrice', - 'availFrom' => 'setAvailFrom', - 'cashEquiv' => 'setCashEquiv', - 'availTo' => 'setAvailTo', - 'freeFuel' => 'setFreeFuel' + 'zeroEmissionsMileage' => 'setZeroEmissionsMileage' ]; /** @@ -239,18 +239,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'make' => 'getMake', - 'firstRegd' => 'getFirstRegd', + 'amendment' => 'getAmendment', + 'availFrom' => 'getAvailFrom', + 'availTo' => 'getAvailTo', 'cO2' => 'getCO2', - 'zeroEmissionsMileage' => 'getZeroEmissionsMileage', + 'cashEquiv' => 'getCashEquiv', + 'firstRegd' => 'getFirstRegd', + 'freeFuel' => 'getFreeFuel', 'fuel' => 'getFuel', 'id' => 'getId', - 'amendment' => 'getAmendment', + 'make' => 'getMake', 'price' => 'getPrice', - 'availFrom' => 'getAvailFrom', - 'cashEquiv' => 'getCashEquiv', - 'availTo' => 'getAvailTo', - 'freeFuel' => 'getFreeFuel' + 'zeroEmissionsMileage' => 'getZeroEmissionsMileage' ]; /** @@ -309,18 +309,18 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('make', $data ?? [], null); - $this->setIfExists('firstRegd', $data ?? [], null); - $this->setIfExists('cO2', $data ?? [], null); - $this->setIfExists('zeroEmissionsMileage', $data ?? [], null); - $this->setIfExists('fuel', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('amendment', $data ?? [], null); - $this->setIfExists('price', $data ?? [], null); $this->setIfExists('availFrom', $data ?? [], null); - $this->setIfExists('cashEquiv', $data ?? [], null); $this->setIfExists('availTo', $data ?? [], null); + $this->setIfExists('cO2', $data ?? [], null); + $this->setIfExists('cashEquiv', $data ?? [], null); + $this->setIfExists('firstRegd', $data ?? [], null); $this->setIfExists('freeFuel', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('make', $data ?? [], null); + $this->setIfExists('price', $data ?? [], null); + $this->setIfExists('zeroEmissionsMileage', $data ?? [], null); } /** @@ -366,402 +366,402 @@ public function valid(): bool /** - * Gets make + * Gets amendment * * @return string|null */ - public function getMake(): ?string + public function getAmendment(): ?string { - return $this->container['make']; + return $this->container['amendment']; } /** - * Sets make + * Sets amendment * - * @param string|null $make make + * @param string|null $amendment amendment * * @return $this */ - public function setMake(?string $make): static + public function setAmendment(?string $amendment): static { - if (is_null($make)) { - array_push($this->openAPINullablesSetToNull, 'make'); + if (is_null($amendment)) { + array_push($this->openAPINullablesSetToNull, 'amendment'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('make', $nullablesSetToNull); + $index = array_search('amendment', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['make'] = $make; + $this->container['amendment'] = $amendment; return $this; } /** - * Gets firstRegd + * Gets availFrom * * @return string|null */ - public function getFirstRegd(): ?string + public function getAvailFrom(): ?string { - return $this->container['firstRegd']; + return $this->container['availFrom']; } /** - * Sets firstRegd + * Sets availFrom * - * @param string|null $firstRegd firstRegd + * @param string|null $availFrom availFrom * * @return $this */ - public function setFirstRegd(?string $firstRegd): static + public function setAvailFrom(?string $availFrom): static { - if (is_null($firstRegd)) { - array_push($this->openAPINullablesSetToNull, 'firstRegd'); + if (is_null($availFrom)) { + array_push($this->openAPINullablesSetToNull, 'availFrom'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('firstRegd', $nullablesSetToNull); + $index = array_search('availFrom', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['firstRegd'] = $firstRegd; + $this->container['availFrom'] = $availFrom; return $this; } /** - * Gets cO2 + * Gets availTo * * @return string|null */ - public function getCO2(): ?string + public function getAvailTo(): ?string { - return $this->container['cO2']; + return $this->container['availTo']; } /** - * Sets cO2 + * Sets availTo * - * @param string|null $cO2 cO2 + * @param string|null $availTo availTo * * @return $this */ - public function setCO2(?string $cO2): static + public function setAvailTo(?string $availTo): static { - if (is_null($cO2)) { - array_push($this->openAPINullablesSetToNull, 'cO2'); + if (is_null($availTo)) { + array_push($this->openAPINullablesSetToNull, 'availTo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cO2', $nullablesSetToNull); + $index = array_search('availTo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cO2'] = $cO2; + $this->container['availTo'] = $availTo; return $this; } /** - * Gets zeroEmissionsMileage + * Gets cO2 * * @return string|null */ - public function getZeroEmissionsMileage(): ?string + public function getCO2(): ?string { - return $this->container['zeroEmissionsMileage']; + return $this->container['cO2']; } /** - * Sets zeroEmissionsMileage + * Sets cO2 * - * @param string|null $zeroEmissionsMileage zeroEmissionsMileage + * @param string|null $cO2 cO2 * * @return $this */ - public function setZeroEmissionsMileage(?string $zeroEmissionsMileage): static + public function setCO2(?string $cO2): static { - if (is_null($zeroEmissionsMileage)) { - array_push($this->openAPINullablesSetToNull, 'zeroEmissionsMileage'); + if (is_null($cO2)) { + array_push($this->openAPINullablesSetToNull, 'cO2'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('zeroEmissionsMileage', $nullablesSetToNull); + $index = array_search('cO2', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['zeroEmissionsMileage'] = $zeroEmissionsMileage; + $this->container['cO2'] = $cO2; return $this; } /** - * Gets fuel + * Gets cashEquiv * * @return string|null */ - public function getFuel(): ?string + public function getCashEquiv(): ?string { - return $this->container['fuel']; + return $this->container['cashEquiv']; } /** - * Sets fuel + * Sets cashEquiv * - * @param string|null $fuel fuel + * @param string|null $cashEquiv cashEquiv * * @return $this */ - public function setFuel(?string $fuel): static + public function setCashEquiv(?string $cashEquiv): static { - if (is_null($fuel)) { - array_push($this->openAPINullablesSetToNull, 'fuel'); + if (is_null($cashEquiv)) { + array_push($this->openAPINullablesSetToNull, 'cashEquiv'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fuel', $nullablesSetToNull); + $index = array_search('cashEquiv', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['fuel'] = $fuel; + $this->container['cashEquiv'] = $cashEquiv; return $this; } /** - * Gets id + * Gets firstRegd * * @return string|null */ - public function getId(): ?string + public function getFirstRegd(): ?string { - return $this->container['id']; + return $this->container['firstRegd']; } /** - * Sets id + * Sets firstRegd * - * @param string|null $id id + * @param string|null $firstRegd firstRegd * * @return $this */ - public function setId(?string $id): static + public function setFirstRegd(?string $firstRegd): static { - if (is_null($id)) { - array_push($this->openAPINullablesSetToNull, 'id'); + if (is_null($firstRegd)) { + array_push($this->openAPINullablesSetToNull, 'firstRegd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('id', $nullablesSetToNull); + $index = array_search('firstRegd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['id'] = $id; + $this->container['firstRegd'] = $firstRegd; return $this; } /** - * Gets amendment + * Gets freeFuel * - * @return string|null + * @return \SynergiTech\Staffology\Model\FpsCarFuel|null */ - public function getAmendment(): ?string + public function getFreeFuel(): ?\SynergiTech\Staffology\Model\FpsCarFuel { - return $this->container['amendment']; + return $this->container['freeFuel']; } /** - * Sets amendment + * Sets freeFuel * - * @param string|null $amendment amendment + * @param \SynergiTech\Staffology\Model\FpsCarFuel|null $freeFuel freeFuel * * @return $this */ - public function setAmendment(?string $amendment): static + public function setFreeFuel(?\SynergiTech\Staffology\Model\FpsCarFuel $freeFuel): static { - if (is_null($amendment)) { - array_push($this->openAPINullablesSetToNull, 'amendment'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('amendment', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($freeFuel)) { + throw new InvalidArgumentException('non-nullable freeFuel cannot be null'); } - $this->container['amendment'] = $amendment; + $this->container['freeFuel'] = $freeFuel; return $this; } /** - * Gets price + * Gets fuel * * @return string|null */ - public function getPrice(): ?string + public function getFuel(): ?string { - return $this->container['price']; + return $this->container['fuel']; } /** - * Sets price + * Sets fuel * - * @param string|null $price price + * @param string|null $fuel fuel * * @return $this */ - public function setPrice(?string $price): static + public function setFuel(?string $fuel): static { - if (is_null($price)) { - array_push($this->openAPINullablesSetToNull, 'price'); + if (is_null($fuel)) { + array_push($this->openAPINullablesSetToNull, 'fuel'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('price', $nullablesSetToNull); + $index = array_search('fuel', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['price'] = $price; + $this->container['fuel'] = $fuel; return $this; } /** - * Gets availFrom + * Gets id * * @return string|null */ - public function getAvailFrom(): ?string + public function getId(): ?string { - return $this->container['availFrom']; + return $this->container['id']; } /** - * Sets availFrom + * Sets id * - * @param string|null $availFrom availFrom + * @param string|null $id id * * @return $this */ - public function setAvailFrom(?string $availFrom): static + public function setId(?string $id): static { - if (is_null($availFrom)) { - array_push($this->openAPINullablesSetToNull, 'availFrom'); + if (is_null($id)) { + array_push($this->openAPINullablesSetToNull, 'id'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('availFrom', $nullablesSetToNull); + $index = array_search('id', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['availFrom'] = $availFrom; + $this->container['id'] = $id; return $this; } /** - * Gets cashEquiv + * Gets make * * @return string|null */ - public function getCashEquiv(): ?string + public function getMake(): ?string { - return $this->container['cashEquiv']; + return $this->container['make']; } /** - * Sets cashEquiv + * Sets make * - * @param string|null $cashEquiv cashEquiv + * @param string|null $make make * * @return $this */ - public function setCashEquiv(?string $cashEquiv): static + public function setMake(?string $make): static { - if (is_null($cashEquiv)) { - array_push($this->openAPINullablesSetToNull, 'cashEquiv'); + if (is_null($make)) { + array_push($this->openAPINullablesSetToNull, 'make'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cashEquiv', $nullablesSetToNull); + $index = array_search('make', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cashEquiv'] = $cashEquiv; + $this->container['make'] = $make; return $this; } /** - * Gets availTo + * Gets price * * @return string|null */ - public function getAvailTo(): ?string + public function getPrice(): ?string { - return $this->container['availTo']; + return $this->container['price']; } /** - * Sets availTo + * Sets price * - * @param string|null $availTo availTo + * @param string|null $price price * * @return $this */ - public function setAvailTo(?string $availTo): static + public function setPrice(?string $price): static { - if (is_null($availTo)) { - array_push($this->openAPINullablesSetToNull, 'availTo'); + if (is_null($price)) { + array_push($this->openAPINullablesSetToNull, 'price'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('availTo', $nullablesSetToNull); + $index = array_search('price', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['availTo'] = $availTo; + $this->container['price'] = $price; return $this; } /** - * Gets freeFuel + * Gets zeroEmissionsMileage * - * @return \SynergiTech\Staffology\Model\FpsCarFuel|null + * @return string|null */ - public function getFreeFuel(): ?\SynergiTech\Staffology\Model\FpsCarFuel + public function getZeroEmissionsMileage(): ?string { - return $this->container['freeFuel']; + return $this->container['zeroEmissionsMileage']; } /** - * Sets freeFuel + * Sets zeroEmissionsMileage * - * @param \SynergiTech\Staffology\Model\FpsCarFuel|null $freeFuel freeFuel + * @param string|null $zeroEmissionsMileage zeroEmissionsMileage * * @return $this */ - public function setFreeFuel(?\SynergiTech\Staffology\Model\FpsCarFuel $freeFuel): static + public function setZeroEmissionsMileage(?string $zeroEmissionsMileage): static { - if (is_null($freeFuel)) { - throw new InvalidArgumentException('non-nullable freeFuel cannot be null'); + if (is_null($zeroEmissionsMileage)) { + array_push($this->openAPINullablesSetToNull, 'zeroEmissionsMileage'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('zeroEmissionsMileage', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['freeFuel'] = $freeFuel; + $this->container['zeroEmissionsMileage'] = $zeroEmissionsMileage; return $this; } diff --git a/src/Model/FpsCarFuel.php b/src/Model/FpsCarFuel.php index 9436921..f3eafcd 100644 --- a/src/Model/FpsCarFuel.php +++ b/src/Model/FpsCarFuel.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class FpsCarFuel implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'provided' => 'string', 'cashEquiv' => 'string', + 'provided' => 'string', 'withdrawn' => 'string' ]; @@ -70,8 +70,8 @@ class FpsCarFuel implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'provided' => null, 'cashEquiv' => null, + 'provided' => null, 'withdrawn' => null ]; @@ -81,8 +81,8 @@ class FpsCarFuel implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'provided' => true, 'cashEquiv' => true, + 'provided' => true, 'withdrawn' => true ]; @@ -172,8 +172,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'provided' => 'provided', 'cashEquiv' => 'cashEquiv', + 'provided' => 'provided', 'withdrawn' => 'withdrawn' ]; @@ -183,8 +183,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'provided' => 'setProvided', 'cashEquiv' => 'setCashEquiv', + 'provided' => 'setProvided', 'withdrawn' => 'setWithdrawn' ]; @@ -194,8 +194,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'provided' => 'getProvided', 'cashEquiv' => 'getCashEquiv', + 'provided' => 'getProvided', 'withdrawn' => 'getWithdrawn' ]; @@ -255,8 +255,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('provided', $data ?? [], null); $this->setIfExists('cashEquiv', $data ?? [], null); + $this->setIfExists('provided', $data ?? [], null); $this->setIfExists('withdrawn', $data ?? [], null); } @@ -303,69 +303,69 @@ public function valid(): bool /** - * Gets provided + * Gets cashEquiv * * @return string|null */ - public function getProvided(): ?string + public function getCashEquiv(): ?string { - return $this->container['provided']; + return $this->container['cashEquiv']; } /** - * Sets provided + * Sets cashEquiv * - * @param string|null $provided provided + * @param string|null $cashEquiv cashEquiv * * @return $this */ - public function setProvided(?string $provided): static + public function setCashEquiv(?string $cashEquiv): static { - if (is_null($provided)) { - array_push($this->openAPINullablesSetToNull, 'provided'); + if (is_null($cashEquiv)) { + array_push($this->openAPINullablesSetToNull, 'cashEquiv'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('provided', $nullablesSetToNull); + $index = array_search('cashEquiv', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['provided'] = $provided; + $this->container['cashEquiv'] = $cashEquiv; return $this; } /** - * Gets cashEquiv + * Gets provided * * @return string|null */ - public function getCashEquiv(): ?string + public function getProvided(): ?string { - return $this->container['cashEquiv']; + return $this->container['provided']; } /** - * Sets cashEquiv + * Sets provided * - * @param string|null $cashEquiv cashEquiv + * @param string|null $provided provided * * @return $this */ - public function setCashEquiv(?string $cashEquiv): static + public function setProvided(?string $provided): static { - if (is_null($cashEquiv)) { - array_push($this->openAPINullablesSetToNull, 'cashEquiv'); + if (is_null($provided)) { + array_push($this->openAPINullablesSetToNull, 'provided'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cashEquiv', $nullablesSetToNull); + $index = array_search('provided', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cashEquiv'] = $cashEquiv; + $this->container['provided'] = $provided; return $this; } diff --git a/src/Model/FpsEmployee.php b/src/Model/FpsEmployee.php index b099f32..4be6096 100644 --- a/src/Model/FpsEmployee.php +++ b/src/Model/FpsEmployee.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class FpsEmployee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'payrunEntryId' => 'string', - 'employeeUniqueId' => 'string', - 'item' => '\SynergiTech\Staffology\Model\Item', 'employeeDetails' => '\SynergiTech\Staffology\Model\FpsEmployeeDetails', + 'employeeUniqueId' => 'string', 'employment' => '\SynergiTech\Staffology\Model\FpsEmployment', + 'item' => '\SynergiTech\Staffology\Model\Item', + 'payrunEntryId' => 'string', 'validationWarnings' => '\SynergiTech\Staffology\Model\RtiValidationWarning[]' ]; @@ -73,11 +73,11 @@ class FpsEmployee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'payrunEntryId' => 'uuid', - 'employeeUniqueId' => 'uuid', - 'item' => null, 'employeeDetails' => null, + 'employeeUniqueId' => 'uuid', 'employment' => null, + 'item' => null, + 'payrunEntryId' => 'uuid', 'validationWarnings' => null ]; @@ -87,11 +87,11 @@ class FpsEmployee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'payrunEntryId' => false, - 'employeeUniqueId' => false, - 'item' => false, 'employeeDetails' => false, + 'employeeUniqueId' => false, 'employment' => false, + 'item' => false, + 'payrunEntryId' => false, 'validationWarnings' => true ]; @@ -181,11 +181,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrunEntryId' => 'payrunEntryId', - 'employeeUniqueId' => 'employeeUniqueId', - 'item' => 'item', 'employeeDetails' => 'employeeDetails', + 'employeeUniqueId' => 'employeeUniqueId', 'employment' => 'employment', + 'item' => 'item', + 'payrunEntryId' => 'payrunEntryId', 'validationWarnings' => 'validationWarnings' ]; @@ -195,11 +195,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrunEntryId' => 'setPayrunEntryId', - 'employeeUniqueId' => 'setEmployeeUniqueId', - 'item' => 'setItem', 'employeeDetails' => 'setEmployeeDetails', + 'employeeUniqueId' => 'setEmployeeUniqueId', 'employment' => 'setEmployment', + 'item' => 'setItem', + 'payrunEntryId' => 'setPayrunEntryId', 'validationWarnings' => 'setValidationWarnings' ]; @@ -209,11 +209,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrunEntryId' => 'getPayrunEntryId', - 'employeeUniqueId' => 'getEmployeeUniqueId', - 'item' => 'getItem', 'employeeDetails' => 'getEmployeeDetails', + 'employeeUniqueId' => 'getEmployeeUniqueId', 'employment' => 'getEmployment', + 'item' => 'getItem', + 'payrunEntryId' => 'getPayrunEntryId', 'validationWarnings' => 'getValidationWarnings' ]; @@ -273,11 +273,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrunEntryId', $data ?? [], null); - $this->setIfExists('employeeUniqueId', $data ?? [], null); - $this->setIfExists('item', $data ?? [], null); $this->setIfExists('employeeDetails', $data ?? [], null); + $this->setIfExists('employeeUniqueId', $data ?? [], null); $this->setIfExists('employment', $data ?? [], null); + $this->setIfExists('item', $data ?? [], null); + $this->setIfExists('payrunEntryId', $data ?? [], null); $this->setIfExists('validationWarnings', $data ?? [], null); } @@ -324,28 +324,28 @@ public function valid(): bool /** - * Gets payrunEntryId + * Gets employeeDetails * - * @return string|null + * @return \SynergiTech\Staffology\Model\FpsEmployeeDetails|null */ - public function getPayrunEntryId(): ?string + public function getEmployeeDetails(): ?\SynergiTech\Staffology\Model\FpsEmployeeDetails { - return $this->container['payrunEntryId']; + return $this->container['employeeDetails']; } /** - * Sets payrunEntryId + * Sets employeeDetails * - * @param string|null $payrunEntryId payrunEntryId + * @param \SynergiTech\Staffology\Model\FpsEmployeeDetails|null $employeeDetails employeeDetails * * @return $this */ - public function setPayrunEntryId(?string $payrunEntryId): static + public function setEmployeeDetails(?\SynergiTech\Staffology\Model\FpsEmployeeDetails $employeeDetails): static { - if (is_null($payrunEntryId)) { - throw new InvalidArgumentException('non-nullable payrunEntryId cannot be null'); + if (is_null($employeeDetails)) { + throw new InvalidArgumentException('non-nullable employeeDetails cannot be null'); } - $this->container['payrunEntryId'] = $payrunEntryId; + $this->container['employeeDetails'] = $employeeDetails; return $this; } @@ -378,82 +378,82 @@ public function setEmployeeUniqueId(?string $employeeUniqueId): static } /** - * Gets item + * Gets employment * - * @return \SynergiTech\Staffology\Model\Item|null + * @return \SynergiTech\Staffology\Model\FpsEmployment|null */ - public function getItem(): ?\SynergiTech\Staffology\Model\Item + public function getEmployment(): ?\SynergiTech\Staffology\Model\FpsEmployment { - return $this->container['item']; + return $this->container['employment']; } /** - * Sets item + * Sets employment * - * @param \SynergiTech\Staffology\Model\Item|null $item item + * @param \SynergiTech\Staffology\Model\FpsEmployment|null $employment employment * * @return $this */ - public function setItem(?\SynergiTech\Staffology\Model\Item $item): static + public function setEmployment(?\SynergiTech\Staffology\Model\FpsEmployment $employment): static { - if (is_null($item)) { - throw new InvalidArgumentException('non-nullable item cannot be null'); + if (is_null($employment)) { + throw new InvalidArgumentException('non-nullable employment cannot be null'); } - $this->container['item'] = $item; + $this->container['employment'] = $employment; return $this; } /** - * Gets employeeDetails + * Gets item * - * @return \SynergiTech\Staffology\Model\FpsEmployeeDetails|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getEmployeeDetails(): ?\SynergiTech\Staffology\Model\FpsEmployeeDetails + public function getItem(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['employeeDetails']; + return $this->container['item']; } /** - * Sets employeeDetails + * Sets item * - * @param \SynergiTech\Staffology\Model\FpsEmployeeDetails|null $employeeDetails employeeDetails + * @param \SynergiTech\Staffology\Model\Item|null $item item * * @return $this */ - public function setEmployeeDetails(?\SynergiTech\Staffology\Model\FpsEmployeeDetails $employeeDetails): static + public function setItem(?\SynergiTech\Staffology\Model\Item $item): static { - if (is_null($employeeDetails)) { - throw new InvalidArgumentException('non-nullable employeeDetails cannot be null'); + if (is_null($item)) { + throw new InvalidArgumentException('non-nullable item cannot be null'); } - $this->container['employeeDetails'] = $employeeDetails; + $this->container['item'] = $item; return $this; } /** - * Gets employment + * Gets payrunEntryId * - * @return \SynergiTech\Staffology\Model\FpsEmployment|null + * @return string|null */ - public function getEmployment(): ?\SynergiTech\Staffology\Model\FpsEmployment + public function getPayrunEntryId(): ?string { - return $this->container['employment']; + return $this->container['payrunEntryId']; } /** - * Sets employment + * Sets payrunEntryId * - * @param \SynergiTech\Staffology\Model\FpsEmployment|null $employment employment + * @param string|null $payrunEntryId payrunEntryId * * @return $this */ - public function setEmployment(?\SynergiTech\Staffology\Model\FpsEmployment $employment): static + public function setPayrunEntryId(?string $payrunEntryId): static { - if (is_null($employment)) { - throw new InvalidArgumentException('non-nullable employment cannot be null'); + if (is_null($payrunEntryId)) { + throw new InvalidArgumentException('non-nullable payrunEntryId cannot be null'); } - $this->container['employment'] = $employment; + $this->container['payrunEntryId'] = $payrunEntryId; return $this; } diff --git a/src/Model/FpsEmployeeDetails.php b/src/Model/FpsEmployeeDetails.php index e982bb4..2d71694 100644 --- a/src/Model/FpsEmployeeDetails.php +++ b/src/Model/FpsEmployeeDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class FpsEmployeeDetails implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'nino' => 'string', - 'name' => '\SynergiTech\Staffology\Model\RtiEmployeeName', 'address' => '\SynergiTech\Staffology\Model\RtiEmployeeAddress', 'birthDate' => 'string', 'gender' => 'string', - 'passportNumber' => 'string', - 'partnerDetails' => '\SynergiTech\Staffology\Model\FpsEmployeeDetailsPartnerDetails' + 'name' => '\SynergiTech\Staffology\Model\RtiEmployeeName', + 'nino' => 'string', + 'partnerDetails' => '\SynergiTech\Staffology\Model\FpsEmployeeDetailsPartnerDetails', + 'passportNumber' => 'string' ]; /** @@ -74,13 +74,13 @@ class FpsEmployeeDetails implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'nino' => null, - 'name' => null, 'address' => null, 'birthDate' => null, 'gender' => null, - 'passportNumber' => null, - 'partnerDetails' => null + 'name' => null, + 'nino' => null, + 'partnerDetails' => null, + 'passportNumber' => null ]; /** @@ -89,13 +89,13 @@ class FpsEmployeeDetails implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'nino' => true, - 'name' => false, 'address' => false, 'birthDate' => true, 'gender' => true, - 'passportNumber' => true, - 'partnerDetails' => false + 'name' => false, + 'nino' => true, + 'partnerDetails' => false, + 'passportNumber' => true ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'nino' => 'nino', - 'name' => 'name', 'address' => 'address', 'birthDate' => 'birthDate', 'gender' => 'gender', - 'passportNumber' => 'passportNumber', - 'partnerDetails' => 'partnerDetails' + 'name' => 'name', + 'nino' => 'nino', + 'partnerDetails' => 'partnerDetails', + 'passportNumber' => 'passportNumber' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'nino' => 'setNino', - 'name' => 'setName', 'address' => 'setAddress', 'birthDate' => 'setBirthDate', 'gender' => 'setGender', - 'passportNumber' => 'setPassportNumber', - 'partnerDetails' => 'setPartnerDetails' + 'name' => 'setName', + 'nino' => 'setNino', + 'partnerDetails' => 'setPartnerDetails', + 'passportNumber' => 'setPassportNumber' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'nino' => 'getNino', - 'name' => 'getName', 'address' => 'getAddress', 'birthDate' => 'getBirthDate', 'gender' => 'getGender', - 'passportNumber' => 'getPassportNumber', - 'partnerDetails' => 'getPartnerDetails' + 'name' => 'getName', + 'nino' => 'getNino', + 'partnerDetails' => 'getPartnerDetails', + 'passportNumber' => 'getPassportNumber' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('nino', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('address', $data ?? [], null); $this->setIfExists('birthDate', $data ?? [], null); $this->setIfExists('gender', $data ?? [], null); - $this->setIfExists('passportNumber', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('nino', $data ?? [], null); $this->setIfExists('partnerDetails', $data ?? [], null); + $this->setIfExists('passportNumber', $data ?? [], null); } /** @@ -330,67 +330,6 @@ public function valid(): bool } - /** - * Gets nino - * - * @return string|null - */ - public function getNino(): ?string - { - return $this->container['nino']; - } - - /** - * Sets nino - * - * @param string|null $nino nino - * - * @return $this - */ - public function setNino(?string $nino): static - { - if (is_null($nino)) { - array_push($this->openAPINullablesSetToNull, 'nino'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nino', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['nino'] = $nino; - - return $this; - } - - /** - * Gets name - * - * @return \SynergiTech\Staffology\Model\RtiEmployeeName|null - */ - public function getName(): ?\SynergiTech\Staffology\Model\RtiEmployeeName - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param \SynergiTech\Staffology\Model\RtiEmployeeName|null $name name - * - * @return $this - */ - public function setName(?\SynergiTech\Staffology\Model\RtiEmployeeName $name): static - { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); - } - $this->container['name'] = $name; - - return $this; - } - /** * Gets address * @@ -487,35 +426,62 @@ public function setGender(?string $gender): static } /** - * Gets passportNumber + * Gets name + * + * @return \SynergiTech\Staffology\Model\RtiEmployeeName|null + */ + public function getName(): ?\SynergiTech\Staffology\Model\RtiEmployeeName + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param \SynergiTech\Staffology\Model\RtiEmployeeName|null $name name + * + * @return $this + */ + public function setName(?\SynergiTech\Staffology\Model\RtiEmployeeName $name): static + { + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets nino * * @return string|null */ - public function getPassportNumber(): ?string + public function getNino(): ?string { - return $this->container['passportNumber']; + return $this->container['nino']; } /** - * Sets passportNumber + * Sets nino * - * @param string|null $passportNumber passportNumber + * @param string|null $nino nino * * @return $this */ - public function setPassportNumber(?string $passportNumber): static + public function setNino(?string $nino): static { - if (is_null($passportNumber)) { - array_push($this->openAPINullablesSetToNull, 'passportNumber'); + if (is_null($nino)) { + array_push($this->openAPINullablesSetToNull, 'nino'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('passportNumber', $nullablesSetToNull); + $index = array_search('nino', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['passportNumber'] = $passportNumber; + $this->container['nino'] = $nino; return $this; } @@ -546,6 +512,40 @@ public function setPartnerDetails(?\SynergiTech\Staffology\Model\FpsEmployeeDeta return $this; } + + /** + * Gets passportNumber + * + * @return string|null + */ + public function getPassportNumber(): ?string + { + return $this->container['passportNumber']; + } + + /** + * Sets passportNumber + * + * @param string|null $passportNumber passportNumber + * + * @return $this + */ + public function setPassportNumber(?string $passportNumber): static + { + if (is_null($passportNumber)) { + array_push($this->openAPINullablesSetToNull, 'passportNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('passportNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['passportNumber'] = $passportNumber; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/FpsEmployeeDetailsPartnerDetails.php b/src/Model/FpsEmployeeDetailsPartnerDetails.php index 5e7565a..0d6095c 100644 --- a/src/Model/FpsEmployeeDetailsPartnerDetails.php +++ b/src/Model/FpsEmployeeDetailsPartnerDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class FpsEmployeeDetailsPartnerDetails implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ - 'nino' => 'string', - 'name' => '\SynergiTech\Staffology\Model\RtiEmployeeName' + 'name' => '\SynergiTech\Staffology\Model\RtiEmployeeName', + 'nino' => 'string' ]; /** @@ -69,8 +69,8 @@ class FpsEmployeeDetailsPartnerDetails implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPIFormats = [ - 'nino' => null, - 'name' => null + 'name' => null, + 'nino' => null ]; /** @@ -79,8 +79,8 @@ class FpsEmployeeDetailsPartnerDetails implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPINullables = [ - 'nino' => true, - 'name' => false + 'name' => false, + 'nino' => true ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'nino' => 'nino', - 'name' => 'name' + 'name' => 'name', + 'nino' => 'nino' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'nino' => 'setNino', - 'name' => 'setName' + 'name' => 'setName', + 'nino' => 'setNino' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'nino' => 'getNino', - 'name' => 'getName' + 'name' => 'getName', + 'nino' => 'getNino' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('nino', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('nino', $data ?? [], null); } /** @@ -296,62 +296,62 @@ public function valid(): bool /** - * Gets nino + * Gets name * - * @return string|null + * @return \SynergiTech\Staffology\Model\RtiEmployeeName|null */ - public function getNino(): ?string + public function getName(): ?\SynergiTech\Staffology\Model\RtiEmployeeName { - return $this->container['nino']; + return $this->container['name']; } /** - * Sets nino + * Sets name * - * @param string|null $nino nino + * @param \SynergiTech\Staffology\Model\RtiEmployeeName|null $name name * * @return $this */ - public function setNino(?string $nino): static + public function setName(?\SynergiTech\Staffology\Model\RtiEmployeeName $name): static { - if (is_null($nino)) { - array_push($this->openAPINullablesSetToNull, 'nino'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nino', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['nino'] = $nino; + $this->container['name'] = $name; return $this; } /** - * Gets name + * Gets nino * - * @return \SynergiTech\Staffology\Model\RtiEmployeeName|null + * @return string|null */ - public function getName(): ?\SynergiTech\Staffology\Model\RtiEmployeeName + public function getNino(): ?string { - return $this->container['name']; + return $this->container['nino']; } /** - * Sets name + * Sets nino * - * @param \SynergiTech\Staffology\Model\RtiEmployeeName|null $name name + * @param string|null $nino nino * * @return $this */ - public function setName(?\SynergiTech\Staffology\Model\RtiEmployeeName $name): static + public function setNino(?string $nino): static { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($nino)) { + array_push($this->openAPINullablesSetToNull, 'nino'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('nino', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['name'] = $name; + $this->container['nino'] = $nino; return $this; } diff --git a/src/Model/FpsEmployeeFigsToDate.php b/src/Model/FpsEmployeeFigsToDate.php index a623ae9..720e011 100644 --- a/src/Model/FpsEmployeeFigsToDate.php +++ b/src/Model/FpsEmployeeFigsToDate.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,37 +59,37 @@ class FpsEmployeeFigsToDate implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPITypes = [ - 'taxablePay' => 'string', - 'totalTax' => 'string', - 'studentLoansTD' => 'string', - 'postgradLoansTD' => 'string', + 'additions' => 'string', + 'adjustments' => 'string', 'benefitsTaxedViaPayrollYTD' => 'string', - 'empeePenContribnsPaidYTD' => 'string', + 'deductions' => 'string', 'empeePenContribnsNotPaidYTD' => 'string', - 'smpytd' => 'string', - 'sppytd' => 'string', + 'empeePenContribnsPaidYTD' => 'string', + 'employeePensionContribution' => 'string', + 'employeePensionContributionAvc' => 'string', + 'employerPensionContribution' => 'string', + 'foreignTaxAmount' => 'string', + 'foreignTaxAmountReclaimed' => 'string', + 'gross' => 'string', + 'mapsMiles' => 'string', + 'netPay' => 'string', + 'nonTaxOrNICPmt' => 'string', + 'paymentAfterLeaving' => 'string', + 'pensionableEarnings' => 'string', + 'pensionablePay' => 'string', + 'postgradLoansTD' => 'string', 'sapytd' => 'string', 'shppytd' => 'string', - 'spbpytd' => 'string', + 'smpytd' => 'string', 'sncpytd' => 'string', + 'spbpytd' => 'string', + 'sppytd' => 'string', 'sspytd' => 'string', - 'gross' => 'string', - 'netPay' => 'string', - 'additions' => 'string', - 'deductions' => 'string', + 'studentLoansTD' => 'string', 'takeHomePay' => 'string', - 'adjustments' => 'string', - 'mapsMiles' => 'string', - 'foreignTaxAmount' => 'string', - 'foreignTaxAmountReclaimed' => 'string', - 'pensionableEarnings' => 'string', - 'pensionablePay' => 'string', - 'employerPensionContribution' => 'string', - 'employeePensionContribution' => 'string', - 'employeePensionContributionAvc' => 'string', - 'paymentAfterLeaving' => 'string', 'taxOnPaymentAfterLeaving' => 'string', - 'nonTaxOrNICPmt' => 'string' + 'taxablePay' => 'string', + 'totalTax' => 'string' ]; /** @@ -98,37 +98,37 @@ class FpsEmployeeFigsToDate implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPIFormats = [ - 'taxablePay' => null, - 'totalTax' => null, - 'studentLoansTD' => null, - 'postgradLoansTD' => null, + 'additions' => null, + 'adjustments' => null, 'benefitsTaxedViaPayrollYTD' => null, - 'empeePenContribnsPaidYTD' => null, + 'deductions' => null, 'empeePenContribnsNotPaidYTD' => null, - 'smpytd' => null, - 'sppytd' => null, + 'empeePenContribnsPaidYTD' => null, + 'employeePensionContribution' => null, + 'employeePensionContributionAvc' => null, + 'employerPensionContribution' => null, + 'foreignTaxAmount' => null, + 'foreignTaxAmountReclaimed' => null, + 'gross' => null, + 'mapsMiles' => null, + 'netPay' => null, + 'nonTaxOrNICPmt' => null, + 'paymentAfterLeaving' => null, + 'pensionableEarnings' => null, + 'pensionablePay' => null, + 'postgradLoansTD' => null, 'sapytd' => null, 'shppytd' => null, - 'spbpytd' => null, + 'smpytd' => null, 'sncpytd' => null, + 'spbpytd' => null, + 'sppytd' => null, 'sspytd' => null, - 'gross' => null, - 'netPay' => null, - 'additions' => null, - 'deductions' => null, + 'studentLoansTD' => null, 'takeHomePay' => null, - 'adjustments' => null, - 'mapsMiles' => null, - 'foreignTaxAmount' => null, - 'foreignTaxAmountReclaimed' => null, - 'pensionableEarnings' => null, - 'pensionablePay' => null, - 'employerPensionContribution' => null, - 'employeePensionContribution' => null, - 'employeePensionContributionAvc' => null, - 'paymentAfterLeaving' => null, 'taxOnPaymentAfterLeaving' => null, - 'nonTaxOrNICPmt' => null + 'taxablePay' => null, + 'totalTax' => null ]; /** @@ -137,37 +137,37 @@ class FpsEmployeeFigsToDate implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPINullables = [ - 'taxablePay' => true, - 'totalTax' => true, - 'studentLoansTD' => true, - 'postgradLoansTD' => true, + 'additions' => true, + 'adjustments' => true, 'benefitsTaxedViaPayrollYTD' => true, - 'empeePenContribnsPaidYTD' => true, + 'deductions' => true, 'empeePenContribnsNotPaidYTD' => true, - 'smpytd' => true, - 'sppytd' => true, + 'empeePenContribnsPaidYTD' => true, + 'employeePensionContribution' => true, + 'employeePensionContributionAvc' => true, + 'employerPensionContribution' => true, + 'foreignTaxAmount' => true, + 'foreignTaxAmountReclaimed' => true, + 'gross' => true, + 'mapsMiles' => true, + 'netPay' => true, + 'nonTaxOrNICPmt' => true, + 'paymentAfterLeaving' => true, + 'pensionableEarnings' => true, + 'pensionablePay' => true, + 'postgradLoansTD' => true, 'sapytd' => true, 'shppytd' => true, - 'spbpytd' => true, + 'smpytd' => true, 'sncpytd' => true, + 'spbpytd' => true, + 'sppytd' => true, 'sspytd' => true, - 'gross' => true, - 'netPay' => true, - 'additions' => true, - 'deductions' => true, + 'studentLoansTD' => true, 'takeHomePay' => true, - 'adjustments' => true, - 'mapsMiles' => true, - 'foreignTaxAmount' => true, - 'foreignTaxAmountReclaimed' => true, - 'pensionableEarnings' => true, - 'pensionablePay' => true, - 'employerPensionContribution' => true, - 'employeePensionContribution' => true, - 'employeePensionContributionAvc' => true, - 'paymentAfterLeaving' => true, 'taxOnPaymentAfterLeaving' => true, - 'nonTaxOrNICPmt' => true + 'taxablePay' => true, + 'totalTax' => true ]; /** @@ -256,37 +256,37 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'taxablePay' => 'taxablePay', - 'totalTax' => 'totalTax', - 'studentLoansTD' => 'studentLoansTD', - 'postgradLoansTD' => 'postgradLoansTD', + 'additions' => 'additions', + 'adjustments' => 'adjustments', 'benefitsTaxedViaPayrollYTD' => 'benefitsTaxedViaPayrollYTD', - 'empeePenContribnsPaidYTD' => 'empeePenContribnsPaidYTD', + 'deductions' => 'deductions', 'empeePenContribnsNotPaidYTD' => 'empeePenContribnsNotPaidYTD', - 'smpytd' => 'smpytd', - 'sppytd' => 'sppytd', + 'empeePenContribnsPaidYTD' => 'empeePenContribnsPaidYTD', + 'employeePensionContribution' => 'employeePensionContribution', + 'employeePensionContributionAvc' => 'employeePensionContributionAvc', + 'employerPensionContribution' => 'employerPensionContribution', + 'foreignTaxAmount' => 'foreignTaxAmount', + 'foreignTaxAmountReclaimed' => 'foreignTaxAmountReclaimed', + 'gross' => 'gross', + 'mapsMiles' => 'mapsMiles', + 'netPay' => 'netPay', + 'nonTaxOrNICPmt' => 'nonTaxOrNICPmt', + 'paymentAfterLeaving' => 'paymentAfterLeaving', + 'pensionableEarnings' => 'pensionableEarnings', + 'pensionablePay' => 'pensionablePay', + 'postgradLoansTD' => 'postgradLoansTD', 'sapytd' => 'sapytd', 'shppytd' => 'shppytd', - 'spbpytd' => 'spbpytd', + 'smpytd' => 'smpytd', 'sncpytd' => 'sncpytd', + 'spbpytd' => 'spbpytd', + 'sppytd' => 'sppytd', 'sspytd' => 'sspytd', - 'gross' => 'gross', - 'netPay' => 'netPay', - 'additions' => 'additions', - 'deductions' => 'deductions', + 'studentLoansTD' => 'studentLoansTD', 'takeHomePay' => 'takeHomePay', - 'adjustments' => 'adjustments', - 'mapsMiles' => 'mapsMiles', - 'foreignTaxAmount' => 'foreignTaxAmount', - 'foreignTaxAmountReclaimed' => 'foreignTaxAmountReclaimed', - 'pensionableEarnings' => 'pensionableEarnings', - 'pensionablePay' => 'pensionablePay', - 'employerPensionContribution' => 'employerPensionContribution', - 'employeePensionContribution' => 'employeePensionContribution', - 'employeePensionContributionAvc' => 'employeePensionContributionAvc', - 'paymentAfterLeaving' => 'paymentAfterLeaving', 'taxOnPaymentAfterLeaving' => 'taxOnPaymentAfterLeaving', - 'nonTaxOrNICPmt' => 'nonTaxOrNICPmt' + 'taxablePay' => 'taxablePay', + 'totalTax' => 'totalTax' ]; /** @@ -295,37 +295,37 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'taxablePay' => 'setTaxablePay', - 'totalTax' => 'setTotalTax', - 'studentLoansTD' => 'setStudentLoansTD', - 'postgradLoansTD' => 'setPostgradLoansTD', + 'additions' => 'setAdditions', + 'adjustments' => 'setAdjustments', 'benefitsTaxedViaPayrollYTD' => 'setBenefitsTaxedViaPayrollYTD', - 'empeePenContribnsPaidYTD' => 'setEmpeePenContribnsPaidYTD', + 'deductions' => 'setDeductions', 'empeePenContribnsNotPaidYTD' => 'setEmpeePenContribnsNotPaidYTD', - 'smpytd' => 'setSmpytd', - 'sppytd' => 'setSppytd', + 'empeePenContribnsPaidYTD' => 'setEmpeePenContribnsPaidYTD', + 'employeePensionContribution' => 'setEmployeePensionContribution', + 'employeePensionContributionAvc' => 'setEmployeePensionContributionAvc', + 'employerPensionContribution' => 'setEmployerPensionContribution', + 'foreignTaxAmount' => 'setForeignTaxAmount', + 'foreignTaxAmountReclaimed' => 'setForeignTaxAmountReclaimed', + 'gross' => 'setGross', + 'mapsMiles' => 'setMapsMiles', + 'netPay' => 'setNetPay', + 'nonTaxOrNICPmt' => 'setNonTaxOrNICPmt', + 'paymentAfterLeaving' => 'setPaymentAfterLeaving', + 'pensionableEarnings' => 'setPensionableEarnings', + 'pensionablePay' => 'setPensionablePay', + 'postgradLoansTD' => 'setPostgradLoansTD', 'sapytd' => 'setSapytd', 'shppytd' => 'setShppytd', - 'spbpytd' => 'setSpbpytd', + 'smpytd' => 'setSmpytd', 'sncpytd' => 'setSncpytd', + 'spbpytd' => 'setSpbpytd', + 'sppytd' => 'setSppytd', 'sspytd' => 'setSspytd', - 'gross' => 'setGross', - 'netPay' => 'setNetPay', - 'additions' => 'setAdditions', - 'deductions' => 'setDeductions', + 'studentLoansTD' => 'setStudentLoansTD', 'takeHomePay' => 'setTakeHomePay', - 'adjustments' => 'setAdjustments', - 'mapsMiles' => 'setMapsMiles', - 'foreignTaxAmount' => 'setForeignTaxAmount', - 'foreignTaxAmountReclaimed' => 'setForeignTaxAmountReclaimed', - 'pensionableEarnings' => 'setPensionableEarnings', - 'pensionablePay' => 'setPensionablePay', - 'employerPensionContribution' => 'setEmployerPensionContribution', - 'employeePensionContribution' => 'setEmployeePensionContribution', - 'employeePensionContributionAvc' => 'setEmployeePensionContributionAvc', - 'paymentAfterLeaving' => 'setPaymentAfterLeaving', 'taxOnPaymentAfterLeaving' => 'setTaxOnPaymentAfterLeaving', - 'nonTaxOrNICPmt' => 'setNonTaxOrNICPmt' + 'taxablePay' => 'setTaxablePay', + 'totalTax' => 'setTotalTax' ]; /** @@ -334,37 +334,37 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'taxablePay' => 'getTaxablePay', - 'totalTax' => 'getTotalTax', - 'studentLoansTD' => 'getStudentLoansTD', - 'postgradLoansTD' => 'getPostgradLoansTD', + 'additions' => 'getAdditions', + 'adjustments' => 'getAdjustments', 'benefitsTaxedViaPayrollYTD' => 'getBenefitsTaxedViaPayrollYTD', - 'empeePenContribnsPaidYTD' => 'getEmpeePenContribnsPaidYTD', + 'deductions' => 'getDeductions', 'empeePenContribnsNotPaidYTD' => 'getEmpeePenContribnsNotPaidYTD', - 'smpytd' => 'getSmpytd', - 'sppytd' => 'getSppytd', + 'empeePenContribnsPaidYTD' => 'getEmpeePenContribnsPaidYTD', + 'employeePensionContribution' => 'getEmployeePensionContribution', + 'employeePensionContributionAvc' => 'getEmployeePensionContributionAvc', + 'employerPensionContribution' => 'getEmployerPensionContribution', + 'foreignTaxAmount' => 'getForeignTaxAmount', + 'foreignTaxAmountReclaimed' => 'getForeignTaxAmountReclaimed', + 'gross' => 'getGross', + 'mapsMiles' => 'getMapsMiles', + 'netPay' => 'getNetPay', + 'nonTaxOrNICPmt' => 'getNonTaxOrNICPmt', + 'paymentAfterLeaving' => 'getPaymentAfterLeaving', + 'pensionableEarnings' => 'getPensionableEarnings', + 'pensionablePay' => 'getPensionablePay', + 'postgradLoansTD' => 'getPostgradLoansTD', 'sapytd' => 'getSapytd', 'shppytd' => 'getShppytd', - 'spbpytd' => 'getSpbpytd', + 'smpytd' => 'getSmpytd', 'sncpytd' => 'getSncpytd', + 'spbpytd' => 'getSpbpytd', + 'sppytd' => 'getSppytd', 'sspytd' => 'getSspytd', - 'gross' => 'getGross', - 'netPay' => 'getNetPay', - 'additions' => 'getAdditions', - 'deductions' => 'getDeductions', + 'studentLoansTD' => 'getStudentLoansTD', 'takeHomePay' => 'getTakeHomePay', - 'adjustments' => 'getAdjustments', - 'mapsMiles' => 'getMapsMiles', - 'foreignTaxAmount' => 'getForeignTaxAmount', - 'foreignTaxAmountReclaimed' => 'getForeignTaxAmountReclaimed', - 'pensionableEarnings' => 'getPensionableEarnings', - 'pensionablePay' => 'getPensionablePay', - 'employerPensionContribution' => 'getEmployerPensionContribution', - 'employeePensionContribution' => 'getEmployeePensionContribution', - 'employeePensionContributionAvc' => 'getEmployeePensionContributionAvc', - 'paymentAfterLeaving' => 'getPaymentAfterLeaving', 'taxOnPaymentAfterLeaving' => 'getTaxOnPaymentAfterLeaving', - 'nonTaxOrNICPmt' => 'getNonTaxOrNICPmt' + 'taxablePay' => 'getTaxablePay', + 'totalTax' => 'getTotalTax' ]; /** @@ -423,37 +423,37 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('taxablePay', $data ?? [], null); - $this->setIfExists('totalTax', $data ?? [], null); - $this->setIfExists('studentLoansTD', $data ?? [], null); - $this->setIfExists('postgradLoansTD', $data ?? [], null); + $this->setIfExists('additions', $data ?? [], null); + $this->setIfExists('adjustments', $data ?? [], null); $this->setIfExists('benefitsTaxedViaPayrollYTD', $data ?? [], null); - $this->setIfExists('empeePenContribnsPaidYTD', $data ?? [], null); + $this->setIfExists('deductions', $data ?? [], null); $this->setIfExists('empeePenContribnsNotPaidYTD', $data ?? [], null); - $this->setIfExists('smpytd', $data ?? [], null); - $this->setIfExists('sppytd', $data ?? [], null); + $this->setIfExists('empeePenContribnsPaidYTD', $data ?? [], null); + $this->setIfExists('employeePensionContribution', $data ?? [], null); + $this->setIfExists('employeePensionContributionAvc', $data ?? [], null); + $this->setIfExists('employerPensionContribution', $data ?? [], null); + $this->setIfExists('foreignTaxAmount', $data ?? [], null); + $this->setIfExists('foreignTaxAmountReclaimed', $data ?? [], null); + $this->setIfExists('gross', $data ?? [], null); + $this->setIfExists('mapsMiles', $data ?? [], null); + $this->setIfExists('netPay', $data ?? [], null); + $this->setIfExists('nonTaxOrNICPmt', $data ?? [], null); + $this->setIfExists('paymentAfterLeaving', $data ?? [], null); + $this->setIfExists('pensionableEarnings', $data ?? [], null); + $this->setIfExists('pensionablePay', $data ?? [], null); + $this->setIfExists('postgradLoansTD', $data ?? [], null); $this->setIfExists('sapytd', $data ?? [], null); $this->setIfExists('shppytd', $data ?? [], null); - $this->setIfExists('spbpytd', $data ?? [], null); + $this->setIfExists('smpytd', $data ?? [], null); $this->setIfExists('sncpytd', $data ?? [], null); + $this->setIfExists('spbpytd', $data ?? [], null); + $this->setIfExists('sppytd', $data ?? [], null); $this->setIfExists('sspytd', $data ?? [], null); - $this->setIfExists('gross', $data ?? [], null); - $this->setIfExists('netPay', $data ?? [], null); - $this->setIfExists('additions', $data ?? [], null); - $this->setIfExists('deductions', $data ?? [], null); + $this->setIfExists('studentLoansTD', $data ?? [], null); $this->setIfExists('takeHomePay', $data ?? [], null); - $this->setIfExists('adjustments', $data ?? [], null); - $this->setIfExists('mapsMiles', $data ?? [], null); - $this->setIfExists('foreignTaxAmount', $data ?? [], null); - $this->setIfExists('foreignTaxAmountReclaimed', $data ?? [], null); - $this->setIfExists('pensionableEarnings', $data ?? [], null); - $this->setIfExists('pensionablePay', $data ?? [], null); - $this->setIfExists('employerPensionContribution', $data ?? [], null); - $this->setIfExists('employeePensionContribution', $data ?? [], null); - $this->setIfExists('employeePensionContributionAvc', $data ?? [], null); - $this->setIfExists('paymentAfterLeaving', $data ?? [], null); $this->setIfExists('taxOnPaymentAfterLeaving', $data ?? [], null); - $this->setIfExists('nonTaxOrNICPmt', $data ?? [], null); + $this->setIfExists('taxablePay', $data ?? [], null); + $this->setIfExists('totalTax', $data ?? [], null); } /** @@ -499,171 +499,171 @@ public function valid(): bool /** - * Gets taxablePay + * Gets additions * * @return string|null */ - public function getTaxablePay(): ?string + public function getAdditions(): ?string { - return $this->container['taxablePay']; + return $this->container['additions']; } /** - * Sets taxablePay + * Sets additions * - * @param string|null $taxablePay taxablePay + * @param string|null $additions additions * * @return $this */ - public function setTaxablePay(?string $taxablePay): static + public function setAdditions(?string $additions): static { - if (is_null($taxablePay)) { - array_push($this->openAPINullablesSetToNull, 'taxablePay'); + if (is_null($additions)) { + array_push($this->openAPINullablesSetToNull, 'additions'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxablePay', $nullablesSetToNull); + $index = array_search('additions', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxablePay'] = $taxablePay; + $this->container['additions'] = $additions; return $this; } /** - * Gets totalTax + * Gets adjustments * * @return string|null */ - public function getTotalTax(): ?string + public function getAdjustments(): ?string { - return $this->container['totalTax']; + return $this->container['adjustments']; } /** - * Sets totalTax + * Sets adjustments * - * @param string|null $totalTax totalTax + * @param string|null $adjustments adjustments * * @return $this */ - public function setTotalTax(?string $totalTax): static + public function setAdjustments(?string $adjustments): static { - if (is_null($totalTax)) { - array_push($this->openAPINullablesSetToNull, 'totalTax'); + if (is_null($adjustments)) { + array_push($this->openAPINullablesSetToNull, 'adjustments'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalTax', $nullablesSetToNull); + $index = array_search('adjustments', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['totalTax'] = $totalTax; + $this->container['adjustments'] = $adjustments; return $this; } /** - * Gets studentLoansTD + * Gets benefitsTaxedViaPayrollYTD * * @return string|null */ - public function getStudentLoansTD(): ?string + public function getBenefitsTaxedViaPayrollYTD(): ?string { - return $this->container['studentLoansTD']; + return $this->container['benefitsTaxedViaPayrollYTD']; } /** - * Sets studentLoansTD + * Sets benefitsTaxedViaPayrollYTD * - * @param string|null $studentLoansTD studentLoansTD + * @param string|null $benefitsTaxedViaPayrollYTD benefitsTaxedViaPayrollYTD * * @return $this */ - public function setStudentLoansTD(?string $studentLoansTD): static + public function setBenefitsTaxedViaPayrollYTD(?string $benefitsTaxedViaPayrollYTD): static { - if (is_null($studentLoansTD)) { - array_push($this->openAPINullablesSetToNull, 'studentLoansTD'); + if (is_null($benefitsTaxedViaPayrollYTD)) { + array_push($this->openAPINullablesSetToNull, 'benefitsTaxedViaPayrollYTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('studentLoansTD', $nullablesSetToNull); + $index = array_search('benefitsTaxedViaPayrollYTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['studentLoansTD'] = $studentLoansTD; + $this->container['benefitsTaxedViaPayrollYTD'] = $benefitsTaxedViaPayrollYTD; return $this; } /** - * Gets postgradLoansTD + * Gets deductions * * @return string|null */ - public function getPostgradLoansTD(): ?string + public function getDeductions(): ?string { - return $this->container['postgradLoansTD']; + return $this->container['deductions']; } /** - * Sets postgradLoansTD + * Sets deductions * - * @param string|null $postgradLoansTD postgradLoansTD + * @param string|null $deductions deductions * * @return $this */ - public function setPostgradLoansTD(?string $postgradLoansTD): static + public function setDeductions(?string $deductions): static { - if (is_null($postgradLoansTD)) { - array_push($this->openAPINullablesSetToNull, 'postgradLoansTD'); + if (is_null($deductions)) { + array_push($this->openAPINullablesSetToNull, 'deductions'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('postgradLoansTD', $nullablesSetToNull); + $index = array_search('deductions', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['postgradLoansTD'] = $postgradLoansTD; + $this->container['deductions'] = $deductions; return $this; } /** - * Gets benefitsTaxedViaPayrollYTD + * Gets empeePenContribnsNotPaidYTD * * @return string|null */ - public function getBenefitsTaxedViaPayrollYTD(): ?string + public function getEmpeePenContribnsNotPaidYTD(): ?string { - return $this->container['benefitsTaxedViaPayrollYTD']; + return $this->container['empeePenContribnsNotPaidYTD']; } /** - * Sets benefitsTaxedViaPayrollYTD + * Sets empeePenContribnsNotPaidYTD * - * @param string|null $benefitsTaxedViaPayrollYTD benefitsTaxedViaPayrollYTD + * @param string|null $empeePenContribnsNotPaidYTD empeePenContribnsNotPaidYTD * * @return $this */ - public function setBenefitsTaxedViaPayrollYTD(?string $benefitsTaxedViaPayrollYTD): static + public function setEmpeePenContribnsNotPaidYTD(?string $empeePenContribnsNotPaidYTD): static { - if (is_null($benefitsTaxedViaPayrollYTD)) { - array_push($this->openAPINullablesSetToNull, 'benefitsTaxedViaPayrollYTD'); + if (is_null($empeePenContribnsNotPaidYTD)) { + array_push($this->openAPINullablesSetToNull, 'empeePenContribnsNotPaidYTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('benefitsTaxedViaPayrollYTD', $nullablesSetToNull); + $index = array_search('empeePenContribnsNotPaidYTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['benefitsTaxedViaPayrollYTD'] = $benefitsTaxedViaPayrollYTD; + $this->container['empeePenContribnsNotPaidYTD'] = $empeePenContribnsNotPaidYTD; return $this; } @@ -703,851 +703,851 @@ public function setEmpeePenContribnsPaidYTD(?string $empeePenContribnsPaidYTD): } /** - * Gets empeePenContribnsNotPaidYTD + * Gets employeePensionContribution * * @return string|null */ - public function getEmpeePenContribnsNotPaidYTD(): ?string + public function getEmployeePensionContribution(): ?string { - return $this->container['empeePenContribnsNotPaidYTD']; + return $this->container['employeePensionContribution']; } /** - * Sets empeePenContribnsNotPaidYTD + * Sets employeePensionContribution * - * @param string|null $empeePenContribnsNotPaidYTD empeePenContribnsNotPaidYTD + * @param string|null $employeePensionContribution employeePensionContribution * * @return $this */ - public function setEmpeePenContribnsNotPaidYTD(?string $empeePenContribnsNotPaidYTD): static + public function setEmployeePensionContribution(?string $employeePensionContribution): static { - if (is_null($empeePenContribnsNotPaidYTD)) { - array_push($this->openAPINullablesSetToNull, 'empeePenContribnsNotPaidYTD'); + if (is_null($employeePensionContribution)) { + array_push($this->openAPINullablesSetToNull, 'employeePensionContribution'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('empeePenContribnsNotPaidYTD', $nullablesSetToNull); + $index = array_search('employeePensionContribution', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['empeePenContribnsNotPaidYTD'] = $empeePenContribnsNotPaidYTD; + $this->container['employeePensionContribution'] = $employeePensionContribution; return $this; } /** - * Gets smpytd + * Gets employeePensionContributionAvc * * @return string|null */ - public function getSmpytd(): ?string + public function getEmployeePensionContributionAvc(): ?string { - return $this->container['smpytd']; + return $this->container['employeePensionContributionAvc']; } /** - * Sets smpytd + * Sets employeePensionContributionAvc * - * @param string|null $smpytd smpytd + * @param string|null $employeePensionContributionAvc employeePensionContributionAvc * * @return $this */ - public function setSmpytd(?string $smpytd): static + public function setEmployeePensionContributionAvc(?string $employeePensionContributionAvc): static { - if (is_null($smpytd)) { - array_push($this->openAPINullablesSetToNull, 'smpytd'); + if (is_null($employeePensionContributionAvc)) { + array_push($this->openAPINullablesSetToNull, 'employeePensionContributionAvc'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('smpytd', $nullablesSetToNull); + $index = array_search('employeePensionContributionAvc', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['smpytd'] = $smpytd; + $this->container['employeePensionContributionAvc'] = $employeePensionContributionAvc; return $this; } /** - * Gets sppytd + * Gets employerPensionContribution * * @return string|null */ - public function getSppytd(): ?string + public function getEmployerPensionContribution(): ?string { - return $this->container['sppytd']; + return $this->container['employerPensionContribution']; } /** - * Sets sppytd + * Sets employerPensionContribution * - * @param string|null $sppytd sppytd + * @param string|null $employerPensionContribution employerPensionContribution * * @return $this */ - public function setSppytd(?string $sppytd): static + public function setEmployerPensionContribution(?string $employerPensionContribution): static { - if (is_null($sppytd)) { - array_push($this->openAPINullablesSetToNull, 'sppytd'); + if (is_null($employerPensionContribution)) { + array_push($this->openAPINullablesSetToNull, 'employerPensionContribution'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('sppytd', $nullablesSetToNull); + $index = array_search('employerPensionContribution', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['sppytd'] = $sppytd; + $this->container['employerPensionContribution'] = $employerPensionContribution; return $this; } /** - * Gets sapytd + * Gets foreignTaxAmount * * @return string|null */ - public function getSapytd(): ?string + public function getForeignTaxAmount(): ?string { - return $this->container['sapytd']; + return $this->container['foreignTaxAmount']; } /** - * Sets sapytd + * Sets foreignTaxAmount * - * @param string|null $sapytd sapytd + * @param string|null $foreignTaxAmount foreignTaxAmount * * @return $this */ - public function setSapytd(?string $sapytd): static + public function setForeignTaxAmount(?string $foreignTaxAmount): static { - if (is_null($sapytd)) { - array_push($this->openAPINullablesSetToNull, 'sapytd'); + if (is_null($foreignTaxAmount)) { + array_push($this->openAPINullablesSetToNull, 'foreignTaxAmount'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('sapytd', $nullablesSetToNull); + $index = array_search('foreignTaxAmount', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['sapytd'] = $sapytd; + $this->container['foreignTaxAmount'] = $foreignTaxAmount; return $this; } /** - * Gets shppytd + * Gets foreignTaxAmountReclaimed * * @return string|null */ - public function getShppytd(): ?string + public function getForeignTaxAmountReclaimed(): ?string { - return $this->container['shppytd']; + return $this->container['foreignTaxAmountReclaimed']; } /** - * Sets shppytd + * Sets foreignTaxAmountReclaimed * - * @param string|null $shppytd shppytd + * @param string|null $foreignTaxAmountReclaimed foreignTaxAmountReclaimed * * @return $this */ - public function setShppytd(?string $shppytd): static + public function setForeignTaxAmountReclaimed(?string $foreignTaxAmountReclaimed): static { - if (is_null($shppytd)) { - array_push($this->openAPINullablesSetToNull, 'shppytd'); + if (is_null($foreignTaxAmountReclaimed)) { + array_push($this->openAPINullablesSetToNull, 'foreignTaxAmountReclaimed'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('shppytd', $nullablesSetToNull); + $index = array_search('foreignTaxAmountReclaimed', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['shppytd'] = $shppytd; + $this->container['foreignTaxAmountReclaimed'] = $foreignTaxAmountReclaimed; return $this; } /** - * Gets spbpytd + * Gets gross * * @return string|null */ - public function getSpbpytd(): ?string + public function getGross(): ?string { - return $this->container['spbpytd']; + return $this->container['gross']; } /** - * Sets spbpytd + * Sets gross * - * @param string|null $spbpytd spbpytd + * @param string|null $gross gross * * @return $this */ - public function setSpbpytd(?string $spbpytd): static + public function setGross(?string $gross): static { - if (is_null($spbpytd)) { - array_push($this->openAPINullablesSetToNull, 'spbpytd'); + if (is_null($gross)) { + array_push($this->openAPINullablesSetToNull, 'gross'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('spbpytd', $nullablesSetToNull); + $index = array_search('gross', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['spbpytd'] = $spbpytd; + $this->container['gross'] = $gross; return $this; } /** - * Gets sncpytd + * Gets mapsMiles * * @return string|null */ - public function getSncpytd(): ?string + public function getMapsMiles(): ?string { - return $this->container['sncpytd']; + return $this->container['mapsMiles']; } /** - * Sets sncpytd + * Sets mapsMiles * - * @param string|null $sncpytd sncpytd + * @param string|null $mapsMiles mapsMiles * * @return $this */ - public function setSncpytd(?string $sncpytd): static + public function setMapsMiles(?string $mapsMiles): static { - if (is_null($sncpytd)) { - array_push($this->openAPINullablesSetToNull, 'sncpytd'); + if (is_null($mapsMiles)) { + array_push($this->openAPINullablesSetToNull, 'mapsMiles'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('sncpytd', $nullablesSetToNull); + $index = array_search('mapsMiles', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['sncpytd'] = $sncpytd; + $this->container['mapsMiles'] = $mapsMiles; return $this; } /** - * Gets sspytd + * Gets netPay * * @return string|null */ - public function getSspytd(): ?string + public function getNetPay(): ?string { - return $this->container['sspytd']; + return $this->container['netPay']; } /** - * Sets sspytd + * Sets netPay * - * @param string|null $sspytd sspytd + * @param string|null $netPay netPay * * @return $this */ - public function setSspytd(?string $sspytd): static + public function setNetPay(?string $netPay): static { - if (is_null($sspytd)) { - array_push($this->openAPINullablesSetToNull, 'sspytd'); + if (is_null($netPay)) { + array_push($this->openAPINullablesSetToNull, 'netPay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('sspytd', $nullablesSetToNull); + $index = array_search('netPay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['sspytd'] = $sspytd; + $this->container['netPay'] = $netPay; return $this; } /** - * Gets gross + * Gets nonTaxOrNICPmt * * @return string|null */ - public function getGross(): ?string + public function getNonTaxOrNICPmt(): ?string { - return $this->container['gross']; + return $this->container['nonTaxOrNICPmt']; } /** - * Sets gross + * Sets nonTaxOrNICPmt * - * @param string|null $gross gross + * @param string|null $nonTaxOrNICPmt nonTaxOrNICPmt * * @return $this */ - public function setGross(?string $gross): static + public function setNonTaxOrNICPmt(?string $nonTaxOrNICPmt): static { - if (is_null($gross)) { - array_push($this->openAPINullablesSetToNull, 'gross'); + if (is_null($nonTaxOrNICPmt)) { + array_push($this->openAPINullablesSetToNull, 'nonTaxOrNICPmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('gross', $nullablesSetToNull); + $index = array_search('nonTaxOrNICPmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['gross'] = $gross; + $this->container['nonTaxOrNICPmt'] = $nonTaxOrNICPmt; return $this; } /** - * Gets netPay + * Gets paymentAfterLeaving * * @return string|null */ - public function getNetPay(): ?string + public function getPaymentAfterLeaving(): ?string { - return $this->container['netPay']; + return $this->container['paymentAfterLeaving']; } /** - * Sets netPay + * Sets paymentAfterLeaving * - * @param string|null $netPay netPay + * @param string|null $paymentAfterLeaving paymentAfterLeaving * * @return $this */ - public function setNetPay(?string $netPay): static + public function setPaymentAfterLeaving(?string $paymentAfterLeaving): static { - if (is_null($netPay)) { - array_push($this->openAPINullablesSetToNull, 'netPay'); + if (is_null($paymentAfterLeaving)) { + array_push($this->openAPINullablesSetToNull, 'paymentAfterLeaving'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('netPay', $nullablesSetToNull); + $index = array_search('paymentAfterLeaving', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['netPay'] = $netPay; + $this->container['paymentAfterLeaving'] = $paymentAfterLeaving; return $this; } /** - * Gets additions + * Gets pensionableEarnings * * @return string|null */ - public function getAdditions(): ?string + public function getPensionableEarnings(): ?string { - return $this->container['additions']; + return $this->container['pensionableEarnings']; } /** - * Sets additions + * Sets pensionableEarnings * - * @param string|null $additions additions + * @param string|null $pensionableEarnings pensionableEarnings * * @return $this */ - public function setAdditions(?string $additions): static + public function setPensionableEarnings(?string $pensionableEarnings): static { - if (is_null($additions)) { - array_push($this->openAPINullablesSetToNull, 'additions'); + if (is_null($pensionableEarnings)) { + array_push($this->openAPINullablesSetToNull, 'pensionableEarnings'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('additions', $nullablesSetToNull); + $index = array_search('pensionableEarnings', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['additions'] = $additions; + $this->container['pensionableEarnings'] = $pensionableEarnings; return $this; } /** - * Gets deductions + * Gets pensionablePay * * @return string|null */ - public function getDeductions(): ?string + public function getPensionablePay(): ?string { - return $this->container['deductions']; + return $this->container['pensionablePay']; } /** - * Sets deductions + * Sets pensionablePay * - * @param string|null $deductions deductions + * @param string|null $pensionablePay pensionablePay * * @return $this */ - public function setDeductions(?string $deductions): static + public function setPensionablePay(?string $pensionablePay): static { - if (is_null($deductions)) { - array_push($this->openAPINullablesSetToNull, 'deductions'); + if (is_null($pensionablePay)) { + array_push($this->openAPINullablesSetToNull, 'pensionablePay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('deductions', $nullablesSetToNull); + $index = array_search('pensionablePay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['deductions'] = $deductions; + $this->container['pensionablePay'] = $pensionablePay; return $this; } /** - * Gets takeHomePay + * Gets postgradLoansTD * * @return string|null */ - public function getTakeHomePay(): ?string + public function getPostgradLoansTD(): ?string { - return $this->container['takeHomePay']; + return $this->container['postgradLoansTD']; } /** - * Sets takeHomePay + * Sets postgradLoansTD * - * @param string|null $takeHomePay takeHomePay + * @param string|null $postgradLoansTD postgradLoansTD * * @return $this */ - public function setTakeHomePay(?string $takeHomePay): static + public function setPostgradLoansTD(?string $postgradLoansTD): static { - if (is_null($takeHomePay)) { - array_push($this->openAPINullablesSetToNull, 'takeHomePay'); + if (is_null($postgradLoansTD)) { + array_push($this->openAPINullablesSetToNull, 'postgradLoansTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('takeHomePay', $nullablesSetToNull); + $index = array_search('postgradLoansTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['takeHomePay'] = $takeHomePay; + $this->container['postgradLoansTD'] = $postgradLoansTD; return $this; } /** - * Gets adjustments + * Gets sapytd * * @return string|null */ - public function getAdjustments(): ?string + public function getSapytd(): ?string { - return $this->container['adjustments']; + return $this->container['sapytd']; } /** - * Sets adjustments + * Sets sapytd * - * @param string|null $adjustments adjustments + * @param string|null $sapytd sapytd * * @return $this */ - public function setAdjustments(?string $adjustments): static + public function setSapytd(?string $sapytd): static { - if (is_null($adjustments)) { - array_push($this->openAPINullablesSetToNull, 'adjustments'); + if (is_null($sapytd)) { + array_push($this->openAPINullablesSetToNull, 'sapytd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('adjustments', $nullablesSetToNull); + $index = array_search('sapytd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['adjustments'] = $adjustments; + $this->container['sapytd'] = $sapytd; return $this; } /** - * Gets mapsMiles + * Gets shppytd * * @return string|null */ - public function getMapsMiles(): ?string + public function getShppytd(): ?string { - return $this->container['mapsMiles']; + return $this->container['shppytd']; } /** - * Sets mapsMiles + * Sets shppytd * - * @param string|null $mapsMiles mapsMiles + * @param string|null $shppytd shppytd * * @return $this */ - public function setMapsMiles(?string $mapsMiles): static + public function setShppytd(?string $shppytd): static { - if (is_null($mapsMiles)) { - array_push($this->openAPINullablesSetToNull, 'mapsMiles'); + if (is_null($shppytd)) { + array_push($this->openAPINullablesSetToNull, 'shppytd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mapsMiles', $nullablesSetToNull); + $index = array_search('shppytd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['mapsMiles'] = $mapsMiles; + $this->container['shppytd'] = $shppytd; return $this; } /** - * Gets foreignTaxAmount + * Gets smpytd * * @return string|null */ - public function getForeignTaxAmount(): ?string + public function getSmpytd(): ?string { - return $this->container['foreignTaxAmount']; + return $this->container['smpytd']; } /** - * Sets foreignTaxAmount + * Sets smpytd * - * @param string|null $foreignTaxAmount foreignTaxAmount + * @param string|null $smpytd smpytd * * @return $this */ - public function setForeignTaxAmount(?string $foreignTaxAmount): static + public function setSmpytd(?string $smpytd): static { - if (is_null($foreignTaxAmount)) { - array_push($this->openAPINullablesSetToNull, 'foreignTaxAmount'); + if (is_null($smpytd)) { + array_push($this->openAPINullablesSetToNull, 'smpytd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('foreignTaxAmount', $nullablesSetToNull); + $index = array_search('smpytd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['foreignTaxAmount'] = $foreignTaxAmount; + $this->container['smpytd'] = $smpytd; return $this; } /** - * Gets foreignTaxAmountReclaimed + * Gets sncpytd * * @return string|null */ - public function getForeignTaxAmountReclaimed(): ?string + public function getSncpytd(): ?string { - return $this->container['foreignTaxAmountReclaimed']; + return $this->container['sncpytd']; } /** - * Sets foreignTaxAmountReclaimed + * Sets sncpytd * - * @param string|null $foreignTaxAmountReclaimed foreignTaxAmountReclaimed + * @param string|null $sncpytd sncpytd * * @return $this */ - public function setForeignTaxAmountReclaimed(?string $foreignTaxAmountReclaimed): static + public function setSncpytd(?string $sncpytd): static { - if (is_null($foreignTaxAmountReclaimed)) { - array_push($this->openAPINullablesSetToNull, 'foreignTaxAmountReclaimed'); + if (is_null($sncpytd)) { + array_push($this->openAPINullablesSetToNull, 'sncpytd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('foreignTaxAmountReclaimed', $nullablesSetToNull); + $index = array_search('sncpytd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['foreignTaxAmountReclaimed'] = $foreignTaxAmountReclaimed; + $this->container['sncpytd'] = $sncpytd; return $this; } /** - * Gets pensionableEarnings + * Gets spbpytd * * @return string|null */ - public function getPensionableEarnings(): ?string + public function getSpbpytd(): ?string { - return $this->container['pensionableEarnings']; + return $this->container['spbpytd']; } /** - * Sets pensionableEarnings + * Sets spbpytd * - * @param string|null $pensionableEarnings pensionableEarnings + * @param string|null $spbpytd spbpytd * * @return $this */ - public function setPensionableEarnings(?string $pensionableEarnings): static + public function setSpbpytd(?string $spbpytd): static { - if (is_null($pensionableEarnings)) { - array_push($this->openAPINullablesSetToNull, 'pensionableEarnings'); + if (is_null($spbpytd)) { + array_push($this->openAPINullablesSetToNull, 'spbpytd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionableEarnings', $nullablesSetToNull); + $index = array_search('spbpytd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionableEarnings'] = $pensionableEarnings; + $this->container['spbpytd'] = $spbpytd; return $this; } /** - * Gets pensionablePay + * Gets sppytd * * @return string|null */ - public function getPensionablePay(): ?string + public function getSppytd(): ?string { - return $this->container['pensionablePay']; + return $this->container['sppytd']; } /** - * Sets pensionablePay + * Sets sppytd * - * @param string|null $pensionablePay pensionablePay + * @param string|null $sppytd sppytd * * @return $this */ - public function setPensionablePay(?string $pensionablePay): static + public function setSppytd(?string $sppytd): static { - if (is_null($pensionablePay)) { - array_push($this->openAPINullablesSetToNull, 'pensionablePay'); + if (is_null($sppytd)) { + array_push($this->openAPINullablesSetToNull, 'sppytd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionablePay', $nullablesSetToNull); + $index = array_search('sppytd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionablePay'] = $pensionablePay; + $this->container['sppytd'] = $sppytd; return $this; } /** - * Gets employerPensionContribution + * Gets sspytd * * @return string|null */ - public function getEmployerPensionContribution(): ?string + public function getSspytd(): ?string { - return $this->container['employerPensionContribution']; + return $this->container['sspytd']; } /** - * Sets employerPensionContribution + * Sets sspytd * - * @param string|null $employerPensionContribution employerPensionContribution + * @param string|null $sspytd sspytd * * @return $this */ - public function setEmployerPensionContribution(?string $employerPensionContribution): static + public function setSspytd(?string $sspytd): static { - if (is_null($employerPensionContribution)) { - array_push($this->openAPINullablesSetToNull, 'employerPensionContribution'); + if (is_null($sspytd)) { + array_push($this->openAPINullablesSetToNull, 'sspytd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerPensionContribution', $nullablesSetToNull); + $index = array_search('sspytd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employerPensionContribution'] = $employerPensionContribution; + $this->container['sspytd'] = $sspytd; return $this; } /** - * Gets employeePensionContribution + * Gets studentLoansTD * * @return string|null */ - public function getEmployeePensionContribution(): ?string + public function getStudentLoansTD(): ?string { - return $this->container['employeePensionContribution']; + return $this->container['studentLoansTD']; } /** - * Sets employeePensionContribution + * Sets studentLoansTD * - * @param string|null $employeePensionContribution employeePensionContribution + * @param string|null $studentLoansTD studentLoansTD * * @return $this */ - public function setEmployeePensionContribution(?string $employeePensionContribution): static + public function setStudentLoansTD(?string $studentLoansTD): static { - if (is_null($employeePensionContribution)) { - array_push($this->openAPINullablesSetToNull, 'employeePensionContribution'); + if (is_null($studentLoansTD)) { + array_push($this->openAPINullablesSetToNull, 'studentLoansTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeePensionContribution', $nullablesSetToNull); + $index = array_search('studentLoansTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employeePensionContribution'] = $employeePensionContribution; + $this->container['studentLoansTD'] = $studentLoansTD; return $this; } /** - * Gets employeePensionContributionAvc + * Gets takeHomePay * * @return string|null */ - public function getEmployeePensionContributionAvc(): ?string + public function getTakeHomePay(): ?string { - return $this->container['employeePensionContributionAvc']; + return $this->container['takeHomePay']; } /** - * Sets employeePensionContributionAvc + * Sets takeHomePay * - * @param string|null $employeePensionContributionAvc employeePensionContributionAvc + * @param string|null $takeHomePay takeHomePay * * @return $this */ - public function setEmployeePensionContributionAvc(?string $employeePensionContributionAvc): static + public function setTakeHomePay(?string $takeHomePay): static { - if (is_null($employeePensionContributionAvc)) { - array_push($this->openAPINullablesSetToNull, 'employeePensionContributionAvc'); + if (is_null($takeHomePay)) { + array_push($this->openAPINullablesSetToNull, 'takeHomePay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeePensionContributionAvc', $nullablesSetToNull); + $index = array_search('takeHomePay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employeePensionContributionAvc'] = $employeePensionContributionAvc; + $this->container['takeHomePay'] = $takeHomePay; return $this; } /** - * Gets paymentAfterLeaving + * Gets taxOnPaymentAfterLeaving * * @return string|null */ - public function getPaymentAfterLeaving(): ?string + public function getTaxOnPaymentAfterLeaving(): ?string { - return $this->container['paymentAfterLeaving']; + return $this->container['taxOnPaymentAfterLeaving']; } /** - * Sets paymentAfterLeaving + * Sets taxOnPaymentAfterLeaving * - * @param string|null $paymentAfterLeaving paymentAfterLeaving + * @param string|null $taxOnPaymentAfterLeaving taxOnPaymentAfterLeaving * * @return $this */ - public function setPaymentAfterLeaving(?string $paymentAfterLeaving): static + public function setTaxOnPaymentAfterLeaving(?string $taxOnPaymentAfterLeaving): static { - if (is_null($paymentAfterLeaving)) { - array_push($this->openAPINullablesSetToNull, 'paymentAfterLeaving'); + if (is_null($taxOnPaymentAfterLeaving)) { + array_push($this->openAPINullablesSetToNull, 'taxOnPaymentAfterLeaving'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paymentAfterLeaving', $nullablesSetToNull); + $index = array_search('taxOnPaymentAfterLeaving', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['paymentAfterLeaving'] = $paymentAfterLeaving; + $this->container['taxOnPaymentAfterLeaving'] = $taxOnPaymentAfterLeaving; return $this; } /** - * Gets taxOnPaymentAfterLeaving + * Gets taxablePay * * @return string|null */ - public function getTaxOnPaymentAfterLeaving(): ?string + public function getTaxablePay(): ?string { - return $this->container['taxOnPaymentAfterLeaving']; + return $this->container['taxablePay']; } /** - * Sets taxOnPaymentAfterLeaving + * Sets taxablePay * - * @param string|null $taxOnPaymentAfterLeaving taxOnPaymentAfterLeaving + * @param string|null $taxablePay taxablePay * * @return $this */ - public function setTaxOnPaymentAfterLeaving(?string $taxOnPaymentAfterLeaving): static + public function setTaxablePay(?string $taxablePay): static { - if (is_null($taxOnPaymentAfterLeaving)) { - array_push($this->openAPINullablesSetToNull, 'taxOnPaymentAfterLeaving'); + if (is_null($taxablePay)) { + array_push($this->openAPINullablesSetToNull, 'taxablePay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxOnPaymentAfterLeaving', $nullablesSetToNull); + $index = array_search('taxablePay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxOnPaymentAfterLeaving'] = $taxOnPaymentAfterLeaving; + $this->container['taxablePay'] = $taxablePay; return $this; } /** - * Gets nonTaxOrNICPmt + * Gets totalTax * * @return string|null */ - public function getNonTaxOrNICPmt(): ?string + public function getTotalTax(): ?string { - return $this->container['nonTaxOrNICPmt']; + return $this->container['totalTax']; } /** - * Sets nonTaxOrNICPmt + * Sets totalTax * - * @param string|null $nonTaxOrNICPmt nonTaxOrNICPmt + * @param string|null $totalTax totalTax * * @return $this */ - public function setNonTaxOrNICPmt(?string $nonTaxOrNICPmt): static + public function setTotalTax(?string $totalTax): static { - if (is_null($nonTaxOrNICPmt)) { - array_push($this->openAPINullablesSetToNull, 'nonTaxOrNICPmt'); + if (is_null($totalTax)) { + array_push($this->openAPINullablesSetToNull, 'totalTax'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nonTaxOrNICPmt', $nullablesSetToNull); + $index = array_search('totalTax', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nonTaxOrNICPmt'] = $nonTaxOrNICPmt; + $this->container['totalTax'] = $totalTax; return $this; } diff --git a/src/Model/FpsEmployeeFlexibleDrawdown.php b/src/Model/FpsEmployeeFlexibleDrawdown.php index 25f5e7b..205d757 100644 --- a/src/Model/FpsEmployeeFlexibleDrawdown.php +++ b/src/Model/FpsEmployeeFlexibleDrawdown.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,12 +60,12 @@ class FpsEmployeeFlexibleDrawdown implements ModelInterface, ArrayAccess, JsonSe */ protected static array $openAPITypes = [ 'flexiblyAccessingPensionRights' => 'string', + 'nontaxablePayment' => 'string', + 'pensionCommencementExcess' => 'string', 'pensionDeathBenefit' => 'string', 'seriousIllHealthLumpSum' => 'string', 'standAloneLumpSum' => 'string', - 'pensionCommencementExcess' => 'string', - 'taxablePayment' => 'string', - 'nontaxablePayment' => 'string' + 'taxablePayment' => 'string' ]; /** @@ -75,12 +75,12 @@ class FpsEmployeeFlexibleDrawdown implements ModelInterface, ArrayAccess, JsonSe */ protected static array $openAPIFormats = [ 'flexiblyAccessingPensionRights' => null, + 'nontaxablePayment' => null, + 'pensionCommencementExcess' => null, 'pensionDeathBenefit' => null, 'seriousIllHealthLumpSum' => null, 'standAloneLumpSum' => null, - 'pensionCommencementExcess' => null, - 'taxablePayment' => null, - 'nontaxablePayment' => null + 'taxablePayment' => null ]; /** @@ -90,12 +90,12 @@ class FpsEmployeeFlexibleDrawdown implements ModelInterface, ArrayAccess, JsonSe */ protected static array $openAPINullables = [ 'flexiblyAccessingPensionRights' => true, + 'nontaxablePayment' => true, + 'pensionCommencementExcess' => true, 'pensionDeathBenefit' => true, 'seriousIllHealthLumpSum' => true, 'standAloneLumpSum' => true, - 'pensionCommencementExcess' => true, - 'taxablePayment' => true, - 'nontaxablePayment' => true + 'taxablePayment' => true ]; /** @@ -185,12 +185,12 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'flexiblyAccessingPensionRights' => 'flexiblyAccessingPensionRights', + 'nontaxablePayment' => 'nontaxablePayment', + 'pensionCommencementExcess' => 'pensionCommencementExcess', 'pensionDeathBenefit' => 'pensionDeathBenefit', 'seriousIllHealthLumpSum' => 'seriousIllHealthLumpSum', 'standAloneLumpSum' => 'standAloneLumpSum', - 'pensionCommencementExcess' => 'pensionCommencementExcess', - 'taxablePayment' => 'taxablePayment', - 'nontaxablePayment' => 'nontaxablePayment' + 'taxablePayment' => 'taxablePayment' ]; /** @@ -200,12 +200,12 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'flexiblyAccessingPensionRights' => 'setFlexiblyAccessingPensionRights', + 'nontaxablePayment' => 'setNontaxablePayment', + 'pensionCommencementExcess' => 'setPensionCommencementExcess', 'pensionDeathBenefit' => 'setPensionDeathBenefit', 'seriousIllHealthLumpSum' => 'setSeriousIllHealthLumpSum', 'standAloneLumpSum' => 'setStandAloneLumpSum', - 'pensionCommencementExcess' => 'setPensionCommencementExcess', - 'taxablePayment' => 'setTaxablePayment', - 'nontaxablePayment' => 'setNontaxablePayment' + 'taxablePayment' => 'setTaxablePayment' ]; /** @@ -215,12 +215,12 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'flexiblyAccessingPensionRights' => 'getFlexiblyAccessingPensionRights', + 'nontaxablePayment' => 'getNontaxablePayment', + 'pensionCommencementExcess' => 'getPensionCommencementExcess', 'pensionDeathBenefit' => 'getPensionDeathBenefit', 'seriousIllHealthLumpSum' => 'getSeriousIllHealthLumpSum', 'standAloneLumpSum' => 'getStandAloneLumpSum', - 'pensionCommencementExcess' => 'getPensionCommencementExcess', - 'taxablePayment' => 'getTaxablePayment', - 'nontaxablePayment' => 'getNontaxablePayment' + 'taxablePayment' => 'getTaxablePayment' ]; /** @@ -280,12 +280,12 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('flexiblyAccessingPensionRights', $data ?? [], null); + $this->setIfExists('nontaxablePayment', $data ?? [], null); + $this->setIfExists('pensionCommencementExcess', $data ?? [], null); $this->setIfExists('pensionDeathBenefit', $data ?? [], null); $this->setIfExists('seriousIllHealthLumpSum', $data ?? [], null); $this->setIfExists('standAloneLumpSum', $data ?? [], null); - $this->setIfExists('pensionCommencementExcess', $data ?? [], null); $this->setIfExists('taxablePayment', $data ?? [], null); - $this->setIfExists('nontaxablePayment', $data ?? [], null); } /** @@ -365,205 +365,205 @@ public function setFlexiblyAccessingPensionRights(?string $flexiblyAccessingPens } /** - * Gets pensionDeathBenefit + * Gets nontaxablePayment * * @return string|null */ - public function getPensionDeathBenefit(): ?string + public function getNontaxablePayment(): ?string { - return $this->container['pensionDeathBenefit']; + return $this->container['nontaxablePayment']; } /** - * Sets pensionDeathBenefit + * Sets nontaxablePayment * - * @param string|null $pensionDeathBenefit pensionDeathBenefit + * @param string|null $nontaxablePayment nontaxablePayment * * @return $this */ - public function setPensionDeathBenefit(?string $pensionDeathBenefit): static + public function setNontaxablePayment(?string $nontaxablePayment): static { - if (is_null($pensionDeathBenefit)) { - array_push($this->openAPINullablesSetToNull, 'pensionDeathBenefit'); + if (is_null($nontaxablePayment)) { + array_push($this->openAPINullablesSetToNull, 'nontaxablePayment'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionDeathBenefit', $nullablesSetToNull); + $index = array_search('nontaxablePayment', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionDeathBenefit'] = $pensionDeathBenefit; + $this->container['nontaxablePayment'] = $nontaxablePayment; return $this; } /** - * Gets seriousIllHealthLumpSum + * Gets pensionCommencementExcess * * @return string|null */ - public function getSeriousIllHealthLumpSum(): ?string + public function getPensionCommencementExcess(): ?string { - return $this->container['seriousIllHealthLumpSum']; + return $this->container['pensionCommencementExcess']; } /** - * Sets seriousIllHealthLumpSum + * Sets pensionCommencementExcess * - * @param string|null $seriousIllHealthLumpSum seriousIllHealthLumpSum + * @param string|null $pensionCommencementExcess pensionCommencementExcess * * @return $this */ - public function setSeriousIllHealthLumpSum(?string $seriousIllHealthLumpSum): static + public function setPensionCommencementExcess(?string $pensionCommencementExcess): static { - if (is_null($seriousIllHealthLumpSum)) { - array_push($this->openAPINullablesSetToNull, 'seriousIllHealthLumpSum'); + if (is_null($pensionCommencementExcess)) { + array_push($this->openAPINullablesSetToNull, 'pensionCommencementExcess'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('seriousIllHealthLumpSum', $nullablesSetToNull); + $index = array_search('pensionCommencementExcess', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['seriousIllHealthLumpSum'] = $seriousIllHealthLumpSum; + $this->container['pensionCommencementExcess'] = $pensionCommencementExcess; return $this; } /** - * Gets standAloneLumpSum + * Gets pensionDeathBenefit * * @return string|null */ - public function getStandAloneLumpSum(): ?string + public function getPensionDeathBenefit(): ?string { - return $this->container['standAloneLumpSum']; + return $this->container['pensionDeathBenefit']; } /** - * Sets standAloneLumpSum + * Sets pensionDeathBenefit * - * @param string|null $standAloneLumpSum standAloneLumpSum + * @param string|null $pensionDeathBenefit pensionDeathBenefit * * @return $this */ - public function setStandAloneLumpSum(?string $standAloneLumpSum): static + public function setPensionDeathBenefit(?string $pensionDeathBenefit): static { - if (is_null($standAloneLumpSum)) { - array_push($this->openAPINullablesSetToNull, 'standAloneLumpSum'); + if (is_null($pensionDeathBenefit)) { + array_push($this->openAPINullablesSetToNull, 'pensionDeathBenefit'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('standAloneLumpSum', $nullablesSetToNull); + $index = array_search('pensionDeathBenefit', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['standAloneLumpSum'] = $standAloneLumpSum; + $this->container['pensionDeathBenefit'] = $pensionDeathBenefit; return $this; } /** - * Gets pensionCommencementExcess + * Gets seriousIllHealthLumpSum * * @return string|null */ - public function getPensionCommencementExcess(): ?string + public function getSeriousIllHealthLumpSum(): ?string { - return $this->container['pensionCommencementExcess']; + return $this->container['seriousIllHealthLumpSum']; } /** - * Sets pensionCommencementExcess + * Sets seriousIllHealthLumpSum * - * @param string|null $pensionCommencementExcess pensionCommencementExcess + * @param string|null $seriousIllHealthLumpSum seriousIllHealthLumpSum * * @return $this */ - public function setPensionCommencementExcess(?string $pensionCommencementExcess): static + public function setSeriousIllHealthLumpSum(?string $seriousIllHealthLumpSum): static { - if (is_null($pensionCommencementExcess)) { - array_push($this->openAPINullablesSetToNull, 'pensionCommencementExcess'); + if (is_null($seriousIllHealthLumpSum)) { + array_push($this->openAPINullablesSetToNull, 'seriousIllHealthLumpSum'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionCommencementExcess', $nullablesSetToNull); + $index = array_search('seriousIllHealthLumpSum', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionCommencementExcess'] = $pensionCommencementExcess; + $this->container['seriousIllHealthLumpSum'] = $seriousIllHealthLumpSum; return $this; } /** - * Gets taxablePayment + * Gets standAloneLumpSum * * @return string|null */ - public function getTaxablePayment(): ?string + public function getStandAloneLumpSum(): ?string { - return $this->container['taxablePayment']; + return $this->container['standAloneLumpSum']; } /** - * Sets taxablePayment + * Sets standAloneLumpSum * - * @param string|null $taxablePayment taxablePayment + * @param string|null $standAloneLumpSum standAloneLumpSum * * @return $this */ - public function setTaxablePayment(?string $taxablePayment): static + public function setStandAloneLumpSum(?string $standAloneLumpSum): static { - if (is_null($taxablePayment)) { - array_push($this->openAPINullablesSetToNull, 'taxablePayment'); + if (is_null($standAloneLumpSum)) { + array_push($this->openAPINullablesSetToNull, 'standAloneLumpSum'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxablePayment', $nullablesSetToNull); + $index = array_search('standAloneLumpSum', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxablePayment'] = $taxablePayment; + $this->container['standAloneLumpSum'] = $standAloneLumpSum; return $this; } /** - * Gets nontaxablePayment + * Gets taxablePayment * * @return string|null */ - public function getNontaxablePayment(): ?string + public function getTaxablePayment(): ?string { - return $this->container['nontaxablePayment']; + return $this->container['taxablePayment']; } /** - * Sets nontaxablePayment + * Sets taxablePayment * - * @param string|null $nontaxablePayment nontaxablePayment + * @param string|null $taxablePayment taxablePayment * * @return $this */ - public function setNontaxablePayment(?string $nontaxablePayment): static + public function setTaxablePayment(?string $taxablePayment): static { - if (is_null($nontaxablePayment)) { - array_push($this->openAPINullablesSetToNull, 'nontaxablePayment'); + if (is_null($taxablePayment)) { + array_push($this->openAPINullablesSetToNull, 'taxablePayment'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nontaxablePayment', $nullablesSetToNull); + $index = array_search('taxablePayment', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nontaxablePayment'] = $nontaxablePayment; + $this->container['taxablePayment'] = $taxablePayment; return $this; } diff --git a/src/Model/FpsEmployeeNIlettersAndValues.php b/src/Model/FpsEmployeeNIlettersAndValues.php index 0288209..1d2cd07 100644 --- a/src/Model/FpsEmployeeNIlettersAndValues.php +++ b/src/Model/FpsEmployeeNIlettersAndValues.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,16 @@ class FpsEmployeeNIlettersAndValues implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'nIletter' => 'string', + 'atLELYTD' => 'string', + 'empeeContribnsInPd' => 'string', + 'empeeContribnsYTD' => 'string', 'grossEarningsForNICsInPd' => 'string', 'grossEarningsForNICsYTD' => 'string', - 'atLELYTD' => 'string', 'leLtoPTYTD' => 'string', + 'nIletter' => 'string', 'pTtoUELYTD' => 'string', 'totalEmpNICInPd' => 'string', - 'totalEmpNICYTD' => 'string', - 'empeeContribnsInPd' => 'string', - 'empeeContribnsYTD' => 'string' + 'totalEmpNICYTD' => 'string' ]; /** @@ -77,16 +77,16 @@ class FpsEmployeeNIlettersAndValues implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ - 'nIletter' => null, + 'atLELYTD' => null, + 'empeeContribnsInPd' => null, + 'empeeContribnsYTD' => null, 'grossEarningsForNICsInPd' => null, 'grossEarningsForNICsYTD' => null, - 'atLELYTD' => null, 'leLtoPTYTD' => null, + 'nIletter' => null, 'pTtoUELYTD' => null, 'totalEmpNICInPd' => null, - 'totalEmpNICYTD' => null, - 'empeeContribnsInPd' => null, - 'empeeContribnsYTD' => null + 'totalEmpNICYTD' => null ]; /** @@ -95,16 +95,16 @@ class FpsEmployeeNIlettersAndValues implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ - 'nIletter' => true, + 'atLELYTD' => true, + 'empeeContribnsInPd' => true, + 'empeeContribnsYTD' => true, 'grossEarningsForNICsInPd' => true, 'grossEarningsForNICsYTD' => true, - 'atLELYTD' => true, 'leLtoPTYTD' => true, + 'nIletter' => true, 'pTtoUELYTD' => true, 'totalEmpNICInPd' => true, - 'totalEmpNICYTD' => true, - 'empeeContribnsInPd' => true, - 'empeeContribnsYTD' => true + 'totalEmpNICYTD' => true ]; /** @@ -193,16 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'nIletter' => 'nIletter', + 'atLELYTD' => 'atLELYTD', + 'empeeContribnsInPd' => 'empeeContribnsInPd', + 'empeeContribnsYTD' => 'empeeContribnsYTD', 'grossEarningsForNICsInPd' => 'grossEarningsForNICsInPd', 'grossEarningsForNICsYTD' => 'grossEarningsForNICsYTD', - 'atLELYTD' => 'atLELYTD', 'leLtoPTYTD' => 'leLtoPTYTD', + 'nIletter' => 'nIletter', 'pTtoUELYTD' => 'pTtoUELYTD', 'totalEmpNICInPd' => 'totalEmpNICInPd', - 'totalEmpNICYTD' => 'totalEmpNICYTD', - 'empeeContribnsInPd' => 'empeeContribnsInPd', - 'empeeContribnsYTD' => 'empeeContribnsYTD' + 'totalEmpNICYTD' => 'totalEmpNICYTD' ]; /** @@ -211,16 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'nIletter' => 'setNIletter', + 'atLELYTD' => 'setAtLELYTD', + 'empeeContribnsInPd' => 'setEmpeeContribnsInPd', + 'empeeContribnsYTD' => 'setEmpeeContribnsYTD', 'grossEarningsForNICsInPd' => 'setGrossEarningsForNICsInPd', 'grossEarningsForNICsYTD' => 'setGrossEarningsForNICsYTD', - 'atLELYTD' => 'setAtLELYTD', 'leLtoPTYTD' => 'setLeLtoPTYTD', + 'nIletter' => 'setNIletter', 'pTtoUELYTD' => 'setPTtoUELYTD', 'totalEmpNICInPd' => 'setTotalEmpNICInPd', - 'totalEmpNICYTD' => 'setTotalEmpNICYTD', - 'empeeContribnsInPd' => 'setEmpeeContribnsInPd', - 'empeeContribnsYTD' => 'setEmpeeContribnsYTD' + 'totalEmpNICYTD' => 'setTotalEmpNICYTD' ]; /** @@ -229,16 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'nIletter' => 'getNIletter', + 'atLELYTD' => 'getAtLELYTD', + 'empeeContribnsInPd' => 'getEmpeeContribnsInPd', + 'empeeContribnsYTD' => 'getEmpeeContribnsYTD', 'grossEarningsForNICsInPd' => 'getGrossEarningsForNICsInPd', 'grossEarningsForNICsYTD' => 'getGrossEarningsForNICsYTD', - 'atLELYTD' => 'getAtLELYTD', 'leLtoPTYTD' => 'getLeLtoPTYTD', + 'nIletter' => 'getNIletter', 'pTtoUELYTD' => 'getPTtoUELYTD', 'totalEmpNICInPd' => 'getTotalEmpNICInPd', - 'totalEmpNICYTD' => 'getTotalEmpNICYTD', - 'empeeContribnsInPd' => 'getEmpeeContribnsInPd', - 'empeeContribnsYTD' => 'getEmpeeContribnsYTD' + 'totalEmpNICYTD' => 'getTotalEmpNICYTD' ]; /** @@ -297,16 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('nIletter', $data ?? [], null); + $this->setIfExists('atLELYTD', $data ?? [], null); + $this->setIfExists('empeeContribnsInPd', $data ?? [], null); + $this->setIfExists('empeeContribnsYTD', $data ?? [], null); $this->setIfExists('grossEarningsForNICsInPd', $data ?? [], null); $this->setIfExists('grossEarningsForNICsYTD', $data ?? [], null); - $this->setIfExists('atLELYTD', $data ?? [], null); $this->setIfExists('leLtoPTYTD', $data ?? [], null); + $this->setIfExists('nIletter', $data ?? [], null); $this->setIfExists('pTtoUELYTD', $data ?? [], null); $this->setIfExists('totalEmpNICInPd', $data ?? [], null); $this->setIfExists('totalEmpNICYTD', $data ?? [], null); - $this->setIfExists('empeeContribnsInPd', $data ?? [], null); - $this->setIfExists('empeeContribnsYTD', $data ?? [], null); } /** @@ -352,35 +352,103 @@ public function valid(): bool /** - * Gets nIletter + * Gets atLELYTD * * @return string|null */ - public function getNIletter(): ?string + public function getAtLELYTD(): ?string { - return $this->container['nIletter']; + return $this->container['atLELYTD']; } /** - * Sets nIletter + * Sets atLELYTD * - * @param string|null $nIletter nIletter + * @param string|null $atLELYTD atLELYTD * * @return $this */ - public function setNIletter(?string $nIletter): static + public function setAtLELYTD(?string $atLELYTD): static { - if (is_null($nIletter)) { - array_push($this->openAPINullablesSetToNull, 'nIletter'); + if (is_null($atLELYTD)) { + array_push($this->openAPINullablesSetToNull, 'atLELYTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nIletter', $nullablesSetToNull); + $index = array_search('atLELYTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nIletter'] = $nIletter; + $this->container['atLELYTD'] = $atLELYTD; + + return $this; + } + + /** + * Gets empeeContribnsInPd + * + * @return string|null + */ + public function getEmpeeContribnsInPd(): ?string + { + return $this->container['empeeContribnsInPd']; + } + + /** + * Sets empeeContribnsInPd + * + * @param string|null $empeeContribnsInPd empeeContribnsInPd + * + * @return $this + */ + public function setEmpeeContribnsInPd(?string $empeeContribnsInPd): static + { + if (is_null($empeeContribnsInPd)) { + array_push($this->openAPINullablesSetToNull, 'empeeContribnsInPd'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('empeeContribnsInPd', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['empeeContribnsInPd'] = $empeeContribnsInPd; + + return $this; + } + + /** + * Gets empeeContribnsYTD + * + * @return string|null + */ + public function getEmpeeContribnsYTD(): ?string + { + return $this->container['empeeContribnsYTD']; + } + + /** + * Sets empeeContribnsYTD + * + * @param string|null $empeeContribnsYTD empeeContribnsYTD + * + * @return $this + */ + public function setEmpeeContribnsYTD(?string $empeeContribnsYTD): static + { + if (is_null($empeeContribnsYTD)) { + array_push($this->openAPINullablesSetToNull, 'empeeContribnsYTD'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('empeeContribnsYTD', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['empeeContribnsYTD'] = $empeeContribnsYTD; return $this; } @@ -454,69 +522,69 @@ public function setGrossEarningsForNICsYTD(?string $grossEarningsForNICsYTD): st } /** - * Gets atLELYTD + * Gets leLtoPTYTD * * @return string|null */ - public function getAtLELYTD(): ?string + public function getLeLtoPTYTD(): ?string { - return $this->container['atLELYTD']; + return $this->container['leLtoPTYTD']; } /** - * Sets atLELYTD + * Sets leLtoPTYTD * - * @param string|null $atLELYTD atLELYTD + * @param string|null $leLtoPTYTD leLtoPTYTD * * @return $this */ - public function setAtLELYTD(?string $atLELYTD): static + public function setLeLtoPTYTD(?string $leLtoPTYTD): static { - if (is_null($atLELYTD)) { - array_push($this->openAPINullablesSetToNull, 'atLELYTD'); + if (is_null($leLtoPTYTD)) { + array_push($this->openAPINullablesSetToNull, 'leLtoPTYTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('atLELYTD', $nullablesSetToNull); + $index = array_search('leLtoPTYTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['atLELYTD'] = $atLELYTD; + $this->container['leLtoPTYTD'] = $leLtoPTYTD; return $this; } /** - * Gets leLtoPTYTD + * Gets nIletter * * @return string|null */ - public function getLeLtoPTYTD(): ?string + public function getNIletter(): ?string { - return $this->container['leLtoPTYTD']; + return $this->container['nIletter']; } /** - * Sets leLtoPTYTD + * Sets nIletter * - * @param string|null $leLtoPTYTD leLtoPTYTD + * @param string|null $nIletter nIletter * * @return $this */ - public function setLeLtoPTYTD(?string $leLtoPTYTD): static + public function setNIletter(?string $nIletter): static { - if (is_null($leLtoPTYTD)) { - array_push($this->openAPINullablesSetToNull, 'leLtoPTYTD'); + if (is_null($nIletter)) { + array_push($this->openAPINullablesSetToNull, 'nIletter'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('leLtoPTYTD', $nullablesSetToNull); + $index = array_search('nIletter', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['leLtoPTYTD'] = $leLtoPTYTD; + $this->container['nIletter'] = $nIletter; return $this; } @@ -622,74 +690,6 @@ public function setTotalEmpNICYTD(?string $totalEmpNICYTD): static return $this; } - - /** - * Gets empeeContribnsInPd - * - * @return string|null - */ - public function getEmpeeContribnsInPd(): ?string - { - return $this->container['empeeContribnsInPd']; - } - - /** - * Sets empeeContribnsInPd - * - * @param string|null $empeeContribnsInPd empeeContribnsInPd - * - * @return $this - */ - public function setEmpeeContribnsInPd(?string $empeeContribnsInPd): static - { - if (is_null($empeeContribnsInPd)) { - array_push($this->openAPINullablesSetToNull, 'empeeContribnsInPd'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('empeeContribnsInPd', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['empeeContribnsInPd'] = $empeeContribnsInPd; - - return $this; - } - - /** - * Gets empeeContribnsYTD - * - * @return string|null - */ - public function getEmpeeContribnsYTD(): ?string - { - return $this->container['empeeContribnsYTD']; - } - - /** - * Sets empeeContribnsYTD - * - * @param string|null $empeeContribnsYTD empeeContribnsYTD - * - * @return $this - */ - public function setEmpeeContribnsYTD(?string $empeeContribnsYTD): static - { - if (is_null($empeeContribnsYTD)) { - array_push($this->openAPINullablesSetToNull, 'empeeContribnsYTD'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('empeeContribnsYTD', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['empeeContribnsYTD'] = $empeeContribnsYTD; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/FpsEmployeePayment.php b/src/Model/FpsEmployeePayment.php index 69ab1a4..9af6b97 100644 --- a/src/Model/FpsEmployeePayment.php +++ b/src/Model/FpsEmployeePayment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,40 +59,40 @@ class FpsEmployeePayment implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'bacsHashCode' => 'string', - 'payFreq' => 'string', - 'pmtDate' => 'string', - 'lateReason' => 'string', - 'weekNo' => 'string', - 'monthNo' => 'string', - 'periodsCovered' => 'int', 'aggregatedEarnings' => 'string', - 'pmtAfterLeaving' => 'string', - 'hoursWorked' => 'string', - 'taxCode' => '\SynergiTech\Staffology\Model\FpsEmployeeTaxCode', - 'taxablePay' => 'string', - 'nonTaxOrNICPmt' => 'string', - 'dednsFromNetPay' => 'string', - 'payAfterStatDedns' => 'string', + 'bacsHashCode' => 'string', + 'benefits' => '\SynergiTech\Staffology\Model\FpsBenefit', 'benefitsTaxedViaPayroll' => 'string', 'class1ANICsYTD' => 'string', - 'benefits' => '\SynergiTech\Staffology\Model\FpsBenefit', + 'dednsFromNetPay' => 'string', + 'empeePenContribnsNotPaid' => 'string', 'empeePenContribnsPaid' => 'string', + 'flexibleDrawdown' => '\SynergiTech\Staffology\Model\FpsEmployeeFlexibleDrawdown', + 'hoursWorked' => 'string', 'itemsSubjectToClass1NIC' => 'string', - 'empeePenContribnsNotPaid' => 'string', - 'studentLoanRecovered' => '\SynergiTech\Staffology\Model\StudentLoanRecovered', - 'postgradLoanRecovered' => 'string', - 'taxDeductedOrRefunded' => 'string', + 'lateReason' => 'string', + 'monthNo' => 'string', + 'nonTaxOrNICPmt' => 'string', 'onStrike' => 'string', - 'unpaidAbsence' => 'string', - 'smpytd' => 'string', - 'sppytd' => 'string', + 'payAfterStatDedns' => 'string', + 'payFreq' => 'string', + 'periodsCovered' => 'int', + 'pmtAfterLeaving' => 'string', + 'pmtDate' => 'string', + 'postgradLoanRecovered' => 'string', 'sapytd' => 'string', 'shPPYTD' => 'string', - 'spbpytd' => 'string', + 'smpytd' => 'string', 'sncpytd' => 'string', + 'spbpytd' => 'string', + 'sppytd' => 'string', + 'studentLoanRecovered' => '\SynergiTech\Staffology\Model\StudentLoanRecovered', + 'taxCode' => '\SynergiTech\Staffology\Model\FpsEmployeeTaxCode', + 'taxDeductedOrRefunded' => 'string', + 'taxablePay' => 'string', 'trivialCommutationPayment' => '\SynergiTech\Staffology\Model\FpsEmployeeTrivialCommutationPayment[]', - 'flexibleDrawdown' => '\SynergiTech\Staffology\Model\FpsEmployeeFlexibleDrawdown' + 'unpaidAbsence' => 'string', + 'weekNo' => 'string' ]; /** @@ -101,40 +101,40 @@ class FpsEmployeePayment implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'bacsHashCode' => null, - 'payFreq' => null, - 'pmtDate' => null, - 'lateReason' => null, - 'weekNo' => null, - 'monthNo' => null, - 'periodsCovered' => 'int32', 'aggregatedEarnings' => null, - 'pmtAfterLeaving' => null, - 'hoursWorked' => null, - 'taxCode' => null, - 'taxablePay' => null, - 'nonTaxOrNICPmt' => null, - 'dednsFromNetPay' => null, - 'payAfterStatDedns' => null, + 'bacsHashCode' => null, + 'benefits' => null, 'benefitsTaxedViaPayroll' => null, 'class1ANICsYTD' => null, - 'benefits' => null, + 'dednsFromNetPay' => null, + 'empeePenContribnsNotPaid' => null, 'empeePenContribnsPaid' => null, + 'flexibleDrawdown' => null, + 'hoursWorked' => null, 'itemsSubjectToClass1NIC' => null, - 'empeePenContribnsNotPaid' => null, - 'studentLoanRecovered' => null, - 'postgradLoanRecovered' => null, - 'taxDeductedOrRefunded' => null, + 'lateReason' => null, + 'monthNo' => null, + 'nonTaxOrNICPmt' => null, 'onStrike' => null, - 'unpaidAbsence' => null, - 'smpytd' => null, - 'sppytd' => null, + 'payAfterStatDedns' => null, + 'payFreq' => null, + 'periodsCovered' => 'int32', + 'pmtAfterLeaving' => null, + 'pmtDate' => null, + 'postgradLoanRecovered' => null, 'sapytd' => null, 'shPPYTD' => null, - 'spbpytd' => null, + 'smpytd' => null, 'sncpytd' => null, + 'spbpytd' => null, + 'sppytd' => null, + 'studentLoanRecovered' => null, + 'taxCode' => null, + 'taxDeductedOrRefunded' => null, + 'taxablePay' => null, 'trivialCommutationPayment' => null, - 'flexibleDrawdown' => null + 'unpaidAbsence' => null, + 'weekNo' => null ]; /** @@ -143,40 +143,40 @@ class FpsEmployeePayment implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'bacsHashCode' => true, - 'payFreq' => true, - 'pmtDate' => true, - 'lateReason' => true, - 'weekNo' => true, - 'monthNo' => true, - 'periodsCovered' => false, 'aggregatedEarnings' => true, - 'pmtAfterLeaving' => true, - 'hoursWorked' => true, - 'taxCode' => false, - 'taxablePay' => true, - 'nonTaxOrNICPmt' => true, - 'dednsFromNetPay' => true, - 'payAfterStatDedns' => true, + 'bacsHashCode' => true, + 'benefits' => false, 'benefitsTaxedViaPayroll' => true, 'class1ANICsYTD' => true, - 'benefits' => false, + 'dednsFromNetPay' => true, + 'empeePenContribnsNotPaid' => true, 'empeePenContribnsPaid' => true, + 'flexibleDrawdown' => false, + 'hoursWorked' => true, 'itemsSubjectToClass1NIC' => true, - 'empeePenContribnsNotPaid' => true, - 'studentLoanRecovered' => false, - 'postgradLoanRecovered' => true, - 'taxDeductedOrRefunded' => true, + 'lateReason' => true, + 'monthNo' => true, + 'nonTaxOrNICPmt' => true, 'onStrike' => true, - 'unpaidAbsence' => true, - 'smpytd' => true, - 'sppytd' => true, + 'payAfterStatDedns' => true, + 'payFreq' => true, + 'periodsCovered' => false, + 'pmtAfterLeaving' => true, + 'pmtDate' => true, + 'postgradLoanRecovered' => true, 'sapytd' => true, 'shPPYTD' => true, - 'spbpytd' => true, + 'smpytd' => true, 'sncpytd' => true, + 'spbpytd' => true, + 'sppytd' => true, + 'studentLoanRecovered' => false, + 'taxCode' => false, + 'taxDeductedOrRefunded' => true, + 'taxablePay' => true, 'trivialCommutationPayment' => true, - 'flexibleDrawdown' => false + 'unpaidAbsence' => true, + 'weekNo' => true ]; /** @@ -265,40 +265,40 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'bacsHashCode' => 'bacsHashCode', - 'payFreq' => 'payFreq', - 'pmtDate' => 'pmtDate', - 'lateReason' => 'lateReason', - 'weekNo' => 'weekNo', - 'monthNo' => 'monthNo', - 'periodsCovered' => 'periodsCovered', 'aggregatedEarnings' => 'aggregatedEarnings', - 'pmtAfterLeaving' => 'pmtAfterLeaving', - 'hoursWorked' => 'hoursWorked', - 'taxCode' => 'taxCode', - 'taxablePay' => 'taxablePay', - 'nonTaxOrNICPmt' => 'nonTaxOrNICPmt', - 'dednsFromNetPay' => 'dednsFromNetPay', - 'payAfterStatDedns' => 'payAfterStatDedns', + 'bacsHashCode' => 'bacsHashCode', + 'benefits' => 'benefits', 'benefitsTaxedViaPayroll' => 'benefitsTaxedViaPayroll', 'class1ANICsYTD' => 'class1ANICsYTD', - 'benefits' => 'benefits', + 'dednsFromNetPay' => 'dednsFromNetPay', + 'empeePenContribnsNotPaid' => 'empeePenContribnsNotPaid', 'empeePenContribnsPaid' => 'empeePenContribnsPaid', + 'flexibleDrawdown' => 'flexibleDrawdown', + 'hoursWorked' => 'hoursWorked', 'itemsSubjectToClass1NIC' => 'itemsSubjectToClass1NIC', - 'empeePenContribnsNotPaid' => 'empeePenContribnsNotPaid', - 'studentLoanRecovered' => 'studentLoanRecovered', - 'postgradLoanRecovered' => 'postgradLoanRecovered', - 'taxDeductedOrRefunded' => 'taxDeductedOrRefunded', + 'lateReason' => 'lateReason', + 'monthNo' => 'monthNo', + 'nonTaxOrNICPmt' => 'nonTaxOrNICPmt', 'onStrike' => 'onStrike', - 'unpaidAbsence' => 'unpaidAbsence', - 'smpytd' => 'smpytd', - 'sppytd' => 'sppytd', + 'payAfterStatDedns' => 'payAfterStatDedns', + 'payFreq' => 'payFreq', + 'periodsCovered' => 'periodsCovered', + 'pmtAfterLeaving' => 'pmtAfterLeaving', + 'pmtDate' => 'pmtDate', + 'postgradLoanRecovered' => 'postgradLoanRecovered', 'sapytd' => 'sapytd', 'shPPYTD' => 'shPPYTD', - 'spbpytd' => 'spbpytd', + 'smpytd' => 'smpytd', 'sncpytd' => 'sncpytd', + 'spbpytd' => 'spbpytd', + 'sppytd' => 'sppytd', + 'studentLoanRecovered' => 'studentLoanRecovered', + 'taxCode' => 'taxCode', + 'taxDeductedOrRefunded' => 'taxDeductedOrRefunded', + 'taxablePay' => 'taxablePay', 'trivialCommutationPayment' => 'trivialCommutationPayment', - 'flexibleDrawdown' => 'flexibleDrawdown' + 'unpaidAbsence' => 'unpaidAbsence', + 'weekNo' => 'weekNo' ]; /** @@ -307,40 +307,40 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'bacsHashCode' => 'setBacsHashCode', - 'payFreq' => 'setPayFreq', - 'pmtDate' => 'setPmtDate', - 'lateReason' => 'setLateReason', - 'weekNo' => 'setWeekNo', - 'monthNo' => 'setMonthNo', - 'periodsCovered' => 'setPeriodsCovered', 'aggregatedEarnings' => 'setAggregatedEarnings', - 'pmtAfterLeaving' => 'setPmtAfterLeaving', - 'hoursWorked' => 'setHoursWorked', - 'taxCode' => 'setTaxCode', - 'taxablePay' => 'setTaxablePay', - 'nonTaxOrNICPmt' => 'setNonTaxOrNICPmt', - 'dednsFromNetPay' => 'setDednsFromNetPay', - 'payAfterStatDedns' => 'setPayAfterStatDedns', + 'bacsHashCode' => 'setBacsHashCode', + 'benefits' => 'setBenefits', 'benefitsTaxedViaPayroll' => 'setBenefitsTaxedViaPayroll', 'class1ANICsYTD' => 'setClass1ANICsYTD', - 'benefits' => 'setBenefits', + 'dednsFromNetPay' => 'setDednsFromNetPay', + 'empeePenContribnsNotPaid' => 'setEmpeePenContribnsNotPaid', 'empeePenContribnsPaid' => 'setEmpeePenContribnsPaid', + 'flexibleDrawdown' => 'setFlexibleDrawdown', + 'hoursWorked' => 'setHoursWorked', 'itemsSubjectToClass1NIC' => 'setItemsSubjectToClass1NIC', - 'empeePenContribnsNotPaid' => 'setEmpeePenContribnsNotPaid', - 'studentLoanRecovered' => 'setStudentLoanRecovered', - 'postgradLoanRecovered' => 'setPostgradLoanRecovered', - 'taxDeductedOrRefunded' => 'setTaxDeductedOrRefunded', + 'lateReason' => 'setLateReason', + 'monthNo' => 'setMonthNo', + 'nonTaxOrNICPmt' => 'setNonTaxOrNICPmt', 'onStrike' => 'setOnStrike', - 'unpaidAbsence' => 'setUnpaidAbsence', - 'smpytd' => 'setSmpytd', - 'sppytd' => 'setSppytd', + 'payAfterStatDedns' => 'setPayAfterStatDedns', + 'payFreq' => 'setPayFreq', + 'periodsCovered' => 'setPeriodsCovered', + 'pmtAfterLeaving' => 'setPmtAfterLeaving', + 'pmtDate' => 'setPmtDate', + 'postgradLoanRecovered' => 'setPostgradLoanRecovered', 'sapytd' => 'setSapytd', 'shPPYTD' => 'setShPPYTD', - 'spbpytd' => 'setSpbpytd', + 'smpytd' => 'setSmpytd', 'sncpytd' => 'setSncpytd', + 'spbpytd' => 'setSpbpytd', + 'sppytd' => 'setSppytd', + 'studentLoanRecovered' => 'setStudentLoanRecovered', + 'taxCode' => 'setTaxCode', + 'taxDeductedOrRefunded' => 'setTaxDeductedOrRefunded', + 'taxablePay' => 'setTaxablePay', 'trivialCommutationPayment' => 'setTrivialCommutationPayment', - 'flexibleDrawdown' => 'setFlexibleDrawdown' + 'unpaidAbsence' => 'setUnpaidAbsence', + 'weekNo' => 'setWeekNo' ]; /** @@ -349,40 +349,40 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'bacsHashCode' => 'getBacsHashCode', - 'payFreq' => 'getPayFreq', - 'pmtDate' => 'getPmtDate', - 'lateReason' => 'getLateReason', - 'weekNo' => 'getWeekNo', - 'monthNo' => 'getMonthNo', - 'periodsCovered' => 'getPeriodsCovered', 'aggregatedEarnings' => 'getAggregatedEarnings', - 'pmtAfterLeaving' => 'getPmtAfterLeaving', - 'hoursWorked' => 'getHoursWorked', - 'taxCode' => 'getTaxCode', - 'taxablePay' => 'getTaxablePay', - 'nonTaxOrNICPmt' => 'getNonTaxOrNICPmt', - 'dednsFromNetPay' => 'getDednsFromNetPay', - 'payAfterStatDedns' => 'getPayAfterStatDedns', + 'bacsHashCode' => 'getBacsHashCode', + 'benefits' => 'getBenefits', 'benefitsTaxedViaPayroll' => 'getBenefitsTaxedViaPayroll', 'class1ANICsYTD' => 'getClass1ANICsYTD', - 'benefits' => 'getBenefits', + 'dednsFromNetPay' => 'getDednsFromNetPay', + 'empeePenContribnsNotPaid' => 'getEmpeePenContribnsNotPaid', 'empeePenContribnsPaid' => 'getEmpeePenContribnsPaid', + 'flexibleDrawdown' => 'getFlexibleDrawdown', + 'hoursWorked' => 'getHoursWorked', 'itemsSubjectToClass1NIC' => 'getItemsSubjectToClass1NIC', - 'empeePenContribnsNotPaid' => 'getEmpeePenContribnsNotPaid', - 'studentLoanRecovered' => 'getStudentLoanRecovered', - 'postgradLoanRecovered' => 'getPostgradLoanRecovered', - 'taxDeductedOrRefunded' => 'getTaxDeductedOrRefunded', + 'lateReason' => 'getLateReason', + 'monthNo' => 'getMonthNo', + 'nonTaxOrNICPmt' => 'getNonTaxOrNICPmt', 'onStrike' => 'getOnStrike', - 'unpaidAbsence' => 'getUnpaidAbsence', - 'smpytd' => 'getSmpytd', - 'sppytd' => 'getSppytd', + 'payAfterStatDedns' => 'getPayAfterStatDedns', + 'payFreq' => 'getPayFreq', + 'periodsCovered' => 'getPeriodsCovered', + 'pmtAfterLeaving' => 'getPmtAfterLeaving', + 'pmtDate' => 'getPmtDate', + 'postgradLoanRecovered' => 'getPostgradLoanRecovered', 'sapytd' => 'getSapytd', 'shPPYTD' => 'getShPPYTD', - 'spbpytd' => 'getSpbpytd', + 'smpytd' => 'getSmpytd', 'sncpytd' => 'getSncpytd', + 'spbpytd' => 'getSpbpytd', + 'sppytd' => 'getSppytd', + 'studentLoanRecovered' => 'getStudentLoanRecovered', + 'taxCode' => 'getTaxCode', + 'taxDeductedOrRefunded' => 'getTaxDeductedOrRefunded', + 'taxablePay' => 'getTaxablePay', 'trivialCommutationPayment' => 'getTrivialCommutationPayment', - 'flexibleDrawdown' => 'getFlexibleDrawdown' + 'unpaidAbsence' => 'getUnpaidAbsence', + 'weekNo' => 'getWeekNo' ]; /** @@ -441,40 +441,40 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('bacsHashCode', $data ?? [], null); - $this->setIfExists('payFreq', $data ?? [], null); - $this->setIfExists('pmtDate', $data ?? [], null); - $this->setIfExists('lateReason', $data ?? [], null); - $this->setIfExists('weekNo', $data ?? [], null); - $this->setIfExists('monthNo', $data ?? [], null); - $this->setIfExists('periodsCovered', $data ?? [], null); $this->setIfExists('aggregatedEarnings', $data ?? [], null); - $this->setIfExists('pmtAfterLeaving', $data ?? [], null); - $this->setIfExists('hoursWorked', $data ?? [], null); - $this->setIfExists('taxCode', $data ?? [], null); - $this->setIfExists('taxablePay', $data ?? [], null); - $this->setIfExists('nonTaxOrNICPmt', $data ?? [], null); - $this->setIfExists('dednsFromNetPay', $data ?? [], null); - $this->setIfExists('payAfterStatDedns', $data ?? [], null); + $this->setIfExists('bacsHashCode', $data ?? [], null); + $this->setIfExists('benefits', $data ?? [], null); $this->setIfExists('benefitsTaxedViaPayroll', $data ?? [], null); $this->setIfExists('class1ANICsYTD', $data ?? [], null); - $this->setIfExists('benefits', $data ?? [], null); + $this->setIfExists('dednsFromNetPay', $data ?? [], null); + $this->setIfExists('empeePenContribnsNotPaid', $data ?? [], null); $this->setIfExists('empeePenContribnsPaid', $data ?? [], null); + $this->setIfExists('flexibleDrawdown', $data ?? [], null); + $this->setIfExists('hoursWorked', $data ?? [], null); $this->setIfExists('itemsSubjectToClass1NIC', $data ?? [], null); - $this->setIfExists('empeePenContribnsNotPaid', $data ?? [], null); - $this->setIfExists('studentLoanRecovered', $data ?? [], null); - $this->setIfExists('postgradLoanRecovered', $data ?? [], null); - $this->setIfExists('taxDeductedOrRefunded', $data ?? [], null); + $this->setIfExists('lateReason', $data ?? [], null); + $this->setIfExists('monthNo', $data ?? [], null); + $this->setIfExists('nonTaxOrNICPmt', $data ?? [], null); $this->setIfExists('onStrike', $data ?? [], null); - $this->setIfExists('unpaidAbsence', $data ?? [], null); - $this->setIfExists('smpytd', $data ?? [], null); - $this->setIfExists('sppytd', $data ?? [], null); + $this->setIfExists('payAfterStatDedns', $data ?? [], null); + $this->setIfExists('payFreq', $data ?? [], null); + $this->setIfExists('periodsCovered', $data ?? [], null); + $this->setIfExists('pmtAfterLeaving', $data ?? [], null); + $this->setIfExists('pmtDate', $data ?? [], null); + $this->setIfExists('postgradLoanRecovered', $data ?? [], null); $this->setIfExists('sapytd', $data ?? [], null); $this->setIfExists('shPPYTD', $data ?? [], null); - $this->setIfExists('spbpytd', $data ?? [], null); + $this->setIfExists('smpytd', $data ?? [], null); $this->setIfExists('sncpytd', $data ?? [], null); + $this->setIfExists('spbpytd', $data ?? [], null); + $this->setIfExists('sppytd', $data ?? [], null); + $this->setIfExists('studentLoanRecovered', $data ?? [], null); + $this->setIfExists('taxCode', $data ?? [], null); + $this->setIfExists('taxDeductedOrRefunded', $data ?? [], null); + $this->setIfExists('taxablePay', $data ?? [], null); $this->setIfExists('trivialCommutationPayment', $data ?? [], null); - $this->setIfExists('flexibleDrawdown', $data ?? [], null); + $this->setIfExists('unpaidAbsence', $data ?? [], null); + $this->setIfExists('weekNo', $data ?? [], null); } /** @@ -520,300 +520,293 @@ public function valid(): bool /** - * Gets bacsHashCode + * Gets aggregatedEarnings * * @return string|null */ - public function getBacsHashCode(): ?string + public function getAggregatedEarnings(): ?string { - return $this->container['bacsHashCode']; + return $this->container['aggregatedEarnings']; } /** - * Sets bacsHashCode + * Sets aggregatedEarnings * - * @param string|null $bacsHashCode bacsHashCode + * @param string|null $aggregatedEarnings aggregatedEarnings * * @return $this */ - public function setBacsHashCode(?string $bacsHashCode): static + public function setAggregatedEarnings(?string $aggregatedEarnings): static { - if (is_null($bacsHashCode)) { - array_push($this->openAPINullablesSetToNull, 'bacsHashCode'); + if (is_null($aggregatedEarnings)) { + array_push($this->openAPINullablesSetToNull, 'aggregatedEarnings'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bacsHashCode', $nullablesSetToNull); + $index = array_search('aggregatedEarnings', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['bacsHashCode'] = $bacsHashCode; + $this->container['aggregatedEarnings'] = $aggregatedEarnings; return $this; } /** - * Gets payFreq + * Gets bacsHashCode * * @return string|null */ - public function getPayFreq(): ?string + public function getBacsHashCode(): ?string { - return $this->container['payFreq']; + return $this->container['bacsHashCode']; } /** - * Sets payFreq + * Sets bacsHashCode * - * @param string|null $payFreq payFreq + * @param string|null $bacsHashCode bacsHashCode * * @return $this */ - public function setPayFreq(?string $payFreq): static + public function setBacsHashCode(?string $bacsHashCode): static { - if (is_null($payFreq)) { - array_push($this->openAPINullablesSetToNull, 'payFreq'); + if (is_null($bacsHashCode)) { + array_push($this->openAPINullablesSetToNull, 'bacsHashCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payFreq', $nullablesSetToNull); + $index = array_search('bacsHashCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payFreq'] = $payFreq; + $this->container['bacsHashCode'] = $bacsHashCode; return $this; } /** - * Gets pmtDate + * Gets benefits * - * @return string|null + * @return \SynergiTech\Staffology\Model\FpsBenefit|null */ - public function getPmtDate(): ?string + public function getBenefits(): ?\SynergiTech\Staffology\Model\FpsBenefit { - return $this->container['pmtDate']; + return $this->container['benefits']; } /** - * Sets pmtDate + * Sets benefits * - * @param string|null $pmtDate pmtDate + * @param \SynergiTech\Staffology\Model\FpsBenefit|null $benefits benefits * * @return $this */ - public function setPmtDate(?string $pmtDate): static + public function setBenefits(?\SynergiTech\Staffology\Model\FpsBenefit $benefits): static { - if (is_null($pmtDate)) { - array_push($this->openAPINullablesSetToNull, 'pmtDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pmtDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($benefits)) { + throw new InvalidArgumentException('non-nullable benefits cannot be null'); } - $this->container['pmtDate'] = $pmtDate; + $this->container['benefits'] = $benefits; return $this; } /** - * Gets lateReason + * Gets benefitsTaxedViaPayroll * * @return string|null */ - public function getLateReason(): ?string + public function getBenefitsTaxedViaPayroll(): ?string { - return $this->container['lateReason']; + return $this->container['benefitsTaxedViaPayroll']; } /** - * Sets lateReason + * Sets benefitsTaxedViaPayroll * - * @param string|null $lateReason lateReason + * @param string|null $benefitsTaxedViaPayroll benefitsTaxedViaPayroll * * @return $this */ - public function setLateReason(?string $lateReason): static + public function setBenefitsTaxedViaPayroll(?string $benefitsTaxedViaPayroll): static { - if (is_null($lateReason)) { - array_push($this->openAPINullablesSetToNull, 'lateReason'); + if (is_null($benefitsTaxedViaPayroll)) { + array_push($this->openAPINullablesSetToNull, 'benefitsTaxedViaPayroll'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lateReason', $nullablesSetToNull); + $index = array_search('benefitsTaxedViaPayroll', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lateReason'] = $lateReason; + $this->container['benefitsTaxedViaPayroll'] = $benefitsTaxedViaPayroll; return $this; } /** - * Gets weekNo + * Gets class1ANICsYTD * * @return string|null */ - public function getWeekNo(): ?string + public function getClass1ANICsYTD(): ?string { - return $this->container['weekNo']; + return $this->container['class1ANICsYTD']; } /** - * Sets weekNo + * Sets class1ANICsYTD * - * @param string|null $weekNo weekNo + * @param string|null $class1ANICsYTD class1ANICsYTD * * @return $this */ - public function setWeekNo(?string $weekNo): static + public function setClass1ANICsYTD(?string $class1ANICsYTD): static { - if (is_null($weekNo)) { - array_push($this->openAPINullablesSetToNull, 'weekNo'); + if (is_null($class1ANICsYTD)) { + array_push($this->openAPINullablesSetToNull, 'class1ANICsYTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('weekNo', $nullablesSetToNull); + $index = array_search('class1ANICsYTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['weekNo'] = $weekNo; + $this->container['class1ANICsYTD'] = $class1ANICsYTD; return $this; } /** - * Gets monthNo + * Gets dednsFromNetPay * * @return string|null */ - public function getMonthNo(): ?string + public function getDednsFromNetPay(): ?string { - return $this->container['monthNo']; + return $this->container['dednsFromNetPay']; } /** - * Sets monthNo + * Sets dednsFromNetPay * - * @param string|null $monthNo monthNo + * @param string|null $dednsFromNetPay dednsFromNetPay * * @return $this */ - public function setMonthNo(?string $monthNo): static + public function setDednsFromNetPay(?string $dednsFromNetPay): static { - if (is_null($monthNo)) { - array_push($this->openAPINullablesSetToNull, 'monthNo'); + if (is_null($dednsFromNetPay)) { + array_push($this->openAPINullablesSetToNull, 'dednsFromNetPay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('monthNo', $nullablesSetToNull); + $index = array_search('dednsFromNetPay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['monthNo'] = $monthNo; + $this->container['dednsFromNetPay'] = $dednsFromNetPay; return $this; } /** - * Gets periodsCovered + * Gets empeePenContribnsNotPaid * - * @return int|null + * @return string|null */ - public function getPeriodsCovered(): ?int + public function getEmpeePenContribnsNotPaid(): ?string { - return $this->container['periodsCovered']; + return $this->container['empeePenContribnsNotPaid']; } /** - * Sets periodsCovered + * Sets empeePenContribnsNotPaid * - * @param int|null $periodsCovered periodsCovered + * @param string|null $empeePenContribnsNotPaid empeePenContribnsNotPaid * * @return $this */ - public function setPeriodsCovered(?int $periodsCovered): static + public function setEmpeePenContribnsNotPaid(?string $empeePenContribnsNotPaid): static { - if (is_null($periodsCovered)) { - throw new InvalidArgumentException('non-nullable periodsCovered cannot be null'); + if (is_null($empeePenContribnsNotPaid)) { + array_push($this->openAPINullablesSetToNull, 'empeePenContribnsNotPaid'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('empeePenContribnsNotPaid', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['periodsCovered'] = $periodsCovered; + $this->container['empeePenContribnsNotPaid'] = $empeePenContribnsNotPaid; return $this; } /** - * Gets aggregatedEarnings + * Gets empeePenContribnsPaid * * @return string|null */ - public function getAggregatedEarnings(): ?string + public function getEmpeePenContribnsPaid(): ?string { - return $this->container['aggregatedEarnings']; + return $this->container['empeePenContribnsPaid']; } /** - * Sets aggregatedEarnings + * Sets empeePenContribnsPaid * - * @param string|null $aggregatedEarnings aggregatedEarnings + * @param string|null $empeePenContribnsPaid empeePenContribnsPaid * * @return $this */ - public function setAggregatedEarnings(?string $aggregatedEarnings): static + public function setEmpeePenContribnsPaid(?string $empeePenContribnsPaid): static { - if (is_null($aggregatedEarnings)) { - array_push($this->openAPINullablesSetToNull, 'aggregatedEarnings'); + if (is_null($empeePenContribnsPaid)) { + array_push($this->openAPINullablesSetToNull, 'empeePenContribnsPaid'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aggregatedEarnings', $nullablesSetToNull); + $index = array_search('empeePenContribnsPaid', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['aggregatedEarnings'] = $aggregatedEarnings; + $this->container['empeePenContribnsPaid'] = $empeePenContribnsPaid; return $this; } /** - * Gets pmtAfterLeaving + * Gets flexibleDrawdown * - * @return string|null + * @return \SynergiTech\Staffology\Model\FpsEmployeeFlexibleDrawdown|null */ - public function getPmtAfterLeaving(): ?string + public function getFlexibleDrawdown(): ?\SynergiTech\Staffology\Model\FpsEmployeeFlexibleDrawdown { - return $this->container['pmtAfterLeaving']; + return $this->container['flexibleDrawdown']; } /** - * Sets pmtAfterLeaving + * Sets flexibleDrawdown * - * @param string|null $pmtAfterLeaving pmtAfterLeaving + * @param \SynergiTech\Staffology\Model\FpsEmployeeFlexibleDrawdown|null $flexibleDrawdown flexibleDrawdown * * @return $this */ - public function setPmtAfterLeaving(?string $pmtAfterLeaving): static + public function setFlexibleDrawdown(?\SynergiTech\Staffology\Model\FpsEmployeeFlexibleDrawdown $flexibleDrawdown): static { - if (is_null($pmtAfterLeaving)) { - array_push($this->openAPINullablesSetToNull, 'pmtAfterLeaving'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pmtAfterLeaving', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($flexibleDrawdown)) { + throw new InvalidArgumentException('non-nullable flexibleDrawdown cannot be null'); } - $this->container['pmtAfterLeaving'] = $pmtAfterLeaving; + $this->container['flexibleDrawdown'] = $flexibleDrawdown; return $this; } @@ -853,558 +846,538 @@ public function setHoursWorked(?string $hoursWorked): static } /** - * Gets taxCode + * Gets itemsSubjectToClass1NIC * - * @return \SynergiTech\Staffology\Model\FpsEmployeeTaxCode|null + * @return string|null */ - public function getTaxCode(): ?\SynergiTech\Staffology\Model\FpsEmployeeTaxCode + public function getItemsSubjectToClass1NIC(): ?string { - return $this->container['taxCode']; + return $this->container['itemsSubjectToClass1NIC']; } /** - * Sets taxCode + * Sets itemsSubjectToClass1NIC * - * @param \SynergiTech\Staffology\Model\FpsEmployeeTaxCode|null $taxCode taxCode + * @param string|null $itemsSubjectToClass1NIC itemsSubjectToClass1NIC * * @return $this */ - public function setTaxCode(?\SynergiTech\Staffology\Model\FpsEmployeeTaxCode $taxCode): static + public function setItemsSubjectToClass1NIC(?string $itemsSubjectToClass1NIC): static { - if (is_null($taxCode)) { - throw new InvalidArgumentException('non-nullable taxCode cannot be null'); + if (is_null($itemsSubjectToClass1NIC)) { + array_push($this->openAPINullablesSetToNull, 'itemsSubjectToClass1NIC'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('itemsSubjectToClass1NIC', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['taxCode'] = $taxCode; + $this->container['itemsSubjectToClass1NIC'] = $itemsSubjectToClass1NIC; return $this; } /** - * Gets taxablePay + * Gets lateReason * * @return string|null */ - public function getTaxablePay(): ?string + public function getLateReason(): ?string { - return $this->container['taxablePay']; + return $this->container['lateReason']; } /** - * Sets taxablePay + * Sets lateReason * - * @param string|null $taxablePay taxablePay + * @param string|null $lateReason lateReason * * @return $this */ - public function setTaxablePay(?string $taxablePay): static + public function setLateReason(?string $lateReason): static { - if (is_null($taxablePay)) { - array_push($this->openAPINullablesSetToNull, 'taxablePay'); + if (is_null($lateReason)) { + array_push($this->openAPINullablesSetToNull, 'lateReason'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxablePay', $nullablesSetToNull); + $index = array_search('lateReason', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxablePay'] = $taxablePay; + $this->container['lateReason'] = $lateReason; return $this; } /** - * Gets nonTaxOrNICPmt + * Gets monthNo * * @return string|null */ - public function getNonTaxOrNICPmt(): ?string + public function getMonthNo(): ?string { - return $this->container['nonTaxOrNICPmt']; + return $this->container['monthNo']; } /** - * Sets nonTaxOrNICPmt + * Sets monthNo * - * @param string|null $nonTaxOrNICPmt nonTaxOrNICPmt + * @param string|null $monthNo monthNo * * @return $this */ - public function setNonTaxOrNICPmt(?string $nonTaxOrNICPmt): static + public function setMonthNo(?string $monthNo): static { - if (is_null($nonTaxOrNICPmt)) { - array_push($this->openAPINullablesSetToNull, 'nonTaxOrNICPmt'); + if (is_null($monthNo)) { + array_push($this->openAPINullablesSetToNull, 'monthNo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nonTaxOrNICPmt', $nullablesSetToNull); + $index = array_search('monthNo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nonTaxOrNICPmt'] = $nonTaxOrNICPmt; + $this->container['monthNo'] = $monthNo; return $this; } /** - * Gets dednsFromNetPay + * Gets nonTaxOrNICPmt * * @return string|null */ - public function getDednsFromNetPay(): ?string + public function getNonTaxOrNICPmt(): ?string { - return $this->container['dednsFromNetPay']; + return $this->container['nonTaxOrNICPmt']; } /** - * Sets dednsFromNetPay + * Sets nonTaxOrNICPmt * - * @param string|null $dednsFromNetPay dednsFromNetPay + * @param string|null $nonTaxOrNICPmt nonTaxOrNICPmt * * @return $this */ - public function setDednsFromNetPay(?string $dednsFromNetPay): static + public function setNonTaxOrNICPmt(?string $nonTaxOrNICPmt): static { - if (is_null($dednsFromNetPay)) { - array_push($this->openAPINullablesSetToNull, 'dednsFromNetPay'); + if (is_null($nonTaxOrNICPmt)) { + array_push($this->openAPINullablesSetToNull, 'nonTaxOrNICPmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('dednsFromNetPay', $nullablesSetToNull); + $index = array_search('nonTaxOrNICPmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['dednsFromNetPay'] = $dednsFromNetPay; + $this->container['nonTaxOrNICPmt'] = $nonTaxOrNICPmt; return $this; } /** - * Gets payAfterStatDedns + * Gets onStrike * * @return string|null */ - public function getPayAfterStatDedns(): ?string + public function getOnStrike(): ?string { - return $this->container['payAfterStatDedns']; + return $this->container['onStrike']; } /** - * Sets payAfterStatDedns + * Sets onStrike * - * @param string|null $payAfterStatDedns payAfterStatDedns + * @param string|null $onStrike onStrike * * @return $this */ - public function setPayAfterStatDedns(?string $payAfterStatDedns): static + public function setOnStrike(?string $onStrike): static { - if (is_null($payAfterStatDedns)) { - array_push($this->openAPINullablesSetToNull, 'payAfterStatDedns'); + if (is_null($onStrike)) { + array_push($this->openAPINullablesSetToNull, 'onStrike'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payAfterStatDedns', $nullablesSetToNull); + $index = array_search('onStrike', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payAfterStatDedns'] = $payAfterStatDedns; + $this->container['onStrike'] = $onStrike; return $this; } /** - * Gets benefitsTaxedViaPayroll + * Gets payAfterStatDedns * * @return string|null */ - public function getBenefitsTaxedViaPayroll(): ?string + public function getPayAfterStatDedns(): ?string { - return $this->container['benefitsTaxedViaPayroll']; + return $this->container['payAfterStatDedns']; } /** - * Sets benefitsTaxedViaPayroll + * Sets payAfterStatDedns * - * @param string|null $benefitsTaxedViaPayroll benefitsTaxedViaPayroll + * @param string|null $payAfterStatDedns payAfterStatDedns * * @return $this */ - public function setBenefitsTaxedViaPayroll(?string $benefitsTaxedViaPayroll): static + public function setPayAfterStatDedns(?string $payAfterStatDedns): static { - if (is_null($benefitsTaxedViaPayroll)) { - array_push($this->openAPINullablesSetToNull, 'benefitsTaxedViaPayroll'); + if (is_null($payAfterStatDedns)) { + array_push($this->openAPINullablesSetToNull, 'payAfterStatDedns'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('benefitsTaxedViaPayroll', $nullablesSetToNull); + $index = array_search('payAfterStatDedns', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['benefitsTaxedViaPayroll'] = $benefitsTaxedViaPayroll; + $this->container['payAfterStatDedns'] = $payAfterStatDedns; return $this; } /** - * Gets class1ANICsYTD + * Gets payFreq * * @return string|null */ - public function getClass1ANICsYTD(): ?string + public function getPayFreq(): ?string { - return $this->container['class1ANICsYTD']; + return $this->container['payFreq']; } /** - * Sets class1ANICsYTD + * Sets payFreq * - * @param string|null $class1ANICsYTD class1ANICsYTD + * @param string|null $payFreq payFreq * * @return $this */ - public function setClass1ANICsYTD(?string $class1ANICsYTD): static + public function setPayFreq(?string $payFreq): static { - if (is_null($class1ANICsYTD)) { - array_push($this->openAPINullablesSetToNull, 'class1ANICsYTD'); + if (is_null($payFreq)) { + array_push($this->openAPINullablesSetToNull, 'payFreq'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('class1ANICsYTD', $nullablesSetToNull); + $index = array_search('payFreq', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['class1ANICsYTD'] = $class1ANICsYTD; + $this->container['payFreq'] = $payFreq; return $this; } /** - * Gets benefits + * Gets periodsCovered * - * @return \SynergiTech\Staffology\Model\FpsBenefit|null + * @return int|null */ - public function getBenefits(): ?\SynergiTech\Staffology\Model\FpsBenefit + public function getPeriodsCovered(): ?int { - return $this->container['benefits']; + return $this->container['periodsCovered']; } /** - * Sets benefits + * Sets periodsCovered * - * @param \SynergiTech\Staffology\Model\FpsBenefit|null $benefits benefits + * @param int|null $periodsCovered periodsCovered * * @return $this */ - public function setBenefits(?\SynergiTech\Staffology\Model\FpsBenefit $benefits): static + public function setPeriodsCovered(?int $periodsCovered): static { - if (is_null($benefits)) { - throw new InvalidArgumentException('non-nullable benefits cannot be null'); + if (is_null($periodsCovered)) { + throw new InvalidArgumentException('non-nullable periodsCovered cannot be null'); } - $this->container['benefits'] = $benefits; + $this->container['periodsCovered'] = $periodsCovered; return $this; } /** - * Gets empeePenContribnsPaid + * Gets pmtAfterLeaving * * @return string|null */ - public function getEmpeePenContribnsPaid(): ?string + public function getPmtAfterLeaving(): ?string { - return $this->container['empeePenContribnsPaid']; + return $this->container['pmtAfterLeaving']; } /** - * Sets empeePenContribnsPaid + * Sets pmtAfterLeaving * - * @param string|null $empeePenContribnsPaid empeePenContribnsPaid + * @param string|null $pmtAfterLeaving pmtAfterLeaving * * @return $this */ - public function setEmpeePenContribnsPaid(?string $empeePenContribnsPaid): static + public function setPmtAfterLeaving(?string $pmtAfterLeaving): static { - if (is_null($empeePenContribnsPaid)) { - array_push($this->openAPINullablesSetToNull, 'empeePenContribnsPaid'); + if (is_null($pmtAfterLeaving)) { + array_push($this->openAPINullablesSetToNull, 'pmtAfterLeaving'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('empeePenContribnsPaid', $nullablesSetToNull); + $index = array_search('pmtAfterLeaving', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['empeePenContribnsPaid'] = $empeePenContribnsPaid; + $this->container['pmtAfterLeaving'] = $pmtAfterLeaving; return $this; } /** - * Gets itemsSubjectToClass1NIC + * Gets pmtDate * * @return string|null */ - public function getItemsSubjectToClass1NIC(): ?string + public function getPmtDate(): ?string { - return $this->container['itemsSubjectToClass1NIC']; + return $this->container['pmtDate']; } /** - * Sets itemsSubjectToClass1NIC + * Sets pmtDate * - * @param string|null $itemsSubjectToClass1NIC itemsSubjectToClass1NIC + * @param string|null $pmtDate pmtDate * * @return $this */ - public function setItemsSubjectToClass1NIC(?string $itemsSubjectToClass1NIC): static + public function setPmtDate(?string $pmtDate): static { - if (is_null($itemsSubjectToClass1NIC)) { - array_push($this->openAPINullablesSetToNull, 'itemsSubjectToClass1NIC'); + if (is_null($pmtDate)) { + array_push($this->openAPINullablesSetToNull, 'pmtDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('itemsSubjectToClass1NIC', $nullablesSetToNull); + $index = array_search('pmtDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['itemsSubjectToClass1NIC'] = $itemsSubjectToClass1NIC; + $this->container['pmtDate'] = $pmtDate; return $this; } /** - * Gets empeePenContribnsNotPaid + * Gets postgradLoanRecovered * * @return string|null */ - public function getEmpeePenContribnsNotPaid(): ?string + public function getPostgradLoanRecovered(): ?string { - return $this->container['empeePenContribnsNotPaid']; + return $this->container['postgradLoanRecovered']; } /** - * Sets empeePenContribnsNotPaid + * Sets postgradLoanRecovered * - * @param string|null $empeePenContribnsNotPaid empeePenContribnsNotPaid + * @param string|null $postgradLoanRecovered postgradLoanRecovered * * @return $this */ - public function setEmpeePenContribnsNotPaid(?string $empeePenContribnsNotPaid): static + public function setPostgradLoanRecovered(?string $postgradLoanRecovered): static { - if (is_null($empeePenContribnsNotPaid)) { - array_push($this->openAPINullablesSetToNull, 'empeePenContribnsNotPaid'); + if (is_null($postgradLoanRecovered)) { + array_push($this->openAPINullablesSetToNull, 'postgradLoanRecovered'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('empeePenContribnsNotPaid', $nullablesSetToNull); + $index = array_search('postgradLoanRecovered', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['empeePenContribnsNotPaid'] = $empeePenContribnsNotPaid; - - return $this; - } - - /** - * Gets studentLoanRecovered - * - * @return \SynergiTech\Staffology\Model\StudentLoanRecovered|null - */ - public function getStudentLoanRecovered(): ?\SynergiTech\Staffology\Model\StudentLoanRecovered - { - return $this->container['studentLoanRecovered']; - } - - /** - * Sets studentLoanRecovered - * - * @param \SynergiTech\Staffology\Model\StudentLoanRecovered|null $studentLoanRecovered studentLoanRecovered - * - * @return $this - */ - public function setStudentLoanRecovered(?\SynergiTech\Staffology\Model\StudentLoanRecovered $studentLoanRecovered): static - { - if (is_null($studentLoanRecovered)) { - throw new InvalidArgumentException('non-nullable studentLoanRecovered cannot be null'); - } - $this->container['studentLoanRecovered'] = $studentLoanRecovered; + $this->container['postgradLoanRecovered'] = $postgradLoanRecovered; return $this; } /** - * Gets postgradLoanRecovered + * Gets sapytd * * @return string|null */ - public function getPostgradLoanRecovered(): ?string + public function getSapytd(): ?string { - return $this->container['postgradLoanRecovered']; + return $this->container['sapytd']; } /** - * Sets postgradLoanRecovered + * Sets sapytd * - * @param string|null $postgradLoanRecovered postgradLoanRecovered + * @param string|null $sapytd sapytd * * @return $this */ - public function setPostgradLoanRecovered(?string $postgradLoanRecovered): static + public function setSapytd(?string $sapytd): static { - if (is_null($postgradLoanRecovered)) { - array_push($this->openAPINullablesSetToNull, 'postgradLoanRecovered'); + if (is_null($sapytd)) { + array_push($this->openAPINullablesSetToNull, 'sapytd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('postgradLoanRecovered', $nullablesSetToNull); + $index = array_search('sapytd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['postgradLoanRecovered'] = $postgradLoanRecovered; + $this->container['sapytd'] = $sapytd; return $this; } /** - * Gets taxDeductedOrRefunded + * Gets shPPYTD * * @return string|null */ - public function getTaxDeductedOrRefunded(): ?string + public function getShPPYTD(): ?string { - return $this->container['taxDeductedOrRefunded']; + return $this->container['shPPYTD']; } /** - * Sets taxDeductedOrRefunded + * Sets shPPYTD * - * @param string|null $taxDeductedOrRefunded taxDeductedOrRefunded + * @param string|null $shPPYTD shPPYTD * * @return $this */ - public function setTaxDeductedOrRefunded(?string $taxDeductedOrRefunded): static + public function setShPPYTD(?string $shPPYTD): static { - if (is_null($taxDeductedOrRefunded)) { - array_push($this->openAPINullablesSetToNull, 'taxDeductedOrRefunded'); + if (is_null($shPPYTD)) { + array_push($this->openAPINullablesSetToNull, 'shPPYTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxDeductedOrRefunded', $nullablesSetToNull); + $index = array_search('shPPYTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxDeductedOrRefunded'] = $taxDeductedOrRefunded; + $this->container['shPPYTD'] = $shPPYTD; return $this; } /** - * Gets onStrike + * Gets smpytd * * @return string|null */ - public function getOnStrike(): ?string + public function getSmpytd(): ?string { - return $this->container['onStrike']; + return $this->container['smpytd']; } /** - * Sets onStrike + * Sets smpytd * - * @param string|null $onStrike onStrike + * @param string|null $smpytd smpytd * * @return $this */ - public function setOnStrike(?string $onStrike): static + public function setSmpytd(?string $smpytd): static { - if (is_null($onStrike)) { - array_push($this->openAPINullablesSetToNull, 'onStrike'); + if (is_null($smpytd)) { + array_push($this->openAPINullablesSetToNull, 'smpytd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('onStrike', $nullablesSetToNull); + $index = array_search('smpytd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['onStrike'] = $onStrike; + $this->container['smpytd'] = $smpytd; return $this; } /** - * Gets unpaidAbsence + * Gets sncpytd * * @return string|null */ - public function getUnpaidAbsence(): ?string + public function getSncpytd(): ?string { - return $this->container['unpaidAbsence']; + return $this->container['sncpytd']; } /** - * Sets unpaidAbsence + * Sets sncpytd * - * @param string|null $unpaidAbsence unpaidAbsence + * @param string|null $sncpytd sncpytd * * @return $this */ - public function setUnpaidAbsence(?string $unpaidAbsence): static + public function setSncpytd(?string $sncpytd): static { - if (is_null($unpaidAbsence)) { - array_push($this->openAPINullablesSetToNull, 'unpaidAbsence'); + if (is_null($sncpytd)) { + array_push($this->openAPINullablesSetToNull, 'sncpytd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('unpaidAbsence', $nullablesSetToNull); + $index = array_search('sncpytd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['unpaidAbsence'] = $unpaidAbsence; + $this->container['sncpytd'] = $sncpytd; return $this; } /** - * Gets smpytd + * Gets spbpytd * * @return string|null */ - public function getSmpytd(): ?string + public function getSpbpytd(): ?string { - return $this->container['smpytd']; + return $this->container['spbpytd']; } /** - * Sets smpytd + * Sets spbpytd * - * @param string|null $smpytd smpytd + * @param string|null $spbpytd spbpytd * * @return $this */ - public function setSmpytd(?string $smpytd): static + public function setSpbpytd(?string $spbpytd): static { - if (is_null($smpytd)) { - array_push($this->openAPINullablesSetToNull, 'smpytd'); + if (is_null($spbpytd)) { + array_push($this->openAPINullablesSetToNull, 'spbpytd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('smpytd', $nullablesSetToNull); + $index = array_search('spbpytd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['smpytd'] = $smpytd; + $this->container['spbpytd'] = $spbpytd; return $this; } @@ -1444,137 +1417,123 @@ public function setSppytd(?string $sppytd): static } /** - * Gets sapytd + * Gets studentLoanRecovered * - * @return string|null + * @return \SynergiTech\Staffology\Model\StudentLoanRecovered|null */ - public function getSapytd(): ?string + public function getStudentLoanRecovered(): ?\SynergiTech\Staffology\Model\StudentLoanRecovered { - return $this->container['sapytd']; + return $this->container['studentLoanRecovered']; } /** - * Sets sapytd + * Sets studentLoanRecovered * - * @param string|null $sapytd sapytd + * @param \SynergiTech\Staffology\Model\StudentLoanRecovered|null $studentLoanRecovered studentLoanRecovered * * @return $this */ - public function setSapytd(?string $sapytd): static + public function setStudentLoanRecovered(?\SynergiTech\Staffology\Model\StudentLoanRecovered $studentLoanRecovered): static { - if (is_null($sapytd)) { - array_push($this->openAPINullablesSetToNull, 'sapytd'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('sapytd', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($studentLoanRecovered)) { + throw new InvalidArgumentException('non-nullable studentLoanRecovered cannot be null'); } - $this->container['sapytd'] = $sapytd; + $this->container['studentLoanRecovered'] = $studentLoanRecovered; return $this; } /** - * Gets shPPYTD + * Gets taxCode * - * @return string|null + * @return \SynergiTech\Staffology\Model\FpsEmployeeTaxCode|null */ - public function getShPPYTD(): ?string + public function getTaxCode(): ?\SynergiTech\Staffology\Model\FpsEmployeeTaxCode { - return $this->container['shPPYTD']; + return $this->container['taxCode']; } /** - * Sets shPPYTD + * Sets taxCode * - * @param string|null $shPPYTD shPPYTD + * @param \SynergiTech\Staffology\Model\FpsEmployeeTaxCode|null $taxCode taxCode * * @return $this */ - public function setShPPYTD(?string $shPPYTD): static + public function setTaxCode(?\SynergiTech\Staffology\Model\FpsEmployeeTaxCode $taxCode): static { - if (is_null($shPPYTD)) { - array_push($this->openAPINullablesSetToNull, 'shPPYTD'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('shPPYTD', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($taxCode)) { + throw new InvalidArgumentException('non-nullable taxCode cannot be null'); } - $this->container['shPPYTD'] = $shPPYTD; + $this->container['taxCode'] = $taxCode; return $this; } /** - * Gets spbpytd + * Gets taxDeductedOrRefunded * * @return string|null */ - public function getSpbpytd(): ?string + public function getTaxDeductedOrRefunded(): ?string { - return $this->container['spbpytd']; + return $this->container['taxDeductedOrRefunded']; } /** - * Sets spbpytd + * Sets taxDeductedOrRefunded * - * @param string|null $spbpytd spbpytd + * @param string|null $taxDeductedOrRefunded taxDeductedOrRefunded * * @return $this */ - public function setSpbpytd(?string $spbpytd): static + public function setTaxDeductedOrRefunded(?string $taxDeductedOrRefunded): static { - if (is_null($spbpytd)) { - array_push($this->openAPINullablesSetToNull, 'spbpytd'); + if (is_null($taxDeductedOrRefunded)) { + array_push($this->openAPINullablesSetToNull, 'taxDeductedOrRefunded'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('spbpytd', $nullablesSetToNull); + $index = array_search('taxDeductedOrRefunded', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['spbpytd'] = $spbpytd; + $this->container['taxDeductedOrRefunded'] = $taxDeductedOrRefunded; return $this; } /** - * Gets sncpytd + * Gets taxablePay * * @return string|null */ - public function getSncpytd(): ?string + public function getTaxablePay(): ?string { - return $this->container['sncpytd']; + return $this->container['taxablePay']; } /** - * Sets sncpytd + * Sets taxablePay * - * @param string|null $sncpytd sncpytd + * @param string|null $taxablePay taxablePay * * @return $this */ - public function setSncpytd(?string $sncpytd): static + public function setTaxablePay(?string $taxablePay): static { - if (is_null($sncpytd)) { - array_push($this->openAPINullablesSetToNull, 'sncpytd'); + if (is_null($taxablePay)) { + array_push($this->openAPINullablesSetToNull, 'taxablePay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('sncpytd', $nullablesSetToNull); + $index = array_search('taxablePay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['sncpytd'] = $sncpytd; + $this->container['taxablePay'] = $taxablePay; return $this; } @@ -1614,28 +1573,69 @@ public function setTrivialCommutationPayment(?array $trivialCommutationPayment): } /** - * Gets flexibleDrawdown + * Gets unpaidAbsence * - * @return \SynergiTech\Staffology\Model\FpsEmployeeFlexibleDrawdown|null + * @return string|null */ - public function getFlexibleDrawdown(): ?\SynergiTech\Staffology\Model\FpsEmployeeFlexibleDrawdown + public function getUnpaidAbsence(): ?string { - return $this->container['flexibleDrawdown']; + return $this->container['unpaidAbsence']; } /** - * Sets flexibleDrawdown + * Sets unpaidAbsence * - * @param \SynergiTech\Staffology\Model\FpsEmployeeFlexibleDrawdown|null $flexibleDrawdown flexibleDrawdown + * @param string|null $unpaidAbsence unpaidAbsence * * @return $this */ - public function setFlexibleDrawdown(?\SynergiTech\Staffology\Model\FpsEmployeeFlexibleDrawdown $flexibleDrawdown): static + public function setUnpaidAbsence(?string $unpaidAbsence): static { - if (is_null($flexibleDrawdown)) { - throw new InvalidArgumentException('non-nullable flexibleDrawdown cannot be null'); + if (is_null($unpaidAbsence)) { + array_push($this->openAPINullablesSetToNull, 'unpaidAbsence'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('unpaidAbsence', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['flexibleDrawdown'] = $flexibleDrawdown; + $this->container['unpaidAbsence'] = $unpaidAbsence; + + return $this; + } + + /** + * Gets weekNo + * + * @return string|null + */ + public function getWeekNo(): ?string + { + return $this->container['weekNo']; + } + + /** + * Sets weekNo + * + * @param string|null $weekNo weekNo + * + * @return $this + */ + public function setWeekNo(?string $weekNo): static + { + if (is_null($weekNo)) { + array_push($this->openAPINullablesSetToNull, 'weekNo'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('weekNo', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['weekNo'] = $weekNo; return $this; } diff --git a/src/Model/FpsEmployeeSeconded.php b/src/Model/FpsEmployeeSeconded.php index f5bc54e..33bb4b5 100644 --- a/src/Model/FpsEmployeeSeconded.php +++ b/src/Model/FpsEmployeeSeconded.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class FpsEmployeeSeconded implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ + 'eeaCitizen' => 'string', + 'epM6' => 'string', 'inOutUK' => 'string', 'stay183DaysOrMore' => 'string', - 'stayLessThan183Days' => 'string', - 'eeaCitizen' => 'string', - 'epM6' => 'string' + 'stayLessThan183Days' => 'string' ]; /** @@ -72,11 +72,11 @@ class FpsEmployeeSeconded implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPIFormats = [ + 'eeaCitizen' => null, + 'epM6' => null, 'inOutUK' => null, 'stay183DaysOrMore' => null, - 'stayLessThan183Days' => null, - 'eeaCitizen' => null, - 'epM6' => null + 'stayLessThan183Days' => null ]; /** @@ -85,11 +85,11 @@ class FpsEmployeeSeconded implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPINullables = [ + 'eeaCitizen' => true, + 'epM6' => true, 'inOutUK' => true, 'stay183DaysOrMore' => true, - 'stayLessThan183Days' => true, - 'eeaCitizen' => true, - 'epM6' => true + 'stayLessThan183Days' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'eeaCitizen' => 'eeaCitizen', + 'epM6' => 'epM6', 'inOutUK' => 'inOutUK', 'stay183DaysOrMore' => 'stay183DaysOrMore', - 'stayLessThan183Days' => 'stayLessThan183Days', - 'eeaCitizen' => 'eeaCitizen', - 'epM6' => 'epM6' + 'stayLessThan183Days' => 'stayLessThan183Days' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'eeaCitizen' => 'setEeaCitizen', + 'epM6' => 'setEpM6', 'inOutUK' => 'setInOutUK', 'stay183DaysOrMore' => 'setStay183DaysOrMore', - 'stayLessThan183Days' => 'setStayLessThan183Days', - 'eeaCitizen' => 'setEeaCitizen', - 'epM6' => 'setEpM6' + 'stayLessThan183Days' => 'setStayLessThan183Days' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'eeaCitizen' => 'getEeaCitizen', + 'epM6' => 'getEpM6', 'inOutUK' => 'getInOutUK', 'stay183DaysOrMore' => 'getStay183DaysOrMore', - 'stayLessThan183Days' => 'getStayLessThan183Days', - 'eeaCitizen' => 'getEeaCitizen', - 'epM6' => 'getEpM6' + 'stayLessThan183Days' => 'getStayLessThan183Days' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('eeaCitizen', $data ?? [], null); + $this->setIfExists('epM6', $data ?? [], null); $this->setIfExists('inOutUK', $data ?? [], null); $this->setIfExists('stay183DaysOrMore', $data ?? [], null); $this->setIfExists('stayLessThan183Days', $data ?? [], null); - $this->setIfExists('eeaCitizen', $data ?? [], null); - $this->setIfExists('epM6', $data ?? [], null); } /** @@ -317,171 +317,171 @@ public function valid(): bool /** - * Gets inOutUK + * Gets eeaCitizen * * @return string|null */ - public function getInOutUK(): ?string + public function getEeaCitizen(): ?string { - return $this->container['inOutUK']; + return $this->container['eeaCitizen']; } /** - * Sets inOutUK + * Sets eeaCitizen * - * @param string|null $inOutUK inOutUK + * @param string|null $eeaCitizen eeaCitizen * * @return $this */ - public function setInOutUK(?string $inOutUK): static + public function setEeaCitizen(?string $eeaCitizen): static { - if (is_null($inOutUK)) { - array_push($this->openAPINullablesSetToNull, 'inOutUK'); + if (is_null($eeaCitizen)) { + array_push($this->openAPINullablesSetToNull, 'eeaCitizen'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('inOutUK', $nullablesSetToNull); + $index = array_search('eeaCitizen', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['inOutUK'] = $inOutUK; + $this->container['eeaCitizen'] = $eeaCitizen; return $this; } /** - * Gets stay183DaysOrMore + * Gets epM6 * * @return string|null */ - public function getStay183DaysOrMore(): ?string + public function getEpM6(): ?string { - return $this->container['stay183DaysOrMore']; + return $this->container['epM6']; } /** - * Sets stay183DaysOrMore + * Sets epM6 * - * @param string|null $stay183DaysOrMore stay183DaysOrMore + * @param string|null $epM6 epM6 * * @return $this */ - public function setStay183DaysOrMore(?string $stay183DaysOrMore): static + public function setEpM6(?string $epM6): static { - if (is_null($stay183DaysOrMore)) { - array_push($this->openAPINullablesSetToNull, 'stay183DaysOrMore'); + if (is_null($epM6)) { + array_push($this->openAPINullablesSetToNull, 'epM6'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('stay183DaysOrMore', $nullablesSetToNull); + $index = array_search('epM6', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['stay183DaysOrMore'] = $stay183DaysOrMore; + $this->container['epM6'] = $epM6; return $this; } /** - * Gets stayLessThan183Days + * Gets inOutUK * * @return string|null */ - public function getStayLessThan183Days(): ?string + public function getInOutUK(): ?string { - return $this->container['stayLessThan183Days']; + return $this->container['inOutUK']; } /** - * Sets stayLessThan183Days + * Sets inOutUK * - * @param string|null $stayLessThan183Days stayLessThan183Days + * @param string|null $inOutUK inOutUK * * @return $this */ - public function setStayLessThan183Days(?string $stayLessThan183Days): static + public function setInOutUK(?string $inOutUK): static { - if (is_null($stayLessThan183Days)) { - array_push($this->openAPINullablesSetToNull, 'stayLessThan183Days'); + if (is_null($inOutUK)) { + array_push($this->openAPINullablesSetToNull, 'inOutUK'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('stayLessThan183Days', $nullablesSetToNull); + $index = array_search('inOutUK', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['stayLessThan183Days'] = $stayLessThan183Days; + $this->container['inOutUK'] = $inOutUK; return $this; } /** - * Gets eeaCitizen + * Gets stay183DaysOrMore * * @return string|null */ - public function getEeaCitizen(): ?string + public function getStay183DaysOrMore(): ?string { - return $this->container['eeaCitizen']; + return $this->container['stay183DaysOrMore']; } /** - * Sets eeaCitizen + * Sets stay183DaysOrMore * - * @param string|null $eeaCitizen eeaCitizen + * @param string|null $stay183DaysOrMore stay183DaysOrMore * * @return $this */ - public function setEeaCitizen(?string $eeaCitizen): static + public function setStay183DaysOrMore(?string $stay183DaysOrMore): static { - if (is_null($eeaCitizen)) { - array_push($this->openAPINullablesSetToNull, 'eeaCitizen'); + if (is_null($stay183DaysOrMore)) { + array_push($this->openAPINullablesSetToNull, 'stay183DaysOrMore'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('eeaCitizen', $nullablesSetToNull); + $index = array_search('stay183DaysOrMore', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['eeaCitizen'] = $eeaCitizen; + $this->container['stay183DaysOrMore'] = $stay183DaysOrMore; return $this; } /** - * Gets epM6 + * Gets stayLessThan183Days * * @return string|null */ - public function getEpM6(): ?string + public function getStayLessThan183Days(): ?string { - return $this->container['epM6']; + return $this->container['stayLessThan183Days']; } /** - * Sets epM6 + * Sets stayLessThan183Days * - * @param string|null $epM6 epM6 + * @param string|null $stayLessThan183Days stayLessThan183Days * * @return $this */ - public function setEpM6(?string $epM6): static + public function setStayLessThan183Days(?string $stayLessThan183Days): static { - if (is_null($epM6)) { - array_push($this->openAPINullablesSetToNull, 'epM6'); + if (is_null($stayLessThan183Days)) { + array_push($this->openAPINullablesSetToNull, 'stayLessThan183Days'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('epM6', $nullablesSetToNull); + $index = array_search('stayLessThan183Days', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['epM6'] = $epM6; + $this->container['stayLessThan183Days'] = $stayLessThan183Days; return $this; } diff --git a/src/Model/FpsEmployeeStarter.php b/src/Model/FpsEmployeeStarter.php index 0c5dd37..cc3d75a 100644 --- a/src/Model/FpsEmployeeStarter.php +++ b/src/Model/FpsEmployeeStarter.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class FpsEmployeeStarter implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ + 'occPension' => '\SynergiTech\Staffology\Model\FpsEmployeeStarterOccPension', + 'postgradLoan' => 'string', + 'seconded' => '\SynergiTech\Staffology\Model\FpsEmployeeSeconded', 'startDate' => 'string', 'startDec' => 'string', - 'studentLoan' => 'string', - 'postgradLoan' => 'string', - 'occPension' => '\SynergiTech\Staffology\Model\FpsEmployeeStarterOccPension', - 'seconded' => '\SynergiTech\Staffology\Model\FpsEmployeeSeconded' + 'studentLoan' => 'string' ]; /** @@ -73,12 +73,12 @@ class FpsEmployeeStarter implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ + 'occPension' => null, + 'postgradLoan' => null, + 'seconded' => null, 'startDate' => null, 'startDec' => null, - 'studentLoan' => null, - 'postgradLoan' => null, - 'occPension' => null, - 'seconded' => null + 'studentLoan' => null ]; /** @@ -87,12 +87,12 @@ class FpsEmployeeStarter implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ + 'occPension' => false, + 'postgradLoan' => true, + 'seconded' => false, 'startDate' => true, 'startDec' => true, - 'studentLoan' => true, - 'postgradLoan' => true, - 'occPension' => false, - 'seconded' => false + 'studentLoan' => true ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'occPension' => 'occPension', + 'postgradLoan' => 'postgradLoan', + 'seconded' => 'seconded', 'startDate' => 'startDate', 'startDec' => 'startDec', - 'studentLoan' => 'studentLoan', - 'postgradLoan' => 'postgradLoan', - 'occPension' => 'occPension', - 'seconded' => 'seconded' + 'studentLoan' => 'studentLoan' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'occPension' => 'setOccPension', + 'postgradLoan' => 'setPostgradLoan', + 'seconded' => 'setSeconded', 'startDate' => 'setStartDate', 'startDec' => 'setStartDec', - 'studentLoan' => 'setStudentLoan', - 'postgradLoan' => 'setPostgradLoan', - 'occPension' => 'setOccPension', - 'seconded' => 'setSeconded' + 'studentLoan' => 'setStudentLoan' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'occPension' => 'getOccPension', + 'postgradLoan' => 'getPostgradLoan', + 'seconded' => 'getSeconded', 'startDate' => 'getStartDate', 'startDec' => 'getStartDec', - 'studentLoan' => 'getStudentLoan', - 'postgradLoan' => 'getPostgradLoan', - 'occPension' => 'getOccPension', - 'seconded' => 'getSeconded' + 'studentLoan' => 'getStudentLoan' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('occPension', $data ?? [], null); + $this->setIfExists('postgradLoan', $data ?? [], null); + $this->setIfExists('seconded', $data ?? [], null); $this->setIfExists('startDate', $data ?? [], null); $this->setIfExists('startDec', $data ?? [], null); $this->setIfExists('studentLoan', $data ?? [], null); - $this->setIfExists('postgradLoan', $data ?? [], null); - $this->setIfExists('occPension', $data ?? [], null); - $this->setIfExists('seconded', $data ?? [], null); } /** @@ -324,191 +324,191 @@ public function valid(): bool /** - * Gets startDate + * Gets occPension * - * @return string|null + * @return \SynergiTech\Staffology\Model\FpsEmployeeStarterOccPension|null */ - public function getStartDate(): ?string + public function getOccPension(): ?\SynergiTech\Staffology\Model\FpsEmployeeStarterOccPension { - return $this->container['startDate']; + return $this->container['occPension']; } /** - * Sets startDate + * Sets occPension * - * @param string|null $startDate startDate + * @param \SynergiTech\Staffology\Model\FpsEmployeeStarterOccPension|null $occPension occPension * * @return $this */ - public function setStartDate(?string $startDate): static + public function setOccPension(?\SynergiTech\Staffology\Model\FpsEmployeeStarterOccPension $occPension): static { - if (is_null($startDate)) { - array_push($this->openAPINullablesSetToNull, 'startDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($occPension)) { + throw new InvalidArgumentException('non-nullable occPension cannot be null'); } - $this->container['startDate'] = $startDate; + $this->container['occPension'] = $occPension; return $this; } /** - * Gets startDec + * Gets postgradLoan * * @return string|null */ - public function getStartDec(): ?string + public function getPostgradLoan(): ?string { - return $this->container['startDec']; + return $this->container['postgradLoan']; } /** - * Sets startDec + * Sets postgradLoan * - * @param string|null $startDec startDec + * @param string|null $postgradLoan postgradLoan * * @return $this */ - public function setStartDec(?string $startDec): static + public function setPostgradLoan(?string $postgradLoan): static { - if (is_null($startDec)) { - array_push($this->openAPINullablesSetToNull, 'startDec'); + if (is_null($postgradLoan)) { + array_push($this->openAPINullablesSetToNull, 'postgradLoan'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startDec', $nullablesSetToNull); + $index = array_search('postgradLoan', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['startDec'] = $startDec; + $this->container['postgradLoan'] = $postgradLoan; return $this; } /** - * Gets studentLoan + * Gets seconded * - * @return string|null + * @return \SynergiTech\Staffology\Model\FpsEmployeeSeconded|null */ - public function getStudentLoan(): ?string + public function getSeconded(): ?\SynergiTech\Staffology\Model\FpsEmployeeSeconded { - return $this->container['studentLoan']; + return $this->container['seconded']; } /** - * Sets studentLoan + * Sets seconded * - * @param string|null $studentLoan studentLoan + * @param \SynergiTech\Staffology\Model\FpsEmployeeSeconded|null $seconded seconded * * @return $this */ - public function setStudentLoan(?string $studentLoan): static + public function setSeconded(?\SynergiTech\Staffology\Model\FpsEmployeeSeconded $seconded): static { - if (is_null($studentLoan)) { - array_push($this->openAPINullablesSetToNull, 'studentLoan'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('studentLoan', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($seconded)) { + throw new InvalidArgumentException('non-nullable seconded cannot be null'); } - $this->container['studentLoan'] = $studentLoan; + $this->container['seconded'] = $seconded; return $this; } /** - * Gets postgradLoan + * Gets startDate * * @return string|null */ - public function getPostgradLoan(): ?string + public function getStartDate(): ?string { - return $this->container['postgradLoan']; + return $this->container['startDate']; } /** - * Sets postgradLoan + * Sets startDate * - * @param string|null $postgradLoan postgradLoan + * @param string|null $startDate startDate * * @return $this */ - public function setPostgradLoan(?string $postgradLoan): static + public function setStartDate(?string $startDate): static { - if (is_null($postgradLoan)) { - array_push($this->openAPINullablesSetToNull, 'postgradLoan'); + if (is_null($startDate)) { + array_push($this->openAPINullablesSetToNull, 'startDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('postgradLoan', $nullablesSetToNull); + $index = array_search('startDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['postgradLoan'] = $postgradLoan; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets occPension + * Gets startDec * - * @return \SynergiTech\Staffology\Model\FpsEmployeeStarterOccPension|null + * @return string|null */ - public function getOccPension(): ?\SynergiTech\Staffology\Model\FpsEmployeeStarterOccPension + public function getStartDec(): ?string { - return $this->container['occPension']; + return $this->container['startDec']; } /** - * Sets occPension + * Sets startDec * - * @param \SynergiTech\Staffology\Model\FpsEmployeeStarterOccPension|null $occPension occPension + * @param string|null $startDec startDec * * @return $this */ - public function setOccPension(?\SynergiTech\Staffology\Model\FpsEmployeeStarterOccPension $occPension): static + public function setStartDec(?string $startDec): static { - if (is_null($occPension)) { - throw new InvalidArgumentException('non-nullable occPension cannot be null'); + if (is_null($startDec)) { + array_push($this->openAPINullablesSetToNull, 'startDec'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startDec', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['occPension'] = $occPension; + $this->container['startDec'] = $startDec; return $this; } /** - * Gets seconded + * Gets studentLoan * - * @return \SynergiTech\Staffology\Model\FpsEmployeeSeconded|null + * @return string|null */ - public function getSeconded(): ?\SynergiTech\Staffology\Model\FpsEmployeeSeconded + public function getStudentLoan(): ?string { - return $this->container['seconded']; + return $this->container['studentLoan']; } /** - * Sets seconded + * Sets studentLoan * - * @param \SynergiTech\Staffology\Model\FpsEmployeeSeconded|null $seconded seconded + * @param string|null $studentLoan studentLoan * * @return $this */ - public function setSeconded(?\SynergiTech\Staffology\Model\FpsEmployeeSeconded $seconded): static + public function setStudentLoan(?string $studentLoan): static { - if (is_null($seconded)) { - throw new InvalidArgumentException('non-nullable seconded cannot be null'); + if (is_null($studentLoan)) { + array_push($this->openAPINullablesSetToNull, 'studentLoan'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('studentLoan', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['seconded'] = $seconded; + $this->container['studentLoan'] = $studentLoan; return $this; } diff --git a/src/Model/FpsEmployeeStarterOccPension.php b/src/Model/FpsEmployeeStarterOccPension.php index 7842918..347bb00 100644 --- a/src/Model/FpsEmployeeStarterOccPension.php +++ b/src/Model/FpsEmployeeStarterOccPension.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class FpsEmployeeStarterOccPension implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'bereaved' => 'string', - 'amount' => 'string' + 'amount' => 'string', + 'bereaved' => 'string' ]; /** @@ -69,8 +69,8 @@ class FpsEmployeeStarterOccPension implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'bereaved' => null, - 'amount' => null + 'amount' => null, + 'bereaved' => null ]; /** @@ -79,8 +79,8 @@ class FpsEmployeeStarterOccPension implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'bereaved' => true, - 'amount' => true + 'amount' => true, + 'bereaved' => true ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'bereaved' => 'bereaved', - 'amount' => 'amount' + 'amount' => 'amount', + 'bereaved' => 'bereaved' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'bereaved' => 'setBereaved', - 'amount' => 'setAmount' + 'amount' => 'setAmount', + 'bereaved' => 'setBereaved' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'bereaved' => 'getBereaved', - 'amount' => 'getAmount' + 'amount' => 'getAmount', + 'bereaved' => 'getBereaved' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('bereaved', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('bereaved', $data ?? [], null); } /** @@ -296,69 +296,69 @@ public function valid(): bool /** - * Gets bereaved + * Gets amount * * @return string|null */ - public function getBereaved(): ?string + public function getAmount(): ?string { - return $this->container['bereaved']; + return $this->container['amount']; } /** - * Sets bereaved + * Sets amount * - * @param string|null $bereaved bereaved + * @param string|null $amount amount * * @return $this */ - public function setBereaved(?string $bereaved): static + public function setAmount(?string $amount): static { - if (is_null($bereaved)) { - array_push($this->openAPINullablesSetToNull, 'bereaved'); + if (is_null($amount)) { + array_push($this->openAPINullablesSetToNull, 'amount'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bereaved', $nullablesSetToNull); + $index = array_search('amount', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['bereaved'] = $bereaved; + $this->container['amount'] = $amount; return $this; } /** - * Gets amount + * Gets bereaved * * @return string|null */ - public function getAmount(): ?string + public function getBereaved(): ?string { - return $this->container['amount']; + return $this->container['bereaved']; } /** - * Sets amount + * Sets bereaved * - * @param string|null $amount amount + * @param string|null $bereaved bereaved * * @return $this */ - public function setAmount(?string $amount): static + public function setBereaved(?string $bereaved): static { - if (is_null($amount)) { - array_push($this->openAPINullablesSetToNull, 'amount'); + if (is_null($bereaved)) { + array_push($this->openAPINullablesSetToNull, 'bereaved'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('amount', $nullablesSetToNull); + $index = array_search('bereaved', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['amount'] = $amount; + $this->container['bereaved'] = $bereaved; return $this; } diff --git a/src/Model/FpsEmployeeTaxCode.php b/src/Model/FpsEmployeeTaxCode.php index 3fe4b15..b7cf833 100644 --- a/src/Model/FpsEmployeeTaxCode.php +++ b/src/Model/FpsEmployeeTaxCode.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class FpsEmployeeTaxCode implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPITypes = [ 'basisNonCumulative' => 'string', - 'taxRegime' => 'string', - 'taxCode' => 'string' + 'taxCode' => 'string', + 'taxRegime' => 'string' ]; /** @@ -71,8 +71,8 @@ class FpsEmployeeTaxCode implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPIFormats = [ 'basisNonCumulative' => null, - 'taxRegime' => null, - 'taxCode' => null + 'taxCode' => null, + 'taxRegime' => null ]; /** @@ -82,8 +82,8 @@ class FpsEmployeeTaxCode implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPINullables = [ 'basisNonCumulative' => true, - 'taxRegime' => true, - 'taxCode' => true + 'taxCode' => true, + 'taxRegime' => true ]; /** @@ -173,8 +173,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'basisNonCumulative' => 'basisNonCumulative', - 'taxRegime' => 'taxRegime', - 'taxCode' => 'taxCode' + 'taxCode' => 'taxCode', + 'taxRegime' => 'taxRegime' ]; /** @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'basisNonCumulative' => 'setBasisNonCumulative', - 'taxRegime' => 'setTaxRegime', - 'taxCode' => 'setTaxCode' + 'taxCode' => 'setTaxCode', + 'taxRegime' => 'setTaxRegime' ]; /** @@ -195,8 +195,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'basisNonCumulative' => 'getBasisNonCumulative', - 'taxRegime' => 'getTaxRegime', - 'taxCode' => 'getTaxCode' + 'taxCode' => 'getTaxCode', + 'taxRegime' => 'getTaxRegime' ]; /** @@ -256,8 +256,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('basisNonCumulative', $data ?? [], null); - $this->setIfExists('taxRegime', $data ?? [], null); $this->setIfExists('taxCode', $data ?? [], null); + $this->setIfExists('taxRegime', $data ?? [], null); } /** @@ -337,69 +337,69 @@ public function setBasisNonCumulative(?string $basisNonCumulative): static } /** - * Gets taxRegime + * Gets taxCode * * @return string|null */ - public function getTaxRegime(): ?string + public function getTaxCode(): ?string { - return $this->container['taxRegime']; + return $this->container['taxCode']; } /** - * Sets taxRegime + * Sets taxCode * - * @param string|null $taxRegime taxRegime + * @param string|null $taxCode taxCode * * @return $this */ - public function setTaxRegime(?string $taxRegime): static + public function setTaxCode(?string $taxCode): static { - if (is_null($taxRegime)) { - array_push($this->openAPINullablesSetToNull, 'taxRegime'); + if (is_null($taxCode)) { + array_push($this->openAPINullablesSetToNull, 'taxCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxRegime', $nullablesSetToNull); + $index = array_search('taxCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxRegime'] = $taxRegime; + $this->container['taxCode'] = $taxCode; return $this; } /** - * Gets taxCode + * Gets taxRegime * * @return string|null */ - public function getTaxCode(): ?string + public function getTaxRegime(): ?string { - return $this->container['taxCode']; + return $this->container['taxRegime']; } /** - * Sets taxCode + * Sets taxRegime * - * @param string|null $taxCode taxCode + * @param string|null $taxRegime taxRegime * * @return $this */ - public function setTaxCode(?string $taxCode): static + public function setTaxRegime(?string $taxRegime): static { - if (is_null($taxCode)) { - array_push($this->openAPINullablesSetToNull, 'taxCode'); + if (is_null($taxRegime)) { + array_push($this->openAPINullablesSetToNull, 'taxRegime'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxCode', $nullablesSetToNull); + $index = array_search('taxRegime', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxCode'] = $taxCode; + $this->container['taxRegime'] = $taxRegime; return $this; } diff --git a/src/Model/FpsEmployeeTrivialCommutationPayment.php b/src/Model/FpsEmployeeTrivialCommutationPayment.php index 5ebe877..01890a3 100644 --- a/src/Model/FpsEmployeeTrivialCommutationPayment.php +++ b/src/Model/FpsEmployeeTrivialCommutationPayment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/FpsEmployerPayIdChanged.php b/src/Model/FpsEmployerPayIdChanged.php index f082d0e..9b35a7d 100644 --- a/src/Model/FpsEmployerPayIdChanged.php +++ b/src/Model/FpsEmployerPayIdChanged.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class FpsEmployerPayIdChanged implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ - 'payrollIdChangedIndicator' => 'string', - 'oldPayrollId' => 'string' + 'oldPayrollId' => 'string', + 'payrollIdChangedIndicator' => 'string' ]; /** @@ -69,8 +69,8 @@ class FpsEmployerPayIdChanged implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ - 'payrollIdChangedIndicator' => null, - 'oldPayrollId' => null + 'oldPayrollId' => null, + 'payrollIdChangedIndicator' => null ]; /** @@ -79,8 +79,8 @@ class FpsEmployerPayIdChanged implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ - 'payrollIdChangedIndicator' => true, - 'oldPayrollId' => true + 'oldPayrollId' => true, + 'payrollIdChangedIndicator' => true ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollIdChangedIndicator' => 'payrollIdChangedIndicator', - 'oldPayrollId' => 'oldPayrollId' + 'oldPayrollId' => 'oldPayrollId', + 'payrollIdChangedIndicator' => 'payrollIdChangedIndicator' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollIdChangedIndicator' => 'setPayrollIdChangedIndicator', - 'oldPayrollId' => 'setOldPayrollId' + 'oldPayrollId' => 'setOldPayrollId', + 'payrollIdChangedIndicator' => 'setPayrollIdChangedIndicator' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollIdChangedIndicator' => 'getPayrollIdChangedIndicator', - 'oldPayrollId' => 'getOldPayrollId' + 'oldPayrollId' => 'getOldPayrollId', + 'payrollIdChangedIndicator' => 'getPayrollIdChangedIndicator' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollIdChangedIndicator', $data ?? [], null); $this->setIfExists('oldPayrollId', $data ?? [], null); + $this->setIfExists('payrollIdChangedIndicator', $data ?? [], null); } /** @@ -296,69 +296,69 @@ public function valid(): bool /** - * Gets payrollIdChangedIndicator + * Gets oldPayrollId * * @return string|null */ - public function getPayrollIdChangedIndicator(): ?string + public function getOldPayrollId(): ?string { - return $this->container['payrollIdChangedIndicator']; + return $this->container['oldPayrollId']; } /** - * Sets payrollIdChangedIndicator + * Sets oldPayrollId * - * @param string|null $payrollIdChangedIndicator payrollIdChangedIndicator + * @param string|null $oldPayrollId oldPayrollId * * @return $this */ - public function setPayrollIdChangedIndicator(?string $payrollIdChangedIndicator): static + public function setOldPayrollId(?string $oldPayrollId): static { - if (is_null($payrollIdChangedIndicator)) { - array_push($this->openAPINullablesSetToNull, 'payrollIdChangedIndicator'); + if (is_null($oldPayrollId)) { + array_push($this->openAPINullablesSetToNull, 'oldPayrollId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollIdChangedIndicator', $nullablesSetToNull); + $index = array_search('oldPayrollId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payrollIdChangedIndicator'] = $payrollIdChangedIndicator; + $this->container['oldPayrollId'] = $oldPayrollId; return $this; } /** - * Gets oldPayrollId + * Gets payrollIdChangedIndicator * * @return string|null */ - public function getOldPayrollId(): ?string + public function getPayrollIdChangedIndicator(): ?string { - return $this->container['oldPayrollId']; + return $this->container['payrollIdChangedIndicator']; } /** - * Sets oldPayrollId + * Sets payrollIdChangedIndicator * - * @param string|null $oldPayrollId oldPayrollId + * @param string|null $payrollIdChangedIndicator payrollIdChangedIndicator * * @return $this */ - public function setOldPayrollId(?string $oldPayrollId): static + public function setPayrollIdChangedIndicator(?string $payrollIdChangedIndicator): static { - if (is_null($oldPayrollId)) { - array_push($this->openAPINullablesSetToNull, 'oldPayrollId'); + if (is_null($payrollIdChangedIndicator)) { + array_push($this->openAPINullablesSetToNull, 'payrollIdChangedIndicator'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('oldPayrollId', $nullablesSetToNull); + $index = array_search('payrollIdChangedIndicator', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['oldPayrollId'] = $oldPayrollId; + $this->container['payrollIdChangedIndicator'] = $payrollIdChangedIndicator; return $this; } diff --git a/src/Model/FpsEmployment.php b/src/Model/FpsEmployment.php index 2de1e41..4b1034c 100644 --- a/src/Model/FpsEmployment.php +++ b/src/Model/FpsEmployment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,21 +59,21 @@ class FpsEmployment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'employeeCurrentNiLetter' => 'string', - 'offPayrollWorker' => 'string', - 'occPenInd' => 'string', 'directorsNIC' => 'string', - 'taxWkOfApptOfDirector' => 'string', - 'starter' => '\SynergiTech\Staffology\Model\FpsEmployeeStarter', + 'employeeCurrentNiLetter' => 'string', 'employeeWorkplacePostcode' => 'string', - 'payId' => 'string', - 'payIdChgd' => '\SynergiTech\Staffology\Model\FpsEmployerPayIdChanged', - 'paymentToANonIndividual' => 'string', + 'figuresToDate' => '\SynergiTech\Staffology\Model\FpsEmployeeFigsToDate', 'irrEmp' => 'string', 'leavingDate' => 'string', - 'figuresToDate' => '\SynergiTech\Staffology\Model\FpsEmployeeFigsToDate', + 'nIlettersAndValues' => '\SynergiTech\Staffology\Model\FpsEmployeeNIlettersAndValues[]', + 'occPenInd' => 'string', + 'offPayrollWorker' => 'string', + 'payId' => 'string', + 'payIdChgd' => '\SynergiTech\Staffology\Model\FpsEmployerPayIdChanged', 'payment' => '\SynergiTech\Staffology\Model\FpsEmployeePayment', - 'nIlettersAndValues' => '\SynergiTech\Staffology\Model\FpsEmployeeNIlettersAndValues[]' + 'paymentToANonIndividual' => 'string', + 'starter' => '\SynergiTech\Staffology\Model\FpsEmployeeStarter', + 'taxWkOfApptOfDirector' => 'string' ]; /** @@ -82,21 +82,21 @@ class FpsEmployment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'employeeCurrentNiLetter' => null, - 'offPayrollWorker' => null, - 'occPenInd' => null, 'directorsNIC' => null, - 'taxWkOfApptOfDirector' => null, - 'starter' => null, + 'employeeCurrentNiLetter' => null, 'employeeWorkplacePostcode' => null, - 'payId' => null, - 'payIdChgd' => null, - 'paymentToANonIndividual' => null, + 'figuresToDate' => null, 'irrEmp' => null, 'leavingDate' => null, - 'figuresToDate' => null, + 'nIlettersAndValues' => null, + 'occPenInd' => null, + 'offPayrollWorker' => null, + 'payId' => null, + 'payIdChgd' => null, 'payment' => null, - 'nIlettersAndValues' => null + 'paymentToANonIndividual' => null, + 'starter' => null, + 'taxWkOfApptOfDirector' => null ]; /** @@ -105,21 +105,21 @@ class FpsEmployment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'employeeCurrentNiLetter' => true, - 'offPayrollWorker' => true, - 'occPenInd' => true, 'directorsNIC' => true, - 'taxWkOfApptOfDirector' => true, - 'starter' => false, + 'employeeCurrentNiLetter' => true, 'employeeWorkplacePostcode' => true, - 'payId' => true, - 'payIdChgd' => false, - 'paymentToANonIndividual' => true, + 'figuresToDate' => false, 'irrEmp' => true, 'leavingDate' => true, - 'figuresToDate' => false, + 'nIlettersAndValues' => true, + 'occPenInd' => true, + 'offPayrollWorker' => true, + 'payId' => true, + 'payIdChgd' => false, 'payment' => false, - 'nIlettersAndValues' => true + 'paymentToANonIndividual' => true, + 'starter' => false, + 'taxWkOfApptOfDirector' => true ]; /** @@ -208,21 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employeeCurrentNiLetter' => 'employeeCurrentNiLetter', - 'offPayrollWorker' => 'offPayrollWorker', - 'occPenInd' => 'occPenInd', 'directorsNIC' => 'directorsNIC', - 'taxWkOfApptOfDirector' => 'taxWkOfApptOfDirector', - 'starter' => 'starter', + 'employeeCurrentNiLetter' => 'employeeCurrentNiLetter', 'employeeWorkplacePostcode' => 'employeeWorkplacePostcode', - 'payId' => 'payId', - 'payIdChgd' => 'payIdChgd', - 'paymentToANonIndividual' => 'paymentToANonIndividual', + 'figuresToDate' => 'figuresToDate', 'irrEmp' => 'irrEmp', 'leavingDate' => 'leavingDate', - 'figuresToDate' => 'figuresToDate', + 'nIlettersAndValues' => 'nIlettersAndValues', + 'occPenInd' => 'occPenInd', + 'offPayrollWorker' => 'offPayrollWorker', + 'payId' => 'payId', + 'payIdChgd' => 'payIdChgd', 'payment' => 'payment', - 'nIlettersAndValues' => 'nIlettersAndValues' + 'paymentToANonIndividual' => 'paymentToANonIndividual', + 'starter' => 'starter', + 'taxWkOfApptOfDirector' => 'taxWkOfApptOfDirector' ]; /** @@ -231,21 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employeeCurrentNiLetter' => 'setEmployeeCurrentNiLetter', - 'offPayrollWorker' => 'setOffPayrollWorker', - 'occPenInd' => 'setOccPenInd', 'directorsNIC' => 'setDirectorsNIC', - 'taxWkOfApptOfDirector' => 'setTaxWkOfApptOfDirector', - 'starter' => 'setStarter', + 'employeeCurrentNiLetter' => 'setEmployeeCurrentNiLetter', 'employeeWorkplacePostcode' => 'setEmployeeWorkplacePostcode', - 'payId' => 'setPayId', - 'payIdChgd' => 'setPayIdChgd', - 'paymentToANonIndividual' => 'setPaymentToANonIndividual', + 'figuresToDate' => 'setFiguresToDate', 'irrEmp' => 'setIrrEmp', 'leavingDate' => 'setLeavingDate', - 'figuresToDate' => 'setFiguresToDate', + 'nIlettersAndValues' => 'setNIlettersAndValues', + 'occPenInd' => 'setOccPenInd', + 'offPayrollWorker' => 'setOffPayrollWorker', + 'payId' => 'setPayId', + 'payIdChgd' => 'setPayIdChgd', 'payment' => 'setPayment', - 'nIlettersAndValues' => 'setNIlettersAndValues' + 'paymentToANonIndividual' => 'setPaymentToANonIndividual', + 'starter' => 'setStarter', + 'taxWkOfApptOfDirector' => 'setTaxWkOfApptOfDirector' ]; /** @@ -254,21 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employeeCurrentNiLetter' => 'getEmployeeCurrentNiLetter', - 'offPayrollWorker' => 'getOffPayrollWorker', - 'occPenInd' => 'getOccPenInd', 'directorsNIC' => 'getDirectorsNIC', - 'taxWkOfApptOfDirector' => 'getTaxWkOfApptOfDirector', - 'starter' => 'getStarter', + 'employeeCurrentNiLetter' => 'getEmployeeCurrentNiLetter', 'employeeWorkplacePostcode' => 'getEmployeeWorkplacePostcode', - 'payId' => 'getPayId', - 'payIdChgd' => 'getPayIdChgd', - 'paymentToANonIndividual' => 'getPaymentToANonIndividual', + 'figuresToDate' => 'getFiguresToDate', 'irrEmp' => 'getIrrEmp', 'leavingDate' => 'getLeavingDate', - 'figuresToDate' => 'getFiguresToDate', + 'nIlettersAndValues' => 'getNIlettersAndValues', + 'occPenInd' => 'getOccPenInd', + 'offPayrollWorker' => 'getOffPayrollWorker', + 'payId' => 'getPayId', + 'payIdChgd' => 'getPayIdChgd', 'payment' => 'getPayment', - 'nIlettersAndValues' => 'getNIlettersAndValues' + 'paymentToANonIndividual' => 'getPaymentToANonIndividual', + 'starter' => 'getStarter', + 'taxWkOfApptOfDirector' => 'getTaxWkOfApptOfDirector' ]; /** @@ -327,21 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employeeCurrentNiLetter', $data ?? [], null); - $this->setIfExists('offPayrollWorker', $data ?? [], null); - $this->setIfExists('occPenInd', $data ?? [], null); $this->setIfExists('directorsNIC', $data ?? [], null); - $this->setIfExists('taxWkOfApptOfDirector', $data ?? [], null); - $this->setIfExists('starter', $data ?? [], null); + $this->setIfExists('employeeCurrentNiLetter', $data ?? [], null); $this->setIfExists('employeeWorkplacePostcode', $data ?? [], null); - $this->setIfExists('payId', $data ?? [], null); - $this->setIfExists('payIdChgd', $data ?? [], null); - $this->setIfExists('paymentToANonIndividual', $data ?? [], null); + $this->setIfExists('figuresToDate', $data ?? [], null); $this->setIfExists('irrEmp', $data ?? [], null); $this->setIfExists('leavingDate', $data ?? [], null); - $this->setIfExists('figuresToDate', $data ?? [], null); - $this->setIfExists('payment', $data ?? [], null); $this->setIfExists('nIlettersAndValues', $data ?? [], null); + $this->setIfExists('occPenInd', $data ?? [], null); + $this->setIfExists('offPayrollWorker', $data ?? [], null); + $this->setIfExists('payId', $data ?? [], null); + $this->setIfExists('payIdChgd', $data ?? [], null); + $this->setIfExists('payment', $data ?? [], null); + $this->setIfExists('paymentToANonIndividual', $data ?? [], null); + $this->setIfExists('starter', $data ?? [], null); + $this->setIfExists('taxWkOfApptOfDirector', $data ?? [], null); } /** @@ -386,6 +386,40 @@ public function valid(): bool } + /** + * Gets directorsNIC + * + * @return string|null + */ + public function getDirectorsNIC(): ?string + { + return $this->container['directorsNIC']; + } + + /** + * Sets directorsNIC + * + * @param string|null $directorsNIC directorsNIC + * + * @return $this + */ + public function setDirectorsNIC(?string $directorsNIC): static + { + if (is_null($directorsNIC)) { + array_push($this->openAPINullablesSetToNull, 'directorsNIC'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('directorsNIC', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['directorsNIC'] = $directorsNIC; + + return $this; + } + /** * Gets employeeCurrentNiLetter * @@ -421,198 +455,232 @@ public function setEmployeeCurrentNiLetter(?string $employeeCurrentNiLetter): st } /** - * Gets offPayrollWorker + * Gets employeeWorkplacePostcode * * @return string|null */ - public function getOffPayrollWorker(): ?string + public function getEmployeeWorkplacePostcode(): ?string { - return $this->container['offPayrollWorker']; + return $this->container['employeeWorkplacePostcode']; } /** - * Sets offPayrollWorker + * Sets employeeWorkplacePostcode * - * @param string|null $offPayrollWorker offPayrollWorker + * @param string|null $employeeWorkplacePostcode employeeWorkplacePostcode * * @return $this */ - public function setOffPayrollWorker(?string $offPayrollWorker): static + public function setEmployeeWorkplacePostcode(?string $employeeWorkplacePostcode): static { - if (is_null($offPayrollWorker)) { - array_push($this->openAPINullablesSetToNull, 'offPayrollWorker'); + if (is_null($employeeWorkplacePostcode)) { + array_push($this->openAPINullablesSetToNull, 'employeeWorkplacePostcode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('offPayrollWorker', $nullablesSetToNull); + $index = array_search('employeeWorkplacePostcode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['offPayrollWorker'] = $offPayrollWorker; + $this->container['employeeWorkplacePostcode'] = $employeeWorkplacePostcode; return $this; } /** - * Gets occPenInd + * Gets figuresToDate + * + * @return \SynergiTech\Staffology\Model\FpsEmployeeFigsToDate|null + */ + public function getFiguresToDate(): ?\SynergiTech\Staffology\Model\FpsEmployeeFigsToDate + { + return $this->container['figuresToDate']; + } + + /** + * Sets figuresToDate + * + * @param \SynergiTech\Staffology\Model\FpsEmployeeFigsToDate|null $figuresToDate figuresToDate + * + * @return $this + */ + public function setFiguresToDate(?\SynergiTech\Staffology\Model\FpsEmployeeFigsToDate $figuresToDate): static + { + if (is_null($figuresToDate)) { + throw new InvalidArgumentException('non-nullable figuresToDate cannot be null'); + } + $this->container['figuresToDate'] = $figuresToDate; + + return $this; + } + + /** + * Gets irrEmp * * @return string|null */ - public function getOccPenInd(): ?string + public function getIrrEmp(): ?string { - return $this->container['occPenInd']; + return $this->container['irrEmp']; } /** - * Sets occPenInd + * Sets irrEmp * - * @param string|null $occPenInd occPenInd + * @param string|null $irrEmp irrEmp * * @return $this */ - public function setOccPenInd(?string $occPenInd): static + public function setIrrEmp(?string $irrEmp): static { - if (is_null($occPenInd)) { - array_push($this->openAPINullablesSetToNull, 'occPenInd'); + if (is_null($irrEmp)) { + array_push($this->openAPINullablesSetToNull, 'irrEmp'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('occPenInd', $nullablesSetToNull); + $index = array_search('irrEmp', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['occPenInd'] = $occPenInd; + $this->container['irrEmp'] = $irrEmp; return $this; } /** - * Gets directorsNIC + * Gets leavingDate * * @return string|null */ - public function getDirectorsNIC(): ?string + public function getLeavingDate(): ?string { - return $this->container['directorsNIC']; + return $this->container['leavingDate']; } /** - * Sets directorsNIC + * Sets leavingDate * - * @param string|null $directorsNIC directorsNIC + * @param string|null $leavingDate leavingDate * * @return $this */ - public function setDirectorsNIC(?string $directorsNIC): static + public function setLeavingDate(?string $leavingDate): static { - if (is_null($directorsNIC)) { - array_push($this->openAPINullablesSetToNull, 'directorsNIC'); + if (is_null($leavingDate)) { + array_push($this->openAPINullablesSetToNull, 'leavingDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('directorsNIC', $nullablesSetToNull); + $index = array_search('leavingDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['directorsNIC'] = $directorsNIC; + $this->container['leavingDate'] = $leavingDate; return $this; } /** - * Gets taxWkOfApptOfDirector + * Gets nIlettersAndValues * - * @return string|null + * @return \SynergiTech\Staffology\Model\FpsEmployeeNIlettersAndValues[]|null */ - public function getTaxWkOfApptOfDirector(): ?string + public function getNIlettersAndValues(): ?array { - return $this->container['taxWkOfApptOfDirector']; + return $this->container['nIlettersAndValues']; } /** - * Sets taxWkOfApptOfDirector + * Sets nIlettersAndValues * - * @param string|null $taxWkOfApptOfDirector taxWkOfApptOfDirector + * @param \SynergiTech\Staffology\Model\FpsEmployeeNIlettersAndValues[]|null $nIlettersAndValues nIlettersAndValues * * @return $this */ - public function setTaxWkOfApptOfDirector(?string $taxWkOfApptOfDirector): static + public function setNIlettersAndValues(?array $nIlettersAndValues): static { - if (is_null($taxWkOfApptOfDirector)) { - array_push($this->openAPINullablesSetToNull, 'taxWkOfApptOfDirector'); + if (is_null($nIlettersAndValues)) { + array_push($this->openAPINullablesSetToNull, 'nIlettersAndValues'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxWkOfApptOfDirector', $nullablesSetToNull); + $index = array_search('nIlettersAndValues', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxWkOfApptOfDirector'] = $taxWkOfApptOfDirector; + $this->container['nIlettersAndValues'] = $nIlettersAndValues; return $this; } /** - * Gets starter + * Gets occPenInd * - * @return \SynergiTech\Staffology\Model\FpsEmployeeStarter|null + * @return string|null */ - public function getStarter(): ?\SynergiTech\Staffology\Model\FpsEmployeeStarter + public function getOccPenInd(): ?string { - return $this->container['starter']; + return $this->container['occPenInd']; } /** - * Sets starter + * Sets occPenInd * - * @param \SynergiTech\Staffology\Model\FpsEmployeeStarter|null $starter starter + * @param string|null $occPenInd occPenInd * * @return $this */ - public function setStarter(?\SynergiTech\Staffology\Model\FpsEmployeeStarter $starter): static + public function setOccPenInd(?string $occPenInd): static { - if (is_null($starter)) { - throw new InvalidArgumentException('non-nullable starter cannot be null'); + if (is_null($occPenInd)) { + array_push($this->openAPINullablesSetToNull, 'occPenInd'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('occPenInd', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['starter'] = $starter; + $this->container['occPenInd'] = $occPenInd; return $this; } /** - * Gets employeeWorkplacePostcode + * Gets offPayrollWorker * * @return string|null */ - public function getEmployeeWorkplacePostcode(): ?string + public function getOffPayrollWorker(): ?string { - return $this->container['employeeWorkplacePostcode']; + return $this->container['offPayrollWorker']; } /** - * Sets employeeWorkplacePostcode + * Sets offPayrollWorker * - * @param string|null $employeeWorkplacePostcode employeeWorkplacePostcode + * @param string|null $offPayrollWorker offPayrollWorker * * @return $this */ - public function setEmployeeWorkplacePostcode(?string $employeeWorkplacePostcode): static + public function setOffPayrollWorker(?string $offPayrollWorker): static { - if (is_null($employeeWorkplacePostcode)) { - array_push($this->openAPINullablesSetToNull, 'employeeWorkplacePostcode'); + if (is_null($offPayrollWorker)) { + array_push($this->openAPINullablesSetToNull, 'offPayrollWorker'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeeWorkplacePostcode', $nullablesSetToNull); + $index = array_search('offPayrollWorker', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employeeWorkplacePostcode'] = $employeeWorkplacePostcode; + $this->container['offPayrollWorker'] = $offPayrollWorker; return $this; } @@ -679,191 +747,123 @@ public function setPayIdChgd(?\SynergiTech\Staffology\Model\FpsEmployerPayIdChan } /** - * Gets paymentToANonIndividual - * - * @return string|null - */ - public function getPaymentToANonIndividual(): ?string - { - return $this->container['paymentToANonIndividual']; - } - - /** - * Sets paymentToANonIndividual - * - * @param string|null $paymentToANonIndividual paymentToANonIndividual - * - * @return $this - */ - public function setPaymentToANonIndividual(?string $paymentToANonIndividual): static - { - if (is_null($paymentToANonIndividual)) { - array_push($this->openAPINullablesSetToNull, 'paymentToANonIndividual'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paymentToANonIndividual', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['paymentToANonIndividual'] = $paymentToANonIndividual; - - return $this; - } - - /** - * Gets irrEmp + * Gets payment * - * @return string|null + * @return \SynergiTech\Staffology\Model\FpsEmployeePayment|null */ - public function getIrrEmp(): ?string + public function getPayment(): ?\SynergiTech\Staffology\Model\FpsEmployeePayment { - return $this->container['irrEmp']; + return $this->container['payment']; } /** - * Sets irrEmp + * Sets payment * - * @param string|null $irrEmp irrEmp + * @param \SynergiTech\Staffology\Model\FpsEmployeePayment|null $payment payment * * @return $this */ - public function setIrrEmp(?string $irrEmp): static + public function setPayment(?\SynergiTech\Staffology\Model\FpsEmployeePayment $payment): static { - if (is_null($irrEmp)) { - array_push($this->openAPINullablesSetToNull, 'irrEmp'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('irrEmp', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payment)) { + throw new InvalidArgumentException('non-nullable payment cannot be null'); } - $this->container['irrEmp'] = $irrEmp; + $this->container['payment'] = $payment; return $this; } /** - * Gets leavingDate + * Gets paymentToANonIndividual * * @return string|null */ - public function getLeavingDate(): ?string + public function getPaymentToANonIndividual(): ?string { - return $this->container['leavingDate']; + return $this->container['paymentToANonIndividual']; } /** - * Sets leavingDate + * Sets paymentToANonIndividual * - * @param string|null $leavingDate leavingDate + * @param string|null $paymentToANonIndividual paymentToANonIndividual * * @return $this */ - public function setLeavingDate(?string $leavingDate): static + public function setPaymentToANonIndividual(?string $paymentToANonIndividual): static { - if (is_null($leavingDate)) { - array_push($this->openAPINullablesSetToNull, 'leavingDate'); + if (is_null($paymentToANonIndividual)) { + array_push($this->openAPINullablesSetToNull, 'paymentToANonIndividual'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('leavingDate', $nullablesSetToNull); + $index = array_search('paymentToANonIndividual', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['leavingDate'] = $leavingDate; - - return $this; - } - - /** - * Gets figuresToDate - * - * @return \SynergiTech\Staffology\Model\FpsEmployeeFigsToDate|null - */ - public function getFiguresToDate(): ?\SynergiTech\Staffology\Model\FpsEmployeeFigsToDate - { - return $this->container['figuresToDate']; - } - - /** - * Sets figuresToDate - * - * @param \SynergiTech\Staffology\Model\FpsEmployeeFigsToDate|null $figuresToDate figuresToDate - * - * @return $this - */ - public function setFiguresToDate(?\SynergiTech\Staffology\Model\FpsEmployeeFigsToDate $figuresToDate): static - { - if (is_null($figuresToDate)) { - throw new InvalidArgumentException('non-nullable figuresToDate cannot be null'); - } - $this->container['figuresToDate'] = $figuresToDate; + $this->container['paymentToANonIndividual'] = $paymentToANonIndividual; return $this; } /** - * Gets payment + * Gets starter * - * @return \SynergiTech\Staffology\Model\FpsEmployeePayment|null + * @return \SynergiTech\Staffology\Model\FpsEmployeeStarter|null */ - public function getPayment(): ?\SynergiTech\Staffology\Model\FpsEmployeePayment + public function getStarter(): ?\SynergiTech\Staffology\Model\FpsEmployeeStarter { - return $this->container['payment']; + return $this->container['starter']; } /** - * Sets payment + * Sets starter * - * @param \SynergiTech\Staffology\Model\FpsEmployeePayment|null $payment payment + * @param \SynergiTech\Staffology\Model\FpsEmployeeStarter|null $starter starter * * @return $this */ - public function setPayment(?\SynergiTech\Staffology\Model\FpsEmployeePayment $payment): static + public function setStarter(?\SynergiTech\Staffology\Model\FpsEmployeeStarter $starter): static { - if (is_null($payment)) { - throw new InvalidArgumentException('non-nullable payment cannot be null'); + if (is_null($starter)) { + throw new InvalidArgumentException('non-nullable starter cannot be null'); } - $this->container['payment'] = $payment; + $this->container['starter'] = $starter; return $this; } /** - * Gets nIlettersAndValues + * Gets taxWkOfApptOfDirector * - * @return \SynergiTech\Staffology\Model\FpsEmployeeNIlettersAndValues[]|null + * @return string|null */ - public function getNIlettersAndValues(): ?array + public function getTaxWkOfApptOfDirector(): ?string { - return $this->container['nIlettersAndValues']; + return $this->container['taxWkOfApptOfDirector']; } /** - * Sets nIlettersAndValues + * Sets taxWkOfApptOfDirector * - * @param \SynergiTech\Staffology\Model\FpsEmployeeNIlettersAndValues[]|null $nIlettersAndValues nIlettersAndValues + * @param string|null $taxWkOfApptOfDirector taxWkOfApptOfDirector * * @return $this */ - public function setNIlettersAndValues(?array $nIlettersAndValues): static + public function setTaxWkOfApptOfDirector(?string $taxWkOfApptOfDirector): static { - if (is_null($nIlettersAndValues)) { - array_push($this->openAPINullablesSetToNull, 'nIlettersAndValues'); + if (is_null($taxWkOfApptOfDirector)) { + array_push($this->openAPINullablesSetToNull, 'taxWkOfApptOfDirector'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nIlettersAndValues', $nullablesSetToNull); + $index = array_search('taxWkOfApptOfDirector', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nIlettersAndValues'] = $nIlettersAndValues; + $this->container['taxWkOfApptOfDirector'] = $taxWkOfApptOfDirector; return $this; } diff --git a/src/Model/FpsFields.php b/src/Model/FpsFields.php index e748513..68df6bc 100644 --- a/src/Model/FpsFields.php +++ b/src/Model/FpsFields.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class FpsFields implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'offPayrollWorker' => 'bool', + 'excludeFromRtiSubmissions' => 'bool', + 'hoursNormallyWorked' => '\SynergiTech\Staffology\Model\HoursNormallyWorked', 'irregularPaymentPattern' => 'bool', 'nonIndividual' => 'bool', - 'hoursNormallyWorked' => '\SynergiTech\Staffology\Model\HoursNormallyWorked', - 'excludeFromRtiSubmissions' => 'bool' + 'offPayrollWorker' => 'bool' ]; /** @@ -72,11 +72,11 @@ class FpsFields implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'offPayrollWorker' => null, + 'excludeFromRtiSubmissions' => null, + 'hoursNormallyWorked' => null, 'irregularPaymentPattern' => null, 'nonIndividual' => null, - 'hoursNormallyWorked' => null, - 'excludeFromRtiSubmissions' => null + 'offPayrollWorker' => null ]; /** @@ -85,11 +85,11 @@ class FpsFields implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'offPayrollWorker' => false, + 'excludeFromRtiSubmissions' => false, + 'hoursNormallyWorked' => false, 'irregularPaymentPattern' => false, 'nonIndividual' => false, - 'hoursNormallyWorked' => false, - 'excludeFromRtiSubmissions' => false + 'offPayrollWorker' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'offPayrollWorker' => 'offPayrollWorker', + 'excludeFromRtiSubmissions' => 'excludeFromRtiSubmissions', + 'hoursNormallyWorked' => 'hoursNormallyWorked', 'irregularPaymentPattern' => 'irregularPaymentPattern', 'nonIndividual' => 'nonIndividual', - 'hoursNormallyWorked' => 'hoursNormallyWorked', - 'excludeFromRtiSubmissions' => 'excludeFromRtiSubmissions' + 'offPayrollWorker' => 'offPayrollWorker' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'offPayrollWorker' => 'setOffPayrollWorker', + 'excludeFromRtiSubmissions' => 'setExcludeFromRtiSubmissions', + 'hoursNormallyWorked' => 'setHoursNormallyWorked', 'irregularPaymentPattern' => 'setIrregularPaymentPattern', 'nonIndividual' => 'setNonIndividual', - 'hoursNormallyWorked' => 'setHoursNormallyWorked', - 'excludeFromRtiSubmissions' => 'setExcludeFromRtiSubmissions' + 'offPayrollWorker' => 'setOffPayrollWorker' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'offPayrollWorker' => 'getOffPayrollWorker', + 'excludeFromRtiSubmissions' => 'getExcludeFromRtiSubmissions', + 'hoursNormallyWorked' => 'getHoursNormallyWorked', 'irregularPaymentPattern' => 'getIrregularPaymentPattern', 'nonIndividual' => 'getNonIndividual', - 'hoursNormallyWorked' => 'getHoursNormallyWorked', - 'excludeFromRtiSubmissions' => 'getExcludeFromRtiSubmissions' + 'offPayrollWorker' => 'getOffPayrollWorker' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('offPayrollWorker', $data ?? [], null); + $this->setIfExists('excludeFromRtiSubmissions', $data ?? [], null); + $this->setIfExists('hoursNormallyWorked', $data ?? [], null); $this->setIfExists('irregularPaymentPattern', $data ?? [], null); $this->setIfExists('nonIndividual', $data ?? [], null); - $this->setIfExists('hoursNormallyWorked', $data ?? [], null); - $this->setIfExists('excludeFromRtiSubmissions', $data ?? [], null); + $this->setIfExists('offPayrollWorker', $data ?? [], null); } /** @@ -317,28 +317,55 @@ public function valid(): bool /** - * Gets offPayrollWorker + * Gets excludeFromRtiSubmissions * * @return bool|null */ - public function getOffPayrollWorker(): ?bool + public function getExcludeFromRtiSubmissions(): ?bool { - return $this->container['offPayrollWorker']; + return $this->container['excludeFromRtiSubmissions']; } /** - * Sets offPayrollWorker + * Sets excludeFromRtiSubmissions * - * @param bool|null $offPayrollWorker offPayrollWorker + * @param bool|null $excludeFromRtiSubmissions True if Employee is excluded from RTI submissions * * @return $this */ - public function setOffPayrollWorker(?bool $offPayrollWorker): static + public function setExcludeFromRtiSubmissions(?bool $excludeFromRtiSubmissions): static { - if (is_null($offPayrollWorker)) { - throw new InvalidArgumentException('non-nullable offPayrollWorker cannot be null'); + if (is_null($excludeFromRtiSubmissions)) { + throw new InvalidArgumentException('non-nullable excludeFromRtiSubmissions cannot be null'); } - $this->container['offPayrollWorker'] = $offPayrollWorker; + $this->container['excludeFromRtiSubmissions'] = $excludeFromRtiSubmissions; + + return $this; + } + + /** + * Gets hoursNormallyWorked + * + * @return \SynergiTech\Staffology\Model\HoursNormallyWorked|null + */ + public function getHoursNormallyWorked(): ?\SynergiTech\Staffology\Model\HoursNormallyWorked + { + return $this->container['hoursNormallyWorked']; + } + + /** + * Sets hoursNormallyWorked + * + * @param \SynergiTech\Staffology\Model\HoursNormallyWorked|null $hoursNormallyWorked hoursNormallyWorked + * + * @return $this + */ + public function setHoursNormallyWorked(?\SynergiTech\Staffology\Model\HoursNormallyWorked $hoursNormallyWorked): static + { + if (is_null($hoursNormallyWorked)) { + throw new InvalidArgumentException('non-nullable hoursNormallyWorked cannot be null'); + } + $this->container['hoursNormallyWorked'] = $hoursNormallyWorked; return $this; } @@ -398,55 +425,28 @@ public function setNonIndividual(?bool $nonIndividual): static } /** - * Gets hoursNormallyWorked - * - * @return \SynergiTech\Staffology\Model\HoursNormallyWorked|null - */ - public function getHoursNormallyWorked(): ?\SynergiTech\Staffology\Model\HoursNormallyWorked - { - return $this->container['hoursNormallyWorked']; - } - - /** - * Sets hoursNormallyWorked - * - * @param \SynergiTech\Staffology\Model\HoursNormallyWorked|null $hoursNormallyWorked hoursNormallyWorked - * - * @return $this - */ - public function setHoursNormallyWorked(?\SynergiTech\Staffology\Model\HoursNormallyWorked $hoursNormallyWorked): static - { - if (is_null($hoursNormallyWorked)) { - throw new InvalidArgumentException('non-nullable hoursNormallyWorked cannot be null'); - } - $this->container['hoursNormallyWorked'] = $hoursNormallyWorked; - - return $this; - } - - /** - * Gets excludeFromRtiSubmissions + * Gets offPayrollWorker * * @return bool|null */ - public function getExcludeFromRtiSubmissions(): ?bool + public function getOffPayrollWorker(): ?bool { - return $this->container['excludeFromRtiSubmissions']; + return $this->container['offPayrollWorker']; } /** - * Sets excludeFromRtiSubmissions + * Sets offPayrollWorker * - * @param bool|null $excludeFromRtiSubmissions True if Employee is excluded from RTI submissions + * @param bool|null $offPayrollWorker offPayrollWorker * * @return $this */ - public function setExcludeFromRtiSubmissions(?bool $excludeFromRtiSubmissions): static + public function setOffPayrollWorker(?bool $offPayrollWorker): static { - if (is_null($excludeFromRtiSubmissions)) { - throw new InvalidArgumentException('non-nullable excludeFromRtiSubmissions cannot be null'); + if (is_null($offPayrollWorker)) { + throw new InvalidArgumentException('non-nullable offPayrollWorker cannot be null'); } - $this->container['excludeFromRtiSubmissions'] = $excludeFromRtiSubmissions; + $this->container['offPayrollWorker'] = $offPayrollWorker; return $this; } diff --git a/src/Model/FpsLateReason.php b/src/Model/FpsLateReason.php index 1b0207b..13cd065 100644 --- a/src/Model/FpsLateReason.php +++ b/src/Model/FpsLateReason.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/FpsPriorVersion.php b/src/Model/FpsPriorVersion.php index f42b0a5..b1600e8 100644 --- a/src/Model/FpsPriorVersion.php +++ b/src/Model/FpsPriorVersion.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class FpsPriorVersion implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'payRunEntryId' => 'string', - 'fpsId' => 'string' + 'fpsId' => 'string', + 'payRunEntryId' => 'string' ]; /** @@ -69,8 +69,8 @@ class FpsPriorVersion implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'payRunEntryId' => 'uuid', - 'fpsId' => 'uuid' + 'fpsId' => 'uuid', + 'payRunEntryId' => 'uuid' ]; /** @@ -79,8 +79,8 @@ class FpsPriorVersion implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'payRunEntryId' => false, - 'fpsId' => false + 'fpsId' => false, + 'payRunEntryId' => false ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payRunEntryId' => 'payRunEntryId', - 'fpsId' => 'fpsId' + 'fpsId' => 'fpsId', + 'payRunEntryId' => 'payRunEntryId' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payRunEntryId' => 'setPayRunEntryId', - 'fpsId' => 'setFpsId' + 'fpsId' => 'setFpsId', + 'payRunEntryId' => 'setPayRunEntryId' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payRunEntryId' => 'getPayRunEntryId', - 'fpsId' => 'getFpsId' + 'fpsId' => 'getFpsId', + 'payRunEntryId' => 'getPayRunEntryId' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payRunEntryId', $data ?? [], null); $this->setIfExists('fpsId', $data ?? [], null); + $this->setIfExists('payRunEntryId', $data ?? [], null); } /** @@ -296,55 +296,55 @@ public function valid(): bool /** - * Gets payRunEntryId + * Gets fpsId * * @return string|null */ - public function getPayRunEntryId(): ?string + public function getFpsId(): ?string { - return $this->container['payRunEntryId']; + return $this->container['fpsId']; } /** - * Sets payRunEntryId + * Sets fpsId * - * @param string|null $payRunEntryId payRunEntryId + * @param string|null $fpsId The Id of the FPS that contains an earlier version of the PayRunEntry * * @return $this */ - public function setPayRunEntryId(?string $payRunEntryId): static + public function setFpsId(?string $fpsId): static { - if (is_null($payRunEntryId)) { - throw new InvalidArgumentException('non-nullable payRunEntryId cannot be null'); + if (is_null($fpsId)) { + throw new InvalidArgumentException('non-nullable fpsId cannot be null'); } - $this->container['payRunEntryId'] = $payRunEntryId; + $this->container['fpsId'] = $fpsId; return $this; } /** - * Gets fpsId + * Gets payRunEntryId * * @return string|null */ - public function getFpsId(): ?string + public function getPayRunEntryId(): ?string { - return $this->container['fpsId']; + return $this->container['payRunEntryId']; } /** - * Sets fpsId + * Sets payRunEntryId * - * @param string|null $fpsId The Id of the FPS that contains an earlier version of the PayRunEntry + * @param string|null $payRunEntryId payRunEntryId * * @return $this */ - public function setFpsId(?string $fpsId): static + public function setPayRunEntryId(?string $payRunEntryId): static { - if (is_null($fpsId)) { - throw new InvalidArgumentException('non-nullable fpsId cannot be null'); + if (is_null($payRunEntryId)) { + throw new InvalidArgumentException('non-nullable payRunEntryId cannot be null'); } - $this->container['fpsId'] = $fpsId; + $this->container['payRunEntryId'] = $payRunEntryId; return $this; } diff --git a/src/Model/FpsReportResponse.php b/src/Model/FpsReportResponse.php index 30bb5a7..a7713d8 100644 --- a/src/Model/FpsReportResponse.php +++ b/src/Model/FpsReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class FpsReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\Fps', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class FpsReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class FpsReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/FromToDates.php b/src/Model/FromToDates.php index 09b6f66..9ea5a92 100644 --- a/src/Model/FromToDates.php +++ b/src/Model/FromToDates.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/FullPaymentSubmission.php b/src/Model/FullPaymentSubmission.php index ac3f432..769a61d 100644 --- a/src/Model/FullPaymentSubmission.php +++ b/src/Model/FullPaymentSubmission.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/FullSummaryOfPayReport.php b/src/Model/FullSummaryOfPayReport.php index 4b7c333..e86ec9d 100644 --- a/src/Model/FullSummaryOfPayReport.php +++ b/src/Model/FullSummaryOfPayReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,21 +59,22 @@ class FullSummaryOfPayReport implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'lines' => '\SynergiTech\Staffology\Model\FullSummaryOfPayReportLine[]', 'deductionLines' => '\SynergiTech\Staffology\Model\FullSummaryOfPayReportLine[]', 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'isDraft' => 'bool', + 'lines' => '\SynergiTech\Staffology\Model\FullSummaryOfPayReportLine[]', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -82,21 +83,22 @@ class FullSummaryOfPayReport implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ - 'lines' => null, 'deductionLines' => null, 'employer' => null, - 'payPeriod' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'isDraft' => null, + 'lines' => null, 'ordinal' => 'int32', + 'payPeriod' => null, 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -105,21 +107,22 @@ class FullSummaryOfPayReport implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ - 'lines' => true, 'deductionLines' => true, 'employer' => false, - 'payPeriod' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'isDraft' => false, + 'lines' => true, 'ordinal' => false, + 'payPeriod' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -208,21 +211,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'lines' => 'lines', 'deductionLines' => 'deductionLines', 'employer' => 'employer', - 'payPeriod' => 'payPeriod', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'isDraft' => 'isDraft', + 'lines' => 'lines', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -231,21 +235,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'lines' => 'setLines', 'deductionLines' => 'setDeductionLines', 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'isDraft' => 'setIsDraft', + 'lines' => 'setLines', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -254,21 +259,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'lines' => 'getLines', 'deductionLines' => 'getDeductionLines', 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'isDraft' => 'getIsDraft', + 'lines' => 'getLines', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -327,21 +333,22 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('deductionLines', $data ?? [], null); $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -386,40 +393,6 @@ public function valid(): bool } - /** - * Gets lines - * - * @return \SynergiTech\Staffology\Model\FullSummaryOfPayReportLine[]|null - */ - public function getLines(): ?array - { - return $this->container['lines']; - } - - /** - * Sets lines - * - * @param \SynergiTech\Staffology\Model\FullSummaryOfPayReportLine[]|null $lines lines - * - * @return $this - */ - public function setLines(?array $lines): static - { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['lines'] = $lines; - - return $this; - } - /** * Gets deductionLines * @@ -482,231 +455,231 @@ public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): stat } /** - * Gets payPeriod + * Gets endDate * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return \DateTime|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getEndDate(): ?\DateTime { - return $this->container['payPeriod']; + return $this->container['endDate']; } /** - * Sets payPeriod + * Sets endDate * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param \DateTime|null $endDate endDate * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); } - $this->container['payPeriod'] = $payPeriod; + $this->container['endDate'] = $endDate; return $this; } /** - * Gets ordinal + * Gets endPeriodName * - * @return int|null + * @return string|null */ - public function getOrdinal(): ?int + public function getEndPeriodName(): ?string { - return $this->container['ordinal']; + return $this->container['endPeriodName']; } /** - * Sets ordinal + * Sets endPeriodName * - * @param int|null $ordinal ordinal + * @param string|null $endPeriodName endPeriodName * * @return $this */ - public function setOrdinal(?int $ordinal): static + public function setEndPeriodName(?string $endPeriodName): static { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['ordinal'] = $ordinal; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets period + * Gets isDraft * - * @return int|null + * @return bool|null */ - public function getPeriod(): ?int + public function getIsDraft(): ?bool { - return $this->container['period']; + return $this->container['isDraft']; } /** - * Sets period + * Sets isDraft * - * @param int|null $period period + * @param bool|null $isDraft isDraft * * @return $this */ - public function setPeriod(?int $period): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['period'] = $period; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets periodTo + * Gets lines * - * @return int|null + * @return \SynergiTech\Staffology\Model\FullSummaryOfPayReportLine[]|null */ - public function getPeriodTo(): ?int + public function getLines(): ?array { - return $this->container['periodTo']; + return $this->container['lines']; } /** - * Sets periodTo + * Sets lines * - * @param int|null $periodTo periodTo + * @param \SynergiTech\Staffology\Model\FullSummaryOfPayReportLine[]|null $lines lines * * @return $this */ - public function setPeriodTo(?int $periodTo): static + public function setLines(?array $lines): static { - if (is_null($periodTo)) { - throw new InvalidArgumentException('non-nullable periodTo cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['periodTo'] = $periodTo; + $this->container['lines'] = $lines; return $this; } /** - * Gets startPeriodName + * Gets ordinal * - * @return string|null + * @return int|null */ - public function getStartPeriodName(): ?string + public function getOrdinal(): ?int { - return $this->container['startPeriodName']; + return $this->container['ordinal']; } /** - * Sets startPeriodName + * Sets ordinal * - * @param string|null $startPeriodName startPeriodName + * @param int|null $ordinal ordinal * * @return $this */ - public function setStartPeriodName(?string $startPeriodName): static + public function setOrdinal(?int $ordinal): static { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['startPeriodName'] = $startPeriodName; + $this->container['ordinal'] = $ordinal; return $this; } /** - * Gets endPeriodName + * Gets payPeriod * - * @return string|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getEndPeriodName(): ?string + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['endPeriodName']; + return $this->container['payPeriod']; } /** - * Sets endPeriodName + * Sets payPeriod * - * @param string|null $endPeriodName endPeriodName + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets startDate + * Gets period * - * @return \DateTime|null + * @return int|null */ - public function getStartDate(): ?\DateTime + public function getPeriod(): ?int { - return $this->container['startDate']; + return $this->container['period']; } /** - * Sets startDate + * Sets period * - * @param \DateTime|null $startDate startDate + * @param int|null $period period * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setPeriod(?int $period): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['startDate'] = $startDate; + $this->container['period'] = $period; return $this; } /** - * Gets endDate + * Gets periodTo * - * @return \DateTime|null + * @return int|null */ - public function getEndDate(): ?\DateTime + public function getPeriodTo(): ?int { - return $this->container['endDate']; + return $this->container['periodTo']; } /** - * Sets endDate + * Sets periodTo * - * @param \DateTime|null $endDate endDate + * @param int|null $periodTo periodTo * * @return $this */ - public function setEndDate(?\DateTime $endDate): static + public function setPeriodTo(?int $periodTo): static { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); + if (is_null($periodTo)) { + throw new InvalidArgumentException('non-nullable periodTo cannot be null'); } - $this->container['endDate'] = $endDate; + $this->container['periodTo'] = $periodTo; return $this; } @@ -738,6 +711,67 @@ public function setReport(?\SynergiTech\Staffology\Model\Report $report): static return $this; } + /** + * Gets startDate + * + * @return \DateTime|null + */ + public function getStartDate(): ?\DateTime + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param \DateTime|null $startDate startDate + * + * @return $this + */ + public function setStartDate(?\DateTime $startDate): static + { + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); + } + $this->container['startDate'] = $startDate; + + return $this; + } + + /** + * Gets startPeriodName + * + * @return string|null + */ + public function getStartPeriodName(): ?string + { + return $this->container['startPeriodName']; + } + + /** + * Sets startPeriodName + * + * @param string|null $startPeriodName startPeriodName + * + * @return $this + */ + public function setStartPeriodName(?string $startPeriodName): static + { + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['startPeriodName'] = $startPeriodName; + + return $this; + } + /** * Gets taxYear * @@ -800,28 +834,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/FullSummaryOfPayReportLine.php b/src/Model/FullSummaryOfPayReportLine.php index f1ef4a2..97184f6 100644 --- a/src/Model/FullSummaryOfPayReportLine.php +++ b/src/Model/FullSummaryOfPayReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class FullSummaryOfPayReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'payCode' => '\SynergiTech\Staffology\Model\PayCode', - 'value' => 'float', 'erValue' => 'float', + 'headCount' => 'int', + 'payCode' => '\SynergiTech\Staffology\Model\PayCode', 'qty' => 'float', - 'headCount' => 'int' + 'value' => 'float' ]; /** @@ -72,11 +72,11 @@ class FullSummaryOfPayReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'payCode' => null, - 'value' => 'double', 'erValue' => 'double', + 'headCount' => 'int32', + 'payCode' => null, 'qty' => 'double', - 'headCount' => 'int32' + 'value' => 'double' ]; /** @@ -85,11 +85,11 @@ class FullSummaryOfPayReportLine implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'payCode' => false, - 'value' => false, 'erValue' => true, + 'headCount' => false, + 'payCode' => false, 'qty' => true, - 'headCount' => false + 'value' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payCode' => 'payCode', - 'value' => 'value', 'erValue' => 'erValue', + 'headCount' => 'headCount', + 'payCode' => 'payCode', 'qty' => 'qty', - 'headCount' => 'headCount' + 'value' => 'value' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payCode' => 'setPayCode', - 'value' => 'setValue', 'erValue' => 'setErValue', + 'headCount' => 'setHeadCount', + 'payCode' => 'setPayCode', 'qty' => 'setQty', - 'headCount' => 'setHeadCount' + 'value' => 'setValue' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payCode' => 'getPayCode', - 'value' => 'getValue', 'erValue' => 'getErValue', + 'headCount' => 'getHeadCount', + 'payCode' => 'getPayCode', 'qty' => 'getQty', - 'headCount' => 'getHeadCount' + 'value' => 'getValue' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payCode', $data ?? [], null); - $this->setIfExists('value', $data ?? [], null); $this->setIfExists('erValue', $data ?? [], null); - $this->setIfExists('qty', $data ?? [], null); $this->setIfExists('headCount', $data ?? [], null); + $this->setIfExists('payCode', $data ?? [], null); + $this->setIfExists('qty', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -317,89 +317,89 @@ public function valid(): bool /** - * Gets payCode + * Gets erValue * - * @return \SynergiTech\Staffology\Model\PayCode|null + * @return float|null */ - public function getPayCode(): ?\SynergiTech\Staffology\Model\PayCode + public function getErValue(): ?float { - return $this->container['payCode']; + return $this->container['erValue']; } /** - * Sets payCode + * Sets erValue * - * @param \SynergiTech\Staffology\Model\PayCode|null $payCode payCode + * @param float|null $erValue erValue * * @return $this */ - public function setPayCode(?\SynergiTech\Staffology\Model\PayCode $payCode): static + public function setErValue(?float $erValue): static { - if (is_null($payCode)) { - throw new InvalidArgumentException('non-nullable payCode cannot be null'); + if (is_null($erValue)) { + array_push($this->openAPINullablesSetToNull, 'erValue'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('erValue', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payCode'] = $payCode; + $this->container['erValue'] = $erValue; return $this; } /** - * Gets value + * Gets headCount * - * @return float|null + * @return int|null */ - public function getValue(): ?float + public function getHeadCount(): ?int { - return $this->container['value']; + return $this->container['headCount']; } /** - * Sets value + * Sets headCount * - * @param float|null $value value + * @param int|null $headCount headCount * * @return $this */ - public function setValue(?float $value): static + public function setHeadCount(?int $headCount): static { - if (is_null($value)) { - throw new InvalidArgumentException('non-nullable value cannot be null'); + if (is_null($headCount)) { + throw new InvalidArgumentException('non-nullable headCount cannot be null'); } - $this->container['value'] = $value; + $this->container['headCount'] = $headCount; return $this; } /** - * Gets erValue + * Gets payCode * - * @return float|null + * @return \SynergiTech\Staffology\Model\PayCode|null */ - public function getErValue(): ?float + public function getPayCode(): ?\SynergiTech\Staffology\Model\PayCode { - return $this->container['erValue']; + return $this->container['payCode']; } /** - * Sets erValue + * Sets payCode * - * @param float|null $erValue erValue + * @param \SynergiTech\Staffology\Model\PayCode|null $payCode payCode * * @return $this */ - public function setErValue(?float $erValue): static + public function setPayCode(?\SynergiTech\Staffology\Model\PayCode $payCode): static { - if (is_null($erValue)) { - array_push($this->openAPINullablesSetToNull, 'erValue'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('erValue', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payCode)) { + throw new InvalidArgumentException('non-nullable payCode cannot be null'); } - $this->container['erValue'] = $erValue; + $this->container['payCode'] = $payCode; return $this; } @@ -439,28 +439,28 @@ public function setQty(?float $qty): static } /** - * Gets headCount + * Gets value * - * @return int|null + * @return float|null */ - public function getHeadCount(): ?int + public function getValue(): ?float { - return $this->container['headCount']; + return $this->container['value']; } /** - * Sets headCount + * Sets value * - * @param int|null $headCount headCount + * @param float|null $value value * * @return $this */ - public function setHeadCount(?int $headCount): static + public function setValue(?float $value): static { - if (is_null($headCount)) { - throw new InvalidArgumentException('non-nullable headCount cannot be null'); + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); } - $this->container['headCount'] = $headCount; + $this->container['value'] = $value; return $this; } diff --git a/src/Model/FullSummaryOfPayReportReportResponse.php b/src/Model/FullSummaryOfPayReportReportResponse.php index b049643..e67ac61 100644 --- a/src/Model/FullSummaryOfPayReportReportResponse.php +++ b/src/Model/FullSummaryOfPayReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class FullSummaryOfPayReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\FullSummaryOfPayReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class FullSummaryOfPayReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class FullSummaryOfPayReportReportResponse implements ModelInterface, ArrayAcces * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/FurloughCalculationBasis.php b/src/Model/FurloughCalculationBasis.php index e9d3aae..9ee94e9 100644 --- a/src/Model/FurloughCalculationBasis.php +++ b/src/Model/FurloughCalculationBasis.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/FurloughReport.php b/src/Model/FurloughReport.php index 86a8d0b..09f7fc0 100644 --- a/src/Model/FurloughReport.php +++ b/src/Model/FurloughReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,45 +59,46 @@ class FurloughReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'maxClaimPerEmployee' => 'float', - 'percentageOfNIAndPensionToClaim' => 'float', - 'govtContribRate' => 'float', - 'companyName' => 'string', - 'employerReference' => 'string', - 'companyCrn' => 'string', - 'ctUtr' => 'string', - 'saUtr' => 'string', - 'claimPeriodStartDate' => '\DateTime', - 'claimPeriodEndDate' => '\DateTime', - 'numberOfEmployeesBeingFurloughed' => 'int', - 'totalClaimAmount' => 'float', - 'totalGrossPay' => 'float', - 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod' => 'float', 'amountClaimedForEmployerNICsContributionsForFurloughedEmployees' => 'float', 'amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees' => 'float', - 'lines' => '\SynergiTech\Staffology\Model\FurloughReportLine[]', - 'bankAccountNumber' => 'string', - 'bankSortCode' => 'string', + 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod' => 'float', + 'bankAccountHoldersAddress' => 'string', 'bankAccountHoldersFirstName' => 'string', 'bankAccountHoldersLastName' => 'string', - 'bankAccountHoldersAddress' => 'string', + 'bankAccountNumber' => 'string', + 'bankSortCode' => 'string', 'buildingSocietyRollNumber' => 'string', + 'claimPeriodEndDate' => '\DateTime', + 'claimPeriodStartDate' => '\DateTime', 'companyAddress' => 'string', + 'companyCrn' => 'string', + 'companyName' => 'string', 'contactName' => 'string', 'contactNumber' => 'string', + 'ctUtr' => 'string', 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'employerReference' => 'string', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'govtContribRate' => 'float', + 'isDraft' => 'bool', + 'lines' => '\SynergiTech\Staffology\Model\FurloughReportLine[]', + 'maxClaimPerEmployee' => 'float', + 'numberOfEmployeesBeingFurloughed' => 'int', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'percentageOfNIAndPensionToClaim' => 'float', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'saUtr' => 'string', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'totalClaimAmount' => 'float', + 'totalGrossPay' => 'float', + 'version' => 'int' ]; /** @@ -106,45 +107,46 @@ class FurloughReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'maxClaimPerEmployee' => 'double', - 'percentageOfNIAndPensionToClaim' => 'double', - 'govtContribRate' => 'double', - 'companyName' => null, - 'employerReference' => null, - 'companyCrn' => null, - 'ctUtr' => null, - 'saUtr' => null, - 'claimPeriodStartDate' => 'date', - 'claimPeriodEndDate' => 'date', - 'numberOfEmployeesBeingFurloughed' => 'int32', - 'totalClaimAmount' => 'double', - 'totalGrossPay' => 'double', - 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod' => 'double', 'amountClaimedForEmployerNICsContributionsForFurloughedEmployees' => 'double', 'amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees' => 'double', - 'lines' => null, - 'bankAccountNumber' => null, - 'bankSortCode' => null, + 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod' => 'double', + 'bankAccountHoldersAddress' => null, 'bankAccountHoldersFirstName' => null, 'bankAccountHoldersLastName' => null, - 'bankAccountHoldersAddress' => null, + 'bankAccountNumber' => null, + 'bankSortCode' => null, 'buildingSocietyRollNumber' => null, + 'claimPeriodEndDate' => 'date', + 'claimPeriodStartDate' => 'date', 'companyAddress' => null, + 'companyCrn' => null, + 'companyName' => null, 'contactName' => null, 'contactNumber' => null, + 'ctUtr' => null, 'employer' => null, - 'payPeriod' => null, + 'employerReference' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'govtContribRate' => 'double', + 'isDraft' => null, + 'lines' => null, + 'maxClaimPerEmployee' => 'double', + 'numberOfEmployeesBeingFurloughed' => 'int32', 'ordinal' => 'int32', + 'payPeriod' => null, + 'percentageOfNIAndPensionToClaim' => 'double', 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'saUtr' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'totalClaimAmount' => 'double', + 'totalGrossPay' => 'double', + 'version' => 'int32' ]; /** @@ -153,45 +155,46 @@ class FurloughReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'maxClaimPerEmployee' => false, - 'percentageOfNIAndPensionToClaim' => false, - 'govtContribRate' => false, - 'companyName' => true, - 'employerReference' => true, - 'companyCrn' => true, - 'ctUtr' => true, - 'saUtr' => true, - 'claimPeriodStartDate' => false, - 'claimPeriodEndDate' => false, - 'numberOfEmployeesBeingFurloughed' => false, - 'totalClaimAmount' => false, - 'totalGrossPay' => false, - 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod' => false, 'amountClaimedForEmployerNICsContributionsForFurloughedEmployees' => false, 'amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees' => false, - 'lines' => true, - 'bankAccountNumber' => true, - 'bankSortCode' => true, + 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod' => false, + 'bankAccountHoldersAddress' => true, 'bankAccountHoldersFirstName' => true, 'bankAccountHoldersLastName' => true, - 'bankAccountHoldersAddress' => true, + 'bankAccountNumber' => true, + 'bankSortCode' => true, 'buildingSocietyRollNumber' => true, + 'claimPeriodEndDate' => false, + 'claimPeriodStartDate' => false, 'companyAddress' => true, + 'companyCrn' => true, + 'companyName' => true, 'contactName' => true, 'contactNumber' => true, + 'ctUtr' => true, 'employer' => false, - 'payPeriod' => false, + 'employerReference' => true, + 'endDate' => false, + 'endPeriodName' => true, + 'govtContribRate' => false, + 'isDraft' => false, + 'lines' => true, + 'maxClaimPerEmployee' => false, + 'numberOfEmployeesBeingFurloughed' => false, 'ordinal' => false, + 'payPeriod' => false, + 'percentageOfNIAndPensionToClaim' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'saUtr' => true, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'totalClaimAmount' => false, + 'totalGrossPay' => false, + 'version' => true ]; /** @@ -280,45 +283,46 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'maxClaimPerEmployee' => 'maxClaimPerEmployee', - 'percentageOfNIAndPensionToClaim' => 'percentageOfNIAndPensionToClaim', - 'govtContribRate' => 'govtContribRate', - 'companyName' => 'companyName', - 'employerReference' => 'employerReference', - 'companyCrn' => 'companyCrn', - 'ctUtr' => 'ctUtr', - 'saUtr' => 'saUtr', - 'claimPeriodStartDate' => 'claimPeriodStartDate', - 'claimPeriodEndDate' => 'claimPeriodEndDate', - 'numberOfEmployeesBeingFurloughed' => 'numberOfEmployeesBeingFurloughed', - 'totalClaimAmount' => 'totalClaimAmount', - 'totalGrossPay' => 'totalGrossPay', - 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod' => 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod', 'amountClaimedForEmployerNICsContributionsForFurloughedEmployees' => 'amountClaimedForEmployerNICsContributionsForFurloughedEmployees', 'amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees' => 'amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees', - 'lines' => 'lines', - 'bankAccountNumber' => 'bankAccountNumber', - 'bankSortCode' => 'bankSortCode', + 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod' => 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod', + 'bankAccountHoldersAddress' => 'bankAccountHoldersAddress', 'bankAccountHoldersFirstName' => 'bankAccountHoldersFirstName', 'bankAccountHoldersLastName' => 'bankAccountHoldersLastName', - 'bankAccountHoldersAddress' => 'bankAccountHoldersAddress', + 'bankAccountNumber' => 'bankAccountNumber', + 'bankSortCode' => 'bankSortCode', 'buildingSocietyRollNumber' => 'buildingSocietyRollNumber', + 'claimPeriodEndDate' => 'claimPeriodEndDate', + 'claimPeriodStartDate' => 'claimPeriodStartDate', 'companyAddress' => 'companyAddress', + 'companyCrn' => 'companyCrn', + 'companyName' => 'companyName', 'contactName' => 'contactName', 'contactNumber' => 'contactNumber', + 'ctUtr' => 'ctUtr', 'employer' => 'employer', - 'payPeriod' => 'payPeriod', + 'employerReference' => 'employerReference', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'govtContribRate' => 'govtContribRate', + 'isDraft' => 'isDraft', + 'lines' => 'lines', + 'maxClaimPerEmployee' => 'maxClaimPerEmployee', + 'numberOfEmployeesBeingFurloughed' => 'numberOfEmployeesBeingFurloughed', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', + 'percentageOfNIAndPensionToClaim' => 'percentageOfNIAndPensionToClaim', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'saUtr' => 'saUtr', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'totalClaimAmount' => 'totalClaimAmount', + 'totalGrossPay' => 'totalGrossPay', + 'version' => 'version' ]; /** @@ -327,45 +331,46 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'maxClaimPerEmployee' => 'setMaxClaimPerEmployee', - 'percentageOfNIAndPensionToClaim' => 'setPercentageOfNIAndPensionToClaim', - 'govtContribRate' => 'setGovtContribRate', - 'companyName' => 'setCompanyName', - 'employerReference' => 'setEmployerReference', - 'companyCrn' => 'setCompanyCrn', - 'ctUtr' => 'setCtUtr', - 'saUtr' => 'setSaUtr', - 'claimPeriodStartDate' => 'setClaimPeriodStartDate', - 'claimPeriodEndDate' => 'setClaimPeriodEndDate', - 'numberOfEmployeesBeingFurloughed' => 'setNumberOfEmployeesBeingFurloughed', - 'totalClaimAmount' => 'setTotalClaimAmount', - 'totalGrossPay' => 'setTotalGrossPay', - 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod' => 'setAmountClaimedForGrossPayToEmployeesOnFurloughForThePeriod', 'amountClaimedForEmployerNICsContributionsForFurloughedEmployees' => 'setAmountClaimedForEmployerNICsContributionsForFurloughedEmployees', 'amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees' => 'setAmountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees', - 'lines' => 'setLines', - 'bankAccountNumber' => 'setBankAccountNumber', - 'bankSortCode' => 'setBankSortCode', + 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod' => 'setAmountClaimedForGrossPayToEmployeesOnFurloughForThePeriod', + 'bankAccountHoldersAddress' => 'setBankAccountHoldersAddress', 'bankAccountHoldersFirstName' => 'setBankAccountHoldersFirstName', 'bankAccountHoldersLastName' => 'setBankAccountHoldersLastName', - 'bankAccountHoldersAddress' => 'setBankAccountHoldersAddress', + 'bankAccountNumber' => 'setBankAccountNumber', + 'bankSortCode' => 'setBankSortCode', 'buildingSocietyRollNumber' => 'setBuildingSocietyRollNumber', + 'claimPeriodEndDate' => 'setClaimPeriodEndDate', + 'claimPeriodStartDate' => 'setClaimPeriodStartDate', 'companyAddress' => 'setCompanyAddress', + 'companyCrn' => 'setCompanyCrn', + 'companyName' => 'setCompanyName', 'contactName' => 'setContactName', 'contactNumber' => 'setContactNumber', + 'ctUtr' => 'setCtUtr', 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', + 'employerReference' => 'setEmployerReference', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'govtContribRate' => 'setGovtContribRate', + 'isDraft' => 'setIsDraft', + 'lines' => 'setLines', + 'maxClaimPerEmployee' => 'setMaxClaimPerEmployee', + 'numberOfEmployeesBeingFurloughed' => 'setNumberOfEmployeesBeingFurloughed', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', + 'percentageOfNIAndPensionToClaim' => 'setPercentageOfNIAndPensionToClaim', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'saUtr' => 'setSaUtr', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'totalClaimAmount' => 'setTotalClaimAmount', + 'totalGrossPay' => 'setTotalGrossPay', + 'version' => 'setVersion' ]; /** @@ -374,45 +379,46 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'maxClaimPerEmployee' => 'getMaxClaimPerEmployee', - 'percentageOfNIAndPensionToClaim' => 'getPercentageOfNIAndPensionToClaim', - 'govtContribRate' => 'getGovtContribRate', - 'companyName' => 'getCompanyName', - 'employerReference' => 'getEmployerReference', - 'companyCrn' => 'getCompanyCrn', - 'ctUtr' => 'getCtUtr', - 'saUtr' => 'getSaUtr', - 'claimPeriodStartDate' => 'getClaimPeriodStartDate', - 'claimPeriodEndDate' => 'getClaimPeriodEndDate', - 'numberOfEmployeesBeingFurloughed' => 'getNumberOfEmployeesBeingFurloughed', - 'totalClaimAmount' => 'getTotalClaimAmount', - 'totalGrossPay' => 'getTotalGrossPay', - 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod' => 'getAmountClaimedForGrossPayToEmployeesOnFurloughForThePeriod', 'amountClaimedForEmployerNICsContributionsForFurloughedEmployees' => 'getAmountClaimedForEmployerNICsContributionsForFurloughedEmployees', 'amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees' => 'getAmountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees', - 'lines' => 'getLines', - 'bankAccountNumber' => 'getBankAccountNumber', - 'bankSortCode' => 'getBankSortCode', + 'amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod' => 'getAmountClaimedForGrossPayToEmployeesOnFurloughForThePeriod', + 'bankAccountHoldersAddress' => 'getBankAccountHoldersAddress', 'bankAccountHoldersFirstName' => 'getBankAccountHoldersFirstName', 'bankAccountHoldersLastName' => 'getBankAccountHoldersLastName', - 'bankAccountHoldersAddress' => 'getBankAccountHoldersAddress', + 'bankAccountNumber' => 'getBankAccountNumber', + 'bankSortCode' => 'getBankSortCode', 'buildingSocietyRollNumber' => 'getBuildingSocietyRollNumber', + 'claimPeriodEndDate' => 'getClaimPeriodEndDate', + 'claimPeriodStartDate' => 'getClaimPeriodStartDate', 'companyAddress' => 'getCompanyAddress', + 'companyCrn' => 'getCompanyCrn', + 'companyName' => 'getCompanyName', 'contactName' => 'getContactName', 'contactNumber' => 'getContactNumber', + 'ctUtr' => 'getCtUtr', 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', + 'employerReference' => 'getEmployerReference', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'govtContribRate' => 'getGovtContribRate', + 'isDraft' => 'getIsDraft', + 'lines' => 'getLines', + 'maxClaimPerEmployee' => 'getMaxClaimPerEmployee', + 'numberOfEmployeesBeingFurloughed' => 'getNumberOfEmployeesBeingFurloughed', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', + 'percentageOfNIAndPensionToClaim' => 'getPercentageOfNIAndPensionToClaim', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'saUtr' => 'getSaUtr', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'totalClaimAmount' => 'getTotalClaimAmount', + 'totalGrossPay' => 'getTotalGrossPay', + 'version' => 'getVersion' ]; /** @@ -471,45 +477,46 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('maxClaimPerEmployee', $data ?? [], null); - $this->setIfExists('percentageOfNIAndPensionToClaim', $data ?? [], null); - $this->setIfExists('govtContribRate', $data ?? [], null); - $this->setIfExists('companyName', $data ?? [], null); - $this->setIfExists('employerReference', $data ?? [], null); - $this->setIfExists('companyCrn', $data ?? [], null); - $this->setIfExists('ctUtr', $data ?? [], null); - $this->setIfExists('saUtr', $data ?? [], null); - $this->setIfExists('claimPeriodStartDate', $data ?? [], null); - $this->setIfExists('claimPeriodEndDate', $data ?? [], null); - $this->setIfExists('numberOfEmployeesBeingFurloughed', $data ?? [], null); - $this->setIfExists('totalClaimAmount', $data ?? [], null); - $this->setIfExists('totalGrossPay', $data ?? [], null); - $this->setIfExists('amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod', $data ?? [], null); $this->setIfExists('amountClaimedForEmployerNICsContributionsForFurloughedEmployees', $data ?? [], null); $this->setIfExists('amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees', $data ?? [], null); - $this->setIfExists('lines', $data ?? [], null); - $this->setIfExists('bankAccountNumber', $data ?? [], null); - $this->setIfExists('bankSortCode', $data ?? [], null); + $this->setIfExists('amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod', $data ?? [], null); + $this->setIfExists('bankAccountHoldersAddress', $data ?? [], null); $this->setIfExists('bankAccountHoldersFirstName', $data ?? [], null); $this->setIfExists('bankAccountHoldersLastName', $data ?? [], null); - $this->setIfExists('bankAccountHoldersAddress', $data ?? [], null); + $this->setIfExists('bankAccountNumber', $data ?? [], null); + $this->setIfExists('bankSortCode', $data ?? [], null); $this->setIfExists('buildingSocietyRollNumber', $data ?? [], null); + $this->setIfExists('claimPeriodEndDate', $data ?? [], null); + $this->setIfExists('claimPeriodStartDate', $data ?? [], null); $this->setIfExists('companyAddress', $data ?? [], null); + $this->setIfExists('companyCrn', $data ?? [], null); + $this->setIfExists('companyName', $data ?? [], null); $this->setIfExists('contactName', $data ?? [], null); $this->setIfExists('contactNumber', $data ?? [], null); + $this->setIfExists('ctUtr', $data ?? [], null); $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('employerReference', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('govtContribRate', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('maxClaimPerEmployee', $data ?? [], null); + $this->setIfExists('numberOfEmployeesBeingFurloughed', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('percentageOfNIAndPensionToClaim', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('saUtr', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('totalClaimAmount', $data ?? [], null); + $this->setIfExists('totalGrossPay', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -555,279 +562,286 @@ public function valid(): bool /** - * Gets maxClaimPerEmployee + * Gets amountClaimedForEmployerNICsContributionsForFurloughedEmployees * * @return float|null */ - public function getMaxClaimPerEmployee(): ?float + public function getAmountClaimedForEmployerNICsContributionsForFurloughedEmployees(): ?float { - return $this->container['maxClaimPerEmployee']; + return $this->container['amountClaimedForEmployerNICsContributionsForFurloughedEmployees']; } /** - * Sets maxClaimPerEmployee + * Sets amountClaimedForEmployerNICsContributionsForFurloughedEmployees * - * @param float|null $maxClaimPerEmployee maxClaimPerEmployee + * @param float|null $amountClaimedForEmployerNICsContributionsForFurloughedEmployees amountClaimedForEmployerNICsContributionsForFurloughedEmployees * * @return $this */ - public function setMaxClaimPerEmployee(?float $maxClaimPerEmployee): static + public function setAmountClaimedForEmployerNICsContributionsForFurloughedEmployees(?float $amountClaimedForEmployerNICsContributionsForFurloughedEmployees): static { - if (is_null($maxClaimPerEmployee)) { - throw new InvalidArgumentException('non-nullable maxClaimPerEmployee cannot be null'); + if (is_null($amountClaimedForEmployerNICsContributionsForFurloughedEmployees)) { + throw new InvalidArgumentException('non-nullable amountClaimedForEmployerNICsContributionsForFurloughedEmployees cannot be null'); } - $this->container['maxClaimPerEmployee'] = $maxClaimPerEmployee; + $this->container['amountClaimedForEmployerNICsContributionsForFurloughedEmployees'] = $amountClaimedForEmployerNICsContributionsForFurloughedEmployees; return $this; } /** - * Gets percentageOfNIAndPensionToClaim + * Gets amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees * * @return float|null */ - public function getPercentageOfNIAndPensionToClaim(): ?float + public function getAmountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees(): ?float { - return $this->container['percentageOfNIAndPensionToClaim']; + return $this->container['amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees']; } /** - * Sets percentageOfNIAndPensionToClaim + * Sets amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees * - * @param float|null $percentageOfNIAndPensionToClaim percentageOfNIAndPensionToClaim + * @param float|null $amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees * * @return $this */ - public function setPercentageOfNIAndPensionToClaim(?float $percentageOfNIAndPensionToClaim): static + public function setAmountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees(?float $amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees): static { - if (is_null($percentageOfNIAndPensionToClaim)) { - throw new InvalidArgumentException('non-nullable percentageOfNIAndPensionToClaim cannot be null'); + if (is_null($amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees)) { + throw new InvalidArgumentException('non-nullable amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees cannot be null'); } - $this->container['percentageOfNIAndPensionToClaim'] = $percentageOfNIAndPensionToClaim; + $this->container['amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees'] = $amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees; return $this; } /** - * Gets govtContribRate + * Gets amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod * * @return float|null */ - public function getGovtContribRate(): ?float + public function getAmountClaimedForGrossPayToEmployeesOnFurloughForThePeriod(): ?float { - return $this->container['govtContribRate']; + return $this->container['amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod']; } /** - * Sets govtContribRate + * Sets amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod * - * @param float|null $govtContribRate govtContribRate + * @param float|null $amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod * * @return $this */ - public function setGovtContribRate(?float $govtContribRate): static + public function setAmountClaimedForGrossPayToEmployeesOnFurloughForThePeriod(?float $amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod): static { - if (is_null($govtContribRate)) { - throw new InvalidArgumentException('non-nullable govtContribRate cannot be null'); + if (is_null($amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod)) { + throw new InvalidArgumentException('non-nullable amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod cannot be null'); } - $this->container['govtContribRate'] = $govtContribRate; + $this->container['amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod'] = $amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod; return $this; } /** - * Gets companyName + * Gets bankAccountHoldersAddress * * @return string|null */ - public function getCompanyName(): ?string + public function getBankAccountHoldersAddress(): ?string { - return $this->container['companyName']; + return $this->container['bankAccountHoldersAddress']; } /** - * Sets companyName + * Sets bankAccountHoldersAddress * - * @param string|null $companyName companyName + * @param string|null $bankAccountHoldersAddress bankAccountHoldersAddress * * @return $this */ - public function setCompanyName(?string $companyName): static + public function setBankAccountHoldersAddress(?string $bankAccountHoldersAddress): static { - if (is_null($companyName)) { - array_push($this->openAPINullablesSetToNull, 'companyName'); + if (is_null($bankAccountHoldersAddress)) { + array_push($this->openAPINullablesSetToNull, 'bankAccountHoldersAddress'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('companyName', $nullablesSetToNull); + $index = array_search('bankAccountHoldersAddress', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['companyName'] = $companyName; + $this->container['bankAccountHoldersAddress'] = $bankAccountHoldersAddress; return $this; } /** - * Gets employerReference + * Gets bankAccountHoldersFirstName * * @return string|null */ - public function getEmployerReference(): ?string + public function getBankAccountHoldersFirstName(): ?string { - return $this->container['employerReference']; + return $this->container['bankAccountHoldersFirstName']; } /** - * Sets employerReference + * Sets bankAccountHoldersFirstName * - * @param string|null $employerReference employerReference + * @param string|null $bankAccountHoldersFirstName bankAccountHoldersFirstName * * @return $this */ - public function setEmployerReference(?string $employerReference): static + public function setBankAccountHoldersFirstName(?string $bankAccountHoldersFirstName): static { - if (is_null($employerReference)) { - array_push($this->openAPINullablesSetToNull, 'employerReference'); + if (is_null($bankAccountHoldersFirstName)) { + array_push($this->openAPINullablesSetToNull, 'bankAccountHoldersFirstName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerReference', $nullablesSetToNull); + $index = array_search('bankAccountHoldersFirstName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employerReference'] = $employerReference; + $this->container['bankAccountHoldersFirstName'] = $bankAccountHoldersFirstName; return $this; } /** - * Gets companyCrn + * Gets bankAccountHoldersLastName * * @return string|null */ - public function getCompanyCrn(): ?string + public function getBankAccountHoldersLastName(): ?string { - return $this->container['companyCrn']; + return $this->container['bankAccountHoldersLastName']; } /** - * Sets companyCrn + * Sets bankAccountHoldersLastName * - * @param string|null $companyCrn companyCrn + * @param string|null $bankAccountHoldersLastName bankAccountHoldersLastName * * @return $this */ - public function setCompanyCrn(?string $companyCrn): static + public function setBankAccountHoldersLastName(?string $bankAccountHoldersLastName): static { - if (is_null($companyCrn)) { - array_push($this->openAPINullablesSetToNull, 'companyCrn'); + if (is_null($bankAccountHoldersLastName)) { + array_push($this->openAPINullablesSetToNull, 'bankAccountHoldersLastName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('companyCrn', $nullablesSetToNull); + $index = array_search('bankAccountHoldersLastName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['companyCrn'] = $companyCrn; + $this->container['bankAccountHoldersLastName'] = $bankAccountHoldersLastName; return $this; } /** - * Gets ctUtr + * Gets bankAccountNumber * * @return string|null */ - public function getCtUtr(): ?string + public function getBankAccountNumber(): ?string { - return $this->container['ctUtr']; + return $this->container['bankAccountNumber']; } /** - * Sets ctUtr + * Sets bankAccountNumber * - * @param string|null $ctUtr ctUtr + * @param string|null $bankAccountNumber bankAccountNumber * * @return $this */ - public function setCtUtr(?string $ctUtr): static + public function setBankAccountNumber(?string $bankAccountNumber): static { - if (is_null($ctUtr)) { - array_push($this->openAPINullablesSetToNull, 'ctUtr'); + if (is_null($bankAccountNumber)) { + array_push($this->openAPINullablesSetToNull, 'bankAccountNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('ctUtr', $nullablesSetToNull); + $index = array_search('bankAccountNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['ctUtr'] = $ctUtr; + $this->container['bankAccountNumber'] = $bankAccountNumber; return $this; } /** - * Gets saUtr + * Gets bankSortCode * * @return string|null */ - public function getSaUtr(): ?string + public function getBankSortCode(): ?string { - return $this->container['saUtr']; + return $this->container['bankSortCode']; } /** - * Sets saUtr + * Sets bankSortCode * - * @param string|null $saUtr saUtr + * @param string|null $bankSortCode bankSortCode * * @return $this */ - public function setSaUtr(?string $saUtr): static + public function setBankSortCode(?string $bankSortCode): static { - if (is_null($saUtr)) { - array_push($this->openAPINullablesSetToNull, 'saUtr'); + if (is_null($bankSortCode)) { + array_push($this->openAPINullablesSetToNull, 'bankSortCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('saUtr', $nullablesSetToNull); + $index = array_search('bankSortCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['saUtr'] = $saUtr; + $this->container['bankSortCode'] = $bankSortCode; return $this; } /** - * Gets claimPeriodStartDate + * Gets buildingSocietyRollNumber * - * @return \DateTime|null + * @return string|null */ - public function getClaimPeriodStartDate(): ?\DateTime + public function getBuildingSocietyRollNumber(): ?string { - return $this->container['claimPeriodStartDate']; + return $this->container['buildingSocietyRollNumber']; } /** - * Sets claimPeriodStartDate + * Sets buildingSocietyRollNumber * - * @param \DateTime|null $claimPeriodStartDate claimPeriodStartDate + * @param string|null $buildingSocietyRollNumber buildingSocietyRollNumber * * @return $this */ - public function setClaimPeriodStartDate(?\DateTime $claimPeriodStartDate): static + public function setBuildingSocietyRollNumber(?string $buildingSocietyRollNumber): static { - if (is_null($claimPeriodStartDate)) { - throw new InvalidArgumentException('non-nullable claimPeriodStartDate cannot be null'); + if (is_null($buildingSocietyRollNumber)) { + array_push($this->openAPINullablesSetToNull, 'buildingSocietyRollNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('buildingSocietyRollNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['claimPeriodStartDate'] = $claimPeriodStartDate; + $this->container['buildingSocietyRollNumber'] = $buildingSocietyRollNumber; return $this; } @@ -860,530 +874,523 @@ public function setClaimPeriodEndDate(?\DateTime $claimPeriodEndDate): static } /** - * Gets numberOfEmployeesBeingFurloughed + * Gets claimPeriodStartDate * - * @return int|null + * @return \DateTime|null */ - public function getNumberOfEmployeesBeingFurloughed(): ?int + public function getClaimPeriodStartDate(): ?\DateTime { - return $this->container['numberOfEmployeesBeingFurloughed']; + return $this->container['claimPeriodStartDate']; } /** - * Sets numberOfEmployeesBeingFurloughed + * Sets claimPeriodStartDate * - * @param int|null $numberOfEmployeesBeingFurloughed numberOfEmployeesBeingFurloughed + * @param \DateTime|null $claimPeriodStartDate claimPeriodStartDate * * @return $this */ - public function setNumberOfEmployeesBeingFurloughed(?int $numberOfEmployeesBeingFurloughed): static + public function setClaimPeriodStartDate(?\DateTime $claimPeriodStartDate): static { - if (is_null($numberOfEmployeesBeingFurloughed)) { - throw new InvalidArgumentException('non-nullable numberOfEmployeesBeingFurloughed cannot be null'); + if (is_null($claimPeriodStartDate)) { + throw new InvalidArgumentException('non-nullable claimPeriodStartDate cannot be null'); } - $this->container['numberOfEmployeesBeingFurloughed'] = $numberOfEmployeesBeingFurloughed; + $this->container['claimPeriodStartDate'] = $claimPeriodStartDate; return $this; } /** - * Gets totalClaimAmount + * Gets companyAddress * - * @return float|null + * @return string|null */ - public function getTotalClaimAmount(): ?float + public function getCompanyAddress(): ?string { - return $this->container['totalClaimAmount']; + return $this->container['companyAddress']; } /** - * Sets totalClaimAmount + * Sets companyAddress * - * @param float|null $totalClaimAmount totalClaimAmount + * @param string|null $companyAddress companyAddress * * @return $this */ - public function setTotalClaimAmount(?float $totalClaimAmount): static + public function setCompanyAddress(?string $companyAddress): static { - if (is_null($totalClaimAmount)) { - throw new InvalidArgumentException('non-nullable totalClaimAmount cannot be null'); + if (is_null($companyAddress)) { + array_push($this->openAPINullablesSetToNull, 'companyAddress'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('companyAddress', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['totalClaimAmount'] = $totalClaimAmount; + $this->container['companyAddress'] = $companyAddress; return $this; } /** - * Gets totalGrossPay + * Gets companyCrn * - * @return float|null + * @return string|null */ - public function getTotalGrossPay(): ?float + public function getCompanyCrn(): ?string { - return $this->container['totalGrossPay']; + return $this->container['companyCrn']; } /** - * Sets totalGrossPay + * Sets companyCrn * - * @param float|null $totalGrossPay totalGrossPay + * @param string|null $companyCrn companyCrn * * @return $this */ - public function setTotalGrossPay(?float $totalGrossPay): static + public function setCompanyCrn(?string $companyCrn): static { - if (is_null($totalGrossPay)) { - throw new InvalidArgumentException('non-nullable totalGrossPay cannot be null'); + if (is_null($companyCrn)) { + array_push($this->openAPINullablesSetToNull, 'companyCrn'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('companyCrn', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['totalGrossPay'] = $totalGrossPay; + $this->container['companyCrn'] = $companyCrn; return $this; } /** - * Gets amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod + * Gets companyName * - * @return float|null + * @return string|null */ - public function getAmountClaimedForGrossPayToEmployeesOnFurloughForThePeriod(): ?float + public function getCompanyName(): ?string { - return $this->container['amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod']; + return $this->container['companyName']; } /** - * Sets amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod + * Sets companyName * - * @param float|null $amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod + * @param string|null $companyName companyName * * @return $this */ - public function setAmountClaimedForGrossPayToEmployeesOnFurloughForThePeriod(?float $amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod): static + public function setCompanyName(?string $companyName): static { - if (is_null($amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod)) { - throw new InvalidArgumentException('non-nullable amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod cannot be null'); + if (is_null($companyName)) { + array_push($this->openAPINullablesSetToNull, 'companyName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('companyName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod'] = $amountClaimedForGrossPayToEmployeesOnFurloughForThePeriod; + $this->container['companyName'] = $companyName; return $this; } /** - * Gets amountClaimedForEmployerNICsContributionsForFurloughedEmployees + * Gets contactName * - * @return float|null + * @return string|null */ - public function getAmountClaimedForEmployerNICsContributionsForFurloughedEmployees(): ?float + public function getContactName(): ?string { - return $this->container['amountClaimedForEmployerNICsContributionsForFurloughedEmployees']; + return $this->container['contactName']; } /** - * Sets amountClaimedForEmployerNICsContributionsForFurloughedEmployees + * Sets contactName * - * @param float|null $amountClaimedForEmployerNICsContributionsForFurloughedEmployees amountClaimedForEmployerNICsContributionsForFurloughedEmployees + * @param string|null $contactName contactName * * @return $this */ - public function setAmountClaimedForEmployerNICsContributionsForFurloughedEmployees(?float $amountClaimedForEmployerNICsContributionsForFurloughedEmployees): static + public function setContactName(?string $contactName): static { - if (is_null($amountClaimedForEmployerNICsContributionsForFurloughedEmployees)) { - throw new InvalidArgumentException('non-nullable amountClaimedForEmployerNICsContributionsForFurloughedEmployees cannot be null'); + if (is_null($contactName)) { + array_push($this->openAPINullablesSetToNull, 'contactName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('contactName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['amountClaimedForEmployerNICsContributionsForFurloughedEmployees'] = $amountClaimedForEmployerNICsContributionsForFurloughedEmployees; + $this->container['contactName'] = $contactName; return $this; } /** - * Gets amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees + * Gets contactNumber * - * @return float|null + * @return string|null */ - public function getAmountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees(): ?float + public function getContactNumber(): ?string { - return $this->container['amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees']; + return $this->container['contactNumber']; } /** - * Sets amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees + * Sets contactNumber * - * @param float|null $amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees + * @param string|null $contactNumber contactNumber * * @return $this */ - public function setAmountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees(?float $amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees): static + public function setContactNumber(?string $contactNumber): static { - if (is_null($amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees)) { - throw new InvalidArgumentException('non-nullable amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees cannot be null'); + if (is_null($contactNumber)) { + array_push($this->openAPINullablesSetToNull, 'contactNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('contactNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees'] = $amountClaimedForEmployersAutoEnrolmentPensionCostsForFurloughedEmployees; + $this->container['contactNumber'] = $contactNumber; return $this; } /** - * Gets lines + * Gets ctUtr * - * @return \SynergiTech\Staffology\Model\FurloughReportLine[]|null + * @return string|null */ - public function getLines(): ?array + public function getCtUtr(): ?string { - return $this->container['lines']; + return $this->container['ctUtr']; } /** - * Sets lines + * Sets ctUtr * - * @param \SynergiTech\Staffology\Model\FurloughReportLine[]|null $lines lines + * @param string|null $ctUtr ctUtr * * @return $this */ - public function setLines(?array $lines): static + public function setCtUtr(?string $ctUtr): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); + if (is_null($ctUtr)) { + array_push($this->openAPINullablesSetToNull, 'ctUtr'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); + $index = array_search('ctUtr', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lines'] = $lines; + $this->container['ctUtr'] = $ctUtr; return $this; } /** - * Gets bankAccountNumber + * Gets employer * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getBankAccountNumber(): ?string + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['bankAccountNumber']; + return $this->container['employer']; } /** - * Sets bankAccountNumber + * Sets employer * - * @param string|null $bankAccountNumber bankAccountNumber + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setBankAccountNumber(?string $bankAccountNumber): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($bankAccountNumber)) { - array_push($this->openAPINullablesSetToNull, 'bankAccountNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankAccountNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); } - $this->container['bankAccountNumber'] = $bankAccountNumber; + $this->container['employer'] = $employer; return $this; } /** - * Gets bankSortCode + * Gets employerReference * * @return string|null */ - public function getBankSortCode(): ?string + public function getEmployerReference(): ?string { - return $this->container['bankSortCode']; + return $this->container['employerReference']; } /** - * Sets bankSortCode + * Sets employerReference * - * @param string|null $bankSortCode bankSortCode + * @param string|null $employerReference employerReference * * @return $this */ - public function setBankSortCode(?string $bankSortCode): static + public function setEmployerReference(?string $employerReference): static { - if (is_null($bankSortCode)) { - array_push($this->openAPINullablesSetToNull, 'bankSortCode'); + if (is_null($employerReference)) { + array_push($this->openAPINullablesSetToNull, 'employerReference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankSortCode', $nullablesSetToNull); + $index = array_search('employerReference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['bankSortCode'] = $bankSortCode; + $this->container['employerReference'] = $employerReference; return $this; } /** - * Gets bankAccountHoldersFirstName + * Gets endDate * - * @return string|null + * @return \DateTime|null */ - public function getBankAccountHoldersFirstName(): ?string + public function getEndDate(): ?\DateTime { - return $this->container['bankAccountHoldersFirstName']; + return $this->container['endDate']; } /** - * Sets bankAccountHoldersFirstName + * Sets endDate * - * @param string|null $bankAccountHoldersFirstName bankAccountHoldersFirstName + * @param \DateTime|null $endDate endDate * * @return $this */ - public function setBankAccountHoldersFirstName(?string $bankAccountHoldersFirstName): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($bankAccountHoldersFirstName)) { - array_push($this->openAPINullablesSetToNull, 'bankAccountHoldersFirstName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankAccountHoldersFirstName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); } - $this->container['bankAccountHoldersFirstName'] = $bankAccountHoldersFirstName; + $this->container['endDate'] = $endDate; return $this; } /** - * Gets bankAccountHoldersLastName + * Gets endPeriodName * * @return string|null */ - public function getBankAccountHoldersLastName(): ?string + public function getEndPeriodName(): ?string { - return $this->container['bankAccountHoldersLastName']; + return $this->container['endPeriodName']; } /** - * Sets bankAccountHoldersLastName + * Sets endPeriodName * - * @param string|null $bankAccountHoldersLastName bankAccountHoldersLastName + * @param string|null $endPeriodName endPeriodName * * @return $this */ - public function setBankAccountHoldersLastName(?string $bankAccountHoldersLastName): static + public function setEndPeriodName(?string $endPeriodName): static { - if (is_null($bankAccountHoldersLastName)) { - array_push($this->openAPINullablesSetToNull, 'bankAccountHoldersLastName'); + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankAccountHoldersLastName', $nullablesSetToNull); + $index = array_search('endPeriodName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['bankAccountHoldersLastName'] = $bankAccountHoldersLastName; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets bankAccountHoldersAddress + * Gets govtContribRate * - * @return string|null + * @return float|null */ - public function getBankAccountHoldersAddress(): ?string + public function getGovtContribRate(): ?float { - return $this->container['bankAccountHoldersAddress']; + return $this->container['govtContribRate']; } /** - * Sets bankAccountHoldersAddress + * Sets govtContribRate * - * @param string|null $bankAccountHoldersAddress bankAccountHoldersAddress + * @param float|null $govtContribRate govtContribRate * * @return $this */ - public function setBankAccountHoldersAddress(?string $bankAccountHoldersAddress): static + public function setGovtContribRate(?float $govtContribRate): static { - if (is_null($bankAccountHoldersAddress)) { - array_push($this->openAPINullablesSetToNull, 'bankAccountHoldersAddress'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankAccountHoldersAddress', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($govtContribRate)) { + throw new InvalidArgumentException('non-nullable govtContribRate cannot be null'); } - $this->container['bankAccountHoldersAddress'] = $bankAccountHoldersAddress; + $this->container['govtContribRate'] = $govtContribRate; return $this; } /** - * Gets buildingSocietyRollNumber + * Gets isDraft * - * @return string|null + * @return bool|null */ - public function getBuildingSocietyRollNumber(): ?string + public function getIsDraft(): ?bool { - return $this->container['buildingSocietyRollNumber']; + return $this->container['isDraft']; } /** - * Sets buildingSocietyRollNumber + * Sets isDraft * - * @param string|null $buildingSocietyRollNumber buildingSocietyRollNumber + * @param bool|null $isDraft isDraft * * @return $this */ - public function setBuildingSocietyRollNumber(?string $buildingSocietyRollNumber): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($buildingSocietyRollNumber)) { - array_push($this->openAPINullablesSetToNull, 'buildingSocietyRollNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('buildingSocietyRollNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['buildingSocietyRollNumber'] = $buildingSocietyRollNumber; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets companyAddress + * Gets lines * - * @return string|null + * @return \SynergiTech\Staffology\Model\FurloughReportLine[]|null */ - public function getCompanyAddress(): ?string + public function getLines(): ?array { - return $this->container['companyAddress']; + return $this->container['lines']; } /** - * Sets companyAddress + * Sets lines * - * @param string|null $companyAddress companyAddress + * @param \SynergiTech\Staffology\Model\FurloughReportLine[]|null $lines lines * * @return $this */ - public function setCompanyAddress(?string $companyAddress): static + public function setLines(?array $lines): static { - if (is_null($companyAddress)) { - array_push($this->openAPINullablesSetToNull, 'companyAddress'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('companyAddress', $nullablesSetToNull); + $index = array_search('lines', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['companyAddress'] = $companyAddress; + $this->container['lines'] = $lines; return $this; } /** - * Gets contactName + * Gets maxClaimPerEmployee * - * @return string|null + * @return float|null */ - public function getContactName(): ?string + public function getMaxClaimPerEmployee(): ?float { - return $this->container['contactName']; + return $this->container['maxClaimPerEmployee']; } /** - * Sets contactName + * Sets maxClaimPerEmployee * - * @param string|null $contactName contactName + * @param float|null $maxClaimPerEmployee maxClaimPerEmployee * * @return $this */ - public function setContactName(?string $contactName): static + public function setMaxClaimPerEmployee(?float $maxClaimPerEmployee): static { - if (is_null($contactName)) { - array_push($this->openAPINullablesSetToNull, 'contactName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('contactName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($maxClaimPerEmployee)) { + throw new InvalidArgumentException('non-nullable maxClaimPerEmployee cannot be null'); } - $this->container['contactName'] = $contactName; + $this->container['maxClaimPerEmployee'] = $maxClaimPerEmployee; return $this; } /** - * Gets contactNumber + * Gets numberOfEmployeesBeingFurloughed * - * @return string|null + * @return int|null */ - public function getContactNumber(): ?string + public function getNumberOfEmployeesBeingFurloughed(): ?int { - return $this->container['contactNumber']; + return $this->container['numberOfEmployeesBeingFurloughed']; } /** - * Sets contactNumber + * Sets numberOfEmployeesBeingFurloughed * - * @param string|null $contactNumber contactNumber + * @param int|null $numberOfEmployeesBeingFurloughed numberOfEmployeesBeingFurloughed * * @return $this */ - public function setContactNumber(?string $contactNumber): static + public function setNumberOfEmployeesBeingFurloughed(?int $numberOfEmployeesBeingFurloughed): static { - if (is_null($contactNumber)) { - array_push($this->openAPINullablesSetToNull, 'contactNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('contactNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($numberOfEmployeesBeingFurloughed)) { + throw new InvalidArgumentException('non-nullable numberOfEmployeesBeingFurloughed cannot be null'); } - $this->container['contactNumber'] = $contactNumber; + $this->container['numberOfEmployeesBeingFurloughed'] = $numberOfEmployeesBeingFurloughed; return $this; } /** - * Gets employer + * Gets ordinal * - * @return \SynergiTech\Staffology\Model\Item|null + * @return int|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getOrdinal(): ?int { - return $this->container['employer']; + return $this->container['ordinal']; } /** - * Sets employer + * Sets ordinal * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param int|null $ordinal ordinal * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setOrdinal(?int $ordinal): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['employer'] = $employer; + $this->container['ordinal'] = $ordinal; return $this; } @@ -1416,28 +1423,28 @@ public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPerio } /** - * Gets ordinal + * Gets percentageOfNIAndPensionToClaim * - * @return int|null + * @return float|null */ - public function getOrdinal(): ?int + public function getPercentageOfNIAndPensionToClaim(): ?float { - return $this->container['ordinal']; + return $this->container['percentageOfNIAndPensionToClaim']; } /** - * Sets ordinal + * Sets percentageOfNIAndPensionToClaim * - * @param int|null $ordinal ordinal + * @param float|null $percentageOfNIAndPensionToClaim percentageOfNIAndPensionToClaim * * @return $this */ - public function setOrdinal(?int $ordinal): static + public function setPercentageOfNIAndPensionToClaim(?float $percentageOfNIAndPensionToClaim): static { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + if (is_null($percentageOfNIAndPensionToClaim)) { + throw new InvalidArgumentException('non-nullable percentageOfNIAndPensionToClaim cannot be null'); } - $this->container['ordinal'] = $ordinal; + $this->container['percentageOfNIAndPensionToClaim'] = $percentageOfNIAndPensionToClaim; return $this; } @@ -1497,69 +1504,62 @@ public function setPeriodTo(?int $periodTo): static } /** - * Gets startPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getStartPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['startPeriodName']; + return $this->container['report']; } /** - * Sets startPeriodName + * Sets report * - * @param string|null $startPeriodName startPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setStartPeriodName(?string $startPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['startPeriodName'] = $startPeriodName; + $this->container['report'] = $report; return $this; } /** - * Gets endPeriodName + * Gets saUtr * * @return string|null */ - public function getEndPeriodName(): ?string + public function getSaUtr(): ?string { - return $this->container['endPeriodName']; + return $this->container['saUtr']; } /** - * Sets endPeriodName + * Sets saUtr * - * @param string|null $endPeriodName endPeriodName + * @param string|null $saUtr saUtr * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setSaUtr(?string $saUtr): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); + if (is_null($saUtr)) { + array_push($this->openAPINullablesSetToNull, 'saUtr'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); + $index = array_search('saUtr', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['saUtr'] = $saUtr; return $this; } @@ -1592,55 +1592,35 @@ public function setStartDate(?\DateTime $startDate): static } /** - * Gets endDate - * - * @return \DateTime|null - */ - public function getEndDate(): ?\DateTime - { - return $this->container['endDate']; - } - - /** - * Sets endDate - * - * @param \DateTime|null $endDate endDate - * - * @return $this - */ - public function setEndDate(?\DateTime $endDate): static - { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); - } - $this->container['endDate'] = $endDate; - - return $this; - } - - /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -1707,28 +1687,89 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets totalClaimAmount * - * @return bool|null + * @return float|null */ - public function getIsDraft(): ?bool + public function getTotalClaimAmount(): ?float { - return $this->container['isDraft']; + return $this->container['totalClaimAmount']; } /** - * Sets isDraft + * Sets totalClaimAmount * - * @param bool|null $isDraft isDraft + * @param float|null $totalClaimAmount totalClaimAmount * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setTotalClaimAmount(?float $totalClaimAmount): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($totalClaimAmount)) { + throw new InvalidArgumentException('non-nullable totalClaimAmount cannot be null'); } - $this->container['isDraft'] = $isDraft; + $this->container['totalClaimAmount'] = $totalClaimAmount; + + return $this; + } + + /** + * Gets totalGrossPay + * + * @return float|null + */ + public function getTotalGrossPay(): ?float + { + return $this->container['totalGrossPay']; + } + + /** + * Sets totalGrossPay + * + * @param float|null $totalGrossPay totalGrossPay + * + * @return $this + */ + public function setTotalGrossPay(?float $totalGrossPay): static + { + if (is_null($totalGrossPay)) { + throw new InvalidArgumentException('non-nullable totalGrossPay cannot be null'); + } + $this->container['totalGrossPay'] = $totalGrossPay; + + return $this; + } + + /** + * Gets version + * + * @return int|null + */ + public function getVersion(): ?int + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param int|null $version version + * + * @return $this + */ + public function setVersion(?int $version): static + { + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['version'] = $version; return $this; } diff --git a/src/Model/FurloughReportLine.php b/src/Model/FurloughReportLine.php index 9115600..bc19250 100644 --- a/src/Model/FurloughReportLine.php +++ b/src/Model/FurloughReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,23 +59,23 @@ class FurloughReportLine implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ + 'daysInPeriod' => 'int', + 'department' => 'string', 'employee' => '\SynergiTech\Staffology\Model\Item', 'employeesFullName' => 'string', 'employeesNINO' => 'string', 'employeesPayrollReferenceNumber' => 'string', + 'furloughEnd' => '\DateTime', + 'furloughStart' => '\DateTime', 'furloughedDays' => 'int', - 'daysInPeriod' => 'int', - 'hoursNormallyWorked' => 'float', - 'hoursFurloughed' => 'float', - 'percentageOfFurloughedDaysWorked' => 'float', 'grossPay' => 'float', 'grossPayClaim' => 'float', + 'hoursFurloughed' => 'float', + 'hoursNormallyWorked' => 'float', 'niClaim' => 'float', 'pensionClaim' => 'float', - 'totalClaim' => 'float', - 'furloughStart' => '\DateTime', - 'furloughEnd' => '\DateTime', - 'department' => 'string' + 'percentageOfFurloughedDaysWorked' => 'float', + 'totalClaim' => 'float' ]; /** @@ -84,23 +84,23 @@ class FurloughReportLine implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ + 'daysInPeriod' => 'int32', + 'department' => null, 'employee' => null, 'employeesFullName' => null, 'employeesNINO' => null, 'employeesPayrollReferenceNumber' => null, + 'furloughEnd' => 'date', + 'furloughStart' => 'date', 'furloughedDays' => 'int32', - 'daysInPeriod' => 'int32', - 'hoursNormallyWorked' => 'double', - 'hoursFurloughed' => 'double', - 'percentageOfFurloughedDaysWorked' => 'double', 'grossPay' => 'double', 'grossPayClaim' => 'double', + 'hoursFurloughed' => 'double', + 'hoursNormallyWorked' => 'double', 'niClaim' => 'double', 'pensionClaim' => 'double', - 'totalClaim' => 'double', - 'furloughStart' => 'date', - 'furloughEnd' => 'date', - 'department' => null + 'percentageOfFurloughedDaysWorked' => 'double', + 'totalClaim' => 'double' ]; /** @@ -109,23 +109,23 @@ class FurloughReportLine implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ + 'daysInPeriod' => false, + 'department' => true, 'employee' => false, 'employeesFullName' => true, 'employeesNINO' => true, 'employeesPayrollReferenceNumber' => true, + 'furloughEnd' => true, + 'furloughStart' => true, 'furloughedDays' => false, - 'daysInPeriod' => false, - 'hoursNormallyWorked' => true, - 'hoursFurloughed' => true, - 'percentageOfFurloughedDaysWorked' => false, 'grossPay' => false, 'grossPayClaim' => false, + 'hoursFurloughed' => true, + 'hoursNormallyWorked' => true, 'niClaim' => false, 'pensionClaim' => false, - 'totalClaim' => false, - 'furloughStart' => true, - 'furloughEnd' => true, - 'department' => true + 'percentageOfFurloughedDaysWorked' => false, + 'totalClaim' => false ]; /** @@ -214,23 +214,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'daysInPeriod' => 'daysInPeriod', + 'department' => 'department', 'employee' => 'employee', 'employeesFullName' => 'employeesFullName', 'employeesNINO' => 'employeesNINO', 'employeesPayrollReferenceNumber' => 'employeesPayrollReferenceNumber', + 'furloughEnd' => 'furloughEnd', + 'furloughStart' => 'furloughStart', 'furloughedDays' => 'furloughedDays', - 'daysInPeriod' => 'daysInPeriod', - 'hoursNormallyWorked' => 'hoursNormallyWorked', - 'hoursFurloughed' => 'hoursFurloughed', - 'percentageOfFurloughedDaysWorked' => 'percentageOfFurloughedDaysWorked', 'grossPay' => 'grossPay', 'grossPayClaim' => 'grossPayClaim', + 'hoursFurloughed' => 'hoursFurloughed', + 'hoursNormallyWorked' => 'hoursNormallyWorked', 'niClaim' => 'niClaim', 'pensionClaim' => 'pensionClaim', - 'totalClaim' => 'totalClaim', - 'furloughStart' => 'furloughStart', - 'furloughEnd' => 'furloughEnd', - 'department' => 'department' + 'percentageOfFurloughedDaysWorked' => 'percentageOfFurloughedDaysWorked', + 'totalClaim' => 'totalClaim' ]; /** @@ -239,23 +239,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'daysInPeriod' => 'setDaysInPeriod', + 'department' => 'setDepartment', 'employee' => 'setEmployee', 'employeesFullName' => 'setEmployeesFullName', 'employeesNINO' => 'setEmployeesNINO', 'employeesPayrollReferenceNumber' => 'setEmployeesPayrollReferenceNumber', + 'furloughEnd' => 'setFurloughEnd', + 'furloughStart' => 'setFurloughStart', 'furloughedDays' => 'setFurloughedDays', - 'daysInPeriod' => 'setDaysInPeriod', - 'hoursNormallyWorked' => 'setHoursNormallyWorked', - 'hoursFurloughed' => 'setHoursFurloughed', - 'percentageOfFurloughedDaysWorked' => 'setPercentageOfFurloughedDaysWorked', 'grossPay' => 'setGrossPay', 'grossPayClaim' => 'setGrossPayClaim', + 'hoursFurloughed' => 'setHoursFurloughed', + 'hoursNormallyWorked' => 'setHoursNormallyWorked', 'niClaim' => 'setNiClaim', 'pensionClaim' => 'setPensionClaim', - 'totalClaim' => 'setTotalClaim', - 'furloughStart' => 'setFurloughStart', - 'furloughEnd' => 'setFurloughEnd', - 'department' => 'setDepartment' + 'percentageOfFurloughedDaysWorked' => 'setPercentageOfFurloughedDaysWorked', + 'totalClaim' => 'setTotalClaim' ]; /** @@ -264,23 +264,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'daysInPeriod' => 'getDaysInPeriod', + 'department' => 'getDepartment', 'employee' => 'getEmployee', 'employeesFullName' => 'getEmployeesFullName', 'employeesNINO' => 'getEmployeesNINO', 'employeesPayrollReferenceNumber' => 'getEmployeesPayrollReferenceNumber', + 'furloughEnd' => 'getFurloughEnd', + 'furloughStart' => 'getFurloughStart', 'furloughedDays' => 'getFurloughedDays', - 'daysInPeriod' => 'getDaysInPeriod', - 'hoursNormallyWorked' => 'getHoursNormallyWorked', - 'hoursFurloughed' => 'getHoursFurloughed', - 'percentageOfFurloughedDaysWorked' => 'getPercentageOfFurloughedDaysWorked', 'grossPay' => 'getGrossPay', 'grossPayClaim' => 'getGrossPayClaim', + 'hoursFurloughed' => 'getHoursFurloughed', + 'hoursNormallyWorked' => 'getHoursNormallyWorked', 'niClaim' => 'getNiClaim', 'pensionClaim' => 'getPensionClaim', - 'totalClaim' => 'getTotalClaim', - 'furloughStart' => 'getFurloughStart', - 'furloughEnd' => 'getFurloughEnd', - 'department' => 'getDepartment' + 'percentageOfFurloughedDaysWorked' => 'getPercentageOfFurloughedDaysWorked', + 'totalClaim' => 'getTotalClaim' ]; /** @@ -339,23 +339,23 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('daysInPeriod', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('employeesFullName', $data ?? [], null); $this->setIfExists('employeesNINO', $data ?? [], null); $this->setIfExists('employeesPayrollReferenceNumber', $data ?? [], null); + $this->setIfExists('furloughEnd', $data ?? [], null); + $this->setIfExists('furloughStart', $data ?? [], null); $this->setIfExists('furloughedDays', $data ?? [], null); - $this->setIfExists('daysInPeriod', $data ?? [], null); - $this->setIfExists('hoursNormallyWorked', $data ?? [], null); - $this->setIfExists('hoursFurloughed', $data ?? [], null); - $this->setIfExists('percentageOfFurloughedDaysWorked', $data ?? [], null); $this->setIfExists('grossPay', $data ?? [], null); $this->setIfExists('grossPayClaim', $data ?? [], null); + $this->setIfExists('hoursFurloughed', $data ?? [], null); + $this->setIfExists('hoursNormallyWorked', $data ?? [], null); $this->setIfExists('niClaim', $data ?? [], null); $this->setIfExists('pensionClaim', $data ?? [], null); + $this->setIfExists('percentageOfFurloughedDaysWorked', $data ?? [], null); $this->setIfExists('totalClaim', $data ?? [], null); - $this->setIfExists('furloughStart', $data ?? [], null); - $this->setIfExists('furloughEnd', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); } /** @@ -400,6 +400,67 @@ public function valid(): bool } + /** + * Gets daysInPeriod + * + * @return int|null + */ + public function getDaysInPeriod(): ?int + { + return $this->container['daysInPeriod']; + } + + /** + * Sets daysInPeriod + * + * @param int|null $daysInPeriod daysInPeriod + * + * @return $this + */ + public function setDaysInPeriod(?int $daysInPeriod): static + { + if (is_null($daysInPeriod)) { + throw new InvalidArgumentException('non-nullable daysInPeriod cannot be null'); + } + $this->container['daysInPeriod'] = $daysInPeriod; + + return $this; + } + + /** + * Gets department + * + * @return string|null + */ + public function getDepartment(): ?string + { + return $this->container['department']; + } + + /** + * Sets department + * + * @param string|null $department department + * + * @return $this + */ + public function setDepartment(?string $department): static + { + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('department', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['department'] = $department; + + return $this; + } + /** * Gets employee * @@ -530,150 +591,96 @@ public function setEmployeesPayrollReferenceNumber(?string $employeesPayrollRefe } /** - * Gets furloughedDays - * - * @return int|null - */ - public function getFurloughedDays(): ?int - { - return $this->container['furloughedDays']; - } - - /** - * Sets furloughedDays - * - * @param int|null $furloughedDays furloughedDays - * - * @return $this - */ - public function setFurloughedDays(?int $furloughedDays): static - { - if (is_null($furloughedDays)) { - throw new InvalidArgumentException('non-nullable furloughedDays cannot be null'); - } - $this->container['furloughedDays'] = $furloughedDays; - - return $this; - } - - /** - * Gets daysInPeriod - * - * @return int|null - */ - public function getDaysInPeriod(): ?int - { - return $this->container['daysInPeriod']; - } - - /** - * Sets daysInPeriod - * - * @param int|null $daysInPeriod daysInPeriod - * - * @return $this - */ - public function setDaysInPeriod(?int $daysInPeriod): static - { - if (is_null($daysInPeriod)) { - throw new InvalidArgumentException('non-nullable daysInPeriod cannot be null'); - } - $this->container['daysInPeriod'] = $daysInPeriod; - - return $this; - } - - /** - * Gets hoursNormallyWorked + * Gets furloughEnd * - * @return float|null + * @return \DateTime|null */ - public function getHoursNormallyWorked(): ?float + public function getFurloughEnd(): ?\DateTime { - return $this->container['hoursNormallyWorked']; + return $this->container['furloughEnd']; } /** - * Sets hoursNormallyWorked + * Sets furloughEnd * - * @param float|null $hoursNormallyWorked hoursNormallyWorked + * @param \DateTime|null $furloughEnd furloughEnd * * @return $this */ - public function setHoursNormallyWorked(?float $hoursNormallyWorked): static + public function setFurloughEnd(?\DateTime $furloughEnd): static { - if (is_null($hoursNormallyWorked)) { - array_push($this->openAPINullablesSetToNull, 'hoursNormallyWorked'); + if (is_null($furloughEnd)) { + array_push($this->openAPINullablesSetToNull, 'furloughEnd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('hoursNormallyWorked', $nullablesSetToNull); + $index = array_search('furloughEnd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['hoursNormallyWorked'] = $hoursNormallyWorked; + $this->container['furloughEnd'] = $furloughEnd; return $this; } /** - * Gets hoursFurloughed + * Gets furloughStart * - * @return float|null + * @return \DateTime|null */ - public function getHoursFurloughed(): ?float + public function getFurloughStart(): ?\DateTime { - return $this->container['hoursFurloughed']; + return $this->container['furloughStart']; } /** - * Sets hoursFurloughed + * Sets furloughStart * - * @param float|null $hoursFurloughed hoursFurloughed + * @param \DateTime|null $furloughStart furloughStart * * @return $this */ - public function setHoursFurloughed(?float $hoursFurloughed): static + public function setFurloughStart(?\DateTime $furloughStart): static { - if (is_null($hoursFurloughed)) { - array_push($this->openAPINullablesSetToNull, 'hoursFurloughed'); + if (is_null($furloughStart)) { + array_push($this->openAPINullablesSetToNull, 'furloughStart'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('hoursFurloughed', $nullablesSetToNull); + $index = array_search('furloughStart', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['hoursFurloughed'] = $hoursFurloughed; + $this->container['furloughStart'] = $furloughStart; return $this; } /** - * Gets percentageOfFurloughedDaysWorked + * Gets furloughedDays * - * @return float|null + * @return int|null */ - public function getPercentageOfFurloughedDaysWorked(): ?float + public function getFurloughedDays(): ?int { - return $this->container['percentageOfFurloughedDaysWorked']; + return $this->container['furloughedDays']; } /** - * Sets percentageOfFurloughedDaysWorked + * Sets furloughedDays * - * @param float|null $percentageOfFurloughedDaysWorked percentageOfFurloughedDaysWorked + * @param int|null $furloughedDays furloughedDays * * @return $this */ - public function setPercentageOfFurloughedDaysWorked(?float $percentageOfFurloughedDaysWorked): static + public function setFurloughedDays(?int $furloughedDays): static { - if (is_null($percentageOfFurloughedDaysWorked)) { - throw new InvalidArgumentException('non-nullable percentageOfFurloughedDaysWorked cannot be null'); + if (is_null($furloughedDays)) { + throw new InvalidArgumentException('non-nullable furloughedDays cannot be null'); } - $this->container['percentageOfFurloughedDaysWorked'] = $percentageOfFurloughedDaysWorked; + $this->container['furloughedDays'] = $furloughedDays; return $this; } @@ -733,184 +740,177 @@ public function setGrossPayClaim(?float $grossPayClaim): static } /** - * Gets niClaim + * Gets hoursFurloughed * * @return float|null */ - public function getNiClaim(): ?float + public function getHoursFurloughed(): ?float { - return $this->container['niClaim']; + return $this->container['hoursFurloughed']; } /** - * Sets niClaim + * Sets hoursFurloughed * - * @param float|null $niClaim niClaim + * @param float|null $hoursFurloughed hoursFurloughed * * @return $this */ - public function setNiClaim(?float $niClaim): static + public function setHoursFurloughed(?float $hoursFurloughed): static { - if (is_null($niClaim)) { - throw new InvalidArgumentException('non-nullable niClaim cannot be null'); + if (is_null($hoursFurloughed)) { + array_push($this->openAPINullablesSetToNull, 'hoursFurloughed'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('hoursFurloughed', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['niClaim'] = $niClaim; + $this->container['hoursFurloughed'] = $hoursFurloughed; return $this; } /** - * Gets pensionClaim + * Gets hoursNormallyWorked * * @return float|null */ - public function getPensionClaim(): ?float + public function getHoursNormallyWorked(): ?float { - return $this->container['pensionClaim']; + return $this->container['hoursNormallyWorked']; } /** - * Sets pensionClaim + * Sets hoursNormallyWorked * - * @param float|null $pensionClaim pensionClaim + * @param float|null $hoursNormallyWorked hoursNormallyWorked * * @return $this */ - public function setPensionClaim(?float $pensionClaim): static + public function setHoursNormallyWorked(?float $hoursNormallyWorked): static { - if (is_null($pensionClaim)) { - throw new InvalidArgumentException('non-nullable pensionClaim cannot be null'); + if (is_null($hoursNormallyWorked)) { + array_push($this->openAPINullablesSetToNull, 'hoursNormallyWorked'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('hoursNormallyWorked', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['pensionClaim'] = $pensionClaim; + $this->container['hoursNormallyWorked'] = $hoursNormallyWorked; return $this; } /** - * Gets totalClaim + * Gets niClaim * * @return float|null */ - public function getTotalClaim(): ?float + public function getNiClaim(): ?float { - return $this->container['totalClaim']; + return $this->container['niClaim']; } /** - * Sets totalClaim + * Sets niClaim * - * @param float|null $totalClaim totalClaim + * @param float|null $niClaim niClaim * * @return $this */ - public function setTotalClaim(?float $totalClaim): static + public function setNiClaim(?float $niClaim): static { - if (is_null($totalClaim)) { - throw new InvalidArgumentException('non-nullable totalClaim cannot be null'); + if (is_null($niClaim)) { + throw new InvalidArgumentException('non-nullable niClaim cannot be null'); } - $this->container['totalClaim'] = $totalClaim; + $this->container['niClaim'] = $niClaim; return $this; } /** - * Gets furloughStart + * Gets pensionClaim * - * @return \DateTime|null + * @return float|null */ - public function getFurloughStart(): ?\DateTime + public function getPensionClaim(): ?float { - return $this->container['furloughStart']; + return $this->container['pensionClaim']; } /** - * Sets furloughStart + * Sets pensionClaim * - * @param \DateTime|null $furloughStart furloughStart + * @param float|null $pensionClaim pensionClaim * * @return $this */ - public function setFurloughStart(?\DateTime $furloughStart): static + public function setPensionClaim(?float $pensionClaim): static { - if (is_null($furloughStart)) { - array_push($this->openAPINullablesSetToNull, 'furloughStart'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('furloughStart', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($pensionClaim)) { + throw new InvalidArgumentException('non-nullable pensionClaim cannot be null'); } - $this->container['furloughStart'] = $furloughStart; + $this->container['pensionClaim'] = $pensionClaim; return $this; } /** - * Gets furloughEnd + * Gets percentageOfFurloughedDaysWorked * - * @return \DateTime|null + * @return float|null */ - public function getFurloughEnd(): ?\DateTime + public function getPercentageOfFurloughedDaysWorked(): ?float { - return $this->container['furloughEnd']; + return $this->container['percentageOfFurloughedDaysWorked']; } /** - * Sets furloughEnd + * Sets percentageOfFurloughedDaysWorked * - * @param \DateTime|null $furloughEnd furloughEnd + * @param float|null $percentageOfFurloughedDaysWorked percentageOfFurloughedDaysWorked * * @return $this */ - public function setFurloughEnd(?\DateTime $furloughEnd): static + public function setPercentageOfFurloughedDaysWorked(?float $percentageOfFurloughedDaysWorked): static { - if (is_null($furloughEnd)) { - array_push($this->openAPINullablesSetToNull, 'furloughEnd'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('furloughEnd', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($percentageOfFurloughedDaysWorked)) { + throw new InvalidArgumentException('non-nullable percentageOfFurloughedDaysWorked cannot be null'); } - $this->container['furloughEnd'] = $furloughEnd; + $this->container['percentageOfFurloughedDaysWorked'] = $percentageOfFurloughedDaysWorked; return $this; } /** - * Gets department + * Gets totalClaim * - * @return string|null + * @return float|null */ - public function getDepartment(): ?string + public function getTotalClaim(): ?float { - return $this->container['department']; + return $this->container['totalClaim']; } /** - * Sets department + * Sets totalClaim * - * @param string|null $department department + * @param float|null $totalClaim totalClaim * * @return $this */ - public function setDepartment(?string $department): static + public function setTotalClaim(?float $totalClaim): static { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($totalClaim)) { + throw new InvalidArgumentException('non-nullable totalClaim cannot be null'); } - $this->container['department'] = $department; + $this->container['totalClaim'] = $totalClaim; return $this; } diff --git a/src/Model/FurloughReportReportResponse.php b/src/Model/FurloughReportReportResponse.php index 40ace70..96135ea 100644 --- a/src/Model/FurloughReportReportResponse.php +++ b/src/Model/FurloughReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class FurloughReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\FurloughReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class FurloughReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class FurloughReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/Gender.php b/src/Model/Gender.php index 60ae4f0..2ba8202 100644 --- a/src/Model/Gender.php +++ b/src/Model/Gender.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/GenderPayGapLine.php b/src/Model/GenderPayGapLine.php index 38c4a90..ebcd768 100644 --- a/src/Model/GenderPayGapLine.php +++ b/src/Model/GenderPayGapLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,16 @@ class GenderPayGapLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'payrollCode' => 'string', + 'bonusRbp' => 'float', 'forename' => 'string', - 'surname' => 'string', - 'gender' => '\SynergiTech\Staffology\Model\Gender', 'fullPay' => 'string', + 'gender' => '\SynergiTech\Staffology\Model\Gender', + 'hourlyRate' => 'float', 'ordinaryPay' => 'float', + 'payrollCode' => 'string', 'periodBonus' => 'float', - 'bonusRbp' => 'float', - 'weeklyHours' => 'float', - 'hourlyRate' => 'float' + 'surname' => 'string', + 'weeklyHours' => 'float' ]; /** @@ -77,16 +77,16 @@ class GenderPayGapLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'payrollCode' => null, + 'bonusRbp' => 'double', 'forename' => null, - 'surname' => null, - 'gender' => null, 'fullPay' => null, + 'gender' => null, + 'hourlyRate' => 'double', 'ordinaryPay' => 'double', + 'payrollCode' => null, 'periodBonus' => 'double', - 'bonusRbp' => 'double', - 'weeklyHours' => 'double', - 'hourlyRate' => 'double' + 'surname' => null, + 'weeklyHours' => 'double' ]; /** @@ -95,16 +95,16 @@ class GenderPayGapLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'payrollCode' => true, + 'bonusRbp' => false, 'forename' => true, - 'surname' => true, - 'gender' => false, 'fullPay' => true, + 'gender' => false, + 'hourlyRate' => false, 'ordinaryPay' => false, + 'payrollCode' => true, 'periodBonus' => false, - 'bonusRbp' => false, - 'weeklyHours' => false, - 'hourlyRate' => false + 'surname' => true, + 'weeklyHours' => false ]; /** @@ -193,16 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollCode' => 'payrollCode', + 'bonusRbp' => 'bonusRbp', 'forename' => 'forename', - 'surname' => 'surname', - 'gender' => 'gender', 'fullPay' => 'fullPay', + 'gender' => 'gender', + 'hourlyRate' => 'hourlyRate', 'ordinaryPay' => 'ordinaryPay', + 'payrollCode' => 'payrollCode', 'periodBonus' => 'periodBonus', - 'bonusRbp' => 'bonusRbp', - 'weeklyHours' => 'weeklyHours', - 'hourlyRate' => 'hourlyRate' + 'surname' => 'surname', + 'weeklyHours' => 'weeklyHours' ]; /** @@ -211,16 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollCode' => 'setPayrollCode', + 'bonusRbp' => 'setBonusRbp', 'forename' => 'setForename', - 'surname' => 'setSurname', - 'gender' => 'setGender', 'fullPay' => 'setFullPay', + 'gender' => 'setGender', + 'hourlyRate' => 'setHourlyRate', 'ordinaryPay' => 'setOrdinaryPay', + 'payrollCode' => 'setPayrollCode', 'periodBonus' => 'setPeriodBonus', - 'bonusRbp' => 'setBonusRbp', - 'weeklyHours' => 'setWeeklyHours', - 'hourlyRate' => 'setHourlyRate' + 'surname' => 'setSurname', + 'weeklyHours' => 'setWeeklyHours' ]; /** @@ -229,16 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollCode' => 'getPayrollCode', + 'bonusRbp' => 'getBonusRbp', 'forename' => 'getForename', - 'surname' => 'getSurname', - 'gender' => 'getGender', 'fullPay' => 'getFullPay', + 'gender' => 'getGender', + 'hourlyRate' => 'getHourlyRate', 'ordinaryPay' => 'getOrdinaryPay', + 'payrollCode' => 'getPayrollCode', 'periodBonus' => 'getPeriodBonus', - 'bonusRbp' => 'getBonusRbp', - 'weeklyHours' => 'getWeeklyHours', - 'hourlyRate' => 'getHourlyRate' + 'surname' => 'getSurname', + 'weeklyHours' => 'getWeeklyHours' ]; /** @@ -297,16 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('bonusRbp', $data ?? [], null); $this->setIfExists('forename', $data ?? [], null); - $this->setIfExists('surname', $data ?? [], null); - $this->setIfExists('gender', $data ?? [], null); $this->setIfExists('fullPay', $data ?? [], null); + $this->setIfExists('gender', $data ?? [], null); + $this->setIfExists('hourlyRate', $data ?? [], null); $this->setIfExists('ordinaryPay', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('periodBonus', $data ?? [], null); - $this->setIfExists('bonusRbp', $data ?? [], null); + $this->setIfExists('surname', $data ?? [], null); $this->setIfExists('weeklyHours', $data ?? [], null); - $this->setIfExists('hourlyRate', $data ?? [], null); } /** @@ -352,35 +352,28 @@ public function valid(): bool /** - * Gets payrollCode + * Gets bonusRbp * - * @return string|null + * @return float|null */ - public function getPayrollCode(): ?string + public function getBonusRbp(): ?float { - return $this->container['payrollCode']; + return $this->container['bonusRbp']; } /** - * Sets payrollCode + * Sets bonusRbp * - * @param string|null $payrollCode payrollCode + * @param float|null $bonusRbp bonusRbp * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setBonusRbp(?float $bonusRbp): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($bonusRbp)) { + throw new InvalidArgumentException('non-nullable bonusRbp cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['bonusRbp'] = $bonusRbp; return $this; } @@ -420,35 +413,35 @@ public function setForename(?string $forename): static } /** - * Gets surname + * Gets fullPay * * @return string|null */ - public function getSurname(): ?string + public function getFullPay(): ?string { - return $this->container['surname']; + return $this->container['fullPay']; } /** - * Sets surname + * Sets fullPay * - * @param string|null $surname surname + * @param string|null $fullPay fullPay * * @return $this */ - public function setSurname(?string $surname): static + public function setFullPay(?string $fullPay): static { - if (is_null($surname)) { - array_push($this->openAPINullablesSetToNull, 'surname'); + if (is_null($fullPay)) { + array_push($this->openAPINullablesSetToNull, 'fullPay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('surname', $nullablesSetToNull); + $index = array_search('fullPay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['surname'] = $surname; + $this->container['fullPay'] = $fullPay; return $this; } @@ -481,35 +474,28 @@ public function setGender(?\SynergiTech\Staffology\Model\Gender $gender): static } /** - * Gets fullPay + * Gets hourlyRate * - * @return string|null + * @return float|null */ - public function getFullPay(): ?string + public function getHourlyRate(): ?float { - return $this->container['fullPay']; + return $this->container['hourlyRate']; } /** - * Sets fullPay + * Sets hourlyRate * - * @param string|null $fullPay fullPay + * @param float|null $hourlyRate hourlyRate * * @return $this */ - public function setFullPay(?string $fullPay): static + public function setHourlyRate(?float $hourlyRate): static { - if (is_null($fullPay)) { - array_push($this->openAPINullablesSetToNull, 'fullPay'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fullPay', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($hourlyRate)) { + throw new InvalidArgumentException('non-nullable hourlyRate cannot be null'); } - $this->container['fullPay'] = $fullPay; + $this->container['hourlyRate'] = $hourlyRate; return $this; } @@ -541,6 +527,40 @@ public function setOrdinaryPay(?float $ordinaryPay): static return $this; } + /** + * Gets payrollCode + * + * @return string|null + */ + public function getPayrollCode(): ?string + { + return $this->container['payrollCode']; + } + + /** + * Sets payrollCode + * + * @param string|null $payrollCode payrollCode + * + * @return $this + */ + public function setPayrollCode(?string $payrollCode): static + { + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payrollCode'] = $payrollCode; + + return $this; + } + /** * Gets periodBonus * @@ -569,28 +589,35 @@ public function setPeriodBonus(?float $periodBonus): static } /** - * Gets bonusRbp + * Gets surname * - * @return float|null + * @return string|null */ - public function getBonusRbp(): ?float + public function getSurname(): ?string { - return $this->container['bonusRbp']; + return $this->container['surname']; } /** - * Sets bonusRbp + * Sets surname * - * @param float|null $bonusRbp bonusRbp + * @param string|null $surname surname * * @return $this */ - public function setBonusRbp(?float $bonusRbp): static + public function setSurname(?string $surname): static { - if (is_null($bonusRbp)) { - throw new InvalidArgumentException('non-nullable bonusRbp cannot be null'); + if (is_null($surname)) { + array_push($this->openAPINullablesSetToNull, 'surname'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('surname', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['bonusRbp'] = $bonusRbp; + $this->container['surname'] = $surname; return $this; } @@ -621,33 +648,6 @@ public function setWeeklyHours(?float $weeklyHours): static return $this; } - - /** - * Gets hourlyRate - * - * @return float|null - */ - public function getHourlyRate(): ?float - { - return $this->container['hourlyRate']; - } - - /** - * Sets hourlyRate - * - * @param float|null $hourlyRate hourlyRate - * - * @return $this - */ - public function setHourlyRate(?float $hourlyRate): static - { - if (is_null($hourlyRate)) { - throw new InvalidArgumentException('non-nullable hourlyRate cannot be null'); - } - $this->container['hourlyRate'] = $hourlyRate; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/GenderPayGapReport.php b/src/Model/GenderPayGapReport.php index fc344c1..bf55468 100644 --- a/src/Model/GenderPayGapReport.php +++ b/src/Model/GenderPayGapReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class GenderPayGapReport implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPITypes = [ 'genderPayGapLines' => '\SynergiTech\Staffology\Model\GenderPayGapLine[]', + 'isDraft' => 'bool', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -73,10 +73,10 @@ class GenderPayGapReport implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPIFormats = [ 'genderPayGapLines' => null, + 'isDraft' => null, 'report' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -86,10 +86,10 @@ class GenderPayGapReport implements ModelInterface, ArrayAccess, JsonSerializabl */ protected static array $openAPINullables = [ 'genderPayGapLines' => true, + 'isDraft' => false, 'report' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -179,10 +179,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'genderPayGapLines' => 'genderPayGapLines', + 'isDraft' => 'isDraft', 'report' => 'report', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -192,10 +192,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'genderPayGapLines' => 'setGenderPayGapLines', + 'isDraft' => 'setIsDraft', 'report' => 'setReport', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -205,10 +205,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'genderPayGapLines' => 'getGenderPayGapLines', + 'isDraft' => 'getIsDraft', 'report' => 'getReport', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -268,10 +268,10 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('genderPayGapLines', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -350,6 +350,33 @@ public function setGenderPayGapLines(?array $genderPayGapLines): static return $this; } + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + /** * Gets report * @@ -437,33 +464,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/GenderPayGapReportReportResponse.php b/src/Model/GenderPayGapReportReportResponse.php index 93cb951..32aeacf 100644 --- a/src/Model/GenderPayGapReportReportResponse.php +++ b/src/Model/GenderPayGapReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class GenderPayGapReportReportResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\GenderPayGapReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class GenderPayGapReportReportResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class GenderPayGapReportReportResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/GenderPayGapSnapShotDate.php b/src/Model/GenderPayGapSnapShotDate.php index c16202c..c850480 100644 --- a/src/Model/GenderPayGapSnapShotDate.php +++ b/src/Model/GenderPayGapSnapShotDate.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/GovTalk.php b/src/Model/GovTalk.php index d5f7bac..ad53443 100644 --- a/src/Model/GovTalk.php +++ b/src/Model/GovTalk.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,15 +60,15 @@ class GovTalk implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'fullPaymentSubmissionNamespace' => 'string', - 'fullPaymentSubmissionNamespaceVersion' => 'string', + 'cis300NameSpace' => 'string', + 'cisVerificationRequestNameSpace' => 'string', 'employerPaymentSummaryNamespace' => 'string', 'employerPaymentSummaryNamespaceVersion' => 'string', - 'niNoVerificationRequestNameSpace' => 'string', - 'cisVerificationRequestNameSpace' => 'string', - 'cis300NameSpace' => 'string', 'expensesAndBenefitsNameSpace' => 'string', - 'expensesAndBenefitsNameSpaceVersion' => 'string' + 'expensesAndBenefitsNameSpaceVersion' => 'string', + 'fullPaymentSubmissionNamespace' => 'string', + 'fullPaymentSubmissionNamespaceVersion' => 'string', + 'niNoVerificationRequestNameSpace' => 'string' ]; /** @@ -77,15 +77,15 @@ class GovTalk implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'fullPaymentSubmissionNamespace' => null, - 'fullPaymentSubmissionNamespaceVersion' => null, + 'cis300NameSpace' => null, + 'cisVerificationRequestNameSpace' => null, 'employerPaymentSummaryNamespace' => null, 'employerPaymentSummaryNamespaceVersion' => null, - 'niNoVerificationRequestNameSpace' => null, - 'cisVerificationRequestNameSpace' => null, - 'cis300NameSpace' => null, 'expensesAndBenefitsNameSpace' => null, - 'expensesAndBenefitsNameSpaceVersion' => null + 'expensesAndBenefitsNameSpaceVersion' => null, + 'fullPaymentSubmissionNamespace' => null, + 'fullPaymentSubmissionNamespaceVersion' => null, + 'niNoVerificationRequestNameSpace' => null ]; /** @@ -94,15 +94,15 @@ class GovTalk implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'fullPaymentSubmissionNamespace' => true, - 'fullPaymentSubmissionNamespaceVersion' => true, + 'cis300NameSpace' => true, + 'cisVerificationRequestNameSpace' => true, 'employerPaymentSummaryNamespace' => true, 'employerPaymentSummaryNamespaceVersion' => true, - 'niNoVerificationRequestNameSpace' => true, - 'cisVerificationRequestNameSpace' => true, - 'cis300NameSpace' => true, 'expensesAndBenefitsNameSpace' => true, - 'expensesAndBenefitsNameSpaceVersion' => true + 'expensesAndBenefitsNameSpaceVersion' => true, + 'fullPaymentSubmissionNamespace' => true, + 'fullPaymentSubmissionNamespaceVersion' => true, + 'niNoVerificationRequestNameSpace' => true ]; /** @@ -191,15 +191,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'fullPaymentSubmissionNamespace' => 'fullPaymentSubmissionNamespace', - 'fullPaymentSubmissionNamespaceVersion' => 'fullPaymentSubmissionNamespaceVersion', + 'cis300NameSpace' => 'cis300NameSpace', + 'cisVerificationRequestNameSpace' => 'cisVerificationRequestNameSpace', 'employerPaymentSummaryNamespace' => 'employerPaymentSummaryNamespace', 'employerPaymentSummaryNamespaceVersion' => 'employerPaymentSummaryNamespaceVersion', - 'niNoVerificationRequestNameSpace' => 'niNoVerificationRequestNameSpace', - 'cisVerificationRequestNameSpace' => 'cisVerificationRequestNameSpace', - 'cis300NameSpace' => 'cis300NameSpace', 'expensesAndBenefitsNameSpace' => 'expensesAndBenefitsNameSpace', - 'expensesAndBenefitsNameSpaceVersion' => 'expensesAndBenefitsNameSpaceVersion' + 'expensesAndBenefitsNameSpaceVersion' => 'expensesAndBenefitsNameSpaceVersion', + 'fullPaymentSubmissionNamespace' => 'fullPaymentSubmissionNamespace', + 'fullPaymentSubmissionNamespaceVersion' => 'fullPaymentSubmissionNamespaceVersion', + 'niNoVerificationRequestNameSpace' => 'niNoVerificationRequestNameSpace' ]; /** @@ -208,15 +208,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'fullPaymentSubmissionNamespace' => 'setFullPaymentSubmissionNamespace', - 'fullPaymentSubmissionNamespaceVersion' => 'setFullPaymentSubmissionNamespaceVersion', + 'cis300NameSpace' => 'setCis300NameSpace', + 'cisVerificationRequestNameSpace' => 'setCisVerificationRequestNameSpace', 'employerPaymentSummaryNamespace' => 'setEmployerPaymentSummaryNamespace', 'employerPaymentSummaryNamespaceVersion' => 'setEmployerPaymentSummaryNamespaceVersion', - 'niNoVerificationRequestNameSpace' => 'setNiNoVerificationRequestNameSpace', - 'cisVerificationRequestNameSpace' => 'setCisVerificationRequestNameSpace', - 'cis300NameSpace' => 'setCis300NameSpace', 'expensesAndBenefitsNameSpace' => 'setExpensesAndBenefitsNameSpace', - 'expensesAndBenefitsNameSpaceVersion' => 'setExpensesAndBenefitsNameSpaceVersion' + 'expensesAndBenefitsNameSpaceVersion' => 'setExpensesAndBenefitsNameSpaceVersion', + 'fullPaymentSubmissionNamespace' => 'setFullPaymentSubmissionNamespace', + 'fullPaymentSubmissionNamespaceVersion' => 'setFullPaymentSubmissionNamespaceVersion', + 'niNoVerificationRequestNameSpace' => 'setNiNoVerificationRequestNameSpace' ]; /** @@ -225,15 +225,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'fullPaymentSubmissionNamespace' => 'getFullPaymentSubmissionNamespace', - 'fullPaymentSubmissionNamespaceVersion' => 'getFullPaymentSubmissionNamespaceVersion', + 'cis300NameSpace' => 'getCis300NameSpace', + 'cisVerificationRequestNameSpace' => 'getCisVerificationRequestNameSpace', 'employerPaymentSummaryNamespace' => 'getEmployerPaymentSummaryNamespace', 'employerPaymentSummaryNamespaceVersion' => 'getEmployerPaymentSummaryNamespaceVersion', - 'niNoVerificationRequestNameSpace' => 'getNiNoVerificationRequestNameSpace', - 'cisVerificationRequestNameSpace' => 'getCisVerificationRequestNameSpace', - 'cis300NameSpace' => 'getCis300NameSpace', 'expensesAndBenefitsNameSpace' => 'getExpensesAndBenefitsNameSpace', - 'expensesAndBenefitsNameSpaceVersion' => 'getExpensesAndBenefitsNameSpaceVersion' + 'expensesAndBenefitsNameSpaceVersion' => 'getExpensesAndBenefitsNameSpaceVersion', + 'fullPaymentSubmissionNamespace' => 'getFullPaymentSubmissionNamespace', + 'fullPaymentSubmissionNamespaceVersion' => 'getFullPaymentSubmissionNamespaceVersion', + 'niNoVerificationRequestNameSpace' => 'getNiNoVerificationRequestNameSpace' ]; /** @@ -292,15 +292,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('fullPaymentSubmissionNamespace', $data ?? [], null); - $this->setIfExists('fullPaymentSubmissionNamespaceVersion', $data ?? [], null); + $this->setIfExists('cis300NameSpace', $data ?? [], null); + $this->setIfExists('cisVerificationRequestNameSpace', $data ?? [], null); $this->setIfExists('employerPaymentSummaryNamespace', $data ?? [], null); $this->setIfExists('employerPaymentSummaryNamespaceVersion', $data ?? [], null); - $this->setIfExists('niNoVerificationRequestNameSpace', $data ?? [], null); - $this->setIfExists('cisVerificationRequestNameSpace', $data ?? [], null); - $this->setIfExists('cis300NameSpace', $data ?? [], null); $this->setIfExists('expensesAndBenefitsNameSpace', $data ?? [], null); $this->setIfExists('expensesAndBenefitsNameSpaceVersion', $data ?? [], null); + $this->setIfExists('fullPaymentSubmissionNamespace', $data ?? [], null); + $this->setIfExists('fullPaymentSubmissionNamespaceVersion', $data ?? [], null); + $this->setIfExists('niNoVerificationRequestNameSpace', $data ?? [], null); } /** @@ -346,69 +346,69 @@ public function valid(): bool /** - * Gets fullPaymentSubmissionNamespace + * Gets cis300NameSpace * * @return string|null */ - public function getFullPaymentSubmissionNamespace(): ?string + public function getCis300NameSpace(): ?string { - return $this->container['fullPaymentSubmissionNamespace']; + return $this->container['cis300NameSpace']; } /** - * Sets fullPaymentSubmissionNamespace + * Sets cis300NameSpace * - * @param string|null $fullPaymentSubmissionNamespace [readonly] + * @param string|null $cis300NameSpace [readonly] * * @return $this */ - public function setFullPaymentSubmissionNamespace(?string $fullPaymentSubmissionNamespace): static + public function setCis300NameSpace(?string $cis300NameSpace): static { - if (is_null($fullPaymentSubmissionNamespace)) { - array_push($this->openAPINullablesSetToNull, 'fullPaymentSubmissionNamespace'); + if (is_null($cis300NameSpace)) { + array_push($this->openAPINullablesSetToNull, 'cis300NameSpace'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fullPaymentSubmissionNamespace', $nullablesSetToNull); + $index = array_search('cis300NameSpace', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['fullPaymentSubmissionNamespace'] = $fullPaymentSubmissionNamespace; + $this->container['cis300NameSpace'] = $cis300NameSpace; return $this; } /** - * Gets fullPaymentSubmissionNamespaceVersion + * Gets cisVerificationRequestNameSpace * * @return string|null */ - public function getFullPaymentSubmissionNamespaceVersion(): ?string + public function getCisVerificationRequestNameSpace(): ?string { - return $this->container['fullPaymentSubmissionNamespaceVersion']; + return $this->container['cisVerificationRequestNameSpace']; } /** - * Sets fullPaymentSubmissionNamespaceVersion + * Sets cisVerificationRequestNameSpace * - * @param string|null $fullPaymentSubmissionNamespaceVersion [readonly] + * @param string|null $cisVerificationRequestNameSpace [readonly] * * @return $this */ - public function setFullPaymentSubmissionNamespaceVersion(?string $fullPaymentSubmissionNamespaceVersion): static + public function setCisVerificationRequestNameSpace(?string $cisVerificationRequestNameSpace): static { - if (is_null($fullPaymentSubmissionNamespaceVersion)) { - array_push($this->openAPINullablesSetToNull, 'fullPaymentSubmissionNamespaceVersion'); + if (is_null($cisVerificationRequestNameSpace)) { + array_push($this->openAPINullablesSetToNull, 'cisVerificationRequestNameSpace'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fullPaymentSubmissionNamespaceVersion', $nullablesSetToNull); + $index = array_search('cisVerificationRequestNameSpace', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['fullPaymentSubmissionNamespaceVersion'] = $fullPaymentSubmissionNamespaceVersion; + $this->container['cisVerificationRequestNameSpace'] = $cisVerificationRequestNameSpace; return $this; } @@ -482,171 +482,171 @@ public function setEmployerPaymentSummaryNamespaceVersion(?string $employerPayme } /** - * Gets niNoVerificationRequestNameSpace + * Gets expensesAndBenefitsNameSpace * * @return string|null */ - public function getNiNoVerificationRequestNameSpace(): ?string + public function getExpensesAndBenefitsNameSpace(): ?string { - return $this->container['niNoVerificationRequestNameSpace']; + return $this->container['expensesAndBenefitsNameSpace']; } /** - * Sets niNoVerificationRequestNameSpace + * Sets expensesAndBenefitsNameSpace * - * @param string|null $niNoVerificationRequestNameSpace [readonly] + * @param string|null $expensesAndBenefitsNameSpace [readonly] * * @return $this */ - public function setNiNoVerificationRequestNameSpace(?string $niNoVerificationRequestNameSpace): static + public function setExpensesAndBenefitsNameSpace(?string $expensesAndBenefitsNameSpace): static { - if (is_null($niNoVerificationRequestNameSpace)) { - array_push($this->openAPINullablesSetToNull, 'niNoVerificationRequestNameSpace'); + if (is_null($expensesAndBenefitsNameSpace)) { + array_push($this->openAPINullablesSetToNull, 'expensesAndBenefitsNameSpace'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niNoVerificationRequestNameSpace', $nullablesSetToNull); + $index = array_search('expensesAndBenefitsNameSpace', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['niNoVerificationRequestNameSpace'] = $niNoVerificationRequestNameSpace; + $this->container['expensesAndBenefitsNameSpace'] = $expensesAndBenefitsNameSpace; return $this; } /** - * Gets cisVerificationRequestNameSpace + * Gets expensesAndBenefitsNameSpaceVersion * * @return string|null */ - public function getCisVerificationRequestNameSpace(): ?string + public function getExpensesAndBenefitsNameSpaceVersion(): ?string { - return $this->container['cisVerificationRequestNameSpace']; + return $this->container['expensesAndBenefitsNameSpaceVersion']; } /** - * Sets cisVerificationRequestNameSpace + * Sets expensesAndBenefitsNameSpaceVersion * - * @param string|null $cisVerificationRequestNameSpace [readonly] + * @param string|null $expensesAndBenefitsNameSpaceVersion [readonly] * * @return $this */ - public function setCisVerificationRequestNameSpace(?string $cisVerificationRequestNameSpace): static + public function setExpensesAndBenefitsNameSpaceVersion(?string $expensesAndBenefitsNameSpaceVersion): static { - if (is_null($cisVerificationRequestNameSpace)) { - array_push($this->openAPINullablesSetToNull, 'cisVerificationRequestNameSpace'); + if (is_null($expensesAndBenefitsNameSpaceVersion)) { + array_push($this->openAPINullablesSetToNull, 'expensesAndBenefitsNameSpaceVersion'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cisVerificationRequestNameSpace', $nullablesSetToNull); + $index = array_search('expensesAndBenefitsNameSpaceVersion', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cisVerificationRequestNameSpace'] = $cisVerificationRequestNameSpace; + $this->container['expensesAndBenefitsNameSpaceVersion'] = $expensesAndBenefitsNameSpaceVersion; return $this; } /** - * Gets cis300NameSpace + * Gets fullPaymentSubmissionNamespace * * @return string|null */ - public function getCis300NameSpace(): ?string + public function getFullPaymentSubmissionNamespace(): ?string { - return $this->container['cis300NameSpace']; + return $this->container['fullPaymentSubmissionNamespace']; } /** - * Sets cis300NameSpace + * Sets fullPaymentSubmissionNamespace * - * @param string|null $cis300NameSpace [readonly] + * @param string|null $fullPaymentSubmissionNamespace [readonly] * * @return $this */ - public function setCis300NameSpace(?string $cis300NameSpace): static + public function setFullPaymentSubmissionNamespace(?string $fullPaymentSubmissionNamespace): static { - if (is_null($cis300NameSpace)) { - array_push($this->openAPINullablesSetToNull, 'cis300NameSpace'); + if (is_null($fullPaymentSubmissionNamespace)) { + array_push($this->openAPINullablesSetToNull, 'fullPaymentSubmissionNamespace'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cis300NameSpace', $nullablesSetToNull); + $index = array_search('fullPaymentSubmissionNamespace', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cis300NameSpace'] = $cis300NameSpace; + $this->container['fullPaymentSubmissionNamespace'] = $fullPaymentSubmissionNamespace; return $this; } /** - * Gets expensesAndBenefitsNameSpace + * Gets fullPaymentSubmissionNamespaceVersion * * @return string|null */ - public function getExpensesAndBenefitsNameSpace(): ?string + public function getFullPaymentSubmissionNamespaceVersion(): ?string { - return $this->container['expensesAndBenefitsNameSpace']; + return $this->container['fullPaymentSubmissionNamespaceVersion']; } /** - * Sets expensesAndBenefitsNameSpace + * Sets fullPaymentSubmissionNamespaceVersion * - * @param string|null $expensesAndBenefitsNameSpace [readonly] + * @param string|null $fullPaymentSubmissionNamespaceVersion [readonly] * * @return $this */ - public function setExpensesAndBenefitsNameSpace(?string $expensesAndBenefitsNameSpace): static + public function setFullPaymentSubmissionNamespaceVersion(?string $fullPaymentSubmissionNamespaceVersion): static { - if (is_null($expensesAndBenefitsNameSpace)) { - array_push($this->openAPINullablesSetToNull, 'expensesAndBenefitsNameSpace'); + if (is_null($fullPaymentSubmissionNamespaceVersion)) { + array_push($this->openAPINullablesSetToNull, 'fullPaymentSubmissionNamespaceVersion'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('expensesAndBenefitsNameSpace', $nullablesSetToNull); + $index = array_search('fullPaymentSubmissionNamespaceVersion', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['expensesAndBenefitsNameSpace'] = $expensesAndBenefitsNameSpace; + $this->container['fullPaymentSubmissionNamespaceVersion'] = $fullPaymentSubmissionNamespaceVersion; return $this; } /** - * Gets expensesAndBenefitsNameSpaceVersion + * Gets niNoVerificationRequestNameSpace * * @return string|null */ - public function getExpensesAndBenefitsNameSpaceVersion(): ?string + public function getNiNoVerificationRequestNameSpace(): ?string { - return $this->container['expensesAndBenefitsNameSpaceVersion']; + return $this->container['niNoVerificationRequestNameSpace']; } /** - * Sets expensesAndBenefitsNameSpaceVersion + * Sets niNoVerificationRequestNameSpace * - * @param string|null $expensesAndBenefitsNameSpaceVersion [readonly] + * @param string|null $niNoVerificationRequestNameSpace [readonly] * * @return $this */ - public function setExpensesAndBenefitsNameSpaceVersion(?string $expensesAndBenefitsNameSpaceVersion): static + public function setNiNoVerificationRequestNameSpace(?string $niNoVerificationRequestNameSpace): static { - if (is_null($expensesAndBenefitsNameSpaceVersion)) { - array_push($this->openAPINullablesSetToNull, 'expensesAndBenefitsNameSpaceVersion'); + if (is_null($niNoVerificationRequestNameSpace)) { + array_push($this->openAPINullablesSetToNull, 'niNoVerificationRequestNameSpace'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('expensesAndBenefitsNameSpaceVersion', $nullablesSetToNull); + $index = array_search('niNoVerificationRequestNameSpace', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['expensesAndBenefitsNameSpaceVersion'] = $expensesAndBenefitsNameSpaceVersion; + $this->container['niNoVerificationRequestNameSpace'] = $niNoVerificationRequestNameSpace; return $this; } diff --git a/src/Model/GovTalkError.php b/src/Model/GovTalkError.php index bcd1725..4f372af 100644 --- a/src/Model/GovTalkError.php +++ b/src/Model/GovTalkError.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class GovTalkError implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'raisedBy' => 'string', + 'location' => 'string', 'number' => 'string', - 'type' => 'string', + 'raisedBy' => 'string', 'text' => 'string', - 'location' => 'string' + 'type' => 'string' ]; /** @@ -72,11 +72,11 @@ class GovTalkError implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'raisedBy' => null, + 'location' => null, 'number' => null, - 'type' => null, + 'raisedBy' => null, 'text' => null, - 'location' => null + 'type' => null ]; /** @@ -85,11 +85,11 @@ class GovTalkError implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'raisedBy' => true, + 'location' => true, 'number' => true, - 'type' => true, + 'raisedBy' => true, 'text' => true, - 'location' => true + 'type' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'raisedBy' => 'raisedBy', + 'location' => 'location', 'number' => 'number', - 'type' => 'type', + 'raisedBy' => 'raisedBy', 'text' => 'text', - 'location' => 'location' + 'type' => 'type' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'raisedBy' => 'setRaisedBy', + 'location' => 'setLocation', 'number' => 'setNumber', - 'type' => 'setType', + 'raisedBy' => 'setRaisedBy', 'text' => 'setText', - 'location' => 'setLocation' + 'type' => 'setType' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'raisedBy' => 'getRaisedBy', + 'location' => 'getLocation', 'number' => 'getNumber', - 'type' => 'getType', + 'raisedBy' => 'getRaisedBy', 'text' => 'getText', - 'location' => 'getLocation' + 'type' => 'getType' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('raisedBy', $data ?? [], null); + $this->setIfExists('location', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('raisedBy', $data ?? [], null); $this->setIfExists('text', $data ?? [], null); - $this->setIfExists('location', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -317,35 +317,35 @@ public function valid(): bool /** - * Gets raisedBy + * Gets location * * @return string|null */ - public function getRaisedBy(): ?string + public function getLocation(): ?string { - return $this->container['raisedBy']; + return $this->container['location']; } /** - * Sets raisedBy + * Sets location * - * @param string|null $raisedBy raisedBy + * @param string|null $location location * * @return $this */ - public function setRaisedBy(?string $raisedBy): static + public function setLocation(?string $location): static { - if (is_null($raisedBy)) { - array_push($this->openAPINullablesSetToNull, 'raisedBy'); + if (is_null($location)) { + array_push($this->openAPINullablesSetToNull, 'location'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('raisedBy', $nullablesSetToNull); + $index = array_search('location', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['raisedBy'] = $raisedBy; + $this->container['location'] = $location; return $this; } @@ -385,35 +385,35 @@ public function setNumber(?string $number): static } /** - * Gets type + * Gets raisedBy * * @return string|null */ - public function getType(): ?string + public function getRaisedBy(): ?string { - return $this->container['type']; + return $this->container['raisedBy']; } /** - * Sets type + * Sets raisedBy * - * @param string|null $type type + * @param string|null $raisedBy raisedBy * * @return $this */ - public function setType(?string $type): static + public function setRaisedBy(?string $raisedBy): static { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); + if (is_null($raisedBy)) { + array_push($this->openAPINullablesSetToNull, 'raisedBy'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); + $index = array_search('raisedBy', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['type'] = $type; + $this->container['raisedBy'] = $raisedBy; return $this; } @@ -453,35 +453,35 @@ public function setText(?string $text): static } /** - * Gets location + * Gets type * * @return string|null */ - public function getLocation(): ?string + public function getType(): ?string { - return $this->container['location']; + return $this->container['type']; } /** - * Sets location + * Sets type * - * @param string|null $location location + * @param string|null $type type * * @return $this */ - public function setLocation(?string $location): static + public function setType(?string $type): static { - if (is_null($location)) { - array_push($this->openAPINullablesSetToNull, 'location'); + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('location', $nullablesSetToNull); + $index = array_search('type', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['location'] = $location; + $this->container['type'] = $type; return $this; } diff --git a/src/Model/GovTalkSubmission.php b/src/Model/GovTalkSubmission.php index e8c5625..0392d82 100644 --- a/src/Model/GovTalkSubmission.php +++ b/src/Model/GovTalkSubmission.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,19 +59,19 @@ class GovTalkSubmission implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'rawResponse' => 'string', + 'correlationId' => 'string', + 'errors' => '\SynergiTech\Staffology\Model\GovTalkError[]', + 'errorsJson' => 'string', + 'iRmark' => 'string', + 'id' => 'string', + 'lastPoll' => '\DateTime', + 'message' => 'string', 'messageClass' => 'string', 'pollInterval' => 'int', - 'lastPoll' => '\DateTime', - 'correlationId' => 'string', - 'url' => 'string', + 'rawResponse' => 'string', 'status' => '\SynergiTech\Staffology\Model\SubmissionStatus', - 'message' => 'string', - 'iRmark' => 'string', - 'errorsJson' => 'string', - 'errors' => '\SynergiTech\Staffology\Model\GovTalkError[]', 'submittedAt' => '\DateTime', - 'id' => 'string' + 'url' => 'string' ]; /** @@ -80,19 +80,19 @@ class GovTalkSubmission implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'rawResponse' => null, + 'correlationId' => null, + 'errors' => null, + 'errorsJson' => null, + 'iRmark' => null, + 'id' => 'uuid', + 'lastPoll' => 'date-time', + 'message' => null, 'messageClass' => null, 'pollInterval' => 'int32', - 'lastPoll' => 'date-time', - 'correlationId' => null, - 'url' => null, + 'rawResponse' => null, 'status' => null, - 'message' => null, - 'iRmark' => null, - 'errorsJson' => null, - 'errors' => null, 'submittedAt' => 'date-time', - 'id' => 'uuid' + 'url' => null ]; /** @@ -101,19 +101,19 @@ class GovTalkSubmission implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'rawResponse' => true, + 'correlationId' => true, + 'errors' => true, + 'errorsJson' => true, + 'iRmark' => true, + 'id' => false, + 'lastPoll' => true, + 'message' => true, 'messageClass' => true, 'pollInterval' => false, - 'lastPoll' => true, - 'correlationId' => true, - 'url' => true, + 'rawResponse' => true, 'status' => false, - 'message' => true, - 'iRmark' => true, - 'errorsJson' => true, - 'errors' => true, 'submittedAt' => true, - 'id' => false + 'url' => true ]; /** @@ -202,19 +202,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'rawResponse' => 'rawResponse', + 'correlationId' => 'correlationId', + 'errors' => 'errors', + 'errorsJson' => 'errorsJson', + 'iRmark' => 'iRmark', + 'id' => 'id', + 'lastPoll' => 'lastPoll', + 'message' => 'message', 'messageClass' => 'messageClass', 'pollInterval' => 'pollInterval', - 'lastPoll' => 'lastPoll', - 'correlationId' => 'correlationId', - 'url' => 'url', + 'rawResponse' => 'rawResponse', 'status' => 'status', - 'message' => 'message', - 'iRmark' => 'iRmark', - 'errorsJson' => 'errorsJson', - 'errors' => 'errors', 'submittedAt' => 'submittedAt', - 'id' => 'id' + 'url' => 'url' ]; /** @@ -223,19 +223,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'rawResponse' => 'setRawResponse', + 'correlationId' => 'setCorrelationId', + 'errors' => 'setErrors', + 'errorsJson' => 'setErrorsJson', + 'iRmark' => 'setIRmark', + 'id' => 'setId', + 'lastPoll' => 'setLastPoll', + 'message' => 'setMessage', 'messageClass' => 'setMessageClass', 'pollInterval' => 'setPollInterval', - 'lastPoll' => 'setLastPoll', - 'correlationId' => 'setCorrelationId', - 'url' => 'setUrl', + 'rawResponse' => 'setRawResponse', 'status' => 'setStatus', - 'message' => 'setMessage', - 'iRmark' => 'setIRmark', - 'errorsJson' => 'setErrorsJson', - 'errors' => 'setErrors', 'submittedAt' => 'setSubmittedAt', - 'id' => 'setId' + 'url' => 'setUrl' ]; /** @@ -244,19 +244,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'rawResponse' => 'getRawResponse', + 'correlationId' => 'getCorrelationId', + 'errors' => 'getErrors', + 'errorsJson' => 'getErrorsJson', + 'iRmark' => 'getIRmark', + 'id' => 'getId', + 'lastPoll' => 'getLastPoll', + 'message' => 'getMessage', 'messageClass' => 'getMessageClass', 'pollInterval' => 'getPollInterval', - 'lastPoll' => 'getLastPoll', - 'correlationId' => 'getCorrelationId', - 'url' => 'getUrl', + 'rawResponse' => 'getRawResponse', 'status' => 'getStatus', - 'message' => 'getMessage', - 'iRmark' => 'getIRmark', - 'errorsJson' => 'getErrorsJson', - 'errors' => 'getErrors', 'submittedAt' => 'getSubmittedAt', - 'id' => 'getId' + 'url' => 'getUrl' ]; /** @@ -315,19 +315,19 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('rawResponse', $data ?? [], null); + $this->setIfExists('correlationId', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('errorsJson', $data ?? [], null); + $this->setIfExists('iRmark', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('lastPoll', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); $this->setIfExists('messageClass', $data ?? [], null); $this->setIfExists('pollInterval', $data ?? [], null); - $this->setIfExists('lastPoll', $data ?? [], null); - $this->setIfExists('correlationId', $data ?? [], null); - $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('rawResponse', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); - $this->setIfExists('message', $data ?? [], null); - $this->setIfExists('iRmark', $data ?? [], null); - $this->setIfExists('errorsJson', $data ?? [], null); - $this->setIfExists('errors', $data ?? [], null); $this->setIfExists('submittedAt', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); } /** @@ -381,233 +381,202 @@ public function valid(): bool /** - * Gets rawResponse + * Gets correlationId * * @return string|null */ - public function getRawResponse(): ?string + public function getCorrelationId(): ?string { - return $this->container['rawResponse']; + return $this->container['correlationId']; } /** - * Sets rawResponse + * Sets correlationId * - * @param string|null $rawResponse rawResponse + * @param string|null $correlationId correlationId * * @return $this */ - public function setRawResponse(?string $rawResponse): static + public function setCorrelationId(?string $correlationId): static { - if (is_null($rawResponse)) { - array_push($this->openAPINullablesSetToNull, 'rawResponse'); + if (is_null($correlationId)) { + array_push($this->openAPINullablesSetToNull, 'correlationId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('rawResponse', $nullablesSetToNull); + $index = array_search('correlationId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['rawResponse'] = $rawResponse; + if (!is_null($correlationId) && (mb_strlen($correlationId) > 100)) { + throw new InvalidArgumentException('invalid length for $correlationId when calling GovTalkSubmission., must be smaller than or equal to 100.'); + } + + $this->container['correlationId'] = $correlationId; return $this; } /** - * Gets messageClass + * Gets errors * - * @return string|null + * @return \SynergiTech\Staffology\Model\GovTalkError[]|null */ - public function getMessageClass(): ?string + public function getErrors(): ?array { - return $this->container['messageClass']; + return $this->container['errors']; } /** - * Sets messageClass + * Sets errors * - * @param string|null $messageClass messageClass + * @param \SynergiTech\Staffology\Model\GovTalkError[]|null $errors errors * * @return $this */ - public function setMessageClass(?string $messageClass): static + public function setErrors(?array $errors): static { - if (is_null($messageClass)) { - array_push($this->openAPINullablesSetToNull, 'messageClass'); + if (is_null($errors)) { + array_push($this->openAPINullablesSetToNull, 'errors'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('messageClass', $nullablesSetToNull); + $index = array_search('errors', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['messageClass'] = $messageClass; - - return $this; - } - - /** - * Gets pollInterval - * - * @return int|null - */ - public function getPollInterval(): ?int - { - return $this->container['pollInterval']; - } - - /** - * Sets pollInterval - * - * @param int|null $pollInterval pollInterval - * - * @return $this - */ - public function setPollInterval(?int $pollInterval): static - { - if (is_null($pollInterval)) { - throw new InvalidArgumentException('non-nullable pollInterval cannot be null'); - } - $this->container['pollInterval'] = $pollInterval; + $this->container['errors'] = $errors; return $this; } /** - * Gets lastPoll + * Gets errorsJson * - * @return \DateTime|null + * @return string|null */ - public function getLastPoll(): ?\DateTime + public function getErrorsJson(): ?string { - return $this->container['lastPoll']; + return $this->container['errorsJson']; } /** - * Sets lastPoll + * Sets errorsJson * - * @param \DateTime|null $lastPoll lastPoll + * @param string|null $errorsJson errorsJson * * @return $this */ - public function setLastPoll(?\DateTime $lastPoll): static + public function setErrorsJson(?string $errorsJson): static { - if (is_null($lastPoll)) { - array_push($this->openAPINullablesSetToNull, 'lastPoll'); + if (is_null($errorsJson)) { + array_push($this->openAPINullablesSetToNull, 'errorsJson'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastPoll', $nullablesSetToNull); + $index = array_search('errorsJson', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lastPoll'] = $lastPoll; + $this->container['errorsJson'] = $errorsJson; return $this; } /** - * Gets correlationId + * Gets iRmark * * @return string|null */ - public function getCorrelationId(): ?string + public function getIRmark(): ?string { - return $this->container['correlationId']; + return $this->container['iRmark']; } /** - * Sets correlationId + * Sets iRmark * - * @param string|null $correlationId correlationId + * @param string|null $iRmark iRmark * * @return $this */ - public function setCorrelationId(?string $correlationId): static + public function setIRmark(?string $iRmark): static { - if (is_null($correlationId)) { - array_push($this->openAPINullablesSetToNull, 'correlationId'); + if (is_null($iRmark)) { + array_push($this->openAPINullablesSetToNull, 'iRmark'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('correlationId', $nullablesSetToNull); + $index = array_search('iRmark', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($correlationId) && (mb_strlen($correlationId) > 100)) { - throw new InvalidArgumentException('invalid length for $correlationId when calling GovTalkSubmission., must be smaller than or equal to 100.'); - } - - $this->container['correlationId'] = $correlationId; + $this->container['iRmark'] = $iRmark; return $this; } /** - * Gets url + * Gets id * * @return string|null */ - public function getUrl(): ?string + public function getId(): ?string { - return $this->container['url']; + return $this->container['id']; } /** - * Sets url + * Sets id * - * @param string|null $url url + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setUrl(?string $url): static + public function setId(?string $id): static { - if (is_null($url)) { - array_push($this->openAPINullablesSetToNull, 'url'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('url', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($url) && (mb_strlen($url) > 100)) { - throw new InvalidArgumentException('invalid length for $url when calling GovTalkSubmission., must be smaller than or equal to 100.'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - - $this->container['url'] = $url; + $this->container['id'] = $id; return $this; } /** - * Gets status + * Gets lastPoll * - * @return \SynergiTech\Staffology\Model\SubmissionStatus|null + * @return \DateTime|null */ - public function getStatus(): ?\SynergiTech\Staffology\Model\SubmissionStatus + public function getLastPoll(): ?\DateTime { - return $this->container['status']; + return $this->container['lastPoll']; } /** - * Sets status + * Sets lastPoll * - * @param \SynergiTech\Staffology\Model\SubmissionStatus|null $status status + * @param \DateTime|null $lastPoll lastPoll * * @return $this */ - public function setStatus(?\SynergiTech\Staffology\Model\SubmissionStatus $status): static + public function setLastPoll(?\DateTime $lastPoll): static { - if (is_null($status)) { - throw new InvalidArgumentException('non-nullable status cannot be null'); + if (is_null($lastPoll)) { + array_push($this->openAPINullablesSetToNull, 'lastPoll'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lastPoll', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['status'] = $status; + $this->container['lastPoll'] = $lastPoll; return $this; } @@ -647,103 +616,123 @@ public function setMessage(?string $message): static } /** - * Gets iRmark + * Gets messageClass * * @return string|null */ - public function getIRmark(): ?string + public function getMessageClass(): ?string { - return $this->container['iRmark']; + return $this->container['messageClass']; } /** - * Sets iRmark + * Sets messageClass * - * @param string|null $iRmark iRmark + * @param string|null $messageClass messageClass * * @return $this */ - public function setIRmark(?string $iRmark): static + public function setMessageClass(?string $messageClass): static { - if (is_null($iRmark)) { - array_push($this->openAPINullablesSetToNull, 'iRmark'); + if (is_null($messageClass)) { + array_push($this->openAPINullablesSetToNull, 'messageClass'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('iRmark', $nullablesSetToNull); + $index = array_search('messageClass', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['iRmark'] = $iRmark; + $this->container['messageClass'] = $messageClass; return $this; } /** - * Gets errorsJson + * Gets pollInterval + * + * @return int|null + */ + public function getPollInterval(): ?int + { + return $this->container['pollInterval']; + } + + /** + * Sets pollInterval + * + * @param int|null $pollInterval pollInterval + * + * @return $this + */ + public function setPollInterval(?int $pollInterval): static + { + if (is_null($pollInterval)) { + throw new InvalidArgumentException('non-nullable pollInterval cannot be null'); + } + $this->container['pollInterval'] = $pollInterval; + + return $this; + } + + /** + * Gets rawResponse * * @return string|null */ - public function getErrorsJson(): ?string + public function getRawResponse(): ?string { - return $this->container['errorsJson']; + return $this->container['rawResponse']; } /** - * Sets errorsJson + * Sets rawResponse * - * @param string|null $errorsJson errorsJson + * @param string|null $rawResponse rawResponse * * @return $this */ - public function setErrorsJson(?string $errorsJson): static + public function setRawResponse(?string $rawResponse): static { - if (is_null($errorsJson)) { - array_push($this->openAPINullablesSetToNull, 'errorsJson'); + if (is_null($rawResponse)) { + array_push($this->openAPINullablesSetToNull, 'rawResponse'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('errorsJson', $nullablesSetToNull); + $index = array_search('rawResponse', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['errorsJson'] = $errorsJson; + $this->container['rawResponse'] = $rawResponse; return $this; } /** - * Gets errors + * Gets status * - * @return \SynergiTech\Staffology\Model\GovTalkError[]|null + * @return \SynergiTech\Staffology\Model\SubmissionStatus|null */ - public function getErrors(): ?array + public function getStatus(): ?\SynergiTech\Staffology\Model\SubmissionStatus { - return $this->container['errors']; + return $this->container['status']; } /** - * Sets errors + * Sets status * - * @param \SynergiTech\Staffology\Model\GovTalkError[]|null $errors errors + * @param \SynergiTech\Staffology\Model\SubmissionStatus|null $status status * * @return $this */ - public function setErrors(?array $errors): static + public function setStatus(?\SynergiTech\Staffology\Model\SubmissionStatus $status): static { - if (is_null($errors)) { - array_push($this->openAPINullablesSetToNull, 'errors'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('errors', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['errors'] = $errors; + $this->container['status'] = $status; return $this; } @@ -783,28 +772,39 @@ public function setSubmittedAt(?\DateTime $submittedAt): static } /** - * Gets id + * Gets url * * @return string|null */ - public function getId(): ?string + public function getUrl(): ?string { - return $this->container['id']; + return $this->container['url']; } /** - * Sets id + * Sets url * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $url url * * @return $this */ - public function setId(?string $id): static + public function setUrl(?string $url): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($url)) { + array_push($this->openAPINullablesSetToNull, 'url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + if (!is_null($url) && (mb_strlen($url) > 100)) { + throw new InvalidArgumentException('invalid length for $url when calling GovTalkSubmission., must be smaller than or equal to 100.'); + } + + $this->container['url'] = $url; return $this; } diff --git a/src/Model/GrossToNetReport.php b/src/Model/GrossToNetReport.php index 90f3340..84a9ffe 100644 --- a/src/Model/GrossToNetReport.php +++ b/src/Model/GrossToNetReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,22 +59,23 @@ class GrossToNetReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'forCis' => 'bool', - 'lines' => '\SynergiTech\Staffology\Model\GrossToNetReportLine[]', 'cisLines' => '\SynergiTech\Staffology\Model\GrossToNetReportCisLine[]', 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'forCis' => 'bool', + 'isDraft' => 'bool', + 'lines' => '\SynergiTech\Staffology\Model\GrossToNetReportLine[]', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -83,22 +84,23 @@ class GrossToNetReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'forCis' => null, - 'lines' => null, 'cisLines' => null, 'employer' => null, - 'payPeriod' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'forCis' => null, + 'isDraft' => null, + 'lines' => null, 'ordinal' => 'int32', + 'payPeriod' => null, 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -107,22 +109,23 @@ class GrossToNetReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'forCis' => false, - 'lines' => true, 'cisLines' => true, 'employer' => false, - 'payPeriod' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'forCis' => false, + 'isDraft' => false, + 'lines' => true, 'ordinal' => false, + 'payPeriod' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -211,22 +214,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'forCis' => 'forCis', - 'lines' => 'lines', 'cisLines' => 'cisLines', 'employer' => 'employer', - 'payPeriod' => 'payPeriod', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'forCis' => 'forCis', + 'isDraft' => 'isDraft', + 'lines' => 'lines', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -235,22 +239,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'forCis' => 'setForCis', - 'lines' => 'setLines', 'cisLines' => 'setCisLines', 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'forCis' => 'setForCis', + 'isDraft' => 'setIsDraft', + 'lines' => 'setLines', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -259,22 +264,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'forCis' => 'getForCis', - 'lines' => 'getLines', 'cisLines' => 'getCisLines', 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'forCis' => 'getForCis', + 'isDraft' => 'getIsDraft', + 'lines' => 'getLines', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -333,22 +339,23 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('forCis', $data ?? [], null); - $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('cisLines', $data ?? [], null); $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('forCis', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -394,150 +401,211 @@ public function valid(): bool /** - * Gets forCis + * Gets cisLines * - * @return bool|null + * @return \SynergiTech\Staffology\Model\GrossToNetReportCisLine[]|null */ - public function getForCis(): ?bool + public function getCisLines(): ?array { - return $this->container['forCis']; + return $this->container['cisLines']; } /** - * Sets forCis + * Sets cisLines * - * @param bool|null $forCis forCis + * @param \SynergiTech\Staffology\Model\GrossToNetReportCisLine[]|null $cisLines cisLines * * @return $this */ - public function setForCis(?bool $forCis): static + public function setCisLines(?array $cisLines): static { - if (is_null($forCis)) { - throw new InvalidArgumentException('non-nullable forCis cannot be null'); + if (is_null($cisLines)) { + array_push($this->openAPINullablesSetToNull, 'cisLines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('cisLines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['forCis'] = $forCis; + $this->container['cisLines'] = $cisLines; return $this; } /** - * Gets lines + * Gets employer * - * @return \SynergiTech\Staffology\Model\GrossToNetReportLine[]|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getLines(): ?array + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['lines']; + return $this->container['employer']; } /** - * Sets lines + * Sets employer * - * @param \SynergiTech\Staffology\Model\GrossToNetReportLine[]|null $lines lines + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setLines(?array $lines): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); } - $this->container['lines'] = $lines; + $this->container['employer'] = $employer; return $this; } /** - * Gets cisLines + * Gets endDate * - * @return \SynergiTech\Staffology\Model\GrossToNetReportCisLine[]|null + * @return \DateTime|null */ - public function getCisLines(): ?array + public function getEndDate(): ?\DateTime { - return $this->container['cisLines']; + return $this->container['endDate']; } /** - * Sets cisLines + * Sets endDate * - * @param \SynergiTech\Staffology\Model\GrossToNetReportCisLine[]|null $cisLines cisLines + * @param \DateTime|null $endDate endDate * * @return $this */ - public function setCisLines(?array $cisLines): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($cisLines)) { - array_push($this->openAPINullablesSetToNull, 'cisLines'); + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets endPeriodName + * + * @return string|null + */ + public function getEndPeriodName(): ?string + { + return $this->container['endPeriodName']; + } + + /** + * Sets endPeriodName + * + * @param string|null $endPeriodName endPeriodName + * + * @return $this + */ + public function setEndPeriodName(?string $endPeriodName): static + { + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cisLines', $nullablesSetToNull); + $index = array_search('endPeriodName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cisLines'] = $cisLines; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets employer + * Gets forCis * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getForCis(): ?bool { - return $this->container['employer']; + return $this->container['forCis']; } /** - * Sets employer + * Sets forCis * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param bool|null $forCis forCis * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setForCis(?bool $forCis): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($forCis)) { + throw new InvalidArgumentException('non-nullable forCis cannot be null'); } - $this->container['employer'] = $employer; + $this->container['forCis'] = $forCis; return $this; } /** - * Gets payPeriod + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return bool|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getIsDraft(): ?bool { - return $this->container['payPeriod']; + return $this->container['isDraft']; } /** - * Sets payPeriod + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param bool|null $isDraft isDraft * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['payPeriod'] = $payPeriod; + $this->container['isDraft'] = $isDraft; + + return $this; + } + + /** + * Gets lines + * + * @return \SynergiTech\Staffology\Model\GrossToNetReportLine[]|null + */ + public function getLines(): ?array + { + return $this->container['lines']; + } + + /** + * Sets lines + * + * @param \SynergiTech\Staffology\Model\GrossToNetReportLine[]|null $lines lines + * + * @return $this + */ + public function setLines(?array $lines): static + { + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['lines'] = $lines; return $this; } @@ -569,6 +637,33 @@ public function setOrdinal(?int $ordinal): static return $this; } + /** + * Gets payPeriod + * + * @return \SynergiTech\Staffology\Model\PayPeriods|null + */ + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + { + return $this->container['payPeriod']; + } + + /** + * Sets payPeriod + * + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * + * @return $this + */ + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + { + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + } + $this->container['payPeriod'] = $payPeriod; + + return $this; + } + /** * Gets period * @@ -624,69 +719,28 @@ public function setPeriodTo(?int $periodTo): static } /** - * Gets startPeriodName - * - * @return string|null - */ - public function getStartPeriodName(): ?string - { - return $this->container['startPeriodName']; - } - - /** - * Sets startPeriodName - * - * @param string|null $startPeriodName startPeriodName - * - * @return $this - */ - public function setStartPeriodName(?string $startPeriodName): static - { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['startPeriodName'] = $startPeriodName; - - return $this; - } - - /** - * Gets endPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getEndPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['endPeriodName']; + return $this->container['report']; } /** - * Sets endPeriodName + * Sets report * - * @param string|null $endPeriodName endPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['report'] = $report; return $this; } @@ -719,55 +773,35 @@ public function setStartDate(?\DateTime $startDate): static } /** - * Gets endDate - * - * @return \DateTime|null - */ - public function getEndDate(): ?\DateTime - { - return $this->container['endDate']; - } - - /** - * Sets endDate - * - * @param \DateTime|null $endDate endDate - * - * @return $this - */ - public function setEndDate(?\DateTime $endDate): static - { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); - } - $this->container['endDate'] = $endDate; - - return $this; - } - - /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -834,28 +868,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/GrossToNetReportCisLine.php b/src/Model/GrossToNetReportCisLine.php index 721abcc..1da5620 100644 --- a/src/Model/GrossToNetReportCisLine.php +++ b/src/Model/GrossToNetReportCisLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,18 +59,18 @@ class GrossToNetReportCisLine implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ - 'employee' => '\SynergiTech\Staffology\Model\Item', - 'payrollCode' => 'string', + 'cisDeduction' => 'float', 'department' => 'string', - 'totalGross' => 'float', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'labour' => 'float', + 'lastName' => 'string', 'materials' => 'float', + 'payment' => 'float', + 'payrollCode' => 'string', 'taxableGross' => 'float', - 'cisDeduction' => 'float', + 'totalGross' => 'float', 'umbrellaFee' => 'float', - 'vat' => 'float', - 'payment' => 'float', - 'lastName' => 'string' + 'vat' => 'float' ]; /** @@ -79,18 +79,18 @@ class GrossToNetReportCisLine implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ - 'employee' => null, - 'payrollCode' => null, + 'cisDeduction' => 'double', 'department' => null, - 'totalGross' => 'double', + 'employee' => null, 'labour' => 'double', + 'lastName' => null, 'materials' => 'double', + 'payment' => 'double', + 'payrollCode' => null, 'taxableGross' => 'double', - 'cisDeduction' => 'double', + 'totalGross' => 'double', 'umbrellaFee' => 'double', - 'vat' => 'double', - 'payment' => 'double', - 'lastName' => null + 'vat' => 'double' ]; /** @@ -99,18 +99,18 @@ class GrossToNetReportCisLine implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ - 'employee' => false, - 'payrollCode' => true, + 'cisDeduction' => false, 'department' => true, - 'totalGross' => false, + 'employee' => false, 'labour' => false, + 'lastName' => true, 'materials' => false, + 'payment' => false, + 'payrollCode' => true, 'taxableGross' => false, - 'cisDeduction' => false, + 'totalGross' => false, 'umbrellaFee' => false, - 'vat' => false, - 'payment' => false, - 'lastName' => true + 'vat' => false ]; /** @@ -199,18 +199,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employee' => 'employee', - 'payrollCode' => 'payrollCode', + 'cisDeduction' => 'cisDeduction', 'department' => 'department', - 'totalGross' => 'totalGross', + 'employee' => 'employee', 'labour' => 'labour', + 'lastName' => 'lastName', 'materials' => 'materials', + 'payment' => 'payment', + 'payrollCode' => 'payrollCode', 'taxableGross' => 'taxableGross', - 'cisDeduction' => 'cisDeduction', + 'totalGross' => 'totalGross', 'umbrellaFee' => 'umbrellaFee', - 'vat' => 'vat', - 'payment' => 'payment', - 'lastName' => 'lastName' + 'vat' => 'vat' ]; /** @@ -219,18 +219,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employee' => 'setEmployee', - 'payrollCode' => 'setPayrollCode', + 'cisDeduction' => 'setCisDeduction', 'department' => 'setDepartment', - 'totalGross' => 'setTotalGross', + 'employee' => 'setEmployee', 'labour' => 'setLabour', + 'lastName' => 'setLastName', 'materials' => 'setMaterials', + 'payment' => 'setPayment', + 'payrollCode' => 'setPayrollCode', 'taxableGross' => 'setTaxableGross', - 'cisDeduction' => 'setCisDeduction', + 'totalGross' => 'setTotalGross', 'umbrellaFee' => 'setUmbrellaFee', - 'vat' => 'setVat', - 'payment' => 'setPayment', - 'lastName' => 'setLastName' + 'vat' => 'setVat' ]; /** @@ -239,18 +239,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employee' => 'getEmployee', - 'payrollCode' => 'getPayrollCode', + 'cisDeduction' => 'getCisDeduction', 'department' => 'getDepartment', - 'totalGross' => 'getTotalGross', + 'employee' => 'getEmployee', 'labour' => 'getLabour', + 'lastName' => 'getLastName', 'materials' => 'getMaterials', + 'payment' => 'getPayment', + 'payrollCode' => 'getPayrollCode', 'taxableGross' => 'getTaxableGross', - 'cisDeduction' => 'getCisDeduction', + 'totalGross' => 'getTotalGross', 'umbrellaFee' => 'getUmbrellaFee', - 'vat' => 'getVat', - 'payment' => 'getPayment', - 'lastName' => 'getLastName' + 'vat' => 'getVat' ]; /** @@ -309,18 +309,18 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('cisDeduction', $data ?? [], null); $this->setIfExists('department', $data ?? [], null); - $this->setIfExists('totalGross', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('labour', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('materials', $data ?? [], null); + $this->setIfExists('payment', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('taxableGross', $data ?? [], null); - $this->setIfExists('cisDeduction', $data ?? [], null); + $this->setIfExists('totalGross', $data ?? [], null); $this->setIfExists('umbrellaFee', $data ?? [], null); $this->setIfExists('vat', $data ?? [], null); - $this->setIfExists('payment', $data ?? [], null); - $this->setIfExists('lastName', $data ?? [], null); } /** @@ -366,62 +366,28 @@ public function valid(): bool /** - * Gets employee - * - * @return \SynergiTech\Staffology\Model\Item|null - */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item - { - return $this->container['employee']; - } - - /** - * Sets employee - * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee - * - * @return $this - */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static - { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); - } - $this->container['employee'] = $employee; - - return $this; - } - - /** - * Gets payrollCode + * Gets cisDeduction * - * @return string|null + * @return float|null */ - public function getPayrollCode(): ?string + public function getCisDeduction(): ?float { - return $this->container['payrollCode']; + return $this->container['cisDeduction']; } /** - * Sets payrollCode + * Sets cisDeduction * - * @param string|null $payrollCode payrollCode + * @param float|null $cisDeduction cisDeduction * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setCisDeduction(?float $cisDeduction): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($cisDeduction)) { + throw new InvalidArgumentException('non-nullable cisDeduction cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['cisDeduction'] = $cisDeduction; return $this; } @@ -461,28 +427,28 @@ public function setDepartment(?string $department): static } /** - * Gets totalGross + * Gets employee * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getTotalGross(): ?float + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['totalGross']; + return $this->container['employee']; } /** - * Sets totalGross + * Sets employee * - * @param float|null $totalGross totalGross + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setTotalGross(?float $totalGross): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($totalGross)) { - throw new InvalidArgumentException('non-nullable totalGross cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['totalGross'] = $totalGross; + $this->container['employee'] = $employee; return $this; } @@ -514,6 +480,40 @@ public function setLabour(?float $labour): static return $this; } + /** + * Gets lastName + * + * @return string|null + */ + public function getLastName(): ?string + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string|null $lastName lastName + * + * @return $this + */ + public function setLastName(?string $lastName): static + { + if (is_null($lastName)) { + array_push($this->openAPINullablesSetToNull, 'lastName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lastName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['lastName'] = $lastName; + + return $this; + } + /** * Gets materials * @@ -542,170 +542,170 @@ public function setMaterials(?float $materials): static } /** - * Gets taxableGross + * Gets payment * * @return float|null */ - public function getTaxableGross(): ?float + public function getPayment(): ?float { - return $this->container['taxableGross']; + return $this->container['payment']; } /** - * Sets taxableGross + * Sets payment * - * @param float|null $taxableGross taxableGross + * @param float|null $payment payment * * @return $this */ - public function setTaxableGross(?float $taxableGross): static + public function setPayment(?float $payment): static { - if (is_null($taxableGross)) { - throw new InvalidArgumentException('non-nullable taxableGross cannot be null'); + if (is_null($payment)) { + throw new InvalidArgumentException('non-nullable payment cannot be null'); } - $this->container['taxableGross'] = $taxableGross; + $this->container['payment'] = $payment; return $this; } /** - * Gets cisDeduction + * Gets payrollCode * - * @return float|null + * @return string|null */ - public function getCisDeduction(): ?float + public function getPayrollCode(): ?string { - return $this->container['cisDeduction']; + return $this->container['payrollCode']; } /** - * Sets cisDeduction + * Sets payrollCode * - * @param float|null $cisDeduction cisDeduction + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setCisDeduction(?float $cisDeduction): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($cisDeduction)) { - throw new InvalidArgumentException('non-nullable cisDeduction cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['cisDeduction'] = $cisDeduction; + $this->container['payrollCode'] = $payrollCode; return $this; } /** - * Gets umbrellaFee + * Gets taxableGross * * @return float|null */ - public function getUmbrellaFee(): ?float + public function getTaxableGross(): ?float { - return $this->container['umbrellaFee']; + return $this->container['taxableGross']; } /** - * Sets umbrellaFee + * Sets taxableGross * - * @param float|null $umbrellaFee umbrellaFee + * @param float|null $taxableGross taxableGross * * @return $this */ - public function setUmbrellaFee(?float $umbrellaFee): static + public function setTaxableGross(?float $taxableGross): static { - if (is_null($umbrellaFee)) { - throw new InvalidArgumentException('non-nullable umbrellaFee cannot be null'); + if (is_null($taxableGross)) { + throw new InvalidArgumentException('non-nullable taxableGross cannot be null'); } - $this->container['umbrellaFee'] = $umbrellaFee; + $this->container['taxableGross'] = $taxableGross; return $this; } /** - * Gets vat + * Gets totalGross * * @return float|null */ - public function getVat(): ?float + public function getTotalGross(): ?float { - return $this->container['vat']; + return $this->container['totalGross']; } /** - * Sets vat + * Sets totalGross * - * @param float|null $vat vat + * @param float|null $totalGross totalGross * * @return $this */ - public function setVat(?float $vat): static + public function setTotalGross(?float $totalGross): static { - if (is_null($vat)) { - throw new InvalidArgumentException('non-nullable vat cannot be null'); + if (is_null($totalGross)) { + throw new InvalidArgumentException('non-nullable totalGross cannot be null'); } - $this->container['vat'] = $vat; + $this->container['totalGross'] = $totalGross; return $this; } /** - * Gets payment + * Gets umbrellaFee * * @return float|null */ - public function getPayment(): ?float + public function getUmbrellaFee(): ?float { - return $this->container['payment']; + return $this->container['umbrellaFee']; } /** - * Sets payment + * Sets umbrellaFee * - * @param float|null $payment payment + * @param float|null $umbrellaFee umbrellaFee * * @return $this */ - public function setPayment(?float $payment): static + public function setUmbrellaFee(?float $umbrellaFee): static { - if (is_null($payment)) { - throw new InvalidArgumentException('non-nullable payment cannot be null'); + if (is_null($umbrellaFee)) { + throw new InvalidArgumentException('non-nullable umbrellaFee cannot be null'); } - $this->container['payment'] = $payment; + $this->container['umbrellaFee'] = $umbrellaFee; return $this; } /** - * Gets lastName + * Gets vat * - * @return string|null + * @return float|null */ - public function getLastName(): ?string + public function getVat(): ?float { - return $this->container['lastName']; + return $this->container['vat']; } /** - * Sets lastName + * Sets vat * - * @param string|null $lastName lastName + * @param float|null $vat vat * * @return $this */ - public function setLastName(?string $lastName): static + public function setVat(?float $vat): static { - if (is_null($lastName)) { - array_push($this->openAPINullablesSetToNull, 'lastName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($vat)) { + throw new InvalidArgumentException('non-nullable vat cannot be null'); } - $this->container['lastName'] = $lastName; + $this->container['vat'] = $vat; return $this; } diff --git a/src/Model/GrossToNetReportLine.php b/src/Model/GrossToNetReportLine.php index 52a3136..d80c3ef 100644 --- a/src/Model/GrossToNetReportLine.php +++ b/src/Model/GrossToNetReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,25 +59,25 @@ class GrossToNetReportLine implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPITypes = [ - 'niNumber' => 'string', - 'totalGross' => 'float', - 'taxableGross' => 'float', - 'netPay' => 'float', - 'tax' => 'float', + 'attachments' => 'float', + 'department' => 'string', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'employeeNi' => 'float', - 'employerNi' => 'float', 'employeePension' => 'float', + 'employerNi' => 'float', 'employerPension' => 'float', - 'studentOrPgLoan' => 'float', - 'statutoryPayments' => 'float', - 'attachments' => 'float', - 'otherDeductions' => 'float', - 'lastName' => 'string', - 'isNewStarter' => 'bool', 'isLeaver' => 'bool', - 'employee' => '\SynergiTech\Staffology\Model\Item', + 'isNewStarter' => 'bool', + 'lastName' => 'string', + 'netPay' => 'float', + 'niNumber' => 'string', + 'otherDeductions' => 'float', 'payrollCode' => 'string', - 'department' => 'string' + 'statutoryPayments' => 'float', + 'studentOrPgLoan' => 'float', + 'tax' => 'float', + 'taxableGross' => 'float', + 'totalGross' => 'float' ]; /** @@ -86,25 +86,25 @@ class GrossToNetReportLine implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPIFormats = [ - 'niNumber' => null, - 'totalGross' => 'double', - 'taxableGross' => 'double', - 'netPay' => 'double', - 'tax' => 'double', + 'attachments' => 'double', + 'department' => null, + 'employee' => null, 'employeeNi' => 'double', - 'employerNi' => 'double', 'employeePension' => 'double', + 'employerNi' => 'double', 'employerPension' => 'double', - 'studentOrPgLoan' => 'double', - 'statutoryPayments' => 'double', - 'attachments' => 'double', - 'otherDeductions' => 'double', - 'lastName' => null, - 'isNewStarter' => null, 'isLeaver' => null, - 'employee' => null, + 'isNewStarter' => null, + 'lastName' => null, + 'netPay' => 'double', + 'niNumber' => null, + 'otherDeductions' => 'double', 'payrollCode' => null, - 'department' => null + 'statutoryPayments' => 'double', + 'studentOrPgLoan' => 'double', + 'tax' => 'double', + 'taxableGross' => 'double', + 'totalGross' => 'double' ]; /** @@ -113,25 +113,25 @@ class GrossToNetReportLine implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPINullables = [ - 'niNumber' => true, - 'totalGross' => false, - 'taxableGross' => false, - 'netPay' => false, - 'tax' => false, + 'attachments' => false, + 'department' => true, + 'employee' => false, 'employeeNi' => false, - 'employerNi' => false, 'employeePension' => false, + 'employerNi' => false, 'employerPension' => false, - 'studentOrPgLoan' => false, - 'statutoryPayments' => false, - 'attachments' => false, - 'otherDeductions' => false, - 'lastName' => true, - 'isNewStarter' => false, 'isLeaver' => false, - 'employee' => false, + 'isNewStarter' => false, + 'lastName' => true, + 'netPay' => false, + 'niNumber' => true, + 'otherDeductions' => false, 'payrollCode' => true, - 'department' => true + 'statutoryPayments' => false, + 'studentOrPgLoan' => false, + 'tax' => false, + 'taxableGross' => false, + 'totalGross' => false ]; /** @@ -220,25 +220,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'niNumber' => 'niNumber', - 'totalGross' => 'totalGross', - 'taxableGross' => 'taxableGross', - 'netPay' => 'netPay', - 'tax' => 'tax', + 'attachments' => 'attachments', + 'department' => 'department', + 'employee' => 'employee', 'employeeNi' => 'employeeNi', - 'employerNi' => 'employerNi', 'employeePension' => 'employeePension', + 'employerNi' => 'employerNi', 'employerPension' => 'employerPension', - 'studentOrPgLoan' => 'studentOrPgLoan', - 'statutoryPayments' => 'statutoryPayments', - 'attachments' => 'attachments', - 'otherDeductions' => 'otherDeductions', - 'lastName' => 'lastName', - 'isNewStarter' => 'isNewStarter', 'isLeaver' => 'isLeaver', - 'employee' => 'employee', + 'isNewStarter' => 'isNewStarter', + 'lastName' => 'lastName', + 'netPay' => 'netPay', + 'niNumber' => 'niNumber', + 'otherDeductions' => 'otherDeductions', 'payrollCode' => 'payrollCode', - 'department' => 'department' + 'statutoryPayments' => 'statutoryPayments', + 'studentOrPgLoan' => 'studentOrPgLoan', + 'tax' => 'tax', + 'taxableGross' => 'taxableGross', + 'totalGross' => 'totalGross' ]; /** @@ -247,25 +247,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'niNumber' => 'setNiNumber', - 'totalGross' => 'setTotalGross', - 'taxableGross' => 'setTaxableGross', - 'netPay' => 'setNetPay', - 'tax' => 'setTax', + 'attachments' => 'setAttachments', + 'department' => 'setDepartment', + 'employee' => 'setEmployee', 'employeeNi' => 'setEmployeeNi', - 'employerNi' => 'setEmployerNi', 'employeePension' => 'setEmployeePension', + 'employerNi' => 'setEmployerNi', 'employerPension' => 'setEmployerPension', - 'studentOrPgLoan' => 'setStudentOrPgLoan', - 'statutoryPayments' => 'setStatutoryPayments', - 'attachments' => 'setAttachments', - 'otherDeductions' => 'setOtherDeductions', - 'lastName' => 'setLastName', - 'isNewStarter' => 'setIsNewStarter', 'isLeaver' => 'setIsLeaver', - 'employee' => 'setEmployee', + 'isNewStarter' => 'setIsNewStarter', + 'lastName' => 'setLastName', + 'netPay' => 'setNetPay', + 'niNumber' => 'setNiNumber', + 'otherDeductions' => 'setOtherDeductions', 'payrollCode' => 'setPayrollCode', - 'department' => 'setDepartment' + 'statutoryPayments' => 'setStatutoryPayments', + 'studentOrPgLoan' => 'setStudentOrPgLoan', + 'tax' => 'setTax', + 'taxableGross' => 'setTaxableGross', + 'totalGross' => 'setTotalGross' ]; /** @@ -274,25 +274,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'niNumber' => 'getNiNumber', - 'totalGross' => 'getTotalGross', - 'taxableGross' => 'getTaxableGross', - 'netPay' => 'getNetPay', - 'tax' => 'getTax', + 'attachments' => 'getAttachments', + 'department' => 'getDepartment', + 'employee' => 'getEmployee', 'employeeNi' => 'getEmployeeNi', - 'employerNi' => 'getEmployerNi', 'employeePension' => 'getEmployeePension', + 'employerNi' => 'getEmployerNi', 'employerPension' => 'getEmployerPension', - 'studentOrPgLoan' => 'getStudentOrPgLoan', - 'statutoryPayments' => 'getStatutoryPayments', - 'attachments' => 'getAttachments', - 'otherDeductions' => 'getOtherDeductions', - 'lastName' => 'getLastName', - 'isNewStarter' => 'getIsNewStarter', 'isLeaver' => 'getIsLeaver', - 'employee' => 'getEmployee', + 'isNewStarter' => 'getIsNewStarter', + 'lastName' => 'getLastName', + 'netPay' => 'getNetPay', + 'niNumber' => 'getNiNumber', + 'otherDeductions' => 'getOtherDeductions', 'payrollCode' => 'getPayrollCode', - 'department' => 'getDepartment' + 'statutoryPayments' => 'getStatutoryPayments', + 'studentOrPgLoan' => 'getStudentOrPgLoan', + 'tax' => 'getTax', + 'taxableGross' => 'getTaxableGross', + 'totalGross' => 'getTotalGross' ]; /** @@ -351,25 +351,25 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('niNumber', $data ?? [], null); - $this->setIfExists('totalGross', $data ?? [], null); - $this->setIfExists('taxableGross', $data ?? [], null); - $this->setIfExists('netPay', $data ?? [], null); - $this->setIfExists('tax', $data ?? [], null); + $this->setIfExists('attachments', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('employeeNi', $data ?? [], null); - $this->setIfExists('employerNi', $data ?? [], null); $this->setIfExists('employeePension', $data ?? [], null); + $this->setIfExists('employerNi', $data ?? [], null); $this->setIfExists('employerPension', $data ?? [], null); - $this->setIfExists('studentOrPgLoan', $data ?? [], null); - $this->setIfExists('statutoryPayments', $data ?? [], null); - $this->setIfExists('attachments', $data ?? [], null); - $this->setIfExists('otherDeductions', $data ?? [], null); - $this->setIfExists('lastName', $data ?? [], null); - $this->setIfExists('isNewStarter', $data ?? [], null); $this->setIfExists('isLeaver', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('isNewStarter', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('netPay', $data ?? [], null); + $this->setIfExists('niNumber', $data ?? [], null); + $this->setIfExists('otherDeductions', $data ?? [], null); $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('statutoryPayments', $data ?? [], null); + $this->setIfExists('studentOrPgLoan', $data ?? [], null); + $this->setIfExists('tax', $data ?? [], null); + $this->setIfExists('taxableGross', $data ?? [], null); + $this->setIfExists('totalGross', $data ?? [], null); } /** @@ -415,332 +415,346 @@ public function valid(): bool /** - * Gets niNumber + * Gets attachments * - * @return string|null + * @return float|null */ - public function getNiNumber(): ?string + public function getAttachments(): ?float { - return $this->container['niNumber']; + return $this->container['attachments']; } /** - * Sets niNumber + * Sets attachments * - * @param string|null $niNumber niNumber + * @param float|null $attachments attachments * * @return $this */ - public function setNiNumber(?string $niNumber): static + public function setAttachments(?float $attachments): static { - if (is_null($niNumber)) { - array_push($this->openAPINullablesSetToNull, 'niNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($attachments)) { + throw new InvalidArgumentException('non-nullable attachments cannot be null'); } - $this->container['niNumber'] = $niNumber; + $this->container['attachments'] = $attachments; return $this; } /** - * Gets totalGross + * Gets department * - * @return float|null + * @return string|null */ - public function getTotalGross(): ?float + public function getDepartment(): ?string { - return $this->container['totalGross']; + return $this->container['department']; } /** - * Sets totalGross + * Sets department * - * @param float|null $totalGross totalGross + * @param string|null $department department * * @return $this */ - public function setTotalGross(?float $totalGross): static + public function setDepartment(?string $department): static { - if (is_null($totalGross)) { - throw new InvalidArgumentException('non-nullable totalGross cannot be null'); + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('department', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['totalGross'] = $totalGross; + $this->container['department'] = $department; return $this; } /** - * Gets taxableGross + * Gets employee * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getTaxableGross(): ?float + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['taxableGross']; + return $this->container['employee']; } /** - * Sets taxableGross + * Sets employee * - * @param float|null $taxableGross taxableGross + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setTaxableGross(?float $taxableGross): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($taxableGross)) { - throw new InvalidArgumentException('non-nullable taxableGross cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['taxableGross'] = $taxableGross; + $this->container['employee'] = $employee; return $this; } /** - * Gets netPay + * Gets employeeNi * * @return float|null */ - public function getNetPay(): ?float + public function getEmployeeNi(): ?float { - return $this->container['netPay']; + return $this->container['employeeNi']; } /** - * Sets netPay + * Sets employeeNi * - * @param float|null $netPay netPay + * @param float|null $employeeNi employeeNi * * @return $this */ - public function setNetPay(?float $netPay): static + public function setEmployeeNi(?float $employeeNi): static { - if (is_null($netPay)) { - throw new InvalidArgumentException('non-nullable netPay cannot be null'); + if (is_null($employeeNi)) { + throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); } - $this->container['netPay'] = $netPay; + $this->container['employeeNi'] = $employeeNi; return $this; } /** - * Gets tax + * Gets employeePension * * @return float|null */ - public function getTax(): ?float + public function getEmployeePension(): ?float { - return $this->container['tax']; + return $this->container['employeePension']; } /** - * Sets tax + * Sets employeePension * - * @param float|null $tax tax + * @param float|null $employeePension employeePension * * @return $this */ - public function setTax(?float $tax): static + public function setEmployeePension(?float $employeePension): static { - if (is_null($tax)) { - throw new InvalidArgumentException('non-nullable tax cannot be null'); + if (is_null($employeePension)) { + throw new InvalidArgumentException('non-nullable employeePension cannot be null'); } - $this->container['tax'] = $tax; + $this->container['employeePension'] = $employeePension; return $this; } /** - * Gets employeeNi + * Gets employerNi * * @return float|null */ - public function getEmployeeNi(): ?float + public function getEmployerNi(): ?float { - return $this->container['employeeNi']; + return $this->container['employerNi']; } /** - * Sets employeeNi + * Sets employerNi * - * @param float|null $employeeNi employeeNi + * @param float|null $employerNi employerNi * * @return $this */ - public function setEmployeeNi(?float $employeeNi): static + public function setEmployerNi(?float $employerNi): static { - if (is_null($employeeNi)) { - throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); + if (is_null($employerNi)) { + throw new InvalidArgumentException('non-nullable employerNi cannot be null'); } - $this->container['employeeNi'] = $employeeNi; + $this->container['employerNi'] = $employerNi; return $this; } /** - * Gets employerNi + * Gets employerPension * * @return float|null */ - public function getEmployerNi(): ?float + public function getEmployerPension(): ?float { - return $this->container['employerNi']; + return $this->container['employerPension']; } /** - * Sets employerNi + * Sets employerPension * - * @param float|null $employerNi employerNi + * @param float|null $employerPension employerPension * * @return $this */ - public function setEmployerNi(?float $employerNi): static + public function setEmployerPension(?float $employerPension): static { - if (is_null($employerNi)) { - throw new InvalidArgumentException('non-nullable employerNi cannot be null'); + if (is_null($employerPension)) { + throw new InvalidArgumentException('non-nullable employerPension cannot be null'); } - $this->container['employerNi'] = $employerNi; + $this->container['employerPension'] = $employerPension; return $this; } /** - * Gets employeePension + * Gets isLeaver * - * @return float|null + * @return bool|null */ - public function getEmployeePension(): ?float + public function getIsLeaver(): ?bool { - return $this->container['employeePension']; + return $this->container['isLeaver']; } /** - * Sets employeePension + * Sets isLeaver * - * @param float|null $employeePension employeePension + * @param bool|null $isLeaver isLeaver * * @return $this */ - public function setEmployeePension(?float $employeePension): static + public function setIsLeaver(?bool $isLeaver): static { - if (is_null($employeePension)) { - throw new InvalidArgumentException('non-nullable employeePension cannot be null'); + if (is_null($isLeaver)) { + throw new InvalidArgumentException('non-nullable isLeaver cannot be null'); } - $this->container['employeePension'] = $employeePension; + $this->container['isLeaver'] = $isLeaver; return $this; } /** - * Gets employerPension + * Gets isNewStarter * - * @return float|null + * @return bool|null */ - public function getEmployerPension(): ?float + public function getIsNewStarter(): ?bool { - return $this->container['employerPension']; + return $this->container['isNewStarter']; } /** - * Sets employerPension + * Sets isNewStarter * - * @param float|null $employerPension employerPension + * @param bool|null $isNewStarter isNewStarter * * @return $this */ - public function setEmployerPension(?float $employerPension): static + public function setIsNewStarter(?bool $isNewStarter): static { - if (is_null($employerPension)) { - throw new InvalidArgumentException('non-nullable employerPension cannot be null'); + if (is_null($isNewStarter)) { + throw new InvalidArgumentException('non-nullable isNewStarter cannot be null'); } - $this->container['employerPension'] = $employerPension; + $this->container['isNewStarter'] = $isNewStarter; return $this; } /** - * Gets studentOrPgLoan + * Gets lastName * - * @return float|null + * @return string|null */ - public function getStudentOrPgLoan(): ?float + public function getLastName(): ?string { - return $this->container['studentOrPgLoan']; + return $this->container['lastName']; } /** - * Sets studentOrPgLoan + * Sets lastName * - * @param float|null $studentOrPgLoan studentOrPgLoan + * @param string|null $lastName lastName * * @return $this */ - public function setStudentOrPgLoan(?float $studentOrPgLoan): static + public function setLastName(?string $lastName): static { - if (is_null($studentOrPgLoan)) { - throw new InvalidArgumentException('non-nullable studentOrPgLoan cannot be null'); + if (is_null($lastName)) { + array_push($this->openAPINullablesSetToNull, 'lastName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lastName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['studentOrPgLoan'] = $studentOrPgLoan; + $this->container['lastName'] = $lastName; return $this; } /** - * Gets statutoryPayments + * Gets netPay * * @return float|null */ - public function getStatutoryPayments(): ?float + public function getNetPay(): ?float { - return $this->container['statutoryPayments']; + return $this->container['netPay']; } /** - * Sets statutoryPayments + * Sets netPay * - * @param float|null $statutoryPayments statutoryPayments + * @param float|null $netPay netPay * * @return $this */ - public function setStatutoryPayments(?float $statutoryPayments): static + public function setNetPay(?float $netPay): static { - if (is_null($statutoryPayments)) { - throw new InvalidArgumentException('non-nullable statutoryPayments cannot be null'); + if (is_null($netPay)) { + throw new InvalidArgumentException('non-nullable netPay cannot be null'); } - $this->container['statutoryPayments'] = $statutoryPayments; + $this->container['netPay'] = $netPay; return $this; } /** - * Gets attachments + * Gets niNumber * - * @return float|null + * @return string|null */ - public function getAttachments(): ?float + public function getNiNumber(): ?string { - return $this->container['attachments']; + return $this->container['niNumber']; } /** - * Sets attachments + * Sets niNumber * - * @param float|null $attachments attachments + * @param string|null $niNumber niNumber * * @return $this */ - public function setAttachments(?float $attachments): static + public function setNiNumber(?string $niNumber): static { - if (is_null($attachments)) { - throw new InvalidArgumentException('non-nullable attachments cannot be null'); + if (is_null($niNumber)) { + array_push($this->openAPINullablesSetToNull, 'niNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('niNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['attachments'] = $attachments; + $this->container['niNumber'] = $niNumber; return $this; } @@ -773,184 +787,170 @@ public function setOtherDeductions(?float $otherDeductions): static } /** - * Gets lastName + * Gets payrollCode * * @return string|null */ - public function getLastName(): ?string + public function getPayrollCode(): ?string { - return $this->container['lastName']; + return $this->container['payrollCode']; } /** - * Sets lastName + * Sets payrollCode * - * @param string|null $lastName lastName + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setLastName(?string $lastName): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($lastName)) { - array_push($this->openAPINullablesSetToNull, 'lastName'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastName', $nullablesSetToNull); + $index = array_search('payrollCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lastName'] = $lastName; + $this->container['payrollCode'] = $payrollCode; return $this; } /** - * Gets isNewStarter + * Gets statutoryPayments * - * @return bool|null + * @return float|null */ - public function getIsNewStarter(): ?bool + public function getStatutoryPayments(): ?float { - return $this->container['isNewStarter']; + return $this->container['statutoryPayments']; } /** - * Sets isNewStarter + * Sets statutoryPayments * - * @param bool|null $isNewStarter isNewStarter + * @param float|null $statutoryPayments statutoryPayments * * @return $this */ - public function setIsNewStarter(?bool $isNewStarter): static + public function setStatutoryPayments(?float $statutoryPayments): static { - if (is_null($isNewStarter)) { - throw new InvalidArgumentException('non-nullable isNewStarter cannot be null'); + if (is_null($statutoryPayments)) { + throw new InvalidArgumentException('non-nullable statutoryPayments cannot be null'); } - $this->container['isNewStarter'] = $isNewStarter; + $this->container['statutoryPayments'] = $statutoryPayments; return $this; } /** - * Gets isLeaver + * Gets studentOrPgLoan * - * @return bool|null + * @return float|null */ - public function getIsLeaver(): ?bool + public function getStudentOrPgLoan(): ?float { - return $this->container['isLeaver']; + return $this->container['studentOrPgLoan']; } /** - * Sets isLeaver + * Sets studentOrPgLoan * - * @param bool|null $isLeaver isLeaver + * @param float|null $studentOrPgLoan studentOrPgLoan * * @return $this */ - public function setIsLeaver(?bool $isLeaver): static + public function setStudentOrPgLoan(?float $studentOrPgLoan): static { - if (is_null($isLeaver)) { - throw new InvalidArgumentException('non-nullable isLeaver cannot be null'); + if (is_null($studentOrPgLoan)) { + throw new InvalidArgumentException('non-nullable studentOrPgLoan cannot be null'); } - $this->container['isLeaver'] = $isLeaver; + $this->container['studentOrPgLoan'] = $studentOrPgLoan; return $this; } /** - * Gets employee + * Gets tax * - * @return \SynergiTech\Staffology\Model\Item|null + * @return float|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getTax(): ?float { - return $this->container['employee']; + return $this->container['tax']; } /** - * Sets employee + * Sets tax * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param float|null $tax tax * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setTax(?float $tax): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($tax)) { + throw new InvalidArgumentException('non-nullable tax cannot be null'); } - $this->container['employee'] = $employee; + $this->container['tax'] = $tax; return $this; } /** - * Gets payrollCode + * Gets taxableGross * - * @return string|null + * @return float|null */ - public function getPayrollCode(): ?string + public function getTaxableGross(): ?float { - return $this->container['payrollCode']; + return $this->container['taxableGross']; } /** - * Sets payrollCode + * Sets taxableGross * - * @param string|null $payrollCode payrollCode + * @param float|null $taxableGross taxableGross * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setTaxableGross(?float $taxableGross): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($taxableGross)) { + throw new InvalidArgumentException('non-nullable taxableGross cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['taxableGross'] = $taxableGross; return $this; } /** - * Gets department + * Gets totalGross * - * @return string|null + * @return float|null */ - public function getDepartment(): ?string + public function getTotalGross(): ?float { - return $this->container['department']; + return $this->container['totalGross']; } /** - * Sets department + * Sets totalGross * - * @param string|null $department department + * @param float|null $totalGross totalGross * * @return $this */ - public function setDepartment(?string $department): static + public function setTotalGross(?float $totalGross): static { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($totalGross)) { + throw new InvalidArgumentException('non-nullable totalGross cannot be null'); } - $this->container['department'] = $department; + $this->container['totalGross'] = $totalGross; return $this; } diff --git a/src/Model/GrossToNetReportReportResponse.php b/src/Model/GrossToNetReportReportResponse.php index f9efc2e..e6540e0 100644 --- a/src/Model/GrossToNetReportReportResponse.php +++ b/src/Model/GrossToNetReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class GrossToNetReportReportResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\GrossToNetReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class GrossToNetReportReportResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class GrossToNetReportReportResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/HmrcDetails.php b/src/Model/HmrcDetails.php index 0fde512..9e62d46 100644 --- a/src/Model/HmrcDetails.php +++ b/src/Model/HmrcDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,23 +59,23 @@ class HmrcDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'officeNumber' => 'string', - 'payeReference' => 'string', 'accountsOfficeReference' => 'string', - 'econ' => 'string', - 'utr' => 'string', + 'apprenticeshipLevy' => 'bool', + 'apprenticeshipLevyAllowance' => 'float', + 'carryForwardUnpaidLiabilities' => 'bool', 'coTax' => 'string', + 'econ' => 'string', 'employmentAllowance' => 'bool', 'employmentAllowanceMaxClaim' => 'float', - 'smallEmployersRelief' => 'bool', - 'apprenticeshipLevy' => 'bool', - 'apprenticeshipLevyAllowance' => 'float', - 'quarterlyPaymentSchedule' => 'bool', + 'id' => 'string', 'includeEmploymentAllowanceOnMonthlyJournal' => 'bool', - 'carryForwardUnpaidLiabilities' => 'bool', - 'paymentDateRule' => '\SynergiTech\Staffology\Model\PaymentDateRule', + 'officeNumber' => 'string', + 'payeReference' => 'string', 'paymentDateDayOfMonth' => 'int', - 'id' => 'string' + 'paymentDateRule' => '\SynergiTech\Staffology\Model\PaymentDateRule', + 'quarterlyPaymentSchedule' => 'bool', + 'smallEmployersRelief' => 'bool', + 'utr' => 'string' ]; /** @@ -84,23 +84,23 @@ class HmrcDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'officeNumber' => null, - 'payeReference' => null, 'accountsOfficeReference' => null, - 'econ' => null, - 'utr' => null, + 'apprenticeshipLevy' => null, + 'apprenticeshipLevyAllowance' => 'double', + 'carryForwardUnpaidLiabilities' => null, 'coTax' => null, + 'econ' => null, 'employmentAllowance' => null, 'employmentAllowanceMaxClaim' => 'double', - 'smallEmployersRelief' => null, - 'apprenticeshipLevy' => null, - 'apprenticeshipLevyAllowance' => 'double', - 'quarterlyPaymentSchedule' => null, + 'id' => 'uuid', 'includeEmploymentAllowanceOnMonthlyJournal' => null, - 'carryForwardUnpaidLiabilities' => null, - 'paymentDateRule' => null, + 'officeNumber' => null, + 'payeReference' => null, 'paymentDateDayOfMonth' => 'int32', - 'id' => 'uuid' + 'paymentDateRule' => null, + 'quarterlyPaymentSchedule' => null, + 'smallEmployersRelief' => null, + 'utr' => null ]; /** @@ -109,23 +109,23 @@ class HmrcDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'officeNumber' => true, - 'payeReference' => true, 'accountsOfficeReference' => true, - 'econ' => true, - 'utr' => true, + 'apprenticeshipLevy' => false, + 'apprenticeshipLevyAllowance' => false, + 'carryForwardUnpaidLiabilities' => false, 'coTax' => true, + 'econ' => true, 'employmentAllowance' => false, 'employmentAllowanceMaxClaim' => false, - 'smallEmployersRelief' => false, - 'apprenticeshipLevy' => false, - 'apprenticeshipLevyAllowance' => false, - 'quarterlyPaymentSchedule' => false, + 'id' => false, 'includeEmploymentAllowanceOnMonthlyJournal' => false, - 'carryForwardUnpaidLiabilities' => false, - 'paymentDateRule' => false, + 'officeNumber' => true, + 'payeReference' => true, 'paymentDateDayOfMonth' => true, - 'id' => false + 'paymentDateRule' => false, + 'quarterlyPaymentSchedule' => false, + 'smallEmployersRelief' => false, + 'utr' => true ]; /** @@ -214,23 +214,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'officeNumber' => 'officeNumber', - 'payeReference' => 'payeReference', 'accountsOfficeReference' => 'accountsOfficeReference', - 'econ' => 'econ', - 'utr' => 'utr', + 'apprenticeshipLevy' => 'apprenticeshipLevy', + 'apprenticeshipLevyAllowance' => 'apprenticeshipLevyAllowance', + 'carryForwardUnpaidLiabilities' => 'carryForwardUnpaidLiabilities', 'coTax' => 'coTax', + 'econ' => 'econ', 'employmentAllowance' => 'employmentAllowance', 'employmentAllowanceMaxClaim' => 'employmentAllowanceMaxClaim', - 'smallEmployersRelief' => 'smallEmployersRelief', - 'apprenticeshipLevy' => 'apprenticeshipLevy', - 'apprenticeshipLevyAllowance' => 'apprenticeshipLevyAllowance', - 'quarterlyPaymentSchedule' => 'quarterlyPaymentSchedule', + 'id' => 'id', 'includeEmploymentAllowanceOnMonthlyJournal' => 'includeEmploymentAllowanceOnMonthlyJournal', - 'carryForwardUnpaidLiabilities' => 'carryForwardUnpaidLiabilities', - 'paymentDateRule' => 'paymentDateRule', + 'officeNumber' => 'officeNumber', + 'payeReference' => 'payeReference', 'paymentDateDayOfMonth' => 'paymentDateDayOfMonth', - 'id' => 'id' + 'paymentDateRule' => 'paymentDateRule', + 'quarterlyPaymentSchedule' => 'quarterlyPaymentSchedule', + 'smallEmployersRelief' => 'smallEmployersRelief', + 'utr' => 'utr' ]; /** @@ -239,23 +239,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'officeNumber' => 'setOfficeNumber', - 'payeReference' => 'setPayeReference', 'accountsOfficeReference' => 'setAccountsOfficeReference', - 'econ' => 'setEcon', - 'utr' => 'setUtr', + 'apprenticeshipLevy' => 'setApprenticeshipLevy', + 'apprenticeshipLevyAllowance' => 'setApprenticeshipLevyAllowance', + 'carryForwardUnpaidLiabilities' => 'setCarryForwardUnpaidLiabilities', 'coTax' => 'setCoTax', + 'econ' => 'setEcon', 'employmentAllowance' => 'setEmploymentAllowance', 'employmentAllowanceMaxClaim' => 'setEmploymentAllowanceMaxClaim', - 'smallEmployersRelief' => 'setSmallEmployersRelief', - 'apprenticeshipLevy' => 'setApprenticeshipLevy', - 'apprenticeshipLevyAllowance' => 'setApprenticeshipLevyAllowance', - 'quarterlyPaymentSchedule' => 'setQuarterlyPaymentSchedule', + 'id' => 'setId', 'includeEmploymentAllowanceOnMonthlyJournal' => 'setIncludeEmploymentAllowanceOnMonthlyJournal', - 'carryForwardUnpaidLiabilities' => 'setCarryForwardUnpaidLiabilities', - 'paymentDateRule' => 'setPaymentDateRule', + 'officeNumber' => 'setOfficeNumber', + 'payeReference' => 'setPayeReference', 'paymentDateDayOfMonth' => 'setPaymentDateDayOfMonth', - 'id' => 'setId' + 'paymentDateRule' => 'setPaymentDateRule', + 'quarterlyPaymentSchedule' => 'setQuarterlyPaymentSchedule', + 'smallEmployersRelief' => 'setSmallEmployersRelief', + 'utr' => 'setUtr' ]; /** @@ -264,23 +264,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'officeNumber' => 'getOfficeNumber', - 'payeReference' => 'getPayeReference', 'accountsOfficeReference' => 'getAccountsOfficeReference', - 'econ' => 'getEcon', - 'utr' => 'getUtr', + 'apprenticeshipLevy' => 'getApprenticeshipLevy', + 'apprenticeshipLevyAllowance' => 'getApprenticeshipLevyAllowance', + 'carryForwardUnpaidLiabilities' => 'getCarryForwardUnpaidLiabilities', 'coTax' => 'getCoTax', + 'econ' => 'getEcon', 'employmentAllowance' => 'getEmploymentAllowance', 'employmentAllowanceMaxClaim' => 'getEmploymentAllowanceMaxClaim', - 'smallEmployersRelief' => 'getSmallEmployersRelief', - 'apprenticeshipLevy' => 'getApprenticeshipLevy', - 'apprenticeshipLevyAllowance' => 'getApprenticeshipLevyAllowance', - 'quarterlyPaymentSchedule' => 'getQuarterlyPaymentSchedule', + 'id' => 'getId', 'includeEmploymentAllowanceOnMonthlyJournal' => 'getIncludeEmploymentAllowanceOnMonthlyJournal', - 'carryForwardUnpaidLiabilities' => 'getCarryForwardUnpaidLiabilities', - 'paymentDateRule' => 'getPaymentDateRule', + 'officeNumber' => 'getOfficeNumber', + 'payeReference' => 'getPayeReference', 'paymentDateDayOfMonth' => 'getPaymentDateDayOfMonth', - 'id' => 'getId' + 'paymentDateRule' => 'getPaymentDateRule', + 'quarterlyPaymentSchedule' => 'getQuarterlyPaymentSchedule', + 'smallEmployersRelief' => 'getSmallEmployersRelief', + 'utr' => 'getUtr' ]; /** @@ -339,23 +339,23 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('officeNumber', $data ?? [], null); - $this->setIfExists('payeReference', $data ?? [], null); $this->setIfExists('accountsOfficeReference', $data ?? [], null); - $this->setIfExists('econ', $data ?? [], null); - $this->setIfExists('utr', $data ?? [], null); + $this->setIfExists('apprenticeshipLevy', $data ?? [], null); + $this->setIfExists('apprenticeshipLevyAllowance', $data ?? [], null); + $this->setIfExists('carryForwardUnpaidLiabilities', $data ?? [], null); $this->setIfExists('coTax', $data ?? [], null); + $this->setIfExists('econ', $data ?? [], null); $this->setIfExists('employmentAllowance', $data ?? [], null); $this->setIfExists('employmentAllowanceMaxClaim', $data ?? [], null); - $this->setIfExists('smallEmployersRelief', $data ?? [], null); - $this->setIfExists('apprenticeshipLevy', $data ?? [], null); - $this->setIfExists('apprenticeshipLevyAllowance', $data ?? [], null); - $this->setIfExists('quarterlyPaymentSchedule', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('includeEmploymentAllowanceOnMonthlyJournal', $data ?? [], null); - $this->setIfExists('carryForwardUnpaidLiabilities', $data ?? [], null); - $this->setIfExists('paymentDateRule', $data ?? [], null); + $this->setIfExists('officeNumber', $data ?? [], null); + $this->setIfExists('payeReference', $data ?? [], null); $this->setIfExists('paymentDateDayOfMonth', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('paymentDateRule', $data ?? [], null); + $this->setIfExists('quarterlyPaymentSchedule', $data ?? [], null); + $this->setIfExists('smallEmployersRelief', $data ?? [], null); + $this->setIfExists('utr', $data ?? [], null); } /** @@ -385,28 +385,28 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (!is_null($this->container['officeNumber']) && (mb_strlen($this->container['officeNumber']) > 3)) { - $invalidProperties[] = "invalid value for 'officeNumber', the character length must be smaller than or equal to 3."; - } - - if (!is_null($this->container['payeReference']) && (mb_strlen($this->container['payeReference']) > 20)) { - $invalidProperties[] = "invalid value for 'payeReference', the character length must be smaller than or equal to 20."; - } - if (!is_null($this->container['accountsOfficeReference']) && (mb_strlen($this->container['accountsOfficeReference']) > 20)) { $invalidProperties[] = "invalid value for 'accountsOfficeReference', the character length must be smaller than or equal to 20."; } + if (!is_null($this->container['coTax']) && (mb_strlen($this->container['coTax']) > 20)) { + $invalidProperties[] = "invalid value for 'coTax', the character length must be smaller than or equal to 20."; + } + if (!is_null($this->container['econ']) && (mb_strlen($this->container['econ']) > 20)) { $invalidProperties[] = "invalid value for 'econ', the character length must be smaller than or equal to 20."; } - if (!is_null($this->container['utr']) && (mb_strlen($this->container['utr']) > 20)) { - $invalidProperties[] = "invalid value for 'utr', the character length must be smaller than or equal to 20."; + if (!is_null($this->container['officeNumber']) && (mb_strlen($this->container['officeNumber']) > 3)) { + $invalidProperties[] = "invalid value for 'officeNumber', the character length must be smaller than or equal to 3."; } - if (!is_null($this->container['coTax']) && (mb_strlen($this->container['coTax']) > 20)) { - $invalidProperties[] = "invalid value for 'coTax', the character length must be smaller than or equal to 20."; + if (!is_null($this->container['payeReference']) && (mb_strlen($this->container['payeReference']) > 20)) { + $invalidProperties[] = "invalid value for 'payeReference', the character length must be smaller than or equal to 20."; + } + + if (!is_null($this->container['utr']) && (mb_strlen($this->container['utr']) > 20)) { + $invalidProperties[] = "invalid value for 'utr', the character length must be smaller than or equal to 20."; } return $invalidProperties; @@ -425,229 +425,196 @@ public function valid(): bool /** - * Gets officeNumber + * Gets accountsOfficeReference * * @return string|null */ - public function getOfficeNumber(): ?string + public function getAccountsOfficeReference(): ?string { - return $this->container['officeNumber']; + return $this->container['accountsOfficeReference']; } /** - * Sets officeNumber + * Sets accountsOfficeReference * - * @param string|null $officeNumber officeNumber + * @param string|null $accountsOfficeReference accountsOfficeReference * * @return $this */ - public function setOfficeNumber(?string $officeNumber): static + public function setAccountsOfficeReference(?string $accountsOfficeReference): static { - if (is_null($officeNumber)) { - array_push($this->openAPINullablesSetToNull, 'officeNumber'); + if (is_null($accountsOfficeReference)) { + array_push($this->openAPINullablesSetToNull, 'accountsOfficeReference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('officeNumber', $nullablesSetToNull); + $index = array_search('accountsOfficeReference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($officeNumber) && (mb_strlen($officeNumber) > 3)) { - throw new InvalidArgumentException('invalid length for $officeNumber when calling HmrcDetails., must be smaller than or equal to 3.'); + if (!is_null($accountsOfficeReference) && (mb_strlen($accountsOfficeReference) > 20)) { + throw new InvalidArgumentException('invalid length for $accountsOfficeReference when calling HmrcDetails., must be smaller than or equal to 20.'); } - $this->container['officeNumber'] = $officeNumber; + $this->container['accountsOfficeReference'] = $accountsOfficeReference; return $this; } /** - * Gets payeReference + * Gets apprenticeshipLevy * - * @return string|null + * @return bool|null */ - public function getPayeReference(): ?string + public function getApprenticeshipLevy(): ?bool { - return $this->container['payeReference']; + return $this->container['apprenticeshipLevy']; } /** - * Sets payeReference + * Sets apprenticeshipLevy * - * @param string|null $payeReference payeReference + * @param bool|null $apprenticeshipLevy apprenticeshipLevy * * @return $this */ - public function setPayeReference(?string $payeReference): static + public function setApprenticeshipLevy(?bool $apprenticeshipLevy): static { - if (is_null($payeReference)) { - array_push($this->openAPINullablesSetToNull, 'payeReference'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payeReference', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($payeReference) && (mb_strlen($payeReference) > 20)) { - throw new InvalidArgumentException('invalid length for $payeReference when calling HmrcDetails., must be smaller than or equal to 20.'); + if (is_null($apprenticeshipLevy)) { + throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); } - - $this->container['payeReference'] = $payeReference; + $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; return $this; } /** - * Gets accountsOfficeReference + * Gets apprenticeshipLevyAllowance * - * @return string|null + * @return float|null */ - public function getAccountsOfficeReference(): ?string + public function getApprenticeshipLevyAllowance(): ?float { - return $this->container['accountsOfficeReference']; + return $this->container['apprenticeshipLevyAllowance']; } /** - * Sets accountsOfficeReference + * Sets apprenticeshipLevyAllowance * - * @param string|null $accountsOfficeReference accountsOfficeReference + * @param float|null $apprenticeshipLevyAllowance apprenticeshipLevyAllowance * * @return $this */ - public function setAccountsOfficeReference(?string $accountsOfficeReference): static + public function setApprenticeshipLevyAllowance(?float $apprenticeshipLevyAllowance): static { - if (is_null($accountsOfficeReference)) { - array_push($this->openAPINullablesSetToNull, 'accountsOfficeReference'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountsOfficeReference', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($accountsOfficeReference) && (mb_strlen($accountsOfficeReference) > 20)) { - throw new InvalidArgumentException('invalid length for $accountsOfficeReference when calling HmrcDetails., must be smaller than or equal to 20.'); + if (is_null($apprenticeshipLevyAllowance)) { + throw new InvalidArgumentException('non-nullable apprenticeshipLevyAllowance cannot be null'); } - - $this->container['accountsOfficeReference'] = $accountsOfficeReference; + $this->container['apprenticeshipLevyAllowance'] = $apprenticeshipLevyAllowance; return $this; } /** - * Gets econ + * Gets carryForwardUnpaidLiabilities * - * @return string|null + * @return bool|null */ - public function getEcon(): ?string + public function getCarryForwardUnpaidLiabilities(): ?bool { - return $this->container['econ']; + return $this->container['carryForwardUnpaidLiabilities']; } /** - * Sets econ + * Sets carryForwardUnpaidLiabilities * - * @param string|null $econ econ + * @param bool|null $carryForwardUnpaidLiabilities If set to true then any unpaid amounts from previous periods will be brought forward to work out the liability for the current period. You'd set this to false if you don't want to track payments. * * @return $this */ - public function setEcon(?string $econ): static + public function setCarryForwardUnpaidLiabilities(?bool $carryForwardUnpaidLiabilities): static { - if (is_null($econ)) { - array_push($this->openAPINullablesSetToNull, 'econ'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('econ', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($econ) && (mb_strlen($econ) > 20)) { - throw new InvalidArgumentException('invalid length for $econ when calling HmrcDetails., must be smaller than or equal to 20.'); + if (is_null($carryForwardUnpaidLiabilities)) { + throw new InvalidArgumentException('non-nullable carryForwardUnpaidLiabilities cannot be null'); } - - $this->container['econ'] = $econ; + $this->container['carryForwardUnpaidLiabilities'] = $carryForwardUnpaidLiabilities; return $this; } /** - * Gets utr + * Gets coTax * * @return string|null */ - public function getUtr(): ?string + public function getCoTax(): ?string { - return $this->container['utr']; + return $this->container['coTax']; } /** - * Sets utr + * Sets coTax * - * @param string|null $utr utr + * @param string|null $coTax coTax * * @return $this */ - public function setUtr(?string $utr): static + public function setCoTax(?string $coTax): static { - if (is_null($utr)) { - array_push($this->openAPINullablesSetToNull, 'utr'); + if (is_null($coTax)) { + array_push($this->openAPINullablesSetToNull, 'coTax'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('utr', $nullablesSetToNull); + $index = array_search('coTax', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($utr) && (mb_strlen($utr) > 20)) { - throw new InvalidArgumentException('invalid length for $utr when calling HmrcDetails., must be smaller than or equal to 20.'); + if (!is_null($coTax) && (mb_strlen($coTax) > 20)) { + throw new InvalidArgumentException('invalid length for $coTax when calling HmrcDetails., must be smaller than or equal to 20.'); } - $this->container['utr'] = $utr; + $this->container['coTax'] = $coTax; return $this; } /** - * Gets coTax + * Gets econ * * @return string|null */ - public function getCoTax(): ?string + public function getEcon(): ?string { - return $this->container['coTax']; + return $this->container['econ']; } /** - * Sets coTax + * Sets econ * - * @param string|null $coTax coTax + * @param string|null $econ econ * * @return $this */ - public function setCoTax(?string $coTax): static + public function setEcon(?string $econ): static { - if (is_null($coTax)) { - array_push($this->openAPINullablesSetToNull, 'coTax'); + if (is_null($econ)) { + array_push($this->openAPINullablesSetToNull, 'econ'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('coTax', $nullablesSetToNull); + $index = array_search('econ', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($coTax) && (mb_strlen($coTax) > 20)) { - throw new InvalidArgumentException('invalid length for $coTax when calling HmrcDetails., must be smaller than or equal to 20.'); + if (!is_null($econ) && (mb_strlen($econ) > 20)) { + throw new InvalidArgumentException('invalid length for $econ when calling HmrcDetails., must be smaller than or equal to 20.'); } - $this->container['coTax'] = $coTax; + $this->container['econ'] = $econ; return $this; } @@ -707,251 +674,284 @@ public function setEmploymentAllowanceMaxClaim(?float $employmentAllowanceMaxCla } /** - * Gets smallEmployersRelief + * Gets id * - * @return bool|null + * @return string|null */ - public function getSmallEmployersRelief(): ?bool + public function getId(): ?string { - return $this->container['smallEmployersRelief']; + return $this->container['id']; } /** - * Sets smallEmployersRelief + * Sets id * - * @param bool|null $smallEmployersRelief smallEmployersRelief + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setSmallEmployersRelief(?bool $smallEmployersRelief): static + public function setId(?string $id): static { - if (is_null($smallEmployersRelief)) { - throw new InvalidArgumentException('non-nullable smallEmployersRelief cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['smallEmployersRelief'] = $smallEmployersRelief; + $this->container['id'] = $id; return $this; } /** - * Gets apprenticeshipLevy + * Gets includeEmploymentAllowanceOnMonthlyJournal * * @return bool|null */ - public function getApprenticeshipLevy(): ?bool + public function getIncludeEmploymentAllowanceOnMonthlyJournal(): ?bool { - return $this->container['apprenticeshipLevy']; + return $this->container['includeEmploymentAllowanceOnMonthlyJournal']; } /** - * Sets apprenticeshipLevy + * Sets includeEmploymentAllowanceOnMonthlyJournal * - * @param bool|null $apprenticeshipLevy apprenticeshipLevy + * @param bool|null $includeEmploymentAllowanceOnMonthlyJournal If the employer is not on a QuarterlyPaymentSchedule and is claiming EmploymentAllowance, then set this to true to include a line for Employment Allowance on the journal for the monthly schedule. * * @return $this */ - public function setApprenticeshipLevy(?bool $apprenticeshipLevy): static + public function setIncludeEmploymentAllowanceOnMonthlyJournal(?bool $includeEmploymentAllowanceOnMonthlyJournal): static { - if (is_null($apprenticeshipLevy)) { - throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); + if (is_null($includeEmploymentAllowanceOnMonthlyJournal)) { + throw new InvalidArgumentException('non-nullable includeEmploymentAllowanceOnMonthlyJournal cannot be null'); } - $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; + $this->container['includeEmploymentAllowanceOnMonthlyJournal'] = $includeEmploymentAllowanceOnMonthlyJournal; return $this; } /** - * Gets apprenticeshipLevyAllowance + * Gets officeNumber * - * @return float|null + * @return string|null */ - public function getApprenticeshipLevyAllowance(): ?float + public function getOfficeNumber(): ?string { - return $this->container['apprenticeshipLevyAllowance']; + return $this->container['officeNumber']; } /** - * Sets apprenticeshipLevyAllowance + * Sets officeNumber * - * @param float|null $apprenticeshipLevyAllowance apprenticeshipLevyAllowance + * @param string|null $officeNumber officeNumber * * @return $this */ - public function setApprenticeshipLevyAllowance(?float $apprenticeshipLevyAllowance): static + public function setOfficeNumber(?string $officeNumber): static { - if (is_null($apprenticeshipLevyAllowance)) { - throw new InvalidArgumentException('non-nullable apprenticeshipLevyAllowance cannot be null'); + if (is_null($officeNumber)) { + array_push($this->openAPINullablesSetToNull, 'officeNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('officeNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($officeNumber) && (mb_strlen($officeNumber) > 3)) { + throw new InvalidArgumentException('invalid length for $officeNumber when calling HmrcDetails., must be smaller than or equal to 3.'); } - $this->container['apprenticeshipLevyAllowance'] = $apprenticeshipLevyAllowance; + + $this->container['officeNumber'] = $officeNumber; return $this; } /** - * Gets quarterlyPaymentSchedule + * Gets payeReference * - * @return bool|null + * @return string|null */ - public function getQuarterlyPaymentSchedule(): ?bool + public function getPayeReference(): ?string { - return $this->container['quarterlyPaymentSchedule']; + return $this->container['payeReference']; } /** - * Sets quarterlyPaymentSchedule + * Sets payeReference * - * @param bool|null $quarterlyPaymentSchedule Set to true if the employer pays HMRC on a quarterly schedule. A value of false implies a monthly schedule. Warning: Changing this value after starting PayRuns will delete any existing payments or adjustments you may have entered. + * @param string|null $payeReference payeReference * * @return $this */ - public function setQuarterlyPaymentSchedule(?bool $quarterlyPaymentSchedule): static + public function setPayeReference(?string $payeReference): static { - if (is_null($quarterlyPaymentSchedule)) { - throw new InvalidArgumentException('non-nullable quarterlyPaymentSchedule cannot be null'); + if (is_null($payeReference)) { + array_push($this->openAPINullablesSetToNull, 'payeReference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payeReference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($payeReference) && (mb_strlen($payeReference) > 20)) { + throw new InvalidArgumentException('invalid length for $payeReference when calling HmrcDetails., must be smaller than or equal to 20.'); } - $this->container['quarterlyPaymentSchedule'] = $quarterlyPaymentSchedule; + + $this->container['payeReference'] = $payeReference; return $this; } /** - * Gets includeEmploymentAllowanceOnMonthlyJournal + * Gets paymentDateDayOfMonth * - * @return bool|null + * @return int|null */ - public function getIncludeEmploymentAllowanceOnMonthlyJournal(): ?bool + public function getPaymentDateDayOfMonth(): ?int { - return $this->container['includeEmploymentAllowanceOnMonthlyJournal']; + return $this->container['paymentDateDayOfMonth']; } /** - * Sets includeEmploymentAllowanceOnMonthlyJournal + * Sets paymentDateDayOfMonth * - * @param bool|null $includeEmploymentAllowanceOnMonthlyJournal If the employer is not on a QuarterlyPaymentSchedule and is claiming EmploymentAllowance, then set this to true to include a line for Employment Allowance on the journal for the monthly schedule. + * @param int|null $paymentDateDayOfMonth paymentDateDayOfMonth * * @return $this */ - public function setIncludeEmploymentAllowanceOnMonthlyJournal(?bool $includeEmploymentAllowanceOnMonthlyJournal): static + public function setPaymentDateDayOfMonth(?int $paymentDateDayOfMonth): static { - if (is_null($includeEmploymentAllowanceOnMonthlyJournal)) { - throw new InvalidArgumentException('non-nullable includeEmploymentAllowanceOnMonthlyJournal cannot be null'); + if (is_null($paymentDateDayOfMonth)) { + array_push($this->openAPINullablesSetToNull, 'paymentDateDayOfMonth'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('paymentDateDayOfMonth', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['includeEmploymentAllowanceOnMonthlyJournal'] = $includeEmploymentAllowanceOnMonthlyJournal; + $this->container['paymentDateDayOfMonth'] = $paymentDateDayOfMonth; return $this; } /** - * Gets carryForwardUnpaidLiabilities + * Gets paymentDateRule * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PaymentDateRule|null */ - public function getCarryForwardUnpaidLiabilities(): ?bool + public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule { - return $this->container['carryForwardUnpaidLiabilities']; + return $this->container['paymentDateRule']; } /** - * Sets carryForwardUnpaidLiabilities + * Sets paymentDateRule * - * @param bool|null $carryForwardUnpaidLiabilities If set to true then any unpaid amounts from previous periods will be brought forward to work out the liability for the current period. You'd set this to false if you don't want to track payments. + * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule * * @return $this */ - public function setCarryForwardUnpaidLiabilities(?bool $carryForwardUnpaidLiabilities): static + public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static { - if (is_null($carryForwardUnpaidLiabilities)) { - throw new InvalidArgumentException('non-nullable carryForwardUnpaidLiabilities cannot be null'); + if (is_null($paymentDateRule)) { + throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); } - $this->container['carryForwardUnpaidLiabilities'] = $carryForwardUnpaidLiabilities; + $this->container['paymentDateRule'] = $paymentDateRule; return $this; } /** - * Gets paymentDateRule + * Gets quarterlyPaymentSchedule * - * @return \SynergiTech\Staffology\Model\PaymentDateRule|null + * @return bool|null */ - public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule + public function getQuarterlyPaymentSchedule(): ?bool { - return $this->container['paymentDateRule']; + return $this->container['quarterlyPaymentSchedule']; } /** - * Sets paymentDateRule + * Sets quarterlyPaymentSchedule * - * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule + * @param bool|null $quarterlyPaymentSchedule Set to true if the employer pays HMRC on a quarterly schedule. A value of false implies a monthly schedule. Warning: Changing this value after starting PayRuns will delete any existing payments or adjustments you may have entered. * * @return $this */ - public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static + public function setQuarterlyPaymentSchedule(?bool $quarterlyPaymentSchedule): static { - if (is_null($paymentDateRule)) { - throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); + if (is_null($quarterlyPaymentSchedule)) { + throw new InvalidArgumentException('non-nullable quarterlyPaymentSchedule cannot be null'); } - $this->container['paymentDateRule'] = $paymentDateRule; + $this->container['quarterlyPaymentSchedule'] = $quarterlyPaymentSchedule; return $this; } /** - * Gets paymentDateDayOfMonth + * Gets smallEmployersRelief * - * @return int|null + * @return bool|null */ - public function getPaymentDateDayOfMonth(): ?int + public function getSmallEmployersRelief(): ?bool { - return $this->container['paymentDateDayOfMonth']; + return $this->container['smallEmployersRelief']; } /** - * Sets paymentDateDayOfMonth + * Sets smallEmployersRelief * - * @param int|null $paymentDateDayOfMonth paymentDateDayOfMonth + * @param bool|null $smallEmployersRelief smallEmployersRelief * * @return $this */ - public function setPaymentDateDayOfMonth(?int $paymentDateDayOfMonth): static + public function setSmallEmployersRelief(?bool $smallEmployersRelief): static { - if (is_null($paymentDateDayOfMonth)) { - array_push($this->openAPINullablesSetToNull, 'paymentDateDayOfMonth'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paymentDateDayOfMonth', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($smallEmployersRelief)) { + throw new InvalidArgumentException('non-nullable smallEmployersRelief cannot be null'); } - $this->container['paymentDateDayOfMonth'] = $paymentDateDayOfMonth; + $this->container['smallEmployersRelief'] = $smallEmployersRelief; return $this; } /** - * Gets id + * Gets utr * * @return string|null */ - public function getId(): ?string + public function getUtr(): ?string { - return $this->container['id']; + return $this->container['utr']; } /** - * Sets id + * Sets utr * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $utr utr * * @return $this */ - public function setId(?string $id): static + public function setUtr(?string $utr): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($utr)) { + array_push($this->openAPINullablesSetToNull, 'utr'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('utr', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + if (!is_null($utr) && (mb_strlen($utr) > 20)) { + throw new InvalidArgumentException('invalid length for $utr when calling HmrcDetails., must be smaller than or equal to 20.'); + } + + $this->container['utr'] = $utr; return $this; } diff --git a/src/Model/HmrcLiability.php b/src/Model/HmrcLiability.php index 08cf7f9..16f2f2a 100644 --- a/src/Model/HmrcLiability.php +++ b/src/Model/HmrcLiability.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,52 +59,52 @@ class HmrcLiability implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'title' => 'string', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'periodEnding' => '\DateTime', - 'periodComplete' => 'bool', - 'recoverableAmountsEpsCreated' => 'bool', + 'adjustment' => 'float', + 'allowLinkedEps' => 'bool', + 'apprenticeshipLevy' => 'float', + 'apprenticeshipLevyAuto' => 'bool', 'apprenticeshipLevyEpsCreated' => 'bool', - 'payRuns' => '\SynergiTech\Staffology\Model\PayRun[]', - 'tax' => 'float', 'cisDeductions' => 'float', - 'postgradLoanDeductions' => 'float', - 'studentLoanDeductions' => 'float', + 'cisDeductionsSuffered' => 'float', + 'dueInPreviousPeriods' => 'float', + 'eligibleForEmploymentAllowance' => 'bool', 'employeeNic' => 'float', 'employerNic' => 'float', + 'employmentAllowanceClaim' => 'float', + 'employmentAllowanceClaimAuto' => 'bool', + 'employmentAllowanceClaimInPreviousPeriods' => 'float', + 'fpsList' => '\SynergiTech\Staffology\Model\Item[]', + 'id' => 'string', + 'liabilityArisingInPeriod' => 'float', + 'liableForApprenticeshipLevy' => 'bool', + 'netLiabilityForPeriod' => 'float', + 'paidInPreviousPeriods' => 'float', + 'payRuns' => '\SynergiTech\Staffology\Model\PayRun[]', + 'payments' => '\SynergiTech\Staffology\Model\HmrcPayment[]', + 'periodComplete' => 'bool', + 'periodEnding' => '\DateTime', + 'postgradLoanDeductions' => 'float', 'realTimeClass1ANic' => 'float', - 'smp' => 'float', - 'smpNic' => 'float', - 'spp' => 'float', - 'sppNic' => 'float', + 'receivedFromHMRCToPayStatutoryPay' => 'float', + 'receivedFromHMRCToRefundTax' => 'float', + 'recoverableAmountsEpsCreated' => 'bool', 'sap' => 'float', 'sapNic' => 'float', 'shpp' => 'float', 'shppNic' => 'float', - 'spbp' => 'float', - 'spbpNic' => 'float', + 'smp' => 'float', + 'smpNic' => 'float', 'sncp' => 'float', 'sncpNic' => 'float', - 'eligibleForEmploymentAllowance' => 'bool', - 'employmentAllowanceClaim' => 'float', - 'employmentAllowanceClaimAuto' => 'bool', - 'liableForApprenticeshipLevy' => 'bool', - 'apprenticeshipLevy' => 'float', - 'apprenticeshipLevyAuto' => 'bool', - 'liabilityArisingInPeriod' => 'float', - 'dueInPreviousPeriods' => 'float', - 'paidInPreviousPeriods' => 'float', - 'employmentAllowanceClaimInPreviousPeriods' => 'float', - 'receivedFromHMRCToRefundTax' => 'float', - 'receivedFromHMRCToPayStatutoryPay' => 'float', - 'cisDeductionsSuffered' => 'float', - 'adjustment' => 'float', - 'netLiabilityForPeriod' => 'float', - 'totalPaid' => 'float', - 'payments' => '\SynergiTech\Staffology\Model\HmrcPayment[]', - 'fpsList' => '\SynergiTech\Staffology\Model\Item[]', - 'allowLinkedEps' => 'bool', - 'id' => 'string' + 'spbp' => 'float', + 'spbpNic' => 'float', + 'spp' => 'float', + 'sppNic' => 'float', + 'studentLoanDeductions' => 'float', + 'tax' => 'float', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'title' => 'string', + 'totalPaid' => 'float' ]; /** @@ -113,52 +113,52 @@ class HmrcLiability implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'title' => null, - 'taxYear' => null, - 'periodEnding' => 'date', - 'periodComplete' => null, - 'recoverableAmountsEpsCreated' => null, + 'adjustment' => 'double', + 'allowLinkedEps' => null, + 'apprenticeshipLevy' => 'double', + 'apprenticeshipLevyAuto' => null, 'apprenticeshipLevyEpsCreated' => null, - 'payRuns' => null, - 'tax' => 'double', 'cisDeductions' => 'double', - 'postgradLoanDeductions' => 'double', - 'studentLoanDeductions' => 'double', + 'cisDeductionsSuffered' => 'double', + 'dueInPreviousPeriods' => 'double', + 'eligibleForEmploymentAllowance' => null, 'employeeNic' => 'double', 'employerNic' => 'double', + 'employmentAllowanceClaim' => 'double', + 'employmentAllowanceClaimAuto' => null, + 'employmentAllowanceClaimInPreviousPeriods' => 'double', + 'fpsList' => null, + 'id' => 'uuid', + 'liabilityArisingInPeriod' => 'double', + 'liableForApprenticeshipLevy' => null, + 'netLiabilityForPeriod' => 'double', + 'paidInPreviousPeriods' => 'double', + 'payRuns' => null, + 'payments' => null, + 'periodComplete' => null, + 'periodEnding' => 'date', + 'postgradLoanDeductions' => 'double', 'realTimeClass1ANic' => 'double', - 'smp' => 'double', - 'smpNic' => 'double', - 'spp' => 'double', - 'sppNic' => 'double', + 'receivedFromHMRCToPayStatutoryPay' => 'double', + 'receivedFromHMRCToRefundTax' => 'double', + 'recoverableAmountsEpsCreated' => null, 'sap' => 'double', 'sapNic' => 'double', 'shpp' => 'double', 'shppNic' => 'double', - 'spbp' => 'double', - 'spbpNic' => 'double', + 'smp' => 'double', + 'smpNic' => 'double', 'sncp' => 'double', 'sncpNic' => 'double', - 'eligibleForEmploymentAllowance' => null, - 'employmentAllowanceClaim' => 'double', - 'employmentAllowanceClaimAuto' => null, - 'liableForApprenticeshipLevy' => null, - 'apprenticeshipLevy' => 'double', - 'apprenticeshipLevyAuto' => null, - 'liabilityArisingInPeriod' => 'double', - 'dueInPreviousPeriods' => 'double', - 'paidInPreviousPeriods' => 'double', - 'employmentAllowanceClaimInPreviousPeriods' => 'double', - 'receivedFromHMRCToRefundTax' => 'double', - 'receivedFromHMRCToPayStatutoryPay' => 'double', - 'cisDeductionsSuffered' => 'double', - 'adjustment' => 'double', - 'netLiabilityForPeriod' => 'double', - 'totalPaid' => 'double', - 'payments' => null, - 'fpsList' => null, - 'allowLinkedEps' => null, - 'id' => 'uuid' + 'spbp' => 'double', + 'spbpNic' => 'double', + 'spp' => 'double', + 'sppNic' => 'double', + 'studentLoanDeductions' => 'double', + 'tax' => 'double', + 'taxYear' => null, + 'title' => null, + 'totalPaid' => 'double' ]; /** @@ -167,52 +167,52 @@ class HmrcLiability implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'title' => true, - 'taxYear' => false, - 'periodEnding' => false, - 'periodComplete' => false, - 'recoverableAmountsEpsCreated' => false, + 'adjustment' => false, + 'allowLinkedEps' => false, + 'apprenticeshipLevy' => false, + 'apprenticeshipLevyAuto' => false, 'apprenticeshipLevyEpsCreated' => false, - 'payRuns' => true, - 'tax' => false, 'cisDeductions' => false, - 'postgradLoanDeductions' => false, - 'studentLoanDeductions' => false, + 'cisDeductionsSuffered' => false, + 'dueInPreviousPeriods' => false, + 'eligibleForEmploymentAllowance' => false, 'employeeNic' => false, 'employerNic' => false, + 'employmentAllowanceClaim' => false, + 'employmentAllowanceClaimAuto' => false, + 'employmentAllowanceClaimInPreviousPeriods' => false, + 'fpsList' => true, + 'id' => false, + 'liabilityArisingInPeriod' => false, + 'liableForApprenticeshipLevy' => false, + 'netLiabilityForPeriod' => false, + 'paidInPreviousPeriods' => false, + 'payRuns' => true, + 'payments' => true, + 'periodComplete' => false, + 'periodEnding' => false, + 'postgradLoanDeductions' => false, 'realTimeClass1ANic' => false, - 'smp' => false, - 'smpNic' => false, - 'spp' => false, - 'sppNic' => false, + 'receivedFromHMRCToPayStatutoryPay' => false, + 'receivedFromHMRCToRefundTax' => false, + 'recoverableAmountsEpsCreated' => false, 'sap' => false, 'sapNic' => false, 'shpp' => false, 'shppNic' => false, - 'spbp' => false, - 'spbpNic' => false, + 'smp' => false, + 'smpNic' => false, 'sncp' => false, 'sncpNic' => false, - 'eligibleForEmploymentAllowance' => false, - 'employmentAllowanceClaim' => false, - 'employmentAllowanceClaimAuto' => false, - 'liableForApprenticeshipLevy' => false, - 'apprenticeshipLevy' => false, - 'apprenticeshipLevyAuto' => false, - 'liabilityArisingInPeriod' => false, - 'dueInPreviousPeriods' => false, - 'paidInPreviousPeriods' => false, - 'employmentAllowanceClaimInPreviousPeriods' => false, - 'receivedFromHMRCToRefundTax' => false, - 'receivedFromHMRCToPayStatutoryPay' => false, - 'cisDeductionsSuffered' => false, - 'adjustment' => false, - 'netLiabilityForPeriod' => false, - 'totalPaid' => false, - 'payments' => true, - 'fpsList' => true, - 'allowLinkedEps' => false, - 'id' => false + 'spbp' => false, + 'spbpNic' => false, + 'spp' => false, + 'sppNic' => false, + 'studentLoanDeductions' => false, + 'tax' => false, + 'taxYear' => false, + 'title' => true, + 'totalPaid' => false ]; /** @@ -301,52 +301,52 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'title' => 'title', - 'taxYear' => 'taxYear', - 'periodEnding' => 'periodEnding', - 'periodComplete' => 'periodComplete', - 'recoverableAmountsEpsCreated' => 'recoverableAmountsEpsCreated', + 'adjustment' => 'adjustment', + 'allowLinkedEps' => 'allowLinkedEps', + 'apprenticeshipLevy' => 'apprenticeshipLevy', + 'apprenticeshipLevyAuto' => 'apprenticeshipLevyAuto', 'apprenticeshipLevyEpsCreated' => 'apprenticeshipLevyEpsCreated', - 'payRuns' => 'payRuns', - 'tax' => 'tax', 'cisDeductions' => 'cisDeductions', - 'postgradLoanDeductions' => 'postgradLoanDeductions', - 'studentLoanDeductions' => 'studentLoanDeductions', + 'cisDeductionsSuffered' => 'cisDeductionsSuffered', + 'dueInPreviousPeriods' => 'dueInPreviousPeriods', + 'eligibleForEmploymentAllowance' => 'eligibleForEmploymentAllowance', 'employeeNic' => 'employeeNic', 'employerNic' => 'employerNic', + 'employmentAllowanceClaim' => 'employmentAllowanceClaim', + 'employmentAllowanceClaimAuto' => 'employmentAllowanceClaimAuto', + 'employmentAllowanceClaimInPreviousPeriods' => 'employmentAllowanceClaimInPreviousPeriods', + 'fpsList' => 'fpsList', + 'id' => 'id', + 'liabilityArisingInPeriod' => 'liabilityArisingInPeriod', + 'liableForApprenticeshipLevy' => 'liableForApprenticeshipLevy', + 'netLiabilityForPeriod' => 'netLiabilityForPeriod', + 'paidInPreviousPeriods' => 'paidInPreviousPeriods', + 'payRuns' => 'payRuns', + 'payments' => 'payments', + 'periodComplete' => 'periodComplete', + 'periodEnding' => 'periodEnding', + 'postgradLoanDeductions' => 'postgradLoanDeductions', 'realTimeClass1ANic' => 'realTimeClass1ANic', - 'smp' => 'smp', - 'smpNic' => 'smpNic', - 'spp' => 'spp', - 'sppNic' => 'sppNic', + 'receivedFromHMRCToPayStatutoryPay' => 'receivedFromHMRCToPayStatutoryPay', + 'receivedFromHMRCToRefundTax' => 'receivedFromHMRCToRefundTax', + 'recoverableAmountsEpsCreated' => 'recoverableAmountsEpsCreated', 'sap' => 'sap', 'sapNic' => 'sapNic', 'shpp' => 'shpp', 'shppNic' => 'shppNic', - 'spbp' => 'spbp', - 'spbpNic' => 'spbpNic', + 'smp' => 'smp', + 'smpNic' => 'smpNic', 'sncp' => 'sncp', 'sncpNic' => 'sncpNic', - 'eligibleForEmploymentAllowance' => 'eligibleForEmploymentAllowance', - 'employmentAllowanceClaim' => 'employmentAllowanceClaim', - 'employmentAllowanceClaimAuto' => 'employmentAllowanceClaimAuto', - 'liableForApprenticeshipLevy' => 'liableForApprenticeshipLevy', - 'apprenticeshipLevy' => 'apprenticeshipLevy', - 'apprenticeshipLevyAuto' => 'apprenticeshipLevyAuto', - 'liabilityArisingInPeriod' => 'liabilityArisingInPeriod', - 'dueInPreviousPeriods' => 'dueInPreviousPeriods', - 'paidInPreviousPeriods' => 'paidInPreviousPeriods', - 'employmentAllowanceClaimInPreviousPeriods' => 'employmentAllowanceClaimInPreviousPeriods', - 'receivedFromHMRCToRefundTax' => 'receivedFromHMRCToRefundTax', - 'receivedFromHMRCToPayStatutoryPay' => 'receivedFromHMRCToPayStatutoryPay', - 'cisDeductionsSuffered' => 'cisDeductionsSuffered', - 'adjustment' => 'adjustment', - 'netLiabilityForPeriod' => 'netLiabilityForPeriod', - 'totalPaid' => 'totalPaid', - 'payments' => 'payments', - 'fpsList' => 'fpsList', - 'allowLinkedEps' => 'allowLinkedEps', - 'id' => 'id' + 'spbp' => 'spbp', + 'spbpNic' => 'spbpNic', + 'spp' => 'spp', + 'sppNic' => 'sppNic', + 'studentLoanDeductions' => 'studentLoanDeductions', + 'tax' => 'tax', + 'taxYear' => 'taxYear', + 'title' => 'title', + 'totalPaid' => 'totalPaid' ]; /** @@ -355,52 +355,52 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'title' => 'setTitle', - 'taxYear' => 'setTaxYear', - 'periodEnding' => 'setPeriodEnding', - 'periodComplete' => 'setPeriodComplete', - 'recoverableAmountsEpsCreated' => 'setRecoverableAmountsEpsCreated', + 'adjustment' => 'setAdjustment', + 'allowLinkedEps' => 'setAllowLinkedEps', + 'apprenticeshipLevy' => 'setApprenticeshipLevy', + 'apprenticeshipLevyAuto' => 'setApprenticeshipLevyAuto', 'apprenticeshipLevyEpsCreated' => 'setApprenticeshipLevyEpsCreated', - 'payRuns' => 'setPayRuns', - 'tax' => 'setTax', 'cisDeductions' => 'setCisDeductions', - 'postgradLoanDeductions' => 'setPostgradLoanDeductions', - 'studentLoanDeductions' => 'setStudentLoanDeductions', + 'cisDeductionsSuffered' => 'setCisDeductionsSuffered', + 'dueInPreviousPeriods' => 'setDueInPreviousPeriods', + 'eligibleForEmploymentAllowance' => 'setEligibleForEmploymentAllowance', 'employeeNic' => 'setEmployeeNic', 'employerNic' => 'setEmployerNic', + 'employmentAllowanceClaim' => 'setEmploymentAllowanceClaim', + 'employmentAllowanceClaimAuto' => 'setEmploymentAllowanceClaimAuto', + 'employmentAllowanceClaimInPreviousPeriods' => 'setEmploymentAllowanceClaimInPreviousPeriods', + 'fpsList' => 'setFpsList', + 'id' => 'setId', + 'liabilityArisingInPeriod' => 'setLiabilityArisingInPeriod', + 'liableForApprenticeshipLevy' => 'setLiableForApprenticeshipLevy', + 'netLiabilityForPeriod' => 'setNetLiabilityForPeriod', + 'paidInPreviousPeriods' => 'setPaidInPreviousPeriods', + 'payRuns' => 'setPayRuns', + 'payments' => 'setPayments', + 'periodComplete' => 'setPeriodComplete', + 'periodEnding' => 'setPeriodEnding', + 'postgradLoanDeductions' => 'setPostgradLoanDeductions', 'realTimeClass1ANic' => 'setRealTimeClass1ANic', - 'smp' => 'setSmp', - 'smpNic' => 'setSmpNic', - 'spp' => 'setSpp', - 'sppNic' => 'setSppNic', + 'receivedFromHMRCToPayStatutoryPay' => 'setReceivedFromHMRCToPayStatutoryPay', + 'receivedFromHMRCToRefundTax' => 'setReceivedFromHMRCToRefundTax', + 'recoverableAmountsEpsCreated' => 'setRecoverableAmountsEpsCreated', 'sap' => 'setSap', 'sapNic' => 'setSapNic', 'shpp' => 'setShpp', 'shppNic' => 'setShppNic', - 'spbp' => 'setSpbp', - 'spbpNic' => 'setSpbpNic', + 'smp' => 'setSmp', + 'smpNic' => 'setSmpNic', 'sncp' => 'setSncp', 'sncpNic' => 'setSncpNic', - 'eligibleForEmploymentAllowance' => 'setEligibleForEmploymentAllowance', - 'employmentAllowanceClaim' => 'setEmploymentAllowanceClaim', - 'employmentAllowanceClaimAuto' => 'setEmploymentAllowanceClaimAuto', - 'liableForApprenticeshipLevy' => 'setLiableForApprenticeshipLevy', - 'apprenticeshipLevy' => 'setApprenticeshipLevy', - 'apprenticeshipLevyAuto' => 'setApprenticeshipLevyAuto', - 'liabilityArisingInPeriod' => 'setLiabilityArisingInPeriod', - 'dueInPreviousPeriods' => 'setDueInPreviousPeriods', - 'paidInPreviousPeriods' => 'setPaidInPreviousPeriods', - 'employmentAllowanceClaimInPreviousPeriods' => 'setEmploymentAllowanceClaimInPreviousPeriods', - 'receivedFromHMRCToRefundTax' => 'setReceivedFromHMRCToRefundTax', - 'receivedFromHMRCToPayStatutoryPay' => 'setReceivedFromHMRCToPayStatutoryPay', - 'cisDeductionsSuffered' => 'setCisDeductionsSuffered', - 'adjustment' => 'setAdjustment', - 'netLiabilityForPeriod' => 'setNetLiabilityForPeriod', - 'totalPaid' => 'setTotalPaid', - 'payments' => 'setPayments', - 'fpsList' => 'setFpsList', - 'allowLinkedEps' => 'setAllowLinkedEps', - 'id' => 'setId' + 'spbp' => 'setSpbp', + 'spbpNic' => 'setSpbpNic', + 'spp' => 'setSpp', + 'sppNic' => 'setSppNic', + 'studentLoanDeductions' => 'setStudentLoanDeductions', + 'tax' => 'setTax', + 'taxYear' => 'setTaxYear', + 'title' => 'setTitle', + 'totalPaid' => 'setTotalPaid' ]; /** @@ -409,52 +409,52 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'title' => 'getTitle', - 'taxYear' => 'getTaxYear', - 'periodEnding' => 'getPeriodEnding', - 'periodComplete' => 'getPeriodComplete', - 'recoverableAmountsEpsCreated' => 'getRecoverableAmountsEpsCreated', + 'adjustment' => 'getAdjustment', + 'allowLinkedEps' => 'getAllowLinkedEps', + 'apprenticeshipLevy' => 'getApprenticeshipLevy', + 'apprenticeshipLevyAuto' => 'getApprenticeshipLevyAuto', 'apprenticeshipLevyEpsCreated' => 'getApprenticeshipLevyEpsCreated', - 'payRuns' => 'getPayRuns', - 'tax' => 'getTax', 'cisDeductions' => 'getCisDeductions', - 'postgradLoanDeductions' => 'getPostgradLoanDeductions', - 'studentLoanDeductions' => 'getStudentLoanDeductions', + 'cisDeductionsSuffered' => 'getCisDeductionsSuffered', + 'dueInPreviousPeriods' => 'getDueInPreviousPeriods', + 'eligibleForEmploymentAllowance' => 'getEligibleForEmploymentAllowance', 'employeeNic' => 'getEmployeeNic', 'employerNic' => 'getEmployerNic', - 'realTimeClass1ANic' => 'getRealTimeClass1ANic', - 'smp' => 'getSmp', - 'smpNic' => 'getSmpNic', - 'spp' => 'getSpp', - 'sppNic' => 'getSppNic', - 'sap' => 'getSap', - 'sapNic' => 'getSapNic', - 'shpp' => 'getShpp', - 'shppNic' => 'getShppNic', - 'spbp' => 'getSpbp', - 'spbpNic' => 'getSpbpNic', - 'sncp' => 'getSncp', - 'sncpNic' => 'getSncpNic', - 'eligibleForEmploymentAllowance' => 'getEligibleForEmploymentAllowance', 'employmentAllowanceClaim' => 'getEmploymentAllowanceClaim', 'employmentAllowanceClaimAuto' => 'getEmploymentAllowanceClaimAuto', - 'liableForApprenticeshipLevy' => 'getLiableForApprenticeshipLevy', - 'apprenticeshipLevy' => 'getApprenticeshipLevy', - 'apprenticeshipLevyAuto' => 'getApprenticeshipLevyAuto', - 'liabilityArisingInPeriod' => 'getLiabilityArisingInPeriod', - 'dueInPreviousPeriods' => 'getDueInPreviousPeriods', - 'paidInPreviousPeriods' => 'getPaidInPreviousPeriods', 'employmentAllowanceClaimInPreviousPeriods' => 'getEmploymentAllowanceClaimInPreviousPeriods', - 'receivedFromHMRCToRefundTax' => 'getReceivedFromHMRCToRefundTax', - 'receivedFromHMRCToPayStatutoryPay' => 'getReceivedFromHMRCToPayStatutoryPay', - 'cisDeductionsSuffered' => 'getCisDeductionsSuffered', - 'adjustment' => 'getAdjustment', + 'fpsList' => 'getFpsList', + 'id' => 'getId', + 'liabilityArisingInPeriod' => 'getLiabilityArisingInPeriod', + 'liableForApprenticeshipLevy' => 'getLiableForApprenticeshipLevy', 'netLiabilityForPeriod' => 'getNetLiabilityForPeriod', - 'totalPaid' => 'getTotalPaid', + 'paidInPreviousPeriods' => 'getPaidInPreviousPeriods', + 'payRuns' => 'getPayRuns', 'payments' => 'getPayments', - 'fpsList' => 'getFpsList', - 'allowLinkedEps' => 'getAllowLinkedEps', - 'id' => 'getId' + 'periodComplete' => 'getPeriodComplete', + 'periodEnding' => 'getPeriodEnding', + 'postgradLoanDeductions' => 'getPostgradLoanDeductions', + 'realTimeClass1ANic' => 'getRealTimeClass1ANic', + 'receivedFromHMRCToPayStatutoryPay' => 'getReceivedFromHMRCToPayStatutoryPay', + 'receivedFromHMRCToRefundTax' => 'getReceivedFromHMRCToRefundTax', + 'recoverableAmountsEpsCreated' => 'getRecoverableAmountsEpsCreated', + 'sap' => 'getSap', + 'sapNic' => 'getSapNic', + 'shpp' => 'getShpp', + 'shppNic' => 'getShppNic', + 'smp' => 'getSmp', + 'smpNic' => 'getSmpNic', + 'sncp' => 'getSncp', + 'sncpNic' => 'getSncpNic', + 'spbp' => 'getSpbp', + 'spbpNic' => 'getSpbpNic', + 'spp' => 'getSpp', + 'sppNic' => 'getSppNic', + 'studentLoanDeductions' => 'getStudentLoanDeductions', + 'tax' => 'getTax', + 'taxYear' => 'getTaxYear', + 'title' => 'getTitle', + 'totalPaid' => 'getTotalPaid' ]; /** @@ -513,52 +513,52 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('periodEnding', $data ?? [], null); - $this->setIfExists('periodComplete', $data ?? [], null); - $this->setIfExists('recoverableAmountsEpsCreated', $data ?? [], null); + $this->setIfExists('adjustment', $data ?? [], null); + $this->setIfExists('allowLinkedEps', $data ?? [], null); + $this->setIfExists('apprenticeshipLevy', $data ?? [], null); + $this->setIfExists('apprenticeshipLevyAuto', $data ?? [], null); $this->setIfExists('apprenticeshipLevyEpsCreated', $data ?? [], null); - $this->setIfExists('payRuns', $data ?? [], null); - $this->setIfExists('tax', $data ?? [], null); $this->setIfExists('cisDeductions', $data ?? [], null); - $this->setIfExists('postgradLoanDeductions', $data ?? [], null); - $this->setIfExists('studentLoanDeductions', $data ?? [], null); + $this->setIfExists('cisDeductionsSuffered', $data ?? [], null); + $this->setIfExists('dueInPreviousPeriods', $data ?? [], null); + $this->setIfExists('eligibleForEmploymentAllowance', $data ?? [], null); $this->setIfExists('employeeNic', $data ?? [], null); $this->setIfExists('employerNic', $data ?? [], null); + $this->setIfExists('employmentAllowanceClaim', $data ?? [], null); + $this->setIfExists('employmentAllowanceClaimAuto', $data ?? [], null); + $this->setIfExists('employmentAllowanceClaimInPreviousPeriods', $data ?? [], null); + $this->setIfExists('fpsList', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('liabilityArisingInPeriod', $data ?? [], null); + $this->setIfExists('liableForApprenticeshipLevy', $data ?? [], null); + $this->setIfExists('netLiabilityForPeriod', $data ?? [], null); + $this->setIfExists('paidInPreviousPeriods', $data ?? [], null); + $this->setIfExists('payRuns', $data ?? [], null); + $this->setIfExists('payments', $data ?? [], null); + $this->setIfExists('periodComplete', $data ?? [], null); + $this->setIfExists('periodEnding', $data ?? [], null); + $this->setIfExists('postgradLoanDeductions', $data ?? [], null); $this->setIfExists('realTimeClass1ANic', $data ?? [], null); - $this->setIfExists('smp', $data ?? [], null); - $this->setIfExists('smpNic', $data ?? [], null); - $this->setIfExists('spp', $data ?? [], null); - $this->setIfExists('sppNic', $data ?? [], null); + $this->setIfExists('receivedFromHMRCToPayStatutoryPay', $data ?? [], null); + $this->setIfExists('receivedFromHMRCToRefundTax', $data ?? [], null); + $this->setIfExists('recoverableAmountsEpsCreated', $data ?? [], null); $this->setIfExists('sap', $data ?? [], null); $this->setIfExists('sapNic', $data ?? [], null); $this->setIfExists('shpp', $data ?? [], null); $this->setIfExists('shppNic', $data ?? [], null); - $this->setIfExists('spbp', $data ?? [], null); - $this->setIfExists('spbpNic', $data ?? [], null); + $this->setIfExists('smp', $data ?? [], null); + $this->setIfExists('smpNic', $data ?? [], null); $this->setIfExists('sncp', $data ?? [], null); $this->setIfExists('sncpNic', $data ?? [], null); - $this->setIfExists('eligibleForEmploymentAllowance', $data ?? [], null); - $this->setIfExists('employmentAllowanceClaim', $data ?? [], null); - $this->setIfExists('employmentAllowanceClaimAuto', $data ?? [], null); - $this->setIfExists('liableForApprenticeshipLevy', $data ?? [], null); - $this->setIfExists('apprenticeshipLevy', $data ?? [], null); - $this->setIfExists('apprenticeshipLevyAuto', $data ?? [], null); - $this->setIfExists('liabilityArisingInPeriod', $data ?? [], null); - $this->setIfExists('dueInPreviousPeriods', $data ?? [], null); - $this->setIfExists('paidInPreviousPeriods', $data ?? [], null); - $this->setIfExists('employmentAllowanceClaimInPreviousPeriods', $data ?? [], null); - $this->setIfExists('receivedFromHMRCToRefundTax', $data ?? [], null); - $this->setIfExists('receivedFromHMRCToPayStatutoryPay', $data ?? [], null); - $this->setIfExists('cisDeductionsSuffered', $data ?? [], null); - $this->setIfExists('adjustment', $data ?? [], null); - $this->setIfExists('netLiabilityForPeriod', $data ?? [], null); + $this->setIfExists('spbp', $data ?? [], null); + $this->setIfExists('spbpNic', $data ?? [], null); + $this->setIfExists('spp', $data ?? [], null); + $this->setIfExists('sppNic', $data ?? [], null); + $this->setIfExists('studentLoanDeductions', $data ?? [], null); + $this->setIfExists('tax', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); $this->setIfExists('totalPaid', $data ?? [], null); - $this->setIfExists('payments', $data ?? [], null); - $this->setIfExists('fpsList', $data ?? [], null); - $this->setIfExists('allowLinkedEps', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); } /** @@ -604,143 +604,109 @@ public function valid(): bool /** - * Gets title - * - * @return string|null - */ - public function getTitle(): ?string - { - return $this->container['title']; - } - - /** - * Sets title - * - * @param string|null $title [readonly] A descriptive name for the Period - * - * @return $this - */ - public function setTitle(?string $title): static - { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['title'] = $title; - - return $this; - } - - /** - * Gets taxYear + * Gets adjustment * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return float|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getAdjustment(): ?float { - return $this->container['taxYear']; + return $this->container['adjustment']; } /** - * Sets taxYear + * Sets adjustment * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param float|null $adjustment Any manual adjustment for Period * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setAdjustment(?float $adjustment): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($adjustment)) { + throw new InvalidArgumentException('non-nullable adjustment cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['adjustment'] = $adjustment; return $this; } /** - * Gets periodEnding + * Gets allowLinkedEps * - * @return \DateTime|null + * @return bool|null */ - public function getPeriodEnding(): ?\DateTime + public function getAllowLinkedEps(): ?bool { - return $this->container['periodEnding']; + return $this->container['allowLinkedEps']; } /** - * Sets periodEnding + * Sets allowLinkedEps * - * @param \DateTime|null $periodEnding [readonly] + * @param bool|null $allowLinkedEps If true this will allow you to submit a combined Employer Payment Summary * * @return $this */ - public function setPeriodEnding(?\DateTime $periodEnding): static + public function setAllowLinkedEps(?bool $allowLinkedEps): static { - if (is_null($periodEnding)) { - throw new InvalidArgumentException('non-nullable periodEnding cannot be null'); + if (is_null($allowLinkedEps)) { + throw new InvalidArgumentException('non-nullable allowLinkedEps cannot be null'); } - $this->container['periodEnding'] = $periodEnding; + $this->container['allowLinkedEps'] = $allowLinkedEps; return $this; } /** - * Gets periodComplete + * Gets apprenticeshipLevy * - * @return bool|null + * @return float|null */ - public function getPeriodComplete(): ?bool + public function getApprenticeshipLevy(): ?float { - return $this->container['periodComplete']; + return $this->container['apprenticeshipLevy']; } /** - * Sets periodComplete + * Sets apprenticeshipLevy * - * @param bool|null $periodComplete [readonly] Indicates whether or not all PayRuns for this period have been completed + * @param float|null $apprenticeshipLevy Amount due with respect to the Apprenticeship Levy * * @return $this */ - public function setPeriodComplete(?bool $periodComplete): static + public function setApprenticeshipLevy(?float $apprenticeshipLevy): static { - if (is_null($periodComplete)) { - throw new InvalidArgumentException('non-nullable periodComplete cannot be null'); + if (is_null($apprenticeshipLevy)) { + throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); } - $this->container['periodComplete'] = $periodComplete; + $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; return $this; } /** - * Gets recoverableAmountsEpsCreated + * Gets apprenticeshipLevyAuto * * @return bool|null */ - public function getRecoverableAmountsEpsCreated(): ?bool + public function getApprenticeshipLevyAuto(): ?bool { - return $this->container['recoverableAmountsEpsCreated']; + return $this->container['apprenticeshipLevyAuto']; } /** - * Sets recoverableAmountsEpsCreated + * Sets apprenticeshipLevyAuto * - * @param bool|null $recoverableAmountsEpsCreated [readonly] If there are recoverable amount present (ie, SMP) and the Period is complete then this field Indicates whether or not an EPS has been created up to the final tax month of this period to declare the recoverable amounts + * @param bool|null $apprenticeshipLevyAuto If set to true, we'll automatically calculate your liability If set to false then you can enter your own value. If LiableForApprenticeshipLevy is false then the ApprenticeshipLevy will always be overwritten with a zero value regardless of this property * * @return $this */ - public function setRecoverableAmountsEpsCreated(?bool $recoverableAmountsEpsCreated): static + public function setApprenticeshipLevyAuto(?bool $apprenticeshipLevyAuto): static { - if (is_null($recoverableAmountsEpsCreated)) { - throw new InvalidArgumentException('non-nullable recoverableAmountsEpsCreated cannot be null'); + if (is_null($apprenticeshipLevyAuto)) { + throw new InvalidArgumentException('non-nullable apprenticeshipLevyAuto cannot be null'); } - $this->container['recoverableAmountsEpsCreated'] = $recoverableAmountsEpsCreated; + $this->container['apprenticeshipLevyAuto'] = $apprenticeshipLevyAuto; return $this; } @@ -773,143 +739,109 @@ public function setApprenticeshipLevyEpsCreated(?bool $apprenticeshipLevyEpsCrea } /** - * Gets payRuns - * - * @return \SynergiTech\Staffology\Model\PayRun[]|null - */ - public function getPayRuns(): ?array - { - return $this->container['payRuns']; - } - - /** - * Sets payRuns - * - * @param \SynergiTech\Staffology\Model\PayRun[]|null $payRuns payRuns - * - * @return $this - */ - public function setPayRuns(?array $payRuns): static - { - if (is_null($payRuns)) { - array_push($this->openAPINullablesSetToNull, 'payRuns'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payRuns', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['payRuns'] = $payRuns; - - return $this; - } - - /** - * Gets tax + * Gets cisDeductions * * @return float|null */ - public function getTax(): ?float + public function getCisDeductions(): ?float { - return $this->container['tax']; + return $this->container['cisDeductions']; } /** - * Sets tax + * Sets cisDeductions * - * @param float|null $tax [readonly] Amount due to HMRC for PAYE in period + * @param float|null $cisDeductions [readonly] Amount due to HMRC for CIS Deductions made in period * * @return $this */ - public function setTax(?float $tax): static + public function setCisDeductions(?float $cisDeductions): static { - if (is_null($tax)) { - throw new InvalidArgumentException('non-nullable tax cannot be null'); + if (is_null($cisDeductions)) { + throw new InvalidArgumentException('non-nullable cisDeductions cannot be null'); } - $this->container['tax'] = $tax; + $this->container['cisDeductions'] = $cisDeductions; return $this; } /** - * Gets cisDeductions + * Gets cisDeductionsSuffered * * @return float|null */ - public function getCisDeductions(): ?float + public function getCisDeductionsSuffered(): ?float { - return $this->container['cisDeductions']; + return $this->container['cisDeductionsSuffered']; } /** - * Sets cisDeductions + * Sets cisDeductionsSuffered * - * @param float|null $cisDeductions [readonly] Amount due to HMRC for CIS Deductions made in period + * @param float|null $cisDeductionsSuffered CIS Deductions Suffered in Period * * @return $this */ - public function setCisDeductions(?float $cisDeductions): static + public function setCisDeductionsSuffered(?float $cisDeductionsSuffered): static { - if (is_null($cisDeductions)) { - throw new InvalidArgumentException('non-nullable cisDeductions cannot be null'); + if (is_null($cisDeductionsSuffered)) { + throw new InvalidArgumentException('non-nullable cisDeductionsSuffered cannot be null'); } - $this->container['cisDeductions'] = $cisDeductions; + $this->container['cisDeductionsSuffered'] = $cisDeductionsSuffered; return $this; } /** - * Gets postgradLoanDeductions + * Gets dueInPreviousPeriods * * @return float|null */ - public function getPostgradLoanDeductions(): ?float + public function getDueInPreviousPeriods(): ?float { - return $this->container['postgradLoanDeductions']; + return $this->container['dueInPreviousPeriods']; } /** - * Sets postgradLoanDeductions + * Sets dueInPreviousPeriods * - * @param float|null $postgradLoanDeductions [readonly] Amount due to HMRC for Postgrad Loan Deductions made in period + * @param float|null $dueInPreviousPeriods [readonly] Amount due to HMRC in previous periods for this Tax Year * * @return $this */ - public function setPostgradLoanDeductions(?float $postgradLoanDeductions): static + public function setDueInPreviousPeriods(?float $dueInPreviousPeriods): static { - if (is_null($postgradLoanDeductions)) { - throw new InvalidArgumentException('non-nullable postgradLoanDeductions cannot be null'); + if (is_null($dueInPreviousPeriods)) { + throw new InvalidArgumentException('non-nullable dueInPreviousPeriods cannot be null'); } - $this->container['postgradLoanDeductions'] = $postgradLoanDeductions; + $this->container['dueInPreviousPeriods'] = $dueInPreviousPeriods; return $this; } /** - * Gets studentLoanDeductions + * Gets eligibleForEmploymentAllowance * - * @return float|null + * @return bool|null */ - public function getStudentLoanDeductions(): ?float + public function getEligibleForEmploymentAllowance(): ?bool { - return $this->container['studentLoanDeductions']; + return $this->container['eligibleForEmploymentAllowance']; } /** - * Sets studentLoanDeductions + * Sets eligibleForEmploymentAllowance * - * @param float|null $studentLoanDeductions [readonly] Amount due to HMRC for Student Loan Deductions made in period + * @param bool|null $eligibleForEmploymentAllowance [readonly] Indicates whether the Employer settings say the Employer is eligible for Employment Allowance * * @return $this */ - public function setStudentLoanDeductions(?float $studentLoanDeductions): static + public function setEligibleForEmploymentAllowance(?bool $eligibleForEmploymentAllowance): static { - if (is_null($studentLoanDeductions)) { - throw new InvalidArgumentException('non-nullable studentLoanDeductions cannot be null'); + if (is_null($eligibleForEmploymentAllowance)) { + throw new InvalidArgumentException('non-nullable eligibleForEmploymentAllowance cannot be null'); } - $this->container['studentLoanDeductions'] = $studentLoanDeductions; + $this->container['eligibleForEmploymentAllowance'] = $eligibleForEmploymentAllowance; return $this; } @@ -969,906 +901,974 @@ public function setEmployerNic(?float $employerNic): static } /** - * Gets realTimeClass1ANic + * Gets employmentAllowanceClaim * * @return float|null */ - public function getRealTimeClass1ANic(): ?float + public function getEmploymentAllowanceClaim(): ?float { - return $this->container['realTimeClass1ANic']; + return $this->container['employmentAllowanceClaim']; } /** - * Sets realTimeClass1ANic + * Sets employmentAllowanceClaim * - * @param float|null $realTimeClass1ANic [readonly] Amount due to HMRC for Employer NIC Contributions due on payments in period + * @param float|null $employmentAllowanceClaim Amount to claim with respect to the Employment Allowance * * @return $this */ - public function setRealTimeClass1ANic(?float $realTimeClass1ANic): static + public function setEmploymentAllowanceClaim(?float $employmentAllowanceClaim): static { - if (is_null($realTimeClass1ANic)) { - throw new InvalidArgumentException('non-nullable realTimeClass1ANic cannot be null'); + if (is_null($employmentAllowanceClaim)) { + throw new InvalidArgumentException('non-nullable employmentAllowanceClaim cannot be null'); } - $this->container['realTimeClass1ANic'] = $realTimeClass1ANic; + $this->container['employmentAllowanceClaim'] = $employmentAllowanceClaim; return $this; } /** - * Gets smp + * Gets employmentAllowanceClaimAuto * - * @return float|null + * @return bool|null */ - public function getSmp(): ?float + public function getEmploymentAllowanceClaimAuto(): ?bool { - return $this->container['smp']; + return $this->container['employmentAllowanceClaimAuto']; } /** - * Sets smp + * Sets employmentAllowanceClaimAuto * - * @param float|null $smp [readonly] SMP recovered from payments in period + * @param bool|null $employmentAllowanceClaimAuto If set to true, we'll automatically claim the maximum allowed. If set to false then you can enter your own value. If EligibleForEmploymentAllowance is false then the EmploymentAllowanceClaim will always be overwritten with a zero value regardless of this property * * @return $this */ - public function setSmp(?float $smp): static + public function setEmploymentAllowanceClaimAuto(?bool $employmentAllowanceClaimAuto): static { - if (is_null($smp)) { - throw new InvalidArgumentException('non-nullable smp cannot be null'); + if (is_null($employmentAllowanceClaimAuto)) { + throw new InvalidArgumentException('non-nullable employmentAllowanceClaimAuto cannot be null'); } - $this->container['smp'] = $smp; + $this->container['employmentAllowanceClaimAuto'] = $employmentAllowanceClaimAuto; return $this; } /** - * Gets smpNic + * Gets employmentAllowanceClaimInPreviousPeriods * * @return float|null */ - public function getSmpNic(): ?float + public function getEmploymentAllowanceClaimInPreviousPeriods(): ?float { - return $this->container['smpNic']; + return $this->container['employmentAllowanceClaimInPreviousPeriods']; } /** - * Sets smpNic + * Sets employmentAllowanceClaimInPreviousPeriods * - * @param float|null $smpNic [readonly] SMP NIC Compensation for period + * @param float|null $employmentAllowanceClaimInPreviousPeriods [readonly] The amount of Employment Allowance claimed in previous periods for this Tax Year * * @return $this */ - public function setSmpNic(?float $smpNic): static + public function setEmploymentAllowanceClaimInPreviousPeriods(?float $employmentAllowanceClaimInPreviousPeriods): static { - if (is_null($smpNic)) { - throw new InvalidArgumentException('non-nullable smpNic cannot be null'); + if (is_null($employmentAllowanceClaimInPreviousPeriods)) { + throw new InvalidArgumentException('non-nullable employmentAllowanceClaimInPreviousPeriods cannot be null'); } - $this->container['smpNic'] = $smpNic; + $this->container['employmentAllowanceClaimInPreviousPeriods'] = $employmentAllowanceClaimInPreviousPeriods; return $this; } /** - * Gets spp + * Gets fpsList * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getSpp(): ?float + public function getFpsList(): ?array { - return $this->container['spp']; + return $this->container['fpsList']; } /** - * Sets spp + * Sets fpsList * - * @param float|null $spp [readonly] SPP recovered from payments in period + * @param \SynergiTech\Staffology\Model\Item[]|null $fpsList fpsList * * @return $this */ - public function setSpp(?float $spp): static + public function setFpsList(?array $fpsList): static { - if (is_null($spp)) { - throw new InvalidArgumentException('non-nullable spp cannot be null'); + if (is_null($fpsList)) { + array_push($this->openAPINullablesSetToNull, 'fpsList'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fpsList', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['spp'] = $spp; + $this->container['fpsList'] = $fpsList; return $this; } /** - * Gets sppNic + * Gets id * - * @return float|null + * @return string|null */ - public function getSppNic(): ?float + public function getId(): ?string { - return $this->container['sppNic']; + return $this->container['id']; } /** - * Sets sppNic + * Sets id * - * @param float|null $sppNic [readonly] SPP Nic Compensation for period + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setSppNic(?float $sppNic): static + public function setId(?string $id): static { - if (is_null($sppNic)) { - throw new InvalidArgumentException('non-nullable sppNic cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['sppNic'] = $sppNic; + $this->container['id'] = $id; return $this; } /** - * Gets sap + * Gets liabilityArisingInPeriod * * @return float|null */ - public function getSap(): ?float + public function getLiabilityArisingInPeriod(): ?float { - return $this->container['sap']; + return $this->container['liabilityArisingInPeriod']; } /** - * Sets sap + * Sets liabilityArisingInPeriod * - * @param float|null $sap [readonly] SAP recovered from payments in period + * @param float|null $liabilityArisingInPeriod [readonly] Total Liability (before any deductions) arising in this Period * * @return $this */ - public function setSap(?float $sap): static + public function setLiabilityArisingInPeriod(?float $liabilityArisingInPeriod): static { - if (is_null($sap)) { - throw new InvalidArgumentException('non-nullable sap cannot be null'); + if (is_null($liabilityArisingInPeriod)) { + throw new InvalidArgumentException('non-nullable liabilityArisingInPeriod cannot be null'); } - $this->container['sap'] = $sap; + $this->container['liabilityArisingInPeriod'] = $liabilityArisingInPeriod; return $this; } /** - * Gets sapNic + * Gets liableForApprenticeshipLevy + * + * @return bool|null + */ + public function getLiableForApprenticeshipLevy(): ?bool + { + return $this->container['liableForApprenticeshipLevy']; + } + + /** + * Sets liableForApprenticeshipLevy + * + * @param bool|null $liableForApprenticeshipLevy [readonly] Indicates whether the Employer settings say the Employer is liable for the Apprenticeship Levy + * + * @return $this + */ + public function setLiableForApprenticeshipLevy(?bool $liableForApprenticeshipLevy): static + { + if (is_null($liableForApprenticeshipLevy)) { + throw new InvalidArgumentException('non-nullable liableForApprenticeshipLevy cannot be null'); + } + $this->container['liableForApprenticeshipLevy'] = $liableForApprenticeshipLevy; + + return $this; + } + + /** + * Gets netLiabilityForPeriod * * @return float|null */ - public function getSapNic(): ?float + public function getNetLiabilityForPeriod(): ?float { - return $this->container['sapNic']; + return $this->container['netLiabilityForPeriod']; } /** - * Sets sapNic + * Sets netLiabilityForPeriod * - * @param float|null $sapNic [readonly] SAP Nic Compensation for period + * @param float|null $netLiabilityForPeriod [readonly] Net Liability (including any deductions/additions) arising in this Period * * @return $this */ - public function setSapNic(?float $sapNic): static + public function setNetLiabilityForPeriod(?float $netLiabilityForPeriod): static { - if (is_null($sapNic)) { - throw new InvalidArgumentException('non-nullable sapNic cannot be null'); + if (is_null($netLiabilityForPeriod)) { + throw new InvalidArgumentException('non-nullable netLiabilityForPeriod cannot be null'); } - $this->container['sapNic'] = $sapNic; + $this->container['netLiabilityForPeriod'] = $netLiabilityForPeriod; return $this; } /** - * Gets shpp + * Gets paidInPreviousPeriods * * @return float|null */ - public function getShpp(): ?float + public function getPaidInPreviousPeriods(): ?float { - return $this->container['shpp']; + return $this->container['paidInPreviousPeriods']; } /** - * Sets shpp + * Sets paidInPreviousPeriods * - * @param float|null $shpp [readonly] ShPP recovered from payments in period + * @param float|null $paidInPreviousPeriods [readonly] Amount paid to HMRC in previous periods for this Tax Year * * @return $this */ - public function setShpp(?float $shpp): static + public function setPaidInPreviousPeriods(?float $paidInPreviousPeriods): static + { + if (is_null($paidInPreviousPeriods)) { + throw new InvalidArgumentException('non-nullable paidInPreviousPeriods cannot be null'); + } + $this->container['paidInPreviousPeriods'] = $paidInPreviousPeriods; + + return $this; + } + + /** + * Gets payRuns + * + * @return \SynergiTech\Staffology\Model\PayRun[]|null + */ + public function getPayRuns(): ?array + { + return $this->container['payRuns']; + } + + /** + * Sets payRuns + * + * @param \SynergiTech\Staffology\Model\PayRun[]|null $payRuns payRuns + * + * @return $this + */ + public function setPayRuns(?array $payRuns): static { - if (is_null($shpp)) { - throw new InvalidArgumentException('non-nullable shpp cannot be null'); + if (is_null($payRuns)) { + array_push($this->openAPINullablesSetToNull, 'payRuns'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payRuns', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['shpp'] = $shpp; + $this->container['payRuns'] = $payRuns; return $this; } /** - * Gets shppNic + * Gets payments * - * @return float|null + * @return \SynergiTech\Staffology\Model\HmrcPayment[]|null */ - public function getShppNic(): ?float + public function getPayments(): ?array { - return $this->container['shppNic']; + return $this->container['payments']; } /** - * Sets shppNic + * Sets payments * - * @param float|null $shppNic [readonly] ShPP Nic Compensation for period + * @param \SynergiTech\Staffology\Model\HmrcPayment[]|null $payments payments * * @return $this */ - public function setShppNic(?float $shppNic): static + public function setPayments(?array $payments): static { - if (is_null($shppNic)) { - throw new InvalidArgumentException('non-nullable shppNic cannot be null'); + if (is_null($payments)) { + array_push($this->openAPINullablesSetToNull, 'payments'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payments', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['shppNic'] = $shppNic; + $this->container['payments'] = $payments; return $this; } /** - * Gets spbp + * Gets periodComplete * - * @return float|null + * @return bool|null */ - public function getSpbp(): ?float + public function getPeriodComplete(): ?bool { - return $this->container['spbp']; + return $this->container['periodComplete']; } /** - * Sets spbp + * Sets periodComplete * - * @param float|null $spbp [readonly] SPBP recovered from payments in period + * @param bool|null $periodComplete [readonly] Indicates whether or not all PayRuns for this period have been completed * * @return $this */ - public function setSpbp(?float $spbp): static + public function setPeriodComplete(?bool $periodComplete): static { - if (is_null($spbp)) { - throw new InvalidArgumentException('non-nullable spbp cannot be null'); + if (is_null($periodComplete)) { + throw new InvalidArgumentException('non-nullable periodComplete cannot be null'); } - $this->container['spbp'] = $spbp; + $this->container['periodComplete'] = $periodComplete; return $this; } /** - * Gets spbpNic + * Gets periodEnding * - * @return float|null + * @return \DateTime|null */ - public function getSpbpNic(): ?float + public function getPeriodEnding(): ?\DateTime { - return $this->container['spbpNic']; + return $this->container['periodEnding']; } /** - * Sets spbpNic + * Sets periodEnding * - * @param float|null $spbpNic [readonly] SPBP Nic Compensation for period + * @param \DateTime|null $periodEnding [readonly] * * @return $this */ - public function setSpbpNic(?float $spbpNic): static + public function setPeriodEnding(?\DateTime $periodEnding): static { - if (is_null($spbpNic)) { - throw new InvalidArgumentException('non-nullable spbpNic cannot be null'); + if (is_null($periodEnding)) { + throw new InvalidArgumentException('non-nullable periodEnding cannot be null'); } - $this->container['spbpNic'] = $spbpNic; + $this->container['periodEnding'] = $periodEnding; return $this; } /** - * Gets sncp + * Gets postgradLoanDeductions * * @return float|null */ - public function getSncp(): ?float + public function getPostgradLoanDeductions(): ?float { - return $this->container['sncp']; + return $this->container['postgradLoanDeductions']; } /** - * Sets sncp + * Sets postgradLoanDeductions * - * @param float|null $sncp [readonly] SNCP recovered from payments in period + * @param float|null $postgradLoanDeductions [readonly] Amount due to HMRC for Postgrad Loan Deductions made in period * * @return $this */ - public function setSncp(?float $sncp): static + public function setPostgradLoanDeductions(?float $postgradLoanDeductions): static { - if (is_null($sncp)) { - throw new InvalidArgumentException('non-nullable sncp cannot be null'); + if (is_null($postgradLoanDeductions)) { + throw new InvalidArgumentException('non-nullable postgradLoanDeductions cannot be null'); } - $this->container['sncp'] = $sncp; + $this->container['postgradLoanDeductions'] = $postgradLoanDeductions; return $this; } /** - * Gets sncpNic + * Gets realTimeClass1ANic * * @return float|null */ - public function getSncpNic(): ?float + public function getRealTimeClass1ANic(): ?float { - return $this->container['sncpNic']; + return $this->container['realTimeClass1ANic']; } /** - * Sets sncpNic + * Sets realTimeClass1ANic * - * @param float|null $sncpNic [readonly] SNCP Nic Compensation for period + * @param float|null $realTimeClass1ANic [readonly] Amount due to HMRC for Employer NIC Contributions due on payments in period * * @return $this */ - public function setSncpNic(?float $sncpNic): static + public function setRealTimeClass1ANic(?float $realTimeClass1ANic): static { - if (is_null($sncpNic)) { - throw new InvalidArgumentException('non-nullable sncpNic cannot be null'); + if (is_null($realTimeClass1ANic)) { + throw new InvalidArgumentException('non-nullable realTimeClass1ANic cannot be null'); } - $this->container['sncpNic'] = $sncpNic; + $this->container['realTimeClass1ANic'] = $realTimeClass1ANic; return $this; } /** - * Gets eligibleForEmploymentAllowance + * Gets receivedFromHMRCToPayStatutoryPay * - * @return bool|null + * @return float|null */ - public function getEligibleForEmploymentAllowance(): ?bool + public function getReceivedFromHMRCToPayStatutoryPay(): ?float { - return $this->container['eligibleForEmploymentAllowance']; + return $this->container['receivedFromHMRCToPayStatutoryPay']; } /** - * Sets eligibleForEmploymentAllowance + * Sets receivedFromHMRCToPayStatutoryPay * - * @param bool|null $eligibleForEmploymentAllowance [readonly] Indicates whether the Employer settings say the Employer is eligible for Employment Allowance + * @param float|null $receivedFromHMRCToPayStatutoryPay Any amount received from HMRC to pay Statutory Pay Period * * @return $this */ - public function setEligibleForEmploymentAllowance(?bool $eligibleForEmploymentAllowance): static + public function setReceivedFromHMRCToPayStatutoryPay(?float $receivedFromHMRCToPayStatutoryPay): static { - if (is_null($eligibleForEmploymentAllowance)) { - throw new InvalidArgumentException('non-nullable eligibleForEmploymentAllowance cannot be null'); + if (is_null($receivedFromHMRCToPayStatutoryPay)) { + throw new InvalidArgumentException('non-nullable receivedFromHMRCToPayStatutoryPay cannot be null'); } - $this->container['eligibleForEmploymentAllowance'] = $eligibleForEmploymentAllowance; + $this->container['receivedFromHMRCToPayStatutoryPay'] = $receivedFromHMRCToPayStatutoryPay; return $this; } /** - * Gets employmentAllowanceClaim + * Gets receivedFromHMRCToRefundTax * * @return float|null */ - public function getEmploymentAllowanceClaim(): ?float + public function getReceivedFromHMRCToRefundTax(): ?float { - return $this->container['employmentAllowanceClaim']; + return $this->container['receivedFromHMRCToRefundTax']; } /** - * Sets employmentAllowanceClaim + * Sets receivedFromHMRCToRefundTax * - * @param float|null $employmentAllowanceClaim Amount to claim with respect to the Employment Allowance + * @param float|null $receivedFromHMRCToRefundTax Any amount received from HMRC to refund Tax in Period * * @return $this */ - public function setEmploymentAllowanceClaim(?float $employmentAllowanceClaim): static + public function setReceivedFromHMRCToRefundTax(?float $receivedFromHMRCToRefundTax): static { - if (is_null($employmentAllowanceClaim)) { - throw new InvalidArgumentException('non-nullable employmentAllowanceClaim cannot be null'); + if (is_null($receivedFromHMRCToRefundTax)) { + throw new InvalidArgumentException('non-nullable receivedFromHMRCToRefundTax cannot be null'); } - $this->container['employmentAllowanceClaim'] = $employmentAllowanceClaim; + $this->container['receivedFromHMRCToRefundTax'] = $receivedFromHMRCToRefundTax; return $this; } /** - * Gets employmentAllowanceClaimAuto + * Gets recoverableAmountsEpsCreated * * @return bool|null */ - public function getEmploymentAllowanceClaimAuto(): ?bool + public function getRecoverableAmountsEpsCreated(): ?bool { - return $this->container['employmentAllowanceClaimAuto']; + return $this->container['recoverableAmountsEpsCreated']; } /** - * Sets employmentAllowanceClaimAuto + * Sets recoverableAmountsEpsCreated * - * @param bool|null $employmentAllowanceClaimAuto If set to true, we'll automatically claim the maximum allowed. If set to false then you can enter your own value. If EligibleForEmploymentAllowance is false then the EmploymentAllowanceClaim will always be overwritten with a zero value regardless of this property + * @param bool|null $recoverableAmountsEpsCreated [readonly] If there are recoverable amount present (ie, SMP) and the Period is complete then this field Indicates whether or not an EPS has been created up to the final tax month of this period to declare the recoverable amounts * * @return $this */ - public function setEmploymentAllowanceClaimAuto(?bool $employmentAllowanceClaimAuto): static + public function setRecoverableAmountsEpsCreated(?bool $recoverableAmountsEpsCreated): static { - if (is_null($employmentAllowanceClaimAuto)) { - throw new InvalidArgumentException('non-nullable employmentAllowanceClaimAuto cannot be null'); + if (is_null($recoverableAmountsEpsCreated)) { + throw new InvalidArgumentException('non-nullable recoverableAmountsEpsCreated cannot be null'); } - $this->container['employmentAllowanceClaimAuto'] = $employmentAllowanceClaimAuto; + $this->container['recoverableAmountsEpsCreated'] = $recoverableAmountsEpsCreated; return $this; } /** - * Gets liableForApprenticeshipLevy + * Gets sap * - * @return bool|null + * @return float|null */ - public function getLiableForApprenticeshipLevy(): ?bool + public function getSap(): ?float { - return $this->container['liableForApprenticeshipLevy']; + return $this->container['sap']; } /** - * Sets liableForApprenticeshipLevy + * Sets sap * - * @param bool|null $liableForApprenticeshipLevy [readonly] Indicates whether the Employer settings say the Employer is liable for the Apprenticeship Levy + * @param float|null $sap [readonly] SAP recovered from payments in period * * @return $this */ - public function setLiableForApprenticeshipLevy(?bool $liableForApprenticeshipLevy): static + public function setSap(?float $sap): static { - if (is_null($liableForApprenticeshipLevy)) { - throw new InvalidArgumentException('non-nullable liableForApprenticeshipLevy cannot be null'); + if (is_null($sap)) { + throw new InvalidArgumentException('non-nullable sap cannot be null'); } - $this->container['liableForApprenticeshipLevy'] = $liableForApprenticeshipLevy; + $this->container['sap'] = $sap; return $this; } /** - * Gets apprenticeshipLevy + * Gets sapNic * * @return float|null */ - public function getApprenticeshipLevy(): ?float + public function getSapNic(): ?float { - return $this->container['apprenticeshipLevy']; + return $this->container['sapNic']; } /** - * Sets apprenticeshipLevy + * Sets sapNic * - * @param float|null $apprenticeshipLevy Amount due with respect to the Apprenticeship Levy + * @param float|null $sapNic [readonly] SAP Nic Compensation for period * * @return $this */ - public function setApprenticeshipLevy(?float $apprenticeshipLevy): static + public function setSapNic(?float $sapNic): static { - if (is_null($apprenticeshipLevy)) { - throw new InvalidArgumentException('non-nullable apprenticeshipLevy cannot be null'); + if (is_null($sapNic)) { + throw new InvalidArgumentException('non-nullable sapNic cannot be null'); } - $this->container['apprenticeshipLevy'] = $apprenticeshipLevy; + $this->container['sapNic'] = $sapNic; return $this; } /** - * Gets apprenticeshipLevyAuto + * Gets shpp * - * @return bool|null + * @return float|null */ - public function getApprenticeshipLevyAuto(): ?bool + public function getShpp(): ?float { - return $this->container['apprenticeshipLevyAuto']; + return $this->container['shpp']; } /** - * Sets apprenticeshipLevyAuto + * Sets shpp * - * @param bool|null $apprenticeshipLevyAuto If set to true, we'll automatically calculate your liability If set to false then you can enter your own value. If LiableForApprenticeshipLevy is false then the ApprenticeshipLevy will always be overwritten with a zero value regardless of this property + * @param float|null $shpp [readonly] ShPP recovered from payments in period * * @return $this */ - public function setApprenticeshipLevyAuto(?bool $apprenticeshipLevyAuto): static + public function setShpp(?float $shpp): static { - if (is_null($apprenticeshipLevyAuto)) { - throw new InvalidArgumentException('non-nullable apprenticeshipLevyAuto cannot be null'); + if (is_null($shpp)) { + throw new InvalidArgumentException('non-nullable shpp cannot be null'); } - $this->container['apprenticeshipLevyAuto'] = $apprenticeshipLevyAuto; + $this->container['shpp'] = $shpp; return $this; } /** - * Gets liabilityArisingInPeriod + * Gets shppNic * * @return float|null */ - public function getLiabilityArisingInPeriod(): ?float + public function getShppNic(): ?float { - return $this->container['liabilityArisingInPeriod']; + return $this->container['shppNic']; } /** - * Sets liabilityArisingInPeriod + * Sets shppNic * - * @param float|null $liabilityArisingInPeriod [readonly] Total Liability (before any deductions) arising in this Period + * @param float|null $shppNic [readonly] ShPP Nic Compensation for period * * @return $this */ - public function setLiabilityArisingInPeriod(?float $liabilityArisingInPeriod): static + public function setShppNic(?float $shppNic): static { - if (is_null($liabilityArisingInPeriod)) { - throw new InvalidArgumentException('non-nullable liabilityArisingInPeriod cannot be null'); + if (is_null($shppNic)) { + throw new InvalidArgumentException('non-nullable shppNic cannot be null'); } - $this->container['liabilityArisingInPeriod'] = $liabilityArisingInPeriod; + $this->container['shppNic'] = $shppNic; return $this; } /** - * Gets dueInPreviousPeriods + * Gets smp * * @return float|null */ - public function getDueInPreviousPeriods(): ?float + public function getSmp(): ?float { - return $this->container['dueInPreviousPeriods']; + return $this->container['smp']; } /** - * Sets dueInPreviousPeriods + * Sets smp * - * @param float|null $dueInPreviousPeriods [readonly] Amount due to HMRC in previous periods for this Tax Year + * @param float|null $smp [readonly] SMP recovered from payments in period * * @return $this */ - public function setDueInPreviousPeriods(?float $dueInPreviousPeriods): static + public function setSmp(?float $smp): static { - if (is_null($dueInPreviousPeriods)) { - throw new InvalidArgumentException('non-nullable dueInPreviousPeriods cannot be null'); + if (is_null($smp)) { + throw new InvalidArgumentException('non-nullable smp cannot be null'); } - $this->container['dueInPreviousPeriods'] = $dueInPreviousPeriods; + $this->container['smp'] = $smp; return $this; } /** - * Gets paidInPreviousPeriods + * Gets smpNic * * @return float|null */ - public function getPaidInPreviousPeriods(): ?float + public function getSmpNic(): ?float { - return $this->container['paidInPreviousPeriods']; + return $this->container['smpNic']; } /** - * Sets paidInPreviousPeriods + * Sets smpNic * - * @param float|null $paidInPreviousPeriods [readonly] Amount paid to HMRC in previous periods for this Tax Year + * @param float|null $smpNic [readonly] SMP NIC Compensation for period * * @return $this */ - public function setPaidInPreviousPeriods(?float $paidInPreviousPeriods): static + public function setSmpNic(?float $smpNic): static { - if (is_null($paidInPreviousPeriods)) { - throw new InvalidArgumentException('non-nullable paidInPreviousPeriods cannot be null'); + if (is_null($smpNic)) { + throw new InvalidArgumentException('non-nullable smpNic cannot be null'); } - $this->container['paidInPreviousPeriods'] = $paidInPreviousPeriods; + $this->container['smpNic'] = $smpNic; return $this; } /** - * Gets employmentAllowanceClaimInPreviousPeriods + * Gets sncp * * @return float|null */ - public function getEmploymentAllowanceClaimInPreviousPeriods(): ?float + public function getSncp(): ?float { - return $this->container['employmentAllowanceClaimInPreviousPeriods']; + return $this->container['sncp']; } /** - * Sets employmentAllowanceClaimInPreviousPeriods + * Sets sncp * - * @param float|null $employmentAllowanceClaimInPreviousPeriods [readonly] The amount of Employment Allowance claimed in previous periods for this Tax Year + * @param float|null $sncp [readonly] SNCP recovered from payments in period * * @return $this */ - public function setEmploymentAllowanceClaimInPreviousPeriods(?float $employmentAllowanceClaimInPreviousPeriods): static + public function setSncp(?float $sncp): static { - if (is_null($employmentAllowanceClaimInPreviousPeriods)) { - throw new InvalidArgumentException('non-nullable employmentAllowanceClaimInPreviousPeriods cannot be null'); + if (is_null($sncp)) { + throw new InvalidArgumentException('non-nullable sncp cannot be null'); } - $this->container['employmentAllowanceClaimInPreviousPeriods'] = $employmentAllowanceClaimInPreviousPeriods; + $this->container['sncp'] = $sncp; return $this; } /** - * Gets receivedFromHMRCToRefundTax + * Gets sncpNic * * @return float|null */ - public function getReceivedFromHMRCToRefundTax(): ?float + public function getSncpNic(): ?float { - return $this->container['receivedFromHMRCToRefundTax']; + return $this->container['sncpNic']; } /** - * Sets receivedFromHMRCToRefundTax + * Sets sncpNic * - * @param float|null $receivedFromHMRCToRefundTax Any amount received from HMRC to refund Tax in Period + * @param float|null $sncpNic [readonly] SNCP Nic Compensation for period * * @return $this */ - public function setReceivedFromHMRCToRefundTax(?float $receivedFromHMRCToRefundTax): static + public function setSncpNic(?float $sncpNic): static { - if (is_null($receivedFromHMRCToRefundTax)) { - throw new InvalidArgumentException('non-nullable receivedFromHMRCToRefundTax cannot be null'); + if (is_null($sncpNic)) { + throw new InvalidArgumentException('non-nullable sncpNic cannot be null'); } - $this->container['receivedFromHMRCToRefundTax'] = $receivedFromHMRCToRefundTax; + $this->container['sncpNic'] = $sncpNic; return $this; } /** - * Gets receivedFromHMRCToPayStatutoryPay + * Gets spbp * * @return float|null */ - public function getReceivedFromHMRCToPayStatutoryPay(): ?float + public function getSpbp(): ?float { - return $this->container['receivedFromHMRCToPayStatutoryPay']; + return $this->container['spbp']; } /** - * Sets receivedFromHMRCToPayStatutoryPay + * Sets spbp * - * @param float|null $receivedFromHMRCToPayStatutoryPay Any amount received from HMRC to pay Statutory Pay Period + * @param float|null $spbp [readonly] SPBP recovered from payments in period * * @return $this */ - public function setReceivedFromHMRCToPayStatutoryPay(?float $receivedFromHMRCToPayStatutoryPay): static + public function setSpbp(?float $spbp): static { - if (is_null($receivedFromHMRCToPayStatutoryPay)) { - throw new InvalidArgumentException('non-nullable receivedFromHMRCToPayStatutoryPay cannot be null'); + if (is_null($spbp)) { + throw new InvalidArgumentException('non-nullable spbp cannot be null'); } - $this->container['receivedFromHMRCToPayStatutoryPay'] = $receivedFromHMRCToPayStatutoryPay; + $this->container['spbp'] = $spbp; return $this; } /** - * Gets cisDeductionsSuffered + * Gets spbpNic * * @return float|null */ - public function getCisDeductionsSuffered(): ?float + public function getSpbpNic(): ?float { - return $this->container['cisDeductionsSuffered']; + return $this->container['spbpNic']; } /** - * Sets cisDeductionsSuffered + * Sets spbpNic * - * @param float|null $cisDeductionsSuffered CIS Deductions Suffered in Period + * @param float|null $spbpNic [readonly] SPBP Nic Compensation for period * * @return $this */ - public function setCisDeductionsSuffered(?float $cisDeductionsSuffered): static + public function setSpbpNic(?float $spbpNic): static { - if (is_null($cisDeductionsSuffered)) { - throw new InvalidArgumentException('non-nullable cisDeductionsSuffered cannot be null'); + if (is_null($spbpNic)) { + throw new InvalidArgumentException('non-nullable spbpNic cannot be null'); } - $this->container['cisDeductionsSuffered'] = $cisDeductionsSuffered; + $this->container['spbpNic'] = $spbpNic; return $this; } /** - * Gets adjustment + * Gets spp * * @return float|null */ - public function getAdjustment(): ?float + public function getSpp(): ?float { - return $this->container['adjustment']; + return $this->container['spp']; } /** - * Sets adjustment + * Sets spp * - * @param float|null $adjustment Any manual adjustment for Period + * @param float|null $spp [readonly] SPP recovered from payments in period * * @return $this */ - public function setAdjustment(?float $adjustment): static + public function setSpp(?float $spp): static { - if (is_null($adjustment)) { - throw new InvalidArgumentException('non-nullable adjustment cannot be null'); + if (is_null($spp)) { + throw new InvalidArgumentException('non-nullable spp cannot be null'); } - $this->container['adjustment'] = $adjustment; + $this->container['spp'] = $spp; return $this; } /** - * Gets netLiabilityForPeriod + * Gets sppNic * * @return float|null */ - public function getNetLiabilityForPeriod(): ?float + public function getSppNic(): ?float { - return $this->container['netLiabilityForPeriod']; + return $this->container['sppNic']; } /** - * Sets netLiabilityForPeriod + * Sets sppNic * - * @param float|null $netLiabilityForPeriod [readonly] Net Liability (including any deductions/additions) arising in this Period + * @param float|null $sppNic [readonly] SPP Nic Compensation for period * * @return $this */ - public function setNetLiabilityForPeriod(?float $netLiabilityForPeriod): static + public function setSppNic(?float $sppNic): static { - if (is_null($netLiabilityForPeriod)) { - throw new InvalidArgumentException('non-nullable netLiabilityForPeriod cannot be null'); + if (is_null($sppNic)) { + throw new InvalidArgumentException('non-nullable sppNic cannot be null'); } - $this->container['netLiabilityForPeriod'] = $netLiabilityForPeriod; + $this->container['sppNic'] = $sppNic; return $this; } /** - * Gets totalPaid + * Gets studentLoanDeductions * * @return float|null */ - public function getTotalPaid(): ?float + public function getStudentLoanDeductions(): ?float { - return $this->container['totalPaid']; + return $this->container['studentLoanDeductions']; } /** - * Sets totalPaid + * Sets studentLoanDeductions * - * @param float|null $totalPaid [readonly] The total value of all payments in this period + * @param float|null $studentLoanDeductions [readonly] Amount due to HMRC for Student Loan Deductions made in period * * @return $this */ - public function setTotalPaid(?float $totalPaid): static + public function setStudentLoanDeductions(?float $studentLoanDeductions): static { - if (is_null($totalPaid)) { - throw new InvalidArgumentException('non-nullable totalPaid cannot be null'); + if (is_null($studentLoanDeductions)) { + throw new InvalidArgumentException('non-nullable studentLoanDeductions cannot be null'); } - $this->container['totalPaid'] = $totalPaid; + $this->container['studentLoanDeductions'] = $studentLoanDeductions; return $this; } /** - * Gets payments + * Gets tax * - * @return \SynergiTech\Staffology\Model\HmrcPayment[]|null + * @return float|null */ - public function getPayments(): ?array + public function getTax(): ?float { - return $this->container['payments']; + return $this->container['tax']; } /** - * Sets payments + * Sets tax * - * @param \SynergiTech\Staffology\Model\HmrcPayment[]|null $payments payments + * @param float|null $tax [readonly] Amount due to HMRC for PAYE in period * * @return $this */ - public function setPayments(?array $payments): static + public function setTax(?float $tax): static { - if (is_null($payments)) { - array_push($this->openAPINullablesSetToNull, 'payments'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payments', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($tax)) { + throw new InvalidArgumentException('non-nullable tax cannot be null'); } - $this->container['payments'] = $payments; + $this->container['tax'] = $tax; return $this; } /** - * Gets fpsList + * Gets taxYear * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getFpsList(): ?array + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['fpsList']; + return $this->container['taxYear']; } /** - * Sets fpsList + * Sets taxYear * - * @param \SynergiTech\Staffology\Model\Item[]|null $fpsList fpsList + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setFpsList(?array $fpsList): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($fpsList)) { - array_push($this->openAPINullablesSetToNull, 'fpsList'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fpsList', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['fpsList'] = $fpsList; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets allowLinkedEps + * Gets title * - * @return bool|null + * @return string|null */ - public function getAllowLinkedEps(): ?bool + public function getTitle(): ?string { - return $this->container['allowLinkedEps']; + return $this->container['title']; } /** - * Sets allowLinkedEps + * Sets title * - * @param bool|null $allowLinkedEps If true this will allow you to submit a combined Employer Payment Summary + * @param string|null $title [readonly] A descriptive name for the Period * * @return $this */ - public function setAllowLinkedEps(?bool $allowLinkedEps): static + public function setTitle(?string $title): static { - if (is_null($allowLinkedEps)) { - throw new InvalidArgumentException('non-nullable allowLinkedEps cannot be null'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['allowLinkedEps'] = $allowLinkedEps; + $this->container['title'] = $title; return $this; } /** - * Gets id + * Gets totalPaid * - * @return string|null + * @return float|null */ - public function getId(): ?string + public function getTotalPaid(): ?float { - return $this->container['id']; + return $this->container['totalPaid']; } /** - * Sets id + * Sets totalPaid * - * @param string|null $id [readonly] The unique id of the object + * @param float|null $totalPaid [readonly] The total value of all payments in this period * * @return $this */ - public function setId(?string $id): static + public function setTotalPaid(?float $totalPaid): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($totalPaid)) { + throw new InvalidArgumentException('non-nullable totalPaid cannot be null'); } - $this->container['id'] = $id; + $this->container['totalPaid'] = $totalPaid; return $this; } diff --git a/src/Model/HmrcPayment.php b/src/Model/HmrcPayment.php index baf186e..ee42bde 100644 --- a/src/Model/HmrcPayment.php +++ b/src/Model/HmrcPayment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/HolidayAccrual.php b/src/Model/HolidayAccrual.php index 7fdffb9..5d604d8 100644 --- a/src/Model/HolidayAccrual.php +++ b/src/Model/HolidayAccrual.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/HolidayAccrualDefaultRateType.php b/src/Model/HolidayAccrualDefaultRateType.php index ed26998..fc26b2f 100644 --- a/src/Model/HolidayAccrualDefaultRateType.php +++ b/src/Model/HolidayAccrualDefaultRateType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/HolidayReport.php b/src/Model/HolidayReport.php index 352fe28..f2b0c87 100644 --- a/src/Model/HolidayReport.php +++ b/src/Model/HolidayReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class HolidayReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'accrualsReport' => 'bool', 'accrualsHrsReport' => 'bool', + 'accrualsReport' => 'bool', 'employer' => '\SynergiTech\Staffology\Model\Item', + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\HolidayReportLine[]', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -75,14 +75,14 @@ class HolidayReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'accrualsReport' => null, 'accrualsHrsReport' => null, + 'accrualsReport' => null, 'employer' => null, + 'isDraft' => null, 'lines' => null, 'report' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -91,14 +91,14 @@ class HolidayReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'accrualsReport' => false, 'accrualsHrsReport' => false, + 'accrualsReport' => false, 'employer' => false, + 'isDraft' => false, 'lines' => true, 'report' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -187,14 +187,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'accrualsReport' => 'accrualsReport', 'accrualsHrsReport' => 'accrualsHrsReport', + 'accrualsReport' => 'accrualsReport', 'employer' => 'employer', + 'isDraft' => 'isDraft', 'lines' => 'lines', 'report' => 'report', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -203,14 +203,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'accrualsReport' => 'setAccrualsReport', 'accrualsHrsReport' => 'setAccrualsHrsReport', + 'accrualsReport' => 'setAccrualsReport', 'employer' => 'setEmployer', + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', 'report' => 'setReport', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -219,14 +219,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'accrualsReport' => 'getAccrualsReport', 'accrualsHrsReport' => 'getAccrualsHrsReport', + 'accrualsReport' => 'getAccrualsReport', 'employer' => 'getEmployer', + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', 'report' => 'getReport', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -285,14 +285,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('accrualsReport', $data ?? [], null); $this->setIfExists('accrualsHrsReport', $data ?? [], null); + $this->setIfExists('accrualsReport', $data ?? [], null); $this->setIfExists('employer', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -338,55 +338,55 @@ public function valid(): bool /** - * Gets accrualsReport + * Gets accrualsHrsReport * * @return bool|null */ - public function getAccrualsReport(): ?bool + public function getAccrualsHrsReport(): ?bool { - return $this->container['accrualsReport']; + return $this->container['accrualsHrsReport']; } /** - * Sets accrualsReport + * Sets accrualsHrsReport * - * @param bool|null $accrualsReport accrualsReport + * @param bool|null $accrualsHrsReport accrualsHrsReport * * @return $this */ - public function setAccrualsReport(?bool $accrualsReport): static + public function setAccrualsHrsReport(?bool $accrualsHrsReport): static { - if (is_null($accrualsReport)) { - throw new InvalidArgumentException('non-nullable accrualsReport cannot be null'); + if (is_null($accrualsHrsReport)) { + throw new InvalidArgumentException('non-nullable accrualsHrsReport cannot be null'); } - $this->container['accrualsReport'] = $accrualsReport; + $this->container['accrualsHrsReport'] = $accrualsHrsReport; return $this; } /** - * Gets accrualsHrsReport + * Gets accrualsReport * * @return bool|null */ - public function getAccrualsHrsReport(): ?bool + public function getAccrualsReport(): ?bool { - return $this->container['accrualsHrsReport']; + return $this->container['accrualsReport']; } /** - * Sets accrualsHrsReport + * Sets accrualsReport * - * @param bool|null $accrualsHrsReport accrualsHrsReport + * @param bool|null $accrualsReport accrualsReport * * @return $this */ - public function setAccrualsHrsReport(?bool $accrualsHrsReport): static + public function setAccrualsReport(?bool $accrualsReport): static { - if (is_null($accrualsHrsReport)) { - throw new InvalidArgumentException('non-nullable accrualsHrsReport cannot be null'); + if (is_null($accrualsReport)) { + throw new InvalidArgumentException('non-nullable accrualsReport cannot be null'); } - $this->container['accrualsHrsReport'] = $accrualsHrsReport; + $this->container['accrualsReport'] = $accrualsReport; return $this; } @@ -418,6 +418,33 @@ public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): stat return $this; } + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + /** * Gets lines * @@ -539,33 +566,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/HolidayReportLine.php b/src/Model/HolidayReportLine.php index 44445fa..f7a14a2 100644 --- a/src/Model/HolidayReportLine.php +++ b/src/Model/HolidayReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class HolidayReportLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'employee' => '\SynergiTech\Staffology\Model\Item', - 'payrollCode' => 'string', - 'department' => 'string', 'dayRate' => 'float', - 'leaveSettings' => '\SynergiTech\Staffology\Model\LeaveSettings' + 'department' => 'string', + 'employee' => '\SynergiTech\Staffology\Model\Item', + 'leaveSettings' => '\SynergiTech\Staffology\Model\LeaveSettings', + 'payrollCode' => 'string' ]; /** @@ -72,11 +72,11 @@ class HolidayReportLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'employee' => null, - 'payrollCode' => null, - 'department' => null, 'dayRate' => 'double', - 'leaveSettings' => null + 'department' => null, + 'employee' => null, + 'leaveSettings' => null, + 'payrollCode' => null ]; /** @@ -85,11 +85,11 @@ class HolidayReportLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'employee' => false, - 'payrollCode' => true, - 'department' => true, 'dayRate' => true, - 'leaveSettings' => false + 'department' => true, + 'employee' => false, + 'leaveSettings' => false, + 'payrollCode' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employee' => 'employee', - 'payrollCode' => 'payrollCode', - 'department' => 'department', 'dayRate' => 'dayRate', - 'leaveSettings' => 'leaveSettings' + 'department' => 'department', + 'employee' => 'employee', + 'leaveSettings' => 'leaveSettings', + 'payrollCode' => 'payrollCode' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employee' => 'setEmployee', - 'payrollCode' => 'setPayrollCode', - 'department' => 'setDepartment', 'dayRate' => 'setDayRate', - 'leaveSettings' => 'setLeaveSettings' + 'department' => 'setDepartment', + 'employee' => 'setEmployee', + 'leaveSettings' => 'setLeaveSettings', + 'payrollCode' => 'setPayrollCode' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employee' => 'getEmployee', - 'payrollCode' => 'getPayrollCode', - 'department' => 'getDepartment', 'dayRate' => 'getDayRate', - 'leaveSettings' => 'getLeaveSettings' + 'department' => 'getDepartment', + 'employee' => 'getEmployee', + 'leaveSettings' => 'getLeaveSettings', + 'payrollCode' => 'getPayrollCode' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); $this->setIfExists('dayRate', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('leaveSettings', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); } /** @@ -317,62 +317,35 @@ public function valid(): bool /** - * Gets employee - * - * @return \SynergiTech\Staffology\Model\Item|null - */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item - { - return $this->container['employee']; - } - - /** - * Sets employee - * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee - * - * @return $this - */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static - { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); - } - $this->container['employee'] = $employee; - - return $this; - } - - /** - * Gets payrollCode + * Gets dayRate * - * @return string|null + * @return float|null */ - public function getPayrollCode(): ?string + public function getDayRate(): ?float { - return $this->container['payrollCode']; + return $this->container['dayRate']; } /** - * Sets payrollCode + * Sets dayRate * - * @param string|null $payrollCode payrollCode + * @param float|null $dayRate dayRate * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setDayRate(?float $dayRate): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); + if (is_null($dayRate)) { + array_push($this->openAPINullablesSetToNull, 'dayRate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); + $index = array_search('dayRate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payrollCode'] = $payrollCode; + $this->container['dayRate'] = $dayRate; return $this; } @@ -412,35 +385,28 @@ public function setDepartment(?string $department): static } /** - * Gets dayRate + * Gets employee * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getDayRate(): ?float + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['dayRate']; + return $this->container['employee']; } /** - * Sets dayRate + * Sets employee * - * @param float|null $dayRate dayRate + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setDayRate(?float $dayRate): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($dayRate)) { - array_push($this->openAPINullablesSetToNull, 'dayRate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('dayRate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['dayRate'] = $dayRate; + $this->container['employee'] = $employee; return $this; } @@ -471,6 +437,40 @@ public function setLeaveSettings(?\SynergiTech\Staffology\Model\LeaveSettings $l return $this; } + + /** + * Gets payrollCode + * + * @return string|null + */ + public function getPayrollCode(): ?string + { + return $this->container['payrollCode']; + } + + /** + * Sets payrollCode + * + * @param string|null $payrollCode payrollCode + * + * @return $this + */ + public function setPayrollCode(?string $payrollCode): static + { + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payrollCode'] = $payrollCode; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/HolidayReportReportResponse.php b/src/Model/HolidayReportReportResponse.php index 022a8c4..6bab06d 100644 --- a/src/Model/HolidayReportReportResponse.php +++ b/src/Model/HolidayReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class HolidayReportReportResponse implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\HolidayReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class HolidayReportReportResponse implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class HolidayReportReportResponse implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/HolidaySchemeDurationType.php b/src/Model/HolidaySchemeDurationType.php index 0672f1b..43b13c9 100644 --- a/src/Model/HolidaySchemeDurationType.php +++ b/src/Model/HolidaySchemeDurationType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/HolidayType.php b/src/Model/HolidayType.php index 6f5fae6..ff21126 100644 --- a/src/Model/HolidayType.php +++ b/src/Model/HolidayType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/HourlyPayReport.php b/src/Model/HourlyPayReport.php index 13aecea..d30fc05 100644 --- a/src/Model/HourlyPayReport.php +++ b/src/Model/HourlyPayReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,20 +59,21 @@ class HourlyPayReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'lines' => '\SynergiTech\Staffology\Model\HourlyPayReportLine[]', 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'isDraft' => 'bool', + 'lines' => '\SynergiTech\Staffology\Model\HourlyPayReportLine[]', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -81,20 +82,21 @@ class HourlyPayReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'lines' => null, 'employer' => null, - 'payPeriod' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'isDraft' => null, + 'lines' => null, 'ordinal' => 'int32', + 'payPeriod' => null, 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -103,20 +105,21 @@ class HourlyPayReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'lines' => true, 'employer' => false, - 'payPeriod' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'isDraft' => false, + 'lines' => true, 'ordinal' => false, + 'payPeriod' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -205,20 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'lines' => 'lines', 'employer' => 'employer', - 'payPeriod' => 'payPeriod', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'isDraft' => 'isDraft', + 'lines' => 'lines', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -227,20 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'lines' => 'setLines', 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'isDraft' => 'setIsDraft', + 'lines' => 'setLines', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -249,20 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'lines' => 'getLines', 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'isDraft' => 'getIsDraft', + 'lines' => 'getLines', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -321,20 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -380,89 +387,150 @@ public function valid(): bool /** - * Gets lines + * Gets employer * - * @return \SynergiTech\Staffology\Model\HourlyPayReportLine[]|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getLines(): ?array + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['lines']; + return $this->container['employer']; } /** - * Sets lines + * Sets employer * - * @param \SynergiTech\Staffology\Model\HourlyPayReportLine[]|null $lines lines + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setLines(?array $lines): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); + } + $this->container['employer'] = $employer; + + return $this; + } + + /** + * Gets endDate + * + * @return \DateTime|null + */ + public function getEndDate(): ?\DateTime + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param \DateTime|null $endDate endDate + * + * @return $this + */ + public function setEndDate(?\DateTime $endDate): static + { + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets endPeriodName + * + * @return string|null + */ + public function getEndPeriodName(): ?string + { + return $this->container['endPeriodName']; + } + + /** + * Sets endPeriodName + * + * @param string|null $endPeriodName endPeriodName + * + * @return $this + */ + public function setEndPeriodName(?string $endPeriodName): static + { + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); + $index = array_search('endPeriodName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lines'] = $lines; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets employer + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getIsDraft(): ?bool { - return $this->container['employer']; + return $this->container['isDraft']; } /** - * Sets employer + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param bool|null $isDraft isDraft * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['employer'] = $employer; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets payPeriod + * Gets lines * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return \SynergiTech\Staffology\Model\HourlyPayReportLine[]|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getLines(): ?array { - return $this->container['payPeriod']; + return $this->container['lines']; } /** - * Sets payPeriod + * Sets lines * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param \SynergiTech\Staffology\Model\HourlyPayReportLine[]|null $lines lines * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setLines(?array $lines): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriod'] = $payPeriod; + $this->container['lines'] = $lines; return $this; } @@ -494,6 +562,33 @@ public function setOrdinal(?int $ordinal): static return $this; } + /** + * Gets payPeriod + * + * @return \SynergiTech\Staffology\Model\PayPeriods|null + */ + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + { + return $this->container['payPeriod']; + } + + /** + * Sets payPeriod + * + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * + * @return $this + */ + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + { + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + } + $this->container['payPeriod'] = $payPeriod; + + return $this; + } + /** * Gets period * @@ -549,69 +644,28 @@ public function setPeriodTo(?int $periodTo): static } /** - * Gets startPeriodName - * - * @return string|null - */ - public function getStartPeriodName(): ?string - { - return $this->container['startPeriodName']; - } - - /** - * Sets startPeriodName - * - * @param string|null $startPeriodName startPeriodName - * - * @return $this - */ - public function setStartPeriodName(?string $startPeriodName): static - { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['startPeriodName'] = $startPeriodName; - - return $this; - } - - /** - * Gets endPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getEndPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['endPeriodName']; + return $this->container['report']; } /** - * Sets endPeriodName + * Sets report * - * @param string|null $endPeriodName endPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['report'] = $report; return $this; } @@ -644,55 +698,35 @@ public function setStartDate(?\DateTime $startDate): static } /** - * Gets endDate - * - * @return \DateTime|null - */ - public function getEndDate(): ?\DateTime - { - return $this->container['endDate']; - } - - /** - * Sets endDate - * - * @param \DateTime|null $endDate endDate - * - * @return $this - */ - public function setEndDate(?\DateTime $endDate): static - { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); - } - $this->container['endDate'] = $endDate; - - return $this; - } - - /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -759,28 +793,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/HourlyPayReportLine.php b/src/Model/HourlyPayReportLine.php index aa89086..cd09b9e 100644 --- a/src/Model/HourlyPayReportLine.php +++ b/src/Model/HourlyPayReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class HourlyPayReportLine implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPITypes = [ 'employee' => '\SynergiTech\Staffology\Model\Item', - 'payrollCode' => 'string', + 'hours' => 'float', 'payCode' => 'string', + 'payrollCode' => 'string', 'period' => 'int', - 'hours' => 'float', 'rate' => 'float', 'total' => 'float' ]; @@ -75,10 +75,10 @@ class HourlyPayReportLine implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPIFormats = [ 'employee' => null, - 'payrollCode' => null, + 'hours' => 'double', 'payCode' => null, + 'payrollCode' => null, 'period' => 'int32', - 'hours' => 'double', 'rate' => 'double', 'total' => 'double' ]; @@ -90,10 +90,10 @@ class HourlyPayReportLine implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPINullables = [ 'employee' => false, - 'payrollCode' => true, + 'hours' => false, 'payCode' => true, + 'payrollCode' => true, 'period' => false, - 'hours' => false, 'rate' => false, 'total' => false ]; @@ -185,10 +185,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'employee' => 'employee', - 'payrollCode' => 'payrollCode', + 'hours' => 'hours', 'payCode' => 'payCode', + 'payrollCode' => 'payrollCode', 'period' => 'period', - 'hours' => 'hours', 'rate' => 'rate', 'total' => 'total' ]; @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'employee' => 'setEmployee', - 'payrollCode' => 'setPayrollCode', + 'hours' => 'setHours', 'payCode' => 'setPayCode', + 'payrollCode' => 'setPayrollCode', 'period' => 'setPeriod', - 'hours' => 'setHours', 'rate' => 'setRate', 'total' => 'setTotal' ]; @@ -215,10 +215,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'employee' => 'getEmployee', - 'payrollCode' => 'getPayrollCode', + 'hours' => 'getHours', 'payCode' => 'getPayCode', + 'payrollCode' => 'getPayrollCode', 'period' => 'getPeriod', - 'hours' => 'getHours', 'rate' => 'getRate', 'total' => 'getTotal' ]; @@ -280,10 +280,10 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('hours', $data ?? [], null); $this->setIfExists('payCode', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); - $this->setIfExists('hours', $data ?? [], null); $this->setIfExists('rate', $data ?? [], null); $this->setIfExists('total', $data ?? [], null); } @@ -358,35 +358,28 @@ public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): stat } /** - * Gets payrollCode + * Gets hours * - * @return string|null + * @return float|null */ - public function getPayrollCode(): ?string + public function getHours(): ?float { - return $this->container['payrollCode']; + return $this->container['hours']; } /** - * Sets payrollCode + * Sets hours * - * @param string|null $payrollCode payrollCode + * @param float|null $hours hours * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setHours(?float $hours): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($hours)) { + throw new InvalidArgumentException('non-nullable hours cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['hours'] = $hours; return $this; } @@ -426,55 +419,62 @@ public function setPayCode(?string $payCode): static } /** - * Gets period + * Gets payrollCode * - * @return int|null + * @return string|null */ - public function getPeriod(): ?int + public function getPayrollCode(): ?string { - return $this->container['period']; + return $this->container['payrollCode']; } /** - * Sets period + * Sets payrollCode * - * @param int|null $period period + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setPeriod(?int $period): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['period'] = $period; + $this->container['payrollCode'] = $payrollCode; return $this; } /** - * Gets hours + * Gets period * - * @return float|null + * @return int|null */ - public function getHours(): ?float + public function getPeriod(): ?int { - return $this->container['hours']; + return $this->container['period']; } /** - * Sets hours + * Sets period * - * @param float|null $hours hours + * @param int|null $period period * * @return $this */ - public function setHours(?float $hours): static + public function setPeriod(?int $period): static { - if (is_null($hours)) { - throw new InvalidArgumentException('non-nullable hours cannot be null'); + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['hours'] = $hours; + $this->container['period'] = $period; return $this; } diff --git a/src/Model/HourlyPayReportReportResponse.php b/src/Model/HourlyPayReportReportResponse.php index c6038ce..c64301b 100644 --- a/src/Model/HourlyPayReportReportResponse.php +++ b/src/Model/HourlyPayReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class HourlyPayReportReportResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\HourlyPayReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class HourlyPayReportReportResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class HourlyPayReportReportResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/HoursNormallyWorked.php b/src/Model/HoursNormallyWorked.php index f59faf0..3c4a925 100644 --- a/src/Model/HoursNormallyWorked.php +++ b/src/Model/HoursNormallyWorked.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/HtmlEmailSettings.php b/src/Model/HtmlEmailSettings.php index 1b64428..76ab4ef 100644 --- a/src/Model/HtmlEmailSettings.php +++ b/src/Model/HtmlEmailSettings.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class HtmlEmailSettings implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'bodyCssStyle' => 'string', - 'fontCssStyle' => 'string', 'buttonCssStyle' => 'string', - 'headerHtml' => 'string', - 'footerHtml' => 'string' + 'fontCssStyle' => 'string', + 'footerHtml' => 'string', + 'headerHtml' => 'string' ]; /** @@ -73,10 +73,10 @@ class HtmlEmailSettings implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'bodyCssStyle' => null, - 'fontCssStyle' => null, 'buttonCssStyle' => null, - 'headerHtml' => null, - 'footerHtml' => null + 'fontCssStyle' => null, + 'footerHtml' => null, + 'headerHtml' => null ]; /** @@ -86,10 +86,10 @@ class HtmlEmailSettings implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'bodyCssStyle' => true, - 'fontCssStyle' => true, 'buttonCssStyle' => true, - 'headerHtml' => true, - 'footerHtml' => true + 'fontCssStyle' => true, + 'footerHtml' => true, + 'headerHtml' => true ]; /** @@ -179,10 +179,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'bodyCssStyle' => 'bodyCssStyle', - 'fontCssStyle' => 'fontCssStyle', 'buttonCssStyle' => 'buttonCssStyle', - 'headerHtml' => 'headerHtml', - 'footerHtml' => 'footerHtml' + 'fontCssStyle' => 'fontCssStyle', + 'footerHtml' => 'footerHtml', + 'headerHtml' => 'headerHtml' ]; /** @@ -192,10 +192,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'bodyCssStyle' => 'setBodyCssStyle', - 'fontCssStyle' => 'setFontCssStyle', 'buttonCssStyle' => 'setButtonCssStyle', - 'headerHtml' => 'setHeaderHtml', - 'footerHtml' => 'setFooterHtml' + 'fontCssStyle' => 'setFontCssStyle', + 'footerHtml' => 'setFooterHtml', + 'headerHtml' => 'setHeaderHtml' ]; /** @@ -205,10 +205,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'bodyCssStyle' => 'getBodyCssStyle', - 'fontCssStyle' => 'getFontCssStyle', 'buttonCssStyle' => 'getButtonCssStyle', - 'headerHtml' => 'getHeaderHtml', - 'footerHtml' => 'getFooterHtml' + 'fontCssStyle' => 'getFontCssStyle', + 'footerHtml' => 'getFooterHtml', + 'headerHtml' => 'getHeaderHtml' ]; /** @@ -268,10 +268,10 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('bodyCssStyle', $data ?? [], null); - $this->setIfExists('fontCssStyle', $data ?? [], null); $this->setIfExists('buttonCssStyle', $data ?? [], null); - $this->setIfExists('headerHtml', $data ?? [], null); + $this->setIfExists('fontCssStyle', $data ?? [], null); $this->setIfExists('footerHtml', $data ?? [], null); + $this->setIfExists('headerHtml', $data ?? [], null); } /** @@ -351,137 +351,137 @@ public function setBodyCssStyle(?string $bodyCssStyle): static } /** - * Gets fontCssStyle + * Gets buttonCssStyle * * @return string|null */ - public function getFontCssStyle(): ?string + public function getButtonCssStyle(): ?string { - return $this->container['fontCssStyle']; + return $this->container['buttonCssStyle']; } /** - * Sets fontCssStyle + * Sets buttonCssStyle * - * @param string|null $fontCssStyle fontCssStyle + * @param string|null $buttonCssStyle buttonCssStyle * * @return $this */ - public function setFontCssStyle(?string $fontCssStyle): static + public function setButtonCssStyle(?string $buttonCssStyle): static { - if (is_null($fontCssStyle)) { - array_push($this->openAPINullablesSetToNull, 'fontCssStyle'); + if (is_null($buttonCssStyle)) { + array_push($this->openAPINullablesSetToNull, 'buttonCssStyle'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fontCssStyle', $nullablesSetToNull); + $index = array_search('buttonCssStyle', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['fontCssStyle'] = $fontCssStyle; + $this->container['buttonCssStyle'] = $buttonCssStyle; return $this; } /** - * Gets buttonCssStyle + * Gets fontCssStyle * * @return string|null */ - public function getButtonCssStyle(): ?string + public function getFontCssStyle(): ?string { - return $this->container['buttonCssStyle']; + return $this->container['fontCssStyle']; } /** - * Sets buttonCssStyle + * Sets fontCssStyle * - * @param string|null $buttonCssStyle buttonCssStyle + * @param string|null $fontCssStyle fontCssStyle * * @return $this */ - public function setButtonCssStyle(?string $buttonCssStyle): static + public function setFontCssStyle(?string $fontCssStyle): static { - if (is_null($buttonCssStyle)) { - array_push($this->openAPINullablesSetToNull, 'buttonCssStyle'); + if (is_null($fontCssStyle)) { + array_push($this->openAPINullablesSetToNull, 'fontCssStyle'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('buttonCssStyle', $nullablesSetToNull); + $index = array_search('fontCssStyle', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['buttonCssStyle'] = $buttonCssStyle; + $this->container['fontCssStyle'] = $fontCssStyle; return $this; } /** - * Gets headerHtml + * Gets footerHtml * * @return string|null */ - public function getHeaderHtml(): ?string + public function getFooterHtml(): ?string { - return $this->container['headerHtml']; + return $this->container['footerHtml']; } /** - * Sets headerHtml + * Sets footerHtml * - * @param string|null $headerHtml headerHtml + * @param string|null $footerHtml footerHtml * * @return $this */ - public function setHeaderHtml(?string $headerHtml): static + public function setFooterHtml(?string $footerHtml): static { - if (is_null($headerHtml)) { - array_push($this->openAPINullablesSetToNull, 'headerHtml'); + if (is_null($footerHtml)) { + array_push($this->openAPINullablesSetToNull, 'footerHtml'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('headerHtml', $nullablesSetToNull); + $index = array_search('footerHtml', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['headerHtml'] = $headerHtml; + $this->container['footerHtml'] = $footerHtml; return $this; } /** - * Gets footerHtml + * Gets headerHtml * * @return string|null */ - public function getFooterHtml(): ?string + public function getHeaderHtml(): ?string { - return $this->container['footerHtml']; + return $this->container['headerHtml']; } /** - * Sets footerHtml + * Sets headerHtml * - * @param string|null $footerHtml footerHtml + * @param string|null $headerHtml headerHtml * * @return $this */ - public function setFooterHtml(?string $footerHtml): static + public function setHeaderHtml(?string $headerHtml): static { - if (is_null($footerHtml)) { - array_push($this->openAPINullablesSetToNull, 'footerHtml'); + if (is_null($headerHtml)) { + array_push($this->openAPINullablesSetToNull, 'headerHtml'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('footerHtml', $nullablesSetToNull); + $index = array_search('headerHtml', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['footerHtml'] = $footerHtml; + $this->container['headerHtml'] = $headerHtml; return $this; } diff --git a/src/Model/HtmlInsertionPoint.php b/src/Model/HtmlInsertionPoint.php index caeee32..57764f3 100644 --- a/src/Model/HtmlInsertionPoint.php +++ b/src/Model/HtmlInsertionPoint.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/IncrementRule.php b/src/Model/IncrementRule.php index ba491ed..a945690 100644 --- a/src/Model/IncrementRule.php +++ b/src/Model/IncrementRule.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/Invitation.php b/src/Model/Invitation.php index 9daf994..b2b4e23 100644 --- a/src/Model/Invitation.php +++ b/src/Model/Invitation.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,14 +60,14 @@ class Invitation implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'employer' => '\SynergiTech\Staffology\Model\Item', 'emailAddress' => 'string', - 'message' => 'string', - 'role' => '\SynergiTech\Staffology\Model\UserRole', 'emailId' => 'string', 'emailStatus' => '\SynergiTech\Staffology\Model\BackgroundTaskStatus', + 'employer' => '\SynergiTech\Staffology\Model\Item', + 'id' => 'string', 'invitedBy' => '\SynergiTech\Staffology\Model\Item', - 'id' => 'string' + 'message' => 'string', + 'role' => '\SynergiTech\Staffology\Model\UserRole' ]; /** @@ -76,14 +76,14 @@ class Invitation implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'employer' => null, 'emailAddress' => 'email', - 'message' => null, - 'role' => null, 'emailId' => 'uuid', 'emailStatus' => null, + 'employer' => null, + 'id' => 'uuid', 'invitedBy' => null, - 'id' => 'uuid' + 'message' => null, + 'role' => null ]; /** @@ -92,14 +92,14 @@ class Invitation implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'employer' => false, 'emailAddress' => false, - 'message' => true, - 'role' => false, 'emailId' => true, 'emailStatus' => false, + 'employer' => false, + 'id' => false, 'invitedBy' => false, - 'id' => false + 'message' => true, + 'role' => false ]; /** @@ -188,14 +188,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employer' => 'employer', 'emailAddress' => 'emailAddress', - 'message' => 'message', - 'role' => 'role', 'emailId' => 'emailId', 'emailStatus' => 'emailStatus', + 'employer' => 'employer', + 'id' => 'id', 'invitedBy' => 'invitedBy', - 'id' => 'id' + 'message' => 'message', + 'role' => 'role' ]; /** @@ -204,14 +204,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employer' => 'setEmployer', 'emailAddress' => 'setEmailAddress', - 'message' => 'setMessage', - 'role' => 'setRole', 'emailId' => 'setEmailId', 'emailStatus' => 'setEmailStatus', + 'employer' => 'setEmployer', + 'id' => 'setId', 'invitedBy' => 'setInvitedBy', - 'id' => 'setId' + 'message' => 'setMessage', + 'role' => 'setRole' ]; /** @@ -220,14 +220,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employer' => 'getEmployer', 'emailAddress' => 'getEmailAddress', - 'message' => 'getMessage', - 'role' => 'getRole', 'emailId' => 'getEmailId', 'emailStatus' => 'getEmailStatus', + 'employer' => 'getEmployer', + 'id' => 'getId', 'invitedBy' => 'getInvitedBy', - 'id' => 'getId' + 'message' => 'getMessage', + 'role' => 'getRole' ]; /** @@ -286,14 +286,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employer', $data ?? [], null); $this->setIfExists('emailAddress', $data ?? [], null); - $this->setIfExists('message', $data ?? [], null); - $this->setIfExists('role', $data ?? [], null); $this->setIfExists('emailId', $data ?? [], null); $this->setIfExists('emailStatus', $data ?? [], null); - $this->setIfExists('invitedBy', $data ?? [], null); + $this->setIfExists('employer', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('invitedBy', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('role', $data ?? [], null); } /** @@ -349,33 +349,6 @@ public function valid(): bool } - /** - * Gets employer - * - * @return \SynergiTech\Staffology\Model\Item|null - */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item - { - return $this->container['employer']; - } - - /** - * Sets employer - * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer - * - * @return $this - */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static - { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); - } - $this->container['employer'] = $employer; - - return $this; - } - /** * Gets emailAddress * @@ -411,123 +384,116 @@ public function setEmailAddress(string $emailAddress): static } /** - * Gets message + * Gets emailId * * @return string|null */ - public function getMessage(): ?string + public function getEmailId(): ?string { - return $this->container['message']; + return $this->container['emailId']; } /** - * Sets message + * Sets emailId * - * @param string|null $message An optional message to include in the email sent to the EmailAddress + * @param string|null $emailId emailId * * @return $this */ - public function setMessage(?string $message): static + public function setEmailId(?string $emailId): static { - if (is_null($message)) { - array_push($this->openAPINullablesSetToNull, 'message'); + if (is_null($emailId)) { + array_push($this->openAPINullablesSetToNull, 'emailId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('message', $nullablesSetToNull); + $index = array_search('emailId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['message'] = $message; + $this->container['emailId'] = $emailId; return $this; } /** - * Gets role + * Gets emailStatus * - * @return \SynergiTech\Staffology\Model\UserRole|null + * @return \SynergiTech\Staffology\Model\BackgroundTaskStatus|null */ - public function getRole(): ?\SynergiTech\Staffology\Model\UserRole + public function getEmailStatus(): ?\SynergiTech\Staffology\Model\BackgroundTaskStatus { - return $this->container['role']; + return $this->container['emailStatus']; } /** - * Sets role + * Sets emailStatus * - * @param \SynergiTech\Staffology\Model\UserRole|null $role role + * @param \SynergiTech\Staffology\Model\BackgroundTaskStatus|null $emailStatus emailStatus * * @return $this */ - public function setRole(?\SynergiTech\Staffology\Model\UserRole $role): static + public function setEmailStatus(?\SynergiTech\Staffology\Model\BackgroundTaskStatus $emailStatus): static { - if (is_null($role)) { - throw new InvalidArgumentException('non-nullable role cannot be null'); + if (is_null($emailStatus)) { + throw new InvalidArgumentException('non-nullable emailStatus cannot be null'); } - $this->container['role'] = $role; + $this->container['emailStatus'] = $emailStatus; return $this; } /** - * Gets emailId + * Gets employer * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getEmailId(): ?string + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['emailId']; + return $this->container['employer']; } /** - * Sets emailId + * Sets employer * - * @param string|null $emailId emailId + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setEmailId(?string $emailId): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($emailId)) { - array_push($this->openAPINullablesSetToNull, 'emailId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('emailId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); } - $this->container['emailId'] = $emailId; + $this->container['employer'] = $employer; return $this; } /** - * Gets emailStatus + * Gets id * - * @return \SynergiTech\Staffology\Model\BackgroundTaskStatus|null + * @return string|null */ - public function getEmailStatus(): ?\SynergiTech\Staffology\Model\BackgroundTaskStatus + public function getId(): ?string { - return $this->container['emailStatus']; + return $this->container['id']; } /** - * Sets emailStatus + * Sets id * - * @param \SynergiTech\Staffology\Model\BackgroundTaskStatus|null $emailStatus emailStatus + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setEmailStatus(?\SynergiTech\Staffology\Model\BackgroundTaskStatus $emailStatus): static + public function setId(?string $id): static { - if (is_null($emailStatus)) { - throw new InvalidArgumentException('non-nullable emailStatus cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['emailStatus'] = $emailStatus; + $this->container['id'] = $id; return $this; } @@ -560,28 +526,62 @@ public function setInvitedBy(?\SynergiTech\Staffology\Model\Item $invitedBy): st } /** - * Gets id + * Gets message * * @return string|null */ - public function getId(): ?string + public function getMessage(): ?string { - return $this->container['id']; + return $this->container['message']; } /** - * Sets id + * Sets message * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $message An optional message to include in the email sent to the EmailAddress * * @return $this */ - public function setId(?string $id): static + public function setMessage(?string $message): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($message)) { + array_push($this->openAPINullablesSetToNull, 'message'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('message', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets role + * + * @return \SynergiTech\Staffology\Model\UserRole|null + */ + public function getRole(): ?\SynergiTech\Staffology\Model\UserRole + { + return $this->container['role']; + } + + /** + * Sets role + * + * @param \SynergiTech\Staffology\Model\UserRole|null $role role + * + * @return $this + */ + public function setRole(?\SynergiTech\Staffology\Model\UserRole $role): static + { + if (is_null($role)) { + throw new InvalidArgumentException('non-nullable role cannot be null'); + } + $this->container['role'] = $role; return $this; } diff --git a/src/Model/Item.php b/src/Model/Item.php index daa95bc..974e8b8 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class Item implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'id' => 'string', - 'name' => 'string', 'metadata' => 'mixed', + 'name' => 'string', 'url' => 'string' ]; @@ -72,8 +72,8 @@ class Item implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'id' => 'uuid', - 'name' => null, 'metadata' => null, + 'name' => null, 'url' => null ]; @@ -84,8 +84,8 @@ class Item implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'id' => false, - 'name' => true, 'metadata' => true, + 'name' => true, 'url' => true ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'id' => 'id', - 'name' => 'name', 'metadata' => 'metadata', + 'name' => 'name', 'url' => 'url' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'id' => 'setId', - 'name' => 'setName', 'metadata' => 'setMetadata', + 'name' => 'setName', 'url' => 'setUrl' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'id' => 'getId', - 'name' => 'getName', 'metadata' => 'getMetadata', + 'name' => 'getName', 'url' => 'getUrl' ]; @@ -262,8 +262,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); } @@ -337,69 +337,69 @@ public function setId(?string $id): static } /** - * Gets name + * Gets metadata * - * @return string|null + * @return mixed|null */ - public function getName(): ?string + public function getMetadata(): mixed { - return $this->container['name']; + return $this->container['metadata']; } /** - * Sets name + * Sets metadata * - * @param string|null $name name + * @param mixed|null $metadata metadata * * @return $this */ - public function setName(?string $name): static + public function setMetadata(mixed $metadata): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($metadata)) { + array_push($this->openAPINullablesSetToNull, 'metadata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('metadata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['metadata'] = $metadata; return $this; } /** - * Gets metadata + * Gets name * - * @return mixed|null + * @return string|null */ - public function getMetadata(): mixed + public function getName(): ?string { - return $this->container['metadata']; + return $this->container['name']; } /** - * Sets metadata + * Sets name * - * @param mixed|null $metadata metadata + * @param string|null $name name * * @return $this */ - public function setMetadata(mixed $metadata): static + public function setName(?string $name): static { - if (is_null($metadata)) { - array_push($this->openAPINullablesSetToNull, 'metadata'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('metadata', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['metadata'] = $metadata; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/ItemListReportResponse.php b/src/Model/ItemListReportResponse.php index 13231a7..0fdb94e 100644 --- a/src/Model/ItemListReportResponse.php +++ b/src/Model/ItemListReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class ItemListReportResponse implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\Item[]', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class ItemListReportResponse implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class ItemListReportResponse implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => true, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -445,6 +411,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/JobStatus.php b/src/Model/JobStatus.php index d160891..7f62c4a 100644 --- a/src/Model/JobStatus.php +++ b/src/Model/JobStatus.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/JobType.php b/src/Model/JobType.php index 62f49f2..0cd1463 100644 --- a/src/Model/JobType.php +++ b/src/Model/JobType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/JournalCsvFormat.php b/src/Model/JournalCsvFormat.php index 2bd49ce..3d721cb 100644 --- a/src/Model/JournalCsvFormat.php +++ b/src/Model/JournalCsvFormat.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/JournalTemplate.php b/src/Model/JournalTemplate.php index b4e4960..d3ce733 100644 --- a/src/Model/JournalTemplate.php +++ b/src/Model/JournalTemplate.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class JournalTemplate implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'header' => 'string', 'content' => 'string', - 'useColumnHeaders' => 'bool', - 'id' => 'string' + 'header' => 'string', + 'id' => 'string', + 'useColumnHeaders' => 'bool' ]; /** @@ -71,10 +71,10 @@ class JournalTemplate implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'header' => null, 'content' => null, - 'useColumnHeaders' => null, - 'id' => 'uuid' + 'header' => null, + 'id' => 'uuid', + 'useColumnHeaders' => null ]; /** @@ -83,10 +83,10 @@ class JournalTemplate implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'header' => true, 'content' => true, - 'useColumnHeaders' => false, - 'id' => false + 'header' => true, + 'id' => false, + 'useColumnHeaders' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'header' => 'header', 'content' => 'content', - 'useColumnHeaders' => 'useColumnHeaders', - 'id' => 'id' + 'header' => 'header', + 'id' => 'id', + 'useColumnHeaders' => 'useColumnHeaders' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'header' => 'setHeader', 'content' => 'setContent', - 'useColumnHeaders' => 'setUseColumnHeaders', - 'id' => 'setId' + 'header' => 'setHeader', + 'id' => 'setId', + 'useColumnHeaders' => 'setUseColumnHeaders' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'header' => 'getHeader', 'content' => 'getContent', - 'useColumnHeaders' => 'getUseColumnHeaders', - 'id' => 'getId' + 'header' => 'getHeader', + 'id' => 'getId', + 'useColumnHeaders' => 'getUseColumnHeaders' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('header', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); - $this->setIfExists('useColumnHeaders', $data ?? [], null); + $this->setIfExists('header', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('useColumnHeaders', $data ?? [], null); } /** @@ -310,123 +310,123 @@ public function valid(): bool /** - * Gets header + * Gets content * * @return string|null */ - public function getHeader(): ?string + public function getContent(): ?string { - return $this->container['header']; + return $this->container['content']; } /** - * Sets header + * Sets content * - * @param string|null $header Header of Journal Template + * @param string|null $content Content of Journal Template * * @return $this */ - public function setHeader(?string $header): static + public function setContent(?string $content): static { - if (is_null($header)) { - array_push($this->openAPINullablesSetToNull, 'header'); + if (is_null($content)) { + array_push($this->openAPINullablesSetToNull, 'content'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('header', $nullablesSetToNull); + $index = array_search('content', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['header'] = $header; + $this->container['content'] = $content; return $this; } /** - * Gets content + * Gets header * * @return string|null */ - public function getContent(): ?string + public function getHeader(): ?string { - return $this->container['content']; + return $this->container['header']; } /** - * Sets content + * Sets header * - * @param string|null $content Content of Journal Template + * @param string|null $header Header of Journal Template * * @return $this */ - public function setContent(?string $content): static + public function setHeader(?string $header): static { - if (is_null($content)) { - array_push($this->openAPINullablesSetToNull, 'content'); + if (is_null($header)) { + array_push($this->openAPINullablesSetToNull, 'header'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('content', $nullablesSetToNull); + $index = array_search('header', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['content'] = $content; + $this->container['header'] = $header; return $this; } /** - * Gets useColumnHeaders + * Gets id * - * @return bool|null + * @return string|null */ - public function getUseColumnHeaders(): ?bool + public function getId(): ?string { - return $this->container['useColumnHeaders']; + return $this->container['id']; } /** - * Sets useColumnHeaders + * Sets id * - * @param bool|null $useColumnHeaders Use Column Headers indicates whether to use column headers while parsing the content in CSV format + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setUseColumnHeaders(?bool $useColumnHeaders): static + public function setId(?string $id): static { - if (is_null($useColumnHeaders)) { - throw new InvalidArgumentException('non-nullable useColumnHeaders cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['useColumnHeaders'] = $useColumnHeaders; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets useColumnHeaders * - * @return string|null + * @return bool|null */ - public function getId(): ?string + public function getUseColumnHeaders(): ?bool { - return $this->container['id']; + return $this->container['useColumnHeaders']; } /** - * Sets id + * Sets useColumnHeaders * - * @param string|null $id [readonly] The unique id of the object + * @param bool|null $useColumnHeaders Use Column Headers indicates whether to use column headers while parsing the content in CSV format * * @return $this */ - public function setId(?string $id): static + public function setUseColumnHeaders(?bool $useColumnHeaders): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($useColumnHeaders)) { + throw new InvalidArgumentException('non-nullable useColumnHeaders cannot be null'); } - $this->container['id'] = $id; + $this->container['useColumnHeaders'] = $useColumnHeaders; return $this; } diff --git a/src/Model/JournalTokenType.php b/src/Model/JournalTokenType.php index 0453e9e..315f0c2 100644 --- a/src/Model/JournalTokenType.php +++ b/src/Model/JournalTokenType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/Leave.php b/src/Model/Leave.php index 5bc2908..b58880a 100644 --- a/src/Model/Leave.php +++ b/src/Model/Leave.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,53 +60,53 @@ class Leave implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'providerId' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', + 'assumedPensionablePays' => '\SynergiTech\Staffology\Model\LeaveAssumedPensionablePay[]', + 'automaticAWECalculation' => 'bool', + 'averageWeeklyEarnings' => 'float', + 'babyDate' => '\DateTime', + 'calculationType' => '\SynergiTech\Staffology\Model\LeaveCalculationType', + 'customPayments' => '\SynergiTech\Staffology\Model\LeaveCustomPayment[]', + 'customProRataRules' => '\SynergiTech\Staffology\Model\LeaveCustomProRataRule[]', + 'documentCount' => 'int', + 'documents' => '\SynergiTech\Staffology\Model\Item[]', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'externalId' => 'string', - 'type' => '\SynergiTech\Staffology\Model\LeaveType', + 'from' => '\DateTime', + 'historicOmpRequiresProcessing' => 'bool', + 'historicOspRequiresProcessing' => 'bool', + 'historicSmpRequiresProcessing' => 'bool', + 'historicSspRequiresProcessing' => 'bool', + 'historicSxpRequiresProcessing' => 'bool', + 'id' => 'string', + 'isReversed' => 'bool', + 'kitSplitDays' => '\DateTime[]', + 'lastProcessedFrom' => '\DateTime', + 'linkedPiw' => '\SynergiTech\Staffology\Model\LinkedPiw', + 'notes' => 'string', + 'occupationalMaternityPolicyUniqueId' => 'string', + 'offsetPay' => 'bool', + 'openingOmpPay' => 'float', + 'openingPay' => 'float', + 'overridePaymentDescription' => 'bool', + 'overridenPaymentDescription' => 'string', 'pay' => '\SynergiTech\Staffology\Model\LeavePayType', 'payFrequency' => '\SynergiTech\Staffology\Model\StatPayFrequency', + 'payRunExistsWithOccMaternityPay' => 'bool', 'payRunExistsWithStatPay' => 'bool', - 'from' => '\DateTime', - 'to' => '\DateTime', - 'notes' => 'string', - 'averageWeeklyEarnings' => 'float', - 'automaticAWECalculation' => 'bool', - 'babyDate' => '\DateTime', + 'paymentTier' => '\SynergiTech\Staffology\Model\NeonatalCarePaymentTier', + 'providerId' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', 'secondaryBabyDate' => '\DateTime', + 'sspPayFromDayOne' => 'bool', + 'strikeHoursToDeduct' => 'float', 'tertiaryBabyDate' => '\DateTime', - 'overridePaymentDescription' => 'bool', - 'overridenPaymentDescription' => 'string', - 'workingDays' => 'float', - 'workingDaysOverride' => 'float', + 'to' => '\DateTime', 'totalDays' => 'float', 'totalDaysOverride' => 'float', + 'type' => '\SynergiTech\Staffology\Model\LeaveType', 'useAssumedPensionablePay' => 'bool', - 'assumedPensionablePays' => '\SynergiTech\Staffology\Model\LeaveAssumedPensionablePay[]', - 'offsetPay' => 'bool', - 'sspPayFromDayOne' => 'bool', - 'linkedPiw' => '\SynergiTech\Staffology\Model\LinkedPiw', - 'kitSplitDays' => '\DateTime[]', - 'historicSspRequiresProcessing' => 'bool', - 'historicSxpRequiresProcessing' => 'bool', - 'openingPay' => 'float', 'useOpeningPay' => 'bool', - 'historicOspRequiresProcessing' => 'bool', - 'historicOmpRequiresProcessing' => 'bool', - 'historicSmpRequiresProcessing' => 'bool', - 'occupationalMaternityPolicyUniqueId' => 'string', - 'openingOmpPay' => 'float', - 'payRunExistsWithOccMaternityPay' => 'bool', - 'calculationType' => '\SynergiTech\Staffology\Model\LeaveCalculationType', - 'strikeHoursToDeduct' => 'float', - 'customPayments' => '\SynergiTech\Staffology\Model\LeaveCustomPayment[]', - 'customProRataRules' => '\SynergiTech\Staffology\Model\LeaveCustomProRataRule[]', - 'lastProcessedFrom' => '\DateTime', - 'isReversed' => 'bool', - 'paymentTier' => '\SynergiTech\Staffology\Model\NeonatalCarePaymentTier', - 'documentCount' => 'int', - 'documents' => '\SynergiTech\Staffology\Model\Item[]', - 'employee' => '\SynergiTech\Staffology\Model\Item', - 'id' => 'string' + 'workingDays' => 'float', + 'workingDaysOverride' => 'float' ]; /** @@ -115,53 +115,53 @@ class Leave implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'providerId' => null, + 'assumedPensionablePays' => null, + 'automaticAWECalculation' => null, + 'averageWeeklyEarnings' => 'double', + 'babyDate' => 'date', + 'calculationType' => null, + 'customPayments' => null, + 'customProRataRules' => null, + 'documentCount' => 'int32', + 'documents' => null, + 'employee' => null, 'externalId' => null, - 'type' => null, + 'from' => 'date-time', + 'historicOmpRequiresProcessing' => null, + 'historicOspRequiresProcessing' => null, + 'historicSmpRequiresProcessing' => null, + 'historicSspRequiresProcessing' => null, + 'historicSxpRequiresProcessing' => null, + 'id' => 'uuid', + 'isReversed' => null, + 'kitSplitDays' => 'date-time', + 'lastProcessedFrom' => 'date', + 'linkedPiw' => null, + 'notes' => null, + 'occupationalMaternityPolicyUniqueId' => 'uuid', + 'offsetPay' => null, + 'openingOmpPay' => 'double', + 'openingPay' => 'double', + 'overridePaymentDescription' => null, + 'overridenPaymentDescription' => null, 'pay' => null, 'payFrequency' => null, + 'payRunExistsWithOccMaternityPay' => null, 'payRunExistsWithStatPay' => null, - 'from' => 'date-time', - 'to' => 'date-time', - 'notes' => null, - 'averageWeeklyEarnings' => 'double', - 'automaticAWECalculation' => null, - 'babyDate' => 'date', + 'paymentTier' => null, + 'providerId' => null, 'secondaryBabyDate' => 'date', + 'sspPayFromDayOne' => null, + 'strikeHoursToDeduct' => 'double', 'tertiaryBabyDate' => 'date', - 'overridePaymentDescription' => null, - 'overridenPaymentDescription' => null, - 'workingDays' => 'double', - 'workingDaysOverride' => 'double', + 'to' => 'date-time', 'totalDays' => 'double', 'totalDaysOverride' => 'double', + 'type' => null, 'useAssumedPensionablePay' => null, - 'assumedPensionablePays' => null, - 'offsetPay' => null, - 'sspPayFromDayOne' => null, - 'linkedPiw' => null, - 'kitSplitDays' => 'date-time', - 'historicSspRequiresProcessing' => null, - 'historicSxpRequiresProcessing' => null, - 'openingPay' => 'double', 'useOpeningPay' => null, - 'historicOspRequiresProcessing' => null, - 'historicOmpRequiresProcessing' => null, - 'historicSmpRequiresProcessing' => null, - 'occupationalMaternityPolicyUniqueId' => 'uuid', - 'openingOmpPay' => 'double', - 'payRunExistsWithOccMaternityPay' => null, - 'calculationType' => null, - 'strikeHoursToDeduct' => 'double', - 'customPayments' => null, - 'customProRataRules' => null, - 'lastProcessedFrom' => 'date', - 'isReversed' => null, - 'paymentTier' => null, - 'documentCount' => 'int32', - 'documents' => null, - 'employee' => null, - 'id' => 'uuid' + 'workingDays' => 'double', + 'workingDaysOverride' => 'double' ]; /** @@ -170,53 +170,53 @@ class Leave implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'providerId' => false, + 'assumedPensionablePays' => true, + 'automaticAWECalculation' => false, + 'averageWeeklyEarnings' => false, + 'babyDate' => true, + 'calculationType' => false, + 'customPayments' => true, + 'customProRataRules' => true, + 'documentCount' => false, + 'documents' => true, + 'employee' => false, 'externalId' => true, - 'type' => false, + 'from' => false, + 'historicOmpRequiresProcessing' => false, + 'historicOspRequiresProcessing' => false, + 'historicSmpRequiresProcessing' => false, + 'historicSspRequiresProcessing' => false, + 'historicSxpRequiresProcessing' => false, + 'id' => false, + 'isReversed' => false, + 'kitSplitDays' => true, + 'lastProcessedFrom' => true, + 'linkedPiw' => false, + 'notes' => true, + 'occupationalMaternityPolicyUniqueId' => true, + 'offsetPay' => false, + 'openingOmpPay' => true, + 'openingPay' => true, + 'overridePaymentDescription' => false, + 'overridenPaymentDescription' => true, 'pay' => false, 'payFrequency' => false, + 'payRunExistsWithOccMaternityPay' => false, 'payRunExistsWithStatPay' => false, - 'from' => false, - 'to' => false, - 'notes' => true, - 'averageWeeklyEarnings' => false, - 'automaticAWECalculation' => false, - 'babyDate' => true, + 'paymentTier' => false, + 'providerId' => false, 'secondaryBabyDate' => true, + 'sspPayFromDayOne' => false, + 'strikeHoursToDeduct' => true, 'tertiaryBabyDate' => true, - 'overridePaymentDescription' => false, - 'overridenPaymentDescription' => true, - 'workingDays' => false, - 'workingDaysOverride' => true, + 'to' => false, 'totalDays' => false, 'totalDaysOverride' => true, + 'type' => false, 'useAssumedPensionablePay' => false, - 'assumedPensionablePays' => true, - 'offsetPay' => false, - 'sspPayFromDayOne' => false, - 'linkedPiw' => false, - 'kitSplitDays' => true, - 'historicSspRequiresProcessing' => false, - 'historicSxpRequiresProcessing' => false, - 'openingPay' => true, 'useOpeningPay' => false, - 'historicOspRequiresProcessing' => false, - 'historicOmpRequiresProcessing' => false, - 'historicSmpRequiresProcessing' => false, - 'occupationalMaternityPolicyUniqueId' => true, - 'openingOmpPay' => true, - 'payRunExistsWithOccMaternityPay' => false, - 'calculationType' => false, - 'strikeHoursToDeduct' => true, - 'customPayments' => true, - 'customProRataRules' => true, - 'lastProcessedFrom' => true, - 'isReversed' => false, - 'paymentTier' => false, - 'documentCount' => false, - 'documents' => true, - 'employee' => false, - 'id' => false + 'workingDays' => false, + 'workingDaysOverride' => true ]; /** @@ -305,53 +305,53 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'providerId' => 'providerId', + 'assumedPensionablePays' => 'assumedPensionablePays', + 'automaticAWECalculation' => 'automaticAWECalculation', + 'averageWeeklyEarnings' => 'averageWeeklyEarnings', + 'babyDate' => 'babyDate', + 'calculationType' => 'calculationType', + 'customPayments' => 'customPayments', + 'customProRataRules' => 'customProRataRules', + 'documentCount' => 'documentCount', + 'documents' => 'documents', + 'employee' => 'employee', 'externalId' => 'externalId', - 'type' => 'type', + 'from' => 'from', + 'historicOmpRequiresProcessing' => 'historicOmpRequiresProcessing', + 'historicOspRequiresProcessing' => 'historicOspRequiresProcessing', + 'historicSmpRequiresProcessing' => 'historicSmpRequiresProcessing', + 'historicSspRequiresProcessing' => 'historicSspRequiresProcessing', + 'historicSxpRequiresProcessing' => 'historicSxpRequiresProcessing', + 'id' => 'id', + 'isReversed' => 'isReversed', + 'kitSplitDays' => 'kitSplitDays', + 'lastProcessedFrom' => 'lastProcessedFrom', + 'linkedPiw' => 'linkedPiw', + 'notes' => 'notes', + 'occupationalMaternityPolicyUniqueId' => 'occupationalMaternityPolicyUniqueId', + 'offsetPay' => 'offsetPay', + 'openingOmpPay' => 'openingOmpPay', + 'openingPay' => 'openingPay', + 'overridePaymentDescription' => 'overridePaymentDescription', + 'overridenPaymentDescription' => 'overridenPaymentDescription', 'pay' => 'pay', 'payFrequency' => 'payFrequency', + 'payRunExistsWithOccMaternityPay' => 'payRunExistsWithOccMaternityPay', 'payRunExistsWithStatPay' => 'payRunExistsWithStatPay', - 'from' => 'from', - 'to' => 'to', - 'notes' => 'notes', - 'averageWeeklyEarnings' => 'averageWeeklyEarnings', - 'automaticAWECalculation' => 'automaticAWECalculation', - 'babyDate' => 'babyDate', + 'paymentTier' => 'paymentTier', + 'providerId' => 'providerId', 'secondaryBabyDate' => 'secondaryBabyDate', + 'sspPayFromDayOne' => 'sspPayFromDayOne', + 'strikeHoursToDeduct' => 'strikeHoursToDeduct', 'tertiaryBabyDate' => 'tertiaryBabyDate', - 'overridePaymentDescription' => 'overridePaymentDescription', - 'overridenPaymentDescription' => 'overridenPaymentDescription', - 'workingDays' => 'workingDays', - 'workingDaysOverride' => 'workingDaysOverride', + 'to' => 'to', 'totalDays' => 'totalDays', 'totalDaysOverride' => 'totalDaysOverride', + 'type' => 'type', 'useAssumedPensionablePay' => 'useAssumedPensionablePay', - 'assumedPensionablePays' => 'assumedPensionablePays', - 'offsetPay' => 'offsetPay', - 'sspPayFromDayOne' => 'sspPayFromDayOne', - 'linkedPiw' => 'linkedPiw', - 'kitSplitDays' => 'kitSplitDays', - 'historicSspRequiresProcessing' => 'historicSspRequiresProcessing', - 'historicSxpRequiresProcessing' => 'historicSxpRequiresProcessing', - 'openingPay' => 'openingPay', 'useOpeningPay' => 'useOpeningPay', - 'historicOspRequiresProcessing' => 'historicOspRequiresProcessing', - 'historicOmpRequiresProcessing' => 'historicOmpRequiresProcessing', - 'historicSmpRequiresProcessing' => 'historicSmpRequiresProcessing', - 'occupationalMaternityPolicyUniqueId' => 'occupationalMaternityPolicyUniqueId', - 'openingOmpPay' => 'openingOmpPay', - 'payRunExistsWithOccMaternityPay' => 'payRunExistsWithOccMaternityPay', - 'calculationType' => 'calculationType', - 'strikeHoursToDeduct' => 'strikeHoursToDeduct', - 'customPayments' => 'customPayments', - 'customProRataRules' => 'customProRataRules', - 'lastProcessedFrom' => 'lastProcessedFrom', - 'isReversed' => 'isReversed', - 'paymentTier' => 'paymentTier', - 'documentCount' => 'documentCount', - 'documents' => 'documents', - 'employee' => 'employee', - 'id' => 'id' + 'workingDays' => 'workingDays', + 'workingDaysOverride' => 'workingDaysOverride' ]; /** @@ -360,53 +360,53 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'providerId' => 'setProviderId', - 'externalId' => 'setExternalId', - 'type' => 'setType', - 'pay' => 'setPay', - 'payFrequency' => 'setPayFrequency', - 'payRunExistsWithStatPay' => 'setPayRunExistsWithStatPay', - 'from' => 'setFrom', - 'to' => 'setTo', - 'notes' => 'setNotes', - 'averageWeeklyEarnings' => 'setAverageWeeklyEarnings', + 'assumedPensionablePays' => 'setAssumedPensionablePays', 'automaticAWECalculation' => 'setAutomaticAWECalculation', + 'averageWeeklyEarnings' => 'setAverageWeeklyEarnings', 'babyDate' => 'setBabyDate', - 'secondaryBabyDate' => 'setSecondaryBabyDate', - 'tertiaryBabyDate' => 'setTertiaryBabyDate', - 'overridePaymentDescription' => 'setOverridePaymentDescription', - 'overridenPaymentDescription' => 'setOverridenPaymentDescription', - 'workingDays' => 'setWorkingDays', - 'workingDaysOverride' => 'setWorkingDaysOverride', - 'totalDays' => 'setTotalDays', - 'totalDaysOverride' => 'setTotalDaysOverride', - 'useAssumedPensionablePay' => 'setUseAssumedPensionablePay', - 'assumedPensionablePays' => 'setAssumedPensionablePays', - 'offsetPay' => 'setOffsetPay', - 'sspPayFromDayOne' => 'setSspPayFromDayOne', - 'linkedPiw' => 'setLinkedPiw', - 'kitSplitDays' => 'setKitSplitDays', - 'historicSspRequiresProcessing' => 'setHistoricSspRequiresProcessing', - 'historicSxpRequiresProcessing' => 'setHistoricSxpRequiresProcessing', - 'openingPay' => 'setOpeningPay', - 'useOpeningPay' => 'setUseOpeningPay', - 'historicOspRequiresProcessing' => 'setHistoricOspRequiresProcessing', - 'historicOmpRequiresProcessing' => 'setHistoricOmpRequiresProcessing', - 'historicSmpRequiresProcessing' => 'setHistoricSmpRequiresProcessing', - 'occupationalMaternityPolicyUniqueId' => 'setOccupationalMaternityPolicyUniqueId', - 'openingOmpPay' => 'setOpeningOmpPay', - 'payRunExistsWithOccMaternityPay' => 'setPayRunExistsWithOccMaternityPay', 'calculationType' => 'setCalculationType', - 'strikeHoursToDeduct' => 'setStrikeHoursToDeduct', 'customPayments' => 'setCustomPayments', 'customProRataRules' => 'setCustomProRataRules', - 'lastProcessedFrom' => 'setLastProcessedFrom', - 'isReversed' => 'setIsReversed', - 'paymentTier' => 'setPaymentTier', 'documentCount' => 'setDocumentCount', 'documents' => 'setDocuments', 'employee' => 'setEmployee', - 'id' => 'setId' + 'externalId' => 'setExternalId', + 'from' => 'setFrom', + 'historicOmpRequiresProcessing' => 'setHistoricOmpRequiresProcessing', + 'historicOspRequiresProcessing' => 'setHistoricOspRequiresProcessing', + 'historicSmpRequiresProcessing' => 'setHistoricSmpRequiresProcessing', + 'historicSspRequiresProcessing' => 'setHistoricSspRequiresProcessing', + 'historicSxpRequiresProcessing' => 'setHistoricSxpRequiresProcessing', + 'id' => 'setId', + 'isReversed' => 'setIsReversed', + 'kitSplitDays' => 'setKitSplitDays', + 'lastProcessedFrom' => 'setLastProcessedFrom', + 'linkedPiw' => 'setLinkedPiw', + 'notes' => 'setNotes', + 'occupationalMaternityPolicyUniqueId' => 'setOccupationalMaternityPolicyUniqueId', + 'offsetPay' => 'setOffsetPay', + 'openingOmpPay' => 'setOpeningOmpPay', + 'openingPay' => 'setOpeningPay', + 'overridePaymentDescription' => 'setOverridePaymentDescription', + 'overridenPaymentDescription' => 'setOverridenPaymentDescription', + 'pay' => 'setPay', + 'payFrequency' => 'setPayFrequency', + 'payRunExistsWithOccMaternityPay' => 'setPayRunExistsWithOccMaternityPay', + 'payRunExistsWithStatPay' => 'setPayRunExistsWithStatPay', + 'paymentTier' => 'setPaymentTier', + 'providerId' => 'setProviderId', + 'secondaryBabyDate' => 'setSecondaryBabyDate', + 'sspPayFromDayOne' => 'setSspPayFromDayOne', + 'strikeHoursToDeduct' => 'setStrikeHoursToDeduct', + 'tertiaryBabyDate' => 'setTertiaryBabyDate', + 'to' => 'setTo', + 'totalDays' => 'setTotalDays', + 'totalDaysOverride' => 'setTotalDaysOverride', + 'type' => 'setType', + 'useAssumedPensionablePay' => 'setUseAssumedPensionablePay', + 'useOpeningPay' => 'setUseOpeningPay', + 'workingDays' => 'setWorkingDays', + 'workingDaysOverride' => 'setWorkingDaysOverride' ]; /** @@ -415,53 +415,53 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'providerId' => 'getProviderId', + 'assumedPensionablePays' => 'getAssumedPensionablePays', + 'automaticAWECalculation' => 'getAutomaticAWECalculation', + 'averageWeeklyEarnings' => 'getAverageWeeklyEarnings', + 'babyDate' => 'getBabyDate', + 'calculationType' => 'getCalculationType', + 'customPayments' => 'getCustomPayments', + 'customProRataRules' => 'getCustomProRataRules', + 'documentCount' => 'getDocumentCount', + 'documents' => 'getDocuments', + 'employee' => 'getEmployee', 'externalId' => 'getExternalId', - 'type' => 'getType', + 'from' => 'getFrom', + 'historicOmpRequiresProcessing' => 'getHistoricOmpRequiresProcessing', + 'historicOspRequiresProcessing' => 'getHistoricOspRequiresProcessing', + 'historicSmpRequiresProcessing' => 'getHistoricSmpRequiresProcessing', + 'historicSspRequiresProcessing' => 'getHistoricSspRequiresProcessing', + 'historicSxpRequiresProcessing' => 'getHistoricSxpRequiresProcessing', + 'id' => 'getId', + 'isReversed' => 'getIsReversed', + 'kitSplitDays' => 'getKitSplitDays', + 'lastProcessedFrom' => 'getLastProcessedFrom', + 'linkedPiw' => 'getLinkedPiw', + 'notes' => 'getNotes', + 'occupationalMaternityPolicyUniqueId' => 'getOccupationalMaternityPolicyUniqueId', + 'offsetPay' => 'getOffsetPay', + 'openingOmpPay' => 'getOpeningOmpPay', + 'openingPay' => 'getOpeningPay', + 'overridePaymentDescription' => 'getOverridePaymentDescription', + 'overridenPaymentDescription' => 'getOverridenPaymentDescription', 'pay' => 'getPay', 'payFrequency' => 'getPayFrequency', + 'payRunExistsWithOccMaternityPay' => 'getPayRunExistsWithOccMaternityPay', 'payRunExistsWithStatPay' => 'getPayRunExistsWithStatPay', - 'from' => 'getFrom', - 'to' => 'getTo', - 'notes' => 'getNotes', - 'averageWeeklyEarnings' => 'getAverageWeeklyEarnings', - 'automaticAWECalculation' => 'getAutomaticAWECalculation', - 'babyDate' => 'getBabyDate', + 'paymentTier' => 'getPaymentTier', + 'providerId' => 'getProviderId', 'secondaryBabyDate' => 'getSecondaryBabyDate', + 'sspPayFromDayOne' => 'getSspPayFromDayOne', + 'strikeHoursToDeduct' => 'getStrikeHoursToDeduct', 'tertiaryBabyDate' => 'getTertiaryBabyDate', - 'overridePaymentDescription' => 'getOverridePaymentDescription', - 'overridenPaymentDescription' => 'getOverridenPaymentDescription', - 'workingDays' => 'getWorkingDays', - 'workingDaysOverride' => 'getWorkingDaysOverride', + 'to' => 'getTo', 'totalDays' => 'getTotalDays', 'totalDaysOverride' => 'getTotalDaysOverride', + 'type' => 'getType', 'useAssumedPensionablePay' => 'getUseAssumedPensionablePay', - 'assumedPensionablePays' => 'getAssumedPensionablePays', - 'offsetPay' => 'getOffsetPay', - 'sspPayFromDayOne' => 'getSspPayFromDayOne', - 'linkedPiw' => 'getLinkedPiw', - 'kitSplitDays' => 'getKitSplitDays', - 'historicSspRequiresProcessing' => 'getHistoricSspRequiresProcessing', - 'historicSxpRequiresProcessing' => 'getHistoricSxpRequiresProcessing', - 'openingPay' => 'getOpeningPay', 'useOpeningPay' => 'getUseOpeningPay', - 'historicOspRequiresProcessing' => 'getHistoricOspRequiresProcessing', - 'historicOmpRequiresProcessing' => 'getHistoricOmpRequiresProcessing', - 'historicSmpRequiresProcessing' => 'getHistoricSmpRequiresProcessing', - 'occupationalMaternityPolicyUniqueId' => 'getOccupationalMaternityPolicyUniqueId', - 'openingOmpPay' => 'getOpeningOmpPay', - 'payRunExistsWithOccMaternityPay' => 'getPayRunExistsWithOccMaternityPay', - 'calculationType' => 'getCalculationType', - 'strikeHoursToDeduct' => 'getStrikeHoursToDeduct', - 'customPayments' => 'getCustomPayments', - 'customProRataRules' => 'getCustomProRataRules', - 'lastProcessedFrom' => 'getLastProcessedFrom', - 'isReversed' => 'getIsReversed', - 'paymentTier' => 'getPaymentTier', - 'documentCount' => 'getDocumentCount', - 'documents' => 'getDocuments', - 'employee' => 'getEmployee', - 'id' => 'getId' + 'workingDays' => 'getWorkingDays', + 'workingDaysOverride' => 'getWorkingDaysOverride' ]; /** @@ -520,53 +520,53 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('providerId', $data ?? [], null); + $this->setIfExists('assumedPensionablePays', $data ?? [], null); + $this->setIfExists('automaticAWECalculation', $data ?? [], null); + $this->setIfExists('averageWeeklyEarnings', $data ?? [], null); + $this->setIfExists('babyDate', $data ?? [], null); + $this->setIfExists('calculationType', $data ?? [], null); + $this->setIfExists('customPayments', $data ?? [], null); + $this->setIfExists('customProRataRules', $data ?? [], null); + $this->setIfExists('documentCount', $data ?? [], null); + $this->setIfExists('documents', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('externalId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('historicOmpRequiresProcessing', $data ?? [], null); + $this->setIfExists('historicOspRequiresProcessing', $data ?? [], null); + $this->setIfExists('historicSmpRequiresProcessing', $data ?? [], null); + $this->setIfExists('historicSspRequiresProcessing', $data ?? [], null); + $this->setIfExists('historicSxpRequiresProcessing', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isReversed', $data ?? [], null); + $this->setIfExists('kitSplitDays', $data ?? [], null); + $this->setIfExists('lastProcessedFrom', $data ?? [], null); + $this->setIfExists('linkedPiw', $data ?? [], null); + $this->setIfExists('notes', $data ?? [], null); + $this->setIfExists('occupationalMaternityPolicyUniqueId', $data ?? [], null); + $this->setIfExists('offsetPay', $data ?? [], null); + $this->setIfExists('openingOmpPay', $data ?? [], null); + $this->setIfExists('openingPay', $data ?? [], null); + $this->setIfExists('overridePaymentDescription', $data ?? [], null); + $this->setIfExists('overridenPaymentDescription', $data ?? [], null); $this->setIfExists('pay', $data ?? [], null); $this->setIfExists('payFrequency', $data ?? [], null); + $this->setIfExists('payRunExistsWithOccMaternityPay', $data ?? [], null); $this->setIfExists('payRunExistsWithStatPay', $data ?? [], null); - $this->setIfExists('from', $data ?? [], null); - $this->setIfExists('to', $data ?? [], null); - $this->setIfExists('notes', $data ?? [], null); - $this->setIfExists('averageWeeklyEarnings', $data ?? [], null); - $this->setIfExists('automaticAWECalculation', $data ?? [], null); - $this->setIfExists('babyDate', $data ?? [], null); + $this->setIfExists('paymentTier', $data ?? [], null); + $this->setIfExists('providerId', $data ?? [], null); $this->setIfExists('secondaryBabyDate', $data ?? [], null); + $this->setIfExists('sspPayFromDayOne', $data ?? [], null); + $this->setIfExists('strikeHoursToDeduct', $data ?? [], null); $this->setIfExists('tertiaryBabyDate', $data ?? [], null); - $this->setIfExists('overridePaymentDescription', $data ?? [], null); - $this->setIfExists('overridenPaymentDescription', $data ?? [], null); - $this->setIfExists('workingDays', $data ?? [], null); - $this->setIfExists('workingDaysOverride', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); $this->setIfExists('totalDays', $data ?? [], null); $this->setIfExists('totalDaysOverride', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('useAssumedPensionablePay', $data ?? [], null); - $this->setIfExists('assumedPensionablePays', $data ?? [], null); - $this->setIfExists('offsetPay', $data ?? [], null); - $this->setIfExists('sspPayFromDayOne', $data ?? [], null); - $this->setIfExists('linkedPiw', $data ?? [], null); - $this->setIfExists('kitSplitDays', $data ?? [], null); - $this->setIfExists('historicSspRequiresProcessing', $data ?? [], null); - $this->setIfExists('historicSxpRequiresProcessing', $data ?? [], null); - $this->setIfExists('openingPay', $data ?? [], null); $this->setIfExists('useOpeningPay', $data ?? [], null); - $this->setIfExists('historicOspRequiresProcessing', $data ?? [], null); - $this->setIfExists('historicOmpRequiresProcessing', $data ?? [], null); - $this->setIfExists('historicSmpRequiresProcessing', $data ?? [], null); - $this->setIfExists('occupationalMaternityPolicyUniqueId', $data ?? [], null); - $this->setIfExists('openingOmpPay', $data ?? [], null); - $this->setIfExists('payRunExistsWithOccMaternityPay', $data ?? [], null); - $this->setIfExists('calculationType', $data ?? [], null); - $this->setIfExists('strikeHoursToDeduct', $data ?? [], null); - $this->setIfExists('customPayments', $data ?? [], null); - $this->setIfExists('customProRataRules', $data ?? [], null); - $this->setIfExists('lastProcessedFrom', $data ?? [], null); - $this->setIfExists('isReversed', $data ?? [], null); - $this->setIfExists('paymentTier', $data ?? [], null); - $this->setIfExists('documentCount', $data ?? [], null); - $this->setIfExists('documents', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('workingDays', $data ?? [], null); + $this->setIfExists('workingDaysOverride', $data ?? [], null); } /** @@ -624,1103 +624,1110 @@ public function valid(): bool /** - * Gets providerId + * Gets assumedPensionablePays * - * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null + * @return \SynergiTech\Staffology\Model\LeaveAssumedPensionablePay[]|null */ - public function getProviderId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId + public function getAssumedPensionablePays(): ?array { - return $this->container['providerId']; + return $this->container['assumedPensionablePays']; } /** - * Sets providerId + * Sets assumedPensionablePays * - * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $providerId providerId + * @param \SynergiTech\Staffology\Model\LeaveAssumedPensionablePay[]|null $assumedPensionablePays if UseAssumedPensionablePay is True, then this is the value used to calculate the employer pension contributions * * @return $this */ - public function setProviderId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $providerId): static + public function setAssumedPensionablePays(?array $assumedPensionablePays): static { - if (is_null($providerId)) { - throw new InvalidArgumentException('non-nullable providerId cannot be null'); + if (is_null($assumedPensionablePays)) { + array_push($this->openAPINullablesSetToNull, 'assumedPensionablePays'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('assumedPensionablePays', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['providerId'] = $providerId; + $this->container['assumedPensionablePays'] = $assumedPensionablePays; return $this; } /** - * Gets externalId + * Gets automaticAWECalculation * - * @return string|null + * @return bool|null */ - public function getExternalId(): ?string + public function getAutomaticAWECalculation(): ?bool { - return $this->container['externalId']; + return $this->container['automaticAWECalculation']; } /** - * Sets externalId + * Sets automaticAWECalculation * - * @param string|null $externalId If the Leave comes from an ExternalDataProvider, then this is its Id in the ExternalDataProvider + * @param bool|null $automaticAWECalculation If set to True then we'll automatically calculate the AverageWeeklyEarnings. Set it to false if you want to manually provide a figure that overrides our calculations * * @return $this */ - public function setExternalId(?string $externalId): static + public function setAutomaticAWECalculation(?bool $automaticAWECalculation): static { - if (is_null($externalId)) { - array_push($this->openAPINullablesSetToNull, 'externalId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('externalId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($externalId) && (mb_strlen($externalId) > 100)) { - throw new InvalidArgumentException('invalid length for $externalId when calling Leave., must be smaller than or equal to 100.'); + if (is_null($automaticAWECalculation)) { + throw new InvalidArgumentException('non-nullable automaticAWECalculation cannot be null'); } - - $this->container['externalId'] = $externalId; + $this->container['automaticAWECalculation'] = $automaticAWECalculation; return $this; } /** - * Gets type + * Gets averageWeeklyEarnings * - * @return \SynergiTech\Staffology\Model\LeaveType|null + * @return float|null */ - public function getType(): ?\SynergiTech\Staffology\Model\LeaveType + public function getAverageWeeklyEarnings(): ?float { - return $this->container['type']; + return $this->container['averageWeeklyEarnings']; } /** - * Sets type + * Sets averageWeeklyEarnings * - * @param \SynergiTech\Staffology\Model\LeaveType|null $type type + * @param float|null $averageWeeklyEarnings The employees average weekly earnings. Only relevant for Statutory Pay It's advised that you don't try to calculate this yourself. * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\LeaveType $type): static + public function setAverageWeeklyEarnings(?float $averageWeeklyEarnings): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($averageWeeklyEarnings)) { + throw new InvalidArgumentException('non-nullable averageWeeklyEarnings cannot be null'); } - $this->container['type'] = $type; + $this->container['averageWeeklyEarnings'] = $averageWeeklyEarnings; return $this; } /** - * Gets pay + * Gets babyDate * - * @return \SynergiTech\Staffology\Model\LeavePayType|null + * @return \DateTime|null */ - public function getPay(): ?\SynergiTech\Staffology\Model\LeavePayType + public function getBabyDate(): ?\DateTime { - return $this->container['pay']; + return $this->container['babyDate']; } /** - * Sets pay + * Sets babyDate * - * @param \SynergiTech\Staffology\Model\LeavePayType|null $pay pay + * @param \DateTime|null $babyDate Only required for Parental Leave with Statutory Pay If Type is Maternity or Paternity then this is the date the baby is due. For Adoption this is the Matching Date. For Neonatal Care is the Baby Due / Matching / Placement Date * * @return $this */ - public function setPay(?\SynergiTech\Staffology\Model\LeavePayType $pay): static + public function setBabyDate(?\DateTime $babyDate): static { - if (is_null($pay)) { - throw new InvalidArgumentException('non-nullable pay cannot be null'); + if (is_null($babyDate)) { + array_push($this->openAPINullablesSetToNull, 'babyDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('babyDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['pay'] = $pay; + $this->container['babyDate'] = $babyDate; return $this; } /** - * Gets payFrequency + * Gets calculationType * - * @return \SynergiTech\Staffology\Model\StatPayFrequency|null + * @return \SynergiTech\Staffology\Model\LeaveCalculationType|null */ - public function getPayFrequency(): ?\SynergiTech\Staffology\Model\StatPayFrequency + public function getCalculationType(): ?\SynergiTech\Staffology\Model\LeaveCalculationType { - return $this->container['payFrequency']; + return $this->container['calculationType']; } /** - * Sets payFrequency + * Sets calculationType * - * @param \SynergiTech\Staffology\Model\StatPayFrequency|null $payFrequency payFrequency + * @param \SynergiTech\Staffology\Model\LeaveCalculationType|null $calculationType calculationType * * @return $this */ - public function setPayFrequency(?\SynergiTech\Staffology\Model\StatPayFrequency $payFrequency): static + public function setCalculationType(?\SynergiTech\Staffology\Model\LeaveCalculationType $calculationType): static { - if (is_null($payFrequency)) { - throw new InvalidArgumentException('non-nullable payFrequency cannot be null'); + if (is_null($calculationType)) { + throw new InvalidArgumentException('non-nullable calculationType cannot be null'); } - $this->container['payFrequency'] = $payFrequency; + $this->container['calculationType'] = $calculationType; return $this; } /** - * Gets payRunExistsWithStatPay + * Gets customPayments * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LeaveCustomPayment[]|null */ - public function getPayRunExistsWithStatPay(): ?bool + public function getCustomPayments(): ?array { - return $this->container['payRunExistsWithStatPay']; + return $this->container['customPayments']; } /** - * Sets payRunExistsWithStatPay + * Sets customPayments * - * @param bool|null $payRunExistsWithStatPay payRunExistsWithStatPay + * @param \SynergiTech\Staffology\Model\LeaveCustomPayment[]|null $customPayments If this is Sick Leave with Custom Payment, then this stores the RoleId, PercentOfPay and PaySSPInAddition for each role assigned to an employee that did not end before the start date of the absence. * * @return $this */ - public function setPayRunExistsWithStatPay(?bool $payRunExistsWithStatPay): static + public function setCustomPayments(?array $customPayments): static { - if (is_null($payRunExistsWithStatPay)) { - throw new InvalidArgumentException('non-nullable payRunExistsWithStatPay cannot be null'); + if (is_null($customPayments)) { + array_push($this->openAPINullablesSetToNull, 'customPayments'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('customPayments', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payRunExistsWithStatPay'] = $payRunExistsWithStatPay; + $this->container['customPayments'] = $customPayments; return $this; } /** - * Gets from + * Gets customProRataRules * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\LeaveCustomProRataRule[]|null */ - public function getFrom(): ?\DateTime + public function getCustomProRataRules(): ?array { - return $this->container['from']; + return $this->container['customProRataRules']; } /** - * Sets from + * Sets customProRataRules * - * @param \DateTime|null $from The first day of Leave. If it's a half day PM then set the time portion to 12:00:00, otherwise leave it blank or set it to 00:00:00 + * @param \SynergiTech\Staffology\Model\LeaveCustomProRataRule[]|null $customProRataRules If this is a Leave that supports changing the pro rata at leave level, This stores the RoleId and ProRataMethod for each role assigned to an employee that did not end before the start date of the absence. * * @return $this */ - public function setFrom(?\DateTime $from): static + public function setCustomProRataRules(?array $customProRataRules): static { - if (is_null($from)) { - throw new InvalidArgumentException('non-nullable from cannot be null'); + if (is_null($customProRataRules)) { + array_push($this->openAPINullablesSetToNull, 'customProRataRules'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('customProRataRules', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['from'] = $from; + $this->container['customProRataRules'] = $customProRataRules; return $this; } /** - * Gets to + * Gets documentCount * - * @return \DateTime|null + * @return int|null */ - public function getTo(): ?\DateTime + public function getDocumentCount(): ?int { - return $this->container['to']; + return $this->container['documentCount']; } /** - * Sets to + * Sets documentCount * - * @param \DateTime|null $to The last day of Leave. If it's a half day AM then set the time portion to 11:59:59, otherwise set it to 23:59:59 + * @param int|null $documentCount [readonly] The number of attachments associated with this model * * @return $this */ - public function setTo(?\DateTime $to): static + public function setDocumentCount(?int $documentCount): static { - if (is_null($to)) { - throw new InvalidArgumentException('non-nullable to cannot be null'); + if (is_null($documentCount)) { + throw new InvalidArgumentException('non-nullable documentCount cannot be null'); } - $this->container['to'] = $to; + $this->container['documentCount'] = $documentCount; return $this; } /** - * Gets notes + * Gets documents * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getNotes(): ?string + public function getDocuments(): ?array { - return $this->container['notes']; + return $this->container['documents']; } /** - * Sets notes + * Sets documents * - * @param string|null $notes A free-form text field to record any comments + * @param \SynergiTech\Staffology\Model\Item[]|null $documents [readonly] The attachments associated with this model * * @return $this */ - public function setNotes(?string $notes): static + public function setDocuments(?array $documents): static { - if (is_null($notes)) { - array_push($this->openAPINullablesSetToNull, 'notes'); + if (is_null($documents)) { + array_push($this->openAPINullablesSetToNull, 'documents'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('notes', $nullablesSetToNull); + $index = array_search('documents', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($notes) && (mb_strlen($notes) > 300)) { - throw new InvalidArgumentException('invalid length for $notes when calling Leave., must be smaller than or equal to 300.'); - } - - $this->container['notes'] = $notes; + $this->container['documents'] = $documents; return $this; } /** - * Gets averageWeeklyEarnings + * Gets employee * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getAverageWeeklyEarnings(): ?float + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['averageWeeklyEarnings']; + return $this->container['employee']; } /** - * Sets averageWeeklyEarnings + * Sets employee * - * @param float|null $averageWeeklyEarnings The employees average weekly earnings. Only relevant for Statutory Pay It's advised that you don't try to calculate this yourself. + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setAverageWeeklyEarnings(?float $averageWeeklyEarnings): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($averageWeeklyEarnings)) { - throw new InvalidArgumentException('non-nullable averageWeeklyEarnings cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['averageWeeklyEarnings'] = $averageWeeklyEarnings; + $this->container['employee'] = $employee; return $this; } /** - * Gets automaticAWECalculation + * Gets externalId * - * @return bool|null + * @return string|null */ - public function getAutomaticAWECalculation(): ?bool + public function getExternalId(): ?string { - return $this->container['automaticAWECalculation']; + return $this->container['externalId']; } /** - * Sets automaticAWECalculation + * Sets externalId * - * @param bool|null $automaticAWECalculation If set to True then we'll automatically calculate the AverageWeeklyEarnings. Set it to false if you want to manually provide a figure that overrides our calculations + * @param string|null $externalId If the Leave comes from an ExternalDataProvider, then this is its Id in the ExternalDataProvider * * @return $this */ - public function setAutomaticAWECalculation(?bool $automaticAWECalculation): static + public function setExternalId(?string $externalId): static { - if (is_null($automaticAWECalculation)) { - throw new InvalidArgumentException('non-nullable automaticAWECalculation cannot be null'); + if (is_null($externalId)) { + array_push($this->openAPINullablesSetToNull, 'externalId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('externalId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($externalId) && (mb_strlen($externalId) > 100)) { + throw new InvalidArgumentException('invalid length for $externalId when calling Leave., must be smaller than or equal to 100.'); } - $this->container['automaticAWECalculation'] = $automaticAWECalculation; + + $this->container['externalId'] = $externalId; return $this; } /** - * Gets babyDate + * Gets from * * @return \DateTime|null */ - public function getBabyDate(): ?\DateTime + public function getFrom(): ?\DateTime { - return $this->container['babyDate']; + return $this->container['from']; } /** - * Sets babyDate + * Sets from * - * @param \DateTime|null $babyDate Only required for Parental Leave with Statutory Pay If Type is Maternity or Paternity then this is the date the baby is due. For Adoption this is the Matching Date. For Neonatal Care is the Baby Due / Matching / Placement Date + * @param \DateTime|null $from The first day of Leave. If it's a half day PM then set the time portion to 12:00:00, otherwise leave it blank or set it to 00:00:00 * * @return $this */ - public function setBabyDate(?\DateTime $babyDate): static + public function setFrom(?\DateTime $from): static { - if (is_null($babyDate)) { - array_push($this->openAPINullablesSetToNull, 'babyDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('babyDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); } - $this->container['babyDate'] = $babyDate; + $this->container['from'] = $from; return $this; } /** - * Gets secondaryBabyDate + * Gets historicOmpRequiresProcessing * - * @return \DateTime|null + * @return bool|null */ - public function getSecondaryBabyDate(): ?\DateTime + public function getHistoricOmpRequiresProcessing(): ?bool { - return $this->container['secondaryBabyDate']; + return $this->container['historicOmpRequiresProcessing']; } /** - * Sets secondaryBabyDate + * Sets historicOmpRequiresProcessing * - * @param \DateTime|null $secondaryBabyDate Only used for Parental Leave with Statutory Pay If Type is Maternity, Paternity, SharedParental (Birth) then this is the the Baby Born Date. For Adoption or SharedParental (Adoption) this is the Expected Placement Date. + * @param bool|null $historicOmpRequiresProcessing Only used during the creation and update of occupational maternity leaves. When creating or updating historical occupational leaves, this will determine whether to pay the historic payments or correction in the next PayRun. * * @return $this */ - public function setSecondaryBabyDate(?\DateTime $secondaryBabyDate): static + public function setHistoricOmpRequiresProcessing(?bool $historicOmpRequiresProcessing): static { - if (is_null($secondaryBabyDate)) { - array_push($this->openAPINullablesSetToNull, 'secondaryBabyDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('secondaryBabyDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($historicOmpRequiresProcessing)) { + throw new InvalidArgumentException('non-nullable historicOmpRequiresProcessing cannot be null'); } - $this->container['secondaryBabyDate'] = $secondaryBabyDate; + $this->container['historicOmpRequiresProcessing'] = $historicOmpRequiresProcessing; return $this; } /** - * Gets tertiaryBabyDate + * Gets historicOspRequiresProcessing * - * @return \DateTime|null + * @return bool|null */ - public function getTertiaryBabyDate(): ?\DateTime + public function getHistoricOspRequiresProcessing(): ?bool { - return $this->container['tertiaryBabyDate']; + return $this->container['historicOspRequiresProcessing']; } /** - * Sets tertiaryBabyDate - * - * @param \DateTime|null $tertiaryBabyDate Only used for Parental Leave with Statutory Pay If Type is Adoption this is the Placement Date. If Type is Neonatal Care is the Date Baby Entered Neonatal Care - * - * @return $this - */ - public function setTertiaryBabyDate(?\DateTime $tertiaryBabyDate): static - { - if (is_null($tertiaryBabyDate)) { - array_push($this->openAPINullablesSetToNull, 'tertiaryBabyDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tertiaryBabyDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + * Sets historicOspRequiresProcessing + * + * @param bool|null $historicOspRequiresProcessing Only used during the creation of sickness Occupational Policy. When creating historical SOP, this will determine whether to pay that leave in the next PayRun. + * + * @return $this + */ + public function setHistoricOspRequiresProcessing(?bool $historicOspRequiresProcessing): static + { + if (is_null($historicOspRequiresProcessing)) { + throw new InvalidArgumentException('non-nullable historicOspRequiresProcessing cannot be null'); } - $this->container['tertiaryBabyDate'] = $tertiaryBabyDate; + $this->container['historicOspRequiresProcessing'] = $historicOspRequiresProcessing; return $this; } /** - * Gets overridePaymentDescription + * Gets historicSmpRequiresProcessing * * @return bool|null */ - public function getOverridePaymentDescription(): ?bool + public function getHistoricSmpRequiresProcessing(): ?bool { - return $this->container['overridePaymentDescription']; + return $this->container['historicSmpRequiresProcessing']; } /** - * Sets overridePaymentDescription + * Sets historicSmpRequiresProcessing * - * @param bool|null $overridePaymentDescription If Pay is StatutoryPay and you want to override our description that goes with the payment then set this to true + * @param bool|null $historicSmpRequiresProcessing Only used during the creation and update of statutory maternity leaves. When creating or updating historical statutory maternity leaves, this will determine whether to pay the historic payments or correction in the next PayRun. * * @return $this */ - public function setOverridePaymentDescription(?bool $overridePaymentDescription): static + public function setHistoricSmpRequiresProcessing(?bool $historicSmpRequiresProcessing): static { - if (is_null($overridePaymentDescription)) { - throw new InvalidArgumentException('non-nullable overridePaymentDescription cannot be null'); + if (is_null($historicSmpRequiresProcessing)) { + throw new InvalidArgumentException('non-nullable historicSmpRequiresProcessing cannot be null'); } - $this->container['overridePaymentDescription'] = $overridePaymentDescription; + $this->container['historicSmpRequiresProcessing'] = $historicSmpRequiresProcessing; return $this; } /** - * Gets overridenPaymentDescription + * Gets historicSspRequiresProcessing * - * @return string|null + * @return bool|null */ - public function getOverridenPaymentDescription(): ?string + public function getHistoricSspRequiresProcessing(): ?bool { - return $this->container['overridenPaymentDescription']; + return $this->container['historicSspRequiresProcessing']; } /** - * Sets overridenPaymentDescription + * Sets historicSspRequiresProcessing * - * @param string|null $overridenPaymentDescription If OverridePaymentDescription is true and Pay is set to StatutoryPay then we'll use this as the description for the payment amount. + * @param bool|null $historicSspRequiresProcessing Only used during the creation of historical SSP. When creating historical SSP, this will determine whether to pay that leave in the next PayRun. * * @return $this */ - public function setOverridenPaymentDescription(?string $overridenPaymentDescription): static + public function setHistoricSspRequiresProcessing(?bool $historicSspRequiresProcessing): static { - if (is_null($overridenPaymentDescription)) { - array_push($this->openAPINullablesSetToNull, 'overridenPaymentDescription'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('overridenPaymentDescription', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($overridenPaymentDescription) && (mb_strlen($overridenPaymentDescription) > 150)) { - throw new InvalidArgumentException('invalid length for $overridenPaymentDescription when calling Leave., must be smaller than or equal to 150.'); + if (is_null($historicSspRequiresProcessing)) { + throw new InvalidArgumentException('non-nullable historicSspRequiresProcessing cannot be null'); } - - $this->container['overridenPaymentDescription'] = $overridenPaymentDescription; + $this->container['historicSspRequiresProcessing'] = $historicSspRequiresProcessing; return $this; } /** - * Gets workingDays + * Gets historicSxpRequiresProcessing * - * @return float|null + * @return bool|null */ - public function getWorkingDays(): ?float + public function getHistoricSxpRequiresProcessing(): ?bool { - return $this->container['workingDays']; + return $this->container['historicSxpRequiresProcessing']; } /** - * Sets workingDays + * Sets historicSxpRequiresProcessing * - * @param float|null $workingDays [readonly] The number of working days covered by this leave. This is calculated based on the employees Working Pattern. + * @param bool|null $historicSxpRequiresProcessing Used during to determine whether to back pay before current payrun * * @return $this */ - public function setWorkingDays(?float $workingDays): static + public function setHistoricSxpRequiresProcessing(?bool $historicSxpRequiresProcessing): static { - if (is_null($workingDays)) { - throw new InvalidArgumentException('non-nullable workingDays cannot be null'); + if (is_null($historicSxpRequiresProcessing)) { + throw new InvalidArgumentException('non-nullable historicSxpRequiresProcessing cannot be null'); } - $this->container['workingDays'] = $workingDays; + $this->container['historicSxpRequiresProcessing'] = $historicSxpRequiresProcessing; return $this; } /** - * Gets workingDaysOverride + * Gets id * - * @return float|null + * @return string|null */ - public function getWorkingDaysOverride(): ?float + public function getId(): ?string { - return $this->container['workingDaysOverride']; + return $this->container['id']; } /** - * Sets workingDaysOverride + * Sets id * - * @param float|null $workingDaysOverride If a value is provided here then this will be used in place of the calculated WorkingDays value + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setWorkingDaysOverride(?float $workingDaysOverride): static + public function setId(?string $id): static { - if (is_null($workingDaysOverride)) { - array_push($this->openAPINullablesSetToNull, 'workingDaysOverride'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('workingDaysOverride', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['workingDaysOverride'] = $workingDaysOverride; + $this->container['id'] = $id; return $this; } /** - * Gets totalDays + * Gets isReversed * - * @return float|null + * @return bool|null */ - public function getTotalDays(): ?float + public function getIsReversed(): ?bool { - return $this->container['totalDays']; + return $this->container['isReversed']; } /** - * Sets totalDays + * Sets isReversed * - * @param float|null $totalDays [readonly] The number of days covered by this leave, regardless of whether or not they're working days. This is calculated based on the employees Working Pattern. + * @param bool|null $isReversed If the reversal of this Leave has already been processed, this will be set to true * * @return $this */ - public function setTotalDays(?float $totalDays): static + public function setIsReversed(?bool $isReversed): static { - if (is_null($totalDays)) { - throw new InvalidArgumentException('non-nullable totalDays cannot be null'); + if (is_null($isReversed)) { + throw new InvalidArgumentException('non-nullable isReversed cannot be null'); } - $this->container['totalDays'] = $totalDays; + $this->container['isReversed'] = $isReversed; return $this; } /** - * Gets totalDaysOverride + * Gets kitSplitDays * - * @return float|null + * @return \DateTime[]|null */ - public function getTotalDaysOverride(): ?float + public function getKitSplitDays(): ?array { - return $this->container['totalDaysOverride']; + return $this->container['kitSplitDays']; } /** - * Sets totalDaysOverride + * Sets kitSplitDays * - * @param float|null $totalDaysOverride If a value is provided here then this will be used in place of the calculated TotalDays value + * @param \DateTime[]|null $kitSplitDays If the LeaveType supports KIT/SPLIT days then use this property to store the list of dates * * @return $this */ - public function setTotalDaysOverride(?float $totalDaysOverride): static + public function setKitSplitDays(?array $kitSplitDays): static { - if (is_null($totalDaysOverride)) { - array_push($this->openAPINullablesSetToNull, 'totalDaysOverride'); + if (is_null($kitSplitDays)) { + array_push($this->openAPINullablesSetToNull, 'kitSplitDays'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalDaysOverride', $nullablesSetToNull); + $index = array_search('kitSplitDays', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['totalDaysOverride'] = $totalDaysOverride; + $this->container['kitSplitDays'] = $kitSplitDays; return $this; } /** - * Gets useAssumedPensionablePay + * Gets lastProcessedFrom * - * @return bool|null + * @return \DateTime|null */ - public function getUseAssumedPensionablePay(): ?bool + public function getLastProcessedFrom(): ?\DateTime { - return $this->container['useAssumedPensionablePay']; + return $this->container['lastProcessedFrom']; } /** - * Sets useAssumedPensionablePay + * Sets lastProcessedFrom * - * @param bool|null $useAssumedPensionablePay If this Leave has Statutory Pay then if this is set to True we will use the value set in AssumedPensionablePay to work out the employer pension contributions + * @param \DateTime|null $lastProcessedFrom [readonly] Last Processed From Date If this Leave has already been processed, this will be the original leave from date * * @return $this */ - public function setUseAssumedPensionablePay(?bool $useAssumedPensionablePay): static + public function setLastProcessedFrom(?\DateTime $lastProcessedFrom): static { - if (is_null($useAssumedPensionablePay)) { - throw new InvalidArgumentException('non-nullable useAssumedPensionablePay cannot be null'); + if (is_null($lastProcessedFrom)) { + array_push($this->openAPINullablesSetToNull, 'lastProcessedFrom'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lastProcessedFrom', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useAssumedPensionablePay'] = $useAssumedPensionablePay; + $this->container['lastProcessedFrom'] = $lastProcessedFrom; return $this; } /** - * Gets assumedPensionablePays + * Gets linkedPiw * - * @return \SynergiTech\Staffology\Model\LeaveAssumedPensionablePay[]|null + * @return \SynergiTech\Staffology\Model\LinkedPiw|null */ - public function getAssumedPensionablePays(): ?array + public function getLinkedPiw(): ?\SynergiTech\Staffology\Model\LinkedPiw { - return $this->container['assumedPensionablePays']; + return $this->container['linkedPiw']; } /** - * Sets assumedPensionablePays + * Sets linkedPiw * - * @param \SynergiTech\Staffology\Model\LeaveAssumedPensionablePay[]|null $assumedPensionablePays if UseAssumedPensionablePay is True, then this is the value used to calculate the employer pension contributions + * @param \SynergiTech\Staffology\Model\LinkedPiw|null $linkedPiw linkedPiw * * @return $this */ - public function setAssumedPensionablePays(?array $assumedPensionablePays): static + public function setLinkedPiw(?\SynergiTech\Staffology\Model\LinkedPiw $linkedPiw): static { - if (is_null($assumedPensionablePays)) { - array_push($this->openAPINullablesSetToNull, 'assumedPensionablePays'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('assumedPensionablePays', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($linkedPiw)) { + throw new InvalidArgumentException('non-nullable linkedPiw cannot be null'); } - $this->container['assumedPensionablePays'] = $assumedPensionablePays; + $this->container['linkedPiw'] = $linkedPiw; return $this; } /** - * Gets offsetPay + * Gets notes * - * @return bool|null + * @return string|null */ - public function getOffsetPay(): ?bool + public function getNotes(): ?string { - return $this->container['offsetPay']; + return $this->container['notes']; } /** - * Sets offsetPay + * Sets notes * - * @param bool|null $offsetPay If this Leave has Statutory Pay and this is set to True and the employe eis paid a fixed amoutn per period with Leave Adjustments set to automatic, then we'll reduce their pay for the period by the statutory amount so the employee still gets paid the full amount. + * @param string|null $notes A free-form text field to record any comments * * @return $this */ - public function setOffsetPay(?bool $offsetPay): static + public function setNotes(?string $notes): static { - if (is_null($offsetPay)) { - throw new InvalidArgumentException('non-nullable offsetPay cannot be null'); + if (is_null($notes)) { + array_push($this->openAPINullablesSetToNull, 'notes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('notes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($notes) && (mb_strlen($notes) > 300)) { + throw new InvalidArgumentException('invalid length for $notes when calling Leave., must be smaller than or equal to 300.'); } - $this->container['offsetPay'] = $offsetPay; + + $this->container['notes'] = $notes; return $this; } /** - * Gets sspPayFromDayOne + * Gets occupationalMaternityPolicyUniqueId * - * @return bool|null + * @return string|null */ - public function getSspPayFromDayOne(): ?bool + public function getOccupationalMaternityPolicyUniqueId(): ?string { - return $this->container['sspPayFromDayOne']; + return $this->container['occupationalMaternityPolicyUniqueId']; } /** - * Sets sspPayFromDayOne + * Sets occupationalMaternityPolicyUniqueId * - * @param bool|null $sspPayFromDayOne If this is Sick Leave with Statutory Pay then setting this to true will force SSP to be paid from day one rather than the usual rule of the first Working Day after 3 Qualifying Days + * @param string|null $occupationalMaternityPolicyUniqueId Occupational Maternity Policy Id when leave type is Maternity and payment type is occupational policy * * @return $this */ - public function setSspPayFromDayOne(?bool $sspPayFromDayOne): static + public function setOccupationalMaternityPolicyUniqueId(?string $occupationalMaternityPolicyUniqueId): static { - if (is_null($sspPayFromDayOne)) { - throw new InvalidArgumentException('non-nullable sspPayFromDayOne cannot be null'); + if (is_null($occupationalMaternityPolicyUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'occupationalMaternityPolicyUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('occupationalMaternityPolicyUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['sspPayFromDayOne'] = $sspPayFromDayOne; + $this->container['occupationalMaternityPolicyUniqueId'] = $occupationalMaternityPolicyUniqueId; return $this; } /** - * Gets linkedPiw + * Gets offsetPay * - * @return \SynergiTech\Staffology\Model\LinkedPiw|null + * @return bool|null */ - public function getLinkedPiw(): ?\SynergiTech\Staffology\Model\LinkedPiw + public function getOffsetPay(): ?bool { - return $this->container['linkedPiw']; + return $this->container['offsetPay']; } /** - * Sets linkedPiw + * Sets offsetPay * - * @param \SynergiTech\Staffology\Model\LinkedPiw|null $linkedPiw linkedPiw + * @param bool|null $offsetPay If this Leave has Statutory Pay and this is set to True and the employe eis paid a fixed amoutn per period with Leave Adjustments set to automatic, then we'll reduce their pay for the period by the statutory amount so the employee still gets paid the full amount. * * @return $this */ - public function setLinkedPiw(?\SynergiTech\Staffology\Model\LinkedPiw $linkedPiw): static + public function setOffsetPay(?bool $offsetPay): static { - if (is_null($linkedPiw)) { - throw new InvalidArgumentException('non-nullable linkedPiw cannot be null'); + if (is_null($offsetPay)) { + throw new InvalidArgumentException('non-nullable offsetPay cannot be null'); } - $this->container['linkedPiw'] = $linkedPiw; + $this->container['offsetPay'] = $offsetPay; return $this; } /** - * Gets kitSplitDays + * Gets openingOmpPay * - * @return \DateTime[]|null + * @return float|null */ - public function getKitSplitDays(): ?array + public function getOpeningOmpPay(): ?float { - return $this->container['kitSplitDays']; + return $this->container['openingOmpPay']; } /** - * Sets kitSplitDays + * Sets openingOmpPay * - * @param \DateTime[]|null $kitSplitDays If the LeaveType supports KIT/SPLIT days then use this property to store the list of dates + * @param float|null $openingOmpPay Opening occupational pay which has already been paid to the employee * * @return $this */ - public function setKitSplitDays(?array $kitSplitDays): static + public function setOpeningOmpPay(?float $openingOmpPay): static { - if (is_null($kitSplitDays)) { - array_push($this->openAPINullablesSetToNull, 'kitSplitDays'); + if (is_null($openingOmpPay)) { + array_push($this->openAPINullablesSetToNull, 'openingOmpPay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('kitSplitDays', $nullablesSetToNull); + $index = array_search('openingOmpPay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['kitSplitDays'] = $kitSplitDays; + $this->container['openingOmpPay'] = $openingOmpPay; return $this; } /** - * Gets historicSspRequiresProcessing + * Gets openingPay * - * @return bool|null + * @return float|null */ - public function getHistoricSspRequiresProcessing(): ?bool + public function getOpeningPay(): ?float { - return $this->container['historicSspRequiresProcessing']; + return $this->container['openingPay']; } /** - * Sets historicSspRequiresProcessing + * Sets openingPay * - * @param bool|null $historicSspRequiresProcessing Only used during the creation of historical SSP. When creating historical SSP, this will determine whether to pay that leave in the next PayRun. + * @param float|null $openingPay Opening pay which has already been paid to the employee in another system * * @return $this */ - public function setHistoricSspRequiresProcessing(?bool $historicSspRequiresProcessing): static + public function setOpeningPay(?float $openingPay): static { - if (is_null($historicSspRequiresProcessing)) { - throw new InvalidArgumentException('non-nullable historicSspRequiresProcessing cannot be null'); + if (is_null($openingPay)) { + array_push($this->openAPINullablesSetToNull, 'openingPay'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('openingPay', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['historicSspRequiresProcessing'] = $historicSspRequiresProcessing; + $this->container['openingPay'] = $openingPay; return $this; } /** - * Gets historicSxpRequiresProcessing + * Gets overridePaymentDescription * * @return bool|null */ - public function getHistoricSxpRequiresProcessing(): ?bool + public function getOverridePaymentDescription(): ?bool { - return $this->container['historicSxpRequiresProcessing']; + return $this->container['overridePaymentDescription']; } /** - * Sets historicSxpRequiresProcessing + * Sets overridePaymentDescription * - * @param bool|null $historicSxpRequiresProcessing Used during to determine whether to back pay before current payrun + * @param bool|null $overridePaymentDescription If Pay is StatutoryPay and you want to override our description that goes with the payment then set this to true * * @return $this */ - public function setHistoricSxpRequiresProcessing(?bool $historicSxpRequiresProcessing): static + public function setOverridePaymentDescription(?bool $overridePaymentDescription): static { - if (is_null($historicSxpRequiresProcessing)) { - throw new InvalidArgumentException('non-nullable historicSxpRequiresProcessing cannot be null'); + if (is_null($overridePaymentDescription)) { + throw new InvalidArgumentException('non-nullable overridePaymentDescription cannot be null'); } - $this->container['historicSxpRequiresProcessing'] = $historicSxpRequiresProcessing; + $this->container['overridePaymentDescription'] = $overridePaymentDescription; return $this; } /** - * Gets openingPay + * Gets overridenPaymentDescription * - * @return float|null + * @return string|null */ - public function getOpeningPay(): ?float + public function getOverridenPaymentDescription(): ?string { - return $this->container['openingPay']; + return $this->container['overridenPaymentDescription']; } /** - * Sets openingPay + * Sets overridenPaymentDescription * - * @param float|null $openingPay Opening pay which has already been paid to the employee in another system + * @param string|null $overridenPaymentDescription If OverridePaymentDescription is true and Pay is set to StatutoryPay then we'll use this as the description for the payment amount. * * @return $this */ - public function setOpeningPay(?float $openingPay): static + public function setOverridenPaymentDescription(?string $overridenPaymentDescription): static { - if (is_null($openingPay)) { - array_push($this->openAPINullablesSetToNull, 'openingPay'); + if (is_null($overridenPaymentDescription)) { + array_push($this->openAPINullablesSetToNull, 'overridenPaymentDescription'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('openingPay', $nullablesSetToNull); + $index = array_search('overridenPaymentDescription', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['openingPay'] = $openingPay; + if (!is_null($overridenPaymentDescription) && (mb_strlen($overridenPaymentDescription) > 150)) { + throw new InvalidArgumentException('invalid length for $overridenPaymentDescription when calling Leave., must be smaller than or equal to 150.'); + } + + $this->container['overridenPaymentDescription'] = $overridenPaymentDescription; return $this; } /** - * Gets useOpeningPay + * Gets pay * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LeavePayType|null */ - public function getUseOpeningPay(): ?bool + public function getPay(): ?\SynergiTech\Staffology\Model\LeavePayType { - return $this->container['useOpeningPay']; + return $this->container['pay']; } /** - * Sets useOpeningPay + * Sets pay * - * @param bool|null $useOpeningPay Use the OpeningPay which has already been paid in another system + * @param \SynergiTech\Staffology\Model\LeavePayType|null $pay pay * * @return $this */ - public function setUseOpeningPay(?bool $useOpeningPay): static + public function setPay(?\SynergiTech\Staffology\Model\LeavePayType $pay): static { - if (is_null($useOpeningPay)) { - throw new InvalidArgumentException('non-nullable useOpeningPay cannot be null'); + if (is_null($pay)) { + throw new InvalidArgumentException('non-nullable pay cannot be null'); } - $this->container['useOpeningPay'] = $useOpeningPay; + $this->container['pay'] = $pay; return $this; } /** - * Gets historicOspRequiresProcessing + * Gets payFrequency * - * @return bool|null + * @return \SynergiTech\Staffology\Model\StatPayFrequency|null */ - public function getHistoricOspRequiresProcessing(): ?bool + public function getPayFrequency(): ?\SynergiTech\Staffology\Model\StatPayFrequency { - return $this->container['historicOspRequiresProcessing']; + return $this->container['payFrequency']; } /** - * Sets historicOspRequiresProcessing + * Sets payFrequency * - * @param bool|null $historicOspRequiresProcessing Only used during the creation of sickness Occupational Policy. When creating historical SOP, this will determine whether to pay that leave in the next PayRun. + * @param \SynergiTech\Staffology\Model\StatPayFrequency|null $payFrequency payFrequency * * @return $this */ - public function setHistoricOspRequiresProcessing(?bool $historicOspRequiresProcessing): static + public function setPayFrequency(?\SynergiTech\Staffology\Model\StatPayFrequency $payFrequency): static { - if (is_null($historicOspRequiresProcessing)) { - throw new InvalidArgumentException('non-nullable historicOspRequiresProcessing cannot be null'); + if (is_null($payFrequency)) { + throw new InvalidArgumentException('non-nullable payFrequency cannot be null'); } - $this->container['historicOspRequiresProcessing'] = $historicOspRequiresProcessing; + $this->container['payFrequency'] = $payFrequency; return $this; } /** - * Gets historicOmpRequiresProcessing + * Gets payRunExistsWithOccMaternityPay * * @return bool|null */ - public function getHistoricOmpRequiresProcessing(): ?bool + public function getPayRunExistsWithOccMaternityPay(): ?bool { - return $this->container['historicOmpRequiresProcessing']; + return $this->container['payRunExistsWithOccMaternityPay']; } /** - * Sets historicOmpRequiresProcessing + * Sets payRunExistsWithOccMaternityPay * - * @param bool|null $historicOmpRequiresProcessing Only used during the creation and update of occupational maternity leaves. When creating or updating historical occupational leaves, this will determine whether to pay the historic payments or correction in the next PayRun. + * @param bool|null $payRunExistsWithOccMaternityPay Indicates whether there is occupational maternity payment associated with a leave in the current pay run. * * @return $this */ - public function setHistoricOmpRequiresProcessing(?bool $historicOmpRequiresProcessing): static + public function setPayRunExistsWithOccMaternityPay(?bool $payRunExistsWithOccMaternityPay): static { - if (is_null($historicOmpRequiresProcessing)) { - throw new InvalidArgumentException('non-nullable historicOmpRequiresProcessing cannot be null'); + if (is_null($payRunExistsWithOccMaternityPay)) { + throw new InvalidArgumentException('non-nullable payRunExistsWithOccMaternityPay cannot be null'); } - $this->container['historicOmpRequiresProcessing'] = $historicOmpRequiresProcessing; + $this->container['payRunExistsWithOccMaternityPay'] = $payRunExistsWithOccMaternityPay; return $this; } /** - * Gets historicSmpRequiresProcessing + * Gets payRunExistsWithStatPay * * @return bool|null */ - public function getHistoricSmpRequiresProcessing(): ?bool + public function getPayRunExistsWithStatPay(): ?bool { - return $this->container['historicSmpRequiresProcessing']; + return $this->container['payRunExistsWithStatPay']; } /** - * Sets historicSmpRequiresProcessing + * Sets payRunExistsWithStatPay * - * @param bool|null $historicSmpRequiresProcessing Only used during the creation and update of statutory maternity leaves. When creating or updating historical statutory maternity leaves, this will determine whether to pay the historic payments or correction in the next PayRun. + * @param bool|null $payRunExistsWithStatPay payRunExistsWithStatPay * * @return $this */ - public function setHistoricSmpRequiresProcessing(?bool $historicSmpRequiresProcessing): static + public function setPayRunExistsWithStatPay(?bool $payRunExistsWithStatPay): static { - if (is_null($historicSmpRequiresProcessing)) { - throw new InvalidArgumentException('non-nullable historicSmpRequiresProcessing cannot be null'); + if (is_null($payRunExistsWithStatPay)) { + throw new InvalidArgumentException('non-nullable payRunExistsWithStatPay cannot be null'); } - $this->container['historicSmpRequiresProcessing'] = $historicSmpRequiresProcessing; + $this->container['payRunExistsWithStatPay'] = $payRunExistsWithStatPay; return $this; } /** - * Gets occupationalMaternityPolicyUniqueId + * Gets paymentTier * - * @return string|null + * @return \SynergiTech\Staffology\Model\NeonatalCarePaymentTier|null */ - public function getOccupationalMaternityPolicyUniqueId(): ?string + public function getPaymentTier(): ?\SynergiTech\Staffology\Model\NeonatalCarePaymentTier { - return $this->container['occupationalMaternityPolicyUniqueId']; + return $this->container['paymentTier']; } /** - * Sets occupationalMaternityPolicyUniqueId + * Sets paymentTier * - * @param string|null $occupationalMaternityPolicyUniqueId Occupational Maternity Policy Id when leave type is Maternity and payment type is occupational policy + * @param \SynergiTech\Staffology\Model\NeonatalCarePaymentTier|null $paymentTier paymentTier * * @return $this */ - public function setOccupationalMaternityPolicyUniqueId(?string $occupationalMaternityPolicyUniqueId): static + public function setPaymentTier(?\SynergiTech\Staffology\Model\NeonatalCarePaymentTier $paymentTier): static { - if (is_null($occupationalMaternityPolicyUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'occupationalMaternityPolicyUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('occupationalMaternityPolicyUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($paymentTier)) { + throw new InvalidArgumentException('non-nullable paymentTier cannot be null'); } - $this->container['occupationalMaternityPolicyUniqueId'] = $occupationalMaternityPolicyUniqueId; + $this->container['paymentTier'] = $paymentTier; return $this; } /** - * Gets openingOmpPay + * Gets providerId * - * @return float|null + * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null */ - public function getOpeningOmpPay(): ?float + public function getProviderId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId { - return $this->container['openingOmpPay']; + return $this->container['providerId']; } /** - * Sets openingOmpPay + * Sets providerId * - * @param float|null $openingOmpPay Opening occupational pay which has already been paid to the employee + * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $providerId providerId * * @return $this */ - public function setOpeningOmpPay(?float $openingOmpPay): static + public function setProviderId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $providerId): static { - if (is_null($openingOmpPay)) { - array_push($this->openAPINullablesSetToNull, 'openingOmpPay'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('openingOmpPay', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($providerId)) { + throw new InvalidArgumentException('non-nullable providerId cannot be null'); } - $this->container['openingOmpPay'] = $openingOmpPay; + $this->container['providerId'] = $providerId; return $this; } /** - * Gets payRunExistsWithOccMaternityPay + * Gets secondaryBabyDate * - * @return bool|null + * @return \DateTime|null */ - public function getPayRunExistsWithOccMaternityPay(): ?bool + public function getSecondaryBabyDate(): ?\DateTime { - return $this->container['payRunExistsWithOccMaternityPay']; + return $this->container['secondaryBabyDate']; } /** - * Sets payRunExistsWithOccMaternityPay + * Sets secondaryBabyDate * - * @param bool|null $payRunExistsWithOccMaternityPay Indicates whether there is occupational maternity payment associated with a leave in the current pay run. + * @param \DateTime|null $secondaryBabyDate Only used for Parental Leave with Statutory Pay If Type is Maternity, Paternity, SharedParental (Birth) then this is the the Baby Born Date. For Adoption or SharedParental (Adoption) this is the Expected Placement Date. * * @return $this */ - public function setPayRunExistsWithOccMaternityPay(?bool $payRunExistsWithOccMaternityPay): static + public function setSecondaryBabyDate(?\DateTime $secondaryBabyDate): static { - if (is_null($payRunExistsWithOccMaternityPay)) { - throw new InvalidArgumentException('non-nullable payRunExistsWithOccMaternityPay cannot be null'); + if (is_null($secondaryBabyDate)) { + array_push($this->openAPINullablesSetToNull, 'secondaryBabyDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('secondaryBabyDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payRunExistsWithOccMaternityPay'] = $payRunExistsWithOccMaternityPay; + $this->container['secondaryBabyDate'] = $secondaryBabyDate; return $this; } /** - * Gets calculationType + * Gets sspPayFromDayOne * - * @return \SynergiTech\Staffology\Model\LeaveCalculationType|null + * @return bool|null */ - public function getCalculationType(): ?\SynergiTech\Staffology\Model\LeaveCalculationType + public function getSspPayFromDayOne(): ?bool { - return $this->container['calculationType']; + return $this->container['sspPayFromDayOne']; } /** - * Sets calculationType + * Sets sspPayFromDayOne * - * @param \SynergiTech\Staffology\Model\LeaveCalculationType|null $calculationType calculationType + * @param bool|null $sspPayFromDayOne If this is Sick Leave with Statutory Pay then setting this to true will force SSP to be paid from day one rather than the usual rule of the first Working Day after 3 Qualifying Days * * @return $this */ - public function setCalculationType(?\SynergiTech\Staffology\Model\LeaveCalculationType $calculationType): static + public function setSspPayFromDayOne(?bool $sspPayFromDayOne): static { - if (is_null($calculationType)) { - throw new InvalidArgumentException('non-nullable calculationType cannot be null'); + if (is_null($sspPayFromDayOne)) { + throw new InvalidArgumentException('non-nullable sspPayFromDayOne cannot be null'); } - $this->container['calculationType'] = $calculationType; + $this->container['sspPayFromDayOne'] = $sspPayFromDayOne; return $this; } @@ -1760,272 +1767,265 @@ public function setStrikeHoursToDeduct(?float $strikeHoursToDeduct): static } /** - * Gets customPayments + * Gets tertiaryBabyDate * - * @return \SynergiTech\Staffology\Model\LeaveCustomPayment[]|null + * @return \DateTime|null */ - public function getCustomPayments(): ?array + public function getTertiaryBabyDate(): ?\DateTime { - return $this->container['customPayments']; + return $this->container['tertiaryBabyDate']; } /** - * Sets customPayments + * Sets tertiaryBabyDate * - * @param \SynergiTech\Staffology\Model\LeaveCustomPayment[]|null $customPayments If this is Sick Leave with Custom Payment, then this stores the RoleId, PercentOfPay and PaySSPInAddition for each role assigned to an employee that did not end before the start date of the absence. + * @param \DateTime|null $tertiaryBabyDate Only used for Parental Leave with Statutory Pay If Type is Adoption this is the Placement Date. If Type is Neonatal Care is the Date Baby Entered Neonatal Care * * @return $this */ - public function setCustomPayments(?array $customPayments): static + public function setTertiaryBabyDate(?\DateTime $tertiaryBabyDate): static { - if (is_null($customPayments)) { - array_push($this->openAPINullablesSetToNull, 'customPayments'); + if (is_null($tertiaryBabyDate)) { + array_push($this->openAPINullablesSetToNull, 'tertiaryBabyDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('customPayments', $nullablesSetToNull); + $index = array_search('tertiaryBabyDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['customPayments'] = $customPayments; + $this->container['tertiaryBabyDate'] = $tertiaryBabyDate; return $this; } /** - * Gets customProRataRules + * Gets to * - * @return \SynergiTech\Staffology\Model\LeaveCustomProRataRule[]|null + * @return \DateTime|null */ - public function getCustomProRataRules(): ?array + public function getTo(): ?\DateTime { - return $this->container['customProRataRules']; + return $this->container['to']; } /** - * Sets customProRataRules + * Sets to * - * @param \SynergiTech\Staffology\Model\LeaveCustomProRataRule[]|null $customProRataRules If this is a Leave that supports changing the pro rata at leave level, This stores the RoleId and ProRataMethod for each role assigned to an employee that did not end before the start date of the absence. + * @param \DateTime|null $to The last day of Leave. If it's a half day AM then set the time portion to 11:59:59, otherwise set it to 23:59:59 * * @return $this */ - public function setCustomProRataRules(?array $customProRataRules): static + public function setTo(?\DateTime $to): static { - if (is_null($customProRataRules)) { - array_push($this->openAPINullablesSetToNull, 'customProRataRules'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('customProRataRules', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); } - $this->container['customProRataRules'] = $customProRataRules; + $this->container['to'] = $to; return $this; } /** - * Gets lastProcessedFrom + * Gets totalDays * - * @return \DateTime|null + * @return float|null */ - public function getLastProcessedFrom(): ?\DateTime + public function getTotalDays(): ?float { - return $this->container['lastProcessedFrom']; + return $this->container['totalDays']; } /** - * Sets lastProcessedFrom + * Sets totalDays * - * @param \DateTime|null $lastProcessedFrom [readonly] Last Processed From Date If this Leave has already been processed, this will be the original leave from date + * @param float|null $totalDays [readonly] The number of days covered by this leave, regardless of whether or not they're working days. This is calculated based on the employees Working Pattern. * * @return $this */ - public function setLastProcessedFrom(?\DateTime $lastProcessedFrom): static + public function setTotalDays(?float $totalDays): static { - if (is_null($lastProcessedFrom)) { - array_push($this->openAPINullablesSetToNull, 'lastProcessedFrom'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastProcessedFrom', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($totalDays)) { + throw new InvalidArgumentException('non-nullable totalDays cannot be null'); } - $this->container['lastProcessedFrom'] = $lastProcessedFrom; + $this->container['totalDays'] = $totalDays; return $this; } /** - * Gets isReversed + * Gets totalDaysOverride * - * @return bool|null + * @return float|null */ - public function getIsReversed(): ?bool + public function getTotalDaysOverride(): ?float { - return $this->container['isReversed']; + return $this->container['totalDaysOverride']; } /** - * Sets isReversed + * Sets totalDaysOverride * - * @param bool|null $isReversed If the reversal of this Leave has already been processed, this will be set to true + * @param float|null $totalDaysOverride If a value is provided here then this will be used in place of the calculated TotalDays value * * @return $this */ - public function setIsReversed(?bool $isReversed): static + public function setTotalDaysOverride(?float $totalDaysOverride): static { - if (is_null($isReversed)) { - throw new InvalidArgumentException('non-nullable isReversed cannot be null'); + if (is_null($totalDaysOverride)) { + array_push($this->openAPINullablesSetToNull, 'totalDaysOverride'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('totalDaysOverride', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isReversed'] = $isReversed; + $this->container['totalDaysOverride'] = $totalDaysOverride; return $this; } /** - * Gets paymentTier + * Gets type * - * @return \SynergiTech\Staffology\Model\NeonatalCarePaymentTier|null + * @return \SynergiTech\Staffology\Model\LeaveType|null */ - public function getPaymentTier(): ?\SynergiTech\Staffology\Model\NeonatalCarePaymentTier + public function getType(): ?\SynergiTech\Staffology\Model\LeaveType { - return $this->container['paymentTier']; + return $this->container['type']; } /** - * Sets paymentTier + * Sets type * - * @param \SynergiTech\Staffology\Model\NeonatalCarePaymentTier|null $paymentTier paymentTier + * @param \SynergiTech\Staffology\Model\LeaveType|null $type type * * @return $this */ - public function setPaymentTier(?\SynergiTech\Staffology\Model\NeonatalCarePaymentTier $paymentTier): static + public function setType(?\SynergiTech\Staffology\Model\LeaveType $type): static { - if (is_null($paymentTier)) { - throw new InvalidArgumentException('non-nullable paymentTier cannot be null'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['paymentTier'] = $paymentTier; + $this->container['type'] = $type; return $this; } /** - * Gets documentCount + * Gets useAssumedPensionablePay * - * @return int|null + * @return bool|null */ - public function getDocumentCount(): ?int + public function getUseAssumedPensionablePay(): ?bool { - return $this->container['documentCount']; + return $this->container['useAssumedPensionablePay']; } /** - * Sets documentCount + * Sets useAssumedPensionablePay * - * @param int|null $documentCount [readonly] The number of attachments associated with this model + * @param bool|null $useAssumedPensionablePay If this Leave has Statutory Pay then if this is set to True we will use the value set in AssumedPensionablePay to work out the employer pension contributions * * @return $this */ - public function setDocumentCount(?int $documentCount): static + public function setUseAssumedPensionablePay(?bool $useAssumedPensionablePay): static { - if (is_null($documentCount)) { - throw new InvalidArgumentException('non-nullable documentCount cannot be null'); + if (is_null($useAssumedPensionablePay)) { + throw new InvalidArgumentException('non-nullable useAssumedPensionablePay cannot be null'); } - $this->container['documentCount'] = $documentCount; + $this->container['useAssumedPensionablePay'] = $useAssumedPensionablePay; return $this; } /** - * Gets documents + * Gets useOpeningPay * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return bool|null */ - public function getDocuments(): ?array + public function getUseOpeningPay(): ?bool { - return $this->container['documents']; + return $this->container['useOpeningPay']; } /** - * Sets documents + * Sets useOpeningPay * - * @param \SynergiTech\Staffology\Model\Item[]|null $documents [readonly] The attachments associated with this model + * @param bool|null $useOpeningPay Use the OpeningPay which has already been paid in another system * * @return $this */ - public function setDocuments(?array $documents): static + public function setUseOpeningPay(?bool $useOpeningPay): static { - if (is_null($documents)) { - array_push($this->openAPINullablesSetToNull, 'documents'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('documents', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useOpeningPay)) { + throw new InvalidArgumentException('non-nullable useOpeningPay cannot be null'); } - $this->container['documents'] = $documents; + $this->container['useOpeningPay'] = $useOpeningPay; return $this; } /** - * Gets employee + * Gets workingDays * - * @return \SynergiTech\Staffology\Model\Item|null + * @return float|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getWorkingDays(): ?float { - return $this->container['employee']; + return $this->container['workingDays']; } /** - * Sets employee + * Sets workingDays * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param float|null $workingDays [readonly] The number of working days covered by this leave. This is calculated based on the employees Working Pattern. * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setWorkingDays(?float $workingDays): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($workingDays)) { + throw new InvalidArgumentException('non-nullable workingDays cannot be null'); } - $this->container['employee'] = $employee; + $this->container['workingDays'] = $workingDays; return $this; } /** - * Gets id + * Gets workingDaysOverride * - * @return string|null + * @return float|null */ - public function getId(): ?string + public function getWorkingDaysOverride(): ?float { - return $this->container['id']; + return $this->container['workingDaysOverride']; } /** - * Sets id + * Sets workingDaysOverride * - * @param string|null $id [readonly] The unique id of the object + * @param float|null $workingDaysOverride If a value is provided here then this will be used in place of the calculated WorkingDays value * * @return $this */ - public function setId(?string $id): static + public function setWorkingDaysOverride(?float $workingDaysOverride): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($workingDaysOverride)) { + array_push($this->openAPINullablesSetToNull, 'workingDaysOverride'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('workingDaysOverride', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['workingDaysOverride'] = $workingDaysOverride; return $this; } diff --git a/src/Model/LeaveAssumedPensionablePay.php b/src/Model/LeaveAssumedPensionablePay.php index 2e41295..9c04c89 100644 --- a/src/Model/LeaveAssumedPensionablePay.php +++ b/src/Model/LeaveAssumedPensionablePay.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class LeaveAssumedPensionablePay implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'roleReference' => 'string', - 'roleId' => 'string', - 'isPrimary' => 'bool', 'assumedPensionablePay' => 'float', 'automaticAPPCalculation' => 'bool', - 'id' => 'string' + 'id' => 'string', + 'isPrimary' => 'bool', + 'roleId' => 'string', + 'roleReference' => 'string' ]; /** @@ -73,12 +73,12 @@ class LeaveAssumedPensionablePay implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'roleReference' => null, - 'roleId' => 'uuid', - 'isPrimary' => null, 'assumedPensionablePay' => 'double', 'automaticAPPCalculation' => null, - 'id' => 'uuid' + 'id' => 'uuid', + 'isPrimary' => null, + 'roleId' => 'uuid', + 'roleReference' => null ]; /** @@ -87,12 +87,12 @@ class LeaveAssumedPensionablePay implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'roleReference' => true, - 'roleId' => false, - 'isPrimary' => false, 'assumedPensionablePay' => true, 'automaticAPPCalculation' => false, - 'id' => false + 'id' => false, + 'isPrimary' => false, + 'roleId' => false, + 'roleReference' => true ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'roleReference' => 'roleReference', - 'roleId' => 'roleId', - 'isPrimary' => 'isPrimary', 'assumedPensionablePay' => 'assumedPensionablePay', 'automaticAPPCalculation' => 'automaticAPPCalculation', - 'id' => 'id' + 'id' => 'id', + 'isPrimary' => 'isPrimary', + 'roleId' => 'roleId', + 'roleReference' => 'roleReference' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'roleReference' => 'setRoleReference', - 'roleId' => 'setRoleId', - 'isPrimary' => 'setIsPrimary', 'assumedPensionablePay' => 'setAssumedPensionablePay', 'automaticAPPCalculation' => 'setAutomaticAPPCalculation', - 'id' => 'setId' + 'id' => 'setId', + 'isPrimary' => 'setIsPrimary', + 'roleId' => 'setRoleId', + 'roleReference' => 'setRoleReference' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'roleReference' => 'getRoleReference', - 'roleId' => 'getRoleId', - 'isPrimary' => 'getIsPrimary', 'assumedPensionablePay' => 'getAssumedPensionablePay', 'automaticAPPCalculation' => 'getAutomaticAPPCalculation', - 'id' => 'getId' + 'id' => 'getId', + 'isPrimary' => 'getIsPrimary', + 'roleId' => 'getRoleId', + 'roleReference' => 'getRoleReference' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('roleReference', $data ?? [], null); - $this->setIfExists('roleId', $data ?? [], null); - $this->setIfExists('isPrimary', $data ?? [], null); $this->setIfExists('assumedPensionablePay', $data ?? [], null); $this->setIfExists('automaticAPPCalculation', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isPrimary', $data ?? [], null); + $this->setIfExists('roleId', $data ?? [], null); + $this->setIfExists('roleReference', $data ?? [], null); } /** @@ -324,177 +324,177 @@ public function valid(): bool /** - * Gets roleReference + * Gets assumedPensionablePay * - * @return string|null + * @return float|null */ - public function getRoleReference(): ?string + public function getAssumedPensionablePay(): ?float { - return $this->container['roleReference']; + return $this->container['assumedPensionablePay']; } /** - * Sets roleReference + * Sets assumedPensionablePay * - * @param string|null $roleReference Employee role reference + * @param float|null $assumedPensionablePay Assumed Pensionable Pay (APP) is an average figure, calculated as the average pay in the 3 months (or 12 weeks if weekly/fortnightly/fourweekly paid) before the absence * * @return $this */ - public function setRoleReference(?string $roleReference): static + public function setAssumedPensionablePay(?float $assumedPensionablePay): static { - if (is_null($roleReference)) { - array_push($this->openAPINullablesSetToNull, 'roleReference'); + if (is_null($assumedPensionablePay)) { + array_push($this->openAPINullablesSetToNull, 'assumedPensionablePay'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('roleReference', $nullablesSetToNull); + $index = array_search('assumedPensionablePay', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['roleReference'] = $roleReference; + $this->container['assumedPensionablePay'] = $assumedPensionablePay; return $this; } /** - * Gets roleId + * Gets automaticAPPCalculation * - * @return string|null + * @return bool|null */ - public function getRoleId(): ?string + public function getAutomaticAPPCalculation(): ?bool { - return $this->container['roleId']; + return $this->container['automaticAPPCalculation']; } /** - * Sets roleId + * Sets automaticAPPCalculation * - * @param string|null $roleId Employee role unique Id + * @param bool|null $automaticAPPCalculation If set to True then we'll automatically calculate the AssumedPensionablePay. Set it to false if you want to manually provide a figure that overrides our calculations * * @return $this */ - public function setRoleId(?string $roleId): static + public function setAutomaticAPPCalculation(?bool $automaticAPPCalculation): static { - if (is_null($roleId)) { - throw new InvalidArgumentException('non-nullable roleId cannot be null'); + if (is_null($automaticAPPCalculation)) { + throw new InvalidArgumentException('non-nullable automaticAPPCalculation cannot be null'); } - $this->container['roleId'] = $roleId; + $this->container['automaticAPPCalculation'] = $automaticAPPCalculation; return $this; } /** - * Gets isPrimary + * Gets id * - * @return bool|null + * @return string|null */ - public function getIsPrimary(): ?bool + public function getId(): ?string { - return $this->container['isPrimary']; + return $this->container['id']; } /** - * Sets isPrimary + * Sets id * - * @param bool|null $isPrimary Boolean flag indicates if the role is primary + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setIsPrimary(?bool $isPrimary): static + public function setId(?string $id): static { - if (is_null($isPrimary)) { - throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['isPrimary'] = $isPrimary; + $this->container['id'] = $id; return $this; } /** - * Gets assumedPensionablePay + * Gets isPrimary * - * @return float|null + * @return bool|null */ - public function getAssumedPensionablePay(): ?float + public function getIsPrimary(): ?bool { - return $this->container['assumedPensionablePay']; + return $this->container['isPrimary']; } /** - * Sets assumedPensionablePay + * Sets isPrimary * - * @param float|null $assumedPensionablePay Assumed Pensionable Pay (APP) is an average figure, calculated as the average pay in the 3 months (or 12 weeks if weekly/fortnightly/fourweekly paid) before the absence + * @param bool|null $isPrimary Boolean flag indicates if the role is primary * * @return $this */ - public function setAssumedPensionablePay(?float $assumedPensionablePay): static + public function setIsPrimary(?bool $isPrimary): static { - if (is_null($assumedPensionablePay)) { - array_push($this->openAPINullablesSetToNull, 'assumedPensionablePay'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('assumedPensionablePay', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isPrimary)) { + throw new InvalidArgumentException('non-nullable isPrimary cannot be null'); } - $this->container['assumedPensionablePay'] = $assumedPensionablePay; + $this->container['isPrimary'] = $isPrimary; return $this; } /** - * Gets automaticAPPCalculation + * Gets roleId * - * @return bool|null + * @return string|null */ - public function getAutomaticAPPCalculation(): ?bool + public function getRoleId(): ?string { - return $this->container['automaticAPPCalculation']; + return $this->container['roleId']; } /** - * Sets automaticAPPCalculation + * Sets roleId * - * @param bool|null $automaticAPPCalculation If set to True then we'll automatically calculate the AssumedPensionablePay. Set it to false if you want to manually provide a figure that overrides our calculations + * @param string|null $roleId Employee role unique Id * * @return $this */ - public function setAutomaticAPPCalculation(?bool $automaticAPPCalculation): static + public function setRoleId(?string $roleId): static { - if (is_null($automaticAPPCalculation)) { - throw new InvalidArgumentException('non-nullable automaticAPPCalculation cannot be null'); + if (is_null($roleId)) { + throw new InvalidArgumentException('non-nullable roleId cannot be null'); } - $this->container['automaticAPPCalculation'] = $automaticAPPCalculation; + $this->container['roleId'] = $roleId; return $this; } /** - * Gets id + * Gets roleReference * * @return string|null */ - public function getId(): ?string + public function getRoleReference(): ?string { - return $this->container['id']; + return $this->container['roleReference']; } /** - * Sets id + * Sets roleReference * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $roleReference Employee role reference * * @return $this */ - public function setId(?string $id): static + public function setRoleReference(?string $roleReference): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($roleReference)) { + array_push($this->openAPINullablesSetToNull, 'roleReference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('roleReference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['roleReference'] = $roleReference; return $this; } diff --git a/src/Model/LeaveCalculationType.php b/src/Model/LeaveCalculationType.php index 940da2f..d093a55 100644 --- a/src/Model/LeaveCalculationType.php +++ b/src/Model/LeaveCalculationType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/LeaveCustomPayment.php b/src/Model/LeaveCustomPayment.php index 7d69eac..a0bbc4b 100644 --- a/src/Model/LeaveCustomPayment.php +++ b/src/Model/LeaveCustomPayment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class LeaveCustomPayment implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'roleId' => 'string', + 'paySSPInAddition' => 'bool', 'percentOfPay' => 'float', - 'paySSPInAddition' => 'bool' + 'roleId' => 'string' ]; /** @@ -70,9 +70,9 @@ class LeaveCustomPayment implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'roleId' => 'uuid', + 'paySSPInAddition' => null, 'percentOfPay' => 'double', - 'paySSPInAddition' => null + 'roleId' => 'uuid' ]; /** @@ -81,9 +81,9 @@ class LeaveCustomPayment implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'roleId' => false, + 'paySSPInAddition' => false, 'percentOfPay' => false, - 'paySSPInAddition' => false + 'roleId' => false ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'roleId' => 'roleId', + 'paySSPInAddition' => 'paySSPInAddition', 'percentOfPay' => 'percentOfPay', - 'paySSPInAddition' => 'paySSPInAddition' + 'roleId' => 'roleId' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'roleId' => 'setRoleId', + 'paySSPInAddition' => 'setPaySSPInAddition', 'percentOfPay' => 'setPercentOfPay', - 'paySSPInAddition' => 'setPaySSPInAddition' + 'roleId' => 'setRoleId' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'roleId' => 'getRoleId', + 'paySSPInAddition' => 'getPaySSPInAddition', 'percentOfPay' => 'getPercentOfPay', - 'paySSPInAddition' => 'getPaySSPInAddition' + 'roleId' => 'getRoleId' ]; /** @@ -255,9 +255,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('roleId', $data ?? [], null); - $this->setIfExists('percentOfPay', $data ?? [], null); $this->setIfExists('paySSPInAddition', $data ?? [], null); + $this->setIfExists('percentOfPay', $data ?? [], null); + $this->setIfExists('roleId', $data ?? [], null); } /** @@ -303,28 +303,28 @@ public function valid(): bool /** - * Gets roleId + * Gets paySSPInAddition * - * @return string|null + * @return bool|null */ - public function getRoleId(): ?string + public function getPaySSPInAddition(): ?bool { - return $this->container['roleId']; + return $this->container['paySSPInAddition']; } /** - * Sets roleId + * Sets paySSPInAddition * - * @param string|null $roleId roleId + * @param bool|null $paySSPInAddition If this is Sick Leave with Custom Payment, If true, then reduce the OSP by the amount of SSP paid (and apportioned according to role weighting) If false, then do not reduce the OSP at all. * * @return $this */ - public function setRoleId(?string $roleId): static + public function setPaySSPInAddition(?bool $paySSPInAddition): static { - if (is_null($roleId)) { - throw new InvalidArgumentException('non-nullable roleId cannot be null'); + if (is_null($paySSPInAddition)) { + throw new InvalidArgumentException('non-nullable paySSPInAddition cannot be null'); } - $this->container['roleId'] = $roleId; + $this->container['paySSPInAddition'] = $paySSPInAddition; return $this; } @@ -357,28 +357,28 @@ public function setPercentOfPay(?float $percentOfPay): static } /** - * Gets paySSPInAddition + * Gets roleId * - * @return bool|null + * @return string|null */ - public function getPaySSPInAddition(): ?bool + public function getRoleId(): ?string { - return $this->container['paySSPInAddition']; + return $this->container['roleId']; } /** - * Sets paySSPInAddition + * Sets roleId * - * @param bool|null $paySSPInAddition If this is Sick Leave with Custom Payment, If true, then reduce the OSP by the amount of SSP paid (and apportioned according to role weighting) If false, then do not reduce the OSP at all. + * @param string|null $roleId roleId * * @return $this */ - public function setPaySSPInAddition(?bool $paySSPInAddition): static + public function setRoleId(?string $roleId): static { - if (is_null($paySSPInAddition)) { - throw new InvalidArgumentException('non-nullable paySSPInAddition cannot be null'); + if (is_null($roleId)) { + throw new InvalidArgumentException('non-nullable roleId cannot be null'); } - $this->container['paySSPInAddition'] = $paySSPInAddition; + $this->container['roleId'] = $roleId; return $this; } diff --git a/src/Model/LeaveCustomProRataRule.php b/src/Model/LeaveCustomProRataRule.php index 905f886..10f7b3e 100644 --- a/src/Model/LeaveCustomProRataRule.php +++ b/src/Model/LeaveCustomProRataRule.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class LeaveCustomProRataRule implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'roleId' => 'string', - 'proRataMethod' => '\SynergiTech\Staffology\Model\LeaveProRataRule' + 'proRataMethod' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'roleId' => 'string' ]; /** @@ -69,8 +69,8 @@ class LeaveCustomProRataRule implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ - 'roleId' => 'uuid', - 'proRataMethod' => null + 'proRataMethod' => null, + 'roleId' => 'uuid' ]; /** @@ -79,8 +79,8 @@ class LeaveCustomProRataRule implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ - 'roleId' => false, - 'proRataMethod' => false + 'proRataMethod' => false, + 'roleId' => false ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'roleId' => 'roleId', - 'proRataMethod' => 'proRataMethod' + 'proRataMethod' => 'proRataMethod', + 'roleId' => 'roleId' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'roleId' => 'setRoleId', - 'proRataMethod' => 'setProRataMethod' + 'proRataMethod' => 'setProRataMethod', + 'roleId' => 'setRoleId' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'roleId' => 'getRoleId', - 'proRataMethod' => 'getProRataMethod' + 'proRataMethod' => 'getProRataMethod', + 'roleId' => 'getRoleId' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('roleId', $data ?? [], null); $this->setIfExists('proRataMethod', $data ?? [], null); + $this->setIfExists('roleId', $data ?? [], null); } /** @@ -296,55 +296,55 @@ public function valid(): bool /** - * Gets roleId + * Gets proRataMethod * - * @return string|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getRoleId(): ?string + public function getProRataMethod(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['roleId']; + return $this->container['proRataMethod']; } /** - * Sets roleId + * Sets proRataMethod * - * @param string|null $roleId roleId + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $proRataMethod proRataMethod * * @return $this */ - public function setRoleId(?string $roleId): static + public function setProRataMethod(?\SynergiTech\Staffology\Model\LeaveProRataRule $proRataMethod): static { - if (is_null($roleId)) { - throw new InvalidArgumentException('non-nullable roleId cannot be null'); + if (is_null($proRataMethod)) { + throw new InvalidArgumentException('non-nullable proRataMethod cannot be null'); } - $this->container['roleId'] = $roleId; + $this->container['proRataMethod'] = $proRataMethod; return $this; } /** - * Gets proRataMethod + * Gets roleId * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return string|null */ - public function getProRataMethod(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getRoleId(): ?string { - return $this->container['proRataMethod']; + return $this->container['roleId']; } /** - * Sets proRataMethod + * Sets roleId * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $proRataMethod proRataMethod + * @param string|null $roleId roleId * * @return $this */ - public function setProRataMethod(?\SynergiTech\Staffology\Model\LeaveProRataRule $proRataMethod): static + public function setRoleId(?string $roleId): static { - if (is_null($proRataMethod)) { - throw new InvalidArgumentException('non-nullable proRataMethod cannot be null'); + if (is_null($roleId)) { + throw new InvalidArgumentException('non-nullable roleId cannot be null'); } - $this->container['proRataMethod'] = $proRataMethod; + $this->container['roleId'] = $roleId; return $this; } diff --git a/src/Model/LeaveNotionalPayDetails.php b/src/Model/LeaveNotionalPayDetails.php new file mode 100644 index 0000000..1ed8f63 --- /dev/null +++ b/src/Model/LeaveNotionalPayDetails.php @@ -0,0 +1,619 @@ + + */ +class LeaveNotionalPayDetails implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'LeaveNotionalPayDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'leaveId' => 'string', + 'notionalPay' => 'float', + 'notionalPayPeriodBreakdowns' => '\SynergiTech\Staffology\Model\NotionalPayPeriodBreakdown[]', + 'occupationalPay' => 'float', + 'occupationalPayWithLessThanHalfPay' => 'float', + 'ospDaysToBeExcludedForNotionalPay' => 'float', + 'payableOccupationalLeavesCount' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'leaveId' => 'uuid', + 'notionalPay' => 'double', + 'notionalPayPeriodBreakdowns' => null, + 'occupationalPay' => 'double', + 'occupationalPayWithLessThanHalfPay' => 'double', + 'ospDaysToBeExcludedForNotionalPay' => 'double', + 'payableOccupationalLeavesCount' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'leaveId' => false, + 'notionalPay' => false, + 'notionalPayPeriodBreakdowns' => true, + 'occupationalPay' => false, + 'occupationalPayWithLessThanHalfPay' => false, + 'ospDaysToBeExcludedForNotionalPay' => false, + 'payableOccupationalLeavesCount' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'leaveId' => 'leaveId', + 'notionalPay' => 'notionalPay', + 'notionalPayPeriodBreakdowns' => 'notionalPayPeriodBreakdowns', + 'occupationalPay' => 'occupationalPay', + 'occupationalPayWithLessThanHalfPay' => 'occupationalPayWithLessThanHalfPay', + 'ospDaysToBeExcludedForNotionalPay' => 'ospDaysToBeExcludedForNotionalPay', + 'payableOccupationalLeavesCount' => 'payableOccupationalLeavesCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'leaveId' => 'setLeaveId', + 'notionalPay' => 'setNotionalPay', + 'notionalPayPeriodBreakdowns' => 'setNotionalPayPeriodBreakdowns', + 'occupationalPay' => 'setOccupationalPay', + 'occupationalPayWithLessThanHalfPay' => 'setOccupationalPayWithLessThanHalfPay', + 'ospDaysToBeExcludedForNotionalPay' => 'setOspDaysToBeExcludedForNotionalPay', + 'payableOccupationalLeavesCount' => 'setPayableOccupationalLeavesCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'leaveId' => 'getLeaveId', + 'notionalPay' => 'getNotionalPay', + 'notionalPayPeriodBreakdowns' => 'getNotionalPayPeriodBreakdowns', + 'occupationalPay' => 'getOccupationalPay', + 'occupationalPayWithLessThanHalfPay' => 'getOccupationalPayWithLessThanHalfPay', + 'ospDaysToBeExcludedForNotionalPay' => 'getOspDaysToBeExcludedForNotionalPay', + 'payableOccupationalLeavesCount' => 'getPayableOccupationalLeavesCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('leaveId', $data ?? [], null); + $this->setIfExists('notionalPay', $data ?? [], null); + $this->setIfExists('notionalPayPeriodBreakdowns', $data ?? [], null); + $this->setIfExists('occupationalPay', $data ?? [], null); + $this->setIfExists('occupationalPayWithLessThanHalfPay', $data ?? [], null); + $this->setIfExists('ospDaysToBeExcludedForNotionalPay', $data ?? [], null); + $this->setIfExists('payableOccupationalLeavesCount', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets leaveId + * + * @return string|null + */ + public function getLeaveId(): ?string + { + return $this->container['leaveId']; + } + + /** + * Sets leaveId + * + * @param string|null $leaveId leaveId + * + * @return $this + */ + public function setLeaveId(?string $leaveId): static + { + if (is_null($leaveId)) { + throw new InvalidArgumentException('non-nullable leaveId cannot be null'); + } + $this->container['leaveId'] = $leaveId; + + return $this; + } + + /** + * Gets notionalPay + * + * @return float|null + */ + public function getNotionalPay(): ?float + { + return $this->container['notionalPay']; + } + + /** + * Sets notionalPay + * + * @param float|null $notionalPay notionalPay + * + * @return $this + */ + public function setNotionalPay(?float $notionalPay): static + { + if (is_null($notionalPay)) { + throw new InvalidArgumentException('non-nullable notionalPay cannot be null'); + } + $this->container['notionalPay'] = $notionalPay; + + return $this; + } + + /** + * Gets notionalPayPeriodBreakdowns + * + * @return \SynergiTech\Staffology\Model\NotionalPayPeriodBreakdown[]|null + */ + public function getNotionalPayPeriodBreakdowns(): ?array + { + return $this->container['notionalPayPeriodBreakdowns']; + } + + /** + * Sets notionalPayPeriodBreakdowns + * + * @param \SynergiTech\Staffology\Model\NotionalPayPeriodBreakdown[]|null $notionalPayPeriodBreakdowns Breakdown of notional pay details by percent of pay bands Every leave has entries representing a continuous period of leave with the same percent of pay + * + * @return $this + */ + public function setNotionalPayPeriodBreakdowns(?array $notionalPayPeriodBreakdowns): static + { + if (is_null($notionalPayPeriodBreakdowns)) { + array_push($this->openAPINullablesSetToNull, 'notionalPayPeriodBreakdowns'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('notionalPayPeriodBreakdowns', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['notionalPayPeriodBreakdowns'] = $notionalPayPeriodBreakdowns; + + return $this; + } + + /** + * Gets occupationalPay + * + * @return float|null + */ + public function getOccupationalPay(): ?float + { + return $this->container['occupationalPay']; + } + + /** + * Sets occupationalPay + * + * @param float|null $occupationalPay occupationalPay + * + * @return $this + */ + public function setOccupationalPay(?float $occupationalPay): static + { + if (is_null($occupationalPay)) { + throw new InvalidArgumentException('non-nullable occupationalPay cannot be null'); + } + $this->container['occupationalPay'] = $occupationalPay; + + return $this; + } + + /** + * Gets occupationalPayWithLessThanHalfPay + * + * @return float|null + */ + public function getOccupationalPayWithLessThanHalfPay(): ?float + { + return $this->container['occupationalPayWithLessThanHalfPay']; + } + + /** + * Sets occupationalPayWithLessThanHalfPay + * + * @param float|null $occupationalPayWithLessThanHalfPay occupationalPayWithLessThanHalfPay + * + * @return $this + */ + public function setOccupationalPayWithLessThanHalfPay(?float $occupationalPayWithLessThanHalfPay): static + { + if (is_null($occupationalPayWithLessThanHalfPay)) { + throw new InvalidArgumentException('non-nullable occupationalPayWithLessThanHalfPay cannot be null'); + } + $this->container['occupationalPayWithLessThanHalfPay'] = $occupationalPayWithLessThanHalfPay; + + return $this; + } + + /** + * Gets ospDaysToBeExcludedForNotionalPay + * + * @return float|null + */ + public function getOspDaysToBeExcludedForNotionalPay(): ?float + { + return $this->container['ospDaysToBeExcludedForNotionalPay']; + } + + /** + * Sets ospDaysToBeExcludedForNotionalPay + * + * @param float|null $ospDaysToBeExcludedForNotionalPay ospDaysToBeExcludedForNotionalPay + * + * @return $this + */ + public function setOspDaysToBeExcludedForNotionalPay(?float $ospDaysToBeExcludedForNotionalPay): static + { + if (is_null($ospDaysToBeExcludedForNotionalPay)) { + throw new InvalidArgumentException('non-nullable ospDaysToBeExcludedForNotionalPay cannot be null'); + } + $this->container['ospDaysToBeExcludedForNotionalPay'] = $ospDaysToBeExcludedForNotionalPay; + + return $this; + } + + /** + * Gets payableOccupationalLeavesCount + * + * @return int|null + */ + public function getPayableOccupationalLeavesCount(): ?int + { + return $this->container['payableOccupationalLeavesCount']; + } + + /** + * Sets payableOccupationalLeavesCount + * + * @param int|null $payableOccupationalLeavesCount payableOccupationalLeavesCount + * + * @return $this + */ + public function setPayableOccupationalLeavesCount(?int $payableOccupationalLeavesCount): static + { + if (is_null($payableOccupationalLeavesCount)) { + throw new InvalidArgumentException('non-nullable payableOccupationalLeavesCount cannot be null'); + } + $this->container['payableOccupationalLeavesCount'] = $payableOccupationalLeavesCount; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/LeavePayType.php b/src/Model/LeavePayType.php index d426419..4b1a554 100644 --- a/src/Model/LeavePayType.php +++ b/src/Model/LeavePayType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/LeaveProRataRule.php b/src/Model/LeaveProRataRule.php index 3d4618a..e87fcec 100644 --- a/src/Model/LeaveProRataRule.php +++ b/src/Model/LeaveProRataRule.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/LeaveSettings.php b/src/Model/LeaveSettings.php index 57acc40..40cb1db 100644 --- a/src/Model/LeaveSettings.php +++ b/src/Model/LeaveSettings.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,53 +59,53 @@ class LeaveSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'useDefaultHolidayType' => 'bool', - 'useDefaultAllowanceResetDate' => 'bool', - 'useDefaultAllowance' => 'bool', - 'useDefaultAccruePaymentInLieu' => 'bool', - 'useDefaultAccruePaymentInLieuRate' => 'bool', - 'useDefaultHolidayAccrualBasis' => 'bool', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'bool', - 'useDefaultAccrueHoursPerDay' => 'bool', - 'useDefaultMaximumAccruePeriod' => 'bool', - 'allowanceResetDate' => '\DateTime', - 'allowance' => 'float', - 'adjustment' => 'float', - 'allowanceUsed' => 'float', - 'allowanceUsedPreviousPeriod' => 'float', - 'allowanceRemaining' => 'float', - 'holidayType' => '\SynergiTech\Staffology\Model\HolidayType', - 'accrueSetAmount' => 'bool', 'accrueHoursPerDay' => 'float', - 'showAllowanceOnPayslip' => 'bool', - 'showAhpOnPayslip' => 'bool', - 'accruePaymentInLieuRate' => 'float', + 'accruePayCodeSetUniqueId' => 'string', 'accruePaymentInLieuAllGrossPay' => 'bool', 'accruePaymentInLieuPayAutomatically' => 'bool', - 'accruePayCodeSetUniqueId' => 'string', - 'maximumAccruePeriod' => 'float', - 'holidayAccrualBasis' => '\SynergiTech\Staffology\Model\HolidayAccrual', - 'holidayAccrualDefaultRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', - 'occupationalSicknessUniqueId' => 'string', - 'accruedPaymentLiability' => 'float', - 'accruedPaymentAdjustment' => 'float', - 'accruedPaymentPaid' => 'float', - 'accruedPaymentBalance' => 'float', - 'accruedHoursAmount' => 'float', + 'accruePaymentInLieuRate' => 'float', + 'accrueSetAmount' => 'bool', 'accruedHoursAdjustment' => 'float', - 'accruedHoursPaid' => 'float', + 'accruedHoursAmount' => 'float', 'accruedHoursAmountLastPeriod' => 'float', - 'paidHoursAmountLastPeriod' => 'float', 'accruedHoursBalance' => 'float', - 'holidayAccrualResetDate' => '\DateTime', + 'accruedHoursPaid' => 'float', + 'accruedPaymentAdjustment' => 'float', + 'accruedPaymentBalance' => 'float', + 'accruedPaymentLiability' => 'float', + 'accruedPaymentPaid' => 'float', + 'adjustment' => 'float', 'aggregatedServiceDate' => '\DateTime', - 'useAggregatedServiceDate' => 'bool', - 'useDefaultHolidayAccrualDefaultRateType' => 'bool', - 'unauthorisedLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'allowance' => 'float', + 'allowanceRemaining' => 'float', + 'allowanceResetDate' => '\DateTime', + 'allowanceUsed' => 'float', + 'allowanceUsedPreviousPeriod' => 'float', + 'bereavementLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'holidayAccrualBasis' => '\SynergiTech\Staffology\Model\HolidayAccrual', + 'holidayAccrualDefaultRateType' => '\SynergiTech\Staffology\Model\HolidayAccrualDefaultRateType', + 'holidayAccrualResetDate' => '\DateTime', 'holidayLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', - 'sickLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'holidayType' => '\SynergiTech\Staffology\Model\HolidayType', + 'maximumAccruePeriod' => 'float', + 'occupationalSicknessUniqueId' => 'string', + 'paidHoursAmountLastPeriod' => 'float', 'parentalLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', - 'bereavementLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule' + 'showAhpOnPayslip' => 'bool', + 'showAllowanceOnPayslip' => 'bool', + 'sickLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'unauthorisedLeaveProRataRule' => '\SynergiTech\Staffology\Model\LeaveProRataRule', + 'useAggregatedServiceDate' => 'bool', + 'useDefaultAccrueHoursPerDay' => 'bool', + 'useDefaultAccruePaymentInLieu' => 'bool', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'bool', + 'useDefaultAccruePaymentInLieuRate' => 'bool', + 'useDefaultAllowance' => 'bool', + 'useDefaultAllowanceResetDate' => 'bool', + 'useDefaultHolidayAccrualBasis' => 'bool', + 'useDefaultHolidayAccrualDefaultRateType' => 'bool', + 'useDefaultHolidayType' => 'bool', + 'useDefaultMaximumAccruePeriod' => 'bool' ]; /** @@ -114,53 +114,53 @@ class LeaveSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'useDefaultHolidayType' => null, - 'useDefaultAllowanceResetDate' => null, - 'useDefaultAllowance' => null, - 'useDefaultAccruePaymentInLieu' => null, - 'useDefaultAccruePaymentInLieuRate' => null, - 'useDefaultHolidayAccrualBasis' => null, - 'useDefaultAccruePaymentInLieuPayAutomatically' => null, - 'useDefaultAccrueHoursPerDay' => null, - 'useDefaultMaximumAccruePeriod' => null, - 'allowanceResetDate' => 'date', - 'allowance' => 'double', - 'adjustment' => 'double', - 'allowanceUsed' => 'double', - 'allowanceUsedPreviousPeriod' => 'double', - 'allowanceRemaining' => 'double', - 'holidayType' => null, - 'accrueSetAmount' => null, 'accrueHoursPerDay' => 'double', - 'showAllowanceOnPayslip' => null, - 'showAhpOnPayslip' => null, - 'accruePaymentInLieuRate' => 'double', + 'accruePayCodeSetUniqueId' => 'uuid', 'accruePaymentInLieuAllGrossPay' => null, 'accruePaymentInLieuPayAutomatically' => null, - 'accruePayCodeSetUniqueId' => 'uuid', - 'maximumAccruePeriod' => 'double', - 'holidayAccrualBasis' => null, - 'holidayAccrualDefaultRateType' => null, - 'occupationalSicknessUniqueId' => 'uuid', - 'accruedPaymentLiability' => 'double', - 'accruedPaymentAdjustment' => 'double', - 'accruedPaymentPaid' => 'double', - 'accruedPaymentBalance' => 'double', - 'accruedHoursAmount' => 'double', + 'accruePaymentInLieuRate' => 'double', + 'accrueSetAmount' => null, 'accruedHoursAdjustment' => 'double', - 'accruedHoursPaid' => 'double', + 'accruedHoursAmount' => 'double', 'accruedHoursAmountLastPeriod' => 'double', - 'paidHoursAmountLastPeriod' => 'double', 'accruedHoursBalance' => 'double', - 'holidayAccrualResetDate' => 'date', + 'accruedHoursPaid' => 'double', + 'accruedPaymentAdjustment' => 'double', + 'accruedPaymentBalance' => 'double', + 'accruedPaymentLiability' => 'double', + 'accruedPaymentPaid' => 'double', + 'adjustment' => 'double', 'aggregatedServiceDate' => 'date', - 'useAggregatedServiceDate' => null, - 'useDefaultHolidayAccrualDefaultRateType' => null, - 'unauthorisedLeaveProRataRule' => null, + 'allowance' => 'double', + 'allowanceRemaining' => 'double', + 'allowanceResetDate' => 'date', + 'allowanceUsed' => 'double', + 'allowanceUsedPreviousPeriod' => 'double', + 'bereavementLeaveProRataRule' => null, + 'holidayAccrualBasis' => null, + 'holidayAccrualDefaultRateType' => null, + 'holidayAccrualResetDate' => 'date', 'holidayLeaveProRataRule' => null, - 'sickLeaveProRataRule' => null, + 'holidayType' => null, + 'maximumAccruePeriod' => 'double', + 'occupationalSicknessUniqueId' => 'uuid', + 'paidHoursAmountLastPeriod' => 'double', 'parentalLeaveProRataRule' => null, - 'bereavementLeaveProRataRule' => null + 'showAhpOnPayslip' => null, + 'showAllowanceOnPayslip' => null, + 'sickLeaveProRataRule' => null, + 'unauthorisedLeaveProRataRule' => null, + 'useAggregatedServiceDate' => null, + 'useDefaultAccrueHoursPerDay' => null, + 'useDefaultAccruePaymentInLieu' => null, + 'useDefaultAccruePaymentInLieuPayAutomatically' => null, + 'useDefaultAccruePaymentInLieuRate' => null, + 'useDefaultAllowance' => null, + 'useDefaultAllowanceResetDate' => null, + 'useDefaultHolidayAccrualBasis' => null, + 'useDefaultHolidayAccrualDefaultRateType' => null, + 'useDefaultHolidayType' => null, + 'useDefaultMaximumAccruePeriod' => null ]; /** @@ -169,53 +169,53 @@ class LeaveSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'useDefaultHolidayType' => false, - 'useDefaultAllowanceResetDate' => false, - 'useDefaultAllowance' => false, - 'useDefaultAccruePaymentInLieu' => false, - 'useDefaultAccruePaymentInLieuRate' => false, - 'useDefaultHolidayAccrualBasis' => false, - 'useDefaultAccruePaymentInLieuPayAutomatically' => false, - 'useDefaultAccrueHoursPerDay' => false, - 'useDefaultMaximumAccruePeriod' => false, - 'allowanceResetDate' => false, - 'allowance' => false, - 'adjustment' => true, - 'allowanceUsed' => false, - 'allowanceUsedPreviousPeriod' => false, - 'allowanceRemaining' => false, - 'holidayType' => false, - 'accrueSetAmount' => false, 'accrueHoursPerDay' => false, - 'showAllowanceOnPayslip' => false, - 'showAhpOnPayslip' => false, - 'accruePaymentInLieuRate' => false, + 'accruePayCodeSetUniqueId' => true, 'accruePaymentInLieuAllGrossPay' => false, 'accruePaymentInLieuPayAutomatically' => false, - 'accruePayCodeSetUniqueId' => true, - 'maximumAccruePeriod' => true, - 'holidayAccrualBasis' => false, - 'holidayAccrualDefaultRateType' => false, - 'occupationalSicknessUniqueId' => true, - 'accruedPaymentLiability' => false, - 'accruedPaymentAdjustment' => false, - 'accruedPaymentPaid' => false, - 'accruedPaymentBalance' => false, - 'accruedHoursAmount' => false, + 'accruePaymentInLieuRate' => false, + 'accrueSetAmount' => false, 'accruedHoursAdjustment' => false, - 'accruedHoursPaid' => false, + 'accruedHoursAmount' => false, 'accruedHoursAmountLastPeriod' => false, - 'paidHoursAmountLastPeriod' => false, 'accruedHoursBalance' => false, - 'holidayAccrualResetDate' => true, + 'accruedHoursPaid' => false, + 'accruedPaymentAdjustment' => false, + 'accruedPaymentBalance' => false, + 'accruedPaymentLiability' => false, + 'accruedPaymentPaid' => false, + 'adjustment' => true, 'aggregatedServiceDate' => true, - 'useAggregatedServiceDate' => false, - 'useDefaultHolidayAccrualDefaultRateType' => false, - 'unauthorisedLeaveProRataRule' => false, + 'allowance' => false, + 'allowanceRemaining' => false, + 'allowanceResetDate' => false, + 'allowanceUsed' => false, + 'allowanceUsedPreviousPeriod' => false, + 'bereavementLeaveProRataRule' => false, + 'holidayAccrualBasis' => false, + 'holidayAccrualDefaultRateType' => false, + 'holidayAccrualResetDate' => true, 'holidayLeaveProRataRule' => false, - 'sickLeaveProRataRule' => false, + 'holidayType' => false, + 'maximumAccruePeriod' => true, + 'occupationalSicknessUniqueId' => true, + 'paidHoursAmountLastPeriod' => false, 'parentalLeaveProRataRule' => false, - 'bereavementLeaveProRataRule' => false + 'showAhpOnPayslip' => false, + 'showAllowanceOnPayslip' => false, + 'sickLeaveProRataRule' => false, + 'unauthorisedLeaveProRataRule' => false, + 'useAggregatedServiceDate' => false, + 'useDefaultAccrueHoursPerDay' => false, + 'useDefaultAccruePaymentInLieu' => false, + 'useDefaultAccruePaymentInLieuPayAutomatically' => false, + 'useDefaultAccruePaymentInLieuRate' => false, + 'useDefaultAllowance' => false, + 'useDefaultAllowanceResetDate' => false, + 'useDefaultHolidayAccrualBasis' => false, + 'useDefaultHolidayAccrualDefaultRateType' => false, + 'useDefaultHolidayType' => false, + 'useDefaultMaximumAccruePeriod' => false ]; /** @@ -304,53 +304,53 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'useDefaultHolidayType' => 'useDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'useDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'useDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'useDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'useDefaultAccruePaymentInLieuRate', - 'useDefaultHolidayAccrualBasis' => 'useDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'useDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'useDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'useDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'allowanceResetDate', - 'allowance' => 'allowance', - 'adjustment' => 'adjustment', - 'allowanceUsed' => 'allowanceUsed', - 'allowanceUsedPreviousPeriod' => 'allowanceUsedPreviousPeriod', - 'allowanceRemaining' => 'allowanceRemaining', - 'holidayType' => 'holidayType', - 'accrueSetAmount' => 'accrueSetAmount', 'accrueHoursPerDay' => 'accrueHoursPerDay', - 'showAllowanceOnPayslip' => 'showAllowanceOnPayslip', - 'showAhpOnPayslip' => 'showAhpOnPayslip', - 'accruePaymentInLieuRate' => 'accruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'accruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'accruePaymentInLieuPayAutomatically', - 'accruePayCodeSetUniqueId' => 'accruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'maximumAccruePeriod', - 'holidayAccrualBasis' => 'holidayAccrualBasis', - 'holidayAccrualDefaultRateType' => 'holidayAccrualDefaultRateType', - 'occupationalSicknessUniqueId' => 'occupationalSicknessUniqueId', - 'accruedPaymentLiability' => 'accruedPaymentLiability', - 'accruedPaymentAdjustment' => 'accruedPaymentAdjustment', - 'accruedPaymentPaid' => 'accruedPaymentPaid', - 'accruedPaymentBalance' => 'accruedPaymentBalance', - 'accruedHoursAmount' => 'accruedHoursAmount', + 'accruePaymentInLieuRate' => 'accruePaymentInLieuRate', + 'accrueSetAmount' => 'accrueSetAmount', 'accruedHoursAdjustment' => 'accruedHoursAdjustment', - 'accruedHoursPaid' => 'accruedHoursPaid', + 'accruedHoursAmount' => 'accruedHoursAmount', 'accruedHoursAmountLastPeriod' => 'accruedHoursAmountLastPeriod', - 'paidHoursAmountLastPeriod' => 'paidHoursAmountLastPeriod', 'accruedHoursBalance' => 'accruedHoursBalance', - 'holidayAccrualResetDate' => 'holidayAccrualResetDate', + 'accruedHoursPaid' => 'accruedHoursPaid', + 'accruedPaymentAdjustment' => 'accruedPaymentAdjustment', + 'accruedPaymentBalance' => 'accruedPaymentBalance', + 'accruedPaymentLiability' => 'accruedPaymentLiability', + 'accruedPaymentPaid' => 'accruedPaymentPaid', + 'adjustment' => 'adjustment', 'aggregatedServiceDate' => 'aggregatedServiceDate', - 'useAggregatedServiceDate' => 'useAggregatedServiceDate', - 'useDefaultHolidayAccrualDefaultRateType' => 'useDefaultHolidayAccrualDefaultRateType', - 'unauthorisedLeaveProRataRule' => 'unauthorisedLeaveProRataRule', + 'allowance' => 'allowance', + 'allowanceRemaining' => 'allowanceRemaining', + 'allowanceResetDate' => 'allowanceResetDate', + 'allowanceUsed' => 'allowanceUsed', + 'allowanceUsedPreviousPeriod' => 'allowanceUsedPreviousPeriod', + 'bereavementLeaveProRataRule' => 'bereavementLeaveProRataRule', + 'holidayAccrualBasis' => 'holidayAccrualBasis', + 'holidayAccrualDefaultRateType' => 'holidayAccrualDefaultRateType', + 'holidayAccrualResetDate' => 'holidayAccrualResetDate', 'holidayLeaveProRataRule' => 'holidayLeaveProRataRule', - 'sickLeaveProRataRule' => 'sickLeaveProRataRule', + 'holidayType' => 'holidayType', + 'maximumAccruePeriod' => 'maximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'occupationalSicknessUniqueId', + 'paidHoursAmountLastPeriod' => 'paidHoursAmountLastPeriod', 'parentalLeaveProRataRule' => 'parentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'bereavementLeaveProRataRule' + 'showAhpOnPayslip' => 'showAhpOnPayslip', + 'showAllowanceOnPayslip' => 'showAllowanceOnPayslip', + 'sickLeaveProRataRule' => 'sickLeaveProRataRule', + 'unauthorisedLeaveProRataRule' => 'unauthorisedLeaveProRataRule', + 'useAggregatedServiceDate' => 'useAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'useDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'useDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'useDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'useDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'useDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'useDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'useDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'useDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'useDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'useDefaultMaximumAccruePeriod' ]; /** @@ -359,53 +359,53 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'useDefaultHolidayType' => 'setUseDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'setUseDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'setUseDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'setUseDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'setUseDefaultAccruePaymentInLieuRate', - 'useDefaultHolidayAccrualBasis' => 'setUseDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'setUseDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'setUseDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'setUseDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'setAllowanceResetDate', - 'allowance' => 'setAllowance', - 'adjustment' => 'setAdjustment', - 'allowanceUsed' => 'setAllowanceUsed', - 'allowanceUsedPreviousPeriod' => 'setAllowanceUsedPreviousPeriod', - 'allowanceRemaining' => 'setAllowanceRemaining', - 'holidayType' => 'setHolidayType', - 'accrueSetAmount' => 'setAccrueSetAmount', 'accrueHoursPerDay' => 'setAccrueHoursPerDay', - 'showAllowanceOnPayslip' => 'setShowAllowanceOnPayslip', - 'showAhpOnPayslip' => 'setShowAhpOnPayslip', - 'accruePaymentInLieuRate' => 'setAccruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'setAccruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'setAccruePaymentInLieuPayAutomatically', - 'accruePayCodeSetUniqueId' => 'setAccruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'setMaximumAccruePeriod', - 'holidayAccrualBasis' => 'setHolidayAccrualBasis', - 'holidayAccrualDefaultRateType' => 'setHolidayAccrualDefaultRateType', - 'occupationalSicknessUniqueId' => 'setOccupationalSicknessUniqueId', - 'accruedPaymentLiability' => 'setAccruedPaymentLiability', - 'accruedPaymentAdjustment' => 'setAccruedPaymentAdjustment', - 'accruedPaymentPaid' => 'setAccruedPaymentPaid', - 'accruedPaymentBalance' => 'setAccruedPaymentBalance', - 'accruedHoursAmount' => 'setAccruedHoursAmount', + 'accruePaymentInLieuRate' => 'setAccruePaymentInLieuRate', + 'accrueSetAmount' => 'setAccrueSetAmount', 'accruedHoursAdjustment' => 'setAccruedHoursAdjustment', - 'accruedHoursPaid' => 'setAccruedHoursPaid', + 'accruedHoursAmount' => 'setAccruedHoursAmount', 'accruedHoursAmountLastPeriod' => 'setAccruedHoursAmountLastPeriod', - 'paidHoursAmountLastPeriod' => 'setPaidHoursAmountLastPeriod', 'accruedHoursBalance' => 'setAccruedHoursBalance', - 'holidayAccrualResetDate' => 'setHolidayAccrualResetDate', + 'accruedHoursPaid' => 'setAccruedHoursPaid', + 'accruedPaymentAdjustment' => 'setAccruedPaymentAdjustment', + 'accruedPaymentBalance' => 'setAccruedPaymentBalance', + 'accruedPaymentLiability' => 'setAccruedPaymentLiability', + 'accruedPaymentPaid' => 'setAccruedPaymentPaid', + 'adjustment' => 'setAdjustment', 'aggregatedServiceDate' => 'setAggregatedServiceDate', - 'useAggregatedServiceDate' => 'setUseAggregatedServiceDate', - 'useDefaultHolidayAccrualDefaultRateType' => 'setUseDefaultHolidayAccrualDefaultRateType', - 'unauthorisedLeaveProRataRule' => 'setUnauthorisedLeaveProRataRule', + 'allowance' => 'setAllowance', + 'allowanceRemaining' => 'setAllowanceRemaining', + 'allowanceResetDate' => 'setAllowanceResetDate', + 'allowanceUsed' => 'setAllowanceUsed', + 'allowanceUsedPreviousPeriod' => 'setAllowanceUsedPreviousPeriod', + 'bereavementLeaveProRataRule' => 'setBereavementLeaveProRataRule', + 'holidayAccrualBasis' => 'setHolidayAccrualBasis', + 'holidayAccrualDefaultRateType' => 'setHolidayAccrualDefaultRateType', + 'holidayAccrualResetDate' => 'setHolidayAccrualResetDate', 'holidayLeaveProRataRule' => 'setHolidayLeaveProRataRule', - 'sickLeaveProRataRule' => 'setSickLeaveProRataRule', + 'holidayType' => 'setHolidayType', + 'maximumAccruePeriod' => 'setMaximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'setOccupationalSicknessUniqueId', + 'paidHoursAmountLastPeriod' => 'setPaidHoursAmountLastPeriod', 'parentalLeaveProRataRule' => 'setParentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'setBereavementLeaveProRataRule' + 'showAhpOnPayslip' => 'setShowAhpOnPayslip', + 'showAllowanceOnPayslip' => 'setShowAllowanceOnPayslip', + 'sickLeaveProRataRule' => 'setSickLeaveProRataRule', + 'unauthorisedLeaveProRataRule' => 'setUnauthorisedLeaveProRataRule', + 'useAggregatedServiceDate' => 'setUseAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'setUseDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'setUseDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'setUseDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'setUseDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'setUseDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'setUseDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'setUseDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'setUseDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'setUseDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'setUseDefaultMaximumAccruePeriod' ]; /** @@ -414,53 +414,53 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'useDefaultHolidayType' => 'getUseDefaultHolidayType', - 'useDefaultAllowanceResetDate' => 'getUseDefaultAllowanceResetDate', - 'useDefaultAllowance' => 'getUseDefaultAllowance', - 'useDefaultAccruePaymentInLieu' => 'getUseDefaultAccruePaymentInLieu', - 'useDefaultAccruePaymentInLieuRate' => 'getUseDefaultAccruePaymentInLieuRate', - 'useDefaultHolidayAccrualBasis' => 'getUseDefaultHolidayAccrualBasis', - 'useDefaultAccruePaymentInLieuPayAutomatically' => 'getUseDefaultAccruePaymentInLieuPayAutomatically', - 'useDefaultAccrueHoursPerDay' => 'getUseDefaultAccrueHoursPerDay', - 'useDefaultMaximumAccruePeriod' => 'getUseDefaultMaximumAccruePeriod', - 'allowanceResetDate' => 'getAllowanceResetDate', - 'allowance' => 'getAllowance', - 'adjustment' => 'getAdjustment', - 'allowanceUsed' => 'getAllowanceUsed', - 'allowanceUsedPreviousPeriod' => 'getAllowanceUsedPreviousPeriod', - 'allowanceRemaining' => 'getAllowanceRemaining', - 'holidayType' => 'getHolidayType', - 'accrueSetAmount' => 'getAccrueSetAmount', 'accrueHoursPerDay' => 'getAccrueHoursPerDay', - 'showAllowanceOnPayslip' => 'getShowAllowanceOnPayslip', - 'showAhpOnPayslip' => 'getShowAhpOnPayslip', - 'accruePaymentInLieuRate' => 'getAccruePaymentInLieuRate', + 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', 'accruePaymentInLieuAllGrossPay' => 'getAccruePaymentInLieuAllGrossPay', 'accruePaymentInLieuPayAutomatically' => 'getAccruePaymentInLieuPayAutomatically', - 'accruePayCodeSetUniqueId' => 'getAccruePayCodeSetUniqueId', - 'maximumAccruePeriod' => 'getMaximumAccruePeriod', - 'holidayAccrualBasis' => 'getHolidayAccrualBasis', - 'holidayAccrualDefaultRateType' => 'getHolidayAccrualDefaultRateType', - 'occupationalSicknessUniqueId' => 'getOccupationalSicknessUniqueId', - 'accruedPaymentLiability' => 'getAccruedPaymentLiability', - 'accruedPaymentAdjustment' => 'getAccruedPaymentAdjustment', - 'accruedPaymentPaid' => 'getAccruedPaymentPaid', - 'accruedPaymentBalance' => 'getAccruedPaymentBalance', - 'accruedHoursAmount' => 'getAccruedHoursAmount', + 'accruePaymentInLieuRate' => 'getAccruePaymentInLieuRate', + 'accrueSetAmount' => 'getAccrueSetAmount', 'accruedHoursAdjustment' => 'getAccruedHoursAdjustment', - 'accruedHoursPaid' => 'getAccruedHoursPaid', + 'accruedHoursAmount' => 'getAccruedHoursAmount', 'accruedHoursAmountLastPeriod' => 'getAccruedHoursAmountLastPeriod', - 'paidHoursAmountLastPeriod' => 'getPaidHoursAmountLastPeriod', 'accruedHoursBalance' => 'getAccruedHoursBalance', - 'holidayAccrualResetDate' => 'getHolidayAccrualResetDate', + 'accruedHoursPaid' => 'getAccruedHoursPaid', + 'accruedPaymentAdjustment' => 'getAccruedPaymentAdjustment', + 'accruedPaymentBalance' => 'getAccruedPaymentBalance', + 'accruedPaymentLiability' => 'getAccruedPaymentLiability', + 'accruedPaymentPaid' => 'getAccruedPaymentPaid', + 'adjustment' => 'getAdjustment', 'aggregatedServiceDate' => 'getAggregatedServiceDate', - 'useAggregatedServiceDate' => 'getUseAggregatedServiceDate', - 'useDefaultHolidayAccrualDefaultRateType' => 'getUseDefaultHolidayAccrualDefaultRateType', - 'unauthorisedLeaveProRataRule' => 'getUnauthorisedLeaveProRataRule', + 'allowance' => 'getAllowance', + 'allowanceRemaining' => 'getAllowanceRemaining', + 'allowanceResetDate' => 'getAllowanceResetDate', + 'allowanceUsed' => 'getAllowanceUsed', + 'allowanceUsedPreviousPeriod' => 'getAllowanceUsedPreviousPeriod', + 'bereavementLeaveProRataRule' => 'getBereavementLeaveProRataRule', + 'holidayAccrualBasis' => 'getHolidayAccrualBasis', + 'holidayAccrualDefaultRateType' => 'getHolidayAccrualDefaultRateType', + 'holidayAccrualResetDate' => 'getHolidayAccrualResetDate', 'holidayLeaveProRataRule' => 'getHolidayLeaveProRataRule', - 'sickLeaveProRataRule' => 'getSickLeaveProRataRule', + 'holidayType' => 'getHolidayType', + 'maximumAccruePeriod' => 'getMaximumAccruePeriod', + 'occupationalSicknessUniqueId' => 'getOccupationalSicknessUniqueId', + 'paidHoursAmountLastPeriod' => 'getPaidHoursAmountLastPeriod', 'parentalLeaveProRataRule' => 'getParentalLeaveProRataRule', - 'bereavementLeaveProRataRule' => 'getBereavementLeaveProRataRule' + 'showAhpOnPayslip' => 'getShowAhpOnPayslip', + 'showAllowanceOnPayslip' => 'getShowAllowanceOnPayslip', + 'sickLeaveProRataRule' => 'getSickLeaveProRataRule', + 'unauthorisedLeaveProRataRule' => 'getUnauthorisedLeaveProRataRule', + 'useAggregatedServiceDate' => 'getUseAggregatedServiceDate', + 'useDefaultAccrueHoursPerDay' => 'getUseDefaultAccrueHoursPerDay', + 'useDefaultAccruePaymentInLieu' => 'getUseDefaultAccruePaymentInLieu', + 'useDefaultAccruePaymentInLieuPayAutomatically' => 'getUseDefaultAccruePaymentInLieuPayAutomatically', + 'useDefaultAccruePaymentInLieuRate' => 'getUseDefaultAccruePaymentInLieuRate', + 'useDefaultAllowance' => 'getUseDefaultAllowance', + 'useDefaultAllowanceResetDate' => 'getUseDefaultAllowanceResetDate', + 'useDefaultHolidayAccrualBasis' => 'getUseDefaultHolidayAccrualBasis', + 'useDefaultHolidayAccrualDefaultRateType' => 'getUseDefaultHolidayAccrualDefaultRateType', + 'useDefaultHolidayType' => 'getUseDefaultHolidayType', + 'useDefaultMaximumAccruePeriod' => 'getUseDefaultMaximumAccruePeriod' ]; /** @@ -519,53 +519,53 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('useDefaultHolidayType', $data ?? [], null); - $this->setIfExists('useDefaultAllowanceResetDate', $data ?? [], null); - $this->setIfExists('useDefaultAllowance', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieu', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieuRate', $data ?? [], null); - $this->setIfExists('useDefaultHolidayAccrualBasis', $data ?? [], null); - $this->setIfExists('useDefaultAccruePaymentInLieuPayAutomatically', $data ?? [], null); - $this->setIfExists('useDefaultAccrueHoursPerDay', $data ?? [], null); - $this->setIfExists('useDefaultMaximumAccruePeriod', $data ?? [], null); - $this->setIfExists('allowanceResetDate', $data ?? [], null); - $this->setIfExists('allowance', $data ?? [], null); - $this->setIfExists('adjustment', $data ?? [], null); - $this->setIfExists('allowanceUsed', $data ?? [], null); - $this->setIfExists('allowanceUsedPreviousPeriod', $data ?? [], null); - $this->setIfExists('allowanceRemaining', $data ?? [], null); - $this->setIfExists('holidayType', $data ?? [], null); - $this->setIfExists('accrueSetAmount', $data ?? [], null); $this->setIfExists('accrueHoursPerDay', $data ?? [], null); - $this->setIfExists('showAllowanceOnPayslip', $data ?? [], null); - $this->setIfExists('showAhpOnPayslip', $data ?? [], null); - $this->setIfExists('accruePaymentInLieuRate', $data ?? [], null); + $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); $this->setIfExists('accruePaymentInLieuAllGrossPay', $data ?? [], null); $this->setIfExists('accruePaymentInLieuPayAutomatically', $data ?? [], null); - $this->setIfExists('accruePayCodeSetUniqueId', $data ?? [], null); - $this->setIfExists('maximumAccruePeriod', $data ?? [], null); - $this->setIfExists('holidayAccrualBasis', $data ?? [], null); - $this->setIfExists('holidayAccrualDefaultRateType', $data ?? [], null); - $this->setIfExists('occupationalSicknessUniqueId', $data ?? [], null); - $this->setIfExists('accruedPaymentLiability', $data ?? [], null); - $this->setIfExists('accruedPaymentAdjustment', $data ?? [], null); - $this->setIfExists('accruedPaymentPaid', $data ?? [], null); - $this->setIfExists('accruedPaymentBalance', $data ?? [], null); - $this->setIfExists('accruedHoursAmount', $data ?? [], null); + $this->setIfExists('accruePaymentInLieuRate', $data ?? [], null); + $this->setIfExists('accrueSetAmount', $data ?? [], null); $this->setIfExists('accruedHoursAdjustment', $data ?? [], null); - $this->setIfExists('accruedHoursPaid', $data ?? [], null); + $this->setIfExists('accruedHoursAmount', $data ?? [], null); $this->setIfExists('accruedHoursAmountLastPeriod', $data ?? [], null); - $this->setIfExists('paidHoursAmountLastPeriod', $data ?? [], null); $this->setIfExists('accruedHoursBalance', $data ?? [], null); - $this->setIfExists('holidayAccrualResetDate', $data ?? [], null); + $this->setIfExists('accruedHoursPaid', $data ?? [], null); + $this->setIfExists('accruedPaymentAdjustment', $data ?? [], null); + $this->setIfExists('accruedPaymentBalance', $data ?? [], null); + $this->setIfExists('accruedPaymentLiability', $data ?? [], null); + $this->setIfExists('accruedPaymentPaid', $data ?? [], null); + $this->setIfExists('adjustment', $data ?? [], null); $this->setIfExists('aggregatedServiceDate', $data ?? [], null); - $this->setIfExists('useAggregatedServiceDate', $data ?? [], null); - $this->setIfExists('useDefaultHolidayAccrualDefaultRateType', $data ?? [], null); - $this->setIfExists('unauthorisedLeaveProRataRule', $data ?? [], null); + $this->setIfExists('allowance', $data ?? [], null); + $this->setIfExists('allowanceRemaining', $data ?? [], null); + $this->setIfExists('allowanceResetDate', $data ?? [], null); + $this->setIfExists('allowanceUsed', $data ?? [], null); + $this->setIfExists('allowanceUsedPreviousPeriod', $data ?? [], null); + $this->setIfExists('bereavementLeaveProRataRule', $data ?? [], null); + $this->setIfExists('holidayAccrualBasis', $data ?? [], null); + $this->setIfExists('holidayAccrualDefaultRateType', $data ?? [], null); + $this->setIfExists('holidayAccrualResetDate', $data ?? [], null); $this->setIfExists('holidayLeaveProRataRule', $data ?? [], null); - $this->setIfExists('sickLeaveProRataRule', $data ?? [], null); + $this->setIfExists('holidayType', $data ?? [], null); + $this->setIfExists('maximumAccruePeriod', $data ?? [], null); + $this->setIfExists('occupationalSicknessUniqueId', $data ?? [], null); + $this->setIfExists('paidHoursAmountLastPeriod', $data ?? [], null); $this->setIfExists('parentalLeaveProRataRule', $data ?? [], null); - $this->setIfExists('bereavementLeaveProRataRule', $data ?? [], null); + $this->setIfExists('showAhpOnPayslip', $data ?? [], null); + $this->setIfExists('showAllowanceOnPayslip', $data ?? [], null); + $this->setIfExists('sickLeaveProRataRule', $data ?? [], null); + $this->setIfExists('unauthorisedLeaveProRataRule', $data ?? [], null); + $this->setIfExists('useAggregatedServiceDate', $data ?? [], null); + $this->setIfExists('useDefaultAccrueHoursPerDay', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieu', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieuPayAutomatically', $data ?? [], null); + $this->setIfExists('useDefaultAccruePaymentInLieuRate', $data ?? [], null); + $this->setIfExists('useDefaultAllowance', $data ?? [], null); + $this->setIfExists('useDefaultAllowanceResetDate', $data ?? [], null); + $this->setIfExists('useDefaultHolidayAccrualBasis', $data ?? [], null); + $this->setIfExists('useDefaultHolidayAccrualDefaultRateType', $data ?? [], null); + $this->setIfExists('useDefaultHolidayType', $data ?? [], null); + $this->setIfExists('useDefaultMaximumAccruePeriod', $data ?? [], null); } /** @@ -611,697 +611,643 @@ public function valid(): bool /** - * Gets useDefaultHolidayType - * - * @return bool|null - */ - public function getUseDefaultHolidayType(): ?bool - { - return $this->container['useDefaultHolidayType']; - } - - /** - * Sets useDefaultHolidayType - * - * @param bool|null $useDefaultHolidayType If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) - * - * @return $this - */ - public function setUseDefaultHolidayType(?bool $useDefaultHolidayType): static - { - if (is_null($useDefaultHolidayType)) { - throw new InvalidArgumentException('non-nullable useDefaultHolidayType cannot be null'); - } - $this->container['useDefaultHolidayType'] = $useDefaultHolidayType; - - return $this; - } - - /** - * Gets useDefaultAllowanceResetDate - * - * @return bool|null - */ - public function getUseDefaultAllowanceResetDate(): ?bool - { - return $this->container['useDefaultAllowanceResetDate']; - } - - /** - * Sets useDefaultAllowanceResetDate - * - * @param bool|null $useDefaultAllowanceResetDate If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) - * - * @return $this - */ - public function setUseDefaultAllowanceResetDate(?bool $useDefaultAllowanceResetDate): static - { - if (is_null($useDefaultAllowanceResetDate)) { - throw new InvalidArgumentException('non-nullable useDefaultAllowanceResetDate cannot be null'); - } - $this->container['useDefaultAllowanceResetDate'] = $useDefaultAllowanceResetDate; - - return $this; - } - - /** - * Gets useDefaultAllowance + * Gets accrueHoursPerDay * - * @return bool|null + * @return float|null */ - public function getUseDefaultAllowance(): ?bool + public function getAccrueHoursPerDay(): ?float { - return $this->container['useDefaultAllowance']; + return $this->container['accrueHoursPerDay']; } /** - * Sets useDefaultAllowance + * Sets accrueHoursPerDay * - * @param bool|null $useDefaultAllowance If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) + * @param float|null $accrueHoursPerDay If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued * * @return $this */ - public function setUseDefaultAllowance(?bool $useDefaultAllowance): static + public function setAccrueHoursPerDay(?float $accrueHoursPerDay): static { - if (is_null($useDefaultAllowance)) { - throw new InvalidArgumentException('non-nullable useDefaultAllowance cannot be null'); + if (is_null($accrueHoursPerDay)) { + throw new InvalidArgumentException('non-nullable accrueHoursPerDay cannot be null'); } - $this->container['useDefaultAllowance'] = $useDefaultAllowance; + $this->container['accrueHoursPerDay'] = $accrueHoursPerDay; return $this; } /** - * Gets useDefaultAccruePaymentInLieu + * Gets accruePayCodeSetUniqueId * - * @return bool|null + * @return string|null */ - public function getUseDefaultAccruePaymentInLieu(): ?bool + public function getAccruePayCodeSetUniqueId(): ?string { - return $this->container['useDefaultAccruePaymentInLieu']; + return $this->container['accruePayCodeSetUniqueId']; } /** - * Sets useDefaultAccruePaymentInLieu + * Sets accruePayCodeSetUniqueId * - * @param bool|null $useDefaultAccruePaymentInLieu If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param string|null $accruePayCodeSetUniqueId accruePayCodeSetUniqueId * * @return $this */ - public function setUseDefaultAccruePaymentInLieu(?bool $useDefaultAccruePaymentInLieu): static + public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static { - if (is_null($useDefaultAccruePaymentInLieu)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieu cannot be null'); + if (is_null($accruePayCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useDefaultAccruePaymentInLieu'] = $useDefaultAccruePaymentInLieu; + $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; return $this; } /** - * Gets useDefaultAccruePaymentInLieuRate + * Gets accruePaymentInLieuAllGrossPay * * @return bool|null */ - public function getUseDefaultAccruePaymentInLieuRate(): ?bool + public function getAccruePaymentInLieuAllGrossPay(): ?bool { - return $this->container['useDefaultAccruePaymentInLieuRate']; + return $this->container['accruePaymentInLieuAllGrossPay']; } /** - * Sets useDefaultAccruePaymentInLieuRate + * Sets accruePaymentInLieuAllGrossPay * - * @param bool|null $useDefaultAccruePaymentInLieuRate If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param bool|null $accruePaymentInLieuAllGrossPay Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element * * @return $this */ - public function setUseDefaultAccruePaymentInLieuRate(?bool $useDefaultAccruePaymentInLieuRate): static + public function setAccruePaymentInLieuAllGrossPay(?bool $accruePaymentInLieuAllGrossPay): static { - if (is_null($useDefaultAccruePaymentInLieuRate)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuRate cannot be null'); + if (is_null($accruePaymentInLieuAllGrossPay)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuAllGrossPay cannot be null'); } - $this->container['useDefaultAccruePaymentInLieuRate'] = $useDefaultAccruePaymentInLieuRate; + $this->container['accruePaymentInLieuAllGrossPay'] = $accruePaymentInLieuAllGrossPay; return $this; } /** - * Gets useDefaultHolidayAccrualBasis + * Gets accruePaymentInLieuPayAutomatically * * @return bool|null */ - public function getUseDefaultHolidayAccrualBasis(): ?bool + public function getAccruePaymentInLieuPayAutomatically(): ?bool { - return $this->container['useDefaultHolidayAccrualBasis']; + return $this->container['accruePaymentInLieuPayAutomatically']; } /** - * Sets useDefaultHolidayAccrualBasis + * Sets accruePaymentInLieuPayAutomatically * - * @param bool|null $useDefaultHolidayAccrualBasis If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param bool|null $accruePaymentInLieuPayAutomatically Set to true if you want employees to be automatically paid any outstanding holiday pay * * @return $this */ - public function setUseDefaultHolidayAccrualBasis(?bool $useDefaultHolidayAccrualBasis): static + public function setAccruePaymentInLieuPayAutomatically(?bool $accruePaymentInLieuPayAutomatically): static { - if (is_null($useDefaultHolidayAccrualBasis)) { - throw new InvalidArgumentException('non-nullable useDefaultHolidayAccrualBasis cannot be null'); + if (is_null($accruePaymentInLieuPayAutomatically)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuPayAutomatically cannot be null'); } - $this->container['useDefaultHolidayAccrualBasis'] = $useDefaultHolidayAccrualBasis; + $this->container['accruePaymentInLieuPayAutomatically'] = $accruePaymentInLieuPayAutomatically; return $this; } /** - * Gets useDefaultAccruePaymentInLieuPayAutomatically + * Gets accruePaymentInLieuRate * - * @return bool|null + * @return float|null */ - public function getUseDefaultAccruePaymentInLieuPayAutomatically(): ?bool + public function getAccruePaymentInLieuRate(): ?float { - return $this->container['useDefaultAccruePaymentInLieuPayAutomatically']; + return $this->container['accruePaymentInLieuRate']; } /** - * Sets useDefaultAccruePaymentInLieuPayAutomatically + * Sets accruePaymentInLieuRate * - * @param bool|null $useDefaultAccruePaymentInLieuPayAutomatically If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accruePaymentInLieuRate The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. * * @return $this */ - public function setUseDefaultAccruePaymentInLieuPayAutomatically(?bool $useDefaultAccruePaymentInLieuPayAutomatically): static + public function setAccruePaymentInLieuRate(?float $accruePaymentInLieuRate): static { - if (is_null($useDefaultAccruePaymentInLieuPayAutomatically)) { - throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuPayAutomatically cannot be null'); + if (is_null($accruePaymentInLieuRate)) { + throw new InvalidArgumentException('non-nullable accruePaymentInLieuRate cannot be null'); } - $this->container['useDefaultAccruePaymentInLieuPayAutomatically'] = $useDefaultAccruePaymentInLieuPayAutomatically; + $this->container['accruePaymentInLieuRate'] = $accruePaymentInLieuRate; return $this; } /** - * Gets useDefaultAccrueHoursPerDay + * Gets accrueSetAmount * * @return bool|null */ - public function getUseDefaultAccrueHoursPerDay(): ?bool + public function getAccrueSetAmount(): ?bool { - return $this->container['useDefaultAccrueHoursPerDay']; + return $this->container['accrueSetAmount']; } /** - * Sets useDefaultAccrueHoursPerDay + * Sets accrueSetAmount * - * @param bool|null $useDefaultAccrueHoursPerDay If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param bool|null $accrueSetAmount If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. * * @return $this */ - public function setUseDefaultAccrueHoursPerDay(?bool $useDefaultAccrueHoursPerDay): static + public function setAccrueSetAmount(?bool $accrueSetAmount): static { - if (is_null($useDefaultAccrueHoursPerDay)) { - throw new InvalidArgumentException('non-nullable useDefaultAccrueHoursPerDay cannot be null'); + if (is_null($accrueSetAmount)) { + throw new InvalidArgumentException('non-nullable accrueSetAmount cannot be null'); } - $this->container['useDefaultAccrueHoursPerDay'] = $useDefaultAccrueHoursPerDay; + $this->container['accrueSetAmount'] = $accrueSetAmount; return $this; } /** - * Gets useDefaultMaximumAccruePeriod + * Gets accruedHoursAdjustment * - * @return bool|null + * @return float|null */ - public function getUseDefaultMaximumAccruePeriod(): ?bool + public function getAccruedHoursAdjustment(): ?float { - return $this->container['useDefaultMaximumAccruePeriod']; + return $this->container['accruedHoursAdjustment']; } /** - * Sets useDefaultMaximumAccruePeriod + * Sets accruedHoursAdjustment * - * @param bool|null $useDefaultMaximumAccruePeriod If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accruedHoursAdjustment Any manual adjustment to the total hours accrued * * @return $this */ - public function setUseDefaultMaximumAccruePeriod(?bool $useDefaultMaximumAccruePeriod): static + public function setAccruedHoursAdjustment(?float $accruedHoursAdjustment): static { - if (is_null($useDefaultMaximumAccruePeriod)) { - throw new InvalidArgumentException('non-nullable useDefaultMaximumAccruePeriod cannot be null'); + if (is_null($accruedHoursAdjustment)) { + throw new InvalidArgumentException('non-nullable accruedHoursAdjustment cannot be null'); } - $this->container['useDefaultMaximumAccruePeriod'] = $useDefaultMaximumAccruePeriod; + $this->container['accruedHoursAdjustment'] = $accruedHoursAdjustment; return $this; } /** - * Gets allowanceResetDate + * Gets accruedHoursAmount * - * @return \DateTime|null + * @return float|null */ - public function getAllowanceResetDate(): ?\DateTime + public function getAccruedHoursAmount(): ?float { - return $this->container['allowanceResetDate']; + return $this->container['accruedHoursAmount']; } /** - * Sets allowanceResetDate + * Sets accruedHoursAmount * - * @param \DateTime|null $allowanceResetDate The date that the holiday allowance resets. Only the day/month part of the value is relevant. + * @param float|null $accruedHoursAmount [readonly] The total accrued hours for this employee over the lifetime of their employment so far * * @return $this */ - public function setAllowanceResetDate(?\DateTime $allowanceResetDate): static + public function setAccruedHoursAmount(?float $accruedHoursAmount): static { - if (is_null($allowanceResetDate)) { - throw new InvalidArgumentException('non-nullable allowanceResetDate cannot be null'); + if (is_null($accruedHoursAmount)) { + throw new InvalidArgumentException('non-nullable accruedHoursAmount cannot be null'); } - $this->container['allowanceResetDate'] = $allowanceResetDate; + $this->container['accruedHoursAmount'] = $accruedHoursAmount; return $this; } /** - * Gets allowance + * Gets accruedHoursAmountLastPeriod * * @return float|null */ - public function getAllowance(): ?float + public function getAccruedHoursAmountLastPeriod(): ?float { - return $this->container['allowance']; + return $this->container['accruedHoursAmountLastPeriod']; } /** - * Sets allowance + * Sets accruedHoursAmountLastPeriod * - * @param float|null $allowance The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset + * @param float|null $accruedHoursAmountLastPeriod [readonly] The total accrued hours for this employee in the last pay period * * @return $this */ - public function setAllowance(?float $allowance): static + public function setAccruedHoursAmountLastPeriod(?float $accruedHoursAmountLastPeriod): static { - if (is_null($allowance)) { - throw new InvalidArgumentException('non-nullable allowance cannot be null'); + if (is_null($accruedHoursAmountLastPeriod)) { + throw new InvalidArgumentException('non-nullable accruedHoursAmountLastPeriod cannot be null'); } - $this->container['allowance'] = $allowance; + $this->container['accruedHoursAmountLastPeriod'] = $accruedHoursAmountLastPeriod; return $this; } /** - * Gets adjustment + * Gets accruedHoursBalance * * @return float|null */ - public function getAdjustment(): ?float + public function getAccruedHoursBalance(): ?float { - return $this->container['adjustment']; + return $this->container['accruedHoursBalance']; } /** - * Sets adjustment + * Sets accruedHoursBalance * - * @param float|null $adjustment Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) + * @param float|null $accruedHoursBalance [readonly] The balance of hours owed to this employee in lieu of holidays * * @return $this */ - public function setAdjustment(?float $adjustment): static - { - if (is_null($adjustment)) { - array_push($this->openAPINullablesSetToNull, 'adjustment'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('adjustment', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + public function setAccruedHoursBalance(?float $accruedHoursBalance): static + { + if (is_null($accruedHoursBalance)) { + throw new InvalidArgumentException('non-nullable accruedHoursBalance cannot be null'); } - $this->container['adjustment'] = $adjustment; + $this->container['accruedHoursBalance'] = $accruedHoursBalance; return $this; } /** - * Gets allowanceUsed + * Gets accruedHoursPaid * * @return float|null */ - public function getAllowanceUsed(): ?float + public function getAccruedHoursPaid(): ?float { - return $this->container['allowanceUsed']; + return $this->container['accruedHoursPaid']; } /** - * Sets allowanceUsed + * Sets accruedHoursPaid * - * @param float|null $allowanceUsed [readonly] The number of days used from the allowance since last reset + * @param float|null $accruedHoursPaid [readonly] The Total amount of hours paid to this employee in lieu of holidays * * @return $this */ - public function setAllowanceUsed(?float $allowanceUsed): static + public function setAccruedHoursPaid(?float $accruedHoursPaid): static { - if (is_null($allowanceUsed)) { - throw new InvalidArgumentException('non-nullable allowanceUsed cannot be null'); + if (is_null($accruedHoursPaid)) { + throw new InvalidArgumentException('non-nullable accruedHoursPaid cannot be null'); } - $this->container['allowanceUsed'] = $allowanceUsed; + $this->container['accruedHoursPaid'] = $accruedHoursPaid; return $this; } /** - * Gets allowanceUsedPreviousPeriod + * Gets accruedPaymentAdjustment * * @return float|null */ - public function getAllowanceUsedPreviousPeriod(): ?float + public function getAccruedPaymentAdjustment(): ?float { - return $this->container['allowanceUsedPreviousPeriod']; + return $this->container['accruedPaymentAdjustment']; } /** - * Sets allowanceUsedPreviousPeriod + * Sets accruedPaymentAdjustment * - * @param float|null $allowanceUsedPreviousPeriod [readonly] The number of days used in the 12 months prior to the last reset + * @param float|null $accruedPaymentAdjustment Any manual adjustment to the total accrued * * @return $this */ - public function setAllowanceUsedPreviousPeriod(?float $allowanceUsedPreviousPeriod): static + public function setAccruedPaymentAdjustment(?float $accruedPaymentAdjustment): static { - if (is_null($allowanceUsedPreviousPeriod)) { - throw new InvalidArgumentException('non-nullable allowanceUsedPreviousPeriod cannot be null'); + if (is_null($accruedPaymentAdjustment)) { + throw new InvalidArgumentException('non-nullable accruedPaymentAdjustment cannot be null'); } - $this->container['allowanceUsedPreviousPeriod'] = $allowanceUsedPreviousPeriod; + $this->container['accruedPaymentAdjustment'] = $accruedPaymentAdjustment; return $this; } /** - * Gets allowanceRemaining + * Gets accruedPaymentBalance * * @return float|null */ - public function getAllowanceRemaining(): ?float + public function getAccruedPaymentBalance(): ?float { - return $this->container['allowanceRemaining']; + return $this->container['accruedPaymentBalance']; } /** - * Sets allowanceRemaining + * Sets accruedPaymentBalance * - * @param float|null $allowanceRemaining [readonly] The number of days remaining of the allowance until next reset + * @param float|null $accruedPaymentBalance [readonly] The balance of what is owed to this employee in lieu of holidays * * @return $this */ - public function setAllowanceRemaining(?float $allowanceRemaining): static + public function setAccruedPaymentBalance(?float $accruedPaymentBalance): static { - if (is_null($allowanceRemaining)) { - throw new InvalidArgumentException('non-nullable allowanceRemaining cannot be null'); + if (is_null($accruedPaymentBalance)) { + throw new InvalidArgumentException('non-nullable accruedPaymentBalance cannot be null'); } - $this->container['allowanceRemaining'] = $allowanceRemaining; + $this->container['accruedPaymentBalance'] = $accruedPaymentBalance; return $this; } /** - * Gets holidayType + * Gets accruedPaymentLiability * - * @return \SynergiTech\Staffology\Model\HolidayType|null + * @return float|null */ - public function getHolidayType(): ?\SynergiTech\Staffology\Model\HolidayType + public function getAccruedPaymentLiability(): ?float { - return $this->container['holidayType']; + return $this->container['accruedPaymentLiability']; } /** - * Sets holidayType + * Sets accruedPaymentLiability * - * @param \SynergiTech\Staffology\Model\HolidayType|null $holidayType holidayType + * @param float|null $accruedPaymentLiability [readonly] The total accrued payments for this employee over the lifetime of their employment so far * * @return $this */ - public function setHolidayType(?\SynergiTech\Staffology\Model\HolidayType $holidayType): static + public function setAccruedPaymentLiability(?float $accruedPaymentLiability): static { - if (is_null($holidayType)) { - throw new InvalidArgumentException('non-nullable holidayType cannot be null'); + if (is_null($accruedPaymentLiability)) { + throw new InvalidArgumentException('non-nullable accruedPaymentLiability cannot be null'); } - $this->container['holidayType'] = $holidayType; + $this->container['accruedPaymentLiability'] = $accruedPaymentLiability; return $this; } /** - * Gets accrueSetAmount + * Gets accruedPaymentPaid * - * @return bool|null + * @return float|null */ - public function getAccrueSetAmount(): ?bool + public function getAccruedPaymentPaid(): ?float { - return $this->container['accrueSetAmount']; + return $this->container['accruedPaymentPaid']; } /** - * Sets accrueSetAmount + * Sets accruedPaymentPaid * - * @param bool|null $accrueSetAmount If true and HolidayType is Accrual_Days then the AccruePaymentInLieuRate will be treated as the set amount to accrue per period worked. + * @param float|null $accruedPaymentPaid [readonly] The Total amount paid to this employee in lieu of holidays * * @return $this */ - public function setAccrueSetAmount(?bool $accrueSetAmount): static + public function setAccruedPaymentPaid(?float $accruedPaymentPaid): static { - if (is_null($accrueSetAmount)) { - throw new InvalidArgumentException('non-nullable accrueSetAmount cannot be null'); + if (is_null($accruedPaymentPaid)) { + throw new InvalidArgumentException('non-nullable accruedPaymentPaid cannot be null'); } - $this->container['accrueSetAmount'] = $accrueSetAmount; + $this->container['accruedPaymentPaid'] = $accruedPaymentPaid; return $this; } /** - * Gets accrueHoursPerDay + * Gets adjustment * * @return float|null */ - public function getAccrueHoursPerDay(): ?float + public function getAdjustment(): ?float { - return $this->container['accrueHoursPerDay']; + return $this->container['adjustment']; } /** - * Sets accrueHoursPerDay + * Sets adjustment * - * @param float|null $accrueHoursPerDay If HolidayType is Accrual_Days then this value is used to help convert hours worked into days accrued + * @param float|null $adjustment Adjustment to number of hours/days/weeks holiday this employee can take per year. Will reset to 0 when the Allowance resets. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setAccrueHoursPerDay(?float $accrueHoursPerDay): static + public function setAdjustment(?float $adjustment): static { - if (is_null($accrueHoursPerDay)) { - throw new InvalidArgumentException('non-nullable accrueHoursPerDay cannot be null'); + if (is_null($adjustment)) { + array_push($this->openAPINullablesSetToNull, 'adjustment'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('adjustment', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['accrueHoursPerDay'] = $accrueHoursPerDay; + $this->container['adjustment'] = $adjustment; return $this; } /** - * Gets showAllowanceOnPayslip + * Gets aggregatedServiceDate * - * @return bool|null + * @return \DateTime|null */ - public function getShowAllowanceOnPayslip(): ?bool + public function getAggregatedServiceDate(): ?\DateTime { - return $this->container['showAllowanceOnPayslip']; + return $this->container['aggregatedServiceDate']; } /** - * Sets showAllowanceOnPayslip + * Sets aggregatedServiceDate * - * @param bool|null $showAllowanceOnPayslip If true then the remaining Allowance will be shown on the employees payslip. + * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate * * @return $this */ - public function setShowAllowanceOnPayslip(?bool $showAllowanceOnPayslip): static + public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static { - if (is_null($showAllowanceOnPayslip)) { - throw new InvalidArgumentException('non-nullable showAllowanceOnPayslip cannot be null'); + if (is_null($aggregatedServiceDate)) { + array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('aggregatedServiceDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['showAllowanceOnPayslip'] = $showAllowanceOnPayslip; + $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; return $this; } /** - * Gets showAhpOnPayslip + * Gets allowance * - * @return bool|null + * @return float|null */ - public function getShowAhpOnPayslip(): ?bool + public function getAllowance(): ?float { - return $this->container['showAhpOnPayslip']; + return $this->container['allowance']; } /** - * Sets showAhpOnPayslip + * Sets allowance * - * @param bool|null $showAhpOnPayslip If true then the AHP balance will be shown on the employees payslip. + * @param float|null $allowance The number of days holiday an employee can take per year if HolidayType is Days. Otherwise this is readonly and gives you the number of days accrued since the last reset * * @return $this */ - public function setShowAhpOnPayslip(?bool $showAhpOnPayslip): static + public function setAllowance(?float $allowance): static { - if (is_null($showAhpOnPayslip)) { - throw new InvalidArgumentException('non-nullable showAhpOnPayslip cannot be null'); + if (is_null($allowance)) { + throw new InvalidArgumentException('non-nullable allowance cannot be null'); } - $this->container['showAhpOnPayslip'] = $showAhpOnPayslip; + $this->container['allowance'] = $allowance; return $this; } /** - * Gets accruePaymentInLieuRate + * Gets allowanceRemaining * * @return float|null */ - public function getAccruePaymentInLieuRate(): ?float + public function getAllowanceRemaining(): ?float { - return $this->container['accruePaymentInLieuRate']; + return $this->container['allowanceRemaining']; } /** - * Sets accruePaymentInLieuRate + * Sets allowanceRemaining * - * @param float|null $accruePaymentInLieuRate The rate at which Payments in Lieu acrrue. Typically this should be 12.07%. + * @param float|null $allowanceRemaining [readonly] The number of days remaining of the allowance until next reset * * @return $this */ - public function setAccruePaymentInLieuRate(?float $accruePaymentInLieuRate): static + public function setAllowanceRemaining(?float $allowanceRemaining): static { - if (is_null($accruePaymentInLieuRate)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuRate cannot be null'); + if (is_null($allowanceRemaining)) { + throw new InvalidArgumentException('non-nullable allowanceRemaining cannot be null'); } - $this->container['accruePaymentInLieuRate'] = $accruePaymentInLieuRate; + $this->container['allowanceRemaining'] = $allowanceRemaining; return $this; } /** - * Gets accruePaymentInLieuAllGrossPay + * Gets allowanceResetDate * - * @return bool|null + * @return \DateTime|null */ - public function getAccruePaymentInLieuAllGrossPay(): ?bool + public function getAllowanceResetDate(): ?\DateTime { - return $this->container['accruePaymentInLieuAllGrossPay']; + return $this->container['allowanceResetDate']; } /** - * Sets accruePaymentInLieuAllGrossPay + * Sets allowanceResetDate * - * @param bool|null $accruePaymentInLieuAllGrossPay Set to true if you want accrued holiday payments to be calculated on the total gross pay for the employee or just on the single regular pay element + * @param \DateTime|null $allowanceResetDate The date that the holiday allowance resets. Only the day/month part of the value is relevant. * * @return $this */ - public function setAccruePaymentInLieuAllGrossPay(?bool $accruePaymentInLieuAllGrossPay): static + public function setAllowanceResetDate(?\DateTime $allowanceResetDate): static { - if (is_null($accruePaymentInLieuAllGrossPay)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuAllGrossPay cannot be null'); + if (is_null($allowanceResetDate)) { + throw new InvalidArgumentException('non-nullable allowanceResetDate cannot be null'); } - $this->container['accruePaymentInLieuAllGrossPay'] = $accruePaymentInLieuAllGrossPay; + $this->container['allowanceResetDate'] = $allowanceResetDate; return $this; } /** - * Gets accruePaymentInLieuPayAutomatically + * Gets allowanceUsed * - * @return bool|null + * @return float|null */ - public function getAccruePaymentInLieuPayAutomatically(): ?bool + public function getAllowanceUsed(): ?float { - return $this->container['accruePaymentInLieuPayAutomatically']; + return $this->container['allowanceUsed']; } /** - * Sets accruePaymentInLieuPayAutomatically + * Sets allowanceUsed * - * @param bool|null $accruePaymentInLieuPayAutomatically Set to true if you want employees to be automatically paid any outstanding holiday pay + * @param float|null $allowanceUsed [readonly] The number of days used from the allowance since last reset * * @return $this */ - public function setAccruePaymentInLieuPayAutomatically(?bool $accruePaymentInLieuPayAutomatically): static + public function setAllowanceUsed(?float $allowanceUsed): static { - if (is_null($accruePaymentInLieuPayAutomatically)) { - throw new InvalidArgumentException('non-nullable accruePaymentInLieuPayAutomatically cannot be null'); + if (is_null($allowanceUsed)) { + throw new InvalidArgumentException('non-nullable allowanceUsed cannot be null'); } - $this->container['accruePaymentInLieuPayAutomatically'] = $accruePaymentInLieuPayAutomatically; + $this->container['allowanceUsed'] = $allowanceUsed; return $this; } /** - * Gets accruePayCodeSetUniqueId + * Gets allowanceUsedPreviousPeriod * - * @return string|null + * @return float|null */ - public function getAccruePayCodeSetUniqueId(): ?string + public function getAllowanceUsedPreviousPeriod(): ?float { - return $this->container['accruePayCodeSetUniqueId']; + return $this->container['allowanceUsedPreviousPeriod']; } /** - * Sets accruePayCodeSetUniqueId - * - * @param string|null $accruePayCodeSetUniqueId accruePayCodeSetUniqueId + * Sets allowanceUsedPreviousPeriod * - * @return $this - */ - public function setAccruePayCodeSetUniqueId(?string $accruePayCodeSetUniqueId): static - { - if (is_null($accruePayCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'accruePayCodeSetUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accruePayCodeSetUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + * @param float|null $allowanceUsedPreviousPeriod [readonly] The number of days used in the 12 months prior to the last reset + * + * @return $this + */ + public function setAllowanceUsedPreviousPeriod(?float $allowanceUsedPreviousPeriod): static + { + if (is_null($allowanceUsedPreviousPeriod)) { + throw new InvalidArgumentException('non-nullable allowanceUsedPreviousPeriod cannot be null'); } - $this->container['accruePayCodeSetUniqueId'] = $accruePayCodeSetUniqueId; + $this->container['allowanceUsedPreviousPeriod'] = $allowanceUsedPreviousPeriod; return $this; } /** - * Gets maximumAccruePeriod + * Gets bereavementLeaveProRataRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getMaximumAccruePeriod(): ?float + public function getBereavementLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['maximumAccruePeriod']; + return $this->container['bereavementLeaveProRataRule']; } /** - * Sets maximumAccruePeriod + * Sets bereavementLeaveProRataRule * - * @param float|null $maximumAccruePeriod The maximum number of hours capable of being accrued in a single period + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $bereavementLeaveProRataRule bereavementLeaveProRataRule * * @return $this */ - public function setMaximumAccruePeriod(?float $maximumAccruePeriod): static + public function setBereavementLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $bereavementLeaveProRataRule): static { - if (is_null($maximumAccruePeriod)) { - array_push($this->openAPINullablesSetToNull, 'maximumAccruePeriod'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('maximumAccruePeriod', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($bereavementLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable bereavementLeaveProRataRule cannot be null'); } - $this->container['maximumAccruePeriod'] = $maximumAccruePeriod; + $this->container['bereavementLeaveProRataRule'] = $bereavementLeaveProRataRule; return $this; } @@ -1361,562 +1307,616 @@ public function setHolidayAccrualDefaultRateType(?\SynergiTech\Staffology\Model\ } /** - * Gets occupationalSicknessUniqueId + * Gets holidayAccrualResetDate * - * @return string|null + * @return \DateTime|null */ - public function getOccupationalSicknessUniqueId(): ?string + public function getHolidayAccrualResetDate(): ?\DateTime { - return $this->container['occupationalSicknessUniqueId']; + return $this->container['holidayAccrualResetDate']; } /** - * Sets occupationalSicknessUniqueId + * Sets holidayAccrualResetDate * - * @param string|null $occupationalSicknessUniqueId occupationalSicknessUniqueId + * @param \DateTime|null $holidayAccrualResetDate [readonly] This date is used to reset holiday accrual schemes (Accrual Money or Accrual Hours). * * @return $this */ - public function setOccupationalSicknessUniqueId(?string $occupationalSicknessUniqueId): static + public function setHolidayAccrualResetDate(?\DateTime $holidayAccrualResetDate): static { - if (is_null($occupationalSicknessUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'occupationalSicknessUniqueId'); + if (is_null($holidayAccrualResetDate)) { + array_push($this->openAPINullablesSetToNull, 'holidayAccrualResetDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('occupationalSicknessUniqueId', $nullablesSetToNull); + $index = array_search('holidayAccrualResetDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['occupationalSicknessUniqueId'] = $occupationalSicknessUniqueId; + $this->container['holidayAccrualResetDate'] = $holidayAccrualResetDate; return $this; } /** - * Gets accruedPaymentLiability + * Gets holidayLeaveProRataRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getAccruedPaymentLiability(): ?float + public function getHolidayLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['accruedPaymentLiability']; + return $this->container['holidayLeaveProRataRule']; } /** - * Sets accruedPaymentLiability + * Sets holidayLeaveProRataRule * - * @param float|null $accruedPaymentLiability [readonly] The total accrued payments for this employee over the lifetime of their employment so far + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $holidayLeaveProRataRule holidayLeaveProRataRule * * @return $this */ - public function setAccruedPaymentLiability(?float $accruedPaymentLiability): static + public function setHolidayLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $holidayLeaveProRataRule): static { - if (is_null($accruedPaymentLiability)) { - throw new InvalidArgumentException('non-nullable accruedPaymentLiability cannot be null'); + if (is_null($holidayLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable holidayLeaveProRataRule cannot be null'); } - $this->container['accruedPaymentLiability'] = $accruedPaymentLiability; + $this->container['holidayLeaveProRataRule'] = $holidayLeaveProRataRule; return $this; } /** - * Gets accruedPaymentAdjustment + * Gets holidayType * - * @return float|null + * @return \SynergiTech\Staffology\Model\HolidayType|null */ - public function getAccruedPaymentAdjustment(): ?float + public function getHolidayType(): ?\SynergiTech\Staffology\Model\HolidayType { - return $this->container['accruedPaymentAdjustment']; + return $this->container['holidayType']; } /** - * Sets accruedPaymentAdjustment + * Sets holidayType * - * @param float|null $accruedPaymentAdjustment Any manual adjustment to the total accrued + * @param \SynergiTech\Staffology\Model\HolidayType|null $holidayType holidayType * * @return $this */ - public function setAccruedPaymentAdjustment(?float $accruedPaymentAdjustment): static + public function setHolidayType(?\SynergiTech\Staffology\Model\HolidayType $holidayType): static { - if (is_null($accruedPaymentAdjustment)) { - throw new InvalidArgumentException('non-nullable accruedPaymentAdjustment cannot be null'); + if (is_null($holidayType)) { + throw new InvalidArgumentException('non-nullable holidayType cannot be null'); } - $this->container['accruedPaymentAdjustment'] = $accruedPaymentAdjustment; + $this->container['holidayType'] = $holidayType; return $this; } /** - * Gets accruedPaymentPaid + * Gets maximumAccruePeriod * * @return float|null */ - public function getAccruedPaymentPaid(): ?float + public function getMaximumAccruePeriod(): ?float { - return $this->container['accruedPaymentPaid']; + return $this->container['maximumAccruePeriod']; } /** - * Sets accruedPaymentPaid + * Sets maximumAccruePeriod * - * @param float|null $accruedPaymentPaid [readonly] The Total amount paid to this employee in lieu of holidays + * @param float|null $maximumAccruePeriod The maximum number of hours capable of being accrued in a single period * * @return $this */ - public function setAccruedPaymentPaid(?float $accruedPaymentPaid): static + public function setMaximumAccruePeriod(?float $maximumAccruePeriod): static { - if (is_null($accruedPaymentPaid)) { - throw new InvalidArgumentException('non-nullable accruedPaymentPaid cannot be null'); + if (is_null($maximumAccruePeriod)) { + array_push($this->openAPINullablesSetToNull, 'maximumAccruePeriod'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('maximumAccruePeriod', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['accruedPaymentPaid'] = $accruedPaymentPaid; + $this->container['maximumAccruePeriod'] = $maximumAccruePeriod; return $this; } /** - * Gets accruedPaymentBalance + * Gets occupationalSicknessUniqueId * - * @return float|null + * @return string|null */ - public function getAccruedPaymentBalance(): ?float + public function getOccupationalSicknessUniqueId(): ?string { - return $this->container['accruedPaymentBalance']; + return $this->container['occupationalSicknessUniqueId']; } /** - * Sets accruedPaymentBalance + * Sets occupationalSicknessUniqueId * - * @param float|null $accruedPaymentBalance [readonly] The balance of what is owed to this employee in lieu of holidays + * @param string|null $occupationalSicknessUniqueId occupationalSicknessUniqueId * * @return $this */ - public function setAccruedPaymentBalance(?float $accruedPaymentBalance): static + public function setOccupationalSicknessUniqueId(?string $occupationalSicknessUniqueId): static { - if (is_null($accruedPaymentBalance)) { - throw new InvalidArgumentException('non-nullable accruedPaymentBalance cannot be null'); + if (is_null($occupationalSicknessUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'occupationalSicknessUniqueId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('occupationalSicknessUniqueId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['accruedPaymentBalance'] = $accruedPaymentBalance; + $this->container['occupationalSicknessUniqueId'] = $occupationalSicknessUniqueId; return $this; } /** - * Gets accruedHoursAmount + * Gets paidHoursAmountLastPeriod * * @return float|null */ - public function getAccruedHoursAmount(): ?float + public function getPaidHoursAmountLastPeriod(): ?float { - return $this->container['accruedHoursAmount']; + return $this->container['paidHoursAmountLastPeriod']; } /** - * Sets accruedHoursAmount + * Sets paidHoursAmountLastPeriod * - * @param float|null $accruedHoursAmount [readonly] The total accrued hours for this employee over the lifetime of their employment so far + * @param float|null $paidHoursAmountLastPeriod [readonly] The number of hours paid against the pay code * * @return $this */ - public function setAccruedHoursAmount(?float $accruedHoursAmount): static + public function setPaidHoursAmountLastPeriod(?float $paidHoursAmountLastPeriod): static { - if (is_null($accruedHoursAmount)) { - throw new InvalidArgumentException('non-nullable accruedHoursAmount cannot be null'); + if (is_null($paidHoursAmountLastPeriod)) { + throw new InvalidArgumentException('non-nullable paidHoursAmountLastPeriod cannot be null'); } - $this->container['accruedHoursAmount'] = $accruedHoursAmount; + $this->container['paidHoursAmountLastPeriod'] = $paidHoursAmountLastPeriod; return $this; } /** - * Gets accruedHoursAdjustment + * Gets parentalLeaveProRataRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getAccruedHoursAdjustment(): ?float + public function getParentalLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['accruedHoursAdjustment']; + return $this->container['parentalLeaveProRataRule']; } /** - * Sets accruedHoursAdjustment + * Sets parentalLeaveProRataRule * - * @param float|null $accruedHoursAdjustment Any manual adjustment to the total hours accrued + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $parentalLeaveProRataRule parentalLeaveProRataRule * * @return $this */ - public function setAccruedHoursAdjustment(?float $accruedHoursAdjustment): static + public function setParentalLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $parentalLeaveProRataRule): static { - if (is_null($accruedHoursAdjustment)) { - throw new InvalidArgumentException('non-nullable accruedHoursAdjustment cannot be null'); + if (is_null($parentalLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable parentalLeaveProRataRule cannot be null'); } - $this->container['accruedHoursAdjustment'] = $accruedHoursAdjustment; + $this->container['parentalLeaveProRataRule'] = $parentalLeaveProRataRule; return $this; } /** - * Gets accruedHoursPaid + * Gets showAhpOnPayslip * - * @return float|null + * @return bool|null */ - public function getAccruedHoursPaid(): ?float + public function getShowAhpOnPayslip(): ?bool { - return $this->container['accruedHoursPaid']; + return $this->container['showAhpOnPayslip']; } /** - * Sets accruedHoursPaid + * Sets showAhpOnPayslip * - * @param float|null $accruedHoursPaid [readonly] The Total amount of hours paid to this employee in lieu of holidays + * @param bool|null $showAhpOnPayslip If true then the AHP balance will be shown on the employees payslip. * * @return $this */ - public function setAccruedHoursPaid(?float $accruedHoursPaid): static + public function setShowAhpOnPayslip(?bool $showAhpOnPayslip): static + { + if (is_null($showAhpOnPayslip)) { + throw new InvalidArgumentException('non-nullable showAhpOnPayslip cannot be null'); + } + $this->container['showAhpOnPayslip'] = $showAhpOnPayslip; + + return $this; + } + + /** + * Gets showAllowanceOnPayslip + * + * @return bool|null + */ + public function getShowAllowanceOnPayslip(): ?bool + { + return $this->container['showAllowanceOnPayslip']; + } + + /** + * Sets showAllowanceOnPayslip + * + * @param bool|null $showAllowanceOnPayslip If true then the remaining Allowance will be shown on the employees payslip. + * + * @return $this + */ + public function setShowAllowanceOnPayslip(?bool $showAllowanceOnPayslip): static + { + if (is_null($showAllowanceOnPayslip)) { + throw new InvalidArgumentException('non-nullable showAllowanceOnPayslip cannot be null'); + } + $this->container['showAllowanceOnPayslip'] = $showAllowanceOnPayslip; + + return $this; + } + + /** + * Gets sickLeaveProRataRule + * + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + */ + public function getSickLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + { + return $this->container['sickLeaveProRataRule']; + } + + /** + * Sets sickLeaveProRataRule + * + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $sickLeaveProRataRule sickLeaveProRataRule + * + * @return $this + */ + public function setSickLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $sickLeaveProRataRule): static { - if (is_null($accruedHoursPaid)) { - throw new InvalidArgumentException('non-nullable accruedHoursPaid cannot be null'); + if (is_null($sickLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable sickLeaveProRataRule cannot be null'); } - $this->container['accruedHoursPaid'] = $accruedHoursPaid; + $this->container['sickLeaveProRataRule'] = $sickLeaveProRataRule; return $this; } /** - * Gets accruedHoursAmountLastPeriod + * Gets unauthorisedLeaveProRataRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null */ - public function getAccruedHoursAmountLastPeriod(): ?float + public function getUnauthorisedLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule { - return $this->container['accruedHoursAmountLastPeriod']; + return $this->container['unauthorisedLeaveProRataRule']; } /** - * Sets accruedHoursAmountLastPeriod + * Sets unauthorisedLeaveProRataRule * - * @param float|null $accruedHoursAmountLastPeriod [readonly] The total accrued hours for this employee in the last pay period + * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $unauthorisedLeaveProRataRule unauthorisedLeaveProRataRule * * @return $this */ - public function setAccruedHoursAmountLastPeriod(?float $accruedHoursAmountLastPeriod): static + public function setUnauthorisedLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $unauthorisedLeaveProRataRule): static { - if (is_null($accruedHoursAmountLastPeriod)) { - throw new InvalidArgumentException('non-nullable accruedHoursAmountLastPeriod cannot be null'); + if (is_null($unauthorisedLeaveProRataRule)) { + throw new InvalidArgumentException('non-nullable unauthorisedLeaveProRataRule cannot be null'); } - $this->container['accruedHoursAmountLastPeriod'] = $accruedHoursAmountLastPeriod; + $this->container['unauthorisedLeaveProRataRule'] = $unauthorisedLeaveProRataRule; return $this; } /** - * Gets paidHoursAmountLastPeriod + * Gets useAggregatedServiceDate * - * @return float|null + * @return bool|null */ - public function getPaidHoursAmountLastPeriod(): ?float + public function getUseAggregatedServiceDate(): ?bool { - return $this->container['paidHoursAmountLastPeriod']; + return $this->container['useAggregatedServiceDate']; } /** - * Sets paidHoursAmountLastPeriod + * Sets useAggregatedServiceDate * - * @param float|null $paidHoursAmountLastPeriod [readonly] The number of hours paid against the pay code + * @param bool|null $useAggregatedServiceDate useAggregatedServiceDate * * @return $this */ - public function setPaidHoursAmountLastPeriod(?float $paidHoursAmountLastPeriod): static + public function setUseAggregatedServiceDate(?bool $useAggregatedServiceDate): static { - if (is_null($paidHoursAmountLastPeriod)) { - throw new InvalidArgumentException('non-nullable paidHoursAmountLastPeriod cannot be null'); + if (is_null($useAggregatedServiceDate)) { + throw new InvalidArgumentException('non-nullable useAggregatedServiceDate cannot be null'); } - $this->container['paidHoursAmountLastPeriod'] = $paidHoursAmountLastPeriod; + $this->container['useAggregatedServiceDate'] = $useAggregatedServiceDate; return $this; } /** - * Gets accruedHoursBalance + * Gets useDefaultAccrueHoursPerDay * - * @return float|null + * @return bool|null */ - public function getAccruedHoursBalance(): ?float + public function getUseDefaultAccrueHoursPerDay(): ?bool { - return $this->container['accruedHoursBalance']; + return $this->container['useDefaultAccrueHoursPerDay']; } /** - * Sets accruedHoursBalance + * Sets useDefaultAccrueHoursPerDay * - * @param float|null $accruedHoursBalance [readonly] The balance of hours owed to this employee in lieu of holidays + * @param bool|null $useDefaultAccrueHoursPerDay If true then the value for AccrueHoursPerDay comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setAccruedHoursBalance(?float $accruedHoursBalance): static + public function setUseDefaultAccrueHoursPerDay(?bool $useDefaultAccrueHoursPerDay): static { - if (is_null($accruedHoursBalance)) { - throw new InvalidArgumentException('non-nullable accruedHoursBalance cannot be null'); + if (is_null($useDefaultAccrueHoursPerDay)) { + throw new InvalidArgumentException('non-nullable useDefaultAccrueHoursPerDay cannot be null'); } - $this->container['accruedHoursBalance'] = $accruedHoursBalance; + $this->container['useDefaultAccrueHoursPerDay'] = $useDefaultAccrueHoursPerDay; return $this; } /** - * Gets holidayAccrualResetDate + * Gets useDefaultAccruePaymentInLieu * - * @return \DateTime|null + * @return bool|null */ - public function getHolidayAccrualResetDate(): ?\DateTime + public function getUseDefaultAccruePaymentInLieu(): ?bool { - return $this->container['holidayAccrualResetDate']; + return $this->container['useDefaultAccruePaymentInLieu']; } /** - * Sets holidayAccrualResetDate + * Sets useDefaultAccruePaymentInLieu * - * @param \DateTime|null $holidayAccrualResetDate [readonly] This date is used to reset holiday accrual schemes (Accrual Money or Accrual Hours). + * @param bool|null $useDefaultAccruePaymentInLieu If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setHolidayAccrualResetDate(?\DateTime $holidayAccrualResetDate): static + public function setUseDefaultAccruePaymentInLieu(?bool $useDefaultAccruePaymentInLieu): static { - if (is_null($holidayAccrualResetDate)) { - array_push($this->openAPINullablesSetToNull, 'holidayAccrualResetDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('holidayAccrualResetDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useDefaultAccruePaymentInLieu)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieu cannot be null'); } - $this->container['holidayAccrualResetDate'] = $holidayAccrualResetDate; + $this->container['useDefaultAccruePaymentInLieu'] = $useDefaultAccruePaymentInLieu; return $this; } /** - * Gets aggregatedServiceDate + * Gets useDefaultAccruePaymentInLieuPayAutomatically * - * @return \DateTime|null + * @return bool|null */ - public function getAggregatedServiceDate(): ?\DateTime + public function getUseDefaultAccruePaymentInLieuPayAutomatically(): ?bool { - return $this->container['aggregatedServiceDate']; + return $this->container['useDefaultAccruePaymentInLieuPayAutomatically']; } /** - * Sets aggregatedServiceDate + * Sets useDefaultAccruePaymentInLieuPayAutomatically * - * @param \DateTime|null $aggregatedServiceDate aggregatedServiceDate + * @param bool|null $useDefaultAccruePaymentInLieuPayAutomatically If true then the value for AccruePaymentInLieu comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setAggregatedServiceDate(?\DateTime $aggregatedServiceDate): static + public function setUseDefaultAccruePaymentInLieuPayAutomatically(?bool $useDefaultAccruePaymentInLieuPayAutomatically): static { - if (is_null($aggregatedServiceDate)) { - array_push($this->openAPINullablesSetToNull, 'aggregatedServiceDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aggregatedServiceDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useDefaultAccruePaymentInLieuPayAutomatically)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuPayAutomatically cannot be null'); } - $this->container['aggregatedServiceDate'] = $aggregatedServiceDate; + $this->container['useDefaultAccruePaymentInLieuPayAutomatically'] = $useDefaultAccruePaymentInLieuPayAutomatically; return $this; } /** - * Gets useAggregatedServiceDate + * Gets useDefaultAccruePaymentInLieuRate * * @return bool|null */ - public function getUseAggregatedServiceDate(): ?bool + public function getUseDefaultAccruePaymentInLieuRate(): ?bool { - return $this->container['useAggregatedServiceDate']; + return $this->container['useDefaultAccruePaymentInLieuRate']; } /** - * Sets useAggregatedServiceDate + * Sets useDefaultAccruePaymentInLieuRate * - * @param bool|null $useAggregatedServiceDate useAggregatedServiceDate + * @param bool|null $useDefaultAccruePaymentInLieuRate If true then the value for AccruePaymentInLieuRate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setUseAggregatedServiceDate(?bool $useAggregatedServiceDate): static + public function setUseDefaultAccruePaymentInLieuRate(?bool $useDefaultAccruePaymentInLieuRate): static { - if (is_null($useAggregatedServiceDate)) { - throw new InvalidArgumentException('non-nullable useAggregatedServiceDate cannot be null'); + if (is_null($useDefaultAccruePaymentInLieuRate)) { + throw new InvalidArgumentException('non-nullable useDefaultAccruePaymentInLieuRate cannot be null'); } - $this->container['useAggregatedServiceDate'] = $useAggregatedServiceDate; + $this->container['useDefaultAccruePaymentInLieuRate'] = $useDefaultAccruePaymentInLieuRate; return $this; } /** - * Gets useDefaultHolidayAccrualDefaultRateType + * Gets useDefaultAllowance * * @return bool|null */ - public function getUseDefaultHolidayAccrualDefaultRateType(): ?bool + public function getUseDefaultAllowance(): ?bool { - return $this->container['useDefaultHolidayAccrualDefaultRateType']; + return $this->container['useDefaultAllowance']; } /** - * Sets useDefaultHolidayAccrualDefaultRateType + * Sets useDefaultAllowance * - * @param bool|null $useDefaultHolidayAccrualDefaultRateType If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. + * @param bool|null $useDefaultAllowance If true then the value for the Allowance comes from the Employer record. This property only appears if the LeaveSettings if a child of an Employee (not of an Employer) * * @return $this */ - public function setUseDefaultHolidayAccrualDefaultRateType(?bool $useDefaultHolidayAccrualDefaultRateType): static + public function setUseDefaultAllowance(?bool $useDefaultAllowance): static { - if (is_null($useDefaultHolidayAccrualDefaultRateType)) { - throw new InvalidArgumentException('non-nullable useDefaultHolidayAccrualDefaultRateType cannot be null'); + if (is_null($useDefaultAllowance)) { + throw new InvalidArgumentException('non-nullable useDefaultAllowance cannot be null'); } - $this->container['useDefaultHolidayAccrualDefaultRateType'] = $useDefaultHolidayAccrualDefaultRateType; + $this->container['useDefaultAllowance'] = $useDefaultAllowance; return $this; } /** - * Gets unauthorisedLeaveProRataRule + * Gets useDefaultAllowanceResetDate * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getUnauthorisedLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultAllowanceResetDate(): ?bool { - return $this->container['unauthorisedLeaveProRataRule']; + return $this->container['useDefaultAllowanceResetDate']; } /** - * Sets unauthorisedLeaveProRataRule + * Sets useDefaultAllowanceResetDate * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $unauthorisedLeaveProRataRule unauthorisedLeaveProRataRule + * @param bool|null $useDefaultAllowanceResetDate If true then the value for the AllowanceResetDate comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setUnauthorisedLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $unauthorisedLeaveProRataRule): static + public function setUseDefaultAllowanceResetDate(?bool $useDefaultAllowanceResetDate): static { - if (is_null($unauthorisedLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable unauthorisedLeaveProRataRule cannot be null'); + if (is_null($useDefaultAllowanceResetDate)) { + throw new InvalidArgumentException('non-nullable useDefaultAllowanceResetDate cannot be null'); } - $this->container['unauthorisedLeaveProRataRule'] = $unauthorisedLeaveProRataRule; + $this->container['useDefaultAllowanceResetDate'] = $useDefaultAllowanceResetDate; return $this; } /** - * Gets holidayLeaveProRataRule + * Gets useDefaultHolidayAccrualBasis * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getHolidayLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultHolidayAccrualBasis(): ?bool { - return $this->container['holidayLeaveProRataRule']; + return $this->container['useDefaultHolidayAccrualBasis']; } /** - * Sets holidayLeaveProRataRule + * Sets useDefaultHolidayAccrualBasis * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $holidayLeaveProRataRule holidayLeaveProRataRule + * @param bool|null $useDefaultHolidayAccrualBasis If true then the value for HolidayAccrualBasis comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setHolidayLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $holidayLeaveProRataRule): static + public function setUseDefaultHolidayAccrualBasis(?bool $useDefaultHolidayAccrualBasis): static { - if (is_null($holidayLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable holidayLeaveProRataRule cannot be null'); + if (is_null($useDefaultHolidayAccrualBasis)) { + throw new InvalidArgumentException('non-nullable useDefaultHolidayAccrualBasis cannot be null'); } - $this->container['holidayLeaveProRataRule'] = $holidayLeaveProRataRule; + $this->container['useDefaultHolidayAccrualBasis'] = $useDefaultHolidayAccrualBasis; return $this; } /** - * Gets sickLeaveProRataRule + * Gets useDefaultHolidayAccrualDefaultRateType * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getSickLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultHolidayAccrualDefaultRateType(): ?bool { - return $this->container['sickLeaveProRataRule']; + return $this->container['useDefaultHolidayAccrualDefaultRateType']; } /** - * Sets sickLeaveProRataRule + * Sets useDefaultHolidayAccrualDefaultRateType * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $sickLeaveProRataRule sickLeaveProRataRule + * @param bool|null $useDefaultHolidayAccrualDefaultRateType If true then the value for HolidayAccrualDefaultRateType comes from the Employer record. * * @return $this */ - public function setSickLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $sickLeaveProRataRule): static + public function setUseDefaultHolidayAccrualDefaultRateType(?bool $useDefaultHolidayAccrualDefaultRateType): static { - if (is_null($sickLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable sickLeaveProRataRule cannot be null'); + if (is_null($useDefaultHolidayAccrualDefaultRateType)) { + throw new InvalidArgumentException('non-nullable useDefaultHolidayAccrualDefaultRateType cannot be null'); } - $this->container['sickLeaveProRataRule'] = $sickLeaveProRataRule; + $this->container['useDefaultHolidayAccrualDefaultRateType'] = $useDefaultHolidayAccrualDefaultRateType; return $this; } /** - * Gets parentalLeaveProRataRule + * Gets useDefaultHolidayType * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getParentalLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultHolidayType(): ?bool { - return $this->container['parentalLeaveProRataRule']; + return $this->container['useDefaultHolidayType']; } /** - * Sets parentalLeaveProRataRule + * Sets useDefaultHolidayType * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $parentalLeaveProRataRule parentalLeaveProRataRule + * @param bool|null $useDefaultHolidayType If true then the value for HolidayType comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setParentalLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $parentalLeaveProRataRule): static + public function setUseDefaultHolidayType(?bool $useDefaultHolidayType): static { - if (is_null($parentalLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable parentalLeaveProRataRule cannot be null'); + if (is_null($useDefaultHolidayType)) { + throw new InvalidArgumentException('non-nullable useDefaultHolidayType cannot be null'); } - $this->container['parentalLeaveProRataRule'] = $parentalLeaveProRataRule; + $this->container['useDefaultHolidayType'] = $useDefaultHolidayType; return $this; } /** - * Gets bereavementLeaveProRataRule + * Gets useDefaultMaximumAccruePeriod * - * @return \SynergiTech\Staffology\Model\LeaveProRataRule|null + * @return bool|null */ - public function getBereavementLeaveProRataRule(): ?\SynergiTech\Staffology\Model\LeaveProRataRule + public function getUseDefaultMaximumAccruePeriod(): ?bool { - return $this->container['bereavementLeaveProRataRule']; + return $this->container['useDefaultMaximumAccruePeriod']; } /** - * Sets bereavementLeaveProRataRule + * Sets useDefaultMaximumAccruePeriod * - * @param \SynergiTech\Staffology\Model\LeaveProRataRule|null $bereavementLeaveProRataRule bereavementLeaveProRataRule + * @param bool|null $useDefaultMaximumAccruePeriod If true then the value for MaximumAccruePeriod comes from the Employer record. This property only appears if the LeaveSettings is a child of an Employee (not of an Employer) * * @return $this */ - public function setBereavementLeaveProRataRule(?\SynergiTech\Staffology\Model\LeaveProRataRule $bereavementLeaveProRataRule): static + public function setUseDefaultMaximumAccruePeriod(?bool $useDefaultMaximumAccruePeriod): static { - if (is_null($bereavementLeaveProRataRule)) { - throw new InvalidArgumentException('non-nullable bereavementLeaveProRataRule cannot be null'); + if (is_null($useDefaultMaximumAccruePeriod)) { + throw new InvalidArgumentException('non-nullable useDefaultMaximumAccruePeriod cannot be null'); } - $this->container['bereavementLeaveProRataRule'] = $bereavementLeaveProRataRule; + $this->container['useDefaultMaximumAccruePeriod'] = $useDefaultMaximumAccruePeriod; return $this; } diff --git a/src/Model/LeaveType.php b/src/Model/LeaveType.php index cd1f487..18ced5f 100644 --- a/src/Model/LeaveType.php +++ b/src/Model/LeaveType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/LeaverDetails.php b/src/Model/LeaverDetails.php index 90f92da..928f92b 100644 --- a/src/Model/LeaverDetails.php +++ b/src/Model/LeaverDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,11 +60,11 @@ class LeaverDetails implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'hasLeft' => 'bool', - 'leaveDate' => '\DateTime', 'isDeceased' => 'bool', - 'paymentAfterLeaving' => 'bool', + 'leaveDate' => '\DateTime', 'p45Sent' => 'bool', 'payAccruedBalance' => 'bool', + 'paymentAfterLeaving' => 'bool', 'paymentMethodAfterLeaving' => '\SynergiTech\Staffology\Model\PaymentMethodAfterLeaving' ]; @@ -75,11 +75,11 @@ class LeaverDetails implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'hasLeft' => null, - 'leaveDate' => 'date', 'isDeceased' => null, - 'paymentAfterLeaving' => null, + 'leaveDate' => 'date', 'p45Sent' => null, 'payAccruedBalance' => null, + 'paymentAfterLeaving' => null, 'paymentMethodAfterLeaving' => null ]; @@ -90,11 +90,11 @@ class LeaverDetails implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'hasLeft' => false, - 'leaveDate' => true, 'isDeceased' => false, - 'paymentAfterLeaving' => false, + 'leaveDate' => true, 'p45Sent' => false, 'payAccruedBalance' => false, + 'paymentAfterLeaving' => false, 'paymentMethodAfterLeaving' => false ]; @@ -185,11 +185,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'hasLeft' => 'hasLeft', - 'leaveDate' => 'leaveDate', 'isDeceased' => 'isDeceased', - 'paymentAfterLeaving' => 'paymentAfterLeaving', + 'leaveDate' => 'leaveDate', 'p45Sent' => 'p45Sent', 'payAccruedBalance' => 'payAccruedBalance', + 'paymentAfterLeaving' => 'paymentAfterLeaving', 'paymentMethodAfterLeaving' => 'paymentMethodAfterLeaving' ]; @@ -200,11 +200,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'hasLeft' => 'setHasLeft', - 'leaveDate' => 'setLeaveDate', 'isDeceased' => 'setIsDeceased', - 'paymentAfterLeaving' => 'setPaymentAfterLeaving', + 'leaveDate' => 'setLeaveDate', 'p45Sent' => 'setP45Sent', 'payAccruedBalance' => 'setPayAccruedBalance', + 'paymentAfterLeaving' => 'setPaymentAfterLeaving', 'paymentMethodAfterLeaving' => 'setPaymentMethodAfterLeaving' ]; @@ -215,11 +215,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'hasLeft' => 'getHasLeft', - 'leaveDate' => 'getLeaveDate', 'isDeceased' => 'getIsDeceased', - 'paymentAfterLeaving' => 'getPaymentAfterLeaving', + 'leaveDate' => 'getLeaveDate', 'p45Sent' => 'getP45Sent', 'payAccruedBalance' => 'getPayAccruedBalance', + 'paymentAfterLeaving' => 'getPaymentAfterLeaving', 'paymentMethodAfterLeaving' => 'getPaymentMethodAfterLeaving' ]; @@ -280,11 +280,11 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('hasLeft', $data ?? [], null); - $this->setIfExists('leaveDate', $data ?? [], null); $this->setIfExists('isDeceased', $data ?? [], null); - $this->setIfExists('paymentAfterLeaving', $data ?? [], null); + $this->setIfExists('leaveDate', $data ?? [], null); $this->setIfExists('p45Sent', $data ?? [], null); $this->setIfExists('payAccruedBalance', $data ?? [], null); + $this->setIfExists('paymentAfterLeaving', $data ?? [], null); $this->setIfExists('paymentMethodAfterLeaving', $data ?? [], null); } @@ -357,40 +357,6 @@ public function setHasLeft(?bool $hasLeft): static return $this; } - /** - * Gets leaveDate - * - * @return \DateTime|null - */ - public function getLeaveDate(): ?\DateTime - { - return $this->container['leaveDate']; - } - - /** - * Sets leaveDate - * - * @param \DateTime|null $leaveDate leaveDate - * - * @return $this - */ - public function setLeaveDate(?\DateTime $leaveDate): static - { - if (is_null($leaveDate)) { - array_push($this->openAPINullablesSetToNull, 'leaveDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('leaveDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['leaveDate'] = $leaveDate; - - return $this; - } - /** * Gets isDeceased * @@ -419,28 +385,35 @@ public function setIsDeceased(?bool $isDeceased): static } /** - * Gets paymentAfterLeaving + * Gets leaveDate * - * @return bool|null + * @return \DateTime|null */ - public function getPaymentAfterLeaving(): ?bool + public function getLeaveDate(): ?\DateTime { - return $this->container['paymentAfterLeaving']; + return $this->container['leaveDate']; } /** - * Sets paymentAfterLeaving + * Sets leaveDate * - * @param bool|null $paymentAfterLeaving paymentAfterLeaving + * @param \DateTime|null $leaveDate leaveDate * * @return $this */ - public function setPaymentAfterLeaving(?bool $paymentAfterLeaving): static + public function setLeaveDate(?\DateTime $leaveDate): static { - if (is_null($paymentAfterLeaving)) { - throw new InvalidArgumentException('non-nullable paymentAfterLeaving cannot be null'); + if (is_null($leaveDate)) { + array_push($this->openAPINullablesSetToNull, 'leaveDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('leaveDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['paymentAfterLeaving'] = $paymentAfterLeaving; + $this->container['leaveDate'] = $leaveDate; return $this; } @@ -499,6 +472,33 @@ public function setPayAccruedBalance(?bool $payAccruedBalance): static return $this; } + /** + * Gets paymentAfterLeaving + * + * @return bool|null + */ + public function getPaymentAfterLeaving(): ?bool + { + return $this->container['paymentAfterLeaving']; + } + + /** + * Sets paymentAfterLeaving + * + * @param bool|null $paymentAfterLeaving paymentAfterLeaving + * + * @return $this + */ + public function setPaymentAfterLeaving(?bool $paymentAfterLeaving): static + { + if (is_null($paymentAfterLeaving)) { + throw new InvalidArgumentException('non-nullable paymentAfterLeaving cannot be null'); + } + $this->container['paymentAfterLeaving'] = $paymentAfterLeaving; + + return $this; + } + /** * Gets paymentMethodAfterLeaving * diff --git a/src/Model/LgpsCivicaCasualHours.php b/src/Model/LgpsCivicaCasualHours.php index 76aed43..5cb7b8f 100644 --- a/src/Model/LgpsCivicaCasualHours.php +++ b/src/Model/LgpsCivicaCasualHours.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/LgpsCivicaPayrollNumber.php b/src/Model/LgpsCivicaPayrollNumber.php index c8c1a2d..80afad4 100644 --- a/src/Model/LgpsCivicaPayrollNumber.php +++ b/src/Model/LgpsCivicaPayrollNumber.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/LgpsFund.php b/src/Model/LgpsFund.php index f530a40..8d26952 100644 --- a/src/Model/LgpsFund.php +++ b/src/Model/LgpsFund.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/LgpsIConnectFileType.php b/src/Model/LgpsIConnectFileType.php index b6d4ea0..274b5c9 100644 --- a/src/Model/LgpsIConnectFileType.php +++ b/src/Model/LgpsIConnectFileType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/LgpsIConnectPayrollReference.php b/src/Model/LgpsIConnectPayrollReference.php index 2cf5bf0..65bc309 100644 --- a/src/Model/LgpsIConnectPayrollReference.php +++ b/src/Model/LgpsIConnectPayrollReference.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/LgpsIConnectSalaryType.php b/src/Model/LgpsIConnectSalaryType.php index 69636e8..34eeb45 100644 --- a/src/Model/LgpsIConnectSalaryType.php +++ b/src/Model/LgpsIConnectSalaryType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/LgpsPayCategory.php b/src/Model/LgpsPayCategory.php index 1ce03b6..a2d5c45 100644 --- a/src/Model/LgpsPayCategory.php +++ b/src/Model/LgpsPayCategory.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/LinkedPiw.php b/src/Model/LinkedPiw.php index 7d6767a..3a5fc7a 100644 --- a/src/Model/LinkedPiw.php +++ b/src/Model/LinkedPiw.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,13 +60,13 @@ class LinkedPiw implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'result' => '\SynergiTech\Staffology\Model\LinkedPiwResult', - 'id' => 'string', 'averageWeeklyEarnings' => 'float', - 'workingDays' => 'float', - 'totalDays' => 'float', + 'id' => 'string', + 'result' => '\SynergiTech\Staffology\Model\LinkedPiwResult', + 'sspFirstDay' => '\DateTime', 'sspFirstPayDay' => '\DateTime', - 'sspFirstDay' => '\DateTime' + 'totalDays' => 'float', + 'workingDays' => 'float' ]; /** @@ -75,13 +75,13 @@ class LinkedPiw implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'result' => null, - 'id' => 'uuid', 'averageWeeklyEarnings' => 'double', - 'workingDays' => 'double', - 'totalDays' => 'double', + 'id' => 'uuid', + 'result' => null, + 'sspFirstDay' => 'date', 'sspFirstPayDay' => 'date', - 'sspFirstDay' => 'date' + 'totalDays' => 'double', + 'workingDays' => 'double' ]; /** @@ -90,13 +90,13 @@ class LinkedPiw implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'result' => false, - 'id' => false, 'averageWeeklyEarnings' => false, - 'workingDays' => false, - 'totalDays' => false, + 'id' => false, + 'result' => false, + 'sspFirstDay' => true, 'sspFirstPayDay' => true, - 'sspFirstDay' => true + 'totalDays' => false, + 'workingDays' => false ]; /** @@ -185,13 +185,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'result' => 'result', - 'id' => 'id', 'averageWeeklyEarnings' => 'averageWeeklyEarnings', - 'workingDays' => 'workingDays', - 'totalDays' => 'totalDays', + 'id' => 'id', + 'result' => 'result', + 'sspFirstDay' => 'sspFirstDay', 'sspFirstPayDay' => 'sspFirstPayDay', - 'sspFirstDay' => 'sspFirstDay' + 'totalDays' => 'totalDays', + 'workingDays' => 'workingDays' ]; /** @@ -200,13 +200,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'result' => 'setResult', - 'id' => 'setId', 'averageWeeklyEarnings' => 'setAverageWeeklyEarnings', - 'workingDays' => 'setWorkingDays', - 'totalDays' => 'setTotalDays', + 'id' => 'setId', + 'result' => 'setResult', + 'sspFirstDay' => 'setSspFirstDay', 'sspFirstPayDay' => 'setSspFirstPayDay', - 'sspFirstDay' => 'setSspFirstDay' + 'totalDays' => 'setTotalDays', + 'workingDays' => 'setWorkingDays' ]; /** @@ -215,13 +215,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'result' => 'getResult', - 'id' => 'getId', 'averageWeeklyEarnings' => 'getAverageWeeklyEarnings', - 'workingDays' => 'getWorkingDays', - 'totalDays' => 'getTotalDays', + 'id' => 'getId', + 'result' => 'getResult', + 'sspFirstDay' => 'getSspFirstDay', 'sspFirstPayDay' => 'getSspFirstPayDay', - 'sspFirstDay' => 'getSspFirstDay' + 'totalDays' => 'getTotalDays', + 'workingDays' => 'getWorkingDays' ]; /** @@ -280,13 +280,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('result', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('averageWeeklyEarnings', $data ?? [], null); - $this->setIfExists('workingDays', $data ?? [], null); - $this->setIfExists('totalDays', $data ?? [], null); - $this->setIfExists('sspFirstPayDay', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('result', $data ?? [], null); $this->setIfExists('sspFirstDay', $data ?? [], null); + $this->setIfExists('sspFirstPayDay', $data ?? [], null); + $this->setIfExists('totalDays', $data ?? [], null); + $this->setIfExists('workingDays', $data ?? [], null); } /** @@ -332,28 +332,28 @@ public function valid(): bool /** - * Gets result + * Gets averageWeeklyEarnings * - * @return \SynergiTech\Staffology\Model\LinkedPiwResult|null + * @return float|null */ - public function getResult(): ?\SynergiTech\Staffology\Model\LinkedPiwResult + public function getAverageWeeklyEarnings(): ?float { - return $this->container['result']; + return $this->container['averageWeeklyEarnings']; } /** - * Sets result + * Sets averageWeeklyEarnings * - * @param \SynergiTech\Staffology\Model\LinkedPiwResult|null $result result + * @param float|null $averageWeeklyEarnings [readonly] Average weekly earnings from linked Leave * * @return $this */ - public function setResult(?\SynergiTech\Staffology\Model\LinkedPiwResult $result): static + public function setAverageWeeklyEarnings(?float $averageWeeklyEarnings): static { - if (is_null($result)) { - throw new InvalidArgumentException('non-nullable result cannot be null'); + if (is_null($averageWeeklyEarnings)) { + throw new InvalidArgumentException('non-nullable averageWeeklyEarnings cannot be null'); } - $this->container['result'] = $result; + $this->container['averageWeeklyEarnings'] = $averageWeeklyEarnings; return $this; } @@ -386,82 +386,62 @@ public function setId(?string $id): static } /** - * Gets averageWeeklyEarnings - * - * @return float|null - */ - public function getAverageWeeklyEarnings(): ?float - { - return $this->container['averageWeeklyEarnings']; - } - - /** - * Sets averageWeeklyEarnings - * - * @param float|null $averageWeeklyEarnings [readonly] Average weekly earnings from linked Leave - * - * @return $this - */ - public function setAverageWeeklyEarnings(?float $averageWeeklyEarnings): static - { - if (is_null($averageWeeklyEarnings)) { - throw new InvalidArgumentException('non-nullable averageWeeklyEarnings cannot be null'); - } - $this->container['averageWeeklyEarnings'] = $averageWeeklyEarnings; - - return $this; - } - - /** - * Gets workingDays + * Gets result * - * @return float|null + * @return \SynergiTech\Staffology\Model\LinkedPiwResult|null */ - public function getWorkingDays(): ?float + public function getResult(): ?\SynergiTech\Staffology\Model\LinkedPiwResult { - return $this->container['workingDays']; + return $this->container['result']; } /** - * Sets workingDays + * Sets result * - * @param float|null $workingDays [readonly] The number of working days in the linked Leave. + * @param \SynergiTech\Staffology\Model\LinkedPiwResult|null $result result * * @return $this */ - public function setWorkingDays(?float $workingDays): static + public function setResult(?\SynergiTech\Staffology\Model\LinkedPiwResult $result): static { - if (is_null($workingDays)) { - throw new InvalidArgumentException('non-nullable workingDays cannot be null'); + if (is_null($result)) { + throw new InvalidArgumentException('non-nullable result cannot be null'); } - $this->container['workingDays'] = $workingDays; + $this->container['result'] = $result; return $this; } /** - * Gets totalDays + * Gets sspFirstDay * - * @return float|null + * @return \DateTime|null */ - public function getTotalDays(): ?float + public function getSspFirstDay(): ?\DateTime { - return $this->container['totalDays']; + return $this->container['sspFirstDay']; } /** - * Sets totalDays + * Sets sspFirstDay * - * @param float|null $totalDays [readonly] The number of days covered by the linked Leave. + * @param \DateTime|null $sspFirstDay [readonly] The SspFirstDay from the linked Leave, if set * * @return $this */ - public function setTotalDays(?float $totalDays): static + public function setSspFirstDay(?\DateTime $sspFirstDay): static { - if (is_null($totalDays)) { - throw new InvalidArgumentException('non-nullable totalDays cannot be null'); + if (is_null($sspFirstDay)) { + array_push($this->openAPINullablesSetToNull, 'sspFirstDay'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('sspFirstDay', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['totalDays'] = $totalDays; + $this->container['sspFirstDay'] = $sspFirstDay; return $this; } @@ -501,35 +481,55 @@ public function setSspFirstPayDay(?\DateTime $sspFirstPayDay): static } /** - * Gets sspFirstDay + * Gets totalDays * - * @return \DateTime|null + * @return float|null */ - public function getSspFirstDay(): ?\DateTime + public function getTotalDays(): ?float { - return $this->container['sspFirstDay']; + return $this->container['totalDays']; } /** - * Sets sspFirstDay + * Sets totalDays * - * @param \DateTime|null $sspFirstDay [readonly] The SspFirstDay from the linked Leave, if set + * @param float|null $totalDays [readonly] The number of days covered by the linked Leave. * * @return $this */ - public function setSspFirstDay(?\DateTime $sspFirstDay): static + public function setTotalDays(?float $totalDays): static { - if (is_null($sspFirstDay)) { - array_push($this->openAPINullablesSetToNull, 'sspFirstDay'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('sspFirstDay', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($totalDays)) { + throw new InvalidArgumentException('non-nullable totalDays cannot be null'); } - $this->container['sspFirstDay'] = $sspFirstDay; + $this->container['totalDays'] = $totalDays; + + return $this; + } + + /** + * Gets workingDays + * + * @return float|null + */ + public function getWorkingDays(): ?float + { + return $this->container['workingDays']; + } + + /** + * Sets workingDays + * + * @param float|null $workingDays [readonly] The number of working days in the linked Leave. + * + * @return $this + */ + public function setWorkingDays(?float $workingDays): static + { + if (is_null($workingDays)) { + throw new InvalidArgumentException('non-nullable workingDays cannot be null'); + } + $this->container['workingDays'] = $workingDays; return $this; } diff --git a/src/Model/LinkedPiwResult.php b/src/Model/LinkedPiwResult.php index 83767da..bb45b8c 100644 --- a/src/Model/LinkedPiwResult.php +++ b/src/Model/LinkedPiwResult.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/Loan.php b/src/Model/Loan.php index bc7f65a..aadb9cb 100644 --- a/src/Model/Loan.php +++ b/src/Model/Loan.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,20 +60,20 @@ class Loan implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'issueDate' => '\DateTime', - 'reference' => 'string', - 'payCode' => 'string', - 'loanAmount' => 'float', - 'periodAmount' => 'float', 'amountRepaid' => 'float', - 'previouslyPaid' => 'float', 'balance' => 'float', - 'isSettled' => 'bool', - 'isPaused' => 'bool', 'documentCount' => 'int', 'documents' => '\SynergiTech\Staffology\Model\Item[]', 'employee' => '\SynergiTech\Staffology\Model\Item', - 'id' => 'string' + 'id' => 'string', + 'isPaused' => 'bool', + 'isSettled' => 'bool', + 'issueDate' => '\DateTime', + 'loanAmount' => 'float', + 'payCode' => 'string', + 'periodAmount' => 'float', + 'previouslyPaid' => 'float', + 'reference' => 'string' ]; /** @@ -82,20 +82,20 @@ class Loan implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'issueDate' => 'date', - 'reference' => null, - 'payCode' => null, - 'loanAmount' => 'double', - 'periodAmount' => 'double', 'amountRepaid' => 'double', - 'previouslyPaid' => 'double', 'balance' => 'double', - 'isSettled' => null, - 'isPaused' => null, 'documentCount' => 'int32', 'documents' => null, 'employee' => null, - 'id' => 'uuid' + 'id' => 'uuid', + 'isPaused' => null, + 'isSettled' => null, + 'issueDate' => 'date', + 'loanAmount' => 'double', + 'payCode' => null, + 'periodAmount' => 'double', + 'previouslyPaid' => 'double', + 'reference' => null ]; /** @@ -104,20 +104,20 @@ class Loan implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'issueDate' => false, - 'reference' => true, - 'payCode' => true, - 'loanAmount' => false, - 'periodAmount' => false, 'amountRepaid' => false, - 'previouslyPaid' => false, 'balance' => false, - 'isSettled' => false, - 'isPaused' => false, 'documentCount' => false, 'documents' => true, 'employee' => false, - 'id' => false + 'id' => false, + 'isPaused' => false, + 'isSettled' => false, + 'issueDate' => false, + 'loanAmount' => false, + 'payCode' => true, + 'periodAmount' => false, + 'previouslyPaid' => false, + 'reference' => true ]; /** @@ -206,20 +206,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'issueDate' => 'issueDate', - 'reference' => 'reference', - 'payCode' => 'payCode', - 'loanAmount' => 'loanAmount', - 'periodAmount' => 'periodAmount', 'amountRepaid' => 'amountRepaid', - 'previouslyPaid' => 'previouslyPaid', 'balance' => 'balance', - 'isSettled' => 'isSettled', - 'isPaused' => 'isPaused', 'documentCount' => 'documentCount', 'documents' => 'documents', 'employee' => 'employee', - 'id' => 'id' + 'id' => 'id', + 'isPaused' => 'isPaused', + 'isSettled' => 'isSettled', + 'issueDate' => 'issueDate', + 'loanAmount' => 'loanAmount', + 'payCode' => 'payCode', + 'periodAmount' => 'periodAmount', + 'previouslyPaid' => 'previouslyPaid', + 'reference' => 'reference' ]; /** @@ -228,20 +228,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'issueDate' => 'setIssueDate', - 'reference' => 'setReference', - 'payCode' => 'setPayCode', - 'loanAmount' => 'setLoanAmount', - 'periodAmount' => 'setPeriodAmount', 'amountRepaid' => 'setAmountRepaid', - 'previouslyPaid' => 'setPreviouslyPaid', 'balance' => 'setBalance', - 'isSettled' => 'setIsSettled', - 'isPaused' => 'setIsPaused', 'documentCount' => 'setDocumentCount', 'documents' => 'setDocuments', 'employee' => 'setEmployee', - 'id' => 'setId' + 'id' => 'setId', + 'isPaused' => 'setIsPaused', + 'isSettled' => 'setIsSettled', + 'issueDate' => 'setIssueDate', + 'loanAmount' => 'setLoanAmount', + 'payCode' => 'setPayCode', + 'periodAmount' => 'setPeriodAmount', + 'previouslyPaid' => 'setPreviouslyPaid', + 'reference' => 'setReference' ]; /** @@ -250,20 +250,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'issueDate' => 'getIssueDate', - 'reference' => 'getReference', - 'payCode' => 'getPayCode', - 'loanAmount' => 'getLoanAmount', - 'periodAmount' => 'getPeriodAmount', 'amountRepaid' => 'getAmountRepaid', - 'previouslyPaid' => 'getPreviouslyPaid', 'balance' => 'getBalance', - 'isSettled' => 'getIsSettled', - 'isPaused' => 'getIsPaused', 'documentCount' => 'getDocumentCount', 'documents' => 'getDocuments', 'employee' => 'getEmployee', - 'id' => 'getId' + 'id' => 'getId', + 'isPaused' => 'getIsPaused', + 'isSettled' => 'getIsSettled', + 'issueDate' => 'getIssueDate', + 'loanAmount' => 'getLoanAmount', + 'payCode' => 'getPayCode', + 'periodAmount' => 'getPeriodAmount', + 'previouslyPaid' => 'getPreviouslyPaid', + 'reference' => 'getReference' ]; /** @@ -322,20 +322,20 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('issueDate', $data ?? [], null); - $this->setIfExists('reference', $data ?? [], null); - $this->setIfExists('payCode', $data ?? [], null); - $this->setIfExists('loanAmount', $data ?? [], null); - $this->setIfExists('periodAmount', $data ?? [], null); $this->setIfExists('amountRepaid', $data ?? [], null); - $this->setIfExists('previouslyPaid', $data ?? [], null); $this->setIfExists('balance', $data ?? [], null); - $this->setIfExists('isSettled', $data ?? [], null); - $this->setIfExists('isPaused', $data ?? [], null); $this->setIfExists('documentCount', $data ?? [], null); $this->setIfExists('documents', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isPaused', $data ?? [], null); + $this->setIfExists('isSettled', $data ?? [], null); + $this->setIfExists('issueDate', $data ?? [], null); + $this->setIfExists('loanAmount', $data ?? [], null); + $this->setIfExists('payCode', $data ?? [], null); + $this->setIfExists('periodAmount', $data ?? [], null); + $this->setIfExists('previouslyPaid', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); } /** @@ -385,404 +385,404 @@ public function valid(): bool /** - * Gets issueDate + * Gets amountRepaid * - * @return \DateTime|null + * @return float|null */ - public function getIssueDate(): ?\DateTime + public function getAmountRepaid(): ?float { - return $this->container['issueDate']; + return $this->container['amountRepaid']; } /** - * Sets issueDate + * Sets amountRepaid * - * @param \DateTime|null $issueDate The date the Loan was made + * @param float|null $amountRepaid [readonly] The amount repaid so far due to deductions in Payruns * * @return $this */ - public function setIssueDate(?\DateTime $issueDate): static + public function setAmountRepaid(?float $amountRepaid): static { - if (is_null($issueDate)) { - throw new InvalidArgumentException('non-nullable issueDate cannot be null'); + if (is_null($amountRepaid)) { + throw new InvalidArgumentException('non-nullable amountRepaid cannot be null'); } - $this->container['issueDate'] = $issueDate; + $this->container['amountRepaid'] = $amountRepaid; return $this; } /** - * Gets reference + * Gets balance * - * @return string|null + * @return float|null */ - public function getReference(): ?string + public function getBalance(): ?float { - return $this->container['reference']; + return $this->container['balance']; } /** - * Sets reference + * Sets balance * - * @param string|null $reference An optional reference for this Loan + * @param float|null $balance [readonly] The Balance of the Loan * * @return $this */ - public function setReference(?string $reference): static + public function setBalance(?float $balance): static { - if (is_null($reference)) { - array_push($this->openAPINullablesSetToNull, 'reference'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('reference', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($reference) && (mb_strlen($reference) > 100)) { - throw new InvalidArgumentException('invalid length for $reference when calling Loan., must be smaller than or equal to 100.'); + if (is_null($balance)) { + throw new InvalidArgumentException('non-nullable balance cannot be null'); } - - $this->container['reference'] = $reference; + $this->container['balance'] = $balance; return $this; } /** - * Gets payCode + * Gets documentCount * - * @return string|null + * @return int|null */ - public function getPayCode(): ?string + public function getDocumentCount(): ?int { - return $this->container['payCode']; + return $this->container['documentCount']; } /** - * Sets payCode + * Sets documentCount * - * @param string|null $payCode The Code of the PayCode used for recording payments. The PayCode must have a CalculationType of FixedAmount and not be a multiplier code + * @param int|null $documentCount [readonly] The number of attachments associated with this model * * @return $this */ - public function setPayCode(?string $payCode): static + public function setDocumentCount(?int $documentCount): static { - if (is_null($payCode)) { - array_push($this->openAPINullablesSetToNull, 'payCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($documentCount)) { + throw new InvalidArgumentException('non-nullable documentCount cannot be null'); } - $this->container['payCode'] = $payCode; + $this->container['documentCount'] = $documentCount; return $this; } /** - * Gets loanAmount + * Gets documents * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getLoanAmount(): ?float + public function getDocuments(): ?array { - return $this->container['loanAmount']; + return $this->container['documents']; } /** - * Sets loanAmount + * Sets documents * - * @param float|null $loanAmount The initial amount that the loan was for + * @param \SynergiTech\Staffology\Model\Item[]|null $documents [readonly] The attachments associated with this model * * @return $this */ - public function setLoanAmount(?float $loanAmount): static + public function setDocuments(?array $documents): static { - if (is_null($loanAmount)) { - throw new InvalidArgumentException('non-nullable loanAmount cannot be null'); + if (is_null($documents)) { + array_push($this->openAPINullablesSetToNull, 'documents'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('documents', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['loanAmount'] = $loanAmount; + $this->container['documents'] = $documents; return $this; } /** - * Gets periodAmount + * Gets employee * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getPeriodAmount(): ?float + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['periodAmount']; + return $this->container['employee']; } /** - * Sets periodAmount + * Sets employee * - * @param float|null $periodAmount The amount to deduct per PayPeriod + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setPeriodAmount(?float $periodAmount): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($periodAmount)) { - throw new InvalidArgumentException('non-nullable periodAmount cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['periodAmount'] = $periodAmount; + $this->container['employee'] = $employee; return $this; } /** - * Gets amountRepaid + * Gets id * - * @return float|null + * @return string|null */ - public function getAmountRepaid(): ?float + public function getId(): ?string { - return $this->container['amountRepaid']; + return $this->container['id']; } /** - * Sets amountRepaid + * Sets id * - * @param float|null $amountRepaid [readonly] The amount repaid so far due to deductions in Payruns + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setAmountRepaid(?float $amountRepaid): static + public function setId(?string $id): static { - if (is_null($amountRepaid)) { - throw new InvalidArgumentException('non-nullable amountRepaid cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['amountRepaid'] = $amountRepaid; + $this->container['id'] = $id; return $this; } /** - * Gets previouslyPaid + * Gets isPaused * - * @return float|null + * @return bool|null */ - public function getPreviouslyPaid(): ?float + public function getIsPaused(): ?bool { - return $this->container['previouslyPaid']; + return $this->container['isPaused']; } /** - * Sets previouslyPaid + * Sets isPaused * - * @param float|null $previouslyPaid [readonly] Any amount by which to adjust the Balance, perhaps due to repayments made elsewhere + * @param bool|null $isPaused If set to true then deductions will not be made * * @return $this */ - public function setPreviouslyPaid(?float $previouslyPaid): static + public function setIsPaused(?bool $isPaused): static { - if (is_null($previouslyPaid)) { - throw new InvalidArgumentException('non-nullable previouslyPaid cannot be null'); + if (is_null($isPaused)) { + throw new InvalidArgumentException('non-nullable isPaused cannot be null'); } - $this->container['previouslyPaid'] = $previouslyPaid; + $this->container['isPaused'] = $isPaused; return $this; } /** - * Gets balance + * Gets isSettled * - * @return float|null + * @return bool|null */ - public function getBalance(): ?float + public function getIsSettled(): ?bool { - return $this->container['balance']; + return $this->container['isSettled']; } /** - * Sets balance + * Sets isSettled * - * @param float|null $balance [readonly] The Balance of the Loan + * @param bool|null $isSettled [readonly] * * @return $this */ - public function setBalance(?float $balance): static + public function setIsSettled(?bool $isSettled): static { - if (is_null($balance)) { - throw new InvalidArgumentException('non-nullable balance cannot be null'); + if (is_null($isSettled)) { + throw new InvalidArgumentException('non-nullable isSettled cannot be null'); } - $this->container['balance'] = $balance; + $this->container['isSettled'] = $isSettled; return $this; } /** - * Gets isSettled + * Gets issueDate * - * @return bool|null + * @return \DateTime|null */ - public function getIsSettled(): ?bool + public function getIssueDate(): ?\DateTime { - return $this->container['isSettled']; + return $this->container['issueDate']; } /** - * Sets isSettled + * Sets issueDate * - * @param bool|null $isSettled [readonly] + * @param \DateTime|null $issueDate The date the Loan was made * * @return $this */ - public function setIsSettled(?bool $isSettled): static + public function setIssueDate(?\DateTime $issueDate): static { - if (is_null($isSettled)) { - throw new InvalidArgumentException('non-nullable isSettled cannot be null'); + if (is_null($issueDate)) { + throw new InvalidArgumentException('non-nullable issueDate cannot be null'); } - $this->container['isSettled'] = $isSettled; + $this->container['issueDate'] = $issueDate; return $this; } /** - * Gets isPaused + * Gets loanAmount * - * @return bool|null + * @return float|null */ - public function getIsPaused(): ?bool + public function getLoanAmount(): ?float { - return $this->container['isPaused']; + return $this->container['loanAmount']; } /** - * Sets isPaused + * Sets loanAmount * - * @param bool|null $isPaused If set to true then deductions will not be made + * @param float|null $loanAmount The initial amount that the loan was for * * @return $this */ - public function setIsPaused(?bool $isPaused): static + public function setLoanAmount(?float $loanAmount): static { - if (is_null($isPaused)) { - throw new InvalidArgumentException('non-nullable isPaused cannot be null'); + if (is_null($loanAmount)) { + throw new InvalidArgumentException('non-nullable loanAmount cannot be null'); } - $this->container['isPaused'] = $isPaused; + $this->container['loanAmount'] = $loanAmount; return $this; } /** - * Gets documentCount + * Gets payCode * - * @return int|null + * @return string|null */ - public function getDocumentCount(): ?int + public function getPayCode(): ?string { - return $this->container['documentCount']; + return $this->container['payCode']; } /** - * Sets documentCount + * Sets payCode * - * @param int|null $documentCount [readonly] The number of attachments associated with this model + * @param string|null $payCode The Code of the PayCode used for recording payments. The PayCode must have a CalculationType of FixedAmount and not be a multiplier code * * @return $this */ - public function setDocumentCount(?int $documentCount): static + public function setPayCode(?string $payCode): static { - if (is_null($documentCount)) { - throw new InvalidArgumentException('non-nullable documentCount cannot be null'); + if (is_null($payCode)) { + array_push($this->openAPINullablesSetToNull, 'payCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['documentCount'] = $documentCount; + $this->container['payCode'] = $payCode; return $this; } /** - * Gets documents + * Gets periodAmount * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return float|null */ - public function getDocuments(): ?array + public function getPeriodAmount(): ?float { - return $this->container['documents']; + return $this->container['periodAmount']; } /** - * Sets documents + * Sets periodAmount * - * @param \SynergiTech\Staffology\Model\Item[]|null $documents [readonly] The attachments associated with this model + * @param float|null $periodAmount The amount to deduct per PayPeriod * * @return $this */ - public function setDocuments(?array $documents): static + public function setPeriodAmount(?float $periodAmount): static { - if (is_null($documents)) { - array_push($this->openAPINullablesSetToNull, 'documents'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('documents', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($periodAmount)) { + throw new InvalidArgumentException('non-nullable periodAmount cannot be null'); } - $this->container['documents'] = $documents; + $this->container['periodAmount'] = $periodAmount; return $this; } /** - * Gets employee + * Gets previouslyPaid * - * @return \SynergiTech\Staffology\Model\Item|null + * @return float|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getPreviouslyPaid(): ?float { - return $this->container['employee']; + return $this->container['previouslyPaid']; } /** - * Sets employee + * Sets previouslyPaid * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param float|null $previouslyPaid [readonly] Any amount by which to adjust the Balance, perhaps due to repayments made elsewhere * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setPreviouslyPaid(?float $previouslyPaid): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($previouslyPaid)) { + throw new InvalidArgumentException('non-nullable previouslyPaid cannot be null'); } - $this->container['employee'] = $employee; + $this->container['previouslyPaid'] = $previouslyPaid; return $this; } /** - * Gets id + * Gets reference * * @return string|null */ - public function getId(): ?string + public function getReference(): ?string { - return $this->container['id']; + return $this->container['reference']; } /** - * Sets id + * Sets reference * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $reference An optional reference for this Loan * * @return $this */ - public function setId(?string $id): static + public function setReference(?string $reference): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($reference)) { + array_push($this->openAPINullablesSetToNull, 'reference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('reference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + if (!is_null($reference) && (mb_strlen($reference) > 100)) { + throw new InvalidArgumentException('invalid length for $reference when calling Loan., must be smaller than or equal to 100.'); + } + + $this->container['reference'] = $reference; return $this; } diff --git a/src/Model/LoanBalancesReport.php b/src/Model/LoanBalancesReport.php index 392c95e..244705a 100644 --- a/src/Model/LoanBalancesReport.php +++ b/src/Model/LoanBalancesReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class LoanBalancesReport implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\LoanBalancesReportLine[]', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -72,11 +72,11 @@ class LoanBalancesReport implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ + 'isDraft' => null, 'lines' => null, 'report' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -85,11 +85,11 @@ class LoanBalancesReport implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ + 'isDraft' => false, 'lines' => true, 'report' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'isDraft' => 'isDraft', 'lines' => 'lines', 'report' => 'report', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', 'report' => 'setReport', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', 'report' => 'getReport', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -316,6 +316,33 @@ public function valid(): bool } + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + /** * Gets lines * @@ -437,33 +464,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/LoanBalancesReportLine.php b/src/Model/LoanBalancesReportLine.php index e552fee..723e15b 100644 --- a/src/Model/LoanBalancesReportLine.php +++ b/src/Model/LoanBalancesReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,13 +60,13 @@ class LoanBalancesReportLine implements ModelInterface, ArrayAccess, JsonSeriali */ protected static array $openAPITypes = [ 'employeeName' => 'string', - 'payrollCode' => 'string', 'issueDate' => '\DateTime', - 'reference' => 'string', - 'payCode' => 'string', 'loanAmount' => 'float', + 'outstandingBalance' => 'float', 'paidAmount' => 'float', - 'outstandingBalance' => 'float' + 'payCode' => 'string', + 'payrollCode' => 'string', + 'reference' => 'string' ]; /** @@ -76,13 +76,13 @@ class LoanBalancesReportLine implements ModelInterface, ArrayAccess, JsonSeriali */ protected static array $openAPIFormats = [ 'employeeName' => null, - 'payrollCode' => null, 'issueDate' => 'date', - 'reference' => null, - 'payCode' => null, 'loanAmount' => 'double', + 'outstandingBalance' => 'double', 'paidAmount' => 'double', - 'outstandingBalance' => 'double' + 'payCode' => null, + 'payrollCode' => null, + 'reference' => null ]; /** @@ -92,13 +92,13 @@ class LoanBalancesReportLine implements ModelInterface, ArrayAccess, JsonSeriali */ protected static array $openAPINullables = [ 'employeeName' => true, - 'payrollCode' => true, 'issueDate' => false, - 'reference' => true, - 'payCode' => true, 'loanAmount' => false, + 'outstandingBalance' => false, 'paidAmount' => false, - 'outstandingBalance' => false + 'payCode' => true, + 'payrollCode' => true, + 'reference' => true ]; /** @@ -188,13 +188,13 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'employeeName' => 'employeeName', - 'payrollCode' => 'payrollCode', 'issueDate' => 'issueDate', - 'reference' => 'reference', - 'payCode' => 'payCode', 'loanAmount' => 'loanAmount', + 'outstandingBalance' => 'outstandingBalance', 'paidAmount' => 'paidAmount', - 'outstandingBalance' => 'outstandingBalance' + 'payCode' => 'payCode', + 'payrollCode' => 'payrollCode', + 'reference' => 'reference' ]; /** @@ -204,13 +204,13 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'employeeName' => 'setEmployeeName', - 'payrollCode' => 'setPayrollCode', 'issueDate' => 'setIssueDate', - 'reference' => 'setReference', - 'payCode' => 'setPayCode', 'loanAmount' => 'setLoanAmount', + 'outstandingBalance' => 'setOutstandingBalance', 'paidAmount' => 'setPaidAmount', - 'outstandingBalance' => 'setOutstandingBalance' + 'payCode' => 'setPayCode', + 'payrollCode' => 'setPayrollCode', + 'reference' => 'setReference' ]; /** @@ -220,13 +220,13 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'employeeName' => 'getEmployeeName', - 'payrollCode' => 'getPayrollCode', 'issueDate' => 'getIssueDate', - 'reference' => 'getReference', - 'payCode' => 'getPayCode', 'loanAmount' => 'getLoanAmount', + 'outstandingBalance' => 'getOutstandingBalance', 'paidAmount' => 'getPaidAmount', - 'outstandingBalance' => 'getOutstandingBalance' + 'payCode' => 'getPayCode', + 'payrollCode' => 'getPayrollCode', + 'reference' => 'getReference' ]; /** @@ -286,13 +286,13 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('employeeName', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('issueDate', $data ?? [], null); - $this->setIfExists('reference', $data ?? [], null); - $this->setIfExists('payCode', $data ?? [], null); $this->setIfExists('loanAmount', $data ?? [], null); - $this->setIfExists('paidAmount', $data ?? [], null); $this->setIfExists('outstandingBalance', $data ?? [], null); + $this->setIfExists('paidAmount', $data ?? [], null); + $this->setIfExists('payCode', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); } /** @@ -372,211 +372,211 @@ public function setEmployeeName(?string $employeeName): static } /** - * Gets payrollCode + * Gets issueDate * - * @return string|null + * @return \DateTime|null */ - public function getPayrollCode(): ?string + public function getIssueDate(): ?\DateTime { - return $this->container['payrollCode']; + return $this->container['issueDate']; } /** - * Sets payrollCode + * Sets issueDate * - * @param string|null $payrollCode payrollCode + * @param \DateTime|null $issueDate issueDate * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setIssueDate(?\DateTime $issueDate): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($issueDate)) { + throw new InvalidArgumentException('non-nullable issueDate cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['issueDate'] = $issueDate; return $this; } /** - * Gets issueDate + * Gets loanAmount * - * @return \DateTime|null + * @return float|null */ - public function getIssueDate(): ?\DateTime + public function getLoanAmount(): ?float { - return $this->container['issueDate']; + return $this->container['loanAmount']; } /** - * Sets issueDate + * Sets loanAmount * - * @param \DateTime|null $issueDate issueDate + * @param float|null $loanAmount loanAmount * * @return $this */ - public function setIssueDate(?\DateTime $issueDate): static + public function setLoanAmount(?float $loanAmount): static { - if (is_null($issueDate)) { - throw new InvalidArgumentException('non-nullable issueDate cannot be null'); + if (is_null($loanAmount)) { + throw new InvalidArgumentException('non-nullable loanAmount cannot be null'); } - $this->container['issueDate'] = $issueDate; + $this->container['loanAmount'] = $loanAmount; return $this; } /** - * Gets reference + * Gets outstandingBalance * - * @return string|null + * @return float|null */ - public function getReference(): ?string + public function getOutstandingBalance(): ?float { - return $this->container['reference']; + return $this->container['outstandingBalance']; } /** - * Sets reference + * Sets outstandingBalance * - * @param string|null $reference reference + * @param float|null $outstandingBalance outstandingBalance * * @return $this */ - public function setReference(?string $reference): static + public function setOutstandingBalance(?float $outstandingBalance): static { - if (is_null($reference)) { - array_push($this->openAPINullablesSetToNull, 'reference'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('reference', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($outstandingBalance)) { + throw new InvalidArgumentException('non-nullable outstandingBalance cannot be null'); } - $this->container['reference'] = $reference; + $this->container['outstandingBalance'] = $outstandingBalance; return $this; } /** - * Gets payCode + * Gets paidAmount * - * @return string|null + * @return float|null */ - public function getPayCode(): ?string + public function getPaidAmount(): ?float { - return $this->container['payCode']; + return $this->container['paidAmount']; } /** - * Sets payCode + * Sets paidAmount * - * @param string|null $payCode payCode + * @param float|null $paidAmount paidAmount * * @return $this */ - public function setPayCode(?string $payCode): static + public function setPaidAmount(?float $paidAmount): static { - if (is_null($payCode)) { - array_push($this->openAPINullablesSetToNull, 'payCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($paidAmount)) { + throw new InvalidArgumentException('non-nullable paidAmount cannot be null'); } - $this->container['payCode'] = $payCode; + $this->container['paidAmount'] = $paidAmount; return $this; } /** - * Gets loanAmount + * Gets payCode * - * @return float|null + * @return string|null */ - public function getLoanAmount(): ?float + public function getPayCode(): ?string { - return $this->container['loanAmount']; + return $this->container['payCode']; } /** - * Sets loanAmount + * Sets payCode * - * @param float|null $loanAmount loanAmount + * @param string|null $payCode payCode * * @return $this */ - public function setLoanAmount(?float $loanAmount): static + public function setPayCode(?string $payCode): static { - if (is_null($loanAmount)) { - throw new InvalidArgumentException('non-nullable loanAmount cannot be null'); + if (is_null($payCode)) { + array_push($this->openAPINullablesSetToNull, 'payCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['loanAmount'] = $loanAmount; + $this->container['payCode'] = $payCode; return $this; } /** - * Gets paidAmount + * Gets payrollCode * - * @return float|null + * @return string|null */ - public function getPaidAmount(): ?float + public function getPayrollCode(): ?string { - return $this->container['paidAmount']; + return $this->container['payrollCode']; } /** - * Sets paidAmount + * Sets payrollCode * - * @param float|null $paidAmount paidAmount + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setPaidAmount(?float $paidAmount): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($paidAmount)) { - throw new InvalidArgumentException('non-nullable paidAmount cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['paidAmount'] = $paidAmount; + $this->container['payrollCode'] = $payrollCode; return $this; } /** - * Gets outstandingBalance + * Gets reference * - * @return float|null + * @return string|null */ - public function getOutstandingBalance(): ?float + public function getReference(): ?string { - return $this->container['outstandingBalance']; + return $this->container['reference']; } /** - * Sets outstandingBalance + * Sets reference * - * @param float|null $outstandingBalance outstandingBalance + * @param string|null $reference reference * * @return $this */ - public function setOutstandingBalance(?float $outstandingBalance): static + public function setReference(?string $reference): static { - if (is_null($outstandingBalance)) { - throw new InvalidArgumentException('non-nullable outstandingBalance cannot be null'); + if (is_null($reference)) { + array_push($this->openAPINullablesSetToNull, 'reference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('reference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['outstandingBalance'] = $outstandingBalance; + $this->container['reference'] = $reference; return $this; } diff --git a/src/Model/LoanBalancesReportReportResponse.php b/src/Model/LoanBalancesReportReportResponse.php index bc31cbb..2e6089e 100644 --- a/src/Model/LoanBalancesReportReportResponse.php +++ b/src/Model/LoanBalancesReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class LoanBalancesReportReportResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\LoanBalancesReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class LoanBalancesReportReportResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class LoanBalancesReportReportResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/LoanCharge.php b/src/Model/LoanCharge.php index 9b4bada..6848919 100644 --- a/src/Model/LoanCharge.php +++ b/src/Model/LoanCharge.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class LoanCharge implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'threshhold' => 'float', - 'officialInterestRate' => 'float' + 'officialInterestRate' => 'float', + 'threshhold' => 'float' ]; /** @@ -70,8 +70,8 @@ class LoanCharge implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'threshhold' => 'double', - 'officialInterestRate' => 'double' + 'officialInterestRate' => 'double', + 'threshhold' => 'double' ]; /** @@ -80,8 +80,8 @@ class LoanCharge implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'threshhold' => false, - 'officialInterestRate' => false + 'officialInterestRate' => false, + 'threshhold' => false ]; /** @@ -170,8 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'threshhold' => 'threshhold', - 'officialInterestRate' => 'officialInterestRate' + 'officialInterestRate' => 'officialInterestRate', + 'threshhold' => 'threshhold' ]; /** @@ -180,8 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'threshhold' => 'setThreshhold', - 'officialInterestRate' => 'setOfficialInterestRate' + 'officialInterestRate' => 'setOfficialInterestRate', + 'threshhold' => 'setThreshhold' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'threshhold' => 'getThreshhold', - 'officialInterestRate' => 'getOfficialInterestRate' + 'officialInterestRate' => 'getOfficialInterestRate', + 'threshhold' => 'getThreshhold' ]; /** @@ -250,8 +250,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('threshhold', $data ?? [], null); $this->setIfExists('officialInterestRate', $data ?? [], null); + $this->setIfExists('threshhold', $data ?? [], null); } /** @@ -297,55 +297,55 @@ public function valid(): bool /** - * Gets threshhold + * Gets officialInterestRate * * @return float|null */ - public function getThreshhold(): ?float + public function getOfficialInterestRate(): ?float { - return $this->container['threshhold']; + return $this->container['officialInterestRate']; } /** - * Sets threshhold + * Sets officialInterestRate * - * @param float|null $threshhold threshhold + * @param float|null $officialInterestRate officialInterestRate * * @return $this */ - public function setThreshhold(?float $threshhold): static + public function setOfficialInterestRate(?float $officialInterestRate): static { - if (is_null($threshhold)) { - throw new InvalidArgumentException('non-nullable threshhold cannot be null'); + if (is_null($officialInterestRate)) { + throw new InvalidArgumentException('non-nullable officialInterestRate cannot be null'); } - $this->container['threshhold'] = $threshhold; + $this->container['officialInterestRate'] = $officialInterestRate; return $this; } /** - * Gets officialInterestRate + * Gets threshhold * * @return float|null */ - public function getOfficialInterestRate(): ?float + public function getThreshhold(): ?float { - return $this->container['officialInterestRate']; + return $this->container['threshhold']; } /** - * Sets officialInterestRate + * Sets threshhold * - * @param float|null $officialInterestRate officialInterestRate + * @param float|null $threshhold threshhold * * @return $this */ - public function setOfficialInterestRate(?float $officialInterestRate): static + public function setThreshhold(?float $threshhold): static { - if (is_null($officialInterestRate)) { - throw new InvalidArgumentException('non-nullable officialInterestRate cannot be null'); + if (is_null($threshhold)) { + throw new InvalidArgumentException('non-nullable threshhold cannot be null'); } - $this->container['officialInterestRate'] = $officialInterestRate; + $this->container['threshhold'] = $threshhold; return $this; } diff --git a/src/Model/LogEntry.php b/src/Model/LogEntry.php index f4b592b..9e394ea 100644 --- a/src/Model/LogEntry.php +++ b/src/Model/LogEntry.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/LondonAllowance.php b/src/Model/LondonAllowance.php index 7a45f2f..37dbab4 100644 --- a/src/Model/LondonAllowance.php +++ b/src/Model/LondonAllowance.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class LondonAllowance implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'id' => 'string', + 'paySpineId' => 'int', 'type' => '\SynergiTech\Staffology\Model\LondonAllowanceType', - 'valueType' => '\SynergiTech\Staffology\Model\LondonAllowanceValueType', 'value' => 'float', - 'paySpineId' => 'int', - 'id' => 'string' + 'valueType' => '\SynergiTech\Staffology\Model\LondonAllowanceValueType' ]; /** @@ -72,11 +72,11 @@ class LondonAllowance implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'id' => 'uuid', + 'paySpineId' => 'int32', 'type' => null, - 'valueType' => null, 'value' => 'double', - 'paySpineId' => 'int32', - 'id' => 'uuid' + 'valueType' => null ]; /** @@ -85,11 +85,11 @@ class LondonAllowance implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'id' => false, + 'paySpineId' => false, 'type' => false, - 'valueType' => false, 'value' => false, - 'paySpineId' => false, - 'id' => false + 'valueType' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'id' => 'id', + 'paySpineId' => 'paySpineId', 'type' => 'type', - 'valueType' => 'valueType', 'value' => 'value', - 'paySpineId' => 'paySpineId', - 'id' => 'id' + 'valueType' => 'valueType' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'id' => 'setId', + 'paySpineId' => 'setPaySpineId', 'type' => 'setType', - 'valueType' => 'setValueType', 'value' => 'setValue', - 'paySpineId' => 'setPaySpineId', - 'id' => 'setId' + 'valueType' => 'setValueType' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'id' => 'getId', + 'paySpineId' => 'getPaySpineId', 'type' => 'getType', - 'valueType' => 'getValueType', 'value' => 'getValue', - 'paySpineId' => 'getPaySpineId', - 'id' => 'getId' + 'valueType' => 'getValueType' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('paySpineId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('valueType', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); - $this->setIfExists('paySpineId', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('valueType', $data ?? [], null); } /** @@ -320,136 +320,136 @@ public function valid(): bool /** - * Gets type + * Gets id * - * @return \SynergiTech\Staffology\Model\LondonAllowanceType|null + * @return string|null */ - public function getType(): ?\SynergiTech\Staffology\Model\LondonAllowanceType + public function getId(): ?string { - return $this->container['type']; + return $this->container['id']; } /** - * Sets type + * Sets id * - * @param \SynergiTech\Staffology\Model\LondonAllowanceType|null $type type + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\LondonAllowanceType $type): static + public function setId(?string $id): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['type'] = $type; + $this->container['id'] = $id; return $this; } /** - * Gets valueType + * Gets paySpineId * - * @return \SynergiTech\Staffology\Model\LondonAllowanceValueType|null + * @return int */ - public function getValueType(): ?\SynergiTech\Staffology\Model\LondonAllowanceValueType + public function getPaySpineId(): int { - return $this->container['valueType']; + return $this->container['paySpineId']; } /** - * Sets valueType + * Sets paySpineId * - * @param \SynergiTech\Staffology\Model\LondonAllowanceValueType|null $valueType valueType + * @param int $paySpineId foreign key with pay spine table * * @return $this */ - public function setValueType(?\SynergiTech\Staffology\Model\LondonAllowanceValueType $valueType): static + public function setPaySpineId(int $paySpineId): static { - if (is_null($valueType)) { - throw new InvalidArgumentException('non-nullable valueType cannot be null'); + if (is_null($paySpineId)) { + throw new InvalidArgumentException('non-nullable paySpineId cannot be null'); } - $this->container['valueType'] = $valueType; + $this->container['paySpineId'] = $paySpineId; return $this; } /** - * Gets value + * Gets type * - * @return float|null + * @return \SynergiTech\Staffology\Model\LondonAllowanceType|null */ - public function getValue(): ?float + public function getType(): ?\SynergiTech\Staffology\Model\LondonAllowanceType { - return $this->container['value']; + return $this->container['type']; } /** - * Sets value + * Sets type * - * @param float|null $value Value of London Allowance + * @param \SynergiTech\Staffology\Model\LondonAllowanceType|null $type type * * @return $this */ - public function setValue(?float $value): static + public function setType(?\SynergiTech\Staffology\Model\LondonAllowanceType $type): static { - if (is_null($value)) { - throw new InvalidArgumentException('non-nullable value cannot be null'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['value'] = $value; + $this->container['type'] = $type; return $this; } /** - * Gets paySpineId + * Gets value * - * @return int + * @return float|null */ - public function getPaySpineId(): int + public function getValue(): ?float { - return $this->container['paySpineId']; + return $this->container['value']; } /** - * Sets paySpineId + * Sets value * - * @param int $paySpineId foreign key with pay spine table + * @param float|null $value Value of London Allowance * * @return $this */ - public function setPaySpineId(int $paySpineId): static + public function setValue(?float $value): static { - if (is_null($paySpineId)) { - throw new InvalidArgumentException('non-nullable paySpineId cannot be null'); + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); } - $this->container['paySpineId'] = $paySpineId; + $this->container['value'] = $value; return $this; } /** - * Gets id + * Gets valueType * - * @return string|null + * @return \SynergiTech\Staffology\Model\LondonAllowanceValueType|null */ - public function getId(): ?string + public function getValueType(): ?\SynergiTech\Staffology\Model\LondonAllowanceValueType { - return $this->container['id']; + return $this->container['valueType']; } /** - * Sets id + * Sets valueType * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\LondonAllowanceValueType|null $valueType valueType * * @return $this */ - public function setId(?string $id): static + public function setValueType(?\SynergiTech\Staffology\Model\LondonAllowanceValueType $valueType): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($valueType)) { + throw new InvalidArgumentException('non-nullable valueType cannot be null'); } - $this->container['id'] = $id; + $this->container['valueType'] = $valueType; return $this; } diff --git a/src/Model/LondonAllowanceType.php b/src/Model/LondonAllowanceType.php index 7193ef0..bf66df1 100644 --- a/src/Model/LondonAllowanceType.php +++ b/src/Model/LondonAllowanceType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/LondonAllowanceValueType.php b/src/Model/LondonAllowanceValueType.php index 3c2b342..bf4370d 100644 --- a/src/Model/LondonAllowanceValueType.php +++ b/src/Model/LondonAllowanceValueType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/MailSettings.php b/src/Model/MailSettings.php index befb28d..a704497 100644 --- a/src/Model/MailSettings.php +++ b/src/Model/MailSettings.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,15 +60,15 @@ class MailSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'senderName' => 'string', + 'customiseHtmlEmailSettings' => 'bool', + 'customiseSmtpSettings' => 'bool', + 'htmlEmailSettings' => '\SynergiTech\Staffology\Model\HtmlEmailSettings', + 'id' => 'string', 'senderEmail' => 'string', - 'useSystemFromAddress' => 'bool', 'senderEmailVerified' => 'bool', - 'customiseSmtpSettings' => 'bool', + 'senderName' => 'string', 'smtpSettings' => '\SynergiTech\Staffology\Model\SmtpSettings', - 'customiseHtmlEmailSettings' => 'bool', - 'htmlEmailSettings' => '\SynergiTech\Staffology\Model\HtmlEmailSettings', - 'id' => 'string' + 'useSystemFromAddress' => 'bool' ]; /** @@ -77,15 +77,15 @@ class MailSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'senderName' => null, + 'customiseHtmlEmailSettings' => null, + 'customiseSmtpSettings' => null, + 'htmlEmailSettings' => null, + 'id' => 'uuid', 'senderEmail' => 'email', - 'useSystemFromAddress' => null, 'senderEmailVerified' => null, - 'customiseSmtpSettings' => null, + 'senderName' => null, 'smtpSettings' => null, - 'customiseHtmlEmailSettings' => null, - 'htmlEmailSettings' => null, - 'id' => 'uuid' + 'useSystemFromAddress' => null ]; /** @@ -94,15 +94,15 @@ class MailSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'senderName' => false, + 'customiseHtmlEmailSettings' => false, + 'customiseSmtpSettings' => false, + 'htmlEmailSettings' => false, + 'id' => false, 'senderEmail' => false, - 'useSystemFromAddress' => false, 'senderEmailVerified' => false, - 'customiseSmtpSettings' => false, + 'senderName' => false, 'smtpSettings' => false, - 'customiseHtmlEmailSettings' => false, - 'htmlEmailSettings' => false, - 'id' => false + 'useSystemFromAddress' => false ]; /** @@ -191,15 +191,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'senderName' => 'senderName', + 'customiseHtmlEmailSettings' => 'customiseHtmlEmailSettings', + 'customiseSmtpSettings' => 'customiseSmtpSettings', + 'htmlEmailSettings' => 'htmlEmailSettings', + 'id' => 'id', 'senderEmail' => 'senderEmail', - 'useSystemFromAddress' => 'useSystemFromAddress', 'senderEmailVerified' => 'senderEmailVerified', - 'customiseSmtpSettings' => 'customiseSmtpSettings', + 'senderName' => 'senderName', 'smtpSettings' => 'smtpSettings', - 'customiseHtmlEmailSettings' => 'customiseHtmlEmailSettings', - 'htmlEmailSettings' => 'htmlEmailSettings', - 'id' => 'id' + 'useSystemFromAddress' => 'useSystemFromAddress' ]; /** @@ -208,15 +208,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'senderName' => 'setSenderName', + 'customiseHtmlEmailSettings' => 'setCustomiseHtmlEmailSettings', + 'customiseSmtpSettings' => 'setCustomiseSmtpSettings', + 'htmlEmailSettings' => 'setHtmlEmailSettings', + 'id' => 'setId', 'senderEmail' => 'setSenderEmail', - 'useSystemFromAddress' => 'setUseSystemFromAddress', 'senderEmailVerified' => 'setSenderEmailVerified', - 'customiseSmtpSettings' => 'setCustomiseSmtpSettings', + 'senderName' => 'setSenderName', 'smtpSettings' => 'setSmtpSettings', - 'customiseHtmlEmailSettings' => 'setCustomiseHtmlEmailSettings', - 'htmlEmailSettings' => 'setHtmlEmailSettings', - 'id' => 'setId' + 'useSystemFromAddress' => 'setUseSystemFromAddress' ]; /** @@ -225,15 +225,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'senderName' => 'getSenderName', + 'customiseHtmlEmailSettings' => 'getCustomiseHtmlEmailSettings', + 'customiseSmtpSettings' => 'getCustomiseSmtpSettings', + 'htmlEmailSettings' => 'getHtmlEmailSettings', + 'id' => 'getId', 'senderEmail' => 'getSenderEmail', - 'useSystemFromAddress' => 'getUseSystemFromAddress', 'senderEmailVerified' => 'getSenderEmailVerified', - 'customiseSmtpSettings' => 'getCustomiseSmtpSettings', + 'senderName' => 'getSenderName', 'smtpSettings' => 'getSmtpSettings', - 'customiseHtmlEmailSettings' => 'getCustomiseHtmlEmailSettings', - 'htmlEmailSettings' => 'getHtmlEmailSettings', - 'id' => 'getId' + 'useSystemFromAddress' => 'getUseSystemFromAddress' ]; /** @@ -292,15 +292,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('senderName', $data ?? [], null); - $this->setIfExists('senderEmail', $data ?? [], null); - $this->setIfExists('useSystemFromAddress', $data ?? [], null); - $this->setIfExists('senderEmailVerified', $data ?? [], null); - $this->setIfExists('customiseSmtpSettings', $data ?? [], null); - $this->setIfExists('smtpSettings', $data ?? [], null); $this->setIfExists('customiseHtmlEmailSettings', $data ?? [], null); + $this->setIfExists('customiseSmtpSettings', $data ?? [], null); $this->setIfExists('htmlEmailSettings', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('senderEmail', $data ?? [], null); + $this->setIfExists('senderEmailVerified', $data ?? [], null); + $this->setIfExists('senderName', $data ?? [], null); + $this->setIfExists('smtpSettings', $data ?? [], null); + $this->setIfExists('useSystemFromAddress', $data ?? [], null); } /** @@ -330,17 +330,12 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['senderName'] === null) { - $invalidProperties[] = "'senderName' can't be null"; - } - if ((mb_strlen($this->container['senderName']) > 100)) { - $invalidProperties[] = "invalid value for 'senderName', the character length must be smaller than or equal to 100."; + if ($this->container['customiseHtmlEmailSettings'] === null) { + $invalidProperties[] = "'customiseHtmlEmailSettings' can't be null"; } - - if ((mb_strlen($this->container['senderName']) < 1)) { - $invalidProperties[] = "invalid value for 'senderName', the character length must be bigger than or equal to 1."; + if ($this->container['customiseSmtpSettings'] === null) { + $invalidProperties[] = "'customiseSmtpSettings' can't be null"; } - if ($this->container['senderEmail'] === null) { $invalidProperties[] = "'senderEmail' can't be null"; } @@ -352,12 +347,17 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'senderEmail', the character length must be bigger than or equal to 1."; } - if ($this->container['customiseSmtpSettings'] === null) { - $invalidProperties[] = "'customiseSmtpSettings' can't be null"; + if ($this->container['senderName'] === null) { + $invalidProperties[] = "'senderName' can't be null"; } - if ($this->container['customiseHtmlEmailSettings'] === null) { - $invalidProperties[] = "'customiseHtmlEmailSettings' can't be null"; + if ((mb_strlen($this->container['senderName']) > 100)) { + $invalidProperties[] = "invalid value for 'senderName', the character length must be smaller than or equal to 100."; } + + if ((mb_strlen($this->container['senderName']) < 1)) { + $invalidProperties[] = "invalid value for 'senderName', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -374,258 +374,258 @@ public function valid(): bool /** - * Gets senderName + * Gets customiseHtmlEmailSettings * - * @return string + * @return bool */ - public function getSenderName(): string + public function getCustomiseHtmlEmailSettings(): bool { - return $this->container['senderName']; + return $this->container['customiseHtmlEmailSettings']; } /** - * Sets senderName + * Sets customiseHtmlEmailSettings * - * @param string $senderName senderName + * @param bool $customiseHtmlEmailSettings customiseHtmlEmailSettings * * @return $this */ - public function setSenderName(string $senderName): static + public function setCustomiseHtmlEmailSettings(bool $customiseHtmlEmailSettings): static { - if (is_null($senderName)) { - throw new InvalidArgumentException('non-nullable senderName cannot be null'); - } - if ((mb_strlen($senderName) > 100)) { - throw new InvalidArgumentException('invalid length for $senderName when calling MailSettings., must be smaller than or equal to 100.'); - } - if ((mb_strlen($senderName) < 1)) { - throw new InvalidArgumentException('invalid length for $senderName when calling MailSettings., must be bigger than or equal to 1.'); + if (is_null($customiseHtmlEmailSettings)) { + throw new InvalidArgumentException('non-nullable customiseHtmlEmailSettings cannot be null'); } - - $this->container['senderName'] = $senderName; + $this->container['customiseHtmlEmailSettings'] = $customiseHtmlEmailSettings; return $this; } /** - * Gets senderEmail + * Gets customiseSmtpSettings * - * @return string + * @return bool */ - public function getSenderEmail(): string + public function getCustomiseSmtpSettings(): bool { - return $this->container['senderEmail']; + return $this->container['customiseSmtpSettings']; } /** - * Sets senderEmail + * Sets customiseSmtpSettings * - * @param string $senderEmail senderEmail + * @param bool $customiseSmtpSettings customiseSmtpSettings * * @return $this */ - public function setSenderEmail(string $senderEmail): static + public function setCustomiseSmtpSettings(bool $customiseSmtpSettings): static { - if (is_null($senderEmail)) { - throw new InvalidArgumentException('non-nullable senderEmail cannot be null'); - } - if ((mb_strlen($senderEmail) > 100)) { - throw new InvalidArgumentException('invalid length for $senderEmail when calling MailSettings., must be smaller than or equal to 100.'); - } - if ((mb_strlen($senderEmail) < 1)) { - throw new InvalidArgumentException('invalid length for $senderEmail when calling MailSettings., must be bigger than or equal to 1.'); + if (is_null($customiseSmtpSettings)) { + throw new InvalidArgumentException('non-nullable customiseSmtpSettings cannot be null'); } - - $this->container['senderEmail'] = $senderEmail; + $this->container['customiseSmtpSettings'] = $customiseSmtpSettings; return $this; } /** - * Gets useSystemFromAddress + * Gets htmlEmailSettings * - * @return bool|null + * @return \SynergiTech\Staffology\Model\HtmlEmailSettings|null */ - public function getUseSystemFromAddress(): ?bool + public function getHtmlEmailSettings(): ?\SynergiTech\Staffology\Model\HtmlEmailSettings { - return $this->container['useSystemFromAddress']; + return $this->container['htmlEmailSettings']; } /** - * Sets useSystemFromAddress + * Sets htmlEmailSettings * - * @param bool|null $useSystemFromAddress If set to true then the SenderEmail provided will only be used in the ReplyTo fields. The system defaults will be used for the From address. + * @param \SynergiTech\Staffology\Model\HtmlEmailSettings|null $htmlEmailSettings htmlEmailSettings * * @return $this */ - public function setUseSystemFromAddress(?bool $useSystemFromAddress): static + public function setHtmlEmailSettings(?\SynergiTech\Staffology\Model\HtmlEmailSettings $htmlEmailSettings): static { - if (is_null($useSystemFromAddress)) { - throw new InvalidArgumentException('non-nullable useSystemFromAddress cannot be null'); + if (is_null($htmlEmailSettings)) { + throw new InvalidArgumentException('non-nullable htmlEmailSettings cannot be null'); } - $this->container['useSystemFromAddress'] = $useSystemFromAddress; + $this->container['htmlEmailSettings'] = $htmlEmailSettings; return $this; } /** - * Gets senderEmailVerified + * Gets id * - * @return bool|null + * @return string|null */ - public function getSenderEmailVerified(): ?bool + public function getId(): ?string { - return $this->container['senderEmailVerified']; + return $this->container['id']; } /** - * Sets senderEmailVerified + * Sets id * - * @param bool|null $senderEmailVerified [readonly] The SenderEmail must be verified before you can send email using that address + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setSenderEmailVerified(?bool $senderEmailVerified): static + public function setId(?string $id): static { - if (is_null($senderEmailVerified)) { - throw new InvalidArgumentException('non-nullable senderEmailVerified cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['senderEmailVerified'] = $senderEmailVerified; + $this->container['id'] = $id; return $this; } /** - * Gets customiseSmtpSettings + * Gets senderEmail * - * @return bool + * @return string */ - public function getCustomiseSmtpSettings(): bool + public function getSenderEmail(): string { - return $this->container['customiseSmtpSettings']; + return $this->container['senderEmail']; } /** - * Sets customiseSmtpSettings + * Sets senderEmail * - * @param bool $customiseSmtpSettings customiseSmtpSettings + * @param string $senderEmail senderEmail * * @return $this */ - public function setCustomiseSmtpSettings(bool $customiseSmtpSettings): static + public function setSenderEmail(string $senderEmail): static { - if (is_null($customiseSmtpSettings)) { - throw new InvalidArgumentException('non-nullable customiseSmtpSettings cannot be null'); + if (is_null($senderEmail)) { + throw new InvalidArgumentException('non-nullable senderEmail cannot be null'); + } + if ((mb_strlen($senderEmail) > 100)) { + throw new InvalidArgumentException('invalid length for $senderEmail when calling MailSettings., must be smaller than or equal to 100.'); + } + if ((mb_strlen($senderEmail) < 1)) { + throw new InvalidArgumentException('invalid length for $senderEmail when calling MailSettings., must be bigger than or equal to 1.'); } - $this->container['customiseSmtpSettings'] = $customiseSmtpSettings; + + $this->container['senderEmail'] = $senderEmail; return $this; } /** - * Gets smtpSettings + * Gets senderEmailVerified * - * @return \SynergiTech\Staffology\Model\SmtpSettings|null + * @return bool|null */ - public function getSmtpSettings(): ?\SynergiTech\Staffology\Model\SmtpSettings + public function getSenderEmailVerified(): ?bool { - return $this->container['smtpSettings']; + return $this->container['senderEmailVerified']; } /** - * Sets smtpSettings + * Sets senderEmailVerified * - * @param \SynergiTech\Staffology\Model\SmtpSettings|null $smtpSettings smtpSettings + * @param bool|null $senderEmailVerified [readonly] The SenderEmail must be verified before you can send email using that address * * @return $this */ - public function setSmtpSettings(?\SynergiTech\Staffology\Model\SmtpSettings $smtpSettings): static + public function setSenderEmailVerified(?bool $senderEmailVerified): static { - if (is_null($smtpSettings)) { - throw new InvalidArgumentException('non-nullable smtpSettings cannot be null'); + if (is_null($senderEmailVerified)) { + throw new InvalidArgumentException('non-nullable senderEmailVerified cannot be null'); } - $this->container['smtpSettings'] = $smtpSettings; + $this->container['senderEmailVerified'] = $senderEmailVerified; return $this; } /** - * Gets customiseHtmlEmailSettings + * Gets senderName * - * @return bool + * @return string */ - public function getCustomiseHtmlEmailSettings(): bool + public function getSenderName(): string { - return $this->container['customiseHtmlEmailSettings']; + return $this->container['senderName']; } /** - * Sets customiseHtmlEmailSettings + * Sets senderName * - * @param bool $customiseHtmlEmailSettings customiseHtmlEmailSettings + * @param string $senderName senderName * * @return $this */ - public function setCustomiseHtmlEmailSettings(bool $customiseHtmlEmailSettings): static + public function setSenderName(string $senderName): static { - if (is_null($customiseHtmlEmailSettings)) { - throw new InvalidArgumentException('non-nullable customiseHtmlEmailSettings cannot be null'); + if (is_null($senderName)) { + throw new InvalidArgumentException('non-nullable senderName cannot be null'); } - $this->container['customiseHtmlEmailSettings'] = $customiseHtmlEmailSettings; + if ((mb_strlen($senderName) > 100)) { + throw new InvalidArgumentException('invalid length for $senderName when calling MailSettings., must be smaller than or equal to 100.'); + } + if ((mb_strlen($senderName) < 1)) { + throw new InvalidArgumentException('invalid length for $senderName when calling MailSettings., must be bigger than or equal to 1.'); + } + + $this->container['senderName'] = $senderName; return $this; } /** - * Gets htmlEmailSettings + * Gets smtpSettings * - * @return \SynergiTech\Staffology\Model\HtmlEmailSettings|null + * @return \SynergiTech\Staffology\Model\SmtpSettings|null */ - public function getHtmlEmailSettings(): ?\SynergiTech\Staffology\Model\HtmlEmailSettings + public function getSmtpSettings(): ?\SynergiTech\Staffology\Model\SmtpSettings { - return $this->container['htmlEmailSettings']; + return $this->container['smtpSettings']; } /** - * Sets htmlEmailSettings + * Sets smtpSettings * - * @param \SynergiTech\Staffology\Model\HtmlEmailSettings|null $htmlEmailSettings htmlEmailSettings + * @param \SynergiTech\Staffology\Model\SmtpSettings|null $smtpSettings smtpSettings * * @return $this */ - public function setHtmlEmailSettings(?\SynergiTech\Staffology\Model\HtmlEmailSettings $htmlEmailSettings): static + public function setSmtpSettings(?\SynergiTech\Staffology\Model\SmtpSettings $smtpSettings): static { - if (is_null($htmlEmailSettings)) { - throw new InvalidArgumentException('non-nullable htmlEmailSettings cannot be null'); + if (is_null($smtpSettings)) { + throw new InvalidArgumentException('non-nullable smtpSettings cannot be null'); } - $this->container['htmlEmailSettings'] = $htmlEmailSettings; + $this->container['smtpSettings'] = $smtpSettings; return $this; } /** - * Gets id + * Gets useSystemFromAddress * - * @return string|null + * @return bool|null */ - public function getId(): ?string + public function getUseSystemFromAddress(): ?bool { - return $this->container['id']; + return $this->container['useSystemFromAddress']; } /** - * Sets id + * Sets useSystemFromAddress * - * @param string|null $id [readonly] The unique id of the object + * @param bool|null $useSystemFromAddress If set to true then the SenderEmail provided will only be used in the ReplyTo fields. The system defaults will be used for the From address. * * @return $this */ - public function setId(?string $id): static + public function setUseSystemFromAddress(?bool $useSystemFromAddress): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($useSystemFromAddress)) { + throw new InvalidArgumentException('non-nullable useSystemFromAddress cannot be null'); } - $this->container['id'] = $id; + $this->container['useSystemFromAddress'] = $useSystemFromAddress; return $this; } diff --git a/src/Model/MaritalStatus.php b/src/Model/MaritalStatus.php index 2a5e139..924ccc4 100644 --- a/src/Model/MaritalStatus.php +++ b/src/Model/MaritalStatus.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/McrPayCategory.php b/src/Model/McrPayCategory.php index ba5d7f2..615d904 100644 --- a/src/Model/McrPayCategory.php +++ b/src/Model/McrPayCategory.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/MileageAllowancePaymentsRate.php b/src/Model/MileageAllowancePaymentsRate.php index b8e3c79..09b9b53 100644 --- a/src/Model/MileageAllowancePaymentsRate.php +++ b/src/Model/MileageAllowancePaymentsRate.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class MileageAllowancePaymentsRate implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'vehicleType' => '\SynergiTech\Staffology\Model\MileageVehicleType', + 'aboveThresholdRate' => 'float', 'rate' => 'float', 'threshold' => 'int', - 'aboveThresholdRate' => 'float' + 'vehicleType' => '\SynergiTech\Staffology\Model\MileageVehicleType' ]; /** @@ -72,10 +72,10 @@ class MileageAllowancePaymentsRate implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'vehicleType' => null, + 'aboveThresholdRate' => 'double', 'rate' => 'double', 'threshold' => 'int32', - 'aboveThresholdRate' => 'double' + 'vehicleType' => null ]; /** @@ -84,10 +84,10 @@ class MileageAllowancePaymentsRate implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'vehicleType' => false, + 'aboveThresholdRate' => false, 'rate' => false, 'threshold' => true, - 'aboveThresholdRate' => false + 'vehicleType' => false ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'vehicleType' => 'vehicleType', + 'aboveThresholdRate' => 'aboveThresholdRate', 'rate' => 'rate', 'threshold' => 'threshold', - 'aboveThresholdRate' => 'aboveThresholdRate' + 'vehicleType' => 'vehicleType' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'vehicleType' => 'setVehicleType', + 'aboveThresholdRate' => 'setAboveThresholdRate', 'rate' => 'setRate', 'threshold' => 'setThreshold', - 'aboveThresholdRate' => 'setAboveThresholdRate' + 'vehicleType' => 'setVehicleType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'vehicleType' => 'getVehicleType', + 'aboveThresholdRate' => 'getAboveThresholdRate', 'rate' => 'getRate', 'threshold' => 'getThreshold', - 'aboveThresholdRate' => 'getAboveThresholdRate' + 'vehicleType' => 'getVehicleType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('vehicleType', $data ?? [], null); + $this->setIfExists('aboveThresholdRate', $data ?? [], null); $this->setIfExists('rate', $data ?? [], null); $this->setIfExists('threshold', $data ?? [], null); - $this->setIfExists('aboveThresholdRate', $data ?? [], null); + $this->setIfExists('vehicleType', $data ?? [], null); } /** @@ -311,28 +311,28 @@ public function valid(): bool /** - * Gets vehicleType + * Gets aboveThresholdRate * - * @return \SynergiTech\Staffology\Model\MileageVehicleType|null + * @return float|null */ - public function getVehicleType(): ?\SynergiTech\Staffology\Model\MileageVehicleType + public function getAboveThresholdRate(): ?float { - return $this->container['vehicleType']; + return $this->container['aboveThresholdRate']; } /** - * Sets vehicleType + * Sets aboveThresholdRate * - * @param \SynergiTech\Staffology\Model\MileageVehicleType|null $vehicleType vehicleType + * @param float|null $aboveThresholdRate aboveThresholdRate * * @return $this */ - public function setVehicleType(?\SynergiTech\Staffology\Model\MileageVehicleType $vehicleType): static + public function setAboveThresholdRate(?float $aboveThresholdRate): static { - if (is_null($vehicleType)) { - throw new InvalidArgumentException('non-nullable vehicleType cannot be null'); + if (is_null($aboveThresholdRate)) { + throw new InvalidArgumentException('non-nullable aboveThresholdRate cannot be null'); } - $this->container['vehicleType'] = $vehicleType; + $this->container['aboveThresholdRate'] = $aboveThresholdRate; return $this; } @@ -399,28 +399,28 @@ public function setThreshold(?int $threshold): static } /** - * Gets aboveThresholdRate + * Gets vehicleType * - * @return float|null + * @return \SynergiTech\Staffology\Model\MileageVehicleType|null */ - public function getAboveThresholdRate(): ?float + public function getVehicleType(): ?\SynergiTech\Staffology\Model\MileageVehicleType { - return $this->container['aboveThresholdRate']; + return $this->container['vehicleType']; } /** - * Sets aboveThresholdRate + * Sets vehicleType * - * @param float|null $aboveThresholdRate aboveThresholdRate + * @param \SynergiTech\Staffology\Model\MileageVehicleType|null $vehicleType vehicleType * * @return $this */ - public function setAboveThresholdRate(?float $aboveThresholdRate): static + public function setVehicleType(?\SynergiTech\Staffology\Model\MileageVehicleType $vehicleType): static { - if (is_null($aboveThresholdRate)) { - throw new InvalidArgumentException('non-nullable aboveThresholdRate cannot be null'); + if (is_null($vehicleType)) { + throw new InvalidArgumentException('non-nullable vehicleType cannot be null'); } - $this->container['aboveThresholdRate'] = $aboveThresholdRate; + $this->container['vehicleType'] = $vehicleType; return $this; } diff --git a/src/Model/MileageVehicleType.php b/src/Model/MileageVehicleType.php index 0afd406..0c50943 100644 --- a/src/Model/MileageVehicleType.php +++ b/src/Model/MileageVehicleType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index 8d10d51..41633c4 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/MonthlyMinimum.php b/src/Model/MonthlyMinimum.php index f3a480d..51d517d 100644 --- a/src/Model/MonthlyMinimum.php +++ b/src/Model/MonthlyMinimum.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class MonthlyMinimum implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'enabled' => 'bool', 'amount' => 'float', - 'startDate' => '\DateTime', + 'billPastEndDate' => 'bool', + 'enabled' => 'bool', 'endDate' => '\DateTime', - 'billPastEndDate' => 'bool' + 'startDate' => '\DateTime' ]; /** @@ -72,11 +72,11 @@ class MonthlyMinimum implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'enabled' => null, 'amount' => 'double', - 'startDate' => 'date', + 'billPastEndDate' => null, + 'enabled' => null, 'endDate' => 'date', - 'billPastEndDate' => null + 'startDate' => 'date' ]; /** @@ -85,11 +85,11 @@ class MonthlyMinimum implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'enabled' => false, 'amount' => false, - 'startDate' => true, + 'billPastEndDate' => false, + 'enabled' => false, 'endDate' => true, - 'billPastEndDate' => false + 'startDate' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'enabled' => 'enabled', 'amount' => 'amount', - 'startDate' => 'startDate', + 'billPastEndDate' => 'billPastEndDate', + 'enabled' => 'enabled', 'endDate' => 'endDate', - 'billPastEndDate' => 'billPastEndDate' + 'startDate' => 'startDate' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'enabled' => 'setEnabled', 'amount' => 'setAmount', - 'startDate' => 'setStartDate', + 'billPastEndDate' => 'setBillPastEndDate', + 'enabled' => 'setEnabled', 'endDate' => 'setEndDate', - 'billPastEndDate' => 'setBillPastEndDate' + 'startDate' => 'setStartDate' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'enabled' => 'getEnabled', 'amount' => 'getAmount', - 'startDate' => 'getStartDate', + 'billPastEndDate' => 'getBillPastEndDate', + 'enabled' => 'getEnabled', 'endDate' => 'getEndDate', - 'billPastEndDate' => 'getBillPastEndDate' + 'startDate' => 'getStartDate' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('enabled', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('billPastEndDate', $data ?? [], null); + $this->setIfExists('enabled', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); } /** @@ -317,89 +317,82 @@ public function valid(): bool /** - * Gets enabled + * Gets amount * - * @return bool|null + * @return float|null */ - public function getEnabled(): ?bool + public function getAmount(): ?float { - return $this->container['enabled']; + return $this->container['amount']; } /** - * Sets enabled + * Sets amount * - * @param bool|null $enabled enabled + * @param float|null $amount amount * * @return $this */ - public function setEnabled(?bool $enabled): static + public function setAmount(?float $amount): static { - if (is_null($enabled)) { - throw new InvalidArgumentException('non-nullable enabled cannot be null'); + if (is_null($amount)) { + throw new InvalidArgumentException('non-nullable amount cannot be null'); } - $this->container['enabled'] = $enabled; + $this->container['amount'] = $amount; return $this; } /** - * Gets amount + * Gets billPastEndDate * - * @return float|null + * @return bool|null */ - public function getAmount(): ?float + public function getBillPastEndDate(): ?bool { - return $this->container['amount']; + return $this->container['billPastEndDate']; } /** - * Sets amount + * Sets billPastEndDate * - * @param float|null $amount amount + * @param bool|null $billPastEndDate If set to true then this user should still be billed even after the End Date * * @return $this */ - public function setAmount(?float $amount): static + public function setBillPastEndDate(?bool $billPastEndDate): static { - if (is_null($amount)) { - throw new InvalidArgumentException('non-nullable amount cannot be null'); + if (is_null($billPastEndDate)) { + throw new InvalidArgumentException('non-nullable billPastEndDate cannot be null'); } - $this->container['amount'] = $amount; + $this->container['billPastEndDate'] = $billPastEndDate; return $this; } /** - * Gets startDate + * Gets enabled * - * @return \DateTime|null + * @return bool|null */ - public function getStartDate(): ?\DateTime + public function getEnabled(): ?bool { - return $this->container['startDate']; + return $this->container['enabled']; } /** - * Sets startDate + * Sets enabled * - * @param \DateTime|null $startDate startDate + * @param bool|null $enabled enabled * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setEnabled(?bool $enabled): static { - if (is_null($startDate)) { - array_push($this->openAPINullablesSetToNull, 'startDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($enabled)) { + throw new InvalidArgumentException('non-nullable enabled cannot be null'); } - $this->container['startDate'] = $startDate; + $this->container['enabled'] = $enabled; return $this; } @@ -439,28 +432,35 @@ public function setEndDate(?\DateTime $endDate): static } /** - * Gets billPastEndDate + * Gets startDate * - * @return bool|null + * @return \DateTime|null */ - public function getBillPastEndDate(): ?bool + public function getStartDate(): ?\DateTime { - return $this->container['billPastEndDate']; + return $this->container['startDate']; } /** - * Sets billPastEndDate + * Sets startDate * - * @param bool|null $billPastEndDate If set to true then this user should still be billed even after the End Date + * @param \DateTime|null $startDate startDate * * @return $this */ - public function setBillPastEndDate(?bool $billPastEndDate): static + public function setStartDate(?\DateTime $startDate): static { - if (is_null($billPastEndDate)) { - throw new InvalidArgumentException('non-nullable billPastEndDate cannot be null'); + if (is_null($startDate)) { + array_push($this->openAPINullablesSetToNull, 'startDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['billPastEndDate'] = $billPastEndDate; + $this->container['startDate'] = $startDate; return $this; } diff --git a/src/Model/NationalInsuranceCalculation.php b/src/Model/NationalInsuranceCalculation.php index bcd5fe5..c0f03b2 100644 --- a/src/Model/NationalInsuranceCalculation.php +++ b/src/Model/NationalInsuranceCalculation.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,24 +60,24 @@ class NationalInsuranceCalculation implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'breakdown' => '\SynergiTech\Staffology\Model\NationalInsuranceCalculationBase[]', - 'niCategory' => 'string', 'asDirector' => 'bool', - 'earningsUptoIncludingLEL' => 'float', + 'breakdown' => '\SynergiTech\Staffology\Model\NationalInsuranceCalculationBase[]', + 'earningsAboveFUSTUptoIncludingUEL' => 'float', 'earningsAboveLELUptoIncludingPT' => 'float', 'earningsAbovePTUptoIncludingST' => 'float', 'earningsAbovePTUptoIncludingUEL' => 'float', - 'earningsAboveSTUptoIncludingUEL' => 'float', 'earningsAboveSTUptoIncludingFUST' => 'float', - 'earningsAboveFUSTUptoIncludingUEL' => 'float', + 'earningsAboveSTUptoIncludingUEL' => 'float', 'earningsAboveUEL' => 'float', + 'earningsUptoIncludingLEL' => 'float', + 'employeeNi' => 'float', 'employeeNiGross' => 'float', 'employeeNiRebate' => 'float', + 'employerNi' => 'float', 'employerNiGross' => 'float', 'employerNiRebate' => 'float', - 'employeeNi' => 'float', - 'employerNi' => 'float', 'netNi' => 'float', + 'niCategory' => 'string', 'niablePay' => 'float' ]; @@ -87,24 +87,24 @@ class NationalInsuranceCalculation implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'breakdown' => null, - 'niCategory' => null, 'asDirector' => null, - 'earningsUptoIncludingLEL' => 'double', + 'breakdown' => null, + 'earningsAboveFUSTUptoIncludingUEL' => 'double', 'earningsAboveLELUptoIncludingPT' => 'double', 'earningsAbovePTUptoIncludingST' => 'double', 'earningsAbovePTUptoIncludingUEL' => 'double', - 'earningsAboveSTUptoIncludingUEL' => 'double', 'earningsAboveSTUptoIncludingFUST' => 'double', - 'earningsAboveFUSTUptoIncludingUEL' => 'double', + 'earningsAboveSTUptoIncludingUEL' => 'double', 'earningsAboveUEL' => 'double', + 'earningsUptoIncludingLEL' => 'double', + 'employeeNi' => 'double', 'employeeNiGross' => 'double', 'employeeNiRebate' => 'double', + 'employerNi' => 'double', 'employerNiGross' => 'double', 'employerNiRebate' => 'double', - 'employeeNi' => 'double', - 'employerNi' => 'double', 'netNi' => 'double', + 'niCategory' => null, 'niablePay' => 'double' ]; @@ -114,24 +114,24 @@ class NationalInsuranceCalculation implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'breakdown' => true, - 'niCategory' => false, 'asDirector' => false, - 'earningsUptoIncludingLEL' => false, + 'breakdown' => true, + 'earningsAboveFUSTUptoIncludingUEL' => true, 'earningsAboveLELUptoIncludingPT' => false, 'earningsAbovePTUptoIncludingST' => false, 'earningsAbovePTUptoIncludingUEL' => false, - 'earningsAboveSTUptoIncludingUEL' => false, 'earningsAboveSTUptoIncludingFUST' => true, - 'earningsAboveFUSTUptoIncludingUEL' => true, + 'earningsAboveSTUptoIncludingUEL' => false, 'earningsAboveUEL' => false, + 'earningsUptoIncludingLEL' => false, + 'employeeNi' => false, 'employeeNiGross' => false, 'employeeNiRebate' => false, + 'employerNi' => false, 'employerNiGross' => false, 'employerNiRebate' => false, - 'employeeNi' => false, - 'employerNi' => false, 'netNi' => false, + 'niCategory' => false, 'niablePay' => false ]; @@ -221,24 +221,24 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'breakdown' => 'breakdown', - 'niCategory' => 'niCategory', 'asDirector' => 'asDirector', - 'earningsUptoIncludingLEL' => 'earningsUptoIncludingLEL', + 'breakdown' => 'breakdown', + 'earningsAboveFUSTUptoIncludingUEL' => 'earningsAboveFUSTUptoIncludingUEL', 'earningsAboveLELUptoIncludingPT' => 'earningsAboveLELUptoIncludingPT', 'earningsAbovePTUptoIncludingST' => 'earningsAbovePTUptoIncludingST', 'earningsAbovePTUptoIncludingUEL' => 'earningsAbovePTUptoIncludingUEL', - 'earningsAboveSTUptoIncludingUEL' => 'earningsAboveSTUptoIncludingUEL', 'earningsAboveSTUptoIncludingFUST' => 'earningsAboveSTUptoIncludingFUST', - 'earningsAboveFUSTUptoIncludingUEL' => 'earningsAboveFUSTUptoIncludingUEL', + 'earningsAboveSTUptoIncludingUEL' => 'earningsAboveSTUptoIncludingUEL', 'earningsAboveUEL' => 'earningsAboveUEL', + 'earningsUptoIncludingLEL' => 'earningsUptoIncludingLEL', + 'employeeNi' => 'employeeNi', 'employeeNiGross' => 'employeeNiGross', 'employeeNiRebate' => 'employeeNiRebate', + 'employerNi' => 'employerNi', 'employerNiGross' => 'employerNiGross', 'employerNiRebate' => 'employerNiRebate', - 'employeeNi' => 'employeeNi', - 'employerNi' => 'employerNi', 'netNi' => 'netNi', + 'niCategory' => 'niCategory', 'niablePay' => 'niablePay' ]; @@ -248,24 +248,24 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'breakdown' => 'setBreakdown', - 'niCategory' => 'setNiCategory', 'asDirector' => 'setAsDirector', - 'earningsUptoIncludingLEL' => 'setEarningsUptoIncludingLEL', + 'breakdown' => 'setBreakdown', + 'earningsAboveFUSTUptoIncludingUEL' => 'setEarningsAboveFUSTUptoIncludingUEL', 'earningsAboveLELUptoIncludingPT' => 'setEarningsAboveLELUptoIncludingPT', 'earningsAbovePTUptoIncludingST' => 'setEarningsAbovePTUptoIncludingST', 'earningsAbovePTUptoIncludingUEL' => 'setEarningsAbovePTUptoIncludingUEL', - 'earningsAboveSTUptoIncludingUEL' => 'setEarningsAboveSTUptoIncludingUEL', 'earningsAboveSTUptoIncludingFUST' => 'setEarningsAboveSTUptoIncludingFUST', - 'earningsAboveFUSTUptoIncludingUEL' => 'setEarningsAboveFUSTUptoIncludingUEL', + 'earningsAboveSTUptoIncludingUEL' => 'setEarningsAboveSTUptoIncludingUEL', 'earningsAboveUEL' => 'setEarningsAboveUEL', + 'earningsUptoIncludingLEL' => 'setEarningsUptoIncludingLEL', + 'employeeNi' => 'setEmployeeNi', 'employeeNiGross' => 'setEmployeeNiGross', 'employeeNiRebate' => 'setEmployeeNiRebate', + 'employerNi' => 'setEmployerNi', 'employerNiGross' => 'setEmployerNiGross', 'employerNiRebate' => 'setEmployerNiRebate', - 'employeeNi' => 'setEmployeeNi', - 'employerNi' => 'setEmployerNi', 'netNi' => 'setNetNi', + 'niCategory' => 'setNiCategory', 'niablePay' => 'setNiablePay' ]; @@ -275,24 +275,24 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'breakdown' => 'getBreakdown', - 'niCategory' => 'getNiCategory', 'asDirector' => 'getAsDirector', - 'earningsUptoIncludingLEL' => 'getEarningsUptoIncludingLEL', + 'breakdown' => 'getBreakdown', + 'earningsAboveFUSTUptoIncludingUEL' => 'getEarningsAboveFUSTUptoIncludingUEL', 'earningsAboveLELUptoIncludingPT' => 'getEarningsAboveLELUptoIncludingPT', 'earningsAbovePTUptoIncludingST' => 'getEarningsAbovePTUptoIncludingST', 'earningsAbovePTUptoIncludingUEL' => 'getEarningsAbovePTUptoIncludingUEL', - 'earningsAboveSTUptoIncludingUEL' => 'getEarningsAboveSTUptoIncludingUEL', 'earningsAboveSTUptoIncludingFUST' => 'getEarningsAboveSTUptoIncludingFUST', - 'earningsAboveFUSTUptoIncludingUEL' => 'getEarningsAboveFUSTUptoIncludingUEL', + 'earningsAboveSTUptoIncludingUEL' => 'getEarningsAboveSTUptoIncludingUEL', 'earningsAboveUEL' => 'getEarningsAboveUEL', + 'earningsUptoIncludingLEL' => 'getEarningsUptoIncludingLEL', + 'employeeNi' => 'getEmployeeNi', 'employeeNiGross' => 'getEmployeeNiGross', 'employeeNiRebate' => 'getEmployeeNiRebate', + 'employerNi' => 'getEmployerNi', 'employerNiGross' => 'getEmployerNiGross', 'employerNiRebate' => 'getEmployerNiRebate', - 'employeeNi' => 'getEmployeeNi', - 'employerNi' => 'getEmployerNi', 'netNi' => 'getNetNi', + 'niCategory' => 'getNiCategory', 'niablePay' => 'getNiablePay' ]; @@ -352,24 +352,24 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('breakdown', $data ?? [], null); - $this->setIfExists('niCategory', $data ?? [], null); $this->setIfExists('asDirector', $data ?? [], null); - $this->setIfExists('earningsUptoIncludingLEL', $data ?? [], null); + $this->setIfExists('breakdown', $data ?? [], null); + $this->setIfExists('earningsAboveFUSTUptoIncludingUEL', $data ?? [], null); $this->setIfExists('earningsAboveLELUptoIncludingPT', $data ?? [], null); $this->setIfExists('earningsAbovePTUptoIncludingST', $data ?? [], null); $this->setIfExists('earningsAbovePTUptoIncludingUEL', $data ?? [], null); - $this->setIfExists('earningsAboveSTUptoIncludingUEL', $data ?? [], null); $this->setIfExists('earningsAboveSTUptoIncludingFUST', $data ?? [], null); - $this->setIfExists('earningsAboveFUSTUptoIncludingUEL', $data ?? [], null); + $this->setIfExists('earningsAboveSTUptoIncludingUEL', $data ?? [], null); $this->setIfExists('earningsAboveUEL', $data ?? [], null); + $this->setIfExists('earningsUptoIncludingLEL', $data ?? [], null); + $this->setIfExists('employeeNi', $data ?? [], null); $this->setIfExists('employeeNiGross', $data ?? [], null); $this->setIfExists('employeeNiRebate', $data ?? [], null); + $this->setIfExists('employerNi', $data ?? [], null); $this->setIfExists('employerNiGross', $data ?? [], null); $this->setIfExists('employerNiRebate', $data ?? [], null); - $this->setIfExists('employeeNi', $data ?? [], null); - $this->setIfExists('employerNi', $data ?? [], null); $this->setIfExists('netNi', $data ?? [], null); + $this->setIfExists('niCategory', $data ?? [], null); $this->setIfExists('niablePay', $data ?? [], null); } @@ -416,116 +416,96 @@ public function valid(): bool /** - * Gets breakdown - * - * @return \SynergiTech\Staffology\Model\NationalInsuranceCalculationBase[]|null - */ - public function getBreakdown(): ?array - { - return $this->container['breakdown']; - } - - /** - * Sets breakdown - * - * @param \SynergiTech\Staffology\Model\NationalInsuranceCalculationBase[]|null $breakdown [readonly] List of calculations that make up this calculation - * - * @return $this - */ - public function setBreakdown(?array $breakdown): static - { - if (is_null($breakdown)) { - array_push($this->openAPINullablesSetToNull, 'breakdown'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('breakdown', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['breakdown'] = $breakdown; - - return $this; - } - - /** - * Gets niCategory + * Gets asDirector * - * @return string|null + * @return bool|null */ - public function getNiCategory(): ?string + public function getAsDirector(): ?bool { - return $this->container['niCategory']; + return $this->container['asDirector']; } /** - * Sets niCategory + * Sets asDirector * - * @param string|null $niCategory Calculated on NI table letter + * @param bool|null $asDirector Calculated as a Director * * @return $this */ - public function setNiCategory(?string $niCategory): static + public function setAsDirector(?bool $asDirector): static { - if (is_null($niCategory)) { - throw new InvalidArgumentException('non-nullable niCategory cannot be null'); + if (is_null($asDirector)) { + throw new InvalidArgumentException('non-nullable asDirector cannot be null'); } - $this->container['niCategory'] = $niCategory; + $this->container['asDirector'] = $asDirector; return $this; } /** - * Gets asDirector + * Gets breakdown * - * @return bool|null + * @return \SynergiTech\Staffology\Model\NationalInsuranceCalculationBase[]|null */ - public function getAsDirector(): ?bool + public function getBreakdown(): ?array { - return $this->container['asDirector']; + return $this->container['breakdown']; } /** - * Sets asDirector + * Sets breakdown * - * @param bool|null $asDirector Calculated as a Director + * @param \SynergiTech\Staffology\Model\NationalInsuranceCalculationBase[]|null $breakdown [readonly] List of calculations that make up this calculation * * @return $this */ - public function setAsDirector(?bool $asDirector): static + public function setBreakdown(?array $breakdown): static { - if (is_null($asDirector)) { - throw new InvalidArgumentException('non-nullable asDirector cannot be null'); + if (is_null($breakdown)) { + array_push($this->openAPINullablesSetToNull, 'breakdown'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('breakdown', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['asDirector'] = $asDirector; + $this->container['breakdown'] = $breakdown; return $this; } /** - * Gets earningsUptoIncludingLEL + * Gets earningsAboveFUSTUptoIncludingUEL * * @return float|null */ - public function getEarningsUptoIncludingLEL(): ?float + public function getEarningsAboveFUSTUptoIncludingUEL(): ?float { - return $this->container['earningsUptoIncludingLEL']; + return $this->container['earningsAboveFUSTUptoIncludingUEL']; } /** - * Sets earningsUptoIncludingLEL + * Sets earningsAboveFUSTUptoIncludingUEL * - * @param float|null $earningsUptoIncludingLEL Earnings up to and including LEL + * @param float|null $earningsAboveFUSTUptoIncludingUEL Earnings above FUST up to UEL * * @return $this */ - public function setEarningsUptoIncludingLEL(?float $earningsUptoIncludingLEL): static + public function setEarningsAboveFUSTUptoIncludingUEL(?float $earningsAboveFUSTUptoIncludingUEL): static { - if (is_null($earningsUptoIncludingLEL)) { - throw new InvalidArgumentException('non-nullable earningsUptoIncludingLEL cannot be null'); + if (is_null($earningsAboveFUSTUptoIncludingUEL)) { + array_push($this->openAPINullablesSetToNull, 'earningsAboveFUSTUptoIncludingUEL'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('earningsAboveFUSTUptoIncludingUEL', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['earningsUptoIncludingLEL'] = $earningsUptoIncludingLEL; + $this->container['earningsAboveFUSTUptoIncludingUEL'] = $earningsAboveFUSTUptoIncludingUEL; return $this; } @@ -611,6 +591,40 @@ public function setEarningsAbovePTUptoIncludingUEL(?float $earningsAbovePTUptoIn return $this; } + /** + * Gets earningsAboveSTUptoIncludingFUST + * + * @return float|null + */ + public function getEarningsAboveSTUptoIncludingFUST(): ?float + { + return $this->container['earningsAboveSTUptoIncludingFUST']; + } + + /** + * Sets earningsAboveSTUptoIncludingFUST + * + * @param float|null $earningsAboveSTUptoIncludingFUST Earnings above ST up to FUST + * + * @return $this + */ + public function setEarningsAboveSTUptoIncludingFUST(?float $earningsAboveSTUptoIncludingFUST): static + { + if (is_null($earningsAboveSTUptoIncludingFUST)) { + array_push($this->openAPINullablesSetToNull, 'earningsAboveSTUptoIncludingFUST'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('earningsAboveSTUptoIncludingFUST', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['earningsAboveSTUptoIncludingFUST'] = $earningsAboveSTUptoIncludingFUST; + + return $this; + } + /** * Gets earningsAboveSTUptoIncludingUEL * @@ -639,96 +653,82 @@ public function setEarningsAboveSTUptoIncludingUEL(?float $earningsAboveSTUptoIn } /** - * Gets earningsAboveSTUptoIncludingFUST + * Gets earningsAboveUEL * * @return float|null */ - public function getEarningsAboveSTUptoIncludingFUST(): ?float + public function getEarningsAboveUEL(): ?float { - return $this->container['earningsAboveSTUptoIncludingFUST']; + return $this->container['earningsAboveUEL']; } /** - * Sets earningsAboveSTUptoIncludingFUST + * Sets earningsAboveUEL * - * @param float|null $earningsAboveSTUptoIncludingFUST Earnings above ST up to FUST + * @param float|null $earningsAboveUEL Earnings above UEL * * @return $this */ - public function setEarningsAboveSTUptoIncludingFUST(?float $earningsAboveSTUptoIncludingFUST): static + public function setEarningsAboveUEL(?float $earningsAboveUEL): static { - if (is_null($earningsAboveSTUptoIncludingFUST)) { - array_push($this->openAPINullablesSetToNull, 'earningsAboveSTUptoIncludingFUST'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('earningsAboveSTUptoIncludingFUST', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($earningsAboveUEL)) { + throw new InvalidArgumentException('non-nullable earningsAboveUEL cannot be null'); } - $this->container['earningsAboveSTUptoIncludingFUST'] = $earningsAboveSTUptoIncludingFUST; + $this->container['earningsAboveUEL'] = $earningsAboveUEL; return $this; } /** - * Gets earningsAboveFUSTUptoIncludingUEL + * Gets earningsUptoIncludingLEL * * @return float|null */ - public function getEarningsAboveFUSTUptoIncludingUEL(): ?float + public function getEarningsUptoIncludingLEL(): ?float { - return $this->container['earningsAboveFUSTUptoIncludingUEL']; + return $this->container['earningsUptoIncludingLEL']; } /** - * Sets earningsAboveFUSTUptoIncludingUEL + * Sets earningsUptoIncludingLEL * - * @param float|null $earningsAboveFUSTUptoIncludingUEL Earnings above FUST up to UEL + * @param float|null $earningsUptoIncludingLEL Earnings up to and including LEL * * @return $this */ - public function setEarningsAboveFUSTUptoIncludingUEL(?float $earningsAboveFUSTUptoIncludingUEL): static + public function setEarningsUptoIncludingLEL(?float $earningsUptoIncludingLEL): static { - if (is_null($earningsAboveFUSTUptoIncludingUEL)) { - array_push($this->openAPINullablesSetToNull, 'earningsAboveFUSTUptoIncludingUEL'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('earningsAboveFUSTUptoIncludingUEL', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($earningsUptoIncludingLEL)) { + throw new InvalidArgumentException('non-nullable earningsUptoIncludingLEL cannot be null'); } - $this->container['earningsAboveFUSTUptoIncludingUEL'] = $earningsAboveFUSTUptoIncludingUEL; + $this->container['earningsUptoIncludingLEL'] = $earningsUptoIncludingLEL; return $this; } /** - * Gets earningsAboveUEL + * Gets employeeNi * * @return float|null */ - public function getEarningsAboveUEL(): ?float + public function getEmployeeNi(): ?float { - return $this->container['earningsAboveUEL']; + return $this->container['employeeNi']; } /** - * Sets earningsAboveUEL + * Sets employeeNi * - * @param float|null $earningsAboveUEL Earnings above UEL + * @param float|null $employeeNi [readonly] Net Employee National Insurance * * @return $this */ - public function setEarningsAboveUEL(?float $earningsAboveUEL): static + public function setEmployeeNi(?float $employeeNi): static { - if (is_null($earningsAboveUEL)) { - throw new InvalidArgumentException('non-nullable earningsAboveUEL cannot be null'); + if (is_null($employeeNi)) { + throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); } - $this->container['earningsAboveUEL'] = $earningsAboveUEL; + $this->container['employeeNi'] = $employeeNi; return $this; } @@ -788,136 +788,136 @@ public function setEmployeeNiRebate(?float $employeeNiRebate): static } /** - * Gets employerNiGross + * Gets employerNi * * @return float|null */ - public function getEmployerNiGross(): ?float + public function getEmployerNi(): ?float { - return $this->container['employerNiGross']; + return $this->container['employerNi']; } /** - * Sets employerNiGross + * Sets employerNi * - * @param float|null $employerNiGross Employer National Insurance Gross Value + * @param float|null $employerNi [readonly] Net Employer National Insurance * * @return $this */ - public function setEmployerNiGross(?float $employerNiGross): static + public function setEmployerNi(?float $employerNi): static { - if (is_null($employerNiGross)) { - throw new InvalidArgumentException('non-nullable employerNiGross cannot be null'); + if (is_null($employerNi)) { + throw new InvalidArgumentException('non-nullable employerNi cannot be null'); } - $this->container['employerNiGross'] = $employerNiGross; + $this->container['employerNi'] = $employerNi; return $this; } /** - * Gets employerNiRebate + * Gets employerNiGross * * @return float|null */ - public function getEmployerNiRebate(): ?float + public function getEmployerNiGross(): ?float { - return $this->container['employerNiRebate']; + return $this->container['employerNiGross']; } /** - * Sets employerNiRebate + * Sets employerNiGross * - * @param float|null $employerNiRebate Employer National Insurance Rebate Value + * @param float|null $employerNiGross Employer National Insurance Gross Value * * @return $this */ - public function setEmployerNiRebate(?float $employerNiRebate): static + public function setEmployerNiGross(?float $employerNiGross): static { - if (is_null($employerNiRebate)) { - throw new InvalidArgumentException('non-nullable employerNiRebate cannot be null'); + if (is_null($employerNiGross)) { + throw new InvalidArgumentException('non-nullable employerNiGross cannot be null'); } - $this->container['employerNiRebate'] = $employerNiRebate; + $this->container['employerNiGross'] = $employerNiGross; return $this; } /** - * Gets employeeNi + * Gets employerNiRebate * * @return float|null */ - public function getEmployeeNi(): ?float + public function getEmployerNiRebate(): ?float { - return $this->container['employeeNi']; + return $this->container['employerNiRebate']; } /** - * Sets employeeNi + * Sets employerNiRebate * - * @param float|null $employeeNi [readonly] Net Employee National Insurance + * @param float|null $employerNiRebate Employer National Insurance Rebate Value * * @return $this */ - public function setEmployeeNi(?float $employeeNi): static + public function setEmployerNiRebate(?float $employerNiRebate): static { - if (is_null($employeeNi)) { - throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); + if (is_null($employerNiRebate)) { + throw new InvalidArgumentException('non-nullable employerNiRebate cannot be null'); } - $this->container['employeeNi'] = $employeeNi; + $this->container['employerNiRebate'] = $employerNiRebate; return $this; } /** - * Gets employerNi + * Gets netNi * * @return float|null */ - public function getEmployerNi(): ?float + public function getNetNi(): ?float { - return $this->container['employerNi']; + return $this->container['netNi']; } /** - * Sets employerNi + * Sets netNi * - * @param float|null $employerNi [readonly] Net Employer National Insurance + * @param float|null $netNi [readonly] Net National Insurance (Employer + Employee) * * @return $this */ - public function setEmployerNi(?float $employerNi): static + public function setNetNi(?float $netNi): static { - if (is_null($employerNi)) { - throw new InvalidArgumentException('non-nullable employerNi cannot be null'); + if (is_null($netNi)) { + throw new InvalidArgumentException('non-nullable netNi cannot be null'); } - $this->container['employerNi'] = $employerNi; + $this->container['netNi'] = $netNi; return $this; } /** - * Gets netNi + * Gets niCategory * - * @return float|null + * @return string|null */ - public function getNetNi(): ?float + public function getNiCategory(): ?string { - return $this->container['netNi']; + return $this->container['niCategory']; } /** - * Sets netNi + * Sets niCategory * - * @param float|null $netNi [readonly] Net National Insurance (Employer + Employee) + * @param string|null $niCategory Calculated on NI table letter * * @return $this */ - public function setNetNi(?float $netNi): static + public function setNiCategory(?string $niCategory): static { - if (is_null($netNi)) { - throw new InvalidArgumentException('non-nullable netNi cannot be null'); + if (is_null($niCategory)) { + throw new InvalidArgumentException('non-nullable niCategory cannot be null'); } - $this->container['netNi'] = $netNi; + $this->container['niCategory'] = $niCategory; return $this; } diff --git a/src/Model/NationalInsuranceCalculationBase.php b/src/Model/NationalInsuranceCalculationBase.php index b5296d0..7726618 100644 --- a/src/Model/NationalInsuranceCalculationBase.php +++ b/src/Model/NationalInsuranceCalculationBase.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,23 +60,23 @@ class NationalInsuranceCalculationBase implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ - 'niCategory' => 'string', 'asDirector' => 'bool', - 'earningsUptoIncludingLEL' => 'float', + 'earningsAboveFUSTUptoIncludingUEL' => 'float', 'earningsAboveLELUptoIncludingPT' => 'float', 'earningsAbovePTUptoIncludingST' => 'float', 'earningsAbovePTUptoIncludingUEL' => 'float', - 'earningsAboveSTUptoIncludingUEL' => 'float', 'earningsAboveSTUptoIncludingFUST' => 'float', - 'earningsAboveFUSTUptoIncludingUEL' => 'float', + 'earningsAboveSTUptoIncludingUEL' => 'float', 'earningsAboveUEL' => 'float', + 'earningsUptoIncludingLEL' => 'float', + 'employeeNi' => 'float', 'employeeNiGross' => 'float', 'employeeNiRebate' => 'float', + 'employerNi' => 'float', 'employerNiGross' => 'float', 'employerNiRebate' => 'float', - 'employeeNi' => 'float', - 'employerNi' => 'float', 'netNi' => 'float', + 'niCategory' => 'string', 'niablePay' => 'float' ]; @@ -86,23 +86,23 @@ class NationalInsuranceCalculationBase implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPIFormats = [ - 'niCategory' => null, 'asDirector' => null, - 'earningsUptoIncludingLEL' => 'double', + 'earningsAboveFUSTUptoIncludingUEL' => 'double', 'earningsAboveLELUptoIncludingPT' => 'double', 'earningsAbovePTUptoIncludingST' => 'double', 'earningsAbovePTUptoIncludingUEL' => 'double', - 'earningsAboveSTUptoIncludingUEL' => 'double', 'earningsAboveSTUptoIncludingFUST' => 'double', - 'earningsAboveFUSTUptoIncludingUEL' => 'double', + 'earningsAboveSTUptoIncludingUEL' => 'double', 'earningsAboveUEL' => 'double', + 'earningsUptoIncludingLEL' => 'double', + 'employeeNi' => 'double', 'employeeNiGross' => 'double', 'employeeNiRebate' => 'double', + 'employerNi' => 'double', 'employerNiGross' => 'double', 'employerNiRebate' => 'double', - 'employeeNi' => 'double', - 'employerNi' => 'double', 'netNi' => 'double', + 'niCategory' => null, 'niablePay' => 'double' ]; @@ -112,23 +112,23 @@ class NationalInsuranceCalculationBase implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPINullables = [ - 'niCategory' => false, 'asDirector' => false, - 'earningsUptoIncludingLEL' => false, + 'earningsAboveFUSTUptoIncludingUEL' => true, 'earningsAboveLELUptoIncludingPT' => false, 'earningsAbovePTUptoIncludingST' => false, 'earningsAbovePTUptoIncludingUEL' => false, - 'earningsAboveSTUptoIncludingUEL' => false, 'earningsAboveSTUptoIncludingFUST' => true, - 'earningsAboveFUSTUptoIncludingUEL' => true, + 'earningsAboveSTUptoIncludingUEL' => false, 'earningsAboveUEL' => false, + 'earningsUptoIncludingLEL' => false, + 'employeeNi' => false, 'employeeNiGross' => false, 'employeeNiRebate' => false, + 'employerNi' => false, 'employerNiGross' => false, 'employerNiRebate' => false, - 'employeeNi' => false, - 'employerNi' => false, 'netNi' => false, + 'niCategory' => false, 'niablePay' => false ]; @@ -218,23 +218,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'niCategory' => 'niCategory', 'asDirector' => 'asDirector', - 'earningsUptoIncludingLEL' => 'earningsUptoIncludingLEL', + 'earningsAboveFUSTUptoIncludingUEL' => 'earningsAboveFUSTUptoIncludingUEL', 'earningsAboveLELUptoIncludingPT' => 'earningsAboveLELUptoIncludingPT', 'earningsAbovePTUptoIncludingST' => 'earningsAbovePTUptoIncludingST', 'earningsAbovePTUptoIncludingUEL' => 'earningsAbovePTUptoIncludingUEL', - 'earningsAboveSTUptoIncludingUEL' => 'earningsAboveSTUptoIncludingUEL', 'earningsAboveSTUptoIncludingFUST' => 'earningsAboveSTUptoIncludingFUST', - 'earningsAboveFUSTUptoIncludingUEL' => 'earningsAboveFUSTUptoIncludingUEL', + 'earningsAboveSTUptoIncludingUEL' => 'earningsAboveSTUptoIncludingUEL', 'earningsAboveUEL' => 'earningsAboveUEL', + 'earningsUptoIncludingLEL' => 'earningsUptoIncludingLEL', + 'employeeNi' => 'employeeNi', 'employeeNiGross' => 'employeeNiGross', 'employeeNiRebate' => 'employeeNiRebate', + 'employerNi' => 'employerNi', 'employerNiGross' => 'employerNiGross', 'employerNiRebate' => 'employerNiRebate', - 'employeeNi' => 'employeeNi', - 'employerNi' => 'employerNi', 'netNi' => 'netNi', + 'niCategory' => 'niCategory', 'niablePay' => 'niablePay' ]; @@ -244,23 +244,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'niCategory' => 'setNiCategory', 'asDirector' => 'setAsDirector', - 'earningsUptoIncludingLEL' => 'setEarningsUptoIncludingLEL', + 'earningsAboveFUSTUptoIncludingUEL' => 'setEarningsAboveFUSTUptoIncludingUEL', 'earningsAboveLELUptoIncludingPT' => 'setEarningsAboveLELUptoIncludingPT', 'earningsAbovePTUptoIncludingST' => 'setEarningsAbovePTUptoIncludingST', 'earningsAbovePTUptoIncludingUEL' => 'setEarningsAbovePTUptoIncludingUEL', - 'earningsAboveSTUptoIncludingUEL' => 'setEarningsAboveSTUptoIncludingUEL', 'earningsAboveSTUptoIncludingFUST' => 'setEarningsAboveSTUptoIncludingFUST', - 'earningsAboveFUSTUptoIncludingUEL' => 'setEarningsAboveFUSTUptoIncludingUEL', + 'earningsAboveSTUptoIncludingUEL' => 'setEarningsAboveSTUptoIncludingUEL', 'earningsAboveUEL' => 'setEarningsAboveUEL', + 'earningsUptoIncludingLEL' => 'setEarningsUptoIncludingLEL', + 'employeeNi' => 'setEmployeeNi', 'employeeNiGross' => 'setEmployeeNiGross', 'employeeNiRebate' => 'setEmployeeNiRebate', + 'employerNi' => 'setEmployerNi', 'employerNiGross' => 'setEmployerNiGross', 'employerNiRebate' => 'setEmployerNiRebate', - 'employeeNi' => 'setEmployeeNi', - 'employerNi' => 'setEmployerNi', 'netNi' => 'setNetNi', + 'niCategory' => 'setNiCategory', 'niablePay' => 'setNiablePay' ]; @@ -270,23 +270,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'niCategory' => 'getNiCategory', 'asDirector' => 'getAsDirector', - 'earningsUptoIncludingLEL' => 'getEarningsUptoIncludingLEL', + 'earningsAboveFUSTUptoIncludingUEL' => 'getEarningsAboveFUSTUptoIncludingUEL', 'earningsAboveLELUptoIncludingPT' => 'getEarningsAboveLELUptoIncludingPT', 'earningsAbovePTUptoIncludingST' => 'getEarningsAbovePTUptoIncludingST', 'earningsAbovePTUptoIncludingUEL' => 'getEarningsAbovePTUptoIncludingUEL', - 'earningsAboveSTUptoIncludingUEL' => 'getEarningsAboveSTUptoIncludingUEL', 'earningsAboveSTUptoIncludingFUST' => 'getEarningsAboveSTUptoIncludingFUST', - 'earningsAboveFUSTUptoIncludingUEL' => 'getEarningsAboveFUSTUptoIncludingUEL', + 'earningsAboveSTUptoIncludingUEL' => 'getEarningsAboveSTUptoIncludingUEL', 'earningsAboveUEL' => 'getEarningsAboveUEL', + 'earningsUptoIncludingLEL' => 'getEarningsUptoIncludingLEL', + 'employeeNi' => 'getEmployeeNi', 'employeeNiGross' => 'getEmployeeNiGross', 'employeeNiRebate' => 'getEmployeeNiRebate', + 'employerNi' => 'getEmployerNi', 'employerNiGross' => 'getEmployerNiGross', 'employerNiRebate' => 'getEmployerNiRebate', - 'employeeNi' => 'getEmployeeNi', - 'employerNi' => 'getEmployerNi', 'netNi' => 'getNetNi', + 'niCategory' => 'getNiCategory', 'niablePay' => 'getNiablePay' ]; @@ -346,23 +346,23 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('niCategory', $data ?? [], null); $this->setIfExists('asDirector', $data ?? [], null); - $this->setIfExists('earningsUptoIncludingLEL', $data ?? [], null); + $this->setIfExists('earningsAboveFUSTUptoIncludingUEL', $data ?? [], null); $this->setIfExists('earningsAboveLELUptoIncludingPT', $data ?? [], null); $this->setIfExists('earningsAbovePTUptoIncludingST', $data ?? [], null); $this->setIfExists('earningsAbovePTUptoIncludingUEL', $data ?? [], null); - $this->setIfExists('earningsAboveSTUptoIncludingUEL', $data ?? [], null); $this->setIfExists('earningsAboveSTUptoIncludingFUST', $data ?? [], null); - $this->setIfExists('earningsAboveFUSTUptoIncludingUEL', $data ?? [], null); + $this->setIfExists('earningsAboveSTUptoIncludingUEL', $data ?? [], null); $this->setIfExists('earningsAboveUEL', $data ?? [], null); + $this->setIfExists('earningsUptoIncludingLEL', $data ?? [], null); + $this->setIfExists('employeeNi', $data ?? [], null); $this->setIfExists('employeeNiGross', $data ?? [], null); $this->setIfExists('employeeNiRebate', $data ?? [], null); + $this->setIfExists('employerNi', $data ?? [], null); $this->setIfExists('employerNiGross', $data ?? [], null); $this->setIfExists('employerNiRebate', $data ?? [], null); - $this->setIfExists('employeeNi', $data ?? [], null); - $this->setIfExists('employerNi', $data ?? [], null); $this->setIfExists('netNi', $data ?? [], null); + $this->setIfExists('niCategory', $data ?? [], null); $this->setIfExists('niablePay', $data ?? [], null); } @@ -408,33 +408,6 @@ public function valid(): bool } - /** - * Gets niCategory - * - * @return string|null - */ - public function getNiCategory(): ?string - { - return $this->container['niCategory']; - } - - /** - * Sets niCategory - * - * @param string|null $niCategory Calculated on NI table letter - * - * @return $this - */ - public function setNiCategory(?string $niCategory): static - { - if (is_null($niCategory)) { - throw new InvalidArgumentException('non-nullable niCategory cannot be null'); - } - $this->container['niCategory'] = $niCategory; - - return $this; - } - /** * Gets asDirector * @@ -463,28 +436,35 @@ public function setAsDirector(?bool $asDirector): static } /** - * Gets earningsUptoIncludingLEL + * Gets earningsAboveFUSTUptoIncludingUEL * * @return float|null */ - public function getEarningsUptoIncludingLEL(): ?float + public function getEarningsAboveFUSTUptoIncludingUEL(): ?float { - return $this->container['earningsUptoIncludingLEL']; + return $this->container['earningsAboveFUSTUptoIncludingUEL']; } /** - * Sets earningsUptoIncludingLEL + * Sets earningsAboveFUSTUptoIncludingUEL * - * @param float|null $earningsUptoIncludingLEL Earnings up to and including LEL + * @param float|null $earningsAboveFUSTUptoIncludingUEL Earnings above FUST up to UEL * * @return $this */ - public function setEarningsUptoIncludingLEL(?float $earningsUptoIncludingLEL): static + public function setEarningsAboveFUSTUptoIncludingUEL(?float $earningsAboveFUSTUptoIncludingUEL): static { - if (is_null($earningsUptoIncludingLEL)) { - throw new InvalidArgumentException('non-nullable earningsUptoIncludingLEL cannot be null'); + if (is_null($earningsAboveFUSTUptoIncludingUEL)) { + array_push($this->openAPINullablesSetToNull, 'earningsAboveFUSTUptoIncludingUEL'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('earningsAboveFUSTUptoIncludingUEL', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['earningsUptoIncludingLEL'] = $earningsUptoIncludingLEL; + $this->container['earningsAboveFUSTUptoIncludingUEL'] = $earningsAboveFUSTUptoIncludingUEL; return $this; } @@ -570,6 +550,40 @@ public function setEarningsAbovePTUptoIncludingUEL(?float $earningsAbovePTUptoIn return $this; } + /** + * Gets earningsAboveSTUptoIncludingFUST + * + * @return float|null + */ + public function getEarningsAboveSTUptoIncludingFUST(): ?float + { + return $this->container['earningsAboveSTUptoIncludingFUST']; + } + + /** + * Sets earningsAboveSTUptoIncludingFUST + * + * @param float|null $earningsAboveSTUptoIncludingFUST Earnings above ST up to FUST + * + * @return $this + */ + public function setEarningsAboveSTUptoIncludingFUST(?float $earningsAboveSTUptoIncludingFUST): static + { + if (is_null($earningsAboveSTUptoIncludingFUST)) { + array_push($this->openAPINullablesSetToNull, 'earningsAboveSTUptoIncludingFUST'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('earningsAboveSTUptoIncludingFUST', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['earningsAboveSTUptoIncludingFUST'] = $earningsAboveSTUptoIncludingFUST; + + return $this; + } + /** * Gets earningsAboveSTUptoIncludingUEL * @@ -598,96 +612,82 @@ public function setEarningsAboveSTUptoIncludingUEL(?float $earningsAboveSTUptoIn } /** - * Gets earningsAboveSTUptoIncludingFUST + * Gets earningsAboveUEL * * @return float|null */ - public function getEarningsAboveSTUptoIncludingFUST(): ?float + public function getEarningsAboveUEL(): ?float { - return $this->container['earningsAboveSTUptoIncludingFUST']; + return $this->container['earningsAboveUEL']; } /** - * Sets earningsAboveSTUptoIncludingFUST + * Sets earningsAboveUEL * - * @param float|null $earningsAboveSTUptoIncludingFUST Earnings above ST up to FUST + * @param float|null $earningsAboveUEL Earnings above UEL * * @return $this */ - public function setEarningsAboveSTUptoIncludingFUST(?float $earningsAboveSTUptoIncludingFUST): static + public function setEarningsAboveUEL(?float $earningsAboveUEL): static { - if (is_null($earningsAboveSTUptoIncludingFUST)) { - array_push($this->openAPINullablesSetToNull, 'earningsAboveSTUptoIncludingFUST'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('earningsAboveSTUptoIncludingFUST', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($earningsAboveUEL)) { + throw new InvalidArgumentException('non-nullable earningsAboveUEL cannot be null'); } - $this->container['earningsAboveSTUptoIncludingFUST'] = $earningsAboveSTUptoIncludingFUST; + $this->container['earningsAboveUEL'] = $earningsAboveUEL; return $this; } /** - * Gets earningsAboveFUSTUptoIncludingUEL + * Gets earningsUptoIncludingLEL * * @return float|null */ - public function getEarningsAboveFUSTUptoIncludingUEL(): ?float + public function getEarningsUptoIncludingLEL(): ?float { - return $this->container['earningsAboveFUSTUptoIncludingUEL']; + return $this->container['earningsUptoIncludingLEL']; } /** - * Sets earningsAboveFUSTUptoIncludingUEL + * Sets earningsUptoIncludingLEL * - * @param float|null $earningsAboveFUSTUptoIncludingUEL Earnings above FUST up to UEL + * @param float|null $earningsUptoIncludingLEL Earnings up to and including LEL * * @return $this */ - public function setEarningsAboveFUSTUptoIncludingUEL(?float $earningsAboveFUSTUptoIncludingUEL): static + public function setEarningsUptoIncludingLEL(?float $earningsUptoIncludingLEL): static { - if (is_null($earningsAboveFUSTUptoIncludingUEL)) { - array_push($this->openAPINullablesSetToNull, 'earningsAboveFUSTUptoIncludingUEL'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('earningsAboveFUSTUptoIncludingUEL', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($earningsUptoIncludingLEL)) { + throw new InvalidArgumentException('non-nullable earningsUptoIncludingLEL cannot be null'); } - $this->container['earningsAboveFUSTUptoIncludingUEL'] = $earningsAboveFUSTUptoIncludingUEL; + $this->container['earningsUptoIncludingLEL'] = $earningsUptoIncludingLEL; return $this; } /** - * Gets earningsAboveUEL + * Gets employeeNi * * @return float|null */ - public function getEarningsAboveUEL(): ?float + public function getEmployeeNi(): ?float { - return $this->container['earningsAboveUEL']; + return $this->container['employeeNi']; } /** - * Sets earningsAboveUEL + * Sets employeeNi * - * @param float|null $earningsAboveUEL Earnings above UEL + * @param float|null $employeeNi [readonly] Net Employee National Insurance * * @return $this */ - public function setEarningsAboveUEL(?float $earningsAboveUEL): static + public function setEmployeeNi(?float $employeeNi): static { - if (is_null($earningsAboveUEL)) { - throw new InvalidArgumentException('non-nullable earningsAboveUEL cannot be null'); + if (is_null($employeeNi)) { + throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); } - $this->container['earningsAboveUEL'] = $earningsAboveUEL; + $this->container['employeeNi'] = $employeeNi; return $this; } @@ -747,136 +747,136 @@ public function setEmployeeNiRebate(?float $employeeNiRebate): static } /** - * Gets employerNiGross + * Gets employerNi * * @return float|null */ - public function getEmployerNiGross(): ?float + public function getEmployerNi(): ?float { - return $this->container['employerNiGross']; + return $this->container['employerNi']; } /** - * Sets employerNiGross + * Sets employerNi * - * @param float|null $employerNiGross Employer National Insurance Gross Value + * @param float|null $employerNi [readonly] Net Employer National Insurance * * @return $this */ - public function setEmployerNiGross(?float $employerNiGross): static + public function setEmployerNi(?float $employerNi): static { - if (is_null($employerNiGross)) { - throw new InvalidArgumentException('non-nullable employerNiGross cannot be null'); + if (is_null($employerNi)) { + throw new InvalidArgumentException('non-nullable employerNi cannot be null'); } - $this->container['employerNiGross'] = $employerNiGross; + $this->container['employerNi'] = $employerNi; return $this; } /** - * Gets employerNiRebate + * Gets employerNiGross * * @return float|null */ - public function getEmployerNiRebate(): ?float + public function getEmployerNiGross(): ?float { - return $this->container['employerNiRebate']; + return $this->container['employerNiGross']; } /** - * Sets employerNiRebate + * Sets employerNiGross * - * @param float|null $employerNiRebate Employer National Insurance Rebate Value + * @param float|null $employerNiGross Employer National Insurance Gross Value * * @return $this */ - public function setEmployerNiRebate(?float $employerNiRebate): static + public function setEmployerNiGross(?float $employerNiGross): static { - if (is_null($employerNiRebate)) { - throw new InvalidArgumentException('non-nullable employerNiRebate cannot be null'); + if (is_null($employerNiGross)) { + throw new InvalidArgumentException('non-nullable employerNiGross cannot be null'); } - $this->container['employerNiRebate'] = $employerNiRebate; + $this->container['employerNiGross'] = $employerNiGross; return $this; } /** - * Gets employeeNi + * Gets employerNiRebate * * @return float|null */ - public function getEmployeeNi(): ?float + public function getEmployerNiRebate(): ?float { - return $this->container['employeeNi']; + return $this->container['employerNiRebate']; } /** - * Sets employeeNi + * Sets employerNiRebate * - * @param float|null $employeeNi [readonly] Net Employee National Insurance + * @param float|null $employerNiRebate Employer National Insurance Rebate Value * * @return $this */ - public function setEmployeeNi(?float $employeeNi): static + public function setEmployerNiRebate(?float $employerNiRebate): static { - if (is_null($employeeNi)) { - throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); + if (is_null($employerNiRebate)) { + throw new InvalidArgumentException('non-nullable employerNiRebate cannot be null'); } - $this->container['employeeNi'] = $employeeNi; + $this->container['employerNiRebate'] = $employerNiRebate; return $this; } /** - * Gets employerNi + * Gets netNi * * @return float|null */ - public function getEmployerNi(): ?float + public function getNetNi(): ?float { - return $this->container['employerNi']; + return $this->container['netNi']; } /** - * Sets employerNi + * Sets netNi * - * @param float|null $employerNi [readonly] Net Employer National Insurance + * @param float|null $netNi [readonly] Net National Insurance (Employer + Employee) * * @return $this */ - public function setEmployerNi(?float $employerNi): static + public function setNetNi(?float $netNi): static { - if (is_null($employerNi)) { - throw new InvalidArgumentException('non-nullable employerNi cannot be null'); + if (is_null($netNi)) { + throw new InvalidArgumentException('non-nullable netNi cannot be null'); } - $this->container['employerNi'] = $employerNi; + $this->container['netNi'] = $netNi; return $this; } /** - * Gets netNi + * Gets niCategory * - * @return float|null + * @return string|null */ - public function getNetNi(): ?float + public function getNiCategory(): ?string { - return $this->container['netNi']; + return $this->container['niCategory']; } /** - * Sets netNi + * Sets niCategory * - * @param float|null $netNi [readonly] Net National Insurance (Employer + Employee) + * @param string|null $niCategory Calculated on NI table letter * * @return $this */ - public function setNetNi(?float $netNi): static + public function setNiCategory(?string $niCategory): static { - if (is_null($netNi)) { - throw new InvalidArgumentException('non-nullable netNi cannot be null'); + if (is_null($niCategory)) { + throw new InvalidArgumentException('non-nullable niCategory cannot be null'); } - $this->container['netNi'] = $netNi; + $this->container['niCategory'] = $niCategory; return $this; } diff --git a/src/Model/NationalInsuranceCalculationPeriodValues.php b/src/Model/NationalInsuranceCalculationPeriodValues.php index ee604b9..f85ebe8 100644 --- a/src/Model/NationalInsuranceCalculationPeriodValues.php +++ b/src/Model/NationalInsuranceCalculationPeriodValues.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,14 +60,14 @@ class NationalInsuranceCalculationPeriodValues implements ModelInterface, ArrayA * @var array */ protected static array $openAPITypes = [ + 'aust' => 'float', + 'fust' => 'float', 'lel' => 'float', 'pt' => 'float', 'st' => 'float', - 'fust' => 'float', 'uap' => 'float', - 'ust' => 'float', - 'aust' => 'float', 'uel' => 'float', + 'ust' => 'float', 'vust' => 'float' ]; @@ -77,14 +77,14 @@ class NationalInsuranceCalculationPeriodValues implements ModelInterface, ArrayA * @var array */ protected static array $openAPIFormats = [ + 'aust' => 'double', + 'fust' => 'double', 'lel' => 'double', 'pt' => 'double', 'st' => 'double', - 'fust' => 'double', 'uap' => 'double', - 'ust' => 'double', - 'aust' => 'double', 'uel' => 'double', + 'ust' => 'double', 'vust' => 'double' ]; @@ -94,14 +94,14 @@ class NationalInsuranceCalculationPeriodValues implements ModelInterface, ArrayA * @var array */ protected static array $openAPINullables = [ + 'aust' => false, + 'fust' => false, 'lel' => false, 'pt' => false, 'st' => false, - 'fust' => false, 'uap' => false, - 'ust' => false, - 'aust' => false, 'uel' => false, + 'ust' => false, 'vust' => false ]; @@ -191,14 +191,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'aust' => 'aust', + 'fust' => 'fust', 'lel' => 'lel', 'pt' => 'pt', 'st' => 'st', - 'fust' => 'fust', 'uap' => 'uap', - 'ust' => 'ust', - 'aust' => 'aust', 'uel' => 'uel', + 'ust' => 'ust', 'vust' => 'vust' ]; @@ -208,14 +208,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'aust' => 'setAust', + 'fust' => 'setFust', 'lel' => 'setLel', 'pt' => 'setPt', 'st' => 'setSt', - 'fust' => 'setFust', 'uap' => 'setUap', - 'ust' => 'setUst', - 'aust' => 'setAust', 'uel' => 'setUel', + 'ust' => 'setUst', 'vust' => 'setVust' ]; @@ -225,14 +225,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'aust' => 'getAust', + 'fust' => 'getFust', 'lel' => 'getLel', 'pt' => 'getPt', 'st' => 'getSt', - 'fust' => 'getFust', 'uap' => 'getUap', - 'ust' => 'getUst', - 'aust' => 'getAust', 'uel' => 'getUel', + 'ust' => 'getUst', 'vust' => 'getVust' ]; @@ -292,14 +292,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('aust', $data ?? [], null); + $this->setIfExists('fust', $data ?? [], null); $this->setIfExists('lel', $data ?? [], null); $this->setIfExists('pt', $data ?? [], null); $this->setIfExists('st', $data ?? [], null); - $this->setIfExists('fust', $data ?? [], null); $this->setIfExists('uap', $data ?? [], null); - $this->setIfExists('ust', $data ?? [], null); - $this->setIfExists('aust', $data ?? [], null); $this->setIfExists('uel', $data ?? [], null); + $this->setIfExists('ust', $data ?? [], null); $this->setIfExists('vust', $data ?? [], null); } @@ -346,217 +346,217 @@ public function valid(): bool /** - * Gets lel + * Gets aust * * @return float|null */ - public function getLel(): ?float + public function getAust(): ?float { - return $this->container['lel']; + return $this->container['aust']; } /** - * Sets lel + * Sets aust * - * @param float|null $lel [readonly] Lower Earnings Limit + * @param float|null $aust [readonly] Apprentice Upper Secondary Threshold (apprentice under 25) * * @return $this */ - public function setLel(?float $lel): static + public function setAust(?float $aust): static { - if (is_null($lel)) { - throw new InvalidArgumentException('non-nullable lel cannot be null'); + if (is_null($aust)) { + throw new InvalidArgumentException('non-nullable aust cannot be null'); } - $this->container['lel'] = $lel; + $this->container['aust'] = $aust; return $this; } /** - * Gets pt + * Gets fust * * @return float|null */ - public function getPt(): ?float + public function getFust(): ?float { - return $this->container['pt']; + return $this->container['fust']; } /** - * Sets pt + * Sets fust * - * @param float|null $pt [readonly] Primary Threshold + * @param float|null $fust [readonly] Freeports Upper Accrual Threshold * * @return $this */ - public function setPt(?float $pt): static + public function setFust(?float $fust): static { - if (is_null($pt)) { - throw new InvalidArgumentException('non-nullable pt cannot be null'); + if (is_null($fust)) { + throw new InvalidArgumentException('non-nullable fust cannot be null'); } - $this->container['pt'] = $pt; + $this->container['fust'] = $fust; return $this; } /** - * Gets st + * Gets lel * * @return float|null */ - public function getSt(): ?float + public function getLel(): ?float { - return $this->container['st']; + return $this->container['lel']; } /** - * Sets st + * Sets lel * - * @param float|null $st [readonly] Secondary Threshold + * @param float|null $lel [readonly] Lower Earnings Limit * * @return $this */ - public function setSt(?float $st): static + public function setLel(?float $lel): static { - if (is_null($st)) { - throw new InvalidArgumentException('non-nullable st cannot be null'); + if (is_null($lel)) { + throw new InvalidArgumentException('non-nullable lel cannot be null'); } - $this->container['st'] = $st; + $this->container['lel'] = $lel; return $this; } /** - * Gets fust + * Gets pt * * @return float|null */ - public function getFust(): ?float + public function getPt(): ?float { - return $this->container['fust']; + return $this->container['pt']; } /** - * Sets fust + * Sets pt * - * @param float|null $fust [readonly] Freeports Upper Accrual Threshold + * @param float|null $pt [readonly] Primary Threshold * * @return $this */ - public function setFust(?float $fust): static + public function setPt(?float $pt): static { - if (is_null($fust)) { - throw new InvalidArgumentException('non-nullable fust cannot be null'); + if (is_null($pt)) { + throw new InvalidArgumentException('non-nullable pt cannot be null'); } - $this->container['fust'] = $fust; + $this->container['pt'] = $pt; return $this; } /** - * Gets uap + * Gets st * * @return float|null */ - public function getUap(): ?float + public function getSt(): ?float { - return $this->container['uap']; + return $this->container['st']; } /** - * Sets uap + * Sets st * - * @param float|null $uap [readonly] Upper Accrual Point + * @param float|null $st [readonly] Secondary Threshold * * @return $this */ - public function setUap(?float $uap): static + public function setSt(?float $st): static { - if (is_null($uap)) { - throw new InvalidArgumentException('non-nullable uap cannot be null'); + if (is_null($st)) { + throw new InvalidArgumentException('non-nullable st cannot be null'); } - $this->container['uap'] = $uap; + $this->container['st'] = $st; return $this; } /** - * Gets ust + * Gets uap * * @return float|null */ - public function getUst(): ?float + public function getUap(): ?float { - return $this->container['ust']; + return $this->container['uap']; } /** - * Sets ust + * Sets uap * - * @param float|null $ust [readonly] Upper Secondary Threshold (under 21) + * @param float|null $uap [readonly] Upper Accrual Point * * @return $this */ - public function setUst(?float $ust): static + public function setUap(?float $uap): static { - if (is_null($ust)) { - throw new InvalidArgumentException('non-nullable ust cannot be null'); + if (is_null($uap)) { + throw new InvalidArgumentException('non-nullable uap cannot be null'); } - $this->container['ust'] = $ust; + $this->container['uap'] = $uap; return $this; } /** - * Gets aust + * Gets uel * * @return float|null */ - public function getAust(): ?float + public function getUel(): ?float { - return $this->container['aust']; + return $this->container['uel']; } /** - * Sets aust + * Sets uel * - * @param float|null $aust [readonly] Apprentice Upper Secondary Threshold (apprentice under 25) + * @param float|null $uel [readonly] Upper Earnings Limit * * @return $this */ - public function setAust(?float $aust): static + public function setUel(?float $uel): static { - if (is_null($aust)) { - throw new InvalidArgumentException('non-nullable aust cannot be null'); + if (is_null($uel)) { + throw new InvalidArgumentException('non-nullable uel cannot be null'); } - $this->container['aust'] = $aust; + $this->container['uel'] = $uel; return $this; } /** - * Gets uel + * Gets ust * * @return float|null */ - public function getUel(): ?float + public function getUst(): ?float { - return $this->container['uel']; + return $this->container['ust']; } /** - * Sets uel + * Sets ust * - * @param float|null $uel [readonly] Upper Earnings Limit + * @param float|null $ust [readonly] Upper Secondary Threshold (under 21) * * @return $this */ - public function setUel(?float $uel): static + public function setUst(?float $ust): static { - if (is_null($uel)) { - throw new InvalidArgumentException('non-nullable uel cannot be null'); + if (is_null($ust)) { + throw new InvalidArgumentException('non-nullable ust cannot be null'); } - $this->container['uel'] = $uel; + $this->container['ust'] = $ust; return $this; } diff --git a/src/Model/NationalInsuranceCode.php b/src/Model/NationalInsuranceCode.php index f47a882..f160b3e 100644 --- a/src/Model/NationalInsuranceCode.php +++ b/src/Model/NationalInsuranceCode.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -67,12 +67,12 @@ class NationalInsuranceCode implements ModelInterface, ArrayAccess, JsonSerializ 'eeD' => 'float', 'eeE' => 'float', 'eeF' => 'float', + 'effectiveFrom' => '\DateTime', 'erB' => 'float', 'erC' => 'float', 'erD' => 'float', 'erE' => 'float', 'erF' => 'float', - 'effectiveFrom' => '\DateTime', 'midYearChanges' => '\SynergiTech\Staffology\Model\NationalInsuranceCode[]' ]; @@ -89,12 +89,12 @@ class NationalInsuranceCode implements ModelInterface, ArrayAccess, JsonSerializ 'eeD' => 'double', 'eeE' => 'double', 'eeF' => 'double', + 'effectiveFrom' => 'date', 'erB' => 'double', 'erC' => 'double', 'erD' => 'double', 'erE' => 'double', 'erF' => 'double', - 'effectiveFrom' => 'date', 'midYearChanges' => null ]; @@ -111,12 +111,12 @@ class NationalInsuranceCode implements ModelInterface, ArrayAccess, JsonSerializ 'eeD' => false, 'eeE' => false, 'eeF' => false, + 'effectiveFrom' => true, 'erB' => false, 'erC' => false, 'erD' => false, 'erE' => false, 'erF' => false, - 'effectiveFrom' => true, 'midYearChanges' => true ]; @@ -213,12 +213,12 @@ public function isNullableSetToNull(string $property): bool 'eeD' => 'eeD', 'eeE' => 'eeE', 'eeF' => 'eeF', + 'effectiveFrom' => 'effectiveFrom', 'erB' => 'erB', 'erC' => 'erC', 'erD' => 'erD', 'erE' => 'erE', 'erF' => 'erF', - 'effectiveFrom' => 'effectiveFrom', 'midYearChanges' => 'midYearChanges' ]; @@ -235,12 +235,12 @@ public function isNullableSetToNull(string $property): bool 'eeD' => 'setEeD', 'eeE' => 'setEeE', 'eeF' => 'setEeF', + 'effectiveFrom' => 'setEffectiveFrom', 'erB' => 'setErB', 'erC' => 'setErC', 'erD' => 'setErD', 'erE' => 'setErE', 'erF' => 'setErF', - 'effectiveFrom' => 'setEffectiveFrom', 'midYearChanges' => 'setMidYearChanges' ]; @@ -257,12 +257,12 @@ public function isNullableSetToNull(string $property): bool 'eeD' => 'getEeD', 'eeE' => 'getEeE', 'eeF' => 'getEeF', + 'effectiveFrom' => 'getEffectiveFrom', 'erB' => 'getErB', 'erC' => 'getErC', 'erD' => 'getErD', 'erE' => 'getErE', 'erF' => 'getErF', - 'effectiveFrom' => 'getEffectiveFrom', 'midYearChanges' => 'getMidYearChanges' ]; @@ -329,12 +329,12 @@ public function __construct(?array $data = null) $this->setIfExists('eeD', $data ?? [], null); $this->setIfExists('eeE', $data ?? [], null); $this->setIfExists('eeF', $data ?? [], null); + $this->setIfExists('effectiveFrom', $data ?? [], null); $this->setIfExists('erB', $data ?? [], null); $this->setIfExists('erC', $data ?? [], null); $this->setIfExists('erD', $data ?? [], null); $this->setIfExists('erE', $data ?? [], null); $this->setIfExists('erF', $data ?? [], null); - $this->setIfExists('effectiveFrom', $data ?? [], null); $this->setIfExists('midYearChanges', $data ?? [], null); } @@ -576,6 +576,40 @@ public function setEeF(?float $eeF): static return $this; } + /** + * Gets effectiveFrom + * + * @return \DateTime|null + */ + public function getEffectiveFrom(): ?\DateTime + { + return $this->container['effectiveFrom']; + } + + /** + * Sets effectiveFrom + * + * @param \DateTime|null $effectiveFrom The date when these period values are effective + * + * @return $this + */ + public function setEffectiveFrom(?\DateTime $effectiveFrom): static + { + if (is_null($effectiveFrom)) { + array_push($this->openAPINullablesSetToNull, 'effectiveFrom'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('effectiveFrom', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['effectiveFrom'] = $effectiveFrom; + + return $this; + } + /** * Gets erB * @@ -711,40 +745,6 @@ public function setErF(?float $erF): static return $this; } - /** - * Gets effectiveFrom - * - * @return \DateTime|null - */ - public function getEffectiveFrom(): ?\DateTime - { - return $this->container['effectiveFrom']; - } - - /** - * Sets effectiveFrom - * - * @param \DateTime|null $effectiveFrom The date when these period values are effective - * - * @return $this - */ - public function setEffectiveFrom(?\DateTime $effectiveFrom): static - { - if (is_null($effectiveFrom)) { - array_push($this->openAPINullablesSetToNull, 'effectiveFrom'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('effectiveFrom', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['effectiveFrom'] = $effectiveFrom; - - return $this; - } - /** * Gets midYearChanges * diff --git a/src/Model/NationalMinimumWage.php b/src/Model/NationalMinimumWage.php index 7c4098b..9963ea8 100644 --- a/src/Model/NationalMinimumWage.php +++ b/src/Model/NationalMinimumWage.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -61,8 +61,8 @@ class NationalMinimumWage implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPITypes = [ 'apprentice' => 'bool', - 'maxAge' => 'int', - 'hourlyAmount' => 'float' + 'hourlyAmount' => 'float', + 'maxAge' => 'int' ]; /** @@ -72,8 +72,8 @@ class NationalMinimumWage implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPIFormats = [ 'apprentice' => null, - 'maxAge' => 'int32', - 'hourlyAmount' => 'double' + 'hourlyAmount' => 'double', + 'maxAge' => 'int32' ]; /** @@ -83,8 +83,8 @@ class NationalMinimumWage implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPINullables = [ 'apprentice' => true, - 'maxAge' => false, - 'hourlyAmount' => false + 'hourlyAmount' => false, + 'maxAge' => false ]; /** @@ -174,8 +174,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'apprentice' => 'apprentice', - 'maxAge' => 'maxAge', - 'hourlyAmount' => 'hourlyAmount' + 'hourlyAmount' => 'hourlyAmount', + 'maxAge' => 'maxAge' ]; /** @@ -185,8 +185,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'apprentice' => 'setApprentice', - 'maxAge' => 'setMaxAge', - 'hourlyAmount' => 'setHourlyAmount' + 'hourlyAmount' => 'setHourlyAmount', + 'maxAge' => 'setMaxAge' ]; /** @@ -196,8 +196,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'apprentice' => 'getApprentice', - 'maxAge' => 'getMaxAge', - 'hourlyAmount' => 'getHourlyAmount' + 'hourlyAmount' => 'getHourlyAmount', + 'maxAge' => 'getMaxAge' ]; /** @@ -257,8 +257,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('apprentice', $data ?? [], null); - $this->setIfExists('maxAge', $data ?? [], null); $this->setIfExists('hourlyAmount', $data ?? [], null); + $this->setIfExists('maxAge', $data ?? [], null); } /** @@ -338,55 +338,55 @@ public function setApprentice(?bool $apprentice): static } /** - * Gets maxAge + * Gets hourlyAmount * - * @return int|null + * @return float|null */ - public function getMaxAge(): ?int + public function getHourlyAmount(): ?float { - return $this->container['maxAge']; + return $this->container['hourlyAmount']; } /** - * Sets maxAge + * Sets hourlyAmount * - * @param int|null $maxAge maxAge + * @param float|null $hourlyAmount hourlyAmount * * @return $this */ - public function setMaxAge(?int $maxAge): static + public function setHourlyAmount(?float $hourlyAmount): static { - if (is_null($maxAge)) { - throw new InvalidArgumentException('non-nullable maxAge cannot be null'); + if (is_null($hourlyAmount)) { + throw new InvalidArgumentException('non-nullable hourlyAmount cannot be null'); } - $this->container['maxAge'] = $maxAge; + $this->container['hourlyAmount'] = $hourlyAmount; return $this; } /** - * Gets hourlyAmount + * Gets maxAge * - * @return float|null + * @return int|null */ - public function getHourlyAmount(): ?float + public function getMaxAge(): ?int { - return $this->container['hourlyAmount']; + return $this->container['maxAge']; } /** - * Sets hourlyAmount + * Sets maxAge * - * @param float|null $hourlyAmount hourlyAmount + * @param int|null $maxAge maxAge * * @return $this */ - public function setHourlyAmount(?float $hourlyAmount): static + public function setMaxAge(?int $maxAge): static { - if (is_null($hourlyAmount)) { - throw new InvalidArgumentException('non-nullable hourlyAmount cannot be null'); + if (is_null($maxAge)) { + throw new InvalidArgumentException('non-nullable maxAge cannot be null'); } - $this->container['hourlyAmount'] = $hourlyAmount; + $this->container['maxAge'] = $maxAge; return $this; } diff --git a/src/Model/NeonatalCarePaymentTier.php b/src/Model/NeonatalCarePaymentTier.php index 285dfa7..9e464d9 100644 --- a/src/Model/NeonatalCarePaymentTier.php +++ b/src/Model/NeonatalCarePaymentTier.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/NiLetterError.php b/src/Model/NiLetterError.php index a5bd46c..d5e4416 100644 --- a/src/Model/NiLetterError.php +++ b/src/Model/NiLetterError.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/NiLetterValidationReport.php b/src/Model/NiLetterValidationReport.php index 3c3e6b1..b3c47c1 100644 --- a/src/Model/NiLetterValidationReport.php +++ b/src/Model/NiLetterValidationReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,21 +60,22 @@ class NiLetterValidationReport implements ModelInterface, ArrayAccess, JsonSeria */ protected static array $openAPITypes = [ 'basedOnPayrun' => 'bool', - 'errorLines' => '\SynergiTech\Staffology\Model\NiLetterValidationReportLine[]', - 'paymentDate' => '\DateTime', 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'errorLines' => '\SynergiTech\Staffology\Model\NiLetterValidationReportLine[]', + 'isDraft' => 'bool', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'paymentDate' => '\DateTime', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -84,21 +85,22 @@ class NiLetterValidationReport implements ModelInterface, ArrayAccess, JsonSeria */ protected static array $openAPIFormats = [ 'basedOnPayrun' => null, - 'errorLines' => null, - 'paymentDate' => 'date', 'employer' => null, - 'payPeriod' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'errorLines' => null, + 'isDraft' => null, 'ordinal' => 'int32', + 'payPeriod' => null, + 'paymentDate' => 'date', 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -108,21 +110,22 @@ class NiLetterValidationReport implements ModelInterface, ArrayAccess, JsonSeria */ protected static array $openAPINullables = [ 'basedOnPayrun' => false, - 'errorLines' => true, - 'paymentDate' => true, 'employer' => false, - 'payPeriod' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'errorLines' => true, + 'isDraft' => false, 'ordinal' => false, + 'payPeriod' => false, + 'paymentDate' => true, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -212,21 +215,22 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'basedOnPayrun' => 'basedOnPayrun', - 'errorLines' => 'errorLines', - 'paymentDate' => 'paymentDate', 'employer' => 'employer', - 'payPeriod' => 'payPeriod', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'errorLines' => 'errorLines', + 'isDraft' => 'isDraft', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', + 'paymentDate' => 'paymentDate', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -236,21 +240,22 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'basedOnPayrun' => 'setBasedOnPayrun', - 'errorLines' => 'setErrorLines', - 'paymentDate' => 'setPaymentDate', 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'errorLines' => 'setErrorLines', + 'isDraft' => 'setIsDraft', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', + 'paymentDate' => 'setPaymentDate', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -260,21 +265,22 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'basedOnPayrun' => 'getBasedOnPayrun', - 'errorLines' => 'getErrorLines', - 'paymentDate' => 'getPaymentDate', 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'errorLines' => 'getErrorLines', + 'isDraft' => 'getIsDraft', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', + 'paymentDate' => 'getPaymentDate', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -334,21 +340,22 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('basedOnPayrun', $data ?? [], null); - $this->setIfExists('errorLines', $data ?? [], null); - $this->setIfExists('paymentDate', $data ?? [], null); $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('errorLines', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('paymentDate', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -420,6 +427,94 @@ public function setBasedOnPayrun(?bool $basedOnPayrun): static return $this; } + /** + * Gets employer + * + * @return \SynergiTech\Staffology\Model\Item|null + */ + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + { + return $this->container['employer']; + } + + /** + * Sets employer + * + * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * + * @return $this + */ + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + { + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); + } + $this->container['employer'] = $employer; + + return $this; + } + + /** + * Gets endDate + * + * @return \DateTime|null + */ + public function getEndDate(): ?\DateTime + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param \DateTime|null $endDate endDate + * + * @return $this + */ + public function setEndDate(?\DateTime $endDate): static + { + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets endPeriodName + * + * @return string|null + */ + public function getEndPeriodName(): ?string + { + return $this->container['endPeriodName']; + } + + /** + * Sets endPeriodName + * + * @param string|null $endPeriodName endPeriodName + * + * @return $this + */ + public function setEndPeriodName(?string $endPeriodName): static + { + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['endPeriodName'] = $endPeriodName; + + return $this; + } + /** * Gets errorLines * @@ -455,62 +550,55 @@ public function setErrorLines(?array $errorLines): static } /** - * Gets paymentDate + * Gets isDraft * - * @return \DateTime|null + * @return bool|null */ - public function getPaymentDate(): ?\DateTime + public function getIsDraft(): ?bool { - return $this->container['paymentDate']; + return $this->container['isDraft']; } /** - * Sets paymentDate + * Sets isDraft * - * @param \DateTime|null $paymentDate paymentDate + * @param bool|null $isDraft isDraft * * @return $this */ - public function setPaymentDate(?\DateTime $paymentDate): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($paymentDate)) { - array_push($this->openAPINullablesSetToNull, 'paymentDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paymentDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['paymentDate'] = $paymentDate; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets employer + * Gets ordinal * - * @return \SynergiTech\Staffology\Model\Item|null + * @return int|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getOrdinal(): ?int { - return $this->container['employer']; + return $this->container['ordinal']; } /** - * Sets employer + * Sets ordinal * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param int|null $ordinal ordinal * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setOrdinal(?int $ordinal): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['employer'] = $employer; + $this->container['ordinal'] = $ordinal; return $this; } @@ -543,28 +631,35 @@ public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPerio } /** - * Gets ordinal + * Gets paymentDate * - * @return int|null + * @return \DateTime|null */ - public function getOrdinal(): ?int + public function getPaymentDate(): ?\DateTime { - return $this->container['ordinal']; + return $this->container['paymentDate']; } /** - * Sets ordinal + * Sets paymentDate * - * @param int|null $ordinal ordinal + * @param \DateTime|null $paymentDate paymentDate * * @return $this */ - public function setOrdinal(?int $ordinal): static + public function setPaymentDate(?\DateTime $paymentDate): static { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + if (is_null($paymentDate)) { + array_push($this->openAPINullablesSetToNull, 'paymentDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('paymentDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['ordinal'] = $ordinal; + $this->container['paymentDate'] = $paymentDate; return $this; } @@ -624,69 +719,28 @@ public function setPeriodTo(?int $periodTo): static } /** - * Gets startPeriodName - * - * @return string|null - */ - public function getStartPeriodName(): ?string - { - return $this->container['startPeriodName']; - } - - /** - * Sets startPeriodName - * - * @param string|null $startPeriodName startPeriodName - * - * @return $this - */ - public function setStartPeriodName(?string $startPeriodName): static - { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['startPeriodName'] = $startPeriodName; - - return $this; - } - - /** - * Gets endPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getEndPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['endPeriodName']; + return $this->container['report']; } /** - * Sets endPeriodName + * Sets report * - * @param string|null $endPeriodName endPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['report'] = $report; return $this; } @@ -719,55 +773,35 @@ public function setStartDate(?\DateTime $startDate): static } /** - * Gets endDate - * - * @return \DateTime|null - */ - public function getEndDate(): ?\DateTime - { - return $this->container['endDate']; - } - - /** - * Sets endDate - * - * @param \DateTime|null $endDate endDate - * - * @return $this - */ - public function setEndDate(?\DateTime $endDate): static - { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); - } - $this->container['endDate'] = $endDate; - - return $this; - } - - /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -834,28 +868,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/NiLetterValidationReportLine.php b/src/Model/NiLetterValidationReportLine.php index 81a901e..9afb765 100644 --- a/src/Model/NiLetterValidationReportLine.php +++ b/src/Model/NiLetterValidationReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,15 @@ class NiLetterValidationReportLine implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'employeeId' => 'string', - 'payrollCode' => 'string', - 'name' => 'string', - 'niNumber' => 'string', - 'gender' => '\SynergiTech\Staffology\Model\Gender', 'dateOfBirth' => '\DateTime', - 'niLetterError' => '\SynergiTech\Staffology\Model\NiLetterError', + 'employeeId' => 'string', 'errorDetails' => 'string', + 'gender' => '\SynergiTech\Staffology\Model\Gender', + 'name' => 'string', 'niLetter' => 'string', + 'niLetterError' => '\SynergiTech\Staffology\Model\NiLetterError', + 'niNumber' => 'string', + 'payrollCode' => 'string', 'suggestedLetter' => 'string' ]; @@ -77,15 +77,15 @@ class NiLetterValidationReportLine implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'employeeId' => 'uuid', - 'payrollCode' => null, - 'name' => null, - 'niNumber' => null, - 'gender' => null, 'dateOfBirth' => 'date', - 'niLetterError' => null, + 'employeeId' => 'uuid', 'errorDetails' => null, + 'gender' => null, + 'name' => null, 'niLetter' => null, + 'niLetterError' => null, + 'niNumber' => null, + 'payrollCode' => null, 'suggestedLetter' => null ]; @@ -95,15 +95,15 @@ class NiLetterValidationReportLine implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'employeeId' => false, - 'payrollCode' => true, - 'name' => true, - 'niNumber' => true, - 'gender' => false, 'dateOfBirth' => false, - 'niLetterError' => false, + 'employeeId' => false, 'errorDetails' => true, + 'gender' => false, + 'name' => true, 'niLetter' => true, + 'niLetterError' => false, + 'niNumber' => true, + 'payrollCode' => true, 'suggestedLetter' => true ]; @@ -193,15 +193,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employeeId' => 'employeeId', - 'payrollCode' => 'payrollCode', - 'name' => 'name', - 'niNumber' => 'niNumber', - 'gender' => 'gender', 'dateOfBirth' => 'dateOfBirth', - 'niLetterError' => 'niLetterError', + 'employeeId' => 'employeeId', 'errorDetails' => 'errorDetails', + 'gender' => 'gender', + 'name' => 'name', 'niLetter' => 'niLetter', + 'niLetterError' => 'niLetterError', + 'niNumber' => 'niNumber', + 'payrollCode' => 'payrollCode', 'suggestedLetter' => 'suggestedLetter' ]; @@ -211,15 +211,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employeeId' => 'setEmployeeId', - 'payrollCode' => 'setPayrollCode', - 'name' => 'setName', - 'niNumber' => 'setNiNumber', - 'gender' => 'setGender', 'dateOfBirth' => 'setDateOfBirth', - 'niLetterError' => 'setNiLetterError', + 'employeeId' => 'setEmployeeId', 'errorDetails' => 'setErrorDetails', + 'gender' => 'setGender', + 'name' => 'setName', 'niLetter' => 'setNiLetter', + 'niLetterError' => 'setNiLetterError', + 'niNumber' => 'setNiNumber', + 'payrollCode' => 'setPayrollCode', 'suggestedLetter' => 'setSuggestedLetter' ]; @@ -229,15 +229,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employeeId' => 'getEmployeeId', - 'payrollCode' => 'getPayrollCode', - 'name' => 'getName', - 'niNumber' => 'getNiNumber', - 'gender' => 'getGender', 'dateOfBirth' => 'getDateOfBirth', - 'niLetterError' => 'getNiLetterError', + 'employeeId' => 'getEmployeeId', 'errorDetails' => 'getErrorDetails', + 'gender' => 'getGender', + 'name' => 'getName', 'niLetter' => 'getNiLetter', + 'niLetterError' => 'getNiLetterError', + 'niNumber' => 'getNiNumber', + 'payrollCode' => 'getPayrollCode', 'suggestedLetter' => 'getSuggestedLetter' ]; @@ -297,15 +297,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employeeId', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('niNumber', $data ?? [], null); - $this->setIfExists('gender', $data ?? [], null); $this->setIfExists('dateOfBirth', $data ?? [], null); - $this->setIfExists('niLetterError', $data ?? [], null); + $this->setIfExists('employeeId', $data ?? [], null); $this->setIfExists('errorDetails', $data ?? [], null); + $this->setIfExists('gender', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('niLetter', $data ?? [], null); + $this->setIfExists('niLetterError', $data ?? [], null); + $this->setIfExists('niNumber', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('suggestedLetter', $data ?? [], null); } @@ -352,184 +352,184 @@ public function valid(): bool /** - * Gets employeeId + * Gets dateOfBirth * - * @return string|null + * @return \DateTime|null */ - public function getEmployeeId(): ?string + public function getDateOfBirth(): ?\DateTime { - return $this->container['employeeId']; + return $this->container['dateOfBirth']; } /** - * Sets employeeId + * Sets dateOfBirth * - * @param string|null $employeeId employeeId + * @param \DateTime|null $dateOfBirth dateOfBirth * * @return $this */ - public function setEmployeeId(?string $employeeId): static + public function setDateOfBirth(?\DateTime $dateOfBirth): static { - if (is_null($employeeId)) { - throw new InvalidArgumentException('non-nullable employeeId cannot be null'); + if (is_null($dateOfBirth)) { + throw new InvalidArgumentException('non-nullable dateOfBirth cannot be null'); } - $this->container['employeeId'] = $employeeId; + $this->container['dateOfBirth'] = $dateOfBirth; return $this; } /** - * Gets payrollCode + * Gets employeeId * * @return string|null */ - public function getPayrollCode(): ?string + public function getEmployeeId(): ?string { - return $this->container['payrollCode']; + return $this->container['employeeId']; } /** - * Sets payrollCode + * Sets employeeId * - * @param string|null $payrollCode payrollCode + * @param string|null $employeeId employeeId * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setEmployeeId(?string $employeeId): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employeeId)) { + throw new InvalidArgumentException('non-nullable employeeId cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['employeeId'] = $employeeId; return $this; } /** - * Gets name + * Gets errorDetails * * @return string|null */ - public function getName(): ?string + public function getErrorDetails(): ?string { - return $this->container['name']; + return $this->container['errorDetails']; } /** - * Sets name + * Sets errorDetails * - * @param string|null $name name + * @param string|null $errorDetails errorDetails * * @return $this */ - public function setName(?string $name): static + public function setErrorDetails(?string $errorDetails): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($errorDetails)) { + array_push($this->openAPINullablesSetToNull, 'errorDetails'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('errorDetails', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['errorDetails'] = $errorDetails; return $this; } /** - * Gets niNumber + * Gets gender * - * @return string|null + * @return \SynergiTech\Staffology\Model\Gender|null */ - public function getNiNumber(): ?string + public function getGender(): ?\SynergiTech\Staffology\Model\Gender { - return $this->container['niNumber']; + return $this->container['gender']; } /** - * Sets niNumber + * Sets gender * - * @param string|null $niNumber niNumber + * @param \SynergiTech\Staffology\Model\Gender|null $gender gender * * @return $this */ - public function setNiNumber(?string $niNumber): static + public function setGender(?\SynergiTech\Staffology\Model\Gender $gender): static { - if (is_null($niNumber)) { - array_push($this->openAPINullablesSetToNull, 'niNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($gender)) { + throw new InvalidArgumentException('non-nullable gender cannot be null'); } - $this->container['niNumber'] = $niNumber; + $this->container['gender'] = $gender; return $this; } /** - * Gets gender + * Gets name * - * @return \SynergiTech\Staffology\Model\Gender|null + * @return string|null */ - public function getGender(): ?\SynergiTech\Staffology\Model\Gender + public function getName(): ?string { - return $this->container['gender']; + return $this->container['name']; } /** - * Sets gender + * Sets name * - * @param \SynergiTech\Staffology\Model\Gender|null $gender gender + * @param string|null $name name * * @return $this */ - public function setGender(?\SynergiTech\Staffology\Model\Gender $gender): static + public function setName(?string $name): static { - if (is_null($gender)) { - throw new InvalidArgumentException('non-nullable gender cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['gender'] = $gender; + $this->container['name'] = $name; return $this; } /** - * Gets dateOfBirth + * Gets niLetter * - * @return \DateTime|null + * @return string|null */ - public function getDateOfBirth(): ?\DateTime + public function getNiLetter(): ?string { - return $this->container['dateOfBirth']; + return $this->container['niLetter']; } /** - * Sets dateOfBirth + * Sets niLetter * - * @param \DateTime|null $dateOfBirth dateOfBirth + * @param string|null $niLetter niLetter * * @return $this */ - public function setDateOfBirth(?\DateTime $dateOfBirth): static + public function setNiLetter(?string $niLetter): static { - if (is_null($dateOfBirth)) { - throw new InvalidArgumentException('non-nullable dateOfBirth cannot be null'); + if (is_null($niLetter)) { + array_push($this->openAPINullablesSetToNull, 'niLetter'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('niLetter', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['dateOfBirth'] = $dateOfBirth; + $this->container['niLetter'] = $niLetter; return $this; } @@ -562,69 +562,69 @@ public function setNiLetterError(?\SynergiTech\Staffology\Model\NiLetterError $n } /** - * Gets errorDetails + * Gets niNumber * * @return string|null */ - public function getErrorDetails(): ?string + public function getNiNumber(): ?string { - return $this->container['errorDetails']; + return $this->container['niNumber']; } /** - * Sets errorDetails + * Sets niNumber * - * @param string|null $errorDetails errorDetails + * @param string|null $niNumber niNumber * * @return $this */ - public function setErrorDetails(?string $errorDetails): static + public function setNiNumber(?string $niNumber): static { - if (is_null($errorDetails)) { - array_push($this->openAPINullablesSetToNull, 'errorDetails'); + if (is_null($niNumber)) { + array_push($this->openAPINullablesSetToNull, 'niNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('errorDetails', $nullablesSetToNull); + $index = array_search('niNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['errorDetails'] = $errorDetails; + $this->container['niNumber'] = $niNumber; return $this; } /** - * Gets niLetter + * Gets payrollCode * * @return string|null */ - public function getNiLetter(): ?string + public function getPayrollCode(): ?string { - return $this->container['niLetter']; + return $this->container['payrollCode']; } /** - * Sets niLetter + * Sets payrollCode * - * @param string|null $niLetter niLetter + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setNiLetter(?string $niLetter): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($niLetter)) { - array_push($this->openAPINullablesSetToNull, 'niLetter'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niLetter', $nullablesSetToNull); + $index = array_search('payrollCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['niLetter'] = $niLetter; + $this->container['payrollCode'] = $payrollCode; return $this; } diff --git a/src/Model/NiLetterValidationReportReportResponse.php b/src/Model/NiLetterValidationReportReportResponse.php index 18c31db..dfe307d 100644 --- a/src/Model/NiLetterValidationReportReportResponse.php +++ b/src/Model/NiLetterValidationReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class NiLetterValidationReportReportResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\NiLetterValidationReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class NiLetterValidationReportReportResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class NiLetterValidationReportReportResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/NiYtdReport.php b/src/Model/NiYtdReport.php index 38674a3..0eba521 100644 --- a/src/Model/NiYtdReport.php +++ b/src/Model/NiYtdReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class NiYtdReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'payrun' => '\SynergiTech\Staffology\Model\PayRun', + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\EmployeeNiYtdValues[]', + 'payrun' => '\SynergiTech\Staffology\Model\PayRun', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -73,12 +73,12 @@ class NiYtdReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'payrun' => null, + 'isDraft' => null, 'lines' => null, + 'payrun' => null, 'report' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -87,12 +87,12 @@ class NiYtdReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'payrun' => false, + 'isDraft' => false, 'lines' => true, + 'payrun' => false, 'report' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrun' => 'payrun', + 'isDraft' => 'isDraft', 'lines' => 'lines', + 'payrun' => 'payrun', 'report' => 'report', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrun' => 'setPayrun', + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', + 'payrun' => 'setPayrun', 'report' => 'setReport', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrun' => 'getPayrun', + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', + 'payrun' => 'getPayrun', 'report' => 'getReport', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrun', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('payrun', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -324,28 +324,28 @@ public function valid(): bool /** - * Gets payrun + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\PayRun|null + * @return bool|null */ - public function getPayrun(): ?\SynergiTech\Staffology\Model\PayRun + public function getIsDraft(): ?bool { - return $this->container['payrun']; + return $this->container['isDraft']; } /** - * Sets payrun + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\PayRun|null $payrun payrun + * @param bool|null $isDraft isDraft * * @return $this */ - public function setPayrun(?\SynergiTech\Staffology\Model\PayRun $payrun): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($payrun)) { - throw new InvalidArgumentException('non-nullable payrun cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['payrun'] = $payrun; + $this->container['isDraft'] = $isDraft; return $this; } @@ -384,6 +384,33 @@ public function setLines(?array $lines): static return $this; } + /** + * Gets payrun + * + * @return \SynergiTech\Staffology\Model\PayRun|null + */ + public function getPayrun(): ?\SynergiTech\Staffology\Model\PayRun + { + return $this->container['payrun']; + } + + /** + * Sets payrun + * + * @param \SynergiTech\Staffology\Model\PayRun|null $payrun payrun + * + * @return $this + */ + public function setPayrun(?\SynergiTech\Staffology\Model\PayRun $payrun): static + { + if (is_null($payrun)) { + throw new InvalidArgumentException('non-nullable payrun cannot be null'); + } + $this->container['payrun'] = $payrun; + + return $this; + } + /** * Gets report * @@ -471,33 +498,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/NiYtdReportReportResponse.php b/src/Model/NiYtdReportReportResponse.php index 7f8b8e7..10e62dd 100644 --- a/src/Model/NiYtdReportReportResponse.php +++ b/src/Model/NiYtdReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class NiYtdReportReportResponse implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\NiYtdReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class NiYtdReportReportResponse implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class NiYtdReportReportResponse implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/NiYtdValue.php b/src/Model/NiYtdValue.php index b41044f..f2d72db 100644 --- a/src/Model/NiYtdValue.php +++ b/src/Model/NiYtdValue.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class NiYtdValue implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'broughtForward' => 'float', 'period' => 'float', + 'type' => 'string', 'value' => 'float' ]; @@ -71,9 +71,9 @@ class NiYtdValue implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'broughtForward' => 'double', 'period' => 'double', + 'type' => null, 'value' => 'double' ]; @@ -83,9 +83,9 @@ class NiYtdValue implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'broughtForward' => false, 'period' => false, + 'type' => true, 'value' => false ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'broughtForward' => 'broughtForward', 'period' => 'period', + 'type' => 'type', 'value' => 'value' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'broughtForward' => 'setBroughtForward', 'period' => 'setPeriod', + 'type' => 'setType', 'value' => 'setValue' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'broughtForward' => 'getBroughtForward', 'period' => 'getPeriod', + 'type' => 'getType', 'value' => 'getValue' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('broughtForward', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); } @@ -309,40 +309,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets broughtForward * @@ -397,6 +363,40 @@ public function setPeriod(?float $period): static return $this; } + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type type + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } + /** * Gets value * diff --git a/src/Model/NicSummary.php b/src/Model/NicSummary.php index c28a623..2d74166 100644 --- a/src/Model/NicSummary.php +++ b/src/Model/NicSummary.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,29 +59,31 @@ class NicSummary implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'paymentDate' => '\DateTime', - 'niTable' => 'string', 'asDirector' => 'bool', - 'grossEarningsForNics' => 'float', - 'earningsAtLel' => 'float', + 'childId' => 'string', + 'earningsAboveFustToUel' => 'float', 'earningsAboveLelToPt' => 'float', 'earningsAbovePtToSt' => 'float', 'earningsAbovePtToUap' => 'float', - 'earningsAboveStToUel' => 'float', 'earningsAboveStToFust' => 'float', - 'earningsAboveFustToUel' => 'float', + 'earningsAboveStToUel' => 'float', 'earningsAboveUapToUel' => 'float', 'earningsAboveUel' => 'float', - 'employeeNics' => 'float', + 'earningsAtLel' => 'float', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'employeeNiRebate' => 'float', - 'employerNics' => 'float', + 'employeeNics' => 'float', 'employerNiRebate' => 'float', + 'employerNics' => 'float', + 'grossEarningsForNics' => 'float', 'hasValues' => 'bool', 'id' => 'string', + 'isLatestVersion' => 'bool', 'isNiYtdOverride' => 'bool', - 'childId' => 'string', - 'employee' => '\SynergiTech\Staffology\Model\Item' + 'niTable' => 'string', + 'payRunVersion' => 'int', + 'paymentDate' => '\DateTime', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear' ]; /** @@ -90,29 +92,31 @@ class NicSummary implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'taxYear' => null, - 'paymentDate' => 'date', - 'niTable' => null, 'asDirector' => null, - 'grossEarningsForNics' => 'double', - 'earningsAtLel' => 'double', + 'childId' => 'uuid', + 'earningsAboveFustToUel' => 'double', 'earningsAboveLelToPt' => 'double', 'earningsAbovePtToSt' => 'double', 'earningsAbovePtToUap' => 'double', - 'earningsAboveStToUel' => 'double', 'earningsAboveStToFust' => 'double', - 'earningsAboveFustToUel' => 'double', + 'earningsAboveStToUel' => 'double', 'earningsAboveUapToUel' => 'double', 'earningsAboveUel' => 'double', - 'employeeNics' => 'double', + 'earningsAtLel' => 'double', + 'employee' => null, 'employeeNiRebate' => 'double', - 'employerNics' => 'double', + 'employeeNics' => 'double', 'employerNiRebate' => 'double', + 'employerNics' => 'double', + 'grossEarningsForNics' => 'double', 'hasValues' => null, 'id' => 'uuid', + 'isLatestVersion' => null, 'isNiYtdOverride' => null, - 'childId' => 'uuid', - 'employee' => null + 'niTable' => null, + 'payRunVersion' => 'int32', + 'paymentDate' => 'date', + 'taxYear' => null ]; /** @@ -121,29 +125,31 @@ class NicSummary implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'taxYear' => false, - 'paymentDate' => false, - 'niTable' => false, 'asDirector' => false, - 'grossEarningsForNics' => false, - 'earningsAtLel' => false, + 'childId' => false, + 'earningsAboveFustToUel' => false, 'earningsAboveLelToPt' => false, 'earningsAbovePtToSt' => false, 'earningsAbovePtToUap' => false, - 'earningsAboveStToUel' => false, 'earningsAboveStToFust' => false, - 'earningsAboveFustToUel' => false, + 'earningsAboveStToUel' => false, 'earningsAboveUapToUel' => false, 'earningsAboveUel' => false, - 'employeeNics' => false, + 'earningsAtLel' => false, + 'employee' => false, 'employeeNiRebate' => false, - 'employerNics' => false, + 'employeeNics' => false, 'employerNiRebate' => false, + 'employerNics' => false, + 'grossEarningsForNics' => false, 'hasValues' => false, 'id' => false, + 'isLatestVersion' => false, 'isNiYtdOverride' => false, - 'childId' => false, - 'employee' => false + 'niTable' => false, + 'payRunVersion' => false, + 'paymentDate' => false, + 'taxYear' => false ]; /** @@ -232,29 +238,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'taxYear' => 'taxYear', - 'paymentDate' => 'paymentDate', - 'niTable' => 'niTable', 'asDirector' => 'asDirector', - 'grossEarningsForNics' => 'grossEarningsForNics', - 'earningsAtLel' => 'earningsAtLel', + 'childId' => 'childId', + 'earningsAboveFustToUel' => 'earningsAboveFustToUel', 'earningsAboveLelToPt' => 'earningsAboveLelToPt', 'earningsAbovePtToSt' => 'earningsAbovePtToSt', 'earningsAbovePtToUap' => 'earningsAbovePtToUap', - 'earningsAboveStToUel' => 'earningsAboveStToUel', 'earningsAboveStToFust' => 'earningsAboveStToFust', - 'earningsAboveFustToUel' => 'earningsAboveFustToUel', + 'earningsAboveStToUel' => 'earningsAboveStToUel', 'earningsAboveUapToUel' => 'earningsAboveUapToUel', 'earningsAboveUel' => 'earningsAboveUel', - 'employeeNics' => 'employeeNics', + 'earningsAtLel' => 'earningsAtLel', + 'employee' => 'employee', 'employeeNiRebate' => 'employeeNiRebate', - 'employerNics' => 'employerNics', + 'employeeNics' => 'employeeNics', 'employerNiRebate' => 'employerNiRebate', + 'employerNics' => 'employerNics', + 'grossEarningsForNics' => 'grossEarningsForNics', 'hasValues' => 'hasValues', 'id' => 'id', + 'isLatestVersion' => 'isLatestVersion', 'isNiYtdOverride' => 'isNiYtdOverride', - 'childId' => 'childId', - 'employee' => 'employee' + 'niTable' => 'niTable', + 'payRunVersion' => 'payRunVersion', + 'paymentDate' => 'paymentDate', + 'taxYear' => 'taxYear' ]; /** @@ -263,29 +271,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'taxYear' => 'setTaxYear', - 'paymentDate' => 'setPaymentDate', - 'niTable' => 'setNiTable', 'asDirector' => 'setAsDirector', - 'grossEarningsForNics' => 'setGrossEarningsForNics', - 'earningsAtLel' => 'setEarningsAtLel', + 'childId' => 'setChildId', + 'earningsAboveFustToUel' => 'setEarningsAboveFustToUel', 'earningsAboveLelToPt' => 'setEarningsAboveLelToPt', 'earningsAbovePtToSt' => 'setEarningsAbovePtToSt', 'earningsAbovePtToUap' => 'setEarningsAbovePtToUap', - 'earningsAboveStToUel' => 'setEarningsAboveStToUel', 'earningsAboveStToFust' => 'setEarningsAboveStToFust', - 'earningsAboveFustToUel' => 'setEarningsAboveFustToUel', + 'earningsAboveStToUel' => 'setEarningsAboveStToUel', 'earningsAboveUapToUel' => 'setEarningsAboveUapToUel', 'earningsAboveUel' => 'setEarningsAboveUel', - 'employeeNics' => 'setEmployeeNics', + 'earningsAtLel' => 'setEarningsAtLel', + 'employee' => 'setEmployee', 'employeeNiRebate' => 'setEmployeeNiRebate', - 'employerNics' => 'setEmployerNics', + 'employeeNics' => 'setEmployeeNics', 'employerNiRebate' => 'setEmployerNiRebate', + 'employerNics' => 'setEmployerNics', + 'grossEarningsForNics' => 'setGrossEarningsForNics', 'hasValues' => 'setHasValues', 'id' => 'setId', + 'isLatestVersion' => 'setIsLatestVersion', 'isNiYtdOverride' => 'setIsNiYtdOverride', - 'childId' => 'setChildId', - 'employee' => 'setEmployee' + 'niTable' => 'setNiTable', + 'payRunVersion' => 'setPayRunVersion', + 'paymentDate' => 'setPaymentDate', + 'taxYear' => 'setTaxYear' ]; /** @@ -294,29 +304,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'taxYear' => 'getTaxYear', - 'paymentDate' => 'getPaymentDate', - 'niTable' => 'getNiTable', 'asDirector' => 'getAsDirector', - 'grossEarningsForNics' => 'getGrossEarningsForNics', - 'earningsAtLel' => 'getEarningsAtLel', + 'childId' => 'getChildId', + 'earningsAboveFustToUel' => 'getEarningsAboveFustToUel', 'earningsAboveLelToPt' => 'getEarningsAboveLelToPt', 'earningsAbovePtToSt' => 'getEarningsAbovePtToSt', 'earningsAbovePtToUap' => 'getEarningsAbovePtToUap', - 'earningsAboveStToUel' => 'getEarningsAboveStToUel', 'earningsAboveStToFust' => 'getEarningsAboveStToFust', - 'earningsAboveFustToUel' => 'getEarningsAboveFustToUel', + 'earningsAboveStToUel' => 'getEarningsAboveStToUel', 'earningsAboveUapToUel' => 'getEarningsAboveUapToUel', 'earningsAboveUel' => 'getEarningsAboveUel', - 'employeeNics' => 'getEmployeeNics', + 'earningsAtLel' => 'getEarningsAtLel', + 'employee' => 'getEmployee', 'employeeNiRebate' => 'getEmployeeNiRebate', - 'employerNics' => 'getEmployerNics', + 'employeeNics' => 'getEmployeeNics', 'employerNiRebate' => 'getEmployerNiRebate', + 'employerNics' => 'getEmployerNics', + 'grossEarningsForNics' => 'getGrossEarningsForNics', 'hasValues' => 'getHasValues', 'id' => 'getId', + 'isLatestVersion' => 'getIsLatestVersion', 'isNiYtdOverride' => 'getIsNiYtdOverride', - 'childId' => 'getChildId', - 'employee' => 'getEmployee' + 'niTable' => 'getNiTable', + 'payRunVersion' => 'getPayRunVersion', + 'paymentDate' => 'getPaymentDate', + 'taxYear' => 'getTaxYear' ]; /** @@ -375,29 +387,31 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('paymentDate', $data ?? [], null); - $this->setIfExists('niTable', $data ?? [], null); $this->setIfExists('asDirector', $data ?? [], null); - $this->setIfExists('grossEarningsForNics', $data ?? [], null); - $this->setIfExists('earningsAtLel', $data ?? [], null); + $this->setIfExists('childId', $data ?? [], null); + $this->setIfExists('earningsAboveFustToUel', $data ?? [], null); $this->setIfExists('earningsAboveLelToPt', $data ?? [], null); $this->setIfExists('earningsAbovePtToSt', $data ?? [], null); $this->setIfExists('earningsAbovePtToUap', $data ?? [], null); - $this->setIfExists('earningsAboveStToUel', $data ?? [], null); $this->setIfExists('earningsAboveStToFust', $data ?? [], null); - $this->setIfExists('earningsAboveFustToUel', $data ?? [], null); + $this->setIfExists('earningsAboveStToUel', $data ?? [], null); $this->setIfExists('earningsAboveUapToUel', $data ?? [], null); $this->setIfExists('earningsAboveUel', $data ?? [], null); - $this->setIfExists('employeeNics', $data ?? [], null); + $this->setIfExists('earningsAtLel', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('employeeNiRebate', $data ?? [], null); - $this->setIfExists('employerNics', $data ?? [], null); + $this->setIfExists('employeeNics', $data ?? [], null); $this->setIfExists('employerNiRebate', $data ?? [], null); + $this->setIfExists('employerNics', $data ?? [], null); + $this->setIfExists('grossEarningsForNics', $data ?? [], null); $this->setIfExists('hasValues', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isLatestVersion', $data ?? [], null); $this->setIfExists('isNiYtdOverride', $data ?? [], null); - $this->setIfExists('childId', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('niTable', $data ?? [], null); + $this->setIfExists('payRunVersion', $data ?? [], null); + $this->setIfExists('paymentDate', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); } /** @@ -442,87 +456,6 @@ public function valid(): bool } - /** - * Gets taxYear - * - * @return \SynergiTech\Staffology\Model\TaxYear|null - */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear - { - return $this->container['taxYear']; - } - - /** - * Sets taxYear - * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear - * - * @return $this - */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static - { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); - } - $this->container['taxYear'] = $taxYear; - - return $this; - } - - /** - * Gets paymentDate - * - * @return \DateTime|null - */ - public function getPaymentDate(): ?\DateTime - { - return $this->container['paymentDate']; - } - - /** - * Sets paymentDate - * - * @param \DateTime|null $paymentDate paymentDate - * - * @return $this - */ - public function setPaymentDate(?\DateTime $paymentDate): static - { - if (is_null($paymentDate)) { - throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); - } - $this->container['paymentDate'] = $paymentDate; - - return $this; - } - - /** - * Gets niTable - * - * @return string|null - */ - public function getNiTable(): ?string - { - return $this->container['niTable']; - } - - /** - * Sets niTable - * - * @param string|null $niTable niTable - * - * @return $this - */ - public function setNiTable(?string $niTable): static - { - if (is_null($niTable)) { - throw new InvalidArgumentException('non-nullable niTable cannot be null'); - } - $this->container['niTable'] = $niTable; - - return $this; - } - /** * Gets asDirector * @@ -551,55 +484,55 @@ public function setAsDirector(?bool $asDirector): static } /** - * Gets grossEarningsForNics + * Gets childId * - * @return float|null + * @return string|null */ - public function getGrossEarningsForNics(): ?float + public function getChildId(): ?string { - return $this->container['grossEarningsForNics']; + return $this->container['childId']; } /** - * Sets grossEarningsForNics + * Sets childId * - * @param float|null $grossEarningsForNics grossEarningsForNics + * @param string|null $childId This is nothing but the UniqueId of the model. * * @return $this */ - public function setGrossEarningsForNics(?float $grossEarningsForNics): static + public function setChildId(?string $childId): static { - if (is_null($grossEarningsForNics)) { - throw new InvalidArgumentException('non-nullable grossEarningsForNics cannot be null'); + if (is_null($childId)) { + throw new InvalidArgumentException('non-nullable childId cannot be null'); } - $this->container['grossEarningsForNics'] = $grossEarningsForNics; + $this->container['childId'] = $childId; return $this; } /** - * Gets earningsAtLel + * Gets earningsAboveFustToUel * * @return float|null */ - public function getEarningsAtLel(): ?float + public function getEarningsAboveFustToUel(): ?float { - return $this->container['earningsAtLel']; + return $this->container['earningsAboveFustToUel']; } /** - * Sets earningsAtLel + * Sets earningsAboveFustToUel * - * @param float|null $earningsAtLel earningsAtLel + * @param float|null $earningsAboveFustToUel earningsAboveFustToUel * * @return $this */ - public function setEarningsAtLel(?float $earningsAtLel): static + public function setEarningsAboveFustToUel(?float $earningsAboveFustToUel): static { - if (is_null($earningsAtLel)) { - throw new InvalidArgumentException('non-nullable earningsAtLel cannot be null'); + if (is_null($earningsAboveFustToUel)) { + throw new InvalidArgumentException('non-nullable earningsAboveFustToUel cannot be null'); } - $this->container['earningsAtLel'] = $earningsAtLel; + $this->container['earningsAboveFustToUel'] = $earningsAboveFustToUel; return $this; } @@ -685,33 +618,6 @@ public function setEarningsAbovePtToUap(?float $earningsAbovePtToUap): static return $this; } - /** - * Gets earningsAboveStToUel - * - * @return float|null - */ - public function getEarningsAboveStToUel(): ?float - { - return $this->container['earningsAboveStToUel']; - } - - /** - * Sets earningsAboveStToUel - * - * @param float|null $earningsAboveStToUel earningsAboveStToUel - * - * @return $this - */ - public function setEarningsAboveStToUel(?float $earningsAboveStToUel): static - { - if (is_null($earningsAboveStToUel)) { - throw new InvalidArgumentException('non-nullable earningsAboveStToUel cannot be null'); - } - $this->container['earningsAboveStToUel'] = $earningsAboveStToUel; - - return $this; - } - /** * Gets earningsAboveStToFust * @@ -740,28 +646,28 @@ public function setEarningsAboveStToFust(?float $earningsAboveStToFust): static } /** - * Gets earningsAboveFustToUel + * Gets earningsAboveStToUel * * @return float|null */ - public function getEarningsAboveFustToUel(): ?float + public function getEarningsAboveStToUel(): ?float { - return $this->container['earningsAboveFustToUel']; + return $this->container['earningsAboveStToUel']; } /** - * Sets earningsAboveFustToUel + * Sets earningsAboveStToUel * - * @param float|null $earningsAboveFustToUel earningsAboveFustToUel + * @param float|null $earningsAboveStToUel earningsAboveStToUel * * @return $this */ - public function setEarningsAboveFustToUel(?float $earningsAboveFustToUel): static + public function setEarningsAboveStToUel(?float $earningsAboveStToUel): static { - if (is_null($earningsAboveFustToUel)) { - throw new InvalidArgumentException('non-nullable earningsAboveFustToUel cannot be null'); + if (is_null($earningsAboveStToUel)) { + throw new InvalidArgumentException('non-nullable earningsAboveStToUel cannot be null'); } - $this->container['earningsAboveFustToUel'] = $earningsAboveFustToUel; + $this->container['earningsAboveStToUel'] = $earningsAboveStToUel; return $this; } @@ -821,28 +727,55 @@ public function setEarningsAboveUel(?float $earningsAboveUel): static } /** - * Gets employeeNics + * Gets earningsAtLel * * @return float|null */ - public function getEmployeeNics(): ?float + public function getEarningsAtLel(): ?float { - return $this->container['employeeNics']; + return $this->container['earningsAtLel']; } /** - * Sets employeeNics + * Sets earningsAtLel * - * @param float|null $employeeNics employeeNics + * @param float|null $earningsAtLel earningsAtLel * * @return $this */ - public function setEmployeeNics(?float $employeeNics): static + public function setEarningsAtLel(?float $earningsAtLel): static { - if (is_null($employeeNics)) { - throw new InvalidArgumentException('non-nullable employeeNics cannot be null'); + if (is_null($earningsAtLel)) { + throw new InvalidArgumentException('non-nullable earningsAtLel cannot be null'); } - $this->container['employeeNics'] = $employeeNics; + $this->container['earningsAtLel'] = $earningsAtLel; + + return $this; + } + + /** + * Gets employee + * + * @return \SynergiTech\Staffology\Model\Item|null + */ + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + { + return $this->container['employee']; + } + + /** + * Sets employee + * + * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * + * @return $this + */ + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + { + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); + } + $this->container['employee'] = $employee; return $this; } @@ -875,28 +808,28 @@ public function setEmployeeNiRebate(?float $employeeNiRebate): static } /** - * Gets employerNics + * Gets employeeNics * * @return float|null */ - public function getEmployerNics(): ?float + public function getEmployeeNics(): ?float { - return $this->container['employerNics']; + return $this->container['employeeNics']; } /** - * Sets employerNics + * Sets employeeNics * - * @param float|null $employerNics employerNics + * @param float|null $employeeNics employeeNics * * @return $this */ - public function setEmployerNics(?float $employerNics): static + public function setEmployeeNics(?float $employeeNics): static { - if (is_null($employerNics)) { - throw new InvalidArgumentException('non-nullable employerNics cannot be null'); + if (is_null($employeeNics)) { + throw new InvalidArgumentException('non-nullable employeeNics cannot be null'); } - $this->container['employerNics'] = $employerNics; + $this->container['employeeNics'] = $employeeNics; return $this; } @@ -928,6 +861,60 @@ public function setEmployerNiRebate(?float $employerNiRebate): static return $this; } + /** + * Gets employerNics + * + * @return float|null + */ + public function getEmployerNics(): ?float + { + return $this->container['employerNics']; + } + + /** + * Sets employerNics + * + * @param float|null $employerNics employerNics + * + * @return $this + */ + public function setEmployerNics(?float $employerNics): static + { + if (is_null($employerNics)) { + throw new InvalidArgumentException('non-nullable employerNics cannot be null'); + } + $this->container['employerNics'] = $employerNics; + + return $this; + } + + /** + * Gets grossEarningsForNics + * + * @return float|null + */ + public function getGrossEarningsForNics(): ?float + { + return $this->container['grossEarningsForNics']; + } + + /** + * Sets grossEarningsForNics + * + * @param float|null $grossEarningsForNics grossEarningsForNics + * + * @return $this + */ + public function setGrossEarningsForNics(?float $grossEarningsForNics): static + { + if (is_null($grossEarningsForNics)) { + throw new InvalidArgumentException('non-nullable grossEarningsForNics cannot be null'); + } + $this->container['grossEarningsForNics'] = $grossEarningsForNics; + + return $this; + } + /** * Gets hasValues * @@ -982,6 +969,33 @@ public function setId(?string $id): static return $this; } + /** + * Gets isLatestVersion + * + * @return bool|null + */ + public function getIsLatestVersion(): ?bool + { + return $this->container['isLatestVersion']; + } + + /** + * Sets isLatestVersion + * + * @param bool|null $isLatestVersion [readonly] Indicates whether this is the latest version of the NicSummary. + * + * @return $this + */ + public function setIsLatestVersion(?bool $isLatestVersion): static + { + if (is_null($isLatestVersion)) { + throw new InvalidArgumentException('non-nullable isLatestVersion cannot be null'); + } + $this->container['isLatestVersion'] = $isLatestVersion; + + return $this; + } + /** * Gets isNiYtdOverride * @@ -1010,55 +1024,109 @@ public function setIsNiYtdOverride(?bool $isNiYtdOverride): static } /** - * Gets childId + * Gets niTable * * @return string|null */ - public function getChildId(): ?string + public function getNiTable(): ?string { - return $this->container['childId']; + return $this->container['niTable']; } /** - * Sets childId + * Sets niTable * - * @param string|null $childId This is nothing but the UniqueId of the model. + * @param string|null $niTable niTable * * @return $this */ - public function setChildId(?string $childId): static + public function setNiTable(?string $niTable): static { - if (is_null($childId)) { - throw new InvalidArgumentException('non-nullable childId cannot be null'); + if (is_null($niTable)) { + throw new InvalidArgumentException('non-nullable niTable cannot be null'); } - $this->container['childId'] = $childId; + $this->container['niTable'] = $niTable; return $this; } /** - * Gets employee + * Gets payRunVersion * - * @return \SynergiTech\Staffology\Model\Item|null + * @return int|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getPayRunVersion(): ?int { - return $this->container['employee']; + return $this->container['payRunVersion']; } /** - * Sets employee + * Sets payRunVersion * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param int|null $payRunVersion [readonly] The supplementary pay run version of this NicSummary. * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setPayRunVersion(?int $payRunVersion): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($payRunVersion)) { + throw new InvalidArgumentException('non-nullable payRunVersion cannot be null'); } - $this->container['employee'] = $employee; + $this->container['payRunVersion'] = $payRunVersion; + + return $this; + } + + /** + * Gets paymentDate + * + * @return \DateTime|null + */ + public function getPaymentDate(): ?\DateTime + { + return $this->container['paymentDate']; + } + + /** + * Sets paymentDate + * + * @param \DateTime|null $paymentDate paymentDate + * + * @return $this + */ + public function setPaymentDate(?\DateTime $paymentDate): static + { + if (is_null($paymentDate)) { + throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); + } + $this->container['paymentDate'] = $paymentDate; + + return $this; + } + + /** + * Gets taxYear + * + * @return \SynergiTech\Staffology\Model\TaxYear|null + */ + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + { + return $this->container['taxYear']; + } + + /** + * Sets taxYear + * + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * + * @return $this + */ + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + { + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + } + $this->container['taxYear'] = $taxYear; return $this; } diff --git a/src/Model/NominalCodeMapping.php b/src/Model/NominalCodeMapping.php index e868de6..add8f94 100644 --- a/src/Model/NominalCodeMapping.php +++ b/src/Model/NominalCodeMapping.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class NominalCodeMapping implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'nominalCode' => 'string', - 'nominalName' => 'string', 'externalId' => 'string', - 'payCode' => 'string', + 'id' => 'string', + 'nominalCode' => 'string', 'nominalMapping' => 'string', - 'id' => 'string' + 'nominalName' => 'string', + 'payCode' => 'string' ]; /** @@ -73,12 +73,12 @@ class NominalCodeMapping implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'nominalCode' => null, - 'nominalName' => null, 'externalId' => null, - 'payCode' => null, + 'id' => 'uuid', + 'nominalCode' => null, 'nominalMapping' => null, - 'id' => 'uuid' + 'nominalName' => null, + 'payCode' => null ]; /** @@ -87,12 +87,12 @@ class NominalCodeMapping implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'nominalCode' => true, - 'nominalName' => true, 'externalId' => true, - 'payCode' => true, + 'id' => false, + 'nominalCode' => true, 'nominalMapping' => true, - 'id' => false + 'nominalName' => true, + 'payCode' => true ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'nominalCode' => 'nominalCode', - 'nominalName' => 'nominalName', 'externalId' => 'externalId', - 'payCode' => 'payCode', + 'id' => 'id', + 'nominalCode' => 'nominalCode', 'nominalMapping' => 'nominalMapping', - 'id' => 'id' + 'nominalName' => 'nominalName', + 'payCode' => 'payCode' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'nominalCode' => 'setNominalCode', - 'nominalName' => 'setNominalName', 'externalId' => 'setExternalId', - 'payCode' => 'setPayCode', + 'id' => 'setId', + 'nominalCode' => 'setNominalCode', 'nominalMapping' => 'setNominalMapping', - 'id' => 'setId' + 'nominalName' => 'setNominalName', + 'payCode' => 'setPayCode' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'nominalCode' => 'getNominalCode', - 'nominalName' => 'getNominalName', 'externalId' => 'getExternalId', - 'payCode' => 'getPayCode', + 'id' => 'getId', + 'nominalCode' => 'getNominalCode', 'nominalMapping' => 'getNominalMapping', - 'id' => 'getId' + 'nominalName' => 'getNominalName', + 'payCode' => 'getPayCode' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('externalId', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('nominalCode', $data ?? [], null); + $this->setIfExists('nominalMapping', $data ?? [], null); $this->setIfExists('nominalName', $data ?? [], null); - $this->setIfExists('externalId', $data ?? [], null); $this->setIfExists('payCode', $data ?? [], null); - $this->setIfExists('nominalMapping', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); } /** @@ -308,22 +308,22 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (!is_null($this->container['nominalCode']) && (mb_strlen($this->container['nominalCode']) > 500)) { - $invalidProperties[] = "invalid value for 'nominalCode', the character length must be smaller than or equal to 500."; - } - - if (!is_null($this->container['nominalName']) && (mb_strlen($this->container['nominalName']) > 100)) { - $invalidProperties[] = "invalid value for 'nominalName', the character length must be smaller than or equal to 100."; - } - if (!is_null($this->container['externalId']) && (mb_strlen($this->container['externalId']) > 100)) { $invalidProperties[] = "invalid value for 'externalId', the character length must be smaller than or equal to 100."; } + if (!is_null($this->container['nominalCode']) && (mb_strlen($this->container['nominalCode']) > 500)) { + $invalidProperties[] = "invalid value for 'nominalCode', the character length must be smaller than or equal to 500."; + } + if (!is_null($this->container['nominalMapping']) && (mb_strlen($this->container['nominalMapping']) > 500)) { $invalidProperties[] = "invalid value for 'nominalMapping', the character length must be smaller than or equal to 500."; } + if (!is_null($this->container['nominalName']) && (mb_strlen($this->container['nominalName']) > 100)) { + $invalidProperties[] = "invalid value for 'nominalName', the character length must be smaller than or equal to 100."; + } + return $invalidProperties; } @@ -340,214 +340,214 @@ public function valid(): bool /** - * Gets nominalCode + * Gets externalId * * @return string|null */ - public function getNominalCode(): ?string + public function getExternalId(): ?string { - return $this->container['nominalCode']; + return $this->container['externalId']; } /** - * Sets nominalCode + * Sets externalId * - * @param string|null $nominalCode nominalCode + * @param string|null $externalId If you will be using the API to post journals to an ExternalDataProvider, then this is the Id of the nominal code in the external system. If there's no mapping then this will have a value of \"0\" * * @return $this */ - public function setNominalCode(?string $nominalCode): static + public function setExternalId(?string $externalId): static { - if (is_null($nominalCode)) { - array_push($this->openAPINullablesSetToNull, 'nominalCode'); + if (is_null($externalId)) { + array_push($this->openAPINullablesSetToNull, 'externalId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalCode', $nullablesSetToNull); + $index = array_search('externalId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($nominalCode) && (mb_strlen($nominalCode) > 500)) { - throw new InvalidArgumentException('invalid length for $nominalCode when calling NominalCodeMapping., must be smaller than or equal to 500.'); + if (!is_null($externalId) && (mb_strlen($externalId) > 100)) { + throw new InvalidArgumentException('invalid length for $externalId when calling NominalCodeMapping., must be smaller than or equal to 100.'); } - $this->container['nominalCode'] = $nominalCode; + $this->container['externalId'] = $externalId; return $this; } /** - * Gets nominalName + * Gets id * * @return string|null */ - public function getNominalName(): ?string + public function getId(): ?string { - return $this->container['nominalName']; + return $this->container['id']; } /** - * Sets nominalName + * Sets id * - * @param string|null $nominalName nominalName + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setNominalName(?string $nominalName): static + public function setId(?string $id): static { - if (is_null($nominalName)) { - array_push($this->openAPINullablesSetToNull, 'nominalName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($nominalName) && (mb_strlen($nominalName) > 100)) { - throw new InvalidArgumentException('invalid length for $nominalName when calling NominalCodeMapping., must be smaller than or equal to 100.'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - - $this->container['nominalName'] = $nominalName; + $this->container['id'] = $id; return $this; } /** - * Gets externalId + * Gets nominalCode * * @return string|null */ - public function getExternalId(): ?string + public function getNominalCode(): ?string { - return $this->container['externalId']; + return $this->container['nominalCode']; } /** - * Sets externalId + * Sets nominalCode * - * @param string|null $externalId If you will be using the API to post journals to an ExternalDataProvider, then this is the Id of the nominal code in the external system. If there's no mapping then this will have a value of \"0\" + * @param string|null $nominalCode nominalCode * * @return $this */ - public function setExternalId(?string $externalId): static + public function setNominalCode(?string $nominalCode): static { - if (is_null($externalId)) { - array_push($this->openAPINullablesSetToNull, 'externalId'); + if (is_null($nominalCode)) { + array_push($this->openAPINullablesSetToNull, 'nominalCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('externalId', $nullablesSetToNull); + $index = array_search('nominalCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($externalId) && (mb_strlen($externalId) > 100)) { - throw new InvalidArgumentException('invalid length for $externalId when calling NominalCodeMapping., must be smaller than or equal to 100.'); + if (!is_null($nominalCode) && (mb_strlen($nominalCode) > 500)) { + throw new InvalidArgumentException('invalid length for $nominalCode when calling NominalCodeMapping., must be smaller than or equal to 500.'); } - $this->container['externalId'] = $externalId; + $this->container['nominalCode'] = $nominalCode; return $this; } /** - * Gets payCode + * Gets nominalMapping * * @return string|null */ - public function getPayCode(): ?string + public function getNominalMapping(): ?string { - return $this->container['payCode']; + return $this->container['nominalMapping']; } /** - * Sets payCode + * Sets nominalMapping * - * @param string|null $payCode payCode + * @param string|null $nominalMapping nominalMapping * * @return $this */ - public function setPayCode(?string $payCode): static + public function setNominalMapping(?string $nominalMapping): static { - if (is_null($payCode)) { - array_push($this->openAPINullablesSetToNull, 'payCode'); + if (is_null($nominalMapping)) { + array_push($this->openAPINullablesSetToNull, 'nominalMapping'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCode', $nullablesSetToNull); + $index = array_search('nominalMapping', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payCode'] = $payCode; + if (!is_null($nominalMapping) && (mb_strlen($nominalMapping) > 500)) { + throw new InvalidArgumentException('invalid length for $nominalMapping when calling NominalCodeMapping., must be smaller than or equal to 500.'); + } + + $this->container['nominalMapping'] = $nominalMapping; return $this; } /** - * Gets nominalMapping + * Gets nominalName * * @return string|null */ - public function getNominalMapping(): ?string + public function getNominalName(): ?string { - return $this->container['nominalMapping']; + return $this->container['nominalName']; } /** - * Sets nominalMapping + * Sets nominalName * - * @param string|null $nominalMapping nominalMapping + * @param string|null $nominalName nominalName * * @return $this */ - public function setNominalMapping(?string $nominalMapping): static + public function setNominalName(?string $nominalName): static { - if (is_null($nominalMapping)) { - array_push($this->openAPINullablesSetToNull, 'nominalMapping'); + if (is_null($nominalName)) { + array_push($this->openAPINullablesSetToNull, 'nominalName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalMapping', $nullablesSetToNull); + $index = array_search('nominalName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($nominalMapping) && (mb_strlen($nominalMapping) > 500)) { - throw new InvalidArgumentException('invalid length for $nominalMapping when calling NominalCodeMapping., must be smaller than or equal to 500.'); + if (!is_null($nominalName) && (mb_strlen($nominalName) > 100)) { + throw new InvalidArgumentException('invalid length for $nominalName when calling NominalCodeMapping., must be smaller than or equal to 100.'); } - $this->container['nominalMapping'] = $nominalMapping; + $this->container['nominalName'] = $nominalName; return $this; } /** - * Gets id + * Gets payCode * * @return string|null */ - public function getId(): ?string + public function getPayCode(): ?string { - return $this->container['id']; + return $this->container['payCode']; } /** - * Sets id + * Sets payCode * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $payCode payCode * * @return $this */ - public function setId(?string $id): static + public function setPayCode(?string $payCode): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($payCode)) { + array_push($this->openAPINullablesSetToNull, 'payCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['payCode'] = $payCode; return $this; } diff --git a/src/Model/Note.php b/src/Model/Note.php index 0cdd088..8234a0e 100644 --- a/src/Model/Note.php +++ b/src/Model/Note.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,15 +60,15 @@ class Note implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'noteDate' => '\DateTime', - 'noteText' => 'string', 'createdBy' => 'string', - 'updatedBy' => 'string', - 'type' => '\SynergiTech\Staffology\Model\NoteType', 'documentCount' => 'int', 'documents' => '\SynergiTech\Staffology\Model\Item[]', 'employee' => '\SynergiTech\Staffology\Model\Item', - 'id' => 'string' + 'id' => 'string', + 'noteDate' => '\DateTime', + 'noteText' => 'string', + 'type' => '\SynergiTech\Staffology\Model\NoteType', + 'updatedBy' => 'string' ]; /** @@ -77,15 +77,15 @@ class Note implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'noteDate' => 'date', - 'noteText' => null, 'createdBy' => null, - 'updatedBy' => null, - 'type' => null, 'documentCount' => 'int32', 'documents' => null, 'employee' => null, - 'id' => 'uuid' + 'id' => 'uuid', + 'noteDate' => 'date', + 'noteText' => null, + 'type' => null, + 'updatedBy' => null ]; /** @@ -94,15 +94,15 @@ class Note implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'noteDate' => false, - 'noteText' => true, 'createdBy' => true, - 'updatedBy' => true, - 'type' => false, 'documentCount' => false, 'documents' => true, 'employee' => false, - 'id' => false + 'id' => false, + 'noteDate' => false, + 'noteText' => true, + 'type' => false, + 'updatedBy' => true ]; /** @@ -191,15 +191,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'noteDate' => 'noteDate', - 'noteText' => 'noteText', 'createdBy' => 'createdBy', - 'updatedBy' => 'updatedBy', - 'type' => 'type', 'documentCount' => 'documentCount', 'documents' => 'documents', 'employee' => 'employee', - 'id' => 'id' + 'id' => 'id', + 'noteDate' => 'noteDate', + 'noteText' => 'noteText', + 'type' => 'type', + 'updatedBy' => 'updatedBy' ]; /** @@ -208,15 +208,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'noteDate' => 'setNoteDate', - 'noteText' => 'setNoteText', 'createdBy' => 'setCreatedBy', - 'updatedBy' => 'setUpdatedBy', - 'type' => 'setType', 'documentCount' => 'setDocumentCount', 'documents' => 'setDocuments', 'employee' => 'setEmployee', - 'id' => 'setId' + 'id' => 'setId', + 'noteDate' => 'setNoteDate', + 'noteText' => 'setNoteText', + 'type' => 'setType', + 'updatedBy' => 'setUpdatedBy' ]; /** @@ -225,15 +225,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'noteDate' => 'getNoteDate', - 'noteText' => 'getNoteText', 'createdBy' => 'getCreatedBy', - 'updatedBy' => 'getUpdatedBy', - 'type' => 'getType', 'documentCount' => 'getDocumentCount', 'documents' => 'getDocuments', 'employee' => 'getEmployee', - 'id' => 'getId' + 'id' => 'getId', + 'noteDate' => 'getNoteDate', + 'noteText' => 'getNoteText', + 'type' => 'getType', + 'updatedBy' => 'getUpdatedBy' ]; /** @@ -292,15 +292,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('noteDate', $data ?? [], null); - $this->setIfExists('noteText', $data ?? [], null); $this->setIfExists('createdBy', $data ?? [], null); - $this->setIfExists('updatedBy', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('documentCount', $data ?? [], null); $this->setIfExists('documents', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('noteDate', $data ?? [], null); + $this->setIfExists('noteText', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('updatedBy', $data ?? [], null); } /** @@ -346,272 +346,272 @@ public function valid(): bool /** - * Gets noteDate + * Gets createdBy * - * @return \DateTime|null + * @return string|null */ - public function getNoteDate(): ?\DateTime + public function getCreatedBy(): ?string { - return $this->container['noteDate']; + return $this->container['createdBy']; } /** - * Sets noteDate + * Sets createdBy * - * @param \DateTime|null $noteDate The date of the note + * @param string|null $createdBy [readonly] The email address of the user that create the Note * * @return $this */ - public function setNoteDate(?\DateTime $noteDate): static + public function setCreatedBy(?string $createdBy): static { - if (is_null($noteDate)) { - throw new InvalidArgumentException('non-nullable noteDate cannot be null'); + if (is_null($createdBy)) { + array_push($this->openAPINullablesSetToNull, 'createdBy'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('createdBy', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['noteDate'] = $noteDate; + $this->container['createdBy'] = $createdBy; return $this; } /** - * Gets noteText + * Gets documentCount * - * @return string|null + * @return int|null */ - public function getNoteText(): ?string + public function getDocumentCount(): ?int { - return $this->container['noteText']; + return $this->container['documentCount']; } /** - * Sets noteText + * Sets documentCount * - * @param string|null $noteText Note text + * @param int|null $documentCount [readonly] The number of attachments associated with this model * * @return $this */ - public function setNoteText(?string $noteText): static + public function setDocumentCount(?int $documentCount): static { - if (is_null($noteText)) { - array_push($this->openAPINullablesSetToNull, 'noteText'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('noteText', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($documentCount)) { + throw new InvalidArgumentException('non-nullable documentCount cannot be null'); } - $this->container['noteText'] = $noteText; + $this->container['documentCount'] = $documentCount; return $this; } /** - * Gets createdBy + * Gets documents * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getCreatedBy(): ?string + public function getDocuments(): ?array { - return $this->container['createdBy']; + return $this->container['documents']; } /** - * Sets createdBy + * Sets documents * - * @param string|null $createdBy [readonly] The email address of the user that create the Note + * @param \SynergiTech\Staffology\Model\Item[]|null $documents [readonly] The attachments associated with this model * * @return $this */ - public function setCreatedBy(?string $createdBy): static + public function setDocuments(?array $documents): static { - if (is_null($createdBy)) { - array_push($this->openAPINullablesSetToNull, 'createdBy'); + if (is_null($documents)) { + array_push($this->openAPINullablesSetToNull, 'documents'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('createdBy', $nullablesSetToNull); + $index = array_search('documents', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['createdBy'] = $createdBy; + $this->container['documents'] = $documents; return $this; } /** - * Gets updatedBy + * Gets employee * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getUpdatedBy(): ?string + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['updatedBy']; + return $this->container['employee']; } /** - * Sets updatedBy + * Sets employee * - * @param string|null $updatedBy [readonly] The email address of the user that last updated the Note + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setUpdatedBy(?string $updatedBy): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($updatedBy)) { - array_push($this->openAPINullablesSetToNull, 'updatedBy'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('updatedBy', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['updatedBy'] = $updatedBy; + $this->container['employee'] = $employee; return $this; } /** - * Gets type + * Gets id * - * @return \SynergiTech\Staffology\Model\NoteType|null + * @return string|null */ - public function getType(): ?\SynergiTech\Staffology\Model\NoteType + public function getId(): ?string { - return $this->container['type']; + return $this->container['id']; } /** - * Sets type + * Sets id * - * @param \SynergiTech\Staffology\Model\NoteType|null $type type + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\NoteType $type): static + public function setId(?string $id): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['type'] = $type; + $this->container['id'] = $id; return $this; } /** - * Gets documentCount + * Gets noteDate * - * @return int|null + * @return \DateTime|null */ - public function getDocumentCount(): ?int + public function getNoteDate(): ?\DateTime { - return $this->container['documentCount']; + return $this->container['noteDate']; } /** - * Sets documentCount + * Sets noteDate * - * @param int|null $documentCount [readonly] The number of attachments associated with this model + * @param \DateTime|null $noteDate The date of the note * * @return $this */ - public function setDocumentCount(?int $documentCount): static + public function setNoteDate(?\DateTime $noteDate): static { - if (is_null($documentCount)) { - throw new InvalidArgumentException('non-nullable documentCount cannot be null'); + if (is_null($noteDate)) { + throw new InvalidArgumentException('non-nullable noteDate cannot be null'); } - $this->container['documentCount'] = $documentCount; + $this->container['noteDate'] = $noteDate; return $this; } /** - * Gets documents + * Gets noteText * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return string|null */ - public function getDocuments(): ?array + public function getNoteText(): ?string { - return $this->container['documents']; + return $this->container['noteText']; } /** - * Sets documents + * Sets noteText * - * @param \SynergiTech\Staffology\Model\Item[]|null $documents [readonly] The attachments associated with this model + * @param string|null $noteText Note text * * @return $this */ - public function setDocuments(?array $documents): static + public function setNoteText(?string $noteText): static { - if (is_null($documents)) { - array_push($this->openAPINullablesSetToNull, 'documents'); + if (is_null($noteText)) { + array_push($this->openAPINullablesSetToNull, 'noteText'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('documents', $nullablesSetToNull); + $index = array_search('noteText', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['documents'] = $documents; + $this->container['noteText'] = $noteText; return $this; } /** - * Gets employee + * Gets type * - * @return \SynergiTech\Staffology\Model\Item|null + * @return \SynergiTech\Staffology\Model\NoteType|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getType(): ?\SynergiTech\Staffology\Model\NoteType { - return $this->container['employee']; + return $this->container['type']; } /** - * Sets employee + * Sets type * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param \SynergiTech\Staffology\Model\NoteType|null $type type * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setType(?\SynergiTech\Staffology\Model\NoteType $type): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['employee'] = $employee; + $this->container['type'] = $type; return $this; } /** - * Gets id + * Gets updatedBy * * @return string|null */ - public function getId(): ?string + public function getUpdatedBy(): ?string { - return $this->container['id']; + return $this->container['updatedBy']; } /** - * Sets id + * Sets updatedBy * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $updatedBy [readonly] The email address of the user that last updated the Note * * @return $this */ - public function setId(?string $id): static + public function setUpdatedBy(?string $updatedBy): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($updatedBy)) { + array_push($this->openAPINullablesSetToNull, 'updatedBy'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('updatedBy', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['updatedBy'] = $updatedBy; return $this; } diff --git a/src/Model/NoteType.php b/src/Model/NoteType.php index e80f2f3..bbf92f7 100644 --- a/src/Model/NoteType.php +++ b/src/Model/NoteType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/NotionalPayPeriodBreakdown.php b/src/Model/NotionalPayPeriodBreakdown.php new file mode 100644 index 0000000..1410b22 --- /dev/null +++ b/src/Model/NotionalPayPeriodBreakdown.php @@ -0,0 +1,646 @@ + + */ +class NotionalPayPeriodBreakdown implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'NotionalPayPeriodBreakdown'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'daysExcluded' => 'int', + 'from' => '\DateTime', + 'leaveId' => 'string', + 'notionalPay' => 'float', + 'occupationalPayWithLessThanHalfPay' => 'float', + 'percentOfPay' => 'float', + 'percentOfPayBand' => '\SynergiTech\Staffology\Model\PercentOfPayBand', + 'to' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'daysExcluded' => 'int32', + 'from' => 'date', + 'leaveId' => 'uuid', + 'notionalPay' => 'double', + 'occupationalPayWithLessThanHalfPay' => 'double', + 'percentOfPay' => 'double', + 'percentOfPayBand' => null, + 'to' => 'date' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'daysExcluded' => false, + 'from' => false, + 'leaveId' => false, + 'notionalPay' => false, + 'occupationalPayWithLessThanHalfPay' => false, + 'percentOfPay' => false, + 'percentOfPayBand' => false, + 'to' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'daysExcluded' => 'daysExcluded', + 'from' => 'from', + 'leaveId' => 'leaveId', + 'notionalPay' => 'notionalPay', + 'occupationalPayWithLessThanHalfPay' => 'occupationalPayWithLessThanHalfPay', + 'percentOfPay' => 'percentOfPay', + 'percentOfPayBand' => 'percentOfPayBand', + 'to' => 'to' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'daysExcluded' => 'setDaysExcluded', + 'from' => 'setFrom', + 'leaveId' => 'setLeaveId', + 'notionalPay' => 'setNotionalPay', + 'occupationalPayWithLessThanHalfPay' => 'setOccupationalPayWithLessThanHalfPay', + 'percentOfPay' => 'setPercentOfPay', + 'percentOfPayBand' => 'setPercentOfPayBand', + 'to' => 'setTo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'daysExcluded' => 'getDaysExcluded', + 'from' => 'getFrom', + 'leaveId' => 'getLeaveId', + 'notionalPay' => 'getNotionalPay', + 'occupationalPayWithLessThanHalfPay' => 'getOccupationalPayWithLessThanHalfPay', + 'percentOfPay' => 'getPercentOfPay', + 'percentOfPayBand' => 'getPercentOfPayBand', + 'to' => 'getTo' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('daysExcluded', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('leaveId', $data ?? [], null); + $this->setIfExists('notionalPay', $data ?? [], null); + $this->setIfExists('occupationalPayWithLessThanHalfPay', $data ?? [], null); + $this->setIfExists('percentOfPay', $data ?? [], null); + $this->setIfExists('percentOfPayBand', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets daysExcluded + * + * @return int|null + */ + public function getDaysExcluded(): ?int + { + return $this->container['daysExcluded']; + } + + /** + * Sets daysExcluded + * + * @param int|null $daysExcluded daysExcluded + * + * @return $this + */ + public function setDaysExcluded(?int $daysExcluded): static + { + if (is_null($daysExcluded)) { + throw new InvalidArgumentException('non-nullable daysExcluded cannot be null'); + } + $this->container['daysExcluded'] = $daysExcluded; + + return $this; + } + + /** + * Gets from + * + * @return \DateTime|null + */ + public function getFrom(): ?\DateTime + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param \DateTime|null $from from + * + * @return $this + */ + public function setFrom(?\DateTime $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets leaveId + * + * @return string|null + */ + public function getLeaveId(): ?string + { + return $this->container['leaveId']; + } + + /** + * Sets leaveId + * + * @param string|null $leaveId leaveId + * + * @return $this + */ + public function setLeaveId(?string $leaveId): static + { + if (is_null($leaveId)) { + throw new InvalidArgumentException('non-nullable leaveId cannot be null'); + } + $this->container['leaveId'] = $leaveId; + + return $this; + } + + /** + * Gets notionalPay + * + * @return float|null + */ + public function getNotionalPay(): ?float + { + return $this->container['notionalPay']; + } + + /** + * Sets notionalPay + * + * @param float|null $notionalPay notionalPay + * + * @return $this + */ + public function setNotionalPay(?float $notionalPay): static + { + if (is_null($notionalPay)) { + throw new InvalidArgumentException('non-nullable notionalPay cannot be null'); + } + $this->container['notionalPay'] = $notionalPay; + + return $this; + } + + /** + * Gets occupationalPayWithLessThanHalfPay + * + * @return float|null + */ + public function getOccupationalPayWithLessThanHalfPay(): ?float + { + return $this->container['occupationalPayWithLessThanHalfPay']; + } + + /** + * Sets occupationalPayWithLessThanHalfPay + * + * @param float|null $occupationalPayWithLessThanHalfPay occupationalPayWithLessThanHalfPay + * + * @return $this + */ + public function setOccupationalPayWithLessThanHalfPay(?float $occupationalPayWithLessThanHalfPay): static + { + if (is_null($occupationalPayWithLessThanHalfPay)) { + throw new InvalidArgumentException('non-nullable occupationalPayWithLessThanHalfPay cannot be null'); + } + $this->container['occupationalPayWithLessThanHalfPay'] = $occupationalPayWithLessThanHalfPay; + + return $this; + } + + /** + * Gets percentOfPay + * + * @return float|null + */ + public function getPercentOfPay(): ?float + { + return $this->container['percentOfPay']; + } + + /** + * Sets percentOfPay + * + * @param float|null $percentOfPay percentOfPay + * + * @return $this + */ + public function setPercentOfPay(?float $percentOfPay): static + { + if (is_null($percentOfPay)) { + throw new InvalidArgumentException('non-nullable percentOfPay cannot be null'); + } + $this->container['percentOfPay'] = $percentOfPay; + + return $this; + } + + /** + * Gets percentOfPayBand + * + * @return \SynergiTech\Staffology\Model\PercentOfPayBand|null + */ + public function getPercentOfPayBand(): ?\SynergiTech\Staffology\Model\PercentOfPayBand + { + return $this->container['percentOfPayBand']; + } + + /** + * Sets percentOfPayBand + * + * @param \SynergiTech\Staffology\Model\PercentOfPayBand|null $percentOfPayBand percentOfPayBand + * + * @return $this + */ + public function setPercentOfPayBand(?\SynergiTech\Staffology\Model\PercentOfPayBand $percentOfPayBand): static + { + if (is_null($percentOfPayBand)) { + throw new InvalidArgumentException('non-nullable percentOfPayBand cannot be null'); + } + $this->container['percentOfPayBand'] = $percentOfPayBand; + + return $this; + } + + /** + * Gets to + * + * @return \DateTime|null + */ + public function getTo(): ?\DateTime + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param \DateTime|null $to to + * + * @return $this + */ + public function setTo(?\DateTime $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/Nvr.php b/src/Model/Nvr.php index 6c63321..245d3b8 100644 --- a/src/Model/Nvr.php +++ b/src/Model/Nvr.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,15 @@ class Nvr implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'employees' => '\SynergiTech\Staffology\Model\Item[]', 'employeeCount' => 'int', - 'nvrRequest' => '\SynergiTech\Staffology\Model\NvrRequest', - 'iRmark' => 'string', - 'xml' => 'string', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'employees' => '\SynergiTech\Staffology\Model\Item[]', 'employerReferences' => '\SynergiTech\Staffology\Model\EmpRefs', 'govTalkSubmission' => '\SynergiTech\Staffology\Model\GovTalkSubmission', - 'id' => 'string' + 'iRmark' => 'string', + 'id' => 'string', + 'nvrRequest' => '\SynergiTech\Staffology\Model\NvrRequest', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'xml' => 'string' ]; /** @@ -76,15 +76,15 @@ class Nvr implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'employees' => null, 'employeeCount' => 'int32', - 'nvrRequest' => null, - 'iRmark' => null, - 'xml' => null, - 'taxYear' => null, + 'employees' => null, 'employerReferences' => null, 'govTalkSubmission' => null, - 'id' => 'uuid' + 'iRmark' => null, + 'id' => 'uuid', + 'nvrRequest' => null, + 'taxYear' => null, + 'xml' => null ]; /** @@ -93,15 +93,15 @@ class Nvr implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'employees' => true, 'employeeCount' => false, - 'nvrRequest' => false, - 'iRmark' => true, - 'xml' => true, - 'taxYear' => false, + 'employees' => true, 'employerReferences' => false, 'govTalkSubmission' => false, - 'id' => false + 'iRmark' => true, + 'id' => false, + 'nvrRequest' => false, + 'taxYear' => false, + 'xml' => true ]; /** @@ -190,15 +190,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employees' => 'employees', 'employeeCount' => 'employeeCount', - 'nvrRequest' => 'nvrRequest', - 'iRmark' => 'iRmark', - 'xml' => 'xml', - 'taxYear' => 'taxYear', + 'employees' => 'employees', 'employerReferences' => 'employerReferences', 'govTalkSubmission' => 'govTalkSubmission', - 'id' => 'id' + 'iRmark' => 'iRmark', + 'id' => 'id', + 'nvrRequest' => 'nvrRequest', + 'taxYear' => 'taxYear', + 'xml' => 'xml' ]; /** @@ -207,15 +207,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employees' => 'setEmployees', 'employeeCount' => 'setEmployeeCount', - 'nvrRequest' => 'setNvrRequest', - 'iRmark' => 'setIRmark', - 'xml' => 'setXml', - 'taxYear' => 'setTaxYear', + 'employees' => 'setEmployees', 'employerReferences' => 'setEmployerReferences', 'govTalkSubmission' => 'setGovTalkSubmission', - 'id' => 'setId' + 'iRmark' => 'setIRmark', + 'id' => 'setId', + 'nvrRequest' => 'setNvrRequest', + 'taxYear' => 'setTaxYear', + 'xml' => 'setXml' ]; /** @@ -224,15 +224,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employees' => 'getEmployees', 'employeeCount' => 'getEmployeeCount', - 'nvrRequest' => 'getNvrRequest', - 'iRmark' => 'getIRmark', - 'xml' => 'getXml', - 'taxYear' => 'getTaxYear', + 'employees' => 'getEmployees', 'employerReferences' => 'getEmployerReferences', 'govTalkSubmission' => 'getGovTalkSubmission', - 'id' => 'getId' + 'iRmark' => 'getIRmark', + 'id' => 'getId', + 'nvrRequest' => 'getNvrRequest', + 'taxYear' => 'getTaxYear', + 'xml' => 'getXml' ]; /** @@ -291,15 +291,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employees', $data ?? [], null); $this->setIfExists('employeeCount', $data ?? [], null); - $this->setIfExists('nvrRequest', $data ?? [], null); - $this->setIfExists('iRmark', $data ?? [], null); - $this->setIfExists('xml', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('employees', $data ?? [], null); $this->setIfExists('employerReferences', $data ?? [], null); $this->setIfExists('govTalkSubmission', $data ?? [], null); + $this->setIfExists('iRmark', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('nvrRequest', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('xml', $data ?? [], null); } /** @@ -344,6 +344,33 @@ public function valid(): bool } + /** + * Gets employeeCount + * + * @return int|null + */ + public function getEmployeeCount(): ?int + { + return $this->container['employeeCount']; + } + + /** + * Sets employeeCount + * + * @param int|null $employeeCount employeeCount + * + * @return $this + */ + public function setEmployeeCount(?int $employeeCount): static + { + if (is_null($employeeCount)) { + throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); + } + $this->container['employeeCount'] = $employeeCount; + + return $this; + } + /** * Gets employees * @@ -379,55 +406,55 @@ public function setEmployees(?array $employees): static } /** - * Gets employeeCount + * Gets employerReferences * - * @return int|null + * @return \SynergiTech\Staffology\Model\EmpRefs|null */ - public function getEmployeeCount(): ?int + public function getEmployerReferences(): ?\SynergiTech\Staffology\Model\EmpRefs { - return $this->container['employeeCount']; + return $this->container['employerReferences']; } /** - * Sets employeeCount + * Sets employerReferences * - * @param int|null $employeeCount employeeCount + * @param \SynergiTech\Staffology\Model\EmpRefs|null $employerReferences employerReferences * * @return $this */ - public function setEmployeeCount(?int $employeeCount): static + public function setEmployerReferences(?\SynergiTech\Staffology\Model\EmpRefs $employerReferences): static { - if (is_null($employeeCount)) { - throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); + if (is_null($employerReferences)) { + throw new InvalidArgumentException('non-nullable employerReferences cannot be null'); } - $this->container['employeeCount'] = $employeeCount; + $this->container['employerReferences'] = $employerReferences; return $this; } /** - * Gets nvrRequest + * Gets govTalkSubmission * - * @return \SynergiTech\Staffology\Model\NvrRequest|null + * @return \SynergiTech\Staffology\Model\GovTalkSubmission|null */ - public function getNvrRequest(): ?\SynergiTech\Staffology\Model\NvrRequest + public function getGovTalkSubmission(): ?\SynergiTech\Staffology\Model\GovTalkSubmission { - return $this->container['nvrRequest']; + return $this->container['govTalkSubmission']; } /** - * Sets nvrRequest + * Sets govTalkSubmission * - * @param \SynergiTech\Staffology\Model\NvrRequest|null $nvrRequest nvrRequest + * @param \SynergiTech\Staffology\Model\GovTalkSubmission|null $govTalkSubmission govTalkSubmission * * @return $this */ - public function setNvrRequest(?\SynergiTech\Staffology\Model\NvrRequest $nvrRequest): static + public function setGovTalkSubmission(?\SynergiTech\Staffology\Model\GovTalkSubmission $govTalkSubmission): static { - if (is_null($nvrRequest)) { - throw new InvalidArgumentException('non-nullable nvrRequest cannot be null'); + if (is_null($govTalkSubmission)) { + throw new InvalidArgumentException('non-nullable govTalkSubmission cannot be null'); } - $this->container['nvrRequest'] = $nvrRequest; + $this->container['govTalkSubmission'] = $govTalkSubmission; return $this; } @@ -467,143 +494,116 @@ public function setIRmark(?string $iRmark): static } /** - * Gets xml + * Gets id * * @return string|null */ - public function getXml(): ?string - { - return $this->container['xml']; - } - - /** - * Sets xml - * - * @param string|null $xml This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. - * - * @return $this - */ - public function setXml(?string $xml): static - { - if (is_null($xml)) { - array_push($this->openAPINullablesSetToNull, 'xml'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('xml', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['xml'] = $xml; - - return $this; - } - - /** - * Gets taxYear - * - * @return \SynergiTech\Staffology\Model\TaxYear|null - */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getId(): ?string { - return $this->container['taxYear']; + return $this->container['id']; } /** - * Sets taxYear + * Sets id * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setId(?string $id): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['id'] = $id; return $this; } /** - * Gets employerReferences + * Gets nvrRequest * - * @return \SynergiTech\Staffology\Model\EmpRefs|null + * @return \SynergiTech\Staffology\Model\NvrRequest|null */ - public function getEmployerReferences(): ?\SynergiTech\Staffology\Model\EmpRefs + public function getNvrRequest(): ?\SynergiTech\Staffology\Model\NvrRequest { - return $this->container['employerReferences']; + return $this->container['nvrRequest']; } /** - * Sets employerReferences + * Sets nvrRequest * - * @param \SynergiTech\Staffology\Model\EmpRefs|null $employerReferences employerReferences + * @param \SynergiTech\Staffology\Model\NvrRequest|null $nvrRequest nvrRequest * * @return $this */ - public function setEmployerReferences(?\SynergiTech\Staffology\Model\EmpRefs $employerReferences): static + public function setNvrRequest(?\SynergiTech\Staffology\Model\NvrRequest $nvrRequest): static { - if (is_null($employerReferences)) { - throw new InvalidArgumentException('non-nullable employerReferences cannot be null'); + if (is_null($nvrRequest)) { + throw new InvalidArgumentException('non-nullable nvrRequest cannot be null'); } - $this->container['employerReferences'] = $employerReferences; + $this->container['nvrRequest'] = $nvrRequest; return $this; } /** - * Gets govTalkSubmission + * Gets taxYear * - * @return \SynergiTech\Staffology\Model\GovTalkSubmission|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getGovTalkSubmission(): ?\SynergiTech\Staffology\Model\GovTalkSubmission + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['govTalkSubmission']; + return $this->container['taxYear']; } /** - * Sets govTalkSubmission + * Sets taxYear * - * @param \SynergiTech\Staffology\Model\GovTalkSubmission|null $govTalkSubmission govTalkSubmission + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setGovTalkSubmission(?\SynergiTech\Staffology\Model\GovTalkSubmission $govTalkSubmission): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($govTalkSubmission)) { - throw new InvalidArgumentException('non-nullable govTalkSubmission cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['govTalkSubmission'] = $govTalkSubmission; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets id + * Gets xml * * @return string|null */ - public function getId(): ?string + public function getXml(): ?string { - return $this->container['id']; + return $this->container['xml']; } /** - * Sets id + * Sets xml * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $xml This property will soon be removed and should not be used. There is now a dedicated API endpoint for retrieving the XML for a submission. * * @return $this */ - public function setId(?string $id): static + public function setXml(?string $xml): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($xml)) { + array_push($this->openAPINullablesSetToNull, 'xml'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('xml', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['xml'] = $xml; return $this; } diff --git a/src/Model/NvrEmployee.php b/src/Model/NvrEmployee.php index fc06acf..2bbb65c 100644 --- a/src/Model/NvrEmployee.php +++ b/src/Model/NvrEmployee.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class NvrEmployee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'employeeUniqueId' => 'string', - 'item' => '\SynergiTech\Staffology\Model\Item', 'employeeDetails' => '\SynergiTech\Staffology\Model\NvrEmployeeDetails', - 'employment' => '\SynergiTech\Staffology\Model\NvrEmployment' + 'employeeUniqueId' => 'string', + 'employment' => '\SynergiTech\Staffology\Model\NvrEmployment', + 'item' => '\SynergiTech\Staffology\Model\Item' ]; /** @@ -71,10 +71,10 @@ class NvrEmployee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'employeeUniqueId' => 'uuid', - 'item' => null, 'employeeDetails' => null, - 'employment' => null + 'employeeUniqueId' => 'uuid', + 'employment' => null, + 'item' => null ]; /** @@ -83,10 +83,10 @@ class NvrEmployee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'employeeUniqueId' => false, - 'item' => false, 'employeeDetails' => false, - 'employment' => false + 'employeeUniqueId' => false, + 'employment' => false, + 'item' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employeeUniqueId' => 'employeeUniqueId', - 'item' => 'item', 'employeeDetails' => 'employeeDetails', - 'employment' => 'employment' + 'employeeUniqueId' => 'employeeUniqueId', + 'employment' => 'employment', + 'item' => 'item' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employeeUniqueId' => 'setEmployeeUniqueId', - 'item' => 'setItem', 'employeeDetails' => 'setEmployeeDetails', - 'employment' => 'setEmployment' + 'employeeUniqueId' => 'setEmployeeUniqueId', + 'employment' => 'setEmployment', + 'item' => 'setItem' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employeeUniqueId' => 'getEmployeeUniqueId', - 'item' => 'getItem', 'employeeDetails' => 'getEmployeeDetails', - 'employment' => 'getEmployment' + 'employeeUniqueId' => 'getEmployeeUniqueId', + 'employment' => 'getEmployment', + 'item' => 'getItem' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employeeUniqueId', $data ?? [], null); - $this->setIfExists('item', $data ?? [], null); $this->setIfExists('employeeDetails', $data ?? [], null); + $this->setIfExists('employeeUniqueId', $data ?? [], null); $this->setIfExists('employment', $data ?? [], null); + $this->setIfExists('item', $data ?? [], null); } /** @@ -310,109 +310,109 @@ public function valid(): bool /** - * Gets employeeUniqueId + * Gets employeeDetails * - * @return string|null + * @return \SynergiTech\Staffology\Model\NvrEmployeeDetails|null */ - public function getEmployeeUniqueId(): ?string + public function getEmployeeDetails(): ?\SynergiTech\Staffology\Model\NvrEmployeeDetails { - return $this->container['employeeUniqueId']; + return $this->container['employeeDetails']; } /** - * Sets employeeUniqueId + * Sets employeeDetails * - * @param string|null $employeeUniqueId employeeUniqueId + * @param \SynergiTech\Staffology\Model\NvrEmployeeDetails|null $employeeDetails employeeDetails * * @return $this */ - public function setEmployeeUniqueId(?string $employeeUniqueId): static + public function setEmployeeDetails(?\SynergiTech\Staffology\Model\NvrEmployeeDetails $employeeDetails): static { - if (is_null($employeeUniqueId)) { - throw new InvalidArgumentException('non-nullable employeeUniqueId cannot be null'); + if (is_null($employeeDetails)) { + throw new InvalidArgumentException('non-nullable employeeDetails cannot be null'); } - $this->container['employeeUniqueId'] = $employeeUniqueId; + $this->container['employeeDetails'] = $employeeDetails; return $this; } /** - * Gets item + * Gets employeeUniqueId * - * @return \SynergiTech\Staffology\Model\Item|null + * @return string|null */ - public function getItem(): ?\SynergiTech\Staffology\Model\Item + public function getEmployeeUniqueId(): ?string { - return $this->container['item']; + return $this->container['employeeUniqueId']; } /** - * Sets item + * Sets employeeUniqueId * - * @param \SynergiTech\Staffology\Model\Item|null $item item + * @param string|null $employeeUniqueId employeeUniqueId * * @return $this */ - public function setItem(?\SynergiTech\Staffology\Model\Item $item): static + public function setEmployeeUniqueId(?string $employeeUniqueId): static { - if (is_null($item)) { - throw new InvalidArgumentException('non-nullable item cannot be null'); + if (is_null($employeeUniqueId)) { + throw new InvalidArgumentException('non-nullable employeeUniqueId cannot be null'); } - $this->container['item'] = $item; + $this->container['employeeUniqueId'] = $employeeUniqueId; return $this; } /** - * Gets employeeDetails + * Gets employment * - * @return \SynergiTech\Staffology\Model\NvrEmployeeDetails|null + * @return \SynergiTech\Staffology\Model\NvrEmployment|null */ - public function getEmployeeDetails(): ?\SynergiTech\Staffology\Model\NvrEmployeeDetails + public function getEmployment(): ?\SynergiTech\Staffology\Model\NvrEmployment { - return $this->container['employeeDetails']; + return $this->container['employment']; } /** - * Sets employeeDetails + * Sets employment * - * @param \SynergiTech\Staffology\Model\NvrEmployeeDetails|null $employeeDetails employeeDetails + * @param \SynergiTech\Staffology\Model\NvrEmployment|null $employment employment * * @return $this */ - public function setEmployeeDetails(?\SynergiTech\Staffology\Model\NvrEmployeeDetails $employeeDetails): static + public function setEmployment(?\SynergiTech\Staffology\Model\NvrEmployment $employment): static { - if (is_null($employeeDetails)) { - throw new InvalidArgumentException('non-nullable employeeDetails cannot be null'); + if (is_null($employment)) { + throw new InvalidArgumentException('non-nullable employment cannot be null'); } - $this->container['employeeDetails'] = $employeeDetails; + $this->container['employment'] = $employment; return $this; } /** - * Gets employment + * Gets item * - * @return \SynergiTech\Staffology\Model\NvrEmployment|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getEmployment(): ?\SynergiTech\Staffology\Model\NvrEmployment + public function getItem(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['employment']; + return $this->container['item']; } /** - * Sets employment + * Sets item * - * @param \SynergiTech\Staffology\Model\NvrEmployment|null $employment employment + * @param \SynergiTech\Staffology\Model\Item|null $item item * * @return $this */ - public function setEmployment(?\SynergiTech\Staffology\Model\NvrEmployment $employment): static + public function setItem(?\SynergiTech\Staffology\Model\Item $item): static { - if (is_null($employment)) { - throw new InvalidArgumentException('non-nullable employment cannot be null'); + if (is_null($item)) { + throw new InvalidArgumentException('non-nullable item cannot be null'); } - $this->container['employment'] = $employment; + $this->container['item'] = $item; return $this; } diff --git a/src/Model/NvrEmployeeDetails.php b/src/Model/NvrEmployeeDetails.php index a063a53..a40e87b 100644 --- a/src/Model/NvrEmployeeDetails.php +++ b/src/Model/NvrEmployeeDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class NvrEmployeeDetails implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'nino' => 'string', - 'name' => '\SynergiTech\Staffology\Model\RtiEmployeeName', 'address' => '\SynergiTech\Staffology\Model\RtiEmployeeAddress', 'birthDate' => 'string', - 'gender' => 'string' + 'gender' => 'string', + 'name' => '\SynergiTech\Staffology\Model\RtiEmployeeName', + 'nino' => 'string' ]; /** @@ -72,11 +72,11 @@ class NvrEmployeeDetails implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'nino' => null, - 'name' => null, 'address' => null, 'birthDate' => null, - 'gender' => null + 'gender' => null, + 'name' => null, + 'nino' => null ]; /** @@ -85,11 +85,11 @@ class NvrEmployeeDetails implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'nino' => true, - 'name' => false, 'address' => false, 'birthDate' => true, - 'gender' => true + 'gender' => true, + 'name' => false, + 'nino' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'nino' => 'nino', - 'name' => 'name', 'address' => 'address', 'birthDate' => 'birthDate', - 'gender' => 'gender' + 'gender' => 'gender', + 'name' => 'name', + 'nino' => 'nino' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'nino' => 'setNino', - 'name' => 'setName', 'address' => 'setAddress', 'birthDate' => 'setBirthDate', - 'gender' => 'setGender' + 'gender' => 'setGender', + 'name' => 'setName', + 'nino' => 'setNino' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'nino' => 'getNino', - 'name' => 'getName', 'address' => 'getAddress', 'birthDate' => 'getBirthDate', - 'gender' => 'getGender' + 'gender' => 'getGender', + 'name' => 'getName', + 'nino' => 'getNino' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('nino', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('address', $data ?? [], null); $this->setIfExists('birthDate', $data ?? [], null); $this->setIfExists('gender', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('nino', $data ?? [], null); } /** @@ -316,67 +316,6 @@ public function valid(): bool } - /** - * Gets nino - * - * @return string|null - */ - public function getNino(): ?string - { - return $this->container['nino']; - } - - /** - * Sets nino - * - * @param string|null $nino nino - * - * @return $this - */ - public function setNino(?string $nino): static - { - if (is_null($nino)) { - array_push($this->openAPINullablesSetToNull, 'nino'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nino', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['nino'] = $nino; - - return $this; - } - - /** - * Gets name - * - * @return \SynergiTech\Staffology\Model\RtiEmployeeName|null - */ - public function getName(): ?\SynergiTech\Staffology\Model\RtiEmployeeName - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param \SynergiTech\Staffology\Model\RtiEmployeeName|null $name name - * - * @return $this - */ - public function setName(?\SynergiTech\Staffology\Model\RtiEmployeeName $name): static - { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); - } - $this->container['name'] = $name; - - return $this; - } - /** * Gets address * @@ -471,6 +410,67 @@ public function setGender(?string $gender): static return $this; } + + /** + * Gets name + * + * @return \SynergiTech\Staffology\Model\RtiEmployeeName|null + */ + public function getName(): ?\SynergiTech\Staffology\Model\RtiEmployeeName + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param \SynergiTech\Staffology\Model\RtiEmployeeName|null $name name + * + * @return $this + */ + public function setName(?\SynergiTech\Staffology\Model\RtiEmployeeName $name): static + { + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets nino + * + * @return string|null + */ + public function getNino(): ?string + { + return $this->container['nino']; + } + + /** + * Sets nino + * + * @param string|null $nino nino + * + * @return $this + */ + public function setNino(?string $nino): static + { + if (is_null($nino)) { + array_push($this->openAPINullablesSetToNull, 'nino'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('nino', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nino'] = $nino; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/NvrEmployment.php b/src/Model/NvrEmployment.php index 6060551..6749c7c 100644 --- a/src/Model/NvrEmployment.php +++ b/src/Model/NvrEmployment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/NvrRequest.php b/src/Model/NvrRequest.php index b1f36b1..ba1bcd5 100644 --- a/src/Model/NvrRequest.php +++ b/src/Model/NvrRequest.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/OccupationalPolicy.php b/src/Model/OccupationalPolicy.php index e77537a..19285ae 100644 --- a/src/Model/OccupationalPolicy.php +++ b/src/Model/OccupationalPolicy.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,18 +59,18 @@ class OccupationalPolicy implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'policyName' => 'string', - 'type' => '\SynergiTech\Staffology\Model\OccupationalPolicyType', + 'daysOrWeeksBeforeRecalculatingEntitlement' => 'int', 'entitlement' => '\SynergiTech\Staffology\Model\OccupationalPolicyEntitlement', - 'sicknessYear' => '\SynergiTech\Staffology\Model\OccupationalPolicySicknessYear', - 'policyStartMonth' => '\SynergiTech\Staffology\Model\CalendarMonth', - 'serviceBands' => '\SynergiTech\Staffology\Model\ServiceBand[]', + 'entitlementRecalculationBasis' => '\SynergiTech\Staffology\Model\OccupationalPolicyEntitlementRecalculationBasis', + 'ignorePreviousYearsSickness' => 'bool', 'payCalculatedOn' => '\SynergiTech\Staffology\Model\OccupationalPolicyPayCalculatedOn', 'payCodeSetUniqueId' => 'string', - 'useAggregatedServiceDate' => 'bool', - 'daysOrWeeksBeforeRecalculatingEntitlement' => 'int', - 'entitlementRecalculationBasis' => '\SynergiTech\Staffology\Model\OccupationalPolicyEntitlementRecalculationBasis', - 'ignorePreviousYearsSickness' => 'bool' + 'policyName' => 'string', + 'policyStartMonth' => '\SynergiTech\Staffology\Model\CalendarMonth', + 'serviceBands' => '\SynergiTech\Staffology\Model\ServiceBand[]', + 'sicknessYear' => '\SynergiTech\Staffology\Model\OccupationalPolicySicknessYear', + 'type' => '\SynergiTech\Staffology\Model\OccupationalPolicyType', + 'useAggregatedServiceDate' => 'bool' ]; /** @@ -79,18 +79,18 @@ class OccupationalPolicy implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'policyName' => null, - 'type' => null, + 'daysOrWeeksBeforeRecalculatingEntitlement' => 'int32', 'entitlement' => null, - 'sicknessYear' => null, - 'policyStartMonth' => null, - 'serviceBands' => null, + 'entitlementRecalculationBasis' => null, + 'ignorePreviousYearsSickness' => null, 'payCalculatedOn' => null, 'payCodeSetUniqueId' => 'uuid', - 'useAggregatedServiceDate' => null, - 'daysOrWeeksBeforeRecalculatingEntitlement' => 'int32', - 'entitlementRecalculationBasis' => null, - 'ignorePreviousYearsSickness' => null + 'policyName' => null, + 'policyStartMonth' => null, + 'serviceBands' => null, + 'sicknessYear' => null, + 'type' => null, + 'useAggregatedServiceDate' => null ]; /** @@ -99,18 +99,18 @@ class OccupationalPolicy implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'policyName' => false, - 'type' => false, + 'daysOrWeeksBeforeRecalculatingEntitlement' => false, 'entitlement' => false, - 'sicknessYear' => false, - 'policyStartMonth' => false, - 'serviceBands' => true, + 'entitlementRecalculationBasis' => false, + 'ignorePreviousYearsSickness' => false, 'payCalculatedOn' => false, 'payCodeSetUniqueId' => true, - 'useAggregatedServiceDate' => false, - 'daysOrWeeksBeforeRecalculatingEntitlement' => false, - 'entitlementRecalculationBasis' => false, - 'ignorePreviousYearsSickness' => false + 'policyName' => false, + 'policyStartMonth' => false, + 'serviceBands' => true, + 'sicknessYear' => false, + 'type' => false, + 'useAggregatedServiceDate' => false ]; /** @@ -199,18 +199,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'policyName' => 'policyName', - 'type' => 'type', + 'daysOrWeeksBeforeRecalculatingEntitlement' => 'daysOrWeeksBeforeRecalculatingEntitlement', 'entitlement' => 'entitlement', - 'sicknessYear' => 'sicknessYear', - 'policyStartMonth' => 'policyStartMonth', - 'serviceBands' => 'serviceBands', + 'entitlementRecalculationBasis' => 'entitlementRecalculationBasis', + 'ignorePreviousYearsSickness' => 'ignorePreviousYearsSickness', 'payCalculatedOn' => 'payCalculatedOn', 'payCodeSetUniqueId' => 'payCodeSetUniqueId', - 'useAggregatedServiceDate' => 'useAggregatedServiceDate', - 'daysOrWeeksBeforeRecalculatingEntitlement' => 'daysOrWeeksBeforeRecalculatingEntitlement', - 'entitlementRecalculationBasis' => 'entitlementRecalculationBasis', - 'ignorePreviousYearsSickness' => 'ignorePreviousYearsSickness' + 'policyName' => 'policyName', + 'policyStartMonth' => 'policyStartMonth', + 'serviceBands' => 'serviceBands', + 'sicknessYear' => 'sicknessYear', + 'type' => 'type', + 'useAggregatedServiceDate' => 'useAggregatedServiceDate' ]; /** @@ -219,18 +219,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'policyName' => 'setPolicyName', - 'type' => 'setType', + 'daysOrWeeksBeforeRecalculatingEntitlement' => 'setDaysOrWeeksBeforeRecalculatingEntitlement', 'entitlement' => 'setEntitlement', - 'sicknessYear' => 'setSicknessYear', - 'policyStartMonth' => 'setPolicyStartMonth', - 'serviceBands' => 'setServiceBands', + 'entitlementRecalculationBasis' => 'setEntitlementRecalculationBasis', + 'ignorePreviousYearsSickness' => 'setIgnorePreviousYearsSickness', 'payCalculatedOn' => 'setPayCalculatedOn', 'payCodeSetUniqueId' => 'setPayCodeSetUniqueId', - 'useAggregatedServiceDate' => 'setUseAggregatedServiceDate', - 'daysOrWeeksBeforeRecalculatingEntitlement' => 'setDaysOrWeeksBeforeRecalculatingEntitlement', - 'entitlementRecalculationBasis' => 'setEntitlementRecalculationBasis', - 'ignorePreviousYearsSickness' => 'setIgnorePreviousYearsSickness' + 'policyName' => 'setPolicyName', + 'policyStartMonth' => 'setPolicyStartMonth', + 'serviceBands' => 'setServiceBands', + 'sicknessYear' => 'setSicknessYear', + 'type' => 'setType', + 'useAggregatedServiceDate' => 'setUseAggregatedServiceDate' ]; /** @@ -239,18 +239,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'policyName' => 'getPolicyName', - 'type' => 'getType', + 'daysOrWeeksBeforeRecalculatingEntitlement' => 'getDaysOrWeeksBeforeRecalculatingEntitlement', 'entitlement' => 'getEntitlement', - 'sicknessYear' => 'getSicknessYear', - 'policyStartMonth' => 'getPolicyStartMonth', - 'serviceBands' => 'getServiceBands', + 'entitlementRecalculationBasis' => 'getEntitlementRecalculationBasis', + 'ignorePreviousYearsSickness' => 'getIgnorePreviousYearsSickness', 'payCalculatedOn' => 'getPayCalculatedOn', 'payCodeSetUniqueId' => 'getPayCodeSetUniqueId', - 'useAggregatedServiceDate' => 'getUseAggregatedServiceDate', - 'daysOrWeeksBeforeRecalculatingEntitlement' => 'getDaysOrWeeksBeforeRecalculatingEntitlement', - 'entitlementRecalculationBasis' => 'getEntitlementRecalculationBasis', - 'ignorePreviousYearsSickness' => 'getIgnorePreviousYearsSickness' + 'policyName' => 'getPolicyName', + 'policyStartMonth' => 'getPolicyStartMonth', + 'serviceBands' => 'getServiceBands', + 'sicknessYear' => 'getSicknessYear', + 'type' => 'getType', + 'useAggregatedServiceDate' => 'getUseAggregatedServiceDate' ]; /** @@ -309,18 +309,18 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('policyName', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('daysOrWeeksBeforeRecalculatingEntitlement', $data ?? [], null); $this->setIfExists('entitlement', $data ?? [], null); - $this->setIfExists('sicknessYear', $data ?? [], null); - $this->setIfExists('policyStartMonth', $data ?? [], null); - $this->setIfExists('serviceBands', $data ?? [], null); + $this->setIfExists('entitlementRecalculationBasis', $data ?? [], null); + $this->setIfExists('ignorePreviousYearsSickness', $data ?? [], null); $this->setIfExists('payCalculatedOn', $data ?? [], null); $this->setIfExists('payCodeSetUniqueId', $data ?? [], null); + $this->setIfExists('policyName', $data ?? [], null); + $this->setIfExists('policyStartMonth', $data ?? [], null); + $this->setIfExists('serviceBands', $data ?? [], null); + $this->setIfExists('sicknessYear', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('useAggregatedServiceDate', $data ?? [], null); - $this->setIfExists('daysOrWeeksBeforeRecalculatingEntitlement', $data ?? [], null); - $this->setIfExists('entitlementRecalculationBasis', $data ?? [], null); - $this->setIfExists('ignorePreviousYearsSickness', $data ?? [], null); } /** @@ -350,6 +350,9 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if ($this->container['entitlement'] === null) { + $invalidProperties[] = "'entitlement' can't be null"; + } if ($this->container['policyName'] === null) { $invalidProperties[] = "'policyName' can't be null"; } @@ -361,15 +364,12 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'policyName', the character length must be bigger than or equal to 1."; } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ($this->container['entitlement'] === null) { - $invalidProperties[] = "'entitlement' can't be null"; - } if ($this->container['sicknessYear'] === null) { $invalidProperties[] = "'sicknessYear' can't be null"; } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } return $invalidProperties; } @@ -386,346 +386,346 @@ public function valid(): bool /** - * Gets policyName + * Gets daysOrWeeksBeforeRecalculatingEntitlement * - * @return string + * @return int|null */ - public function getPolicyName(): string + public function getDaysOrWeeksBeforeRecalculatingEntitlement(): ?int { - return $this->container['policyName']; + return $this->container['daysOrWeeksBeforeRecalculatingEntitlement']; } /** - * Sets policyName + * Sets daysOrWeeksBeforeRecalculatingEntitlement * - * @param string $policyName The unique policy name + * @param int|null $daysOrWeeksBeforeRecalculatingEntitlement How many days or weeks an employee needs to return to work before new entitlements are used in calculations * * @return $this */ - public function setPolicyName(string $policyName): static + public function setDaysOrWeeksBeforeRecalculatingEntitlement(?int $daysOrWeeksBeforeRecalculatingEntitlement): static { - if (is_null($policyName)) { - throw new InvalidArgumentException('non-nullable policyName cannot be null'); - } - if ((mb_strlen($policyName) > 50)) { - throw new InvalidArgumentException('invalid length for $policyName when calling OccupationalPolicy., must be smaller than or equal to 50.'); - } - if ((mb_strlen($policyName) < 1)) { - throw new InvalidArgumentException('invalid length for $policyName when calling OccupationalPolicy., must be bigger than or equal to 1.'); + if (is_null($daysOrWeeksBeforeRecalculatingEntitlement)) { + throw new InvalidArgumentException('non-nullable daysOrWeeksBeforeRecalculatingEntitlement cannot be null'); } - - $this->container['policyName'] = $policyName; + $this->container['daysOrWeeksBeforeRecalculatingEntitlement'] = $daysOrWeeksBeforeRecalculatingEntitlement; return $this; } /** - * Gets type + * Gets entitlement * - * @return \SynergiTech\Staffology\Model\OccupationalPolicyType + * @return \SynergiTech\Staffology\Model\OccupationalPolicyEntitlement */ - public function getType(): \SynergiTech\Staffology\Model\OccupationalPolicyType + public function getEntitlement(): \SynergiTech\Staffology\Model\OccupationalPolicyEntitlement { - return $this->container['type']; + return $this->container['entitlement']; } /** - * Sets type + * Sets entitlement * - * @param \SynergiTech\Staffology\Model\OccupationalPolicyType $type type + * @param \SynergiTech\Staffology\Model\OccupationalPolicyEntitlement $entitlement entitlement * * @return $this */ - public function setType(\SynergiTech\Staffology\Model\OccupationalPolicyType $type): static + public function setEntitlement(\SynergiTech\Staffology\Model\OccupationalPolicyEntitlement $entitlement): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($entitlement)) { + throw new InvalidArgumentException('non-nullable entitlement cannot be null'); } - $this->container['type'] = $type; + $this->container['entitlement'] = $entitlement; return $this; } /** - * Gets entitlement + * Gets entitlementRecalculationBasis * - * @return \SynergiTech\Staffology\Model\OccupationalPolicyEntitlement + * @return \SynergiTech\Staffology\Model\OccupationalPolicyEntitlementRecalculationBasis|null */ - public function getEntitlement(): \SynergiTech\Staffology\Model\OccupationalPolicyEntitlement + public function getEntitlementRecalculationBasis(): ?\SynergiTech\Staffology\Model\OccupationalPolicyEntitlementRecalculationBasis { - return $this->container['entitlement']; + return $this->container['entitlementRecalculationBasis']; } /** - * Sets entitlement + * Sets entitlementRecalculationBasis * - * @param \SynergiTech\Staffology\Model\OccupationalPolicyEntitlement $entitlement entitlement + * @param \SynergiTech\Staffology\Model\OccupationalPolicyEntitlementRecalculationBasis|null $entitlementRecalculationBasis entitlementRecalculationBasis * * @return $this */ - public function setEntitlement(\SynergiTech\Staffology\Model\OccupationalPolicyEntitlement $entitlement): static + public function setEntitlementRecalculationBasis(?\SynergiTech\Staffology\Model\OccupationalPolicyEntitlementRecalculationBasis $entitlementRecalculationBasis): static { - if (is_null($entitlement)) { - throw new InvalidArgumentException('non-nullable entitlement cannot be null'); + if (is_null($entitlementRecalculationBasis)) { + throw new InvalidArgumentException('non-nullable entitlementRecalculationBasis cannot be null'); } - $this->container['entitlement'] = $entitlement; + $this->container['entitlementRecalculationBasis'] = $entitlementRecalculationBasis; return $this; } /** - * Gets sicknessYear + * Gets ignorePreviousYearsSickness * - * @return \SynergiTech\Staffology\Model\OccupationalPolicySicknessYear + * @return bool|null */ - public function getSicknessYear(): \SynergiTech\Staffology\Model\OccupationalPolicySicknessYear + public function getIgnorePreviousYearsSickness(): ?bool { - return $this->container['sicknessYear']; + return $this->container['ignorePreviousYearsSickness']; } /** - * Sets sicknessYear + * Sets ignorePreviousYearsSickness * - * @param \SynergiTech\Staffology\Model\OccupationalPolicySicknessYear $sicknessYear sicknessYear + * @param bool|null $ignorePreviousYearsSickness Defines whether any sickness that relates to a previous year's sickness entitlement should be included in the entitlement calculation, or whether only sickness that is relevant to the current year's entitlement is taken into consideration * * @return $this */ - public function setSicknessYear(\SynergiTech\Staffology\Model\OccupationalPolicySicknessYear $sicknessYear): static + public function setIgnorePreviousYearsSickness(?bool $ignorePreviousYearsSickness): static { - if (is_null($sicknessYear)) { - throw new InvalidArgumentException('non-nullable sicknessYear cannot be null'); + if (is_null($ignorePreviousYearsSickness)) { + throw new InvalidArgumentException('non-nullable ignorePreviousYearsSickness cannot be null'); } - $this->container['sicknessYear'] = $sicknessYear; + $this->container['ignorePreviousYearsSickness'] = $ignorePreviousYearsSickness; return $this; } /** - * Gets policyStartMonth + * Gets payCalculatedOn * - * @return \SynergiTech\Staffology\Model\CalendarMonth|null + * @return \SynergiTech\Staffology\Model\OccupationalPolicyPayCalculatedOn|null */ - public function getPolicyStartMonth(): ?\SynergiTech\Staffology\Model\CalendarMonth + public function getPayCalculatedOn(): ?\SynergiTech\Staffology\Model\OccupationalPolicyPayCalculatedOn { - return $this->container['policyStartMonth']; + return $this->container['payCalculatedOn']; } /** - * Sets policyStartMonth + * Sets payCalculatedOn * - * @param \SynergiTech\Staffology\Model\CalendarMonth|null $policyStartMonth policyStartMonth + * @param \SynergiTech\Staffology\Model\OccupationalPolicyPayCalculatedOn|null $payCalculatedOn payCalculatedOn * * @return $this */ - public function setPolicyStartMonth(?\SynergiTech\Staffology\Model\CalendarMonth $policyStartMonth): static + public function setPayCalculatedOn(?\SynergiTech\Staffology\Model\OccupationalPolicyPayCalculatedOn $payCalculatedOn): static { - if (is_null($policyStartMonth)) { - throw new InvalidArgumentException('non-nullable policyStartMonth cannot be null'); + if (is_null($payCalculatedOn)) { + throw new InvalidArgumentException('non-nullable payCalculatedOn cannot be null'); } - $this->container['policyStartMonth'] = $policyStartMonth; + $this->container['payCalculatedOn'] = $payCalculatedOn; return $this; } /** - * Gets serviceBands + * Gets payCodeSetUniqueId * - * @return \SynergiTech\Staffology\Model\ServiceBand[]|null + * @return string|null */ - public function getServiceBands(): ?array + public function getPayCodeSetUniqueId(): ?string { - return $this->container['serviceBands']; + return $this->container['payCodeSetUniqueId']; } /** - * Sets serviceBands + * Sets payCodeSetUniqueId * - * @param \SynergiTech\Staffology\Model\ServiceBand[]|null $serviceBands Service Bands Json + * @param string|null $payCodeSetUniqueId payCodeSetUniqueId * * @return $this */ - public function setServiceBands(?array $serviceBands): static + public function setPayCodeSetUniqueId(?string $payCodeSetUniqueId): static { - if (is_null($serviceBands)) { - array_push($this->openAPINullablesSetToNull, 'serviceBands'); + if (is_null($payCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'payCodeSetUniqueId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('serviceBands', $nullablesSetToNull); + $index = array_search('payCodeSetUniqueId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['serviceBands'] = $serviceBands; + $this->container['payCodeSetUniqueId'] = $payCodeSetUniqueId; return $this; } /** - * Gets payCalculatedOn + * Gets policyName * - * @return \SynergiTech\Staffology\Model\OccupationalPolicyPayCalculatedOn|null + * @return string */ - public function getPayCalculatedOn(): ?\SynergiTech\Staffology\Model\OccupationalPolicyPayCalculatedOn + public function getPolicyName(): string { - return $this->container['payCalculatedOn']; + return $this->container['policyName']; } /** - * Sets payCalculatedOn + * Sets policyName * - * @param \SynergiTech\Staffology\Model\OccupationalPolicyPayCalculatedOn|null $payCalculatedOn payCalculatedOn + * @param string $policyName The unique policy name * * @return $this */ - public function setPayCalculatedOn(?\SynergiTech\Staffology\Model\OccupationalPolicyPayCalculatedOn $payCalculatedOn): static + public function setPolicyName(string $policyName): static { - if (is_null($payCalculatedOn)) { - throw new InvalidArgumentException('non-nullable payCalculatedOn cannot be null'); + if (is_null($policyName)) { + throw new InvalidArgumentException('non-nullable policyName cannot be null'); } - $this->container['payCalculatedOn'] = $payCalculatedOn; + if ((mb_strlen($policyName) > 50)) { + throw new InvalidArgumentException('invalid length for $policyName when calling OccupationalPolicy., must be smaller than or equal to 50.'); + } + if ((mb_strlen($policyName) < 1)) { + throw new InvalidArgumentException('invalid length for $policyName when calling OccupationalPolicy., must be bigger than or equal to 1.'); + } + + $this->container['policyName'] = $policyName; return $this; } /** - * Gets payCodeSetUniqueId + * Gets policyStartMonth * - * @return string|null + * @return \SynergiTech\Staffology\Model\CalendarMonth|null */ - public function getPayCodeSetUniqueId(): ?string + public function getPolicyStartMonth(): ?\SynergiTech\Staffology\Model\CalendarMonth { - return $this->container['payCodeSetUniqueId']; + return $this->container['policyStartMonth']; } /** - * Sets payCodeSetUniqueId + * Sets policyStartMonth * - * @param string|null $payCodeSetUniqueId payCodeSetUniqueId + * @param \SynergiTech\Staffology\Model\CalendarMonth|null $policyStartMonth policyStartMonth * * @return $this */ - public function setPayCodeSetUniqueId(?string $payCodeSetUniqueId): static + public function setPolicyStartMonth(?\SynergiTech\Staffology\Model\CalendarMonth $policyStartMonth): static { - if (is_null($payCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'payCodeSetUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCodeSetUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($policyStartMonth)) { + throw new InvalidArgumentException('non-nullable policyStartMonth cannot be null'); } - $this->container['payCodeSetUniqueId'] = $payCodeSetUniqueId; + $this->container['policyStartMonth'] = $policyStartMonth; return $this; } /** - * Gets useAggregatedServiceDate + * Gets serviceBands * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ServiceBand[]|null */ - public function getUseAggregatedServiceDate(): ?bool + public function getServiceBands(): ?array { - return $this->container['useAggregatedServiceDate']; + return $this->container['serviceBands']; } /** - * Sets useAggregatedServiceDate + * Sets serviceBands * - * @param bool|null $useAggregatedServiceDate useAggregatedServiceDate + * @param \SynergiTech\Staffology\Model\ServiceBand[]|null $serviceBands Service Bands Json * * @return $this */ - public function setUseAggregatedServiceDate(?bool $useAggregatedServiceDate): static + public function setServiceBands(?array $serviceBands): static { - if (is_null($useAggregatedServiceDate)) { - throw new InvalidArgumentException('non-nullable useAggregatedServiceDate cannot be null'); + if (is_null($serviceBands)) { + array_push($this->openAPINullablesSetToNull, 'serviceBands'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('serviceBands', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useAggregatedServiceDate'] = $useAggregatedServiceDate; + $this->container['serviceBands'] = $serviceBands; return $this; } /** - * Gets daysOrWeeksBeforeRecalculatingEntitlement + * Gets sicknessYear * - * @return int|null + * @return \SynergiTech\Staffology\Model\OccupationalPolicySicknessYear */ - public function getDaysOrWeeksBeforeRecalculatingEntitlement(): ?int + public function getSicknessYear(): \SynergiTech\Staffology\Model\OccupationalPolicySicknessYear { - return $this->container['daysOrWeeksBeforeRecalculatingEntitlement']; + return $this->container['sicknessYear']; } /** - * Sets daysOrWeeksBeforeRecalculatingEntitlement + * Sets sicknessYear * - * @param int|null $daysOrWeeksBeforeRecalculatingEntitlement How many days or weeks an employee needs to return to work before new entitlements are used in calculations + * @param \SynergiTech\Staffology\Model\OccupationalPolicySicknessYear $sicknessYear sicknessYear * * @return $this */ - public function setDaysOrWeeksBeforeRecalculatingEntitlement(?int $daysOrWeeksBeforeRecalculatingEntitlement): static + public function setSicknessYear(\SynergiTech\Staffology\Model\OccupationalPolicySicknessYear $sicknessYear): static { - if (is_null($daysOrWeeksBeforeRecalculatingEntitlement)) { - throw new InvalidArgumentException('non-nullable daysOrWeeksBeforeRecalculatingEntitlement cannot be null'); + if (is_null($sicknessYear)) { + throw new InvalidArgumentException('non-nullable sicknessYear cannot be null'); } - $this->container['daysOrWeeksBeforeRecalculatingEntitlement'] = $daysOrWeeksBeforeRecalculatingEntitlement; + $this->container['sicknessYear'] = $sicknessYear; return $this; } /** - * Gets entitlementRecalculationBasis + * Gets type * - * @return \SynergiTech\Staffology\Model\OccupationalPolicyEntitlementRecalculationBasis|null + * @return \SynergiTech\Staffology\Model\OccupationalPolicyType */ - public function getEntitlementRecalculationBasis(): ?\SynergiTech\Staffology\Model\OccupationalPolicyEntitlementRecalculationBasis + public function getType(): \SynergiTech\Staffology\Model\OccupationalPolicyType { - return $this->container['entitlementRecalculationBasis']; + return $this->container['type']; } /** - * Sets entitlementRecalculationBasis + * Sets type * - * @param \SynergiTech\Staffology\Model\OccupationalPolicyEntitlementRecalculationBasis|null $entitlementRecalculationBasis entitlementRecalculationBasis + * @param \SynergiTech\Staffology\Model\OccupationalPolicyType $type type * * @return $this */ - public function setEntitlementRecalculationBasis(?\SynergiTech\Staffology\Model\OccupationalPolicyEntitlementRecalculationBasis $entitlementRecalculationBasis): static + public function setType(\SynergiTech\Staffology\Model\OccupationalPolicyType $type): static { - if (is_null($entitlementRecalculationBasis)) { - throw new InvalidArgumentException('non-nullable entitlementRecalculationBasis cannot be null'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['entitlementRecalculationBasis'] = $entitlementRecalculationBasis; + $this->container['type'] = $type; return $this; } /** - * Gets ignorePreviousYearsSickness + * Gets useAggregatedServiceDate * * @return bool|null */ - public function getIgnorePreviousYearsSickness(): ?bool + public function getUseAggregatedServiceDate(): ?bool { - return $this->container['ignorePreviousYearsSickness']; + return $this->container['useAggregatedServiceDate']; } /** - * Sets ignorePreviousYearsSickness + * Sets useAggregatedServiceDate * - * @param bool|null $ignorePreviousYearsSickness Defines whether any sickness that relates to a previous year's sickness entitlement should be included in the entitlement calculation, or whether only sickness that is relevant to the current year's entitlement is taken into consideration + * @param bool|null $useAggregatedServiceDate useAggregatedServiceDate * * @return $this */ - public function setIgnorePreviousYearsSickness(?bool $ignorePreviousYearsSickness): static + public function setUseAggregatedServiceDate(?bool $useAggregatedServiceDate): static { - if (is_null($ignorePreviousYearsSickness)) { - throw new InvalidArgumentException('non-nullable ignorePreviousYearsSickness cannot be null'); + if (is_null($useAggregatedServiceDate)) { + throw new InvalidArgumentException('non-nullable useAggregatedServiceDate cannot be null'); } - $this->container['ignorePreviousYearsSickness'] = $ignorePreviousYearsSickness; + $this->container['useAggregatedServiceDate'] = $useAggregatedServiceDate; return $this; } diff --git a/src/Model/OccupationalPolicyEntitlement.php b/src/Model/OccupationalPolicyEntitlement.php index f5bd257..9b5664d 100644 --- a/src/Model/OccupationalPolicyEntitlement.php +++ b/src/Model/OccupationalPolicyEntitlement.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/OccupationalPolicyEntitlementRecalculationBasis.php b/src/Model/OccupationalPolicyEntitlementRecalculationBasis.php index fe2034b..4fa3bd8 100644 --- a/src/Model/OccupationalPolicyEntitlementRecalculationBasis.php +++ b/src/Model/OccupationalPolicyEntitlementRecalculationBasis.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/OccupationalPolicyPayCalculatedOn.php b/src/Model/OccupationalPolicyPayCalculatedOn.php index e404423..4a505a8 100644 --- a/src/Model/OccupationalPolicyPayCalculatedOn.php +++ b/src/Model/OccupationalPolicyPayCalculatedOn.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/OccupationalPolicySicknessYear.php b/src/Model/OccupationalPolicySicknessYear.php index 80b7614..83e8e82 100644 --- a/src/Model/OccupationalPolicySicknessYear.php +++ b/src/Model/OccupationalPolicySicknessYear.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/OccupationalPolicyType.php b/src/Model/OccupationalPolicyType.php index 7d2104a..754af1f 100644 --- a/src/Model/OccupationalPolicyType.php +++ b/src/Model/OccupationalPolicyType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/OccupationalSickLeaveHistory.php b/src/Model/OccupationalSickLeaveHistory.php index 08fe3bc..12fe13e 100644 --- a/src/Model/OccupationalSickLeaveHistory.php +++ b/src/Model/OccupationalSickLeaveHistory.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,16 @@ class OccupationalSickLeaveHistory implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'payrollCode' => 'string', + 'id' => 'string', + 'isReversed' => 'bool', 'leaveDate' => '\DateTime', + 'occupationalPolicy' => 'string', 'payPercent' => 'float', - 'serviceBandFrom' => 'int', - 'serviceBandTo' => 'int', 'payRunId' => 'int', + 'payrollCode' => 'string', 'roleReference' => 'string', - 'occupationalPolicy' => 'string', - 'id' => 'string' + 'serviceBandFrom' => 'int', + 'serviceBandTo' => 'int' ]; /** @@ -76,15 +77,16 @@ class OccupationalSickLeaveHistory implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'payrollCode' => null, + 'id' => 'uuid', + 'isReversed' => null, 'leaveDate' => 'date', + 'occupationalPolicy' => null, 'payPercent' => 'double', - 'serviceBandFrom' => 'int32', - 'serviceBandTo' => 'int32', 'payRunId' => 'int32', + 'payrollCode' => null, 'roleReference' => null, - 'occupationalPolicy' => null, - 'id' => 'uuid' + 'serviceBandFrom' => 'int32', + 'serviceBandTo' => 'int32' ]; /** @@ -93,15 +95,16 @@ class OccupationalSickLeaveHistory implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'payrollCode' => true, + 'id' => false, + 'isReversed' => false, 'leaveDate' => false, + 'occupationalPolicy' => true, 'payPercent' => false, - 'serviceBandFrom' => false, - 'serviceBandTo' => false, 'payRunId' => false, + 'payrollCode' => true, 'roleReference' => true, - 'occupationalPolicy' => true, - 'id' => false + 'serviceBandFrom' => false, + 'serviceBandTo' => false ]; /** @@ -190,15 +193,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollCode' => 'payrollCode', + 'id' => 'id', + 'isReversed' => 'isReversed', 'leaveDate' => 'leaveDate', + 'occupationalPolicy' => 'occupationalPolicy', 'payPercent' => 'payPercent', - 'serviceBandFrom' => 'serviceBandFrom', - 'serviceBandTo' => 'serviceBandTo', 'payRunId' => 'payRunId', + 'payrollCode' => 'payrollCode', 'roleReference' => 'roleReference', - 'occupationalPolicy' => 'occupationalPolicy', - 'id' => 'id' + 'serviceBandFrom' => 'serviceBandFrom', + 'serviceBandTo' => 'serviceBandTo' ]; /** @@ -207,15 +211,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollCode' => 'setPayrollCode', + 'id' => 'setId', + 'isReversed' => 'setIsReversed', 'leaveDate' => 'setLeaveDate', + 'occupationalPolicy' => 'setOccupationalPolicy', 'payPercent' => 'setPayPercent', - 'serviceBandFrom' => 'setServiceBandFrom', - 'serviceBandTo' => 'setServiceBandTo', 'payRunId' => 'setPayRunId', + 'payrollCode' => 'setPayrollCode', 'roleReference' => 'setRoleReference', - 'occupationalPolicy' => 'setOccupationalPolicy', - 'id' => 'setId' + 'serviceBandFrom' => 'setServiceBandFrom', + 'serviceBandTo' => 'setServiceBandTo' ]; /** @@ -224,15 +229,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollCode' => 'getPayrollCode', + 'id' => 'getId', + 'isReversed' => 'getIsReversed', 'leaveDate' => 'getLeaveDate', + 'occupationalPolicy' => 'getOccupationalPolicy', 'payPercent' => 'getPayPercent', - 'serviceBandFrom' => 'getServiceBandFrom', - 'serviceBandTo' => 'getServiceBandTo', 'payRunId' => 'getPayRunId', + 'payrollCode' => 'getPayrollCode', 'roleReference' => 'getRoleReference', - 'occupationalPolicy' => 'getOccupationalPolicy', - 'id' => 'getId' + 'serviceBandFrom' => 'getServiceBandFrom', + 'serviceBandTo' => 'getServiceBandTo' ]; /** @@ -291,15 +297,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isReversed', $data ?? [], null); $this->setIfExists('leaveDate', $data ?? [], null); + $this->setIfExists('occupationalPolicy', $data ?? [], null); $this->setIfExists('payPercent', $data ?? [], null); - $this->setIfExists('serviceBandFrom', $data ?? [], null); - $this->setIfExists('serviceBandTo', $data ?? [], null); $this->setIfExists('payRunId', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('roleReference', $data ?? [], null); - $this->setIfExists('occupationalPolicy', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('serviceBandFrom', $data ?? [], null); + $this->setIfExists('serviceBandTo', $data ?? [], null); } /** @@ -357,143 +364,143 @@ public function valid(): bool /** - * Gets payrollCode + * Gets id * * @return string|null */ - public function getPayrollCode(): ?string + public function getId(): ?string { - return $this->container['payrollCode']; + return $this->container['id']; } /** - * Sets payrollCode + * Sets id * - * @param string|null $payrollCode payrollCode + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setId(?string $id): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['id'] = $id; return $this; } /** - * Gets leaveDate + * Gets isReversed * - * @return \DateTime + * @return bool|null */ - public function getLeaveDate(): \DateTime + public function getIsReversed(): ?bool { - return $this->container['leaveDate']; + return $this->container['isReversed']; } /** - * Sets leaveDate + * Sets isReversed * - * @param \DateTime $leaveDate leaveDate + * @param bool|null $isReversed [readonly] Is set to true if this has been reversed in a Leave * * @return $this */ - public function setLeaveDate(\DateTime $leaveDate): static + public function setIsReversed(?bool $isReversed): static { - if (is_null($leaveDate)) { - throw new InvalidArgumentException('non-nullable leaveDate cannot be null'); + if (is_null($isReversed)) { + throw new InvalidArgumentException('non-nullable isReversed cannot be null'); } - $this->container['leaveDate'] = $leaveDate; + $this->container['isReversed'] = $isReversed; return $this; } /** - * Gets payPercent + * Gets leaveDate * - * @return float + * @return \DateTime */ - public function getPayPercent(): float + public function getLeaveDate(): \DateTime { - return $this->container['payPercent']; + return $this->container['leaveDate']; } /** - * Sets payPercent + * Sets leaveDate * - * @param float $payPercent payPercent + * @param \DateTime $leaveDate leaveDate * * @return $this */ - public function setPayPercent(float $payPercent): static + public function setLeaveDate(\DateTime $leaveDate): static { - if (is_null($payPercent)) { - throw new InvalidArgumentException('non-nullable payPercent cannot be null'); + if (is_null($leaveDate)) { + throw new InvalidArgumentException('non-nullable leaveDate cannot be null'); } - $this->container['payPercent'] = $payPercent; + $this->container['leaveDate'] = $leaveDate; return $this; } /** - * Gets serviceBandFrom + * Gets occupationalPolicy * - * @return int + * @return string|null */ - public function getServiceBandFrom(): int + public function getOccupationalPolicy(): ?string { - return $this->container['serviceBandFrom']; + return $this->container['occupationalPolicy']; } /** - * Sets serviceBandFrom + * Sets occupationalPolicy * - * @param int $serviceBandFrom serviceBandFrom + * @param string|null $occupationalPolicy occupationalPolicy * * @return $this */ - public function setServiceBandFrom(int $serviceBandFrom): static + public function setOccupationalPolicy(?string $occupationalPolicy): static { - if (is_null($serviceBandFrom)) { - throw new InvalidArgumentException('non-nullable serviceBandFrom cannot be null'); + if (is_null($occupationalPolicy)) { + array_push($this->openAPINullablesSetToNull, 'occupationalPolicy'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('occupationalPolicy', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['serviceBandFrom'] = $serviceBandFrom; + $this->container['occupationalPolicy'] = $occupationalPolicy; return $this; } /** - * Gets serviceBandTo + * Gets payPercent * - * @return int + * @return float */ - public function getServiceBandTo(): int + public function getPayPercent(): float { - return $this->container['serviceBandTo']; + return $this->container['payPercent']; } /** - * Sets serviceBandTo + * Sets payPercent * - * @param int $serviceBandTo serviceBandTo + * @param float $payPercent payPercent * * @return $this */ - public function setServiceBandTo(int $serviceBandTo): static + public function setPayPercent(float $payPercent): static { - if (is_null($serviceBandTo)) { - throw new InvalidArgumentException('non-nullable serviceBandTo cannot be null'); + if (is_null($payPercent)) { + throw new InvalidArgumentException('non-nullable payPercent cannot be null'); } - $this->container['serviceBandTo'] = $serviceBandTo; + $this->container['payPercent'] = $payPercent; return $this; } @@ -525,6 +532,40 @@ public function setPayRunId(?int $payRunId): static return $this; } + /** + * Gets payrollCode + * + * @return string|null + */ + public function getPayrollCode(): ?string + { + return $this->container['payrollCode']; + } + + /** + * Sets payrollCode + * + * @param string|null $payrollCode payrollCode + * + * @return $this + */ + public function setPayrollCode(?string $payrollCode): static + { + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payrollCode'] = $payrollCode; + + return $this; + } + /** * Gets roleReference * @@ -560,62 +601,55 @@ public function setRoleReference(?string $roleReference): static } /** - * Gets occupationalPolicy + * Gets serviceBandFrom * - * @return string|null + * @return int */ - public function getOccupationalPolicy(): ?string + public function getServiceBandFrom(): int { - return $this->container['occupationalPolicy']; + return $this->container['serviceBandFrom']; } /** - * Sets occupationalPolicy + * Sets serviceBandFrom * - * @param string|null $occupationalPolicy occupationalPolicy + * @param int $serviceBandFrom serviceBandFrom * * @return $this */ - public function setOccupationalPolicy(?string $occupationalPolicy): static + public function setServiceBandFrom(int $serviceBandFrom): static { - if (is_null($occupationalPolicy)) { - array_push($this->openAPINullablesSetToNull, 'occupationalPolicy'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('occupationalPolicy', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($serviceBandFrom)) { + throw new InvalidArgumentException('non-nullable serviceBandFrom cannot be null'); } - $this->container['occupationalPolicy'] = $occupationalPolicy; + $this->container['serviceBandFrom'] = $serviceBandFrom; return $this; } /** - * Gets id + * Gets serviceBandTo * - * @return string|null + * @return int */ - public function getId(): ?string + public function getServiceBandTo(): int { - return $this->container['id']; + return $this->container['serviceBandTo']; } /** - * Sets id + * Sets serviceBandTo * - * @param string|null $id [readonly] The unique id of the object + * @param int $serviceBandTo serviceBandTo * * @return $this */ - public function setId(?string $id): static + public function setServiceBandTo(int $serviceBandTo): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($serviceBandTo)) { + throw new InvalidArgumentException('non-nullable serviceBandTo cannot be null'); } - $this->container['id'] = $id; + $this->container['serviceBandTo'] = $serviceBandTo; return $this; } diff --git a/src/Model/OpeningBalances.php b/src/Model/OpeningBalances.php index 134d0ce..37a47bc 100644 --- a/src/Model/OpeningBalances.php +++ b/src/Model/OpeningBalances.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,31 +59,31 @@ class OpeningBalances implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'notNewStarter' => 'bool', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'previousEmployerGross' => 'float', - 'previousEmployerTax' => 'float', + 'benefitsTaxedViaPayroll' => 'float', 'currentEmployerGross' => 'float', - 'currentEmployerTax' => 'float', 'currentEmployerNet' => 'float', - 'studentLoanDeductions' => 'float', - 'postgradLoanDeductions' => 'float', - 'empeePenContribnsPaid' => 'float', + 'currentEmployerTax' => 'float', 'empeePenContribnsNotPaid' => 'float', - 'smp' => 'float', - 'spp' => 'float', + 'empeePenContribnsPaid' => 'float', + 'employee' => '\SynergiTech\Staffology\Model\Item', + 'foreignTaxCredit' => 'float', + 'foreignTaxCreditReclaimed' => 'float', + 'mapsMiles' => 'int', + 'nicSummaries' => '\SynergiTech\Staffology\Model\NicSummary[]', + 'notNewStarter' => 'bool', + 'postgradLoanDeductions' => 'float', + 'previousEmployerGross' => 'float', + 'previousEmployerTax' => 'float', + 'realTimeClass1ANi' => 'float', 'sap' => 'float', 'shpp' => 'float', - 'spbp' => 'float', + 'smp' => 'float', 'sncp' => 'float', - 'realTimeClass1ANi' => 'float', - 'terminationPayments' => 'float', - 'mapsMiles' => 'int', - 'benefitsTaxedViaPayroll' => 'float', - 'nicSummaries' => '\SynergiTech\Staffology\Model\NicSummary[]', - 'foreignTaxCredit' => 'float', - 'foreignTaxCreditReclaimed' => 'float', - 'employee' => '\SynergiTech\Staffology\Model\Item' + 'spbp' => 'float', + 'spp' => 'float', + 'studentLoanDeductions' => 'float', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'terminationPayments' => 'float' ]; /** @@ -92,31 +92,31 @@ class OpeningBalances implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'notNewStarter' => null, - 'taxYear' => null, - 'previousEmployerGross' => 'double', - 'previousEmployerTax' => 'double', + 'benefitsTaxedViaPayroll' => 'double', 'currentEmployerGross' => 'double', - 'currentEmployerTax' => 'double', 'currentEmployerNet' => 'double', - 'studentLoanDeductions' => 'double', - 'postgradLoanDeductions' => 'double', - 'empeePenContribnsPaid' => 'double', + 'currentEmployerTax' => 'double', 'empeePenContribnsNotPaid' => 'double', - 'smp' => 'double', - 'spp' => 'double', + 'empeePenContribnsPaid' => 'double', + 'employee' => null, + 'foreignTaxCredit' => 'double', + 'foreignTaxCreditReclaimed' => 'double', + 'mapsMiles' => 'int32', + 'nicSummaries' => null, + 'notNewStarter' => null, + 'postgradLoanDeductions' => 'double', + 'previousEmployerGross' => 'double', + 'previousEmployerTax' => 'double', + 'realTimeClass1ANi' => 'double', 'sap' => 'double', 'shpp' => 'double', - 'spbp' => 'double', + 'smp' => 'double', 'sncp' => 'double', - 'realTimeClass1ANi' => 'double', - 'terminationPayments' => 'double', - 'mapsMiles' => 'int32', - 'benefitsTaxedViaPayroll' => 'double', - 'nicSummaries' => null, - 'foreignTaxCredit' => 'double', - 'foreignTaxCreditReclaimed' => 'double', - 'employee' => null + 'spbp' => 'double', + 'spp' => 'double', + 'studentLoanDeductions' => 'double', + 'taxYear' => null, + 'terminationPayments' => 'double' ]; /** @@ -125,31 +125,31 @@ class OpeningBalances implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'notNewStarter' => false, - 'taxYear' => false, - 'previousEmployerGross' => false, - 'previousEmployerTax' => false, + 'benefitsTaxedViaPayroll' => false, 'currentEmployerGross' => false, - 'currentEmployerTax' => false, 'currentEmployerNet' => false, - 'studentLoanDeductions' => false, - 'postgradLoanDeductions' => false, - 'empeePenContribnsPaid' => false, + 'currentEmployerTax' => false, 'empeePenContribnsNotPaid' => false, - 'smp' => false, - 'spp' => false, + 'empeePenContribnsPaid' => false, + 'employee' => false, + 'foreignTaxCredit' => false, + 'foreignTaxCreditReclaimed' => false, + 'mapsMiles' => false, + 'nicSummaries' => true, + 'notNewStarter' => false, + 'postgradLoanDeductions' => false, + 'previousEmployerGross' => false, + 'previousEmployerTax' => false, + 'realTimeClass1ANi' => false, 'sap' => false, 'shpp' => false, - 'spbp' => false, + 'smp' => false, 'sncp' => false, - 'realTimeClass1ANi' => false, - 'terminationPayments' => false, - 'mapsMiles' => false, - 'benefitsTaxedViaPayroll' => false, - 'nicSummaries' => true, - 'foreignTaxCredit' => false, - 'foreignTaxCreditReclaimed' => false, - 'employee' => false + 'spbp' => false, + 'spp' => false, + 'studentLoanDeductions' => false, + 'taxYear' => false, + 'terminationPayments' => false ]; /** @@ -238,31 +238,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'notNewStarter' => 'notNewStarter', - 'taxYear' => 'taxYear', - 'previousEmployerGross' => 'previousEmployerGross', - 'previousEmployerTax' => 'previousEmployerTax', + 'benefitsTaxedViaPayroll' => 'benefitsTaxedViaPayroll', 'currentEmployerGross' => 'currentEmployerGross', - 'currentEmployerTax' => 'currentEmployerTax', 'currentEmployerNet' => 'currentEmployerNet', - 'studentLoanDeductions' => 'studentLoanDeductions', - 'postgradLoanDeductions' => 'postgradLoanDeductions', - 'empeePenContribnsPaid' => 'empeePenContribnsPaid', + 'currentEmployerTax' => 'currentEmployerTax', 'empeePenContribnsNotPaid' => 'empeePenContribnsNotPaid', - 'smp' => 'smp', - 'spp' => 'spp', + 'empeePenContribnsPaid' => 'empeePenContribnsPaid', + 'employee' => 'employee', + 'foreignTaxCredit' => 'foreignTaxCredit', + 'foreignTaxCreditReclaimed' => 'foreignTaxCreditReclaimed', + 'mapsMiles' => 'mapsMiles', + 'nicSummaries' => 'nicSummaries', + 'notNewStarter' => 'notNewStarter', + 'postgradLoanDeductions' => 'postgradLoanDeductions', + 'previousEmployerGross' => 'previousEmployerGross', + 'previousEmployerTax' => 'previousEmployerTax', + 'realTimeClass1ANi' => 'realTimeClass1ANi', 'sap' => 'sap', 'shpp' => 'shpp', - 'spbp' => 'spbp', + 'smp' => 'smp', 'sncp' => 'sncp', - 'realTimeClass1ANi' => 'realTimeClass1ANi', - 'terminationPayments' => 'terminationPayments', - 'mapsMiles' => 'mapsMiles', - 'benefitsTaxedViaPayroll' => 'benefitsTaxedViaPayroll', - 'nicSummaries' => 'nicSummaries', - 'foreignTaxCredit' => 'foreignTaxCredit', - 'foreignTaxCreditReclaimed' => 'foreignTaxCreditReclaimed', - 'employee' => 'employee' + 'spbp' => 'spbp', + 'spp' => 'spp', + 'studentLoanDeductions' => 'studentLoanDeductions', + 'taxYear' => 'taxYear', + 'terminationPayments' => 'terminationPayments' ]; /** @@ -271,31 +271,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'notNewStarter' => 'setNotNewStarter', - 'taxYear' => 'setTaxYear', - 'previousEmployerGross' => 'setPreviousEmployerGross', - 'previousEmployerTax' => 'setPreviousEmployerTax', + 'benefitsTaxedViaPayroll' => 'setBenefitsTaxedViaPayroll', 'currentEmployerGross' => 'setCurrentEmployerGross', - 'currentEmployerTax' => 'setCurrentEmployerTax', 'currentEmployerNet' => 'setCurrentEmployerNet', - 'studentLoanDeductions' => 'setStudentLoanDeductions', - 'postgradLoanDeductions' => 'setPostgradLoanDeductions', - 'empeePenContribnsPaid' => 'setEmpeePenContribnsPaid', + 'currentEmployerTax' => 'setCurrentEmployerTax', 'empeePenContribnsNotPaid' => 'setEmpeePenContribnsNotPaid', - 'smp' => 'setSmp', - 'spp' => 'setSpp', + 'empeePenContribnsPaid' => 'setEmpeePenContribnsPaid', + 'employee' => 'setEmployee', + 'foreignTaxCredit' => 'setForeignTaxCredit', + 'foreignTaxCreditReclaimed' => 'setForeignTaxCreditReclaimed', + 'mapsMiles' => 'setMapsMiles', + 'nicSummaries' => 'setNicSummaries', + 'notNewStarter' => 'setNotNewStarter', + 'postgradLoanDeductions' => 'setPostgradLoanDeductions', + 'previousEmployerGross' => 'setPreviousEmployerGross', + 'previousEmployerTax' => 'setPreviousEmployerTax', + 'realTimeClass1ANi' => 'setRealTimeClass1ANi', 'sap' => 'setSap', 'shpp' => 'setShpp', - 'spbp' => 'setSpbp', + 'smp' => 'setSmp', 'sncp' => 'setSncp', - 'realTimeClass1ANi' => 'setRealTimeClass1ANi', - 'terminationPayments' => 'setTerminationPayments', - 'mapsMiles' => 'setMapsMiles', - 'benefitsTaxedViaPayroll' => 'setBenefitsTaxedViaPayroll', - 'nicSummaries' => 'setNicSummaries', - 'foreignTaxCredit' => 'setForeignTaxCredit', - 'foreignTaxCreditReclaimed' => 'setForeignTaxCreditReclaimed', - 'employee' => 'setEmployee' + 'spbp' => 'setSpbp', + 'spp' => 'setSpp', + 'studentLoanDeductions' => 'setStudentLoanDeductions', + 'taxYear' => 'setTaxYear', + 'terminationPayments' => 'setTerminationPayments' ]; /** @@ -304,31 +304,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'notNewStarter' => 'getNotNewStarter', - 'taxYear' => 'getTaxYear', - 'previousEmployerGross' => 'getPreviousEmployerGross', - 'previousEmployerTax' => 'getPreviousEmployerTax', + 'benefitsTaxedViaPayroll' => 'getBenefitsTaxedViaPayroll', 'currentEmployerGross' => 'getCurrentEmployerGross', - 'currentEmployerTax' => 'getCurrentEmployerTax', 'currentEmployerNet' => 'getCurrentEmployerNet', - 'studentLoanDeductions' => 'getStudentLoanDeductions', - 'postgradLoanDeductions' => 'getPostgradLoanDeductions', - 'empeePenContribnsPaid' => 'getEmpeePenContribnsPaid', + 'currentEmployerTax' => 'getCurrentEmployerTax', 'empeePenContribnsNotPaid' => 'getEmpeePenContribnsNotPaid', - 'smp' => 'getSmp', - 'spp' => 'getSpp', + 'empeePenContribnsPaid' => 'getEmpeePenContribnsPaid', + 'employee' => 'getEmployee', + 'foreignTaxCredit' => 'getForeignTaxCredit', + 'foreignTaxCreditReclaimed' => 'getForeignTaxCreditReclaimed', + 'mapsMiles' => 'getMapsMiles', + 'nicSummaries' => 'getNicSummaries', + 'notNewStarter' => 'getNotNewStarter', + 'postgradLoanDeductions' => 'getPostgradLoanDeductions', + 'previousEmployerGross' => 'getPreviousEmployerGross', + 'previousEmployerTax' => 'getPreviousEmployerTax', + 'realTimeClass1ANi' => 'getRealTimeClass1ANi', 'sap' => 'getSap', 'shpp' => 'getShpp', - 'spbp' => 'getSpbp', + 'smp' => 'getSmp', 'sncp' => 'getSncp', - 'realTimeClass1ANi' => 'getRealTimeClass1ANi', - 'terminationPayments' => 'getTerminationPayments', - 'mapsMiles' => 'getMapsMiles', - 'benefitsTaxedViaPayroll' => 'getBenefitsTaxedViaPayroll', - 'nicSummaries' => 'getNicSummaries', - 'foreignTaxCredit' => 'getForeignTaxCredit', - 'foreignTaxCreditReclaimed' => 'getForeignTaxCreditReclaimed', - 'employee' => 'getEmployee' + 'spbp' => 'getSpbp', + 'spp' => 'getSpp', + 'studentLoanDeductions' => 'getStudentLoanDeductions', + 'taxYear' => 'getTaxYear', + 'terminationPayments' => 'getTerminationPayments' ]; /** @@ -387,31 +387,31 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('notNewStarter', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('previousEmployerGross', $data ?? [], null); - $this->setIfExists('previousEmployerTax', $data ?? [], null); + $this->setIfExists('benefitsTaxedViaPayroll', $data ?? [], null); $this->setIfExists('currentEmployerGross', $data ?? [], null); - $this->setIfExists('currentEmployerTax', $data ?? [], null); $this->setIfExists('currentEmployerNet', $data ?? [], null); - $this->setIfExists('studentLoanDeductions', $data ?? [], null); - $this->setIfExists('postgradLoanDeductions', $data ?? [], null); - $this->setIfExists('empeePenContribnsPaid', $data ?? [], null); + $this->setIfExists('currentEmployerTax', $data ?? [], null); $this->setIfExists('empeePenContribnsNotPaid', $data ?? [], null); - $this->setIfExists('smp', $data ?? [], null); - $this->setIfExists('spp', $data ?? [], null); + $this->setIfExists('empeePenContribnsPaid', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('foreignTaxCredit', $data ?? [], null); + $this->setIfExists('foreignTaxCreditReclaimed', $data ?? [], null); + $this->setIfExists('mapsMiles', $data ?? [], null); + $this->setIfExists('nicSummaries', $data ?? [], null); + $this->setIfExists('notNewStarter', $data ?? [], null); + $this->setIfExists('postgradLoanDeductions', $data ?? [], null); + $this->setIfExists('previousEmployerGross', $data ?? [], null); + $this->setIfExists('previousEmployerTax', $data ?? [], null); + $this->setIfExists('realTimeClass1ANi', $data ?? [], null); $this->setIfExists('sap', $data ?? [], null); $this->setIfExists('shpp', $data ?? [], null); - $this->setIfExists('spbp', $data ?? [], null); + $this->setIfExists('smp', $data ?? [], null); $this->setIfExists('sncp', $data ?? [], null); - $this->setIfExists('realTimeClass1ANi', $data ?? [], null); + $this->setIfExists('spbp', $data ?? [], null); + $this->setIfExists('spp', $data ?? [], null); + $this->setIfExists('studentLoanDeductions', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('terminationPayments', $data ?? [], null); - $this->setIfExists('mapsMiles', $data ?? [], null); - $this->setIfExists('benefitsTaxedViaPayroll', $data ?? [], null); - $this->setIfExists('nicSummaries', $data ?? [], null); - $this->setIfExists('foreignTaxCredit', $data ?? [], null); - $this->setIfExists('foreignTaxCreditReclaimed', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); } /** @@ -457,683 +457,683 @@ public function valid(): bool /** - * Gets notNewStarter + * Gets benefitsTaxedViaPayroll * - * @return bool|null + * @return float|null */ - public function getNotNewStarter(): ?bool + public function getBenefitsTaxedViaPayroll(): ?float { - return $this->container['notNewStarter']; + return $this->container['benefitsTaxedViaPayroll']; } /** - * Sets notNewStarter + * Sets benefitsTaxedViaPayroll * - * @param bool|null $notNewStarter notNewStarter + * @param float|null $benefitsTaxedViaPayroll benefitsTaxedViaPayroll * * @return $this */ - public function setNotNewStarter(?bool $notNewStarter): static + public function setBenefitsTaxedViaPayroll(?float $benefitsTaxedViaPayroll): static { - if (is_null($notNewStarter)) { - throw new InvalidArgumentException('non-nullable notNewStarter cannot be null'); + if (is_null($benefitsTaxedViaPayroll)) { + throw new InvalidArgumentException('non-nullable benefitsTaxedViaPayroll cannot be null'); } - $this->container['notNewStarter'] = $notNewStarter; + $this->container['benefitsTaxedViaPayroll'] = $benefitsTaxedViaPayroll; return $this; } /** - * Gets taxYear + * Gets currentEmployerGross * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return float|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getCurrentEmployerGross(): ?float { - return $this->container['taxYear']; + return $this->container['currentEmployerGross']; } /** - * Sets taxYear + * Sets currentEmployerGross * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param float|null $currentEmployerGross currentEmployerGross * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setCurrentEmployerGross(?float $currentEmployerGross): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($currentEmployerGross)) { + throw new InvalidArgumentException('non-nullable currentEmployerGross cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['currentEmployerGross'] = $currentEmployerGross; return $this; } /** - * Gets previousEmployerGross + * Gets currentEmployerNet * * @return float|null */ - public function getPreviousEmployerGross(): ?float + public function getCurrentEmployerNet(): ?float { - return $this->container['previousEmployerGross']; + return $this->container['currentEmployerNet']; } /** - * Sets previousEmployerGross + * Sets currentEmployerNet * - * @param float|null $previousEmployerGross previousEmployerGross + * @param float|null $currentEmployerNet currentEmployerNet * * @return $this */ - public function setPreviousEmployerGross(?float $previousEmployerGross): static + public function setCurrentEmployerNet(?float $currentEmployerNet): static { - if (is_null($previousEmployerGross)) { - throw new InvalidArgumentException('non-nullable previousEmployerGross cannot be null'); + if (is_null($currentEmployerNet)) { + throw new InvalidArgumentException('non-nullable currentEmployerNet cannot be null'); } - $this->container['previousEmployerGross'] = $previousEmployerGross; + $this->container['currentEmployerNet'] = $currentEmployerNet; return $this; } /** - * Gets previousEmployerTax + * Gets currentEmployerTax * * @return float|null */ - public function getPreviousEmployerTax(): ?float + public function getCurrentEmployerTax(): ?float { - return $this->container['previousEmployerTax']; + return $this->container['currentEmployerTax']; } /** - * Sets previousEmployerTax + * Sets currentEmployerTax * - * @param float|null $previousEmployerTax previousEmployerTax + * @param float|null $currentEmployerTax currentEmployerTax * * @return $this */ - public function setPreviousEmployerTax(?float $previousEmployerTax): static + public function setCurrentEmployerTax(?float $currentEmployerTax): static { - if (is_null($previousEmployerTax)) { - throw new InvalidArgumentException('non-nullable previousEmployerTax cannot be null'); + if (is_null($currentEmployerTax)) { + throw new InvalidArgumentException('non-nullable currentEmployerTax cannot be null'); } - $this->container['previousEmployerTax'] = $previousEmployerTax; + $this->container['currentEmployerTax'] = $currentEmployerTax; return $this; } /** - * Gets currentEmployerGross + * Gets empeePenContribnsNotPaid * * @return float|null */ - public function getCurrentEmployerGross(): ?float + public function getEmpeePenContribnsNotPaid(): ?float { - return $this->container['currentEmployerGross']; + return $this->container['empeePenContribnsNotPaid']; } /** - * Sets currentEmployerGross + * Sets empeePenContribnsNotPaid * - * @param float|null $currentEmployerGross currentEmployerGross + * @param float|null $empeePenContribnsNotPaid empeePenContribnsNotPaid * * @return $this */ - public function setCurrentEmployerGross(?float $currentEmployerGross): static + public function setEmpeePenContribnsNotPaid(?float $empeePenContribnsNotPaid): static { - if (is_null($currentEmployerGross)) { - throw new InvalidArgumentException('non-nullable currentEmployerGross cannot be null'); + if (is_null($empeePenContribnsNotPaid)) { + throw new InvalidArgumentException('non-nullable empeePenContribnsNotPaid cannot be null'); } - $this->container['currentEmployerGross'] = $currentEmployerGross; + $this->container['empeePenContribnsNotPaid'] = $empeePenContribnsNotPaid; return $this; } /** - * Gets currentEmployerTax + * Gets empeePenContribnsPaid * * @return float|null */ - public function getCurrentEmployerTax(): ?float + public function getEmpeePenContribnsPaid(): ?float { - return $this->container['currentEmployerTax']; + return $this->container['empeePenContribnsPaid']; } /** - * Sets currentEmployerTax + * Sets empeePenContribnsPaid * - * @param float|null $currentEmployerTax currentEmployerTax + * @param float|null $empeePenContribnsPaid empeePenContribnsPaid * * @return $this */ - public function setCurrentEmployerTax(?float $currentEmployerTax): static + public function setEmpeePenContribnsPaid(?float $empeePenContribnsPaid): static { - if (is_null($currentEmployerTax)) { - throw new InvalidArgumentException('non-nullable currentEmployerTax cannot be null'); + if (is_null($empeePenContribnsPaid)) { + throw new InvalidArgumentException('non-nullable empeePenContribnsPaid cannot be null'); } - $this->container['currentEmployerTax'] = $currentEmployerTax; + $this->container['empeePenContribnsPaid'] = $empeePenContribnsPaid; return $this; } /** - * Gets currentEmployerNet + * Gets employee * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getCurrentEmployerNet(): ?float + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['currentEmployerNet']; + return $this->container['employee']; } /** - * Sets currentEmployerNet + * Sets employee * - * @param float|null $currentEmployerNet currentEmployerNet + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setCurrentEmployerNet(?float $currentEmployerNet): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($currentEmployerNet)) { - throw new InvalidArgumentException('non-nullable currentEmployerNet cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['currentEmployerNet'] = $currentEmployerNet; + $this->container['employee'] = $employee; return $this; } /** - * Gets studentLoanDeductions + * Gets foreignTaxCredit * * @return float|null */ - public function getStudentLoanDeductions(): ?float + public function getForeignTaxCredit(): ?float { - return $this->container['studentLoanDeductions']; + return $this->container['foreignTaxCredit']; } /** - * Sets studentLoanDeductions + * Sets foreignTaxCredit * - * @param float|null $studentLoanDeductions studentLoanDeductions + * @param float|null $foreignTaxCredit foreignTaxCredit * * @return $this */ - public function setStudentLoanDeductions(?float $studentLoanDeductions): static + public function setForeignTaxCredit(?float $foreignTaxCredit): static { - if (is_null($studentLoanDeductions)) { - throw new InvalidArgumentException('non-nullable studentLoanDeductions cannot be null'); + if (is_null($foreignTaxCredit)) { + throw new InvalidArgumentException('non-nullable foreignTaxCredit cannot be null'); } - $this->container['studentLoanDeductions'] = $studentLoanDeductions; + $this->container['foreignTaxCredit'] = $foreignTaxCredit; return $this; } /** - * Gets postgradLoanDeductions + * Gets foreignTaxCreditReclaimed * * @return float|null */ - public function getPostgradLoanDeductions(): ?float + public function getForeignTaxCreditReclaimed(): ?float { - return $this->container['postgradLoanDeductions']; + return $this->container['foreignTaxCreditReclaimed']; } /** - * Sets postgradLoanDeductions + * Sets foreignTaxCreditReclaimed * - * @param float|null $postgradLoanDeductions postgradLoanDeductions + * @param float|null $foreignTaxCreditReclaimed foreignTaxCreditReclaimed * * @return $this */ - public function setPostgradLoanDeductions(?float $postgradLoanDeductions): static + public function setForeignTaxCreditReclaimed(?float $foreignTaxCreditReclaimed): static { - if (is_null($postgradLoanDeductions)) { - throw new InvalidArgumentException('non-nullable postgradLoanDeductions cannot be null'); + if (is_null($foreignTaxCreditReclaimed)) { + throw new InvalidArgumentException('non-nullable foreignTaxCreditReclaimed cannot be null'); } - $this->container['postgradLoanDeductions'] = $postgradLoanDeductions; + $this->container['foreignTaxCreditReclaimed'] = $foreignTaxCreditReclaimed; return $this; } /** - * Gets empeePenContribnsPaid + * Gets mapsMiles * - * @return float|null + * @return int|null */ - public function getEmpeePenContribnsPaid(): ?float + public function getMapsMiles(): ?int { - return $this->container['empeePenContribnsPaid']; + return $this->container['mapsMiles']; } /** - * Sets empeePenContribnsPaid + * Sets mapsMiles * - * @param float|null $empeePenContribnsPaid empeePenContribnsPaid + * @param int|null $mapsMiles mapsMiles * * @return $this */ - public function setEmpeePenContribnsPaid(?float $empeePenContribnsPaid): static + public function setMapsMiles(?int $mapsMiles): static { - if (is_null($empeePenContribnsPaid)) { - throw new InvalidArgumentException('non-nullable empeePenContribnsPaid cannot be null'); + if (is_null($mapsMiles)) { + throw new InvalidArgumentException('non-nullable mapsMiles cannot be null'); } - $this->container['empeePenContribnsPaid'] = $empeePenContribnsPaid; + $this->container['mapsMiles'] = $mapsMiles; return $this; } /** - * Gets empeePenContribnsNotPaid + * Gets nicSummaries * - * @return float|null + * @return \SynergiTech\Staffology\Model\NicSummary[]|null */ - public function getEmpeePenContribnsNotPaid(): ?float + public function getNicSummaries(): ?array { - return $this->container['empeePenContribnsNotPaid']; + return $this->container['nicSummaries']; } /** - * Sets empeePenContribnsNotPaid + * Sets nicSummaries * - * @param float|null $empeePenContribnsNotPaid empeePenContribnsNotPaid + * @param \SynergiTech\Staffology\Model\NicSummary[]|null $nicSummaries nicSummaries * * @return $this */ - public function setEmpeePenContribnsNotPaid(?float $empeePenContribnsNotPaid): static + public function setNicSummaries(?array $nicSummaries): static { - if (is_null($empeePenContribnsNotPaid)) { - throw new InvalidArgumentException('non-nullable empeePenContribnsNotPaid cannot be null'); + if (is_null($nicSummaries)) { + array_push($this->openAPINullablesSetToNull, 'nicSummaries'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('nicSummaries', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['empeePenContribnsNotPaid'] = $empeePenContribnsNotPaid; + $this->container['nicSummaries'] = $nicSummaries; return $this; } /** - * Gets smp + * Gets notNewStarter * - * @return float|null + * @return bool|null */ - public function getSmp(): ?float + public function getNotNewStarter(): ?bool { - return $this->container['smp']; + return $this->container['notNewStarter']; } /** - * Sets smp + * Sets notNewStarter * - * @param float|null $smp smp + * @param bool|null $notNewStarter notNewStarter * * @return $this */ - public function setSmp(?float $smp): static + public function setNotNewStarter(?bool $notNewStarter): static { - if (is_null($smp)) { - throw new InvalidArgumentException('non-nullable smp cannot be null'); + if (is_null($notNewStarter)) { + throw new InvalidArgumentException('non-nullable notNewStarter cannot be null'); } - $this->container['smp'] = $smp; + $this->container['notNewStarter'] = $notNewStarter; return $this; } /** - * Gets spp + * Gets postgradLoanDeductions * * @return float|null */ - public function getSpp(): ?float + public function getPostgradLoanDeductions(): ?float { - return $this->container['spp']; + return $this->container['postgradLoanDeductions']; } /** - * Sets spp + * Sets postgradLoanDeductions * - * @param float|null $spp spp + * @param float|null $postgradLoanDeductions postgradLoanDeductions * * @return $this */ - public function setSpp(?float $spp): static + public function setPostgradLoanDeductions(?float $postgradLoanDeductions): static { - if (is_null($spp)) { - throw new InvalidArgumentException('non-nullable spp cannot be null'); + if (is_null($postgradLoanDeductions)) { + throw new InvalidArgumentException('non-nullable postgradLoanDeductions cannot be null'); } - $this->container['spp'] = $spp; + $this->container['postgradLoanDeductions'] = $postgradLoanDeductions; return $this; } /** - * Gets sap + * Gets previousEmployerGross * * @return float|null */ - public function getSap(): ?float + public function getPreviousEmployerGross(): ?float { - return $this->container['sap']; + return $this->container['previousEmployerGross']; } /** - * Sets sap + * Sets previousEmployerGross * - * @param float|null $sap sap + * @param float|null $previousEmployerGross previousEmployerGross * * @return $this */ - public function setSap(?float $sap): static + public function setPreviousEmployerGross(?float $previousEmployerGross): static { - if (is_null($sap)) { - throw new InvalidArgumentException('non-nullable sap cannot be null'); + if (is_null($previousEmployerGross)) { + throw new InvalidArgumentException('non-nullable previousEmployerGross cannot be null'); } - $this->container['sap'] = $sap; + $this->container['previousEmployerGross'] = $previousEmployerGross; return $this; } /** - * Gets shpp + * Gets previousEmployerTax * * @return float|null */ - public function getShpp(): ?float + public function getPreviousEmployerTax(): ?float { - return $this->container['shpp']; + return $this->container['previousEmployerTax']; } /** - * Sets shpp + * Sets previousEmployerTax * - * @param float|null $shpp shpp + * @param float|null $previousEmployerTax previousEmployerTax * * @return $this */ - public function setShpp(?float $shpp): static + public function setPreviousEmployerTax(?float $previousEmployerTax): static { - if (is_null($shpp)) { - throw new InvalidArgumentException('non-nullable shpp cannot be null'); + if (is_null($previousEmployerTax)) { + throw new InvalidArgumentException('non-nullable previousEmployerTax cannot be null'); } - $this->container['shpp'] = $shpp; + $this->container['previousEmployerTax'] = $previousEmployerTax; return $this; } /** - * Gets spbp + * Gets realTimeClass1ANi * * @return float|null */ - public function getSpbp(): ?float + public function getRealTimeClass1ANi(): ?float { - return $this->container['spbp']; + return $this->container['realTimeClass1ANi']; } /** - * Sets spbp + * Sets realTimeClass1ANi * - * @param float|null $spbp spbp + * @param float|null $realTimeClass1ANi realTimeClass1ANi * * @return $this */ - public function setSpbp(?float $spbp): static + public function setRealTimeClass1ANi(?float $realTimeClass1ANi): static { - if (is_null($spbp)) { - throw new InvalidArgumentException('non-nullable spbp cannot be null'); + if (is_null($realTimeClass1ANi)) { + throw new InvalidArgumentException('non-nullable realTimeClass1ANi cannot be null'); } - $this->container['spbp'] = $spbp; + $this->container['realTimeClass1ANi'] = $realTimeClass1ANi; return $this; } /** - * Gets sncp + * Gets sap * * @return float|null */ - public function getSncp(): ?float + public function getSap(): ?float { - return $this->container['sncp']; + return $this->container['sap']; } /** - * Sets sncp + * Sets sap * - * @param float|null $sncp sncp + * @param float|null $sap sap * * @return $this */ - public function setSncp(?float $sncp): static + public function setSap(?float $sap): static { - if (is_null($sncp)) { - throw new InvalidArgumentException('non-nullable sncp cannot be null'); + if (is_null($sap)) { + throw new InvalidArgumentException('non-nullable sap cannot be null'); } - $this->container['sncp'] = $sncp; + $this->container['sap'] = $sap; return $this; } /** - * Gets realTimeClass1ANi + * Gets shpp * * @return float|null */ - public function getRealTimeClass1ANi(): ?float + public function getShpp(): ?float { - return $this->container['realTimeClass1ANi']; + return $this->container['shpp']; } /** - * Sets realTimeClass1ANi + * Sets shpp * - * @param float|null $realTimeClass1ANi realTimeClass1ANi + * @param float|null $shpp shpp * * @return $this */ - public function setRealTimeClass1ANi(?float $realTimeClass1ANi): static + public function setShpp(?float $shpp): static { - if (is_null($realTimeClass1ANi)) { - throw new InvalidArgumentException('non-nullable realTimeClass1ANi cannot be null'); + if (is_null($shpp)) { + throw new InvalidArgumentException('non-nullable shpp cannot be null'); } - $this->container['realTimeClass1ANi'] = $realTimeClass1ANi; + $this->container['shpp'] = $shpp; return $this; } /** - * Gets terminationPayments + * Gets smp * * @return float|null */ - public function getTerminationPayments(): ?float + public function getSmp(): ?float { - return $this->container['terminationPayments']; + return $this->container['smp']; } /** - * Sets terminationPayments + * Sets smp * - * @param float|null $terminationPayments terminationPayments + * @param float|null $smp smp * * @return $this */ - public function setTerminationPayments(?float $terminationPayments): static + public function setSmp(?float $smp): static { - if (is_null($terminationPayments)) { - throw new InvalidArgumentException('non-nullable terminationPayments cannot be null'); + if (is_null($smp)) { + throw new InvalidArgumentException('non-nullable smp cannot be null'); } - $this->container['terminationPayments'] = $terminationPayments; + $this->container['smp'] = $smp; return $this; } /** - * Gets mapsMiles + * Gets sncp * - * @return int|null + * @return float|null */ - public function getMapsMiles(): ?int + public function getSncp(): ?float { - return $this->container['mapsMiles']; + return $this->container['sncp']; } /** - * Sets mapsMiles + * Sets sncp * - * @param int|null $mapsMiles mapsMiles + * @param float|null $sncp sncp * * @return $this */ - public function setMapsMiles(?int $mapsMiles): static + public function setSncp(?float $sncp): static { - if (is_null($mapsMiles)) { - throw new InvalidArgumentException('non-nullable mapsMiles cannot be null'); + if (is_null($sncp)) { + throw new InvalidArgumentException('non-nullable sncp cannot be null'); } - $this->container['mapsMiles'] = $mapsMiles; + $this->container['sncp'] = $sncp; return $this; } /** - * Gets benefitsTaxedViaPayroll + * Gets spbp * * @return float|null */ - public function getBenefitsTaxedViaPayroll(): ?float + public function getSpbp(): ?float { - return $this->container['benefitsTaxedViaPayroll']; + return $this->container['spbp']; } /** - * Sets benefitsTaxedViaPayroll + * Sets spbp * - * @param float|null $benefitsTaxedViaPayroll benefitsTaxedViaPayroll + * @param float|null $spbp spbp * * @return $this */ - public function setBenefitsTaxedViaPayroll(?float $benefitsTaxedViaPayroll): static + public function setSpbp(?float $spbp): static { - if (is_null($benefitsTaxedViaPayroll)) { - throw new InvalidArgumentException('non-nullable benefitsTaxedViaPayroll cannot be null'); + if (is_null($spbp)) { + throw new InvalidArgumentException('non-nullable spbp cannot be null'); } - $this->container['benefitsTaxedViaPayroll'] = $benefitsTaxedViaPayroll; + $this->container['spbp'] = $spbp; return $this; } /** - * Gets nicSummaries + * Gets spp * - * @return \SynergiTech\Staffology\Model\NicSummary[]|null + * @return float|null */ - public function getNicSummaries(): ?array + public function getSpp(): ?float { - return $this->container['nicSummaries']; + return $this->container['spp']; } /** - * Sets nicSummaries + * Sets spp * - * @param \SynergiTech\Staffology\Model\NicSummary[]|null $nicSummaries nicSummaries + * @param float|null $spp spp * * @return $this */ - public function setNicSummaries(?array $nicSummaries): static + public function setSpp(?float $spp): static { - if (is_null($nicSummaries)) { - array_push($this->openAPINullablesSetToNull, 'nicSummaries'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nicSummaries', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($spp)) { + throw new InvalidArgumentException('non-nullable spp cannot be null'); } - $this->container['nicSummaries'] = $nicSummaries; + $this->container['spp'] = $spp; return $this; } /** - * Gets foreignTaxCredit + * Gets studentLoanDeductions * * @return float|null */ - public function getForeignTaxCredit(): ?float + public function getStudentLoanDeductions(): ?float { - return $this->container['foreignTaxCredit']; + return $this->container['studentLoanDeductions']; } /** - * Sets foreignTaxCredit + * Sets studentLoanDeductions * - * @param float|null $foreignTaxCredit foreignTaxCredit + * @param float|null $studentLoanDeductions studentLoanDeductions * * @return $this */ - public function setForeignTaxCredit(?float $foreignTaxCredit): static + public function setStudentLoanDeductions(?float $studentLoanDeductions): static { - if (is_null($foreignTaxCredit)) { - throw new InvalidArgumentException('non-nullable foreignTaxCredit cannot be null'); + if (is_null($studentLoanDeductions)) { + throw new InvalidArgumentException('non-nullable studentLoanDeductions cannot be null'); } - $this->container['foreignTaxCredit'] = $foreignTaxCredit; + $this->container['studentLoanDeductions'] = $studentLoanDeductions; return $this; } /** - * Gets foreignTaxCreditReclaimed + * Gets taxYear * - * @return float|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getForeignTaxCreditReclaimed(): ?float + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['foreignTaxCreditReclaimed']; + return $this->container['taxYear']; } /** - * Sets foreignTaxCreditReclaimed + * Sets taxYear * - * @param float|null $foreignTaxCreditReclaimed foreignTaxCreditReclaimed + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setForeignTaxCreditReclaimed(?float $foreignTaxCreditReclaimed): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($foreignTaxCreditReclaimed)) { - throw new InvalidArgumentException('non-nullable foreignTaxCreditReclaimed cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['foreignTaxCreditReclaimed'] = $foreignTaxCreditReclaimed; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets employee + * Gets terminationPayments * - * @return \SynergiTech\Staffology\Model\Item|null + * @return float|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getTerminationPayments(): ?float { - return $this->container['employee']; + return $this->container['terminationPayments']; } /** - * Sets employee + * Sets terminationPayments * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param float|null $terminationPayments terminationPayments * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setTerminationPayments(?float $terminationPayments): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($terminationPayments)) { + throw new InvalidArgumentException('non-nullable terminationPayments cannot be null'); } - $this->container['employee'] = $employee; + $this->container['terminationPayments'] = $terminationPayments; return $this; } diff --git a/src/Model/OpeningBalancesTotals.php b/src/Model/OpeningBalancesTotals.php index 68b4721..62c3d49 100644 --- a/src/Model/OpeningBalancesTotals.php +++ b/src/Model/OpeningBalancesTotals.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,31 +59,31 @@ class OpeningBalancesTotals implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPITypes = [ - 'employeesWithOpeningBalancesCount' => 'int', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'previousEmployerGross' => 'float', - 'previousEmployerTax' => 'float', + 'benefitsTaxedViaPayroll' => 'float', 'currentEmployerGross' => 'float', - 'currentEmployerTax' => 'float', 'currentEmployerNet' => 'float', - 'studentLoanDeductions' => 'float', - 'postgradLoanDeductions' => 'float', - 'empeePenContribnsPaid' => 'float', + 'currentEmployerTax' => 'float', 'empeePenContribnsNotPaid' => 'float', - 'smp' => 'float', - 'spp' => 'float', + 'empeePenContribnsPaid' => 'float', + 'employee' => '\SynergiTech\Staffology\Model\Item', + 'employeesWithOpeningBalancesCount' => 'int', + 'foreignTaxCredit' => 'float', + 'foreignTaxCreditReclaimed' => 'float', + 'mapsMiles' => 'int', + 'nicSummaries' => '\SynergiTech\Staffology\Model\NicSummary[]', + 'postgradLoanDeductions' => 'float', + 'previousEmployerGross' => 'float', + 'previousEmployerTax' => 'float', + 'realTimeClass1ANi' => 'float', 'sap' => 'float', 'shpp' => 'float', - 'spbp' => 'float', + 'smp' => 'float', 'sncp' => 'float', - 'realTimeClass1ANi' => 'float', - 'terminationPayments' => 'float', - 'mapsMiles' => 'int', - 'benefitsTaxedViaPayroll' => 'float', - 'nicSummaries' => '\SynergiTech\Staffology\Model\NicSummary[]', - 'foreignTaxCredit' => 'float', - 'foreignTaxCreditReclaimed' => 'float', - 'employee' => '\SynergiTech\Staffology\Model\Item' + 'spbp' => 'float', + 'spp' => 'float', + 'studentLoanDeductions' => 'float', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'terminationPayments' => 'float' ]; /** @@ -92,31 +92,31 @@ class OpeningBalancesTotals implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPIFormats = [ - 'employeesWithOpeningBalancesCount' => 'int32', - 'taxYear' => null, - 'previousEmployerGross' => 'double', - 'previousEmployerTax' => 'double', + 'benefitsTaxedViaPayroll' => 'double', 'currentEmployerGross' => 'double', - 'currentEmployerTax' => 'double', 'currentEmployerNet' => 'double', - 'studentLoanDeductions' => 'double', - 'postgradLoanDeductions' => 'double', - 'empeePenContribnsPaid' => 'double', + 'currentEmployerTax' => 'double', 'empeePenContribnsNotPaid' => 'double', - 'smp' => 'double', - 'spp' => 'double', + 'empeePenContribnsPaid' => 'double', + 'employee' => null, + 'employeesWithOpeningBalancesCount' => 'int32', + 'foreignTaxCredit' => 'double', + 'foreignTaxCreditReclaimed' => 'double', + 'mapsMiles' => 'int32', + 'nicSummaries' => null, + 'postgradLoanDeductions' => 'double', + 'previousEmployerGross' => 'double', + 'previousEmployerTax' => 'double', + 'realTimeClass1ANi' => 'double', 'sap' => 'double', 'shpp' => 'double', - 'spbp' => 'double', + 'smp' => 'double', 'sncp' => 'double', - 'realTimeClass1ANi' => 'double', - 'terminationPayments' => 'double', - 'mapsMiles' => 'int32', - 'benefitsTaxedViaPayroll' => 'double', - 'nicSummaries' => null, - 'foreignTaxCredit' => 'double', - 'foreignTaxCreditReclaimed' => 'double', - 'employee' => null + 'spbp' => 'double', + 'spp' => 'double', + 'studentLoanDeductions' => 'double', + 'taxYear' => null, + 'terminationPayments' => 'double' ]; /** @@ -125,31 +125,31 @@ class OpeningBalancesTotals implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPINullables = [ - 'employeesWithOpeningBalancesCount' => false, - 'taxYear' => false, - 'previousEmployerGross' => false, - 'previousEmployerTax' => false, + 'benefitsTaxedViaPayroll' => false, 'currentEmployerGross' => false, - 'currentEmployerTax' => false, 'currentEmployerNet' => false, - 'studentLoanDeductions' => false, - 'postgradLoanDeductions' => false, - 'empeePenContribnsPaid' => false, + 'currentEmployerTax' => false, 'empeePenContribnsNotPaid' => false, - 'smp' => false, - 'spp' => false, + 'empeePenContribnsPaid' => false, + 'employee' => false, + 'employeesWithOpeningBalancesCount' => false, + 'foreignTaxCredit' => false, + 'foreignTaxCreditReclaimed' => false, + 'mapsMiles' => false, + 'nicSummaries' => true, + 'postgradLoanDeductions' => false, + 'previousEmployerGross' => false, + 'previousEmployerTax' => false, + 'realTimeClass1ANi' => false, 'sap' => false, 'shpp' => false, - 'spbp' => false, + 'smp' => false, 'sncp' => false, - 'realTimeClass1ANi' => false, - 'terminationPayments' => false, - 'mapsMiles' => false, - 'benefitsTaxedViaPayroll' => false, - 'nicSummaries' => true, - 'foreignTaxCredit' => false, - 'foreignTaxCreditReclaimed' => false, - 'employee' => false + 'spbp' => false, + 'spp' => false, + 'studentLoanDeductions' => false, + 'taxYear' => false, + 'terminationPayments' => false ]; /** @@ -238,31 +238,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employeesWithOpeningBalancesCount' => 'employeesWithOpeningBalancesCount', - 'taxYear' => 'taxYear', - 'previousEmployerGross' => 'previousEmployerGross', - 'previousEmployerTax' => 'previousEmployerTax', + 'benefitsTaxedViaPayroll' => 'benefitsTaxedViaPayroll', 'currentEmployerGross' => 'currentEmployerGross', - 'currentEmployerTax' => 'currentEmployerTax', 'currentEmployerNet' => 'currentEmployerNet', - 'studentLoanDeductions' => 'studentLoanDeductions', - 'postgradLoanDeductions' => 'postgradLoanDeductions', - 'empeePenContribnsPaid' => 'empeePenContribnsPaid', + 'currentEmployerTax' => 'currentEmployerTax', 'empeePenContribnsNotPaid' => 'empeePenContribnsNotPaid', - 'smp' => 'smp', - 'spp' => 'spp', + 'empeePenContribnsPaid' => 'empeePenContribnsPaid', + 'employee' => 'employee', + 'employeesWithOpeningBalancesCount' => 'employeesWithOpeningBalancesCount', + 'foreignTaxCredit' => 'foreignTaxCredit', + 'foreignTaxCreditReclaimed' => 'foreignTaxCreditReclaimed', + 'mapsMiles' => 'mapsMiles', + 'nicSummaries' => 'nicSummaries', + 'postgradLoanDeductions' => 'postgradLoanDeductions', + 'previousEmployerGross' => 'previousEmployerGross', + 'previousEmployerTax' => 'previousEmployerTax', + 'realTimeClass1ANi' => 'realTimeClass1ANi', 'sap' => 'sap', 'shpp' => 'shpp', - 'spbp' => 'spbp', + 'smp' => 'smp', 'sncp' => 'sncp', - 'realTimeClass1ANi' => 'realTimeClass1ANi', - 'terminationPayments' => 'terminationPayments', - 'mapsMiles' => 'mapsMiles', - 'benefitsTaxedViaPayroll' => 'benefitsTaxedViaPayroll', - 'nicSummaries' => 'nicSummaries', - 'foreignTaxCredit' => 'foreignTaxCredit', - 'foreignTaxCreditReclaimed' => 'foreignTaxCreditReclaimed', - 'employee' => 'employee' + 'spbp' => 'spbp', + 'spp' => 'spp', + 'studentLoanDeductions' => 'studentLoanDeductions', + 'taxYear' => 'taxYear', + 'terminationPayments' => 'terminationPayments' ]; /** @@ -271,31 +271,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employeesWithOpeningBalancesCount' => 'setEmployeesWithOpeningBalancesCount', - 'taxYear' => 'setTaxYear', - 'previousEmployerGross' => 'setPreviousEmployerGross', - 'previousEmployerTax' => 'setPreviousEmployerTax', + 'benefitsTaxedViaPayroll' => 'setBenefitsTaxedViaPayroll', 'currentEmployerGross' => 'setCurrentEmployerGross', - 'currentEmployerTax' => 'setCurrentEmployerTax', 'currentEmployerNet' => 'setCurrentEmployerNet', - 'studentLoanDeductions' => 'setStudentLoanDeductions', - 'postgradLoanDeductions' => 'setPostgradLoanDeductions', - 'empeePenContribnsPaid' => 'setEmpeePenContribnsPaid', + 'currentEmployerTax' => 'setCurrentEmployerTax', 'empeePenContribnsNotPaid' => 'setEmpeePenContribnsNotPaid', - 'smp' => 'setSmp', - 'spp' => 'setSpp', + 'empeePenContribnsPaid' => 'setEmpeePenContribnsPaid', + 'employee' => 'setEmployee', + 'employeesWithOpeningBalancesCount' => 'setEmployeesWithOpeningBalancesCount', + 'foreignTaxCredit' => 'setForeignTaxCredit', + 'foreignTaxCreditReclaimed' => 'setForeignTaxCreditReclaimed', + 'mapsMiles' => 'setMapsMiles', + 'nicSummaries' => 'setNicSummaries', + 'postgradLoanDeductions' => 'setPostgradLoanDeductions', + 'previousEmployerGross' => 'setPreviousEmployerGross', + 'previousEmployerTax' => 'setPreviousEmployerTax', + 'realTimeClass1ANi' => 'setRealTimeClass1ANi', 'sap' => 'setSap', 'shpp' => 'setShpp', - 'spbp' => 'setSpbp', + 'smp' => 'setSmp', 'sncp' => 'setSncp', - 'realTimeClass1ANi' => 'setRealTimeClass1ANi', - 'terminationPayments' => 'setTerminationPayments', - 'mapsMiles' => 'setMapsMiles', - 'benefitsTaxedViaPayroll' => 'setBenefitsTaxedViaPayroll', - 'nicSummaries' => 'setNicSummaries', - 'foreignTaxCredit' => 'setForeignTaxCredit', - 'foreignTaxCreditReclaimed' => 'setForeignTaxCreditReclaimed', - 'employee' => 'setEmployee' + 'spbp' => 'setSpbp', + 'spp' => 'setSpp', + 'studentLoanDeductions' => 'setStudentLoanDeductions', + 'taxYear' => 'setTaxYear', + 'terminationPayments' => 'setTerminationPayments' ]; /** @@ -304,31 +304,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employeesWithOpeningBalancesCount' => 'getEmployeesWithOpeningBalancesCount', - 'taxYear' => 'getTaxYear', - 'previousEmployerGross' => 'getPreviousEmployerGross', - 'previousEmployerTax' => 'getPreviousEmployerTax', + 'benefitsTaxedViaPayroll' => 'getBenefitsTaxedViaPayroll', 'currentEmployerGross' => 'getCurrentEmployerGross', - 'currentEmployerTax' => 'getCurrentEmployerTax', 'currentEmployerNet' => 'getCurrentEmployerNet', - 'studentLoanDeductions' => 'getStudentLoanDeductions', - 'postgradLoanDeductions' => 'getPostgradLoanDeductions', - 'empeePenContribnsPaid' => 'getEmpeePenContribnsPaid', + 'currentEmployerTax' => 'getCurrentEmployerTax', 'empeePenContribnsNotPaid' => 'getEmpeePenContribnsNotPaid', - 'smp' => 'getSmp', - 'spp' => 'getSpp', + 'empeePenContribnsPaid' => 'getEmpeePenContribnsPaid', + 'employee' => 'getEmployee', + 'employeesWithOpeningBalancesCount' => 'getEmployeesWithOpeningBalancesCount', + 'foreignTaxCredit' => 'getForeignTaxCredit', + 'foreignTaxCreditReclaimed' => 'getForeignTaxCreditReclaimed', + 'mapsMiles' => 'getMapsMiles', + 'nicSummaries' => 'getNicSummaries', + 'postgradLoanDeductions' => 'getPostgradLoanDeductions', + 'previousEmployerGross' => 'getPreviousEmployerGross', + 'previousEmployerTax' => 'getPreviousEmployerTax', + 'realTimeClass1ANi' => 'getRealTimeClass1ANi', 'sap' => 'getSap', 'shpp' => 'getShpp', - 'spbp' => 'getSpbp', + 'smp' => 'getSmp', 'sncp' => 'getSncp', - 'realTimeClass1ANi' => 'getRealTimeClass1ANi', - 'terminationPayments' => 'getTerminationPayments', - 'mapsMiles' => 'getMapsMiles', - 'benefitsTaxedViaPayroll' => 'getBenefitsTaxedViaPayroll', - 'nicSummaries' => 'getNicSummaries', - 'foreignTaxCredit' => 'getForeignTaxCredit', - 'foreignTaxCreditReclaimed' => 'getForeignTaxCreditReclaimed', - 'employee' => 'getEmployee' + 'spbp' => 'getSpbp', + 'spp' => 'getSpp', + 'studentLoanDeductions' => 'getStudentLoanDeductions', + 'taxYear' => 'getTaxYear', + 'terminationPayments' => 'getTerminationPayments' ]; /** @@ -387,31 +387,31 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employeesWithOpeningBalancesCount', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('previousEmployerGross', $data ?? [], null); - $this->setIfExists('previousEmployerTax', $data ?? [], null); + $this->setIfExists('benefitsTaxedViaPayroll', $data ?? [], null); $this->setIfExists('currentEmployerGross', $data ?? [], null); - $this->setIfExists('currentEmployerTax', $data ?? [], null); $this->setIfExists('currentEmployerNet', $data ?? [], null); - $this->setIfExists('studentLoanDeductions', $data ?? [], null); - $this->setIfExists('postgradLoanDeductions', $data ?? [], null); - $this->setIfExists('empeePenContribnsPaid', $data ?? [], null); + $this->setIfExists('currentEmployerTax', $data ?? [], null); $this->setIfExists('empeePenContribnsNotPaid', $data ?? [], null); - $this->setIfExists('smp', $data ?? [], null); - $this->setIfExists('spp', $data ?? [], null); + $this->setIfExists('empeePenContribnsPaid', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('employeesWithOpeningBalancesCount', $data ?? [], null); + $this->setIfExists('foreignTaxCredit', $data ?? [], null); + $this->setIfExists('foreignTaxCreditReclaimed', $data ?? [], null); + $this->setIfExists('mapsMiles', $data ?? [], null); + $this->setIfExists('nicSummaries', $data ?? [], null); + $this->setIfExists('postgradLoanDeductions', $data ?? [], null); + $this->setIfExists('previousEmployerGross', $data ?? [], null); + $this->setIfExists('previousEmployerTax', $data ?? [], null); + $this->setIfExists('realTimeClass1ANi', $data ?? [], null); $this->setIfExists('sap', $data ?? [], null); $this->setIfExists('shpp', $data ?? [], null); - $this->setIfExists('spbp', $data ?? [], null); + $this->setIfExists('smp', $data ?? [], null); $this->setIfExists('sncp', $data ?? [], null); - $this->setIfExists('realTimeClass1ANi', $data ?? [], null); + $this->setIfExists('spbp', $data ?? [], null); + $this->setIfExists('spp', $data ?? [], null); + $this->setIfExists('studentLoanDeductions', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('terminationPayments', $data ?? [], null); - $this->setIfExists('mapsMiles', $data ?? [], null); - $this->setIfExists('benefitsTaxedViaPayroll', $data ?? [], null); - $this->setIfExists('nicSummaries', $data ?? [], null); - $this->setIfExists('foreignTaxCredit', $data ?? [], null); - $this->setIfExists('foreignTaxCreditReclaimed', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); } /** @@ -457,683 +457,683 @@ public function valid(): bool /** - * Gets employeesWithOpeningBalancesCount + * Gets benefitsTaxedViaPayroll * - * @return int|null + * @return float|null */ - public function getEmployeesWithOpeningBalancesCount(): ?int + public function getBenefitsTaxedViaPayroll(): ?float { - return $this->container['employeesWithOpeningBalancesCount']; + return $this->container['benefitsTaxedViaPayroll']; } /** - * Sets employeesWithOpeningBalancesCount + * Sets benefitsTaxedViaPayroll * - * @param int|null $employeesWithOpeningBalancesCount employeesWithOpeningBalancesCount + * @param float|null $benefitsTaxedViaPayroll benefitsTaxedViaPayroll * * @return $this */ - public function setEmployeesWithOpeningBalancesCount(?int $employeesWithOpeningBalancesCount): static + public function setBenefitsTaxedViaPayroll(?float $benefitsTaxedViaPayroll): static { - if (is_null($employeesWithOpeningBalancesCount)) { - throw new InvalidArgumentException('non-nullable employeesWithOpeningBalancesCount cannot be null'); + if (is_null($benefitsTaxedViaPayroll)) { + throw new InvalidArgumentException('non-nullable benefitsTaxedViaPayroll cannot be null'); } - $this->container['employeesWithOpeningBalancesCount'] = $employeesWithOpeningBalancesCount; + $this->container['benefitsTaxedViaPayroll'] = $benefitsTaxedViaPayroll; return $this; } /** - * Gets taxYear + * Gets currentEmployerGross * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return float|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getCurrentEmployerGross(): ?float { - return $this->container['taxYear']; + return $this->container['currentEmployerGross']; } /** - * Sets taxYear + * Sets currentEmployerGross * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param float|null $currentEmployerGross currentEmployerGross * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setCurrentEmployerGross(?float $currentEmployerGross): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($currentEmployerGross)) { + throw new InvalidArgumentException('non-nullable currentEmployerGross cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['currentEmployerGross'] = $currentEmployerGross; return $this; } /** - * Gets previousEmployerGross + * Gets currentEmployerNet * * @return float|null */ - public function getPreviousEmployerGross(): ?float + public function getCurrentEmployerNet(): ?float { - return $this->container['previousEmployerGross']; + return $this->container['currentEmployerNet']; } /** - * Sets previousEmployerGross + * Sets currentEmployerNet * - * @param float|null $previousEmployerGross previousEmployerGross + * @param float|null $currentEmployerNet currentEmployerNet * * @return $this */ - public function setPreviousEmployerGross(?float $previousEmployerGross): static + public function setCurrentEmployerNet(?float $currentEmployerNet): static { - if (is_null($previousEmployerGross)) { - throw new InvalidArgumentException('non-nullable previousEmployerGross cannot be null'); + if (is_null($currentEmployerNet)) { + throw new InvalidArgumentException('non-nullable currentEmployerNet cannot be null'); } - $this->container['previousEmployerGross'] = $previousEmployerGross; + $this->container['currentEmployerNet'] = $currentEmployerNet; return $this; } /** - * Gets previousEmployerTax + * Gets currentEmployerTax * * @return float|null */ - public function getPreviousEmployerTax(): ?float + public function getCurrentEmployerTax(): ?float { - return $this->container['previousEmployerTax']; + return $this->container['currentEmployerTax']; } /** - * Sets previousEmployerTax + * Sets currentEmployerTax * - * @param float|null $previousEmployerTax previousEmployerTax + * @param float|null $currentEmployerTax currentEmployerTax * * @return $this */ - public function setPreviousEmployerTax(?float $previousEmployerTax): static + public function setCurrentEmployerTax(?float $currentEmployerTax): static { - if (is_null($previousEmployerTax)) { - throw new InvalidArgumentException('non-nullable previousEmployerTax cannot be null'); + if (is_null($currentEmployerTax)) { + throw new InvalidArgumentException('non-nullable currentEmployerTax cannot be null'); } - $this->container['previousEmployerTax'] = $previousEmployerTax; + $this->container['currentEmployerTax'] = $currentEmployerTax; return $this; } /** - * Gets currentEmployerGross + * Gets empeePenContribnsNotPaid * * @return float|null */ - public function getCurrentEmployerGross(): ?float + public function getEmpeePenContribnsNotPaid(): ?float { - return $this->container['currentEmployerGross']; + return $this->container['empeePenContribnsNotPaid']; } /** - * Sets currentEmployerGross + * Sets empeePenContribnsNotPaid * - * @param float|null $currentEmployerGross currentEmployerGross + * @param float|null $empeePenContribnsNotPaid empeePenContribnsNotPaid * * @return $this */ - public function setCurrentEmployerGross(?float $currentEmployerGross): static + public function setEmpeePenContribnsNotPaid(?float $empeePenContribnsNotPaid): static { - if (is_null($currentEmployerGross)) { - throw new InvalidArgumentException('non-nullable currentEmployerGross cannot be null'); + if (is_null($empeePenContribnsNotPaid)) { + throw new InvalidArgumentException('non-nullable empeePenContribnsNotPaid cannot be null'); } - $this->container['currentEmployerGross'] = $currentEmployerGross; + $this->container['empeePenContribnsNotPaid'] = $empeePenContribnsNotPaid; return $this; } /** - * Gets currentEmployerTax + * Gets empeePenContribnsPaid * * @return float|null */ - public function getCurrentEmployerTax(): ?float + public function getEmpeePenContribnsPaid(): ?float { - return $this->container['currentEmployerTax']; + return $this->container['empeePenContribnsPaid']; } /** - * Sets currentEmployerTax + * Sets empeePenContribnsPaid * - * @param float|null $currentEmployerTax currentEmployerTax + * @param float|null $empeePenContribnsPaid empeePenContribnsPaid * * @return $this */ - public function setCurrentEmployerTax(?float $currentEmployerTax): static + public function setEmpeePenContribnsPaid(?float $empeePenContribnsPaid): static { - if (is_null($currentEmployerTax)) { - throw new InvalidArgumentException('non-nullable currentEmployerTax cannot be null'); + if (is_null($empeePenContribnsPaid)) { + throw new InvalidArgumentException('non-nullable empeePenContribnsPaid cannot be null'); } - $this->container['currentEmployerTax'] = $currentEmployerTax; + $this->container['empeePenContribnsPaid'] = $empeePenContribnsPaid; return $this; } /** - * Gets currentEmployerNet + * Gets employee * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getCurrentEmployerNet(): ?float + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['currentEmployerNet']; + return $this->container['employee']; } /** - * Sets currentEmployerNet + * Sets employee * - * @param float|null $currentEmployerNet currentEmployerNet + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setCurrentEmployerNet(?float $currentEmployerNet): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($currentEmployerNet)) { - throw new InvalidArgumentException('non-nullable currentEmployerNet cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['currentEmployerNet'] = $currentEmployerNet; + $this->container['employee'] = $employee; return $this; } /** - * Gets studentLoanDeductions + * Gets employeesWithOpeningBalancesCount * - * @return float|null + * @return int|null */ - public function getStudentLoanDeductions(): ?float + public function getEmployeesWithOpeningBalancesCount(): ?int { - return $this->container['studentLoanDeductions']; + return $this->container['employeesWithOpeningBalancesCount']; } /** - * Sets studentLoanDeductions + * Sets employeesWithOpeningBalancesCount * - * @param float|null $studentLoanDeductions studentLoanDeductions + * @param int|null $employeesWithOpeningBalancesCount employeesWithOpeningBalancesCount * * @return $this */ - public function setStudentLoanDeductions(?float $studentLoanDeductions): static + public function setEmployeesWithOpeningBalancesCount(?int $employeesWithOpeningBalancesCount): static { - if (is_null($studentLoanDeductions)) { - throw new InvalidArgumentException('non-nullable studentLoanDeductions cannot be null'); + if (is_null($employeesWithOpeningBalancesCount)) { + throw new InvalidArgumentException('non-nullable employeesWithOpeningBalancesCount cannot be null'); } - $this->container['studentLoanDeductions'] = $studentLoanDeductions; + $this->container['employeesWithOpeningBalancesCount'] = $employeesWithOpeningBalancesCount; return $this; } /** - * Gets postgradLoanDeductions + * Gets foreignTaxCredit * * @return float|null */ - public function getPostgradLoanDeductions(): ?float + public function getForeignTaxCredit(): ?float { - return $this->container['postgradLoanDeductions']; + return $this->container['foreignTaxCredit']; } /** - * Sets postgradLoanDeductions + * Sets foreignTaxCredit * - * @param float|null $postgradLoanDeductions postgradLoanDeductions + * @param float|null $foreignTaxCredit foreignTaxCredit * * @return $this */ - public function setPostgradLoanDeductions(?float $postgradLoanDeductions): static + public function setForeignTaxCredit(?float $foreignTaxCredit): static { - if (is_null($postgradLoanDeductions)) { - throw new InvalidArgumentException('non-nullable postgradLoanDeductions cannot be null'); + if (is_null($foreignTaxCredit)) { + throw new InvalidArgumentException('non-nullable foreignTaxCredit cannot be null'); } - $this->container['postgradLoanDeductions'] = $postgradLoanDeductions; + $this->container['foreignTaxCredit'] = $foreignTaxCredit; return $this; } /** - * Gets empeePenContribnsPaid + * Gets foreignTaxCreditReclaimed * * @return float|null */ - public function getEmpeePenContribnsPaid(): ?float + public function getForeignTaxCreditReclaimed(): ?float { - return $this->container['empeePenContribnsPaid']; + return $this->container['foreignTaxCreditReclaimed']; } /** - * Sets empeePenContribnsPaid + * Sets foreignTaxCreditReclaimed * - * @param float|null $empeePenContribnsPaid empeePenContribnsPaid + * @param float|null $foreignTaxCreditReclaimed foreignTaxCreditReclaimed * * @return $this */ - public function setEmpeePenContribnsPaid(?float $empeePenContribnsPaid): static + public function setForeignTaxCreditReclaimed(?float $foreignTaxCreditReclaimed): static { - if (is_null($empeePenContribnsPaid)) { - throw new InvalidArgumentException('non-nullable empeePenContribnsPaid cannot be null'); + if (is_null($foreignTaxCreditReclaimed)) { + throw new InvalidArgumentException('non-nullable foreignTaxCreditReclaimed cannot be null'); } - $this->container['empeePenContribnsPaid'] = $empeePenContribnsPaid; + $this->container['foreignTaxCreditReclaimed'] = $foreignTaxCreditReclaimed; return $this; } /** - * Gets empeePenContribnsNotPaid + * Gets mapsMiles * - * @return float|null + * @return int|null */ - public function getEmpeePenContribnsNotPaid(): ?float + public function getMapsMiles(): ?int { - return $this->container['empeePenContribnsNotPaid']; + return $this->container['mapsMiles']; } /** - * Sets empeePenContribnsNotPaid + * Sets mapsMiles * - * @param float|null $empeePenContribnsNotPaid empeePenContribnsNotPaid + * @param int|null $mapsMiles mapsMiles * * @return $this */ - public function setEmpeePenContribnsNotPaid(?float $empeePenContribnsNotPaid): static + public function setMapsMiles(?int $mapsMiles): static { - if (is_null($empeePenContribnsNotPaid)) { - throw new InvalidArgumentException('non-nullable empeePenContribnsNotPaid cannot be null'); + if (is_null($mapsMiles)) { + throw new InvalidArgumentException('non-nullable mapsMiles cannot be null'); } - $this->container['empeePenContribnsNotPaid'] = $empeePenContribnsNotPaid; + $this->container['mapsMiles'] = $mapsMiles; return $this; } /** - * Gets smp + * Gets nicSummaries * - * @return float|null + * @return \SynergiTech\Staffology\Model\NicSummary[]|null */ - public function getSmp(): ?float + public function getNicSummaries(): ?array { - return $this->container['smp']; + return $this->container['nicSummaries']; } /** - * Sets smp + * Sets nicSummaries * - * @param float|null $smp smp + * @param \SynergiTech\Staffology\Model\NicSummary[]|null $nicSummaries nicSummaries * * @return $this */ - public function setSmp(?float $smp): static + public function setNicSummaries(?array $nicSummaries): static { - if (is_null($smp)) { - throw new InvalidArgumentException('non-nullable smp cannot be null'); + if (is_null($nicSummaries)) { + array_push($this->openAPINullablesSetToNull, 'nicSummaries'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('nicSummaries', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['smp'] = $smp; + $this->container['nicSummaries'] = $nicSummaries; return $this; } /** - * Gets spp + * Gets postgradLoanDeductions * * @return float|null */ - public function getSpp(): ?float + public function getPostgradLoanDeductions(): ?float { - return $this->container['spp']; + return $this->container['postgradLoanDeductions']; } /** - * Sets spp + * Sets postgradLoanDeductions * - * @param float|null $spp spp + * @param float|null $postgradLoanDeductions postgradLoanDeductions * * @return $this */ - public function setSpp(?float $spp): static + public function setPostgradLoanDeductions(?float $postgradLoanDeductions): static { - if (is_null($spp)) { - throw new InvalidArgumentException('non-nullable spp cannot be null'); + if (is_null($postgradLoanDeductions)) { + throw new InvalidArgumentException('non-nullable postgradLoanDeductions cannot be null'); } - $this->container['spp'] = $spp; + $this->container['postgradLoanDeductions'] = $postgradLoanDeductions; return $this; } /** - * Gets sap + * Gets previousEmployerGross * * @return float|null */ - public function getSap(): ?float + public function getPreviousEmployerGross(): ?float { - return $this->container['sap']; + return $this->container['previousEmployerGross']; } /** - * Sets sap + * Sets previousEmployerGross * - * @param float|null $sap sap + * @param float|null $previousEmployerGross previousEmployerGross * * @return $this */ - public function setSap(?float $sap): static + public function setPreviousEmployerGross(?float $previousEmployerGross): static { - if (is_null($sap)) { - throw new InvalidArgumentException('non-nullable sap cannot be null'); + if (is_null($previousEmployerGross)) { + throw new InvalidArgumentException('non-nullable previousEmployerGross cannot be null'); } - $this->container['sap'] = $sap; + $this->container['previousEmployerGross'] = $previousEmployerGross; return $this; } /** - * Gets shpp + * Gets previousEmployerTax * * @return float|null */ - public function getShpp(): ?float + public function getPreviousEmployerTax(): ?float { - return $this->container['shpp']; + return $this->container['previousEmployerTax']; } /** - * Sets shpp + * Sets previousEmployerTax * - * @param float|null $shpp shpp + * @param float|null $previousEmployerTax previousEmployerTax * * @return $this */ - public function setShpp(?float $shpp): static + public function setPreviousEmployerTax(?float $previousEmployerTax): static { - if (is_null($shpp)) { - throw new InvalidArgumentException('non-nullable shpp cannot be null'); + if (is_null($previousEmployerTax)) { + throw new InvalidArgumentException('non-nullable previousEmployerTax cannot be null'); } - $this->container['shpp'] = $shpp; + $this->container['previousEmployerTax'] = $previousEmployerTax; return $this; } /** - * Gets spbp + * Gets realTimeClass1ANi * * @return float|null */ - public function getSpbp(): ?float + public function getRealTimeClass1ANi(): ?float { - return $this->container['spbp']; + return $this->container['realTimeClass1ANi']; } /** - * Sets spbp + * Sets realTimeClass1ANi * - * @param float|null $spbp spbp + * @param float|null $realTimeClass1ANi realTimeClass1ANi * * @return $this */ - public function setSpbp(?float $spbp): static + public function setRealTimeClass1ANi(?float $realTimeClass1ANi): static { - if (is_null($spbp)) { - throw new InvalidArgumentException('non-nullable spbp cannot be null'); + if (is_null($realTimeClass1ANi)) { + throw new InvalidArgumentException('non-nullable realTimeClass1ANi cannot be null'); } - $this->container['spbp'] = $spbp; + $this->container['realTimeClass1ANi'] = $realTimeClass1ANi; return $this; } /** - * Gets sncp + * Gets sap * * @return float|null */ - public function getSncp(): ?float + public function getSap(): ?float { - return $this->container['sncp']; + return $this->container['sap']; } /** - * Sets sncp + * Sets sap * - * @param float|null $sncp sncp + * @param float|null $sap sap * * @return $this */ - public function setSncp(?float $sncp): static + public function setSap(?float $sap): static { - if (is_null($sncp)) { - throw new InvalidArgumentException('non-nullable sncp cannot be null'); + if (is_null($sap)) { + throw new InvalidArgumentException('non-nullable sap cannot be null'); } - $this->container['sncp'] = $sncp; + $this->container['sap'] = $sap; return $this; } /** - * Gets realTimeClass1ANi + * Gets shpp * * @return float|null */ - public function getRealTimeClass1ANi(): ?float + public function getShpp(): ?float { - return $this->container['realTimeClass1ANi']; + return $this->container['shpp']; } /** - * Sets realTimeClass1ANi + * Sets shpp * - * @param float|null $realTimeClass1ANi realTimeClass1ANi + * @param float|null $shpp shpp * * @return $this */ - public function setRealTimeClass1ANi(?float $realTimeClass1ANi): static + public function setShpp(?float $shpp): static { - if (is_null($realTimeClass1ANi)) { - throw new InvalidArgumentException('non-nullable realTimeClass1ANi cannot be null'); + if (is_null($shpp)) { + throw new InvalidArgumentException('non-nullable shpp cannot be null'); } - $this->container['realTimeClass1ANi'] = $realTimeClass1ANi; + $this->container['shpp'] = $shpp; return $this; } /** - * Gets terminationPayments + * Gets smp * * @return float|null */ - public function getTerminationPayments(): ?float + public function getSmp(): ?float { - return $this->container['terminationPayments']; + return $this->container['smp']; } /** - * Sets terminationPayments + * Sets smp * - * @param float|null $terminationPayments terminationPayments + * @param float|null $smp smp * * @return $this */ - public function setTerminationPayments(?float $terminationPayments): static + public function setSmp(?float $smp): static { - if (is_null($terminationPayments)) { - throw new InvalidArgumentException('non-nullable terminationPayments cannot be null'); + if (is_null($smp)) { + throw new InvalidArgumentException('non-nullable smp cannot be null'); } - $this->container['terminationPayments'] = $terminationPayments; + $this->container['smp'] = $smp; return $this; } /** - * Gets mapsMiles + * Gets sncp * - * @return int|null + * @return float|null */ - public function getMapsMiles(): ?int + public function getSncp(): ?float { - return $this->container['mapsMiles']; + return $this->container['sncp']; } /** - * Sets mapsMiles + * Sets sncp * - * @param int|null $mapsMiles mapsMiles + * @param float|null $sncp sncp * * @return $this */ - public function setMapsMiles(?int $mapsMiles): static + public function setSncp(?float $sncp): static { - if (is_null($mapsMiles)) { - throw new InvalidArgumentException('non-nullable mapsMiles cannot be null'); + if (is_null($sncp)) { + throw new InvalidArgumentException('non-nullable sncp cannot be null'); } - $this->container['mapsMiles'] = $mapsMiles; + $this->container['sncp'] = $sncp; return $this; } /** - * Gets benefitsTaxedViaPayroll + * Gets spbp * * @return float|null */ - public function getBenefitsTaxedViaPayroll(): ?float + public function getSpbp(): ?float { - return $this->container['benefitsTaxedViaPayroll']; + return $this->container['spbp']; } /** - * Sets benefitsTaxedViaPayroll + * Sets spbp * - * @param float|null $benefitsTaxedViaPayroll benefitsTaxedViaPayroll + * @param float|null $spbp spbp * * @return $this */ - public function setBenefitsTaxedViaPayroll(?float $benefitsTaxedViaPayroll): static + public function setSpbp(?float $spbp): static { - if (is_null($benefitsTaxedViaPayroll)) { - throw new InvalidArgumentException('non-nullable benefitsTaxedViaPayroll cannot be null'); + if (is_null($spbp)) { + throw new InvalidArgumentException('non-nullable spbp cannot be null'); } - $this->container['benefitsTaxedViaPayroll'] = $benefitsTaxedViaPayroll; + $this->container['spbp'] = $spbp; return $this; } /** - * Gets nicSummaries + * Gets spp * - * @return \SynergiTech\Staffology\Model\NicSummary[]|null + * @return float|null */ - public function getNicSummaries(): ?array + public function getSpp(): ?float { - return $this->container['nicSummaries']; + return $this->container['spp']; } /** - * Sets nicSummaries + * Sets spp * - * @param \SynergiTech\Staffology\Model\NicSummary[]|null $nicSummaries nicSummaries + * @param float|null $spp spp * * @return $this */ - public function setNicSummaries(?array $nicSummaries): static + public function setSpp(?float $spp): static { - if (is_null($nicSummaries)) { - array_push($this->openAPINullablesSetToNull, 'nicSummaries'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nicSummaries', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($spp)) { + throw new InvalidArgumentException('non-nullable spp cannot be null'); } - $this->container['nicSummaries'] = $nicSummaries; + $this->container['spp'] = $spp; return $this; } /** - * Gets foreignTaxCredit + * Gets studentLoanDeductions * * @return float|null */ - public function getForeignTaxCredit(): ?float + public function getStudentLoanDeductions(): ?float { - return $this->container['foreignTaxCredit']; + return $this->container['studentLoanDeductions']; } /** - * Sets foreignTaxCredit + * Sets studentLoanDeductions * - * @param float|null $foreignTaxCredit foreignTaxCredit + * @param float|null $studentLoanDeductions studentLoanDeductions * * @return $this */ - public function setForeignTaxCredit(?float $foreignTaxCredit): static + public function setStudentLoanDeductions(?float $studentLoanDeductions): static { - if (is_null($foreignTaxCredit)) { - throw new InvalidArgumentException('non-nullable foreignTaxCredit cannot be null'); + if (is_null($studentLoanDeductions)) { + throw new InvalidArgumentException('non-nullable studentLoanDeductions cannot be null'); } - $this->container['foreignTaxCredit'] = $foreignTaxCredit; + $this->container['studentLoanDeductions'] = $studentLoanDeductions; return $this; } /** - * Gets foreignTaxCreditReclaimed + * Gets taxYear * - * @return float|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getForeignTaxCreditReclaimed(): ?float + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['foreignTaxCreditReclaimed']; + return $this->container['taxYear']; } /** - * Sets foreignTaxCreditReclaimed + * Sets taxYear * - * @param float|null $foreignTaxCreditReclaimed foreignTaxCreditReclaimed + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setForeignTaxCreditReclaimed(?float $foreignTaxCreditReclaimed): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($foreignTaxCreditReclaimed)) { - throw new InvalidArgumentException('non-nullable foreignTaxCreditReclaimed cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['foreignTaxCreditReclaimed'] = $foreignTaxCreditReclaimed; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets employee + * Gets terminationPayments * - * @return \SynergiTech\Staffology\Model\Item|null + * @return float|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getTerminationPayments(): ?float { - return $this->container['employee']; + return $this->container['terminationPayments']; } /** - * Sets employee + * Sets terminationPayments * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param float|null $terminationPayments terminationPayments * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setTerminationPayments(?float $terminationPayments): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($terminationPayments)) { + throw new InvalidArgumentException('non-nullable terminationPayments cannot be null'); } - $this->container['employee'] = $employee; + $this->container['terminationPayments'] = $terminationPayments; return $this; } diff --git a/src/Model/OverseasEmployerDetails.php b/src/Model/OverseasEmployerDetails.php index c051134..8941a8c 100644 --- a/src/Model/OverseasEmployerDetails.php +++ b/src/Model/OverseasEmployerDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class OverseasEmployerDetails implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ - 'overseasEmployer' => 'bool', - 'overseasSecondmentStatus' => '\SynergiTech\Staffology\Model\OverseasSecondmentStatus', 'eeaCitizen' => 'bool', - 'epm6Scheme' => 'bool' + 'epm6Scheme' => 'bool', + 'overseasEmployer' => 'bool', + 'overseasSecondmentStatus' => '\SynergiTech\Staffology\Model\OverseasSecondmentStatus' ]; /** @@ -71,10 +71,10 @@ class OverseasEmployerDetails implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ - 'overseasEmployer' => null, - 'overseasSecondmentStatus' => null, 'eeaCitizen' => null, - 'epm6Scheme' => null + 'epm6Scheme' => null, + 'overseasEmployer' => null, + 'overseasSecondmentStatus' => null ]; /** @@ -83,10 +83,10 @@ class OverseasEmployerDetails implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ - 'overseasEmployer' => false, - 'overseasSecondmentStatus' => false, 'eeaCitizen' => false, - 'epm6Scheme' => false + 'epm6Scheme' => false, + 'overseasEmployer' => false, + 'overseasSecondmentStatus' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'overseasEmployer' => 'overseasEmployer', - 'overseasSecondmentStatus' => 'overseasSecondmentStatus', 'eeaCitizen' => 'eeaCitizen', - 'epm6Scheme' => 'epm6Scheme' + 'epm6Scheme' => 'epm6Scheme', + 'overseasEmployer' => 'overseasEmployer', + 'overseasSecondmentStatus' => 'overseasSecondmentStatus' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'overseasEmployer' => 'setOverseasEmployer', - 'overseasSecondmentStatus' => 'setOverseasSecondmentStatus', 'eeaCitizen' => 'setEeaCitizen', - 'epm6Scheme' => 'setEpm6Scheme' + 'epm6Scheme' => 'setEpm6Scheme', + 'overseasEmployer' => 'setOverseasEmployer', + 'overseasSecondmentStatus' => 'setOverseasSecondmentStatus' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'overseasEmployer' => 'getOverseasEmployer', - 'overseasSecondmentStatus' => 'getOverseasSecondmentStatus', 'eeaCitizen' => 'getEeaCitizen', - 'epm6Scheme' => 'getEpm6Scheme' + 'epm6Scheme' => 'getEpm6Scheme', + 'overseasEmployer' => 'getOverseasEmployer', + 'overseasSecondmentStatus' => 'getOverseasSecondmentStatus' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('overseasEmployer', $data ?? [], null); - $this->setIfExists('overseasSecondmentStatus', $data ?? [], null); $this->setIfExists('eeaCitizen', $data ?? [], null); $this->setIfExists('epm6Scheme', $data ?? [], null); + $this->setIfExists('overseasEmployer', $data ?? [], null); + $this->setIfExists('overseasSecondmentStatus', $data ?? [], null); } /** @@ -310,109 +310,109 @@ public function valid(): bool /** - * Gets overseasEmployer + * Gets eeaCitizen * * @return bool|null */ - public function getOverseasEmployer(): ?bool + public function getEeaCitizen(): ?bool { - return $this->container['overseasEmployer']; + return $this->container['eeaCitizen']; } /** - * Sets overseasEmployer + * Sets eeaCitizen * - * @param bool|null $overseasEmployer overseasEmployer + * @param bool|null $eeaCitizen eeaCitizen * * @return $this */ - public function setOverseasEmployer(?bool $overseasEmployer): static + public function setEeaCitizen(?bool $eeaCitizen): static { - if (is_null($overseasEmployer)) { - throw new InvalidArgumentException('non-nullable overseasEmployer cannot be null'); + if (is_null($eeaCitizen)) { + throw new InvalidArgumentException('non-nullable eeaCitizen cannot be null'); } - $this->container['overseasEmployer'] = $overseasEmployer; + $this->container['eeaCitizen'] = $eeaCitizen; return $this; } /** - * Gets overseasSecondmentStatus + * Gets epm6Scheme * - * @return \SynergiTech\Staffology\Model\OverseasSecondmentStatus|null + * @return bool|null */ - public function getOverseasSecondmentStatus(): ?\SynergiTech\Staffology\Model\OverseasSecondmentStatus + public function getEpm6Scheme(): ?bool { - return $this->container['overseasSecondmentStatus']; + return $this->container['epm6Scheme']; } /** - * Sets overseasSecondmentStatus + * Sets epm6Scheme * - * @param \SynergiTech\Staffology\Model\OverseasSecondmentStatus|null $overseasSecondmentStatus overseasSecondmentStatus + * @param bool|null $epm6Scheme epm6Scheme * * @return $this */ - public function setOverseasSecondmentStatus(?\SynergiTech\Staffology\Model\OverseasSecondmentStatus $overseasSecondmentStatus): static + public function setEpm6Scheme(?bool $epm6Scheme): static { - if (is_null($overseasSecondmentStatus)) { - throw new InvalidArgumentException('non-nullable overseasSecondmentStatus cannot be null'); + if (is_null($epm6Scheme)) { + throw new InvalidArgumentException('non-nullable epm6Scheme cannot be null'); } - $this->container['overseasSecondmentStatus'] = $overseasSecondmentStatus; + $this->container['epm6Scheme'] = $epm6Scheme; return $this; } /** - * Gets eeaCitizen + * Gets overseasEmployer * * @return bool|null */ - public function getEeaCitizen(): ?bool + public function getOverseasEmployer(): ?bool { - return $this->container['eeaCitizen']; + return $this->container['overseasEmployer']; } /** - * Sets eeaCitizen + * Sets overseasEmployer * - * @param bool|null $eeaCitizen eeaCitizen + * @param bool|null $overseasEmployer overseasEmployer * * @return $this */ - public function setEeaCitizen(?bool $eeaCitizen): static + public function setOverseasEmployer(?bool $overseasEmployer): static { - if (is_null($eeaCitizen)) { - throw new InvalidArgumentException('non-nullable eeaCitizen cannot be null'); + if (is_null($overseasEmployer)) { + throw new InvalidArgumentException('non-nullable overseasEmployer cannot be null'); } - $this->container['eeaCitizen'] = $eeaCitizen; + $this->container['overseasEmployer'] = $overseasEmployer; return $this; } /** - * Gets epm6Scheme + * Gets overseasSecondmentStatus * - * @return bool|null + * @return \SynergiTech\Staffology\Model\OverseasSecondmentStatus|null */ - public function getEpm6Scheme(): ?bool + public function getOverseasSecondmentStatus(): ?\SynergiTech\Staffology\Model\OverseasSecondmentStatus { - return $this->container['epm6Scheme']; + return $this->container['overseasSecondmentStatus']; } /** - * Sets epm6Scheme + * Sets overseasSecondmentStatus * - * @param bool|null $epm6Scheme epm6Scheme + * @param \SynergiTech\Staffology\Model\OverseasSecondmentStatus|null $overseasSecondmentStatus overseasSecondmentStatus * * @return $this */ - public function setEpm6Scheme(?bool $epm6Scheme): static + public function setOverseasSecondmentStatus(?\SynergiTech\Staffology\Model\OverseasSecondmentStatus $overseasSecondmentStatus): static { - if (is_null($epm6Scheme)) { - throw new InvalidArgumentException('non-nullable epm6Scheme cannot be null'); + if (is_null($overseasSecondmentStatus)) { + throw new InvalidArgumentException('non-nullable overseasSecondmentStatus cannot be null'); } - $this->container['epm6Scheme'] = $epm6Scheme; + $this->container['overseasSecondmentStatus'] = $overseasSecondmentStatus; return $this; } diff --git a/src/Model/OverseasSecondmentStatus.php b/src/Model/OverseasSecondmentStatus.php index 63b7cfb..3ac7359 100644 --- a/src/Model/OverseasSecondmentStatus.php +++ b/src/Model/OverseasSecondmentStatus.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/P11.php b/src/Model/P11.php index 11087b8..551822b 100644 --- a/src/Model/P11.php +++ b/src/Model/P11.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,22 +60,22 @@ class P11 implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'dateOfBirth' => '\DateTime', 'employerName' => 'string', - 'payrollCode' => 'string', 'employerOfficeNo' => 'string', 'employerPayeRef' => 'string', 'firstname' => 'string', - 'surname' => 'string', - 'niNumber' => 'string', - 'taxCode' => 'string', - 'dateOfBirth' => '\DateTime', + 'isDraft' => 'bool', 'joinDate' => '\DateTime', 'leaveDate' => '\DateTime', 'lines' => '\SynergiTech\Staffology\Model\P11Line[]', + 'niNumber' => 'string', + 'payrollCode' => 'string', 'report' => '\SynergiTech\Staffology\Model\Report', + 'surname' => 'string', + 'taxCode' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -84,22 +84,22 @@ class P11 implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'dateOfBirth' => 'date', 'employerName' => null, - 'payrollCode' => null, 'employerOfficeNo' => null, 'employerPayeRef' => null, 'firstname' => null, - 'surname' => null, - 'niNumber' => null, - 'taxCode' => null, - 'dateOfBirth' => 'date', + 'isDraft' => null, 'joinDate' => 'date', 'leaveDate' => 'date', 'lines' => null, + 'niNumber' => null, + 'payrollCode' => null, 'report' => null, + 'surname' => null, + 'taxCode' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -108,22 +108,22 @@ class P11 implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'dateOfBirth' => false, 'employerName' => true, - 'payrollCode' => true, 'employerOfficeNo' => true, 'employerPayeRef' => true, 'firstname' => true, - 'surname' => true, - 'niNumber' => true, - 'taxCode' => true, - 'dateOfBirth' => false, + 'isDraft' => false, 'joinDate' => false, 'leaveDate' => true, 'lines' => true, + 'niNumber' => true, + 'payrollCode' => true, 'report' => false, + 'surname' => true, + 'taxCode' => true, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -212,22 +212,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'dateOfBirth' => 'dateOfBirth', 'employerName' => 'employerName', - 'payrollCode' => 'payrollCode', 'employerOfficeNo' => 'employerOfficeNo', 'employerPayeRef' => 'employerPayeRef', 'firstname' => 'firstname', - 'surname' => 'surname', - 'niNumber' => 'niNumber', - 'taxCode' => 'taxCode', - 'dateOfBirth' => 'dateOfBirth', + 'isDraft' => 'isDraft', 'joinDate' => 'joinDate', 'leaveDate' => 'leaveDate', 'lines' => 'lines', + 'niNumber' => 'niNumber', + 'payrollCode' => 'payrollCode', 'report' => 'report', + 'surname' => 'surname', + 'taxCode' => 'taxCode', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -236,22 +236,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'dateOfBirth' => 'setDateOfBirth', 'employerName' => 'setEmployerName', - 'payrollCode' => 'setPayrollCode', 'employerOfficeNo' => 'setEmployerOfficeNo', 'employerPayeRef' => 'setEmployerPayeRef', 'firstname' => 'setFirstname', - 'surname' => 'setSurname', - 'niNumber' => 'setNiNumber', - 'taxCode' => 'setTaxCode', - 'dateOfBirth' => 'setDateOfBirth', + 'isDraft' => 'setIsDraft', 'joinDate' => 'setJoinDate', 'leaveDate' => 'setLeaveDate', 'lines' => 'setLines', + 'niNumber' => 'setNiNumber', + 'payrollCode' => 'setPayrollCode', 'report' => 'setReport', + 'surname' => 'setSurname', + 'taxCode' => 'setTaxCode', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -260,22 +260,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'dateOfBirth' => 'getDateOfBirth', 'employerName' => 'getEmployerName', - 'payrollCode' => 'getPayrollCode', 'employerOfficeNo' => 'getEmployerOfficeNo', 'employerPayeRef' => 'getEmployerPayeRef', 'firstname' => 'getFirstname', - 'surname' => 'getSurname', - 'niNumber' => 'getNiNumber', - 'taxCode' => 'getTaxCode', - 'dateOfBirth' => 'getDateOfBirth', + 'isDraft' => 'getIsDraft', 'joinDate' => 'getJoinDate', 'leaveDate' => 'getLeaveDate', 'lines' => 'getLines', + 'niNumber' => 'getNiNumber', + 'payrollCode' => 'getPayrollCode', 'report' => 'getReport', + 'surname' => 'getSurname', + 'taxCode' => 'getTaxCode', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -334,22 +334,22 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('dateOfBirth', $data ?? [], null); $this->setIfExists('employerName', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('employerOfficeNo', $data ?? [], null); $this->setIfExists('employerPayeRef', $data ?? [], null); $this->setIfExists('firstname', $data ?? [], null); - $this->setIfExists('surname', $data ?? [], null); - $this->setIfExists('niNumber', $data ?? [], null); - $this->setIfExists('taxCode', $data ?? [], null); - $this->setIfExists('dateOfBirth', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('joinDate', $data ?? [], null); $this->setIfExists('leaveDate', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('niNumber', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('surname', $data ?? [], null); + $this->setIfExists('taxCode', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -395,69 +395,62 @@ public function valid(): bool /** - * Gets employerName + * Gets dateOfBirth * - * @return string|null + * @return \DateTime|null */ - public function getEmployerName(): ?string + public function getDateOfBirth(): ?\DateTime { - return $this->container['employerName']; + return $this->container['dateOfBirth']; } /** - * Sets employerName + * Sets dateOfBirth * - * @param string|null $employerName [readonly] + * @param \DateTime|null $dateOfBirth [readonly] * * @return $this */ - public function setEmployerName(?string $employerName): static + public function setDateOfBirth(?\DateTime $dateOfBirth): static { - if (is_null($employerName)) { - array_push($this->openAPINullablesSetToNull, 'employerName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($dateOfBirth)) { + throw new InvalidArgumentException('non-nullable dateOfBirth cannot be null'); } - $this->container['employerName'] = $employerName; + $this->container['dateOfBirth'] = $dateOfBirth; return $this; } /** - * Gets payrollCode + * Gets employerName * * @return string|null */ - public function getPayrollCode(): ?string + public function getEmployerName(): ?string { - return $this->container['payrollCode']; + return $this->container['employerName']; } /** - * Sets payrollCode + * Sets employerName * - * @param string|null $payrollCode [readonly] + * @param string|null $employerName [readonly] * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setEmployerName(?string $employerName): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); + if (is_null($employerName)) { + array_push($this->openAPINullablesSetToNull, 'employerName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); + $index = array_search('employerName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payrollCode'] = $payrollCode; + $this->container['employerName'] = $employerName; return $this; } @@ -565,252 +558,286 @@ public function setFirstname(?string $firstname): static } /** - * Gets surname + * Gets isDraft * - * @return string|null + * @return bool|null */ - public function getSurname(): ?string + public function getIsDraft(): ?bool { - return $this->container['surname']; + return $this->container['isDraft']; } /** - * Sets surname + * Sets isDraft * - * @param string|null $surname [readonly] + * @param bool|null $isDraft isDraft * * @return $this */ - public function setSurname(?string $surname): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($surname)) { - array_push($this->openAPINullablesSetToNull, 'surname'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('surname', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['surname'] = $surname; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets niNumber + * Gets joinDate * - * @return string|null + * @return \DateTime|null */ - public function getNiNumber(): ?string + public function getJoinDate(): ?\DateTime { - return $this->container['niNumber']; + return $this->container['joinDate']; } /** - * Sets niNumber + * Sets joinDate * - * @param string|null $niNumber [readonly] + * @param \DateTime|null $joinDate [readonly] * * @return $this */ - public function setNiNumber(?string $niNumber): static + public function setJoinDate(?\DateTime $joinDate): static { - if (is_null($niNumber)) { - array_push($this->openAPINullablesSetToNull, 'niNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($joinDate)) { + throw new InvalidArgumentException('non-nullable joinDate cannot be null'); } - $this->container['niNumber'] = $niNumber; + $this->container['joinDate'] = $joinDate; return $this; } /** - * Gets taxCode + * Gets leaveDate * - * @return string|null + * @return \DateTime|null */ - public function getTaxCode(): ?string + public function getLeaveDate(): ?\DateTime { - return $this->container['taxCode']; + return $this->container['leaveDate']; } /** - * Sets taxCode + * Sets leaveDate * - * @param string|null $taxCode [readonly] + * @param \DateTime|null $leaveDate [readonly] * * @return $this */ - public function setTaxCode(?string $taxCode): static + public function setLeaveDate(?\DateTime $leaveDate): static { - if (is_null($taxCode)) { - array_push($this->openAPINullablesSetToNull, 'taxCode'); + if (is_null($leaveDate)) { + array_push($this->openAPINullablesSetToNull, 'leaveDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxCode', $nullablesSetToNull); + $index = array_search('leaveDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxCode'] = $taxCode; + $this->container['leaveDate'] = $leaveDate; return $this; } /** - * Gets dateOfBirth + * Gets lines * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\P11Line[]|null */ - public function getDateOfBirth(): ?\DateTime + public function getLines(): ?array { - return $this->container['dateOfBirth']; + return $this->container['lines']; } /** - * Sets dateOfBirth + * Sets lines * - * @param \DateTime|null $dateOfBirth [readonly] + * @param \SynergiTech\Staffology\Model\P11Line[]|null $lines [readonly] * * @return $this */ - public function setDateOfBirth(?\DateTime $dateOfBirth): static + public function setLines(?array $lines): static { - if (is_null($dateOfBirth)) { - throw new InvalidArgumentException('non-nullable dateOfBirth cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['dateOfBirth'] = $dateOfBirth; + $this->container['lines'] = $lines; return $this; } /** - * Gets joinDate + * Gets niNumber * - * @return \DateTime|null + * @return string|null */ - public function getJoinDate(): ?\DateTime + public function getNiNumber(): ?string { - return $this->container['joinDate']; + return $this->container['niNumber']; } /** - * Sets joinDate + * Sets niNumber * - * @param \DateTime|null $joinDate [readonly] + * @param string|null $niNumber [readonly] * * @return $this */ - public function setJoinDate(?\DateTime $joinDate): static + public function setNiNumber(?string $niNumber): static { - if (is_null($joinDate)) { - throw new InvalidArgumentException('non-nullable joinDate cannot be null'); + if (is_null($niNumber)) { + array_push($this->openAPINullablesSetToNull, 'niNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('niNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['joinDate'] = $joinDate; + $this->container['niNumber'] = $niNumber; return $this; } /** - * Gets leaveDate + * Gets payrollCode * - * @return \DateTime|null + * @return string|null */ - public function getLeaveDate(): ?\DateTime + public function getPayrollCode(): ?string { - return $this->container['leaveDate']; + return $this->container['payrollCode']; } /** - * Sets leaveDate + * Sets payrollCode * - * @param \DateTime|null $leaveDate [readonly] + * @param string|null $payrollCode [readonly] * * @return $this */ - public function setLeaveDate(?\DateTime $leaveDate): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($leaveDate)) { - array_push($this->openAPINullablesSetToNull, 'leaveDate'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('leaveDate', $nullablesSetToNull); + $index = array_search('payrollCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['leaveDate'] = $leaveDate; + $this->container['payrollCode'] = $payrollCode; return $this; } /** - * Gets lines + * Gets report * - * @return \SynergiTech\Staffology\Model\P11Line[]|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getLines(): ?array + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['lines']; + return $this->container['report']; } /** - * Sets lines + * Sets report * - * @param \SynergiTech\Staffology\Model\P11Line[]|null $lines [readonly] + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setLines(?array $lines): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); + } + $this->container['report'] = $report; + + return $this; + } + + /** + * Gets surname + * + * @return string|null + */ + public function getSurname(): ?string + { + return $this->container['surname']; + } + + /** + * Sets surname + * + * @param string|null $surname [readonly] + * + * @return $this + */ + public function setSurname(?string $surname): static + { + if (is_null($surname)) { + array_push($this->openAPINullablesSetToNull, 'surname'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); + $index = array_search('surname', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lines'] = $lines; + $this->container['surname'] = $surname; return $this; } /** - * Gets report + * Gets taxCode * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getTaxCode(): ?string { - return $this->container['report']; + return $this->container['taxCode']; } /** - * Sets report + * Sets taxCode * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $taxCode [readonly] * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setTaxCode(?string $taxCode): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($taxCode)) { + array_push($this->openAPINullablesSetToNull, 'taxCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('taxCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['taxCode'] = $taxCode; return $this; } @@ -875,33 +902,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/P11DAssetAvailable.php b/src/Model/P11DAssetAvailable.php index da15ace..38340e3 100644 --- a/src/Model/P11DAssetAvailable.php +++ b/src/Model/P11DAssetAvailable.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class P11DAssetAvailable implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'desc' => 'string', - 'other' => 'string', 'annValProRata' => 'string', - 'grossOrAmtForgone' => 'string', + 'cashEquivOrRelevantAmt' => 'string', 'costOrAmtForgone' => 'string', + 'desc' => 'string', + 'grossOrAmtForgone' => 'string', 'madeGood' => 'string', - 'cashEquivOrRelevantAmt' => 'string' + 'other' => 'string' ]; /** @@ -74,13 +74,13 @@ class P11DAssetAvailable implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'desc' => null, - 'other' => null, 'annValProRata' => null, - 'grossOrAmtForgone' => null, + 'cashEquivOrRelevantAmt' => null, 'costOrAmtForgone' => null, + 'desc' => null, + 'grossOrAmtForgone' => null, 'madeGood' => null, - 'cashEquivOrRelevantAmt' => null + 'other' => null ]; /** @@ -89,13 +89,13 @@ class P11DAssetAvailable implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'desc' => true, - 'other' => true, 'annValProRata' => true, - 'grossOrAmtForgone' => true, + 'cashEquivOrRelevantAmt' => true, 'costOrAmtForgone' => true, + 'desc' => true, + 'grossOrAmtForgone' => true, 'madeGood' => true, - 'cashEquivOrRelevantAmt' => true + 'other' => true ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'desc' => 'desc', - 'other' => 'other', 'annValProRata' => 'annValProRata', - 'grossOrAmtForgone' => 'grossOrAmtForgone', + 'cashEquivOrRelevantAmt' => 'cashEquivOrRelevantAmt', 'costOrAmtForgone' => 'costOrAmtForgone', + 'desc' => 'desc', + 'grossOrAmtForgone' => 'grossOrAmtForgone', 'madeGood' => 'madeGood', - 'cashEquivOrRelevantAmt' => 'cashEquivOrRelevantAmt' + 'other' => 'other' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'desc' => 'setDesc', - 'other' => 'setOther', 'annValProRata' => 'setAnnValProRata', - 'grossOrAmtForgone' => 'setGrossOrAmtForgone', + 'cashEquivOrRelevantAmt' => 'setCashEquivOrRelevantAmt', 'costOrAmtForgone' => 'setCostOrAmtForgone', + 'desc' => 'setDesc', + 'grossOrAmtForgone' => 'setGrossOrAmtForgone', 'madeGood' => 'setMadeGood', - 'cashEquivOrRelevantAmt' => 'setCashEquivOrRelevantAmt' + 'other' => 'setOther' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'desc' => 'getDesc', - 'other' => 'getOther', 'annValProRata' => 'getAnnValProRata', - 'grossOrAmtForgone' => 'getGrossOrAmtForgone', + 'cashEquivOrRelevantAmt' => 'getCashEquivOrRelevantAmt', 'costOrAmtForgone' => 'getCostOrAmtForgone', + 'desc' => 'getDesc', + 'grossOrAmtForgone' => 'getGrossOrAmtForgone', 'madeGood' => 'getMadeGood', - 'cashEquivOrRelevantAmt' => 'getCashEquivOrRelevantAmt' + 'other' => 'getOther' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('desc', $data ?? [], null); - $this->setIfExists('other', $data ?? [], null); $this->setIfExists('annValProRata', $data ?? [], null); - $this->setIfExists('grossOrAmtForgone', $data ?? [], null); + $this->setIfExists('cashEquivOrRelevantAmt', $data ?? [], null); $this->setIfExists('costOrAmtForgone', $data ?? [], null); + $this->setIfExists('desc', $data ?? [], null); + $this->setIfExists('grossOrAmtForgone', $data ?? [], null); $this->setIfExists('madeGood', $data ?? [], null); - $this->setIfExists('cashEquivOrRelevantAmt', $data ?? [], null); + $this->setIfExists('other', $data ?? [], null); } /** @@ -331,171 +331,171 @@ public function valid(): bool /** - * Gets desc + * Gets annValProRata * * @return string|null */ - public function getDesc(): ?string + public function getAnnValProRata(): ?string { - return $this->container['desc']; + return $this->container['annValProRata']; } /** - * Sets desc + * Sets annValProRata * - * @param string|null $desc desc + * @param string|null $annValProRata annValProRata * * @return $this */ - public function setDesc(?string $desc): static + public function setAnnValProRata(?string $annValProRata): static { - if (is_null($desc)) { - array_push($this->openAPINullablesSetToNull, 'desc'); + if (is_null($annValProRata)) { + array_push($this->openAPINullablesSetToNull, 'annValProRata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('desc', $nullablesSetToNull); + $index = array_search('annValProRata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['desc'] = $desc; + $this->container['annValProRata'] = $annValProRata; return $this; } /** - * Gets other + * Gets cashEquivOrRelevantAmt * * @return string|null */ - public function getOther(): ?string + public function getCashEquivOrRelevantAmt(): ?string { - return $this->container['other']; + return $this->container['cashEquivOrRelevantAmt']; } /** - * Sets other + * Sets cashEquivOrRelevantAmt * - * @param string|null $other other + * @param string|null $cashEquivOrRelevantAmt cashEquivOrRelevantAmt * * @return $this */ - public function setOther(?string $other): static + public function setCashEquivOrRelevantAmt(?string $cashEquivOrRelevantAmt): static { - if (is_null($other)) { - array_push($this->openAPINullablesSetToNull, 'other'); + if (is_null($cashEquivOrRelevantAmt)) { + array_push($this->openAPINullablesSetToNull, 'cashEquivOrRelevantAmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('other', $nullablesSetToNull); + $index = array_search('cashEquivOrRelevantAmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['other'] = $other; + $this->container['cashEquivOrRelevantAmt'] = $cashEquivOrRelevantAmt; return $this; } /** - * Gets annValProRata + * Gets costOrAmtForgone * * @return string|null */ - public function getAnnValProRata(): ?string + public function getCostOrAmtForgone(): ?string { - return $this->container['annValProRata']; + return $this->container['costOrAmtForgone']; } /** - * Sets annValProRata + * Sets costOrAmtForgone * - * @param string|null $annValProRata annValProRata + * @param string|null $costOrAmtForgone costOrAmtForgone * * @return $this */ - public function setAnnValProRata(?string $annValProRata): static + public function setCostOrAmtForgone(?string $costOrAmtForgone): static { - if (is_null($annValProRata)) { - array_push($this->openAPINullablesSetToNull, 'annValProRata'); + if (is_null($costOrAmtForgone)) { + array_push($this->openAPINullablesSetToNull, 'costOrAmtForgone'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('annValProRata', $nullablesSetToNull); + $index = array_search('costOrAmtForgone', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['annValProRata'] = $annValProRata; + $this->container['costOrAmtForgone'] = $costOrAmtForgone; return $this; } /** - * Gets grossOrAmtForgone + * Gets desc * * @return string|null */ - public function getGrossOrAmtForgone(): ?string + public function getDesc(): ?string { - return $this->container['grossOrAmtForgone']; + return $this->container['desc']; } /** - * Sets grossOrAmtForgone + * Sets desc * - * @param string|null $grossOrAmtForgone grossOrAmtForgone + * @param string|null $desc desc * * @return $this */ - public function setGrossOrAmtForgone(?string $grossOrAmtForgone): static + public function setDesc(?string $desc): static { - if (is_null($grossOrAmtForgone)) { - array_push($this->openAPINullablesSetToNull, 'grossOrAmtForgone'); + if (is_null($desc)) { + array_push($this->openAPINullablesSetToNull, 'desc'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('grossOrAmtForgone', $nullablesSetToNull); + $index = array_search('desc', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['grossOrAmtForgone'] = $grossOrAmtForgone; + $this->container['desc'] = $desc; return $this; } /** - * Gets costOrAmtForgone + * Gets grossOrAmtForgone * * @return string|null */ - public function getCostOrAmtForgone(): ?string + public function getGrossOrAmtForgone(): ?string { - return $this->container['costOrAmtForgone']; + return $this->container['grossOrAmtForgone']; } /** - * Sets costOrAmtForgone + * Sets grossOrAmtForgone * - * @param string|null $costOrAmtForgone costOrAmtForgone + * @param string|null $grossOrAmtForgone grossOrAmtForgone * * @return $this */ - public function setCostOrAmtForgone(?string $costOrAmtForgone): static + public function setGrossOrAmtForgone(?string $grossOrAmtForgone): static { - if (is_null($costOrAmtForgone)) { - array_push($this->openAPINullablesSetToNull, 'costOrAmtForgone'); + if (is_null($grossOrAmtForgone)) { + array_push($this->openAPINullablesSetToNull, 'grossOrAmtForgone'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costOrAmtForgone', $nullablesSetToNull); + $index = array_search('grossOrAmtForgone', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costOrAmtForgone'] = $costOrAmtForgone; + $this->container['grossOrAmtForgone'] = $grossOrAmtForgone; return $this; } @@ -535,35 +535,35 @@ public function setMadeGood(?string $madeGood): static } /** - * Gets cashEquivOrRelevantAmt + * Gets other * * @return string|null */ - public function getCashEquivOrRelevantAmt(): ?string + public function getOther(): ?string { - return $this->container['cashEquivOrRelevantAmt']; + return $this->container['other']; } /** - * Sets cashEquivOrRelevantAmt + * Sets other * - * @param string|null $cashEquivOrRelevantAmt cashEquivOrRelevantAmt + * @param string|null $other other * * @return $this */ - public function setCashEquivOrRelevantAmt(?string $cashEquivOrRelevantAmt): static + public function setOther(?string $other): static { - if (is_null($cashEquivOrRelevantAmt)) { - array_push($this->openAPINullablesSetToNull, 'cashEquivOrRelevantAmt'); + if (is_null($other)) { + array_push($this->openAPINullablesSetToNull, 'other'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cashEquivOrRelevantAmt', $nullablesSetToNull); + $index = array_search('other', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cashEquivOrRelevantAmt'] = $cashEquivOrRelevantAmt; + $this->container['other'] = $other; return $this; } diff --git a/src/Model/P11DAssetAvailableCollection.php b/src/Model/P11DAssetAvailableCollection.php index a2b9c7e..b4c7ab8 100644 --- a/src/Model/P11DAssetAvailableCollection.php +++ b/src/Model/P11DAssetAvailableCollection.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/P11DAssetTransferredCollection.php b/src/Model/P11DAssetTransferredCollection.php index 60ddb6f..17d02f5 100644 --- a/src/Model/P11DAssetTransferredCollection.php +++ b/src/Model/P11DAssetTransferredCollection.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/P11DCar.php b/src/Model/P11DCar.php index 25a01ba..7d55703 100644 --- a/src/Model/P11DCar.php +++ b/src/Model/P11DCar.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,22 +59,22 @@ class P11DCar implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'make' => 'string', - 'registered' => 'string', + 'accs' => 'string', 'availFrom' => 'string', 'availTo' => 'string', + 'cO2' => 'string', + 'capCont' => 'string', + 'cashEquivOrRelevantAmt' => 'string', 'cc' => 'string', 'fuel' => 'string', - 'cO2' => 'string', - 'zeroEmissionMileage' => 'string', - 'noAppCO2Fig' => 'string', + 'fuelCashEquivOrRelevantAmt' => 'string', + 'fuelWithdrawn' => '\SynergiTech\Staffology\Model\P11dCarFreeFuelWithdrawn', 'list' => 'string', - 'accs' => 'string', - 'capCont' => 'string', + 'make' => 'string', + 'noAppCO2Fig' => 'string', 'privUsePmt' => 'string', - 'fuelWithdrawn' => '\SynergiTech\Staffology\Model\P11dCarFreeFuelWithdrawn', - 'cashEquivOrRelevantAmt' => 'string', - 'fuelCashEquivOrRelevantAmt' => 'string' + 'registered' => 'string', + 'zeroEmissionMileage' => 'string' ]; /** @@ -83,22 +83,22 @@ class P11DCar implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'make' => null, - 'registered' => null, + 'accs' => null, 'availFrom' => null, 'availTo' => null, + 'cO2' => null, + 'capCont' => null, + 'cashEquivOrRelevantAmt' => null, 'cc' => null, 'fuel' => null, - 'cO2' => null, - 'zeroEmissionMileage' => null, - 'noAppCO2Fig' => null, + 'fuelCashEquivOrRelevantAmt' => null, + 'fuelWithdrawn' => null, 'list' => null, - 'accs' => null, - 'capCont' => null, + 'make' => null, + 'noAppCO2Fig' => null, 'privUsePmt' => null, - 'fuelWithdrawn' => null, - 'cashEquivOrRelevantAmt' => null, - 'fuelCashEquivOrRelevantAmt' => null + 'registered' => null, + 'zeroEmissionMileage' => null ]; /** @@ -107,22 +107,22 @@ class P11DCar implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'make' => true, - 'registered' => true, + 'accs' => true, 'availFrom' => true, 'availTo' => true, + 'cO2' => true, + 'capCont' => true, + 'cashEquivOrRelevantAmt' => true, 'cc' => true, 'fuel' => true, - 'cO2' => true, - 'zeroEmissionMileage' => true, - 'noAppCO2Fig' => true, + 'fuelCashEquivOrRelevantAmt' => true, + 'fuelWithdrawn' => false, 'list' => true, - 'accs' => true, - 'capCont' => true, + 'make' => true, + 'noAppCO2Fig' => true, 'privUsePmt' => true, - 'fuelWithdrawn' => false, - 'cashEquivOrRelevantAmt' => true, - 'fuelCashEquivOrRelevantAmt' => true + 'registered' => true, + 'zeroEmissionMileage' => true ]; /** @@ -211,22 +211,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'make' => 'make', - 'registered' => 'registered', + 'accs' => 'accs', 'availFrom' => 'availFrom', 'availTo' => 'availTo', + 'cO2' => 'cO2', + 'capCont' => 'capCont', + 'cashEquivOrRelevantAmt' => 'cashEquivOrRelevantAmt', 'cc' => 'cc', 'fuel' => 'fuel', - 'cO2' => 'cO2', - 'zeroEmissionMileage' => 'zeroEmissionMileage', - 'noAppCO2Fig' => 'noAppCO2Fig', + 'fuelCashEquivOrRelevantAmt' => 'fuelCashEquivOrRelevantAmt', + 'fuelWithdrawn' => 'fuelWithdrawn', 'list' => 'list', - 'accs' => 'accs', - 'capCont' => 'capCont', + 'make' => 'make', + 'noAppCO2Fig' => 'noAppCO2Fig', 'privUsePmt' => 'privUsePmt', - 'fuelWithdrawn' => 'fuelWithdrawn', - 'cashEquivOrRelevantAmt' => 'cashEquivOrRelevantAmt', - 'fuelCashEquivOrRelevantAmt' => 'fuelCashEquivOrRelevantAmt' + 'registered' => 'registered', + 'zeroEmissionMileage' => 'zeroEmissionMileage' ]; /** @@ -235,22 +235,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'make' => 'setMake', - 'registered' => 'setRegistered', + 'accs' => 'setAccs', 'availFrom' => 'setAvailFrom', 'availTo' => 'setAvailTo', + 'cO2' => 'setCO2', + 'capCont' => 'setCapCont', + 'cashEquivOrRelevantAmt' => 'setCashEquivOrRelevantAmt', 'cc' => 'setCc', 'fuel' => 'setFuel', - 'cO2' => 'setCO2', - 'zeroEmissionMileage' => 'setZeroEmissionMileage', - 'noAppCO2Fig' => 'setNoAppCO2Fig', + 'fuelCashEquivOrRelevantAmt' => 'setFuelCashEquivOrRelevantAmt', + 'fuelWithdrawn' => 'setFuelWithdrawn', 'list' => 'setList', - 'accs' => 'setAccs', - 'capCont' => 'setCapCont', + 'make' => 'setMake', + 'noAppCO2Fig' => 'setNoAppCO2Fig', 'privUsePmt' => 'setPrivUsePmt', - 'fuelWithdrawn' => 'setFuelWithdrawn', - 'cashEquivOrRelevantAmt' => 'setCashEquivOrRelevantAmt', - 'fuelCashEquivOrRelevantAmt' => 'setFuelCashEquivOrRelevantAmt' + 'registered' => 'setRegistered', + 'zeroEmissionMileage' => 'setZeroEmissionMileage' ]; /** @@ -259,22 +259,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'make' => 'getMake', - 'registered' => 'getRegistered', + 'accs' => 'getAccs', 'availFrom' => 'getAvailFrom', 'availTo' => 'getAvailTo', + 'cO2' => 'getCO2', + 'capCont' => 'getCapCont', + 'cashEquivOrRelevantAmt' => 'getCashEquivOrRelevantAmt', 'cc' => 'getCc', 'fuel' => 'getFuel', - 'cO2' => 'getCO2', - 'zeroEmissionMileage' => 'getZeroEmissionMileage', - 'noAppCO2Fig' => 'getNoAppCO2Fig', + 'fuelCashEquivOrRelevantAmt' => 'getFuelCashEquivOrRelevantAmt', + 'fuelWithdrawn' => 'getFuelWithdrawn', 'list' => 'getList', - 'accs' => 'getAccs', - 'capCont' => 'getCapCont', + 'make' => 'getMake', + 'noAppCO2Fig' => 'getNoAppCO2Fig', 'privUsePmt' => 'getPrivUsePmt', - 'fuelWithdrawn' => 'getFuelWithdrawn', - 'cashEquivOrRelevantAmt' => 'getCashEquivOrRelevantAmt', - 'fuelCashEquivOrRelevantAmt' => 'getFuelCashEquivOrRelevantAmt' + 'registered' => 'getRegistered', + 'zeroEmissionMileage' => 'getZeroEmissionMileage' ]; /** @@ -333,22 +333,22 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('make', $data ?? [], null); - $this->setIfExists('registered', $data ?? [], null); + $this->setIfExists('accs', $data ?? [], null); $this->setIfExists('availFrom', $data ?? [], null); $this->setIfExists('availTo', $data ?? [], null); - $this->setIfExists('cc', $data ?? [], null); - $this->setIfExists('fuel', $data ?? [], null); $this->setIfExists('cO2', $data ?? [], null); - $this->setIfExists('zeroEmissionMileage', $data ?? [], null); - $this->setIfExists('noAppCO2Fig', $data ?? [], null); - $this->setIfExists('list', $data ?? [], null); - $this->setIfExists('accs', $data ?? [], null); $this->setIfExists('capCont', $data ?? [], null); - $this->setIfExists('privUsePmt', $data ?? [], null); - $this->setIfExists('fuelWithdrawn', $data ?? [], null); $this->setIfExists('cashEquivOrRelevantAmt', $data ?? [], null); + $this->setIfExists('cc', $data ?? [], null); + $this->setIfExists('fuel', $data ?? [], null); $this->setIfExists('fuelCashEquivOrRelevantAmt', $data ?? [], null); + $this->setIfExists('fuelWithdrawn', $data ?? [], null); + $this->setIfExists('list', $data ?? [], null); + $this->setIfExists('make', $data ?? [], null); + $this->setIfExists('noAppCO2Fig', $data ?? [], null); + $this->setIfExists('privUsePmt', $data ?? [], null); + $this->setIfExists('registered', $data ?? [], null); + $this->setIfExists('zeroEmissionMileage', $data ?? [], null); } /** @@ -394,307 +394,334 @@ public function valid(): bool /** - * Gets make + * Gets accs * * @return string|null */ - public function getMake(): ?string + public function getAccs(): ?string { - return $this->container['make']; + return $this->container['accs']; } /** - * Sets make + * Sets accs * - * @param string|null $make make + * @param string|null $accs accs * * @return $this */ - public function setMake(?string $make): static + public function setAccs(?string $accs): static { - if (is_null($make)) { - array_push($this->openAPINullablesSetToNull, 'make'); + if (is_null($accs)) { + array_push($this->openAPINullablesSetToNull, 'accs'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('make', $nullablesSetToNull); + $index = array_search('accs', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['make'] = $make; + $this->container['accs'] = $accs; return $this; } /** - * Gets registered + * Gets availFrom * * @return string|null */ - public function getRegistered(): ?string + public function getAvailFrom(): ?string { - return $this->container['registered']; + return $this->container['availFrom']; } /** - * Sets registered + * Sets availFrom * - * @param string|null $registered registered + * @param string|null $availFrom availFrom * * @return $this */ - public function setRegistered(?string $registered): static + public function setAvailFrom(?string $availFrom): static { - if (is_null($registered)) { - array_push($this->openAPINullablesSetToNull, 'registered'); + if (is_null($availFrom)) { + array_push($this->openAPINullablesSetToNull, 'availFrom'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('registered', $nullablesSetToNull); + $index = array_search('availFrom', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['registered'] = $registered; + $this->container['availFrom'] = $availFrom; return $this; } /** - * Gets availFrom + * Gets availTo * * @return string|null */ - public function getAvailFrom(): ?string + public function getAvailTo(): ?string { - return $this->container['availFrom']; + return $this->container['availTo']; } /** - * Sets availFrom + * Sets availTo * - * @param string|null $availFrom availFrom + * @param string|null $availTo availTo * * @return $this */ - public function setAvailFrom(?string $availFrom): static + public function setAvailTo(?string $availTo): static { - if (is_null($availFrom)) { - array_push($this->openAPINullablesSetToNull, 'availFrom'); + if (is_null($availTo)) { + array_push($this->openAPINullablesSetToNull, 'availTo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('availFrom', $nullablesSetToNull); + $index = array_search('availTo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['availFrom'] = $availFrom; + $this->container['availTo'] = $availTo; return $this; } /** - * Gets availTo + * Gets cO2 * * @return string|null */ - public function getAvailTo(): ?string + public function getCO2(): ?string { - return $this->container['availTo']; + return $this->container['cO2']; } /** - * Sets availTo + * Sets cO2 * - * @param string|null $availTo availTo + * @param string|null $cO2 cO2 * * @return $this */ - public function setAvailTo(?string $availTo): static + public function setCO2(?string $cO2): static { - if (is_null($availTo)) { - array_push($this->openAPINullablesSetToNull, 'availTo'); + if (is_null($cO2)) { + array_push($this->openAPINullablesSetToNull, 'cO2'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('availTo', $nullablesSetToNull); + $index = array_search('cO2', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['availTo'] = $availTo; + $this->container['cO2'] = $cO2; return $this; } /** - * Gets cc + * Gets capCont * * @return string|null */ - public function getCc(): ?string + public function getCapCont(): ?string { - return $this->container['cc']; + return $this->container['capCont']; } /** - * Sets cc + * Sets capCont * - * @param string|null $cc cc + * @param string|null $capCont capCont * * @return $this */ - public function setCc(?string $cc): static + public function setCapCont(?string $capCont): static { - if (is_null($cc)) { - array_push($this->openAPINullablesSetToNull, 'cc'); + if (is_null($capCont)) { + array_push($this->openAPINullablesSetToNull, 'capCont'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cc', $nullablesSetToNull); + $index = array_search('capCont', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cc'] = $cc; + $this->container['capCont'] = $capCont; return $this; } /** - * Gets fuel + * Gets cashEquivOrRelevantAmt * * @return string|null */ - public function getFuel(): ?string + public function getCashEquivOrRelevantAmt(): ?string { - return $this->container['fuel']; + return $this->container['cashEquivOrRelevantAmt']; } /** - * Sets fuel + * Sets cashEquivOrRelevantAmt * - * @param string|null $fuel fuel + * @param string|null $cashEquivOrRelevantAmt cashEquivOrRelevantAmt * * @return $this */ - public function setFuel(?string $fuel): static + public function setCashEquivOrRelevantAmt(?string $cashEquivOrRelevantAmt): static { - if (is_null($fuel)) { - array_push($this->openAPINullablesSetToNull, 'fuel'); + if (is_null($cashEquivOrRelevantAmt)) { + array_push($this->openAPINullablesSetToNull, 'cashEquivOrRelevantAmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fuel', $nullablesSetToNull); + $index = array_search('cashEquivOrRelevantAmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['fuel'] = $fuel; + $this->container['cashEquivOrRelevantAmt'] = $cashEquivOrRelevantAmt; return $this; } /** - * Gets cO2 + * Gets cc * * @return string|null */ - public function getCO2(): ?string + public function getCc(): ?string { - return $this->container['cO2']; + return $this->container['cc']; } /** - * Sets cO2 + * Sets cc * - * @param string|null $cO2 cO2 + * @param string|null $cc cc * * @return $this */ - public function setCO2(?string $cO2): static + public function setCc(?string $cc): static { - if (is_null($cO2)) { - array_push($this->openAPINullablesSetToNull, 'cO2'); + if (is_null($cc)) { + array_push($this->openAPINullablesSetToNull, 'cc'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cO2', $nullablesSetToNull); + $index = array_search('cc', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cO2'] = $cO2; + $this->container['cc'] = $cc; return $this; } /** - * Gets zeroEmissionMileage + * Gets fuel * * @return string|null */ - public function getZeroEmissionMileage(): ?string + public function getFuel(): ?string { - return $this->container['zeroEmissionMileage']; + return $this->container['fuel']; } /** - * Sets zeroEmissionMileage + * Sets fuel * - * @param string|null $zeroEmissionMileage zeroEmissionMileage + * @param string|null $fuel fuel * * @return $this */ - public function setZeroEmissionMileage(?string $zeroEmissionMileage): static + public function setFuel(?string $fuel): static { - if (is_null($zeroEmissionMileage)) { - array_push($this->openAPINullablesSetToNull, 'zeroEmissionMileage'); + if (is_null($fuel)) { + array_push($this->openAPINullablesSetToNull, 'fuel'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('zeroEmissionMileage', $nullablesSetToNull); + $index = array_search('fuel', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['zeroEmissionMileage'] = $zeroEmissionMileage; + $this->container['fuel'] = $fuel; return $this; } /** - * Gets noAppCO2Fig + * Gets fuelCashEquivOrRelevantAmt * * @return string|null */ - public function getNoAppCO2Fig(): ?string + public function getFuelCashEquivOrRelevantAmt(): ?string { - return $this->container['noAppCO2Fig']; + return $this->container['fuelCashEquivOrRelevantAmt']; } /** - * Sets noAppCO2Fig + * Sets fuelCashEquivOrRelevantAmt * - * @param string|null $noAppCO2Fig noAppCO2Fig + * @param string|null $fuelCashEquivOrRelevantAmt fuelCashEquivOrRelevantAmt * * @return $this */ - public function setNoAppCO2Fig(?string $noAppCO2Fig): static + public function setFuelCashEquivOrRelevantAmt(?string $fuelCashEquivOrRelevantAmt): static { - if (is_null($noAppCO2Fig)) { - array_push($this->openAPINullablesSetToNull, 'noAppCO2Fig'); + if (is_null($fuelCashEquivOrRelevantAmt)) { + array_push($this->openAPINullablesSetToNull, 'fuelCashEquivOrRelevantAmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('noAppCO2Fig', $nullablesSetToNull); + $index = array_search('fuelCashEquivOrRelevantAmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['noAppCO2Fig'] = $noAppCO2Fig; + $this->container['fuelCashEquivOrRelevantAmt'] = $fuelCashEquivOrRelevantAmt; + + return $this; + } + + /** + * Gets fuelWithdrawn + * + * @return \SynergiTech\Staffology\Model\P11dCarFreeFuelWithdrawn|null + */ + public function getFuelWithdrawn(): ?\SynergiTech\Staffology\Model\P11dCarFreeFuelWithdrawn + { + return $this->container['fuelWithdrawn']; + } + + /** + * Sets fuelWithdrawn + * + * @param \SynergiTech\Staffology\Model\P11dCarFreeFuelWithdrawn|null $fuelWithdrawn fuelWithdrawn + * + * @return $this + */ + public function setFuelWithdrawn(?\SynergiTech\Staffology\Model\P11dCarFreeFuelWithdrawn $fuelWithdrawn): static + { + if (is_null($fuelWithdrawn)) { + throw new InvalidArgumentException('non-nullable fuelWithdrawn cannot be null'); + } + $this->container['fuelWithdrawn'] = $fuelWithdrawn; return $this; } @@ -734,69 +761,69 @@ public function setList(?string $list): static } /** - * Gets accs + * Gets make * * @return string|null */ - public function getAccs(): ?string + public function getMake(): ?string { - return $this->container['accs']; + return $this->container['make']; } /** - * Sets accs + * Sets make * - * @param string|null $accs accs + * @param string|null $make make * * @return $this */ - public function setAccs(?string $accs): static + public function setMake(?string $make): static { - if (is_null($accs)) { - array_push($this->openAPINullablesSetToNull, 'accs'); + if (is_null($make)) { + array_push($this->openAPINullablesSetToNull, 'make'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accs', $nullablesSetToNull); + $index = array_search('make', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['accs'] = $accs; + $this->container['make'] = $make; return $this; } /** - * Gets capCont + * Gets noAppCO2Fig * * @return string|null */ - public function getCapCont(): ?string + public function getNoAppCO2Fig(): ?string { - return $this->container['capCont']; + return $this->container['noAppCO2Fig']; } /** - * Sets capCont + * Sets noAppCO2Fig * - * @param string|null $capCont capCont + * @param string|null $noAppCO2Fig noAppCO2Fig * * @return $this */ - public function setCapCont(?string $capCont): static + public function setNoAppCO2Fig(?string $noAppCO2Fig): static { - if (is_null($capCont)) { - array_push($this->openAPINullablesSetToNull, 'capCont'); + if (is_null($noAppCO2Fig)) { + array_push($this->openAPINullablesSetToNull, 'noAppCO2Fig'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('capCont', $nullablesSetToNull); + $index = array_search('noAppCO2Fig', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['capCont'] = $capCont; + $this->container['noAppCO2Fig'] = $noAppCO2Fig; return $this; } @@ -836,96 +863,69 @@ public function setPrivUsePmt(?string $privUsePmt): static } /** - * Gets fuelWithdrawn - * - * @return \SynergiTech\Staffology\Model\P11dCarFreeFuelWithdrawn|null - */ - public function getFuelWithdrawn(): ?\SynergiTech\Staffology\Model\P11dCarFreeFuelWithdrawn - { - return $this->container['fuelWithdrawn']; - } - - /** - * Sets fuelWithdrawn - * - * @param \SynergiTech\Staffology\Model\P11dCarFreeFuelWithdrawn|null $fuelWithdrawn fuelWithdrawn - * - * @return $this - */ - public function setFuelWithdrawn(?\SynergiTech\Staffology\Model\P11dCarFreeFuelWithdrawn $fuelWithdrawn): static - { - if (is_null($fuelWithdrawn)) { - throw new InvalidArgumentException('non-nullable fuelWithdrawn cannot be null'); - } - $this->container['fuelWithdrawn'] = $fuelWithdrawn; - - return $this; - } - - /** - * Gets cashEquivOrRelevantAmt + * Gets registered * * @return string|null */ - public function getCashEquivOrRelevantAmt(): ?string + public function getRegistered(): ?string { - return $this->container['cashEquivOrRelevantAmt']; + return $this->container['registered']; } /** - * Sets cashEquivOrRelevantAmt + * Sets registered * - * @param string|null $cashEquivOrRelevantAmt cashEquivOrRelevantAmt + * @param string|null $registered registered * * @return $this */ - public function setCashEquivOrRelevantAmt(?string $cashEquivOrRelevantAmt): static + public function setRegistered(?string $registered): static { - if (is_null($cashEquivOrRelevantAmt)) { - array_push($this->openAPINullablesSetToNull, 'cashEquivOrRelevantAmt'); + if (is_null($registered)) { + array_push($this->openAPINullablesSetToNull, 'registered'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cashEquivOrRelevantAmt', $nullablesSetToNull); + $index = array_search('registered', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cashEquivOrRelevantAmt'] = $cashEquivOrRelevantAmt; + $this->container['registered'] = $registered; return $this; } /** - * Gets fuelCashEquivOrRelevantAmt + * Gets zeroEmissionMileage * * @return string|null */ - public function getFuelCashEquivOrRelevantAmt(): ?string + public function getZeroEmissionMileage(): ?string { - return $this->container['fuelCashEquivOrRelevantAmt']; + return $this->container['zeroEmissionMileage']; } /** - * Sets fuelCashEquivOrRelevantAmt + * Sets zeroEmissionMileage * - * @param string|null $fuelCashEquivOrRelevantAmt fuelCashEquivOrRelevantAmt + * @param string|null $zeroEmissionMileage zeroEmissionMileage * * @return $this */ - public function setFuelCashEquivOrRelevantAmt(?string $fuelCashEquivOrRelevantAmt): static + public function setZeroEmissionMileage(?string $zeroEmissionMileage): static { - if (is_null($fuelCashEquivOrRelevantAmt)) { - array_push($this->openAPINullablesSetToNull, 'fuelCashEquivOrRelevantAmt'); + if (is_null($zeroEmissionMileage)) { + array_push($this->openAPINullablesSetToNull, 'zeroEmissionMileage'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fuelCashEquivOrRelevantAmt', $nullablesSetToNull); + $index = array_search('zeroEmissionMileage', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['fuelCashEquivOrRelevantAmt'] = $fuelCashEquivOrRelevantAmt; + $this->container['zeroEmissionMileage'] = $zeroEmissionMileage; return $this; } diff --git a/src/Model/P11DCarCollection.php b/src/Model/P11DCarCollection.php index ef74e9c..1eff8f6 100644 --- a/src/Model/P11DCarCollection.php +++ b/src/Model/P11DCarCollection.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/P11DDescOther.php b/src/Model/P11DDescOther.php index b51289d..33e632c 100644 --- a/src/Model/P11DDescOther.php +++ b/src/Model/P11DDescOther.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class P11DDescOther implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'desc' => 'string', - 'other' => 'string', 'annValProRata' => 'string', - 'grossOrAmtForgone' => 'string', + 'cashEquivOrRelevantAmt' => 'string', 'costOrAmtForgone' => 'string', + 'desc' => 'string', + 'grossOrAmtForgone' => 'string', 'madeGood' => 'string', - 'cashEquivOrRelevantAmt' => 'string' + 'other' => 'string' ]; /** @@ -74,13 +74,13 @@ class P11DDescOther implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'desc' => null, - 'other' => null, 'annValProRata' => null, - 'grossOrAmtForgone' => null, + 'cashEquivOrRelevantAmt' => null, 'costOrAmtForgone' => null, + 'desc' => null, + 'grossOrAmtForgone' => null, 'madeGood' => null, - 'cashEquivOrRelevantAmt' => null + 'other' => null ]; /** @@ -89,13 +89,13 @@ class P11DDescOther implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'desc' => true, - 'other' => true, 'annValProRata' => true, - 'grossOrAmtForgone' => true, + 'cashEquivOrRelevantAmt' => true, 'costOrAmtForgone' => true, + 'desc' => true, + 'grossOrAmtForgone' => true, 'madeGood' => true, - 'cashEquivOrRelevantAmt' => true + 'other' => true ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'desc' => 'desc', - 'other' => 'other', 'annValProRata' => 'annValProRata', - 'grossOrAmtForgone' => 'grossOrAmtForgone', + 'cashEquivOrRelevantAmt' => 'cashEquivOrRelevantAmt', 'costOrAmtForgone' => 'costOrAmtForgone', + 'desc' => 'desc', + 'grossOrAmtForgone' => 'grossOrAmtForgone', 'madeGood' => 'madeGood', - 'cashEquivOrRelevantAmt' => 'cashEquivOrRelevantAmt' + 'other' => 'other' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'desc' => 'setDesc', - 'other' => 'setOther', 'annValProRata' => 'setAnnValProRata', - 'grossOrAmtForgone' => 'setGrossOrAmtForgone', + 'cashEquivOrRelevantAmt' => 'setCashEquivOrRelevantAmt', 'costOrAmtForgone' => 'setCostOrAmtForgone', + 'desc' => 'setDesc', + 'grossOrAmtForgone' => 'setGrossOrAmtForgone', 'madeGood' => 'setMadeGood', - 'cashEquivOrRelevantAmt' => 'setCashEquivOrRelevantAmt' + 'other' => 'setOther' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'desc' => 'getDesc', - 'other' => 'getOther', 'annValProRata' => 'getAnnValProRata', - 'grossOrAmtForgone' => 'getGrossOrAmtForgone', + 'cashEquivOrRelevantAmt' => 'getCashEquivOrRelevantAmt', 'costOrAmtForgone' => 'getCostOrAmtForgone', + 'desc' => 'getDesc', + 'grossOrAmtForgone' => 'getGrossOrAmtForgone', 'madeGood' => 'getMadeGood', - 'cashEquivOrRelevantAmt' => 'getCashEquivOrRelevantAmt' + 'other' => 'getOther' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('desc', $data ?? [], null); - $this->setIfExists('other', $data ?? [], null); $this->setIfExists('annValProRata', $data ?? [], null); - $this->setIfExists('grossOrAmtForgone', $data ?? [], null); + $this->setIfExists('cashEquivOrRelevantAmt', $data ?? [], null); $this->setIfExists('costOrAmtForgone', $data ?? [], null); + $this->setIfExists('desc', $data ?? [], null); + $this->setIfExists('grossOrAmtForgone', $data ?? [], null); $this->setIfExists('madeGood', $data ?? [], null); - $this->setIfExists('cashEquivOrRelevantAmt', $data ?? [], null); + $this->setIfExists('other', $data ?? [], null); } /** @@ -331,171 +331,171 @@ public function valid(): bool /** - * Gets desc + * Gets annValProRata * * @return string|null */ - public function getDesc(): ?string + public function getAnnValProRata(): ?string { - return $this->container['desc']; + return $this->container['annValProRata']; } /** - * Sets desc + * Sets annValProRata * - * @param string|null $desc desc + * @param string|null $annValProRata annValProRata * * @return $this */ - public function setDesc(?string $desc): static + public function setAnnValProRata(?string $annValProRata): static { - if (is_null($desc)) { - array_push($this->openAPINullablesSetToNull, 'desc'); + if (is_null($annValProRata)) { + array_push($this->openAPINullablesSetToNull, 'annValProRata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('desc', $nullablesSetToNull); + $index = array_search('annValProRata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['desc'] = $desc; + $this->container['annValProRata'] = $annValProRata; return $this; } /** - * Gets other + * Gets cashEquivOrRelevantAmt * * @return string|null */ - public function getOther(): ?string + public function getCashEquivOrRelevantAmt(): ?string { - return $this->container['other']; + return $this->container['cashEquivOrRelevantAmt']; } /** - * Sets other + * Sets cashEquivOrRelevantAmt * - * @param string|null $other other + * @param string|null $cashEquivOrRelevantAmt cashEquivOrRelevantAmt * * @return $this */ - public function setOther(?string $other): static + public function setCashEquivOrRelevantAmt(?string $cashEquivOrRelevantAmt): static { - if (is_null($other)) { - array_push($this->openAPINullablesSetToNull, 'other'); + if (is_null($cashEquivOrRelevantAmt)) { + array_push($this->openAPINullablesSetToNull, 'cashEquivOrRelevantAmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('other', $nullablesSetToNull); + $index = array_search('cashEquivOrRelevantAmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['other'] = $other; + $this->container['cashEquivOrRelevantAmt'] = $cashEquivOrRelevantAmt; return $this; } /** - * Gets annValProRata + * Gets costOrAmtForgone * * @return string|null */ - public function getAnnValProRata(): ?string + public function getCostOrAmtForgone(): ?string { - return $this->container['annValProRata']; + return $this->container['costOrAmtForgone']; } /** - * Sets annValProRata + * Sets costOrAmtForgone * - * @param string|null $annValProRata annValProRata + * @param string|null $costOrAmtForgone costOrAmtForgone * * @return $this */ - public function setAnnValProRata(?string $annValProRata): static + public function setCostOrAmtForgone(?string $costOrAmtForgone): static { - if (is_null($annValProRata)) { - array_push($this->openAPINullablesSetToNull, 'annValProRata'); + if (is_null($costOrAmtForgone)) { + array_push($this->openAPINullablesSetToNull, 'costOrAmtForgone'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('annValProRata', $nullablesSetToNull); + $index = array_search('costOrAmtForgone', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['annValProRata'] = $annValProRata; + $this->container['costOrAmtForgone'] = $costOrAmtForgone; return $this; } /** - * Gets grossOrAmtForgone + * Gets desc * * @return string|null */ - public function getGrossOrAmtForgone(): ?string + public function getDesc(): ?string { - return $this->container['grossOrAmtForgone']; + return $this->container['desc']; } /** - * Sets grossOrAmtForgone + * Sets desc * - * @param string|null $grossOrAmtForgone grossOrAmtForgone + * @param string|null $desc desc * * @return $this */ - public function setGrossOrAmtForgone(?string $grossOrAmtForgone): static + public function setDesc(?string $desc): static { - if (is_null($grossOrAmtForgone)) { - array_push($this->openAPINullablesSetToNull, 'grossOrAmtForgone'); + if (is_null($desc)) { + array_push($this->openAPINullablesSetToNull, 'desc'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('grossOrAmtForgone', $nullablesSetToNull); + $index = array_search('desc', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['grossOrAmtForgone'] = $grossOrAmtForgone; + $this->container['desc'] = $desc; return $this; } /** - * Gets costOrAmtForgone + * Gets grossOrAmtForgone * * @return string|null */ - public function getCostOrAmtForgone(): ?string + public function getGrossOrAmtForgone(): ?string { - return $this->container['costOrAmtForgone']; + return $this->container['grossOrAmtForgone']; } /** - * Sets costOrAmtForgone + * Sets grossOrAmtForgone * - * @param string|null $costOrAmtForgone costOrAmtForgone + * @param string|null $grossOrAmtForgone grossOrAmtForgone * * @return $this */ - public function setCostOrAmtForgone(?string $costOrAmtForgone): static + public function setGrossOrAmtForgone(?string $grossOrAmtForgone): static { - if (is_null($costOrAmtForgone)) { - array_push($this->openAPINullablesSetToNull, 'costOrAmtForgone'); + if (is_null($grossOrAmtForgone)) { + array_push($this->openAPINullablesSetToNull, 'grossOrAmtForgone'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costOrAmtForgone', $nullablesSetToNull); + $index = array_search('grossOrAmtForgone', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costOrAmtForgone'] = $costOrAmtForgone; + $this->container['grossOrAmtForgone'] = $grossOrAmtForgone; return $this; } @@ -535,35 +535,35 @@ public function setMadeGood(?string $madeGood): static } /** - * Gets cashEquivOrRelevantAmt + * Gets other * * @return string|null */ - public function getCashEquivOrRelevantAmt(): ?string + public function getOther(): ?string { - return $this->container['cashEquivOrRelevantAmt']; + return $this->container['other']; } /** - * Sets cashEquivOrRelevantAmt + * Sets other * - * @param string|null $cashEquivOrRelevantAmt cashEquivOrRelevantAmt + * @param string|null $other other * * @return $this */ - public function setCashEquivOrRelevantAmt(?string $cashEquivOrRelevantAmt): static + public function setOther(?string $other): static { - if (is_null($cashEquivOrRelevantAmt)) { - array_push($this->openAPINullablesSetToNull, 'cashEquivOrRelevantAmt'); + if (is_null($other)) { + array_push($this->openAPINullablesSetToNull, 'other'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cashEquivOrRelevantAmt', $nullablesSetToNull); + $index = array_search('other', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cashEquivOrRelevantAmt'] = $cashEquivOrRelevantAmt; + $this->container['other'] = $other; return $this; } diff --git a/src/Model/P11DLoan.php b/src/Model/P11DLoan.php index 13a050e..3ac2bb4 100644 --- a/src/Model/P11DLoan.php +++ b/src/Model/P11DLoan.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class P11DLoan implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'joint' => 'string', - 'initOS' => 'string', - 'finalOS' => 'string', - 'maxOS' => 'string', - 'intPaid' => 'string', + 'cashEquivOrRelevantAmt' => 'string', 'date' => 'string', 'discharge' => 'string', - 'cashEquivOrRelevantAmt' => 'string' + 'finalOS' => 'string', + 'initOS' => 'string', + 'intPaid' => 'string', + 'joint' => 'string', + 'maxOS' => 'string' ]; /** @@ -75,14 +75,14 @@ class P11DLoan implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'joint' => null, - 'initOS' => null, - 'finalOS' => null, - 'maxOS' => null, - 'intPaid' => null, + 'cashEquivOrRelevantAmt' => null, 'date' => null, 'discharge' => null, - 'cashEquivOrRelevantAmt' => null + 'finalOS' => null, + 'initOS' => null, + 'intPaid' => null, + 'joint' => null, + 'maxOS' => null ]; /** @@ -91,14 +91,14 @@ class P11DLoan implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'joint' => true, - 'initOS' => true, - 'finalOS' => true, - 'maxOS' => true, - 'intPaid' => true, + 'cashEquivOrRelevantAmt' => true, 'date' => true, 'discharge' => true, - 'cashEquivOrRelevantAmt' => true + 'finalOS' => true, + 'initOS' => true, + 'intPaid' => true, + 'joint' => true, + 'maxOS' => true ]; /** @@ -187,14 +187,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'joint' => 'joint', - 'initOS' => 'initOS', - 'finalOS' => 'finalOS', - 'maxOS' => 'maxOS', - 'intPaid' => 'intPaid', + 'cashEquivOrRelevantAmt' => 'cashEquivOrRelevantAmt', 'date' => 'date', 'discharge' => 'discharge', - 'cashEquivOrRelevantAmt' => 'cashEquivOrRelevantAmt' + 'finalOS' => 'finalOS', + 'initOS' => 'initOS', + 'intPaid' => 'intPaid', + 'joint' => 'joint', + 'maxOS' => 'maxOS' ]; /** @@ -203,14 +203,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'joint' => 'setJoint', - 'initOS' => 'setInitOS', - 'finalOS' => 'setFinalOS', - 'maxOS' => 'setMaxOS', - 'intPaid' => 'setIntPaid', + 'cashEquivOrRelevantAmt' => 'setCashEquivOrRelevantAmt', 'date' => 'setDate', 'discharge' => 'setDischarge', - 'cashEquivOrRelevantAmt' => 'setCashEquivOrRelevantAmt' + 'finalOS' => 'setFinalOS', + 'initOS' => 'setInitOS', + 'intPaid' => 'setIntPaid', + 'joint' => 'setJoint', + 'maxOS' => 'setMaxOS' ]; /** @@ -219,14 +219,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'joint' => 'getJoint', - 'initOS' => 'getInitOS', - 'finalOS' => 'getFinalOS', - 'maxOS' => 'getMaxOS', - 'intPaid' => 'getIntPaid', + 'cashEquivOrRelevantAmt' => 'getCashEquivOrRelevantAmt', 'date' => 'getDate', 'discharge' => 'getDischarge', - 'cashEquivOrRelevantAmt' => 'getCashEquivOrRelevantAmt' + 'finalOS' => 'getFinalOS', + 'initOS' => 'getInitOS', + 'intPaid' => 'getIntPaid', + 'joint' => 'getJoint', + 'maxOS' => 'getMaxOS' ]; /** @@ -285,14 +285,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('joint', $data ?? [], null); - $this->setIfExists('initOS', $data ?? [], null); - $this->setIfExists('finalOS', $data ?? [], null); - $this->setIfExists('maxOS', $data ?? [], null); - $this->setIfExists('intPaid', $data ?? [], null); + $this->setIfExists('cashEquivOrRelevantAmt', $data ?? [], null); $this->setIfExists('date', $data ?? [], null); $this->setIfExists('discharge', $data ?? [], null); - $this->setIfExists('cashEquivOrRelevantAmt', $data ?? [], null); + $this->setIfExists('finalOS', $data ?? [], null); + $this->setIfExists('initOS', $data ?? [], null); + $this->setIfExists('intPaid', $data ?? [], null); + $this->setIfExists('joint', $data ?? [], null); + $this->setIfExists('maxOS', $data ?? [], null); } /** @@ -338,273 +338,273 @@ public function valid(): bool /** - * Gets joint + * Gets cashEquivOrRelevantAmt * * @return string|null */ - public function getJoint(): ?string + public function getCashEquivOrRelevantAmt(): ?string { - return $this->container['joint']; + return $this->container['cashEquivOrRelevantAmt']; } /** - * Sets joint + * Sets cashEquivOrRelevantAmt * - * @param string|null $joint joint + * @param string|null $cashEquivOrRelevantAmt cashEquivOrRelevantAmt * * @return $this */ - public function setJoint(?string $joint): static + public function setCashEquivOrRelevantAmt(?string $cashEquivOrRelevantAmt): static { - if (is_null($joint)) { - array_push($this->openAPINullablesSetToNull, 'joint'); + if (is_null($cashEquivOrRelevantAmt)) { + array_push($this->openAPINullablesSetToNull, 'cashEquivOrRelevantAmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('joint', $nullablesSetToNull); + $index = array_search('cashEquivOrRelevantAmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['joint'] = $joint; + $this->container['cashEquivOrRelevantAmt'] = $cashEquivOrRelevantAmt; return $this; } /** - * Gets initOS + * Gets date * * @return string|null */ - public function getInitOS(): ?string + public function getDate(): ?string { - return $this->container['initOS']; + return $this->container['date']; } /** - * Sets initOS + * Sets date * - * @param string|null $initOS initOS + * @param string|null $date date * * @return $this */ - public function setInitOS(?string $initOS): static + public function setDate(?string $date): static { - if (is_null($initOS)) { - array_push($this->openAPINullablesSetToNull, 'initOS'); + if (is_null($date)) { + array_push($this->openAPINullablesSetToNull, 'date'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('initOS', $nullablesSetToNull); + $index = array_search('date', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['initOS'] = $initOS; + $this->container['date'] = $date; return $this; } /** - * Gets finalOS + * Gets discharge * * @return string|null */ - public function getFinalOS(): ?string + public function getDischarge(): ?string { - return $this->container['finalOS']; + return $this->container['discharge']; } /** - * Sets finalOS + * Sets discharge * - * @param string|null $finalOS finalOS + * @param string|null $discharge discharge * * @return $this */ - public function setFinalOS(?string $finalOS): static + public function setDischarge(?string $discharge): static { - if (is_null($finalOS)) { - array_push($this->openAPINullablesSetToNull, 'finalOS'); + if (is_null($discharge)) { + array_push($this->openAPINullablesSetToNull, 'discharge'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('finalOS', $nullablesSetToNull); + $index = array_search('discharge', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['finalOS'] = $finalOS; + $this->container['discharge'] = $discharge; return $this; } /** - * Gets maxOS + * Gets finalOS * * @return string|null */ - public function getMaxOS(): ?string + public function getFinalOS(): ?string { - return $this->container['maxOS']; + return $this->container['finalOS']; } /** - * Sets maxOS + * Sets finalOS * - * @param string|null $maxOS maxOS + * @param string|null $finalOS finalOS * * @return $this */ - public function setMaxOS(?string $maxOS): static + public function setFinalOS(?string $finalOS): static { - if (is_null($maxOS)) { - array_push($this->openAPINullablesSetToNull, 'maxOS'); + if (is_null($finalOS)) { + array_push($this->openAPINullablesSetToNull, 'finalOS'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('maxOS', $nullablesSetToNull); + $index = array_search('finalOS', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['maxOS'] = $maxOS; + $this->container['finalOS'] = $finalOS; return $this; } /** - * Gets intPaid + * Gets initOS * * @return string|null */ - public function getIntPaid(): ?string + public function getInitOS(): ?string { - return $this->container['intPaid']; + return $this->container['initOS']; } /** - * Sets intPaid + * Sets initOS * - * @param string|null $intPaid intPaid + * @param string|null $initOS initOS * * @return $this */ - public function setIntPaid(?string $intPaid): static + public function setInitOS(?string $initOS): static { - if (is_null($intPaid)) { - array_push($this->openAPINullablesSetToNull, 'intPaid'); + if (is_null($initOS)) { + array_push($this->openAPINullablesSetToNull, 'initOS'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('intPaid', $nullablesSetToNull); + $index = array_search('initOS', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['intPaid'] = $intPaid; + $this->container['initOS'] = $initOS; return $this; } /** - * Gets date + * Gets intPaid * * @return string|null */ - public function getDate(): ?string + public function getIntPaid(): ?string { - return $this->container['date']; + return $this->container['intPaid']; } /** - * Sets date + * Sets intPaid * - * @param string|null $date date + * @param string|null $intPaid intPaid * * @return $this */ - public function setDate(?string $date): static + public function setIntPaid(?string $intPaid): static { - if (is_null($date)) { - array_push($this->openAPINullablesSetToNull, 'date'); + if (is_null($intPaid)) { + array_push($this->openAPINullablesSetToNull, 'intPaid'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('date', $nullablesSetToNull); + $index = array_search('intPaid', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['date'] = $date; + $this->container['intPaid'] = $intPaid; return $this; } /** - * Gets discharge + * Gets joint * * @return string|null */ - public function getDischarge(): ?string + public function getJoint(): ?string { - return $this->container['discharge']; + return $this->container['joint']; } /** - * Sets discharge + * Sets joint * - * @param string|null $discharge discharge + * @param string|null $joint joint * * @return $this */ - public function setDischarge(?string $discharge): static + public function setJoint(?string $joint): static { - if (is_null($discharge)) { - array_push($this->openAPINullablesSetToNull, 'discharge'); + if (is_null($joint)) { + array_push($this->openAPINullablesSetToNull, 'joint'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('discharge', $nullablesSetToNull); + $index = array_search('joint', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['discharge'] = $discharge; + $this->container['joint'] = $joint; return $this; } /** - * Gets cashEquivOrRelevantAmt + * Gets maxOS * * @return string|null */ - public function getCashEquivOrRelevantAmt(): ?string + public function getMaxOS(): ?string { - return $this->container['cashEquivOrRelevantAmt']; + return $this->container['maxOS']; } /** - * Sets cashEquivOrRelevantAmt + * Sets maxOS * - * @param string|null $cashEquivOrRelevantAmt cashEquivOrRelevantAmt + * @param string|null $maxOS maxOS * * @return $this */ - public function setCashEquivOrRelevantAmt(?string $cashEquivOrRelevantAmt): static + public function setMaxOS(?string $maxOS): static { - if (is_null($cashEquivOrRelevantAmt)) { - array_push($this->openAPINullablesSetToNull, 'cashEquivOrRelevantAmt'); + if (is_null($maxOS)) { + array_push($this->openAPINullablesSetToNull, 'maxOS'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cashEquivOrRelevantAmt', $nullablesSetToNull); + $index = array_search('maxOS', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cashEquivOrRelevantAmt'] = $cashEquivOrRelevantAmt; + $this->container['maxOS'] = $maxOS; return $this; } diff --git a/src/Model/P11DLoanCollection.php b/src/Model/P11DLoanCollection.php index 199cad2..af2ed12 100644 --- a/src/Model/P11DLoanCollection.php +++ b/src/Model/P11DLoanCollection.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/P11DOther.php b/src/Model/P11DOther.php index 8f24d1f..dd884a3 100644 --- a/src/Model/P11DOther.php +++ b/src/Model/P11DOther.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/P11DPaymentCollection.php b/src/Model/P11DPaymentCollection.php index 5c9ab06..282d53f 100644 --- a/src/Model/P11DPaymentCollection.php +++ b/src/Model/P11DPaymentCollection.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/P11DSingleItem.php b/src/Model/P11DSingleItem.php index 529e9b1..e83a84b 100644 --- a/src/Model/P11DSingleItem.php +++ b/src/Model/P11DSingleItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,18 +59,18 @@ class P11DSingleItem implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'typeLetter' => 'string', - 'taxablePmt' => 'string', - 'excess' => 'string', - 'taxablePmtOrRelevantAmt' => 'string', - 'tradingOrgInd' => 'string', - 'desc' => 'string', - 'other' => 'string', 'annValProRata' => 'string', - 'grossOrAmtForgone' => 'string', + 'cashEquivOrRelevantAmt' => 'string', 'costOrAmtForgone' => 'string', + 'desc' => 'string', + 'excess' => 'string', + 'grossOrAmtForgone' => 'string', 'madeGood' => 'string', - 'cashEquivOrRelevantAmt' => 'string' + 'other' => 'string', + 'taxablePmt' => 'string', + 'taxablePmtOrRelevantAmt' => 'string', + 'tradingOrgInd' => 'string', + 'typeLetter' => 'string' ]; /** @@ -79,18 +79,18 @@ class P11DSingleItem implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'typeLetter' => null, - 'taxablePmt' => null, - 'excess' => null, - 'taxablePmtOrRelevantAmt' => null, - 'tradingOrgInd' => null, - 'desc' => null, - 'other' => null, 'annValProRata' => null, - 'grossOrAmtForgone' => null, + 'cashEquivOrRelevantAmt' => null, 'costOrAmtForgone' => null, + 'desc' => null, + 'excess' => null, + 'grossOrAmtForgone' => null, 'madeGood' => null, - 'cashEquivOrRelevantAmt' => null + 'other' => null, + 'taxablePmt' => null, + 'taxablePmtOrRelevantAmt' => null, + 'tradingOrgInd' => null, + 'typeLetter' => null ]; /** @@ -99,18 +99,18 @@ class P11DSingleItem implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'typeLetter' => true, - 'taxablePmt' => true, - 'excess' => true, - 'taxablePmtOrRelevantAmt' => true, - 'tradingOrgInd' => true, - 'desc' => true, - 'other' => true, 'annValProRata' => true, - 'grossOrAmtForgone' => true, + 'cashEquivOrRelevantAmt' => true, 'costOrAmtForgone' => true, + 'desc' => true, + 'excess' => true, + 'grossOrAmtForgone' => true, 'madeGood' => true, - 'cashEquivOrRelevantAmt' => true + 'other' => true, + 'taxablePmt' => true, + 'taxablePmtOrRelevantAmt' => true, + 'tradingOrgInd' => true, + 'typeLetter' => true ]; /** @@ -199,18 +199,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'typeLetter' => 'typeLetter', - 'taxablePmt' => 'taxablePmt', - 'excess' => 'excess', - 'taxablePmtOrRelevantAmt' => 'taxablePmtOrRelevantAmt', - 'tradingOrgInd' => 'tradingOrgInd', - 'desc' => 'desc', - 'other' => 'other', 'annValProRata' => 'annValProRata', - 'grossOrAmtForgone' => 'grossOrAmtForgone', + 'cashEquivOrRelevantAmt' => 'cashEquivOrRelevantAmt', 'costOrAmtForgone' => 'costOrAmtForgone', + 'desc' => 'desc', + 'excess' => 'excess', + 'grossOrAmtForgone' => 'grossOrAmtForgone', 'madeGood' => 'madeGood', - 'cashEquivOrRelevantAmt' => 'cashEquivOrRelevantAmt' + 'other' => 'other', + 'taxablePmt' => 'taxablePmt', + 'taxablePmtOrRelevantAmt' => 'taxablePmtOrRelevantAmt', + 'tradingOrgInd' => 'tradingOrgInd', + 'typeLetter' => 'typeLetter' ]; /** @@ -219,18 +219,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'typeLetter' => 'setTypeLetter', - 'taxablePmt' => 'setTaxablePmt', - 'excess' => 'setExcess', - 'taxablePmtOrRelevantAmt' => 'setTaxablePmtOrRelevantAmt', - 'tradingOrgInd' => 'setTradingOrgInd', - 'desc' => 'setDesc', - 'other' => 'setOther', 'annValProRata' => 'setAnnValProRata', - 'grossOrAmtForgone' => 'setGrossOrAmtForgone', + 'cashEquivOrRelevantAmt' => 'setCashEquivOrRelevantAmt', 'costOrAmtForgone' => 'setCostOrAmtForgone', + 'desc' => 'setDesc', + 'excess' => 'setExcess', + 'grossOrAmtForgone' => 'setGrossOrAmtForgone', 'madeGood' => 'setMadeGood', - 'cashEquivOrRelevantAmt' => 'setCashEquivOrRelevantAmt' + 'other' => 'setOther', + 'taxablePmt' => 'setTaxablePmt', + 'taxablePmtOrRelevantAmt' => 'setTaxablePmtOrRelevantAmt', + 'tradingOrgInd' => 'setTradingOrgInd', + 'typeLetter' => 'setTypeLetter' ]; /** @@ -239,18 +239,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'typeLetter' => 'getTypeLetter', - 'taxablePmt' => 'getTaxablePmt', - 'excess' => 'getExcess', - 'taxablePmtOrRelevantAmt' => 'getTaxablePmtOrRelevantAmt', - 'tradingOrgInd' => 'getTradingOrgInd', - 'desc' => 'getDesc', - 'other' => 'getOther', 'annValProRata' => 'getAnnValProRata', - 'grossOrAmtForgone' => 'getGrossOrAmtForgone', + 'cashEquivOrRelevantAmt' => 'getCashEquivOrRelevantAmt', 'costOrAmtForgone' => 'getCostOrAmtForgone', + 'desc' => 'getDesc', + 'excess' => 'getExcess', + 'grossOrAmtForgone' => 'getGrossOrAmtForgone', 'madeGood' => 'getMadeGood', - 'cashEquivOrRelevantAmt' => 'getCashEquivOrRelevantAmt' + 'other' => 'getOther', + 'taxablePmt' => 'getTaxablePmt', + 'taxablePmtOrRelevantAmt' => 'getTaxablePmtOrRelevantAmt', + 'tradingOrgInd' => 'getTradingOrgInd', + 'typeLetter' => 'getTypeLetter' ]; /** @@ -309,18 +309,18 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('typeLetter', $data ?? [], null); - $this->setIfExists('taxablePmt', $data ?? [], null); - $this->setIfExists('excess', $data ?? [], null); - $this->setIfExists('taxablePmtOrRelevantAmt', $data ?? [], null); - $this->setIfExists('tradingOrgInd', $data ?? [], null); - $this->setIfExists('desc', $data ?? [], null); - $this->setIfExists('other', $data ?? [], null); $this->setIfExists('annValProRata', $data ?? [], null); - $this->setIfExists('grossOrAmtForgone', $data ?? [], null); + $this->setIfExists('cashEquivOrRelevantAmt', $data ?? [], null); $this->setIfExists('costOrAmtForgone', $data ?? [], null); + $this->setIfExists('desc', $data ?? [], null); + $this->setIfExists('excess', $data ?? [], null); + $this->setIfExists('grossOrAmtForgone', $data ?? [], null); $this->setIfExists('madeGood', $data ?? [], null); - $this->setIfExists('cashEquivOrRelevantAmt', $data ?? [], null); + $this->setIfExists('other', $data ?? [], null); + $this->setIfExists('taxablePmt', $data ?? [], null); + $this->setIfExists('taxablePmtOrRelevantAmt', $data ?? [], null); + $this->setIfExists('tradingOrgInd', $data ?? [], null); + $this->setIfExists('typeLetter', $data ?? [], null); } /** @@ -366,409 +366,409 @@ public function valid(): bool /** - * Gets typeLetter + * Gets annValProRata * * @return string|null */ - public function getTypeLetter(): ?string + public function getAnnValProRata(): ?string { - return $this->container['typeLetter']; + return $this->container['annValProRata']; } /** - * Sets typeLetter + * Sets annValProRata * - * @param string|null $typeLetter typeLetter + * @param string|null $annValProRata annValProRata * * @return $this */ - public function setTypeLetter(?string $typeLetter): static + public function setAnnValProRata(?string $annValProRata): static { - if (is_null($typeLetter)) { - array_push($this->openAPINullablesSetToNull, 'typeLetter'); + if (is_null($annValProRata)) { + array_push($this->openAPINullablesSetToNull, 'annValProRata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('typeLetter', $nullablesSetToNull); + $index = array_search('annValProRata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['typeLetter'] = $typeLetter; + $this->container['annValProRata'] = $annValProRata; return $this; } /** - * Gets taxablePmt + * Gets cashEquivOrRelevantAmt * * @return string|null */ - public function getTaxablePmt(): ?string + public function getCashEquivOrRelevantAmt(): ?string { - return $this->container['taxablePmt']; + return $this->container['cashEquivOrRelevantAmt']; } /** - * Sets taxablePmt + * Sets cashEquivOrRelevantAmt * - * @param string|null $taxablePmt taxablePmt + * @param string|null $cashEquivOrRelevantAmt cashEquivOrRelevantAmt * * @return $this */ - public function setTaxablePmt(?string $taxablePmt): static + public function setCashEquivOrRelevantAmt(?string $cashEquivOrRelevantAmt): static { - if (is_null($taxablePmt)) { - array_push($this->openAPINullablesSetToNull, 'taxablePmt'); + if (is_null($cashEquivOrRelevantAmt)) { + array_push($this->openAPINullablesSetToNull, 'cashEquivOrRelevantAmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxablePmt', $nullablesSetToNull); + $index = array_search('cashEquivOrRelevantAmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxablePmt'] = $taxablePmt; + $this->container['cashEquivOrRelevantAmt'] = $cashEquivOrRelevantAmt; return $this; } /** - * Gets excess + * Gets costOrAmtForgone * * @return string|null */ - public function getExcess(): ?string + public function getCostOrAmtForgone(): ?string { - return $this->container['excess']; + return $this->container['costOrAmtForgone']; } /** - * Sets excess + * Sets costOrAmtForgone * - * @param string|null $excess excess + * @param string|null $costOrAmtForgone costOrAmtForgone * * @return $this */ - public function setExcess(?string $excess): static + public function setCostOrAmtForgone(?string $costOrAmtForgone): static { - if (is_null($excess)) { - array_push($this->openAPINullablesSetToNull, 'excess'); + if (is_null($costOrAmtForgone)) { + array_push($this->openAPINullablesSetToNull, 'costOrAmtForgone'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('excess', $nullablesSetToNull); + $index = array_search('costOrAmtForgone', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['excess'] = $excess; + $this->container['costOrAmtForgone'] = $costOrAmtForgone; return $this; } /** - * Gets taxablePmtOrRelevantAmt + * Gets desc * * @return string|null */ - public function getTaxablePmtOrRelevantAmt(): ?string + public function getDesc(): ?string { - return $this->container['taxablePmtOrRelevantAmt']; + return $this->container['desc']; } /** - * Sets taxablePmtOrRelevantAmt + * Sets desc * - * @param string|null $taxablePmtOrRelevantAmt taxablePmtOrRelevantAmt + * @param string|null $desc desc * * @return $this */ - public function setTaxablePmtOrRelevantAmt(?string $taxablePmtOrRelevantAmt): static + public function setDesc(?string $desc): static { - if (is_null($taxablePmtOrRelevantAmt)) { - array_push($this->openAPINullablesSetToNull, 'taxablePmtOrRelevantAmt'); + if (is_null($desc)) { + array_push($this->openAPINullablesSetToNull, 'desc'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxablePmtOrRelevantAmt', $nullablesSetToNull); + $index = array_search('desc', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxablePmtOrRelevantAmt'] = $taxablePmtOrRelevantAmt; + $this->container['desc'] = $desc; return $this; } /** - * Gets tradingOrgInd + * Gets excess * * @return string|null */ - public function getTradingOrgInd(): ?string + public function getExcess(): ?string { - return $this->container['tradingOrgInd']; + return $this->container['excess']; } /** - * Sets tradingOrgInd + * Sets excess * - * @param string|null $tradingOrgInd tradingOrgInd + * @param string|null $excess excess * * @return $this */ - public function setTradingOrgInd(?string $tradingOrgInd): static + public function setExcess(?string $excess): static { - if (is_null($tradingOrgInd)) { - array_push($this->openAPINullablesSetToNull, 'tradingOrgInd'); + if (is_null($excess)) { + array_push($this->openAPINullablesSetToNull, 'excess'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tradingOrgInd', $nullablesSetToNull); + $index = array_search('excess', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tradingOrgInd'] = $tradingOrgInd; + $this->container['excess'] = $excess; return $this; } /** - * Gets desc + * Gets grossOrAmtForgone * * @return string|null */ - public function getDesc(): ?string + public function getGrossOrAmtForgone(): ?string { - return $this->container['desc']; + return $this->container['grossOrAmtForgone']; } /** - * Sets desc + * Sets grossOrAmtForgone * - * @param string|null $desc desc + * @param string|null $grossOrAmtForgone grossOrAmtForgone * * @return $this */ - public function setDesc(?string $desc): static + public function setGrossOrAmtForgone(?string $grossOrAmtForgone): static { - if (is_null($desc)) { - array_push($this->openAPINullablesSetToNull, 'desc'); + if (is_null($grossOrAmtForgone)) { + array_push($this->openAPINullablesSetToNull, 'grossOrAmtForgone'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('desc', $nullablesSetToNull); + $index = array_search('grossOrAmtForgone', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['desc'] = $desc; + $this->container['grossOrAmtForgone'] = $grossOrAmtForgone; return $this; } /** - * Gets other + * Gets madeGood * * @return string|null */ - public function getOther(): ?string + public function getMadeGood(): ?string { - return $this->container['other']; + return $this->container['madeGood']; } /** - * Sets other + * Sets madeGood * - * @param string|null $other other + * @param string|null $madeGood madeGood * * @return $this */ - public function setOther(?string $other): static + public function setMadeGood(?string $madeGood): static { - if (is_null($other)) { - array_push($this->openAPINullablesSetToNull, 'other'); + if (is_null($madeGood)) { + array_push($this->openAPINullablesSetToNull, 'madeGood'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('other', $nullablesSetToNull); + $index = array_search('madeGood', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['other'] = $other; + $this->container['madeGood'] = $madeGood; return $this; } /** - * Gets annValProRata + * Gets other * * @return string|null */ - public function getAnnValProRata(): ?string + public function getOther(): ?string { - return $this->container['annValProRata']; + return $this->container['other']; } /** - * Sets annValProRata + * Sets other * - * @param string|null $annValProRata annValProRata + * @param string|null $other other * * @return $this */ - public function setAnnValProRata(?string $annValProRata): static + public function setOther(?string $other): static { - if (is_null($annValProRata)) { - array_push($this->openAPINullablesSetToNull, 'annValProRata'); + if (is_null($other)) { + array_push($this->openAPINullablesSetToNull, 'other'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('annValProRata', $nullablesSetToNull); + $index = array_search('other', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['annValProRata'] = $annValProRata; + $this->container['other'] = $other; return $this; } /** - * Gets grossOrAmtForgone + * Gets taxablePmt * * @return string|null */ - public function getGrossOrAmtForgone(): ?string + public function getTaxablePmt(): ?string { - return $this->container['grossOrAmtForgone']; + return $this->container['taxablePmt']; } /** - * Sets grossOrAmtForgone + * Sets taxablePmt * - * @param string|null $grossOrAmtForgone grossOrAmtForgone + * @param string|null $taxablePmt taxablePmt * * @return $this */ - public function setGrossOrAmtForgone(?string $grossOrAmtForgone): static + public function setTaxablePmt(?string $taxablePmt): static { - if (is_null($grossOrAmtForgone)) { - array_push($this->openAPINullablesSetToNull, 'grossOrAmtForgone'); + if (is_null($taxablePmt)) { + array_push($this->openAPINullablesSetToNull, 'taxablePmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('grossOrAmtForgone', $nullablesSetToNull); + $index = array_search('taxablePmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['grossOrAmtForgone'] = $grossOrAmtForgone; + $this->container['taxablePmt'] = $taxablePmt; return $this; } /** - * Gets costOrAmtForgone + * Gets taxablePmtOrRelevantAmt * * @return string|null */ - public function getCostOrAmtForgone(): ?string + public function getTaxablePmtOrRelevantAmt(): ?string { - return $this->container['costOrAmtForgone']; + return $this->container['taxablePmtOrRelevantAmt']; } /** - * Sets costOrAmtForgone + * Sets taxablePmtOrRelevantAmt * - * @param string|null $costOrAmtForgone costOrAmtForgone + * @param string|null $taxablePmtOrRelevantAmt taxablePmtOrRelevantAmt * * @return $this */ - public function setCostOrAmtForgone(?string $costOrAmtForgone): static + public function setTaxablePmtOrRelevantAmt(?string $taxablePmtOrRelevantAmt): static { - if (is_null($costOrAmtForgone)) { - array_push($this->openAPINullablesSetToNull, 'costOrAmtForgone'); + if (is_null($taxablePmtOrRelevantAmt)) { + array_push($this->openAPINullablesSetToNull, 'taxablePmtOrRelevantAmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costOrAmtForgone', $nullablesSetToNull); + $index = array_search('taxablePmtOrRelevantAmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costOrAmtForgone'] = $costOrAmtForgone; + $this->container['taxablePmtOrRelevantAmt'] = $taxablePmtOrRelevantAmt; return $this; } /** - * Gets madeGood + * Gets tradingOrgInd * * @return string|null */ - public function getMadeGood(): ?string + public function getTradingOrgInd(): ?string { - return $this->container['madeGood']; + return $this->container['tradingOrgInd']; } /** - * Sets madeGood + * Sets tradingOrgInd * - * @param string|null $madeGood madeGood + * @param string|null $tradingOrgInd tradingOrgInd * * @return $this */ - public function setMadeGood(?string $madeGood): static + public function setTradingOrgInd(?string $tradingOrgInd): static { - if (is_null($madeGood)) { - array_push($this->openAPINullablesSetToNull, 'madeGood'); + if (is_null($tradingOrgInd)) { + array_push($this->openAPINullablesSetToNull, 'tradingOrgInd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('madeGood', $nullablesSetToNull); + $index = array_search('tradingOrgInd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['madeGood'] = $madeGood; + $this->container['tradingOrgInd'] = $tradingOrgInd; return $this; } /** - * Gets cashEquivOrRelevantAmt + * Gets typeLetter * * @return string|null */ - public function getCashEquivOrRelevantAmt(): ?string + public function getTypeLetter(): ?string { - return $this->container['cashEquivOrRelevantAmt']; + return $this->container['typeLetter']; } /** - * Sets cashEquivOrRelevantAmt + * Sets typeLetter * - * @param string|null $cashEquivOrRelevantAmt cashEquivOrRelevantAmt + * @param string|null $typeLetter typeLetter * * @return $this */ - public function setCashEquivOrRelevantAmt(?string $cashEquivOrRelevantAmt): static + public function setTypeLetter(?string $typeLetter): static { - if (is_null($cashEquivOrRelevantAmt)) { - array_push($this->openAPINullablesSetToNull, 'cashEquivOrRelevantAmt'); + if (is_null($typeLetter)) { + array_push($this->openAPINullablesSetToNull, 'typeLetter'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cashEquivOrRelevantAmt', $nullablesSetToNull); + $index = array_search('typeLetter', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cashEquivOrRelevantAmt'] = $cashEquivOrRelevantAmt; + $this->container['typeLetter'] = $typeLetter; return $this; } diff --git a/src/Model/P11Detailed.php b/src/Model/P11Detailed.php index a13dc53..32cb72f 100644 --- a/src/Model/P11Detailed.php +++ b/src/Model/P11Detailed.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,29 +60,29 @@ class P11Detailed implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'dateOfBirth' => '\DateTime', 'employerName' => 'string', - 'payrollCode' => 'string', 'employerOfficeNo' => 'string', 'employerPayeRef' => 'string', 'firstname' => 'string', - 'middlename' => 'string', - 'surname' => 'string', - 'niNumber' => 'string', - 'taxCode' => 'string', - 'dateOfBirth' => '\DateTime', + 'isDirector' => 'bool', + 'isDraft' => 'bool', 'joinDate' => '\DateTime', 'leaveDate' => '\DateTime', - 'isDirector' => 'bool', + 'middlename' => 'string', 'niAndStatPaymentsLines' => '\SynergiTech\Staffology\Model\P11NiAndStatPaymentsLine[]', - 'totalsLine' => '\SynergiTech\Staffology\Model\P11NiAndStatPaymentsTotalsLine', + 'niNumber' => 'string', 'niSummary' => '\SynergiTech\Staffology\Model\P11DetailedNiValues[]', 'payeLines' => '\SynergiTech\Staffology\Model\P11PayeLine[]', - 'payeTotalsLine' => '\SynergiTech\Staffology\Model\P11PayeTotalsLine', 'payeSummary' => '\SynergiTech\Staffology\Model\P11PayeSummary', + 'payeTotalsLine' => '\SynergiTech\Staffology\Model\P11PayeTotalsLine', + 'payrollCode' => 'string', 'report' => '\SynergiTech\Staffology\Model\Report', + 'surname' => 'string', + 'taxCode' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'totalsLine' => '\SynergiTech\Staffology\Model\P11NiAndStatPaymentsTotalsLine' ]; /** @@ -91,29 +91,29 @@ class P11Detailed implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'dateOfBirth' => 'date', 'employerName' => null, - 'payrollCode' => null, 'employerOfficeNo' => null, 'employerPayeRef' => null, 'firstname' => null, - 'middlename' => null, - 'surname' => null, - 'niNumber' => null, - 'taxCode' => null, - 'dateOfBirth' => 'date', + 'isDirector' => null, + 'isDraft' => null, 'joinDate' => 'date', 'leaveDate' => 'date', - 'isDirector' => null, + 'middlename' => null, 'niAndStatPaymentsLines' => null, - 'totalsLine' => null, + 'niNumber' => null, 'niSummary' => null, 'payeLines' => null, - 'payeTotalsLine' => null, 'payeSummary' => null, + 'payeTotalsLine' => null, + 'payrollCode' => null, 'report' => null, + 'surname' => null, + 'taxCode' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'totalsLine' => null ]; /** @@ -122,29 +122,29 @@ class P11Detailed implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'dateOfBirth' => false, 'employerName' => true, - 'payrollCode' => true, 'employerOfficeNo' => true, 'employerPayeRef' => true, 'firstname' => true, - 'middlename' => true, - 'surname' => true, - 'niNumber' => true, - 'taxCode' => true, - 'dateOfBirth' => false, + 'isDirector' => false, + 'isDraft' => false, 'joinDate' => false, 'leaveDate' => true, - 'isDirector' => false, + 'middlename' => true, 'niAndStatPaymentsLines' => true, - 'totalsLine' => false, + 'niNumber' => true, 'niSummary' => true, 'payeLines' => true, - 'payeTotalsLine' => false, 'payeSummary' => false, + 'payeTotalsLine' => false, + 'payrollCode' => true, 'report' => false, + 'surname' => true, + 'taxCode' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'totalsLine' => false ]; /** @@ -233,29 +233,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'dateOfBirth' => 'dateOfBirth', 'employerName' => 'employerName', - 'payrollCode' => 'payrollCode', 'employerOfficeNo' => 'employerOfficeNo', 'employerPayeRef' => 'employerPayeRef', 'firstname' => 'firstname', - 'middlename' => 'middlename', - 'surname' => 'surname', - 'niNumber' => 'niNumber', - 'taxCode' => 'taxCode', - 'dateOfBirth' => 'dateOfBirth', + 'isDirector' => 'isDirector', + 'isDraft' => 'isDraft', 'joinDate' => 'joinDate', 'leaveDate' => 'leaveDate', - 'isDirector' => 'isDirector', + 'middlename' => 'middlename', 'niAndStatPaymentsLines' => 'niAndStatPaymentsLines', - 'totalsLine' => 'totalsLine', + 'niNumber' => 'niNumber', 'niSummary' => 'niSummary', 'payeLines' => 'payeLines', - 'payeTotalsLine' => 'payeTotalsLine', 'payeSummary' => 'payeSummary', + 'payeTotalsLine' => 'payeTotalsLine', + 'payrollCode' => 'payrollCode', 'report' => 'report', + 'surname' => 'surname', + 'taxCode' => 'taxCode', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'totalsLine' => 'totalsLine' ]; /** @@ -264,29 +264,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'dateOfBirth' => 'setDateOfBirth', 'employerName' => 'setEmployerName', - 'payrollCode' => 'setPayrollCode', 'employerOfficeNo' => 'setEmployerOfficeNo', 'employerPayeRef' => 'setEmployerPayeRef', 'firstname' => 'setFirstname', - 'middlename' => 'setMiddlename', - 'surname' => 'setSurname', - 'niNumber' => 'setNiNumber', - 'taxCode' => 'setTaxCode', - 'dateOfBirth' => 'setDateOfBirth', + 'isDirector' => 'setIsDirector', + 'isDraft' => 'setIsDraft', 'joinDate' => 'setJoinDate', 'leaveDate' => 'setLeaveDate', - 'isDirector' => 'setIsDirector', + 'middlename' => 'setMiddlename', 'niAndStatPaymentsLines' => 'setNiAndStatPaymentsLines', - 'totalsLine' => 'setTotalsLine', + 'niNumber' => 'setNiNumber', 'niSummary' => 'setNiSummary', 'payeLines' => 'setPayeLines', - 'payeTotalsLine' => 'setPayeTotalsLine', 'payeSummary' => 'setPayeSummary', + 'payeTotalsLine' => 'setPayeTotalsLine', + 'payrollCode' => 'setPayrollCode', 'report' => 'setReport', + 'surname' => 'setSurname', + 'taxCode' => 'setTaxCode', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'totalsLine' => 'setTotalsLine' ]; /** @@ -295,29 +295,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'dateOfBirth' => 'getDateOfBirth', 'employerName' => 'getEmployerName', - 'payrollCode' => 'getPayrollCode', 'employerOfficeNo' => 'getEmployerOfficeNo', 'employerPayeRef' => 'getEmployerPayeRef', 'firstname' => 'getFirstname', - 'middlename' => 'getMiddlename', - 'surname' => 'getSurname', - 'niNumber' => 'getNiNumber', - 'taxCode' => 'getTaxCode', - 'dateOfBirth' => 'getDateOfBirth', + 'isDirector' => 'getIsDirector', + 'isDraft' => 'getIsDraft', 'joinDate' => 'getJoinDate', 'leaveDate' => 'getLeaveDate', - 'isDirector' => 'getIsDirector', + 'middlename' => 'getMiddlename', 'niAndStatPaymentsLines' => 'getNiAndStatPaymentsLines', - 'totalsLine' => 'getTotalsLine', + 'niNumber' => 'getNiNumber', 'niSummary' => 'getNiSummary', 'payeLines' => 'getPayeLines', - 'payeTotalsLine' => 'getPayeTotalsLine', 'payeSummary' => 'getPayeSummary', + 'payeTotalsLine' => 'getPayeTotalsLine', + 'payrollCode' => 'getPayrollCode', 'report' => 'getReport', + 'surname' => 'getSurname', + 'taxCode' => 'getTaxCode', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'totalsLine' => 'getTotalsLine' ]; /** @@ -376,29 +376,29 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('dateOfBirth', $data ?? [], null); $this->setIfExists('employerName', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('employerOfficeNo', $data ?? [], null); $this->setIfExists('employerPayeRef', $data ?? [], null); $this->setIfExists('firstname', $data ?? [], null); - $this->setIfExists('middlename', $data ?? [], null); - $this->setIfExists('surname', $data ?? [], null); - $this->setIfExists('niNumber', $data ?? [], null); - $this->setIfExists('taxCode', $data ?? [], null); - $this->setIfExists('dateOfBirth', $data ?? [], null); + $this->setIfExists('isDirector', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('joinDate', $data ?? [], null); $this->setIfExists('leaveDate', $data ?? [], null); - $this->setIfExists('isDirector', $data ?? [], null); + $this->setIfExists('middlename', $data ?? [], null); $this->setIfExists('niAndStatPaymentsLines', $data ?? [], null); - $this->setIfExists('totalsLine', $data ?? [], null); + $this->setIfExists('niNumber', $data ?? [], null); $this->setIfExists('niSummary', $data ?? [], null); $this->setIfExists('payeLines', $data ?? [], null); - $this->setIfExists('payeTotalsLine', $data ?? [], null); $this->setIfExists('payeSummary', $data ?? [], null); + $this->setIfExists('payeTotalsLine', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('surname', $data ?? [], null); + $this->setIfExists('taxCode', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('totalsLine', $data ?? [], null); } /** @@ -444,69 +444,62 @@ public function valid(): bool /** - * Gets employerName + * Gets dateOfBirth * - * @return string|null + * @return \DateTime|null */ - public function getEmployerName(): ?string + public function getDateOfBirth(): ?\DateTime { - return $this->container['employerName']; + return $this->container['dateOfBirth']; } /** - * Sets employerName + * Sets dateOfBirth * - * @param string|null $employerName [readonly] + * @param \DateTime|null $dateOfBirth [readonly] * * @return $this */ - public function setEmployerName(?string $employerName): static + public function setDateOfBirth(?\DateTime $dateOfBirth): static { - if (is_null($employerName)) { - array_push($this->openAPINullablesSetToNull, 'employerName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($dateOfBirth)) { + throw new InvalidArgumentException('non-nullable dateOfBirth cannot be null'); } - $this->container['employerName'] = $employerName; + $this->container['dateOfBirth'] = $dateOfBirth; return $this; } /** - * Gets payrollCode + * Gets employerName * * @return string|null */ - public function getPayrollCode(): ?string + public function getEmployerName(): ?string { - return $this->container['payrollCode']; + return $this->container['employerName']; } /** - * Sets payrollCode + * Sets employerName * - * @param string|null $payrollCode [readonly] + * @param string|null $employerName [readonly] * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setEmployerName(?string $employerName): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); + if (is_null($employerName)) { + array_push($this->openAPINullablesSetToNull, 'employerName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); + $index = array_search('employerName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payrollCode'] = $payrollCode; + $this->container['employerName'] = $employerName; return $this; } @@ -614,164 +607,55 @@ public function setFirstname(?string $firstname): static } /** - * Gets middlename - * - * @return string|null - */ - public function getMiddlename(): ?string - { - return $this->container['middlename']; - } - - /** - * Sets middlename - * - * @param string|null $middlename [readonly] - * - * @return $this - */ - public function setMiddlename(?string $middlename): static - { - if (is_null($middlename)) { - array_push($this->openAPINullablesSetToNull, 'middlename'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('middlename', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['middlename'] = $middlename; - - return $this; - } - - /** - * Gets surname - * - * @return string|null - */ - public function getSurname(): ?string - { - return $this->container['surname']; - } - - /** - * Sets surname - * - * @param string|null $surname [readonly] - * - * @return $this - */ - public function setSurname(?string $surname): static - { - if (is_null($surname)) { - array_push($this->openAPINullablesSetToNull, 'surname'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('surname', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['surname'] = $surname; - - return $this; - } - - /** - * Gets niNumber - * - * @return string|null - */ - public function getNiNumber(): ?string - { - return $this->container['niNumber']; - } - - /** - * Sets niNumber - * - * @param string|null $niNumber [readonly] - * - * @return $this - */ - public function setNiNumber(?string $niNumber): static - { - if (is_null($niNumber)) { - array_push($this->openAPINullablesSetToNull, 'niNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['niNumber'] = $niNumber; - - return $this; - } - - /** - * Gets taxCode + * Gets isDirector * - * @return string|null + * @return bool|null */ - public function getTaxCode(): ?string + public function getIsDirector(): ?bool { - return $this->container['taxCode']; + return $this->container['isDirector']; } /** - * Sets taxCode + * Sets isDirector * - * @param string|null $taxCode [readonly] + * @param bool|null $isDirector [readonly] * * @return $this */ - public function setTaxCode(?string $taxCode): static + public function setIsDirector(?bool $isDirector): static { - if (is_null($taxCode)) { - array_push($this->openAPINullablesSetToNull, 'taxCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isDirector)) { + throw new InvalidArgumentException('non-nullable isDirector cannot be null'); } - $this->container['taxCode'] = $taxCode; + $this->container['isDirector'] = $isDirector; return $this; } /** - * Gets dateOfBirth + * Gets isDraft * - * @return \DateTime|null + * @return bool|null */ - public function getDateOfBirth(): ?\DateTime + public function getIsDraft(): ?bool { - return $this->container['dateOfBirth']; + return $this->container['isDraft']; } /** - * Sets dateOfBirth + * Sets isDraft * - * @param \DateTime|null $dateOfBirth [readonly] + * @param bool|null $isDraft isDraft * * @return $this */ - public function setDateOfBirth(?\DateTime $dateOfBirth): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($dateOfBirth)) { - throw new InvalidArgumentException('non-nullable dateOfBirth cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['dateOfBirth'] = $dateOfBirth; + $this->container['isDraft'] = $isDraft; return $this; } @@ -838,28 +722,35 @@ public function setLeaveDate(?\DateTime $leaveDate): static } /** - * Gets isDirector + * Gets middlename * - * @return bool|null + * @return string|null */ - public function getIsDirector(): ?bool + public function getMiddlename(): ?string { - return $this->container['isDirector']; + return $this->container['middlename']; } /** - * Sets isDirector + * Sets middlename * - * @param bool|null $isDirector [readonly] + * @param string|null $middlename [readonly] * * @return $this */ - public function setIsDirector(?bool $isDirector): static + public function setMiddlename(?string $middlename): static { - if (is_null($isDirector)) { - throw new InvalidArgumentException('non-nullable isDirector cannot be null'); + if (is_null($middlename)) { + array_push($this->openAPINullablesSetToNull, 'middlename'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('middlename', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDirector'] = $isDirector; + $this->container['middlename'] = $middlename; return $this; } @@ -899,28 +790,35 @@ public function setNiAndStatPaymentsLines(?array $niAndStatPaymentsLines): stati } /** - * Gets totalsLine + * Gets niNumber * - * @return \SynergiTech\Staffology\Model\P11NiAndStatPaymentsTotalsLine|null + * @return string|null */ - public function getTotalsLine(): ?\SynergiTech\Staffology\Model\P11NiAndStatPaymentsTotalsLine + public function getNiNumber(): ?string { - return $this->container['totalsLine']; + return $this->container['niNumber']; } /** - * Sets totalsLine + * Sets niNumber * - * @param \SynergiTech\Staffology\Model\P11NiAndStatPaymentsTotalsLine|null $totalsLine totalsLine + * @param string|null $niNumber [readonly] * * @return $this */ - public function setTotalsLine(?\SynergiTech\Staffology\Model\P11NiAndStatPaymentsTotalsLine $totalsLine): static + public function setNiNumber(?string $niNumber): static { - if (is_null($totalsLine)) { - throw new InvalidArgumentException('non-nullable totalsLine cannot be null'); + if (is_null($niNumber)) { + array_push($this->openAPINullablesSetToNull, 'niNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('niNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['totalsLine'] = $totalsLine; + $this->container['niNumber'] = $niNumber; return $this; } @@ -993,6 +891,33 @@ public function setPayeLines(?array $payeLines): static return $this; } + /** + * Gets payeSummary + * + * @return \SynergiTech\Staffology\Model\P11PayeSummary|null + */ + public function getPayeSummary(): ?\SynergiTech\Staffology\Model\P11PayeSummary + { + return $this->container['payeSummary']; + } + + /** + * Sets payeSummary + * + * @param \SynergiTech\Staffology\Model\P11PayeSummary|null $payeSummary payeSummary + * + * @return $this + */ + public function setPayeSummary(?\SynergiTech\Staffology\Model\P11PayeSummary $payeSummary): static + { + if (is_null($payeSummary)) { + throw new InvalidArgumentException('non-nullable payeSummary cannot be null'); + } + $this->container['payeSummary'] = $payeSummary; + + return $this; + } + /** * Gets payeTotalsLine * @@ -1021,28 +946,35 @@ public function setPayeTotalsLine(?\SynergiTech\Staffology\Model\P11PayeTotalsLi } /** - * Gets payeSummary + * Gets payrollCode * - * @return \SynergiTech\Staffology\Model\P11PayeSummary|null + * @return string|null */ - public function getPayeSummary(): ?\SynergiTech\Staffology\Model\P11PayeSummary + public function getPayrollCode(): ?string { - return $this->container['payeSummary']; + return $this->container['payrollCode']; } /** - * Sets payeSummary + * Sets payrollCode * - * @param \SynergiTech\Staffology\Model\P11PayeSummary|null $payeSummary payeSummary + * @param string|null $payrollCode [readonly] * * @return $this */ - public function setPayeSummary(?\SynergiTech\Staffology\Model\P11PayeSummary $payeSummary): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($payeSummary)) { - throw new InvalidArgumentException('non-nullable payeSummary cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payeSummary'] = $payeSummary; + $this->container['payrollCode'] = $payrollCode; return $this; } @@ -1074,6 +1006,74 @@ public function setReport(?\SynergiTech\Staffology\Model\Report $report): static return $this; } + /** + * Gets surname + * + * @return string|null + */ + public function getSurname(): ?string + { + return $this->container['surname']; + } + + /** + * Sets surname + * + * @param string|null $surname [readonly] + * + * @return $this + */ + public function setSurname(?string $surname): static + { + if (is_null($surname)) { + array_push($this->openAPINullablesSetToNull, 'surname'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('surname', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['surname'] = $surname; + + return $this; + } + + /** + * Gets taxCode + * + * @return string|null + */ + public function getTaxCode(): ?string + { + return $this->container['taxCode']; + } + + /** + * Sets taxCode + * + * @param string|null $taxCode [readonly] + * + * @return $this + */ + public function setTaxCode(?string $taxCode): static + { + if (is_null($taxCode)) { + array_push($this->openAPINullablesSetToNull, 'taxCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('taxCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['taxCode'] = $taxCode; + + return $this; + } + /** * Gets taxYear * @@ -1136,28 +1136,28 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets totalsLine * - * @return bool|null + * @return \SynergiTech\Staffology\Model\P11NiAndStatPaymentsTotalsLine|null */ - public function getIsDraft(): ?bool + public function getTotalsLine(): ?\SynergiTech\Staffology\Model\P11NiAndStatPaymentsTotalsLine { - return $this->container['isDraft']; + return $this->container['totalsLine']; } /** - * Sets isDraft + * Sets totalsLine * - * @param bool|null $isDraft isDraft + * @param \SynergiTech\Staffology\Model\P11NiAndStatPaymentsTotalsLine|null $totalsLine totalsLine * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setTotalsLine(?\SynergiTech\Staffology\Model\P11NiAndStatPaymentsTotalsLine $totalsLine): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($totalsLine)) { + throw new InvalidArgumentException('non-nullable totalsLine cannot be null'); } - $this->container['isDraft'] = $isDraft; + $this->container['totalsLine'] = $totalsLine; return $this; } diff --git a/src/Model/P11DetailedNiValues.php b/src/Model/P11DetailedNiValues.php index 87319a0..0f43c8e 100644 --- a/src/Model/P11DetailedNiValues.php +++ b/src/Model/P11DetailedNiValues.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,15 +60,15 @@ class P11DetailedNiValues implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ - 'table' => 'string', - 'earningsAtLel' => 'float', 'earningsAboveLelToPt' => 'float', 'earningsAbovePtToUap' => 'float', - 'earningsAboveUapToUel' => 'float', 'earningsAbovePtToUel' => 'float', + 'earningsAboveUapToUel' => 'float', + 'earningsAtLel' => 'float', + 'employeeAndEmployerNics' => 'float', 'employeeNics' => 'float', 'employerNics' => 'float', - 'employeeAndEmployerNics' => 'float' + 'table' => 'string' ]; /** @@ -77,15 +77,15 @@ class P11DetailedNiValues implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPIFormats = [ - 'table' => null, - 'earningsAtLel' => 'double', 'earningsAboveLelToPt' => 'double', 'earningsAbovePtToUap' => 'double', - 'earningsAboveUapToUel' => 'double', 'earningsAbovePtToUel' => 'double', + 'earningsAboveUapToUel' => 'double', + 'earningsAtLel' => 'double', + 'employeeAndEmployerNics' => 'double', 'employeeNics' => 'double', 'employerNics' => 'double', - 'employeeAndEmployerNics' => 'double' + 'table' => null ]; /** @@ -94,15 +94,15 @@ class P11DetailedNiValues implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPINullables = [ - 'table' => true, - 'earningsAtLel' => false, 'earningsAboveLelToPt' => false, 'earningsAbovePtToUap' => false, - 'earningsAboveUapToUel' => false, 'earningsAbovePtToUel' => false, + 'earningsAboveUapToUel' => false, + 'earningsAtLel' => false, + 'employeeAndEmployerNics' => false, 'employeeNics' => false, 'employerNics' => false, - 'employeeAndEmployerNics' => false + 'table' => true ]; /** @@ -191,15 +191,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'table' => 'table', - 'earningsAtLel' => 'earningsAtLel', 'earningsAboveLelToPt' => 'earningsAboveLelToPt', 'earningsAbovePtToUap' => 'earningsAbovePtToUap', - 'earningsAboveUapToUel' => 'earningsAboveUapToUel', 'earningsAbovePtToUel' => 'earningsAbovePtToUel', + 'earningsAboveUapToUel' => 'earningsAboveUapToUel', + 'earningsAtLel' => 'earningsAtLel', + 'employeeAndEmployerNics' => 'employeeAndEmployerNics', 'employeeNics' => 'employeeNics', 'employerNics' => 'employerNics', - 'employeeAndEmployerNics' => 'employeeAndEmployerNics' + 'table' => 'table' ]; /** @@ -208,15 +208,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'table' => 'setTable', - 'earningsAtLel' => 'setEarningsAtLel', 'earningsAboveLelToPt' => 'setEarningsAboveLelToPt', 'earningsAbovePtToUap' => 'setEarningsAbovePtToUap', - 'earningsAboveUapToUel' => 'setEarningsAboveUapToUel', 'earningsAbovePtToUel' => 'setEarningsAbovePtToUel', + 'earningsAboveUapToUel' => 'setEarningsAboveUapToUel', + 'earningsAtLel' => 'setEarningsAtLel', + 'employeeAndEmployerNics' => 'setEmployeeAndEmployerNics', 'employeeNics' => 'setEmployeeNics', 'employerNics' => 'setEmployerNics', - 'employeeAndEmployerNics' => 'setEmployeeAndEmployerNics' + 'table' => 'setTable' ]; /** @@ -225,15 +225,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'table' => 'getTable', - 'earningsAtLel' => 'getEarningsAtLel', 'earningsAboveLelToPt' => 'getEarningsAboveLelToPt', 'earningsAbovePtToUap' => 'getEarningsAbovePtToUap', - 'earningsAboveUapToUel' => 'getEarningsAboveUapToUel', 'earningsAbovePtToUel' => 'getEarningsAbovePtToUel', + 'earningsAboveUapToUel' => 'getEarningsAboveUapToUel', + 'earningsAtLel' => 'getEarningsAtLel', + 'employeeAndEmployerNics' => 'getEmployeeAndEmployerNics', 'employeeNics' => 'getEmployeeNics', 'employerNics' => 'getEmployerNics', - 'employeeAndEmployerNics' => 'getEmployeeAndEmployerNics' + 'table' => 'getTable' ]; /** @@ -292,15 +292,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('table', $data ?? [], null); - $this->setIfExists('earningsAtLel', $data ?? [], null); $this->setIfExists('earningsAboveLelToPt', $data ?? [], null); $this->setIfExists('earningsAbovePtToUap', $data ?? [], null); - $this->setIfExists('earningsAboveUapToUel', $data ?? [], null); $this->setIfExists('earningsAbovePtToUel', $data ?? [], null); + $this->setIfExists('earningsAboveUapToUel', $data ?? [], null); + $this->setIfExists('earningsAtLel', $data ?? [], null); + $this->setIfExists('employeeAndEmployerNics', $data ?? [], null); $this->setIfExists('employeeNics', $data ?? [], null); $this->setIfExists('employerNics', $data ?? [], null); - $this->setIfExists('employeeAndEmployerNics', $data ?? [], null); + $this->setIfExists('table', $data ?? [], null); } /** @@ -346,170 +346,163 @@ public function valid(): bool /** - * Gets table + * Gets earningsAboveLelToPt * - * @return string|null + * @return float|null */ - public function getTable(): ?string + public function getEarningsAboveLelToPt(): ?float { - return $this->container['table']; + return $this->container['earningsAboveLelToPt']; } /** - * Sets table + * Sets earningsAboveLelToPt * - * @param string|null $table [readonly] + * @param float|null $earningsAboveLelToPt [readonly] * * @return $this */ - public function setTable(?string $table): static + public function setEarningsAboveLelToPt(?float $earningsAboveLelToPt): static { - if (is_null($table)) { - array_push($this->openAPINullablesSetToNull, 'table'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('table', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($earningsAboveLelToPt)) { + throw new InvalidArgumentException('non-nullable earningsAboveLelToPt cannot be null'); } - $this->container['table'] = $table; + $this->container['earningsAboveLelToPt'] = $earningsAboveLelToPt; return $this; } /** - * Gets earningsAtLel + * Gets earningsAbovePtToUap * * @return float|null */ - public function getEarningsAtLel(): ?float + public function getEarningsAbovePtToUap(): ?float { - return $this->container['earningsAtLel']; + return $this->container['earningsAbovePtToUap']; } /** - * Sets earningsAtLel + * Sets earningsAbovePtToUap * - * @param float|null $earningsAtLel [readonly] + * @param float|null $earningsAbovePtToUap [readonly] * * @return $this */ - public function setEarningsAtLel(?float $earningsAtLel): static + public function setEarningsAbovePtToUap(?float $earningsAbovePtToUap): static { - if (is_null($earningsAtLel)) { - throw new InvalidArgumentException('non-nullable earningsAtLel cannot be null'); + if (is_null($earningsAbovePtToUap)) { + throw new InvalidArgumentException('non-nullable earningsAbovePtToUap cannot be null'); } - $this->container['earningsAtLel'] = $earningsAtLel; + $this->container['earningsAbovePtToUap'] = $earningsAbovePtToUap; return $this; } /** - * Gets earningsAboveLelToPt + * Gets earningsAbovePtToUel * * @return float|null */ - public function getEarningsAboveLelToPt(): ?float + public function getEarningsAbovePtToUel(): ?float { - return $this->container['earningsAboveLelToPt']; + return $this->container['earningsAbovePtToUel']; } /** - * Sets earningsAboveLelToPt + * Sets earningsAbovePtToUel * - * @param float|null $earningsAboveLelToPt [readonly] + * @param float|null $earningsAbovePtToUel [readonly] * * @return $this */ - public function setEarningsAboveLelToPt(?float $earningsAboveLelToPt): static + public function setEarningsAbovePtToUel(?float $earningsAbovePtToUel): static { - if (is_null($earningsAboveLelToPt)) { - throw new InvalidArgumentException('non-nullable earningsAboveLelToPt cannot be null'); + if (is_null($earningsAbovePtToUel)) { + throw new InvalidArgumentException('non-nullable earningsAbovePtToUel cannot be null'); } - $this->container['earningsAboveLelToPt'] = $earningsAboveLelToPt; + $this->container['earningsAbovePtToUel'] = $earningsAbovePtToUel; return $this; } /** - * Gets earningsAbovePtToUap + * Gets earningsAboveUapToUel * * @return float|null */ - public function getEarningsAbovePtToUap(): ?float + public function getEarningsAboveUapToUel(): ?float { - return $this->container['earningsAbovePtToUap']; + return $this->container['earningsAboveUapToUel']; } /** - * Sets earningsAbovePtToUap + * Sets earningsAboveUapToUel * - * @param float|null $earningsAbovePtToUap [readonly] + * @param float|null $earningsAboveUapToUel [readonly] * * @return $this */ - public function setEarningsAbovePtToUap(?float $earningsAbovePtToUap): static + public function setEarningsAboveUapToUel(?float $earningsAboveUapToUel): static { - if (is_null($earningsAbovePtToUap)) { - throw new InvalidArgumentException('non-nullable earningsAbovePtToUap cannot be null'); + if (is_null($earningsAboveUapToUel)) { + throw new InvalidArgumentException('non-nullable earningsAboveUapToUel cannot be null'); } - $this->container['earningsAbovePtToUap'] = $earningsAbovePtToUap; + $this->container['earningsAboveUapToUel'] = $earningsAboveUapToUel; return $this; } /** - * Gets earningsAboveUapToUel + * Gets earningsAtLel * * @return float|null */ - public function getEarningsAboveUapToUel(): ?float + public function getEarningsAtLel(): ?float { - return $this->container['earningsAboveUapToUel']; + return $this->container['earningsAtLel']; } /** - * Sets earningsAboveUapToUel + * Sets earningsAtLel * - * @param float|null $earningsAboveUapToUel [readonly] + * @param float|null $earningsAtLel [readonly] * * @return $this */ - public function setEarningsAboveUapToUel(?float $earningsAboveUapToUel): static + public function setEarningsAtLel(?float $earningsAtLel): static { - if (is_null($earningsAboveUapToUel)) { - throw new InvalidArgumentException('non-nullable earningsAboveUapToUel cannot be null'); + if (is_null($earningsAtLel)) { + throw new InvalidArgumentException('non-nullable earningsAtLel cannot be null'); } - $this->container['earningsAboveUapToUel'] = $earningsAboveUapToUel; + $this->container['earningsAtLel'] = $earningsAtLel; return $this; } /** - * Gets earningsAbovePtToUel + * Gets employeeAndEmployerNics * * @return float|null */ - public function getEarningsAbovePtToUel(): ?float + public function getEmployeeAndEmployerNics(): ?float { - return $this->container['earningsAbovePtToUel']; + return $this->container['employeeAndEmployerNics']; } /** - * Sets earningsAbovePtToUel + * Sets employeeAndEmployerNics * - * @param float|null $earningsAbovePtToUel [readonly] + * @param float|null $employeeAndEmployerNics [readonly] * * @return $this */ - public function setEarningsAbovePtToUel(?float $earningsAbovePtToUel): static + public function setEmployeeAndEmployerNics(?float $employeeAndEmployerNics): static { - if (is_null($earningsAbovePtToUel)) { - throw new InvalidArgumentException('non-nullable earningsAbovePtToUel cannot be null'); + if (is_null($employeeAndEmployerNics)) { + throw new InvalidArgumentException('non-nullable employeeAndEmployerNics cannot be null'); } - $this->container['earningsAbovePtToUel'] = $earningsAbovePtToUel; + $this->container['employeeAndEmployerNics'] = $employeeAndEmployerNics; return $this; } @@ -569,28 +562,35 @@ public function setEmployerNics(?float $employerNics): static } /** - * Gets employeeAndEmployerNics + * Gets table * - * @return float|null + * @return string|null */ - public function getEmployeeAndEmployerNics(): ?float + public function getTable(): ?string { - return $this->container['employeeAndEmployerNics']; + return $this->container['table']; } /** - * Sets employeeAndEmployerNics + * Sets table * - * @param float|null $employeeAndEmployerNics [readonly] + * @param string|null $table [readonly] * * @return $this */ - public function setEmployeeAndEmployerNics(?float $employeeAndEmployerNics): static + public function setTable(?string $table): static { - if (is_null($employeeAndEmployerNics)) { - throw new InvalidArgumentException('non-nullable employeeAndEmployerNics cannot be null'); + if (is_null($table)) { + array_push($this->openAPINullablesSetToNull, 'table'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('table', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeeAndEmployerNics'] = $employeeAndEmployerNics; + $this->container['table'] = $table; return $this; } diff --git a/src/Model/P11DetailedReportResponse.php b/src/Model/P11DetailedReportResponse.php index d6d4b98..bf756f7 100644 --- a/src/Model/P11DetailedReportResponse.php +++ b/src/Model/P11DetailedReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class P11DetailedReportResponse implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\P11Detailed', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class P11DetailedReportResponse implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class P11DetailedReportResponse implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/P11Line.php b/src/Model/P11Line.php index 4bec5ce..2d631ff 100644 --- a/src/Model/P11Line.php +++ b/src/Model/P11Line.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -61,20 +61,20 @@ class P11Line implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'date' => '\DateTime', - 'period' => 'string', 'grossTaxablePay' => 'float', 'grossTaxablePayYTD' => 'float', - 'tax' => 'float', - 'taxYTD' => 'float', - 'smpYTD' => 'float', - 'sppYTD' => 'float', + 'niValues' => '\SynergiTech\Staffology\Model\P11NiValues[]', + 'period' => 'string', + 'postgradLoanYTD' => 'float', 'sapYTD' => 'float', 'shppYTD' => 'float', - 'spbpYTD' => 'float', + 'smpYTD' => 'float', 'sncpYTD' => 'float', + 'spbpYTD' => 'float', + 'sppYTD' => 'float', 'studentLoanYTD' => 'float', - 'postgradLoanYTD' => 'float', - 'niValues' => '\SynergiTech\Staffology\Model\P11NiValues[]' + 'tax' => 'float', + 'taxYTD' => 'float' ]; /** @@ -84,20 +84,20 @@ class P11Line implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'date' => 'date', - 'period' => null, 'grossTaxablePay' => 'double', 'grossTaxablePayYTD' => 'double', - 'tax' => 'double', - 'taxYTD' => 'double', - 'smpYTD' => 'double', - 'sppYTD' => 'double', + 'niValues' => null, + 'period' => null, + 'postgradLoanYTD' => 'double', 'sapYTD' => 'double', 'shppYTD' => 'double', - 'spbpYTD' => 'double', + 'smpYTD' => 'double', 'sncpYTD' => 'double', + 'spbpYTD' => 'double', + 'sppYTD' => 'double', 'studentLoanYTD' => 'double', - 'postgradLoanYTD' => 'double', - 'niValues' => null + 'tax' => 'double', + 'taxYTD' => 'double' ]; /** @@ -107,20 +107,20 @@ class P11Line implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'date' => false, - 'period' => true, 'grossTaxablePay' => false, 'grossTaxablePayYTD' => false, - 'tax' => false, - 'taxYTD' => false, - 'smpYTD' => false, - 'sppYTD' => false, + 'niValues' => true, + 'period' => true, + 'postgradLoanYTD' => false, 'sapYTD' => false, 'shppYTD' => false, - 'spbpYTD' => false, + 'smpYTD' => false, 'sncpYTD' => false, + 'spbpYTD' => false, + 'sppYTD' => false, 'studentLoanYTD' => false, - 'postgradLoanYTD' => false, - 'niValues' => true + 'tax' => false, + 'taxYTD' => false ]; /** @@ -210,20 +210,20 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'date' => 'date', - 'period' => 'period', 'grossTaxablePay' => 'grossTaxablePay', 'grossTaxablePayYTD' => 'grossTaxablePayYTD', - 'tax' => 'tax', - 'taxYTD' => 'taxYTD', - 'smpYTD' => 'smpYTD', - 'sppYTD' => 'sppYTD', + 'niValues' => 'niValues', + 'period' => 'period', + 'postgradLoanYTD' => 'postgradLoanYTD', 'sapYTD' => 'sapYTD', 'shppYTD' => 'shppYTD', - 'spbpYTD' => 'spbpYTD', + 'smpYTD' => 'smpYTD', 'sncpYTD' => 'sncpYTD', + 'spbpYTD' => 'spbpYTD', + 'sppYTD' => 'sppYTD', 'studentLoanYTD' => 'studentLoanYTD', - 'postgradLoanYTD' => 'postgradLoanYTD', - 'niValues' => 'niValues' + 'tax' => 'tax', + 'taxYTD' => 'taxYTD' ]; /** @@ -233,20 +233,20 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'date' => 'setDate', - 'period' => 'setPeriod', 'grossTaxablePay' => 'setGrossTaxablePay', 'grossTaxablePayYTD' => 'setGrossTaxablePayYTD', - 'tax' => 'setTax', - 'taxYTD' => 'setTaxYTD', - 'smpYTD' => 'setSmpYTD', - 'sppYTD' => 'setSppYTD', + 'niValues' => 'setNiValues', + 'period' => 'setPeriod', + 'postgradLoanYTD' => 'setPostgradLoanYTD', 'sapYTD' => 'setSapYTD', 'shppYTD' => 'setShppYTD', - 'spbpYTD' => 'setSpbpYTD', + 'smpYTD' => 'setSmpYTD', 'sncpYTD' => 'setSncpYTD', + 'spbpYTD' => 'setSpbpYTD', + 'sppYTD' => 'setSppYTD', 'studentLoanYTD' => 'setStudentLoanYTD', - 'postgradLoanYTD' => 'setPostgradLoanYTD', - 'niValues' => 'setNiValues' + 'tax' => 'setTax', + 'taxYTD' => 'setTaxYTD' ]; /** @@ -256,20 +256,20 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'date' => 'getDate', - 'period' => 'getPeriod', 'grossTaxablePay' => 'getGrossTaxablePay', 'grossTaxablePayYTD' => 'getGrossTaxablePayYTD', - 'tax' => 'getTax', - 'taxYTD' => 'getTaxYTD', - 'smpYTD' => 'getSmpYTD', - 'sppYTD' => 'getSppYTD', + 'niValues' => 'getNiValues', + 'period' => 'getPeriod', + 'postgradLoanYTD' => 'getPostgradLoanYTD', 'sapYTD' => 'getSapYTD', 'shppYTD' => 'getShppYTD', - 'spbpYTD' => 'getSpbpYTD', + 'smpYTD' => 'getSmpYTD', 'sncpYTD' => 'getSncpYTD', + 'spbpYTD' => 'getSpbpYTD', + 'sppYTD' => 'getSppYTD', 'studentLoanYTD' => 'getStudentLoanYTD', - 'postgradLoanYTD' => 'getPostgradLoanYTD', - 'niValues' => 'getNiValues' + 'tax' => 'getTax', + 'taxYTD' => 'getTaxYTD' ]; /** @@ -329,20 +329,20 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('date', $data ?? [], null); - $this->setIfExists('period', $data ?? [], null); $this->setIfExists('grossTaxablePay', $data ?? [], null); $this->setIfExists('grossTaxablePayYTD', $data ?? [], null); - $this->setIfExists('tax', $data ?? [], null); - $this->setIfExists('taxYTD', $data ?? [], null); - $this->setIfExists('smpYTD', $data ?? [], null); - $this->setIfExists('sppYTD', $data ?? [], null); + $this->setIfExists('niValues', $data ?? [], null); + $this->setIfExists('period', $data ?? [], null); + $this->setIfExists('postgradLoanYTD', $data ?? [], null); $this->setIfExists('sapYTD', $data ?? [], null); $this->setIfExists('shppYTD', $data ?? [], null); - $this->setIfExists('spbpYTD', $data ?? [], null); + $this->setIfExists('smpYTD', $data ?? [], null); $this->setIfExists('sncpYTD', $data ?? [], null); + $this->setIfExists('spbpYTD', $data ?? [], null); + $this->setIfExists('sppYTD', $data ?? [], null); $this->setIfExists('studentLoanYTD', $data ?? [], null); - $this->setIfExists('postgradLoanYTD', $data ?? [], null); - $this->setIfExists('niValues', $data ?? [], null); + $this->setIfExists('tax', $data ?? [], null); + $this->setIfExists('taxYTD', $data ?? [], null); } /** @@ -414,40 +414,6 @@ public function setDate(?\DateTime $date): static return $this; } - /** - * Gets period - * - * @return string|null - */ - public function getPeriod(): ?string - { - return $this->container['period']; - } - - /** - * Sets period - * - * @param string|null $period [readonly] - * - * @return $this - */ - public function setPeriod(?string $period): static - { - if (is_null($period)) { - array_push($this->openAPINullablesSetToNull, 'period'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('period', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['period'] = $period; - - return $this; - } - /** * Gets grossTaxablePay * @@ -503,163 +469,204 @@ public function setGrossTaxablePayYTD(?float $grossTaxablePayYTD): static } /** - * Gets tax + * Gets niValues * - * @return float|null + * @return \SynergiTech\Staffology\Model\P11NiValues[]|null */ - public function getTax(): ?float + public function getNiValues(): ?array { - return $this->container['tax']; + return $this->container['niValues']; } /** - * Sets tax + * Sets niValues * - * @param float|null $tax [readonly] + * @param \SynergiTech\Staffology\Model\P11NiValues[]|null $niValues [readonly] * * @return $this */ - public function setTax(?float $tax): static + public function setNiValues(?array $niValues): static { - if (is_null($tax)) { - throw new InvalidArgumentException('non-nullable tax cannot be null'); + if (is_null($niValues)) { + array_push($this->openAPINullablesSetToNull, 'niValues'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('niValues', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['tax'] = $tax; + $this->container['niValues'] = $niValues; return $this; } /** - * Gets taxYTD + * Gets period + * + * @return string|null + */ + public function getPeriod(): ?string + { + return $this->container['period']; + } + + /** + * Sets period + * + * @param string|null $period [readonly] + * + * @return $this + */ + public function setPeriod(?string $period): static + { + if (is_null($period)) { + array_push($this->openAPINullablesSetToNull, 'period'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('period', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['period'] = $period; + + return $this; + } + + /** + * Gets postgradLoanYTD * * @return float|null */ - public function getTaxYTD(): ?float + public function getPostgradLoanYTD(): ?float { - return $this->container['taxYTD']; + return $this->container['postgradLoanYTD']; } /** - * Sets taxYTD + * Sets postgradLoanYTD * - * @param float|null $taxYTD [readonly] + * @param float|null $postgradLoanYTD [readonly] * * @return $this */ - public function setTaxYTD(?float $taxYTD): static + public function setPostgradLoanYTD(?float $postgradLoanYTD): static { - if (is_null($taxYTD)) { - throw new InvalidArgumentException('non-nullable taxYTD cannot be null'); + if (is_null($postgradLoanYTD)) { + throw new InvalidArgumentException('non-nullable postgradLoanYTD cannot be null'); } - $this->container['taxYTD'] = $taxYTD; + $this->container['postgradLoanYTD'] = $postgradLoanYTD; return $this; } /** - * Gets smpYTD + * Gets sapYTD * * @return float|null */ - public function getSmpYTD(): ?float + public function getSapYTD(): ?float { - return $this->container['smpYTD']; + return $this->container['sapYTD']; } /** - * Sets smpYTD + * Sets sapYTD * - * @param float|null $smpYTD [readonly] + * @param float|null $sapYTD [readonly] * * @return $this */ - public function setSmpYTD(?float $smpYTD): static + public function setSapYTD(?float $sapYTD): static { - if (is_null($smpYTD)) { - throw new InvalidArgumentException('non-nullable smpYTD cannot be null'); + if (is_null($sapYTD)) { + throw new InvalidArgumentException('non-nullable sapYTD cannot be null'); } - $this->container['smpYTD'] = $smpYTD; + $this->container['sapYTD'] = $sapYTD; return $this; } /** - * Gets sppYTD + * Gets shppYTD * * @return float|null */ - public function getSppYTD(): ?float + public function getShppYTD(): ?float { - return $this->container['sppYTD']; + return $this->container['shppYTD']; } /** - * Sets sppYTD + * Sets shppYTD * - * @param float|null $sppYTD [readonly] + * @param float|null $shppYTD [readonly] * * @return $this */ - public function setSppYTD(?float $sppYTD): static + public function setShppYTD(?float $shppYTD): static { - if (is_null($sppYTD)) { - throw new InvalidArgumentException('non-nullable sppYTD cannot be null'); + if (is_null($shppYTD)) { + throw new InvalidArgumentException('non-nullable shppYTD cannot be null'); } - $this->container['sppYTD'] = $sppYTD; + $this->container['shppYTD'] = $shppYTD; return $this; } /** - * Gets sapYTD + * Gets smpYTD * * @return float|null */ - public function getSapYTD(): ?float + public function getSmpYTD(): ?float { - return $this->container['sapYTD']; + return $this->container['smpYTD']; } /** - * Sets sapYTD + * Sets smpYTD * - * @param float|null $sapYTD [readonly] + * @param float|null $smpYTD [readonly] * * @return $this */ - public function setSapYTD(?float $sapYTD): static + public function setSmpYTD(?float $smpYTD): static { - if (is_null($sapYTD)) { - throw new InvalidArgumentException('non-nullable sapYTD cannot be null'); + if (is_null($smpYTD)) { + throw new InvalidArgumentException('non-nullable smpYTD cannot be null'); } - $this->container['sapYTD'] = $sapYTD; + $this->container['smpYTD'] = $smpYTD; return $this; } /** - * Gets shppYTD + * Gets sncpYTD * * @return float|null */ - public function getShppYTD(): ?float + public function getSncpYTD(): ?float { - return $this->container['shppYTD']; + return $this->container['sncpYTD']; } /** - * Sets shppYTD + * Sets sncpYTD * - * @param float|null $shppYTD [readonly] + * @param float|null $sncpYTD [readonly] * * @return $this */ - public function setShppYTD(?float $shppYTD): static + public function setSncpYTD(?float $sncpYTD): static { - if (is_null($shppYTD)) { - throw new InvalidArgumentException('non-nullable shppYTD cannot be null'); + if (is_null($sncpYTD)) { + throw new InvalidArgumentException('non-nullable sncpYTD cannot be null'); } - $this->container['shppYTD'] = $shppYTD; + $this->container['sncpYTD'] = $sncpYTD; return $this; } @@ -692,28 +699,28 @@ public function setSpbpYTD(?float $spbpYTD): static } /** - * Gets sncpYTD + * Gets sppYTD * * @return float|null */ - public function getSncpYTD(): ?float + public function getSppYTD(): ?float { - return $this->container['sncpYTD']; + return $this->container['sppYTD']; } /** - * Sets sncpYTD + * Sets sppYTD * - * @param float|null $sncpYTD [readonly] + * @param float|null $sppYTD [readonly] * * @return $this */ - public function setSncpYTD(?float $sncpYTD): static + public function setSppYTD(?float $sppYTD): static { - if (is_null($sncpYTD)) { - throw new InvalidArgumentException('non-nullable sncpYTD cannot be null'); + if (is_null($sppYTD)) { + throw new InvalidArgumentException('non-nullable sppYTD cannot be null'); } - $this->container['sncpYTD'] = $sncpYTD; + $this->container['sppYTD'] = $sppYTD; return $this; } @@ -746,62 +753,55 @@ public function setStudentLoanYTD(?float $studentLoanYTD): static } /** - * Gets postgradLoanYTD + * Gets tax * * @return float|null */ - public function getPostgradLoanYTD(): ?float + public function getTax(): ?float { - return $this->container['postgradLoanYTD']; + return $this->container['tax']; } /** - * Sets postgradLoanYTD + * Sets tax * - * @param float|null $postgradLoanYTD [readonly] + * @param float|null $tax [readonly] * * @return $this */ - public function setPostgradLoanYTD(?float $postgradLoanYTD): static + public function setTax(?float $tax): static { - if (is_null($postgradLoanYTD)) { - throw new InvalidArgumentException('non-nullable postgradLoanYTD cannot be null'); + if (is_null($tax)) { + throw new InvalidArgumentException('non-nullable tax cannot be null'); } - $this->container['postgradLoanYTD'] = $postgradLoanYTD; + $this->container['tax'] = $tax; return $this; } /** - * Gets niValues + * Gets taxYTD * - * @return \SynergiTech\Staffology\Model\P11NiValues[]|null + * @return float|null */ - public function getNiValues(): ?array + public function getTaxYTD(): ?float { - return $this->container['niValues']; + return $this->container['taxYTD']; } /** - * Sets niValues + * Sets taxYTD * - * @param \SynergiTech\Staffology\Model\P11NiValues[]|null $niValues [readonly] + * @param float|null $taxYTD [readonly] * * @return $this */ - public function setNiValues(?array $niValues): static + public function setTaxYTD(?float $taxYTD): static { - if (is_null($niValues)) { - array_push($this->openAPINullablesSetToNull, 'niValues'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niValues', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($taxYTD)) { + throw new InvalidArgumentException('non-nullable taxYTD cannot be null'); } - $this->container['niValues'] = $niValues; + $this->container['taxYTD'] = $taxYTD; return $this; } diff --git a/src/Model/P11NiAndStatPaymentsLine.php b/src/Model/P11NiAndStatPaymentsLine.php index 744b243..43b184b 100644 --- a/src/Model/P11NiAndStatPaymentsLine.php +++ b/src/Model/P11NiAndStatPaymentsLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,20 +60,20 @@ class P11NiAndStatPaymentsLine implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPITypes = [ + 'class1a' => 'float', 'date' => '\DateTime', - 'period' => 'string', 'monthNumber' => 'string', - 'weekNumber' => 'string', - 'smp' => 'float', - 'spp' => 'float', + 'niValues' => '\SynergiTech\Staffology\Model\P11DetailedNiValues', + 'period' => 'string', 'sap' => 'float', 'shpp' => 'float', - 'ssp' => 'float', - 'spbp' => 'float', + 'smp' => 'float', 'sncp' => 'float', - 'class1a' => 'float', - 'niValues' => '\SynergiTech\Staffology\Model\P11DetailedNiValues', - 'taxCode' => 'string' + 'spbp' => 'float', + 'spp' => 'float', + 'ssp' => 'float', + 'taxCode' => 'string', + 'weekNumber' => 'string' ]; /** @@ -82,20 +82,20 @@ class P11NiAndStatPaymentsLine implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPIFormats = [ + 'class1a' => 'double', 'date' => 'date', - 'period' => null, 'monthNumber' => null, - 'weekNumber' => null, - 'smp' => 'double', - 'spp' => 'double', + 'niValues' => null, + 'period' => null, 'sap' => 'double', 'shpp' => 'double', - 'ssp' => 'double', - 'spbp' => 'double', + 'smp' => 'double', 'sncp' => 'double', - 'class1a' => 'double', - 'niValues' => null, - 'taxCode' => null + 'spbp' => 'double', + 'spp' => 'double', + 'ssp' => 'double', + 'taxCode' => null, + 'weekNumber' => null ]; /** @@ -104,20 +104,20 @@ class P11NiAndStatPaymentsLine implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPINullables = [ + 'class1a' => false, 'date' => false, - 'period' => true, 'monthNumber' => true, - 'weekNumber' => true, - 'smp' => false, - 'spp' => false, + 'niValues' => false, + 'period' => true, 'sap' => false, 'shpp' => false, - 'ssp' => false, - 'spbp' => false, + 'smp' => false, 'sncp' => false, - 'class1a' => false, - 'niValues' => false, - 'taxCode' => true + 'spbp' => false, + 'spp' => false, + 'ssp' => false, + 'taxCode' => true, + 'weekNumber' => true ]; /** @@ -206,20 +206,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'class1a' => 'class1a', 'date' => 'date', - 'period' => 'period', 'monthNumber' => 'monthNumber', - 'weekNumber' => 'weekNumber', - 'smp' => 'smp', - 'spp' => 'spp', + 'niValues' => 'niValues', + 'period' => 'period', 'sap' => 'sap', 'shpp' => 'shpp', - 'ssp' => 'ssp', - 'spbp' => 'spbp', + 'smp' => 'smp', 'sncp' => 'sncp', - 'class1a' => 'class1a', - 'niValues' => 'niValues', - 'taxCode' => 'taxCode' + 'spbp' => 'spbp', + 'spp' => 'spp', + 'ssp' => 'ssp', + 'taxCode' => 'taxCode', + 'weekNumber' => 'weekNumber' ]; /** @@ -228,20 +228,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'class1a' => 'setClass1a', 'date' => 'setDate', - 'period' => 'setPeriod', 'monthNumber' => 'setMonthNumber', - 'weekNumber' => 'setWeekNumber', - 'smp' => 'setSmp', - 'spp' => 'setSpp', + 'niValues' => 'setNiValues', + 'period' => 'setPeriod', 'sap' => 'setSap', 'shpp' => 'setShpp', - 'ssp' => 'setSsp', - 'spbp' => 'setSpbp', + 'smp' => 'setSmp', 'sncp' => 'setSncp', - 'class1a' => 'setClass1a', - 'niValues' => 'setNiValues', - 'taxCode' => 'setTaxCode' + 'spbp' => 'setSpbp', + 'spp' => 'setSpp', + 'ssp' => 'setSsp', + 'taxCode' => 'setTaxCode', + 'weekNumber' => 'setWeekNumber' ]; /** @@ -250,20 +250,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'class1a' => 'getClass1a', 'date' => 'getDate', - 'period' => 'getPeriod', 'monthNumber' => 'getMonthNumber', - 'weekNumber' => 'getWeekNumber', - 'smp' => 'getSmp', - 'spp' => 'getSpp', + 'niValues' => 'getNiValues', + 'period' => 'getPeriod', 'sap' => 'getSap', 'shpp' => 'getShpp', - 'ssp' => 'getSsp', - 'spbp' => 'getSpbp', + 'smp' => 'getSmp', 'sncp' => 'getSncp', - 'class1a' => 'getClass1a', - 'niValues' => 'getNiValues', - 'taxCode' => 'getTaxCode' + 'spbp' => 'getSpbp', + 'spp' => 'getSpp', + 'ssp' => 'getSsp', + 'taxCode' => 'getTaxCode', + 'weekNumber' => 'getWeekNumber' ]; /** @@ -322,20 +322,20 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('class1a', $data ?? [], null); $this->setIfExists('date', $data ?? [], null); - $this->setIfExists('period', $data ?? [], null); $this->setIfExists('monthNumber', $data ?? [], null); - $this->setIfExists('weekNumber', $data ?? [], null); - $this->setIfExists('smp', $data ?? [], null); - $this->setIfExists('spp', $data ?? [], null); + $this->setIfExists('niValues', $data ?? [], null); + $this->setIfExists('period', $data ?? [], null); $this->setIfExists('sap', $data ?? [], null); $this->setIfExists('shpp', $data ?? [], null); - $this->setIfExists('ssp', $data ?? [], null); - $this->setIfExists('spbp', $data ?? [], null); + $this->setIfExists('smp', $data ?? [], null); $this->setIfExists('sncp', $data ?? [], null); - $this->setIfExists('class1a', $data ?? [], null); - $this->setIfExists('niValues', $data ?? [], null); + $this->setIfExists('spbp', $data ?? [], null); + $this->setIfExists('spp', $data ?? [], null); + $this->setIfExists('ssp', $data ?? [], null); $this->setIfExists('taxCode', $data ?? [], null); + $this->setIfExists('weekNumber', $data ?? [], null); } /** @@ -381,62 +381,55 @@ public function valid(): bool /** - * Gets date + * Gets class1a * - * @return \DateTime|null + * @return float|null */ - public function getDate(): ?\DateTime + public function getClass1a(): ?float { - return $this->container['date']; + return $this->container['class1a']; } /** - * Sets date + * Sets class1a * - * @param \DateTime|null $date [readonly] + * @param float|null $class1a [readonly] * * @return $this */ - public function setDate(?\DateTime $date): static + public function setClass1a(?float $class1a): static { - if (is_null($date)) { - throw new InvalidArgumentException('non-nullable date cannot be null'); + if (is_null($class1a)) { + throw new InvalidArgumentException('non-nullable class1a cannot be null'); } - $this->container['date'] = $date; + $this->container['class1a'] = $class1a; return $this; } /** - * Gets period + * Gets date * - * @return string|null + * @return \DateTime|null */ - public function getPeriod(): ?string + public function getDate(): ?\DateTime { - return $this->container['period']; + return $this->container['date']; } /** - * Sets period + * Sets date * - * @param string|null $period [readonly] + * @param \DateTime|null $date [readonly] * * @return $this */ - public function setPeriod(?string $period): static + public function setDate(?\DateTime $date): static { - if (is_null($period)) { - array_push($this->openAPINullablesSetToNull, 'period'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('period', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($date)) { + throw new InvalidArgumentException('non-nullable date cannot be null'); } - $this->container['period'] = $period; + $this->container['date'] = $date; return $this; } @@ -476,89 +469,62 @@ public function setMonthNumber(?string $monthNumber): static } /** - * Gets weekNumber - * - * @return string|null - */ - public function getWeekNumber(): ?string - { - return $this->container['weekNumber']; - } - - /** - * Sets weekNumber - * - * @param string|null $weekNumber [readonly] - * - * @return $this - */ - public function setWeekNumber(?string $weekNumber): static - { - if (is_null($weekNumber)) { - array_push($this->openAPINullablesSetToNull, 'weekNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('weekNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['weekNumber'] = $weekNumber; - - return $this; - } - - /** - * Gets smp + * Gets niValues * - * @return float|null + * @return \SynergiTech\Staffology\Model\P11DetailedNiValues|null */ - public function getSmp(): ?float + public function getNiValues(): ?\SynergiTech\Staffology\Model\P11DetailedNiValues { - return $this->container['smp']; + return $this->container['niValues']; } /** - * Sets smp + * Sets niValues * - * @param float|null $smp [readonly] + * @param \SynergiTech\Staffology\Model\P11DetailedNiValues|null $niValues niValues * * @return $this */ - public function setSmp(?float $smp): static + public function setNiValues(?\SynergiTech\Staffology\Model\P11DetailedNiValues $niValues): static { - if (is_null($smp)) { - throw new InvalidArgumentException('non-nullable smp cannot be null'); + if (is_null($niValues)) { + throw new InvalidArgumentException('non-nullable niValues cannot be null'); } - $this->container['smp'] = $smp; + $this->container['niValues'] = $niValues; return $this; } /** - * Gets spp + * Gets period * - * @return float|null + * @return string|null */ - public function getSpp(): ?float + public function getPeriod(): ?string { - return $this->container['spp']; + return $this->container['period']; } /** - * Sets spp + * Sets period * - * @param float|null $spp [readonly] + * @param string|null $period [readonly] * * @return $this */ - public function setSpp(?float $spp): static + public function setPeriod(?string $period): static { - if (is_null($spp)) { - throw new InvalidArgumentException('non-nullable spp cannot be null'); + if (is_null($period)) { + array_push($this->openAPINullablesSetToNull, 'period'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('period', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['spp'] = $spp; + $this->container['period'] = $period; return $this; } @@ -618,136 +584,136 @@ public function setShpp(?float $shpp): static } /** - * Gets ssp + * Gets smp * * @return float|null */ - public function getSsp(): ?float + public function getSmp(): ?float { - return $this->container['ssp']; + return $this->container['smp']; } /** - * Sets ssp + * Sets smp * - * @param float|null $ssp [readonly] + * @param float|null $smp [readonly] * * @return $this */ - public function setSsp(?float $ssp): static + public function setSmp(?float $smp): static { - if (is_null($ssp)) { - throw new InvalidArgumentException('non-nullable ssp cannot be null'); + if (is_null($smp)) { + throw new InvalidArgumentException('non-nullable smp cannot be null'); } - $this->container['ssp'] = $ssp; + $this->container['smp'] = $smp; return $this; } /** - * Gets spbp + * Gets sncp * * @return float|null */ - public function getSpbp(): ?float + public function getSncp(): ?float { - return $this->container['spbp']; + return $this->container['sncp']; } /** - * Sets spbp + * Sets sncp * - * @param float|null $spbp [readonly] + * @param float|null $sncp [readonly] * * @return $this */ - public function setSpbp(?float $spbp): static + public function setSncp(?float $sncp): static { - if (is_null($spbp)) { - throw new InvalidArgumentException('non-nullable spbp cannot be null'); + if (is_null($sncp)) { + throw new InvalidArgumentException('non-nullable sncp cannot be null'); } - $this->container['spbp'] = $spbp; + $this->container['sncp'] = $sncp; return $this; } /** - * Gets sncp + * Gets spbp * * @return float|null */ - public function getSncp(): ?float + public function getSpbp(): ?float { - return $this->container['sncp']; + return $this->container['spbp']; } /** - * Sets sncp + * Sets spbp * - * @param float|null $sncp [readonly] + * @param float|null $spbp [readonly] * * @return $this */ - public function setSncp(?float $sncp): static + public function setSpbp(?float $spbp): static { - if (is_null($sncp)) { - throw new InvalidArgumentException('non-nullable sncp cannot be null'); + if (is_null($spbp)) { + throw new InvalidArgumentException('non-nullable spbp cannot be null'); } - $this->container['sncp'] = $sncp; + $this->container['spbp'] = $spbp; return $this; } /** - * Gets class1a + * Gets spp * * @return float|null */ - public function getClass1a(): ?float + public function getSpp(): ?float { - return $this->container['class1a']; + return $this->container['spp']; } /** - * Sets class1a + * Sets spp * - * @param float|null $class1a [readonly] + * @param float|null $spp [readonly] * * @return $this */ - public function setClass1a(?float $class1a): static + public function setSpp(?float $spp): static { - if (is_null($class1a)) { - throw new InvalidArgumentException('non-nullable class1a cannot be null'); + if (is_null($spp)) { + throw new InvalidArgumentException('non-nullable spp cannot be null'); } - $this->container['class1a'] = $class1a; + $this->container['spp'] = $spp; return $this; } /** - * Gets niValues + * Gets ssp * - * @return \SynergiTech\Staffology\Model\P11DetailedNiValues|null + * @return float|null */ - public function getNiValues(): ?\SynergiTech\Staffology\Model\P11DetailedNiValues + public function getSsp(): ?float { - return $this->container['niValues']; + return $this->container['ssp']; } /** - * Sets niValues + * Sets ssp * - * @param \SynergiTech\Staffology\Model\P11DetailedNiValues|null $niValues niValues + * @param float|null $ssp [readonly] * * @return $this */ - public function setNiValues(?\SynergiTech\Staffology\Model\P11DetailedNiValues $niValues): static + public function setSsp(?float $ssp): static { - if (is_null($niValues)) { - throw new InvalidArgumentException('non-nullable niValues cannot be null'); + if (is_null($ssp)) { + throw new InvalidArgumentException('non-nullable ssp cannot be null'); } - $this->container['niValues'] = $niValues; + $this->container['ssp'] = $ssp; return $this; } @@ -785,6 +751,40 @@ public function setTaxCode(?string $taxCode): static return $this; } + + /** + * Gets weekNumber + * + * @return string|null + */ + public function getWeekNumber(): ?string + { + return $this->container['weekNumber']; + } + + /** + * Sets weekNumber + * + * @param string|null $weekNumber [readonly] + * + * @return $this + */ + public function setWeekNumber(?string $weekNumber): static + { + if (is_null($weekNumber)) { + array_push($this->openAPINullablesSetToNull, 'weekNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('weekNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['weekNumber'] = $weekNumber; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/P11NiAndStatPaymentsTotalsLine.php b/src/Model/P11NiAndStatPaymentsTotalsLine.php index b70c39f..7476e13 100644 --- a/src/Model/P11NiAndStatPaymentsTotalsLine.php +++ b/src/Model/P11NiAndStatPaymentsTotalsLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,19 +60,19 @@ class P11NiAndStatPaymentsTotalsLine implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPITypes = [ - 'toLel' => 'float', + 'class1A' => 'float', + 'ees' => 'float', + 'eesAndErs' => 'float', 'lelToPt' => 'float', 'ptToUel' => 'float', - 'eesAndErs' => 'float', - 'ees' => 'float', - 'class1A' => 'float', - 'ssp' => 'float', - 'smp' => 'float', - 'spp' => 'float', - 'shpp' => 'float', 'sap' => 'float', + 'shpp' => 'float', + 'smp' => 'float', + 'sncp' => 'float', 'spbp' => 'float', - 'sncp' => 'float' + 'spp' => 'float', + 'ssp' => 'float', + 'toLel' => 'float' ]; /** @@ -81,19 +81,19 @@ class P11NiAndStatPaymentsTotalsLine implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPIFormats = [ - 'toLel' => 'double', + 'class1A' => 'double', + 'ees' => 'double', + 'eesAndErs' => 'double', 'lelToPt' => 'double', 'ptToUel' => 'double', - 'eesAndErs' => 'double', - 'ees' => 'double', - 'class1A' => 'double', - 'ssp' => 'double', - 'smp' => 'double', - 'spp' => 'double', - 'shpp' => 'double', 'sap' => 'double', + 'shpp' => 'double', + 'smp' => 'double', + 'sncp' => 'double', 'spbp' => 'double', - 'sncp' => 'double' + 'spp' => 'double', + 'ssp' => 'double', + 'toLel' => 'double' ]; /** @@ -102,19 +102,19 @@ class P11NiAndStatPaymentsTotalsLine implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPINullables = [ - 'toLel' => false, + 'class1A' => false, + 'ees' => false, + 'eesAndErs' => false, 'lelToPt' => false, 'ptToUel' => false, - 'eesAndErs' => false, - 'ees' => false, - 'class1A' => false, - 'ssp' => false, - 'smp' => false, - 'spp' => false, - 'shpp' => false, 'sap' => false, + 'shpp' => false, + 'smp' => false, + 'sncp' => false, 'spbp' => false, - 'sncp' => false + 'spp' => false, + 'ssp' => false, + 'toLel' => false ]; /** @@ -203,19 +203,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'toLel' => 'toLel', + 'class1A' => 'class1A', + 'ees' => 'ees', + 'eesAndErs' => 'eesAndErs', 'lelToPt' => 'lelToPt', 'ptToUel' => 'ptToUel', - 'eesAndErs' => 'eesAndErs', - 'ees' => 'ees', - 'class1A' => 'class1A', - 'ssp' => 'ssp', - 'smp' => 'smp', - 'spp' => 'spp', - 'shpp' => 'shpp', 'sap' => 'sap', + 'shpp' => 'shpp', + 'smp' => 'smp', + 'sncp' => 'sncp', 'spbp' => 'spbp', - 'sncp' => 'sncp' + 'spp' => 'spp', + 'ssp' => 'ssp', + 'toLel' => 'toLel' ]; /** @@ -224,19 +224,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'toLel' => 'setToLel', + 'class1A' => 'setClass1A', + 'ees' => 'setEes', + 'eesAndErs' => 'setEesAndErs', 'lelToPt' => 'setLelToPt', 'ptToUel' => 'setPtToUel', - 'eesAndErs' => 'setEesAndErs', - 'ees' => 'setEes', - 'class1A' => 'setClass1A', - 'ssp' => 'setSsp', - 'smp' => 'setSmp', - 'spp' => 'setSpp', - 'shpp' => 'setShpp', 'sap' => 'setSap', + 'shpp' => 'setShpp', + 'smp' => 'setSmp', + 'sncp' => 'setSncp', 'spbp' => 'setSpbp', - 'sncp' => 'setSncp' + 'spp' => 'setSpp', + 'ssp' => 'setSsp', + 'toLel' => 'setToLel' ]; /** @@ -245,19 +245,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'toLel' => 'getToLel', + 'class1A' => 'getClass1A', + 'ees' => 'getEes', + 'eesAndErs' => 'getEesAndErs', 'lelToPt' => 'getLelToPt', 'ptToUel' => 'getPtToUel', - 'eesAndErs' => 'getEesAndErs', - 'ees' => 'getEes', - 'class1A' => 'getClass1A', - 'ssp' => 'getSsp', - 'smp' => 'getSmp', - 'spp' => 'getSpp', - 'shpp' => 'getShpp', 'sap' => 'getSap', + 'shpp' => 'getShpp', + 'smp' => 'getSmp', + 'sncp' => 'getSncp', 'spbp' => 'getSpbp', - 'sncp' => 'getSncp' + 'spp' => 'getSpp', + 'ssp' => 'getSsp', + 'toLel' => 'getToLel' ]; /** @@ -316,19 +316,19 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('toLel', $data ?? [], null); + $this->setIfExists('class1A', $data ?? [], null); + $this->setIfExists('ees', $data ?? [], null); + $this->setIfExists('eesAndErs', $data ?? [], null); $this->setIfExists('lelToPt', $data ?? [], null); $this->setIfExists('ptToUel', $data ?? [], null); - $this->setIfExists('eesAndErs', $data ?? [], null); - $this->setIfExists('ees', $data ?? [], null); - $this->setIfExists('class1A', $data ?? [], null); - $this->setIfExists('ssp', $data ?? [], null); - $this->setIfExists('smp', $data ?? [], null); - $this->setIfExists('spp', $data ?? [], null); - $this->setIfExists('shpp', $data ?? [], null); $this->setIfExists('sap', $data ?? [], null); - $this->setIfExists('spbp', $data ?? [], null); + $this->setIfExists('shpp', $data ?? [], null); + $this->setIfExists('smp', $data ?? [], null); $this->setIfExists('sncp', $data ?? [], null); + $this->setIfExists('spbp', $data ?? [], null); + $this->setIfExists('spp', $data ?? [], null); + $this->setIfExists('ssp', $data ?? [], null); + $this->setIfExists('toLel', $data ?? [], null); } /** @@ -374,190 +374,190 @@ public function valid(): bool /** - * Gets toLel + * Gets class1A * * @return float|null */ - public function getToLel(): ?float + public function getClass1A(): ?float { - return $this->container['toLel']; + return $this->container['class1A']; } /** - * Sets toLel + * Sets class1A * - * @param float|null $toLel [readonly] + * @param float|null $class1A [readonly] * * @return $this */ - public function setToLel(?float $toLel): static + public function setClass1A(?float $class1A): static { - if (is_null($toLel)) { - throw new InvalidArgumentException('non-nullable toLel cannot be null'); + if (is_null($class1A)) { + throw new InvalidArgumentException('non-nullable class1A cannot be null'); } - $this->container['toLel'] = $toLel; + $this->container['class1A'] = $class1A; return $this; } /** - * Gets lelToPt + * Gets ees * * @return float|null */ - public function getLelToPt(): ?float + public function getEes(): ?float { - return $this->container['lelToPt']; + return $this->container['ees']; } /** - * Sets lelToPt + * Sets ees * - * @param float|null $lelToPt [readonly] + * @param float|null $ees [readonly] * * @return $this */ - public function setLelToPt(?float $lelToPt): static + public function setEes(?float $ees): static { - if (is_null($lelToPt)) { - throw new InvalidArgumentException('non-nullable lelToPt cannot be null'); + if (is_null($ees)) { + throw new InvalidArgumentException('non-nullable ees cannot be null'); } - $this->container['lelToPt'] = $lelToPt; + $this->container['ees'] = $ees; return $this; } /** - * Gets ptToUel + * Gets eesAndErs * * @return float|null */ - public function getPtToUel(): ?float + public function getEesAndErs(): ?float { - return $this->container['ptToUel']; + return $this->container['eesAndErs']; } /** - * Sets ptToUel + * Sets eesAndErs * - * @param float|null $ptToUel [readonly] + * @param float|null $eesAndErs [readonly] * * @return $this */ - public function setPtToUel(?float $ptToUel): static + public function setEesAndErs(?float $eesAndErs): static { - if (is_null($ptToUel)) { - throw new InvalidArgumentException('non-nullable ptToUel cannot be null'); + if (is_null($eesAndErs)) { + throw new InvalidArgumentException('non-nullable eesAndErs cannot be null'); } - $this->container['ptToUel'] = $ptToUel; + $this->container['eesAndErs'] = $eesAndErs; return $this; } /** - * Gets eesAndErs + * Gets lelToPt * * @return float|null */ - public function getEesAndErs(): ?float + public function getLelToPt(): ?float { - return $this->container['eesAndErs']; + return $this->container['lelToPt']; } /** - * Sets eesAndErs + * Sets lelToPt * - * @param float|null $eesAndErs [readonly] + * @param float|null $lelToPt [readonly] * * @return $this */ - public function setEesAndErs(?float $eesAndErs): static + public function setLelToPt(?float $lelToPt): static { - if (is_null($eesAndErs)) { - throw new InvalidArgumentException('non-nullable eesAndErs cannot be null'); + if (is_null($lelToPt)) { + throw new InvalidArgumentException('non-nullable lelToPt cannot be null'); } - $this->container['eesAndErs'] = $eesAndErs; + $this->container['lelToPt'] = $lelToPt; return $this; } /** - * Gets ees + * Gets ptToUel * * @return float|null */ - public function getEes(): ?float + public function getPtToUel(): ?float { - return $this->container['ees']; + return $this->container['ptToUel']; } /** - * Sets ees + * Sets ptToUel * - * @param float|null $ees [readonly] + * @param float|null $ptToUel [readonly] * * @return $this */ - public function setEes(?float $ees): static + public function setPtToUel(?float $ptToUel): static { - if (is_null($ees)) { - throw new InvalidArgumentException('non-nullable ees cannot be null'); + if (is_null($ptToUel)) { + throw new InvalidArgumentException('non-nullable ptToUel cannot be null'); } - $this->container['ees'] = $ees; + $this->container['ptToUel'] = $ptToUel; return $this; } /** - * Gets class1A + * Gets sap * * @return float|null */ - public function getClass1A(): ?float + public function getSap(): ?float { - return $this->container['class1A']; + return $this->container['sap']; } /** - * Sets class1A + * Sets sap * - * @param float|null $class1A [readonly] + * @param float|null $sap [readonly] * * @return $this */ - public function setClass1A(?float $class1A): static + public function setSap(?float $sap): static { - if (is_null($class1A)) { - throw new InvalidArgumentException('non-nullable class1A cannot be null'); + if (is_null($sap)) { + throw new InvalidArgumentException('non-nullable sap cannot be null'); } - $this->container['class1A'] = $class1A; + $this->container['sap'] = $sap; return $this; } /** - * Gets ssp + * Gets shpp * * @return float|null */ - public function getSsp(): ?float + public function getShpp(): ?float { - return $this->container['ssp']; + return $this->container['shpp']; } /** - * Sets ssp + * Sets shpp * - * @param float|null $ssp [readonly] + * @param float|null $shpp [readonly] * * @return $this */ - public function setSsp(?float $ssp): static + public function setShpp(?float $shpp): static { - if (is_null($ssp)) { - throw new InvalidArgumentException('non-nullable ssp cannot be null'); + if (is_null($shpp)) { + throw new InvalidArgumentException('non-nullable shpp cannot be null'); } - $this->container['ssp'] = $ssp; + $this->container['shpp'] = $shpp; return $this; } @@ -590,136 +590,136 @@ public function setSmp(?float $smp): static } /** - * Gets spp + * Gets sncp * * @return float|null */ - public function getSpp(): ?float + public function getSncp(): ?float { - return $this->container['spp']; + return $this->container['sncp']; } /** - * Sets spp + * Sets sncp * - * @param float|null $spp [readonly] + * @param float|null $sncp [readonly] * * @return $this */ - public function setSpp(?float $spp): static + public function setSncp(?float $sncp): static { - if (is_null($spp)) { - throw new InvalidArgumentException('non-nullable spp cannot be null'); + if (is_null($sncp)) { + throw new InvalidArgumentException('non-nullable sncp cannot be null'); } - $this->container['spp'] = $spp; + $this->container['sncp'] = $sncp; return $this; } /** - * Gets shpp + * Gets spbp * * @return float|null */ - public function getShpp(): ?float + public function getSpbp(): ?float { - return $this->container['shpp']; + return $this->container['spbp']; } /** - * Sets shpp + * Sets spbp * - * @param float|null $shpp [readonly] + * @param float|null $spbp [readonly] * * @return $this */ - public function setShpp(?float $shpp): static + public function setSpbp(?float $spbp): static { - if (is_null($shpp)) { - throw new InvalidArgumentException('non-nullable shpp cannot be null'); + if (is_null($spbp)) { + throw new InvalidArgumentException('non-nullable spbp cannot be null'); } - $this->container['shpp'] = $shpp; + $this->container['spbp'] = $spbp; return $this; } /** - * Gets sap + * Gets spp * * @return float|null */ - public function getSap(): ?float + public function getSpp(): ?float { - return $this->container['sap']; + return $this->container['spp']; } /** - * Sets sap + * Sets spp * - * @param float|null $sap [readonly] + * @param float|null $spp [readonly] * * @return $this */ - public function setSap(?float $sap): static + public function setSpp(?float $spp): static { - if (is_null($sap)) { - throw new InvalidArgumentException('non-nullable sap cannot be null'); + if (is_null($spp)) { + throw new InvalidArgumentException('non-nullable spp cannot be null'); } - $this->container['sap'] = $sap; + $this->container['spp'] = $spp; return $this; } /** - * Gets spbp + * Gets ssp * * @return float|null */ - public function getSpbp(): ?float + public function getSsp(): ?float { - return $this->container['spbp']; + return $this->container['ssp']; } /** - * Sets spbp + * Sets ssp * - * @param float|null $spbp [readonly] + * @param float|null $ssp [readonly] * * @return $this */ - public function setSpbp(?float $spbp): static + public function setSsp(?float $ssp): static { - if (is_null($spbp)) { - throw new InvalidArgumentException('non-nullable spbp cannot be null'); + if (is_null($ssp)) { + throw new InvalidArgumentException('non-nullable ssp cannot be null'); } - $this->container['spbp'] = $spbp; + $this->container['ssp'] = $ssp; return $this; } /** - * Gets sncp + * Gets toLel * * @return float|null */ - public function getSncp(): ?float + public function getToLel(): ?float { - return $this->container['sncp']; + return $this->container['toLel']; } /** - * Sets sncp + * Sets toLel * - * @param float|null $sncp [readonly] + * @param float|null $toLel [readonly] * * @return $this */ - public function setSncp(?float $sncp): static + public function setToLel(?float $toLel): static { - if (is_null($sncp)) { - throw new InvalidArgumentException('non-nullable sncp cannot be null'); + if (is_null($toLel)) { + throw new InvalidArgumentException('non-nullable toLel cannot be null'); } - $this->container['sncp'] = $sncp; + $this->container['toLel'] = $toLel; return $this; } diff --git a/src/Model/P11NiValues.php b/src/Model/P11NiValues.php index 3011422..ee89a0a 100644 --- a/src/Model/P11NiValues.php +++ b/src/Model/P11NiValues.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class P11NiValues implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'table' => 'string', 'period' => 'float', + 'table' => 'string', 'ytd' => 'float' ]; @@ -71,8 +71,8 @@ class P11NiValues implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'table' => null, 'period' => 'double', + 'table' => null, 'ytd' => 'double' ]; @@ -82,8 +82,8 @@ class P11NiValues implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'table' => true, 'period' => false, + 'table' => true, 'ytd' => false ]; @@ -173,8 +173,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'table' => 'table', 'period' => 'period', + 'table' => 'table', 'ytd' => 'ytd' ]; @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'table' => 'setTable', 'period' => 'setPeriod', + 'table' => 'setTable', 'ytd' => 'setYtd' ]; @@ -195,8 +195,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'table' => 'getTable', 'period' => 'getPeriod', + 'table' => 'getTable', 'ytd' => 'getYtd' ]; @@ -256,8 +256,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('table', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); + $this->setIfExists('table', $data ?? [], null); $this->setIfExists('ytd', $data ?? [], null); } @@ -304,62 +304,62 @@ public function valid(): bool /** - * Gets table + * Gets period * - * @return string|null + * @return float|null */ - public function getTable(): ?string + public function getPeriod(): ?float { - return $this->container['table']; + return $this->container['period']; } /** - * Sets table + * Sets period * - * @param string|null $table [readonly] + * @param float|null $period [readonly] * * @return $this */ - public function setTable(?string $table): static + public function setPeriod(?float $period): static { - if (is_null($table)) { - array_push($this->openAPINullablesSetToNull, 'table'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('table', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['table'] = $table; + $this->container['period'] = $period; return $this; } /** - * Gets period + * Gets table * - * @return float|null + * @return string|null */ - public function getPeriod(): ?float + public function getTable(): ?string { - return $this->container['period']; + return $this->container['table']; } /** - * Sets period + * Sets table * - * @param float|null $period [readonly] + * @param string|null $table [readonly] * * @return $this */ - public function setPeriod(?float $period): static + public function setTable(?string $table): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($table)) { + array_push($this->openAPINullablesSetToNull, 'table'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('table', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['period'] = $period; + $this->container['table'] = $table; return $this; } diff --git a/src/Model/P11PayeLine.php b/src/Model/P11PayeLine.php index c5783ad..1244a5a 100644 --- a/src/Model/P11PayeLine.php +++ b/src/Model/P11PayeLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -61,16 +61,16 @@ class P11PayeLine implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'date' => '\DateTime', - 'period' => 'string', - 'monthNumber' => 'string', - 'weekNumber' => 'string', 'grossTaxablePay' => 'float', 'grossTaxablePayYTD' => 'float', + 'monthNumber' => 'string', + 'period' => 'string', + 'postgradLoan' => 'float', + 'studentLoan' => 'float', 'tax' => 'float', + 'taxCode' => 'string', 'taxYTD' => 'float', - 'studentLoan' => 'float', - 'postgradLoan' => 'float', - 'taxCode' => 'string' + 'weekNumber' => 'string' ]; /** @@ -80,16 +80,16 @@ class P11PayeLine implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'date' => 'date', - 'period' => null, - 'monthNumber' => null, - 'weekNumber' => null, 'grossTaxablePay' => 'double', 'grossTaxablePayYTD' => 'double', + 'monthNumber' => null, + 'period' => null, + 'postgradLoan' => 'double', + 'studentLoan' => 'double', 'tax' => 'double', + 'taxCode' => null, 'taxYTD' => 'double', - 'studentLoan' => 'double', - 'postgradLoan' => 'double', - 'taxCode' => null + 'weekNumber' => null ]; /** @@ -99,16 +99,16 @@ class P11PayeLine implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'date' => false, - 'period' => true, - 'monthNumber' => true, - 'weekNumber' => true, 'grossTaxablePay' => false, 'grossTaxablePayYTD' => false, + 'monthNumber' => true, + 'period' => true, + 'postgradLoan' => false, + 'studentLoan' => false, 'tax' => false, + 'taxCode' => true, 'taxYTD' => false, - 'studentLoan' => false, - 'postgradLoan' => false, - 'taxCode' => true + 'weekNumber' => true ]; /** @@ -198,16 +198,16 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'date' => 'date', - 'period' => 'period', - 'monthNumber' => 'monthNumber', - 'weekNumber' => 'weekNumber', 'grossTaxablePay' => 'grossTaxablePay', 'grossTaxablePayYTD' => 'grossTaxablePayYTD', + 'monthNumber' => 'monthNumber', + 'period' => 'period', + 'postgradLoan' => 'postgradLoan', + 'studentLoan' => 'studentLoan', 'tax' => 'tax', + 'taxCode' => 'taxCode', 'taxYTD' => 'taxYTD', - 'studentLoan' => 'studentLoan', - 'postgradLoan' => 'postgradLoan', - 'taxCode' => 'taxCode' + 'weekNumber' => 'weekNumber' ]; /** @@ -217,16 +217,16 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'date' => 'setDate', - 'period' => 'setPeriod', - 'monthNumber' => 'setMonthNumber', - 'weekNumber' => 'setWeekNumber', 'grossTaxablePay' => 'setGrossTaxablePay', 'grossTaxablePayYTD' => 'setGrossTaxablePayYTD', + 'monthNumber' => 'setMonthNumber', + 'period' => 'setPeriod', + 'postgradLoan' => 'setPostgradLoan', + 'studentLoan' => 'setStudentLoan', 'tax' => 'setTax', + 'taxCode' => 'setTaxCode', 'taxYTD' => 'setTaxYTD', - 'studentLoan' => 'setStudentLoan', - 'postgradLoan' => 'setPostgradLoan', - 'taxCode' => 'setTaxCode' + 'weekNumber' => 'setWeekNumber' ]; /** @@ -236,16 +236,16 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'date' => 'getDate', - 'period' => 'getPeriod', - 'monthNumber' => 'getMonthNumber', - 'weekNumber' => 'getWeekNumber', 'grossTaxablePay' => 'getGrossTaxablePay', 'grossTaxablePayYTD' => 'getGrossTaxablePayYTD', + 'monthNumber' => 'getMonthNumber', + 'period' => 'getPeriod', + 'postgradLoan' => 'getPostgradLoan', + 'studentLoan' => 'getStudentLoan', 'tax' => 'getTax', + 'taxCode' => 'getTaxCode', 'taxYTD' => 'getTaxYTD', - 'studentLoan' => 'getStudentLoan', - 'postgradLoan' => 'getPostgradLoan', - 'taxCode' => 'getTaxCode' + 'weekNumber' => 'getWeekNumber' ]; /** @@ -305,16 +305,16 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('date', $data ?? [], null); - $this->setIfExists('period', $data ?? [], null); - $this->setIfExists('monthNumber', $data ?? [], null); - $this->setIfExists('weekNumber', $data ?? [], null); $this->setIfExists('grossTaxablePay', $data ?? [], null); $this->setIfExists('grossTaxablePayYTD', $data ?? [], null); - $this->setIfExists('tax', $data ?? [], null); - $this->setIfExists('taxYTD', $data ?? [], null); - $this->setIfExists('studentLoan', $data ?? [], null); + $this->setIfExists('monthNumber', $data ?? [], null); + $this->setIfExists('period', $data ?? [], null); $this->setIfExists('postgradLoan', $data ?? [], null); + $this->setIfExists('studentLoan', $data ?? [], null); + $this->setIfExists('tax', $data ?? [], null); $this->setIfExists('taxCode', $data ?? [], null); + $this->setIfExists('taxYTD', $data ?? [], null); + $this->setIfExists('weekNumber', $data ?? [], null); } /** @@ -387,35 +387,55 @@ public function setDate(?\DateTime $date): static } /** - * Gets period + * Gets grossTaxablePay * - * @return string|null + * @return float|null */ - public function getPeriod(): ?string + public function getGrossTaxablePay(): ?float { - return $this->container['period']; + return $this->container['grossTaxablePay']; } /** - * Sets period + * Sets grossTaxablePay * - * @param string|null $period [readonly] + * @param float|null $grossTaxablePay [readonly] * * @return $this */ - public function setPeriod(?string $period): static + public function setGrossTaxablePay(?float $grossTaxablePay): static { - if (is_null($period)) { - array_push($this->openAPINullablesSetToNull, 'period'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('period', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($grossTaxablePay)) { + throw new InvalidArgumentException('non-nullable grossTaxablePay cannot be null'); } - $this->container['period'] = $period; + $this->container['grossTaxablePay'] = $grossTaxablePay; + + return $this; + } + + /** + * Gets grossTaxablePayYTD + * + * @return float|null + */ + public function getGrossTaxablePayYTD(): ?float + { + return $this->container['grossTaxablePayYTD']; + } + + /** + * Sets grossTaxablePayYTD + * + * @param float|null $grossTaxablePayYTD [readonly] + * + * @return $this + */ + public function setGrossTaxablePayYTD(?float $grossTaxablePayYTD): static + { + if (is_null($grossTaxablePayYTD)) { + throw new InvalidArgumentException('non-nullable grossTaxablePayYTD cannot be null'); + } + $this->container['grossTaxablePayYTD'] = $grossTaxablePayYTD; return $this; } @@ -455,89 +475,89 @@ public function setMonthNumber(?string $monthNumber): static } /** - * Gets weekNumber + * Gets period * * @return string|null */ - public function getWeekNumber(): ?string + public function getPeriod(): ?string { - return $this->container['weekNumber']; + return $this->container['period']; } /** - * Sets weekNumber + * Sets period * - * @param string|null $weekNumber [readonly] + * @param string|null $period [readonly] * * @return $this */ - public function setWeekNumber(?string $weekNumber): static + public function setPeriod(?string $period): static { - if (is_null($weekNumber)) { - array_push($this->openAPINullablesSetToNull, 'weekNumber'); + if (is_null($period)) { + array_push($this->openAPINullablesSetToNull, 'period'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('weekNumber', $nullablesSetToNull); + $index = array_search('period', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['weekNumber'] = $weekNumber; + $this->container['period'] = $period; return $this; } /** - * Gets grossTaxablePay + * Gets postgradLoan * * @return float|null */ - public function getGrossTaxablePay(): ?float + public function getPostgradLoan(): ?float { - return $this->container['grossTaxablePay']; + return $this->container['postgradLoan']; } /** - * Sets grossTaxablePay + * Sets postgradLoan * - * @param float|null $grossTaxablePay [readonly] + * @param float|null $postgradLoan [readonly] * * @return $this */ - public function setGrossTaxablePay(?float $grossTaxablePay): static + public function setPostgradLoan(?float $postgradLoan): static { - if (is_null($grossTaxablePay)) { - throw new InvalidArgumentException('non-nullable grossTaxablePay cannot be null'); + if (is_null($postgradLoan)) { + throw new InvalidArgumentException('non-nullable postgradLoan cannot be null'); } - $this->container['grossTaxablePay'] = $grossTaxablePay; + $this->container['postgradLoan'] = $postgradLoan; return $this; } /** - * Gets grossTaxablePayYTD + * Gets studentLoan * * @return float|null */ - public function getGrossTaxablePayYTD(): ?float + public function getStudentLoan(): ?float { - return $this->container['grossTaxablePayYTD']; + return $this->container['studentLoan']; } /** - * Sets grossTaxablePayYTD + * Sets studentLoan * - * @param float|null $grossTaxablePayYTD [readonly] + * @param float|null $studentLoan [readonly] * * @return $this */ - public function setGrossTaxablePayYTD(?float $grossTaxablePayYTD): static + public function setStudentLoan(?float $studentLoan): static { - if (is_null($grossTaxablePayYTD)) { - throw new InvalidArgumentException('non-nullable grossTaxablePayYTD cannot be null'); + if (is_null($studentLoan)) { + throw new InvalidArgumentException('non-nullable studentLoan cannot be null'); } - $this->container['grossTaxablePayYTD'] = $grossTaxablePayYTD; + $this->container['studentLoan'] = $studentLoan; return $this; } @@ -570,116 +590,96 @@ public function setTax(?float $tax): static } /** - * Gets taxYTD - * - * @return float|null - */ - public function getTaxYTD(): ?float - { - return $this->container['taxYTD']; - } - - /** - * Sets taxYTD - * - * @param float|null $taxYTD [readonly] - * - * @return $this - */ - public function setTaxYTD(?float $taxYTD): static - { - if (is_null($taxYTD)) { - throw new InvalidArgumentException('non-nullable taxYTD cannot be null'); - } - $this->container['taxYTD'] = $taxYTD; - - return $this; - } - - /** - * Gets studentLoan + * Gets taxCode * - * @return float|null + * @return string|null */ - public function getStudentLoan(): ?float + public function getTaxCode(): ?string { - return $this->container['studentLoan']; + return $this->container['taxCode']; } /** - * Sets studentLoan + * Sets taxCode * - * @param float|null $studentLoan [readonly] + * @param string|null $taxCode [readonly] * * @return $this */ - public function setStudentLoan(?float $studentLoan): static + public function setTaxCode(?string $taxCode): static { - if (is_null($studentLoan)) { - throw new InvalidArgumentException('non-nullable studentLoan cannot be null'); + if (is_null($taxCode)) { + array_push($this->openAPINullablesSetToNull, 'taxCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('taxCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['studentLoan'] = $studentLoan; + $this->container['taxCode'] = $taxCode; return $this; } /** - * Gets postgradLoan + * Gets taxYTD * * @return float|null */ - public function getPostgradLoan(): ?float + public function getTaxYTD(): ?float { - return $this->container['postgradLoan']; + return $this->container['taxYTD']; } /** - * Sets postgradLoan + * Sets taxYTD * - * @param float|null $postgradLoan [readonly] + * @param float|null $taxYTD [readonly] * * @return $this */ - public function setPostgradLoan(?float $postgradLoan): static + public function setTaxYTD(?float $taxYTD): static { - if (is_null($postgradLoan)) { - throw new InvalidArgumentException('non-nullable postgradLoan cannot be null'); + if (is_null($taxYTD)) { + throw new InvalidArgumentException('non-nullable taxYTD cannot be null'); } - $this->container['postgradLoan'] = $postgradLoan; + $this->container['taxYTD'] = $taxYTD; return $this; } /** - * Gets taxCode + * Gets weekNumber * * @return string|null */ - public function getTaxCode(): ?string + public function getWeekNumber(): ?string { - return $this->container['taxCode']; + return $this->container['weekNumber']; } /** - * Sets taxCode + * Sets weekNumber * - * @param string|null $taxCode [readonly] + * @param string|null $weekNumber [readonly] * * @return $this */ - public function setTaxCode(?string $taxCode): static + public function setWeekNumber(?string $weekNumber): static { - if (is_null($taxCode)) { - array_push($this->openAPINullablesSetToNull, 'taxCode'); + if (is_null($weekNumber)) { + array_push($this->openAPINullablesSetToNull, 'weekNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxCode', $nullablesSetToNull); + $index = array_search('weekNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxCode'] = $taxCode; + $this->container['weekNumber'] = $weekNumber; return $this; } diff --git a/src/Model/P11PayeSummary.php b/src/Model/P11PayeSummary.php index 1d3b2cf..677ba9c 100644 --- a/src/Model/P11PayeSummary.php +++ b/src/Model/P11PayeSummary.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/P11PayeTotalsLine.php b/src/Model/P11PayeTotalsLine.php index 02852e5..66e9baa 100644 --- a/src/Model/P11PayeTotalsLine.php +++ b/src/Model/P11PayeTotalsLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,12 +60,12 @@ class P11PayeTotalsLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'studentLoan' => 'float', - 'postgradLoan' => 'float', 'pay' => 'float', - 'totalPayToDate' => 'float', + 'postgradLoan' => 'float', + 'studentLoan' => 'float', + 'taxDue' => 'float', 'taxDueToDate' => 'float', - 'taxDue' => 'float' + 'totalPayToDate' => 'float' ]; /** @@ -74,12 +74,12 @@ class P11PayeTotalsLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'studentLoan' => 'double', - 'postgradLoan' => 'double', 'pay' => 'double', - 'totalPayToDate' => 'double', + 'postgradLoan' => 'double', + 'studentLoan' => 'double', + 'taxDue' => 'double', 'taxDueToDate' => 'double', - 'taxDue' => 'double' + 'totalPayToDate' => 'double' ]; /** @@ -88,12 +88,12 @@ class P11PayeTotalsLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'studentLoan' => false, - 'postgradLoan' => false, 'pay' => false, - 'totalPayToDate' => false, + 'postgradLoan' => false, + 'studentLoan' => false, + 'taxDue' => false, 'taxDueToDate' => false, - 'taxDue' => false + 'totalPayToDate' => false ]; /** @@ -182,12 +182,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'studentLoan' => 'studentLoan', - 'postgradLoan' => 'postgradLoan', 'pay' => 'pay', - 'totalPayToDate' => 'totalPayToDate', + 'postgradLoan' => 'postgradLoan', + 'studentLoan' => 'studentLoan', + 'taxDue' => 'taxDue', 'taxDueToDate' => 'taxDueToDate', - 'taxDue' => 'taxDue' + 'totalPayToDate' => 'totalPayToDate' ]; /** @@ -196,12 +196,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'studentLoan' => 'setStudentLoan', - 'postgradLoan' => 'setPostgradLoan', 'pay' => 'setPay', - 'totalPayToDate' => 'setTotalPayToDate', + 'postgradLoan' => 'setPostgradLoan', + 'studentLoan' => 'setStudentLoan', + 'taxDue' => 'setTaxDue', 'taxDueToDate' => 'setTaxDueToDate', - 'taxDue' => 'setTaxDue' + 'totalPayToDate' => 'setTotalPayToDate' ]; /** @@ -210,12 +210,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'studentLoan' => 'getStudentLoan', - 'postgradLoan' => 'getPostgradLoan', 'pay' => 'getPay', - 'totalPayToDate' => 'getTotalPayToDate', + 'postgradLoan' => 'getPostgradLoan', + 'studentLoan' => 'getStudentLoan', + 'taxDue' => 'getTaxDue', 'taxDueToDate' => 'getTaxDueToDate', - 'taxDue' => 'getTaxDue' + 'totalPayToDate' => 'getTotalPayToDate' ]; /** @@ -274,12 +274,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('studentLoan', $data ?? [], null); - $this->setIfExists('postgradLoan', $data ?? [], null); $this->setIfExists('pay', $data ?? [], null); - $this->setIfExists('totalPayToDate', $data ?? [], null); - $this->setIfExists('taxDueToDate', $data ?? [], null); + $this->setIfExists('postgradLoan', $data ?? [], null); + $this->setIfExists('studentLoan', $data ?? [], null); $this->setIfExists('taxDue', $data ?? [], null); + $this->setIfExists('taxDueToDate', $data ?? [], null); + $this->setIfExists('totalPayToDate', $data ?? [], null); } /** @@ -325,28 +325,28 @@ public function valid(): bool /** - * Gets studentLoan + * Gets pay * * @return float|null */ - public function getStudentLoan(): ?float + public function getPay(): ?float { - return $this->container['studentLoan']; + return $this->container['pay']; } /** - * Sets studentLoan + * Sets pay * - * @param float|null $studentLoan [readonly] + * @param float|null $pay [readonly] * * @return $this */ - public function setStudentLoan(?float $studentLoan): static + public function setPay(?float $pay): static { - if (is_null($studentLoan)) { - throw new InvalidArgumentException('non-nullable studentLoan cannot be null'); + if (is_null($pay)) { + throw new InvalidArgumentException('non-nullable pay cannot be null'); } - $this->container['studentLoan'] = $studentLoan; + $this->container['pay'] = $pay; return $this; } @@ -379,55 +379,55 @@ public function setPostgradLoan(?float $postgradLoan): static } /** - * Gets pay + * Gets studentLoan * * @return float|null */ - public function getPay(): ?float + public function getStudentLoan(): ?float { - return $this->container['pay']; + return $this->container['studentLoan']; } /** - * Sets pay + * Sets studentLoan * - * @param float|null $pay [readonly] + * @param float|null $studentLoan [readonly] * * @return $this */ - public function setPay(?float $pay): static + public function setStudentLoan(?float $studentLoan): static { - if (is_null($pay)) { - throw new InvalidArgumentException('non-nullable pay cannot be null'); + if (is_null($studentLoan)) { + throw new InvalidArgumentException('non-nullable studentLoan cannot be null'); } - $this->container['pay'] = $pay; + $this->container['studentLoan'] = $studentLoan; return $this; } /** - * Gets totalPayToDate + * Gets taxDue * * @return float|null */ - public function getTotalPayToDate(): ?float + public function getTaxDue(): ?float { - return $this->container['totalPayToDate']; + return $this->container['taxDue']; } /** - * Sets totalPayToDate + * Sets taxDue * - * @param float|null $totalPayToDate [readonly] + * @param float|null $taxDue [readonly] * * @return $this */ - public function setTotalPayToDate(?float $totalPayToDate): static + public function setTaxDue(?float $taxDue): static { - if (is_null($totalPayToDate)) { - throw new InvalidArgumentException('non-nullable totalPayToDate cannot be null'); + if (is_null($taxDue)) { + throw new InvalidArgumentException('non-nullable taxDue cannot be null'); } - $this->container['totalPayToDate'] = $totalPayToDate; + $this->container['taxDue'] = $taxDue; return $this; } @@ -460,28 +460,28 @@ public function setTaxDueToDate(?float $taxDueToDate): static } /** - * Gets taxDue + * Gets totalPayToDate * * @return float|null */ - public function getTaxDue(): ?float + public function getTotalPayToDate(): ?float { - return $this->container['taxDue']; + return $this->container['totalPayToDate']; } /** - * Sets taxDue + * Sets totalPayToDate * - * @param float|null $taxDue [readonly] + * @param float|null $totalPayToDate [readonly] * * @return $this */ - public function setTaxDue(?float $taxDue): static + public function setTotalPayToDate(?float $totalPayToDate): static { - if (is_null($taxDue)) { - throw new InvalidArgumentException('non-nullable taxDue cannot be null'); + if (is_null($totalPayToDate)) { + throw new InvalidArgumentException('non-nullable totalPayToDate cannot be null'); } - $this->container['taxDue'] = $taxDue; + $this->container['totalPayToDate'] = $totalPayToDate; return $this; } diff --git a/src/Model/P11ReportResponse.php b/src/Model/P11ReportResponse.php index 54cff64..06b1be3 100644 --- a/src/Model/P11ReportResponse.php +++ b/src/Model/P11ReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class P11ReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\P11', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class P11ReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class P11ReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/P11dCarFreeFuelWithdrawn.php b/src/Model/P11dCarFreeFuelWithdrawn.php index 54a86fc..aa4108c 100644 --- a/src/Model/P11dCarFreeFuelWithdrawn.php +++ b/src/Model/P11dCarFreeFuelWithdrawn.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/P11dExpenses.php b/src/Model/P11dExpenses.php index 9b8a676..a5ca906 100644 --- a/src/Model/P11dExpenses.php +++ b/src/Model/P11dExpenses.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class P11dExpenses implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'travAndSub' => '\SynergiTech\Staffology\Model\P11DSingleItem', 'ent' => '\SynergiTech\Staffology\Model\P11DSingleItem', 'homeTel' => '\SynergiTech\Staffology\Model\P11DSingleItem', 'nonQualRel' => '\SynergiTech\Staffology\Model\P11DSingleItem', 'other' => '\SynergiTech\Staffology\Model\P11DSingleItem', + 'travAndSub' => '\SynergiTech\Staffology\Model\P11DSingleItem', 'typeLetter' => 'string' ]; @@ -73,11 +73,11 @@ class P11dExpenses implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'travAndSub' => null, 'ent' => null, 'homeTel' => null, 'nonQualRel' => null, 'other' => null, + 'travAndSub' => null, 'typeLetter' => null ]; @@ -87,11 +87,11 @@ class P11dExpenses implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'travAndSub' => false, 'ent' => false, 'homeTel' => false, 'nonQualRel' => false, 'other' => false, + 'travAndSub' => false, 'typeLetter' => true ]; @@ -181,11 +181,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'travAndSub' => 'travAndSub', 'ent' => 'ent', 'homeTel' => 'homeTel', 'nonQualRel' => 'nonQualRel', 'other' => 'other', + 'travAndSub' => 'travAndSub', 'typeLetter' => 'typeLetter' ]; @@ -195,11 +195,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'travAndSub' => 'setTravAndSub', 'ent' => 'setEnt', 'homeTel' => 'setHomeTel', 'nonQualRel' => 'setNonQualRel', 'other' => 'setOther', + 'travAndSub' => 'setTravAndSub', 'typeLetter' => 'setTypeLetter' ]; @@ -209,11 +209,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'travAndSub' => 'getTravAndSub', 'ent' => 'getEnt', 'homeTel' => 'getHomeTel', 'nonQualRel' => 'getNonQualRel', 'other' => 'getOther', + 'travAndSub' => 'getTravAndSub', 'typeLetter' => 'getTypeLetter' ]; @@ -273,11 +273,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('travAndSub', $data ?? [], null); $this->setIfExists('ent', $data ?? [], null); $this->setIfExists('homeTel', $data ?? [], null); $this->setIfExists('nonQualRel', $data ?? [], null); $this->setIfExists('other', $data ?? [], null); + $this->setIfExists('travAndSub', $data ?? [], null); $this->setIfExists('typeLetter', $data ?? [], null); } @@ -323,33 +323,6 @@ public function valid(): bool } - /** - * Gets travAndSub - * - * @return \SynergiTech\Staffology\Model\P11DSingleItem|null - */ - public function getTravAndSub(): ?\SynergiTech\Staffology\Model\P11DSingleItem - { - return $this->container['travAndSub']; - } - - /** - * Sets travAndSub - * - * @param \SynergiTech\Staffology\Model\P11DSingleItem|null $travAndSub travAndSub - * - * @return $this - */ - public function setTravAndSub(?\SynergiTech\Staffology\Model\P11DSingleItem $travAndSub): static - { - if (is_null($travAndSub)) { - throw new InvalidArgumentException('non-nullable travAndSub cannot be null'); - } - $this->container['travAndSub'] = $travAndSub; - - return $this; - } - /** * Gets ent * @@ -458,6 +431,33 @@ public function setOther(?\SynergiTech\Staffology\Model\P11DSingleItem $other): return $this; } + /** + * Gets travAndSub + * + * @return \SynergiTech\Staffology\Model\P11DSingleItem|null + */ + public function getTravAndSub(): ?\SynergiTech\Staffology\Model\P11DSingleItem + { + return $this->container['travAndSub']; + } + + /** + * Sets travAndSub + * + * @param \SynergiTech\Staffology\Model\P11DSingleItem|null $travAndSub travAndSub + * + * @return $this + */ + public function setTravAndSub(?\SynergiTech\Staffology\Model\P11DSingleItem $travAndSub): static + { + if (is_null($travAndSub)) { + throw new InvalidArgumentException('non-nullable travAndSub cannot be null'); + } + $this->container['travAndSub'] = $travAndSub; + + return $this; + } + /** * Gets typeLetter * diff --git a/src/Model/P11dVans.php b/src/Model/P11dVans.php index 5826a5c..58256ee 100644 --- a/src/Model/P11dVans.php +++ b/src/Model/P11dVans.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,19 +59,19 @@ class P11dVans implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'annValProRata' => 'string', + 'cashEquivOrRelevantAmt' => 'string', + 'costOrAmtForgone' => 'string', + 'desc' => 'string', + 'excess' => 'string', 'fuelCashEquivOrRelevantAmt' => 'string', - 'typeLetter' => 'string', + 'grossOrAmtForgone' => 'string', + 'madeGood' => 'string', + 'other' => 'string', 'taxablePmt' => 'string', - 'excess' => 'string', 'taxablePmtOrRelevantAmt' => 'string', 'tradingOrgInd' => 'string', - 'desc' => 'string', - 'other' => 'string', - 'annValProRata' => 'string', - 'grossOrAmtForgone' => 'string', - 'costOrAmtForgone' => 'string', - 'madeGood' => 'string', - 'cashEquivOrRelevantAmt' => 'string' + 'typeLetter' => 'string' ]; /** @@ -80,19 +80,19 @@ class P11dVans implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'annValProRata' => null, + 'cashEquivOrRelevantAmt' => null, + 'costOrAmtForgone' => null, + 'desc' => null, + 'excess' => null, 'fuelCashEquivOrRelevantAmt' => null, - 'typeLetter' => null, + 'grossOrAmtForgone' => null, + 'madeGood' => null, + 'other' => null, 'taxablePmt' => null, - 'excess' => null, 'taxablePmtOrRelevantAmt' => null, 'tradingOrgInd' => null, - 'desc' => null, - 'other' => null, - 'annValProRata' => null, - 'grossOrAmtForgone' => null, - 'costOrAmtForgone' => null, - 'madeGood' => null, - 'cashEquivOrRelevantAmt' => null + 'typeLetter' => null ]; /** @@ -101,19 +101,19 @@ class P11dVans implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'annValProRata' => true, + 'cashEquivOrRelevantAmt' => true, + 'costOrAmtForgone' => true, + 'desc' => true, + 'excess' => true, 'fuelCashEquivOrRelevantAmt' => true, - 'typeLetter' => true, + 'grossOrAmtForgone' => true, + 'madeGood' => true, + 'other' => true, 'taxablePmt' => true, - 'excess' => true, 'taxablePmtOrRelevantAmt' => true, 'tradingOrgInd' => true, - 'desc' => true, - 'other' => true, - 'annValProRata' => true, - 'grossOrAmtForgone' => true, - 'costOrAmtForgone' => true, - 'madeGood' => true, - 'cashEquivOrRelevantAmt' => true + 'typeLetter' => true ]; /** @@ -202,19 +202,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'annValProRata' => 'annValProRata', + 'cashEquivOrRelevantAmt' => 'cashEquivOrRelevantAmt', + 'costOrAmtForgone' => 'costOrAmtForgone', + 'desc' => 'desc', + 'excess' => 'excess', 'fuelCashEquivOrRelevantAmt' => 'fuelCashEquivOrRelevantAmt', - 'typeLetter' => 'typeLetter', + 'grossOrAmtForgone' => 'grossOrAmtForgone', + 'madeGood' => 'madeGood', + 'other' => 'other', 'taxablePmt' => 'taxablePmt', - 'excess' => 'excess', 'taxablePmtOrRelevantAmt' => 'taxablePmtOrRelevantAmt', 'tradingOrgInd' => 'tradingOrgInd', - 'desc' => 'desc', - 'other' => 'other', - 'annValProRata' => 'annValProRata', - 'grossOrAmtForgone' => 'grossOrAmtForgone', - 'costOrAmtForgone' => 'costOrAmtForgone', - 'madeGood' => 'madeGood', - 'cashEquivOrRelevantAmt' => 'cashEquivOrRelevantAmt' + 'typeLetter' => 'typeLetter' ]; /** @@ -223,19 +223,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'annValProRata' => 'setAnnValProRata', + 'cashEquivOrRelevantAmt' => 'setCashEquivOrRelevantAmt', + 'costOrAmtForgone' => 'setCostOrAmtForgone', + 'desc' => 'setDesc', + 'excess' => 'setExcess', 'fuelCashEquivOrRelevantAmt' => 'setFuelCashEquivOrRelevantAmt', - 'typeLetter' => 'setTypeLetter', + 'grossOrAmtForgone' => 'setGrossOrAmtForgone', + 'madeGood' => 'setMadeGood', + 'other' => 'setOther', 'taxablePmt' => 'setTaxablePmt', - 'excess' => 'setExcess', 'taxablePmtOrRelevantAmt' => 'setTaxablePmtOrRelevantAmt', 'tradingOrgInd' => 'setTradingOrgInd', - 'desc' => 'setDesc', - 'other' => 'setOther', - 'annValProRata' => 'setAnnValProRata', - 'grossOrAmtForgone' => 'setGrossOrAmtForgone', - 'costOrAmtForgone' => 'setCostOrAmtForgone', - 'madeGood' => 'setMadeGood', - 'cashEquivOrRelevantAmt' => 'setCashEquivOrRelevantAmt' + 'typeLetter' => 'setTypeLetter' ]; /** @@ -244,19 +244,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'annValProRata' => 'getAnnValProRata', + 'cashEquivOrRelevantAmt' => 'getCashEquivOrRelevantAmt', + 'costOrAmtForgone' => 'getCostOrAmtForgone', + 'desc' => 'getDesc', + 'excess' => 'getExcess', 'fuelCashEquivOrRelevantAmt' => 'getFuelCashEquivOrRelevantAmt', - 'typeLetter' => 'getTypeLetter', + 'grossOrAmtForgone' => 'getGrossOrAmtForgone', + 'madeGood' => 'getMadeGood', + 'other' => 'getOther', 'taxablePmt' => 'getTaxablePmt', - 'excess' => 'getExcess', 'taxablePmtOrRelevantAmt' => 'getTaxablePmtOrRelevantAmt', 'tradingOrgInd' => 'getTradingOrgInd', - 'desc' => 'getDesc', - 'other' => 'getOther', - 'annValProRata' => 'getAnnValProRata', - 'grossOrAmtForgone' => 'getGrossOrAmtForgone', - 'costOrAmtForgone' => 'getCostOrAmtForgone', - 'madeGood' => 'getMadeGood', - 'cashEquivOrRelevantAmt' => 'getCashEquivOrRelevantAmt' + 'typeLetter' => 'getTypeLetter' ]; /** @@ -315,19 +315,19 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('annValProRata', $data ?? [], null); + $this->setIfExists('cashEquivOrRelevantAmt', $data ?? [], null); + $this->setIfExists('costOrAmtForgone', $data ?? [], null); + $this->setIfExists('desc', $data ?? [], null); + $this->setIfExists('excess', $data ?? [], null); $this->setIfExists('fuelCashEquivOrRelevantAmt', $data ?? [], null); - $this->setIfExists('typeLetter', $data ?? [], null); + $this->setIfExists('grossOrAmtForgone', $data ?? [], null); + $this->setIfExists('madeGood', $data ?? [], null); + $this->setIfExists('other', $data ?? [], null); $this->setIfExists('taxablePmt', $data ?? [], null); - $this->setIfExists('excess', $data ?? [], null); $this->setIfExists('taxablePmtOrRelevantAmt', $data ?? [], null); $this->setIfExists('tradingOrgInd', $data ?? [], null); - $this->setIfExists('desc', $data ?? [], null); - $this->setIfExists('other', $data ?? [], null); - $this->setIfExists('annValProRata', $data ?? [], null); - $this->setIfExists('grossOrAmtForgone', $data ?? [], null); - $this->setIfExists('costOrAmtForgone', $data ?? [], null); - $this->setIfExists('madeGood', $data ?? [], null); - $this->setIfExists('cashEquivOrRelevantAmt', $data ?? [], null); + $this->setIfExists('typeLetter', $data ?? [], null); } /** @@ -373,443 +373,443 @@ public function valid(): bool /** - * Gets fuelCashEquivOrRelevantAmt + * Gets annValProRata * * @return string|null */ - public function getFuelCashEquivOrRelevantAmt(): ?string + public function getAnnValProRata(): ?string { - return $this->container['fuelCashEquivOrRelevantAmt']; + return $this->container['annValProRata']; } /** - * Sets fuelCashEquivOrRelevantAmt + * Sets annValProRata * - * @param string|null $fuelCashEquivOrRelevantAmt fuelCashEquivOrRelevantAmt + * @param string|null $annValProRata annValProRata * * @return $this */ - public function setFuelCashEquivOrRelevantAmt(?string $fuelCashEquivOrRelevantAmt): static + public function setAnnValProRata(?string $annValProRata): static { - if (is_null($fuelCashEquivOrRelevantAmt)) { - array_push($this->openAPINullablesSetToNull, 'fuelCashEquivOrRelevantAmt'); + if (is_null($annValProRata)) { + array_push($this->openAPINullablesSetToNull, 'annValProRata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fuelCashEquivOrRelevantAmt', $nullablesSetToNull); + $index = array_search('annValProRata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['fuelCashEquivOrRelevantAmt'] = $fuelCashEquivOrRelevantAmt; + $this->container['annValProRata'] = $annValProRata; return $this; } /** - * Gets typeLetter + * Gets cashEquivOrRelevantAmt * * @return string|null */ - public function getTypeLetter(): ?string + public function getCashEquivOrRelevantAmt(): ?string { - return $this->container['typeLetter']; + return $this->container['cashEquivOrRelevantAmt']; } /** - * Sets typeLetter + * Sets cashEquivOrRelevantAmt * - * @param string|null $typeLetter typeLetter + * @param string|null $cashEquivOrRelevantAmt cashEquivOrRelevantAmt * * @return $this */ - public function setTypeLetter(?string $typeLetter): static + public function setCashEquivOrRelevantAmt(?string $cashEquivOrRelevantAmt): static { - if (is_null($typeLetter)) { - array_push($this->openAPINullablesSetToNull, 'typeLetter'); + if (is_null($cashEquivOrRelevantAmt)) { + array_push($this->openAPINullablesSetToNull, 'cashEquivOrRelevantAmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('typeLetter', $nullablesSetToNull); + $index = array_search('cashEquivOrRelevantAmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['typeLetter'] = $typeLetter; + $this->container['cashEquivOrRelevantAmt'] = $cashEquivOrRelevantAmt; return $this; } /** - * Gets taxablePmt + * Gets costOrAmtForgone * * @return string|null */ - public function getTaxablePmt(): ?string + public function getCostOrAmtForgone(): ?string { - return $this->container['taxablePmt']; + return $this->container['costOrAmtForgone']; } /** - * Sets taxablePmt + * Sets costOrAmtForgone * - * @param string|null $taxablePmt taxablePmt + * @param string|null $costOrAmtForgone costOrAmtForgone * * @return $this */ - public function setTaxablePmt(?string $taxablePmt): static + public function setCostOrAmtForgone(?string $costOrAmtForgone): static { - if (is_null($taxablePmt)) { - array_push($this->openAPINullablesSetToNull, 'taxablePmt'); + if (is_null($costOrAmtForgone)) { + array_push($this->openAPINullablesSetToNull, 'costOrAmtForgone'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxablePmt', $nullablesSetToNull); + $index = array_search('costOrAmtForgone', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxablePmt'] = $taxablePmt; + $this->container['costOrAmtForgone'] = $costOrAmtForgone; return $this; } /** - * Gets excess + * Gets desc * * @return string|null */ - public function getExcess(): ?string + public function getDesc(): ?string { - return $this->container['excess']; + return $this->container['desc']; } /** - * Sets excess + * Sets desc * - * @param string|null $excess excess + * @param string|null $desc desc * * @return $this */ - public function setExcess(?string $excess): static + public function setDesc(?string $desc): static { - if (is_null($excess)) { - array_push($this->openAPINullablesSetToNull, 'excess'); + if (is_null($desc)) { + array_push($this->openAPINullablesSetToNull, 'desc'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('excess', $nullablesSetToNull); + $index = array_search('desc', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['excess'] = $excess; + $this->container['desc'] = $desc; return $this; } /** - * Gets taxablePmtOrRelevantAmt + * Gets excess * * @return string|null */ - public function getTaxablePmtOrRelevantAmt(): ?string + public function getExcess(): ?string { - return $this->container['taxablePmtOrRelevantAmt']; + return $this->container['excess']; } /** - * Sets taxablePmtOrRelevantAmt + * Sets excess * - * @param string|null $taxablePmtOrRelevantAmt taxablePmtOrRelevantAmt + * @param string|null $excess excess * * @return $this */ - public function setTaxablePmtOrRelevantAmt(?string $taxablePmtOrRelevantAmt): static + public function setExcess(?string $excess): static { - if (is_null($taxablePmtOrRelevantAmt)) { - array_push($this->openAPINullablesSetToNull, 'taxablePmtOrRelevantAmt'); + if (is_null($excess)) { + array_push($this->openAPINullablesSetToNull, 'excess'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxablePmtOrRelevantAmt', $nullablesSetToNull); + $index = array_search('excess', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxablePmtOrRelevantAmt'] = $taxablePmtOrRelevantAmt; + $this->container['excess'] = $excess; return $this; } /** - * Gets tradingOrgInd + * Gets fuelCashEquivOrRelevantAmt * * @return string|null */ - public function getTradingOrgInd(): ?string + public function getFuelCashEquivOrRelevantAmt(): ?string { - return $this->container['tradingOrgInd']; + return $this->container['fuelCashEquivOrRelevantAmt']; } /** - * Sets tradingOrgInd + * Sets fuelCashEquivOrRelevantAmt * - * @param string|null $tradingOrgInd tradingOrgInd + * @param string|null $fuelCashEquivOrRelevantAmt fuelCashEquivOrRelevantAmt * * @return $this */ - public function setTradingOrgInd(?string $tradingOrgInd): static + public function setFuelCashEquivOrRelevantAmt(?string $fuelCashEquivOrRelevantAmt): static { - if (is_null($tradingOrgInd)) { - array_push($this->openAPINullablesSetToNull, 'tradingOrgInd'); + if (is_null($fuelCashEquivOrRelevantAmt)) { + array_push($this->openAPINullablesSetToNull, 'fuelCashEquivOrRelevantAmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tradingOrgInd', $nullablesSetToNull); + $index = array_search('fuelCashEquivOrRelevantAmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tradingOrgInd'] = $tradingOrgInd; + $this->container['fuelCashEquivOrRelevantAmt'] = $fuelCashEquivOrRelevantAmt; return $this; } /** - * Gets desc + * Gets grossOrAmtForgone * * @return string|null */ - public function getDesc(): ?string + public function getGrossOrAmtForgone(): ?string { - return $this->container['desc']; + return $this->container['grossOrAmtForgone']; } /** - * Sets desc + * Sets grossOrAmtForgone * - * @param string|null $desc desc + * @param string|null $grossOrAmtForgone grossOrAmtForgone * * @return $this */ - public function setDesc(?string $desc): static + public function setGrossOrAmtForgone(?string $grossOrAmtForgone): static { - if (is_null($desc)) { - array_push($this->openAPINullablesSetToNull, 'desc'); + if (is_null($grossOrAmtForgone)) { + array_push($this->openAPINullablesSetToNull, 'grossOrAmtForgone'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('desc', $nullablesSetToNull); + $index = array_search('grossOrAmtForgone', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['desc'] = $desc; + $this->container['grossOrAmtForgone'] = $grossOrAmtForgone; return $this; } /** - * Gets other + * Gets madeGood * * @return string|null */ - public function getOther(): ?string + public function getMadeGood(): ?string { - return $this->container['other']; + return $this->container['madeGood']; } /** - * Sets other + * Sets madeGood * - * @param string|null $other other + * @param string|null $madeGood madeGood * * @return $this */ - public function setOther(?string $other): static + public function setMadeGood(?string $madeGood): static { - if (is_null($other)) { - array_push($this->openAPINullablesSetToNull, 'other'); + if (is_null($madeGood)) { + array_push($this->openAPINullablesSetToNull, 'madeGood'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('other', $nullablesSetToNull); + $index = array_search('madeGood', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['other'] = $other; + $this->container['madeGood'] = $madeGood; return $this; } /** - * Gets annValProRata + * Gets other * * @return string|null */ - public function getAnnValProRata(): ?string + public function getOther(): ?string { - return $this->container['annValProRata']; + return $this->container['other']; } /** - * Sets annValProRata + * Sets other * - * @param string|null $annValProRata annValProRata + * @param string|null $other other * * @return $this */ - public function setAnnValProRata(?string $annValProRata): static + public function setOther(?string $other): static { - if (is_null($annValProRata)) { - array_push($this->openAPINullablesSetToNull, 'annValProRata'); + if (is_null($other)) { + array_push($this->openAPINullablesSetToNull, 'other'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('annValProRata', $nullablesSetToNull); + $index = array_search('other', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['annValProRata'] = $annValProRata; + $this->container['other'] = $other; return $this; } /** - * Gets grossOrAmtForgone + * Gets taxablePmt * * @return string|null */ - public function getGrossOrAmtForgone(): ?string + public function getTaxablePmt(): ?string { - return $this->container['grossOrAmtForgone']; + return $this->container['taxablePmt']; } /** - * Sets grossOrAmtForgone + * Sets taxablePmt * - * @param string|null $grossOrAmtForgone grossOrAmtForgone + * @param string|null $taxablePmt taxablePmt * * @return $this */ - public function setGrossOrAmtForgone(?string $grossOrAmtForgone): static + public function setTaxablePmt(?string $taxablePmt): static { - if (is_null($grossOrAmtForgone)) { - array_push($this->openAPINullablesSetToNull, 'grossOrAmtForgone'); + if (is_null($taxablePmt)) { + array_push($this->openAPINullablesSetToNull, 'taxablePmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('grossOrAmtForgone', $nullablesSetToNull); + $index = array_search('taxablePmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['grossOrAmtForgone'] = $grossOrAmtForgone; + $this->container['taxablePmt'] = $taxablePmt; return $this; } /** - * Gets costOrAmtForgone + * Gets taxablePmtOrRelevantAmt * * @return string|null */ - public function getCostOrAmtForgone(): ?string + public function getTaxablePmtOrRelevantAmt(): ?string { - return $this->container['costOrAmtForgone']; + return $this->container['taxablePmtOrRelevantAmt']; } /** - * Sets costOrAmtForgone + * Sets taxablePmtOrRelevantAmt * - * @param string|null $costOrAmtForgone costOrAmtForgone + * @param string|null $taxablePmtOrRelevantAmt taxablePmtOrRelevantAmt * * @return $this */ - public function setCostOrAmtForgone(?string $costOrAmtForgone): static + public function setTaxablePmtOrRelevantAmt(?string $taxablePmtOrRelevantAmt): static { - if (is_null($costOrAmtForgone)) { - array_push($this->openAPINullablesSetToNull, 'costOrAmtForgone'); + if (is_null($taxablePmtOrRelevantAmt)) { + array_push($this->openAPINullablesSetToNull, 'taxablePmtOrRelevantAmt'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costOrAmtForgone', $nullablesSetToNull); + $index = array_search('taxablePmtOrRelevantAmt', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costOrAmtForgone'] = $costOrAmtForgone; + $this->container['taxablePmtOrRelevantAmt'] = $taxablePmtOrRelevantAmt; return $this; } /** - * Gets madeGood + * Gets tradingOrgInd * * @return string|null */ - public function getMadeGood(): ?string + public function getTradingOrgInd(): ?string { - return $this->container['madeGood']; + return $this->container['tradingOrgInd']; } /** - * Sets madeGood + * Sets tradingOrgInd * - * @param string|null $madeGood madeGood + * @param string|null $tradingOrgInd tradingOrgInd * * @return $this */ - public function setMadeGood(?string $madeGood): static + public function setTradingOrgInd(?string $tradingOrgInd): static { - if (is_null($madeGood)) { - array_push($this->openAPINullablesSetToNull, 'madeGood'); + if (is_null($tradingOrgInd)) { + array_push($this->openAPINullablesSetToNull, 'tradingOrgInd'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('madeGood', $nullablesSetToNull); + $index = array_search('tradingOrgInd', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['madeGood'] = $madeGood; + $this->container['tradingOrgInd'] = $tradingOrgInd; return $this; } /** - * Gets cashEquivOrRelevantAmt + * Gets typeLetter * * @return string|null */ - public function getCashEquivOrRelevantAmt(): ?string + public function getTypeLetter(): ?string { - return $this->container['cashEquivOrRelevantAmt']; + return $this->container['typeLetter']; } /** - * Sets cashEquivOrRelevantAmt + * Sets typeLetter * - * @param string|null $cashEquivOrRelevantAmt cashEquivOrRelevantAmt + * @param string|null $typeLetter typeLetter * * @return $this */ - public function setCashEquivOrRelevantAmt(?string $cashEquivOrRelevantAmt): static + public function setTypeLetter(?string $typeLetter): static { - if (is_null($cashEquivOrRelevantAmt)) { - array_push($this->openAPINullablesSetToNull, 'cashEquivOrRelevantAmt'); + if (is_null($typeLetter)) { + array_push($this->openAPINullablesSetToNull, 'typeLetter'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cashEquivOrRelevantAmt', $nullablesSetToNull); + $index = array_search('typeLetter', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cashEquivOrRelevantAmt'] = $cashEquivOrRelevantAmt; + $this->container['typeLetter'] = $typeLetter; return $this; } diff --git a/src/Model/P32.php b/src/Model/P32.php index 17bfdf6..f46d4a5 100644 --- a/src/Model/P32.php +++ b/src/Model/P32.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,14 +60,14 @@ class P32 implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'isQuarterly' => 'bool', - 'hmrcLiabilities' => '\SynergiTech\Staffology\Model\HmrcLiability[]', 'employerOpeningBalances' => '\SynergiTech\Staffology\Model\EmployerOpeningBalances', + 'hmrcLiabilities' => '\SynergiTech\Staffology\Model\HmrcLiability[]', + 'isDraft' => 'bool', + 'isQuarterly' => 'bool', 'openingBalancesTotals' => '\SynergiTech\Staffology\Model\OpeningBalancesTotals', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -76,14 +76,14 @@ class P32 implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'isQuarterly' => null, - 'hmrcLiabilities' => null, 'employerOpeningBalances' => null, + 'hmrcLiabilities' => null, + 'isDraft' => null, + 'isQuarterly' => null, 'openingBalancesTotals' => null, 'report' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -92,14 +92,14 @@ class P32 implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'isQuarterly' => false, - 'hmrcLiabilities' => true, 'employerOpeningBalances' => false, + 'hmrcLiabilities' => true, + 'isDraft' => false, + 'isQuarterly' => false, 'openingBalancesTotals' => false, 'report' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -188,14 +188,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'isQuarterly' => 'isQuarterly', - 'hmrcLiabilities' => 'hmrcLiabilities', 'employerOpeningBalances' => 'employerOpeningBalances', + 'hmrcLiabilities' => 'hmrcLiabilities', + 'isDraft' => 'isDraft', + 'isQuarterly' => 'isQuarterly', 'openingBalancesTotals' => 'openingBalancesTotals', 'report' => 'report', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -204,14 +204,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'isQuarterly' => 'setIsQuarterly', - 'hmrcLiabilities' => 'setHmrcLiabilities', 'employerOpeningBalances' => 'setEmployerOpeningBalances', + 'hmrcLiabilities' => 'setHmrcLiabilities', + 'isDraft' => 'setIsDraft', + 'isQuarterly' => 'setIsQuarterly', 'openingBalancesTotals' => 'setOpeningBalancesTotals', 'report' => 'setReport', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -220,14 +220,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'isQuarterly' => 'getIsQuarterly', - 'hmrcLiabilities' => 'getHmrcLiabilities', 'employerOpeningBalances' => 'getEmployerOpeningBalances', + 'hmrcLiabilities' => 'getHmrcLiabilities', + 'isDraft' => 'getIsDraft', + 'isQuarterly' => 'getIsQuarterly', 'openingBalancesTotals' => 'getOpeningBalancesTotals', 'report' => 'getReport', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -286,14 +286,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('isQuarterly', $data ?? [], null); - $this->setIfExists('hmrcLiabilities', $data ?? [], null); $this->setIfExists('employerOpeningBalances', $data ?? [], null); + $this->setIfExists('hmrcLiabilities', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('isQuarterly', $data ?? [], null); $this->setIfExists('openingBalancesTotals', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -339,28 +339,28 @@ public function valid(): bool /** - * Gets isQuarterly + * Gets employerOpeningBalances * - * @return bool|null + * @return \SynergiTech\Staffology\Model\EmployerOpeningBalances|null */ - public function getIsQuarterly(): ?bool + public function getEmployerOpeningBalances(): ?\SynergiTech\Staffology\Model\EmployerOpeningBalances { - return $this->container['isQuarterly']; + return $this->container['employerOpeningBalances']; } /** - * Sets isQuarterly + * Sets employerOpeningBalances * - * @param bool|null $isQuarterly [readonly] + * @param \SynergiTech\Staffology\Model\EmployerOpeningBalances|null $employerOpeningBalances employerOpeningBalances * * @return $this */ - public function setIsQuarterly(?bool $isQuarterly): static + public function setEmployerOpeningBalances(?\SynergiTech\Staffology\Model\EmployerOpeningBalances $employerOpeningBalances): static { - if (is_null($isQuarterly)) { - throw new InvalidArgumentException('non-nullable isQuarterly cannot be null'); + if (is_null($employerOpeningBalances)) { + throw new InvalidArgumentException('non-nullable employerOpeningBalances cannot be null'); } - $this->container['isQuarterly'] = $isQuarterly; + $this->container['employerOpeningBalances'] = $employerOpeningBalances; return $this; } @@ -400,28 +400,55 @@ public function setHmrcLiabilities(?array $hmrcLiabilities): static } /** - * Gets employerOpeningBalances + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\EmployerOpeningBalances|null + * @return bool|null */ - public function getEmployerOpeningBalances(): ?\SynergiTech\Staffology\Model\EmployerOpeningBalances + public function getIsDraft(): ?bool { - return $this->container['employerOpeningBalances']; + return $this->container['isDraft']; } /** - * Sets employerOpeningBalances + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\EmployerOpeningBalances|null $employerOpeningBalances employerOpeningBalances + * @param bool|null $isDraft isDraft * * @return $this */ - public function setEmployerOpeningBalances(?\SynergiTech\Staffology\Model\EmployerOpeningBalances $employerOpeningBalances): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($employerOpeningBalances)) { - throw new InvalidArgumentException('non-nullable employerOpeningBalances cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['employerOpeningBalances'] = $employerOpeningBalances; + $this->container['isDraft'] = $isDraft; + + return $this; + } + + /** + * Gets isQuarterly + * + * @return bool|null + */ + public function getIsQuarterly(): ?bool + { + return $this->container['isQuarterly']; + } + + /** + * Sets isQuarterly + * + * @param bool|null $isQuarterly [readonly] + * + * @return $this + */ + public function setIsQuarterly(?bool $isQuarterly): static + { + if (is_null($isQuarterly)) { + throw new InvalidArgumentException('non-nullable isQuarterly cannot be null'); + } + $this->container['isQuarterly'] = $isQuarterly; return $this; } @@ -540,33 +567,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/P32ReportResponse.php b/src/Model/P32ReportResponse.php index 699cdf5..5f109f9 100644 --- a/src/Model/P32ReportResponse.php +++ b/src/Model/P32ReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class P32ReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\P32', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class P32ReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class P32ReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PapdisDocument.php b/src/Model/PapdisDocument.php index 1dedebb..edb47ad 100644 --- a/src/Model/PapdisDocument.php +++ b/src/Model/PapdisDocument.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,14 +60,14 @@ class PapdisDocument implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'isDraft' => 'bool', 'messageFunctionCode' => '\SynergiTech\Staffology\Model\PapdisMessageFunctionCode', - 'version' => '\SynergiTech\Staffology\Model\PapdisVersion', 'messageFunctionCodeInt' => 'int', 'pensionProvider' => '\SynergiTech\Staffology\Model\PapdisPensionProvider', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => '\SynergiTech\Staffology\Model\PapdisVersion' ]; /** @@ -76,14 +76,14 @@ class PapdisDocument implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'isDraft' => null, 'messageFunctionCode' => null, - 'version' => null, 'messageFunctionCodeInt' => 'int32', 'pensionProvider' => null, 'report' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => null ]; /** @@ -92,14 +92,14 @@ class PapdisDocument implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'isDraft' => false, 'messageFunctionCode' => false, - 'version' => false, 'messageFunctionCodeInt' => false, 'pensionProvider' => false, 'report' => false, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => false ]; /** @@ -188,14 +188,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'isDraft' => 'isDraft', 'messageFunctionCode' => 'messageFunctionCode', - 'version' => 'version', 'messageFunctionCodeInt' => 'messageFunctionCodeInt', 'pensionProvider' => 'pensionProvider', 'report' => 'report', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -204,14 +204,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'isDraft' => 'setIsDraft', 'messageFunctionCode' => 'setMessageFunctionCode', - 'version' => 'setVersion', 'messageFunctionCodeInt' => 'setMessageFunctionCodeInt', 'pensionProvider' => 'setPensionProvider', 'report' => 'setReport', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -220,14 +220,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'isDraft' => 'getIsDraft', 'messageFunctionCode' => 'getMessageFunctionCode', - 'version' => 'getVersion', 'messageFunctionCodeInt' => 'getMessageFunctionCodeInt', 'pensionProvider' => 'getPensionProvider', 'report' => 'getReport', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -286,14 +286,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('messageFunctionCode', $data ?? [], null); - $this->setIfExists('version', $data ?? [], null); $this->setIfExists('messageFunctionCodeInt', $data ?? [], null); $this->setIfExists('pensionProvider', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -339,55 +339,55 @@ public function valid(): bool /** - * Gets messageFunctionCode + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\PapdisMessageFunctionCode|null + * @return bool|null */ - public function getMessageFunctionCode(): ?\SynergiTech\Staffology\Model\PapdisMessageFunctionCode + public function getIsDraft(): ?bool { - return $this->container['messageFunctionCode']; + return $this->container['isDraft']; } /** - * Sets messageFunctionCode + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\PapdisMessageFunctionCode|null $messageFunctionCode messageFunctionCode + * @param bool|null $isDraft isDraft * * @return $this */ - public function setMessageFunctionCode(?\SynergiTech\Staffology\Model\PapdisMessageFunctionCode $messageFunctionCode): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($messageFunctionCode)) { - throw new InvalidArgumentException('non-nullable messageFunctionCode cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['messageFunctionCode'] = $messageFunctionCode; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets version + * Gets messageFunctionCode * - * @return \SynergiTech\Staffology\Model\PapdisVersion|null + * @return \SynergiTech\Staffology\Model\PapdisMessageFunctionCode|null */ - public function getVersion(): ?\SynergiTech\Staffology\Model\PapdisVersion + public function getMessageFunctionCode(): ?\SynergiTech\Staffology\Model\PapdisMessageFunctionCode { - return $this->container['version']; + return $this->container['messageFunctionCode']; } /** - * Sets version + * Sets messageFunctionCode * - * @param \SynergiTech\Staffology\Model\PapdisVersion|null $version version + * @param \SynergiTech\Staffology\Model\PapdisMessageFunctionCode|null $messageFunctionCode messageFunctionCode * * @return $this */ - public function setVersion(?\SynergiTech\Staffology\Model\PapdisVersion $version): static + public function setMessageFunctionCode(?\SynergiTech\Staffology\Model\PapdisMessageFunctionCode $messageFunctionCode): static { - if (is_null($version)) { - throw new InvalidArgumentException('non-nullable version cannot be null'); + if (is_null($messageFunctionCode)) { + throw new InvalidArgumentException('non-nullable messageFunctionCode cannot be null'); } - $this->container['version'] = $version; + $this->container['messageFunctionCode'] = $messageFunctionCode; return $this; } @@ -535,28 +535,28 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PapdisVersion|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?\SynergiTech\Staffology\Model\PapdisVersion { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param \SynergiTech\Staffology\Model\PapdisVersion|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?\SynergiTech\Staffology\Model\PapdisVersion $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + throw new InvalidArgumentException('non-nullable version cannot be null'); } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/PapdisDocumentReportResponse.php b/src/Model/PapdisDocumentReportResponse.php index 2bfc3c1..ffb5c2e 100644 --- a/src/Model/PapdisDocumentReportResponse.php +++ b/src/Model/PapdisDocumentReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class PapdisDocumentReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\PapdisDocument', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class PapdisDocumentReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class PapdisDocumentReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PapdisEmployee.php b/src/Model/PapdisEmployee.php index 1e5c144..06ab8ab 100644 --- a/src/Model/PapdisEmployee.php +++ b/src/Model/PapdisEmployee.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,27 +59,31 @@ class PapdisEmployee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'id' => 'int', - 'employeeId' => 'string', - 'name' => '\SynergiTech\Staffology\Model\PapdisEmployeeName', - 'identity' => '\SynergiTech\Staffology\Model\PapdisEmployeeIdentity', - 'contact' => '\SynergiTech\Staffology\Model\PapdisEmployeeContact', - 'pay' => '\SynergiTech\Staffology\Model\PapdisEmployeePay', + 'aeStateDate' => '\DateTime', 'assessment' => '\SynergiTech\Staffology\Model\PapdisEmployeeAssessment', + 'contact' => '\SynergiTech\Staffology\Model\PapdisEmployeeContact', + 'contractualJoinerIndicator' => 'bool', 'contribution' => '\SynergiTech\Staffology\Model\PapdisEmployeeContribution', + 'employeeId' => 'string', + 'employeeRoleUniqueId' => 'string', 'exit' => '\SynergiTech\Staffology\Model\PapdisEmployeeExit', - 'payrollCode' => 'string', - 'aeStateDate' => '\DateTime', - 'leaveDate' => '\DateTime', - 'statePensionAge' => 'int', - 'contractualJoinerIndicator' => 'bool', + 'hasPrevioulyLeftPension' => 'bool', + 'id' => 'int', + 'identity' => '\SynergiTech\Staffology\Model\PapdisEmployeeIdentity', + 'isPreviousTaxYearRefund' => 'bool', 'jobTitle' => 'string', + 'lastPaymentDate' => '\DateTime', + 'leaveDate' => '\DateTime', + 'name' => '\SynergiTech\Staffology\Model\PapdisEmployeeName', + 'pay' => '\SynergiTech\Staffology\Model\PapdisEmployeePay', + 'payrollCode' => 'string', 'pensionMemberReference' => 'string', 'pensionUniqueId' => 'string', - 'employeeRoleUniqueId' => 'string', - 'lastPaymentDate' => '\DateTime', - 'hasPrevioulyLeftPension' => 'bool', - 'pensionablePayDefinition' => '\SynergiTech\Staffology\Model\PensionablePayDefinition' + 'pensionablePayDefinition' => '\SynergiTech\Staffology\Model\PensionablePayDefinition', + 'statePensionAge' => 'int', + 'totalPreviousTaxYearRefundEmployeeAmount' => 'float', + 'totalPreviousTaxYearRefundEmployeeAvcAmount' => 'float', + 'totalPreviousTaxYearRefundEmployerAmount' => 'float' ]; /** @@ -88,27 +92,31 @@ class PapdisEmployee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'id' => 'int32', - 'employeeId' => 'uuid', - 'name' => null, - 'identity' => null, - 'contact' => null, - 'pay' => null, + 'aeStateDate' => 'date', 'assessment' => null, + 'contact' => null, + 'contractualJoinerIndicator' => null, 'contribution' => null, + 'employeeId' => 'uuid', + 'employeeRoleUniqueId' => 'uuid', 'exit' => null, - 'payrollCode' => null, - 'aeStateDate' => 'date', - 'leaveDate' => 'date', - 'statePensionAge' => 'int32', - 'contractualJoinerIndicator' => null, + 'hasPrevioulyLeftPension' => null, + 'id' => 'int32', + 'identity' => null, + 'isPreviousTaxYearRefund' => null, 'jobTitle' => null, + 'lastPaymentDate' => 'date', + 'leaveDate' => 'date', + 'name' => null, + 'pay' => null, + 'payrollCode' => null, 'pensionMemberReference' => null, 'pensionUniqueId' => null, - 'employeeRoleUniqueId' => 'uuid', - 'lastPaymentDate' => 'date', - 'hasPrevioulyLeftPension' => null, - 'pensionablePayDefinition' => null + 'pensionablePayDefinition' => null, + 'statePensionAge' => 'int32', + 'totalPreviousTaxYearRefundEmployeeAmount' => 'double', + 'totalPreviousTaxYearRefundEmployeeAvcAmount' => 'double', + 'totalPreviousTaxYearRefundEmployerAmount' => 'double' ]; /** @@ -117,27 +125,31 @@ class PapdisEmployee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'id' => false, - 'employeeId' => false, - 'name' => false, - 'identity' => false, - 'contact' => false, - 'pay' => false, + 'aeStateDate' => true, 'assessment' => false, + 'contact' => false, + 'contractualJoinerIndicator' => false, 'contribution' => false, + 'employeeId' => false, + 'employeeRoleUniqueId' => false, 'exit' => false, - 'payrollCode' => true, - 'aeStateDate' => true, - 'leaveDate' => true, - 'statePensionAge' => false, - 'contractualJoinerIndicator' => false, + 'hasPrevioulyLeftPension' => false, + 'id' => false, + 'identity' => false, + 'isPreviousTaxYearRefund' => false, 'jobTitle' => true, + 'lastPaymentDate' => true, + 'leaveDate' => true, + 'name' => false, + 'pay' => false, + 'payrollCode' => true, 'pensionMemberReference' => true, 'pensionUniqueId' => true, - 'employeeRoleUniqueId' => false, - 'lastPaymentDate' => true, - 'hasPrevioulyLeftPension' => false, - 'pensionablePayDefinition' => false + 'pensionablePayDefinition' => false, + 'statePensionAge' => false, + 'totalPreviousTaxYearRefundEmployeeAmount' => false, + 'totalPreviousTaxYearRefundEmployeeAvcAmount' => false, + 'totalPreviousTaxYearRefundEmployerAmount' => false ]; /** @@ -226,27 +238,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'id' => 'id', - 'employeeId' => 'employeeId', - 'name' => 'name', - 'identity' => 'identity', - 'contact' => 'contact', - 'pay' => 'pay', + 'aeStateDate' => 'aeStateDate', 'assessment' => 'assessment', + 'contact' => 'contact', + 'contractualJoinerIndicator' => 'contractualJoinerIndicator', 'contribution' => 'contribution', + 'employeeId' => 'employeeId', + 'employeeRoleUniqueId' => 'employeeRoleUniqueId', 'exit' => 'exit', - 'payrollCode' => 'payrollCode', - 'aeStateDate' => 'aeStateDate', - 'leaveDate' => 'leaveDate', - 'statePensionAge' => 'statePensionAge', - 'contractualJoinerIndicator' => 'contractualJoinerIndicator', + 'hasPrevioulyLeftPension' => 'hasPrevioulyLeftPension', + 'id' => 'id', + 'identity' => 'identity', + 'isPreviousTaxYearRefund' => 'isPreviousTaxYearRefund', 'jobTitle' => 'jobTitle', + 'lastPaymentDate' => 'lastPaymentDate', + 'leaveDate' => 'leaveDate', + 'name' => 'name', + 'pay' => 'pay', + 'payrollCode' => 'payrollCode', 'pensionMemberReference' => 'pensionMemberReference', 'pensionUniqueId' => 'pensionUniqueId', - 'employeeRoleUniqueId' => 'employeeRoleUniqueId', - 'lastPaymentDate' => 'lastPaymentDate', - 'hasPrevioulyLeftPension' => 'hasPrevioulyLeftPension', - 'pensionablePayDefinition' => 'pensionablePayDefinition' + 'pensionablePayDefinition' => 'pensionablePayDefinition', + 'statePensionAge' => 'statePensionAge', + 'totalPreviousTaxYearRefundEmployeeAmount' => 'totalPreviousTaxYearRefundEmployeeAmount', + 'totalPreviousTaxYearRefundEmployeeAvcAmount' => 'totalPreviousTaxYearRefundEmployeeAvcAmount', + 'totalPreviousTaxYearRefundEmployerAmount' => 'totalPreviousTaxYearRefundEmployerAmount' ]; /** @@ -255,27 +271,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'id' => 'setId', - 'employeeId' => 'setEmployeeId', - 'name' => 'setName', - 'identity' => 'setIdentity', - 'contact' => 'setContact', - 'pay' => 'setPay', + 'aeStateDate' => 'setAeStateDate', 'assessment' => 'setAssessment', + 'contact' => 'setContact', + 'contractualJoinerIndicator' => 'setContractualJoinerIndicator', 'contribution' => 'setContribution', + 'employeeId' => 'setEmployeeId', + 'employeeRoleUniqueId' => 'setEmployeeRoleUniqueId', 'exit' => 'setExit', - 'payrollCode' => 'setPayrollCode', - 'aeStateDate' => 'setAeStateDate', - 'leaveDate' => 'setLeaveDate', - 'statePensionAge' => 'setStatePensionAge', - 'contractualJoinerIndicator' => 'setContractualJoinerIndicator', + 'hasPrevioulyLeftPension' => 'setHasPrevioulyLeftPension', + 'id' => 'setId', + 'identity' => 'setIdentity', + 'isPreviousTaxYearRefund' => 'setIsPreviousTaxYearRefund', 'jobTitle' => 'setJobTitle', + 'lastPaymentDate' => 'setLastPaymentDate', + 'leaveDate' => 'setLeaveDate', + 'name' => 'setName', + 'pay' => 'setPay', + 'payrollCode' => 'setPayrollCode', 'pensionMemberReference' => 'setPensionMemberReference', 'pensionUniqueId' => 'setPensionUniqueId', - 'employeeRoleUniqueId' => 'setEmployeeRoleUniqueId', - 'lastPaymentDate' => 'setLastPaymentDate', - 'hasPrevioulyLeftPension' => 'setHasPrevioulyLeftPension', - 'pensionablePayDefinition' => 'setPensionablePayDefinition' + 'pensionablePayDefinition' => 'setPensionablePayDefinition', + 'statePensionAge' => 'setStatePensionAge', + 'totalPreviousTaxYearRefundEmployeeAmount' => 'setTotalPreviousTaxYearRefundEmployeeAmount', + 'totalPreviousTaxYearRefundEmployeeAvcAmount' => 'setTotalPreviousTaxYearRefundEmployeeAvcAmount', + 'totalPreviousTaxYearRefundEmployerAmount' => 'setTotalPreviousTaxYearRefundEmployerAmount' ]; /** @@ -284,27 +304,31 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'id' => 'getId', - 'employeeId' => 'getEmployeeId', - 'name' => 'getName', - 'identity' => 'getIdentity', - 'contact' => 'getContact', - 'pay' => 'getPay', + 'aeStateDate' => 'getAeStateDate', 'assessment' => 'getAssessment', + 'contact' => 'getContact', + 'contractualJoinerIndicator' => 'getContractualJoinerIndicator', 'contribution' => 'getContribution', + 'employeeId' => 'getEmployeeId', + 'employeeRoleUniqueId' => 'getEmployeeRoleUniqueId', 'exit' => 'getExit', - 'payrollCode' => 'getPayrollCode', - 'aeStateDate' => 'getAeStateDate', - 'leaveDate' => 'getLeaveDate', - 'statePensionAge' => 'getStatePensionAge', - 'contractualJoinerIndicator' => 'getContractualJoinerIndicator', + 'hasPrevioulyLeftPension' => 'getHasPrevioulyLeftPension', + 'id' => 'getId', + 'identity' => 'getIdentity', + 'isPreviousTaxYearRefund' => 'getIsPreviousTaxYearRefund', 'jobTitle' => 'getJobTitle', + 'lastPaymentDate' => 'getLastPaymentDate', + 'leaveDate' => 'getLeaveDate', + 'name' => 'getName', + 'pay' => 'getPay', + 'payrollCode' => 'getPayrollCode', 'pensionMemberReference' => 'getPensionMemberReference', 'pensionUniqueId' => 'getPensionUniqueId', - 'employeeRoleUniqueId' => 'getEmployeeRoleUniqueId', - 'lastPaymentDate' => 'getLastPaymentDate', - 'hasPrevioulyLeftPension' => 'getHasPrevioulyLeftPension', - 'pensionablePayDefinition' => 'getPensionablePayDefinition' + 'pensionablePayDefinition' => 'getPensionablePayDefinition', + 'statePensionAge' => 'getStatePensionAge', + 'totalPreviousTaxYearRefundEmployeeAmount' => 'getTotalPreviousTaxYearRefundEmployeeAmount', + 'totalPreviousTaxYearRefundEmployeeAvcAmount' => 'getTotalPreviousTaxYearRefundEmployeeAvcAmount', + 'totalPreviousTaxYearRefundEmployerAmount' => 'getTotalPreviousTaxYearRefundEmployerAmount' ]; /** @@ -363,27 +387,31 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('employeeId', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('identity', $data ?? [], null); - $this->setIfExists('contact', $data ?? [], null); - $this->setIfExists('pay', $data ?? [], null); + $this->setIfExists('aeStateDate', $data ?? [], null); $this->setIfExists('assessment', $data ?? [], null); + $this->setIfExists('contact', $data ?? [], null); + $this->setIfExists('contractualJoinerIndicator', $data ?? [], null); $this->setIfExists('contribution', $data ?? [], null); + $this->setIfExists('employeeId', $data ?? [], null); + $this->setIfExists('employeeRoleUniqueId', $data ?? [], null); $this->setIfExists('exit', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('aeStateDate', $data ?? [], null); - $this->setIfExists('leaveDate', $data ?? [], null); - $this->setIfExists('statePensionAge', $data ?? [], null); - $this->setIfExists('contractualJoinerIndicator', $data ?? [], null); + $this->setIfExists('hasPrevioulyLeftPension', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('identity', $data ?? [], null); + $this->setIfExists('isPreviousTaxYearRefund', $data ?? [], null); $this->setIfExists('jobTitle', $data ?? [], null); + $this->setIfExists('lastPaymentDate', $data ?? [], null); + $this->setIfExists('leaveDate', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('pay', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('pensionMemberReference', $data ?? [], null); $this->setIfExists('pensionUniqueId', $data ?? [], null); - $this->setIfExists('employeeRoleUniqueId', $data ?? [], null); - $this->setIfExists('lastPaymentDate', $data ?? [], null); - $this->setIfExists('hasPrevioulyLeftPension', $data ?? [], null); $this->setIfExists('pensionablePayDefinition', $data ?? [], null); + $this->setIfExists('statePensionAge', $data ?? [], null); + $this->setIfExists('totalPreviousTaxYearRefundEmployeeAmount', $data ?? [], null); + $this->setIfExists('totalPreviousTaxYearRefundEmployeeAvcAmount', $data ?? [], null); + $this->setIfExists('totalPreviousTaxYearRefundEmployerAmount', $data ?? [], null); } /** @@ -429,312 +457,400 @@ public function valid(): bool /** - * Gets id + * Gets aeStateDate * - * @return int|null + * @return \DateTime|null */ - public function getId(): ?int + public function getAeStateDate(): ?\DateTime { - return $this->container['id']; + return $this->container['aeStateDate']; } /** - * Sets id + * Sets aeStateDate * - * @param int|null $id [readonly] + * @param \DateTime|null $aeStateDate aeStateDate * * @return $this */ - public function setId(?int $id): static + public function setAeStateDate(?\DateTime $aeStateDate): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($aeStateDate)) { + array_push($this->openAPINullablesSetToNull, 'aeStateDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('aeStateDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['aeStateDate'] = $aeStateDate; return $this; } /** - * Gets employeeId + * Gets assessment * - * @return string|null + * @return \SynergiTech\Staffology\Model\PapdisEmployeeAssessment|null */ - public function getEmployeeId(): ?string + public function getAssessment(): ?\SynergiTech\Staffology\Model\PapdisEmployeeAssessment { - return $this->container['employeeId']; + return $this->container['assessment']; } /** - * Sets employeeId + * Sets assessment * - * @param string|null $employeeId [readonly] + * @param \SynergiTech\Staffology\Model\PapdisEmployeeAssessment|null $assessment assessment * * @return $this */ - public function setEmployeeId(?string $employeeId): static + public function setAssessment(?\SynergiTech\Staffology\Model\PapdisEmployeeAssessment $assessment): static { - if (is_null($employeeId)) { - throw new InvalidArgumentException('non-nullable employeeId cannot be null'); + if (is_null($assessment)) { + throw new InvalidArgumentException('non-nullable assessment cannot be null'); } - $this->container['employeeId'] = $employeeId; + $this->container['assessment'] = $assessment; return $this; } /** - * Gets name + * Gets contact * - * @return \SynergiTech\Staffology\Model\PapdisEmployeeName|null + * @return \SynergiTech\Staffology\Model\PapdisEmployeeContact|null */ - public function getName(): ?\SynergiTech\Staffology\Model\PapdisEmployeeName + public function getContact(): ?\SynergiTech\Staffology\Model\PapdisEmployeeContact { - return $this->container['name']; + return $this->container['contact']; } /** - * Sets name + * Sets contact * - * @param \SynergiTech\Staffology\Model\PapdisEmployeeName|null $name name + * @param \SynergiTech\Staffology\Model\PapdisEmployeeContact|null $contact contact * * @return $this */ - public function setName(?\SynergiTech\Staffology\Model\PapdisEmployeeName $name): static + public function setContact(?\SynergiTech\Staffology\Model\PapdisEmployeeContact $contact): static { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($contact)) { + throw new InvalidArgumentException('non-nullable contact cannot be null'); } - $this->container['name'] = $name; + $this->container['contact'] = $contact; return $this; } /** - * Gets identity + * Gets contractualJoinerIndicator * - * @return \SynergiTech\Staffology\Model\PapdisEmployeeIdentity|null + * @return bool|null */ - public function getIdentity(): ?\SynergiTech\Staffology\Model\PapdisEmployeeIdentity + public function getContractualJoinerIndicator(): ?bool { - return $this->container['identity']; + return $this->container['contractualJoinerIndicator']; } /** - * Sets identity + * Sets contractualJoinerIndicator * - * @param \SynergiTech\Staffology\Model\PapdisEmployeeIdentity|null $identity identity + * @param bool|null $contractualJoinerIndicator contractualJoinerIndicator * * @return $this */ - public function setIdentity(?\SynergiTech\Staffology\Model\PapdisEmployeeIdentity $identity): static + public function setContractualJoinerIndicator(?bool $contractualJoinerIndicator): static { - if (is_null($identity)) { - throw new InvalidArgumentException('non-nullable identity cannot be null'); + if (is_null($contractualJoinerIndicator)) { + throw new InvalidArgumentException('non-nullable contractualJoinerIndicator cannot be null'); } - $this->container['identity'] = $identity; + $this->container['contractualJoinerIndicator'] = $contractualJoinerIndicator; return $this; } /** - * Gets contact + * Gets contribution * - * @return \SynergiTech\Staffology\Model\PapdisEmployeeContact|null + * @return \SynergiTech\Staffology\Model\PapdisEmployeeContribution|null */ - public function getContact(): ?\SynergiTech\Staffology\Model\PapdisEmployeeContact + public function getContribution(): ?\SynergiTech\Staffology\Model\PapdisEmployeeContribution { - return $this->container['contact']; + return $this->container['contribution']; } /** - * Sets contact + * Sets contribution * - * @param \SynergiTech\Staffology\Model\PapdisEmployeeContact|null $contact contact + * @param \SynergiTech\Staffology\Model\PapdisEmployeeContribution|null $contribution contribution * * @return $this */ - public function setContact(?\SynergiTech\Staffology\Model\PapdisEmployeeContact $contact): static + public function setContribution(?\SynergiTech\Staffology\Model\PapdisEmployeeContribution $contribution): static { - if (is_null($contact)) { - throw new InvalidArgumentException('non-nullable contact cannot be null'); + if (is_null($contribution)) { + throw new InvalidArgumentException('non-nullable contribution cannot be null'); } - $this->container['contact'] = $contact; + $this->container['contribution'] = $contribution; + + return $this; + } + + /** + * Gets employeeId + * + * @return string|null + */ + public function getEmployeeId(): ?string + { + return $this->container['employeeId']; + } + + /** + * Sets employeeId + * + * @param string|null $employeeId [readonly] + * + * @return $this + */ + public function setEmployeeId(?string $employeeId): static + { + if (is_null($employeeId)) { + throw new InvalidArgumentException('non-nullable employeeId cannot be null'); + } + $this->container['employeeId'] = $employeeId; + + return $this; + } + + /** + * Gets employeeRoleUniqueId + * + * @return string|null + */ + public function getEmployeeRoleUniqueId(): ?string + { + return $this->container['employeeRoleUniqueId']; + } + + /** + * Sets employeeRoleUniqueId + * + * @param string|null $employeeRoleUniqueId employeeRoleUniqueId + * + * @return $this + */ + public function setEmployeeRoleUniqueId(?string $employeeRoleUniqueId): static + { + if (is_null($employeeRoleUniqueId)) { + throw new InvalidArgumentException('non-nullable employeeRoleUniqueId cannot be null'); + } + $this->container['employeeRoleUniqueId'] = $employeeRoleUniqueId; + + return $this; + } + + /** + * Gets exit + * + * @return \SynergiTech\Staffology\Model\PapdisEmployeeExit|null + */ + public function getExit(): ?\SynergiTech\Staffology\Model\PapdisEmployeeExit + { + return $this->container['exit']; + } + + /** + * Sets exit + * + * @param \SynergiTech\Staffology\Model\PapdisEmployeeExit|null $exit exit + * + * @return $this + */ + public function setExit(?\SynergiTech\Staffology\Model\PapdisEmployeeExit $exit): static + { + if (is_null($exit)) { + throw new InvalidArgumentException('non-nullable exit cannot be null'); + } + $this->container['exit'] = $exit; return $this; } /** - * Gets pay + * Gets hasPrevioulyLeftPension * - * @return \SynergiTech\Staffology\Model\PapdisEmployeePay|null + * @return bool|null */ - public function getPay(): ?\SynergiTech\Staffology\Model\PapdisEmployeePay + public function getHasPrevioulyLeftPension(): ?bool { - return $this->container['pay']; + return $this->container['hasPrevioulyLeftPension']; } /** - * Sets pay + * Sets hasPrevioulyLeftPension * - * @param \SynergiTech\Staffology\Model\PapdisEmployeePay|null $pay pay + * @param bool|null $hasPrevioulyLeftPension Flag indicating the employee has previously left the pension * * @return $this */ - public function setPay(?\SynergiTech\Staffology\Model\PapdisEmployeePay $pay): static + public function setHasPrevioulyLeftPension(?bool $hasPrevioulyLeftPension): static { - if (is_null($pay)) { - throw new InvalidArgumentException('non-nullable pay cannot be null'); + if (is_null($hasPrevioulyLeftPension)) { + throw new InvalidArgumentException('non-nullable hasPrevioulyLeftPension cannot be null'); } - $this->container['pay'] = $pay; + $this->container['hasPrevioulyLeftPension'] = $hasPrevioulyLeftPension; return $this; } /** - * Gets assessment + * Gets id * - * @return \SynergiTech\Staffology\Model\PapdisEmployeeAssessment|null + * @return int|null */ - public function getAssessment(): ?\SynergiTech\Staffology\Model\PapdisEmployeeAssessment + public function getId(): ?int { - return $this->container['assessment']; + return $this->container['id']; } /** - * Sets assessment + * Sets id * - * @param \SynergiTech\Staffology\Model\PapdisEmployeeAssessment|null $assessment assessment + * @param int|null $id [readonly] * * @return $this */ - public function setAssessment(?\SynergiTech\Staffology\Model\PapdisEmployeeAssessment $assessment): static + public function setId(?int $id): static { - if (is_null($assessment)) { - throw new InvalidArgumentException('non-nullable assessment cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['assessment'] = $assessment; + $this->container['id'] = $id; return $this; } /** - * Gets contribution + * Gets identity * - * @return \SynergiTech\Staffology\Model\PapdisEmployeeContribution|null + * @return \SynergiTech\Staffology\Model\PapdisEmployeeIdentity|null */ - public function getContribution(): ?\SynergiTech\Staffology\Model\PapdisEmployeeContribution + public function getIdentity(): ?\SynergiTech\Staffology\Model\PapdisEmployeeIdentity { - return $this->container['contribution']; + return $this->container['identity']; } /** - * Sets contribution + * Sets identity * - * @param \SynergiTech\Staffology\Model\PapdisEmployeeContribution|null $contribution contribution + * @param \SynergiTech\Staffology\Model\PapdisEmployeeIdentity|null $identity identity * * @return $this */ - public function setContribution(?\SynergiTech\Staffology\Model\PapdisEmployeeContribution $contribution): static + public function setIdentity(?\SynergiTech\Staffology\Model\PapdisEmployeeIdentity $identity): static { - if (is_null($contribution)) { - throw new InvalidArgumentException('non-nullable contribution cannot be null'); + if (is_null($identity)) { + throw new InvalidArgumentException('non-nullable identity cannot be null'); } - $this->container['contribution'] = $contribution; + $this->container['identity'] = $identity; return $this; } /** - * Gets exit + * Gets isPreviousTaxYearRefund * - * @return \SynergiTech\Staffology\Model\PapdisEmployeeExit|null + * @return bool|null */ - public function getExit(): ?\SynergiTech\Staffology\Model\PapdisEmployeeExit + public function getIsPreviousTaxYearRefund(): ?bool { - return $this->container['exit']; + return $this->container['isPreviousTaxYearRefund']; } /** - * Sets exit + * Sets isPreviousTaxYearRefund * - * @param \SynergiTech\Staffology\Model\PapdisEmployeeExit|null $exit exit + * @param bool|null $isPreviousTaxYearRefund Indicates whether the employee has a pension refund from the previous tax year. * * @return $this */ - public function setExit(?\SynergiTech\Staffology\Model\PapdisEmployeeExit $exit): static + public function setIsPreviousTaxYearRefund(?bool $isPreviousTaxYearRefund): static { - if (is_null($exit)) { - throw new InvalidArgumentException('non-nullable exit cannot be null'); + if (is_null($isPreviousTaxYearRefund)) { + throw new InvalidArgumentException('non-nullable isPreviousTaxYearRefund cannot be null'); } - $this->container['exit'] = $exit; + $this->container['isPreviousTaxYearRefund'] = $isPreviousTaxYearRefund; return $this; } /** - * Gets payrollCode + * Gets jobTitle * * @return string|null */ - public function getPayrollCode(): ?string + public function getJobTitle(): ?string { - return $this->container['payrollCode']; + return $this->container['jobTitle']; } /** - * Sets payrollCode + * Sets jobTitle * - * @param string|null $payrollCode [readonly] + * @param string|null $jobTitle jobTitle * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setJobTitle(?string $jobTitle): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); + if (is_null($jobTitle)) { + array_push($this->openAPINullablesSetToNull, 'jobTitle'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); + $index = array_search('jobTitle', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payrollCode'] = $payrollCode; + $this->container['jobTitle'] = $jobTitle; return $this; } /** - * Gets aeStateDate + * Gets lastPaymentDate * * @return \DateTime|null */ - public function getAeStateDate(): ?\DateTime + public function getLastPaymentDate(): ?\DateTime { - return $this->container['aeStateDate']; + return $this->container['lastPaymentDate']; } /** - * Sets aeStateDate + * Sets lastPaymentDate * - * @param \DateTime|null $aeStateDate aeStateDate + * @param \DateTime|null $lastPaymentDate The last time the employee was paid * * @return $this */ - public function setAeStateDate(?\DateTime $aeStateDate): static + public function setLastPaymentDate(?\DateTime $lastPaymentDate): static { - if (is_null($aeStateDate)) { - array_push($this->openAPINullablesSetToNull, 'aeStateDate'); + if (is_null($lastPaymentDate)) { + array_push($this->openAPINullablesSetToNull, 'lastPaymentDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aeStateDate', $nullablesSetToNull); + $index = array_search('lastPaymentDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['aeStateDate'] = $aeStateDate; + $this->container['lastPaymentDate'] = $lastPaymentDate; return $this; } @@ -774,89 +890,89 @@ public function setLeaveDate(?\DateTime $leaveDate): static } /** - * Gets statePensionAge + * Gets name * - * @return int|null + * @return \SynergiTech\Staffology\Model\PapdisEmployeeName|null */ - public function getStatePensionAge(): ?int + public function getName(): ?\SynergiTech\Staffology\Model\PapdisEmployeeName { - return $this->container['statePensionAge']; + return $this->container['name']; } /** - * Sets statePensionAge + * Sets name * - * @param int|null $statePensionAge statePensionAge + * @param \SynergiTech\Staffology\Model\PapdisEmployeeName|null $name name * * @return $this */ - public function setStatePensionAge(?int $statePensionAge): static + public function setName(?\SynergiTech\Staffology\Model\PapdisEmployeeName $name): static { - if (is_null($statePensionAge)) { - throw new InvalidArgumentException('non-nullable statePensionAge cannot be null'); + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['statePensionAge'] = $statePensionAge; + $this->container['name'] = $name; return $this; } /** - * Gets contractualJoinerIndicator + * Gets pay * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PapdisEmployeePay|null */ - public function getContractualJoinerIndicator(): ?bool + public function getPay(): ?\SynergiTech\Staffology\Model\PapdisEmployeePay { - return $this->container['contractualJoinerIndicator']; + return $this->container['pay']; } /** - * Sets contractualJoinerIndicator + * Sets pay * - * @param bool|null $contractualJoinerIndicator contractualJoinerIndicator + * @param \SynergiTech\Staffology\Model\PapdisEmployeePay|null $pay pay * * @return $this */ - public function setContractualJoinerIndicator(?bool $contractualJoinerIndicator): static + public function setPay(?\SynergiTech\Staffology\Model\PapdisEmployeePay $pay): static { - if (is_null($contractualJoinerIndicator)) { - throw new InvalidArgumentException('non-nullable contractualJoinerIndicator cannot be null'); + if (is_null($pay)) { + throw new InvalidArgumentException('non-nullable pay cannot be null'); } - $this->container['contractualJoinerIndicator'] = $contractualJoinerIndicator; + $this->container['pay'] = $pay; return $this; } /** - * Gets jobTitle + * Gets payrollCode * * @return string|null */ - public function getJobTitle(): ?string + public function getPayrollCode(): ?string { - return $this->container['jobTitle']; + return $this->container['payrollCode']; } /** - * Sets jobTitle + * Sets payrollCode * - * @param string|null $jobTitle jobTitle + * @param string|null $payrollCode [readonly] * * @return $this */ - public function setJobTitle(?string $jobTitle): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($jobTitle)) { - array_push($this->openAPINullablesSetToNull, 'jobTitle'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('jobTitle', $nullablesSetToNull); + $index = array_search('payrollCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['jobTitle'] = $jobTitle; + $this->container['payrollCode'] = $payrollCode; return $this; } @@ -930,116 +1046,136 @@ public function setPensionUniqueId(?string $pensionUniqueId): static } /** - * Gets employeeRoleUniqueId + * Gets pensionablePayDefinition * - * @return string|null + * @return \SynergiTech\Staffology\Model\PensionablePayDefinition|null */ - public function getEmployeeRoleUniqueId(): ?string + public function getPensionablePayDefinition(): ?\SynergiTech\Staffology\Model\PensionablePayDefinition { - return $this->container['employeeRoleUniqueId']; + return $this->container['pensionablePayDefinition']; } /** - * Sets employeeRoleUniqueId + * Sets pensionablePayDefinition * - * @param string|null $employeeRoleUniqueId employeeRoleUniqueId + * @param \SynergiTech\Staffology\Model\PensionablePayDefinition|null $pensionablePayDefinition pensionablePayDefinition * * @return $this */ - public function setEmployeeRoleUniqueId(?string $employeeRoleUniqueId): static + public function setPensionablePayDefinition(?\SynergiTech\Staffology\Model\PensionablePayDefinition $pensionablePayDefinition): static { - if (is_null($employeeRoleUniqueId)) { - throw new InvalidArgumentException('non-nullable employeeRoleUniqueId cannot be null'); + if (is_null($pensionablePayDefinition)) { + throw new InvalidArgumentException('non-nullable pensionablePayDefinition cannot be null'); } - $this->container['employeeRoleUniqueId'] = $employeeRoleUniqueId; + $this->container['pensionablePayDefinition'] = $pensionablePayDefinition; return $this; } /** - * Gets lastPaymentDate + * Gets statePensionAge * - * @return \DateTime|null + * @return int|null */ - public function getLastPaymentDate(): ?\DateTime + public function getStatePensionAge(): ?int { - return $this->container['lastPaymentDate']; + return $this->container['statePensionAge']; } /** - * Sets lastPaymentDate + * Sets statePensionAge * - * @param \DateTime|null $lastPaymentDate The last time the employee was paid + * @param int|null $statePensionAge statePensionAge * * @return $this */ - public function setLastPaymentDate(?\DateTime $lastPaymentDate): static + public function setStatePensionAge(?int $statePensionAge): static { - if (is_null($lastPaymentDate)) { - array_push($this->openAPINullablesSetToNull, 'lastPaymentDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastPaymentDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($statePensionAge)) { + throw new InvalidArgumentException('non-nullable statePensionAge cannot be null'); } - $this->container['lastPaymentDate'] = $lastPaymentDate; + $this->container['statePensionAge'] = $statePensionAge; return $this; } /** - * Gets hasPrevioulyLeftPension + * Gets totalPreviousTaxYearRefundEmployeeAmount * - * @return bool|null + * @return float|null */ - public function getHasPrevioulyLeftPension(): ?bool + public function getTotalPreviousTaxYearRefundEmployeeAmount(): ?float { - return $this->container['hasPrevioulyLeftPension']; + return $this->container['totalPreviousTaxYearRefundEmployeeAmount']; } /** - * Sets hasPrevioulyLeftPension + * Sets totalPreviousTaxYearRefundEmployeeAmount * - * @param bool|null $hasPrevioulyLeftPension Flag indicating the employee has previously left the pension + * @param float|null $totalPreviousTaxYearRefundEmployeeAmount The total amount of pension refunds paid to the employee, calculated as the sum of all EmployeeRefund values from applicable PensionRefunds (when IsPreviousTaxYearRefund is enabled). * * @return $this */ - public function setHasPrevioulyLeftPension(?bool $hasPrevioulyLeftPension): static + public function setTotalPreviousTaxYearRefundEmployeeAmount(?float $totalPreviousTaxYearRefundEmployeeAmount): static { - if (is_null($hasPrevioulyLeftPension)) { - throw new InvalidArgumentException('non-nullable hasPrevioulyLeftPension cannot be null'); + if (is_null($totalPreviousTaxYearRefundEmployeeAmount)) { + throw new InvalidArgumentException('non-nullable totalPreviousTaxYearRefundEmployeeAmount cannot be null'); } - $this->container['hasPrevioulyLeftPension'] = $hasPrevioulyLeftPension; + $this->container['totalPreviousTaxYearRefundEmployeeAmount'] = $totalPreviousTaxYearRefundEmployeeAmount; return $this; } /** - * Gets pensionablePayDefinition + * Gets totalPreviousTaxYearRefundEmployeeAvcAmount * - * @return \SynergiTech\Staffology\Model\PensionablePayDefinition|null + * @return float|null */ - public function getPensionablePayDefinition(): ?\SynergiTech\Staffology\Model\PensionablePayDefinition + public function getTotalPreviousTaxYearRefundEmployeeAvcAmount(): ?float { - return $this->container['pensionablePayDefinition']; + return $this->container['totalPreviousTaxYearRefundEmployeeAvcAmount']; } /** - * Sets pensionablePayDefinition + * Sets totalPreviousTaxYearRefundEmployeeAvcAmount * - * @param \SynergiTech\Staffology\Model\PensionablePayDefinition|null $pensionablePayDefinition pensionablePayDefinition + * @param float|null $totalPreviousTaxYearRefundEmployeeAvcAmount The total amount of AVC (Additional Voluntary Contributions) refunds paid to the employee, calculated as the sum of all AdditionalVoluntaryContribution values from applicable PensionRefunds (when IsPreviousTaxYearRefund is enabled). * * @return $this */ - public function setPensionablePayDefinition(?\SynergiTech\Staffology\Model\PensionablePayDefinition $pensionablePayDefinition): static + public function setTotalPreviousTaxYearRefundEmployeeAvcAmount(?float $totalPreviousTaxYearRefundEmployeeAvcAmount): static { - if (is_null($pensionablePayDefinition)) { - throw new InvalidArgumentException('non-nullable pensionablePayDefinition cannot be null'); + if (is_null($totalPreviousTaxYearRefundEmployeeAvcAmount)) { + throw new InvalidArgumentException('non-nullable totalPreviousTaxYearRefundEmployeeAvcAmount cannot be null'); } - $this->container['pensionablePayDefinition'] = $pensionablePayDefinition; + $this->container['totalPreviousTaxYearRefundEmployeeAvcAmount'] = $totalPreviousTaxYearRefundEmployeeAvcAmount; + + return $this; + } + + /** + * Gets totalPreviousTaxYearRefundEmployerAmount + * + * @return float|null + */ + public function getTotalPreviousTaxYearRefundEmployerAmount(): ?float + { + return $this->container['totalPreviousTaxYearRefundEmployerAmount']; + } + + /** + * Sets totalPreviousTaxYearRefundEmployerAmount + * + * @param float|null $totalPreviousTaxYearRefundEmployerAmount The total amount of employer pension refunds, calculated as the sum of all EmployerRefund values from applicable PensionRefunds (when IsPreviousTaxYearRefund is enabled). + * + * @return $this + */ + public function setTotalPreviousTaxYearRefundEmployerAmount(?float $totalPreviousTaxYearRefundEmployerAmount): static + { + if (is_null($totalPreviousTaxYearRefundEmployerAmount)) { + throw new InvalidArgumentException('non-nullable totalPreviousTaxYearRefundEmployerAmount cannot be null'); + } + $this->container['totalPreviousTaxYearRefundEmployerAmount'] = $totalPreviousTaxYearRefundEmployerAmount; return $this; } diff --git a/src/Model/PapdisEmployeeAssessment.php b/src/Model/PapdisEmployeeAssessment.php index 7767d9e..1cbe81c 100644 --- a/src/Model/PapdisEmployeeAssessment.php +++ b/src/Model/PapdisEmployeeAssessment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,17 +60,17 @@ class PapdisEmployeeAssessment implements ModelInterface, ArrayAccess, JsonSeria */ protected static array $openAPITypes = [ 'assessmentCode' => 'int', + 'deferralDate' => '\DateTime', + 'enrolmentCommunicationsIssuedDate' => '\DateTime', 'eventCode' => 'int', 'eventDate' => '\DateTime', - 'statutoryLetterCode' => 'string', 'isIndividualAlreadyMemberOfQPS' => 'bool', - 'deferralDate' => '\DateTime', - 'enrolmentCommunicationsIssuedDate' => '\DateTime', - 'workerExclusionCode' => 'string', - 'reenrolmentIndicator' => 'bool', 'optOutWindowEndDate' => '\DateTime', 'pensionJoinReason' => '\SynergiTech\Staffology\Model\PensionJoinReason', - 'pensionStartDate' => '\DateTime' + 'pensionStartDate' => '\DateTime', + 'reenrolmentIndicator' => 'bool', + 'statutoryLetterCode' => 'string', + 'workerExclusionCode' => 'string' ]; /** @@ -80,17 +80,17 @@ class PapdisEmployeeAssessment implements ModelInterface, ArrayAccess, JsonSeria */ protected static array $openAPIFormats = [ 'assessmentCode' => 'int32', + 'deferralDate' => 'date', + 'enrolmentCommunicationsIssuedDate' => 'date', 'eventCode' => 'int32', 'eventDate' => 'date', - 'statutoryLetterCode' => null, 'isIndividualAlreadyMemberOfQPS' => null, - 'deferralDate' => 'date', - 'enrolmentCommunicationsIssuedDate' => 'date', - 'workerExclusionCode' => null, - 'reenrolmentIndicator' => null, 'optOutWindowEndDate' => 'date', 'pensionJoinReason' => null, - 'pensionStartDate' => 'date' + 'pensionStartDate' => 'date', + 'reenrolmentIndicator' => null, + 'statutoryLetterCode' => null, + 'workerExclusionCode' => null ]; /** @@ -100,17 +100,17 @@ class PapdisEmployeeAssessment implements ModelInterface, ArrayAccess, JsonSeria */ protected static array $openAPINullables = [ 'assessmentCode' => false, + 'deferralDate' => true, + 'enrolmentCommunicationsIssuedDate' => true, 'eventCode' => false, 'eventDate' => true, - 'statutoryLetterCode' => true, 'isIndividualAlreadyMemberOfQPS' => false, - 'deferralDate' => true, - 'enrolmentCommunicationsIssuedDate' => true, - 'workerExclusionCode' => true, - 'reenrolmentIndicator' => false, 'optOutWindowEndDate' => true, 'pensionJoinReason' => false, - 'pensionStartDate' => true + 'pensionStartDate' => true, + 'reenrolmentIndicator' => false, + 'statutoryLetterCode' => true, + 'workerExclusionCode' => true ]; /** @@ -200,17 +200,17 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'assessmentCode' => 'assessmentCode', + 'deferralDate' => 'deferralDate', + 'enrolmentCommunicationsIssuedDate' => 'enrolmentCommunicationsIssuedDate', 'eventCode' => 'eventCode', 'eventDate' => 'eventDate', - 'statutoryLetterCode' => 'statutoryLetterCode', 'isIndividualAlreadyMemberOfQPS' => 'isIndividualAlreadyMemberOfQPS', - 'deferralDate' => 'deferralDate', - 'enrolmentCommunicationsIssuedDate' => 'enrolmentCommunicationsIssuedDate', - 'workerExclusionCode' => 'workerExclusionCode', - 'reenrolmentIndicator' => 'reenrolmentIndicator', 'optOutWindowEndDate' => 'optOutWindowEndDate', 'pensionJoinReason' => 'pensionJoinReason', - 'pensionStartDate' => 'pensionStartDate' + 'pensionStartDate' => 'pensionStartDate', + 'reenrolmentIndicator' => 'reenrolmentIndicator', + 'statutoryLetterCode' => 'statutoryLetterCode', + 'workerExclusionCode' => 'workerExclusionCode' ]; /** @@ -220,17 +220,17 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'assessmentCode' => 'setAssessmentCode', + 'deferralDate' => 'setDeferralDate', + 'enrolmentCommunicationsIssuedDate' => 'setEnrolmentCommunicationsIssuedDate', 'eventCode' => 'setEventCode', 'eventDate' => 'setEventDate', - 'statutoryLetterCode' => 'setStatutoryLetterCode', 'isIndividualAlreadyMemberOfQPS' => 'setIsIndividualAlreadyMemberOfQPS', - 'deferralDate' => 'setDeferralDate', - 'enrolmentCommunicationsIssuedDate' => 'setEnrolmentCommunicationsIssuedDate', - 'workerExclusionCode' => 'setWorkerExclusionCode', - 'reenrolmentIndicator' => 'setReenrolmentIndicator', 'optOutWindowEndDate' => 'setOptOutWindowEndDate', 'pensionJoinReason' => 'setPensionJoinReason', - 'pensionStartDate' => 'setPensionStartDate' + 'pensionStartDate' => 'setPensionStartDate', + 'reenrolmentIndicator' => 'setReenrolmentIndicator', + 'statutoryLetterCode' => 'setStatutoryLetterCode', + 'workerExclusionCode' => 'setWorkerExclusionCode' ]; /** @@ -240,17 +240,17 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'assessmentCode' => 'getAssessmentCode', + 'deferralDate' => 'getDeferralDate', + 'enrolmentCommunicationsIssuedDate' => 'getEnrolmentCommunicationsIssuedDate', 'eventCode' => 'getEventCode', 'eventDate' => 'getEventDate', - 'statutoryLetterCode' => 'getStatutoryLetterCode', 'isIndividualAlreadyMemberOfQPS' => 'getIsIndividualAlreadyMemberOfQPS', - 'deferralDate' => 'getDeferralDate', - 'enrolmentCommunicationsIssuedDate' => 'getEnrolmentCommunicationsIssuedDate', - 'workerExclusionCode' => 'getWorkerExclusionCode', - 'reenrolmentIndicator' => 'getReenrolmentIndicator', 'optOutWindowEndDate' => 'getOptOutWindowEndDate', 'pensionJoinReason' => 'getPensionJoinReason', - 'pensionStartDate' => 'getPensionStartDate' + 'pensionStartDate' => 'getPensionStartDate', + 'reenrolmentIndicator' => 'getReenrolmentIndicator', + 'statutoryLetterCode' => 'getStatutoryLetterCode', + 'workerExclusionCode' => 'getWorkerExclusionCode' ]; /** @@ -310,17 +310,17 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('assessmentCode', $data ?? [], null); + $this->setIfExists('deferralDate', $data ?? [], null); + $this->setIfExists('enrolmentCommunicationsIssuedDate', $data ?? [], null); $this->setIfExists('eventCode', $data ?? [], null); $this->setIfExists('eventDate', $data ?? [], null); - $this->setIfExists('statutoryLetterCode', $data ?? [], null); $this->setIfExists('isIndividualAlreadyMemberOfQPS', $data ?? [], null); - $this->setIfExists('deferralDate', $data ?? [], null); - $this->setIfExists('enrolmentCommunicationsIssuedDate', $data ?? [], null); - $this->setIfExists('workerExclusionCode', $data ?? [], null); - $this->setIfExists('reenrolmentIndicator', $data ?? [], null); $this->setIfExists('optOutWindowEndDate', $data ?? [], null); $this->setIfExists('pensionJoinReason', $data ?? [], null); $this->setIfExists('pensionStartDate', $data ?? [], null); + $this->setIfExists('reenrolmentIndicator', $data ?? [], null); + $this->setIfExists('statutoryLetterCode', $data ?? [], null); + $this->setIfExists('workerExclusionCode', $data ?? [], null); } /** @@ -393,96 +393,130 @@ public function setAssessmentCode(?int $assessmentCode): static } /** - * Gets eventCode + * Gets deferralDate * - * @return int|null + * @return \DateTime|null */ - public function getEventCode(): ?int + public function getDeferralDate(): ?\DateTime { - return $this->container['eventCode']; + return $this->container['deferralDate']; } /** - * Sets eventCode + * Sets deferralDate * - * @param int|null $eventCode [readonly] + * @param \DateTime|null $deferralDate [readonly] * * @return $this */ - public function setEventCode(?int $eventCode): static + public function setDeferralDate(?\DateTime $deferralDate): static { - if (is_null($eventCode)) { - throw new InvalidArgumentException('non-nullable eventCode cannot be null'); + if (is_null($deferralDate)) { + array_push($this->openAPINullablesSetToNull, 'deferralDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deferralDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['eventCode'] = $eventCode; + $this->container['deferralDate'] = $deferralDate; return $this; } /** - * Gets eventDate + * Gets enrolmentCommunicationsIssuedDate * * @return \DateTime|null */ - public function getEventDate(): ?\DateTime + public function getEnrolmentCommunicationsIssuedDate(): ?\DateTime { - return $this->container['eventDate']; + return $this->container['enrolmentCommunicationsIssuedDate']; } /** - * Sets eventDate + * Sets enrolmentCommunicationsIssuedDate * - * @param \DateTime|null $eventDate [readonly] + * @param \DateTime|null $enrolmentCommunicationsIssuedDate [readonly] * * @return $this */ - public function setEventDate(?\DateTime $eventDate): static + public function setEnrolmentCommunicationsIssuedDate(?\DateTime $enrolmentCommunicationsIssuedDate): static { - if (is_null($eventDate)) { - array_push($this->openAPINullablesSetToNull, 'eventDate'); + if (is_null($enrolmentCommunicationsIssuedDate)) { + array_push($this->openAPINullablesSetToNull, 'enrolmentCommunicationsIssuedDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('eventDate', $nullablesSetToNull); + $index = array_search('enrolmentCommunicationsIssuedDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['eventDate'] = $eventDate; + $this->container['enrolmentCommunicationsIssuedDate'] = $enrolmentCommunicationsIssuedDate; return $this; } /** - * Gets statutoryLetterCode + * Gets eventCode * - * @return string|null + * @return int|null */ - public function getStatutoryLetterCode(): ?string + public function getEventCode(): ?int { - return $this->container['statutoryLetterCode']; + return $this->container['eventCode']; } /** - * Sets statutoryLetterCode + * Sets eventCode * - * @param string|null $statutoryLetterCode [readonly] + * @param int|null $eventCode [readonly] * * @return $this */ - public function setStatutoryLetterCode(?string $statutoryLetterCode): static + public function setEventCode(?int $eventCode): static { - if (is_null($statutoryLetterCode)) { - array_push($this->openAPINullablesSetToNull, 'statutoryLetterCode'); + if (is_null($eventCode)) { + throw new InvalidArgumentException('non-nullable eventCode cannot be null'); + } + $this->container['eventCode'] = $eventCode; + + return $this; + } + + /** + * Gets eventDate + * + * @return \DateTime|null + */ + public function getEventDate(): ?\DateTime + { + return $this->container['eventDate']; + } + + /** + * Sets eventDate + * + * @param \DateTime|null $eventDate [readonly] + * + * @return $this + */ + public function setEventDate(?\DateTime $eventDate): static + { + if (is_null($eventDate)) { + array_push($this->openAPINullablesSetToNull, 'eventDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('statutoryLetterCode', $nullablesSetToNull); + $index = array_search('eventDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['statutoryLetterCode'] = $statutoryLetterCode; + $this->container['eventDate'] = $eventDate; return $this; } @@ -515,103 +549,96 @@ public function setIsIndividualAlreadyMemberOfQPS(?bool $isIndividualAlreadyMemb } /** - * Gets deferralDate + * Gets optOutWindowEndDate * * @return \DateTime|null */ - public function getDeferralDate(): ?\DateTime + public function getOptOutWindowEndDate(): ?\DateTime { - return $this->container['deferralDate']; + return $this->container['optOutWindowEndDate']; } /** - * Sets deferralDate + * Sets optOutWindowEndDate * - * @param \DateTime|null $deferralDate [readonly] + * @param \DateTime|null $optOutWindowEndDate [readonly] * * @return $this */ - public function setDeferralDate(?\DateTime $deferralDate): static + public function setOptOutWindowEndDate(?\DateTime $optOutWindowEndDate): static { - if (is_null($deferralDate)) { - array_push($this->openAPINullablesSetToNull, 'deferralDate'); + if (is_null($optOutWindowEndDate)) { + array_push($this->openAPINullablesSetToNull, 'optOutWindowEndDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('deferralDate', $nullablesSetToNull); + $index = array_search('optOutWindowEndDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['deferralDate'] = $deferralDate; + $this->container['optOutWindowEndDate'] = $optOutWindowEndDate; return $this; } /** - * Gets enrolmentCommunicationsIssuedDate + * Gets pensionJoinReason * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\PensionJoinReason|null */ - public function getEnrolmentCommunicationsIssuedDate(): ?\DateTime + public function getPensionJoinReason(): ?\SynergiTech\Staffology\Model\PensionJoinReason { - return $this->container['enrolmentCommunicationsIssuedDate']; + return $this->container['pensionJoinReason']; } /** - * Sets enrolmentCommunicationsIssuedDate + * Sets pensionJoinReason * - * @param \DateTime|null $enrolmentCommunicationsIssuedDate [readonly] + * @param \SynergiTech\Staffology\Model\PensionJoinReason|null $pensionJoinReason pensionJoinReason * * @return $this */ - public function setEnrolmentCommunicationsIssuedDate(?\DateTime $enrolmentCommunicationsIssuedDate): static + public function setPensionJoinReason(?\SynergiTech\Staffology\Model\PensionJoinReason $pensionJoinReason): static { - if (is_null($enrolmentCommunicationsIssuedDate)) { - array_push($this->openAPINullablesSetToNull, 'enrolmentCommunicationsIssuedDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('enrolmentCommunicationsIssuedDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($pensionJoinReason)) { + throw new InvalidArgumentException('non-nullable pensionJoinReason cannot be null'); } - $this->container['enrolmentCommunicationsIssuedDate'] = $enrolmentCommunicationsIssuedDate; + $this->container['pensionJoinReason'] = $pensionJoinReason; return $this; } /** - * Gets workerExclusionCode + * Gets pensionStartDate * - * @return string|null + * @return \DateTime|null */ - public function getWorkerExclusionCode(): ?string + public function getPensionStartDate(): ?\DateTime { - return $this->container['workerExclusionCode']; + return $this->container['pensionStartDate']; } /** - * Sets workerExclusionCode + * Sets pensionStartDate * - * @param string|null $workerExclusionCode [readonly] + * @param \DateTime|null $pensionStartDate [readonly] * * @return $this */ - public function setWorkerExclusionCode(?string $workerExclusionCode): static + public function setPensionStartDate(?\DateTime $pensionStartDate): static { - if (is_null($workerExclusionCode)) { - array_push($this->openAPINullablesSetToNull, 'workerExclusionCode'); + if (is_null($pensionStartDate)) { + array_push($this->openAPINullablesSetToNull, 'pensionStartDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('workerExclusionCode', $nullablesSetToNull); + $index = array_search('pensionStartDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['workerExclusionCode'] = $workerExclusionCode; + $this->container['pensionStartDate'] = $pensionStartDate; return $this; } @@ -644,96 +671,69 @@ public function setReenrolmentIndicator(?bool $reenrolmentIndicator): static } /** - * Gets optOutWindowEndDate + * Gets statutoryLetterCode * - * @return \DateTime|null + * @return string|null */ - public function getOptOutWindowEndDate(): ?\DateTime + public function getStatutoryLetterCode(): ?string { - return $this->container['optOutWindowEndDate']; + return $this->container['statutoryLetterCode']; } /** - * Sets optOutWindowEndDate + * Sets statutoryLetterCode * - * @param \DateTime|null $optOutWindowEndDate [readonly] + * @param string|null $statutoryLetterCode [readonly] * * @return $this */ - public function setOptOutWindowEndDate(?\DateTime $optOutWindowEndDate): static + public function setStatutoryLetterCode(?string $statutoryLetterCode): static { - if (is_null($optOutWindowEndDate)) { - array_push($this->openAPINullablesSetToNull, 'optOutWindowEndDate'); + if (is_null($statutoryLetterCode)) { + array_push($this->openAPINullablesSetToNull, 'statutoryLetterCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('optOutWindowEndDate', $nullablesSetToNull); + $index = array_search('statutoryLetterCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['optOutWindowEndDate'] = $optOutWindowEndDate; - - return $this; - } - - /** - * Gets pensionJoinReason - * - * @return \SynergiTech\Staffology\Model\PensionJoinReason|null - */ - public function getPensionJoinReason(): ?\SynergiTech\Staffology\Model\PensionJoinReason - { - return $this->container['pensionJoinReason']; - } - - /** - * Sets pensionJoinReason - * - * @param \SynergiTech\Staffology\Model\PensionJoinReason|null $pensionJoinReason pensionJoinReason - * - * @return $this - */ - public function setPensionJoinReason(?\SynergiTech\Staffology\Model\PensionJoinReason $pensionJoinReason): static - { - if (is_null($pensionJoinReason)) { - throw new InvalidArgumentException('non-nullable pensionJoinReason cannot be null'); - } - $this->container['pensionJoinReason'] = $pensionJoinReason; + $this->container['statutoryLetterCode'] = $statutoryLetterCode; return $this; } /** - * Gets pensionStartDate + * Gets workerExclusionCode * - * @return \DateTime|null + * @return string|null */ - public function getPensionStartDate(): ?\DateTime + public function getWorkerExclusionCode(): ?string { - return $this->container['pensionStartDate']; + return $this->container['workerExclusionCode']; } /** - * Sets pensionStartDate + * Sets workerExclusionCode * - * @param \DateTime|null $pensionStartDate [readonly] + * @param string|null $workerExclusionCode [readonly] * * @return $this */ - public function setPensionStartDate(?\DateTime $pensionStartDate): static + public function setWorkerExclusionCode(?string $workerExclusionCode): static { - if (is_null($pensionStartDate)) { - array_push($this->openAPINullablesSetToNull, 'pensionStartDate'); + if (is_null($workerExclusionCode)) { + array_push($this->openAPINullablesSetToNull, 'workerExclusionCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionStartDate', $nullablesSetToNull); + $index = array_search('workerExclusionCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionStartDate'] = $pensionStartDate; + $this->container['workerExclusionCode'] = $workerExclusionCode; return $this; } diff --git a/src/Model/PapdisEmployeeContact.php b/src/Model/PapdisEmployeeContact.php index b8341a3..9c74901 100644 --- a/src/Model/PapdisEmployeeContact.php +++ b/src/Model/PapdisEmployeeContact.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class PapdisEmployeeContact implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPITypes = [ - 'postalAddress' => '\SynergiTech\Staffology\Model\PapdisEmployeeContactPostalAddress', 'emailAddress' => 'string', + 'mobile' => 'string', + 'postalAddress' => '\SynergiTech\Staffology\Model\PapdisEmployeeContactPostalAddress', 'secondaryEmailAddress' => 'string', - 'telephone' => 'string', - 'mobile' => 'string' + 'telephone' => 'string' ]; /** @@ -72,11 +72,11 @@ class PapdisEmployeeContact implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPIFormats = [ - 'postalAddress' => null, 'emailAddress' => null, + 'mobile' => null, + 'postalAddress' => null, 'secondaryEmailAddress' => null, - 'telephone' => null, - 'mobile' => null + 'telephone' => null ]; /** @@ -85,11 +85,11 @@ class PapdisEmployeeContact implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPINullables = [ - 'postalAddress' => false, 'emailAddress' => true, + 'mobile' => true, + 'postalAddress' => false, 'secondaryEmailAddress' => true, - 'telephone' => true, - 'mobile' => true + 'telephone' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'postalAddress' => 'postalAddress', 'emailAddress' => 'emailAddress', + 'mobile' => 'mobile', + 'postalAddress' => 'postalAddress', 'secondaryEmailAddress' => 'secondaryEmailAddress', - 'telephone' => 'telephone', - 'mobile' => 'mobile' + 'telephone' => 'telephone' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'postalAddress' => 'setPostalAddress', 'emailAddress' => 'setEmailAddress', + 'mobile' => 'setMobile', + 'postalAddress' => 'setPostalAddress', 'secondaryEmailAddress' => 'setSecondaryEmailAddress', - 'telephone' => 'setTelephone', - 'mobile' => 'setMobile' + 'telephone' => 'setTelephone' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'postalAddress' => 'getPostalAddress', 'emailAddress' => 'getEmailAddress', + 'mobile' => 'getMobile', + 'postalAddress' => 'getPostalAddress', 'secondaryEmailAddress' => 'getSecondaryEmailAddress', - 'telephone' => 'getTelephone', - 'mobile' => 'getMobile' + 'telephone' => 'getTelephone' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('postalAddress', $data ?? [], null); $this->setIfExists('emailAddress', $data ?? [], null); + $this->setIfExists('mobile', $data ?? [], null); + $this->setIfExists('postalAddress', $data ?? [], null); $this->setIfExists('secondaryEmailAddress', $data ?? [], null); $this->setIfExists('telephone', $data ?? [], null); - $this->setIfExists('mobile', $data ?? [], null); } /** @@ -317,62 +317,96 @@ public function valid(): bool /** - * Gets postalAddress + * Gets emailAddress * - * @return \SynergiTech\Staffology\Model\PapdisEmployeeContactPostalAddress|null + * @return string|null */ - public function getPostalAddress(): ?\SynergiTech\Staffology\Model\PapdisEmployeeContactPostalAddress + public function getEmailAddress(): ?string { - return $this->container['postalAddress']; + return $this->container['emailAddress']; } /** - * Sets postalAddress + * Sets emailAddress * - * @param \SynergiTech\Staffology\Model\PapdisEmployeeContactPostalAddress|null $postalAddress postalAddress + * @param string|null $emailAddress [readonly] * * @return $this */ - public function setPostalAddress(?\SynergiTech\Staffology\Model\PapdisEmployeeContactPostalAddress $postalAddress): static + public function setEmailAddress(?string $emailAddress): static { - if (is_null($postalAddress)) { - throw new InvalidArgumentException('non-nullable postalAddress cannot be null'); + if (is_null($emailAddress)) { + array_push($this->openAPINullablesSetToNull, 'emailAddress'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('emailAddress', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['postalAddress'] = $postalAddress; + $this->container['emailAddress'] = $emailAddress; return $this; } /** - * Gets emailAddress + * Gets mobile * * @return string|null */ - public function getEmailAddress(): ?string + public function getMobile(): ?string { - return $this->container['emailAddress']; + return $this->container['mobile']; } /** - * Sets emailAddress + * Sets mobile * - * @param string|null $emailAddress [readonly] + * @param string|null $mobile [readonly] * * @return $this */ - public function setEmailAddress(?string $emailAddress): static + public function setMobile(?string $mobile): static { - if (is_null($emailAddress)) { - array_push($this->openAPINullablesSetToNull, 'emailAddress'); + if (is_null($mobile)) { + array_push($this->openAPINullablesSetToNull, 'mobile'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('emailAddress', $nullablesSetToNull); + $index = array_search('mobile', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['emailAddress'] = $emailAddress; + $this->container['mobile'] = $mobile; + + return $this; + } + + /** + * Gets postalAddress + * + * @return \SynergiTech\Staffology\Model\PapdisEmployeeContactPostalAddress|null + */ + public function getPostalAddress(): ?\SynergiTech\Staffology\Model\PapdisEmployeeContactPostalAddress + { + return $this->container['postalAddress']; + } + + /** + * Sets postalAddress + * + * @param \SynergiTech\Staffology\Model\PapdisEmployeeContactPostalAddress|null $postalAddress postalAddress + * + * @return $this + */ + public function setPostalAddress(?\SynergiTech\Staffology\Model\PapdisEmployeeContactPostalAddress $postalAddress): static + { + if (is_null($postalAddress)) { + throw new InvalidArgumentException('non-nullable postalAddress cannot be null'); + } + $this->container['postalAddress'] = $postalAddress; return $this; } @@ -444,40 +478,6 @@ public function setTelephone(?string $telephone): static return $this; } - - /** - * Gets mobile - * - * @return string|null - */ - public function getMobile(): ?string - { - return $this->container['mobile']; - } - - /** - * Sets mobile - * - * @param string|null $mobile [readonly] - * - * @return $this - */ - public function setMobile(?string $mobile): static - { - if (is_null($mobile)) { - array_push($this->openAPINullablesSetToNull, 'mobile'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mobile', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['mobile'] = $mobile; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PapdisEmployeeContactPostalAddress.php b/src/Model/PapdisEmployeeContactPostalAddress.php index 7be09cf..8de765b 100644 --- a/src/Model/PapdisEmployeeContactPostalAddress.php +++ b/src/Model/PapdisEmployeeContactPostalAddress.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -63,8 +63,8 @@ class PapdisEmployeeContactPostalAddress implements ModelInterface, ArrayAccess, 'address2' => 'string', 'address3' => 'string', 'address4' => 'string', - 'postcode' => 'string', - 'country' => 'string' + 'country' => 'string', + 'postcode' => 'string' ]; /** @@ -77,8 +77,8 @@ class PapdisEmployeeContactPostalAddress implements ModelInterface, ArrayAccess, 'address2' => null, 'address3' => null, 'address4' => null, - 'postcode' => null, - 'country' => null + 'country' => null, + 'postcode' => null ]; /** @@ -91,8 +91,8 @@ class PapdisEmployeeContactPostalAddress implements ModelInterface, ArrayAccess, 'address2' => true, 'address3' => true, 'address4' => true, - 'postcode' => true, - 'country' => true + 'country' => true, + 'postcode' => true ]; /** @@ -185,8 +185,8 @@ public function isNullableSetToNull(string $property): bool 'address2' => 'address2', 'address3' => 'address3', 'address4' => 'address4', - 'postcode' => 'postcode', - 'country' => 'country' + 'country' => 'country', + 'postcode' => 'postcode' ]; /** @@ -199,8 +199,8 @@ public function isNullableSetToNull(string $property): bool 'address2' => 'setAddress2', 'address3' => 'setAddress3', 'address4' => 'setAddress4', - 'postcode' => 'setPostcode', - 'country' => 'setCountry' + 'country' => 'setCountry', + 'postcode' => 'setPostcode' ]; /** @@ -213,8 +213,8 @@ public function isNullableSetToNull(string $property): bool 'address2' => 'getAddress2', 'address3' => 'getAddress3', 'address4' => 'getAddress4', - 'postcode' => 'getPostcode', - 'country' => 'getCountry' + 'country' => 'getCountry', + 'postcode' => 'getPostcode' ]; /** @@ -277,8 +277,8 @@ public function __construct(?array $data = null) $this->setIfExists('address2', $data ?? [], null); $this->setIfExists('address3', $data ?? [], null); $this->setIfExists('address4', $data ?? [], null); - $this->setIfExists('postcode', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('postcode', $data ?? [], null); } /** @@ -460,69 +460,69 @@ public function setAddress4(?string $address4): static } /** - * Gets postcode + * Gets country * * @return string|null */ - public function getPostcode(): ?string + public function getCountry(): ?string { - return $this->container['postcode']; + return $this->container['country']; } /** - * Sets postcode + * Sets country * - * @param string|null $postcode [readonly] + * @param string|null $country [readonly] * * @return $this */ - public function setPostcode(?string $postcode): static + public function setCountry(?string $country): static { - if (is_null($postcode)) { - array_push($this->openAPINullablesSetToNull, 'postcode'); + if (is_null($country)) { + array_push($this->openAPINullablesSetToNull, 'country'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('postcode', $nullablesSetToNull); + $index = array_search('country', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['postcode'] = $postcode; + $this->container['country'] = $country; return $this; } /** - * Gets country + * Gets postcode * * @return string|null */ - public function getCountry(): ?string + public function getPostcode(): ?string { - return $this->container['country']; + return $this->container['postcode']; } /** - * Sets country + * Sets postcode * - * @param string|null $country [readonly] + * @param string|null $postcode [readonly] * * @return $this */ - public function setCountry(?string $country): static + public function setPostcode(?string $postcode): static { - if (is_null($country)) { - array_push($this->openAPINullablesSetToNull, 'country'); + if (is_null($postcode)) { + array_push($this->openAPINullablesSetToNull, 'postcode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('country', $nullablesSetToNull); + $index = array_search('postcode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['country'] = $country; + $this->container['postcode'] = $postcode; return $this; } diff --git a/src/Model/PapdisEmployeeContribution.php b/src/Model/PapdisEmployeeContribution.php index 27d3aaa..ffc66ab 100644 --- a/src/Model/PapdisEmployeeContribution.php +++ b/src/Model/PapdisEmployeeContribution.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,28 +59,29 @@ class PapdisEmployeeContribution implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'employerContributionsAmount' => 'float', - 'employerContributionsPercent' => 'float', - 'employeeContributionsAmount' => 'float', - 'employeeContributionsPercent' => 'float', 'additionalVoluntaryContributionsAmount' => 'float', 'additionalVoluntaryContributionsPercent' => 'float', - 'salarySacrificeIndicator' => 'bool', + 'assumedPensionablePay' => 'float', + 'contributionLevelType' => '\SynergiTech\Staffology\Model\PensionContributionLevelType', 'contributionStartDate' => '\DateTime', 'employeeContributionIsPercentage' => 'bool', + 'employeeContributionsAmount' => 'float', + 'employeeContributionsPercent' => 'float', + 'employerContributionIncludesNiSaving' => 'bool', 'employerContributionIsPercentage' => 'bool', - 'unadjustedEmployeeContributionsAmount' => 'float', - 'unadjustedEmployerContributionsAmount' => 'float', - 'unadjustedAdditionalVoluntaryContributionsAmount' => 'float', 'employerContributionNiSavings' => 'float', - 'contributionLevelType' => '\SynergiTech\Staffology\Model\PensionContributionLevelType', + 'employerContributionsAmount' => 'float', + 'employerContributionsPercent' => 'float', 'isAvcOnly' => 'bool', - 'employerContributionIncludesNiSaving' => 'bool', - 'unadjustedAdditionalVoluntaryContributionsPercent' => 'float', 'isHalfContributionMember' => 'bool', - 'assumedPensionablePay' => 'float', + 'isPensionAvcPayLine' => 'bool', 'isPensionRefund' => 'bool', - 'lowerLimit' => 'float' + 'lowerLimit' => 'float', + 'salarySacrificeIndicator' => 'bool', + 'unadjustedAdditionalVoluntaryContributionsAmount' => 'float', + 'unadjustedAdditionalVoluntaryContributionsPercent' => 'float', + 'unadjustedEmployeeContributionsAmount' => 'float', + 'unadjustedEmployerContributionsAmount' => 'float' ]; /** @@ -89,28 +90,29 @@ class PapdisEmployeeContribution implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'employerContributionsAmount' => 'double', - 'employerContributionsPercent' => 'double', - 'employeeContributionsAmount' => 'double', - 'employeeContributionsPercent' => 'double', 'additionalVoluntaryContributionsAmount' => 'double', 'additionalVoluntaryContributionsPercent' => 'double', - 'salarySacrificeIndicator' => null, + 'assumedPensionablePay' => 'double', + 'contributionLevelType' => null, 'contributionStartDate' => 'date', 'employeeContributionIsPercentage' => null, + 'employeeContributionsAmount' => 'double', + 'employeeContributionsPercent' => 'double', + 'employerContributionIncludesNiSaving' => null, 'employerContributionIsPercentage' => null, - 'unadjustedEmployeeContributionsAmount' => 'double', - 'unadjustedEmployerContributionsAmount' => 'double', - 'unadjustedAdditionalVoluntaryContributionsAmount' => 'double', 'employerContributionNiSavings' => 'double', - 'contributionLevelType' => null, + 'employerContributionsAmount' => 'double', + 'employerContributionsPercent' => 'double', 'isAvcOnly' => null, - 'employerContributionIncludesNiSaving' => null, - 'unadjustedAdditionalVoluntaryContributionsPercent' => 'double', 'isHalfContributionMember' => null, - 'assumedPensionablePay' => 'double', + 'isPensionAvcPayLine' => null, 'isPensionRefund' => null, - 'lowerLimit' => 'double' + 'lowerLimit' => 'double', + 'salarySacrificeIndicator' => null, + 'unadjustedAdditionalVoluntaryContributionsAmount' => 'double', + 'unadjustedAdditionalVoluntaryContributionsPercent' => 'double', + 'unadjustedEmployeeContributionsAmount' => 'double', + 'unadjustedEmployerContributionsAmount' => 'double' ]; /** @@ -119,28 +121,29 @@ class PapdisEmployeeContribution implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'employerContributionsAmount' => false, - 'employerContributionsPercent' => false, - 'employeeContributionsAmount' => false, - 'employeeContributionsPercent' => false, 'additionalVoluntaryContributionsAmount' => false, 'additionalVoluntaryContributionsPercent' => false, - 'salarySacrificeIndicator' => false, + 'assumedPensionablePay' => true, + 'contributionLevelType' => false, 'contributionStartDate' => false, 'employeeContributionIsPercentage' => false, + 'employeeContributionsAmount' => false, + 'employeeContributionsPercent' => false, + 'employerContributionIncludesNiSaving' => false, 'employerContributionIsPercentage' => false, - 'unadjustedEmployeeContributionsAmount' => false, - 'unadjustedEmployerContributionsAmount' => false, - 'unadjustedAdditionalVoluntaryContributionsAmount' => false, 'employerContributionNiSavings' => false, - 'contributionLevelType' => false, + 'employerContributionsAmount' => false, + 'employerContributionsPercent' => false, 'isAvcOnly' => false, - 'employerContributionIncludesNiSaving' => false, - 'unadjustedAdditionalVoluntaryContributionsPercent' => false, 'isHalfContributionMember' => false, - 'assumedPensionablePay' => true, + 'isPensionAvcPayLine' => false, 'isPensionRefund' => false, - 'lowerLimit' => false + 'lowerLimit' => false, + 'salarySacrificeIndicator' => false, + 'unadjustedAdditionalVoluntaryContributionsAmount' => false, + 'unadjustedAdditionalVoluntaryContributionsPercent' => false, + 'unadjustedEmployeeContributionsAmount' => false, + 'unadjustedEmployerContributionsAmount' => false ]; /** @@ -229,28 +232,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employerContributionsAmount' => 'employerContributionsAmount', - 'employerContributionsPercent' => 'employerContributionsPercent', - 'employeeContributionsAmount' => 'employeeContributionsAmount', - 'employeeContributionsPercent' => 'employeeContributionsPercent', 'additionalVoluntaryContributionsAmount' => 'additionalVoluntaryContributionsAmount', 'additionalVoluntaryContributionsPercent' => 'additionalVoluntaryContributionsPercent', - 'salarySacrificeIndicator' => 'salarySacrificeIndicator', + 'assumedPensionablePay' => 'assumedPensionablePay', + 'contributionLevelType' => 'contributionLevelType', 'contributionStartDate' => 'contributionStartDate', 'employeeContributionIsPercentage' => 'employeeContributionIsPercentage', + 'employeeContributionsAmount' => 'employeeContributionsAmount', + 'employeeContributionsPercent' => 'employeeContributionsPercent', + 'employerContributionIncludesNiSaving' => 'employerContributionIncludesNiSaving', 'employerContributionIsPercentage' => 'employerContributionIsPercentage', - 'unadjustedEmployeeContributionsAmount' => 'unadjustedEmployeeContributionsAmount', - 'unadjustedEmployerContributionsAmount' => 'unadjustedEmployerContributionsAmount', - 'unadjustedAdditionalVoluntaryContributionsAmount' => 'unadjustedAdditionalVoluntaryContributionsAmount', 'employerContributionNiSavings' => 'employerContributionNiSavings', - 'contributionLevelType' => 'contributionLevelType', + 'employerContributionsAmount' => 'employerContributionsAmount', + 'employerContributionsPercent' => 'employerContributionsPercent', 'isAvcOnly' => 'isAvcOnly', - 'employerContributionIncludesNiSaving' => 'employerContributionIncludesNiSaving', - 'unadjustedAdditionalVoluntaryContributionsPercent' => 'unadjustedAdditionalVoluntaryContributionsPercent', 'isHalfContributionMember' => 'isHalfContributionMember', - 'assumedPensionablePay' => 'assumedPensionablePay', + 'isPensionAvcPayLine' => 'isPensionAvcPayLine', 'isPensionRefund' => 'isPensionRefund', - 'lowerLimit' => 'lowerLimit' + 'lowerLimit' => 'lowerLimit', + 'salarySacrificeIndicator' => 'salarySacrificeIndicator', + 'unadjustedAdditionalVoluntaryContributionsAmount' => 'unadjustedAdditionalVoluntaryContributionsAmount', + 'unadjustedAdditionalVoluntaryContributionsPercent' => 'unadjustedAdditionalVoluntaryContributionsPercent', + 'unadjustedEmployeeContributionsAmount' => 'unadjustedEmployeeContributionsAmount', + 'unadjustedEmployerContributionsAmount' => 'unadjustedEmployerContributionsAmount' ]; /** @@ -259,28 +263,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employerContributionsAmount' => 'setEmployerContributionsAmount', - 'employerContributionsPercent' => 'setEmployerContributionsPercent', - 'employeeContributionsAmount' => 'setEmployeeContributionsAmount', - 'employeeContributionsPercent' => 'setEmployeeContributionsPercent', 'additionalVoluntaryContributionsAmount' => 'setAdditionalVoluntaryContributionsAmount', 'additionalVoluntaryContributionsPercent' => 'setAdditionalVoluntaryContributionsPercent', - 'salarySacrificeIndicator' => 'setSalarySacrificeIndicator', + 'assumedPensionablePay' => 'setAssumedPensionablePay', + 'contributionLevelType' => 'setContributionLevelType', 'contributionStartDate' => 'setContributionStartDate', 'employeeContributionIsPercentage' => 'setEmployeeContributionIsPercentage', + 'employeeContributionsAmount' => 'setEmployeeContributionsAmount', + 'employeeContributionsPercent' => 'setEmployeeContributionsPercent', + 'employerContributionIncludesNiSaving' => 'setEmployerContributionIncludesNiSaving', 'employerContributionIsPercentage' => 'setEmployerContributionIsPercentage', - 'unadjustedEmployeeContributionsAmount' => 'setUnadjustedEmployeeContributionsAmount', - 'unadjustedEmployerContributionsAmount' => 'setUnadjustedEmployerContributionsAmount', - 'unadjustedAdditionalVoluntaryContributionsAmount' => 'setUnadjustedAdditionalVoluntaryContributionsAmount', 'employerContributionNiSavings' => 'setEmployerContributionNiSavings', - 'contributionLevelType' => 'setContributionLevelType', + 'employerContributionsAmount' => 'setEmployerContributionsAmount', + 'employerContributionsPercent' => 'setEmployerContributionsPercent', 'isAvcOnly' => 'setIsAvcOnly', - 'employerContributionIncludesNiSaving' => 'setEmployerContributionIncludesNiSaving', - 'unadjustedAdditionalVoluntaryContributionsPercent' => 'setUnadjustedAdditionalVoluntaryContributionsPercent', 'isHalfContributionMember' => 'setIsHalfContributionMember', - 'assumedPensionablePay' => 'setAssumedPensionablePay', + 'isPensionAvcPayLine' => 'setIsPensionAvcPayLine', 'isPensionRefund' => 'setIsPensionRefund', - 'lowerLimit' => 'setLowerLimit' + 'lowerLimit' => 'setLowerLimit', + 'salarySacrificeIndicator' => 'setSalarySacrificeIndicator', + 'unadjustedAdditionalVoluntaryContributionsAmount' => 'setUnadjustedAdditionalVoluntaryContributionsAmount', + 'unadjustedAdditionalVoluntaryContributionsPercent' => 'setUnadjustedAdditionalVoluntaryContributionsPercent', + 'unadjustedEmployeeContributionsAmount' => 'setUnadjustedEmployeeContributionsAmount', + 'unadjustedEmployerContributionsAmount' => 'setUnadjustedEmployerContributionsAmount' ]; /** @@ -289,28 +294,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employerContributionsAmount' => 'getEmployerContributionsAmount', - 'employerContributionsPercent' => 'getEmployerContributionsPercent', - 'employeeContributionsAmount' => 'getEmployeeContributionsAmount', - 'employeeContributionsPercent' => 'getEmployeeContributionsPercent', 'additionalVoluntaryContributionsAmount' => 'getAdditionalVoluntaryContributionsAmount', 'additionalVoluntaryContributionsPercent' => 'getAdditionalVoluntaryContributionsPercent', - 'salarySacrificeIndicator' => 'getSalarySacrificeIndicator', + 'assumedPensionablePay' => 'getAssumedPensionablePay', + 'contributionLevelType' => 'getContributionLevelType', 'contributionStartDate' => 'getContributionStartDate', 'employeeContributionIsPercentage' => 'getEmployeeContributionIsPercentage', + 'employeeContributionsAmount' => 'getEmployeeContributionsAmount', + 'employeeContributionsPercent' => 'getEmployeeContributionsPercent', + 'employerContributionIncludesNiSaving' => 'getEmployerContributionIncludesNiSaving', 'employerContributionIsPercentage' => 'getEmployerContributionIsPercentage', - 'unadjustedEmployeeContributionsAmount' => 'getUnadjustedEmployeeContributionsAmount', - 'unadjustedEmployerContributionsAmount' => 'getUnadjustedEmployerContributionsAmount', - 'unadjustedAdditionalVoluntaryContributionsAmount' => 'getUnadjustedAdditionalVoluntaryContributionsAmount', 'employerContributionNiSavings' => 'getEmployerContributionNiSavings', - 'contributionLevelType' => 'getContributionLevelType', + 'employerContributionsAmount' => 'getEmployerContributionsAmount', + 'employerContributionsPercent' => 'getEmployerContributionsPercent', 'isAvcOnly' => 'getIsAvcOnly', - 'employerContributionIncludesNiSaving' => 'getEmployerContributionIncludesNiSaving', - 'unadjustedAdditionalVoluntaryContributionsPercent' => 'getUnadjustedAdditionalVoluntaryContributionsPercent', 'isHalfContributionMember' => 'getIsHalfContributionMember', - 'assumedPensionablePay' => 'getAssumedPensionablePay', + 'isPensionAvcPayLine' => 'getIsPensionAvcPayLine', 'isPensionRefund' => 'getIsPensionRefund', - 'lowerLimit' => 'getLowerLimit' + 'lowerLimit' => 'getLowerLimit', + 'salarySacrificeIndicator' => 'getSalarySacrificeIndicator', + 'unadjustedAdditionalVoluntaryContributionsAmount' => 'getUnadjustedAdditionalVoluntaryContributionsAmount', + 'unadjustedAdditionalVoluntaryContributionsPercent' => 'getUnadjustedAdditionalVoluntaryContributionsPercent', + 'unadjustedEmployeeContributionsAmount' => 'getUnadjustedEmployeeContributionsAmount', + 'unadjustedEmployerContributionsAmount' => 'getUnadjustedEmployerContributionsAmount' ]; /** @@ -369,28 +375,29 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employerContributionsAmount', $data ?? [], null); - $this->setIfExists('employerContributionsPercent', $data ?? [], null); - $this->setIfExists('employeeContributionsAmount', $data ?? [], null); - $this->setIfExists('employeeContributionsPercent', $data ?? [], null); $this->setIfExists('additionalVoluntaryContributionsAmount', $data ?? [], null); $this->setIfExists('additionalVoluntaryContributionsPercent', $data ?? [], null); - $this->setIfExists('salarySacrificeIndicator', $data ?? [], null); + $this->setIfExists('assumedPensionablePay', $data ?? [], null); + $this->setIfExists('contributionLevelType', $data ?? [], null); $this->setIfExists('contributionStartDate', $data ?? [], null); $this->setIfExists('employeeContributionIsPercentage', $data ?? [], null); + $this->setIfExists('employeeContributionsAmount', $data ?? [], null); + $this->setIfExists('employeeContributionsPercent', $data ?? [], null); + $this->setIfExists('employerContributionIncludesNiSaving', $data ?? [], null); $this->setIfExists('employerContributionIsPercentage', $data ?? [], null); - $this->setIfExists('unadjustedEmployeeContributionsAmount', $data ?? [], null); - $this->setIfExists('unadjustedEmployerContributionsAmount', $data ?? [], null); - $this->setIfExists('unadjustedAdditionalVoluntaryContributionsAmount', $data ?? [], null); $this->setIfExists('employerContributionNiSavings', $data ?? [], null); - $this->setIfExists('contributionLevelType', $data ?? [], null); + $this->setIfExists('employerContributionsAmount', $data ?? [], null); + $this->setIfExists('employerContributionsPercent', $data ?? [], null); $this->setIfExists('isAvcOnly', $data ?? [], null); - $this->setIfExists('employerContributionIncludesNiSaving', $data ?? [], null); - $this->setIfExists('unadjustedAdditionalVoluntaryContributionsPercent', $data ?? [], null); $this->setIfExists('isHalfContributionMember', $data ?? [], null); - $this->setIfExists('assumedPensionablePay', $data ?? [], null); + $this->setIfExists('isPensionAvcPayLine', $data ?? [], null); $this->setIfExists('isPensionRefund', $data ?? [], null); $this->setIfExists('lowerLimit', $data ?? [], null); + $this->setIfExists('salarySacrificeIndicator', $data ?? [], null); + $this->setIfExists('unadjustedAdditionalVoluntaryContributionsAmount', $data ?? [], null); + $this->setIfExists('unadjustedAdditionalVoluntaryContributionsPercent', $data ?? [], null); + $this->setIfExists('unadjustedEmployeeContributionsAmount', $data ?? [], null); + $this->setIfExists('unadjustedEmployerContributionsAmount', $data ?? [], null); } /** @@ -436,244 +443,251 @@ public function valid(): bool /** - * Gets employerContributionsAmount + * Gets additionalVoluntaryContributionsAmount * * @return float|null */ - public function getEmployerContributionsAmount(): ?float + public function getAdditionalVoluntaryContributionsAmount(): ?float { - return $this->container['employerContributionsAmount']; + return $this->container['additionalVoluntaryContributionsAmount']; } /** - * Sets employerContributionsAmount + * Sets additionalVoluntaryContributionsAmount * - * @param float|null $employerContributionsAmount [readonly] + * @param float|null $additionalVoluntaryContributionsAmount [readonly] * * @return $this */ - public function setEmployerContributionsAmount(?float $employerContributionsAmount): static + public function setAdditionalVoluntaryContributionsAmount(?float $additionalVoluntaryContributionsAmount): static { - if (is_null($employerContributionsAmount)) { - throw new InvalidArgumentException('non-nullable employerContributionsAmount cannot be null'); + if (is_null($additionalVoluntaryContributionsAmount)) { + throw new InvalidArgumentException('non-nullable additionalVoluntaryContributionsAmount cannot be null'); } - $this->container['employerContributionsAmount'] = $employerContributionsAmount; + $this->container['additionalVoluntaryContributionsAmount'] = $additionalVoluntaryContributionsAmount; return $this; } /** - * Gets employerContributionsPercent + * Gets additionalVoluntaryContributionsPercent * * @return float|null */ - public function getEmployerContributionsPercent(): ?float + public function getAdditionalVoluntaryContributionsPercent(): ?float { - return $this->container['employerContributionsPercent']; + return $this->container['additionalVoluntaryContributionsPercent']; } /** - * Sets employerContributionsPercent + * Sets additionalVoluntaryContributionsPercent * - * @param float|null $employerContributionsPercent [readonly] + * @param float|null $additionalVoluntaryContributionsPercent [readonly] * * @return $this */ - public function setEmployerContributionsPercent(?float $employerContributionsPercent): static + public function setAdditionalVoluntaryContributionsPercent(?float $additionalVoluntaryContributionsPercent): static { - if (is_null($employerContributionsPercent)) { - throw new InvalidArgumentException('non-nullable employerContributionsPercent cannot be null'); + if (is_null($additionalVoluntaryContributionsPercent)) { + throw new InvalidArgumentException('non-nullable additionalVoluntaryContributionsPercent cannot be null'); } - $this->container['employerContributionsPercent'] = $employerContributionsPercent; + $this->container['additionalVoluntaryContributionsPercent'] = $additionalVoluntaryContributionsPercent; return $this; } /** - * Gets employeeContributionsAmount + * Gets assumedPensionablePay * * @return float|null */ - public function getEmployeeContributionsAmount(): ?float + public function getAssumedPensionablePay(): ?float { - return $this->container['employeeContributionsAmount']; + return $this->container['assumedPensionablePay']; } /** - * Sets employeeContributionsAmount + * Sets assumedPensionablePay * - * @param float|null $employeeContributionsAmount [readonly] + * @param float|null $assumedPensionablePay [readonly] * * @return $this */ - public function setEmployeeContributionsAmount(?float $employeeContributionsAmount): static + public function setAssumedPensionablePay(?float $assumedPensionablePay): static { - if (is_null($employeeContributionsAmount)) { - throw new InvalidArgumentException('non-nullable employeeContributionsAmount cannot be null'); + if (is_null($assumedPensionablePay)) { + array_push($this->openAPINullablesSetToNull, 'assumedPensionablePay'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('assumedPensionablePay', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeeContributionsAmount'] = $employeeContributionsAmount; + $this->container['assumedPensionablePay'] = $assumedPensionablePay; return $this; } /** - * Gets employeeContributionsPercent + * Gets contributionLevelType * - * @return float|null + * @return \SynergiTech\Staffology\Model\PensionContributionLevelType|null */ - public function getEmployeeContributionsPercent(): ?float + public function getContributionLevelType(): ?\SynergiTech\Staffology\Model\PensionContributionLevelType { - return $this->container['employeeContributionsPercent']; + return $this->container['contributionLevelType']; } /** - * Sets employeeContributionsPercent + * Sets contributionLevelType * - * @param float|null $employeeContributionsPercent [readonly] + * @param \SynergiTech\Staffology\Model\PensionContributionLevelType|null $contributionLevelType contributionLevelType * * @return $this */ - public function setEmployeeContributionsPercent(?float $employeeContributionsPercent): static + public function setContributionLevelType(?\SynergiTech\Staffology\Model\PensionContributionLevelType $contributionLevelType): static { - if (is_null($employeeContributionsPercent)) { - throw new InvalidArgumentException('non-nullable employeeContributionsPercent cannot be null'); + if (is_null($contributionLevelType)) { + throw new InvalidArgumentException('non-nullable contributionLevelType cannot be null'); } - $this->container['employeeContributionsPercent'] = $employeeContributionsPercent; + $this->container['contributionLevelType'] = $contributionLevelType; return $this; } /** - * Gets additionalVoluntaryContributionsAmount + * Gets contributionStartDate * - * @return float|null + * @return \DateTime|null */ - public function getAdditionalVoluntaryContributionsAmount(): ?float + public function getContributionStartDate(): ?\DateTime { - return $this->container['additionalVoluntaryContributionsAmount']; + return $this->container['contributionStartDate']; } /** - * Sets additionalVoluntaryContributionsAmount + * Sets contributionStartDate * - * @param float|null $additionalVoluntaryContributionsAmount [readonly] + * @param \DateTime|null $contributionStartDate [readonly] * * @return $this */ - public function setAdditionalVoluntaryContributionsAmount(?float $additionalVoluntaryContributionsAmount): static + public function setContributionStartDate(?\DateTime $contributionStartDate): static { - if (is_null($additionalVoluntaryContributionsAmount)) { - throw new InvalidArgumentException('non-nullable additionalVoluntaryContributionsAmount cannot be null'); + if (is_null($contributionStartDate)) { + throw new InvalidArgumentException('non-nullable contributionStartDate cannot be null'); } - $this->container['additionalVoluntaryContributionsAmount'] = $additionalVoluntaryContributionsAmount; + $this->container['contributionStartDate'] = $contributionStartDate; return $this; } /** - * Gets additionalVoluntaryContributionsPercent + * Gets employeeContributionIsPercentage * - * @return float|null + * @return bool|null */ - public function getAdditionalVoluntaryContributionsPercent(): ?float + public function getEmployeeContributionIsPercentage(): ?bool { - return $this->container['additionalVoluntaryContributionsPercent']; + return $this->container['employeeContributionIsPercentage']; } /** - * Sets additionalVoluntaryContributionsPercent + * Sets employeeContributionIsPercentage * - * @param float|null $additionalVoluntaryContributionsPercent [readonly] + * @param bool|null $employeeContributionIsPercentage [readonly] * * @return $this */ - public function setAdditionalVoluntaryContributionsPercent(?float $additionalVoluntaryContributionsPercent): static + public function setEmployeeContributionIsPercentage(?bool $employeeContributionIsPercentage): static { - if (is_null($additionalVoluntaryContributionsPercent)) { - throw new InvalidArgumentException('non-nullable additionalVoluntaryContributionsPercent cannot be null'); + if (is_null($employeeContributionIsPercentage)) { + throw new InvalidArgumentException('non-nullable employeeContributionIsPercentage cannot be null'); } - $this->container['additionalVoluntaryContributionsPercent'] = $additionalVoluntaryContributionsPercent; + $this->container['employeeContributionIsPercentage'] = $employeeContributionIsPercentage; return $this; } /** - * Gets salarySacrificeIndicator + * Gets employeeContributionsAmount * - * @return bool|null + * @return float|null */ - public function getSalarySacrificeIndicator(): ?bool + public function getEmployeeContributionsAmount(): ?float { - return $this->container['salarySacrificeIndicator']; + return $this->container['employeeContributionsAmount']; } /** - * Sets salarySacrificeIndicator + * Sets employeeContributionsAmount * - * @param bool|null $salarySacrificeIndicator [readonly] + * @param float|null $employeeContributionsAmount [readonly] * * @return $this */ - public function setSalarySacrificeIndicator(?bool $salarySacrificeIndicator): static + public function setEmployeeContributionsAmount(?float $employeeContributionsAmount): static { - if (is_null($salarySacrificeIndicator)) { - throw new InvalidArgumentException('non-nullable salarySacrificeIndicator cannot be null'); + if (is_null($employeeContributionsAmount)) { + throw new InvalidArgumentException('non-nullable employeeContributionsAmount cannot be null'); } - $this->container['salarySacrificeIndicator'] = $salarySacrificeIndicator; + $this->container['employeeContributionsAmount'] = $employeeContributionsAmount; return $this; } /** - * Gets contributionStartDate + * Gets employeeContributionsPercent * - * @return \DateTime|null + * @return float|null */ - public function getContributionStartDate(): ?\DateTime + public function getEmployeeContributionsPercent(): ?float { - return $this->container['contributionStartDate']; + return $this->container['employeeContributionsPercent']; } /** - * Sets contributionStartDate + * Sets employeeContributionsPercent * - * @param \DateTime|null $contributionStartDate [readonly] + * @param float|null $employeeContributionsPercent [readonly] * * @return $this */ - public function setContributionStartDate(?\DateTime $contributionStartDate): static + public function setEmployeeContributionsPercent(?float $employeeContributionsPercent): static { - if (is_null($contributionStartDate)) { - throw new InvalidArgumentException('non-nullable contributionStartDate cannot be null'); + if (is_null($employeeContributionsPercent)) { + throw new InvalidArgumentException('non-nullable employeeContributionsPercent cannot be null'); } - $this->container['contributionStartDate'] = $contributionStartDate; + $this->container['employeeContributionsPercent'] = $employeeContributionsPercent; return $this; } /** - * Gets employeeContributionIsPercentage + * Gets employerContributionIncludesNiSaving * * @return bool|null */ - public function getEmployeeContributionIsPercentage(): ?bool + public function getEmployerContributionIncludesNiSaving(): ?bool { - return $this->container['employeeContributionIsPercentage']; + return $this->container['employerContributionIncludesNiSaving']; } /** - * Sets employeeContributionIsPercentage + * Sets employerContributionIncludesNiSaving * - * @param bool|null $employeeContributionIsPercentage [readonly] + * @param bool|null $employerContributionIncludesNiSaving [readonly] * * @return $this */ - public function setEmployeeContributionIsPercentage(?bool $employeeContributionIsPercentage): static + public function setEmployerContributionIncludesNiSaving(?bool $employerContributionIncludesNiSaving): static { - if (is_null($employeeContributionIsPercentage)) { - throw new InvalidArgumentException('non-nullable employeeContributionIsPercentage cannot be null'); + if (is_null($employerContributionIncludesNiSaving)) { + throw new InvalidArgumentException('non-nullable employerContributionIncludesNiSaving cannot be null'); } - $this->container['employeeContributionIsPercentage'] = $employeeContributionIsPercentage; + $this->container['employerContributionIncludesNiSaving'] = $employerContributionIncludesNiSaving; return $this; } @@ -706,332 +720,352 @@ public function setEmployerContributionIsPercentage(?bool $employerContributionI } /** - * Gets unadjustedEmployeeContributionsAmount + * Gets employerContributionNiSavings * * @return float|null */ - public function getUnadjustedEmployeeContributionsAmount(): ?float + public function getEmployerContributionNiSavings(): ?float { - return $this->container['unadjustedEmployeeContributionsAmount']; + return $this->container['employerContributionNiSavings']; } /** - * Sets unadjustedEmployeeContributionsAmount + * Sets employerContributionNiSavings * - * @param float|null $unadjustedEmployeeContributionsAmount [readonly] + * @param float|null $employerContributionNiSavings [readonly] * * @return $this */ - public function setUnadjustedEmployeeContributionsAmount(?float $unadjustedEmployeeContributionsAmount): static + public function setEmployerContributionNiSavings(?float $employerContributionNiSavings): static { - if (is_null($unadjustedEmployeeContributionsAmount)) { - throw new InvalidArgumentException('non-nullable unadjustedEmployeeContributionsAmount cannot be null'); + if (is_null($employerContributionNiSavings)) { + throw new InvalidArgumentException('non-nullable employerContributionNiSavings cannot be null'); } - $this->container['unadjustedEmployeeContributionsAmount'] = $unadjustedEmployeeContributionsAmount; + $this->container['employerContributionNiSavings'] = $employerContributionNiSavings; return $this; } /** - * Gets unadjustedEmployerContributionsAmount + * Gets employerContributionsAmount * * @return float|null */ - public function getUnadjustedEmployerContributionsAmount(): ?float + public function getEmployerContributionsAmount(): ?float { - return $this->container['unadjustedEmployerContributionsAmount']; + return $this->container['employerContributionsAmount']; } /** - * Sets unadjustedEmployerContributionsAmount + * Sets employerContributionsAmount * - * @param float|null $unadjustedEmployerContributionsAmount [readonly] + * @param float|null $employerContributionsAmount [readonly] * * @return $this */ - public function setUnadjustedEmployerContributionsAmount(?float $unadjustedEmployerContributionsAmount): static + public function setEmployerContributionsAmount(?float $employerContributionsAmount): static { - if (is_null($unadjustedEmployerContributionsAmount)) { - throw new InvalidArgumentException('non-nullable unadjustedEmployerContributionsAmount cannot be null'); + if (is_null($employerContributionsAmount)) { + throw new InvalidArgumentException('non-nullable employerContributionsAmount cannot be null'); } - $this->container['unadjustedEmployerContributionsAmount'] = $unadjustedEmployerContributionsAmount; + $this->container['employerContributionsAmount'] = $employerContributionsAmount; return $this; } /** - * Gets unadjustedAdditionalVoluntaryContributionsAmount + * Gets employerContributionsPercent * * @return float|null */ - public function getUnadjustedAdditionalVoluntaryContributionsAmount(): ?float + public function getEmployerContributionsPercent(): ?float { - return $this->container['unadjustedAdditionalVoluntaryContributionsAmount']; + return $this->container['employerContributionsPercent']; } /** - * Sets unadjustedAdditionalVoluntaryContributionsAmount + * Sets employerContributionsPercent * - * @param float|null $unadjustedAdditionalVoluntaryContributionsAmount [readonly] + * @param float|null $employerContributionsPercent [readonly] * * @return $this */ - public function setUnadjustedAdditionalVoluntaryContributionsAmount(?float $unadjustedAdditionalVoluntaryContributionsAmount): static + public function setEmployerContributionsPercent(?float $employerContributionsPercent): static { - if (is_null($unadjustedAdditionalVoluntaryContributionsAmount)) { - throw new InvalidArgumentException('non-nullable unadjustedAdditionalVoluntaryContributionsAmount cannot be null'); + if (is_null($employerContributionsPercent)) { + throw new InvalidArgumentException('non-nullable employerContributionsPercent cannot be null'); } - $this->container['unadjustedAdditionalVoluntaryContributionsAmount'] = $unadjustedAdditionalVoluntaryContributionsAmount; + $this->container['employerContributionsPercent'] = $employerContributionsPercent; return $this; } /** - * Gets employerContributionNiSavings + * Gets isAvcOnly * - * @return float|null + * @return bool|null */ - public function getEmployerContributionNiSavings(): ?float + public function getIsAvcOnly(): ?bool { - return $this->container['employerContributionNiSavings']; + return $this->container['isAvcOnly']; } /** - * Sets employerContributionNiSavings + * Sets isAvcOnly * - * @param float|null $employerContributionNiSavings [readonly] + * @param bool|null $isAvcOnly [readonly] * * @return $this */ - public function setEmployerContributionNiSavings(?float $employerContributionNiSavings): static + public function setIsAvcOnly(?bool $isAvcOnly): static { - if (is_null($employerContributionNiSavings)) { - throw new InvalidArgumentException('non-nullable employerContributionNiSavings cannot be null'); + if (is_null($isAvcOnly)) { + throw new InvalidArgumentException('non-nullable isAvcOnly cannot be null'); } - $this->container['employerContributionNiSavings'] = $employerContributionNiSavings; + $this->container['isAvcOnly'] = $isAvcOnly; return $this; } /** - * Gets contributionLevelType + * Gets isHalfContributionMember * - * @return \SynergiTech\Staffology\Model\PensionContributionLevelType|null + * @return bool|null */ - public function getContributionLevelType(): ?\SynergiTech\Staffology\Model\PensionContributionLevelType + public function getIsHalfContributionMember(): ?bool { - return $this->container['contributionLevelType']; + return $this->container['isHalfContributionMember']; } /** - * Sets contributionLevelType + * Sets isHalfContributionMember * - * @param \SynergiTech\Staffology\Model\PensionContributionLevelType|null $contributionLevelType contributionLevelType + * @param bool|null $isHalfContributionMember [readonly] * * @return $this */ - public function setContributionLevelType(?\SynergiTech\Staffology\Model\PensionContributionLevelType $contributionLevelType): static + public function setIsHalfContributionMember(?bool $isHalfContributionMember): static { - if (is_null($contributionLevelType)) { - throw new InvalidArgumentException('non-nullable contributionLevelType cannot be null'); + if (is_null($isHalfContributionMember)) { + throw new InvalidArgumentException('non-nullable isHalfContributionMember cannot be null'); } - $this->container['contributionLevelType'] = $contributionLevelType; + $this->container['isHalfContributionMember'] = $isHalfContributionMember; return $this; } /** - * Gets isAvcOnly + * Gets isPensionAvcPayLine * * @return bool|null */ - public function getIsAvcOnly(): ?bool + public function getIsPensionAvcPayLine(): ?bool { - return $this->container['isAvcOnly']; + return $this->container['isPensionAvcPayLine']; } /** - * Sets isAvcOnly + * Sets isPensionAvcPayLine * - * @param bool|null $isAvcOnly [readonly] + * @param bool|null $isPensionAvcPayLine Indicates whether the pay run entry includes a pension AVC pay line. * * @return $this */ - public function setIsAvcOnly(?bool $isAvcOnly): static + public function setIsPensionAvcPayLine(?bool $isPensionAvcPayLine): static { - if (is_null($isAvcOnly)) { - throw new InvalidArgumentException('non-nullable isAvcOnly cannot be null'); + if (is_null($isPensionAvcPayLine)) { + throw new InvalidArgumentException('non-nullable isPensionAvcPayLine cannot be null'); } - $this->container['isAvcOnly'] = $isAvcOnly; + $this->container['isPensionAvcPayLine'] = $isPensionAvcPayLine; return $this; } /** - * Gets employerContributionIncludesNiSaving + * Gets isPensionRefund * * @return bool|null */ - public function getEmployerContributionIncludesNiSaving(): ?bool + public function getIsPensionRefund(): ?bool { - return $this->container['employerContributionIncludesNiSaving']; + return $this->container['isPensionRefund']; } /** - * Sets employerContributionIncludesNiSaving + * Sets isPensionRefund * - * @param bool|null $employerContributionIncludesNiSaving [readonly] + * @param bool|null $isPensionRefund [readonly] * * @return $this */ - public function setEmployerContributionIncludesNiSaving(?bool $employerContributionIncludesNiSaving): static + public function setIsPensionRefund(?bool $isPensionRefund): static { - if (is_null($employerContributionIncludesNiSaving)) { - throw new InvalidArgumentException('non-nullable employerContributionIncludesNiSaving cannot be null'); + if (is_null($isPensionRefund)) { + throw new InvalidArgumentException('non-nullable isPensionRefund cannot be null'); } - $this->container['employerContributionIncludesNiSaving'] = $employerContributionIncludesNiSaving; + $this->container['isPensionRefund'] = $isPensionRefund; return $this; } /** - * Gets unadjustedAdditionalVoluntaryContributionsPercent + * Gets lowerLimit * * @return float|null */ - public function getUnadjustedAdditionalVoluntaryContributionsPercent(): ?float + public function getLowerLimit(): ?float { - return $this->container['unadjustedAdditionalVoluntaryContributionsPercent']; + return $this->container['lowerLimit']; } /** - * Sets unadjustedAdditionalVoluntaryContributionsPercent + * Sets lowerLimit * - * @param float|null $unadjustedAdditionalVoluntaryContributionsPercent [readonly] + * @param float|null $lowerLimit [readonly] * * @return $this */ - public function setUnadjustedAdditionalVoluntaryContributionsPercent(?float $unadjustedAdditionalVoluntaryContributionsPercent): static + public function setLowerLimit(?float $lowerLimit): static { - if (is_null($unadjustedAdditionalVoluntaryContributionsPercent)) { - throw new InvalidArgumentException('non-nullable unadjustedAdditionalVoluntaryContributionsPercent cannot be null'); + if (is_null($lowerLimit)) { + throw new InvalidArgumentException('non-nullable lowerLimit cannot be null'); } - $this->container['unadjustedAdditionalVoluntaryContributionsPercent'] = $unadjustedAdditionalVoluntaryContributionsPercent; + $this->container['lowerLimit'] = $lowerLimit; return $this; } /** - * Gets isHalfContributionMember + * Gets salarySacrificeIndicator * * @return bool|null */ - public function getIsHalfContributionMember(): ?bool + public function getSalarySacrificeIndicator(): ?bool { - return $this->container['isHalfContributionMember']; + return $this->container['salarySacrificeIndicator']; } /** - * Sets isHalfContributionMember + * Sets salarySacrificeIndicator * - * @param bool|null $isHalfContributionMember [readonly] + * @param bool|null $salarySacrificeIndicator [readonly] * * @return $this */ - public function setIsHalfContributionMember(?bool $isHalfContributionMember): static + public function setSalarySacrificeIndicator(?bool $salarySacrificeIndicator): static { - if (is_null($isHalfContributionMember)) { - throw new InvalidArgumentException('non-nullable isHalfContributionMember cannot be null'); + if (is_null($salarySacrificeIndicator)) { + throw new InvalidArgumentException('non-nullable salarySacrificeIndicator cannot be null'); } - $this->container['isHalfContributionMember'] = $isHalfContributionMember; + $this->container['salarySacrificeIndicator'] = $salarySacrificeIndicator; return $this; } /** - * Gets assumedPensionablePay + * Gets unadjustedAdditionalVoluntaryContributionsAmount * * @return float|null */ - public function getAssumedPensionablePay(): ?float + public function getUnadjustedAdditionalVoluntaryContributionsAmount(): ?float { - return $this->container['assumedPensionablePay']; + return $this->container['unadjustedAdditionalVoluntaryContributionsAmount']; } /** - * Sets assumedPensionablePay + * Sets unadjustedAdditionalVoluntaryContributionsAmount * - * @param float|null $assumedPensionablePay [readonly] + * @param float|null $unadjustedAdditionalVoluntaryContributionsAmount [readonly] * * @return $this */ - public function setAssumedPensionablePay(?float $assumedPensionablePay): static + public function setUnadjustedAdditionalVoluntaryContributionsAmount(?float $unadjustedAdditionalVoluntaryContributionsAmount): static { - if (is_null($assumedPensionablePay)) { - array_push($this->openAPINullablesSetToNull, 'assumedPensionablePay'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('assumedPensionablePay', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($unadjustedAdditionalVoluntaryContributionsAmount)) { + throw new InvalidArgumentException('non-nullable unadjustedAdditionalVoluntaryContributionsAmount cannot be null'); } - $this->container['assumedPensionablePay'] = $assumedPensionablePay; + $this->container['unadjustedAdditionalVoluntaryContributionsAmount'] = $unadjustedAdditionalVoluntaryContributionsAmount; return $this; } /** - * Gets isPensionRefund + * Gets unadjustedAdditionalVoluntaryContributionsPercent * - * @return bool|null + * @return float|null */ - public function getIsPensionRefund(): ?bool + public function getUnadjustedAdditionalVoluntaryContributionsPercent(): ?float { - return $this->container['isPensionRefund']; + return $this->container['unadjustedAdditionalVoluntaryContributionsPercent']; } /** - * Sets isPensionRefund + * Sets unadjustedAdditionalVoluntaryContributionsPercent * - * @param bool|null $isPensionRefund [readonly] + * @param float|null $unadjustedAdditionalVoluntaryContributionsPercent [readonly] * * @return $this */ - public function setIsPensionRefund(?bool $isPensionRefund): static + public function setUnadjustedAdditionalVoluntaryContributionsPercent(?float $unadjustedAdditionalVoluntaryContributionsPercent): static { - if (is_null($isPensionRefund)) { - throw new InvalidArgumentException('non-nullable isPensionRefund cannot be null'); + if (is_null($unadjustedAdditionalVoluntaryContributionsPercent)) { + throw new InvalidArgumentException('non-nullable unadjustedAdditionalVoluntaryContributionsPercent cannot be null'); } - $this->container['isPensionRefund'] = $isPensionRefund; + $this->container['unadjustedAdditionalVoluntaryContributionsPercent'] = $unadjustedAdditionalVoluntaryContributionsPercent; return $this; } /** - * Gets lowerLimit + * Gets unadjustedEmployeeContributionsAmount * * @return float|null */ - public function getLowerLimit(): ?float + public function getUnadjustedEmployeeContributionsAmount(): ?float { - return $this->container['lowerLimit']; + return $this->container['unadjustedEmployeeContributionsAmount']; } /** - * Sets lowerLimit + * Sets unadjustedEmployeeContributionsAmount * - * @param float|null $lowerLimit [readonly] + * @param float|null $unadjustedEmployeeContributionsAmount [readonly] * * @return $this */ - public function setLowerLimit(?float $lowerLimit): static + public function setUnadjustedEmployeeContributionsAmount(?float $unadjustedEmployeeContributionsAmount): static { - if (is_null($lowerLimit)) { - throw new InvalidArgumentException('non-nullable lowerLimit cannot be null'); + if (is_null($unadjustedEmployeeContributionsAmount)) { + throw new InvalidArgumentException('non-nullable unadjustedEmployeeContributionsAmount cannot be null'); } - $this->container['lowerLimit'] = $lowerLimit; + $this->container['unadjustedEmployeeContributionsAmount'] = $unadjustedEmployeeContributionsAmount; + + return $this; + } + + /** + * Gets unadjustedEmployerContributionsAmount + * + * @return float|null + */ + public function getUnadjustedEmployerContributionsAmount(): ?float + { + return $this->container['unadjustedEmployerContributionsAmount']; + } + + /** + * Sets unadjustedEmployerContributionsAmount + * + * @param float|null $unadjustedEmployerContributionsAmount [readonly] + * + * @return $this + */ + public function setUnadjustedEmployerContributionsAmount(?float $unadjustedEmployerContributionsAmount): static + { + if (is_null($unadjustedEmployerContributionsAmount)) { + throw new InvalidArgumentException('non-nullable unadjustedEmployerContributionsAmount cannot be null'); + } + $this->container['unadjustedEmployerContributionsAmount'] = $unadjustedEmployerContributionsAmount; return $this; } diff --git a/src/Model/PapdisEmployeeExit.php b/src/Model/PapdisEmployeeExit.php index 2be669c..7e3d879 100644 --- a/src/Model/PapdisEmployeeExit.php +++ b/src/Model/PapdisEmployeeExit.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class PapdisEmployeeExit implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'exitDate' => '\DateTime', - 'exitReasonCode' => 'int', 'aeOptOutDate' => '\DateTime', 'aeOptOutReference' => 'string', + 'exitDate' => '\DateTime', + 'exitReasonCode' => 'int', 'reasonForLeaving' => 'string' ]; @@ -72,10 +72,10 @@ class PapdisEmployeeExit implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'exitDate' => 'date', - 'exitReasonCode' => 'int32', 'aeOptOutDate' => 'date', 'aeOptOutReference' => null, + 'exitDate' => 'date', + 'exitReasonCode' => 'int32', 'reasonForLeaving' => null ]; @@ -85,10 +85,10 @@ class PapdisEmployeeExit implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'exitDate' => true, - 'exitReasonCode' => true, 'aeOptOutDate' => true, 'aeOptOutReference' => true, + 'exitDate' => true, + 'exitReasonCode' => true, 'reasonForLeaving' => true ]; @@ -178,10 +178,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'exitDate' => 'exitDate', - 'exitReasonCode' => 'exitReasonCode', 'aeOptOutDate' => 'aeOptOutDate', 'aeOptOutReference' => 'aeOptOutReference', + 'exitDate' => 'exitDate', + 'exitReasonCode' => 'exitReasonCode', 'reasonForLeaving' => 'reasonForLeaving' ]; @@ -191,10 +191,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'exitDate' => 'setExitDate', - 'exitReasonCode' => 'setExitReasonCode', 'aeOptOutDate' => 'setAeOptOutDate', 'aeOptOutReference' => 'setAeOptOutReference', + 'exitDate' => 'setExitDate', + 'exitReasonCode' => 'setExitReasonCode', 'reasonForLeaving' => 'setReasonForLeaving' ]; @@ -204,10 +204,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'exitDate' => 'getExitDate', - 'exitReasonCode' => 'getExitReasonCode', 'aeOptOutDate' => 'getAeOptOutDate', 'aeOptOutReference' => 'getAeOptOutReference', + 'exitDate' => 'getExitDate', + 'exitReasonCode' => 'getExitReasonCode', 'reasonForLeaving' => 'getReasonForLeaving' ]; @@ -267,10 +267,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('exitDate', $data ?? [], null); - $this->setIfExists('exitReasonCode', $data ?? [], null); $this->setIfExists('aeOptOutDate', $data ?? [], null); $this->setIfExists('aeOptOutReference', $data ?? [], null); + $this->setIfExists('exitDate', $data ?? [], null); + $this->setIfExists('exitReasonCode', $data ?? [], null); $this->setIfExists('reasonForLeaving', $data ?? [], null); } @@ -317,137 +317,137 @@ public function valid(): bool /** - * Gets exitDate + * Gets aeOptOutDate * * @return \DateTime|null */ - public function getExitDate(): ?\DateTime + public function getAeOptOutDate(): ?\DateTime { - return $this->container['exitDate']; + return $this->container['aeOptOutDate']; } /** - * Sets exitDate + * Sets aeOptOutDate * - * @param \DateTime|null $exitDate [readonly] + * @param \DateTime|null $aeOptOutDate [readonly] * * @return $this */ - public function setExitDate(?\DateTime $exitDate): static + public function setAeOptOutDate(?\DateTime $aeOptOutDate): static { - if (is_null($exitDate)) { - array_push($this->openAPINullablesSetToNull, 'exitDate'); + if (is_null($aeOptOutDate)) { + array_push($this->openAPINullablesSetToNull, 'aeOptOutDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('exitDate', $nullablesSetToNull); + $index = array_search('aeOptOutDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['exitDate'] = $exitDate; + $this->container['aeOptOutDate'] = $aeOptOutDate; return $this; } /** - * Gets exitReasonCode + * Gets aeOptOutReference * - * @return int|null + * @return string|null */ - public function getExitReasonCode(): ?int + public function getAeOptOutReference(): ?string { - return $this->container['exitReasonCode']; + return $this->container['aeOptOutReference']; } /** - * Sets exitReasonCode + * Sets aeOptOutReference * - * @param int|null $exitReasonCode [readonly] + * @param string|null $aeOptOutReference [readonly] * * @return $this */ - public function setExitReasonCode(?int $exitReasonCode): static + public function setAeOptOutReference(?string $aeOptOutReference): static { - if (is_null($exitReasonCode)) { - array_push($this->openAPINullablesSetToNull, 'exitReasonCode'); + if (is_null($aeOptOutReference)) { + array_push($this->openAPINullablesSetToNull, 'aeOptOutReference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('exitReasonCode', $nullablesSetToNull); + $index = array_search('aeOptOutReference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['exitReasonCode'] = $exitReasonCode; + $this->container['aeOptOutReference'] = $aeOptOutReference; return $this; } /** - * Gets aeOptOutDate + * Gets exitDate * * @return \DateTime|null */ - public function getAeOptOutDate(): ?\DateTime + public function getExitDate(): ?\DateTime { - return $this->container['aeOptOutDate']; + return $this->container['exitDate']; } /** - * Sets aeOptOutDate + * Sets exitDate * - * @param \DateTime|null $aeOptOutDate [readonly] + * @param \DateTime|null $exitDate [readonly] * * @return $this */ - public function setAeOptOutDate(?\DateTime $aeOptOutDate): static + public function setExitDate(?\DateTime $exitDate): static { - if (is_null($aeOptOutDate)) { - array_push($this->openAPINullablesSetToNull, 'aeOptOutDate'); + if (is_null($exitDate)) { + array_push($this->openAPINullablesSetToNull, 'exitDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aeOptOutDate', $nullablesSetToNull); + $index = array_search('exitDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['aeOptOutDate'] = $aeOptOutDate; + $this->container['exitDate'] = $exitDate; return $this; } /** - * Gets aeOptOutReference + * Gets exitReasonCode * - * @return string|null + * @return int|null */ - public function getAeOptOutReference(): ?string + public function getExitReasonCode(): ?int { - return $this->container['aeOptOutReference']; + return $this->container['exitReasonCode']; } /** - * Sets aeOptOutReference + * Sets exitReasonCode * - * @param string|null $aeOptOutReference [readonly] + * @param int|null $exitReasonCode [readonly] * * @return $this */ - public function setAeOptOutReference(?string $aeOptOutReference): static + public function setExitReasonCode(?int $exitReasonCode): static { - if (is_null($aeOptOutReference)) { - array_push($this->openAPINullablesSetToNull, 'aeOptOutReference'); + if (is_null($exitReasonCode)) { + array_push($this->openAPINullablesSetToNull, 'exitReasonCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('aeOptOutReference', $nullablesSetToNull); + $index = array_search('exitReasonCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['aeOptOutReference'] = $aeOptOutReference; + $this->container['exitReasonCode'] = $exitReasonCode; return $this; } diff --git a/src/Model/PapdisEmployeeIdentity.php b/src/Model/PapdisEmployeeIdentity.php index ea6343b..13988d6 100644 --- a/src/Model/PapdisEmployeeIdentity.php +++ b/src/Model/PapdisEmployeeIdentity.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class PapdisEmployeeIdentity implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'employeeId' => 'string', 'birthDate' => '\DateTime', - 'gender' => 'string', - 'nationalInsuranceNumber' => 'string', + 'employeeId' => 'string', 'employmentStartDate' => '\DateTime', - 'maritalStatus' => '\SynergiTech\Staffology\Model\MaritalStatus' + 'gender' => 'string', + 'maritalStatus' => '\SynergiTech\Staffology\Model\MaritalStatus', + 'nationalInsuranceNumber' => 'string' ]; /** @@ -73,12 +73,12 @@ class PapdisEmployeeIdentity implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ - 'employeeId' => null, 'birthDate' => 'date', - 'gender' => null, - 'nationalInsuranceNumber' => null, + 'employeeId' => null, 'employmentStartDate' => 'date', - 'maritalStatus' => null + 'gender' => null, + 'maritalStatus' => null, + 'nationalInsuranceNumber' => null ]; /** @@ -87,12 +87,12 @@ class PapdisEmployeeIdentity implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ - 'employeeId' => true, 'birthDate' => false, - 'gender' => true, - 'nationalInsuranceNumber' => true, + 'employeeId' => true, 'employmentStartDate' => false, - 'maritalStatus' => false + 'gender' => true, + 'maritalStatus' => false, + 'nationalInsuranceNumber' => true ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employeeId' => 'employeeId', 'birthDate' => 'birthDate', - 'gender' => 'gender', - 'nationalInsuranceNumber' => 'nationalInsuranceNumber', + 'employeeId' => 'employeeId', 'employmentStartDate' => 'employmentStartDate', - 'maritalStatus' => 'maritalStatus' + 'gender' => 'gender', + 'maritalStatus' => 'maritalStatus', + 'nationalInsuranceNumber' => 'nationalInsuranceNumber' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employeeId' => 'setEmployeeId', 'birthDate' => 'setBirthDate', - 'gender' => 'setGender', - 'nationalInsuranceNumber' => 'setNationalInsuranceNumber', + 'employeeId' => 'setEmployeeId', 'employmentStartDate' => 'setEmploymentStartDate', - 'maritalStatus' => 'setMaritalStatus' + 'gender' => 'setGender', + 'maritalStatus' => 'setMaritalStatus', + 'nationalInsuranceNumber' => 'setNationalInsuranceNumber' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employeeId' => 'getEmployeeId', 'birthDate' => 'getBirthDate', - 'gender' => 'getGender', - 'nationalInsuranceNumber' => 'getNationalInsuranceNumber', + 'employeeId' => 'getEmployeeId', 'employmentStartDate' => 'getEmploymentStartDate', - 'maritalStatus' => 'getMaritalStatus' + 'gender' => 'getGender', + 'maritalStatus' => 'getMaritalStatus', + 'nationalInsuranceNumber' => 'getNationalInsuranceNumber' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employeeId', $data ?? [], null); $this->setIfExists('birthDate', $data ?? [], null); - $this->setIfExists('gender', $data ?? [], null); - $this->setIfExists('nationalInsuranceNumber', $data ?? [], null); + $this->setIfExists('employeeId', $data ?? [], null); $this->setIfExists('employmentStartDate', $data ?? [], null); + $this->setIfExists('gender', $data ?? [], null); $this->setIfExists('maritalStatus', $data ?? [], null); + $this->setIfExists('nationalInsuranceNumber', $data ?? [], null); } /** @@ -323,6 +323,33 @@ public function valid(): bool } + /** + * Gets birthDate + * + * @return \DateTime|null + */ + public function getBirthDate(): ?\DateTime + { + return $this->container['birthDate']; + } + + /** + * Sets birthDate + * + * @param \DateTime|null $birthDate [readonly] + * + * @return $this + */ + public function setBirthDate(?\DateTime $birthDate): static + { + if (is_null($birthDate)) { + throw new InvalidArgumentException('non-nullable birthDate cannot be null'); + } + $this->container['birthDate'] = $birthDate; + + return $this; + } + /** * Gets employeeId * @@ -358,28 +385,28 @@ public function setEmployeeId(?string $employeeId): static } /** - * Gets birthDate + * Gets employmentStartDate * * @return \DateTime|null */ - public function getBirthDate(): ?\DateTime + public function getEmploymentStartDate(): ?\DateTime { - return $this->container['birthDate']; + return $this->container['employmentStartDate']; } /** - * Sets birthDate + * Sets employmentStartDate * - * @param \DateTime|null $birthDate [readonly] + * @param \DateTime|null $employmentStartDate [readonly] * * @return $this */ - public function setBirthDate(?\DateTime $birthDate): static + public function setEmploymentStartDate(?\DateTime $employmentStartDate): static { - if (is_null($birthDate)) { - throw new InvalidArgumentException('non-nullable birthDate cannot be null'); + if (is_null($employmentStartDate)) { + throw new InvalidArgumentException('non-nullable employmentStartDate cannot be null'); } - $this->container['birthDate'] = $birthDate; + $this->container['employmentStartDate'] = $employmentStartDate; return $this; } @@ -419,89 +446,62 @@ public function setGender(?string $gender): static } /** - * Gets nationalInsuranceNumber - * - * @return string|null - */ - public function getNationalInsuranceNumber(): ?string - { - return $this->container['nationalInsuranceNumber']; - } - - /** - * Sets nationalInsuranceNumber - * - * @param string|null $nationalInsuranceNumber [readonly] - * - * @return $this - */ - public function setNationalInsuranceNumber(?string $nationalInsuranceNumber): static - { - if (is_null($nationalInsuranceNumber)) { - array_push($this->openAPINullablesSetToNull, 'nationalInsuranceNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nationalInsuranceNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['nationalInsuranceNumber'] = $nationalInsuranceNumber; - - return $this; - } - - /** - * Gets employmentStartDate + * Gets maritalStatus * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\MaritalStatus|null */ - public function getEmploymentStartDate(): ?\DateTime + public function getMaritalStatus(): ?\SynergiTech\Staffology\Model\MaritalStatus { - return $this->container['employmentStartDate']; + return $this->container['maritalStatus']; } /** - * Sets employmentStartDate + * Sets maritalStatus * - * @param \DateTime|null $employmentStartDate [readonly] + * @param \SynergiTech\Staffology\Model\MaritalStatus|null $maritalStatus maritalStatus * * @return $this */ - public function setEmploymentStartDate(?\DateTime $employmentStartDate): static + public function setMaritalStatus(?\SynergiTech\Staffology\Model\MaritalStatus $maritalStatus): static { - if (is_null($employmentStartDate)) { - throw new InvalidArgumentException('non-nullable employmentStartDate cannot be null'); + if (is_null($maritalStatus)) { + throw new InvalidArgumentException('non-nullable maritalStatus cannot be null'); } - $this->container['employmentStartDate'] = $employmentStartDate; + $this->container['maritalStatus'] = $maritalStatus; return $this; } /** - * Gets maritalStatus + * Gets nationalInsuranceNumber * - * @return \SynergiTech\Staffology\Model\MaritalStatus|null + * @return string|null */ - public function getMaritalStatus(): ?\SynergiTech\Staffology\Model\MaritalStatus + public function getNationalInsuranceNumber(): ?string { - return $this->container['maritalStatus']; + return $this->container['nationalInsuranceNumber']; } /** - * Sets maritalStatus + * Sets nationalInsuranceNumber * - * @param \SynergiTech\Staffology\Model\MaritalStatus|null $maritalStatus maritalStatus + * @param string|null $nationalInsuranceNumber [readonly] * * @return $this */ - public function setMaritalStatus(?\SynergiTech\Staffology\Model\MaritalStatus $maritalStatus): static + public function setNationalInsuranceNumber(?string $nationalInsuranceNumber): static { - if (is_null($maritalStatus)) { - throw new InvalidArgumentException('non-nullable maritalStatus cannot be null'); + if (is_null($nationalInsuranceNumber)) { + array_push($this->openAPINullablesSetToNull, 'nationalInsuranceNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('nationalInsuranceNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['maritalStatus'] = $maritalStatus; + $this->container['nationalInsuranceNumber'] = $nationalInsuranceNumber; return $this; } diff --git a/src/Model/PapdisEmployeeName.php b/src/Model/PapdisEmployeeName.php index 0bb9041..d3e6a66 100644 --- a/src/Model/PapdisEmployeeName.php +++ b/src/Model/PapdisEmployeeName.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class PapdisEmployeeName implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'title' => 'string', 'forename1' => 'string', 'forename2' => 'string', - 'surname' => 'string' + 'surname' => 'string', + 'title' => 'string' ]; /** @@ -71,10 +71,10 @@ class PapdisEmployeeName implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'title' => null, 'forename1' => null, 'forename2' => null, - 'surname' => null + 'surname' => null, + 'title' => null ]; /** @@ -83,10 +83,10 @@ class PapdisEmployeeName implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'title' => true, 'forename1' => true, 'forename2' => true, - 'surname' => true + 'surname' => true, + 'title' => true ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'title' => 'title', 'forename1' => 'forename1', 'forename2' => 'forename2', - 'surname' => 'surname' + 'surname' => 'surname', + 'title' => 'title' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'title' => 'setTitle', 'forename1' => 'setForename1', 'forename2' => 'setForename2', - 'surname' => 'setSurname' + 'surname' => 'setSurname', + 'title' => 'setTitle' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'title' => 'getTitle', 'forename1' => 'getForename1', 'forename2' => 'getForename2', - 'surname' => 'getSurname' + 'surname' => 'getSurname', + 'title' => 'getTitle' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('forename1', $data ?? [], null); $this->setIfExists('forename2', $data ?? [], null); $this->setIfExists('surname', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -309,40 +309,6 @@ public function valid(): bool } - /** - * Gets title - * - * @return string|null - */ - public function getTitle(): ?string - { - return $this->container['title']; - } - - /** - * Sets title - * - * @param string|null $title [readonly] - * - * @return $this - */ - public function setTitle(?string $title): static - { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['title'] = $title; - - return $this; - } - /** * Gets forename1 * @@ -444,6 +410,40 @@ public function setSurname(?string $surname): static return $this; } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle(): ?string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title [readonly] + * + * @return $this + */ + public function setTitle(?string $title): static + { + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['title'] = $title; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PapdisEmployeePay.php b/src/Model/PapdisEmployeePay.php index b9f5b91..500ddc8 100644 --- a/src/Model/PapdisEmployeePay.php +++ b/src/Model/PapdisEmployeePay.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class PapdisEmployeePay implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'pensionableEarningsAmount' => 'float', - 'totalGrossQualifyingEarningsAmount' => 'float', - 'annualSalary' => 'float', 'annualPensionableEarningsAmount' => 'float', + 'annualSalary' => 'float', 'basis' => '\SynergiTech\Staffology\Model\PayBasis', - 'payAmountMultiplier' => 'float' + 'payAmountMultiplier' => 'float', + 'pensionableEarningsAmount' => 'float', + 'totalGrossQualifyingEarningsAmount' => 'float' ]; /** @@ -73,12 +73,12 @@ class PapdisEmployeePay implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'pensionableEarningsAmount' => 'double', - 'totalGrossQualifyingEarningsAmount' => 'double', - 'annualSalary' => 'double', 'annualPensionableEarningsAmount' => 'double', + 'annualSalary' => 'double', 'basis' => null, - 'payAmountMultiplier' => 'double' + 'payAmountMultiplier' => 'double', + 'pensionableEarningsAmount' => 'double', + 'totalGrossQualifyingEarningsAmount' => 'double' ]; /** @@ -87,12 +87,12 @@ class PapdisEmployeePay implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'pensionableEarningsAmount' => false, - 'totalGrossQualifyingEarningsAmount' => false, - 'annualSalary' => false, 'annualPensionableEarningsAmount' => false, + 'annualSalary' => false, 'basis' => false, - 'payAmountMultiplier' => true + 'payAmountMultiplier' => true, + 'pensionableEarningsAmount' => false, + 'totalGrossQualifyingEarningsAmount' => false ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'pensionableEarningsAmount' => 'pensionableEarningsAmount', - 'totalGrossQualifyingEarningsAmount' => 'totalGrossQualifyingEarningsAmount', - 'annualSalary' => 'annualSalary', 'annualPensionableEarningsAmount' => 'annualPensionableEarningsAmount', + 'annualSalary' => 'annualSalary', 'basis' => 'basis', - 'payAmountMultiplier' => 'payAmountMultiplier' + 'payAmountMultiplier' => 'payAmountMultiplier', + 'pensionableEarningsAmount' => 'pensionableEarningsAmount', + 'totalGrossQualifyingEarningsAmount' => 'totalGrossQualifyingEarningsAmount' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'pensionableEarningsAmount' => 'setPensionableEarningsAmount', - 'totalGrossQualifyingEarningsAmount' => 'setTotalGrossQualifyingEarningsAmount', - 'annualSalary' => 'setAnnualSalary', 'annualPensionableEarningsAmount' => 'setAnnualPensionableEarningsAmount', + 'annualSalary' => 'setAnnualSalary', 'basis' => 'setBasis', - 'payAmountMultiplier' => 'setPayAmountMultiplier' + 'payAmountMultiplier' => 'setPayAmountMultiplier', + 'pensionableEarningsAmount' => 'setPensionableEarningsAmount', + 'totalGrossQualifyingEarningsAmount' => 'setTotalGrossQualifyingEarningsAmount' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'pensionableEarningsAmount' => 'getPensionableEarningsAmount', - 'totalGrossQualifyingEarningsAmount' => 'getTotalGrossQualifyingEarningsAmount', - 'annualSalary' => 'getAnnualSalary', 'annualPensionableEarningsAmount' => 'getAnnualPensionableEarningsAmount', + 'annualSalary' => 'getAnnualSalary', 'basis' => 'getBasis', - 'payAmountMultiplier' => 'getPayAmountMultiplier' + 'payAmountMultiplier' => 'getPayAmountMultiplier', + 'pensionableEarningsAmount' => 'getPensionableEarningsAmount', + 'totalGrossQualifyingEarningsAmount' => 'getTotalGrossQualifyingEarningsAmount' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('pensionableEarningsAmount', $data ?? [], null); - $this->setIfExists('totalGrossQualifyingEarningsAmount', $data ?? [], null); - $this->setIfExists('annualSalary', $data ?? [], null); $this->setIfExists('annualPensionableEarningsAmount', $data ?? [], null); + $this->setIfExists('annualSalary', $data ?? [], null); $this->setIfExists('basis', $data ?? [], null); $this->setIfExists('payAmountMultiplier', $data ?? [], null); + $this->setIfExists('pensionableEarningsAmount', $data ?? [], null); + $this->setIfExists('totalGrossQualifyingEarningsAmount', $data ?? [], null); } /** @@ -324,55 +324,28 @@ public function valid(): bool /** - * Gets pensionableEarningsAmount - * - * @return float|null - */ - public function getPensionableEarningsAmount(): ?float - { - return $this->container['pensionableEarningsAmount']; - } - - /** - * Sets pensionableEarningsAmount - * - * @param float|null $pensionableEarningsAmount [readonly] - * - * @return $this - */ - public function setPensionableEarningsAmount(?float $pensionableEarningsAmount): static - { - if (is_null($pensionableEarningsAmount)) { - throw new InvalidArgumentException('non-nullable pensionableEarningsAmount cannot be null'); - } - $this->container['pensionableEarningsAmount'] = $pensionableEarningsAmount; - - return $this; - } - - /** - * Gets totalGrossQualifyingEarningsAmount + * Gets annualPensionableEarningsAmount * * @return float|null */ - public function getTotalGrossQualifyingEarningsAmount(): ?float + public function getAnnualPensionableEarningsAmount(): ?float { - return $this->container['totalGrossQualifyingEarningsAmount']; + return $this->container['annualPensionableEarningsAmount']; } /** - * Sets totalGrossQualifyingEarningsAmount + * Sets annualPensionableEarningsAmount * - * @param float|null $totalGrossQualifyingEarningsAmount [readonly] + * @param float|null $annualPensionableEarningsAmount [readonly] * * @return $this */ - public function setTotalGrossQualifyingEarningsAmount(?float $totalGrossQualifyingEarningsAmount): static + public function setAnnualPensionableEarningsAmount(?float $annualPensionableEarningsAmount): static { - if (is_null($totalGrossQualifyingEarningsAmount)) { - throw new InvalidArgumentException('non-nullable totalGrossQualifyingEarningsAmount cannot be null'); + if (is_null($annualPensionableEarningsAmount)) { + throw new InvalidArgumentException('non-nullable annualPensionableEarningsAmount cannot be null'); } - $this->container['totalGrossQualifyingEarningsAmount'] = $totalGrossQualifyingEarningsAmount; + $this->container['annualPensionableEarningsAmount'] = $annualPensionableEarningsAmount; return $this; } @@ -404,33 +377,6 @@ public function setAnnualSalary(?float $annualSalary): static return $this; } - /** - * Gets annualPensionableEarningsAmount - * - * @return float|null - */ - public function getAnnualPensionableEarningsAmount(): ?float - { - return $this->container['annualPensionableEarningsAmount']; - } - - /** - * Sets annualPensionableEarningsAmount - * - * @param float|null $annualPensionableEarningsAmount [readonly] - * - * @return $this - */ - public function setAnnualPensionableEarningsAmount(?float $annualPensionableEarningsAmount): static - { - if (is_null($annualPensionableEarningsAmount)) { - throw new InvalidArgumentException('non-nullable annualPensionableEarningsAmount cannot be null'); - } - $this->container['annualPensionableEarningsAmount'] = $annualPensionableEarningsAmount; - - return $this; - } - /** * Gets basis * @@ -491,6 +437,60 @@ public function setPayAmountMultiplier(?float $payAmountMultiplier): static return $this; } + + /** + * Gets pensionableEarningsAmount + * + * @return float|null + */ + public function getPensionableEarningsAmount(): ?float + { + return $this->container['pensionableEarningsAmount']; + } + + /** + * Sets pensionableEarningsAmount + * + * @param float|null $pensionableEarningsAmount [readonly] + * + * @return $this + */ + public function setPensionableEarningsAmount(?float $pensionableEarningsAmount): static + { + if (is_null($pensionableEarningsAmount)) { + throw new InvalidArgumentException('non-nullable pensionableEarningsAmount cannot be null'); + } + $this->container['pensionableEarningsAmount'] = $pensionableEarningsAmount; + + return $this; + } + + /** + * Gets totalGrossQualifyingEarningsAmount + * + * @return float|null + */ + public function getTotalGrossQualifyingEarningsAmount(): ?float + { + return $this->container['totalGrossQualifyingEarningsAmount']; + } + + /** + * Sets totalGrossQualifyingEarningsAmount + * + * @param float|null $totalGrossQualifyingEarningsAmount [readonly] + * + * @return $this + */ + public function setTotalGrossQualifyingEarningsAmount(?float $totalGrossQualifyingEarningsAmount): static + { + if (is_null($totalGrossQualifyingEarningsAmount)) { + throw new InvalidArgumentException('non-nullable totalGrossQualifyingEarningsAmount cannot be null'); + } + $this->container['totalGrossQualifyingEarningsAmount'] = $totalGrossQualifyingEarningsAmount; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PapdisEmployer.php b/src/Model/PapdisEmployer.php index 9f93ad1..45afd60 100644 --- a/src/Model/PapdisEmployer.php +++ b/src/Model/PapdisEmployer.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,19 +59,19 @@ class PapdisEmployer implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'pensionRule' => '\SynergiTech\Staffology\Model\PensionRule', + 'contractedWeeks' => 'float', + 'cyclicalReenrolmentDate' => '\DateTime', 'employerId' => 'string', + 'fullTimeContractedHours' => 'float', + 'fullTimeContractedWeeks' => 'float', 'group' => 'string', - 'subGroup' => 'string', - 'payrollPeriod' => '\SynergiTech\Staffology\Model\PapdisPayrollPeriod', - 'stagingDate' => '\DateTime', - 'cyclicalReenrolmentDate' => '\DateTime', + 'id' => 'int', 'name' => 'string', + 'payrollPeriod' => '\SynergiTech\Staffology\Model\PapdisPayrollPeriod', + 'pensionRule' => '\SynergiTech\Staffology\Model\PensionRule', 'postalAddress' => '\SynergiTech\Staffology\Model\PapdisEmployerContactPostalAddress', - 'fullTimeContractedHours' => 'float', - 'fullTimeContractedWeeks' => 'float', - 'contractedWeeks' => 'float', - 'id' => 'int' + 'stagingDate' => '\DateTime', + 'subGroup' => 'string' ]; /** @@ -80,19 +80,19 @@ class PapdisEmployer implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'pensionRule' => null, + 'contractedWeeks' => 'double', + 'cyclicalReenrolmentDate' => 'date', 'employerId' => null, + 'fullTimeContractedHours' => 'double', + 'fullTimeContractedWeeks' => 'double', 'group' => null, - 'subGroup' => null, - 'payrollPeriod' => null, - 'stagingDate' => 'date', - 'cyclicalReenrolmentDate' => 'date', + 'id' => 'int32', 'name' => null, + 'payrollPeriod' => null, + 'pensionRule' => null, 'postalAddress' => null, - 'fullTimeContractedHours' => 'double', - 'fullTimeContractedWeeks' => 'double', - 'contractedWeeks' => 'double', - 'id' => 'int32' + 'stagingDate' => 'date', + 'subGroup' => null ]; /** @@ -101,19 +101,19 @@ class PapdisEmployer implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'pensionRule' => false, + 'contractedWeeks' => true, + 'cyclicalReenrolmentDate' => true, 'employerId' => true, + 'fullTimeContractedHours' => true, + 'fullTimeContractedWeeks' => true, 'group' => true, - 'subGroup' => true, - 'payrollPeriod' => false, - 'stagingDate' => false, - 'cyclicalReenrolmentDate' => true, + 'id' => false, 'name' => true, + 'payrollPeriod' => false, + 'pensionRule' => false, 'postalAddress' => false, - 'fullTimeContractedHours' => true, - 'fullTimeContractedWeeks' => true, - 'contractedWeeks' => true, - 'id' => false + 'stagingDate' => false, + 'subGroup' => true ]; /** @@ -202,19 +202,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'pensionRule' => 'pensionRule', + 'contractedWeeks' => 'contractedWeeks', + 'cyclicalReenrolmentDate' => 'cyclicalReenrolmentDate', 'employerId' => 'employerId', + 'fullTimeContractedHours' => 'fullTimeContractedHours', + 'fullTimeContractedWeeks' => 'fullTimeContractedWeeks', 'group' => 'group', - 'subGroup' => 'subGroup', - 'payrollPeriod' => 'payrollPeriod', - 'stagingDate' => 'stagingDate', - 'cyclicalReenrolmentDate' => 'cyclicalReenrolmentDate', + 'id' => 'id', 'name' => 'name', + 'payrollPeriod' => 'payrollPeriod', + 'pensionRule' => 'pensionRule', 'postalAddress' => 'postalAddress', - 'fullTimeContractedHours' => 'fullTimeContractedHours', - 'fullTimeContractedWeeks' => 'fullTimeContractedWeeks', - 'contractedWeeks' => 'contractedWeeks', - 'id' => 'id' + 'stagingDate' => 'stagingDate', + 'subGroup' => 'subGroup' ]; /** @@ -223,19 +223,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'pensionRule' => 'setPensionRule', + 'contractedWeeks' => 'setContractedWeeks', + 'cyclicalReenrolmentDate' => 'setCyclicalReenrolmentDate', 'employerId' => 'setEmployerId', + 'fullTimeContractedHours' => 'setFullTimeContractedHours', + 'fullTimeContractedWeeks' => 'setFullTimeContractedWeeks', 'group' => 'setGroup', - 'subGroup' => 'setSubGroup', - 'payrollPeriod' => 'setPayrollPeriod', - 'stagingDate' => 'setStagingDate', - 'cyclicalReenrolmentDate' => 'setCyclicalReenrolmentDate', + 'id' => 'setId', 'name' => 'setName', + 'payrollPeriod' => 'setPayrollPeriod', + 'pensionRule' => 'setPensionRule', 'postalAddress' => 'setPostalAddress', - 'fullTimeContractedHours' => 'setFullTimeContractedHours', - 'fullTimeContractedWeeks' => 'setFullTimeContractedWeeks', - 'contractedWeeks' => 'setContractedWeeks', - 'id' => 'setId' + 'stagingDate' => 'setStagingDate', + 'subGroup' => 'setSubGroup' ]; /** @@ -244,19 +244,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'pensionRule' => 'getPensionRule', + 'contractedWeeks' => 'getContractedWeeks', + 'cyclicalReenrolmentDate' => 'getCyclicalReenrolmentDate', 'employerId' => 'getEmployerId', + 'fullTimeContractedHours' => 'getFullTimeContractedHours', + 'fullTimeContractedWeeks' => 'getFullTimeContractedWeeks', 'group' => 'getGroup', - 'subGroup' => 'getSubGroup', - 'payrollPeriod' => 'getPayrollPeriod', - 'stagingDate' => 'getStagingDate', - 'cyclicalReenrolmentDate' => 'getCyclicalReenrolmentDate', + 'id' => 'getId', 'name' => 'getName', + 'payrollPeriod' => 'getPayrollPeriod', + 'pensionRule' => 'getPensionRule', 'postalAddress' => 'getPostalAddress', - 'fullTimeContractedHours' => 'getFullTimeContractedHours', - 'fullTimeContractedWeeks' => 'getFullTimeContractedWeeks', - 'contractedWeeks' => 'getContractedWeeks', - 'id' => 'getId' + 'stagingDate' => 'getStagingDate', + 'subGroup' => 'getSubGroup' ]; /** @@ -315,19 +315,19 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('pensionRule', $data ?? [], null); - $this->setIfExists('employerId', $data ?? [], null); - $this->setIfExists('group', $data ?? [], null); - $this->setIfExists('subGroup', $data ?? [], null); - $this->setIfExists('payrollPeriod', $data ?? [], null); - $this->setIfExists('stagingDate', $data ?? [], null); + $this->setIfExists('contractedWeeks', $data ?? [], null); $this->setIfExists('cyclicalReenrolmentDate', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('postalAddress', $data ?? [], null); + $this->setIfExists('employerId', $data ?? [], null); $this->setIfExists('fullTimeContractedHours', $data ?? [], null); $this->setIfExists('fullTimeContractedWeeks', $data ?? [], null); - $this->setIfExists('contractedWeeks', $data ?? [], null); + $this->setIfExists('group', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('payrollPeriod', $data ?? [], null); + $this->setIfExists('pensionRule', $data ?? [], null); + $this->setIfExists('postalAddress', $data ?? [], null); + $this->setIfExists('stagingDate', $data ?? [], null); + $this->setIfExists('subGroup', $data ?? [], null); } /** @@ -373,218 +373,232 @@ public function valid(): bool /** - * Gets pensionRule + * Gets contractedWeeks * - * @return \SynergiTech\Staffology\Model\PensionRule|null + * @return float|null */ - public function getPensionRule(): ?\SynergiTech\Staffology\Model\PensionRule + public function getContractedWeeks(): ?float { - return $this->container['pensionRule']; + return $this->container['contractedWeeks']; } /** - * Sets pensionRule + * Sets contractedWeeks * - * @param \SynergiTech\Staffology\Model\PensionRule|null $pensionRule pensionRule + * @param float|null $contractedWeeks [readonly] * * @return $this */ - public function setPensionRule(?\SynergiTech\Staffology\Model\PensionRule $pensionRule): static + public function setContractedWeeks(?float $contractedWeeks): static { - if (is_null($pensionRule)) { - throw new InvalidArgumentException('non-nullable pensionRule cannot be null'); + if (is_null($contractedWeeks)) { + array_push($this->openAPINullablesSetToNull, 'contractedWeeks'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('contractedWeeks', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['pensionRule'] = $pensionRule; + $this->container['contractedWeeks'] = $contractedWeeks; return $this; } /** - * Gets employerId + * Gets cyclicalReenrolmentDate * - * @return string|null + * @return \DateTime|null */ - public function getEmployerId(): ?string + public function getCyclicalReenrolmentDate(): ?\DateTime { - return $this->container['employerId']; + return $this->container['cyclicalReenrolmentDate']; } /** - * Sets employerId + * Sets cyclicalReenrolmentDate * - * @param string|null $employerId [readonly] Taken from the papdisEmployerId property of the PensionProvider + * @param \DateTime|null $cyclicalReenrolmentDate [readonly] * * @return $this */ - public function setEmployerId(?string $employerId): static + public function setCyclicalReenrolmentDate(?\DateTime $cyclicalReenrolmentDate): static { - if (is_null($employerId)) { - array_push($this->openAPINullablesSetToNull, 'employerId'); + if (is_null($cyclicalReenrolmentDate)) { + array_push($this->openAPINullablesSetToNull, 'cyclicalReenrolmentDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerId', $nullablesSetToNull); + $index = array_search('cyclicalReenrolmentDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employerId'] = $employerId; + $this->container['cyclicalReenrolmentDate'] = $cyclicalReenrolmentDate; return $this; } /** - * Gets group + * Gets employerId * * @return string|null */ - public function getGroup(): ?string + public function getEmployerId(): ?string { - return $this->container['group']; + return $this->container['employerId']; } /** - * Sets group + * Sets employerId * - * @param string|null $group [readonly] Taken from the papdisGroup property of the WorkerGroup + * @param string|null $employerId [readonly] Taken from the papdisEmployerId property of the PensionProvider * * @return $this */ - public function setGroup(?string $group): static + public function setEmployerId(?string $employerId): static { - if (is_null($group)) { - array_push($this->openAPINullablesSetToNull, 'group'); + if (is_null($employerId)) { + array_push($this->openAPINullablesSetToNull, 'employerId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('group', $nullablesSetToNull); + $index = array_search('employerId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['group'] = $group; + $this->container['employerId'] = $employerId; return $this; } /** - * Gets subGroup + * Gets fullTimeContractedHours * - * @return string|null + * @return float|null */ - public function getSubGroup(): ?string + public function getFullTimeContractedHours(): ?float { - return $this->container['subGroup']; + return $this->container['fullTimeContractedHours']; } /** - * Sets subGroup + * Sets fullTimeContractedHours * - * @param string|null $subGroup [readonly] Taken from the papdisSubGroup property of the WorkerGroup + * @param float|null $fullTimeContractedHours [readonly] * * @return $this */ - public function setSubGroup(?string $subGroup): static + public function setFullTimeContractedHours(?float $fullTimeContractedHours): static { - if (is_null($subGroup)) { - array_push($this->openAPINullablesSetToNull, 'subGroup'); + if (is_null($fullTimeContractedHours)) { + array_push($this->openAPINullablesSetToNull, 'fullTimeContractedHours'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('subGroup', $nullablesSetToNull); + $index = array_search('fullTimeContractedHours', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['subGroup'] = $subGroup; + $this->container['fullTimeContractedHours'] = $fullTimeContractedHours; return $this; } /** - * Gets payrollPeriod + * Gets fullTimeContractedWeeks * - * @return \SynergiTech\Staffology\Model\PapdisPayrollPeriod|null + * @return float|null */ - public function getPayrollPeriod(): ?\SynergiTech\Staffology\Model\PapdisPayrollPeriod + public function getFullTimeContractedWeeks(): ?float { - return $this->container['payrollPeriod']; + return $this->container['fullTimeContractedWeeks']; } /** - * Sets payrollPeriod + * Sets fullTimeContractedWeeks * - * @param \SynergiTech\Staffology\Model\PapdisPayrollPeriod|null $payrollPeriod payrollPeriod + * @param float|null $fullTimeContractedWeeks [readonly] * * @return $this */ - public function setPayrollPeriod(?\SynergiTech\Staffology\Model\PapdisPayrollPeriod $payrollPeriod): static + public function setFullTimeContractedWeeks(?float $fullTimeContractedWeeks): static { - if (is_null($payrollPeriod)) { - throw new InvalidArgumentException('non-nullable payrollPeriod cannot be null'); + if (is_null($fullTimeContractedWeeks)) { + array_push($this->openAPINullablesSetToNull, 'fullTimeContractedWeeks'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fullTimeContractedWeeks', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payrollPeriod'] = $payrollPeriod; + $this->container['fullTimeContractedWeeks'] = $fullTimeContractedWeeks; return $this; } /** - * Gets stagingDate + * Gets group * - * @return \DateTime|null + * @return string|null */ - public function getStagingDate(): ?\DateTime + public function getGroup(): ?string { - return $this->container['stagingDate']; + return $this->container['group']; } /** - * Sets stagingDate + * Sets group * - * @param \DateTime|null $stagingDate [readonly] + * @param string|null $group [readonly] Taken from the papdisGroup property of the WorkerGroup * * @return $this */ - public function setStagingDate(?\DateTime $stagingDate): static + public function setGroup(?string $group): static { - if (is_null($stagingDate)) { - throw new InvalidArgumentException('non-nullable stagingDate cannot be null'); + if (is_null($group)) { + array_push($this->openAPINullablesSetToNull, 'group'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('group', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['stagingDate'] = $stagingDate; + $this->container['group'] = $group; return $this; } /** - * Gets cyclicalReenrolmentDate + * Gets id * - * @return \DateTime|null + * @return int|null */ - public function getCyclicalReenrolmentDate(): ?\DateTime + public function getId(): ?int { - return $this->container['cyclicalReenrolmentDate']; + return $this->container['id']; } /** - * Sets cyclicalReenrolmentDate + * Sets id * - * @param \DateTime|null $cyclicalReenrolmentDate [readonly] + * @param int|null $id [readonly] * * @return $this */ - public function setCyclicalReenrolmentDate(?\DateTime $cyclicalReenrolmentDate): static + public function setId(?int $id): static { - if (is_null($cyclicalReenrolmentDate)) { - array_push($this->openAPINullablesSetToNull, 'cyclicalReenrolmentDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cyclicalReenrolmentDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['cyclicalReenrolmentDate'] = $cyclicalReenrolmentDate; + $this->container['id'] = $id; return $this; } @@ -624,157 +638,143 @@ public function setName(?string $name): static } /** - * Gets postalAddress + * Gets payrollPeriod * - * @return \SynergiTech\Staffology\Model\PapdisEmployerContactPostalAddress|null + * @return \SynergiTech\Staffology\Model\PapdisPayrollPeriod|null */ - public function getPostalAddress(): ?\SynergiTech\Staffology\Model\PapdisEmployerContactPostalAddress + public function getPayrollPeriod(): ?\SynergiTech\Staffology\Model\PapdisPayrollPeriod { - return $this->container['postalAddress']; + return $this->container['payrollPeriod']; } /** - * Sets postalAddress + * Sets payrollPeriod * - * @param \SynergiTech\Staffology\Model\PapdisEmployerContactPostalAddress|null $postalAddress postalAddress + * @param \SynergiTech\Staffology\Model\PapdisPayrollPeriod|null $payrollPeriod payrollPeriod * * @return $this */ - public function setPostalAddress(?\SynergiTech\Staffology\Model\PapdisEmployerContactPostalAddress $postalAddress): static + public function setPayrollPeriod(?\SynergiTech\Staffology\Model\PapdisPayrollPeriod $payrollPeriod): static { - if (is_null($postalAddress)) { - throw new InvalidArgumentException('non-nullable postalAddress cannot be null'); + if (is_null($payrollPeriod)) { + throw new InvalidArgumentException('non-nullable payrollPeriod cannot be null'); } - $this->container['postalAddress'] = $postalAddress; + $this->container['payrollPeriod'] = $payrollPeriod; return $this; } /** - * Gets fullTimeContractedHours + * Gets pensionRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\PensionRule|null */ - public function getFullTimeContractedHours(): ?float + public function getPensionRule(): ?\SynergiTech\Staffology\Model\PensionRule { - return $this->container['fullTimeContractedHours']; + return $this->container['pensionRule']; } /** - * Sets fullTimeContractedHours + * Sets pensionRule * - * @param float|null $fullTimeContractedHours [readonly] + * @param \SynergiTech\Staffology\Model\PensionRule|null $pensionRule pensionRule * * @return $this */ - public function setFullTimeContractedHours(?float $fullTimeContractedHours): static + public function setPensionRule(?\SynergiTech\Staffology\Model\PensionRule $pensionRule): static { - if (is_null($fullTimeContractedHours)) { - array_push($this->openAPINullablesSetToNull, 'fullTimeContractedHours'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fullTimeContractedHours', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($pensionRule)) { + throw new InvalidArgumentException('non-nullable pensionRule cannot be null'); } - $this->container['fullTimeContractedHours'] = $fullTimeContractedHours; + $this->container['pensionRule'] = $pensionRule; return $this; } /** - * Gets fullTimeContractedWeeks + * Gets postalAddress * - * @return float|null + * @return \SynergiTech\Staffology\Model\PapdisEmployerContactPostalAddress|null */ - public function getFullTimeContractedWeeks(): ?float + public function getPostalAddress(): ?\SynergiTech\Staffology\Model\PapdisEmployerContactPostalAddress { - return $this->container['fullTimeContractedWeeks']; + return $this->container['postalAddress']; } /** - * Sets fullTimeContractedWeeks + * Sets postalAddress * - * @param float|null $fullTimeContractedWeeks [readonly] + * @param \SynergiTech\Staffology\Model\PapdisEmployerContactPostalAddress|null $postalAddress postalAddress * * @return $this */ - public function setFullTimeContractedWeeks(?float $fullTimeContractedWeeks): static + public function setPostalAddress(?\SynergiTech\Staffology\Model\PapdisEmployerContactPostalAddress $postalAddress): static { - if (is_null($fullTimeContractedWeeks)) { - array_push($this->openAPINullablesSetToNull, 'fullTimeContractedWeeks'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fullTimeContractedWeeks', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($postalAddress)) { + throw new InvalidArgumentException('non-nullable postalAddress cannot be null'); } - $this->container['fullTimeContractedWeeks'] = $fullTimeContractedWeeks; + $this->container['postalAddress'] = $postalAddress; return $this; } /** - * Gets contractedWeeks + * Gets stagingDate * - * @return float|null + * @return \DateTime|null */ - public function getContractedWeeks(): ?float + public function getStagingDate(): ?\DateTime { - return $this->container['contractedWeeks']; + return $this->container['stagingDate']; } /** - * Sets contractedWeeks + * Sets stagingDate * - * @param float|null $contractedWeeks [readonly] + * @param \DateTime|null $stagingDate [readonly] * * @return $this */ - public function setContractedWeeks(?float $contractedWeeks): static + public function setStagingDate(?\DateTime $stagingDate): static { - if (is_null($contractedWeeks)) { - array_push($this->openAPINullablesSetToNull, 'contractedWeeks'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('contractedWeeks', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($stagingDate)) { + throw new InvalidArgumentException('non-nullable stagingDate cannot be null'); } - $this->container['contractedWeeks'] = $contractedWeeks; + $this->container['stagingDate'] = $stagingDate; return $this; } /** - * Gets id + * Gets subGroup * - * @return int|null + * @return string|null */ - public function getId(): ?int + public function getSubGroup(): ?string { - return $this->container['id']; + return $this->container['subGroup']; } /** - * Sets id + * Sets subGroup * - * @param int|null $id [readonly] + * @param string|null $subGroup [readonly] Taken from the papdisSubGroup property of the WorkerGroup * * @return $this */ - public function setId(?int $id): static + public function setSubGroup(?string $subGroup): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($subGroup)) { + array_push($this->openAPINullablesSetToNull, 'subGroup'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('subGroup', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['subGroup'] = $subGroup; return $this; } diff --git a/src/Model/PapdisEmployerContactPostalAddress.php b/src/Model/PapdisEmployerContactPostalAddress.php index 9218db7..175bbe6 100644 --- a/src/Model/PapdisEmployerContactPostalAddress.php +++ b/src/Model/PapdisEmployerContactPostalAddress.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -63,8 +63,8 @@ class PapdisEmployerContactPostalAddress implements ModelInterface, ArrayAccess, 'address2' => 'string', 'address3' => 'string', 'address4' => 'string', - 'postcode' => 'string', - 'country' => 'string' + 'country' => 'string', + 'postcode' => 'string' ]; /** @@ -77,8 +77,8 @@ class PapdisEmployerContactPostalAddress implements ModelInterface, ArrayAccess, 'address2' => null, 'address3' => null, 'address4' => null, - 'postcode' => null, - 'country' => null + 'country' => null, + 'postcode' => null ]; /** @@ -91,8 +91,8 @@ class PapdisEmployerContactPostalAddress implements ModelInterface, ArrayAccess, 'address2' => true, 'address3' => true, 'address4' => true, - 'postcode' => true, - 'country' => true + 'country' => true, + 'postcode' => true ]; /** @@ -185,8 +185,8 @@ public function isNullableSetToNull(string $property): bool 'address2' => 'address2', 'address3' => 'address3', 'address4' => 'address4', - 'postcode' => 'postcode', - 'country' => 'country' + 'country' => 'country', + 'postcode' => 'postcode' ]; /** @@ -199,8 +199,8 @@ public function isNullableSetToNull(string $property): bool 'address2' => 'setAddress2', 'address3' => 'setAddress3', 'address4' => 'setAddress4', - 'postcode' => 'setPostcode', - 'country' => 'setCountry' + 'country' => 'setCountry', + 'postcode' => 'setPostcode' ]; /** @@ -213,8 +213,8 @@ public function isNullableSetToNull(string $property): bool 'address2' => 'getAddress2', 'address3' => 'getAddress3', 'address4' => 'getAddress4', - 'postcode' => 'getPostcode', - 'country' => 'getCountry' + 'country' => 'getCountry', + 'postcode' => 'getPostcode' ]; /** @@ -277,8 +277,8 @@ public function __construct(?array $data = null) $this->setIfExists('address2', $data ?? [], null); $this->setIfExists('address3', $data ?? [], null); $this->setIfExists('address4', $data ?? [], null); - $this->setIfExists('postcode', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('postcode', $data ?? [], null); } /** @@ -460,69 +460,69 @@ public function setAddress4(?string $address4): static } /** - * Gets postcode + * Gets country * * @return string|null */ - public function getPostcode(): ?string + public function getCountry(): ?string { - return $this->container['postcode']; + return $this->container['country']; } /** - * Sets postcode + * Sets country * - * @param string|null $postcode [readonly] + * @param string|null $country [readonly] * * @return $this */ - public function setPostcode(?string $postcode): static + public function setCountry(?string $country): static { - if (is_null($postcode)) { - array_push($this->openAPINullablesSetToNull, 'postcode'); + if (is_null($country)) { + array_push($this->openAPINullablesSetToNull, 'country'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('postcode', $nullablesSetToNull); + $index = array_search('country', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['postcode'] = $postcode; + $this->container['country'] = $country; return $this; } /** - * Gets country + * Gets postcode * * @return string|null */ - public function getCountry(): ?string + public function getPostcode(): ?string { - return $this->container['country']; + return $this->container['postcode']; } /** - * Sets country + * Sets postcode * - * @param string|null $country [readonly] + * @param string|null $postcode [readonly] * * @return $this */ - public function setCountry(?string $country): static + public function setPostcode(?string $postcode): static { - if (is_null($country)) { - array_push($this->openAPINullablesSetToNull, 'country'); + if (is_null($postcode)) { + array_push($this->openAPINullablesSetToNull, 'postcode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('country', $nullablesSetToNull); + $index = array_search('postcode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['country'] = $country; + $this->container['postcode'] = $postcode; return $this; } diff --git a/src/Model/PapdisMessageFunctionCode.php b/src/Model/PapdisMessageFunctionCode.php index 89101cd..9dd30b2 100644 --- a/src/Model/PapdisMessageFunctionCode.php +++ b/src/Model/PapdisMessageFunctionCode.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PapdisPayrollPeriod.php b/src/Model/PapdisPayrollPeriod.php index cb2bdac..6053095 100644 --- a/src/Model/PapdisPayrollPeriod.php +++ b/src/Model/PapdisPayrollPeriod.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class PapdisPayrollPeriod implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ - 'payPeriodStartDate' => '\DateTime', - 'payPeriodEndDate' => '\DateTime', 'contributionDeductionDate' => '\DateTime', + 'employees' => '\SynergiTech\Staffology\Model\PapdisEmployee[]', 'frequencyCode' => 'string', - 'taxPeriod' => 'int', - 'payReferenceStartDate' => '\DateTime', + 'payPeriodEndDate' => '\DateTime', + 'payPeriodStartDate' => '\DateTime', 'payReferenceEndDate' => '\DateTime', - 'employees' => '\SynergiTech\Staffology\Model\PapdisEmployee[]' + 'payReferenceStartDate' => '\DateTime', + 'taxPeriod' => 'int' ]; /** @@ -75,14 +75,14 @@ class PapdisPayrollPeriod implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPIFormats = [ - 'payPeriodStartDate' => 'date', - 'payPeriodEndDate' => 'date', 'contributionDeductionDate' => 'date', + 'employees' => null, 'frequencyCode' => null, - 'taxPeriod' => 'int32', - 'payReferenceStartDate' => 'date', + 'payPeriodEndDate' => 'date', + 'payPeriodStartDate' => 'date', 'payReferenceEndDate' => 'date', - 'employees' => null + 'payReferenceStartDate' => 'date', + 'taxPeriod' => 'int32' ]; /** @@ -91,14 +91,14 @@ class PapdisPayrollPeriod implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPINullables = [ - 'payPeriodStartDate' => false, - 'payPeriodEndDate' => false, 'contributionDeductionDate' => false, + 'employees' => true, 'frequencyCode' => true, - 'taxPeriod' => false, - 'payReferenceStartDate' => false, + 'payPeriodEndDate' => false, + 'payPeriodStartDate' => false, 'payReferenceEndDate' => false, - 'employees' => true + 'payReferenceStartDate' => false, + 'taxPeriod' => false ]; /** @@ -187,14 +187,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payPeriodStartDate' => 'payPeriodStartDate', - 'payPeriodEndDate' => 'payPeriodEndDate', 'contributionDeductionDate' => 'contributionDeductionDate', + 'employees' => 'employees', 'frequencyCode' => 'frequencyCode', - 'taxPeriod' => 'taxPeriod', - 'payReferenceStartDate' => 'payReferenceStartDate', + 'payPeriodEndDate' => 'payPeriodEndDate', + 'payPeriodStartDate' => 'payPeriodStartDate', 'payReferenceEndDate' => 'payReferenceEndDate', - 'employees' => 'employees' + 'payReferenceStartDate' => 'payReferenceStartDate', + 'taxPeriod' => 'taxPeriod' ]; /** @@ -203,14 +203,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payPeriodStartDate' => 'setPayPeriodStartDate', - 'payPeriodEndDate' => 'setPayPeriodEndDate', 'contributionDeductionDate' => 'setContributionDeductionDate', + 'employees' => 'setEmployees', 'frequencyCode' => 'setFrequencyCode', - 'taxPeriod' => 'setTaxPeriod', - 'payReferenceStartDate' => 'setPayReferenceStartDate', + 'payPeriodEndDate' => 'setPayPeriodEndDate', + 'payPeriodStartDate' => 'setPayPeriodStartDate', 'payReferenceEndDate' => 'setPayReferenceEndDate', - 'employees' => 'setEmployees' + 'payReferenceStartDate' => 'setPayReferenceStartDate', + 'taxPeriod' => 'setTaxPeriod' ]; /** @@ -219,14 +219,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payPeriodStartDate' => 'getPayPeriodStartDate', - 'payPeriodEndDate' => 'getPayPeriodEndDate', 'contributionDeductionDate' => 'getContributionDeductionDate', + 'employees' => 'getEmployees', 'frequencyCode' => 'getFrequencyCode', - 'taxPeriod' => 'getTaxPeriod', - 'payReferenceStartDate' => 'getPayReferenceStartDate', + 'payPeriodEndDate' => 'getPayPeriodEndDate', + 'payPeriodStartDate' => 'getPayPeriodStartDate', 'payReferenceEndDate' => 'getPayReferenceEndDate', - 'employees' => 'getEmployees' + 'payReferenceStartDate' => 'getPayReferenceStartDate', + 'taxPeriod' => 'getTaxPeriod' ]; /** @@ -285,14 +285,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payPeriodStartDate', $data ?? [], null); - $this->setIfExists('payPeriodEndDate', $data ?? [], null); $this->setIfExists('contributionDeductionDate', $data ?? [], null); + $this->setIfExists('employees', $data ?? [], null); $this->setIfExists('frequencyCode', $data ?? [], null); - $this->setIfExists('taxPeriod', $data ?? [], null); - $this->setIfExists('payReferenceStartDate', $data ?? [], null); + $this->setIfExists('payPeriodEndDate', $data ?? [], null); + $this->setIfExists('payPeriodStartDate', $data ?? [], null); $this->setIfExists('payReferenceEndDate', $data ?? [], null); - $this->setIfExists('employees', $data ?? [], null); + $this->setIfExists('payReferenceStartDate', $data ?? [], null); + $this->setIfExists('taxPeriod', $data ?? [], null); } /** @@ -338,82 +338,62 @@ public function valid(): bool /** - * Gets payPeriodStartDate - * - * @return \DateTime|null - */ - public function getPayPeriodStartDate(): ?\DateTime - { - return $this->container['payPeriodStartDate']; - } - - /** - * Sets payPeriodStartDate - * - * @param \DateTime|null $payPeriodStartDate [readonly] - * - * @return $this - */ - public function setPayPeriodStartDate(?\DateTime $payPeriodStartDate): static - { - if (is_null($payPeriodStartDate)) { - throw new InvalidArgumentException('non-nullable payPeriodStartDate cannot be null'); - } - $this->container['payPeriodStartDate'] = $payPeriodStartDate; - - return $this; - } - - /** - * Gets payPeriodEndDate + * Gets contributionDeductionDate * * @return \DateTime|null */ - public function getPayPeriodEndDate(): ?\DateTime + public function getContributionDeductionDate(): ?\DateTime { - return $this->container['payPeriodEndDate']; + return $this->container['contributionDeductionDate']; } /** - * Sets payPeriodEndDate + * Sets contributionDeductionDate * - * @param \DateTime|null $payPeriodEndDate [readonly] + * @param \DateTime|null $contributionDeductionDate [readonly] * * @return $this */ - public function setPayPeriodEndDate(?\DateTime $payPeriodEndDate): static + public function setContributionDeductionDate(?\DateTime $contributionDeductionDate): static { - if (is_null($payPeriodEndDate)) { - throw new InvalidArgumentException('non-nullable payPeriodEndDate cannot be null'); + if (is_null($contributionDeductionDate)) { + throw new InvalidArgumentException('non-nullable contributionDeductionDate cannot be null'); } - $this->container['payPeriodEndDate'] = $payPeriodEndDate; + $this->container['contributionDeductionDate'] = $contributionDeductionDate; return $this; } /** - * Gets contributionDeductionDate + * Gets employees * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\PapdisEmployee[]|null */ - public function getContributionDeductionDate(): ?\DateTime + public function getEmployees(): ?array { - return $this->container['contributionDeductionDate']; + return $this->container['employees']; } /** - * Sets contributionDeductionDate + * Sets employees * - * @param \DateTime|null $contributionDeductionDate [readonly] + * @param \SynergiTech\Staffology\Model\PapdisEmployee[]|null $employees [readonly] Employees and contributions made in this period * * @return $this */ - public function setContributionDeductionDate(?\DateTime $contributionDeductionDate): static + public function setEmployees(?array $employees): static { - if (is_null($contributionDeductionDate)) { - throw new InvalidArgumentException('non-nullable contributionDeductionDate cannot be null'); + if (is_null($employees)) { + array_push($this->openAPINullablesSetToNull, 'employees'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employees', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['contributionDeductionDate'] = $contributionDeductionDate; + $this->container['employees'] = $employees; return $this; } @@ -453,55 +433,55 @@ public function setFrequencyCode(?string $frequencyCode): static } /** - * Gets taxPeriod + * Gets payPeriodEndDate * - * @return int|null + * @return \DateTime|null */ - public function getTaxPeriod(): ?int + public function getPayPeriodEndDate(): ?\DateTime { - return $this->container['taxPeriod']; + return $this->container['payPeriodEndDate']; } /** - * Sets taxPeriod + * Sets payPeriodEndDate * - * @param int|null $taxPeriod [readonly] + * @param \DateTime|null $payPeriodEndDate [readonly] * * @return $this */ - public function setTaxPeriod(?int $taxPeriod): static + public function setPayPeriodEndDate(?\DateTime $payPeriodEndDate): static { - if (is_null($taxPeriod)) { - throw new InvalidArgumentException('non-nullable taxPeriod cannot be null'); + if (is_null($payPeriodEndDate)) { + throw new InvalidArgumentException('non-nullable payPeriodEndDate cannot be null'); } - $this->container['taxPeriod'] = $taxPeriod; + $this->container['payPeriodEndDate'] = $payPeriodEndDate; return $this; } /** - * Gets payReferenceStartDate + * Gets payPeriodStartDate * * @return \DateTime|null */ - public function getPayReferenceStartDate(): ?\DateTime + public function getPayPeriodStartDate(): ?\DateTime { - return $this->container['payReferenceStartDate']; + return $this->container['payPeriodStartDate']; } /** - * Sets payReferenceStartDate + * Sets payPeriodStartDate * - * @param \DateTime|null $payReferenceStartDate [readonly] + * @param \DateTime|null $payPeriodStartDate [readonly] * * @return $this */ - public function setPayReferenceStartDate(?\DateTime $payReferenceStartDate): static + public function setPayPeriodStartDate(?\DateTime $payPeriodStartDate): static { - if (is_null($payReferenceStartDate)) { - throw new InvalidArgumentException('non-nullable payReferenceStartDate cannot be null'); + if (is_null($payPeriodStartDate)) { + throw new InvalidArgumentException('non-nullable payPeriodStartDate cannot be null'); } - $this->container['payReferenceStartDate'] = $payReferenceStartDate; + $this->container['payPeriodStartDate'] = $payPeriodStartDate; return $this; } @@ -534,35 +514,55 @@ public function setPayReferenceEndDate(?\DateTime $payReferenceEndDate): static } /** - * Gets employees + * Gets payReferenceStartDate * - * @return \SynergiTech\Staffology\Model\PapdisEmployee[]|null + * @return \DateTime|null */ - public function getEmployees(): ?array + public function getPayReferenceStartDate(): ?\DateTime { - return $this->container['employees']; + return $this->container['payReferenceStartDate']; } /** - * Sets employees + * Sets payReferenceStartDate * - * @param \SynergiTech\Staffology\Model\PapdisEmployee[]|null $employees [readonly] Employees and contributions made in this period + * @param \DateTime|null $payReferenceStartDate [readonly] * * @return $this */ - public function setEmployees(?array $employees): static + public function setPayReferenceStartDate(?\DateTime $payReferenceStartDate): static { - if (is_null($employees)) { - array_push($this->openAPINullablesSetToNull, 'employees'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employees', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payReferenceStartDate)) { + throw new InvalidArgumentException('non-nullable payReferenceStartDate cannot be null'); } - $this->container['employees'] = $employees; + $this->container['payReferenceStartDate'] = $payReferenceStartDate; + + return $this; + } + + /** + * Gets taxPeriod + * + * @return int|null + */ + public function getTaxPeriod(): ?int + { + return $this->container['taxPeriod']; + } + + /** + * Sets taxPeriod + * + * @param int|null $taxPeriod [readonly] + * + * @return $this + */ + public function setTaxPeriod(?int $taxPeriod): static + { + if (is_null($taxPeriod)) { + throw new InvalidArgumentException('non-nullable taxPeriod cannot be null'); + } + $this->container['taxPeriod'] = $taxPeriod; return $this; } diff --git a/src/Model/PapdisPensionProvider.php b/src/Model/PapdisPensionProvider.php index b312765..0274f42 100644 --- a/src/Model/PapdisPensionProvider.php +++ b/src/Model/PapdisPensionProvider.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class PapdisPensionProvider implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPITypes = [ - 'pensionProviderId' => 'string', + 'accountNo' => 'string', 'employers' => '\SynergiTech\Staffology\Model\PapdisEmployer[]', - 'accountNo' => 'string' + 'pensionProviderId' => 'string' ]; /** @@ -70,9 +70,9 @@ class PapdisPensionProvider implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPIFormats = [ - 'pensionProviderId' => null, + 'accountNo' => null, 'employers' => null, - 'accountNo' => null + 'pensionProviderId' => null ]; /** @@ -81,9 +81,9 @@ class PapdisPensionProvider implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPINullables = [ - 'pensionProviderId' => true, + 'accountNo' => true, 'employers' => true, - 'accountNo' => true + 'pensionProviderId' => true ]; /** @@ -172,9 +172,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'pensionProviderId' => 'pensionProviderId', + 'accountNo' => 'accountNo', 'employers' => 'employers', - 'accountNo' => 'accountNo' + 'pensionProviderId' => 'pensionProviderId' ]; /** @@ -183,9 +183,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'pensionProviderId' => 'setPensionProviderId', + 'accountNo' => 'setAccountNo', 'employers' => 'setEmployers', - 'accountNo' => 'setAccountNo' + 'pensionProviderId' => 'setPensionProviderId' ]; /** @@ -194,9 +194,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'pensionProviderId' => 'getPensionProviderId', + 'accountNo' => 'getAccountNo', 'employers' => 'getEmployers', - 'accountNo' => 'getAccountNo' + 'pensionProviderId' => 'getPensionProviderId' ]; /** @@ -255,9 +255,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('pensionProviderId', $data ?? [], null); - $this->setIfExists('employers', $data ?? [], null); $this->setIfExists('accountNo', $data ?? [], null); + $this->setIfExists('employers', $data ?? [], null); + $this->setIfExists('pensionProviderId', $data ?? [], null); } /** @@ -303,35 +303,35 @@ public function valid(): bool /** - * Gets pensionProviderId + * Gets accountNo * * @return string|null */ - public function getPensionProviderId(): ?string + public function getAccountNo(): ?string { - return $this->container['pensionProviderId']; + return $this->container['accountNo']; } /** - * Sets pensionProviderId + * Sets accountNo * - * @param string|null $pensionProviderId [readonly] Taken from the papdisProviderId property of the PensionProvider + * @param string|null $accountNo [readonly] * * @return $this */ - public function setPensionProviderId(?string $pensionProviderId): static + public function setAccountNo(?string $accountNo): static { - if (is_null($pensionProviderId)) { - array_push($this->openAPINullablesSetToNull, 'pensionProviderId'); + if (is_null($accountNo)) { + array_push($this->openAPINullablesSetToNull, 'accountNo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionProviderId', $nullablesSetToNull); + $index = array_search('accountNo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionProviderId'] = $pensionProviderId; + $this->container['accountNo'] = $accountNo; return $this; } @@ -371,35 +371,35 @@ public function setEmployers(?array $employers): static } /** - * Gets accountNo + * Gets pensionProviderId * * @return string|null */ - public function getAccountNo(): ?string + public function getPensionProviderId(): ?string { - return $this->container['accountNo']; + return $this->container['pensionProviderId']; } /** - * Sets accountNo + * Sets pensionProviderId * - * @param string|null $accountNo [readonly] + * @param string|null $pensionProviderId [readonly] Taken from the papdisProviderId property of the PensionProvider * * @return $this */ - public function setAccountNo(?string $accountNo): static + public function setPensionProviderId(?string $pensionProviderId): static { - if (is_null($accountNo)) { - array_push($this->openAPINullablesSetToNull, 'accountNo'); + if (is_null($pensionProviderId)) { + array_push($this->openAPINullablesSetToNull, 'pensionProviderId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountNo', $nullablesSetToNull); + $index = array_search('pensionProviderId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['accountNo'] = $accountNo; + $this->container['pensionProviderId'] = $pensionProviderId; return $this; } diff --git a/src/Model/PapdisVersion.php b/src/Model/PapdisVersion.php index de4b2e1..dd8411e 100644 --- a/src/Model/PapdisVersion.php +++ b/src/Model/PapdisVersion.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PartnerDetails.php b/src/Model/PartnerDetails.php index 7337911..c87984a 100644 --- a/src/Model/PartnerDetails.php +++ b/src/Model/PartnerDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayBasis.php b/src/Model/PayBasis.php index 59c0186..2e90bc6 100644 --- a/src/Model/PayBasis.php +++ b/src/Model/PayBasis.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayCode.php b/src/Model/PayCode.php index af04ddd..8280a4b 100644 --- a/src/Model/PayCode.php +++ b/src/Model/PayCode.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,33 +60,33 @@ class PayCode implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'title' => 'string', + 'calculationType' => '\SynergiTech\Staffology\Model\PayCodeCalculationType', 'code' => 'string', + 'dailyRateMultiplier' => 'float', 'defaultValue' => 'float', + 'flexibleDrawdown' => '\SynergiTech\Staffology\Model\FlexibleDrawdown', + 'hourlyRateMultiplier' => 'float', + 'isAttachable' => 'bool', + 'isAutoAdjust' => 'bool', + 'isControlCode' => 'bool', 'isDeduction' => 'bool', 'isNiable' => 'bool', - 'isTaxable' => 'bool', - 'isPensionable' => 'bool', - 'isAttachable' => 'bool', - 'isRealTimeClass1aNiable' => 'bool', 'isNotContributingToHolidayPay' => 'bool', - 'isQualifyingEarningsForAe' => 'bool', 'isNotTierable' => 'bool', - 'isTcpTcls' => 'bool', - 'isTcpPp' => 'bool', - 'isTcpOp' => 'bool', - 'flexibleDrawdown' => '\SynergiTech\Staffology\Model\FlexibleDrawdown', - 'isAutoAdjust' => 'bool', - 'calculationType' => '\SynergiTech\Staffology\Model\PayCodeCalculationType', - 'multiplierType' => '\SynergiTech\Staffology\Model\PayCodeMultiplierType', - 'dailyRateMultiplier' => 'float', - 'hourlyRateMultiplier' => 'float', - 'isSystemCode' => 'bool', - 'isControlCode' => 'bool', 'isNotional' => 'bool', - 'isStandAloneLumpSum' => 'bool', 'isPensionExcessLumpSum' => 'bool', - 'payee' => 'string' + 'isPensionable' => 'bool', + 'isQualifyingEarningsForAe' => 'bool', + 'isRealTimeClass1aNiable' => 'bool', + 'isStandAloneLumpSum' => 'bool', + 'isSystemCode' => 'bool', + 'isTaxable' => 'bool', + 'isTcpOp' => 'bool', + 'isTcpPp' => 'bool', + 'isTcpTcls' => 'bool', + 'multiplierType' => '\SynergiTech\Staffology\Model\PayCodeMultiplierType', + 'payee' => 'string', + 'title' => 'string' ]; /** @@ -95,33 +95,33 @@ class PayCode implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'title' => null, + 'calculationType' => null, 'code' => null, + 'dailyRateMultiplier' => 'double', 'defaultValue' => 'double', + 'flexibleDrawdown' => null, + 'hourlyRateMultiplier' => 'double', + 'isAttachable' => null, + 'isAutoAdjust' => null, + 'isControlCode' => null, 'isDeduction' => null, 'isNiable' => null, - 'isTaxable' => null, - 'isPensionable' => null, - 'isAttachable' => null, - 'isRealTimeClass1aNiable' => null, 'isNotContributingToHolidayPay' => null, - 'isQualifyingEarningsForAe' => null, 'isNotTierable' => null, - 'isTcpTcls' => null, - 'isTcpPp' => null, - 'isTcpOp' => null, - 'flexibleDrawdown' => null, - 'isAutoAdjust' => null, - 'calculationType' => null, - 'multiplierType' => null, - 'dailyRateMultiplier' => 'double', - 'hourlyRateMultiplier' => 'double', - 'isSystemCode' => null, - 'isControlCode' => null, 'isNotional' => null, - 'isStandAloneLumpSum' => null, 'isPensionExcessLumpSum' => null, - 'payee' => 'uuid' + 'isPensionable' => null, + 'isQualifyingEarningsForAe' => null, + 'isRealTimeClass1aNiable' => null, + 'isStandAloneLumpSum' => null, + 'isSystemCode' => null, + 'isTaxable' => null, + 'isTcpOp' => null, + 'isTcpPp' => null, + 'isTcpTcls' => null, + 'multiplierType' => null, + 'payee' => 'uuid', + 'title' => null ]; /** @@ -130,33 +130,33 @@ class PayCode implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'title' => false, + 'calculationType' => false, 'code' => false, + 'dailyRateMultiplier' => false, 'defaultValue' => true, + 'flexibleDrawdown' => false, + 'hourlyRateMultiplier' => false, + 'isAttachable' => false, + 'isAutoAdjust' => false, + 'isControlCode' => false, 'isDeduction' => false, 'isNiable' => false, - 'isTaxable' => false, - 'isPensionable' => false, - 'isAttachable' => false, - 'isRealTimeClass1aNiable' => false, 'isNotContributingToHolidayPay' => false, - 'isQualifyingEarningsForAe' => true, 'isNotTierable' => false, - 'isTcpTcls' => false, - 'isTcpPp' => false, - 'isTcpOp' => false, - 'flexibleDrawdown' => false, - 'isAutoAdjust' => false, - 'calculationType' => false, - 'multiplierType' => false, - 'dailyRateMultiplier' => false, - 'hourlyRateMultiplier' => false, - 'isSystemCode' => false, - 'isControlCode' => false, 'isNotional' => false, - 'isStandAloneLumpSum' => false, 'isPensionExcessLumpSum' => false, - 'payee' => true + 'isPensionable' => false, + 'isQualifyingEarningsForAe' => true, + 'isRealTimeClass1aNiable' => false, + 'isStandAloneLumpSum' => false, + 'isSystemCode' => false, + 'isTaxable' => false, + 'isTcpOp' => false, + 'isTcpPp' => false, + 'isTcpTcls' => false, + 'multiplierType' => false, + 'payee' => true, + 'title' => false ]; /** @@ -245,33 +245,33 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'title' => 'title', + 'calculationType' => 'calculationType', 'code' => 'code', + 'dailyRateMultiplier' => 'dailyRateMultiplier', 'defaultValue' => 'defaultValue', + 'flexibleDrawdown' => 'flexibleDrawdown', + 'hourlyRateMultiplier' => 'hourlyRateMultiplier', + 'isAttachable' => 'isAttachable', + 'isAutoAdjust' => 'isAutoAdjust', + 'isControlCode' => 'isControlCode', 'isDeduction' => 'isDeduction', 'isNiable' => 'isNiable', - 'isTaxable' => 'isTaxable', - 'isPensionable' => 'isPensionable', - 'isAttachable' => 'isAttachable', - 'isRealTimeClass1aNiable' => 'isRealTimeClass1aNiable', 'isNotContributingToHolidayPay' => 'isNotContributingToHolidayPay', - 'isQualifyingEarningsForAe' => 'isQualifyingEarningsForAe', 'isNotTierable' => 'isNotTierable', - 'isTcpTcls' => 'isTcp_Tcls', - 'isTcpPp' => 'isTcp_Pp', - 'isTcpOp' => 'isTcp_Op', - 'flexibleDrawdown' => 'flexibleDrawdown', - 'isAutoAdjust' => 'isAutoAdjust', - 'calculationType' => 'calculationType', - 'multiplierType' => 'multiplierType', - 'dailyRateMultiplier' => 'dailyRateMultiplier', - 'hourlyRateMultiplier' => 'hourlyRateMultiplier', - 'isSystemCode' => 'isSystemCode', - 'isControlCode' => 'isControlCode', 'isNotional' => 'isNotional', - 'isStandAloneLumpSum' => 'isStandAloneLumpSum', 'isPensionExcessLumpSum' => 'isPensionExcessLumpSum', - 'payee' => 'payee' + 'isPensionable' => 'isPensionable', + 'isQualifyingEarningsForAe' => 'isQualifyingEarningsForAe', + 'isRealTimeClass1aNiable' => 'isRealTimeClass1aNiable', + 'isStandAloneLumpSum' => 'isStandAloneLumpSum', + 'isSystemCode' => 'isSystemCode', + 'isTaxable' => 'isTaxable', + 'isTcpOp' => 'isTcp_Op', + 'isTcpPp' => 'isTcp_Pp', + 'isTcpTcls' => 'isTcp_Tcls', + 'multiplierType' => 'multiplierType', + 'payee' => 'payee', + 'title' => 'title' ]; /** @@ -280,33 +280,33 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'title' => 'setTitle', + 'calculationType' => 'setCalculationType', 'code' => 'setCode', + 'dailyRateMultiplier' => 'setDailyRateMultiplier', 'defaultValue' => 'setDefaultValue', + 'flexibleDrawdown' => 'setFlexibleDrawdown', + 'hourlyRateMultiplier' => 'setHourlyRateMultiplier', + 'isAttachable' => 'setIsAttachable', + 'isAutoAdjust' => 'setIsAutoAdjust', + 'isControlCode' => 'setIsControlCode', 'isDeduction' => 'setIsDeduction', 'isNiable' => 'setIsNiable', - 'isTaxable' => 'setIsTaxable', - 'isPensionable' => 'setIsPensionable', - 'isAttachable' => 'setIsAttachable', - 'isRealTimeClass1aNiable' => 'setIsRealTimeClass1aNiable', 'isNotContributingToHolidayPay' => 'setIsNotContributingToHolidayPay', - 'isQualifyingEarningsForAe' => 'setIsQualifyingEarningsForAe', 'isNotTierable' => 'setIsNotTierable', - 'isTcpTcls' => 'setIsTcpTcls', - 'isTcpPp' => 'setIsTcpPp', - 'isTcpOp' => 'setIsTcpOp', - 'flexibleDrawdown' => 'setFlexibleDrawdown', - 'isAutoAdjust' => 'setIsAutoAdjust', - 'calculationType' => 'setCalculationType', - 'multiplierType' => 'setMultiplierType', - 'dailyRateMultiplier' => 'setDailyRateMultiplier', - 'hourlyRateMultiplier' => 'setHourlyRateMultiplier', - 'isSystemCode' => 'setIsSystemCode', - 'isControlCode' => 'setIsControlCode', 'isNotional' => 'setIsNotional', - 'isStandAloneLumpSum' => 'setIsStandAloneLumpSum', 'isPensionExcessLumpSum' => 'setIsPensionExcessLumpSum', - 'payee' => 'setPayee' + 'isPensionable' => 'setIsPensionable', + 'isQualifyingEarningsForAe' => 'setIsQualifyingEarningsForAe', + 'isRealTimeClass1aNiable' => 'setIsRealTimeClass1aNiable', + 'isStandAloneLumpSum' => 'setIsStandAloneLumpSum', + 'isSystemCode' => 'setIsSystemCode', + 'isTaxable' => 'setIsTaxable', + 'isTcpOp' => 'setIsTcpOp', + 'isTcpPp' => 'setIsTcpPp', + 'isTcpTcls' => 'setIsTcpTcls', + 'multiplierType' => 'setMultiplierType', + 'payee' => 'setPayee', + 'title' => 'setTitle' ]; /** @@ -315,33 +315,33 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'title' => 'getTitle', + 'calculationType' => 'getCalculationType', 'code' => 'getCode', + 'dailyRateMultiplier' => 'getDailyRateMultiplier', 'defaultValue' => 'getDefaultValue', + 'flexibleDrawdown' => 'getFlexibleDrawdown', + 'hourlyRateMultiplier' => 'getHourlyRateMultiplier', + 'isAttachable' => 'getIsAttachable', + 'isAutoAdjust' => 'getIsAutoAdjust', + 'isControlCode' => 'getIsControlCode', 'isDeduction' => 'getIsDeduction', 'isNiable' => 'getIsNiable', - 'isTaxable' => 'getIsTaxable', - 'isPensionable' => 'getIsPensionable', - 'isAttachable' => 'getIsAttachable', - 'isRealTimeClass1aNiable' => 'getIsRealTimeClass1aNiable', 'isNotContributingToHolidayPay' => 'getIsNotContributingToHolidayPay', - 'isQualifyingEarningsForAe' => 'getIsQualifyingEarningsForAe', 'isNotTierable' => 'getIsNotTierable', - 'isTcpTcls' => 'getIsTcpTcls', - 'isTcpPp' => 'getIsTcpPp', - 'isTcpOp' => 'getIsTcpOp', - 'flexibleDrawdown' => 'getFlexibleDrawdown', - 'isAutoAdjust' => 'getIsAutoAdjust', - 'calculationType' => 'getCalculationType', - 'multiplierType' => 'getMultiplierType', - 'dailyRateMultiplier' => 'getDailyRateMultiplier', - 'hourlyRateMultiplier' => 'getHourlyRateMultiplier', - 'isSystemCode' => 'getIsSystemCode', - 'isControlCode' => 'getIsControlCode', 'isNotional' => 'getIsNotional', - 'isStandAloneLumpSum' => 'getIsStandAloneLumpSum', 'isPensionExcessLumpSum' => 'getIsPensionExcessLumpSum', - 'payee' => 'getPayee' + 'isPensionable' => 'getIsPensionable', + 'isQualifyingEarningsForAe' => 'getIsQualifyingEarningsForAe', + 'isRealTimeClass1aNiable' => 'getIsRealTimeClass1aNiable', + 'isStandAloneLumpSum' => 'getIsStandAloneLumpSum', + 'isSystemCode' => 'getIsSystemCode', + 'isTaxable' => 'getIsTaxable', + 'isTcpOp' => 'getIsTcpOp', + 'isTcpPp' => 'getIsTcpPp', + 'isTcpTcls' => 'getIsTcpTcls', + 'multiplierType' => 'getMultiplierType', + 'payee' => 'getPayee', + 'title' => 'getTitle' ]; /** @@ -400,33 +400,33 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('calculationType', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('dailyRateMultiplier', $data ?? [], null); $this->setIfExists('defaultValue', $data ?? [], null); + $this->setIfExists('flexibleDrawdown', $data ?? [], null); + $this->setIfExists('hourlyRateMultiplier', $data ?? [], null); + $this->setIfExists('isAttachable', $data ?? [], null); + $this->setIfExists('isAutoAdjust', $data ?? [], null); + $this->setIfExists('isControlCode', $data ?? [], null); $this->setIfExists('isDeduction', $data ?? [], null); $this->setIfExists('isNiable', $data ?? [], null); - $this->setIfExists('isTaxable', $data ?? [], null); - $this->setIfExists('isPensionable', $data ?? [], null); - $this->setIfExists('isAttachable', $data ?? [], null); - $this->setIfExists('isRealTimeClass1aNiable', $data ?? [], null); $this->setIfExists('isNotContributingToHolidayPay', $data ?? [], null); - $this->setIfExists('isQualifyingEarningsForAe', $data ?? [], null); $this->setIfExists('isNotTierable', $data ?? [], null); - $this->setIfExists('isTcpTcls', $data ?? [], null); - $this->setIfExists('isTcpPp', $data ?? [], null); - $this->setIfExists('isTcpOp', $data ?? [], null); - $this->setIfExists('flexibleDrawdown', $data ?? [], null); - $this->setIfExists('isAutoAdjust', $data ?? [], null); - $this->setIfExists('calculationType', $data ?? [], null); - $this->setIfExists('multiplierType', $data ?? [], null); - $this->setIfExists('dailyRateMultiplier', $data ?? [], null); - $this->setIfExists('hourlyRateMultiplier', $data ?? [], null); - $this->setIfExists('isSystemCode', $data ?? [], null); - $this->setIfExists('isControlCode', $data ?? [], null); $this->setIfExists('isNotional', $data ?? [], null); - $this->setIfExists('isStandAloneLumpSum', $data ?? [], null); $this->setIfExists('isPensionExcessLumpSum', $data ?? [], null); + $this->setIfExists('isPensionable', $data ?? [], null); + $this->setIfExists('isQualifyingEarningsForAe', $data ?? [], null); + $this->setIfExists('isRealTimeClass1aNiable', $data ?? [], null); + $this->setIfExists('isStandAloneLumpSum', $data ?? [], null); + $this->setIfExists('isSystemCode', $data ?? [], null); + $this->setIfExists('isTaxable', $data ?? [], null); + $this->setIfExists('isTcpOp', $data ?? [], null); + $this->setIfExists('isTcpPp', $data ?? [], null); + $this->setIfExists('isTcpTcls', $data ?? [], null); + $this->setIfExists('multiplierType', $data ?? [], null); $this->setIfExists('payee', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -456,17 +456,6 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['title'] === null) { - $invalidProperties[] = "'title' can't be null"; - } - if ((mb_strlen($this->container['title']) > 100)) { - $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 100."; - } - - if ((mb_strlen($this->container['title']) < 1)) { - $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 1."; - } - if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } @@ -478,11 +467,22 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'code', the character length must be bigger than or equal to 1."; } - return $invalidProperties; - } - - /** - * Validate all the properties in the model + if ($this->container['title'] === null) { + $invalidProperties[] = "'title' can't be null"; + } + if ((mb_strlen($this->container['title']) > 100)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 100."; + } + + if ((mb_strlen($this->container['title']) < 1)) { + $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model * return true if all passed * * @return bool True if all properties are valid @@ -494,35 +494,28 @@ public function valid(): bool /** - * Gets title + * Gets calculationType * - * @return string + * @return \SynergiTech\Staffology\Model\PayCodeCalculationType|null */ - public function getTitle(): string + public function getCalculationType(): ?\SynergiTech\Staffology\Model\PayCodeCalculationType { - return $this->container['title']; + return $this->container['calculationType']; } /** - * Sets title + * Sets calculationType * - * @param string $title title + * @param \SynergiTech\Staffology\Model\PayCodeCalculationType|null $calculationType calculationType * * @return $this */ - public function setTitle(string $title): static + public function setCalculationType(?\SynergiTech\Staffology\Model\PayCodeCalculationType $calculationType): static { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); - } - if ((mb_strlen($title) > 100)) { - throw new InvalidArgumentException('invalid length for $title when calling PayCode., must be smaller than or equal to 100.'); - } - if ((mb_strlen($title) < 1)) { - throw new InvalidArgumentException('invalid length for $title when calling PayCode., must be bigger than or equal to 1.'); + if (is_null($calculationType)) { + throw new InvalidArgumentException('non-nullable calculationType cannot be null'); } - - $this->container['title'] = $title; + $this->container['calculationType'] = $calculationType; return $this; } @@ -561,6 +554,33 @@ public function setCode(string $code): static return $this; } + /** + * Gets dailyRateMultiplier + * + * @return float|null + */ + public function getDailyRateMultiplier(): ?float + { + return $this->container['dailyRateMultiplier']; + } + + /** + * Sets dailyRateMultiplier + * + * @param float|null $dailyRateMultiplier If the MultiplierType is MultipleOfDailyRate then this sets the multiple to be used, ie 1.5 + * + * @return $this + */ + public function setDailyRateMultiplier(?float $dailyRateMultiplier): static + { + if (is_null($dailyRateMultiplier)) { + throw new InvalidArgumentException('non-nullable dailyRateMultiplier cannot be null'); + } + $this->container['dailyRateMultiplier'] = $dailyRateMultiplier; + + return $this; + } + /** * Gets defaultValue * @@ -596,224 +616,217 @@ public function setDefaultValue(?float $defaultValue): static } /** - * Gets isDeduction + * Gets flexibleDrawdown * - * @return bool|null + * @return \SynergiTech\Staffology\Model\FlexibleDrawdown|null */ - public function getIsDeduction(): ?bool + public function getFlexibleDrawdown(): ?\SynergiTech\Staffology\Model\FlexibleDrawdown { - return $this->container['isDeduction']; + return $this->container['flexibleDrawdown']; } /** - * Sets isDeduction + * Sets flexibleDrawdown * - * @param bool|null $isDeduction If set to true then a PayLine using this code will be treated as a deduction as opposed to an addition. + * @param \SynergiTech\Staffology\Model\FlexibleDrawdown|null $flexibleDrawdown flexibleDrawdown * * @return $this */ - public function setIsDeduction(?bool $isDeduction): static + public function setFlexibleDrawdown(?\SynergiTech\Staffology\Model\FlexibleDrawdown $flexibleDrawdown): static { - if (is_null($isDeduction)) { - throw new InvalidArgumentException('non-nullable isDeduction cannot be null'); + if (is_null($flexibleDrawdown)) { + throw new InvalidArgumentException('non-nullable flexibleDrawdown cannot be null'); } - $this->container['isDeduction'] = $isDeduction; + $this->container['flexibleDrawdown'] = $flexibleDrawdown; return $this; } /** - * Gets isNiable + * Gets hourlyRateMultiplier * - * @return bool|null + * @return float|null */ - public function getIsNiable(): ?bool + public function getHourlyRateMultiplier(): ?float { - return $this->container['isNiable']; + return $this->container['hourlyRateMultiplier']; } /** - * Sets isNiable + * Sets hourlyRateMultiplier * - * @param bool|null $isNiable Determines whether or not the value of PayLines using this code should be taken into consideration when calculating National Insurance Contributions. + * @param float|null $hourlyRateMultiplier If the MultiplierType is MultipleOfHourlyRate then this sets the multiple to be used, ie 1.5 * * @return $this */ - public function setIsNiable(?bool $isNiable): static + public function setHourlyRateMultiplier(?float $hourlyRateMultiplier): static { - if (is_null($isNiable)) { - throw new InvalidArgumentException('non-nullable isNiable cannot be null'); + if (is_null($hourlyRateMultiplier)) { + throw new InvalidArgumentException('non-nullable hourlyRateMultiplier cannot be null'); } - $this->container['isNiable'] = $isNiable; + $this->container['hourlyRateMultiplier'] = $hourlyRateMultiplier; return $this; } /** - * Gets isTaxable + * Gets isAttachable * * @return bool|null */ - public function getIsTaxable(): ?bool + public function getIsAttachable(): ?bool { - return $this->container['isTaxable']; + return $this->container['isAttachable']; } /** - * Sets isTaxable + * Sets isAttachable * - * @param bool|null $isTaxable Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the PAYE liability. + * @param bool|null $isAttachable Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the attachable pay for AttachmentOrders. * * @return $this */ - public function setIsTaxable(?bool $isTaxable): static + public function setIsAttachable(?bool $isAttachable): static { - if (is_null($isTaxable)) { - throw new InvalidArgumentException('non-nullable isTaxable cannot be null'); + if (is_null($isAttachable)) { + throw new InvalidArgumentException('non-nullable isAttachable cannot be null'); } - $this->container['isTaxable'] = $isTaxable; + $this->container['isAttachable'] = $isAttachable; return $this; } /** - * Gets isPensionable + * Gets isAutoAdjust * * @return bool|null */ - public function getIsPensionable(): ?bool + public function getIsAutoAdjust(): ?bool { - return $this->container['isPensionable']; + return $this->container['isAutoAdjust']; } /** - * Sets isPensionable + * Sets isAutoAdjust * - * @param bool|null $isPensionable Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the total pensionable pay. + * @param bool|null $isAutoAdjust Can be used to inform a User to what default value to set for PayLine.autoAdjustForLeave for new lines created. * * @return $this */ - public function setIsPensionable(?bool $isPensionable): static + public function setIsAutoAdjust(?bool $isAutoAdjust): static { - if (is_null($isPensionable)) { - throw new InvalidArgumentException('non-nullable isPensionable cannot be null'); + if (is_null($isAutoAdjust)) { + throw new InvalidArgumentException('non-nullable isAutoAdjust cannot be null'); } - $this->container['isPensionable'] = $isPensionable; + $this->container['isAutoAdjust'] = $isAutoAdjust; return $this; } /** - * Gets isAttachable + * Gets isControlCode * * @return bool|null */ - public function getIsAttachable(): ?bool + public function getIsControlCode(): ?bool { - return $this->container['isAttachable']; + return $this->container['isControlCode']; } /** - * Sets isAttachable + * Sets isControlCode * - * @param bool|null $isAttachable Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the attachable pay for AttachmentOrders. + * @param bool|null $isControlCode [readonly] Control Codes cannot be deleted or edited nor can PayLines be assigned to them. * * @return $this */ - public function setIsAttachable(?bool $isAttachable): static + public function setIsControlCode(?bool $isControlCode): static { - if (is_null($isAttachable)) { - throw new InvalidArgumentException('non-nullable isAttachable cannot be null'); + if (is_null($isControlCode)) { + throw new InvalidArgumentException('non-nullable isControlCode cannot be null'); } - $this->container['isAttachable'] = $isAttachable; + $this->container['isControlCode'] = $isControlCode; return $this; } /** - * Gets isRealTimeClass1aNiable + * Gets isDeduction * * @return bool|null */ - public function getIsRealTimeClass1aNiable(): ?bool + public function getIsDeduction(): ?bool { - return $this->container['isRealTimeClass1aNiable']; + return $this->container['isDeduction']; } /** - * Sets isRealTimeClass1aNiable + * Sets isDeduction * - * @param bool|null $isRealTimeClass1aNiable Determines whether or not the value of PayLines using this code are subject to real time Class 1A NIC. + * @param bool|null $isDeduction If set to true then a PayLine using this code will be treated as a deduction as opposed to an addition. * * @return $this */ - public function setIsRealTimeClass1aNiable(?bool $isRealTimeClass1aNiable): static + public function setIsDeduction(?bool $isDeduction): static { - if (is_null($isRealTimeClass1aNiable)) { - throw new InvalidArgumentException('non-nullable isRealTimeClass1aNiable cannot be null'); + if (is_null($isDeduction)) { + throw new InvalidArgumentException('non-nullable isDeduction cannot be null'); } - $this->container['isRealTimeClass1aNiable'] = $isRealTimeClass1aNiable; + $this->container['isDeduction'] = $isDeduction; return $this; } /** - * Gets isNotContributingToHolidayPay + * Gets isNiable * * @return bool|null */ - public function getIsNotContributingToHolidayPay(): ?bool + public function getIsNiable(): ?bool { - return $this->container['isNotContributingToHolidayPay']; + return $this->container['isNiable']; } /** - * Sets isNotContributingToHolidayPay + * Sets isNiable * - * @param bool|null $isNotContributingToHolidayPay If true then any payments made using this code will not contribute towards holiday pay calculations. + * @param bool|null $isNiable Determines whether or not the value of PayLines using this code should be taken into consideration when calculating National Insurance Contributions. * * @return $this */ - public function setIsNotContributingToHolidayPay(?bool $isNotContributingToHolidayPay): static + public function setIsNiable(?bool $isNiable): static { - if (is_null($isNotContributingToHolidayPay)) { - throw new InvalidArgumentException('non-nullable isNotContributingToHolidayPay cannot be null'); + if (is_null($isNiable)) { + throw new InvalidArgumentException('non-nullable isNiable cannot be null'); } - $this->container['isNotContributingToHolidayPay'] = $isNotContributingToHolidayPay; + $this->container['isNiable'] = $isNiable; return $this; } /** - * Gets isQualifyingEarningsForAe + * Gets isNotContributingToHolidayPay * * @return bool|null */ - public function getIsQualifyingEarningsForAe(): ?bool + public function getIsNotContributingToHolidayPay(): ?bool { - return $this->container['isQualifyingEarningsForAe']; + return $this->container['isNotContributingToHolidayPay']; } /** - * Sets isQualifyingEarningsForAe + * Sets isNotContributingToHolidayPay * - * @param bool|null $isQualifyingEarningsForAe If true then any payments made using this code will be used as the basis for calculating QualifyingEarnings for AutoEnrolment assessments. If it is set to null then when it's next retrieved it'll have the same value as PensionablePay + * @param bool|null $isNotContributingToHolidayPay If true then any payments made using this code will not contribute towards holiday pay calculations. * * @return $this */ - public function setIsQualifyingEarningsForAe(?bool $isQualifyingEarningsForAe): static + public function setIsNotContributingToHolidayPay(?bool $isNotContributingToHolidayPay): static { - if (is_null($isQualifyingEarningsForAe)) { - array_push($this->openAPINullablesSetToNull, 'isQualifyingEarningsForAe'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('isQualifyingEarningsForAe', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isNotContributingToHolidayPay)) { + throw new InvalidArgumentException('non-nullable isNotContributingToHolidayPay cannot be null'); } - $this->container['isQualifyingEarningsForAe'] = $isQualifyingEarningsForAe; + $this->container['isNotContributingToHolidayPay'] = $isNotContributingToHolidayPay; return $this; } @@ -846,379 +859,332 @@ public function setIsNotTierable(?bool $isNotTierable): static } /** - * Gets isTcpTcls + * Gets isNotional * * @return bool|null */ - public function getIsTcpTcls(): ?bool + public function getIsNotional(): ?bool { - return $this->container['isTcpTcls']; + return $this->container['isNotional']; } /** - * Sets isTcpTcls + * Sets isNotional * - * @param bool|null $isTcpTcls If true then any payments made using this code will be reported as a Trivial Commutation Payment (A - TCLS) + * @param bool|null $isNotional Determines whether the transaction involves non-monetary benefits for payroll processing, potentially subject to tax and National Insurance. * * @return $this */ - public function setIsTcpTcls(?bool $isTcpTcls): static + public function setIsNotional(?bool $isNotional): static { - if (is_null($isTcpTcls)) { - throw new InvalidArgumentException('non-nullable isTcpTcls cannot be null'); + if (is_null($isNotional)) { + throw new InvalidArgumentException('non-nullable isNotional cannot be null'); } - $this->container['isTcpTcls'] = $isTcpTcls; + $this->container['isNotional'] = $isNotional; return $this; } /** - * Gets isTcpPp + * Gets isPensionExcessLumpSum * * @return bool|null */ - public function getIsTcpPp(): ?bool + public function getIsPensionExcessLumpSum(): ?bool { - return $this->container['isTcpPp']; + return $this->container['isPensionExcessLumpSum']; } /** - * Sets isTcpPp + * Sets isPensionExcessLumpSum * - * @param bool|null $isTcpPp If true then any payments made using this code will be reported as a Trivial Commutation Payment (B - Personal Pension) + * @param bool|null $isPensionExcessLumpSum If true then any payments made using this code will be reported as a Lump Sums (B - PCELS) * * @return $this */ - public function setIsTcpPp(?bool $isTcpPp): static + public function setIsPensionExcessLumpSum(?bool $isPensionExcessLumpSum): static { - if (is_null($isTcpPp)) { - throw new InvalidArgumentException('non-nullable isTcpPp cannot be null'); + if (is_null($isPensionExcessLumpSum)) { + throw new InvalidArgumentException('non-nullable isPensionExcessLumpSum cannot be null'); } - $this->container['isTcpPp'] = $isTcpPp; + $this->container['isPensionExcessLumpSum'] = $isPensionExcessLumpSum; return $this; } /** - * Gets isTcpOp + * Gets isPensionable * * @return bool|null */ - public function getIsTcpOp(): ?bool - { - return $this->container['isTcpOp']; - } - - /** - * Sets isTcpOp - * - * @param bool|null $isTcpOp If true then any payments made using this code will be reported as a Trivial Commutation Payment (C - Occupational Pension) - * - * @return $this - */ - public function setIsTcpOp(?bool $isTcpOp): static - { - if (is_null($isTcpOp)) { - throw new InvalidArgumentException('non-nullable isTcpOp cannot be null'); - } - $this->container['isTcpOp'] = $isTcpOp; - - return $this; - } - - /** - * Gets flexibleDrawdown - * - * @return \SynergiTech\Staffology\Model\FlexibleDrawdown|null - */ - public function getFlexibleDrawdown(): ?\SynergiTech\Staffology\Model\FlexibleDrawdown + public function getIsPensionable(): ?bool { - return $this->container['flexibleDrawdown']; + return $this->container['isPensionable']; } /** - * Sets flexibleDrawdown + * Sets isPensionable * - * @param \SynergiTech\Staffology\Model\FlexibleDrawdown|null $flexibleDrawdown flexibleDrawdown + * @param bool|null $isPensionable Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the total pensionable pay. * * @return $this */ - public function setFlexibleDrawdown(?\SynergiTech\Staffology\Model\FlexibleDrawdown $flexibleDrawdown): static + public function setIsPensionable(?bool $isPensionable): static { - if (is_null($flexibleDrawdown)) { - throw new InvalidArgumentException('non-nullable flexibleDrawdown cannot be null'); + if (is_null($isPensionable)) { + throw new InvalidArgumentException('non-nullable isPensionable cannot be null'); } - $this->container['flexibleDrawdown'] = $flexibleDrawdown; + $this->container['isPensionable'] = $isPensionable; return $this; } /** - * Gets isAutoAdjust + * Gets isQualifyingEarningsForAe * * @return bool|null */ - public function getIsAutoAdjust(): ?bool - { - return $this->container['isAutoAdjust']; - } - - /** - * Sets isAutoAdjust - * - * @param bool|null $isAutoAdjust Can be used to inform a User to what default value to set for PayLine.autoAdjustForLeave for new lines created. - * - * @return $this - */ - public function setIsAutoAdjust(?bool $isAutoAdjust): static - { - if (is_null($isAutoAdjust)) { - throw new InvalidArgumentException('non-nullable isAutoAdjust cannot be null'); - } - $this->container['isAutoAdjust'] = $isAutoAdjust; - - return $this; - } - - /** - * Gets calculationType - * - * @return \SynergiTech\Staffology\Model\PayCodeCalculationType|null - */ - public function getCalculationType(): ?\SynergiTech\Staffology\Model\PayCodeCalculationType + public function getIsQualifyingEarningsForAe(): ?bool { - return $this->container['calculationType']; + return $this->container['isQualifyingEarningsForAe']; } /** - * Sets calculationType + * Sets isQualifyingEarningsForAe * - * @param \SynergiTech\Staffology\Model\PayCodeCalculationType|null $calculationType calculationType + * @param bool|null $isQualifyingEarningsForAe If true then any payments made using this code will be used as the basis for calculating QualifyingEarnings for AutoEnrolment assessments. If it is set to null then when it's next retrieved it'll have the same value as PensionablePay * * @return $this */ - public function setCalculationType(?\SynergiTech\Staffology\Model\PayCodeCalculationType $calculationType): static + public function setIsQualifyingEarningsForAe(?bool $isQualifyingEarningsForAe): static { - if (is_null($calculationType)) { - throw new InvalidArgumentException('non-nullable calculationType cannot be null'); + if (is_null($isQualifyingEarningsForAe)) { + array_push($this->openAPINullablesSetToNull, 'isQualifyingEarningsForAe'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('isQualifyingEarningsForAe', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['calculationType'] = $calculationType; + $this->container['isQualifyingEarningsForAe'] = $isQualifyingEarningsForAe; return $this; } /** - * Gets multiplierType + * Gets isRealTimeClass1aNiable * - * @return \SynergiTech\Staffology\Model\PayCodeMultiplierType|null + * @return bool|null */ - public function getMultiplierType(): ?\SynergiTech\Staffology\Model\PayCodeMultiplierType + public function getIsRealTimeClass1aNiable(): ?bool { - return $this->container['multiplierType']; + return $this->container['isRealTimeClass1aNiable']; } /** - * Sets multiplierType + * Sets isRealTimeClass1aNiable * - * @param \SynergiTech\Staffology\Model\PayCodeMultiplierType|null $multiplierType multiplierType + * @param bool|null $isRealTimeClass1aNiable Determines whether or not the value of PayLines using this code are subject to real time Class 1A NIC. * * @return $this */ - public function setMultiplierType(?\SynergiTech\Staffology\Model\PayCodeMultiplierType $multiplierType): static + public function setIsRealTimeClass1aNiable(?bool $isRealTimeClass1aNiable): static { - if (is_null($multiplierType)) { - throw new InvalidArgumentException('non-nullable multiplierType cannot be null'); + if (is_null($isRealTimeClass1aNiable)) { + throw new InvalidArgumentException('non-nullable isRealTimeClass1aNiable cannot be null'); } - $this->container['multiplierType'] = $multiplierType; + $this->container['isRealTimeClass1aNiable'] = $isRealTimeClass1aNiable; return $this; } /** - * Gets dailyRateMultiplier + * Gets isStandAloneLumpSum * - * @return float|null + * @return bool|null */ - public function getDailyRateMultiplier(): ?float + public function getIsStandAloneLumpSum(): ?bool { - return $this->container['dailyRateMultiplier']; + return $this->container['isStandAloneLumpSum']; } /** - * Sets dailyRateMultiplier + * Sets isStandAloneLumpSum * - * @param float|null $dailyRateMultiplier If the MultiplierType is MultipleOfDailyRate then this sets the multiple to be used, ie 1.5 + * @param bool|null $isStandAloneLumpSum If true then any payments made using this code will be reported as a Lump Sums (A - SALS) * * @return $this */ - public function setDailyRateMultiplier(?float $dailyRateMultiplier): static + public function setIsStandAloneLumpSum(?bool $isStandAloneLumpSum): static { - if (is_null($dailyRateMultiplier)) { - throw new InvalidArgumentException('non-nullable dailyRateMultiplier cannot be null'); + if (is_null($isStandAloneLumpSum)) { + throw new InvalidArgumentException('non-nullable isStandAloneLumpSum cannot be null'); } - $this->container['dailyRateMultiplier'] = $dailyRateMultiplier; + $this->container['isStandAloneLumpSum'] = $isStandAloneLumpSum; return $this; } /** - * Gets hourlyRateMultiplier + * Gets isSystemCode * - * @return float|null + * @return bool|null */ - public function getHourlyRateMultiplier(): ?float + public function getIsSystemCode(): ?bool { - return $this->container['hourlyRateMultiplier']; + return $this->container['isSystemCode']; } /** - * Sets hourlyRateMultiplier + * Sets isSystemCode * - * @param float|null $hourlyRateMultiplier If the MultiplierType is MultipleOfHourlyRate then this sets the multiple to be used, ie 1.5 + * @param bool|null $isSystemCode [readonly] System Codes cannot be deleted or edited * * @return $this */ - public function setHourlyRateMultiplier(?float $hourlyRateMultiplier): static + public function setIsSystemCode(?bool $isSystemCode): static { - if (is_null($hourlyRateMultiplier)) { - throw new InvalidArgumentException('non-nullable hourlyRateMultiplier cannot be null'); + if (is_null($isSystemCode)) { + throw new InvalidArgumentException('non-nullable isSystemCode cannot be null'); } - $this->container['hourlyRateMultiplier'] = $hourlyRateMultiplier; + $this->container['isSystemCode'] = $isSystemCode; return $this; } /** - * Gets isSystemCode + * Gets isTaxable * * @return bool|null */ - public function getIsSystemCode(): ?bool + public function getIsTaxable(): ?bool { - return $this->container['isSystemCode']; + return $this->container['isTaxable']; } /** - * Sets isSystemCode + * Sets isTaxable * - * @param bool|null $isSystemCode [readonly] System Codes cannot be deleted or edited + * @param bool|null $isTaxable Determines whether or not the value of PayLines using this code should be taken into consideration when calculating the PAYE liability. * * @return $this */ - public function setIsSystemCode(?bool $isSystemCode): static + public function setIsTaxable(?bool $isTaxable): static { - if (is_null($isSystemCode)) { - throw new InvalidArgumentException('non-nullable isSystemCode cannot be null'); + if (is_null($isTaxable)) { + throw new InvalidArgumentException('non-nullable isTaxable cannot be null'); } - $this->container['isSystemCode'] = $isSystemCode; + $this->container['isTaxable'] = $isTaxable; return $this; } /** - * Gets isControlCode + * Gets isTcpOp * * @return bool|null */ - public function getIsControlCode(): ?bool + public function getIsTcpOp(): ?bool { - return $this->container['isControlCode']; + return $this->container['isTcpOp']; } /** - * Sets isControlCode + * Sets isTcpOp * - * @param bool|null $isControlCode [readonly] Control Codes cannot be deleted or edited nor can PayLines be assigned to them. + * @param bool|null $isTcpOp If true then any payments made using this code will be reported as a Trivial Commutation Payment (C - Occupational Pension) * * @return $this */ - public function setIsControlCode(?bool $isControlCode): static + public function setIsTcpOp(?bool $isTcpOp): static { - if (is_null($isControlCode)) { - throw new InvalidArgumentException('non-nullable isControlCode cannot be null'); + if (is_null($isTcpOp)) { + throw new InvalidArgumentException('non-nullable isTcpOp cannot be null'); } - $this->container['isControlCode'] = $isControlCode; + $this->container['isTcpOp'] = $isTcpOp; return $this; } /** - * Gets isNotional + * Gets isTcpPp * * @return bool|null */ - public function getIsNotional(): ?bool + public function getIsTcpPp(): ?bool { - return $this->container['isNotional']; + return $this->container['isTcpPp']; } /** - * Sets isNotional + * Sets isTcpPp * - * @param bool|null $isNotional Determines whether the transaction involves non-monetary benefits for payroll processing, potentially subject to tax and National Insurance. + * @param bool|null $isTcpPp If true then any payments made using this code will be reported as a Trivial Commutation Payment (B - Personal Pension) * * @return $this */ - public function setIsNotional(?bool $isNotional): static + public function setIsTcpPp(?bool $isTcpPp): static { - if (is_null($isNotional)) { - throw new InvalidArgumentException('non-nullable isNotional cannot be null'); + if (is_null($isTcpPp)) { + throw new InvalidArgumentException('non-nullable isTcpPp cannot be null'); } - $this->container['isNotional'] = $isNotional; + $this->container['isTcpPp'] = $isTcpPp; return $this; } /** - * Gets isStandAloneLumpSum + * Gets isTcpTcls * * @return bool|null */ - public function getIsStandAloneLumpSum(): ?bool + public function getIsTcpTcls(): ?bool { - return $this->container['isStandAloneLumpSum']; + return $this->container['isTcpTcls']; } /** - * Sets isStandAloneLumpSum + * Sets isTcpTcls * - * @param bool|null $isStandAloneLumpSum If true then any payments made using this code will be reported as a Lump Sums (A - SALS) + * @param bool|null $isTcpTcls If true then any payments made using this code will be reported as a Trivial Commutation Payment (A - TCLS) * * @return $this */ - public function setIsStandAloneLumpSum(?bool $isStandAloneLumpSum): static + public function setIsTcpTcls(?bool $isTcpTcls): static { - if (is_null($isStandAloneLumpSum)) { - throw new InvalidArgumentException('non-nullable isStandAloneLumpSum cannot be null'); + if (is_null($isTcpTcls)) { + throw new InvalidArgumentException('non-nullable isTcpTcls cannot be null'); } - $this->container['isStandAloneLumpSum'] = $isStandAloneLumpSum; + $this->container['isTcpTcls'] = $isTcpTcls; return $this; } /** - * Gets isPensionExcessLumpSum + * Gets multiplierType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PayCodeMultiplierType|null */ - public function getIsPensionExcessLumpSum(): ?bool + public function getMultiplierType(): ?\SynergiTech\Staffology\Model\PayCodeMultiplierType { - return $this->container['isPensionExcessLumpSum']; + return $this->container['multiplierType']; } /** - * Sets isPensionExcessLumpSum + * Sets multiplierType * - * @param bool|null $isPensionExcessLumpSum If true then any payments made using this code will be reported as a Lump Sums (B - PCELS) + * @param \SynergiTech\Staffology\Model\PayCodeMultiplierType|null $multiplierType multiplierType * * @return $this */ - public function setIsPensionExcessLumpSum(?bool $isPensionExcessLumpSum): static + public function setMultiplierType(?\SynergiTech\Staffology\Model\PayCodeMultiplierType $multiplierType): static { - if (is_null($isPensionExcessLumpSum)) { - throw new InvalidArgumentException('non-nullable isPensionExcessLumpSum cannot be null'); + if (is_null($multiplierType)) { + throw new InvalidArgumentException('non-nullable multiplierType cannot be null'); } - $this->container['isPensionExcessLumpSum'] = $isPensionExcessLumpSum; + $this->container['multiplierType'] = $multiplierType; return $this; } @@ -1256,6 +1222,40 @@ public function setPayee(?string $payee): static return $this; } + + /** + * Gets title + * + * @return string + */ + public function getTitle(): string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title title + * + * @return $this + */ + public function setTitle(string $title): static + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if ((mb_strlen($title) > 100)) { + throw new InvalidArgumentException('invalid length for $title when calling PayCode., must be smaller than or equal to 100.'); + } + if ((mb_strlen($title) < 1)) { + throw new InvalidArgumentException('invalid length for $title when calling PayCode., must be bigger than or equal to 1.'); + } + + $this->container['title'] = $title; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PayCodeCalculationType.php b/src/Model/PayCodeCalculationType.php index 2f4bc1a..7499042 100644 --- a/src/Model/PayCodeCalculationType.php +++ b/src/Model/PayCodeCalculationType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayCodeMultiplierType.php b/src/Model/PayCodeMultiplierType.php index f12c69b..b7ca747 100644 --- a/src/Model/PayCodeMultiplierType.php +++ b/src/Model/PayCodeMultiplierType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayCodeSet.php b/src/Model/PayCodeSet.php index 5b09ee5..7ebf0c3 100644 --- a/src/Model/PayCodeSet.php +++ b/src/Model/PayCodeSet.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,13 +60,13 @@ class PayCodeSet implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'id' => 'string', + 'lgpsPayCategory' => '\SynergiTech\Staffology\Model\LgpsPayCategory', + 'mcrPayCategory' => '\SynergiTech\Staffology\Model\McrPayCategory', 'name' => 'string', 'payCodes' => 'string[]', - 'useForMcr' => 'bool', - 'mcrPayCategory' => '\SynergiTech\Staffology\Model\McrPayCategory', 'useForLgps' => 'bool', - 'lgpsPayCategory' => '\SynergiTech\Staffology\Model\LgpsPayCategory', - 'id' => 'string' + 'useForMcr' => 'bool' ]; /** @@ -75,13 +75,13 @@ class PayCodeSet implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'id' => 'uuid', + 'lgpsPayCategory' => null, + 'mcrPayCategory' => null, 'name' => null, 'payCodes' => null, - 'useForMcr' => null, - 'mcrPayCategory' => null, 'useForLgps' => null, - 'lgpsPayCategory' => null, - 'id' => 'uuid' + 'useForMcr' => null ]; /** @@ -90,13 +90,13 @@ class PayCodeSet implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'id' => false, + 'lgpsPayCategory' => false, + 'mcrPayCategory' => false, 'name' => false, 'payCodes' => true, - 'useForMcr' => false, - 'mcrPayCategory' => false, 'useForLgps' => false, - 'lgpsPayCategory' => false, - 'id' => false + 'useForMcr' => false ]; /** @@ -185,13 +185,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'id' => 'id', + 'lgpsPayCategory' => 'lgpsPayCategory', + 'mcrPayCategory' => 'mcrPayCategory', 'name' => 'name', 'payCodes' => 'payCodes', - 'useForMcr' => 'useForMcr', - 'mcrPayCategory' => 'mcrPayCategory', 'useForLgps' => 'useForLgps', - 'lgpsPayCategory' => 'lgpsPayCategory', - 'id' => 'id' + 'useForMcr' => 'useForMcr' ]; /** @@ -200,13 +200,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'id' => 'setId', + 'lgpsPayCategory' => 'setLgpsPayCategory', + 'mcrPayCategory' => 'setMcrPayCategory', 'name' => 'setName', 'payCodes' => 'setPayCodes', - 'useForMcr' => 'setUseForMcr', - 'mcrPayCategory' => 'setMcrPayCategory', 'useForLgps' => 'setUseForLgps', - 'lgpsPayCategory' => 'setLgpsPayCategory', - 'id' => 'setId' + 'useForMcr' => 'setUseForMcr' ]; /** @@ -215,13 +215,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'id' => 'getId', + 'lgpsPayCategory' => 'getLgpsPayCategory', + 'mcrPayCategory' => 'getMcrPayCategory', 'name' => 'getName', 'payCodes' => 'getPayCodes', - 'useForMcr' => 'getUseForMcr', - 'mcrPayCategory' => 'getMcrPayCategory', 'useForLgps' => 'getUseForLgps', - 'lgpsPayCategory' => 'getLgpsPayCategory', - 'id' => 'getId' + 'useForMcr' => 'getUseForMcr' ]; /** @@ -280,13 +280,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('lgpsPayCategory', $data ?? [], null); + $this->setIfExists('mcrPayCategory', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('payCodes', $data ?? [], null); - $this->setIfExists('useForMcr', $data ?? [], null); - $this->setIfExists('mcrPayCategory', $data ?? [], null); $this->setIfExists('useForLgps', $data ?? [], null); - $this->setIfExists('lgpsPayCategory', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('useForMcr', $data ?? [], null); } /** @@ -343,204 +343,204 @@ public function valid(): bool /** - * Gets name + * Gets id * - * @return string + * @return string|null */ - public function getName(): string + public function getId(): ?string { - return $this->container['name']; + return $this->container['id']; } /** - * Sets name + * Sets id * - * @param string $name The name of this PayCodeSet + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setName(string $name): static + public function setId(?string $id): static { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); - } - if ((mb_strlen($name) > 100)) { - throw new InvalidArgumentException('invalid length for $name when calling PayCodeSet., must be smaller than or equal to 100.'); - } - if ((mb_strlen($name) < 1)) { - throw new InvalidArgumentException('invalid length for $name when calling PayCodeSet., must be bigger than or equal to 1.'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - - $this->container['name'] = $name; + $this->container['id'] = $id; return $this; } /** - * Gets payCodes + * Gets lgpsPayCategory * - * @return string[]|null + * @return \SynergiTech\Staffology\Model\LgpsPayCategory|null */ - public function getPayCodes(): ?array + public function getLgpsPayCategory(): ?\SynergiTech\Staffology\Model\LgpsPayCategory { - return $this->container['payCodes']; + return $this->container['lgpsPayCategory']; } /** - * Sets payCodes + * Sets lgpsPayCategory * - * @param string[]|null $payCodes The Code of any PayCodes included in this PayCodeSet + * @param \SynergiTech\Staffology\Model\LgpsPayCategory|null $lgpsPayCategory lgpsPayCategory * * @return $this */ - public function setPayCodes(?array $payCodes): static + public function setLgpsPayCategory(?\SynergiTech\Staffology\Model\LgpsPayCategory $lgpsPayCategory): static { - if (is_null($payCodes)) { - array_push($this->openAPINullablesSetToNull, 'payCodes'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCodes', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($lgpsPayCategory)) { + throw new InvalidArgumentException('non-nullable lgpsPayCategory cannot be null'); } - $this->container['payCodes'] = $payCodes; + $this->container['lgpsPayCategory'] = $lgpsPayCategory; return $this; } /** - * Gets useForMcr + * Gets mcrPayCategory * - * @return bool|null + * @return \SynergiTech\Staffology\Model\McrPayCategory|null */ - public function getUseForMcr(): ?bool + public function getMcrPayCategory(): ?\SynergiTech\Staffology\Model\McrPayCategory { - return $this->container['useForMcr']; + return $this->container['mcrPayCategory']; } /** - * Sets useForMcr + * Sets mcrPayCategory * - * @param bool|null $useForMcr useForMcr + * @param \SynergiTech\Staffology\Model\McrPayCategory|null $mcrPayCategory mcrPayCategory * * @return $this */ - public function setUseForMcr(?bool $useForMcr): static + public function setMcrPayCategory(?\SynergiTech\Staffology\Model\McrPayCategory $mcrPayCategory): static { - if (is_null($useForMcr)) { - throw new InvalidArgumentException('non-nullable useForMcr cannot be null'); + if (is_null($mcrPayCategory)) { + throw new InvalidArgumentException('non-nullable mcrPayCategory cannot be null'); } - $this->container['useForMcr'] = $useForMcr; + $this->container['mcrPayCategory'] = $mcrPayCategory; return $this; } /** - * Gets mcrPayCategory + * Gets name * - * @return \SynergiTech\Staffology\Model\McrPayCategory|null + * @return string */ - public function getMcrPayCategory(): ?\SynergiTech\Staffology\Model\McrPayCategory + public function getName(): string { - return $this->container['mcrPayCategory']; + return $this->container['name']; } /** - * Sets mcrPayCategory + * Sets name * - * @param \SynergiTech\Staffology\Model\McrPayCategory|null $mcrPayCategory mcrPayCategory + * @param string $name The name of this PayCodeSet * * @return $this */ - public function setMcrPayCategory(?\SynergiTech\Staffology\Model\McrPayCategory $mcrPayCategory): static + public function setName(string $name): static { - if (is_null($mcrPayCategory)) { - throw new InvalidArgumentException('non-nullable mcrPayCategory cannot be null'); + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + if ((mb_strlen($name) > 100)) { + throw new InvalidArgumentException('invalid length for $name when calling PayCodeSet., must be smaller than or equal to 100.'); + } + if ((mb_strlen($name) < 1)) { + throw new InvalidArgumentException('invalid length for $name when calling PayCodeSet., must be bigger than or equal to 1.'); } - $this->container['mcrPayCategory'] = $mcrPayCategory; + + $this->container['name'] = $name; return $this; } /** - * Gets useForLgps + * Gets payCodes * - * @return bool|null + * @return string[]|null */ - public function getUseForLgps(): ?bool + public function getPayCodes(): ?array { - return $this->container['useForLgps']; + return $this->container['payCodes']; } /** - * Sets useForLgps + * Sets payCodes * - * @param bool|null $useForLgps Flag indicating if this PayCodeSet will be used for LGPS pay categorisation + * @param string[]|null $payCodes The Code of any PayCodes included in this PayCodeSet * * @return $this */ - public function setUseForLgps(?bool $useForLgps): static + public function setPayCodes(?array $payCodes): static { - if (is_null($useForLgps)) { - throw new InvalidArgumentException('non-nullable useForLgps cannot be null'); + if (is_null($payCodes)) { + array_push($this->openAPINullablesSetToNull, 'payCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['useForLgps'] = $useForLgps; + $this->container['payCodes'] = $payCodes; return $this; } /** - * Gets lgpsPayCategory + * Gets useForLgps * - * @return \SynergiTech\Staffology\Model\LgpsPayCategory|null + * @return bool|null */ - public function getLgpsPayCategory(): ?\SynergiTech\Staffology\Model\LgpsPayCategory + public function getUseForLgps(): ?bool { - return $this->container['lgpsPayCategory']; + return $this->container['useForLgps']; } /** - * Sets lgpsPayCategory + * Sets useForLgps * - * @param \SynergiTech\Staffology\Model\LgpsPayCategory|null $lgpsPayCategory lgpsPayCategory + * @param bool|null $useForLgps Flag indicating if this PayCodeSet will be used for LGPS pay categorisation * * @return $this */ - public function setLgpsPayCategory(?\SynergiTech\Staffology\Model\LgpsPayCategory $lgpsPayCategory): static + public function setUseForLgps(?bool $useForLgps): static { - if (is_null($lgpsPayCategory)) { - throw new InvalidArgumentException('non-nullable lgpsPayCategory cannot be null'); + if (is_null($useForLgps)) { + throw new InvalidArgumentException('non-nullable useForLgps cannot be null'); } - $this->container['lgpsPayCategory'] = $lgpsPayCategory; + $this->container['useForLgps'] = $useForLgps; return $this; } /** - * Gets id + * Gets useForMcr * - * @return string|null + * @return bool|null */ - public function getId(): ?string + public function getUseForMcr(): ?bool { - return $this->container['id']; + return $this->container['useForMcr']; } /** - * Sets id + * Sets useForMcr * - * @param string|null $id [readonly] The unique id of the object + * @param bool|null $useForMcr useForMcr * * @return $this */ - public function setId(?string $id): static + public function setUseForMcr(?bool $useForMcr): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($useForMcr)) { + throw new InvalidArgumentException('non-nullable useForMcr cannot be null'); } - $this->container['id'] = $id; + $this->container['useForMcr'] = $useForMcr; return $this; } diff --git a/src/Model/PayCodeVarianceLine.php b/src/Model/PayCodeVarianceLine.php index ceca204..93f2295 100644 --- a/src/Model/PayCodeVarianceLine.php +++ b/src/Model/PayCodeVarianceLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayElementReport.php b/src/Model/PayElementReport.php index ac6dcc7..2239924 100644 --- a/src/Model/PayElementReport.php +++ b/src/Model/PayElementReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,21 +59,22 @@ class PayElementReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'employer' => '\SynergiTech\Staffology\Model\Item', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\PayElementReportLine[]', + 'ordinal' => 'int', 'payCodeTotals' => 'array', - 'employer' => '\SynergiTech\Staffology\Model\Item', 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', - 'ordinal' => 'int', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -82,21 +83,22 @@ class PayElementReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'employer' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'isDraft' => null, 'lines' => null, + 'ordinal' => 'int32', 'payCodeTotals' => 'double', - 'employer' => null, 'payPeriod' => null, - 'ordinal' => 'int32', 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -105,21 +107,22 @@ class PayElementReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'employer' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'isDraft' => false, 'lines' => true, + 'ordinal' => false, 'payCodeTotals' => true, - 'employer' => false, 'payPeriod' => false, - 'ordinal' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -208,21 +211,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'employer' => 'employer', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'isDraft' => 'isDraft', 'lines' => 'lines', + 'ordinal' => 'ordinal', 'payCodeTotals' => 'payCodeTotals', - 'employer' => 'employer', 'payPeriod' => 'payPeriod', - 'ordinal' => 'ordinal', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -231,21 +235,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'employer' => 'setEmployer', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', + 'ordinal' => 'setOrdinal', 'payCodeTotals' => 'setPayCodeTotals', - 'employer' => 'setEmployer', 'payPeriod' => 'setPayPeriod', - 'ordinal' => 'setOrdinal', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -254,21 +259,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'employer' => 'getEmployer', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', + 'ordinal' => 'getOrdinal', 'payCodeTotals' => 'getPayCodeTotals', - 'employer' => 'getEmployer', 'payPeriod' => 'getPayPeriod', - 'ordinal' => 'getOrdinal', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -327,21 +333,22 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('employer', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('ordinal', $data ?? [], null); $this->setIfExists('payCodeTotals', $data ?? [], null); - $this->setIfExists('employer', $data ?? [], null); $this->setIfExists('payPeriod', $data ?? [], null); - $this->setIfExists('ordinal', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -387,123 +394,150 @@ public function valid(): bool /** - * Gets lines + * Gets employer * - * @return \SynergiTech\Staffology\Model\PayElementReportLine[]|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getLines(): ?array + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['lines']; + return $this->container['employer']; } /** - * Sets lines + * Sets employer * - * @param \SynergiTech\Staffology\Model\PayElementReportLine[]|null $lines lines + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setLines(?array $lines): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); } - $this->container['lines'] = $lines; + $this->container['employer'] = $employer; return $this; } /** - * Gets payCodeTotals + * Gets endDate * - * @return array|null + * @return \DateTime|null */ - public function getPayCodeTotals(): ?array + public function getEndDate(): ?\DateTime { - return $this->container['payCodeTotals']; + return $this->container['endDate']; } /** - * Sets payCodeTotals + * Sets endDate * - * @param array|null $payCodeTotals payCodeTotals + * @param \DateTime|null $endDate endDate * * @return $this */ - public function setPayCodeTotals(?array $payCodeTotals): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($payCodeTotals)) { - array_push($this->openAPINullablesSetToNull, 'payCodeTotals'); + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets endPeriodName + * + * @return string|null + */ + public function getEndPeriodName(): ?string + { + return $this->container['endPeriodName']; + } + + /** + * Sets endPeriodName + * + * @param string|null $endPeriodName endPeriodName + * + * @return $this + */ + public function setEndPeriodName(?string $endPeriodName): static + { + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCodeTotals', $nullablesSetToNull); + $index = array_search('endPeriodName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payCodeTotals'] = $payCodeTotals; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets employer + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getIsDraft(): ?bool { - return $this->container['employer']; + return $this->container['isDraft']; } /** - * Sets employer + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param bool|null $isDraft isDraft * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['employer'] = $employer; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets payPeriod + * Gets lines * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return \SynergiTech\Staffology\Model\PayElementReportLine[]|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getLines(): ?array { - return $this->container['payPeriod']; + return $this->container['lines']; } /** - * Sets payPeriod + * Sets lines * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param \SynergiTech\Staffology\Model\PayElementReportLine[]|null $lines lines * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setLines(?array $lines): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriod'] = $payPeriod; + $this->container['lines'] = $lines; return $this; } @@ -536,204 +570,204 @@ public function setOrdinal(?int $ordinal): static } /** - * Gets period + * Gets payCodeTotals * - * @return int|null + * @return array|null */ - public function getPeriod(): ?int + public function getPayCodeTotals(): ?array { - return $this->container['period']; + return $this->container['payCodeTotals']; } /** - * Sets period + * Sets payCodeTotals * - * @param int|null $period period + * @param array|null $payCodeTotals payCodeTotals * * @return $this */ - public function setPeriod(?int $period): static + public function setPayCodeTotals(?array $payCodeTotals): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($payCodeTotals)) { + array_push($this->openAPINullablesSetToNull, 'payCodeTotals'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCodeTotals', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['period'] = $period; + $this->container['payCodeTotals'] = $payCodeTotals; return $this; } /** - * Gets periodTo + * Gets payPeriod * - * @return int|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getPeriodTo(): ?int + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['periodTo']; + return $this->container['payPeriod']; } /** - * Sets periodTo + * Sets payPeriod * - * @param int|null $periodTo periodTo + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod * * @return $this */ - public function setPeriodTo(?int $periodTo): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static { - if (is_null($periodTo)) { - throw new InvalidArgumentException('non-nullable periodTo cannot be null'); + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['periodTo'] = $periodTo; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets startPeriodName + * Gets period * - * @return string|null + * @return int|null */ - public function getStartPeriodName(): ?string + public function getPeriod(): ?int { - return $this->container['startPeriodName']; + return $this->container['period']; } /** - * Sets startPeriodName + * Sets period * - * @param string|null $startPeriodName startPeriodName + * @param int|null $period period * * @return $this */ - public function setStartPeriodName(?string $startPeriodName): static + public function setPeriod(?int $period): static { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['startPeriodName'] = $startPeriodName; + $this->container['period'] = $period; return $this; } /** - * Gets endPeriodName + * Gets periodTo * - * @return string|null + * @return int|null */ - public function getEndPeriodName(): ?string + public function getPeriodTo(): ?int { - return $this->container['endPeriodName']; + return $this->container['periodTo']; } /** - * Sets endPeriodName + * Sets periodTo * - * @param string|null $endPeriodName endPeriodName + * @param int|null $periodTo periodTo * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setPeriodTo(?int $periodTo): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($periodTo)) { + throw new InvalidArgumentException('non-nullable periodTo cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['periodTo'] = $periodTo; return $this; } /** - * Gets startDate + * Gets report * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getStartDate(): ?\DateTime + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['startDate']; + return $this->container['report']; } /** - * Sets startDate + * Sets report * - * @param \DateTime|null $startDate startDate + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['startDate'] = $startDate; + $this->container['report'] = $report; return $this; } /** - * Gets endDate + * Gets startDate * * @return \DateTime|null */ - public function getEndDate(): ?\DateTime + public function getStartDate(): ?\DateTime { - return $this->container['endDate']; + return $this->container['startDate']; } /** - * Sets endDate + * Sets startDate * - * @param \DateTime|null $endDate endDate + * @param \DateTime|null $startDate startDate * * @return $this */ - public function setEndDate(?\DateTime $endDate): static + public function setStartDate(?\DateTime $startDate): static { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); } - $this->container['endDate'] = $endDate; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -800,28 +834,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/PayElementReportLine.php b/src/Model/PayElementReportLine.php index b011524..74053bd 100644 --- a/src/Model/PayElementReportLine.php +++ b/src/Model/PayElementReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class PayElementReportLine implements ModelInterface, ArrayAccess, JsonSerializa */ protected static array $openAPITypes = [ 'employee' => '\SynergiTech\Staffology\Model\Item', - 'payrollCode' => 'string', + 'hasPay' => 'bool', 'niNumber' => 'string', 'payElements' => 'array', - 'hasPay' => 'bool', + 'payrollCode' => 'string', 'totalPay' => 'float' ]; @@ -74,10 +74,10 @@ class PayElementReportLine implements ModelInterface, ArrayAccess, JsonSerializa */ protected static array $openAPIFormats = [ 'employee' => null, - 'payrollCode' => null, + 'hasPay' => null, 'niNumber' => null, 'payElements' => 'double', - 'hasPay' => null, + 'payrollCode' => null, 'totalPay' => 'double' ]; @@ -88,10 +88,10 @@ class PayElementReportLine implements ModelInterface, ArrayAccess, JsonSerializa */ protected static array $openAPINullables = [ 'employee' => false, - 'payrollCode' => true, + 'hasPay' => false, 'niNumber' => true, 'payElements' => true, - 'hasPay' => false, + 'payrollCode' => true, 'totalPay' => false ]; @@ -182,10 +182,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'employee' => 'employee', - 'payrollCode' => 'payrollCode', + 'hasPay' => 'hasPay', 'niNumber' => 'niNumber', 'payElements' => 'payElements', - 'hasPay' => 'hasPay', + 'payrollCode' => 'payrollCode', 'totalPay' => 'totalPay' ]; @@ -196,10 +196,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'employee' => 'setEmployee', - 'payrollCode' => 'setPayrollCode', + 'hasPay' => 'setHasPay', 'niNumber' => 'setNiNumber', 'payElements' => 'setPayElements', - 'hasPay' => 'setHasPay', + 'payrollCode' => 'setPayrollCode', 'totalPay' => 'setTotalPay' ]; @@ -210,10 +210,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'employee' => 'getEmployee', - 'payrollCode' => 'getPayrollCode', + 'hasPay' => 'getHasPay', 'niNumber' => 'getNiNumber', 'payElements' => 'getPayElements', - 'hasPay' => 'getHasPay', + 'payrollCode' => 'getPayrollCode', 'totalPay' => 'getTotalPay' ]; @@ -274,10 +274,10 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('hasPay', $data ?? [], null); $this->setIfExists('niNumber', $data ?? [], null); $this->setIfExists('payElements', $data ?? [], null); - $this->setIfExists('hasPay', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('totalPay', $data ?? [], null); } @@ -351,35 +351,28 @@ public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): stat } /** - * Gets payrollCode + * Gets hasPay * - * @return string|null + * @return bool|null */ - public function getPayrollCode(): ?string + public function getHasPay(): ?bool { - return $this->container['payrollCode']; + return $this->container['hasPay']; } /** - * Sets payrollCode + * Sets hasPay * - * @param string|null $payrollCode payrollCode + * @param bool|null $hasPay hasPay * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setHasPay(?bool $hasPay): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($hasPay)) { + throw new InvalidArgumentException('non-nullable hasPay cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['hasPay'] = $hasPay; return $this; } @@ -453,28 +446,35 @@ public function setPayElements(?array $payElements): static } /** - * Gets hasPay + * Gets payrollCode * - * @return bool|null + * @return string|null */ - public function getHasPay(): ?bool + public function getPayrollCode(): ?string { - return $this->container['hasPay']; + return $this->container['payrollCode']; } /** - * Sets hasPay + * Sets payrollCode * - * @param bool|null $hasPay hasPay + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setHasPay(?bool $hasPay): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($hasPay)) { - throw new InvalidArgumentException('non-nullable hasPay cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['hasPay'] = $hasPay; + $this->container['payrollCode'] = $payrollCode; return $this; } diff --git a/src/Model/PayElementReportReportResponse.php b/src/Model/PayElementReportReportResponse.php index 40c511d..14bd356 100644 --- a/src/Model/PayElementReportReportResponse.php +++ b/src/Model/PayElementReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class PayElementReportReportResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\PayElementReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class PayElementReportReportResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class PayElementReportReportResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PayGradesReport.php b/src/Model/PayGradesReport.php index c333a31..57a40f7 100644 --- a/src/Model/PayGradesReport.php +++ b/src/Model/PayGradesReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class PayGradesReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\AveragePayGradesReportLine[]', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -72,11 +72,11 @@ class PayGradesReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'isDraft' => null, 'lines' => null, 'report' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -85,11 +85,11 @@ class PayGradesReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'isDraft' => false, 'lines' => true, 'report' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'isDraft' => 'isDraft', 'lines' => 'lines', 'report' => 'report', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', 'report' => 'setReport', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', 'report' => 'getReport', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -316,6 +316,33 @@ public function valid(): bool } + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + /** * Gets lines * @@ -437,33 +464,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PayGradesReportReportResponse.php b/src/Model/PayGradesReportReportResponse.php index ef86b8c..030c069 100644 --- a/src/Model/PayGradesReportReportResponse.php +++ b/src/Model/PayGradesReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class PayGradesReportReportResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\PayGradesReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class PayGradesReportReportResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class PayGradesReportReportResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PayLine.php b/src/Model/PayLine.php index 7b3251a..ebbde07 100644 --- a/src/Model/PayLine.php +++ b/src/Model/PayLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,60 +60,64 @@ class PayLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'value' => 'float', - 'rate' => 'float', - 'multiplier' => 'float', - 'description' => 'string', + 'analysisCategoriesCodes' => '\SynergiTech\Staffology\Model\AnalysisCategoryCodes[]', + 'analysisCategoryCodeIds' => 'string[]', + 'annualValue' => 'float', 'attachmentOrderId' => 'string', - 'pensionId' => 'string', - 'leaveId' => 'string', - 'loanId' => 'string', - 'leaveStatutoryDaysPaid' => 'float', - 'leaveStatutoryWeeksPaid' => 'float', - 'code' => 'string', - 'tags' => 'string[]', + 'autoAdjustForLeave' => 'bool', + 'benefitId' => 'int', + 'calculateAsWhenPaid' => 'bool', 'childId' => 'string', - 'isNetToGross' => 'bool', - 'targetNetToGrossValue' => 'float', - 'netToGrossDiscrepancy' => 'float', - 'effectiveFrom' => '\DateTime', - 'effectiveTo' => '\DateTime', - 'department' => 'string', - 'departmentTitle' => 'string', + 'code' => 'string', + 'contributesToBasicPay' => 'bool', 'costCentre' => 'string', + 'costCentreId' => 'string', 'costCentreTitle' => 'string', + 'department' => 'string', 'departmentId' => 'string', - 'costCentreId' => 'string', - 'isAutoGeneratedBasicPayLine' => 'bool', - 'percentageOfEffectiveDays' => 'float', - 'totalWorkingDays' => 'float', - 'isAutomaticBackPay' => 'bool', - 'ignoreInitialBackPay' => 'bool', - 'initialBackPayPublicPayRunId' => 'string', - 'autoAdjustForLeave' => 'bool', - 'contributesToBasicPay' => 'bool', - 'calculateAsWhenPaid' => 'bool', - 'totalPaidDays' => 'float', - 'roleId' => 'string', - 'employeeRoleReference' => 'string', + 'departmentTitle' => 'string', + 'description' => 'string', 'earnedFrom' => '\DateTime', 'earnedTo' => '\DateTime', - 'periodFrom' => '\DateTime', - 'periodTo' => '\DateTime', - 'annualValue' => 'float', - 'parentId' => 'string', + 'effectiveFrom' => '\DateTime', + 'effectiveTo' => '\DateTime', + 'employeeRoleReference' => 'string', + 'fullTimeAnnualValue' => 'float', + 'ignoreInitialBackPay' => 'bool', + 'importIdempotencyKey' => 'string', + 'initialBackPayPublicPayRunId' => 'string', 'isAutoCalculatedBackPayLine' => 'bool', + 'isAutoGeneratedBasicPayLine' => 'bool', + 'isAutomaticBackPay' => 'bool', + 'isNetToGross' => 'bool', + 'isTaxable' => 'bool', 'isZeroHoursTeachersBackPayLine' => 'bool', - 'analysisCategoriesCodes' => '\SynergiTech\Staffology\Model\AnalysisCategoryCodes[]', - 'analysisCategoryCodeIds' => 'string[]', - 'paySpineId' => 'string', - 'paySpineGradeId' => 'string', - 'spinalPointId' => 'string', + 'leaveId' => 'string', + 'leaveStatutoryDaysPaid' => 'float', + 'leaveStatutoryWeeksPaid' => 'float', + 'loanId' => 'string', 'londonAllowanceId' => 'int', - 'fullTimeAnnualValue' => 'float', - 'paySpine' => 'string', + 'multiplier' => 'float', + 'netToGrossDiscrepancy' => 'float', + 'parentId' => 'string', 'payGrade' => 'string', - 'spinePoint' => 'string' + 'paySpine' => 'string', + 'paySpineGradeId' => 'string', + 'paySpineId' => 'string', + 'payrollCode' => 'string', + 'pensionId' => 'string', + 'percentageOfEffectiveDays' => 'float', + 'periodFrom' => '\DateTime', + 'periodTo' => '\DateTime', + 'rate' => 'float', + 'roleId' => 'string', + 'spinalPointId' => 'string', + 'spinePoint' => 'string', + 'tags' => 'string[]', + 'targetNetToGrossValue' => 'float', + 'totalPaidDays' => 'float', + 'totalWorkingDays' => 'float', + 'value' => 'float' ]; /** @@ -122,60 +126,64 @@ class PayLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'value' => 'double', - 'rate' => 'double', - 'multiplier' => 'double', - 'description' => null, + 'analysisCategoriesCodes' => null, + 'analysisCategoryCodeIds' => 'uuid', + 'annualValue' => 'double', 'attachmentOrderId' => 'uuid', - 'pensionId' => 'uuid', - 'leaveId' => 'uuid', - 'loanId' => 'uuid', - 'leaveStatutoryDaysPaid' => 'double', - 'leaveStatutoryWeeksPaid' => 'double', - 'code' => null, - 'tags' => null, + 'autoAdjustForLeave' => null, + 'benefitId' => 'int32', + 'calculateAsWhenPaid' => null, 'childId' => 'uuid', - 'isNetToGross' => null, - 'targetNetToGrossValue' => 'double', - 'netToGrossDiscrepancy' => 'double', - 'effectiveFrom' => 'date', - 'effectiveTo' => 'date', - 'department' => null, - 'departmentTitle' => null, + 'code' => null, + 'contributesToBasicPay' => null, 'costCentre' => null, + 'costCentreId' => 'uuid', 'costCentreTitle' => null, + 'department' => null, 'departmentId' => 'uuid', - 'costCentreId' => 'uuid', - 'isAutoGeneratedBasicPayLine' => null, - 'percentageOfEffectiveDays' => 'double', - 'totalWorkingDays' => 'double', - 'isAutomaticBackPay' => null, - 'ignoreInitialBackPay' => null, - 'initialBackPayPublicPayRunId' => 'uuid', - 'autoAdjustForLeave' => null, - 'contributesToBasicPay' => null, - 'calculateAsWhenPaid' => null, - 'totalPaidDays' => 'double', - 'roleId' => 'uuid', - 'employeeRoleReference' => null, + 'departmentTitle' => null, + 'description' => null, 'earnedFrom' => 'date', 'earnedTo' => 'date', - 'periodFrom' => 'date', - 'periodTo' => 'date', - 'annualValue' => 'double', - 'parentId' => 'uuid', + 'effectiveFrom' => 'date', + 'effectiveTo' => 'date', + 'employeeRoleReference' => null, + 'fullTimeAnnualValue' => 'double', + 'ignoreInitialBackPay' => null, + 'importIdempotencyKey' => 'uuid', + 'initialBackPayPublicPayRunId' => 'uuid', 'isAutoCalculatedBackPayLine' => null, + 'isAutoGeneratedBasicPayLine' => null, + 'isAutomaticBackPay' => null, + 'isNetToGross' => null, + 'isTaxable' => null, 'isZeroHoursTeachersBackPayLine' => null, - 'analysisCategoriesCodes' => null, - 'analysisCategoryCodeIds' => 'uuid', - 'paySpineId' => 'uuid', - 'paySpineGradeId' => 'uuid', - 'spinalPointId' => 'uuid', + 'leaveId' => 'uuid', + 'leaveStatutoryDaysPaid' => 'double', + 'leaveStatutoryWeeksPaid' => 'double', + 'loanId' => 'uuid', 'londonAllowanceId' => 'int32', - 'fullTimeAnnualValue' => 'double', - 'paySpine' => null, + 'multiplier' => 'double', + 'netToGrossDiscrepancy' => 'double', + 'parentId' => 'uuid', 'payGrade' => null, - 'spinePoint' => null + 'paySpine' => null, + 'paySpineGradeId' => 'uuid', + 'paySpineId' => 'uuid', + 'payrollCode' => null, + 'pensionId' => 'uuid', + 'percentageOfEffectiveDays' => 'double', + 'periodFrom' => 'date', + 'periodTo' => 'date', + 'rate' => 'double', + 'roleId' => 'uuid', + 'spinalPointId' => 'uuid', + 'spinePoint' => null, + 'tags' => null, + 'targetNetToGrossValue' => 'double', + 'totalPaidDays' => 'double', + 'totalWorkingDays' => 'double', + 'value' => 'double' ]; /** @@ -184,60 +192,64 @@ class PayLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'value' => false, - 'rate' => true, - 'multiplier' => true, - 'description' => true, + 'analysisCategoriesCodes' => true, + 'analysisCategoryCodeIds' => true, + 'annualValue' => true, 'attachmentOrderId' => true, - 'pensionId' => true, - 'leaveId' => true, - 'loanId' => true, - 'leaveStatutoryDaysPaid' => true, - 'leaveStatutoryWeeksPaid' => true, - 'code' => true, - 'tags' => true, + 'autoAdjustForLeave' => false, + 'benefitId' => true, + 'calculateAsWhenPaid' => false, 'childId' => false, - 'isNetToGross' => false, - 'targetNetToGrossValue' => true, - 'netToGrossDiscrepancy' => true, - 'effectiveFrom' => true, - 'effectiveTo' => true, - 'department' => true, - 'departmentTitle' => true, + 'code' => true, + 'contributesToBasicPay' => false, 'costCentre' => true, + 'costCentreId' => true, 'costCentreTitle' => true, + 'department' => true, 'departmentId' => true, - 'costCentreId' => true, - 'isAutoGeneratedBasicPayLine' => false, - 'percentageOfEffectiveDays' => true, - 'totalWorkingDays' => true, - 'isAutomaticBackPay' => false, - 'ignoreInitialBackPay' => false, - 'initialBackPayPublicPayRunId' => true, - 'autoAdjustForLeave' => false, - 'contributesToBasicPay' => false, - 'calculateAsWhenPaid' => false, - 'totalPaidDays' => true, - 'roleId' => true, - 'employeeRoleReference' => true, + 'departmentTitle' => true, + 'description' => true, 'earnedFrom' => true, 'earnedTo' => true, - 'periodFrom' => true, - 'periodTo' => true, - 'annualValue' => true, - 'parentId' => true, + 'effectiveFrom' => true, + 'effectiveTo' => true, + 'employeeRoleReference' => true, + 'fullTimeAnnualValue' => false, + 'ignoreInitialBackPay' => false, + 'importIdempotencyKey' => true, + 'initialBackPayPublicPayRunId' => true, 'isAutoCalculatedBackPayLine' => false, + 'isAutoGeneratedBasicPayLine' => false, + 'isAutomaticBackPay' => false, + 'isNetToGross' => false, + 'isTaxable' => false, 'isZeroHoursTeachersBackPayLine' => false, - 'analysisCategoriesCodes' => true, - 'analysisCategoryCodeIds' => true, - 'paySpineId' => true, - 'paySpineGradeId' => true, - 'spinalPointId' => true, + 'leaveId' => true, + 'leaveStatutoryDaysPaid' => true, + 'leaveStatutoryWeeksPaid' => true, + 'loanId' => true, 'londonAllowanceId' => true, - 'fullTimeAnnualValue' => false, - 'paySpine' => true, + 'multiplier' => true, + 'netToGrossDiscrepancy' => true, + 'parentId' => true, 'payGrade' => true, - 'spinePoint' => true + 'paySpine' => true, + 'paySpineGradeId' => true, + 'paySpineId' => true, + 'payrollCode' => true, + 'pensionId' => true, + 'percentageOfEffectiveDays' => true, + 'periodFrom' => true, + 'periodTo' => true, + 'rate' => true, + 'roleId' => true, + 'spinalPointId' => true, + 'spinePoint' => true, + 'tags' => true, + 'targetNetToGrossValue' => true, + 'totalPaidDays' => true, + 'totalWorkingDays' => true, + 'value' => false ]; /** @@ -326,60 +338,64 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'value' => 'value', - 'rate' => 'rate', - 'multiplier' => 'multiplier', - 'description' => 'description', + 'analysisCategoriesCodes' => 'analysisCategoriesCodes', + 'analysisCategoryCodeIds' => 'analysisCategoryCodeIds', + 'annualValue' => 'annualValue', 'attachmentOrderId' => 'attachmentOrderId', - 'pensionId' => 'pensionId', - 'leaveId' => 'leaveId', - 'loanId' => 'loanId', - 'leaveStatutoryDaysPaid' => 'leaveStatutoryDaysPaid', - 'leaveStatutoryWeeksPaid' => 'leaveStatutoryWeeksPaid', - 'code' => 'code', - 'tags' => 'tags', + 'autoAdjustForLeave' => 'autoAdjustForLeave', + 'benefitId' => 'benefitId', + 'calculateAsWhenPaid' => 'calculateAsWhenPaid', 'childId' => 'childId', - 'isNetToGross' => 'isNetToGross', - 'targetNetToGrossValue' => 'targetNetToGrossValue', - 'netToGrossDiscrepancy' => 'netToGrossDiscrepancy', - 'effectiveFrom' => 'effectiveFrom', - 'effectiveTo' => 'effectiveTo', - 'department' => 'department', - 'departmentTitle' => 'departmentTitle', + 'code' => 'code', + 'contributesToBasicPay' => 'contributesToBasicPay', 'costCentre' => 'costCentre', + 'costCentreId' => 'costCentreId', 'costCentreTitle' => 'costCentreTitle', + 'department' => 'department', 'departmentId' => 'departmentId', - 'costCentreId' => 'costCentreId', - 'isAutoGeneratedBasicPayLine' => 'isAutoGeneratedBasicPayLine', - 'percentageOfEffectiveDays' => 'percentageOfEffectiveDays', - 'totalWorkingDays' => 'totalWorkingDays', - 'isAutomaticBackPay' => 'isAutomaticBackPay', - 'ignoreInitialBackPay' => 'ignoreInitialBackPay', - 'initialBackPayPublicPayRunId' => 'initialBackPayPublicPayRunId', - 'autoAdjustForLeave' => 'autoAdjustForLeave', - 'contributesToBasicPay' => 'contributesToBasicPay', - 'calculateAsWhenPaid' => 'calculateAsWhenPaid', - 'totalPaidDays' => 'totalPaidDays', - 'roleId' => 'roleId', - 'employeeRoleReference' => 'employeeRoleReference', + 'departmentTitle' => 'departmentTitle', + 'description' => 'description', 'earnedFrom' => 'earnedFrom', 'earnedTo' => 'earnedTo', - 'periodFrom' => 'periodFrom', - 'periodTo' => 'periodTo', - 'annualValue' => 'annualValue', - 'parentId' => 'parentId', + 'effectiveFrom' => 'effectiveFrom', + 'effectiveTo' => 'effectiveTo', + 'employeeRoleReference' => 'employeeRoleReference', + 'fullTimeAnnualValue' => 'fullTimeAnnualValue', + 'ignoreInitialBackPay' => 'ignoreInitialBackPay', + 'importIdempotencyKey' => 'importIdempotencyKey', + 'initialBackPayPublicPayRunId' => 'initialBackPayPublicPayRunId', 'isAutoCalculatedBackPayLine' => 'isAutoCalculatedBackPayLine', + 'isAutoGeneratedBasicPayLine' => 'isAutoGeneratedBasicPayLine', + 'isAutomaticBackPay' => 'isAutomaticBackPay', + 'isNetToGross' => 'isNetToGross', + 'isTaxable' => 'isTaxable', 'isZeroHoursTeachersBackPayLine' => 'isZeroHoursTeachersBackPayLine', - 'analysisCategoriesCodes' => 'analysisCategoriesCodes', - 'analysisCategoryCodeIds' => 'analysisCategoryCodeIds', - 'paySpineId' => 'paySpineId', - 'paySpineGradeId' => 'paySpineGradeId', - 'spinalPointId' => 'spinalPointId', + 'leaveId' => 'leaveId', + 'leaveStatutoryDaysPaid' => 'leaveStatutoryDaysPaid', + 'leaveStatutoryWeeksPaid' => 'leaveStatutoryWeeksPaid', + 'loanId' => 'loanId', 'londonAllowanceId' => 'londonAllowanceId', - 'fullTimeAnnualValue' => 'fullTimeAnnualValue', - 'paySpine' => 'paySpine', + 'multiplier' => 'multiplier', + 'netToGrossDiscrepancy' => 'netToGrossDiscrepancy', + 'parentId' => 'parentId', 'payGrade' => 'payGrade', - 'spinePoint' => 'spinePoint' + 'paySpine' => 'paySpine', + 'paySpineGradeId' => 'paySpineGradeId', + 'paySpineId' => 'paySpineId', + 'payrollCode' => 'payrollCode', + 'pensionId' => 'pensionId', + 'percentageOfEffectiveDays' => 'percentageOfEffectiveDays', + 'periodFrom' => 'periodFrom', + 'periodTo' => 'periodTo', + 'rate' => 'rate', + 'roleId' => 'roleId', + 'spinalPointId' => 'spinalPointId', + 'spinePoint' => 'spinePoint', + 'tags' => 'tags', + 'targetNetToGrossValue' => 'targetNetToGrossValue', + 'totalPaidDays' => 'totalPaidDays', + 'totalWorkingDays' => 'totalWorkingDays', + 'value' => 'value' ]; /** @@ -388,60 +404,64 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'value' => 'setValue', - 'rate' => 'setRate', - 'multiplier' => 'setMultiplier', - 'description' => 'setDescription', + 'analysisCategoriesCodes' => 'setAnalysisCategoriesCodes', + 'analysisCategoryCodeIds' => 'setAnalysisCategoryCodeIds', + 'annualValue' => 'setAnnualValue', 'attachmentOrderId' => 'setAttachmentOrderId', - 'pensionId' => 'setPensionId', - 'leaveId' => 'setLeaveId', - 'loanId' => 'setLoanId', - 'leaveStatutoryDaysPaid' => 'setLeaveStatutoryDaysPaid', - 'leaveStatutoryWeeksPaid' => 'setLeaveStatutoryWeeksPaid', - 'code' => 'setCode', - 'tags' => 'setTags', + 'autoAdjustForLeave' => 'setAutoAdjustForLeave', + 'benefitId' => 'setBenefitId', + 'calculateAsWhenPaid' => 'setCalculateAsWhenPaid', 'childId' => 'setChildId', - 'isNetToGross' => 'setIsNetToGross', - 'targetNetToGrossValue' => 'setTargetNetToGrossValue', - 'netToGrossDiscrepancy' => 'setNetToGrossDiscrepancy', - 'effectiveFrom' => 'setEffectiveFrom', - 'effectiveTo' => 'setEffectiveTo', - 'department' => 'setDepartment', - 'departmentTitle' => 'setDepartmentTitle', + 'code' => 'setCode', + 'contributesToBasicPay' => 'setContributesToBasicPay', 'costCentre' => 'setCostCentre', + 'costCentreId' => 'setCostCentreId', 'costCentreTitle' => 'setCostCentreTitle', + 'department' => 'setDepartment', 'departmentId' => 'setDepartmentId', - 'costCentreId' => 'setCostCentreId', - 'isAutoGeneratedBasicPayLine' => 'setIsAutoGeneratedBasicPayLine', - 'percentageOfEffectiveDays' => 'setPercentageOfEffectiveDays', - 'totalWorkingDays' => 'setTotalWorkingDays', - 'isAutomaticBackPay' => 'setIsAutomaticBackPay', - 'ignoreInitialBackPay' => 'setIgnoreInitialBackPay', - 'initialBackPayPublicPayRunId' => 'setInitialBackPayPublicPayRunId', - 'autoAdjustForLeave' => 'setAutoAdjustForLeave', - 'contributesToBasicPay' => 'setContributesToBasicPay', - 'calculateAsWhenPaid' => 'setCalculateAsWhenPaid', - 'totalPaidDays' => 'setTotalPaidDays', - 'roleId' => 'setRoleId', - 'employeeRoleReference' => 'setEmployeeRoleReference', + 'departmentTitle' => 'setDepartmentTitle', + 'description' => 'setDescription', 'earnedFrom' => 'setEarnedFrom', 'earnedTo' => 'setEarnedTo', - 'periodFrom' => 'setPeriodFrom', - 'periodTo' => 'setPeriodTo', - 'annualValue' => 'setAnnualValue', - 'parentId' => 'setParentId', + 'effectiveFrom' => 'setEffectiveFrom', + 'effectiveTo' => 'setEffectiveTo', + 'employeeRoleReference' => 'setEmployeeRoleReference', + 'fullTimeAnnualValue' => 'setFullTimeAnnualValue', + 'ignoreInitialBackPay' => 'setIgnoreInitialBackPay', + 'importIdempotencyKey' => 'setImportIdempotencyKey', + 'initialBackPayPublicPayRunId' => 'setInitialBackPayPublicPayRunId', 'isAutoCalculatedBackPayLine' => 'setIsAutoCalculatedBackPayLine', + 'isAutoGeneratedBasicPayLine' => 'setIsAutoGeneratedBasicPayLine', + 'isAutomaticBackPay' => 'setIsAutomaticBackPay', + 'isNetToGross' => 'setIsNetToGross', + 'isTaxable' => 'setIsTaxable', 'isZeroHoursTeachersBackPayLine' => 'setIsZeroHoursTeachersBackPayLine', - 'analysisCategoriesCodes' => 'setAnalysisCategoriesCodes', - 'analysisCategoryCodeIds' => 'setAnalysisCategoryCodeIds', - 'paySpineId' => 'setPaySpineId', - 'paySpineGradeId' => 'setPaySpineGradeId', - 'spinalPointId' => 'setSpinalPointId', + 'leaveId' => 'setLeaveId', + 'leaveStatutoryDaysPaid' => 'setLeaveStatutoryDaysPaid', + 'leaveStatutoryWeeksPaid' => 'setLeaveStatutoryWeeksPaid', + 'loanId' => 'setLoanId', 'londonAllowanceId' => 'setLondonAllowanceId', - 'fullTimeAnnualValue' => 'setFullTimeAnnualValue', - 'paySpine' => 'setPaySpine', + 'multiplier' => 'setMultiplier', + 'netToGrossDiscrepancy' => 'setNetToGrossDiscrepancy', + 'parentId' => 'setParentId', 'payGrade' => 'setPayGrade', - 'spinePoint' => 'setSpinePoint' + 'paySpine' => 'setPaySpine', + 'paySpineGradeId' => 'setPaySpineGradeId', + 'paySpineId' => 'setPaySpineId', + 'payrollCode' => 'setPayrollCode', + 'pensionId' => 'setPensionId', + 'percentageOfEffectiveDays' => 'setPercentageOfEffectiveDays', + 'periodFrom' => 'setPeriodFrom', + 'periodTo' => 'setPeriodTo', + 'rate' => 'setRate', + 'roleId' => 'setRoleId', + 'spinalPointId' => 'setSpinalPointId', + 'spinePoint' => 'setSpinePoint', + 'tags' => 'setTags', + 'targetNetToGrossValue' => 'setTargetNetToGrossValue', + 'totalPaidDays' => 'setTotalPaidDays', + 'totalWorkingDays' => 'setTotalWorkingDays', + 'value' => 'setValue' ]; /** @@ -450,60 +470,64 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'value' => 'getValue', - 'rate' => 'getRate', - 'multiplier' => 'getMultiplier', - 'description' => 'getDescription', + 'analysisCategoriesCodes' => 'getAnalysisCategoriesCodes', + 'analysisCategoryCodeIds' => 'getAnalysisCategoryCodeIds', + 'annualValue' => 'getAnnualValue', 'attachmentOrderId' => 'getAttachmentOrderId', - 'pensionId' => 'getPensionId', - 'leaveId' => 'getLeaveId', - 'loanId' => 'getLoanId', - 'leaveStatutoryDaysPaid' => 'getLeaveStatutoryDaysPaid', - 'leaveStatutoryWeeksPaid' => 'getLeaveStatutoryWeeksPaid', - 'code' => 'getCode', - 'tags' => 'getTags', + 'autoAdjustForLeave' => 'getAutoAdjustForLeave', + 'benefitId' => 'getBenefitId', + 'calculateAsWhenPaid' => 'getCalculateAsWhenPaid', 'childId' => 'getChildId', - 'isNetToGross' => 'getIsNetToGross', - 'targetNetToGrossValue' => 'getTargetNetToGrossValue', - 'netToGrossDiscrepancy' => 'getNetToGrossDiscrepancy', - 'effectiveFrom' => 'getEffectiveFrom', - 'effectiveTo' => 'getEffectiveTo', - 'department' => 'getDepartment', - 'departmentTitle' => 'getDepartmentTitle', + 'code' => 'getCode', + 'contributesToBasicPay' => 'getContributesToBasicPay', 'costCentre' => 'getCostCentre', + 'costCentreId' => 'getCostCentreId', 'costCentreTitle' => 'getCostCentreTitle', + 'department' => 'getDepartment', 'departmentId' => 'getDepartmentId', - 'costCentreId' => 'getCostCentreId', - 'isAutoGeneratedBasicPayLine' => 'getIsAutoGeneratedBasicPayLine', - 'percentageOfEffectiveDays' => 'getPercentageOfEffectiveDays', - 'totalWorkingDays' => 'getTotalWorkingDays', - 'isAutomaticBackPay' => 'getIsAutomaticBackPay', - 'ignoreInitialBackPay' => 'getIgnoreInitialBackPay', - 'initialBackPayPublicPayRunId' => 'getInitialBackPayPublicPayRunId', - 'autoAdjustForLeave' => 'getAutoAdjustForLeave', - 'contributesToBasicPay' => 'getContributesToBasicPay', - 'calculateAsWhenPaid' => 'getCalculateAsWhenPaid', - 'totalPaidDays' => 'getTotalPaidDays', - 'roleId' => 'getRoleId', - 'employeeRoleReference' => 'getEmployeeRoleReference', + 'departmentTitle' => 'getDepartmentTitle', + 'description' => 'getDescription', 'earnedFrom' => 'getEarnedFrom', 'earnedTo' => 'getEarnedTo', - 'periodFrom' => 'getPeriodFrom', - 'periodTo' => 'getPeriodTo', - 'annualValue' => 'getAnnualValue', - 'parentId' => 'getParentId', + 'effectiveFrom' => 'getEffectiveFrom', + 'effectiveTo' => 'getEffectiveTo', + 'employeeRoleReference' => 'getEmployeeRoleReference', + 'fullTimeAnnualValue' => 'getFullTimeAnnualValue', + 'ignoreInitialBackPay' => 'getIgnoreInitialBackPay', + 'importIdempotencyKey' => 'getImportIdempotencyKey', + 'initialBackPayPublicPayRunId' => 'getInitialBackPayPublicPayRunId', 'isAutoCalculatedBackPayLine' => 'getIsAutoCalculatedBackPayLine', + 'isAutoGeneratedBasicPayLine' => 'getIsAutoGeneratedBasicPayLine', + 'isAutomaticBackPay' => 'getIsAutomaticBackPay', + 'isNetToGross' => 'getIsNetToGross', + 'isTaxable' => 'getIsTaxable', 'isZeroHoursTeachersBackPayLine' => 'getIsZeroHoursTeachersBackPayLine', - 'analysisCategoriesCodes' => 'getAnalysisCategoriesCodes', - 'analysisCategoryCodeIds' => 'getAnalysisCategoryCodeIds', - 'paySpineId' => 'getPaySpineId', - 'paySpineGradeId' => 'getPaySpineGradeId', - 'spinalPointId' => 'getSpinalPointId', + 'leaveId' => 'getLeaveId', + 'leaveStatutoryDaysPaid' => 'getLeaveStatutoryDaysPaid', + 'leaveStatutoryWeeksPaid' => 'getLeaveStatutoryWeeksPaid', + 'loanId' => 'getLoanId', 'londonAllowanceId' => 'getLondonAllowanceId', - 'fullTimeAnnualValue' => 'getFullTimeAnnualValue', - 'paySpine' => 'getPaySpine', + 'multiplier' => 'getMultiplier', + 'netToGrossDiscrepancy' => 'getNetToGrossDiscrepancy', + 'parentId' => 'getParentId', 'payGrade' => 'getPayGrade', - 'spinePoint' => 'getSpinePoint' + 'paySpine' => 'getPaySpine', + 'paySpineGradeId' => 'getPaySpineGradeId', + 'paySpineId' => 'getPaySpineId', + 'payrollCode' => 'getPayrollCode', + 'pensionId' => 'getPensionId', + 'percentageOfEffectiveDays' => 'getPercentageOfEffectiveDays', + 'periodFrom' => 'getPeriodFrom', + 'periodTo' => 'getPeriodTo', + 'rate' => 'getRate', + 'roleId' => 'getRoleId', + 'spinalPointId' => 'getSpinalPointId', + 'spinePoint' => 'getSpinePoint', + 'tags' => 'getTags', + 'targetNetToGrossValue' => 'getTargetNetToGrossValue', + 'totalPaidDays' => 'getTotalPaidDays', + 'totalWorkingDays' => 'getTotalWorkingDays', + 'value' => 'getValue' ]; /** @@ -562,60 +586,64 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('value', $data ?? [], null); - $this->setIfExists('rate', $data ?? [], null); - $this->setIfExists('multiplier', $data ?? [], null); - $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('analysisCategoriesCodes', $data ?? [], null); + $this->setIfExists('analysisCategoryCodeIds', $data ?? [], null); + $this->setIfExists('annualValue', $data ?? [], null); $this->setIfExists('attachmentOrderId', $data ?? [], null); - $this->setIfExists('pensionId', $data ?? [], null); - $this->setIfExists('leaveId', $data ?? [], null); - $this->setIfExists('loanId', $data ?? [], null); - $this->setIfExists('leaveStatutoryDaysPaid', $data ?? [], null); - $this->setIfExists('leaveStatutoryWeeksPaid', $data ?? [], null); - $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('autoAdjustForLeave', $data ?? [], null); + $this->setIfExists('benefitId', $data ?? [], null); + $this->setIfExists('calculateAsWhenPaid', $data ?? [], null); $this->setIfExists('childId', $data ?? [], null); - $this->setIfExists('isNetToGross', $data ?? [], null); - $this->setIfExists('targetNetToGrossValue', $data ?? [], null); - $this->setIfExists('netToGrossDiscrepancy', $data ?? [], null); - $this->setIfExists('effectiveFrom', $data ?? [], null); - $this->setIfExists('effectiveTo', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); - $this->setIfExists('departmentTitle', $data ?? [], null); + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('contributesToBasicPay', $data ?? [], null); $this->setIfExists('costCentre', $data ?? [], null); + $this->setIfExists('costCentreId', $data ?? [], null); $this->setIfExists('costCentreTitle', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); $this->setIfExists('departmentId', $data ?? [], null); - $this->setIfExists('costCentreId', $data ?? [], null); - $this->setIfExists('isAutoGeneratedBasicPayLine', $data ?? [], null); - $this->setIfExists('percentageOfEffectiveDays', $data ?? [], null); - $this->setIfExists('totalWorkingDays', $data ?? [], null); - $this->setIfExists('isAutomaticBackPay', $data ?? [], null); - $this->setIfExists('ignoreInitialBackPay', $data ?? [], null); - $this->setIfExists('initialBackPayPublicPayRunId', $data ?? [], null); - $this->setIfExists('autoAdjustForLeave', $data ?? [], null); - $this->setIfExists('contributesToBasicPay', $data ?? [], null); - $this->setIfExists('calculateAsWhenPaid', $data ?? [], null); - $this->setIfExists('totalPaidDays', $data ?? [], null); - $this->setIfExists('roleId', $data ?? [], null); - $this->setIfExists('employeeRoleReference', $data ?? [], null); + $this->setIfExists('departmentTitle', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); $this->setIfExists('earnedFrom', $data ?? [], null); $this->setIfExists('earnedTo', $data ?? [], null); - $this->setIfExists('periodFrom', $data ?? [], null); - $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('annualValue', $data ?? [], null); - $this->setIfExists('parentId', $data ?? [], null); + $this->setIfExists('effectiveFrom', $data ?? [], null); + $this->setIfExists('effectiveTo', $data ?? [], null); + $this->setIfExists('employeeRoleReference', $data ?? [], null); + $this->setIfExists('fullTimeAnnualValue', $data ?? [], null); + $this->setIfExists('ignoreInitialBackPay', $data ?? [], null); + $this->setIfExists('importIdempotencyKey', $data ?? [], null); + $this->setIfExists('initialBackPayPublicPayRunId', $data ?? [], null); $this->setIfExists('isAutoCalculatedBackPayLine', $data ?? [], null); + $this->setIfExists('isAutoGeneratedBasicPayLine', $data ?? [], null); + $this->setIfExists('isAutomaticBackPay', $data ?? [], null); + $this->setIfExists('isNetToGross', $data ?? [], null); + $this->setIfExists('isTaxable', $data ?? [], null); $this->setIfExists('isZeroHoursTeachersBackPayLine', $data ?? [], null); - $this->setIfExists('analysisCategoriesCodes', $data ?? [], null); - $this->setIfExists('analysisCategoryCodeIds', $data ?? [], null); - $this->setIfExists('paySpineId', $data ?? [], null); - $this->setIfExists('paySpineGradeId', $data ?? [], null); - $this->setIfExists('spinalPointId', $data ?? [], null); + $this->setIfExists('leaveId', $data ?? [], null); + $this->setIfExists('leaveStatutoryDaysPaid', $data ?? [], null); + $this->setIfExists('leaveStatutoryWeeksPaid', $data ?? [], null); + $this->setIfExists('loanId', $data ?? [], null); $this->setIfExists('londonAllowanceId', $data ?? [], null); - $this->setIfExists('fullTimeAnnualValue', $data ?? [], null); - $this->setIfExists('paySpine', $data ?? [], null); + $this->setIfExists('multiplier', $data ?? [], null); + $this->setIfExists('netToGrossDiscrepancy', $data ?? [], null); + $this->setIfExists('parentId', $data ?? [], null); $this->setIfExists('payGrade', $data ?? [], null); + $this->setIfExists('paySpine', $data ?? [], null); + $this->setIfExists('paySpineGradeId', $data ?? [], null); + $this->setIfExists('paySpineId', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('pensionId', $data ?? [], null); + $this->setIfExists('percentageOfEffectiveDays', $data ?? [], null); + $this->setIfExists('periodFrom', $data ?? [], null); + $this->setIfExists('periodTo', $data ?? [], null); + $this->setIfExists('rate', $data ?? [], null); + $this->setIfExists('roleId', $data ?? [], null); + $this->setIfExists('spinalPointId', $data ?? [], null); $this->setIfExists('spinePoint', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('targetNetToGrossValue', $data ?? [], null); + $this->setIfExists('totalPaidDays', $data ?? [], null); + $this->setIfExists('totalWorkingDays', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -665,528 +693,623 @@ public function valid(): bool /** - * Gets value + * Gets analysisCategoriesCodes * - * @return float|null + * @return \SynergiTech\Staffology\Model\AnalysisCategoryCodes[]|null */ - public function getValue(): ?float + public function getAnalysisCategoriesCodes(): ?array { - return $this->container['value']; + return $this->container['analysisCategoriesCodes']; } /** - * Sets value + * Sets analysisCategoriesCodes * - * @param float|null $value The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used). If the PayCode has a CalculationType other than FixedAmount then this field will be a percentage. If the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated. + * @param \SynergiTech\Staffology\Model\AnalysisCategoryCodes[]|null $analysisCategoriesCodes List of analysis Category Codes * * @return $this */ - public function setValue(?float $value): static + public function setAnalysisCategoriesCodes(?array $analysisCategoriesCodes): static { - if (is_null($value)) { - throw new InvalidArgumentException('non-nullable value cannot be null'); + if (is_null($analysisCategoriesCodes)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoriesCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('analysisCategoriesCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['value'] = $value; + $this->container['analysisCategoriesCodes'] = $analysisCategoriesCodes; return $this; } /** - * Gets rate + * Gets analysisCategoryCodeIds * - * @return float|null + * @return string[]|null */ - public function getRate(): ?float + public function getAnalysisCategoryCodeIds(): ?array { - return $this->container['rate']; + return $this->container['analysisCategoryCodeIds']; } /** - * Sets rate + * Sets analysisCategoryCodeIds * - * @param float|null $rate If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used + * @param string[]|null $analysisCategoryCodeIds List of analysis Category Codes uniqueId * * @return $this */ - public function setRate(?float $rate): static + public function setAnalysisCategoryCodeIds(?array $analysisCategoryCodeIds): static { - if (is_null($rate)) { - array_push($this->openAPINullablesSetToNull, 'rate'); + if (is_null($analysisCategoryCodeIds)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodeIds'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('rate', $nullablesSetToNull); + $index = array_search('analysisCategoryCodeIds', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['rate'] = $rate; + $this->container['analysisCategoryCodeIds'] = $analysisCategoryCodeIds; return $this; } /** - * Gets multiplier + * Gets annualValue * * @return float|null */ - public function getMultiplier(): ?float + public function getAnnualValue(): ?float { - return $this->container['multiplier']; + return $this->container['annualValue']; } /** - * Sets multiplier + * Sets annualValue * - * @param float|null $multiplier If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours + * @param float|null $annualValue The original value from the PayLine before we modify it Currently only used when CalculationType is set to FixedAnnualAmount so we can determine whether the pay line value needs calculating or not To recalculate set to null with annual amount recorded in Value * * @return $this */ - public function setMultiplier(?float $multiplier): static + public function setAnnualValue(?float $annualValue): static { - if (is_null($multiplier)) { - array_push($this->openAPINullablesSetToNull, 'multiplier'); + if (is_null($annualValue)) { + array_push($this->openAPINullablesSetToNull, 'annualValue'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('multiplier', $nullablesSetToNull); + $index = array_search('annualValue', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['multiplier'] = $multiplier; + $this->container['annualValue'] = $annualValue; return $this; } /** - * Gets description + * Gets attachmentOrderId * * @return string|null */ - public function getDescription(): ?string + public function getAttachmentOrderId(): ?string { - return $this->container['description']; + return $this->container['attachmentOrderId']; } /** - * Sets description + * Sets attachmentOrderId * - * @param string|null $description A free form description to accompany this line. It will be displayed on the payslip. + * @param string|null $attachmentOrderId [readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO * * @return $this */ - public function setDescription(?string $description): static + public function setAttachmentOrderId(?string $attachmentOrderId): static { - if (is_null($description)) { - array_push($this->openAPINullablesSetToNull, 'description'); + if (is_null($attachmentOrderId)) { + array_push($this->openAPINullablesSetToNull, 'attachmentOrderId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('description', $nullablesSetToNull); + $index = array_search('attachmentOrderId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($description) && (mb_strlen($description) > 100)) { - throw new InvalidArgumentException('invalid length for $description when calling PayLine., must be smaller than or equal to 100.'); - } + $this->container['attachmentOrderId'] = $attachmentOrderId; - $this->container['description'] = $description; + return $this; + } + + /** + * Gets autoAdjustForLeave + * + * @return bool|null + */ + public function getAutoAdjustForLeave(): ?bool + { + return $this->container['autoAdjustForLeave']; + } + + /** + * Sets autoAdjustForLeave + * + * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun + * + * @return $this + */ + public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static + { + if (is_null($autoAdjustForLeave)) { + throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); + } + $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; return $this; } /** - * Gets attachmentOrderId + * Gets benefitId * - * @return string|null + * @return int|null */ - public function getAttachmentOrderId(): ?string + public function getBenefitId(): ?int { - return $this->container['attachmentOrderId']; + return $this->container['benefitId']; } /** - * Sets attachmentOrderId + * Sets benefitId * - * @param string|null $attachmentOrderId [readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO + * @param int|null $benefitId benefitId * * @return $this */ - public function setAttachmentOrderId(?string $attachmentOrderId): static + public function setBenefitId(?int $benefitId): static { - if (is_null($attachmentOrderId)) { - array_push($this->openAPINullablesSetToNull, 'attachmentOrderId'); + if (is_null($benefitId)) { + array_push($this->openAPINullablesSetToNull, 'benefitId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('attachmentOrderId', $nullablesSetToNull); + $index = array_search('benefitId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['attachmentOrderId'] = $attachmentOrderId; + $this->container['benefitId'] = $benefitId; return $this; } /** - * Gets pensionId + * Gets calculateAsWhenPaid + * + * @return bool|null + */ + public function getCalculateAsWhenPaid(): ?bool + { + return $this->container['calculateAsWhenPaid']; + } + + /** + * Sets calculateAsWhenPaid + * + * @param bool|null $calculateAsWhenPaid Indicates whether this pay line should be treated as When Paid rather than When Earned + * + * @return $this + */ + public function setCalculateAsWhenPaid(?bool $calculateAsWhenPaid): static + { + if (is_null($calculateAsWhenPaid)) { + throw new InvalidArgumentException('non-nullable calculateAsWhenPaid cannot be null'); + } + $this->container['calculateAsWhenPaid'] = $calculateAsWhenPaid; + + return $this; + } + + /** + * Gets childId * * @return string|null */ - public function getPensionId(): ?string + public function getChildId(): ?string { - return $this->container['pensionId']; + return $this->container['childId']; } /** - * Sets pensionId + * Sets childId * - * @param string|null $pensionId [readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS + * @param string|null $childId This is nothing but the UniqueId of the model. * * @return $this */ - public function setPensionId(?string $pensionId): static + public function setChildId(?string $childId): static + { + if (is_null($childId)) { + throw new InvalidArgumentException('non-nullable childId cannot be null'); + } + $this->container['childId'] = $childId; + + return $this; + } + + /** + * Gets code + * + * @return string|null + */ + public function getCode(): ?string + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition. + * + * @return $this + */ + public function setCode(?string $code): static { - if (is_null($pensionId)) { - array_push($this->openAPINullablesSetToNull, 'pensionId'); + if (is_null($code)) { + array_push($this->openAPINullablesSetToNull, 'code'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionId', $nullablesSetToNull); + $index = array_search('code', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionId'] = $pensionId; + $this->container['code'] = $code; return $this; } /** - * Gets leaveId + * Gets contributesToBasicPay * - * @return string|null + * @return bool|null */ - public function getLeaveId(): ?string + public function getContributesToBasicPay(): ?bool { - return $this->container['leaveId']; + return $this->container['contributesToBasicPay']; } /** - * Sets leaveId + * Sets contributesToBasicPay * - * @param string|null $leaveId [readonly] The Id of the associated Leave. Only included if the PayLine is a result of a Leave with Statutory pay + * @param bool|null $contributesToBasicPay Indicates whether this pay line contributes to the basic pay of the employee. Will be set to true by default when IsAutoGeneratedBasicPayLine is true. * * @return $this */ - public function setLeaveId(?string $leaveId): static + public function setContributesToBasicPay(?bool $contributesToBasicPay): static { - if (is_null($leaveId)) { - array_push($this->openAPINullablesSetToNull, 'leaveId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('leaveId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($contributesToBasicPay)) { + throw new InvalidArgumentException('non-nullable contributesToBasicPay cannot be null'); } - $this->container['leaveId'] = $leaveId; + $this->container['contributesToBasicPay'] = $contributesToBasicPay; return $this; } /** - * Gets loanId + * Gets costCentre * * @return string|null */ - public function getLoanId(): ?string + public function getCostCentre(): ?string { - return $this->container['loanId']; + return $this->container['costCentre']; } /** - * Sets loanId + * Sets costCentre * - * @param string|null $loanId [readonly] The Id of the associated Loan, if any. + * @param string|null $costCentre costCentre * * @return $this */ - public function setLoanId(?string $loanId): static + public function setCostCentre(?string $costCentre): static { - if (is_null($loanId)) { - array_push($this->openAPINullablesSetToNull, 'loanId'); + if (is_null($costCentre)) { + array_push($this->openAPINullablesSetToNull, 'costCentre'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('loanId', $nullablesSetToNull); + $index = array_search('costCentre', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['loanId'] = $loanId; + $this->container['costCentre'] = $costCentre; return $this; } /** - * Gets leaveStatutoryDaysPaid + * Gets costCentreId * - * @return float|null + * @return string|null */ - public function getLeaveStatutoryDaysPaid(): ?float + public function getCostCentreId(): ?string { - return $this->container['leaveStatutoryDaysPaid']; + return $this->container['costCentreId']; } /** - * Sets leaveStatutoryDaysPaid + * Sets costCentreId * - * @param float|null $leaveStatutoryDaysPaid [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many days they've been paid for (based on their Working Pattern). + * @param string|null $costCentreId costCentreId * * @return $this */ - public function setLeaveStatutoryDaysPaid(?float $leaveStatutoryDaysPaid): static + public function setCostCentreId(?string $costCentreId): static { - if (is_null($leaveStatutoryDaysPaid)) { - array_push($this->openAPINullablesSetToNull, 'leaveStatutoryDaysPaid'); + if (is_null($costCentreId)) { + array_push($this->openAPINullablesSetToNull, 'costCentreId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('leaveStatutoryDaysPaid', $nullablesSetToNull); + $index = array_search('costCentreId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['leaveStatutoryDaysPaid'] = $leaveStatutoryDaysPaid; + $this->container['costCentreId'] = $costCentreId; return $this; } /** - * Gets leaveStatutoryWeeksPaid + * Gets costCentreTitle * - * @return float|null + * @return string|null */ - public function getLeaveStatutoryWeeksPaid(): ?float + public function getCostCentreTitle(): ?string { - return $this->container['leaveStatutoryWeeksPaid']; + return $this->container['costCentreTitle']; } /** - * Sets leaveStatutoryWeeksPaid + * Sets costCentreTitle * - * @param float|null $leaveStatutoryWeeksPaid [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many weeks they've been paid for (based on their Working Pattern). + * @param string|null $costCentreTitle costCentreTitle * * @return $this */ - public function setLeaveStatutoryWeeksPaid(?float $leaveStatutoryWeeksPaid): static + public function setCostCentreTitle(?string $costCentreTitle): static { - if (is_null($leaveStatutoryWeeksPaid)) { - array_push($this->openAPINullablesSetToNull, 'leaveStatutoryWeeksPaid'); + if (is_null($costCentreTitle)) { + array_push($this->openAPINullablesSetToNull, 'costCentreTitle'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('leaveStatutoryWeeksPaid', $nullablesSetToNull); + $index = array_search('costCentreTitle', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['leaveStatutoryWeeksPaid'] = $leaveStatutoryWeeksPaid; + $this->container['costCentreTitle'] = $costCentreTitle; return $this; } /** - * Gets code + * Gets department * * @return string|null */ - public function getCode(): ?string + public function getDepartment(): ?string { - return $this->container['code']; + return $this->container['department']; } /** - * Sets code + * Sets department * - * @param string|null $code The Code of the PayCode this line is assigned to. The PayCode determines the treatment of this line when it comes to NI, Tax and Pensions as well as whether it's a deduction or addition. + * @param string|null $department department * * @return $this */ - public function setCode(?string $code): static + public function setDepartment(?string $department): static { - if (is_null($code)) { - array_push($this->openAPINullablesSetToNull, 'code'); + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('code', $nullablesSetToNull); + $index = array_search('department', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['code'] = $code; + $this->container['department'] = $department; return $this; } /** - * Gets tags + * Gets departmentId * - * @return string[]|null + * @return string|null */ - public function getTags(): ?array + public function getDepartmentId(): ?string { - return $this->container['tags']; + return $this->container['departmentId']; } /** - * Sets tags + * Sets departmentId * - * @param string[]|null $tags tags + * @param string|null $departmentId departmentId * * @return $this */ - public function setTags(?array $tags): static + public function setDepartmentId(?string $departmentId): static { - if (is_null($tags)) { - array_push($this->openAPINullablesSetToNull, 'tags'); + if (is_null($departmentId)) { + array_push($this->openAPINullablesSetToNull, 'departmentId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tags', $nullablesSetToNull); + $index = array_search('departmentId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tags'] = $tags; + $this->container['departmentId'] = $departmentId; return $this; } /** - * Gets childId + * Gets departmentTitle * * @return string|null */ - public function getChildId(): ?string + public function getDepartmentTitle(): ?string { - return $this->container['childId']; + return $this->container['departmentTitle']; } /** - * Sets childId + * Sets departmentTitle * - * @param string|null $childId This is nothing but the UniqueId of the model. + * @param string|null $departmentTitle departmentTitle * * @return $this */ - public function setChildId(?string $childId): static + public function setDepartmentTitle(?string $departmentTitle): static { - if (is_null($childId)) { - throw new InvalidArgumentException('non-nullable childId cannot be null'); + if (is_null($departmentTitle)) { + array_push($this->openAPINullablesSetToNull, 'departmentTitle'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('departmentTitle', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['childId'] = $childId; + $this->container['departmentTitle'] = $departmentTitle; return $this; } /** - * Gets isNetToGross + * Gets description * - * @return bool|null + * @return string|null */ - public function getIsNetToGross(): ?bool + public function getDescription(): ?string { - return $this->container['isNetToGross']; + return $this->container['description']; } /** - * Sets isNetToGross + * Sets description * - * @param bool|null $isNetToGross If the PayLine is a fixed amount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. + * @param string|null $description A free form description to accompany this line. It will be displayed on the payslip. * * @return $this */ - public function setIsNetToGross(?bool $isNetToGross): static + public function setDescription(?string $description): static { - if (is_null($isNetToGross)) { - throw new InvalidArgumentException('non-nullable isNetToGross cannot be null'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('description', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isNetToGross'] = $isNetToGross; + if (!is_null($description) && (mb_strlen($description) > 100)) { + throw new InvalidArgumentException('invalid length for $description when calling PayLine., must be smaller than or equal to 100.'); + } + + $this->container['description'] = $description; return $this; } /** - * Gets targetNetToGrossValue + * Gets earnedFrom * - * @return float|null + * @return \DateTime|null */ - public function getTargetNetToGrossValue(): ?float + public function getEarnedFrom(): ?\DateTime { - return $this->container['targetNetToGrossValue']; + return $this->container['earnedFrom']; } /** - * Sets targetNetToGrossValue + * Sets earnedFrom * - * @param float|null $targetNetToGrossValue The original net fixed addition amount that is considered to be a take home pay target. + * @param \DateTime|null $earnedFrom Nullable DateTime property \"EarnedFrom\" in the PayLine model to store the start date of the PayLine's 'earned' period in a PayRun. * * @return $this */ - public function setTargetNetToGrossValue(?float $targetNetToGrossValue): static + public function setEarnedFrom(?\DateTime $earnedFrom): static { - if (is_null($targetNetToGrossValue)) { - array_push($this->openAPINullablesSetToNull, 'targetNetToGrossValue'); + if (is_null($earnedFrom)) { + array_push($this->openAPINullablesSetToNull, 'earnedFrom'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('targetNetToGrossValue', $nullablesSetToNull); + $index = array_search('earnedFrom', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['targetNetToGrossValue'] = $targetNetToGrossValue; + $this->container['earnedFrom'] = $earnedFrom; return $this; } /** - * Gets netToGrossDiscrepancy + * Gets earnedTo * - * @return float|null + * @return \DateTime|null */ - public function getNetToGrossDiscrepancy(): ?float + public function getEarnedTo(): ?\DateTime { - return $this->container['netToGrossDiscrepancy']; + return $this->container['earnedTo']; } /** - * Sets netToGrossDiscrepancy + * Sets earnedTo * - * @param float|null $netToGrossDiscrepancy The discrepancy between the targeted and the calculated grossed up value during a net to gross calculation. + * @param \DateTime|null $earnedTo Nullable DateTime property \"EarnedTo\" in the PayLine model to store the end date of the PayLine's 'earned' period in a PayRun. * * @return $this */ - public function setNetToGrossDiscrepancy(?float $netToGrossDiscrepancy): static + public function setEarnedTo(?\DateTime $earnedTo): static { - if (is_null($netToGrossDiscrepancy)) { - array_push($this->openAPINullablesSetToNull, 'netToGrossDiscrepancy'); + if (is_null($earnedTo)) { + array_push($this->openAPINullablesSetToNull, 'earnedTo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('netToGrossDiscrepancy', $nullablesSetToNull); + $index = array_search('earnedTo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['netToGrossDiscrepancy'] = $netToGrossDiscrepancy; + $this->container['earnedTo'] = $earnedTo; return $this; } @@ -1260,205 +1383,184 @@ public function setEffectiveTo(?\DateTime $effectiveTo): static } /** - * Gets department + * Gets employeeRoleReference * * @return string|null */ - public function getDepartment(): ?string + public function getEmployeeRoleReference(): ?string { - return $this->container['department']; + return $this->container['employeeRoleReference']; } /** - * Sets department + * Sets employeeRoleReference * - * @param string|null $department department + * @param string|null $employeeRoleReference employeeRoleReference * * @return $this */ - public function setDepartment(?string $department): static - { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); + public function setEmployeeRoleReference(?string $employeeRoleReference): static + { + if (is_null($employeeRoleReference)) { + array_push($this->openAPINullablesSetToNull, 'employeeRoleReference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); + $index = array_search('employeeRoleReference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['department'] = $department; + $this->container['employeeRoleReference'] = $employeeRoleReference; return $this; } /** - * Gets departmentTitle + * Gets fullTimeAnnualValue * - * @return string|null + * @return float|null */ - public function getDepartmentTitle(): ?string + public function getFullTimeAnnualValue(): ?float { - return $this->container['departmentTitle']; + return $this->container['fullTimeAnnualValue']; } /** - * Sets departmentTitle + * Sets fullTimeAnnualValue * - * @param string|null $departmentTitle departmentTitle + * @param float|null $fullTimeAnnualValue Used to set Full Time Annual Value for payline * * @return $this */ - public function setDepartmentTitle(?string $departmentTitle): static + public function setFullTimeAnnualValue(?float $fullTimeAnnualValue): static { - if (is_null($departmentTitle)) { - array_push($this->openAPINullablesSetToNull, 'departmentTitle'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('departmentTitle', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($fullTimeAnnualValue)) { + throw new InvalidArgumentException('non-nullable fullTimeAnnualValue cannot be null'); } - $this->container['departmentTitle'] = $departmentTitle; + $this->container['fullTimeAnnualValue'] = $fullTimeAnnualValue; return $this; } /** - * Gets costCentre + * Gets ignoreInitialBackPay * - * @return string|null + * @return bool|null */ - public function getCostCentre(): ?string + public function getIgnoreInitialBackPay(): ?bool { - return $this->container['costCentre']; + return $this->container['ignoreInitialBackPay']; } /** - * Sets costCentre + * Sets ignoreInitialBackPay * - * @param string|null $costCentre costCentre + * @param bool|null $ignoreInitialBackPay Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology. If set to false, the automatic backpay calculation will be performed on the first pay run. * * @return $this */ - public function setCostCentre(?string $costCentre): static + public function setIgnoreInitialBackPay(?bool $ignoreInitialBackPay): static { - if (is_null($costCentre)) { - array_push($this->openAPINullablesSetToNull, 'costCentre'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costCentre', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($ignoreInitialBackPay)) { + throw new InvalidArgumentException('non-nullable ignoreInitialBackPay cannot be null'); } - $this->container['costCentre'] = $costCentre; + $this->container['ignoreInitialBackPay'] = $ignoreInitialBackPay; return $this; } /** - * Gets costCentreTitle + * Gets importIdempotencyKey * * @return string|null */ - public function getCostCentreTitle(): ?string + public function getImportIdempotencyKey(): ?string { - return $this->container['costCentreTitle']; + return $this->container['importIdempotencyKey']; } /** - * Sets costCentreTitle + * Sets importIdempotencyKey * - * @param string|null $costCentreTitle costCentreTitle + * @param string|null $importIdempotencyKey Deterministic GUID used for import idempotency tracking. Generated from: blobScope|employerUniqueId|payrollCode|lineIndex * * @return $this */ - public function setCostCentreTitle(?string $costCentreTitle): static + public function setImportIdempotencyKey(?string $importIdempotencyKey): static { - if (is_null($costCentreTitle)) { - array_push($this->openAPINullablesSetToNull, 'costCentreTitle'); + if (is_null($importIdempotencyKey)) { + array_push($this->openAPINullablesSetToNull, 'importIdempotencyKey'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costCentreTitle', $nullablesSetToNull); + $index = array_search('importIdempotencyKey', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costCentreTitle'] = $costCentreTitle; + $this->container['importIdempotencyKey'] = $importIdempotencyKey; return $this; } /** - * Gets departmentId + * Gets initialBackPayPublicPayRunId * * @return string|null */ - public function getDepartmentId(): ?string + public function getInitialBackPayPublicPayRunId(): ?string { - return $this->container['departmentId']; + return $this->container['initialBackPayPublicPayRunId']; } /** - * Sets departmentId + * Sets initialBackPayPublicPayRunId * - * @param string|null $departmentId departmentId + * @param string|null $initialBackPayPublicPayRunId Used to mark the first payrun where this payline has been payrolled for backpay * * @return $this */ - public function setDepartmentId(?string $departmentId): static + public function setInitialBackPayPublicPayRunId(?string $initialBackPayPublicPayRunId): static { - if (is_null($departmentId)) { - array_push($this->openAPINullablesSetToNull, 'departmentId'); + if (is_null($initialBackPayPublicPayRunId)) { + array_push($this->openAPINullablesSetToNull, 'initialBackPayPublicPayRunId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('departmentId', $nullablesSetToNull); + $index = array_search('initialBackPayPublicPayRunId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['departmentId'] = $departmentId; + $this->container['initialBackPayPublicPayRunId'] = $initialBackPayPublicPayRunId; return $this; } /** - * Gets costCentreId + * Gets isAutoCalculatedBackPayLine * - * @return string|null + * @return bool|null */ - public function getCostCentreId(): ?string + public function getIsAutoCalculatedBackPayLine(): ?bool { - return $this->container['costCentreId']; + return $this->container['isAutoCalculatedBackPayLine']; } /** - * Sets costCentreId + * Sets isAutoCalculatedBackPayLine * - * @param string|null $costCentreId costCentreId + * @param bool|null $isAutoCalculatedBackPayLine isAutoCalculatedBackPayLine * * @return $this */ - public function setCostCentreId(?string $costCentreId): static + public function setIsAutoCalculatedBackPayLine(?bool $isAutoCalculatedBackPayLine): static { - if (is_null($costCentreId)) { - array_push($this->openAPINullablesSetToNull, 'costCentreId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costCentreId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isAutoCalculatedBackPayLine)) { + throw new InvalidArgumentException('non-nullable isAutoCalculatedBackPayLine cannot be null'); } - $this->container['costCentreId'] = $costCentreId; + $this->container['isAutoCalculatedBackPayLine'] = $isAutoCalculatedBackPayLine; return $this; } @@ -1491,734 +1593,755 @@ public function setIsAutoGeneratedBasicPayLine(?bool $isAutoGeneratedBasicPayLin } /** - * Gets percentageOfEffectiveDays + * Gets isAutomaticBackPay * - * @return float|null + * @return bool|null */ - public function getPercentageOfEffectiveDays(): ?float + public function getIsAutomaticBackPay(): ?bool { - return $this->container['percentageOfEffectiveDays']; + return $this->container['isAutomaticBackPay']; } /** - * Sets percentageOfEffectiveDays + * Sets isAutomaticBackPay * - * @param float|null $percentageOfEffectiveDays The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun + * @param bool|null $isAutomaticBackPay Automatically calculate back pay and add or modify the necessary pay lines for this addition/deduction when a pay run is created. Applicable only to employee level addition/deduction pay lines. If set to false then you must manually handle the calculation and adding of back pay lines. * * @return $this */ - public function setPercentageOfEffectiveDays(?float $percentageOfEffectiveDays): static + public function setIsAutomaticBackPay(?bool $isAutomaticBackPay): static { - if (is_null($percentageOfEffectiveDays)) { - array_push($this->openAPINullablesSetToNull, 'percentageOfEffectiveDays'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('percentageOfEffectiveDays', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isAutomaticBackPay)) { + throw new InvalidArgumentException('non-nullable isAutomaticBackPay cannot be null'); } - $this->container['percentageOfEffectiveDays'] = $percentageOfEffectiveDays; + $this->container['isAutomaticBackPay'] = $isAutomaticBackPay; return $this; } /** - * Gets totalWorkingDays + * Gets isNetToGross * - * @return float|null + * @return bool|null */ - public function getTotalWorkingDays(): ?float + public function getIsNetToGross(): ?bool { - return $this->container['totalWorkingDays']; + return $this->container['isNetToGross']; } /** - * Sets totalWorkingDays + * Sets isNetToGross * - * @param float|null $totalWorkingDays totalWorkingDays + * @param bool|null $isNetToGross If the PayLine is a fixed amount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. * * @return $this */ - public function setTotalWorkingDays(?float $totalWorkingDays): static + public function setIsNetToGross(?bool $isNetToGross): static { - if (is_null($totalWorkingDays)) { - array_push($this->openAPINullablesSetToNull, 'totalWorkingDays'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalWorkingDays', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isNetToGross)) { + throw new InvalidArgumentException('non-nullable isNetToGross cannot be null'); } - $this->container['totalWorkingDays'] = $totalWorkingDays; + $this->container['isNetToGross'] = $isNetToGross; return $this; } /** - * Gets isAutomaticBackPay + * Gets isTaxable * * @return bool|null */ - public function getIsAutomaticBackPay(): ?bool + public function getIsTaxable(): ?bool { - return $this->container['isAutomaticBackPay']; + return $this->container['isTaxable']; } /** - * Sets isAutomaticBackPay + * Sets isTaxable * - * @param bool|null $isAutomaticBackPay Automatically calculate back pay and add or modify the necessary pay lines for this addition/deduction when a pay run is created. Applicable only to employee level addition/deduction pay lines. If set to false then you must manually handle the calculation and adding of back pay lines. + * @param bool|null $isTaxable isTaxable * * @return $this */ - public function setIsAutomaticBackPay(?bool $isAutomaticBackPay): static + public function setIsTaxable(?bool $isTaxable): static { - if (is_null($isAutomaticBackPay)) { - throw new InvalidArgumentException('non-nullable isAutomaticBackPay cannot be null'); + if (is_null($isTaxable)) { + throw new InvalidArgumentException('non-nullable isTaxable cannot be null'); } - $this->container['isAutomaticBackPay'] = $isAutomaticBackPay; + $this->container['isTaxable'] = $isTaxable; return $this; } /** - * Gets ignoreInitialBackPay + * Gets isZeroHoursTeachersBackPayLine * * @return bool|null */ - public function getIgnoreInitialBackPay(): ?bool + public function getIsZeroHoursTeachersBackPayLine(): ?bool { - return $this->container['ignoreInitialBackPay']; + return $this->container['isZeroHoursTeachersBackPayLine']; } /** - * Sets ignoreInitialBackPay + * Sets isZeroHoursTeachersBackPayLine * - * @param bool|null $ignoreInitialBackPay Skip the automatic backpay calculation on the first pay run, if the addition/deduction had been paid outside or Staffology. If set to false, the automatic backpay calculation will be performed on the first pay run. + * @param bool|null $isZeroHoursTeachersBackPayLine [readonly] Indicates whether this pay line is a backdated pay claim line belonging to a zero hours contract teacher. * * @return $this */ - public function setIgnoreInitialBackPay(?bool $ignoreInitialBackPay): static + public function setIsZeroHoursTeachersBackPayLine(?bool $isZeroHoursTeachersBackPayLine): static { - if (is_null($ignoreInitialBackPay)) { - throw new InvalidArgumentException('non-nullable ignoreInitialBackPay cannot be null'); + if (is_null($isZeroHoursTeachersBackPayLine)) { + throw new InvalidArgumentException('non-nullable isZeroHoursTeachersBackPayLine cannot be null'); } - $this->container['ignoreInitialBackPay'] = $ignoreInitialBackPay; + $this->container['isZeroHoursTeachersBackPayLine'] = $isZeroHoursTeachersBackPayLine; return $this; } /** - * Gets initialBackPayPublicPayRunId + * Gets leaveId * * @return string|null */ - public function getInitialBackPayPublicPayRunId(): ?string + public function getLeaveId(): ?string { - return $this->container['initialBackPayPublicPayRunId']; + return $this->container['leaveId']; } /** - * Sets initialBackPayPublicPayRunId + * Sets leaveId * - * @param string|null $initialBackPayPublicPayRunId Used to mark the first payrun where this payline has been payrolled for backpay + * @param string|null $leaveId [readonly] The Id of the associated Leave. Only included if the PayLine is a result of a Leave with Statutory pay * * @return $this */ - public function setInitialBackPayPublicPayRunId(?string $initialBackPayPublicPayRunId): static + public function setLeaveId(?string $leaveId): static { - if (is_null($initialBackPayPublicPayRunId)) { - array_push($this->openAPINullablesSetToNull, 'initialBackPayPublicPayRunId'); + if (is_null($leaveId)) { + array_push($this->openAPINullablesSetToNull, 'leaveId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('initialBackPayPublicPayRunId', $nullablesSetToNull); + $index = array_search('leaveId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['initialBackPayPublicPayRunId'] = $initialBackPayPublicPayRunId; + $this->container['leaveId'] = $leaveId; return $this; } /** - * Gets autoAdjustForLeave + * Gets leaveStatutoryDaysPaid * - * @return bool|null + * @return float|null */ - public function getAutoAdjustForLeave(): ?bool + public function getLeaveStatutoryDaysPaid(): ?float { - return $this->container['autoAdjustForLeave']; + return $this->container['leaveStatutoryDaysPaid']; } /** - * Sets autoAdjustForLeave + * Sets leaveStatutoryDaysPaid * - * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun + * @param float|null $leaveStatutoryDaysPaid [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many days they've been paid for (based on their Working Pattern). * * @return $this */ - public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static + public function setLeaveStatutoryDaysPaid(?float $leaveStatutoryDaysPaid): static { - if (is_null($autoAdjustForLeave)) { - throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); + if (is_null($leaveStatutoryDaysPaid)) { + array_push($this->openAPINullablesSetToNull, 'leaveStatutoryDaysPaid'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('leaveStatutoryDaysPaid', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; + $this->container['leaveStatutoryDaysPaid'] = $leaveStatutoryDaysPaid; return $this; } /** - * Gets contributesToBasicPay + * Gets leaveStatutoryWeeksPaid * - * @return bool|null + * @return float|null */ - public function getContributesToBasicPay(): ?bool + public function getLeaveStatutoryWeeksPaid(): ?float { - return $this->container['contributesToBasicPay']; + return $this->container['leaveStatutoryWeeksPaid']; } /** - * Sets contributesToBasicPay + * Sets leaveStatutoryWeeksPaid * - * @param bool|null $contributesToBasicPay Indicates whether this pay line contributes to the basic pay of the employee. Will be set to true by default when IsAutoGeneratedBasicPayLine is true. + * @param float|null $leaveStatutoryWeeksPaid [readonly] If the PayLine is a result of a Leave with Statutory Pay then this property tells you how many weeks they've been paid for (based on their Working Pattern). * * @return $this */ - public function setContributesToBasicPay(?bool $contributesToBasicPay): static + public function setLeaveStatutoryWeeksPaid(?float $leaveStatutoryWeeksPaid): static { - if (is_null($contributesToBasicPay)) { - throw new InvalidArgumentException('non-nullable contributesToBasicPay cannot be null'); + if (is_null($leaveStatutoryWeeksPaid)) { + array_push($this->openAPINullablesSetToNull, 'leaveStatutoryWeeksPaid'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('leaveStatutoryWeeksPaid', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['contributesToBasicPay'] = $contributesToBasicPay; + $this->container['leaveStatutoryWeeksPaid'] = $leaveStatutoryWeeksPaid; return $this; } /** - * Gets calculateAsWhenPaid + * Gets loanId * - * @return bool|null + * @return string|null */ - public function getCalculateAsWhenPaid(): ?bool + public function getLoanId(): ?string { - return $this->container['calculateAsWhenPaid']; + return $this->container['loanId']; } /** - * Sets calculateAsWhenPaid + * Sets loanId * - * @param bool|null $calculateAsWhenPaid Indicates whether this pay line should be treated as When Paid rather than When Earned + * @param string|null $loanId [readonly] The Id of the associated Loan, if any. * * @return $this */ - public function setCalculateAsWhenPaid(?bool $calculateAsWhenPaid): static + public function setLoanId(?string $loanId): static { - if (is_null($calculateAsWhenPaid)) { - throw new InvalidArgumentException('non-nullable calculateAsWhenPaid cannot be null'); + if (is_null($loanId)) { + array_push($this->openAPINullablesSetToNull, 'loanId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('loanId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['calculateAsWhenPaid'] = $calculateAsWhenPaid; + $this->container['loanId'] = $loanId; return $this; } /** - * Gets totalPaidDays + * Gets londonAllowanceId * - * @return float|null + * @return int|null */ - public function getTotalPaidDays(): ?float + public function getLondonAllowanceId(): ?int { - return $this->container['totalPaidDays']; + return $this->container['londonAllowanceId']; } /** - * Sets totalPaidDays + * Sets londonAllowanceId * - * @param float|null $totalPaidDays totalPaidDays + * @param int|null $londonAllowanceId Used to set London allowance id for payline * * @return $this */ - public function setTotalPaidDays(?float $totalPaidDays): static + public function setLondonAllowanceId(?int $londonAllowanceId): static { - if (is_null($totalPaidDays)) { - array_push($this->openAPINullablesSetToNull, 'totalPaidDays'); + if (is_null($londonAllowanceId)) { + array_push($this->openAPINullablesSetToNull, 'londonAllowanceId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalPaidDays', $nullablesSetToNull); + $index = array_search('londonAllowanceId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['totalPaidDays'] = $totalPaidDays; + $this->container['londonAllowanceId'] = $londonAllowanceId; return $this; } /** - * Gets roleId + * Gets multiplier * - * @return string|null + * @return float|null */ - public function getRoleId(): ?string + public function getMultiplier(): ?float { - return $this->container['roleId']; + return $this->container['multiplier']; } /** - * Sets roleId + * Sets multiplier * - * @param string|null $roleId The employee role which is associated with this pay line. If set to null, the pay line is not related with a role. + * @param float|null $multiplier If the related PayCode has a MultiplierType other than None then this field will be used as number of days or hours * * @return $this */ - public function setRoleId(?string $roleId): static + public function setMultiplier(?float $multiplier): static { - if (is_null($roleId)) { - array_push($this->openAPINullablesSetToNull, 'roleId'); + if (is_null($multiplier)) { + array_push($this->openAPINullablesSetToNull, 'multiplier'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('roleId', $nullablesSetToNull); + $index = array_search('multiplier', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['roleId'] = $roleId; + $this->container['multiplier'] = $multiplier; return $this; } /** - * Gets employeeRoleReference + * Gets netToGrossDiscrepancy * - * @return string|null + * @return float|null */ - public function getEmployeeRoleReference(): ?string + public function getNetToGrossDiscrepancy(): ?float { - return $this->container['employeeRoleReference']; + return $this->container['netToGrossDiscrepancy']; } /** - * Sets employeeRoleReference + * Sets netToGrossDiscrepancy * - * @param string|null $employeeRoleReference employeeRoleReference + * @param float|null $netToGrossDiscrepancy The discrepancy between the targeted and the calculated grossed up value during a net to gross calculation. * * @return $this */ - public function setEmployeeRoleReference(?string $employeeRoleReference): static + public function setNetToGrossDiscrepancy(?float $netToGrossDiscrepancy): static { - if (is_null($employeeRoleReference)) { - array_push($this->openAPINullablesSetToNull, 'employeeRoleReference'); + if (is_null($netToGrossDiscrepancy)) { + array_push($this->openAPINullablesSetToNull, 'netToGrossDiscrepancy'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeeRoleReference', $nullablesSetToNull); + $index = array_search('netToGrossDiscrepancy', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employeeRoleReference'] = $employeeRoleReference; + $this->container['netToGrossDiscrepancy'] = $netToGrossDiscrepancy; return $this; } /** - * Gets earnedFrom + * Gets parentId * - * @return \DateTime|null + * @return string|null */ - public function getEarnedFrom(): ?\DateTime + public function getParentId(): ?string { - return $this->container['earnedFrom']; + return $this->container['parentId']; } /** - * Sets earnedFrom + * Sets parentId * - * @param \DateTime|null $earnedFrom Nullable DateTime property \"EarnedFrom\" in the PayLine model to store the start date of the PayLine's 'earned' period in a PayRun. + * @param string|null $parentId [readonly] The Id of the associated employee level pay line, if the current line is a back pay line. * * @return $this */ - public function setEarnedFrom(?\DateTime $earnedFrom): static + public function setParentId(?string $parentId): static { - if (is_null($earnedFrom)) { - array_push($this->openAPINullablesSetToNull, 'earnedFrom'); + if (is_null($parentId)) { + array_push($this->openAPINullablesSetToNull, 'parentId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('earnedFrom', $nullablesSetToNull); + $index = array_search('parentId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['earnedFrom'] = $earnedFrom; + $this->container['parentId'] = $parentId; return $this; } /** - * Gets earnedTo + * Gets payGrade * - * @return \DateTime|null + * @return string|null */ - public function getEarnedTo(): ?\DateTime + public function getPayGrade(): ?string { - return $this->container['earnedTo']; + return $this->container['payGrade']; } /** - * Sets earnedTo + * Sets payGrade * - * @param \DateTime|null $earnedTo Nullable DateTime property \"EarnedTo\" in the PayLine model to store the end date of the PayLine's 'earned' period in a PayRun. + * @param string|null $payGrade PayGrade name based on PayGradeId * * @return $this */ - public function setEarnedTo(?\DateTime $earnedTo): static + public function setPayGrade(?string $payGrade): static { - if (is_null($earnedTo)) { - array_push($this->openAPINullablesSetToNull, 'earnedTo'); + if (is_null($payGrade)) { + array_push($this->openAPINullablesSetToNull, 'payGrade'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('earnedTo', $nullablesSetToNull); + $index = array_search('payGrade', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['earnedTo'] = $earnedTo; + $this->container['payGrade'] = $payGrade; return $this; } /** - * Gets periodFrom + * Gets paySpine * - * @return \DateTime|null + * @return string|null */ - public function getPeriodFrom(): ?\DateTime + public function getPaySpine(): ?string { - return $this->container['periodFrom']; + return $this->container['paySpine']; } /** - * Sets periodFrom + * Sets paySpine * - * @param \DateTime|null $periodFrom Nullable DateTime property \"PeriodFrom\" in the PayLine model to store the start date of the PayRun period the current PayLine is part of. + * @param string|null $paySpine PaySpine name based on PaySpineId * * @return $this */ - public function setPeriodFrom(?\DateTime $periodFrom): static + public function setPaySpine(?string $paySpine): static { - if (is_null($periodFrom)) { - array_push($this->openAPINullablesSetToNull, 'periodFrom'); + if (is_null($paySpine)) { + array_push($this->openAPINullablesSetToNull, 'paySpine'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('periodFrom', $nullablesSetToNull); + $index = array_search('paySpine', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['periodFrom'] = $periodFrom; + $this->container['paySpine'] = $paySpine; return $this; } /** - * Gets periodTo + * Gets paySpineGradeId * - * @return \DateTime|null + * @return string|null */ - public function getPeriodTo(): ?\DateTime + public function getPaySpineGradeId(): ?string { - return $this->container['periodTo']; + return $this->container['paySpineGradeId']; } /** - * Sets periodTo + * Sets paySpineGradeId * - * @param \DateTime|null $periodTo Nullable DateTime property \"PeriodTo\" in the PayLine model to store the end date of the PayRun period the current PayLine is part of. + * @param string|null $paySpineGradeId [readonly] The Id of the associated pay spine grade. * * @return $this */ - public function setPeriodTo(?\DateTime $periodTo): static + public function setPaySpineGradeId(?string $paySpineGradeId): static { - if (is_null($periodTo)) { - array_push($this->openAPINullablesSetToNull, 'periodTo'); + if (is_null($paySpineGradeId)) { + array_push($this->openAPINullablesSetToNull, 'paySpineGradeId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('periodTo', $nullablesSetToNull); + $index = array_search('paySpineGradeId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['periodTo'] = $periodTo; + $this->container['paySpineGradeId'] = $paySpineGradeId; return $this; } /** - * Gets annualValue + * Gets paySpineId * - * @return float|null + * @return string|null */ - public function getAnnualValue(): ?float + public function getPaySpineId(): ?string { - return $this->container['annualValue']; + return $this->container['paySpineId']; } /** - * Sets annualValue + * Sets paySpineId * - * @param float|null $annualValue The original value from the PayLine before we modify it Currently only used when CalculationType is set to FixedAnnualAmount so we can determine whether the pay line value needs calculating or not To recalculate set to null with annual amount recorded in Value + * @param string|null $paySpineId [readonly] The Id of the associated pay spine. * * @return $this */ - public function setAnnualValue(?float $annualValue): static + public function setPaySpineId(?string $paySpineId): static { - if (is_null($annualValue)) { - array_push($this->openAPINullablesSetToNull, 'annualValue'); + if (is_null($paySpineId)) { + array_push($this->openAPINullablesSetToNull, 'paySpineId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('annualValue', $nullablesSetToNull); + $index = array_search('paySpineId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['annualValue'] = $annualValue; + $this->container['paySpineId'] = $paySpineId; return $this; } /** - * Gets parentId + * Gets payrollCode * * @return string|null */ - public function getParentId(): ?string + public function getPayrollCode(): ?string { - return $this->container['parentId']; + return $this->container['payrollCode']; } /** - * Sets parentId + * Sets payrollCode * - * @param string|null $parentId [readonly] The Id of the associated employee level pay line, if the current line is a back pay line. + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setParentId(?string $parentId): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($parentId)) { - array_push($this->openAPINullablesSetToNull, 'parentId'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('parentId', $nullablesSetToNull); + $index = array_search('payrollCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['parentId'] = $parentId; + $this->container['payrollCode'] = $payrollCode; return $this; } /** - * Gets isAutoCalculatedBackPayLine + * Gets pensionId * - * @return bool|null + * @return string|null */ - public function getIsAutoCalculatedBackPayLine(): ?bool + public function getPensionId(): ?string { - return $this->container['isAutoCalculatedBackPayLine']; + return $this->container['pensionId']; } /** - * Sets isAutoCalculatedBackPayLine + * Sets pensionId * - * @param bool|null $isAutoCalculatedBackPayLine isAutoCalculatedBackPayLine + * @param string|null $pensionId [readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS * * @return $this */ - public function setIsAutoCalculatedBackPayLine(?bool $isAutoCalculatedBackPayLine): static + public function setPensionId(?string $pensionId): static { - if (is_null($isAutoCalculatedBackPayLine)) { - throw new InvalidArgumentException('non-nullable isAutoCalculatedBackPayLine cannot be null'); + if (is_null($pensionId)) { + array_push($this->openAPINullablesSetToNull, 'pensionId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pensionId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isAutoCalculatedBackPayLine'] = $isAutoCalculatedBackPayLine; + $this->container['pensionId'] = $pensionId; return $this; } /** - * Gets isZeroHoursTeachersBackPayLine + * Gets percentageOfEffectiveDays * - * @return bool|null + * @return float|null */ - public function getIsZeroHoursTeachersBackPayLine(): ?bool + public function getPercentageOfEffectiveDays(): ?float { - return $this->container['isZeroHoursTeachersBackPayLine']; + return $this->container['percentageOfEffectiveDays']; } /** - * Sets isZeroHoursTeachersBackPayLine + * Sets percentageOfEffectiveDays * - * @param bool|null $isZeroHoursTeachersBackPayLine [readonly] Indicates whether this pay line is a backdated pay claim line belonging to a zero hours contract teacher. + * @param float|null $percentageOfEffectiveDays The percentage of working days the effective dates span for pro-rata'ing values, calculated/set during each payrun * * @return $this */ - public function setIsZeroHoursTeachersBackPayLine(?bool $isZeroHoursTeachersBackPayLine): static + public function setPercentageOfEffectiveDays(?float $percentageOfEffectiveDays): static { - if (is_null($isZeroHoursTeachersBackPayLine)) { - throw new InvalidArgumentException('non-nullable isZeroHoursTeachersBackPayLine cannot be null'); + if (is_null($percentageOfEffectiveDays)) { + array_push($this->openAPINullablesSetToNull, 'percentageOfEffectiveDays'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('percentageOfEffectiveDays', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isZeroHoursTeachersBackPayLine'] = $isZeroHoursTeachersBackPayLine; + $this->container['percentageOfEffectiveDays'] = $percentageOfEffectiveDays; return $this; } /** - * Gets analysisCategoriesCodes + * Gets periodFrom * - * @return \SynergiTech\Staffology\Model\AnalysisCategoryCodes[]|null + * @return \DateTime|null */ - public function getAnalysisCategoriesCodes(): ?array + public function getPeriodFrom(): ?\DateTime { - return $this->container['analysisCategoriesCodes']; + return $this->container['periodFrom']; } /** - * Sets analysisCategoriesCodes + * Sets periodFrom * - * @param \SynergiTech\Staffology\Model\AnalysisCategoryCodes[]|null $analysisCategoriesCodes List of analysis Category Codes + * @param \DateTime|null $periodFrom Nullable DateTime property \"PeriodFrom\" in the PayLine model to store the start date of the PayRun period the current PayLine is part of. * * @return $this */ - public function setAnalysisCategoriesCodes(?array $analysisCategoriesCodes): static + public function setPeriodFrom(?\DateTime $periodFrom): static { - if (is_null($analysisCategoriesCodes)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoriesCodes'); + if (is_null($periodFrom)) { + array_push($this->openAPINullablesSetToNull, 'periodFrom'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoriesCodes', $nullablesSetToNull); + $index = array_search('periodFrom', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoriesCodes'] = $analysisCategoriesCodes; + $this->container['periodFrom'] = $periodFrom; return $this; } /** - * Gets analysisCategoryCodeIds + * Gets periodTo * - * @return string[]|null + * @return \DateTime|null */ - public function getAnalysisCategoryCodeIds(): ?array + public function getPeriodTo(): ?\DateTime { - return $this->container['analysisCategoryCodeIds']; + return $this->container['periodTo']; } /** - * Sets analysisCategoryCodeIds + * Sets periodTo * - * @param string[]|null $analysisCategoryCodeIds List of analysis Category Codes uniqueId + * @param \DateTime|null $periodTo Nullable DateTime property \"PeriodTo\" in the PayLine model to store the end date of the PayRun period the current PayLine is part of. * * @return $this */ - public function setAnalysisCategoryCodeIds(?array $analysisCategoryCodeIds): static + public function setPeriodTo(?\DateTime $periodTo): static { - if (is_null($analysisCategoryCodeIds)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodeIds'); + if (is_null($periodTo)) { + array_push($this->openAPINullablesSetToNull, 'periodTo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryCodeIds', $nullablesSetToNull); + $index = array_search('periodTo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoryCodeIds'] = $analysisCategoryCodeIds; + $this->container['periodTo'] = $periodTo; return $this; } /** - * Gets paySpineId + * Gets rate * - * @return string|null + * @return float|null */ - public function getPaySpineId(): ?string + public function getRate(): ?float { - return $this->container['paySpineId']; + return $this->container['rate']; } /** - * Sets paySpineId + * Sets rate * - * @param string|null $paySpineId [readonly] The Id of the associated pay spine. + * @param float|null $rate If the related PayCode has a MultiplierType other than None then this field will be used as the rate per day or hour. Otherwise it isn't used * * @return $this */ - public function setPaySpineId(?string $paySpineId): static + public function setRate(?float $rate): static { - if (is_null($paySpineId)) { - array_push($this->openAPINullablesSetToNull, 'paySpineId'); + if (is_null($rate)) { + array_push($this->openAPINullablesSetToNull, 'rate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paySpineId', $nullablesSetToNull); + $index = array_search('rate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['paySpineId'] = $paySpineId; + $this->container['rate'] = $rate; return $this; } /** - * Gets paySpineGradeId + * Gets roleId * * @return string|null */ - public function getPaySpineGradeId(): ?string + public function getRoleId(): ?string { - return $this->container['paySpineGradeId']; + return $this->container['roleId']; } /** - * Sets paySpineGradeId + * Sets roleId * - * @param string|null $paySpineGradeId [readonly] The Id of the associated pay spine grade. + * @param string|null $roleId The employee role which is associated with this pay line. If set to null, the pay line is not related with a role. * * @return $this */ - public function setPaySpineGradeId(?string $paySpineGradeId): static + public function setRoleId(?string $roleId): static { - if (is_null($paySpineGradeId)) { - array_push($this->openAPINullablesSetToNull, 'paySpineGradeId'); + if (is_null($roleId)) { + array_push($this->openAPINullablesSetToNull, 'roleId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paySpineGradeId', $nullablesSetToNull); + $index = array_search('roleId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['paySpineGradeId'] = $paySpineGradeId; + $this->container['roleId'] = $roleId; return $this; } @@ -2258,164 +2381,198 @@ public function setSpinalPointId(?string $spinalPointId): static } /** - * Gets londonAllowanceId + * Gets spinePoint * - * @return int|null + * @return string|null */ - public function getLondonAllowanceId(): ?int + public function getSpinePoint(): ?string { - return $this->container['londonAllowanceId']; + return $this->container['spinePoint']; } /** - * Sets londonAllowanceId + * Sets spinePoint * - * @param int|null $londonAllowanceId Used to set London allowance id for payline + * @param string|null $spinePoint SpinePoint name based on SpinePointId * * @return $this */ - public function setLondonAllowanceId(?int $londonAllowanceId): static + public function setSpinePoint(?string $spinePoint): static { - if (is_null($londonAllowanceId)) { - array_push($this->openAPINullablesSetToNull, 'londonAllowanceId'); + if (is_null($spinePoint)) { + array_push($this->openAPINullablesSetToNull, 'spinePoint'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('londonAllowanceId', $nullablesSetToNull); + $index = array_search('spinePoint', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['londonAllowanceId'] = $londonAllowanceId; + $this->container['spinePoint'] = $spinePoint; return $this; } /** - * Gets fullTimeAnnualValue + * Gets tags * - * @return float|null + * @return string[]|null */ - public function getFullTimeAnnualValue(): ?float + public function getTags(): ?array { - return $this->container['fullTimeAnnualValue']; + return $this->container['tags']; } /** - * Sets fullTimeAnnualValue + * Sets tags * - * @param float|null $fullTimeAnnualValue Used to set Full Time Annual Value for payline + * @param string[]|null $tags tags * * @return $this */ - public function setFullTimeAnnualValue(?float $fullTimeAnnualValue): static + public function setTags(?array $tags): static { - if (is_null($fullTimeAnnualValue)) { - throw new InvalidArgumentException('non-nullable fullTimeAnnualValue cannot be null'); + if (is_null($tags)) { + array_push($this->openAPINullablesSetToNull, 'tags'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tags', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['fullTimeAnnualValue'] = $fullTimeAnnualValue; + $this->container['tags'] = $tags; return $this; } /** - * Gets paySpine + * Gets targetNetToGrossValue * - * @return string|null + * @return float|null */ - public function getPaySpine(): ?string + public function getTargetNetToGrossValue(): ?float { - return $this->container['paySpine']; + return $this->container['targetNetToGrossValue']; } /** - * Sets paySpine + * Sets targetNetToGrossValue * - * @param string|null $paySpine PaySpine name based on PaySpineId + * @param float|null $targetNetToGrossValue The original net fixed addition amount that is considered to be a take home pay target. * * @return $this */ - public function setPaySpine(?string $paySpine): static + public function setTargetNetToGrossValue(?float $targetNetToGrossValue): static { - if (is_null($paySpine)) { - array_push($this->openAPINullablesSetToNull, 'paySpine'); + if (is_null($targetNetToGrossValue)) { + array_push($this->openAPINullablesSetToNull, 'targetNetToGrossValue'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paySpine', $nullablesSetToNull); + $index = array_search('targetNetToGrossValue', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['paySpine'] = $paySpine; + $this->container['targetNetToGrossValue'] = $targetNetToGrossValue; return $this; } /** - * Gets payGrade + * Gets totalPaidDays * - * @return string|null + * @return float|null */ - public function getPayGrade(): ?string + public function getTotalPaidDays(): ?float { - return $this->container['payGrade']; + return $this->container['totalPaidDays']; } /** - * Sets payGrade + * Sets totalPaidDays * - * @param string|null $payGrade PayGrade name based on PayGradeId + * @param float|null $totalPaidDays totalPaidDays * * @return $this */ - public function setPayGrade(?string $payGrade): static + public function setTotalPaidDays(?float $totalPaidDays): static { - if (is_null($payGrade)) { - array_push($this->openAPINullablesSetToNull, 'payGrade'); + if (is_null($totalPaidDays)) { + array_push($this->openAPINullablesSetToNull, 'totalPaidDays'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payGrade', $nullablesSetToNull); + $index = array_search('totalPaidDays', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payGrade'] = $payGrade; + $this->container['totalPaidDays'] = $totalPaidDays; return $this; } /** - * Gets spinePoint + * Gets totalWorkingDays * - * @return string|null + * @return float|null */ - public function getSpinePoint(): ?string + public function getTotalWorkingDays(): ?float { - return $this->container['spinePoint']; + return $this->container['totalWorkingDays']; } /** - * Sets spinePoint + * Sets totalWorkingDays * - * @param string|null $spinePoint SpinePoint name based on SpinePointId + * @param float|null $totalWorkingDays totalWorkingDays * * @return $this */ - public function setSpinePoint(?string $spinePoint): static + public function setTotalWorkingDays(?float $totalWorkingDays): static { - if (is_null($spinePoint)) { - array_push($this->openAPINullablesSetToNull, 'spinePoint'); + if (is_null($totalWorkingDays)) { + array_push($this->openAPINullablesSetToNull, 'totalWorkingDays'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('spinePoint', $nullablesSetToNull); + $index = array_search('totalWorkingDays', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['spinePoint'] = $spinePoint; + $this->container['totalWorkingDays'] = $totalWorkingDays; + + return $this; + } + + /** + * Gets value + * + * @return float|null + */ + public function getValue(): ?float + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param float|null $value The amount to add or deduct (whether it is a deduction or addition depends on the PayCode used). If the PayCode has a CalculationType other than FixedAmount then this field will be a percentage. If the PayCode has a MultiplierType other than None then this field will be readonly and automatically calculated. + * + * @return $this + */ + public function setValue(?float $value): static + { + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; return $this; } diff --git a/src/Model/PayMethod.php b/src/Model/PayMethod.php index 6e1da80..269fb3b 100644 --- a/src/Model/PayMethod.php +++ b/src/Model/PayMethod.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayOptions.php b/src/Model/PayOptions.php index 85eea58..1963b1f 100644 --- a/src/Model/PayOptions.php +++ b/src/Model/PayOptions.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,27 +60,27 @@ class PayOptions implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'period' => '\SynergiTech\Staffology\Model\PayPeriods', - 'ordinal' => 'int', - 'method' => '\SynergiTech\Staffology\Model\PayMethod', - 'withholdTaxRefundIfPayIsZero' => 'bool', - 'taxAndNi' => '\SynergiTech\Staffology\Model\TaxAndNi', - 'fpsFields' => '\SynergiTech\Staffology\Model\FpsFields', - 'tags' => 'string[]', + 'autoAdjustForLeave' => 'bool', + 'baseDailyRate' => 'float', + 'baseHourlyRate' => 'float', + 'basicPay' => 'float', 'basis' => '\SynergiTech\Staffology\Model\PayBasis', - 'nationalMinimumWage' => 'bool', - 'payCode' => 'string', - 'mileageVehicleType' => '\SynergiTech\Staffology\Model\MileageVehicleType', + 'excludedRegularPayLines' => '\SynergiTech\Staffology\Model\PayLine[]', + 'fpsFields' => '\SynergiTech\Staffology\Model\FpsFields', 'mapsMiles' => 'int', + 'method' => '\SynergiTech\Staffology\Model\PayMethod', + 'mileageVehicleType' => '\SynergiTech\Staffology\Model\MileageVehicleType', + 'nationalMinimumWage' => 'bool', + 'niTable' => 'string', + 'ordinal' => 'int', 'payAmount' => 'float', 'payAmountMultiplier' => 'float', - 'baseHourlyRate' => 'float', - 'baseDailyRate' => 'float', - 'basicPay' => 'float', - 'autoAdjustForLeave' => 'bool', - 'niTable' => 'string', + 'payCode' => 'string', + 'period' => '\SynergiTech\Staffology\Model\PayPeriods', 'regularPayLines' => '\SynergiTech\Staffology\Model\PayLine[]', - 'excludedRegularPayLines' => '\SynergiTech\Staffology\Model\PayLine[]' + 'tags' => 'string[]', + 'taxAndNi' => '\SynergiTech\Staffology\Model\TaxAndNi', + 'withholdTaxRefundIfPayIsZero' => 'bool' ]; /** @@ -89,27 +89,27 @@ class PayOptions implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'period' => null, - 'ordinal' => 'int32', - 'method' => null, - 'withholdTaxRefundIfPayIsZero' => null, - 'taxAndNi' => null, - 'fpsFields' => null, - 'tags' => null, + 'autoAdjustForLeave' => null, + 'baseDailyRate' => 'double', + 'baseHourlyRate' => 'double', + 'basicPay' => 'double', 'basis' => null, - 'nationalMinimumWage' => null, - 'payCode' => null, - 'mileageVehicleType' => null, + 'excludedRegularPayLines' => null, + 'fpsFields' => null, 'mapsMiles' => 'int32', + 'method' => null, + 'mileageVehicleType' => null, + 'nationalMinimumWage' => null, + 'niTable' => null, + 'ordinal' => 'int32', 'payAmount' => 'double', 'payAmountMultiplier' => 'double', - 'baseHourlyRate' => 'double', - 'baseDailyRate' => 'double', - 'basicPay' => 'double', - 'autoAdjustForLeave' => null, - 'niTable' => null, + 'payCode' => null, + 'period' => null, 'regularPayLines' => null, - 'excludedRegularPayLines' => null + 'tags' => null, + 'taxAndNi' => null, + 'withholdTaxRefundIfPayIsZero' => null ]; /** @@ -118,27 +118,27 @@ class PayOptions implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'period' => false, - 'ordinal' => false, - 'method' => false, - 'withholdTaxRefundIfPayIsZero' => false, - 'taxAndNi' => false, - 'fpsFields' => false, - 'tags' => true, + 'autoAdjustForLeave' => false, + 'baseDailyRate' => false, + 'baseHourlyRate' => false, + 'basicPay' => false, 'basis' => false, - 'nationalMinimumWage' => false, - 'payCode' => true, - 'mileageVehicleType' => false, + 'excludedRegularPayLines' => true, + 'fpsFields' => false, 'mapsMiles' => true, + 'method' => false, + 'mileageVehicleType' => false, + 'nationalMinimumWage' => false, + 'niTable' => false, + 'ordinal' => false, 'payAmount' => false, 'payAmountMultiplier' => false, - 'baseHourlyRate' => false, - 'baseDailyRate' => false, - 'basicPay' => false, - 'autoAdjustForLeave' => false, - 'niTable' => false, + 'payCode' => true, + 'period' => false, 'regularPayLines' => true, - 'excludedRegularPayLines' => true + 'tags' => true, + 'taxAndNi' => false, + 'withholdTaxRefundIfPayIsZero' => false ]; /** @@ -227,27 +227,27 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'period' => 'period', - 'ordinal' => 'ordinal', - 'method' => 'method', - 'withholdTaxRefundIfPayIsZero' => 'withholdTaxRefundIfPayIsZero', - 'taxAndNi' => 'taxAndNi', - 'fpsFields' => 'fpsFields', - 'tags' => 'tags', + 'autoAdjustForLeave' => 'autoAdjustForLeave', + 'baseDailyRate' => 'baseDailyRate', + 'baseHourlyRate' => 'baseHourlyRate', + 'basicPay' => 'basicPay', 'basis' => 'basis', - 'nationalMinimumWage' => 'nationalMinimumWage', - 'payCode' => 'payCode', - 'mileageVehicleType' => 'mileageVehicleType', + 'excludedRegularPayLines' => 'excludedRegularPayLines', + 'fpsFields' => 'fpsFields', 'mapsMiles' => 'mapsMiles', + 'method' => 'method', + 'mileageVehicleType' => 'mileageVehicleType', + 'nationalMinimumWage' => 'nationalMinimumWage', + 'niTable' => 'niTable', + 'ordinal' => 'ordinal', 'payAmount' => 'payAmount', 'payAmountMultiplier' => 'payAmountMultiplier', - 'baseHourlyRate' => 'baseHourlyRate', - 'baseDailyRate' => 'baseDailyRate', - 'basicPay' => 'basicPay', - 'autoAdjustForLeave' => 'autoAdjustForLeave', - 'niTable' => 'niTable', + 'payCode' => 'payCode', + 'period' => 'period', 'regularPayLines' => 'regularPayLines', - 'excludedRegularPayLines' => 'excludedRegularPayLines' + 'tags' => 'tags', + 'taxAndNi' => 'taxAndNi', + 'withholdTaxRefundIfPayIsZero' => 'withholdTaxRefundIfPayIsZero' ]; /** @@ -256,27 +256,27 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'period' => 'setPeriod', - 'ordinal' => 'setOrdinal', - 'method' => 'setMethod', - 'withholdTaxRefundIfPayIsZero' => 'setWithholdTaxRefundIfPayIsZero', - 'taxAndNi' => 'setTaxAndNi', - 'fpsFields' => 'setFpsFields', - 'tags' => 'setTags', + 'autoAdjustForLeave' => 'setAutoAdjustForLeave', + 'baseDailyRate' => 'setBaseDailyRate', + 'baseHourlyRate' => 'setBaseHourlyRate', + 'basicPay' => 'setBasicPay', 'basis' => 'setBasis', - 'nationalMinimumWage' => 'setNationalMinimumWage', - 'payCode' => 'setPayCode', - 'mileageVehicleType' => 'setMileageVehicleType', + 'excludedRegularPayLines' => 'setExcludedRegularPayLines', + 'fpsFields' => 'setFpsFields', 'mapsMiles' => 'setMapsMiles', + 'method' => 'setMethod', + 'mileageVehicleType' => 'setMileageVehicleType', + 'nationalMinimumWage' => 'setNationalMinimumWage', + 'niTable' => 'setNiTable', + 'ordinal' => 'setOrdinal', 'payAmount' => 'setPayAmount', 'payAmountMultiplier' => 'setPayAmountMultiplier', - 'baseHourlyRate' => 'setBaseHourlyRate', - 'baseDailyRate' => 'setBaseDailyRate', - 'basicPay' => 'setBasicPay', - 'autoAdjustForLeave' => 'setAutoAdjustForLeave', - 'niTable' => 'setNiTable', + 'payCode' => 'setPayCode', + 'period' => 'setPeriod', 'regularPayLines' => 'setRegularPayLines', - 'excludedRegularPayLines' => 'setExcludedRegularPayLines' + 'tags' => 'setTags', + 'taxAndNi' => 'setTaxAndNi', + 'withholdTaxRefundIfPayIsZero' => 'setWithholdTaxRefundIfPayIsZero' ]; /** @@ -285,27 +285,27 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'period' => 'getPeriod', - 'ordinal' => 'getOrdinal', - 'method' => 'getMethod', - 'withholdTaxRefundIfPayIsZero' => 'getWithholdTaxRefundIfPayIsZero', - 'taxAndNi' => 'getTaxAndNi', - 'fpsFields' => 'getFpsFields', - 'tags' => 'getTags', + 'autoAdjustForLeave' => 'getAutoAdjustForLeave', + 'baseDailyRate' => 'getBaseDailyRate', + 'baseHourlyRate' => 'getBaseHourlyRate', + 'basicPay' => 'getBasicPay', 'basis' => 'getBasis', - 'nationalMinimumWage' => 'getNationalMinimumWage', - 'payCode' => 'getPayCode', - 'mileageVehicleType' => 'getMileageVehicleType', + 'excludedRegularPayLines' => 'getExcludedRegularPayLines', + 'fpsFields' => 'getFpsFields', 'mapsMiles' => 'getMapsMiles', + 'method' => 'getMethod', + 'mileageVehicleType' => 'getMileageVehicleType', + 'nationalMinimumWage' => 'getNationalMinimumWage', + 'niTable' => 'getNiTable', + 'ordinal' => 'getOrdinal', 'payAmount' => 'getPayAmount', 'payAmountMultiplier' => 'getPayAmountMultiplier', - 'baseHourlyRate' => 'getBaseHourlyRate', - 'baseDailyRate' => 'getBaseDailyRate', - 'basicPay' => 'getBasicPay', - 'autoAdjustForLeave' => 'getAutoAdjustForLeave', - 'niTable' => 'getNiTable', + 'payCode' => 'getPayCode', + 'period' => 'getPeriod', 'regularPayLines' => 'getRegularPayLines', - 'excludedRegularPayLines' => 'getExcludedRegularPayLines' + 'tags' => 'getTags', + 'taxAndNi' => 'getTaxAndNi', + 'withholdTaxRefundIfPayIsZero' => 'getWithholdTaxRefundIfPayIsZero' ]; /** @@ -364,27 +364,27 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('period', $data ?? [], null); - $this->setIfExists('ordinal', $data ?? [], null); - $this->setIfExists('method', $data ?? [], null); - $this->setIfExists('withholdTaxRefundIfPayIsZero', $data ?? [], null); - $this->setIfExists('taxAndNi', $data ?? [], null); - $this->setIfExists('fpsFields', $data ?? [], null); - $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('autoAdjustForLeave', $data ?? [], null); + $this->setIfExists('baseDailyRate', $data ?? [], null); + $this->setIfExists('baseHourlyRate', $data ?? [], null); + $this->setIfExists('basicPay', $data ?? [], null); $this->setIfExists('basis', $data ?? [], null); - $this->setIfExists('nationalMinimumWage', $data ?? [], null); - $this->setIfExists('payCode', $data ?? [], null); - $this->setIfExists('mileageVehicleType', $data ?? [], null); + $this->setIfExists('excludedRegularPayLines', $data ?? [], null); + $this->setIfExists('fpsFields', $data ?? [], null); $this->setIfExists('mapsMiles', $data ?? [], null); + $this->setIfExists('method', $data ?? [], null); + $this->setIfExists('mileageVehicleType', $data ?? [], null); + $this->setIfExists('nationalMinimumWage', $data ?? [], null); + $this->setIfExists('niTable', $data ?? [], null); + $this->setIfExists('ordinal', $data ?? [], null); $this->setIfExists('payAmount', $data ?? [], null); $this->setIfExists('payAmountMultiplier', $data ?? [], null); - $this->setIfExists('baseHourlyRate', $data ?? [], null); - $this->setIfExists('baseDailyRate', $data ?? [], null); - $this->setIfExists('basicPay', $data ?? [], null); - $this->setIfExists('autoAdjustForLeave', $data ?? [], null); - $this->setIfExists('niTable', $data ?? [], null); + $this->setIfExists('payCode', $data ?? [], null); + $this->setIfExists('period', $data ?? [], null); $this->setIfExists('regularPayLines', $data ?? [], null); - $this->setIfExists('excludedRegularPayLines', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('taxAndNi', $data ?? [], null); + $this->setIfExists('withholdTaxRefundIfPayIsZero', $data ?? [], null); } /** @@ -430,136 +430,170 @@ public function valid(): bool /** - * Gets period + * Gets autoAdjustForLeave * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return bool|null */ - public function getPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getAutoAdjustForLeave(): ?bool { - return $this->container['period']; + return $this->container['autoAdjustForLeave']; } /** - * Sets period + * Sets autoAdjustForLeave * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $period period + * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun * * @return $this */ - public function setPeriod(?\SynergiTech\Staffology\Model\PayPeriods $period): static + public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($autoAdjustForLeave)) { + throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); } - $this->container['period'] = $period; + $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; return $this; } /** - * Gets ordinal + * Gets baseDailyRate * - * @return int|null + * @return float|null */ - public function getOrdinal(): ?int + public function getBaseDailyRate(): ?float { - return $this->container['ordinal']; + return $this->container['baseDailyRate']; } /** - * Sets ordinal + * Sets baseDailyRate * - * @param int|null $ordinal Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod. + * @param float|null $baseDailyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields * * @return $this */ - public function setOrdinal(?int $ordinal): static + public function setBaseDailyRate(?float $baseDailyRate): static { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + if (is_null($baseDailyRate)) { + throw new InvalidArgumentException('non-nullable baseDailyRate cannot be null'); } - $this->container['ordinal'] = $ordinal; + $this->container['baseDailyRate'] = $baseDailyRate; return $this; } /** - * Gets method + * Gets baseHourlyRate * - * @return \SynergiTech\Staffology\Model\PayMethod|null + * @return float|null */ - public function getMethod(): ?\SynergiTech\Staffology\Model\PayMethod + public function getBaseHourlyRate(): ?float { - return $this->container['method']; + return $this->container['baseHourlyRate']; } /** - * Sets method + * Sets baseHourlyRate * - * @param \SynergiTech\Staffology\Model\PayMethod|null $method method + * @param float|null $baseHourlyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields * * @return $this */ - public function setMethod(?\SynergiTech\Staffology\Model\PayMethod $method): static + public function setBaseHourlyRate(?float $baseHourlyRate): static { - if (is_null($method)) { - throw new InvalidArgumentException('non-nullable method cannot be null'); + if (is_null($baseHourlyRate)) { + throw new InvalidArgumentException('non-nullable baseHourlyRate cannot be null'); } - $this->container['method'] = $method; + $this->container['baseHourlyRate'] = $baseHourlyRate; return $this; } /** - * Gets withholdTaxRefundIfPayIsZero + * Gets basicPay * - * @return bool|null + * @return float|null */ - public function getWithholdTaxRefundIfPayIsZero(): ?bool + public function getBasicPay(): ?float { - return $this->container['withholdTaxRefundIfPayIsZero']; + return $this->container['basicPay']; } /** - * Sets withholdTaxRefundIfPayIsZero + * Sets basicPay * - * @param bool|null $withholdTaxRefundIfPayIsZero If you don't want negative PAYE values when the Gross pay is zero, set this to true + * @param float|null $basicPay The amount of basic pay the Employee is regularly paid each period This amount is the combined total of all pay elements that contribute to basic pay * * @return $this */ - public function setWithholdTaxRefundIfPayIsZero(?bool $withholdTaxRefundIfPayIsZero): static + public function setBasicPay(?float $basicPay): static { - if (is_null($withholdTaxRefundIfPayIsZero)) { - throw new InvalidArgumentException('non-nullable withholdTaxRefundIfPayIsZero cannot be null'); + if (is_null($basicPay)) { + throw new InvalidArgumentException('non-nullable basicPay cannot be null'); } - $this->container['withholdTaxRefundIfPayIsZero'] = $withholdTaxRefundIfPayIsZero; + $this->container['basicPay'] = $basicPay; return $this; } /** - * Gets taxAndNi + * Gets basis * - * @return \SynergiTech\Staffology\Model\TaxAndNi|null + * @return \SynergiTech\Staffology\Model\PayBasis|null */ - public function getTaxAndNi(): ?\SynergiTech\Staffology\Model\TaxAndNi + public function getBasis(): ?\SynergiTech\Staffology\Model\PayBasis { - return $this->container['taxAndNi']; + return $this->container['basis']; } /** - * Sets taxAndNi + * Sets basis * - * @param \SynergiTech\Staffology\Model\TaxAndNi|null $taxAndNi taxAndNi + * @param \SynergiTech\Staffology\Model\PayBasis|null $basis basis * * @return $this */ - public function setTaxAndNi(?\SynergiTech\Staffology\Model\TaxAndNi $taxAndNi): static + public function setBasis(?\SynergiTech\Staffology\Model\PayBasis $basis): static { - if (is_null($taxAndNi)) { - throw new InvalidArgumentException('non-nullable taxAndNi cannot be null'); + if (is_null($basis)) { + throw new InvalidArgumentException('non-nullable basis cannot be null'); } - $this->container['taxAndNi'] = $taxAndNi; + $this->container['basis'] = $basis; + + return $this; + } + + /** + * Gets excludedRegularPayLines + * + * @return \SynergiTech\Staffology\Model\PayLine[]|null + */ + public function getExcludedRegularPayLines(): ?array + { + return $this->container['excludedRegularPayLines']; + } + + /** + * Sets excludedRegularPayLines + * + * @param \SynergiTech\Staffology\Model\PayLine[]|null $excludedRegularPayLines These used to store the PayLines that have been excluded from RegularPaylines. + * + * @return $this + */ + public function setExcludedRegularPayLines(?array $excludedRegularPayLines): static + { + if (is_null($excludedRegularPayLines)) { + array_push($this->openAPINullablesSetToNull, 'excludedRegularPayLines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('excludedRegularPayLines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['excludedRegularPayLines'] = $excludedRegularPayLines; return $this; } @@ -592,184 +626,170 @@ public function setFpsFields(?\SynergiTech\Staffology\Model\FpsFields $fpsFields } /** - * Gets tags + * Gets mapsMiles * - * @return string[]|null + * @return int|null */ - public function getTags(): ?array + public function getMapsMiles(): ?int { - return $this->container['tags']; + return $this->container['mapsMiles']; } /** - * Sets tags + * Sets mapsMiles * - * @param string[]|null $tags tags + * @param int|null $mapsMiles The number of miles to pay for as Mileage Allowance Payments * * @return $this */ - public function setTags(?array $tags): static + public function setMapsMiles(?int $mapsMiles): static { - if (is_null($tags)) { - array_push($this->openAPINullablesSetToNull, 'tags'); + if (is_null($mapsMiles)) { + array_push($this->openAPINullablesSetToNull, 'mapsMiles'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tags', $nullablesSetToNull); + $index = array_search('mapsMiles', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tags'] = $tags; + $this->container['mapsMiles'] = $mapsMiles; return $this; } /** - * Gets basis + * Gets method * - * @return \SynergiTech\Staffology\Model\PayBasis|null + * @return \SynergiTech\Staffology\Model\PayMethod|null */ - public function getBasis(): ?\SynergiTech\Staffology\Model\PayBasis + public function getMethod(): ?\SynergiTech\Staffology\Model\PayMethod { - return $this->container['basis']; + return $this->container['method']; } /** - * Sets basis + * Sets method * - * @param \SynergiTech\Staffology\Model\PayBasis|null $basis basis + * @param \SynergiTech\Staffology\Model\PayMethod|null $method method * * @return $this */ - public function setBasis(?\SynergiTech\Staffology\Model\PayBasis $basis): static + public function setMethod(?\SynergiTech\Staffology\Model\PayMethod $method): static { - if (is_null($basis)) { - throw new InvalidArgumentException('non-nullable basis cannot be null'); + if (is_null($method)) { + throw new InvalidArgumentException('non-nullable method cannot be null'); } - $this->container['basis'] = $basis; + $this->container['method'] = $method; return $this; } /** - * Gets nationalMinimumWage + * Gets mileageVehicleType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\MileageVehicleType|null */ - public function getNationalMinimumWage(): ?bool + public function getMileageVehicleType(): ?\SynergiTech\Staffology\Model\MileageVehicleType { - return $this->container['nationalMinimumWage']; + return $this->container['mileageVehicleType']; } /** - * Sets nationalMinimumWage + * Sets mileageVehicleType * - * @param bool|null $nationalMinimumWage nationalMinimumWage + * @param \SynergiTech\Staffology\Model\MileageVehicleType|null $mileageVehicleType mileageVehicleType * * @return $this */ - public function setNationalMinimumWage(?bool $nationalMinimumWage): static + public function setMileageVehicleType(?\SynergiTech\Staffology\Model\MileageVehicleType $mileageVehicleType): static { - if (is_null($nationalMinimumWage)) { - throw new InvalidArgumentException('non-nullable nationalMinimumWage cannot be null'); + if (is_null($mileageVehicleType)) { + throw new InvalidArgumentException('non-nullable mileageVehicleType cannot be null'); } - $this->container['nationalMinimumWage'] = $nationalMinimumWage; + $this->container['mileageVehicleType'] = $mileageVehicleType; return $this; } /** - * Gets payCode + * Gets nationalMinimumWage * - * @return string|null + * @return bool|null */ - public function getPayCode(): ?string + public function getNationalMinimumWage(): ?bool { - return $this->container['payCode']; + return $this->container['nationalMinimumWage']; } /** - * Sets payCode + * Sets nationalMinimumWage * - * @param string|null $payCode If you want the Employees pay to be allocated to a code other than BASIC, specify it here + * @param bool|null $nationalMinimumWage nationalMinimumWage * * @return $this */ - public function setPayCode(?string $payCode): static + public function setNationalMinimumWage(?bool $nationalMinimumWage): static { - if (is_null($payCode)) { - array_push($this->openAPINullablesSetToNull, 'payCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($nationalMinimumWage)) { + throw new InvalidArgumentException('non-nullable nationalMinimumWage cannot be null'); } - $this->container['payCode'] = $payCode; + $this->container['nationalMinimumWage'] = $nationalMinimumWage; return $this; } /** - * Gets mileageVehicleType + * Gets niTable * - * @return \SynergiTech\Staffology\Model\MileageVehicleType|null + * @return string|null */ - public function getMileageVehicleType(): ?\SynergiTech\Staffology\Model\MileageVehicleType + public function getNiTable(): ?string { - return $this->container['mileageVehicleType']; + return $this->container['niTable']; } /** - * Sets mileageVehicleType + * Sets niTable * - * @param \SynergiTech\Staffology\Model\MileageVehicleType|null $mileageVehicleType mileageVehicleType + * @param string|null $niTable niTable * * @return $this */ - public function setMileageVehicleType(?\SynergiTech\Staffology\Model\MileageVehicleType $mileageVehicleType): static + public function setNiTable(?string $niTable): static { - if (is_null($mileageVehicleType)) { - throw new InvalidArgumentException('non-nullable mileageVehicleType cannot be null'); + if (is_null($niTable)) { + throw new InvalidArgumentException('non-nullable niTable cannot be null'); } - $this->container['mileageVehicleType'] = $mileageVehicleType; + $this->container['niTable'] = $niTable; return $this; } /** - * Gets mapsMiles + * Gets ordinal * * @return int|null */ - public function getMapsMiles(): ?int + public function getOrdinal(): ?int { - return $this->container['mapsMiles']; + return $this->container['ordinal']; } /** - * Sets mapsMiles + * Sets ordinal * - * @param int|null $mapsMiles The number of miles to pay for as Mileage Allowance Payments + * @param int|null $ordinal Indicates whether to use first, second, third (etc) PaySchedule for this PayPeriod. * * @return $this */ - public function setMapsMiles(?int $mapsMiles): static + public function setOrdinal(?int $ordinal): static { - if (is_null($mapsMiles)) { - array_push($this->openAPINullablesSetToNull, 'mapsMiles'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mapsMiles', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['mapsMiles'] = $mapsMiles; + $this->container['ordinal'] = $ordinal; return $this; } @@ -829,204 +849,184 @@ public function setPayAmountMultiplier(?float $payAmountMultiplier): static } /** - * Gets baseHourlyRate - * - * @return float|null - */ - public function getBaseHourlyRate(): ?float - { - return $this->container['baseHourlyRate']; - } - - /** - * Sets baseHourlyRate - * - * @param float|null $baseHourlyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base hourly rate. Eg Overtime. If this is set as zero then we'll attempt to calculate a value based on the other fields - * - * @return $this - */ - public function setBaseHourlyRate(?float $baseHourlyRate): static - { - if (is_null($baseHourlyRate)) { - throw new InvalidArgumentException('non-nullable baseHourlyRate cannot be null'); - } - $this->container['baseHourlyRate'] = $baseHourlyRate; - - return $this; - } - - /** - * Gets baseDailyRate + * Gets payCode * - * @return float|null + * @return string|null */ - public function getBaseDailyRate(): ?float + public function getPayCode(): ?string { - return $this->container['baseDailyRate']; + return $this->container['payCode']; } /** - * Sets baseDailyRate + * Sets payCode * - * @param float|null $baseDailyRate This property is used to calculate values for PayCodes that are set as multiples of the employees base daily rate. Eg sick. If this is set as zero then we'll attempt to calculate a value based on the other fields + * @param string|null $payCode If you want the Employees pay to be allocated to a code other than BASIC, specify it here * * @return $this */ - public function setBaseDailyRate(?float $baseDailyRate): static + public function setPayCode(?string $payCode): static { - if (is_null($baseDailyRate)) { - throw new InvalidArgumentException('non-nullable baseDailyRate cannot be null'); + if (is_null($payCode)) { + array_push($this->openAPINullablesSetToNull, 'payCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['baseDailyRate'] = $baseDailyRate; + $this->container['payCode'] = $payCode; return $this; } /** - * Gets basicPay + * Gets period * - * @return float|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getBasicPay(): ?float + public function getPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['basicPay']; + return $this->container['period']; } /** - * Sets basicPay + * Sets period * - * @param float|null $basicPay The amount of basic pay the Employee is regularly paid each period This amount is the combined total of all pay elements that contribute to basic pay + * @param \SynergiTech\Staffology\Model\PayPeriods|null $period period * * @return $this */ - public function setBasicPay(?float $basicPay): static + public function setPeriod(?\SynergiTech\Staffology\Model\PayPeriods $period): static { - if (is_null($basicPay)) { - throw new InvalidArgumentException('non-nullable basicPay cannot be null'); + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['basicPay'] = $basicPay; + $this->container['period'] = $period; return $this; } /** - * Gets autoAdjustForLeave + * Gets regularPayLines * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PayLine[]|null */ - public function getAutoAdjustForLeave(): ?bool + public function getRegularPayLines(): ?array { - return $this->container['autoAdjustForLeave']; + return $this->container['regularPayLines']; } /** - * Sets autoAdjustForLeave + * Sets regularPayLines * - * @param bool|null $autoAdjustForLeave This sets whether the PayLine should be automatically adjusted or not for: Leave Entries; Starters/Leavers; PayLine effectiveFrom and effectiveTo values falling mid-way through a PayRun + * @param \SynergiTech\Staffology\Model\PayLine[]|null $regularPayLines These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. * * @return $this */ - public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static + public function setRegularPayLines(?array $regularPayLines): static { - if (is_null($autoAdjustForLeave)) { - throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); + if (is_null($regularPayLines)) { + array_push($this->openAPINullablesSetToNull, 'regularPayLines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('regularPayLines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; + $this->container['regularPayLines'] = $regularPayLines; return $this; } /** - * Gets niTable + * Gets tags * - * @return string|null + * @return string[]|null */ - public function getNiTable(): ?string + public function getTags(): ?array { - return $this->container['niTable']; + return $this->container['tags']; } /** - * Sets niTable + * Sets tags * - * @param string|null $niTable niTable + * @param string[]|null $tags tags * * @return $this */ - public function setNiTable(?string $niTable): static + public function setTags(?array $tags): static { - if (is_null($niTable)) { - throw new InvalidArgumentException('non-nullable niTable cannot be null'); + if (is_null($tags)) { + array_push($this->openAPINullablesSetToNull, 'tags'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tags', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['niTable'] = $niTable; + $this->container['tags'] = $tags; return $this; } /** - * Gets regularPayLines + * Gets taxAndNi * - * @return \SynergiTech\Staffology\Model\PayLine[]|null + * @return \SynergiTech\Staffology\Model\TaxAndNi|null */ - public function getRegularPayLines(): ?array + public function getTaxAndNi(): ?\SynergiTech\Staffology\Model\TaxAndNi { - return $this->container['regularPayLines']; + return $this->container['taxAndNi']; } /** - * Sets regularPayLines + * Sets taxAndNi * - * @param \SynergiTech\Staffology\Model\PayLine[]|null $regularPayLines These are used to make additions/deductions to the pay for this Employee. You do not need to include Pension, Tax, NI, Loan Repayments, etc as these will all be automatically created. + * @param \SynergiTech\Staffology\Model\TaxAndNi|null $taxAndNi taxAndNi * * @return $this */ - public function setRegularPayLines(?array $regularPayLines): static + public function setTaxAndNi(?\SynergiTech\Staffology\Model\TaxAndNi $taxAndNi): static { - if (is_null($regularPayLines)) { - array_push($this->openAPINullablesSetToNull, 'regularPayLines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('regularPayLines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($taxAndNi)) { + throw new InvalidArgumentException('non-nullable taxAndNi cannot be null'); } - $this->container['regularPayLines'] = $regularPayLines; + $this->container['taxAndNi'] = $taxAndNi; return $this; } /** - * Gets excludedRegularPayLines + * Gets withholdTaxRefundIfPayIsZero * - * @return \SynergiTech\Staffology\Model\PayLine[]|null + * @return bool|null */ - public function getExcludedRegularPayLines(): ?array + public function getWithholdTaxRefundIfPayIsZero(): ?bool { - return $this->container['excludedRegularPayLines']; + return $this->container['withholdTaxRefundIfPayIsZero']; } /** - * Sets excludedRegularPayLines + * Sets withholdTaxRefundIfPayIsZero * - * @param \SynergiTech\Staffology\Model\PayLine[]|null $excludedRegularPayLines These used to store the PayLines that have been excluded from RegularPaylines. + * @param bool|null $withholdTaxRefundIfPayIsZero If you don't want negative PAYE values when the Gross pay is zero, set this to true * * @return $this */ - public function setExcludedRegularPayLines(?array $excludedRegularPayLines): static + public function setWithholdTaxRefundIfPayIsZero(?bool $withholdTaxRefundIfPayIsZero): static { - if (is_null($excludedRegularPayLines)) { - array_push($this->openAPINullablesSetToNull, 'excludedRegularPayLines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('excludedRegularPayLines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($withholdTaxRefundIfPayIsZero)) { + throw new InvalidArgumentException('non-nullable withholdTaxRefundIfPayIsZero cannot be null'); } - $this->container['excludedRegularPayLines'] = $excludedRegularPayLines; + $this->container['withholdTaxRefundIfPayIsZero'] = $withholdTaxRefundIfPayIsZero; return $this; } diff --git a/src/Model/PayOptionsImport.php b/src/Model/PayOptionsImport.php index 76c8dcd..3486334 100644 --- a/src/Model/PayOptionsImport.php +++ b/src/Model/PayOptionsImport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,29 +60,29 @@ class PayOptionsImport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'employerIdentifier' => 'string', - 'payrollCode' => 'string', - 'payAmount' => 'float', + 'analysisCategoryCodes' => '\SynergiTech\Staffology\Model\AnalysisCategoryCodes[]', + 'autoAdjustForLeave' => 'bool', 'basis' => '\SynergiTech\Staffology\Model\PayBasis', - 'payCode' => 'string', - 'roleReference' => 'string', - 'payAmountMultiplier' => 'float', - 'note' => 'string', - 'tags' => 'string[]', - 'isNetToGross' => 'bool', - 'department' => 'string', + 'contributesToBasicPay' => 'bool', 'costCentre' => 'string', - 'analysisCategoryCodes' => '\SynergiTech\Staffology\Model\AnalysisCategoryCodes[]', - 'lines' => '\SynergiTech\Staffology\Model\PayLine[]', + 'department' => 'string', 'effectiveFrom' => '\DateTime', 'effectiveTo' => '\DateTime', - 'isAutomaticBackPay' => 'bool', + 'employerIdentifier' => 'string', 'ignoreInitialBackPay' => 'bool', - 'contributesToBasicPay' => 'bool', - 'autoAdjustForLeave' => 'bool', - 'paySpine' => 'string', + 'isAutomaticBackPay' => 'bool', + 'isNetToGross' => 'bool', + 'lines' => '\SynergiTech\Staffology\Model\PayLine[]', + 'note' => 'string', + 'payAmount' => 'float', + 'payAmountMultiplier' => 'float', + 'payCode' => 'string', 'payGrade' => 'string', - 'spinePoint' => 'string' + 'paySpine' => 'string', + 'payrollCode' => 'string', + 'roleReference' => 'string', + 'spinePoint' => 'string', + 'tags' => 'string[]' ]; /** @@ -91,29 +91,29 @@ class PayOptionsImport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'employerIdentifier' => null, - 'payrollCode' => null, - 'payAmount' => 'double', + 'analysisCategoryCodes' => null, + 'autoAdjustForLeave' => null, 'basis' => null, - 'payCode' => null, - 'roleReference' => null, - 'payAmountMultiplier' => 'double', - 'note' => null, - 'tags' => null, - 'isNetToGross' => null, - 'department' => null, + 'contributesToBasicPay' => null, 'costCentre' => null, - 'analysisCategoryCodes' => null, - 'lines' => null, + 'department' => null, 'effectiveFrom' => 'date', 'effectiveTo' => 'date', - 'isAutomaticBackPay' => null, + 'employerIdentifier' => null, 'ignoreInitialBackPay' => null, - 'contributesToBasicPay' => null, - 'autoAdjustForLeave' => null, - 'paySpine' => null, + 'isAutomaticBackPay' => null, + 'isNetToGross' => null, + 'lines' => null, + 'note' => null, + 'payAmount' => 'double', + 'payAmountMultiplier' => 'double', + 'payCode' => null, 'payGrade' => null, - 'spinePoint' => null + 'paySpine' => null, + 'payrollCode' => null, + 'roleReference' => null, + 'spinePoint' => null, + 'tags' => null ]; /** @@ -122,29 +122,29 @@ class PayOptionsImport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'employerIdentifier' => true, - 'payrollCode' => true, - 'payAmount' => false, + 'analysisCategoryCodes' => true, + 'autoAdjustForLeave' => false, 'basis' => false, - 'payCode' => true, - 'roleReference' => true, - 'payAmountMultiplier' => false, - 'note' => true, - 'tags' => true, - 'isNetToGross' => false, - 'department' => true, + 'contributesToBasicPay' => false, 'costCentre' => true, - 'analysisCategoryCodes' => true, - 'lines' => true, + 'department' => true, 'effectiveFrom' => true, 'effectiveTo' => true, - 'isAutomaticBackPay' => false, + 'employerIdentifier' => true, 'ignoreInitialBackPay' => false, - 'contributesToBasicPay' => false, - 'autoAdjustForLeave' => false, - 'paySpine' => true, + 'isAutomaticBackPay' => false, + 'isNetToGross' => false, + 'lines' => true, + 'note' => true, + 'payAmount' => false, + 'payAmountMultiplier' => false, + 'payCode' => true, 'payGrade' => true, - 'spinePoint' => true + 'paySpine' => true, + 'payrollCode' => true, + 'roleReference' => true, + 'spinePoint' => true, + 'tags' => true ]; /** @@ -233,29 +233,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employerIdentifier' => 'employerIdentifier', - 'payrollCode' => 'payrollCode', - 'payAmount' => 'payAmount', + 'analysisCategoryCodes' => 'analysisCategoryCodes', + 'autoAdjustForLeave' => 'autoAdjustForLeave', 'basis' => 'basis', - 'payCode' => 'payCode', - 'roleReference' => 'roleReference', - 'payAmountMultiplier' => 'payAmountMultiplier', - 'note' => 'note', - 'tags' => 'tags', - 'isNetToGross' => 'isNetToGross', - 'department' => 'department', + 'contributesToBasicPay' => 'contributesToBasicPay', 'costCentre' => 'costCentre', - 'analysisCategoryCodes' => 'analysisCategoryCodes', - 'lines' => 'lines', + 'department' => 'department', 'effectiveFrom' => 'effectiveFrom', 'effectiveTo' => 'effectiveTo', - 'isAutomaticBackPay' => 'isAutomaticBackPay', + 'employerIdentifier' => 'employerIdentifier', 'ignoreInitialBackPay' => 'ignoreInitialBackPay', - 'contributesToBasicPay' => 'contributesToBasicPay', - 'autoAdjustForLeave' => 'autoAdjustForLeave', - 'paySpine' => 'paySpine', + 'isAutomaticBackPay' => 'isAutomaticBackPay', + 'isNetToGross' => 'isNetToGross', + 'lines' => 'lines', + 'note' => 'note', + 'payAmount' => 'payAmount', + 'payAmountMultiplier' => 'payAmountMultiplier', + 'payCode' => 'payCode', 'payGrade' => 'payGrade', - 'spinePoint' => 'spinePoint' + 'paySpine' => 'paySpine', + 'payrollCode' => 'payrollCode', + 'roleReference' => 'roleReference', + 'spinePoint' => 'spinePoint', + 'tags' => 'tags' ]; /** @@ -264,29 +264,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employerIdentifier' => 'setEmployerIdentifier', - 'payrollCode' => 'setPayrollCode', - 'payAmount' => 'setPayAmount', + 'analysisCategoryCodes' => 'setAnalysisCategoryCodes', + 'autoAdjustForLeave' => 'setAutoAdjustForLeave', 'basis' => 'setBasis', - 'payCode' => 'setPayCode', - 'roleReference' => 'setRoleReference', - 'payAmountMultiplier' => 'setPayAmountMultiplier', - 'note' => 'setNote', - 'tags' => 'setTags', - 'isNetToGross' => 'setIsNetToGross', - 'department' => 'setDepartment', + 'contributesToBasicPay' => 'setContributesToBasicPay', 'costCentre' => 'setCostCentre', - 'analysisCategoryCodes' => 'setAnalysisCategoryCodes', - 'lines' => 'setLines', + 'department' => 'setDepartment', 'effectiveFrom' => 'setEffectiveFrom', 'effectiveTo' => 'setEffectiveTo', - 'isAutomaticBackPay' => 'setIsAutomaticBackPay', + 'employerIdentifier' => 'setEmployerIdentifier', 'ignoreInitialBackPay' => 'setIgnoreInitialBackPay', - 'contributesToBasicPay' => 'setContributesToBasicPay', - 'autoAdjustForLeave' => 'setAutoAdjustForLeave', - 'paySpine' => 'setPaySpine', + 'isAutomaticBackPay' => 'setIsAutomaticBackPay', + 'isNetToGross' => 'setIsNetToGross', + 'lines' => 'setLines', + 'note' => 'setNote', + 'payAmount' => 'setPayAmount', + 'payAmountMultiplier' => 'setPayAmountMultiplier', + 'payCode' => 'setPayCode', 'payGrade' => 'setPayGrade', - 'spinePoint' => 'setSpinePoint' + 'paySpine' => 'setPaySpine', + 'payrollCode' => 'setPayrollCode', + 'roleReference' => 'setRoleReference', + 'spinePoint' => 'setSpinePoint', + 'tags' => 'setTags' ]; /** @@ -295,29 +295,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employerIdentifier' => 'getEmployerIdentifier', - 'payrollCode' => 'getPayrollCode', - 'payAmount' => 'getPayAmount', + 'analysisCategoryCodes' => 'getAnalysisCategoryCodes', + 'autoAdjustForLeave' => 'getAutoAdjustForLeave', 'basis' => 'getBasis', - 'payCode' => 'getPayCode', - 'roleReference' => 'getRoleReference', - 'payAmountMultiplier' => 'getPayAmountMultiplier', - 'note' => 'getNote', - 'tags' => 'getTags', - 'isNetToGross' => 'getIsNetToGross', - 'department' => 'getDepartment', + 'contributesToBasicPay' => 'getContributesToBasicPay', 'costCentre' => 'getCostCentre', - 'analysisCategoryCodes' => 'getAnalysisCategoryCodes', - 'lines' => 'getLines', + 'department' => 'getDepartment', 'effectiveFrom' => 'getEffectiveFrom', 'effectiveTo' => 'getEffectiveTo', - 'isAutomaticBackPay' => 'getIsAutomaticBackPay', + 'employerIdentifier' => 'getEmployerIdentifier', 'ignoreInitialBackPay' => 'getIgnoreInitialBackPay', - 'contributesToBasicPay' => 'getContributesToBasicPay', - 'autoAdjustForLeave' => 'getAutoAdjustForLeave', - 'paySpine' => 'getPaySpine', + 'isAutomaticBackPay' => 'getIsAutomaticBackPay', + 'isNetToGross' => 'getIsNetToGross', + 'lines' => 'getLines', + 'note' => 'getNote', + 'payAmount' => 'getPayAmount', + 'payAmountMultiplier' => 'getPayAmountMultiplier', + 'payCode' => 'getPayCode', 'payGrade' => 'getPayGrade', - 'spinePoint' => 'getSpinePoint' + 'paySpine' => 'getPaySpine', + 'payrollCode' => 'getPayrollCode', + 'roleReference' => 'getRoleReference', + 'spinePoint' => 'getSpinePoint', + 'tags' => 'getTags' ]; /** @@ -376,29 +376,29 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employerIdentifier', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('payAmount', $data ?? [], null); + $this->setIfExists('analysisCategoryCodes', $data ?? [], null); + $this->setIfExists('autoAdjustForLeave', $data ?? [], null); $this->setIfExists('basis', $data ?? [], null); - $this->setIfExists('payCode', $data ?? [], null); - $this->setIfExists('roleReference', $data ?? [], null); - $this->setIfExists('payAmountMultiplier', $data ?? [], null); - $this->setIfExists('note', $data ?? [], null); - $this->setIfExists('tags', $data ?? [], null); - $this->setIfExists('isNetToGross', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('contributesToBasicPay', $data ?? [], null); $this->setIfExists('costCentre', $data ?? [], null); - $this->setIfExists('analysisCategoryCodes', $data ?? [], null); - $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); $this->setIfExists('effectiveFrom', $data ?? [], null); $this->setIfExists('effectiveTo', $data ?? [], null); - $this->setIfExists('isAutomaticBackPay', $data ?? [], null); + $this->setIfExists('employerIdentifier', $data ?? [], null); $this->setIfExists('ignoreInitialBackPay', $data ?? [], null); - $this->setIfExists('contributesToBasicPay', $data ?? [], null); - $this->setIfExists('autoAdjustForLeave', $data ?? [], null); - $this->setIfExists('paySpine', $data ?? [], null); + $this->setIfExists('isAutomaticBackPay', $data ?? [], null); + $this->setIfExists('isNetToGross', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('note', $data ?? [], null); + $this->setIfExists('payAmount', $data ?? [], null); + $this->setIfExists('payAmountMultiplier', $data ?? [], null); + $this->setIfExists('payCode', $data ?? [], null); $this->setIfExists('payGrade', $data ?? [], null); + $this->setIfExists('paySpine', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('roleReference', $data ?? [], null); $this->setIfExists('spinePoint', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); } /** @@ -444,96 +444,62 @@ public function valid(): bool /** - * Gets employerIdentifier + * Gets analysisCategoryCodes * - * @return string|null + * @return \SynergiTech\Staffology\Model\AnalysisCategoryCodes[]|null */ - public function getEmployerIdentifier(): ?string + public function getAnalysisCategoryCodes(): ?array { - return $this->container['employerIdentifier']; + return $this->container['analysisCategoryCodes']; } /** - * Sets employerIdentifier + * Sets analysisCategoryCodes * - * @param string|null $employerIdentifier Optional. But if one entry has it then all must. Allows you to import to multiple employers by specifying the Employers AlternativeIdentifier + * @param \SynergiTech\Staffology\Model\AnalysisCategoryCodes[]|null $analysisCategoryCodes List of Analysis Category Codes associated with this item on the payslip. * * @return $this */ - public function setEmployerIdentifier(?string $employerIdentifier): static + public function setAnalysisCategoryCodes(?array $analysisCategoryCodes): static { - if (is_null($employerIdentifier)) { - array_push($this->openAPINullablesSetToNull, 'employerIdentifier'); + if (is_null($analysisCategoryCodes)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodes'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerIdentifier', $nullablesSetToNull); + $index = array_search('analysisCategoryCodes', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employerIdentifier'] = $employerIdentifier; + $this->container['analysisCategoryCodes'] = $analysisCategoryCodes; return $this; } /** - * Gets payrollCode + * Gets autoAdjustForLeave * - * @return string|null + * @return bool|null */ - public function getPayrollCode(): ?string + public function getAutoAdjustForLeave(): ?bool { - return $this->container['payrollCode']; + return $this->container['autoAdjustForLeave']; } /** - * Sets payrollCode + * Sets autoAdjustForLeave * - * @param string|null $payrollCode The payroll code of the employee to update + * @param bool|null $autoAdjustForLeave AutoAdjustForLeave for imported pay lines * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['payrollCode'] = $payrollCode; - - return $this; - } - - /** - * Gets payAmount - * - * @return float|null - */ - public function getPayAmount(): ?float - { - return $this->container['payAmount']; - } - - /** - * Sets payAmount - * - * @param float|null $payAmount The amount the Employee is regularly paid each period - * - * @return $this - */ - public function setPayAmount(?float $payAmount): static - { - if (is_null($payAmount)) { - throw new InvalidArgumentException('non-nullable payAmount cannot be null'); + if (is_null($autoAdjustForLeave)) { + throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); } - $this->container['payAmount'] = $payAmount; + $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; return $this; } @@ -566,293 +532,279 @@ public function setBasis(?\SynergiTech\Staffology\Model\PayBasis $basis): static } /** - * Gets payCode + * Gets contributesToBasicPay * - * @return string|null + * @return bool|null */ - public function getPayCode(): ?string + public function getContributesToBasicPay(): ?bool { - return $this->container['payCode']; + return $this->container['contributesToBasicPay']; } /** - * Sets payCode + * Sets contributesToBasicPay * - * @param string|null $payCode If you want to override the PayCode used for the Basic Pay then set the code here, otherwise leave this blank and the default will be used. + * @param bool|null $contributesToBasicPay ContributesToBasicPay for imported pay lines * * @return $this */ - public function setPayCode(?string $payCode): static + public function setContributesToBasicPay(?bool $contributesToBasicPay): static { - if (is_null($payCode)) { - array_push($this->openAPINullablesSetToNull, 'payCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($contributesToBasicPay)) { + throw new InvalidArgumentException('non-nullable contributesToBasicPay cannot be null'); } - $this->container['payCode'] = $payCode; + $this->container['contributesToBasicPay'] = $contributesToBasicPay; return $this; } /** - * Gets roleReference + * Gets costCentre * * @return string|null */ - public function getRoleReference(): ?string + public function getCostCentre(): ?string { - return $this->container['roleReference']; + return $this->container['costCentre']; } /** - * Sets roleReference + * Sets costCentre * - * @param string|null $roleReference This is the unique reference of the Role that the employee is assigned to. + * @param string|null $costCentre Any CostCentre that you'd like to appear on the payslip * * @return $this */ - public function setRoleReference(?string $roleReference): static + public function setCostCentre(?string $costCentre): static { - if (is_null($roleReference)) { - array_push($this->openAPINullablesSetToNull, 'roleReference'); + if (is_null($costCentre)) { + array_push($this->openAPINullablesSetToNull, 'costCentre'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('roleReference', $nullablesSetToNull); + $index = array_search('costCentre', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['roleReference'] = $roleReference; + $this->container['costCentre'] = $costCentre; return $this; } /** - * Gets payAmountMultiplier + * Gets department * - * @return float|null + * @return string|null */ - public function getPayAmountMultiplier(): ?float + public function getDepartment(): ?string { - return $this->container['payAmountMultiplier']; + return $this->container['department']; } /** - * Sets payAmountMultiplier + * Sets department * - * @param float|null $payAmountMultiplier This property is irrelevant if the basis is Monthly. But if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period. + * @param string|null $department Any Department that you'd like to appear on the payslip * * @return $this */ - public function setPayAmountMultiplier(?float $payAmountMultiplier): static + public function setDepartment(?string $department): static { - if (is_null($payAmountMultiplier)) { - throw new InvalidArgumentException('non-nullable payAmountMultiplier cannot be null'); + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('department', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payAmountMultiplier'] = $payAmountMultiplier; + $this->container['department'] = $department; return $this; } /** - * Gets note + * Gets effectiveFrom * - * @return string|null + * @return \DateTime|null */ - public function getNote(): ?string + public function getEffectiveFrom(): ?\DateTime { - return $this->container['note']; + return $this->container['effectiveFrom']; } /** - * Sets note + * Sets effectiveFrom * - * @param string|null $note Any note that you'd like to appear on the payslip + * @param \DateTime|null $effectiveFrom EffectiveFrom date for imported pay lines * * @return $this */ - public function setNote(?string $note): static + public function setEffectiveFrom(?\DateTime $effectiveFrom): static { - if (is_null($note)) { - array_push($this->openAPINullablesSetToNull, 'note'); + if (is_null($effectiveFrom)) { + array_push($this->openAPINullablesSetToNull, 'effectiveFrom'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('note', $nullablesSetToNull); + $index = array_search('effectiveFrom', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['note'] = $note; + $this->container['effectiveFrom'] = $effectiveFrom; return $this; } /** - * Gets tags + * Gets effectiveTo * - * @return string[]|null + * @return \DateTime|null */ - public function getTags(): ?array + public function getEffectiveTo(): ?\DateTime { - return $this->container['tags']; + return $this->container['effectiveTo']; } /** - * Sets tags + * Sets effectiveTo * - * @param string[]|null $tags tags + * @param \DateTime|null $effectiveTo EffectiveTo date for imported pay lines * * @return $this */ - public function setTags(?array $tags): static + public function setEffectiveTo(?\DateTime $effectiveTo): static { - if (is_null($tags)) { - array_push($this->openAPINullablesSetToNull, 'tags'); + if (is_null($effectiveTo)) { + array_push($this->openAPINullablesSetToNull, 'effectiveTo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tags', $nullablesSetToNull); + $index = array_search('effectiveTo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tags'] = $tags; + $this->container['effectiveTo'] = $effectiveTo; return $this; } /** - * Gets isNetToGross + * Gets employerIdentifier * - * @return bool|null + * @return string|null */ - public function getIsNetToGross(): ?bool + public function getEmployerIdentifier(): ?string { - return $this->container['isNetToGross']; + return $this->container['employerIdentifier']; } /** - * Sets isNetToGross + * Sets employerIdentifier * - * @param bool|null $isNetToGross isNetToGross + * @param string|null $employerIdentifier Optional. But if one entry has it then all must. Allows you to import to multiple employers by specifying the Employers AlternativeIdentifier * * @return $this */ - public function setIsNetToGross(?bool $isNetToGross): static + public function setEmployerIdentifier(?string $employerIdentifier): static { - if (is_null($isNetToGross)) { - throw new InvalidArgumentException('non-nullable isNetToGross cannot be null'); + if (is_null($employerIdentifier)) { + array_push($this->openAPINullablesSetToNull, 'employerIdentifier'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employerIdentifier', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isNetToGross'] = $isNetToGross; + $this->container['employerIdentifier'] = $employerIdentifier; return $this; } /** - * Gets department + * Gets ignoreInitialBackPay * - * @return string|null + * @return bool|null */ - public function getDepartment(): ?string + public function getIgnoreInitialBackPay(): ?bool { - return $this->container['department']; + return $this->container['ignoreInitialBackPay']; } /** - * Sets department + * Sets ignoreInitialBackPay * - * @param string|null $department Any Department that you'd like to appear on the payslip + * @param bool|null $ignoreInitialBackPay IgnoreInitialBackPay for imported pay lines * * @return $this */ - public function setDepartment(?string $department): static + public function setIgnoreInitialBackPay(?bool $ignoreInitialBackPay): static { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($ignoreInitialBackPay)) { + throw new InvalidArgumentException('non-nullable ignoreInitialBackPay cannot be null'); } - $this->container['department'] = $department; + $this->container['ignoreInitialBackPay'] = $ignoreInitialBackPay; return $this; } /** - * Gets costCentre + * Gets isAutomaticBackPay * - * @return string|null + * @return bool|null */ - public function getCostCentre(): ?string + public function getIsAutomaticBackPay(): ?bool { - return $this->container['costCentre']; + return $this->container['isAutomaticBackPay']; } /** - * Sets costCentre + * Sets isAutomaticBackPay * - * @param string|null $costCentre Any CostCentre that you'd like to appear on the payslip + * @param bool|null $isAutomaticBackPay IsAutomaticBackPay for imported pay lines * * @return $this */ - public function setCostCentre(?string $costCentre): static + public function setIsAutomaticBackPay(?bool $isAutomaticBackPay): static { - if (is_null($costCentre)) { - array_push($this->openAPINullablesSetToNull, 'costCentre'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costCentre', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isAutomaticBackPay)) { + throw new InvalidArgumentException('non-nullable isAutomaticBackPay cannot be null'); } - $this->container['costCentre'] = $costCentre; + $this->container['isAutomaticBackPay'] = $isAutomaticBackPay; return $this; } /** - * Gets analysisCategoryCodes + * Gets isNetToGross * - * @return \SynergiTech\Staffology\Model\AnalysisCategoryCodes[]|null + * @return bool|null */ - public function getAnalysisCategoryCodes(): ?array + public function getIsNetToGross(): ?bool { - return $this->container['analysisCategoryCodes']; + return $this->container['isNetToGross']; } /** - * Sets analysisCategoryCodes + * Sets isNetToGross * - * @param \SynergiTech\Staffology\Model\AnalysisCategoryCodes[]|null $analysisCategoryCodes List of Analysis Category Codes associated with this item on the payslip. + * @param bool|null $isNetToGross isNetToGross * * @return $this */ - public function setAnalysisCategoryCodes(?array $analysisCategoryCodes): static + public function setIsNetToGross(?bool $isNetToGross): static { - if (is_null($analysisCategoryCodes)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodes'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryCodes', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isNetToGross)) { + throw new InvalidArgumentException('non-nullable isNetToGross cannot be null'); } - $this->container['analysisCategoryCodes'] = $analysisCategoryCodes; + $this->container['isNetToGross'] = $isNetToGross; return $this; } @@ -892,245 +844,259 @@ public function setLines(?array $lines): static } /** - * Gets effectiveFrom + * Gets note * - * @return \DateTime|null + * @return string|null */ - public function getEffectiveFrom(): ?\DateTime + public function getNote(): ?string { - return $this->container['effectiveFrom']; + return $this->container['note']; } /** - * Sets effectiveFrom + * Sets note * - * @param \DateTime|null $effectiveFrom EffectiveFrom date for imported pay lines + * @param string|null $note Any note that you'd like to appear on the payslip * * @return $this */ - public function setEffectiveFrom(?\DateTime $effectiveFrom): static + public function setNote(?string $note): static { - if (is_null($effectiveFrom)) { - array_push($this->openAPINullablesSetToNull, 'effectiveFrom'); + if (is_null($note)) { + array_push($this->openAPINullablesSetToNull, 'note'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('effectiveFrom', $nullablesSetToNull); + $index = array_search('note', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['effectiveFrom'] = $effectiveFrom; + $this->container['note'] = $note; return $this; } /** - * Gets effectiveTo + * Gets payAmount * - * @return \DateTime|null + * @return float|null */ - public function getEffectiveTo(): ?\DateTime + public function getPayAmount(): ?float { - return $this->container['effectiveTo']; + return $this->container['payAmount']; } /** - * Sets effectiveTo + * Sets payAmount * - * @param \DateTime|null $effectiveTo EffectiveTo date for imported pay lines + * @param float|null $payAmount The amount the Employee is regularly paid each period * * @return $this */ - public function setEffectiveTo(?\DateTime $effectiveTo): static + public function setPayAmount(?float $payAmount): static { - if (is_null($effectiveTo)) { - array_push($this->openAPINullablesSetToNull, 'effectiveTo'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('effectiveTo', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payAmount)) { + throw new InvalidArgumentException('non-nullable payAmount cannot be null'); } - $this->container['effectiveTo'] = $effectiveTo; + $this->container['payAmount'] = $payAmount; return $this; } /** - * Gets isAutomaticBackPay + * Gets payAmountMultiplier * - * @return bool|null + * @return float|null */ - public function getIsAutomaticBackPay(): ?bool + public function getPayAmountMultiplier(): ?float { - return $this->container['isAutomaticBackPay']; + return $this->container['payAmountMultiplier']; } /** - * Sets isAutomaticBackPay + * Sets payAmountMultiplier * - * @param bool|null $isAutomaticBackPay IsAutomaticBackPay for imported pay lines + * @param float|null $payAmountMultiplier This property is irrelevant if the basis is Monthly. But if the basis is Daily or Hourly then this property sets how many days/hours the employee should be paid for in the period. * * @return $this */ - public function setIsAutomaticBackPay(?bool $isAutomaticBackPay): static + public function setPayAmountMultiplier(?float $payAmountMultiplier): static { - if (is_null($isAutomaticBackPay)) { - throw new InvalidArgumentException('non-nullable isAutomaticBackPay cannot be null'); + if (is_null($payAmountMultiplier)) { + throw new InvalidArgumentException('non-nullable payAmountMultiplier cannot be null'); } - $this->container['isAutomaticBackPay'] = $isAutomaticBackPay; + $this->container['payAmountMultiplier'] = $payAmountMultiplier; return $this; } /** - * Gets ignoreInitialBackPay + * Gets payCode * - * @return bool|null + * @return string|null */ - public function getIgnoreInitialBackPay(): ?bool + public function getPayCode(): ?string { - return $this->container['ignoreInitialBackPay']; + return $this->container['payCode']; } /** - * Sets ignoreInitialBackPay + * Sets payCode * - * @param bool|null $ignoreInitialBackPay IgnoreInitialBackPay for imported pay lines + * @param string|null $payCode If you want to override the PayCode used for the Basic Pay then set the code here, otherwise leave this blank and the default will be used. * * @return $this */ - public function setIgnoreInitialBackPay(?bool $ignoreInitialBackPay): static + public function setPayCode(?string $payCode): static { - if (is_null($ignoreInitialBackPay)) { - throw new InvalidArgumentException('non-nullable ignoreInitialBackPay cannot be null'); + if (is_null($payCode)) { + array_push($this->openAPINullablesSetToNull, 'payCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['ignoreInitialBackPay'] = $ignoreInitialBackPay; + $this->container['payCode'] = $payCode; return $this; } /** - * Gets contributesToBasicPay + * Gets payGrade * - * @return bool|null + * @return string|null */ - public function getContributesToBasicPay(): ?bool + public function getPayGrade(): ?string { - return $this->container['contributesToBasicPay']; + return $this->container['payGrade']; } /** - * Sets contributesToBasicPay + * Sets payGrade * - * @param bool|null $contributesToBasicPay ContributesToBasicPay for imported pay lines + * @param string|null $payGrade PayGrade for imported pay lines * * @return $this */ - public function setContributesToBasicPay(?bool $contributesToBasicPay): static + public function setPayGrade(?string $payGrade): static { - if (is_null($contributesToBasicPay)) { - throw new InvalidArgumentException('non-nullable contributesToBasicPay cannot be null'); + if (is_null($payGrade)) { + array_push($this->openAPINullablesSetToNull, 'payGrade'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payGrade', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['contributesToBasicPay'] = $contributesToBasicPay; + $this->container['payGrade'] = $payGrade; return $this; } /** - * Gets autoAdjustForLeave + * Gets paySpine * - * @return bool|null + * @return string|null */ - public function getAutoAdjustForLeave(): ?bool + public function getPaySpine(): ?string { - return $this->container['autoAdjustForLeave']; + return $this->container['paySpine']; } /** - * Sets autoAdjustForLeave + * Sets paySpine * - * @param bool|null $autoAdjustForLeave AutoAdjustForLeave for imported pay lines + * @param string|null $paySpine PaySpine for imported pay lines * * @return $this */ - public function setAutoAdjustForLeave(?bool $autoAdjustForLeave): static + public function setPaySpine(?string $paySpine): static { - if (is_null($autoAdjustForLeave)) { - throw new InvalidArgumentException('non-nullable autoAdjustForLeave cannot be null'); + if (is_null($paySpine)) { + array_push($this->openAPINullablesSetToNull, 'paySpine'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('paySpine', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['autoAdjustForLeave'] = $autoAdjustForLeave; + $this->container['paySpine'] = $paySpine; return $this; } /** - * Gets paySpine + * Gets payrollCode * * @return string|null */ - public function getPaySpine(): ?string + public function getPayrollCode(): ?string { - return $this->container['paySpine']; + return $this->container['payrollCode']; } /** - * Sets paySpine + * Sets payrollCode * - * @param string|null $paySpine PaySpine for imported pay lines + * @param string|null $payrollCode The payroll code of the employee to update * * @return $this */ - public function setPaySpine(?string $paySpine): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($paySpine)) { - array_push($this->openAPINullablesSetToNull, 'paySpine'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paySpine', $nullablesSetToNull); + $index = array_search('payrollCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['paySpine'] = $paySpine; + $this->container['payrollCode'] = $payrollCode; return $this; } /** - * Gets payGrade + * Gets roleReference * * @return string|null */ - public function getPayGrade(): ?string + public function getRoleReference(): ?string { - return $this->container['payGrade']; + return $this->container['roleReference']; } /** - * Sets payGrade + * Sets roleReference * - * @param string|null $payGrade PayGrade for imported pay lines + * @param string|null $roleReference This is the unique reference of the Role that the employee is assigned to. * * @return $this */ - public function setPayGrade(?string $payGrade): static + public function setRoleReference(?string $roleReference): static { - if (is_null($payGrade)) { - array_push($this->openAPINullablesSetToNull, 'payGrade'); + if (is_null($roleReference)) { + array_push($this->openAPINullablesSetToNull, 'roleReference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payGrade', $nullablesSetToNull); + $index = array_search('roleReference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payGrade'] = $payGrade; + $this->container['roleReference'] = $roleReference; return $this; } @@ -1168,6 +1134,40 @@ public function setSpinePoint(?string $spinePoint): static return $this; } + + /** + * Gets tags + * + * @return string[]|null + */ + public function getTags(): ?array + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string[]|null $tags tags + * + * @return $this + */ + public function setTags(?array $tags): static + { + if (is_null($tags)) { + array_push($this->openAPINullablesSetToNull, 'tags'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tags', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tags'] = $tags; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PayPeriodEventType.php b/src/Model/PayPeriodEventType.php index e458a09..7d360fc 100644 --- a/src/Model/PayPeriodEventType.php +++ b/src/Model/PayPeriodEventType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayPeriodTypes.php b/src/Model/PayPeriodTypes.php index e5749d5..e2d5feb 100644 --- a/src/Model/PayPeriodTypes.php +++ b/src/Model/PayPeriodTypes.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayPeriods.php b/src/Model/PayPeriods.php index 1524c8d..82bda55 100644 --- a/src/Model/PayPeriods.php +++ b/src/Model/PayPeriods.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayRun.php b/src/Model/PayRun.php index 15a220d..5d613b1 100644 --- a/src/Model/PayRun.php +++ b/src/Model/PayRun.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,25 +60,32 @@ class PayRun implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'taxMonth' => 'int', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'autoPilotCloseDate' => '\DateTime', + 'dateClosed' => '\DateTime', + 'description' => 'string', + 'employeeCount' => 'int', + 'endDate' => '\DateTime', + 'entries' => '\SynergiTech\Staffology\Model\Item[]', + 'isClosed' => 'bool', + 'isCombinedPayRun' => 'bool', + 'isLatestVersion' => 'bool', + 'isRolledBack' => 'bool', + 'navigation' => '\SynergiTech\Staffology\Model\PayRunEntryNavigation', + 'nonRtiEmployeeCount' => 'int', 'ordinal' => 'int', + 'originalPayRunPaymentDate' => '\DateTime', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'paymentDate' => '\DateTime', + 'payslipScheduledDateTime' => '\DateTime', 'period' => 'int', + 'previousVersionTotals' => '\SynergiTech\Staffology\Model\PayRunTotals', 'startDate' => '\DateTime', - 'endDate' => '\DateTime', - 'paymentDate' => '\DateTime', - 'employeeCount' => 'int', + 'state' => '\SynergiTech\Staffology\Model\PayRunState', 'subContractorCount' => 'int', - 'nonRtiEmployeeCount' => 'int', + 'taxMonth' => 'int', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'totals' => '\SynergiTech\Staffology\Model\PayRunTotals', - 'payslipScheduledDateTime' => '\DateTime', - 'state' => '\SynergiTech\Staffology\Model\PayRunState', - 'isClosed' => 'bool', - 'isRolledBack' => 'bool', - 'dateClosed' => '\DateTime', - 'autoPilotCloseDate' => '\DateTime', - 'entries' => '\SynergiTech\Staffology\Model\Item[]' + 'version' => 'int' ]; /** @@ -87,25 +94,32 @@ class PayRun implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'taxYear' => null, - 'taxMonth' => 'int32', - 'payPeriod' => null, + 'autoPilotCloseDate' => 'date', + 'dateClosed' => 'date-time', + 'description' => null, + 'employeeCount' => 'int32', + 'endDate' => 'date', + 'entries' => null, + 'isClosed' => null, + 'isCombinedPayRun' => null, + 'isLatestVersion' => null, + 'isRolledBack' => null, + 'navigation' => null, + 'nonRtiEmployeeCount' => 'int32', 'ordinal' => 'int32', + 'originalPayRunPaymentDate' => 'date', + 'payPeriod' => null, + 'paymentDate' => 'date', + 'payslipScheduledDateTime' => 'date', 'period' => 'int32', + 'previousVersionTotals' => null, 'startDate' => 'date', - 'endDate' => 'date', - 'paymentDate' => 'date', - 'employeeCount' => 'int32', + 'state' => null, 'subContractorCount' => 'int32', - 'nonRtiEmployeeCount' => 'int32', + 'taxMonth' => 'int32', + 'taxYear' => null, 'totals' => null, - 'payslipScheduledDateTime' => 'date', - 'state' => null, - 'isClosed' => null, - 'isRolledBack' => null, - 'dateClosed' => 'date-time', - 'autoPilotCloseDate' => 'date', - 'entries' => null + 'version' => 'int32' ]; /** @@ -114,25 +128,32 @@ class PayRun implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'taxYear' => false, - 'taxMonth' => false, - 'payPeriod' => false, + 'autoPilotCloseDate' => true, + 'dateClosed' => true, + 'description' => true, + 'employeeCount' => false, + 'endDate' => false, + 'entries' => true, + 'isClosed' => false, + 'isCombinedPayRun' => false, + 'isLatestVersion' => false, + 'isRolledBack' => false, + 'navigation' => false, + 'nonRtiEmployeeCount' => false, 'ordinal' => false, + 'originalPayRunPaymentDate' => true, + 'payPeriod' => false, + 'paymentDate' => false, + 'payslipScheduledDateTime' => true, 'period' => false, + 'previousVersionTotals' => false, 'startDate' => false, - 'endDate' => false, - 'paymentDate' => false, - 'employeeCount' => false, + 'state' => false, 'subContractorCount' => false, - 'nonRtiEmployeeCount' => false, + 'taxMonth' => false, + 'taxYear' => false, 'totals' => false, - 'payslipScheduledDateTime' => true, - 'state' => false, - 'isClosed' => false, - 'isRolledBack' => false, - 'dateClosed' => true, - 'autoPilotCloseDate' => true, - 'entries' => true + 'version' => false ]; /** @@ -221,25 +242,32 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'taxYear' => 'taxYear', - 'taxMonth' => 'taxMonth', - 'payPeriod' => 'payPeriod', + 'autoPilotCloseDate' => 'autoPilotCloseDate', + 'dateClosed' => 'dateClosed', + 'description' => 'description', + 'employeeCount' => 'employeeCount', + 'endDate' => 'endDate', + 'entries' => 'entries', + 'isClosed' => 'isClosed', + 'isCombinedPayRun' => 'isCombinedPayRun', + 'isLatestVersion' => 'isLatestVersion', + 'isRolledBack' => 'isRolledBack', + 'navigation' => 'navigation', + 'nonRtiEmployeeCount' => 'nonRtiEmployeeCount', 'ordinal' => 'ordinal', + 'originalPayRunPaymentDate' => 'originalPayRunPaymentDate', + 'payPeriod' => 'payPeriod', + 'paymentDate' => 'paymentDate', + 'payslipScheduledDateTime' => 'payslipScheduledDateTime', 'period' => 'period', + 'previousVersionTotals' => 'previousVersionTotals', 'startDate' => 'startDate', - 'endDate' => 'endDate', - 'paymentDate' => 'paymentDate', - 'employeeCount' => 'employeeCount', + 'state' => 'state', 'subContractorCount' => 'subContractorCount', - 'nonRtiEmployeeCount' => 'nonRtiEmployeeCount', + 'taxMonth' => 'taxMonth', + 'taxYear' => 'taxYear', 'totals' => 'totals', - 'payslipScheduledDateTime' => 'payslipScheduledDateTime', - 'state' => 'state', - 'isClosed' => 'isClosed', - 'isRolledBack' => 'isRolledBack', - 'dateClosed' => 'dateClosed', - 'autoPilotCloseDate' => 'autoPilotCloseDate', - 'entries' => 'entries' + 'version' => 'version' ]; /** @@ -248,25 +276,32 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'taxYear' => 'setTaxYear', - 'taxMonth' => 'setTaxMonth', - 'payPeriod' => 'setPayPeriod', + 'autoPilotCloseDate' => 'setAutoPilotCloseDate', + 'dateClosed' => 'setDateClosed', + 'description' => 'setDescription', + 'employeeCount' => 'setEmployeeCount', + 'endDate' => 'setEndDate', + 'entries' => 'setEntries', + 'isClosed' => 'setIsClosed', + 'isCombinedPayRun' => 'setIsCombinedPayRun', + 'isLatestVersion' => 'setIsLatestVersion', + 'isRolledBack' => 'setIsRolledBack', + 'navigation' => 'setNavigation', + 'nonRtiEmployeeCount' => 'setNonRtiEmployeeCount', 'ordinal' => 'setOrdinal', + 'originalPayRunPaymentDate' => 'setOriginalPayRunPaymentDate', + 'payPeriod' => 'setPayPeriod', + 'paymentDate' => 'setPaymentDate', + 'payslipScheduledDateTime' => 'setPayslipScheduledDateTime', 'period' => 'setPeriod', + 'previousVersionTotals' => 'setPreviousVersionTotals', 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', - 'paymentDate' => 'setPaymentDate', - 'employeeCount' => 'setEmployeeCount', + 'state' => 'setState', 'subContractorCount' => 'setSubContractorCount', - 'nonRtiEmployeeCount' => 'setNonRtiEmployeeCount', + 'taxMonth' => 'setTaxMonth', + 'taxYear' => 'setTaxYear', 'totals' => 'setTotals', - 'payslipScheduledDateTime' => 'setPayslipScheduledDateTime', - 'state' => 'setState', - 'isClosed' => 'setIsClosed', - 'isRolledBack' => 'setIsRolledBack', - 'dateClosed' => 'setDateClosed', - 'autoPilotCloseDate' => 'setAutoPilotCloseDate', - 'entries' => 'setEntries' + 'version' => 'setVersion' ]; /** @@ -275,25 +310,32 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'taxYear' => 'getTaxYear', - 'taxMonth' => 'getTaxMonth', - 'payPeriod' => 'getPayPeriod', + 'autoPilotCloseDate' => 'getAutoPilotCloseDate', + 'dateClosed' => 'getDateClosed', + 'description' => 'getDescription', + 'employeeCount' => 'getEmployeeCount', + 'endDate' => 'getEndDate', + 'entries' => 'getEntries', + 'isClosed' => 'getIsClosed', + 'isCombinedPayRun' => 'getIsCombinedPayRun', + 'isLatestVersion' => 'getIsLatestVersion', + 'isRolledBack' => 'getIsRolledBack', + 'navigation' => 'getNavigation', + 'nonRtiEmployeeCount' => 'getNonRtiEmployeeCount', 'ordinal' => 'getOrdinal', + 'originalPayRunPaymentDate' => 'getOriginalPayRunPaymentDate', + 'payPeriod' => 'getPayPeriod', + 'paymentDate' => 'getPaymentDate', + 'payslipScheduledDateTime' => 'getPayslipScheduledDateTime', 'period' => 'getPeriod', + 'previousVersionTotals' => 'getPreviousVersionTotals', 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', - 'paymentDate' => 'getPaymentDate', - 'employeeCount' => 'getEmployeeCount', + 'state' => 'getState', 'subContractorCount' => 'getSubContractorCount', - 'nonRtiEmployeeCount' => 'getNonRtiEmployeeCount', + 'taxMonth' => 'getTaxMonth', + 'taxYear' => 'getTaxYear', 'totals' => 'getTotals', - 'payslipScheduledDateTime' => 'getPayslipScheduledDateTime', - 'state' => 'getState', - 'isClosed' => 'getIsClosed', - 'isRolledBack' => 'getIsRolledBack', - 'dateClosed' => 'getDateClosed', - 'autoPilotCloseDate' => 'getAutoPilotCloseDate', - 'entries' => 'getEntries' + 'version' => 'getVersion' ]; /** @@ -352,25 +394,32 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('taxMonth', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('autoPilotCloseDate', $data ?? [], null); + $this->setIfExists('dateClosed', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('employeeCount', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('entries', $data ?? [], null); + $this->setIfExists('isClosed', $data ?? [], null); + $this->setIfExists('isCombinedPayRun', $data ?? [], null); + $this->setIfExists('isLatestVersion', $data ?? [], null); + $this->setIfExists('isRolledBack', $data ?? [], null); + $this->setIfExists('navigation', $data ?? [], null); + $this->setIfExists('nonRtiEmployeeCount', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('originalPayRunPaymentDate', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('paymentDate', $data ?? [], null); + $this->setIfExists('payslipScheduledDateTime', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); + $this->setIfExists('previousVersionTotals', $data ?? [], null); $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); - $this->setIfExists('paymentDate', $data ?? [], null); - $this->setIfExists('employeeCount', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); $this->setIfExists('subContractorCount', $data ?? [], null); - $this->setIfExists('nonRtiEmployeeCount', $data ?? [], null); + $this->setIfExists('taxMonth', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('totals', $data ?? [], null); - $this->setIfExists('payslipScheduledDateTime', $data ?? [], null); - $this->setIfExists('state', $data ?? [], null); - $this->setIfExists('isClosed', $data ?? [], null); - $this->setIfExists('isRolledBack', $data ?? [], null); - $this->setIfExists('dateClosed', $data ?? [], null); - $this->setIfExists('autoPilotCloseDate', $data ?? [], null); - $this->setIfExists('entries', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -416,271 +465,326 @@ public function valid(): bool /** - * Gets taxYear + * Gets autoPilotCloseDate * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return \DateTime|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getAutoPilotCloseDate(): ?\DateTime { - return $this->container['taxYear']; + return $this->container['autoPilotCloseDate']; } /** - * Sets taxYear + * Sets autoPilotCloseDate * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param \DateTime|null $autoPilotCloseDate [readonly] If AutoPilot is enabled in the AutomationSettings for the Employer then this property will tell you when the payrun will be automatically closed * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setAutoPilotCloseDate(?\DateTime $autoPilotCloseDate): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($autoPilotCloseDate)) { + array_push($this->openAPINullablesSetToNull, 'autoPilotCloseDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('autoPilotCloseDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['taxYear'] = $taxYear; + $this->container['autoPilotCloseDate'] = $autoPilotCloseDate; return $this; } /** - * Gets taxMonth + * Gets dateClosed * - * @return int|null + * @return \DateTime|null */ - public function getTaxMonth(): ?int + public function getDateClosed(): ?\DateTime { - return $this->container['taxMonth']; + return $this->container['dateClosed']; } /** - * Sets taxMonth + * Sets dateClosed * - * @param int|null $taxMonth [readonly] The Tax Month that the Payment Date falls in + * @param \DateTime|null $dateClosed dateClosed * * @return $this */ - public function setTaxMonth(?int $taxMonth): static + public function setDateClosed(?\DateTime $dateClosed): static { - if (is_null($taxMonth)) { - throw new InvalidArgumentException('non-nullable taxMonth cannot be null'); + if (is_null($dateClosed)) { + array_push($this->openAPINullablesSetToNull, 'dateClosed'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('dateClosed', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['taxMonth'] = $taxMonth; + $this->container['dateClosed'] = $dateClosed; return $this; } /** - * Gets payPeriod + * Gets description * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return string|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getDescription(): ?string { - return $this->container['payPeriod']; + return $this->container['description']; } /** - * Sets payPeriod + * Sets description * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param string|null $description Description of the current version of the PayRun. * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setDescription(?string $description): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('description', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriod'] = $payPeriod; + $this->container['description'] = $description; return $this; } /** - * Gets ordinal + * Gets employeeCount * * @return int|null */ - public function getOrdinal(): ?int + public function getEmployeeCount(): ?int { - return $this->container['ordinal']; + return $this->container['employeeCount']; } /** - * Sets ordinal + * Sets employeeCount * - * @param int|null $ordinal [readonly] Indicates whether this uses first, second, third (etc.) PaySchedule for this PayPeriod. + * @param int|null $employeeCount [readonly] The number of Employees included in this PayRun (including any CIS Subcontractors) * * @return $this */ - public function setOrdinal(?int $ordinal): static + public function setEmployeeCount(?int $employeeCount): static { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + if (is_null($employeeCount)) { + throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); } - $this->container['ordinal'] = $ordinal; + $this->container['employeeCount'] = $employeeCount; return $this; } /** - * Gets period + * Gets endDate * - * @return int|null + * @return \DateTime|null */ - public function getPeriod(): ?int + public function getEndDate(): ?\DateTime { - return $this->container['period']; + return $this->container['endDate']; } /** - * Sets period + * Sets endDate * - * @param int|null $period [readonly] The period (i.e, Tax Week or Tax Month) that this PayRun is for. + * @param \DateTime|null $endDate [readonly] The end date of the period this PayRun covers * * @return $this */ - public function setPeriod(?int $period): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); } - $this->container['period'] = $period; + $this->container['endDate'] = $endDate; return $this; } /** - * Gets startDate + * Gets entries * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getStartDate(): ?\DateTime + public function getEntries(): ?array { - return $this->container['startDate']; + return $this->container['entries']; } /** - * Sets startDate + * Sets entries * - * @param \DateTime|null $startDate [readonly] The start date of the period this PayRun covers + * @param \SynergiTech\Staffology\Model\Item[]|null $entries [readonly] The PayRunEntries that make up this PayRun. This is populate automatically when you start a PayRun. * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setEntries(?array $entries): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($entries)) { + array_push($this->openAPINullablesSetToNull, 'entries'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('entries', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['startDate'] = $startDate; + $this->container['entries'] = $entries; return $this; } /** - * Gets endDate + * Gets isClosed * - * @return \DateTime|null + * @return bool|null */ - public function getEndDate(): ?\DateTime + public function getIsClosed(): ?bool { - return $this->container['endDate']; + return $this->container['isClosed']; } /** - * Sets endDate + * Sets isClosed * - * @param \DateTime|null $endDate [readonly] The end date of the period this PayRun covers + * @param bool|null $isClosed [readonly] Set to True if the PayRun is Finalised and changes can no longer be made * * @return $this */ - public function setEndDate(?\DateTime $endDate): static + public function setIsClosed(?bool $isClosed): static { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); + if (is_null($isClosed)) { + throw new InvalidArgumentException('non-nullable isClosed cannot be null'); } - $this->container['endDate'] = $endDate; + $this->container['isClosed'] = $isClosed; return $this; } /** - * Gets paymentDate + * Gets isCombinedPayRun * - * @return \DateTime|null + * @return bool|null */ - public function getPaymentDate(): ?\DateTime + public function getIsCombinedPayRun(): ?bool { - return $this->container['paymentDate']; + return $this->container['isCombinedPayRun']; } /** - * Sets paymentDate + * Sets isCombinedPayRun * - * @param \DateTime|null $paymentDate [readonly] The intended date that Employees will be paid, although this can be changed on a per PayRunEntry basis + * @param bool|null $isCombinedPayRun Indicates if the payRun is a combined pay run or not * * @return $this */ - public function setPaymentDate(?\DateTime $paymentDate): static + public function setIsCombinedPayRun(?bool $isCombinedPayRun): static { - if (is_null($paymentDate)) { - throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); + if (is_null($isCombinedPayRun)) { + throw new InvalidArgumentException('non-nullable isCombinedPayRun cannot be null'); } - $this->container['paymentDate'] = $paymentDate; + $this->container['isCombinedPayRun'] = $isCombinedPayRun; return $this; } /** - * Gets employeeCount + * Gets isLatestVersion * - * @return int|null + * @return bool|null */ - public function getEmployeeCount(): ?int + public function getIsLatestVersion(): ?bool { - return $this->container['employeeCount']; + return $this->container['isLatestVersion']; } /** - * Sets employeeCount + * Sets isLatestVersion * - * @param int|null $employeeCount [readonly] The number of Employees included in this PayRun (including any CIS Subcontractors) + * @param bool|null $isLatestVersion [readonly] Indicates whether this is the latest version of the PayRun. * * @return $this */ - public function setEmployeeCount(?int $employeeCount): static + public function setIsLatestVersion(?bool $isLatestVersion): static { - if (is_null($employeeCount)) { - throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); + if (is_null($isLatestVersion)) { + throw new InvalidArgumentException('non-nullable isLatestVersion cannot be null'); } - $this->container['employeeCount'] = $employeeCount; + $this->container['isLatestVersion'] = $isLatestVersion; return $this; } /** - * Gets subContractorCount + * Gets isRolledBack * - * @return int|null + * @return bool|null */ - public function getSubContractorCount(): ?int + public function getIsRolledBack(): ?bool { - return $this->container['subContractorCount']; + return $this->container['isRolledBack']; } /** - * Sets subContractorCount + * Sets isRolledBack * - * @param int|null $subContractorCount [readonly] The number of CIS Subcontractors included in this PayRun + * @param bool|null $isRolledBack [readonly] Set to True if the PayRun is currently rolled back * * @return $this */ - public function setSubContractorCount(?int $subContractorCount): static + public function setIsRolledBack(?bool $isRolledBack): static { - if (is_null($subContractorCount)) { - throw new InvalidArgumentException('non-nullable subContractorCount cannot be null'); + if (is_null($isRolledBack)) { + throw new InvalidArgumentException('non-nullable isRolledBack cannot be null'); } - $this->container['subContractorCount'] = $subContractorCount; + $this->container['isRolledBack'] = $isRolledBack; + + return $this; + } + + /** + * Gets navigation + * + * @return \SynergiTech\Staffology\Model\PayRunEntryNavigation|null + */ + public function getNavigation(): ?\SynergiTech\Staffology\Model\PayRunEntryNavigation + { + return $this->container['navigation']; + } + + /** + * Sets navigation + * + * @param \SynergiTech\Staffology\Model\PayRunEntryNavigation|null $navigation navigation + * + * @return $this + */ + public function setNavigation(?\SynergiTech\Staffology\Model\PayRunEntryNavigation $navigation): static + { + if (is_null($navigation)) { + throw new InvalidArgumentException('non-nullable navigation cannot be null'); + } + $this->container['navigation'] = $navigation; return $this; } @@ -713,28 +817,116 @@ public function setNonRtiEmployeeCount(?int $nonRtiEmployeeCount): static } /** - * Gets totals + * Gets ordinal * - * @return \SynergiTech\Staffology\Model\PayRunTotals|null + * @return int|null */ - public function getTotals(): ?\SynergiTech\Staffology\Model\PayRunTotals + public function getOrdinal(): ?int { - return $this->container['totals']; + return $this->container['ordinal']; } /** - * Sets totals + * Sets ordinal * - * @param \SynergiTech\Staffology\Model\PayRunTotals|null $totals totals + * @param int|null $ordinal [readonly] Indicates whether this uses first, second, third (etc.) PaySchedule for this PayPeriod. * * @return $this */ - public function setTotals(?\SynergiTech\Staffology\Model\PayRunTotals $totals): static + public function setOrdinal(?int $ordinal): static { - if (is_null($totals)) { - throw new InvalidArgumentException('non-nullable totals cannot be null'); + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['totals'] = $totals; + $this->container['ordinal'] = $ordinal; + + return $this; + } + + /** + * Gets originalPayRunPaymentDate + * + * @return \DateTime|null + */ + public function getOriginalPayRunPaymentDate(): ?\DateTime + { + return $this->container['originalPayRunPaymentDate']; + } + + /** + * Sets originalPayRunPaymentDate + * + * @param \DateTime|null $originalPayRunPaymentDate [readonly] If this PayRun is a supplementary PayRun then this will be the date of the original PayRun's Payment Date + * + * @return $this + */ + public function setOriginalPayRunPaymentDate(?\DateTime $originalPayRunPaymentDate): static + { + if (is_null($originalPayRunPaymentDate)) { + array_push($this->openAPINullablesSetToNull, 'originalPayRunPaymentDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('originalPayRunPaymentDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['originalPayRunPaymentDate'] = $originalPayRunPaymentDate; + + return $this; + } + + /** + * Gets payPeriod + * + * @return \SynergiTech\Staffology\Model\PayPeriods|null + */ + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + { + return $this->container['payPeriod']; + } + + /** + * Sets payPeriod + * + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * + * @return $this + */ + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + { + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + } + $this->container['payPeriod'] = $payPeriod; + + return $this; + } + + /** + * Gets paymentDate + * + * @return \DateTime|null + */ + public function getPaymentDate(): ?\DateTime + { + return $this->container['paymentDate']; + } + + /** + * Sets paymentDate + * + * @param \DateTime|null $paymentDate [readonly] The intended date that Employees will be paid, although this can be changed on a per PayRunEntry basis + * + * @return $this + */ + public function setPaymentDate(?\DateTime $paymentDate): static + { + if (is_null($paymentDate)) { + throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); + } + $this->container['paymentDate'] = $paymentDate; return $this; } @@ -773,6 +965,87 @@ public function setPayslipScheduledDateTime(?\DateTime $payslipScheduledDateTime return $this; } + /** + * Gets period + * + * @return int|null + */ + public function getPeriod(): ?int + { + return $this->container['period']; + } + + /** + * Sets period + * + * @param int|null $period [readonly] The period (i.e, Tax Week or Tax Month) that this PayRun is for. + * + * @return $this + */ + public function setPeriod(?int $period): static + { + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); + } + $this->container['period'] = $period; + + return $this; + } + + /** + * Gets previousVersionTotals + * + * @return \SynergiTech\Staffology\Model\PayRunTotals|null + */ + public function getPreviousVersionTotals(): ?\SynergiTech\Staffology\Model\PayRunTotals + { + return $this->container['previousVersionTotals']; + } + + /** + * Sets previousVersionTotals + * + * @param \SynergiTech\Staffology\Model\PayRunTotals|null $previousVersionTotals previousVersionTotals + * + * @return $this + */ + public function setPreviousVersionTotals(?\SynergiTech\Staffology\Model\PayRunTotals $previousVersionTotals): static + { + if (is_null($previousVersionTotals)) { + throw new InvalidArgumentException('non-nullable previousVersionTotals cannot be null'); + } + $this->container['previousVersionTotals'] = $previousVersionTotals; + + return $this; + } + + /** + * Gets startDate + * + * @return \DateTime|null + */ + public function getStartDate(): ?\DateTime + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param \DateTime|null $startDate [readonly] The start date of the period this PayRun covers + * + * @return $this + */ + public function setStartDate(?\DateTime $startDate): static + { + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); + } + $this->container['startDate'] = $startDate; + + return $this; + } + /** * Gets state * @@ -801,157 +1074,136 @@ public function setState(?\SynergiTech\Staffology\Model\PayRunState $state): sta } /** - * Gets isClosed + * Gets subContractorCount * - * @return bool|null + * @return int|null */ - public function getIsClosed(): ?bool + public function getSubContractorCount(): ?int { - return $this->container['isClosed']; + return $this->container['subContractorCount']; } /** - * Sets isClosed + * Sets subContractorCount * - * @param bool|null $isClosed [readonly] Set to True if the PayRun is Finalised and changes can no longer be made + * @param int|null $subContractorCount [readonly] The number of CIS Subcontractors included in this PayRun * * @return $this */ - public function setIsClosed(?bool $isClosed): static + public function setSubContractorCount(?int $subContractorCount): static { - if (is_null($isClosed)) { - throw new InvalidArgumentException('non-nullable isClosed cannot be null'); + if (is_null($subContractorCount)) { + throw new InvalidArgumentException('non-nullable subContractorCount cannot be null'); } - $this->container['isClosed'] = $isClosed; + $this->container['subContractorCount'] = $subContractorCount; return $this; } /** - * Gets isRolledBack + * Gets taxMonth * - * @return bool|null + * @return int|null */ - public function getIsRolledBack(): ?bool + public function getTaxMonth(): ?int { - return $this->container['isRolledBack']; + return $this->container['taxMonth']; } /** - * Sets isRolledBack + * Sets taxMonth * - * @param bool|null $isRolledBack [readonly] Set to True if the PayRun is currently rolled back + * @param int|null $taxMonth [readonly] The Tax Month that the Payment Date falls in * * @return $this */ - public function setIsRolledBack(?bool $isRolledBack): static + public function setTaxMonth(?int $taxMonth): static { - if (is_null($isRolledBack)) { - throw new InvalidArgumentException('non-nullable isRolledBack cannot be null'); + if (is_null($taxMonth)) { + throw new InvalidArgumentException('non-nullable taxMonth cannot be null'); } - $this->container['isRolledBack'] = $isRolledBack; + $this->container['taxMonth'] = $taxMonth; return $this; } /** - * Gets dateClosed + * Gets taxYear * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getDateClosed(): ?\DateTime + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['dateClosed']; + return $this->container['taxYear']; } /** - * Sets dateClosed + * Sets taxYear * - * @param \DateTime|null $dateClosed dateClosed + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setDateClosed(?\DateTime $dateClosed): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($dateClosed)) { - array_push($this->openAPINullablesSetToNull, 'dateClosed'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('dateClosed', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['dateClosed'] = $dateClosed; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets autoPilotCloseDate + * Gets totals * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\PayRunTotals|null */ - public function getAutoPilotCloseDate(): ?\DateTime + public function getTotals(): ?\SynergiTech\Staffology\Model\PayRunTotals { - return $this->container['autoPilotCloseDate']; + return $this->container['totals']; } /** - * Sets autoPilotCloseDate + * Sets totals * - * @param \DateTime|null $autoPilotCloseDate [readonly] If AutoPilot is enabled in the AutomationSettings for the Employer then this property will tell you when the payrun will be automatically closed + * @param \SynergiTech\Staffology\Model\PayRunTotals|null $totals totals * * @return $this */ - public function setAutoPilotCloseDate(?\DateTime $autoPilotCloseDate): static + public function setTotals(?\SynergiTech\Staffology\Model\PayRunTotals $totals): static { - if (is_null($autoPilotCloseDate)) { - array_push($this->openAPINullablesSetToNull, 'autoPilotCloseDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('autoPilotCloseDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($totals)) { + throw new InvalidArgumentException('non-nullable totals cannot be null'); } - $this->container['autoPilotCloseDate'] = $autoPilotCloseDate; + $this->container['totals'] = $totals; return $this; } /** - * Gets entries + * Gets version * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return int|null */ - public function getEntries(): ?array + public function getVersion(): ?int { - return $this->container['entries']; + return $this->container['version']; } /** - * Sets entries + * Sets version * - * @param \SynergiTech\Staffology\Model\Item[]|null $entries [readonly] The PayRunEntries that make up this PayRun. This is populate automatically when you start a PayRun. + * @param int|null $version [readonly] The version of this PayRun in case any supplementary pay runs have been created for the same period. * * @return $this */ - public function setEntries(?array $entries): static + public function setVersion(?int $version): static { - if (is_null($entries)) { - array_push($this->openAPINullablesSetToNull, 'entries'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('entries', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($version)) { + throw new InvalidArgumentException('non-nullable version cannot be null'); } - $this->container['entries'] = $entries; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/PayRunChanges.php b/src/Model/PayRunChanges.php index f1caa67..d845652 100644 --- a/src/Model/PayRunChanges.php +++ b/src/Model/PayRunChanges.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayRunCsvType.php b/src/Model/PayRunCsvType.php index 3be93a2..4a5b8d5 100644 --- a/src/Model/PayRunCsvType.php +++ b/src/Model/PayRunCsvType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayRunEntry.php b/src/Model/PayRunEntry.php index ea0196a..6601f7d 100644 --- a/src/Model/PayRunEntry.php +++ b/src/Model/PayRunEntry.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,55 +60,60 @@ class PayRunEntry implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'taxMonth' => 'int', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', - 'note' => 'string', - 'bacsSubReference' => 'string', + 'aeNotEnroledWarning' => 'bool', 'bacsHashCode' => 'string', - 'percentageOfWorkingDaysPaidAsNormal' => 'float', - 'workingDaysNotPaidAsNormal' => 'float', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', - 'ordinal' => 'int', - 'period' => 'int', - 'isNewStarter' => 'bool', - 'unpaidAbsence' => 'bool', - 'hasAttachmentOrders' => 'bool', - 'paymentDate' => '\DateTime', - 'priorPayrollCode' => 'string', - 'pensionSummary' => '\SynergiTech\Staffology\Model\PensionSummary', - 'pensionSummaries' => '\SynergiTech\Staffology\Model\PensionSummary[]', + 'bacsSubReference' => 'string', + 'differencePensionSummaries' => '\SynergiTech\Staffology\Model\PensionSummary[]', + 'emailId' => 'string', 'employee' => '\SynergiTech\Staffology\Model\Item', - 'totals' => '\SynergiTech\Staffology\Model\PayRunTotals', - 'periodOverrides' => '\SynergiTech\Staffology\Model\ValueOverride[]', - 'totalsYtd' => '\SynergiTech\Staffology\Model\PayRunTotals', - 'totalsYtdOverrides' => '\SynergiTech\Staffology\Model\ValueOverride[]', + 'employeeRolePayItems' => '\SynergiTech\Staffology\Model\EmployeeRolePayItem[]', + 'employmentDetails' => '\SynergiTech\Staffology\Model\EmploymentDetails', + 'endDate' => '\DateTime', 'forcedCisVatAmount' => 'float', + 'fps' => '\SynergiTech\Staffology\Model\Item', + 'hasAttachmentOrders' => 'bool', 'holidayAccrued' => 'float', - 'state' => '\SynergiTech\Staffology\Model\PayRunState', + 'id' => 'string', 'isClosed' => 'bool', + 'isLatestVersion' => 'bool', + 'isNewStarter' => 'bool', + 'isRemoved' => 'bool', + 'isRolledBack' => 'bool', 'manualNi' => 'bool', - 'niSplit' => 'bool', 'nationalInsuranceCalculation' => '\SynergiTech\Staffology\Model\NationalInsuranceCalculation', + 'niLetterError' => '\SynergiTech\Staffology\Model\NiLetterError', + 'niSplit' => 'bool', + 'note' => 'string', + 'ordinal' => 'int', + 'originalPayRunEntryPaymentDate' => '\DateTime', + 'payOptions' => '\SynergiTech\Staffology\Model\PayOptions', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'payRunVersion' => 'int', + 'paymentAfterLeaving' => 'bool', + 'paymentDate' => '\DateTime', 'payrollCodeChanged' => 'bool', - 'aeNotEnroledWarning' => 'bool', - 'fps' => '\SynergiTech\Staffology\Model\Item', - 'emailId' => 'string', + 'pensionSummaries' => '\SynergiTech\Staffology\Model\PensionSummary[]', + 'pensionSummary' => '\SynergiTech\Staffology\Model\PensionSummary', + 'percentageOfWorkingDaysPaidAsNormal' => 'float', + 'period' => 'int', + 'periodOverrides' => '\SynergiTech\Staffology\Model\ValueOverride[]', + 'periodsCovered' => 'int', + 'personalDetails' => '\SynergiTech\Staffology\Model\PersonalDetails', + 'previousVersionTotals' => '\SynergiTech\Staffology\Model\PayRunTotals', + 'priorPayrollCode' => 'string', 'recievingOffsetPay' => 'bool', - 'paymentAfterLeaving' => 'bool', + 'startDate' => '\DateTime', + 'state' => '\SynergiTech\Staffology\Model\PayRunState', + 'taxMonth' => 'int', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'teachersPensionAgeWarning' => '\SynergiTech\Staffology\Model\TeachersPensionAgeWarning', + 'totals' => '\SynergiTech\Staffology\Model\PayRunTotals', + 'totalsYtd' => '\SynergiTech\Staffology\Model\PayRunTotals', + 'totalsYtdOverrides' => '\SynergiTech\Staffology\Model\ValueOverride[]', 'umbrellaPayment' => '\SynergiTech\Staffology\Model\UmbrellaPayment', - 'isRemoved' => 'bool', - 'isRolledBack' => 'bool', - 'periodsCovered' => 'int', - 'employeeRolePayItems' => '\SynergiTech\Staffology\Model\EmployeeRolePayItem[]', + 'unpaidAbsence' => 'bool', 'warnings' => '\SynergiTech\Staffology\Model\PayRunEntryWarningType', - 'niLetterError' => '\SynergiTech\Staffology\Model\NiLetterError', - 'teachersPensionAgeWarning' => '\SynergiTech\Staffology\Model\TeachersPensionAgeWarning', - 'id' => 'string', - 'personalDetails' => '\SynergiTech\Staffology\Model\PersonalDetails', - 'employmentDetails' => '\SynergiTech\Staffology\Model\EmploymentDetails', - 'payOptions' => '\SynergiTech\Staffology\Model\PayOptions' + 'workingDaysNotPaidAsNormal' => 'float' ]; /** @@ -117,55 +122,60 @@ class PayRunEntry implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'taxYear' => null, - 'taxMonth' => 'int32', - 'startDate' => 'date', - 'endDate' => 'date', - 'note' => null, - 'bacsSubReference' => null, + 'aeNotEnroledWarning' => null, 'bacsHashCode' => null, - 'percentageOfWorkingDaysPaidAsNormal' => 'double', - 'workingDaysNotPaidAsNormal' => 'double', - 'payPeriod' => null, - 'ordinal' => 'int32', - 'period' => 'int32', - 'isNewStarter' => null, - 'unpaidAbsence' => null, - 'hasAttachmentOrders' => null, - 'paymentDate' => 'date', - 'priorPayrollCode' => null, - 'pensionSummary' => null, - 'pensionSummaries' => null, + 'bacsSubReference' => null, + 'differencePensionSummaries' => null, + 'emailId' => 'uuid', 'employee' => null, - 'totals' => null, - 'periodOverrides' => null, - 'totalsYtd' => null, - 'totalsYtdOverrides' => null, + 'employeeRolePayItems' => null, + 'employmentDetails' => null, + 'endDate' => 'date', 'forcedCisVatAmount' => 'double', + 'fps' => null, + 'hasAttachmentOrders' => null, 'holidayAccrued' => 'double', - 'state' => null, + 'id' => 'uuid', 'isClosed' => null, + 'isLatestVersion' => null, + 'isNewStarter' => null, + 'isRemoved' => null, + 'isRolledBack' => null, 'manualNi' => null, - 'niSplit' => null, 'nationalInsuranceCalculation' => null, + 'niLetterError' => null, + 'niSplit' => null, + 'note' => null, + 'ordinal' => 'int32', + 'originalPayRunEntryPaymentDate' => 'date', + 'payOptions' => null, + 'payPeriod' => null, + 'payRunVersion' => 'int32', + 'paymentAfterLeaving' => null, + 'paymentDate' => 'date', 'payrollCodeChanged' => null, - 'aeNotEnroledWarning' => null, - 'fps' => null, - 'emailId' => 'uuid', + 'pensionSummaries' => null, + 'pensionSummary' => null, + 'percentageOfWorkingDaysPaidAsNormal' => 'double', + 'period' => 'int32', + 'periodOverrides' => null, + 'periodsCovered' => 'int32', + 'personalDetails' => null, + 'previousVersionTotals' => null, + 'priorPayrollCode' => null, 'recievingOffsetPay' => null, - 'paymentAfterLeaving' => null, + 'startDate' => 'date', + 'state' => null, + 'taxMonth' => 'int32', + 'taxYear' => null, + 'teachersPensionAgeWarning' => null, + 'totals' => null, + 'totalsYtd' => null, + 'totalsYtdOverrides' => null, 'umbrellaPayment' => null, - 'isRemoved' => null, - 'isRolledBack' => null, - 'periodsCovered' => 'int32', - 'employeeRolePayItems' => null, + 'unpaidAbsence' => null, 'warnings' => null, - 'niLetterError' => null, - 'teachersPensionAgeWarning' => null, - 'id' => 'uuid', - 'personalDetails' => null, - 'employmentDetails' => null, - 'payOptions' => null + 'workingDaysNotPaidAsNormal' => 'double' ]; /** @@ -174,55 +184,60 @@ class PayRunEntry implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'taxYear' => false, - 'taxMonth' => false, - 'startDate' => false, - 'endDate' => false, - 'note' => true, - 'bacsSubReference' => true, + 'aeNotEnroledWarning' => false, 'bacsHashCode' => true, - 'percentageOfWorkingDaysPaidAsNormal' => false, - 'workingDaysNotPaidAsNormal' => false, - 'payPeriod' => false, - 'ordinal' => false, - 'period' => false, - 'isNewStarter' => false, - 'unpaidAbsence' => false, - 'hasAttachmentOrders' => false, - 'paymentDate' => false, - 'priorPayrollCode' => true, - 'pensionSummary' => false, - 'pensionSummaries' => true, + 'bacsSubReference' => true, + 'differencePensionSummaries' => true, + 'emailId' => true, 'employee' => false, - 'totals' => false, - 'periodOverrides' => true, - 'totalsYtd' => false, - 'totalsYtdOverrides' => true, + 'employeeRolePayItems' => true, + 'employmentDetails' => false, + 'endDate' => false, 'forcedCisVatAmount' => true, + 'fps' => false, + 'hasAttachmentOrders' => false, 'holidayAccrued' => false, - 'state' => false, + 'id' => false, 'isClosed' => false, + 'isLatestVersion' => false, + 'isNewStarter' => false, + 'isRemoved' => false, + 'isRolledBack' => false, 'manualNi' => false, - 'niSplit' => false, 'nationalInsuranceCalculation' => false, + 'niLetterError' => false, + 'niSplit' => false, + 'note' => true, + 'ordinal' => false, + 'originalPayRunEntryPaymentDate' => true, + 'payOptions' => false, + 'payPeriod' => false, + 'payRunVersion' => false, + 'paymentAfterLeaving' => false, + 'paymentDate' => false, 'payrollCodeChanged' => false, - 'aeNotEnroledWarning' => false, - 'fps' => false, - 'emailId' => true, + 'pensionSummaries' => true, + 'pensionSummary' => false, + 'percentageOfWorkingDaysPaidAsNormal' => false, + 'period' => false, + 'periodOverrides' => true, + 'periodsCovered' => false, + 'personalDetails' => false, + 'previousVersionTotals' => false, + 'priorPayrollCode' => true, 'recievingOffsetPay' => false, - 'paymentAfterLeaving' => false, + 'startDate' => false, + 'state' => false, + 'taxMonth' => false, + 'taxYear' => false, + 'teachersPensionAgeWarning' => false, + 'totals' => false, + 'totalsYtd' => false, + 'totalsYtdOverrides' => true, 'umbrellaPayment' => false, - 'isRemoved' => false, - 'isRolledBack' => false, - 'periodsCovered' => false, - 'employeeRolePayItems' => true, + 'unpaidAbsence' => false, 'warnings' => false, - 'niLetterError' => false, - 'teachersPensionAgeWarning' => false, - 'id' => false, - 'personalDetails' => false, - 'employmentDetails' => false, - 'payOptions' => false + 'workingDaysNotPaidAsNormal' => false ]; /** @@ -311,55 +326,60 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'taxYear' => 'taxYear', - 'taxMonth' => 'taxMonth', - 'startDate' => 'startDate', - 'endDate' => 'endDate', - 'note' => 'note', - 'bacsSubReference' => 'bacsSubReference', + 'aeNotEnroledWarning' => 'aeNotEnroledWarning', 'bacsHashCode' => 'bacsHashCode', - 'percentageOfWorkingDaysPaidAsNormal' => 'percentageOfWorkingDaysPaidAsNormal', - 'workingDaysNotPaidAsNormal' => 'workingDaysNotPaidAsNormal', - 'payPeriod' => 'payPeriod', - 'ordinal' => 'ordinal', - 'period' => 'period', - 'isNewStarter' => 'isNewStarter', - 'unpaidAbsence' => 'unpaidAbsence', - 'hasAttachmentOrders' => 'hasAttachmentOrders', - 'paymentDate' => 'paymentDate', - 'priorPayrollCode' => 'priorPayrollCode', - 'pensionSummary' => 'pensionSummary', - 'pensionSummaries' => 'pensionSummaries', + 'bacsSubReference' => 'bacsSubReference', + 'differencePensionSummaries' => 'differencePensionSummaries', + 'emailId' => 'emailId', 'employee' => 'employee', - 'totals' => 'totals', - 'periodOverrides' => 'periodOverrides', - 'totalsYtd' => 'totalsYtd', - 'totalsYtdOverrides' => 'totalsYtdOverrides', + 'employeeRolePayItems' => 'employeeRolePayItems', + 'employmentDetails' => 'employmentDetails', + 'endDate' => 'endDate', 'forcedCisVatAmount' => 'forcedCisVatAmount', + 'fps' => 'fps', + 'hasAttachmentOrders' => 'hasAttachmentOrders', 'holidayAccrued' => 'holidayAccrued', - 'state' => 'state', + 'id' => 'id', 'isClosed' => 'isClosed', + 'isLatestVersion' => 'isLatestVersion', + 'isNewStarter' => 'isNewStarter', + 'isRemoved' => 'isRemoved', + 'isRolledBack' => 'isRolledBack', 'manualNi' => 'manualNi', - 'niSplit' => 'niSplit', 'nationalInsuranceCalculation' => 'nationalInsuranceCalculation', - 'payrollCodeChanged' => 'payrollCodeChanged', - 'aeNotEnroledWarning' => 'aeNotEnroledWarning', - 'fps' => 'fps', - 'emailId' => 'emailId', - 'recievingOffsetPay' => 'recievingOffsetPay', + 'niLetterError' => 'niLetterError', + 'niSplit' => 'niSplit', + 'note' => 'note', + 'ordinal' => 'ordinal', + 'originalPayRunEntryPaymentDate' => 'originalPayRunEntryPaymentDate', + 'payOptions' => 'payOptions', + 'payPeriod' => 'payPeriod', + 'payRunVersion' => 'payRunVersion', 'paymentAfterLeaving' => 'paymentAfterLeaving', - 'umbrellaPayment' => 'umbrellaPayment', - 'isRemoved' => 'isRemoved', - 'isRolledBack' => 'isRolledBack', + 'paymentDate' => 'paymentDate', + 'payrollCodeChanged' => 'payrollCodeChanged', + 'pensionSummaries' => 'pensionSummaries', + 'pensionSummary' => 'pensionSummary', + 'percentageOfWorkingDaysPaidAsNormal' => 'percentageOfWorkingDaysPaidAsNormal', + 'period' => 'period', + 'periodOverrides' => 'periodOverrides', 'periodsCovered' => 'periodsCovered', - 'employeeRolePayItems' => 'employeeRolePayItems', - 'warnings' => 'warnings', - 'niLetterError' => 'niLetterError', - 'teachersPensionAgeWarning' => 'teachersPensionAgeWarning', - 'id' => 'id', 'personalDetails' => 'personalDetails', - 'employmentDetails' => 'employmentDetails', - 'payOptions' => 'payOptions' + 'previousVersionTotals' => 'previousVersionTotals', + 'priorPayrollCode' => 'priorPayrollCode', + 'recievingOffsetPay' => 'recievingOffsetPay', + 'startDate' => 'startDate', + 'state' => 'state', + 'taxMonth' => 'taxMonth', + 'taxYear' => 'taxYear', + 'teachersPensionAgeWarning' => 'teachersPensionAgeWarning', + 'totals' => 'totals', + 'totalsYtd' => 'totalsYtd', + 'totalsYtdOverrides' => 'totalsYtdOverrides', + 'umbrellaPayment' => 'umbrellaPayment', + 'unpaidAbsence' => 'unpaidAbsence', + 'warnings' => 'warnings', + 'workingDaysNotPaidAsNormal' => 'workingDaysNotPaidAsNormal' ]; /** @@ -368,55 +388,60 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'taxYear' => 'setTaxYear', - 'taxMonth' => 'setTaxMonth', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', - 'note' => 'setNote', - 'bacsSubReference' => 'setBacsSubReference', + 'aeNotEnroledWarning' => 'setAeNotEnroledWarning', 'bacsHashCode' => 'setBacsHashCode', - 'percentageOfWorkingDaysPaidAsNormal' => 'setPercentageOfWorkingDaysPaidAsNormal', - 'workingDaysNotPaidAsNormal' => 'setWorkingDaysNotPaidAsNormal', - 'payPeriod' => 'setPayPeriod', - 'ordinal' => 'setOrdinal', - 'period' => 'setPeriod', - 'isNewStarter' => 'setIsNewStarter', - 'unpaidAbsence' => 'setUnpaidAbsence', - 'hasAttachmentOrders' => 'setHasAttachmentOrders', - 'paymentDate' => 'setPaymentDate', - 'priorPayrollCode' => 'setPriorPayrollCode', - 'pensionSummary' => 'setPensionSummary', - 'pensionSummaries' => 'setPensionSummaries', + 'bacsSubReference' => 'setBacsSubReference', + 'differencePensionSummaries' => 'setDifferencePensionSummaries', + 'emailId' => 'setEmailId', 'employee' => 'setEmployee', - 'totals' => 'setTotals', - 'periodOverrides' => 'setPeriodOverrides', - 'totalsYtd' => 'setTotalsYtd', - 'totalsYtdOverrides' => 'setTotalsYtdOverrides', + 'employeeRolePayItems' => 'setEmployeeRolePayItems', + 'employmentDetails' => 'setEmploymentDetails', + 'endDate' => 'setEndDate', 'forcedCisVatAmount' => 'setForcedCisVatAmount', + 'fps' => 'setFps', + 'hasAttachmentOrders' => 'setHasAttachmentOrders', 'holidayAccrued' => 'setHolidayAccrued', - 'state' => 'setState', + 'id' => 'setId', 'isClosed' => 'setIsClosed', + 'isLatestVersion' => 'setIsLatestVersion', + 'isNewStarter' => 'setIsNewStarter', + 'isRemoved' => 'setIsRemoved', + 'isRolledBack' => 'setIsRolledBack', 'manualNi' => 'setManualNi', - 'niSplit' => 'setNiSplit', 'nationalInsuranceCalculation' => 'setNationalInsuranceCalculation', + 'niLetterError' => 'setNiLetterError', + 'niSplit' => 'setNiSplit', + 'note' => 'setNote', + 'ordinal' => 'setOrdinal', + 'originalPayRunEntryPaymentDate' => 'setOriginalPayRunEntryPaymentDate', + 'payOptions' => 'setPayOptions', + 'payPeriod' => 'setPayPeriod', + 'payRunVersion' => 'setPayRunVersion', + 'paymentAfterLeaving' => 'setPaymentAfterLeaving', + 'paymentDate' => 'setPaymentDate', 'payrollCodeChanged' => 'setPayrollCodeChanged', - 'aeNotEnroledWarning' => 'setAeNotEnroledWarning', - 'fps' => 'setFps', - 'emailId' => 'setEmailId', + 'pensionSummaries' => 'setPensionSummaries', + 'pensionSummary' => 'setPensionSummary', + 'percentageOfWorkingDaysPaidAsNormal' => 'setPercentageOfWorkingDaysPaidAsNormal', + 'period' => 'setPeriod', + 'periodOverrides' => 'setPeriodOverrides', + 'periodsCovered' => 'setPeriodsCovered', + 'personalDetails' => 'setPersonalDetails', + 'previousVersionTotals' => 'setPreviousVersionTotals', + 'priorPayrollCode' => 'setPriorPayrollCode', 'recievingOffsetPay' => 'setRecievingOffsetPay', - 'paymentAfterLeaving' => 'setPaymentAfterLeaving', + 'startDate' => 'setStartDate', + 'state' => 'setState', + 'taxMonth' => 'setTaxMonth', + 'taxYear' => 'setTaxYear', + 'teachersPensionAgeWarning' => 'setTeachersPensionAgeWarning', + 'totals' => 'setTotals', + 'totalsYtd' => 'setTotalsYtd', + 'totalsYtdOverrides' => 'setTotalsYtdOverrides', 'umbrellaPayment' => 'setUmbrellaPayment', - 'isRemoved' => 'setIsRemoved', - 'isRolledBack' => 'setIsRolledBack', - 'periodsCovered' => 'setPeriodsCovered', - 'employeeRolePayItems' => 'setEmployeeRolePayItems', + 'unpaidAbsence' => 'setUnpaidAbsence', 'warnings' => 'setWarnings', - 'niLetterError' => 'setNiLetterError', - 'teachersPensionAgeWarning' => 'setTeachersPensionAgeWarning', - 'id' => 'setId', - 'personalDetails' => 'setPersonalDetails', - 'employmentDetails' => 'setEmploymentDetails', - 'payOptions' => 'setPayOptions' + 'workingDaysNotPaidAsNormal' => 'setWorkingDaysNotPaidAsNormal' ]; /** @@ -425,55 +450,60 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'taxYear' => 'getTaxYear', - 'taxMonth' => 'getTaxMonth', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', - 'note' => 'getNote', - 'bacsSubReference' => 'getBacsSubReference', + 'aeNotEnroledWarning' => 'getAeNotEnroledWarning', 'bacsHashCode' => 'getBacsHashCode', - 'percentageOfWorkingDaysPaidAsNormal' => 'getPercentageOfWorkingDaysPaidAsNormal', - 'workingDaysNotPaidAsNormal' => 'getWorkingDaysNotPaidAsNormal', - 'payPeriod' => 'getPayPeriod', - 'ordinal' => 'getOrdinal', - 'period' => 'getPeriod', - 'isNewStarter' => 'getIsNewStarter', - 'unpaidAbsence' => 'getUnpaidAbsence', - 'hasAttachmentOrders' => 'getHasAttachmentOrders', - 'paymentDate' => 'getPaymentDate', - 'priorPayrollCode' => 'getPriorPayrollCode', - 'pensionSummary' => 'getPensionSummary', - 'pensionSummaries' => 'getPensionSummaries', + 'bacsSubReference' => 'getBacsSubReference', + 'differencePensionSummaries' => 'getDifferencePensionSummaries', + 'emailId' => 'getEmailId', 'employee' => 'getEmployee', - 'totals' => 'getTotals', - 'periodOverrides' => 'getPeriodOverrides', - 'totalsYtd' => 'getTotalsYtd', - 'totalsYtdOverrides' => 'getTotalsYtdOverrides', + 'employeeRolePayItems' => 'getEmployeeRolePayItems', + 'employmentDetails' => 'getEmploymentDetails', + 'endDate' => 'getEndDate', 'forcedCisVatAmount' => 'getForcedCisVatAmount', + 'fps' => 'getFps', + 'hasAttachmentOrders' => 'getHasAttachmentOrders', 'holidayAccrued' => 'getHolidayAccrued', - 'state' => 'getState', + 'id' => 'getId', 'isClosed' => 'getIsClosed', + 'isLatestVersion' => 'getIsLatestVersion', + 'isNewStarter' => 'getIsNewStarter', + 'isRemoved' => 'getIsRemoved', + 'isRolledBack' => 'getIsRolledBack', 'manualNi' => 'getManualNi', - 'niSplit' => 'getNiSplit', 'nationalInsuranceCalculation' => 'getNationalInsuranceCalculation', + 'niLetterError' => 'getNiLetterError', + 'niSplit' => 'getNiSplit', + 'note' => 'getNote', + 'ordinal' => 'getOrdinal', + 'originalPayRunEntryPaymentDate' => 'getOriginalPayRunEntryPaymentDate', + 'payOptions' => 'getPayOptions', + 'payPeriod' => 'getPayPeriod', + 'payRunVersion' => 'getPayRunVersion', + 'paymentAfterLeaving' => 'getPaymentAfterLeaving', + 'paymentDate' => 'getPaymentDate', 'payrollCodeChanged' => 'getPayrollCodeChanged', - 'aeNotEnroledWarning' => 'getAeNotEnroledWarning', - 'fps' => 'getFps', - 'emailId' => 'getEmailId', + 'pensionSummaries' => 'getPensionSummaries', + 'pensionSummary' => 'getPensionSummary', + 'percentageOfWorkingDaysPaidAsNormal' => 'getPercentageOfWorkingDaysPaidAsNormal', + 'period' => 'getPeriod', + 'periodOverrides' => 'getPeriodOverrides', + 'periodsCovered' => 'getPeriodsCovered', + 'personalDetails' => 'getPersonalDetails', + 'previousVersionTotals' => 'getPreviousVersionTotals', + 'priorPayrollCode' => 'getPriorPayrollCode', 'recievingOffsetPay' => 'getRecievingOffsetPay', - 'paymentAfterLeaving' => 'getPaymentAfterLeaving', + 'startDate' => 'getStartDate', + 'state' => 'getState', + 'taxMonth' => 'getTaxMonth', + 'taxYear' => 'getTaxYear', + 'teachersPensionAgeWarning' => 'getTeachersPensionAgeWarning', + 'totals' => 'getTotals', + 'totalsYtd' => 'getTotalsYtd', + 'totalsYtdOverrides' => 'getTotalsYtdOverrides', 'umbrellaPayment' => 'getUmbrellaPayment', - 'isRemoved' => 'getIsRemoved', - 'isRolledBack' => 'getIsRolledBack', - 'periodsCovered' => 'getPeriodsCovered', - 'employeeRolePayItems' => 'getEmployeeRolePayItems', + 'unpaidAbsence' => 'getUnpaidAbsence', 'warnings' => 'getWarnings', - 'niLetterError' => 'getNiLetterError', - 'teachersPensionAgeWarning' => 'getTeachersPensionAgeWarning', - 'id' => 'getId', - 'personalDetails' => 'getPersonalDetails', - 'employmentDetails' => 'getEmploymentDetails', - 'payOptions' => 'getPayOptions' + 'workingDaysNotPaidAsNormal' => 'getWorkingDaysNotPaidAsNormal' ]; /** @@ -532,55 +562,60 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('taxMonth', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); - $this->setIfExists('note', $data ?? [], null); - $this->setIfExists('bacsSubReference', $data ?? [], null); + $this->setIfExists('aeNotEnroledWarning', $data ?? [], null); $this->setIfExists('bacsHashCode', $data ?? [], null); - $this->setIfExists('percentageOfWorkingDaysPaidAsNormal', $data ?? [], null); - $this->setIfExists('workingDaysNotPaidAsNormal', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); - $this->setIfExists('ordinal', $data ?? [], null); - $this->setIfExists('period', $data ?? [], null); - $this->setIfExists('isNewStarter', $data ?? [], null); - $this->setIfExists('unpaidAbsence', $data ?? [], null); - $this->setIfExists('hasAttachmentOrders', $data ?? [], null); - $this->setIfExists('paymentDate', $data ?? [], null); - $this->setIfExists('priorPayrollCode', $data ?? [], null); - $this->setIfExists('pensionSummary', $data ?? [], null); - $this->setIfExists('pensionSummaries', $data ?? [], null); + $this->setIfExists('bacsSubReference', $data ?? [], null); + $this->setIfExists('differencePensionSummaries', $data ?? [], null); + $this->setIfExists('emailId', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('totals', $data ?? [], null); - $this->setIfExists('periodOverrides', $data ?? [], null); - $this->setIfExists('totalsYtd', $data ?? [], null); - $this->setIfExists('totalsYtdOverrides', $data ?? [], null); + $this->setIfExists('employeeRolePayItems', $data ?? [], null); + $this->setIfExists('employmentDetails', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('forcedCisVatAmount', $data ?? [], null); + $this->setIfExists('fps', $data ?? [], null); + $this->setIfExists('hasAttachmentOrders', $data ?? [], null); $this->setIfExists('holidayAccrued', $data ?? [], null); - $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('isClosed', $data ?? [], null); + $this->setIfExists('isLatestVersion', $data ?? [], null); + $this->setIfExists('isNewStarter', $data ?? [], null); + $this->setIfExists('isRemoved', $data ?? [], null); + $this->setIfExists('isRolledBack', $data ?? [], null); $this->setIfExists('manualNi', $data ?? [], null); - $this->setIfExists('niSplit', $data ?? [], null); $this->setIfExists('nationalInsuranceCalculation', $data ?? [], null); + $this->setIfExists('niLetterError', $data ?? [], null); + $this->setIfExists('niSplit', $data ?? [], null); + $this->setIfExists('note', $data ?? [], null); + $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('originalPayRunEntryPaymentDate', $data ?? [], null); + $this->setIfExists('payOptions', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('payRunVersion', $data ?? [], null); + $this->setIfExists('paymentAfterLeaving', $data ?? [], null); + $this->setIfExists('paymentDate', $data ?? [], null); $this->setIfExists('payrollCodeChanged', $data ?? [], null); - $this->setIfExists('aeNotEnroledWarning', $data ?? [], null); - $this->setIfExists('fps', $data ?? [], null); - $this->setIfExists('emailId', $data ?? [], null); + $this->setIfExists('pensionSummaries', $data ?? [], null); + $this->setIfExists('pensionSummary', $data ?? [], null); + $this->setIfExists('percentageOfWorkingDaysPaidAsNormal', $data ?? [], null); + $this->setIfExists('period', $data ?? [], null); + $this->setIfExists('periodOverrides', $data ?? [], null); + $this->setIfExists('periodsCovered', $data ?? [], null); + $this->setIfExists('personalDetails', $data ?? [], null); + $this->setIfExists('previousVersionTotals', $data ?? [], null); + $this->setIfExists('priorPayrollCode', $data ?? [], null); $this->setIfExists('recievingOffsetPay', $data ?? [], null); - $this->setIfExists('paymentAfterLeaving', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('taxMonth', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('teachersPensionAgeWarning', $data ?? [], null); + $this->setIfExists('totals', $data ?? [], null); + $this->setIfExists('totalsYtd', $data ?? [], null); + $this->setIfExists('totalsYtdOverrides', $data ?? [], null); $this->setIfExists('umbrellaPayment', $data ?? [], null); - $this->setIfExists('isRemoved', $data ?? [], null); - $this->setIfExists('isRolledBack', $data ?? [], null); - $this->setIfExists('periodsCovered', $data ?? [], null); - $this->setIfExists('employeeRolePayItems', $data ?? [], null); + $this->setIfExists('unpaidAbsence', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); - $this->setIfExists('niLetterError', $data ?? [], null); - $this->setIfExists('teachersPensionAgeWarning', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('personalDetails', $data ?? [], null); - $this->setIfExists('employmentDetails', $data ?? [], null); - $this->setIfExists('payOptions', $data ?? [], null); + $this->setIfExists('workingDaysNotPaidAsNormal', $data ?? [], null); } /** @@ -630,1013 +665,1189 @@ public function valid(): bool /** - * Gets taxYear + * Gets aeNotEnroledWarning + * + * @return bool|null + */ + public function getAeNotEnroledWarning(): ?bool + { + return $this->container['aeNotEnroledWarning']; + } + + /** + * Sets aeNotEnroledWarning + * + * @param bool|null $aeNotEnroledWarning [readonly] If true then this Employee needs to be on an Auto Enrolment pension but isn't yet. + * + * @return $this + */ + public function setAeNotEnroledWarning(?bool $aeNotEnroledWarning): static + { + if (is_null($aeNotEnroledWarning)) { + throw new InvalidArgumentException('non-nullable aeNotEnroledWarning cannot be null'); + } + $this->container['aeNotEnroledWarning'] = $aeNotEnroledWarning; + + return $this; + } + + /** + * Gets bacsHashCode + * + * @return string|null + */ + public function getBacsHashCode(): ?string + { + return $this->container['bacsHashCode']; + } + + /** + * Sets bacsHashCode + * + * @param string|null $bacsHashCode [readonly] A Hash Code used for RTI BACS Hash Cross Reference + * + * @return $this + */ + public function setBacsHashCode(?string $bacsHashCode): static + { + if (is_null($bacsHashCode)) { + array_push($this->openAPINullablesSetToNull, 'bacsHashCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bacsHashCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['bacsHashCode'] = $bacsHashCode; + + return $this; + } + + /** + * Gets bacsSubReference + * + * @return string|null + */ + public function getBacsSubReference(): ?string + { + return $this->container['bacsSubReference']; + } + + /** + * Sets bacsSubReference + * + * @param string|null $bacsSubReference [readonly] A randomly generated string for use with the RTI Hash Cross Reference + * + * @return $this + */ + public function setBacsSubReference(?string $bacsSubReference): static + { + if (is_null($bacsSubReference)) { + array_push($this->openAPINullablesSetToNull, 'bacsSubReference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bacsSubReference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['bacsSubReference'] = $bacsSubReference; + + return $this; + } + + /** + * Gets differencePensionSummaries + * + * @return \SynergiTech\Staffology\Model\PensionSummary[]|null + */ + public function getDifferencePensionSummaries(): ?array + { + return $this->container['differencePensionSummaries']; + } + + /** + * Sets differencePensionSummaries + * + * @param \SynergiTech\Staffology\Model\PensionSummary[]|null $differencePensionSummaries [readonly] A summary of the details for the Pensions (if any) that the Employee is assigned to. + * + * @return $this + */ + public function setDifferencePensionSummaries(?array $differencePensionSummaries): static + { + if (is_null($differencePensionSummaries)) { + array_push($this->openAPINullablesSetToNull, 'differencePensionSummaries'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('differencePensionSummaries', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['differencePensionSummaries'] = $differencePensionSummaries; + + return $this; + } + + /** + * Gets emailId + * + * @return string|null + */ + public function getEmailId(): ?string + { + return $this->container['emailId']; + } + + /** + * Sets emailId + * + * @param string|null $emailId If the Payslip for this PayRunEntry has been emailed to the employee then the Id for an EmployerEmail will be provided here. if the value is all zeroes then the email is in the process of being created. + * + * @return $this + */ + public function setEmailId(?string $emailId): static + { + if (is_null($emailId)) { + array_push($this->openAPINullablesSetToNull, 'emailId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('emailId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['emailId'] = $emailId; + + return $this; + } + + /** + * Gets employee + * + * @return \SynergiTech\Staffology\Model\Item|null + */ + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + { + return $this->container['employee']; + } + + /** + * Sets employee + * + * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * + * @return $this + */ + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + { + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); + } + $this->container['employee'] = $employee; + + return $this; + } + + /** + * Gets employeeRolePayItems + * + * @return \SynergiTech\Staffology\Model\EmployeeRolePayItem[]|null + */ + public function getEmployeeRolePayItems(): ?array + { + return $this->container['employeeRolePayItems']; + } + + /** + * Sets employeeRolePayItems + * + * @param \SynergiTech\Staffology\Model\EmployeeRolePayItem[]|null $employeeRolePayItems [readonly] Automatically populated. Array of base hourly and daily rates for the employee roles + * + * @return $this + */ + public function setEmployeeRolePayItems(?array $employeeRolePayItems): static + { + if (is_null($employeeRolePayItems)) { + array_push($this->openAPINullablesSetToNull, 'employeeRolePayItems'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employeeRolePayItems', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['employeeRolePayItems'] = $employeeRolePayItems; + + return $this; + } + + /** + * Gets employmentDetails * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return \SynergiTech\Staffology\Model\EmploymentDetails|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getEmploymentDetails(): ?\SynergiTech\Staffology\Model\EmploymentDetails { - return $this->container['taxYear']; + return $this->container['employmentDetails']; } /** - * Sets taxYear + * Sets employmentDetails * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param \SynergiTech\Staffology\Model\EmploymentDetails|null $employmentDetails employmentDetails * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setEmploymentDetails(?\SynergiTech\Staffology\Model\EmploymentDetails $employmentDetails): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($employmentDetails)) { + throw new InvalidArgumentException('non-nullable employmentDetails cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['employmentDetails'] = $employmentDetails; return $this; } /** - * Gets taxMonth + * Gets endDate * - * @return int|null + * @return \DateTime|null */ - public function getTaxMonth(): ?int + public function getEndDate(): ?\DateTime { - return $this->container['taxMonth']; + return $this->container['endDate']; } /** - * Sets taxMonth + * Sets endDate * - * @param int|null $taxMonth [readonly] The Tax Month that the Payment Date falls in + * @param \DateTime|null $endDate [readonly] * * @return $this */ - public function setTaxMonth(?int $taxMonth): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($taxMonth)) { - throw new InvalidArgumentException('non-nullable taxMonth cannot be null'); + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); } - $this->container['taxMonth'] = $taxMonth; + $this->container['endDate'] = $endDate; return $this; } /** - * Gets startDate + * Gets forcedCisVatAmount * - * @return \DateTime|null + * @return float|null */ - public function getStartDate(): ?\DateTime + public function getForcedCisVatAmount(): ?float { - return $this->container['startDate']; + return $this->container['forcedCisVatAmount']; } /** - * Sets startDate + * Sets forcedCisVatAmount * - * @param \DateTime|null $startDate [readonly] + * @param float|null $forcedCisVatAmount If this employee is a CIS Subcontractor registered for VAT, we'll automatically work out VAT at the set rate. If you want to override this calculations then set this property to anything other than null. * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setForcedCisVatAmount(?float $forcedCisVatAmount): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($forcedCisVatAmount)) { + array_push($this->openAPINullablesSetToNull, 'forcedCisVatAmount'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('forcedCisVatAmount', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['startDate'] = $startDate; + $this->container['forcedCisVatAmount'] = $forcedCisVatAmount; return $this; } /** - * Gets endDate + * Gets fps * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getEndDate(): ?\DateTime + public function getFps(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['endDate']; + return $this->container['fps']; } /** - * Sets endDate + * Sets fps * - * @param \DateTime|null $endDate [readonly] + * @param \SynergiTech\Staffology\Model\Item|null $fps fps * * @return $this */ - public function setEndDate(?\DateTime $endDate): static + public function setFps(?\SynergiTech\Staffology\Model\Item $fps): static { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); + if (is_null($fps)) { + throw new InvalidArgumentException('non-nullable fps cannot be null'); } - $this->container['endDate'] = $endDate; + $this->container['fps'] = $fps; return $this; } /** - * Gets note + * Gets hasAttachmentOrders * - * @return string|null + * @return bool|null */ - public function getNote(): ?string + public function getHasAttachmentOrders(): ?bool { - return $this->container['note']; + return $this->container['hasAttachmentOrders']; } /** - * Sets note + * Sets hasAttachmentOrders * - * @param string|null $note Any note that you'd like to appear on the payslip + * @param bool|null $hasAttachmentOrders [readonly] Indicates that there are AttachmentOrders for this Employee in this entry * * @return $this */ - public function setNote(?string $note): static + public function setHasAttachmentOrders(?bool $hasAttachmentOrders): static { - if (is_null($note)) { - array_push($this->openAPINullablesSetToNull, 'note'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('note', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($note) && (mb_strlen($note) > 500)) { - throw new InvalidArgumentException('invalid length for $note when calling PayRunEntry., must be smaller than or equal to 500.'); + if (is_null($hasAttachmentOrders)) { + throw new InvalidArgumentException('non-nullable hasAttachmentOrders cannot be null'); } - - $this->container['note'] = $note; + $this->container['hasAttachmentOrders'] = $hasAttachmentOrders; return $this; } /** - * Gets bacsSubReference + * Gets holidayAccrued * - * @return string|null + * @return float|null */ - public function getBacsSubReference(): ?string + public function getHolidayAccrued(): ?float { - return $this->container['bacsSubReference']; + return $this->container['holidayAccrued']; } /** - * Sets bacsSubReference + * Sets holidayAccrued * - * @param string|null $bacsSubReference [readonly] A randomly generated string for use with the RTI Hash Cross Reference + * @param float|null $holidayAccrued The amount of holiday days or hours accrued in the period. * * @return $this */ - public function setBacsSubReference(?string $bacsSubReference): static + public function setHolidayAccrued(?float $holidayAccrued): static { - if (is_null($bacsSubReference)) { - array_push($this->openAPINullablesSetToNull, 'bacsSubReference'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bacsSubReference', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($holidayAccrued)) { + throw new InvalidArgumentException('non-nullable holidayAccrued cannot be null'); } - $this->container['bacsSubReference'] = $bacsSubReference; + $this->container['holidayAccrued'] = $holidayAccrued; return $this; } /** - * Gets bacsHashCode + * Gets id * * @return string|null */ - public function getBacsHashCode(): ?string + public function getId(): ?string { - return $this->container['bacsHashCode']; + return $this->container['id']; } /** - * Sets bacsHashCode + * Sets id * - * @param string|null $bacsHashCode [readonly] A Hash Code used for RTI BACS Hash Cross Reference + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setBacsHashCode(?string $bacsHashCode): static + public function setId(?string $id): static { - if (is_null($bacsHashCode)) { - array_push($this->openAPINullablesSetToNull, 'bacsHashCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bacsHashCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['bacsHashCode'] = $bacsHashCode; + $this->container['id'] = $id; return $this; } /** - * Gets percentageOfWorkingDaysPaidAsNormal + * Gets isClosed * - * @return float|null + * @return bool|null */ - public function getPercentageOfWorkingDaysPaidAsNormal(): ?float + public function getIsClosed(): ?bool { - return $this->container['percentageOfWorkingDaysPaidAsNormal']; + return $this->container['isClosed']; } /** - * Sets percentageOfWorkingDaysPaidAsNormal + * Sets isClosed * - * @param float|null $percentageOfWorkingDaysPaidAsNormal [readonly] If the employee is paid a set amount per period (ie, not an hourly or daily rate) and there is any Leave that is either Not Paid or Statutory Pay then this value will give the percentage of working days (based on the Working Pattern) that should be paid as normal. If there is no Leave in the period or PayOptions.AutoAdjustForLeave is false, then this will be 1. + * @param bool|null $isClosed [readonly] Set to True if the PayRun is Finalised and changes can no longer be made to the PayRunEntries * * @return $this */ - public function setPercentageOfWorkingDaysPaidAsNormal(?float $percentageOfWorkingDaysPaidAsNormal): static + public function setIsClosed(?bool $isClosed): static { - if (is_null($percentageOfWorkingDaysPaidAsNormal)) { - throw new InvalidArgumentException('non-nullable percentageOfWorkingDaysPaidAsNormal cannot be null'); + if (is_null($isClosed)) { + throw new InvalidArgumentException('non-nullable isClosed cannot be null'); } - $this->container['percentageOfWorkingDaysPaidAsNormal'] = $percentageOfWorkingDaysPaidAsNormal; + $this->container['isClosed'] = $isClosed; return $this; } /** - * Gets workingDaysNotPaidAsNormal + * Gets isLatestVersion * - * @return float|null + * @return bool|null */ - public function getWorkingDaysNotPaidAsNormal(): ?float + public function getIsLatestVersion(): ?bool { - return $this->container['workingDaysNotPaidAsNormal']; + return $this->container['isLatestVersion']; } /** - * Sets workingDaysNotPaidAsNormal + * Sets isLatestVersion * - * @param float|null $workingDaysNotPaidAsNormal [readonly] If PercentageOfWorkingDaysPaidAsNormal has a value other than 1 then this property will tell you how many working days have been deducted from the basic pay due to either being Not Paid or Statutory Pay + * @param bool|null $isLatestVersion [readonly] Indicates whether this is the latest version of the PayRunEntry. * * @return $this */ - public function setWorkingDaysNotPaidAsNormal(?float $workingDaysNotPaidAsNormal): static + public function setIsLatestVersion(?bool $isLatestVersion): static { - if (is_null($workingDaysNotPaidAsNormal)) { - throw new InvalidArgumentException('non-nullable workingDaysNotPaidAsNormal cannot be null'); + if (is_null($isLatestVersion)) { + throw new InvalidArgumentException('non-nullable isLatestVersion cannot be null'); } - $this->container['workingDaysNotPaidAsNormal'] = $workingDaysNotPaidAsNormal; + $this->container['isLatestVersion'] = $isLatestVersion; return $this; } /** - * Gets payPeriod + * Gets isNewStarter * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return bool|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getIsNewStarter(): ?bool { - return $this->container['payPeriod']; + return $this->container['isNewStarter']; } /** - * Sets payPeriod + * Sets isNewStarter * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param bool|null $isNewStarter Determines whether or not this Employee will be declared as a new starter on the resulting FPS * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setIsNewStarter(?bool $isNewStarter): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($isNewStarter)) { + throw new InvalidArgumentException('non-nullable isNewStarter cannot be null'); } - $this->container['payPeriod'] = $payPeriod; + $this->container['isNewStarter'] = $isNewStarter; return $this; } /** - * Gets ordinal + * Gets isRemoved * - * @return int|null + * @return bool|null */ - public function getOrdinal(): ?int + public function getIsRemoved(): ?bool { - return $this->container['ordinal']; + return $this->container['isRemoved']; } /** - * Sets ordinal + * Sets isRemoved * - * @param int|null $ordinal [readonly] Indicates whether this uses the first, second, third (etc) PaySchedule for this PayPeriod. + * @param bool|null $isRemoved Has the entry been removed from the payrun * * @return $this */ - public function setOrdinal(?int $ordinal): static + public function setIsRemoved(?bool $isRemoved): static { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + if (is_null($isRemoved)) { + throw new InvalidArgumentException('non-nullable isRemoved cannot be null'); } - $this->container['ordinal'] = $ordinal; + $this->container['isRemoved'] = $isRemoved; return $this; } /** - * Gets period + * Gets isRolledBack * - * @return int|null + * @return bool|null */ - public function getPeriod(): ?int + public function getIsRolledBack(): ?bool { - return $this->container['period']; + return $this->container['isRolledBack']; } /** - * Sets period + * Sets isRolledBack * - * @param int|null $period [readonly] The Tax Week or Tax Month number this PayRunEntry relates to + * @param bool|null $isRolledBack [readonly] Set to True if the Pay Run Entry is currently rolled back * * @return $this */ - public function setPeriod(?int $period): static + public function setIsRolledBack(?bool $isRolledBack): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($isRolledBack)) { + throw new InvalidArgumentException('non-nullable isRolledBack cannot be null'); } - $this->container['period'] = $period; + $this->container['isRolledBack'] = $isRolledBack; return $this; } /** - * Gets isNewStarter + * Gets manualNi * * @return bool|null */ - public function getIsNewStarter(): ?bool + public function getManualNi(): ?bool { - return $this->container['isNewStarter']; + return $this->container['manualNi']; } /** - * Sets isNewStarter + * Sets manualNi * - * @param bool|null $isNewStarter Determines whether or not this Employee will be declared as a new starter on the resulting FPS + * @param bool|null $manualNi If set to true then you must provide your own value for NationalInsuranceCalculation. You'd normally leave this set to false and let us automatically calculate NI amounts. * * @return $this */ - public function setIsNewStarter(?bool $isNewStarter): static + public function setManualNi(?bool $manualNi): static { - if (is_null($isNewStarter)) { - throw new InvalidArgumentException('non-nullable isNewStarter cannot be null'); + if (is_null($manualNi)) { + throw new InvalidArgumentException('non-nullable manualNi cannot be null'); } - $this->container['isNewStarter'] = $isNewStarter; + $this->container['manualNi'] = $manualNi; return $this; } /** - * Gets unpaidAbsence + * Gets nationalInsuranceCalculation * - * @return bool|null + * @return \SynergiTech\Staffology\Model\NationalInsuranceCalculation|null */ - public function getUnpaidAbsence(): ?bool + public function getNationalInsuranceCalculation(): ?\SynergiTech\Staffology\Model\NationalInsuranceCalculation { - return $this->container['unpaidAbsence']; + return $this->container['nationalInsuranceCalculation']; } /** - * Sets unpaidAbsence + * Sets nationalInsuranceCalculation * - * @param bool|null $unpaidAbsence [readonly] Indicates that there was unpaid absence in the pay period + * @param \SynergiTech\Staffology\Model\NationalInsuranceCalculation|null $nationalInsuranceCalculation nationalInsuranceCalculation * * @return $this */ - public function setUnpaidAbsence(?bool $unpaidAbsence): static + public function setNationalInsuranceCalculation(?\SynergiTech\Staffology\Model\NationalInsuranceCalculation $nationalInsuranceCalculation): static { - if (is_null($unpaidAbsence)) { - throw new InvalidArgumentException('non-nullable unpaidAbsence cannot be null'); + if (is_null($nationalInsuranceCalculation)) { + throw new InvalidArgumentException('non-nullable nationalInsuranceCalculation cannot be null'); } - $this->container['unpaidAbsence'] = $unpaidAbsence; + $this->container['nationalInsuranceCalculation'] = $nationalInsuranceCalculation; return $this; } /** - * Gets hasAttachmentOrders + * Gets niLetterError * - * @return bool|null + * @return \SynergiTech\Staffology\Model\NiLetterError|null */ - public function getHasAttachmentOrders(): ?bool + public function getNiLetterError(): ?\SynergiTech\Staffology\Model\NiLetterError { - return $this->container['hasAttachmentOrders']; + return $this->container['niLetterError']; } /** - * Sets hasAttachmentOrders + * Sets niLetterError * - * @param bool|null $hasAttachmentOrders [readonly] Indicates that there are AttachmentOrders for this Employee in this entry + * @param \SynergiTech\Staffology\Model\NiLetterError|null $niLetterError niLetterError * * @return $this */ - public function setHasAttachmentOrders(?bool $hasAttachmentOrders): static + public function setNiLetterError(?\SynergiTech\Staffology\Model\NiLetterError $niLetterError): static { - if (is_null($hasAttachmentOrders)) { - throw new InvalidArgumentException('non-nullable hasAttachmentOrders cannot be null'); + if (is_null($niLetterError)) { + throw new InvalidArgumentException('non-nullable niLetterError cannot be null'); } - $this->container['hasAttachmentOrders'] = $hasAttachmentOrders; + $this->container['niLetterError'] = $niLetterError; return $this; } /** - * Gets paymentDate + * Gets niSplit * - * @return \DateTime|null + * @return bool|null */ - public function getPaymentDate(): ?\DateTime + public function getNiSplit(): ?bool { - return $this->container['paymentDate']; + return $this->container['niSplit']; } /** - * Sets paymentDate + * Sets niSplit * - * @param \DateTime|null $paymentDate The date this payment was or will be made + * @param bool|null $niSplit If set to true Ni calculations are done for backdated pay for each pay period separately and then summed up * * @return $this */ - public function setPaymentDate(?\DateTime $paymentDate): static + public function setNiSplit(?bool $niSplit): static { - if (is_null($paymentDate)) { - throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); + if (is_null($niSplit)) { + throw new InvalidArgumentException('non-nullable niSplit cannot be null'); } - $this->container['paymentDate'] = $paymentDate; + $this->container['niSplit'] = $niSplit; return $this; } /** - * Gets priorPayrollCode + * Gets note * * @return string|null */ - public function getPriorPayrollCode(): ?string + public function getNote(): ?string { - return $this->container['priorPayrollCode']; + return $this->container['note']; } /** - * Sets priorPayrollCode + * Sets note * - * @param string|null $priorPayrollCode [readonly] If the FPS needs to declare a change of PayId then this will contain the previous code It's worked out automatically but can also be set from the Employees EmploymentDetails property. + * @param string|null $note Any note that you'd like to appear on the payslip * * @return $this */ - public function setPriorPayrollCode(?string $priorPayrollCode): static + public function setNote(?string $note): static { - if (is_null($priorPayrollCode)) { - array_push($this->openAPINullablesSetToNull, 'priorPayrollCode'); + if (is_null($note)) { + array_push($this->openAPINullablesSetToNull, 'note'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('priorPayrollCode', $nullablesSetToNull); + $index = array_search('note', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['priorPayrollCode'] = $priorPayrollCode; + if (!is_null($note) && (mb_strlen($note) > 500)) { + throw new InvalidArgumentException('invalid length for $note when calling PayRunEntry., must be smaller than or equal to 500.'); + } + + $this->container['note'] = $note; return $this; } /** - * Gets pensionSummary + * Gets ordinal * - * @return \SynergiTech\Staffology\Model\PensionSummary|null + * @return int|null */ - public function getPensionSummary(): ?\SynergiTech\Staffology\Model\PensionSummary + public function getOrdinal(): ?int { - return $this->container['pensionSummary']; + return $this->container['ordinal']; } /** - * Sets pensionSummary + * Sets ordinal * - * @param \SynergiTech\Staffology\Model\PensionSummary|null $pensionSummary pensionSummary + * @param int|null $ordinal [readonly] Indicates whether this uses the first, second, third (etc) PaySchedule for this PayPeriod. * * @return $this */ - public function setPensionSummary(?\SynergiTech\Staffology\Model\PensionSummary $pensionSummary): static + public function setOrdinal(?int $ordinal): static { - if (is_null($pensionSummary)) { - throw new InvalidArgumentException('non-nullable pensionSummary cannot be null'); + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['pensionSummary'] = $pensionSummary; + $this->container['ordinal'] = $ordinal; return $this; } /** - * Gets pensionSummaries + * Gets originalPayRunEntryPaymentDate * - * @return \SynergiTech\Staffology\Model\PensionSummary[]|null + * @return \DateTime|null */ - public function getPensionSummaries(): ?array + public function getOriginalPayRunEntryPaymentDate(): ?\DateTime { - return $this->container['pensionSummaries']; + return $this->container['originalPayRunEntryPaymentDate']; } /** - * Sets pensionSummaries + * Sets originalPayRunEntryPaymentDate * - * @param \SynergiTech\Staffology\Model\PensionSummary[]|null $pensionSummaries [readonly] A summary of the details for the Pensions (if any) that the Employee is assigned to. + * @param \DateTime|null $originalPayRunEntryPaymentDate [readonly] If this PayRunEntry is a supplementary PayRunEntry then this will be the date of the original PayRunEntry's Payment Date * * @return $this */ - public function setPensionSummaries(?array $pensionSummaries): static + public function setOriginalPayRunEntryPaymentDate(?\DateTime $originalPayRunEntryPaymentDate): static { - if (is_null($pensionSummaries)) { - array_push($this->openAPINullablesSetToNull, 'pensionSummaries'); + if (is_null($originalPayRunEntryPaymentDate)) { + array_push($this->openAPINullablesSetToNull, 'originalPayRunEntryPaymentDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionSummaries', $nullablesSetToNull); + $index = array_search('originalPayRunEntryPaymentDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionSummaries'] = $pensionSummaries; - - return $this; - } - - /** - * Gets employee - * - * @return \SynergiTech\Staffology\Model\Item|null - */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item - { - return $this->container['employee']; - } - - /** - * Sets employee - * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee - * - * @return $this - */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static - { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); - } - $this->container['employee'] = $employee; + $this->container['originalPayRunEntryPaymentDate'] = $originalPayRunEntryPaymentDate; return $this; } /** - * Gets totals + * Gets payOptions * - * @return \SynergiTech\Staffology\Model\PayRunTotals|null + * @return \SynergiTech\Staffology\Model\PayOptions|null */ - public function getTotals(): ?\SynergiTech\Staffology\Model\PayRunTotals + public function getPayOptions(): ?\SynergiTech\Staffology\Model\PayOptions { - return $this->container['totals']; + return $this->container['payOptions']; } /** - * Sets totals + * Sets payOptions * - * @param \SynergiTech\Staffology\Model\PayRunTotals|null $totals totals + * @param \SynergiTech\Staffology\Model\PayOptions|null $payOptions payOptions * * @return $this */ - public function setTotals(?\SynergiTech\Staffology\Model\PayRunTotals $totals): static + public function setPayOptions(?\SynergiTech\Staffology\Model\PayOptions $payOptions): static { - if (is_null($totals)) { - throw new InvalidArgumentException('non-nullable totals cannot be null'); + if (is_null($payOptions)) { + throw new InvalidArgumentException('non-nullable payOptions cannot be null'); } - $this->container['totals'] = $totals; + $this->container['payOptions'] = $payOptions; return $this; } /** - * Gets periodOverrides + * Gets payPeriod * - * @return \SynergiTech\Staffology\Model\ValueOverride[]|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getPeriodOverrides(): ?array + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['periodOverrides']; + return $this->container['payPeriod']; } /** - * Sets periodOverrides + * Sets payPeriod * - * @param \SynergiTech\Staffology\Model\ValueOverride[]|null $periodOverrides Any calculated values for this period that should be overridden with a different value + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod * * @return $this */ - public function setPeriodOverrides(?array $periodOverrides): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static { - if (is_null($periodOverrides)) { - array_push($this->openAPINullablesSetToNull, 'periodOverrides'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('periodOverrides', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['periodOverrides'] = $periodOverrides; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets totalsYtd + * Gets payRunVersion * - * @return \SynergiTech\Staffology\Model\PayRunTotals|null + * @return int|null */ - public function getTotalsYtd(): ?\SynergiTech\Staffology\Model\PayRunTotals + public function getPayRunVersion(): ?int { - return $this->container['totalsYtd']; + return $this->container['payRunVersion']; } /** - * Sets totalsYtd + * Sets payRunVersion * - * @param \SynergiTech\Staffology\Model\PayRunTotals|null $totalsYtd totalsYtd + * @param int|null $payRunVersion [readonly] The supplementary pay run version of this PayRunEntry. * * @return $this */ - public function setTotalsYtd(?\SynergiTech\Staffology\Model\PayRunTotals $totalsYtd): static + public function setPayRunVersion(?int $payRunVersion): static { - if (is_null($totalsYtd)) { - throw new InvalidArgumentException('non-nullable totalsYtd cannot be null'); + if (is_null($payRunVersion)) { + throw new InvalidArgumentException('non-nullable payRunVersion cannot be null'); } - $this->container['totalsYtd'] = $totalsYtd; + $this->container['payRunVersion'] = $payRunVersion; return $this; } /** - * Gets totalsYtdOverrides + * Gets paymentAfterLeaving * - * @return \SynergiTech\Staffology\Model\ValueOverride[]|null + * @return bool|null */ - public function getTotalsYtdOverrides(): ?array + public function getPaymentAfterLeaving(): ?bool { - return $this->container['totalsYtdOverrides']; + return $this->container['paymentAfterLeaving']; } /** - * Sets totalsYtdOverrides + * Sets paymentAfterLeaving * - * @param \SynergiTech\Staffology\Model\ValueOverride[]|null $totalsYtdOverrides Any values of TotalsYtd that should be overridden with a different value + * @param bool|null $paymentAfterLeaving [readonly] If this payment is for an employee that has left then this is set to true. * * @return $this */ - public function setTotalsYtdOverrides(?array $totalsYtdOverrides): static + public function setPaymentAfterLeaving(?bool $paymentAfterLeaving): static { - if (is_null($totalsYtdOverrides)) { - array_push($this->openAPINullablesSetToNull, 'totalsYtdOverrides'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('totalsYtdOverrides', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($paymentAfterLeaving)) { + throw new InvalidArgumentException('non-nullable paymentAfterLeaving cannot be null'); } - $this->container['totalsYtdOverrides'] = $totalsYtdOverrides; + $this->container['paymentAfterLeaving'] = $paymentAfterLeaving; return $this; } /** - * Gets forcedCisVatAmount + * Gets paymentDate * - * @return float|null + * @return \DateTime|null */ - public function getForcedCisVatAmount(): ?float + public function getPaymentDate(): ?\DateTime { - return $this->container['forcedCisVatAmount']; + return $this->container['paymentDate']; } /** - * Sets forcedCisVatAmount + * Sets paymentDate * - * @param float|null $forcedCisVatAmount If this employee is a CIS Subcontractor registered for VAT, we'll automatically work out VAT at the set rate. If you want to override this calculations then set this property to anything other than null. + * @param \DateTime|null $paymentDate The date this payment was or will be made * * @return $this */ - public function setForcedCisVatAmount(?float $forcedCisVatAmount): static + public function setPaymentDate(?\DateTime $paymentDate): static { - if (is_null($forcedCisVatAmount)) { - array_push($this->openAPINullablesSetToNull, 'forcedCisVatAmount'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('forcedCisVatAmount', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($paymentDate)) { + throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); } - $this->container['forcedCisVatAmount'] = $forcedCisVatAmount; + $this->container['paymentDate'] = $paymentDate; return $this; } /** - * Gets holidayAccrued + * Gets payrollCodeChanged * - * @return float|null + * @return bool|null */ - public function getHolidayAccrued(): ?float + public function getPayrollCodeChanged(): ?bool { - return $this->container['holidayAccrued']; + return $this->container['payrollCodeChanged']; } /** - * Sets holidayAccrued + * Sets payrollCodeChanged * - * @param float|null $holidayAccrued The amount of holiday days or hours accrued in the period. + * @param bool|null $payrollCodeChanged [readonly] Indicates whether or not the Payroll Code for this Employee has changed since the last FPS * * @return $this */ - public function setHolidayAccrued(?float $holidayAccrued): static + public function setPayrollCodeChanged(?bool $payrollCodeChanged): static { - if (is_null($holidayAccrued)) { - throw new InvalidArgumentException('non-nullable holidayAccrued cannot be null'); + if (is_null($payrollCodeChanged)) { + throw new InvalidArgumentException('non-nullable payrollCodeChanged cannot be null'); } - $this->container['holidayAccrued'] = $holidayAccrued; + $this->container['payrollCodeChanged'] = $payrollCodeChanged; return $this; } /** - * Gets state + * Gets pensionSummaries * - * @return \SynergiTech\Staffology\Model\PayRunState|null + * @return \SynergiTech\Staffology\Model\PensionSummary[]|null */ - public function getState(): ?\SynergiTech\Staffology\Model\PayRunState + public function getPensionSummaries(): ?array { - return $this->container['state']; + return $this->container['pensionSummaries']; } /** - * Sets state + * Sets pensionSummaries * - * @param \SynergiTech\Staffology\Model\PayRunState|null $state state + * @param \SynergiTech\Staffology\Model\PensionSummary[]|null $pensionSummaries [readonly] A summary of the details for the Pensions (if any) that the Employee is assigned to. * * @return $this */ - public function setState(?\SynergiTech\Staffology\Model\PayRunState $state): static + public function setPensionSummaries(?array $pensionSummaries): static { - if (is_null($state)) { - throw new InvalidArgumentException('non-nullable state cannot be null'); + if (is_null($pensionSummaries)) { + array_push($this->openAPINullablesSetToNull, 'pensionSummaries'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pensionSummaries', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['state'] = $state; + $this->container['pensionSummaries'] = $pensionSummaries; return $this; } /** - * Gets isClosed + * Gets pensionSummary * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PensionSummary|null */ - public function getIsClosed(): ?bool + public function getPensionSummary(): ?\SynergiTech\Staffology\Model\PensionSummary { - return $this->container['isClosed']; + return $this->container['pensionSummary']; } /** - * Sets isClosed + * Sets pensionSummary * - * @param bool|null $isClosed [readonly] Set to True if the PayRun is Finalised and changes can no longer be made to the PayRunEntries + * @param \SynergiTech\Staffology\Model\PensionSummary|null $pensionSummary pensionSummary * * @return $this */ - public function setIsClosed(?bool $isClosed): static + public function setPensionSummary(?\SynergiTech\Staffology\Model\PensionSummary $pensionSummary): static { - if (is_null($isClosed)) { - throw new InvalidArgumentException('non-nullable isClosed cannot be null'); + if (is_null($pensionSummary)) { + throw new InvalidArgumentException('non-nullable pensionSummary cannot be null'); } - $this->container['isClosed'] = $isClosed; + $this->container['pensionSummary'] = $pensionSummary; return $this; } /** - * Gets manualNi + * Gets percentageOfWorkingDaysPaidAsNormal * - * @return bool|null + * @return float|null */ - public function getManualNi(): ?bool + public function getPercentageOfWorkingDaysPaidAsNormal(): ?float { - return $this->container['manualNi']; + return $this->container['percentageOfWorkingDaysPaidAsNormal']; } /** - * Sets manualNi + * Sets percentageOfWorkingDaysPaidAsNormal * - * @param bool|null $manualNi If set to true then you must provide your own value for NationalInsuranceCalculation. You'd normally leave this set to false and let us automatically calculate NI amounts. + * @param float|null $percentageOfWorkingDaysPaidAsNormal [readonly] If the employee is paid a set amount per period (ie, not an hourly or daily rate) and there is any Leave that is either Not Paid or Statutory Pay then this value will give the percentage of working days (based on the Working Pattern) that should be paid as normal. If there is no Leave in the period or PayOptions.AutoAdjustForLeave is false, then this will be 1. * * @return $this */ - public function setManualNi(?bool $manualNi): static + public function setPercentageOfWorkingDaysPaidAsNormal(?float $percentageOfWorkingDaysPaidAsNormal): static { - if (is_null($manualNi)) { - throw new InvalidArgumentException('non-nullable manualNi cannot be null'); + if (is_null($percentageOfWorkingDaysPaidAsNormal)) { + throw new InvalidArgumentException('non-nullable percentageOfWorkingDaysPaidAsNormal cannot be null'); } - $this->container['manualNi'] = $manualNi; + $this->container['percentageOfWorkingDaysPaidAsNormal'] = $percentageOfWorkingDaysPaidAsNormal; return $this; } /** - * Gets niSplit + * Gets period * - * @return bool|null + * @return int|null */ - public function getNiSplit(): ?bool + public function getPeriod(): ?int { - return $this->container['niSplit']; + return $this->container['period']; } /** - * Sets niSplit + * Sets period * - * @param bool|null $niSplit If set to true Ni calculations are done for backdated pay for each pay period separately and then summed up + * @param int|null $period [readonly] The Tax Week or Tax Month number this PayRunEntry relates to * * @return $this */ - public function setNiSplit(?bool $niSplit): static + public function setPeriod(?int $period): static { - if (is_null($niSplit)) { - throw new InvalidArgumentException('non-nullable niSplit cannot be null'); + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['niSplit'] = $niSplit; + $this->container['period'] = $period; return $this; } /** - * Gets nationalInsuranceCalculation + * Gets periodOverrides * - * @return \SynergiTech\Staffology\Model\NationalInsuranceCalculation|null + * @return \SynergiTech\Staffology\Model\ValueOverride[]|null */ - public function getNationalInsuranceCalculation(): ?\SynergiTech\Staffology\Model\NationalInsuranceCalculation + public function getPeriodOverrides(): ?array { - return $this->container['nationalInsuranceCalculation']; + return $this->container['periodOverrides']; } /** - * Sets nationalInsuranceCalculation + * Sets periodOverrides * - * @param \SynergiTech\Staffology\Model\NationalInsuranceCalculation|null $nationalInsuranceCalculation nationalInsuranceCalculation + * @param \SynergiTech\Staffology\Model\ValueOverride[]|null $periodOverrides Any calculated values for this period that should be overridden with a different value * * @return $this */ - public function setNationalInsuranceCalculation(?\SynergiTech\Staffology\Model\NationalInsuranceCalculation $nationalInsuranceCalculation): static + public function setPeriodOverrides(?array $periodOverrides): static { - if (is_null($nationalInsuranceCalculation)) { - throw new InvalidArgumentException('non-nullable nationalInsuranceCalculation cannot be null'); + if (is_null($periodOverrides)) { + array_push($this->openAPINullablesSetToNull, 'periodOverrides'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('periodOverrides', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['nationalInsuranceCalculation'] = $nationalInsuranceCalculation; + $this->container['periodOverrides'] = $periodOverrides; return $this; } /** - * Gets payrollCodeChanged + * Gets periodsCovered * - * @return bool|null + * @return int|null */ - public function getPayrollCodeChanged(): ?bool + public function getPeriodsCovered(): ?int { - return $this->container['payrollCodeChanged']; + return $this->container['periodsCovered']; } /** - * Sets payrollCodeChanged + * Sets periodsCovered * - * @param bool|null $payrollCodeChanged [readonly] Indicates whether or not the Payroll Code for this Employee has changed since the last FPS + * @param int|null $periodsCovered [readonly] The amount of periods that the Pay Run Entry covers. This can be > 1 when back pay for previous periods is paid in the current period * * @return $this */ - public function setPayrollCodeChanged(?bool $payrollCodeChanged): static + public function setPeriodsCovered(?int $periodsCovered): static { - if (is_null($payrollCodeChanged)) { - throw new InvalidArgumentException('non-nullable payrollCodeChanged cannot be null'); + if (is_null($periodsCovered)) { + throw new InvalidArgumentException('non-nullable periodsCovered cannot be null'); } - $this->container['payrollCodeChanged'] = $payrollCodeChanged; + $this->container['periodsCovered'] = $periodsCovered; return $this; } /** - * Gets aeNotEnroledWarning + * Gets personalDetails * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PersonalDetails|null */ - public function getAeNotEnroledWarning(): ?bool + public function getPersonalDetails(): ?\SynergiTech\Staffology\Model\PersonalDetails { - return $this->container['aeNotEnroledWarning']; + return $this->container['personalDetails']; } /** - * Sets aeNotEnroledWarning + * Sets personalDetails * - * @param bool|null $aeNotEnroledWarning [readonly] If true then this Employee needs to be on an Auto Enrolment pension but isn't yet. + * @param \SynergiTech\Staffology\Model\PersonalDetails|null $personalDetails personalDetails * * @return $this */ - public function setAeNotEnroledWarning(?bool $aeNotEnroledWarning): static + public function setPersonalDetails(?\SynergiTech\Staffology\Model\PersonalDetails $personalDetails): static { - if (is_null($aeNotEnroledWarning)) { - throw new InvalidArgumentException('non-nullable aeNotEnroledWarning cannot be null'); + if (is_null($personalDetails)) { + throw new InvalidArgumentException('non-nullable personalDetails cannot be null'); } - $this->container['aeNotEnroledWarning'] = $aeNotEnroledWarning; + $this->container['personalDetails'] = $personalDetails; return $this; } /** - * Gets fps + * Gets previousVersionTotals * - * @return \SynergiTech\Staffology\Model\Item|null + * @return \SynergiTech\Staffology\Model\PayRunTotals|null */ - public function getFps(): ?\SynergiTech\Staffology\Model\Item + public function getPreviousVersionTotals(): ?\SynergiTech\Staffology\Model\PayRunTotals { - return $this->container['fps']; + return $this->container['previousVersionTotals']; } /** - * Sets fps + * Sets previousVersionTotals * - * @param \SynergiTech\Staffology\Model\Item|null $fps fps + * @param \SynergiTech\Staffology\Model\PayRunTotals|null $previousVersionTotals previousVersionTotals * * @return $this */ - public function setFps(?\SynergiTech\Staffology\Model\Item $fps): static + public function setPreviousVersionTotals(?\SynergiTech\Staffology\Model\PayRunTotals $previousVersionTotals): static { - if (is_null($fps)) { - throw new InvalidArgumentException('non-nullable fps cannot be null'); + if (is_null($previousVersionTotals)) { + throw new InvalidArgumentException('non-nullable previousVersionTotals cannot be null'); } - $this->container['fps'] = $fps; + $this->container['previousVersionTotals'] = $previousVersionTotals; return $this; } /** - * Gets emailId + * Gets priorPayrollCode * * @return string|null */ - public function getEmailId(): ?string + public function getPriorPayrollCode(): ?string { - return $this->container['emailId']; + return $this->container['priorPayrollCode']; } /** - * Sets emailId + * Sets priorPayrollCode * - * @param string|null $emailId If the Payslip for this PayRunEntry has been emailed to the employee then the Id for an EmployerEmail will be provided here. if the value is all zeroes then the email is in the process of being created. + * @param string|null $priorPayrollCode [readonly] If the FPS needs to declare a change of PayId then this will contain the previous code It's worked out automatically but can also be set from the Employees EmploymentDetails property. * * @return $this */ - public function setEmailId(?string $emailId): static + public function setPriorPayrollCode(?string $priorPayrollCode): static { - if (is_null($emailId)) { - array_push($this->openAPINullablesSetToNull, 'emailId'); + if (is_null($priorPayrollCode)) { + array_push($this->openAPINullablesSetToNull, 'priorPayrollCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('emailId', $nullablesSetToNull); + $index = array_search('priorPayrollCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['emailId'] = $emailId; + $this->container['priorPayrollCode'] = $priorPayrollCode; return $this; } @@ -1663,365 +1874,338 @@ public function setRecievingOffsetPay(?bool $recievingOffsetPay): static if (is_null($recievingOffsetPay)) { throw new InvalidArgumentException('non-nullable recievingOffsetPay cannot be null'); } - $this->container['recievingOffsetPay'] = $recievingOffsetPay; - - return $this; - } - - /** - * Gets paymentAfterLeaving - * - * @return bool|null - */ - public function getPaymentAfterLeaving(): ?bool - { - return $this->container['paymentAfterLeaving']; - } - - /** - * Sets paymentAfterLeaving - * - * @param bool|null $paymentAfterLeaving [readonly] If this payment is for an employee that has left then this is set to true. - * - * @return $this - */ - public function setPaymentAfterLeaving(?bool $paymentAfterLeaving): static - { - if (is_null($paymentAfterLeaving)) { - throw new InvalidArgumentException('non-nullable paymentAfterLeaving cannot be null'); - } - $this->container['paymentAfterLeaving'] = $paymentAfterLeaving; + $this->container['recievingOffsetPay'] = $recievingOffsetPay; return $this; } /** - * Gets umbrellaPayment + * Gets startDate * - * @return \SynergiTech\Staffology\Model\UmbrellaPayment|null + * @return \DateTime|null */ - public function getUmbrellaPayment(): ?\SynergiTech\Staffology\Model\UmbrellaPayment + public function getStartDate(): ?\DateTime { - return $this->container['umbrellaPayment']; + return $this->container['startDate']; } /** - * Sets umbrellaPayment + * Sets startDate * - * @param \SynergiTech\Staffology\Model\UmbrellaPayment|null $umbrellaPayment umbrellaPayment + * @param \DateTime|null $startDate [readonly] * * @return $this */ - public function setUmbrellaPayment(?\SynergiTech\Staffology\Model\UmbrellaPayment $umbrellaPayment): static + public function setStartDate(?\DateTime $startDate): static { - if (is_null($umbrellaPayment)) { - throw new InvalidArgumentException('non-nullable umbrellaPayment cannot be null'); + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); } - $this->container['umbrellaPayment'] = $umbrellaPayment; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets isRemoved + * Gets state * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PayRunState|null */ - public function getIsRemoved(): ?bool + public function getState(): ?\SynergiTech\Staffology\Model\PayRunState { - return $this->container['isRemoved']; + return $this->container['state']; } /** - * Sets isRemoved + * Sets state * - * @param bool|null $isRemoved Has the entry been removed from the payrun + * @param \SynergiTech\Staffology\Model\PayRunState|null $state state * * @return $this */ - public function setIsRemoved(?bool $isRemoved): static + public function setState(?\SynergiTech\Staffology\Model\PayRunState $state): static { - if (is_null($isRemoved)) { - throw new InvalidArgumentException('non-nullable isRemoved cannot be null'); + if (is_null($state)) { + throw new InvalidArgumentException('non-nullable state cannot be null'); } - $this->container['isRemoved'] = $isRemoved; + $this->container['state'] = $state; return $this; } /** - * Gets isRolledBack + * Gets taxMonth * - * @return bool|null + * @return int|null */ - public function getIsRolledBack(): ?bool + public function getTaxMonth(): ?int { - return $this->container['isRolledBack']; + return $this->container['taxMonth']; } /** - * Sets isRolledBack + * Sets taxMonth * - * @param bool|null $isRolledBack [readonly] Set to True if the Pay Run Entry is currently rolled back + * @param int|null $taxMonth [readonly] The Tax Month that the Payment Date falls in * * @return $this */ - public function setIsRolledBack(?bool $isRolledBack): static + public function setTaxMonth(?int $taxMonth): static { - if (is_null($isRolledBack)) { - throw new InvalidArgumentException('non-nullable isRolledBack cannot be null'); + if (is_null($taxMonth)) { + throw new InvalidArgumentException('non-nullable taxMonth cannot be null'); } - $this->container['isRolledBack'] = $isRolledBack; + $this->container['taxMonth'] = $taxMonth; return $this; } /** - * Gets periodsCovered + * Gets taxYear * - * @return int|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getPeriodsCovered(): ?int + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['periodsCovered']; + return $this->container['taxYear']; } /** - * Sets periodsCovered + * Sets taxYear * - * @param int|null $periodsCovered [readonly] The amount of periods that the Pay Run Entry covers. This can be > 1 when back pay for previous periods is paid in the current period + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setPeriodsCovered(?int $periodsCovered): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($periodsCovered)) { - throw new InvalidArgumentException('non-nullable periodsCovered cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['periodsCovered'] = $periodsCovered; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets employeeRolePayItems + * Gets teachersPensionAgeWarning * - * @return \SynergiTech\Staffology\Model\EmployeeRolePayItem[]|null + * @return \SynergiTech\Staffology\Model\TeachersPensionAgeWarning|null */ - public function getEmployeeRolePayItems(): ?array + public function getTeachersPensionAgeWarning(): ?\SynergiTech\Staffology\Model\TeachersPensionAgeWarning { - return $this->container['employeeRolePayItems']; + return $this->container['teachersPensionAgeWarning']; } /** - * Sets employeeRolePayItems + * Sets teachersPensionAgeWarning * - * @param \SynergiTech\Staffology\Model\EmployeeRolePayItem[]|null $employeeRolePayItems [readonly] Automatically populated. Array of base hourly and daily rates for the employee roles + * @param \SynergiTech\Staffology\Model\TeachersPensionAgeWarning|null $teachersPensionAgeWarning teachersPensionAgeWarning * * @return $this */ - public function setEmployeeRolePayItems(?array $employeeRolePayItems): static + public function setTeachersPensionAgeWarning(?\SynergiTech\Staffology\Model\TeachersPensionAgeWarning $teachersPensionAgeWarning): static { - if (is_null($employeeRolePayItems)) { - array_push($this->openAPINullablesSetToNull, 'employeeRolePayItems'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeeRolePayItems', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($teachersPensionAgeWarning)) { + throw new InvalidArgumentException('non-nullable teachersPensionAgeWarning cannot be null'); } - $this->container['employeeRolePayItems'] = $employeeRolePayItems; + $this->container['teachersPensionAgeWarning'] = $teachersPensionAgeWarning; return $this; } /** - * Gets warnings + * Gets totals * - * @return \SynergiTech\Staffology\Model\PayRunEntryWarningType|null + * @return \SynergiTech\Staffology\Model\PayRunTotals|null */ - public function getWarnings(): ?\SynergiTech\Staffology\Model\PayRunEntryWarningType + public function getTotals(): ?\SynergiTech\Staffology\Model\PayRunTotals { - return $this->container['warnings']; + return $this->container['totals']; } /** - * Sets warnings + * Sets totals * - * @param \SynergiTech\Staffology\Model\PayRunEntryWarningType|null $warnings warnings + * @param \SynergiTech\Staffology\Model\PayRunTotals|null $totals totals * * @return $this */ - public function setWarnings(?\SynergiTech\Staffology\Model\PayRunEntryWarningType $warnings): static + public function setTotals(?\SynergiTech\Staffology\Model\PayRunTotals $totals): static { - if (is_null($warnings)) { - throw new InvalidArgumentException('non-nullable warnings cannot be null'); + if (is_null($totals)) { + throw new InvalidArgumentException('non-nullable totals cannot be null'); } - $this->container['warnings'] = $warnings; + $this->container['totals'] = $totals; return $this; } /** - * Gets niLetterError + * Gets totalsYtd * - * @return \SynergiTech\Staffology\Model\NiLetterError|null + * @return \SynergiTech\Staffology\Model\PayRunTotals|null */ - public function getNiLetterError(): ?\SynergiTech\Staffology\Model\NiLetterError + public function getTotalsYtd(): ?\SynergiTech\Staffology\Model\PayRunTotals { - return $this->container['niLetterError']; + return $this->container['totalsYtd']; } /** - * Sets niLetterError + * Sets totalsYtd * - * @param \SynergiTech\Staffology\Model\NiLetterError|null $niLetterError niLetterError + * @param \SynergiTech\Staffology\Model\PayRunTotals|null $totalsYtd totalsYtd * * @return $this */ - public function setNiLetterError(?\SynergiTech\Staffology\Model\NiLetterError $niLetterError): static + public function setTotalsYtd(?\SynergiTech\Staffology\Model\PayRunTotals $totalsYtd): static { - if (is_null($niLetterError)) { - throw new InvalidArgumentException('non-nullable niLetterError cannot be null'); + if (is_null($totalsYtd)) { + throw new InvalidArgumentException('non-nullable totalsYtd cannot be null'); } - $this->container['niLetterError'] = $niLetterError; + $this->container['totalsYtd'] = $totalsYtd; return $this; } /** - * Gets teachersPensionAgeWarning + * Gets totalsYtdOverrides * - * @return \SynergiTech\Staffology\Model\TeachersPensionAgeWarning|null + * @return \SynergiTech\Staffology\Model\ValueOverride[]|null */ - public function getTeachersPensionAgeWarning(): ?\SynergiTech\Staffology\Model\TeachersPensionAgeWarning + public function getTotalsYtdOverrides(): ?array { - return $this->container['teachersPensionAgeWarning']; + return $this->container['totalsYtdOverrides']; } /** - * Sets teachersPensionAgeWarning + * Sets totalsYtdOverrides * - * @param \SynergiTech\Staffology\Model\TeachersPensionAgeWarning|null $teachersPensionAgeWarning teachersPensionAgeWarning + * @param \SynergiTech\Staffology\Model\ValueOverride[]|null $totalsYtdOverrides Any values of TotalsYtd that should be overridden with a different value * * @return $this */ - public function setTeachersPensionAgeWarning(?\SynergiTech\Staffology\Model\TeachersPensionAgeWarning $teachersPensionAgeWarning): static + public function setTotalsYtdOverrides(?array $totalsYtdOverrides): static { - if (is_null($teachersPensionAgeWarning)) { - throw new InvalidArgumentException('non-nullable teachersPensionAgeWarning cannot be null'); + if (is_null($totalsYtdOverrides)) { + array_push($this->openAPINullablesSetToNull, 'totalsYtdOverrides'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('totalsYtdOverrides', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['teachersPensionAgeWarning'] = $teachersPensionAgeWarning; + $this->container['totalsYtdOverrides'] = $totalsYtdOverrides; return $this; } /** - * Gets id + * Gets umbrellaPayment * - * @return string|null + * @return \SynergiTech\Staffology\Model\UmbrellaPayment|null */ - public function getId(): ?string + public function getUmbrellaPayment(): ?\SynergiTech\Staffology\Model\UmbrellaPayment { - return $this->container['id']; + return $this->container['umbrellaPayment']; } /** - * Sets id + * Sets umbrellaPayment * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\UmbrellaPayment|null $umbrellaPayment umbrellaPayment * * @return $this */ - public function setId(?string $id): static + public function setUmbrellaPayment(?\SynergiTech\Staffology\Model\UmbrellaPayment $umbrellaPayment): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($umbrellaPayment)) { + throw new InvalidArgumentException('non-nullable umbrellaPayment cannot be null'); } - $this->container['id'] = $id; + $this->container['umbrellaPayment'] = $umbrellaPayment; return $this; } /** - * Gets personalDetails + * Gets unpaidAbsence * - * @return \SynergiTech\Staffology\Model\PersonalDetails|null + * @return bool|null */ - public function getPersonalDetails(): ?\SynergiTech\Staffology\Model\PersonalDetails + public function getUnpaidAbsence(): ?bool { - return $this->container['personalDetails']; + return $this->container['unpaidAbsence']; } /** - * Sets personalDetails + * Sets unpaidAbsence * - * @param \SynergiTech\Staffology\Model\PersonalDetails|null $personalDetails personalDetails + * @param bool|null $unpaidAbsence [readonly] Indicates that there was unpaid absence in the pay period * * @return $this */ - public function setPersonalDetails(?\SynergiTech\Staffology\Model\PersonalDetails $personalDetails): static + public function setUnpaidAbsence(?bool $unpaidAbsence): static { - if (is_null($personalDetails)) { - throw new InvalidArgumentException('non-nullable personalDetails cannot be null'); + if (is_null($unpaidAbsence)) { + throw new InvalidArgumentException('non-nullable unpaidAbsence cannot be null'); } - $this->container['personalDetails'] = $personalDetails; + $this->container['unpaidAbsence'] = $unpaidAbsence; return $this; } /** - * Gets employmentDetails + * Gets warnings * - * @return \SynergiTech\Staffology\Model\EmploymentDetails|null + * @return \SynergiTech\Staffology\Model\PayRunEntryWarningType|null */ - public function getEmploymentDetails(): ?\SynergiTech\Staffology\Model\EmploymentDetails + public function getWarnings(): ?\SynergiTech\Staffology\Model\PayRunEntryWarningType { - return $this->container['employmentDetails']; + return $this->container['warnings']; } /** - * Sets employmentDetails + * Sets warnings * - * @param \SynergiTech\Staffology\Model\EmploymentDetails|null $employmentDetails employmentDetails + * @param \SynergiTech\Staffology\Model\PayRunEntryWarningType|null $warnings warnings * * @return $this */ - public function setEmploymentDetails(?\SynergiTech\Staffology\Model\EmploymentDetails $employmentDetails): static + public function setWarnings(?\SynergiTech\Staffology\Model\PayRunEntryWarningType $warnings): static { - if (is_null($employmentDetails)) { - throw new InvalidArgumentException('non-nullable employmentDetails cannot be null'); + if (is_null($warnings)) { + throw new InvalidArgumentException('non-nullable warnings cannot be null'); } - $this->container['employmentDetails'] = $employmentDetails; + $this->container['warnings'] = $warnings; return $this; } /** - * Gets payOptions + * Gets workingDaysNotPaidAsNormal * - * @return \SynergiTech\Staffology\Model\PayOptions|null + * @return float|null */ - public function getPayOptions(): ?\SynergiTech\Staffology\Model\PayOptions + public function getWorkingDaysNotPaidAsNormal(): ?float { - return $this->container['payOptions']; + return $this->container['workingDaysNotPaidAsNormal']; } /** - * Sets payOptions + * Sets workingDaysNotPaidAsNormal * - * @param \SynergiTech\Staffology\Model\PayOptions|null $payOptions payOptions + * @param float|null $workingDaysNotPaidAsNormal [readonly] If PercentageOfWorkingDaysPaidAsNormal has a value other than 1 then this property will tell you how many working days have been deducted from the basic pay due to either being Not Paid or Statutory Pay * * @return $this */ - public function setPayOptions(?\SynergiTech\Staffology\Model\PayOptions $payOptions): static + public function setWorkingDaysNotPaidAsNormal(?float $workingDaysNotPaidAsNormal): static { - if (is_null($payOptions)) { - throw new InvalidArgumentException('non-nullable payOptions cannot be null'); + if (is_null($workingDaysNotPaidAsNormal)) { + throw new InvalidArgumentException('non-nullable workingDaysNotPaidAsNormal cannot be null'); } - $this->container['payOptions'] = $payOptions; + $this->container['workingDaysNotPaidAsNormal'] = $workingDaysNotPaidAsNormal; return $this; } diff --git a/src/Model/PayRunEntryNavigation.php b/src/Model/PayRunEntryNavigation.php new file mode 100644 index 0000000..1d26bbc --- /dev/null +++ b/src/Model/PayRunEntryNavigation.php @@ -0,0 +1,892 @@ + + */ +class PayRunEntryNavigation implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'PayRunEntryNavigation'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'currentId' => 'string', + 'currentIndex' => 'int', + 'departmentFilterSelected' => 'string', + 'entryCount' => 'int', + 'firstId' => 'string', + 'lastId' => 'string', + 'nextId' => 'string', + 'payRunEntrySortBy' => '\SynergiTech\Staffology\Model\PayRunEntrySortBy', + 'previousId' => 'string', + 'rolledBackOnly' => 'bool', + 'searchTerm' => 'string', + 'sortDescending' => 'bool', + 'startersLeaversFilterSelected' => '\SynergiTech\Staffology\Model\StartersLeaversFilter', + 'zeroPaidFilterSelected' => '\SynergiTech\Staffology\Model\ZeroPaidFilter' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'currentId' => 'uuid', + 'currentIndex' => 'int32', + 'departmentFilterSelected' => null, + 'entryCount' => 'int32', + 'firstId' => 'uuid', + 'lastId' => 'uuid', + 'nextId' => 'uuid', + 'payRunEntrySortBy' => null, + 'previousId' => 'uuid', + 'rolledBackOnly' => null, + 'searchTerm' => null, + 'sortDescending' => null, + 'startersLeaversFilterSelected' => null, + 'zeroPaidFilterSelected' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'currentId' => false, + 'currentIndex' => false, + 'departmentFilterSelected' => true, + 'entryCount' => false, + 'firstId' => true, + 'lastId' => true, + 'nextId' => true, + 'payRunEntrySortBy' => false, + 'previousId' => true, + 'rolledBackOnly' => false, + 'searchTerm' => true, + 'sortDescending' => false, + 'startersLeaversFilterSelected' => false, + 'zeroPaidFilterSelected' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'currentId' => 'currentId', + 'currentIndex' => 'currentIndex', + 'departmentFilterSelected' => 'departmentFilterSelected', + 'entryCount' => 'entryCount', + 'firstId' => 'firstId', + 'lastId' => 'lastId', + 'nextId' => 'nextId', + 'payRunEntrySortBy' => 'payRunEntrySortBy', + 'previousId' => 'previousId', + 'rolledBackOnly' => 'rolledBackOnly', + 'searchTerm' => 'searchTerm', + 'sortDescending' => 'sortDescending', + 'startersLeaversFilterSelected' => 'startersLeaversFilterSelected', + 'zeroPaidFilterSelected' => 'zeroPaidFilterSelected' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'currentId' => 'setCurrentId', + 'currentIndex' => 'setCurrentIndex', + 'departmentFilterSelected' => 'setDepartmentFilterSelected', + 'entryCount' => 'setEntryCount', + 'firstId' => 'setFirstId', + 'lastId' => 'setLastId', + 'nextId' => 'setNextId', + 'payRunEntrySortBy' => 'setPayRunEntrySortBy', + 'previousId' => 'setPreviousId', + 'rolledBackOnly' => 'setRolledBackOnly', + 'searchTerm' => 'setSearchTerm', + 'sortDescending' => 'setSortDescending', + 'startersLeaversFilterSelected' => 'setStartersLeaversFilterSelected', + 'zeroPaidFilterSelected' => 'setZeroPaidFilterSelected' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'currentId' => 'getCurrentId', + 'currentIndex' => 'getCurrentIndex', + 'departmentFilterSelected' => 'getDepartmentFilterSelected', + 'entryCount' => 'getEntryCount', + 'firstId' => 'getFirstId', + 'lastId' => 'getLastId', + 'nextId' => 'getNextId', + 'payRunEntrySortBy' => 'getPayRunEntrySortBy', + 'previousId' => 'getPreviousId', + 'rolledBackOnly' => 'getRolledBackOnly', + 'searchTerm' => 'getSearchTerm', + 'sortDescending' => 'getSortDescending', + 'startersLeaversFilterSelected' => 'getStartersLeaversFilterSelected', + 'zeroPaidFilterSelected' => 'getZeroPaidFilterSelected' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('currentId', $data ?? [], null); + $this->setIfExists('currentIndex', $data ?? [], null); + $this->setIfExists('departmentFilterSelected', $data ?? [], null); + $this->setIfExists('entryCount', $data ?? [], null); + $this->setIfExists('firstId', $data ?? [], null); + $this->setIfExists('lastId', $data ?? [], null); + $this->setIfExists('nextId', $data ?? [], null); + $this->setIfExists('payRunEntrySortBy', $data ?? [], null); + $this->setIfExists('previousId', $data ?? [], null); + $this->setIfExists('rolledBackOnly', $data ?? [], null); + $this->setIfExists('searchTerm', $data ?? [], null); + $this->setIfExists('sortDescending', $data ?? [], null); + $this->setIfExists('startersLeaversFilterSelected', $data ?? [], null); + $this->setIfExists('zeroPaidFilterSelected', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets currentId + * + * @return string|null + */ + public function getCurrentId(): ?string + { + return $this->container['currentId']; + } + + /** + * Sets currentId + * + * @param string|null $currentId currentId + * + * @return $this + */ + public function setCurrentId(?string $currentId): static + { + if (is_null($currentId)) { + throw new InvalidArgumentException('non-nullable currentId cannot be null'); + } + $this->container['currentId'] = $currentId; + + return $this; + } + + /** + * Gets currentIndex + * + * @return int|null + */ + public function getCurrentIndex(): ?int + { + return $this->container['currentIndex']; + } + + /** + * Sets currentIndex + * + * @param int|null $currentIndex currentIndex + * + * @return $this + */ + public function setCurrentIndex(?int $currentIndex): static + { + if (is_null($currentIndex)) { + throw new InvalidArgumentException('non-nullable currentIndex cannot be null'); + } + $this->container['currentIndex'] = $currentIndex; + + return $this; + } + + /** + * Gets departmentFilterSelected + * + * @return string|null + */ + public function getDepartmentFilterSelected(): ?string + { + return $this->container['departmentFilterSelected']; + } + + /** + * Sets departmentFilterSelected + * + * @param string|null $departmentFilterSelected departmentFilterSelected + * + * @return $this + */ + public function setDepartmentFilterSelected(?string $departmentFilterSelected): static + { + if (is_null($departmentFilterSelected)) { + array_push($this->openAPINullablesSetToNull, 'departmentFilterSelected'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('departmentFilterSelected', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['departmentFilterSelected'] = $departmentFilterSelected; + + return $this; + } + + /** + * Gets entryCount + * + * @return int|null + */ + public function getEntryCount(): ?int + { + return $this->container['entryCount']; + } + + /** + * Sets entryCount + * + * @param int|null $entryCount entryCount + * + * @return $this + */ + public function setEntryCount(?int $entryCount): static + { + if (is_null($entryCount)) { + throw new InvalidArgumentException('non-nullable entryCount cannot be null'); + } + $this->container['entryCount'] = $entryCount; + + return $this; + } + + /** + * Gets firstId + * + * @return string|null + */ + public function getFirstId(): ?string + { + return $this->container['firstId']; + } + + /** + * Sets firstId + * + * @param string|null $firstId firstId + * + * @return $this + */ + public function setFirstId(?string $firstId): static + { + if (is_null($firstId)) { + array_push($this->openAPINullablesSetToNull, 'firstId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('firstId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['firstId'] = $firstId; + + return $this; + } + + /** + * Gets lastId + * + * @return string|null + */ + public function getLastId(): ?string + { + return $this->container['lastId']; + } + + /** + * Sets lastId + * + * @param string|null $lastId lastId + * + * @return $this + */ + public function setLastId(?string $lastId): static + { + if (is_null($lastId)) { + array_push($this->openAPINullablesSetToNull, 'lastId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lastId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['lastId'] = $lastId; + + return $this; + } + + /** + * Gets nextId + * + * @return string|null + */ + public function getNextId(): ?string + { + return $this->container['nextId']; + } + + /** + * Sets nextId + * + * @param string|null $nextId nextId + * + * @return $this + */ + public function setNextId(?string $nextId): static + { + if (is_null($nextId)) { + array_push($this->openAPINullablesSetToNull, 'nextId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('nextId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nextId'] = $nextId; + + return $this; + } + + /** + * Gets payRunEntrySortBy + * + * @return \SynergiTech\Staffology\Model\PayRunEntrySortBy|null + */ + public function getPayRunEntrySortBy(): ?\SynergiTech\Staffology\Model\PayRunEntrySortBy + { + return $this->container['payRunEntrySortBy']; + } + + /** + * Sets payRunEntrySortBy + * + * @param \SynergiTech\Staffology\Model\PayRunEntrySortBy|null $payRunEntrySortBy payRunEntrySortBy + * + * @return $this + */ + public function setPayRunEntrySortBy(?\SynergiTech\Staffology\Model\PayRunEntrySortBy $payRunEntrySortBy): static + { + if (is_null($payRunEntrySortBy)) { + throw new InvalidArgumentException('non-nullable payRunEntrySortBy cannot be null'); + } + $this->container['payRunEntrySortBy'] = $payRunEntrySortBy; + + return $this; + } + + /** + * Gets previousId + * + * @return string|null + */ + public function getPreviousId(): ?string + { + return $this->container['previousId']; + } + + /** + * Sets previousId + * + * @param string|null $previousId previousId + * + * @return $this + */ + public function setPreviousId(?string $previousId): static + { + if (is_null($previousId)) { + array_push($this->openAPINullablesSetToNull, 'previousId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('previousId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['previousId'] = $previousId; + + return $this; + } + + /** + * Gets rolledBackOnly + * + * @return bool|null + */ + public function getRolledBackOnly(): ?bool + { + return $this->container['rolledBackOnly']; + } + + /** + * Sets rolledBackOnly + * + * @param bool|null $rolledBackOnly rolledBackOnly + * + * @return $this + */ + public function setRolledBackOnly(?bool $rolledBackOnly): static + { + if (is_null($rolledBackOnly)) { + throw new InvalidArgumentException('non-nullable rolledBackOnly cannot be null'); + } + $this->container['rolledBackOnly'] = $rolledBackOnly; + + return $this; + } + + /** + * Gets searchTerm + * + * @return string|null + */ + public function getSearchTerm(): ?string + { + return $this->container['searchTerm']; + } + + /** + * Sets searchTerm + * + * @param string|null $searchTerm searchTerm + * + * @return $this + */ + public function setSearchTerm(?string $searchTerm): static + { + if (is_null($searchTerm)) { + array_push($this->openAPINullablesSetToNull, 'searchTerm'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('searchTerm', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['searchTerm'] = $searchTerm; + + return $this; + } + + /** + * Gets sortDescending + * + * @return bool|null + */ + public function getSortDescending(): ?bool + { + return $this->container['sortDescending']; + } + + /** + * Sets sortDescending + * + * @param bool|null $sortDescending sortDescending + * + * @return $this + */ + public function setSortDescending(?bool $sortDescending): static + { + if (is_null($sortDescending)) { + throw new InvalidArgumentException('non-nullable sortDescending cannot be null'); + } + $this->container['sortDescending'] = $sortDescending; + + return $this; + } + + /** + * Gets startersLeaversFilterSelected + * + * @return \SynergiTech\Staffology\Model\StartersLeaversFilter|null + */ + public function getStartersLeaversFilterSelected(): ?\SynergiTech\Staffology\Model\StartersLeaversFilter + { + return $this->container['startersLeaversFilterSelected']; + } + + /** + * Sets startersLeaversFilterSelected + * + * @param \SynergiTech\Staffology\Model\StartersLeaversFilter|null $startersLeaversFilterSelected startersLeaversFilterSelected + * + * @return $this + */ + public function setStartersLeaversFilterSelected(?\SynergiTech\Staffology\Model\StartersLeaversFilter $startersLeaversFilterSelected): static + { + if (is_null($startersLeaversFilterSelected)) { + throw new InvalidArgumentException('non-nullable startersLeaversFilterSelected cannot be null'); + } + $this->container['startersLeaversFilterSelected'] = $startersLeaversFilterSelected; + + return $this; + } + + /** + * Gets zeroPaidFilterSelected + * + * @return \SynergiTech\Staffology\Model\ZeroPaidFilter|null + */ + public function getZeroPaidFilterSelected(): ?\SynergiTech\Staffology\Model\ZeroPaidFilter + { + return $this->container['zeroPaidFilterSelected']; + } + + /** + * Sets zeroPaidFilterSelected + * + * @param \SynergiTech\Staffology\Model\ZeroPaidFilter|null $zeroPaidFilterSelected zeroPaidFilterSelected + * + * @return $this + */ + public function setZeroPaidFilterSelected(?\SynergiTech\Staffology\Model\ZeroPaidFilter $zeroPaidFilterSelected): static + { + if (is_null($zeroPaidFilterSelected)) { + throw new InvalidArgumentException('non-nullable zeroPaidFilterSelected cannot be null'); + } + $this->container['zeroPaidFilterSelected'] = $zeroPaidFilterSelected; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/PayRunEntrySortBy.php b/src/Model/PayRunEntrySortBy.php index f9e266c..9112ed9 100644 --- a/src/Model/PayRunEntrySortBy.php +++ b/src/Model/PayRunEntrySortBy.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayRunEntryWarningType.php b/src/Model/PayRunEntryWarningType.php index 09fd584..654b5e1 100644 --- a/src/Model/PayRunEntryWarningType.php +++ b/src/Model/PayRunEntryWarningType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayRunJournal.php b/src/Model/PayRunJournal.php index 99e2a1f..1c8eaeb 100644 --- a/src/Model/PayRunJournal.php +++ b/src/Model/PayRunJournal.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,18 +59,18 @@ class PayRunJournal implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'lines' => '\SynergiTech\Staffology\Model\PayRunSummaryLine[]', + 'csvFormat' => '\SynergiTech\Staffology\Model\JournalCsvFormat', 'date' => '\DateTime', - 'title' => 'string', - 'status' => '\SynergiTech\Staffology\Model\BackgroundTaskStatus', - 'statusMessage' => 'string', + 'lines' => '\SynergiTech\Staffology\Model\PayRunSummaryLine[]', 'link' => 'string', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'mergeMatchingNominals' => 'bool', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'period' => 'int', - 'mergeMatchingNominals' => 'bool', - 'csvFormat' => '\SynergiTech\Staffology\Model\JournalCsvFormat' + 'status' => '\SynergiTech\Staffology\Model\BackgroundTaskStatus', + 'statusMessage' => 'string', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'title' => 'string' ]; /** @@ -79,18 +79,18 @@ class PayRunJournal implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'lines' => null, + 'csvFormat' => null, 'date' => 'date', - 'title' => null, - 'status' => null, - 'statusMessage' => null, + 'lines' => null, 'link' => null, - 'taxYear' => null, - 'payPeriod' => null, + 'mergeMatchingNominals' => null, 'ordinal' => 'int32', + 'payPeriod' => null, 'period' => 'int32', - 'mergeMatchingNominals' => null, - 'csvFormat' => null + 'status' => null, + 'statusMessage' => null, + 'taxYear' => null, + 'title' => null ]; /** @@ -99,18 +99,18 @@ class PayRunJournal implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'lines' => true, + 'csvFormat' => false, 'date' => false, - 'title' => true, - 'status' => false, - 'statusMessage' => true, + 'lines' => true, 'link' => true, - 'taxYear' => false, - 'payPeriod' => false, + 'mergeMatchingNominals' => false, 'ordinal' => false, + 'payPeriod' => false, 'period' => false, - 'mergeMatchingNominals' => false, - 'csvFormat' => false + 'status' => false, + 'statusMessage' => true, + 'taxYear' => false, + 'title' => true ]; /** @@ -199,18 +199,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'lines' => 'lines', + 'csvFormat' => 'csvFormat', 'date' => 'date', - 'title' => 'title', - 'status' => 'status', - 'statusMessage' => 'statusMessage', + 'lines' => 'lines', 'link' => 'link', - 'taxYear' => 'taxYear', - 'payPeriod' => 'payPeriod', + 'mergeMatchingNominals' => 'mergeMatchingNominals', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', 'period' => 'period', - 'mergeMatchingNominals' => 'mergeMatchingNominals', - 'csvFormat' => 'csvFormat' + 'status' => 'status', + 'statusMessage' => 'statusMessage', + 'taxYear' => 'taxYear', + 'title' => 'title' ]; /** @@ -219,18 +219,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'lines' => 'setLines', + 'csvFormat' => 'setCsvFormat', 'date' => 'setDate', - 'title' => 'setTitle', - 'status' => 'setStatus', - 'statusMessage' => 'setStatusMessage', + 'lines' => 'setLines', 'link' => 'setLink', - 'taxYear' => 'setTaxYear', - 'payPeriod' => 'setPayPeriod', + 'mergeMatchingNominals' => 'setMergeMatchingNominals', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', 'period' => 'setPeriod', - 'mergeMatchingNominals' => 'setMergeMatchingNominals', - 'csvFormat' => 'setCsvFormat' + 'status' => 'setStatus', + 'statusMessage' => 'setStatusMessage', + 'taxYear' => 'setTaxYear', + 'title' => 'setTitle' ]; /** @@ -239,18 +239,18 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'lines' => 'getLines', + 'csvFormat' => 'getCsvFormat', 'date' => 'getDate', - 'title' => 'getTitle', - 'status' => 'getStatus', - 'statusMessage' => 'getStatusMessage', + 'lines' => 'getLines', 'link' => 'getLink', - 'taxYear' => 'getTaxYear', - 'payPeriod' => 'getPayPeriod', + 'mergeMatchingNominals' => 'getMergeMatchingNominals', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', 'period' => 'getPeriod', - 'mergeMatchingNominals' => 'getMergeMatchingNominals', - 'csvFormat' => 'getCsvFormat' + 'status' => 'getStatus', + 'statusMessage' => 'getStatusMessage', + 'taxYear' => 'getTaxYear', + 'title' => 'getTitle' ]; /** @@ -309,18 +309,18 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('csvFormat', $data ?? [], null); $this->setIfExists('date', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('status', $data ?? [], null); - $this->setIfExists('statusMessage', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('link', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('mergeMatchingNominals', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); - $this->setIfExists('mergeMatchingNominals', $data ?? [], null); - $this->setIfExists('csvFormat', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('statusMessage', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -366,35 +366,28 @@ public function valid(): bool /** - * Gets lines + * Gets csvFormat * - * @return \SynergiTech\Staffology\Model\PayRunSummaryLine[]|null + * @return \SynergiTech\Staffology\Model\JournalCsvFormat|null */ - public function getLines(): ?array + public function getCsvFormat(): ?\SynergiTech\Staffology\Model\JournalCsvFormat { - return $this->container['lines']; + return $this->container['csvFormat']; } /** - * Sets lines + * Sets csvFormat * - * @param \SynergiTech\Staffology\Model\PayRunSummaryLine[]|null $lines lines + * @param \SynergiTech\Staffology\Model\JournalCsvFormat|null $csvFormat csvFormat * * @return $this */ - public function setLines(?array $lines): static + public function setCsvFormat(?\SynergiTech\Staffology\Model\JournalCsvFormat $csvFormat): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($csvFormat)) { + throw new InvalidArgumentException('non-nullable csvFormat cannot be null'); } - $this->container['lines'] = $lines; + $this->container['csvFormat'] = $csvFormat; return $this; } @@ -427,157 +420,123 @@ public function setDate(?\DateTime $date): static } /** - * Gets title + * Gets lines * - * @return string|null + * @return \SynergiTech\Staffology\Model\PayRunSummaryLine[]|null */ - public function getTitle(): ?string + public function getLines(): ?array { - return $this->container['title']; + return $this->container['lines']; } /** - * Sets title + * Sets lines * - * @param string|null $title [readonly] The status of the task for posting this journal to an ExternalDataProvider + * @param \SynergiTech\Staffology\Model\PayRunSummaryLine[]|null $lines lines * * @return $this */ - public function setTitle(?string $title): static + public function setLines(?array $lines): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); + $index = array_search('lines', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['title'] = $title; - - return $this; - } - - /** - * Gets status - * - * @return \SynergiTech\Staffology\Model\BackgroundTaskStatus|null - */ - public function getStatus(): ?\SynergiTech\Staffology\Model\BackgroundTaskStatus - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param \SynergiTech\Staffology\Model\BackgroundTaskStatus|null $status status - * - * @return $this - */ - public function setStatus(?\SynergiTech\Staffology\Model\BackgroundTaskStatus $status): static - { - if (is_null($status)) { - throw new InvalidArgumentException('non-nullable status cannot be null'); - } - $this->container['status'] = $status; + $this->container['lines'] = $lines; return $this; } /** - * Gets statusMessage + * Gets link * * @return string|null */ - public function getStatusMessage(): ?string + public function getLink(): ?string { - return $this->container['statusMessage']; + return $this->container['link']; } /** - * Sets statusMessage + * Sets link * - * @param string|null $statusMessage [readonly] A message to elaborate on the Status + * @param string|null $link [readonly] If available, a link to the journal in the ExternalDataProvider * * @return $this */ - public function setStatusMessage(?string $statusMessage): static + public function setLink(?string $link): static { - if (is_null($statusMessage)) { - array_push($this->openAPINullablesSetToNull, 'statusMessage'); + if (is_null($link)) { + array_push($this->openAPINullablesSetToNull, 'link'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('statusMessage', $nullablesSetToNull); + $index = array_search('link', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['statusMessage'] = $statusMessage; + $this->container['link'] = $link; return $this; } /** - * Gets link + * Gets mergeMatchingNominals * - * @return string|null + * @return bool|null */ - public function getLink(): ?string + public function getMergeMatchingNominals(): ?bool { - return $this->container['link']; + return $this->container['mergeMatchingNominals']; } /** - * Sets link + * Sets mergeMatchingNominals * - * @param string|null $link [readonly] If available, a link to the journal in the ExternalDataProvider + * @param bool|null $mergeMatchingNominals [readonly] * * @return $this */ - public function setLink(?string $link): static + public function setMergeMatchingNominals(?bool $mergeMatchingNominals): static { - if (is_null($link)) { - array_push($this->openAPINullablesSetToNull, 'link'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('link', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($mergeMatchingNominals)) { + throw new InvalidArgumentException('non-nullable mergeMatchingNominals cannot be null'); } - $this->container['link'] = $link; + $this->container['mergeMatchingNominals'] = $mergeMatchingNominals; return $this; } /** - * Gets taxYear + * Gets ordinal * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return int|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getOrdinal(): ?int { - return $this->container['taxYear']; + return $this->container['ordinal']; } /** - * Sets taxYear + * Sets ordinal * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param int|null $ordinal [readonly] * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setOrdinal(?int $ordinal): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['ordinal'] = $ordinal; return $this; } @@ -610,109 +569,150 @@ public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPerio } /** - * Gets ordinal + * Gets period * * @return int|null */ - public function getOrdinal(): ?int + public function getPeriod(): ?int { - return $this->container['ordinal']; + return $this->container['period']; } /** - * Sets ordinal + * Sets period * - * @param int|null $ordinal [readonly] + * @param int|null $period [readonly] * * @return $this */ - public function setOrdinal(?int $ordinal): static + public function setPeriod(?int $period): static { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['ordinal'] = $ordinal; + $this->container['period'] = $period; return $this; } /** - * Gets period + * Gets status * - * @return int|null + * @return \SynergiTech\Staffology\Model\BackgroundTaskStatus|null */ - public function getPeriod(): ?int + public function getStatus(): ?\SynergiTech\Staffology\Model\BackgroundTaskStatus { - return $this->container['period']; + return $this->container['status']; } /** - * Sets period + * Sets status * - * @param int|null $period [readonly] + * @param \SynergiTech\Staffology\Model\BackgroundTaskStatus|null $status status * * @return $this */ - public function setPeriod(?int $period): static + public function setStatus(?\SynergiTech\Staffology\Model\BackgroundTaskStatus $status): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['period'] = $period; + $this->container['status'] = $status; return $this; } /** - * Gets mergeMatchingNominals + * Gets statusMessage * - * @return bool|null + * @return string|null */ - public function getMergeMatchingNominals(): ?bool + public function getStatusMessage(): ?string { - return $this->container['mergeMatchingNominals']; + return $this->container['statusMessage']; } /** - * Sets mergeMatchingNominals + * Sets statusMessage * - * @param bool|null $mergeMatchingNominals [readonly] + * @param string|null $statusMessage [readonly] A message to elaborate on the Status * * @return $this */ - public function setMergeMatchingNominals(?bool $mergeMatchingNominals): static + public function setStatusMessage(?string $statusMessage): static { - if (is_null($mergeMatchingNominals)) { - throw new InvalidArgumentException('non-nullable mergeMatchingNominals cannot be null'); + if (is_null($statusMessage)) { + array_push($this->openAPINullablesSetToNull, 'statusMessage'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('statusMessage', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['mergeMatchingNominals'] = $mergeMatchingNominals; + $this->container['statusMessage'] = $statusMessage; return $this; } /** - * Gets csvFormat + * Gets taxYear * - * @return \SynergiTech\Staffology\Model\JournalCsvFormat|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getCsvFormat(): ?\SynergiTech\Staffology\Model\JournalCsvFormat + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['csvFormat']; + return $this->container['taxYear']; } /** - * Sets csvFormat + * Sets taxYear * - * @param \SynergiTech\Staffology\Model\JournalCsvFormat|null $csvFormat csvFormat + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setCsvFormat(?\SynergiTech\Staffology\Model\JournalCsvFormat $csvFormat): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($csvFormat)) { - throw new InvalidArgumentException('non-nullable csvFormat cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['csvFormat'] = $csvFormat; + $this->container['taxYear'] = $taxYear; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle(): ?string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title [readonly] The status of the task for posting this journal to an ExternalDataProvider + * + * @return $this + */ + public function setTitle(?string $title): static + { + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['title'] = $title; return $this; } diff --git a/src/Model/PayRunPayment.php b/src/Model/PayRunPayment.php index 6522d0d..e2433a4 100644 --- a/src/Model/PayRunPayment.php +++ b/src/Model/PayRunPayment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,17 +59,17 @@ class PayRunPayment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => '\SynergiTech\Staffology\Model\PayeeType', - 'payee' => '\SynergiTech\Staffology\Model\Item', - 'date' => '\DateTime', - 'method' => '\SynergiTech\Staffology\Model\PayMethod', 'amount' => 'float', - 'reference' => 'string', - 'employerPaymentReference' => 'string', - 'bankDetails' => '\SynergiTech\Staffology\Model\BankDetails', 'bacsHash' => 'string', 'bacsSubReference' => 'string', - 'isBankDetailValid' => 'bool' + 'bankDetails' => '\SynergiTech\Staffology\Model\BankDetails', + 'date' => '\DateTime', + 'employerPaymentReference' => 'string', + 'isBankDetailValid' => 'bool', + 'method' => '\SynergiTech\Staffology\Model\PayMethod', + 'payee' => '\SynergiTech\Staffology\Model\Item', + 'reference' => 'string', + 'type' => '\SynergiTech\Staffology\Model\PayeeType' ]; /** @@ -78,17 +78,17 @@ class PayRunPayment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'type' => null, - 'payee' => null, - 'date' => 'date', - 'method' => null, 'amount' => 'double', - 'reference' => null, - 'employerPaymentReference' => null, - 'bankDetails' => null, 'bacsHash' => null, 'bacsSubReference' => null, - 'isBankDetailValid' => null + 'bankDetails' => null, + 'date' => 'date', + 'employerPaymentReference' => null, + 'isBankDetailValid' => null, + 'method' => null, + 'payee' => null, + 'reference' => null, + 'type' => null ]; /** @@ -97,17 +97,17 @@ class PayRunPayment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'type' => false, - 'payee' => false, - 'date' => false, - 'method' => false, 'amount' => false, - 'reference' => true, - 'employerPaymentReference' => true, - 'bankDetails' => false, 'bacsHash' => true, 'bacsSubReference' => true, - 'isBankDetailValid' => false + 'bankDetails' => false, + 'date' => false, + 'employerPaymentReference' => true, + 'isBankDetailValid' => false, + 'method' => false, + 'payee' => false, + 'reference' => true, + 'type' => false ]; /** @@ -196,17 +196,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', - 'payee' => 'payee', - 'date' => 'date', - 'method' => 'method', 'amount' => 'amount', - 'reference' => 'reference', - 'employerPaymentReference' => 'employerPaymentReference', - 'bankDetails' => 'bankDetails', 'bacsHash' => 'bacsHash', 'bacsSubReference' => 'bacsSubReference', - 'isBankDetailValid' => 'isBankDetailValid' + 'bankDetails' => 'bankDetails', + 'date' => 'date', + 'employerPaymentReference' => 'employerPaymentReference', + 'isBankDetailValid' => 'isBankDetailValid', + 'method' => 'method', + 'payee' => 'payee', + 'reference' => 'reference', + 'type' => 'type' ]; /** @@ -215,17 +215,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', - 'payee' => 'setPayee', - 'date' => 'setDate', - 'method' => 'setMethod', 'amount' => 'setAmount', - 'reference' => 'setReference', - 'employerPaymentReference' => 'setEmployerPaymentReference', - 'bankDetails' => 'setBankDetails', 'bacsHash' => 'setBacsHash', 'bacsSubReference' => 'setBacsSubReference', - 'isBankDetailValid' => 'setIsBankDetailValid' + 'bankDetails' => 'setBankDetails', + 'date' => 'setDate', + 'employerPaymentReference' => 'setEmployerPaymentReference', + 'isBankDetailValid' => 'setIsBankDetailValid', + 'method' => 'setMethod', + 'payee' => 'setPayee', + 'reference' => 'setReference', + 'type' => 'setType' ]; /** @@ -234,17 +234,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', - 'payee' => 'getPayee', - 'date' => 'getDate', - 'method' => 'getMethod', 'amount' => 'getAmount', - 'reference' => 'getReference', - 'employerPaymentReference' => 'getEmployerPaymentReference', - 'bankDetails' => 'getBankDetails', 'bacsHash' => 'getBacsHash', 'bacsSubReference' => 'getBacsSubReference', - 'isBankDetailValid' => 'getIsBankDetailValid' + 'bankDetails' => 'getBankDetails', + 'date' => 'getDate', + 'employerPaymentReference' => 'getEmployerPaymentReference', + 'isBankDetailValid' => 'getIsBankDetailValid', + 'method' => 'getMethod', + 'payee' => 'getPayee', + 'reference' => 'getReference', + 'type' => 'getType' ]; /** @@ -303,17 +303,17 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('payee', $data ?? [], null); - $this->setIfExists('date', $data ?? [], null); - $this->setIfExists('method', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); - $this->setIfExists('reference', $data ?? [], null); - $this->setIfExists('employerPaymentReference', $data ?? [], null); - $this->setIfExists('bankDetails', $data ?? [], null); $this->setIfExists('bacsHash', $data ?? [], null); $this->setIfExists('bacsSubReference', $data ?? [], null); + $this->setIfExists('bankDetails', $data ?? [], null); + $this->setIfExists('date', $data ?? [], null); + $this->setIfExists('employerPaymentReference', $data ?? [], null); $this->setIfExists('isBankDetailValid', $data ?? [], null); + $this->setIfExists('method', $data ?? [], null); + $this->setIfExists('payee', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -359,326 +359,326 @@ public function valid(): bool /** - * Gets type + * Gets amount * - * @return \SynergiTech\Staffology\Model\PayeeType|null + * @return float|null */ - public function getType(): ?\SynergiTech\Staffology\Model\PayeeType + public function getAmount(): ?float { - return $this->container['type']; + return $this->container['amount']; } /** - * Sets type + * Sets amount * - * @param \SynergiTech\Staffology\Model\PayeeType|null $type type + * @param float|null $amount [readonly] The amount to pay * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\PayeeType $type): static + public function setAmount(?float $amount): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($amount)) { + throw new InvalidArgumentException('non-nullable amount cannot be null'); } - $this->container['type'] = $type; + $this->container['amount'] = $amount; return $this; } /** - * Gets payee + * Gets bacsHash * - * @return \SynergiTech\Staffology\Model\Item|null + * @return string|null */ - public function getPayee(): ?\SynergiTech\Staffology\Model\Item + public function getBacsHash(): ?string { - return $this->container['payee']; + return $this->container['bacsHash']; } /** - * Sets payee + * Sets bacsHash * - * @param \SynergiTech\Staffology\Model\Item|null $payee payee + * @param string|null $bacsHash [readonly] if paying by Credit and you've enabled BacsHash then this will contain the BacsHash included on the FPS * * @return $this */ - public function setPayee(?\SynergiTech\Staffology\Model\Item $payee): static + public function setBacsHash(?string $bacsHash): static { - if (is_null($payee)) { - throw new InvalidArgumentException('non-nullable payee cannot be null'); + if (is_null($bacsHash)) { + array_push($this->openAPINullablesSetToNull, 'bacsHash'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bacsHash', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payee'] = $payee; + $this->container['bacsHash'] = $bacsHash; return $this; } /** - * Gets date + * Gets bacsSubReference * - * @return \DateTime|null + * @return string|null */ - public function getDate(): ?\DateTime + public function getBacsSubReference(): ?string { - return $this->container['date']; + return $this->container['bacsSubReference']; } /** - * Sets date + * Sets bacsSubReference * - * @param \DateTime|null $date [readonly] The date the payment is to be made + * @param string|null $bacsSubReference [readonly] if paying by Credit and you've enabled BacsHash then this will contain the BacsSubReference included on the FPS * * @return $this */ - public function setDate(?\DateTime $date): static + public function setBacsSubReference(?string $bacsSubReference): static { - if (is_null($date)) { - throw new InvalidArgumentException('non-nullable date cannot be null'); + if (is_null($bacsSubReference)) { + array_push($this->openAPINullablesSetToNull, 'bacsSubReference'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bacsSubReference', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['date'] = $date; + $this->container['bacsSubReference'] = $bacsSubReference; return $this; } /** - * Gets method + * Gets bankDetails * - * @return \SynergiTech\Staffology\Model\PayMethod|null + * @return \SynergiTech\Staffology\Model\BankDetails|null */ - public function getMethod(): ?\SynergiTech\Staffology\Model\PayMethod + public function getBankDetails(): ?\SynergiTech\Staffology\Model\BankDetails { - return $this->container['method']; + return $this->container['bankDetails']; } /** - * Sets method + * Sets bankDetails * - * @param \SynergiTech\Staffology\Model\PayMethod|null $method method + * @param \SynergiTech\Staffology\Model\BankDetails|null $bankDetails bankDetails * * @return $this */ - public function setMethod(?\SynergiTech\Staffology\Model\PayMethod $method): static + public function setBankDetails(?\SynergiTech\Staffology\Model\BankDetails $bankDetails): static { - if (is_null($method)) { - throw new InvalidArgumentException('non-nullable method cannot be null'); + if (is_null($bankDetails)) { + throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); } - $this->container['method'] = $method; + $this->container['bankDetails'] = $bankDetails; return $this; } /** - * Gets amount + * Gets date * - * @return float|null + * @return \DateTime|null */ - public function getAmount(): ?float + public function getDate(): ?\DateTime { - return $this->container['amount']; + return $this->container['date']; } /** - * Sets amount + * Sets date * - * @param float|null $amount [readonly] The amount to pay + * @param \DateTime|null $date [readonly] The date the payment is to be made * * @return $this */ - public function setAmount(?float $amount): static + public function setDate(?\DateTime $date): static { - if (is_null($amount)) { - throw new InvalidArgumentException('non-nullable amount cannot be null'); + if (is_null($date)) { + throw new InvalidArgumentException('non-nullable date cannot be null'); } - $this->container['amount'] = $amount; + $this->container['date'] = $date; return $this; } /** - * Gets reference + * Gets employerPaymentReference * * @return string|null */ - public function getReference(): ?string + public function getEmployerPaymentReference(): ?string { - return $this->container['reference']; + return $this->container['employerPaymentReference']; } /** - * Sets reference + * Sets employerPaymentReference * - * @param string|null $reference [readonly] The period the payment is for + * @param string|null $employerPaymentReference The employer's payment reference, formatted as per the employer settings * * @return $this */ - public function setReference(?string $reference): static + public function setEmployerPaymentReference(?string $employerPaymentReference): static { - if (is_null($reference)) { - array_push($this->openAPINullablesSetToNull, 'reference'); + if (is_null($employerPaymentReference)) { + array_push($this->openAPINullablesSetToNull, 'employerPaymentReference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('reference', $nullablesSetToNull); + $index = array_search('employerPaymentReference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['reference'] = $reference; + $this->container['employerPaymentReference'] = $employerPaymentReference; return $this; } /** - * Gets employerPaymentReference + * Gets isBankDetailValid * - * @return string|null + * @return bool|null */ - public function getEmployerPaymentReference(): ?string + public function getIsBankDetailValid(): ?bool { - return $this->container['employerPaymentReference']; + return $this->container['isBankDetailValid']; } /** - * Sets employerPaymentReference + * Sets isBankDetailValid * - * @param string|null $employerPaymentReference The employer's payment reference, formatted as per the employer settings + * @param bool|null $isBankDetailValid [readonly] for checking if bank details are valid * * @return $this */ - public function setEmployerPaymentReference(?string $employerPaymentReference): static + public function setIsBankDetailValid(?bool $isBankDetailValid): static { - if (is_null($employerPaymentReference)) { - array_push($this->openAPINullablesSetToNull, 'employerPaymentReference'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerPaymentReference', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isBankDetailValid)) { + throw new InvalidArgumentException('non-nullable isBankDetailValid cannot be null'); } - $this->container['employerPaymentReference'] = $employerPaymentReference; + $this->container['isBankDetailValid'] = $isBankDetailValid; return $this; } /** - * Gets bankDetails + * Gets method * - * @return \SynergiTech\Staffology\Model\BankDetails|null + * @return \SynergiTech\Staffology\Model\PayMethod|null */ - public function getBankDetails(): ?\SynergiTech\Staffology\Model\BankDetails + public function getMethod(): ?\SynergiTech\Staffology\Model\PayMethod { - return $this->container['bankDetails']; + return $this->container['method']; } /** - * Sets bankDetails + * Sets method * - * @param \SynergiTech\Staffology\Model\BankDetails|null $bankDetails bankDetails + * @param \SynergiTech\Staffology\Model\PayMethod|null $method method * * @return $this */ - public function setBankDetails(?\SynergiTech\Staffology\Model\BankDetails $bankDetails): static + public function setMethod(?\SynergiTech\Staffology\Model\PayMethod $method): static { - if (is_null($bankDetails)) { - throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); + if (is_null($method)) { + throw new InvalidArgumentException('non-nullable method cannot be null'); } - $this->container['bankDetails'] = $bankDetails; + $this->container['method'] = $method; return $this; } /** - * Gets bacsHash + * Gets payee * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getBacsHash(): ?string + public function getPayee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['bacsHash']; + return $this->container['payee']; } /** - * Sets bacsHash + * Sets payee * - * @param string|null $bacsHash [readonly] if paying by Credit and you've enabled BacsHash then this will contain the BacsHash included on the FPS + * @param \SynergiTech\Staffology\Model\Item|null $payee payee * * @return $this */ - public function setBacsHash(?string $bacsHash): static + public function setPayee(?\SynergiTech\Staffology\Model\Item $payee): static { - if (is_null($bacsHash)) { - array_push($this->openAPINullablesSetToNull, 'bacsHash'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bacsHash', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payee)) { + throw new InvalidArgumentException('non-nullable payee cannot be null'); } - $this->container['bacsHash'] = $bacsHash; + $this->container['payee'] = $payee; return $this; } /** - * Gets bacsSubReference + * Gets reference * * @return string|null */ - public function getBacsSubReference(): ?string + public function getReference(): ?string { - return $this->container['bacsSubReference']; + return $this->container['reference']; } /** - * Sets bacsSubReference + * Sets reference * - * @param string|null $bacsSubReference [readonly] if paying by Credit and you've enabled BacsHash then this will contain the BacsSubReference included on the FPS + * @param string|null $reference [readonly] The period the payment is for * * @return $this */ - public function setBacsSubReference(?string $bacsSubReference): static + public function setReference(?string $reference): static { - if (is_null($bacsSubReference)) { - array_push($this->openAPINullablesSetToNull, 'bacsSubReference'); + if (is_null($reference)) { + array_push($this->openAPINullablesSetToNull, 'reference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bacsSubReference', $nullablesSetToNull); + $index = array_search('reference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['bacsSubReference'] = $bacsSubReference; + $this->container['reference'] = $reference; return $this; } /** - * Gets isBankDetailValid + * Gets type * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PayeeType|null */ - public function getIsBankDetailValid(): ?bool + public function getType(): ?\SynergiTech\Staffology\Model\PayeeType { - return $this->container['isBankDetailValid']; + return $this->container['type']; } /** - * Sets isBankDetailValid + * Sets type * - * @param bool|null $isBankDetailValid [readonly] for checking if bank details are valid + * @param \SynergiTech\Staffology\Model\PayeeType|null $type type * * @return $this */ - public function setIsBankDetailValid(?bool $isBankDetailValid): static + public function setType(?\SynergiTech\Staffology\Model\PayeeType $type): static { - if (is_null($isBankDetailValid)) { - throw new InvalidArgumentException('non-nullable isBankDetailValid cannot be null'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['isBankDetailValid'] = $isBankDetailValid; + $this->container['type'] = $type; return $this; } diff --git a/src/Model/PayRunState.php b/src/Model/PayRunState.php index 3e8e05f..c6ac4d4 100644 --- a/src/Model/PayRunState.php +++ b/src/Model/PayRunState.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayRunStateChange.php b/src/Model/PayRunStateChange.php index c4f3850..9d42a72 100644 --- a/src/Model/PayRunStateChange.php +++ b/src/Model/PayRunStateChange.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class PayRunStateChange implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'state' => '\SynergiTech\Staffology\Model\PayRunState', + 'employeeUniqueIds' => 'string[]', 'reason' => '\SynergiTech\Staffology\Model\PayRunStateChangeReason', 'reasonText' => 'string', - 'employeeUniqueIds' => 'string[]' + 'state' => '\SynergiTech\Staffology\Model\PayRunState' ]; /** @@ -71,10 +71,10 @@ class PayRunStateChange implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'state' => null, + 'employeeUniqueIds' => 'uuid', 'reason' => null, 'reasonText' => null, - 'employeeUniqueIds' => 'uuid' + 'state' => null ]; /** @@ -83,10 +83,10 @@ class PayRunStateChange implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'state' => false, + 'employeeUniqueIds' => true, 'reason' => false, 'reasonText' => true, - 'employeeUniqueIds' => true + 'state' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'state' => 'state', + 'employeeUniqueIds' => 'employeeUniqueIds', 'reason' => 'reason', 'reasonText' => 'reasonText', - 'employeeUniqueIds' => 'employeeUniqueIds' + 'state' => 'state' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'state' => 'setState', + 'employeeUniqueIds' => 'setEmployeeUniqueIds', 'reason' => 'setReason', 'reasonText' => 'setReasonText', - 'employeeUniqueIds' => 'setEmployeeUniqueIds' + 'state' => 'setState' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'state' => 'getState', + 'employeeUniqueIds' => 'getEmployeeUniqueIds', 'reason' => 'getReason', 'reasonText' => 'getReasonText', - 'employeeUniqueIds' => 'getEmployeeUniqueIds' + 'state' => 'getState' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('employeeUniqueIds', $data ?? [], null); $this->setIfExists('reason', $data ?? [], null); $this->setIfExists('reasonText', $data ?? [], null); - $this->setIfExists('employeeUniqueIds', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); } /** @@ -314,28 +314,35 @@ public function valid(): bool /** - * Gets state + * Gets employeeUniqueIds * - * @return \SynergiTech\Staffology\Model\PayRunState|null + * @return string[]|null */ - public function getState(): ?\SynergiTech\Staffology\Model\PayRunState + public function getEmployeeUniqueIds(): ?array { - return $this->container['state']; + return $this->container['employeeUniqueIds']; } /** - * Sets state + * Sets employeeUniqueIds * - * @param \SynergiTech\Staffology\Model\PayRunState|null $state state + * @param string[]|null $employeeUniqueIds List of employee unique ids, whose PayRunEntries to be re-opened during a Payrun rollback operation. Will be used only during a transition to a rolled back pay run state * * @return $this */ - public function setState(?\SynergiTech\Staffology\Model\PayRunState $state): static + public function setEmployeeUniqueIds(?array $employeeUniqueIds): static { - if (is_null($state)) { - throw new InvalidArgumentException('non-nullable state cannot be null'); + if (is_null($employeeUniqueIds)) { + array_push($this->openAPINullablesSetToNull, 'employeeUniqueIds'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employeeUniqueIds', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['state'] = $state; + $this->container['employeeUniqueIds'] = $employeeUniqueIds; return $this; } @@ -406,35 +413,28 @@ public function setReasonText(?string $reasonText): static } /** - * Gets employeeUniqueIds + * Gets state * - * @return string[]|null + * @return \SynergiTech\Staffology\Model\PayRunState|null */ - public function getEmployeeUniqueIds(): ?array + public function getState(): ?\SynergiTech\Staffology\Model\PayRunState { - return $this->container['employeeUniqueIds']; + return $this->container['state']; } /** - * Sets employeeUniqueIds + * Sets state * - * @param string[]|null $employeeUniqueIds List of employee unique ids, whose PayRunEntries to be re-opened during a Payrun rollback operation. Will be used only during a transition to a rolled back pay run state + * @param \SynergiTech\Staffology\Model\PayRunState|null $state state * * @return $this */ - public function setEmployeeUniqueIds(?array $employeeUniqueIds): static + public function setState(?\SynergiTech\Staffology\Model\PayRunState $state): static { - if (is_null($employeeUniqueIds)) { - array_push($this->openAPINullablesSetToNull, 'employeeUniqueIds'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeeUniqueIds', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($state)) { + throw new InvalidArgumentException('non-nullable state cannot be null'); } - $this->container['employeeUniqueIds'] = $employeeUniqueIds; + $this->container['state'] = $state; return $this; } diff --git a/src/Model/PayRunStateChangeReason.php b/src/Model/PayRunStateChangeReason.php index 8c9126f..6beda46 100644 --- a/src/Model/PayRunStateChangeReason.php +++ b/src/Model/PayRunStateChangeReason.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayRunSummaryLine.php b/src/Model/PayRunSummaryLine.php index aecb124..0475608 100644 --- a/src/Model/PayRunSummaryLine.php +++ b/src/Model/PayRunSummaryLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,21 +60,21 @@ class PayRunSummaryLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'nominalCode' => 'string', - 'departmentCode' => 'string', - 'nominalName' => 'string', - 'description' => 'string', - 'qty' => 'float', - 'value' => 'float', - 'payCode' => '\SynergiTech\Staffology\Model\PayCode', - 'costCentreCode' => 'string', 'analysisCategories' => '\SynergiTech\Staffology\Model\AnalysisCategory[]', 'analysisCategoryCodes' => '\SynergiTech\Staffology\Model\AnalysisCategoryCode[]', + 'costCentreCode' => 'string', + 'departmentCode' => 'string', + 'description' => 'string', + 'employee' => '\SynergiTech\Staffology\Model\Employee', 'employeeUniqueId' => 'string', 'journalNarrative' => 'string', + 'nominalCode' => 'string', + 'nominalName' => 'string', + 'payCode' => '\SynergiTech\Staffology\Model\PayCode', 'pensionId' => 'string', - 'employee' => '\SynergiTech\Staffology\Model\Employee', - 'unMappedNominalCode' => 'string' + 'qty' => 'float', + 'unMappedNominalCode' => 'string', + 'value' => 'float' ]; /** @@ -83,21 +83,21 @@ class PayRunSummaryLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'nominalCode' => null, - 'departmentCode' => null, - 'nominalName' => null, - 'description' => null, - 'qty' => 'double', - 'value' => 'double', - 'payCode' => null, - 'costCentreCode' => null, 'analysisCategories' => null, 'analysisCategoryCodes' => null, + 'costCentreCode' => null, + 'departmentCode' => null, + 'description' => null, + 'employee' => null, 'employeeUniqueId' => 'uuid', 'journalNarrative' => null, + 'nominalCode' => null, + 'nominalName' => null, + 'payCode' => null, 'pensionId' => 'uuid', - 'employee' => null, - 'unMappedNominalCode' => null + 'qty' => 'double', + 'unMappedNominalCode' => null, + 'value' => 'double' ]; /** @@ -106,21 +106,21 @@ class PayRunSummaryLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'nominalCode' => true, - 'departmentCode' => true, - 'nominalName' => true, - 'description' => true, - 'qty' => true, - 'value' => false, - 'payCode' => false, - 'costCentreCode' => true, 'analysisCategories' => true, 'analysisCategoryCodes' => true, + 'costCentreCode' => true, + 'departmentCode' => true, + 'description' => true, + 'employee' => false, 'employeeUniqueId' => true, 'journalNarrative' => true, + 'nominalCode' => true, + 'nominalName' => true, + 'payCode' => false, 'pensionId' => true, - 'employee' => false, - 'unMappedNominalCode' => true + 'qty' => true, + 'unMappedNominalCode' => true, + 'value' => false ]; /** @@ -209,21 +209,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'nominalCode' => 'nominalCode', - 'departmentCode' => 'departmentCode', - 'nominalName' => 'nominalName', - 'description' => 'description', - 'qty' => 'qty', - 'value' => 'value', - 'payCode' => 'payCode', - 'costCentreCode' => 'costCentreCode', 'analysisCategories' => 'analysisCategories', 'analysisCategoryCodes' => 'analysisCategoryCodes', + 'costCentreCode' => 'costCentreCode', + 'departmentCode' => 'departmentCode', + 'description' => 'description', + 'employee' => 'employee', 'employeeUniqueId' => 'employeeUniqueId', 'journalNarrative' => 'journalNarrative', + 'nominalCode' => 'nominalCode', + 'nominalName' => 'nominalName', + 'payCode' => 'payCode', 'pensionId' => 'pensionId', - 'employee' => 'employee', - 'unMappedNominalCode' => 'unMappedNominalCode' + 'qty' => 'qty', + 'unMappedNominalCode' => 'unMappedNominalCode', + 'value' => 'value' ]; /** @@ -232,21 +232,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'nominalCode' => 'setNominalCode', - 'departmentCode' => 'setDepartmentCode', - 'nominalName' => 'setNominalName', - 'description' => 'setDescription', - 'qty' => 'setQty', - 'value' => 'setValue', - 'payCode' => 'setPayCode', - 'costCentreCode' => 'setCostCentreCode', 'analysisCategories' => 'setAnalysisCategories', 'analysisCategoryCodes' => 'setAnalysisCategoryCodes', + 'costCentreCode' => 'setCostCentreCode', + 'departmentCode' => 'setDepartmentCode', + 'description' => 'setDescription', + 'employee' => 'setEmployee', 'employeeUniqueId' => 'setEmployeeUniqueId', 'journalNarrative' => 'setJournalNarrative', + 'nominalCode' => 'setNominalCode', + 'nominalName' => 'setNominalName', + 'payCode' => 'setPayCode', 'pensionId' => 'setPensionId', - 'employee' => 'setEmployee', - 'unMappedNominalCode' => 'setUnMappedNominalCode' + 'qty' => 'setQty', + 'unMappedNominalCode' => 'setUnMappedNominalCode', + 'value' => 'setValue' ]; /** @@ -255,21 +255,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'nominalCode' => 'getNominalCode', - 'departmentCode' => 'getDepartmentCode', - 'nominalName' => 'getNominalName', - 'description' => 'getDescription', - 'qty' => 'getQty', - 'value' => 'getValue', - 'payCode' => 'getPayCode', - 'costCentreCode' => 'getCostCentreCode', 'analysisCategories' => 'getAnalysisCategories', 'analysisCategoryCodes' => 'getAnalysisCategoryCodes', + 'costCentreCode' => 'getCostCentreCode', + 'departmentCode' => 'getDepartmentCode', + 'description' => 'getDescription', + 'employee' => 'getEmployee', 'employeeUniqueId' => 'getEmployeeUniqueId', 'journalNarrative' => 'getJournalNarrative', + 'nominalCode' => 'getNominalCode', + 'nominalName' => 'getNominalName', + 'payCode' => 'getPayCode', 'pensionId' => 'getPensionId', - 'employee' => 'getEmployee', - 'unMappedNominalCode' => 'getUnMappedNominalCode' + 'qty' => 'getQty', + 'unMappedNominalCode' => 'getUnMappedNominalCode', + 'value' => 'getValue' ]; /** @@ -328,21 +328,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('nominalCode', $data ?? [], null); - $this->setIfExists('departmentCode', $data ?? [], null); - $this->setIfExists('nominalName', $data ?? [], null); - $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('qty', $data ?? [], null); - $this->setIfExists('value', $data ?? [], null); - $this->setIfExists('payCode', $data ?? [], null); - $this->setIfExists('costCentreCode', $data ?? [], null); $this->setIfExists('analysisCategories', $data ?? [], null); $this->setIfExists('analysisCategoryCodes', $data ?? [], null); + $this->setIfExists('costCentreCode', $data ?? [], null); + $this->setIfExists('departmentCode', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('employeeUniqueId', $data ?? [], null); $this->setIfExists('journalNarrative', $data ?? [], null); + $this->setIfExists('nominalCode', $data ?? [], null); + $this->setIfExists('nominalName', $data ?? [], null); + $this->setIfExists('payCode', $data ?? [], null); $this->setIfExists('pensionId', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('qty', $data ?? [], null); $this->setIfExists('unMappedNominalCode', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -388,395 +388,361 @@ public function valid(): bool /** - * Gets nominalCode + * Gets analysisCategories * - * @return string|null + * @return \SynergiTech\Staffology\Model\AnalysisCategory[]|null */ - public function getNominalCode(): ?string + public function getAnalysisCategories(): ?array { - return $this->container['nominalCode']; + return $this->container['analysisCategories']; } /** - * Sets nominalCode + * Sets analysisCategories * - * @param string|null $nominalCode [readonly] If you've set up NominalCodeMapping then the relevant Nominal code for the PayCode will be shown here. + * @param \SynergiTech\Staffology\Model\AnalysisCategory[]|null $analysisCategories [readonly] If the journal is split by analysis categories * * @return $this */ - public function setNominalCode(?string $nominalCode): static + public function setAnalysisCategories(?array $analysisCategories): static { - if (is_null($nominalCode)) { - array_push($this->openAPINullablesSetToNull, 'nominalCode'); + if (is_null($analysisCategories)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategories'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalCode', $nullablesSetToNull); + $index = array_search('analysisCategories', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nominalCode'] = $nominalCode; + $this->container['analysisCategories'] = $analysisCategories; return $this; } /** - * Gets departmentCode + * Gets analysisCategoryCodes * - * @return string|null + * @return \SynergiTech\Staffology\Model\AnalysisCategoryCode[]|null */ - public function getDepartmentCode(): ?string + public function getAnalysisCategoryCodes(): ?array { - return $this->container['departmentCode']; + return $this->container['analysisCategoryCodes']; } /** - * Sets departmentCode + * Sets analysisCategoryCodes * - * @param string|null $departmentCode [readonly] If the journal is split by department then the relevant department code is shown here. + * @param \SynergiTech\Staffology\Model\AnalysisCategoryCode[]|null $analysisCategoryCodes [readonly] If the journal is split by analysis categories then the relevant analysis categories code is shown here. * * @return $this */ - public function setDepartmentCode(?string $departmentCode): static + public function setAnalysisCategoryCodes(?array $analysisCategoryCodes): static { - if (is_null($departmentCode)) { - array_push($this->openAPINullablesSetToNull, 'departmentCode'); + if (is_null($analysisCategoryCodes)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodes'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('departmentCode', $nullablesSetToNull); + $index = array_search('analysisCategoryCodes', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['departmentCode'] = $departmentCode; + $this->container['analysisCategoryCodes'] = $analysisCategoryCodes; return $this; } /** - * Gets nominalName + * Gets costCentreCode * * @return string|null */ - public function getNominalName(): ?string + public function getCostCentreCode(): ?string { - return $this->container['nominalName']; + return $this->container['costCentreCode']; } /** - * Sets nominalName + * Sets costCentreCode * - * @param string|null $nominalName [readonly] As above + * @param string|null $costCentreCode [readonly] If the journal is split by cost centre then the relevant cost centre code is shown here. * * @return $this */ - public function setNominalName(?string $nominalName): static + public function setCostCentreCode(?string $costCentreCode): static { - if (is_null($nominalName)) { - array_push($this->openAPINullablesSetToNull, 'nominalName'); + if (is_null($costCentreCode)) { + array_push($this->openAPINullablesSetToNull, 'costCentreCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalName', $nullablesSetToNull); + $index = array_search('costCentreCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nominalName'] = $nominalName; + $this->container['costCentreCode'] = $costCentreCode; return $this; } /** - * Gets description + * Gets departmentCode * * @return string|null */ - public function getDescription(): ?string + public function getDepartmentCode(): ?string { - return $this->container['description']; + return $this->container['departmentCode']; } /** - * Sets description + * Sets departmentCode * - * @param string|null $description [readonly] A description of what this line summarises. + * @param string|null $departmentCode [readonly] If the journal is split by department then the relevant department code is shown here. * * @return $this */ - public function setDescription(?string $description): static + public function setDepartmentCode(?string $departmentCode): static { - if (is_null($description)) { - array_push($this->openAPINullablesSetToNull, 'description'); + if (is_null($departmentCode)) { + array_push($this->openAPINullablesSetToNull, 'departmentCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('description', $nullablesSetToNull); + $index = array_search('departmentCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['description'] = $description; + $this->container['departmentCode'] = $departmentCode; return $this; } /** - * Gets qty + * Gets description * - * @return float|null + * @return string|null */ - public function getQty(): ?float + public function getDescription(): ?string { - return $this->container['qty']; + return $this->container['description']; } /** - * Sets qty + * Sets description * - * @param float|null $qty [readonly] If the PayCode is a Multiplier code then this will contain the number of days/hours + * @param string|null $description [readonly] A description of what this line summarises. * * @return $this */ - public function setQty(?float $qty): static + public function setDescription(?string $description): static { - if (is_null($qty)) { - array_push($this->openAPINullablesSetToNull, 'qty'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('qty', $nullablesSetToNull); + $index = array_search('description', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['qty'] = $qty; - - return $this; - } - - /** - * Gets value - * - * @return float|null - */ - public function getValue(): ?float - { - return $this->container['value']; - } - - /** - * Sets value - * - * @param float|null $value [readonly] The total value for this line. - * - * @return $this - */ - public function setValue(?float $value): static - { - if (is_null($value)) { - throw new InvalidArgumentException('non-nullable value cannot be null'); - } - $this->container['value'] = $value; + $this->container['description'] = $description; return $this; } /** - * Gets payCode + * Gets employee * - * @return \SynergiTech\Staffology\Model\PayCode|null + * @return \SynergiTech\Staffology\Model\Employee|null */ - public function getPayCode(): ?\SynergiTech\Staffology\Model\PayCode + public function getEmployee(): ?\SynergiTech\Staffology\Model\Employee { - return $this->container['payCode']; + return $this->container['employee']; } /** - * Sets payCode + * Sets employee * - * @param \SynergiTech\Staffology\Model\PayCode|null $payCode payCode + * @param \SynergiTech\Staffology\Model\Employee|null $employee employee * * @return $this */ - public function setPayCode(?\SynergiTech\Staffology\Model\PayCode $payCode): static + public function setEmployee(?\SynergiTech\Staffology\Model\Employee $employee): static { - if (is_null($payCode)) { - throw new InvalidArgumentException('non-nullable payCode cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['payCode'] = $payCode; + $this->container['employee'] = $employee; return $this; } /** - * Gets costCentreCode + * Gets employeeUniqueId * * @return string|null */ - public function getCostCentreCode(): ?string + public function getEmployeeUniqueId(): ?string { - return $this->container['costCentreCode']; + return $this->container['employeeUniqueId']; } /** - * Sets costCentreCode + * Sets employeeUniqueId * - * @param string|null $costCentreCode [readonly] If the journal is split by cost centre then the relevant cost centre code is shown here. + * @param string|null $employeeUniqueId [readonly] The EmployeeId this summary line relates to. * * @return $this */ - public function setCostCentreCode(?string $costCentreCode): static + public function setEmployeeUniqueId(?string $employeeUniqueId): static { - if (is_null($costCentreCode)) { - array_push($this->openAPINullablesSetToNull, 'costCentreCode'); + if (is_null($employeeUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'employeeUniqueId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costCentreCode', $nullablesSetToNull); + $index = array_search('employeeUniqueId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costCentreCode'] = $costCentreCode; + $this->container['employeeUniqueId'] = $employeeUniqueId; return $this; } /** - * Gets analysisCategories + * Gets journalNarrative * - * @return \SynergiTech\Staffology\Model\AnalysisCategory[]|null + * @return string|null */ - public function getAnalysisCategories(): ?array + public function getJournalNarrative(): ?string { - return $this->container['analysisCategories']; + return $this->container['journalNarrative']; } /** - * Sets analysisCategories + * Sets journalNarrative * - * @param \SynergiTech\Staffology\Model\AnalysisCategory[]|null $analysisCategories [readonly] If the journal is split by analysis categories + * @param string|null $journalNarrative [readonly] Gets the journal narrative for the pension, if defined. * * @return $this */ - public function setAnalysisCategories(?array $analysisCategories): static + public function setJournalNarrative(?string $journalNarrative): static { - if (is_null($analysisCategories)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategories'); + if (is_null($journalNarrative)) { + array_push($this->openAPINullablesSetToNull, 'journalNarrative'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategories', $nullablesSetToNull); + $index = array_search('journalNarrative', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategories'] = $analysisCategories; + $this->container['journalNarrative'] = $journalNarrative; return $this; } /** - * Gets analysisCategoryCodes + * Gets nominalCode * - * @return \SynergiTech\Staffology\Model\AnalysisCategoryCode[]|null + * @return string|null */ - public function getAnalysisCategoryCodes(): ?array + public function getNominalCode(): ?string { - return $this->container['analysisCategoryCodes']; + return $this->container['nominalCode']; } /** - * Sets analysisCategoryCodes + * Sets nominalCode * - * @param \SynergiTech\Staffology\Model\AnalysisCategoryCode[]|null $analysisCategoryCodes [readonly] If the journal is split by analysis categories then the relevant analysis categories code is shown here. + * @param string|null $nominalCode [readonly] If you've set up NominalCodeMapping then the relevant Nominal code for the PayCode will be shown here. * * @return $this */ - public function setAnalysisCategoryCodes(?array $analysisCategoryCodes): static + public function setNominalCode(?string $nominalCode): static { - if (is_null($analysisCategoryCodes)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryCodes'); + if (is_null($nominalCode)) { + array_push($this->openAPINullablesSetToNull, 'nominalCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryCodes', $nullablesSetToNull); + $index = array_search('nominalCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['analysisCategoryCodes'] = $analysisCategoryCodes; + $this->container['nominalCode'] = $nominalCode; return $this; } /** - * Gets employeeUniqueId + * Gets nominalName * * @return string|null */ - public function getEmployeeUniqueId(): ?string + public function getNominalName(): ?string { - return $this->container['employeeUniqueId']; + return $this->container['nominalName']; } /** - * Sets employeeUniqueId + * Sets nominalName * - * @param string|null $employeeUniqueId [readonly] The EmployeeId this summary line relates to. + * @param string|null $nominalName [readonly] As above * * @return $this */ - public function setEmployeeUniqueId(?string $employeeUniqueId): static + public function setNominalName(?string $nominalName): static { - if (is_null($employeeUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'employeeUniqueId'); + if (is_null($nominalName)) { + array_push($this->openAPINullablesSetToNull, 'nominalName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeeUniqueId', $nullablesSetToNull); + $index = array_search('nominalName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employeeUniqueId'] = $employeeUniqueId; + $this->container['nominalName'] = $nominalName; return $this; } /** - * Gets journalNarrative + * Gets payCode * - * @return string|null + * @return \SynergiTech\Staffology\Model\PayCode|null */ - public function getJournalNarrative(): ?string + public function getPayCode(): ?\SynergiTech\Staffology\Model\PayCode { - return $this->container['journalNarrative']; + return $this->container['payCode']; } /** - * Sets journalNarrative + * Sets payCode * - * @param string|null $journalNarrative [readonly] Gets the journal narrative for the pension, if defined. + * @param \SynergiTech\Staffology\Model\PayCode|null $payCode payCode * * @return $this */ - public function setJournalNarrative(?string $journalNarrative): static + public function setPayCode(?\SynergiTech\Staffology\Model\PayCode $payCode): static { - if (is_null($journalNarrative)) { - array_push($this->openAPINullablesSetToNull, 'journalNarrative'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('journalNarrative', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payCode)) { + throw new InvalidArgumentException('non-nullable payCode cannot be null'); } - $this->container['journalNarrative'] = $journalNarrative; + $this->container['payCode'] = $payCode; return $this; } @@ -816,28 +782,35 @@ public function setPensionId(?string $pensionId): static } /** - * Gets employee + * Gets qty * - * @return \SynergiTech\Staffology\Model\Employee|null + * @return float|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Employee + public function getQty(): ?float { - return $this->container['employee']; + return $this->container['qty']; } /** - * Sets employee + * Sets qty * - * @param \SynergiTech\Staffology\Model\Employee|null $employee employee + * @param float|null $qty [readonly] If the PayCode is a Multiplier code then this will contain the number of days/hours * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Employee $employee): static + public function setQty(?float $qty): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($qty)) { + array_push($this->openAPINullablesSetToNull, 'qty'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('qty', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employee'] = $employee; + $this->container['qty'] = $qty; return $this; } @@ -875,6 +848,33 @@ public function setUnMappedNominalCode(?string $unMappedNominalCode): static return $this; } + + /** + * Gets value + * + * @return float|null + */ + public function getValue(): ?float + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param float|null $value [readonly] The total value for this line. + * + * @return $this + */ + public function setValue(?float $value): static + { + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PayRunSummaryLineIEnumerableReportResponse.php b/src/Model/PayRunSummaryLineIEnumerableReportResponse.php index d90ec68..18a1c66 100644 --- a/src/Model/PayRunSummaryLineIEnumerableReportResponse.php +++ b/src/Model/PayRunSummaryLineIEnumerableReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class PayRunSummaryLineIEnumerableReportResponse implements ModelInterface, Arra * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\PayRunSummaryLine[]', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class PayRunSummaryLineIEnumerableReportResponse implements ModelInterface, Arra * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class PayRunSummaryLineIEnumerableReportResponse implements ModelInterface, Arra * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => true, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -445,6 +411,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PayRunTotals.php b/src/Model/PayRunTotals.php index a48b9fd..1d6ae42 100644 --- a/src/Model/PayRunTotals.php +++ b/src/Model/PayRunTotals.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,90 +60,91 @@ class PayRunTotals implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'additions' => 'float', + 'adjustments' => 'float', + 'appLevyDeduction' => 'float', + 'attachmentOrderDeductions' => 'float', 'basicPay' => 'float', - 'gross' => 'float', - 'grossForNi' => 'float', - 'grossForNiNonRti' => 'float', - 'grossNotSubjectToEmployersNi' => 'float', - 'grossNotSubjectToEmployersNiNonRti' => 'float', - 'grossForTax' => 'float', - 'employerNi' => 'float', - 'employerNiNonRti' => 'float', + 'cisDeduction' => 'float', + 'cisUmbrellaFee' => 'float', + 'cisUmbrellaFeePostTax' => 'float', + 'cisVat' => 'float', + 'dednsFromNetPay' => 'float', + 'deductions' => 'float', + 'empeePenContribnsNotPaid' => 'float', + 'empeePenContribnsPaid' => 'float', 'employeeNi' => 'float', 'employeeNiNonRti' => 'float', + 'employeePensionContribution' => 'float', + 'employeePensionContributionAvc' => 'float', + 'employerNi' => 'float', + 'employerNiNonRti' => 'float', 'employerNiOffPayroll' => 'float', - 'realTimeClass1ANi' => 'float', - 'realTimeClass1ANiNonRti' => 'float', - 'tax' => 'float', - 'taxNonRti' => 'float', - 'netPay' => 'float', - 'adjustments' => 'float', - 'notionalPay' => 'float', - 'additions' => 'float', - 'deductions' => 'float', - 'takeHomePay' => 'float', - 'nonTaxOrNICPmt' => 'float', - 'itemsSubjectToClass1NIC' => 'float', - 'dednsFromNetPay' => 'float', - 'tcpTcls' => 'float', - 'tcpPp' => 'float', - 'tcpOp' => 'float', + 'employerPensionContribution' => 'float', 'flexiDdDeath' => 'float', 'flexiDdDeathNonTax' => 'float', 'flexiDdPension' => 'float', + 'flexiDdPensionCommencementExcess' => 'float', + 'flexiDdPensionCommencementExcessNonTax' => 'float', 'flexiDdPensionNonTax' => 'float', 'flexiDdSeriousIllHealth' => 'float', 'flexiDdSeriousIllHealthNonTax' => 'float', 'flexiDdStandAloneLumpSum' => 'float', 'flexiDdStandAloneLumpSumNonTax' => 'float', - 'flexiDdPensionCommencementExcess' => 'float', - 'flexiDdPensionCommencementExcessNonTax' => 'float', - 'smp' => 'float', - 'smpNonRti' => 'float', - 'spp' => 'float', - 'sppNonRti' => 'float', + 'foreignTaxAmount' => 'float', + 'foreignTaxAmountReclaimed' => 'float', + 'gross' => 'float', + 'grossForNi' => 'float', + 'grossForNiNonRti' => 'float', + 'grossForTax' => 'float', + 'grossNotSubjectToEmployersNi' => 'float', + 'grossNotSubjectToEmployersNiNonRti' => 'float', + 'itemsSubjectToClass1NIC' => 'float', + 'leavers' => 'int', + 'mapsMiles' => 'int', + 'netPay' => 'float', + 'newEmployeesInCurrentSupplementaryPayRun' => 'int', + 'nilPaid' => 'int', + 'nonTaxOrNICPmt' => 'float', + 'nonTierablePay' => 'float', + 'notionalPay' => 'float', + 'p45Gross' => 'float', + 'p45Tax' => 'float', + 'paymentAfterLeaving' => 'float', + 'pbik' => 'float', + 'pensionableEarnings' => 'float', + 'pensionablePay' => 'float', + 'postgradLoanRecovered' => 'float', + 'postgradLoanRecoveredNonRti' => 'float', + 'realTimeClass1ANi' => 'float', + 'realTimeClass1ANiNonRti' => 'float', + 'recoverableAmounts' => '\SynergiTech\Staffology\Model\RecoverableAmounts', 'sap' => 'float', 'sapNonRti' => 'float', 'shpp' => 'float', 'shppNonRti' => 'float', - 'spbp' => 'float', - 'spbpNonRti' => 'float', + 'smp' => 'float', + 'smpNonRti' => 'float', 'sncp' => 'float', 'sncpNonRti' => 'float', + 'spbp' => 'float', + 'spbpNonRti' => 'float', + 'spp' => 'float', + 'sppNonRti' => 'float', 'ssp' => 'float', 'sspNonRti' => 'float', + 'starters' => 'int', 'studentLoanRecovered' => 'float', 'studentLoanRecoveredNonRti' => 'float', - 'postgradLoanRecovered' => 'float', - 'postgradLoanRecoveredNonRti' => 'float', - 'pensionableEarnings' => 'float', - 'pensionablePay' => 'float', - 'nonTierablePay' => 'float', - 'employeePensionContribution' => 'float', - 'employeePensionContributionAvc' => 'float', - 'employerPensionContribution' => 'float', - 'empeePenContribnsNotPaid' => 'float', - 'empeePenContribnsPaid' => 'float', - 'attachmentOrderDeductions' => 'float', - 'cisDeduction' => 'float', - 'cisVat' => 'float', - 'cisUmbrellaFee' => 'float', - 'cisUmbrellaFeePostTax' => 'float', - 'pbik' => 'float', - 'mapsMiles' => 'int', - 'foreignTaxAmount' => 'float', - 'foreignTaxAmountReclaimed' => 'float', - 'umbrellaFee' => 'float', - 'appLevyDeduction' => 'float', - 'paymentAfterLeaving' => 'float', + 'takeHomePay' => 'float', + 'tax' => 'float', + 'taxNonRti' => 'float', 'taxOnPaymentAfterLeaving' => 'float', - 'nilPaid' => 'int', - 'leavers' => 'int', - 'starters' => 'int', - 'p45Gross' => 'float', - 'p45Tax' => 'float', + 'tcpOp' => 'float', + 'tcpPp' => 'float', + 'tcpTcls' => 'float', 'totalCost' => 'float', - 'recoverableAmounts' => '\SynergiTech\Staffology\Model\RecoverableAmounts' + 'umbrellaFee' => 'float' ]; /** @@ -152,90 +153,91 @@ class PayRunTotals implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'additions' => 'double', + 'adjustments' => 'double', + 'appLevyDeduction' => 'double', + 'attachmentOrderDeductions' => 'double', 'basicPay' => 'double', - 'gross' => 'double', - 'grossForNi' => 'double', - 'grossForNiNonRti' => 'double', - 'grossNotSubjectToEmployersNi' => 'double', - 'grossNotSubjectToEmployersNiNonRti' => 'double', - 'grossForTax' => 'double', - 'employerNi' => 'double', - 'employerNiNonRti' => 'double', + 'cisDeduction' => 'double', + 'cisUmbrellaFee' => 'double', + 'cisUmbrellaFeePostTax' => 'double', + 'cisVat' => 'double', + 'dednsFromNetPay' => 'double', + 'deductions' => 'double', + 'empeePenContribnsNotPaid' => 'double', + 'empeePenContribnsPaid' => 'double', 'employeeNi' => 'double', 'employeeNiNonRti' => 'double', + 'employeePensionContribution' => 'double', + 'employeePensionContributionAvc' => 'double', + 'employerNi' => 'double', + 'employerNiNonRti' => 'double', 'employerNiOffPayroll' => 'double', - 'realTimeClass1ANi' => 'double', - 'realTimeClass1ANiNonRti' => 'double', - 'tax' => 'double', - 'taxNonRti' => 'double', - 'netPay' => 'double', - 'adjustments' => 'double', - 'notionalPay' => 'double', - 'additions' => 'double', - 'deductions' => 'double', - 'takeHomePay' => 'double', - 'nonTaxOrNICPmt' => 'double', - 'itemsSubjectToClass1NIC' => 'double', - 'dednsFromNetPay' => 'double', - 'tcpTcls' => 'double', - 'tcpPp' => 'double', - 'tcpOp' => 'double', + 'employerPensionContribution' => 'double', 'flexiDdDeath' => 'double', 'flexiDdDeathNonTax' => 'double', 'flexiDdPension' => 'double', + 'flexiDdPensionCommencementExcess' => 'double', + 'flexiDdPensionCommencementExcessNonTax' => 'double', 'flexiDdPensionNonTax' => 'double', 'flexiDdSeriousIllHealth' => 'double', 'flexiDdSeriousIllHealthNonTax' => 'double', 'flexiDdStandAloneLumpSum' => 'double', 'flexiDdStandAloneLumpSumNonTax' => 'double', - 'flexiDdPensionCommencementExcess' => 'double', - 'flexiDdPensionCommencementExcessNonTax' => 'double', - 'smp' => 'double', - 'smpNonRti' => 'double', - 'spp' => 'double', - 'sppNonRti' => 'double', + 'foreignTaxAmount' => 'double', + 'foreignTaxAmountReclaimed' => 'double', + 'gross' => 'double', + 'grossForNi' => 'double', + 'grossForNiNonRti' => 'double', + 'grossForTax' => 'double', + 'grossNotSubjectToEmployersNi' => 'double', + 'grossNotSubjectToEmployersNiNonRti' => 'double', + 'itemsSubjectToClass1NIC' => 'double', + 'leavers' => 'int32', + 'mapsMiles' => 'int32', + 'netPay' => 'double', + 'newEmployeesInCurrentSupplementaryPayRun' => 'int32', + 'nilPaid' => 'int32', + 'nonTaxOrNICPmt' => 'double', + 'nonTierablePay' => 'double', + 'notionalPay' => 'double', + 'p45Gross' => 'double', + 'p45Tax' => 'double', + 'paymentAfterLeaving' => 'double', + 'pbik' => 'double', + 'pensionableEarnings' => 'double', + 'pensionablePay' => 'double', + 'postgradLoanRecovered' => 'double', + 'postgradLoanRecoveredNonRti' => 'double', + 'realTimeClass1ANi' => 'double', + 'realTimeClass1ANiNonRti' => 'double', + 'recoverableAmounts' => null, 'sap' => 'double', 'sapNonRti' => 'double', 'shpp' => 'double', 'shppNonRti' => 'double', - 'spbp' => 'double', - 'spbpNonRti' => 'double', + 'smp' => 'double', + 'smpNonRti' => 'double', 'sncp' => 'double', 'sncpNonRti' => 'double', + 'spbp' => 'double', + 'spbpNonRti' => 'double', + 'spp' => 'double', + 'sppNonRti' => 'double', 'ssp' => 'double', 'sspNonRti' => 'double', + 'starters' => 'int32', 'studentLoanRecovered' => 'double', 'studentLoanRecoveredNonRti' => 'double', - 'postgradLoanRecovered' => 'double', - 'postgradLoanRecoveredNonRti' => 'double', - 'pensionableEarnings' => 'double', - 'pensionablePay' => 'double', - 'nonTierablePay' => 'double', - 'employeePensionContribution' => 'double', - 'employeePensionContributionAvc' => 'double', - 'employerPensionContribution' => 'double', - 'empeePenContribnsNotPaid' => 'double', - 'empeePenContribnsPaid' => 'double', - 'attachmentOrderDeductions' => 'double', - 'cisDeduction' => 'double', - 'cisVat' => 'double', - 'cisUmbrellaFee' => 'double', - 'cisUmbrellaFeePostTax' => 'double', - 'pbik' => 'double', - 'mapsMiles' => 'int32', - 'foreignTaxAmount' => 'double', - 'foreignTaxAmountReclaimed' => 'double', - 'umbrellaFee' => 'double', - 'appLevyDeduction' => 'double', - 'paymentAfterLeaving' => 'double', + 'takeHomePay' => 'double', + 'tax' => 'double', + 'taxNonRti' => 'double', 'taxOnPaymentAfterLeaving' => 'double', - 'nilPaid' => 'int32', - 'leavers' => 'int32', - 'starters' => 'int32', - 'p45Gross' => 'double', - 'p45Tax' => 'double', + 'tcpOp' => 'double', + 'tcpPp' => 'double', + 'tcpTcls' => 'double', 'totalCost' => 'double', - 'recoverableAmounts' => null + 'umbrellaFee' => 'double' ]; /** @@ -244,90 +246,91 @@ class PayRunTotals implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'additions' => false, + 'adjustments' => false, + 'appLevyDeduction' => false, + 'attachmentOrderDeductions' => false, 'basicPay' => false, - 'gross' => false, - 'grossForNi' => false, - 'grossForNiNonRti' => false, - 'grossNotSubjectToEmployersNi' => false, - 'grossNotSubjectToEmployersNiNonRti' => false, - 'grossForTax' => false, - 'employerNi' => false, - 'employerNiNonRti' => false, + 'cisDeduction' => false, + 'cisUmbrellaFee' => false, + 'cisUmbrellaFeePostTax' => false, + 'cisVat' => false, + 'dednsFromNetPay' => false, + 'deductions' => false, + 'empeePenContribnsNotPaid' => false, + 'empeePenContribnsPaid' => false, 'employeeNi' => false, 'employeeNiNonRti' => false, + 'employeePensionContribution' => false, + 'employeePensionContributionAvc' => false, + 'employerNi' => false, + 'employerNiNonRti' => false, 'employerNiOffPayroll' => false, - 'realTimeClass1ANi' => false, - 'realTimeClass1ANiNonRti' => false, - 'tax' => false, - 'taxNonRti' => false, - 'netPay' => false, - 'adjustments' => false, - 'notionalPay' => false, - 'additions' => false, - 'deductions' => false, - 'takeHomePay' => false, - 'nonTaxOrNICPmt' => false, - 'itemsSubjectToClass1NIC' => false, - 'dednsFromNetPay' => false, - 'tcpTcls' => false, - 'tcpPp' => false, - 'tcpOp' => false, + 'employerPensionContribution' => false, 'flexiDdDeath' => false, 'flexiDdDeathNonTax' => false, 'flexiDdPension' => false, + 'flexiDdPensionCommencementExcess' => false, + 'flexiDdPensionCommencementExcessNonTax' => false, 'flexiDdPensionNonTax' => false, 'flexiDdSeriousIllHealth' => false, 'flexiDdSeriousIllHealthNonTax' => false, 'flexiDdStandAloneLumpSum' => false, 'flexiDdStandAloneLumpSumNonTax' => false, - 'flexiDdPensionCommencementExcess' => false, - 'flexiDdPensionCommencementExcessNonTax' => false, - 'smp' => false, - 'smpNonRti' => false, - 'spp' => false, - 'sppNonRti' => false, + 'foreignTaxAmount' => false, + 'foreignTaxAmountReclaimed' => false, + 'gross' => false, + 'grossForNi' => false, + 'grossForNiNonRti' => false, + 'grossForTax' => false, + 'grossNotSubjectToEmployersNi' => false, + 'grossNotSubjectToEmployersNiNonRti' => false, + 'itemsSubjectToClass1NIC' => false, + 'leavers' => false, + 'mapsMiles' => false, + 'netPay' => false, + 'newEmployeesInCurrentSupplementaryPayRun' => false, + 'nilPaid' => false, + 'nonTaxOrNICPmt' => false, + 'nonTierablePay' => false, + 'notionalPay' => false, + 'p45Gross' => true, + 'p45Tax' => true, + 'paymentAfterLeaving' => false, + 'pbik' => false, + 'pensionableEarnings' => false, + 'pensionablePay' => false, + 'postgradLoanRecovered' => false, + 'postgradLoanRecoveredNonRti' => false, + 'realTimeClass1ANi' => false, + 'realTimeClass1ANiNonRti' => false, + 'recoverableAmounts' => false, 'sap' => false, 'sapNonRti' => false, 'shpp' => false, 'shppNonRti' => false, - 'spbp' => false, - 'spbpNonRti' => false, + 'smp' => false, + 'smpNonRti' => false, 'sncp' => false, 'sncpNonRti' => false, + 'spbp' => false, + 'spbpNonRti' => false, + 'spp' => false, + 'sppNonRti' => false, 'ssp' => false, 'sspNonRti' => false, + 'starters' => false, 'studentLoanRecovered' => false, 'studentLoanRecoveredNonRti' => false, - 'postgradLoanRecovered' => false, - 'postgradLoanRecoveredNonRti' => false, - 'pensionableEarnings' => false, - 'pensionablePay' => false, - 'nonTierablePay' => false, - 'employeePensionContribution' => false, - 'employeePensionContributionAvc' => false, - 'employerPensionContribution' => false, - 'empeePenContribnsNotPaid' => false, - 'empeePenContribnsPaid' => false, - 'attachmentOrderDeductions' => false, - 'cisDeduction' => false, - 'cisVat' => false, - 'cisUmbrellaFee' => false, - 'cisUmbrellaFeePostTax' => false, - 'pbik' => false, - 'mapsMiles' => false, - 'foreignTaxAmount' => false, - 'foreignTaxAmountReclaimed' => false, - 'umbrellaFee' => false, - 'appLevyDeduction' => false, - 'paymentAfterLeaving' => false, + 'takeHomePay' => false, + 'tax' => false, + 'taxNonRti' => false, 'taxOnPaymentAfterLeaving' => false, - 'nilPaid' => false, - 'leavers' => false, - 'starters' => false, - 'p45Gross' => true, - 'p45Tax' => true, + 'tcpOp' => false, + 'tcpPp' => false, + 'tcpTcls' => false, 'totalCost' => false, - 'recoverableAmounts' => false + 'umbrellaFee' => false ]; /** @@ -416,90 +419,91 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'additions' => 'additions', + 'adjustments' => 'adjustments', + 'appLevyDeduction' => 'appLevyDeduction', + 'attachmentOrderDeductions' => 'attachmentOrderDeductions', 'basicPay' => 'basicPay', - 'gross' => 'gross', - 'grossForNi' => 'grossForNi', - 'grossForNiNonRti' => 'grossForNiNonRti', - 'grossNotSubjectToEmployersNi' => 'grossNotSubjectToEmployersNi', - 'grossNotSubjectToEmployersNiNonRti' => 'grossNotSubjectToEmployersNiNonRti', - 'grossForTax' => 'grossForTax', - 'employerNi' => 'employerNi', - 'employerNiNonRti' => 'employerNiNonRti', + 'cisDeduction' => 'cisDeduction', + 'cisUmbrellaFee' => 'cisUmbrellaFee', + 'cisUmbrellaFeePostTax' => 'cisUmbrellaFeePostTax', + 'cisVat' => 'cisVat', + 'dednsFromNetPay' => 'dednsFromNetPay', + 'deductions' => 'deductions', + 'empeePenContribnsNotPaid' => 'empeePenContribnsNotPaid', + 'empeePenContribnsPaid' => 'empeePenContribnsPaid', 'employeeNi' => 'employeeNi', 'employeeNiNonRti' => 'employeeNiNonRti', + 'employeePensionContribution' => 'employeePensionContribution', + 'employeePensionContributionAvc' => 'employeePensionContributionAvc', + 'employerNi' => 'employerNi', + 'employerNiNonRti' => 'employerNiNonRti', 'employerNiOffPayroll' => 'employerNiOffPayroll', - 'realTimeClass1ANi' => 'realTimeClass1ANi', - 'realTimeClass1ANiNonRti' => 'realTimeClass1ANiNonRti', - 'tax' => 'tax', - 'taxNonRti' => 'taxNonRti', - 'netPay' => 'netPay', - 'adjustments' => 'adjustments', - 'notionalPay' => 'notionalPay', - 'additions' => 'additions', - 'deductions' => 'deductions', - 'takeHomePay' => 'takeHomePay', - 'nonTaxOrNICPmt' => 'nonTaxOrNICPmt', - 'itemsSubjectToClass1NIC' => 'itemsSubjectToClass1NIC', - 'dednsFromNetPay' => 'dednsFromNetPay', - 'tcpTcls' => 'tcp_Tcls', - 'tcpPp' => 'tcp_Pp', - 'tcpOp' => 'tcp_Op', + 'employerPensionContribution' => 'employerPensionContribution', 'flexiDdDeath' => 'flexiDd_Death', 'flexiDdDeathNonTax' => 'flexiDd_Death_NonTax', 'flexiDdPension' => 'flexiDd_Pension', + 'flexiDdPensionCommencementExcess' => 'flexiDd_PensionCommencementExcess', + 'flexiDdPensionCommencementExcessNonTax' => 'flexiDd_PensionCommencementExcess_NonTax', 'flexiDdPensionNonTax' => 'flexiDd_Pension_NonTax', 'flexiDdSeriousIllHealth' => 'flexiDd_SeriousIllHealth', 'flexiDdSeriousIllHealthNonTax' => 'flexiDd_SeriousIllHealth_NonTax', 'flexiDdStandAloneLumpSum' => 'flexiDd_StandAloneLumpSum', 'flexiDdStandAloneLumpSumNonTax' => 'flexiDd_StandAloneLumpSum_NonTax', - 'flexiDdPensionCommencementExcess' => 'flexiDd_PensionCommencementExcess', - 'flexiDdPensionCommencementExcessNonTax' => 'flexiDd_PensionCommencementExcess_NonTax', - 'smp' => 'smp', - 'smpNonRti' => 'smpNonRti', - 'spp' => 'spp', - 'sppNonRti' => 'sppNonRti', + 'foreignTaxAmount' => 'foreignTaxAmount', + 'foreignTaxAmountReclaimed' => 'foreignTaxAmountReclaimed', + 'gross' => 'gross', + 'grossForNi' => 'grossForNi', + 'grossForNiNonRti' => 'grossForNiNonRti', + 'grossForTax' => 'grossForTax', + 'grossNotSubjectToEmployersNi' => 'grossNotSubjectToEmployersNi', + 'grossNotSubjectToEmployersNiNonRti' => 'grossNotSubjectToEmployersNiNonRti', + 'itemsSubjectToClass1NIC' => 'itemsSubjectToClass1NIC', + 'leavers' => 'leavers', + 'mapsMiles' => 'mapsMiles', + 'netPay' => 'netPay', + 'newEmployeesInCurrentSupplementaryPayRun' => 'newEmployeesInCurrentSupplementaryPayRun', + 'nilPaid' => 'nilPaid', + 'nonTaxOrNICPmt' => 'nonTaxOrNICPmt', + 'nonTierablePay' => 'nonTierablePay', + 'notionalPay' => 'notionalPay', + 'p45Gross' => 'p45Gross', + 'p45Tax' => 'p45Tax', + 'paymentAfterLeaving' => 'paymentAfterLeaving', + 'pbik' => 'pbik', + 'pensionableEarnings' => 'pensionableEarnings', + 'pensionablePay' => 'pensionablePay', + 'postgradLoanRecovered' => 'postgradLoanRecovered', + 'postgradLoanRecoveredNonRti' => 'postgradLoanRecoveredNonRti', + 'realTimeClass1ANi' => 'realTimeClass1ANi', + 'realTimeClass1ANiNonRti' => 'realTimeClass1ANiNonRti', + 'recoverableAmounts' => 'recoverableAmounts', 'sap' => 'sap', 'sapNonRti' => 'sapNonRti', 'shpp' => 'shpp', 'shppNonRti' => 'shppNonRti', - 'spbp' => 'spbp', - 'spbpNonRti' => 'spbpNonRti', + 'smp' => 'smp', + 'smpNonRti' => 'smpNonRti', 'sncp' => 'sncp', 'sncpNonRti' => 'sncpNonRti', + 'spbp' => 'spbp', + 'spbpNonRti' => 'spbpNonRti', + 'spp' => 'spp', + 'sppNonRti' => 'sppNonRti', 'ssp' => 'ssp', 'sspNonRti' => 'sspNonRti', + 'starters' => 'starters', 'studentLoanRecovered' => 'studentLoanRecovered', 'studentLoanRecoveredNonRti' => 'studentLoanRecoveredNonRti', - 'postgradLoanRecovered' => 'postgradLoanRecovered', - 'postgradLoanRecoveredNonRti' => 'postgradLoanRecoveredNonRti', - 'pensionableEarnings' => 'pensionableEarnings', - 'pensionablePay' => 'pensionablePay', - 'nonTierablePay' => 'nonTierablePay', - 'employeePensionContribution' => 'employeePensionContribution', - 'employeePensionContributionAvc' => 'employeePensionContributionAvc', - 'employerPensionContribution' => 'employerPensionContribution', - 'empeePenContribnsNotPaid' => 'empeePenContribnsNotPaid', - 'empeePenContribnsPaid' => 'empeePenContribnsPaid', - 'attachmentOrderDeductions' => 'attachmentOrderDeductions', - 'cisDeduction' => 'cisDeduction', - 'cisVat' => 'cisVat', - 'cisUmbrellaFee' => 'cisUmbrellaFee', - 'cisUmbrellaFeePostTax' => 'cisUmbrellaFeePostTax', - 'pbik' => 'pbik', - 'mapsMiles' => 'mapsMiles', - 'foreignTaxAmount' => 'foreignTaxAmount', - 'foreignTaxAmountReclaimed' => 'foreignTaxAmountReclaimed', - 'umbrellaFee' => 'umbrellaFee', - 'appLevyDeduction' => 'appLevyDeduction', - 'paymentAfterLeaving' => 'paymentAfterLeaving', + 'takeHomePay' => 'takeHomePay', + 'tax' => 'tax', + 'taxNonRti' => 'taxNonRti', 'taxOnPaymentAfterLeaving' => 'taxOnPaymentAfterLeaving', - 'nilPaid' => 'nilPaid', - 'leavers' => 'leavers', - 'starters' => 'starters', - 'p45Gross' => 'p45Gross', - 'p45Tax' => 'p45Tax', + 'tcpOp' => 'tcp_Op', + 'tcpPp' => 'tcp_Pp', + 'tcpTcls' => 'tcp_Tcls', 'totalCost' => 'totalCost', - 'recoverableAmounts' => 'recoverableAmounts' + 'umbrellaFee' => 'umbrellaFee' ]; /** @@ -508,90 +512,91 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'additions' => 'setAdditions', + 'adjustments' => 'setAdjustments', + 'appLevyDeduction' => 'setAppLevyDeduction', + 'attachmentOrderDeductions' => 'setAttachmentOrderDeductions', 'basicPay' => 'setBasicPay', - 'gross' => 'setGross', - 'grossForNi' => 'setGrossForNi', - 'grossForNiNonRti' => 'setGrossForNiNonRti', - 'grossNotSubjectToEmployersNi' => 'setGrossNotSubjectToEmployersNi', - 'grossNotSubjectToEmployersNiNonRti' => 'setGrossNotSubjectToEmployersNiNonRti', - 'grossForTax' => 'setGrossForTax', - 'employerNi' => 'setEmployerNi', - 'employerNiNonRti' => 'setEmployerNiNonRti', + 'cisDeduction' => 'setCisDeduction', + 'cisUmbrellaFee' => 'setCisUmbrellaFee', + 'cisUmbrellaFeePostTax' => 'setCisUmbrellaFeePostTax', + 'cisVat' => 'setCisVat', + 'dednsFromNetPay' => 'setDednsFromNetPay', + 'deductions' => 'setDeductions', + 'empeePenContribnsNotPaid' => 'setEmpeePenContribnsNotPaid', + 'empeePenContribnsPaid' => 'setEmpeePenContribnsPaid', 'employeeNi' => 'setEmployeeNi', 'employeeNiNonRti' => 'setEmployeeNiNonRti', + 'employeePensionContribution' => 'setEmployeePensionContribution', + 'employeePensionContributionAvc' => 'setEmployeePensionContributionAvc', + 'employerNi' => 'setEmployerNi', + 'employerNiNonRti' => 'setEmployerNiNonRti', 'employerNiOffPayroll' => 'setEmployerNiOffPayroll', - 'realTimeClass1ANi' => 'setRealTimeClass1ANi', - 'realTimeClass1ANiNonRti' => 'setRealTimeClass1ANiNonRti', - 'tax' => 'setTax', - 'taxNonRti' => 'setTaxNonRti', - 'netPay' => 'setNetPay', - 'adjustments' => 'setAdjustments', - 'notionalPay' => 'setNotionalPay', - 'additions' => 'setAdditions', - 'deductions' => 'setDeductions', - 'takeHomePay' => 'setTakeHomePay', - 'nonTaxOrNICPmt' => 'setNonTaxOrNICPmt', - 'itemsSubjectToClass1NIC' => 'setItemsSubjectToClass1NIC', - 'dednsFromNetPay' => 'setDednsFromNetPay', - 'tcpTcls' => 'setTcpTcls', - 'tcpPp' => 'setTcpPp', - 'tcpOp' => 'setTcpOp', + 'employerPensionContribution' => 'setEmployerPensionContribution', 'flexiDdDeath' => 'setFlexiDdDeath', 'flexiDdDeathNonTax' => 'setFlexiDdDeathNonTax', 'flexiDdPension' => 'setFlexiDdPension', + 'flexiDdPensionCommencementExcess' => 'setFlexiDdPensionCommencementExcess', + 'flexiDdPensionCommencementExcessNonTax' => 'setFlexiDdPensionCommencementExcessNonTax', 'flexiDdPensionNonTax' => 'setFlexiDdPensionNonTax', 'flexiDdSeriousIllHealth' => 'setFlexiDdSeriousIllHealth', 'flexiDdSeriousIllHealthNonTax' => 'setFlexiDdSeriousIllHealthNonTax', 'flexiDdStandAloneLumpSum' => 'setFlexiDdStandAloneLumpSum', 'flexiDdStandAloneLumpSumNonTax' => 'setFlexiDdStandAloneLumpSumNonTax', - 'flexiDdPensionCommencementExcess' => 'setFlexiDdPensionCommencementExcess', - 'flexiDdPensionCommencementExcessNonTax' => 'setFlexiDdPensionCommencementExcessNonTax', - 'smp' => 'setSmp', - 'smpNonRti' => 'setSmpNonRti', - 'spp' => 'setSpp', - 'sppNonRti' => 'setSppNonRti', + 'foreignTaxAmount' => 'setForeignTaxAmount', + 'foreignTaxAmountReclaimed' => 'setForeignTaxAmountReclaimed', + 'gross' => 'setGross', + 'grossForNi' => 'setGrossForNi', + 'grossForNiNonRti' => 'setGrossForNiNonRti', + 'grossForTax' => 'setGrossForTax', + 'grossNotSubjectToEmployersNi' => 'setGrossNotSubjectToEmployersNi', + 'grossNotSubjectToEmployersNiNonRti' => 'setGrossNotSubjectToEmployersNiNonRti', + 'itemsSubjectToClass1NIC' => 'setItemsSubjectToClass1NIC', + 'leavers' => 'setLeavers', + 'mapsMiles' => 'setMapsMiles', + 'netPay' => 'setNetPay', + 'newEmployeesInCurrentSupplementaryPayRun' => 'setNewEmployeesInCurrentSupplementaryPayRun', + 'nilPaid' => 'setNilPaid', + 'nonTaxOrNICPmt' => 'setNonTaxOrNICPmt', + 'nonTierablePay' => 'setNonTierablePay', + 'notionalPay' => 'setNotionalPay', + 'p45Gross' => 'setP45Gross', + 'p45Tax' => 'setP45Tax', + 'paymentAfterLeaving' => 'setPaymentAfterLeaving', + 'pbik' => 'setPbik', + 'pensionableEarnings' => 'setPensionableEarnings', + 'pensionablePay' => 'setPensionablePay', + 'postgradLoanRecovered' => 'setPostgradLoanRecovered', + 'postgradLoanRecoveredNonRti' => 'setPostgradLoanRecoveredNonRti', + 'realTimeClass1ANi' => 'setRealTimeClass1ANi', + 'realTimeClass1ANiNonRti' => 'setRealTimeClass1ANiNonRti', + 'recoverableAmounts' => 'setRecoverableAmounts', 'sap' => 'setSap', 'sapNonRti' => 'setSapNonRti', 'shpp' => 'setShpp', 'shppNonRti' => 'setShppNonRti', - 'spbp' => 'setSpbp', - 'spbpNonRti' => 'setSpbpNonRti', + 'smp' => 'setSmp', + 'smpNonRti' => 'setSmpNonRti', 'sncp' => 'setSncp', 'sncpNonRti' => 'setSncpNonRti', + 'spbp' => 'setSpbp', + 'spbpNonRti' => 'setSpbpNonRti', + 'spp' => 'setSpp', + 'sppNonRti' => 'setSppNonRti', 'ssp' => 'setSsp', 'sspNonRti' => 'setSspNonRti', + 'starters' => 'setStarters', 'studentLoanRecovered' => 'setStudentLoanRecovered', 'studentLoanRecoveredNonRti' => 'setStudentLoanRecoveredNonRti', - 'postgradLoanRecovered' => 'setPostgradLoanRecovered', - 'postgradLoanRecoveredNonRti' => 'setPostgradLoanRecoveredNonRti', - 'pensionableEarnings' => 'setPensionableEarnings', - 'pensionablePay' => 'setPensionablePay', - 'nonTierablePay' => 'setNonTierablePay', - 'employeePensionContribution' => 'setEmployeePensionContribution', - 'employeePensionContributionAvc' => 'setEmployeePensionContributionAvc', - 'employerPensionContribution' => 'setEmployerPensionContribution', - 'empeePenContribnsNotPaid' => 'setEmpeePenContribnsNotPaid', - 'empeePenContribnsPaid' => 'setEmpeePenContribnsPaid', - 'attachmentOrderDeductions' => 'setAttachmentOrderDeductions', - 'cisDeduction' => 'setCisDeduction', - 'cisVat' => 'setCisVat', - 'cisUmbrellaFee' => 'setCisUmbrellaFee', - 'cisUmbrellaFeePostTax' => 'setCisUmbrellaFeePostTax', - 'pbik' => 'setPbik', - 'mapsMiles' => 'setMapsMiles', - 'foreignTaxAmount' => 'setForeignTaxAmount', - 'foreignTaxAmountReclaimed' => 'setForeignTaxAmountReclaimed', - 'umbrellaFee' => 'setUmbrellaFee', - 'appLevyDeduction' => 'setAppLevyDeduction', - 'paymentAfterLeaving' => 'setPaymentAfterLeaving', + 'takeHomePay' => 'setTakeHomePay', + 'tax' => 'setTax', + 'taxNonRti' => 'setTaxNonRti', 'taxOnPaymentAfterLeaving' => 'setTaxOnPaymentAfterLeaving', - 'nilPaid' => 'setNilPaid', - 'leavers' => 'setLeavers', - 'starters' => 'setStarters', - 'p45Gross' => 'setP45Gross', - 'p45Tax' => 'setP45Tax', + 'tcpOp' => 'setTcpOp', + 'tcpPp' => 'setTcpPp', + 'tcpTcls' => 'setTcpTcls', 'totalCost' => 'setTotalCost', - 'recoverableAmounts' => 'setRecoverableAmounts' + 'umbrellaFee' => 'setUmbrellaFee' ]; /** @@ -600,90 +605,91 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'additions' => 'getAdditions', + 'adjustments' => 'getAdjustments', + 'appLevyDeduction' => 'getAppLevyDeduction', + 'attachmentOrderDeductions' => 'getAttachmentOrderDeductions', 'basicPay' => 'getBasicPay', - 'gross' => 'getGross', - 'grossForNi' => 'getGrossForNi', - 'grossForNiNonRti' => 'getGrossForNiNonRti', - 'grossNotSubjectToEmployersNi' => 'getGrossNotSubjectToEmployersNi', - 'grossNotSubjectToEmployersNiNonRti' => 'getGrossNotSubjectToEmployersNiNonRti', - 'grossForTax' => 'getGrossForTax', - 'employerNi' => 'getEmployerNi', - 'employerNiNonRti' => 'getEmployerNiNonRti', + 'cisDeduction' => 'getCisDeduction', + 'cisUmbrellaFee' => 'getCisUmbrellaFee', + 'cisUmbrellaFeePostTax' => 'getCisUmbrellaFeePostTax', + 'cisVat' => 'getCisVat', + 'dednsFromNetPay' => 'getDednsFromNetPay', + 'deductions' => 'getDeductions', + 'empeePenContribnsNotPaid' => 'getEmpeePenContribnsNotPaid', + 'empeePenContribnsPaid' => 'getEmpeePenContribnsPaid', 'employeeNi' => 'getEmployeeNi', 'employeeNiNonRti' => 'getEmployeeNiNonRti', + 'employeePensionContribution' => 'getEmployeePensionContribution', + 'employeePensionContributionAvc' => 'getEmployeePensionContributionAvc', + 'employerNi' => 'getEmployerNi', + 'employerNiNonRti' => 'getEmployerNiNonRti', 'employerNiOffPayroll' => 'getEmployerNiOffPayroll', - 'realTimeClass1ANi' => 'getRealTimeClass1ANi', - 'realTimeClass1ANiNonRti' => 'getRealTimeClass1ANiNonRti', - 'tax' => 'getTax', - 'taxNonRti' => 'getTaxNonRti', - 'netPay' => 'getNetPay', - 'adjustments' => 'getAdjustments', - 'notionalPay' => 'getNotionalPay', - 'additions' => 'getAdditions', - 'deductions' => 'getDeductions', - 'takeHomePay' => 'getTakeHomePay', - 'nonTaxOrNICPmt' => 'getNonTaxOrNICPmt', - 'itemsSubjectToClass1NIC' => 'getItemsSubjectToClass1NIC', - 'dednsFromNetPay' => 'getDednsFromNetPay', - 'tcpTcls' => 'getTcpTcls', - 'tcpPp' => 'getTcpPp', - 'tcpOp' => 'getTcpOp', + 'employerPensionContribution' => 'getEmployerPensionContribution', 'flexiDdDeath' => 'getFlexiDdDeath', 'flexiDdDeathNonTax' => 'getFlexiDdDeathNonTax', 'flexiDdPension' => 'getFlexiDdPension', + 'flexiDdPensionCommencementExcess' => 'getFlexiDdPensionCommencementExcess', + 'flexiDdPensionCommencementExcessNonTax' => 'getFlexiDdPensionCommencementExcessNonTax', 'flexiDdPensionNonTax' => 'getFlexiDdPensionNonTax', 'flexiDdSeriousIllHealth' => 'getFlexiDdSeriousIllHealth', 'flexiDdSeriousIllHealthNonTax' => 'getFlexiDdSeriousIllHealthNonTax', 'flexiDdStandAloneLumpSum' => 'getFlexiDdStandAloneLumpSum', 'flexiDdStandAloneLumpSumNonTax' => 'getFlexiDdStandAloneLumpSumNonTax', - 'flexiDdPensionCommencementExcess' => 'getFlexiDdPensionCommencementExcess', - 'flexiDdPensionCommencementExcessNonTax' => 'getFlexiDdPensionCommencementExcessNonTax', - 'smp' => 'getSmp', - 'smpNonRti' => 'getSmpNonRti', - 'spp' => 'getSpp', - 'sppNonRti' => 'getSppNonRti', + 'foreignTaxAmount' => 'getForeignTaxAmount', + 'foreignTaxAmountReclaimed' => 'getForeignTaxAmountReclaimed', + 'gross' => 'getGross', + 'grossForNi' => 'getGrossForNi', + 'grossForNiNonRti' => 'getGrossForNiNonRti', + 'grossForTax' => 'getGrossForTax', + 'grossNotSubjectToEmployersNi' => 'getGrossNotSubjectToEmployersNi', + 'grossNotSubjectToEmployersNiNonRti' => 'getGrossNotSubjectToEmployersNiNonRti', + 'itemsSubjectToClass1NIC' => 'getItemsSubjectToClass1NIC', + 'leavers' => 'getLeavers', + 'mapsMiles' => 'getMapsMiles', + 'netPay' => 'getNetPay', + 'newEmployeesInCurrentSupplementaryPayRun' => 'getNewEmployeesInCurrentSupplementaryPayRun', + 'nilPaid' => 'getNilPaid', + 'nonTaxOrNICPmt' => 'getNonTaxOrNICPmt', + 'nonTierablePay' => 'getNonTierablePay', + 'notionalPay' => 'getNotionalPay', + 'p45Gross' => 'getP45Gross', + 'p45Tax' => 'getP45Tax', + 'paymentAfterLeaving' => 'getPaymentAfterLeaving', + 'pbik' => 'getPbik', + 'pensionableEarnings' => 'getPensionableEarnings', + 'pensionablePay' => 'getPensionablePay', + 'postgradLoanRecovered' => 'getPostgradLoanRecovered', + 'postgradLoanRecoveredNonRti' => 'getPostgradLoanRecoveredNonRti', + 'realTimeClass1ANi' => 'getRealTimeClass1ANi', + 'realTimeClass1ANiNonRti' => 'getRealTimeClass1ANiNonRti', + 'recoverableAmounts' => 'getRecoverableAmounts', 'sap' => 'getSap', 'sapNonRti' => 'getSapNonRti', 'shpp' => 'getShpp', 'shppNonRti' => 'getShppNonRti', - 'spbp' => 'getSpbp', - 'spbpNonRti' => 'getSpbpNonRti', + 'smp' => 'getSmp', + 'smpNonRti' => 'getSmpNonRti', 'sncp' => 'getSncp', 'sncpNonRti' => 'getSncpNonRti', + 'spbp' => 'getSpbp', + 'spbpNonRti' => 'getSpbpNonRti', + 'spp' => 'getSpp', + 'sppNonRti' => 'getSppNonRti', 'ssp' => 'getSsp', 'sspNonRti' => 'getSspNonRti', + 'starters' => 'getStarters', 'studentLoanRecovered' => 'getStudentLoanRecovered', 'studentLoanRecoveredNonRti' => 'getStudentLoanRecoveredNonRti', - 'postgradLoanRecovered' => 'getPostgradLoanRecovered', - 'postgradLoanRecoveredNonRti' => 'getPostgradLoanRecoveredNonRti', - 'pensionableEarnings' => 'getPensionableEarnings', - 'pensionablePay' => 'getPensionablePay', - 'nonTierablePay' => 'getNonTierablePay', - 'employeePensionContribution' => 'getEmployeePensionContribution', - 'employeePensionContributionAvc' => 'getEmployeePensionContributionAvc', - 'employerPensionContribution' => 'getEmployerPensionContribution', - 'empeePenContribnsNotPaid' => 'getEmpeePenContribnsNotPaid', - 'empeePenContribnsPaid' => 'getEmpeePenContribnsPaid', - 'attachmentOrderDeductions' => 'getAttachmentOrderDeductions', - 'cisDeduction' => 'getCisDeduction', - 'cisVat' => 'getCisVat', - 'cisUmbrellaFee' => 'getCisUmbrellaFee', - 'cisUmbrellaFeePostTax' => 'getCisUmbrellaFeePostTax', - 'pbik' => 'getPbik', - 'mapsMiles' => 'getMapsMiles', - 'foreignTaxAmount' => 'getForeignTaxAmount', - 'foreignTaxAmountReclaimed' => 'getForeignTaxAmountReclaimed', - 'umbrellaFee' => 'getUmbrellaFee', - 'appLevyDeduction' => 'getAppLevyDeduction', - 'paymentAfterLeaving' => 'getPaymentAfterLeaving', + 'takeHomePay' => 'getTakeHomePay', + 'tax' => 'getTax', + 'taxNonRti' => 'getTaxNonRti', 'taxOnPaymentAfterLeaving' => 'getTaxOnPaymentAfterLeaving', - 'nilPaid' => 'getNilPaid', - 'leavers' => 'getLeavers', - 'starters' => 'getStarters', - 'p45Gross' => 'getP45Gross', - 'p45Tax' => 'getP45Tax', + 'tcpOp' => 'getTcpOp', + 'tcpPp' => 'getTcpPp', + 'tcpTcls' => 'getTcpTcls', 'totalCost' => 'getTotalCost', - 'recoverableAmounts' => 'getRecoverableAmounts' + 'umbrellaFee' => 'getUmbrellaFee' ]; /** @@ -742,886 +748,698 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('additions', $data ?? [], null); + $this->setIfExists('adjustments', $data ?? [], null); + $this->setIfExists('appLevyDeduction', $data ?? [], null); + $this->setIfExists('attachmentOrderDeductions', $data ?? [], null); $this->setIfExists('basicPay', $data ?? [], null); - $this->setIfExists('gross', $data ?? [], null); - $this->setIfExists('grossForNi', $data ?? [], null); - $this->setIfExists('grossForNiNonRti', $data ?? [], null); - $this->setIfExists('grossNotSubjectToEmployersNi', $data ?? [], null); - $this->setIfExists('grossNotSubjectToEmployersNiNonRti', $data ?? [], null); - $this->setIfExists('grossForTax', $data ?? [], null); - $this->setIfExists('employerNi', $data ?? [], null); - $this->setIfExists('employerNiNonRti', $data ?? [], null); + $this->setIfExists('cisDeduction', $data ?? [], null); + $this->setIfExists('cisUmbrellaFee', $data ?? [], null); + $this->setIfExists('cisUmbrellaFeePostTax', $data ?? [], null); + $this->setIfExists('cisVat', $data ?? [], null); + $this->setIfExists('dednsFromNetPay', $data ?? [], null); + $this->setIfExists('deductions', $data ?? [], null); + $this->setIfExists('empeePenContribnsNotPaid', $data ?? [], null); + $this->setIfExists('empeePenContribnsPaid', $data ?? [], null); $this->setIfExists('employeeNi', $data ?? [], null); $this->setIfExists('employeeNiNonRti', $data ?? [], null); + $this->setIfExists('employeePensionContribution', $data ?? [], null); + $this->setIfExists('employeePensionContributionAvc', $data ?? [], null); + $this->setIfExists('employerNi', $data ?? [], null); + $this->setIfExists('employerNiNonRti', $data ?? [], null); $this->setIfExists('employerNiOffPayroll', $data ?? [], null); - $this->setIfExists('realTimeClass1ANi', $data ?? [], null); - $this->setIfExists('realTimeClass1ANiNonRti', $data ?? [], null); - $this->setIfExists('tax', $data ?? [], null); - $this->setIfExists('taxNonRti', $data ?? [], null); - $this->setIfExists('netPay', $data ?? [], null); - $this->setIfExists('adjustments', $data ?? [], null); - $this->setIfExists('notionalPay', $data ?? [], null); - $this->setIfExists('additions', $data ?? [], null); - $this->setIfExists('deductions', $data ?? [], null); - $this->setIfExists('takeHomePay', $data ?? [], null); - $this->setIfExists('nonTaxOrNICPmt', $data ?? [], null); - $this->setIfExists('itemsSubjectToClass1NIC', $data ?? [], null); - $this->setIfExists('dednsFromNetPay', $data ?? [], null); - $this->setIfExists('tcpTcls', $data ?? [], null); - $this->setIfExists('tcpPp', $data ?? [], null); - $this->setIfExists('tcpOp', $data ?? [], null); + $this->setIfExists('employerPensionContribution', $data ?? [], null); $this->setIfExists('flexiDdDeath', $data ?? [], null); $this->setIfExists('flexiDdDeathNonTax', $data ?? [], null); $this->setIfExists('flexiDdPension', $data ?? [], null); + $this->setIfExists('flexiDdPensionCommencementExcess', $data ?? [], null); + $this->setIfExists('flexiDdPensionCommencementExcessNonTax', $data ?? [], null); $this->setIfExists('flexiDdPensionNonTax', $data ?? [], null); $this->setIfExists('flexiDdSeriousIllHealth', $data ?? [], null); $this->setIfExists('flexiDdSeriousIllHealthNonTax', $data ?? [], null); $this->setIfExists('flexiDdStandAloneLumpSum', $data ?? [], null); $this->setIfExists('flexiDdStandAloneLumpSumNonTax', $data ?? [], null); - $this->setIfExists('flexiDdPensionCommencementExcess', $data ?? [], null); - $this->setIfExists('flexiDdPensionCommencementExcessNonTax', $data ?? [], null); - $this->setIfExists('smp', $data ?? [], null); - $this->setIfExists('smpNonRti', $data ?? [], null); - $this->setIfExists('spp', $data ?? [], null); - $this->setIfExists('sppNonRti', $data ?? [], null); + $this->setIfExists('foreignTaxAmount', $data ?? [], null); + $this->setIfExists('foreignTaxAmountReclaimed', $data ?? [], null); + $this->setIfExists('gross', $data ?? [], null); + $this->setIfExists('grossForNi', $data ?? [], null); + $this->setIfExists('grossForNiNonRti', $data ?? [], null); + $this->setIfExists('grossForTax', $data ?? [], null); + $this->setIfExists('grossNotSubjectToEmployersNi', $data ?? [], null); + $this->setIfExists('grossNotSubjectToEmployersNiNonRti', $data ?? [], null); + $this->setIfExists('itemsSubjectToClass1NIC', $data ?? [], null); + $this->setIfExists('leavers', $data ?? [], null); + $this->setIfExists('mapsMiles', $data ?? [], null); + $this->setIfExists('netPay', $data ?? [], null); + $this->setIfExists('newEmployeesInCurrentSupplementaryPayRun', $data ?? [], null); + $this->setIfExists('nilPaid', $data ?? [], null); + $this->setIfExists('nonTaxOrNICPmt', $data ?? [], null); + $this->setIfExists('nonTierablePay', $data ?? [], null); + $this->setIfExists('notionalPay', $data ?? [], null); + $this->setIfExists('p45Gross', $data ?? [], null); + $this->setIfExists('p45Tax', $data ?? [], null); + $this->setIfExists('paymentAfterLeaving', $data ?? [], null); + $this->setIfExists('pbik', $data ?? [], null); + $this->setIfExists('pensionableEarnings', $data ?? [], null); + $this->setIfExists('pensionablePay', $data ?? [], null); + $this->setIfExists('postgradLoanRecovered', $data ?? [], null); + $this->setIfExists('postgradLoanRecoveredNonRti', $data ?? [], null); + $this->setIfExists('realTimeClass1ANi', $data ?? [], null); + $this->setIfExists('realTimeClass1ANiNonRti', $data ?? [], null); + $this->setIfExists('recoverableAmounts', $data ?? [], null); $this->setIfExists('sap', $data ?? [], null); $this->setIfExists('sapNonRti', $data ?? [], null); $this->setIfExists('shpp', $data ?? [], null); $this->setIfExists('shppNonRti', $data ?? [], null); - $this->setIfExists('spbp', $data ?? [], null); - $this->setIfExists('spbpNonRti', $data ?? [], null); + $this->setIfExists('smp', $data ?? [], null); + $this->setIfExists('smpNonRti', $data ?? [], null); $this->setIfExists('sncp', $data ?? [], null); $this->setIfExists('sncpNonRti', $data ?? [], null); + $this->setIfExists('spbp', $data ?? [], null); + $this->setIfExists('spbpNonRti', $data ?? [], null); + $this->setIfExists('spp', $data ?? [], null); + $this->setIfExists('sppNonRti', $data ?? [], null); $this->setIfExists('ssp', $data ?? [], null); $this->setIfExists('sspNonRti', $data ?? [], null); + $this->setIfExists('starters', $data ?? [], null); $this->setIfExists('studentLoanRecovered', $data ?? [], null); $this->setIfExists('studentLoanRecoveredNonRti', $data ?? [], null); - $this->setIfExists('postgradLoanRecovered', $data ?? [], null); - $this->setIfExists('postgradLoanRecoveredNonRti', $data ?? [], null); - $this->setIfExists('pensionableEarnings', $data ?? [], null); - $this->setIfExists('pensionablePay', $data ?? [], null); - $this->setIfExists('nonTierablePay', $data ?? [], null); - $this->setIfExists('employeePensionContribution', $data ?? [], null); - $this->setIfExists('employeePensionContributionAvc', $data ?? [], null); - $this->setIfExists('employerPensionContribution', $data ?? [], null); - $this->setIfExists('empeePenContribnsNotPaid', $data ?? [], null); - $this->setIfExists('empeePenContribnsPaid', $data ?? [], null); - $this->setIfExists('attachmentOrderDeductions', $data ?? [], null); - $this->setIfExists('cisDeduction', $data ?? [], null); - $this->setIfExists('cisVat', $data ?? [], null); - $this->setIfExists('cisUmbrellaFee', $data ?? [], null); - $this->setIfExists('cisUmbrellaFeePostTax', $data ?? [], null); - $this->setIfExists('pbik', $data ?? [], null); - $this->setIfExists('mapsMiles', $data ?? [], null); - $this->setIfExists('foreignTaxAmount', $data ?? [], null); - $this->setIfExists('foreignTaxAmountReclaimed', $data ?? [], null); - $this->setIfExists('umbrellaFee', $data ?? [], null); - $this->setIfExists('appLevyDeduction', $data ?? [], null); - $this->setIfExists('paymentAfterLeaving', $data ?? [], null); - $this->setIfExists('taxOnPaymentAfterLeaving', $data ?? [], null); - $this->setIfExists('nilPaid', $data ?? [], null); - $this->setIfExists('leavers', $data ?? [], null); - $this->setIfExists('starters', $data ?? [], null); - $this->setIfExists('p45Gross', $data ?? [], null); - $this->setIfExists('p45Tax', $data ?? [], null); - $this->setIfExists('totalCost', $data ?? [], null); - $this->setIfExists('recoverableAmounts', $data ?? [], null); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return string[] invalid properties with reasons - */ - public function listInvalidProperties(): array - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid(): bool - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets basicPay - * - * @return float|null - */ - public function getBasicPay(): ?float - { - return $this->container['basicPay']; - } - - /** - * Sets basicPay - * - * @param float|null $basicPay [readonly] The amount to be paid to this Employee as a result of the PayOptions that have been set - * - * @return $this - */ - public function setBasicPay(?float $basicPay): static - { - if (is_null($basicPay)) { - throw new InvalidArgumentException('non-nullable basicPay cannot be null'); - } - $this->container['basicPay'] = $basicPay; - - return $this; - } - - /** - * Gets gross - * - * @return float|null - */ - public function getGross(): ?float - { - return $this->container['gross']; - } - - /** - * Sets gross - * - * @param float|null $gross [readonly] Gross pay - * - * @return $this - */ - public function setGross(?float $gross): static - { - if (is_null($gross)) { - throw new InvalidArgumentException('non-nullable gross cannot be null'); - } - $this->container['gross'] = $gross; - - return $this; - } - - /** - * Gets grossForNi - * - * @return float|null - */ - public function getGrossForNi(): ?float - { - return $this->container['grossForNi']; - } - - /** - * Sets grossForNi - * - * @param float|null $grossForNi [readonly] The amount of the Gross that is subject to NI - * - * @return $this - */ - public function setGrossForNi(?float $grossForNi): static - { - if (is_null($grossForNi)) { - throw new InvalidArgumentException('non-nullable grossForNi cannot be null'); - } - $this->container['grossForNi'] = $grossForNi; - - return $this; - } - - /** - * Gets grossForNiNonRti - * - * @return float|null - */ - public function getGrossForNiNonRti(): ?float - { - return $this->container['grossForNiNonRti']; - } - - /** - * Sets grossForNiNonRti - * - * @param float|null $grossForNiNonRti [readonly] The amount of the Gross that is subject to NI but excluded from RTI - * - * @return $this - */ - public function setGrossForNiNonRti(?float $grossForNiNonRti): static - { - if (is_null($grossForNiNonRti)) { - throw new InvalidArgumentException('non-nullable grossForNiNonRti cannot be null'); - } - $this->container['grossForNiNonRti'] = $grossForNiNonRti; - - return $this; - } - - /** - * Gets grossNotSubjectToEmployersNi - * - * @return float|null - */ - public function getGrossNotSubjectToEmployersNi(): ?float - { - return $this->container['grossNotSubjectToEmployersNi']; + $this->setIfExists('takeHomePay', $data ?? [], null); + $this->setIfExists('tax', $data ?? [], null); + $this->setIfExists('taxNonRti', $data ?? [], null); + $this->setIfExists('taxOnPaymentAfterLeaving', $data ?? [], null); + $this->setIfExists('tcpOp', $data ?? [], null); + $this->setIfExists('tcpPp', $data ?? [], null); + $this->setIfExists('tcpTcls', $data ?? [], null); + $this->setIfExists('totalCost', $data ?? [], null); + $this->setIfExists('umbrellaFee', $data ?? [], null); } /** - * Sets grossNotSubjectToEmployersNi - * - * @param float|null $grossNotSubjectToEmployersNi [readonly] The amount of the Gross that is not subject to Employers NI. This is the same as GrossForNI where the employees NI Table has an Er contribution - * - * @return $this - */ - public function setGrossNotSubjectToEmployersNi(?float $grossNotSubjectToEmployersNi): static + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void { - if (is_null($grossNotSubjectToEmployersNi)) { - throw new InvalidArgumentException('non-nullable grossNotSubjectToEmployersNi cannot be null'); + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; } - $this->container['grossNotSubjectToEmployersNi'] = $grossNotSubjectToEmployersNi; - - return $this; - } - /** - * Gets grossNotSubjectToEmployersNiNonRti - * - * @return float|null - */ - public function getGrossNotSubjectToEmployersNiNonRti(): ?float - { - return $this->container['grossNotSubjectToEmployersNiNonRti']; + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; } /** - * Sets grossNotSubjectToEmployersNiNonRti - * - * @param float|null $grossNotSubjectToEmployersNiNonRti [readonly] The amount of the Gross that is not subject to Employers NI. This is the same as GrossForNI where the employees NI Table has an Er contribution This is the amount that is excluded from RTI + * Show all the invalid properties with reasons. * - * @return $this + * @return string[] invalid properties with reasons */ - public function setGrossNotSubjectToEmployersNiNonRti(?float $grossNotSubjectToEmployersNiNonRti): static + public function listInvalidProperties(): array { - if (is_null($grossNotSubjectToEmployersNiNonRti)) { - throw new InvalidArgumentException('non-nullable grossNotSubjectToEmployersNiNonRti cannot be null'); - } - $this->container['grossNotSubjectToEmployersNiNonRti'] = $grossNotSubjectToEmployersNiNonRti; + $invalidProperties = []; - return $this; + return $invalidProperties; } /** - * Gets grossForTax + * Validate all the properties in the model + * return true if all passed * - * @return float|null + * @return bool True if all properties are valid */ - public function getGrossForTax(): ?float + public function valid(): bool { - return $this->container['grossForTax']; + return count($this->listInvalidProperties()) === 0; } - /** - * Sets grossForTax - * - * @param float|null $grossForTax [readonly] The amount of the Gross that is subject to PAYE - * - * @return $this - */ - public function setGrossForTax(?float $grossForTax): static - { - if (is_null($grossForTax)) { - throw new InvalidArgumentException('non-nullable grossForTax cannot be null'); - } - $this->container['grossForTax'] = $grossForTax; - - return $this; - } /** - * Gets employerNi + * Gets additions * * @return float|null */ - public function getEmployerNi(): ?float + public function getAdditions(): ?float { - return $this->container['employerNi']; + return $this->container['additions']; } /** - * Sets employerNi + * Sets additions * - * @param float|null $employerNi [readonly] + * @param float|null $additions The value of all additions. This minus Deductions should equal TakeHomePay * * @return $this */ - public function setEmployerNi(?float $employerNi): static + public function setAdditions(?float $additions): static { - if (is_null($employerNi)) { - throw new InvalidArgumentException('non-nullable employerNi cannot be null'); + if (is_null($additions)) { + throw new InvalidArgumentException('non-nullable additions cannot be null'); } - $this->container['employerNi'] = $employerNi; + $this->container['additions'] = $additions; return $this; } /** - * Gets employerNiNonRti + * Gets adjustments * * @return float|null */ - public function getEmployerNiNonRti(): ?float + public function getAdjustments(): ?float { - return $this->container['employerNiNonRti']; + return $this->container['adjustments']; } /** - * Sets employerNiNonRti + * Sets adjustments * - * @param float|null $employerNiNonRti [readonly] Employer NI excluded from RTI + * @param float|null $adjustments [readonly] The value of adjustments made to the Net Pay (Non taxable/NIable additions/deductions) * * @return $this */ - public function setEmployerNiNonRti(?float $employerNiNonRti): static + public function setAdjustments(?float $adjustments): static { - if (is_null($employerNiNonRti)) { - throw new InvalidArgumentException('non-nullable employerNiNonRti cannot be null'); + if (is_null($adjustments)) { + throw new InvalidArgumentException('non-nullable adjustments cannot be null'); } - $this->container['employerNiNonRti'] = $employerNiNonRti; + $this->container['adjustments'] = $adjustments; return $this; } /** - * Gets employeeNi + * Gets appLevyDeduction * * @return float|null */ - public function getEmployeeNi(): ?float + public function getAppLevyDeduction(): ?float { - return $this->container['employeeNi']; + return $this->container['appLevyDeduction']; } /** - * Sets employeeNi + * Sets appLevyDeduction * - * @param float|null $employeeNi [readonly] + * @param float|null $appLevyDeduction [readonly] Value of any Apprenticeship Levy fee deducted for processing the umbrella payment * * @return $this */ - public function setEmployeeNi(?float $employeeNi): static + public function setAppLevyDeduction(?float $appLevyDeduction): static { - if (is_null($employeeNi)) { - throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); + if (is_null($appLevyDeduction)) { + throw new InvalidArgumentException('non-nullable appLevyDeduction cannot be null'); } - $this->container['employeeNi'] = $employeeNi; + $this->container['appLevyDeduction'] = $appLevyDeduction; return $this; } /** - * Gets employeeNiNonRti + * Gets attachmentOrderDeductions * * @return float|null */ - public function getEmployeeNiNonRti(): ?float + public function getAttachmentOrderDeductions(): ?float { - return $this->container['employeeNiNonRti']; + return $this->container['attachmentOrderDeductions']; } /** - * Sets employeeNiNonRti + * Sets attachmentOrderDeductions * - * @param float|null $employeeNiNonRti [readonly] Employee NI excluded from RTI + * @param float|null $attachmentOrderDeductions [readonly] Value of deductions made due to AttachmentOrders * * @return $this */ - public function setEmployeeNiNonRti(?float $employeeNiNonRti): static + public function setAttachmentOrderDeductions(?float $attachmentOrderDeductions): static { - if (is_null($employeeNiNonRti)) { - throw new InvalidArgumentException('non-nullable employeeNiNonRti cannot be null'); + if (is_null($attachmentOrderDeductions)) { + throw new InvalidArgumentException('non-nullable attachmentOrderDeductions cannot be null'); } - $this->container['employeeNiNonRti'] = $employeeNiNonRti; + $this->container['attachmentOrderDeductions'] = $attachmentOrderDeductions; return $this; } /** - * Gets employerNiOffPayroll + * Gets basicPay * * @return float|null */ - public function getEmployerNiOffPayroll(): ?float + public function getBasicPay(): ?float { - return $this->container['employerNiOffPayroll']; + return $this->container['basicPay']; } /** - * Sets employerNiOffPayroll + * Sets basicPay * - * @param float|null $employerNiOffPayroll [readonly] The amount included in EmployerNi that is in relation to Off-Payroll Workers + * @param float|null $basicPay [readonly] The amount to be paid to this Employee as a result of the PayOptions that have been set * * @return $this */ - public function setEmployerNiOffPayroll(?float $employerNiOffPayroll): static + public function setBasicPay(?float $basicPay): static { - if (is_null($employerNiOffPayroll)) { - throw new InvalidArgumentException('non-nullable employerNiOffPayroll cannot be null'); + if (is_null($basicPay)) { + throw new InvalidArgumentException('non-nullable basicPay cannot be null'); } - $this->container['employerNiOffPayroll'] = $employerNiOffPayroll; + $this->container['basicPay'] = $basicPay; return $this; } /** - * Gets realTimeClass1ANi + * Gets cisDeduction * * @return float|null */ - public function getRealTimeClass1ANi(): ?float + public function getCisDeduction(): ?float { - return $this->container['realTimeClass1ANi']; + return $this->container['cisDeduction']; } /** - * Sets realTimeClass1ANi + * Sets cisDeduction * - * @param float|null $realTimeClass1ANi [readonly] + * @param float|null $cisDeduction [readonly] Value of any CIS Deduction made * * @return $this */ - public function setRealTimeClass1ANi(?float $realTimeClass1ANi): static + public function setCisDeduction(?float $cisDeduction): static { - if (is_null($realTimeClass1ANi)) { - throw new InvalidArgumentException('non-nullable realTimeClass1ANi cannot be null'); + if (is_null($cisDeduction)) { + throw new InvalidArgumentException('non-nullable cisDeduction cannot be null'); } - $this->container['realTimeClass1ANi'] = $realTimeClass1ANi; + $this->container['cisDeduction'] = $cisDeduction; return $this; } /** - * Gets realTimeClass1ANiNonRti + * Gets cisUmbrellaFee * * @return float|null */ - public function getRealTimeClass1ANiNonRti(): ?float + public function getCisUmbrellaFee(): ?float { - return $this->container['realTimeClass1ANiNonRti']; + return $this->container['cisUmbrellaFee']; } /** - * Sets realTimeClass1ANiNonRti + * Sets cisUmbrellaFee * - * @param float|null $realTimeClass1ANiNonRti [readonly] Real Time Class 1A NI excluded from RTI + * @param float|null $cisUmbrellaFee [readonly] Value of any pre-tax fee charged to the CIS Subcontractor for processing the payment * * @return $this */ - public function setRealTimeClass1ANiNonRti(?float $realTimeClass1ANiNonRti): static + public function setCisUmbrellaFee(?float $cisUmbrellaFee): static { - if (is_null($realTimeClass1ANiNonRti)) { - throw new InvalidArgumentException('non-nullable realTimeClass1ANiNonRti cannot be null'); + if (is_null($cisUmbrellaFee)) { + throw new InvalidArgumentException('non-nullable cisUmbrellaFee cannot be null'); } - $this->container['realTimeClass1ANiNonRti'] = $realTimeClass1ANiNonRti; + $this->container['cisUmbrellaFee'] = $cisUmbrellaFee; return $this; } /** - * Gets tax + * Gets cisUmbrellaFeePostTax * * @return float|null */ - public function getTax(): ?float + public function getCisUmbrellaFeePostTax(): ?float { - return $this->container['tax']; + return $this->container['cisUmbrellaFeePostTax']; } /** - * Sets tax + * Sets cisUmbrellaFeePostTax * - * @param float|null $tax [readonly] + * @param float|null $cisUmbrellaFeePostTax [readonly] Value of any post-tax fee charged to the CIS Subcontractor for processing the payment * * @return $this */ - public function setTax(?float $tax): static + public function setCisUmbrellaFeePostTax(?float $cisUmbrellaFeePostTax): static { - if (is_null($tax)) { - throw new InvalidArgumentException('non-nullable tax cannot be null'); + if (is_null($cisUmbrellaFeePostTax)) { + throw new InvalidArgumentException('non-nullable cisUmbrellaFeePostTax cannot be null'); } - $this->container['tax'] = $tax; + $this->container['cisUmbrellaFeePostTax'] = $cisUmbrellaFeePostTax; return $this; } /** - * Gets taxNonRti + * Gets cisVat * * @return float|null */ - public function getTaxNonRti(): ?float + public function getCisVat(): ?float { - return $this->container['taxNonRti']; + return $this->container['cisVat']; } /** - * Sets taxNonRti + * Sets cisVat * - * @param float|null $taxNonRti [readonly] Tax excluded from RTI + * @param float|null $cisVat [readonly] Value of any VAT paid to CIS Subcontractor * * @return $this */ - public function setTaxNonRti(?float $taxNonRti): static + public function setCisVat(?float $cisVat): static { - if (is_null($taxNonRti)) { - throw new InvalidArgumentException('non-nullable taxNonRti cannot be null'); + if (is_null($cisVat)) { + throw new InvalidArgumentException('non-nullable cisVat cannot be null'); } - $this->container['taxNonRti'] = $taxNonRti; + $this->container['cisVat'] = $cisVat; return $this; } /** - * Gets netPay + * Gets dednsFromNetPay * * @return float|null */ - public function getNetPay(): ?float + public function getDednsFromNetPay(): ?float { - return $this->container['netPay']; + return $this->container['dednsFromNetPay']; } /** - * Sets netPay + * Sets dednsFromNetPay * - * @param float|null $netPay [readonly] The Net Pay for this Employee + * @param float|null $dednsFromNetPay [readonly] The value of any deductions being made to the Net Pay for this Employee * * @return $this */ - public function setNetPay(?float $netPay): static - { - if (is_null($netPay)) { - throw new InvalidArgumentException('non-nullable netPay cannot be null'); + public function setDednsFromNetPay(?float $dednsFromNetPay): static + { + if (is_null($dednsFromNetPay)) { + throw new InvalidArgumentException('non-nullable dednsFromNetPay cannot be null'); } - $this->container['netPay'] = $netPay; + $this->container['dednsFromNetPay'] = $dednsFromNetPay; return $this; } /** - * Gets adjustments + * Gets deductions * * @return float|null */ - public function getAdjustments(): ?float + public function getDeductions(): ?float { - return $this->container['adjustments']; + return $this->container['deductions']; } /** - * Sets adjustments + * Sets deductions * - * @param float|null $adjustments [readonly] The value of adjustments made to the Net Pay (Non taxable/NIable additions/deductions) + * @param float|null $deductions The value of all deductions. Additions minus This value should equal TakeHomePay * * @return $this */ - public function setAdjustments(?float $adjustments): static + public function setDeductions(?float $deductions): static { - if (is_null($adjustments)) { - throw new InvalidArgumentException('non-nullable adjustments cannot be null'); + if (is_null($deductions)) { + throw new InvalidArgumentException('non-nullable deductions cannot be null'); } - $this->container['adjustments'] = $adjustments; + $this->container['deductions'] = $deductions; return $this; } /** - * Gets notionalPay + * Gets empeePenContribnsNotPaid * * @return float|null */ - public function getNotionalPay(): ?float + public function getEmpeePenContribnsNotPaid(): ?float { - return $this->container['notionalPay']; + return $this->container['empeePenContribnsNotPaid']; } /** - * Sets notionalPay + * Sets empeePenContribnsNotPaid * - * @param float|null $notionalPay [readonly] The value of adjustments that are of type notional. + * @param float|null $empeePenContribnsNotPaid [readonly] Value of employee pension contributions that are not paid under 'net pay arrangements', including any AVC * * @return $this */ - public function setNotionalPay(?float $notionalPay): static + public function setEmpeePenContribnsNotPaid(?float $empeePenContribnsNotPaid): static { - if (is_null($notionalPay)) { - throw new InvalidArgumentException('non-nullable notionalPay cannot be null'); + if (is_null($empeePenContribnsNotPaid)) { + throw new InvalidArgumentException('non-nullable empeePenContribnsNotPaid cannot be null'); } - $this->container['notionalPay'] = $notionalPay; + $this->container['empeePenContribnsNotPaid'] = $empeePenContribnsNotPaid; return $this; } /** - * Gets additions + * Gets empeePenContribnsPaid * * @return float|null */ - public function getAdditions(): ?float + public function getEmpeePenContribnsPaid(): ?float { - return $this->container['additions']; + return $this->container['empeePenContribnsPaid']; } /** - * Sets additions + * Sets empeePenContribnsPaid * - * @param float|null $additions The value of all additions. This minus Deductions should equal TakeHomePay + * @param float|null $empeePenContribnsPaid [readonly] Value of employee pension contributions paid under 'net pay arrangements', including any AVC * * @return $this */ - public function setAdditions(?float $additions): static + public function setEmpeePenContribnsPaid(?float $empeePenContribnsPaid): static { - if (is_null($additions)) { - throw new InvalidArgumentException('non-nullable additions cannot be null'); + if (is_null($empeePenContribnsPaid)) { + throw new InvalidArgumentException('non-nullable empeePenContribnsPaid cannot be null'); } - $this->container['additions'] = $additions; + $this->container['empeePenContribnsPaid'] = $empeePenContribnsPaid; return $this; } /** - * Gets deductions + * Gets employeeNi * * @return float|null */ - public function getDeductions(): ?float + public function getEmployeeNi(): ?float { - return $this->container['deductions']; + return $this->container['employeeNi']; } /** - * Sets deductions + * Sets employeeNi * - * @param float|null $deductions The value of all deductions. Additions minus This value should equal TakeHomePay + * @param float|null $employeeNi [readonly] * * @return $this */ - public function setDeductions(?float $deductions): static + public function setEmployeeNi(?float $employeeNi): static { - if (is_null($deductions)) { - throw new InvalidArgumentException('non-nullable deductions cannot be null'); + if (is_null($employeeNi)) { + throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); } - $this->container['deductions'] = $deductions; + $this->container['employeeNi'] = $employeeNi; return $this; } /** - * Gets takeHomePay + * Gets employeeNiNonRti * * @return float|null */ - public function getTakeHomePay(): ?float + public function getEmployeeNiNonRti(): ?float { - return $this->container['takeHomePay']; + return $this->container['employeeNiNonRti']; } /** - * Sets takeHomePay + * Sets employeeNiNonRti * - * @param float|null $takeHomePay [readonly] The amount this Employee takes home + * @param float|null $employeeNiNonRti [readonly] Employee NI excluded from RTI * * @return $this */ - public function setTakeHomePay(?float $takeHomePay): static + public function setEmployeeNiNonRti(?float $employeeNiNonRti): static { - if (is_null($takeHomePay)) { - throw new InvalidArgumentException('non-nullable takeHomePay cannot be null'); + if (is_null($employeeNiNonRti)) { + throw new InvalidArgumentException('non-nullable employeeNiNonRti cannot be null'); } - $this->container['takeHomePay'] = $takeHomePay; + $this->container['employeeNiNonRti'] = $employeeNiNonRti; return $this; } /** - * Gets nonTaxOrNICPmt + * Gets employeePensionContribution * * @return float|null */ - public function getNonTaxOrNICPmt(): ?float + public function getEmployeePensionContribution(): ?float { - return $this->container['nonTaxOrNICPmt']; + return $this->container['employeePensionContribution']; } /** - * Sets nonTaxOrNICPmt + * Sets employeePensionContribution * - * @param float|null $nonTaxOrNICPmt [readonly] The value of any payments being made to this Employee that aren't being subjected to PAYE or NI + * @param float|null $employeePensionContribution [readonly] The value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions * * @return $this */ - public function setNonTaxOrNICPmt(?float $nonTaxOrNICPmt): static + public function setEmployeePensionContribution(?float $employeePensionContribution): static { - if (is_null($nonTaxOrNICPmt)) { - throw new InvalidArgumentException('non-nullable nonTaxOrNICPmt cannot be null'); + if (is_null($employeePensionContribution)) { + throw new InvalidArgumentException('non-nullable employeePensionContribution cannot be null'); } - $this->container['nonTaxOrNICPmt'] = $nonTaxOrNICPmt; + $this->container['employeePensionContribution'] = $employeePensionContribution; return $this; } /** - * Gets itemsSubjectToClass1NIC + * Gets employeePensionContributionAvc * * @return float|null */ - public function getItemsSubjectToClass1NIC(): ?float + public function getEmployeePensionContributionAvc(): ?float { - return $this->container['itemsSubjectToClass1NIC']; + return $this->container['employeePensionContributionAvc']; } /** - * Sets itemsSubjectToClass1NIC + * Sets employeePensionContributionAvc * - * @param float|null $itemsSubjectToClass1NIC [readonly] Items subject to Class 1 NIC but not taxed under PAYE regulations excluding pension contributions + * @param float|null $employeePensionContributionAvc [readonly] The value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution * * @return $this */ - public function setItemsSubjectToClass1NIC(?float $itemsSubjectToClass1NIC): static + public function setEmployeePensionContributionAvc(?float $employeePensionContributionAvc): static { - if (is_null($itemsSubjectToClass1NIC)) { - throw new InvalidArgumentException('non-nullable itemsSubjectToClass1NIC cannot be null'); + if (is_null($employeePensionContributionAvc)) { + throw new InvalidArgumentException('non-nullable employeePensionContributionAvc cannot be null'); } - $this->container['itemsSubjectToClass1NIC'] = $itemsSubjectToClass1NIC; + $this->container['employeePensionContributionAvc'] = $employeePensionContributionAvc; return $this; } /** - * Gets dednsFromNetPay + * Gets employerNi * * @return float|null */ - public function getDednsFromNetPay(): ?float + public function getEmployerNi(): ?float { - return $this->container['dednsFromNetPay']; + return $this->container['employerNi']; } /** - * Sets dednsFromNetPay + * Sets employerNi * - * @param float|null $dednsFromNetPay [readonly] The value of any deductions being made to the Net Pay for this Employee + * @param float|null $employerNi [readonly] * * @return $this */ - public function setDednsFromNetPay(?float $dednsFromNetPay): static + public function setEmployerNi(?float $employerNi): static { - if (is_null($dednsFromNetPay)) { - throw new InvalidArgumentException('non-nullable dednsFromNetPay cannot be null'); + if (is_null($employerNi)) { + throw new InvalidArgumentException('non-nullable employerNi cannot be null'); } - $this->container['dednsFromNetPay'] = $dednsFromNetPay; + $this->container['employerNi'] = $employerNi; return $this; } /** - * Gets tcpTcls + * Gets employerNiNonRti * * @return float|null */ - public function getTcpTcls(): ?float + public function getEmployerNiNonRti(): ?float { - return $this->container['tcpTcls']; + return $this->container['employerNiNonRti']; } /** - * Sets tcpTcls + * Sets employerNiNonRti * - * @param float|null $tcpTcls [readonly] Value of payments marked as Trivial Commutation Payment (A - TCLS) + * @param float|null $employerNiNonRti [readonly] Employer NI excluded from RTI * * @return $this */ - public function setTcpTcls(?float $tcpTcls): static + public function setEmployerNiNonRti(?float $employerNiNonRti): static { - if (is_null($tcpTcls)) { - throw new InvalidArgumentException('non-nullable tcpTcls cannot be null'); + if (is_null($employerNiNonRti)) { + throw new InvalidArgumentException('non-nullable employerNiNonRti cannot be null'); } - $this->container['tcpTcls'] = $tcpTcls; + $this->container['employerNiNonRti'] = $employerNiNonRti; return $this; } /** - * Gets tcpPp + * Gets employerNiOffPayroll * * @return float|null */ - public function getTcpPp(): ?float + public function getEmployerNiOffPayroll(): ?float { - return $this->container['tcpPp']; + return $this->container['employerNiOffPayroll']; } /** - * Sets tcpPp + * Sets employerNiOffPayroll * - * @param float|null $tcpPp [readonly] Value of payments marked as Trivial Commutation Payment (B - Personal Pension) + * @param float|null $employerNiOffPayroll [readonly] The amount included in EmployerNi that is in relation to Off-Payroll Workers * * @return $this */ - public function setTcpPp(?float $tcpPp): static + public function setEmployerNiOffPayroll(?float $employerNiOffPayroll): static { - if (is_null($tcpPp)) { - throw new InvalidArgumentException('non-nullable tcpPp cannot be null'); + if (is_null($employerNiOffPayroll)) { + throw new InvalidArgumentException('non-nullable employerNiOffPayroll cannot be null'); } - $this->container['tcpPp'] = $tcpPp; + $this->container['employerNiOffPayroll'] = $employerNiOffPayroll; return $this; } /** - * Gets tcpOp + * Gets employerPensionContribution * * @return float|null */ - public function getTcpOp(): ?float + public function getEmployerPensionContribution(): ?float { - return $this->container['tcpOp']; + return $this->container['employerPensionContribution']; } /** - * Sets tcpOp + * Sets employerPensionContribution * - * @param float|null $tcpOp [readonly] Value of payments marked as Trivial Commutation Payment (C - Occupational Pension) + * @param float|null $employerPensionContribution [readonly] The value of the Pension Contribution being made by the Employer for this Employee * * @return $this */ - public function setTcpOp(?float $tcpOp): static + public function setEmployerPensionContribution(?float $employerPensionContribution): static { - if (is_null($tcpOp)) { - throw new InvalidArgumentException('non-nullable tcpOp cannot be null'); + if (is_null($employerPensionContribution)) { + throw new InvalidArgumentException('non-nullable employerPensionContribution cannot be null'); } - $this->container['tcpOp'] = $tcpOp; + $this->container['employerPensionContribution'] = $employerPensionContribution; return $this; } @@ -1687,22 +1505,76 @@ public function setFlexiDdDeathNonTax(?float $flexiDdDeathNonTax): static */ public function getFlexiDdPension(): ?float { - return $this->container['flexiDdPension']; + return $this->container['flexiDdPension']; + } + + /** + * Sets flexiDdPension + * + * @param float|null $flexiDdPension [readonly] Value of payments marked as flexibly accessing pension (taxable) + * + * @return $this + */ + public function setFlexiDdPension(?float $flexiDdPension): static + { + if (is_null($flexiDdPension)) { + throw new InvalidArgumentException('non-nullable flexiDdPension cannot be null'); + } + $this->container['flexiDdPension'] = $flexiDdPension; + + return $this; + } + + /** + * Gets flexiDdPensionCommencementExcess + * + * @return float|null + */ + public function getFlexiDdPensionCommencementExcess(): ?float + { + return $this->container['flexiDdPensionCommencementExcess']; + } + + /** + * Sets flexiDdPensionCommencementExcess + * + * @param float|null $flexiDdPensionCommencementExcess [readonly] Value of payments marked as flexibly accessing pension commencement excess lump sum (taxable) + * + * @return $this + */ + public function setFlexiDdPensionCommencementExcess(?float $flexiDdPensionCommencementExcess): static + { + if (is_null($flexiDdPensionCommencementExcess)) { + throw new InvalidArgumentException('non-nullable flexiDdPensionCommencementExcess cannot be null'); + } + $this->container['flexiDdPensionCommencementExcess'] = $flexiDdPensionCommencementExcess; + + return $this; + } + + /** + * Gets flexiDdPensionCommencementExcessNonTax + * + * @return float|null + */ + public function getFlexiDdPensionCommencementExcessNonTax(): ?float + { + return $this->container['flexiDdPensionCommencementExcessNonTax']; } /** - * Sets flexiDdPension + * Sets flexiDdPensionCommencementExcessNonTax * - * @param float|null $flexiDdPension [readonly] Value of payments marked as flexibly accessing pension (taxable) + * @param float|null $flexiDdPensionCommencementExcessNonTax [readonly] Value of payments marked as flexibly accessing pension commencement excess lump sum (non taxable) * * @return $this */ - public function setFlexiDdPension(?float $flexiDdPension): static + public function setFlexiDdPensionCommencementExcessNonTax(?float $flexiDdPensionCommencementExcessNonTax): static { - if (is_null($flexiDdPension)) { - throw new InvalidArgumentException('non-nullable flexiDdPension cannot be null'); + if (is_null($flexiDdPensionCommencementExcessNonTax)) { + throw new InvalidArgumentException('non-nullable flexiDdPensionCommencementExcessNonTax cannot be null'); } - $this->container['flexiDdPension'] = $flexiDdPension; + $this->container['flexiDdPensionCommencementExcessNonTax'] = $flexiDdPensionCommencementExcessNonTax; return $this; } @@ -1843,487 +1715,636 @@ public function setFlexiDdStandAloneLumpSumNonTax(?float $flexiDdStandAloneLumpS } /** - * Gets flexiDdPensionCommencementExcess + * Gets foreignTaxAmount * * @return float|null */ - public function getFlexiDdPensionCommencementExcess(): ?float + public function getForeignTaxAmount(): ?float { - return $this->container['flexiDdPensionCommencementExcess']; + return $this->container['foreignTaxAmount']; } /** - * Sets flexiDdPensionCommencementExcess + * Sets foreignTaxAmount * - * @param float|null $flexiDdPensionCommencementExcess [readonly] Value of payments marked as flexibly accessing pension commencement excess lump sum (taxable) + * @param float|null $foreignTaxAmount [readonly] The amount paid for Foreign Tax Credits in this period * * @return $this */ - public function setFlexiDdPensionCommencementExcess(?float $flexiDdPensionCommencementExcess): static + public function setForeignTaxAmount(?float $foreignTaxAmount): static { - if (is_null($flexiDdPensionCommencementExcess)) { - throw new InvalidArgumentException('non-nullable flexiDdPensionCommencementExcess cannot be null'); + if (is_null($foreignTaxAmount)) { + throw new InvalidArgumentException('non-nullable foreignTaxAmount cannot be null'); } - $this->container['flexiDdPensionCommencementExcess'] = $flexiDdPensionCommencementExcess; + $this->container['foreignTaxAmount'] = $foreignTaxAmount; return $this; } /** - * Gets flexiDdPensionCommencementExcessNonTax + * Gets foreignTaxAmountReclaimed * * @return float|null */ - public function getFlexiDdPensionCommencementExcessNonTax(): ?float + public function getForeignTaxAmountReclaimed(): ?float { - return $this->container['flexiDdPensionCommencementExcessNonTax']; + return $this->container['foreignTaxAmountReclaimed']; } /** - * Sets flexiDdPensionCommencementExcessNonTax + * Sets foreignTaxAmountReclaimed * - * @param float|null $flexiDdPensionCommencementExcessNonTax [readonly] Value of payments marked as flexibly accessing pension commencement excess lump sum (non taxable) + * @param float|null $foreignTaxAmountReclaimed [readonly] The amount of Foreign Tax Credits that you actually reclaimed * * @return $this */ - public function setFlexiDdPensionCommencementExcessNonTax(?float $flexiDdPensionCommencementExcessNonTax): static + public function setForeignTaxAmountReclaimed(?float $foreignTaxAmountReclaimed): static { - if (is_null($flexiDdPensionCommencementExcessNonTax)) { - throw new InvalidArgumentException('non-nullable flexiDdPensionCommencementExcessNonTax cannot be null'); + if (is_null($foreignTaxAmountReclaimed)) { + throw new InvalidArgumentException('non-nullable foreignTaxAmountReclaimed cannot be null'); } - $this->container['flexiDdPensionCommencementExcessNonTax'] = $flexiDdPensionCommencementExcessNonTax; + $this->container['foreignTaxAmountReclaimed'] = $foreignTaxAmountReclaimed; return $this; } /** - * Gets smp + * Gets gross * * @return float|null */ - public function getSmp(): ?float + public function getGross(): ?float { - return $this->container['smp']; + return $this->container['gross']; } /** - * Sets smp + * Sets gross * - * @param float|null $smp [readonly] Statutory Maternity Pay + * @param float|null $gross [readonly] Gross pay * * @return $this */ - public function setSmp(?float $smp): static + public function setGross(?float $gross): static { - if (is_null($smp)) { - throw new InvalidArgumentException('non-nullable smp cannot be null'); + if (is_null($gross)) { + throw new InvalidArgumentException('non-nullable gross cannot be null'); } - $this->container['smp'] = $smp; + $this->container['gross'] = $gross; return $this; } /** - * Gets smpNonRti + * Gets grossForNi * * @return float|null */ - public function getSmpNonRti(): ?float + public function getGrossForNi(): ?float { - return $this->container['smpNonRti']; + return $this->container['grossForNi']; } /** - * Sets smpNonRti + * Sets grossForNi * - * @param float|null $smpNonRti [readonly] Statutory Maternity Pay excluded from RTI + * @param float|null $grossForNi [readonly] The amount of the Gross that is subject to NI * * @return $this */ - public function setSmpNonRti(?float $smpNonRti): static + public function setGrossForNi(?float $grossForNi): static { - if (is_null($smpNonRti)) { - throw new InvalidArgumentException('non-nullable smpNonRti cannot be null'); + if (is_null($grossForNi)) { + throw new InvalidArgumentException('non-nullable grossForNi cannot be null'); } - $this->container['smpNonRti'] = $smpNonRti; + $this->container['grossForNi'] = $grossForNi; return $this; } /** - * Gets spp + * Gets grossForNiNonRti * * @return float|null */ - public function getSpp(): ?float + public function getGrossForNiNonRti(): ?float { - return $this->container['spp']; + return $this->container['grossForNiNonRti']; } /** - * Sets spp + * Sets grossForNiNonRti * - * @param float|null $spp [readonly] Statutory Paternity Pay + * @param float|null $grossForNiNonRti [readonly] The amount of the Gross that is subject to NI but excluded from RTI * * @return $this */ - public function setSpp(?float $spp): static + public function setGrossForNiNonRti(?float $grossForNiNonRti): static { - if (is_null($spp)) { - throw new InvalidArgumentException('non-nullable spp cannot be null'); + if (is_null($grossForNiNonRti)) { + throw new InvalidArgumentException('non-nullable grossForNiNonRti cannot be null'); } - $this->container['spp'] = $spp; + $this->container['grossForNiNonRti'] = $grossForNiNonRti; return $this; } /** - * Gets sppNonRti + * Gets grossForTax * * @return float|null */ - public function getSppNonRti(): ?float + public function getGrossForTax(): ?float { - return $this->container['sppNonRti']; + return $this->container['grossForTax']; } /** - * Sets sppNonRti + * Sets grossForTax * - * @param float|null $sppNonRti [readonly] Statutory Paternity Pay excluded from RTI + * @param float|null $grossForTax [readonly] The amount of the Gross that is subject to PAYE * * @return $this */ - public function setSppNonRti(?float $sppNonRti): static + public function setGrossForTax(?float $grossForTax): static { - if (is_null($sppNonRti)) { - throw new InvalidArgumentException('non-nullable sppNonRti cannot be null'); + if (is_null($grossForTax)) { + throw new InvalidArgumentException('non-nullable grossForTax cannot be null'); + } + $this->container['grossForTax'] = $grossForTax; + + return $this; + } + + /** + * Gets grossNotSubjectToEmployersNi + * + * @return float|null + */ + public function getGrossNotSubjectToEmployersNi(): ?float + { + return $this->container['grossNotSubjectToEmployersNi']; + } + + /** + * Sets grossNotSubjectToEmployersNi + * + * @param float|null $grossNotSubjectToEmployersNi [readonly] The amount of the Gross that is not subject to Employers NI. This is the same as GrossForNI where the employees NI Table has an Er contribution + * + * @return $this + */ + public function setGrossNotSubjectToEmployersNi(?float $grossNotSubjectToEmployersNi): static + { + if (is_null($grossNotSubjectToEmployersNi)) { + throw new InvalidArgumentException('non-nullable grossNotSubjectToEmployersNi cannot be null'); + } + $this->container['grossNotSubjectToEmployersNi'] = $grossNotSubjectToEmployersNi; + + return $this; + } + + /** + * Gets grossNotSubjectToEmployersNiNonRti + * + * @return float|null + */ + public function getGrossNotSubjectToEmployersNiNonRti(): ?float + { + return $this->container['grossNotSubjectToEmployersNiNonRti']; + } + + /** + * Sets grossNotSubjectToEmployersNiNonRti + * + * @param float|null $grossNotSubjectToEmployersNiNonRti [readonly] The amount of the Gross that is not subject to Employers NI. This is the same as GrossForNI where the employees NI Table has an Er contribution This is the amount that is excluded from RTI + * + * @return $this + */ + public function setGrossNotSubjectToEmployersNiNonRti(?float $grossNotSubjectToEmployersNiNonRti): static + { + if (is_null($grossNotSubjectToEmployersNiNonRti)) { + throw new InvalidArgumentException('non-nullable grossNotSubjectToEmployersNiNonRti cannot be null'); + } + $this->container['grossNotSubjectToEmployersNiNonRti'] = $grossNotSubjectToEmployersNiNonRti; + + return $this; + } + + /** + * Gets itemsSubjectToClass1NIC + * + * @return float|null + */ + public function getItemsSubjectToClass1NIC(): ?float + { + return $this->container['itemsSubjectToClass1NIC']; + } + + /** + * Sets itemsSubjectToClass1NIC + * + * @param float|null $itemsSubjectToClass1NIC [readonly] Items subject to Class 1 NIC but not taxed under PAYE regulations excluding pension contributions + * + * @return $this + */ + public function setItemsSubjectToClass1NIC(?float $itemsSubjectToClass1NIC): static + { + if (is_null($itemsSubjectToClass1NIC)) { + throw new InvalidArgumentException('non-nullable itemsSubjectToClass1NIC cannot be null'); + } + $this->container['itemsSubjectToClass1NIC'] = $itemsSubjectToClass1NIC; + + return $this; + } + + /** + * Gets leavers + * + * @return int|null + */ + public function getLeavers(): ?int + { + return $this->container['leavers']; + } + + /** + * Sets leavers + * + * @param int|null $leavers [readonly] The number of Leavers on ths PayRun + * + * @return $this + */ + public function setLeavers(?int $leavers): static + { + if (is_null($leavers)) { + throw new InvalidArgumentException('non-nullable leavers cannot be null'); + } + $this->container['leavers'] = $leavers; + + return $this; + } + + /** + * Gets mapsMiles + * + * @return int|null + */ + public function getMapsMiles(): ?int + { + return $this->container['mapsMiles']; + } + + /** + * Sets mapsMiles + * + * @param int|null $mapsMiles [readonly] The number of miles paid for Mileage Allowance Payments + * + * @return $this + */ + public function setMapsMiles(?int $mapsMiles): static + { + if (is_null($mapsMiles)) { + throw new InvalidArgumentException('non-nullable mapsMiles cannot be null'); } - $this->container['sppNonRti'] = $sppNonRti; + $this->container['mapsMiles'] = $mapsMiles; return $this; } /** - * Gets sap + * Gets netPay * * @return float|null */ - public function getSap(): ?float + public function getNetPay(): ?float { - return $this->container['sap']; + return $this->container['netPay']; } /** - * Sets sap + * Sets netPay * - * @param float|null $sap [readonly] Statutory Adoption Pay + * @param float|null $netPay [readonly] The Net Pay for this Employee * * @return $this */ - public function setSap(?float $sap): static + public function setNetPay(?float $netPay): static { - if (is_null($sap)) { - throw new InvalidArgumentException('non-nullable sap cannot be null'); + if (is_null($netPay)) { + throw new InvalidArgumentException('non-nullable netPay cannot be null'); } - $this->container['sap'] = $sap; + $this->container['netPay'] = $netPay; return $this; } /** - * Gets sapNonRti + * Gets newEmployeesInCurrentSupplementaryPayRun * - * @return float|null + * @return int|null */ - public function getSapNonRti(): ?float + public function getNewEmployeesInCurrentSupplementaryPayRun(): ?int { - return $this->container['sapNonRti']; + return $this->container['newEmployeesInCurrentSupplementaryPayRun']; } /** - * Sets sapNonRti + * Sets newEmployeesInCurrentSupplementaryPayRun * - * @param float|null $sapNonRti [readonly] Statutory Adoption Pay excluded from RTI + * @param int|null $newEmployeesInCurrentSupplementaryPayRun [readonly] The number of new Employees included in the current supplementary PayRun * * @return $this */ - public function setSapNonRti(?float $sapNonRti): static + public function setNewEmployeesInCurrentSupplementaryPayRun(?int $newEmployeesInCurrentSupplementaryPayRun): static { - if (is_null($sapNonRti)) { - throw new InvalidArgumentException('non-nullable sapNonRti cannot be null'); + if (is_null($newEmployeesInCurrentSupplementaryPayRun)) { + throw new InvalidArgumentException('non-nullable newEmployeesInCurrentSupplementaryPayRun cannot be null'); } - $this->container['sapNonRti'] = $sapNonRti; + $this->container['newEmployeesInCurrentSupplementaryPayRun'] = $newEmployeesInCurrentSupplementaryPayRun; return $this; } /** - * Gets shpp + * Gets nilPaid * - * @return float|null + * @return int|null */ - public function getShpp(): ?float + public function getNilPaid(): ?int { - return $this->container['shpp']; + return $this->container['nilPaid']; } /** - * Sets shpp + * Sets nilPaid * - * @param float|null $shpp [readonly] Statutory Shared Parental Pay + * @param int|null $nilPaid [readonly] The number of employees with NilPaid on the PayRun * * @return $this */ - public function setShpp(?float $shpp): static + public function setNilPaid(?int $nilPaid): static { - if (is_null($shpp)) { - throw new InvalidArgumentException('non-nullable shpp cannot be null'); + if (is_null($nilPaid)) { + throw new InvalidArgumentException('non-nullable nilPaid cannot be null'); } - $this->container['shpp'] = $shpp; + $this->container['nilPaid'] = $nilPaid; return $this; } /** - * Gets shppNonRti + * Gets nonTaxOrNICPmt * * @return float|null */ - public function getShppNonRti(): ?float + public function getNonTaxOrNICPmt(): ?float { - return $this->container['shppNonRti']; + return $this->container['nonTaxOrNICPmt']; } /** - * Sets shppNonRti + * Sets nonTaxOrNICPmt * - * @param float|null $shppNonRti [readonly] Statutory Shared Parental Pay excluded from RTI + * @param float|null $nonTaxOrNICPmt [readonly] The value of any payments being made to this Employee that aren't being subjected to PAYE or NI * * @return $this */ - public function setShppNonRti(?float $shppNonRti): static + public function setNonTaxOrNICPmt(?float $nonTaxOrNICPmt): static { - if (is_null($shppNonRti)) { - throw new InvalidArgumentException('non-nullable shppNonRti cannot be null'); + if (is_null($nonTaxOrNICPmt)) { + throw new InvalidArgumentException('non-nullable nonTaxOrNICPmt cannot be null'); } - $this->container['shppNonRti'] = $shppNonRti; + $this->container['nonTaxOrNICPmt'] = $nonTaxOrNICPmt; return $this; } /** - * Gets spbp + * Gets nonTierablePay * * @return float|null */ - public function getSpbp(): ?float + public function getNonTierablePay(): ?float { - return $this->container['spbp']; + return $this->container['nonTierablePay']; } /** - * Sets spbp + * Sets nonTierablePay * - * @param float|null $spbp [readonly] Statutory Parental Bereavement Pay + * @param float|null $nonTierablePay [readonly] The value of any pay that shouldn't count towards determining a pension tier. * * @return $this */ - public function setSpbp(?float $spbp): static + public function setNonTierablePay(?float $nonTierablePay): static { - if (is_null($spbp)) { - throw new InvalidArgumentException('non-nullable spbp cannot be null'); + if (is_null($nonTierablePay)) { + throw new InvalidArgumentException('non-nullable nonTierablePay cannot be null'); } - $this->container['spbp'] = $spbp; + $this->container['nonTierablePay'] = $nonTierablePay; return $this; } /** - * Gets spbpNonRti + * Gets notionalPay * * @return float|null */ - public function getSpbpNonRti(): ?float + public function getNotionalPay(): ?float { - return $this->container['spbpNonRti']; + return $this->container['notionalPay']; } /** - * Sets spbpNonRti + * Sets notionalPay * - * @param float|null $spbpNonRti [readonly] Statutory Parental Bereavement Pay excluded from RTI + * @param float|null $notionalPay [readonly] The value of adjustments that are of type notional. * * @return $this */ - public function setSpbpNonRti(?float $spbpNonRti): static + public function setNotionalPay(?float $notionalPay): static { - if (is_null($spbpNonRti)) { - throw new InvalidArgumentException('non-nullable spbpNonRti cannot be null'); + if (is_null($notionalPay)) { + throw new InvalidArgumentException('non-nullable notionalPay cannot be null'); } - $this->container['spbpNonRti'] = $spbpNonRti; + $this->container['notionalPay'] = $notionalPay; return $this; } /** - * Gets sncp + * Gets p45Gross * * @return float|null */ - public function getSncp(): ?float + public function getP45Gross(): ?float { - return $this->container['sncp']; + return $this->container['p45Gross']; } /** - * Sets sncp + * Sets p45Gross * - * @param float|null $sncp [readonly] Statutory Neonatal Care Pay + * @param float|null $p45Gross [readonly] The value P45 Gross which is held on the Employees Opening Balance * * @return $this */ - public function setSncp(?float $sncp): static + public function setP45Gross(?float $p45Gross): static { - if (is_null($sncp)) { - throw new InvalidArgumentException('non-nullable sncp cannot be null'); + if (is_null($p45Gross)) { + array_push($this->openAPINullablesSetToNull, 'p45Gross'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('p45Gross', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['sncp'] = $sncp; + $this->container['p45Gross'] = $p45Gross; return $this; } /** - * Gets sncpNonRti + * Gets p45Tax * * @return float|null */ - public function getSncpNonRti(): ?float + public function getP45Tax(): ?float { - return $this->container['sncpNonRti']; + return $this->container['p45Tax']; } /** - * Sets sncpNonRti + * Sets p45Tax * - * @param float|null $sncpNonRti [readonly] Statutory Neonatal Care Pay excluded from RTI + * @param float|null $p45Tax [readonly] The value of P45 Tax which is held on the Employees Opening Balance * * @return $this */ - public function setSncpNonRti(?float $sncpNonRti): static + public function setP45Tax(?float $p45Tax): static { - if (is_null($sncpNonRti)) { - throw new InvalidArgumentException('non-nullable sncpNonRti cannot be null'); + if (is_null($p45Tax)) { + array_push($this->openAPINullablesSetToNull, 'p45Tax'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('p45Tax', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['sncpNonRti'] = $sncpNonRti; + $this->container['p45Tax'] = $p45Tax; return $this; } /** - * Gets ssp + * Gets paymentAfterLeaving * * @return float|null */ - public function getSsp(): ?float + public function getPaymentAfterLeaving(): ?float { - return $this->container['ssp']; + return $this->container['paymentAfterLeaving']; } /** - * Sets ssp + * Sets paymentAfterLeaving * - * @param float|null $ssp [readonly] Statutory Sick Pay + * @param float|null $paymentAfterLeaving [readonly] Payment After Leaving * * @return $this */ - public function setSsp(?float $ssp): static + public function setPaymentAfterLeaving(?float $paymentAfterLeaving): static { - if (is_null($ssp)) { - throw new InvalidArgumentException('non-nullable ssp cannot be null'); + if (is_null($paymentAfterLeaving)) { + throw new InvalidArgumentException('non-nullable paymentAfterLeaving cannot be null'); } - $this->container['ssp'] = $ssp; + $this->container['paymentAfterLeaving'] = $paymentAfterLeaving; return $this; } /** - * Gets sspNonRti + * Gets pbik * * @return float|null */ - public function getSspNonRti(): ?float + public function getPbik(): ?float { - return $this->container['sspNonRti']; + return $this->container['pbik']; } /** - * Sets sspNonRti + * Sets pbik * - * @param float|null $sspNonRti [readonly] Statutory Sick Pay excluded from RTI + * @param float|null $pbik [readonly] Value of any Payrolled Benefits In Kind * * @return $this */ - public function setSspNonRti(?float $sspNonRti): static + public function setPbik(?float $pbik): static { - if (is_null($sspNonRti)) { - throw new InvalidArgumentException('non-nullable sspNonRti cannot be null'); + if (is_null($pbik)) { + throw new InvalidArgumentException('non-nullable pbik cannot be null'); } - $this->container['sspNonRti'] = $sspNonRti; + $this->container['pbik'] = $pbik; return $this; } /** - * Gets studentLoanRecovered + * Gets pensionableEarnings * * @return float|null */ - public function getStudentLoanRecovered(): ?float + public function getPensionableEarnings(): ?float { - return $this->container['studentLoanRecovered']; + return $this->container['pensionableEarnings']; } /** - * Sets studentLoanRecovered + * Sets pensionableEarnings * - * @param float|null $studentLoanRecovered [readonly] + * @param float|null $pensionableEarnings [readonly] The amount of the Gross that is subject to Pension Deductions. If the Pension Scheme uses Qualifying Earnings (upper and lower limits) then this value is before those are applied * * @return $this */ - public function setStudentLoanRecovered(?float $studentLoanRecovered): static + public function setPensionableEarnings(?float $pensionableEarnings): static { - if (is_null($studentLoanRecovered)) { - throw new InvalidArgumentException('non-nullable studentLoanRecovered cannot be null'); + if (is_null($pensionableEarnings)) { + throw new InvalidArgumentException('non-nullable pensionableEarnings cannot be null'); } - $this->container['studentLoanRecovered'] = $studentLoanRecovered; + $this->container['pensionableEarnings'] = $pensionableEarnings; return $this; } /** - * Gets studentLoanRecoveredNonRti + * Gets pensionablePay * * @return float|null */ - public function getStudentLoanRecoveredNonRti(): ?float + public function getPensionablePay(): ?float { - return $this->container['studentLoanRecoveredNonRti']; + return $this->container['pensionablePay']; } /** - * Sets studentLoanRecoveredNonRti + * Sets pensionablePay * - * @param float|null $studentLoanRecoveredNonRti [readonly] Student Loan recovered excluded from RTI + * @param float|null $pensionablePay [readonly] The amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. * * @return $this */ - public function setStudentLoanRecoveredNonRti(?float $studentLoanRecoveredNonRti): static + public function setPensionablePay(?float $pensionablePay): static { - if (is_null($studentLoanRecoveredNonRti)) { - throw new InvalidArgumentException('non-nullable studentLoanRecoveredNonRti cannot be null'); + if (is_null($pensionablePay)) { + throw new InvalidArgumentException('non-nullable pensionablePay cannot be null'); } - $this->container['studentLoanRecoveredNonRti'] = $studentLoanRecoveredNonRti; + $this->container['pensionablePay'] = $pensionablePay; return $this; } @@ -2383,717 +2404,730 @@ public function setPostgradLoanRecoveredNonRti(?float $postgradLoanRecoveredNonR } /** - * Gets pensionableEarnings + * Gets realTimeClass1ANi + * + * @return float|null + */ + public function getRealTimeClass1ANi(): ?float + { + return $this->container['realTimeClass1ANi']; + } + + /** + * Sets realTimeClass1ANi + * + * @param float|null $realTimeClass1ANi [readonly] + * + * @return $this + */ + public function setRealTimeClass1ANi(?float $realTimeClass1ANi): static + { + if (is_null($realTimeClass1ANi)) { + throw new InvalidArgumentException('non-nullable realTimeClass1ANi cannot be null'); + } + $this->container['realTimeClass1ANi'] = $realTimeClass1ANi; + + return $this; + } + + /** + * Gets realTimeClass1ANiNonRti * * @return float|null */ - public function getPensionableEarnings(): ?float + public function getRealTimeClass1ANiNonRti(): ?float { - return $this->container['pensionableEarnings']; + return $this->container['realTimeClass1ANiNonRti']; } /** - * Sets pensionableEarnings + * Sets realTimeClass1ANiNonRti * - * @param float|null $pensionableEarnings [readonly] The amount of the Gross that is subject to Pension Deductions. If the Pension Scheme uses Qualifying Earnings (upper and lower limits) then this value is before those are applied + * @param float|null $realTimeClass1ANiNonRti [readonly] Real Time Class 1A NI excluded from RTI * * @return $this */ - public function setPensionableEarnings(?float $pensionableEarnings): static + public function setRealTimeClass1ANiNonRti(?float $realTimeClass1ANiNonRti): static { - if (is_null($pensionableEarnings)) { - throw new InvalidArgumentException('non-nullable pensionableEarnings cannot be null'); + if (is_null($realTimeClass1ANiNonRti)) { + throw new InvalidArgumentException('non-nullable realTimeClass1ANiNonRti cannot be null'); } - $this->container['pensionableEarnings'] = $pensionableEarnings; + $this->container['realTimeClass1ANiNonRti'] = $realTimeClass1ANiNonRti; return $this; } /** - * Gets pensionablePay + * Gets recoverableAmounts * - * @return float|null + * @return \SynergiTech\Staffology\Model\RecoverableAmounts|null */ - public function getPensionablePay(): ?float + public function getRecoverableAmounts(): ?\SynergiTech\Staffology\Model\RecoverableAmounts { - return $this->container['pensionablePay']; + return $this->container['recoverableAmounts']; } /** - * Sets pensionablePay + * Sets recoverableAmounts * - * @param float|null $pensionablePay [readonly] The amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. + * @param \SynergiTech\Staffology\Model\RecoverableAmounts|null $recoverableAmounts recoverableAmounts * * @return $this */ - public function setPensionablePay(?float $pensionablePay): static + public function setRecoverableAmounts(?\SynergiTech\Staffology\Model\RecoverableAmounts $recoverableAmounts): static { - if (is_null($pensionablePay)) { - throw new InvalidArgumentException('non-nullable pensionablePay cannot be null'); + if (is_null($recoverableAmounts)) { + throw new InvalidArgumentException('non-nullable recoverableAmounts cannot be null'); } - $this->container['pensionablePay'] = $pensionablePay; + $this->container['recoverableAmounts'] = $recoverableAmounts; return $this; } /** - * Gets nonTierablePay + * Gets sap * * @return float|null */ - public function getNonTierablePay(): ?float + public function getSap(): ?float { - return $this->container['nonTierablePay']; + return $this->container['sap']; } /** - * Sets nonTierablePay + * Sets sap * - * @param float|null $nonTierablePay [readonly] The value of any pay that shouldn't count towards determining a pension tier. + * @param float|null $sap [readonly] Statutory Adoption Pay * * @return $this */ - public function setNonTierablePay(?float $nonTierablePay): static + public function setSap(?float $sap): static { - if (is_null($nonTierablePay)) { - throw new InvalidArgumentException('non-nullable nonTierablePay cannot be null'); + if (is_null($sap)) { + throw new InvalidArgumentException('non-nullable sap cannot be null'); } - $this->container['nonTierablePay'] = $nonTierablePay; + $this->container['sap'] = $sap; return $this; } /** - * Gets employeePensionContribution + * Gets sapNonRti * * @return float|null */ - public function getEmployeePensionContribution(): ?float + public function getSapNonRti(): ?float { - return $this->container['employeePensionContribution']; + return $this->container['sapNonRti']; } /** - * Sets employeePensionContribution + * Sets sapNonRti * - * @param float|null $employeePensionContribution [readonly] The value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions + * @param float|null $sapNonRti [readonly] Statutory Adoption Pay excluded from RTI * * @return $this */ - public function setEmployeePensionContribution(?float $employeePensionContribution): static + public function setSapNonRti(?float $sapNonRti): static { - if (is_null($employeePensionContribution)) { - throw new InvalidArgumentException('non-nullable employeePensionContribution cannot be null'); + if (is_null($sapNonRti)) { + throw new InvalidArgumentException('non-nullable sapNonRti cannot be null'); } - $this->container['employeePensionContribution'] = $employeePensionContribution; + $this->container['sapNonRti'] = $sapNonRti; return $this; } /** - * Gets employeePensionContributionAvc + * Gets shpp * * @return float|null */ - public function getEmployeePensionContributionAvc(): ?float + public function getShpp(): ?float { - return $this->container['employeePensionContributionAvc']; + return $this->container['shpp']; } /** - * Sets employeePensionContributionAvc + * Sets shpp * - * @param float|null $employeePensionContributionAvc [readonly] The value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution + * @param float|null $shpp [readonly] Statutory Shared Parental Pay * * @return $this */ - public function setEmployeePensionContributionAvc(?float $employeePensionContributionAvc): static + public function setShpp(?float $shpp): static { - if (is_null($employeePensionContributionAvc)) { - throw new InvalidArgumentException('non-nullable employeePensionContributionAvc cannot be null'); + if (is_null($shpp)) { + throw new InvalidArgumentException('non-nullable shpp cannot be null'); } - $this->container['employeePensionContributionAvc'] = $employeePensionContributionAvc; + $this->container['shpp'] = $shpp; return $this; } /** - * Gets employerPensionContribution + * Gets shppNonRti * * @return float|null */ - public function getEmployerPensionContribution(): ?float + public function getShppNonRti(): ?float { - return $this->container['employerPensionContribution']; + return $this->container['shppNonRti']; } /** - * Sets employerPensionContribution + * Sets shppNonRti * - * @param float|null $employerPensionContribution [readonly] The value of the Pension Contribution being made by the Employer for this Employee + * @param float|null $shppNonRti [readonly] Statutory Shared Parental Pay excluded from RTI * * @return $this */ - public function setEmployerPensionContribution(?float $employerPensionContribution): static + public function setShppNonRti(?float $shppNonRti): static { - if (is_null($employerPensionContribution)) { - throw new InvalidArgumentException('non-nullable employerPensionContribution cannot be null'); + if (is_null($shppNonRti)) { + throw new InvalidArgumentException('non-nullable shppNonRti cannot be null'); } - $this->container['employerPensionContribution'] = $employerPensionContribution; + $this->container['shppNonRti'] = $shppNonRti; return $this; } /** - * Gets empeePenContribnsNotPaid + * Gets smp * * @return float|null */ - public function getEmpeePenContribnsNotPaid(): ?float + public function getSmp(): ?float { - return $this->container['empeePenContribnsNotPaid']; + return $this->container['smp']; } /** - * Sets empeePenContribnsNotPaid + * Sets smp * - * @param float|null $empeePenContribnsNotPaid [readonly] Value of employee pension contributions that are not paid under 'net pay arrangements', including any AVC + * @param float|null $smp [readonly] Statutory Maternity Pay * * @return $this */ - public function setEmpeePenContribnsNotPaid(?float $empeePenContribnsNotPaid): static + public function setSmp(?float $smp): static { - if (is_null($empeePenContribnsNotPaid)) { - throw new InvalidArgumentException('non-nullable empeePenContribnsNotPaid cannot be null'); + if (is_null($smp)) { + throw new InvalidArgumentException('non-nullable smp cannot be null'); } - $this->container['empeePenContribnsNotPaid'] = $empeePenContribnsNotPaid; + $this->container['smp'] = $smp; return $this; } /** - * Gets empeePenContribnsPaid + * Gets smpNonRti * * @return float|null */ - public function getEmpeePenContribnsPaid(): ?float + public function getSmpNonRti(): ?float { - return $this->container['empeePenContribnsPaid']; + return $this->container['smpNonRti']; } /** - * Sets empeePenContribnsPaid + * Sets smpNonRti * - * @param float|null $empeePenContribnsPaid [readonly] Value of employee pension contributions paid under 'net pay arrangements', including any AVC + * @param float|null $smpNonRti [readonly] Statutory Maternity Pay excluded from RTI * * @return $this */ - public function setEmpeePenContribnsPaid(?float $empeePenContribnsPaid): static + public function setSmpNonRti(?float $smpNonRti): static { - if (is_null($empeePenContribnsPaid)) { - throw new InvalidArgumentException('non-nullable empeePenContribnsPaid cannot be null'); + if (is_null($smpNonRti)) { + throw new InvalidArgumentException('non-nullable smpNonRti cannot be null'); } - $this->container['empeePenContribnsPaid'] = $empeePenContribnsPaid; + $this->container['smpNonRti'] = $smpNonRti; return $this; } /** - * Gets attachmentOrderDeductions + * Gets sncp * * @return float|null */ - public function getAttachmentOrderDeductions(): ?float + public function getSncp(): ?float { - return $this->container['attachmentOrderDeductions']; + return $this->container['sncp']; } /** - * Sets attachmentOrderDeductions + * Sets sncp * - * @param float|null $attachmentOrderDeductions [readonly] Value of deductions made due to AttachmentOrders + * @param float|null $sncp [readonly] Statutory Neonatal Care Pay * * @return $this */ - public function setAttachmentOrderDeductions(?float $attachmentOrderDeductions): static + public function setSncp(?float $sncp): static { - if (is_null($attachmentOrderDeductions)) { - throw new InvalidArgumentException('non-nullable attachmentOrderDeductions cannot be null'); + if (is_null($sncp)) { + throw new InvalidArgumentException('non-nullable sncp cannot be null'); } - $this->container['attachmentOrderDeductions'] = $attachmentOrderDeductions; + $this->container['sncp'] = $sncp; return $this; } /** - * Gets cisDeduction + * Gets sncpNonRti * * @return float|null */ - public function getCisDeduction(): ?float + public function getSncpNonRti(): ?float { - return $this->container['cisDeduction']; + return $this->container['sncpNonRti']; } /** - * Sets cisDeduction + * Sets sncpNonRti * - * @param float|null $cisDeduction [readonly] Value of any CIS Deduction made + * @param float|null $sncpNonRti [readonly] Statutory Neonatal Care Pay excluded from RTI * * @return $this */ - public function setCisDeduction(?float $cisDeduction): static + public function setSncpNonRti(?float $sncpNonRti): static { - if (is_null($cisDeduction)) { - throw new InvalidArgumentException('non-nullable cisDeduction cannot be null'); + if (is_null($sncpNonRti)) { + throw new InvalidArgumentException('non-nullable sncpNonRti cannot be null'); } - $this->container['cisDeduction'] = $cisDeduction; + $this->container['sncpNonRti'] = $sncpNonRti; return $this; } /** - * Gets cisVat + * Gets spbp * * @return float|null */ - public function getCisVat(): ?float + public function getSpbp(): ?float { - return $this->container['cisVat']; + return $this->container['spbp']; } /** - * Sets cisVat + * Sets spbp * - * @param float|null $cisVat [readonly] Value of any VAT paid to CIS Subcontractor + * @param float|null $spbp [readonly] Statutory Parental Bereavement Pay * * @return $this */ - public function setCisVat(?float $cisVat): static + public function setSpbp(?float $spbp): static { - if (is_null($cisVat)) { - throw new InvalidArgumentException('non-nullable cisVat cannot be null'); + if (is_null($spbp)) { + throw new InvalidArgumentException('non-nullable spbp cannot be null'); } - $this->container['cisVat'] = $cisVat; + $this->container['spbp'] = $spbp; return $this; } /** - * Gets cisUmbrellaFee + * Gets spbpNonRti * * @return float|null */ - public function getCisUmbrellaFee(): ?float + public function getSpbpNonRti(): ?float { - return $this->container['cisUmbrellaFee']; + return $this->container['spbpNonRti']; } /** - * Sets cisUmbrellaFee + * Sets spbpNonRti * - * @param float|null $cisUmbrellaFee [readonly] Value of any pre-tax fee charged to the CIS Subcontractor for processing the payment + * @param float|null $spbpNonRti [readonly] Statutory Parental Bereavement Pay excluded from RTI * * @return $this */ - public function setCisUmbrellaFee(?float $cisUmbrellaFee): static + public function setSpbpNonRti(?float $spbpNonRti): static { - if (is_null($cisUmbrellaFee)) { - throw new InvalidArgumentException('non-nullable cisUmbrellaFee cannot be null'); + if (is_null($spbpNonRti)) { + throw new InvalidArgumentException('non-nullable spbpNonRti cannot be null'); } - $this->container['cisUmbrellaFee'] = $cisUmbrellaFee; + $this->container['spbpNonRti'] = $spbpNonRti; return $this; } /** - * Gets cisUmbrellaFeePostTax + * Gets spp * * @return float|null */ - public function getCisUmbrellaFeePostTax(): ?float + public function getSpp(): ?float { - return $this->container['cisUmbrellaFeePostTax']; + return $this->container['spp']; } /** - * Sets cisUmbrellaFeePostTax + * Sets spp * - * @param float|null $cisUmbrellaFeePostTax [readonly] Value of any post-tax fee charged to the CIS Subcontractor for processing the payment + * @param float|null $spp [readonly] Statutory Paternity Pay * * @return $this */ - public function setCisUmbrellaFeePostTax(?float $cisUmbrellaFeePostTax): static + public function setSpp(?float $spp): static { - if (is_null($cisUmbrellaFeePostTax)) { - throw new InvalidArgumentException('non-nullable cisUmbrellaFeePostTax cannot be null'); + if (is_null($spp)) { + throw new InvalidArgumentException('non-nullable spp cannot be null'); } - $this->container['cisUmbrellaFeePostTax'] = $cisUmbrellaFeePostTax; + $this->container['spp'] = $spp; return $this; } /** - * Gets pbik + * Gets sppNonRti * * @return float|null */ - public function getPbik(): ?float + public function getSppNonRti(): ?float { - return $this->container['pbik']; + return $this->container['sppNonRti']; } /** - * Sets pbik + * Sets sppNonRti * - * @param float|null $pbik [readonly] Value of any Payrolled Benefits In Kind + * @param float|null $sppNonRti [readonly] Statutory Paternity Pay excluded from RTI * * @return $this */ - public function setPbik(?float $pbik): static + public function setSppNonRti(?float $sppNonRti): static { - if (is_null($pbik)) { - throw new InvalidArgumentException('non-nullable pbik cannot be null'); + if (is_null($sppNonRti)) { + throw new InvalidArgumentException('non-nullable sppNonRti cannot be null'); } - $this->container['pbik'] = $pbik; + $this->container['sppNonRti'] = $sppNonRti; return $this; } /** - * Gets mapsMiles + * Gets ssp * - * @return int|null + * @return float|null */ - public function getMapsMiles(): ?int + public function getSsp(): ?float { - return $this->container['mapsMiles']; + return $this->container['ssp']; } /** - * Sets mapsMiles + * Sets ssp * - * @param int|null $mapsMiles [readonly] The number of miles paid for Mileage Allowance Payments + * @param float|null $ssp [readonly] Statutory Sick Pay * * @return $this */ - public function setMapsMiles(?int $mapsMiles): static + public function setSsp(?float $ssp): static { - if (is_null($mapsMiles)) { - throw new InvalidArgumentException('non-nullable mapsMiles cannot be null'); + if (is_null($ssp)) { + throw new InvalidArgumentException('non-nullable ssp cannot be null'); } - $this->container['mapsMiles'] = $mapsMiles; + $this->container['ssp'] = $ssp; return $this; } /** - * Gets foreignTaxAmount + * Gets sspNonRti * * @return float|null */ - public function getForeignTaxAmount(): ?float + public function getSspNonRti(): ?float { - return $this->container['foreignTaxAmount']; + return $this->container['sspNonRti']; } /** - * Sets foreignTaxAmount + * Sets sspNonRti * - * @param float|null $foreignTaxAmount [readonly] The amount paid for Foreign Tax Credits in this period + * @param float|null $sspNonRti [readonly] Statutory Sick Pay excluded from RTI * * @return $this */ - public function setForeignTaxAmount(?float $foreignTaxAmount): static + public function setSspNonRti(?float $sspNonRti): static { - if (is_null($foreignTaxAmount)) { - throw new InvalidArgumentException('non-nullable foreignTaxAmount cannot be null'); + if (is_null($sspNonRti)) { + throw new InvalidArgumentException('non-nullable sspNonRti cannot be null'); } - $this->container['foreignTaxAmount'] = $foreignTaxAmount; + $this->container['sspNonRti'] = $sspNonRti; return $this; } /** - * Gets foreignTaxAmountReclaimed + * Gets starters * - * @return float|null + * @return int|null */ - public function getForeignTaxAmountReclaimed(): ?float + public function getStarters(): ?int { - return $this->container['foreignTaxAmountReclaimed']; + return $this->container['starters']; } /** - * Sets foreignTaxAmountReclaimed + * Sets starters * - * @param float|null $foreignTaxAmountReclaimed [readonly] The amount of Foreign Tax Credits that you actually reclaimed + * @param int|null $starters [readonly] The number of Starters on this PayRun * * @return $this */ - public function setForeignTaxAmountReclaimed(?float $foreignTaxAmountReclaimed): static + public function setStarters(?int $starters): static { - if (is_null($foreignTaxAmountReclaimed)) { - throw new InvalidArgumentException('non-nullable foreignTaxAmountReclaimed cannot be null'); + if (is_null($starters)) { + throw new InvalidArgumentException('non-nullable starters cannot be null'); } - $this->container['foreignTaxAmountReclaimed'] = $foreignTaxAmountReclaimed; + $this->container['starters'] = $starters; return $this; } /** - * Gets umbrellaFee + * Gets studentLoanRecovered * * @return float|null */ - public function getUmbrellaFee(): ?float + public function getStudentLoanRecovered(): ?float { - return $this->container['umbrellaFee']; + return $this->container['studentLoanRecovered']; } /** - * Sets umbrellaFee + * Sets studentLoanRecovered * - * @param float|null $umbrellaFee [readonly] Value of any Umbrella fee charged for processing the payment + * @param float|null $studentLoanRecovered [readonly] * * @return $this */ - public function setUmbrellaFee(?float $umbrellaFee): static + public function setStudentLoanRecovered(?float $studentLoanRecovered): static { - if (is_null($umbrellaFee)) { - throw new InvalidArgumentException('non-nullable umbrellaFee cannot be null'); + if (is_null($studentLoanRecovered)) { + throw new InvalidArgumentException('non-nullable studentLoanRecovered cannot be null'); } - $this->container['umbrellaFee'] = $umbrellaFee; + $this->container['studentLoanRecovered'] = $studentLoanRecovered; return $this; } /** - * Gets appLevyDeduction + * Gets studentLoanRecoveredNonRti * * @return float|null */ - public function getAppLevyDeduction(): ?float + public function getStudentLoanRecoveredNonRti(): ?float { - return $this->container['appLevyDeduction']; + return $this->container['studentLoanRecoveredNonRti']; } /** - * Sets appLevyDeduction + * Sets studentLoanRecoveredNonRti * - * @param float|null $appLevyDeduction [readonly] Value of any Apprenticeship Levy fee deducted for processing the umbrella payment + * @param float|null $studentLoanRecoveredNonRti [readonly] Student Loan recovered excluded from RTI * * @return $this */ - public function setAppLevyDeduction(?float $appLevyDeduction): static + public function setStudentLoanRecoveredNonRti(?float $studentLoanRecoveredNonRti): static { - if (is_null($appLevyDeduction)) { - throw new InvalidArgumentException('non-nullable appLevyDeduction cannot be null'); + if (is_null($studentLoanRecoveredNonRti)) { + throw new InvalidArgumentException('non-nullable studentLoanRecoveredNonRti cannot be null'); } - $this->container['appLevyDeduction'] = $appLevyDeduction; + $this->container['studentLoanRecoveredNonRti'] = $studentLoanRecoveredNonRti; return $this; } /** - * Gets paymentAfterLeaving + * Gets takeHomePay * * @return float|null */ - public function getPaymentAfterLeaving(): ?float + public function getTakeHomePay(): ?float { - return $this->container['paymentAfterLeaving']; + return $this->container['takeHomePay']; } /** - * Sets paymentAfterLeaving + * Sets takeHomePay * - * @param float|null $paymentAfterLeaving [readonly] Payment After Leaving + * @param float|null $takeHomePay [readonly] The amount this Employee takes home * * @return $this */ - public function setPaymentAfterLeaving(?float $paymentAfterLeaving): static + public function setTakeHomePay(?float $takeHomePay): static { - if (is_null($paymentAfterLeaving)) { - throw new InvalidArgumentException('non-nullable paymentAfterLeaving cannot be null'); + if (is_null($takeHomePay)) { + throw new InvalidArgumentException('non-nullable takeHomePay cannot be null'); } - $this->container['paymentAfterLeaving'] = $paymentAfterLeaving; + $this->container['takeHomePay'] = $takeHomePay; return $this; } /** - * Gets taxOnPaymentAfterLeaving + * Gets tax * * @return float|null */ - public function getTaxOnPaymentAfterLeaving(): ?float + public function getTax(): ?float { - return $this->container['taxOnPaymentAfterLeaving']; + return $this->container['tax']; } /** - * Sets taxOnPaymentAfterLeaving + * Sets tax * - * @param float|null $taxOnPaymentAfterLeaving [readonly] Tax On Payment After Leaving + * @param float|null $tax [readonly] * * @return $this */ - public function setTaxOnPaymentAfterLeaving(?float $taxOnPaymentAfterLeaving): static + public function setTax(?float $tax): static { - if (is_null($taxOnPaymentAfterLeaving)) { - throw new InvalidArgumentException('non-nullable taxOnPaymentAfterLeaving cannot be null'); + if (is_null($tax)) { + throw new InvalidArgumentException('non-nullable tax cannot be null'); } - $this->container['taxOnPaymentAfterLeaving'] = $taxOnPaymentAfterLeaving; + $this->container['tax'] = $tax; return $this; } /** - * Gets nilPaid + * Gets taxNonRti * - * @return int|null + * @return float|null */ - public function getNilPaid(): ?int + public function getTaxNonRti(): ?float { - return $this->container['nilPaid']; + return $this->container['taxNonRti']; } /** - * Sets nilPaid + * Sets taxNonRti * - * @param int|null $nilPaid [readonly] The number of employees with NilPaid on the PayRun + * @param float|null $taxNonRti [readonly] Tax excluded from RTI * * @return $this */ - public function setNilPaid(?int $nilPaid): static + public function setTaxNonRti(?float $taxNonRti): static { - if (is_null($nilPaid)) { - throw new InvalidArgumentException('non-nullable nilPaid cannot be null'); + if (is_null($taxNonRti)) { + throw new InvalidArgumentException('non-nullable taxNonRti cannot be null'); } - $this->container['nilPaid'] = $nilPaid; + $this->container['taxNonRti'] = $taxNonRti; return $this; } /** - * Gets leavers + * Gets taxOnPaymentAfterLeaving * - * @return int|null + * @return float|null */ - public function getLeavers(): ?int + public function getTaxOnPaymentAfterLeaving(): ?float { - return $this->container['leavers']; + return $this->container['taxOnPaymentAfterLeaving']; } /** - * Sets leavers + * Sets taxOnPaymentAfterLeaving * - * @param int|null $leavers [readonly] The number of Leavers on ths PayRun + * @param float|null $taxOnPaymentAfterLeaving [readonly] Tax On Payment After Leaving * * @return $this */ - public function setLeavers(?int $leavers): static + public function setTaxOnPaymentAfterLeaving(?float $taxOnPaymentAfterLeaving): static { - if (is_null($leavers)) { - throw new InvalidArgumentException('non-nullable leavers cannot be null'); + if (is_null($taxOnPaymentAfterLeaving)) { + throw new InvalidArgumentException('non-nullable taxOnPaymentAfterLeaving cannot be null'); } - $this->container['leavers'] = $leavers; + $this->container['taxOnPaymentAfterLeaving'] = $taxOnPaymentAfterLeaving; return $this; } /** - * Gets starters + * Gets tcpOp * - * @return int|null + * @return float|null */ - public function getStarters(): ?int + public function getTcpOp(): ?float { - return $this->container['starters']; + return $this->container['tcpOp']; } /** - * Sets starters + * Sets tcpOp * - * @param int|null $starters [readonly] The number of Starters on this PayRun + * @param float|null $tcpOp [readonly] Value of payments marked as Trivial Commutation Payment (C - Occupational Pension) * * @return $this */ - public function setStarters(?int $starters): static + public function setTcpOp(?float $tcpOp): static { - if (is_null($starters)) { - throw new InvalidArgumentException('non-nullable starters cannot be null'); + if (is_null($tcpOp)) { + throw new InvalidArgumentException('non-nullable tcpOp cannot be null'); } - $this->container['starters'] = $starters; + $this->container['tcpOp'] = $tcpOp; return $this; } /** - * Gets p45Gross + * Gets tcpPp * * @return float|null */ - public function getP45Gross(): ?float + public function getTcpPp(): ?float { - return $this->container['p45Gross']; + return $this->container['tcpPp']; } /** - * Sets p45Gross + * Sets tcpPp * - * @param float|null $p45Gross [readonly] The value P45 Gross which is held on the Employees Opening Balance + * @param float|null $tcpPp [readonly] Value of payments marked as Trivial Commutation Payment (B - Personal Pension) * * @return $this */ - public function setP45Gross(?float $p45Gross): static + public function setTcpPp(?float $tcpPp): static { - if (is_null($p45Gross)) { - array_push($this->openAPINullablesSetToNull, 'p45Gross'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('p45Gross', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($tcpPp)) { + throw new InvalidArgumentException('non-nullable tcpPp cannot be null'); } - $this->container['p45Gross'] = $p45Gross; + $this->container['tcpPp'] = $tcpPp; return $this; } /** - * Gets p45Tax + * Gets tcpTcls * * @return float|null */ - public function getP45Tax(): ?float + public function getTcpTcls(): ?float { - return $this->container['p45Tax']; + return $this->container['tcpTcls']; } /** - * Sets p45Tax + * Sets tcpTcls * - * @param float|null $p45Tax [readonly] The value of P45 Tax which is held on the Employees Opening Balance + * @param float|null $tcpTcls [readonly] Value of payments marked as Trivial Commutation Payment (A - TCLS) * * @return $this */ - public function setP45Tax(?float $p45Tax): static + public function setTcpTcls(?float $tcpTcls): static { - if (is_null($p45Tax)) { - array_push($this->openAPINullablesSetToNull, 'p45Tax'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('p45Tax', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($tcpTcls)) { + throw new InvalidArgumentException('non-nullable tcpTcls cannot be null'); } - $this->container['p45Tax'] = $p45Tax; + $this->container['tcpTcls'] = $tcpTcls; return $this; } @@ -3126,28 +3160,28 @@ public function setTotalCost(?float $totalCost): static } /** - * Gets recoverableAmounts + * Gets umbrellaFee * - * @return \SynergiTech\Staffology\Model\RecoverableAmounts|null + * @return float|null */ - public function getRecoverableAmounts(): ?\SynergiTech\Staffology\Model\RecoverableAmounts + public function getUmbrellaFee(): ?float { - return $this->container['recoverableAmounts']; + return $this->container['umbrellaFee']; } /** - * Sets recoverableAmounts + * Sets umbrellaFee * - * @param \SynergiTech\Staffology\Model\RecoverableAmounts|null $recoverableAmounts recoverableAmounts + * @param float|null $umbrellaFee [readonly] Value of any Umbrella fee charged for processing the payment * * @return $this */ - public function setRecoverableAmounts(?\SynergiTech\Staffology\Model\RecoverableAmounts $recoverableAmounts): static + public function setUmbrellaFee(?float $umbrellaFee): static { - if (is_null($recoverableAmounts)) { - throw new InvalidArgumentException('non-nullable recoverableAmounts cannot be null'); + if (is_null($umbrellaFee)) { + throw new InvalidArgumentException('non-nullable umbrellaFee cannot be null'); } - $this->container['recoverableAmounts'] = $recoverableAmounts; + $this->container['umbrellaFee'] = $umbrellaFee; return $this; } diff --git a/src/Model/PaySchedule.php b/src/Model/PaySchedule.php index fcf7411..22b2dad 100644 --- a/src/Model/PaySchedule.php +++ b/src/Model/PaySchedule.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,32 +59,32 @@ class PaySchedule implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', - 'ordinal' => 'int', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', - 'firstPeriodEndDate' => '\DateTime', + 'currentPayRun' => '\SynergiTech\Staffology\Model\Item', + 'employeeCount' => 'int', + 'employerName' => 'string', + 'employerUniqueId' => 'string', 'firstPaymentDate' => '\DateTime', - 'paymentDateType' => '\SynergiTech\Staffology\Model\PaymentDateType', - 'periodEndDateType' => '\SynergiTech\Staffology\Model\PaymentDateType', - 'periodLengths' => 'int[]', + 'firstPeriodEndDate' => '\DateTime', + 'hasOpenPayRunPeriod' => 'bool', 'highGrossPay' => 'float', 'highNetPay' => 'float', - 'periodEventsConfig' => '\SynergiTech\Staffology\Model\PaySchedulePeriodEventsConfig', - 'hasOpenPayRunPeriod' => 'bool', - 'lastPeriodEndDate' => '\DateTime', - 'lastPeriodNumber' => 'int', - 'employeeCount' => 'int', - 'isRequired' => 'bool', 'isConfigured' => 'bool', + 'isRequired' => 'bool', 'isYearCompleted' => 'bool', - 'yearEndTasks' => 'string[]', - 'payRuns' => '\SynergiTech\Staffology\Model\Item[]', - 'currentPayRun' => '\SynergiTech\Staffology\Model\Item', + 'lastPeriodEndDate' => '\DateTime', + 'lastPeriodNumber' => 'int', + 'name' => 'string', 'nextPayRun' => '\SynergiTech\Staffology\Model\PayRun', + 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'payRuns' => '\SynergiTech\Staffology\Model\Item[]', + 'paymentDateType' => '\SynergiTech\Staffology\Model\PaymentDateType', + 'periodEndDateType' => '\SynergiTech\Staffology\Model\PaymentDateType', + 'periodEventsConfig' => '\SynergiTech\Staffology\Model\PaySchedulePeriodEventsConfig', + 'periodLengths' => 'int[]', 'publicCreatedDate' => '\DateTime', - 'employerName' => 'string', - 'employerUniqueId' => 'string' + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'yearEndTasks' => 'string[]' ]; /** @@ -93,32 +93,32 @@ class PaySchedule implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'name' => null, - 'ordinal' => 'int32', - 'taxYear' => null, - 'payPeriod' => null, - 'firstPeriodEndDate' => 'date', + 'currentPayRun' => null, + 'employeeCount' => 'int32', + 'employerName' => null, + 'employerUniqueId' => 'uuid', 'firstPaymentDate' => 'date', - 'paymentDateType' => null, - 'periodEndDateType' => null, - 'periodLengths' => 'int32', + 'firstPeriodEndDate' => 'date', + 'hasOpenPayRunPeriod' => null, 'highGrossPay' => 'double', 'highNetPay' => 'double', - 'periodEventsConfig' => null, - 'hasOpenPayRunPeriod' => null, - 'lastPeriodEndDate' => 'date', - 'lastPeriodNumber' => 'int32', - 'employeeCount' => 'int32', - 'isRequired' => null, 'isConfigured' => null, + 'isRequired' => null, 'isYearCompleted' => null, - 'yearEndTasks' => null, - 'payRuns' => null, - 'currentPayRun' => null, + 'lastPeriodEndDate' => 'date', + 'lastPeriodNumber' => 'int32', + 'name' => null, 'nextPayRun' => null, + 'ordinal' => 'int32', + 'payPeriod' => null, + 'payRuns' => null, + 'paymentDateType' => null, + 'periodEndDateType' => null, + 'periodEventsConfig' => null, + 'periodLengths' => 'int32', 'publicCreatedDate' => 'date', - 'employerName' => null, - 'employerUniqueId' => 'uuid' + 'taxYear' => null, + 'yearEndTasks' => null ]; /** @@ -127,32 +127,32 @@ class PaySchedule implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'name' => true, - 'ordinal' => false, - 'taxYear' => false, - 'payPeriod' => false, - 'firstPeriodEndDate' => false, + 'currentPayRun' => false, + 'employeeCount' => false, + 'employerName' => true, + 'employerUniqueId' => false, 'firstPaymentDate' => false, - 'paymentDateType' => false, - 'periodEndDateType' => false, - 'periodLengths' => true, + 'firstPeriodEndDate' => false, + 'hasOpenPayRunPeriod' => false, 'highGrossPay' => false, 'highNetPay' => false, - 'periodEventsConfig' => true, - 'hasOpenPayRunPeriod' => false, - 'lastPeriodEndDate' => true, - 'lastPeriodNumber' => true, - 'employeeCount' => false, - 'isRequired' => false, 'isConfigured' => false, + 'isRequired' => false, 'isYearCompleted' => false, - 'yearEndTasks' => true, - 'payRuns' => true, - 'currentPayRun' => false, + 'lastPeriodEndDate' => true, + 'lastPeriodNumber' => true, + 'name' => true, 'nextPayRun' => false, + 'ordinal' => false, + 'payPeriod' => false, + 'payRuns' => true, + 'paymentDateType' => false, + 'periodEndDateType' => false, + 'periodEventsConfig' => true, + 'periodLengths' => true, 'publicCreatedDate' => false, - 'employerName' => true, - 'employerUniqueId' => false + 'taxYear' => false, + 'yearEndTasks' => true ]; /** @@ -241,32 +241,32 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', - 'ordinal' => 'ordinal', - 'taxYear' => 'taxYear', - 'payPeriod' => 'payPeriod', - 'firstPeriodEndDate' => 'firstPeriodEndDate', + 'currentPayRun' => 'currentPayRun', + 'employeeCount' => 'employeeCount', + 'employerName' => 'employerName', + 'employerUniqueId' => 'employerUniqueId', 'firstPaymentDate' => 'firstPaymentDate', - 'paymentDateType' => 'paymentDateType', - 'periodEndDateType' => 'periodEndDateType', - 'periodLengths' => 'periodLengths', + 'firstPeriodEndDate' => 'firstPeriodEndDate', + 'hasOpenPayRunPeriod' => 'hasOpenPayRunPeriod', 'highGrossPay' => 'highGrossPay', 'highNetPay' => 'highNetPay', - 'periodEventsConfig' => 'periodEventsConfig', - 'hasOpenPayRunPeriod' => 'hasOpenPayRunPeriod', - 'lastPeriodEndDate' => 'lastPeriodEndDate', - 'lastPeriodNumber' => 'lastPeriodNumber', - 'employeeCount' => 'employeeCount', - 'isRequired' => 'isRequired', 'isConfigured' => 'isConfigured', + 'isRequired' => 'isRequired', 'isYearCompleted' => 'isYearCompleted', - 'yearEndTasks' => 'yearEndTasks', - 'payRuns' => 'payRuns', - 'currentPayRun' => 'currentPayRun', + 'lastPeriodEndDate' => 'lastPeriodEndDate', + 'lastPeriodNumber' => 'lastPeriodNumber', + 'name' => 'name', 'nextPayRun' => 'nextPayRun', + 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', + 'payRuns' => 'payRuns', + 'paymentDateType' => 'paymentDateType', + 'periodEndDateType' => 'periodEndDateType', + 'periodEventsConfig' => 'periodEventsConfig', + 'periodLengths' => 'periodLengths', 'publicCreatedDate' => 'publicCreatedDate', - 'employerName' => 'employerName', - 'employerUniqueId' => 'employerUniqueId' + 'taxYear' => 'taxYear', + 'yearEndTasks' => 'yearEndTasks' ]; /** @@ -275,32 +275,32 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', - 'ordinal' => 'setOrdinal', - 'taxYear' => 'setTaxYear', - 'payPeriod' => 'setPayPeriod', - 'firstPeriodEndDate' => 'setFirstPeriodEndDate', + 'currentPayRun' => 'setCurrentPayRun', + 'employeeCount' => 'setEmployeeCount', + 'employerName' => 'setEmployerName', + 'employerUniqueId' => 'setEmployerUniqueId', 'firstPaymentDate' => 'setFirstPaymentDate', - 'paymentDateType' => 'setPaymentDateType', - 'periodEndDateType' => 'setPeriodEndDateType', - 'periodLengths' => 'setPeriodLengths', + 'firstPeriodEndDate' => 'setFirstPeriodEndDate', + 'hasOpenPayRunPeriod' => 'setHasOpenPayRunPeriod', 'highGrossPay' => 'setHighGrossPay', 'highNetPay' => 'setHighNetPay', - 'periodEventsConfig' => 'setPeriodEventsConfig', - 'hasOpenPayRunPeriod' => 'setHasOpenPayRunPeriod', - 'lastPeriodEndDate' => 'setLastPeriodEndDate', - 'lastPeriodNumber' => 'setLastPeriodNumber', - 'employeeCount' => 'setEmployeeCount', - 'isRequired' => 'setIsRequired', 'isConfigured' => 'setIsConfigured', + 'isRequired' => 'setIsRequired', 'isYearCompleted' => 'setIsYearCompleted', - 'yearEndTasks' => 'setYearEndTasks', - 'payRuns' => 'setPayRuns', - 'currentPayRun' => 'setCurrentPayRun', + 'lastPeriodEndDate' => 'setLastPeriodEndDate', + 'lastPeriodNumber' => 'setLastPeriodNumber', + 'name' => 'setName', 'nextPayRun' => 'setNextPayRun', + 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', + 'payRuns' => 'setPayRuns', + 'paymentDateType' => 'setPaymentDateType', + 'periodEndDateType' => 'setPeriodEndDateType', + 'periodEventsConfig' => 'setPeriodEventsConfig', + 'periodLengths' => 'setPeriodLengths', 'publicCreatedDate' => 'setPublicCreatedDate', - 'employerName' => 'setEmployerName', - 'employerUniqueId' => 'setEmployerUniqueId' + 'taxYear' => 'setTaxYear', + 'yearEndTasks' => 'setYearEndTasks' ]; /** @@ -309,32 +309,32 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', - 'ordinal' => 'getOrdinal', - 'taxYear' => 'getTaxYear', - 'payPeriod' => 'getPayPeriod', - 'firstPeriodEndDate' => 'getFirstPeriodEndDate', + 'currentPayRun' => 'getCurrentPayRun', + 'employeeCount' => 'getEmployeeCount', + 'employerName' => 'getEmployerName', + 'employerUniqueId' => 'getEmployerUniqueId', 'firstPaymentDate' => 'getFirstPaymentDate', - 'paymentDateType' => 'getPaymentDateType', - 'periodEndDateType' => 'getPeriodEndDateType', - 'periodLengths' => 'getPeriodLengths', + 'firstPeriodEndDate' => 'getFirstPeriodEndDate', + 'hasOpenPayRunPeriod' => 'getHasOpenPayRunPeriod', 'highGrossPay' => 'getHighGrossPay', 'highNetPay' => 'getHighNetPay', - 'periodEventsConfig' => 'getPeriodEventsConfig', - 'hasOpenPayRunPeriod' => 'getHasOpenPayRunPeriod', - 'lastPeriodEndDate' => 'getLastPeriodEndDate', - 'lastPeriodNumber' => 'getLastPeriodNumber', - 'employeeCount' => 'getEmployeeCount', - 'isRequired' => 'getIsRequired', 'isConfigured' => 'getIsConfigured', + 'isRequired' => 'getIsRequired', 'isYearCompleted' => 'getIsYearCompleted', - 'yearEndTasks' => 'getYearEndTasks', - 'payRuns' => 'getPayRuns', - 'currentPayRun' => 'getCurrentPayRun', + 'lastPeriodEndDate' => 'getLastPeriodEndDate', + 'lastPeriodNumber' => 'getLastPeriodNumber', + 'name' => 'getName', 'nextPayRun' => 'getNextPayRun', + 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', + 'payRuns' => 'getPayRuns', + 'paymentDateType' => 'getPaymentDateType', + 'periodEndDateType' => 'getPeriodEndDateType', + 'periodEventsConfig' => 'getPeriodEventsConfig', + 'periodLengths' => 'getPeriodLengths', 'publicCreatedDate' => 'getPublicCreatedDate', - 'employerName' => 'getEmployerName', - 'employerUniqueId' => 'getEmployerUniqueId' + 'taxYear' => 'getTaxYear', + 'yearEndTasks' => 'getYearEndTasks' ]; /** @@ -393,32 +393,32 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('ordinal', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); - $this->setIfExists('firstPeriodEndDate', $data ?? [], null); + $this->setIfExists('currentPayRun', $data ?? [], null); + $this->setIfExists('employeeCount', $data ?? [], null); + $this->setIfExists('employerName', $data ?? [], null); + $this->setIfExists('employerUniqueId', $data ?? [], null); $this->setIfExists('firstPaymentDate', $data ?? [], null); - $this->setIfExists('paymentDateType', $data ?? [], null); - $this->setIfExists('periodEndDateType', $data ?? [], null); - $this->setIfExists('periodLengths', $data ?? [], null); + $this->setIfExists('firstPeriodEndDate', $data ?? [], null); + $this->setIfExists('hasOpenPayRunPeriod', $data ?? [], null); $this->setIfExists('highGrossPay', $data ?? [], null); $this->setIfExists('highNetPay', $data ?? [], null); - $this->setIfExists('periodEventsConfig', $data ?? [], null); - $this->setIfExists('hasOpenPayRunPeriod', $data ?? [], null); - $this->setIfExists('lastPeriodEndDate', $data ?? [], null); - $this->setIfExists('lastPeriodNumber', $data ?? [], null); - $this->setIfExists('employeeCount', $data ?? [], null); - $this->setIfExists('isRequired', $data ?? [], null); $this->setIfExists('isConfigured', $data ?? [], null); + $this->setIfExists('isRequired', $data ?? [], null); $this->setIfExists('isYearCompleted', $data ?? [], null); - $this->setIfExists('yearEndTasks', $data ?? [], null); - $this->setIfExists('payRuns', $data ?? [], null); - $this->setIfExists('currentPayRun', $data ?? [], null); + $this->setIfExists('lastPeriodEndDate', $data ?? [], null); + $this->setIfExists('lastPeriodNumber', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('nextPayRun', $data ?? [], null); + $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('payRuns', $data ?? [], null); + $this->setIfExists('paymentDateType', $data ?? [], null); + $this->setIfExists('periodEndDateType', $data ?? [], null); + $this->setIfExists('periodEventsConfig', $data ?? [], null); + $this->setIfExists('periodLengths', $data ?? [], null); $this->setIfExists('publicCreatedDate', $data ?? [], null); - $this->setIfExists('employerName', $data ?? [], null); - $this->setIfExists('employerUniqueId', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('yearEndTasks', $data ?? [], null); } /** @@ -468,147 +468,116 @@ public function valid(): bool /** - * Gets name + * Gets currentPayRun * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getName(): ?string + public function getCurrentPayRun(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['name']; + return $this->container['currentPayRun']; } /** - * Sets name + * Sets currentPayRun * - * @param string|null $name A descriptive name for this PaySchedule + * @param \SynergiTech\Staffology\Model\Item|null $currentPayRun currentPayRun * * @return $this */ - public function setName(?string $name): static + public function setCurrentPayRun(?\SynergiTech\Staffology\Model\Item $currentPayRun): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($name) && (mb_strlen($name) > 100)) { - throw new InvalidArgumentException('invalid length for $name when calling PaySchedule., must be smaller than or equal to 100.'); + if (is_null($currentPayRun)) { + throw new InvalidArgumentException('non-nullable currentPayRun cannot be null'); } - - $this->container['name'] = $name; + $this->container['currentPayRun'] = $currentPayRun; return $this; } /** - * Gets ordinal + * Gets employeeCount * * @return int|null */ - public function getOrdinal(): ?int - { - return $this->container['ordinal']; - } - - /** - * Sets ordinal - * - * @param int|null $ordinal [readonly] Indicates whether this is first, second, third (etc) PaySchedule for this PayPeriod. - * - * @return $this - */ - public function setOrdinal(?int $ordinal): static - { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); - } - $this->container['ordinal'] = $ordinal; - - return $this; - } - - /** - * Gets taxYear - * - * @return \SynergiTech\Staffology\Model\TaxYear|null - */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getEmployeeCount(): ?int { - return $this->container['taxYear']; + return $this->container['employeeCount']; } /** - * Sets taxYear + * Sets employeeCount * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param int|null $employeeCount [readonly] The number of employees paid with this PaySchedule * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setEmployeeCount(?int $employeeCount): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($employeeCount)) { + throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['employeeCount'] = $employeeCount; return $this; } /** - * Gets payPeriod + * Gets employerName * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return string|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getEmployerName(): ?string { - return $this->container['payPeriod']; + return $this->container['employerName']; } /** - * Sets payPeriod + * Sets employerName * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param string|null $employerName Employer name for this PaySchedule * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setEmployerName(?string $employerName): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($employerName)) { + array_push($this->openAPINullablesSetToNull, 'employerName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employerName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriod'] = $payPeriod; + $this->container['employerName'] = $employerName; return $this; } /** - * Gets firstPeriodEndDate + * Gets employerUniqueId * - * @return \DateTime|null + * @return string|null */ - public function getFirstPeriodEndDate(): ?\DateTime + public function getEmployerUniqueId(): ?string { - return $this->container['firstPeriodEndDate']; + return $this->container['employerUniqueId']; } /** - * Sets firstPeriodEndDate + * Sets employerUniqueId * - * @param \DateTime|null $firstPeriodEndDate The last day of the first pay period + * @param string|null $employerUniqueId Employer Unique Id for this PaySchedule * * @return $this */ - public function setFirstPeriodEndDate(?\DateTime $firstPeriodEndDate): static + public function setEmployerUniqueId(?string $employerUniqueId): static { - if (is_null($firstPeriodEndDate)) { - throw new InvalidArgumentException('non-nullable firstPeriodEndDate cannot be null'); + if (is_null($employerUniqueId)) { + throw new InvalidArgumentException('non-nullable employerUniqueId cannot be null'); } - $this->container['firstPeriodEndDate'] = $firstPeriodEndDate; + $this->container['employerUniqueId'] = $employerUniqueId; return $this; } @@ -641,89 +610,55 @@ public function setFirstPaymentDate(?\DateTime $firstPaymentDate): static } /** - * Gets paymentDateType - * - * @return \SynergiTech\Staffology\Model\PaymentDateType|null - */ - public function getPaymentDateType(): ?\SynergiTech\Staffology\Model\PaymentDateType - { - return $this->container['paymentDateType']; - } - - /** - * Sets paymentDateType - * - * @param \SynergiTech\Staffology\Model\PaymentDateType|null $paymentDateType paymentDateType - * - * @return $this - */ - public function setPaymentDateType(?\SynergiTech\Staffology\Model\PaymentDateType $paymentDateType): static - { - if (is_null($paymentDateType)) { - throw new InvalidArgumentException('non-nullable paymentDateType cannot be null'); - } - $this->container['paymentDateType'] = $paymentDateType; - - return $this; - } - - /** - * Gets periodEndDateType + * Gets firstPeriodEndDate * - * @return \SynergiTech\Staffology\Model\PaymentDateType|null + * @return \DateTime|null */ - public function getPeriodEndDateType(): ?\SynergiTech\Staffology\Model\PaymentDateType + public function getFirstPeriodEndDate(): ?\DateTime { - return $this->container['periodEndDateType']; + return $this->container['firstPeriodEndDate']; } /** - * Sets periodEndDateType + * Sets firstPeriodEndDate * - * @param \SynergiTech\Staffology\Model\PaymentDateType|null $periodEndDateType periodEndDateType + * @param \DateTime|null $firstPeriodEndDate The last day of the first pay period * * @return $this */ - public function setPeriodEndDateType(?\SynergiTech\Staffology\Model\PaymentDateType $periodEndDateType): static + public function setFirstPeriodEndDate(?\DateTime $firstPeriodEndDate): static { - if (is_null($periodEndDateType)) { - throw new InvalidArgumentException('non-nullable periodEndDateType cannot be null'); + if (is_null($firstPeriodEndDate)) { + throw new InvalidArgumentException('non-nullable firstPeriodEndDate cannot be null'); } - $this->container['periodEndDateType'] = $periodEndDateType; + $this->container['firstPeriodEndDate'] = $firstPeriodEndDate; return $this; } /** - * Gets periodLengths + * Gets hasOpenPayRunPeriod * - * @return int[]|null + * @return bool|null */ - public function getPeriodLengths(): ?array + public function getHasOpenPayRunPeriod(): ?bool { - return $this->container['periodLengths']; + return $this->container['hasOpenPayRunPeriod']; } /** - * Sets periodLengths + * Sets hasOpenPayRunPeriod * - * @param int[]|null $periodLengths Only applicable for PayPeriod of Custom. Defines the length of each period + * @param bool|null $hasOpenPayRunPeriod [readonly] Will be true if the employer currently has an open PayRun for this PayPeriod * * @return $this */ - public function setPeriodLengths(?array $periodLengths): static + public function setHasOpenPayRunPeriod(?bool $hasOpenPayRunPeriod): static { - if (is_null($periodLengths)) { - array_push($this->openAPINullablesSetToNull, 'periodLengths'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('periodLengths', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($hasOpenPayRunPeriod)) { + throw new InvalidArgumentException('non-nullable hasOpenPayRunPeriod cannot be null'); } - $this->container['periodLengths'] = $periodLengths; + $this->container['hasOpenPayRunPeriod'] = $hasOpenPayRunPeriod; return $this; } @@ -783,62 +718,82 @@ public function setHighNetPay(?float $highNetPay): static } /** - * Gets periodEventsConfig + * Gets isConfigured * - * @return \SynergiTech\Staffology\Model\PaySchedulePeriodEventsConfig|null + * @return bool|null */ - public function getPeriodEventsConfig(): ?\SynergiTech\Staffology\Model\PaySchedulePeriodEventsConfig + public function getIsConfigured(): ?bool { - return $this->container['periodEventsConfig']; + return $this->container['isConfigured']; } /** - * Sets periodEventsConfig + * Sets isConfigured * - * @param \SynergiTech\Staffology\Model\PaySchedulePeriodEventsConfig|null $periodEventsConfig periodEventsConfig + * @param bool|null $isConfigured [readonly] Whether or not this PaySchedule has been configured and is ready for use * * @return $this */ - public function setPeriodEventsConfig(?\SynergiTech\Staffology\Model\PaySchedulePeriodEventsConfig $periodEventsConfig): static + public function setIsConfigured(?bool $isConfigured): static { - if (is_null($periodEventsConfig)) { - array_push($this->openAPINullablesSetToNull, 'periodEventsConfig'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('periodEventsConfig', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isConfigured)) { + throw new InvalidArgumentException('non-nullable isConfigured cannot be null'); } - $this->container['periodEventsConfig'] = $periodEventsConfig; + $this->container['isConfigured'] = $isConfigured; return $this; } /** - * Gets hasOpenPayRunPeriod + * Gets isRequired * * @return bool|null */ - public function getHasOpenPayRunPeriod(): ?bool + public function getIsRequired(): ?bool { - return $this->container['hasOpenPayRunPeriod']; + return $this->container['isRequired']; } /** - * Sets hasOpenPayRunPeriod + * Sets isRequired * - * @param bool|null $hasOpenPayRunPeriod [readonly] Will be true if the employer currently has an open PayRun for this PayPeriod + * @param bool|null $isRequired [readonly] Whether or not this PaySchedule is required for the employer, ie: they have employees to be paid on this PaySchedule * * @return $this */ - public function setHasOpenPayRunPeriod(?bool $hasOpenPayRunPeriod): static + public function setIsRequired(?bool $isRequired): static { - if (is_null($hasOpenPayRunPeriod)) { - throw new InvalidArgumentException('non-nullable hasOpenPayRunPeriod cannot be null'); + if (is_null($isRequired)) { + throw new InvalidArgumentException('non-nullable isRequired cannot be null'); } - $this->container['hasOpenPayRunPeriod'] = $hasOpenPayRunPeriod; + $this->container['isRequired'] = $isRequired; + + return $this; + } + + /** + * Gets isYearCompleted + * + * @return bool|null + */ + public function getIsYearCompleted(): ?bool + { + return $this->container['isYearCompleted']; + } + + /** + * Sets isYearCompleted + * + * @param bool|null $isYearCompleted [readonly] Returns true if all PayRuns for this PaySchedule in the TaxYear have been completed + * + * @return $this + */ + public function setIsYearCompleted(?bool $isYearCompleted): static + { + if (is_null($isYearCompleted)) { + throw new InvalidArgumentException('non-nullable isYearCompleted cannot be null'); + } + $this->container['isYearCompleted'] = $isYearCompleted; return $this; } @@ -912,231 +867,276 @@ public function setLastPeriodNumber(?int $lastPeriodNumber): static } /** - * Gets employeeCount + * Gets name * - * @return int|null + * @return string|null */ - public function getEmployeeCount(): ?int + public function getName(): ?string { - return $this->container['employeeCount']; + return $this->container['name']; } /** - * Sets employeeCount + * Sets name * - * @param int|null $employeeCount [readonly] The number of employees paid with this PaySchedule + * @param string|null $name A descriptive name for this PaySchedule * * @return $this */ - public function setEmployeeCount(?int $employeeCount): static + public function setName(?string $name): static { - if (is_null($employeeCount)) { - throw new InvalidArgumentException('non-nullable employeeCount cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeeCount'] = $employeeCount; + if (!is_null($name) && (mb_strlen($name) > 100)) { + throw new InvalidArgumentException('invalid length for $name when calling PaySchedule., must be smaller than or equal to 100.'); + } + + $this->container['name'] = $name; return $this; } /** - * Gets isRequired + * Gets nextPayRun * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PayRun|null */ - public function getIsRequired(): ?bool + public function getNextPayRun(): ?\SynergiTech\Staffology\Model\PayRun { - return $this->container['isRequired']; + return $this->container['nextPayRun']; } /** - * Sets isRequired + * Sets nextPayRun * - * @param bool|null $isRequired [readonly] Whether or not this PaySchedule is required for the employer, ie: they have employees to be paid on this PaySchedule + * @param \SynergiTech\Staffology\Model\PayRun|null $nextPayRun nextPayRun * * @return $this */ - public function setIsRequired(?bool $isRequired): static + public function setNextPayRun(?\SynergiTech\Staffology\Model\PayRun $nextPayRun): static { - if (is_null($isRequired)) { - throw new InvalidArgumentException('non-nullable isRequired cannot be null'); + if (is_null($nextPayRun)) { + throw new InvalidArgumentException('non-nullable nextPayRun cannot be null'); } - $this->container['isRequired'] = $isRequired; + $this->container['nextPayRun'] = $nextPayRun; return $this; } /** - * Gets isConfigured + * Gets ordinal * - * @return bool|null + * @return int|null */ - public function getIsConfigured(): ?bool + public function getOrdinal(): ?int { - return $this->container['isConfigured']; + return $this->container['ordinal']; } /** - * Sets isConfigured + * Sets ordinal * - * @param bool|null $isConfigured [readonly] Whether or not this PaySchedule has been configured and is ready for use + * @param int|null $ordinal [readonly] Indicates whether this is first, second, third (etc) PaySchedule for this PayPeriod. * * @return $this */ - public function setIsConfigured(?bool $isConfigured): static + public function setOrdinal(?int $ordinal): static { - if (is_null($isConfigured)) { - throw new InvalidArgumentException('non-nullable isConfigured cannot be null'); + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); } - $this->container['isConfigured'] = $isConfigured; + $this->container['ordinal'] = $ordinal; return $this; } /** - * Gets isYearCompleted + * Gets payPeriod * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getIsYearCompleted(): ?bool + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['isYearCompleted']; + return $this->container['payPeriod']; } /** - * Sets isYearCompleted + * Sets payPeriod * - * @param bool|null $isYearCompleted [readonly] Returns true if all PayRuns for this PaySchedule in the TaxYear have been completed + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod * * @return $this */ - public function setIsYearCompleted(?bool $isYearCompleted): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static { - if (is_null($isYearCompleted)) { - throw new InvalidArgumentException('non-nullable isYearCompleted cannot be null'); + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['isYearCompleted'] = $isYearCompleted; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets yearEndTasks + * Gets payRuns * - * @return string[]|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getYearEndTasks(): ?array + public function getPayRuns(): ?array { - return $this->container['yearEndTasks']; + return $this->container['payRuns']; } /** - * Sets yearEndTasks + * Sets payRuns * - * @param string[]|null $yearEndTasks [readonly] A list of actions that need to be completed for this PaySchedule before this TaxYear can be finalised + * @param \SynergiTech\Staffology\Model\Item[]|null $payRuns [readonly] Details of PayRuns for this PaySchedule * * @return $this */ - public function setYearEndTasks(?array $yearEndTasks): static + public function setPayRuns(?array $payRuns): static { - if (is_null($yearEndTasks)) { - array_push($this->openAPINullablesSetToNull, 'yearEndTasks'); + if (is_null($payRuns)) { + array_push($this->openAPINullablesSetToNull, 'payRuns'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('yearEndTasks', $nullablesSetToNull); + $index = array_search('payRuns', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['yearEndTasks'] = $yearEndTasks; + $this->container['payRuns'] = $payRuns; return $this; } /** - * Gets payRuns + * Gets paymentDateType * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return \SynergiTech\Staffology\Model\PaymentDateType|null */ - public function getPayRuns(): ?array + public function getPaymentDateType(): ?\SynergiTech\Staffology\Model\PaymentDateType { - return $this->container['payRuns']; + return $this->container['paymentDateType']; } /** - * Sets payRuns + * Sets paymentDateType * - * @param \SynergiTech\Staffology\Model\Item[]|null $payRuns [readonly] Details of PayRuns for this PaySchedule + * @param \SynergiTech\Staffology\Model\PaymentDateType|null $paymentDateType paymentDateType * * @return $this */ - public function setPayRuns(?array $payRuns): static + public function setPaymentDateType(?\SynergiTech\Staffology\Model\PaymentDateType $paymentDateType): static { - if (is_null($payRuns)) { - array_push($this->openAPINullablesSetToNull, 'payRuns'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payRuns', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($paymentDateType)) { + throw new InvalidArgumentException('non-nullable paymentDateType cannot be null'); } - $this->container['payRuns'] = $payRuns; + $this->container['paymentDateType'] = $paymentDateType; return $this; } /** - * Gets currentPayRun + * Gets periodEndDateType * - * @return \SynergiTech\Staffology\Model\Item|null + * @return \SynergiTech\Staffology\Model\PaymentDateType|null */ - public function getCurrentPayRun(): ?\SynergiTech\Staffology\Model\Item + public function getPeriodEndDateType(): ?\SynergiTech\Staffology\Model\PaymentDateType { - return $this->container['currentPayRun']; + return $this->container['periodEndDateType']; } /** - * Sets currentPayRun + * Sets periodEndDateType * - * @param \SynergiTech\Staffology\Model\Item|null $currentPayRun currentPayRun + * @param \SynergiTech\Staffology\Model\PaymentDateType|null $periodEndDateType periodEndDateType * * @return $this */ - public function setCurrentPayRun(?\SynergiTech\Staffology\Model\Item $currentPayRun): static + public function setPeriodEndDateType(?\SynergiTech\Staffology\Model\PaymentDateType $periodEndDateType): static { - if (is_null($currentPayRun)) { - throw new InvalidArgumentException('non-nullable currentPayRun cannot be null'); + if (is_null($periodEndDateType)) { + throw new InvalidArgumentException('non-nullable periodEndDateType cannot be null'); } - $this->container['currentPayRun'] = $currentPayRun; + $this->container['periodEndDateType'] = $periodEndDateType; return $this; } /** - * Gets nextPayRun + * Gets periodEventsConfig * - * @return \SynergiTech\Staffology\Model\PayRun|null + * @return \SynergiTech\Staffology\Model\PaySchedulePeriodEventsConfig|null */ - public function getNextPayRun(): ?\SynergiTech\Staffology\Model\PayRun + public function getPeriodEventsConfig(): ?\SynergiTech\Staffology\Model\PaySchedulePeriodEventsConfig { - return $this->container['nextPayRun']; + return $this->container['periodEventsConfig']; } /** - * Sets nextPayRun + * Sets periodEventsConfig * - * @param \SynergiTech\Staffology\Model\PayRun|null $nextPayRun nextPayRun + * @param \SynergiTech\Staffology\Model\PaySchedulePeriodEventsConfig|null $periodEventsConfig periodEventsConfig * * @return $this */ - public function setNextPayRun(?\SynergiTech\Staffology\Model\PayRun $nextPayRun): static + public function setPeriodEventsConfig(?\SynergiTech\Staffology\Model\PaySchedulePeriodEventsConfig $periodEventsConfig): static { - if (is_null($nextPayRun)) { - throw new InvalidArgumentException('non-nullable nextPayRun cannot be null'); + if (is_null($periodEventsConfig)) { + array_push($this->openAPINullablesSetToNull, 'periodEventsConfig'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('periodEventsConfig', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['nextPayRun'] = $nextPayRun; + $this->container['periodEventsConfig'] = $periodEventsConfig; + + return $this; + } + + /** + * Gets periodLengths + * + * @return int[]|null + */ + public function getPeriodLengths(): ?array + { + return $this->container['periodLengths']; + } + + /** + * Sets periodLengths + * + * @param int[]|null $periodLengths Only applicable for PayPeriod of Custom. Defines the length of each period + * + * @return $this + */ + public function setPeriodLengths(?array $periodLengths): static + { + if (is_null($periodLengths)) { + array_push($this->openAPINullablesSetToNull, 'periodLengths'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('periodLengths', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['periodLengths'] = $periodLengths; return $this; } @@ -1169,62 +1169,62 @@ public function setPublicCreatedDate(?\DateTime $publicCreatedDate): static } /** - * Gets employerName + * Gets taxYear * - * @return string|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getEmployerName(): ?string + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['employerName']; + return $this->container['taxYear']; } /** - * Sets employerName + * Sets taxYear * - * @param string|null $employerName Employer name for this PaySchedule + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setEmployerName(?string $employerName): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($employerName)) { - array_push($this->openAPINullablesSetToNull, 'employerName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['employerName'] = $employerName; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets employerUniqueId + * Gets yearEndTasks * - * @return string|null + * @return string[]|null */ - public function getEmployerUniqueId(): ?string + public function getYearEndTasks(): ?array { - return $this->container['employerUniqueId']; + return $this->container['yearEndTasks']; } /** - * Sets employerUniqueId + * Sets yearEndTasks * - * @param string|null $employerUniqueId Employer Unique Id for this PaySchedule + * @param string[]|null $yearEndTasks [readonly] A list of actions that need to be completed for this PaySchedule before this TaxYear can be finalised * * @return $this */ - public function setEmployerUniqueId(?string $employerUniqueId): static + public function setYearEndTasks(?array $yearEndTasks): static { - if (is_null($employerUniqueId)) { - throw new InvalidArgumentException('non-nullable employerUniqueId cannot be null'); + if (is_null($yearEndTasks)) { + array_push($this->openAPINullablesSetToNull, 'yearEndTasks'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('yearEndTasks', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employerUniqueId'] = $employerUniqueId; + $this->container['yearEndTasks'] = $yearEndTasks; return $this; } diff --git a/src/Model/PaySchedulePeriod.php b/src/Model/PaySchedulePeriod.php index 8c053b8..2535c6b 100644 --- a/src/Model/PaySchedulePeriod.php +++ b/src/Model/PaySchedulePeriod.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class PaySchedulePeriod implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'endDate' => '\DateTime', + 'id' => 'string', 'paySchedulePeriodEvents' => '\SynergiTech\Staffology\Model\PaySchedulePeriodEvent[]', + 'paymentDate' => '\DateTime', 'period' => 'int', 'startDate' => '\DateTime', - 'endDate' => '\DateTime', - 'paymentDate' => '\DateTime', - 'unadjustedPaymentDate' => '\DateTime', - 'id' => 'string' + 'unadjustedPaymentDate' => '\DateTime' ]; /** @@ -74,13 +74,13 @@ class PaySchedulePeriod implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'endDate' => 'date', + 'id' => 'uuid', 'paySchedulePeriodEvents' => null, + 'paymentDate' => 'date', 'period' => 'int32', 'startDate' => 'date', - 'endDate' => 'date', - 'paymentDate' => 'date', - 'unadjustedPaymentDate' => 'date', - 'id' => 'uuid' + 'unadjustedPaymentDate' => 'date' ]; /** @@ -89,13 +89,13 @@ class PaySchedulePeriod implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'endDate' => false, + 'id' => false, 'paySchedulePeriodEvents' => true, + 'paymentDate' => false, 'period' => false, 'startDate' => false, - 'endDate' => false, - 'paymentDate' => false, - 'unadjustedPaymentDate' => false, - 'id' => false + 'unadjustedPaymentDate' => false ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'endDate' => 'endDate', + 'id' => 'id', 'paySchedulePeriodEvents' => 'paySchedulePeriodEvents', + 'paymentDate' => 'paymentDate', 'period' => 'period', 'startDate' => 'startDate', - 'endDate' => 'endDate', - 'paymentDate' => 'paymentDate', - 'unadjustedPaymentDate' => 'unadjustedPaymentDate', - 'id' => 'id' + 'unadjustedPaymentDate' => 'unadjustedPaymentDate' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'endDate' => 'setEndDate', + 'id' => 'setId', 'paySchedulePeriodEvents' => 'setPaySchedulePeriodEvents', + 'paymentDate' => 'setPaymentDate', 'period' => 'setPeriod', 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', - 'paymentDate' => 'setPaymentDate', - 'unadjustedPaymentDate' => 'setUnadjustedPaymentDate', - 'id' => 'setId' + 'unadjustedPaymentDate' => 'setUnadjustedPaymentDate' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'endDate' => 'getEndDate', + 'id' => 'getId', 'paySchedulePeriodEvents' => 'getPaySchedulePeriodEvents', + 'paymentDate' => 'getPaymentDate', 'period' => 'getPeriod', 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', - 'paymentDate' => 'getPaymentDate', - 'unadjustedPaymentDate' => 'getUnadjustedPaymentDate', - 'id' => 'getId' + 'unadjustedPaymentDate' => 'getUnadjustedPaymentDate' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('paySchedulePeriodEvents', $data ?? [], null); + $this->setIfExists('paymentDate', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); - $this->setIfExists('paymentDate', $data ?? [], null); $this->setIfExists('unadjustedPaymentDate', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); } /** @@ -331,197 +331,197 @@ public function valid(): bool /** - * Gets paySchedulePeriodEvents + * Gets endDate * - * @return \SynergiTech\Staffology\Model\PaySchedulePeriodEvent[]|null + * @return \DateTime|null */ - public function getPaySchedulePeriodEvents(): ?array + public function getEndDate(): ?\DateTime { - return $this->container['paySchedulePeriodEvents']; + return $this->container['endDate']; } /** - * Sets paySchedulePeriodEvents + * Sets endDate * - * @param \SynergiTech\Staffology\Model\PaySchedulePeriodEvent[]|null $paySchedulePeriodEvents [readonly] List of all the events in this PaySchedulePeriod + * @param \DateTime|null $endDate [readonly] The end date of the PaySchedulePeriod * * @return $this */ - public function setPaySchedulePeriodEvents(?array $paySchedulePeriodEvents): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($paySchedulePeriodEvents)) { - array_push($this->openAPINullablesSetToNull, 'paySchedulePeriodEvents'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paySchedulePeriodEvents', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); } - $this->container['paySchedulePeriodEvents'] = $paySchedulePeriodEvents; + $this->container['endDate'] = $endDate; return $this; } /** - * Gets period + * Gets id * - * @return int|null + * @return string|null */ - public function getPeriod(): ?int + public function getId(): ?string { - return $this->container['period']; + return $this->container['id']; } /** - * Sets period + * Sets id * - * @param int|null $period [readonly] The Period number of the PaySchedulePeriod. + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setPeriod(?int $period): static + public function setId(?string $id): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['period'] = $period; + $this->container['id'] = $id; return $this; } /** - * Gets startDate + * Gets paySchedulePeriodEvents * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\PaySchedulePeriodEvent[]|null */ - public function getStartDate(): ?\DateTime + public function getPaySchedulePeriodEvents(): ?array { - return $this->container['startDate']; + return $this->container['paySchedulePeriodEvents']; } /** - * Sets startDate + * Sets paySchedulePeriodEvents * - * @param \DateTime|null $startDate [readonly] The start date of the PaySchedulePeriod + * @param \SynergiTech\Staffology\Model\PaySchedulePeriodEvent[]|null $paySchedulePeriodEvents [readonly] List of all the events in this PaySchedulePeriod * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setPaySchedulePeriodEvents(?array $paySchedulePeriodEvents): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($paySchedulePeriodEvents)) { + array_push($this->openAPINullablesSetToNull, 'paySchedulePeriodEvents'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('paySchedulePeriodEvents', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['startDate'] = $startDate; + $this->container['paySchedulePeriodEvents'] = $paySchedulePeriodEvents; return $this; } /** - * Gets endDate + * Gets paymentDate * * @return \DateTime|null */ - public function getEndDate(): ?\DateTime + public function getPaymentDate(): ?\DateTime { - return $this->container['endDate']; + return $this->container['paymentDate']; } /** - * Sets endDate + * Sets paymentDate * - * @param \DateTime|null $endDate [readonly] The end date of the PaySchedulePeriod + * @param \DateTime|null $paymentDate The payment date of the PaySchedulePeriod. * * @return $this */ - public function setEndDate(?\DateTime $endDate): static + public function setPaymentDate(?\DateTime $paymentDate): static { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); + if (is_null($paymentDate)) { + throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); } - $this->container['endDate'] = $endDate; + $this->container['paymentDate'] = $paymentDate; return $this; } /** - * Gets paymentDate + * Gets period * - * @return \DateTime|null + * @return int|null */ - public function getPaymentDate(): ?\DateTime + public function getPeriod(): ?int { - return $this->container['paymentDate']; + return $this->container['period']; } /** - * Sets paymentDate + * Sets period * - * @param \DateTime|null $paymentDate The payment date of the PaySchedulePeriod. + * @param int|null $period [readonly] The Period number of the PaySchedulePeriod. * * @return $this */ - public function setPaymentDate(?\DateTime $paymentDate): static + public function setPeriod(?int $period): static { - if (is_null($paymentDate)) { - throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['paymentDate'] = $paymentDate; + $this->container['period'] = $period; return $this; } /** - * Gets unadjustedPaymentDate + * Gets startDate * * @return \DateTime|null */ - public function getUnadjustedPaymentDate(): ?\DateTime + public function getStartDate(): ?\DateTime { - return $this->container['unadjustedPaymentDate']; + return $this->container['startDate']; } /** - * Sets unadjustedPaymentDate + * Sets startDate * - * @param \DateTime|null $unadjustedPaymentDate The payment date of the PaySchedulePeriod when not accounting for weekends, bank hols or ad-hoc alterations to the pay schedule + * @param \DateTime|null $startDate [readonly] The start date of the PaySchedulePeriod * * @return $this */ - public function setUnadjustedPaymentDate(?\DateTime $unadjustedPaymentDate): static + public function setStartDate(?\DateTime $startDate): static { - if (is_null($unadjustedPaymentDate)) { - throw new InvalidArgumentException('non-nullable unadjustedPaymentDate cannot be null'); + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); } - $this->container['unadjustedPaymentDate'] = $unadjustedPaymentDate; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets id + * Gets unadjustedPaymentDate * - * @return string|null + * @return \DateTime|null */ - public function getId(): ?string + public function getUnadjustedPaymentDate(): ?\DateTime { - return $this->container['id']; + return $this->container['unadjustedPaymentDate']; } /** - * Sets id + * Sets unadjustedPaymentDate * - * @param string|null $id [readonly] The unique id of the object + * @param \DateTime|null $unadjustedPaymentDate The payment date of the PaySchedulePeriod when not accounting for weekends, bank hols or ad-hoc alterations to the pay schedule * * @return $this */ - public function setId(?string $id): static + public function setUnadjustedPaymentDate(?\DateTime $unadjustedPaymentDate): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($unadjustedPaymentDate)) { + throw new InvalidArgumentException('non-nullable unadjustedPaymentDate cannot be null'); } - $this->container['id'] = $id; + $this->container['unadjustedPaymentDate'] = $unadjustedPaymentDate; return $this; } diff --git a/src/Model/PaySchedulePeriodEvent.php b/src/Model/PaySchedulePeriodEvent.php index 0af8de4..db38b86 100644 --- a/src/Model/PaySchedulePeriodEvent.php +++ b/src/Model/PaySchedulePeriodEvent.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,11 +60,11 @@ class PaySchedulePeriodEvent implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'payPeriodEventType' => '\SynergiTech\Staffology\Model\PayPeriodEventType', - 'eventDate' => '\DateTime', 'actualEventDate' => '\DateTime', + 'eventDate' => '\DateTime', + 'id' => 'string', 'isOverDue' => 'bool', - 'id' => 'string' + 'payPeriodEventType' => '\SynergiTech\Staffology\Model\PayPeriodEventType' ]; /** @@ -73,11 +73,11 @@ class PaySchedulePeriodEvent implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ - 'payPeriodEventType' => null, - 'eventDate' => 'date', 'actualEventDate' => 'date', + 'eventDate' => 'date', + 'id' => 'uuid', 'isOverDue' => null, - 'id' => 'uuid' + 'payPeriodEventType' => null ]; /** @@ -86,11 +86,11 @@ class PaySchedulePeriodEvent implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ - 'payPeriodEventType' => false, - 'eventDate' => false, 'actualEventDate' => true, + 'eventDate' => false, + 'id' => false, 'isOverDue' => false, - 'id' => false + 'payPeriodEventType' => false ]; /** @@ -179,11 +179,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payPeriodEventType' => 'payPeriodEventType', - 'eventDate' => 'eventDate', 'actualEventDate' => 'actualEventDate', + 'eventDate' => 'eventDate', + 'id' => 'id', 'isOverDue' => 'isOverDue', - 'id' => 'id' + 'payPeriodEventType' => 'payPeriodEventType' ]; /** @@ -192,11 +192,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payPeriodEventType' => 'setPayPeriodEventType', - 'eventDate' => 'setEventDate', 'actualEventDate' => 'setActualEventDate', + 'eventDate' => 'setEventDate', + 'id' => 'setId', 'isOverDue' => 'setIsOverDue', - 'id' => 'setId' + 'payPeriodEventType' => 'setPayPeriodEventType' ]; /** @@ -205,11 +205,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payPeriodEventType' => 'getPayPeriodEventType', - 'eventDate' => 'getEventDate', 'actualEventDate' => 'getActualEventDate', + 'eventDate' => 'getEventDate', + 'id' => 'getId', 'isOverDue' => 'getIsOverDue', - 'id' => 'getId' + 'payPeriodEventType' => 'getPayPeriodEventType' ]; /** @@ -268,11 +268,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payPeriodEventType', $data ?? [], null); - $this->setIfExists('eventDate', $data ?? [], null); $this->setIfExists('actualEventDate', $data ?? [], null); - $this->setIfExists('isOverDue', $data ?? [], null); + $this->setIfExists('eventDate', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isOverDue', $data ?? [], null); + $this->setIfExists('payPeriodEventType', $data ?? [], null); } /** @@ -318,28 +318,35 @@ public function valid(): bool /** - * Gets payPeriodEventType + * Gets actualEventDate * - * @return \SynergiTech\Staffology\Model\PayPeriodEventType|null + * @return \DateTime|null */ - public function getPayPeriodEventType(): ?\SynergiTech\Staffology\Model\PayPeriodEventType + public function getActualEventDate(): ?\DateTime { - return $this->container['payPeriodEventType']; + return $this->container['actualEventDate']; } /** - * Sets payPeriodEventType + * Sets actualEventDate * - * @param \SynergiTech\Staffology\Model\PayPeriodEventType|null $payPeriodEventType payPeriodEventType + * @param \DateTime|null $actualEventDate The actual date and time when the event was completed. * * @return $this */ - public function setPayPeriodEventType(?\SynergiTech\Staffology\Model\PayPeriodEventType $payPeriodEventType): static + public function setActualEventDate(?\DateTime $actualEventDate): static { - if (is_null($payPeriodEventType)) { - throw new InvalidArgumentException('non-nullable payPeriodEventType cannot be null'); + if (is_null($actualEventDate)) { + array_push($this->openAPINullablesSetToNull, 'actualEventDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('actualEventDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriodEventType'] = $payPeriodEventType; + $this->container['actualEventDate'] = $actualEventDate; return $this; } @@ -372,35 +379,28 @@ public function setEventDate(?\DateTime $eventDate): static } /** - * Gets actualEventDate + * Gets id * - * @return \DateTime|null + * @return string|null */ - public function getActualEventDate(): ?\DateTime + public function getId(): ?string { - return $this->container['actualEventDate']; + return $this->container['id']; } /** - * Sets actualEventDate + * Sets id * - * @param \DateTime|null $actualEventDate The actual date and time when the event was completed. + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setActualEventDate(?\DateTime $actualEventDate): static + public function setId(?string $id): static { - if (is_null($actualEventDate)) { - array_push($this->openAPINullablesSetToNull, 'actualEventDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('actualEventDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['actualEventDate'] = $actualEventDate; + $this->container['id'] = $id; return $this; } @@ -433,28 +433,28 @@ public function setIsOverDue(?bool $isOverDue): static } /** - * Gets id + * Gets payPeriodEventType * - * @return string|null + * @return \SynergiTech\Staffology\Model\PayPeriodEventType|null */ - public function getId(): ?string + public function getPayPeriodEventType(): ?\SynergiTech\Staffology\Model\PayPeriodEventType { - return $this->container['id']; + return $this->container['payPeriodEventType']; } /** - * Sets id + * Sets payPeriodEventType * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\PayPeriodEventType|null $payPeriodEventType payPeriodEventType * * @return $this */ - public function setId(?string $id): static + public function setPayPeriodEventType(?\SynergiTech\Staffology\Model\PayPeriodEventType $payPeriodEventType): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($payPeriodEventType)) { + throw new InvalidArgumentException('non-nullable payPeriodEventType cannot be null'); } - $this->container['id'] = $id; + $this->container['payPeriodEventType'] = $payPeriodEventType; return $this; } diff --git a/src/Model/PaySchedulePeriodEventsConfig.php b/src/Model/PaySchedulePeriodEventsConfig.php index 980f18d..f3f4fe0 100644 --- a/src/Model/PaySchedulePeriodEventsConfig.php +++ b/src/Model/PaySchedulePeriodEventsConfig.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,11 +60,11 @@ class PaySchedulePeriodEventsConfig implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'submitForProcessing' => 'int', - 'sendForApproval' => 'int', 'approval' => 'int', 'finalise' => 'int', + 'sendForApproval' => 'int', 'sendPaySlip' => 'int', + 'submitForProcessing' => 'int', 'submitRti' => 'int' ]; @@ -74,11 +74,11 @@ class PaySchedulePeriodEventsConfig implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPIFormats = [ - 'submitForProcessing' => 'int32', - 'sendForApproval' => 'int32', 'approval' => 'int32', 'finalise' => 'int32', + 'sendForApproval' => 'int32', 'sendPaySlip' => 'int32', + 'submitForProcessing' => 'int32', 'submitRti' => 'int32' ]; @@ -88,11 +88,11 @@ class PaySchedulePeriodEventsConfig implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPINullables = [ - 'submitForProcessing' => false, - 'sendForApproval' => false, 'approval' => false, 'finalise' => false, + 'sendForApproval' => false, 'sendPaySlip' => false, + 'submitForProcessing' => false, 'submitRti' => false ]; @@ -182,11 +182,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'submitForProcessing' => 'SubmitForProcessing', - 'sendForApproval' => 'SendForApproval', 'approval' => 'Approval', 'finalise' => 'Finalise', + 'sendForApproval' => 'SendForApproval', 'sendPaySlip' => 'SendPaySlip', + 'submitForProcessing' => 'SubmitForProcessing', 'submitRti' => 'SubmitRti' ]; @@ -196,11 +196,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'submitForProcessing' => 'setSubmitForProcessing', - 'sendForApproval' => 'setSendForApproval', 'approval' => 'setApproval', 'finalise' => 'setFinalise', + 'sendForApproval' => 'setSendForApproval', 'sendPaySlip' => 'setSendPaySlip', + 'submitForProcessing' => 'setSubmitForProcessing', 'submitRti' => 'setSubmitRti' ]; @@ -210,11 +210,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'submitForProcessing' => 'getSubmitForProcessing', - 'sendForApproval' => 'getSendForApproval', 'approval' => 'getApproval', 'finalise' => 'getFinalise', + 'sendForApproval' => 'getSendForApproval', 'sendPaySlip' => 'getSendPaySlip', + 'submitForProcessing' => 'getSubmitForProcessing', 'submitRti' => 'getSubmitRti' ]; @@ -274,11 +274,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('submitForProcessing', $data ?? [], null); - $this->setIfExists('sendForApproval', $data ?? [], null); $this->setIfExists('approval', $data ?? [], null); $this->setIfExists('finalise', $data ?? [], null); + $this->setIfExists('sendForApproval', $data ?? [], null); $this->setIfExists('sendPaySlip', $data ?? [], null); + $this->setIfExists('submitForProcessing', $data ?? [], null); $this->setIfExists('submitRti', $data ?? [], null); } @@ -325,136 +325,136 @@ public function valid(): bool /** - * Gets submitForProcessing + * Gets approval * * @return int|null */ - public function getSubmitForProcessing(): ?int + public function getApproval(): ?int { - return $this->container['submitForProcessing']; + return $this->container['approval']; } /** - * Sets submitForProcessing + * Sets approval * - * @param int|null $submitForProcessing submitForProcessing + * @param int|null $approval approval * * @return $this */ - public function setSubmitForProcessing(?int $submitForProcessing): static + public function setApproval(?int $approval): static { - if (is_null($submitForProcessing)) { - throw new InvalidArgumentException('non-nullable submitForProcessing cannot be null'); + if (is_null($approval)) { + throw new InvalidArgumentException('non-nullable approval cannot be null'); } - $this->container['submitForProcessing'] = $submitForProcessing; + $this->container['approval'] = $approval; return $this; } /** - * Gets sendForApproval + * Gets finalise * * @return int|null */ - public function getSendForApproval(): ?int + public function getFinalise(): ?int { - return $this->container['sendForApproval']; + return $this->container['finalise']; } /** - * Sets sendForApproval + * Sets finalise * - * @param int|null $sendForApproval sendForApproval + * @param int|null $finalise finalise * * @return $this */ - public function setSendForApproval(?int $sendForApproval): static + public function setFinalise(?int $finalise): static { - if (is_null($sendForApproval)) { - throw new InvalidArgumentException('non-nullable sendForApproval cannot be null'); + if (is_null($finalise)) { + throw new InvalidArgumentException('non-nullable finalise cannot be null'); } - $this->container['sendForApproval'] = $sendForApproval; + $this->container['finalise'] = $finalise; return $this; } /** - * Gets approval + * Gets sendForApproval * * @return int|null */ - public function getApproval(): ?int + public function getSendForApproval(): ?int { - return $this->container['approval']; + return $this->container['sendForApproval']; } /** - * Sets approval + * Sets sendForApproval * - * @param int|null $approval approval + * @param int|null $sendForApproval sendForApproval * * @return $this */ - public function setApproval(?int $approval): static + public function setSendForApproval(?int $sendForApproval): static { - if (is_null($approval)) { - throw new InvalidArgumentException('non-nullable approval cannot be null'); + if (is_null($sendForApproval)) { + throw new InvalidArgumentException('non-nullable sendForApproval cannot be null'); } - $this->container['approval'] = $approval; + $this->container['sendForApproval'] = $sendForApproval; return $this; } /** - * Gets finalise + * Gets sendPaySlip * * @return int|null */ - public function getFinalise(): ?int + public function getSendPaySlip(): ?int { - return $this->container['finalise']; + return $this->container['sendPaySlip']; } /** - * Sets finalise + * Sets sendPaySlip * - * @param int|null $finalise finalise + * @param int|null $sendPaySlip sendPaySlip * * @return $this */ - public function setFinalise(?int $finalise): static + public function setSendPaySlip(?int $sendPaySlip): static { - if (is_null($finalise)) { - throw new InvalidArgumentException('non-nullable finalise cannot be null'); + if (is_null($sendPaySlip)) { + throw new InvalidArgumentException('non-nullable sendPaySlip cannot be null'); } - $this->container['finalise'] = $finalise; + $this->container['sendPaySlip'] = $sendPaySlip; return $this; } /** - * Gets sendPaySlip + * Gets submitForProcessing * * @return int|null */ - public function getSendPaySlip(): ?int + public function getSubmitForProcessing(): ?int { - return $this->container['sendPaySlip']; + return $this->container['submitForProcessing']; } /** - * Sets sendPaySlip + * Sets submitForProcessing * - * @param int|null $sendPaySlip sendPaySlip + * @param int|null $submitForProcessing submitForProcessing * * @return $this */ - public function setSendPaySlip(?int $sendPaySlip): static + public function setSubmitForProcessing(?int $submitForProcessing): static { - if (is_null($sendPaySlip)) { - throw new InvalidArgumentException('non-nullable sendPaySlip cannot be null'); + if (is_null($submitForProcessing)) { + throw new InvalidArgumentException('non-nullable submitForProcessing cannot be null'); } - $this->container['sendPaySlip'] = $sendPaySlip; + $this->container['submitForProcessing'] = $submitForProcessing; return $this; } diff --git a/src/Model/PaySpineReport.php b/src/Model/PaySpineReport.php index 9572a58..d1d8fec 100644 --- a/src/Model/PaySpineReport.php +++ b/src/Model/PaySpineReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class PaySpineReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\PaySpineReportLine[]', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -72,11 +72,11 @@ class PaySpineReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'isDraft' => null, 'lines' => null, 'report' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -85,11 +85,11 @@ class PaySpineReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'isDraft' => false, 'lines' => true, 'report' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'isDraft' => 'isDraft', 'lines' => 'lines', 'report' => 'report', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', 'report' => 'setReport', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', 'report' => 'getReport', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -316,6 +316,33 @@ public function valid(): bool } + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + /** * Gets lines * @@ -437,33 +464,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PaySpineReportLine.php b/src/Model/PaySpineReportLine.php index c7fbee3..f79c1f0 100644 --- a/src/Model/PaySpineReportLine.php +++ b/src/Model/PaySpineReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,23 +59,23 @@ class PaySpineReportLine implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'spineName' => 'string', + 'annualDecimals' => 'int', + 'annualRoundingRule' => '\SynergiTech\Staffology\Model\AnnualRoundingRule', + 'dailyDecimals' => 'int', + 'dailyDivisor' => 'float', + 'department' => 'string', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'fullTimeHours' => 'float', 'fullTimeWeeks' => 'float', - 'salaryFormula' => 'string', - 'hourlyDivisor' => 'float', + 'gradeEffectiveDate' => '\DateTime', 'hourlyDecimals' => 'int', - 'dailyDivisor' => 'float', - 'dailyDecimals' => 'int', - 'annualDecimals' => 'int', - 'annualRoundingRule' => '\SynergiTech\Staffology\Model\AnnualRoundingRule', + 'hourlyDivisor' => 'float', 'incrementRule' => '\SynergiTech\Staffology\Model\IncrementRule', - 'requiresLondonAllowance' => 'bool', - 'gradeEffectiveDate' => '\DateTime', - 'pointEffectiveDate' => '\DateTime', - 'employee' => '\SynergiTech\Staffology\Model\Item', 'payrollCode' => 'string', - 'department' => 'string' + 'pointEffectiveDate' => '\DateTime', + 'requiresLondonAllowance' => 'bool', + 'salaryFormula' => 'string', + 'spineName' => 'string' ]; /** @@ -84,23 +84,23 @@ class PaySpineReportLine implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'spineName' => null, + 'annualDecimals' => 'int32', + 'annualRoundingRule' => null, + 'dailyDecimals' => 'int32', + 'dailyDivisor' => 'double', + 'department' => null, + 'employee' => null, 'fullTimeHours' => 'double', 'fullTimeWeeks' => 'double', - 'salaryFormula' => null, - 'hourlyDivisor' => 'double', + 'gradeEffectiveDate' => 'date', 'hourlyDecimals' => 'int32', - 'dailyDivisor' => 'double', - 'dailyDecimals' => 'int32', - 'annualDecimals' => 'int32', - 'annualRoundingRule' => null, + 'hourlyDivisor' => 'double', 'incrementRule' => null, - 'requiresLondonAllowance' => null, - 'gradeEffectiveDate' => 'date', - 'pointEffectiveDate' => 'date', - 'employee' => null, 'payrollCode' => null, - 'department' => null + 'pointEffectiveDate' => 'date', + 'requiresLondonAllowance' => null, + 'salaryFormula' => null, + 'spineName' => null ]; /** @@ -109,23 +109,23 @@ class PaySpineReportLine implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'spineName' => true, + 'annualDecimals' => false, + 'annualRoundingRule' => false, + 'dailyDecimals' => false, + 'dailyDivisor' => false, + 'department' => true, + 'employee' => false, 'fullTimeHours' => false, 'fullTimeWeeks' => false, - 'salaryFormula' => true, - 'hourlyDivisor' => false, + 'gradeEffectiveDate' => false, 'hourlyDecimals' => false, - 'dailyDivisor' => false, - 'dailyDecimals' => false, - 'annualDecimals' => false, - 'annualRoundingRule' => false, + 'hourlyDivisor' => false, 'incrementRule' => false, - 'requiresLondonAllowance' => false, - 'gradeEffectiveDate' => false, - 'pointEffectiveDate' => false, - 'employee' => false, 'payrollCode' => true, - 'department' => true + 'pointEffectiveDate' => false, + 'requiresLondonAllowance' => false, + 'salaryFormula' => true, + 'spineName' => true ]; /** @@ -214,23 +214,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'spineName' => 'spineName', + 'annualDecimals' => 'annualDecimals', + 'annualRoundingRule' => 'annualRoundingRule', + 'dailyDecimals' => 'dailyDecimals', + 'dailyDivisor' => 'dailyDivisor', + 'department' => 'department', + 'employee' => 'employee', 'fullTimeHours' => 'fullTimeHours', 'fullTimeWeeks' => 'fullTimeWeeks', - 'salaryFormula' => 'salaryFormula', - 'hourlyDivisor' => 'hourlyDivisor', + 'gradeEffectiveDate' => 'gradeEffectiveDate', 'hourlyDecimals' => 'hourlyDecimals', - 'dailyDivisor' => 'dailyDivisor', - 'dailyDecimals' => 'dailyDecimals', - 'annualDecimals' => 'annualDecimals', - 'annualRoundingRule' => 'annualRoundingRule', + 'hourlyDivisor' => 'hourlyDivisor', 'incrementRule' => 'incrementRule', - 'requiresLondonAllowance' => 'requiresLondonAllowance', - 'gradeEffectiveDate' => 'gradeEffectiveDate', - 'pointEffectiveDate' => 'pointEffectiveDate', - 'employee' => 'employee', 'payrollCode' => 'payrollCode', - 'department' => 'department' + 'pointEffectiveDate' => 'pointEffectiveDate', + 'requiresLondonAllowance' => 'requiresLondonAllowance', + 'salaryFormula' => 'salaryFormula', + 'spineName' => 'spineName' ]; /** @@ -239,23 +239,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'spineName' => 'setSpineName', + 'annualDecimals' => 'setAnnualDecimals', + 'annualRoundingRule' => 'setAnnualRoundingRule', + 'dailyDecimals' => 'setDailyDecimals', + 'dailyDivisor' => 'setDailyDivisor', + 'department' => 'setDepartment', + 'employee' => 'setEmployee', 'fullTimeHours' => 'setFullTimeHours', 'fullTimeWeeks' => 'setFullTimeWeeks', - 'salaryFormula' => 'setSalaryFormula', - 'hourlyDivisor' => 'setHourlyDivisor', + 'gradeEffectiveDate' => 'setGradeEffectiveDate', 'hourlyDecimals' => 'setHourlyDecimals', - 'dailyDivisor' => 'setDailyDivisor', - 'dailyDecimals' => 'setDailyDecimals', - 'annualDecimals' => 'setAnnualDecimals', - 'annualRoundingRule' => 'setAnnualRoundingRule', + 'hourlyDivisor' => 'setHourlyDivisor', 'incrementRule' => 'setIncrementRule', - 'requiresLondonAllowance' => 'setRequiresLondonAllowance', - 'gradeEffectiveDate' => 'setGradeEffectiveDate', - 'pointEffectiveDate' => 'setPointEffectiveDate', - 'employee' => 'setEmployee', 'payrollCode' => 'setPayrollCode', - 'department' => 'setDepartment' + 'pointEffectiveDate' => 'setPointEffectiveDate', + 'requiresLondonAllowance' => 'setRequiresLondonAllowance', + 'salaryFormula' => 'setSalaryFormula', + 'spineName' => 'setSpineName' ]; /** @@ -264,23 +264,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'spineName' => 'getSpineName', + 'annualDecimals' => 'getAnnualDecimals', + 'annualRoundingRule' => 'getAnnualRoundingRule', + 'dailyDecimals' => 'getDailyDecimals', + 'dailyDivisor' => 'getDailyDivisor', + 'department' => 'getDepartment', + 'employee' => 'getEmployee', 'fullTimeHours' => 'getFullTimeHours', 'fullTimeWeeks' => 'getFullTimeWeeks', - 'salaryFormula' => 'getSalaryFormula', - 'hourlyDivisor' => 'getHourlyDivisor', + 'gradeEffectiveDate' => 'getGradeEffectiveDate', 'hourlyDecimals' => 'getHourlyDecimals', - 'dailyDivisor' => 'getDailyDivisor', - 'dailyDecimals' => 'getDailyDecimals', - 'annualDecimals' => 'getAnnualDecimals', - 'annualRoundingRule' => 'getAnnualRoundingRule', + 'hourlyDivisor' => 'getHourlyDivisor', 'incrementRule' => 'getIncrementRule', - 'requiresLondonAllowance' => 'getRequiresLondonAllowance', - 'gradeEffectiveDate' => 'getGradeEffectiveDate', - 'pointEffectiveDate' => 'getPointEffectiveDate', - 'employee' => 'getEmployee', 'payrollCode' => 'getPayrollCode', - 'department' => 'getDepartment' + 'pointEffectiveDate' => 'getPointEffectiveDate', + 'requiresLondonAllowance' => 'getRequiresLondonAllowance', + 'salaryFormula' => 'getSalaryFormula', + 'spineName' => 'getSpineName' ]; /** @@ -339,23 +339,23 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('spineName', $data ?? [], null); + $this->setIfExists('annualDecimals', $data ?? [], null); + $this->setIfExists('annualRoundingRule', $data ?? [], null); + $this->setIfExists('dailyDecimals', $data ?? [], null); + $this->setIfExists('dailyDivisor', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('fullTimeHours', $data ?? [], null); $this->setIfExists('fullTimeWeeks', $data ?? [], null); - $this->setIfExists('salaryFormula', $data ?? [], null); - $this->setIfExists('hourlyDivisor', $data ?? [], null); + $this->setIfExists('gradeEffectiveDate', $data ?? [], null); $this->setIfExists('hourlyDecimals', $data ?? [], null); - $this->setIfExists('dailyDivisor', $data ?? [], null); - $this->setIfExists('dailyDecimals', $data ?? [], null); - $this->setIfExists('annualDecimals', $data ?? [], null); - $this->setIfExists('annualRoundingRule', $data ?? [], null); + $this->setIfExists('hourlyDivisor', $data ?? [], null); $this->setIfExists('incrementRule', $data ?? [], null); - $this->setIfExists('requiresLondonAllowance', $data ?? [], null); - $this->setIfExists('gradeEffectiveDate', $data ?? [], null); - $this->setIfExists('pointEffectiveDate', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('pointEffectiveDate', $data ?? [], null); + $this->setIfExists('requiresLondonAllowance', $data ?? [], null); + $this->setIfExists('salaryFormula', $data ?? [], null); + $this->setIfExists('spineName', $data ?? [], null); } /** @@ -401,285 +401,305 @@ public function valid(): bool /** - * Gets spineName + * Gets annualDecimals * - * @return string|null + * @return int|null */ - public function getSpineName(): ?string + public function getAnnualDecimals(): ?int { - return $this->container['spineName']; + return $this->container['annualDecimals']; } /** - * Sets spineName + * Sets annualDecimals * - * @param string|null $spineName Name of the Pay Spine + * @param int|null $annualDecimals Number of decimal places to calculate Annual Salaries * * @return $this */ - public function setSpineName(?string $spineName): static + public function setAnnualDecimals(?int $annualDecimals): static { - if (is_null($spineName)) { - array_push($this->openAPINullablesSetToNull, 'spineName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('spineName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($annualDecimals)) { + throw new InvalidArgumentException('non-nullable annualDecimals cannot be null'); } - $this->container['spineName'] = $spineName; + $this->container['annualDecimals'] = $annualDecimals; return $this; } /** - * Gets fullTimeHours + * Gets annualRoundingRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\AnnualRoundingRule|null */ - public function getFullTimeHours(): ?float + public function getAnnualRoundingRule(): ?\SynergiTech\Staffology\Model\AnnualRoundingRule { - return $this->container['fullTimeHours']; + return $this->container['annualRoundingRule']; } /** - * Sets fullTimeHours + * Sets annualRoundingRule * - * @param float|null $fullTimeHours Maximum Full Time Hours on this Pay Spine + * @param \SynergiTech\Staffology\Model\AnnualRoundingRule|null $annualRoundingRule annualRoundingRule * * @return $this */ - public function setFullTimeHours(?float $fullTimeHours): static + public function setAnnualRoundingRule(?\SynergiTech\Staffology\Model\AnnualRoundingRule $annualRoundingRule): static { - if (is_null($fullTimeHours)) { - throw new InvalidArgumentException('non-nullable fullTimeHours cannot be null'); + if (is_null($annualRoundingRule)) { + throw new InvalidArgumentException('non-nullable annualRoundingRule cannot be null'); } - $this->container['fullTimeHours'] = $fullTimeHours; + $this->container['annualRoundingRule'] = $annualRoundingRule; return $this; } /** - * Gets fullTimeWeeks + * Gets dailyDecimals + * + * @return int|null + */ + public function getDailyDecimals(): ?int + { + return $this->container['dailyDecimals']; + } + + /** + * Sets dailyDecimals + * + * @param int|null $dailyDecimals Number of decimal places to calculate Daily Rates + * + * @return $this + */ + public function setDailyDecimals(?int $dailyDecimals): static + { + if (is_null($dailyDecimals)) { + throw new InvalidArgumentException('non-nullable dailyDecimals cannot be null'); + } + $this->container['dailyDecimals'] = $dailyDecimals; + + return $this; + } + + /** + * Gets dailyDivisor * * @return float|null */ - public function getFullTimeWeeks(): ?float + public function getDailyDivisor(): ?float { - return $this->container['fullTimeWeeks']; + return $this->container['dailyDivisor']; } /** - * Sets fullTimeWeeks + * Sets dailyDivisor * - * @param float|null $fullTimeWeeks Maximum Full Time Weeks on this Pay Spine + * @param float|null $dailyDivisor Days used to determine Full time Daily Rate * * @return $this */ - public function setFullTimeWeeks(?float $fullTimeWeeks): static + public function setDailyDivisor(?float $dailyDivisor): static { - if (is_null($fullTimeWeeks)) { - throw new InvalidArgumentException('non-nullable fullTimeWeeks cannot be null'); + if (is_null($dailyDivisor)) { + throw new InvalidArgumentException('non-nullable dailyDivisor cannot be null'); } - $this->container['fullTimeWeeks'] = $fullTimeWeeks; + $this->container['dailyDivisor'] = $dailyDivisor; return $this; } /** - * Gets salaryFormula + * Gets department * * @return string|null */ - public function getSalaryFormula(): ?string + public function getDepartment(): ?string { - return $this->container['salaryFormula']; + return $this->container['department']; } /** - * Sets salaryFormula + * Sets department * - * @param string|null $salaryFormula Formula used to derive annual salary + * @param string|null $department department * * @return $this */ - public function setSalaryFormula(?string $salaryFormula): static + public function setDepartment(?string $department): static { - if (is_null($salaryFormula)) { - array_push($this->openAPINullablesSetToNull, 'salaryFormula'); + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('salaryFormula', $nullablesSetToNull); + $index = array_search('department', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['salaryFormula'] = $salaryFormula; + $this->container['department'] = $department; return $this; } /** - * Gets hourlyDivisor + * Gets employee * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getHourlyDivisor(): ?float + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['hourlyDivisor']; + return $this->container['employee']; } /** - * Sets hourlyDivisor + * Sets employee * - * @param float|null $hourlyDivisor Hours used to determine Hourly Rate + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setHourlyDivisor(?float $hourlyDivisor): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($hourlyDivisor)) { - throw new InvalidArgumentException('non-nullable hourlyDivisor cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['hourlyDivisor'] = $hourlyDivisor; + $this->container['employee'] = $employee; return $this; } /** - * Gets hourlyDecimals + * Gets fullTimeHours * - * @return int|null + * @return float|null */ - public function getHourlyDecimals(): ?int + public function getFullTimeHours(): ?float { - return $this->container['hourlyDecimals']; + return $this->container['fullTimeHours']; } /** - * Sets hourlyDecimals + * Sets fullTimeHours * - * @param int|null $hourlyDecimals Number of decimal places to calculate Hourly Rates + * @param float|null $fullTimeHours Maximum Full Time Hours on this Pay Spine * * @return $this */ - public function setHourlyDecimals(?int $hourlyDecimals): static + public function setFullTimeHours(?float $fullTimeHours): static { - if (is_null($hourlyDecimals)) { - throw new InvalidArgumentException('non-nullable hourlyDecimals cannot be null'); + if (is_null($fullTimeHours)) { + throw new InvalidArgumentException('non-nullable fullTimeHours cannot be null'); } - $this->container['hourlyDecimals'] = $hourlyDecimals; + $this->container['fullTimeHours'] = $fullTimeHours; return $this; } /** - * Gets dailyDivisor + * Gets fullTimeWeeks * * @return float|null */ - public function getDailyDivisor(): ?float + public function getFullTimeWeeks(): ?float { - return $this->container['dailyDivisor']; + return $this->container['fullTimeWeeks']; } /** - * Sets dailyDivisor + * Sets fullTimeWeeks * - * @param float|null $dailyDivisor Days used to determine Full time Daily Rate + * @param float|null $fullTimeWeeks Maximum Full Time Weeks on this Pay Spine * * @return $this */ - public function setDailyDivisor(?float $dailyDivisor): static + public function setFullTimeWeeks(?float $fullTimeWeeks): static { - if (is_null($dailyDivisor)) { - throw new InvalidArgumentException('non-nullable dailyDivisor cannot be null'); + if (is_null($fullTimeWeeks)) { + throw new InvalidArgumentException('non-nullable fullTimeWeeks cannot be null'); } - $this->container['dailyDivisor'] = $dailyDivisor; + $this->container['fullTimeWeeks'] = $fullTimeWeeks; return $this; } /** - * Gets dailyDecimals + * Gets gradeEffectiveDate * - * @return int|null + * @return \DateTime|null */ - public function getDailyDecimals(): ?int + public function getGradeEffectiveDate(): ?\DateTime { - return $this->container['dailyDecimals']; + return $this->container['gradeEffectiveDate']; } /** - * Sets dailyDecimals + * Sets gradeEffectiveDate * - * @param int|null $dailyDecimals Number of decimal places to calculate Daily Rates + * @param \DateTime|null $gradeEffectiveDate Effective date for applicable grades * * @return $this */ - public function setDailyDecimals(?int $dailyDecimals): static + public function setGradeEffectiveDate(?\DateTime $gradeEffectiveDate): static { - if (is_null($dailyDecimals)) { - throw new InvalidArgumentException('non-nullable dailyDecimals cannot be null'); + if (is_null($gradeEffectiveDate)) { + throw new InvalidArgumentException('non-nullable gradeEffectiveDate cannot be null'); } - $this->container['dailyDecimals'] = $dailyDecimals; + $this->container['gradeEffectiveDate'] = $gradeEffectiveDate; return $this; } /** - * Gets annualDecimals + * Gets hourlyDecimals * * @return int|null */ - public function getAnnualDecimals(): ?int + public function getHourlyDecimals(): ?int { - return $this->container['annualDecimals']; + return $this->container['hourlyDecimals']; } /** - * Sets annualDecimals + * Sets hourlyDecimals * - * @param int|null $annualDecimals Number of decimal places to calculate Annual Salaries + * @param int|null $hourlyDecimals Number of decimal places to calculate Hourly Rates * * @return $this */ - public function setAnnualDecimals(?int $annualDecimals): static + public function setHourlyDecimals(?int $hourlyDecimals): static { - if (is_null($annualDecimals)) { - throw new InvalidArgumentException('non-nullable annualDecimals cannot be null'); + if (is_null($hourlyDecimals)) { + throw new InvalidArgumentException('non-nullable hourlyDecimals cannot be null'); } - $this->container['annualDecimals'] = $annualDecimals; + $this->container['hourlyDecimals'] = $hourlyDecimals; return $this; } /** - * Gets annualRoundingRule + * Gets hourlyDivisor * - * @return \SynergiTech\Staffology\Model\AnnualRoundingRule|null + * @return float|null */ - public function getAnnualRoundingRule(): ?\SynergiTech\Staffology\Model\AnnualRoundingRule + public function getHourlyDivisor(): ?float { - return $this->container['annualRoundingRule']; + return $this->container['hourlyDivisor']; } /** - * Sets annualRoundingRule + * Sets hourlyDivisor * - * @param \SynergiTech\Staffology\Model\AnnualRoundingRule|null $annualRoundingRule annualRoundingRule + * @param float|null $hourlyDivisor Hours used to determine Hourly Rate * * @return $this */ - public function setAnnualRoundingRule(?\SynergiTech\Staffology\Model\AnnualRoundingRule $annualRoundingRule): static + public function setHourlyDivisor(?float $hourlyDivisor): static { - if (is_null($annualRoundingRule)) { - throw new InvalidArgumentException('non-nullable annualRoundingRule cannot be null'); + if (is_null($hourlyDivisor)) { + throw new InvalidArgumentException('non-nullable hourlyDivisor cannot be null'); } - $this->container['annualRoundingRule'] = $annualRoundingRule; + $this->container['hourlyDivisor'] = $hourlyDivisor; return $this; } @@ -712,55 +732,35 @@ public function setIncrementRule(?\SynergiTech\Staffology\Model\IncrementRule $i } /** - * Gets requiresLondonAllowance - * - * @return bool|null - */ - public function getRequiresLondonAllowance(): ?bool - { - return $this->container['requiresLondonAllowance']; - } - - /** - * Sets requiresLondonAllowance - * - * @param bool|null $requiresLondonAllowance Requires LA column to be completed on the spine - * - * @return $this - */ - public function setRequiresLondonAllowance(?bool $requiresLondonAllowance): static - { - if (is_null($requiresLondonAllowance)) { - throw new InvalidArgumentException('non-nullable requiresLondonAllowance cannot be null'); - } - $this->container['requiresLondonAllowance'] = $requiresLondonAllowance; - - return $this; - } - - /** - * Gets gradeEffectiveDate + * Gets payrollCode * - * @return \DateTime|null + * @return string|null */ - public function getGradeEffectiveDate(): ?\DateTime + public function getPayrollCode(): ?string { - return $this->container['gradeEffectiveDate']; + return $this->container['payrollCode']; } /** - * Sets gradeEffectiveDate + * Sets payrollCode * - * @param \DateTime|null $gradeEffectiveDate Effective date for applicable grades + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setGradeEffectiveDate(?\DateTime $gradeEffectiveDate): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($gradeEffectiveDate)) { - throw new InvalidArgumentException('non-nullable gradeEffectiveDate cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['gradeEffectiveDate'] = $gradeEffectiveDate; + $this->container['payrollCode'] = $payrollCode; return $this; } @@ -793,96 +793,96 @@ public function setPointEffectiveDate(?\DateTime $pointEffectiveDate): static } /** - * Gets employee + * Gets requiresLondonAllowance * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getRequiresLondonAllowance(): ?bool { - return $this->container['employee']; + return $this->container['requiresLondonAllowance']; } /** - * Sets employee + * Sets requiresLondonAllowance * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param bool|null $requiresLondonAllowance Requires LA column to be completed on the spine * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setRequiresLondonAllowance(?bool $requiresLondonAllowance): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($requiresLondonAllowance)) { + throw new InvalidArgumentException('non-nullable requiresLondonAllowance cannot be null'); } - $this->container['employee'] = $employee; + $this->container['requiresLondonAllowance'] = $requiresLondonAllowance; return $this; } /** - * Gets payrollCode + * Gets salaryFormula * * @return string|null */ - public function getPayrollCode(): ?string + public function getSalaryFormula(): ?string { - return $this->container['payrollCode']; + return $this->container['salaryFormula']; } /** - * Sets payrollCode + * Sets salaryFormula * - * @param string|null $payrollCode payrollCode + * @param string|null $salaryFormula Formula used to derive annual salary * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setSalaryFormula(?string $salaryFormula): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); + if (is_null($salaryFormula)) { + array_push($this->openAPINullablesSetToNull, 'salaryFormula'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); + $index = array_search('salaryFormula', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payrollCode'] = $payrollCode; + $this->container['salaryFormula'] = $salaryFormula; return $this; } /** - * Gets department + * Gets spineName * * @return string|null */ - public function getDepartment(): ?string + public function getSpineName(): ?string { - return $this->container['department']; + return $this->container['spineName']; } /** - * Sets department + * Sets spineName * - * @param string|null $department department + * @param string|null $spineName Name of the Pay Spine * * @return $this */ - public function setDepartment(?string $department): static + public function setSpineName(?string $spineName): static { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); + if (is_null($spineName)) { + array_push($this->openAPINullablesSetToNull, 'spineName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); + $index = array_search('spineName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['department'] = $department; + $this->container['spineName'] = $spineName; return $this; } diff --git a/src/Model/PaySpineReportReportResponse.php b/src/Model/PaySpineReportReportResponse.php index b536e45..26a5211 100644 --- a/src/Model/PaySpineReportReportResponse.php +++ b/src/Model/PaySpineReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class PaySpineReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\PaySpineReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class PaySpineReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class PaySpineReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PaySpineYearsServiceEntitlementBasis.php b/src/Model/PaySpineYearsServiceEntitlementBasis.php index cc8cbd3..36c536d 100644 --- a/src/Model/PaySpineYearsServiceEntitlementBasis.php +++ b/src/Model/PaySpineYearsServiceEntitlementBasis.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/Payee.php b/src/Model/Payee.php index bbaafcc..df2a0e7 100644 --- a/src/Model/Payee.php +++ b/src/Model/Payee.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class Payee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'title' => 'string', 'bankDetails' => '\SynergiTech\Staffology\Model\BankDetails', - 'paymentDateRule' => '\SynergiTech\Staffology\Model\PaymentDateRule', - 'paymentDateDayOfWeek' => '\SynergiTech\Staffology\Model\DayOfWeek', - 'paymentDateDayOfMonth' => 'int', 'hasMinimumBankDetails' => 'bool', - 'id' => 'string' + 'id' => 'string', + 'paymentDateDayOfMonth' => 'int', + 'paymentDateDayOfWeek' => '\SynergiTech\Staffology\Model\DayOfWeek', + 'paymentDateRule' => '\SynergiTech\Staffology\Model\PaymentDateRule', + 'title' => 'string' ]; /** @@ -74,13 +74,13 @@ class Payee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'title' => null, 'bankDetails' => null, - 'paymentDateRule' => null, - 'paymentDateDayOfWeek' => null, - 'paymentDateDayOfMonth' => 'int32', 'hasMinimumBankDetails' => null, - 'id' => 'uuid' + 'id' => 'uuid', + 'paymentDateDayOfMonth' => 'int32', + 'paymentDateDayOfWeek' => null, + 'paymentDateRule' => null, + 'title' => null ]; /** @@ -89,13 +89,13 @@ class Payee implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'title' => false, 'bankDetails' => false, - 'paymentDateRule' => false, - 'paymentDateDayOfWeek' => false, - 'paymentDateDayOfMonth' => true, 'hasMinimumBankDetails' => false, - 'id' => false + 'id' => false, + 'paymentDateDayOfMonth' => true, + 'paymentDateDayOfWeek' => false, + 'paymentDateRule' => false, + 'title' => false ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'title' => 'title', 'bankDetails' => 'bankDetails', - 'paymentDateRule' => 'paymentDateRule', - 'paymentDateDayOfWeek' => 'paymentDateDayOfWeek', - 'paymentDateDayOfMonth' => 'paymentDateDayOfMonth', 'hasMinimumBankDetails' => 'hasMinimumBankDetails', - 'id' => 'id' + 'id' => 'id', + 'paymentDateDayOfMonth' => 'paymentDateDayOfMonth', + 'paymentDateDayOfWeek' => 'paymentDateDayOfWeek', + 'paymentDateRule' => 'paymentDateRule', + 'title' => 'title' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'title' => 'setTitle', 'bankDetails' => 'setBankDetails', - 'paymentDateRule' => 'setPaymentDateRule', - 'paymentDateDayOfWeek' => 'setPaymentDateDayOfWeek', - 'paymentDateDayOfMonth' => 'setPaymentDateDayOfMonth', 'hasMinimumBankDetails' => 'setHasMinimumBankDetails', - 'id' => 'setId' + 'id' => 'setId', + 'paymentDateDayOfMonth' => 'setPaymentDateDayOfMonth', + 'paymentDateDayOfWeek' => 'setPaymentDateDayOfWeek', + 'paymentDateRule' => 'setPaymentDateRule', + 'title' => 'setTitle' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'title' => 'getTitle', 'bankDetails' => 'getBankDetails', - 'paymentDateRule' => 'getPaymentDateRule', - 'paymentDateDayOfWeek' => 'getPaymentDateDayOfWeek', - 'paymentDateDayOfMonth' => 'getPaymentDateDayOfMonth', 'hasMinimumBankDetails' => 'getHasMinimumBankDetails', - 'id' => 'getId' + 'id' => 'getId', + 'paymentDateDayOfMonth' => 'getPaymentDateDayOfMonth', + 'paymentDateDayOfWeek' => 'getPaymentDateDayOfWeek', + 'paymentDateRule' => 'getPaymentDateRule', + 'title' => 'getTitle' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('bankDetails', $data ?? [], null); - $this->setIfExists('paymentDateRule', $data ?? [], null); - $this->setIfExists('paymentDateDayOfWeek', $data ?? [], null); - $this->setIfExists('paymentDateDayOfMonth', $data ?? [], null); $this->setIfExists('hasMinimumBankDetails', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('paymentDateDayOfMonth', $data ?? [], null); + $this->setIfExists('paymentDateDayOfWeek', $data ?? [], null); + $this->setIfExists('paymentDateRule', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -341,40 +341,6 @@ public function valid(): bool } - /** - * Gets title - * - * @return string - */ - public function getTitle(): string - { - return $this->container['title']; - } - - /** - * Sets title - * - * @param string $title The name of this Payee - * - * @return $this - */ - public function setTitle(string $title): static - { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); - } - if ((mb_strlen($title) > 50)) { - throw new InvalidArgumentException('invalid length for $title when calling Payee., must be smaller than or equal to 50.'); - } - if ((mb_strlen($title) < 1)) { - throw new InvalidArgumentException('invalid length for $title when calling Payee., must be bigger than or equal to 1.'); - } - - $this->container['title'] = $title; - - return $this; - } - /** * Gets bankDetails * @@ -403,55 +369,55 @@ public function setBankDetails(?\SynergiTech\Staffology\Model\BankDetails $bankD } /** - * Gets paymentDateRule + * Gets hasMinimumBankDetails * - * @return \SynergiTech\Staffology\Model\PaymentDateRule|null + * @return bool|null */ - public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule + public function getHasMinimumBankDetails(): ?bool { - return $this->container['paymentDateRule']; + return $this->container['hasMinimumBankDetails']; } /** - * Sets paymentDateRule + * Sets hasMinimumBankDetails * - * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule + * @param bool|null $hasMinimumBankDetails Denotes whether the payee has the minimum bank details to receive a payment * * @return $this */ - public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static + public function setHasMinimumBankDetails(?bool $hasMinimumBankDetails): static { - if (is_null($paymentDateRule)) { - throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); + if (is_null($hasMinimumBankDetails)) { + throw new InvalidArgumentException('non-nullable hasMinimumBankDetails cannot be null'); } - $this->container['paymentDateRule'] = $paymentDateRule; + $this->container['hasMinimumBankDetails'] = $hasMinimumBankDetails; return $this; } /** - * Gets paymentDateDayOfWeek + * Gets id * - * @return \SynergiTech\Staffology\Model\DayOfWeek|null + * @return string|null */ - public function getPaymentDateDayOfWeek(): ?\SynergiTech\Staffology\Model\DayOfWeek + public function getId(): ?string { - return $this->container['paymentDateDayOfWeek']; + return $this->container['id']; } /** - * Sets paymentDateDayOfWeek + * Sets id * - * @param \SynergiTech\Staffology\Model\DayOfWeek|null $paymentDateDayOfWeek paymentDateDayOfWeek + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setPaymentDateDayOfWeek(?\SynergiTech\Staffology\Model\DayOfWeek $paymentDateDayOfWeek): static + public function setId(?string $id): static { - if (is_null($paymentDateDayOfWeek)) { - throw new InvalidArgumentException('non-nullable paymentDateDayOfWeek cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['paymentDateDayOfWeek'] = $paymentDateDayOfWeek; + $this->container['id'] = $id; return $this; } @@ -491,55 +457,89 @@ public function setPaymentDateDayOfMonth(?int $paymentDateDayOfMonth): static } /** - * Gets hasMinimumBankDetails + * Gets paymentDateDayOfWeek * - * @return bool|null + * @return \SynergiTech\Staffology\Model\DayOfWeek|null */ - public function getHasMinimumBankDetails(): ?bool + public function getPaymentDateDayOfWeek(): ?\SynergiTech\Staffology\Model\DayOfWeek { - return $this->container['hasMinimumBankDetails']; + return $this->container['paymentDateDayOfWeek']; } /** - * Sets hasMinimumBankDetails + * Sets paymentDateDayOfWeek * - * @param bool|null $hasMinimumBankDetails Denotes whether the payee has the minimum bank details to receive a payment + * @param \SynergiTech\Staffology\Model\DayOfWeek|null $paymentDateDayOfWeek paymentDateDayOfWeek * * @return $this */ - public function setHasMinimumBankDetails(?bool $hasMinimumBankDetails): static + public function setPaymentDateDayOfWeek(?\SynergiTech\Staffology\Model\DayOfWeek $paymentDateDayOfWeek): static { - if (is_null($hasMinimumBankDetails)) { - throw new InvalidArgumentException('non-nullable hasMinimumBankDetails cannot be null'); + if (is_null($paymentDateDayOfWeek)) { + throw new InvalidArgumentException('non-nullable paymentDateDayOfWeek cannot be null'); } - $this->container['hasMinimumBankDetails'] = $hasMinimumBankDetails; + $this->container['paymentDateDayOfWeek'] = $paymentDateDayOfWeek; return $this; } /** - * Gets id + * Gets paymentDateRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\PaymentDateRule|null */ - public function getId(): ?string + public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule { - return $this->container['id']; + return $this->container['paymentDateRule']; } /** - * Sets id + * Sets paymentDateRule * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule * * @return $this */ - public function setId(?string $id): static + public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($paymentDateRule)) { + throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); } - $this->container['id'] = $id; + $this->container['paymentDateRule'] = $paymentDateRule; + + return $this; + } + + /** + * Gets title + * + * @return string + */ + public function getTitle(): string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title The name of this Payee + * + * @return $this + */ + public function setTitle(string $title): static + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if ((mb_strlen($title) > 50)) { + throw new InvalidArgumentException('invalid length for $title when calling Payee., must be smaller than or equal to 50.'); + } + if ((mb_strlen($title) < 1)) { + throw new InvalidArgumentException('invalid length for $title when calling Payee., must be bigger than or equal to 1.'); + } + + $this->container['title'] = $title; return $this; } diff --git a/src/Model/PayeeType.php b/src/Model/PayeeType.php index def2abc..87aa4ad 100644 --- a/src/Model/PayeeType.php +++ b/src/Model/PayeeType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PaylineCalculationData.php b/src/Model/PaylineCalculationData.php index d3ab916..bf03715 100644 --- a/src/Model/PaylineCalculationData.php +++ b/src/Model/PaylineCalculationData.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class PaylineCalculationData implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'fixedAnnualValue' => 'float', 'contractedHours' => 'float', 'contractedWeeks' => 'float', + 'fixedAnnualValue' => 'float', 'fullTimeEquivalent' => 'float', 'fullTimeHours' => 'float', - 'fullTimeWeeks' => 'float', - 'fullTimeSalary' => 'float' + 'fullTimeSalary' => 'float', + 'fullTimeWeeks' => 'float' ]; /** @@ -74,13 +74,13 @@ class PaylineCalculationData implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ - 'fixedAnnualValue' => 'double', 'contractedHours' => 'double', 'contractedWeeks' => 'double', + 'fixedAnnualValue' => 'double', 'fullTimeEquivalent' => 'double', 'fullTimeHours' => 'double', - 'fullTimeWeeks' => 'double', - 'fullTimeSalary' => 'double' + 'fullTimeSalary' => 'double', + 'fullTimeWeeks' => 'double' ]; /** @@ -89,13 +89,13 @@ class PaylineCalculationData implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ - 'fixedAnnualValue' => false, 'contractedHours' => false, 'contractedWeeks' => false, + 'fixedAnnualValue' => false, 'fullTimeEquivalent' => false, 'fullTimeHours' => false, - 'fullTimeWeeks' => false, - 'fullTimeSalary' => false + 'fullTimeSalary' => false, + 'fullTimeWeeks' => false ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'fixedAnnualValue' => 'fixedAnnualValue', 'contractedHours' => 'contractedHours', 'contractedWeeks' => 'contractedWeeks', + 'fixedAnnualValue' => 'fixedAnnualValue', 'fullTimeEquivalent' => 'fullTimeEquivalent', 'fullTimeHours' => 'fullTimeHours', - 'fullTimeWeeks' => 'fullTimeWeeks', - 'fullTimeSalary' => 'fullTimeSalary' + 'fullTimeSalary' => 'fullTimeSalary', + 'fullTimeWeeks' => 'fullTimeWeeks' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'fixedAnnualValue' => 'setFixedAnnualValue', 'contractedHours' => 'setContractedHours', 'contractedWeeks' => 'setContractedWeeks', + 'fixedAnnualValue' => 'setFixedAnnualValue', 'fullTimeEquivalent' => 'setFullTimeEquivalent', 'fullTimeHours' => 'setFullTimeHours', - 'fullTimeWeeks' => 'setFullTimeWeeks', - 'fullTimeSalary' => 'setFullTimeSalary' + 'fullTimeSalary' => 'setFullTimeSalary', + 'fullTimeWeeks' => 'setFullTimeWeeks' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'fixedAnnualValue' => 'getFixedAnnualValue', 'contractedHours' => 'getContractedHours', 'contractedWeeks' => 'getContractedWeeks', + 'fixedAnnualValue' => 'getFixedAnnualValue', 'fullTimeEquivalent' => 'getFullTimeEquivalent', 'fullTimeHours' => 'getFullTimeHours', - 'fullTimeWeeks' => 'getFullTimeWeeks', - 'fullTimeSalary' => 'getFullTimeSalary' + 'fullTimeSalary' => 'getFullTimeSalary', + 'fullTimeWeeks' => 'getFullTimeWeeks' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('fixedAnnualValue', $data ?? [], null); $this->setIfExists('contractedHours', $data ?? [], null); $this->setIfExists('contractedWeeks', $data ?? [], null); + $this->setIfExists('fixedAnnualValue', $data ?? [], null); $this->setIfExists('fullTimeEquivalent', $data ?? [], null); $this->setIfExists('fullTimeHours', $data ?? [], null); - $this->setIfExists('fullTimeWeeks', $data ?? [], null); $this->setIfExists('fullTimeSalary', $data ?? [], null); + $this->setIfExists('fullTimeWeeks', $data ?? [], null); } /** @@ -330,33 +330,6 @@ public function valid(): bool } - /** - * Gets fixedAnnualValue - * - * @return float|null - */ - public function getFixedAnnualValue(): ?float - { - return $this->container['fixedAnnualValue']; - } - - /** - * Sets fixedAnnualValue - * - * @param float|null $fixedAnnualValue PaySpine full time annual value - * - * @return $this - */ - public function setFixedAnnualValue(?float $fixedAnnualValue): static - { - if (is_null($fixedAnnualValue)) { - throw new InvalidArgumentException('non-nullable fixedAnnualValue cannot be null'); - } - $this->container['fixedAnnualValue'] = $fixedAnnualValue; - - return $this; - } - /** * Gets contractedHours * @@ -411,6 +384,33 @@ public function setContractedWeeks(?float $contractedWeeks): static return $this; } + /** + * Gets fixedAnnualValue + * + * @return float|null + */ + public function getFixedAnnualValue(): ?float + { + return $this->container['fixedAnnualValue']; + } + + /** + * Sets fixedAnnualValue + * + * @param float|null $fixedAnnualValue PaySpine full time annual value + * + * @return $this + */ + public function setFixedAnnualValue(?float $fixedAnnualValue): static + { + if (is_null($fixedAnnualValue)) { + throw new InvalidArgumentException('non-nullable fixedAnnualValue cannot be null'); + } + $this->container['fixedAnnualValue'] = $fixedAnnualValue; + + return $this; + } + /** * Gets fullTimeEquivalent * @@ -466,55 +466,55 @@ public function setFullTimeHours(?float $fullTimeHours): static } /** - * Gets fullTimeWeeks + * Gets fullTimeSalary * * @return float|null */ - public function getFullTimeWeeks(): ?float + public function getFullTimeSalary(): ?float { - return $this->container['fullTimeWeeks']; + return $this->container['fullTimeSalary']; } /** - * Sets fullTimeWeeks + * Sets fullTimeSalary * - * @param float|null $fullTimeWeeks PaySpine full time weeks + * @param float|null $fullTimeSalary PaySpine full time salary * * @return $this */ - public function setFullTimeWeeks(?float $fullTimeWeeks): static + public function setFullTimeSalary(?float $fullTimeSalary): static { - if (is_null($fullTimeWeeks)) { - throw new InvalidArgumentException('non-nullable fullTimeWeeks cannot be null'); + if (is_null($fullTimeSalary)) { + throw new InvalidArgumentException('non-nullable fullTimeSalary cannot be null'); } - $this->container['fullTimeWeeks'] = $fullTimeWeeks; + $this->container['fullTimeSalary'] = $fullTimeSalary; return $this; } /** - * Gets fullTimeSalary + * Gets fullTimeWeeks * * @return float|null */ - public function getFullTimeSalary(): ?float + public function getFullTimeWeeks(): ?float { - return $this->container['fullTimeSalary']; + return $this->container['fullTimeWeeks']; } /** - * Sets fullTimeSalary + * Sets fullTimeWeeks * - * @param float|null $fullTimeSalary PaySpine full time salary + * @param float|null $fullTimeWeeks PaySpine full time weeks * * @return $this */ - public function setFullTimeSalary(?float $fullTimeSalary): static + public function setFullTimeWeeks(?float $fullTimeWeeks): static { - if (is_null($fullTimeSalary)) { - throw new InvalidArgumentException('non-nullable fullTimeSalary cannot be null'); + if (is_null($fullTimeWeeks)) { + throw new InvalidArgumentException('non-nullable fullTimeWeeks cannot be null'); } - $this->container['fullTimeSalary'] = $fullTimeSalary; + $this->container['fullTimeWeeks'] = $fullTimeWeeks; return $this; } diff --git a/src/Model/PaymentDateRule.php b/src/Model/PaymentDateRule.php index 76f1702..f4ab586 100644 --- a/src/Model/PaymentDateRule.php +++ b/src/Model/PaymentDateRule.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PaymentDateType.php b/src/Model/PaymentDateType.php index aa70886..9bb923b 100644 --- a/src/Model/PaymentDateType.php +++ b/src/Model/PaymentDateType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PaymentMethodAfterLeaving.php b/src/Model/PaymentMethodAfterLeaving.php index 6f76dc7..bc97ae6 100644 --- a/src/Model/PaymentMethodAfterLeaving.php +++ b/src/Model/PaymentMethodAfterLeaving.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PaymentsCsvMapping.php b/src/Model/PaymentsCsvMapping.php index 86fceb3..6f46c86 100644 --- a/src/Model/PaymentsCsvMapping.php +++ b/src/Model/PaymentsCsvMapping.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,34 +60,34 @@ class PaymentsCsvMapping implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', - 'type' => '\SynergiTech\Staffology\Model\PaymentsCsvMappingType', - 'importBehaviour' => 'int', - 'payBasis' => '\SynergiTech\Staffology\Model\PayBasis', - 'hasHeader' => 'bool', - 'payrollCodeIndex' => 'int', - 'employerIdIndex' => 'int', - 'roleReferenceIndex' => 'int', - 'payAmountIndex' => 'int', - 'payAmountMultiplierIndex' => 'int', - 'noteIndex' => 'int', - 'payCodeIndex' => 'int', - 'hasPaylineCosting' => 'bool', - 'departmentIndex' => 'int', + 'analysisCategoryIndexes' => '\SynergiTech\Staffology\Model\AnalysisCategoryIndex[]', + 'analysisCategoryIndexesJson' => 'string', + 'autoAdjustForLeaveIndex' => 'int', + 'columns' => '\SynergiTech\Staffology\Model\PaymentsCsvMappingColumn[]', + 'contributesToBasicPayIndex' => 'int', 'costCentreIndex' => 'int', + 'departmentIndex' => 'int', 'effectiveFromIndex' => 'int', 'effectiveToIndex' => 'int', - 'isAutomaticBackPayIndex' => 'int', + 'employerIdIndex' => 'int', + 'hasHeader' => 'bool', + 'hasPaylineCosting' => 'bool', + 'id' => 'string', 'ignoreInitialBackPayIndex' => 'int', - 'contributesToBasicPayIndex' => 'int', - 'autoAdjustForLeaveIndex' => 'int', - 'analysisCategoryIndexesJson' => 'string', - 'paySpineIndex' => 'int', + 'importBehaviour' => 'int', + 'isAutomaticBackPayIndex' => 'int', + 'name' => 'string', + 'noteIndex' => 'int', + 'payAmountIndex' => 'int', + 'payAmountMultiplierIndex' => 'int', + 'payBasis' => '\SynergiTech\Staffology\Model\PayBasis', + 'payCodeIndex' => 'int', 'payGradeIndex' => 'int', + 'paySpineIndex' => 'int', + 'payrollCodeIndex' => 'int', + 'roleReferenceIndex' => 'int', 'spinePointIndex' => 'int', - 'analysisCategoryIndexes' => '\SynergiTech\Staffology\Model\AnalysisCategoryIndex[]', - 'columns' => '\SynergiTech\Staffology\Model\PaymentsCsvMappingColumn[]', - 'id' => 'string' + 'type' => '\SynergiTech\Staffology\Model\PaymentsCsvMappingType' ]; /** @@ -96,34 +96,34 @@ class PaymentsCsvMapping implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'name' => null, - 'type' => null, - 'importBehaviour' => 'int32', - 'payBasis' => null, - 'hasHeader' => null, - 'payrollCodeIndex' => 'int32', - 'employerIdIndex' => 'int32', - 'roleReferenceIndex' => 'int32', - 'payAmountIndex' => 'int32', - 'payAmountMultiplierIndex' => 'int32', - 'noteIndex' => 'int32', - 'payCodeIndex' => 'int32', - 'hasPaylineCosting' => null, - 'departmentIndex' => 'int32', + 'analysisCategoryIndexes' => null, + 'analysisCategoryIndexesJson' => null, + 'autoAdjustForLeaveIndex' => 'int32', + 'columns' => null, + 'contributesToBasicPayIndex' => 'int32', 'costCentreIndex' => 'int32', + 'departmentIndex' => 'int32', 'effectiveFromIndex' => 'int32', 'effectiveToIndex' => 'int32', - 'isAutomaticBackPayIndex' => 'int32', + 'employerIdIndex' => 'int32', + 'hasHeader' => null, + 'hasPaylineCosting' => null, + 'id' => 'uuid', 'ignoreInitialBackPayIndex' => 'int32', - 'contributesToBasicPayIndex' => 'int32', - 'autoAdjustForLeaveIndex' => 'int32', - 'analysisCategoryIndexesJson' => null, - 'paySpineIndex' => 'int32', + 'importBehaviour' => 'int32', + 'isAutomaticBackPayIndex' => 'int32', + 'name' => null, + 'noteIndex' => 'int32', + 'payAmountIndex' => 'int32', + 'payAmountMultiplierIndex' => 'int32', + 'payBasis' => null, + 'payCodeIndex' => 'int32', 'payGradeIndex' => 'int32', + 'paySpineIndex' => 'int32', + 'payrollCodeIndex' => 'int32', + 'roleReferenceIndex' => 'int32', 'spinePointIndex' => 'int32', - 'analysisCategoryIndexes' => null, - 'columns' => null, - 'id' => 'uuid' + 'type' => null ]; /** @@ -132,34 +132,34 @@ class PaymentsCsvMapping implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'name' => false, - 'type' => false, - 'importBehaviour' => false, - 'payBasis' => false, - 'hasHeader' => false, - 'payrollCodeIndex' => false, - 'employerIdIndex' => false, - 'roleReferenceIndex' => false, - 'payAmountIndex' => false, - 'payAmountMultiplierIndex' => false, - 'noteIndex' => false, - 'payCodeIndex' => false, - 'hasPaylineCosting' => false, - 'departmentIndex' => false, + 'analysisCategoryIndexes' => true, + 'analysisCategoryIndexesJson' => true, + 'autoAdjustForLeaveIndex' => false, + 'columns' => true, + 'contributesToBasicPayIndex' => false, 'costCentreIndex' => false, + 'departmentIndex' => false, 'effectiveFromIndex' => false, 'effectiveToIndex' => false, - 'isAutomaticBackPayIndex' => false, + 'employerIdIndex' => false, + 'hasHeader' => false, + 'hasPaylineCosting' => false, + 'id' => false, 'ignoreInitialBackPayIndex' => false, - 'contributesToBasicPayIndex' => false, - 'autoAdjustForLeaveIndex' => false, - 'analysisCategoryIndexesJson' => true, - 'paySpineIndex' => false, + 'importBehaviour' => false, + 'isAutomaticBackPayIndex' => false, + 'name' => false, + 'noteIndex' => false, + 'payAmountIndex' => false, + 'payAmountMultiplierIndex' => false, + 'payBasis' => false, + 'payCodeIndex' => false, 'payGradeIndex' => false, + 'paySpineIndex' => false, + 'payrollCodeIndex' => false, + 'roleReferenceIndex' => false, 'spinePointIndex' => false, - 'analysisCategoryIndexes' => true, - 'columns' => true, - 'id' => false + 'type' => false ]; /** @@ -248,34 +248,34 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', - 'type' => 'type', - 'importBehaviour' => 'importBehaviour', - 'payBasis' => 'payBasis', - 'hasHeader' => 'hasHeader', - 'payrollCodeIndex' => 'payrollCodeIndex', - 'employerIdIndex' => 'employerIdIndex', - 'roleReferenceIndex' => 'roleReferenceIndex', - 'payAmountIndex' => 'payAmountIndex', - 'payAmountMultiplierIndex' => 'payAmountMultiplierIndex', - 'noteIndex' => 'noteIndex', - 'payCodeIndex' => 'payCodeIndex', - 'hasPaylineCosting' => 'hasPaylineCosting', - 'departmentIndex' => 'departmentIndex', + 'analysisCategoryIndexes' => 'analysisCategoryIndexes', + 'analysisCategoryIndexesJson' => 'analysisCategoryIndexesJson', + 'autoAdjustForLeaveIndex' => 'autoAdjustForLeaveIndex', + 'columns' => 'columns', + 'contributesToBasicPayIndex' => 'contributesToBasicPayIndex', 'costCentreIndex' => 'costCentreIndex', + 'departmentIndex' => 'departmentIndex', 'effectiveFromIndex' => 'effectiveFromIndex', 'effectiveToIndex' => 'effectiveToIndex', - 'isAutomaticBackPayIndex' => 'isAutomaticBackPayIndex', + 'employerIdIndex' => 'employerIdIndex', + 'hasHeader' => 'hasHeader', + 'hasPaylineCosting' => 'hasPaylineCosting', + 'id' => 'id', 'ignoreInitialBackPayIndex' => 'ignoreInitialBackPayIndex', - 'contributesToBasicPayIndex' => 'contributesToBasicPayIndex', - 'autoAdjustForLeaveIndex' => 'autoAdjustForLeaveIndex', - 'analysisCategoryIndexesJson' => 'analysisCategoryIndexesJson', - 'paySpineIndex' => 'paySpineIndex', + 'importBehaviour' => 'importBehaviour', + 'isAutomaticBackPayIndex' => 'isAutomaticBackPayIndex', + 'name' => 'name', + 'noteIndex' => 'noteIndex', + 'payAmountIndex' => 'payAmountIndex', + 'payAmountMultiplierIndex' => 'payAmountMultiplierIndex', + 'payBasis' => 'payBasis', + 'payCodeIndex' => 'payCodeIndex', 'payGradeIndex' => 'payGradeIndex', + 'paySpineIndex' => 'paySpineIndex', + 'payrollCodeIndex' => 'payrollCodeIndex', + 'roleReferenceIndex' => 'roleReferenceIndex', 'spinePointIndex' => 'spinePointIndex', - 'analysisCategoryIndexes' => 'analysisCategoryIndexes', - 'columns' => 'columns', - 'id' => 'id' + 'type' => 'type' ]; /** @@ -284,34 +284,34 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', - 'type' => 'setType', - 'importBehaviour' => 'setImportBehaviour', - 'payBasis' => 'setPayBasis', - 'hasHeader' => 'setHasHeader', - 'payrollCodeIndex' => 'setPayrollCodeIndex', - 'employerIdIndex' => 'setEmployerIdIndex', - 'roleReferenceIndex' => 'setRoleReferenceIndex', - 'payAmountIndex' => 'setPayAmountIndex', - 'payAmountMultiplierIndex' => 'setPayAmountMultiplierIndex', - 'noteIndex' => 'setNoteIndex', - 'payCodeIndex' => 'setPayCodeIndex', - 'hasPaylineCosting' => 'setHasPaylineCosting', - 'departmentIndex' => 'setDepartmentIndex', + 'analysisCategoryIndexes' => 'setAnalysisCategoryIndexes', + 'analysisCategoryIndexesJson' => 'setAnalysisCategoryIndexesJson', + 'autoAdjustForLeaveIndex' => 'setAutoAdjustForLeaveIndex', + 'columns' => 'setColumns', + 'contributesToBasicPayIndex' => 'setContributesToBasicPayIndex', 'costCentreIndex' => 'setCostCentreIndex', + 'departmentIndex' => 'setDepartmentIndex', 'effectiveFromIndex' => 'setEffectiveFromIndex', 'effectiveToIndex' => 'setEffectiveToIndex', - 'isAutomaticBackPayIndex' => 'setIsAutomaticBackPayIndex', + 'employerIdIndex' => 'setEmployerIdIndex', + 'hasHeader' => 'setHasHeader', + 'hasPaylineCosting' => 'setHasPaylineCosting', + 'id' => 'setId', 'ignoreInitialBackPayIndex' => 'setIgnoreInitialBackPayIndex', - 'contributesToBasicPayIndex' => 'setContributesToBasicPayIndex', - 'autoAdjustForLeaveIndex' => 'setAutoAdjustForLeaveIndex', - 'analysisCategoryIndexesJson' => 'setAnalysisCategoryIndexesJson', - 'paySpineIndex' => 'setPaySpineIndex', + 'importBehaviour' => 'setImportBehaviour', + 'isAutomaticBackPayIndex' => 'setIsAutomaticBackPayIndex', + 'name' => 'setName', + 'noteIndex' => 'setNoteIndex', + 'payAmountIndex' => 'setPayAmountIndex', + 'payAmountMultiplierIndex' => 'setPayAmountMultiplierIndex', + 'payBasis' => 'setPayBasis', + 'payCodeIndex' => 'setPayCodeIndex', 'payGradeIndex' => 'setPayGradeIndex', + 'paySpineIndex' => 'setPaySpineIndex', + 'payrollCodeIndex' => 'setPayrollCodeIndex', + 'roleReferenceIndex' => 'setRoleReferenceIndex', 'spinePointIndex' => 'setSpinePointIndex', - 'analysisCategoryIndexes' => 'setAnalysisCategoryIndexes', - 'columns' => 'setColumns', - 'id' => 'setId' + 'type' => 'setType' ]; /** @@ -320,34 +320,34 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', - 'type' => 'getType', - 'importBehaviour' => 'getImportBehaviour', - 'payBasis' => 'getPayBasis', - 'hasHeader' => 'getHasHeader', - 'payrollCodeIndex' => 'getPayrollCodeIndex', - 'employerIdIndex' => 'getEmployerIdIndex', - 'roleReferenceIndex' => 'getRoleReferenceIndex', - 'payAmountIndex' => 'getPayAmountIndex', - 'payAmountMultiplierIndex' => 'getPayAmountMultiplierIndex', - 'noteIndex' => 'getNoteIndex', - 'payCodeIndex' => 'getPayCodeIndex', - 'hasPaylineCosting' => 'getHasPaylineCosting', - 'departmentIndex' => 'getDepartmentIndex', + 'analysisCategoryIndexes' => 'getAnalysisCategoryIndexes', + 'analysisCategoryIndexesJson' => 'getAnalysisCategoryIndexesJson', + 'autoAdjustForLeaveIndex' => 'getAutoAdjustForLeaveIndex', + 'columns' => 'getColumns', + 'contributesToBasicPayIndex' => 'getContributesToBasicPayIndex', 'costCentreIndex' => 'getCostCentreIndex', + 'departmentIndex' => 'getDepartmentIndex', 'effectiveFromIndex' => 'getEffectiveFromIndex', 'effectiveToIndex' => 'getEffectiveToIndex', - 'isAutomaticBackPayIndex' => 'getIsAutomaticBackPayIndex', + 'employerIdIndex' => 'getEmployerIdIndex', + 'hasHeader' => 'getHasHeader', + 'hasPaylineCosting' => 'getHasPaylineCosting', + 'id' => 'getId', 'ignoreInitialBackPayIndex' => 'getIgnoreInitialBackPayIndex', - 'contributesToBasicPayIndex' => 'getContributesToBasicPayIndex', - 'autoAdjustForLeaveIndex' => 'getAutoAdjustForLeaveIndex', - 'analysisCategoryIndexesJson' => 'getAnalysisCategoryIndexesJson', - 'paySpineIndex' => 'getPaySpineIndex', + 'importBehaviour' => 'getImportBehaviour', + 'isAutomaticBackPayIndex' => 'getIsAutomaticBackPayIndex', + 'name' => 'getName', + 'noteIndex' => 'getNoteIndex', + 'payAmountIndex' => 'getPayAmountIndex', + 'payAmountMultiplierIndex' => 'getPayAmountMultiplierIndex', + 'payBasis' => 'getPayBasis', + 'payCodeIndex' => 'getPayCodeIndex', 'payGradeIndex' => 'getPayGradeIndex', + 'paySpineIndex' => 'getPaySpineIndex', + 'payrollCodeIndex' => 'getPayrollCodeIndex', + 'roleReferenceIndex' => 'getRoleReferenceIndex', 'spinePointIndex' => 'getSpinePointIndex', - 'analysisCategoryIndexes' => 'getAnalysisCategoryIndexes', - 'columns' => 'getColumns', - 'id' => 'getId' + 'type' => 'getType' ]; /** @@ -406,34 +406,34 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('importBehaviour', $data ?? [], null); - $this->setIfExists('payBasis', $data ?? [], null); - $this->setIfExists('hasHeader', $data ?? [], null); - $this->setIfExists('payrollCodeIndex', $data ?? [], null); + $this->setIfExists('analysisCategoryIndexes', $data ?? [], null); + $this->setIfExists('analysisCategoryIndexesJson', $data ?? [], null); + $this->setIfExists('autoAdjustForLeaveIndex', $data ?? [], null); + $this->setIfExists('columns', $data ?? [], null); + $this->setIfExists('contributesToBasicPayIndex', $data ?? [], null); + $this->setIfExists('costCentreIndex', $data ?? [], null); + $this->setIfExists('departmentIndex', $data ?? [], null); + $this->setIfExists('effectiveFromIndex', $data ?? [], null); + $this->setIfExists('effectiveToIndex', $data ?? [], null); $this->setIfExists('employerIdIndex', $data ?? [], null); - $this->setIfExists('roleReferenceIndex', $data ?? [], null); + $this->setIfExists('hasHeader', $data ?? [], null); + $this->setIfExists('hasPaylineCosting', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('ignoreInitialBackPayIndex', $data ?? [], null); + $this->setIfExists('importBehaviour', $data ?? [], null); + $this->setIfExists('isAutomaticBackPayIndex', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('noteIndex', $data ?? [], null); $this->setIfExists('payAmountIndex', $data ?? [], null); $this->setIfExists('payAmountMultiplierIndex', $data ?? [], null); - $this->setIfExists('noteIndex', $data ?? [], null); + $this->setIfExists('payBasis', $data ?? [], null); $this->setIfExists('payCodeIndex', $data ?? [], null); - $this->setIfExists('hasPaylineCosting', $data ?? [], null); - $this->setIfExists('departmentIndex', $data ?? [], null); - $this->setIfExists('costCentreIndex', $data ?? [], null); - $this->setIfExists('effectiveFromIndex', $data ?? [], null); - $this->setIfExists('effectiveToIndex', $data ?? [], null); - $this->setIfExists('isAutomaticBackPayIndex', $data ?? [], null); - $this->setIfExists('ignoreInitialBackPayIndex', $data ?? [], null); - $this->setIfExists('contributesToBasicPayIndex', $data ?? [], null); - $this->setIfExists('autoAdjustForLeaveIndex', $data ?? [], null); - $this->setIfExists('analysisCategoryIndexesJson', $data ?? [], null); - $this->setIfExists('paySpineIndex', $data ?? [], null); $this->setIfExists('payGradeIndex', $data ?? [], null); + $this->setIfExists('paySpineIndex', $data ?? [], null); + $this->setIfExists('payrollCodeIndex', $data ?? [], null); + $this->setIfExists('roleReferenceIndex', $data ?? [], null); $this->setIfExists('spinePointIndex', $data ?? [], null); - $this->setIfExists('analysisCategoryIndexes', $data ?? [], null); - $this->setIfExists('columns', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -490,332 +490,319 @@ public function valid(): bool /** - * Gets name + * Gets analysisCategoryIndexes * - * @return string + * @return \SynergiTech\Staffology\Model\AnalysisCategoryIndex[]|null */ - public function getName(): string + public function getAnalysisCategoryIndexes(): ?array { - return $this->container['name']; + return $this->container['analysisCategoryIndexes']; } /** - * Sets name + * Sets analysisCategoryIndexes * - * @param string $name name + * @param \SynergiTech\Staffology\Model\AnalysisCategoryIndex[]|null $analysisCategoryIndexes analysisCategoryIndexes * * @return $this */ - public function setName(string $name): static + public function setAnalysisCategoryIndexes(?array $analysisCategoryIndexes): static { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); - } - if ((mb_strlen($name) > 50)) { - throw new InvalidArgumentException('invalid length for $name when calling PaymentsCsvMapping., must be smaller than or equal to 50.'); - } - if ((mb_strlen($name) < 1)) { - throw new InvalidArgumentException('invalid length for $name when calling PaymentsCsvMapping., must be bigger than or equal to 1.'); + if (is_null($analysisCategoryIndexes)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryIndexes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('analysisCategoryIndexes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - - $this->container['name'] = $name; + $this->container['analysisCategoryIndexes'] = $analysisCategoryIndexes; return $this; } /** - * Gets type + * Gets analysisCategoryIndexesJson * - * @return \SynergiTech\Staffology\Model\PaymentsCsvMappingType|null + * @return string|null */ - public function getType(): ?\SynergiTech\Staffology\Model\PaymentsCsvMappingType + public function getAnalysisCategoryIndexesJson(): ?string { - return $this->container['type']; + return $this->container['analysisCategoryIndexesJson']; } /** - * Sets type + * Sets analysisCategoryIndexesJson * - * @param \SynergiTech\Staffology\Model\PaymentsCsvMappingType|null $type type + * @param string|null $analysisCategoryIndexesJson analysisCategoryIndexesJson * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\PaymentsCsvMappingType $type): static + public function setAnalysisCategoryIndexesJson(?string $analysisCategoryIndexesJson): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($analysisCategoryIndexesJson)) { + array_push($this->openAPINullablesSetToNull, 'analysisCategoryIndexesJson'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('analysisCategoryIndexesJson', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['type'] = $type; + $this->container['analysisCategoryIndexesJson'] = $analysisCategoryIndexesJson; return $this; } /** - * Gets importBehaviour + * Gets autoAdjustForLeaveIndex * * @return int|null */ - public function getImportBehaviour(): ?int + public function getAutoAdjustForLeaveIndex(): ?int { - return $this->container['importBehaviour']; + return $this->container['autoAdjustForLeaveIndex']; } /** - * Sets importBehaviour + * Sets autoAdjustForLeaveIndex * - * @param int|null $importBehaviour importBehaviour + * @param int|null $autoAdjustForLeaveIndex autoAdjustForLeaveIndex * * @return $this */ - public function setImportBehaviour(?int $importBehaviour): static + public function setAutoAdjustForLeaveIndex(?int $autoAdjustForLeaveIndex): static { - if (is_null($importBehaviour)) { - throw new InvalidArgumentException('non-nullable importBehaviour cannot be null'); + if (is_null($autoAdjustForLeaveIndex)) { + throw new InvalidArgumentException('non-nullable autoAdjustForLeaveIndex cannot be null'); } - $this->container['importBehaviour'] = $importBehaviour; + $this->container['autoAdjustForLeaveIndex'] = $autoAdjustForLeaveIndex; return $this; } /** - * Gets payBasis + * Gets columns * - * @return \SynergiTech\Staffology\Model\PayBasis|null + * @return \SynergiTech\Staffology\Model\PaymentsCsvMappingColumn[]|null */ - public function getPayBasis(): ?\SynergiTech\Staffology\Model\PayBasis + public function getColumns(): ?array { - return $this->container['payBasis']; + return $this->container['columns']; } /** - * Sets payBasis + * Sets columns * - * @param \SynergiTech\Staffology\Model\PayBasis|null $payBasis payBasis + * @param \SynergiTech\Staffology\Model\PaymentsCsvMappingColumn[]|null $columns columns * * @return $this */ - public function setPayBasis(?\SynergiTech\Staffology\Model\PayBasis $payBasis): static + public function setColumns(?array $columns): static { - if (is_null($payBasis)) { - throw new InvalidArgumentException('non-nullable payBasis cannot be null'); + if (is_null($columns)) { + array_push($this->openAPINullablesSetToNull, 'columns'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('columns', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payBasis'] = $payBasis; + $this->container['columns'] = $columns; return $this; } /** - * Gets hasHeader + * Gets contributesToBasicPayIndex * - * @return bool|null + * @return int|null */ - public function getHasHeader(): ?bool + public function getContributesToBasicPayIndex(): ?int { - return $this->container['hasHeader']; + return $this->container['contributesToBasicPayIndex']; } /** - * Sets hasHeader + * Sets contributesToBasicPayIndex * - * @param bool|null $hasHeader hasHeader + * @param int|null $contributesToBasicPayIndex contributesToBasicPayIndex * * @return $this */ - public function setHasHeader(?bool $hasHeader): static + public function setContributesToBasicPayIndex(?int $contributesToBasicPayIndex): static { - if (is_null($hasHeader)) { - throw new InvalidArgumentException('non-nullable hasHeader cannot be null'); + if (is_null($contributesToBasicPayIndex)) { + throw new InvalidArgumentException('non-nullable contributesToBasicPayIndex cannot be null'); } - $this->container['hasHeader'] = $hasHeader; + $this->container['contributesToBasicPayIndex'] = $contributesToBasicPayIndex; return $this; } /** - * Gets payrollCodeIndex + * Gets costCentreIndex * * @return int|null */ - public function getPayrollCodeIndex(): ?int + public function getCostCentreIndex(): ?int { - return $this->container['payrollCodeIndex']; + return $this->container['costCentreIndex']; } /** - * Sets payrollCodeIndex + * Sets costCentreIndex * - * @param int|null $payrollCodeIndex payrollCodeIndex + * @param int|null $costCentreIndex costCentreIndex * * @return $this */ - public function setPayrollCodeIndex(?int $payrollCodeIndex): static + public function setCostCentreIndex(?int $costCentreIndex): static { - if (is_null($payrollCodeIndex)) { - throw new InvalidArgumentException('non-nullable payrollCodeIndex cannot be null'); + if (is_null($costCentreIndex)) { + throw new InvalidArgumentException('non-nullable costCentreIndex cannot be null'); } - $this->container['payrollCodeIndex'] = $payrollCodeIndex; + $this->container['costCentreIndex'] = $costCentreIndex; return $this; } /** - * Gets employerIdIndex + * Gets departmentIndex * * @return int|null */ - public function getEmployerIdIndex(): ?int + public function getDepartmentIndex(): ?int { - return $this->container['employerIdIndex']; + return $this->container['departmentIndex']; } /** - * Sets employerIdIndex + * Sets departmentIndex * - * @param int|null $employerIdIndex employerIdIndex + * @param int|null $departmentIndex departmentIndex * * @return $this */ - public function setEmployerIdIndex(?int $employerIdIndex): static + public function setDepartmentIndex(?int $departmentIndex): static { - if (is_null($employerIdIndex)) { - throw new InvalidArgumentException('non-nullable employerIdIndex cannot be null'); + if (is_null($departmentIndex)) { + throw new InvalidArgumentException('non-nullable departmentIndex cannot be null'); } - $this->container['employerIdIndex'] = $employerIdIndex; + $this->container['departmentIndex'] = $departmentIndex; return $this; } /** - * Gets roleReferenceIndex + * Gets effectiveFromIndex * * @return int|null */ - public function getRoleReferenceIndex(): ?int + public function getEffectiveFromIndex(): ?int { - return $this->container['roleReferenceIndex']; + return $this->container['effectiveFromIndex']; } /** - * Sets roleReferenceIndex + * Sets effectiveFromIndex * - * @param int|null $roleReferenceIndex roleReferenceIndex + * @param int|null $effectiveFromIndex effectiveFromIndex * * @return $this */ - public function setRoleReferenceIndex(?int $roleReferenceIndex): static + public function setEffectiveFromIndex(?int $effectiveFromIndex): static { - if (is_null($roleReferenceIndex)) { - throw new InvalidArgumentException('non-nullable roleReferenceIndex cannot be null'); + if (is_null($effectiveFromIndex)) { + throw new InvalidArgumentException('non-nullable effectiveFromIndex cannot be null'); } - $this->container['roleReferenceIndex'] = $roleReferenceIndex; + $this->container['effectiveFromIndex'] = $effectiveFromIndex; return $this; } /** - * Gets payAmountIndex + * Gets effectiveToIndex * * @return int|null */ - public function getPayAmountIndex(): ?int + public function getEffectiveToIndex(): ?int { - return $this->container['payAmountIndex']; + return $this->container['effectiveToIndex']; } /** - * Sets payAmountIndex + * Sets effectiveToIndex * - * @param int|null $payAmountIndex payAmountIndex + * @param int|null $effectiveToIndex effectiveToIndex * * @return $this */ - public function setPayAmountIndex(?int $payAmountIndex): static + public function setEffectiveToIndex(?int $effectiveToIndex): static { - if (is_null($payAmountIndex)) { - throw new InvalidArgumentException('non-nullable payAmountIndex cannot be null'); + if (is_null($effectiveToIndex)) { + throw new InvalidArgumentException('non-nullable effectiveToIndex cannot be null'); } - $this->container['payAmountIndex'] = $payAmountIndex; + $this->container['effectiveToIndex'] = $effectiveToIndex; return $this; } /** - * Gets payAmountMultiplierIndex + * Gets employerIdIndex * * @return int|null */ - public function getPayAmountMultiplierIndex(): ?int + public function getEmployerIdIndex(): ?int { - return $this->container['payAmountMultiplierIndex']; + return $this->container['employerIdIndex']; } /** - * Sets payAmountMultiplierIndex + * Sets employerIdIndex * - * @param int|null $payAmountMultiplierIndex payAmountMultiplierIndex + * @param int|null $employerIdIndex employerIdIndex * * @return $this */ - public function setPayAmountMultiplierIndex(?int $payAmountMultiplierIndex): static + public function setEmployerIdIndex(?int $employerIdIndex): static { - if (is_null($payAmountMultiplierIndex)) { - throw new InvalidArgumentException('non-nullable payAmountMultiplierIndex cannot be null'); + if (is_null($employerIdIndex)) { + throw new InvalidArgumentException('non-nullable employerIdIndex cannot be null'); } - $this->container['payAmountMultiplierIndex'] = $payAmountMultiplierIndex; + $this->container['employerIdIndex'] = $employerIdIndex; return $this; } /** - * Gets noteIndex + * Gets hasHeader * - * @return int|null + * @return bool|null */ - public function getNoteIndex(): ?int + public function getHasHeader(): ?bool { - return $this->container['noteIndex']; + return $this->container['hasHeader']; } /** - * Sets noteIndex + * Sets hasHeader * - * @param int|null $noteIndex noteIndex + * @param bool|null $hasHeader hasHeader * * @return $this */ - public function setNoteIndex(?int $noteIndex): static - { - if (is_null($noteIndex)) { - throw new InvalidArgumentException('non-nullable noteIndex cannot be null'); - } - $this->container['noteIndex'] = $noteIndex; - - return $this; - } - - /** - * Gets payCodeIndex - * - * @return int|null - */ - public function getPayCodeIndex(): ?int - { - return $this->container['payCodeIndex']; - } - - /** - * Sets payCodeIndex - * - * @param int|null $payCodeIndex payCodeIndex - * - * @return $this - */ - public function setPayCodeIndex(?int $payCodeIndex): static + public function setHasHeader(?bool $hasHeader): static { - if (is_null($payCodeIndex)) { - throw new InvalidArgumentException('non-nullable payCodeIndex cannot be null'); + if (is_null($hasHeader)) { + throw new InvalidArgumentException('non-nullable hasHeader cannot be null'); } - $this->container['payCodeIndex'] = $payCodeIndex; + $this->container['hasHeader'] = $hasHeader; return $this; } @@ -848,278 +835,278 @@ public function setHasPaylineCosting(?bool $hasPaylineCosting): static } /** - * Gets departmentIndex + * Gets id * - * @return int|null + * @return string|null */ - public function getDepartmentIndex(): ?int + public function getId(): ?string { - return $this->container['departmentIndex']; + return $this->container['id']; } /** - * Sets departmentIndex + * Sets id * - * @param int|null $departmentIndex departmentIndex + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setDepartmentIndex(?int $departmentIndex): static + public function setId(?string $id): static { - if (is_null($departmentIndex)) { - throw new InvalidArgumentException('non-nullable departmentIndex cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['departmentIndex'] = $departmentIndex; + $this->container['id'] = $id; return $this; } /** - * Gets costCentreIndex + * Gets ignoreInitialBackPayIndex * * @return int|null */ - public function getCostCentreIndex(): ?int + public function getIgnoreInitialBackPayIndex(): ?int { - return $this->container['costCentreIndex']; + return $this->container['ignoreInitialBackPayIndex']; } /** - * Sets costCentreIndex + * Sets ignoreInitialBackPayIndex * - * @param int|null $costCentreIndex costCentreIndex + * @param int|null $ignoreInitialBackPayIndex ignoreInitialBackPayIndex * * @return $this */ - public function setCostCentreIndex(?int $costCentreIndex): static + public function setIgnoreInitialBackPayIndex(?int $ignoreInitialBackPayIndex): static { - if (is_null($costCentreIndex)) { - throw new InvalidArgumentException('non-nullable costCentreIndex cannot be null'); + if (is_null($ignoreInitialBackPayIndex)) { + throw new InvalidArgumentException('non-nullable ignoreInitialBackPayIndex cannot be null'); } - $this->container['costCentreIndex'] = $costCentreIndex; + $this->container['ignoreInitialBackPayIndex'] = $ignoreInitialBackPayIndex; return $this; } /** - * Gets effectiveFromIndex + * Gets importBehaviour * * @return int|null */ - public function getEffectiveFromIndex(): ?int + public function getImportBehaviour(): ?int { - return $this->container['effectiveFromIndex']; + return $this->container['importBehaviour']; } /** - * Sets effectiveFromIndex + * Sets importBehaviour * - * @param int|null $effectiveFromIndex effectiveFromIndex + * @param int|null $importBehaviour importBehaviour * * @return $this */ - public function setEffectiveFromIndex(?int $effectiveFromIndex): static + public function setImportBehaviour(?int $importBehaviour): static { - if (is_null($effectiveFromIndex)) { - throw new InvalidArgumentException('non-nullable effectiveFromIndex cannot be null'); + if (is_null($importBehaviour)) { + throw new InvalidArgumentException('non-nullable importBehaviour cannot be null'); } - $this->container['effectiveFromIndex'] = $effectiveFromIndex; + $this->container['importBehaviour'] = $importBehaviour; return $this; } /** - * Gets effectiveToIndex + * Gets isAutomaticBackPayIndex * * @return int|null */ - public function getEffectiveToIndex(): ?int + public function getIsAutomaticBackPayIndex(): ?int { - return $this->container['effectiveToIndex']; + return $this->container['isAutomaticBackPayIndex']; } /** - * Sets effectiveToIndex + * Sets isAutomaticBackPayIndex * - * @param int|null $effectiveToIndex effectiveToIndex + * @param int|null $isAutomaticBackPayIndex isAutomaticBackPayIndex * * @return $this */ - public function setEffectiveToIndex(?int $effectiveToIndex): static + public function setIsAutomaticBackPayIndex(?int $isAutomaticBackPayIndex): static { - if (is_null($effectiveToIndex)) { - throw new InvalidArgumentException('non-nullable effectiveToIndex cannot be null'); + if (is_null($isAutomaticBackPayIndex)) { + throw new InvalidArgumentException('non-nullable isAutomaticBackPayIndex cannot be null'); } - $this->container['effectiveToIndex'] = $effectiveToIndex; + $this->container['isAutomaticBackPayIndex'] = $isAutomaticBackPayIndex; return $this; } /** - * Gets isAutomaticBackPayIndex + * Gets name * - * @return int|null + * @return string */ - public function getIsAutomaticBackPayIndex(): ?int + public function getName(): string { - return $this->container['isAutomaticBackPayIndex']; + return $this->container['name']; } /** - * Sets isAutomaticBackPayIndex + * Sets name * - * @param int|null $isAutomaticBackPayIndex isAutomaticBackPayIndex + * @param string $name name * * @return $this */ - public function setIsAutomaticBackPayIndex(?int $isAutomaticBackPayIndex): static + public function setName(string $name): static { - if (is_null($isAutomaticBackPayIndex)) { - throw new InvalidArgumentException('non-nullable isAutomaticBackPayIndex cannot be null'); + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['isAutomaticBackPayIndex'] = $isAutomaticBackPayIndex; + if ((mb_strlen($name) > 50)) { + throw new InvalidArgumentException('invalid length for $name when calling PaymentsCsvMapping., must be smaller than or equal to 50.'); + } + if ((mb_strlen($name) < 1)) { + throw new InvalidArgumentException('invalid length for $name when calling PaymentsCsvMapping., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; return $this; } /** - * Gets ignoreInitialBackPayIndex + * Gets noteIndex * * @return int|null */ - public function getIgnoreInitialBackPayIndex(): ?int + public function getNoteIndex(): ?int { - return $this->container['ignoreInitialBackPayIndex']; + return $this->container['noteIndex']; } /** - * Sets ignoreInitialBackPayIndex + * Sets noteIndex * - * @param int|null $ignoreInitialBackPayIndex ignoreInitialBackPayIndex + * @param int|null $noteIndex noteIndex * * @return $this */ - public function setIgnoreInitialBackPayIndex(?int $ignoreInitialBackPayIndex): static + public function setNoteIndex(?int $noteIndex): static { - if (is_null($ignoreInitialBackPayIndex)) { - throw new InvalidArgumentException('non-nullable ignoreInitialBackPayIndex cannot be null'); + if (is_null($noteIndex)) { + throw new InvalidArgumentException('non-nullable noteIndex cannot be null'); } - $this->container['ignoreInitialBackPayIndex'] = $ignoreInitialBackPayIndex; + $this->container['noteIndex'] = $noteIndex; return $this; } /** - * Gets contributesToBasicPayIndex + * Gets payAmountIndex * * @return int|null */ - public function getContributesToBasicPayIndex(): ?int + public function getPayAmountIndex(): ?int { - return $this->container['contributesToBasicPayIndex']; + return $this->container['payAmountIndex']; } /** - * Sets contributesToBasicPayIndex + * Sets payAmountIndex * - * @param int|null $contributesToBasicPayIndex contributesToBasicPayIndex + * @param int|null $payAmountIndex payAmountIndex * * @return $this */ - public function setContributesToBasicPayIndex(?int $contributesToBasicPayIndex): static + public function setPayAmountIndex(?int $payAmountIndex): static { - if (is_null($contributesToBasicPayIndex)) { - throw new InvalidArgumentException('non-nullable contributesToBasicPayIndex cannot be null'); + if (is_null($payAmountIndex)) { + throw new InvalidArgumentException('non-nullable payAmountIndex cannot be null'); } - $this->container['contributesToBasicPayIndex'] = $contributesToBasicPayIndex; + $this->container['payAmountIndex'] = $payAmountIndex; return $this; } /** - * Gets autoAdjustForLeaveIndex + * Gets payAmountMultiplierIndex * * @return int|null */ - public function getAutoAdjustForLeaveIndex(): ?int + public function getPayAmountMultiplierIndex(): ?int { - return $this->container['autoAdjustForLeaveIndex']; + return $this->container['payAmountMultiplierIndex']; } /** - * Sets autoAdjustForLeaveIndex + * Sets payAmountMultiplierIndex * - * @param int|null $autoAdjustForLeaveIndex autoAdjustForLeaveIndex + * @param int|null $payAmountMultiplierIndex payAmountMultiplierIndex * * @return $this */ - public function setAutoAdjustForLeaveIndex(?int $autoAdjustForLeaveIndex): static + public function setPayAmountMultiplierIndex(?int $payAmountMultiplierIndex): static { - if (is_null($autoAdjustForLeaveIndex)) { - throw new InvalidArgumentException('non-nullable autoAdjustForLeaveIndex cannot be null'); + if (is_null($payAmountMultiplierIndex)) { + throw new InvalidArgumentException('non-nullable payAmountMultiplierIndex cannot be null'); } - $this->container['autoAdjustForLeaveIndex'] = $autoAdjustForLeaveIndex; + $this->container['payAmountMultiplierIndex'] = $payAmountMultiplierIndex; return $this; } /** - * Gets analysisCategoryIndexesJson + * Gets payBasis * - * @return string|null + * @return \SynergiTech\Staffology\Model\PayBasis|null */ - public function getAnalysisCategoryIndexesJson(): ?string + public function getPayBasis(): ?\SynergiTech\Staffology\Model\PayBasis { - return $this->container['analysisCategoryIndexesJson']; + return $this->container['payBasis']; } /** - * Sets analysisCategoryIndexesJson + * Sets payBasis * - * @param string|null $analysisCategoryIndexesJson analysisCategoryIndexesJson + * @param \SynergiTech\Staffology\Model\PayBasis|null $payBasis payBasis * * @return $this */ - public function setAnalysisCategoryIndexesJson(?string $analysisCategoryIndexesJson): static + public function setPayBasis(?\SynergiTech\Staffology\Model\PayBasis $payBasis): static { - if (is_null($analysisCategoryIndexesJson)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryIndexesJson'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryIndexesJson', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payBasis)) { + throw new InvalidArgumentException('non-nullable payBasis cannot be null'); } - $this->container['analysisCategoryIndexesJson'] = $analysisCategoryIndexesJson; + $this->container['payBasis'] = $payBasis; return $this; } /** - * Gets paySpineIndex + * Gets payCodeIndex * * @return int|null */ - public function getPaySpineIndex(): ?int + public function getPayCodeIndex(): ?int { - return $this->container['paySpineIndex']; + return $this->container['payCodeIndex']; } /** - * Sets paySpineIndex + * Sets payCodeIndex * - * @param int|null $paySpineIndex paySpineIndex + * @param int|null $payCodeIndex payCodeIndex * * @return $this */ - public function setPaySpineIndex(?int $paySpineIndex): static + public function setPayCodeIndex(?int $payCodeIndex): static { - if (is_null($paySpineIndex)) { - throw new InvalidArgumentException('non-nullable paySpineIndex cannot be null'); + if (is_null($payCodeIndex)) { + throw new InvalidArgumentException('non-nullable payCodeIndex cannot be null'); } - $this->container['paySpineIndex'] = $paySpineIndex; + $this->container['payCodeIndex'] = $payCodeIndex; return $this; } @@ -1152,123 +1139,136 @@ public function setPayGradeIndex(?int $payGradeIndex): static } /** - * Gets spinePointIndex + * Gets paySpineIndex * * @return int|null */ - public function getSpinePointIndex(): ?int + public function getPaySpineIndex(): ?int { - return $this->container['spinePointIndex']; + return $this->container['paySpineIndex']; } /** - * Sets spinePointIndex + * Sets paySpineIndex * - * @param int|null $spinePointIndex spinePointIndex + * @param int|null $paySpineIndex paySpineIndex * * @return $this */ - public function setSpinePointIndex(?int $spinePointIndex): static + public function setPaySpineIndex(?int $paySpineIndex): static { - if (is_null($spinePointIndex)) { - throw new InvalidArgumentException('non-nullable spinePointIndex cannot be null'); + if (is_null($paySpineIndex)) { + throw new InvalidArgumentException('non-nullable paySpineIndex cannot be null'); } - $this->container['spinePointIndex'] = $spinePointIndex; + $this->container['paySpineIndex'] = $paySpineIndex; return $this; } /** - * Gets analysisCategoryIndexes + * Gets payrollCodeIndex * - * @return \SynergiTech\Staffology\Model\AnalysisCategoryIndex[]|null + * @return int|null */ - public function getAnalysisCategoryIndexes(): ?array + public function getPayrollCodeIndex(): ?int { - return $this->container['analysisCategoryIndexes']; + return $this->container['payrollCodeIndex']; } /** - * Sets analysisCategoryIndexes + * Sets payrollCodeIndex * - * @param \SynergiTech\Staffology\Model\AnalysisCategoryIndex[]|null $analysisCategoryIndexes analysisCategoryIndexes + * @param int|null $payrollCodeIndex payrollCodeIndex * * @return $this */ - public function setAnalysisCategoryIndexes(?array $analysisCategoryIndexes): static + public function setPayrollCodeIndex(?int $payrollCodeIndex): static { - if (is_null($analysisCategoryIndexes)) { - array_push($this->openAPINullablesSetToNull, 'analysisCategoryIndexes'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('analysisCategoryIndexes', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payrollCodeIndex)) { + throw new InvalidArgumentException('non-nullable payrollCodeIndex cannot be null'); } - $this->container['analysisCategoryIndexes'] = $analysisCategoryIndexes; + $this->container['payrollCodeIndex'] = $payrollCodeIndex; return $this; } /** - * Gets columns + * Gets roleReferenceIndex * - * @return \SynergiTech\Staffology\Model\PaymentsCsvMappingColumn[]|null + * @return int|null */ - public function getColumns(): ?array + public function getRoleReferenceIndex(): ?int { - return $this->container['columns']; + return $this->container['roleReferenceIndex']; } /** - * Sets columns + * Sets roleReferenceIndex * - * @param \SynergiTech\Staffology\Model\PaymentsCsvMappingColumn[]|null $columns columns + * @param int|null $roleReferenceIndex roleReferenceIndex * * @return $this */ - public function setColumns(?array $columns): static + public function setRoleReferenceIndex(?int $roleReferenceIndex): static { - if (is_null($columns)) { - array_push($this->openAPINullablesSetToNull, 'columns'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('columns', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($roleReferenceIndex)) { + throw new InvalidArgumentException('non-nullable roleReferenceIndex cannot be null'); } - $this->container['columns'] = $columns; + $this->container['roleReferenceIndex'] = $roleReferenceIndex; return $this; } /** - * Gets id + * Gets spinePointIndex * - * @return string|null + * @return int|null */ - public function getId(): ?string + public function getSpinePointIndex(): ?int { - return $this->container['id']; + return $this->container['spinePointIndex']; } /** - * Sets id + * Sets spinePointIndex * - * @param string|null $id [readonly] The unique id of the object + * @param int|null $spinePointIndex spinePointIndex * * @return $this */ - public function setId(?string $id): static + public function setSpinePointIndex(?int $spinePointIndex): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($spinePointIndex)) { + throw new InvalidArgumentException('non-nullable spinePointIndex cannot be null'); } - $this->container['id'] = $id; + $this->container['spinePointIndex'] = $spinePointIndex; + + return $this; + } + + /** + * Gets type + * + * @return \SynergiTech\Staffology\Model\PaymentsCsvMappingType|null + */ + public function getType(): ?\SynergiTech\Staffology\Model\PaymentsCsvMappingType + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \SynergiTech\Staffology\Model\PaymentsCsvMappingType|null $type type + * + * @return $this + */ + public function setType(?\SynergiTech\Staffology\Model\PaymentsCsvMappingType $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; return $this; } diff --git a/src/Model/PaymentsCsvMappingColumn.php b/src/Model/PaymentsCsvMappingColumn.php index c0614a0..5147974 100644 --- a/src/Model/PaymentsCsvMappingColumn.php +++ b/src/Model/PaymentsCsvMappingColumn.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class PaymentsCsvMappingColumn implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPITypes = [ - 'title' => 'string', 'code' => 'string', - 'isReferenceOnly' => 'bool', 'colIndex' => 'int', 'isMultiplier' => 'bool', 'isNetToGross' => 'bool', + 'isReferenceOnly' => 'bool', 'rateColIndex' => 'int', - 'shouldSerializeRateColIndex' => 'bool' + 'shouldSerializeRateColIndex' => 'bool', + 'title' => 'string' ]; /** @@ -75,14 +75,14 @@ class PaymentsCsvMappingColumn implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPIFormats = [ - 'title' => null, 'code' => null, - 'isReferenceOnly' => null, 'colIndex' => 'int32', 'isMultiplier' => null, 'isNetToGross' => null, + 'isReferenceOnly' => null, 'rateColIndex' => 'int32', - 'shouldSerializeRateColIndex' => null + 'shouldSerializeRateColIndex' => null, + 'title' => null ]; /** @@ -91,14 +91,14 @@ class PaymentsCsvMappingColumn implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPINullables = [ - 'title' => false, 'code' => true, - 'isReferenceOnly' => false, 'colIndex' => false, 'isMultiplier' => false, 'isNetToGross' => false, + 'isReferenceOnly' => false, 'rateColIndex' => true, - 'shouldSerializeRateColIndex' => false + 'shouldSerializeRateColIndex' => false, + 'title' => false ]; /** @@ -187,14 +187,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'title' => 'title', 'code' => 'code', - 'isReferenceOnly' => 'isReferenceOnly', 'colIndex' => 'colIndex', 'isMultiplier' => 'isMultiplier', 'isNetToGross' => 'isNetToGross', + 'isReferenceOnly' => 'isReferenceOnly', 'rateColIndex' => 'rateColIndex', - 'shouldSerializeRateColIndex' => 'shouldSerializeRateColIndex' + 'shouldSerializeRateColIndex' => 'shouldSerializeRateColIndex', + 'title' => 'title' ]; /** @@ -203,14 +203,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'title' => 'setTitle', 'code' => 'setCode', - 'isReferenceOnly' => 'setIsReferenceOnly', 'colIndex' => 'setColIndex', 'isMultiplier' => 'setIsMultiplier', 'isNetToGross' => 'setIsNetToGross', + 'isReferenceOnly' => 'setIsReferenceOnly', 'rateColIndex' => 'setRateColIndex', - 'shouldSerializeRateColIndex' => 'setShouldSerializeRateColIndex' + 'shouldSerializeRateColIndex' => 'setShouldSerializeRateColIndex', + 'title' => 'setTitle' ]; /** @@ -219,14 +219,14 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'title' => 'getTitle', 'code' => 'getCode', - 'isReferenceOnly' => 'getIsReferenceOnly', 'colIndex' => 'getColIndex', 'isMultiplier' => 'getIsMultiplier', 'isNetToGross' => 'getIsNetToGross', + 'isReferenceOnly' => 'getIsReferenceOnly', 'rateColIndex' => 'getRateColIndex', - 'shouldSerializeRateColIndex' => 'getShouldSerializeRateColIndex' + 'shouldSerializeRateColIndex' => 'getShouldSerializeRateColIndex', + 'title' => 'getTitle' ]; /** @@ -285,14 +285,14 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('isReferenceOnly', $data ?? [], null); $this->setIfExists('colIndex', $data ?? [], null); $this->setIfExists('isMultiplier', $data ?? [], null); $this->setIfExists('isNetToGross', $data ?? [], null); + $this->setIfExists('isReferenceOnly', $data ?? [], null); $this->setIfExists('rateColIndex', $data ?? [], null); $this->setIfExists('shouldSerializeRateColIndex', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -348,40 +348,6 @@ public function valid(): bool } - /** - * Gets title - * - * @return string - */ - public function getTitle(): string - { - return $this->container['title']; - } - - /** - * Sets title - * - * @param string $title title - * - * @return $this - */ - public function setTitle(string $title): static - { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); - } - if ((mb_strlen($title) > 25)) { - throw new InvalidArgumentException('invalid length for $title when calling PaymentsCsvMappingColumn., must be smaller than or equal to 25.'); - } - if ((mb_strlen($title) < 1)) { - throw new InvalidArgumentException('invalid length for $title when calling PaymentsCsvMappingColumn., must be bigger than or equal to 1.'); - } - - $this->container['title'] = $title; - - return $this; - } - /** * Gets code * @@ -416,33 +382,6 @@ public function setCode(?string $code): static return $this; } - /** - * Gets isReferenceOnly - * - * @return bool|null - */ - public function getIsReferenceOnly(): ?bool - { - return $this->container['isReferenceOnly']; - } - - /** - * Sets isReferenceOnly - * - * @param bool|null $isReferenceOnly If set to true then no PayCode is mapped and this column is just for on-screen refernece only - * - * @return $this - */ - public function setIsReferenceOnly(?bool $isReferenceOnly): static - { - if (is_null($isReferenceOnly)) { - throw new InvalidArgumentException('non-nullable isReferenceOnly cannot be null'); - } - $this->container['isReferenceOnly'] = $isReferenceOnly; - - return $this; - } - /** * Gets colIndex * @@ -524,6 +463,33 @@ public function setIsNetToGross(?bool $isNetToGross): static return $this; } + /** + * Gets isReferenceOnly + * + * @return bool|null + */ + public function getIsReferenceOnly(): ?bool + { + return $this->container['isReferenceOnly']; + } + + /** + * Sets isReferenceOnly + * + * @param bool|null $isReferenceOnly If set to true then no PayCode is mapped and this column is just for on-screen refernece only + * + * @return $this + */ + public function setIsReferenceOnly(?bool $isReferenceOnly): static + { + if (is_null($isReferenceOnly)) { + throw new InvalidArgumentException('non-nullable isReferenceOnly cannot be null'); + } + $this->container['isReferenceOnly'] = $isReferenceOnly; + + return $this; + } + /** * Gets rateColIndex * @@ -584,6 +550,40 @@ public function setShouldSerializeRateColIndex(?bool $shouldSerializeRateColInde return $this; } + + /** + * Gets title + * + * @return string + */ + public function getTitle(): string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title title + * + * @return $this + */ + public function setTitle(string $title): static + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if ((mb_strlen($title) > 25)) { + throw new InvalidArgumentException('invalid length for $title when calling PaymentsCsvMappingColumn., must be smaller than or equal to 25.'); + } + if ((mb_strlen($title) < 1)) { + throw new InvalidArgumentException('invalid length for $title when calling PaymentsCsvMappingColumn., must be bigger than or equal to 1.'); + } + + $this->container['title'] = $title; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PaymentsCsvMappingType.php b/src/Model/PaymentsCsvMappingType.php index fe99711..42b4fc4 100644 --- a/src/Model/PaymentsCsvMappingType.php +++ b/src/Model/PaymentsCsvMappingType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayrollAnalysisCostBreakdownReport.php b/src/Model/PayrollAnalysisCostBreakdownReport.php index 434533a..f99bcc9 100644 --- a/src/Model/PayrollAnalysisCostBreakdownReport.php +++ b/src/Model/PayrollAnalysisCostBreakdownReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,22 +59,23 @@ class PayrollAnalysisCostBreakdownReport implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPITypes = [ - 'lines' => '\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportLine[]', - 'payCodes' => '\SynergiTech\Staffology\Model\PayCode[]', 'employeesPayRunTotals' => '\SynergiTech\Staffology\Model\EmployeePayRunTotal[]', 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'isDraft' => 'bool', + 'lines' => '\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportLine[]', 'ordinal' => 'int', + 'payCodes' => '\SynergiTech\Staffology\Model\PayCode[]', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -83,22 +84,23 @@ class PayrollAnalysisCostBreakdownReport implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPIFormats = [ - 'lines' => null, - 'payCodes' => null, 'employeesPayRunTotals' => null, 'employer' => null, - 'payPeriod' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'isDraft' => null, + 'lines' => null, 'ordinal' => 'int32', + 'payCodes' => null, + 'payPeriod' => null, 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -107,22 +109,23 @@ class PayrollAnalysisCostBreakdownReport implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPINullables = [ - 'lines' => true, - 'payCodes' => true, 'employeesPayRunTotals' => true, 'employer' => false, - 'payPeriod' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'isDraft' => false, + 'lines' => true, 'ordinal' => false, + 'payCodes' => true, + 'payPeriod' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -211,22 +214,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'lines' => 'lines', - 'payCodes' => 'payCodes', 'employeesPayRunTotals' => 'employeesPayRunTotals', 'employer' => 'employer', - 'payPeriod' => 'payPeriod', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'isDraft' => 'isDraft', + 'lines' => 'lines', 'ordinal' => 'ordinal', + 'payCodes' => 'payCodes', + 'payPeriod' => 'payPeriod', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -235,22 +239,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'lines' => 'setLines', - 'payCodes' => 'setPayCodes', 'employeesPayRunTotals' => 'setEmployeesPayRunTotals', 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'isDraft' => 'setIsDraft', + 'lines' => 'setLines', 'ordinal' => 'setOrdinal', + 'payCodes' => 'setPayCodes', + 'payPeriod' => 'setPayPeriod', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -259,22 +264,23 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'lines' => 'getLines', - 'payCodes' => 'getPayCodes', 'employeesPayRunTotals' => 'getEmployeesPayRunTotals', 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'isDraft' => 'getIsDraft', + 'lines' => 'getLines', 'ordinal' => 'getOrdinal', + 'payCodes' => 'getPayCodes', + 'payPeriod' => 'getPayPeriod', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -333,22 +339,23 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('lines', $data ?? [], null); - $this->setIfExists('payCodes', $data ?? [], null); $this->setIfExists('employeesPayRunTotals', $data ?? [], null); $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payCodes', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -394,157 +401,184 @@ public function valid(): bool /** - * Gets lines + * Gets employeesPayRunTotals * - * @return \SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportLine[]|null + * @return \SynergiTech\Staffology\Model\EmployeePayRunTotal[]|null */ - public function getLines(): ?array + public function getEmployeesPayRunTotals(): ?array { - return $this->container['lines']; + return $this->container['employeesPayRunTotals']; } /** - * Sets lines + * Sets employeesPayRunTotals * - * @param \SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportLine[]|null $lines lines + * @param \SynergiTech\Staffology\Model\EmployeePayRunTotal[]|null $employeesPayRunTotals employeesPayRunTotals * * @return $this */ - public function setLines(?array $lines): static + public function setEmployeesPayRunTotals(?array $employeesPayRunTotals): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); + if (is_null($employeesPayRunTotals)) { + array_push($this->openAPINullablesSetToNull, 'employeesPayRunTotals'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); + $index = array_search('employeesPayRunTotals', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lines'] = $lines; + $this->container['employeesPayRunTotals'] = $employeesPayRunTotals; return $this; } /** - * Gets payCodes + * Gets employer * - * @return \SynergiTech\Staffology\Model\PayCode[]|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getPayCodes(): ?array + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['payCodes']; + return $this->container['employer']; } /** - * Sets payCodes + * Sets employer * - * @param \SynergiTech\Staffology\Model\PayCode[]|null $payCodes payCodes + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setPayCodes(?array $payCodes): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($payCodes)) { - array_push($this->openAPINullablesSetToNull, 'payCodes'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCodes', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); } - $this->container['payCodes'] = $payCodes; + $this->container['employer'] = $employer; return $this; } /** - * Gets employeesPayRunTotals + * Gets endDate * - * @return \SynergiTech\Staffology\Model\EmployeePayRunTotal[]|null + * @return \DateTime|null */ - public function getEmployeesPayRunTotals(): ?array + public function getEndDate(): ?\DateTime { - return $this->container['employeesPayRunTotals']; + return $this->container['endDate']; } /** - * Sets employeesPayRunTotals + * Sets endDate * - * @param \SynergiTech\Staffology\Model\EmployeePayRunTotal[]|null $employeesPayRunTotals employeesPayRunTotals + * @param \DateTime|null $endDate endDate * * @return $this */ - public function setEmployeesPayRunTotals(?array $employeesPayRunTotals): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($employeesPayRunTotals)) { - array_push($this->openAPINullablesSetToNull, 'employeesPayRunTotals'); + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets endPeriodName + * + * @return string|null + */ + public function getEndPeriodName(): ?string + { + return $this->container['endPeriodName']; + } + + /** + * Sets endPeriodName + * + * @param string|null $endPeriodName endPeriodName + * + * @return $this + */ + public function setEndPeriodName(?string $endPeriodName): static + { + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeesPayRunTotals', $nullablesSetToNull); + $index = array_search('endPeriodName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employeesPayRunTotals'] = $employeesPayRunTotals; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets employer + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getIsDraft(): ?bool { - return $this->container['employer']; + return $this->container['isDraft']; } /** - * Sets employer + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param bool|null $isDraft isDraft * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['employer'] = $employer; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets payPeriod + * Gets lines * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return \SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportLine[]|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getLines(): ?array { - return $this->container['payPeriod']; + return $this->container['lines']; } /** - * Sets payPeriod + * Sets lines * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param \SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportLine[]|null $lines lines * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setLines(?array $lines): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriod'] = $payPeriod; + $this->container['lines'] = $lines; return $this; } @@ -577,204 +611,204 @@ public function setOrdinal(?int $ordinal): static } /** - * Gets period + * Gets payCodes * - * @return int|null + * @return \SynergiTech\Staffology\Model\PayCode[]|null */ - public function getPeriod(): ?int + public function getPayCodes(): ?array { - return $this->container['period']; + return $this->container['payCodes']; } /** - * Sets period + * Sets payCodes * - * @param int|null $period period + * @param \SynergiTech\Staffology\Model\PayCode[]|null $payCodes payCodes * * @return $this */ - public function setPeriod(?int $period): static + public function setPayCodes(?array $payCodes): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($payCodes)) { + array_push($this->openAPINullablesSetToNull, 'payCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['period'] = $period; + $this->container['payCodes'] = $payCodes; return $this; } /** - * Gets periodTo + * Gets payPeriod * - * @return int|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getPeriodTo(): ?int + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['periodTo']; + return $this->container['payPeriod']; } /** - * Sets periodTo + * Sets payPeriod * - * @param int|null $periodTo periodTo + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod * * @return $this */ - public function setPeriodTo(?int $periodTo): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static { - if (is_null($periodTo)) { - throw new InvalidArgumentException('non-nullable periodTo cannot be null'); + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['periodTo'] = $periodTo; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets startPeriodName + * Gets period * - * @return string|null + * @return int|null */ - public function getStartPeriodName(): ?string + public function getPeriod(): ?int { - return $this->container['startPeriodName']; + return $this->container['period']; } /** - * Sets startPeriodName + * Sets period * - * @param string|null $startPeriodName startPeriodName + * @param int|null $period period * * @return $this */ - public function setStartPeriodName(?string $startPeriodName): static + public function setPeriod(?int $period): static { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['startPeriodName'] = $startPeriodName; + $this->container['period'] = $period; return $this; } /** - * Gets endPeriodName + * Gets periodTo * - * @return string|null + * @return int|null */ - public function getEndPeriodName(): ?string + public function getPeriodTo(): ?int { - return $this->container['endPeriodName']; + return $this->container['periodTo']; } /** - * Sets endPeriodName + * Sets periodTo * - * @param string|null $endPeriodName endPeriodName + * @param int|null $periodTo periodTo * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setPeriodTo(?int $periodTo): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($periodTo)) { + throw new InvalidArgumentException('non-nullable periodTo cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['periodTo'] = $periodTo; return $this; } /** - * Gets startDate + * Gets report * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getStartDate(): ?\DateTime + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['startDate']; + return $this->container['report']; } /** - * Sets startDate + * Sets report * - * @param \DateTime|null $startDate startDate + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['startDate'] = $startDate; + $this->container['report'] = $report; return $this; } /** - * Gets endDate + * Gets startDate * * @return \DateTime|null */ - public function getEndDate(): ?\DateTime + public function getStartDate(): ?\DateTime { - return $this->container['endDate']; + return $this->container['startDate']; } /** - * Sets endDate + * Sets startDate * - * @param \DateTime|null $endDate endDate + * @param \DateTime|null $startDate startDate * * @return $this */ - public function setEndDate(?\DateTime $endDate): static + public function setStartDate(?\DateTime $startDate): static { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); } - $this->container['endDate'] = $endDate; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -841,28 +875,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/PayrollAnalysisCostBreakdownReportLine.php b/src/Model/PayrollAnalysisCostBreakdownReportLine.php index 180b989..aec2bb9 100644 --- a/src/Model/PayrollAnalysisCostBreakdownReportLine.php +++ b/src/Model/PayrollAnalysisCostBreakdownReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,30 +59,30 @@ class PayrollAnalysisCostBreakdownReportLine implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPITypes = [ - 'payrollCode' => 'string', - 'lastName' => 'string', - 'department' => '\SynergiTech\Staffology\Model\StringStringDecimalValueTuple', 'costCentre' => '\SynergiTech\Staffology\Model\StringStringDecimalValueTuple', + 'department' => '\SynergiTech\Staffology\Model\StringStringDecimalValueTuple', + 'employeeNi' => 'float', + 'employeePension' => 'float', + 'employeePensionContributionReliefAtSource' => 'float', + 'employeePensionContributionSalarySacrifice' => 'float', 'employeeRoleAnalysisCategory' => 'array', + 'ersNi' => 'float', + 'ersPension' => 'float', + 'lastName' => 'string', 'lines' => '\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportValue[]', - 'totalPay' => 'float', + 'niPercent' => 'float', 'niablePay' => 'float', + 'payrollCode' => 'string', 'pensionPay' => 'float', - 'niPercent' => 'float', - 'ersNi' => 'float', 'pensionPercent' => 'float', - 'ersPension' => 'float', - 'taxablePay' => 'float', - 'taxablePercent' => 'float', - 'employeeNi' => 'float', - 'taxPaid' => 'float', - 'studentLoan' => 'float', - 'employeePension' => 'float', - 'employeePensionContributionSalarySacrifice' => 'float', - 'employeePensionContributionReliefAtSource' => 'float', 'pensionSummaryCostBreakdowns' => '\SynergiTech\Staffology\Model\PensionSummaryCostBreakdown[]', 'roleId' => 'string', - 'roleWeightage' => 'float' + 'roleWeightage' => 'float', + 'studentLoan' => 'float', + 'taxPaid' => 'float', + 'taxablePay' => 'float', + 'taxablePercent' => 'float', + 'totalPay' => 'float' ]; /** @@ -91,30 +91,30 @@ class PayrollAnalysisCostBreakdownReportLine implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPIFormats = [ - 'payrollCode' => null, - 'lastName' => null, - 'department' => null, 'costCentre' => null, + 'department' => null, + 'employeeNi' => 'double', + 'employeePension' => 'double', + 'employeePensionContributionReliefAtSource' => 'double', + 'employeePensionContributionSalarySacrifice' => 'double', 'employeeRoleAnalysisCategory' => null, + 'ersNi' => 'double', + 'ersPension' => 'double', + 'lastName' => null, 'lines' => null, - 'totalPay' => 'double', + 'niPercent' => 'double', 'niablePay' => 'double', + 'payrollCode' => null, 'pensionPay' => 'double', - 'niPercent' => 'double', - 'ersNi' => 'double', 'pensionPercent' => 'double', - 'ersPension' => 'double', - 'taxablePay' => 'double', - 'taxablePercent' => 'double', - 'employeeNi' => 'double', - 'taxPaid' => 'double', - 'studentLoan' => 'double', - 'employeePension' => 'double', - 'employeePensionContributionSalarySacrifice' => 'double', - 'employeePensionContributionReliefAtSource' => 'double', 'pensionSummaryCostBreakdowns' => null, 'roleId' => 'uuid', - 'roleWeightage' => 'double' + 'roleWeightage' => 'double', + 'studentLoan' => 'double', + 'taxPaid' => 'double', + 'taxablePay' => 'double', + 'taxablePercent' => 'double', + 'totalPay' => 'double' ]; /** @@ -123,30 +123,30 @@ class PayrollAnalysisCostBreakdownReportLine implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPINullables = [ - 'payrollCode' => true, - 'lastName' => true, - 'department' => false, 'costCentre' => false, + 'department' => false, + 'employeeNi' => false, + 'employeePension' => false, + 'employeePensionContributionReliefAtSource' => false, + 'employeePensionContributionSalarySacrifice' => false, 'employeeRoleAnalysisCategory' => true, + 'ersNi' => false, + 'ersPension' => false, + 'lastName' => true, 'lines' => true, - 'totalPay' => false, + 'niPercent' => false, 'niablePay' => false, + 'payrollCode' => true, 'pensionPay' => false, - 'niPercent' => false, - 'ersNi' => false, 'pensionPercent' => false, - 'ersPension' => false, - 'taxablePay' => false, - 'taxablePercent' => false, - 'employeeNi' => false, - 'taxPaid' => false, - 'studentLoan' => false, - 'employeePension' => false, - 'employeePensionContributionSalarySacrifice' => false, - 'employeePensionContributionReliefAtSource' => false, 'pensionSummaryCostBreakdowns' => true, 'roleId' => true, - 'roleWeightage' => false + 'roleWeightage' => false, + 'studentLoan' => false, + 'taxPaid' => false, + 'taxablePay' => false, + 'taxablePercent' => false, + 'totalPay' => false ]; /** @@ -235,30 +235,30 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollCode' => 'payrollCode', - 'lastName' => 'lastName', - 'department' => 'department', 'costCentre' => 'costCentre', + 'department' => 'department', + 'employeeNi' => 'employeeNi', + 'employeePension' => 'employeePension', + 'employeePensionContributionReliefAtSource' => 'employeePensionContributionReliefAtSource', + 'employeePensionContributionSalarySacrifice' => 'employeePensionContributionSalarySacrifice', 'employeeRoleAnalysisCategory' => 'employeeRoleAnalysisCategory', + 'ersNi' => 'ersNi', + 'ersPension' => 'ersPension', + 'lastName' => 'lastName', 'lines' => 'lines', - 'totalPay' => 'totalPay', + 'niPercent' => 'niPercent', 'niablePay' => 'niablePay', + 'payrollCode' => 'payrollCode', 'pensionPay' => 'pensionPay', - 'niPercent' => 'niPercent', - 'ersNi' => 'ersNi', 'pensionPercent' => 'pensionPercent', - 'ersPension' => 'ersPension', - 'taxablePay' => 'taxablePay', - 'taxablePercent' => 'taxablePercent', - 'employeeNi' => 'employeeNi', - 'taxPaid' => 'taxPaid', - 'studentLoan' => 'studentLoan', - 'employeePension' => 'employeePension', - 'employeePensionContributionSalarySacrifice' => 'employeePensionContributionSalarySacrifice', - 'employeePensionContributionReliefAtSource' => 'employeePensionContributionReliefAtSource', 'pensionSummaryCostBreakdowns' => 'pensionSummaryCostBreakdowns', 'roleId' => 'roleId', - 'roleWeightage' => 'roleWeightage' + 'roleWeightage' => 'roleWeightage', + 'studentLoan' => 'studentLoan', + 'taxPaid' => 'taxPaid', + 'taxablePay' => 'taxablePay', + 'taxablePercent' => 'taxablePercent', + 'totalPay' => 'totalPay' ]; /** @@ -267,30 +267,30 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollCode' => 'setPayrollCode', - 'lastName' => 'setLastName', - 'department' => 'setDepartment', 'costCentre' => 'setCostCentre', + 'department' => 'setDepartment', + 'employeeNi' => 'setEmployeeNi', + 'employeePension' => 'setEmployeePension', + 'employeePensionContributionReliefAtSource' => 'setEmployeePensionContributionReliefAtSource', + 'employeePensionContributionSalarySacrifice' => 'setEmployeePensionContributionSalarySacrifice', 'employeeRoleAnalysisCategory' => 'setEmployeeRoleAnalysisCategory', + 'ersNi' => 'setErsNi', + 'ersPension' => 'setErsPension', + 'lastName' => 'setLastName', 'lines' => 'setLines', - 'totalPay' => 'setTotalPay', + 'niPercent' => 'setNiPercent', 'niablePay' => 'setNiablePay', + 'payrollCode' => 'setPayrollCode', 'pensionPay' => 'setPensionPay', - 'niPercent' => 'setNiPercent', - 'ersNi' => 'setErsNi', 'pensionPercent' => 'setPensionPercent', - 'ersPension' => 'setErsPension', - 'taxablePay' => 'setTaxablePay', - 'taxablePercent' => 'setTaxablePercent', - 'employeeNi' => 'setEmployeeNi', - 'taxPaid' => 'setTaxPaid', - 'studentLoan' => 'setStudentLoan', - 'employeePension' => 'setEmployeePension', - 'employeePensionContributionSalarySacrifice' => 'setEmployeePensionContributionSalarySacrifice', - 'employeePensionContributionReliefAtSource' => 'setEmployeePensionContributionReliefAtSource', 'pensionSummaryCostBreakdowns' => 'setPensionSummaryCostBreakdowns', 'roleId' => 'setRoleId', - 'roleWeightage' => 'setRoleWeightage' + 'roleWeightage' => 'setRoleWeightage', + 'studentLoan' => 'setStudentLoan', + 'taxPaid' => 'setTaxPaid', + 'taxablePay' => 'setTaxablePay', + 'taxablePercent' => 'setTaxablePercent', + 'totalPay' => 'setTotalPay' ]; /** @@ -299,30 +299,30 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollCode' => 'getPayrollCode', - 'lastName' => 'getLastName', - 'department' => 'getDepartment', 'costCentre' => 'getCostCentre', + 'department' => 'getDepartment', + 'employeeNi' => 'getEmployeeNi', + 'employeePension' => 'getEmployeePension', + 'employeePensionContributionReliefAtSource' => 'getEmployeePensionContributionReliefAtSource', + 'employeePensionContributionSalarySacrifice' => 'getEmployeePensionContributionSalarySacrifice', 'employeeRoleAnalysisCategory' => 'getEmployeeRoleAnalysisCategory', + 'ersNi' => 'getErsNi', + 'ersPension' => 'getErsPension', + 'lastName' => 'getLastName', 'lines' => 'getLines', - 'totalPay' => 'getTotalPay', + 'niPercent' => 'getNiPercent', 'niablePay' => 'getNiablePay', + 'payrollCode' => 'getPayrollCode', 'pensionPay' => 'getPensionPay', - 'niPercent' => 'getNiPercent', - 'ersNi' => 'getErsNi', 'pensionPercent' => 'getPensionPercent', - 'ersPension' => 'getErsPension', - 'taxablePay' => 'getTaxablePay', - 'taxablePercent' => 'getTaxablePercent', - 'employeeNi' => 'getEmployeeNi', - 'taxPaid' => 'getTaxPaid', - 'studentLoan' => 'getStudentLoan', - 'employeePension' => 'getEmployeePension', - 'employeePensionContributionSalarySacrifice' => 'getEmployeePensionContributionSalarySacrifice', - 'employeePensionContributionReliefAtSource' => 'getEmployeePensionContributionReliefAtSource', 'pensionSummaryCostBreakdowns' => 'getPensionSummaryCostBreakdowns', 'roleId' => 'getRoleId', - 'roleWeightage' => 'getRoleWeightage' + 'roleWeightage' => 'getRoleWeightage', + 'studentLoan' => 'getStudentLoan', + 'taxPaid' => 'getTaxPaid', + 'taxablePay' => 'getTaxablePay', + 'taxablePercent' => 'getTaxablePercent', + 'totalPay' => 'getTotalPay' ]; /** @@ -381,30 +381,30 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('lastName', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); $this->setIfExists('costCentre', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('employeeNi', $data ?? [], null); + $this->setIfExists('employeePension', $data ?? [], null); + $this->setIfExists('employeePensionContributionReliefAtSource', $data ?? [], null); + $this->setIfExists('employeePensionContributionSalarySacrifice', $data ?? [], null); $this->setIfExists('employeeRoleAnalysisCategory', $data ?? [], null); + $this->setIfExists('ersNi', $data ?? [], null); + $this->setIfExists('ersPension', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); - $this->setIfExists('totalPay', $data ?? [], null); + $this->setIfExists('niPercent', $data ?? [], null); $this->setIfExists('niablePay', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('pensionPay', $data ?? [], null); - $this->setIfExists('niPercent', $data ?? [], null); - $this->setIfExists('ersNi', $data ?? [], null); $this->setIfExists('pensionPercent', $data ?? [], null); - $this->setIfExists('ersPension', $data ?? [], null); - $this->setIfExists('taxablePay', $data ?? [], null); - $this->setIfExists('taxablePercent', $data ?? [], null); - $this->setIfExists('employeeNi', $data ?? [], null); - $this->setIfExists('taxPaid', $data ?? [], null); - $this->setIfExists('studentLoan', $data ?? [], null); - $this->setIfExists('employeePension', $data ?? [], null); - $this->setIfExists('employeePensionContributionSalarySacrifice', $data ?? [], null); - $this->setIfExists('employeePensionContributionReliefAtSource', $data ?? [], null); $this->setIfExists('pensionSummaryCostBreakdowns', $data ?? [], null); $this->setIfExists('roleId', $data ?? [], null); $this->setIfExists('roleWeightage', $data ?? [], null); + $this->setIfExists('studentLoan', $data ?? [], null); + $this->setIfExists('taxPaid', $data ?? [], null); + $this->setIfExists('taxablePay', $data ?? [], null); + $this->setIfExists('taxablePercent', $data ?? [], null); + $this->setIfExists('totalPay', $data ?? [], null); } /** @@ -450,123 +450,163 @@ public function valid(): bool /** - * Gets payrollCode + * Gets costCentre * - * @return string|null + * @return \SynergiTech\Staffology\Model\StringStringDecimalValueTuple|null */ - public function getPayrollCode(): ?string + public function getCostCentre(): ?\SynergiTech\Staffology\Model\StringStringDecimalValueTuple { - return $this->container['payrollCode']; + return $this->container['costCentre']; } /** - * Sets payrollCode + * Sets costCentre * - * @param string|null $payrollCode payrollCode + * @param \SynergiTech\Staffology\Model\StringStringDecimalValueTuple|null $costCentre costCentre * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setCostCentre(?\SynergiTech\Staffology\Model\StringStringDecimalValueTuple $costCentre): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($costCentre)) { + throw new InvalidArgumentException('non-nullable costCentre cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['costCentre'] = $costCentre; return $this; } /** - * Gets lastName + * Gets department * - * @return string|null + * @return \SynergiTech\Staffology\Model\StringStringDecimalValueTuple|null */ - public function getLastName(): ?string + public function getDepartment(): ?\SynergiTech\Staffology\Model\StringStringDecimalValueTuple { - return $this->container['lastName']; + return $this->container['department']; } /** - * Sets lastName + * Sets department * - * @param string|null $lastName lastName + * @param \SynergiTech\Staffology\Model\StringStringDecimalValueTuple|null $department department * * @return $this */ - public function setLastName(?string $lastName): static + public function setDepartment(?\SynergiTech\Staffology\Model\StringStringDecimalValueTuple $department): static { - if (is_null($lastName)) { - array_push($this->openAPINullablesSetToNull, 'lastName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($department)) { + throw new InvalidArgumentException('non-nullable department cannot be null'); } - $this->container['lastName'] = $lastName; + $this->container['department'] = $department; return $this; } /** - * Gets department + * Gets employeeNi * - * @return \SynergiTech\Staffology\Model\StringStringDecimalValueTuple|null + * @return float|null */ - public function getDepartment(): ?\SynergiTech\Staffology\Model\StringStringDecimalValueTuple + public function getEmployeeNi(): ?float { - return $this->container['department']; + return $this->container['employeeNi']; } /** - * Sets department + * Sets employeeNi * - * @param \SynergiTech\Staffology\Model\StringStringDecimalValueTuple|null $department department + * @param float|null $employeeNi employeeNi * * @return $this */ - public function setDepartment(?\SynergiTech\Staffology\Model\StringStringDecimalValueTuple $department): static + public function setEmployeeNi(?float $employeeNi): static { - if (is_null($department)) { - throw new InvalidArgumentException('non-nullable department cannot be null'); + if (is_null($employeeNi)) { + throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); } - $this->container['department'] = $department; + $this->container['employeeNi'] = $employeeNi; return $this; } /** - * Gets costCentre + * Gets employeePension * - * @return \SynergiTech\Staffology\Model\StringStringDecimalValueTuple|null + * @return float|null */ - public function getCostCentre(): ?\SynergiTech\Staffology\Model\StringStringDecimalValueTuple + public function getEmployeePension(): ?float { - return $this->container['costCentre']; + return $this->container['employeePension']; } /** - * Sets costCentre + * Sets employeePension * - * @param \SynergiTech\Staffology\Model\StringStringDecimalValueTuple|null $costCentre costCentre + * @param float|null $employeePension The value of the Pension Contribution(PENSION) being made by the Employee * * @return $this */ - public function setCostCentre(?\SynergiTech\Staffology\Model\StringStringDecimalValueTuple $costCentre): static + public function setEmployeePension(?float $employeePension): static { - if (is_null($costCentre)) { - throw new InvalidArgumentException('non-nullable costCentre cannot be null'); + if (is_null($employeePension)) { + throw new InvalidArgumentException('non-nullable employeePension cannot be null'); } - $this->container['costCentre'] = $costCentre; + $this->container['employeePension'] = $employeePension; + + return $this; + } + + /** + * Gets employeePensionContributionReliefAtSource + * + * @return float|null + */ + public function getEmployeePensionContributionReliefAtSource(): ?float + { + return $this->container['employeePensionContributionReliefAtSource']; + } + + /** + * Sets employeePensionContributionReliefAtSource + * + * @param float|null $employeePensionContributionReliefAtSource The value of the Pension Contribution Relief At Source(PENSIONRAS) being made by the Employee + * + * @return $this + */ + public function setEmployeePensionContributionReliefAtSource(?float $employeePensionContributionReliefAtSource): static + { + if (is_null($employeePensionContributionReliefAtSource)) { + throw new InvalidArgumentException('non-nullable employeePensionContributionReliefAtSource cannot be null'); + } + $this->container['employeePensionContributionReliefAtSource'] = $employeePensionContributionReliefAtSource; + + return $this; + } + + /** + * Gets employeePensionContributionSalarySacrifice + * + * @return float|null + */ + public function getEmployeePensionContributionSalarySacrifice(): ?float + { + return $this->container['employeePensionContributionSalarySacrifice']; + } + + /** + * Sets employeePensionContributionSalarySacrifice + * + * @param float|null $employeePensionContributionSalarySacrifice The value of the Pension Contribution Salary Sacrifice(PENSIONSS) being made by the Employee + * + * @return $this + */ + public function setEmployeePensionContributionSalarySacrifice(?float $employeePensionContributionSalarySacrifice): static + { + if (is_null($employeePensionContributionSalarySacrifice)) { + throw new InvalidArgumentException('non-nullable employeePensionContributionSalarySacrifice cannot be null'); + } + $this->container['employeePensionContributionSalarySacrifice'] = $employeePensionContributionSalarySacrifice; return $this; } @@ -606,116 +646,123 @@ public function setEmployeeRoleAnalysisCategory(?array $employeeRoleAnalysisCate } /** - * Gets lines + * Gets ersNi * - * @return \SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportValue[]|null + * @return float|null */ - public function getLines(): ?array + public function getErsNi(): ?float { - return $this->container['lines']; + return $this->container['ersNi']; } /** - * Sets lines + * Sets ersNi * - * @param \SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportValue[]|null $lines lines + * @param float|null $ersNi ersNi * * @return $this */ - public function setLines(?array $lines): static + public function setErsNi(?float $ersNi): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($ersNi)) { + throw new InvalidArgumentException('non-nullable ersNi cannot be null'); } - $this->container['lines'] = $lines; + $this->container['ersNi'] = $ersNi; return $this; } /** - * Gets totalPay + * Gets ersPension * * @return float|null */ - public function getTotalPay(): ?float + public function getErsPension(): ?float { - return $this->container['totalPay']; + return $this->container['ersPension']; } /** - * Sets totalPay + * Sets ersPension * - * @param float|null $totalPay totalPay + * @param float|null $ersPension ersPension * * @return $this */ - public function setTotalPay(?float $totalPay): static + public function setErsPension(?float $ersPension): static { - if (is_null($totalPay)) { - throw new InvalidArgumentException('non-nullable totalPay cannot be null'); + if (is_null($ersPension)) { + throw new InvalidArgumentException('non-nullable ersPension cannot be null'); } - $this->container['totalPay'] = $totalPay; + $this->container['ersPension'] = $ersPension; return $this; } /** - * Gets niablePay + * Gets lastName * - * @return float|null + * @return string|null */ - public function getNiablePay(): ?float + public function getLastName(): ?string { - return $this->container['niablePay']; + return $this->container['lastName']; } /** - * Sets niablePay + * Sets lastName * - * @param float|null $niablePay niablePay + * @param string|null $lastName lastName * * @return $this */ - public function setNiablePay(?float $niablePay): static + public function setLastName(?string $lastName): static { - if (is_null($niablePay)) { - throw new InvalidArgumentException('non-nullable niablePay cannot be null'); + if (is_null($lastName)) { + array_push($this->openAPINullablesSetToNull, 'lastName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lastName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['niablePay'] = $niablePay; + $this->container['lastName'] = $lastName; return $this; } /** - * Gets pensionPay + * Gets lines * - * @return float|null + * @return \SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportValue[]|null */ - public function getPensionPay(): ?float + public function getLines(): ?array { - return $this->container['pensionPay']; + return $this->container['lines']; } /** - * Sets pensionPay + * Sets lines * - * @param float|null $pensionPay pensionPay + * @param \SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReportValue[]|null $lines lines * * @return $this */ - public function setPensionPay(?float $pensionPay): static + public function setLines(?array $lines): static { - if (is_null($pensionPay)) { - throw new InvalidArgumentException('non-nullable pensionPay cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['pensionPay'] = $pensionPay; + $this->container['lines'] = $lines; return $this; } @@ -748,190 +795,211 @@ public function setNiPercent(?float $niPercent): static } /** - * Gets ersNi + * Gets niablePay * * @return float|null */ - public function getErsNi(): ?float + public function getNiablePay(): ?float { - return $this->container['ersNi']; + return $this->container['niablePay']; } /** - * Sets ersNi + * Sets niablePay * - * @param float|null $ersNi ersNi + * @param float|null $niablePay niablePay * * @return $this */ - public function setErsNi(?float $ersNi): static + public function setNiablePay(?float $niablePay): static { - if (is_null($ersNi)) { - throw new InvalidArgumentException('non-nullable ersNi cannot be null'); + if (is_null($niablePay)) { + throw new InvalidArgumentException('non-nullable niablePay cannot be null'); } - $this->container['ersNi'] = $ersNi; + $this->container['niablePay'] = $niablePay; return $this; } /** - * Gets pensionPercent + * Gets payrollCode * - * @return float|null + * @return string|null */ - public function getPensionPercent(): ?float + public function getPayrollCode(): ?string { - return $this->container['pensionPercent']; + return $this->container['payrollCode']; } /** - * Sets pensionPercent + * Sets payrollCode * - * @param float|null $pensionPercent pensionPercent + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setPensionPercent(?float $pensionPercent): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($pensionPercent)) { - throw new InvalidArgumentException('non-nullable pensionPercent cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['pensionPercent'] = $pensionPercent; + $this->container['payrollCode'] = $payrollCode; return $this; } /** - * Gets ersPension + * Gets pensionPay * * @return float|null */ - public function getErsPension(): ?float + public function getPensionPay(): ?float { - return $this->container['ersPension']; + return $this->container['pensionPay']; } /** - * Sets ersPension + * Sets pensionPay * - * @param float|null $ersPension ersPension + * @param float|null $pensionPay pensionPay * * @return $this */ - public function setErsPension(?float $ersPension): static + public function setPensionPay(?float $pensionPay): static { - if (is_null($ersPension)) { - throw new InvalidArgumentException('non-nullable ersPension cannot be null'); + if (is_null($pensionPay)) { + throw new InvalidArgumentException('non-nullable pensionPay cannot be null'); } - $this->container['ersPension'] = $ersPension; + $this->container['pensionPay'] = $pensionPay; return $this; } /** - * Gets taxablePay + * Gets pensionPercent * * @return float|null */ - public function getTaxablePay(): ?float + public function getPensionPercent(): ?float { - return $this->container['taxablePay']; + return $this->container['pensionPercent']; } /** - * Sets taxablePay + * Sets pensionPercent * - * @param float|null $taxablePay taxablePay + * @param float|null $pensionPercent pensionPercent * * @return $this */ - public function setTaxablePay(?float $taxablePay): static + public function setPensionPercent(?float $pensionPercent): static { - if (is_null($taxablePay)) { - throw new InvalidArgumentException('non-nullable taxablePay cannot be null'); + if (is_null($pensionPercent)) { + throw new InvalidArgumentException('non-nullable pensionPercent cannot be null'); } - $this->container['taxablePay'] = $taxablePay; + $this->container['pensionPercent'] = $pensionPercent; return $this; } /** - * Gets taxablePercent + * Gets pensionSummaryCostBreakdowns * - * @return float|null + * @return \SynergiTech\Staffology\Model\PensionSummaryCostBreakdown[]|null */ - public function getTaxablePercent(): ?float + public function getPensionSummaryCostBreakdowns(): ?array { - return $this->container['taxablePercent']; + return $this->container['pensionSummaryCostBreakdowns']; } /** - * Sets taxablePercent + * Sets pensionSummaryCostBreakdowns * - * @param float|null $taxablePercent taxablePercent + * @param \SynergiTech\Staffology\Model\PensionSummaryCostBreakdown[]|null $pensionSummaryCostBreakdowns List of pension summaries, each representing a breakdown of various pension components * * @return $this */ - public function setTaxablePercent(?float $taxablePercent): static + public function setPensionSummaryCostBreakdowns(?array $pensionSummaryCostBreakdowns): static { - if (is_null($taxablePercent)) { - throw new InvalidArgumentException('non-nullable taxablePercent cannot be null'); + if (is_null($pensionSummaryCostBreakdowns)) { + array_push($this->openAPINullablesSetToNull, 'pensionSummaryCostBreakdowns'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pensionSummaryCostBreakdowns', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['taxablePercent'] = $taxablePercent; + $this->container['pensionSummaryCostBreakdowns'] = $pensionSummaryCostBreakdowns; return $this; } /** - * Gets employeeNi + * Gets roleId * - * @return float|null + * @return string|null */ - public function getEmployeeNi(): ?float + public function getRoleId(): ?string { - return $this->container['employeeNi']; + return $this->container['roleId']; } /** - * Sets employeeNi + * Sets roleId * - * @param float|null $employeeNi employeeNi + * @param string|null $roleId RoleId of that particular line entry * * @return $this */ - public function setEmployeeNi(?float $employeeNi): static + public function setRoleId(?string $roleId): static { - if (is_null($employeeNi)) { - throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); + if (is_null($roleId)) { + array_push($this->openAPINullablesSetToNull, 'roleId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('roleId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeeNi'] = $employeeNi; + $this->container['roleId'] = $roleId; return $this; } /** - * Gets taxPaid + * Gets roleWeightage * * @return float|null */ - public function getTaxPaid(): ?float + public function getRoleWeightage(): ?float { - return $this->container['taxPaid']; + return $this->container['roleWeightage']; } /** - * Sets taxPaid + * Sets roleWeightage * - * @param float|null $taxPaid taxPaid + * @param float|null $roleWeightage Weightage value of the given employee role * * @return $this */ - public function setTaxPaid(?float $taxPaid): static + public function setRoleWeightage(?float $roleWeightage): static { - if (is_null($taxPaid)) { - throw new InvalidArgumentException('non-nullable taxPaid cannot be null'); + if (is_null($roleWeightage)) { + throw new InvalidArgumentException('non-nullable roleWeightage cannot be null'); } - $this->container['taxPaid'] = $taxPaid; + $this->container['roleWeightage'] = $roleWeightage; return $this; } @@ -964,177 +1032,109 @@ public function setStudentLoan(?float $studentLoan): static } /** - * Gets employeePension + * Gets taxPaid * * @return float|null */ - public function getEmployeePension(): ?float + public function getTaxPaid(): ?float { - return $this->container['employeePension']; + return $this->container['taxPaid']; } /** - * Sets employeePension + * Sets taxPaid * - * @param float|null $employeePension The value of the Pension Contribution(PENSION) being made by the Employee + * @param float|null $taxPaid taxPaid * * @return $this */ - public function setEmployeePension(?float $employeePension): static + public function setTaxPaid(?float $taxPaid): static { - if (is_null($employeePension)) { - throw new InvalidArgumentException('non-nullable employeePension cannot be null'); + if (is_null($taxPaid)) { + throw new InvalidArgumentException('non-nullable taxPaid cannot be null'); } - $this->container['employeePension'] = $employeePension; + $this->container['taxPaid'] = $taxPaid; return $this; } /** - * Gets employeePensionContributionSalarySacrifice + * Gets taxablePay * * @return float|null */ - public function getEmployeePensionContributionSalarySacrifice(): ?float + public function getTaxablePay(): ?float { - return $this->container['employeePensionContributionSalarySacrifice']; + return $this->container['taxablePay']; } /** - * Sets employeePensionContributionSalarySacrifice + * Sets taxablePay * - * @param float|null $employeePensionContributionSalarySacrifice The value of the Pension Contribution Salary Sacrifice(PENSIONSS) being made by the Employee + * @param float|null $taxablePay taxablePay * * @return $this */ - public function setEmployeePensionContributionSalarySacrifice(?float $employeePensionContributionSalarySacrifice): static + public function setTaxablePay(?float $taxablePay): static { - if (is_null($employeePensionContributionSalarySacrifice)) { - throw new InvalidArgumentException('non-nullable employeePensionContributionSalarySacrifice cannot be null'); + if (is_null($taxablePay)) { + throw new InvalidArgumentException('non-nullable taxablePay cannot be null'); } - $this->container['employeePensionContributionSalarySacrifice'] = $employeePensionContributionSalarySacrifice; + $this->container['taxablePay'] = $taxablePay; return $this; } /** - * Gets employeePensionContributionReliefAtSource + * Gets taxablePercent * * @return float|null */ - public function getEmployeePensionContributionReliefAtSource(): ?float - { - return $this->container['employeePensionContributionReliefAtSource']; - } - - /** - * Sets employeePensionContributionReliefAtSource - * - * @param float|null $employeePensionContributionReliefAtSource The value of the Pension Contribution Relief At Source(PENSIONRAS) being made by the Employee - * - * @return $this - */ - public function setEmployeePensionContributionReliefAtSource(?float $employeePensionContributionReliefAtSource): static - { - if (is_null($employeePensionContributionReliefAtSource)) { - throw new InvalidArgumentException('non-nullable employeePensionContributionReliefAtSource cannot be null'); - } - $this->container['employeePensionContributionReliefAtSource'] = $employeePensionContributionReliefAtSource; - - return $this; - } - - /** - * Gets pensionSummaryCostBreakdowns - * - * @return \SynergiTech\Staffology\Model\PensionSummaryCostBreakdown[]|null - */ - public function getPensionSummaryCostBreakdowns(): ?array - { - return $this->container['pensionSummaryCostBreakdowns']; - } - - /** - * Sets pensionSummaryCostBreakdowns - * - * @param \SynergiTech\Staffology\Model\PensionSummaryCostBreakdown[]|null $pensionSummaryCostBreakdowns List of pension summaries, each representing a breakdown of various pension components - * - * @return $this - */ - public function setPensionSummaryCostBreakdowns(?array $pensionSummaryCostBreakdowns): static - { - if (is_null($pensionSummaryCostBreakdowns)) { - array_push($this->openAPINullablesSetToNull, 'pensionSummaryCostBreakdowns'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionSummaryCostBreakdowns', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['pensionSummaryCostBreakdowns'] = $pensionSummaryCostBreakdowns; - - return $this; - } - - /** - * Gets roleId - * - * @return string|null - */ - public function getRoleId(): ?string + public function getTaxablePercent(): ?float { - return $this->container['roleId']; + return $this->container['taxablePercent']; } /** - * Sets roleId + * Sets taxablePercent * - * @param string|null $roleId RoleId of that particular line entry + * @param float|null $taxablePercent taxablePercent * * @return $this */ - public function setRoleId(?string $roleId): static + public function setTaxablePercent(?float $taxablePercent): static { - if (is_null($roleId)) { - array_push($this->openAPINullablesSetToNull, 'roleId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('roleId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($taxablePercent)) { + throw new InvalidArgumentException('non-nullable taxablePercent cannot be null'); } - $this->container['roleId'] = $roleId; + $this->container['taxablePercent'] = $taxablePercent; return $this; } /** - * Gets roleWeightage + * Gets totalPay * * @return float|null */ - public function getRoleWeightage(): ?float + public function getTotalPay(): ?float { - return $this->container['roleWeightage']; + return $this->container['totalPay']; } /** - * Sets roleWeightage + * Sets totalPay * - * @param float|null $roleWeightage Weightage value of the given employee role + * @param float|null $totalPay totalPay * * @return $this */ - public function setRoleWeightage(?float $roleWeightage): static + public function setTotalPay(?float $totalPay): static { - if (is_null($roleWeightage)) { - throw new InvalidArgumentException('non-nullable roleWeightage cannot be null'); + if (is_null($totalPay)) { + throw new InvalidArgumentException('non-nullable totalPay cannot be null'); } - $this->container['roleWeightage'] = $roleWeightage; + $this->container['totalPay'] = $totalPay; return $this; } diff --git a/src/Model/PayrollAnalysisCostBreakdownReportReportResponse.php b/src/Model/PayrollAnalysisCostBreakdownReportReportResponse.php index d216714..c9d66a8 100644 --- a/src/Model/PayrollAnalysisCostBreakdownReportReportResponse.php +++ b/src/Model/PayrollAnalysisCostBreakdownReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class PayrollAnalysisCostBreakdownReportReportResponse implements ModelInterface * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\PayrollAnalysisCostBreakdownReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class PayrollAnalysisCostBreakdownReportReportResponse implements ModelInterface * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class PayrollAnalysisCostBreakdownReportReportResponse implements ModelInterface * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PayrollAnalysisCostBreakdownReportValue.php b/src/Model/PayrollAnalysisCostBreakdownReportValue.php index 088c30e..241e2a9 100644 --- a/src/Model/PayrollAnalysisCostBreakdownReportValue.php +++ b/src/Model/PayrollAnalysisCostBreakdownReportValue.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class PayrollAnalysisCostBreakdownReportValue implements ModelInterface, ArrayAc * @var array */ protected static array $openAPITypes = [ - 'qty' => 'float', 'code' => 'string', + 'qty' => 'float', 'value' => 'float' ]; @@ -70,8 +70,8 @@ class PayrollAnalysisCostBreakdownReportValue implements ModelInterface, ArrayAc * @var array */ protected static array $openAPIFormats = [ - 'qty' => 'double', 'code' => null, + 'qty' => 'double', 'value' => 'double' ]; @@ -81,8 +81,8 @@ class PayrollAnalysisCostBreakdownReportValue implements ModelInterface, ArrayAc * @var array */ protected static array $openAPINullables = [ - 'qty' => true, 'code' => true, + 'qty' => true, 'value' => false ]; @@ -172,8 +172,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'qty' => 'qty', 'code' => 'code', + 'qty' => 'qty', 'value' => 'value' ]; @@ -183,8 +183,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'qty' => 'setQty', 'code' => 'setCode', + 'qty' => 'setQty', 'value' => 'setValue' ]; @@ -194,8 +194,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'qty' => 'getQty', 'code' => 'getCode', + 'qty' => 'getQty', 'value' => 'getValue' ]; @@ -255,8 +255,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('qty', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('qty', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); } @@ -303,69 +303,69 @@ public function valid(): bool /** - * Gets qty + * Gets code * - * @return float|null + * @return string|null */ - public function getQty(): ?float + public function getCode(): ?string { - return $this->container['qty']; + return $this->container['code']; } /** - * Sets qty + * Sets code * - * @param float|null $qty qty + * @param string|null $code code * * @return $this */ - public function setQty(?float $qty): static + public function setCode(?string $code): static { - if (is_null($qty)) { - array_push($this->openAPINullablesSetToNull, 'qty'); + if (is_null($code)) { + array_push($this->openAPINullablesSetToNull, 'code'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('qty', $nullablesSetToNull); + $index = array_search('code', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['qty'] = $qty; + $this->container['code'] = $code; return $this; } /** - * Gets code + * Gets qty * - * @return string|null + * @return float|null */ - public function getCode(): ?string + public function getQty(): ?float { - return $this->container['code']; + return $this->container['qty']; } /** - * Sets code + * Sets qty * - * @param string|null $code code + * @param float|null $qty qty * * @return $this */ - public function setCode(?string $code): static + public function setQty(?float $qty): static { - if (is_null($code)) { - array_push($this->openAPINullablesSetToNull, 'code'); + if (is_null($qty)) { + array_push($this->openAPINullablesSetToNull, 'qty'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('code', $nullablesSetToNull); + $index = array_search('qty', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['code'] = $code; + $this->container['qty'] = $qty; return $this; } diff --git a/src/Model/PayrollAnalysisEmployeeRoleBreakdownReport.php b/src/Model/PayrollAnalysisEmployeeRoleBreakdownReport.php index 2409357..0ba786b 100644 --- a/src/Model/PayrollAnalysisEmployeeRoleBreakdownReport.php +++ b/src/Model/PayrollAnalysisEmployeeRoleBreakdownReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,21 +59,22 @@ class PayrollAnalysisEmployeeRoleBreakdownReport implements ModelInterface, Arra * @var array */ protected static array $openAPITypes = [ + 'employer' => '\SynergiTech\Staffology\Model\Item', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLine[]', + 'ordinal' => 'int', 'payCodes' => '\SynergiTech\Staffology\Model\PayCode[]', - 'employer' => '\SynergiTech\Staffology\Model\Item', 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', - 'ordinal' => 'int', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -82,21 +83,22 @@ class PayrollAnalysisEmployeeRoleBreakdownReport implements ModelInterface, Arra * @var array */ protected static array $openAPIFormats = [ + 'employer' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'isDraft' => null, 'lines' => null, + 'ordinal' => 'int32', 'payCodes' => null, - 'employer' => null, 'payPeriod' => null, - 'ordinal' => 'int32', 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -105,21 +107,22 @@ class PayrollAnalysisEmployeeRoleBreakdownReport implements ModelInterface, Arra * @var array */ protected static array $openAPINullables = [ + 'employer' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'isDraft' => false, 'lines' => true, + 'ordinal' => false, 'payCodes' => true, - 'employer' => false, 'payPeriod' => false, - 'ordinal' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -208,21 +211,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'employer' => 'employer', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'isDraft' => 'isDraft', 'lines' => 'lines', + 'ordinal' => 'ordinal', 'payCodes' => 'payCodes', - 'employer' => 'employer', 'payPeriod' => 'payPeriod', - 'ordinal' => 'ordinal', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -231,21 +235,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'employer' => 'setEmployer', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', + 'ordinal' => 'setOrdinal', 'payCodes' => 'setPayCodes', - 'employer' => 'setEmployer', 'payPeriod' => 'setPayPeriod', - 'ordinal' => 'setOrdinal', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -254,21 +259,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'employer' => 'getEmployer', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', + 'ordinal' => 'getOrdinal', 'payCodes' => 'getPayCodes', - 'employer' => 'getEmployer', 'payPeriod' => 'getPayPeriod', - 'ordinal' => 'getOrdinal', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -327,21 +333,22 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('employer', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('ordinal', $data ?? [], null); $this->setIfExists('payCodes', $data ?? [], null); - $this->setIfExists('employer', $data ?? [], null); $this->setIfExists('payPeriod', $data ?? [], null); - $this->setIfExists('ordinal', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -387,123 +394,150 @@ public function valid(): bool /** - * Gets lines + * Gets employer * - * @return \SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLine[]|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getLines(): ?array + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['lines']; + return $this->container['employer']; } /** - * Sets lines + * Sets employer * - * @param \SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLine[]|null $lines lines + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setLines(?array $lines): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); } - $this->container['lines'] = $lines; + $this->container['employer'] = $employer; return $this; } /** - * Gets payCodes + * Gets endDate * - * @return \SynergiTech\Staffology\Model\PayCode[]|null + * @return \DateTime|null */ - public function getPayCodes(): ?array + public function getEndDate(): ?\DateTime { - return $this->container['payCodes']; + return $this->container['endDate']; } /** - * Sets payCodes + * Sets endDate * - * @param \SynergiTech\Staffology\Model\PayCode[]|null $payCodes payCodes + * @param \DateTime|null $endDate endDate * * @return $this */ - public function setPayCodes(?array $payCodes): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($payCodes)) { - array_push($this->openAPINullablesSetToNull, 'payCodes'); + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets endPeriodName + * + * @return string|null + */ + public function getEndPeriodName(): ?string + { + return $this->container['endPeriodName']; + } + + /** + * Sets endPeriodName + * + * @param string|null $endPeriodName endPeriodName + * + * @return $this + */ + public function setEndPeriodName(?string $endPeriodName): static + { + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCodes', $nullablesSetToNull); + $index = array_search('endPeriodName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payCodes'] = $payCodes; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets employer + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getIsDraft(): ?bool { - return $this->container['employer']; + return $this->container['isDraft']; } /** - * Sets employer + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param bool|null $isDraft isDraft * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['employer'] = $employer; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets payPeriod + * Gets lines * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return \SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLine[]|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getLines(): ?array { - return $this->container['payPeriod']; + return $this->container['lines']; } /** - * Sets payPeriod + * Sets lines * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param \SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLine[]|null $lines lines * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setLines(?array $lines): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriod'] = $payPeriod; + $this->container['lines'] = $lines; return $this; } @@ -536,204 +570,204 @@ public function setOrdinal(?int $ordinal): static } /** - * Gets period + * Gets payCodes * - * @return int|null + * @return \SynergiTech\Staffology\Model\PayCode[]|null */ - public function getPeriod(): ?int + public function getPayCodes(): ?array { - return $this->container['period']; + return $this->container['payCodes']; } /** - * Sets period + * Sets payCodes * - * @param int|null $period period + * @param \SynergiTech\Staffology\Model\PayCode[]|null $payCodes payCodes * * @return $this */ - public function setPeriod(?int $period): static + public function setPayCodes(?array $payCodes): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($payCodes)) { + array_push($this->openAPINullablesSetToNull, 'payCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['period'] = $period; + $this->container['payCodes'] = $payCodes; return $this; } /** - * Gets periodTo + * Gets payPeriod * - * @return int|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getPeriodTo(): ?int + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['periodTo']; + return $this->container['payPeriod']; } /** - * Sets periodTo + * Sets payPeriod * - * @param int|null $periodTo periodTo + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod * * @return $this */ - public function setPeriodTo(?int $periodTo): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static { - if (is_null($periodTo)) { - throw new InvalidArgumentException('non-nullable periodTo cannot be null'); + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['periodTo'] = $periodTo; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets startPeriodName + * Gets period * - * @return string|null + * @return int|null */ - public function getStartPeriodName(): ?string + public function getPeriod(): ?int { - return $this->container['startPeriodName']; + return $this->container['period']; } /** - * Sets startPeriodName + * Sets period * - * @param string|null $startPeriodName startPeriodName + * @param int|null $period period * * @return $this */ - public function setStartPeriodName(?string $startPeriodName): static + public function setPeriod(?int $period): static { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['startPeriodName'] = $startPeriodName; + $this->container['period'] = $period; return $this; } /** - * Gets endPeriodName + * Gets periodTo * - * @return string|null + * @return int|null */ - public function getEndPeriodName(): ?string + public function getPeriodTo(): ?int { - return $this->container['endPeriodName']; + return $this->container['periodTo']; } /** - * Sets endPeriodName + * Sets periodTo * - * @param string|null $endPeriodName endPeriodName + * @param int|null $periodTo periodTo * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setPeriodTo(?int $periodTo): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($periodTo)) { + throw new InvalidArgumentException('non-nullable periodTo cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['periodTo'] = $periodTo; return $this; } /** - * Gets startDate + * Gets report * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getStartDate(): ?\DateTime + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['startDate']; + return $this->container['report']; } /** - * Sets startDate + * Sets report * - * @param \DateTime|null $startDate startDate + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['startDate'] = $startDate; + $this->container['report'] = $report; return $this; } /** - * Gets endDate + * Gets startDate * * @return \DateTime|null */ - public function getEndDate(): ?\DateTime + public function getStartDate(): ?\DateTime { - return $this->container['endDate']; + return $this->container['startDate']; } /** - * Sets endDate + * Sets startDate * - * @param \DateTime|null $endDate endDate + * @param \DateTime|null $startDate startDate * * @return $this */ - public function setEndDate(?\DateTime $endDate): static + public function setStartDate(?\DateTime $startDate): static { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); } - $this->container['endDate'] = $endDate; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -800,28 +834,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/PayrollAnalysisEmployeeRoleBreakdownReportLine.php b/src/Model/PayrollAnalysisEmployeeRoleBreakdownReportLine.php index d015eb1..8fccea6 100644 --- a/src/Model/PayrollAnalysisEmployeeRoleBreakdownReportLine.php +++ b/src/Model/PayrollAnalysisEmployeeRoleBreakdownReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,18 +59,19 @@ class PayrollAnalysisEmployeeRoleBreakdownReportLine implements ModelInterface, * @var array */ protected static array $openAPITypes = [ + 'department' => '\SynergiTech\Staffology\Model\DepartmentMembership', 'employee' => '\SynergiTech\Staffology\Model\Item', - 'fullEmployee' => '\SynergiTech\Staffology\Model\Employee', 'employeeRole' => '\SynergiTech\Staffology\Model\Item', - 'department' => '\SynergiTech\Staffology\Model\DepartmentMembership', + 'employerNic' => 'float', + 'ersPension' => 'float', + 'fullEmployee' => '\SynergiTech\Staffology\Model\Employee', 'gross' => 'float', - 'niableGross' => 'float', + 'lines' => '\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLineValue[]', 'net' => 'float', - 'takeHome' => 'float', - 'employerNic' => 'float', + 'niableGross' => 'float', 'showQtyColumn' => 'bool', - 'lines' => '\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLineValue[]', - 'ersPension' => 'float' + 'takeHome' => 'float', + 'taxablePay' => 'float' ]; /** @@ -79,18 +80,19 @@ class PayrollAnalysisEmployeeRoleBreakdownReportLine implements ModelInterface, * @var array */ protected static array $openAPIFormats = [ + 'department' => null, 'employee' => null, - 'fullEmployee' => null, 'employeeRole' => null, - 'department' => null, + 'employerNic' => 'double', + 'ersPension' => 'double', + 'fullEmployee' => null, 'gross' => 'double', - 'niableGross' => 'double', + 'lines' => null, 'net' => 'double', - 'takeHome' => 'double', - 'employerNic' => 'double', + 'niableGross' => 'double', 'showQtyColumn' => null, - 'lines' => null, - 'ersPension' => 'double' + 'takeHome' => 'double', + 'taxablePay' => 'double' ]; /** @@ -99,18 +101,19 @@ class PayrollAnalysisEmployeeRoleBreakdownReportLine implements ModelInterface, * @var array */ protected static array $openAPINullables = [ + 'department' => false, 'employee' => false, - 'fullEmployee' => false, 'employeeRole' => false, - 'department' => false, + 'employerNic' => false, + 'ersPension' => false, + 'fullEmployee' => false, 'gross' => false, - 'niableGross' => false, + 'lines' => true, 'net' => false, - 'takeHome' => false, - 'employerNic' => false, + 'niableGross' => false, 'showQtyColumn' => false, - 'lines' => true, - 'ersPension' => false + 'takeHome' => false, + 'taxablePay' => false ]; /** @@ -199,18 +202,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'department' => 'department', 'employee' => 'employee', - 'fullEmployee' => 'fullEmployee', 'employeeRole' => 'employeeRole', - 'department' => 'department', + 'employerNic' => 'employerNic', + 'ersPension' => 'ersPension', + 'fullEmployee' => 'fullEmployee', 'gross' => 'gross', - 'niableGross' => 'niableGross', + 'lines' => 'lines', 'net' => 'net', - 'takeHome' => 'takeHome', - 'employerNic' => 'employerNic', + 'niableGross' => 'niableGross', 'showQtyColumn' => 'showQtyColumn', - 'lines' => 'lines', - 'ersPension' => 'ersPension' + 'takeHome' => 'takeHome', + 'taxablePay' => 'taxablePay' ]; /** @@ -219,18 +223,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'department' => 'setDepartment', 'employee' => 'setEmployee', - 'fullEmployee' => 'setFullEmployee', 'employeeRole' => 'setEmployeeRole', - 'department' => 'setDepartment', + 'employerNic' => 'setEmployerNic', + 'ersPension' => 'setErsPension', + 'fullEmployee' => 'setFullEmployee', 'gross' => 'setGross', - 'niableGross' => 'setNiableGross', + 'lines' => 'setLines', 'net' => 'setNet', - 'takeHome' => 'setTakeHome', - 'employerNic' => 'setEmployerNic', + 'niableGross' => 'setNiableGross', 'showQtyColumn' => 'setShowQtyColumn', - 'lines' => 'setLines', - 'ersPension' => 'setErsPension' + 'takeHome' => 'setTakeHome', + 'taxablePay' => 'setTaxablePay' ]; /** @@ -239,18 +244,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'department' => 'getDepartment', 'employee' => 'getEmployee', - 'fullEmployee' => 'getFullEmployee', 'employeeRole' => 'getEmployeeRole', - 'department' => 'getDepartment', + 'employerNic' => 'getEmployerNic', + 'ersPension' => 'getErsPension', + 'fullEmployee' => 'getFullEmployee', 'gross' => 'getGross', - 'niableGross' => 'getNiableGross', + 'lines' => 'getLines', 'net' => 'getNet', - 'takeHome' => 'getTakeHome', - 'employerNic' => 'getEmployerNic', + 'niableGross' => 'getNiableGross', 'showQtyColumn' => 'getShowQtyColumn', - 'lines' => 'getLines', - 'ersPension' => 'getErsPension' + 'takeHome' => 'getTakeHome', + 'taxablePay' => 'getTaxablePay' ]; /** @@ -309,18 +315,19 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('department', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('fullEmployee', $data ?? [], null); $this->setIfExists('employeeRole', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('employerNic', $data ?? [], null); + $this->setIfExists('ersPension', $data ?? [], null); + $this->setIfExists('fullEmployee', $data ?? [], null); $this->setIfExists('gross', $data ?? [], null); - $this->setIfExists('niableGross', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('net', $data ?? [], null); - $this->setIfExists('takeHome', $data ?? [], null); - $this->setIfExists('employerNic', $data ?? [], null); + $this->setIfExists('niableGross', $data ?? [], null); $this->setIfExists('showQtyColumn', $data ?? [], null); - $this->setIfExists('lines', $data ?? [], null); - $this->setIfExists('ersPension', $data ?? [], null); + $this->setIfExists('takeHome', $data ?? [], null); + $this->setIfExists('taxablePay', $data ?? [], null); } /** @@ -366,55 +373,55 @@ public function valid(): bool /** - * Gets employee + * Gets department * - * @return \SynergiTech\Staffology\Model\Item|null + * @return \SynergiTech\Staffology\Model\DepartmentMembership|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getDepartment(): ?\SynergiTech\Staffology\Model\DepartmentMembership { - return $this->container['employee']; + return $this->container['department']; } /** - * Sets employee + * Sets department * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param \SynergiTech\Staffology\Model\DepartmentMembership|null $department department * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setDepartment(?\SynergiTech\Staffology\Model\DepartmentMembership $department): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($department)) { + throw new InvalidArgumentException('non-nullable department cannot be null'); } - $this->container['employee'] = $employee; + $this->container['department'] = $department; return $this; } /** - * Gets fullEmployee + * Gets employee * - * @return \SynergiTech\Staffology\Model\Employee|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getFullEmployee(): ?\SynergiTech\Staffology\Model\Employee + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['fullEmployee']; + return $this->container['employee']; } /** - * Sets fullEmployee + * Sets employee * - * @param \SynergiTech\Staffology\Model\Employee|null $fullEmployee fullEmployee + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setFullEmployee(?\SynergiTech\Staffology\Model\Employee $fullEmployee): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($fullEmployee)) { - throw new InvalidArgumentException('non-nullable fullEmployee cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['fullEmployee'] = $fullEmployee; + $this->container['employee'] = $employee; return $this; } @@ -447,163 +454,197 @@ public function setEmployeeRole(?\SynergiTech\Staffology\Model\Item $employeeRol } /** - * Gets department + * Gets employerNic * - * @return \SynergiTech\Staffology\Model\DepartmentMembership|null + * @return float|null */ - public function getDepartment(): ?\SynergiTech\Staffology\Model\DepartmentMembership + public function getEmployerNic(): ?float { - return $this->container['department']; + return $this->container['employerNic']; } /** - * Sets department + * Sets employerNic * - * @param \SynergiTech\Staffology\Model\DepartmentMembership|null $department department + * @param float|null $employerNic employerNic * * @return $this */ - public function setDepartment(?\SynergiTech\Staffology\Model\DepartmentMembership $department): static + public function setEmployerNic(?float $employerNic): static { - if (is_null($department)) { - throw new InvalidArgumentException('non-nullable department cannot be null'); + if (is_null($employerNic)) { + throw new InvalidArgumentException('non-nullable employerNic cannot be null'); } - $this->container['department'] = $department; + $this->container['employerNic'] = $employerNic; return $this; } /** - * Gets gross + * Gets ersPension * * @return float|null */ - public function getGross(): ?float + public function getErsPension(): ?float { - return $this->container['gross']; + return $this->container['ersPension']; } /** - * Sets gross + * Sets ersPension * - * @param float|null $gross gross + * @param float|null $ersPension ersPension * * @return $this */ - public function setGross(?float $gross): static + public function setErsPension(?float $ersPension): static { - if (is_null($gross)) { - throw new InvalidArgumentException('non-nullable gross cannot be null'); + if (is_null($ersPension)) { + throw new InvalidArgumentException('non-nullable ersPension cannot be null'); } - $this->container['gross'] = $gross; + $this->container['ersPension'] = $ersPension; return $this; } /** - * Gets niableGross + * Gets fullEmployee * - * @return float|null + * @return \SynergiTech\Staffology\Model\Employee|null */ - public function getNiableGross(): ?float + public function getFullEmployee(): ?\SynergiTech\Staffology\Model\Employee { - return $this->container['niableGross']; + return $this->container['fullEmployee']; } /** - * Sets niableGross + * Sets fullEmployee * - * @param float|null $niableGross niableGross + * @param \SynergiTech\Staffology\Model\Employee|null $fullEmployee fullEmployee * * @return $this */ - public function setNiableGross(?float $niableGross): static + public function setFullEmployee(?\SynergiTech\Staffology\Model\Employee $fullEmployee): static { - if (is_null($niableGross)) { - throw new InvalidArgumentException('non-nullable niableGross cannot be null'); + if (is_null($fullEmployee)) { + throw new InvalidArgumentException('non-nullable fullEmployee cannot be null'); } - $this->container['niableGross'] = $niableGross; + $this->container['fullEmployee'] = $fullEmployee; return $this; } /** - * Gets net + * Gets gross * * @return float|null */ - public function getNet(): ?float + public function getGross(): ?float { - return $this->container['net']; + return $this->container['gross']; } /** - * Sets net + * Sets gross * - * @param float|null $net net + * @param float|null $gross gross * * @return $this */ - public function setNet(?float $net): static + public function setGross(?float $gross): static { - if (is_null($net)) { - throw new InvalidArgumentException('non-nullable net cannot be null'); + if (is_null($gross)) { + throw new InvalidArgumentException('non-nullable gross cannot be null'); } - $this->container['net'] = $net; + $this->container['gross'] = $gross; return $this; } /** - * Gets takeHome + * Gets lines + * + * @return \SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLineValue[]|null + */ + public function getLines(): ?array + { + return $this->container['lines']; + } + + /** + * Sets lines + * + * @param \SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLineValue[]|null $lines lines + * + * @return $this + */ + public function setLines(?array $lines): static + { + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['lines'] = $lines; + + return $this; + } + + /** + * Gets net * * @return float|null */ - public function getTakeHome(): ?float + public function getNet(): ?float { - return $this->container['takeHome']; + return $this->container['net']; } /** - * Sets takeHome + * Sets net * - * @param float|null $takeHome takeHome + * @param float|null $net net * * @return $this */ - public function setTakeHome(?float $takeHome): static + public function setNet(?float $net): static { - if (is_null($takeHome)) { - throw new InvalidArgumentException('non-nullable takeHome cannot be null'); + if (is_null($net)) { + throw new InvalidArgumentException('non-nullable net cannot be null'); } - $this->container['takeHome'] = $takeHome; + $this->container['net'] = $net; return $this; } /** - * Gets employerNic + * Gets niableGross * * @return float|null */ - public function getEmployerNic(): ?float + public function getNiableGross(): ?float { - return $this->container['employerNic']; + return $this->container['niableGross']; } /** - * Sets employerNic + * Sets niableGross * - * @param float|null $employerNic employerNic + * @param float|null $niableGross niableGross * * @return $this */ - public function setEmployerNic(?float $employerNic): static + public function setNiableGross(?float $niableGross): static { - if (is_null($employerNic)) { - throw new InvalidArgumentException('non-nullable employerNic cannot be null'); + if (is_null($niableGross)) { + throw new InvalidArgumentException('non-nullable niableGross cannot be null'); } - $this->container['employerNic'] = $employerNic; + $this->container['niableGross'] = $niableGross; return $this; } @@ -636,62 +677,55 @@ public function setShowQtyColumn(?bool $showQtyColumn): static } /** - * Gets lines + * Gets takeHome * - * @return \SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLineValue[]|null + * @return float|null */ - public function getLines(): ?array + public function getTakeHome(): ?float { - return $this->container['lines']; + return $this->container['takeHome']; } /** - * Sets lines + * Sets takeHome * - * @param \SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReportLineValue[]|null $lines lines + * @param float|null $takeHome takeHome * * @return $this */ - public function setLines(?array $lines): static + public function setTakeHome(?float $takeHome): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($takeHome)) { + throw new InvalidArgumentException('non-nullable takeHome cannot be null'); } - $this->container['lines'] = $lines; + $this->container['takeHome'] = $takeHome; return $this; } /** - * Gets ersPension + * Gets taxablePay * * @return float|null */ - public function getErsPension(): ?float + public function getTaxablePay(): ?float { - return $this->container['ersPension']; + return $this->container['taxablePay']; } /** - * Sets ersPension + * Sets taxablePay * - * @param float|null $ersPension ersPension + * @param float|null $taxablePay taxablePay * * @return $this */ - public function setErsPension(?float $ersPension): static + public function setTaxablePay(?float $taxablePay): static { - if (is_null($ersPension)) { - throw new InvalidArgumentException('non-nullable ersPension cannot be null'); + if (is_null($taxablePay)) { + throw new InvalidArgumentException('non-nullable taxablePay cannot be null'); } - $this->container['ersPension'] = $ersPension; + $this->container['taxablePay'] = $taxablePay; return $this; } diff --git a/src/Model/PayrollAnalysisEmployeeRoleBreakdownReportLineValue.php b/src/Model/PayrollAnalysisEmployeeRoleBreakdownReportLineValue.php index e205520..1287d28 100644 --- a/src/Model/PayrollAnalysisEmployeeRoleBreakdownReportLineValue.php +++ b/src/Model/PayrollAnalysisEmployeeRoleBreakdownReportLineValue.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class PayrollAnalysisEmployeeRoleBreakdownReportLineValue implements ModelInterf * @var array */ protected static array $openAPITypes = [ - 'qty' => 'float', 'code' => 'string', + 'qty' => 'float', 'value' => 'float' ]; @@ -70,8 +70,8 @@ class PayrollAnalysisEmployeeRoleBreakdownReportLineValue implements ModelInterf * @var array */ protected static array $openAPIFormats = [ - 'qty' => 'double', 'code' => null, + 'qty' => 'double', 'value' => 'double' ]; @@ -81,8 +81,8 @@ class PayrollAnalysisEmployeeRoleBreakdownReportLineValue implements ModelInterf * @var array */ protected static array $openAPINullables = [ - 'qty' => true, 'code' => true, + 'qty' => true, 'value' => false ]; @@ -172,8 +172,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'qty' => 'qty', 'code' => 'code', + 'qty' => 'qty', 'value' => 'value' ]; @@ -183,8 +183,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'qty' => 'setQty', 'code' => 'setCode', + 'qty' => 'setQty', 'value' => 'setValue' ]; @@ -194,8 +194,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'qty' => 'getQty', 'code' => 'getCode', + 'qty' => 'getQty', 'value' => 'getValue' ]; @@ -255,8 +255,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('qty', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('qty', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); } @@ -303,69 +303,69 @@ public function valid(): bool /** - * Gets qty + * Gets code * - * @return float|null + * @return string|null */ - public function getQty(): ?float + public function getCode(): ?string { - return $this->container['qty']; + return $this->container['code']; } /** - * Sets qty + * Sets code * - * @param float|null $qty qty + * @param string|null $code code * * @return $this */ - public function setQty(?float $qty): static + public function setCode(?string $code): static { - if (is_null($qty)) { - array_push($this->openAPINullablesSetToNull, 'qty'); + if (is_null($code)) { + array_push($this->openAPINullablesSetToNull, 'code'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('qty', $nullablesSetToNull); + $index = array_search('code', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['qty'] = $qty; + $this->container['code'] = $code; return $this; } /** - * Gets code + * Gets qty * - * @return string|null + * @return float|null */ - public function getCode(): ?string + public function getQty(): ?float { - return $this->container['code']; + return $this->container['qty']; } /** - * Sets code + * Sets qty * - * @param string|null $code code + * @param float|null $qty qty * * @return $this */ - public function setCode(?string $code): static + public function setQty(?float $qty): static { - if (is_null($code)) { - array_push($this->openAPINullablesSetToNull, 'code'); + if (is_null($qty)) { + array_push($this->openAPINullablesSetToNull, 'qty'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('code', $nullablesSetToNull); + $index = array_search('qty', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['code'] = $code; + $this->container['qty'] = $qty; return $this; } diff --git a/src/Model/PayrollAnalysisEmployeeRoleBreakdownReportReportResponse.php b/src/Model/PayrollAnalysisEmployeeRoleBreakdownReportReportResponse.php index 4af4055..de0f5d7 100644 --- a/src/Model/PayrollAnalysisEmployeeRoleBreakdownReportReportResponse.php +++ b/src/Model/PayrollAnalysisEmployeeRoleBreakdownReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class PayrollAnalysisEmployeeRoleBreakdownReportReportResponse implements ModelI * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\PayrollAnalysisEmployeeRoleBreakdownReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class PayrollAnalysisEmployeeRoleBreakdownReportReportResponse implements ModelI * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class PayrollAnalysisEmployeeRoleBreakdownReportReportResponse implements ModelI * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PayrollValueType.php b/src/Model/PayrollValueType.php index 91ca123..1824116 100644 --- a/src/Model/PayrollValueType.php +++ b/src/Model/PayrollValueType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -172,6 +172,10 @@ enum PayrollValueType: string case FLEXI_DD_PENSION_COMMENCEMENT_EXCESS = 'FlexiDd_PensionCommencementExcess'; case FLEXI_DD_PENSION_COMMENCEMENT_EXCESS_NON_TAX = 'FlexiDd_PensionCommencementExcess_NonTax'; + + case AVERAGE_HOLIDAY_PAY_DAYS = 'Average_Holiday_Pay_Days'; + + case HOLIDAY_DAYS_DAY_RATE = 'Holiday_Days_Day_Rate'; } diff --git a/src/Model/PayrunEmail.php b/src/Model/PayrunEmail.php index 394368a..5985a19 100644 --- a/src/Model/PayrunEmail.php +++ b/src/Model/PayrunEmail.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,27 +60,27 @@ class PayrunEmail implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'isActive' => 'bool', - 'name' => 'string', - 'templateType' => '\SynergiTech\Staffology\Model\EmployerTemplateType', - 'recipientAddress' => 'string', - 'pdfPassword' => 'string', - 'attachPayslips' => 'bool', - 'payslipsUnemailed' => 'bool', - 'payslipsSingleFile' => 'bool', - 'attachPaymentSummary' => 'bool', - 'attachP32' => 'bool', - 'attachP30' => 'bool', - 'attachGrossToNet' => 'bool', - 'attachPensionContributions' => 'bool', + 'attachBankPayments' => 'bool', 'attachCostAnalysis' => 'bool', 'attachCostOfEmployment' => 'bool', 'attachFullSummaryOfPay' => 'bool', - 'attachBankPayments' => 'bool', - 'customSubject' => 'string', + 'attachGrossToNet' => 'bool', + 'attachP30' => 'bool', + 'attachP32' => 'bool', + 'attachPaymentSummary' => 'bool', + 'attachPayslips' => 'bool', + 'attachPensionContributions' => 'bool', + 'childId' => 'string', 'customBody' => 'string', 'customBodyIsHtml' => 'bool', - 'childId' => 'string' + 'customSubject' => 'string', + 'isActive' => 'bool', + 'name' => 'string', + 'payslipsSingleFile' => 'bool', + 'payslipsUnemailed' => 'bool', + 'pdfPassword' => 'string', + 'recipientAddress' => 'string', + 'templateType' => '\SynergiTech\Staffology\Model\EmployerTemplateType' ]; /** @@ -89,27 +89,27 @@ class PayrunEmail implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'isActive' => null, - 'name' => null, - 'templateType' => null, - 'recipientAddress' => 'email', - 'pdfPassword' => null, - 'attachPayslips' => null, - 'payslipsUnemailed' => null, - 'payslipsSingleFile' => null, - 'attachPaymentSummary' => null, - 'attachP32' => null, - 'attachP30' => null, - 'attachGrossToNet' => null, - 'attachPensionContributions' => null, + 'attachBankPayments' => null, 'attachCostAnalysis' => null, 'attachCostOfEmployment' => null, 'attachFullSummaryOfPay' => null, - 'attachBankPayments' => null, - 'customSubject' => null, + 'attachGrossToNet' => null, + 'attachP30' => null, + 'attachP32' => null, + 'attachPaymentSummary' => null, + 'attachPayslips' => null, + 'attachPensionContributions' => null, + 'childId' => 'uuid', 'customBody' => null, 'customBodyIsHtml' => null, - 'childId' => 'uuid' + 'customSubject' => null, + 'isActive' => null, + 'name' => null, + 'payslipsSingleFile' => null, + 'payslipsUnemailed' => null, + 'pdfPassword' => null, + 'recipientAddress' => 'email', + 'templateType' => null ]; /** @@ -118,27 +118,27 @@ class PayrunEmail implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'isActive' => false, - 'name' => false, - 'templateType' => false, - 'recipientAddress' => false, - 'pdfPassword' => true, - 'attachPayslips' => false, - 'payslipsUnemailed' => false, - 'payslipsSingleFile' => false, - 'attachPaymentSummary' => false, - 'attachP32' => false, - 'attachP30' => false, - 'attachGrossToNet' => false, - 'attachPensionContributions' => false, + 'attachBankPayments' => false, 'attachCostAnalysis' => false, 'attachCostOfEmployment' => false, 'attachFullSummaryOfPay' => false, - 'attachBankPayments' => false, - 'customSubject' => true, + 'attachGrossToNet' => false, + 'attachP30' => false, + 'attachP32' => false, + 'attachPaymentSummary' => false, + 'attachPayslips' => false, + 'attachPensionContributions' => false, + 'childId' => false, 'customBody' => true, 'customBodyIsHtml' => false, - 'childId' => false + 'customSubject' => true, + 'isActive' => false, + 'name' => false, + 'payslipsSingleFile' => false, + 'payslipsUnemailed' => false, + 'pdfPassword' => true, + 'recipientAddress' => false, + 'templateType' => false ]; /** @@ -227,27 +227,27 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'isActive' => 'isActive', - 'name' => 'name', - 'templateType' => 'templateType', - 'recipientAddress' => 'recipientAddress', - 'pdfPassword' => 'pdfPassword', - 'attachPayslips' => 'attachPayslips', - 'payslipsUnemailed' => 'payslips_Unemailed', - 'payslipsSingleFile' => 'payslips_SingleFile', - 'attachPaymentSummary' => 'attachPaymentSummary', - 'attachP32' => 'attachP32', - 'attachP30' => 'attachP30', - 'attachGrossToNet' => 'attachGrossToNet', - 'attachPensionContributions' => 'attachPensionContributions', + 'attachBankPayments' => 'attachBankPayments', 'attachCostAnalysis' => 'attachCostAnalysis', 'attachCostOfEmployment' => 'attachCostOfEmployment', 'attachFullSummaryOfPay' => 'attachFullSummaryOfPay', - 'attachBankPayments' => 'attachBankPayments', - 'customSubject' => 'customSubject', + 'attachGrossToNet' => 'attachGrossToNet', + 'attachP30' => 'attachP30', + 'attachP32' => 'attachP32', + 'attachPaymentSummary' => 'attachPaymentSummary', + 'attachPayslips' => 'attachPayslips', + 'attachPensionContributions' => 'attachPensionContributions', + 'childId' => 'childId', 'customBody' => 'customBody', 'customBodyIsHtml' => 'customBody_IsHtml', - 'childId' => 'childId' + 'customSubject' => 'customSubject', + 'isActive' => 'isActive', + 'name' => 'name', + 'payslipsSingleFile' => 'payslips_SingleFile', + 'payslipsUnemailed' => 'payslips_Unemailed', + 'pdfPassword' => 'pdfPassword', + 'recipientAddress' => 'recipientAddress', + 'templateType' => 'templateType' ]; /** @@ -256,27 +256,27 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'isActive' => 'setIsActive', - 'name' => 'setName', - 'templateType' => 'setTemplateType', - 'recipientAddress' => 'setRecipientAddress', - 'pdfPassword' => 'setPdfPassword', - 'attachPayslips' => 'setAttachPayslips', - 'payslipsUnemailed' => 'setPayslipsUnemailed', - 'payslipsSingleFile' => 'setPayslipsSingleFile', - 'attachPaymentSummary' => 'setAttachPaymentSummary', - 'attachP32' => 'setAttachP32', - 'attachP30' => 'setAttachP30', - 'attachGrossToNet' => 'setAttachGrossToNet', - 'attachPensionContributions' => 'setAttachPensionContributions', + 'attachBankPayments' => 'setAttachBankPayments', 'attachCostAnalysis' => 'setAttachCostAnalysis', 'attachCostOfEmployment' => 'setAttachCostOfEmployment', 'attachFullSummaryOfPay' => 'setAttachFullSummaryOfPay', - 'attachBankPayments' => 'setAttachBankPayments', - 'customSubject' => 'setCustomSubject', + 'attachGrossToNet' => 'setAttachGrossToNet', + 'attachP30' => 'setAttachP30', + 'attachP32' => 'setAttachP32', + 'attachPaymentSummary' => 'setAttachPaymentSummary', + 'attachPayslips' => 'setAttachPayslips', + 'attachPensionContributions' => 'setAttachPensionContributions', + 'childId' => 'setChildId', 'customBody' => 'setCustomBody', 'customBodyIsHtml' => 'setCustomBodyIsHtml', - 'childId' => 'setChildId' + 'customSubject' => 'setCustomSubject', + 'isActive' => 'setIsActive', + 'name' => 'setName', + 'payslipsSingleFile' => 'setPayslipsSingleFile', + 'payslipsUnemailed' => 'setPayslipsUnemailed', + 'pdfPassword' => 'setPdfPassword', + 'recipientAddress' => 'setRecipientAddress', + 'templateType' => 'setTemplateType' ]; /** @@ -285,27 +285,27 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'isActive' => 'getIsActive', - 'name' => 'getName', - 'templateType' => 'getTemplateType', - 'recipientAddress' => 'getRecipientAddress', - 'pdfPassword' => 'getPdfPassword', - 'attachPayslips' => 'getAttachPayslips', - 'payslipsUnemailed' => 'getPayslipsUnemailed', - 'payslipsSingleFile' => 'getPayslipsSingleFile', - 'attachPaymentSummary' => 'getAttachPaymentSummary', - 'attachP32' => 'getAttachP32', - 'attachP30' => 'getAttachP30', - 'attachGrossToNet' => 'getAttachGrossToNet', - 'attachPensionContributions' => 'getAttachPensionContributions', + 'attachBankPayments' => 'getAttachBankPayments', 'attachCostAnalysis' => 'getAttachCostAnalysis', 'attachCostOfEmployment' => 'getAttachCostOfEmployment', 'attachFullSummaryOfPay' => 'getAttachFullSummaryOfPay', - 'attachBankPayments' => 'getAttachBankPayments', - 'customSubject' => 'getCustomSubject', + 'attachGrossToNet' => 'getAttachGrossToNet', + 'attachP30' => 'getAttachP30', + 'attachP32' => 'getAttachP32', + 'attachPaymentSummary' => 'getAttachPaymentSummary', + 'attachPayslips' => 'getAttachPayslips', + 'attachPensionContributions' => 'getAttachPensionContributions', + 'childId' => 'getChildId', 'customBody' => 'getCustomBody', 'customBodyIsHtml' => 'getCustomBodyIsHtml', - 'childId' => 'getChildId' + 'customSubject' => 'getCustomSubject', + 'isActive' => 'getIsActive', + 'name' => 'getName', + 'payslipsSingleFile' => 'getPayslipsSingleFile', + 'payslipsUnemailed' => 'getPayslipsUnemailed', + 'pdfPassword' => 'getPdfPassword', + 'recipientAddress' => 'getRecipientAddress', + 'templateType' => 'getTemplateType' ]; /** @@ -364,27 +364,27 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('isActive', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('templateType', $data ?? [], null); - $this->setIfExists('recipientAddress', $data ?? [], null); - $this->setIfExists('pdfPassword', $data ?? [], null); - $this->setIfExists('attachPayslips', $data ?? [], null); - $this->setIfExists('payslipsUnemailed', $data ?? [], null); - $this->setIfExists('payslipsSingleFile', $data ?? [], null); - $this->setIfExists('attachPaymentSummary', $data ?? [], null); - $this->setIfExists('attachP32', $data ?? [], null); - $this->setIfExists('attachP30', $data ?? [], null); - $this->setIfExists('attachGrossToNet', $data ?? [], null); - $this->setIfExists('attachPensionContributions', $data ?? [], null); + $this->setIfExists('attachBankPayments', $data ?? [], null); $this->setIfExists('attachCostAnalysis', $data ?? [], null); $this->setIfExists('attachCostOfEmployment', $data ?? [], null); $this->setIfExists('attachFullSummaryOfPay', $data ?? [], null); - $this->setIfExists('attachBankPayments', $data ?? [], null); - $this->setIfExists('customSubject', $data ?? [], null); + $this->setIfExists('attachGrossToNet', $data ?? [], null); + $this->setIfExists('attachP30', $data ?? [], null); + $this->setIfExists('attachP32', $data ?? [], null); + $this->setIfExists('attachPaymentSummary', $data ?? [], null); + $this->setIfExists('attachPayslips', $data ?? [], null); + $this->setIfExists('attachPensionContributions', $data ?? [], null); + $this->setIfExists('childId', $data ?? [], null); $this->setIfExists('customBody', $data ?? [], null); $this->setIfExists('customBodyIsHtml', $data ?? [], null); - $this->setIfExists('childId', $data ?? [], null); + $this->setIfExists('customSubject', $data ?? [], null); + $this->setIfExists('isActive', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('payslipsSingleFile', $data ?? [], null); + $this->setIfExists('payslipsUnemailed', $data ?? [], null); + $this->setIfExists('pdfPassword', $data ?? [], null); + $this->setIfExists('recipientAddress', $data ?? [], null); + $this->setIfExists('templateType', $data ?? [], null); } /** @@ -414,6 +414,10 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if (!is_null($this->container['customSubject']) && (mb_strlen($this->container['customSubject']) > 200)) { + $invalidProperties[] = "invalid value for 'customSubject', the character length must be smaller than or equal to 200."; + } + if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } @@ -425,6 +429,10 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; } + if (!is_null($this->container['pdfPassword']) && (mb_strlen($this->container['pdfPassword']) > 50)) { + $invalidProperties[] = "invalid value for 'pdfPassword', the character length must be smaller than or equal to 50."; + } + if ($this->container['recipientAddress'] === null) { $invalidProperties[] = "'recipientAddress' can't be null"; } @@ -436,14 +444,6 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'recipientAddress', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['pdfPassword']) && (mb_strlen($this->container['pdfPassword']) > 50)) { - $invalidProperties[] = "invalid value for 'pdfPassword', the character length must be smaller than or equal to 50."; - } - - if (!is_null($this->container['customSubject']) && (mb_strlen($this->container['customSubject']) > 200)) { - $invalidProperties[] = "invalid value for 'customSubject', the character length must be smaller than or equal to 200."; - } - return $invalidProperties; } @@ -460,611 +460,611 @@ public function valid(): bool /** - * Gets isActive + * Gets attachBankPayments * * @return bool|null */ - public function getIsActive(): ?bool + public function getAttachBankPayments(): ?bool { - return $this->container['isActive']; + return $this->container['attachBankPayments']; } /** - * Sets isActive + * Sets attachBankPayments * - * @param bool|null $isActive If false then this email won't be sent + * @param bool|null $attachBankPayments If set to True then the Bank Payments CSV file will be attached to the email * * @return $this */ - public function setIsActive(?bool $isActive): static + public function setAttachBankPayments(?bool $attachBankPayments): static { - if (is_null($isActive)) { - throw new InvalidArgumentException('non-nullable isActive cannot be null'); + if (is_null($attachBankPayments)) { + throw new InvalidArgumentException('non-nullable attachBankPayments cannot be null'); } - $this->container['isActive'] = $isActive; + $this->container['attachBankPayments'] = $attachBankPayments; return $this; } /** - * Gets name + * Gets attachCostAnalysis * - * @return string + * @return bool|null */ - public function getName(): string + public function getAttachCostAnalysis(): ?bool { - return $this->container['name']; + return $this->container['attachCostAnalysis']; } /** - * Sets name + * Sets attachCostAnalysis * - * @param string $name Only used for reference, not included in the email + * @param bool|null $attachCostAnalysis If set to True then the Cost Analysis report will be attached to the email * * @return $this */ - public function setName(string $name): static + public function setAttachCostAnalysis(?bool $attachCostAnalysis): static { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); - } - if ((mb_strlen($name) > 75)) { - throw new InvalidArgumentException('invalid length for $name when calling PayrunEmail., must be smaller than or equal to 75.'); + if (is_null($attachCostAnalysis)) { + throw new InvalidArgumentException('non-nullable attachCostAnalysis cannot be null'); } - if ((mb_strlen($name) < 1)) { - throw new InvalidArgumentException('invalid length for $name when calling PayrunEmail., must be bigger than or equal to 1.'); - } - - $this->container['name'] = $name; + $this->container['attachCostAnalysis'] = $attachCostAnalysis; return $this; } /** - * Gets templateType + * Gets attachCostOfEmployment * - * @return \SynergiTech\Staffology\Model\EmployerTemplateType|null + * @return bool|null */ - public function getTemplateType(): ?\SynergiTech\Staffology\Model\EmployerTemplateType + public function getAttachCostOfEmployment(): ?bool { - return $this->container['templateType']; + return $this->container['attachCostOfEmployment']; } /** - * Sets templateType + * Sets attachCostOfEmployment * - * @param \SynergiTech\Staffology\Model\EmployerTemplateType|null $templateType templateType + * @param bool|null $attachCostOfEmployment If set to True then the Cost of Employment report will be attached to the email * * @return $this */ - public function setTemplateType(?\SynergiTech\Staffology\Model\EmployerTemplateType $templateType): static + public function setAttachCostOfEmployment(?bool $attachCostOfEmployment): static { - if (is_null($templateType)) { - throw new InvalidArgumentException('non-nullable templateType cannot be null'); + if (is_null($attachCostOfEmployment)) { + throw new InvalidArgumentException('non-nullable attachCostOfEmployment cannot be null'); } - $this->container['templateType'] = $templateType; + $this->container['attachCostOfEmployment'] = $attachCostOfEmployment; return $this; } /** - * Gets recipientAddress + * Gets attachFullSummaryOfPay * - * @return string + * @return bool|null */ - public function getRecipientAddress(): string + public function getAttachFullSummaryOfPay(): ?bool { - return $this->container['recipientAddress']; + return $this->container['attachFullSummaryOfPay']; } /** - * Sets recipientAddress + * Sets attachFullSummaryOfPay * - * @param string $recipientAddress The address to which the email should be sent + * @param bool|null $attachFullSummaryOfPay If set to True then the Full Summary Of Payment report will be attached to the email * * @return $this */ - public function setRecipientAddress(string $recipientAddress): static + public function setAttachFullSummaryOfPay(?bool $attachFullSummaryOfPay): static { - if (is_null($recipientAddress)) { - throw new InvalidArgumentException('non-nullable recipientAddress cannot be null'); - } - if ((mb_strlen($recipientAddress) > 150)) { - throw new InvalidArgumentException('invalid length for $recipientAddress when calling PayrunEmail., must be smaller than or equal to 150.'); - } - if ((mb_strlen($recipientAddress) < 1)) { - throw new InvalidArgumentException('invalid length for $recipientAddress when calling PayrunEmail., must be bigger than or equal to 1.'); + if (is_null($attachFullSummaryOfPay)) { + throw new InvalidArgumentException('non-nullable attachFullSummaryOfPay cannot be null'); } - - $this->container['recipientAddress'] = $recipientAddress; + $this->container['attachFullSummaryOfPay'] = $attachFullSummaryOfPay; return $this; } /** - * Gets pdfPassword + * Gets attachGrossToNet * - * @return string|null + * @return bool|null */ - public function getPdfPassword(): ?string + public function getAttachGrossToNet(): ?bool { - return $this->container['pdfPassword']; + return $this->container['attachGrossToNet']; } /** - * Sets pdfPassword + * Sets attachGrossToNet * - * @param string|null $pdfPassword If a value is provided, then all PDFs attached to the email will be encrypted using this password + * @param bool|null $attachGrossToNet If set to True then the GrossToNet report will be attached to the email * * @return $this */ - public function setPdfPassword(?string $pdfPassword): static + public function setAttachGrossToNet(?bool $attachGrossToNet): static { - if (is_null($pdfPassword)) { - array_push($this->openAPINullablesSetToNull, 'pdfPassword'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pdfPassword', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($pdfPassword) && (mb_strlen($pdfPassword) > 50)) { - throw new InvalidArgumentException('invalid length for $pdfPassword when calling PayrunEmail., must be smaller than or equal to 50.'); + if (is_null($attachGrossToNet)) { + throw new InvalidArgumentException('non-nullable attachGrossToNet cannot be null'); } - - $this->container['pdfPassword'] = $pdfPassword; + $this->container['attachGrossToNet'] = $attachGrossToNet; return $this; } /** - * Gets attachPayslips + * Gets attachP30 * * @return bool|null */ - public function getAttachPayslips(): ?bool + public function getAttachP30(): ?bool { - return $this->container['attachPayslips']; + return $this->container['attachP30']; } /** - * Sets attachPayslips + * Sets attachP30 * - * @param bool|null $attachPayslips If set to true then Payslips will be attached to the email + * @param bool|null $attachP30 If set to True then the P30 report will be attached to the email * * @return $this */ - public function setAttachPayslips(?bool $attachPayslips): static + public function setAttachP30(?bool $attachP30): static { - if (is_null($attachPayslips)) { - throw new InvalidArgumentException('non-nullable attachPayslips cannot be null'); + if (is_null($attachP30)) { + throw new InvalidArgumentException('non-nullable attachP30 cannot be null'); } - $this->container['attachPayslips'] = $attachPayslips; + $this->container['attachP30'] = $attachP30; return $this; } /** - * Gets payslipsUnemailed + * Gets attachP32 * * @return bool|null */ - public function getPayslipsUnemailed(): ?bool + public function getAttachP32(): ?bool { - return $this->container['payslipsUnemailed']; + return $this->container['attachP32']; } /** - * Sets payslipsUnemailed + * Sets attachP32 * - * @param bool|null $payslipsUnemailed If AttachPayslips is true and this property is also true then only payslips that haven't already been sent directly to employees will be attached. + * @param bool|null $attachP32 If set to True then the P32 report will be attached to the email * * @return $this */ - public function setPayslipsUnemailed(?bool $payslipsUnemailed): static + public function setAttachP32(?bool $attachP32): static { - if (is_null($payslipsUnemailed)) { - throw new InvalidArgumentException('non-nullable payslipsUnemailed cannot be null'); + if (is_null($attachP32)) { + throw new InvalidArgumentException('non-nullable attachP32 cannot be null'); } - $this->container['payslipsUnemailed'] = $payslipsUnemailed; + $this->container['attachP32'] = $attachP32; return $this; } /** - * Gets payslipsSingleFile + * Gets attachPaymentSummary * * @return bool|null */ - public function getPayslipsSingleFile(): ?bool + public function getAttachPaymentSummary(): ?bool { - return $this->container['payslipsSingleFile']; + return $this->container['attachPaymentSummary']; } /** - * Sets payslipsSingleFile + * Sets attachPaymentSummary * - * @param bool|null $payslipsSingleFile If AttachPayslips is true and this property is also true then the payslips will be attached as a single file rather than as separate PDFs, + * @param bool|null $attachPaymentSummary If set to True then the PaymentSummary report will be attached to the Email * * @return $this */ - public function setPayslipsSingleFile(?bool $payslipsSingleFile): static + public function setAttachPaymentSummary(?bool $attachPaymentSummary): static { - if (is_null($payslipsSingleFile)) { - throw new InvalidArgumentException('non-nullable payslipsSingleFile cannot be null'); + if (is_null($attachPaymentSummary)) { + throw new InvalidArgumentException('non-nullable attachPaymentSummary cannot be null'); } - $this->container['payslipsSingleFile'] = $payslipsSingleFile; + $this->container['attachPaymentSummary'] = $attachPaymentSummary; return $this; } /** - * Gets attachPaymentSummary + * Gets attachPayslips * * @return bool|null */ - public function getAttachPaymentSummary(): ?bool + public function getAttachPayslips(): ?bool { - return $this->container['attachPaymentSummary']; + return $this->container['attachPayslips']; } /** - * Sets attachPaymentSummary + * Sets attachPayslips * - * @param bool|null $attachPaymentSummary If set to True then the PaymentSummary report will be attached to the Email + * @param bool|null $attachPayslips If set to true then Payslips will be attached to the email * * @return $this */ - public function setAttachPaymentSummary(?bool $attachPaymentSummary): static + public function setAttachPayslips(?bool $attachPayslips): static { - if (is_null($attachPaymentSummary)) { - throw new InvalidArgumentException('non-nullable attachPaymentSummary cannot be null'); + if (is_null($attachPayslips)) { + throw new InvalidArgumentException('non-nullable attachPayslips cannot be null'); } - $this->container['attachPaymentSummary'] = $attachPaymentSummary; + $this->container['attachPayslips'] = $attachPayslips; return $this; } /** - * Gets attachP32 + * Gets attachPensionContributions * * @return bool|null */ - public function getAttachP32(): ?bool + public function getAttachPensionContributions(): ?bool { - return $this->container['attachP32']; + return $this->container['attachPensionContributions']; } /** - * Sets attachP32 + * Sets attachPensionContributions * - * @param bool|null $attachP32 If set to True then the P32 report will be attached to the email + * @param bool|null $attachPensionContributions If set to True then the Pensions Contributions report will be attached to the email * * @return $this */ - public function setAttachP32(?bool $attachP32): static + public function setAttachPensionContributions(?bool $attachPensionContributions): static { - if (is_null($attachP32)) { - throw new InvalidArgumentException('non-nullable attachP32 cannot be null'); + if (is_null($attachPensionContributions)) { + throw new InvalidArgumentException('non-nullable attachPensionContributions cannot be null'); } - $this->container['attachP32'] = $attachP32; + $this->container['attachPensionContributions'] = $attachPensionContributions; return $this; } /** - * Gets attachP30 + * Gets childId * - * @return bool|null + * @return string|null */ - public function getAttachP30(): ?bool + public function getChildId(): ?string { - return $this->container['attachP30']; + return $this->container['childId']; } /** - * Sets attachP30 + * Sets childId * - * @param bool|null $attachP30 If set to True then the P30 report will be attached to the email + * @param string|null $childId This is nothing but the UniqueId of the model. * * @return $this */ - public function setAttachP30(?bool $attachP30): static + public function setChildId(?string $childId): static { - if (is_null($attachP30)) { - throw new InvalidArgumentException('non-nullable attachP30 cannot be null'); + if (is_null($childId)) { + throw new InvalidArgumentException('non-nullable childId cannot be null'); } - $this->container['attachP30'] = $attachP30; + $this->container['childId'] = $childId; return $this; } /** - * Gets attachGrossToNet + * Gets customBody * - * @return bool|null + * @return string|null */ - public function getAttachGrossToNet(): ?bool + public function getCustomBody(): ?string { - return $this->container['attachGrossToNet']; + return $this->container['customBody']; } /** - * Sets attachGrossToNet + * Sets customBody * - * @param bool|null $attachGrossToNet If set to True then the GrossToNet report will be attached to the email + * @param string|null $customBody If TemplateType is null then you can provide the body text here to be used for the email * * @return $this */ - public function setAttachGrossToNet(?bool $attachGrossToNet): static + public function setCustomBody(?string $customBody): static { - if (is_null($attachGrossToNet)) { - throw new InvalidArgumentException('non-nullable attachGrossToNet cannot be null'); + if (is_null($customBody)) { + array_push($this->openAPINullablesSetToNull, 'customBody'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('customBody', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['attachGrossToNet'] = $attachGrossToNet; + $this->container['customBody'] = $customBody; return $this; } /** - * Gets attachPensionContributions + * Gets customBodyIsHtml * * @return bool|null */ - public function getAttachPensionContributions(): ?bool + public function getCustomBodyIsHtml(): ?bool { - return $this->container['attachPensionContributions']; + return $this->container['customBodyIsHtml']; } /** - * Sets attachPensionContributions + * Sets customBodyIsHtml * - * @param bool|null $attachPensionContributions If set to True then the Pensions Contributions report will be attached to the email + * @param bool|null $customBodyIsHtml If the CustomBody is in HTML format, set this to true. * * @return $this */ - public function setAttachPensionContributions(?bool $attachPensionContributions): static + public function setCustomBodyIsHtml(?bool $customBodyIsHtml): static { - if (is_null($attachPensionContributions)) { - throw new InvalidArgumentException('non-nullable attachPensionContributions cannot be null'); + if (is_null($customBodyIsHtml)) { + throw new InvalidArgumentException('non-nullable customBodyIsHtml cannot be null'); } - $this->container['attachPensionContributions'] = $attachPensionContributions; + $this->container['customBodyIsHtml'] = $customBodyIsHtml; return $this; } /** - * Gets attachCostAnalysis + * Gets customSubject * - * @return bool|null + * @return string|null */ - public function getAttachCostAnalysis(): ?bool + public function getCustomSubject(): ?string { - return $this->container['attachCostAnalysis']; + return $this->container['customSubject']; } /** - * Sets attachCostAnalysis + * Sets customSubject * - * @param bool|null $attachCostAnalysis If set to True then the Cost Analysis report will be attached to the email + * @param string|null $customSubject If TemplateType is null then you can provide a subject line here to be used for the email * * @return $this */ - public function setAttachCostAnalysis(?bool $attachCostAnalysis): static + public function setCustomSubject(?string $customSubject): static { - if (is_null($attachCostAnalysis)) { - throw new InvalidArgumentException('non-nullable attachCostAnalysis cannot be null'); + if (is_null($customSubject)) { + array_push($this->openAPINullablesSetToNull, 'customSubject'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('customSubject', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['attachCostAnalysis'] = $attachCostAnalysis; + if (!is_null($customSubject) && (mb_strlen($customSubject) > 200)) { + throw new InvalidArgumentException('invalid length for $customSubject when calling PayrunEmail., must be smaller than or equal to 200.'); + } + + $this->container['customSubject'] = $customSubject; return $this; } /** - * Gets attachCostOfEmployment + * Gets isActive * * @return bool|null */ - public function getAttachCostOfEmployment(): ?bool + public function getIsActive(): ?bool { - return $this->container['attachCostOfEmployment']; + return $this->container['isActive']; } /** - * Sets attachCostOfEmployment + * Sets isActive * - * @param bool|null $attachCostOfEmployment If set to True then the Cost of Employment report will be attached to the email + * @param bool|null $isActive If false then this email won't be sent * * @return $this */ - public function setAttachCostOfEmployment(?bool $attachCostOfEmployment): static + public function setIsActive(?bool $isActive): static { - if (is_null($attachCostOfEmployment)) { - throw new InvalidArgumentException('non-nullable attachCostOfEmployment cannot be null'); + if (is_null($isActive)) { + throw new InvalidArgumentException('non-nullable isActive cannot be null'); } - $this->container['attachCostOfEmployment'] = $attachCostOfEmployment; + $this->container['isActive'] = $isActive; return $this; } /** - * Gets attachFullSummaryOfPay + * Gets name * - * @return bool|null + * @return string */ - public function getAttachFullSummaryOfPay(): ?bool + public function getName(): string { - return $this->container['attachFullSummaryOfPay']; + return $this->container['name']; } /** - * Sets attachFullSummaryOfPay + * Sets name * - * @param bool|null $attachFullSummaryOfPay If set to True then the Full Summary Of Payment report will be attached to the email + * @param string $name Only used for reference, not included in the email * * @return $this */ - public function setAttachFullSummaryOfPay(?bool $attachFullSummaryOfPay): static + public function setName(string $name): static { - if (is_null($attachFullSummaryOfPay)) { - throw new InvalidArgumentException('non-nullable attachFullSummaryOfPay cannot be null'); + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + if ((mb_strlen($name) > 75)) { + throw new InvalidArgumentException('invalid length for $name when calling PayrunEmail., must be smaller than or equal to 75.'); + } + if ((mb_strlen($name) < 1)) { + throw new InvalidArgumentException('invalid length for $name when calling PayrunEmail., must be bigger than or equal to 1.'); } - $this->container['attachFullSummaryOfPay'] = $attachFullSummaryOfPay; + + $this->container['name'] = $name; return $this; } /** - * Gets attachBankPayments + * Gets payslipsSingleFile * * @return bool|null */ - public function getAttachBankPayments(): ?bool + public function getPayslipsSingleFile(): ?bool { - return $this->container['attachBankPayments']; + return $this->container['payslipsSingleFile']; } /** - * Sets attachBankPayments + * Sets payslipsSingleFile * - * @param bool|null $attachBankPayments If set to True then the Bank Payments CSV file will be attached to the email + * @param bool|null $payslipsSingleFile If AttachPayslips is true and this property is also true then the payslips will be attached as a single file rather than as separate PDFs, * * @return $this */ - public function setAttachBankPayments(?bool $attachBankPayments): static + public function setPayslipsSingleFile(?bool $payslipsSingleFile): static { - if (is_null($attachBankPayments)) { - throw new InvalidArgumentException('non-nullable attachBankPayments cannot be null'); + if (is_null($payslipsSingleFile)) { + throw new InvalidArgumentException('non-nullable payslipsSingleFile cannot be null'); } - $this->container['attachBankPayments'] = $attachBankPayments; + $this->container['payslipsSingleFile'] = $payslipsSingleFile; return $this; } /** - * Gets customSubject + * Gets payslipsUnemailed * - * @return string|null + * @return bool|null */ - public function getCustomSubject(): ?string + public function getPayslipsUnemailed(): ?bool { - return $this->container['customSubject']; + return $this->container['payslipsUnemailed']; } /** - * Sets customSubject + * Sets payslipsUnemailed * - * @param string|null $customSubject If TemplateType is null then you can provide a subject line here to be used for the email + * @param bool|null $payslipsUnemailed If AttachPayslips is true and this property is also true then only payslips that haven't already been sent directly to employees will be attached. * * @return $this */ - public function setCustomSubject(?string $customSubject): static + public function setPayslipsUnemailed(?bool $payslipsUnemailed): static { - if (is_null($customSubject)) { - array_push($this->openAPINullablesSetToNull, 'customSubject'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('customSubject', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($customSubject) && (mb_strlen($customSubject) > 200)) { - throw new InvalidArgumentException('invalid length for $customSubject when calling PayrunEmail., must be smaller than or equal to 200.'); + if (is_null($payslipsUnemailed)) { + throw new InvalidArgumentException('non-nullable payslipsUnemailed cannot be null'); } - - $this->container['customSubject'] = $customSubject; + $this->container['payslipsUnemailed'] = $payslipsUnemailed; return $this; } /** - * Gets customBody + * Gets pdfPassword * * @return string|null */ - public function getCustomBody(): ?string + public function getPdfPassword(): ?string { - return $this->container['customBody']; + return $this->container['pdfPassword']; } /** - * Sets customBody + * Sets pdfPassword * - * @param string|null $customBody If TemplateType is null then you can provide the body text here to be used for the email + * @param string|null $pdfPassword If a value is provided, then all PDFs attached to the email will be encrypted using this password * * @return $this */ - public function setCustomBody(?string $customBody): static + public function setPdfPassword(?string $pdfPassword): static { - if (is_null($customBody)) { - array_push($this->openAPINullablesSetToNull, 'customBody'); + if (is_null($pdfPassword)) { + array_push($this->openAPINullablesSetToNull, 'pdfPassword'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('customBody', $nullablesSetToNull); + $index = array_search('pdfPassword', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['customBody'] = $customBody; + if (!is_null($pdfPassword) && (mb_strlen($pdfPassword) > 50)) { + throw new InvalidArgumentException('invalid length for $pdfPassword when calling PayrunEmail., must be smaller than or equal to 50.'); + } + + $this->container['pdfPassword'] = $pdfPassword; return $this; } /** - * Gets customBodyIsHtml + * Gets recipientAddress * - * @return bool|null + * @return string */ - public function getCustomBodyIsHtml(): ?bool + public function getRecipientAddress(): string { - return $this->container['customBodyIsHtml']; + return $this->container['recipientAddress']; } /** - * Sets customBodyIsHtml + * Sets recipientAddress * - * @param bool|null $customBodyIsHtml If the CustomBody is in HTML format, set this to true. + * @param string $recipientAddress The address to which the email should be sent * * @return $this */ - public function setCustomBodyIsHtml(?bool $customBodyIsHtml): static + public function setRecipientAddress(string $recipientAddress): static { - if (is_null($customBodyIsHtml)) { - throw new InvalidArgumentException('non-nullable customBodyIsHtml cannot be null'); + if (is_null($recipientAddress)) { + throw new InvalidArgumentException('non-nullable recipientAddress cannot be null'); } - $this->container['customBodyIsHtml'] = $customBodyIsHtml; + if ((mb_strlen($recipientAddress) > 150)) { + throw new InvalidArgumentException('invalid length for $recipientAddress when calling PayrunEmail., must be smaller than or equal to 150.'); + } + if ((mb_strlen($recipientAddress) < 1)) { + throw new InvalidArgumentException('invalid length for $recipientAddress when calling PayrunEmail., must be bigger than or equal to 1.'); + } + + $this->container['recipientAddress'] = $recipientAddress; return $this; } /** - * Gets childId + * Gets templateType * - * @return string|null + * @return \SynergiTech\Staffology\Model\EmployerTemplateType|null */ - public function getChildId(): ?string + public function getTemplateType(): ?\SynergiTech\Staffology\Model\EmployerTemplateType { - return $this->container['childId']; + return $this->container['templateType']; } /** - * Sets childId + * Sets templateType * - * @param string|null $childId This is nothing but the UniqueId of the model. + * @param \SynergiTech\Staffology\Model\EmployerTemplateType|null $templateType templateType * * @return $this */ - public function setChildId(?string $childId): static + public function setTemplateType(?\SynergiTech\Staffology\Model\EmployerTemplateType $templateType): static { - if (is_null($childId)) { - throw new InvalidArgumentException('non-nullable childId cannot be null'); + if (is_null($templateType)) { + throw new InvalidArgumentException('non-nullable templateType cannot be null'); } - $this->container['childId'] = $childId; + $this->container['templateType'] = $templateType; return $this; } diff --git a/src/Model/PayrunPaymentsReport.php b/src/Model/PayrunPaymentsReport.php index 1f6e9f6..3963aa4 100644 --- a/src/Model/PayrunPaymentsReport.php +++ b/src/Model/PayrunPaymentsReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,24 +60,26 @@ class PayrunPaymentsReport implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPITypes = [ - 'payments' => '\SynergiTech\Staffology\Model\PayRunPayment[]', - 'status' => '\SynergiTech\Staffology\Model\BackgroundTaskStatus', - 'statusMessage' => 'string', - 'link' => 'string', + 'allowRepost' => 'bool', 'connectedExternalDataProvider' => '\SynergiTech\Staffology\Model\ExternalDataProvider', 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'isDraft' => 'bool', + 'link' => 'string', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'payments' => '\SynergiTech\Staffology\Model\PayRunPayment[]', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', + 'status' => '\SynergiTech\Staffology\Model\BackgroundTaskStatus', + 'statusMessage' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -86,24 +88,26 @@ class PayrunPaymentsReport implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPIFormats = [ - 'payments' => null, - 'status' => null, - 'statusMessage' => null, - 'link' => null, + 'allowRepost' => null, 'connectedExternalDataProvider' => null, 'employer' => null, - 'payPeriod' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'isDraft' => null, + 'link' => null, 'ordinal' => 'int32', + 'payPeriod' => null, + 'payments' => null, 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, + 'status' => null, + 'statusMessage' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -112,24 +116,26 @@ class PayrunPaymentsReport implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPINullables = [ - 'payments' => true, - 'status' => false, - 'statusMessage' => true, - 'link' => true, + 'allowRepost' => false, 'connectedExternalDataProvider' => false, 'employer' => false, - 'payPeriod' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'isDraft' => false, + 'link' => true, 'ordinal' => false, + 'payPeriod' => false, + 'payments' => true, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, + 'status' => false, + 'statusMessage' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -218,24 +224,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payments' => 'payments', - 'status' => 'status', - 'statusMessage' => 'statusMessage', - 'link' => 'link', + 'allowRepost' => 'allowRepost', 'connectedExternalDataProvider' => 'connectedExternalDataProvider', 'employer' => 'employer', - 'payPeriod' => 'payPeriod', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'isDraft' => 'isDraft', + 'link' => 'link', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', + 'payments' => 'payments', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', + 'status' => 'status', + 'statusMessage' => 'statusMessage', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -244,24 +252,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payments' => 'setPayments', - 'status' => 'setStatus', - 'statusMessage' => 'setStatusMessage', - 'link' => 'setLink', + 'allowRepost' => 'setAllowRepost', 'connectedExternalDataProvider' => 'setConnectedExternalDataProvider', 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'isDraft' => 'setIsDraft', + 'link' => 'setLink', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', + 'payments' => 'setPayments', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', + 'status' => 'setStatus', + 'statusMessage' => 'setStatusMessage', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -270,24 +280,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payments' => 'getPayments', - 'status' => 'getStatus', - 'statusMessage' => 'getStatusMessage', - 'link' => 'getLink', + 'allowRepost' => 'getAllowRepost', 'connectedExternalDataProvider' => 'getConnectedExternalDataProvider', 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'isDraft' => 'getIsDraft', + 'link' => 'getLink', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', + 'payments' => 'getPayments', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', + 'status' => 'getStatus', + 'statusMessage' => 'getStatusMessage', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -346,24 +358,26 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payments', $data ?? [], null); - $this->setIfExists('status', $data ?? [], null); - $this->setIfExists('statusMessage', $data ?? [], null); - $this->setIfExists('link', $data ?? [], null); + $this->setIfExists('allowRepost', $data ?? [], null); $this->setIfExists('connectedExternalDataProvider', $data ?? [], null); $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('link', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('payments', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('statusMessage', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -409,184 +423,231 @@ public function valid(): bool /** - * Gets payments + * Gets allowRepost * - * @return \SynergiTech\Staffology\Model\PayRunPayment[]|null + * @return bool|null */ - public function getPayments(): ?array + public function getAllowRepost(): ?bool { - return $this->container['payments']; + return $this->container['allowRepost']; } /** - * Sets payments + * Sets allowRepost * - * @param \SynergiTech\Staffology\Model\PayRunPayment[]|null $payments payments + * @param bool|null $allowRepost allowRepost * * @return $this */ - public function setPayments(?array $payments): static + public function setAllowRepost(?bool $allowRepost): static { - if (is_null($payments)) { - array_push($this->openAPINullablesSetToNull, 'payments'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payments', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($allowRepost)) { + throw new InvalidArgumentException('non-nullable allowRepost cannot be null'); } - $this->container['payments'] = $payments; + $this->container['allowRepost'] = $allowRepost; return $this; } /** - * Gets status + * Gets connectedExternalDataProvider * - * @return \SynergiTech\Staffology\Model\BackgroundTaskStatus|null + * @return \SynergiTech\Staffology\Model\ExternalDataProvider|null */ - public function getStatus(): ?\SynergiTech\Staffology\Model\BackgroundTaskStatus + public function getConnectedExternalDataProvider(): ?\SynergiTech\Staffology\Model\ExternalDataProvider { - return $this->container['status']; + return $this->container['connectedExternalDataProvider']; } /** - * Sets status + * Sets connectedExternalDataProvider * - * @param \SynergiTech\Staffology\Model\BackgroundTaskStatus|null $status status + * @param \SynergiTech\Staffology\Model\ExternalDataProvider|null $connectedExternalDataProvider connectedExternalDataProvider * * @return $this */ - public function setStatus(?\SynergiTech\Staffology\Model\BackgroundTaskStatus $status): static + public function setConnectedExternalDataProvider(?\SynergiTech\Staffology\Model\ExternalDataProvider $connectedExternalDataProvider): static { - if (is_null($status)) { - throw new InvalidArgumentException('non-nullable status cannot be null'); + if (is_null($connectedExternalDataProvider)) { + throw new InvalidArgumentException('non-nullable connectedExternalDataProvider cannot be null'); } - $this->container['status'] = $status; + $this->container['connectedExternalDataProvider'] = $connectedExternalDataProvider; return $this; } /** - * Gets statusMessage + * Gets employer * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getStatusMessage(): ?string + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['statusMessage']; + return $this->container['employer']; } /** - * Sets statusMessage + * Sets employer * - * @param string|null $statusMessage [readonly] A message to elaborate on the Status + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setStatusMessage(?string $statusMessage): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($statusMessage)) { - array_push($this->openAPINullablesSetToNull, 'statusMessage'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('statusMessage', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); } - $this->container['statusMessage'] = $statusMessage; + $this->container['employer'] = $employer; return $this; } /** - * Gets link + * Gets endDate + * + * @return \DateTime|null + */ + public function getEndDate(): ?\DateTime + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param \DateTime|null $endDate endDate + * + * @return $this + */ + public function setEndDate(?\DateTime $endDate): static + { + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets endPeriodName * * @return string|null */ - public function getLink(): ?string + public function getEndPeriodName(): ?string { - return $this->container['link']; + return $this->container['endPeriodName']; } /** - * Sets link + * Sets endPeriodName * - * @param string|null $link [readonly] If available, a link to the payments in an ExternalDataProvider + * @param string|null $endPeriodName endPeriodName * * @return $this */ - public function setLink(?string $link): static + public function setEndPeriodName(?string $endPeriodName): static { - if (is_null($link)) { - array_push($this->openAPINullablesSetToNull, 'link'); + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('link', $nullablesSetToNull); + $index = array_search('endPeriodName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['link'] = $link; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets connectedExternalDataProvider + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\ExternalDataProvider|null + * @return bool|null */ - public function getConnectedExternalDataProvider(): ?\SynergiTech\Staffology\Model\ExternalDataProvider + public function getIsDraft(): ?bool { - return $this->container['connectedExternalDataProvider']; + return $this->container['isDraft']; } /** - * Sets connectedExternalDataProvider + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\ExternalDataProvider|null $connectedExternalDataProvider connectedExternalDataProvider + * @param bool|null $isDraft isDraft * * @return $this */ - public function setConnectedExternalDataProvider(?\SynergiTech\Staffology\Model\ExternalDataProvider $connectedExternalDataProvider): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($connectedExternalDataProvider)) { - throw new InvalidArgumentException('non-nullable connectedExternalDataProvider cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['connectedExternalDataProvider'] = $connectedExternalDataProvider; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets employer + * Gets link * - * @return \SynergiTech\Staffology\Model\Item|null + * @return string|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getLink(): ?string { - return $this->container['employer']; + return $this->container['link']; } /** - * Sets employer + * Sets link * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param string|null $link [readonly] If available, a link to the payments in an ExternalDataProvider * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setLink(?string $link): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($link)) { + array_push($this->openAPINullablesSetToNull, 'link'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('link', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employer'] = $employer; + $this->container['link'] = $link; + + return $this; + } + + /** + * Gets ordinal + * + * @return int|null + */ + public function getOrdinal(): ?int + { + return $this->container['ordinal']; + } + + /** + * Sets ordinal + * + * @param int|null $ordinal ordinal + * + * @return $this + */ + public function setOrdinal(?int $ordinal): static + { + if (is_null($ordinal)) { + throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + } + $this->container['ordinal'] = $ordinal; return $this; } @@ -619,28 +680,35 @@ public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPerio } /** - * Gets ordinal + * Gets payments * - * @return int|null + * @return \SynergiTech\Staffology\Model\PayRunPayment[]|null */ - public function getOrdinal(): ?int + public function getPayments(): ?array { - return $this->container['ordinal']; + return $this->container['payments']; } /** - * Sets ordinal + * Sets payments * - * @param int|null $ordinal ordinal + * @param \SynergiTech\Staffology\Model\PayRunPayment[]|null $payments payments * * @return $this */ - public function setOrdinal(?int $ordinal): static + public function setPayments(?array $payments): static { - if (is_null($ordinal)) { - throw new InvalidArgumentException('non-nullable ordinal cannot be null'); + if (is_null($payments)) { + array_push($this->openAPINullablesSetToNull, 'payments'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payments', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['ordinal'] = $ordinal; + $this->container['payments'] = $payments; return $this; } @@ -700,150 +768,150 @@ public function setPeriodTo(?int $periodTo): static } /** - * Gets startPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getStartPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['startPeriodName']; + return $this->container['report']; } /** - * Sets startPeriodName + * Sets report * - * @param string|null $startPeriodName startPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setStartPeriodName(?string $startPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['startPeriodName'] = $startPeriodName; + $this->container['report'] = $report; return $this; } /** - * Gets endPeriodName + * Gets startDate * - * @return string|null + * @return \DateTime|null */ - public function getEndPeriodName(): ?string + public function getStartDate(): ?\DateTime { - return $this->container['endPeriodName']; + return $this->container['startDate']; } /** - * Sets endPeriodName + * Sets startDate * - * @param string|null $endPeriodName endPeriodName + * @param \DateTime|null $startDate startDate * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setStartDate(?\DateTime $startDate): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets startDate + * Gets startPeriodName * - * @return \DateTime|null + * @return string|null */ - public function getStartDate(): ?\DateTime + public function getStartPeriodName(): ?string { - return $this->container['startDate']; + return $this->container['startPeriodName']; } /** - * Sets startDate + * Sets startPeriodName * - * @param \DateTime|null $startDate startDate + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['startDate'] = $startDate; + $this->container['startPeriodName'] = $startPeriodName; return $this; } /** - * Gets endDate + * Gets status * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\BackgroundTaskStatus|null */ - public function getEndDate(): ?\DateTime + public function getStatus(): ?\SynergiTech\Staffology\Model\BackgroundTaskStatus { - return $this->container['endDate']; + return $this->container['status']; } /** - * Sets endDate + * Sets status * - * @param \DateTime|null $endDate endDate + * @param \SynergiTech\Staffology\Model\BackgroundTaskStatus|null $status status * * @return $this */ - public function setEndDate(?\DateTime $endDate): static + public function setStatus(?\SynergiTech\Staffology\Model\BackgroundTaskStatus $status): static { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['endDate'] = $endDate; + $this->container['status'] = $status; return $this; } /** - * Gets report + * Gets statusMessage * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStatusMessage(): ?string { - return $this->container['report']; + return $this->container['statusMessage']; } /** - * Sets report + * Sets statusMessage * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $statusMessage [readonly] A message to elaborate on the Status * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStatusMessage(?string $statusMessage): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($statusMessage)) { + array_push($this->openAPINullablesSetToNull, 'statusMessage'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('statusMessage', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['statusMessage'] = $statusMessage; return $this; } @@ -910,28 +978,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/PayrunPaymentsReportReportResponse.php b/src/Model/PayrunPaymentsReportReportResponse.php index eba91be..6e3137c 100644 --- a/src/Model/PayrunPaymentsReportReportResponse.php +++ b/src/Model/PayrunPaymentsReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class PayrunPaymentsReportReportResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\PayrunPaymentsReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class PayrunPaymentsReportReportResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class PayrunPaymentsReportReportResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/Payslip.php b/src/Model/Payslip.php index ef02b50..6631d3e 100644 --- a/src/Model/Payslip.php +++ b/src/Model/Payslip.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,38 +60,40 @@ class Payslip implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'isClosed' => 'bool', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', - 'periodNumber' => 'int', - 'period' => 'string', - 'from' => '\DateTime', - 'to' => '\DateTime', - 'paymentDate' => '\DateTime', - 'note' => 'string', 'allowanceNote' => 'string', + 'costCentres' => '\SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]', + 'departmentMemberships' => '\SynergiTech\Staffology\Model\DepartmentMembership[]', + 'depts' => '\SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]', 'employee' => '\SynergiTech\Staffology\Model\Item', - 'logoUrl' => 'string', + 'employeeCostCentres' => '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', + 'employeePensionContributions' => 'array', + 'employeeRoleAnalysisCategoryCodes' => '\SynergiTech\Staffology\Model\EmployeeRoleAnalysisCategoryCode[]', 'employer' => '\SynergiTech\Staffology\Model\Item', 'employerAddress' => '\SynergiTech\Staffology\Model\Address', + 'employerNi' => 'float', + 'employerPensionContribs' => 'float', + 'employerPensionContributions' => '\SynergiTech\Staffology\Model\EmployerPensionContribution[]', + 'employmentDetails' => '\SynergiTech\Staffology\Model\EmploymentDetails', + 'from' => '\DateTime', 'hmrcDetails' => '\SynergiTech\Staffology\Model\HmrcDetails', + 'isClosed' => 'bool', + 'isSupplementary' => 'bool', + 'lines' => '\SynergiTech\Staffology\Model\PayslipLine[]', + 'logoUrl' => 'string', + 'note' => 'string', + 'originalPayRunPaymentDate' => '\DateTime', 'payOptions' => '\SynergiTech\Staffology\Model\PayOptions', - 'employmentDetails' => '\SynergiTech\Staffology\Model\EmploymentDetails', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'paymentDate' => '\DateTime', + 'pensionContributionsByRole' => '\SynergiTech\Staffology\Model\Item[]', + 'period' => 'string', + 'periodNumber' => 'int', 'personalDetails' => '\SynergiTech\Staffology\Model\PersonalDetails', + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'to' => '\DateTime', 'totals' => '\SynergiTech\Staffology\Model\PayRunTotals', 'totalsYtd' => '\SynergiTech\Staffology\Model\PayRunTotals', - 'lines' => '\SynergiTech\Staffology\Model\PayslipLine[]', - 'employerNi' => 'float', - 'employerPensionContribs' => 'float', - 'depts' => '\SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]', - 'umbrellaPayment' => '\SynergiTech\Staffology\Model\UmbrellaPayment', - 'costCentres' => '\SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]', - 'employeeRoleAnalysisCategoryCodes' => '\SynergiTech\Staffology\Model\EmployeeRoleAnalysisCategoryCode[]', - 'employeeCostCentres' => '\SynergiTech\Staffology\Model\EmployeeCostCentre[]', - 'departmentMemberships' => '\SynergiTech\Staffology\Model\DepartmentMembership[]', - 'pensionContributionsByRole' => '\SynergiTech\Staffology\Model\Item[]', - 'employerPensionContributions' => '\SynergiTech\Staffology\Model\EmployerPensionContribution[]', - 'employeePensionContributions' => 'array' + 'umbrellaPayment' => '\SynergiTech\Staffology\Model\UmbrellaPayment' ]; /** @@ -100,38 +102,40 @@ class Payslip implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'isClosed' => null, - 'taxYear' => null, - 'payPeriod' => null, - 'periodNumber' => 'int32', - 'period' => null, - 'from' => 'date', - 'to' => 'date', - 'paymentDate' => 'date', - 'note' => null, 'allowanceNote' => null, + 'costCentres' => null, + 'departmentMemberships' => null, + 'depts' => null, 'employee' => null, - 'logoUrl' => null, + 'employeeCostCentres' => null, + 'employeePensionContributions' => null, + 'employeeRoleAnalysisCategoryCodes' => null, 'employer' => null, 'employerAddress' => null, + 'employerNi' => 'double', + 'employerPensionContribs' => 'double', + 'employerPensionContributions' => null, + 'employmentDetails' => null, + 'from' => 'date', 'hmrcDetails' => null, + 'isClosed' => null, + 'isSupplementary' => null, + 'lines' => null, + 'logoUrl' => null, + 'note' => null, + 'originalPayRunPaymentDate' => 'date', 'payOptions' => null, - 'employmentDetails' => null, + 'payPeriod' => null, + 'paymentDate' => 'date', + 'pensionContributionsByRole' => null, + 'period' => null, + 'periodNumber' => 'int32', 'personalDetails' => null, + 'taxYear' => null, + 'to' => 'date', 'totals' => null, 'totalsYtd' => null, - 'lines' => null, - 'employerNi' => 'double', - 'employerPensionContribs' => 'double', - 'depts' => null, - 'umbrellaPayment' => null, - 'costCentres' => null, - 'employeeRoleAnalysisCategoryCodes' => null, - 'employeeCostCentres' => null, - 'departmentMemberships' => null, - 'pensionContributionsByRole' => null, - 'employerPensionContributions' => null, - 'employeePensionContributions' => null + 'umbrellaPayment' => null ]; /** @@ -140,38 +144,40 @@ class Payslip implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'isClosed' => false, - 'taxYear' => false, - 'payPeriod' => false, - 'periodNumber' => false, - 'period' => true, - 'from' => false, - 'to' => false, - 'paymentDate' => false, - 'note' => true, 'allowanceNote' => true, + 'costCentres' => true, + 'departmentMemberships' => true, + 'depts' => true, 'employee' => false, - 'logoUrl' => true, + 'employeeCostCentres' => true, + 'employeePensionContributions' => true, + 'employeeRoleAnalysisCategoryCodes' => true, 'employer' => false, 'employerAddress' => false, + 'employerNi' => false, + 'employerPensionContribs' => false, + 'employerPensionContributions' => true, + 'employmentDetails' => false, + 'from' => false, 'hmrcDetails' => false, + 'isClosed' => false, + 'isSupplementary' => false, + 'lines' => true, + 'logoUrl' => true, + 'note' => true, + 'originalPayRunPaymentDate' => true, 'payOptions' => false, - 'employmentDetails' => false, + 'payPeriod' => false, + 'paymentDate' => false, + 'pensionContributionsByRole' => true, + 'period' => true, + 'periodNumber' => false, 'personalDetails' => false, + 'taxYear' => false, + 'to' => false, 'totals' => false, 'totalsYtd' => false, - 'lines' => true, - 'employerNi' => false, - 'employerPensionContribs' => false, - 'depts' => true, - 'umbrellaPayment' => false, - 'costCentres' => true, - 'employeeRoleAnalysisCategoryCodes' => true, - 'employeeCostCentres' => true, - 'departmentMemberships' => true, - 'pensionContributionsByRole' => true, - 'employerPensionContributions' => true, - 'employeePensionContributions' => true + 'umbrellaPayment' => false ]; /** @@ -260,38 +266,40 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'isClosed' => 'isClosed', - 'taxYear' => 'taxYear', - 'payPeriod' => 'payPeriod', - 'periodNumber' => 'periodNumber', - 'period' => 'period', - 'from' => 'from', - 'to' => 'to', - 'paymentDate' => 'paymentDate', - 'note' => 'note', 'allowanceNote' => 'allowanceNote', + 'costCentres' => 'costCentres', + 'departmentMemberships' => 'departmentMemberships', + 'depts' => 'depts', 'employee' => 'employee', - 'logoUrl' => 'logoUrl', + 'employeeCostCentres' => 'employeeCostCentres', + 'employeePensionContributions' => 'employeePensionContributions', + 'employeeRoleAnalysisCategoryCodes' => 'employeeRoleAnalysisCategoryCodes', 'employer' => 'employer', 'employerAddress' => 'employerAddress', + 'employerNi' => 'employerNi', + 'employerPensionContribs' => 'employerPensionContribs', + 'employerPensionContributions' => 'employerPensionContributions', + 'employmentDetails' => 'employmentDetails', + 'from' => 'from', 'hmrcDetails' => 'hmrcDetails', + 'isClosed' => 'isClosed', + 'isSupplementary' => 'isSupplementary', + 'lines' => 'lines', + 'logoUrl' => 'logoUrl', + 'note' => 'note', + 'originalPayRunPaymentDate' => 'originalPayRunPaymentDate', 'payOptions' => 'payOptions', - 'employmentDetails' => 'employmentDetails', + 'payPeriod' => 'payPeriod', + 'paymentDate' => 'paymentDate', + 'pensionContributionsByRole' => 'pensionContributionsByRole', + 'period' => 'period', + 'periodNumber' => 'periodNumber', 'personalDetails' => 'personalDetails', + 'taxYear' => 'taxYear', + 'to' => 'to', 'totals' => 'totals', 'totalsYtd' => 'totalsYtd', - 'lines' => 'lines', - 'employerNi' => 'employerNi', - 'employerPensionContribs' => 'employerPensionContribs', - 'depts' => 'depts', - 'umbrellaPayment' => 'umbrellaPayment', - 'costCentres' => 'costCentres', - 'employeeRoleAnalysisCategoryCodes' => 'employeeRoleAnalysisCategoryCodes', - 'employeeCostCentres' => 'employeeCostCentres', - 'departmentMemberships' => 'departmentMemberships', - 'pensionContributionsByRole' => 'pensionContributionsByRole', - 'employerPensionContributions' => 'employerPensionContributions', - 'employeePensionContributions' => 'employeePensionContributions' + 'umbrellaPayment' => 'umbrellaPayment' ]; /** @@ -300,38 +308,40 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'isClosed' => 'setIsClosed', - 'taxYear' => 'setTaxYear', - 'payPeriod' => 'setPayPeriod', - 'periodNumber' => 'setPeriodNumber', - 'period' => 'setPeriod', - 'from' => 'setFrom', - 'to' => 'setTo', - 'paymentDate' => 'setPaymentDate', - 'note' => 'setNote', 'allowanceNote' => 'setAllowanceNote', + 'costCentres' => 'setCostCentres', + 'departmentMemberships' => 'setDepartmentMemberships', + 'depts' => 'setDepts', 'employee' => 'setEmployee', - 'logoUrl' => 'setLogoUrl', + 'employeeCostCentres' => 'setEmployeeCostCentres', + 'employeePensionContributions' => 'setEmployeePensionContributions', + 'employeeRoleAnalysisCategoryCodes' => 'setEmployeeRoleAnalysisCategoryCodes', 'employer' => 'setEmployer', 'employerAddress' => 'setEmployerAddress', + 'employerNi' => 'setEmployerNi', + 'employerPensionContribs' => 'setEmployerPensionContribs', + 'employerPensionContributions' => 'setEmployerPensionContributions', + 'employmentDetails' => 'setEmploymentDetails', + 'from' => 'setFrom', 'hmrcDetails' => 'setHmrcDetails', + 'isClosed' => 'setIsClosed', + 'isSupplementary' => 'setIsSupplementary', + 'lines' => 'setLines', + 'logoUrl' => 'setLogoUrl', + 'note' => 'setNote', + 'originalPayRunPaymentDate' => 'setOriginalPayRunPaymentDate', 'payOptions' => 'setPayOptions', - 'employmentDetails' => 'setEmploymentDetails', + 'payPeriod' => 'setPayPeriod', + 'paymentDate' => 'setPaymentDate', + 'pensionContributionsByRole' => 'setPensionContributionsByRole', + 'period' => 'setPeriod', + 'periodNumber' => 'setPeriodNumber', 'personalDetails' => 'setPersonalDetails', + 'taxYear' => 'setTaxYear', + 'to' => 'setTo', 'totals' => 'setTotals', 'totalsYtd' => 'setTotalsYtd', - 'lines' => 'setLines', - 'employerNi' => 'setEmployerNi', - 'employerPensionContribs' => 'setEmployerPensionContribs', - 'depts' => 'setDepts', - 'umbrellaPayment' => 'setUmbrellaPayment', - 'costCentres' => 'setCostCentres', - 'employeeRoleAnalysisCategoryCodes' => 'setEmployeeRoleAnalysisCategoryCodes', - 'employeeCostCentres' => 'setEmployeeCostCentres', - 'departmentMemberships' => 'setDepartmentMemberships', - 'pensionContributionsByRole' => 'setPensionContributionsByRole', - 'employerPensionContributions' => 'setEmployerPensionContributions', - 'employeePensionContributions' => 'setEmployeePensionContributions' + 'umbrellaPayment' => 'setUmbrellaPayment' ]; /** @@ -340,38 +350,40 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'isClosed' => 'getIsClosed', - 'taxYear' => 'getTaxYear', - 'payPeriod' => 'getPayPeriod', - 'periodNumber' => 'getPeriodNumber', - 'period' => 'getPeriod', - 'from' => 'getFrom', - 'to' => 'getTo', - 'paymentDate' => 'getPaymentDate', - 'note' => 'getNote', 'allowanceNote' => 'getAllowanceNote', + 'costCentres' => 'getCostCentres', + 'departmentMemberships' => 'getDepartmentMemberships', + 'depts' => 'getDepts', 'employee' => 'getEmployee', - 'logoUrl' => 'getLogoUrl', + 'employeeCostCentres' => 'getEmployeeCostCentres', + 'employeePensionContributions' => 'getEmployeePensionContributions', + 'employeeRoleAnalysisCategoryCodes' => 'getEmployeeRoleAnalysisCategoryCodes', 'employer' => 'getEmployer', 'employerAddress' => 'getEmployerAddress', + 'employerNi' => 'getEmployerNi', + 'employerPensionContribs' => 'getEmployerPensionContribs', + 'employerPensionContributions' => 'getEmployerPensionContributions', + 'employmentDetails' => 'getEmploymentDetails', + 'from' => 'getFrom', 'hmrcDetails' => 'getHmrcDetails', + 'isClosed' => 'getIsClosed', + 'isSupplementary' => 'getIsSupplementary', + 'lines' => 'getLines', + 'logoUrl' => 'getLogoUrl', + 'note' => 'getNote', + 'originalPayRunPaymentDate' => 'getOriginalPayRunPaymentDate', 'payOptions' => 'getPayOptions', - 'employmentDetails' => 'getEmploymentDetails', + 'payPeriod' => 'getPayPeriod', + 'paymentDate' => 'getPaymentDate', + 'pensionContributionsByRole' => 'getPensionContributionsByRole', + 'period' => 'getPeriod', + 'periodNumber' => 'getPeriodNumber', 'personalDetails' => 'getPersonalDetails', + 'taxYear' => 'getTaxYear', + 'to' => 'getTo', 'totals' => 'getTotals', 'totalsYtd' => 'getTotalsYtd', - 'lines' => 'getLines', - 'employerNi' => 'getEmployerNi', - 'employerPensionContribs' => 'getEmployerPensionContribs', - 'depts' => 'getDepts', - 'umbrellaPayment' => 'getUmbrellaPayment', - 'costCentres' => 'getCostCentres', - 'employeeRoleAnalysisCategoryCodes' => 'getEmployeeRoleAnalysisCategoryCodes', - 'employeeCostCentres' => 'getEmployeeCostCentres', - 'departmentMemberships' => 'getDepartmentMemberships', - 'pensionContributionsByRole' => 'getPensionContributionsByRole', - 'employerPensionContributions' => 'getEmployerPensionContributions', - 'employeePensionContributions' => 'getEmployeePensionContributions' + 'umbrellaPayment' => 'getUmbrellaPayment' ]; /** @@ -430,38 +442,40 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('isClosed', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); - $this->setIfExists('periodNumber', $data ?? [], null); - $this->setIfExists('period', $data ?? [], null); - $this->setIfExists('from', $data ?? [], null); - $this->setIfExists('to', $data ?? [], null); - $this->setIfExists('paymentDate', $data ?? [], null); - $this->setIfExists('note', $data ?? [], null); $this->setIfExists('allowanceNote', $data ?? [], null); + $this->setIfExists('costCentres', $data ?? [], null); + $this->setIfExists('departmentMemberships', $data ?? [], null); + $this->setIfExists('depts', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('logoUrl', $data ?? [], null); + $this->setIfExists('employeeCostCentres', $data ?? [], null); + $this->setIfExists('employeePensionContributions', $data ?? [], null); + $this->setIfExists('employeeRoleAnalysisCategoryCodes', $data ?? [], null); $this->setIfExists('employer', $data ?? [], null); $this->setIfExists('employerAddress', $data ?? [], null); + $this->setIfExists('employerNi', $data ?? [], null); + $this->setIfExists('employerPensionContribs', $data ?? [], null); + $this->setIfExists('employerPensionContributions', $data ?? [], null); + $this->setIfExists('employmentDetails', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); $this->setIfExists('hmrcDetails', $data ?? [], null); + $this->setIfExists('isClosed', $data ?? [], null); + $this->setIfExists('isSupplementary', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('logoUrl', $data ?? [], null); + $this->setIfExists('note', $data ?? [], null); + $this->setIfExists('originalPayRunPaymentDate', $data ?? [], null); $this->setIfExists('payOptions', $data ?? [], null); - $this->setIfExists('employmentDetails', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('paymentDate', $data ?? [], null); + $this->setIfExists('pensionContributionsByRole', $data ?? [], null); + $this->setIfExists('period', $data ?? [], null); + $this->setIfExists('periodNumber', $data ?? [], null); $this->setIfExists('personalDetails', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); $this->setIfExists('totals', $data ?? [], null); $this->setIfExists('totalsYtd', $data ?? [], null); - $this->setIfExists('lines', $data ?? [], null); - $this->setIfExists('employerNi', $data ?? [], null); - $this->setIfExists('employerPensionContribs', $data ?? [], null); - $this->setIfExists('depts', $data ?? [], null); $this->setIfExists('umbrellaPayment', $data ?? [], null); - $this->setIfExists('costCentres', $data ?? [], null); - $this->setIfExists('employeeRoleAnalysisCategoryCodes', $data ?? [], null); - $this->setIfExists('employeeCostCentres', $data ?? [], null); - $this->setIfExists('departmentMemberships', $data ?? [], null); - $this->setIfExists('pensionContributionsByRole', $data ?? [], null); - $this->setIfExists('employerPensionContributions', $data ?? [], null); - $this->setIfExists('employeePensionContributions', $data ?? [], null); } /** @@ -507,407 +521,462 @@ public function valid(): bool /** - * Gets isClosed + * Gets allowanceNote * - * @return bool|null + * @return string|null */ - public function getIsClosed(): ?bool + public function getAllowanceNote(): ?string { - return $this->container['isClosed']; + return $this->container['allowanceNote']; } /** - * Sets isClosed + * Sets allowanceNote * - * @param bool|null $isClosed [readonly] Indicates if the Payrun has been finalised + * @param string|null $allowanceNote [readonly] Details of remaining allowance to show on payslip * * @return $this */ - public function setIsClosed(?bool $isClosed): static + public function setAllowanceNote(?string $allowanceNote): static { - if (is_null($isClosed)) { - throw new InvalidArgumentException('non-nullable isClosed cannot be null'); + if (is_null($allowanceNote)) { + array_push($this->openAPINullablesSetToNull, 'allowanceNote'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('allowanceNote', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isClosed'] = $isClosed; + $this->container['allowanceNote'] = $allowanceNote; return $this; } /** - * Gets taxYear + * Gets costCentres * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return \SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getCostCentres(): ?array { - return $this->container['taxYear']; + return $this->container['costCentres']; } /** - * Sets taxYear + * Sets costCentres * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param \SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]|null $costCentres The employees Cost Centre Membership(s) only populated when creating journals * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setCostCentres(?array $costCentres): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($costCentres)) { + array_push($this->openAPINullablesSetToNull, 'costCentres'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('costCentres', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['taxYear'] = $taxYear; + $this->container['costCentres'] = $costCentres; return $this; } /** - * Gets payPeriod + * Gets departmentMemberships * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return \SynergiTech\Staffology\Model\DepartmentMembership[]|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getDepartmentMemberships(): ?array { - return $this->container['payPeriod']; + return $this->container['departmentMemberships']; } /** - * Sets payPeriod + * Sets departmentMemberships * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param \SynergiTech\Staffology\Model\DepartmentMembership[]|null $departmentMemberships The Employee Department Membership(s) by role only populated when creating journals * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setDepartmentMemberships(?array $departmentMemberships): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($departmentMemberships)) { + array_push($this->openAPINullablesSetToNull, 'departmentMemberships'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('departmentMemberships', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriod'] = $payPeriod; + $this->container['departmentMemberships'] = $departmentMemberships; return $this; } /** - * Gets periodNumber + * Gets depts * - * @return int|null + * @return \SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]|null */ - public function getPeriodNumber(): ?int + public function getDepts(): ?array { - return $this->container['periodNumber']; + return $this->container['depts']; } /** - * Sets periodNumber + * Sets depts * - * @param int|null $periodNumber periodNumber + * @param \SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]|null $depts The employees Department Membership(s) at the time the payrun was finalised * * @return $this */ - public function setPeriodNumber(?int $periodNumber): static + public function setDepts(?array $depts): static { - if (is_null($periodNumber)) { - throw new InvalidArgumentException('non-nullable periodNumber cannot be null'); + if (is_null($depts)) { + array_push($this->openAPINullablesSetToNull, 'depts'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('depts', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['periodNumber'] = $periodNumber; + $this->container['depts'] = $depts; return $this; } /** - * Gets period + * Gets employee * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getPeriod(): ?string + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['period']; + return $this->container['employee']; } /** - * Sets period + * Sets employee * - * @param string|null $period [readonly] A description of the period that Payslip relates to. + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setPeriod(?string $period): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($period)) { - array_push($this->openAPINullablesSetToNull, 'period'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('period', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['period'] = $period; + $this->container['employee'] = $employee; return $this; } /** - * Gets from + * Gets employeeCostCentres * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\EmployeeCostCentre[]|null */ - public function getFrom(): ?\DateTime + public function getEmployeeCostCentres(): ?array { - return $this->container['from']; + return $this->container['employeeCostCentres']; } /** - * Sets from + * Sets employeeCostCentres * - * @param \DateTime|null $from [readonly] The start date of the period this Payslip covers. + * @param \SynergiTech\Staffology\Model\EmployeeCostCentre[]|null $employeeCostCentres The Employee Cost Centre Membership(s) by role only populated when creating journals * * @return $this */ - public function setFrom(?\DateTime $from): static + public function setEmployeeCostCentres(?array $employeeCostCentres): static { - if (is_null($from)) { - throw new InvalidArgumentException('non-nullable from cannot be null'); + if (is_null($employeeCostCentres)) { + array_push($this->openAPINullablesSetToNull, 'employeeCostCentres'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employeeCostCentres', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['from'] = $from; + $this->container['employeeCostCentres'] = $employeeCostCentres; return $this; } /** - * Gets to + * Gets employeePensionContributions * - * @return \DateTime|null + * @return array|null */ - public function getTo(): ?\DateTime + public function getEmployeePensionContributions(): ?array { - return $this->container['to']; + return $this->container['employeePensionContributions']; } /** - * Sets to + * Sets employeePensionContributions * - * @param \DateTime|null $to [readonly] The end date of the period this Payslip covers. + * @param array|null $employeePensionContributions Dictionary of Pension Contributions(s) Keyed on PensionId containing Employee Pension and AVC Contribution(s) Bfd, AVC indicator and pension rule * * @return $this */ - public function setTo(?\DateTime $to): static + public function setEmployeePensionContributions(?array $employeePensionContributions): static { - if (is_null($to)) { - throw new InvalidArgumentException('non-nullable to cannot be null'); + if (is_null($employeePensionContributions)) { + array_push($this->openAPINullablesSetToNull, 'employeePensionContributions'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employeePensionContributions', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['to'] = $to; + $this->container['employeePensionContributions'] = $employeePensionContributions; return $this; } /** - * Gets paymentDate + * Gets employeeRoleAnalysisCategoryCodes * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\EmployeeRoleAnalysisCategoryCode[]|null */ - public function getPaymentDate(): ?\DateTime + public function getEmployeeRoleAnalysisCategoryCodes(): ?array { - return $this->container['paymentDate']; + return $this->container['employeeRoleAnalysisCategoryCodes']; } /** - * Sets paymentDate + * Sets employeeRoleAnalysisCategoryCodes * - * @param \DateTime|null $paymentDate [readonly] The date the Employee will be paid on + * @param \SynergiTech\Staffology\Model\EmployeeRoleAnalysisCategoryCode[]|null $employeeRoleAnalysisCategoryCodes The EmployeeRoleAnalysisCategoryCodes only populated when creating journals * * @return $this */ - public function setPaymentDate(?\DateTime $paymentDate): static + public function setEmployeeRoleAnalysisCategoryCodes(?array $employeeRoleAnalysisCategoryCodes): static { - if (is_null($paymentDate)) { - throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); + if (is_null($employeeRoleAnalysisCategoryCodes)) { + array_push($this->openAPINullablesSetToNull, 'employeeRoleAnalysisCategoryCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('employeeRoleAnalysisCategoryCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['paymentDate'] = $paymentDate; + $this->container['employeeRoleAnalysisCategoryCodes'] = $employeeRoleAnalysisCategoryCodes; return $this; } /** - * Gets note + * Gets employer * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getNote(): ?string + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['note']; + return $this->container['employer']; } /** - * Sets note + * Sets employer * - * @param string|null $note [readonly] Any note that should appear on the payslip + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setNote(?string $note): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($note)) { - array_push($this->openAPINullablesSetToNull, 'note'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('note', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); } - $this->container['note'] = $note; + $this->container['employer'] = $employer; return $this; } /** - * Gets allowanceNote + * Gets employerAddress * - * @return string|null + * @return \SynergiTech\Staffology\Model\Address|null */ - public function getAllowanceNote(): ?string + public function getEmployerAddress(): ?\SynergiTech\Staffology\Model\Address { - return $this->container['allowanceNote']; + return $this->container['employerAddress']; } /** - * Sets allowanceNote + * Sets employerAddress * - * @param string|null $allowanceNote [readonly] Details of remaining allowance to show on payslip + * @param \SynergiTech\Staffology\Model\Address|null $employerAddress employerAddress * * @return $this */ - public function setAllowanceNote(?string $allowanceNote): static + public function setEmployerAddress(?\SynergiTech\Staffology\Model\Address $employerAddress): static { - if (is_null($allowanceNote)) { - array_push($this->openAPINullablesSetToNull, 'allowanceNote'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('allowanceNote', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employerAddress)) { + throw new InvalidArgumentException('non-nullable employerAddress cannot be null'); } - $this->container['allowanceNote'] = $allowanceNote; + $this->container['employerAddress'] = $employerAddress; return $this; } /** - * Gets employee + * Gets employerNi * - * @return \SynergiTech\Staffology\Model\Item|null + * @return float|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getEmployerNi(): ?float { - return $this->container['employee']; + return $this->container['employerNi']; } /** - * Sets employee + * Sets employerNi * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param float|null $employerNi [readonly] The Employer NI Contribution amount * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setEmployerNi(?float $employerNi): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($employerNi)) { + throw new InvalidArgumentException('non-nullable employerNi cannot be null'); } - $this->container['employee'] = $employee; + $this->container['employerNi'] = $employerNi; return $this; } /** - * Gets logoUrl + * Gets employerPensionContribs * - * @return string|null + * @return float|null */ - public function getLogoUrl(): ?string + public function getEmployerPensionContribs(): ?float { - return $this->container['logoUrl']; + return $this->container['employerPensionContribs']; } /** - * Sets logoUrl + * Sets employerPensionContribs * - * @param string|null $logoUrl [readonly] The Logo to include on the payslip + * @param float|null $employerPensionContribs [readonly] The Employer Pension Contribution Amount * * @return $this */ - public function setLogoUrl(?string $logoUrl): static + public function setEmployerPensionContribs(?float $employerPensionContribs): static { - if (is_null($logoUrl)) { - array_push($this->openAPINullablesSetToNull, 'logoUrl'); + if (is_null($employerPensionContribs)) { + throw new InvalidArgumentException('non-nullable employerPensionContribs cannot be null'); + } + $this->container['employerPensionContribs'] = $employerPensionContribs; + + return $this; + } + + /** + * Gets employerPensionContributions + * + * @return \SynergiTech\Staffology\Model\EmployerPensionContribution[]|null + */ + public function getEmployerPensionContributions(): ?array + { + return $this->container['employerPensionContributions']; + } + + /** + * Sets employerPensionContributions + * + * @param \SynergiTech\Staffology\Model\EmployerPensionContribution[]|null $employerPensionContributions [readonly] The list of Employer Pension Contribution(s) + * + * @return $this + */ + public function setEmployerPensionContributions(?array $employerPensionContributions): static + { + if (is_null($employerPensionContributions)) { + array_push($this->openAPINullablesSetToNull, 'employerPensionContributions'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('logoUrl', $nullablesSetToNull); + $index = array_search('employerPensionContributions', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['logoUrl'] = $logoUrl; + $this->container['employerPensionContributions'] = $employerPensionContributions; return $this; } /** - * Gets employer + * Gets employmentDetails * - * @return \SynergiTech\Staffology\Model\Item|null + * @return \SynergiTech\Staffology\Model\EmploymentDetails|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getEmploymentDetails(): ?\SynergiTech\Staffology\Model\EmploymentDetails { - return $this->container['employer']; + return $this->container['employmentDetails']; } /** - * Sets employer + * Sets employmentDetails * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param \SynergiTech\Staffology\Model\EmploymentDetails|null $employmentDetails employmentDetails * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setEmploymentDetails(?\SynergiTech\Staffology\Model\EmploymentDetails $employmentDetails): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($employmentDetails)) { + throw new InvalidArgumentException('non-nullable employmentDetails cannot be null'); } - $this->container['employer'] = $employer; + $this->container['employmentDetails'] = $employmentDetails; return $this; } /** - * Gets employerAddress + * Gets from * - * @return \SynergiTech\Staffology\Model\Address|null + * @return \DateTime|null */ - public function getEmployerAddress(): ?\SynergiTech\Staffology\Model\Address + public function getFrom(): ?\DateTime { - return $this->container['employerAddress']; + return $this->container['from']; } /** - * Sets employerAddress + * Sets from * - * @param \SynergiTech\Staffology\Model\Address|null $employerAddress employerAddress + * @param \DateTime|null $from [readonly] The start date of the period this Payslip covers. * * @return $this */ - public function setEmployerAddress(?\SynergiTech\Staffology\Model\Address $employerAddress): static + public function setFrom(?\DateTime $from): static { - if (is_null($employerAddress)) { - throw new InvalidArgumentException('non-nullable employerAddress cannot be null'); + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); } - $this->container['employerAddress'] = $employerAddress; + $this->container['from'] = $from; return $this; } @@ -940,523 +1009,529 @@ public function setHmrcDetails(?\SynergiTech\Staffology\Model\HmrcDetails $hmrcD } /** - * Gets payOptions + * Gets isClosed * - * @return \SynergiTech\Staffology\Model\PayOptions|null + * @return bool|null */ - public function getPayOptions(): ?\SynergiTech\Staffology\Model\PayOptions + public function getIsClosed(): ?bool { - return $this->container['payOptions']; + return $this->container['isClosed']; } /** - * Sets payOptions + * Sets isClosed * - * @param \SynergiTech\Staffology\Model\PayOptions|null $payOptions payOptions + * @param bool|null $isClosed [readonly] Indicates if the Payrun has been finalised * * @return $this */ - public function setPayOptions(?\SynergiTech\Staffology\Model\PayOptions $payOptions): static + public function setIsClosed(?bool $isClosed): static { - if (is_null($payOptions)) { - throw new InvalidArgumentException('non-nullable payOptions cannot be null'); + if (is_null($isClosed)) { + throw new InvalidArgumentException('non-nullable isClosed cannot be null'); } - $this->container['payOptions'] = $payOptions; + $this->container['isClosed'] = $isClosed; return $this; } /** - * Gets employmentDetails + * Gets isSupplementary * - * @return \SynergiTech\Staffology\Model\EmploymentDetails|null + * @return bool|null */ - public function getEmploymentDetails(): ?\SynergiTech\Staffology\Model\EmploymentDetails + public function getIsSupplementary(): ?bool { - return $this->container['employmentDetails']; + return $this->container['isSupplementary']; } /** - * Sets employmentDetails + * Sets isSupplementary * - * @param \SynergiTech\Staffology\Model\EmploymentDetails|null $employmentDetails employmentDetails + * @param bool|null $isSupplementary Indicates if this payslip is for a supplementary pay run * * @return $this */ - public function setEmploymentDetails(?\SynergiTech\Staffology\Model\EmploymentDetails $employmentDetails): static + public function setIsSupplementary(?bool $isSupplementary): static { - if (is_null($employmentDetails)) { - throw new InvalidArgumentException('non-nullable employmentDetails cannot be null'); + if (is_null($isSupplementary)) { + throw new InvalidArgumentException('non-nullable isSupplementary cannot be null'); } - $this->container['employmentDetails'] = $employmentDetails; + $this->container['isSupplementary'] = $isSupplementary; return $this; } /** - * Gets personalDetails + * Gets lines * - * @return \SynergiTech\Staffology\Model\PersonalDetails|null + * @return \SynergiTech\Staffology\Model\PayslipLine[]|null */ - public function getPersonalDetails(): ?\SynergiTech\Staffology\Model\PersonalDetails + public function getLines(): ?array { - return $this->container['personalDetails']; + return $this->container['lines']; } /** - * Sets personalDetails + * Sets lines * - * @param \SynergiTech\Staffology\Model\PersonalDetails|null $personalDetails personalDetails + * @param \SynergiTech\Staffology\Model\PayslipLine[]|null $lines [readonly] The lines to display on the Payslip * * @return $this */ - public function setPersonalDetails(?\SynergiTech\Staffology\Model\PersonalDetails $personalDetails): static + public function setLines(?array $lines): static { - if (is_null($personalDetails)) { - throw new InvalidArgumentException('non-nullable personalDetails cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['personalDetails'] = $personalDetails; + $this->container['lines'] = $lines; return $this; } /** - * Gets totals + * Gets logoUrl * - * @return \SynergiTech\Staffology\Model\PayRunTotals|null + * @return string|null */ - public function getTotals(): ?\SynergiTech\Staffology\Model\PayRunTotals + public function getLogoUrl(): ?string { - return $this->container['totals']; + return $this->container['logoUrl']; } /** - * Sets totals + * Sets logoUrl * - * @param \SynergiTech\Staffology\Model\PayRunTotals|null $totals totals + * @param string|null $logoUrl [readonly] The Logo to include on the payslip * * @return $this */ - public function setTotals(?\SynergiTech\Staffology\Model\PayRunTotals $totals): static + public function setLogoUrl(?string $logoUrl): static { - if (is_null($totals)) { - throw new InvalidArgumentException('non-nullable totals cannot be null'); + if (is_null($logoUrl)) { + array_push($this->openAPINullablesSetToNull, 'logoUrl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('logoUrl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['totals'] = $totals; + $this->container['logoUrl'] = $logoUrl; return $this; } /** - * Gets totalsYtd + * Gets note * - * @return \SynergiTech\Staffology\Model\PayRunTotals|null + * @return string|null */ - public function getTotalsYtd(): ?\SynergiTech\Staffology\Model\PayRunTotals + public function getNote(): ?string { - return $this->container['totalsYtd']; + return $this->container['note']; } /** - * Sets totalsYtd + * Sets note * - * @param \SynergiTech\Staffology\Model\PayRunTotals|null $totalsYtd totalsYtd + * @param string|null $note [readonly] Any note that should appear on the payslip * * @return $this */ - public function setTotalsYtd(?\SynergiTech\Staffology\Model\PayRunTotals $totalsYtd): static + public function setNote(?string $note): static { - if (is_null($totalsYtd)) { - throw new InvalidArgumentException('non-nullable totalsYtd cannot be null'); + if (is_null($note)) { + array_push($this->openAPINullablesSetToNull, 'note'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('note', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['totalsYtd'] = $totalsYtd; + $this->container['note'] = $note; return $this; } /** - * Gets lines + * Gets originalPayRunPaymentDate * - * @return \SynergiTech\Staffology\Model\PayslipLine[]|null + * @return \DateTime|null */ - public function getLines(): ?array + public function getOriginalPayRunPaymentDate(): ?\DateTime { - return $this->container['lines']; + return $this->container['originalPayRunPaymentDate']; } /** - * Sets lines + * Sets originalPayRunPaymentDate * - * @param \SynergiTech\Staffology\Model\PayslipLine[]|null $lines [readonly] The lines to display on the Payslip + * @param \DateTime|null $originalPayRunPaymentDate Original PayRun's Payment Date * * @return $this */ - public function setLines(?array $lines): static + public function setOriginalPayRunPaymentDate(?\DateTime $originalPayRunPaymentDate): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); + if (is_null($originalPayRunPaymentDate)) { + array_push($this->openAPINullablesSetToNull, 'originalPayRunPaymentDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); + $index = array_search('originalPayRunPaymentDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lines'] = $lines; + $this->container['originalPayRunPaymentDate'] = $originalPayRunPaymentDate; return $this; } /** - * Gets employerNi + * Gets payOptions * - * @return float|null + * @return \SynergiTech\Staffology\Model\PayOptions|null */ - public function getEmployerNi(): ?float + public function getPayOptions(): ?\SynergiTech\Staffology\Model\PayOptions { - return $this->container['employerNi']; + return $this->container['payOptions']; } /** - * Sets employerNi + * Sets payOptions * - * @param float|null $employerNi [readonly] The Employer NI Contribution amount + * @param \SynergiTech\Staffology\Model\PayOptions|null $payOptions payOptions * * @return $this */ - public function setEmployerNi(?float $employerNi): static + public function setPayOptions(?\SynergiTech\Staffology\Model\PayOptions $payOptions): static { - if (is_null($employerNi)) { - throw new InvalidArgumentException('non-nullable employerNi cannot be null'); + if (is_null($payOptions)) { + throw new InvalidArgumentException('non-nullable payOptions cannot be null'); } - $this->container['employerNi'] = $employerNi; + $this->container['payOptions'] = $payOptions; return $this; } /** - * Gets employerPensionContribs + * Gets payPeriod * - * @return float|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getEmployerPensionContribs(): ?float + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['employerPensionContribs']; + return $this->container['payPeriod']; } /** - * Sets employerPensionContribs + * Sets payPeriod * - * @param float|null $employerPensionContribs [readonly] The Employer Pension Contribution Amount + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod * * @return $this */ - public function setEmployerPensionContribs(?float $employerPensionContribs): static + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static { - if (is_null($employerPensionContribs)) { - throw new InvalidArgumentException('non-nullable employerPensionContribs cannot be null'); + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); } - $this->container['employerPensionContribs'] = $employerPensionContribs; + $this->container['payPeriod'] = $payPeriod; return $this; } /** - * Gets depts + * Gets paymentDate * - * @return \SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]|null + * @return \DateTime|null */ - public function getDepts(): ?array + public function getPaymentDate(): ?\DateTime { - return $this->container['depts']; + return $this->container['paymentDate']; } /** - * Sets depts + * Sets paymentDate * - * @param \SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]|null $depts The employees Department Membership(s) at the time the payrun was finalised + * @param \DateTime|null $paymentDate [readonly] The date the Employee will be paid on * * @return $this */ - public function setDepts(?array $depts): static + public function setPaymentDate(?\DateTime $paymentDate): static { - if (is_null($depts)) { - array_push($this->openAPINullablesSetToNull, 'depts'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('depts', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($paymentDate)) { + throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); } - $this->container['depts'] = $depts; + $this->container['paymentDate'] = $paymentDate; return $this; } /** - * Gets umbrellaPayment + * Gets pensionContributionsByRole * - * @return \SynergiTech\Staffology\Model\UmbrellaPayment|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getUmbrellaPayment(): ?\SynergiTech\Staffology\Model\UmbrellaPayment + public function getPensionContributionsByRole(): ?array { - return $this->container['umbrellaPayment']; + return $this->container['pensionContributionsByRole']; } /** - * Sets umbrellaPayment + * Sets pensionContributionsByRole * - * @param \SynergiTech\Staffology\Model\UmbrellaPayment|null $umbrellaPayment umbrellaPayment + * @param \SynergiTech\Staffology\Model\Item[]|null $pensionContributionsByRole The Pension Employer contribution by role only populated when creating journals * * @return $this */ - public function setUmbrellaPayment(?\SynergiTech\Staffology\Model\UmbrellaPayment $umbrellaPayment): static + public function setPensionContributionsByRole(?array $pensionContributionsByRole): static { - if (is_null($umbrellaPayment)) { - throw new InvalidArgumentException('non-nullable umbrellaPayment cannot be null'); + if (is_null($pensionContributionsByRole)) { + array_push($this->openAPINullablesSetToNull, 'pensionContributionsByRole'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pensionContributionsByRole', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['umbrellaPayment'] = $umbrellaPayment; + $this->container['pensionContributionsByRole'] = $pensionContributionsByRole; return $this; } /** - * Gets costCentres + * Gets period * - * @return \SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]|null + * @return string|null */ - public function getCostCentres(): ?array + public function getPeriod(): ?string { - return $this->container['costCentres']; + return $this->container['period']; } /** - * Sets costCentres + * Sets period * - * @param \SynergiTech\Staffology\Model\StringDecimalKeyValuePair[]|null $costCentres The employees Cost Centre Membership(s) only populated when creating journals + * @param string|null $period [readonly] A description of the period that Payslip relates to. * * @return $this */ - public function setCostCentres(?array $costCentres): static + public function setPeriod(?string $period): static { - if (is_null($costCentres)) { - array_push($this->openAPINullablesSetToNull, 'costCentres'); + if (is_null($period)) { + array_push($this->openAPINullablesSetToNull, 'period'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('costCentres', $nullablesSetToNull); + $index = array_search('period', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['costCentres'] = $costCentres; + $this->container['period'] = $period; return $this; } /** - * Gets employeeRoleAnalysisCategoryCodes + * Gets periodNumber * - * @return \SynergiTech\Staffology\Model\EmployeeRoleAnalysisCategoryCode[]|null + * @return int|null */ - public function getEmployeeRoleAnalysisCategoryCodes(): ?array + public function getPeriodNumber(): ?int { - return $this->container['employeeRoleAnalysisCategoryCodes']; + return $this->container['periodNumber']; } /** - * Sets employeeRoleAnalysisCategoryCodes + * Sets periodNumber * - * @param \SynergiTech\Staffology\Model\EmployeeRoleAnalysisCategoryCode[]|null $employeeRoleAnalysisCategoryCodes The EmployeeRoleAnalysisCategoryCodes only populated when creating journals + * @param int|null $periodNumber periodNumber * * @return $this */ - public function setEmployeeRoleAnalysisCategoryCodes(?array $employeeRoleAnalysisCategoryCodes): static + public function setPeriodNumber(?int $periodNumber): static { - if (is_null($employeeRoleAnalysisCategoryCodes)) { - array_push($this->openAPINullablesSetToNull, 'employeeRoleAnalysisCategoryCodes'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeeRoleAnalysisCategoryCodes', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($periodNumber)) { + throw new InvalidArgumentException('non-nullable periodNumber cannot be null'); } - $this->container['employeeRoleAnalysisCategoryCodes'] = $employeeRoleAnalysisCategoryCodes; + $this->container['periodNumber'] = $periodNumber; return $this; } /** - * Gets employeeCostCentres + * Gets personalDetails * - * @return \SynergiTech\Staffology\Model\EmployeeCostCentre[]|null + * @return \SynergiTech\Staffology\Model\PersonalDetails|null */ - public function getEmployeeCostCentres(): ?array + public function getPersonalDetails(): ?\SynergiTech\Staffology\Model\PersonalDetails { - return $this->container['employeeCostCentres']; + return $this->container['personalDetails']; } /** - * Sets employeeCostCentres + * Sets personalDetails * - * @param \SynergiTech\Staffology\Model\EmployeeCostCentre[]|null $employeeCostCentres The Employee Cost Centre Membership(s) by role only populated when creating journals + * @param \SynergiTech\Staffology\Model\PersonalDetails|null $personalDetails personalDetails * * @return $this */ - public function setEmployeeCostCentres(?array $employeeCostCentres): static + public function setPersonalDetails(?\SynergiTech\Staffology\Model\PersonalDetails $personalDetails): static { - if (is_null($employeeCostCentres)) { - array_push($this->openAPINullablesSetToNull, 'employeeCostCentres'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeeCostCentres', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($personalDetails)) { + throw new InvalidArgumentException('non-nullable personalDetails cannot be null'); } - $this->container['employeeCostCentres'] = $employeeCostCentres; + $this->container['personalDetails'] = $personalDetails; return $this; } /** - * Gets departmentMemberships + * Gets taxYear * - * @return \SynergiTech\Staffology\Model\DepartmentMembership[]|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getDepartmentMemberships(): ?array + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['departmentMemberships']; + return $this->container['taxYear']; } /** - * Sets departmentMemberships + * Sets taxYear * - * @param \SynergiTech\Staffology\Model\DepartmentMembership[]|null $departmentMemberships The Employee Department Membership(s) by role only populated when creating journals + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setDepartmentMemberships(?array $departmentMemberships): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($departmentMemberships)) { - array_push($this->openAPINullablesSetToNull, 'departmentMemberships'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('departmentMemberships', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['departmentMemberships'] = $departmentMemberships; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets pensionContributionsByRole + * Gets to * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return \DateTime|null */ - public function getPensionContributionsByRole(): ?array + public function getTo(): ?\DateTime { - return $this->container['pensionContributionsByRole']; + return $this->container['to']; } /** - * Sets pensionContributionsByRole + * Sets to * - * @param \SynergiTech\Staffology\Model\Item[]|null $pensionContributionsByRole The Pension Employer contribution by role only populated when creating journals + * @param \DateTime|null $to [readonly] The end date of the period this Payslip covers. * * @return $this */ - public function setPensionContributionsByRole(?array $pensionContributionsByRole): static + public function setTo(?\DateTime $to): static { - if (is_null($pensionContributionsByRole)) { - array_push($this->openAPINullablesSetToNull, 'pensionContributionsByRole'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionContributionsByRole', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); } - $this->container['pensionContributionsByRole'] = $pensionContributionsByRole; + $this->container['to'] = $to; return $this; } /** - * Gets employerPensionContributions + * Gets totals * - * @return \SynergiTech\Staffology\Model\EmployerPensionContribution[]|null + * @return \SynergiTech\Staffology\Model\PayRunTotals|null */ - public function getEmployerPensionContributions(): ?array + public function getTotals(): ?\SynergiTech\Staffology\Model\PayRunTotals { - return $this->container['employerPensionContributions']; + return $this->container['totals']; } /** - * Sets employerPensionContributions + * Sets totals * - * @param \SynergiTech\Staffology\Model\EmployerPensionContribution[]|null $employerPensionContributions [readonly] The list of Employer Pension Contribution(s) + * @param \SynergiTech\Staffology\Model\PayRunTotals|null $totals totals * * @return $this */ - public function setEmployerPensionContributions(?array $employerPensionContributions): static + public function setTotals(?\SynergiTech\Staffology\Model\PayRunTotals $totals): static { - if (is_null($employerPensionContributions)) { - array_push($this->openAPINullablesSetToNull, 'employerPensionContributions'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerPensionContributions', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($totals)) { + throw new InvalidArgumentException('non-nullable totals cannot be null'); } - $this->container['employerPensionContributions'] = $employerPensionContributions; + $this->container['totals'] = $totals; return $this; } /** - * Gets employeePensionContributions + * Gets totalsYtd * - * @return array|null + * @return \SynergiTech\Staffology\Model\PayRunTotals|null */ - public function getEmployeePensionContributions(): ?array + public function getTotalsYtd(): ?\SynergiTech\Staffology\Model\PayRunTotals { - return $this->container['employeePensionContributions']; + return $this->container['totalsYtd']; } /** - * Sets employeePensionContributions + * Sets totalsYtd * - * @param array|null $employeePensionContributions Dictionary of Pension Contributions(s) Keyed on PensionId containing Employee Pension and AVC Contribution(s) Bfd, AVC indicator and pension rule + * @param \SynergiTech\Staffology\Model\PayRunTotals|null $totalsYtd totalsYtd * * @return $this */ - public function setEmployeePensionContributions(?array $employeePensionContributions): static + public function setTotalsYtd(?\SynergiTech\Staffology\Model\PayRunTotals $totalsYtd): static { - if (is_null($employeePensionContributions)) { - array_push($this->openAPINullablesSetToNull, 'employeePensionContributions'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeePensionContributions', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($totalsYtd)) { + throw new InvalidArgumentException('non-nullable totalsYtd cannot be null'); } - $this->container['employeePensionContributions'] = $employeePensionContributions; + $this->container['totalsYtd'] = $totalsYtd; + + return $this; + } + + /** + * Gets umbrellaPayment + * + * @return \SynergiTech\Staffology\Model\UmbrellaPayment|null + */ + public function getUmbrellaPayment(): ?\SynergiTech\Staffology\Model\UmbrellaPayment + { + return $this->container['umbrellaPayment']; + } + + /** + * Sets umbrellaPayment + * + * @param \SynergiTech\Staffology\Model\UmbrellaPayment|null $umbrellaPayment umbrellaPayment + * + * @return $this + */ + public function setUmbrellaPayment(?\SynergiTech\Staffology\Model\UmbrellaPayment $umbrellaPayment): static + { + if (is_null($umbrellaPayment)) { + throw new InvalidArgumentException('non-nullable umbrellaPayment cannot be null'); + } + $this->container['umbrellaPayment'] = $umbrellaPayment; return $this; } diff --git a/src/Model/PayslipCustomisation.php b/src/Model/PayslipCustomisation.php index e81589a..fb76a50 100644 --- a/src/Model/PayslipCustomisation.php +++ b/src/Model/PayslipCustomisation.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -61,21 +61,21 @@ class PayslipCustomisation implements ModelInterface, ArrayAccess, JsonSerializa */ protected static array $openAPITypes = [ 'custom' => 'bool', - 'includeLogo' => 'bool', - 'customCssOption' => '\SynergiTech\Staffology\Model\ReportCustomCssOption', 'customCss' => 'string', - 'removeYtd' => 'bool', - 'includeEmployerAddress' => 'bool', - 'useUmbrellaFormat' => 'bool', + 'customCssOption' => '\SynergiTech\Staffology\Model\ReportCustomCssOption', 'filename' => 'string', + 'id' => 'string', + 'includeBenefits' => 'bool', 'includeDepartment' => 'bool', + 'includeEmployerAddress' => 'bool', 'includeHealthAndSocialCareMessage' => 'bool', - 'includeBenefits' => 'bool', - 'removePensionYtd' => 'bool', - 'paperSize' => '\SynergiTech\Staffology\Model\PdfPaperSize', - 'orientation' => '\SynergiTech\Staffology\Model\PdfPaperOrientation', + 'includeLogo' => 'bool', 'margins' => '\SynergiTech\Staffology\Model\PdfPaperMargins', - 'id' => 'string' + 'orientation' => '\SynergiTech\Staffology\Model\PdfPaperOrientation', + 'paperSize' => '\SynergiTech\Staffology\Model\PdfPaperSize', + 'removePensionYtd' => 'bool', + 'removeYtd' => 'bool', + 'useUmbrellaFormat' => 'bool' ]; /** @@ -85,21 +85,21 @@ class PayslipCustomisation implements ModelInterface, ArrayAccess, JsonSerializa */ protected static array $openAPIFormats = [ 'custom' => null, - 'includeLogo' => null, - 'customCssOption' => null, 'customCss' => null, - 'removeYtd' => null, - 'includeEmployerAddress' => null, - 'useUmbrellaFormat' => null, + 'customCssOption' => null, 'filename' => null, + 'id' => 'uuid', + 'includeBenefits' => null, 'includeDepartment' => null, + 'includeEmployerAddress' => null, 'includeHealthAndSocialCareMessage' => null, - 'includeBenefits' => null, - 'removePensionYtd' => null, - 'paperSize' => null, - 'orientation' => null, + 'includeLogo' => null, 'margins' => null, - 'id' => 'uuid' + 'orientation' => null, + 'paperSize' => null, + 'removePensionYtd' => null, + 'removeYtd' => null, + 'useUmbrellaFormat' => null ]; /** @@ -109,21 +109,21 @@ class PayslipCustomisation implements ModelInterface, ArrayAccess, JsonSerializa */ protected static array $openAPINullables = [ 'custom' => false, - 'includeLogo' => false, - 'customCssOption' => false, 'customCss' => true, - 'removeYtd' => false, - 'includeEmployerAddress' => false, - 'useUmbrellaFormat' => false, + 'customCssOption' => false, 'filename' => true, + 'id' => false, + 'includeBenefits' => false, 'includeDepartment' => false, + 'includeEmployerAddress' => false, 'includeHealthAndSocialCareMessage' => false, - 'includeBenefits' => false, - 'removePensionYtd' => false, - 'paperSize' => false, - 'orientation' => false, + 'includeLogo' => false, 'margins' => false, - 'id' => false + 'orientation' => false, + 'paperSize' => false, + 'removePensionYtd' => false, + 'removeYtd' => false, + 'useUmbrellaFormat' => false ]; /** @@ -213,21 +213,21 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'custom' => 'custom', - 'includeLogo' => 'includeLogo', - 'customCssOption' => 'customCssOption', 'customCss' => 'customCss', - 'removeYtd' => 'removeYtd', - 'includeEmployerAddress' => 'includeEmployerAddress', - 'useUmbrellaFormat' => 'useUmbrellaFormat', + 'customCssOption' => 'customCssOption', 'filename' => 'filename', + 'id' => 'id', + 'includeBenefits' => 'includeBenefits', 'includeDepartment' => 'includeDepartment', + 'includeEmployerAddress' => 'includeEmployerAddress', 'includeHealthAndSocialCareMessage' => 'includeHealthAndSocialCareMessage', - 'includeBenefits' => 'includeBenefits', - 'removePensionYtd' => 'removePensionYtd', - 'paperSize' => 'paperSize', - 'orientation' => 'orientation', + 'includeLogo' => 'includeLogo', 'margins' => 'margins', - 'id' => 'id' + 'orientation' => 'orientation', + 'paperSize' => 'paperSize', + 'removePensionYtd' => 'removePensionYtd', + 'removeYtd' => 'removeYtd', + 'useUmbrellaFormat' => 'useUmbrellaFormat' ]; /** @@ -237,21 +237,21 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'custom' => 'setCustom', - 'includeLogo' => 'setIncludeLogo', - 'customCssOption' => 'setCustomCssOption', 'customCss' => 'setCustomCss', - 'removeYtd' => 'setRemoveYtd', - 'includeEmployerAddress' => 'setIncludeEmployerAddress', - 'useUmbrellaFormat' => 'setUseUmbrellaFormat', + 'customCssOption' => 'setCustomCssOption', 'filename' => 'setFilename', + 'id' => 'setId', + 'includeBenefits' => 'setIncludeBenefits', 'includeDepartment' => 'setIncludeDepartment', + 'includeEmployerAddress' => 'setIncludeEmployerAddress', 'includeHealthAndSocialCareMessage' => 'setIncludeHealthAndSocialCareMessage', - 'includeBenefits' => 'setIncludeBenefits', - 'removePensionYtd' => 'setRemovePensionYtd', - 'paperSize' => 'setPaperSize', - 'orientation' => 'setOrientation', + 'includeLogo' => 'setIncludeLogo', 'margins' => 'setMargins', - 'id' => 'setId' + 'orientation' => 'setOrientation', + 'paperSize' => 'setPaperSize', + 'removePensionYtd' => 'setRemovePensionYtd', + 'removeYtd' => 'setRemoveYtd', + 'useUmbrellaFormat' => 'setUseUmbrellaFormat' ]; /** @@ -261,21 +261,21 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'custom' => 'getCustom', - 'includeLogo' => 'getIncludeLogo', - 'customCssOption' => 'getCustomCssOption', 'customCss' => 'getCustomCss', - 'removeYtd' => 'getRemoveYtd', - 'includeEmployerAddress' => 'getIncludeEmployerAddress', - 'useUmbrellaFormat' => 'getUseUmbrellaFormat', + 'customCssOption' => 'getCustomCssOption', 'filename' => 'getFilename', + 'id' => 'getId', + 'includeBenefits' => 'getIncludeBenefits', 'includeDepartment' => 'getIncludeDepartment', + 'includeEmployerAddress' => 'getIncludeEmployerAddress', 'includeHealthAndSocialCareMessage' => 'getIncludeHealthAndSocialCareMessage', - 'includeBenefits' => 'getIncludeBenefits', - 'removePensionYtd' => 'getRemovePensionYtd', - 'paperSize' => 'getPaperSize', - 'orientation' => 'getOrientation', + 'includeLogo' => 'getIncludeLogo', 'margins' => 'getMargins', - 'id' => 'getId' + 'orientation' => 'getOrientation', + 'paperSize' => 'getPaperSize', + 'removePensionYtd' => 'getRemovePensionYtd', + 'removeYtd' => 'getRemoveYtd', + 'useUmbrellaFormat' => 'getUseUmbrellaFormat' ]; /** @@ -335,21 +335,21 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('custom', $data ?? [], null); - $this->setIfExists('includeLogo', $data ?? [], null); - $this->setIfExists('customCssOption', $data ?? [], null); $this->setIfExists('customCss', $data ?? [], null); - $this->setIfExists('removeYtd', $data ?? [], null); - $this->setIfExists('includeEmployerAddress', $data ?? [], null); - $this->setIfExists('useUmbrellaFormat', $data ?? [], null); + $this->setIfExists('customCssOption', $data ?? [], null); $this->setIfExists('filename', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('includeBenefits', $data ?? [], null); $this->setIfExists('includeDepartment', $data ?? [], null); + $this->setIfExists('includeEmployerAddress', $data ?? [], null); $this->setIfExists('includeHealthAndSocialCareMessage', $data ?? [], null); - $this->setIfExists('includeBenefits', $data ?? [], null); - $this->setIfExists('removePensionYtd', $data ?? [], null); - $this->setIfExists('paperSize', $data ?? [], null); - $this->setIfExists('orientation', $data ?? [], null); + $this->setIfExists('includeLogo', $data ?? [], null); $this->setIfExists('margins', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('orientation', $data ?? [], null); + $this->setIfExists('paperSize', $data ?? [], null); + $this->setIfExists('removePensionYtd', $data ?? [], null); + $this->setIfExists('removeYtd', $data ?? [], null); + $this->setIfExists('useUmbrellaFormat', $data ?? [], null); } /** @@ -430,28 +430,39 @@ public function setCustom(?bool $custom): static } /** - * Gets includeLogo + * Gets customCss * - * @return bool|null + * @return string|null */ - public function getIncludeLogo(): ?bool + public function getCustomCss(): ?string { - return $this->container['includeLogo']; + return $this->container['customCss']; } /** - * Sets includeLogo + * Sets customCss * - * @param bool|null $includeLogo Whether or not to include the employer logo on the payslip. + * @param string|null $customCss customCss * * @return $this */ - public function setIncludeLogo(?bool $includeLogo): static + public function setCustomCss(?string $customCss): static { - if (is_null($includeLogo)) { - throw new InvalidArgumentException('non-nullable includeLogo cannot be null'); + if (is_null($customCss)) { + array_push($this->openAPINullablesSetToNull, 'customCss'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('customCss', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($customCss) && (mb_strlen($customCss) > 2500)) { + throw new InvalidArgumentException('invalid length for $customCss when calling PayslipCustomisation., must be smaller than or equal to 2500.'); } - $this->container['includeLogo'] = $includeLogo; + + $this->container['customCss'] = $customCss; return $this; } @@ -484,266 +495,255 @@ public function setCustomCssOption(?\SynergiTech\Staffology\Model\ReportCustomCs } /** - * Gets customCss + * Gets filename * * @return string|null */ - public function getCustomCss(): ?string + public function getFilename(): ?string { - return $this->container['customCss']; + return $this->container['filename']; } /** - * Sets customCss + * Sets filename * - * @param string|null $customCss customCss + * @param string|null $filename filename * * @return $this */ - public function setCustomCss(?string $customCss): static + public function setFilename(?string $filename): static { - if (is_null($customCss)) { - array_push($this->openAPINullablesSetToNull, 'customCss'); + if (is_null($filename)) { + array_push($this->openAPINullablesSetToNull, 'filename'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('customCss', $nullablesSetToNull); + $index = array_search('filename', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($customCss) && (mb_strlen($customCss) > 2500)) { - throw new InvalidArgumentException('invalid length for $customCss when calling PayslipCustomisation., must be smaller than or equal to 2500.'); + if (!is_null($filename) && (mb_strlen($filename) > 200)) { + throw new InvalidArgumentException('invalid length for $filename when calling PayslipCustomisation., must be smaller than or equal to 200.'); } - $this->container['customCss'] = $customCss; + $this->container['filename'] = $filename; return $this; } /** - * Gets removeYtd + * Gets id * - * @return bool|null + * @return string|null */ - public function getRemoveYtd(): ?bool + public function getId(): ?string { - return $this->container['removeYtd']; + return $this->container['id']; } /** - * Sets removeYtd + * Sets id * - * @param bool|null $removeYtd Whether or not to remove the YTD column + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setRemoveYtd(?bool $removeYtd): static + public function setId(?string $id): static { - if (is_null($removeYtd)) { - throw new InvalidArgumentException('non-nullable removeYtd cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['removeYtd'] = $removeYtd; + $this->container['id'] = $id; return $this; } /** - * Gets includeEmployerAddress + * Gets includeBenefits * * @return bool|null */ - public function getIncludeEmployerAddress(): ?bool + public function getIncludeBenefits(): ?bool { - return $this->container['includeEmployerAddress']; + return $this->container['includeBenefits']; } /** - * Sets includeEmployerAddress + * Sets includeBenefits * - * @param bool|null $includeEmployerAddress Whether or not to include the employer address + * @param bool|null $includeBenefits Whether or not to include any payrolled benefits * * @return $this */ - public function setIncludeEmployerAddress(?bool $includeEmployerAddress): static + public function setIncludeBenefits(?bool $includeBenefits): static { - if (is_null($includeEmployerAddress)) { - throw new InvalidArgumentException('non-nullable includeEmployerAddress cannot be null'); + if (is_null($includeBenefits)) { + throw new InvalidArgumentException('non-nullable includeBenefits cannot be null'); } - $this->container['includeEmployerAddress'] = $includeEmployerAddress; + $this->container['includeBenefits'] = $includeBenefits; return $this; } /** - * Gets useUmbrellaFormat + * Gets includeDepartment * * @return bool|null */ - public function getUseUmbrellaFormat(): ?bool + public function getIncludeDepartment(): ?bool { - return $this->container['useUmbrellaFormat']; + return $this->container['includeDepartment']; } /** - * Sets useUmbrellaFormat + * Sets includeDepartment * - * @param bool|null $useUmbrellaFormat If true then the format the payslip will include details of the Umbrella Payment as well as employer costs + * @param bool|null $includeDepartment Whether or not to include the primary department of the employee on the payslip * * @return $this */ - public function setUseUmbrellaFormat(?bool $useUmbrellaFormat): static + public function setIncludeDepartment(?bool $includeDepartment): static { - if (is_null($useUmbrellaFormat)) { - throw new InvalidArgumentException('non-nullable useUmbrellaFormat cannot be null'); + if (is_null($includeDepartment)) { + throw new InvalidArgumentException('non-nullable includeDepartment cannot be null'); } - $this->container['useUmbrellaFormat'] = $useUmbrellaFormat; + $this->container['includeDepartment'] = $includeDepartment; return $this; } /** - * Gets filename + * Gets includeEmployerAddress * - * @return string|null + * @return bool|null */ - public function getFilename(): ?string + public function getIncludeEmployerAddress(): ?bool { - return $this->container['filename']; + return $this->container['includeEmployerAddress']; } /** - * Sets filename + * Sets includeEmployerAddress * - * @param string|null $filename filename + * @param bool|null $includeEmployerAddress Whether or not to include the employer address * * @return $this */ - public function setFilename(?string $filename): static + public function setIncludeEmployerAddress(?bool $includeEmployerAddress): static { - if (is_null($filename)) { - array_push($this->openAPINullablesSetToNull, 'filename'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('filename', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($filename) && (mb_strlen($filename) > 200)) { - throw new InvalidArgumentException('invalid length for $filename when calling PayslipCustomisation., must be smaller than or equal to 200.'); + if (is_null($includeEmployerAddress)) { + throw new InvalidArgumentException('non-nullable includeEmployerAddress cannot be null'); } - - $this->container['filename'] = $filename; + $this->container['includeEmployerAddress'] = $includeEmployerAddress; return $this; } /** - * Gets includeDepartment + * Gets includeHealthAndSocialCareMessage * * @return bool|null */ - public function getIncludeDepartment(): ?bool + public function getIncludeHealthAndSocialCareMessage(): ?bool { - return $this->container['includeDepartment']; + return $this->container['includeHealthAndSocialCareMessage']; } /** - * Sets includeDepartment + * Sets includeHealthAndSocialCareMessage * - * @param bool|null $includeDepartment Whether or not to include the primary department of the employee on the payslip + * @param bool|null $includeHealthAndSocialCareMessage Whether or not to include health and social car message * * @return $this */ - public function setIncludeDepartment(?bool $includeDepartment): static + public function setIncludeHealthAndSocialCareMessage(?bool $includeHealthAndSocialCareMessage): static { - if (is_null($includeDepartment)) { - throw new InvalidArgumentException('non-nullable includeDepartment cannot be null'); + if (is_null($includeHealthAndSocialCareMessage)) { + throw new InvalidArgumentException('non-nullable includeHealthAndSocialCareMessage cannot be null'); } - $this->container['includeDepartment'] = $includeDepartment; + $this->container['includeHealthAndSocialCareMessage'] = $includeHealthAndSocialCareMessage; return $this; } /** - * Gets includeHealthAndSocialCareMessage + * Gets includeLogo * * @return bool|null */ - public function getIncludeHealthAndSocialCareMessage(): ?bool + public function getIncludeLogo(): ?bool { - return $this->container['includeHealthAndSocialCareMessage']; + return $this->container['includeLogo']; } /** - * Sets includeHealthAndSocialCareMessage + * Sets includeLogo * - * @param bool|null $includeHealthAndSocialCareMessage Whether or not to include health and social car message + * @param bool|null $includeLogo Whether or not to include the employer logo on the payslip. * * @return $this */ - public function setIncludeHealthAndSocialCareMessage(?bool $includeHealthAndSocialCareMessage): static + public function setIncludeLogo(?bool $includeLogo): static { - if (is_null($includeHealthAndSocialCareMessage)) { - throw new InvalidArgumentException('non-nullable includeHealthAndSocialCareMessage cannot be null'); + if (is_null($includeLogo)) { + throw new InvalidArgumentException('non-nullable includeLogo cannot be null'); } - $this->container['includeHealthAndSocialCareMessage'] = $includeHealthAndSocialCareMessage; + $this->container['includeLogo'] = $includeLogo; return $this; } /** - * Gets includeBenefits + * Gets margins * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PdfPaperMargins|null */ - public function getIncludeBenefits(): ?bool + public function getMargins(): ?\SynergiTech\Staffology\Model\PdfPaperMargins { - return $this->container['includeBenefits']; + return $this->container['margins']; } /** - * Sets includeBenefits + * Sets margins * - * @param bool|null $includeBenefits Whether or not to include any payrolled benefits + * @param \SynergiTech\Staffology\Model\PdfPaperMargins|null $margins margins * * @return $this */ - public function setIncludeBenefits(?bool $includeBenefits): static + public function setMargins(?\SynergiTech\Staffology\Model\PdfPaperMargins $margins): static { - if (is_null($includeBenefits)) { - throw new InvalidArgumentException('non-nullable includeBenefits cannot be null'); + if (is_null($margins)) { + throw new InvalidArgumentException('non-nullable margins cannot be null'); } - $this->container['includeBenefits'] = $includeBenefits; + $this->container['margins'] = $margins; return $this; } /** - * Gets removePensionYtd + * Gets orientation * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PdfPaperOrientation|null */ - public function getRemovePensionYtd(): ?bool + public function getOrientation(): ?\SynergiTech\Staffology\Model\PdfPaperOrientation { - return $this->container['removePensionYtd']; + return $this->container['orientation']; } /** - * Sets removePensionYtd + * Sets orientation * - * @param bool|null $removePensionYtd Whether or not to remove the pension YTD column + * @param \SynergiTech\Staffology\Model\PdfPaperOrientation|null $orientation orientation * * @return $this */ - public function setRemovePensionYtd(?bool $removePensionYtd): static + public function setOrientation(?\SynergiTech\Staffology\Model\PdfPaperOrientation $orientation): static { - if (is_null($removePensionYtd)) { - throw new InvalidArgumentException('non-nullable removePensionYtd cannot be null'); + if (is_null($orientation)) { + throw new InvalidArgumentException('non-nullable orientation cannot be null'); } - $this->container['removePensionYtd'] = $removePensionYtd; + $this->container['orientation'] = $orientation; return $this; } @@ -776,82 +776,82 @@ public function setPaperSize(?\SynergiTech\Staffology\Model\PdfPaperSize $paperS } /** - * Gets orientation + * Gets removePensionYtd * - * @return \SynergiTech\Staffology\Model\PdfPaperOrientation|null + * @return bool|null */ - public function getOrientation(): ?\SynergiTech\Staffology\Model\PdfPaperOrientation + public function getRemovePensionYtd(): ?bool { - return $this->container['orientation']; + return $this->container['removePensionYtd']; } /** - * Sets orientation + * Sets removePensionYtd * - * @param \SynergiTech\Staffology\Model\PdfPaperOrientation|null $orientation orientation + * @param bool|null $removePensionYtd Whether or not to remove the pension YTD column * * @return $this */ - public function setOrientation(?\SynergiTech\Staffology\Model\PdfPaperOrientation $orientation): static + public function setRemovePensionYtd(?bool $removePensionYtd): static { - if (is_null($orientation)) { - throw new InvalidArgumentException('non-nullable orientation cannot be null'); + if (is_null($removePensionYtd)) { + throw new InvalidArgumentException('non-nullable removePensionYtd cannot be null'); } - $this->container['orientation'] = $orientation; + $this->container['removePensionYtd'] = $removePensionYtd; return $this; } /** - * Gets margins + * Gets removeYtd * - * @return \SynergiTech\Staffology\Model\PdfPaperMargins|null + * @return bool|null */ - public function getMargins(): ?\SynergiTech\Staffology\Model\PdfPaperMargins + public function getRemoveYtd(): ?bool { - return $this->container['margins']; + return $this->container['removeYtd']; } /** - * Sets margins + * Sets removeYtd * - * @param \SynergiTech\Staffology\Model\PdfPaperMargins|null $margins margins + * @param bool|null $removeYtd Whether or not to remove the YTD column * * @return $this */ - public function setMargins(?\SynergiTech\Staffology\Model\PdfPaperMargins $margins): static + public function setRemoveYtd(?bool $removeYtd): static { - if (is_null($margins)) { - throw new InvalidArgumentException('non-nullable margins cannot be null'); + if (is_null($removeYtd)) { + throw new InvalidArgumentException('non-nullable removeYtd cannot be null'); } - $this->container['margins'] = $margins; + $this->container['removeYtd'] = $removeYtd; return $this; } /** - * Gets id + * Gets useUmbrellaFormat * - * @return string|null + * @return bool|null */ - public function getId(): ?string + public function getUseUmbrellaFormat(): ?bool { - return $this->container['id']; + return $this->container['useUmbrellaFormat']; } /** - * Sets id + * Sets useUmbrellaFormat * - * @param string|null $id [readonly] The unique id of the object + * @param bool|null $useUmbrellaFormat If true then the format the payslip will include details of the Umbrella Payment as well as employer costs * * @return $this */ - public function setId(?string $id): static + public function setUseUmbrellaFormat(?bool $useUmbrellaFormat): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($useUmbrellaFormat)) { + throw new InvalidArgumentException('non-nullable useUmbrellaFormat cannot be null'); } - $this->container['id'] = $id; + $this->container['useUmbrellaFormat'] = $useUmbrellaFormat; return $this; } diff --git a/src/Model/PayslipLine.php b/src/Model/PayslipLine.php index 450d50e..3e8b8ac 100644 --- a/src/Model/PayslipLine.php +++ b/src/Model/PayslipLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,26 +59,26 @@ class PayslipLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => '\SynergiTech\Staffology\Model\PayslipLineType', - 'code' => 'string', - 'description' => 'string', - 'secondaryDescription' => 'string', - 'value' => 'float', - 'multiplier' => 'float', 'attachmentOrderId' => 'string', - 'pensionId' => 'string', - 'loanId' => 'string', + 'code' => 'string', + 'contributesToBasicPay' => 'bool', 'currencySymbol' => 'string', + 'description' => 'string', 'formattedValue' => 'string', + 'hasSecondaryDescription' => 'bool', + 'isAutoCalculatedBackPayLine' => 'bool', + 'isAutomaticBackPay' => 'bool', 'isNetToGross' => 'bool', - 'targetNetToGrossValue' => 'float', + 'isNotional' => 'bool', 'leaveId' => 'string', + 'loanId' => 'string', + 'multiplier' => 'float', + 'pensionId' => 'string', 'roleId' => 'string', - 'isAutoCalculatedBackPayLine' => 'bool', - 'isAutomaticBackPay' => 'bool', - 'hasSecondaryDescription' => 'bool', - 'contributesToBasicPay' => 'bool', - 'isNotional' => 'bool' + 'secondaryDescription' => 'string', + 'targetNetToGrossValue' => 'float', + 'type' => '\SynergiTech\Staffology\Model\PayslipLineType', + 'value' => 'float' ]; /** @@ -87,26 +87,26 @@ class PayslipLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'type' => null, - 'code' => null, - 'description' => null, - 'secondaryDescription' => null, - 'value' => 'double', - 'multiplier' => 'double', 'attachmentOrderId' => 'uuid', - 'pensionId' => 'uuid', - 'loanId' => 'uuid', + 'code' => null, + 'contributesToBasicPay' => null, 'currencySymbol' => null, + 'description' => null, 'formattedValue' => null, + 'hasSecondaryDescription' => null, + 'isAutoCalculatedBackPayLine' => null, + 'isAutomaticBackPay' => null, 'isNetToGross' => null, - 'targetNetToGrossValue' => 'double', + 'isNotional' => null, 'leaveId' => 'uuid', + 'loanId' => 'uuid', + 'multiplier' => 'double', + 'pensionId' => 'uuid', 'roleId' => 'uuid', - 'isAutoCalculatedBackPayLine' => null, - 'isAutomaticBackPay' => null, - 'hasSecondaryDescription' => null, - 'contributesToBasicPay' => null, - 'isNotional' => null + 'secondaryDescription' => null, + 'targetNetToGrossValue' => 'double', + 'type' => null, + 'value' => 'double' ]; /** @@ -115,26 +115,26 @@ class PayslipLine implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'type' => false, - 'code' => true, - 'description' => true, - 'secondaryDescription' => true, - 'value' => false, - 'multiplier' => true, 'attachmentOrderId' => true, - 'pensionId' => true, - 'loanId' => true, + 'code' => true, + 'contributesToBasicPay' => false, 'currencySymbol' => true, + 'description' => true, 'formattedValue' => true, + 'hasSecondaryDescription' => false, + 'isAutoCalculatedBackPayLine' => false, + 'isAutomaticBackPay' => false, 'isNetToGross' => false, - 'targetNetToGrossValue' => true, + 'isNotional' => false, 'leaveId' => true, + 'loanId' => true, + 'multiplier' => true, + 'pensionId' => true, 'roleId' => true, - 'isAutoCalculatedBackPayLine' => false, - 'isAutomaticBackPay' => false, - 'hasSecondaryDescription' => false, - 'contributesToBasicPay' => false, - 'isNotional' => false + 'secondaryDescription' => true, + 'targetNetToGrossValue' => true, + 'type' => false, + 'value' => false ]; /** @@ -223,26 +223,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', - 'code' => 'code', - 'description' => 'description', - 'secondaryDescription' => 'secondaryDescription', - 'value' => 'value', - 'multiplier' => 'multiplier', 'attachmentOrderId' => 'attachmentOrderId', - 'pensionId' => 'pensionId', - 'loanId' => 'loanId', + 'code' => 'code', + 'contributesToBasicPay' => 'contributesToBasicPay', 'currencySymbol' => 'currencySymbol', + 'description' => 'description', 'formattedValue' => 'formattedValue', + 'hasSecondaryDescription' => 'hasSecondaryDescription', + 'isAutoCalculatedBackPayLine' => 'isAutoCalculatedBackPayLine', + 'isAutomaticBackPay' => 'isAutomaticBackPay', 'isNetToGross' => 'isNetToGross', - 'targetNetToGrossValue' => 'targetNetToGrossValue', + 'isNotional' => 'isNotional', 'leaveId' => 'leaveId', + 'loanId' => 'loanId', + 'multiplier' => 'multiplier', + 'pensionId' => 'pensionId', 'roleId' => 'roleId', - 'isAutoCalculatedBackPayLine' => 'isAutoCalculatedBackPayLine', - 'isAutomaticBackPay' => 'isAutomaticBackPay', - 'hasSecondaryDescription' => 'hasSecondaryDescription', - 'contributesToBasicPay' => 'contributesToBasicPay', - 'isNotional' => 'isNotional' + 'secondaryDescription' => 'secondaryDescription', + 'targetNetToGrossValue' => 'targetNetToGrossValue', + 'type' => 'type', + 'value' => 'value' ]; /** @@ -251,26 +251,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', - 'code' => 'setCode', - 'description' => 'setDescription', - 'secondaryDescription' => 'setSecondaryDescription', - 'value' => 'setValue', - 'multiplier' => 'setMultiplier', 'attachmentOrderId' => 'setAttachmentOrderId', - 'pensionId' => 'setPensionId', - 'loanId' => 'setLoanId', + 'code' => 'setCode', + 'contributesToBasicPay' => 'setContributesToBasicPay', 'currencySymbol' => 'setCurrencySymbol', + 'description' => 'setDescription', 'formattedValue' => 'setFormattedValue', + 'hasSecondaryDescription' => 'setHasSecondaryDescription', + 'isAutoCalculatedBackPayLine' => 'setIsAutoCalculatedBackPayLine', + 'isAutomaticBackPay' => 'setIsAutomaticBackPay', 'isNetToGross' => 'setIsNetToGross', - 'targetNetToGrossValue' => 'setTargetNetToGrossValue', + 'isNotional' => 'setIsNotional', 'leaveId' => 'setLeaveId', + 'loanId' => 'setLoanId', + 'multiplier' => 'setMultiplier', + 'pensionId' => 'setPensionId', 'roleId' => 'setRoleId', - 'isAutoCalculatedBackPayLine' => 'setIsAutoCalculatedBackPayLine', - 'isAutomaticBackPay' => 'setIsAutomaticBackPay', - 'hasSecondaryDescription' => 'setHasSecondaryDescription', - 'contributesToBasicPay' => 'setContributesToBasicPay', - 'isNotional' => 'setIsNotional' + 'secondaryDescription' => 'setSecondaryDescription', + 'targetNetToGrossValue' => 'setTargetNetToGrossValue', + 'type' => 'setType', + 'value' => 'setValue' ]; /** @@ -279,26 +279,26 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', - 'code' => 'getCode', - 'description' => 'getDescription', - 'secondaryDescription' => 'getSecondaryDescription', - 'value' => 'getValue', - 'multiplier' => 'getMultiplier', 'attachmentOrderId' => 'getAttachmentOrderId', - 'pensionId' => 'getPensionId', - 'loanId' => 'getLoanId', + 'code' => 'getCode', + 'contributesToBasicPay' => 'getContributesToBasicPay', 'currencySymbol' => 'getCurrencySymbol', + 'description' => 'getDescription', 'formattedValue' => 'getFormattedValue', + 'hasSecondaryDescription' => 'getHasSecondaryDescription', + 'isAutoCalculatedBackPayLine' => 'getIsAutoCalculatedBackPayLine', + 'isAutomaticBackPay' => 'getIsAutomaticBackPay', 'isNetToGross' => 'getIsNetToGross', - 'targetNetToGrossValue' => 'getTargetNetToGrossValue', + 'isNotional' => 'getIsNotional', 'leaveId' => 'getLeaveId', + 'loanId' => 'getLoanId', + 'multiplier' => 'getMultiplier', + 'pensionId' => 'getPensionId', 'roleId' => 'getRoleId', - 'isAutoCalculatedBackPayLine' => 'getIsAutoCalculatedBackPayLine', - 'isAutomaticBackPay' => 'getIsAutomaticBackPay', - 'hasSecondaryDescription' => 'getHasSecondaryDescription', - 'contributesToBasicPay' => 'getContributesToBasicPay', - 'isNotional' => 'getIsNotional' + 'secondaryDescription' => 'getSecondaryDescription', + 'targetNetToGrossValue' => 'getTargetNetToGrossValue', + 'type' => 'getType', + 'value' => 'getValue' ]; /** @@ -357,26 +357,26 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('secondaryDescription', $data ?? [], null); - $this->setIfExists('value', $data ?? [], null); - $this->setIfExists('multiplier', $data ?? [], null); $this->setIfExists('attachmentOrderId', $data ?? [], null); - $this->setIfExists('pensionId', $data ?? [], null); - $this->setIfExists('loanId', $data ?? [], null); + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('contributesToBasicPay', $data ?? [], null); $this->setIfExists('currencySymbol', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); $this->setIfExists('formattedValue', $data ?? [], null); - $this->setIfExists('isNetToGross', $data ?? [], null); - $this->setIfExists('targetNetToGrossValue', $data ?? [], null); - $this->setIfExists('leaveId', $data ?? [], null); - $this->setIfExists('roleId', $data ?? [], null); + $this->setIfExists('hasSecondaryDescription', $data ?? [], null); $this->setIfExists('isAutoCalculatedBackPayLine', $data ?? [], null); $this->setIfExists('isAutomaticBackPay', $data ?? [], null); - $this->setIfExists('hasSecondaryDescription', $data ?? [], null); - $this->setIfExists('contributesToBasicPay', $data ?? [], null); + $this->setIfExists('isNetToGross', $data ?? [], null); $this->setIfExists('isNotional', $data ?? [], null); + $this->setIfExists('leaveId', $data ?? [], null); + $this->setIfExists('loanId', $data ?? [], null); + $this->setIfExists('multiplier', $data ?? [], null); + $this->setIfExists('pensionId', $data ?? [], null); + $this->setIfExists('roleId', $data ?? [], null); + $this->setIfExists('secondaryDescription', $data ?? [], null); + $this->setIfExists('targetNetToGrossValue', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -422,28 +422,35 @@ public function valid(): bool /** - * Gets type + * Gets attachmentOrderId * - * @return \SynergiTech\Staffology\Model\PayslipLineType|null + * @return string|null */ - public function getType(): ?\SynergiTech\Staffology\Model\PayslipLineType + public function getAttachmentOrderId(): ?string { - return $this->container['type']; + return $this->container['attachmentOrderId']; } /** - * Sets type + * Sets attachmentOrderId * - * @param \SynergiTech\Staffology\Model\PayslipLineType|null $type type + * @param string|null $attachmentOrderId [readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\PayslipLineType $type): static + public function setAttachmentOrderId(?string $attachmentOrderId): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($attachmentOrderId)) { + array_push($this->openAPINullablesSetToNull, 'attachmentOrderId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('attachmentOrderId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['type'] = $type; + $this->container['attachmentOrderId'] = $attachmentOrderId; return $this; } @@ -483,395 +490,401 @@ public function setCode(?string $code): static } /** - * Gets description + * Gets contributesToBasicPay * - * @return string|null + * @return bool|null */ - public function getDescription(): ?string + public function getContributesToBasicPay(): ?bool { - return $this->container['description']; + return $this->container['contributesToBasicPay']; } /** - * Sets description + * Sets contributesToBasicPay * - * @param string|null $description description + * @param bool|null $contributesToBasicPay contributesToBasicPay * * @return $this */ - public function setDescription(?string $description): static + public function setContributesToBasicPay(?bool $contributesToBasicPay): static { - if (is_null($description)) { - array_push($this->openAPINullablesSetToNull, 'description'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('description', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($contributesToBasicPay)) { + throw new InvalidArgumentException('non-nullable contributesToBasicPay cannot be null'); } - $this->container['description'] = $description; + $this->container['contributesToBasicPay'] = $contributesToBasicPay; return $this; } /** - * Gets secondaryDescription + * Gets currencySymbol * * @return string|null */ - public function getSecondaryDescription(): ?string + public function getCurrencySymbol(): ?string { - return $this->container['secondaryDescription']; + return $this->container['currencySymbol']; } /** - * Sets secondaryDescription + * Sets currencySymbol * - * @param string|null $secondaryDescription secondaryDescription + * @param string|null $currencySymbol currencySymbol * * @return $this */ - public function setSecondaryDescription(?string $secondaryDescription): static + public function setCurrencySymbol(?string $currencySymbol): static { - if (is_null($secondaryDescription)) { - array_push($this->openAPINullablesSetToNull, 'secondaryDescription'); + if (is_null($currencySymbol)) { + array_push($this->openAPINullablesSetToNull, 'currencySymbol'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('secondaryDescription', $nullablesSetToNull); + $index = array_search('currencySymbol', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['secondaryDescription'] = $secondaryDescription; + $this->container['currencySymbol'] = $currencySymbol; return $this; } /** - * Gets value + * Gets description * - * @return float|null + * @return string|null */ - public function getValue(): ?float + public function getDescription(): ?string { - return $this->container['value']; + return $this->container['description']; } /** - * Sets value + * Sets description * - * @param float|null $value value + * @param string|null $description description * * @return $this */ - public function setValue(?float $value): static + public function setDescription(?string $description): static { - if (is_null($value)) { - throw new InvalidArgumentException('non-nullable value cannot be null'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('description', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['value'] = $value; + $this->container['description'] = $description; return $this; } /** - * Gets multiplier + * Gets formattedValue * - * @return float|null + * @return string|null */ - public function getMultiplier(): ?float + public function getFormattedValue(): ?string { - return $this->container['multiplier']; + return $this->container['formattedValue']; } /** - * Sets multiplier + * Sets formattedValue * - * @param float|null $multiplier [readonly] If the Code is a multiplier code then this is the multiplier. Value has already been calculated so this is just for reference + * @param string|null $formattedValue formattedValue * * @return $this */ - public function setMultiplier(?float $multiplier): static + public function setFormattedValue(?string $formattedValue): static { - if (is_null($multiplier)) { - array_push($this->openAPINullablesSetToNull, 'multiplier'); + if (is_null($formattedValue)) { + array_push($this->openAPINullablesSetToNull, 'formattedValue'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('multiplier', $nullablesSetToNull); + $index = array_search('formattedValue', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['multiplier'] = $multiplier; + $this->container['formattedValue'] = $formattedValue; return $this; } /** - * Gets attachmentOrderId + * Gets hasSecondaryDescription * - * @return string|null + * @return bool|null */ - public function getAttachmentOrderId(): ?string + public function getHasSecondaryDescription(): ?bool { - return $this->container['attachmentOrderId']; + return $this->container['hasSecondaryDescription']; } /** - * Sets attachmentOrderId + * Sets hasSecondaryDescription * - * @param string|null $attachmentOrderId [readonly] The Id of the associated AttachmentOrder. Only included if the Code is AEO + * @param bool|null $hasSecondaryDescription hasSecondaryDescription * * @return $this */ - public function setAttachmentOrderId(?string $attachmentOrderId): static + public function setHasSecondaryDescription(?bool $hasSecondaryDescription): static { - if (is_null($attachmentOrderId)) { - array_push($this->openAPINullablesSetToNull, 'attachmentOrderId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('attachmentOrderId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($hasSecondaryDescription)) { + throw new InvalidArgumentException('non-nullable hasSecondaryDescription cannot be null'); } - $this->container['attachmentOrderId'] = $attachmentOrderId; + $this->container['hasSecondaryDescription'] = $hasSecondaryDescription; return $this; } /** - * Gets pensionId + * Gets isAutoCalculatedBackPayLine * - * @return string|null + * @return bool|null */ - public function getPensionId(): ?string + public function getIsAutoCalculatedBackPayLine(): ?bool { - return $this->container['pensionId']; + return $this->container['isAutoCalculatedBackPayLine']; } /** - * Sets pensionId + * Sets isAutoCalculatedBackPayLine * - * @param string|null $pensionId [readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS + * @param bool|null $isAutoCalculatedBackPayLine isAutoCalculatedBackPayLine * * @return $this */ - public function setPensionId(?string $pensionId): static + public function setIsAutoCalculatedBackPayLine(?bool $isAutoCalculatedBackPayLine): static { - if (is_null($pensionId)) { - array_push($this->openAPINullablesSetToNull, 'pensionId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isAutoCalculatedBackPayLine)) { + throw new InvalidArgumentException('non-nullable isAutoCalculatedBackPayLine cannot be null'); } - $this->container['pensionId'] = $pensionId; + $this->container['isAutoCalculatedBackPayLine'] = $isAutoCalculatedBackPayLine; return $this; } /** - * Gets loanId + * Gets isAutomaticBackPay * - * @return string|null + * @return bool|null */ - public function getLoanId(): ?string + public function getIsAutomaticBackPay(): ?bool { - return $this->container['loanId']; + return $this->container['isAutomaticBackPay']; } /** - * Sets loanId + * Sets isAutomaticBackPay * - * @param string|null $loanId [readonly] The Id of the associated Loan, if any. + * @param bool|null $isAutomaticBackPay isAutomaticBackPay * * @return $this */ - public function setLoanId(?string $loanId): static + public function setIsAutomaticBackPay(?bool $isAutomaticBackPay): static { - if (is_null($loanId)) { - array_push($this->openAPINullablesSetToNull, 'loanId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('loanId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isAutomaticBackPay)) { + throw new InvalidArgumentException('non-nullable isAutomaticBackPay cannot be null'); } - $this->container['loanId'] = $loanId; + $this->container['isAutomaticBackPay'] = $isAutomaticBackPay; return $this; } /** - * Gets currencySymbol + * Gets isNetToGross * - * @return string|null + * @return bool|null */ - public function getCurrencySymbol(): ?string + public function getIsNetToGross(): ?bool { - return $this->container['currencySymbol']; + return $this->container['isNetToGross']; } /** - * Sets currencySymbol + * Sets isNetToGross * - * @param string|null $currencySymbol currencySymbol + * @param bool|null $isNetToGross If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. * * @return $this */ - public function setCurrencySymbol(?string $currencySymbol): static + public function setIsNetToGross(?bool $isNetToGross): static { - if (is_null($currencySymbol)) { - array_push($this->openAPINullablesSetToNull, 'currencySymbol'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('currencySymbol', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isNetToGross)) { + throw new InvalidArgumentException('non-nullable isNetToGross cannot be null'); } - $this->container['currencySymbol'] = $currencySymbol; + $this->container['isNetToGross'] = $isNetToGross; return $this; } /** - * Gets formattedValue + * Gets isNotional + * + * @return bool|null + */ + public function getIsNotional(): ?bool + { + return $this->container['isNotional']; + } + + /** + * Sets isNotional + * + * @param bool|null $isNotional Determines whether the transaction involves non-monetary benefits for payroll processing, potentially subject to tax and National Insurance + * + * @return $this + */ + public function setIsNotional(?bool $isNotional): static + { + if (is_null($isNotional)) { + throw new InvalidArgumentException('non-nullable isNotional cannot be null'); + } + $this->container['isNotional'] = $isNotional; + + return $this; + } + + /** + * Gets leaveId * * @return string|null */ - public function getFormattedValue(): ?string + public function getLeaveId(): ?string { - return $this->container['formattedValue']; + return $this->container['leaveId']; } /** - * Sets formattedValue + * Sets leaveId * - * @param string|null $formattedValue formattedValue + * @param string|null $leaveId leaveId * * @return $this */ - public function setFormattedValue(?string $formattedValue): static + public function setLeaveId(?string $leaveId): static { - if (is_null($formattedValue)) { - array_push($this->openAPINullablesSetToNull, 'formattedValue'); + if (is_null($leaveId)) { + array_push($this->openAPINullablesSetToNull, 'leaveId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('formattedValue', $nullablesSetToNull); + $index = array_search('leaveId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['formattedValue'] = $formattedValue; + $this->container['leaveId'] = $leaveId; return $this; } /** - * Gets isNetToGross + * Gets loanId * - * @return bool|null + * @return string|null */ - public function getIsNetToGross(): ?bool + public function getLoanId(): ?string { - return $this->container['isNetToGross']; + return $this->container['loanId']; } /** - * Sets isNetToGross + * Sets loanId * - * @param bool|null $isNetToGross If the PayLine is a fixed ammount addition without multiplier then this property may be set to true so that the amount of the addition to be considered a take home pay target. + * @param string|null $loanId [readonly] The Id of the associated Loan, if any. * * @return $this */ - public function setIsNetToGross(?bool $isNetToGross): static + public function setLoanId(?string $loanId): static { - if (is_null($isNetToGross)) { - throw new InvalidArgumentException('non-nullable isNetToGross cannot be null'); + if (is_null($loanId)) { + array_push($this->openAPINullablesSetToNull, 'loanId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('loanId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isNetToGross'] = $isNetToGross; + $this->container['loanId'] = $loanId; return $this; } /** - * Gets targetNetToGrossValue + * Gets multiplier * * @return float|null */ - public function getTargetNetToGrossValue(): ?float + public function getMultiplier(): ?float { - return $this->container['targetNetToGrossValue']; + return $this->container['multiplier']; } /** - * Sets targetNetToGrossValue + * Sets multiplier * - * @param float|null $targetNetToGrossValue The orginal net fixed addition amount that is considered to be a take home pay target. + * @param float|null $multiplier [readonly] If the Code is a multiplier code then this is the multiplier. Value has already been calculated so this is just for reference * * @return $this */ - public function setTargetNetToGrossValue(?float $targetNetToGrossValue): static + public function setMultiplier(?float $multiplier): static { - if (is_null($targetNetToGrossValue)) { - array_push($this->openAPINullablesSetToNull, 'targetNetToGrossValue'); + if (is_null($multiplier)) { + array_push($this->openAPINullablesSetToNull, 'multiplier'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('targetNetToGrossValue', $nullablesSetToNull); + $index = array_search('multiplier', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['targetNetToGrossValue'] = $targetNetToGrossValue; + $this->container['multiplier'] = $multiplier; return $this; } /** - * Gets leaveId + * Gets pensionId * * @return string|null */ - public function getLeaveId(): ?string + public function getPensionId(): ?string { - return $this->container['leaveId']; + return $this->container['pensionId']; } /** - * Sets leaveId + * Sets pensionId * - * @param string|null $leaveId leaveId + * @param string|null $pensionId [readonly] The Id of the associated Pension. Only included if the Code is PENSION, PENSIONSS or PENSIONRAS * * @return $this */ - public function setLeaveId(?string $leaveId): static + public function setPensionId(?string $pensionId): static { - if (is_null($leaveId)) { - array_push($this->openAPINullablesSetToNull, 'leaveId'); + if (is_null($pensionId)) { + array_push($this->openAPINullablesSetToNull, 'pensionId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('leaveId', $nullablesSetToNull); + $index = array_search('pensionId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['leaveId'] = $leaveId; + $this->container['pensionId'] = $pensionId; return $this; } @@ -911,136 +924,123 @@ public function setRoleId(?string $roleId): static } /** - * Gets isAutoCalculatedBackPayLine - * - * @return bool|null - */ - public function getIsAutoCalculatedBackPayLine(): ?bool - { - return $this->container['isAutoCalculatedBackPayLine']; - } - - /** - * Sets isAutoCalculatedBackPayLine - * - * @param bool|null $isAutoCalculatedBackPayLine isAutoCalculatedBackPayLine - * - * @return $this - */ - public function setIsAutoCalculatedBackPayLine(?bool $isAutoCalculatedBackPayLine): static - { - if (is_null($isAutoCalculatedBackPayLine)) { - throw new InvalidArgumentException('non-nullable isAutoCalculatedBackPayLine cannot be null'); - } - $this->container['isAutoCalculatedBackPayLine'] = $isAutoCalculatedBackPayLine; - - return $this; - } - - /** - * Gets isAutomaticBackPay + * Gets secondaryDescription * - * @return bool|null + * @return string|null */ - public function getIsAutomaticBackPay(): ?bool + public function getSecondaryDescription(): ?string { - return $this->container['isAutomaticBackPay']; + return $this->container['secondaryDescription']; } /** - * Sets isAutomaticBackPay + * Sets secondaryDescription * - * @param bool|null $isAutomaticBackPay isAutomaticBackPay + * @param string|null $secondaryDescription secondaryDescription * * @return $this */ - public function setIsAutomaticBackPay(?bool $isAutomaticBackPay): static + public function setSecondaryDescription(?string $secondaryDescription): static { - if (is_null($isAutomaticBackPay)) { - throw new InvalidArgumentException('non-nullable isAutomaticBackPay cannot be null'); + if (is_null($secondaryDescription)) { + array_push($this->openAPINullablesSetToNull, 'secondaryDescription'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('secondaryDescription', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isAutomaticBackPay'] = $isAutomaticBackPay; + $this->container['secondaryDescription'] = $secondaryDescription; return $this; } /** - * Gets hasSecondaryDescription + * Gets targetNetToGrossValue * - * @return bool|null + * @return float|null */ - public function getHasSecondaryDescription(): ?bool + public function getTargetNetToGrossValue(): ?float { - return $this->container['hasSecondaryDescription']; + return $this->container['targetNetToGrossValue']; } /** - * Sets hasSecondaryDescription + * Sets targetNetToGrossValue * - * @param bool|null $hasSecondaryDescription hasSecondaryDescription + * @param float|null $targetNetToGrossValue The orginal net fixed addition amount that is considered to be a take home pay target. * * @return $this */ - public function setHasSecondaryDescription(?bool $hasSecondaryDescription): static + public function setTargetNetToGrossValue(?float $targetNetToGrossValue): static { - if (is_null($hasSecondaryDescription)) { - throw new InvalidArgumentException('non-nullable hasSecondaryDescription cannot be null'); + if (is_null($targetNetToGrossValue)) { + array_push($this->openAPINullablesSetToNull, 'targetNetToGrossValue'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('targetNetToGrossValue', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['hasSecondaryDescription'] = $hasSecondaryDescription; + $this->container['targetNetToGrossValue'] = $targetNetToGrossValue; return $this; } /** - * Gets contributesToBasicPay + * Gets type * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PayslipLineType|null */ - public function getContributesToBasicPay(): ?bool + public function getType(): ?\SynergiTech\Staffology\Model\PayslipLineType { - return $this->container['contributesToBasicPay']; + return $this->container['type']; } /** - * Sets contributesToBasicPay + * Sets type * - * @param bool|null $contributesToBasicPay contributesToBasicPay + * @param \SynergiTech\Staffology\Model\PayslipLineType|null $type type * * @return $this */ - public function setContributesToBasicPay(?bool $contributesToBasicPay): static + public function setType(?\SynergiTech\Staffology\Model\PayslipLineType $type): static { - if (is_null($contributesToBasicPay)) { - throw new InvalidArgumentException('non-nullable contributesToBasicPay cannot be null'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['contributesToBasicPay'] = $contributesToBasicPay; + $this->container['type'] = $type; return $this; } /** - * Gets isNotional + * Gets value * - * @return bool|null + * @return float|null */ - public function getIsNotional(): ?bool + public function getValue(): ?float { - return $this->container['isNotional']; + return $this->container['value']; } /** - * Sets isNotional + * Sets value * - * @param bool|null $isNotional Determines whether the transaction involves non-monetary benefits for payroll processing, potentially subject to tax and National Insurance + * @param float|null $value value * * @return $this */ - public function setIsNotional(?bool $isNotional): static + public function setValue(?float $value): static { - if (is_null($isNotional)) { - throw new InvalidArgumentException('non-nullable isNotional cannot be null'); + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); } - $this->container['isNotional'] = $isNotional; + $this->container['value'] = $value; return $this; } diff --git a/src/Model/PayslipLineType.php b/src/Model/PayslipLineType.php index eebf2ec..870c4a0 100644 --- a/src/Model/PayslipLineType.php +++ b/src/Model/PayslipLineType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayslipReleasePaymentDateRule.php b/src/Model/PayslipReleasePaymentDateRule.php index 6bba5fa..812ac31 100644 --- a/src/Model/PayslipReleasePaymentDateRule.php +++ b/src/Model/PayslipReleasePaymentDateRule.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayslipReleaseTime.php b/src/Model/PayslipReleaseTime.php index bf656ab..2755fcc 100644 --- a/src/Model/PayslipReleaseTime.php +++ b/src/Model/PayslipReleaseTime.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayslipReleaseType.php b/src/Model/PayslipReleaseType.php index f87dfa8..2cb15e5 100644 --- a/src/Model/PayslipReleaseType.php +++ b/src/Model/PayslipReleaseType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PayslipReportResponse.php b/src/Model/PayslipReportResponse.php index c052678..69cd47a 100644 --- a/src/Model/PayslipReportResponse.php +++ b/src/Model/PayslipReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class PayslipReportResponse implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\Payslip', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class PayslipReportResponse implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class PayslipReportResponse implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PdfPaperMargins.php b/src/Model/PdfPaperMargins.php index 1eba321..41dd515 100644 --- a/src/Model/PdfPaperMargins.php +++ b/src/Model/PdfPaperMargins.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class PdfPaperMargins implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'top' => 'float', - 'right' => 'float', 'bottom' => 'float', - 'left' => 'float' + 'left' => 'float', + 'right' => 'float', + 'top' => 'float' ]; /** @@ -71,10 +71,10 @@ class PdfPaperMargins implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'top' => 'double', - 'right' => 'double', 'bottom' => 'double', - 'left' => 'double' + 'left' => 'double', + 'right' => 'double', + 'top' => 'double' ]; /** @@ -83,10 +83,10 @@ class PdfPaperMargins implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'top' => false, - 'right' => false, 'bottom' => false, - 'left' => false + 'left' => false, + 'right' => false, + 'top' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'top' => 'top', - 'right' => 'right', 'bottom' => 'bottom', - 'left' => 'left' + 'left' => 'left', + 'right' => 'right', + 'top' => 'top' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'top' => 'setTop', - 'right' => 'setRight', 'bottom' => 'setBottom', - 'left' => 'setLeft' + 'left' => 'setLeft', + 'right' => 'setRight', + 'top' => 'setTop' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'top' => 'getTop', - 'right' => 'getRight', 'bottom' => 'getBottom', - 'left' => 'getLeft' + 'left' => 'getLeft', + 'right' => 'getRight', + 'top' => 'getTop' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('top', $data ?? [], null); - $this->setIfExists('right', $data ?? [], null); $this->setIfExists('bottom', $data ?? [], null); $this->setIfExists('left', $data ?? [], null); + $this->setIfExists('right', $data ?? [], null); + $this->setIfExists('top', $data ?? [], null); } /** @@ -310,109 +310,109 @@ public function valid(): bool /** - * Gets top + * Gets bottom * * @return float|null */ - public function getTop(): ?float + public function getBottom(): ?float { - return $this->container['top']; + return $this->container['bottom']; } /** - * Sets top + * Sets bottom * - * @param float|null $top top + * @param float|null $bottom bottom * * @return $this */ - public function setTop(?float $top): static + public function setBottom(?float $bottom): static { - if (is_null($top)) { - throw new InvalidArgumentException('non-nullable top cannot be null'); + if (is_null($bottom)) { + throw new InvalidArgumentException('non-nullable bottom cannot be null'); } - $this->container['top'] = $top; + $this->container['bottom'] = $bottom; return $this; } /** - * Gets right + * Gets left * * @return float|null */ - public function getRight(): ?float + public function getLeft(): ?float { - return $this->container['right']; + return $this->container['left']; } /** - * Sets right + * Sets left * - * @param float|null $right right + * @param float|null $left left * * @return $this */ - public function setRight(?float $right): static + public function setLeft(?float $left): static { - if (is_null($right)) { - throw new InvalidArgumentException('non-nullable right cannot be null'); + if (is_null($left)) { + throw new InvalidArgumentException('non-nullable left cannot be null'); } - $this->container['right'] = $right; + $this->container['left'] = $left; return $this; } /** - * Gets bottom + * Gets right * * @return float|null */ - public function getBottom(): ?float + public function getRight(): ?float { - return $this->container['bottom']; + return $this->container['right']; } /** - * Sets bottom + * Sets right * - * @param float|null $bottom bottom + * @param float|null $right right * * @return $this */ - public function setBottom(?float $bottom): static + public function setRight(?float $right): static { - if (is_null($bottom)) { - throw new InvalidArgumentException('non-nullable bottom cannot be null'); + if (is_null($right)) { + throw new InvalidArgumentException('non-nullable right cannot be null'); } - $this->container['bottom'] = $bottom; + $this->container['right'] = $right; return $this; } /** - * Gets left + * Gets top * * @return float|null */ - public function getLeft(): ?float + public function getTop(): ?float { - return $this->container['left']; + return $this->container['top']; } /** - * Sets left + * Sets top * - * @param float|null $left left + * @param float|null $top top * * @return $this */ - public function setLeft(?float $left): static + public function setTop(?float $top): static { - if (is_null($left)) { - throw new InvalidArgumentException('non-nullable left cannot be null'); + if (is_null($top)) { + throw new InvalidArgumentException('non-nullable top cannot be null'); } - $this->container['left'] = $left; + $this->container['top'] = $top; return $this; } diff --git a/src/Model/PdfPaperOrientation.php b/src/Model/PdfPaperOrientation.php index ae93dd6..4080504 100644 --- a/src/Model/PdfPaperOrientation.php +++ b/src/Model/PdfPaperOrientation.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PdfPaperSize.php b/src/Model/PdfPaperSize.php index 6fa0cc5..21f167f 100644 --- a/src/Model/PdfPaperSize.php +++ b/src/Model/PdfPaperSize.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PdfPasswordType.php b/src/Model/PdfPasswordType.php index 96e19f9..6772294 100644 --- a/src/Model/PdfPasswordType.php +++ b/src/Model/PdfPasswordType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/Pension.php b/src/Model/Pension.php index cd7d502..1944831 100644 --- a/src/Model/Pension.php +++ b/src/Model/Pension.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,45 +59,45 @@ class Pension implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'employee' => '\SynergiTech\Staffology\Model\Item', + 'additionalVoluntaryContribution' => 'float', + 'aeStatusAtJoining' => '\SynergiTech\Staffology\Model\AeStatus', + 'associatedEmployeeRoles' => '\SynergiTech\Staffology\Model\Item[]', + 'autoEnrolled' => 'bool', + 'avcIsPercentage' => 'bool', 'contributionLevelType' => '\SynergiTech\Staffology\Model\PensionContributionLevelType', - 'endDate' => '\DateTime', - 'endReason' => '\SynergiTech\Staffology\Model\PensionEndReason', - 'joinReason' => '\SynergiTech\Staffology\Model\PensionJoinReason', - 'startPayRunEntryId' => 'int', - 'endPayRunEntryId' => 'int', - 'startReportingType' => '\SynergiTech\Staffology\Model\PensionReportingType', - 'endReportingType' => '\SynergiTech\Staffology\Model\PensionReportingType', - 'pensionOpeningBalances' => '\SynergiTech\Staffology\Model\PensionOpeningBalances', - 'reasonForLeaving' => 'string', - 'id' => 'string', - 'pensionSchemeId' => 'string', - 'pensionScheme' => '\SynergiTech\Staffology\Model\PensionScheme', - 'workerGroupId' => 'string', - 'workerGroup' => '\SynergiTech\Staffology\Model\WorkerGroup', - 'startDate' => '\DateTime', - 'memberReferenceNumber' => 'string', - 'overrideContributions' => 'bool', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'employeeContribution' => 'float', 'employeeContributionIsPercentage' => 'bool', 'employerContribution' => 'float', + 'employerContributionIncludesNiSaving' => 'bool', 'employerContributionIsPercentage' => 'bool', + 'employerContributionNiSavingPercentage' => 'float', 'employerContributionTopUpPercentage' => 'float', + 'endDate' => '\DateTime', + 'endPayRunEntryId' => 'int', + 'endReason' => '\SynergiTech\Staffology\Model\PensionEndReason', + 'endReportingType' => '\SynergiTech\Staffology\Model\PensionReportingType', + 'exitViaProvider' => 'bool', + 'externalEmployeeId' => 'string', + 'fiftyFiftySchemeMember' => 'bool', + 'forceEnrolment' => 'bool', + 'forcedTier' => 'string', + 'id' => 'string', 'isAeQualifyingScheme' => 'bool', 'isTeachersPension' => 'bool', - 'aeStatusAtJoining' => '\SynergiTech\Staffology\Model\AeStatus', - 'externalEmployeeId' => 'string', - 'additionalVoluntaryContribution' => 'float', - 'avcIsPercentage' => 'bool', - 'exitViaProvider' => 'bool', + 'joinReason' => '\SynergiTech\Staffology\Model\PensionJoinReason', + 'memberReferenceNumber' => 'string', + 'overrideContributions' => 'bool', + 'pensionOpeningBalances' => '\SynergiTech\Staffology\Model\PensionOpeningBalances', + 'pensionScheme' => '\SynergiTech\Staffology\Model\PensionScheme', + 'pensionSchemeId' => 'string', + 'reasonForLeaving' => 'string', + 'startDate' => '\DateTime', + 'startPayRunEntryId' => 'int', + 'startReportingType' => '\SynergiTech\Staffology\Model\PensionReportingType', 'teachersPensionDetails' => '\SynergiTech\Staffology\Model\TeachersPensionDetails', - 'forcedTier' => 'string', - 'forceEnrolment' => 'bool', - 'employerContributionIncludesNiSaving' => 'bool', - 'employerContributionNiSavingPercentage' => 'float', - 'fiftyFiftySchemeMember' => 'bool', - 'associatedEmployeeRoles' => '\SynergiTech\Staffology\Model\Item[]', - 'autoEnrolled' => 'bool' + 'workerGroup' => '\SynergiTech\Staffology\Model\WorkerGroup', + 'workerGroupId' => 'string' ]; /** @@ -106,45 +106,45 @@ class Pension implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'employee' => null, + 'additionalVoluntaryContribution' => 'double', + 'aeStatusAtJoining' => null, + 'associatedEmployeeRoles' => null, + 'autoEnrolled' => null, + 'avcIsPercentage' => null, 'contributionLevelType' => null, - 'endDate' => 'date', - 'endReason' => null, - 'joinReason' => null, - 'startPayRunEntryId' => 'int32', - 'endPayRunEntryId' => 'int32', - 'startReportingType' => null, - 'endReportingType' => null, - 'pensionOpeningBalances' => null, - 'reasonForLeaving' => null, - 'id' => 'uuid', - 'pensionSchemeId' => 'uuid', - 'pensionScheme' => null, - 'workerGroupId' => 'uuid', - 'workerGroup' => null, - 'startDate' => 'date', - 'memberReferenceNumber' => null, - 'overrideContributions' => null, + 'employee' => null, 'employeeContribution' => 'double', 'employeeContributionIsPercentage' => null, 'employerContribution' => 'double', + 'employerContributionIncludesNiSaving' => null, 'employerContributionIsPercentage' => null, + 'employerContributionNiSavingPercentage' => 'double', 'employerContributionTopUpPercentage' => 'double', + 'endDate' => 'date', + 'endPayRunEntryId' => 'int32', + 'endReason' => null, + 'endReportingType' => null, + 'exitViaProvider' => null, + 'externalEmployeeId' => null, + 'fiftyFiftySchemeMember' => null, + 'forceEnrolment' => null, + 'forcedTier' => null, + 'id' => 'uuid', 'isAeQualifyingScheme' => null, 'isTeachersPension' => null, - 'aeStatusAtJoining' => null, - 'externalEmployeeId' => null, - 'additionalVoluntaryContribution' => 'double', - 'avcIsPercentage' => null, - 'exitViaProvider' => null, + 'joinReason' => null, + 'memberReferenceNumber' => null, + 'overrideContributions' => null, + 'pensionOpeningBalances' => null, + 'pensionScheme' => null, + 'pensionSchemeId' => 'uuid', + 'reasonForLeaving' => null, + 'startDate' => 'date', + 'startPayRunEntryId' => 'int32', + 'startReportingType' => null, 'teachersPensionDetails' => null, - 'forcedTier' => null, - 'forceEnrolment' => null, - 'employerContributionIncludesNiSaving' => null, - 'employerContributionNiSavingPercentage' => 'double', - 'fiftyFiftySchemeMember' => null, - 'associatedEmployeeRoles' => null, - 'autoEnrolled' => null + 'workerGroup' => null, + 'workerGroupId' => 'uuid' ]; /** @@ -153,45 +153,45 @@ class Pension implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'employee' => false, + 'additionalVoluntaryContribution' => false, + 'aeStatusAtJoining' => false, + 'associatedEmployeeRoles' => true, + 'autoEnrolled' => false, + 'avcIsPercentage' => false, 'contributionLevelType' => false, - 'endDate' => true, - 'endReason' => false, - 'joinReason' => false, - 'startPayRunEntryId' => true, - 'endPayRunEntryId' => true, - 'startReportingType' => false, - 'endReportingType' => false, - 'pensionOpeningBalances' => false, - 'reasonForLeaving' => true, - 'id' => false, - 'pensionSchemeId' => false, - 'pensionScheme' => false, - 'workerGroupId' => false, - 'workerGroup' => false, - 'startDate' => false, - 'memberReferenceNumber' => true, - 'overrideContributions' => false, + 'employee' => false, 'employeeContribution' => false, 'employeeContributionIsPercentage' => false, 'employerContribution' => false, + 'employerContributionIncludesNiSaving' => false, 'employerContributionIsPercentage' => false, + 'employerContributionNiSavingPercentage' => false, 'employerContributionTopUpPercentage' => false, + 'endDate' => true, + 'endPayRunEntryId' => true, + 'endReason' => false, + 'endReportingType' => false, + 'exitViaProvider' => false, + 'externalEmployeeId' => true, + 'fiftyFiftySchemeMember' => false, + 'forceEnrolment' => false, + 'forcedTier' => true, + 'id' => false, 'isAeQualifyingScheme' => false, 'isTeachersPension' => false, - 'aeStatusAtJoining' => false, - 'externalEmployeeId' => true, - 'additionalVoluntaryContribution' => false, - 'avcIsPercentage' => false, - 'exitViaProvider' => false, + 'joinReason' => false, + 'memberReferenceNumber' => true, + 'overrideContributions' => false, + 'pensionOpeningBalances' => false, + 'pensionScheme' => false, + 'pensionSchemeId' => false, + 'reasonForLeaving' => true, + 'startDate' => false, + 'startPayRunEntryId' => true, + 'startReportingType' => false, 'teachersPensionDetails' => false, - 'forcedTier' => true, - 'forceEnrolment' => false, - 'employerContributionIncludesNiSaving' => false, - 'employerContributionNiSavingPercentage' => false, - 'fiftyFiftySchemeMember' => false, - 'associatedEmployeeRoles' => true, - 'autoEnrolled' => false + 'workerGroup' => false, + 'workerGroupId' => false ]; /** @@ -280,45 +280,45 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employee' => 'employee', + 'additionalVoluntaryContribution' => 'additionalVoluntaryContribution', + 'aeStatusAtJoining' => 'aeStatusAtJoining', + 'associatedEmployeeRoles' => 'associatedEmployeeRoles', + 'autoEnrolled' => 'autoEnrolled', + 'avcIsPercentage' => 'avcIsPercentage', 'contributionLevelType' => 'contributionLevelType', - 'endDate' => 'endDate', - 'endReason' => 'endReason', - 'joinReason' => 'joinReason', - 'startPayRunEntryId' => 'startPayRunEntryId', - 'endPayRunEntryId' => 'endPayRunEntryId', - 'startReportingType' => 'startReportingType', - 'endReportingType' => 'endReportingType', - 'pensionOpeningBalances' => 'pensionOpeningBalances', - 'reasonForLeaving' => 'reasonForLeaving', - 'id' => 'id', - 'pensionSchemeId' => 'pensionSchemeId', - 'pensionScheme' => 'pensionScheme', - 'workerGroupId' => 'workerGroupId', - 'workerGroup' => 'workerGroup', - 'startDate' => 'startDate', - 'memberReferenceNumber' => 'memberReferenceNumber', - 'overrideContributions' => 'overrideContributions', + 'employee' => 'employee', 'employeeContribution' => 'employeeContribution', 'employeeContributionIsPercentage' => 'employeeContributionIsPercentage', 'employerContribution' => 'employerContribution', + 'employerContributionIncludesNiSaving' => 'employerContributionIncludesNiSaving', 'employerContributionIsPercentage' => 'employerContributionIsPercentage', + 'employerContributionNiSavingPercentage' => 'employerContributionNiSavingPercentage', 'employerContributionTopUpPercentage' => 'employerContributionTopUpPercentage', + 'endDate' => 'endDate', + 'endPayRunEntryId' => 'endPayRunEntryId', + 'endReason' => 'endReason', + 'endReportingType' => 'endReportingType', + 'exitViaProvider' => 'exitViaProvider', + 'externalEmployeeId' => 'externalEmployeeId', + 'fiftyFiftySchemeMember' => 'fiftyFiftySchemeMember', + 'forceEnrolment' => 'forceEnrolment', + 'forcedTier' => 'forcedTier', + 'id' => 'id', 'isAeQualifyingScheme' => 'isAeQualifyingScheme', 'isTeachersPension' => 'isTeachersPension', - 'aeStatusAtJoining' => 'aeStatusAtJoining', - 'externalEmployeeId' => 'externalEmployeeId', - 'additionalVoluntaryContribution' => 'additionalVoluntaryContribution', - 'avcIsPercentage' => 'avcIsPercentage', - 'exitViaProvider' => 'exitViaProvider', + 'joinReason' => 'joinReason', + 'memberReferenceNumber' => 'memberReferenceNumber', + 'overrideContributions' => 'overrideContributions', + 'pensionOpeningBalances' => 'pensionOpeningBalances', + 'pensionScheme' => 'pensionScheme', + 'pensionSchemeId' => 'pensionSchemeId', + 'reasonForLeaving' => 'reasonForLeaving', + 'startDate' => 'startDate', + 'startPayRunEntryId' => 'startPayRunEntryId', + 'startReportingType' => 'startReportingType', 'teachersPensionDetails' => 'teachersPensionDetails', - 'forcedTier' => 'forcedTier', - 'forceEnrolment' => 'forceEnrolment', - 'employerContributionIncludesNiSaving' => 'employerContributionIncludesNiSaving', - 'employerContributionNiSavingPercentage' => 'employerContributionNiSavingPercentage', - 'fiftyFiftySchemeMember' => 'fiftyFiftySchemeMember', - 'associatedEmployeeRoles' => 'associatedEmployeeRoles', - 'autoEnrolled' => 'autoEnrolled' + 'workerGroup' => 'workerGroup', + 'workerGroupId' => 'workerGroupId' ]; /** @@ -327,45 +327,45 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employee' => 'setEmployee', + 'additionalVoluntaryContribution' => 'setAdditionalVoluntaryContribution', + 'aeStatusAtJoining' => 'setAeStatusAtJoining', + 'associatedEmployeeRoles' => 'setAssociatedEmployeeRoles', + 'autoEnrolled' => 'setAutoEnrolled', + 'avcIsPercentage' => 'setAvcIsPercentage', 'contributionLevelType' => 'setContributionLevelType', - 'endDate' => 'setEndDate', - 'endReason' => 'setEndReason', - 'joinReason' => 'setJoinReason', - 'startPayRunEntryId' => 'setStartPayRunEntryId', - 'endPayRunEntryId' => 'setEndPayRunEntryId', - 'startReportingType' => 'setStartReportingType', - 'endReportingType' => 'setEndReportingType', - 'pensionOpeningBalances' => 'setPensionOpeningBalances', - 'reasonForLeaving' => 'setReasonForLeaving', - 'id' => 'setId', - 'pensionSchemeId' => 'setPensionSchemeId', - 'pensionScheme' => 'setPensionScheme', - 'workerGroupId' => 'setWorkerGroupId', - 'workerGroup' => 'setWorkerGroup', - 'startDate' => 'setStartDate', - 'memberReferenceNumber' => 'setMemberReferenceNumber', - 'overrideContributions' => 'setOverrideContributions', + 'employee' => 'setEmployee', 'employeeContribution' => 'setEmployeeContribution', 'employeeContributionIsPercentage' => 'setEmployeeContributionIsPercentage', 'employerContribution' => 'setEmployerContribution', + 'employerContributionIncludesNiSaving' => 'setEmployerContributionIncludesNiSaving', 'employerContributionIsPercentage' => 'setEmployerContributionIsPercentage', + 'employerContributionNiSavingPercentage' => 'setEmployerContributionNiSavingPercentage', 'employerContributionTopUpPercentage' => 'setEmployerContributionTopUpPercentage', + 'endDate' => 'setEndDate', + 'endPayRunEntryId' => 'setEndPayRunEntryId', + 'endReason' => 'setEndReason', + 'endReportingType' => 'setEndReportingType', + 'exitViaProvider' => 'setExitViaProvider', + 'externalEmployeeId' => 'setExternalEmployeeId', + 'fiftyFiftySchemeMember' => 'setFiftyFiftySchemeMember', + 'forceEnrolment' => 'setForceEnrolment', + 'forcedTier' => 'setForcedTier', + 'id' => 'setId', 'isAeQualifyingScheme' => 'setIsAeQualifyingScheme', 'isTeachersPension' => 'setIsTeachersPension', - 'aeStatusAtJoining' => 'setAeStatusAtJoining', - 'externalEmployeeId' => 'setExternalEmployeeId', - 'additionalVoluntaryContribution' => 'setAdditionalVoluntaryContribution', - 'avcIsPercentage' => 'setAvcIsPercentage', - 'exitViaProvider' => 'setExitViaProvider', + 'joinReason' => 'setJoinReason', + 'memberReferenceNumber' => 'setMemberReferenceNumber', + 'overrideContributions' => 'setOverrideContributions', + 'pensionOpeningBalances' => 'setPensionOpeningBalances', + 'pensionScheme' => 'setPensionScheme', + 'pensionSchemeId' => 'setPensionSchemeId', + 'reasonForLeaving' => 'setReasonForLeaving', + 'startDate' => 'setStartDate', + 'startPayRunEntryId' => 'setStartPayRunEntryId', + 'startReportingType' => 'setStartReportingType', 'teachersPensionDetails' => 'setTeachersPensionDetails', - 'forcedTier' => 'setForcedTier', - 'forceEnrolment' => 'setForceEnrolment', - 'employerContributionIncludesNiSaving' => 'setEmployerContributionIncludesNiSaving', - 'employerContributionNiSavingPercentage' => 'setEmployerContributionNiSavingPercentage', - 'fiftyFiftySchemeMember' => 'setFiftyFiftySchemeMember', - 'associatedEmployeeRoles' => 'setAssociatedEmployeeRoles', - 'autoEnrolled' => 'setAutoEnrolled' + 'workerGroup' => 'setWorkerGroup', + 'workerGroupId' => 'setWorkerGroupId' ]; /** @@ -374,45 +374,45 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employee' => 'getEmployee', + 'additionalVoluntaryContribution' => 'getAdditionalVoluntaryContribution', + 'aeStatusAtJoining' => 'getAeStatusAtJoining', + 'associatedEmployeeRoles' => 'getAssociatedEmployeeRoles', + 'autoEnrolled' => 'getAutoEnrolled', + 'avcIsPercentage' => 'getAvcIsPercentage', 'contributionLevelType' => 'getContributionLevelType', - 'endDate' => 'getEndDate', - 'endReason' => 'getEndReason', - 'joinReason' => 'getJoinReason', - 'startPayRunEntryId' => 'getStartPayRunEntryId', - 'endPayRunEntryId' => 'getEndPayRunEntryId', - 'startReportingType' => 'getStartReportingType', - 'endReportingType' => 'getEndReportingType', - 'pensionOpeningBalances' => 'getPensionOpeningBalances', - 'reasonForLeaving' => 'getReasonForLeaving', - 'id' => 'getId', - 'pensionSchemeId' => 'getPensionSchemeId', - 'pensionScheme' => 'getPensionScheme', - 'workerGroupId' => 'getWorkerGroupId', - 'workerGroup' => 'getWorkerGroup', - 'startDate' => 'getStartDate', - 'memberReferenceNumber' => 'getMemberReferenceNumber', - 'overrideContributions' => 'getOverrideContributions', + 'employee' => 'getEmployee', 'employeeContribution' => 'getEmployeeContribution', 'employeeContributionIsPercentage' => 'getEmployeeContributionIsPercentage', 'employerContribution' => 'getEmployerContribution', + 'employerContributionIncludesNiSaving' => 'getEmployerContributionIncludesNiSaving', 'employerContributionIsPercentage' => 'getEmployerContributionIsPercentage', + 'employerContributionNiSavingPercentage' => 'getEmployerContributionNiSavingPercentage', 'employerContributionTopUpPercentage' => 'getEmployerContributionTopUpPercentage', + 'endDate' => 'getEndDate', + 'endPayRunEntryId' => 'getEndPayRunEntryId', + 'endReason' => 'getEndReason', + 'endReportingType' => 'getEndReportingType', + 'exitViaProvider' => 'getExitViaProvider', + 'externalEmployeeId' => 'getExternalEmployeeId', + 'fiftyFiftySchemeMember' => 'getFiftyFiftySchemeMember', + 'forceEnrolment' => 'getForceEnrolment', + 'forcedTier' => 'getForcedTier', + 'id' => 'getId', 'isAeQualifyingScheme' => 'getIsAeQualifyingScheme', 'isTeachersPension' => 'getIsTeachersPension', - 'aeStatusAtJoining' => 'getAeStatusAtJoining', - 'externalEmployeeId' => 'getExternalEmployeeId', - 'additionalVoluntaryContribution' => 'getAdditionalVoluntaryContribution', - 'avcIsPercentage' => 'getAvcIsPercentage', - 'exitViaProvider' => 'getExitViaProvider', + 'joinReason' => 'getJoinReason', + 'memberReferenceNumber' => 'getMemberReferenceNumber', + 'overrideContributions' => 'getOverrideContributions', + 'pensionOpeningBalances' => 'getPensionOpeningBalances', + 'pensionScheme' => 'getPensionScheme', + 'pensionSchemeId' => 'getPensionSchemeId', + 'reasonForLeaving' => 'getReasonForLeaving', + 'startDate' => 'getStartDate', + 'startPayRunEntryId' => 'getStartPayRunEntryId', + 'startReportingType' => 'getStartReportingType', 'teachersPensionDetails' => 'getTeachersPensionDetails', - 'forcedTier' => 'getForcedTier', - 'forceEnrolment' => 'getForceEnrolment', - 'employerContributionIncludesNiSaving' => 'getEmployerContributionIncludesNiSaving', - 'employerContributionNiSavingPercentage' => 'getEmployerContributionNiSavingPercentage', - 'fiftyFiftySchemeMember' => 'getFiftyFiftySchemeMember', - 'associatedEmployeeRoles' => 'getAssociatedEmployeeRoles', - 'autoEnrolled' => 'getAutoEnrolled' + 'workerGroup' => 'getWorkerGroup', + 'workerGroupId' => 'getWorkerGroupId' ]; /** @@ -471,45 +471,45 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('additionalVoluntaryContribution', $data ?? [], null); + $this->setIfExists('aeStatusAtJoining', $data ?? [], null); + $this->setIfExists('associatedEmployeeRoles', $data ?? [], null); + $this->setIfExists('autoEnrolled', $data ?? [], null); + $this->setIfExists('avcIsPercentage', $data ?? [], null); $this->setIfExists('contributionLevelType', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); - $this->setIfExists('endReason', $data ?? [], null); - $this->setIfExists('joinReason', $data ?? [], null); - $this->setIfExists('startPayRunEntryId', $data ?? [], null); - $this->setIfExists('endPayRunEntryId', $data ?? [], null); - $this->setIfExists('startReportingType', $data ?? [], null); - $this->setIfExists('endReportingType', $data ?? [], null); - $this->setIfExists('pensionOpeningBalances', $data ?? [], null); - $this->setIfExists('reasonForLeaving', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('pensionSchemeId', $data ?? [], null); - $this->setIfExists('pensionScheme', $data ?? [], null); - $this->setIfExists('workerGroupId', $data ?? [], null); - $this->setIfExists('workerGroup', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('memberReferenceNumber', $data ?? [], null); - $this->setIfExists('overrideContributions', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('employeeContribution', $data ?? [], null); $this->setIfExists('employeeContributionIsPercentage', $data ?? [], null); $this->setIfExists('employerContribution', $data ?? [], null); + $this->setIfExists('employerContributionIncludesNiSaving', $data ?? [], null); $this->setIfExists('employerContributionIsPercentage', $data ?? [], null); + $this->setIfExists('employerContributionNiSavingPercentage', $data ?? [], null); $this->setIfExists('employerContributionTopUpPercentage', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPayRunEntryId', $data ?? [], null); + $this->setIfExists('endReason', $data ?? [], null); + $this->setIfExists('endReportingType', $data ?? [], null); + $this->setIfExists('exitViaProvider', $data ?? [], null); + $this->setIfExists('externalEmployeeId', $data ?? [], null); + $this->setIfExists('fiftyFiftySchemeMember', $data ?? [], null); + $this->setIfExists('forceEnrolment', $data ?? [], null); + $this->setIfExists('forcedTier', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('isAeQualifyingScheme', $data ?? [], null); $this->setIfExists('isTeachersPension', $data ?? [], null); - $this->setIfExists('aeStatusAtJoining', $data ?? [], null); - $this->setIfExists('externalEmployeeId', $data ?? [], null); - $this->setIfExists('additionalVoluntaryContribution', $data ?? [], null); - $this->setIfExists('avcIsPercentage', $data ?? [], null); - $this->setIfExists('exitViaProvider', $data ?? [], null); + $this->setIfExists('joinReason', $data ?? [], null); + $this->setIfExists('memberReferenceNumber', $data ?? [], null); + $this->setIfExists('overrideContributions', $data ?? [], null); + $this->setIfExists('pensionOpeningBalances', $data ?? [], null); + $this->setIfExists('pensionScheme', $data ?? [], null); + $this->setIfExists('pensionSchemeId', $data ?? [], null); + $this->setIfExists('reasonForLeaving', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPayRunEntryId', $data ?? [], null); + $this->setIfExists('startReportingType', $data ?? [], null); $this->setIfExists('teachersPensionDetails', $data ?? [], null); - $this->setIfExists('forcedTier', $data ?? [], null); - $this->setIfExists('forceEnrolment', $data ?? [], null); - $this->setIfExists('employerContributionIncludesNiSaving', $data ?? [], null); - $this->setIfExists('employerContributionNiSavingPercentage', $data ?? [], null); - $this->setIfExists('fiftyFiftySchemeMember', $data ?? [], null); - $this->setIfExists('associatedEmployeeRoles', $data ?? [], null); - $this->setIfExists('autoEnrolled', $data ?? [], null); + $this->setIfExists('workerGroup', $data ?? [], null); + $this->setIfExists('workerGroupId', $data ?? [], null); } /** @@ -539,14 +539,14 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (!is_null($this->container['reasonForLeaving']) && (mb_strlen($this->container['reasonForLeaving']) > 100)) { - $invalidProperties[] = "invalid value for 'reasonForLeaving', the character length must be smaller than or equal to 100."; - } - if (!is_null($this->container['memberReferenceNumber']) && (mb_strlen($this->container['memberReferenceNumber']) > 25)) { $invalidProperties[] = "invalid value for 'memberReferenceNumber', the character length must be smaller than or equal to 25."; } + if (!is_null($this->container['reasonForLeaving']) && (mb_strlen($this->container['reasonForLeaving']) > 100)) { + $invalidProperties[] = "invalid value for 'reasonForLeaving', the character length must be smaller than or equal to 100."; + } + return $invalidProperties; } @@ -563,692 +563,684 @@ public function valid(): bool /** - * Gets employee + * Gets additionalVoluntaryContribution * - * @return \SynergiTech\Staffology\Model\Item|null + * @return float|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getAdditionalVoluntaryContribution(): ?float { - return $this->container['employee']; + return $this->container['additionalVoluntaryContribution']; } /** - * Sets employee + * Sets additionalVoluntaryContribution * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param float|null $additionalVoluntaryContribution Any additional voluntary amount the employer contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setAdditionalVoluntaryContribution(?float $additionalVoluntaryContribution): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($additionalVoluntaryContribution)) { + throw new InvalidArgumentException('non-nullable additionalVoluntaryContribution cannot be null'); } - $this->container['employee'] = $employee; + $this->container['additionalVoluntaryContribution'] = $additionalVoluntaryContribution; return $this; } /** - * Gets contributionLevelType + * Gets aeStatusAtJoining * - * @return \SynergiTech\Staffology\Model\PensionContributionLevelType|null + * @return \SynergiTech\Staffology\Model\AeStatus|null */ - public function getContributionLevelType(): ?\SynergiTech\Staffology\Model\PensionContributionLevelType + public function getAeStatusAtJoining(): ?\SynergiTech\Staffology\Model\AeStatus { - return $this->container['contributionLevelType']; + return $this->container['aeStatusAtJoining']; } /** - * Sets contributionLevelType + * Sets aeStatusAtJoining * - * @param \SynergiTech\Staffology\Model\PensionContributionLevelType|null $contributionLevelType contributionLevelType + * @param \SynergiTech\Staffology\Model\AeStatus|null $aeStatusAtJoining aeStatusAtJoining * * @return $this */ - public function setContributionLevelType(?\SynergiTech\Staffology\Model\PensionContributionLevelType $contributionLevelType): static + public function setAeStatusAtJoining(?\SynergiTech\Staffology\Model\AeStatus $aeStatusAtJoining): static { - if (is_null($contributionLevelType)) { - throw new InvalidArgumentException('non-nullable contributionLevelType cannot be null'); + if (is_null($aeStatusAtJoining)) { + throw new InvalidArgumentException('non-nullable aeStatusAtJoining cannot be null'); } - $this->container['contributionLevelType'] = $contributionLevelType; + $this->container['aeStatusAtJoining'] = $aeStatusAtJoining; return $this; } /** - * Gets endDate + * Gets associatedEmployeeRoles * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getEndDate(): ?\DateTime + public function getAssociatedEmployeeRoles(): ?array { - return $this->container['endDate']; + return $this->container['associatedEmployeeRoles']; } /** - * Sets endDate + * Sets associatedEmployeeRoles * - * @param \DateTime|null $endDate The date the employee left the scheme + * @param \SynergiTech\Staffology\Model\Item[]|null $associatedEmployeeRoles The list of employee roles associated with the pension membership * * @return $this */ - public function setEndDate(?\DateTime $endDate): static + public function setAssociatedEmployeeRoles(?array $associatedEmployeeRoles): static { - if (is_null($endDate)) { - array_push($this->openAPINullablesSetToNull, 'endDate'); + if (is_null($associatedEmployeeRoles)) { + array_push($this->openAPINullablesSetToNull, 'associatedEmployeeRoles'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endDate', $nullablesSetToNull); + $index = array_search('associatedEmployeeRoles', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['endDate'] = $endDate; + $this->container['associatedEmployeeRoles'] = $associatedEmployeeRoles; return $this; } /** - * Gets endReason + * Gets autoEnrolled * - * @return \SynergiTech\Staffology\Model\PensionEndReason|null + * @return bool|null */ - public function getEndReason(): ?\SynergiTech\Staffology\Model\PensionEndReason + public function getAutoEnrolled(): ?bool { - return $this->container['endReason']; + return $this->container['autoEnrolled']; } /** - * Sets endReason + * Sets autoEnrolled * - * @param \SynergiTech\Staffology\Model\PensionEndReason|null $endReason endReason + * @param bool|null $autoEnrolled [readonly] Is True if the employee joined this Pension due to an AutoEnrolment action * * @return $this */ - public function setEndReason(?\SynergiTech\Staffology\Model\PensionEndReason $endReason): static + public function setAutoEnrolled(?bool $autoEnrolled): static { - if (is_null($endReason)) { - throw new InvalidArgumentException('non-nullable endReason cannot be null'); + if (is_null($autoEnrolled)) { + throw new InvalidArgumentException('non-nullable autoEnrolled cannot be null'); } - $this->container['endReason'] = $endReason; + $this->container['autoEnrolled'] = $autoEnrolled; return $this; } /** - * Gets joinReason + * Gets avcIsPercentage * - * @return \SynergiTech\Staffology\Model\PensionJoinReason|null + * @return bool|null */ - public function getJoinReason(): ?\SynergiTech\Staffology\Model\PensionJoinReason + public function getAvcIsPercentage(): ?bool { - return $this->container['joinReason']; + return $this->container['avcIsPercentage']; } /** - * Sets joinReason + * Sets avcIsPercentage * - * @param \SynergiTech\Staffology\Model\PensionJoinReason|null $joinReason joinReason + * @param bool|null $avcIsPercentage Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, * * @return $this */ - public function setJoinReason(?\SynergiTech\Staffology\Model\PensionJoinReason $joinReason): static + public function setAvcIsPercentage(?bool $avcIsPercentage): static { - if (is_null($joinReason)) { - throw new InvalidArgumentException('non-nullable joinReason cannot be null'); + if (is_null($avcIsPercentage)) { + throw new InvalidArgumentException('non-nullable avcIsPercentage cannot be null'); } - $this->container['joinReason'] = $joinReason; + $this->container['avcIsPercentage'] = $avcIsPercentage; return $this; } /** - * Gets startPayRunEntryId + * Gets contributionLevelType * - * @return int|null + * @return \SynergiTech\Staffology\Model\PensionContributionLevelType|null */ - public function getStartPayRunEntryId(): ?int + public function getContributionLevelType(): ?\SynergiTech\Staffology\Model\PensionContributionLevelType { - return $this->container['startPayRunEntryId']; + return $this->container['contributionLevelType']; } /** - * Sets startPayRunEntryId + * Sets contributionLevelType * - * @param int|null $startPayRunEntryId [readonly] Holds the Id for the payroll that the employee joined the scheme + * @param \SynergiTech\Staffology\Model\PensionContributionLevelType|null $contributionLevelType contributionLevelType * * @return $this */ - public function setStartPayRunEntryId(?int $startPayRunEntryId): static + public function setContributionLevelType(?\SynergiTech\Staffology\Model\PensionContributionLevelType $contributionLevelType): static { - if (is_null($startPayRunEntryId)) { - array_push($this->openAPINullablesSetToNull, 'startPayRunEntryId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPayRunEntryId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($contributionLevelType)) { + throw new InvalidArgumentException('non-nullable contributionLevelType cannot be null'); } - $this->container['startPayRunEntryId'] = $startPayRunEntryId; + $this->container['contributionLevelType'] = $contributionLevelType; return $this; } /** - * Gets endPayRunEntryId + * Gets employee * - * @return int|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getEndPayRunEntryId(): ?int + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['endPayRunEntryId']; + return $this->container['employee']; } /** - * Sets endPayRunEntryId + * Sets employee * - * @param int|null $endPayRunEntryId [readonly] Holds the Id for the payroll that the employee left the scheme + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setEndPayRunEntryId(?int $endPayRunEntryId): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($endPayRunEntryId)) { - array_push($this->openAPINullablesSetToNull, 'endPayRunEntryId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPayRunEntryId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['endPayRunEntryId'] = $endPayRunEntryId; + $this->container['employee'] = $employee; return $this; } /** - * Gets startReportingType + * Gets employeeContribution * - * @return \SynergiTech\Staffology\Model\PensionReportingType|null + * @return float|null */ - public function getStartReportingType(): ?\SynergiTech\Staffology\Model\PensionReportingType + public function getEmployeeContribution(): ?float { - return $this->container['startReportingType']; + return $this->container['employeeContribution']; } /** - * Sets startReportingType + * Sets employeeContribution * - * @param \SynergiTech\Staffology\Model\PensionReportingType|null $startReportingType startReportingType + * @param float|null $employeeContribution The amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on EmployeeContributionIsPercentage. This is read-only if OverrideContributions is false * * @return $this */ - public function setStartReportingType(?\SynergiTech\Staffology\Model\PensionReportingType $startReportingType): static + public function setEmployeeContribution(?float $employeeContribution): static { - if (is_null($startReportingType)) { - throw new InvalidArgumentException('non-nullable startReportingType cannot be null'); + if (is_null($employeeContribution)) { + throw new InvalidArgumentException('non-nullable employeeContribution cannot be null'); } - $this->container['startReportingType'] = $startReportingType; + $this->container['employeeContribution'] = $employeeContribution; return $this; } /** - * Gets endReportingType + * Gets employeeContributionIsPercentage * - * @return \SynergiTech\Staffology\Model\PensionReportingType|null + * @return bool|null */ - public function getEndReportingType(): ?\SynergiTech\Staffology\Model\PensionReportingType + public function getEmployeeContributionIsPercentage(): ?bool { - return $this->container['endReportingType']; + return $this->container['employeeContributionIsPercentage']; } /** - * Sets endReportingType + * Sets employeeContributionIsPercentage * - * @param \SynergiTech\Staffology\Model\PensionReportingType|null $endReportingType endReportingType + * @param bool|null $employeeContributionIsPercentage Determines whether the Value of the EmployeeContribution is a fixed amount or a percentage, * * @return $this */ - public function setEndReportingType(?\SynergiTech\Staffology\Model\PensionReportingType $endReportingType): static + public function setEmployeeContributionIsPercentage(?bool $employeeContributionIsPercentage): static { - if (is_null($endReportingType)) { - throw new InvalidArgumentException('non-nullable endReportingType cannot be null'); + if (is_null($employeeContributionIsPercentage)) { + throw new InvalidArgumentException('non-nullable employeeContributionIsPercentage cannot be null'); } - $this->container['endReportingType'] = $endReportingType; + $this->container['employeeContributionIsPercentage'] = $employeeContributionIsPercentage; return $this; } /** - * Gets pensionOpeningBalances + * Gets employerContribution * - * @return \SynergiTech\Staffology\Model\PensionOpeningBalances|null + * @return float|null */ - public function getPensionOpeningBalances(): ?\SynergiTech\Staffology\Model\PensionOpeningBalances + public function getEmployerContribution(): ?float { - return $this->container['pensionOpeningBalances']; + return $this->container['employerContribution']; } /** - * Sets pensionOpeningBalances + * Sets employerContribution * - * @param \SynergiTech\Staffology\Model\PensionOpeningBalances|null $pensionOpeningBalances pensionOpeningBalances + * @param float|null $employerContribution The amount the employer contributes towards the pension. Could be a percentage or a fixed amount depending on EmployerContributionIsPercentage. This is read-only if OverrideContributions is false * * @return $this */ - public function setPensionOpeningBalances(?\SynergiTech\Staffology\Model\PensionOpeningBalances $pensionOpeningBalances): static + public function setEmployerContribution(?float $employerContribution): static { - if (is_null($pensionOpeningBalances)) { - throw new InvalidArgumentException('non-nullable pensionOpeningBalances cannot be null'); + if (is_null($employerContribution)) { + throw new InvalidArgumentException('non-nullable employerContribution cannot be null'); } - $this->container['pensionOpeningBalances'] = $pensionOpeningBalances; + $this->container['employerContribution'] = $employerContribution; return $this; } /** - * Gets reasonForLeaving + * Gets employerContributionIncludesNiSaving * - * @return string|null + * @return bool|null */ - public function getReasonForLeaving(): ?string + public function getEmployerContributionIncludesNiSaving(): ?bool { - return $this->container['reasonForLeaving']; + return $this->container['employerContributionIncludesNiSaving']; } /** - * Sets reasonForLeaving + * Sets employerContributionIncludesNiSaving * - * @param string|null $reasonForLeaving If a value is provided for EndDate then this is the reason for leaving the employee left the scheme + * @param bool|null $employerContributionIncludesNiSaving Employer Contribution includes the Employers NI saving * * @return $this */ - public function setReasonForLeaving(?string $reasonForLeaving): static + public function setEmployerContributionIncludesNiSaving(?bool $employerContributionIncludesNiSaving): static { - if (is_null($reasonForLeaving)) { - array_push($this->openAPINullablesSetToNull, 'reasonForLeaving'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('reasonForLeaving', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($reasonForLeaving) && (mb_strlen($reasonForLeaving) > 100)) { - throw new InvalidArgumentException('invalid length for $reasonForLeaving when calling Pension., must be smaller than or equal to 100.'); + if (is_null($employerContributionIncludesNiSaving)) { + throw new InvalidArgumentException('non-nullable employerContributionIncludesNiSaving cannot be null'); } - - $this->container['reasonForLeaving'] = $reasonForLeaving; + $this->container['employerContributionIncludesNiSaving'] = $employerContributionIncludesNiSaving; return $this; } /** - * Gets id + * Gets employerContributionIsPercentage * - * @return string|null + * @return bool|null */ - public function getId(): ?string + public function getEmployerContributionIsPercentage(): ?bool { - return $this->container['id']; + return $this->container['employerContributionIsPercentage']; } /** - * Sets id + * Sets employerContributionIsPercentage * - * @param string|null $id [readonly] The unique id of the object + * @param bool|null $employerContributionIsPercentage Determines whether the Value of the EmployerContribution is a fixed amount or a percentage, * * @return $this */ - public function setId(?string $id): static + public function setEmployerContributionIsPercentage(?bool $employerContributionIsPercentage): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($employerContributionIsPercentage)) { + throw new InvalidArgumentException('non-nullable employerContributionIsPercentage cannot be null'); } - $this->container['id'] = $id; + $this->container['employerContributionIsPercentage'] = $employerContributionIsPercentage; return $this; } /** - * Gets pensionSchemeId + * Gets employerContributionNiSavingPercentage * - * @return string|null + * @return float|null */ - public function getPensionSchemeId(): ?string + public function getEmployerContributionNiSavingPercentage(): ?float { - return $this->container['pensionSchemeId']; + return $this->container['employerContributionNiSavingPercentage']; } /** - * Sets pensionSchemeId + * Sets employerContributionNiSavingPercentage * - * @param string|null $pensionSchemeId pensionSchemeId + * @param float|null $employerContributionNiSavingPercentage Increase Employer Contribution by this percentage of the Employers NI saving * * @return $this */ - public function setPensionSchemeId(?string $pensionSchemeId): static + public function setEmployerContributionNiSavingPercentage(?float $employerContributionNiSavingPercentage): static { - if (is_null($pensionSchemeId)) { - throw new InvalidArgumentException('non-nullable pensionSchemeId cannot be null'); + if (is_null($employerContributionNiSavingPercentage)) { + throw new InvalidArgumentException('non-nullable employerContributionNiSavingPercentage cannot be null'); } - $this->container['pensionSchemeId'] = $pensionSchemeId; + $this->container['employerContributionNiSavingPercentage'] = $employerContributionNiSavingPercentage; return $this; } /** - * Gets pensionScheme + * Gets employerContributionTopUpPercentage * - * @return \SynergiTech\Staffology\Model\PensionScheme|null + * @return float|null */ - public function getPensionScheme(): ?\SynergiTech\Staffology\Model\PensionScheme + public function getEmployerContributionTopUpPercentage(): ?float { - return $this->container['pensionScheme']; + return $this->container['employerContributionTopUpPercentage']; } /** - * Sets pensionScheme + * Sets employerContributionTopUpPercentage * - * @param \SynergiTech\Staffology\Model\PensionScheme|null $pensionScheme pensionScheme + * @param float|null $employerContributionTopUpPercentage Increase Employer Contribution by this percentage of the Employee Contribution * * @return $this */ - public function setPensionScheme(?\SynergiTech\Staffology\Model\PensionScheme $pensionScheme): static + public function setEmployerContributionTopUpPercentage(?float $employerContributionTopUpPercentage): static { - if (is_null($pensionScheme)) { - throw new InvalidArgumentException('non-nullable pensionScheme cannot be null'); + if (is_null($employerContributionTopUpPercentage)) { + throw new InvalidArgumentException('non-nullable employerContributionTopUpPercentage cannot be null'); } - $this->container['pensionScheme'] = $pensionScheme; + $this->container['employerContributionTopUpPercentage'] = $employerContributionTopUpPercentage; return $this; } /** - * Gets workerGroupId + * Gets endDate * - * @return string|null + * @return \DateTime|null */ - public function getWorkerGroupId(): ?string + public function getEndDate(): ?\DateTime { - return $this->container['workerGroupId']; + return $this->container['endDate']; } /** - * Sets workerGroupId + * Sets endDate * - * @param string|null $workerGroupId workerGroupId + * @param \DateTime|null $endDate The date the employee left the scheme * * @return $this */ - public function setWorkerGroupId(?string $workerGroupId): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($workerGroupId)) { - throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); + if (is_null($endDate)) { + array_push($this->openAPINullablesSetToNull, 'endDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['workerGroupId'] = $workerGroupId; + $this->container['endDate'] = $endDate; return $this; } /** - * Gets workerGroup + * Gets endPayRunEntryId * - * @return \SynergiTech\Staffology\Model\WorkerGroup|null + * @return int|null */ - public function getWorkerGroup(): ?\SynergiTech\Staffology\Model\WorkerGroup + public function getEndPayRunEntryId(): ?int { - return $this->container['workerGroup']; + return $this->container['endPayRunEntryId']; } /** - * Sets workerGroup + * Sets endPayRunEntryId * - * @param \SynergiTech\Staffology\Model\WorkerGroup|null $workerGroup workerGroup + * @param int|null $endPayRunEntryId [readonly] Holds the Id for the payroll that the employee left the scheme * * @return $this */ - public function setWorkerGroup(?\SynergiTech\Staffology\Model\WorkerGroup $workerGroup): static + public function setEndPayRunEntryId(?int $endPayRunEntryId): static { - if (is_null($workerGroup)) { - throw new InvalidArgumentException('non-nullable workerGroup cannot be null'); + if (is_null($endPayRunEntryId)) { + array_push($this->openAPINullablesSetToNull, 'endPayRunEntryId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endPayRunEntryId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['workerGroup'] = $workerGroup; + $this->container['endPayRunEntryId'] = $endPayRunEntryId; return $this; } /** - * Gets startDate + * Gets endReason * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\PensionEndReason|null */ - public function getStartDate(): ?\DateTime + public function getEndReason(): ?\SynergiTech\Staffology\Model\PensionEndReason { - return $this->container['startDate']; + return $this->container['endReason']; } /** - * Sets startDate + * Sets endReason * - * @param \DateTime|null $startDate startDate + * @param \SynergiTech\Staffology\Model\PensionEndReason|null $endReason endReason * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setEndReason(?\SynergiTech\Staffology\Model\PensionEndReason $endReason): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($endReason)) { + throw new InvalidArgumentException('non-nullable endReason cannot be null'); } - $this->container['startDate'] = $startDate; + $this->container['endReason'] = $endReason; return $this; } /** - * Gets memberReferenceNumber + * Gets endReportingType * - * @return string|null + * @return \SynergiTech\Staffology\Model\PensionReportingType|null */ - public function getMemberReferenceNumber(): ?string + public function getEndReportingType(): ?\SynergiTech\Staffology\Model\PensionReportingType { - return $this->container['memberReferenceNumber']; + return $this->container['endReportingType']; } /** - * Sets memberReferenceNumber + * Sets endReportingType * - * @param string|null $memberReferenceNumber memberReferenceNumber + * @param \SynergiTech\Staffology\Model\PensionReportingType|null $endReportingType endReportingType * * @return $this */ - public function setMemberReferenceNumber(?string $memberReferenceNumber): static + public function setEndReportingType(?\SynergiTech\Staffology\Model\PensionReportingType $endReportingType): static { - if (is_null($memberReferenceNumber)) { - array_push($this->openAPINullablesSetToNull, 'memberReferenceNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('memberReferenceNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($memberReferenceNumber) && (mb_strlen($memberReferenceNumber) > 25)) { - throw new InvalidArgumentException('invalid length for $memberReferenceNumber when calling Pension., must be smaller than or equal to 25.'); + if (is_null($endReportingType)) { + throw new InvalidArgumentException('non-nullable endReportingType cannot be null'); } - - $this->container['memberReferenceNumber'] = $memberReferenceNumber; + $this->container['endReportingType'] = $endReportingType; return $this; } /** - * Gets overrideContributions + * Gets exitViaProvider * * @return bool|null */ - public function getOverrideContributions(): ?bool + public function getExitViaProvider(): ?bool { - return $this->container['overrideContributions']; + return $this->container['exitViaProvider']; } /** - * Sets overrideContributions + * Sets exitViaProvider * - * @param bool|null $overrideContributions If this is set to true then the Contributions levels set for the WorkerGroup will be replaced with the values provided here + * @param bool|null $exitViaProvider exitViaProvider * * @return $this */ - public function setOverrideContributions(?bool $overrideContributions): static + public function setExitViaProvider(?bool $exitViaProvider): static { - if (is_null($overrideContributions)) { - throw new InvalidArgumentException('non-nullable overrideContributions cannot be null'); + if (is_null($exitViaProvider)) { + throw new InvalidArgumentException('non-nullable exitViaProvider cannot be null'); } - $this->container['overrideContributions'] = $overrideContributions; + $this->container['exitViaProvider'] = $exitViaProvider; return $this; } /** - * Gets employeeContribution + * Gets externalEmployeeId * - * @return float|null + * @return string|null */ - public function getEmployeeContribution(): ?float + public function getExternalEmployeeId(): ?string { - return $this->container['employeeContribution']; + return $this->container['externalEmployeeId']; } /** - * Sets employeeContribution + * Sets externalEmployeeId * - * @param float|null $employeeContribution The amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on EmployeeContributionIsPercentage. This is read-only if OverrideContributions is false + * @param string|null $externalEmployeeId [readonly] * * @return $this */ - public function setEmployeeContribution(?float $employeeContribution): static + public function setExternalEmployeeId(?string $externalEmployeeId): static { - if (is_null($employeeContribution)) { - throw new InvalidArgumentException('non-nullable employeeContribution cannot be null'); + if (is_null($externalEmployeeId)) { + array_push($this->openAPINullablesSetToNull, 'externalEmployeeId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('externalEmployeeId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeeContribution'] = $employeeContribution; + $this->container['externalEmployeeId'] = $externalEmployeeId; return $this; } /** - * Gets employeeContributionIsPercentage + * Gets fiftyFiftySchemeMember * * @return bool|null */ - public function getEmployeeContributionIsPercentage(): ?bool + public function getFiftyFiftySchemeMember(): ?bool { - return $this->container['employeeContributionIsPercentage']; + return $this->container['fiftyFiftySchemeMember']; } /** - * Sets employeeContributionIsPercentage + * Sets fiftyFiftySchemeMember * - * @param bool|null $employeeContributionIsPercentage Determines whether the Value of the EmployeeContribution is a fixed amount or a percentage, + * @param bool|null $fiftyFiftySchemeMember if an employee as a member of the 50/50 LGPS scheme, they can enable contribution to 50% of the normal contributions. * * @return $this */ - public function setEmployeeContributionIsPercentage(?bool $employeeContributionIsPercentage): static + public function setFiftyFiftySchemeMember(?bool $fiftyFiftySchemeMember): static { - if (is_null($employeeContributionIsPercentage)) { - throw new InvalidArgumentException('non-nullable employeeContributionIsPercentage cannot be null'); + if (is_null($fiftyFiftySchemeMember)) { + throw new InvalidArgumentException('non-nullable fiftyFiftySchemeMember cannot be null'); } - $this->container['employeeContributionIsPercentage'] = $employeeContributionIsPercentage; + $this->container['fiftyFiftySchemeMember'] = $fiftyFiftySchemeMember; return $this; } /** - * Gets employerContribution + * Gets forceEnrolment * - * @return float|null + * @return bool|null */ - public function getEmployerContribution(): ?float + public function getForceEnrolment(): ?bool { - return $this->container['employerContribution']; + return $this->container['forceEnrolment']; } /** - * Sets employerContribution + * Sets forceEnrolment * - * @param float|null $employerContribution The amount the employer contributes towards the pension. Could be a percentage or a fixed amount depending on EmployerContributionIsPercentage. This is read-only if OverrideContributions is false + * @param bool|null $forceEnrolment If the PensionScheme is connected to an ExternalDataProvider that supports enrolment then setting this to true will force this employee to be enrolled with the next submission. * * @return $this */ - public function setEmployerContribution(?float $employerContribution): static + public function setForceEnrolment(?bool $forceEnrolment): static { - if (is_null($employerContribution)) { - throw new InvalidArgumentException('non-nullable employerContribution cannot be null'); + if (is_null($forceEnrolment)) { + throw new InvalidArgumentException('non-nullable forceEnrolment cannot be null'); } - $this->container['employerContribution'] = $employerContribution; + $this->container['forceEnrolment'] = $forceEnrolment; return $this; } /** - * Gets employerContributionIsPercentage + * Gets forcedTier * - * @return bool|null + * @return string|null */ - public function getEmployerContributionIsPercentage(): ?bool + public function getForcedTier(): ?string { - return $this->container['employerContributionIsPercentage']; + return $this->container['forcedTier']; } /** - * Sets employerContributionIsPercentage + * Sets forcedTier * - * @param bool|null $employerContributionIsPercentage Determines whether the Value of the EmployerContribution is a fixed amount or a percentage, + * @param string|null $forcedTier If the WorkerGroup ContributionLevelType is a Tiered Scheme then you can specify the name of the tier to force the employee on to. If none is specified then the Tier is determined by the earnings in the period * * @return $this */ - public function setEmployerContributionIsPercentage(?bool $employerContributionIsPercentage): static + public function setForcedTier(?string $forcedTier): static { - if (is_null($employerContributionIsPercentage)) { - throw new InvalidArgumentException('non-nullable employerContributionIsPercentage cannot be null'); + if (is_null($forcedTier)) { + array_push($this->openAPINullablesSetToNull, 'forcedTier'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('forcedTier', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employerContributionIsPercentage'] = $employerContributionIsPercentage; + $this->container['forcedTier'] = $forcedTier; return $this; } /** - * Gets employerContributionTopUpPercentage + * Gets id * - * @return float|null + * @return string|null */ - public function getEmployerContributionTopUpPercentage(): ?float + public function getId(): ?string { - return $this->container['employerContributionTopUpPercentage']; + return $this->container['id']; } /** - * Sets employerContributionTopUpPercentage + * Sets id * - * @param float|null $employerContributionTopUpPercentage Increase Employer Contribution by this percentage of the Employee Contribution + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setEmployerContributionTopUpPercentage(?float $employerContributionTopUpPercentage): static + public function setId(?string $id): static { - if (is_null($employerContributionTopUpPercentage)) { - throw new InvalidArgumentException('non-nullable employerContributionTopUpPercentage cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['employerContributionTopUpPercentage'] = $employerContributionTopUpPercentage; + $this->container['id'] = $id; return $this; } @@ -1308,373 +1300,381 @@ public function setIsTeachersPension(?bool $isTeachersPension): static } /** - * Gets aeStatusAtJoining + * Gets joinReason * - * @return \SynergiTech\Staffology\Model\AeStatus|null + * @return \SynergiTech\Staffology\Model\PensionJoinReason|null */ - public function getAeStatusAtJoining(): ?\SynergiTech\Staffology\Model\AeStatus + public function getJoinReason(): ?\SynergiTech\Staffology\Model\PensionJoinReason { - return $this->container['aeStatusAtJoining']; + return $this->container['joinReason']; } /** - * Sets aeStatusAtJoining + * Sets joinReason * - * @param \SynergiTech\Staffology\Model\AeStatus|null $aeStatusAtJoining aeStatusAtJoining + * @param \SynergiTech\Staffology\Model\PensionJoinReason|null $joinReason joinReason * * @return $this */ - public function setAeStatusAtJoining(?\SynergiTech\Staffology\Model\AeStatus $aeStatusAtJoining): static + public function setJoinReason(?\SynergiTech\Staffology\Model\PensionJoinReason $joinReason): static { - if (is_null($aeStatusAtJoining)) { - throw new InvalidArgumentException('non-nullable aeStatusAtJoining cannot be null'); + if (is_null($joinReason)) { + throw new InvalidArgumentException('non-nullable joinReason cannot be null'); } - $this->container['aeStatusAtJoining'] = $aeStatusAtJoining; + $this->container['joinReason'] = $joinReason; return $this; } /** - * Gets externalEmployeeId + * Gets memberReferenceNumber * * @return string|null */ - public function getExternalEmployeeId(): ?string + public function getMemberReferenceNumber(): ?string { - return $this->container['externalEmployeeId']; + return $this->container['memberReferenceNumber']; } /** - * Sets externalEmployeeId + * Sets memberReferenceNumber * - * @param string|null $externalEmployeeId [readonly] + * @param string|null $memberReferenceNumber memberReferenceNumber * * @return $this */ - public function setExternalEmployeeId(?string $externalEmployeeId): static + public function setMemberReferenceNumber(?string $memberReferenceNumber): static { - if (is_null($externalEmployeeId)) { - array_push($this->openAPINullablesSetToNull, 'externalEmployeeId'); + if (is_null($memberReferenceNumber)) { + array_push($this->openAPINullablesSetToNull, 'memberReferenceNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('externalEmployeeId', $nullablesSetToNull); + $index = array_search('memberReferenceNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['externalEmployeeId'] = $externalEmployeeId; + if (!is_null($memberReferenceNumber) && (mb_strlen($memberReferenceNumber) > 25)) { + throw new InvalidArgumentException('invalid length for $memberReferenceNumber when calling Pension., must be smaller than or equal to 25.'); + } + + $this->container['memberReferenceNumber'] = $memberReferenceNumber; return $this; } /** - * Gets additionalVoluntaryContribution + * Gets overrideContributions * - * @return float|null + * @return bool|null */ - public function getAdditionalVoluntaryContribution(): ?float + public function getOverrideContributions(): ?bool { - return $this->container['additionalVoluntaryContribution']; + return $this->container['overrideContributions']; } /** - * Sets additionalVoluntaryContribution + * Sets overrideContributions * - * @param float|null $additionalVoluntaryContribution Any additional voluntary amount the employer contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. + * @param bool|null $overrideContributions If this is set to true then the Contributions levels set for the WorkerGroup will be replaced with the values provided here * * @return $this */ - public function setAdditionalVoluntaryContribution(?float $additionalVoluntaryContribution): static + public function setOverrideContributions(?bool $overrideContributions): static { - if (is_null($additionalVoluntaryContribution)) { - throw new InvalidArgumentException('non-nullable additionalVoluntaryContribution cannot be null'); + if (is_null($overrideContributions)) { + throw new InvalidArgumentException('non-nullable overrideContributions cannot be null'); } - $this->container['additionalVoluntaryContribution'] = $additionalVoluntaryContribution; + $this->container['overrideContributions'] = $overrideContributions; return $this; } /** - * Gets avcIsPercentage + * Gets pensionOpeningBalances * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PensionOpeningBalances|null */ - public function getAvcIsPercentage(): ?bool + public function getPensionOpeningBalances(): ?\SynergiTech\Staffology\Model\PensionOpeningBalances { - return $this->container['avcIsPercentage']; + return $this->container['pensionOpeningBalances']; } /** - * Sets avcIsPercentage + * Sets pensionOpeningBalances * - * @param bool|null $avcIsPercentage Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, + * @param \SynergiTech\Staffology\Model\PensionOpeningBalances|null $pensionOpeningBalances pensionOpeningBalances * * @return $this */ - public function setAvcIsPercentage(?bool $avcIsPercentage): static + public function setPensionOpeningBalances(?\SynergiTech\Staffology\Model\PensionOpeningBalances $pensionOpeningBalances): static { - if (is_null($avcIsPercentage)) { - throw new InvalidArgumentException('non-nullable avcIsPercentage cannot be null'); + if (is_null($pensionOpeningBalances)) { + throw new InvalidArgumentException('non-nullable pensionOpeningBalances cannot be null'); } - $this->container['avcIsPercentage'] = $avcIsPercentage; + $this->container['pensionOpeningBalances'] = $pensionOpeningBalances; return $this; } /** - * Gets exitViaProvider + * Gets pensionScheme * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PensionScheme|null */ - public function getExitViaProvider(): ?bool + public function getPensionScheme(): ?\SynergiTech\Staffology\Model\PensionScheme { - return $this->container['exitViaProvider']; + return $this->container['pensionScheme']; } /** - * Sets exitViaProvider + * Sets pensionScheme * - * @param bool|null $exitViaProvider exitViaProvider + * @param \SynergiTech\Staffology\Model\PensionScheme|null $pensionScheme pensionScheme * * @return $this */ - public function setExitViaProvider(?bool $exitViaProvider): static + public function setPensionScheme(?\SynergiTech\Staffology\Model\PensionScheme $pensionScheme): static { - if (is_null($exitViaProvider)) { - throw new InvalidArgumentException('non-nullable exitViaProvider cannot be null'); + if (is_null($pensionScheme)) { + throw new InvalidArgumentException('non-nullable pensionScheme cannot be null'); } - $this->container['exitViaProvider'] = $exitViaProvider; + $this->container['pensionScheme'] = $pensionScheme; return $this; } /** - * Gets teachersPensionDetails + * Gets pensionSchemeId * - * @return \SynergiTech\Staffology\Model\TeachersPensionDetails|null + * @return string|null */ - public function getTeachersPensionDetails(): ?\SynergiTech\Staffology\Model\TeachersPensionDetails + public function getPensionSchemeId(): ?string { - return $this->container['teachersPensionDetails']; + return $this->container['pensionSchemeId']; } /** - * Sets teachersPensionDetails + * Sets pensionSchemeId * - * @param \SynergiTech\Staffology\Model\TeachersPensionDetails|null $teachersPensionDetails teachersPensionDetails + * @param string|null $pensionSchemeId pensionSchemeId * * @return $this */ - public function setTeachersPensionDetails(?\SynergiTech\Staffology\Model\TeachersPensionDetails $teachersPensionDetails): static + public function setPensionSchemeId(?string $pensionSchemeId): static { - if (is_null($teachersPensionDetails)) { - throw new InvalidArgumentException('non-nullable teachersPensionDetails cannot be null'); + if (is_null($pensionSchemeId)) { + throw new InvalidArgumentException('non-nullable pensionSchemeId cannot be null'); } - $this->container['teachersPensionDetails'] = $teachersPensionDetails; + $this->container['pensionSchemeId'] = $pensionSchemeId; return $this; } /** - * Gets forcedTier + * Gets reasonForLeaving * * @return string|null */ - public function getForcedTier(): ?string + public function getReasonForLeaving(): ?string { - return $this->container['forcedTier']; + return $this->container['reasonForLeaving']; } /** - * Sets forcedTier + * Sets reasonForLeaving * - * @param string|null $forcedTier If the WorkerGroup ContributionLevelType is a Tiered Scheme then you can specify the name of the tier to force the employee on to. If none is specified then the Tier is determined by the earnings in the period + * @param string|null $reasonForLeaving If a value is provided for EndDate then this is the reason for leaving the employee left the scheme * * @return $this */ - public function setForcedTier(?string $forcedTier): static + public function setReasonForLeaving(?string $reasonForLeaving): static { - if (is_null($forcedTier)) { - array_push($this->openAPINullablesSetToNull, 'forcedTier'); + if (is_null($reasonForLeaving)) { + array_push($this->openAPINullablesSetToNull, 'reasonForLeaving'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('forcedTier', $nullablesSetToNull); + $index = array_search('reasonForLeaving', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['forcedTier'] = $forcedTier; + if (!is_null($reasonForLeaving) && (mb_strlen($reasonForLeaving) > 100)) { + throw new InvalidArgumentException('invalid length for $reasonForLeaving when calling Pension., must be smaller than or equal to 100.'); + } + + $this->container['reasonForLeaving'] = $reasonForLeaving; return $this; } /** - * Gets forceEnrolment + * Gets startDate * - * @return bool|null + * @return \DateTime|null */ - public function getForceEnrolment(): ?bool + public function getStartDate(): ?\DateTime { - return $this->container['forceEnrolment']; + return $this->container['startDate']; } /** - * Sets forceEnrolment + * Sets startDate * - * @param bool|null $forceEnrolment If the PensionScheme is connected to an ExternalDataProvider that supports enrolment then setting this to true will force this employee to be enrolled with the next submission. + * @param \DateTime|null $startDate startDate * * @return $this */ - public function setForceEnrolment(?bool $forceEnrolment): static + public function setStartDate(?\DateTime $startDate): static { - if (is_null($forceEnrolment)) { - throw new InvalidArgumentException('non-nullable forceEnrolment cannot be null'); + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); } - $this->container['forceEnrolment'] = $forceEnrolment; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets employerContributionIncludesNiSaving + * Gets startPayRunEntryId * - * @return bool|null + * @return int|null */ - public function getEmployerContributionIncludesNiSaving(): ?bool + public function getStartPayRunEntryId(): ?int { - return $this->container['employerContributionIncludesNiSaving']; + return $this->container['startPayRunEntryId']; } /** - * Sets employerContributionIncludesNiSaving + * Sets startPayRunEntryId * - * @param bool|null $employerContributionIncludesNiSaving Employer Contribution includes the Employers NI saving + * @param int|null $startPayRunEntryId [readonly] Holds the Id for the payroll that the employee joined the scheme * * @return $this */ - public function setEmployerContributionIncludesNiSaving(?bool $employerContributionIncludesNiSaving): static + public function setStartPayRunEntryId(?int $startPayRunEntryId): static { - if (is_null($employerContributionIncludesNiSaving)) { - throw new InvalidArgumentException('non-nullable employerContributionIncludesNiSaving cannot be null'); + if (is_null($startPayRunEntryId)) { + array_push($this->openAPINullablesSetToNull, 'startPayRunEntryId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPayRunEntryId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employerContributionIncludesNiSaving'] = $employerContributionIncludesNiSaving; + $this->container['startPayRunEntryId'] = $startPayRunEntryId; return $this; } /** - * Gets employerContributionNiSavingPercentage + * Gets startReportingType * - * @return float|null + * @return \SynergiTech\Staffology\Model\PensionReportingType|null */ - public function getEmployerContributionNiSavingPercentage(): ?float + public function getStartReportingType(): ?\SynergiTech\Staffology\Model\PensionReportingType { - return $this->container['employerContributionNiSavingPercentage']; + return $this->container['startReportingType']; } /** - * Sets employerContributionNiSavingPercentage + * Sets startReportingType * - * @param float|null $employerContributionNiSavingPercentage Increase Employer Contribution by this percentage of the Employers NI saving + * @param \SynergiTech\Staffology\Model\PensionReportingType|null $startReportingType startReportingType * * @return $this */ - public function setEmployerContributionNiSavingPercentage(?float $employerContributionNiSavingPercentage): static + public function setStartReportingType(?\SynergiTech\Staffology\Model\PensionReportingType $startReportingType): static { - if (is_null($employerContributionNiSavingPercentage)) { - throw new InvalidArgumentException('non-nullable employerContributionNiSavingPercentage cannot be null'); + if (is_null($startReportingType)) { + throw new InvalidArgumentException('non-nullable startReportingType cannot be null'); } - $this->container['employerContributionNiSavingPercentage'] = $employerContributionNiSavingPercentage; + $this->container['startReportingType'] = $startReportingType; return $this; } /** - * Gets fiftyFiftySchemeMember + * Gets teachersPensionDetails * - * @return bool|null + * @return \SynergiTech\Staffology\Model\TeachersPensionDetails|null */ - public function getFiftyFiftySchemeMember(): ?bool + public function getTeachersPensionDetails(): ?\SynergiTech\Staffology\Model\TeachersPensionDetails { - return $this->container['fiftyFiftySchemeMember']; + return $this->container['teachersPensionDetails']; } /** - * Sets fiftyFiftySchemeMember + * Sets teachersPensionDetails * - * @param bool|null $fiftyFiftySchemeMember if an employee as a member of the 50/50 LGPS scheme, they can enable contribution to 50% of the normal contributions. + * @param \SynergiTech\Staffology\Model\TeachersPensionDetails|null $teachersPensionDetails teachersPensionDetails * * @return $this */ - public function setFiftyFiftySchemeMember(?bool $fiftyFiftySchemeMember): static + public function setTeachersPensionDetails(?\SynergiTech\Staffology\Model\TeachersPensionDetails $teachersPensionDetails): static { - if (is_null($fiftyFiftySchemeMember)) { - throw new InvalidArgumentException('non-nullable fiftyFiftySchemeMember cannot be null'); + if (is_null($teachersPensionDetails)) { + throw new InvalidArgumentException('non-nullable teachersPensionDetails cannot be null'); } - $this->container['fiftyFiftySchemeMember'] = $fiftyFiftySchemeMember; + $this->container['teachersPensionDetails'] = $teachersPensionDetails; return $this; } /** - * Gets associatedEmployeeRoles + * Gets workerGroup * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return \SynergiTech\Staffology\Model\WorkerGroup|null */ - public function getAssociatedEmployeeRoles(): ?array + public function getWorkerGroup(): ?\SynergiTech\Staffology\Model\WorkerGroup { - return $this->container['associatedEmployeeRoles']; + return $this->container['workerGroup']; } /** - * Sets associatedEmployeeRoles + * Sets workerGroup * - * @param \SynergiTech\Staffology\Model\Item[]|null $associatedEmployeeRoles The list of employee roles associated with the pension membership + * @param \SynergiTech\Staffology\Model\WorkerGroup|null $workerGroup workerGroup * * @return $this */ - public function setAssociatedEmployeeRoles(?array $associatedEmployeeRoles): static + public function setWorkerGroup(?\SynergiTech\Staffology\Model\WorkerGroup $workerGroup): static { - if (is_null($associatedEmployeeRoles)) { - array_push($this->openAPINullablesSetToNull, 'associatedEmployeeRoles'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('associatedEmployeeRoles', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($workerGroup)) { + throw new InvalidArgumentException('non-nullable workerGroup cannot be null'); } - $this->container['associatedEmployeeRoles'] = $associatedEmployeeRoles; + $this->container['workerGroup'] = $workerGroup; return $this; } /** - * Gets autoEnrolled + * Gets workerGroupId * - * @return bool|null + * @return string|null */ - public function getAutoEnrolled(): ?bool + public function getWorkerGroupId(): ?string { - return $this->container['autoEnrolled']; + return $this->container['workerGroupId']; } /** - * Sets autoEnrolled + * Sets workerGroupId * - * @param bool|null $autoEnrolled [readonly] Is True if the employee joined this Pension due to an AutoEnrolment action + * @param string|null $workerGroupId workerGroupId * * @return $this */ - public function setAutoEnrolled(?bool $autoEnrolled): static + public function setWorkerGroupId(?string $workerGroupId): static { - if (is_null($autoEnrolled)) { - throw new InvalidArgumentException('non-nullable autoEnrolled cannot be null'); + if (is_null($workerGroupId)) { + throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); } - $this->container['autoEnrolled'] = $autoEnrolled; + $this->container['workerGroupId'] = $workerGroupId; return $this; } diff --git a/src/Model/PensionAdministrator.php b/src/Model/PensionAdministrator.php index bfdd2e0..63c12c9 100644 --- a/src/Model/PensionAdministrator.php +++ b/src/Model/PensionAdministrator.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class PensionAdministrator implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', - 'email' => 'string', 'address' => '\SynergiTech\Staffology\Model\Address', - 'telephone' => 'string', - 'id' => 'string' + 'email' => 'string', + 'id' => 'string', + 'name' => 'string', + 'telephone' => 'string' ]; /** @@ -72,11 +72,11 @@ class PensionAdministrator implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPIFormats = [ - 'name' => null, - 'email' => null, 'address' => null, - 'telephone' => null, - 'id' => 'uuid' + 'email' => null, + 'id' => 'uuid', + 'name' => null, + 'telephone' => null ]; /** @@ -85,11 +85,11 @@ class PensionAdministrator implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPINullables = [ - 'name' => true, - 'email' => true, 'address' => false, - 'telephone' => true, - 'id' => false + 'email' => true, + 'id' => false, + 'name' => true, + 'telephone' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', - 'email' => 'email', 'address' => 'address', - 'telephone' => 'telephone', - 'id' => 'id' + 'email' => 'email', + 'id' => 'id', + 'name' => 'name', + 'telephone' => 'telephone' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', - 'email' => 'setEmail', 'address' => 'setAddress', - 'telephone' => 'setTelephone', - 'id' => 'setId' + 'email' => 'setEmail', + 'id' => 'setId', + 'name' => 'setName', + 'telephone' => 'setTelephone' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', - 'email' => 'getEmail', 'address' => 'getAddress', - 'telephone' => 'getTelephone', - 'id' => 'getId' + 'email' => 'getEmail', + 'id' => 'getId', + 'name' => 'getName', + 'telephone' => 'getTelephone' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('email', $data ?? [], null); $this->setIfExists('address', $data ?? [], null); - $this->setIfExists('telephone', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('telephone', $data ?? [], null); } /** @@ -301,14 +301,14 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 150)) { - $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 150."; - } - if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) > 150)) { $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 150."; } + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 150)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 150."; + } + if (!is_null($this->container['telephone']) && (mb_strlen($this->container['telephone']) > 100)) { $invalidProperties[] = "invalid value for 'telephone', the character length must be smaller than or equal to 100."; } @@ -329,39 +329,28 @@ public function valid(): bool /** - * Gets name + * Gets address * - * @return string|null + * @return \SynergiTech\Staffology\Model\Address|null */ - public function getName(): ?string + public function getAddress(): ?\SynergiTech\Staffology\Model\Address { - return $this->container['name']; + return $this->container['address']; } /** - * Sets name + * Sets address * - * @param string|null $name name + * @param \SynergiTech\Staffology\Model\Address|null $address address * * @return $this */ - public function setName(?string $name): static + public function setAddress(?\SynergiTech\Staffology\Model\Address $address): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($name) && (mb_strlen($name) > 150)) { - throw new InvalidArgumentException('invalid length for $name when calling PensionAdministrator., must be smaller than or equal to 150.'); + if (is_null($address)) { + throw new InvalidArgumentException('non-nullable address cannot be null'); } - - $this->container['name'] = $name; + $this->container['address'] = $address; return $this; } @@ -405,93 +394,104 @@ public function setEmail(?string $email): static } /** - * Gets address + * Gets id * - * @return \SynergiTech\Staffology\Model\Address|null + * @return string|null */ - public function getAddress(): ?\SynergiTech\Staffology\Model\Address + public function getId(): ?string { - return $this->container['address']; + return $this->container['id']; } /** - * Sets address + * Sets id * - * @param \SynergiTech\Staffology\Model\Address|null $address address + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setAddress(?\SynergiTech\Staffology\Model\Address $address): static + public function setId(?string $id): static { - if (is_null($address)) { - throw new InvalidArgumentException('non-nullable address cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['address'] = $address; + $this->container['id'] = $id; return $this; } /** - * Gets telephone + * Gets name * * @return string|null */ - public function getTelephone(): ?string + public function getName(): ?string { - return $this->container['telephone']; + return $this->container['name']; } /** - * Sets telephone + * Sets name * - * @param string|null $telephone telephone + * @param string|null $name name * * @return $this */ - public function setTelephone(?string $telephone): static + public function setName(?string $name): static { - if (is_null($telephone)) { - array_push($this->openAPINullablesSetToNull, 'telephone'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('telephone', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($telephone) && (mb_strlen($telephone) > 100)) { - throw new InvalidArgumentException('invalid length for $telephone when calling PensionAdministrator., must be smaller than or equal to 100.'); + if (!is_null($name) && (mb_strlen($name) > 150)) { + throw new InvalidArgumentException('invalid length for $name when calling PensionAdministrator., must be smaller than or equal to 150.'); } - $this->container['telephone'] = $telephone; + $this->container['name'] = $name; return $this; } /** - * Gets id + * Gets telephone * * @return string|null */ - public function getId(): ?string + public function getTelephone(): ?string { - return $this->container['id']; + return $this->container['telephone']; } /** - * Sets id + * Sets telephone * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $telephone telephone * * @return $this */ - public function setId(?string $id): static + public function setTelephone(?string $telephone): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($telephone)) { + array_push($this->openAPINullablesSetToNull, 'telephone'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('telephone', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + if (!is_null($telephone) && (mb_strlen($telephone) > 100)) { + throw new InvalidArgumentException('invalid length for $telephone when calling PensionAdministrator., must be smaller than or equal to 100.'); + } + + $this->container['telephone'] = $telephone; return $this; } diff --git a/src/Model/PensionContributionLevelType.php b/src/Model/PensionContributionLevelType.php index 188058b..4a99bd2 100644 --- a/src/Model/PensionContributionLevelType.php +++ b/src/Model/PensionContributionLevelType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PensionContributionsSubmission.php b/src/Model/PensionContributionsSubmission.php index 7ea78d4..8006d4a 100644 --- a/src/Model/PensionContributionsSubmission.php +++ b/src/Model/PensionContributionsSubmission.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -61,17 +61,17 @@ class PensionContributionsSubmission implements ModelInterface, ArrayAccess, Jso */ protected static array $openAPITypes = [ 'employerId' => 'int', - 'payRunId' => 'int', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'externalId' => 'string', + 'id' => 'string', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'payRunId' => 'int', 'period' => 'int', - 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'schemeId' => 'int', 'status' => '\SynergiTech\Staffology\Model\BackgroundTaskStatus', - 'externalId' => 'string', 'statusMessage' => 'string', 'submissionData' => 'mixed', - 'id' => 'string' + 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear' ]; /** @@ -81,17 +81,17 @@ class PensionContributionsSubmission implements ModelInterface, ArrayAccess, Jso */ protected static array $openAPIFormats = [ 'employerId' => 'int32', - 'payRunId' => 'int32', - 'payPeriod' => null, + 'externalId' => null, + 'id' => 'uuid', 'ordinal' => 'int32', + 'payPeriod' => null, + 'payRunId' => 'int32', 'period' => 'int32', - 'taxYear' => null, 'schemeId' => 'int32', 'status' => null, - 'externalId' => null, 'statusMessage' => null, 'submissionData' => null, - 'id' => 'uuid' + 'taxYear' => null ]; /** @@ -101,17 +101,17 @@ class PensionContributionsSubmission implements ModelInterface, ArrayAccess, Jso */ protected static array $openAPINullables = [ 'employerId' => false, - 'payRunId' => false, - 'payPeriod' => false, + 'externalId' => true, + 'id' => false, 'ordinal' => false, + 'payPeriod' => false, + 'payRunId' => false, 'period' => false, - 'taxYear' => false, 'schemeId' => false, 'status' => false, - 'externalId' => true, 'statusMessage' => true, 'submissionData' => true, - 'id' => false + 'taxYear' => false ]; /** @@ -201,17 +201,17 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'employerId' => 'employerId', - 'payRunId' => 'payRunId', - 'payPeriod' => 'payPeriod', + 'externalId' => 'externalId', + 'id' => 'id', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', + 'payRunId' => 'payRunId', 'period' => 'period', - 'taxYear' => 'taxYear', 'schemeId' => 'schemeId', 'status' => 'status', - 'externalId' => 'externalId', 'statusMessage' => 'statusMessage', 'submissionData' => 'submissionData', - 'id' => 'id' + 'taxYear' => 'taxYear' ]; /** @@ -221,17 +221,17 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'employerId' => 'setEmployerId', - 'payRunId' => 'setPayRunId', - 'payPeriod' => 'setPayPeriod', + 'externalId' => 'setExternalId', + 'id' => 'setId', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', + 'payRunId' => 'setPayRunId', 'period' => 'setPeriod', - 'taxYear' => 'setTaxYear', 'schemeId' => 'setSchemeId', 'status' => 'setStatus', - 'externalId' => 'setExternalId', 'statusMessage' => 'setStatusMessage', 'submissionData' => 'setSubmissionData', - 'id' => 'setId' + 'taxYear' => 'setTaxYear' ]; /** @@ -241,17 +241,17 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'employerId' => 'getEmployerId', - 'payRunId' => 'getPayRunId', - 'payPeriod' => 'getPayPeriod', + 'externalId' => 'getExternalId', + 'id' => 'getId', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', + 'payRunId' => 'getPayRunId', 'period' => 'getPeriod', - 'taxYear' => 'getTaxYear', 'schemeId' => 'getSchemeId', 'status' => 'getStatus', - 'externalId' => 'getExternalId', 'statusMessage' => 'getStatusMessage', 'submissionData' => 'getSubmissionData', - 'id' => 'getId' + 'taxYear' => 'getTaxYear' ]; /** @@ -311,17 +311,17 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('employerId', $data ?? [], null); - $this->setIfExists('payRunId', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('externalId', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('payRunId', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); - $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('schemeId', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); - $this->setIfExists('externalId', $data ?? [], null); $this->setIfExists('statusMessage', $data ?? [], null); $this->setIfExists('submissionData', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); } /** @@ -394,55 +394,62 @@ public function setEmployerId(?int $employerId): static } /** - * Gets payRunId + * Gets externalId * - * @return int|null + * @return string|null */ - public function getPayRunId(): ?int + public function getExternalId(): ?string { - return $this->container['payRunId']; + return $this->container['externalId']; } /** - * Sets payRunId + * Sets externalId * - * @param int|null $payRunId payRunId + * @param string|null $externalId externalId * * @return $this */ - public function setPayRunId(?int $payRunId): static + public function setExternalId(?string $externalId): static { - if (is_null($payRunId)) { - throw new InvalidArgumentException('non-nullable payRunId cannot be null'); + if (is_null($externalId)) { + array_push($this->openAPINullablesSetToNull, 'externalId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('externalId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payRunId'] = $payRunId; + $this->container['externalId'] = $externalId; return $this; } /** - * Gets payPeriod + * Gets id * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return string|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getId(): ?string { - return $this->container['payPeriod']; + return $this->container['id']; } /** - * Sets payPeriod + * Sets id * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setId(?string $id): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['payPeriod'] = $payPeriod; + $this->container['id'] = $id; return $this; } @@ -475,55 +482,82 @@ public function setOrdinal(?int $ordinal): static } /** - * Gets period + * Gets payPeriod + * + * @return \SynergiTech\Staffology\Model\PayPeriods|null + */ + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + { + return $this->container['payPeriod']; + } + + /** + * Sets payPeriod + * + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * + * @return $this + */ + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + { + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + } + $this->container['payPeriod'] = $payPeriod; + + return $this; + } + + /** + * Gets payRunId * * @return int|null */ - public function getPeriod(): ?int + public function getPayRunId(): ?int { - return $this->container['period']; + return $this->container['payRunId']; } /** - * Sets period + * Sets payRunId * - * @param int|null $period period + * @param int|null $payRunId payRunId * * @return $this */ - public function setPeriod(?int $period): static + public function setPayRunId(?int $payRunId): static { - if (is_null($period)) { - throw new InvalidArgumentException('non-nullable period cannot be null'); + if (is_null($payRunId)) { + throw new InvalidArgumentException('non-nullable payRunId cannot be null'); } - $this->container['period'] = $period; + $this->container['payRunId'] = $payRunId; return $this; } /** - * Gets taxYear + * Gets period * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return int|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getPeriod(): ?int { - return $this->container['taxYear']; + return $this->container['period']; } /** - * Sets taxYear + * Sets period * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param int|null $period period * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setPeriod(?int $period): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($period)) { + throw new InvalidArgumentException('non-nullable period cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['period'] = $period; return $this; } @@ -582,40 +616,6 @@ public function setStatus(?\SynergiTech\Staffology\Model\BackgroundTaskStatus $s return $this; } - /** - * Gets externalId - * - * @return string|null - */ - public function getExternalId(): ?string - { - return $this->container['externalId']; - } - - /** - * Sets externalId - * - * @param string|null $externalId externalId - * - * @return $this - */ - public function setExternalId(?string $externalId): static - { - if (is_null($externalId)) { - array_push($this->openAPINullablesSetToNull, 'externalId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('externalId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['externalId'] = $externalId; - - return $this; - } - /** * Gets statusMessage * @@ -685,28 +685,28 @@ public function setSubmissionData(mixed $submissionData): static } /** - * Gets id + * Gets taxYear * - * @return string|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getId(): ?string + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['id']; + return $this->container['taxYear']; } /** - * Sets id + * Sets taxYear * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setId(?string $id): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['id'] = $id; + $this->container['taxYear'] = $taxYear; return $this; } diff --git a/src/Model/PensionCsvFormat.php b/src/Model/PensionCsvFormat.php index 1756c0d..7d971e5 100644 --- a/src/Model/PensionCsvFormat.php +++ b/src/Model/PensionCsvFormat.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -86,6 +86,8 @@ enum PensionCsvFormat: string case TRUE_POTENTIAL = 'TruePotential'; case TRUE_POTENTIAL_ENROLMENT = 'TruePotentialEnrolment'; + + case AEGON_SMART_ENROL = 'AegonSmartEnrol'; } diff --git a/src/Model/PensionEndReason.php b/src/Model/PensionEndReason.php index 1a45443..2e7d1dd 100644 --- a/src/Model/PensionEndReason.php +++ b/src/Model/PensionEndReason.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PensionInitialEnrolmentType.php b/src/Model/PensionInitialEnrolmentType.php new file mode 100644 index 0000000..c1dec69 --- /dev/null +++ b/src/Model/PensionInitialEnrolmentType.php @@ -0,0 +1,47 @@ + */ protected static array $openAPITypes = [ - 'payrollCode' => 'string', - 'pensionScheme' => 'string', - 'workerGroup' => 'string', - 'joinDate' => 'string', - 'joinReason' => '\SynergiTech\Staffology\Model\PensionJoinReason', - 'isPensionJoinerActionReported' => 'bool', + 'aeStatusAtJoining' => '\SynergiTech\Staffology\Model\AeStatus', + 'assumedPensionablePayYTD' => 'float', + 'avcPensionYTD' => 'float', + 'department' => 'string', + 'employee' => '\SynergiTech\Staffology\Model\Item', + 'employeePensionYTD' => 'float', + 'employerPensionYTD' => 'float', 'endDate' => 'string', 'endReason' => '\SynergiTech\Staffology\Model\PensionEndReason', - 'isPensionLeaverActionReported' => 'bool', - 'aeStatusAtJoining' => '\SynergiTech\Staffology\Model\AeStatus', - 'roleRefs' => 'string', - 'pensionEmployeeContribution' => 'float', - 'isEmployeeContributionPercentage' => 'bool', - 'pensionTiers' => 'string', - 'pensionAVCContribution' => 'float', 'isAvcPercentage' => 'bool', - 'pensionEmployerContribution' => 'float', + 'isEmployeeContributionPercentage' => 'bool', 'isEmployerContributionPercentage' => 'bool', - 'pensionMembershipNo' => 'string', + 'isHalfContributionMember' => 'bool', + 'isPensionJoinerActionReported' => 'bool', + 'isPensionLeaverActionReported' => 'bool', + 'joinDate' => 'string', + 'joinReason' => '\SynergiTech\Staffology\Model\PensionJoinReason', 'mcrRoleID1' => 'string', 'mcrRoleID2' => 'string', - 'isHalfContributionMember' => 'bool', - 'tpAdminNino' => 'string', + 'payrollCode' => 'string', + 'pensionAVCContribution' => 'float', + 'pensionEmployeeContribution' => 'float', + 'pensionEmployerContribution' => 'float', + 'pensionId' => 'string', + 'pensionMembershipNo' => 'string', + 'pensionScheme' => 'string', + 'pensionTiers' => 'string', 'pensionableEarningsYTD' => 'float', 'pensionablePayYTD' => 'float', - 'employeePensionYTD' => 'float', - 'avcPensionYTD' => 'float', - 'employerPensionYTD' => 'float', - 'assumedPensionablePayYTD' => 'float', 'reasonForLeaving' => 'string', - 'pensionId' => 'string', - 'employee' => '\SynergiTech\Staffology\Model\Item', - 'department' => 'string' + 'roleRefs' => 'string', + 'tpAdminNino' => 'string', + 'workerGroup' => 'string' ]; /** @@ -100,39 +100,39 @@ class PensionMembershipReportLine implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPIFormats = [ - 'payrollCode' => null, - 'pensionScheme' => null, - 'workerGroup' => null, - 'joinDate' => null, - 'joinReason' => null, - 'isPensionJoinerActionReported' => null, + 'aeStatusAtJoining' => null, + 'assumedPensionablePayYTD' => 'double', + 'avcPensionYTD' => 'double', + 'department' => null, + 'employee' => null, + 'employeePensionYTD' => 'double', + 'employerPensionYTD' => 'double', 'endDate' => null, 'endReason' => null, - 'isPensionLeaverActionReported' => null, - 'aeStatusAtJoining' => null, - 'roleRefs' => null, - 'pensionEmployeeContribution' => 'double', - 'isEmployeeContributionPercentage' => null, - 'pensionTiers' => null, - 'pensionAVCContribution' => 'double', 'isAvcPercentage' => null, - 'pensionEmployerContribution' => 'double', + 'isEmployeeContributionPercentage' => null, 'isEmployerContributionPercentage' => null, - 'pensionMembershipNo' => null, + 'isHalfContributionMember' => null, + 'isPensionJoinerActionReported' => null, + 'isPensionLeaverActionReported' => null, + 'joinDate' => null, + 'joinReason' => null, 'mcrRoleID1' => null, 'mcrRoleID2' => null, - 'isHalfContributionMember' => null, - 'tpAdminNino' => null, + 'payrollCode' => null, + 'pensionAVCContribution' => 'double', + 'pensionEmployeeContribution' => 'double', + 'pensionEmployerContribution' => 'double', + 'pensionId' => 'uuid', + 'pensionMembershipNo' => null, + 'pensionScheme' => null, + 'pensionTiers' => null, 'pensionableEarningsYTD' => 'double', 'pensionablePayYTD' => 'double', - 'employeePensionYTD' => 'double', - 'avcPensionYTD' => 'double', - 'employerPensionYTD' => 'double', - 'assumedPensionablePayYTD' => 'double', 'reasonForLeaving' => null, - 'pensionId' => 'uuid', - 'employee' => null, - 'department' => null + 'roleRefs' => null, + 'tpAdminNino' => null, + 'workerGroup' => null ]; /** @@ -141,39 +141,39 @@ class PensionMembershipReportLine implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPINullables = [ - 'payrollCode' => true, - 'pensionScheme' => true, - 'workerGroup' => true, - 'joinDate' => true, - 'joinReason' => false, - 'isPensionJoinerActionReported' => false, + 'aeStatusAtJoining' => false, + 'assumedPensionablePayYTD' => true, + 'avcPensionYTD' => true, + 'department' => true, + 'employee' => false, + 'employeePensionYTD' => true, + 'employerPensionYTD' => true, 'endDate' => true, 'endReason' => false, - 'isPensionLeaverActionReported' => true, - 'aeStatusAtJoining' => false, - 'roleRefs' => true, - 'pensionEmployeeContribution' => true, - 'isEmployeeContributionPercentage' => false, - 'pensionTiers' => true, - 'pensionAVCContribution' => true, 'isAvcPercentage' => false, - 'pensionEmployerContribution' => true, + 'isEmployeeContributionPercentage' => false, 'isEmployerContributionPercentage' => false, - 'pensionMembershipNo' => true, + 'isHalfContributionMember' => true, + 'isPensionJoinerActionReported' => false, + 'isPensionLeaverActionReported' => true, + 'joinDate' => true, + 'joinReason' => false, 'mcrRoleID1' => true, 'mcrRoleID2' => true, - 'isHalfContributionMember' => true, - 'tpAdminNino' => true, + 'payrollCode' => true, + 'pensionAVCContribution' => true, + 'pensionEmployeeContribution' => true, + 'pensionEmployerContribution' => true, + 'pensionId' => false, + 'pensionMembershipNo' => true, + 'pensionScheme' => true, + 'pensionTiers' => true, 'pensionableEarningsYTD' => true, 'pensionablePayYTD' => true, - 'employeePensionYTD' => true, - 'avcPensionYTD' => true, - 'employerPensionYTD' => true, - 'assumedPensionablePayYTD' => true, 'reasonForLeaving' => true, - 'pensionId' => false, - 'employee' => false, - 'department' => true + 'roleRefs' => true, + 'tpAdminNino' => true, + 'workerGroup' => true ]; /** @@ -262,39 +262,39 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollCode' => 'payrollCode', - 'pensionScheme' => 'pensionScheme', - 'workerGroup' => 'workerGroup', - 'joinDate' => 'joinDate', - 'joinReason' => 'joinReason', - 'isPensionJoinerActionReported' => 'isPensionJoinerActionReported', + 'aeStatusAtJoining' => 'aeStatusAtJoining', + 'assumedPensionablePayYTD' => 'assumedPensionablePayYTD', + 'avcPensionYTD' => 'avcPensionYTD', + 'department' => 'department', + 'employee' => 'employee', + 'employeePensionYTD' => 'employeePensionYTD', + 'employerPensionYTD' => 'employerPensionYTD', 'endDate' => 'endDate', 'endReason' => 'endReason', - 'isPensionLeaverActionReported' => 'isPensionLeaverActionReported', - 'aeStatusAtJoining' => 'aeStatusAtJoining', - 'roleRefs' => 'roleRefs', - 'pensionEmployeeContribution' => 'pensionEmployeeContribution', - 'isEmployeeContributionPercentage' => 'isEmployeeContributionPercentage', - 'pensionTiers' => 'pensionTiers', - 'pensionAVCContribution' => 'pensionAVCContribution', 'isAvcPercentage' => 'isAvcPercentage', - 'pensionEmployerContribution' => 'pensionEmployerContribution', + 'isEmployeeContributionPercentage' => 'isEmployeeContributionPercentage', 'isEmployerContributionPercentage' => 'isEmployerContributionPercentage', - 'pensionMembershipNo' => 'pensionMembershipNo', + 'isHalfContributionMember' => 'isHalfContributionMember', + 'isPensionJoinerActionReported' => 'isPensionJoinerActionReported', + 'isPensionLeaverActionReported' => 'isPensionLeaverActionReported', + 'joinDate' => 'joinDate', + 'joinReason' => 'joinReason', 'mcrRoleID1' => 'mcrRoleID1', 'mcrRoleID2' => 'mcrRoleID2', - 'isHalfContributionMember' => 'isHalfContributionMember', - 'tpAdminNino' => 'tpAdminNino', + 'payrollCode' => 'payrollCode', + 'pensionAVCContribution' => 'pensionAVCContribution', + 'pensionEmployeeContribution' => 'pensionEmployeeContribution', + 'pensionEmployerContribution' => 'pensionEmployerContribution', + 'pensionId' => 'pensionId', + 'pensionMembershipNo' => 'pensionMembershipNo', + 'pensionScheme' => 'pensionScheme', + 'pensionTiers' => 'pensionTiers', 'pensionableEarningsYTD' => 'pensionableEarningsYTD', 'pensionablePayYTD' => 'pensionablePayYTD', - 'employeePensionYTD' => 'employeePensionYTD', - 'avcPensionYTD' => 'avcPensionYTD', - 'employerPensionYTD' => 'employerPensionYTD', - 'assumedPensionablePayYTD' => 'assumedPensionablePayYTD', 'reasonForLeaving' => 'reasonForLeaving', - 'pensionId' => 'pensionId', - 'employee' => 'employee', - 'department' => 'department' + 'roleRefs' => 'roleRefs', + 'tpAdminNino' => 'tpAdminNino', + 'workerGroup' => 'workerGroup' ]; /** @@ -303,39 +303,39 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollCode' => 'setPayrollCode', - 'pensionScheme' => 'setPensionScheme', - 'workerGroup' => 'setWorkerGroup', - 'joinDate' => 'setJoinDate', - 'joinReason' => 'setJoinReason', - 'isPensionJoinerActionReported' => 'setIsPensionJoinerActionReported', + 'aeStatusAtJoining' => 'setAeStatusAtJoining', + 'assumedPensionablePayYTD' => 'setAssumedPensionablePayYTD', + 'avcPensionYTD' => 'setAvcPensionYTD', + 'department' => 'setDepartment', + 'employee' => 'setEmployee', + 'employeePensionYTD' => 'setEmployeePensionYTD', + 'employerPensionYTD' => 'setEmployerPensionYTD', 'endDate' => 'setEndDate', 'endReason' => 'setEndReason', - 'isPensionLeaverActionReported' => 'setIsPensionLeaverActionReported', - 'aeStatusAtJoining' => 'setAeStatusAtJoining', - 'roleRefs' => 'setRoleRefs', - 'pensionEmployeeContribution' => 'setPensionEmployeeContribution', - 'isEmployeeContributionPercentage' => 'setIsEmployeeContributionPercentage', - 'pensionTiers' => 'setPensionTiers', - 'pensionAVCContribution' => 'setPensionAVCContribution', 'isAvcPercentage' => 'setIsAvcPercentage', - 'pensionEmployerContribution' => 'setPensionEmployerContribution', + 'isEmployeeContributionPercentage' => 'setIsEmployeeContributionPercentage', 'isEmployerContributionPercentage' => 'setIsEmployerContributionPercentage', - 'pensionMembershipNo' => 'setPensionMembershipNo', + 'isHalfContributionMember' => 'setIsHalfContributionMember', + 'isPensionJoinerActionReported' => 'setIsPensionJoinerActionReported', + 'isPensionLeaverActionReported' => 'setIsPensionLeaverActionReported', + 'joinDate' => 'setJoinDate', + 'joinReason' => 'setJoinReason', 'mcrRoleID1' => 'setMcrRoleID1', 'mcrRoleID2' => 'setMcrRoleID2', - 'isHalfContributionMember' => 'setIsHalfContributionMember', - 'tpAdminNino' => 'setTpAdminNino', + 'payrollCode' => 'setPayrollCode', + 'pensionAVCContribution' => 'setPensionAVCContribution', + 'pensionEmployeeContribution' => 'setPensionEmployeeContribution', + 'pensionEmployerContribution' => 'setPensionEmployerContribution', + 'pensionId' => 'setPensionId', + 'pensionMembershipNo' => 'setPensionMembershipNo', + 'pensionScheme' => 'setPensionScheme', + 'pensionTiers' => 'setPensionTiers', 'pensionableEarningsYTD' => 'setPensionableEarningsYTD', 'pensionablePayYTD' => 'setPensionablePayYTD', - 'employeePensionYTD' => 'setEmployeePensionYTD', - 'avcPensionYTD' => 'setAvcPensionYTD', - 'employerPensionYTD' => 'setEmployerPensionYTD', - 'assumedPensionablePayYTD' => 'setAssumedPensionablePayYTD', 'reasonForLeaving' => 'setReasonForLeaving', - 'pensionId' => 'setPensionId', - 'employee' => 'setEmployee', - 'department' => 'setDepartment' + 'roleRefs' => 'setRoleRefs', + 'tpAdminNino' => 'setTpAdminNino', + 'workerGroup' => 'setWorkerGroup' ]; /** @@ -344,39 +344,39 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollCode' => 'getPayrollCode', - 'pensionScheme' => 'getPensionScheme', - 'workerGroup' => 'getWorkerGroup', - 'joinDate' => 'getJoinDate', - 'joinReason' => 'getJoinReason', - 'isPensionJoinerActionReported' => 'getIsPensionJoinerActionReported', + 'aeStatusAtJoining' => 'getAeStatusAtJoining', + 'assumedPensionablePayYTD' => 'getAssumedPensionablePayYTD', + 'avcPensionYTD' => 'getAvcPensionYTD', + 'department' => 'getDepartment', + 'employee' => 'getEmployee', + 'employeePensionYTD' => 'getEmployeePensionYTD', + 'employerPensionYTD' => 'getEmployerPensionYTD', 'endDate' => 'getEndDate', 'endReason' => 'getEndReason', - 'isPensionLeaverActionReported' => 'getIsPensionLeaverActionReported', - 'aeStatusAtJoining' => 'getAeStatusAtJoining', - 'roleRefs' => 'getRoleRefs', - 'pensionEmployeeContribution' => 'getPensionEmployeeContribution', - 'isEmployeeContributionPercentage' => 'getIsEmployeeContributionPercentage', - 'pensionTiers' => 'getPensionTiers', - 'pensionAVCContribution' => 'getPensionAVCContribution', 'isAvcPercentage' => 'getIsAvcPercentage', - 'pensionEmployerContribution' => 'getPensionEmployerContribution', + 'isEmployeeContributionPercentage' => 'getIsEmployeeContributionPercentage', 'isEmployerContributionPercentage' => 'getIsEmployerContributionPercentage', - 'pensionMembershipNo' => 'getPensionMembershipNo', + 'isHalfContributionMember' => 'getIsHalfContributionMember', + 'isPensionJoinerActionReported' => 'getIsPensionJoinerActionReported', + 'isPensionLeaverActionReported' => 'getIsPensionLeaverActionReported', + 'joinDate' => 'getJoinDate', + 'joinReason' => 'getJoinReason', 'mcrRoleID1' => 'getMcrRoleID1', 'mcrRoleID2' => 'getMcrRoleID2', - 'isHalfContributionMember' => 'getIsHalfContributionMember', - 'tpAdminNino' => 'getTpAdminNino', + 'payrollCode' => 'getPayrollCode', + 'pensionAVCContribution' => 'getPensionAVCContribution', + 'pensionEmployeeContribution' => 'getPensionEmployeeContribution', + 'pensionEmployerContribution' => 'getPensionEmployerContribution', + 'pensionId' => 'getPensionId', + 'pensionMembershipNo' => 'getPensionMembershipNo', + 'pensionScheme' => 'getPensionScheme', + 'pensionTiers' => 'getPensionTiers', 'pensionableEarningsYTD' => 'getPensionableEarningsYTD', 'pensionablePayYTD' => 'getPensionablePayYTD', - 'employeePensionYTD' => 'getEmployeePensionYTD', - 'avcPensionYTD' => 'getAvcPensionYTD', - 'employerPensionYTD' => 'getEmployerPensionYTD', - 'assumedPensionablePayYTD' => 'getAssumedPensionablePayYTD', 'reasonForLeaving' => 'getReasonForLeaving', - 'pensionId' => 'getPensionId', - 'employee' => 'getEmployee', - 'department' => 'getDepartment' + 'roleRefs' => 'getRoleRefs', + 'tpAdminNino' => 'getTpAdminNino', + 'workerGroup' => 'getWorkerGroup' ]; /** @@ -435,39 +435,39 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('pensionScheme', $data ?? [], null); - $this->setIfExists('workerGroup', $data ?? [], null); - $this->setIfExists('joinDate', $data ?? [], null); - $this->setIfExists('joinReason', $data ?? [], null); - $this->setIfExists('isPensionJoinerActionReported', $data ?? [], null); + $this->setIfExists('aeStatusAtJoining', $data ?? [], null); + $this->setIfExists('assumedPensionablePayYTD', $data ?? [], null); + $this->setIfExists('avcPensionYTD', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('employeePensionYTD', $data ?? [], null); + $this->setIfExists('employerPensionYTD', $data ?? [], null); $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('endReason', $data ?? [], null); - $this->setIfExists('isPensionLeaverActionReported', $data ?? [], null); - $this->setIfExists('aeStatusAtJoining', $data ?? [], null); - $this->setIfExists('roleRefs', $data ?? [], null); - $this->setIfExists('pensionEmployeeContribution', $data ?? [], null); - $this->setIfExists('isEmployeeContributionPercentage', $data ?? [], null); - $this->setIfExists('pensionTiers', $data ?? [], null); - $this->setIfExists('pensionAVCContribution', $data ?? [], null); $this->setIfExists('isAvcPercentage', $data ?? [], null); - $this->setIfExists('pensionEmployerContribution', $data ?? [], null); + $this->setIfExists('isEmployeeContributionPercentage', $data ?? [], null); $this->setIfExists('isEmployerContributionPercentage', $data ?? [], null); - $this->setIfExists('pensionMembershipNo', $data ?? [], null); + $this->setIfExists('isHalfContributionMember', $data ?? [], null); + $this->setIfExists('isPensionJoinerActionReported', $data ?? [], null); + $this->setIfExists('isPensionLeaverActionReported', $data ?? [], null); + $this->setIfExists('joinDate', $data ?? [], null); + $this->setIfExists('joinReason', $data ?? [], null); $this->setIfExists('mcrRoleID1', $data ?? [], null); $this->setIfExists('mcrRoleID2', $data ?? [], null); - $this->setIfExists('isHalfContributionMember', $data ?? [], null); - $this->setIfExists('tpAdminNino', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('pensionAVCContribution', $data ?? [], null); + $this->setIfExists('pensionEmployeeContribution', $data ?? [], null); + $this->setIfExists('pensionEmployerContribution', $data ?? [], null); + $this->setIfExists('pensionId', $data ?? [], null); + $this->setIfExists('pensionMembershipNo', $data ?? [], null); + $this->setIfExists('pensionScheme', $data ?? [], null); + $this->setIfExists('pensionTiers', $data ?? [], null); $this->setIfExists('pensionableEarningsYTD', $data ?? [], null); $this->setIfExists('pensionablePayYTD', $data ?? [], null); - $this->setIfExists('employeePensionYTD', $data ?? [], null); - $this->setIfExists('avcPensionYTD', $data ?? [], null); - $this->setIfExists('employerPensionYTD', $data ?? [], null); - $this->setIfExists('assumedPensionablePayYTD', $data ?? [], null); $this->setIfExists('reasonForLeaving', $data ?? [], null); - $this->setIfExists('pensionId', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('roleRefs', $data ?? [], null); + $this->setIfExists('tpAdminNino', $data ?? [], null); + $this->setIfExists('workerGroup', $data ?? [], null); } /** @@ -513,381 +513,313 @@ public function valid(): bool /** - * Gets payrollCode + * Gets aeStatusAtJoining * - * @return string|null + * @return \SynergiTech\Staffology\Model\AeStatus|null */ - public function getPayrollCode(): ?string + public function getAeStatusAtJoining(): ?\SynergiTech\Staffology\Model\AeStatus { - return $this->container['payrollCode']; + return $this->container['aeStatusAtJoining']; } /** - * Sets payrollCode + * Sets aeStatusAtJoining * - * @param string|null $payrollCode Payroll code of the employee + * @param \SynergiTech\Staffology\Model\AeStatus|null $aeStatusAtJoining aeStatusAtJoining * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setAeStatusAtJoining(?\SynergiTech\Staffology\Model\AeStatus $aeStatusAtJoining): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($aeStatusAtJoining)) { + throw new InvalidArgumentException('non-nullable aeStatusAtJoining cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['aeStatusAtJoining'] = $aeStatusAtJoining; return $this; } /** - * Gets pensionScheme + * Gets assumedPensionablePayYTD * - * @return string|null + * @return float|null */ - public function getPensionScheme(): ?string + public function getAssumedPensionablePayYTD(): ?float { - return $this->container['pensionScheme']; + return $this->container['assumedPensionablePayYTD']; } /** - * Sets pensionScheme + * Sets assumedPensionablePayYTD * - * @param string|null $pensionScheme Employee pension scheme + * @param float|null $assumedPensionablePayYTD Assumed pensionable pay year to date * * @return $this */ - public function setPensionScheme(?string $pensionScheme): static + public function setAssumedPensionablePayYTD(?float $assumedPensionablePayYTD): static { - if (is_null($pensionScheme)) { - array_push($this->openAPINullablesSetToNull, 'pensionScheme'); + if (is_null($assumedPensionablePayYTD)) { + array_push($this->openAPINullablesSetToNull, 'assumedPensionablePayYTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionScheme', $nullablesSetToNull); + $index = array_search('assumedPensionablePayYTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionScheme'] = $pensionScheme; + $this->container['assumedPensionablePayYTD'] = $assumedPensionablePayYTD; return $this; } /** - * Gets workerGroup + * Gets avcPensionYTD * - * @return string|null + * @return float|null */ - public function getWorkerGroup(): ?string + public function getAvcPensionYTD(): ?float { - return $this->container['workerGroup']; + return $this->container['avcPensionYTD']; } /** - * Sets workerGroup + * Sets avcPensionYTD * - * @param string|null $workerGroup The WorkerGroup of the employee pension scheme + * @param float|null $avcPensionYTD Additional Voluntary Contribution YTD * * @return $this */ - public function setWorkerGroup(?string $workerGroup): static + public function setAvcPensionYTD(?float $avcPensionYTD): static { - if (is_null($workerGroup)) { - array_push($this->openAPINullablesSetToNull, 'workerGroup'); + if (is_null($avcPensionYTD)) { + array_push($this->openAPINullablesSetToNull, 'avcPensionYTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('workerGroup', $nullablesSetToNull); + $index = array_search('avcPensionYTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['workerGroup'] = $workerGroup; + $this->container['avcPensionYTD'] = $avcPensionYTD; return $this; } /** - * Gets joinDate + * Gets department * * @return string|null */ - public function getJoinDate(): ?string + public function getDepartment(): ?string { - return $this->container['joinDate']; + return $this->container['department']; } /** - * Sets joinDate + * Sets department * - * @param string|null $joinDate The Join Date of the employee + * @param string|null $department department * * @return $this */ - public function setJoinDate(?string $joinDate): static + public function setDepartment(?string $department): static { - if (is_null($joinDate)) { - array_push($this->openAPINullablesSetToNull, 'joinDate'); + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('joinDate', $nullablesSetToNull); + $index = array_search('department', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['joinDate'] = $joinDate; - - return $this; - } - - /** - * Gets joinReason - * - * @return \SynergiTech\Staffology\Model\PensionJoinReason|null - */ - public function getJoinReason(): ?\SynergiTech\Staffology\Model\PensionJoinReason - { - return $this->container['joinReason']; - } - - /** - * Sets joinReason - * - * @param \SynergiTech\Staffology\Model\PensionJoinReason|null $joinReason joinReason - * - * @return $this - */ - public function setJoinReason(?\SynergiTech\Staffology\Model\PensionJoinReason $joinReason): static - { - if (is_null($joinReason)) { - throw new InvalidArgumentException('non-nullable joinReason cannot be null'); - } - $this->container['joinReason'] = $joinReason; + $this->container['department'] = $department; return $this; } /** - * Gets isPensionJoinerActionReported + * Gets employee * - * @return bool|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getIsPensionJoinerActionReported(): ?bool + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['isPensionJoinerActionReported']; + return $this->container['employee']; } /** - * Sets isPensionJoinerActionReported + * Sets employee * - * @param bool|null $isPensionJoinerActionReported Indicates whether the pension joiner action is reported. + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setIsPensionJoinerActionReported(?bool $isPensionJoinerActionReported): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($isPensionJoinerActionReported)) { - throw new InvalidArgumentException('non-nullable isPensionJoinerActionReported cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['isPensionJoinerActionReported'] = $isPensionJoinerActionReported; + $this->container['employee'] = $employee; return $this; } /** - * Gets endDate + * Gets employeePensionYTD * - * @return string|null + * @return float|null */ - public function getEndDate(): ?string + public function getEmployeePensionYTD(): ?float { - return $this->container['endDate']; + return $this->container['employeePensionYTD']; } /** - * Sets endDate + * Sets employeePensionYTD * - * @param string|null $endDate Pension End Date + * @param float|null $employeePensionYTD Employee pension year to date * * @return $this */ - public function setEndDate(?string $endDate): static + public function setEmployeePensionYTD(?float $employeePensionYTD): static { - if (is_null($endDate)) { - array_push($this->openAPINullablesSetToNull, 'endDate'); + if (is_null($employeePensionYTD)) { + array_push($this->openAPINullablesSetToNull, 'employeePensionYTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endDate', $nullablesSetToNull); + $index = array_search('employeePensionYTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['endDate'] = $endDate; - - return $this; - } - - /** - * Gets endReason - * - * @return \SynergiTech\Staffology\Model\PensionEndReason|null - */ - public function getEndReason(): ?\SynergiTech\Staffology\Model\PensionEndReason - { - return $this->container['endReason']; - } - - /** - * Sets endReason - * - * @param \SynergiTech\Staffology\Model\PensionEndReason|null $endReason endReason - * - * @return $this - */ - public function setEndReason(?\SynergiTech\Staffology\Model\PensionEndReason $endReason): static - { - if (is_null($endReason)) { - throw new InvalidArgumentException('non-nullable endReason cannot be null'); - } - $this->container['endReason'] = $endReason; + $this->container['employeePensionYTD'] = $employeePensionYTD; return $this; } /** - * Gets isPensionLeaverActionReported + * Gets employerPensionYTD * - * @return bool|null + * @return float|null */ - public function getIsPensionLeaverActionReported(): ?bool + public function getEmployerPensionYTD(): ?float { - return $this->container['isPensionLeaverActionReported']; + return $this->container['employerPensionYTD']; } /** - * Sets isPensionLeaverActionReported + * Sets employerPensionYTD * - * @param bool|null $isPensionLeaverActionReported Indicates whether the pension leaver action is reported. + * @param float|null $employerPensionYTD Employer pension year to date * * @return $this */ - public function setIsPensionLeaverActionReported(?bool $isPensionLeaverActionReported): static + public function setEmployerPensionYTD(?float $employerPensionYTD): static { - if (is_null($isPensionLeaverActionReported)) { - array_push($this->openAPINullablesSetToNull, 'isPensionLeaverActionReported'); + if (is_null($employerPensionYTD)) { + array_push($this->openAPINullablesSetToNull, 'employerPensionYTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('isPensionLeaverActionReported', $nullablesSetToNull); + $index = array_search('employerPensionYTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['isPensionLeaverActionReported'] = $isPensionLeaverActionReported; + $this->container['employerPensionYTD'] = $employerPensionYTD; return $this; } /** - * Gets aeStatusAtJoining + * Gets endDate * - * @return \SynergiTech\Staffology\Model\AeStatus|null + * @return string|null */ - public function getAeStatusAtJoining(): ?\SynergiTech\Staffology\Model\AeStatus + public function getEndDate(): ?string { - return $this->container['aeStatusAtJoining']; + return $this->container['endDate']; } /** - * Sets aeStatusAtJoining + * Sets endDate * - * @param \SynergiTech\Staffology\Model\AeStatus|null $aeStatusAtJoining aeStatusAtJoining + * @param string|null $endDate Pension End Date * * @return $this */ - public function setAeStatusAtJoining(?\SynergiTech\Staffology\Model\AeStatus $aeStatusAtJoining): static + public function setEndDate(?string $endDate): static { - if (is_null($aeStatusAtJoining)) { - throw new InvalidArgumentException('non-nullable aeStatusAtJoining cannot be null'); + if (is_null($endDate)) { + array_push($this->openAPINullablesSetToNull, 'endDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['aeStatusAtJoining'] = $aeStatusAtJoining; + $this->container['endDate'] = $endDate; return $this; } /** - * Gets roleRefs + * Gets endReason * - * @return string|null + * @return \SynergiTech\Staffology\Model\PensionEndReason|null */ - public function getRoleRefs(): ?string + public function getEndReason(): ?\SynergiTech\Staffology\Model\PensionEndReason { - return $this->container['roleRefs']; + return $this->container['endReason']; } /** - * Sets roleRefs + * Sets endReason * - * @param string|null $roleRefs role references of employee + * @param \SynergiTech\Staffology\Model\PensionEndReason|null $endReason endReason * * @return $this */ - public function setRoleRefs(?string $roleRefs): static + public function setEndReason(?\SynergiTech\Staffology\Model\PensionEndReason $endReason): static { - if (is_null($roleRefs)) { - array_push($this->openAPINullablesSetToNull, 'roleRefs'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('roleRefs', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($endReason)) { + throw new InvalidArgumentException('non-nullable endReason cannot be null'); } - $this->container['roleRefs'] = $roleRefs; + $this->container['endReason'] = $endReason; return $this; } /** - * Gets pensionEmployeeContribution + * Gets isAvcPercentage * - * @return float|null + * @return bool|null */ - public function getPensionEmployeeContribution(): ?float + public function getIsAvcPercentage(): ?bool { - return $this->container['pensionEmployeeContribution']; + return $this->container['isAvcPercentage']; } /** - * Sets pensionEmployeeContribution + * Sets isAvcPercentage * - * @param float|null $pensionEmployeeContribution Pension Employee Contribution + * @param bool|null $isAvcPercentage Indicates whether the AvcContribution is expressed as a percentage. * * @return $this */ - public function setPensionEmployeeContribution(?float $pensionEmployeeContribution): static + public function setIsAvcPercentage(?bool $isAvcPercentage): static { - if (is_null($pensionEmployeeContribution)) { - array_push($this->openAPINullablesSetToNull, 'pensionEmployeeContribution'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionEmployeeContribution', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isAvcPercentage)) { + throw new InvalidArgumentException('non-nullable isAvcPercentage cannot be null'); } - $this->container['pensionEmployeeContribution'] = $pensionEmployeeContribution; + $this->container['isAvcPercentage'] = $isAvcPercentage; return $this; } @@ -920,191 +852,184 @@ public function setIsEmployeeContributionPercentage(?bool $isEmployeeContributio } /** - * Gets pensionTiers + * Gets isEmployerContributionPercentage * - * @return string|null + * @return bool|null */ - public function getPensionTiers(): ?string + public function getIsEmployerContributionPercentage(): ?bool { - return $this->container['pensionTiers']; + return $this->container['isEmployerContributionPercentage']; } /** - * Sets pensionTiers + * Sets isEmployerContributionPercentage * - * @param string|null $pensionTiers Pension Tiers of the employee + * @param bool|null $isEmployerContributionPercentage Indicates whether the EmployerContribution is expressed as a percentage. * * @return $this */ - public function setPensionTiers(?string $pensionTiers): static + public function setIsEmployerContributionPercentage(?bool $isEmployerContributionPercentage): static { - if (is_null($pensionTiers)) { - array_push($this->openAPINullablesSetToNull, 'pensionTiers'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionTiers', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isEmployerContributionPercentage)) { + throw new InvalidArgumentException('non-nullable isEmployerContributionPercentage cannot be null'); } - $this->container['pensionTiers'] = $pensionTiers; + $this->container['isEmployerContributionPercentage'] = $isEmployerContributionPercentage; return $this; } /** - * Gets pensionAVCContribution + * Gets isHalfContributionMember * - * @return float|null + * @return bool|null */ - public function getPensionAVCContribution(): ?float + public function getIsHalfContributionMember(): ?bool { - return $this->container['pensionAVCContribution']; + return $this->container['isHalfContributionMember']; } /** - * Sets pensionAVCContribution + * Sets isHalfContributionMember * - * @param float|null $pensionAVCContribution Pension AVC Contribution of employee + * @param bool|null $isHalfContributionMember 50/50 membership * * @return $this */ - public function setPensionAVCContribution(?float $pensionAVCContribution): static + public function setIsHalfContributionMember(?bool $isHalfContributionMember): static { - if (is_null($pensionAVCContribution)) { - array_push($this->openAPINullablesSetToNull, 'pensionAVCContribution'); + if (is_null($isHalfContributionMember)) { + array_push($this->openAPINullablesSetToNull, 'isHalfContributionMember'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionAVCContribution', $nullablesSetToNull); + $index = array_search('isHalfContributionMember', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionAVCContribution'] = $pensionAVCContribution; + $this->container['isHalfContributionMember'] = $isHalfContributionMember; return $this; } /** - * Gets isAvcPercentage + * Gets isPensionJoinerActionReported * * @return bool|null */ - public function getIsAvcPercentage(): ?bool + public function getIsPensionJoinerActionReported(): ?bool { - return $this->container['isAvcPercentage']; + return $this->container['isPensionJoinerActionReported']; } /** - * Sets isAvcPercentage + * Sets isPensionJoinerActionReported * - * @param bool|null $isAvcPercentage Indicates whether the AvcContribution is expressed as a percentage. + * @param bool|null $isPensionJoinerActionReported Indicates whether the pension joiner action is reported. * * @return $this */ - public function setIsAvcPercentage(?bool $isAvcPercentage): static + public function setIsPensionJoinerActionReported(?bool $isPensionJoinerActionReported): static { - if (is_null($isAvcPercentage)) { - throw new InvalidArgumentException('non-nullable isAvcPercentage cannot be null'); + if (is_null($isPensionJoinerActionReported)) { + throw new InvalidArgumentException('non-nullable isPensionJoinerActionReported cannot be null'); } - $this->container['isAvcPercentage'] = $isAvcPercentage; + $this->container['isPensionJoinerActionReported'] = $isPensionJoinerActionReported; return $this; } /** - * Gets pensionEmployerContribution + * Gets isPensionLeaverActionReported * - * @return float|null + * @return bool|null */ - public function getPensionEmployerContribution(): ?float + public function getIsPensionLeaverActionReported(): ?bool { - return $this->container['pensionEmployerContribution']; + return $this->container['isPensionLeaverActionReported']; } /** - * Sets pensionEmployerContribution + * Sets isPensionLeaverActionReported * - * @param float|null $pensionEmployerContribution Employer Pension Contribution + * @param bool|null $isPensionLeaverActionReported Indicates whether the pension leaver action is reported. * * @return $this */ - public function setPensionEmployerContribution(?float $pensionEmployerContribution): static + public function setIsPensionLeaverActionReported(?bool $isPensionLeaverActionReported): static { - if (is_null($pensionEmployerContribution)) { - array_push($this->openAPINullablesSetToNull, 'pensionEmployerContribution'); + if (is_null($isPensionLeaverActionReported)) { + array_push($this->openAPINullablesSetToNull, 'isPensionLeaverActionReported'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionEmployerContribution', $nullablesSetToNull); + $index = array_search('isPensionLeaverActionReported', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionEmployerContribution'] = $pensionEmployerContribution; + $this->container['isPensionLeaverActionReported'] = $isPensionLeaverActionReported; return $this; } /** - * Gets isEmployerContributionPercentage + * Gets joinDate * - * @return bool|null + * @return string|null */ - public function getIsEmployerContributionPercentage(): ?bool + public function getJoinDate(): ?string { - return $this->container['isEmployerContributionPercentage']; + return $this->container['joinDate']; } /** - * Sets isEmployerContributionPercentage + * Sets joinDate * - * @param bool|null $isEmployerContributionPercentage Indicates whether the EmployerContribution is expressed as a percentage. + * @param string|null $joinDate The Join Date of the employee * * @return $this */ - public function setIsEmployerContributionPercentage(?bool $isEmployerContributionPercentage): static + public function setJoinDate(?string $joinDate): static { - if (is_null($isEmployerContributionPercentage)) { - throw new InvalidArgumentException('non-nullable isEmployerContributionPercentage cannot be null'); + if (is_null($joinDate)) { + array_push($this->openAPINullablesSetToNull, 'joinDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('joinDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isEmployerContributionPercentage'] = $isEmployerContributionPercentage; + $this->container['joinDate'] = $joinDate; return $this; } /** - * Gets pensionMembershipNo + * Gets joinReason * - * @return string|null + * @return \SynergiTech\Staffology\Model\PensionJoinReason|null */ - public function getPensionMembershipNo(): ?string + public function getJoinReason(): ?\SynergiTech\Staffology\Model\PensionJoinReason { - return $this->container['pensionMembershipNo']; + return $this->container['joinReason']; } /** - * Sets pensionMembershipNo + * Sets joinReason * - * @param string|null $pensionMembershipNo Pension Membership Number + * @param \SynergiTech\Staffology\Model\PensionJoinReason|null $joinReason joinReason * * @return $this */ - public function setPensionMembershipNo(?string $pensionMembershipNo): static + public function setJoinReason(?\SynergiTech\Staffology\Model\PensionJoinReason $joinReason): static { - if (is_null($pensionMembershipNo)) { - array_push($this->openAPINullablesSetToNull, 'pensionMembershipNo'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionMembershipNo', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($joinReason)) { + throw new InvalidArgumentException('non-nullable joinReason cannot be null'); } - $this->container['pensionMembershipNo'] = $pensionMembershipNo; + $this->container['joinReason'] = $joinReason; return $this; } @@ -1166,285 +1091,346 @@ public function setMcrRoleID2(?string $mcrRoleID2): static array_push($this->openAPINullablesSetToNull, 'mcrRoleID2'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mcrRoleID2', $nullablesSetToNull); + $index = array_search('mcrRoleID2', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['mcrRoleID2'] = $mcrRoleID2; + + return $this; + } + + /** + * Gets payrollCode + * + * @return string|null + */ + public function getPayrollCode(): ?string + { + return $this->container['payrollCode']; + } + + /** + * Sets payrollCode + * + * @param string|null $payrollCode Payroll code of the employee + * + * @return $this + */ + public function setPayrollCode(?string $payrollCode): static + { + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payrollCode'] = $payrollCode; + + return $this; + } + + /** + * Gets pensionAVCContribution + * + * @return float|null + */ + public function getPensionAVCContribution(): ?float + { + return $this->container['pensionAVCContribution']; + } + + /** + * Sets pensionAVCContribution + * + * @param float|null $pensionAVCContribution Pension AVC Contribution of employee + * + * @return $this + */ + public function setPensionAVCContribution(?float $pensionAVCContribution): static + { + if (is_null($pensionAVCContribution)) { + array_push($this->openAPINullablesSetToNull, 'pensionAVCContribution'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pensionAVCContribution', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['mcrRoleID2'] = $mcrRoleID2; + $this->container['pensionAVCContribution'] = $pensionAVCContribution; return $this; } /** - * Gets isHalfContributionMember + * Gets pensionEmployeeContribution * - * @return bool|null + * @return float|null */ - public function getIsHalfContributionMember(): ?bool + public function getPensionEmployeeContribution(): ?float { - return $this->container['isHalfContributionMember']; + return $this->container['pensionEmployeeContribution']; } /** - * Sets isHalfContributionMember + * Sets pensionEmployeeContribution * - * @param bool|null $isHalfContributionMember 50/50 membership + * @param float|null $pensionEmployeeContribution Pension Employee Contribution * * @return $this */ - public function setIsHalfContributionMember(?bool $isHalfContributionMember): static + public function setPensionEmployeeContribution(?float $pensionEmployeeContribution): static { - if (is_null($isHalfContributionMember)) { - array_push($this->openAPINullablesSetToNull, 'isHalfContributionMember'); + if (is_null($pensionEmployeeContribution)) { + array_push($this->openAPINullablesSetToNull, 'pensionEmployeeContribution'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('isHalfContributionMember', $nullablesSetToNull); + $index = array_search('pensionEmployeeContribution', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['isHalfContributionMember'] = $isHalfContributionMember; + $this->container['pensionEmployeeContribution'] = $pensionEmployeeContribution; return $this; } /** - * Gets tpAdminNino + * Gets pensionEmployerContribution * - * @return string|null + * @return float|null */ - public function getTpAdminNino(): ?string + public function getPensionEmployerContribution(): ?float { - return $this->container['tpAdminNino']; + return $this->container['pensionEmployerContribution']; } /** - * Sets tpAdminNino + * Sets pensionEmployerContribution * - * @param string|null $tpAdminNino Teachers Pension Admin Ni Number + * @param float|null $pensionEmployerContribution Employer Pension Contribution * * @return $this */ - public function setTpAdminNino(?string $tpAdminNino): static + public function setPensionEmployerContribution(?float $pensionEmployerContribution): static { - if (is_null($tpAdminNino)) { - array_push($this->openAPINullablesSetToNull, 'tpAdminNino'); + if (is_null($pensionEmployerContribution)) { + array_push($this->openAPINullablesSetToNull, 'pensionEmployerContribution'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tpAdminNino', $nullablesSetToNull); + $index = array_search('pensionEmployerContribution', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tpAdminNino'] = $tpAdminNino; + $this->container['pensionEmployerContribution'] = $pensionEmployerContribution; return $this; } /** - * Gets pensionableEarningsYTD + * Gets pensionId * - * @return float|null + * @return string|null */ - public function getPensionableEarningsYTD(): ?float + public function getPensionId(): ?string { - return $this->container['pensionableEarningsYTD']; + return $this->container['pensionId']; } /** - * Sets pensionableEarningsYTD + * Sets pensionId * - * @param float|null $pensionableEarningsYTD Pensionable earning year to date + * @param string|null $pensionId Pension Id * * @return $this */ - public function setPensionableEarningsYTD(?float $pensionableEarningsYTD): static + public function setPensionId(?string $pensionId): static { - if (is_null($pensionableEarningsYTD)) { - array_push($this->openAPINullablesSetToNull, 'pensionableEarningsYTD'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionableEarningsYTD', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($pensionId)) { + throw new InvalidArgumentException('non-nullable pensionId cannot be null'); } - $this->container['pensionableEarningsYTD'] = $pensionableEarningsYTD; + $this->container['pensionId'] = $pensionId; return $this; } /** - * Gets pensionablePayYTD + * Gets pensionMembershipNo * - * @return float|null + * @return string|null */ - public function getPensionablePayYTD(): ?float + public function getPensionMembershipNo(): ?string { - return $this->container['pensionablePayYTD']; + return $this->container['pensionMembershipNo']; } /** - * Sets pensionablePayYTD + * Sets pensionMembershipNo * - * @param float|null $pensionablePayYTD Pensionable Pay year to date + * @param string|null $pensionMembershipNo Pension Membership Number * * @return $this */ - public function setPensionablePayYTD(?float $pensionablePayYTD): static + public function setPensionMembershipNo(?string $pensionMembershipNo): static { - if (is_null($pensionablePayYTD)) { - array_push($this->openAPINullablesSetToNull, 'pensionablePayYTD'); + if (is_null($pensionMembershipNo)) { + array_push($this->openAPINullablesSetToNull, 'pensionMembershipNo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionablePayYTD', $nullablesSetToNull); + $index = array_search('pensionMembershipNo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionablePayYTD'] = $pensionablePayYTD; + $this->container['pensionMembershipNo'] = $pensionMembershipNo; return $this; } /** - * Gets employeePensionYTD + * Gets pensionScheme * - * @return float|null + * @return string|null */ - public function getEmployeePensionYTD(): ?float + public function getPensionScheme(): ?string { - return $this->container['employeePensionYTD']; + return $this->container['pensionScheme']; } /** - * Sets employeePensionYTD + * Sets pensionScheme * - * @param float|null $employeePensionYTD Employee pension year to date + * @param string|null $pensionScheme Employee pension scheme * * @return $this */ - public function setEmployeePensionYTD(?float $employeePensionYTD): static + public function setPensionScheme(?string $pensionScheme): static { - if (is_null($employeePensionYTD)) { - array_push($this->openAPINullablesSetToNull, 'employeePensionYTD'); + if (is_null($pensionScheme)) { + array_push($this->openAPINullablesSetToNull, 'pensionScheme'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employeePensionYTD', $nullablesSetToNull); + $index = array_search('pensionScheme', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employeePensionYTD'] = $employeePensionYTD; + $this->container['pensionScheme'] = $pensionScheme; return $this; } /** - * Gets avcPensionYTD + * Gets pensionTiers * - * @return float|null + * @return string|null */ - public function getAvcPensionYTD(): ?float + public function getPensionTiers(): ?string { - return $this->container['avcPensionYTD']; + return $this->container['pensionTiers']; } /** - * Sets avcPensionYTD + * Sets pensionTiers * - * @param float|null $avcPensionYTD Additional Voluntary Contribution YTD + * @param string|null $pensionTiers Pension Tiers of the employee * * @return $this */ - public function setAvcPensionYTD(?float $avcPensionYTD): static + public function setPensionTiers(?string $pensionTiers): static { - if (is_null($avcPensionYTD)) { - array_push($this->openAPINullablesSetToNull, 'avcPensionYTD'); + if (is_null($pensionTiers)) { + array_push($this->openAPINullablesSetToNull, 'pensionTiers'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('avcPensionYTD', $nullablesSetToNull); + $index = array_search('pensionTiers', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['avcPensionYTD'] = $avcPensionYTD; + $this->container['pensionTiers'] = $pensionTiers; return $this; } /** - * Gets employerPensionYTD + * Gets pensionableEarningsYTD * * @return float|null */ - public function getEmployerPensionYTD(): ?float + public function getPensionableEarningsYTD(): ?float { - return $this->container['employerPensionYTD']; + return $this->container['pensionableEarningsYTD']; } /** - * Sets employerPensionYTD + * Sets pensionableEarningsYTD * - * @param float|null $employerPensionYTD Employer pension year to date + * @param float|null $pensionableEarningsYTD Pensionable earning year to date * * @return $this */ - public function setEmployerPensionYTD(?float $employerPensionYTD): static + public function setPensionableEarningsYTD(?float $pensionableEarningsYTD): static { - if (is_null($employerPensionYTD)) { - array_push($this->openAPINullablesSetToNull, 'employerPensionYTD'); + if (is_null($pensionableEarningsYTD)) { + array_push($this->openAPINullablesSetToNull, 'pensionableEarningsYTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerPensionYTD', $nullablesSetToNull); + $index = array_search('pensionableEarningsYTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['employerPensionYTD'] = $employerPensionYTD; + $this->container['pensionableEarningsYTD'] = $pensionableEarningsYTD; return $this; } /** - * Gets assumedPensionablePayYTD + * Gets pensionablePayYTD * * @return float|null */ - public function getAssumedPensionablePayYTD(): ?float + public function getPensionablePayYTD(): ?float { - return $this->container['assumedPensionablePayYTD']; + return $this->container['pensionablePayYTD']; } /** - * Sets assumedPensionablePayYTD + * Sets pensionablePayYTD * - * @param float|null $assumedPensionablePayYTD Assumed pensionable pay year to date + * @param float|null $pensionablePayYTD Pensionable Pay year to date * * @return $this */ - public function setAssumedPensionablePayYTD(?float $assumedPensionablePayYTD): static + public function setPensionablePayYTD(?float $pensionablePayYTD): static { - if (is_null($assumedPensionablePayYTD)) { - array_push($this->openAPINullablesSetToNull, 'assumedPensionablePayYTD'); + if (is_null($pensionablePayYTD)) { + array_push($this->openAPINullablesSetToNull, 'pensionablePayYTD'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('assumedPensionablePayYTD', $nullablesSetToNull); + $index = array_search('pensionablePayYTD', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['assumedPensionablePayYTD'] = $assumedPensionablePayYTD; + $this->container['pensionablePayYTD'] = $pensionablePayYTD; return $this; } @@ -1484,89 +1470,103 @@ public function setReasonForLeaving(?string $reasonForLeaving): static } /** - * Gets pensionId + * Gets roleRefs * * @return string|null */ - public function getPensionId(): ?string + public function getRoleRefs(): ?string { - return $this->container['pensionId']; + return $this->container['roleRefs']; } /** - * Sets pensionId + * Sets roleRefs * - * @param string|null $pensionId Pension Id + * @param string|null $roleRefs role references of employee * * @return $this */ - public function setPensionId(?string $pensionId): static + public function setRoleRefs(?string $roleRefs): static { - if (is_null($pensionId)) { - throw new InvalidArgumentException('non-nullable pensionId cannot be null'); + if (is_null($roleRefs)) { + array_push($this->openAPINullablesSetToNull, 'roleRefs'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('roleRefs', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['pensionId'] = $pensionId; + $this->container['roleRefs'] = $roleRefs; return $this; } /** - * Gets employee + * Gets tpAdminNino * - * @return \SynergiTech\Staffology\Model\Item|null + * @return string|null */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + public function getTpAdminNino(): ?string { - return $this->container['employee']; + return $this->container['tpAdminNino']; } /** - * Sets employee + * Sets tpAdminNino * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * @param string|null $tpAdminNino Teachers Pension Admin Ni Number * * @return $this */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + public function setTpAdminNino(?string $tpAdminNino): static { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); + if (is_null($tpAdminNino)) { + array_push($this->openAPINullablesSetToNull, 'tpAdminNino'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tpAdminNino', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employee'] = $employee; + $this->container['tpAdminNino'] = $tpAdminNino; return $this; } /** - * Gets department + * Gets workerGroup * * @return string|null */ - public function getDepartment(): ?string + public function getWorkerGroup(): ?string { - return $this->container['department']; + return $this->container['workerGroup']; } /** - * Sets department + * Sets workerGroup * - * @param string|null $department department + * @param string|null $workerGroup The WorkerGroup of the employee pension scheme * * @return $this */ - public function setDepartment(?string $department): static + public function setWorkerGroup(?string $workerGroup): static { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); + if (is_null($workerGroup)) { + array_push($this->openAPINullablesSetToNull, 'workerGroup'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); + $index = array_search('workerGroup', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['department'] = $department; + $this->container['workerGroup'] = $workerGroup; return $this; } diff --git a/src/Model/PensionMembershipsReport.php b/src/Model/PensionMembershipsReport.php index e19167e..cccba5e 100644 --- a/src/Model/PensionMembershipsReport.php +++ b/src/Model/PensionMembershipsReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,20 +59,21 @@ class PensionMembershipsReport implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPITypes = [ - 'lines' => '\SynergiTech\Staffology\Model\PensionMembershipReportLine[]', 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'isDraft' => 'bool', + 'lines' => '\SynergiTech\Staffology\Model\PensionMembershipReportLine[]', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -81,20 +82,21 @@ class PensionMembershipsReport implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPIFormats = [ - 'lines' => null, 'employer' => null, - 'payPeriod' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'isDraft' => null, + 'lines' => null, 'ordinal' => 'int32', + 'payPeriod' => null, 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -103,20 +105,21 @@ class PensionMembershipsReport implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPINullables = [ - 'lines' => true, 'employer' => false, - 'payPeriod' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'isDraft' => false, + 'lines' => true, 'ordinal' => false, + 'payPeriod' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -205,20 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'lines' => 'lines', 'employer' => 'employer', - 'payPeriod' => 'payPeriod', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'isDraft' => 'isDraft', + 'lines' => 'lines', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -227,20 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'lines' => 'setLines', 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'isDraft' => 'setIsDraft', + 'lines' => 'setLines', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -249,20 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'lines' => 'getLines', 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'isDraft' => 'getIsDraft', + 'lines' => 'getLines', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -321,20 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -380,89 +387,150 @@ public function valid(): bool /** - * Gets lines + * Gets employer * - * @return \SynergiTech\Staffology\Model\PensionMembershipReportLine[]|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getLines(): ?array + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['lines']; + return $this->container['employer']; } /** - * Sets lines + * Sets employer * - * @param \SynergiTech\Staffology\Model\PensionMembershipReportLine[]|null $lines lines + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setLines(?array $lines): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); + } + $this->container['employer'] = $employer; + + return $this; + } + + /** + * Gets endDate + * + * @return \DateTime|null + */ + public function getEndDate(): ?\DateTime + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param \DateTime|null $endDate endDate + * + * @return $this + */ + public function setEndDate(?\DateTime $endDate): static + { + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets endPeriodName + * + * @return string|null + */ + public function getEndPeriodName(): ?string + { + return $this->container['endPeriodName']; + } + + /** + * Sets endPeriodName + * + * @param string|null $endPeriodName endPeriodName + * + * @return $this + */ + public function setEndPeriodName(?string $endPeriodName): static + { + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); + $index = array_search('endPeriodName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lines'] = $lines; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets employer + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getIsDraft(): ?bool { - return $this->container['employer']; + return $this->container['isDraft']; } /** - * Sets employer + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param bool|null $isDraft isDraft * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['employer'] = $employer; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets payPeriod + * Gets lines * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return \SynergiTech\Staffology\Model\PensionMembershipReportLine[]|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getLines(): ?array { - return $this->container['payPeriod']; + return $this->container['lines']; } /** - * Sets payPeriod + * Sets lines * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param \SynergiTech\Staffology\Model\PensionMembershipReportLine[]|null $lines lines * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setLines(?array $lines): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriod'] = $payPeriod; + $this->container['lines'] = $lines; return $this; } @@ -494,6 +562,33 @@ public function setOrdinal(?int $ordinal): static return $this; } + /** + * Gets payPeriod + * + * @return \SynergiTech\Staffology\Model\PayPeriods|null + */ + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + { + return $this->container['payPeriod']; + } + + /** + * Sets payPeriod + * + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * + * @return $this + */ + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + { + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + } + $this->container['payPeriod'] = $payPeriod; + + return $this; + } + /** * Gets period * @@ -549,69 +644,28 @@ public function setPeriodTo(?int $periodTo): static } /** - * Gets startPeriodName - * - * @return string|null - */ - public function getStartPeriodName(): ?string - { - return $this->container['startPeriodName']; - } - - /** - * Sets startPeriodName - * - * @param string|null $startPeriodName startPeriodName - * - * @return $this - */ - public function setStartPeriodName(?string $startPeriodName): static - { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['startPeriodName'] = $startPeriodName; - - return $this; - } - - /** - * Gets endPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getEndPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['endPeriodName']; + return $this->container['report']; } /** - * Sets endPeriodName + * Sets report * - * @param string|null $endPeriodName endPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['report'] = $report; return $this; } @@ -644,55 +698,35 @@ public function setStartDate(?\DateTime $startDate): static } /** - * Gets endDate - * - * @return \DateTime|null - */ - public function getEndDate(): ?\DateTime - { - return $this->container['endDate']; - } - - /** - * Sets endDate - * - * @param \DateTime|null $endDate endDate - * - * @return $this - */ - public function setEndDate(?\DateTime $endDate): static - { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); - } - $this->container['endDate'] = $endDate; - - return $this; - } - - /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -759,28 +793,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/PensionMembershipsReportReportResponse.php b/src/Model/PensionMembershipsReportReportResponse.php index baa61b1..c69f6b3 100644 --- a/src/Model/PensionMembershipsReportReportResponse.php +++ b/src/Model/PensionMembershipsReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class PensionMembershipsReportReportResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\PensionMembershipsReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class PensionMembershipsReportReportResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class PensionMembershipsReportReportResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PensionOpeningBalances.php b/src/Model/PensionOpeningBalances.php index cdf2379..f16b3bd 100644 --- a/src/Model/PensionOpeningBalances.php +++ b/src/Model/PensionOpeningBalances.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class PensionOpeningBalances implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'pensionableEarnings' => 'float', - 'pensionablePay' => 'float', + 'assumedPensionablePay' => 'float', 'employeePensionContribution' => 'float', 'employeePensionContributionAvc' => 'float', 'employerPensionContribution' => 'float', - 'assumedPensionablePay' => 'float' + 'pensionableEarnings' => 'float', + 'pensionablePay' => 'float' ]; /** @@ -73,12 +73,12 @@ class PensionOpeningBalances implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ - 'pensionableEarnings' => 'double', - 'pensionablePay' => 'double', + 'assumedPensionablePay' => 'double', 'employeePensionContribution' => 'double', 'employeePensionContributionAvc' => 'double', 'employerPensionContribution' => 'double', - 'assumedPensionablePay' => 'double' + 'pensionableEarnings' => 'double', + 'pensionablePay' => 'double' ]; /** @@ -87,12 +87,12 @@ class PensionOpeningBalances implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ - 'pensionableEarnings' => false, - 'pensionablePay' => false, + 'assumedPensionablePay' => false, 'employeePensionContribution' => false, 'employeePensionContributionAvc' => false, 'employerPensionContribution' => false, - 'assumedPensionablePay' => false + 'pensionableEarnings' => false, + 'pensionablePay' => false ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'pensionableEarnings' => 'pensionableEarnings', - 'pensionablePay' => 'pensionablePay', + 'assumedPensionablePay' => 'assumedPensionablePay', 'employeePensionContribution' => 'employeePensionContribution', 'employeePensionContributionAvc' => 'employeePensionContributionAvc', 'employerPensionContribution' => 'employerPensionContribution', - 'assumedPensionablePay' => 'assumedPensionablePay' + 'pensionableEarnings' => 'pensionableEarnings', + 'pensionablePay' => 'pensionablePay' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'pensionableEarnings' => 'setPensionableEarnings', - 'pensionablePay' => 'setPensionablePay', + 'assumedPensionablePay' => 'setAssumedPensionablePay', 'employeePensionContribution' => 'setEmployeePensionContribution', 'employeePensionContributionAvc' => 'setEmployeePensionContributionAvc', 'employerPensionContribution' => 'setEmployerPensionContribution', - 'assumedPensionablePay' => 'setAssumedPensionablePay' + 'pensionableEarnings' => 'setPensionableEarnings', + 'pensionablePay' => 'setPensionablePay' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'pensionableEarnings' => 'getPensionableEarnings', - 'pensionablePay' => 'getPensionablePay', + 'assumedPensionablePay' => 'getAssumedPensionablePay', 'employeePensionContribution' => 'getEmployeePensionContribution', 'employeePensionContributionAvc' => 'getEmployeePensionContributionAvc', 'employerPensionContribution' => 'getEmployerPensionContribution', - 'assumedPensionablePay' => 'getAssumedPensionablePay' + 'pensionableEarnings' => 'getPensionableEarnings', + 'pensionablePay' => 'getPensionablePay' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('pensionableEarnings', $data ?? [], null); - $this->setIfExists('pensionablePay', $data ?? [], null); + $this->setIfExists('assumedPensionablePay', $data ?? [], null); $this->setIfExists('employeePensionContribution', $data ?? [], null); $this->setIfExists('employeePensionContributionAvc', $data ?? [], null); $this->setIfExists('employerPensionContribution', $data ?? [], null); - $this->setIfExists('assumedPensionablePay', $data ?? [], null); + $this->setIfExists('pensionableEarnings', $data ?? [], null); + $this->setIfExists('pensionablePay', $data ?? [], null); } /** @@ -324,59 +324,30 @@ public function valid(): bool /** - * Gets pensionableEarnings - * - * @return float|null - */ - public function getPensionableEarnings(): ?float - { - return $this->container['pensionableEarnings']; - } - - /** - * Sets pensionableEarnings - * - * @param float|null $pensionableEarnings Opening balances for pensionable earnings - * - * @return $this - */ - public function setPensionableEarnings(?float $pensionableEarnings): static - { - if (is_null($pensionableEarnings)) { - throw new InvalidArgumentException('non-nullable pensionableEarnings cannot be null'); - } - - - $this->container['pensionableEarnings'] = $pensionableEarnings; - - return $this; - } - - /** - * Gets pensionablePay + * Gets assumedPensionablePay * * @return float|null */ - public function getPensionablePay(): ?float + public function getAssumedPensionablePay(): ?float { - return $this->container['pensionablePay']; + return $this->container['assumedPensionablePay']; } /** - * Sets pensionablePay + * Sets assumedPensionablePay * - * @param float|null $pensionablePay Opening balances for pensionable pay + * @param float|null $assumedPensionablePay Opening balances for assumed pensionable pay * * @return $this */ - public function setPensionablePay(?float $pensionablePay): static + public function setAssumedPensionablePay(?float $assumedPensionablePay): static { - if (is_null($pensionablePay)) { - throw new InvalidArgumentException('non-nullable pensionablePay cannot be null'); + if (is_null($assumedPensionablePay)) { + throw new InvalidArgumentException('non-nullable assumedPensionablePay cannot be null'); } - $this->container['pensionablePay'] = $pensionablePay; + $this->container['assumedPensionablePay'] = $assumedPensionablePay; return $this; } @@ -469,30 +440,59 @@ public function setEmployerPensionContribution(?float $employerPensionContributi } /** - * Gets assumedPensionablePay + * Gets pensionableEarnings * * @return float|null */ - public function getAssumedPensionablePay(): ?float + public function getPensionableEarnings(): ?float { - return $this->container['assumedPensionablePay']; + return $this->container['pensionableEarnings']; } /** - * Sets assumedPensionablePay + * Sets pensionableEarnings * - * @param float|null $assumedPensionablePay Opening balances for assumed pensionable pay + * @param float|null $pensionableEarnings Opening balances for pensionable earnings * * @return $this */ - public function setAssumedPensionablePay(?float $assumedPensionablePay): static + public function setPensionableEarnings(?float $pensionableEarnings): static { - if (is_null($assumedPensionablePay)) { - throw new InvalidArgumentException('non-nullable assumedPensionablePay cannot be null'); + if (is_null($pensionableEarnings)) { + throw new InvalidArgumentException('non-nullable pensionableEarnings cannot be null'); } - $this->container['assumedPensionablePay'] = $assumedPensionablePay; + $this->container['pensionableEarnings'] = $pensionableEarnings; + + return $this; + } + + /** + * Gets pensionablePay + * + * @return float|null + */ + public function getPensionablePay(): ?float + { + return $this->container['pensionablePay']; + } + + /** + * Sets pensionablePay + * + * @param float|null $pensionablePay Opening balances for pensionable pay + * + * @return $this + */ + public function setPensionablePay(?float $pensionablePay): static + { + if (is_null($pensionablePay)) { + throw new InvalidArgumentException('non-nullable pensionablePay cannot be null'); + } + + + $this->container['pensionablePay'] = $pensionablePay; return $this; } diff --git a/src/Model/PensionPayCode.php b/src/Model/PensionPayCode.php index ae596fc..aee1283 100644 --- a/src/Model/PensionPayCode.php +++ b/src/Model/PensionPayCode.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PensionProvider.php b/src/Model/PensionProvider.php index 1882beb..458a62d 100644 --- a/src/Model/PensionProvider.php +++ b/src/Model/PensionProvider.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,25 +59,25 @@ class PensionProvider implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', 'accountNo' => 'string', - 'portal' => 'string', - 'website' => 'string', 'address' => '\SynergiTech\Staffology\Model\Address', - 'telephone' => 'string', - 'papdisVersion' => '\SynergiTech\Staffology\Model\PapdisVersion', - 'papdisProviderId' => 'string', - 'papdisEmployerId' => 'string', 'csvFormat' => '\SynergiTech\Staffology\Model\PensionCsvFormat', 'excludeNilPaidFromContributions' => 'bool', - 'payPeriodDateAdjustment' => 'int', + 'id' => 'string', 'miscBoolean1' => 'bool', 'miscBoolean2' => 'bool', 'miscString1' => 'string', 'miscString2' => 'string', + 'name' => 'string', 'optOutWindow' => 'int', 'optOutWindowIsMonths' => 'bool', - 'id' => 'string' + 'papdisEmployerId' => 'string', + 'papdisProviderId' => 'string', + 'papdisVersion' => '\SynergiTech\Staffology\Model\PapdisVersion', + 'payPeriodDateAdjustment' => 'int', + 'portal' => 'string', + 'telephone' => 'string', + 'website' => 'string' ]; /** @@ -86,25 +86,25 @@ class PensionProvider implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'name' => null, 'accountNo' => null, - 'portal' => 'uri', - 'website' => 'uri', 'address' => null, - 'telephone' => null, - 'papdisVersion' => null, - 'papdisProviderId' => null, - 'papdisEmployerId' => null, 'csvFormat' => null, 'excludeNilPaidFromContributions' => null, - 'payPeriodDateAdjustment' => 'int32', + 'id' => 'uuid', 'miscBoolean1' => null, 'miscBoolean2' => null, 'miscString1' => null, 'miscString2' => null, + 'name' => null, 'optOutWindow' => 'int32', 'optOutWindowIsMonths' => null, - 'id' => 'uuid' + 'papdisEmployerId' => null, + 'papdisProviderId' => null, + 'papdisVersion' => null, + 'payPeriodDateAdjustment' => 'int32', + 'portal' => 'uri', + 'telephone' => null, + 'website' => 'uri' ]; /** @@ -113,25 +113,25 @@ class PensionProvider implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'name' => false, 'accountNo' => true, - 'portal' => true, - 'website' => true, 'address' => false, - 'telephone' => true, - 'papdisVersion' => false, - 'papdisProviderId' => true, - 'papdisEmployerId' => true, 'csvFormat' => false, 'excludeNilPaidFromContributions' => false, - 'payPeriodDateAdjustment' => false, + 'id' => false, 'miscBoolean1' => false, 'miscBoolean2' => false, 'miscString1' => true, 'miscString2' => true, + 'name' => false, 'optOutWindow' => false, 'optOutWindowIsMonths' => false, - 'id' => false + 'papdisEmployerId' => true, + 'papdisProviderId' => true, + 'papdisVersion' => false, + 'payPeriodDateAdjustment' => false, + 'portal' => true, + 'telephone' => true, + 'website' => true ]; /** @@ -220,25 +220,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', 'accountNo' => 'accountNo', - 'portal' => 'portal', - 'website' => 'website', 'address' => 'address', - 'telephone' => 'telephone', - 'papdisVersion' => 'papdisVersion', - 'papdisProviderId' => 'papdisProviderId', - 'papdisEmployerId' => 'papdisEmployerId', 'csvFormat' => 'csvFormat', 'excludeNilPaidFromContributions' => 'excludeNilPaidFromContributions', - 'payPeriodDateAdjustment' => 'payPeriodDateAdjustment', + 'id' => 'id', 'miscBoolean1' => 'miscBoolean1', 'miscBoolean2' => 'miscBoolean2', 'miscString1' => 'miscString1', 'miscString2' => 'miscString2', + 'name' => 'name', 'optOutWindow' => 'optOutWindow', 'optOutWindowIsMonths' => 'optOutWindowIsMonths', - 'id' => 'id' + 'papdisEmployerId' => 'papdisEmployerId', + 'papdisProviderId' => 'papdisProviderId', + 'papdisVersion' => 'papdisVersion', + 'payPeriodDateAdjustment' => 'payPeriodDateAdjustment', + 'portal' => 'portal', + 'telephone' => 'telephone', + 'website' => 'website' ]; /** @@ -247,25 +247,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', 'accountNo' => 'setAccountNo', - 'portal' => 'setPortal', - 'website' => 'setWebsite', 'address' => 'setAddress', - 'telephone' => 'setTelephone', - 'papdisVersion' => 'setPapdisVersion', - 'papdisProviderId' => 'setPapdisProviderId', - 'papdisEmployerId' => 'setPapdisEmployerId', 'csvFormat' => 'setCsvFormat', 'excludeNilPaidFromContributions' => 'setExcludeNilPaidFromContributions', - 'payPeriodDateAdjustment' => 'setPayPeriodDateAdjustment', + 'id' => 'setId', 'miscBoolean1' => 'setMiscBoolean1', 'miscBoolean2' => 'setMiscBoolean2', 'miscString1' => 'setMiscString1', 'miscString2' => 'setMiscString2', + 'name' => 'setName', 'optOutWindow' => 'setOptOutWindow', 'optOutWindowIsMonths' => 'setOptOutWindowIsMonths', - 'id' => 'setId' + 'papdisEmployerId' => 'setPapdisEmployerId', + 'papdisProviderId' => 'setPapdisProviderId', + 'papdisVersion' => 'setPapdisVersion', + 'payPeriodDateAdjustment' => 'setPayPeriodDateAdjustment', + 'portal' => 'setPortal', + 'telephone' => 'setTelephone', + 'website' => 'setWebsite' ]; /** @@ -274,25 +274,25 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', 'accountNo' => 'getAccountNo', - 'portal' => 'getPortal', - 'website' => 'getWebsite', 'address' => 'getAddress', - 'telephone' => 'getTelephone', - 'papdisVersion' => 'getPapdisVersion', - 'papdisProviderId' => 'getPapdisProviderId', - 'papdisEmployerId' => 'getPapdisEmployerId', 'csvFormat' => 'getCsvFormat', 'excludeNilPaidFromContributions' => 'getExcludeNilPaidFromContributions', - 'payPeriodDateAdjustment' => 'getPayPeriodDateAdjustment', + 'id' => 'getId', 'miscBoolean1' => 'getMiscBoolean1', 'miscBoolean2' => 'getMiscBoolean2', 'miscString1' => 'getMiscString1', 'miscString2' => 'getMiscString2', + 'name' => 'getName', 'optOutWindow' => 'getOptOutWindow', 'optOutWindowIsMonths' => 'getOptOutWindowIsMonths', - 'id' => 'getId' + 'papdisEmployerId' => 'getPapdisEmployerId', + 'papdisProviderId' => 'getPapdisProviderId', + 'papdisVersion' => 'getPapdisVersion', + 'payPeriodDateAdjustment' => 'getPayPeriodDateAdjustment', + 'portal' => 'getPortal', + 'telephone' => 'getTelephone', + 'website' => 'getWebsite' ]; /** @@ -351,25 +351,25 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('accountNo', $data ?? [], null); - $this->setIfExists('portal', $data ?? [], null); - $this->setIfExists('website', $data ?? [], null); $this->setIfExists('address', $data ?? [], null); - $this->setIfExists('telephone', $data ?? [], null); - $this->setIfExists('papdisVersion', $data ?? [], null); - $this->setIfExists('papdisProviderId', $data ?? [], null); - $this->setIfExists('papdisEmployerId', $data ?? [], null); $this->setIfExists('csvFormat', $data ?? [], null); $this->setIfExists('excludeNilPaidFromContributions', $data ?? [], null); - $this->setIfExists('payPeriodDateAdjustment', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('miscBoolean1', $data ?? [], null); $this->setIfExists('miscBoolean2', $data ?? [], null); $this->setIfExists('miscString1', $data ?? [], null); $this->setIfExists('miscString2', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('optOutWindow', $data ?? [], null); $this->setIfExists('optOutWindowIsMonths', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('papdisEmployerId', $data ?? [], null); + $this->setIfExists('papdisProviderId', $data ?? [], null); + $this->setIfExists('papdisVersion', $data ?? [], null); + $this->setIfExists('payPeriodDateAdjustment', $data ?? [], null); + $this->setIfExists('portal', $data ?? [], null); + $this->setIfExists('telephone', $data ?? [], null); + $this->setIfExists('website', $data ?? [], null); } /** @@ -399,6 +399,18 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if (!is_null($this->container['accountNo']) && (mb_strlen($this->container['accountNo']) > 100)) { + $invalidProperties[] = "invalid value for 'accountNo', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['miscString1']) && (mb_strlen($this->container['miscString1']) > 50)) { + $invalidProperties[] = "invalid value for 'miscString1', the character length must be smaller than or equal to 50."; + } + + if (!is_null($this->container['miscString2']) && (mb_strlen($this->container['miscString2']) > 50)) { + $invalidProperties[] = "invalid value for 'miscString2', the character length must be smaller than or equal to 50."; + } + if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } @@ -410,36 +422,24 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['accountNo']) && (mb_strlen($this->container['accountNo']) > 100)) { - $invalidProperties[] = "invalid value for 'accountNo', the character length must be smaller than or equal to 100."; - } - - if (!is_null($this->container['portal']) && (mb_strlen($this->container['portal']) > 100)) { - $invalidProperties[] = "invalid value for 'portal', the character length must be smaller than or equal to 100."; - } - - if (!is_null($this->container['website']) && (mb_strlen($this->container['website']) > 100)) { - $invalidProperties[] = "invalid value for 'website', the character length must be smaller than or equal to 100."; - } - - if (!is_null($this->container['telephone']) && (mb_strlen($this->container['telephone']) > 100)) { - $invalidProperties[] = "invalid value for 'telephone', the character length must be smaller than or equal to 100."; + if (!is_null($this->container['papdisEmployerId']) && (mb_strlen($this->container['papdisEmployerId']) > 40)) { + $invalidProperties[] = "invalid value for 'papdisEmployerId', the character length must be smaller than or equal to 40."; } if (!is_null($this->container['papdisProviderId']) && (mb_strlen($this->container['papdisProviderId']) > 35)) { $invalidProperties[] = "invalid value for 'papdisProviderId', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['papdisEmployerId']) && (mb_strlen($this->container['papdisEmployerId']) > 40)) { - $invalidProperties[] = "invalid value for 'papdisEmployerId', the character length must be smaller than or equal to 40."; + if (!is_null($this->container['portal']) && (mb_strlen($this->container['portal']) > 100)) { + $invalidProperties[] = "invalid value for 'portal', the character length must be smaller than or equal to 100."; } - if (!is_null($this->container['miscString1']) && (mb_strlen($this->container['miscString1']) > 50)) { - $invalidProperties[] = "invalid value for 'miscString1', the character length must be smaller than or equal to 50."; + if (!is_null($this->container['telephone']) && (mb_strlen($this->container['telephone']) > 100)) { + $invalidProperties[] = "invalid value for 'telephone', the character length must be smaller than or equal to 100."; } - if (!is_null($this->container['miscString2']) && (mb_strlen($this->container['miscString2']) > 50)) { - $invalidProperties[] = "invalid value for 'miscString2', the character length must be smaller than or equal to 50."; + if (!is_null($this->container['website']) && (mb_strlen($this->container['website']) > 100)) { + $invalidProperties[] = "invalid value for 'website', the character length must be smaller than or equal to 100."; } return $invalidProperties; @@ -457,40 +457,6 @@ public function valid(): bool } - /** - * Gets name - * - * @return string - */ - public function getName(): string - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return $this - */ - public function setName(string $name): static - { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); - } - if ((mb_strlen($name) > 100)) { - throw new InvalidArgumentException('invalid length for $name when calling PensionProvider., must be smaller than or equal to 100.'); - } - if ((mb_strlen($name) < 1)) { - throw new InvalidArgumentException('invalid length for $name when calling PensionProvider., must be bigger than or equal to 1.'); - } - - $this->container['name'] = $name; - - return $this; - } - /** * Gets accountNo * @@ -530,537 +496,571 @@ public function setAccountNo(?string $accountNo): static } /** - * Gets portal + * Gets address * - * @return string|null + * @return \SynergiTech\Staffology\Model\Address|null */ - public function getPortal(): ?string + public function getAddress(): ?\SynergiTech\Staffology\Model\Address { - return $this->container['portal']; + return $this->container['address']; } /** - * Sets portal + * Sets address * - * @param string|null $portal portal + * @param \SynergiTech\Staffology\Model\Address|null $address address * * @return $this */ - public function setPortal(?string $portal): static + public function setAddress(?\SynergiTech\Staffology\Model\Address $address): static { - if (is_null($portal)) { - array_push($this->openAPINullablesSetToNull, 'portal'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('portal', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($portal) && (mb_strlen($portal) > 100)) { - throw new InvalidArgumentException('invalid length for $portal when calling PensionProvider., must be smaller than or equal to 100.'); + if (is_null($address)) { + throw new InvalidArgumentException('non-nullable address cannot be null'); } - - $this->container['portal'] = $portal; + $this->container['address'] = $address; return $this; } /** - * Gets website + * Gets csvFormat * - * @return string|null + * @return \SynergiTech\Staffology\Model\PensionCsvFormat|null */ - public function getWebsite(): ?string + public function getCsvFormat(): ?\SynergiTech\Staffology\Model\PensionCsvFormat { - return $this->container['website']; + return $this->container['csvFormat']; } /** - * Sets website + * Sets csvFormat * - * @param string|null $website website + * @param \SynergiTech\Staffology\Model\PensionCsvFormat|null $csvFormat csvFormat * * @return $this */ - public function setWebsite(?string $website): static + public function setCsvFormat(?\SynergiTech\Staffology\Model\PensionCsvFormat $csvFormat): static { - if (is_null($website)) { - array_push($this->openAPINullablesSetToNull, 'website'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('website', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($website) && (mb_strlen($website) > 100)) { - throw new InvalidArgumentException('invalid length for $website when calling PensionProvider., must be smaller than or equal to 100.'); + if (is_null($csvFormat)) { + throw new InvalidArgumentException('non-nullable csvFormat cannot be null'); } - - $this->container['website'] = $website; + $this->container['csvFormat'] = $csvFormat; return $this; } /** - * Gets address + * Gets excludeNilPaidFromContributions * - * @return \SynergiTech\Staffology\Model\Address|null + * @return bool|null */ - public function getAddress(): ?\SynergiTech\Staffology\Model\Address + public function getExcludeNilPaidFromContributions(): ?bool { - return $this->container['address']; + return $this->container['excludeNilPaidFromContributions']; } /** - * Sets address + * Sets excludeNilPaidFromContributions * - * @param \SynergiTech\Staffology\Model\Address|null $address address + * @param bool|null $excludeNilPaidFromContributions If we're sending contributions to an external provider then we'll include all employees that were on the payrun. If you want to exclude employees that don't have any contributions to report then set this to true. * * @return $this */ - public function setAddress(?\SynergiTech\Staffology\Model\Address $address): static + public function setExcludeNilPaidFromContributions(?bool $excludeNilPaidFromContributions): static { - if (is_null($address)) { - throw new InvalidArgumentException('non-nullable address cannot be null'); + if (is_null($excludeNilPaidFromContributions)) { + throw new InvalidArgumentException('non-nullable excludeNilPaidFromContributions cannot be null'); } - $this->container['address'] = $address; + $this->container['excludeNilPaidFromContributions'] = $excludeNilPaidFromContributions; return $this; } /** - * Gets telephone + * Gets id * * @return string|null */ - public function getTelephone(): ?string + public function getId(): ?string { - return $this->container['telephone']; + return $this->container['id']; } /** - * Sets telephone + * Sets id * - * @param string|null $telephone telephone + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setTelephone(?string $telephone): static + public function setId(?string $id): static { - if (is_null($telephone)) { - array_push($this->openAPINullablesSetToNull, 'telephone'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('telephone', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($telephone) && (mb_strlen($telephone) > 100)) { - throw new InvalidArgumentException('invalid length for $telephone when calling PensionProvider., must be smaller than or equal to 100.'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - - $this->container['telephone'] = $telephone; + $this->container['id'] = $id; return $this; } /** - * Gets papdisVersion + * Gets miscBoolean1 * - * @return \SynergiTech\Staffology\Model\PapdisVersion|null + * @return bool|null */ - public function getPapdisVersion(): ?\SynergiTech\Staffology\Model\PapdisVersion + public function getMiscBoolean1(): ?bool { - return $this->container['papdisVersion']; + return $this->container['miscBoolean1']; } /** - * Sets papdisVersion + * Sets miscBoolean1 * - * @param \SynergiTech\Staffology\Model\PapdisVersion|null $papdisVersion papdisVersion + * @param bool|null $miscBoolean1 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\" * * @return $this */ - public function setPapdisVersion(?\SynergiTech\Staffology\Model\PapdisVersion $papdisVersion): static + public function setMiscBoolean1(?bool $miscBoolean1): static { - if (is_null($papdisVersion)) { - throw new InvalidArgumentException('non-nullable papdisVersion cannot be null'); + if (is_null($miscBoolean1)) { + throw new InvalidArgumentException('non-nullable miscBoolean1 cannot be null'); } - $this->container['papdisVersion'] = $papdisVersion; + $this->container['miscBoolean1'] = $miscBoolean1; return $this; } /** - * Gets papdisProviderId + * Gets miscBoolean2 * - * @return string|null + * @return bool|null */ - public function getPapdisProviderId(): ?string + public function getMiscBoolean2(): ?bool { - return $this->container['papdisProviderId']; + return $this->container['miscBoolean2']; } /** - * Sets papdisProviderId + * Sets miscBoolean2 * - * @param string|null $papdisProviderId papdisProviderId + * @param bool|null $miscBoolean2 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not to approve payments after submitting contributions * * @return $this */ - public function setPapdisProviderId(?string $papdisProviderId): static + public function setMiscBoolean2(?bool $miscBoolean2): static { - if (is_null($papdisProviderId)) { - array_push($this->openAPINullablesSetToNull, 'papdisProviderId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisProviderId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($papdisProviderId) && (mb_strlen($papdisProviderId) > 35)) { - throw new InvalidArgumentException('invalid length for $papdisProviderId when calling PensionProvider., must be smaller than or equal to 35.'); + if (is_null($miscBoolean2)) { + throw new InvalidArgumentException('non-nullable miscBoolean2 cannot be null'); } - - $this->container['papdisProviderId'] = $papdisProviderId; + $this->container['miscBoolean2'] = $miscBoolean2; return $this; } /** - * Gets papdisEmployerId + * Gets miscString1 * * @return string|null */ - public function getPapdisEmployerId(): ?string + public function getMiscString1(): ?string { - return $this->container['papdisEmployerId']; + return $this->container['miscString1']; } /** - * Sets papdisEmployerId + * Sets miscString1 * - * @param string|null $papdisEmployerId papdisEmployerId + * @param string|null $miscString1 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it dictates the PaymentSource. * * @return $this */ - public function setPapdisEmployerId(?string $papdisEmployerId): static + public function setMiscString1(?string $miscString1): static { - if (is_null($papdisEmployerId)) { - array_push($this->openAPINullablesSetToNull, 'papdisEmployerId'); + if (is_null($miscString1)) { + array_push($this->openAPINullablesSetToNull, 'miscString1'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisEmployerId', $nullablesSetToNull); + $index = array_search('miscString1', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($papdisEmployerId) && (mb_strlen($papdisEmployerId) > 40)) { - throw new InvalidArgumentException('invalid length for $papdisEmployerId when calling PensionProvider., must be smaller than or equal to 40.'); + if (!is_null($miscString1) && (mb_strlen($miscString1) > 50)) { + throw new InvalidArgumentException('invalid length for $miscString1 when calling PensionProvider., must be smaller than or equal to 50.'); } - $this->container['papdisEmployerId'] = $papdisEmployerId; + $this->container['miscString1'] = $miscString1; return $this; } /** - * Gets csvFormat + * Gets miscString2 * - * @return \SynergiTech\Staffology\Model\PensionCsvFormat|null + * @return string|null */ - public function getCsvFormat(): ?\SynergiTech\Staffology\Model\PensionCsvFormat + public function getMiscString2(): ?string { - return $this->container['csvFormat']; + return $this->container['miscString2']; } /** - * Sets csvFormat + * Sets miscString2 * - * @param \SynergiTech\Staffology\Model\PensionCsvFormat|null $csvFormat csvFormat + * @param string|null $miscString2 This field has different uses dependent on the ExternalDataProvider, if any. * * @return $this */ - public function setCsvFormat(?\SynergiTech\Staffology\Model\PensionCsvFormat $csvFormat): static + public function setMiscString2(?string $miscString2): static { - if (is_null($csvFormat)) { - throw new InvalidArgumentException('non-nullable csvFormat cannot be null'); + if (is_null($miscString2)) { + array_push($this->openAPINullablesSetToNull, 'miscString2'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('miscString2', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['csvFormat'] = $csvFormat; + if (!is_null($miscString2) && (mb_strlen($miscString2) > 50)) { + throw new InvalidArgumentException('invalid length for $miscString2 when calling PensionProvider., must be smaller than or equal to 50.'); + } + + $this->container['miscString2'] = $miscString2; return $this; } /** - * Gets excludeNilPaidFromContributions + * Gets name * - * @return bool|null + * @return string */ - public function getExcludeNilPaidFromContributions(): ?bool + public function getName(): string { - return $this->container['excludeNilPaidFromContributions']; + return $this->container['name']; } /** - * Sets excludeNilPaidFromContributions + * Sets name * - * @param bool|null $excludeNilPaidFromContributions If we're sending contributions to an external provider then we'll include all employees that were on the payrun. If you want to exclude employees that don't have any contributions to report then set this to true. + * @param string $name name * * @return $this */ - public function setExcludeNilPaidFromContributions(?bool $excludeNilPaidFromContributions): static + public function setName(string $name): static { - if (is_null($excludeNilPaidFromContributions)) { - throw new InvalidArgumentException('non-nullable excludeNilPaidFromContributions cannot be null'); + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['excludeNilPaidFromContributions'] = $excludeNilPaidFromContributions; + if ((mb_strlen($name) > 100)) { + throw new InvalidArgumentException('invalid length for $name when calling PensionProvider., must be smaller than or equal to 100.'); + } + if ((mb_strlen($name) < 1)) { + throw new InvalidArgumentException('invalid length for $name when calling PensionProvider., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; return $this; } /** - * Gets payPeriodDateAdjustment + * Gets optOutWindow * * @return int|null */ - public function getPayPeriodDateAdjustment(): ?int + public function getOptOutWindow(): ?int { - return $this->container['payPeriodDateAdjustment']; + return $this->container['optOutWindow']; } /** - * Sets payPeriodDateAdjustment + * Sets optOutWindow * - * @param int|null $payPeriodDateAdjustment If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here. A negative value of will move the date back in time. + * @param int|null $optOutWindow The number of days or months that an employee has to Opt out after being enrolled * * @return $this */ - public function setPayPeriodDateAdjustment(?int $payPeriodDateAdjustment): static + public function setOptOutWindow(?int $optOutWindow): static { - if (is_null($payPeriodDateAdjustment)) { - throw new InvalidArgumentException('non-nullable payPeriodDateAdjustment cannot be null'); + if (is_null($optOutWindow)) { + throw new InvalidArgumentException('non-nullable optOutWindow cannot be null'); } - $this->container['payPeriodDateAdjustment'] = $payPeriodDateAdjustment; + $this->container['optOutWindow'] = $optOutWindow; return $this; } /** - * Gets miscBoolean1 + * Gets optOutWindowIsMonths * * @return bool|null */ - public function getMiscBoolean1(): ?bool + public function getOptOutWindowIsMonths(): ?bool { - return $this->container['miscBoolean1']; + return $this->container['optOutWindowIsMonths']; } /** - * Sets miscBoolean1 + * Sets optOutWindowIsMonths * - * @param bool|null $miscBoolean1 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not contributions are reported as \"Tax Weekly/Monthly\" rather than just \"Weekly/Monthly\" + * @param bool|null $optOutWindowIsMonths Determines whether the value given for OptOutWindow is in Months (true) or days (false) * * @return $this */ - public function setMiscBoolean1(?bool $miscBoolean1): static + public function setOptOutWindowIsMonths(?bool $optOutWindowIsMonths): static { - if (is_null($miscBoolean1)) { - throw new InvalidArgumentException('non-nullable miscBoolean1 cannot be null'); + if (is_null($optOutWindowIsMonths)) { + throw new InvalidArgumentException('non-nullable optOutWindowIsMonths cannot be null'); } - $this->container['miscBoolean1'] = $miscBoolean1; + $this->container['optOutWindowIsMonths'] = $optOutWindowIsMonths; return $this; } /** - * Gets miscBoolean2 + * Gets papdisEmployerId * - * @return bool|null + * @return string|null */ - public function getMiscBoolean2(): ?bool + public function getPapdisEmployerId(): ?string { - return $this->container['miscBoolean2']; + return $this->container['papdisEmployerId']; } /** - * Sets miscBoolean2 + * Sets papdisEmployerId * - * @param bool|null $miscBoolean2 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it indicates whether or not to approve payments after submitting contributions + * @param string|null $papdisEmployerId papdisEmployerId * * @return $this */ - public function setMiscBoolean2(?bool $miscBoolean2): static + public function setPapdisEmployerId(?string $papdisEmployerId): static { - if (is_null($miscBoolean2)) { - throw new InvalidArgumentException('non-nullable miscBoolean2 cannot be null'); + if (is_null($papdisEmployerId)) { + array_push($this->openAPINullablesSetToNull, 'papdisEmployerId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('papdisEmployerId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['miscBoolean2'] = $miscBoolean2; + if (!is_null($papdisEmployerId) && (mb_strlen($papdisEmployerId) > 40)) { + throw new InvalidArgumentException('invalid length for $papdisEmployerId when calling PensionProvider., must be smaller than or equal to 40.'); + } + + $this->container['papdisEmployerId'] = $papdisEmployerId; return $this; } /** - * Gets miscString1 + * Gets papdisProviderId * * @return string|null */ - public function getMiscString1(): ?string + public function getPapdisProviderId(): ?string { - return $this->container['miscString1']; + return $this->container['papdisProviderId']; } /** - * Sets miscString1 + * Sets papdisProviderId * - * @param string|null $miscString1 This field has different uses dependent on the ExternalDataProvider, if any. For Nest, it dictates the PaymentSource. + * @param string|null $papdisProviderId papdisProviderId * * @return $this */ - public function setMiscString1(?string $miscString1): static + public function setPapdisProviderId(?string $papdisProviderId): static { - if (is_null($miscString1)) { - array_push($this->openAPINullablesSetToNull, 'miscString1'); + if (is_null($papdisProviderId)) { + array_push($this->openAPINullablesSetToNull, 'papdisProviderId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('miscString1', $nullablesSetToNull); + $index = array_search('papdisProviderId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($miscString1) && (mb_strlen($miscString1) > 50)) { - throw new InvalidArgumentException('invalid length for $miscString1 when calling PensionProvider., must be smaller than or equal to 50.'); + if (!is_null($papdisProviderId) && (mb_strlen($papdisProviderId) > 35)) { + throw new InvalidArgumentException('invalid length for $papdisProviderId when calling PensionProvider., must be smaller than or equal to 35.'); } - $this->container['miscString1'] = $miscString1; + $this->container['papdisProviderId'] = $papdisProviderId; return $this; } /** - * Gets miscString2 + * Gets papdisVersion * - * @return string|null + * @return \SynergiTech\Staffology\Model\PapdisVersion|null */ - public function getMiscString2(): ?string + public function getPapdisVersion(): ?\SynergiTech\Staffology\Model\PapdisVersion { - return $this->container['miscString2']; + return $this->container['papdisVersion']; } /** - * Sets miscString2 + * Sets papdisVersion * - * @param string|null $miscString2 This field has different uses dependent on the ExternalDataProvider, if any. + * @param \SynergiTech\Staffology\Model\PapdisVersion|null $papdisVersion papdisVersion * * @return $this */ - public function setMiscString2(?string $miscString2): static + public function setPapdisVersion(?\SynergiTech\Staffology\Model\PapdisVersion $papdisVersion): static { - if (is_null($miscString2)) { - array_push($this->openAPINullablesSetToNull, 'miscString2'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('miscString2', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($miscString2) && (mb_strlen($miscString2) > 50)) { - throw new InvalidArgumentException('invalid length for $miscString2 when calling PensionProvider., must be smaller than or equal to 50.'); + if (is_null($papdisVersion)) { + throw new InvalidArgumentException('non-nullable papdisVersion cannot be null'); } - - $this->container['miscString2'] = $miscString2; + $this->container['papdisVersion'] = $papdisVersion; return $this; } /** - * Gets optOutWindow + * Gets payPeriodDateAdjustment * * @return int|null */ - public function getOptOutWindow(): ?int + public function getPayPeriodDateAdjustment(): ?int { - return $this->container['optOutWindow']; + return $this->container['payPeriodDateAdjustment']; } /** - * Sets optOutWindow + * Sets payPeriodDateAdjustment * - * @param int|null $optOutWindow The number of days or months that an employee has to Opt out after being enrolled + * @param int|null $payPeriodDateAdjustment If you need to adjust the reported dates of the contributions then you can do so by setting a non-zero value here. A negative value of will move the date back in time. * * @return $this */ - public function setOptOutWindow(?int $optOutWindow): static + public function setPayPeriodDateAdjustment(?int $payPeriodDateAdjustment): static { - if (is_null($optOutWindow)) { - throw new InvalidArgumentException('non-nullable optOutWindow cannot be null'); + if (is_null($payPeriodDateAdjustment)) { + throw new InvalidArgumentException('non-nullable payPeriodDateAdjustment cannot be null'); } - $this->container['optOutWindow'] = $optOutWindow; + $this->container['payPeriodDateAdjustment'] = $payPeriodDateAdjustment; return $this; } /** - * Gets optOutWindowIsMonths + * Gets portal * - * @return bool|null + * @return string|null */ - public function getOptOutWindowIsMonths(): ?bool + public function getPortal(): ?string { - return $this->container['optOutWindowIsMonths']; + return $this->container['portal']; } /** - * Sets optOutWindowIsMonths + * Sets portal * - * @param bool|null $optOutWindowIsMonths Determines whether the value given for OptOutWindow is in Months (true) or days (false) + * @param string|null $portal portal * * @return $this */ - public function setOptOutWindowIsMonths(?bool $optOutWindowIsMonths): static + public function setPortal(?string $portal): static { - if (is_null($optOutWindowIsMonths)) { - throw new InvalidArgumentException('non-nullable optOutWindowIsMonths cannot be null'); + if (is_null($portal)) { + array_push($this->openAPINullablesSetToNull, 'portal'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('portal', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($portal) && (mb_strlen($portal) > 100)) { + throw new InvalidArgumentException('invalid length for $portal when calling PensionProvider., must be smaller than or equal to 100.'); } - $this->container['optOutWindowIsMonths'] = $optOutWindowIsMonths; + + $this->container['portal'] = $portal; return $this; } /** - * Gets id + * Gets telephone * * @return string|null */ - public function getId(): ?string + public function getTelephone(): ?string { - return $this->container['id']; + return $this->container['telephone']; } /** - * Sets id + * Sets telephone * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $telephone telephone * * @return $this */ - public function setId(?string $id): static + public function setTelephone(?string $telephone): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($telephone)) { + array_push($this->openAPINullablesSetToNull, 'telephone'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('telephone', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + if (!is_null($telephone) && (mb_strlen($telephone) > 100)) { + throw new InvalidArgumentException('invalid length for $telephone when calling PensionProvider., must be smaller than or equal to 100.'); + } + + $this->container['telephone'] = $telephone; + + return $this; + } + + /** + * Gets website + * + * @return string|null + */ + public function getWebsite(): ?string + { + return $this->container['website']; + } + + /** + * Sets website + * + * @param string|null $website website + * + * @return $this + */ + public function setWebsite(?string $website): static + { + if (is_null($website)) { + array_push($this->openAPINullablesSetToNull, 'website'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('website', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($website) && (mb_strlen($website) > 100)) { + throw new InvalidArgumentException('invalid length for $website when calling PensionProvider., must be smaller than or equal to 100.'); + } + + $this->container['website'] = $website; return $this; } diff --git a/src/Model/PensionRefund.php b/src/Model/PensionRefund.php index 43cb94a..0bdc732 100644 --- a/src/Model/PensionRefund.php +++ b/src/Model/PensionRefund.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,21 +60,21 @@ class PensionRefund implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'additionalVoluntaryContribution' => 'float', + 'assumedPensionablePay' => 'float', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'employeeRefund' => 'float', 'employerRefund' => 'float', - 'pensionSchemeUniqueId' => 'string', - 'pensionUniqueId' => 'string', + 'id' => 'string', + 'isPreviousTaxYearRefund' => 'bool', 'payInCurrentPayRun' => 'bool', 'payRun' => '\SynergiTech\Staffology\Model\Item', + 'pensionSchemeUniqueId' => 'string', + 'pensionUniqueId' => 'string', 'pensionableEarning' => 'float', 'pensionablePay' => 'float', - 'additionalVoluntaryContribution' => 'float', - 'assumedPensionablePay' => 'float', - 'isPreviousTaxYearRefund' => 'bool', 'tierName' => 'string', - 'tierRate' => 'float', - 'employee' => '\SynergiTech\Staffology\Model\Item', - 'id' => 'string' + 'tierRate' => 'float' ]; /** @@ -83,21 +83,21 @@ class PensionRefund implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'additionalVoluntaryContribution' => 'double', + 'assumedPensionablePay' => 'double', + 'employee' => null, 'employeeRefund' => 'double', 'employerRefund' => 'double', - 'pensionSchemeUniqueId' => 'uuid', - 'pensionUniqueId' => 'uuid', + 'id' => 'uuid', + 'isPreviousTaxYearRefund' => null, 'payInCurrentPayRun' => null, 'payRun' => null, + 'pensionSchemeUniqueId' => 'uuid', + 'pensionUniqueId' => 'uuid', 'pensionableEarning' => 'double', 'pensionablePay' => 'double', - 'additionalVoluntaryContribution' => 'double', - 'assumedPensionablePay' => 'double', - 'isPreviousTaxYearRefund' => null, 'tierName' => null, - 'tierRate' => 'double', - 'employee' => null, - 'id' => 'uuid' + 'tierRate' => 'double' ]; /** @@ -106,21 +106,21 @@ class PensionRefund implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'additionalVoluntaryContribution' => false, + 'assumedPensionablePay' => false, + 'employee' => false, 'employeeRefund' => false, 'employerRefund' => false, - 'pensionSchemeUniqueId' => false, - 'pensionUniqueId' => false, + 'id' => false, + 'isPreviousTaxYearRefund' => false, 'payInCurrentPayRun' => false, 'payRun' => false, + 'pensionSchemeUniqueId' => false, + 'pensionUniqueId' => false, 'pensionableEarning' => false, 'pensionablePay' => false, - 'additionalVoluntaryContribution' => false, - 'assumedPensionablePay' => false, - 'isPreviousTaxYearRefund' => false, 'tierName' => true, - 'tierRate' => true, - 'employee' => false, - 'id' => false + 'tierRate' => true ]; /** @@ -209,21 +209,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'additionalVoluntaryContribution' => 'additionalVoluntaryContribution', + 'assumedPensionablePay' => 'assumedPensionablePay', + 'employee' => 'employee', 'employeeRefund' => 'employeeRefund', 'employerRefund' => 'employerRefund', - 'pensionSchemeUniqueId' => 'pensionSchemeUniqueId', - 'pensionUniqueId' => 'pensionUniqueId', + 'id' => 'id', + 'isPreviousTaxYearRefund' => 'isPreviousTaxYearRefund', 'payInCurrentPayRun' => 'payInCurrentPayRun', 'payRun' => 'payRun', + 'pensionSchemeUniqueId' => 'pensionSchemeUniqueId', + 'pensionUniqueId' => 'pensionUniqueId', 'pensionableEarning' => 'pensionableEarning', 'pensionablePay' => 'pensionablePay', - 'additionalVoluntaryContribution' => 'additionalVoluntaryContribution', - 'assumedPensionablePay' => 'assumedPensionablePay', - 'isPreviousTaxYearRefund' => 'isPreviousTaxYearRefund', 'tierName' => 'tierName', - 'tierRate' => 'tierRate', - 'employee' => 'employee', - 'id' => 'id' + 'tierRate' => 'tierRate' ]; /** @@ -232,21 +232,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'additionalVoluntaryContribution' => 'setAdditionalVoluntaryContribution', + 'assumedPensionablePay' => 'setAssumedPensionablePay', + 'employee' => 'setEmployee', 'employeeRefund' => 'setEmployeeRefund', 'employerRefund' => 'setEmployerRefund', - 'pensionSchemeUniqueId' => 'setPensionSchemeUniqueId', - 'pensionUniqueId' => 'setPensionUniqueId', + 'id' => 'setId', + 'isPreviousTaxYearRefund' => 'setIsPreviousTaxYearRefund', 'payInCurrentPayRun' => 'setPayInCurrentPayRun', 'payRun' => 'setPayRun', + 'pensionSchemeUniqueId' => 'setPensionSchemeUniqueId', + 'pensionUniqueId' => 'setPensionUniqueId', 'pensionableEarning' => 'setPensionableEarning', 'pensionablePay' => 'setPensionablePay', - 'additionalVoluntaryContribution' => 'setAdditionalVoluntaryContribution', - 'assumedPensionablePay' => 'setAssumedPensionablePay', - 'isPreviousTaxYearRefund' => 'setIsPreviousTaxYearRefund', 'tierName' => 'setTierName', - 'tierRate' => 'setTierRate', - 'employee' => 'setEmployee', - 'id' => 'setId' + 'tierRate' => 'setTierRate' ]; /** @@ -255,21 +255,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'additionalVoluntaryContribution' => 'getAdditionalVoluntaryContribution', + 'assumedPensionablePay' => 'getAssumedPensionablePay', + 'employee' => 'getEmployee', 'employeeRefund' => 'getEmployeeRefund', 'employerRefund' => 'getEmployerRefund', - 'pensionSchemeUniqueId' => 'getPensionSchemeUniqueId', - 'pensionUniqueId' => 'getPensionUniqueId', + 'id' => 'getId', + 'isPreviousTaxYearRefund' => 'getIsPreviousTaxYearRefund', 'payInCurrentPayRun' => 'getPayInCurrentPayRun', 'payRun' => 'getPayRun', + 'pensionSchemeUniqueId' => 'getPensionSchemeUniqueId', + 'pensionUniqueId' => 'getPensionUniqueId', 'pensionableEarning' => 'getPensionableEarning', 'pensionablePay' => 'getPensionablePay', - 'additionalVoluntaryContribution' => 'getAdditionalVoluntaryContribution', - 'assumedPensionablePay' => 'getAssumedPensionablePay', - 'isPreviousTaxYearRefund' => 'getIsPreviousTaxYearRefund', 'tierName' => 'getTierName', - 'tierRate' => 'getTierRate', - 'employee' => 'getEmployee', - 'id' => 'getId' + 'tierRate' => 'getTierRate' ]; /** @@ -328,21 +328,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('additionalVoluntaryContribution', $data ?? [], null); + $this->setIfExists('assumedPensionablePay', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('employeeRefund', $data ?? [], null); $this->setIfExists('employerRefund', $data ?? [], null); - $this->setIfExists('pensionSchemeUniqueId', $data ?? [], null); - $this->setIfExists('pensionUniqueId', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isPreviousTaxYearRefund', $data ?? [], null); $this->setIfExists('payInCurrentPayRun', $data ?? [], null); $this->setIfExists('payRun', $data ?? [], null); + $this->setIfExists('pensionSchemeUniqueId', $data ?? [], null); + $this->setIfExists('pensionUniqueId', $data ?? [], null); $this->setIfExists('pensionableEarning', $data ?? [], null); $this->setIfExists('pensionablePay', $data ?? [], null); - $this->setIfExists('additionalVoluntaryContribution', $data ?? [], null); - $this->setIfExists('assumedPensionablePay', $data ?? [], null); - $this->setIfExists('isPreviousTaxYearRefund', $data ?? [], null); $this->setIfExists('tierName', $data ?? [], null); $this->setIfExists('tierRate', $data ?? [], null); - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); } /** @@ -372,27 +372,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if ($this->container['additionalVoluntaryContribution'] === null) { + $invalidProperties[] = "'additionalVoluntaryContribution' can't be null"; + } + if ($this->container['assumedPensionablePay'] === null) { + $invalidProperties[] = "'assumedPensionablePay' can't be null"; + } if ($this->container['employeeRefund'] === null) { $invalidProperties[] = "'employeeRefund' can't be null"; } if ($this->container['employerRefund'] === null) { $invalidProperties[] = "'employerRefund' can't be null"; } + if ($this->container['isPreviousTaxYearRefund'] === null) { + $invalidProperties[] = "'isPreviousTaxYearRefund' can't be null"; + } if ($this->container['pensionableEarning'] === null) { $invalidProperties[] = "'pensionableEarning' can't be null"; } if ($this->container['pensionablePay'] === null) { $invalidProperties[] = "'pensionablePay' can't be null"; } - if ($this->container['additionalVoluntaryContribution'] === null) { - $invalidProperties[] = "'additionalVoluntaryContribution' can't be null"; - } - if ($this->container['assumedPensionablePay'] === null) { - $invalidProperties[] = "'assumedPensionablePay' can't be null"; - } - if ($this->container['isPreviousTaxYearRefund'] === null) { - $invalidProperties[] = "'isPreviousTaxYearRefund' can't be null"; - } if (!is_null($this->container['tierName']) && (mb_strlen($this->container['tierName']) < 1)) { $invalidProperties[] = "invalid value for 'tierName', the character length must be bigger than or equal to 1."; } @@ -420,6 +420,87 @@ public function valid(): bool } + /** + * Gets additionalVoluntaryContribution + * + * @return float + */ + public function getAdditionalVoluntaryContribution(): float + { + return $this->container['additionalVoluntaryContribution']; + } + + /** + * Sets additionalVoluntaryContribution + * + * @param float $additionalVoluntaryContribution additionalVoluntaryContribution + * + * @return $this + */ + public function setAdditionalVoluntaryContribution(float $additionalVoluntaryContribution): static + { + if (is_null($additionalVoluntaryContribution)) { + throw new InvalidArgumentException('non-nullable additionalVoluntaryContribution cannot be null'); + } + $this->container['additionalVoluntaryContribution'] = $additionalVoluntaryContribution; + + return $this; + } + + /** + * Gets assumedPensionablePay + * + * @return float + */ + public function getAssumedPensionablePay(): float + { + return $this->container['assumedPensionablePay']; + } + + /** + * Sets assumedPensionablePay + * + * @param float $assumedPensionablePay assumedPensionablePay + * + * @return $this + */ + public function setAssumedPensionablePay(float $assumedPensionablePay): static + { + if (is_null($assumedPensionablePay)) { + throw new InvalidArgumentException('non-nullable assumedPensionablePay cannot be null'); + } + $this->container['assumedPensionablePay'] = $assumedPensionablePay; + + return $this; + } + + /** + * Gets employee + * + * @return \SynergiTech\Staffology\Model\Item|null + */ + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + { + return $this->container['employee']; + } + + /** + * Sets employee + * + * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * + * @return $this + */ + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + { + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); + } + $this->container['employee'] = $employee; + + return $this; + } + /** * Gets employeeRefund * @@ -475,55 +556,55 @@ public function setEmployerRefund(float $employerRefund): static } /** - * Gets pensionSchemeUniqueId + * Gets id * * @return string|null */ - public function getPensionSchemeUniqueId(): ?string + public function getId(): ?string { - return $this->container['pensionSchemeUniqueId']; + return $this->container['id']; } /** - * Sets pensionSchemeUniqueId + * Sets id * - * @param string|null $pensionSchemeUniqueId pensionSchemeUniqueId + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setPensionSchemeUniqueId(?string $pensionSchemeUniqueId): static + public function setId(?string $id): static { - if (is_null($pensionSchemeUniqueId)) { - throw new InvalidArgumentException('non-nullable pensionSchemeUniqueId cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['pensionSchemeUniqueId'] = $pensionSchemeUniqueId; + $this->container['id'] = $id; return $this; } /** - * Gets pensionUniqueId + * Gets isPreviousTaxYearRefund * - * @return string|null + * @return bool */ - public function getPensionUniqueId(): ?string + public function getIsPreviousTaxYearRefund(): bool { - return $this->container['pensionUniqueId']; + return $this->container['isPreviousTaxYearRefund']; } /** - * Sets pensionUniqueId + * Sets isPreviousTaxYearRefund * - * @param string|null $pensionUniqueId pensionUniqueId + * @param bool $isPreviousTaxYearRefund isPreviousTaxYearRefund * * @return $this */ - public function setPensionUniqueId(?string $pensionUniqueId): static + public function setIsPreviousTaxYearRefund(bool $isPreviousTaxYearRefund): static { - if (is_null($pensionUniqueId)) { - throw new InvalidArgumentException('non-nullable pensionUniqueId cannot be null'); + if (is_null($isPreviousTaxYearRefund)) { + throw new InvalidArgumentException('non-nullable isPreviousTaxYearRefund cannot be null'); } - $this->container['pensionUniqueId'] = $pensionUniqueId; + $this->container['isPreviousTaxYearRefund'] = $isPreviousTaxYearRefund; return $this; } @@ -583,136 +664,109 @@ public function setPayRun(?\SynergiTech\Staffology\Model\Item $payRun): static } /** - * Gets pensionableEarning + * Gets pensionSchemeUniqueId * - * @return float + * @return string|null */ - public function getPensionableEarning(): float + public function getPensionSchemeUniqueId(): ?string { - return $this->container['pensionableEarning']; + return $this->container['pensionSchemeUniqueId']; } /** - * Sets pensionableEarning + * Sets pensionSchemeUniqueId * - * @param float $pensionableEarning pensionableEarning + * @param string|null $pensionSchemeUniqueId pensionSchemeUniqueId * * @return $this */ - public function setPensionableEarning(float $pensionableEarning): static + public function setPensionSchemeUniqueId(?string $pensionSchemeUniqueId): static { - if (is_null($pensionableEarning)) { - throw new InvalidArgumentException('non-nullable pensionableEarning cannot be null'); + if (is_null($pensionSchemeUniqueId)) { + throw new InvalidArgumentException('non-nullable pensionSchemeUniqueId cannot be null'); } - $this->container['pensionableEarning'] = $pensionableEarning; + $this->container['pensionSchemeUniqueId'] = $pensionSchemeUniqueId; return $this; } /** - * Gets pensionablePay + * Gets pensionUniqueId * - * @return float + * @return string|null */ - public function getPensionablePay(): float + public function getPensionUniqueId(): ?string { - return $this->container['pensionablePay']; + return $this->container['pensionUniqueId']; } /** - * Sets pensionablePay + * Sets pensionUniqueId * - * @param float $pensionablePay pensionablePay + * @param string|null $pensionUniqueId pensionUniqueId * * @return $this */ - public function setPensionablePay(float $pensionablePay): static + public function setPensionUniqueId(?string $pensionUniqueId): static { - if (is_null($pensionablePay)) { - throw new InvalidArgumentException('non-nullable pensionablePay cannot be null'); + if (is_null($pensionUniqueId)) { + throw new InvalidArgumentException('non-nullable pensionUniqueId cannot be null'); } - $this->container['pensionablePay'] = $pensionablePay; + $this->container['pensionUniqueId'] = $pensionUniqueId; return $this; } /** - * Gets additionalVoluntaryContribution + * Gets pensionableEarning * * @return float */ - public function getAdditionalVoluntaryContribution(): float + public function getPensionableEarning(): float { - return $this->container['additionalVoluntaryContribution']; + return $this->container['pensionableEarning']; } /** - * Sets additionalVoluntaryContribution + * Sets pensionableEarning * - * @param float $additionalVoluntaryContribution additionalVoluntaryContribution + * @param float $pensionableEarning pensionableEarning * * @return $this */ - public function setAdditionalVoluntaryContribution(float $additionalVoluntaryContribution): static + public function setPensionableEarning(float $pensionableEarning): static { - if (is_null($additionalVoluntaryContribution)) { - throw new InvalidArgumentException('non-nullable additionalVoluntaryContribution cannot be null'); + if (is_null($pensionableEarning)) { + throw new InvalidArgumentException('non-nullable pensionableEarning cannot be null'); } - $this->container['additionalVoluntaryContribution'] = $additionalVoluntaryContribution; + $this->container['pensionableEarning'] = $pensionableEarning; return $this; } /** - * Gets assumedPensionablePay + * Gets pensionablePay * * @return float */ - public function getAssumedPensionablePay(): float - { - return $this->container['assumedPensionablePay']; - } - - /** - * Sets assumedPensionablePay - * - * @param float $assumedPensionablePay assumedPensionablePay - * - * @return $this - */ - public function setAssumedPensionablePay(float $assumedPensionablePay): static - { - if (is_null($assumedPensionablePay)) { - throw new InvalidArgumentException('non-nullable assumedPensionablePay cannot be null'); - } - $this->container['assumedPensionablePay'] = $assumedPensionablePay; - - return $this; - } - - /** - * Gets isPreviousTaxYearRefund - * - * @return bool - */ - public function getIsPreviousTaxYearRefund(): bool + public function getPensionablePay(): float { - return $this->container['isPreviousTaxYearRefund']; + return $this->container['pensionablePay']; } /** - * Sets isPreviousTaxYearRefund + * Sets pensionablePay * - * @param bool $isPreviousTaxYearRefund isPreviousTaxYearRefund + * @param float $pensionablePay pensionablePay * * @return $this */ - public function setIsPreviousTaxYearRefund(bool $isPreviousTaxYearRefund): static + public function setPensionablePay(float $pensionablePay): static { - if (is_null($isPreviousTaxYearRefund)) { - throw new InvalidArgumentException('non-nullable isPreviousTaxYearRefund cannot be null'); + if (is_null($pensionablePay)) { + throw new InvalidArgumentException('non-nullable pensionablePay cannot be null'); } - $this->container['isPreviousTaxYearRefund'] = $isPreviousTaxYearRefund; + $this->container['pensionablePay'] = $pensionablePay; return $this; } @@ -797,60 +851,6 @@ public function setTierRate(?float $tierRate): static return $this; } - - /** - * Gets employee - * - * @return \SynergiTech\Staffology\Model\Item|null - */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item - { - return $this->container['employee']; - } - - /** - * Sets employee - * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee - * - * @return $this - */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static - { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); - } - $this->container['employee'] = $employee; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId(): ?string - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id [readonly] The unique id of the object - * - * @return $this - */ - public function setId(?string $id): static - { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PensionReportingType.php b/src/Model/PensionReportingType.php index 132231a..39e971d 100644 --- a/src/Model/PensionReportingType.php +++ b/src/Model/PensionReportingType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PensionRule.php b/src/Model/PensionRule.php index 5a4d89e..1156fa0 100644 --- a/src/Model/PensionRule.php +++ b/src/Model/PensionRule.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PensionScheme.php b/src/Model/PensionScheme.php index 1b1ed23..3cb70c7 100644 --- a/src/Model/PensionScheme.php +++ b/src/Model/PensionScheme.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,37 +59,39 @@ class PensionScheme implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', - 'provider' => '\SynergiTech\Staffology\Model\PensionProvider', 'administrator' => '\SynergiTech\Staffology\Model\PensionAdministrator', - 'pensionRule' => '\SynergiTech\Staffology\Model\PensionRule', - 'qualifyingScheme' => 'bool', - 'disableAeLetters' => 'bool', - 'subtractBasicRateTax' => 'bool', - 'payMethod' => '\SynergiTech\Staffology\Model\PayMethod', 'bankDetails' => '\SynergiTech\Staffology\Model\BankDetails', - 'useCustomPayCodes' => 'bool', - 'useCustomPayCodesForTierablePay' => 'bool', 'customPayCodes' => 'string[]', - 'tierablePayCustomPayCodes' => 'string[]', - 'workerGroups' => '\SynergiTech\Staffology\Model\WorkerGroup[]', - 'externalDataProviderId' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', + 'deficitValue' => 'float', + 'deficitValueOrdinal' => 'int', + 'deficitValuePayPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'disableAeLetters' => 'bool', 'externalDataCompany' => '\SynergiTech\Staffology\Model\ExternalDataCompany', - 'payCodeType' => '\SynergiTech\Staffology\Model\PensionPayCode', - 'tierablePayPayCodeType' => '\SynergiTech\Staffology\Model\PensionPayCode', + 'externalDataProviderId' => '\SynergiTech\Staffology\Model\ExternalDataProviderId', + 'id' => 'string', + 'includeDeficitValue' => 'bool', + 'initialEnrolmentType' => '\SynergiTech\Staffology\Model\PensionInitialEnrolmentType', + 'name' => 'string', + 'nominalCodeMappings' => '\SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]', 'payCodeSetUniqueId' => 'string', - 'tierablePayPayCodeSetUniqueId' => 'string', - 'paymentDateRule' => '\SynergiTech\Staffology\Model\PaymentDateRule', - 'paymentDateDayOfWeek' => '\SynergiTech\Staffology\Model\DayOfWeek', + 'payCodeType' => '\SynergiTech\Staffology\Model\PensionPayCode', + 'payMethod' => '\SynergiTech\Staffology\Model\PayMethod', 'paymentDateDayOfMonth' => 'int', - 'reportOptionsLgpsIConnect' => '\SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsIConnect', + 'paymentDateDayOfWeek' => '\SynergiTech\Staffology\Model\DayOfWeek', + 'paymentDateRule' => '\SynergiTech\Staffology\Model\PaymentDateRule', + 'pensionRule' => '\SynergiTech\Staffology\Model\PensionRule', + 'provider' => '\SynergiTech\Staffology\Model\PensionProvider', + 'qualifyingScheme' => 'bool', 'reportOptionsLgpsCivicaUpm' => '\SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsCivicaUpm', - 'deficitValueOrdinal' => 'int', - 'deficitValue' => 'float', - 'includeDeficitValue' => 'bool', - 'deficitValuePayPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', - 'nominalCodeMappings' => '\SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]', - 'id' => 'string' + 'reportOptionsLgpsIConnect' => '\SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsIConnect', + 'singleEmploymentRelationship' => '\SynergiTech\Staffology\Model\PensionSingleEmploymentRelationship', + 'subtractBasicRateTax' => 'bool', + 'tierablePayCustomPayCodes' => 'string[]', + 'tierablePayPayCodeSetUniqueId' => 'string', + 'tierablePayPayCodeType' => '\SynergiTech\Staffology\Model\PensionPayCode', + 'useCustomPayCodes' => 'bool', + 'useCustomPayCodesForTierablePay' => 'bool', + 'workerGroups' => '\SynergiTech\Staffology\Model\WorkerGroup[]' ]; /** @@ -98,37 +100,39 @@ class PensionScheme implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'name' => null, - 'provider' => null, 'administrator' => null, - 'pensionRule' => null, - 'qualifyingScheme' => null, - 'disableAeLetters' => null, - 'subtractBasicRateTax' => null, - 'payMethod' => null, 'bankDetails' => null, - 'useCustomPayCodes' => null, - 'useCustomPayCodesForTierablePay' => null, 'customPayCodes' => null, - 'tierablePayCustomPayCodes' => null, - 'workerGroups' => null, - 'externalDataProviderId' => null, + 'deficitValue' => 'double', + 'deficitValueOrdinal' => 'int32', + 'deficitValuePayPeriod' => null, + 'disableAeLetters' => null, 'externalDataCompany' => null, - 'payCodeType' => null, - 'tierablePayPayCodeType' => null, + 'externalDataProviderId' => null, + 'id' => 'uuid', + 'includeDeficitValue' => null, + 'initialEnrolmentType' => null, + 'name' => null, + 'nominalCodeMappings' => null, 'payCodeSetUniqueId' => 'uuid', - 'tierablePayPayCodeSetUniqueId' => 'uuid', - 'paymentDateRule' => null, - 'paymentDateDayOfWeek' => null, + 'payCodeType' => null, + 'payMethod' => null, 'paymentDateDayOfMonth' => 'int32', - 'reportOptionsLgpsIConnect' => null, + 'paymentDateDayOfWeek' => null, + 'paymentDateRule' => null, + 'pensionRule' => null, + 'provider' => null, + 'qualifyingScheme' => null, 'reportOptionsLgpsCivicaUpm' => null, - 'deficitValueOrdinal' => 'int32', - 'deficitValue' => 'double', - 'includeDeficitValue' => null, - 'deficitValuePayPeriod' => null, - 'nominalCodeMappings' => null, - 'id' => 'uuid' + 'reportOptionsLgpsIConnect' => null, + 'singleEmploymentRelationship' => null, + 'subtractBasicRateTax' => null, + 'tierablePayCustomPayCodes' => null, + 'tierablePayPayCodeSetUniqueId' => 'uuid', + 'tierablePayPayCodeType' => null, + 'useCustomPayCodes' => null, + 'useCustomPayCodesForTierablePay' => null, + 'workerGroups' => null ]; /** @@ -137,37 +141,39 @@ class PensionScheme implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'name' => false, - 'provider' => false, 'administrator' => false, - 'pensionRule' => false, - 'qualifyingScheme' => false, - 'disableAeLetters' => false, - 'subtractBasicRateTax' => false, - 'payMethod' => false, 'bankDetails' => false, - 'useCustomPayCodes' => false, - 'useCustomPayCodesForTierablePay' => false, 'customPayCodes' => true, - 'tierablePayCustomPayCodes' => true, - 'workerGroups' => true, - 'externalDataProviderId' => false, + 'deficitValue' => true, + 'deficitValueOrdinal' => true, + 'deficitValuePayPeriod' => false, + 'disableAeLetters' => false, 'externalDataCompany' => false, - 'payCodeType' => false, - 'tierablePayPayCodeType' => false, + 'externalDataProviderId' => false, + 'id' => false, + 'includeDeficitValue' => false, + 'initialEnrolmentType' => false, + 'name' => false, + 'nominalCodeMappings' => true, 'payCodeSetUniqueId' => true, - 'tierablePayPayCodeSetUniqueId' => true, - 'paymentDateRule' => false, - 'paymentDateDayOfWeek' => false, + 'payCodeType' => false, + 'payMethod' => false, 'paymentDateDayOfMonth' => true, - 'reportOptionsLgpsIConnect' => false, + 'paymentDateDayOfWeek' => false, + 'paymentDateRule' => false, + 'pensionRule' => false, + 'provider' => false, + 'qualifyingScheme' => false, 'reportOptionsLgpsCivicaUpm' => false, - 'deficitValueOrdinal' => true, - 'deficitValue' => true, - 'includeDeficitValue' => false, - 'deficitValuePayPeriod' => false, - 'nominalCodeMappings' => true, - 'id' => false + 'reportOptionsLgpsIConnect' => false, + 'singleEmploymentRelationship' => false, + 'subtractBasicRateTax' => false, + 'tierablePayCustomPayCodes' => true, + 'tierablePayPayCodeSetUniqueId' => true, + 'tierablePayPayCodeType' => false, + 'useCustomPayCodes' => false, + 'useCustomPayCodesForTierablePay' => false, + 'workerGroups' => true ]; /** @@ -256,37 +262,39 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', - 'provider' => 'provider', 'administrator' => 'administrator', - 'pensionRule' => 'pensionRule', - 'qualifyingScheme' => 'qualifyingScheme', - 'disableAeLetters' => 'disableAeLetters', - 'subtractBasicRateTax' => 'subtractBasicRateTax', - 'payMethod' => 'payMethod', 'bankDetails' => 'bankDetails', - 'useCustomPayCodes' => 'useCustomPayCodes', - 'useCustomPayCodesForTierablePay' => 'useCustomPayCodesForTierablePay', 'customPayCodes' => 'customPayCodes', - 'tierablePayCustomPayCodes' => 'tierablePayCustomPayCodes', - 'workerGroups' => 'workerGroups', - 'externalDataProviderId' => 'externalDataProviderId', + 'deficitValue' => 'deficitValue', + 'deficitValueOrdinal' => 'deficitValueOrdinal', + 'deficitValuePayPeriod' => 'deficitValuePayPeriod', + 'disableAeLetters' => 'disableAeLetters', 'externalDataCompany' => 'externalDataCompany', - 'payCodeType' => 'payCodeType', - 'tierablePayPayCodeType' => 'tierablePayPayCodeType', + 'externalDataProviderId' => 'externalDataProviderId', + 'id' => 'id', + 'includeDeficitValue' => 'includeDeficitValue', + 'initialEnrolmentType' => 'initialEnrolmentType', + 'name' => 'name', + 'nominalCodeMappings' => 'nominalCodeMappings', 'payCodeSetUniqueId' => 'payCodeSetUniqueId', - 'tierablePayPayCodeSetUniqueId' => 'tierablePayPayCodeSetUniqueId', - 'paymentDateRule' => 'paymentDateRule', - 'paymentDateDayOfWeek' => 'paymentDateDayOfWeek', + 'payCodeType' => 'payCodeType', + 'payMethod' => 'payMethod', 'paymentDateDayOfMonth' => 'paymentDateDayOfMonth', - 'reportOptionsLgpsIConnect' => 'reportOptionsLgpsIConnect', + 'paymentDateDayOfWeek' => 'paymentDateDayOfWeek', + 'paymentDateRule' => 'paymentDateRule', + 'pensionRule' => 'pensionRule', + 'provider' => 'provider', + 'qualifyingScheme' => 'qualifyingScheme', 'reportOptionsLgpsCivicaUpm' => 'reportOptionsLgpsCivicaUpm', - 'deficitValueOrdinal' => 'deficitValueOrdinal', - 'deficitValue' => 'deficitValue', - 'includeDeficitValue' => 'includeDeficitValue', - 'deficitValuePayPeriod' => 'deficitValuePayPeriod', - 'nominalCodeMappings' => 'nominalCodeMappings', - 'id' => 'id' + 'reportOptionsLgpsIConnect' => 'reportOptionsLgpsIConnect', + 'singleEmploymentRelationship' => 'singleEmploymentRelationship', + 'subtractBasicRateTax' => 'subtractBasicRateTax', + 'tierablePayCustomPayCodes' => 'tierablePayCustomPayCodes', + 'tierablePayPayCodeSetUniqueId' => 'tierablePayPayCodeSetUniqueId', + 'tierablePayPayCodeType' => 'tierablePayPayCodeType', + 'useCustomPayCodes' => 'useCustomPayCodes', + 'useCustomPayCodesForTierablePay' => 'useCustomPayCodesForTierablePay', + 'workerGroups' => 'workerGroups' ]; /** @@ -295,37 +303,39 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', - 'provider' => 'setProvider', 'administrator' => 'setAdministrator', - 'pensionRule' => 'setPensionRule', - 'qualifyingScheme' => 'setQualifyingScheme', - 'disableAeLetters' => 'setDisableAeLetters', - 'subtractBasicRateTax' => 'setSubtractBasicRateTax', - 'payMethod' => 'setPayMethod', 'bankDetails' => 'setBankDetails', - 'useCustomPayCodes' => 'setUseCustomPayCodes', - 'useCustomPayCodesForTierablePay' => 'setUseCustomPayCodesForTierablePay', 'customPayCodes' => 'setCustomPayCodes', - 'tierablePayCustomPayCodes' => 'setTierablePayCustomPayCodes', - 'workerGroups' => 'setWorkerGroups', - 'externalDataProviderId' => 'setExternalDataProviderId', + 'deficitValue' => 'setDeficitValue', + 'deficitValueOrdinal' => 'setDeficitValueOrdinal', + 'deficitValuePayPeriod' => 'setDeficitValuePayPeriod', + 'disableAeLetters' => 'setDisableAeLetters', 'externalDataCompany' => 'setExternalDataCompany', - 'payCodeType' => 'setPayCodeType', - 'tierablePayPayCodeType' => 'setTierablePayPayCodeType', + 'externalDataProviderId' => 'setExternalDataProviderId', + 'id' => 'setId', + 'includeDeficitValue' => 'setIncludeDeficitValue', + 'initialEnrolmentType' => 'setInitialEnrolmentType', + 'name' => 'setName', + 'nominalCodeMappings' => 'setNominalCodeMappings', 'payCodeSetUniqueId' => 'setPayCodeSetUniqueId', - 'tierablePayPayCodeSetUniqueId' => 'setTierablePayPayCodeSetUniqueId', - 'paymentDateRule' => 'setPaymentDateRule', - 'paymentDateDayOfWeek' => 'setPaymentDateDayOfWeek', + 'payCodeType' => 'setPayCodeType', + 'payMethod' => 'setPayMethod', 'paymentDateDayOfMonth' => 'setPaymentDateDayOfMonth', - 'reportOptionsLgpsIConnect' => 'setReportOptionsLgpsIConnect', + 'paymentDateDayOfWeek' => 'setPaymentDateDayOfWeek', + 'paymentDateRule' => 'setPaymentDateRule', + 'pensionRule' => 'setPensionRule', + 'provider' => 'setProvider', + 'qualifyingScheme' => 'setQualifyingScheme', 'reportOptionsLgpsCivicaUpm' => 'setReportOptionsLgpsCivicaUpm', - 'deficitValueOrdinal' => 'setDeficitValueOrdinal', - 'deficitValue' => 'setDeficitValue', - 'includeDeficitValue' => 'setIncludeDeficitValue', - 'deficitValuePayPeriod' => 'setDeficitValuePayPeriod', - 'nominalCodeMappings' => 'setNominalCodeMappings', - 'id' => 'setId' + 'reportOptionsLgpsIConnect' => 'setReportOptionsLgpsIConnect', + 'singleEmploymentRelationship' => 'setSingleEmploymentRelationship', + 'subtractBasicRateTax' => 'setSubtractBasicRateTax', + 'tierablePayCustomPayCodes' => 'setTierablePayCustomPayCodes', + 'tierablePayPayCodeSetUniqueId' => 'setTierablePayPayCodeSetUniqueId', + 'tierablePayPayCodeType' => 'setTierablePayPayCodeType', + 'useCustomPayCodes' => 'setUseCustomPayCodes', + 'useCustomPayCodesForTierablePay' => 'setUseCustomPayCodesForTierablePay', + 'workerGroups' => 'setWorkerGroups' ]; /** @@ -334,37 +344,39 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', - 'provider' => 'getProvider', 'administrator' => 'getAdministrator', - 'pensionRule' => 'getPensionRule', - 'qualifyingScheme' => 'getQualifyingScheme', - 'disableAeLetters' => 'getDisableAeLetters', - 'subtractBasicRateTax' => 'getSubtractBasicRateTax', - 'payMethod' => 'getPayMethod', 'bankDetails' => 'getBankDetails', - 'useCustomPayCodes' => 'getUseCustomPayCodes', - 'useCustomPayCodesForTierablePay' => 'getUseCustomPayCodesForTierablePay', 'customPayCodes' => 'getCustomPayCodes', - 'tierablePayCustomPayCodes' => 'getTierablePayCustomPayCodes', - 'workerGroups' => 'getWorkerGroups', - 'externalDataProviderId' => 'getExternalDataProviderId', + 'deficitValue' => 'getDeficitValue', + 'deficitValueOrdinal' => 'getDeficitValueOrdinal', + 'deficitValuePayPeriod' => 'getDeficitValuePayPeriod', + 'disableAeLetters' => 'getDisableAeLetters', 'externalDataCompany' => 'getExternalDataCompany', - 'payCodeType' => 'getPayCodeType', - 'tierablePayPayCodeType' => 'getTierablePayPayCodeType', + 'externalDataProviderId' => 'getExternalDataProviderId', + 'id' => 'getId', + 'includeDeficitValue' => 'getIncludeDeficitValue', + 'initialEnrolmentType' => 'getInitialEnrolmentType', + 'name' => 'getName', + 'nominalCodeMappings' => 'getNominalCodeMappings', 'payCodeSetUniqueId' => 'getPayCodeSetUniqueId', - 'tierablePayPayCodeSetUniqueId' => 'getTierablePayPayCodeSetUniqueId', - 'paymentDateRule' => 'getPaymentDateRule', - 'paymentDateDayOfWeek' => 'getPaymentDateDayOfWeek', + 'payCodeType' => 'getPayCodeType', + 'payMethod' => 'getPayMethod', 'paymentDateDayOfMonth' => 'getPaymentDateDayOfMonth', - 'reportOptionsLgpsIConnect' => 'getReportOptionsLgpsIConnect', + 'paymentDateDayOfWeek' => 'getPaymentDateDayOfWeek', + 'paymentDateRule' => 'getPaymentDateRule', + 'pensionRule' => 'getPensionRule', + 'provider' => 'getProvider', + 'qualifyingScheme' => 'getQualifyingScheme', 'reportOptionsLgpsCivicaUpm' => 'getReportOptionsLgpsCivicaUpm', - 'deficitValueOrdinal' => 'getDeficitValueOrdinal', - 'deficitValue' => 'getDeficitValue', - 'includeDeficitValue' => 'getIncludeDeficitValue', - 'deficitValuePayPeriod' => 'getDeficitValuePayPeriod', - 'nominalCodeMappings' => 'getNominalCodeMappings', - 'id' => 'getId' + 'reportOptionsLgpsIConnect' => 'getReportOptionsLgpsIConnect', + 'singleEmploymentRelationship' => 'getSingleEmploymentRelationship', + 'subtractBasicRateTax' => 'getSubtractBasicRateTax', + 'tierablePayCustomPayCodes' => 'getTierablePayCustomPayCodes', + 'tierablePayPayCodeSetUniqueId' => 'getTierablePayPayCodeSetUniqueId', + 'tierablePayPayCodeType' => 'getTierablePayPayCodeType', + 'useCustomPayCodes' => 'getUseCustomPayCodes', + 'useCustomPayCodesForTierablePay' => 'getUseCustomPayCodesForTierablePay', + 'workerGroups' => 'getWorkerGroups' ]; /** @@ -423,37 +435,39 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('provider', $data ?? [], null); $this->setIfExists('administrator', $data ?? [], null); - $this->setIfExists('pensionRule', $data ?? [], null); - $this->setIfExists('qualifyingScheme', $data ?? [], null); - $this->setIfExists('disableAeLetters', $data ?? [], null); - $this->setIfExists('subtractBasicRateTax', $data ?? [], null); - $this->setIfExists('payMethod', $data ?? [], null); $this->setIfExists('bankDetails', $data ?? [], null); - $this->setIfExists('useCustomPayCodes', $data ?? [], null); - $this->setIfExists('useCustomPayCodesForTierablePay', $data ?? [], null); $this->setIfExists('customPayCodes', $data ?? [], null); - $this->setIfExists('tierablePayCustomPayCodes', $data ?? [], null); - $this->setIfExists('workerGroups', $data ?? [], null); - $this->setIfExists('externalDataProviderId', $data ?? [], null); + $this->setIfExists('deficitValue', $data ?? [], null); + $this->setIfExists('deficitValueOrdinal', $data ?? [], null); + $this->setIfExists('deficitValuePayPeriod', $data ?? [], null); + $this->setIfExists('disableAeLetters', $data ?? [], null); $this->setIfExists('externalDataCompany', $data ?? [], null); - $this->setIfExists('payCodeType', $data ?? [], null); - $this->setIfExists('tierablePayPayCodeType', $data ?? [], null); + $this->setIfExists('externalDataProviderId', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('includeDeficitValue', $data ?? [], null); + $this->setIfExists('initialEnrolmentType', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('nominalCodeMappings', $data ?? [], null); $this->setIfExists('payCodeSetUniqueId', $data ?? [], null); - $this->setIfExists('tierablePayPayCodeSetUniqueId', $data ?? [], null); - $this->setIfExists('paymentDateRule', $data ?? [], null); - $this->setIfExists('paymentDateDayOfWeek', $data ?? [], null); + $this->setIfExists('payCodeType', $data ?? [], null); + $this->setIfExists('payMethod', $data ?? [], null); $this->setIfExists('paymentDateDayOfMonth', $data ?? [], null); - $this->setIfExists('reportOptionsLgpsIConnect', $data ?? [], null); + $this->setIfExists('paymentDateDayOfWeek', $data ?? [], null); + $this->setIfExists('paymentDateRule', $data ?? [], null); + $this->setIfExists('pensionRule', $data ?? [], null); + $this->setIfExists('provider', $data ?? [], null); + $this->setIfExists('qualifyingScheme', $data ?? [], null); $this->setIfExists('reportOptionsLgpsCivicaUpm', $data ?? [], null); - $this->setIfExists('deficitValueOrdinal', $data ?? [], null); - $this->setIfExists('deficitValue', $data ?? [], null); - $this->setIfExists('includeDeficitValue', $data ?? [], null); - $this->setIfExists('deficitValuePayPeriod', $data ?? [], null); - $this->setIfExists('nominalCodeMappings', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('reportOptionsLgpsIConnect', $data ?? [], null); + $this->setIfExists('singleEmploymentRelationship', $data ?? [], null); + $this->setIfExists('subtractBasicRateTax', $data ?? [], null); + $this->setIfExists('tierablePayCustomPayCodes', $data ?? [], null); + $this->setIfExists('tierablePayPayCodeSetUniqueId', $data ?? [], null); + $this->setIfExists('tierablePayPayCodeType', $data ?? [], null); + $this->setIfExists('useCustomPayCodes', $data ?? [], null); + $this->setIfExists('useCustomPayCodesForTierablePay', $data ?? [], null); + $this->setIfExists('workerGroups', $data ?? [], null); } /** @@ -510,143 +524,184 @@ public function valid(): bool /** - * Gets name + * Gets administrator * - * @return string + * @return \SynergiTech\Staffology\Model\PensionAdministrator|null */ - public function getName(): string + public function getAdministrator(): ?\SynergiTech\Staffology\Model\PensionAdministrator { - return $this->container['name']; + return $this->container['administrator']; } /** - * Sets name + * Sets administrator * - * @param string $name name + * @param \SynergiTech\Staffology\Model\PensionAdministrator|null $administrator administrator * * @return $this */ - public function setName(string $name): static + public function setAdministrator(?\SynergiTech\Staffology\Model\PensionAdministrator $administrator): static { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); - } - if ((mb_strlen($name) > 150)) { - throw new InvalidArgumentException('invalid length for $name when calling PensionScheme., must be smaller than or equal to 150.'); - } - if ((mb_strlen($name) < 1)) { - throw new InvalidArgumentException('invalid length for $name when calling PensionScheme., must be bigger than or equal to 1.'); + if (is_null($administrator)) { + throw new InvalidArgumentException('non-nullable administrator cannot be null'); } + $this->container['administrator'] = $administrator; - $this->container['name'] = $name; + return $this; + } + + /** + * Gets bankDetails + * + * @return \SynergiTech\Staffology\Model\BankDetails|null + */ + public function getBankDetails(): ?\SynergiTech\Staffology\Model\BankDetails + { + return $this->container['bankDetails']; + } + + /** + * Sets bankDetails + * + * @param \SynergiTech\Staffology\Model\BankDetails|null $bankDetails bankDetails + * + * @return $this + */ + public function setBankDetails(?\SynergiTech\Staffology\Model\BankDetails $bankDetails): static + { + if (is_null($bankDetails)) { + throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); + } + $this->container['bankDetails'] = $bankDetails; return $this; } /** - * Gets provider + * Gets customPayCodes * - * @return \SynergiTech\Staffology\Model\PensionProvider|null + * @return string[]|null */ - public function getProvider(): ?\SynergiTech\Staffology\Model\PensionProvider + public function getCustomPayCodes(): ?array { - return $this->container['provider']; + return $this->container['customPayCodes']; } /** - * Sets provider + * Sets customPayCodes * - * @param \SynergiTech\Staffology\Model\PensionProvider|null $provider provider + * @param string[]|null $customPayCodes If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code that we'll treat as being pensionable. * * @return $this */ - public function setProvider(?\SynergiTech\Staffology\Model\PensionProvider $provider): static + public function setCustomPayCodes(?array $customPayCodes): static { - if (is_null($provider)) { - throw new InvalidArgumentException('non-nullable provider cannot be null'); + if (is_null($customPayCodes)) { + array_push($this->openAPINullablesSetToNull, 'customPayCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('customPayCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['provider'] = $provider; + $this->container['customPayCodes'] = $customPayCodes; return $this; } /** - * Gets administrator + * Gets deficitValue * - * @return \SynergiTech\Staffology\Model\PensionAdministrator|null + * @return float|null */ - public function getAdministrator(): ?\SynergiTech\Staffology\Model\PensionAdministrator + public function getDeficitValue(): ?float { - return $this->container['administrator']; + return $this->container['deficitValue']; } /** - * Sets administrator + * Sets deficitValue * - * @param \SynergiTech\Staffology\Model\PensionAdministrator|null $administrator administrator + * @param float|null $deficitValue The Defict value that will be deducted in a PaySchedule * * @return $this */ - public function setAdministrator(?\SynergiTech\Staffology\Model\PensionAdministrator $administrator): static + public function setDeficitValue(?float $deficitValue): static { - if (is_null($administrator)) { - throw new InvalidArgumentException('non-nullable administrator cannot be null'); + if (is_null($deficitValue)) { + array_push($this->openAPINullablesSetToNull, 'deficitValue'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deficitValue', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['administrator'] = $administrator; + $this->container['deficitValue'] = $deficitValue; return $this; } /** - * Gets pensionRule + * Gets deficitValueOrdinal * - * @return \SynergiTech\Staffology\Model\PensionRule|null + * @return int|null */ - public function getPensionRule(): ?\SynergiTech\Staffology\Model\PensionRule + public function getDeficitValueOrdinal(): ?int { - return $this->container['pensionRule']; + return $this->container['deficitValueOrdinal']; } /** - * Sets pensionRule + * Sets deficitValueOrdinal * - * @param \SynergiTech\Staffology\Model\PensionRule|null $pensionRule pensionRule + * @param int|null $deficitValueOrdinal The Ordinal used to identify the PaySchedule which the Deficit will be against * * @return $this */ - public function setPensionRule(?\SynergiTech\Staffology\Model\PensionRule $pensionRule): static + public function setDeficitValueOrdinal(?int $deficitValueOrdinal): static { - if (is_null($pensionRule)) { - throw new InvalidArgumentException('non-nullable pensionRule cannot be null'); + if (is_null($deficitValueOrdinal)) { + array_push($this->openAPINullablesSetToNull, 'deficitValueOrdinal'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deficitValueOrdinal', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['pensionRule'] = $pensionRule; + $this->container['deficitValueOrdinal'] = $deficitValueOrdinal; return $this; } /** - * Gets qualifyingScheme + * Gets deficitValuePayPeriod * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PayPeriods|null */ - public function getQualifyingScheme(): ?bool + public function getDeficitValuePayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods { - return $this->container['qualifyingScheme']; + return $this->container['deficitValuePayPeriod']; } /** - * Sets qualifyingScheme + * Sets deficitValuePayPeriod * - * @param bool|null $qualifyingScheme Set to true if this is a Qualifying Scheme for Auto Enrolment + * @param \SynergiTech\Staffology\Model\PayPeriods|null $deficitValuePayPeriod deficitValuePayPeriod * * @return $this */ - public function setQualifyingScheme(?bool $qualifyingScheme): static + public function setDeficitValuePayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $deficitValuePayPeriod): static { - if (is_null($qualifyingScheme)) { - throw new InvalidArgumentException('non-nullable qualifyingScheme cannot be null'); + if (is_null($deficitValuePayPeriod)) { + throw new InvalidArgumentException('non-nullable deficitValuePayPeriod cannot be null'); } - $this->container['qualifyingScheme'] = $qualifyingScheme; + $this->container['deficitValuePayPeriod'] = $deficitValuePayPeriod; return $this; } @@ -679,502 +734,488 @@ public function setDisableAeLetters(?bool $disableAeLetters): static } /** - * Gets subtractBasicRateTax + * Gets externalDataCompany * - * @return bool|null + * @return \SynergiTech\Staffology\Model\ExternalDataCompany|null */ - public function getSubtractBasicRateTax(): ?bool + public function getExternalDataCompany(): ?\SynergiTech\Staffology\Model\ExternalDataCompany { - return $this->container['subtractBasicRateTax']; + return $this->container['externalDataCompany']; } /** - * Sets subtractBasicRateTax + * Sets externalDataCompany * - * @param bool|null $subtractBasicRateTax subtractBasicRateTax + * @param \SynergiTech\Staffology\Model\ExternalDataCompany|null $externalDataCompany externalDataCompany * * @return $this */ - public function setSubtractBasicRateTax(?bool $subtractBasicRateTax): static + public function setExternalDataCompany(?\SynergiTech\Staffology\Model\ExternalDataCompany $externalDataCompany): static { - if (is_null($subtractBasicRateTax)) { - throw new InvalidArgumentException('non-nullable subtractBasicRateTax cannot be null'); + if (is_null($externalDataCompany)) { + throw new InvalidArgumentException('non-nullable externalDataCompany cannot be null'); } - $this->container['subtractBasicRateTax'] = $subtractBasicRateTax; + $this->container['externalDataCompany'] = $externalDataCompany; return $this; } /** - * Gets payMethod + * Gets externalDataProviderId * - * @return \SynergiTech\Staffology\Model\PayMethod|null + * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null */ - public function getPayMethod(): ?\SynergiTech\Staffology\Model\PayMethod + public function getExternalDataProviderId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId { - return $this->container['payMethod']; + return $this->container['externalDataProviderId']; } /** - * Sets payMethod + * Sets externalDataProviderId * - * @param \SynergiTech\Staffology\Model\PayMethod|null $payMethod payMethod + * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $externalDataProviderId externalDataProviderId * * @return $this */ - public function setPayMethod(?\SynergiTech\Staffology\Model\PayMethod $payMethod): static + public function setExternalDataProviderId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $externalDataProviderId): static { - if (is_null($payMethod)) { - throw new InvalidArgumentException('non-nullable payMethod cannot be null'); + if (is_null($externalDataProviderId)) { + throw new InvalidArgumentException('non-nullable externalDataProviderId cannot be null'); } - $this->container['payMethod'] = $payMethod; + $this->container['externalDataProviderId'] = $externalDataProviderId; return $this; } /** - * Gets bankDetails + * Gets id * - * @return \SynergiTech\Staffology\Model\BankDetails|null + * @return string|null */ - public function getBankDetails(): ?\SynergiTech\Staffology\Model\BankDetails + public function getId(): ?string { - return $this->container['bankDetails']; + return $this->container['id']; } /** - * Sets bankDetails + * Sets id * - * @param \SynergiTech\Staffology\Model\BankDetails|null $bankDetails bankDetails + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setBankDetails(?\SynergiTech\Staffology\Model\BankDetails $bankDetails): static + public function setId(?string $id): static { - if (is_null($bankDetails)) { - throw new InvalidArgumentException('non-nullable bankDetails cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['bankDetails'] = $bankDetails; + $this->container['id'] = $id; return $this; } /** - * Gets useCustomPayCodes + * Gets includeDeficitValue * * @return bool|null */ - public function getUseCustomPayCodes(): ?bool + public function getIncludeDeficitValue(): ?bool { - return $this->container['useCustomPayCodes']; + return $this->container['includeDeficitValue']; } /** - * Sets useCustomPayCodes + * Sets includeDeficitValue * - * @param bool|null $useCustomPayCodes If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable we'll instead treat it as pensionable if the Code is included in CustomPayCodes + * @param bool|null $includeDeficitValue Set to true if this a Deficit Payment needs to be assigned to a PaySchedule * * @return $this */ - public function setUseCustomPayCodes(?bool $useCustomPayCodes): static + public function setIncludeDeficitValue(?bool $includeDeficitValue): static { - if (is_null($useCustomPayCodes)) { - throw new InvalidArgumentException('non-nullable useCustomPayCodes cannot be null'); + if (is_null($includeDeficitValue)) { + throw new InvalidArgumentException('non-nullable includeDeficitValue cannot be null'); } - $this->container['useCustomPayCodes'] = $useCustomPayCodes; + $this->container['includeDeficitValue'] = $includeDeficitValue; return $this; } /** - * Gets useCustomPayCodesForTierablePay + * Gets initialEnrolmentType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PensionInitialEnrolmentType|null */ - public function getUseCustomPayCodesForTierablePay(): ?bool + public function getInitialEnrolmentType(): ?\SynergiTech\Staffology\Model\PensionInitialEnrolmentType { - return $this->container['useCustomPayCodesForTierablePay']; + return $this->container['initialEnrolmentType']; } /** - * Sets useCustomPayCodesForTierablePay + * Sets initialEnrolmentType * - * @param bool|null $useCustomPayCodesForTierablePay If set to true then rather than using the setting on the PayCode to determine if the pay is tierable we'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes + * @param \SynergiTech\Staffology\Model\PensionInitialEnrolmentType|null $initialEnrolmentType initialEnrolmentType * * @return $this */ - public function setUseCustomPayCodesForTierablePay(?bool $useCustomPayCodesForTierablePay): static + public function setInitialEnrolmentType(?\SynergiTech\Staffology\Model\PensionInitialEnrolmentType $initialEnrolmentType): static { - if (is_null($useCustomPayCodesForTierablePay)) { - throw new InvalidArgumentException('non-nullable useCustomPayCodesForTierablePay cannot be null'); + if (is_null($initialEnrolmentType)) { + throw new InvalidArgumentException('non-nullable initialEnrolmentType cannot be null'); } - $this->container['useCustomPayCodesForTierablePay'] = $useCustomPayCodesForTierablePay; + $this->container['initialEnrolmentType'] = $initialEnrolmentType; return $this; } /** - * Gets customPayCodes + * Gets name * - * @return string[]|null + * @return string */ - public function getCustomPayCodes(): ?array + public function getName(): string { - return $this->container['customPayCodes']; + return $this->container['name']; } /** - * Sets customPayCodes + * Sets name * - * @param string[]|null $customPayCodes If UseCustomPayCodes is set to true then this contains a list of PayCodes.Code that we'll treat as being pensionable. + * @param string $name name * * @return $this */ - public function setCustomPayCodes(?array $customPayCodes): static + public function setName(string $name): static { - if (is_null($customPayCodes)) { - array_push($this->openAPINullablesSetToNull, 'customPayCodes'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('customPayCodes', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['customPayCodes'] = $customPayCodes; + if ((mb_strlen($name) > 150)) { + throw new InvalidArgumentException('invalid length for $name when calling PensionScheme., must be smaller than or equal to 150.'); + } + if ((mb_strlen($name) < 1)) { + throw new InvalidArgumentException('invalid length for $name when calling PensionScheme., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; return $this; } /** - * Gets tierablePayCustomPayCodes + * Gets nominalCodeMappings * - * @return string[]|null + * @return \SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]|null */ - public function getTierablePayCustomPayCodes(): ?array + public function getNominalCodeMappings(): ?array { - return $this->container['tierablePayCustomPayCodes']; + return $this->container['nominalCodeMappings']; } /** - * Sets tierablePayCustomPayCodes + * Sets nominalCodeMappings * - * @param string[]|null $tierablePayCustomPayCodes If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code that we'll treat as being tierable. + * @param \SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]|null $nominalCodeMappings The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration * * @return $this */ - public function setTierablePayCustomPayCodes(?array $tierablePayCustomPayCodes): static + public function setNominalCodeMappings(?array $nominalCodeMappings): static { - if (is_null($tierablePayCustomPayCodes)) { - array_push($this->openAPINullablesSetToNull, 'tierablePayCustomPayCodes'); + if (is_null($nominalCodeMappings)) { + array_push($this->openAPINullablesSetToNull, 'nominalCodeMappings'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tierablePayCustomPayCodes', $nullablesSetToNull); + $index = array_search('nominalCodeMappings', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['tierablePayCustomPayCodes'] = $tierablePayCustomPayCodes; + $this->container['nominalCodeMappings'] = $nominalCodeMappings; return $this; } /** - * Gets workerGroups + * Gets payCodeSetUniqueId * - * @return \SynergiTech\Staffology\Model\WorkerGroup[]|null + * @return string|null */ - public function getWorkerGroups(): ?array + public function getPayCodeSetUniqueId(): ?string { - return $this->container['workerGroups']; + return $this->container['payCodeSetUniqueId']; } /** - * Sets workerGroups + * Sets payCodeSetUniqueId * - * @param \SynergiTech\Staffology\Model\WorkerGroup[]|null $workerGroups A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup + * @param string|null $payCodeSetUniqueId payCodeSetUniqueId * * @return $this */ - public function setWorkerGroups(?array $workerGroups): static + public function setPayCodeSetUniqueId(?string $payCodeSetUniqueId): static { - if (is_null($workerGroups)) { - array_push($this->openAPINullablesSetToNull, 'workerGroups'); + if (is_null($payCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'payCodeSetUniqueId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('workerGroups', $nullablesSetToNull); + $index = array_search('payCodeSetUniqueId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['workerGroups'] = $workerGroups; + $this->container['payCodeSetUniqueId'] = $payCodeSetUniqueId; return $this; } /** - * Gets externalDataProviderId + * Gets payCodeType * - * @return \SynergiTech\Staffology\Model\ExternalDataProviderId|null + * @return \SynergiTech\Staffology\Model\PensionPayCode|null */ - public function getExternalDataProviderId(): ?\SynergiTech\Staffology\Model\ExternalDataProviderId + public function getPayCodeType(): ?\SynergiTech\Staffology\Model\PensionPayCode { - return $this->container['externalDataProviderId']; + return $this->container['payCodeType']; } /** - * Sets externalDataProviderId + * Sets payCodeType * - * @param \SynergiTech\Staffology\Model\ExternalDataProviderId|null $externalDataProviderId externalDataProviderId + * @param \SynergiTech\Staffology\Model\PensionPayCode|null $payCodeType payCodeType * * @return $this */ - public function setExternalDataProviderId(?\SynergiTech\Staffology\Model\ExternalDataProviderId $externalDataProviderId): static + public function setPayCodeType(?\SynergiTech\Staffology\Model\PensionPayCode $payCodeType): static { - if (is_null($externalDataProviderId)) { - throw new InvalidArgumentException('non-nullable externalDataProviderId cannot be null'); + if (is_null($payCodeType)) { + throw new InvalidArgumentException('non-nullable payCodeType cannot be null'); } - $this->container['externalDataProviderId'] = $externalDataProviderId; + $this->container['payCodeType'] = $payCodeType; return $this; } /** - * Gets externalDataCompany + * Gets payMethod * - * @return \SynergiTech\Staffology\Model\ExternalDataCompany|null + * @return \SynergiTech\Staffology\Model\PayMethod|null */ - public function getExternalDataCompany(): ?\SynergiTech\Staffology\Model\ExternalDataCompany + public function getPayMethod(): ?\SynergiTech\Staffology\Model\PayMethod { - return $this->container['externalDataCompany']; + return $this->container['payMethod']; } /** - * Sets externalDataCompany + * Sets payMethod * - * @param \SynergiTech\Staffology\Model\ExternalDataCompany|null $externalDataCompany externalDataCompany + * @param \SynergiTech\Staffology\Model\PayMethod|null $payMethod payMethod * * @return $this */ - public function setExternalDataCompany(?\SynergiTech\Staffology\Model\ExternalDataCompany $externalDataCompany): static + public function setPayMethod(?\SynergiTech\Staffology\Model\PayMethod $payMethod): static { - if (is_null($externalDataCompany)) { - throw new InvalidArgumentException('non-nullable externalDataCompany cannot be null'); + if (is_null($payMethod)) { + throw new InvalidArgumentException('non-nullable payMethod cannot be null'); } - $this->container['externalDataCompany'] = $externalDataCompany; + $this->container['payMethod'] = $payMethod; return $this; } /** - * Gets payCodeType + * Gets paymentDateDayOfMonth * - * @return \SynergiTech\Staffology\Model\PensionPayCode|null + * @return int|null */ - public function getPayCodeType(): ?\SynergiTech\Staffology\Model\PensionPayCode + public function getPaymentDateDayOfMonth(): ?int { - return $this->container['payCodeType']; + return $this->container['paymentDateDayOfMonth']; } /** - * Sets payCodeType + * Sets paymentDateDayOfMonth * - * @param \SynergiTech\Staffology\Model\PensionPayCode|null $payCodeType payCodeType + * @param int|null $paymentDateDayOfMonth paymentDateDayOfMonth * * @return $this */ - public function setPayCodeType(?\SynergiTech\Staffology\Model\PensionPayCode $payCodeType): static + public function setPaymentDateDayOfMonth(?int $paymentDateDayOfMonth): static { - if (is_null($payCodeType)) { - throw new InvalidArgumentException('non-nullable payCodeType cannot be null'); + if (is_null($paymentDateDayOfMonth)) { + array_push($this->openAPINullablesSetToNull, 'paymentDateDayOfMonth'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('paymentDateDayOfMonth', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payCodeType'] = $payCodeType; + $this->container['paymentDateDayOfMonth'] = $paymentDateDayOfMonth; return $this; } /** - * Gets tierablePayPayCodeType + * Gets paymentDateDayOfWeek * - * @return \SynergiTech\Staffology\Model\PensionPayCode|null + * @return \SynergiTech\Staffology\Model\DayOfWeek|null */ - public function getTierablePayPayCodeType(): ?\SynergiTech\Staffology\Model\PensionPayCode + public function getPaymentDateDayOfWeek(): ?\SynergiTech\Staffology\Model\DayOfWeek { - return $this->container['tierablePayPayCodeType']; + return $this->container['paymentDateDayOfWeek']; } /** - * Sets tierablePayPayCodeType + * Sets paymentDateDayOfWeek * - * @param \SynergiTech\Staffology\Model\PensionPayCode|null $tierablePayPayCodeType tierablePayPayCodeType + * @param \SynergiTech\Staffology\Model\DayOfWeek|null $paymentDateDayOfWeek paymentDateDayOfWeek * * @return $this */ - public function setTierablePayPayCodeType(?\SynergiTech\Staffology\Model\PensionPayCode $tierablePayPayCodeType): static + public function setPaymentDateDayOfWeek(?\SynergiTech\Staffology\Model\DayOfWeek $paymentDateDayOfWeek): static { - if (is_null($tierablePayPayCodeType)) { - throw new InvalidArgumentException('non-nullable tierablePayPayCodeType cannot be null'); + if (is_null($paymentDateDayOfWeek)) { + throw new InvalidArgumentException('non-nullable paymentDateDayOfWeek cannot be null'); } - $this->container['tierablePayPayCodeType'] = $tierablePayPayCodeType; + $this->container['paymentDateDayOfWeek'] = $paymentDateDayOfWeek; return $this; } /** - * Gets payCodeSetUniqueId + * Gets paymentDateRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\PaymentDateRule|null */ - public function getPayCodeSetUniqueId(): ?string + public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule { - return $this->container['payCodeSetUniqueId']; + return $this->container['paymentDateRule']; } /** - * Sets payCodeSetUniqueId + * Sets paymentDateRule * - * @param string|null $payCodeSetUniqueId payCodeSetUniqueId + * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule * * @return $this */ - public function setPayCodeSetUniqueId(?string $payCodeSetUniqueId): static + public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static { - if (is_null($payCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'payCodeSetUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCodeSetUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($paymentDateRule)) { + throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); } - $this->container['payCodeSetUniqueId'] = $payCodeSetUniqueId; + $this->container['paymentDateRule'] = $paymentDateRule; return $this; } /** - * Gets tierablePayPayCodeSetUniqueId + * Gets pensionRule * - * @return string|null + * @return \SynergiTech\Staffology\Model\PensionRule|null */ - public function getTierablePayPayCodeSetUniqueId(): ?string + public function getPensionRule(): ?\SynergiTech\Staffology\Model\PensionRule { - return $this->container['tierablePayPayCodeSetUniqueId']; + return $this->container['pensionRule']; } /** - * Sets tierablePayPayCodeSetUniqueId + * Sets pensionRule * - * @param string|null $tierablePayPayCodeSetUniqueId tierablePayPayCodeSetUniqueId + * @param \SynergiTech\Staffology\Model\PensionRule|null $pensionRule pensionRule * * @return $this */ - public function setTierablePayPayCodeSetUniqueId(?string $tierablePayPayCodeSetUniqueId): static + public function setPensionRule(?\SynergiTech\Staffology\Model\PensionRule $pensionRule): static { - if (is_null($tierablePayPayCodeSetUniqueId)) { - array_push($this->openAPINullablesSetToNull, 'tierablePayPayCodeSetUniqueId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tierablePayPayCodeSetUniqueId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($pensionRule)) { + throw new InvalidArgumentException('non-nullable pensionRule cannot be null'); } - $this->container['tierablePayPayCodeSetUniqueId'] = $tierablePayPayCodeSetUniqueId; + $this->container['pensionRule'] = $pensionRule; return $this; } /** - * Gets paymentDateRule + * Gets provider * - * @return \SynergiTech\Staffology\Model\PaymentDateRule|null + * @return \SynergiTech\Staffology\Model\PensionProvider|null */ - public function getPaymentDateRule(): ?\SynergiTech\Staffology\Model\PaymentDateRule + public function getProvider(): ?\SynergiTech\Staffology\Model\PensionProvider { - return $this->container['paymentDateRule']; + return $this->container['provider']; } /** - * Sets paymentDateRule + * Sets provider * - * @param \SynergiTech\Staffology\Model\PaymentDateRule|null $paymentDateRule paymentDateRule + * @param \SynergiTech\Staffology\Model\PensionProvider|null $provider provider * * @return $this */ - public function setPaymentDateRule(?\SynergiTech\Staffology\Model\PaymentDateRule $paymentDateRule): static + public function setProvider(?\SynergiTech\Staffology\Model\PensionProvider $provider): static { - if (is_null($paymentDateRule)) { - throw new InvalidArgumentException('non-nullable paymentDateRule cannot be null'); + if (is_null($provider)) { + throw new InvalidArgumentException('non-nullable provider cannot be null'); } - $this->container['paymentDateRule'] = $paymentDateRule; + $this->container['provider'] = $provider; return $this; } /** - * Gets paymentDateDayOfWeek + * Gets qualifyingScheme * - * @return \SynergiTech\Staffology\Model\DayOfWeek|null + * @return bool|null */ - public function getPaymentDateDayOfWeek(): ?\SynergiTech\Staffology\Model\DayOfWeek + public function getQualifyingScheme(): ?bool { - return $this->container['paymentDateDayOfWeek']; + return $this->container['qualifyingScheme']; } /** - * Sets paymentDateDayOfWeek + * Sets qualifyingScheme * - * @param \SynergiTech\Staffology\Model\DayOfWeek|null $paymentDateDayOfWeek paymentDateDayOfWeek + * @param bool|null $qualifyingScheme Set to true if this is a Qualifying Scheme for Auto Enrolment * * @return $this */ - public function setPaymentDateDayOfWeek(?\SynergiTech\Staffology\Model\DayOfWeek $paymentDateDayOfWeek): static + public function setQualifyingScheme(?bool $qualifyingScheme): static { - if (is_null($paymentDateDayOfWeek)) { - throw new InvalidArgumentException('non-nullable paymentDateDayOfWeek cannot be null'); + if (is_null($qualifyingScheme)) { + throw new InvalidArgumentException('non-nullable qualifyingScheme cannot be null'); } - $this->container['paymentDateDayOfWeek'] = $paymentDateDayOfWeek; + $this->container['qualifyingScheme'] = $qualifyingScheme; return $this; } /** - * Gets paymentDateDayOfMonth + * Gets reportOptionsLgpsCivicaUpm * - * @return int|null + * @return \SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsCivicaUpm|null */ - public function getPaymentDateDayOfMonth(): ?int + public function getReportOptionsLgpsCivicaUpm(): ?\SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsCivicaUpm { - return $this->container['paymentDateDayOfMonth']; + return $this->container['reportOptionsLgpsCivicaUpm']; } /** - * Sets paymentDateDayOfMonth + * Sets reportOptionsLgpsCivicaUpm * - * @param int|null $paymentDateDayOfMonth paymentDateDayOfMonth + * @param \SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsCivicaUpm|null $reportOptionsLgpsCivicaUpm reportOptionsLgpsCivicaUpm * * @return $this */ - public function setPaymentDateDayOfMonth(?int $paymentDateDayOfMonth): static + public function setReportOptionsLgpsCivicaUpm(?\SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsCivicaUpm $reportOptionsLgpsCivicaUpm): static { - if (is_null($paymentDateDayOfMonth)) { - array_push($this->openAPINullablesSetToNull, 'paymentDateDayOfMonth'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('paymentDateDayOfMonth', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($reportOptionsLgpsCivicaUpm)) { + throw new InvalidArgumentException('non-nullable reportOptionsLgpsCivicaUpm cannot be null'); } - $this->container['paymentDateDayOfMonth'] = $paymentDateDayOfMonth; + $this->container['reportOptionsLgpsCivicaUpm'] = $reportOptionsLgpsCivicaUpm; return $this; } @@ -1207,211 +1248,238 @@ public function setReportOptionsLgpsIConnect(?\SynergiTech\Staffology\Model\Pens } /** - * Gets reportOptionsLgpsCivicaUpm + * Gets singleEmploymentRelationship * - * @return \SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsCivicaUpm|null + * @return \SynergiTech\Staffology\Model\PensionSingleEmploymentRelationship|null */ - public function getReportOptionsLgpsCivicaUpm(): ?\SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsCivicaUpm + public function getSingleEmploymentRelationship(): ?\SynergiTech\Staffology\Model\PensionSingleEmploymentRelationship { - return $this->container['reportOptionsLgpsCivicaUpm']; + return $this->container['singleEmploymentRelationship']; } /** - * Sets reportOptionsLgpsCivicaUpm + * Sets singleEmploymentRelationship * - * @param \SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsCivicaUpm|null $reportOptionsLgpsCivicaUpm reportOptionsLgpsCivicaUpm + * @param \SynergiTech\Staffology\Model\PensionSingleEmploymentRelationship|null $singleEmploymentRelationship singleEmploymentRelationship * * @return $this */ - public function setReportOptionsLgpsCivicaUpm(?\SynergiTech\Staffology\Model\PensionSchemeReportOptionsLgpsCivicaUpm $reportOptionsLgpsCivicaUpm): static + public function setSingleEmploymentRelationship(?\SynergiTech\Staffology\Model\PensionSingleEmploymentRelationship $singleEmploymentRelationship): static { - if (is_null($reportOptionsLgpsCivicaUpm)) { - throw new InvalidArgumentException('non-nullable reportOptionsLgpsCivicaUpm cannot be null'); + if (is_null($singleEmploymentRelationship)) { + throw new InvalidArgumentException('non-nullable singleEmploymentRelationship cannot be null'); } - $this->container['reportOptionsLgpsCivicaUpm'] = $reportOptionsLgpsCivicaUpm; + $this->container['singleEmploymentRelationship'] = $singleEmploymentRelationship; return $this; } /** - * Gets deficitValueOrdinal + * Gets subtractBasicRateTax * - * @return int|null + * @return bool|null */ - public function getDeficitValueOrdinal(): ?int + public function getSubtractBasicRateTax(): ?bool { - return $this->container['deficitValueOrdinal']; + return $this->container['subtractBasicRateTax']; } /** - * Sets deficitValueOrdinal + * Sets subtractBasicRateTax * - * @param int|null $deficitValueOrdinal The Ordinal used to identify the PaySchedule which the Deficit will be against + * @param bool|null $subtractBasicRateTax subtractBasicRateTax * * @return $this */ - public function setDeficitValueOrdinal(?int $deficitValueOrdinal): static + public function setSubtractBasicRateTax(?bool $subtractBasicRateTax): static { - if (is_null($deficitValueOrdinal)) { - array_push($this->openAPINullablesSetToNull, 'deficitValueOrdinal'); + if (is_null($subtractBasicRateTax)) { + throw new InvalidArgumentException('non-nullable subtractBasicRateTax cannot be null'); + } + $this->container['subtractBasicRateTax'] = $subtractBasicRateTax; + + return $this; + } + + /** + * Gets tierablePayCustomPayCodes + * + * @return string[]|null + */ + public function getTierablePayCustomPayCodes(): ?array + { + return $this->container['tierablePayCustomPayCodes']; + } + + /** + * Sets tierablePayCustomPayCodes + * + * @param string[]|null $tierablePayCustomPayCodes If UseCustomPayCodesForTierablePay is set to true then this contains a list of PayCodes.Code that we'll treat as being tierable. + * + * @return $this + */ + public function setTierablePayCustomPayCodes(?array $tierablePayCustomPayCodes): static + { + if (is_null($tierablePayCustomPayCodes)) { + array_push($this->openAPINullablesSetToNull, 'tierablePayCustomPayCodes'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('deficitValueOrdinal', $nullablesSetToNull); + $index = array_search('tierablePayCustomPayCodes', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['deficitValueOrdinal'] = $deficitValueOrdinal; + $this->container['tierablePayCustomPayCodes'] = $tierablePayCustomPayCodes; return $this; } /** - * Gets deficitValue + * Gets tierablePayPayCodeSetUniqueId * - * @return float|null + * @return string|null */ - public function getDeficitValue(): ?float + public function getTierablePayPayCodeSetUniqueId(): ?string { - return $this->container['deficitValue']; + return $this->container['tierablePayPayCodeSetUniqueId']; } /** - * Sets deficitValue + * Sets tierablePayPayCodeSetUniqueId * - * @param float|null $deficitValue The Defict value that will be deducted in a PaySchedule + * @param string|null $tierablePayPayCodeSetUniqueId tierablePayPayCodeSetUniqueId * * @return $this */ - public function setDeficitValue(?float $deficitValue): static + public function setTierablePayPayCodeSetUniqueId(?string $tierablePayPayCodeSetUniqueId): static { - if (is_null($deficitValue)) { - array_push($this->openAPINullablesSetToNull, 'deficitValue'); + if (is_null($tierablePayPayCodeSetUniqueId)) { + array_push($this->openAPINullablesSetToNull, 'tierablePayPayCodeSetUniqueId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('deficitValue', $nullablesSetToNull); + $index = array_search('tierablePayPayCodeSetUniqueId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['deficitValue'] = $deficitValue; + $this->container['tierablePayPayCodeSetUniqueId'] = $tierablePayPayCodeSetUniqueId; return $this; } /** - * Gets includeDeficitValue + * Gets tierablePayPayCodeType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PensionPayCode|null */ - public function getIncludeDeficitValue(): ?bool + public function getTierablePayPayCodeType(): ?\SynergiTech\Staffology\Model\PensionPayCode { - return $this->container['includeDeficitValue']; + return $this->container['tierablePayPayCodeType']; } /** - * Sets includeDeficitValue + * Sets tierablePayPayCodeType * - * @param bool|null $includeDeficitValue Set to true if this a Deficit Payment needs to be assigned to a PaySchedule + * @param \SynergiTech\Staffology\Model\PensionPayCode|null $tierablePayPayCodeType tierablePayPayCodeType * * @return $this */ - public function setIncludeDeficitValue(?bool $includeDeficitValue): static + public function setTierablePayPayCodeType(?\SynergiTech\Staffology\Model\PensionPayCode $tierablePayPayCodeType): static { - if (is_null($includeDeficitValue)) { - throw new InvalidArgumentException('non-nullable includeDeficitValue cannot be null'); + if (is_null($tierablePayPayCodeType)) { + throw new InvalidArgumentException('non-nullable tierablePayPayCodeType cannot be null'); } - $this->container['includeDeficitValue'] = $includeDeficitValue; + $this->container['tierablePayPayCodeType'] = $tierablePayPayCodeType; return $this; } /** - * Gets deficitValuePayPeriod + * Gets useCustomPayCodes * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return bool|null */ - public function getDeficitValuePayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getUseCustomPayCodes(): ?bool { - return $this->container['deficitValuePayPeriod']; + return $this->container['useCustomPayCodes']; } /** - * Sets deficitValuePayPeriod + * Sets useCustomPayCodes * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $deficitValuePayPeriod deficitValuePayPeriod + * @param bool|null $useCustomPayCodes If set to true then rather than using the setting on the PayCode to determine if the pay is pensionable we'll instead treat it as pensionable if the Code is included in CustomPayCodes * * @return $this */ - public function setDeficitValuePayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $deficitValuePayPeriod): static + public function setUseCustomPayCodes(?bool $useCustomPayCodes): static { - if (is_null($deficitValuePayPeriod)) { - throw new InvalidArgumentException('non-nullable deficitValuePayPeriod cannot be null'); + if (is_null($useCustomPayCodes)) { + throw new InvalidArgumentException('non-nullable useCustomPayCodes cannot be null'); } - $this->container['deficitValuePayPeriod'] = $deficitValuePayPeriod; + $this->container['useCustomPayCodes'] = $useCustomPayCodes; return $this; } /** - * Gets nominalCodeMappings + * Gets useCustomPayCodesForTierablePay * - * @return \SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]|null + * @return bool|null */ - public function getNominalCodeMappings(): ?array + public function getUseCustomPayCodesForTierablePay(): ?bool { - return $this->container['nominalCodeMappings']; + return $this->container['useCustomPayCodesForTierablePay']; } /** - * Sets nominalCodeMappings + * Sets useCustomPayCodesForTierablePay * - * @param \SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]|null $nominalCodeMappings The PensionSchemeNominalCodeMappings used to map the PayCodes to a PensionScheme for the journal configuration + * @param bool|null $useCustomPayCodesForTierablePay If set to true then rather than using the setting on the PayCode to determine if the pay is tierable we'll instead treat it as tierable if the Code is included in TierablePayCustomPayCodes * * @return $this */ - public function setNominalCodeMappings(?array $nominalCodeMappings): static + public function setUseCustomPayCodesForTierablePay(?bool $useCustomPayCodesForTierablePay): static { - if (is_null($nominalCodeMappings)) { - array_push($this->openAPINullablesSetToNull, 'nominalCodeMappings'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalCodeMappings', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($useCustomPayCodesForTierablePay)) { + throw new InvalidArgumentException('non-nullable useCustomPayCodesForTierablePay cannot be null'); } - $this->container['nominalCodeMappings'] = $nominalCodeMappings; + $this->container['useCustomPayCodesForTierablePay'] = $useCustomPayCodesForTierablePay; return $this; } /** - * Gets id + * Gets workerGroups * - * @return string|null + * @return \SynergiTech\Staffology\Model\WorkerGroup[]|null */ - public function getId(): ?string + public function getWorkerGroups(): ?array { - return $this->container['id']; + return $this->container['workerGroups']; } /** - * Sets id + * Sets workerGroups * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\WorkerGroup[]|null $workerGroups A list of WorkerGroups for this Pension. There must always be at least one WorkerGroup * * @return $this */ - public function setId(?string $id): static + public function setWorkerGroups(?array $workerGroups): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($workerGroups)) { + array_push($this->openAPINullablesSetToNull, 'workerGroups'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('workerGroups', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['workerGroups'] = $workerGroups; return $this; } diff --git a/src/Model/PensionSchemeNominalCodeMapping.php b/src/Model/PensionSchemeNominalCodeMapping.php index c27c013..2352194 100644 --- a/src/Model/PensionSchemeNominalCodeMapping.php +++ b/src/Model/PensionSchemeNominalCodeMapping.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class PensionSchemeNominalCodeMapping implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ + 'journalNarrative' => 'string', 'nominalCode' => 'string', 'nominalName' => 'string', - 'journalNarrative' => 'string', 'payCode' => 'string' ]; @@ -71,9 +71,9 @@ class PensionSchemeNominalCodeMapping implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ + 'journalNarrative' => null, 'nominalCode' => null, 'nominalName' => null, - 'journalNarrative' => null, 'payCode' => null ]; @@ -83,9 +83,9 @@ class PensionSchemeNominalCodeMapping implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ + 'journalNarrative' => true, 'nominalCode' => true, 'nominalName' => true, - 'journalNarrative' => true, 'payCode' => true ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'journalNarrative' => 'journalNarrative', 'nominalCode' => 'nominalCode', 'nominalName' => 'nominalName', - 'journalNarrative' => 'journalNarrative', 'payCode' => 'payCode' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'journalNarrative' => 'setJournalNarrative', 'nominalCode' => 'setNominalCode', 'nominalName' => 'setNominalName', - 'journalNarrative' => 'setJournalNarrative', 'payCode' => 'setPayCode' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'journalNarrative' => 'getJournalNarrative', 'nominalCode' => 'getNominalCode', 'nominalName' => 'getNominalName', - 'journalNarrative' => 'getJournalNarrative', 'payCode' => 'getPayCode' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('journalNarrative', $data ?? [], null); $this->setIfExists('nominalCode', $data ?? [], null); $this->setIfExists('nominalName', $data ?? [], null); - $this->setIfExists('journalNarrative', $data ?? [], null); $this->setIfExists('payCode', $data ?? [], null); } @@ -294,6 +294,10 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if (!is_null($this->container['journalNarrative']) && (mb_strlen($this->container['journalNarrative']) > 500)) { + $invalidProperties[] = "invalid value for 'journalNarrative', the character length must be smaller than or equal to 500."; + } + if (!is_null($this->container['nominalCode']) && (mb_strlen($this->container['nominalCode']) > 500)) { $invalidProperties[] = "invalid value for 'nominalCode', the character length must be smaller than or equal to 500."; } @@ -302,10 +306,6 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'nominalName', the character length must be smaller than or equal to 100."; } - if (!is_null($this->container['journalNarrative']) && (mb_strlen($this->container['journalNarrative']) > 500)) { - $invalidProperties[] = "invalid value for 'journalNarrative', the character length must be smaller than or equal to 500."; - } - return $invalidProperties; } @@ -322,115 +322,115 @@ public function valid(): bool /** - * Gets nominalCode + * Gets journalNarrative * * @return string|null */ - public function getNominalCode(): ?string + public function getJournalNarrative(): ?string { - return $this->container['nominalCode']; + return $this->container['journalNarrative']; } /** - * Sets nominalCode + * Sets journalNarrative * - * @param string|null $nominalCode Nominal Code for pension scheme + * @param string|null $journalNarrative Journal narrative description. * * @return $this */ - public function setNominalCode(?string $nominalCode): static + public function setJournalNarrative(?string $journalNarrative): static { - if (is_null($nominalCode)) { - array_push($this->openAPINullablesSetToNull, 'nominalCode'); + if (is_null($journalNarrative)) { + array_push($this->openAPINullablesSetToNull, 'journalNarrative'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalCode', $nullablesSetToNull); + $index = array_search('journalNarrative', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($nominalCode) && (mb_strlen($nominalCode) > 500)) { - throw new InvalidArgumentException('invalid length for $nominalCode when calling PensionSchemeNominalCodeMapping., must be smaller than or equal to 500.'); + if (!is_null($journalNarrative) && (mb_strlen($journalNarrative) > 500)) { + throw new InvalidArgumentException('invalid length for $journalNarrative when calling PensionSchemeNominalCodeMapping., must be smaller than or equal to 500.'); } - $this->container['nominalCode'] = $nominalCode; + $this->container['journalNarrative'] = $journalNarrative; return $this; } /** - * Gets nominalName + * Gets nominalCode * * @return string|null */ - public function getNominalName(): ?string + public function getNominalCode(): ?string { - return $this->container['nominalName']; + return $this->container['nominalCode']; } /** - * Sets nominalName + * Sets nominalCode * - * @param string|null $nominalName Nominal Name + * @param string|null $nominalCode Nominal Code for pension scheme * * @return $this */ - public function setNominalName(?string $nominalName): static + public function setNominalCode(?string $nominalCode): static { - if (is_null($nominalName)) { - array_push($this->openAPINullablesSetToNull, 'nominalName'); + if (is_null($nominalCode)) { + array_push($this->openAPINullablesSetToNull, 'nominalCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalName', $nullablesSetToNull); + $index = array_search('nominalCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($nominalName) && (mb_strlen($nominalName) > 100)) { - throw new InvalidArgumentException('invalid length for $nominalName when calling PensionSchemeNominalCodeMapping., must be smaller than or equal to 100.'); + if (!is_null($nominalCode) && (mb_strlen($nominalCode) > 500)) { + throw new InvalidArgumentException('invalid length for $nominalCode when calling PensionSchemeNominalCodeMapping., must be smaller than or equal to 500.'); } - $this->container['nominalName'] = $nominalName; + $this->container['nominalCode'] = $nominalCode; return $this; } /** - * Gets journalNarrative + * Gets nominalName * * @return string|null */ - public function getJournalNarrative(): ?string + public function getNominalName(): ?string { - return $this->container['journalNarrative']; + return $this->container['nominalName']; } /** - * Sets journalNarrative + * Sets nominalName * - * @param string|null $journalNarrative Journal narrative description. + * @param string|null $nominalName Nominal Name * * @return $this */ - public function setJournalNarrative(?string $journalNarrative): static + public function setNominalName(?string $nominalName): static { - if (is_null($journalNarrative)) { - array_push($this->openAPINullablesSetToNull, 'journalNarrative'); + if (is_null($nominalName)) { + array_push($this->openAPINullablesSetToNull, 'nominalName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('journalNarrative', $nullablesSetToNull); + $index = array_search('nominalName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($journalNarrative) && (mb_strlen($journalNarrative) > 500)) { - throw new InvalidArgumentException('invalid length for $journalNarrative when calling PensionSchemeNominalCodeMapping., must be smaller than or equal to 500.'); + if (!is_null($nominalName) && (mb_strlen($nominalName) > 100)) { + throw new InvalidArgumentException('invalid length for $nominalName when calling PensionSchemeNominalCodeMapping., must be smaller than or equal to 100.'); } - $this->container['journalNarrative'] = $journalNarrative; + $this->container['nominalName'] = $nominalName; return $this; } diff --git a/src/Model/PensionSchemeReportOptionsLgpsCivicaUpm.php b/src/Model/PensionSchemeReportOptionsLgpsCivicaUpm.php index 2233745..31cdb9b 100644 --- a/src/Model/PensionSchemeReportOptionsLgpsCivicaUpm.php +++ b/src/Model/PensionSchemeReportOptionsLgpsCivicaUpm.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,15 @@ class PensionSchemeReportOptionsLgpsCivicaUpm implements ModelInterface, ArrayAc * @var array */ protected static array $openAPITypes = [ - 'payrollNumber' => '\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber', + 'addressesForNewJoinersOnly' => 'bool', 'casualHours' => '\SynergiTech\Staffology\Model\LgpsCivicaCasualHours', - 'omitHeaderLine' => 'bool', - 'includeFolderNo' => 'bool', 'excludeSchoolEmployerName' => 'bool', - 'addressesForNewJoinersOnly' => 'bool', - 'proRatePtHoursWeeksWorked' => 'bool', 'fullTimeHoursAsOneHundred' => 'bool', - 'includeWeeksWorkedColumns' => 'bool' + 'includeFolderNo' => 'bool', + 'includeWeeksWorkedColumns' => 'bool', + 'omitHeaderLine' => 'bool', + 'payrollNumber' => '\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber', + 'proRatePtHoursWeeksWorked' => 'bool' ]; /** @@ -76,15 +76,15 @@ class PensionSchemeReportOptionsLgpsCivicaUpm implements ModelInterface, ArrayAc * @var array */ protected static array $openAPIFormats = [ - 'payrollNumber' => null, + 'addressesForNewJoinersOnly' => null, 'casualHours' => null, - 'omitHeaderLine' => null, - 'includeFolderNo' => null, 'excludeSchoolEmployerName' => null, - 'addressesForNewJoinersOnly' => null, - 'proRatePtHoursWeeksWorked' => null, 'fullTimeHoursAsOneHundred' => null, - 'includeWeeksWorkedColumns' => null + 'includeFolderNo' => null, + 'includeWeeksWorkedColumns' => null, + 'omitHeaderLine' => null, + 'payrollNumber' => null, + 'proRatePtHoursWeeksWorked' => null ]; /** @@ -93,15 +93,15 @@ class PensionSchemeReportOptionsLgpsCivicaUpm implements ModelInterface, ArrayAc * @var array */ protected static array $openAPINullables = [ - 'payrollNumber' => false, + 'addressesForNewJoinersOnly' => false, 'casualHours' => false, - 'omitHeaderLine' => false, - 'includeFolderNo' => false, 'excludeSchoolEmployerName' => false, - 'addressesForNewJoinersOnly' => false, - 'proRatePtHoursWeeksWorked' => false, 'fullTimeHoursAsOneHundred' => false, - 'includeWeeksWorkedColumns' => false + 'includeFolderNo' => false, + 'includeWeeksWorkedColumns' => false, + 'omitHeaderLine' => false, + 'payrollNumber' => false, + 'proRatePtHoursWeeksWorked' => false ]; /** @@ -190,15 +190,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollNumber' => 'payrollNumber', + 'addressesForNewJoinersOnly' => 'addressesForNewJoinersOnly', 'casualHours' => 'casualHours', - 'omitHeaderLine' => 'omitHeaderLine', - 'includeFolderNo' => 'includeFolderNo', 'excludeSchoolEmployerName' => 'excludeSchoolEmployerName', - 'addressesForNewJoinersOnly' => 'addressesForNewJoinersOnly', - 'proRatePtHoursWeeksWorked' => 'proRatePtHoursWeeksWorked', 'fullTimeHoursAsOneHundred' => 'fullTimeHoursAsOneHundred', - 'includeWeeksWorkedColumns' => 'includeWeeksWorkedColumns' + 'includeFolderNo' => 'includeFolderNo', + 'includeWeeksWorkedColumns' => 'includeWeeksWorkedColumns', + 'omitHeaderLine' => 'omitHeaderLine', + 'payrollNumber' => 'payrollNumber', + 'proRatePtHoursWeeksWorked' => 'proRatePtHoursWeeksWorked' ]; /** @@ -207,15 +207,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollNumber' => 'setPayrollNumber', + 'addressesForNewJoinersOnly' => 'setAddressesForNewJoinersOnly', 'casualHours' => 'setCasualHours', - 'omitHeaderLine' => 'setOmitHeaderLine', - 'includeFolderNo' => 'setIncludeFolderNo', 'excludeSchoolEmployerName' => 'setExcludeSchoolEmployerName', - 'addressesForNewJoinersOnly' => 'setAddressesForNewJoinersOnly', - 'proRatePtHoursWeeksWorked' => 'setProRatePtHoursWeeksWorked', 'fullTimeHoursAsOneHundred' => 'setFullTimeHoursAsOneHundred', - 'includeWeeksWorkedColumns' => 'setIncludeWeeksWorkedColumns' + 'includeFolderNo' => 'setIncludeFolderNo', + 'includeWeeksWorkedColumns' => 'setIncludeWeeksWorkedColumns', + 'omitHeaderLine' => 'setOmitHeaderLine', + 'payrollNumber' => 'setPayrollNumber', + 'proRatePtHoursWeeksWorked' => 'setProRatePtHoursWeeksWorked' ]; /** @@ -224,15 +224,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollNumber' => 'getPayrollNumber', + 'addressesForNewJoinersOnly' => 'getAddressesForNewJoinersOnly', 'casualHours' => 'getCasualHours', - 'omitHeaderLine' => 'getOmitHeaderLine', - 'includeFolderNo' => 'getIncludeFolderNo', 'excludeSchoolEmployerName' => 'getExcludeSchoolEmployerName', - 'addressesForNewJoinersOnly' => 'getAddressesForNewJoinersOnly', - 'proRatePtHoursWeeksWorked' => 'getProRatePtHoursWeeksWorked', 'fullTimeHoursAsOneHundred' => 'getFullTimeHoursAsOneHundred', - 'includeWeeksWorkedColumns' => 'getIncludeWeeksWorkedColumns' + 'includeFolderNo' => 'getIncludeFolderNo', + 'includeWeeksWorkedColumns' => 'getIncludeWeeksWorkedColumns', + 'omitHeaderLine' => 'getOmitHeaderLine', + 'payrollNumber' => 'getPayrollNumber', + 'proRatePtHoursWeeksWorked' => 'getProRatePtHoursWeeksWorked' ]; /** @@ -291,15 +291,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollNumber', $data ?? [], null); + $this->setIfExists('addressesForNewJoinersOnly', $data ?? [], null); $this->setIfExists('casualHours', $data ?? [], null); - $this->setIfExists('omitHeaderLine', $data ?? [], null); - $this->setIfExists('includeFolderNo', $data ?? [], null); $this->setIfExists('excludeSchoolEmployerName', $data ?? [], null); - $this->setIfExists('addressesForNewJoinersOnly', $data ?? [], null); - $this->setIfExists('proRatePtHoursWeeksWorked', $data ?? [], null); $this->setIfExists('fullTimeHoursAsOneHundred', $data ?? [], null); + $this->setIfExists('includeFolderNo', $data ?? [], null); $this->setIfExists('includeWeeksWorkedColumns', $data ?? [], null); + $this->setIfExists('omitHeaderLine', $data ?? [], null); + $this->setIfExists('payrollNumber', $data ?? [], null); + $this->setIfExists('proRatePtHoursWeeksWorked', $data ?? [], null); } /** @@ -345,28 +345,28 @@ public function valid(): bool /** - * Gets payrollNumber + * Gets addressesForNewJoinersOnly * - * @return \SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber|null + * @return bool|null */ - public function getPayrollNumber(): ?\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber + public function getAddressesForNewJoinersOnly(): ?bool { - return $this->container['payrollNumber']; + return $this->container['addressesForNewJoinersOnly']; } /** - * Sets payrollNumber + * Sets addressesForNewJoinersOnly * - * @param \SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber|null $payrollNumber payrollNumber + * @param bool|null $addressesForNewJoinersOnly addressesForNewJoinersOnly * * @return $this */ - public function setPayrollNumber(?\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber $payrollNumber): static + public function setAddressesForNewJoinersOnly(?bool $addressesForNewJoinersOnly): static { - if (is_null($payrollNumber)) { - throw new InvalidArgumentException('non-nullable payrollNumber cannot be null'); + if (is_null($addressesForNewJoinersOnly)) { + throw new InvalidArgumentException('non-nullable addressesForNewJoinersOnly cannot be null'); } - $this->container['payrollNumber'] = $payrollNumber; + $this->container['addressesForNewJoinersOnly'] = $addressesForNewJoinersOnly; return $this; } @@ -399,190 +399,190 @@ public function setCasualHours(?\SynergiTech\Staffology\Model\LgpsCivicaCasualHo } /** - * Gets omitHeaderLine + * Gets excludeSchoolEmployerName * * @return bool|null */ - public function getOmitHeaderLine(): ?bool + public function getExcludeSchoolEmployerName(): ?bool { - return $this->container['omitHeaderLine']; + return $this->container['excludeSchoolEmployerName']; } /** - * Sets omitHeaderLine + * Sets excludeSchoolEmployerName * - * @param bool|null $omitHeaderLine omitHeaderLine + * @param bool|null $excludeSchoolEmployerName excludeSchoolEmployerName * * @return $this */ - public function setOmitHeaderLine(?bool $omitHeaderLine): static + public function setExcludeSchoolEmployerName(?bool $excludeSchoolEmployerName): static { - if (is_null($omitHeaderLine)) { - throw new InvalidArgumentException('non-nullable omitHeaderLine cannot be null'); + if (is_null($excludeSchoolEmployerName)) { + throw new InvalidArgumentException('non-nullable excludeSchoolEmployerName cannot be null'); } - $this->container['omitHeaderLine'] = $omitHeaderLine; + $this->container['excludeSchoolEmployerName'] = $excludeSchoolEmployerName; return $this; } /** - * Gets includeFolderNo + * Gets fullTimeHoursAsOneHundred * * @return bool|null */ - public function getIncludeFolderNo(): ?bool + public function getFullTimeHoursAsOneHundred(): ?bool { - return $this->container['includeFolderNo']; + return $this->container['fullTimeHoursAsOneHundred']; } /** - * Sets includeFolderNo + * Sets fullTimeHoursAsOneHundred * - * @param bool|null $includeFolderNo includeFolderNo + * @param bool|null $fullTimeHoursAsOneHundred fullTimeHoursAsOneHundred * * @return $this */ - public function setIncludeFolderNo(?bool $includeFolderNo): static + public function setFullTimeHoursAsOneHundred(?bool $fullTimeHoursAsOneHundred): static { - if (is_null($includeFolderNo)) { - throw new InvalidArgumentException('non-nullable includeFolderNo cannot be null'); + if (is_null($fullTimeHoursAsOneHundred)) { + throw new InvalidArgumentException('non-nullable fullTimeHoursAsOneHundred cannot be null'); } - $this->container['includeFolderNo'] = $includeFolderNo; + $this->container['fullTimeHoursAsOneHundred'] = $fullTimeHoursAsOneHundred; return $this; } /** - * Gets excludeSchoolEmployerName + * Gets includeFolderNo * * @return bool|null */ - public function getExcludeSchoolEmployerName(): ?bool + public function getIncludeFolderNo(): ?bool { - return $this->container['excludeSchoolEmployerName']; + return $this->container['includeFolderNo']; } /** - * Sets excludeSchoolEmployerName + * Sets includeFolderNo * - * @param bool|null $excludeSchoolEmployerName excludeSchoolEmployerName + * @param bool|null $includeFolderNo includeFolderNo * * @return $this */ - public function setExcludeSchoolEmployerName(?bool $excludeSchoolEmployerName): static + public function setIncludeFolderNo(?bool $includeFolderNo): static { - if (is_null($excludeSchoolEmployerName)) { - throw new InvalidArgumentException('non-nullable excludeSchoolEmployerName cannot be null'); + if (is_null($includeFolderNo)) { + throw new InvalidArgumentException('non-nullable includeFolderNo cannot be null'); } - $this->container['excludeSchoolEmployerName'] = $excludeSchoolEmployerName; + $this->container['includeFolderNo'] = $includeFolderNo; return $this; } /** - * Gets addressesForNewJoinersOnly + * Gets includeWeeksWorkedColumns * * @return bool|null */ - public function getAddressesForNewJoinersOnly(): ?bool + public function getIncludeWeeksWorkedColumns(): ?bool { - return $this->container['addressesForNewJoinersOnly']; + return $this->container['includeWeeksWorkedColumns']; } /** - * Sets addressesForNewJoinersOnly + * Sets includeWeeksWorkedColumns * - * @param bool|null $addressesForNewJoinersOnly addressesForNewJoinersOnly + * @param bool|null $includeWeeksWorkedColumns includeWeeksWorkedColumns * * @return $this */ - public function setAddressesForNewJoinersOnly(?bool $addressesForNewJoinersOnly): static + public function setIncludeWeeksWorkedColumns(?bool $includeWeeksWorkedColumns): static { - if (is_null($addressesForNewJoinersOnly)) { - throw new InvalidArgumentException('non-nullable addressesForNewJoinersOnly cannot be null'); + if (is_null($includeWeeksWorkedColumns)) { + throw new InvalidArgumentException('non-nullable includeWeeksWorkedColumns cannot be null'); } - $this->container['addressesForNewJoinersOnly'] = $addressesForNewJoinersOnly; + $this->container['includeWeeksWorkedColumns'] = $includeWeeksWorkedColumns; return $this; } /** - * Gets proRatePtHoursWeeksWorked + * Gets omitHeaderLine * * @return bool|null */ - public function getProRatePtHoursWeeksWorked(): ?bool + public function getOmitHeaderLine(): ?bool { - return $this->container['proRatePtHoursWeeksWorked']; + return $this->container['omitHeaderLine']; } /** - * Sets proRatePtHoursWeeksWorked + * Sets omitHeaderLine * - * @param bool|null $proRatePtHoursWeeksWorked proRatePtHoursWeeksWorked + * @param bool|null $omitHeaderLine omitHeaderLine * * @return $this */ - public function setProRatePtHoursWeeksWorked(?bool $proRatePtHoursWeeksWorked): static + public function setOmitHeaderLine(?bool $omitHeaderLine): static { - if (is_null($proRatePtHoursWeeksWorked)) { - throw new InvalidArgumentException('non-nullable proRatePtHoursWeeksWorked cannot be null'); + if (is_null($omitHeaderLine)) { + throw new InvalidArgumentException('non-nullable omitHeaderLine cannot be null'); } - $this->container['proRatePtHoursWeeksWorked'] = $proRatePtHoursWeeksWorked; + $this->container['omitHeaderLine'] = $omitHeaderLine; return $this; } /** - * Gets fullTimeHoursAsOneHundred + * Gets payrollNumber * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber|null */ - public function getFullTimeHoursAsOneHundred(): ?bool + public function getPayrollNumber(): ?\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber { - return $this->container['fullTimeHoursAsOneHundred']; + return $this->container['payrollNumber']; } /** - * Sets fullTimeHoursAsOneHundred + * Sets payrollNumber * - * @param bool|null $fullTimeHoursAsOneHundred fullTimeHoursAsOneHundred + * @param \SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber|null $payrollNumber payrollNumber * * @return $this */ - public function setFullTimeHoursAsOneHundred(?bool $fullTimeHoursAsOneHundred): static + public function setPayrollNumber(?\SynergiTech\Staffology\Model\LgpsCivicaPayrollNumber $payrollNumber): static { - if (is_null($fullTimeHoursAsOneHundred)) { - throw new InvalidArgumentException('non-nullable fullTimeHoursAsOneHundred cannot be null'); + if (is_null($payrollNumber)) { + throw new InvalidArgumentException('non-nullable payrollNumber cannot be null'); } - $this->container['fullTimeHoursAsOneHundred'] = $fullTimeHoursAsOneHundred; + $this->container['payrollNumber'] = $payrollNumber; return $this; } /** - * Gets includeWeeksWorkedColumns + * Gets proRatePtHoursWeeksWorked * * @return bool|null */ - public function getIncludeWeeksWorkedColumns(): ?bool + public function getProRatePtHoursWeeksWorked(): ?bool { - return $this->container['includeWeeksWorkedColumns']; + return $this->container['proRatePtHoursWeeksWorked']; } /** - * Sets includeWeeksWorkedColumns + * Sets proRatePtHoursWeeksWorked * - * @param bool|null $includeWeeksWorkedColumns includeWeeksWorkedColumns + * @param bool|null $proRatePtHoursWeeksWorked proRatePtHoursWeeksWorked * * @return $this */ - public function setIncludeWeeksWorkedColumns(?bool $includeWeeksWorkedColumns): static + public function setProRatePtHoursWeeksWorked(?bool $proRatePtHoursWeeksWorked): static { - if (is_null($includeWeeksWorkedColumns)) { - throw new InvalidArgumentException('non-nullable includeWeeksWorkedColumns cannot be null'); + if (is_null($proRatePtHoursWeeksWorked)) { + throw new InvalidArgumentException('non-nullable proRatePtHoursWeeksWorked cannot be null'); } - $this->container['includeWeeksWorkedColumns'] = $includeWeeksWorkedColumns; + $this->container['proRatePtHoursWeeksWorked'] = $proRatePtHoursWeeksWorked; return $this; } diff --git a/src/Model/PensionSchemeReportOptionsLgpsIConnect.php b/src/Model/PensionSchemeReportOptionsLgpsIConnect.php index 668ad38..592d300 100644 --- a/src/Model/PensionSchemeReportOptionsLgpsIConnect.php +++ b/src/Model/PensionSchemeReportOptionsLgpsIConnect.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,29 +59,29 @@ class PensionSchemeReportOptionsLgpsIConnect implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPITypes = [ + 'breakReasonSmpIndicatorOnly' => 'bool', + 'casualStaffHoursAsOne' => 'bool', + 'casualStaffIndicatorAsY' => 'bool', + 'customText' => 'string', 'fileType' => '\SynergiTech\Staffology\Model\LgpsIConnectFileType', + 'forceUpperCase' => 'bool', + 'ignoreHours' => 'bool', + 'ignoreTermTimeWeeksForFteFinalPay' => 'bool', + 'includeAeQualifyingEarnings' => 'bool', + 'includeEmploymentBreaks' => 'bool', 'payrollReference1' => '\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference', 'payrollReference2' => '\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference', 'payrollReference3' => '\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference', 'populateEmailAddress' => 'bool', - 'populateTelephoneNumber' => 'bool', + 'populateMaritalStatus' => 'bool', 'populateMobileNumber' => 'bool', - 'populateWorksPlaceName' => 'bool', + 'populateTelephoneNumber' => 'bool', 'populateWorksAddress' => 'bool', 'populateWorksEmailAddress' => 'bool', - 'includeEmploymentBreaks' => 'bool', - 'breakReasonSmpIndicatorOnly' => 'bool', - 'populateMaritalStatus' => 'bool', - 'includeAeQualifyingEarnings' => 'bool', + 'populateWorksPlaceName' => 'bool', 'proRatePtHoursByTermTimeWeeks' => 'bool', - 'ignoreTermTimeWeeksForFteFinalPay' => 'bool', - 'showFteAnnualSalaryForFteFinalPay' => 'bool', - 'casualStaffHoursAsOne' => 'bool', - 'casualStaffIndicatorAsY' => 'bool', - 'ignoreHours' => 'bool', - 'forceUpperCase' => 'bool', 'salaryType' => '\SynergiTech\Staffology\Model\LgpsIConnectSalaryType', - 'customText' => 'string' + 'showFteAnnualSalaryForFteFinalPay' => 'bool' ]; /** @@ -90,29 +90,29 @@ class PensionSchemeReportOptionsLgpsIConnect implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPIFormats = [ + 'breakReasonSmpIndicatorOnly' => null, + 'casualStaffHoursAsOne' => null, + 'casualStaffIndicatorAsY' => null, + 'customText' => null, 'fileType' => null, + 'forceUpperCase' => null, + 'ignoreHours' => null, + 'ignoreTermTimeWeeksForFteFinalPay' => null, + 'includeAeQualifyingEarnings' => null, + 'includeEmploymentBreaks' => null, 'payrollReference1' => null, 'payrollReference2' => null, 'payrollReference3' => null, 'populateEmailAddress' => null, - 'populateTelephoneNumber' => null, + 'populateMaritalStatus' => null, 'populateMobileNumber' => null, - 'populateWorksPlaceName' => null, + 'populateTelephoneNumber' => null, 'populateWorksAddress' => null, 'populateWorksEmailAddress' => null, - 'includeEmploymentBreaks' => null, - 'breakReasonSmpIndicatorOnly' => null, - 'populateMaritalStatus' => null, - 'includeAeQualifyingEarnings' => null, + 'populateWorksPlaceName' => null, 'proRatePtHoursByTermTimeWeeks' => null, - 'ignoreTermTimeWeeksForFteFinalPay' => null, - 'showFteAnnualSalaryForFteFinalPay' => null, - 'casualStaffHoursAsOne' => null, - 'casualStaffIndicatorAsY' => null, - 'ignoreHours' => null, - 'forceUpperCase' => null, 'salaryType' => null, - 'customText' => null + 'showFteAnnualSalaryForFteFinalPay' => null ]; /** @@ -121,29 +121,29 @@ class PensionSchemeReportOptionsLgpsIConnect implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPINullables = [ + 'breakReasonSmpIndicatorOnly' => false, + 'casualStaffHoursAsOne' => false, + 'casualStaffIndicatorAsY' => false, + 'customText' => true, 'fileType' => false, + 'forceUpperCase' => false, + 'ignoreHours' => false, + 'ignoreTermTimeWeeksForFteFinalPay' => false, + 'includeAeQualifyingEarnings' => false, + 'includeEmploymentBreaks' => false, 'payrollReference1' => false, 'payrollReference2' => false, 'payrollReference3' => false, 'populateEmailAddress' => false, - 'populateTelephoneNumber' => false, + 'populateMaritalStatus' => false, 'populateMobileNumber' => false, - 'populateWorksPlaceName' => false, + 'populateTelephoneNumber' => false, 'populateWorksAddress' => false, 'populateWorksEmailAddress' => false, - 'includeEmploymentBreaks' => false, - 'breakReasonSmpIndicatorOnly' => false, - 'populateMaritalStatus' => false, - 'includeAeQualifyingEarnings' => false, + 'populateWorksPlaceName' => false, 'proRatePtHoursByTermTimeWeeks' => false, - 'ignoreTermTimeWeeksForFteFinalPay' => false, - 'showFteAnnualSalaryForFteFinalPay' => false, - 'casualStaffHoursAsOne' => false, - 'casualStaffIndicatorAsY' => false, - 'ignoreHours' => false, - 'forceUpperCase' => false, 'salaryType' => false, - 'customText' => true + 'showFteAnnualSalaryForFteFinalPay' => false ]; /** @@ -232,29 +232,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'breakReasonSmpIndicatorOnly' => 'breakReasonSmpIndicatorOnly', + 'casualStaffHoursAsOne' => 'casualStaffHoursAsOne', + 'casualStaffIndicatorAsY' => 'casualStaffIndicatorAsY', + 'customText' => 'customText', 'fileType' => 'fileType', + 'forceUpperCase' => 'forceUpperCase', + 'ignoreHours' => 'ignoreHours', + 'ignoreTermTimeWeeksForFteFinalPay' => 'ignoreTermTimeWeeksForFteFinalPay', + 'includeAeQualifyingEarnings' => 'includeAeQualifyingEarnings', + 'includeEmploymentBreaks' => 'includeEmploymentBreaks', 'payrollReference1' => 'payrollReference1', 'payrollReference2' => 'payrollReference2', 'payrollReference3' => 'payrollReference3', 'populateEmailAddress' => 'populateEmailAddress', - 'populateTelephoneNumber' => 'populateTelephoneNumber', + 'populateMaritalStatus' => 'populateMaritalStatus', 'populateMobileNumber' => 'populateMobileNumber', - 'populateWorksPlaceName' => 'populateWorksPlaceName', + 'populateTelephoneNumber' => 'populateTelephoneNumber', 'populateWorksAddress' => 'populateWorksAddress', 'populateWorksEmailAddress' => 'populateWorksEmailAddress', - 'includeEmploymentBreaks' => 'includeEmploymentBreaks', - 'breakReasonSmpIndicatorOnly' => 'breakReasonSmpIndicatorOnly', - 'populateMaritalStatus' => 'populateMaritalStatus', - 'includeAeQualifyingEarnings' => 'includeAeQualifyingEarnings', + 'populateWorksPlaceName' => 'populateWorksPlaceName', 'proRatePtHoursByTermTimeWeeks' => 'proRatePtHoursByTermTimeWeeks', - 'ignoreTermTimeWeeksForFteFinalPay' => 'ignoreTermTimeWeeksForFteFinalPay', - 'showFteAnnualSalaryForFteFinalPay' => 'showFteAnnualSalaryForFteFinalPay', - 'casualStaffHoursAsOne' => 'casualStaffHoursAsOne', - 'casualStaffIndicatorAsY' => 'casualStaffIndicatorAsY', - 'ignoreHours' => 'ignoreHours', - 'forceUpperCase' => 'forceUpperCase', 'salaryType' => 'salaryType', - 'customText' => 'customText' + 'showFteAnnualSalaryForFteFinalPay' => 'showFteAnnualSalaryForFteFinalPay' ]; /** @@ -263,29 +263,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'breakReasonSmpIndicatorOnly' => 'setBreakReasonSmpIndicatorOnly', + 'casualStaffHoursAsOne' => 'setCasualStaffHoursAsOne', + 'casualStaffIndicatorAsY' => 'setCasualStaffIndicatorAsY', + 'customText' => 'setCustomText', 'fileType' => 'setFileType', + 'forceUpperCase' => 'setForceUpperCase', + 'ignoreHours' => 'setIgnoreHours', + 'ignoreTermTimeWeeksForFteFinalPay' => 'setIgnoreTermTimeWeeksForFteFinalPay', + 'includeAeQualifyingEarnings' => 'setIncludeAeQualifyingEarnings', + 'includeEmploymentBreaks' => 'setIncludeEmploymentBreaks', 'payrollReference1' => 'setPayrollReference1', 'payrollReference2' => 'setPayrollReference2', 'payrollReference3' => 'setPayrollReference3', 'populateEmailAddress' => 'setPopulateEmailAddress', - 'populateTelephoneNumber' => 'setPopulateTelephoneNumber', + 'populateMaritalStatus' => 'setPopulateMaritalStatus', 'populateMobileNumber' => 'setPopulateMobileNumber', - 'populateWorksPlaceName' => 'setPopulateWorksPlaceName', + 'populateTelephoneNumber' => 'setPopulateTelephoneNumber', 'populateWorksAddress' => 'setPopulateWorksAddress', 'populateWorksEmailAddress' => 'setPopulateWorksEmailAddress', - 'includeEmploymentBreaks' => 'setIncludeEmploymentBreaks', - 'breakReasonSmpIndicatorOnly' => 'setBreakReasonSmpIndicatorOnly', - 'populateMaritalStatus' => 'setPopulateMaritalStatus', - 'includeAeQualifyingEarnings' => 'setIncludeAeQualifyingEarnings', + 'populateWorksPlaceName' => 'setPopulateWorksPlaceName', 'proRatePtHoursByTermTimeWeeks' => 'setProRatePtHoursByTermTimeWeeks', - 'ignoreTermTimeWeeksForFteFinalPay' => 'setIgnoreTermTimeWeeksForFteFinalPay', - 'showFteAnnualSalaryForFteFinalPay' => 'setShowFteAnnualSalaryForFteFinalPay', - 'casualStaffHoursAsOne' => 'setCasualStaffHoursAsOne', - 'casualStaffIndicatorAsY' => 'setCasualStaffIndicatorAsY', - 'ignoreHours' => 'setIgnoreHours', - 'forceUpperCase' => 'setForceUpperCase', 'salaryType' => 'setSalaryType', - 'customText' => 'setCustomText' + 'showFteAnnualSalaryForFteFinalPay' => 'setShowFteAnnualSalaryForFteFinalPay' ]; /** @@ -294,29 +294,29 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'breakReasonSmpIndicatorOnly' => 'getBreakReasonSmpIndicatorOnly', + 'casualStaffHoursAsOne' => 'getCasualStaffHoursAsOne', + 'casualStaffIndicatorAsY' => 'getCasualStaffIndicatorAsY', + 'customText' => 'getCustomText', 'fileType' => 'getFileType', + 'forceUpperCase' => 'getForceUpperCase', + 'ignoreHours' => 'getIgnoreHours', + 'ignoreTermTimeWeeksForFteFinalPay' => 'getIgnoreTermTimeWeeksForFteFinalPay', + 'includeAeQualifyingEarnings' => 'getIncludeAeQualifyingEarnings', + 'includeEmploymentBreaks' => 'getIncludeEmploymentBreaks', 'payrollReference1' => 'getPayrollReference1', 'payrollReference2' => 'getPayrollReference2', 'payrollReference3' => 'getPayrollReference3', 'populateEmailAddress' => 'getPopulateEmailAddress', - 'populateTelephoneNumber' => 'getPopulateTelephoneNumber', + 'populateMaritalStatus' => 'getPopulateMaritalStatus', 'populateMobileNumber' => 'getPopulateMobileNumber', - 'populateWorksPlaceName' => 'getPopulateWorksPlaceName', + 'populateTelephoneNumber' => 'getPopulateTelephoneNumber', 'populateWorksAddress' => 'getPopulateWorksAddress', 'populateWorksEmailAddress' => 'getPopulateWorksEmailAddress', - 'includeEmploymentBreaks' => 'getIncludeEmploymentBreaks', - 'breakReasonSmpIndicatorOnly' => 'getBreakReasonSmpIndicatorOnly', - 'populateMaritalStatus' => 'getPopulateMaritalStatus', - 'includeAeQualifyingEarnings' => 'getIncludeAeQualifyingEarnings', + 'populateWorksPlaceName' => 'getPopulateWorksPlaceName', 'proRatePtHoursByTermTimeWeeks' => 'getProRatePtHoursByTermTimeWeeks', - 'ignoreTermTimeWeeksForFteFinalPay' => 'getIgnoreTermTimeWeeksForFteFinalPay', - 'showFteAnnualSalaryForFteFinalPay' => 'getShowFteAnnualSalaryForFteFinalPay', - 'casualStaffHoursAsOne' => 'getCasualStaffHoursAsOne', - 'casualStaffIndicatorAsY' => 'getCasualStaffIndicatorAsY', - 'ignoreHours' => 'getIgnoreHours', - 'forceUpperCase' => 'getForceUpperCase', 'salaryType' => 'getSalaryType', - 'customText' => 'getCustomText' + 'showFteAnnualSalaryForFteFinalPay' => 'getShowFteAnnualSalaryForFteFinalPay' ]; /** @@ -375,29 +375,29 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('breakReasonSmpIndicatorOnly', $data ?? [], null); + $this->setIfExists('casualStaffHoursAsOne', $data ?? [], null); + $this->setIfExists('casualStaffIndicatorAsY', $data ?? [], null); + $this->setIfExists('customText', $data ?? [], null); $this->setIfExists('fileType', $data ?? [], null); + $this->setIfExists('forceUpperCase', $data ?? [], null); + $this->setIfExists('ignoreHours', $data ?? [], null); + $this->setIfExists('ignoreTermTimeWeeksForFteFinalPay', $data ?? [], null); + $this->setIfExists('includeAeQualifyingEarnings', $data ?? [], null); + $this->setIfExists('includeEmploymentBreaks', $data ?? [], null); $this->setIfExists('payrollReference1', $data ?? [], null); $this->setIfExists('payrollReference2', $data ?? [], null); $this->setIfExists('payrollReference3', $data ?? [], null); $this->setIfExists('populateEmailAddress', $data ?? [], null); - $this->setIfExists('populateTelephoneNumber', $data ?? [], null); + $this->setIfExists('populateMaritalStatus', $data ?? [], null); $this->setIfExists('populateMobileNumber', $data ?? [], null); - $this->setIfExists('populateWorksPlaceName', $data ?? [], null); + $this->setIfExists('populateTelephoneNumber', $data ?? [], null); $this->setIfExists('populateWorksAddress', $data ?? [], null); $this->setIfExists('populateWorksEmailAddress', $data ?? [], null); - $this->setIfExists('includeEmploymentBreaks', $data ?? [], null); - $this->setIfExists('breakReasonSmpIndicatorOnly', $data ?? [], null); - $this->setIfExists('populateMaritalStatus', $data ?? [], null); - $this->setIfExists('includeAeQualifyingEarnings', $data ?? [], null); + $this->setIfExists('populateWorksPlaceName', $data ?? [], null); $this->setIfExists('proRatePtHoursByTermTimeWeeks', $data ?? [], null); - $this->setIfExists('ignoreTermTimeWeeksForFteFinalPay', $data ?? [], null); - $this->setIfExists('showFteAnnualSalaryForFteFinalPay', $data ?? [], null); - $this->setIfExists('casualStaffHoursAsOne', $data ?? [], null); - $this->setIfExists('casualStaffIndicatorAsY', $data ?? [], null); - $this->setIfExists('ignoreHours', $data ?? [], null); - $this->setIfExists('forceUpperCase', $data ?? [], null); $this->setIfExists('salaryType', $data ?? [], null); - $this->setIfExists('customText', $data ?? [], null); + $this->setIfExists('showFteAnnualSalaryForFteFinalPay', $data ?? [], null); } /** @@ -443,568 +443,575 @@ public function valid(): bool /** - * Gets fileType + * Gets breakReasonSmpIndicatorOnly * - * @return \SynergiTech\Staffology\Model\LgpsIConnectFileType|null + * @return bool|null */ - public function getFileType(): ?\SynergiTech\Staffology\Model\LgpsIConnectFileType + public function getBreakReasonSmpIndicatorOnly(): ?bool { - return $this->container['fileType']; + return $this->container['breakReasonSmpIndicatorOnly']; } /** - * Sets fileType + * Sets breakReasonSmpIndicatorOnly * - * @param \SynergiTech\Staffology\Model\LgpsIConnectFileType|null $fileType fileType + * @param bool|null $breakReasonSmpIndicatorOnly breakReasonSmpIndicatorOnly * * @return $this */ - public function setFileType(?\SynergiTech\Staffology\Model\LgpsIConnectFileType $fileType): static + public function setBreakReasonSmpIndicatorOnly(?bool $breakReasonSmpIndicatorOnly): static { - if (is_null($fileType)) { - throw new InvalidArgumentException('non-nullable fileType cannot be null'); + if (is_null($breakReasonSmpIndicatorOnly)) { + throw new InvalidArgumentException('non-nullable breakReasonSmpIndicatorOnly cannot be null'); } - $this->container['fileType'] = $fileType; + $this->container['breakReasonSmpIndicatorOnly'] = $breakReasonSmpIndicatorOnly; return $this; } /** - * Gets payrollReference1 + * Gets casualStaffHoursAsOne * - * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null + * @return bool|null */ - public function getPayrollReference1(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference + public function getCasualStaffHoursAsOne(): ?bool { - return $this->container['payrollReference1']; + return $this->container['casualStaffHoursAsOne']; } /** - * Sets payrollReference1 + * Sets casualStaffHoursAsOne * - * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference1 payrollReference1 + * @param bool|null $casualStaffHoursAsOne casualStaffHoursAsOne * * @return $this */ - public function setPayrollReference1(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference1): static + public function setCasualStaffHoursAsOne(?bool $casualStaffHoursAsOne): static { - if (is_null($payrollReference1)) { - throw new InvalidArgumentException('non-nullable payrollReference1 cannot be null'); + if (is_null($casualStaffHoursAsOne)) { + throw new InvalidArgumentException('non-nullable casualStaffHoursAsOne cannot be null'); } - $this->container['payrollReference1'] = $payrollReference1; + $this->container['casualStaffHoursAsOne'] = $casualStaffHoursAsOne; return $this; } /** - * Gets payrollReference2 + * Gets casualStaffIndicatorAsY * - * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null + * @return bool|null */ - public function getPayrollReference2(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference + public function getCasualStaffIndicatorAsY(): ?bool { - return $this->container['payrollReference2']; + return $this->container['casualStaffIndicatorAsY']; } /** - * Sets payrollReference2 + * Sets casualStaffIndicatorAsY * - * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference2 payrollReference2 + * @param bool|null $casualStaffIndicatorAsY casualStaffIndicatorAsY * * @return $this */ - public function setPayrollReference2(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference2): static + public function setCasualStaffIndicatorAsY(?bool $casualStaffIndicatorAsY): static { - if (is_null($payrollReference2)) { - throw new InvalidArgumentException('non-nullable payrollReference2 cannot be null'); + if (is_null($casualStaffIndicatorAsY)) { + throw new InvalidArgumentException('non-nullable casualStaffIndicatorAsY cannot be null'); } - $this->container['payrollReference2'] = $payrollReference2; + $this->container['casualStaffIndicatorAsY'] = $casualStaffIndicatorAsY; return $this; } /** - * Gets payrollReference3 + * Gets customText * - * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null + * @return string|null */ - public function getPayrollReference3(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference + public function getCustomText(): ?string { - return $this->container['payrollReference3']; + return $this->container['customText']; } /** - * Sets payrollReference3 + * Sets customText * - * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference3 payrollReference3 + * @param string|null $customText customText * * @return $this */ - public function setPayrollReference3(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference3): static + public function setCustomText(?string $customText): static { - if (is_null($payrollReference3)) { - throw new InvalidArgumentException('non-nullable payrollReference3 cannot be null'); + if (is_null($customText)) { + array_push($this->openAPINullablesSetToNull, 'customText'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('customText', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payrollReference3'] = $payrollReference3; + $this->container['customText'] = $customText; return $this; } /** - * Gets populateEmailAddress + * Gets fileType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsIConnectFileType|null */ - public function getPopulateEmailAddress(): ?bool + public function getFileType(): ?\SynergiTech\Staffology\Model\LgpsIConnectFileType { - return $this->container['populateEmailAddress']; + return $this->container['fileType']; } /** - * Sets populateEmailAddress + * Sets fileType * - * @param bool|null $populateEmailAddress populateEmailAddress + * @param \SynergiTech\Staffology\Model\LgpsIConnectFileType|null $fileType fileType * * @return $this */ - public function setPopulateEmailAddress(?bool $populateEmailAddress): static + public function setFileType(?\SynergiTech\Staffology\Model\LgpsIConnectFileType $fileType): static { - if (is_null($populateEmailAddress)) { - throw new InvalidArgumentException('non-nullable populateEmailAddress cannot be null'); + if (is_null($fileType)) { + throw new InvalidArgumentException('non-nullable fileType cannot be null'); } - $this->container['populateEmailAddress'] = $populateEmailAddress; + $this->container['fileType'] = $fileType; return $this; } /** - * Gets populateTelephoneNumber + * Gets forceUpperCase * * @return bool|null */ - public function getPopulateTelephoneNumber(): ?bool + public function getForceUpperCase(): ?bool { - return $this->container['populateTelephoneNumber']; + return $this->container['forceUpperCase']; } /** - * Sets populateTelephoneNumber + * Sets forceUpperCase * - * @param bool|null $populateTelephoneNumber populateTelephoneNumber + * @param bool|null $forceUpperCase forceUpperCase * * @return $this */ - public function setPopulateTelephoneNumber(?bool $populateTelephoneNumber): static + public function setForceUpperCase(?bool $forceUpperCase): static { - if (is_null($populateTelephoneNumber)) { - throw new InvalidArgumentException('non-nullable populateTelephoneNumber cannot be null'); + if (is_null($forceUpperCase)) { + throw new InvalidArgumentException('non-nullable forceUpperCase cannot be null'); } - $this->container['populateTelephoneNumber'] = $populateTelephoneNumber; + $this->container['forceUpperCase'] = $forceUpperCase; return $this; } /** - * Gets populateMobileNumber + * Gets ignoreHours * * @return bool|null */ - public function getPopulateMobileNumber(): ?bool + public function getIgnoreHours(): ?bool { - return $this->container['populateMobileNumber']; + return $this->container['ignoreHours']; } /** - * Sets populateMobileNumber + * Sets ignoreHours * - * @param bool|null $populateMobileNumber populateMobileNumber + * @param bool|null $ignoreHours ignoreHours * * @return $this */ - public function setPopulateMobileNumber(?bool $populateMobileNumber): static + public function setIgnoreHours(?bool $ignoreHours): static { - if (is_null($populateMobileNumber)) { - throw new InvalidArgumentException('non-nullable populateMobileNumber cannot be null'); + if (is_null($ignoreHours)) { + throw new InvalidArgumentException('non-nullable ignoreHours cannot be null'); } - $this->container['populateMobileNumber'] = $populateMobileNumber; + $this->container['ignoreHours'] = $ignoreHours; return $this; } /** - * Gets populateWorksPlaceName + * Gets ignoreTermTimeWeeksForFteFinalPay * * @return bool|null */ - public function getPopulateWorksPlaceName(): ?bool + public function getIgnoreTermTimeWeeksForFteFinalPay(): ?bool { - return $this->container['populateWorksPlaceName']; + return $this->container['ignoreTermTimeWeeksForFteFinalPay']; } /** - * Sets populateWorksPlaceName + * Sets ignoreTermTimeWeeksForFteFinalPay * - * @param bool|null $populateWorksPlaceName populateWorksPlaceName + * @param bool|null $ignoreTermTimeWeeksForFteFinalPay ignoreTermTimeWeeksForFteFinalPay * * @return $this */ - public function setPopulateWorksPlaceName(?bool $populateWorksPlaceName): static + public function setIgnoreTermTimeWeeksForFteFinalPay(?bool $ignoreTermTimeWeeksForFteFinalPay): static { - if (is_null($populateWorksPlaceName)) { - throw new InvalidArgumentException('non-nullable populateWorksPlaceName cannot be null'); + if (is_null($ignoreTermTimeWeeksForFteFinalPay)) { + throw new InvalidArgumentException('non-nullable ignoreTermTimeWeeksForFteFinalPay cannot be null'); } - $this->container['populateWorksPlaceName'] = $populateWorksPlaceName; + $this->container['ignoreTermTimeWeeksForFteFinalPay'] = $ignoreTermTimeWeeksForFteFinalPay; return $this; } /** - * Gets populateWorksAddress + * Gets includeAeQualifyingEarnings * * @return bool|null */ - public function getPopulateWorksAddress(): ?bool + public function getIncludeAeQualifyingEarnings(): ?bool { - return $this->container['populateWorksAddress']; + return $this->container['includeAeQualifyingEarnings']; } /** - * Sets populateWorksAddress + * Sets includeAeQualifyingEarnings * - * @param bool|null $populateWorksAddress populateWorksAddress + * @param bool|null $includeAeQualifyingEarnings includeAeQualifyingEarnings * * @return $this */ - public function setPopulateWorksAddress(?bool $populateWorksAddress): static + public function setIncludeAeQualifyingEarnings(?bool $includeAeQualifyingEarnings): static { - if (is_null($populateWorksAddress)) { - throw new InvalidArgumentException('non-nullable populateWorksAddress cannot be null'); + if (is_null($includeAeQualifyingEarnings)) { + throw new InvalidArgumentException('non-nullable includeAeQualifyingEarnings cannot be null'); } - $this->container['populateWorksAddress'] = $populateWorksAddress; + $this->container['includeAeQualifyingEarnings'] = $includeAeQualifyingEarnings; return $this; } /** - * Gets populateWorksEmailAddress + * Gets includeEmploymentBreaks * * @return bool|null */ - public function getPopulateWorksEmailAddress(): ?bool + public function getIncludeEmploymentBreaks(): ?bool { - return $this->container['populateWorksEmailAddress']; + return $this->container['includeEmploymentBreaks']; } /** - * Sets populateWorksEmailAddress + * Sets includeEmploymentBreaks * - * @param bool|null $populateWorksEmailAddress populateWorksEmailAddress + * @param bool|null $includeEmploymentBreaks includeEmploymentBreaks * * @return $this */ - public function setPopulateWorksEmailAddress(?bool $populateWorksEmailAddress): static + public function setIncludeEmploymentBreaks(?bool $includeEmploymentBreaks): static { - if (is_null($populateWorksEmailAddress)) { - throw new InvalidArgumentException('non-nullable populateWorksEmailAddress cannot be null'); + if (is_null($includeEmploymentBreaks)) { + throw new InvalidArgumentException('non-nullable includeEmploymentBreaks cannot be null'); } - $this->container['populateWorksEmailAddress'] = $populateWorksEmailAddress; + $this->container['includeEmploymentBreaks'] = $includeEmploymentBreaks; return $this; } /** - * Gets includeEmploymentBreaks + * Gets payrollReference1 * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null */ - public function getIncludeEmploymentBreaks(): ?bool + public function getPayrollReference1(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference { - return $this->container['includeEmploymentBreaks']; + return $this->container['payrollReference1']; } /** - * Sets includeEmploymentBreaks + * Sets payrollReference1 * - * @param bool|null $includeEmploymentBreaks includeEmploymentBreaks + * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference1 payrollReference1 * * @return $this */ - public function setIncludeEmploymentBreaks(?bool $includeEmploymentBreaks): static + public function setPayrollReference1(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference1): static { - if (is_null($includeEmploymentBreaks)) { - throw new InvalidArgumentException('non-nullable includeEmploymentBreaks cannot be null'); + if (is_null($payrollReference1)) { + throw new InvalidArgumentException('non-nullable payrollReference1 cannot be null'); } - $this->container['includeEmploymentBreaks'] = $includeEmploymentBreaks; + $this->container['payrollReference1'] = $payrollReference1; return $this; } /** - * Gets breakReasonSmpIndicatorOnly + * Gets payrollReference2 * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null */ - public function getBreakReasonSmpIndicatorOnly(): ?bool + public function getPayrollReference2(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference { - return $this->container['breakReasonSmpIndicatorOnly']; + return $this->container['payrollReference2']; } /** - * Sets breakReasonSmpIndicatorOnly + * Sets payrollReference2 * - * @param bool|null $breakReasonSmpIndicatorOnly breakReasonSmpIndicatorOnly + * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference2 payrollReference2 * * @return $this */ - public function setBreakReasonSmpIndicatorOnly(?bool $breakReasonSmpIndicatorOnly): static + public function setPayrollReference2(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference2): static { - if (is_null($breakReasonSmpIndicatorOnly)) { - throw new InvalidArgumentException('non-nullable breakReasonSmpIndicatorOnly cannot be null'); + if (is_null($payrollReference2)) { + throw new InvalidArgumentException('non-nullable payrollReference2 cannot be null'); } - $this->container['breakReasonSmpIndicatorOnly'] = $breakReasonSmpIndicatorOnly; + $this->container['payrollReference2'] = $payrollReference2; return $this; } /** - * Gets populateMaritalStatus + * Gets payrollReference3 * - * @return bool|null + * @return \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null */ - public function getPopulateMaritalStatus(): ?bool + public function getPayrollReference3(): ?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference { - return $this->container['populateMaritalStatus']; + return $this->container['payrollReference3']; } /** - * Sets populateMaritalStatus + * Sets payrollReference3 * - * @param bool|null $populateMaritalStatus populateMaritalStatus + * @param \SynergiTech\Staffology\Model\LgpsIConnectPayrollReference|null $payrollReference3 payrollReference3 * * @return $this */ - public function setPopulateMaritalStatus(?bool $populateMaritalStatus): static + public function setPayrollReference3(?\SynergiTech\Staffology\Model\LgpsIConnectPayrollReference $payrollReference3): static { - if (is_null($populateMaritalStatus)) { - throw new InvalidArgumentException('non-nullable populateMaritalStatus cannot be null'); + if (is_null($payrollReference3)) { + throw new InvalidArgumentException('non-nullable payrollReference3 cannot be null'); } - $this->container['populateMaritalStatus'] = $populateMaritalStatus; + $this->container['payrollReference3'] = $payrollReference3; return $this; } /** - * Gets includeAeQualifyingEarnings + * Gets populateEmailAddress * * @return bool|null */ - public function getIncludeAeQualifyingEarnings(): ?bool + public function getPopulateEmailAddress(): ?bool { - return $this->container['includeAeQualifyingEarnings']; + return $this->container['populateEmailAddress']; } /** - * Sets includeAeQualifyingEarnings + * Sets populateEmailAddress * - * @param bool|null $includeAeQualifyingEarnings includeAeQualifyingEarnings + * @param bool|null $populateEmailAddress populateEmailAddress * * @return $this */ - public function setIncludeAeQualifyingEarnings(?bool $includeAeQualifyingEarnings): static + public function setPopulateEmailAddress(?bool $populateEmailAddress): static { - if (is_null($includeAeQualifyingEarnings)) { - throw new InvalidArgumentException('non-nullable includeAeQualifyingEarnings cannot be null'); + if (is_null($populateEmailAddress)) { + throw new InvalidArgumentException('non-nullable populateEmailAddress cannot be null'); } - $this->container['includeAeQualifyingEarnings'] = $includeAeQualifyingEarnings; + $this->container['populateEmailAddress'] = $populateEmailAddress; return $this; } /** - * Gets proRatePtHoursByTermTimeWeeks + * Gets populateMaritalStatus * * @return bool|null */ - public function getProRatePtHoursByTermTimeWeeks(): ?bool + public function getPopulateMaritalStatus(): ?bool { - return $this->container['proRatePtHoursByTermTimeWeeks']; + return $this->container['populateMaritalStatus']; } /** - * Sets proRatePtHoursByTermTimeWeeks + * Sets populateMaritalStatus * - * @param bool|null $proRatePtHoursByTermTimeWeeks proRatePtHoursByTermTimeWeeks + * @param bool|null $populateMaritalStatus populateMaritalStatus * * @return $this */ - public function setProRatePtHoursByTermTimeWeeks(?bool $proRatePtHoursByTermTimeWeeks): static + public function setPopulateMaritalStatus(?bool $populateMaritalStatus): static { - if (is_null($proRatePtHoursByTermTimeWeeks)) { - throw new InvalidArgumentException('non-nullable proRatePtHoursByTermTimeWeeks cannot be null'); + if (is_null($populateMaritalStatus)) { + throw new InvalidArgumentException('non-nullable populateMaritalStatus cannot be null'); } - $this->container['proRatePtHoursByTermTimeWeeks'] = $proRatePtHoursByTermTimeWeeks; + $this->container['populateMaritalStatus'] = $populateMaritalStatus; return $this; } /** - * Gets ignoreTermTimeWeeksForFteFinalPay + * Gets populateMobileNumber * * @return bool|null */ - public function getIgnoreTermTimeWeeksForFteFinalPay(): ?bool + public function getPopulateMobileNumber(): ?bool { - return $this->container['ignoreTermTimeWeeksForFteFinalPay']; + return $this->container['populateMobileNumber']; } /** - * Sets ignoreTermTimeWeeksForFteFinalPay + * Sets populateMobileNumber * - * @param bool|null $ignoreTermTimeWeeksForFteFinalPay ignoreTermTimeWeeksForFteFinalPay + * @param bool|null $populateMobileNumber populateMobileNumber * * @return $this */ - public function setIgnoreTermTimeWeeksForFteFinalPay(?bool $ignoreTermTimeWeeksForFteFinalPay): static + public function setPopulateMobileNumber(?bool $populateMobileNumber): static { - if (is_null($ignoreTermTimeWeeksForFteFinalPay)) { - throw new InvalidArgumentException('non-nullable ignoreTermTimeWeeksForFteFinalPay cannot be null'); + if (is_null($populateMobileNumber)) { + throw new InvalidArgumentException('non-nullable populateMobileNumber cannot be null'); } - $this->container['ignoreTermTimeWeeksForFteFinalPay'] = $ignoreTermTimeWeeksForFteFinalPay; + $this->container['populateMobileNumber'] = $populateMobileNumber; return $this; } /** - * Gets showFteAnnualSalaryForFteFinalPay + * Gets populateTelephoneNumber * * @return bool|null */ - public function getShowFteAnnualSalaryForFteFinalPay(): ?bool + public function getPopulateTelephoneNumber(): ?bool { - return $this->container['showFteAnnualSalaryForFteFinalPay']; + return $this->container['populateTelephoneNumber']; } /** - * Sets showFteAnnualSalaryForFteFinalPay + * Sets populateTelephoneNumber * - * @param bool|null $showFteAnnualSalaryForFteFinalPay showFteAnnualSalaryForFteFinalPay + * @param bool|null $populateTelephoneNumber populateTelephoneNumber * * @return $this */ - public function setShowFteAnnualSalaryForFteFinalPay(?bool $showFteAnnualSalaryForFteFinalPay): static + public function setPopulateTelephoneNumber(?bool $populateTelephoneNumber): static { - if (is_null($showFteAnnualSalaryForFteFinalPay)) { - throw new InvalidArgumentException('non-nullable showFteAnnualSalaryForFteFinalPay cannot be null'); + if (is_null($populateTelephoneNumber)) { + throw new InvalidArgumentException('non-nullable populateTelephoneNumber cannot be null'); } - $this->container['showFteAnnualSalaryForFteFinalPay'] = $showFteAnnualSalaryForFteFinalPay; + $this->container['populateTelephoneNumber'] = $populateTelephoneNumber; return $this; } /** - * Gets casualStaffHoursAsOne + * Gets populateWorksAddress * * @return bool|null */ - public function getCasualStaffHoursAsOne(): ?bool + public function getPopulateWorksAddress(): ?bool { - return $this->container['casualStaffHoursAsOne']; + return $this->container['populateWorksAddress']; } /** - * Sets casualStaffHoursAsOne + * Sets populateWorksAddress * - * @param bool|null $casualStaffHoursAsOne casualStaffHoursAsOne + * @param bool|null $populateWorksAddress populateWorksAddress * * @return $this */ - public function setCasualStaffHoursAsOne(?bool $casualStaffHoursAsOne): static + public function setPopulateWorksAddress(?bool $populateWorksAddress): static { - if (is_null($casualStaffHoursAsOne)) { - throw new InvalidArgumentException('non-nullable casualStaffHoursAsOne cannot be null'); + if (is_null($populateWorksAddress)) { + throw new InvalidArgumentException('non-nullable populateWorksAddress cannot be null'); } - $this->container['casualStaffHoursAsOne'] = $casualStaffHoursAsOne; + $this->container['populateWorksAddress'] = $populateWorksAddress; return $this; } /** - * Gets casualStaffIndicatorAsY + * Gets populateWorksEmailAddress * * @return bool|null */ - public function getCasualStaffIndicatorAsY(): ?bool + public function getPopulateWorksEmailAddress(): ?bool { - return $this->container['casualStaffIndicatorAsY']; + return $this->container['populateWorksEmailAddress']; } /** - * Sets casualStaffIndicatorAsY + * Sets populateWorksEmailAddress * - * @param bool|null $casualStaffIndicatorAsY casualStaffIndicatorAsY + * @param bool|null $populateWorksEmailAddress populateWorksEmailAddress * * @return $this */ - public function setCasualStaffIndicatorAsY(?bool $casualStaffIndicatorAsY): static + public function setPopulateWorksEmailAddress(?bool $populateWorksEmailAddress): static { - if (is_null($casualStaffIndicatorAsY)) { - throw new InvalidArgumentException('non-nullable casualStaffIndicatorAsY cannot be null'); + if (is_null($populateWorksEmailAddress)) { + throw new InvalidArgumentException('non-nullable populateWorksEmailAddress cannot be null'); } - $this->container['casualStaffIndicatorAsY'] = $casualStaffIndicatorAsY; + $this->container['populateWorksEmailAddress'] = $populateWorksEmailAddress; return $this; } /** - * Gets ignoreHours + * Gets populateWorksPlaceName * * @return bool|null */ - public function getIgnoreHours(): ?bool + public function getPopulateWorksPlaceName(): ?bool { - return $this->container['ignoreHours']; + return $this->container['populateWorksPlaceName']; } /** - * Sets ignoreHours + * Sets populateWorksPlaceName * - * @param bool|null $ignoreHours ignoreHours + * @param bool|null $populateWorksPlaceName populateWorksPlaceName * * @return $this */ - public function setIgnoreHours(?bool $ignoreHours): static + public function setPopulateWorksPlaceName(?bool $populateWorksPlaceName): static { - if (is_null($ignoreHours)) { - throw new InvalidArgumentException('non-nullable ignoreHours cannot be null'); + if (is_null($populateWorksPlaceName)) { + throw new InvalidArgumentException('non-nullable populateWorksPlaceName cannot be null'); } - $this->container['ignoreHours'] = $ignoreHours; + $this->container['populateWorksPlaceName'] = $populateWorksPlaceName; return $this; } /** - * Gets forceUpperCase + * Gets proRatePtHoursByTermTimeWeeks * * @return bool|null */ - public function getForceUpperCase(): ?bool + public function getProRatePtHoursByTermTimeWeeks(): ?bool { - return $this->container['forceUpperCase']; + return $this->container['proRatePtHoursByTermTimeWeeks']; } /** - * Sets forceUpperCase + * Sets proRatePtHoursByTermTimeWeeks * - * @param bool|null $forceUpperCase forceUpperCase + * @param bool|null $proRatePtHoursByTermTimeWeeks proRatePtHoursByTermTimeWeeks * * @return $this */ - public function setForceUpperCase(?bool $forceUpperCase): static + public function setProRatePtHoursByTermTimeWeeks(?bool $proRatePtHoursByTermTimeWeeks): static { - if (is_null($forceUpperCase)) { - throw new InvalidArgumentException('non-nullable forceUpperCase cannot be null'); + if (is_null($proRatePtHoursByTermTimeWeeks)) { + throw new InvalidArgumentException('non-nullable proRatePtHoursByTermTimeWeeks cannot be null'); } - $this->container['forceUpperCase'] = $forceUpperCase; + $this->container['proRatePtHoursByTermTimeWeeks'] = $proRatePtHoursByTermTimeWeeks; return $this; } @@ -1037,35 +1044,28 @@ public function setSalaryType(?\SynergiTech\Staffology\Model\LgpsIConnectSalaryT } /** - * Gets customText + * Gets showFteAnnualSalaryForFteFinalPay * - * @return string|null + * @return bool|null */ - public function getCustomText(): ?string + public function getShowFteAnnualSalaryForFteFinalPay(): ?bool { - return $this->container['customText']; + return $this->container['showFteAnnualSalaryForFteFinalPay']; } /** - * Sets customText + * Sets showFteAnnualSalaryForFteFinalPay * - * @param string|null $customText customText + * @param bool|null $showFteAnnualSalaryForFteFinalPay showFteAnnualSalaryForFteFinalPay * * @return $this */ - public function setCustomText(?string $customText): static + public function setShowFteAnnualSalaryForFteFinalPay(?bool $showFteAnnualSalaryForFteFinalPay): static { - if (is_null($customText)) { - array_push($this->openAPINullablesSetToNull, 'customText'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('customText', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($showFteAnnualSalaryForFteFinalPay)) { + throw new InvalidArgumentException('non-nullable showFteAnnualSalaryForFteFinalPay cannot be null'); } - $this->container['customText'] = $customText; + $this->container['showFteAnnualSalaryForFteFinalPay'] = $showFteAnnualSalaryForFteFinalPay; return $this; } diff --git a/src/Model/PensionSingleEmploymentRelationship.php b/src/Model/PensionSingleEmploymentRelationship.php new file mode 100644 index 0000000..f34f192 --- /dev/null +++ b/src/Model/PensionSingleEmploymentRelationship.php @@ -0,0 +1,45 @@ + */ protected static array $openAPITypes = [ - 'pensionId' => 'string', - 'name' => 'string', - 'pensionSchemeId' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', - 'workerGroupId' => 'string', - 'pensionRule' => '\SynergiTech\Staffology\Model\PensionRule', - 'subtractedBasicRateTax' => 'bool', - 'papdisPensionProviderId' => 'string', - 'papdisEmployerId' => 'string', - 'employeePensionContributionMultiplier' => 'float', 'additionalVoluntaryContribution' => 'float', - 'avcIsPercentage' => 'bool', - 'autoEnrolled' => 'bool', - 'workerGroup' => '\SynergiTech\Staffology\Model\WorkerGroup', - 'forcedTier' => 'string', - 'tiers' => '\SynergiTech\Staffology\Model\TieredPensionRate[]', + 'associatedEmployeeRoles' => '\SynergiTech\Staffology\Model\Item[]', 'assumedPensionablePay' => 'float', - 'pensionablePayCodes' => 'string[]', - 'tierablePayPayCodes' => 'string[]', - 'isHalfContributionMember' => 'bool', - 'pensionableEarnings' => 'float', - 'pensionablePay' => 'float', - 'nonTierablePay' => 'float', + 'assumedPensionablePayBfd' => 'float', + 'autoEnrolled' => 'bool', + 'avcIsPercentage' => 'bool', + 'contributionCalculationDate' => '\DateTime', 'employeePensionContribution' => 'float', 'employeePensionContributionAvc' => 'float', + 'employeePensionContributionAvcBfd' => 'float', + 'employeePensionContributionBfd' => 'float', + 'employeePensionContributionMultiplier' => 'float', 'employerPensionContribution' => 'float', + 'employerPensionContributionBfd' => 'float', + 'endDate' => '\DateTime', + 'forcedTier' => 'string', 'isForEndedPension' => 'bool', - 'associatedEmployeeRoles' => '\SynergiTech\Staffology\Model\Item[]', + 'isHalfContributionMember' => 'bool', + 'isTeachersPension' => 'bool', + 'leaveDaysUnderHalfPay' => 'int', + 'name' => 'string', + 'nominalCodeMappings' => '\SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]', + 'nonPensionableStatutoryPay' => 'float', + 'nonPensionableStatutoryPays' => 'array', + 'nonTierablePay' => 'float', 'notionalPay' => 'float', + 'notionalPayDetails' => '\SynergiTech\Staffology\Model\LeaveNotionalPayDetails[]', + 'papdisEmployerId' => 'string', + 'papdisPensionProviderId' => 'string', + 'pensionId' => 'string', + 'pensionRule' => '\SynergiTech\Staffology\Model\PensionRule', + 'pensionSchemeId' => 'string', + 'pensionableEarnings' => 'float', 'pensionableEarningsBfd' => 'float', + 'pensionablePay' => 'float', 'pensionablePayBfd' => 'float', - 'employeePensionContributionBfd' => 'float', - 'assumedPensionablePayBfd' => 'float', - 'employerPensionContributionBfd' => 'float', - 'employeePensionContributionAvcBfd' => 'float', - 'whenEarnedPensionSummaries' => '\SynergiTech\Staffology\Model\PensionSummary[]', + 'pensionablePayCodes' => 'string[]', 'periodFrom' => '\DateTime', 'periodTo' => '\DateTime', - 'whenEarnedPensionableEarningsCorrection' => 'float', - 'whenEarnedPensionablePayCorrection' => 'float', + 'startDate' => '\DateTime', + 'subtractedBasicRateTax' => 'bool', + 'tierablePayPayCodes' => 'string[]', + 'tiers' => '\SynergiTech\Staffology\Model\TieredPensionRate[]', + 'treatAsWhenPaidForBackPay' => 'bool', + 'whenEarnedEmployeePensionContributionAvcCorrection' => 'float', + 'whenEarnedEmployeePensionContributionAvcCorrectionBfd' => 'float', 'whenEarnedEmployeePensionContributionCorrection' => 'float', + 'whenEarnedEmployeePensionContributionCorrectionBfd' => 'float', 'whenEarnedEmployerPensionContributionCorrection' => 'float', - 'whenEarnedEmployeePensionContributionAvcCorrection' => 'float', + 'whenEarnedEmployerPensionContributionCorrectionBfd' => 'float', + 'whenEarnedPensionSummaries' => '\SynergiTech\Staffology\Model\PensionSummary[]', + 'whenEarnedPensionableEarningsCorrection' => 'float', 'whenEarnedPensionableEarningsCorrectionBfd' => 'float', + 'whenEarnedPensionablePayCorrection' => 'float', 'whenEarnedPensionablePayCorrectionBfd' => 'float', - 'whenEarnedEmployeePensionContributionCorrectionBfd' => 'float', - 'whenEarnedEmployerPensionContributionCorrectionBfd' => 'float', - 'whenEarnedEmployeePensionContributionAvcCorrectionBfd' => 'float', - 'nominalCodeMappings' => '\SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]' + 'workerGroup' => '\SynergiTech\Staffology\Model\WorkerGroup', + 'workerGroupId' => 'string' ]; /** @@ -118,56 +125,63 @@ class PensionSummary implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'pensionId' => 'uuid', - 'name' => null, - 'pensionSchemeId' => 'uuid', - 'startDate' => 'date', - 'endDate' => 'date', - 'workerGroupId' => 'uuid', - 'pensionRule' => null, - 'subtractedBasicRateTax' => null, - 'papdisPensionProviderId' => null, - 'papdisEmployerId' => null, - 'employeePensionContributionMultiplier' => 'double', 'additionalVoluntaryContribution' => 'double', - 'avcIsPercentage' => null, - 'autoEnrolled' => null, - 'workerGroup' => null, - 'forcedTier' => null, - 'tiers' => null, + 'associatedEmployeeRoles' => null, 'assumedPensionablePay' => 'double', - 'pensionablePayCodes' => null, - 'tierablePayPayCodes' => null, - 'isHalfContributionMember' => null, - 'pensionableEarnings' => 'double', - 'pensionablePay' => 'double', - 'nonTierablePay' => 'double', + 'assumedPensionablePayBfd' => 'double', + 'autoEnrolled' => null, + 'avcIsPercentage' => null, + 'contributionCalculationDate' => 'date', 'employeePensionContribution' => 'double', 'employeePensionContributionAvc' => 'double', + 'employeePensionContributionAvcBfd' => 'double', + 'employeePensionContributionBfd' => 'double', + 'employeePensionContributionMultiplier' => 'double', 'employerPensionContribution' => 'double', + 'employerPensionContributionBfd' => 'double', + 'endDate' => 'date', + 'forcedTier' => null, 'isForEndedPension' => null, - 'associatedEmployeeRoles' => null, + 'isHalfContributionMember' => null, + 'isTeachersPension' => null, + 'leaveDaysUnderHalfPay' => 'int32', + 'name' => null, + 'nominalCodeMappings' => null, + 'nonPensionableStatutoryPay' => 'double', + 'nonPensionableStatutoryPays' => 'double', + 'nonTierablePay' => 'double', 'notionalPay' => 'double', + 'notionalPayDetails' => null, + 'papdisEmployerId' => null, + 'papdisPensionProviderId' => null, + 'pensionId' => 'uuid', + 'pensionRule' => null, + 'pensionSchemeId' => 'uuid', + 'pensionableEarnings' => 'double', 'pensionableEarningsBfd' => 'double', + 'pensionablePay' => 'double', 'pensionablePayBfd' => 'double', - 'employeePensionContributionBfd' => 'double', - 'assumedPensionablePayBfd' => 'double', - 'employerPensionContributionBfd' => 'double', - 'employeePensionContributionAvcBfd' => 'double', - 'whenEarnedPensionSummaries' => null, + 'pensionablePayCodes' => null, 'periodFrom' => 'date', 'periodTo' => 'date', - 'whenEarnedPensionableEarningsCorrection' => 'double', - 'whenEarnedPensionablePayCorrection' => 'double', + 'startDate' => 'date', + 'subtractedBasicRateTax' => null, + 'tierablePayPayCodes' => null, + 'tiers' => null, + 'treatAsWhenPaidForBackPay' => null, + 'whenEarnedEmployeePensionContributionAvcCorrection' => 'double', + 'whenEarnedEmployeePensionContributionAvcCorrectionBfd' => 'double', 'whenEarnedEmployeePensionContributionCorrection' => 'double', + 'whenEarnedEmployeePensionContributionCorrectionBfd' => 'double', 'whenEarnedEmployerPensionContributionCorrection' => 'double', - 'whenEarnedEmployeePensionContributionAvcCorrection' => 'double', + 'whenEarnedEmployerPensionContributionCorrectionBfd' => 'double', + 'whenEarnedPensionSummaries' => null, + 'whenEarnedPensionableEarningsCorrection' => 'double', 'whenEarnedPensionableEarningsCorrectionBfd' => 'double', + 'whenEarnedPensionablePayCorrection' => 'double', 'whenEarnedPensionablePayCorrectionBfd' => 'double', - 'whenEarnedEmployeePensionContributionCorrectionBfd' => 'double', - 'whenEarnedEmployerPensionContributionCorrectionBfd' => 'double', - 'whenEarnedEmployeePensionContributionAvcCorrectionBfd' => 'double', - 'nominalCodeMappings' => null + 'workerGroup' => null, + 'workerGroupId' => 'uuid' ]; /** @@ -176,56 +190,63 @@ class PensionSummary implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'pensionId' => false, - 'name' => true, - 'pensionSchemeId' => false, - 'startDate' => false, - 'endDate' => true, - 'workerGroupId' => false, - 'pensionRule' => false, - 'subtractedBasicRateTax' => false, - 'papdisPensionProviderId' => true, - 'papdisEmployerId' => true, - 'employeePensionContributionMultiplier' => false, 'additionalVoluntaryContribution' => false, - 'avcIsPercentage' => false, - 'autoEnrolled' => false, - 'workerGroup' => false, - 'forcedTier' => true, - 'tiers' => true, + 'associatedEmployeeRoles' => true, 'assumedPensionablePay' => true, - 'pensionablePayCodes' => true, - 'tierablePayPayCodes' => true, - 'isHalfContributionMember' => false, - 'pensionableEarnings' => false, - 'pensionablePay' => false, - 'nonTierablePay' => false, + 'assumedPensionablePayBfd' => true, + 'autoEnrolled' => false, + 'avcIsPercentage' => false, + 'contributionCalculationDate' => true, 'employeePensionContribution' => false, 'employeePensionContributionAvc' => false, + 'employeePensionContributionAvcBfd' => false, + 'employeePensionContributionBfd' => false, + 'employeePensionContributionMultiplier' => false, 'employerPensionContribution' => false, + 'employerPensionContributionBfd' => false, + 'endDate' => true, + 'forcedTier' => true, 'isForEndedPension' => false, - 'associatedEmployeeRoles' => true, + 'isHalfContributionMember' => false, + 'isTeachersPension' => false, + 'leaveDaysUnderHalfPay' => false, + 'name' => true, + 'nominalCodeMappings' => true, + 'nonPensionableStatutoryPay' => false, + 'nonPensionableStatutoryPays' => true, + 'nonTierablePay' => false, 'notionalPay' => false, + 'notionalPayDetails' => true, + 'papdisEmployerId' => true, + 'papdisPensionProviderId' => true, + 'pensionId' => false, + 'pensionRule' => false, + 'pensionSchemeId' => false, + 'pensionableEarnings' => false, 'pensionableEarningsBfd' => false, + 'pensionablePay' => false, 'pensionablePayBfd' => false, - 'employeePensionContributionBfd' => false, - 'assumedPensionablePayBfd' => true, - 'employerPensionContributionBfd' => false, - 'employeePensionContributionAvcBfd' => false, - 'whenEarnedPensionSummaries' => true, + 'pensionablePayCodes' => true, 'periodFrom' => true, 'periodTo' => true, - 'whenEarnedPensionableEarningsCorrection' => false, - 'whenEarnedPensionablePayCorrection' => false, + 'startDate' => false, + 'subtractedBasicRateTax' => false, + 'tierablePayPayCodes' => true, + 'tiers' => true, + 'treatAsWhenPaidForBackPay' => false, + 'whenEarnedEmployeePensionContributionAvcCorrection' => false, + 'whenEarnedEmployeePensionContributionAvcCorrectionBfd' => false, 'whenEarnedEmployeePensionContributionCorrection' => false, + 'whenEarnedEmployeePensionContributionCorrectionBfd' => false, 'whenEarnedEmployerPensionContributionCorrection' => false, - 'whenEarnedEmployeePensionContributionAvcCorrection' => false, + 'whenEarnedEmployerPensionContributionCorrectionBfd' => false, + 'whenEarnedPensionSummaries' => true, + 'whenEarnedPensionableEarningsCorrection' => false, 'whenEarnedPensionableEarningsCorrectionBfd' => false, + 'whenEarnedPensionablePayCorrection' => false, 'whenEarnedPensionablePayCorrectionBfd' => false, - 'whenEarnedEmployeePensionContributionCorrectionBfd' => false, - 'whenEarnedEmployerPensionContributionCorrectionBfd' => false, - 'whenEarnedEmployeePensionContributionAvcCorrectionBfd' => false, - 'nominalCodeMappings' => true + 'workerGroup' => false, + 'workerGroupId' => false ]; /** @@ -314,56 +335,63 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'pensionId' => 'pensionId', - 'name' => 'name', - 'pensionSchemeId' => 'pensionSchemeId', - 'startDate' => 'startDate', - 'endDate' => 'endDate', - 'workerGroupId' => 'workerGroupId', - 'pensionRule' => 'pensionRule', - 'subtractedBasicRateTax' => 'subtractedBasicRateTax', - 'papdisPensionProviderId' => 'papdisPensionProviderId', - 'papdisEmployerId' => 'papdisEmployerId', - 'employeePensionContributionMultiplier' => 'employeePensionContributionMultiplier', 'additionalVoluntaryContribution' => 'additionalVoluntaryContribution', - 'avcIsPercentage' => 'avcIsPercentage', - 'autoEnrolled' => 'autoEnrolled', - 'workerGroup' => 'workerGroup', - 'forcedTier' => 'forcedTier', - 'tiers' => 'tiers', + 'associatedEmployeeRoles' => 'associatedEmployeeRoles', 'assumedPensionablePay' => 'assumedPensionablePay', - 'pensionablePayCodes' => 'pensionablePayCodes', - 'tierablePayPayCodes' => 'tierablePayPayCodes', - 'isHalfContributionMember' => 'isHalfContributionMember', - 'pensionableEarnings' => 'pensionableEarnings', - 'pensionablePay' => 'pensionablePay', - 'nonTierablePay' => 'nonTierablePay', + 'assumedPensionablePayBfd' => 'assumedPensionablePayBfd', + 'autoEnrolled' => 'autoEnrolled', + 'avcIsPercentage' => 'avcIsPercentage', + 'contributionCalculationDate' => 'contributionCalculationDate', 'employeePensionContribution' => 'employeePensionContribution', 'employeePensionContributionAvc' => 'employeePensionContributionAvc', + 'employeePensionContributionAvcBfd' => 'employeePensionContributionAvcBfd', + 'employeePensionContributionBfd' => 'employeePensionContributionBfd', + 'employeePensionContributionMultiplier' => 'employeePensionContributionMultiplier', 'employerPensionContribution' => 'employerPensionContribution', + 'employerPensionContributionBfd' => 'employerPensionContributionBfd', + 'endDate' => 'endDate', + 'forcedTier' => 'forcedTier', 'isForEndedPension' => 'isForEndedPension', - 'associatedEmployeeRoles' => 'associatedEmployeeRoles', + 'isHalfContributionMember' => 'isHalfContributionMember', + 'isTeachersPension' => 'isTeachersPension', + 'leaveDaysUnderHalfPay' => 'leaveDaysUnderHalfPay', + 'name' => 'name', + 'nominalCodeMappings' => 'nominalCodeMappings', + 'nonPensionableStatutoryPay' => 'nonPensionableStatutoryPay', + 'nonPensionableStatutoryPays' => 'nonPensionableStatutoryPays', + 'nonTierablePay' => 'nonTierablePay', 'notionalPay' => 'notionalPay', + 'notionalPayDetails' => 'notionalPayDetails', + 'papdisEmployerId' => 'papdisEmployerId', + 'papdisPensionProviderId' => 'papdisPensionProviderId', + 'pensionId' => 'pensionId', + 'pensionRule' => 'pensionRule', + 'pensionSchemeId' => 'pensionSchemeId', + 'pensionableEarnings' => 'pensionableEarnings', 'pensionableEarningsBfd' => 'pensionableEarningsBfd', + 'pensionablePay' => 'pensionablePay', 'pensionablePayBfd' => 'pensionablePayBfd', - 'employeePensionContributionBfd' => 'employeePensionContributionBfd', - 'assumedPensionablePayBfd' => 'assumedPensionablePayBfd', - 'employerPensionContributionBfd' => 'employerPensionContributionBfd', - 'employeePensionContributionAvcBfd' => 'employeePensionContributionAvcBfd', - 'whenEarnedPensionSummaries' => 'whenEarnedPensionSummaries', + 'pensionablePayCodes' => 'pensionablePayCodes', 'periodFrom' => 'periodFrom', 'periodTo' => 'periodTo', - 'whenEarnedPensionableEarningsCorrection' => 'whenEarnedPensionableEarningsCorrection', - 'whenEarnedPensionablePayCorrection' => 'whenEarnedPensionablePayCorrection', + 'startDate' => 'startDate', + 'subtractedBasicRateTax' => 'subtractedBasicRateTax', + 'tierablePayPayCodes' => 'tierablePayPayCodes', + 'tiers' => 'tiers', + 'treatAsWhenPaidForBackPay' => 'treatAsWhenPaidForBackPay', + 'whenEarnedEmployeePensionContributionAvcCorrection' => 'whenEarnedEmployeePensionContributionAvcCorrection', + 'whenEarnedEmployeePensionContributionAvcCorrectionBfd' => 'whenEarnedEmployeePensionContributionAvcCorrectionBfd', 'whenEarnedEmployeePensionContributionCorrection' => 'whenEarnedEmployeePensionContributionCorrection', + 'whenEarnedEmployeePensionContributionCorrectionBfd' => 'whenEarnedEmployeePensionContributionCorrectionBfd', 'whenEarnedEmployerPensionContributionCorrection' => 'whenEarnedEmployerPensionContributionCorrection', - 'whenEarnedEmployeePensionContributionAvcCorrection' => 'whenEarnedEmployeePensionContributionAvcCorrection', + 'whenEarnedEmployerPensionContributionCorrectionBfd' => 'whenEarnedEmployerPensionContributionCorrectionBfd', + 'whenEarnedPensionSummaries' => 'whenEarnedPensionSummaries', + 'whenEarnedPensionableEarningsCorrection' => 'whenEarnedPensionableEarningsCorrection', 'whenEarnedPensionableEarningsCorrectionBfd' => 'whenEarnedPensionableEarningsCorrectionBfd', + 'whenEarnedPensionablePayCorrection' => 'whenEarnedPensionablePayCorrection', 'whenEarnedPensionablePayCorrectionBfd' => 'whenEarnedPensionablePayCorrectionBfd', - 'whenEarnedEmployeePensionContributionCorrectionBfd' => 'whenEarnedEmployeePensionContributionCorrectionBfd', - 'whenEarnedEmployerPensionContributionCorrectionBfd' => 'whenEarnedEmployerPensionContributionCorrectionBfd', - 'whenEarnedEmployeePensionContributionAvcCorrectionBfd' => 'whenEarnedEmployeePensionContributionAvcCorrectionBfd', - 'nominalCodeMappings' => 'nominalCodeMappings' + 'workerGroup' => 'workerGroup', + 'workerGroupId' => 'workerGroupId' ]; /** @@ -372,56 +400,63 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'pensionId' => 'setPensionId', - 'name' => 'setName', - 'pensionSchemeId' => 'setPensionSchemeId', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', - 'workerGroupId' => 'setWorkerGroupId', - 'pensionRule' => 'setPensionRule', - 'subtractedBasicRateTax' => 'setSubtractedBasicRateTax', - 'papdisPensionProviderId' => 'setPapdisPensionProviderId', - 'papdisEmployerId' => 'setPapdisEmployerId', - 'employeePensionContributionMultiplier' => 'setEmployeePensionContributionMultiplier', 'additionalVoluntaryContribution' => 'setAdditionalVoluntaryContribution', - 'avcIsPercentage' => 'setAvcIsPercentage', - 'autoEnrolled' => 'setAutoEnrolled', - 'workerGroup' => 'setWorkerGroup', - 'forcedTier' => 'setForcedTier', - 'tiers' => 'setTiers', + 'associatedEmployeeRoles' => 'setAssociatedEmployeeRoles', 'assumedPensionablePay' => 'setAssumedPensionablePay', - 'pensionablePayCodes' => 'setPensionablePayCodes', - 'tierablePayPayCodes' => 'setTierablePayPayCodes', - 'isHalfContributionMember' => 'setIsHalfContributionMember', - 'pensionableEarnings' => 'setPensionableEarnings', - 'pensionablePay' => 'setPensionablePay', - 'nonTierablePay' => 'setNonTierablePay', + 'assumedPensionablePayBfd' => 'setAssumedPensionablePayBfd', + 'autoEnrolled' => 'setAutoEnrolled', + 'avcIsPercentage' => 'setAvcIsPercentage', + 'contributionCalculationDate' => 'setContributionCalculationDate', 'employeePensionContribution' => 'setEmployeePensionContribution', 'employeePensionContributionAvc' => 'setEmployeePensionContributionAvc', + 'employeePensionContributionAvcBfd' => 'setEmployeePensionContributionAvcBfd', + 'employeePensionContributionBfd' => 'setEmployeePensionContributionBfd', + 'employeePensionContributionMultiplier' => 'setEmployeePensionContributionMultiplier', 'employerPensionContribution' => 'setEmployerPensionContribution', + 'employerPensionContributionBfd' => 'setEmployerPensionContributionBfd', + 'endDate' => 'setEndDate', + 'forcedTier' => 'setForcedTier', 'isForEndedPension' => 'setIsForEndedPension', - 'associatedEmployeeRoles' => 'setAssociatedEmployeeRoles', + 'isHalfContributionMember' => 'setIsHalfContributionMember', + 'isTeachersPension' => 'setIsTeachersPension', + 'leaveDaysUnderHalfPay' => 'setLeaveDaysUnderHalfPay', + 'name' => 'setName', + 'nominalCodeMappings' => 'setNominalCodeMappings', + 'nonPensionableStatutoryPay' => 'setNonPensionableStatutoryPay', + 'nonPensionableStatutoryPays' => 'setNonPensionableStatutoryPays', + 'nonTierablePay' => 'setNonTierablePay', 'notionalPay' => 'setNotionalPay', + 'notionalPayDetails' => 'setNotionalPayDetails', + 'papdisEmployerId' => 'setPapdisEmployerId', + 'papdisPensionProviderId' => 'setPapdisPensionProviderId', + 'pensionId' => 'setPensionId', + 'pensionRule' => 'setPensionRule', + 'pensionSchemeId' => 'setPensionSchemeId', + 'pensionableEarnings' => 'setPensionableEarnings', 'pensionableEarningsBfd' => 'setPensionableEarningsBfd', + 'pensionablePay' => 'setPensionablePay', 'pensionablePayBfd' => 'setPensionablePayBfd', - 'employeePensionContributionBfd' => 'setEmployeePensionContributionBfd', - 'assumedPensionablePayBfd' => 'setAssumedPensionablePayBfd', - 'employerPensionContributionBfd' => 'setEmployerPensionContributionBfd', - 'employeePensionContributionAvcBfd' => 'setEmployeePensionContributionAvcBfd', - 'whenEarnedPensionSummaries' => 'setWhenEarnedPensionSummaries', + 'pensionablePayCodes' => 'setPensionablePayCodes', 'periodFrom' => 'setPeriodFrom', 'periodTo' => 'setPeriodTo', - 'whenEarnedPensionableEarningsCorrection' => 'setWhenEarnedPensionableEarningsCorrection', - 'whenEarnedPensionablePayCorrection' => 'setWhenEarnedPensionablePayCorrection', + 'startDate' => 'setStartDate', + 'subtractedBasicRateTax' => 'setSubtractedBasicRateTax', + 'tierablePayPayCodes' => 'setTierablePayPayCodes', + 'tiers' => 'setTiers', + 'treatAsWhenPaidForBackPay' => 'setTreatAsWhenPaidForBackPay', + 'whenEarnedEmployeePensionContributionAvcCorrection' => 'setWhenEarnedEmployeePensionContributionAvcCorrection', + 'whenEarnedEmployeePensionContributionAvcCorrectionBfd' => 'setWhenEarnedEmployeePensionContributionAvcCorrectionBfd', 'whenEarnedEmployeePensionContributionCorrection' => 'setWhenEarnedEmployeePensionContributionCorrection', + 'whenEarnedEmployeePensionContributionCorrectionBfd' => 'setWhenEarnedEmployeePensionContributionCorrectionBfd', 'whenEarnedEmployerPensionContributionCorrection' => 'setWhenEarnedEmployerPensionContributionCorrection', - 'whenEarnedEmployeePensionContributionAvcCorrection' => 'setWhenEarnedEmployeePensionContributionAvcCorrection', + 'whenEarnedEmployerPensionContributionCorrectionBfd' => 'setWhenEarnedEmployerPensionContributionCorrectionBfd', + 'whenEarnedPensionSummaries' => 'setWhenEarnedPensionSummaries', + 'whenEarnedPensionableEarningsCorrection' => 'setWhenEarnedPensionableEarningsCorrection', 'whenEarnedPensionableEarningsCorrectionBfd' => 'setWhenEarnedPensionableEarningsCorrectionBfd', + 'whenEarnedPensionablePayCorrection' => 'setWhenEarnedPensionablePayCorrection', 'whenEarnedPensionablePayCorrectionBfd' => 'setWhenEarnedPensionablePayCorrectionBfd', - 'whenEarnedEmployeePensionContributionCorrectionBfd' => 'setWhenEarnedEmployeePensionContributionCorrectionBfd', - 'whenEarnedEmployerPensionContributionCorrectionBfd' => 'setWhenEarnedEmployerPensionContributionCorrectionBfd', - 'whenEarnedEmployeePensionContributionAvcCorrectionBfd' => 'setWhenEarnedEmployeePensionContributionAvcCorrectionBfd', - 'nominalCodeMappings' => 'setNominalCodeMappings' + 'workerGroup' => 'setWorkerGroup', + 'workerGroupId' => 'setWorkerGroupId' ]; /** @@ -430,56 +465,63 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'pensionId' => 'getPensionId', - 'name' => 'getName', - 'pensionSchemeId' => 'getPensionSchemeId', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', - 'workerGroupId' => 'getWorkerGroupId', - 'pensionRule' => 'getPensionRule', - 'subtractedBasicRateTax' => 'getSubtractedBasicRateTax', - 'papdisPensionProviderId' => 'getPapdisPensionProviderId', - 'papdisEmployerId' => 'getPapdisEmployerId', - 'employeePensionContributionMultiplier' => 'getEmployeePensionContributionMultiplier', 'additionalVoluntaryContribution' => 'getAdditionalVoluntaryContribution', - 'avcIsPercentage' => 'getAvcIsPercentage', - 'autoEnrolled' => 'getAutoEnrolled', - 'workerGroup' => 'getWorkerGroup', - 'forcedTier' => 'getForcedTier', - 'tiers' => 'getTiers', + 'associatedEmployeeRoles' => 'getAssociatedEmployeeRoles', 'assumedPensionablePay' => 'getAssumedPensionablePay', - 'pensionablePayCodes' => 'getPensionablePayCodes', - 'tierablePayPayCodes' => 'getTierablePayPayCodes', - 'isHalfContributionMember' => 'getIsHalfContributionMember', - 'pensionableEarnings' => 'getPensionableEarnings', - 'pensionablePay' => 'getPensionablePay', - 'nonTierablePay' => 'getNonTierablePay', + 'assumedPensionablePayBfd' => 'getAssumedPensionablePayBfd', + 'autoEnrolled' => 'getAutoEnrolled', + 'avcIsPercentage' => 'getAvcIsPercentage', + 'contributionCalculationDate' => 'getContributionCalculationDate', 'employeePensionContribution' => 'getEmployeePensionContribution', 'employeePensionContributionAvc' => 'getEmployeePensionContributionAvc', + 'employeePensionContributionAvcBfd' => 'getEmployeePensionContributionAvcBfd', + 'employeePensionContributionBfd' => 'getEmployeePensionContributionBfd', + 'employeePensionContributionMultiplier' => 'getEmployeePensionContributionMultiplier', 'employerPensionContribution' => 'getEmployerPensionContribution', + 'employerPensionContributionBfd' => 'getEmployerPensionContributionBfd', + 'endDate' => 'getEndDate', + 'forcedTier' => 'getForcedTier', 'isForEndedPension' => 'getIsForEndedPension', - 'associatedEmployeeRoles' => 'getAssociatedEmployeeRoles', + 'isHalfContributionMember' => 'getIsHalfContributionMember', + 'isTeachersPension' => 'getIsTeachersPension', + 'leaveDaysUnderHalfPay' => 'getLeaveDaysUnderHalfPay', + 'name' => 'getName', + 'nominalCodeMappings' => 'getNominalCodeMappings', + 'nonPensionableStatutoryPay' => 'getNonPensionableStatutoryPay', + 'nonPensionableStatutoryPays' => 'getNonPensionableStatutoryPays', + 'nonTierablePay' => 'getNonTierablePay', 'notionalPay' => 'getNotionalPay', + 'notionalPayDetails' => 'getNotionalPayDetails', + 'papdisEmployerId' => 'getPapdisEmployerId', + 'papdisPensionProviderId' => 'getPapdisPensionProviderId', + 'pensionId' => 'getPensionId', + 'pensionRule' => 'getPensionRule', + 'pensionSchemeId' => 'getPensionSchemeId', + 'pensionableEarnings' => 'getPensionableEarnings', 'pensionableEarningsBfd' => 'getPensionableEarningsBfd', + 'pensionablePay' => 'getPensionablePay', 'pensionablePayBfd' => 'getPensionablePayBfd', - 'employeePensionContributionBfd' => 'getEmployeePensionContributionBfd', - 'assumedPensionablePayBfd' => 'getAssumedPensionablePayBfd', - 'employerPensionContributionBfd' => 'getEmployerPensionContributionBfd', - 'employeePensionContributionAvcBfd' => 'getEmployeePensionContributionAvcBfd', - 'whenEarnedPensionSummaries' => 'getWhenEarnedPensionSummaries', + 'pensionablePayCodes' => 'getPensionablePayCodes', 'periodFrom' => 'getPeriodFrom', 'periodTo' => 'getPeriodTo', - 'whenEarnedPensionableEarningsCorrection' => 'getWhenEarnedPensionableEarningsCorrection', - 'whenEarnedPensionablePayCorrection' => 'getWhenEarnedPensionablePayCorrection', + 'startDate' => 'getStartDate', + 'subtractedBasicRateTax' => 'getSubtractedBasicRateTax', + 'tierablePayPayCodes' => 'getTierablePayPayCodes', + 'tiers' => 'getTiers', + 'treatAsWhenPaidForBackPay' => 'getTreatAsWhenPaidForBackPay', + 'whenEarnedEmployeePensionContributionAvcCorrection' => 'getWhenEarnedEmployeePensionContributionAvcCorrection', + 'whenEarnedEmployeePensionContributionAvcCorrectionBfd' => 'getWhenEarnedEmployeePensionContributionAvcCorrectionBfd', 'whenEarnedEmployeePensionContributionCorrection' => 'getWhenEarnedEmployeePensionContributionCorrection', + 'whenEarnedEmployeePensionContributionCorrectionBfd' => 'getWhenEarnedEmployeePensionContributionCorrectionBfd', 'whenEarnedEmployerPensionContributionCorrection' => 'getWhenEarnedEmployerPensionContributionCorrection', - 'whenEarnedEmployeePensionContributionAvcCorrection' => 'getWhenEarnedEmployeePensionContributionAvcCorrection', + 'whenEarnedEmployerPensionContributionCorrectionBfd' => 'getWhenEarnedEmployerPensionContributionCorrectionBfd', + 'whenEarnedPensionSummaries' => 'getWhenEarnedPensionSummaries', + 'whenEarnedPensionableEarningsCorrection' => 'getWhenEarnedPensionableEarningsCorrection', 'whenEarnedPensionableEarningsCorrectionBfd' => 'getWhenEarnedPensionableEarningsCorrectionBfd', + 'whenEarnedPensionablePayCorrection' => 'getWhenEarnedPensionablePayCorrection', 'whenEarnedPensionablePayCorrectionBfd' => 'getWhenEarnedPensionablePayCorrectionBfd', - 'whenEarnedEmployeePensionContributionCorrectionBfd' => 'getWhenEarnedEmployeePensionContributionCorrectionBfd', - 'whenEarnedEmployerPensionContributionCorrectionBfd' => 'getWhenEarnedEmployerPensionContributionCorrectionBfd', - 'whenEarnedEmployeePensionContributionAvcCorrectionBfd' => 'getWhenEarnedEmployeePensionContributionAvcCorrectionBfd', - 'nominalCodeMappings' => 'getNominalCodeMappings' + 'workerGroup' => 'getWorkerGroup', + 'workerGroupId' => 'getWorkerGroupId' ]; /** @@ -538,56 +580,63 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('pensionId', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('pensionSchemeId', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); - $this->setIfExists('workerGroupId', $data ?? [], null); - $this->setIfExists('pensionRule', $data ?? [], null); - $this->setIfExists('subtractedBasicRateTax', $data ?? [], null); - $this->setIfExists('papdisPensionProviderId', $data ?? [], null); - $this->setIfExists('papdisEmployerId', $data ?? [], null); - $this->setIfExists('employeePensionContributionMultiplier', $data ?? [], null); $this->setIfExists('additionalVoluntaryContribution', $data ?? [], null); - $this->setIfExists('avcIsPercentage', $data ?? [], null); - $this->setIfExists('autoEnrolled', $data ?? [], null); - $this->setIfExists('workerGroup', $data ?? [], null); - $this->setIfExists('forcedTier', $data ?? [], null); - $this->setIfExists('tiers', $data ?? [], null); + $this->setIfExists('associatedEmployeeRoles', $data ?? [], null); $this->setIfExists('assumedPensionablePay', $data ?? [], null); - $this->setIfExists('pensionablePayCodes', $data ?? [], null); - $this->setIfExists('tierablePayPayCodes', $data ?? [], null); - $this->setIfExists('isHalfContributionMember', $data ?? [], null); - $this->setIfExists('pensionableEarnings', $data ?? [], null); - $this->setIfExists('pensionablePay', $data ?? [], null); - $this->setIfExists('nonTierablePay', $data ?? [], null); + $this->setIfExists('assumedPensionablePayBfd', $data ?? [], null); + $this->setIfExists('autoEnrolled', $data ?? [], null); + $this->setIfExists('avcIsPercentage', $data ?? [], null); + $this->setIfExists('contributionCalculationDate', $data ?? [], null); $this->setIfExists('employeePensionContribution', $data ?? [], null); $this->setIfExists('employeePensionContributionAvc', $data ?? [], null); + $this->setIfExists('employeePensionContributionAvcBfd', $data ?? [], null); + $this->setIfExists('employeePensionContributionBfd', $data ?? [], null); + $this->setIfExists('employeePensionContributionMultiplier', $data ?? [], null); $this->setIfExists('employerPensionContribution', $data ?? [], null); + $this->setIfExists('employerPensionContributionBfd', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('forcedTier', $data ?? [], null); $this->setIfExists('isForEndedPension', $data ?? [], null); - $this->setIfExists('associatedEmployeeRoles', $data ?? [], null); + $this->setIfExists('isHalfContributionMember', $data ?? [], null); + $this->setIfExists('isTeachersPension', $data ?? [], null); + $this->setIfExists('leaveDaysUnderHalfPay', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('nominalCodeMappings', $data ?? [], null); + $this->setIfExists('nonPensionableStatutoryPay', $data ?? [], null); + $this->setIfExists('nonPensionableStatutoryPays', $data ?? [], null); + $this->setIfExists('nonTierablePay', $data ?? [], null); $this->setIfExists('notionalPay', $data ?? [], null); + $this->setIfExists('notionalPayDetails', $data ?? [], null); + $this->setIfExists('papdisEmployerId', $data ?? [], null); + $this->setIfExists('papdisPensionProviderId', $data ?? [], null); + $this->setIfExists('pensionId', $data ?? [], null); + $this->setIfExists('pensionRule', $data ?? [], null); + $this->setIfExists('pensionSchemeId', $data ?? [], null); + $this->setIfExists('pensionableEarnings', $data ?? [], null); $this->setIfExists('pensionableEarningsBfd', $data ?? [], null); + $this->setIfExists('pensionablePay', $data ?? [], null); $this->setIfExists('pensionablePayBfd', $data ?? [], null); - $this->setIfExists('employeePensionContributionBfd', $data ?? [], null); - $this->setIfExists('assumedPensionablePayBfd', $data ?? [], null); - $this->setIfExists('employerPensionContributionBfd', $data ?? [], null); - $this->setIfExists('employeePensionContributionAvcBfd', $data ?? [], null); - $this->setIfExists('whenEarnedPensionSummaries', $data ?? [], null); + $this->setIfExists('pensionablePayCodes', $data ?? [], null); $this->setIfExists('periodFrom', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('whenEarnedPensionableEarningsCorrection', $data ?? [], null); - $this->setIfExists('whenEarnedPensionablePayCorrection', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('subtractedBasicRateTax', $data ?? [], null); + $this->setIfExists('tierablePayPayCodes', $data ?? [], null); + $this->setIfExists('tiers', $data ?? [], null); + $this->setIfExists('treatAsWhenPaidForBackPay', $data ?? [], null); + $this->setIfExists('whenEarnedEmployeePensionContributionAvcCorrection', $data ?? [], null); + $this->setIfExists('whenEarnedEmployeePensionContributionAvcCorrectionBfd', $data ?? [], null); $this->setIfExists('whenEarnedEmployeePensionContributionCorrection', $data ?? [], null); + $this->setIfExists('whenEarnedEmployeePensionContributionCorrectionBfd', $data ?? [], null); $this->setIfExists('whenEarnedEmployerPensionContributionCorrection', $data ?? [], null); - $this->setIfExists('whenEarnedEmployeePensionContributionAvcCorrection', $data ?? [], null); + $this->setIfExists('whenEarnedEmployerPensionContributionCorrectionBfd', $data ?? [], null); + $this->setIfExists('whenEarnedPensionSummaries', $data ?? [], null); + $this->setIfExists('whenEarnedPensionableEarningsCorrection', $data ?? [], null); $this->setIfExists('whenEarnedPensionableEarningsCorrectionBfd', $data ?? [], null); + $this->setIfExists('whenEarnedPensionablePayCorrection', $data ?? [], null); $this->setIfExists('whenEarnedPensionablePayCorrectionBfd', $data ?? [], null); - $this->setIfExists('whenEarnedEmployeePensionContributionCorrectionBfd', $data ?? [], null); - $this->setIfExists('whenEarnedEmployerPensionContributionCorrectionBfd', $data ?? [], null); - $this->setIfExists('whenEarnedEmployeePensionContributionAvcCorrectionBfd', $data ?? [], null); - $this->setIfExists('nominalCodeMappings', $data ?? [], null); + $this->setIfExists('workerGroup', $data ?? [], null); + $this->setIfExists('workerGroupId', $data ?? [], null); } /** @@ -633,881 +682,976 @@ public function valid(): bool /** - * Gets pensionId + * Gets additionalVoluntaryContribution * - * @return string|null + * @return float|null */ - public function getPensionId(): ?string + public function getAdditionalVoluntaryContribution(): ?float { - return $this->container['pensionId']; + return $this->container['additionalVoluntaryContribution']; } /** - * Sets pensionId + * Sets additionalVoluntaryContribution * - * @param string|null $pensionId [readonly] The Id of the Pension. + * @param float|null $additionalVoluntaryContribution [readonly] Any Additional Voluntary Contribution the Employee has chosen to make Otherwise it is set as 1. * * @return $this */ - public function setPensionId(?string $pensionId): static + public function setAdditionalVoluntaryContribution(?float $additionalVoluntaryContribution): static { - if (is_null($pensionId)) { - throw new InvalidArgumentException('non-nullable pensionId cannot be null'); + if (is_null($additionalVoluntaryContribution)) { + throw new InvalidArgumentException('non-nullable additionalVoluntaryContribution cannot be null'); } - $this->container['pensionId'] = $pensionId; + $this->container['additionalVoluntaryContribution'] = $additionalVoluntaryContribution; return $this; } /** - * Gets name + * Gets associatedEmployeeRoles * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getName(): ?string + public function getAssociatedEmployeeRoles(): ?array { - return $this->container['name']; + return $this->container['associatedEmployeeRoles']; } /** - * Sets name + * Sets associatedEmployeeRoles * - * @param string|null $name [readonly] The name of the PensionScheme to which contributions have been made. + * @param \SynergiTech\Staffology\Model\Item[]|null $associatedEmployeeRoles associatedEmployeeRoles * * @return $this */ - public function setName(?string $name): static + public function setAssociatedEmployeeRoles(?array $associatedEmployeeRoles): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($associatedEmployeeRoles)) { + array_push($this->openAPINullablesSetToNull, 'associatedEmployeeRoles'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('associatedEmployeeRoles', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['associatedEmployeeRoles'] = $associatedEmployeeRoles; return $this; } /** - * Gets pensionSchemeId + * Gets assumedPensionablePay * - * @return string|null + * @return float|null */ - public function getPensionSchemeId(): ?string + public function getAssumedPensionablePay(): ?float { - return $this->container['pensionSchemeId']; + return $this->container['assumedPensionablePay']; } /** - * Sets pensionSchemeId + * Sets assumedPensionablePay * - * @param string|null $pensionSchemeId [readonly] The Id of the PensionScheme. + * @param float|null $assumedPensionablePay [readonly] Assumed Pensionable Pay. If the employee is receiving any Statutory Leave that has an AssumedPensionablePay value set then it'll be shown here. + * + * @return $this + */ + public function setAssumedPensionablePay(?float $assumedPensionablePay): static + { + if (is_null($assumedPensionablePay)) { + array_push($this->openAPINullablesSetToNull, 'assumedPensionablePay'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('assumedPensionablePay', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['assumedPensionablePay'] = $assumedPensionablePay; + + return $this; + } + + /** + * Gets assumedPensionablePayBfd + * + * @return float|null + */ + public function getAssumedPensionablePayBfd(): ?float + { + return $this->container['assumedPensionablePayBfd']; + } + + /** + * Sets assumedPensionablePayBfd + * + * @param float|null $assumedPensionablePayBfd [readonly] The brought forward Year to Date value of Assumed Pensionable Pay. If the employee is receiving any Statutory Leave that has an AssumedPensionablePay value set then it'll be shown here. + * + * @return $this + */ + public function setAssumedPensionablePayBfd(?float $assumedPensionablePayBfd): static + { + if (is_null($assumedPensionablePayBfd)) { + array_push($this->openAPINullablesSetToNull, 'assumedPensionablePayBfd'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('assumedPensionablePayBfd', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['assumedPensionablePayBfd'] = $assumedPensionablePayBfd; + + return $this; + } + + /** + * Gets autoEnrolled + * + * @return bool|null + */ + public function getAutoEnrolled(): ?bool + { + return $this->container['autoEnrolled']; + } + + /** + * Sets autoEnrolled + * + * @param bool|null $autoEnrolled [readonly] Any Additional Voluntary Contribution the Employee has chosen to make Otherwise it is set as 1. + * + * @return $this + */ + public function setAutoEnrolled(?bool $autoEnrolled): static + { + if (is_null($autoEnrolled)) { + throw new InvalidArgumentException('non-nullable autoEnrolled cannot be null'); + } + $this->container['autoEnrolled'] = $autoEnrolled; + + return $this; + } + + /** + * Gets avcIsPercentage + * + * @return bool|null + */ + public function getAvcIsPercentage(): ?bool + { + return $this->container['avcIsPercentage']; + } + + /** + * Sets avcIsPercentage + * + * @param bool|null $avcIsPercentage [readonly] Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, * * @return $this */ - public function setPensionSchemeId(?string $pensionSchemeId): static + public function setAvcIsPercentage(?bool $avcIsPercentage): static { - if (is_null($pensionSchemeId)) { - throw new InvalidArgumentException('non-nullable pensionSchemeId cannot be null'); + if (is_null($avcIsPercentage)) { + throw new InvalidArgumentException('non-nullable avcIsPercentage cannot be null'); } - $this->container['pensionSchemeId'] = $pensionSchemeId; + $this->container['avcIsPercentage'] = $avcIsPercentage; return $this; } /** - * Gets startDate + * Gets contributionCalculationDate * * @return \DateTime|null */ - public function getStartDate(): ?\DateTime + public function getContributionCalculationDate(): ?\DateTime { - return $this->container['startDate']; + return $this->container['contributionCalculationDate']; } /** - * Sets startDate + * Sets contributionCalculationDate * - * @param \DateTime|null $startDate [readonly] Pension Start Date + * @param \DateTime|null $contributionCalculationDate Nullable DateTime property \"ContributionCalculationDate\" to store the date of the latest earned date on the back pay lines when processing when earned pension summaries on a payment after leaving. Applicable only for when the pension summary is created on the base of when earned additions' and deductions' pension calculations for back paid periods and the pay run entry is marked as payment after leaving * * @return $this */ - public function setStartDate(?\DateTime $startDate): static + public function setContributionCalculationDate(?\DateTime $contributionCalculationDate): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($contributionCalculationDate)) { + array_push($this->openAPINullablesSetToNull, 'contributionCalculationDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('contributionCalculationDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['startDate'] = $startDate; + $this->container['contributionCalculationDate'] = $contributionCalculationDate; return $this; } /** - * Gets endDate + * Gets employeePensionContribution * - * @return \DateTime|null + * @return float|null */ - public function getEndDate(): ?\DateTime + public function getEmployeePensionContribution(): ?float { - return $this->container['endDate']; + return $this->container['employeePensionContribution']; } /** - * Sets endDate + * Sets employeePensionContribution * - * @param \DateTime|null $endDate Pension End Date + * @param float|null $employeePensionContribution [readonly] The value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions * * @return $this */ - public function setEndDate(?\DateTime $endDate): static + public function setEmployeePensionContribution(?float $employeePensionContribution): static { - if (is_null($endDate)) { - array_push($this->openAPINullablesSetToNull, 'endDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employeePensionContribution)) { + throw new InvalidArgumentException('non-nullable employeePensionContribution cannot be null'); } - $this->container['endDate'] = $endDate; + $this->container['employeePensionContribution'] = $employeePensionContribution; return $this; } /** - * Gets workerGroupId + * Gets employeePensionContributionAvc * - * @return string|null + * @return float|null */ - public function getWorkerGroupId(): ?string + public function getEmployeePensionContributionAvc(): ?float { - return $this->container['workerGroupId']; + return $this->container['employeePensionContributionAvc']; } /** - * Sets workerGroupId + * Sets employeePensionContributionAvc * - * @param string|null $workerGroupId [readonly] The Id of the WorkerGroup. + * @param float|null $employeePensionContributionAvc [readonly] The value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution * * @return $this */ - public function setWorkerGroupId(?string $workerGroupId): static + public function setEmployeePensionContributionAvc(?float $employeePensionContributionAvc): static { - if (is_null($workerGroupId)) { - throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); + if (is_null($employeePensionContributionAvc)) { + throw new InvalidArgumentException('non-nullable employeePensionContributionAvc cannot be null'); } - $this->container['workerGroupId'] = $workerGroupId; + $this->container['employeePensionContributionAvc'] = $employeePensionContributionAvc; return $this; } /** - * Gets pensionRule + * Gets employeePensionContributionAvcBfd * - * @return \SynergiTech\Staffology\Model\PensionRule|null + * @return float|null */ - public function getPensionRule(): ?\SynergiTech\Staffology\Model\PensionRule + public function getEmployeePensionContributionAvcBfd(): ?float { - return $this->container['pensionRule']; + return $this->container['employeePensionContributionAvcBfd']; } /** - * Sets pensionRule + * Sets employeePensionContributionAvcBfd * - * @param \SynergiTech\Staffology\Model\PensionRule|null $pensionRule pensionRule + * @param float|null $employeePensionContributionAvcBfd [readonly] The brought forward Year to Date value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution * * @return $this */ - public function setPensionRule(?\SynergiTech\Staffology\Model\PensionRule $pensionRule): static + public function setEmployeePensionContributionAvcBfd(?float $employeePensionContributionAvcBfd): static { - if (is_null($pensionRule)) { - throw new InvalidArgumentException('non-nullable pensionRule cannot be null'); + if (is_null($employeePensionContributionAvcBfd)) { + throw new InvalidArgumentException('non-nullable employeePensionContributionAvcBfd cannot be null'); } - $this->container['pensionRule'] = $pensionRule; + $this->container['employeePensionContributionAvcBfd'] = $employeePensionContributionAvcBfd; return $this; } /** - * Gets subtractedBasicRateTax + * Gets employeePensionContributionBfd * - * @return bool|null + * @return float|null */ - public function getSubtractedBasicRateTax(): ?bool + public function getEmployeePensionContributionBfd(): ?float { - return $this->container['subtractedBasicRateTax']; + return $this->container['employeePensionContributionBfd']; } /** - * Sets subtractedBasicRateTax + * Sets employeePensionContributionBfd * - * @param bool|null $subtractedBasicRateTax [readonly] The SubtractedBasicRateTax applied from the PensionScheme SubtractBasicRateTax. + * @param float|null $employeePensionContributionBfd [readonly] The brought forward Year to Date value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions * * @return $this */ - public function setSubtractedBasicRateTax(?bool $subtractedBasicRateTax): static + public function setEmployeePensionContributionBfd(?float $employeePensionContributionBfd): static { - if (is_null($subtractedBasicRateTax)) { - throw new InvalidArgumentException('non-nullable subtractedBasicRateTax cannot be null'); + if (is_null($employeePensionContributionBfd)) { + throw new InvalidArgumentException('non-nullable employeePensionContributionBfd cannot be null'); } - $this->container['subtractedBasicRateTax'] = $subtractedBasicRateTax; + $this->container['employeePensionContributionBfd'] = $employeePensionContributionBfd; return $this; } /** - * Gets papdisPensionProviderId + * Gets employeePensionContributionMultiplier * - * @return string|null + * @return float|null */ - public function getPapdisPensionProviderId(): ?string + public function getEmployeePensionContributionMultiplier(): ?float { - return $this->container['papdisPensionProviderId']; + return $this->container['employeePensionContributionMultiplier']; } /** - * Sets papdisPensionProviderId + * Sets employeePensionContributionMultiplier * - * @param string|null $papdisPensionProviderId [readonly] Papdis information from the PensionScheme + * @param float|null $employeePensionContributionMultiplier [readonly] If the PensionScheme is set to SubtractBasicRateTax then this value is used to reduce the contribution amount. Otherwise it is set as 1. * * @return $this */ - public function setPapdisPensionProviderId(?string $papdisPensionProviderId): static + public function setEmployeePensionContributionMultiplier(?float $employeePensionContributionMultiplier): static { - if (is_null($papdisPensionProviderId)) { - array_push($this->openAPINullablesSetToNull, 'papdisPensionProviderId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisPensionProviderId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employeePensionContributionMultiplier)) { + throw new InvalidArgumentException('non-nullable employeePensionContributionMultiplier cannot be null'); } - $this->container['papdisPensionProviderId'] = $papdisPensionProviderId; + $this->container['employeePensionContributionMultiplier'] = $employeePensionContributionMultiplier; return $this; } /** - * Gets papdisEmployerId + * Gets employerPensionContribution * - * @return string|null + * @return float|null */ - public function getPapdisEmployerId(): ?string + public function getEmployerPensionContribution(): ?float { - return $this->container['papdisEmployerId']; + return $this->container['employerPensionContribution']; } /** - * Sets papdisEmployerId + * Sets employerPensionContribution * - * @param string|null $papdisEmployerId [readonly] Papdis information from the PensionScheme + * @param float|null $employerPensionContribution [readonly] The value of the Pension Contribution being made by the Employer for this Employee * * @return $this */ - public function setPapdisEmployerId(?string $papdisEmployerId): static + public function setEmployerPensionContribution(?float $employerPensionContribution): static { - if (is_null($papdisEmployerId)) { - array_push($this->openAPINullablesSetToNull, 'papdisEmployerId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisEmployerId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employerPensionContribution)) { + throw new InvalidArgumentException('non-nullable employerPensionContribution cannot be null'); } - $this->container['papdisEmployerId'] = $papdisEmployerId; + $this->container['employerPensionContribution'] = $employerPensionContribution; return $this; } /** - * Gets employeePensionContributionMultiplier + * Gets employerPensionContributionBfd * * @return float|null */ - public function getEmployeePensionContributionMultiplier(): ?float + public function getEmployerPensionContributionBfd(): ?float { - return $this->container['employeePensionContributionMultiplier']; + return $this->container['employerPensionContributionBfd']; } /** - * Sets employeePensionContributionMultiplier + * Sets employerPensionContributionBfd * - * @param float|null $employeePensionContributionMultiplier [readonly] If the PensionScheme is set to SubtractBasicRateTax then this value is used to reduce the contribution amount. Otherwise it is set as 1. + * @param float|null $employerPensionContributionBfd [readonly] The brought forward Year to Date value of the Pension Contribution being made by the Employer for this Employee * * @return $this */ - public function setEmployeePensionContributionMultiplier(?float $employeePensionContributionMultiplier): static + public function setEmployerPensionContributionBfd(?float $employerPensionContributionBfd): static { - if (is_null($employeePensionContributionMultiplier)) { - throw new InvalidArgumentException('non-nullable employeePensionContributionMultiplier cannot be null'); + if (is_null($employerPensionContributionBfd)) { + throw new InvalidArgumentException('non-nullable employerPensionContributionBfd cannot be null'); } - $this->container['employeePensionContributionMultiplier'] = $employeePensionContributionMultiplier; + $this->container['employerPensionContributionBfd'] = $employerPensionContributionBfd; return $this; } /** - * Gets additionalVoluntaryContribution + * Gets endDate * - * @return float|null + * @return \DateTime|null */ - public function getAdditionalVoluntaryContribution(): ?float + public function getEndDate(): ?\DateTime { - return $this->container['additionalVoluntaryContribution']; + return $this->container['endDate']; } /** - * Sets additionalVoluntaryContribution + * Sets endDate * - * @param float|null $additionalVoluntaryContribution [readonly] Any Additional Voluntary Contribution the Employee has chosen to make Otherwise it is set as 1. + * @param \DateTime|null $endDate Pension End Date * * @return $this */ - public function setAdditionalVoluntaryContribution(?float $additionalVoluntaryContribution): static + public function setEndDate(?\DateTime $endDate): static { - if (is_null($additionalVoluntaryContribution)) { - throw new InvalidArgumentException('non-nullable additionalVoluntaryContribution cannot be null'); + if (is_null($endDate)) { + array_push($this->openAPINullablesSetToNull, 'endDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['additionalVoluntaryContribution'] = $additionalVoluntaryContribution; + $this->container['endDate'] = $endDate; return $this; } /** - * Gets avcIsPercentage + * Gets forcedTier * - * @return bool|null + * @return string|null */ - public function getAvcIsPercentage(): ?bool + public function getForcedTier(): ?string { - return $this->container['avcIsPercentage']; + return $this->container['forcedTier']; } /** - * Sets avcIsPercentage + * Sets forcedTier * - * @param bool|null $avcIsPercentage [readonly] Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, + * @param string|null $forcedTier [readonly] If the WorkerGroup ContributionLevelType is a Tiered Scheme then the name of the tier to force the employee on to may be specified. If none is specified then the Tier is determined by the earnings in the period * * @return $this */ - public function setAvcIsPercentage(?bool $avcIsPercentage): static + public function setForcedTier(?string $forcedTier): static { - if (is_null($avcIsPercentage)) { - throw new InvalidArgumentException('non-nullable avcIsPercentage cannot be null'); + if (is_null($forcedTier)) { + array_push($this->openAPINullablesSetToNull, 'forcedTier'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('forcedTier', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['avcIsPercentage'] = $avcIsPercentage; + $this->container['forcedTier'] = $forcedTier; return $this; } /** - * Gets autoEnrolled + * Gets isForEndedPension * * @return bool|null */ - public function getAutoEnrolled(): ?bool + public function getIsForEndedPension(): ?bool { - return $this->container['autoEnrolled']; + return $this->container['isForEndedPension']; } /** - * Sets autoEnrolled + * Sets isForEndedPension * - * @param bool|null $autoEnrolled [readonly] Any Additional Voluntary Contribution the Employee has chosen to make Otherwise it is set as 1. + * @param bool|null $isForEndedPension [readonly] Determines whether the pension summary is related to a pension that has ended or not * * @return $this */ - public function setAutoEnrolled(?bool $autoEnrolled): static + public function setIsForEndedPension(?bool $isForEndedPension): static { - if (is_null($autoEnrolled)) { - throw new InvalidArgumentException('non-nullable autoEnrolled cannot be null'); + if (is_null($isForEndedPension)) { + throw new InvalidArgumentException('non-nullable isForEndedPension cannot be null'); } - $this->container['autoEnrolled'] = $autoEnrolled; + $this->container['isForEndedPension'] = $isForEndedPension; return $this; } /** - * Gets workerGroup + * Gets isHalfContributionMember * - * @return \SynergiTech\Staffology\Model\WorkerGroup|null + * @return bool|null */ - public function getWorkerGroup(): ?\SynergiTech\Staffology\Model\WorkerGroup + public function getIsHalfContributionMember(): ?bool { - return $this->container['workerGroup']; + return $this->container['isHalfContributionMember']; } /** - * Sets workerGroup + * Sets isHalfContributionMember * - * @param \SynergiTech\Staffology\Model\WorkerGroup|null $workerGroup workerGroup + * @param bool|null $isHalfContributionMember if an employee as a member of the 50/50 LGPS scheme, they can enable contribution to 50% of the normal contributions. * * @return $this */ - public function setWorkerGroup(?\SynergiTech\Staffology\Model\WorkerGroup $workerGroup): static + public function setIsHalfContributionMember(?bool $isHalfContributionMember): static { - if (is_null($workerGroup)) { - throw new InvalidArgumentException('non-nullable workerGroup cannot be null'); + if (is_null($isHalfContributionMember)) { + throw new InvalidArgumentException('non-nullable isHalfContributionMember cannot be null'); } - $this->container['workerGroup'] = $workerGroup; + $this->container['isHalfContributionMember'] = $isHalfContributionMember; return $this; } /** - * Gets forcedTier + * Gets isTeachersPension * - * @return string|null + * @return bool|null */ - public function getForcedTier(): ?string + public function getIsTeachersPension(): ?bool { - return $this->container['forcedTier']; + return $this->container['isTeachersPension']; } /** - * Sets forcedTier + * Sets isTeachersPension * - * @param string|null $forcedTier [readonly] If the WorkerGroup ContributionLevelType is a Tiered Scheme then the name of the tier to force the employee on to may be specified. If none is specified then the Tier is determined by the earnings in the period + * @param bool|null $isTeachersPension isTeachersPension * * @return $this */ - public function setForcedTier(?string $forcedTier): static + public function setIsTeachersPension(?bool $isTeachersPension): static { - if (is_null($forcedTier)) { - array_push($this->openAPINullablesSetToNull, 'forcedTier'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('forcedTier', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isTeachersPension)) { + throw new InvalidArgumentException('non-nullable isTeachersPension cannot be null'); } - $this->container['forcedTier'] = $forcedTier; + $this->container['isTeachersPension'] = $isTeachersPension; return $this; } /** - * Gets tiers + * Gets leaveDaysUnderHalfPay * - * @return \SynergiTech\Staffology\Model\TieredPensionRate[]|null + * @return int|null */ - public function getTiers(): ?array + public function getLeaveDaysUnderHalfPay(): ?int { - return $this->container['tiers']; + return $this->container['leaveDaysUnderHalfPay']; } /** - * Sets tiers + * Sets leaveDaysUnderHalfPay * - * @param \SynergiTech\Staffology\Model\TieredPensionRate[]|null $tiers tiers + * @param int|null $leaveDaysUnderHalfPay The numer of leave days where less than half the normal pay is received * * @return $this */ - public function setTiers(?array $tiers): static + public function setLeaveDaysUnderHalfPay(?int $leaveDaysUnderHalfPay): static { - if (is_null($tiers)) { - array_push($this->openAPINullablesSetToNull, 'tiers'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tiers', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($leaveDaysUnderHalfPay)) { + throw new InvalidArgumentException('non-nullable leaveDaysUnderHalfPay cannot be null'); } - $this->container['tiers'] = $tiers; + $this->container['leaveDaysUnderHalfPay'] = $leaveDaysUnderHalfPay; return $this; } /** - * Gets assumedPensionablePay + * Gets name * - * @return float|null + * @return string|null */ - public function getAssumedPensionablePay(): ?float + public function getName(): ?string { - return $this->container['assumedPensionablePay']; + return $this->container['name']; } /** - * Sets assumedPensionablePay + * Sets name * - * @param float|null $assumedPensionablePay [readonly] Assumed Pensionable Pay. If the employee is receiving any Statutory Leave that has an AssumedPensionablePay value set then it'll be shown here. + * @param string|null $name [readonly] The name of the PensionScheme to which contributions have been made. * * @return $this */ - public function setAssumedPensionablePay(?float $assumedPensionablePay): static + public function setName(?string $name): static { - if (is_null($assumedPensionablePay)) { - array_push($this->openAPINullablesSetToNull, 'assumedPensionablePay'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('assumedPensionablePay', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['assumedPensionablePay'] = $assumedPensionablePay; + $this->container['name'] = $name; return $this; } /** - * Gets pensionablePayCodes + * Gets nominalCodeMappings * - * @return string[]|null + * @return \SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]|null */ - public function getPensionablePayCodes(): ?array + public function getNominalCodeMappings(): ?array { - return $this->container['pensionablePayCodes']; + return $this->container['nominalCodeMappings']; } /** - * Sets pensionablePayCodes + * Sets nominalCodeMappings * - * @param string[]|null $pensionablePayCodes [readonly] If the pension scheme is set to override the Pensionale PayCodes, then this is what they've been set to. + * @param \SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]|null $nominalCodeMappings List of Nominal Code Mappings of the Pension * * @return $this */ - public function setPensionablePayCodes(?array $pensionablePayCodes): static + public function setNominalCodeMappings(?array $nominalCodeMappings): static { - if (is_null($pensionablePayCodes)) { - array_push($this->openAPINullablesSetToNull, 'pensionablePayCodes'); + if (is_null($nominalCodeMappings)) { + array_push($this->openAPINullablesSetToNull, 'nominalCodeMappings'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pensionablePayCodes', $nullablesSetToNull); + $index = array_search('nominalCodeMappings', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pensionablePayCodes'] = $pensionablePayCodes; + $this->container['nominalCodeMappings'] = $nominalCodeMappings; return $this; } /** - * Gets tierablePayPayCodes + * Gets nonPensionableStatutoryPay * - * @return string[]|null + * @return float|null */ - public function getTierablePayPayCodes(): ?array + public function getNonPensionableStatutoryPay(): ?float { - return $this->container['tierablePayPayCodes']; + return $this->container['nonPensionableStatutoryPay']; } /** - * Sets tierablePayPayCodes + * Sets nonPensionableStatutoryPay * - * @param string[]|null $tierablePayPayCodes [readonly] If the pension scheme is set to override the TierablePay PayCodes, then this is what they've been set to. + * @param float|null $nonPensionableStatutoryPay Non pensionable statutory pay * * @return $this */ - public function setTierablePayPayCodes(?array $tierablePayPayCodes): static + public function setNonPensionableStatutoryPay(?float $nonPensionableStatutoryPay): static { - if (is_null($tierablePayPayCodes)) { - array_push($this->openAPINullablesSetToNull, 'tierablePayPayCodes'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tierablePayPayCodes', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($nonPensionableStatutoryPay)) { + throw new InvalidArgumentException('non-nullable nonPensionableStatutoryPay cannot be null'); } - $this->container['tierablePayPayCodes'] = $tierablePayPayCodes; + $this->container['nonPensionableStatutoryPay'] = $nonPensionableStatutoryPay; return $this; } /** - * Gets isHalfContributionMember + * Gets nonPensionableStatutoryPays * - * @return bool|null + * @return array|null */ - public function getIsHalfContributionMember(): ?bool + public function getNonPensionableStatutoryPays(): ?array { - return $this->container['isHalfContributionMember']; + return $this->container['nonPensionableStatutoryPays']; } /** - * Sets isHalfContributionMember + * Sets nonPensionableStatutoryPays * - * @param bool|null $isHalfContributionMember if an employee as a member of the 50/50 LGPS scheme, they can enable contribution to 50% of the normal contributions. + * @param array|null $nonPensionableStatutoryPays Non pensionable statutory pay per leave * * @return $this */ - public function setIsHalfContributionMember(?bool $isHalfContributionMember): static + public function setNonPensionableStatutoryPays(?array $nonPensionableStatutoryPays): static { - if (is_null($isHalfContributionMember)) { - throw new InvalidArgumentException('non-nullable isHalfContributionMember cannot be null'); + if (is_null($nonPensionableStatutoryPays)) { + array_push($this->openAPINullablesSetToNull, 'nonPensionableStatutoryPays'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('nonPensionableStatutoryPays', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isHalfContributionMember'] = $isHalfContributionMember; + $this->container['nonPensionableStatutoryPays'] = $nonPensionableStatutoryPays; return $this; } /** - * Gets pensionableEarnings + * Gets nonTierablePay * * @return float|null */ - public function getPensionableEarnings(): ?float + public function getNonTierablePay(): ?float { - return $this->container['pensionableEarnings']; + return $this->container['nonTierablePay']; } /** - * Sets pensionableEarnings + * Sets nonTierablePay * - * @param float|null $pensionableEarnings [readonly] The amount of the Gross that is subject to Pension Deductions. If the Pension Scheme uses Qualifying Earnings (upper and lower limits) then this value is before those are applied Applied only if an employee has more than one pension assigned to them + * @param float|null $nonTierablePay [readonly] The value of any pay that shouldn't count towards determining a pension tier. * * @return $this */ - public function setPensionableEarnings(?float $pensionableEarnings): static + public function setNonTierablePay(?float $nonTierablePay): static { - if (is_null($pensionableEarnings)) { - throw new InvalidArgumentException('non-nullable pensionableEarnings cannot be null'); + if (is_null($nonTierablePay)) { + throw new InvalidArgumentException('non-nullable nonTierablePay cannot be null'); } - $this->container['pensionableEarnings'] = $pensionableEarnings; + $this->container['nonTierablePay'] = $nonTierablePay; return $this; } /** - * Gets pensionablePay + * Gets notionalPay * * @return float|null */ - public function getPensionablePay(): ?float + public function getNotionalPay(): ?float { - return $this->container['pensionablePay']; + return $this->container['notionalPay']; } /** - * Sets pensionablePay + * Sets notionalPay * - * @param float|null $pensionablePay [readonly] The amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. Applied only if an employee has more than one pension assigned to them + * @param float|null $notionalPay Pay value based on regular pay lines and the pension's associated roles Set before any adjustments for things like stat payments * * @return $this */ - public function setPensionablePay(?float $pensionablePay): static + public function setNotionalPay(?float $notionalPay): static { - if (is_null($pensionablePay)) { - throw new InvalidArgumentException('non-nullable pensionablePay cannot be null'); + if (is_null($notionalPay)) { + throw new InvalidArgumentException('non-nullable notionalPay cannot be null'); } - $this->container['pensionablePay'] = $pensionablePay; + $this->container['notionalPay'] = $notionalPay; return $this; } /** - * Gets nonTierablePay + * Gets notionalPayDetails * - * @return float|null + * @return \SynergiTech\Staffology\Model\LeaveNotionalPayDetails[]|null */ - public function getNonTierablePay(): ?float + public function getNotionalPayDetails(): ?array { - return $this->container['nonTierablePay']; + return $this->container['notionalPayDetails']; } /** - * Sets nonTierablePay + * Sets notionalPayDetails * - * @param float|null $nonTierablePay [readonly] The value of any pay that shouldn't count towards determining a pension tier. + * @param \SynergiTech\Staffology\Model\LeaveNotionalPayDetails[]|null $notionalPayDetails Notional pay details based on every occupational or custom leave affecting a teachers pension summary * * @return $this */ - public function setNonTierablePay(?float $nonTierablePay): static + public function setNotionalPayDetails(?array $notionalPayDetails): static { - if (is_null($nonTierablePay)) { - throw new InvalidArgumentException('non-nullable nonTierablePay cannot be null'); + if (is_null($notionalPayDetails)) { + array_push($this->openAPINullablesSetToNull, 'notionalPayDetails'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('notionalPayDetails', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['nonTierablePay'] = $nonTierablePay; + $this->container['notionalPayDetails'] = $notionalPayDetails; return $this; } /** - * Gets employeePensionContribution + * Gets papdisEmployerId * - * @return float|null + * @return string|null */ - public function getEmployeePensionContribution(): ?float + public function getPapdisEmployerId(): ?string { - return $this->container['employeePensionContribution']; + return $this->container['papdisEmployerId']; } /** - * Sets employeePensionContribution + * Sets papdisEmployerId * - * @param float|null $employeePensionContribution [readonly] The value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions + * @param string|null $papdisEmployerId [readonly] Papdis information from the PensionScheme * * @return $this */ - public function setEmployeePensionContribution(?float $employeePensionContribution): static + public function setPapdisEmployerId(?string $papdisEmployerId): static { - if (is_null($employeePensionContribution)) { - throw new InvalidArgumentException('non-nullable employeePensionContribution cannot be null'); + if (is_null($papdisEmployerId)) { + array_push($this->openAPINullablesSetToNull, 'papdisEmployerId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('papdisEmployerId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeePensionContribution'] = $employeePensionContribution; + $this->container['papdisEmployerId'] = $papdisEmployerId; return $this; } /** - * Gets employeePensionContributionAvc + * Gets papdisPensionProviderId * - * @return float|null + * @return string|null */ - public function getEmployeePensionContributionAvc(): ?float + public function getPapdisPensionProviderId(): ?string { - return $this->container['employeePensionContributionAvc']; + return $this->container['papdisPensionProviderId']; } /** - * Sets employeePensionContributionAvc + * Sets papdisPensionProviderId * - * @param float|null $employeePensionContributionAvc [readonly] The value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution + * @param string|null $papdisPensionProviderId [readonly] Papdis information from the PensionScheme * * @return $this */ - public function setEmployeePensionContributionAvc(?float $employeePensionContributionAvc): static + public function setPapdisPensionProviderId(?string $papdisPensionProviderId): static { - if (is_null($employeePensionContributionAvc)) { - throw new InvalidArgumentException('non-nullable employeePensionContributionAvc cannot be null'); + if (is_null($papdisPensionProviderId)) { + array_push($this->openAPINullablesSetToNull, 'papdisPensionProviderId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('papdisPensionProviderId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeePensionContributionAvc'] = $employeePensionContributionAvc; + $this->container['papdisPensionProviderId'] = $papdisPensionProviderId; return $this; } /** - * Gets employerPensionContribution + * Gets pensionId * - * @return float|null + * @return string|null */ - public function getEmployerPensionContribution(): ?float + public function getPensionId(): ?string { - return $this->container['employerPensionContribution']; + return $this->container['pensionId']; } /** - * Sets employerPensionContribution + * Sets pensionId * - * @param float|null $employerPensionContribution [readonly] The value of the Pension Contribution being made by the Employer for this Employee + * @param string|null $pensionId [readonly] The Id of the Pension. * * @return $this */ - public function setEmployerPensionContribution(?float $employerPensionContribution): static + public function setPensionId(?string $pensionId): static { - if (is_null($employerPensionContribution)) { - throw new InvalidArgumentException('non-nullable employerPensionContribution cannot be null'); + if (is_null($pensionId)) { + throw new InvalidArgumentException('non-nullable pensionId cannot be null'); } - $this->container['employerPensionContribution'] = $employerPensionContribution; + $this->container['pensionId'] = $pensionId; return $this; } /** - * Gets isForEndedPension + * Gets pensionRule * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PensionRule|null */ - public function getIsForEndedPension(): ?bool + public function getPensionRule(): ?\SynergiTech\Staffology\Model\PensionRule { - return $this->container['isForEndedPension']; + return $this->container['pensionRule']; } /** - * Sets isForEndedPension + * Sets pensionRule * - * @param bool|null $isForEndedPension [readonly] Determines whether the pension summary is related to a pension that has ended or not + * @param \SynergiTech\Staffology\Model\PensionRule|null $pensionRule pensionRule * * @return $this */ - public function setIsForEndedPension(?bool $isForEndedPension): static + public function setPensionRule(?\SynergiTech\Staffology\Model\PensionRule $pensionRule): static { - if (is_null($isForEndedPension)) { - throw new InvalidArgumentException('non-nullable isForEndedPension cannot be null'); + if (is_null($pensionRule)) { + throw new InvalidArgumentException('non-nullable pensionRule cannot be null'); } - $this->container['isForEndedPension'] = $isForEndedPension; + $this->container['pensionRule'] = $pensionRule; return $this; } /** - * Gets associatedEmployeeRoles + * Gets pensionSchemeId * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return string|null */ - public function getAssociatedEmployeeRoles(): ?array + public function getPensionSchemeId(): ?string { - return $this->container['associatedEmployeeRoles']; + return $this->container['pensionSchemeId']; } /** - * Sets associatedEmployeeRoles + * Sets pensionSchemeId * - * @param \SynergiTech\Staffology\Model\Item[]|null $associatedEmployeeRoles associatedEmployeeRoles + * @param string|null $pensionSchemeId [readonly] The Id of the PensionScheme. * * @return $this */ - public function setAssociatedEmployeeRoles(?array $associatedEmployeeRoles): static + public function setPensionSchemeId(?string $pensionSchemeId): static { - if (is_null($associatedEmployeeRoles)) { - array_push($this->openAPINullablesSetToNull, 'associatedEmployeeRoles'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('associatedEmployeeRoles', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($pensionSchemeId)) { + throw new InvalidArgumentException('non-nullable pensionSchemeId cannot be null'); } - $this->container['associatedEmployeeRoles'] = $associatedEmployeeRoles; + $this->container['pensionSchemeId'] = $pensionSchemeId; return $this; } /** - * Gets notionalPay + * Gets pensionableEarnings * * @return float|null */ - public function getNotionalPay(): ?float + public function getPensionableEarnings(): ?float { - return $this->container['notionalPay']; + return $this->container['pensionableEarnings']; } /** - * Sets notionalPay + * Sets pensionableEarnings * - * @param float|null $notionalPay Pay value based on regular pay lines and the pension's associated roles Set before any adjustments for things like stat payments + * @param float|null $pensionableEarnings [readonly] The amount of the Gross that is subject to Pension Deductions. If the Pension Scheme uses Qualifying Earnings (upper and lower limits) then this value is before those are applied Applied only if an employee has more than one pension assigned to them * * @return $this */ - public function setNotionalPay(?float $notionalPay): static + public function setPensionableEarnings(?float $pensionableEarnings): static { - if (is_null($notionalPay)) { - throw new InvalidArgumentException('non-nullable notionalPay cannot be null'); + if (is_null($pensionableEarnings)) { + throw new InvalidArgumentException('non-nullable pensionableEarnings cannot be null'); } - $this->container['notionalPay'] = $notionalPay; + $this->container['pensionableEarnings'] = $pensionableEarnings; return $this; } @@ -1539,6 +1683,33 @@ public function setPensionableEarningsBfd(?float $pensionableEarningsBfd): stati return $this; } + /** + * Gets pensionablePay + * + * @return float|null + */ + public function getPensionablePay(): ?float + { + return $this->container['pensionablePay']; + } + + /** + * Sets pensionablePay + * + * @param float|null $pensionablePay [readonly] The amount of the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. Applied only if an employee has more than one pension assigned to them + * + * @return $this + */ + public function setPensionablePay(?float $pensionablePay): static + { + if (is_null($pensionablePay)) { + throw new InvalidArgumentException('non-nullable pensionablePay cannot be null'); + } + $this->container['pensionablePay'] = $pensionablePay; + + return $this; + } + /** * Gets pensionablePayBfd * @@ -1567,272 +1738,306 @@ public function setPensionablePayBfd(?float $pensionablePayBfd): static } /** - * Gets employeePensionContributionBfd + * Gets pensionablePayCodes * - * @return float|null + * @return string[]|null */ - public function getEmployeePensionContributionBfd(): ?float + public function getPensionablePayCodes(): ?array { - return $this->container['employeePensionContributionBfd']; + return $this->container['pensionablePayCodes']; } /** - * Sets employeePensionContributionBfd + * Sets pensionablePayCodes * - * @param float|null $employeePensionContributionBfd [readonly] The brought forward Year to Date value of the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions + * @param string[]|null $pensionablePayCodes [readonly] If the pension scheme is set to override the Pensionale PayCodes, then this is what they've been set to. * * @return $this */ - public function setEmployeePensionContributionBfd(?float $employeePensionContributionBfd): static + public function setPensionablePayCodes(?array $pensionablePayCodes): static { - if (is_null($employeePensionContributionBfd)) { - throw new InvalidArgumentException('non-nullable employeePensionContributionBfd cannot be null'); + if (is_null($pensionablePayCodes)) { + array_push($this->openAPINullablesSetToNull, 'pensionablePayCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pensionablePayCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeePensionContributionBfd'] = $employeePensionContributionBfd; + $this->container['pensionablePayCodes'] = $pensionablePayCodes; return $this; } /** - * Gets assumedPensionablePayBfd + * Gets periodFrom * - * @return float|null + * @return \DateTime|null */ - public function getAssumedPensionablePayBfd(): ?float + public function getPeriodFrom(): ?\DateTime { - return $this->container['assumedPensionablePayBfd']; + return $this->container['periodFrom']; } /** - * Sets assumedPensionablePayBfd + * Sets periodFrom * - * @param float|null $assumedPensionablePayBfd [readonly] The brought forward Year to Date value of Assumed Pensionable Pay. If the employee is receiving any Statutory Leave that has an AssumedPensionablePay value set then it'll be shown here. + * @param \DateTime|null $periodFrom Nullable DateTime property \"PeriodFrom\" to store the start date of the PayPeriod the current PensionSummary is attributable to. Applicable only for when the pension summary is created on the base of when earned additions' and deductions' pension calculations for back paid periods * * @return $this */ - public function setAssumedPensionablePayBfd(?float $assumedPensionablePayBfd): static + public function setPeriodFrom(?\DateTime $periodFrom): static { - if (is_null($assumedPensionablePayBfd)) { - array_push($this->openAPINullablesSetToNull, 'assumedPensionablePayBfd'); + if (is_null($periodFrom)) { + array_push($this->openAPINullablesSetToNull, 'periodFrom'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('assumedPensionablePayBfd', $nullablesSetToNull); + $index = array_search('periodFrom', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['assumedPensionablePayBfd'] = $assumedPensionablePayBfd; + $this->container['periodFrom'] = $periodFrom; return $this; } /** - * Gets employerPensionContributionBfd + * Gets periodTo * - * @return float|null + * @return \DateTime|null */ - public function getEmployerPensionContributionBfd(): ?float + public function getPeriodTo(): ?\DateTime { - return $this->container['employerPensionContributionBfd']; + return $this->container['periodTo']; } /** - * Sets employerPensionContributionBfd + * Sets periodTo * - * @param float|null $employerPensionContributionBfd [readonly] The brought forward Year to Date value of the Pension Contribution being made by the Employer for this Employee + * @param \DateTime|null $periodTo Nullable DateTime property \"PeriodTo\" to store the start date of the PayPeriod the current PensionSummary is attributable to. Applicable only for when the pension summary is created on the base of when earned additions' and deductions' pension calculations for back paid periods * * @return $this */ - public function setEmployerPensionContributionBfd(?float $employerPensionContributionBfd): static + public function setPeriodTo(?\DateTime $periodTo): static { - if (is_null($employerPensionContributionBfd)) { - throw new InvalidArgumentException('non-nullable employerPensionContributionBfd cannot be null'); + if (is_null($periodTo)) { + array_push($this->openAPINullablesSetToNull, 'periodTo'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('periodTo', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employerPensionContributionBfd'] = $employerPensionContributionBfd; + $this->container['periodTo'] = $periodTo; return $this; } /** - * Gets employeePensionContributionAvcBfd + * Gets startDate * - * @return float|null + * @return \DateTime|null */ - public function getEmployeePensionContributionAvcBfd(): ?float + public function getStartDate(): ?\DateTime { - return $this->container['employeePensionContributionAvcBfd']; + return $this->container['startDate']; } /** - * Sets employeePensionContributionAvcBfd + * Sets startDate * - * @param float|null $employeePensionContributionAvcBfd [readonly] The brought forward Year to Date value of the Pension Contribution being made by this Employee as an Additional Voluntary Contribution + * @param \DateTime|null $startDate [readonly] Pension Start Date * * @return $this */ - public function setEmployeePensionContributionAvcBfd(?float $employeePensionContributionAvcBfd): static + public function setStartDate(?\DateTime $startDate): static { - if (is_null($employeePensionContributionAvcBfd)) { - throw new InvalidArgumentException('non-nullable employeePensionContributionAvcBfd cannot be null'); + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); } - $this->container['employeePensionContributionAvcBfd'] = $employeePensionContributionAvcBfd; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets whenEarnedPensionSummaries + * Gets subtractedBasicRateTax * - * @return \SynergiTech\Staffology\Model\PensionSummary[]|null + * @return bool|null */ - public function getWhenEarnedPensionSummaries(): ?array + public function getSubtractedBasicRateTax(): ?bool { - return $this->container['whenEarnedPensionSummaries']; + return $this->container['subtractedBasicRateTax']; } /** - * Sets whenEarnedPensionSummaries + * Sets subtractedBasicRateTax * - * @param \SynergiTech\Staffology\Model\PensionSummary[]|null $whenEarnedPensionSummaries The list of pension summaries created on the base of when earned additions' and deductions' pension calculations for back paid periods + * @param bool|null $subtractedBasicRateTax [readonly] The SubtractedBasicRateTax applied from the PensionScheme SubtractBasicRateTax. * * @return $this */ - public function setWhenEarnedPensionSummaries(?array $whenEarnedPensionSummaries): static + public function setSubtractedBasicRateTax(?bool $subtractedBasicRateTax): static { - if (is_null($whenEarnedPensionSummaries)) { - array_push($this->openAPINullablesSetToNull, 'whenEarnedPensionSummaries'); + if (is_null($subtractedBasicRateTax)) { + throw new InvalidArgumentException('non-nullable subtractedBasicRateTax cannot be null'); + } + $this->container['subtractedBasicRateTax'] = $subtractedBasicRateTax; + + return $this; + } + + /** + * Gets tierablePayPayCodes + * + * @return string[]|null + */ + public function getTierablePayPayCodes(): ?array + { + return $this->container['tierablePayPayCodes']; + } + + /** + * Sets tierablePayPayCodes + * + * @param string[]|null $tierablePayPayCodes [readonly] If the pension scheme is set to override the TierablePay PayCodes, then this is what they've been set to. + * + * @return $this + */ + public function setTierablePayPayCodes(?array $tierablePayPayCodes): static + { + if (is_null($tierablePayPayCodes)) { + array_push($this->openAPINullablesSetToNull, 'tierablePayPayCodes'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('whenEarnedPensionSummaries', $nullablesSetToNull); + $index = array_search('tierablePayPayCodes', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['whenEarnedPensionSummaries'] = $whenEarnedPensionSummaries; + $this->container['tierablePayPayCodes'] = $tierablePayPayCodes; return $this; } /** - * Gets periodFrom + * Gets tiers * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\TieredPensionRate[]|null */ - public function getPeriodFrom(): ?\DateTime + public function getTiers(): ?array { - return $this->container['periodFrom']; + return $this->container['tiers']; } /** - * Sets periodFrom + * Sets tiers * - * @param \DateTime|null $periodFrom Nullable DateTime property \"PeriodFrom\" to store the start date of the PayPeriod the current PensionSummary is attributable to. Applicable only for when the pension summary is created on the base of when earned additions' and deductions' pension calculations for back paid periods + * @param \SynergiTech\Staffology\Model\TieredPensionRate[]|null $tiers tiers * * @return $this */ - public function setPeriodFrom(?\DateTime $periodFrom): static + public function setTiers(?array $tiers): static { - if (is_null($periodFrom)) { - array_push($this->openAPINullablesSetToNull, 'periodFrom'); + if (is_null($tiers)) { + array_push($this->openAPINullablesSetToNull, 'tiers'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('periodFrom', $nullablesSetToNull); + $index = array_search('tiers', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['periodFrom'] = $periodFrom; + $this->container['tiers'] = $tiers; return $this; } /** - * Gets periodTo + * Gets treatAsWhenPaidForBackPay * - * @return \DateTime|null + * @return bool|null */ - public function getPeriodTo(): ?\DateTime + public function getTreatAsWhenPaidForBackPay(): ?bool { - return $this->container['periodTo']; + return $this->container['treatAsWhenPaidForBackPay']; } /** - * Sets periodTo + * Sets treatAsWhenPaidForBackPay * - * @param \DateTime|null $periodTo Nullable DateTime property \"PeriodTo\" to store the start date of the PayPeriod the current PensionSummary is attributable to. Applicable only for when the pension summary is created on the base of when earned additions' and deductions' pension calculations for back paid periods + * @param bool|null $treatAsWhenPaidForBackPay [readonly] Determines whether the pension summary should be treated as when paid when the earnings are based only on back pay * * @return $this */ - public function setPeriodTo(?\DateTime $periodTo): static + public function setTreatAsWhenPaidForBackPay(?bool $treatAsWhenPaidForBackPay): static { - if (is_null($periodTo)) { - array_push($this->openAPINullablesSetToNull, 'periodTo'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('periodTo', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($treatAsWhenPaidForBackPay)) { + throw new InvalidArgumentException('non-nullable treatAsWhenPaidForBackPay cannot be null'); } - $this->container['periodTo'] = $periodTo; + $this->container['treatAsWhenPaidForBackPay'] = $treatAsWhenPaidForBackPay; return $this; } /** - * Gets whenEarnedPensionableEarningsCorrection + * Gets whenEarnedEmployeePensionContributionAvcCorrection * * @return float|null */ - public function getWhenEarnedPensionableEarningsCorrection(): ?float + public function getWhenEarnedEmployeePensionContributionAvcCorrection(): ?float { - return $this->container['whenEarnedPensionableEarningsCorrection']; + return $this->container['whenEarnedEmployeePensionContributionAvcCorrection']; } /** - * Sets whenEarnedPensionableEarningsCorrection + * Sets whenEarnedEmployeePensionContributionAvcCorrection * - * @param float|null $whenEarnedPensionableEarningsCorrection [readonly] The when earned amount correction to the Gross that is subject to Pension Deductions. + * @param float|null $whenEarnedEmployeePensionContributionAvcCorrection [readonly] The when earned amount correction to Pension Contribution being made by this Employee as an Additional Voluntary Contribution * * @return $this */ - public function setWhenEarnedPensionableEarningsCorrection(?float $whenEarnedPensionableEarningsCorrection): static + public function setWhenEarnedEmployeePensionContributionAvcCorrection(?float $whenEarnedEmployeePensionContributionAvcCorrection): static { - if (is_null($whenEarnedPensionableEarningsCorrection)) { - throw new InvalidArgumentException('non-nullable whenEarnedPensionableEarningsCorrection cannot be null'); + if (is_null($whenEarnedEmployeePensionContributionAvcCorrection)) { + throw new InvalidArgumentException('non-nullable whenEarnedEmployeePensionContributionAvcCorrection cannot be null'); } - $this->container['whenEarnedPensionableEarningsCorrection'] = $whenEarnedPensionableEarningsCorrection; + $this->container['whenEarnedEmployeePensionContributionAvcCorrection'] = $whenEarnedEmployeePensionContributionAvcCorrection; return $this; } /** - * Gets whenEarnedPensionablePayCorrection + * Gets whenEarnedEmployeePensionContributionAvcCorrectionBfd * * @return float|null */ - public function getWhenEarnedPensionablePayCorrection(): ?float + public function getWhenEarnedEmployeePensionContributionAvcCorrectionBfd(): ?float { - return $this->container['whenEarnedPensionablePayCorrection']; + return $this->container['whenEarnedEmployeePensionContributionAvcCorrectionBfd']; } /** - * Sets whenEarnedPensionablePayCorrection + * Sets whenEarnedEmployeePensionContributionAvcCorrectionBfd * - * @param float|null $whenEarnedPensionablePayCorrection [readonly] The when earned amount correction to the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. + * @param float|null $whenEarnedEmployeePensionContributionAvcCorrectionBfd [readonly] The brought forward Year to Date when earned amount correction to Pension Contribution being made by this Employee as an Additional Voluntary Contribution * * @return $this */ - public function setWhenEarnedPensionablePayCorrection(?float $whenEarnedPensionablePayCorrection): static + public function setWhenEarnedEmployeePensionContributionAvcCorrectionBfd(?float $whenEarnedEmployeePensionContributionAvcCorrectionBfd): static { - if (is_null($whenEarnedPensionablePayCorrection)) { - throw new InvalidArgumentException('non-nullable whenEarnedPensionablePayCorrection cannot be null'); + if (is_null($whenEarnedEmployeePensionContributionAvcCorrectionBfd)) { + throw new InvalidArgumentException('non-nullable whenEarnedEmployeePensionContributionAvcCorrectionBfd cannot be null'); } - $this->container['whenEarnedPensionablePayCorrection'] = $whenEarnedPensionablePayCorrection; + $this->container['whenEarnedEmployeePensionContributionAvcCorrectionBfd'] = $whenEarnedEmployeePensionContributionAvcCorrectionBfd; return $this; } @@ -1864,6 +2069,33 @@ public function setWhenEarnedEmployeePensionContributionCorrection(?float $whenE return $this; } + /** + * Gets whenEarnedEmployeePensionContributionCorrectionBfd + * + * @return float|null + */ + public function getWhenEarnedEmployeePensionContributionCorrectionBfd(): ?float + { + return $this->container['whenEarnedEmployeePensionContributionCorrectionBfd']; + } + + /** + * Sets whenEarnedEmployeePensionContributionCorrectionBfd + * + * @param float|null $whenEarnedEmployeePensionContributionCorrectionBfd [readonly] The brought forward Year to Date when earned amount correction to the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions + * + * @return $this + */ + public function setWhenEarnedEmployeePensionContributionCorrectionBfd(?float $whenEarnedEmployeePensionContributionCorrectionBfd): static + { + if (is_null($whenEarnedEmployeePensionContributionCorrectionBfd)) { + throw new InvalidArgumentException('non-nullable whenEarnedEmployeePensionContributionCorrectionBfd cannot be null'); + } + $this->container['whenEarnedEmployeePensionContributionCorrectionBfd'] = $whenEarnedEmployeePensionContributionCorrectionBfd; + + return $this; + } + /** * Gets whenEarnedEmployerPensionContributionCorrection * @@ -1892,197 +2124,224 @@ public function setWhenEarnedEmployerPensionContributionCorrection(?float $whenE } /** - * Gets whenEarnedEmployeePensionContributionAvcCorrection + * Gets whenEarnedEmployerPensionContributionCorrectionBfd * * @return float|null */ - public function getWhenEarnedEmployeePensionContributionAvcCorrection(): ?float + public function getWhenEarnedEmployerPensionContributionCorrectionBfd(): ?float { - return $this->container['whenEarnedEmployeePensionContributionAvcCorrection']; + return $this->container['whenEarnedEmployerPensionContributionCorrectionBfd']; } /** - * Sets whenEarnedEmployeePensionContributionAvcCorrection + * Sets whenEarnedEmployerPensionContributionCorrectionBfd * - * @param float|null $whenEarnedEmployeePensionContributionAvcCorrection [readonly] The when earned amount correction to Pension Contribution being made by this Employee as an Additional Voluntary Contribution + * @param float|null $whenEarnedEmployerPensionContributionCorrectionBfd [readonly] The brought forward Year to Date when earned amount correction to the Pension Contribution being made by the Employer for this Employee * * @return $this */ - public function setWhenEarnedEmployeePensionContributionAvcCorrection(?float $whenEarnedEmployeePensionContributionAvcCorrection): static + public function setWhenEarnedEmployerPensionContributionCorrectionBfd(?float $whenEarnedEmployerPensionContributionCorrectionBfd): static { - if (is_null($whenEarnedEmployeePensionContributionAvcCorrection)) { - throw new InvalidArgumentException('non-nullable whenEarnedEmployeePensionContributionAvcCorrection cannot be null'); + if (is_null($whenEarnedEmployerPensionContributionCorrectionBfd)) { + throw new InvalidArgumentException('non-nullable whenEarnedEmployerPensionContributionCorrectionBfd cannot be null'); } - $this->container['whenEarnedEmployeePensionContributionAvcCorrection'] = $whenEarnedEmployeePensionContributionAvcCorrection; + $this->container['whenEarnedEmployerPensionContributionCorrectionBfd'] = $whenEarnedEmployerPensionContributionCorrectionBfd; return $this; } /** - * Gets whenEarnedPensionableEarningsCorrectionBfd + * Gets whenEarnedPensionSummaries * - * @return float|null + * @return \SynergiTech\Staffology\Model\PensionSummary[]|null */ - public function getWhenEarnedPensionableEarningsCorrectionBfd(): ?float + public function getWhenEarnedPensionSummaries(): ?array { - return $this->container['whenEarnedPensionableEarningsCorrectionBfd']; + return $this->container['whenEarnedPensionSummaries']; } /** - * Sets whenEarnedPensionableEarningsCorrectionBfd + * Sets whenEarnedPensionSummaries * - * @param float|null $whenEarnedPensionableEarningsCorrectionBfd [readonly] The brought forward Year to Date when earned amount correction to the Gross that is subject to Pension Deductions. + * @param \SynergiTech\Staffology\Model\PensionSummary[]|null $whenEarnedPensionSummaries The list of pension summaries created on the base of when earned additions' and deductions' pension calculations for back paid periods * * @return $this */ - public function setWhenEarnedPensionableEarningsCorrectionBfd(?float $whenEarnedPensionableEarningsCorrectionBfd): static + public function setWhenEarnedPensionSummaries(?array $whenEarnedPensionSummaries): static { - if (is_null($whenEarnedPensionableEarningsCorrectionBfd)) { - throw new InvalidArgumentException('non-nullable whenEarnedPensionableEarningsCorrectionBfd cannot be null'); + if (is_null($whenEarnedPensionSummaries)) { + array_push($this->openAPINullablesSetToNull, 'whenEarnedPensionSummaries'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('whenEarnedPensionSummaries', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['whenEarnedPensionableEarningsCorrectionBfd'] = $whenEarnedPensionableEarningsCorrectionBfd; + $this->container['whenEarnedPensionSummaries'] = $whenEarnedPensionSummaries; return $this; } /** - * Gets whenEarnedPensionablePayCorrectionBfd + * Gets whenEarnedPensionableEarningsCorrection * * @return float|null */ - public function getWhenEarnedPensionablePayCorrectionBfd(): ?float + public function getWhenEarnedPensionableEarningsCorrection(): ?float { - return $this->container['whenEarnedPensionablePayCorrectionBfd']; + return $this->container['whenEarnedPensionableEarningsCorrection']; } /** - * Sets whenEarnedPensionablePayCorrectionBfd + * Sets whenEarnedPensionableEarningsCorrection * - * @param float|null $whenEarnedPensionablePayCorrectionBfd [readonly] The brought forward Year to Date when earned amount correction to the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. + * @param float|null $whenEarnedPensionableEarningsCorrection [readonly] The when earned amount correction to the Gross that is subject to Pension Deductions. * * @return $this */ - public function setWhenEarnedPensionablePayCorrectionBfd(?float $whenEarnedPensionablePayCorrectionBfd): static + public function setWhenEarnedPensionableEarningsCorrection(?float $whenEarnedPensionableEarningsCorrection): static { - if (is_null($whenEarnedPensionablePayCorrectionBfd)) { - throw new InvalidArgumentException('non-nullable whenEarnedPensionablePayCorrectionBfd cannot be null'); + if (is_null($whenEarnedPensionableEarningsCorrection)) { + throw new InvalidArgumentException('non-nullable whenEarnedPensionableEarningsCorrection cannot be null'); } - $this->container['whenEarnedPensionablePayCorrectionBfd'] = $whenEarnedPensionablePayCorrectionBfd; + $this->container['whenEarnedPensionableEarningsCorrection'] = $whenEarnedPensionableEarningsCorrection; return $this; } /** - * Gets whenEarnedEmployeePensionContributionCorrectionBfd + * Gets whenEarnedPensionableEarningsCorrectionBfd * * @return float|null */ - public function getWhenEarnedEmployeePensionContributionCorrectionBfd(): ?float + public function getWhenEarnedPensionableEarningsCorrectionBfd(): ?float { - return $this->container['whenEarnedEmployeePensionContributionCorrectionBfd']; + return $this->container['whenEarnedPensionableEarningsCorrectionBfd']; } /** - * Sets whenEarnedEmployeePensionContributionCorrectionBfd + * Sets whenEarnedPensionableEarningsCorrectionBfd * - * @param float|null $whenEarnedEmployeePensionContributionCorrectionBfd [readonly] The brought forward Year to Date when earned amount correction to the Pension Contribution being made by this Employee, excluding any Additional Voluntary Contributions + * @param float|null $whenEarnedPensionableEarningsCorrectionBfd [readonly] The brought forward Year to Date when earned amount correction to the Gross that is subject to Pension Deductions. * * @return $this */ - public function setWhenEarnedEmployeePensionContributionCorrectionBfd(?float $whenEarnedEmployeePensionContributionCorrectionBfd): static + public function setWhenEarnedPensionableEarningsCorrectionBfd(?float $whenEarnedPensionableEarningsCorrectionBfd): static { - if (is_null($whenEarnedEmployeePensionContributionCorrectionBfd)) { - throw new InvalidArgumentException('non-nullable whenEarnedEmployeePensionContributionCorrectionBfd cannot be null'); + if (is_null($whenEarnedPensionableEarningsCorrectionBfd)) { + throw new InvalidArgumentException('non-nullable whenEarnedPensionableEarningsCorrectionBfd cannot be null'); } - $this->container['whenEarnedEmployeePensionContributionCorrectionBfd'] = $whenEarnedEmployeePensionContributionCorrectionBfd; + $this->container['whenEarnedPensionableEarningsCorrectionBfd'] = $whenEarnedPensionableEarningsCorrectionBfd; return $this; } /** - * Gets whenEarnedEmployerPensionContributionCorrectionBfd + * Gets whenEarnedPensionablePayCorrection * * @return float|null */ - public function getWhenEarnedEmployerPensionContributionCorrectionBfd(): ?float + public function getWhenEarnedPensionablePayCorrection(): ?float { - return $this->container['whenEarnedEmployerPensionContributionCorrectionBfd']; + return $this->container['whenEarnedPensionablePayCorrection']; } /** - * Sets whenEarnedEmployerPensionContributionCorrectionBfd + * Sets whenEarnedPensionablePayCorrection * - * @param float|null $whenEarnedEmployerPensionContributionCorrectionBfd [readonly] The brought forward Year to Date when earned amount correction to the Pension Contribution being made by the Employer for this Employee + * @param float|null $whenEarnedPensionablePayCorrection [readonly] The when earned amount correction to the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. * * @return $this */ - public function setWhenEarnedEmployerPensionContributionCorrectionBfd(?float $whenEarnedEmployerPensionContributionCorrectionBfd): static + public function setWhenEarnedPensionablePayCorrection(?float $whenEarnedPensionablePayCorrection): static { - if (is_null($whenEarnedEmployerPensionContributionCorrectionBfd)) { - throw new InvalidArgumentException('non-nullable whenEarnedEmployerPensionContributionCorrectionBfd cannot be null'); + if (is_null($whenEarnedPensionablePayCorrection)) { + throw new InvalidArgumentException('non-nullable whenEarnedPensionablePayCorrection cannot be null'); } - $this->container['whenEarnedEmployerPensionContributionCorrectionBfd'] = $whenEarnedEmployerPensionContributionCorrectionBfd; + $this->container['whenEarnedPensionablePayCorrection'] = $whenEarnedPensionablePayCorrection; return $this; } /** - * Gets whenEarnedEmployeePensionContributionAvcCorrectionBfd + * Gets whenEarnedPensionablePayCorrectionBfd * * @return float|null */ - public function getWhenEarnedEmployeePensionContributionAvcCorrectionBfd(): ?float + public function getWhenEarnedPensionablePayCorrectionBfd(): ?float { - return $this->container['whenEarnedEmployeePensionContributionAvcCorrectionBfd']; + return $this->container['whenEarnedPensionablePayCorrectionBfd']; } /** - * Sets whenEarnedEmployeePensionContributionAvcCorrectionBfd + * Sets whenEarnedPensionablePayCorrectionBfd * - * @param float|null $whenEarnedEmployeePensionContributionAvcCorrectionBfd [readonly] The brought forward Year to Date when earned amount correction to Pension Contribution being made by this Employee as an Additional Voluntary Contribution + * @param float|null $whenEarnedPensionablePayCorrectionBfd [readonly] The brought forward Year to Date when earned amount correction to the Gross that pension calculations are based on after taking into account Upper and Lower Limits for the WorkerGroup. * * @return $this */ - public function setWhenEarnedEmployeePensionContributionAvcCorrectionBfd(?float $whenEarnedEmployeePensionContributionAvcCorrectionBfd): static + public function setWhenEarnedPensionablePayCorrectionBfd(?float $whenEarnedPensionablePayCorrectionBfd): static { - if (is_null($whenEarnedEmployeePensionContributionAvcCorrectionBfd)) { - throw new InvalidArgumentException('non-nullable whenEarnedEmployeePensionContributionAvcCorrectionBfd cannot be null'); + if (is_null($whenEarnedPensionablePayCorrectionBfd)) { + throw new InvalidArgumentException('non-nullable whenEarnedPensionablePayCorrectionBfd cannot be null'); } - $this->container['whenEarnedEmployeePensionContributionAvcCorrectionBfd'] = $whenEarnedEmployeePensionContributionAvcCorrectionBfd; + $this->container['whenEarnedPensionablePayCorrectionBfd'] = $whenEarnedPensionablePayCorrectionBfd; return $this; } /** - * Gets nominalCodeMappings + * Gets workerGroup * - * @return \SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]|null + * @return \SynergiTech\Staffology\Model\WorkerGroup|null */ - public function getNominalCodeMappings(): ?array + public function getWorkerGroup(): ?\SynergiTech\Staffology\Model\WorkerGroup { - return $this->container['nominalCodeMappings']; + return $this->container['workerGroup']; } /** - * Sets nominalCodeMappings + * Sets workerGroup * - * @param \SynergiTech\Staffology\Model\PensionSchemeNominalCodeMapping[]|null $nominalCodeMappings List of Nominal Code Mappings of the Pension + * @param \SynergiTech\Staffology\Model\WorkerGroup|null $workerGroup workerGroup * * @return $this */ - public function setNominalCodeMappings(?array $nominalCodeMappings): static + public function setWorkerGroup(?\SynergiTech\Staffology\Model\WorkerGroup $workerGroup): static { - if (is_null($nominalCodeMappings)) { - array_push($this->openAPINullablesSetToNull, 'nominalCodeMappings'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('nominalCodeMappings', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($workerGroup)) { + throw new InvalidArgumentException('non-nullable workerGroup cannot be null'); } - $this->container['nominalCodeMappings'] = $nominalCodeMappings; + $this->container['workerGroup'] = $workerGroup; + + return $this; + } + + /** + * Gets workerGroupId + * + * @return string|null + */ + public function getWorkerGroupId(): ?string + { + return $this->container['workerGroupId']; + } + + /** + * Sets workerGroupId + * + * @param string|null $workerGroupId [readonly] The Id of the WorkerGroup. + * + * @return $this + */ + public function setWorkerGroupId(?string $workerGroupId): static + { + if (is_null($workerGroupId)) { + throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); + } + $this->container['workerGroupId'] = $workerGroupId; return $this; } diff --git a/src/Model/PensionSummaryCostBreakdown.php b/src/Model/PensionSummaryCostBreakdown.php index 96f76c9..c70d4f0 100644 --- a/src/Model/PensionSummaryCostBreakdown.php +++ b/src/Model/PensionSummaryCostBreakdown.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class PensionSummaryCostBreakdown implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPITypes = [ - 'pensionRule' => '\SynergiTech\Staffology\Model\PensionRule', - 'payCodes' => 'string[]', 'amount' => 'float', - 'pensionableEarnings' => 'float', 'employeePensionContribution' => 'float', - 'employerPensionContribution' => 'float' + 'employerPensionContribution' => 'float', + 'payCodes' => 'string[]', + 'pensionRule' => '\SynergiTech\Staffology\Model\PensionRule', + 'pensionableEarnings' => 'float' ]; /** @@ -73,12 +73,12 @@ class PensionSummaryCostBreakdown implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPIFormats = [ - 'pensionRule' => null, - 'payCodes' => null, 'amount' => 'double', - 'pensionableEarnings' => 'double', 'employeePensionContribution' => 'double', - 'employerPensionContribution' => 'double' + 'employerPensionContribution' => 'double', + 'payCodes' => null, + 'pensionRule' => null, + 'pensionableEarnings' => 'double' ]; /** @@ -87,12 +87,12 @@ class PensionSummaryCostBreakdown implements ModelInterface, ArrayAccess, JsonSe * @var array */ protected static array $openAPINullables = [ - 'pensionRule' => false, - 'payCodes' => true, 'amount' => false, - 'pensionableEarnings' => false, 'employeePensionContribution' => false, - 'employerPensionContribution' => false + 'employerPensionContribution' => false, + 'payCodes' => true, + 'pensionRule' => false, + 'pensionableEarnings' => false ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'pensionRule' => 'pensionRule', - 'payCodes' => 'payCodes', 'amount' => 'amount', - 'pensionableEarnings' => 'pensionableEarnings', 'employeePensionContribution' => 'employeePensionContribution', - 'employerPensionContribution' => 'employerPensionContribution' + 'employerPensionContribution' => 'employerPensionContribution', + 'payCodes' => 'payCodes', + 'pensionRule' => 'pensionRule', + 'pensionableEarnings' => 'pensionableEarnings' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'pensionRule' => 'setPensionRule', - 'payCodes' => 'setPayCodes', 'amount' => 'setAmount', - 'pensionableEarnings' => 'setPensionableEarnings', 'employeePensionContribution' => 'setEmployeePensionContribution', - 'employerPensionContribution' => 'setEmployerPensionContribution' + 'employerPensionContribution' => 'setEmployerPensionContribution', + 'payCodes' => 'setPayCodes', + 'pensionRule' => 'setPensionRule', + 'pensionableEarnings' => 'setPensionableEarnings' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'pensionRule' => 'getPensionRule', - 'payCodes' => 'getPayCodes', 'amount' => 'getAmount', - 'pensionableEarnings' => 'getPensionableEarnings', 'employeePensionContribution' => 'getEmployeePensionContribution', - 'employerPensionContribution' => 'getEmployerPensionContribution' + 'employerPensionContribution' => 'getEmployerPensionContribution', + 'payCodes' => 'getPayCodes', + 'pensionRule' => 'getPensionRule', + 'pensionableEarnings' => 'getPensionableEarnings' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('pensionRule', $data ?? [], null); - $this->setIfExists('payCodes', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); - $this->setIfExists('pensionableEarnings', $data ?? [], null); $this->setIfExists('employeePensionContribution', $data ?? [], null); $this->setIfExists('employerPensionContribution', $data ?? [], null); + $this->setIfExists('payCodes', $data ?? [], null); + $this->setIfExists('pensionRule', $data ?? [], null); + $this->setIfExists('pensionableEarnings', $data ?? [], null); } /** @@ -324,170 +324,170 @@ public function valid(): bool /** - * Gets pensionRule + * Gets amount * - * @return \SynergiTech\Staffology\Model\PensionRule|null + * @return float|null */ - public function getPensionRule(): ?\SynergiTech\Staffology\Model\PensionRule + public function getAmount(): ?float { - return $this->container['pensionRule']; + return $this->container['amount']; } /** - * Sets pensionRule + * Sets amount * - * @param \SynergiTech\Staffology\Model\PensionRule|null $pensionRule pensionRule + * @param float|null $amount The amount associated with this pension entry. * * @return $this */ - public function setPensionRule(?\SynergiTech\Staffology\Model\PensionRule $pensionRule): static + public function setAmount(?float $amount): static { - if (is_null($pensionRule)) { - throw new InvalidArgumentException('non-nullable pensionRule cannot be null'); + if (is_null($amount)) { + throw new InvalidArgumentException('non-nullable amount cannot be null'); } - $this->container['pensionRule'] = $pensionRule; + $this->container['amount'] = $amount; return $this; } /** - * Gets payCodes + * Gets employeePensionContribution * - * @return string[]|null + * @return float|null */ - public function getPayCodes(): ?array + public function getEmployeePensionContribution(): ?float { - return $this->container['payCodes']; + return $this->container['employeePensionContribution']; } /** - * Sets payCodes + * Sets employeePensionContribution * - * @param string[]|null $payCodes The list of pay codes associated with this pension rule. + * @param float|null $employeePensionContribution The contribution amount made by the employee towards the pension. * * @return $this */ - public function setPayCodes(?array $payCodes): static + public function setEmployeePensionContribution(?float $employeePensionContribution): static { - if (is_null($payCodes)) { - array_push($this->openAPINullablesSetToNull, 'payCodes'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payCodes', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employeePensionContribution)) { + throw new InvalidArgumentException('non-nullable employeePensionContribution cannot be null'); } - $this->container['payCodes'] = $payCodes; + $this->container['employeePensionContribution'] = $employeePensionContribution; return $this; } /** - * Gets amount + * Gets employerPensionContribution * * @return float|null */ - public function getAmount(): ?float + public function getEmployerPensionContribution(): ?float { - return $this->container['amount']; + return $this->container['employerPensionContribution']; } /** - * Sets amount + * Sets employerPensionContribution * - * @param float|null $amount The amount associated with this pension entry. + * @param float|null $employerPensionContribution The contribution amount made by the employer towards the pension. * * @return $this */ - public function setAmount(?float $amount): static + public function setEmployerPensionContribution(?float $employerPensionContribution): static { - if (is_null($amount)) { - throw new InvalidArgumentException('non-nullable amount cannot be null'); + if (is_null($employerPensionContribution)) { + throw new InvalidArgumentException('non-nullable employerPensionContribution cannot be null'); } - $this->container['amount'] = $amount; + $this->container['employerPensionContribution'] = $employerPensionContribution; return $this; } /** - * Gets pensionableEarnings + * Gets payCodes * - * @return float|null + * @return string[]|null */ - public function getPensionableEarnings(): ?float + public function getPayCodes(): ?array { - return $this->container['pensionableEarnings']; + return $this->container['payCodes']; } /** - * Sets pensionableEarnings + * Sets payCodes * - * @param float|null $pensionableEarnings The total pensionable earnings relevant to this pension rule. + * @param string[]|null $payCodes The list of pay codes associated with this pension rule. * * @return $this */ - public function setPensionableEarnings(?float $pensionableEarnings): static + public function setPayCodes(?array $payCodes): static { - if (is_null($pensionableEarnings)) { - throw new InvalidArgumentException('non-nullable pensionableEarnings cannot be null'); + if (is_null($payCodes)) { + array_push($this->openAPINullablesSetToNull, 'payCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['pensionableEarnings'] = $pensionableEarnings; + $this->container['payCodes'] = $payCodes; return $this; } /** - * Gets employeePensionContribution + * Gets pensionRule * - * @return float|null + * @return \SynergiTech\Staffology\Model\PensionRule|null */ - public function getEmployeePensionContribution(): ?float + public function getPensionRule(): ?\SynergiTech\Staffology\Model\PensionRule { - return $this->container['employeePensionContribution']; + return $this->container['pensionRule']; } /** - * Sets employeePensionContribution + * Sets pensionRule * - * @param float|null $employeePensionContribution The contribution amount made by the employee towards the pension. + * @param \SynergiTech\Staffology\Model\PensionRule|null $pensionRule pensionRule * * @return $this */ - public function setEmployeePensionContribution(?float $employeePensionContribution): static + public function setPensionRule(?\SynergiTech\Staffology\Model\PensionRule $pensionRule): static { - if (is_null($employeePensionContribution)) { - throw new InvalidArgumentException('non-nullable employeePensionContribution cannot be null'); + if (is_null($pensionRule)) { + throw new InvalidArgumentException('non-nullable pensionRule cannot be null'); } - $this->container['employeePensionContribution'] = $employeePensionContribution; + $this->container['pensionRule'] = $pensionRule; return $this; } /** - * Gets employerPensionContribution + * Gets pensionableEarnings * * @return float|null */ - public function getEmployerPensionContribution(): ?float + public function getPensionableEarnings(): ?float { - return $this->container['employerPensionContribution']; + return $this->container['pensionableEarnings']; } /** - * Sets employerPensionContribution + * Sets pensionableEarnings * - * @param float|null $employerPensionContribution The contribution amount made by the employer towards the pension. + * @param float|null $pensionableEarnings The total pensionable earnings relevant to this pension rule. * * @return $this */ - public function setEmployerPensionContribution(?float $employerPensionContribution): static + public function setPensionableEarnings(?float $pensionableEarnings): static { - if (is_null($employerPensionContribution)) { - throw new InvalidArgumentException('non-nullable employerPensionContribution cannot be null'); + if (is_null($pensionableEarnings)) { + throw new InvalidArgumentException('non-nullable pensionableEarnings cannot be null'); } - $this->container['employerPensionContribution'] = $employerPensionContribution; + $this->container['pensionableEarnings'] = $pensionableEarnings; return $this; } diff --git a/src/Model/PensionablePayDefinition.php b/src/Model/PensionablePayDefinition.php index c9ed83a..0694f71 100644 --- a/src/Model/PensionablePayDefinition.php +++ b/src/Model/PensionablePayDefinition.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/PensionerPayroll.php b/src/Model/PensionerPayroll.php index 0758817..ec39525 100644 --- a/src/Model/PensionerPayroll.php +++ b/src/Model/PensionerPayroll.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class PensionerPayroll implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'inReceiptOfPension' => 'bool', - 'bereaved' => 'bool', 'amount' => 'float', + 'bereaved' => 'bool', + 'inReceiptOfPension' => 'bool', 'startDate' => '\DateTime' ]; @@ -71,9 +71,9 @@ class PensionerPayroll implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'inReceiptOfPension' => null, - 'bereaved' => null, 'amount' => 'double', + 'bereaved' => null, + 'inReceiptOfPension' => null, 'startDate' => 'date' ]; @@ -83,9 +83,9 @@ class PensionerPayroll implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'inReceiptOfPension' => false, - 'bereaved' => false, 'amount' => false, + 'bereaved' => false, + 'inReceiptOfPension' => false, 'startDate' => true ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'inReceiptOfPension' => 'inReceiptOfPension', - 'bereaved' => 'bereaved', 'amount' => 'amount', + 'bereaved' => 'bereaved', + 'inReceiptOfPension' => 'inReceiptOfPension', 'startDate' => 'startDate' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'inReceiptOfPension' => 'setInReceiptOfPension', - 'bereaved' => 'setBereaved', 'amount' => 'setAmount', + 'bereaved' => 'setBereaved', + 'inReceiptOfPension' => 'setInReceiptOfPension', 'startDate' => 'setStartDate' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'inReceiptOfPension' => 'getInReceiptOfPension', - 'bereaved' => 'getBereaved', 'amount' => 'getAmount', + 'bereaved' => 'getBereaved', + 'inReceiptOfPension' => 'getInReceiptOfPension', 'startDate' => 'getStartDate' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('inReceiptOfPension', $data ?? [], null); - $this->setIfExists('bereaved', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('bereaved', $data ?? [], null); + $this->setIfExists('inReceiptOfPension', $data ?? [], null); $this->setIfExists('startDate', $data ?? [], null); } @@ -310,28 +310,28 @@ public function valid(): bool /** - * Gets inReceiptOfPension + * Gets amount * - * @return bool|null + * @return float|null */ - public function getInReceiptOfPension(): ?bool + public function getAmount(): ?float { - return $this->container['inReceiptOfPension']; + return $this->container['amount']; } /** - * Sets inReceiptOfPension + * Sets amount * - * @param bool|null $inReceiptOfPension If set to true then the FPS will have the OccPenInd flag set to 'yes' + * @param float|null $amount Annual amount of occupational pension * * @return $this */ - public function setInReceiptOfPension(?bool $inReceiptOfPension): static + public function setAmount(?float $amount): static { - if (is_null($inReceiptOfPension)) { - throw new InvalidArgumentException('non-nullable inReceiptOfPension cannot be null'); + if (is_null($amount)) { + throw new InvalidArgumentException('non-nullable amount cannot be null'); } - $this->container['inReceiptOfPension'] = $inReceiptOfPension; + $this->container['amount'] = $amount; return $this; } @@ -364,28 +364,28 @@ public function setBereaved(?bool $bereaved): static } /** - * Gets amount + * Gets inReceiptOfPension * - * @return float|null + * @return bool|null */ - public function getAmount(): ?float + public function getInReceiptOfPension(): ?bool { - return $this->container['amount']; + return $this->container['inReceiptOfPension']; } /** - * Sets amount + * Sets inReceiptOfPension * - * @param float|null $amount Annual amount of occupational pension + * @param bool|null $inReceiptOfPension If set to true then the FPS will have the OccPenInd flag set to 'yes' * * @return $this */ - public function setAmount(?float $amount): static + public function setInReceiptOfPension(?bool $inReceiptOfPension): static { - if (is_null($amount)) { - throw new InvalidArgumentException('non-nullable amount cannot be null'); + if (is_null($inReceiptOfPension)) { + throw new InvalidArgumentException('non-nullable inReceiptOfPension cannot be null'); } - $this->container['amount'] = $amount; + $this->container['inReceiptOfPension'] = $inReceiptOfPension; return $this; } diff --git a/src/Model/PercentOfPayBand.php b/src/Model/PercentOfPayBand.php new file mode 100644 index 0000000..d93f5ee --- /dev/null +++ b/src/Model/PercentOfPayBand.php @@ -0,0 +1,47 @@ + */ protected static array $openAPITypes = [ - 'effectiveFrom' => '\DateTime', 'annualValue' => 'float', - 'periodValues' => '\SynergiTech\Staffology\Model\PeriodValuePeriodValues', - 'midYearChanges' => '\SynergiTech\Staffology\Model\PeriodValue[]' + 'effectiveFrom' => '\DateTime', + 'midYearChanges' => '\SynergiTech\Staffology\Model\PeriodValue[]', + 'periodValues' => '\SynergiTech\Staffology\Model\PeriodValuePeriodValues' ]; /** @@ -71,10 +71,10 @@ class PeriodValue implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'effectiveFrom' => 'date', 'annualValue' => 'double', - 'periodValues' => null, - 'midYearChanges' => null + 'effectiveFrom' => 'date', + 'midYearChanges' => null, + 'periodValues' => null ]; /** @@ -83,10 +83,10 @@ class PeriodValue implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'effectiveFrom' => true, 'annualValue' => false, - 'periodValues' => true, - 'midYearChanges' => true + 'effectiveFrom' => true, + 'midYearChanges' => true, + 'periodValues' => true ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'effectiveFrom' => 'effectiveFrom', 'annualValue' => 'annualValue', - 'periodValues' => 'periodValues', - 'midYearChanges' => 'midYearChanges' + 'effectiveFrom' => 'effectiveFrom', + 'midYearChanges' => 'midYearChanges', + 'periodValues' => 'periodValues' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'effectiveFrom' => 'setEffectiveFrom', 'annualValue' => 'setAnnualValue', - 'periodValues' => 'setPeriodValues', - 'midYearChanges' => 'setMidYearChanges' + 'effectiveFrom' => 'setEffectiveFrom', + 'midYearChanges' => 'setMidYearChanges', + 'periodValues' => 'setPeriodValues' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'effectiveFrom' => 'getEffectiveFrom', 'annualValue' => 'getAnnualValue', - 'periodValues' => 'getPeriodValues', - 'midYearChanges' => 'getMidYearChanges' + 'effectiveFrom' => 'getEffectiveFrom', + 'midYearChanges' => 'getMidYearChanges', + 'periodValues' => 'getPeriodValues' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('effectiveFrom', $data ?? [], null); $this->setIfExists('annualValue', $data ?? [], null); - $this->setIfExists('periodValues', $data ?? [], null); + $this->setIfExists('effectiveFrom', $data ?? [], null); $this->setIfExists('midYearChanges', $data ?? [], null); + $this->setIfExists('periodValues', $data ?? [], null); } /** @@ -309,6 +309,33 @@ public function valid(): bool } + /** + * Gets annualValue + * + * @return float|null + */ + public function getAnnualValue(): ?float + { + return $this->container['annualValue']; + } + + /** + * Sets annualValue + * + * @param float|null $annualValue The Annual value + * + * @return $this + */ + public function setAnnualValue(?float $annualValue): static + { + if (is_null($annualValue)) { + throw new InvalidArgumentException('non-nullable annualValue cannot be null'); + } + $this->container['annualValue'] = $annualValue; + + return $this; + } + /** * Gets effectiveFrom * @@ -344,28 +371,35 @@ public function setEffectiveFrom(?\DateTime $effectiveFrom): static } /** - * Gets annualValue + * Gets midYearChanges * - * @return float|null + * @return \SynergiTech\Staffology\Model\PeriodValue[]|null */ - public function getAnnualValue(): ?float + public function getMidYearChanges(): ?array { - return $this->container['annualValue']; + return $this->container['midYearChanges']; } /** - * Sets annualValue + * Sets midYearChanges * - * @param float|null $annualValue The Annual value + * @param \SynergiTech\Staffology\Model\PeriodValue[]|null $midYearChanges Any optional changes to the period values that are effective from a specified date in the middle of a tax year * * @return $this */ - public function setAnnualValue(?float $annualValue): static + public function setMidYearChanges(?array $midYearChanges): static { - if (is_null($annualValue)) { - throw new InvalidArgumentException('non-nullable annualValue cannot be null'); + if (is_null($midYearChanges)) { + array_push($this->openAPINullablesSetToNull, 'midYearChanges'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('midYearChanges', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['annualValue'] = $annualValue; + $this->container['midYearChanges'] = $midYearChanges; return $this; } @@ -403,40 +437,6 @@ public function setPeriodValues(?\SynergiTech\Staffology\Model\PeriodValuePeriod return $this; } - - /** - * Gets midYearChanges - * - * @return \SynergiTech\Staffology\Model\PeriodValue[]|null - */ - public function getMidYearChanges(): ?array - { - return $this->container['midYearChanges']; - } - - /** - * Sets midYearChanges - * - * @param \SynergiTech\Staffology\Model\PeriodValue[]|null $midYearChanges Any optional changes to the period values that are effective from a specified date in the middle of a tax year - * - * @return $this - */ - public function setMidYearChanges(?array $midYearChanges): static - { - if (is_null($midYearChanges)) { - array_push($this->openAPINullablesSetToNull, 'midYearChanges'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('midYearChanges', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['midYearChanges'] = $midYearChanges; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PeriodValuePeriodValues.php b/src/Model/PeriodValuePeriodValues.php index df2657a..316bc2d 100644 --- a/src/Model/PeriodValuePeriodValues.php +++ b/src/Model/PeriodValuePeriodValues.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -61,11 +61,11 @@ class PeriodValuePeriodValues implements ModelInterface, ArrayAccess, JsonSerial */ protected static array $openAPITypes = [ 'custom' => 'float', - 'monthly' => 'float', - 'fourWeekly' => 'float', + 'daily' => 'float', 'fortnightly' => 'float', - 'weekly' => 'float', - 'daily' => 'float' + 'fourWeekly' => 'float', + 'monthly' => 'float', + 'weekly' => 'float' ]; /** @@ -75,11 +75,11 @@ class PeriodValuePeriodValues implements ModelInterface, ArrayAccess, JsonSerial */ protected static array $openAPIFormats = [ 'custom' => 'double', - 'monthly' => 'double', - 'fourWeekly' => 'double', + 'daily' => 'double', 'fortnightly' => 'double', - 'weekly' => 'double', - 'daily' => 'double' + 'fourWeekly' => 'double', + 'monthly' => 'double', + 'weekly' => 'double' ]; /** @@ -89,11 +89,11 @@ class PeriodValuePeriodValues implements ModelInterface, ArrayAccess, JsonSerial */ protected static array $openAPINullables = [ 'custom' => false, - 'monthly' => false, - 'fourWeekly' => false, + 'daily' => false, 'fortnightly' => false, - 'weekly' => false, - 'daily' => false + 'fourWeekly' => false, + 'monthly' => false, + 'weekly' => false ]; /** @@ -183,11 +183,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'custom' => 'Custom', - 'monthly' => 'Monthly', - 'fourWeekly' => 'FourWeekly', + 'daily' => 'Daily', 'fortnightly' => 'Fortnightly', - 'weekly' => 'Weekly', - 'daily' => 'Daily' + 'fourWeekly' => 'FourWeekly', + 'monthly' => 'Monthly', + 'weekly' => 'Weekly' ]; /** @@ -197,11 +197,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'custom' => 'setCustom', - 'monthly' => 'setMonthly', - 'fourWeekly' => 'setFourWeekly', + 'daily' => 'setDaily', 'fortnightly' => 'setFortnightly', - 'weekly' => 'setWeekly', - 'daily' => 'setDaily' + 'fourWeekly' => 'setFourWeekly', + 'monthly' => 'setMonthly', + 'weekly' => 'setWeekly' ]; /** @@ -211,11 +211,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'custom' => 'getCustom', - 'monthly' => 'getMonthly', - 'fourWeekly' => 'getFourWeekly', + 'daily' => 'getDaily', 'fortnightly' => 'getFortnightly', - 'weekly' => 'getWeekly', - 'daily' => 'getDaily' + 'fourWeekly' => 'getFourWeekly', + 'monthly' => 'getMonthly', + 'weekly' => 'getWeekly' ]; /** @@ -275,11 +275,11 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('custom', $data ?? [], null); - $this->setIfExists('monthly', $data ?? [], null); - $this->setIfExists('fourWeekly', $data ?? [], null); + $this->setIfExists('daily', $data ?? [], null); $this->setIfExists('fortnightly', $data ?? [], null); + $this->setIfExists('fourWeekly', $data ?? [], null); + $this->setIfExists('monthly', $data ?? [], null); $this->setIfExists('weekly', $data ?? [], null); - $this->setIfExists('daily', $data ?? [], null); } /** @@ -352,136 +352,136 @@ public function setCustom(?float $custom): static } /** - * Gets monthly + * Gets daily * * @return float|null */ - public function getMonthly(): ?float + public function getDaily(): ?float { - return $this->container['monthly']; + return $this->container['daily']; } /** - * Sets monthly + * Sets daily * - * @param float|null $monthly monthly + * @param float|null $daily daily * * @return $this */ - public function setMonthly(?float $monthly): static + public function setDaily(?float $daily): static { - if (is_null($monthly)) { - throw new InvalidArgumentException('non-nullable monthly cannot be null'); + if (is_null($daily)) { + throw new InvalidArgumentException('non-nullable daily cannot be null'); } - $this->container['monthly'] = $monthly; + $this->container['daily'] = $daily; return $this; } /** - * Gets fourWeekly + * Gets fortnightly * * @return float|null */ - public function getFourWeekly(): ?float + public function getFortnightly(): ?float { - return $this->container['fourWeekly']; + return $this->container['fortnightly']; } /** - * Sets fourWeekly + * Sets fortnightly * - * @param float|null $fourWeekly fourWeekly + * @param float|null $fortnightly fortnightly * * @return $this */ - public function setFourWeekly(?float $fourWeekly): static + public function setFortnightly(?float $fortnightly): static { - if (is_null($fourWeekly)) { - throw new InvalidArgumentException('non-nullable fourWeekly cannot be null'); + if (is_null($fortnightly)) { + throw new InvalidArgumentException('non-nullable fortnightly cannot be null'); } - $this->container['fourWeekly'] = $fourWeekly; + $this->container['fortnightly'] = $fortnightly; return $this; } /** - * Gets fortnightly + * Gets fourWeekly * * @return float|null */ - public function getFortnightly(): ?float + public function getFourWeekly(): ?float { - return $this->container['fortnightly']; + return $this->container['fourWeekly']; } /** - * Sets fortnightly + * Sets fourWeekly * - * @param float|null $fortnightly fortnightly + * @param float|null $fourWeekly fourWeekly * * @return $this */ - public function setFortnightly(?float $fortnightly): static + public function setFourWeekly(?float $fourWeekly): static { - if (is_null($fortnightly)) { - throw new InvalidArgumentException('non-nullable fortnightly cannot be null'); + if (is_null($fourWeekly)) { + throw new InvalidArgumentException('non-nullable fourWeekly cannot be null'); } - $this->container['fortnightly'] = $fortnightly; + $this->container['fourWeekly'] = $fourWeekly; return $this; } /** - * Gets weekly + * Gets monthly * * @return float|null */ - public function getWeekly(): ?float + public function getMonthly(): ?float { - return $this->container['weekly']; + return $this->container['monthly']; } /** - * Sets weekly + * Sets monthly * - * @param float|null $weekly weekly + * @param float|null $monthly monthly * * @return $this */ - public function setWeekly(?float $weekly): static + public function setMonthly(?float $monthly): static { - if (is_null($weekly)) { - throw new InvalidArgumentException('non-nullable weekly cannot be null'); + if (is_null($monthly)) { + throw new InvalidArgumentException('non-nullable monthly cannot be null'); } - $this->container['weekly'] = $weekly; + $this->container['monthly'] = $monthly; return $this; } /** - * Gets daily + * Gets weekly * * @return float|null */ - public function getDaily(): ?float + public function getWeekly(): ?float { - return $this->container['daily']; + return $this->container['weekly']; } /** - * Sets daily + * Sets weekly * - * @param float|null $daily daily + * @param float|null $weekly weekly * * @return $this */ - public function setDaily(?float $daily): static + public function setWeekly(?float $weekly): static { - if (is_null($daily)) { - throw new InvalidArgumentException('non-nullable daily cannot be null'); + if (is_null($weekly)) { + throw new InvalidArgumentException('non-nullable weekly cannot be null'); } - $this->container['daily'] = $daily; + $this->container['weekly'] = $weekly; return $this; } diff --git a/src/Model/PersonalDetails.php b/src/Model/PersonalDetails.php index ffaf195..ec6d578 100644 --- a/src/Model/PersonalDetails.php +++ b/src/Model/PersonalDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,28 +60,28 @@ class PersonalDetails implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'address' => '\SynergiTech\Staffology\Model\Address', - 'maritalStatus' => '\SynergiTech\Staffology\Model\MaritalStatus', - 'title' => 'string', - 'firstName' => 'string', - 'middleName' => 'string', - 'lastName' => 'string', 'alternativeEmail' => 'string', - 'previousSurName' => 'string', + 'dateOfBirth' => '\DateTime', 'email' => 'string', 'emailPayslip' => 'bool', - 'pdfPassword' => 'string', - 'pdfPasswordType' => '\SynergiTech\Staffology\Model\PdfPasswordType', 'emailStatement' => 'bool', - 'photoUrl' => 'string', - 'photoSasUrl' => 'string', - 'telephone' => 'string', - 'mobile' => 'string', - 'dateOfBirth' => '\DateTime', - 'statePensionAge' => 'int', + 'firstName' => 'string', 'gender' => '\SynergiTech\Staffology\Model\Gender', + 'lastName' => 'string', + 'maritalStatus' => '\SynergiTech\Staffology\Model\MaritalStatus', + 'middleName' => 'string', + 'mobile' => 'string', 'niNumber' => 'string', + 'partnerDetails' => '\SynergiTech\Staffology\Model\PartnerDetails', 'passportNumber' => 'string', - 'partnerDetails' => '\SynergiTech\Staffology\Model\PartnerDetails' + 'pdfPassword' => 'string', + 'pdfPasswordType' => '\SynergiTech\Staffology\Model\PdfPasswordType', + 'photoSasUrl' => 'string', + 'photoUrl' => 'string', + 'previousSurName' => 'string', + 'statePensionAge' => 'int', + 'telephone' => 'string', + 'title' => 'string' ]; /** @@ -91,28 +91,28 @@ class PersonalDetails implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'address' => null, - 'maritalStatus' => null, - 'title' => null, - 'firstName' => null, - 'middleName' => null, - 'lastName' => null, 'alternativeEmail' => 'email', - 'previousSurName' => null, + 'dateOfBirth' => 'date', 'email' => 'email', 'emailPayslip' => null, - 'pdfPassword' => null, - 'pdfPasswordType' => null, 'emailStatement' => null, - 'photoUrl' => null, - 'photoSasUrl' => null, - 'telephone' => null, - 'mobile' => null, - 'dateOfBirth' => 'date', - 'statePensionAge' => 'int32', + 'firstName' => null, 'gender' => null, + 'lastName' => null, + 'maritalStatus' => null, + 'middleName' => null, + 'mobile' => null, 'niNumber' => null, + 'partnerDetails' => null, 'passportNumber' => null, - 'partnerDetails' => null + 'pdfPassword' => null, + 'pdfPasswordType' => null, + 'photoSasUrl' => null, + 'photoUrl' => null, + 'previousSurName' => null, + 'statePensionAge' => 'int32', + 'telephone' => null, + 'title' => null ]; /** @@ -122,28 +122,28 @@ class PersonalDetails implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'address' => false, - 'maritalStatus' => false, - 'title' => true, - 'firstName' => true, - 'middleName' => true, - 'lastName' => true, 'alternativeEmail' => true, - 'previousSurName' => true, + 'dateOfBirth' => false, 'email' => true, 'emailPayslip' => false, - 'pdfPassword' => true, - 'pdfPasswordType' => false, 'emailStatement' => false, - 'photoUrl' => true, - 'photoSasUrl' => true, - 'telephone' => true, - 'mobile' => true, - 'dateOfBirth' => false, - 'statePensionAge' => false, + 'firstName' => true, 'gender' => false, + 'lastName' => true, + 'maritalStatus' => false, + 'middleName' => true, + 'mobile' => true, 'niNumber' => true, + 'partnerDetails' => false, 'passportNumber' => true, - 'partnerDetails' => false + 'pdfPassword' => true, + 'pdfPasswordType' => false, + 'photoSasUrl' => true, + 'photoUrl' => true, + 'previousSurName' => true, + 'statePensionAge' => false, + 'telephone' => true, + 'title' => true ]; /** @@ -233,28 +233,28 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'address' => 'address', - 'maritalStatus' => 'maritalStatus', - 'title' => 'title', - 'firstName' => 'firstName', - 'middleName' => 'middleName', - 'lastName' => 'lastName', 'alternativeEmail' => 'alternativeEmail', - 'previousSurName' => 'previousSurName', + 'dateOfBirth' => 'dateOfBirth', 'email' => 'email', 'emailPayslip' => 'emailPayslip', - 'pdfPassword' => 'pdfPassword', - 'pdfPasswordType' => 'pdfPasswordType', 'emailStatement' => 'emailStatement', - 'photoUrl' => 'photoUrl', - 'photoSasUrl' => 'photoSasUrl', - 'telephone' => 'telephone', - 'mobile' => 'mobile', - 'dateOfBirth' => 'dateOfBirth', - 'statePensionAge' => 'statePensionAge', + 'firstName' => 'firstName', 'gender' => 'gender', + 'lastName' => 'lastName', + 'maritalStatus' => 'maritalStatus', + 'middleName' => 'middleName', + 'mobile' => 'mobile', 'niNumber' => 'niNumber', + 'partnerDetails' => 'partnerDetails', 'passportNumber' => 'passportNumber', - 'partnerDetails' => 'partnerDetails' + 'pdfPassword' => 'pdfPassword', + 'pdfPasswordType' => 'pdfPasswordType', + 'photoSasUrl' => 'photoSasUrl', + 'photoUrl' => 'photoUrl', + 'previousSurName' => 'previousSurName', + 'statePensionAge' => 'statePensionAge', + 'telephone' => 'telephone', + 'title' => 'title' ]; /** @@ -264,28 +264,28 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'address' => 'setAddress', - 'maritalStatus' => 'setMaritalStatus', - 'title' => 'setTitle', - 'firstName' => 'setFirstName', - 'middleName' => 'setMiddleName', - 'lastName' => 'setLastName', 'alternativeEmail' => 'setAlternativeEmail', - 'previousSurName' => 'setPreviousSurName', + 'dateOfBirth' => 'setDateOfBirth', 'email' => 'setEmail', 'emailPayslip' => 'setEmailPayslip', - 'pdfPassword' => 'setPdfPassword', - 'pdfPasswordType' => 'setPdfPasswordType', 'emailStatement' => 'setEmailStatement', - 'photoUrl' => 'setPhotoUrl', - 'photoSasUrl' => 'setPhotoSasUrl', - 'telephone' => 'setTelephone', - 'mobile' => 'setMobile', - 'dateOfBirth' => 'setDateOfBirth', - 'statePensionAge' => 'setStatePensionAge', + 'firstName' => 'setFirstName', 'gender' => 'setGender', + 'lastName' => 'setLastName', + 'maritalStatus' => 'setMaritalStatus', + 'middleName' => 'setMiddleName', + 'mobile' => 'setMobile', 'niNumber' => 'setNiNumber', + 'partnerDetails' => 'setPartnerDetails', 'passportNumber' => 'setPassportNumber', - 'partnerDetails' => 'setPartnerDetails' + 'pdfPassword' => 'setPdfPassword', + 'pdfPasswordType' => 'setPdfPasswordType', + 'photoSasUrl' => 'setPhotoSasUrl', + 'photoUrl' => 'setPhotoUrl', + 'previousSurName' => 'setPreviousSurName', + 'statePensionAge' => 'setStatePensionAge', + 'telephone' => 'setTelephone', + 'title' => 'setTitle' ]; /** @@ -295,28 +295,28 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'address' => 'getAddress', - 'maritalStatus' => 'getMaritalStatus', - 'title' => 'getTitle', - 'firstName' => 'getFirstName', - 'middleName' => 'getMiddleName', - 'lastName' => 'getLastName', 'alternativeEmail' => 'getAlternativeEmail', - 'previousSurName' => 'getPreviousSurName', + 'dateOfBirth' => 'getDateOfBirth', 'email' => 'getEmail', 'emailPayslip' => 'getEmailPayslip', - 'pdfPassword' => 'getPdfPassword', - 'pdfPasswordType' => 'getPdfPasswordType', 'emailStatement' => 'getEmailStatement', - 'photoUrl' => 'getPhotoUrl', - 'photoSasUrl' => 'getPhotoSasUrl', - 'telephone' => 'getTelephone', - 'mobile' => 'getMobile', - 'dateOfBirth' => 'getDateOfBirth', - 'statePensionAge' => 'getStatePensionAge', + 'firstName' => 'getFirstName', 'gender' => 'getGender', + 'lastName' => 'getLastName', + 'maritalStatus' => 'getMaritalStatus', + 'middleName' => 'getMiddleName', + 'mobile' => 'getMobile', 'niNumber' => 'getNiNumber', + 'partnerDetails' => 'getPartnerDetails', 'passportNumber' => 'getPassportNumber', - 'partnerDetails' => 'getPartnerDetails' + 'pdfPassword' => 'getPdfPassword', + 'pdfPasswordType' => 'getPdfPasswordType', + 'photoSasUrl' => 'getPhotoSasUrl', + 'photoUrl' => 'getPhotoUrl', + 'previousSurName' => 'getPreviousSurName', + 'statePensionAge' => 'getStatePensionAge', + 'telephone' => 'getTelephone', + 'title' => 'getTitle' ]; /** @@ -376,28 +376,28 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('address', $data ?? [], null); - $this->setIfExists('maritalStatus', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('firstName', $data ?? [], null); - $this->setIfExists('middleName', $data ?? [], null); - $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('alternativeEmail', $data ?? [], null); - $this->setIfExists('previousSurName', $data ?? [], null); + $this->setIfExists('dateOfBirth', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('emailPayslip', $data ?? [], null); - $this->setIfExists('pdfPassword', $data ?? [], null); - $this->setIfExists('pdfPasswordType', $data ?? [], null); $this->setIfExists('emailStatement', $data ?? [], null); - $this->setIfExists('photoUrl', $data ?? [], null); - $this->setIfExists('photoSasUrl', $data ?? [], null); - $this->setIfExists('telephone', $data ?? [], null); - $this->setIfExists('mobile', $data ?? [], null); - $this->setIfExists('dateOfBirth', $data ?? [], null); - $this->setIfExists('statePensionAge', $data ?? [], null); + $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('gender', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('maritalStatus', $data ?? [], null); + $this->setIfExists('middleName', $data ?? [], null); + $this->setIfExists('mobile', $data ?? [], null); $this->setIfExists('niNumber', $data ?? [], null); - $this->setIfExists('passportNumber', $data ?? [], null); $this->setIfExists('partnerDetails', $data ?? [], null); + $this->setIfExists('passportNumber', $data ?? [], null); + $this->setIfExists('pdfPassword', $data ?? [], null); + $this->setIfExists('pdfPasswordType', $data ?? [], null); + $this->setIfExists('photoSasUrl', $data ?? [], null); + $this->setIfExists('photoUrl', $data ?? [], null); + $this->setIfExists('previousSurName', $data ?? [], null); + $this->setIfExists('statePensionAge', $data ?? [], null); + $this->setIfExists('telephone', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -427,61 +427,61 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['maritalStatus'] === null) { - $invalidProperties[] = "'maritalStatus' can't be null"; + if (!is_null($this->container['alternativeEmail']) && (mb_strlen($this->container['alternativeEmail']) > 100)) { + $invalidProperties[] = "invalid value for 'alternativeEmail', the character length must be smaller than or equal to 100."; } - if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 30)) { - $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 30."; + + if ($this->container['dateOfBirth'] === null) { + $invalidProperties[] = "'dateOfBirth' can't be null"; + } + if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) > 100)) { + $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 100."; } if (!is_null($this->container['firstName']) && (mb_strlen($this->container['firstName']) > 35)) { $invalidProperties[] = "invalid value for 'firstName', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['middleName']) && (mb_strlen($this->container['middleName']) > 35)) { - $invalidProperties[] = "invalid value for 'middleName', the character length must be smaller than or equal to 35."; + if ($this->container['gender'] === null) { + $invalidProperties[] = "'gender' can't be null"; } - if (!is_null($this->container['lastName']) && (mb_strlen($this->container['lastName']) > 35)) { $invalidProperties[] = "invalid value for 'lastName', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['alternativeEmail']) && (mb_strlen($this->container['alternativeEmail']) > 100)) { - $invalidProperties[] = "invalid value for 'alternativeEmail', the character length must be smaller than or equal to 100."; + if ($this->container['maritalStatus'] === null) { + $invalidProperties[] = "'maritalStatus' can't be null"; } - - if (!is_null($this->container['previousSurName']) && (mb_strlen($this->container['previousSurName']) > 35)) { - $invalidProperties[] = "invalid value for 'previousSurName', the character length must be smaller than or equal to 35."; + if (!is_null($this->container['middleName']) && (mb_strlen($this->container['middleName']) > 35)) { + $invalidProperties[] = "invalid value for 'middleName', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) > 100)) { - $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 100."; + if (!is_null($this->container['mobile']) && (mb_strlen($this->container['mobile']) > 30)) { + $invalidProperties[] = "invalid value for 'mobile', the character length must be smaller than or equal to 30."; } - if (!is_null($this->container['photoUrl']) && (mb_strlen($this->container['photoUrl']) > 250)) { - $invalidProperties[] = "invalid value for 'photoUrl', the character length must be smaller than or equal to 250."; + if (!is_null($this->container['niNumber']) && (mb_strlen($this->container['niNumber']) > 15)) { + $invalidProperties[] = "invalid value for 'niNumber', the character length must be smaller than or equal to 15."; } - if (!is_null($this->container['telephone']) && (mb_strlen($this->container['telephone']) > 30)) { - $invalidProperties[] = "invalid value for 'telephone', the character length must be smaller than or equal to 30."; + if (!is_null($this->container['passportNumber']) && (mb_strlen($this->container['passportNumber']) > 25)) { + $invalidProperties[] = "invalid value for 'passportNumber', the character length must be smaller than or equal to 25."; } - if (!is_null($this->container['mobile']) && (mb_strlen($this->container['mobile']) > 30)) { - $invalidProperties[] = "invalid value for 'mobile', the character length must be smaller than or equal to 30."; + if (!is_null($this->container['photoUrl']) && (mb_strlen($this->container['photoUrl']) > 250)) { + $invalidProperties[] = "invalid value for 'photoUrl', the character length must be smaller than or equal to 250."; } - if ($this->container['dateOfBirth'] === null) { - $invalidProperties[] = "'dateOfBirth' can't be null"; - } - if ($this->container['gender'] === null) { - $invalidProperties[] = "'gender' can't be null"; + if (!is_null($this->container['previousSurName']) && (mb_strlen($this->container['previousSurName']) > 35)) { + $invalidProperties[] = "invalid value for 'previousSurName', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['niNumber']) && (mb_strlen($this->container['niNumber']) > 15)) { - $invalidProperties[] = "invalid value for 'niNumber', the character length must be smaller than or equal to 15."; + + if (!is_null($this->container['telephone']) && (mb_strlen($this->container['telephone']) > 30)) { + $invalidProperties[] = "invalid value for 'telephone', the character length must be smaller than or equal to 30."; } - if (!is_null($this->container['passportNumber']) && (mb_strlen($this->container['passportNumber']) > 25)) { - $invalidProperties[] = "invalid value for 'passportNumber', the character length must be smaller than or equal to 25."; + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 30)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 30."; } return $invalidProperties; @@ -527,66 +527,158 @@ public function setAddress(?\SynergiTech\Staffology\Model\Address $address): sta } /** - * Gets maritalStatus + * Gets alternativeEmail * - * @return \SynergiTech\Staffology\Model\MaritalStatus + * @return string|null */ - public function getMaritalStatus(): \SynergiTech\Staffology\Model\MaritalStatus + public function getAlternativeEmail(): ?string { - return $this->container['maritalStatus']; + return $this->container['alternativeEmail']; } /** - * Sets maritalStatus + * Sets alternativeEmail * - * @param \SynergiTech\Staffology\Model\MaritalStatus $maritalStatus maritalStatus + * @param string|null $alternativeEmail alternativeEmail * * @return $this */ - public function setMaritalStatus(\SynergiTech\Staffology\Model\MaritalStatus $maritalStatus): static + public function setAlternativeEmail(?string $alternativeEmail): static { - if (is_null($maritalStatus)) { - throw new InvalidArgumentException('non-nullable maritalStatus cannot be null'); + if (is_null($alternativeEmail)) { + array_push($this->openAPINullablesSetToNull, 'alternativeEmail'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('alternativeEmail', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['maritalStatus'] = $maritalStatus; + if (!is_null($alternativeEmail) && (mb_strlen($alternativeEmail) > 100)) { + throw new InvalidArgumentException('invalid length for $alternativeEmail when calling PersonalDetails., must be smaller than or equal to 100.'); + } + + $this->container['alternativeEmail'] = $alternativeEmail; return $this; } /** - * Gets title + * Gets dateOfBirth + * + * @return \DateTime + */ + public function getDateOfBirth(): \DateTime + { + return $this->container['dateOfBirth']; + } + + /** + * Sets dateOfBirth + * + * @param \DateTime $dateOfBirth dateOfBirth + * + * @return $this + */ + public function setDateOfBirth(\DateTime $dateOfBirth): static + { + if (is_null($dateOfBirth)) { + throw new InvalidArgumentException('non-nullable dateOfBirth cannot be null'); + } + $this->container['dateOfBirth'] = $dateOfBirth; + + return $this; + } + + /** + * Gets email * * @return string|null */ - public function getTitle(): ?string + public function getEmail(): ?string { - return $this->container['title']; + return $this->container['email']; } /** - * Sets title + * Sets email * - * @param string|null $title title + * @param string|null $email email * * @return $this */ - public function setTitle(?string $title): static + public function setEmail(?string $email): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); + if (is_null($email)) { + array_push($this->openAPINullablesSetToNull, 'email'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); + $index = array_search('email', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($title) && (mb_strlen($title) > 30)) { - throw new InvalidArgumentException('invalid length for $title when calling PersonalDetails., must be smaller than or equal to 30.'); + if (!is_null($email) && (mb_strlen($email) > 100)) { + throw new InvalidArgumentException('invalid length for $email when calling PersonalDetails., must be smaller than or equal to 100.'); } - $this->container['title'] = $title; + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets emailPayslip + * + * @return bool|null + */ + public function getEmailPayslip(): ?bool + { + return $this->container['emailPayslip']; + } + + /** + * Sets emailPayslip + * + * @param bool|null $emailPayslip If set to true then the employees Payslip will be sent by email when a PayRun is finalised. + * + * @return $this + */ + public function setEmailPayslip(?bool $emailPayslip): static + { + if (is_null($emailPayslip)) { + throw new InvalidArgumentException('non-nullable emailPayslip cannot be null'); + } + $this->container['emailPayslip'] = $emailPayslip; + + return $this; + } + + /** + * Gets emailStatement + * + * @return bool|null + */ + public function getEmailStatement(): ?bool + { + return $this->container['emailStatement']; + } + + /** + * Sets emailStatement + * + * @param bool|null $emailStatement Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted. + * + * @return $this + */ + public function setEmailStatement(?bool $emailStatement): static + { + if (is_null($emailStatement)) { + throw new InvalidArgumentException('non-nullable emailStatement cannot be null'); + } + $this->container['emailStatement'] = $emailStatement; return $this; } @@ -630,39 +722,28 @@ public function setFirstName(?string $firstName): static } /** - * Gets middleName + * Gets gender * - * @return string|null + * @return \SynergiTech\Staffology\Model\Gender */ - public function getMiddleName(): ?string + public function getGender(): \SynergiTech\Staffology\Model\Gender { - return $this->container['middleName']; + return $this->container['gender']; } /** - * Sets middleName + * Sets gender * - * @param string|null $middleName middleName + * @param \SynergiTech\Staffology\Model\Gender $gender gender * * @return $this */ - public function setMiddleName(?string $middleName): static + public function setGender(\SynergiTech\Staffology\Model\Gender $gender): static { - if (is_null($middleName)) { - array_push($this->openAPINullablesSetToNull, 'middleName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('middleName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($middleName) && (mb_strlen($middleName) > 35)) { - throw new InvalidArgumentException('invalid length for $middleName when calling PersonalDetails., must be smaller than or equal to 35.'); + if (is_null($gender)) { + throw new InvalidArgumentException('non-nullable gender cannot be null'); } - - $this->container['middleName'] = $middleName; + $this->container['gender'] = $gender; return $this; } @@ -706,142 +787,207 @@ public function setLastName(?string $lastName): static } /** - * Gets alternativeEmail + * Gets maritalStatus + * + * @return \SynergiTech\Staffology\Model\MaritalStatus + */ + public function getMaritalStatus(): \SynergiTech\Staffology\Model\MaritalStatus + { + return $this->container['maritalStatus']; + } + + /** + * Sets maritalStatus + * + * @param \SynergiTech\Staffology\Model\MaritalStatus $maritalStatus maritalStatus + * + * @return $this + */ + public function setMaritalStatus(\SynergiTech\Staffology\Model\MaritalStatus $maritalStatus): static + { + if (is_null($maritalStatus)) { + throw new InvalidArgumentException('non-nullable maritalStatus cannot be null'); + } + $this->container['maritalStatus'] = $maritalStatus; + + return $this; + } + + /** + * Gets middleName * * @return string|null */ - public function getAlternativeEmail(): ?string + public function getMiddleName(): ?string { - return $this->container['alternativeEmail']; + return $this->container['middleName']; } /** - * Sets alternativeEmail + * Sets middleName * - * @param string|null $alternativeEmail alternativeEmail + * @param string|null $middleName middleName * * @return $this */ - public function setAlternativeEmail(?string $alternativeEmail): static + public function setMiddleName(?string $middleName): static { - if (is_null($alternativeEmail)) { - array_push($this->openAPINullablesSetToNull, 'alternativeEmail'); + if (is_null($middleName)) { + array_push($this->openAPINullablesSetToNull, 'middleName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('alternativeEmail', $nullablesSetToNull); + $index = array_search('middleName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($alternativeEmail) && (mb_strlen($alternativeEmail) > 100)) { - throw new InvalidArgumentException('invalid length for $alternativeEmail when calling PersonalDetails., must be smaller than or equal to 100.'); + if (!is_null($middleName) && (mb_strlen($middleName) > 35)) { + throw new InvalidArgumentException('invalid length for $middleName when calling PersonalDetails., must be smaller than or equal to 35.'); } - $this->container['alternativeEmail'] = $alternativeEmail; + $this->container['middleName'] = $middleName; return $this; } /** - * Gets previousSurName + * Gets mobile * * @return string|null */ - public function getPreviousSurName(): ?string + public function getMobile(): ?string { - return $this->container['previousSurName']; + return $this->container['mobile']; } /** - * Sets previousSurName + * Sets mobile * - * @param string|null $previousSurName previousSurName + * @param string|null $mobile mobile * * @return $this */ - public function setPreviousSurName(?string $previousSurName): static + public function setMobile(?string $mobile): static { - if (is_null($previousSurName)) { - array_push($this->openAPINullablesSetToNull, 'previousSurName'); + if (is_null($mobile)) { + array_push($this->openAPINullablesSetToNull, 'mobile'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('previousSurName', $nullablesSetToNull); + $index = array_search('mobile', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($previousSurName) && (mb_strlen($previousSurName) > 35)) { - throw new InvalidArgumentException('invalid length for $previousSurName when calling PersonalDetails., must be smaller than or equal to 35.'); + if (!is_null($mobile) && (mb_strlen($mobile) > 30)) { + throw new InvalidArgumentException('invalid length for $mobile when calling PersonalDetails., must be smaller than or equal to 30.'); } - $this->container['previousSurName'] = $previousSurName; + $this->container['mobile'] = $mobile; return $this; } /** - * Gets email + * Gets niNumber * * @return string|null */ - public function getEmail(): ?string + public function getNiNumber(): ?string { - return $this->container['email']; + return $this->container['niNumber']; } /** - * Sets email + * Sets niNumber * - * @param string|null $email email + * @param string|null $niNumber niNumber * * @return $this */ - public function setEmail(?string $email): static + public function setNiNumber(?string $niNumber): static { - if (is_null($email)) { - array_push($this->openAPINullablesSetToNull, 'email'); + if (is_null($niNumber)) { + array_push($this->openAPINullablesSetToNull, 'niNumber'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('email', $nullablesSetToNull); + $index = array_search('niNumber', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($email) && (mb_strlen($email) > 100)) { - throw new InvalidArgumentException('invalid length for $email when calling PersonalDetails., must be smaller than or equal to 100.'); + if (!is_null($niNumber) && (mb_strlen($niNumber) > 15)) { + throw new InvalidArgumentException('invalid length for $niNumber when calling PersonalDetails., must be smaller than or equal to 15.'); } - $this->container['email'] = $email; + $this->container['niNumber'] = $niNumber; return $this; } /** - * Gets emailPayslip + * Gets partnerDetails * - * @return bool|null + * @return \SynergiTech\Staffology\Model\PartnerDetails|null */ - public function getEmailPayslip(): ?bool + public function getPartnerDetails(): ?\SynergiTech\Staffology\Model\PartnerDetails { - return $this->container['emailPayslip']; + return $this->container['partnerDetails']; } /** - * Sets emailPayslip + * Sets partnerDetails * - * @param bool|null $emailPayslip If set to true then the employees Payslip will be sent by email when a PayRun is finalised. + * @param \SynergiTech\Staffology\Model\PartnerDetails|null $partnerDetails partnerDetails * * @return $this */ - public function setEmailPayslip(?bool $emailPayslip): static + public function setPartnerDetails(?\SynergiTech\Staffology\Model\PartnerDetails $partnerDetails): static { - if (is_null($emailPayslip)) { - throw new InvalidArgumentException('non-nullable emailPayslip cannot be null'); + if (is_null($partnerDetails)) { + throw new InvalidArgumentException('non-nullable partnerDetails cannot be null'); + } + $this->container['partnerDetails'] = $partnerDetails; + + return $this; + } + + /** + * Gets passportNumber + * + * @return string|null + */ + public function getPassportNumber(): ?string + { + return $this->container['passportNumber']; + } + + /** + * Sets passportNumber + * + * @param string|null $passportNumber passportNumber + * + * @return $this + */ + public function setPassportNumber(?string $passportNumber): static + { + if (is_null($passportNumber)) { + array_push($this->openAPINullablesSetToNull, 'passportNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('passportNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($passportNumber) && (mb_strlen($passportNumber) > 25)) { + throw new InvalidArgumentException('invalid length for $passportNumber when calling PersonalDetails., must be smaller than or equal to 25.'); } - $this->container['emailPayslip'] = $emailPayslip; + + $this->container['passportNumber'] = $passportNumber; return $this; } @@ -907,71 +1053,6 @@ public function setPdfPasswordType(?\SynergiTech\Staffology\Model\PdfPasswordTyp return $this; } - /** - * Gets emailStatement - * - * @return bool|null - */ - public function getEmailStatement(): ?bool - { - return $this->container['emailStatement']; - } - - /** - * Sets emailStatement - * - * @param bool|null $emailStatement Only applicable to CIS Subcontractors. If set to true then we will automatically email a CIS Statement when a CIS300 is accepted. - * - * @return $this - */ - public function setEmailStatement(?bool $emailStatement): static - { - if (is_null($emailStatement)) { - throw new InvalidArgumentException('non-nullable emailStatement cannot be null'); - } - $this->container['emailStatement'] = $emailStatement; - - return $this; - } - - /** - * Gets photoUrl - * - * @return string|null - */ - public function getPhotoUrl(): ?string - { - return $this->container['photoUrl']; - } - - /** - * Sets photoUrl - * - * @param string|null $photoUrl photoUrl - * - * @return $this - */ - public function setPhotoUrl(?string $photoUrl): static - { - if (is_null($photoUrl)) { - array_push($this->openAPINullablesSetToNull, 'photoUrl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('photoUrl', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($photoUrl) && (mb_strlen($photoUrl) > 250)) { - throw new InvalidArgumentException('invalid length for $photoUrl when calling PersonalDetails., must be smaller than or equal to 250.'); - } - - $this->container['photoUrl'] = $photoUrl; - - return $this; - } - /** * Gets photoSasUrl * @@ -1007,104 +1088,77 @@ public function setPhotoSasUrl(?string $photoSasUrl): static } /** - * Gets telephone + * Gets photoUrl * * @return string|null */ - public function getTelephone(): ?string + public function getPhotoUrl(): ?string { - return $this->container['telephone']; + return $this->container['photoUrl']; } /** - * Sets telephone + * Sets photoUrl * - * @param string|null $telephone telephone + * @param string|null $photoUrl photoUrl * * @return $this */ - public function setTelephone(?string $telephone): static + public function setPhotoUrl(?string $photoUrl): static { - if (is_null($telephone)) { - array_push($this->openAPINullablesSetToNull, 'telephone'); + if (is_null($photoUrl)) { + array_push($this->openAPINullablesSetToNull, 'photoUrl'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('telephone', $nullablesSetToNull); + $index = array_search('photoUrl', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($telephone) && (mb_strlen($telephone) > 30)) { - throw new InvalidArgumentException('invalid length for $telephone when calling PersonalDetails., must be smaller than or equal to 30.'); + if (!is_null($photoUrl) && (mb_strlen($photoUrl) > 250)) { + throw new InvalidArgumentException('invalid length for $photoUrl when calling PersonalDetails., must be smaller than or equal to 250.'); } - $this->container['telephone'] = $telephone; + $this->container['photoUrl'] = $photoUrl; return $this; } /** - * Gets mobile + * Gets previousSurName * * @return string|null */ - public function getMobile(): ?string + public function getPreviousSurName(): ?string { - return $this->container['mobile']; + return $this->container['previousSurName']; } /** - * Sets mobile + * Sets previousSurName * - * @param string|null $mobile mobile + * @param string|null $previousSurName previousSurName * * @return $this */ - public function setMobile(?string $mobile): static + public function setPreviousSurName(?string $previousSurName): static { - if (is_null($mobile)) { - array_push($this->openAPINullablesSetToNull, 'mobile'); + if (is_null($previousSurName)) { + array_push($this->openAPINullablesSetToNull, 'previousSurName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mobile', $nullablesSetToNull); + $index = array_search('previousSurName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($mobile) && (mb_strlen($mobile) > 30)) { - throw new InvalidArgumentException('invalid length for $mobile when calling PersonalDetails., must be smaller than or equal to 30.'); + if (!is_null($previousSurName) && (mb_strlen($previousSurName) > 35)) { + throw new InvalidArgumentException('invalid length for $previousSurName when calling PersonalDetails., must be smaller than or equal to 35.'); } - $this->container['mobile'] = $mobile; - - return $this; - } - - /** - * Gets dateOfBirth - * - * @return \DateTime - */ - public function getDateOfBirth(): \DateTime - { - return $this->container['dateOfBirth']; - } - - /** - * Sets dateOfBirth - * - * @param \DateTime $dateOfBirth dateOfBirth - * - * @return $this - */ - public function setDateOfBirth(\DateTime $dateOfBirth): static - { - if (is_null($dateOfBirth)) { - throw new InvalidArgumentException('non-nullable dateOfBirth cannot be null'); - } - $this->container['dateOfBirth'] = $dateOfBirth; + $this->container['previousSurName'] = $previousSurName; return $this; } @@ -1137,131 +1191,77 @@ public function setStatePensionAge(?int $statePensionAge): static } /** - * Gets gender - * - * @return \SynergiTech\Staffology\Model\Gender - */ - public function getGender(): \SynergiTech\Staffology\Model\Gender - { - return $this->container['gender']; - } - - /** - * Sets gender - * - * @param \SynergiTech\Staffology\Model\Gender $gender gender - * - * @return $this - */ - public function setGender(\SynergiTech\Staffology\Model\Gender $gender): static - { - if (is_null($gender)) { - throw new InvalidArgumentException('non-nullable gender cannot be null'); - } - $this->container['gender'] = $gender; - - return $this; - } - - /** - * Gets niNumber + * Gets telephone * * @return string|null */ - public function getNiNumber(): ?string + public function getTelephone(): ?string { - return $this->container['niNumber']; + return $this->container['telephone']; } /** - * Sets niNumber + * Sets telephone * - * @param string|null $niNumber niNumber + * @param string|null $telephone telephone * * @return $this */ - public function setNiNumber(?string $niNumber): static + public function setTelephone(?string $telephone): static { - if (is_null($niNumber)) { - array_push($this->openAPINullablesSetToNull, 'niNumber'); + if (is_null($telephone)) { + array_push($this->openAPINullablesSetToNull, 'telephone'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niNumber', $nullablesSetToNull); + $index = array_search('telephone', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($niNumber) && (mb_strlen($niNumber) > 15)) { - throw new InvalidArgumentException('invalid length for $niNumber when calling PersonalDetails., must be smaller than or equal to 15.'); + if (!is_null($telephone) && (mb_strlen($telephone) > 30)) { + throw new InvalidArgumentException('invalid length for $telephone when calling PersonalDetails., must be smaller than or equal to 30.'); } - $this->container['niNumber'] = $niNumber; + $this->container['telephone'] = $telephone; return $this; } /** - * Gets passportNumber + * Gets title * * @return string|null */ - public function getPassportNumber(): ?string + public function getTitle(): ?string { - return $this->container['passportNumber']; + return $this->container['title']; } /** - * Sets passportNumber + * Sets title * - * @param string|null $passportNumber passportNumber + * @param string|null $title title * * @return $this */ - public function setPassportNumber(?string $passportNumber): static + public function setTitle(?string $title): static { - if (is_null($passportNumber)) { - array_push($this->openAPINullablesSetToNull, 'passportNumber'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('passportNumber', $nullablesSetToNull); + $index = array_search('title', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($passportNumber) && (mb_strlen($passportNumber) > 25)) { - throw new InvalidArgumentException('invalid length for $passportNumber when calling PersonalDetails., must be smaller than or equal to 25.'); + if (!is_null($title) && (mb_strlen($title) > 30)) { + throw new InvalidArgumentException('invalid length for $title when calling PersonalDetails., must be smaller than or equal to 30.'); } - $this->container['passportNumber'] = $passportNumber; - - return $this; - } - - /** - * Gets partnerDetails - * - * @return \SynergiTech\Staffology\Model\PartnerDetails|null - */ - public function getPartnerDetails(): ?\SynergiTech\Staffology\Model\PartnerDetails - { - return $this->container['partnerDetails']; - } - - /** - * Sets partnerDetails - * - * @param \SynergiTech\Staffology\Model\PartnerDetails|null $partnerDetails partnerDetails - * - * @return $this - */ - public function setPartnerDetails(?\SynergiTech\Staffology\Model\PartnerDetails $partnerDetails): static - { - if (is_null($partnerDetails)) { - throw new InvalidArgumentException('non-nullable partnerDetails cannot be null'); - } - $this->container['partnerDetails'] = $partnerDetails; + $this->container['title'] = $title; return $this; } diff --git a/src/Model/PricingBand.php b/src/Model/PricingBand.php index 9472736..08c8e9f 100644 --- a/src/Model/PricingBand.php +++ b/src/Model/PricingBand.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -61,9 +61,9 @@ class PricingBand implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPITypes = [ 'description' => 'string', 'from' => 'int', - 'to' => 'int', + 'id' => 'string', 'price' => 'float', - 'id' => 'string' + 'to' => 'int' ]; /** @@ -74,9 +74,9 @@ class PricingBand implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPIFormats = [ 'description' => null, 'from' => 'int32', - 'to' => 'int32', + 'id' => 'uuid', 'price' => 'double', - 'id' => 'uuid' + 'to' => 'int32' ]; /** @@ -87,9 +87,9 @@ class PricingBand implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPINullables = [ 'description' => true, 'from' => false, - 'to' => false, + 'id' => false, 'price' => false, - 'id' => false + 'to' => false ]; /** @@ -180,9 +180,9 @@ public function isNullableSetToNull(string $property): bool protected static array $attributeMap = [ 'description' => 'description', 'from' => 'from', - 'to' => 'to', + 'id' => 'id', 'price' => 'price', - 'id' => 'id' + 'to' => 'to' ]; /** @@ -193,9 +193,9 @@ public function isNullableSetToNull(string $property): bool protected static array $setters = [ 'description' => 'setDescription', 'from' => 'setFrom', - 'to' => 'setTo', + 'id' => 'setId', 'price' => 'setPrice', - 'id' => 'setId' + 'to' => 'setTo' ]; /** @@ -206,9 +206,9 @@ public function isNullableSetToNull(string $property): bool protected static array $getters = [ 'description' => 'getDescription', 'from' => 'getFrom', - 'to' => 'getTo', + 'id' => 'getId', 'price' => 'getPrice', - 'id' => 'getId' + 'to' => 'getTo' ]; /** @@ -269,9 +269,9 @@ public function __construct(?array $data = null) { $this->setIfExists('description', $data ?? [], null); $this->setIfExists('from', $data ?? [], null); - $this->setIfExists('to', $data ?? [], null); - $this->setIfExists('price', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('price', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); } /** @@ -378,28 +378,28 @@ public function setFrom(?int $from): static } /** - * Gets to + * Gets id * - * @return int|null + * @return string|null */ - public function getTo(): ?int + public function getId(): ?string { - return $this->container['to']; + return $this->container['id']; } /** - * Sets to + * Sets id * - * @param int|null $to to + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setTo(?int $to): static + public function setId(?string $id): static { - if (is_null($to)) { - throw new InvalidArgumentException('non-nullable to cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['to'] = $to; + $this->container['id'] = $id; return $this; } @@ -432,28 +432,28 @@ public function setPrice(?float $price): static } /** - * Gets id + * Gets to * - * @return string|null + * @return int|null */ - public function getId(): ?string + public function getTo(): ?int { - return $this->container['id']; + return $this->container['to']; } /** - * Sets id + * Sets to * - * @param string|null $id [readonly] The unique id of the object + * @param int|null $to to * * @return $this */ - public function setId(?string $id): static + public function setTo(?int $to): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); } - $this->container['id'] = $id; + $this->container['to'] = $to; return $this; } diff --git a/src/Model/PricingTable.php b/src/Model/PricingTable.php index b1c17aa..1ba8821 100644 --- a/src/Model/PricingTable.php +++ b/src/Model/PricingTable.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class PricingTable implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', - 'minimumCharge' => 'float', 'bands' => '\SynergiTech\Staffology\Model\PricingBand[]', + 'id' => 'string', 'isDefault' => 'bool', - 'netSuiteItemCode' => 'string', + 'minimumCharge' => 'float', + 'name' => 'string', 'netSuiteDescription' => 'string', - 'id' => 'string' + 'netSuiteItemCode' => 'string' ]; /** @@ -74,13 +74,13 @@ class PricingTable implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'name' => null, - 'minimumCharge' => 'double', 'bands' => null, + 'id' => 'uuid', 'isDefault' => null, - 'netSuiteItemCode' => null, + 'minimumCharge' => 'double', + 'name' => null, 'netSuiteDescription' => null, - 'id' => 'uuid' + 'netSuiteItemCode' => null ]; /** @@ -89,13 +89,13 @@ class PricingTable implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'name' => true, - 'minimumCharge' => false, 'bands' => true, + 'id' => false, 'isDefault' => false, - 'netSuiteItemCode' => true, + 'minimumCharge' => false, + 'name' => true, 'netSuiteDescription' => true, - 'id' => false + 'netSuiteItemCode' => true ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', - 'minimumCharge' => 'minimumCharge', 'bands' => 'bands', + 'id' => 'id', 'isDefault' => 'isDefault', - 'netSuiteItemCode' => 'netSuiteItemCode', + 'minimumCharge' => 'minimumCharge', + 'name' => 'name', 'netSuiteDescription' => 'netSuiteDescription', - 'id' => 'id' + 'netSuiteItemCode' => 'netSuiteItemCode' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', - 'minimumCharge' => 'setMinimumCharge', 'bands' => 'setBands', + 'id' => 'setId', 'isDefault' => 'setIsDefault', - 'netSuiteItemCode' => 'setNetSuiteItemCode', + 'minimumCharge' => 'setMinimumCharge', + 'name' => 'setName', 'netSuiteDescription' => 'setNetSuiteDescription', - 'id' => 'setId' + 'netSuiteItemCode' => 'setNetSuiteItemCode' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', - 'minimumCharge' => 'getMinimumCharge', 'bands' => 'getBands', + 'id' => 'getId', 'isDefault' => 'getIsDefault', - 'netSuiteItemCode' => 'getNetSuiteItemCode', + 'minimumCharge' => 'getMinimumCharge', + 'name' => 'getName', 'netSuiteDescription' => 'getNetSuiteDescription', - 'id' => 'getId' + 'netSuiteItemCode' => 'getNetSuiteItemCode' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('minimumCharge', $data ?? [], null); $this->setIfExists('bands', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('isDefault', $data ?? [], null); - $this->setIfExists('netSuiteItemCode', $data ?? [], null); + $this->setIfExists('minimumCharge', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('netSuiteDescription', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('netSuiteItemCode', $data ?? [], null); } /** @@ -319,14 +319,14 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 50."; } - if (!is_null($this->container['netSuiteItemCode']) && (mb_strlen($this->container['netSuiteItemCode']) > 20)) { - $invalidProperties[] = "invalid value for 'netSuiteItemCode', the character length must be smaller than or equal to 20."; - } - if (!is_null($this->container['netSuiteDescription']) && (mb_strlen($this->container['netSuiteDescription']) > 40)) { $invalidProperties[] = "invalid value for 'netSuiteDescription', the character length must be smaller than or equal to 40."; } + if (!is_null($this->container['netSuiteItemCode']) && (mb_strlen($this->container['netSuiteItemCode']) > 20)) { + $invalidProperties[] = "invalid value for 'netSuiteItemCode', the character length must be smaller than or equal to 20."; + } + return $invalidProperties; } @@ -343,165 +343,154 @@ public function valid(): bool /** - * Gets name + * Gets bands * - * @return string|null + * @return \SynergiTech\Staffology\Model\PricingBand[]|null */ - public function getName(): ?string + public function getBands(): ?array { - return $this->container['name']; + return $this->container['bands']; } /** - * Sets name + * Sets bands * - * @param string|null $name name + * @param \SynergiTech\Staffology\Model\PricingBand[]|null $bands bands * * @return $this */ - public function setName(?string $name): static + public function setBands(?array $bands): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($bands)) { + array_push($this->openAPINullablesSetToNull, 'bands'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('bands', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($name) && (mb_strlen($name) > 50)) { - throw new InvalidArgumentException('invalid length for $name when calling PricingTable., must be smaller than or equal to 50.'); - } - - $this->container['name'] = $name; + $this->container['bands'] = $bands; return $this; } /** - * Gets minimumCharge + * Gets id * - * @return float|null + * @return string|null */ - public function getMinimumCharge(): ?float + public function getId(): ?string { - return $this->container['minimumCharge']; + return $this->container['id']; } /** - * Sets minimumCharge + * Sets id * - * @param float|null $minimumCharge minimumCharge + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setMinimumCharge(?float $minimumCharge): static + public function setId(?string $id): static { - if (is_null($minimumCharge)) { - throw new InvalidArgumentException('non-nullable minimumCharge cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['minimumCharge'] = $minimumCharge; + $this->container['id'] = $id; return $this; } /** - * Gets bands + * Gets isDefault * - * @return \SynergiTech\Staffology\Model\PricingBand[]|null + * @return bool|null */ - public function getBands(): ?array + public function getIsDefault(): ?bool { - return $this->container['bands']; + return $this->container['isDefault']; } /** - * Sets bands + * Sets isDefault * - * @param \SynergiTech\Staffology\Model\PricingBand[]|null $bands bands + * @param bool|null $isDefault isDefault * * @return $this */ - public function setBands(?array $bands): static + public function setIsDefault(?bool $isDefault): static { - if (is_null($bands)) { - array_push($this->openAPINullablesSetToNull, 'bands'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bands', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isDefault)) { + throw new InvalidArgumentException('non-nullable isDefault cannot be null'); } - $this->container['bands'] = $bands; + $this->container['isDefault'] = $isDefault; return $this; } /** - * Gets isDefault + * Gets minimumCharge * - * @return bool|null + * @return float|null */ - public function getIsDefault(): ?bool + public function getMinimumCharge(): ?float { - return $this->container['isDefault']; + return $this->container['minimumCharge']; } /** - * Sets isDefault + * Sets minimumCharge * - * @param bool|null $isDefault isDefault + * @param float|null $minimumCharge minimumCharge * * @return $this */ - public function setIsDefault(?bool $isDefault): static + public function setMinimumCharge(?float $minimumCharge): static { - if (is_null($isDefault)) { - throw new InvalidArgumentException('non-nullable isDefault cannot be null'); + if (is_null($minimumCharge)) { + throw new InvalidArgumentException('non-nullable minimumCharge cannot be null'); } - $this->container['isDefault'] = $isDefault; + $this->container['minimumCharge'] = $minimumCharge; return $this; } /** - * Gets netSuiteItemCode + * Gets name * * @return string|null */ - public function getNetSuiteItemCode(): ?string + public function getName(): ?string { - return $this->container['netSuiteItemCode']; + return $this->container['name']; } /** - * Sets netSuiteItemCode + * Sets name * - * @param string|null $netSuiteItemCode netSuiteItemCode + * @param string|null $name name * * @return $this */ - public function setNetSuiteItemCode(?string $netSuiteItemCode): static + public function setName(?string $name): static { - if (is_null($netSuiteItemCode)) { - array_push($this->openAPINullablesSetToNull, 'netSuiteItemCode'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('netSuiteItemCode', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($netSuiteItemCode) && (mb_strlen($netSuiteItemCode) > 20)) { - throw new InvalidArgumentException('invalid length for $netSuiteItemCode when calling PricingTable., must be smaller than or equal to 20.'); + if (!is_null($name) && (mb_strlen($name) > 50)) { + throw new InvalidArgumentException('invalid length for $name when calling PricingTable., must be smaller than or equal to 50.'); } - $this->container['netSuiteItemCode'] = $netSuiteItemCode; + $this->container['name'] = $name; return $this; } @@ -545,28 +534,39 @@ public function setNetSuiteDescription(?string $netSuiteDescription): static } /** - * Gets id + * Gets netSuiteItemCode * * @return string|null */ - public function getId(): ?string + public function getNetSuiteItemCode(): ?string { - return $this->container['id']; + return $this->container['netSuiteItemCode']; } /** - * Sets id + * Sets netSuiteItemCode * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $netSuiteItemCode netSuiteItemCode * * @return $this */ - public function setId(?string $id): static + public function setNetSuiteItemCode(?string $netSuiteItemCode): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($netSuiteItemCode)) { + array_push($this->openAPINullablesSetToNull, 'netSuiteItemCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('netSuiteItemCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + if (!is_null($netSuiteItemCode) && (mb_strlen($netSuiteItemCode) > 20)) { + throw new InvalidArgumentException('invalid length for $netSuiteItemCode when calling PricingTable., must be smaller than or equal to 20.'); + } + + $this->container['netSuiteItemCode'] = $netSuiteItemCode; return $this; } diff --git a/src/Model/ProRataRule.php b/src/Model/ProRataRule.php index 1ada532..fe1b0ae 100644 --- a/src/Model/ProRataRule.php +++ b/src/Model/ProRataRule.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ProcessingNote.php b/src/Model/ProcessingNote.php index f0bcbda..2897285 100644 --- a/src/Model/ProcessingNote.php +++ b/src/Model/ProcessingNote.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,17 +59,17 @@ class ProcessingNote implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'payRunEntryId' => 'string', - 'note' => 'string', - 'user' => '\SynergiTech\Staffology\Model\Item', - 'payRun' => '\SynergiTech\Staffology\Model\Item', + 'completedDate' => '\DateTime', 'date' => '\DateTime', 'documentCount' => 'int', 'documents' => '\SynergiTech\Staffology\Model\Item[]', + 'id' => 'string', + 'note' => 'string', + 'payRun' => '\SynergiTech\Staffology\Model\Item', + 'payRunEntryId' => 'string', 'status' => '\SynergiTech\Staffology\Model\ProcessingNoteStatus', 'updatedByName' => 'string', - 'completedDate' => '\DateTime', - 'id' => 'string' + 'user' => '\SynergiTech\Staffology\Model\Item' ]; /** @@ -78,17 +78,17 @@ class ProcessingNote implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'payRunEntryId' => 'uuid', - 'note' => null, - 'user' => null, - 'payRun' => null, + 'completedDate' => 'date', 'date' => 'date', 'documentCount' => 'int32', 'documents' => null, + 'id' => 'uuid', + 'note' => null, + 'payRun' => null, + 'payRunEntryId' => 'uuid', 'status' => null, 'updatedByName' => null, - 'completedDate' => 'date', - 'id' => 'uuid' + 'user' => null ]; /** @@ -97,17 +97,17 @@ class ProcessingNote implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'payRunEntryId' => true, - 'note' => false, - 'user' => false, - 'payRun' => false, + 'completedDate' => true, 'date' => false, 'documentCount' => false, 'documents' => true, + 'id' => false, + 'note' => false, + 'payRun' => false, + 'payRunEntryId' => true, 'status' => false, 'updatedByName' => true, - 'completedDate' => true, - 'id' => false + 'user' => false ]; /** @@ -196,17 +196,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payRunEntryId' => 'payRunEntryId', - 'note' => 'note', - 'user' => 'user', - 'payRun' => 'payRun', + 'completedDate' => 'completedDate', 'date' => 'date', 'documentCount' => 'documentCount', 'documents' => 'documents', + 'id' => 'id', + 'note' => 'note', + 'payRun' => 'payRun', + 'payRunEntryId' => 'payRunEntryId', 'status' => 'status', 'updatedByName' => 'updatedByName', - 'completedDate' => 'completedDate', - 'id' => 'id' + 'user' => 'user' ]; /** @@ -215,17 +215,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payRunEntryId' => 'setPayRunEntryId', - 'note' => 'setNote', - 'user' => 'setUser', - 'payRun' => 'setPayRun', + 'completedDate' => 'setCompletedDate', 'date' => 'setDate', 'documentCount' => 'setDocumentCount', 'documents' => 'setDocuments', + 'id' => 'setId', + 'note' => 'setNote', + 'payRun' => 'setPayRun', + 'payRunEntryId' => 'setPayRunEntryId', 'status' => 'setStatus', 'updatedByName' => 'setUpdatedByName', - 'completedDate' => 'setCompletedDate', - 'id' => 'setId' + 'user' => 'setUser' ]; /** @@ -234,17 +234,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payRunEntryId' => 'getPayRunEntryId', - 'note' => 'getNote', - 'user' => 'getUser', - 'payRun' => 'getPayRun', + 'completedDate' => 'getCompletedDate', 'date' => 'getDate', 'documentCount' => 'getDocumentCount', 'documents' => 'getDocuments', + 'id' => 'getId', + 'note' => 'getNote', + 'payRun' => 'getPayRun', + 'payRunEntryId' => 'getPayRunEntryId', 'status' => 'getStatus', 'updatedByName' => 'getUpdatedByName', - 'completedDate' => 'getCompletedDate', - 'id' => 'getId' + 'user' => 'getUser' ]; /** @@ -303,17 +303,17 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payRunEntryId', $data ?? [], null); - $this->setIfExists('note', $data ?? [], null); - $this->setIfExists('user', $data ?? [], null); - $this->setIfExists('payRun', $data ?? [], null); + $this->setIfExists('completedDate', $data ?? [], null); $this->setIfExists('date', $data ?? [], null); $this->setIfExists('documentCount', $data ?? [], null); $this->setIfExists('documents', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('note', $data ?? [], null); + $this->setIfExists('payRun', $data ?? [], null); + $this->setIfExists('payRunEntryId', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('updatedByName', $data ?? [], null); - $this->setIfExists('completedDate', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('user', $data ?? [], null); } /** @@ -366,209 +366,243 @@ public function valid(): bool /** - * Gets payRunEntryId + * Gets completedDate * - * @return string|null + * @return \DateTime|null */ - public function getPayRunEntryId(): ?string + public function getCompletedDate(): ?\DateTime { - return $this->container['payRunEntryId']; + return $this->container['completedDate']; } /** - * Sets payRunEntryId + * Sets completedDate * - * @param string|null $payRunEntryId The Id of the payrunEntry this ProcessingNote relates to, if any + * @param \DateTime|null $completedDate UpdatedDate is assigned to this to get around the base implementation of UpdatedDate having [JsonIgnore] tag * * @return $this */ - public function setPayRunEntryId(?string $payRunEntryId): static + public function setCompletedDate(?\DateTime $completedDate): static { - if (is_null($payRunEntryId)) { - array_push($this->openAPINullablesSetToNull, 'payRunEntryId'); + if (is_null($completedDate)) { + array_push($this->openAPINullablesSetToNull, 'completedDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payRunEntryId', $nullablesSetToNull); + $index = array_search('completedDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payRunEntryId'] = $payRunEntryId; + $this->container['completedDate'] = $completedDate; return $this; } /** - * Gets note + * Gets date * - * @return string + * @return \DateTime|null */ - public function getNote(): string + public function getDate(): ?\DateTime { - return $this->container['note']; + return $this->container['date']; } /** - * Sets note + * Sets date * - * @param string $note note + * @param \DateTime|null $date date * * @return $this */ - public function setNote(string $note): static + public function setDate(?\DateTime $date): static { - if (is_null($note)) { - throw new InvalidArgumentException('non-nullable note cannot be null'); + if (is_null($date)) { + throw new InvalidArgumentException('non-nullable date cannot be null'); } + $this->container['date'] = $date; - if ((mb_strlen($note) < 1)) { - throw new InvalidArgumentException('invalid length for $note when calling ProcessingNote., must be bigger than or equal to 1.'); - } + return $this; + } - $this->container['note'] = $note; + /** + * Gets documentCount + * + * @return int|null + */ + public function getDocumentCount(): ?int + { + return $this->container['documentCount']; + } + + /** + * Sets documentCount + * + * @param int|null $documentCount [readonly] The number of attachments associated with this model + * + * @return $this + */ + public function setDocumentCount(?int $documentCount): static + { + if (is_null($documentCount)) { + throw new InvalidArgumentException('non-nullable documentCount cannot be null'); + } + $this->container['documentCount'] = $documentCount; return $this; } /** - * Gets user + * Gets documents * - * @return \SynergiTech\Staffology\Model\Item|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getUser(): ?\SynergiTech\Staffology\Model\Item + public function getDocuments(): ?array { - return $this->container['user']; + return $this->container['documents']; } /** - * Sets user + * Sets documents * - * @param \SynergiTech\Staffology\Model\Item|null $user user + * @param \SynergiTech\Staffology\Model\Item[]|null $documents [readonly] The attachments associated with this model * * @return $this */ - public function setUser(?\SynergiTech\Staffology\Model\Item $user): static + public function setDocuments(?array $documents): static { - if (is_null($user)) { - throw new InvalidArgumentException('non-nullable user cannot be null'); + if (is_null($documents)) { + array_push($this->openAPINullablesSetToNull, 'documents'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('documents', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['user'] = $user; + $this->container['documents'] = $documents; return $this; } /** - * Gets payRun + * Gets id * - * @return \SynergiTech\Staffology\Model\Item|null + * @return string|null */ - public function getPayRun(): ?\SynergiTech\Staffology\Model\Item + public function getId(): ?string { - return $this->container['payRun']; + return $this->container['id']; } /** - * Sets payRun + * Sets id * - * @param \SynergiTech\Staffology\Model\Item|null $payRun payRun + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setPayRun(?\SynergiTech\Staffology\Model\Item $payRun): static + public function setId(?string $id): static { - if (is_null($payRun)) { - throw new InvalidArgumentException('non-nullable payRun cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['payRun'] = $payRun; + $this->container['id'] = $id; return $this; } /** - * Gets date + * Gets note * - * @return \DateTime|null + * @return string */ - public function getDate(): ?\DateTime + public function getNote(): string { - return $this->container['date']; + return $this->container['note']; } /** - * Sets date + * Sets note * - * @param \DateTime|null $date date + * @param string $note note * * @return $this */ - public function setDate(?\DateTime $date): static + public function setNote(string $note): static { - if (is_null($date)) { - throw new InvalidArgumentException('non-nullable date cannot be null'); + if (is_null($note)) { + throw new InvalidArgumentException('non-nullable note cannot be null'); } - $this->container['date'] = $date; + + if ((mb_strlen($note) < 1)) { + throw new InvalidArgumentException('invalid length for $note when calling ProcessingNote., must be bigger than or equal to 1.'); + } + + $this->container['note'] = $note; return $this; } /** - * Gets documentCount + * Gets payRun * - * @return int|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getDocumentCount(): ?int + public function getPayRun(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['documentCount']; + return $this->container['payRun']; } /** - * Sets documentCount + * Sets payRun * - * @param int|null $documentCount [readonly] The number of attachments associated with this model + * @param \SynergiTech\Staffology\Model\Item|null $payRun payRun * * @return $this */ - public function setDocumentCount(?int $documentCount): static + public function setPayRun(?\SynergiTech\Staffology\Model\Item $payRun): static { - if (is_null($documentCount)) { - throw new InvalidArgumentException('non-nullable documentCount cannot be null'); + if (is_null($payRun)) { + throw new InvalidArgumentException('non-nullable payRun cannot be null'); } - $this->container['documentCount'] = $documentCount; + $this->container['payRun'] = $payRun; return $this; } /** - * Gets documents + * Gets payRunEntryId * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return string|null */ - public function getDocuments(): ?array + public function getPayRunEntryId(): ?string { - return $this->container['documents']; + return $this->container['payRunEntryId']; } /** - * Sets documents + * Sets payRunEntryId * - * @param \SynergiTech\Staffology\Model\Item[]|null $documents [readonly] The attachments associated with this model + * @param string|null $payRunEntryId The Id of the payrunEntry this ProcessingNote relates to, if any * * @return $this */ - public function setDocuments(?array $documents): static + public function setPayRunEntryId(?string $payRunEntryId): static { - if (is_null($documents)) { - array_push($this->openAPINullablesSetToNull, 'documents'); + if (is_null($payRunEntryId)) { + array_push($this->openAPINullablesSetToNull, 'payRunEntryId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('documents', $nullablesSetToNull); + $index = array_search('payRunEntryId', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['documents'] = $documents; + $this->container['payRunEntryId'] = $payRunEntryId; return $this; } @@ -635,62 +669,28 @@ public function setUpdatedByName(?string $updatedByName): static } /** - * Gets completedDate - * - * @return \DateTime|null - */ - public function getCompletedDate(): ?\DateTime - { - return $this->container['completedDate']; - } - - /** - * Sets completedDate - * - * @param \DateTime|null $completedDate UpdatedDate is assigned to this to get around the base implementation of UpdatedDate having [JsonIgnore] tag - * - * @return $this - */ - public function setCompletedDate(?\DateTime $completedDate): static - { - if (is_null($completedDate)) { - array_push($this->openAPINullablesSetToNull, 'completedDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('completedDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['completedDate'] = $completedDate; - - return $this; - } - - /** - * Gets id + * Gets user * - * @return string|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getId(): ?string + public function getUser(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['id']; + return $this->container['user']; } /** - * Sets id + * Sets user * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\Item|null $user user * * @return $this */ - public function setId(?string $id): static + public function setUser(?\SynergiTech\Staffology\Model\Item $user): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($user)) { + throw new InvalidArgumentException('non-nullable user cannot be null'); } - $this->container['id'] = $id; + $this->container['user'] = $user; return $this; } diff --git a/src/Model/ProcessingNoteStatus.php b/src/Model/ProcessingNoteStatus.php index 447929a..a056a64 100644 --- a/src/Model/ProcessingNoteStatus.php +++ b/src/Model/ProcessingNoteStatus.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/RecoverableAmounts.php b/src/Model/RecoverableAmounts.php index 0e2e555..fd71da1 100644 --- a/src/Model/RecoverableAmounts.php +++ b/src/Model/RecoverableAmounts.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,20 +59,20 @@ class RecoverableAmounts implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'taxMonth' => 'int', - 'smpRecovered' => 'float', - 'sppRecovered' => 'float', - 'sapRecovered' => 'float', - 'shPPRecovered' => 'float', - 'spbpRecovered' => 'float', - 'sncpRecovered' => 'float', + 'cisDeductionsSuffered' => 'float', + 'nicCompensationOnSAP' => 'float', 'nicCompensationOnSMP' => 'float', + 'nicCompensationOnSNCP' => 'float', + 'nicCompensationOnSPBP' => 'float', 'nicCompensationOnSPP' => 'float', - 'nicCompensationOnSAP' => 'float', 'nicCompensationOnShPP' => 'float', - 'nicCompensationOnSPBP' => 'float', - 'nicCompensationOnSNCP' => 'float', - 'cisDeductionsSuffered' => 'float', + 'sapRecovered' => 'float', + 'shPPRecovered' => 'float', + 'smpRecovered' => 'float', + 'sncpRecovered' => 'float', + 'spbpRecovered' => 'float', + 'sppRecovered' => 'float', + 'taxMonth' => 'int', 'total' => 'float' ]; @@ -82,20 +82,20 @@ class RecoverableAmounts implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'taxMonth' => 'int32', - 'smpRecovered' => 'double', - 'sppRecovered' => 'double', - 'sapRecovered' => 'double', - 'shPPRecovered' => 'double', - 'spbpRecovered' => 'double', - 'sncpRecovered' => 'double', + 'cisDeductionsSuffered' => 'double', + 'nicCompensationOnSAP' => 'double', 'nicCompensationOnSMP' => 'double', + 'nicCompensationOnSNCP' => 'double', + 'nicCompensationOnSPBP' => 'double', 'nicCompensationOnSPP' => 'double', - 'nicCompensationOnSAP' => 'double', 'nicCompensationOnShPP' => 'double', - 'nicCompensationOnSPBP' => 'double', - 'nicCompensationOnSNCP' => 'double', - 'cisDeductionsSuffered' => 'double', + 'sapRecovered' => 'double', + 'shPPRecovered' => 'double', + 'smpRecovered' => 'double', + 'sncpRecovered' => 'double', + 'spbpRecovered' => 'double', + 'sppRecovered' => 'double', + 'taxMonth' => 'int32', 'total' => 'double' ]; @@ -105,20 +105,20 @@ class RecoverableAmounts implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'taxMonth' => false, - 'smpRecovered' => false, - 'sppRecovered' => false, - 'sapRecovered' => false, - 'shPPRecovered' => false, - 'spbpRecovered' => false, - 'sncpRecovered' => false, + 'cisDeductionsSuffered' => false, + 'nicCompensationOnSAP' => false, 'nicCompensationOnSMP' => false, + 'nicCompensationOnSNCP' => false, + 'nicCompensationOnSPBP' => false, 'nicCompensationOnSPP' => false, - 'nicCompensationOnSAP' => false, 'nicCompensationOnShPP' => false, - 'nicCompensationOnSPBP' => false, - 'nicCompensationOnSNCP' => false, - 'cisDeductionsSuffered' => false, + 'sapRecovered' => false, + 'shPPRecovered' => false, + 'smpRecovered' => false, + 'sncpRecovered' => false, + 'spbpRecovered' => false, + 'sppRecovered' => false, + 'taxMonth' => false, 'total' => false ]; @@ -208,20 +208,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'taxMonth' => 'taxMonth', - 'smpRecovered' => 'smpRecovered', - 'sppRecovered' => 'sppRecovered', - 'sapRecovered' => 'sapRecovered', - 'shPPRecovered' => 'shPPRecovered', - 'spbpRecovered' => 'spbpRecovered', - 'sncpRecovered' => 'sncpRecovered', + 'cisDeductionsSuffered' => 'cisDeductionsSuffered', + 'nicCompensationOnSAP' => 'nicCompensationOnSAP', 'nicCompensationOnSMP' => 'nicCompensationOnSMP', + 'nicCompensationOnSNCP' => 'nicCompensationOnSNCP', + 'nicCompensationOnSPBP' => 'nicCompensationOnSPBP', 'nicCompensationOnSPP' => 'nicCompensationOnSPP', - 'nicCompensationOnSAP' => 'nicCompensationOnSAP', 'nicCompensationOnShPP' => 'nicCompensationOnShPP', - 'nicCompensationOnSPBP' => 'nicCompensationOnSPBP', - 'nicCompensationOnSNCP' => 'nicCompensationOnSNCP', - 'cisDeductionsSuffered' => 'cisDeductionsSuffered', + 'sapRecovered' => 'sapRecovered', + 'shPPRecovered' => 'shPPRecovered', + 'smpRecovered' => 'smpRecovered', + 'sncpRecovered' => 'sncpRecovered', + 'spbpRecovered' => 'spbpRecovered', + 'sppRecovered' => 'sppRecovered', + 'taxMonth' => 'taxMonth', 'total' => 'total' ]; @@ -231,20 +231,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'taxMonth' => 'setTaxMonth', - 'smpRecovered' => 'setSmpRecovered', - 'sppRecovered' => 'setSppRecovered', - 'sapRecovered' => 'setSapRecovered', - 'shPPRecovered' => 'setShPPRecovered', - 'spbpRecovered' => 'setSpbpRecovered', - 'sncpRecovered' => 'setSncpRecovered', + 'cisDeductionsSuffered' => 'setCisDeductionsSuffered', + 'nicCompensationOnSAP' => 'setNicCompensationOnSAP', 'nicCompensationOnSMP' => 'setNicCompensationOnSMP', + 'nicCompensationOnSNCP' => 'setNicCompensationOnSNCP', + 'nicCompensationOnSPBP' => 'setNicCompensationOnSPBP', 'nicCompensationOnSPP' => 'setNicCompensationOnSPP', - 'nicCompensationOnSAP' => 'setNicCompensationOnSAP', 'nicCompensationOnShPP' => 'setNicCompensationOnShPP', - 'nicCompensationOnSPBP' => 'setNicCompensationOnSPBP', - 'nicCompensationOnSNCP' => 'setNicCompensationOnSNCP', - 'cisDeductionsSuffered' => 'setCisDeductionsSuffered', + 'sapRecovered' => 'setSapRecovered', + 'shPPRecovered' => 'setShPPRecovered', + 'smpRecovered' => 'setSmpRecovered', + 'sncpRecovered' => 'setSncpRecovered', + 'spbpRecovered' => 'setSpbpRecovered', + 'sppRecovered' => 'setSppRecovered', + 'taxMonth' => 'setTaxMonth', 'total' => 'setTotal' ]; @@ -254,20 +254,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'taxMonth' => 'getTaxMonth', - 'smpRecovered' => 'getSmpRecovered', - 'sppRecovered' => 'getSppRecovered', - 'sapRecovered' => 'getSapRecovered', - 'shPPRecovered' => 'getShPPRecovered', - 'spbpRecovered' => 'getSpbpRecovered', - 'sncpRecovered' => 'getSncpRecovered', + 'cisDeductionsSuffered' => 'getCisDeductionsSuffered', + 'nicCompensationOnSAP' => 'getNicCompensationOnSAP', 'nicCompensationOnSMP' => 'getNicCompensationOnSMP', + 'nicCompensationOnSNCP' => 'getNicCompensationOnSNCP', + 'nicCompensationOnSPBP' => 'getNicCompensationOnSPBP', 'nicCompensationOnSPP' => 'getNicCompensationOnSPP', - 'nicCompensationOnSAP' => 'getNicCompensationOnSAP', 'nicCompensationOnShPP' => 'getNicCompensationOnShPP', - 'nicCompensationOnSPBP' => 'getNicCompensationOnSPBP', - 'nicCompensationOnSNCP' => 'getNicCompensationOnSNCP', - 'cisDeductionsSuffered' => 'getCisDeductionsSuffered', + 'sapRecovered' => 'getSapRecovered', + 'shPPRecovered' => 'getShPPRecovered', + 'smpRecovered' => 'getSmpRecovered', + 'sncpRecovered' => 'getSncpRecovered', + 'spbpRecovered' => 'getSpbpRecovered', + 'sppRecovered' => 'getSppRecovered', + 'taxMonth' => 'getTaxMonth', 'total' => 'getTotal' ]; @@ -327,20 +327,20 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('taxMonth', $data ?? [], null); - $this->setIfExists('smpRecovered', $data ?? [], null); - $this->setIfExists('sppRecovered', $data ?? [], null); - $this->setIfExists('sapRecovered', $data ?? [], null); - $this->setIfExists('shPPRecovered', $data ?? [], null); - $this->setIfExists('spbpRecovered', $data ?? [], null); - $this->setIfExists('sncpRecovered', $data ?? [], null); + $this->setIfExists('cisDeductionsSuffered', $data ?? [], null); + $this->setIfExists('nicCompensationOnSAP', $data ?? [], null); $this->setIfExists('nicCompensationOnSMP', $data ?? [], null); + $this->setIfExists('nicCompensationOnSNCP', $data ?? [], null); + $this->setIfExists('nicCompensationOnSPBP', $data ?? [], null); $this->setIfExists('nicCompensationOnSPP', $data ?? [], null); - $this->setIfExists('nicCompensationOnSAP', $data ?? [], null); $this->setIfExists('nicCompensationOnShPP', $data ?? [], null); - $this->setIfExists('nicCompensationOnSPBP', $data ?? [], null); - $this->setIfExists('nicCompensationOnSNCP', $data ?? [], null); - $this->setIfExists('cisDeductionsSuffered', $data ?? [], null); + $this->setIfExists('sapRecovered', $data ?? [], null); + $this->setIfExists('shPPRecovered', $data ?? [], null); + $this->setIfExists('smpRecovered', $data ?? [], null); + $this->setIfExists('sncpRecovered', $data ?? [], null); + $this->setIfExists('spbpRecovered', $data ?? [], null); + $this->setIfExists('sppRecovered', $data ?? [], null); + $this->setIfExists('taxMonth', $data ?? [], null); $this->setIfExists('total', $data ?? [], null); } @@ -387,379 +387,379 @@ public function valid(): bool /** - * Gets taxMonth + * Gets cisDeductionsSuffered * - * @return int|null + * @return float|null */ - public function getTaxMonth(): ?int + public function getCisDeductionsSuffered(): ?float { - return $this->container['taxMonth']; + return $this->container['cisDeductionsSuffered']; } /** - * Sets taxMonth + * Sets cisDeductionsSuffered * - * @param int|null $taxMonth taxMonth + * @param float|null $cisDeductionsSuffered Value of CIS deductions suffered year to date * * @return $this */ - public function setTaxMonth(?int $taxMonth): static + public function setCisDeductionsSuffered(?float $cisDeductionsSuffered): static { - if (is_null($taxMonth)) { - throw new InvalidArgumentException('non-nullable taxMonth cannot be null'); + if (is_null($cisDeductionsSuffered)) { + throw new InvalidArgumentException('non-nullable cisDeductionsSuffered cannot be null'); } - $this->container['taxMonth'] = $taxMonth; + $this->container['cisDeductionsSuffered'] = $cisDeductionsSuffered; return $this; } /** - * Gets smpRecovered + * Gets nicCompensationOnSAP * * @return float|null */ - public function getSmpRecovered(): ?float + public function getNicCompensationOnSAP(): ?float { - return $this->container['smpRecovered']; + return $this->container['nicCompensationOnSAP']; } /** - * Sets smpRecovered + * Sets nicCompensationOnSAP * - * @param float|null $smpRecovered Value of Statutory Maternity Pay recovered year to date + * @param float|null $nicCompensationOnSAP Value of NIC compensation on Statutory Adoption Pay year to date * * @return $this */ - public function setSmpRecovered(?float $smpRecovered): static + public function setNicCompensationOnSAP(?float $nicCompensationOnSAP): static { - if (is_null($smpRecovered)) { - throw new InvalidArgumentException('non-nullable smpRecovered cannot be null'); + if (is_null($nicCompensationOnSAP)) { + throw new InvalidArgumentException('non-nullable nicCompensationOnSAP cannot be null'); } - $this->container['smpRecovered'] = $smpRecovered; + $this->container['nicCompensationOnSAP'] = $nicCompensationOnSAP; return $this; } /** - * Gets sppRecovered + * Gets nicCompensationOnSMP * * @return float|null */ - public function getSppRecovered(): ?float + public function getNicCompensationOnSMP(): ?float { - return $this->container['sppRecovered']; + return $this->container['nicCompensationOnSMP']; } /** - * Sets sppRecovered + * Sets nicCompensationOnSMP * - * @param float|null $sppRecovered Value of Statutory Paternity Pay recovered year to date + * @param float|null $nicCompensationOnSMP Value of NIC compensation on SMP year to date * * @return $this */ - public function setSppRecovered(?float $sppRecovered): static + public function setNicCompensationOnSMP(?float $nicCompensationOnSMP): static { - if (is_null($sppRecovered)) { - throw new InvalidArgumentException('non-nullable sppRecovered cannot be null'); + if (is_null($nicCompensationOnSMP)) { + throw new InvalidArgumentException('non-nullable nicCompensationOnSMP cannot be null'); } - $this->container['sppRecovered'] = $sppRecovered; + $this->container['nicCompensationOnSMP'] = $nicCompensationOnSMP; return $this; } /** - * Gets sapRecovered + * Gets nicCompensationOnSNCP * * @return float|null */ - public function getSapRecovered(): ?float + public function getNicCompensationOnSNCP(): ?float { - return $this->container['sapRecovered']; + return $this->container['nicCompensationOnSNCP']; } /** - * Sets sapRecovered + * Sets nicCompensationOnSNCP * - * @param float|null $sapRecovered Value of Statutory Adoption Pay recovered year to date + * @param float|null $nicCompensationOnSNCP Value of NIC compensation on Statutory Neonatal Care Pay year to date * * @return $this */ - public function setSapRecovered(?float $sapRecovered): static + public function setNicCompensationOnSNCP(?float $nicCompensationOnSNCP): static { - if (is_null($sapRecovered)) { - throw new InvalidArgumentException('non-nullable sapRecovered cannot be null'); + if (is_null($nicCompensationOnSNCP)) { + throw new InvalidArgumentException('non-nullable nicCompensationOnSNCP cannot be null'); } - $this->container['sapRecovered'] = $sapRecovered; + $this->container['nicCompensationOnSNCP'] = $nicCompensationOnSNCP; return $this; } /** - * Gets shPPRecovered + * Gets nicCompensationOnSPBP * * @return float|null */ - public function getShPPRecovered(): ?float + public function getNicCompensationOnSPBP(): ?float { - return $this->container['shPPRecovered']; + return $this->container['nicCompensationOnSPBP']; } /** - * Sets shPPRecovered + * Sets nicCompensationOnSPBP * - * @param float|null $shPPRecovered Value of Shared Parental Pay recovered year to date + * @param float|null $nicCompensationOnSPBP Value of NIC compensation on Statutory Parental Bereavement Pay year to date * * @return $this */ - public function setShPPRecovered(?float $shPPRecovered): static + public function setNicCompensationOnSPBP(?float $nicCompensationOnSPBP): static { - if (is_null($shPPRecovered)) { - throw new InvalidArgumentException('non-nullable shPPRecovered cannot be null'); + if (is_null($nicCompensationOnSPBP)) { + throw new InvalidArgumentException('non-nullable nicCompensationOnSPBP cannot be null'); } - $this->container['shPPRecovered'] = $shPPRecovered; + $this->container['nicCompensationOnSPBP'] = $nicCompensationOnSPBP; return $this; } /** - * Gets spbpRecovered + * Gets nicCompensationOnSPP * * @return float|null */ - public function getSpbpRecovered(): ?float + public function getNicCompensationOnSPP(): ?float { - return $this->container['spbpRecovered']; + return $this->container['nicCompensationOnSPP']; } /** - * Sets spbpRecovered + * Sets nicCompensationOnSPP * - * @param float|null $spbpRecovered Value of Statutory Parental Bereavement Pay recovered year to date + * @param float|null $nicCompensationOnSPP Value of NIC compensation on Statutory Paternity Pay year to date * * @return $this */ - public function setSpbpRecovered(?float $spbpRecovered): static + public function setNicCompensationOnSPP(?float $nicCompensationOnSPP): static { - if (is_null($spbpRecovered)) { - throw new InvalidArgumentException('non-nullable spbpRecovered cannot be null'); + if (is_null($nicCompensationOnSPP)) { + throw new InvalidArgumentException('non-nullable nicCompensationOnSPP cannot be null'); } - $this->container['spbpRecovered'] = $spbpRecovered; + $this->container['nicCompensationOnSPP'] = $nicCompensationOnSPP; return $this; } /** - * Gets sncpRecovered + * Gets nicCompensationOnShPP * * @return float|null */ - public function getSncpRecovered(): ?float + public function getNicCompensationOnShPP(): ?float { - return $this->container['sncpRecovered']; + return $this->container['nicCompensationOnShPP']; } /** - * Sets sncpRecovered + * Sets nicCompensationOnShPP * - * @param float|null $sncpRecovered Value of Statutory Neonatal Care Pay recovered year to date + * @param float|null $nicCompensationOnShPP Value of NIC compensation on Shared Parental Pay year to date * * @return $this */ - public function setSncpRecovered(?float $sncpRecovered): static + public function setNicCompensationOnShPP(?float $nicCompensationOnShPP): static { - if (is_null($sncpRecovered)) { - throw new InvalidArgumentException('non-nullable sncpRecovered cannot be null'); + if (is_null($nicCompensationOnShPP)) { + throw new InvalidArgumentException('non-nullable nicCompensationOnShPP cannot be null'); } - $this->container['sncpRecovered'] = $sncpRecovered; + $this->container['nicCompensationOnShPP'] = $nicCompensationOnShPP; return $this; } /** - * Gets nicCompensationOnSMP + * Gets sapRecovered * * @return float|null */ - public function getNicCompensationOnSMP(): ?float + public function getSapRecovered(): ?float { - return $this->container['nicCompensationOnSMP']; + return $this->container['sapRecovered']; } /** - * Sets nicCompensationOnSMP + * Sets sapRecovered * - * @param float|null $nicCompensationOnSMP Value of NIC compensation on SMP year to date + * @param float|null $sapRecovered Value of Statutory Adoption Pay recovered year to date * * @return $this */ - public function setNicCompensationOnSMP(?float $nicCompensationOnSMP): static + public function setSapRecovered(?float $sapRecovered): static { - if (is_null($nicCompensationOnSMP)) { - throw new InvalidArgumentException('non-nullable nicCompensationOnSMP cannot be null'); + if (is_null($sapRecovered)) { + throw new InvalidArgumentException('non-nullable sapRecovered cannot be null'); } - $this->container['nicCompensationOnSMP'] = $nicCompensationOnSMP; + $this->container['sapRecovered'] = $sapRecovered; return $this; } /** - * Gets nicCompensationOnSPP + * Gets shPPRecovered * * @return float|null */ - public function getNicCompensationOnSPP(): ?float + public function getShPPRecovered(): ?float { - return $this->container['nicCompensationOnSPP']; + return $this->container['shPPRecovered']; } /** - * Sets nicCompensationOnSPP + * Sets shPPRecovered * - * @param float|null $nicCompensationOnSPP Value of NIC compensation on Statutory Paternity Pay year to date + * @param float|null $shPPRecovered Value of Shared Parental Pay recovered year to date * * @return $this */ - public function setNicCompensationOnSPP(?float $nicCompensationOnSPP): static + public function setShPPRecovered(?float $shPPRecovered): static { - if (is_null($nicCompensationOnSPP)) { - throw new InvalidArgumentException('non-nullable nicCompensationOnSPP cannot be null'); + if (is_null($shPPRecovered)) { + throw new InvalidArgumentException('non-nullable shPPRecovered cannot be null'); } - $this->container['nicCompensationOnSPP'] = $nicCompensationOnSPP; + $this->container['shPPRecovered'] = $shPPRecovered; return $this; } /** - * Gets nicCompensationOnSAP + * Gets smpRecovered * * @return float|null */ - public function getNicCompensationOnSAP(): ?float + public function getSmpRecovered(): ?float { - return $this->container['nicCompensationOnSAP']; + return $this->container['smpRecovered']; } /** - * Sets nicCompensationOnSAP + * Sets smpRecovered * - * @param float|null $nicCompensationOnSAP Value of NIC compensation on Statutory Adoption Pay year to date + * @param float|null $smpRecovered Value of Statutory Maternity Pay recovered year to date * * @return $this */ - public function setNicCompensationOnSAP(?float $nicCompensationOnSAP): static + public function setSmpRecovered(?float $smpRecovered): static { - if (is_null($nicCompensationOnSAP)) { - throw new InvalidArgumentException('non-nullable nicCompensationOnSAP cannot be null'); + if (is_null($smpRecovered)) { + throw new InvalidArgumentException('non-nullable smpRecovered cannot be null'); } - $this->container['nicCompensationOnSAP'] = $nicCompensationOnSAP; + $this->container['smpRecovered'] = $smpRecovered; return $this; } /** - * Gets nicCompensationOnShPP + * Gets sncpRecovered * * @return float|null */ - public function getNicCompensationOnShPP(): ?float + public function getSncpRecovered(): ?float { - return $this->container['nicCompensationOnShPP']; + return $this->container['sncpRecovered']; } /** - * Sets nicCompensationOnShPP + * Sets sncpRecovered * - * @param float|null $nicCompensationOnShPP Value of NIC compensation on Shared Parental Pay year to date + * @param float|null $sncpRecovered Value of Statutory Neonatal Care Pay recovered year to date * * @return $this */ - public function setNicCompensationOnShPP(?float $nicCompensationOnShPP): static + public function setSncpRecovered(?float $sncpRecovered): static { - if (is_null($nicCompensationOnShPP)) { - throw new InvalidArgumentException('non-nullable nicCompensationOnShPP cannot be null'); + if (is_null($sncpRecovered)) { + throw new InvalidArgumentException('non-nullable sncpRecovered cannot be null'); } - $this->container['nicCompensationOnShPP'] = $nicCompensationOnShPP; + $this->container['sncpRecovered'] = $sncpRecovered; return $this; } /** - * Gets nicCompensationOnSPBP + * Gets spbpRecovered * * @return float|null */ - public function getNicCompensationOnSPBP(): ?float + public function getSpbpRecovered(): ?float { - return $this->container['nicCompensationOnSPBP']; + return $this->container['spbpRecovered']; } /** - * Sets nicCompensationOnSPBP + * Sets spbpRecovered * - * @param float|null $nicCompensationOnSPBP Value of NIC compensation on Statutory Parental Bereavement Pay year to date + * @param float|null $spbpRecovered Value of Statutory Parental Bereavement Pay recovered year to date * * @return $this */ - public function setNicCompensationOnSPBP(?float $nicCompensationOnSPBP): static + public function setSpbpRecovered(?float $spbpRecovered): static { - if (is_null($nicCompensationOnSPBP)) { - throw new InvalidArgumentException('non-nullable nicCompensationOnSPBP cannot be null'); + if (is_null($spbpRecovered)) { + throw new InvalidArgumentException('non-nullable spbpRecovered cannot be null'); } - $this->container['nicCompensationOnSPBP'] = $nicCompensationOnSPBP; + $this->container['spbpRecovered'] = $spbpRecovered; return $this; } /** - * Gets nicCompensationOnSNCP + * Gets sppRecovered * * @return float|null */ - public function getNicCompensationOnSNCP(): ?float + public function getSppRecovered(): ?float { - return $this->container['nicCompensationOnSNCP']; + return $this->container['sppRecovered']; } /** - * Sets nicCompensationOnSNCP + * Sets sppRecovered * - * @param float|null $nicCompensationOnSNCP Value of NIC compensation on Statutory Neonatal Care Pay year to date + * @param float|null $sppRecovered Value of Statutory Paternity Pay recovered year to date * * @return $this */ - public function setNicCompensationOnSNCP(?float $nicCompensationOnSNCP): static + public function setSppRecovered(?float $sppRecovered): static { - if (is_null($nicCompensationOnSNCP)) { - throw new InvalidArgumentException('non-nullable nicCompensationOnSNCP cannot be null'); + if (is_null($sppRecovered)) { + throw new InvalidArgumentException('non-nullable sppRecovered cannot be null'); } - $this->container['nicCompensationOnSNCP'] = $nicCompensationOnSNCP; + $this->container['sppRecovered'] = $sppRecovered; return $this; } /** - * Gets cisDeductionsSuffered + * Gets taxMonth * - * @return float|null + * @return int|null */ - public function getCisDeductionsSuffered(): ?float + public function getTaxMonth(): ?int { - return $this->container['cisDeductionsSuffered']; + return $this->container['taxMonth']; } /** - * Sets cisDeductionsSuffered + * Sets taxMonth * - * @param float|null $cisDeductionsSuffered Value of CIS deductions suffered year to date + * @param int|null $taxMonth taxMonth * * @return $this */ - public function setCisDeductionsSuffered(?float $cisDeductionsSuffered): static + public function setTaxMonth(?int $taxMonth): static { - if (is_null($cisDeductionsSuffered)) { - throw new InvalidArgumentException('non-nullable cisDeductionsSuffered cannot be null'); + if (is_null($taxMonth)) { + throw new InvalidArgumentException('non-nullable taxMonth cannot be null'); } - $this->container['cisDeductionsSuffered'] = $cisDeductionsSuffered; + $this->container['taxMonth'] = $taxMonth; return $this; } diff --git a/src/Model/ReenrolmentStatus.php b/src/Model/ReenrolmentStatus.php new file mode 100644 index 0000000..c66d874 --- /dev/null +++ b/src/Model/ReenrolmentStatus.php @@ -0,0 +1,47 @@ + */ protected static array $openAPITypes = [ - 'title' => 'string', + 'id' => 'string', 'reports' => '\SynergiTech\Staffology\Model\Report[]', - 'id' => 'string' + 'title' => 'string' ]; /** @@ -71,9 +71,9 @@ class ReportPack implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'title' => null, + 'id' => 'uuid', 'reports' => null, - 'id' => 'uuid' + 'title' => null ]; /** @@ -82,9 +82,9 @@ class ReportPack implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'title' => false, + 'id' => false, 'reports' => true, - 'id' => false + 'title' => false ]; /** @@ -173,9 +173,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'title' => 'title', + 'id' => 'id', 'reports' => 'reports', - 'id' => 'id' + 'title' => 'title' ]; /** @@ -184,9 +184,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'title' => 'setTitle', + 'id' => 'setId', 'reports' => 'setReports', - 'id' => 'setId' + 'title' => 'setTitle' ]; /** @@ -195,9 +195,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'title' => 'getTitle', + 'id' => 'getId', 'reports' => 'getReports', - 'id' => 'getId' + 'title' => 'getTitle' ]; /** @@ -256,9 +256,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('reports', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('reports', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -315,35 +315,28 @@ public function valid(): bool /** - * Gets title + * Gets id * - * @return string + * @return string|null */ - public function getTitle(): string + public function getId(): ?string { - return $this->container['title']; + return $this->container['id']; } /** - * Sets title + * Sets id * - * @param string $title The name of this ReportPack + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setTitle(string $title): static + public function setId(?string $id): static { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); - } - if ((mb_strlen($title) > 150)) { - throw new InvalidArgumentException('invalid length for $title when calling ReportPack., must be smaller than or equal to 150.'); - } - if ((mb_strlen($title) < 1)) { - throw new InvalidArgumentException('invalid length for $title when calling ReportPack., must be bigger than or equal to 1.'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - - $this->container['title'] = $title; + $this->container['id'] = $id; return $this; } @@ -383,28 +376,35 @@ public function setReports(?array $reports): static } /** - * Gets id + * Gets title * - * @return string|null + * @return string */ - public function getId(): ?string + public function getTitle(): string { - return $this->container['id']; + return $this->container['title']; } /** - * Sets id + * Sets title * - * @param string|null $id [readonly] The unique id of the object + * @param string $title The name of this ReportPack * * @return $this */ - public function setId(?string $id): static + public function setTitle(string $title): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); } - $this->container['id'] = $id; + if ((mb_strlen($title) > 150)) { + throw new InvalidArgumentException('invalid length for $title when calling ReportPack., must be smaller than or equal to 150.'); + } + if ((mb_strlen($title) < 1)) { + throw new InvalidArgumentException('invalid length for $title when calling ReportPack., must be bigger than or equal to 1.'); + } + + $this->container['title'] = $title; return $this; } diff --git a/src/Model/ReportResponse.php b/src/Model/ReportResponse.php index 06b9a2b..257083e 100644 --- a/src/Model/ReportResponse.php +++ b/src/Model/ReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class ReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => 'mixed', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class ReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class ReportResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => true, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -445,6 +411,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ReportSortBy.php b/src/Model/ReportSortBy.php index 14f6d34..6afa93a 100644 --- a/src/Model/ReportSortBy.php +++ b/src/Model/ReportSortBy.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ReportTemplateColumnType.php b/src/Model/ReportTemplateColumnType.php index 3573185..b64b8b9 100644 --- a/src/Model/ReportTemplateColumnType.php +++ b/src/Model/ReportTemplateColumnType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/RightToWork.php b/src/Model/RightToWork.php index 3106dd3..93951e7 100644 --- a/src/Model/RightToWork.php +++ b/src/Model/RightToWork.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,9 +60,9 @@ class RightToWork implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'checked' => 'bool', - 'documentType' => '\SynergiTech\Staffology\Model\RightToWorkDocumentType', - 'documentRef' => 'string', 'documentExpiry' => '\DateTime', + 'documentRef' => 'string', + 'documentType' => '\SynergiTech\Staffology\Model\RightToWorkDocumentType', 'note' => 'string' ]; @@ -73,9 +73,9 @@ class RightToWork implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'checked' => null, - 'documentType' => null, - 'documentRef' => null, 'documentExpiry' => 'date', + 'documentRef' => null, + 'documentType' => null, 'note' => null ]; @@ -86,9 +86,9 @@ class RightToWork implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'checked' => false, - 'documentType' => false, - 'documentRef' => true, 'documentExpiry' => true, + 'documentRef' => true, + 'documentType' => false, 'note' => true ]; @@ -179,9 +179,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'checked' => 'checked', - 'documentType' => 'documentType', - 'documentRef' => 'documentRef', 'documentExpiry' => 'documentExpiry', + 'documentRef' => 'documentRef', + 'documentType' => 'documentType', 'note' => 'note' ]; @@ -192,9 +192,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'checked' => 'setChecked', - 'documentType' => 'setDocumentType', - 'documentRef' => 'setDocumentRef', 'documentExpiry' => 'setDocumentExpiry', + 'documentRef' => 'setDocumentRef', + 'documentType' => 'setDocumentType', 'note' => 'setNote' ]; @@ -205,9 +205,9 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'checked' => 'getChecked', - 'documentType' => 'getDocumentType', - 'documentRef' => 'getDocumentRef', 'documentExpiry' => 'getDocumentExpiry', + 'documentRef' => 'getDocumentRef', + 'documentType' => 'getDocumentType', 'note' => 'getNote' ]; @@ -268,9 +268,9 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('checked', $data ?? [], null); - $this->setIfExists('documentType', $data ?? [], null); - $this->setIfExists('documentRef', $data ?? [], null); $this->setIfExists('documentExpiry', $data ?? [], null); + $this->setIfExists('documentRef', $data ?? [], null); + $this->setIfExists('documentType', $data ?? [], null); $this->setIfExists('note', $data ?? [], null); } @@ -352,28 +352,35 @@ public function setChecked(?bool $checked): static } /** - * Gets documentType + * Gets documentExpiry * - * @return \SynergiTech\Staffology\Model\RightToWorkDocumentType|null + * @return \DateTime|null */ - public function getDocumentType(): ?\SynergiTech\Staffology\Model\RightToWorkDocumentType + public function getDocumentExpiry(): ?\DateTime { - return $this->container['documentType']; + return $this->container['documentExpiry']; } /** - * Sets documentType + * Sets documentExpiry * - * @param \SynergiTech\Staffology\Model\RightToWorkDocumentType|null $documentType documentType + * @param \DateTime|null $documentExpiry documentExpiry * * @return $this */ - public function setDocumentType(?\SynergiTech\Staffology\Model\RightToWorkDocumentType $documentType): static + public function setDocumentExpiry(?\DateTime $documentExpiry): static { - if (is_null($documentType)) { - throw new InvalidArgumentException('non-nullable documentType cannot be null'); + if (is_null($documentExpiry)) { + array_push($this->openAPINullablesSetToNull, 'documentExpiry'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('documentExpiry', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['documentType'] = $documentType; + $this->container['documentExpiry'] = $documentExpiry; return $this; } @@ -417,35 +424,28 @@ public function setDocumentRef(?string $documentRef): static } /** - * Gets documentExpiry + * Gets documentType * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\RightToWorkDocumentType|null */ - public function getDocumentExpiry(): ?\DateTime + public function getDocumentType(): ?\SynergiTech\Staffology\Model\RightToWorkDocumentType { - return $this->container['documentExpiry']; + return $this->container['documentType']; } /** - * Sets documentExpiry + * Sets documentType * - * @param \DateTime|null $documentExpiry documentExpiry + * @param \SynergiTech\Staffology\Model\RightToWorkDocumentType|null $documentType documentType * * @return $this */ - public function setDocumentExpiry(?\DateTime $documentExpiry): static + public function setDocumentType(?\SynergiTech\Staffology\Model\RightToWorkDocumentType $documentType): static { - if (is_null($documentExpiry)) { - array_push($this->openAPINullablesSetToNull, 'documentExpiry'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('documentExpiry', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($documentType)) { + throw new InvalidArgumentException('non-nullable documentType cannot be null'); } - $this->container['documentExpiry'] = $documentExpiry; + $this->container['documentType'] = $documentType; return $this; } diff --git a/src/Model/RightToWorkDocumentType.php b/src/Model/RightToWorkDocumentType.php index bd459e7..d6b8327 100644 --- a/src/Model/RightToWorkDocumentType.php +++ b/src/Model/RightToWorkDocumentType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/RightToWorkReport.php b/src/Model/RightToWorkReport.php index 623e23c..35553f2 100644 --- a/src/Model/RightToWorkReport.php +++ b/src/Model/RightToWorkReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,11 +60,11 @@ class RightToWorkReport implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'employer' => '\SynergiTech\Staffology\Model\Item', + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\RightToWorkReportLine[]', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -74,11 +74,11 @@ class RightToWorkReport implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'employer' => null, + 'isDraft' => null, 'lines' => null, 'report' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -88,11 +88,11 @@ class RightToWorkReport implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'employer' => false, + 'isDraft' => false, 'lines' => true, 'report' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -182,11 +182,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'employer' => 'employer', + 'isDraft' => 'isDraft', 'lines' => 'lines', 'report' => 'report', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -196,11 +196,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'employer' => 'setEmployer', + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', 'report' => 'setReport', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -210,11 +210,11 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'employer' => 'getEmployer', + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', 'report' => 'getReport', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -274,11 +274,11 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('employer', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -350,6 +350,33 @@ public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): stat return $this; } + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + /** * Gets lines * @@ -471,33 +498,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/RightToWorkReportLine.php b/src/Model/RightToWorkReportLine.php index f6cbaca..63c7569 100644 --- a/src/Model/RightToWorkReportLine.php +++ b/src/Model/RightToWorkReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class RightToWorkReportLine implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPITypes = [ + 'department' => 'string', 'employee' => '\SynergiTech\Staffology\Model\Item', 'payrollCode' => 'string', - 'department' => 'string', 'rightToWork' => '\SynergiTech\Staffology\Model\RightToWork' ]; @@ -71,9 +71,9 @@ class RightToWorkReportLine implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPIFormats = [ + 'department' => null, 'employee' => null, 'payrollCode' => null, - 'department' => null, 'rightToWork' => null ]; @@ -83,9 +83,9 @@ class RightToWorkReportLine implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPINullables = [ + 'department' => true, 'employee' => false, 'payrollCode' => true, - 'department' => true, 'rightToWork' => false ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'department' => 'department', 'employee' => 'employee', 'payrollCode' => 'payrollCode', - 'department' => 'department', 'rightToWork' => 'rightToWork' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'department' => 'setDepartment', 'employee' => 'setEmployee', 'payrollCode' => 'setPayrollCode', - 'department' => 'setDepartment', 'rightToWork' => 'setRightToWork' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'department' => 'getDepartment', 'employee' => 'getEmployee', 'payrollCode' => 'getPayrollCode', - 'department' => 'getDepartment', 'rightToWork' => 'getRightToWork' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('department', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); $this->setIfExists('rightToWork', $data ?? [], null); } @@ -309,6 +309,40 @@ public function valid(): bool } + /** + * Gets department + * + * @return string|null + */ + public function getDepartment(): ?string + { + return $this->container['department']; + } + + /** + * Sets department + * + * @param string|null $department department + * + * @return $this + */ + public function setDepartment(?string $department): static + { + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('department', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['department'] = $department; + + return $this; + } + /** * Gets employee * @@ -370,40 +404,6 @@ public function setPayrollCode(?string $payrollCode): static return $this; } - /** - * Gets department - * - * @return string|null - */ - public function getDepartment(): ?string - { - return $this->container['department']; - } - - /** - * Sets department - * - * @param string|null $department department - * - * @return $this - */ - public function setDepartment(?string $department): static - { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['department'] = $department; - - return $this; - } - /** * Gets rightToWork * diff --git a/src/Model/RightToWorkReportReportResponse.php b/src/Model/RightToWorkReportReportResponse.php index 33ce548..f2a0ead 100644 --- a/src/Model/RightToWorkReportReportResponse.php +++ b/src/Model/RightToWorkReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class RightToWorkReportReportResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\RightToWorkReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class RightToWorkReportReportResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class RightToWorkReportReportResponse implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/RoleBasis.php b/src/Model/RoleBasis.php index b2d3205..c2db0bc 100644 --- a/src/Model/RoleBasis.php +++ b/src/Model/RoleBasis.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/RoleType.php b/src/Model/RoleType.php index 48eb468..e533c55 100644 --- a/src/Model/RoleType.php +++ b/src/Model/RoleType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/RtiAgent.php b/src/Model/RtiAgent.php index 27cb467..0468b4b 100644 --- a/src/Model/RtiAgent.php +++ b/src/Model/RtiAgent.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class RtiAgent implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'address' => '\SynergiTech\Staffology\Model\Address', 'agentId' => 'string', 'company' => 'string', - 'address' => '\SynergiTech\Staffology\Model\Address', 'contact' => '\SynergiTech\Staffology\Model\RtiContact' ]; @@ -71,9 +71,9 @@ class RtiAgent implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'address' => null, 'agentId' => null, 'company' => null, - 'address' => null, 'contact' => null ]; @@ -83,9 +83,9 @@ class RtiAgent implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'address' => false, 'agentId' => true, 'company' => true, - 'address' => false, 'contact' => false ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'address' => 'address', 'agentId' => 'agentId', 'company' => 'company', - 'address' => 'address', 'contact' => 'contact' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'address' => 'setAddress', 'agentId' => 'setAgentId', 'company' => 'setCompany', - 'address' => 'setAddress', 'contact' => 'setContact' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'address' => 'getAddress', 'agentId' => 'getAgentId', 'company' => 'getCompany', - 'address' => 'getAddress', 'contact' => 'getContact' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('address', $data ?? [], null); $this->setIfExists('agentId', $data ?? [], null); $this->setIfExists('company', $data ?? [], null); - $this->setIfExists('address', $data ?? [], null); $this->setIfExists('contact', $data ?? [], null); } @@ -309,6 +309,33 @@ public function valid(): bool } + /** + * Gets address + * + * @return \SynergiTech\Staffology\Model\Address|null + */ + public function getAddress(): ?\SynergiTech\Staffology\Model\Address + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \SynergiTech\Staffology\Model\Address|null $address address + * + * @return $this + */ + public function setAddress(?\SynergiTech\Staffology\Model\Address $address): static + { + if (is_null($address)) { + throw new InvalidArgumentException('non-nullable address cannot be null'); + } + $this->container['address'] = $address; + + return $this; + } + /** * Gets agentId * @@ -377,33 +404,6 @@ public function setCompany(?string $company): static return $this; } - /** - * Gets address - * - * @return \SynergiTech\Staffology\Model\Address|null - */ - public function getAddress(): ?\SynergiTech\Staffology\Model\Address - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param \SynergiTech\Staffology\Model\Address|null $address address - * - * @return $this - */ - public function setAddress(?\SynergiTech\Staffology\Model\Address $address): static - { - if (is_null($address)) { - throw new InvalidArgumentException('non-nullable address cannot be null'); - } - $this->container['address'] = $address; - - return $this; - } - /** * Gets contact * diff --git a/src/Model/RtiContact.php b/src/Model/RtiContact.php index 3fe9b6e..cd2b73a 100644 --- a/src/Model/RtiContact.php +++ b/src/Model/RtiContact.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class RtiContact implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'email' => 'string', 'firstName' => 'string', 'lastName' => 'string', - 'email' => 'string', 'telephone' => 'string' ]; @@ -71,9 +71,9 @@ class RtiContact implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'email' => null, 'firstName' => null, 'lastName' => null, - 'email' => null, 'telephone' => null ]; @@ -83,9 +83,9 @@ class RtiContact implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'email' => true, 'firstName' => true, 'lastName' => true, - 'email' => true, 'telephone' => true ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'email' => 'email', 'firstName' => 'firstName', 'lastName' => 'lastName', - 'email' => 'email', 'telephone' => 'telephone' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'email' => 'setEmail', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', - 'email' => 'setEmail', 'telephone' => 'setTelephone' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'email' => 'getEmail', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', - 'email' => 'getEmail', 'telephone' => 'getTelephone' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('email', $data ?? [], null); $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); - $this->setIfExists('email', $data ?? [], null); $this->setIfExists('telephone', $data ?? [], null); } @@ -294,6 +294,10 @@ public function listInvalidProperties(): array { $invalidProperties = []; + if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) > 150)) { + $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 150."; + } + if (!is_null($this->container['firstName']) && (mb_strlen($this->container['firstName']) > 50)) { $invalidProperties[] = "invalid value for 'firstName', the character length must be smaller than or equal to 50."; } @@ -302,10 +306,6 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'lastName', the character length must be smaller than or equal to 50."; } - if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) > 150)) { - $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 150."; - } - if (!is_null($this->container['telephone']) && (mb_strlen($this->container['telephone']) > 50)) { $invalidProperties[] = "invalid value for 'telephone', the character length must be smaller than or equal to 50."; } @@ -326,115 +326,115 @@ public function valid(): bool /** - * Gets firstName + * Gets email * * @return string|null */ - public function getFirstName(): ?string + public function getEmail(): ?string { - return $this->container['firstName']; + return $this->container['email']; } /** - * Sets firstName + * Sets email * - * @param string|null $firstName firstName + * @param string|null $email email * * @return $this */ - public function setFirstName(?string $firstName): static + public function setEmail(?string $email): static { - if (is_null($firstName)) { - array_push($this->openAPINullablesSetToNull, 'firstName'); + if (is_null($email)) { + array_push($this->openAPINullablesSetToNull, 'email'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('firstName', $nullablesSetToNull); + $index = array_search('email', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($firstName) && (mb_strlen($firstName) > 50)) { - throw new InvalidArgumentException('invalid length for $firstName when calling RtiContact., must be smaller than or equal to 50.'); + if (!is_null($email) && (mb_strlen($email) > 150)) { + throw new InvalidArgumentException('invalid length for $email when calling RtiContact., must be smaller than or equal to 150.'); } - $this->container['firstName'] = $firstName; + $this->container['email'] = $email; return $this; } /** - * Gets lastName + * Gets firstName * * @return string|null */ - public function getLastName(): ?string + public function getFirstName(): ?string { - return $this->container['lastName']; + return $this->container['firstName']; } /** - * Sets lastName + * Sets firstName * - * @param string|null $lastName lastName + * @param string|null $firstName firstName * * @return $this */ - public function setLastName(?string $lastName): static + public function setFirstName(?string $firstName): static { - if (is_null($lastName)) { - array_push($this->openAPINullablesSetToNull, 'lastName'); + if (is_null($firstName)) { + array_push($this->openAPINullablesSetToNull, 'firstName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastName', $nullablesSetToNull); + $index = array_search('firstName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($lastName) && (mb_strlen($lastName) > 50)) { - throw new InvalidArgumentException('invalid length for $lastName when calling RtiContact., must be smaller than or equal to 50.'); + if (!is_null($firstName) && (mb_strlen($firstName) > 50)) { + throw new InvalidArgumentException('invalid length for $firstName when calling RtiContact., must be smaller than or equal to 50.'); } - $this->container['lastName'] = $lastName; + $this->container['firstName'] = $firstName; return $this; } /** - * Gets email + * Gets lastName * * @return string|null */ - public function getEmail(): ?string + public function getLastName(): ?string { - return $this->container['email']; + return $this->container['lastName']; } /** - * Sets email + * Sets lastName * - * @param string|null $email email + * @param string|null $lastName lastName * * @return $this */ - public function setEmail(?string $email): static + public function setLastName(?string $lastName): static { - if (is_null($email)) { - array_push($this->openAPINullablesSetToNull, 'email'); + if (is_null($lastName)) { + array_push($this->openAPINullablesSetToNull, 'lastName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('email', $nullablesSetToNull); + $index = array_search('lastName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($email) && (mb_strlen($email) > 150)) { - throw new InvalidArgumentException('invalid length for $email when calling RtiContact., must be smaller than or equal to 150.'); + if (!is_null($lastName) && (mb_strlen($lastName) > 50)) { + throw new InvalidArgumentException('invalid length for $lastName when calling RtiContact., must be smaller than or equal to 50.'); } - $this->container['email'] = $email; + $this->container['lastName'] = $lastName; return $this; } diff --git a/src/Model/RtiEmployeeAddress.php b/src/Model/RtiEmployeeAddress.php index 3aa653d..bbf9e31 100644 --- a/src/Model/RtiEmployeeAddress.php +++ b/src/Model/RtiEmployeeAddress.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class RtiEmployeeAddress implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ + 'country' => 'string', + 'foreignCountry' => 'string', 'line' => 'string[]', - 'postcode' => 'string', 'postCode' => 'string', - 'ukPostcode' => 'string', - 'country' => 'string', - 'foreignCountry' => 'string' + 'postcode' => 'string', + 'ukPostcode' => 'string' ]; /** @@ -73,12 +73,12 @@ class RtiEmployeeAddress implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ + 'country' => null, + 'foreignCountry' => null, 'line' => null, - 'postcode' => null, 'postCode' => null, - 'ukPostcode' => null, - 'country' => null, - 'foreignCountry' => null + 'postcode' => null, + 'ukPostcode' => null ]; /** @@ -87,12 +87,12 @@ class RtiEmployeeAddress implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ + 'country' => true, + 'foreignCountry' => true, 'line' => true, - 'postcode' => true, 'postCode' => true, - 'ukPostcode' => true, - 'country' => true, - 'foreignCountry' => true + 'postcode' => true, + 'ukPostcode' => true ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'country' => 'country', + 'foreignCountry' => 'foreignCountry', 'line' => 'line', - 'postcode' => 'postcode', 'postCode' => 'postCode', - 'ukPostcode' => 'ukPostcode', - 'country' => 'country', - 'foreignCountry' => 'foreignCountry' + 'postcode' => 'postcode', + 'ukPostcode' => 'ukPostcode' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'country' => 'setCountry', + 'foreignCountry' => 'setForeignCountry', 'line' => 'setLine', - 'postcode' => 'setPostcode', 'postCode' => 'setPostCode', - 'ukPostcode' => 'setUkPostcode', - 'country' => 'setCountry', - 'foreignCountry' => 'setForeignCountry' + 'postcode' => 'setPostcode', + 'ukPostcode' => 'setUkPostcode' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'country' => 'getCountry', + 'foreignCountry' => 'getForeignCountry', 'line' => 'getLine', - 'postcode' => 'getPostcode', 'postCode' => 'getPostCode', - 'ukPostcode' => 'getUkPostcode', - 'country' => 'getCountry', - 'foreignCountry' => 'getForeignCountry' + 'postcode' => 'getPostcode', + 'ukPostcode' => 'getUkPostcode' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('foreignCountry', $data ?? [], null); $this->setIfExists('line', $data ?? [], null); - $this->setIfExists('postcode', $data ?? [], null); $this->setIfExists('postCode', $data ?? [], null); + $this->setIfExists('postcode', $data ?? [], null); $this->setIfExists('ukPostcode', $data ?? [], null); - $this->setIfExists('country', $data ?? [], null); - $this->setIfExists('foreignCountry', $data ?? [], null); } /** @@ -324,205 +324,205 @@ public function valid(): bool /** - * Gets line + * Gets country * - * @return string[]|null + * @return string|null */ - public function getLine(): ?array + public function getCountry(): ?string { - return $this->container['line']; + return $this->container['country']; } /** - * Sets line + * Sets country * - * @param string[]|null $line line + * @param string|null $country country * * @return $this */ - public function setLine(?array $line): static + public function setCountry(?string $country): static { - if (is_null($line)) { - array_push($this->openAPINullablesSetToNull, 'line'); + if (is_null($country)) { + array_push($this->openAPINullablesSetToNull, 'country'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('line', $nullablesSetToNull); + $index = array_search('country', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['line'] = $line; + $this->container['country'] = $country; return $this; } /** - * Gets postcode + * Gets foreignCountry * * @return string|null */ - public function getPostcode(): ?string + public function getForeignCountry(): ?string { - return $this->container['postcode']; + return $this->container['foreignCountry']; } /** - * Sets postcode + * Sets foreignCountry * - * @param string|null $postcode postcode + * @param string|null $foreignCountry foreignCountry * * @return $this */ - public function setPostcode(?string $postcode): static + public function setForeignCountry(?string $foreignCountry): static { - if (is_null($postcode)) { - array_push($this->openAPINullablesSetToNull, 'postcode'); + if (is_null($foreignCountry)) { + array_push($this->openAPINullablesSetToNull, 'foreignCountry'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('postcode', $nullablesSetToNull); + $index = array_search('foreignCountry', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['postcode'] = $postcode; + $this->container['foreignCountry'] = $foreignCountry; return $this; } /** - * Gets postCode + * Gets line * - * @return string|null + * @return string[]|null */ - public function getPostCode(): ?string + public function getLine(): ?array { - return $this->container['postCode']; + return $this->container['line']; } /** - * Sets postCode + * Sets line * - * @param string|null $postCode postCode + * @param string[]|null $line line * * @return $this */ - public function setPostCode(?string $postCode): static + public function setLine(?array $line): static { - if (is_null($postCode)) { - array_push($this->openAPINullablesSetToNull, 'postCode'); + if (is_null($line)) { + array_push($this->openAPINullablesSetToNull, 'line'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('postCode', $nullablesSetToNull); + $index = array_search('line', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['postCode'] = $postCode; + $this->container['line'] = $line; return $this; } /** - * Gets ukPostcode + * Gets postCode * * @return string|null */ - public function getUkPostcode(): ?string + public function getPostCode(): ?string { - return $this->container['ukPostcode']; + return $this->container['postCode']; } /** - * Sets ukPostcode + * Sets postCode * - * @param string|null $ukPostcode ukPostcode + * @param string|null $postCode postCode * * @return $this */ - public function setUkPostcode(?string $ukPostcode): static + public function setPostCode(?string $postCode): static { - if (is_null($ukPostcode)) { - array_push($this->openAPINullablesSetToNull, 'ukPostcode'); + if (is_null($postCode)) { + array_push($this->openAPINullablesSetToNull, 'postCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('ukPostcode', $nullablesSetToNull); + $index = array_search('postCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['ukPostcode'] = $ukPostcode; + $this->container['postCode'] = $postCode; return $this; } /** - * Gets country + * Gets postcode * * @return string|null */ - public function getCountry(): ?string + public function getPostcode(): ?string { - return $this->container['country']; + return $this->container['postcode']; } /** - * Sets country + * Sets postcode * - * @param string|null $country country + * @param string|null $postcode postcode * * @return $this */ - public function setCountry(?string $country): static + public function setPostcode(?string $postcode): static { - if (is_null($country)) { - array_push($this->openAPINullablesSetToNull, 'country'); + if (is_null($postcode)) { + array_push($this->openAPINullablesSetToNull, 'postcode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('country', $nullablesSetToNull); + $index = array_search('postcode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['country'] = $country; + $this->container['postcode'] = $postcode; return $this; } /** - * Gets foreignCountry + * Gets ukPostcode * * @return string|null */ - public function getForeignCountry(): ?string + public function getUkPostcode(): ?string { - return $this->container['foreignCountry']; + return $this->container['ukPostcode']; } /** - * Sets foreignCountry + * Sets ukPostcode * - * @param string|null $foreignCountry foreignCountry + * @param string|null $ukPostcode ukPostcode * * @return $this */ - public function setForeignCountry(?string $foreignCountry): static + public function setUkPostcode(?string $ukPostcode): static { - if (is_null($foreignCountry)) { - array_push($this->openAPINullablesSetToNull, 'foreignCountry'); + if (is_null($ukPostcode)) { + array_push($this->openAPINullablesSetToNull, 'ukPostcode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('foreignCountry', $nullablesSetToNull); + $index = array_search('ukPostcode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['foreignCountry'] = $foreignCountry; + $this->container['ukPostcode'] = $ukPostcode; return $this; } diff --git a/src/Model/RtiEmployeeName.php b/src/Model/RtiEmployeeName.php index d35f13e..8b7a13a 100644 --- a/src/Model/RtiEmployeeName.php +++ b/src/Model/RtiEmployeeName.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class RtiEmployeeName implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'ttl' => 'string', 'fore' => 'string[]', 'initials' => 'string', - 'sur' => 'string' + 'sur' => 'string', + 'ttl' => 'string' ]; /** @@ -71,10 +71,10 @@ class RtiEmployeeName implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'ttl' => null, 'fore' => null, 'initials' => null, - 'sur' => null + 'sur' => null, + 'ttl' => null ]; /** @@ -83,10 +83,10 @@ class RtiEmployeeName implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'ttl' => true, 'fore' => true, 'initials' => true, - 'sur' => true + 'sur' => true, + 'ttl' => true ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'ttl' => 'ttl', 'fore' => 'fore', 'initials' => 'initials', - 'sur' => 'sur' + 'sur' => 'sur', + 'ttl' => 'ttl' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'ttl' => 'setTtl', 'fore' => 'setFore', 'initials' => 'setInitials', - 'sur' => 'setSur' + 'sur' => 'setSur', + 'ttl' => 'setTtl' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'ttl' => 'getTtl', 'fore' => 'getFore', 'initials' => 'getInitials', - 'sur' => 'getSur' + 'sur' => 'getSur', + 'ttl' => 'getTtl' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('ttl', $data ?? [], null); $this->setIfExists('fore', $data ?? [], null); $this->setIfExists('initials', $data ?? [], null); $this->setIfExists('sur', $data ?? [], null); + $this->setIfExists('ttl', $data ?? [], null); } /** @@ -309,40 +309,6 @@ public function valid(): bool } - /** - * Gets ttl - * - * @return string|null - */ - public function getTtl(): ?string - { - return $this->container['ttl']; - } - - /** - * Sets ttl - * - * @param string|null $ttl ttl - * - * @return $this - */ - public function setTtl(?string $ttl): static - { - if (is_null($ttl)) { - array_push($this->openAPINullablesSetToNull, 'ttl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('ttl', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['ttl'] = $ttl; - - return $this; - } - /** * Gets fore * @@ -444,6 +410,40 @@ public function setSur(?string $sur): static return $this; } + + /** + * Gets ttl + * + * @return string|null + */ + public function getTtl(): ?string + { + return $this->container['ttl']; + } + + /** + * Sets ttl + * + * @param string|null $ttl ttl + * + * @return $this + */ + public function setTtl(?string $ttl): static + { + if (is_null($ttl)) { + array_push($this->openAPINullablesSetToNull, 'ttl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('ttl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['ttl'] = $ttl; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/RtiSenderType.php b/src/Model/RtiSenderType.php index b16dc1a..e917ab0 100644 --- a/src/Model/RtiSenderType.php +++ b/src/Model/RtiSenderType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/RtiSubmissionSettings.php b/src/Model/RtiSubmissionSettings.php index 212b780..a59e133 100644 --- a/src/Model/RtiSubmissionSettings.php +++ b/src/Model/RtiSubmissionSettings.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,20 +59,20 @@ class RtiSubmissionSettings implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPITypes = [ - 'senderType' => '\SynergiTech\Staffology\Model\RtiSenderType', - 'senderId' => 'string', - 'password' => 'string', + 'agent' => '\SynergiTech\Staffology\Model\RtiAgent', + 'allowLinkedEps' => 'bool', + 'autoSubmitEps' => 'bool', + 'autoSubmitFps' => 'bool', + 'contact' => '\SynergiTech\Staffology\Model\RtiContact', 'excludeNilPaid' => 'bool', 'includeHashCrossRef' => 'bool', - 'autoSubmitFps' => 'bool', - 'testInLive' => 'bool', - 'useTestGateway' => 'bool', 'overrideTimestampValue' => 'string', - 'contact' => '\SynergiTech\Staffology\Model\RtiContact', - 'agent' => '\SynergiTech\Staffology\Model\RtiAgent', - 'allowLinkedEps' => 'bool', + 'password' => 'string', + 'senderId' => 'string', + 'senderType' => '\SynergiTech\Staffology\Model\RtiSenderType', 'shouldCompressFps' => 'bool', - 'autoSubmitEps' => 'bool' + 'testInLive' => 'bool', + 'useTestGateway' => 'bool' ]; /** @@ -81,20 +81,20 @@ class RtiSubmissionSettings implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPIFormats = [ - 'senderType' => null, - 'senderId' => null, - 'password' => null, + 'agent' => null, + 'allowLinkedEps' => null, + 'autoSubmitEps' => null, + 'autoSubmitFps' => null, + 'contact' => null, 'excludeNilPaid' => null, 'includeHashCrossRef' => null, - 'autoSubmitFps' => null, - 'testInLive' => null, - 'useTestGateway' => null, 'overrideTimestampValue' => null, - 'contact' => null, - 'agent' => null, - 'allowLinkedEps' => null, + 'password' => null, + 'senderId' => null, + 'senderType' => null, 'shouldCompressFps' => null, - 'autoSubmitEps' => null + 'testInLive' => null, + 'useTestGateway' => null ]; /** @@ -103,20 +103,20 @@ class RtiSubmissionSettings implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPINullables = [ - 'senderType' => false, - 'senderId' => true, - 'password' => true, + 'agent' => false, + 'allowLinkedEps' => false, + 'autoSubmitEps' => false, + 'autoSubmitFps' => false, + 'contact' => false, 'excludeNilPaid' => false, 'includeHashCrossRef' => false, - 'autoSubmitFps' => false, - 'testInLive' => false, - 'useTestGateway' => false, 'overrideTimestampValue' => true, - 'contact' => false, - 'agent' => false, - 'allowLinkedEps' => false, + 'password' => true, + 'senderId' => true, + 'senderType' => false, 'shouldCompressFps' => false, - 'autoSubmitEps' => false + 'testInLive' => false, + 'useTestGateway' => false ]; /** @@ -205,20 +205,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'senderType' => 'senderType', - 'senderId' => 'senderId', - 'password' => 'password', + 'agent' => 'agent', + 'allowLinkedEps' => 'allowLinkedEps', + 'autoSubmitEps' => 'autoSubmitEps', + 'autoSubmitFps' => 'autoSubmitFps', + 'contact' => 'contact', 'excludeNilPaid' => 'excludeNilPaid', 'includeHashCrossRef' => 'includeHashCrossRef', - 'autoSubmitFps' => 'autoSubmitFps', - 'testInLive' => 'testInLive', - 'useTestGateway' => 'useTestGateway', 'overrideTimestampValue' => 'overrideTimestampValue', - 'contact' => 'contact', - 'agent' => 'agent', - 'allowLinkedEps' => 'allowLinkedEps', + 'password' => 'password', + 'senderId' => 'senderId', + 'senderType' => 'senderType', 'shouldCompressFps' => 'shouldCompressFps', - 'autoSubmitEps' => 'autoSubmitEps' + 'testInLive' => 'testInLive', + 'useTestGateway' => 'useTestGateway' ]; /** @@ -227,20 +227,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'senderType' => 'setSenderType', - 'senderId' => 'setSenderId', - 'password' => 'setPassword', + 'agent' => 'setAgent', + 'allowLinkedEps' => 'setAllowLinkedEps', + 'autoSubmitEps' => 'setAutoSubmitEps', + 'autoSubmitFps' => 'setAutoSubmitFps', + 'contact' => 'setContact', 'excludeNilPaid' => 'setExcludeNilPaid', 'includeHashCrossRef' => 'setIncludeHashCrossRef', - 'autoSubmitFps' => 'setAutoSubmitFps', - 'testInLive' => 'setTestInLive', - 'useTestGateway' => 'setUseTestGateway', 'overrideTimestampValue' => 'setOverrideTimestampValue', - 'contact' => 'setContact', - 'agent' => 'setAgent', - 'allowLinkedEps' => 'setAllowLinkedEps', + 'password' => 'setPassword', + 'senderId' => 'setSenderId', + 'senderType' => 'setSenderType', 'shouldCompressFps' => 'setShouldCompressFps', - 'autoSubmitEps' => 'setAutoSubmitEps' + 'testInLive' => 'setTestInLive', + 'useTestGateway' => 'setUseTestGateway' ]; /** @@ -249,20 +249,20 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'senderType' => 'getSenderType', - 'senderId' => 'getSenderId', - 'password' => 'getPassword', + 'agent' => 'getAgent', + 'allowLinkedEps' => 'getAllowLinkedEps', + 'autoSubmitEps' => 'getAutoSubmitEps', + 'autoSubmitFps' => 'getAutoSubmitFps', + 'contact' => 'getContact', 'excludeNilPaid' => 'getExcludeNilPaid', 'includeHashCrossRef' => 'getIncludeHashCrossRef', - 'autoSubmitFps' => 'getAutoSubmitFps', - 'testInLive' => 'getTestInLive', - 'useTestGateway' => 'getUseTestGateway', 'overrideTimestampValue' => 'getOverrideTimestampValue', - 'contact' => 'getContact', - 'agent' => 'getAgent', - 'allowLinkedEps' => 'getAllowLinkedEps', + 'password' => 'getPassword', + 'senderId' => 'getSenderId', + 'senderType' => 'getSenderType', 'shouldCompressFps' => 'getShouldCompressFps', - 'autoSubmitEps' => 'getAutoSubmitEps' + 'testInLive' => 'getTestInLive', + 'useTestGateway' => 'getUseTestGateway' ]; /** @@ -321,20 +321,20 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('senderType', $data ?? [], null); - $this->setIfExists('senderId', $data ?? [], null); - $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('agent', $data ?? [], null); + $this->setIfExists('allowLinkedEps', $data ?? [], null); + $this->setIfExists('autoSubmitEps', $data ?? [], null); + $this->setIfExists('autoSubmitFps', $data ?? [], null); + $this->setIfExists('contact', $data ?? [], null); $this->setIfExists('excludeNilPaid', $data ?? [], null); $this->setIfExists('includeHashCrossRef', $data ?? [], null); - $this->setIfExists('autoSubmitFps', $data ?? [], null); - $this->setIfExists('testInLive', $data ?? [], null); - $this->setIfExists('useTestGateway', $data ?? [], null); $this->setIfExists('overrideTimestampValue', $data ?? [], null); - $this->setIfExists('contact', $data ?? [], null); - $this->setIfExists('agent', $data ?? [], null); - $this->setIfExists('allowLinkedEps', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('senderId', $data ?? [], null); + $this->setIfExists('senderType', $data ?? [], null); $this->setIfExists('shouldCompressFps', $data ?? [], null); - $this->setIfExists('autoSubmitEps', $data ?? [], null); + $this->setIfExists('testInLive', $data ?? [], null); + $this->setIfExists('useTestGateway', $data ?? [], null); } /** @@ -364,16 +364,16 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (!is_null($this->container['senderId']) && (mb_strlen($this->container['senderId']) > 30)) { - $invalidProperties[] = "invalid value for 'senderId', the character length must be smaller than or equal to 30."; + if (!is_null($this->container['overrideTimestampValue']) && (mb_strlen($this->container['overrideTimestampValue']) > 25)) { + $invalidProperties[] = "invalid value for 'overrideTimestampValue', the character length must be smaller than or equal to 25."; } if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) > 200)) { $invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 200."; } - if (!is_null($this->container['overrideTimestampValue']) && (mb_strlen($this->container['overrideTimestampValue']) > 25)) { - $invalidProperties[] = "invalid value for 'overrideTimestampValue', the character length must be smaller than or equal to 25."; + if (!is_null($this->container['senderId']) && (mb_strlen($this->container['senderId']) > 30)) { + $invalidProperties[] = "invalid value for 'senderId', the character length must be smaller than or equal to 30."; } return $invalidProperties; @@ -392,239 +392,190 @@ public function valid(): bool /** - * Gets senderType - * - * @return \SynergiTech\Staffology\Model\RtiSenderType|null - */ - public function getSenderType(): ?\SynergiTech\Staffology\Model\RtiSenderType - { - return $this->container['senderType']; - } - - /** - * Sets senderType - * - * @param \SynergiTech\Staffology\Model\RtiSenderType|null $senderType senderType - * - * @return $this - */ - public function setSenderType(?\SynergiTech\Staffology\Model\RtiSenderType $senderType): static - { - if (is_null($senderType)) { - throw new InvalidArgumentException('non-nullable senderType cannot be null'); - } - $this->container['senderType'] = $senderType; - - return $this; - } - - /** - * Gets senderId + * Gets agent * - * @return string|null + * @return \SynergiTech\Staffology\Model\RtiAgent|null */ - public function getSenderId(): ?string + public function getAgent(): ?\SynergiTech\Staffology\Model\RtiAgent { - return $this->container['senderId']; + return $this->container['agent']; } /** - * Sets senderId + * Sets agent * - * @param string|null $senderId The SenderId used to submit RTI documents to HMRC + * @param \SynergiTech\Staffology\Model\RtiAgent|null $agent agent * * @return $this */ - public function setSenderId(?string $senderId): static + public function setAgent(?\SynergiTech\Staffology\Model\RtiAgent $agent): static { - if (is_null($senderId)) { - array_push($this->openAPINullablesSetToNull, 'senderId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('senderId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($senderId) && (mb_strlen($senderId) > 30)) { - throw new InvalidArgumentException('invalid length for $senderId when calling RtiSubmissionSettings., must be smaller than or equal to 30.'); + if (is_null($agent)) { + throw new InvalidArgumentException('non-nullable agent cannot be null'); } - - $this->container['senderId'] = $senderId; + $this->container['agent'] = $agent; return $this; } /** - * Gets password + * Gets allowLinkedEps * - * @return string|null + * @return bool|null */ - public function getPassword(): ?string + public function getAllowLinkedEps(): ?bool { - return $this->container['password']; + return $this->container['allowLinkedEps']; } /** - * Sets password + * Sets allowLinkedEps * - * @param string|null $password The Password used to submit RTI documents to HMRC + * @param bool|null $allowLinkedEps If set to true this will allow you to submit a combined Employer Payment Summary * * @return $this */ - public function setPassword(?string $password): static + public function setAllowLinkedEps(?bool $allowLinkedEps): static { - if (is_null($password)) { - array_push($this->openAPINullablesSetToNull, 'password'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('password', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($password) && (mb_strlen($password) > 200)) { - throw new InvalidArgumentException('invalid length for $password when calling RtiSubmissionSettings., must be smaller than or equal to 200.'); + if (is_null($allowLinkedEps)) { + throw new InvalidArgumentException('non-nullable allowLinkedEps cannot be null'); } - - $this->container['password'] = $password; + $this->container['allowLinkedEps'] = $allowLinkedEps; return $this; } /** - * Gets excludeNilPaid + * Gets autoSubmitEps * * @return bool|null */ - public function getExcludeNilPaid(): ?bool + public function getAutoSubmitEps(): ?bool { - return $this->container['excludeNilPaid']; + return $this->container['autoSubmitEps']; } /** - * Sets excludeNilPaid + * Sets autoSubmitEps * - * @param bool|null $excludeNilPaid Whether or not to include Employees paid a zero amount on your FPS + * @param bool|null $autoSubmitEps If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun. * * @return $this */ - public function setExcludeNilPaid(?bool $excludeNilPaid): static + public function setAutoSubmitEps(?bool $autoSubmitEps): static { - if (is_null($excludeNilPaid)) { - throw new InvalidArgumentException('non-nullable excludeNilPaid cannot be null'); + if (is_null($autoSubmitEps)) { + throw new InvalidArgumentException('non-nullable autoSubmitEps cannot be null'); } - $this->container['excludeNilPaid'] = $excludeNilPaid; + $this->container['autoSubmitEps'] = $autoSubmitEps; return $this; } /** - * Gets includeHashCrossRef + * Gets autoSubmitFps * * @return bool|null */ - public function getIncludeHashCrossRef(): ?bool + public function getAutoSubmitFps(): ?bool { - return $this->container['includeHashCrossRef']; + return $this->container['autoSubmitFps']; } /** - * Sets includeHashCrossRef + * Sets autoSubmitFps * - * @param bool|null $includeHashCrossRef [readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions This is automatically set to true if you use a bank payments CSV format that supports it or set to false if not + * @param bool|null $autoSubmitFps If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun * * @return $this */ - public function setIncludeHashCrossRef(?bool $includeHashCrossRef): static + public function setAutoSubmitFps(?bool $autoSubmitFps): static { - if (is_null($includeHashCrossRef)) { - throw new InvalidArgumentException('non-nullable includeHashCrossRef cannot be null'); + if (is_null($autoSubmitFps)) { + throw new InvalidArgumentException('non-nullable autoSubmitFps cannot be null'); } - $this->container['includeHashCrossRef'] = $includeHashCrossRef; + $this->container['autoSubmitFps'] = $autoSubmitFps; return $this; } /** - * Gets autoSubmitFps + * Gets contact * - * @return bool|null + * @return \SynergiTech\Staffology\Model\RtiContact|null */ - public function getAutoSubmitFps(): ?bool + public function getContact(): ?\SynergiTech\Staffology\Model\RtiContact { - return $this->container['autoSubmitFps']; + return $this->container['contact']; } /** - * Sets autoSubmitFps + * Sets contact * - * @param bool|null $autoSubmitFps If set to true, we'll automatically send your FPS to HMRC whenever you finalise a PayRun + * @param \SynergiTech\Staffology\Model\RtiContact|null $contact contact * * @return $this */ - public function setAutoSubmitFps(?bool $autoSubmitFps): static + public function setContact(?\SynergiTech\Staffology\Model\RtiContact $contact): static { - if (is_null($autoSubmitFps)) { - throw new InvalidArgumentException('non-nullable autoSubmitFps cannot be null'); + if (is_null($contact)) { + throw new InvalidArgumentException('non-nullable contact cannot be null'); } - $this->container['autoSubmitFps'] = $autoSubmitFps; + $this->container['contact'] = $contact; return $this; } /** - * Gets testInLive + * Gets excludeNilPaid * * @return bool|null */ - public function getTestInLive(): ?bool + public function getExcludeNilPaid(): ?bool { - return $this->container['testInLive']; + return $this->container['excludeNilPaid']; } /** - * Sets testInLive + * Sets excludeNilPaid * - * @param bool|null $testInLive Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it + * @param bool|null $excludeNilPaid Whether or not to include Employees paid a zero amount on your FPS * * @return $this */ - public function setTestInLive(?bool $testInLive): static + public function setExcludeNilPaid(?bool $excludeNilPaid): static { - if (is_null($testInLive)) { - throw new InvalidArgumentException('non-nullable testInLive cannot be null'); + if (is_null($excludeNilPaid)) { + throw new InvalidArgumentException('non-nullable excludeNilPaid cannot be null'); } - $this->container['testInLive'] = $testInLive; + $this->container['excludeNilPaid'] = $excludeNilPaid; return $this; } /** - * Gets useTestGateway + * Gets includeHashCrossRef * * @return bool|null */ - public function getUseTestGateway(): ?bool + public function getIncludeHashCrossRef(): ?bool { - return $this->container['useTestGateway']; + return $this->container['includeHashCrossRef']; } /** - * Sets useTestGateway + * Sets includeHashCrossRef * - * @param bool|null $useTestGateway If set to true then your RTI documents will be sent to HMRCs test services instead of the live service + * @param bool|null $includeHashCrossRef [readonly] Whether or not the Bacs Cross Ref field is included on your FPS submissions This is automatically set to true if you use a bank payments CSV format that supports it or set to false if not * * @return $this */ - public function setUseTestGateway(?bool $useTestGateway): static + public function setIncludeHashCrossRef(?bool $includeHashCrossRef): static { - if (is_null($useTestGateway)) { - throw new InvalidArgumentException('non-nullable useTestGateway cannot be null'); + if (is_null($includeHashCrossRef)) { + throw new InvalidArgumentException('non-nullable includeHashCrossRef cannot be null'); } - $this->container['useTestGateway'] = $useTestGateway; + $this->container['includeHashCrossRef'] = $includeHashCrossRef; return $this; } @@ -668,82 +619,104 @@ public function setOverrideTimestampValue(?string $overrideTimestampValue): stat } /** - * Gets contact + * Gets password * - * @return \SynergiTech\Staffology\Model\RtiContact|null + * @return string|null */ - public function getContact(): ?\SynergiTech\Staffology\Model\RtiContact + public function getPassword(): ?string { - return $this->container['contact']; + return $this->container['password']; } /** - * Sets contact + * Sets password * - * @param \SynergiTech\Staffology\Model\RtiContact|null $contact contact + * @param string|null $password The Password used to submit RTI documents to HMRC * * @return $this */ - public function setContact(?\SynergiTech\Staffology\Model\RtiContact $contact): static + public function setPassword(?string $password): static { - if (is_null($contact)) { - throw new InvalidArgumentException('non-nullable contact cannot be null'); + if (is_null($password)) { + array_push($this->openAPINullablesSetToNull, 'password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($password) && (mb_strlen($password) > 200)) { + throw new InvalidArgumentException('invalid length for $password when calling RtiSubmissionSettings., must be smaller than or equal to 200.'); } - $this->container['contact'] = $contact; + + $this->container['password'] = $password; return $this; } /** - * Gets agent + * Gets senderId * - * @return \SynergiTech\Staffology\Model\RtiAgent|null + * @return string|null */ - public function getAgent(): ?\SynergiTech\Staffology\Model\RtiAgent + public function getSenderId(): ?string { - return $this->container['agent']; + return $this->container['senderId']; } /** - * Sets agent + * Sets senderId * - * @param \SynergiTech\Staffology\Model\RtiAgent|null $agent agent + * @param string|null $senderId The SenderId used to submit RTI documents to HMRC * * @return $this */ - public function setAgent(?\SynergiTech\Staffology\Model\RtiAgent $agent): static + public function setSenderId(?string $senderId): static { - if (is_null($agent)) { - throw new InvalidArgumentException('non-nullable agent cannot be null'); + if (is_null($senderId)) { + array_push($this->openAPINullablesSetToNull, 'senderId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('senderId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($senderId) && (mb_strlen($senderId) > 30)) { + throw new InvalidArgumentException('invalid length for $senderId when calling RtiSubmissionSettings., must be smaller than or equal to 30.'); } - $this->container['agent'] = $agent; + + $this->container['senderId'] = $senderId; return $this; } /** - * Gets allowLinkedEps + * Gets senderType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\RtiSenderType|null */ - public function getAllowLinkedEps(): ?bool + public function getSenderType(): ?\SynergiTech\Staffology\Model\RtiSenderType { - return $this->container['allowLinkedEps']; + return $this->container['senderType']; } /** - * Sets allowLinkedEps + * Sets senderType * - * @param bool|null $allowLinkedEps If set to true this will allow you to submit a combined Employer Payment Summary + * @param \SynergiTech\Staffology\Model\RtiSenderType|null $senderType senderType * * @return $this */ - public function setAllowLinkedEps(?bool $allowLinkedEps): static + public function setSenderType(?\SynergiTech\Staffology\Model\RtiSenderType $senderType): static { - if (is_null($allowLinkedEps)) { - throw new InvalidArgumentException('non-nullable allowLinkedEps cannot be null'); + if (is_null($senderType)) { + throw new InvalidArgumentException('non-nullable senderType cannot be null'); } - $this->container['allowLinkedEps'] = $allowLinkedEps; + $this->container['senderType'] = $senderType; return $this; } @@ -776,28 +749,55 @@ public function setShouldCompressFps(?bool $shouldCompressFps): static } /** - * Gets autoSubmitEps + * Gets testInLive * * @return bool|null */ - public function getAutoSubmitEps(): ?bool + public function getTestInLive(): ?bool { - return $this->container['autoSubmitEps']; + return $this->container['testInLive']; } /** - * Sets autoSubmitEps + * Sets testInLive * - * @param bool|null $autoSubmitEps If set to true, we'll automatically send your EPS to HMRC whenever you finalise a PayRun. + * @param bool|null $testInLive Used for testing the RTI gateway. If set to true then the Document Type name will have \"-TIL\" appended to it * * @return $this */ - public function setAutoSubmitEps(?bool $autoSubmitEps): static + public function setTestInLive(?bool $testInLive): static { - if (is_null($autoSubmitEps)) { - throw new InvalidArgumentException('non-nullable autoSubmitEps cannot be null'); + if (is_null($testInLive)) { + throw new InvalidArgumentException('non-nullable testInLive cannot be null'); } - $this->container['autoSubmitEps'] = $autoSubmitEps; + $this->container['testInLive'] = $testInLive; + + return $this; + } + + /** + * Gets useTestGateway + * + * @return bool|null + */ + public function getUseTestGateway(): ?bool + { + return $this->container['useTestGateway']; + } + + /** + * Sets useTestGateway + * + * @param bool|null $useTestGateway If set to true then your RTI documents will be sent to HMRCs test services instead of the live service + * + * @return $this + */ + public function setUseTestGateway(?bool $useTestGateway): static + { + if (is_null($useTestGateway)) { + throw new InvalidArgumentException('non-nullable useTestGateway cannot be null'); + } + $this->container['useTestGateway'] = $useTestGateway; return $this; } diff --git a/src/Model/RtiValidationWarning.php b/src/Model/RtiValidationWarning.php index cf9f1ae..f927db3 100644 --- a/src/Model/RtiValidationWarning.php +++ b/src/Model/RtiValidationWarning.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class RtiValidationWarning implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPITypes = [ - 'type' => '\SynergiTech\Staffology\Model\RtiValidationWarningType', - 'employeeId' => 'string' + 'employeeId' => 'string', + 'type' => '\SynergiTech\Staffology\Model\RtiValidationWarningType' ]; /** @@ -69,8 +69,8 @@ class RtiValidationWarning implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPIFormats = [ - 'type' => null, - 'employeeId' => 'uuid' + 'employeeId' => 'uuid', + 'type' => null ]; /** @@ -79,8 +79,8 @@ class RtiValidationWarning implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPINullables = [ - 'type' => false, - 'employeeId' => true + 'employeeId' => true, + 'type' => false ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', - 'employeeId' => 'employeeId' + 'employeeId' => 'employeeId', + 'type' => 'type' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', - 'employeeId' => 'setEmployeeId' + 'employeeId' => 'setEmployeeId', + 'type' => 'setType' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', - 'employeeId' => 'getEmployeeId' + 'employeeId' => 'getEmployeeId', + 'type' => 'getType' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('employeeId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -295,33 +295,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return \SynergiTech\Staffology\Model\RtiValidationWarningType|null - */ - public function getType(): ?\SynergiTech\Staffology\Model\RtiValidationWarningType - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \SynergiTech\Staffology\Model\RtiValidationWarningType|null $type type - * - * @return $this - */ - public function setType(?\SynergiTech\Staffology\Model\RtiValidationWarningType $type): static - { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets employeeId * @@ -355,6 +328,33 @@ public function setEmployeeId(?string $employeeId): static return $this; } + + /** + * Gets type + * + * @return \SynergiTech\Staffology\Model\RtiValidationWarningType|null + */ + public function getType(): ?\SynergiTech\Staffology\Model\RtiValidationWarningType + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \SynergiTech\Staffology\Model\RtiValidationWarningType|null $type type + * + * @return $this + */ + public function setType(?\SynergiTech\Staffology\Model\RtiValidationWarningType $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/RtiValidationWarningType.php b/src/Model/RtiValidationWarningType.php index d4d2508..2ac3b5f 100644 --- a/src/Model/RtiValidationWarningType.php +++ b/src/Model/RtiValidationWarningType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/ServiceBand.php b/src/Model/ServiceBand.php index b341af6..e848e57 100644 --- a/src/Model/ServiceBand.php +++ b/src/Model/ServiceBand.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class ServiceBand implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'description' => 'string', - 'from' => 'int', - 'to' => 'int', 'entitlementBands' => '\SynergiTech\Staffology\Model\EntitlementBand[]', - 'id' => 'string' + 'from' => 'int', + 'id' => 'string', + 'to' => 'int' ]; /** @@ -73,10 +73,10 @@ class ServiceBand implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'description' => null, - 'from' => 'int32', - 'to' => 'int32', 'entitlementBands' => null, - 'id' => 'uuid' + 'from' => 'int32', + 'id' => 'uuid', + 'to' => 'int32' ]; /** @@ -86,10 +86,10 @@ class ServiceBand implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'description' => true, - 'from' => false, - 'to' => false, 'entitlementBands' => true, - 'id' => false + 'from' => false, + 'id' => false, + 'to' => false ]; /** @@ -179,10 +179,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'description' => 'description', - 'from' => 'from', - 'to' => 'to', 'entitlementBands' => 'entitlementBands', - 'id' => 'id' + 'from' => 'from', + 'id' => 'id', + 'to' => 'to' ]; /** @@ -192,10 +192,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'description' => 'setDescription', - 'from' => 'setFrom', - 'to' => 'setTo', 'entitlementBands' => 'setEntitlementBands', - 'id' => 'setId' + 'from' => 'setFrom', + 'id' => 'setId', + 'to' => 'setTo' ]; /** @@ -205,10 +205,10 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'description' => 'getDescription', - 'from' => 'getFrom', - 'to' => 'getTo', 'entitlementBands' => 'getEntitlementBands', - 'id' => 'getId' + 'from' => 'getFrom', + 'id' => 'getId', + 'to' => 'getTo' ]; /** @@ -268,10 +268,10 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('from', $data ?? [], null); - $this->setIfExists('to', $data ?? [], null); $this->setIfExists('entitlementBands', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); } /** @@ -351,116 +351,116 @@ public function setDescription(?string $description): static } /** - * Gets from + * Gets entitlementBands * - * @return int|null + * @return \SynergiTech\Staffology\Model\EntitlementBand[]|null */ - public function getFrom(): ?int + public function getEntitlementBands(): ?array { - return $this->container['from']; + return $this->container['entitlementBands']; } /** - * Sets from + * Sets entitlementBands * - * @param int|null $from from + * @param \SynergiTech\Staffology\Model\EntitlementBand[]|null $entitlementBands entitlementBands * * @return $this */ - public function setFrom(?int $from): static + public function setEntitlementBands(?array $entitlementBands): static { - if (is_null($from)) { - throw new InvalidArgumentException('non-nullable from cannot be null'); + if (is_null($entitlementBands)) { + array_push($this->openAPINullablesSetToNull, 'entitlementBands'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('entitlementBands', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['from'] = $from; + $this->container['entitlementBands'] = $entitlementBands; return $this; } /** - * Gets to + * Gets from * * @return int|null */ - public function getTo(): ?int + public function getFrom(): ?int { - return $this->container['to']; + return $this->container['from']; } /** - * Sets to + * Sets from * - * @param int|null $to to + * @param int|null $from from * * @return $this */ - public function setTo(?int $to): static + public function setFrom(?int $from): static { - if (is_null($to)) { - throw new InvalidArgumentException('non-nullable to cannot be null'); + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); } - $this->container['to'] = $to; + $this->container['from'] = $from; return $this; } /** - * Gets entitlementBands + * Gets id * - * @return \SynergiTech\Staffology\Model\EntitlementBand[]|null + * @return string|null */ - public function getEntitlementBands(): ?array + public function getId(): ?string { - return $this->container['entitlementBands']; + return $this->container['id']; } /** - * Sets entitlementBands + * Sets id * - * @param \SynergiTech\Staffology\Model\EntitlementBand[]|null $entitlementBands entitlementBands + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setEntitlementBands(?array $entitlementBands): static + public function setId(?string $id): static { - if (is_null($entitlementBands)) { - array_push($this->openAPINullablesSetToNull, 'entitlementBands'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('entitlementBands', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['entitlementBands'] = $entitlementBands; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets to * - * @return string|null + * @return int|null */ - public function getId(): ?string + public function getTo(): ?int { - return $this->container['id']; + return $this->container['to']; } /** - * Sets id + * Sets to * - * @param string|null $id [readonly] The unique id of the object + * @param int|null $to to * * @return $this */ - public function setId(?string $id): static + public function setTo(?int $to): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); } - $this->container['id'] = $id; + $this->container['to'] = $to; return $this; } diff --git a/src/Model/ShiftWorkingPatternDay.php b/src/Model/ShiftWorkingPatternDay.php index 5d022ca..3a8f8f6 100644 --- a/src/Model/ShiftWorkingPatternDay.php +++ b/src/Model/ShiftWorkingPatternDay.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class ShiftWorkingPatternDay implements ModelInterface, ArrayAccess, JsonSeriali */ protected static array $openAPITypes = [ 'day' => 'int', - 'isWorkingDay' => 'bool', 'hours' => 'float', + 'isWorkingDay' => 'bool', 'workingPatternHoursType' => '\SynergiTech\Staffology\Model\WorkingPatternHoursType' ]; @@ -72,8 +72,8 @@ class ShiftWorkingPatternDay implements ModelInterface, ArrayAccess, JsonSeriali */ protected static array $openAPIFormats = [ 'day' => 'int32', - 'isWorkingDay' => null, 'hours' => 'double', + 'isWorkingDay' => null, 'workingPatternHoursType' => null ]; @@ -84,8 +84,8 @@ class ShiftWorkingPatternDay implements ModelInterface, ArrayAccess, JsonSeriali */ protected static array $openAPINullables = [ 'day' => false, - 'isWorkingDay' => false, 'hours' => false, + 'isWorkingDay' => false, 'workingPatternHoursType' => false ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'day' => 'day', - 'isWorkingDay' => 'isWorkingDay', 'hours' => 'hours', + 'isWorkingDay' => 'isWorkingDay', 'workingPatternHoursType' => 'workingPatternHoursType' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'day' => 'setDay', - 'isWorkingDay' => 'setIsWorkingDay', 'hours' => 'setHours', + 'isWorkingDay' => 'setIsWorkingDay', 'workingPatternHoursType' => 'setWorkingPatternHoursType' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'day' => 'getDay', - 'isWorkingDay' => 'getIsWorkingDay', 'hours' => 'getHours', + 'isWorkingDay' => 'getIsWorkingDay', 'workingPatternHoursType' => 'getWorkingPatternHoursType' ]; @@ -262,8 +262,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('day', $data ?? [], null); - $this->setIfExists('isWorkingDay', $data ?? [], null); $this->setIfExists('hours', $data ?? [], null); + $this->setIfExists('isWorkingDay', $data ?? [], null); $this->setIfExists('workingPatternHoursType', $data ?? [], null); } @@ -337,55 +337,55 @@ public function setDay(?int $day): static } /** - * Gets isWorkingDay + * Gets hours * - * @return bool|null + * @return float|null */ - public function getIsWorkingDay(): ?bool + public function getHours(): ?float { - return $this->container['isWorkingDay']; + return $this->container['hours']; } /** - * Sets isWorkingDay + * Sets hours * - * @param bool|null $isWorkingDay isWorkingDay + * @param float|null $hours hours * * @return $this */ - public function setIsWorkingDay(?bool $isWorkingDay): static + public function setHours(?float $hours): static { - if (is_null($isWorkingDay)) { - throw new InvalidArgumentException('non-nullable isWorkingDay cannot be null'); + if (is_null($hours)) { + throw new InvalidArgumentException('non-nullable hours cannot be null'); } - $this->container['isWorkingDay'] = $isWorkingDay; + $this->container['hours'] = $hours; return $this; } /** - * Gets hours + * Gets isWorkingDay * - * @return float|null + * @return bool|null */ - public function getHours(): ?float + public function getIsWorkingDay(): ?bool { - return $this->container['hours']; + return $this->container['isWorkingDay']; } /** - * Sets hours + * Sets isWorkingDay * - * @param float|null $hours hours + * @param bool|null $isWorkingDay isWorkingDay * * @return $this */ - public function setHours(?float $hours): static + public function setIsWorkingDay(?bool $isWorkingDay): static { - if (is_null($hours)) { - throw new InvalidArgumentException('non-nullable hours cannot be null'); + if (is_null($isWorkingDay)) { + throw new InvalidArgumentException('non-nullable isWorkingDay cannot be null'); } - $this->container['hours'] = $hours; + $this->container['isWorkingDay'] = $isWorkingDay; return $this; } diff --git a/src/Model/SmtpEncryption.php b/src/Model/SmtpEncryption.php index d4725cc..3cd7cb2 100644 --- a/src/Model/SmtpEncryption.php +++ b/src/Model/SmtpEncryption.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/SmtpSettings.php b/src/Model/SmtpSettings.php index 3f913de..fb5fbd5 100644 --- a/src/Model/SmtpSettings.php +++ b/src/Model/SmtpSettings.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,15 @@ class SmtpSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'smtpServer' => 'string', - 'smtpPort' => 'int', + 'accessToken' => 'string', 'encryption' => '\SynergiTech\Staffology\Model\SmtpEncryption', - 'smtpUsername' => 'string', - 'smtpPassword' => 'string' + 'expiresAt' => '\DateTime', + 'expiresIn' => 'int', + 'refreshToken' => 'string', + 'smtpPassword' => 'string', + 'smtpPort' => 'int', + 'smtpServer' => 'string', + 'smtpUsername' => 'string' ]; /** @@ -72,11 +76,15 @@ class SmtpSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'smtpServer' => null, - 'smtpPort' => 'int32', + 'accessToken' => null, 'encryption' => null, - 'smtpUsername' => null, - 'smtpPassword' => null + 'expiresAt' => 'date', + 'expiresIn' => 'int32', + 'refreshToken' => null, + 'smtpPassword' => null, + 'smtpPort' => 'int32', + 'smtpServer' => null, + 'smtpUsername' => null ]; /** @@ -85,11 +93,15 @@ class SmtpSettings implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'smtpServer' => true, - 'smtpPort' => false, + 'accessToken' => true, 'encryption' => false, - 'smtpUsername' => true, - 'smtpPassword' => true + 'expiresAt' => false, + 'expiresIn' => false, + 'refreshToken' => true, + 'smtpPassword' => true, + 'smtpPort' => false, + 'smtpServer' => true, + 'smtpUsername' => true ]; /** @@ -178,11 +190,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'smtpServer' => 'smtpServer', - 'smtpPort' => 'smtpPort', + 'accessToken' => 'accessToken', 'encryption' => 'encryption', - 'smtpUsername' => 'smtpUsername', - 'smtpPassword' => 'smtpPassword' + 'expiresAt' => 'expiresAt', + 'expiresIn' => 'expiresIn', + 'refreshToken' => 'refreshToken', + 'smtpPassword' => 'smtpPassword', + 'smtpPort' => 'smtpPort', + 'smtpServer' => 'smtpServer', + 'smtpUsername' => 'smtpUsername' ]; /** @@ -191,11 +207,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'smtpServer' => 'setSmtpServer', - 'smtpPort' => 'setSmtpPort', + 'accessToken' => 'setAccessToken', 'encryption' => 'setEncryption', - 'smtpUsername' => 'setSmtpUsername', - 'smtpPassword' => 'setSmtpPassword' + 'expiresAt' => 'setExpiresAt', + 'expiresIn' => 'setExpiresIn', + 'refreshToken' => 'setRefreshToken', + 'smtpPassword' => 'setSmtpPassword', + 'smtpPort' => 'setSmtpPort', + 'smtpServer' => 'setSmtpServer', + 'smtpUsername' => 'setSmtpUsername' ]; /** @@ -204,11 +224,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'smtpServer' => 'getSmtpServer', - 'smtpPort' => 'getSmtpPort', + 'accessToken' => 'getAccessToken', 'encryption' => 'getEncryption', - 'smtpUsername' => 'getSmtpUsername', - 'smtpPassword' => 'getSmtpPassword' + 'expiresAt' => 'getExpiresAt', + 'expiresIn' => 'getExpiresIn', + 'refreshToken' => 'getRefreshToken', + 'smtpPassword' => 'getSmtpPassword', + 'smtpPort' => 'getSmtpPort', + 'smtpServer' => 'getSmtpServer', + 'smtpUsername' => 'getSmtpUsername' ]; /** @@ -267,11 +291,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('smtpServer', $data ?? [], null); - $this->setIfExists('smtpPort', $data ?? [], null); + $this->setIfExists('accessToken', $data ?? [], null); $this->setIfExists('encryption', $data ?? [], null); - $this->setIfExists('smtpUsername', $data ?? [], null); + $this->setIfExists('expiresAt', $data ?? [], null); + $this->setIfExists('expiresIn', $data ?? [], null); + $this->setIfExists('refreshToken', $data ?? [], null); $this->setIfExists('smtpPassword', $data ?? [], null); + $this->setIfExists('smtpPort', $data ?? [], null); + $this->setIfExists('smtpServer', $data ?? [], null); + $this->setIfExists('smtpUsername', $data ?? [], null); } /** @@ -317,123 +345,150 @@ public function valid(): bool /** - * Gets smtpServer + * Gets accessToken * * @return string|null */ - public function getSmtpServer(): ?string + public function getAccessToken(): ?string { - return $this->container['smtpServer']; + return $this->container['accessToken']; } /** - * Sets smtpServer + * Sets accessToken * - * @param string|null $smtpServer smtpServer + * @param string|null $accessToken accessToken * * @return $this */ - public function setSmtpServer(?string $smtpServer): static + public function setAccessToken(?string $accessToken): static { - if (is_null($smtpServer)) { - array_push($this->openAPINullablesSetToNull, 'smtpServer'); + if (is_null($accessToken)) { + array_push($this->openAPINullablesSetToNull, 'accessToken'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('smtpServer', $nullablesSetToNull); + $index = array_search('accessToken', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['smtpServer'] = $smtpServer; + $this->container['accessToken'] = $accessToken; return $this; } /** - * Gets smtpPort + * Gets encryption * - * @return int|null + * @return \SynergiTech\Staffology\Model\SmtpEncryption|null */ - public function getSmtpPort(): ?int + public function getEncryption(): ?\SynergiTech\Staffology\Model\SmtpEncryption { - return $this->container['smtpPort']; + return $this->container['encryption']; } /** - * Sets smtpPort + * Sets encryption * - * @param int|null $smtpPort smtpPort + * @param \SynergiTech\Staffology\Model\SmtpEncryption|null $encryption encryption * * @return $this */ - public function setSmtpPort(?int $smtpPort): static + public function setEncryption(?\SynergiTech\Staffology\Model\SmtpEncryption $encryption): static { - if (is_null($smtpPort)) { - throw new InvalidArgumentException('non-nullable smtpPort cannot be null'); + if (is_null($encryption)) { + throw new InvalidArgumentException('non-nullable encryption cannot be null'); } - $this->container['smtpPort'] = $smtpPort; + $this->container['encryption'] = $encryption; return $this; } /** - * Gets encryption + * Gets expiresAt * - * @return \SynergiTech\Staffology\Model\SmtpEncryption|null + * @return \DateTime|null */ - public function getEncryption(): ?\SynergiTech\Staffology\Model\SmtpEncryption + public function getExpiresAt(): ?\DateTime { - return $this->container['encryption']; + return $this->container['expiresAt']; } /** - * Sets encryption + * Sets expiresAt * - * @param \SynergiTech\Staffology\Model\SmtpEncryption|null $encryption encryption + * @param \DateTime|null $expiresAt expiresAt * * @return $this */ - public function setEncryption(?\SynergiTech\Staffology\Model\SmtpEncryption $encryption): static + public function setExpiresAt(?\DateTime $expiresAt): static { - if (is_null($encryption)) { - throw new InvalidArgumentException('non-nullable encryption cannot be null'); + if (is_null($expiresAt)) { + throw new InvalidArgumentException('non-nullable expiresAt cannot be null'); } - $this->container['encryption'] = $encryption; + $this->container['expiresAt'] = $expiresAt; return $this; } /** - * Gets smtpUsername + * Gets expiresIn + * + * @return int|null + */ + public function getExpiresIn(): ?int + { + return $this->container['expiresIn']; + } + + /** + * Sets expiresIn + * + * @param int|null $expiresIn expiresIn + * + * @return $this + */ + public function setExpiresIn(?int $expiresIn): static + { + if (is_null($expiresIn)) { + throw new InvalidArgumentException('non-nullable expiresIn cannot be null'); + } + $this->container['expiresIn'] = $expiresIn; + + return $this; + } + + /** + * Gets refreshToken * * @return string|null */ - public function getSmtpUsername(): ?string + public function getRefreshToken(): ?string { - return $this->container['smtpUsername']; + return $this->container['refreshToken']; } /** - * Sets smtpUsername + * Sets refreshToken * - * @param string|null $smtpUsername smtpUsername + * @param string|null $refreshToken refreshToken * * @return $this */ - public function setSmtpUsername(?string $smtpUsername): static + public function setRefreshToken(?string $refreshToken): static { - if (is_null($smtpUsername)) { - array_push($this->openAPINullablesSetToNull, 'smtpUsername'); + if (is_null($refreshToken)) { + array_push($this->openAPINullablesSetToNull, 'refreshToken'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('smtpUsername', $nullablesSetToNull); + $index = array_search('refreshToken', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['smtpUsername'] = $smtpUsername; + $this->container['refreshToken'] = $refreshToken; return $this; } @@ -471,6 +526,101 @@ public function setSmtpPassword(?string $smtpPassword): static return $this; } + + /** + * Gets smtpPort + * + * @return int|null + */ + public function getSmtpPort(): ?int + { + return $this->container['smtpPort']; + } + + /** + * Sets smtpPort + * + * @param int|null $smtpPort smtpPort + * + * @return $this + */ + public function setSmtpPort(?int $smtpPort): static + { + if (is_null($smtpPort)) { + throw new InvalidArgumentException('non-nullable smtpPort cannot be null'); + } + $this->container['smtpPort'] = $smtpPort; + + return $this; + } + + /** + * Gets smtpServer + * + * @return string|null + */ + public function getSmtpServer(): ?string + { + return $this->container['smtpServer']; + } + + /** + * Sets smtpServer + * + * @param string|null $smtpServer smtpServer + * + * @return $this + */ + public function setSmtpServer(?string $smtpServer): static + { + if (is_null($smtpServer)) { + array_push($this->openAPINullablesSetToNull, 'smtpServer'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('smtpServer', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['smtpServer'] = $smtpServer; + + return $this; + } + + /** + * Gets smtpUsername + * + * @return string|null + */ + public function getSmtpUsername(): ?string + { + return $this->container['smtpUsername']; + } + + /** + * Sets smtpUsername + * + * @param string|null $smtpUsername smtpUsername + * + * @return $this + */ + public function setSmtpUsername(?string $smtpUsername): static + { + if (is_null($smtpUsername)) { + array_push($this->openAPINullablesSetToNull, 'smtpUsername'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('smtpUsername', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['smtpUsername'] = $smtpUsername; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/SpinePointReport.php b/src/Model/SpinePointReport.php index 01d254a..8906701 100644 --- a/src/Model/SpinePointReport.php +++ b/src/Model/SpinePointReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class SpinePointReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\SpinePointReportLine[]', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -72,11 +72,11 @@ class SpinePointReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'isDraft' => null, 'lines' => null, 'report' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -85,11 +85,11 @@ class SpinePointReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'isDraft' => false, 'lines' => true, 'report' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'isDraft' => 'isDraft', 'lines' => 'lines', 'report' => 'report', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', 'report' => 'setReport', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', 'report' => 'getReport', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -316,6 +316,33 @@ public function valid(): bool } + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + /** * Gets lines * @@ -437,33 +464,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/SpinePointReportLine.php b/src/Model/SpinePointReportLine.php index bbeab75..bec88b8 100644 --- a/src/Model/SpinePointReportLine.php +++ b/src/Model/SpinePointReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,21 +59,21 @@ class SpinePointReportLine implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPITypes = [ - 'spineName' => 'string', - 'spinePointName' => 'string', - 'number' => 'int', - 'effectiveDate' => '\DateTime', 'annualValue' => 'float', 'annualValueAltMax' => 'float', + 'annualValueLAFringe' => 'float', + 'annualValueLAFringeAltMax' => 'float', 'annualValueLAInner' => 'float', 'annualValueLAInnerAltMax' => 'float', 'annualValueLAOuter' => 'float', 'annualValueLAOuterAltMax' => 'float', - 'annualValueLAFringe' => 'float', - 'annualValueLAFringeAltMax' => 'float', + 'department' => 'string', + 'effectiveDate' => '\DateTime', 'employee' => '\SynergiTech\Staffology\Model\Item', + 'number' => 'int', 'payrollCode' => 'string', - 'department' => 'string' + 'spineName' => 'string', + 'spinePointName' => 'string' ]; /** @@ -82,21 +82,21 @@ class SpinePointReportLine implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPIFormats = [ - 'spineName' => null, - 'spinePointName' => null, - 'number' => 'int32', - 'effectiveDate' => 'date', 'annualValue' => 'double', 'annualValueAltMax' => 'double', + 'annualValueLAFringe' => 'double', + 'annualValueLAFringeAltMax' => 'double', 'annualValueLAInner' => 'double', 'annualValueLAInnerAltMax' => 'double', 'annualValueLAOuter' => 'double', 'annualValueLAOuterAltMax' => 'double', - 'annualValueLAFringe' => 'double', - 'annualValueLAFringeAltMax' => 'double', + 'department' => null, + 'effectiveDate' => 'date', 'employee' => null, + 'number' => 'int32', 'payrollCode' => null, - 'department' => null + 'spineName' => null, + 'spinePointName' => null ]; /** @@ -105,21 +105,21 @@ class SpinePointReportLine implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPINullables = [ - 'spineName' => true, - 'spinePointName' => true, - 'number' => false, - 'effectiveDate' => false, 'annualValue' => false, 'annualValueAltMax' => true, + 'annualValueLAFringe' => true, + 'annualValueLAFringeAltMax' => true, 'annualValueLAInner' => true, 'annualValueLAInnerAltMax' => true, 'annualValueLAOuter' => true, 'annualValueLAOuterAltMax' => true, - 'annualValueLAFringe' => true, - 'annualValueLAFringeAltMax' => true, + 'department' => true, + 'effectiveDate' => false, 'employee' => false, + 'number' => false, 'payrollCode' => true, - 'department' => true + 'spineName' => true, + 'spinePointName' => true ]; /** @@ -208,21 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'spineName' => 'spineName', - 'spinePointName' => 'spinePointName', - 'number' => 'number', - 'effectiveDate' => 'effectiveDate', 'annualValue' => 'annualValue', 'annualValueAltMax' => 'annualValueAltMax', + 'annualValueLAFringe' => 'annualValueLAFringe', + 'annualValueLAFringeAltMax' => 'annualValueLAFringeAltMax', 'annualValueLAInner' => 'annualValueLAInner', 'annualValueLAInnerAltMax' => 'annualValueLAInnerAltMax', 'annualValueLAOuter' => 'annualValueLAOuter', 'annualValueLAOuterAltMax' => 'annualValueLAOuterAltMax', - 'annualValueLAFringe' => 'annualValueLAFringe', - 'annualValueLAFringeAltMax' => 'annualValueLAFringeAltMax', + 'department' => 'department', + 'effectiveDate' => 'effectiveDate', 'employee' => 'employee', + 'number' => 'number', 'payrollCode' => 'payrollCode', - 'department' => 'department' + 'spineName' => 'spineName', + 'spinePointName' => 'spinePointName' ]; /** @@ -231,21 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'spineName' => 'setSpineName', - 'spinePointName' => 'setSpinePointName', - 'number' => 'setNumber', - 'effectiveDate' => 'setEffectiveDate', 'annualValue' => 'setAnnualValue', 'annualValueAltMax' => 'setAnnualValueAltMax', + 'annualValueLAFringe' => 'setAnnualValueLAFringe', + 'annualValueLAFringeAltMax' => 'setAnnualValueLAFringeAltMax', 'annualValueLAInner' => 'setAnnualValueLAInner', 'annualValueLAInnerAltMax' => 'setAnnualValueLAInnerAltMax', 'annualValueLAOuter' => 'setAnnualValueLAOuter', 'annualValueLAOuterAltMax' => 'setAnnualValueLAOuterAltMax', - 'annualValueLAFringe' => 'setAnnualValueLAFringe', - 'annualValueLAFringeAltMax' => 'setAnnualValueLAFringeAltMax', + 'department' => 'setDepartment', + 'effectiveDate' => 'setEffectiveDate', 'employee' => 'setEmployee', + 'number' => 'setNumber', 'payrollCode' => 'setPayrollCode', - 'department' => 'setDepartment' + 'spineName' => 'setSpineName', + 'spinePointName' => 'setSpinePointName' ]; /** @@ -254,21 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'spineName' => 'getSpineName', - 'spinePointName' => 'getSpinePointName', - 'number' => 'getNumber', - 'effectiveDate' => 'getEffectiveDate', 'annualValue' => 'getAnnualValue', 'annualValueAltMax' => 'getAnnualValueAltMax', + 'annualValueLAFringe' => 'getAnnualValueLAFringe', + 'annualValueLAFringeAltMax' => 'getAnnualValueLAFringeAltMax', 'annualValueLAInner' => 'getAnnualValueLAInner', 'annualValueLAInnerAltMax' => 'getAnnualValueLAInnerAltMax', 'annualValueLAOuter' => 'getAnnualValueLAOuter', 'annualValueLAOuterAltMax' => 'getAnnualValueLAOuterAltMax', - 'annualValueLAFringe' => 'getAnnualValueLAFringe', - 'annualValueLAFringeAltMax' => 'getAnnualValueLAFringeAltMax', + 'department' => 'getDepartment', + 'effectiveDate' => 'getEffectiveDate', 'employee' => 'getEmployee', + 'number' => 'getNumber', 'payrollCode' => 'getPayrollCode', - 'department' => 'getDepartment' + 'spineName' => 'getSpineName', + 'spinePointName' => 'getSpinePointName' ]; /** @@ -327,21 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('spineName', $data ?? [], null); - $this->setIfExists('spinePointName', $data ?? [], null); - $this->setIfExists('number', $data ?? [], null); - $this->setIfExists('effectiveDate', $data ?? [], null); $this->setIfExists('annualValue', $data ?? [], null); $this->setIfExists('annualValueAltMax', $data ?? [], null); + $this->setIfExists('annualValueLAFringe', $data ?? [], null); + $this->setIfExists('annualValueLAFringeAltMax', $data ?? [], null); $this->setIfExists('annualValueLAInner', $data ?? [], null); $this->setIfExists('annualValueLAInnerAltMax', $data ?? [], null); $this->setIfExists('annualValueLAOuter', $data ?? [], null); $this->setIfExists('annualValueLAOuterAltMax', $data ?? [], null); - $this->setIfExists('annualValueLAFringe', $data ?? [], null); - $this->setIfExists('annualValueLAFringeAltMax', $data ?? [], null); + $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('effectiveDate', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('number', $data ?? [], null); $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); + $this->setIfExists('spineName', $data ?? [], null); + $this->setIfExists('spinePointName', $data ?? [], null); } /** @@ -387,184 +387,130 @@ public function valid(): bool /** - * Gets spineName + * Gets annualValue * - * @return string|null + * @return float|null */ - public function getSpineName(): ?string + public function getAnnualValue(): ?float { - return $this->container['spineName']; + return $this->container['annualValue']; } /** - * Sets spineName + * Sets annualValue * - * @param string|null $spineName Spine Name + * @param float|null $annualValue Annual Value of spine point * * @return $this */ - public function setSpineName(?string $spineName): static + public function setAnnualValue(?float $annualValue): static { - if (is_null($spineName)) { - array_push($this->openAPINullablesSetToNull, 'spineName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('spineName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($annualValue)) { + throw new InvalidArgumentException('non-nullable annualValue cannot be null'); } - $this->container['spineName'] = $spineName; + $this->container['annualValue'] = $annualValue; return $this; } /** - * Gets spinePointName + * Gets annualValueAltMax * - * @return string|null + * @return float|null */ - public function getSpinePointName(): ?string + public function getAnnualValueAltMax(): ?float { - return $this->container['spinePointName']; + return $this->container['annualValueAltMax']; } /** - * Sets spinePointName + * Sets annualValueAltMax * - * @param string|null $spinePointName Spine Point Name + * @param float|null $annualValueAltMax Alt Max Annual Value of spine point * * @return $this */ - public function setSpinePointName(?string $spinePointName): static + public function setAnnualValueAltMax(?float $annualValueAltMax): static { - if (is_null($spinePointName)) { - array_push($this->openAPINullablesSetToNull, 'spinePointName'); + if (is_null($annualValueAltMax)) { + array_push($this->openAPINullablesSetToNull, 'annualValueAltMax'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('spinePointName', $nullablesSetToNull); + $index = array_search('annualValueAltMax', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['spinePointName'] = $spinePointName; - - return $this; - } - - /** - * Gets number - * - * @return int|null - */ - public function getNumber(): ?int - { - return $this->container['number']; - } - - /** - * Sets number - * - * @param int|null $number Spine Point Number - * - * @return $this - */ - public function setNumber(?int $number): static - { - if (is_null($number)) { - throw new InvalidArgumentException('non-nullable number cannot be null'); - } - $this->container['number'] = $number; - - return $this; - } - - /** - * Gets effectiveDate - * - * @return \DateTime|null - */ - public function getEffectiveDate(): ?\DateTime - { - return $this->container['effectiveDate']; - } - - /** - * Sets effectiveDate - * - * @param \DateTime|null $effectiveDate Effective Date of spine point - * - * @return $this - */ - public function setEffectiveDate(?\DateTime $effectiveDate): static - { - if (is_null($effectiveDate)) { - throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); - } - $this->container['effectiveDate'] = $effectiveDate; + $this->container['annualValueAltMax'] = $annualValueAltMax; return $this; } /** - * Gets annualValue + * Gets annualValueLAFringe * * @return float|null */ - public function getAnnualValue(): ?float + public function getAnnualValueLAFringe(): ?float { - return $this->container['annualValue']; + return $this->container['annualValueLAFringe']; } /** - * Sets annualValue + * Sets annualValueLAFringe * - * @param float|null $annualValue Annual Value of spine point + * @param float|null $annualValueLAFringe Annual Value LA Fringe of spine point * * @return $this */ - public function setAnnualValue(?float $annualValue): static + public function setAnnualValueLAFringe(?float $annualValueLAFringe): static { - if (is_null($annualValue)) { - throw new InvalidArgumentException('non-nullable annualValue cannot be null'); + if (is_null($annualValueLAFringe)) { + array_push($this->openAPINullablesSetToNull, 'annualValueLAFringe'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('annualValueLAFringe', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['annualValue'] = $annualValue; + $this->container['annualValueLAFringe'] = $annualValueLAFringe; return $this; } /** - * Gets annualValueAltMax + * Gets annualValueLAFringeAltMax * * @return float|null */ - public function getAnnualValueAltMax(): ?float + public function getAnnualValueLAFringeAltMax(): ?float { - return $this->container['annualValueAltMax']; + return $this->container['annualValueLAFringeAltMax']; } /** - * Sets annualValueAltMax + * Sets annualValueLAFringeAltMax * - * @param float|null $annualValueAltMax Alt Max Annual Value of spine point + * @param float|null $annualValueLAFringeAltMax Annual Value LA Fringe Alt Max of spine point * * @return $this */ - public function setAnnualValueAltMax(?float $annualValueAltMax): static + public function setAnnualValueLAFringeAltMax(?float $annualValueLAFringeAltMax): static { - if (is_null($annualValueAltMax)) { - array_push($this->openAPINullablesSetToNull, 'annualValueAltMax'); + if (is_null($annualValueLAFringeAltMax)) { + array_push($this->openAPINullablesSetToNull, 'annualValueLAFringeAltMax'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('annualValueAltMax', $nullablesSetToNull); + $index = array_search('annualValueLAFringeAltMax', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['annualValueAltMax'] = $annualValueAltMax; + $this->container['annualValueLAFringeAltMax'] = $annualValueLAFringeAltMax; return $this; } @@ -706,69 +652,62 @@ public function setAnnualValueLAOuterAltMax(?float $annualValueLAOuterAltMax): s } /** - * Gets annualValueLAFringe + * Gets department * - * @return float|null + * @return string|null */ - public function getAnnualValueLAFringe(): ?float + public function getDepartment(): ?string { - return $this->container['annualValueLAFringe']; + return $this->container['department']; } /** - * Sets annualValueLAFringe + * Sets department * - * @param float|null $annualValueLAFringe Annual Value LA Fringe of spine point + * @param string|null $department department * * @return $this */ - public function setAnnualValueLAFringe(?float $annualValueLAFringe): static + public function setDepartment(?string $department): static { - if (is_null($annualValueLAFringe)) { - array_push($this->openAPINullablesSetToNull, 'annualValueLAFringe'); + if (is_null($department)) { + array_push($this->openAPINullablesSetToNull, 'department'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('annualValueLAFringe', $nullablesSetToNull); + $index = array_search('department', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['annualValueLAFringe'] = $annualValueLAFringe; + $this->container['department'] = $department; return $this; } /** - * Gets annualValueLAFringeAltMax + * Gets effectiveDate * - * @return float|null + * @return \DateTime|null */ - public function getAnnualValueLAFringeAltMax(): ?float + public function getEffectiveDate(): ?\DateTime { - return $this->container['annualValueLAFringeAltMax']; + return $this->container['effectiveDate']; } /** - * Sets annualValueLAFringeAltMax + * Sets effectiveDate * - * @param float|null $annualValueLAFringeAltMax Annual Value LA Fringe Alt Max of spine point + * @param \DateTime|null $effectiveDate Effective Date of spine point * * @return $this */ - public function setAnnualValueLAFringeAltMax(?float $annualValueLAFringeAltMax): static + public function setEffectiveDate(?\DateTime $effectiveDate): static { - if (is_null($annualValueLAFringeAltMax)) { - array_push($this->openAPINullablesSetToNull, 'annualValueLAFringeAltMax'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('annualValueLAFringeAltMax', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($effectiveDate)) { + throw new InvalidArgumentException('non-nullable effectiveDate cannot be null'); } - $this->container['annualValueLAFringeAltMax'] = $annualValueLAFringeAltMax; + $this->container['effectiveDate'] = $effectiveDate; return $this; } @@ -800,6 +739,33 @@ public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): stat return $this; } + /** + * Gets number + * + * @return int|null + */ + public function getNumber(): ?int + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param int|null $number Spine Point Number + * + * @return $this + */ + public function setNumber(?int $number): static + { + if (is_null($number)) { + throw new InvalidArgumentException('non-nullable number cannot be null'); + } + $this->container['number'] = $number; + + return $this; + } + /** * Gets payrollCode * @@ -835,35 +801,69 @@ public function setPayrollCode(?string $payrollCode): static } /** - * Gets department + * Gets spineName * * @return string|null */ - public function getDepartment(): ?string + public function getSpineName(): ?string { - return $this->container['department']; + return $this->container['spineName']; } /** - * Sets department + * Sets spineName * - * @param string|null $department department + * @param string|null $spineName Spine Name * * @return $this */ - public function setDepartment(?string $department): static + public function setSpineName(?string $spineName): static { - if (is_null($department)) { - array_push($this->openAPINullablesSetToNull, 'department'); + if (is_null($spineName)) { + array_push($this->openAPINullablesSetToNull, 'spineName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('department', $nullablesSetToNull); + $index = array_search('spineName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['department'] = $department; + $this->container['spineName'] = $spineName; + + return $this; + } + + /** + * Gets spinePointName + * + * @return string|null + */ + public function getSpinePointName(): ?string + { + return $this->container['spinePointName']; + } + + /** + * Sets spinePointName + * + * @param string|null $spinePointName Spine Point Name + * + * @return $this + */ + public function setSpinePointName(?string $spinePointName): static + { + if (is_null($spinePointName)) { + array_push($this->openAPINullablesSetToNull, 'spinePointName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('spinePointName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['spinePointName'] = $spinePointName; return $this; } diff --git a/src/Model/SpinePointReportReportResponse.php b/src/Model/SpinePointReportReportResponse.php index 3885c14..35975c6 100644 --- a/src/Model/SpinePointReportReportResponse.php +++ b/src/Model/SpinePointReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class SpinePointReportReportResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\SpinePointReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class SpinePointReportReportResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class SpinePointReportReportResponse implements ModelInterface, ArrayAccess, Jso * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/StarterDeclaration.php b/src/Model/StarterDeclaration.php index 5677665..63e415a 100644 --- a/src/Model/StarterDeclaration.php +++ b/src/Model/StarterDeclaration.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/StarterDetails.php b/src/Model/StarterDetails.php index 8ce9039..98a51a7 100644 --- a/src/Model/StarterDetails.php +++ b/src/Model/StarterDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class StarterDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'startDate' => '\DateTime', - 'starterDeclaration' => '\SynergiTech\Staffology\Model\StarterDeclaration', 'overseasEmployerDetails' => '\SynergiTech\Staffology\Model\OverseasEmployerDetails', - 'pensionerPayroll' => '\SynergiTech\Staffology\Model\PensionerPayroll' + 'pensionerPayroll' => '\SynergiTech\Staffology\Model\PensionerPayroll', + 'startDate' => '\DateTime', + 'starterDeclaration' => '\SynergiTech\Staffology\Model\StarterDeclaration' ]; /** @@ -71,10 +71,10 @@ class StarterDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'startDate' => 'date', - 'starterDeclaration' => null, 'overseasEmployerDetails' => null, - 'pensionerPayroll' => null + 'pensionerPayroll' => null, + 'startDate' => 'date', + 'starterDeclaration' => null ]; /** @@ -83,10 +83,10 @@ class StarterDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'startDate' => false, - 'starterDeclaration' => false, 'overseasEmployerDetails' => false, - 'pensionerPayroll' => false + 'pensionerPayroll' => false, + 'startDate' => false, + 'starterDeclaration' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'startDate' => 'startDate', - 'starterDeclaration' => 'starterDeclaration', 'overseasEmployerDetails' => 'overseasEmployerDetails', - 'pensionerPayroll' => 'pensionerPayroll' + 'pensionerPayroll' => 'pensionerPayroll', + 'startDate' => 'startDate', + 'starterDeclaration' => 'starterDeclaration' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'startDate' => 'setStartDate', - 'starterDeclaration' => 'setStarterDeclaration', 'overseasEmployerDetails' => 'setOverseasEmployerDetails', - 'pensionerPayroll' => 'setPensionerPayroll' + 'pensionerPayroll' => 'setPensionerPayroll', + 'startDate' => 'setStartDate', + 'starterDeclaration' => 'setStarterDeclaration' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'startDate' => 'getStartDate', - 'starterDeclaration' => 'getStarterDeclaration', 'overseasEmployerDetails' => 'getOverseasEmployerDetails', - 'pensionerPayroll' => 'getPensionerPayroll' + 'pensionerPayroll' => 'getPensionerPayroll', + 'startDate' => 'getStartDate', + 'starterDeclaration' => 'getStarterDeclaration' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('starterDeclaration', $data ?? [], null); $this->setIfExists('overseasEmployerDetails', $data ?? [], null); $this->setIfExists('pensionerPayroll', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('starterDeclaration', $data ?? [], null); } /** @@ -316,109 +316,109 @@ public function valid(): bool /** - * Gets startDate + * Gets overseasEmployerDetails * - * @return \DateTime + * @return \SynergiTech\Staffology\Model\OverseasEmployerDetails|null */ - public function getStartDate(): \DateTime + public function getOverseasEmployerDetails(): ?\SynergiTech\Staffology\Model\OverseasEmployerDetails { - return $this->container['startDate']; + return $this->container['overseasEmployerDetails']; } /** - * Sets startDate + * Sets overseasEmployerDetails * - * @param \DateTime $startDate startDate + * @param \SynergiTech\Staffology\Model\OverseasEmployerDetails|null $overseasEmployerDetails overseasEmployerDetails * * @return $this */ - public function setStartDate(\DateTime $startDate): static + public function setOverseasEmployerDetails(?\SynergiTech\Staffology\Model\OverseasEmployerDetails $overseasEmployerDetails): static { - if (is_null($startDate)) { - throw new InvalidArgumentException('non-nullable startDate cannot be null'); + if (is_null($overseasEmployerDetails)) { + throw new InvalidArgumentException('non-nullable overseasEmployerDetails cannot be null'); } - $this->container['startDate'] = $startDate; + $this->container['overseasEmployerDetails'] = $overseasEmployerDetails; return $this; } /** - * Gets starterDeclaration + * Gets pensionerPayroll * - * @return \SynergiTech\Staffology\Model\StarterDeclaration + * @return \SynergiTech\Staffology\Model\PensionerPayroll|null */ - public function getStarterDeclaration(): \SynergiTech\Staffology\Model\StarterDeclaration + public function getPensionerPayroll(): ?\SynergiTech\Staffology\Model\PensionerPayroll { - return $this->container['starterDeclaration']; + return $this->container['pensionerPayroll']; } /** - * Sets starterDeclaration + * Sets pensionerPayroll * - * @param \SynergiTech\Staffology\Model\StarterDeclaration $starterDeclaration starterDeclaration + * @param \SynergiTech\Staffology\Model\PensionerPayroll|null $pensionerPayroll pensionerPayroll * * @return $this */ - public function setStarterDeclaration(\SynergiTech\Staffology\Model\StarterDeclaration $starterDeclaration): static + public function setPensionerPayroll(?\SynergiTech\Staffology\Model\PensionerPayroll $pensionerPayroll): static { - if (is_null($starterDeclaration)) { - throw new InvalidArgumentException('non-nullable starterDeclaration cannot be null'); + if (is_null($pensionerPayroll)) { + throw new InvalidArgumentException('non-nullable pensionerPayroll cannot be null'); } - $this->container['starterDeclaration'] = $starterDeclaration; + $this->container['pensionerPayroll'] = $pensionerPayroll; return $this; } /** - * Gets overseasEmployerDetails + * Gets startDate * - * @return \SynergiTech\Staffology\Model\OverseasEmployerDetails|null + * @return \DateTime */ - public function getOverseasEmployerDetails(): ?\SynergiTech\Staffology\Model\OverseasEmployerDetails + public function getStartDate(): \DateTime { - return $this->container['overseasEmployerDetails']; + return $this->container['startDate']; } /** - * Sets overseasEmployerDetails + * Sets startDate * - * @param \SynergiTech\Staffology\Model\OverseasEmployerDetails|null $overseasEmployerDetails overseasEmployerDetails + * @param \DateTime $startDate startDate * * @return $this */ - public function setOverseasEmployerDetails(?\SynergiTech\Staffology\Model\OverseasEmployerDetails $overseasEmployerDetails): static + public function setStartDate(\DateTime $startDate): static { - if (is_null($overseasEmployerDetails)) { - throw new InvalidArgumentException('non-nullable overseasEmployerDetails cannot be null'); + if (is_null($startDate)) { + throw new InvalidArgumentException('non-nullable startDate cannot be null'); } - $this->container['overseasEmployerDetails'] = $overseasEmployerDetails; + $this->container['startDate'] = $startDate; return $this; } /** - * Gets pensionerPayroll + * Gets starterDeclaration * - * @return \SynergiTech\Staffology\Model\PensionerPayroll|null + * @return \SynergiTech\Staffology\Model\StarterDeclaration */ - public function getPensionerPayroll(): ?\SynergiTech\Staffology\Model\PensionerPayroll + public function getStarterDeclaration(): \SynergiTech\Staffology\Model\StarterDeclaration { - return $this->container['pensionerPayroll']; + return $this->container['starterDeclaration']; } /** - * Sets pensionerPayroll + * Sets starterDeclaration * - * @param \SynergiTech\Staffology\Model\PensionerPayroll|null $pensionerPayroll pensionerPayroll + * @param \SynergiTech\Staffology\Model\StarterDeclaration $starterDeclaration starterDeclaration * * @return $this */ - public function setPensionerPayroll(?\SynergiTech\Staffology\Model\PensionerPayroll $pensionerPayroll): static + public function setStarterDeclaration(\SynergiTech\Staffology\Model\StarterDeclaration $starterDeclaration): static { - if (is_null($pensionerPayroll)) { - throw new InvalidArgumentException('non-nullable pensionerPayroll cannot be null'); + if (is_null($starterDeclaration)) { + throw new InvalidArgumentException('non-nullable starterDeclaration cannot be null'); } - $this->container['pensionerPayroll'] = $pensionerPayroll; + $this->container['starterDeclaration'] = $starterDeclaration; return $this; } diff --git a/src/Model/StartersLeaversFilter.php b/src/Model/StartersLeaversFilter.php index c716813..df26021 100644 --- a/src/Model/StartersLeaversFilter.php +++ b/src/Model/StartersLeaversFilter.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/StatPayFrequency.php b/src/Model/StatPayFrequency.php index bb1b5c7..9878904 100644 --- a/src/Model/StatPayFrequency.php +++ b/src/Model/StatPayFrequency.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/StatutoryPay.php b/src/Model/StatutoryPay.php index cf25b51..9034da5 100644 --- a/src/Model/StatutoryPay.php +++ b/src/Model/StatutoryPay.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,9 +60,9 @@ class StatutoryPay implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'aweEligibilityThreshold' => 'float', 'weeklyParentalLeaveAmount' => 'float', - 'weeklySickPayAmount' => 'float', - 'aweEligibilityThreshold' => 'float' + 'weeklySickPayAmount' => 'float' ]; /** @@ -71,9 +71,9 @@ class StatutoryPay implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'aweEligibilityThreshold' => 'double', 'weeklyParentalLeaveAmount' => 'double', - 'weeklySickPayAmount' => 'double', - 'aweEligibilityThreshold' => 'double' + 'weeklySickPayAmount' => 'double' ]; /** @@ -82,9 +82,9 @@ class StatutoryPay implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'aweEligibilityThreshold' => false, 'weeklyParentalLeaveAmount' => false, - 'weeklySickPayAmount' => false, - 'aweEligibilityThreshold' => false + 'weeklySickPayAmount' => false ]; /** @@ -173,9 +173,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'aweEligibilityThreshold' => 'aweEligibilityThreshold', 'weeklyParentalLeaveAmount' => 'weeklyParentalLeaveAmount', - 'weeklySickPayAmount' => 'weeklySickPayAmount', - 'aweEligibilityThreshold' => 'aweEligibilityThreshold' + 'weeklySickPayAmount' => 'weeklySickPayAmount' ]; /** @@ -184,9 +184,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'aweEligibilityThreshold' => 'setAweEligibilityThreshold', 'weeklyParentalLeaveAmount' => 'setWeeklyParentalLeaveAmount', - 'weeklySickPayAmount' => 'setWeeklySickPayAmount', - 'aweEligibilityThreshold' => 'setAweEligibilityThreshold' + 'weeklySickPayAmount' => 'setWeeklySickPayAmount' ]; /** @@ -195,9 +195,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'aweEligibilityThreshold' => 'getAweEligibilityThreshold', 'weeklyParentalLeaveAmount' => 'getWeeklyParentalLeaveAmount', - 'weeklySickPayAmount' => 'getWeeklySickPayAmount', - 'aweEligibilityThreshold' => 'getAweEligibilityThreshold' + 'weeklySickPayAmount' => 'getWeeklySickPayAmount' ]; /** @@ -256,9 +256,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('aweEligibilityThreshold', $data ?? [], null); $this->setIfExists('weeklyParentalLeaveAmount', $data ?? [], null); $this->setIfExists('weeklySickPayAmount', $data ?? [], null); - $this->setIfExists('aweEligibilityThreshold', $data ?? [], null); } /** @@ -304,82 +304,82 @@ public function valid(): bool /** - * Gets weeklyParentalLeaveAmount + * Gets aweEligibilityThreshold * * @return float|null */ - public function getWeeklyParentalLeaveAmount(): ?float + public function getAweEligibilityThreshold(): ?float { - return $this->container['weeklyParentalLeaveAmount']; + return $this->container['aweEligibilityThreshold']; } /** - * Sets weeklyParentalLeaveAmount + * Sets aweEligibilityThreshold * - * @param float|null $weeklyParentalLeaveAmount [readonly] + * @param float|null $aweEligibilityThreshold aweEligibilityThreshold * * @return $this */ - public function setWeeklyParentalLeaveAmount(?float $weeklyParentalLeaveAmount): static + public function setAweEligibilityThreshold(?float $aweEligibilityThreshold): static { - if (is_null($weeklyParentalLeaveAmount)) { - throw new InvalidArgumentException('non-nullable weeklyParentalLeaveAmount cannot be null'); + if (is_null($aweEligibilityThreshold)) { + throw new InvalidArgumentException('non-nullable aweEligibilityThreshold cannot be null'); } - $this->container['weeklyParentalLeaveAmount'] = $weeklyParentalLeaveAmount; + $this->container['aweEligibilityThreshold'] = $aweEligibilityThreshold; return $this; } /** - * Gets weeklySickPayAmount + * Gets weeklyParentalLeaveAmount * * @return float|null */ - public function getWeeklySickPayAmount(): ?float + public function getWeeklyParentalLeaveAmount(): ?float { - return $this->container['weeklySickPayAmount']; + return $this->container['weeklyParentalLeaveAmount']; } /** - * Sets weeklySickPayAmount + * Sets weeklyParentalLeaveAmount * - * @param float|null $weeklySickPayAmount [readonly] + * @param float|null $weeklyParentalLeaveAmount [readonly] * * @return $this */ - public function setWeeklySickPayAmount(?float $weeklySickPayAmount): static + public function setWeeklyParentalLeaveAmount(?float $weeklyParentalLeaveAmount): static { - if (is_null($weeklySickPayAmount)) { - throw new InvalidArgumentException('non-nullable weeklySickPayAmount cannot be null'); + if (is_null($weeklyParentalLeaveAmount)) { + throw new InvalidArgumentException('non-nullable weeklyParentalLeaveAmount cannot be null'); } - $this->container['weeklySickPayAmount'] = $weeklySickPayAmount; + $this->container['weeklyParentalLeaveAmount'] = $weeklyParentalLeaveAmount; return $this; } /** - * Gets aweEligibilityThreshold + * Gets weeklySickPayAmount * * @return float|null */ - public function getAweEligibilityThreshold(): ?float + public function getWeeklySickPayAmount(): ?float { - return $this->container['aweEligibilityThreshold']; + return $this->container['weeklySickPayAmount']; } /** - * Sets aweEligibilityThreshold + * Sets weeklySickPayAmount * - * @param float|null $aweEligibilityThreshold aweEligibilityThreshold + * @param float|null $weeklySickPayAmount [readonly] * * @return $this */ - public function setAweEligibilityThreshold(?float $aweEligibilityThreshold): static + public function setWeeklySickPayAmount(?float $weeklySickPayAmount): static { - if (is_null($aweEligibilityThreshold)) { - throw new InvalidArgumentException('non-nullable aweEligibilityThreshold cannot be null'); + if (is_null($weeklySickPayAmount)) { + throw new InvalidArgumentException('non-nullable weeklySickPayAmount cannot be null'); } - $this->container['aweEligibilityThreshold'] = $aweEligibilityThreshold; + $this->container['weeklySickPayAmount'] = $weeklySickPayAmount; return $this; } diff --git a/src/Model/StatutoryPayReport.php b/src/Model/StatutoryPayReport.php index a4d3030..f13ed8a 100644 --- a/src/Model/StatutoryPayReport.php +++ b/src/Model/StatutoryPayReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,20 +59,21 @@ class StatutoryPayReport implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'lines' => '\SynergiTech\Staffology\Model\StatutoryPayReportLine[]', 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'isDraft' => 'bool', + 'lines' => '\SynergiTech\Staffology\Model\StatutoryPayReportLine[]', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -81,20 +82,21 @@ class StatutoryPayReport implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'lines' => null, 'employer' => null, - 'payPeriod' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'isDraft' => null, + 'lines' => null, 'ordinal' => 'int32', + 'payPeriod' => null, 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -103,20 +105,21 @@ class StatutoryPayReport implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'lines' => true, 'employer' => false, - 'payPeriod' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'isDraft' => false, + 'lines' => true, 'ordinal' => false, + 'payPeriod' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -205,20 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'lines' => 'lines', 'employer' => 'employer', - 'payPeriod' => 'payPeriod', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'isDraft' => 'isDraft', + 'lines' => 'lines', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -227,20 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'lines' => 'setLines', 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'isDraft' => 'setIsDraft', + 'lines' => 'setLines', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -249,20 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'lines' => 'getLines', 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'isDraft' => 'getIsDraft', + 'lines' => 'getLines', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -321,20 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -380,89 +387,150 @@ public function valid(): bool /** - * Gets lines + * Gets employer * - * @return \SynergiTech\Staffology\Model\StatutoryPayReportLine[]|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getLines(): ?array + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['lines']; + return $this->container['employer']; } /** - * Sets lines + * Sets employer * - * @param \SynergiTech\Staffology\Model\StatutoryPayReportLine[]|null $lines lines + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setLines(?array $lines): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); + } + $this->container['employer'] = $employer; + + return $this; + } + + /** + * Gets endDate + * + * @return \DateTime|null + */ + public function getEndDate(): ?\DateTime + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param \DateTime|null $endDate endDate + * + * @return $this + */ + public function setEndDate(?\DateTime $endDate): static + { + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets endPeriodName + * + * @return string|null + */ + public function getEndPeriodName(): ?string + { + return $this->container['endPeriodName']; + } + + /** + * Sets endPeriodName + * + * @param string|null $endPeriodName endPeriodName + * + * @return $this + */ + public function setEndPeriodName(?string $endPeriodName): static + { + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); + $index = array_search('endPeriodName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lines'] = $lines; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets employer + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getIsDraft(): ?bool { - return $this->container['employer']; + return $this->container['isDraft']; } /** - * Sets employer + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param bool|null $isDraft isDraft * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['employer'] = $employer; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets payPeriod + * Gets lines * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return \SynergiTech\Staffology\Model\StatutoryPayReportLine[]|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getLines(): ?array { - return $this->container['payPeriod']; + return $this->container['lines']; } /** - * Sets payPeriod + * Sets lines * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param \SynergiTech\Staffology\Model\StatutoryPayReportLine[]|null $lines lines * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setLines(?array $lines): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriod'] = $payPeriod; + $this->container['lines'] = $lines; return $this; } @@ -494,6 +562,33 @@ public function setOrdinal(?int $ordinal): static return $this; } + /** + * Gets payPeriod + * + * @return \SynergiTech\Staffology\Model\PayPeriods|null + */ + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + { + return $this->container['payPeriod']; + } + + /** + * Sets payPeriod + * + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * + * @return $this + */ + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + { + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + } + $this->container['payPeriod'] = $payPeriod; + + return $this; + } + /** * Gets period * @@ -549,69 +644,28 @@ public function setPeriodTo(?int $periodTo): static } /** - * Gets startPeriodName - * - * @return string|null - */ - public function getStartPeriodName(): ?string - { - return $this->container['startPeriodName']; - } - - /** - * Sets startPeriodName - * - * @param string|null $startPeriodName startPeriodName - * - * @return $this - */ - public function setStartPeriodName(?string $startPeriodName): static - { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['startPeriodName'] = $startPeriodName; - - return $this; - } - - /** - * Gets endPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getEndPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['endPeriodName']; + return $this->container['report']; } /** - * Sets endPeriodName + * Sets report * - * @param string|null $endPeriodName endPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['report'] = $report; return $this; } @@ -644,55 +698,35 @@ public function setStartDate(?\DateTime $startDate): static } /** - * Gets endDate - * - * @return \DateTime|null - */ - public function getEndDate(): ?\DateTime - { - return $this->container['endDate']; - } - - /** - * Sets endDate - * - * @param \DateTime|null $endDate endDate - * - * @return $this - */ - public function setEndDate(?\DateTime $endDate): static - { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); - } - $this->container['endDate'] = $endDate; - - return $this; - } - - /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -759,28 +793,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/StatutoryPayReportLine.php b/src/Model/StatutoryPayReportLine.php index 8acc39e..5d2d957 100644 --- a/src/Model/StatutoryPayReportLine.php +++ b/src/Model/StatutoryPayReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,16 +59,16 @@ class StatutoryPayReportLine implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ + 'department' => 'string', 'employee' => '\SynergiTech\Staffology\Model\Item', + 'hasStatPay' => 'bool', 'payrollCode' => 'string', - 'department' => 'string', - 'ssp' => 'float', - 'smp' => 'float', - 'spp' => 'float', 'sap' => 'float', 'shpp' => 'float', + 'smp' => 'float', 'spbp' => 'float', - 'hasStatPay' => 'bool', + 'spp' => 'float', + 'ssp' => 'float', 'totalStatPay' => 'float' ]; @@ -78,16 +78,16 @@ class StatutoryPayReportLine implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ + 'department' => null, 'employee' => null, + 'hasStatPay' => null, 'payrollCode' => null, - 'department' => null, - 'ssp' => 'double', - 'smp' => 'double', - 'spp' => 'double', 'sap' => 'double', 'shpp' => 'double', + 'smp' => 'double', 'spbp' => 'double', - 'hasStatPay' => null, + 'spp' => 'double', + 'ssp' => 'double', 'totalStatPay' => 'double' ]; @@ -97,16 +97,16 @@ class StatutoryPayReportLine implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ + 'department' => true, 'employee' => false, + 'hasStatPay' => false, 'payrollCode' => true, - 'department' => true, - 'ssp' => false, - 'smp' => false, - 'spp' => false, 'sap' => false, 'shpp' => false, + 'smp' => false, 'spbp' => false, - 'hasStatPay' => false, + 'spp' => false, + 'ssp' => false, 'totalStatPay' => false ]; @@ -196,16 +196,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'department' => 'department', 'employee' => 'employee', + 'hasStatPay' => 'hasStatPay', 'payrollCode' => 'payrollCode', - 'department' => 'department', - 'ssp' => 'ssp', - 'smp' => 'smp', - 'spp' => 'spp', 'sap' => 'sap', 'shpp' => 'shpp', + 'smp' => 'smp', 'spbp' => 'spbp', - 'hasStatPay' => 'hasStatPay', + 'spp' => 'spp', + 'ssp' => 'ssp', 'totalStatPay' => 'totalStatPay' ]; @@ -215,16 +215,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'department' => 'setDepartment', 'employee' => 'setEmployee', + 'hasStatPay' => 'setHasStatPay', 'payrollCode' => 'setPayrollCode', - 'department' => 'setDepartment', - 'ssp' => 'setSsp', - 'smp' => 'setSmp', - 'spp' => 'setSpp', 'sap' => 'setSap', 'shpp' => 'setShpp', + 'smp' => 'setSmp', 'spbp' => 'setSpbp', - 'hasStatPay' => 'setHasStatPay', + 'spp' => 'setSpp', + 'ssp' => 'setSsp', 'totalStatPay' => 'setTotalStatPay' ]; @@ -234,16 +234,16 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'department' => 'getDepartment', 'employee' => 'getEmployee', + 'hasStatPay' => 'getHasStatPay', 'payrollCode' => 'getPayrollCode', - 'department' => 'getDepartment', - 'ssp' => 'getSsp', - 'smp' => 'getSmp', - 'spp' => 'getSpp', 'sap' => 'getSap', 'shpp' => 'getShpp', + 'smp' => 'getSmp', 'spbp' => 'getSpbp', - 'hasStatPay' => 'getHasStatPay', + 'spp' => 'getSpp', + 'ssp' => 'getSsp', 'totalStatPay' => 'getTotalStatPay' ]; @@ -303,16 +303,16 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('department', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('hasStatPay', $data ?? [], null); $this->setIfExists('payrollCode', $data ?? [], null); - $this->setIfExists('department', $data ?? [], null); - $this->setIfExists('ssp', $data ?? [], null); - $this->setIfExists('smp', $data ?? [], null); - $this->setIfExists('spp', $data ?? [], null); $this->setIfExists('sap', $data ?? [], null); $this->setIfExists('shpp', $data ?? [], null); + $this->setIfExists('smp', $data ?? [], null); $this->setIfExists('spbp', $data ?? [], null); - $this->setIfExists('hasStatPay', $data ?? [], null); + $this->setIfExists('spp', $data ?? [], null); + $this->setIfExists('ssp', $data ?? [], null); $this->setIfExists('totalStatPay', $data ?? [], null); } @@ -358,67 +358,6 @@ public function valid(): bool } - /** - * Gets employee - * - * @return \SynergiTech\Staffology\Model\Item|null - */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item - { - return $this->container['employee']; - } - - /** - * Sets employee - * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee - * - * @return $this - */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static - { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); - } - $this->container['employee'] = $employee; - - return $this; - } - - /** - * Gets payrollCode - * - * @return string|null - */ - public function getPayrollCode(): ?string - { - return $this->container['payrollCode']; - } - - /** - * Sets payrollCode - * - * @param string|null $payrollCode payrollCode - * - * @return $this - */ - public function setPayrollCode(?string $payrollCode): static - { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['payrollCode'] = $payrollCode; - - return $this; - } - /** * Gets department * @@ -454,82 +393,89 @@ public function setDepartment(?string $department): static } /** - * Gets ssp + * Gets employee * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getSsp(): ?float + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['ssp']; + return $this->container['employee']; } /** - * Sets ssp + * Sets employee * - * @param float|null $ssp ssp + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setSsp(?float $ssp): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($ssp)) { - throw new InvalidArgumentException('non-nullable ssp cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['ssp'] = $ssp; + $this->container['employee'] = $employee; return $this; } /** - * Gets smp + * Gets hasStatPay * - * @return float|null + * @return bool|null */ - public function getSmp(): ?float + public function getHasStatPay(): ?bool { - return $this->container['smp']; + return $this->container['hasStatPay']; } /** - * Sets smp + * Sets hasStatPay * - * @param float|null $smp smp + * @param bool|null $hasStatPay hasStatPay * * @return $this */ - public function setSmp(?float $smp): static + public function setHasStatPay(?bool $hasStatPay): static { - if (is_null($smp)) { - throw new InvalidArgumentException('non-nullable smp cannot be null'); + if (is_null($hasStatPay)) { + throw new InvalidArgumentException('non-nullable hasStatPay cannot be null'); } - $this->container['smp'] = $smp; + $this->container['hasStatPay'] = $hasStatPay; return $this; } /** - * Gets spp + * Gets payrollCode * - * @return float|null + * @return string|null */ - public function getSpp(): ?float + public function getPayrollCode(): ?string { - return $this->container['spp']; + return $this->container['payrollCode']; } /** - * Sets spp + * Sets payrollCode * - * @param float|null $spp spp + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setSpp(?float $spp): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($spp)) { - throw new InvalidArgumentException('non-nullable spp cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['spp'] = $spp; + $this->container['payrollCode'] = $payrollCode; return $this; } @@ -588,6 +534,33 @@ public function setShpp(?float $shpp): static return $this; } + /** + * Gets smp + * + * @return float|null + */ + public function getSmp(): ?float + { + return $this->container['smp']; + } + + /** + * Sets smp + * + * @param float|null $smp smp + * + * @return $this + */ + public function setSmp(?float $smp): static + { + if (is_null($smp)) { + throw new InvalidArgumentException('non-nullable smp cannot be null'); + } + $this->container['smp'] = $smp; + + return $this; + } + /** * Gets spbp * @@ -616,28 +589,55 @@ public function setSpbp(?float $spbp): static } /** - * Gets hasStatPay + * Gets spp * - * @return bool|null + * @return float|null */ - public function getHasStatPay(): ?bool + public function getSpp(): ?float { - return $this->container['hasStatPay']; + return $this->container['spp']; } /** - * Sets hasStatPay + * Sets spp * - * @param bool|null $hasStatPay hasStatPay + * @param float|null $spp spp * * @return $this */ - public function setHasStatPay(?bool $hasStatPay): static + public function setSpp(?float $spp): static { - if (is_null($hasStatPay)) { - throw new InvalidArgumentException('non-nullable hasStatPay cannot be null'); + if (is_null($spp)) { + throw new InvalidArgumentException('non-nullable spp cannot be null'); } - $this->container['hasStatPay'] = $hasStatPay; + $this->container['spp'] = $spp; + + return $this; + } + + /** + * Gets ssp + * + * @return float|null + */ + public function getSsp(): ?float + { + return $this->container['ssp']; + } + + /** + * Sets ssp + * + * @param float|null $ssp ssp + * + * @return $this + */ + public function setSsp(?float $ssp): static + { + if (is_null($ssp)) { + throw new InvalidArgumentException('non-nullable ssp cannot be null'); + } + $this->container['ssp'] = $ssp; return $this; } diff --git a/src/Model/StatutoryPayReportReportResponse.php b/src/Model/StatutoryPayReportReportResponse.php index 1851737..2618855 100644 --- a/src/Model/StatutoryPayReportReportResponse.php +++ b/src/Model/StatutoryPayReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class StatutoryPayReportReportResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\StatutoryPayReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class StatutoryPayReportReportResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class StatutoryPayReportReportResponse implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/StringDecimalKeyValuePair.php b/src/Model/StringDecimalKeyValuePair.php index 1065884..5867dbd 100644 --- a/src/Model/StringDecimalKeyValuePair.php +++ b/src/Model/StringDecimalKeyValuePair.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/StringStringDecimalValueTuple.php b/src/Model/StringStringDecimalValueTuple.php index 3255cb0..0d1e042 100644 --- a/src/Model/StringStringDecimalValueTuple.php +++ b/src/Model/StringStringDecimalValueTuple.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/StringStringKeyValuePair.php b/src/Model/StringStringKeyValuePair.php index c65c636..88b7c43 100644 --- a/src/Model/StringStringKeyValuePair.php +++ b/src/Model/StringStringKeyValuePair.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/StudentLoan.php b/src/Model/StudentLoan.php index 724f2f2..28a381a 100644 --- a/src/Model/StudentLoan.php +++ b/src/Model/StudentLoan.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/StudentLoanRecovered.php b/src/Model/StudentLoanRecovered.php index 6058305..2172c11 100644 --- a/src/Model/StudentLoanRecovered.php +++ b/src/Model/StudentLoanRecovered.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/SubmissionStatus.php b/src/Model/SubmissionStatus.php index eef7871..b058178 100644 --- a/src/Model/SubmissionStatus.php +++ b/src/Model/SubmissionStatus.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/SupplementaryPayRunDetails.php b/src/Model/SupplementaryPayRunDetails.php new file mode 100644 index 0000000..271947d --- /dev/null +++ b/src/Model/SupplementaryPayRunDetails.php @@ -0,0 +1,494 @@ + + */ +class SupplementaryPayRunDetails implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'SupplementaryPayRunDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'description' => 'string', + 'employeeUniqueIds' => 'string[]', + 'paymentDate' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'description' => null, + 'employeeUniqueIds' => 'uuid', + 'paymentDate' => 'date' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'description' => false, + 'employeeUniqueIds' => false, + 'paymentDate' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'description' => 'description', + 'employeeUniqueIds' => 'employeeUniqueIds', + 'paymentDate' => 'paymentDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'description' => 'setDescription', + 'employeeUniqueIds' => 'setEmployeeUniqueIds', + 'paymentDate' => 'setPaymentDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'description' => 'getDescription', + 'employeeUniqueIds' => 'getEmployeeUniqueIds', + 'paymentDate' => 'getPaymentDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('employeeUniqueIds', $data ?? [], null); + $this->setIfExists('paymentDate', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ((mb_strlen($this->container['description']) < 1)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 1."; + } + + if ($this->container['employeeUniqueIds'] === null) { + $invalidProperties[] = "'employeeUniqueIds' can't be null"; + } + if ($this->container['paymentDate'] === null) { + $invalidProperties[] = "'paymentDate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets description + * + * @return string + */ + public function getDescription(): string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description Description of the Supplementary Pay Run This will be set to a default value if not set by the user + * + * @return $this + */ + public function setDescription(string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + + if ((mb_strlen($description) < 1)) { + throw new InvalidArgumentException('invalid length for $description when calling SupplementaryPayRunDetails., must be bigger than or equal to 1.'); + } + + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets employeeUniqueIds + * + * @return string[] + */ + public function getEmployeeUniqueIds(): array + { + return $this->container['employeeUniqueIds']; + } + + /** + * Sets employeeUniqueIds + * + * @param string[] $employeeUniqueIds List of employee unique ids to be included in a supplementary Payrun + * + * @return $this + */ + public function setEmployeeUniqueIds(array $employeeUniqueIds): static + { + if (is_null($employeeUniqueIds)) { + throw new InvalidArgumentException('non-nullable employeeUniqueIds cannot be null'); + } + $this->container['employeeUniqueIds'] = $employeeUniqueIds; + + return $this; + } + + /** + * Gets paymentDate + * + * @return \DateTime + */ + public function getPaymentDate(): \DateTime + { + return $this->container['paymentDate']; + } + + /** + * Sets paymentDate + * + * @param \DateTime $paymentDate The intended date that the Employees included in the supplementary PayRun will be paid, although this can be changed on a per PayRunEntry basis This date must be on or after the PaymentDate of the main PayRun + * + * @return $this + */ + public function setPaymentDate(\DateTime $paymentDate): static + { + if (is_null($paymentDate)) { + throw new InvalidArgumentException('non-nullable paymentDate cannot be null'); + } + $this->container['paymentDate'] = $paymentDate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/Tag.php b/src/Model/Tag.php index c56be53..02239f7 100644 --- a/src/Model/Tag.php +++ b/src/Model/Tag.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class Tag implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'code' => 'string', - 'title' => 'string', - 'color' => 'string' + 'color' => 'string', + 'title' => 'string' ]; /** @@ -71,8 +71,8 @@ class Tag implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'code' => null, - 'title' => null, - 'color' => null + 'color' => null, + 'title' => null ]; /** @@ -82,8 +82,8 @@ class Tag implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'code' => false, - 'title' => false, - 'color' => true + 'color' => true, + 'title' => false ]; /** @@ -173,8 +173,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'code' => 'code', - 'title' => 'title', - 'color' => 'color' + 'color' => 'color', + 'title' => 'title' ]; /** @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'code' => 'setCode', - 'title' => 'setTitle', - 'color' => 'setColor' + 'color' => 'setColor', + 'title' => 'setTitle' ]; /** @@ -195,8 +195,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'code' => 'getCode', - 'title' => 'getTitle', - 'color' => 'getColor' + 'color' => 'getColor', + 'title' => 'getTitle' ]; /** @@ -256,8 +256,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('code', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); } /** @@ -298,6 +298,10 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'code', the character length must be bigger than or equal to 1."; } + if (!is_null($this->container['color']) && (mb_strlen($this->container['color']) > 6)) { + $invalidProperties[] = "invalid value for 'color', the character length must be smaller than or equal to 6."; + } + if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } @@ -309,10 +313,6 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['color']) && (mb_strlen($this->container['color']) > 6)) { - $invalidProperties[] = "invalid value for 'color', the character length must be smaller than or equal to 6."; - } - return $invalidProperties; } @@ -362,40 +362,6 @@ public function setCode(string $code): static return $this; } - /** - * Gets title - * - * @return string - */ - public function getTitle(): string - { - return $this->container['title']; - } - - /** - * Sets title - * - * @param string $title The title for this Tag - * - * @return $this - */ - public function setTitle(string $title): static - { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); - } - if ((mb_strlen($title) > 50)) { - throw new InvalidArgumentException('invalid length for $title when calling Tag., must be smaller than or equal to 50.'); - } - if ((mb_strlen($title) < 1)) { - throw new InvalidArgumentException('invalid length for $title when calling Tag., must be bigger than or equal to 1.'); - } - - $this->container['title'] = $title; - - return $this; - } - /** * Gets color * @@ -433,6 +399,40 @@ public function setColor(?string $color): static return $this; } + + /** + * Gets title + * + * @return string + */ + public function getTitle(): string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title The title for this Tag + * + * @return $this + */ + public function setTitle(string $title): static + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if ((mb_strlen($title) > 50)) { + throw new InvalidArgumentException('invalid length for $title when calling Tag., must be smaller than or equal to 50.'); + } + if ((mb_strlen($title) < 1)) { + throw new InvalidArgumentException('invalid length for $title when calling Tag., must be bigger than or equal to 1.'); + } + + $this->container['title'] = $title; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/TaxAndNi.php b/src/Model/TaxAndNi.php index 2164efd..422b220 100644 --- a/src/Model/TaxAndNi.php +++ b/src/Model/TaxAndNi.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,17 +59,17 @@ class TaxAndNi implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ + 'foreignTaxCredit' => 'bool', 'niTable' => 'string', - 'secondaryClass1NotPayable' => 'bool', 'postgradLoan' => 'bool', - 'postgraduateLoanStartDate' => '\DateTime', 'postgraduateLoanEndDate' => '\DateTime', + 'postgraduateLoanStartDate' => '\DateTime', + 'secondaryClass1NotPayable' => 'bool', 'studentLoan' => '\SynergiTech\Staffology\Model\StudentLoan', - 'studentLoanStartDate' => '\DateTime', 'studentLoanEndDate' => '\DateTime', + 'studentLoanStartDate' => '\DateTime', 'taxCode' => 'string', - 'week1Month1' => 'bool', - 'foreignTaxCredit' => 'bool' + 'week1Month1' => 'bool' ]; /** @@ -78,17 +78,17 @@ class TaxAndNi implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ + 'foreignTaxCredit' => null, 'niTable' => null, - 'secondaryClass1NotPayable' => null, 'postgradLoan' => null, - 'postgraduateLoanStartDate' => 'date', 'postgraduateLoanEndDate' => 'date', + 'postgraduateLoanStartDate' => 'date', + 'secondaryClass1NotPayable' => null, 'studentLoan' => null, - 'studentLoanStartDate' => 'date', 'studentLoanEndDate' => 'date', + 'studentLoanStartDate' => 'date', 'taxCode' => null, - 'week1Month1' => null, - 'foreignTaxCredit' => null + 'week1Month1' => null ]; /** @@ -97,17 +97,17 @@ class TaxAndNi implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ + 'foreignTaxCredit' => false, 'niTable' => false, - 'secondaryClass1NotPayable' => false, 'postgradLoan' => false, - 'postgraduateLoanStartDate' => true, 'postgraduateLoanEndDate' => true, + 'postgraduateLoanStartDate' => true, + 'secondaryClass1NotPayable' => false, 'studentLoan' => false, - 'studentLoanStartDate' => true, 'studentLoanEndDate' => true, + 'studentLoanStartDate' => true, 'taxCode' => true, - 'week1Month1' => false, - 'foreignTaxCredit' => false + 'week1Month1' => false ]; /** @@ -196,17 +196,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'foreignTaxCredit' => 'foreignTaxCredit', 'niTable' => 'niTable', - 'secondaryClass1NotPayable' => 'secondaryClass1NotPayable', 'postgradLoan' => 'postgradLoan', - 'postgraduateLoanStartDate' => 'postgraduateLoanStartDate', 'postgraduateLoanEndDate' => 'postgraduateLoanEndDate', + 'postgraduateLoanStartDate' => 'postgraduateLoanStartDate', + 'secondaryClass1NotPayable' => 'secondaryClass1NotPayable', 'studentLoan' => 'studentLoan', - 'studentLoanStartDate' => 'studentLoanStartDate', 'studentLoanEndDate' => 'studentLoanEndDate', + 'studentLoanStartDate' => 'studentLoanStartDate', 'taxCode' => 'taxCode', - 'week1Month1' => 'week1Month1', - 'foreignTaxCredit' => 'foreignTaxCredit' + 'week1Month1' => 'week1Month1' ]; /** @@ -215,17 +215,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'foreignTaxCredit' => 'setForeignTaxCredit', 'niTable' => 'setNiTable', - 'secondaryClass1NotPayable' => 'setSecondaryClass1NotPayable', 'postgradLoan' => 'setPostgradLoan', - 'postgraduateLoanStartDate' => 'setPostgraduateLoanStartDate', 'postgraduateLoanEndDate' => 'setPostgraduateLoanEndDate', + 'postgraduateLoanStartDate' => 'setPostgraduateLoanStartDate', + 'secondaryClass1NotPayable' => 'setSecondaryClass1NotPayable', 'studentLoan' => 'setStudentLoan', - 'studentLoanStartDate' => 'setStudentLoanStartDate', 'studentLoanEndDate' => 'setStudentLoanEndDate', + 'studentLoanStartDate' => 'setStudentLoanStartDate', 'taxCode' => 'setTaxCode', - 'week1Month1' => 'setWeek1Month1', - 'foreignTaxCredit' => 'setForeignTaxCredit' + 'week1Month1' => 'setWeek1Month1' ]; /** @@ -234,17 +234,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'foreignTaxCredit' => 'getForeignTaxCredit', 'niTable' => 'getNiTable', - 'secondaryClass1NotPayable' => 'getSecondaryClass1NotPayable', 'postgradLoan' => 'getPostgradLoan', - 'postgraduateLoanStartDate' => 'getPostgraduateLoanStartDate', 'postgraduateLoanEndDate' => 'getPostgraduateLoanEndDate', + 'postgraduateLoanStartDate' => 'getPostgraduateLoanStartDate', + 'secondaryClass1NotPayable' => 'getSecondaryClass1NotPayable', 'studentLoan' => 'getStudentLoan', - 'studentLoanStartDate' => 'getStudentLoanStartDate', 'studentLoanEndDate' => 'getStudentLoanEndDate', + 'studentLoanStartDate' => 'getStudentLoanStartDate', 'taxCode' => 'getTaxCode', - 'week1Month1' => 'getWeek1Month1', - 'foreignTaxCredit' => 'getForeignTaxCredit' + 'week1Month1' => 'getWeek1Month1' ]; /** @@ -303,17 +303,17 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('foreignTaxCredit', $data ?? [], null); $this->setIfExists('niTable', $data ?? [], null); - $this->setIfExists('secondaryClass1NotPayable', $data ?? [], null); $this->setIfExists('postgradLoan', $data ?? [], null); - $this->setIfExists('postgraduateLoanStartDate', $data ?? [], null); $this->setIfExists('postgraduateLoanEndDate', $data ?? [], null); + $this->setIfExists('postgraduateLoanStartDate', $data ?? [], null); + $this->setIfExists('secondaryClass1NotPayable', $data ?? [], null); $this->setIfExists('studentLoan', $data ?? [], null); - $this->setIfExists('studentLoanStartDate', $data ?? [], null); $this->setIfExists('studentLoanEndDate', $data ?? [], null); + $this->setIfExists('studentLoanStartDate', $data ?? [], null); $this->setIfExists('taxCode', $data ?? [], null); $this->setIfExists('week1Month1', $data ?? [], null); - $this->setIfExists('foreignTaxCredit', $data ?? [], null); } /** @@ -365,6 +365,33 @@ public function valid(): bool } + /** + * Gets foreignTaxCredit + * + * @return bool|null + */ + public function getForeignTaxCredit(): ?bool + { + return $this->container['foreignTaxCredit']; + } + + /** + * Sets foreignTaxCredit + * + * @param bool|null $foreignTaxCredit If set to True you are enabling the possibility to enter an amount on payslip so you can reduce UK Tax liabilities. + * + * @return $this + */ + public function setForeignTaxCredit(?bool $foreignTaxCredit): static + { + if (is_null($foreignTaxCredit)) { + throw new InvalidArgumentException('non-nullable foreignTaxCredit cannot be null'); + } + $this->container['foreignTaxCredit'] = $foreignTaxCredit; + + return $this; + } + /** * Gets niTable * @@ -393,55 +420,62 @@ public function setNiTable(string $niTable): static } /** - * Gets secondaryClass1NotPayable + * Gets postgradLoan * * @return bool|null */ - public function getSecondaryClass1NotPayable(): ?bool + public function getPostgradLoan(): ?bool { - return $this->container['secondaryClass1NotPayable']; + return $this->container['postgradLoan']; } /** - * Sets secondaryClass1NotPayable + * Sets postgradLoan * - * @param bool|null $secondaryClass1NotPayable If set to true then no Employer NI will be paid for this Employee + * @param bool|null $postgradLoan Set to true if the Employee needs to make Post Graduate Loan repayments * * @return $this */ - public function setSecondaryClass1NotPayable(?bool $secondaryClass1NotPayable): static + public function setPostgradLoan(?bool $postgradLoan): static { - if (is_null($secondaryClass1NotPayable)) { - throw new InvalidArgumentException('non-nullable secondaryClass1NotPayable cannot be null'); + if (is_null($postgradLoan)) { + throw new InvalidArgumentException('non-nullable postgradLoan cannot be null'); } - $this->container['secondaryClass1NotPayable'] = $secondaryClass1NotPayable; + $this->container['postgradLoan'] = $postgradLoan; return $this; } /** - * Gets postgradLoan + * Gets postgraduateLoanEndDate * - * @return bool|null + * @return \DateTime|null */ - public function getPostgradLoan(): ?bool + public function getPostgraduateLoanEndDate(): ?\DateTime { - return $this->container['postgradLoan']; + return $this->container['postgraduateLoanEndDate']; } /** - * Sets postgradLoan + * Sets postgraduateLoanEndDate * - * @param bool|null $postgradLoan Set to true if the Employee needs to make Post Graduate Loan repayments + * @param \DateTime|null $postgraduateLoanEndDate postgraduateLoanEndDate * * @return $this */ - public function setPostgradLoan(?bool $postgradLoan): static + public function setPostgraduateLoanEndDate(?\DateTime $postgraduateLoanEndDate): static { - if (is_null($postgradLoan)) { - throw new InvalidArgumentException('non-nullable postgradLoan cannot be null'); + if (is_null($postgraduateLoanEndDate)) { + array_push($this->openAPINullablesSetToNull, 'postgraduateLoanEndDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('postgraduateLoanEndDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['postgradLoan'] = $postgradLoan; + $this->container['postgraduateLoanEndDate'] = $postgraduateLoanEndDate; return $this; } @@ -481,35 +515,28 @@ public function setPostgraduateLoanStartDate(?\DateTime $postgraduateLoanStartDa } /** - * Gets postgraduateLoanEndDate + * Gets secondaryClass1NotPayable * - * @return \DateTime|null + * @return bool|null */ - public function getPostgraduateLoanEndDate(): ?\DateTime + public function getSecondaryClass1NotPayable(): ?bool { - return $this->container['postgraduateLoanEndDate']; + return $this->container['secondaryClass1NotPayable']; } /** - * Sets postgraduateLoanEndDate + * Sets secondaryClass1NotPayable * - * @param \DateTime|null $postgraduateLoanEndDate postgraduateLoanEndDate + * @param bool|null $secondaryClass1NotPayable If set to true then no Employer NI will be paid for this Employee * * @return $this */ - public function setPostgraduateLoanEndDate(?\DateTime $postgraduateLoanEndDate): static + public function setSecondaryClass1NotPayable(?bool $secondaryClass1NotPayable): static { - if (is_null($postgraduateLoanEndDate)) { - array_push($this->openAPINullablesSetToNull, 'postgraduateLoanEndDate'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('postgraduateLoanEndDate', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($secondaryClass1NotPayable)) { + throw new InvalidArgumentException('non-nullable secondaryClass1NotPayable cannot be null'); } - $this->container['postgraduateLoanEndDate'] = $postgraduateLoanEndDate; + $this->container['secondaryClass1NotPayable'] = $secondaryClass1NotPayable; return $this; } @@ -542,69 +569,69 @@ public function setStudentLoan(?\SynergiTech\Staffology\Model\StudentLoan $stude } /** - * Gets studentLoanStartDate + * Gets studentLoanEndDate * * @return \DateTime|null */ - public function getStudentLoanStartDate(): ?\DateTime + public function getStudentLoanEndDate(): ?\DateTime { - return $this->container['studentLoanStartDate']; + return $this->container['studentLoanEndDate']; } /** - * Sets studentLoanStartDate + * Sets studentLoanEndDate * - * @param \DateTime|null $studentLoanStartDate studentLoanStartDate + * @param \DateTime|null $studentLoanEndDate studentLoanEndDate * * @return $this */ - public function setStudentLoanStartDate(?\DateTime $studentLoanStartDate): static + public function setStudentLoanEndDate(?\DateTime $studentLoanEndDate): static { - if (is_null($studentLoanStartDate)) { - array_push($this->openAPINullablesSetToNull, 'studentLoanStartDate'); + if (is_null($studentLoanEndDate)) { + array_push($this->openAPINullablesSetToNull, 'studentLoanEndDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('studentLoanStartDate', $nullablesSetToNull); + $index = array_search('studentLoanEndDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['studentLoanStartDate'] = $studentLoanStartDate; + $this->container['studentLoanEndDate'] = $studentLoanEndDate; return $this; } /** - * Gets studentLoanEndDate + * Gets studentLoanStartDate * * @return \DateTime|null */ - public function getStudentLoanEndDate(): ?\DateTime + public function getStudentLoanStartDate(): ?\DateTime { - return $this->container['studentLoanEndDate']; + return $this->container['studentLoanStartDate']; } /** - * Sets studentLoanEndDate + * Sets studentLoanStartDate * - * @param \DateTime|null $studentLoanEndDate studentLoanEndDate + * @param \DateTime|null $studentLoanStartDate studentLoanStartDate * * @return $this */ - public function setStudentLoanEndDate(?\DateTime $studentLoanEndDate): static + public function setStudentLoanStartDate(?\DateTime $studentLoanStartDate): static { - if (is_null($studentLoanEndDate)) { - array_push($this->openAPINullablesSetToNull, 'studentLoanEndDate'); + if (is_null($studentLoanStartDate)) { + array_push($this->openAPINullablesSetToNull, 'studentLoanStartDate'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('studentLoanEndDate', $nullablesSetToNull); + $index = array_search('studentLoanStartDate', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['studentLoanEndDate'] = $studentLoanEndDate; + $this->container['studentLoanStartDate'] = $studentLoanStartDate; return $this; } @@ -673,33 +700,6 @@ public function setWeek1Month1(?bool $week1Month1): static return $this; } - - /** - * Gets foreignTaxCredit - * - * @return bool|null - */ - public function getForeignTaxCredit(): ?bool - { - return $this->container['foreignTaxCredit']; - } - - /** - * Sets foreignTaxCredit - * - * @param bool|null $foreignTaxCredit If set to True you are enabling the possibility to enter an amount on payslip so you can reduce UK Tax liabilities. - * - * @return $this - */ - public function setForeignTaxCredit(?bool $foreignTaxCredit): static - { - if (is_null($foreignTaxCredit)) { - throw new InvalidArgumentException('non-nullable foreignTaxCredit cannot be null'); - } - $this->container['foreignTaxCredit'] = $foreignTaxCredit; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/TaxBracket.php b/src/Model/TaxBracket.php index 10b1050..2529c8c 100644 --- a/src/Model/TaxBracket.php +++ b/src/Model/TaxBracket.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class TaxBracket implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'from' => 'float', - 'to' => 'float', - 'multiplier' => 'float' + 'multiplier' => 'float', + 'to' => 'float' ]; /** @@ -71,8 +71,8 @@ class TaxBracket implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'from' => 'double', - 'to' => 'double', - 'multiplier' => 'double' + 'multiplier' => 'double', + 'to' => 'double' ]; /** @@ -82,8 +82,8 @@ class TaxBracket implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'from' => false, - 'to' => false, - 'multiplier' => false + 'multiplier' => false, + 'to' => false ]; /** @@ -173,8 +173,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'from' => 'from', - 'to' => 'to', - 'multiplier' => 'multiplier' + 'multiplier' => 'multiplier', + 'to' => 'to' ]; /** @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'from' => 'setFrom', - 'to' => 'setTo', - 'multiplier' => 'setMultiplier' + 'multiplier' => 'setMultiplier', + 'to' => 'setTo' ]; /** @@ -195,8 +195,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'from' => 'getFrom', - 'to' => 'getTo', - 'multiplier' => 'getMultiplier' + 'multiplier' => 'getMultiplier', + 'to' => 'getTo' ]; /** @@ -256,8 +256,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('from', $data ?? [], null); - $this->setIfExists('to', $data ?? [], null); $this->setIfExists('multiplier', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); } /** @@ -330,55 +330,55 @@ public function setFrom(?float $from): static } /** - * Gets to + * Gets multiplier * * @return float|null */ - public function getTo(): ?float + public function getMultiplier(): ?float { - return $this->container['to']; + return $this->container['multiplier']; } /** - * Sets to + * Sets multiplier * - * @param float|null $to [readonly] The end point for applying this tax rate + * @param float|null $multiplier [readonly] The tax rate to apply * * @return $this */ - public function setTo(?float $to): static + public function setMultiplier(?float $multiplier): static { - if (is_null($to)) { - throw new InvalidArgumentException('non-nullable to cannot be null'); + if (is_null($multiplier)) { + throw new InvalidArgumentException('non-nullable multiplier cannot be null'); } - $this->container['to'] = $to; + $this->container['multiplier'] = $multiplier; return $this; } /** - * Gets multiplier + * Gets to * * @return float|null */ - public function getMultiplier(): ?float + public function getTo(): ?float { - return $this->container['multiplier']; + return $this->container['to']; } /** - * Sets multiplier + * Sets to * - * @param float|null $multiplier [readonly] The tax rate to apply + * @param float|null $to [readonly] The end point for applying this tax rate * * @return $this */ - public function setMultiplier(?float $multiplier): static + public function setTo(?float $to): static { - if (is_null($multiplier)) { - throw new InvalidArgumentException('non-nullable multiplier cannot be null'); + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); } - $this->container['multiplier'] = $multiplier; + $this->container['to'] = $to; return $this; } diff --git a/src/Model/TaxCodeChange.php b/src/Model/TaxCodeChange.php index 1755171..aa4ba14 100644 --- a/src/Model/TaxCodeChange.php +++ b/src/Model/TaxCodeChange.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class TaxCodeChange implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'suffix' => 'string', - 'increment' => 'int' + 'increment' => 'int', + 'suffix' => 'string' ]; /** @@ -70,8 +70,8 @@ class TaxCodeChange implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'suffix' => null, - 'increment' => 'int32' + 'increment' => 'int32', + 'suffix' => null ]; /** @@ -80,8 +80,8 @@ class TaxCodeChange implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'suffix' => true, - 'increment' => false + 'increment' => false, + 'suffix' => true ]; /** @@ -170,8 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'suffix' => 'suffix', - 'increment' => 'increment' + 'increment' => 'increment', + 'suffix' => 'suffix' ]; /** @@ -180,8 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'suffix' => 'setSuffix', - 'increment' => 'setIncrement' + 'increment' => 'setIncrement', + 'suffix' => 'setSuffix' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'suffix' => 'getSuffix', - 'increment' => 'getIncrement' + 'increment' => 'getIncrement', + 'suffix' => 'getSuffix' ]; /** @@ -250,8 +250,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('suffix', $data ?? [], null); $this->setIfExists('increment', $data ?? [], null); + $this->setIfExists('suffix', $data ?? [], null); } /** @@ -297,62 +297,62 @@ public function valid(): bool /** - * Gets suffix + * Gets increment * - * @return string|null + * @return int|null */ - public function getSuffix(): ?string + public function getIncrement(): ?int { - return $this->container['suffix']; + return $this->container['increment']; } /** - * Sets suffix + * Sets increment * - * @param string|null $suffix [readonly] The suffix of the Tax Code that needs to be incremented for this Tax Year + * @param int|null $increment [readonly] The amount by which to increment Tax Codes with the given suffix * * @return $this */ - public function setSuffix(?string $suffix): static + public function setIncrement(?int $increment): static { - if (is_null($suffix)) { - array_push($this->openAPINullablesSetToNull, 'suffix'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('suffix', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($increment)) { + throw new InvalidArgumentException('non-nullable increment cannot be null'); } - $this->container['suffix'] = $suffix; + $this->container['increment'] = $increment; return $this; } /** - * Gets increment + * Gets suffix * - * @return int|null + * @return string|null */ - public function getIncrement(): ?int + public function getSuffix(): ?string { - return $this->container['increment']; + return $this->container['suffix']; } /** - * Sets increment + * Sets suffix * - * @param int|null $increment [readonly] The amount by which to increment Tax Codes with the given suffix + * @param string|null $suffix [readonly] The suffix of the Tax Code that needs to be incremented for this Tax Year * * @return $this */ - public function setIncrement(?int $increment): static + public function setSuffix(?string $suffix): static { - if (is_null($increment)) { - throw new InvalidArgumentException('non-nullable increment cannot be null'); + if (is_null($suffix)) { + array_push($this->openAPINullablesSetToNull, 'suffix'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('suffix', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['increment'] = $increment; + $this->container['suffix'] = $suffix; return $this; } diff --git a/src/Model/TaxCodeChangeReport.php b/src/Model/TaxCodeChangeReport.php index 8e36219..fd52796 100644 --- a/src/Model/TaxCodeChangeReport.php +++ b/src/Model/TaxCodeChangeReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class TaxCodeChangeReport implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\TaxCodeChangeValues[]', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -72,11 +72,11 @@ class TaxCodeChangeReport implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPIFormats = [ + 'isDraft' => null, 'lines' => null, 'report' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -85,11 +85,11 @@ class TaxCodeChangeReport implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPINullables = [ + 'isDraft' => false, 'lines' => true, 'report' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ + 'isDraft' => 'isDraft', 'lines' => 'lines', 'report' => 'report', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', 'report' => 'setReport', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', 'report' => 'getReport', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -316,6 +316,33 @@ public function valid(): bool } + /** + * Gets isDraft + * + * @return bool|null + */ + public function getIsDraft(): ?bool + { + return $this->container['isDraft']; + } + + /** + * Sets isDraft + * + * @param bool|null $isDraft isDraft + * + * @return $this + */ + public function setIsDraft(?bool $isDraft): static + { + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + } + $this->container['isDraft'] = $isDraft; + + return $this; + } + /** * Gets lines * @@ -437,33 +464,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/TaxCodeChangeReportReportResponse.php b/src/Model/TaxCodeChangeReportReportResponse.php index 7c6221f..ae5e1c1 100644 --- a/src/Model/TaxCodeChangeReportReportResponse.php +++ b/src/Model/TaxCodeChangeReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class TaxCodeChangeReportReportResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\TaxCodeChangeReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class TaxCodeChangeReportReportResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class TaxCodeChangeReportReportResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/TaxCodeChangeValues.php b/src/Model/TaxCodeChangeValues.php index 6a6143b..662db91 100644 --- a/src/Model/TaxCodeChangeValues.php +++ b/src/Model/TaxCodeChangeValues.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,15 @@ class TaxCodeChangeValues implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ - 'employeeId' => 'int', + 'currentTaxCode' => 'string', 'employee' => '\SynergiTech\Staffology\Model\Item', - 'payrollCode' => 'string', + 'employeeId' => 'int', 'firstName' => 'string', 'lastName' => 'string', 'niNumber' => 'string', + 'payrollCode' => 'string', 'periodChange' => 'int', - 'previousTaxCode' => 'string', - 'currentTaxCode' => 'string' + 'previousTaxCode' => 'string' ]; /** @@ -76,15 +76,15 @@ class TaxCodeChangeValues implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPIFormats = [ - 'employeeId' => 'int32', + 'currentTaxCode' => null, 'employee' => null, - 'payrollCode' => null, + 'employeeId' => 'int32', 'firstName' => null, 'lastName' => null, 'niNumber' => null, + 'payrollCode' => null, 'periodChange' => 'int32', - 'previousTaxCode' => null, - 'currentTaxCode' => null + 'previousTaxCode' => null ]; /** @@ -93,15 +93,15 @@ class TaxCodeChangeValues implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPINullables = [ - 'employeeId' => false, + 'currentTaxCode' => true, 'employee' => false, - 'payrollCode' => true, + 'employeeId' => false, 'firstName' => true, 'lastName' => true, 'niNumber' => true, + 'payrollCode' => true, 'periodChange' => false, - 'previousTaxCode' => true, - 'currentTaxCode' => true + 'previousTaxCode' => true ]; /** @@ -190,15 +190,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employeeId' => 'employeeId', + 'currentTaxCode' => 'currentTaxCode', 'employee' => 'employee', - 'payrollCode' => 'payrollCode', + 'employeeId' => 'employeeId', 'firstName' => 'firstName', 'lastName' => 'lastName', 'niNumber' => 'niNumber', + 'payrollCode' => 'payrollCode', 'periodChange' => 'periodChange', - 'previousTaxCode' => 'previousTaxCode', - 'currentTaxCode' => 'currentTaxCode' + 'previousTaxCode' => 'previousTaxCode' ]; /** @@ -207,15 +207,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employeeId' => 'setEmployeeId', + 'currentTaxCode' => 'setCurrentTaxCode', 'employee' => 'setEmployee', - 'payrollCode' => 'setPayrollCode', + 'employeeId' => 'setEmployeeId', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', 'niNumber' => 'setNiNumber', + 'payrollCode' => 'setPayrollCode', 'periodChange' => 'setPeriodChange', - 'previousTaxCode' => 'setPreviousTaxCode', - 'currentTaxCode' => 'setCurrentTaxCode' + 'previousTaxCode' => 'setPreviousTaxCode' ]; /** @@ -224,15 +224,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employeeId' => 'getEmployeeId', + 'currentTaxCode' => 'getCurrentTaxCode', 'employee' => 'getEmployee', - 'payrollCode' => 'getPayrollCode', + 'employeeId' => 'getEmployeeId', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', 'niNumber' => 'getNiNumber', + 'payrollCode' => 'getPayrollCode', 'periodChange' => 'getPeriodChange', - 'previousTaxCode' => 'getPreviousTaxCode', - 'currentTaxCode' => 'getCurrentTaxCode' + 'previousTaxCode' => 'getPreviousTaxCode' ]; /** @@ -291,15 +291,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employeeId', $data ?? [], null); + $this->setIfExists('currentTaxCode', $data ?? [], null); $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('employeeId', $data ?? [], null); $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('niNumber', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('periodChange', $data ?? [], null); $this->setIfExists('previousTaxCode', $data ?? [], null); - $this->setIfExists('currentTaxCode', $data ?? [], null); } /** @@ -345,28 +345,35 @@ public function valid(): bool /** - * Gets employeeId + * Gets currentTaxCode * - * @return int|null + * @return string|null */ - public function getEmployeeId(): ?int + public function getCurrentTaxCode(): ?string { - return $this->container['employeeId']; + return $this->container['currentTaxCode']; } /** - * Sets employeeId + * Sets currentTaxCode * - * @param int|null $employeeId employeeId + * @param string|null $currentTaxCode currentTaxCode * * @return $this */ - public function setEmployeeId(?int $employeeId): static + public function setCurrentTaxCode(?string $currentTaxCode): static { - if (is_null($employeeId)) { - throw new InvalidArgumentException('non-nullable employeeId cannot be null'); + if (is_null($currentTaxCode)) { + array_push($this->openAPINullablesSetToNull, 'currentTaxCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('currentTaxCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeeId'] = $employeeId; + $this->container['currentTaxCode'] = $currentTaxCode; return $this; } @@ -399,35 +406,28 @@ public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): stat } /** - * Gets payrollCode + * Gets employeeId * - * @return string|null + * @return int|null */ - public function getPayrollCode(): ?string + public function getEmployeeId(): ?int { - return $this->container['payrollCode']; + return $this->container['employeeId']; } /** - * Sets payrollCode + * Sets employeeId * - * @param string|null $payrollCode payrollCode + * @param int|null $employeeId employeeId * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setEmployeeId(?int $employeeId): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employeeId)) { + throw new InvalidArgumentException('non-nullable employeeId cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['employeeId'] = $employeeId; return $this; } @@ -534,6 +534,40 @@ public function setNiNumber(?string $niNumber): static return $this; } + /** + * Gets payrollCode + * + * @return string|null + */ + public function getPayrollCode(): ?string + { + return $this->container['payrollCode']; + } + + /** + * Sets payrollCode + * + * @param string|null $payrollCode payrollCode + * + * @return $this + */ + public function setPayrollCode(?string $payrollCode): static + { + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['payrollCode'] = $payrollCode; + + return $this; + } + /** * Gets periodChange * @@ -594,40 +628,6 @@ public function setPreviousTaxCode(?string $previousTaxCode): static return $this; } - - /** - * Gets currentTaxCode - * - * @return string|null - */ - public function getCurrentTaxCode(): ?string - { - return $this->container['currentTaxCode']; - } - - /** - * Sets currentTaxCode - * - * @param string|null $currentTaxCode currentTaxCode - * - * @return $this - */ - public function setCurrentTaxCode(?string $currentTaxCode): static - { - if (is_null($currentTaxCode)) { - array_push($this->openAPINullablesSetToNull, 'currentTaxCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('currentTaxCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['currentTaxCode'] = $currentTaxCode; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/TaxYear.php b/src/Model/TaxYear.php index 3774c57..14f58f9 100644 --- a/src/Model/TaxYear.php +++ b/src/Model/TaxYear.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/TaxYearConfig.php b/src/Model/TaxYearConfig.php index 04a506e..52d640a 100644 --- a/src/Model/TaxYearConfig.php +++ b/src/Model/TaxYearConfig.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,56 +60,59 @@ class TaxYearConfig implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'taxYear' => 'int', - 'isPreview' => 'bool', - 'defaultTaxCode' => 'string', - 'class1ANicsRate' => '\SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue', - 'lowerEarningsLimit' => '\SynergiTech\Staffology\Model\PeriodValue', - 'upperEarningsLimit' => '\SynergiTech\Staffology\Model\PeriodValue', - 'primaryThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', - 'secondaryThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', - 'upperAccrualPoint' => '\SynergiTech\Staffology\Model\PeriodValue', - 'upperSecondaryThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', 'apprenticeUpperSecondaryThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', - 'freeportsUpperSecondaryThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', - 'veteransUpperSecondaryThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', + 'brackets' => '\SynergiTech\Staffology\Model\TaxBracket[]', + 'carCharge' => '\SynergiTech\Staffology\Model\CarCharge', + 'class1ANicsRate' => '\SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue', + 'deaProtectedEarnings' => 'float', + 'defaultTaxCode' => 'string', + 'directorsNiRates' => '\SynergiTech\Staffology\Model\NationalInsuranceCode[]', 'directorsProratePrimaryThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', - 'plan1StudentLoanThreshold' => 'float', + 'eligibleAeAge' => 'int', + 'employmentAllowance' => 'float', + 'employmentAllowancePreviousYear' => 'float', + 'fixedCodes' => '\SynergiTech\Staffology\Model\FixedCode[]', + 'freeportsUpperSecondaryThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', + 'govTalk' => '\SynergiTech\Staffology\Model\GovTalk', + 'isPreview' => 'bool', + 'loanCharge' => '\SynergiTech\Staffology\Model\LoanCharge', + 'lowerEarningsLimit' => '\SynergiTech\Staffology\Model\PeriodValue', + 'maximumAeAge' => 'int', + 'mileageAllowancePaymentsRates' => '\SynergiTech\Staffology\Model\MileageAllowancePaymentsRate[]', + 'minimumAeAge' => 'int', + 'minimumWage' => '\SynergiTech\Staffology\Model\NationalMinimumWage[]', + 'niRates' => '\SynergiTech\Staffology\Model\NationalInsuranceCode[]', + 'nicCompensationNormalEmployerRate' => 'float', + 'nicCompensationSmallEmployerRate' => 'float', + 'nicRecoverableNormalEmployerRate' => 'float', + 'nicRecoverableSmallEmployerRate' => 'float', + 'pensionAeEmployeeContribution' => 'float', + 'pensionAeEmployerContribution' => 'float', + 'pensionAutomaticEnrolment' => '\SynergiTech\Staffology\Model\PeriodValue', + 'pensionLowerThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', + 'pensionUpperThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', 'plan1StudentLoanRate' => 'float', - 'plan2StudentLoanThreshold' => 'float', + 'plan1StudentLoanThreshold' => 'float', 'plan2StudentLoanRate' => 'float', - 'plan4StudentLoanThreshold' => 'float', + 'plan2StudentLoanThreshold' => 'float', 'plan4StudentLoanRate' => 'float', - 'postGradLoanThreshold' => 'float', + 'plan4StudentLoanThreshold' => 'float', 'postGradLoanRate' => 'float', - 'deaProtectedEarnings' => 'float', - 'pensionLowerThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', - 'pensionAutomaticEnrolment' => '\SynergiTech\Staffology\Model\PeriodValue', - 'pensionUpperThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', - 'pensionAeEmployerContribution' => 'float', - 'pensionAeEmployeeContribution' => 'float', - 'employmentAllowancePreviousYear' => 'float', - 'employmentAllowance' => 'float', - 'fixedCodes' => '\SynergiTech\Staffology\Model\FixedCode[]', - 'scottishFixedCodes' => '\SynergiTech\Staffology\Model\FixedCode[]', - 'welshFixedCodes' => '\SynergiTech\Staffology\Model\FixedCode[]', - 'niRates' => '\SynergiTech\Staffology\Model\NationalInsuranceCode[]', - 'directorsNiRates' => '\SynergiTech\Staffology\Model\NationalInsuranceCode[]', - 'brackets' => '\SynergiTech\Staffology\Model\TaxBracket[]', + 'postGradLoanThreshold' => 'float', + 'primaryThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', 'scottishBrackets' => '\SynergiTech\Staffology\Model\TaxBracket[]', - 'welshBrackets' => '\SynergiTech\Staffology\Model\TaxBracket[]', - 'taxCodeChanges' => '\SynergiTech\Staffology\Model\TaxCodeChange[]', - 'minimumWage' => '\SynergiTech\Staffology\Model\NationalMinimumWage[]', + 'scottishFixedCodes' => '\SynergiTech\Staffology\Model\FixedCode[]', + 'secondaryThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', 'statutoryPay' => '\SynergiTech\Staffology\Model\StatutoryPay', - 'loanCharge' => '\SynergiTech\Staffology\Model\LoanCharge', - 'carCharge' => '\SynergiTech\Staffology\Model\CarCharge', - 'govTalk' => '\SynergiTech\Staffology\Model\GovTalk', - 'mileageAllowancePaymentsRates' => '\SynergiTech\Staffology\Model\MileageAllowancePaymentsRate[]', + 'taxCodeChanges' => '\SynergiTech\Staffology\Model\TaxCodeChange[]', + 'taxYear' => 'int', 'tieredPensions' => '\SynergiTech\Staffology\Model\TieredPension[]', - 'nicRecoverableNormalEmployerRate' => 'float', - 'nicRecoverableSmallEmployerRate' => 'float', - 'nicCompensationNormalEmployerRate' => 'float', - 'nicCompensationSmallEmployerRate' => 'float' + 'upperAccrualPoint' => '\SynergiTech\Staffology\Model\PeriodValue', + 'upperEarningsLimit' => '\SynergiTech\Staffology\Model\PeriodValue', + 'upperSecondaryThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', + 'veteransUpperSecondaryThreshold' => '\SynergiTech\Staffology\Model\PeriodValue', + 'welshBrackets' => '\SynergiTech\Staffology\Model\TaxBracket[]', + 'welshFixedCodes' => '\SynergiTech\Staffology\Model\FixedCode[]' ]; /** @@ -118,56 +121,59 @@ class TaxYearConfig implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'taxYear' => 'int32', - 'isPreview' => null, - 'defaultTaxCode' => null, - 'class1ANicsRate' => null, - 'lowerEarningsLimit' => null, - 'upperEarningsLimit' => null, - 'primaryThreshold' => null, - 'secondaryThreshold' => null, - 'upperAccrualPoint' => null, - 'upperSecondaryThreshold' => null, 'apprenticeUpperSecondaryThreshold' => null, - 'freeportsUpperSecondaryThreshold' => null, - 'veteransUpperSecondaryThreshold' => null, + 'brackets' => null, + 'carCharge' => null, + 'class1ANicsRate' => null, + 'deaProtectedEarnings' => 'double', + 'defaultTaxCode' => null, + 'directorsNiRates' => null, 'directorsProratePrimaryThreshold' => null, - 'plan1StudentLoanThreshold' => 'double', + 'eligibleAeAge' => 'int32', + 'employmentAllowance' => 'double', + 'employmentAllowancePreviousYear' => 'double', + 'fixedCodes' => null, + 'freeportsUpperSecondaryThreshold' => null, + 'govTalk' => null, + 'isPreview' => null, + 'loanCharge' => null, + 'lowerEarningsLimit' => null, + 'maximumAeAge' => 'int32', + 'mileageAllowancePaymentsRates' => null, + 'minimumAeAge' => 'int32', + 'minimumWage' => null, + 'niRates' => null, + 'nicCompensationNormalEmployerRate' => 'double', + 'nicCompensationSmallEmployerRate' => 'double', + 'nicRecoverableNormalEmployerRate' => 'double', + 'nicRecoverableSmallEmployerRate' => 'double', + 'pensionAeEmployeeContribution' => 'double', + 'pensionAeEmployerContribution' => 'double', + 'pensionAutomaticEnrolment' => null, + 'pensionLowerThreshold' => null, + 'pensionUpperThreshold' => null, 'plan1StudentLoanRate' => 'double', - 'plan2StudentLoanThreshold' => 'double', + 'plan1StudentLoanThreshold' => 'double', 'plan2StudentLoanRate' => 'double', - 'plan4StudentLoanThreshold' => 'double', + 'plan2StudentLoanThreshold' => 'double', 'plan4StudentLoanRate' => 'double', - 'postGradLoanThreshold' => 'double', + 'plan4StudentLoanThreshold' => 'double', 'postGradLoanRate' => 'double', - 'deaProtectedEarnings' => 'double', - 'pensionLowerThreshold' => null, - 'pensionAutomaticEnrolment' => null, - 'pensionUpperThreshold' => null, - 'pensionAeEmployerContribution' => 'double', - 'pensionAeEmployeeContribution' => 'double', - 'employmentAllowancePreviousYear' => 'double', - 'employmentAllowance' => 'double', - 'fixedCodes' => null, - 'scottishFixedCodes' => null, - 'welshFixedCodes' => null, - 'niRates' => null, - 'directorsNiRates' => null, - 'brackets' => null, + 'postGradLoanThreshold' => 'double', + 'primaryThreshold' => null, 'scottishBrackets' => null, - 'welshBrackets' => null, - 'taxCodeChanges' => null, - 'minimumWage' => null, + 'scottishFixedCodes' => null, + 'secondaryThreshold' => null, 'statutoryPay' => null, - 'loanCharge' => null, - 'carCharge' => null, - 'govTalk' => null, - 'mileageAllowancePaymentsRates' => null, + 'taxCodeChanges' => null, + 'taxYear' => 'int32', 'tieredPensions' => null, - 'nicRecoverableNormalEmployerRate' => 'double', - 'nicRecoverableSmallEmployerRate' => 'double', - 'nicCompensationNormalEmployerRate' => 'double', - 'nicCompensationSmallEmployerRate' => 'double' + 'upperAccrualPoint' => null, + 'upperEarningsLimit' => null, + 'upperSecondaryThreshold' => null, + 'veteransUpperSecondaryThreshold' => null, + 'welshBrackets' => null, + 'welshFixedCodes' => null ]; /** @@ -176,56 +182,59 @@ class TaxYearConfig implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'taxYear' => false, - 'isPreview' => false, - 'defaultTaxCode' => true, - 'class1ANicsRate' => false, - 'lowerEarningsLimit' => false, - 'upperEarningsLimit' => false, - 'primaryThreshold' => false, - 'secondaryThreshold' => false, - 'upperAccrualPoint' => false, - 'upperSecondaryThreshold' => false, 'apprenticeUpperSecondaryThreshold' => false, - 'freeportsUpperSecondaryThreshold' => false, - 'veteransUpperSecondaryThreshold' => false, + 'brackets' => true, + 'carCharge' => false, + 'class1ANicsRate' => false, + 'deaProtectedEarnings' => false, + 'defaultTaxCode' => true, + 'directorsNiRates' => true, 'directorsProratePrimaryThreshold' => false, - 'plan1StudentLoanThreshold' => false, + 'eligibleAeAge' => false, + 'employmentAllowance' => false, + 'employmentAllowancePreviousYear' => false, + 'fixedCodes' => true, + 'freeportsUpperSecondaryThreshold' => false, + 'govTalk' => false, + 'isPreview' => false, + 'loanCharge' => false, + 'lowerEarningsLimit' => false, + 'maximumAeAge' => false, + 'mileageAllowancePaymentsRates' => true, + 'minimumAeAge' => false, + 'minimumWage' => true, + 'niRates' => true, + 'nicCompensationNormalEmployerRate' => false, + 'nicCompensationSmallEmployerRate' => false, + 'nicRecoverableNormalEmployerRate' => false, + 'nicRecoverableSmallEmployerRate' => false, + 'pensionAeEmployeeContribution' => false, + 'pensionAeEmployerContribution' => false, + 'pensionAutomaticEnrolment' => false, + 'pensionLowerThreshold' => false, + 'pensionUpperThreshold' => false, 'plan1StudentLoanRate' => false, - 'plan2StudentLoanThreshold' => false, + 'plan1StudentLoanThreshold' => false, 'plan2StudentLoanRate' => false, - 'plan4StudentLoanThreshold' => false, + 'plan2StudentLoanThreshold' => false, 'plan4StudentLoanRate' => false, - 'postGradLoanThreshold' => false, + 'plan4StudentLoanThreshold' => false, 'postGradLoanRate' => false, - 'deaProtectedEarnings' => false, - 'pensionLowerThreshold' => false, - 'pensionAutomaticEnrolment' => false, - 'pensionUpperThreshold' => false, - 'pensionAeEmployerContribution' => false, - 'pensionAeEmployeeContribution' => false, - 'employmentAllowancePreviousYear' => false, - 'employmentAllowance' => false, - 'fixedCodes' => true, - 'scottishFixedCodes' => true, - 'welshFixedCodes' => true, - 'niRates' => true, - 'directorsNiRates' => true, - 'brackets' => true, + 'postGradLoanThreshold' => false, + 'primaryThreshold' => false, 'scottishBrackets' => true, - 'welshBrackets' => true, - 'taxCodeChanges' => true, - 'minimumWage' => true, + 'scottishFixedCodes' => true, + 'secondaryThreshold' => false, 'statutoryPay' => false, - 'loanCharge' => false, - 'carCharge' => false, - 'govTalk' => false, - 'mileageAllowancePaymentsRates' => true, + 'taxCodeChanges' => true, + 'taxYear' => false, 'tieredPensions' => true, - 'nicRecoverableNormalEmployerRate' => false, - 'nicRecoverableSmallEmployerRate' => false, - 'nicCompensationNormalEmployerRate' => false, - 'nicCompensationSmallEmployerRate' => false + 'upperAccrualPoint' => false, + 'upperEarningsLimit' => false, + 'upperSecondaryThreshold' => false, + 'veteransUpperSecondaryThreshold' => false, + 'welshBrackets' => true, + 'welshFixedCodes' => true ]; /** @@ -314,56 +323,59 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'taxYear' => 'taxYear', - 'isPreview' => 'isPreview', - 'defaultTaxCode' => 'defaultTaxCode', - 'class1ANicsRate' => 'class1ANicsRate', - 'lowerEarningsLimit' => 'lowerEarningsLimit', - 'upperEarningsLimit' => 'upperEarningsLimit', - 'primaryThreshold' => 'primaryThreshold', - 'secondaryThreshold' => 'secondaryThreshold', - 'upperAccrualPoint' => 'upperAccrualPoint', - 'upperSecondaryThreshold' => 'upperSecondaryThreshold', 'apprenticeUpperSecondaryThreshold' => 'apprenticeUpperSecondaryThreshold', - 'freeportsUpperSecondaryThreshold' => 'freeportsUpperSecondaryThreshold', - 'veteransUpperSecondaryThreshold' => 'veteransUpperSecondaryThreshold', + 'brackets' => 'brackets', + 'carCharge' => 'carCharge', + 'class1ANicsRate' => 'class1ANicsRate', + 'deaProtectedEarnings' => 'deaProtectedEarnings', + 'defaultTaxCode' => 'defaultTaxCode', + 'directorsNiRates' => 'directorsNiRates', 'directorsProratePrimaryThreshold' => 'directorsProratePrimaryThreshold', - 'plan1StudentLoanThreshold' => 'plan1StudentLoanThreshold', - 'plan1StudentLoanRate' => 'plan1StudentLoanRate', - 'plan2StudentLoanThreshold' => 'plan2StudentLoanThreshold', - 'plan2StudentLoanRate' => 'plan2StudentLoanRate', - 'plan4StudentLoanThreshold' => 'plan4StudentLoanThreshold', - 'plan4StudentLoanRate' => 'plan4StudentLoanRate', - 'postGradLoanThreshold' => 'postGradLoanThreshold', - 'postGradLoanRate' => 'postGradLoanRate', - 'deaProtectedEarnings' => 'deaProtectedEarnings', - 'pensionLowerThreshold' => 'pensionLowerThreshold', - 'pensionAutomaticEnrolment' => 'pensionAutomaticEnrolment', - 'pensionUpperThreshold' => 'pensionUpperThreshold', - 'pensionAeEmployerContribution' => 'pensionAeEmployerContribution', - 'pensionAeEmployeeContribution' => 'pensionAeEmployeeContribution', - 'employmentAllowancePreviousYear' => 'employmentAllowancePreviousYear', + 'eligibleAeAge' => 'eligibleAeAge', 'employmentAllowance' => 'employmentAllowance', + 'employmentAllowancePreviousYear' => 'employmentAllowancePreviousYear', 'fixedCodes' => 'fixedCodes', - 'scottishFixedCodes' => 'scottishFixedCodes', - 'welshFixedCodes' => 'welshFixedCodes', - 'niRates' => 'niRates', - 'directorsNiRates' => 'directorsNiRates', - 'brackets' => 'brackets', - 'scottishBrackets' => 'scottishBrackets', - 'welshBrackets' => 'welshBrackets', - 'taxCodeChanges' => 'taxCodeChanges', - 'minimumWage' => 'minimumWage', - 'statutoryPay' => 'statutoryPay', - 'loanCharge' => 'loanCharge', - 'carCharge' => 'carCharge', + 'freeportsUpperSecondaryThreshold' => 'freeportsUpperSecondaryThreshold', 'govTalk' => 'govTalk', + 'isPreview' => 'isPreview', + 'loanCharge' => 'loanCharge', + 'lowerEarningsLimit' => 'lowerEarningsLimit', + 'maximumAeAge' => 'maximumAeAge', 'mileageAllowancePaymentsRates' => 'mileageAllowancePaymentsRates', - 'tieredPensions' => 'tieredPensions', + 'minimumAeAge' => 'minimumAeAge', + 'minimumWage' => 'minimumWage', + 'niRates' => 'niRates', + 'nicCompensationNormalEmployerRate' => 'nicCompensationNormalEmployerRate', + 'nicCompensationSmallEmployerRate' => 'nicCompensationSmallEmployerRate', 'nicRecoverableNormalEmployerRate' => 'nicRecoverableNormalEmployerRate', 'nicRecoverableSmallEmployerRate' => 'nicRecoverableSmallEmployerRate', - 'nicCompensationNormalEmployerRate' => 'nicCompensationNormalEmployerRate', - 'nicCompensationSmallEmployerRate' => 'nicCompensationSmallEmployerRate' + 'pensionAeEmployeeContribution' => 'pensionAeEmployeeContribution', + 'pensionAeEmployerContribution' => 'pensionAeEmployerContribution', + 'pensionAutomaticEnrolment' => 'pensionAutomaticEnrolment', + 'pensionLowerThreshold' => 'pensionLowerThreshold', + 'pensionUpperThreshold' => 'pensionUpperThreshold', + 'plan1StudentLoanRate' => 'plan1StudentLoanRate', + 'plan1StudentLoanThreshold' => 'plan1StudentLoanThreshold', + 'plan2StudentLoanRate' => 'plan2StudentLoanRate', + 'plan2StudentLoanThreshold' => 'plan2StudentLoanThreshold', + 'plan4StudentLoanRate' => 'plan4StudentLoanRate', + 'plan4StudentLoanThreshold' => 'plan4StudentLoanThreshold', + 'postGradLoanRate' => 'postGradLoanRate', + 'postGradLoanThreshold' => 'postGradLoanThreshold', + 'primaryThreshold' => 'primaryThreshold', + 'scottishBrackets' => 'scottishBrackets', + 'scottishFixedCodes' => 'scottishFixedCodes', + 'secondaryThreshold' => 'secondaryThreshold', + 'statutoryPay' => 'statutoryPay', + 'taxCodeChanges' => 'taxCodeChanges', + 'taxYear' => 'taxYear', + 'tieredPensions' => 'tieredPensions', + 'upperAccrualPoint' => 'upperAccrualPoint', + 'upperEarningsLimit' => 'upperEarningsLimit', + 'upperSecondaryThreshold' => 'upperSecondaryThreshold', + 'veteransUpperSecondaryThreshold' => 'veteransUpperSecondaryThreshold', + 'welshBrackets' => 'welshBrackets', + 'welshFixedCodes' => 'welshFixedCodes' ]; /** @@ -372,56 +384,59 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'taxYear' => 'setTaxYear', - 'isPreview' => 'setIsPreview', - 'defaultTaxCode' => 'setDefaultTaxCode', - 'class1ANicsRate' => 'setClass1ANicsRate', - 'lowerEarningsLimit' => 'setLowerEarningsLimit', - 'upperEarningsLimit' => 'setUpperEarningsLimit', - 'primaryThreshold' => 'setPrimaryThreshold', - 'secondaryThreshold' => 'setSecondaryThreshold', - 'upperAccrualPoint' => 'setUpperAccrualPoint', - 'upperSecondaryThreshold' => 'setUpperSecondaryThreshold', 'apprenticeUpperSecondaryThreshold' => 'setApprenticeUpperSecondaryThreshold', - 'freeportsUpperSecondaryThreshold' => 'setFreeportsUpperSecondaryThreshold', - 'veteransUpperSecondaryThreshold' => 'setVeteransUpperSecondaryThreshold', + 'brackets' => 'setBrackets', + 'carCharge' => 'setCarCharge', + 'class1ANicsRate' => 'setClass1ANicsRate', + 'deaProtectedEarnings' => 'setDeaProtectedEarnings', + 'defaultTaxCode' => 'setDefaultTaxCode', + 'directorsNiRates' => 'setDirectorsNiRates', 'directorsProratePrimaryThreshold' => 'setDirectorsProratePrimaryThreshold', - 'plan1StudentLoanThreshold' => 'setPlan1StudentLoanThreshold', + 'eligibleAeAge' => 'setEligibleAeAge', + 'employmentAllowance' => 'setEmploymentAllowance', + 'employmentAllowancePreviousYear' => 'setEmploymentAllowancePreviousYear', + 'fixedCodes' => 'setFixedCodes', + 'freeportsUpperSecondaryThreshold' => 'setFreeportsUpperSecondaryThreshold', + 'govTalk' => 'setGovTalk', + 'isPreview' => 'setIsPreview', + 'loanCharge' => 'setLoanCharge', + 'lowerEarningsLimit' => 'setLowerEarningsLimit', + 'maximumAeAge' => 'setMaximumAeAge', + 'mileageAllowancePaymentsRates' => 'setMileageAllowancePaymentsRates', + 'minimumAeAge' => 'setMinimumAeAge', + 'minimumWage' => 'setMinimumWage', + 'niRates' => 'setNiRates', + 'nicCompensationNormalEmployerRate' => 'setNicCompensationNormalEmployerRate', + 'nicCompensationSmallEmployerRate' => 'setNicCompensationSmallEmployerRate', + 'nicRecoverableNormalEmployerRate' => 'setNicRecoverableNormalEmployerRate', + 'nicRecoverableSmallEmployerRate' => 'setNicRecoverableSmallEmployerRate', + 'pensionAeEmployeeContribution' => 'setPensionAeEmployeeContribution', + 'pensionAeEmployerContribution' => 'setPensionAeEmployerContribution', + 'pensionAutomaticEnrolment' => 'setPensionAutomaticEnrolment', + 'pensionLowerThreshold' => 'setPensionLowerThreshold', + 'pensionUpperThreshold' => 'setPensionUpperThreshold', 'plan1StudentLoanRate' => 'setPlan1StudentLoanRate', - 'plan2StudentLoanThreshold' => 'setPlan2StudentLoanThreshold', + 'plan1StudentLoanThreshold' => 'setPlan1StudentLoanThreshold', 'plan2StudentLoanRate' => 'setPlan2StudentLoanRate', - 'plan4StudentLoanThreshold' => 'setPlan4StudentLoanThreshold', + 'plan2StudentLoanThreshold' => 'setPlan2StudentLoanThreshold', 'plan4StudentLoanRate' => 'setPlan4StudentLoanRate', - 'postGradLoanThreshold' => 'setPostGradLoanThreshold', + 'plan4StudentLoanThreshold' => 'setPlan4StudentLoanThreshold', 'postGradLoanRate' => 'setPostGradLoanRate', - 'deaProtectedEarnings' => 'setDeaProtectedEarnings', - 'pensionLowerThreshold' => 'setPensionLowerThreshold', - 'pensionAutomaticEnrolment' => 'setPensionAutomaticEnrolment', - 'pensionUpperThreshold' => 'setPensionUpperThreshold', - 'pensionAeEmployerContribution' => 'setPensionAeEmployerContribution', - 'pensionAeEmployeeContribution' => 'setPensionAeEmployeeContribution', - 'employmentAllowancePreviousYear' => 'setEmploymentAllowancePreviousYear', - 'employmentAllowance' => 'setEmploymentAllowance', - 'fixedCodes' => 'setFixedCodes', - 'scottishFixedCodes' => 'setScottishFixedCodes', - 'welshFixedCodes' => 'setWelshFixedCodes', - 'niRates' => 'setNiRates', - 'directorsNiRates' => 'setDirectorsNiRates', - 'brackets' => 'setBrackets', + 'postGradLoanThreshold' => 'setPostGradLoanThreshold', + 'primaryThreshold' => 'setPrimaryThreshold', 'scottishBrackets' => 'setScottishBrackets', - 'welshBrackets' => 'setWelshBrackets', - 'taxCodeChanges' => 'setTaxCodeChanges', - 'minimumWage' => 'setMinimumWage', + 'scottishFixedCodes' => 'setScottishFixedCodes', + 'secondaryThreshold' => 'setSecondaryThreshold', 'statutoryPay' => 'setStatutoryPay', - 'loanCharge' => 'setLoanCharge', - 'carCharge' => 'setCarCharge', - 'govTalk' => 'setGovTalk', - 'mileageAllowancePaymentsRates' => 'setMileageAllowancePaymentsRates', + 'taxCodeChanges' => 'setTaxCodeChanges', + 'taxYear' => 'setTaxYear', 'tieredPensions' => 'setTieredPensions', - 'nicRecoverableNormalEmployerRate' => 'setNicRecoverableNormalEmployerRate', - 'nicRecoverableSmallEmployerRate' => 'setNicRecoverableSmallEmployerRate', - 'nicCompensationNormalEmployerRate' => 'setNicCompensationNormalEmployerRate', - 'nicCompensationSmallEmployerRate' => 'setNicCompensationSmallEmployerRate' + 'upperAccrualPoint' => 'setUpperAccrualPoint', + 'upperEarningsLimit' => 'setUpperEarningsLimit', + 'upperSecondaryThreshold' => 'setUpperSecondaryThreshold', + 'veteransUpperSecondaryThreshold' => 'setVeteransUpperSecondaryThreshold', + 'welshBrackets' => 'setWelshBrackets', + 'welshFixedCodes' => 'setWelshFixedCodes' ]; /** @@ -430,56 +445,59 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'taxYear' => 'getTaxYear', - 'isPreview' => 'getIsPreview', - 'defaultTaxCode' => 'getDefaultTaxCode', - 'class1ANicsRate' => 'getClass1ANicsRate', - 'lowerEarningsLimit' => 'getLowerEarningsLimit', - 'upperEarningsLimit' => 'getUpperEarningsLimit', - 'primaryThreshold' => 'getPrimaryThreshold', - 'secondaryThreshold' => 'getSecondaryThreshold', - 'upperAccrualPoint' => 'getUpperAccrualPoint', - 'upperSecondaryThreshold' => 'getUpperSecondaryThreshold', 'apprenticeUpperSecondaryThreshold' => 'getApprenticeUpperSecondaryThreshold', - 'freeportsUpperSecondaryThreshold' => 'getFreeportsUpperSecondaryThreshold', - 'veteransUpperSecondaryThreshold' => 'getVeteransUpperSecondaryThreshold', + 'brackets' => 'getBrackets', + 'carCharge' => 'getCarCharge', + 'class1ANicsRate' => 'getClass1ANicsRate', + 'deaProtectedEarnings' => 'getDeaProtectedEarnings', + 'defaultTaxCode' => 'getDefaultTaxCode', + 'directorsNiRates' => 'getDirectorsNiRates', 'directorsProratePrimaryThreshold' => 'getDirectorsProratePrimaryThreshold', - 'plan1StudentLoanThreshold' => 'getPlan1StudentLoanThreshold', + 'eligibleAeAge' => 'getEligibleAeAge', + 'employmentAllowance' => 'getEmploymentAllowance', + 'employmentAllowancePreviousYear' => 'getEmploymentAllowancePreviousYear', + 'fixedCodes' => 'getFixedCodes', + 'freeportsUpperSecondaryThreshold' => 'getFreeportsUpperSecondaryThreshold', + 'govTalk' => 'getGovTalk', + 'isPreview' => 'getIsPreview', + 'loanCharge' => 'getLoanCharge', + 'lowerEarningsLimit' => 'getLowerEarningsLimit', + 'maximumAeAge' => 'getMaximumAeAge', + 'mileageAllowancePaymentsRates' => 'getMileageAllowancePaymentsRates', + 'minimumAeAge' => 'getMinimumAeAge', + 'minimumWage' => 'getMinimumWage', + 'niRates' => 'getNiRates', + 'nicCompensationNormalEmployerRate' => 'getNicCompensationNormalEmployerRate', + 'nicCompensationSmallEmployerRate' => 'getNicCompensationSmallEmployerRate', + 'nicRecoverableNormalEmployerRate' => 'getNicRecoverableNormalEmployerRate', + 'nicRecoverableSmallEmployerRate' => 'getNicRecoverableSmallEmployerRate', + 'pensionAeEmployeeContribution' => 'getPensionAeEmployeeContribution', + 'pensionAeEmployerContribution' => 'getPensionAeEmployerContribution', + 'pensionAutomaticEnrolment' => 'getPensionAutomaticEnrolment', + 'pensionLowerThreshold' => 'getPensionLowerThreshold', + 'pensionUpperThreshold' => 'getPensionUpperThreshold', 'plan1StudentLoanRate' => 'getPlan1StudentLoanRate', - 'plan2StudentLoanThreshold' => 'getPlan2StudentLoanThreshold', + 'plan1StudentLoanThreshold' => 'getPlan1StudentLoanThreshold', 'plan2StudentLoanRate' => 'getPlan2StudentLoanRate', - 'plan4StudentLoanThreshold' => 'getPlan4StudentLoanThreshold', + 'plan2StudentLoanThreshold' => 'getPlan2StudentLoanThreshold', 'plan4StudentLoanRate' => 'getPlan4StudentLoanRate', - 'postGradLoanThreshold' => 'getPostGradLoanThreshold', + 'plan4StudentLoanThreshold' => 'getPlan4StudentLoanThreshold', 'postGradLoanRate' => 'getPostGradLoanRate', - 'deaProtectedEarnings' => 'getDeaProtectedEarnings', - 'pensionLowerThreshold' => 'getPensionLowerThreshold', - 'pensionAutomaticEnrolment' => 'getPensionAutomaticEnrolment', - 'pensionUpperThreshold' => 'getPensionUpperThreshold', - 'pensionAeEmployerContribution' => 'getPensionAeEmployerContribution', - 'pensionAeEmployeeContribution' => 'getPensionAeEmployeeContribution', - 'employmentAllowancePreviousYear' => 'getEmploymentAllowancePreviousYear', - 'employmentAllowance' => 'getEmploymentAllowance', - 'fixedCodes' => 'getFixedCodes', - 'scottishFixedCodes' => 'getScottishFixedCodes', - 'welshFixedCodes' => 'getWelshFixedCodes', - 'niRates' => 'getNiRates', - 'directorsNiRates' => 'getDirectorsNiRates', - 'brackets' => 'getBrackets', + 'postGradLoanThreshold' => 'getPostGradLoanThreshold', + 'primaryThreshold' => 'getPrimaryThreshold', 'scottishBrackets' => 'getScottishBrackets', - 'welshBrackets' => 'getWelshBrackets', - 'taxCodeChanges' => 'getTaxCodeChanges', - 'minimumWage' => 'getMinimumWage', + 'scottishFixedCodes' => 'getScottishFixedCodes', + 'secondaryThreshold' => 'getSecondaryThreshold', 'statutoryPay' => 'getStatutoryPay', - 'loanCharge' => 'getLoanCharge', - 'carCharge' => 'getCarCharge', - 'govTalk' => 'getGovTalk', - 'mileageAllowancePaymentsRates' => 'getMileageAllowancePaymentsRates', + 'taxCodeChanges' => 'getTaxCodeChanges', + 'taxYear' => 'getTaxYear', 'tieredPensions' => 'getTieredPensions', - 'nicRecoverableNormalEmployerRate' => 'getNicRecoverableNormalEmployerRate', - 'nicRecoverableSmallEmployerRate' => 'getNicRecoverableSmallEmployerRate', - 'nicCompensationNormalEmployerRate' => 'getNicCompensationNormalEmployerRate', - 'nicCompensationSmallEmployerRate' => 'getNicCompensationSmallEmployerRate' + 'upperAccrualPoint' => 'getUpperAccrualPoint', + 'upperEarningsLimit' => 'getUpperEarningsLimit', + 'upperSecondaryThreshold' => 'getUpperSecondaryThreshold', + 'veteransUpperSecondaryThreshold' => 'getVeteransUpperSecondaryThreshold', + 'welshBrackets' => 'getWelshBrackets', + 'welshFixedCodes' => 'getWelshFixedCodes' ]; /** @@ -538,56 +556,59 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('taxYear', $data ?? [], null); - $this->setIfExists('isPreview', $data ?? [], null); - $this->setIfExists('defaultTaxCode', $data ?? [], null); - $this->setIfExists('class1ANicsRate', $data ?? [], null); - $this->setIfExists('lowerEarningsLimit', $data ?? [], null); - $this->setIfExists('upperEarningsLimit', $data ?? [], null); - $this->setIfExists('primaryThreshold', $data ?? [], null); - $this->setIfExists('secondaryThreshold', $data ?? [], null); - $this->setIfExists('upperAccrualPoint', $data ?? [], null); - $this->setIfExists('upperSecondaryThreshold', $data ?? [], null); $this->setIfExists('apprenticeUpperSecondaryThreshold', $data ?? [], null); - $this->setIfExists('freeportsUpperSecondaryThreshold', $data ?? [], null); - $this->setIfExists('veteransUpperSecondaryThreshold', $data ?? [], null); + $this->setIfExists('brackets', $data ?? [], null); + $this->setIfExists('carCharge', $data ?? [], null); + $this->setIfExists('class1ANicsRate', $data ?? [], null); + $this->setIfExists('deaProtectedEarnings', $data ?? [], null); + $this->setIfExists('defaultTaxCode', $data ?? [], null); + $this->setIfExists('directorsNiRates', $data ?? [], null); $this->setIfExists('directorsProratePrimaryThreshold', $data ?? [], null); - $this->setIfExists('plan1StudentLoanThreshold', $data ?? [], null); + $this->setIfExists('eligibleAeAge', $data ?? [], null); + $this->setIfExists('employmentAllowance', $data ?? [], null); + $this->setIfExists('employmentAllowancePreviousYear', $data ?? [], null); + $this->setIfExists('fixedCodes', $data ?? [], null); + $this->setIfExists('freeportsUpperSecondaryThreshold', $data ?? [], null); + $this->setIfExists('govTalk', $data ?? [], null); + $this->setIfExists('isPreview', $data ?? [], null); + $this->setIfExists('loanCharge', $data ?? [], null); + $this->setIfExists('lowerEarningsLimit', $data ?? [], null); + $this->setIfExists('maximumAeAge', $data ?? [], null); + $this->setIfExists('mileageAllowancePaymentsRates', $data ?? [], null); + $this->setIfExists('minimumAeAge', $data ?? [], null); + $this->setIfExists('minimumWage', $data ?? [], null); + $this->setIfExists('niRates', $data ?? [], null); + $this->setIfExists('nicCompensationNormalEmployerRate', $data ?? [], null); + $this->setIfExists('nicCompensationSmallEmployerRate', $data ?? [], null); + $this->setIfExists('nicRecoverableNormalEmployerRate', $data ?? [], null); + $this->setIfExists('nicRecoverableSmallEmployerRate', $data ?? [], null); + $this->setIfExists('pensionAeEmployeeContribution', $data ?? [], null); + $this->setIfExists('pensionAeEmployerContribution', $data ?? [], null); + $this->setIfExists('pensionAutomaticEnrolment', $data ?? [], null); + $this->setIfExists('pensionLowerThreshold', $data ?? [], null); + $this->setIfExists('pensionUpperThreshold', $data ?? [], null); $this->setIfExists('plan1StudentLoanRate', $data ?? [], null); - $this->setIfExists('plan2StudentLoanThreshold', $data ?? [], null); + $this->setIfExists('plan1StudentLoanThreshold', $data ?? [], null); $this->setIfExists('plan2StudentLoanRate', $data ?? [], null); - $this->setIfExists('plan4StudentLoanThreshold', $data ?? [], null); + $this->setIfExists('plan2StudentLoanThreshold', $data ?? [], null); $this->setIfExists('plan4StudentLoanRate', $data ?? [], null); - $this->setIfExists('postGradLoanThreshold', $data ?? [], null); + $this->setIfExists('plan4StudentLoanThreshold', $data ?? [], null); $this->setIfExists('postGradLoanRate', $data ?? [], null); - $this->setIfExists('deaProtectedEarnings', $data ?? [], null); - $this->setIfExists('pensionLowerThreshold', $data ?? [], null); - $this->setIfExists('pensionAutomaticEnrolment', $data ?? [], null); - $this->setIfExists('pensionUpperThreshold', $data ?? [], null); - $this->setIfExists('pensionAeEmployerContribution', $data ?? [], null); - $this->setIfExists('pensionAeEmployeeContribution', $data ?? [], null); - $this->setIfExists('employmentAllowancePreviousYear', $data ?? [], null); - $this->setIfExists('employmentAllowance', $data ?? [], null); - $this->setIfExists('fixedCodes', $data ?? [], null); - $this->setIfExists('scottishFixedCodes', $data ?? [], null); - $this->setIfExists('welshFixedCodes', $data ?? [], null); - $this->setIfExists('niRates', $data ?? [], null); - $this->setIfExists('directorsNiRates', $data ?? [], null); - $this->setIfExists('brackets', $data ?? [], null); + $this->setIfExists('postGradLoanThreshold', $data ?? [], null); + $this->setIfExists('primaryThreshold', $data ?? [], null); $this->setIfExists('scottishBrackets', $data ?? [], null); - $this->setIfExists('welshBrackets', $data ?? [], null); - $this->setIfExists('taxCodeChanges', $data ?? [], null); - $this->setIfExists('minimumWage', $data ?? [], null); + $this->setIfExists('scottishFixedCodes', $data ?? [], null); + $this->setIfExists('secondaryThreshold', $data ?? [], null); $this->setIfExists('statutoryPay', $data ?? [], null); - $this->setIfExists('loanCharge', $data ?? [], null); - $this->setIfExists('carCharge', $data ?? [], null); - $this->setIfExists('govTalk', $data ?? [], null); - $this->setIfExists('mileageAllowancePaymentsRates', $data ?? [], null); + $this->setIfExists('taxCodeChanges', $data ?? [], null); + $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('tieredPensions', $data ?? [], null); - $this->setIfExists('nicRecoverableNormalEmployerRate', $data ?? [], null); - $this->setIfExists('nicRecoverableSmallEmployerRate', $data ?? [], null); - $this->setIfExists('nicCompensationNormalEmployerRate', $data ?? [], null); - $this->setIfExists('nicCompensationSmallEmployerRate', $data ?? [], null); + $this->setIfExists('upperAccrualPoint', $data ?? [], null); + $this->setIfExists('upperEarningsLimit', $data ?? [], null); + $this->setIfExists('upperSecondaryThreshold', $data ?? [], null); + $this->setIfExists('veteransUpperSecondaryThreshold', $data ?? [], null); + $this->setIfExists('welshBrackets', $data ?? [], null); + $this->setIfExists('welshFixedCodes', $data ?? [], null); } /** @@ -633,55 +654,143 @@ public function valid(): bool /** - * Gets taxYear + * Gets apprenticeUpperSecondaryThreshold * - * @return int|null + * @return \SynergiTech\Staffology\Model\PeriodValue|null */ - public function getTaxYear(): ?int + public function getApprenticeUpperSecondaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue { - return $this->container['taxYear']; + return $this->container['apprenticeUpperSecondaryThreshold']; } /** - * Sets taxYear + * Sets apprenticeUpperSecondaryThreshold * - * @param int|null $taxYear [readonly] The TaxYear for which this configuration applies + * @param \SynergiTech\Staffology\Model\PeriodValue|null $apprenticeUpperSecondaryThreshold apprenticeUpperSecondaryThreshold * * @return $this */ - public function setTaxYear(?int $taxYear): static + public function setApprenticeUpperSecondaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $apprenticeUpperSecondaryThreshold): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($apprenticeUpperSecondaryThreshold)) { + throw new InvalidArgumentException('non-nullable apprenticeUpperSecondaryThreshold cannot be null'); + } + $this->container['apprenticeUpperSecondaryThreshold'] = $apprenticeUpperSecondaryThreshold; + + return $this; + } + + /** + * Gets brackets + * + * @return \SynergiTech\Staffology\Model\TaxBracket[]|null + */ + public function getBrackets(): ?array + { + return $this->container['brackets']; + } + + /** + * Sets brackets + * + * @param \SynergiTech\Staffology\Model\TaxBracket[]|null $brackets [readonly] + * + * @return $this + */ + public function setBrackets(?array $brackets): static + { + if (is_null($brackets)) { + array_push($this->openAPINullablesSetToNull, 'brackets'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('brackets', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['brackets'] = $brackets; + + return $this; + } + + /** + * Gets carCharge + * + * @return \SynergiTech\Staffology\Model\CarCharge|null + */ + public function getCarCharge(): ?\SynergiTech\Staffology\Model\CarCharge + { + return $this->container['carCharge']; + } + + /** + * Sets carCharge + * + * @param \SynergiTech\Staffology\Model\CarCharge|null $carCharge carCharge + * + * @return $this + */ + public function setCarCharge(?\SynergiTech\Staffology\Model\CarCharge $carCharge): static + { + if (is_null($carCharge)) { + throw new InvalidArgumentException('non-nullable carCharge cannot be null'); + } + $this->container['carCharge'] = $carCharge; + + return $this; + } + + /** + * Gets class1ANicsRate + * + * @return \SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue|null + */ + public function getClass1ANicsRate(): ?\SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue + { + return $this->container['class1ANicsRate']; + } + + /** + * Sets class1ANicsRate + * + * @param \SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue|null $class1ANicsRate class1ANicsRate + * + * @return $this + */ + public function setClass1ANicsRate(?\SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue $class1ANicsRate): static + { + if (is_null($class1ANicsRate)) { + throw new InvalidArgumentException('non-nullable class1ANicsRate cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['class1ANicsRate'] = $class1ANicsRate; return $this; } /** - * Gets isPreview + * Gets deaProtectedEarnings * - * @return bool|null + * @return float|null */ - public function getIsPreview(): ?bool + public function getDeaProtectedEarnings(): ?float { - return $this->container['isPreview']; + return $this->container['deaProtectedEarnings']; } /** - * Sets isPreview + * Sets deaProtectedEarnings * - * @param bool|null $isPreview [readonly] Indicates that this is a preview of the given years configuration and it shouldn't yet be used for live processing of payroll data. + * @param float|null $deaProtectedEarnings [readonly] * * @return $this */ - public function setIsPreview(?bool $isPreview): static + public function setDeaProtectedEarnings(?float $deaProtectedEarnings): static { - if (is_null($isPreview)) { - throw new InvalidArgumentException('non-nullable isPreview cannot be null'); + if (is_null($deaProtectedEarnings)) { + throw new InvalidArgumentException('non-nullable deaProtectedEarnings cannot be null'); } - $this->container['isPreview'] = $isPreview; + $this->container['deaProtectedEarnings'] = $deaProtectedEarnings; return $this; } @@ -721,568 +830,630 @@ public function setDefaultTaxCode(?string $defaultTaxCode): static } /** - * Gets class1ANicsRate + * Gets directorsNiRates * - * @return \SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue|null + * @return \SynergiTech\Staffology\Model\NationalInsuranceCode[]|null */ - public function getClass1ANicsRate(): ?\SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue + public function getDirectorsNiRates(): ?array { - return $this->container['class1ANicsRate']; + return $this->container['directorsNiRates']; } /** - * Sets class1ANicsRate + * Sets directorsNiRates * - * @param \SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue|null $class1ANicsRate class1ANicsRate + * @param \SynergiTech\Staffology\Model\NationalInsuranceCode[]|null $directorsNiRates [readonly] * * @return $this */ - public function setClass1ANicsRate(?\SynergiTech\Staffology\Model\DecimalTaxYearConfigPrimitiveValue $class1ANicsRate): static + public function setDirectorsNiRates(?array $directorsNiRates): static { - if (is_null($class1ANicsRate)) { - throw new InvalidArgumentException('non-nullable class1ANicsRate cannot be null'); + if (is_null($directorsNiRates)) { + array_push($this->openAPINullablesSetToNull, 'directorsNiRates'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('directorsNiRates', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['class1ANicsRate'] = $class1ANicsRate; + $this->container['directorsNiRates'] = $directorsNiRates; return $this; } /** - * Gets lowerEarningsLimit + * Gets directorsProratePrimaryThreshold * * @return \SynergiTech\Staffology\Model\PeriodValue|null */ - public function getLowerEarningsLimit(): ?\SynergiTech\Staffology\Model\PeriodValue + public function getDirectorsProratePrimaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue { - return $this->container['lowerEarningsLimit']; + return $this->container['directorsProratePrimaryThreshold']; } /** - * Sets lowerEarningsLimit + * Sets directorsProratePrimaryThreshold * - * @param \SynergiTech\Staffology\Model\PeriodValue|null $lowerEarningsLimit lowerEarningsLimit + * @param \SynergiTech\Staffology\Model\PeriodValue|null $directorsProratePrimaryThreshold directorsProratePrimaryThreshold * * @return $this */ - public function setLowerEarningsLimit(?\SynergiTech\Staffology\Model\PeriodValue $lowerEarningsLimit): static + public function setDirectorsProratePrimaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $directorsProratePrimaryThreshold): static { - if (is_null($lowerEarningsLimit)) { - throw new InvalidArgumentException('non-nullable lowerEarningsLimit cannot be null'); + if (is_null($directorsProratePrimaryThreshold)) { + throw new InvalidArgumentException('non-nullable directorsProratePrimaryThreshold cannot be null'); } - $this->container['lowerEarningsLimit'] = $lowerEarningsLimit; + $this->container['directorsProratePrimaryThreshold'] = $directorsProratePrimaryThreshold; return $this; } /** - * Gets upperEarningsLimit + * Gets eligibleAeAge * - * @return \SynergiTech\Staffology\Model\PeriodValue|null + * @return int|null */ - public function getUpperEarningsLimit(): ?\SynergiTech\Staffology\Model\PeriodValue + public function getEligibleAeAge(): ?int { - return $this->container['upperEarningsLimit']; + return $this->container['eligibleAeAge']; } /** - * Sets upperEarningsLimit + * Sets eligibleAeAge * - * @param \SynergiTech\Staffology\Model\PeriodValue|null $upperEarningsLimit upperEarningsLimit + * @param int|null $eligibleAeAge [readonly] * * @return $this */ - public function setUpperEarningsLimit(?\SynergiTech\Staffology\Model\PeriodValue $upperEarningsLimit): static + public function setEligibleAeAge(?int $eligibleAeAge): static { - if (is_null($upperEarningsLimit)) { - throw new InvalidArgumentException('non-nullable upperEarningsLimit cannot be null'); + if (is_null($eligibleAeAge)) { + throw new InvalidArgumentException('non-nullable eligibleAeAge cannot be null'); } - $this->container['upperEarningsLimit'] = $upperEarningsLimit; + $this->container['eligibleAeAge'] = $eligibleAeAge; return $this; } /** - * Gets primaryThreshold + * Gets employmentAllowance * - * @return \SynergiTech\Staffology\Model\PeriodValue|null + * @return float|null */ - public function getPrimaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue + public function getEmploymentAllowance(): ?float { - return $this->container['primaryThreshold']; + return $this->container['employmentAllowance']; } /** - * Sets primaryThreshold + * Sets employmentAllowance * - * @param \SynergiTech\Staffology\Model\PeriodValue|null $primaryThreshold primaryThreshold + * @param float|null $employmentAllowance [readonly] * * @return $this */ - public function setPrimaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $primaryThreshold): static + public function setEmploymentAllowance(?float $employmentAllowance): static { - if (is_null($primaryThreshold)) { - throw new InvalidArgumentException('non-nullable primaryThreshold cannot be null'); + if (is_null($employmentAllowance)) { + throw new InvalidArgumentException('non-nullable employmentAllowance cannot be null'); } - $this->container['primaryThreshold'] = $primaryThreshold; + $this->container['employmentAllowance'] = $employmentAllowance; return $this; } /** - * Gets secondaryThreshold + * Gets employmentAllowancePreviousYear * - * @return \SynergiTech\Staffology\Model\PeriodValue|null + * @return float|null */ - public function getSecondaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue + public function getEmploymentAllowancePreviousYear(): ?float { - return $this->container['secondaryThreshold']; + return $this->container['employmentAllowancePreviousYear']; } /** - * Sets secondaryThreshold + * Sets employmentAllowancePreviousYear * - * @param \SynergiTech\Staffology\Model\PeriodValue|null $secondaryThreshold secondaryThreshold + * @param float|null $employmentAllowancePreviousYear [readonly] * * @return $this */ - public function setSecondaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $secondaryThreshold): static + public function setEmploymentAllowancePreviousYear(?float $employmentAllowancePreviousYear): static { - if (is_null($secondaryThreshold)) { - throw new InvalidArgumentException('non-nullable secondaryThreshold cannot be null'); + if (is_null($employmentAllowancePreviousYear)) { + throw new InvalidArgumentException('non-nullable employmentAllowancePreviousYear cannot be null'); } - $this->container['secondaryThreshold'] = $secondaryThreshold; + $this->container['employmentAllowancePreviousYear'] = $employmentAllowancePreviousYear; return $this; } /** - * Gets upperAccrualPoint + * Gets fixedCodes * - * @return \SynergiTech\Staffology\Model\PeriodValue|null + * @return \SynergiTech\Staffology\Model\FixedCode[]|null */ - public function getUpperAccrualPoint(): ?\SynergiTech\Staffology\Model\PeriodValue + public function getFixedCodes(): ?array { - return $this->container['upperAccrualPoint']; + return $this->container['fixedCodes']; } /** - * Sets upperAccrualPoint + * Sets fixedCodes * - * @param \SynergiTech\Staffology\Model\PeriodValue|null $upperAccrualPoint upperAccrualPoint + * @param \SynergiTech\Staffology\Model\FixedCode[]|null $fixedCodes [readonly] * * @return $this */ - public function setUpperAccrualPoint(?\SynergiTech\Staffology\Model\PeriodValue $upperAccrualPoint): static + public function setFixedCodes(?array $fixedCodes): static { - if (is_null($upperAccrualPoint)) { - throw new InvalidArgumentException('non-nullable upperAccrualPoint cannot be null'); + if (is_null($fixedCodes)) { + array_push($this->openAPINullablesSetToNull, 'fixedCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fixedCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['upperAccrualPoint'] = $upperAccrualPoint; + $this->container['fixedCodes'] = $fixedCodes; return $this; } /** - * Gets upperSecondaryThreshold + * Gets freeportsUpperSecondaryThreshold * * @return \SynergiTech\Staffology\Model\PeriodValue|null */ - public function getUpperSecondaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue + public function getFreeportsUpperSecondaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue { - return $this->container['upperSecondaryThreshold']; + return $this->container['freeportsUpperSecondaryThreshold']; } /** - * Sets upperSecondaryThreshold + * Sets freeportsUpperSecondaryThreshold * - * @param \SynergiTech\Staffology\Model\PeriodValue|null $upperSecondaryThreshold upperSecondaryThreshold + * @param \SynergiTech\Staffology\Model\PeriodValue|null $freeportsUpperSecondaryThreshold freeportsUpperSecondaryThreshold * * @return $this */ - public function setUpperSecondaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $upperSecondaryThreshold): static + public function setFreeportsUpperSecondaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $freeportsUpperSecondaryThreshold): static { - if (is_null($upperSecondaryThreshold)) { - throw new InvalidArgumentException('non-nullable upperSecondaryThreshold cannot be null'); + if (is_null($freeportsUpperSecondaryThreshold)) { + throw new InvalidArgumentException('non-nullable freeportsUpperSecondaryThreshold cannot be null'); } - $this->container['upperSecondaryThreshold'] = $upperSecondaryThreshold; + $this->container['freeportsUpperSecondaryThreshold'] = $freeportsUpperSecondaryThreshold; return $this; } /** - * Gets apprenticeUpperSecondaryThreshold + * Gets govTalk * - * @return \SynergiTech\Staffology\Model\PeriodValue|null + * @return \SynergiTech\Staffology\Model\GovTalk|null */ - public function getApprenticeUpperSecondaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue + public function getGovTalk(): ?\SynergiTech\Staffology\Model\GovTalk { - return $this->container['apprenticeUpperSecondaryThreshold']; + return $this->container['govTalk']; } /** - * Sets apprenticeUpperSecondaryThreshold + * Sets govTalk * - * @param \SynergiTech\Staffology\Model\PeriodValue|null $apprenticeUpperSecondaryThreshold apprenticeUpperSecondaryThreshold + * @param \SynergiTech\Staffology\Model\GovTalk|null $govTalk govTalk * * @return $this */ - public function setApprenticeUpperSecondaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $apprenticeUpperSecondaryThreshold): static + public function setGovTalk(?\SynergiTech\Staffology\Model\GovTalk $govTalk): static { - if (is_null($apprenticeUpperSecondaryThreshold)) { - throw new InvalidArgumentException('non-nullable apprenticeUpperSecondaryThreshold cannot be null'); + if (is_null($govTalk)) { + throw new InvalidArgumentException('non-nullable govTalk cannot be null'); } - $this->container['apprenticeUpperSecondaryThreshold'] = $apprenticeUpperSecondaryThreshold; + $this->container['govTalk'] = $govTalk; return $this; } /** - * Gets freeportsUpperSecondaryThreshold + * Gets isPreview * - * @return \SynergiTech\Staffology\Model\PeriodValue|null + * @return bool|null */ - public function getFreeportsUpperSecondaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue + public function getIsPreview(): ?bool { - return $this->container['freeportsUpperSecondaryThreshold']; + return $this->container['isPreview']; } /** - * Sets freeportsUpperSecondaryThreshold + * Sets isPreview * - * @param \SynergiTech\Staffology\Model\PeriodValue|null $freeportsUpperSecondaryThreshold freeportsUpperSecondaryThreshold + * @param bool|null $isPreview [readonly] Indicates that this is a preview of the given years configuration and it shouldn't yet be used for live processing of payroll data. * * @return $this */ - public function setFreeportsUpperSecondaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $freeportsUpperSecondaryThreshold): static + public function setIsPreview(?bool $isPreview): static { - if (is_null($freeportsUpperSecondaryThreshold)) { - throw new InvalidArgumentException('non-nullable freeportsUpperSecondaryThreshold cannot be null'); + if (is_null($isPreview)) { + throw new InvalidArgumentException('non-nullable isPreview cannot be null'); } - $this->container['freeportsUpperSecondaryThreshold'] = $freeportsUpperSecondaryThreshold; + $this->container['isPreview'] = $isPreview; return $this; } /** - * Gets veteransUpperSecondaryThreshold + * Gets loanCharge * - * @return \SynergiTech\Staffology\Model\PeriodValue|null + * @return \SynergiTech\Staffology\Model\LoanCharge|null */ - public function getVeteransUpperSecondaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue + public function getLoanCharge(): ?\SynergiTech\Staffology\Model\LoanCharge { - return $this->container['veteransUpperSecondaryThreshold']; + return $this->container['loanCharge']; } /** - * Sets veteransUpperSecondaryThreshold + * Sets loanCharge * - * @param \SynergiTech\Staffology\Model\PeriodValue|null $veteransUpperSecondaryThreshold veteransUpperSecondaryThreshold + * @param \SynergiTech\Staffology\Model\LoanCharge|null $loanCharge loanCharge * * @return $this */ - public function setVeteransUpperSecondaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $veteransUpperSecondaryThreshold): static + public function setLoanCharge(?\SynergiTech\Staffology\Model\LoanCharge $loanCharge): static { - if (is_null($veteransUpperSecondaryThreshold)) { - throw new InvalidArgumentException('non-nullable veteransUpperSecondaryThreshold cannot be null'); + if (is_null($loanCharge)) { + throw new InvalidArgumentException('non-nullable loanCharge cannot be null'); } - $this->container['veteransUpperSecondaryThreshold'] = $veteransUpperSecondaryThreshold; + $this->container['loanCharge'] = $loanCharge; return $this; } /** - * Gets directorsProratePrimaryThreshold + * Gets lowerEarningsLimit * * @return \SynergiTech\Staffology\Model\PeriodValue|null */ - public function getDirectorsProratePrimaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue + public function getLowerEarningsLimit(): ?\SynergiTech\Staffology\Model\PeriodValue { - return $this->container['directorsProratePrimaryThreshold']; + return $this->container['lowerEarningsLimit']; } /** - * Sets directorsProratePrimaryThreshold + * Sets lowerEarningsLimit + * + * @param \SynergiTech\Staffology\Model\PeriodValue|null $lowerEarningsLimit lowerEarningsLimit + * + * @return $this + */ + public function setLowerEarningsLimit(?\SynergiTech\Staffology\Model\PeriodValue $lowerEarningsLimit): static + { + if (is_null($lowerEarningsLimit)) { + throw new InvalidArgumentException('non-nullable lowerEarningsLimit cannot be null'); + } + $this->container['lowerEarningsLimit'] = $lowerEarningsLimit; + + return $this; + } + + /** + * Gets maximumAeAge + * + * @return int|null + */ + public function getMaximumAeAge(): ?int + { + return $this->container['maximumAeAge']; + } + + /** + * Sets maximumAeAge * - * @param \SynergiTech\Staffology\Model\PeriodValue|null $directorsProratePrimaryThreshold directorsProratePrimaryThreshold + * @param int|null $maximumAeAge [readonly] * * @return $this */ - public function setDirectorsProratePrimaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $directorsProratePrimaryThreshold): static + public function setMaximumAeAge(?int $maximumAeAge): static { - if (is_null($directorsProratePrimaryThreshold)) { - throw new InvalidArgumentException('non-nullable directorsProratePrimaryThreshold cannot be null'); + if (is_null($maximumAeAge)) { + throw new InvalidArgumentException('non-nullable maximumAeAge cannot be null'); } - $this->container['directorsProratePrimaryThreshold'] = $directorsProratePrimaryThreshold; + $this->container['maximumAeAge'] = $maximumAeAge; return $this; } /** - * Gets plan1StudentLoanThreshold + * Gets mileageAllowancePaymentsRates * - * @return float|null + * @return \SynergiTech\Staffology\Model\MileageAllowancePaymentsRate[]|null */ - public function getPlan1StudentLoanThreshold(): ?float + public function getMileageAllowancePaymentsRates(): ?array { - return $this->container['plan1StudentLoanThreshold']; + return $this->container['mileageAllowancePaymentsRates']; } /** - * Sets plan1StudentLoanThreshold + * Sets mileageAllowancePaymentsRates * - * @param float|null $plan1StudentLoanThreshold [readonly] + * @param \SynergiTech\Staffology\Model\MileageAllowancePaymentsRate[]|null $mileageAllowancePaymentsRates [readonly] * * @return $this */ - public function setPlan1StudentLoanThreshold(?float $plan1StudentLoanThreshold): static + public function setMileageAllowancePaymentsRates(?array $mileageAllowancePaymentsRates): static { - if (is_null($plan1StudentLoanThreshold)) { - throw new InvalidArgumentException('non-nullable plan1StudentLoanThreshold cannot be null'); + if (is_null($mileageAllowancePaymentsRates)) { + array_push($this->openAPINullablesSetToNull, 'mileageAllowancePaymentsRates'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('mileageAllowancePaymentsRates', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['plan1StudentLoanThreshold'] = $plan1StudentLoanThreshold; + $this->container['mileageAllowancePaymentsRates'] = $mileageAllowancePaymentsRates; return $this; } /** - * Gets plan1StudentLoanRate + * Gets minimumAeAge * - * @return float|null + * @return int|null */ - public function getPlan1StudentLoanRate(): ?float + public function getMinimumAeAge(): ?int { - return $this->container['plan1StudentLoanRate']; + return $this->container['minimumAeAge']; } /** - * Sets plan1StudentLoanRate + * Sets minimumAeAge * - * @param float|null $plan1StudentLoanRate [readonly] + * @param int|null $minimumAeAge [readonly] * * @return $this */ - public function setPlan1StudentLoanRate(?float $plan1StudentLoanRate): static + public function setMinimumAeAge(?int $minimumAeAge): static { - if (is_null($plan1StudentLoanRate)) { - throw new InvalidArgumentException('non-nullable plan1StudentLoanRate cannot be null'); + if (is_null($minimumAeAge)) { + throw new InvalidArgumentException('non-nullable minimumAeAge cannot be null'); } - $this->container['plan1StudentLoanRate'] = $plan1StudentLoanRate; + $this->container['minimumAeAge'] = $minimumAeAge; return $this; } /** - * Gets plan2StudentLoanThreshold + * Gets minimumWage * - * @return float|null + * @return \SynergiTech\Staffology\Model\NationalMinimumWage[]|null */ - public function getPlan2StudentLoanThreshold(): ?float + public function getMinimumWage(): ?array { - return $this->container['plan2StudentLoanThreshold']; + return $this->container['minimumWage']; } /** - * Sets plan2StudentLoanThreshold + * Sets minimumWage * - * @param float|null $plan2StudentLoanThreshold [readonly] + * @param \SynergiTech\Staffology\Model\NationalMinimumWage[]|null $minimumWage [readonly] * * @return $this */ - public function setPlan2StudentLoanThreshold(?float $plan2StudentLoanThreshold): static + public function setMinimumWage(?array $minimumWage): static { - if (is_null($plan2StudentLoanThreshold)) { - throw new InvalidArgumentException('non-nullable plan2StudentLoanThreshold cannot be null'); + if (is_null($minimumWage)) { + array_push($this->openAPINullablesSetToNull, 'minimumWage'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('minimumWage', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['plan2StudentLoanThreshold'] = $plan2StudentLoanThreshold; + $this->container['minimumWage'] = $minimumWage; return $this; } /** - * Gets plan2StudentLoanRate + * Gets niRates * - * @return float|null + * @return \SynergiTech\Staffology\Model\NationalInsuranceCode[]|null */ - public function getPlan2StudentLoanRate(): ?float + public function getNiRates(): ?array { - return $this->container['plan2StudentLoanRate']; + return $this->container['niRates']; } /** - * Sets plan2StudentLoanRate + * Sets niRates * - * @param float|null $plan2StudentLoanRate [readonly] + * @param \SynergiTech\Staffology\Model\NationalInsuranceCode[]|null $niRates [readonly] * * @return $this */ - public function setPlan2StudentLoanRate(?float $plan2StudentLoanRate): static + public function setNiRates(?array $niRates): static { - if (is_null($plan2StudentLoanRate)) { - throw new InvalidArgumentException('non-nullable plan2StudentLoanRate cannot be null'); + if (is_null($niRates)) { + array_push($this->openAPINullablesSetToNull, 'niRates'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('niRates', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['plan2StudentLoanRate'] = $plan2StudentLoanRate; + $this->container['niRates'] = $niRates; return $this; } /** - * Gets plan4StudentLoanThreshold + * Gets nicCompensationNormalEmployerRate * * @return float|null */ - public function getPlan4StudentLoanThreshold(): ?float + public function getNicCompensationNormalEmployerRate(): ?float { - return $this->container['plan4StudentLoanThreshold']; + return $this->container['nicCompensationNormalEmployerRate']; } /** - * Sets plan4StudentLoanThreshold + * Sets nicCompensationNormalEmployerRate * - * @param float|null $plan4StudentLoanThreshold [readonly] + * @param float|null $nicCompensationNormalEmployerRate [readonly] * * @return $this */ - public function setPlan4StudentLoanThreshold(?float $plan4StudentLoanThreshold): static + public function setNicCompensationNormalEmployerRate(?float $nicCompensationNormalEmployerRate): static { - if (is_null($plan4StudentLoanThreshold)) { - throw new InvalidArgumentException('non-nullable plan4StudentLoanThreshold cannot be null'); + if (is_null($nicCompensationNormalEmployerRate)) { + throw new InvalidArgumentException('non-nullable nicCompensationNormalEmployerRate cannot be null'); } - $this->container['plan4StudentLoanThreshold'] = $plan4StudentLoanThreshold; + $this->container['nicCompensationNormalEmployerRate'] = $nicCompensationNormalEmployerRate; return $this; } /** - * Gets plan4StudentLoanRate + * Gets nicCompensationSmallEmployerRate * * @return float|null */ - public function getPlan4StudentLoanRate(): ?float + public function getNicCompensationSmallEmployerRate(): ?float { - return $this->container['plan4StudentLoanRate']; + return $this->container['nicCompensationSmallEmployerRate']; } /** - * Sets plan4StudentLoanRate + * Sets nicCompensationSmallEmployerRate * - * @param float|null $plan4StudentLoanRate [readonly] + * @param float|null $nicCompensationSmallEmployerRate [readonly] * * @return $this */ - public function setPlan4StudentLoanRate(?float $plan4StudentLoanRate): static + public function setNicCompensationSmallEmployerRate(?float $nicCompensationSmallEmployerRate): static { - if (is_null($plan4StudentLoanRate)) { - throw new InvalidArgumentException('non-nullable plan4StudentLoanRate cannot be null'); + if (is_null($nicCompensationSmallEmployerRate)) { + throw new InvalidArgumentException('non-nullable nicCompensationSmallEmployerRate cannot be null'); } - $this->container['plan4StudentLoanRate'] = $plan4StudentLoanRate; + $this->container['nicCompensationSmallEmployerRate'] = $nicCompensationSmallEmployerRate; return $this; } /** - * Gets postGradLoanThreshold + * Gets nicRecoverableNormalEmployerRate * * @return float|null */ - public function getPostGradLoanThreshold(): ?float + public function getNicRecoverableNormalEmployerRate(): ?float { - return $this->container['postGradLoanThreshold']; + return $this->container['nicRecoverableNormalEmployerRate']; } /** - * Sets postGradLoanThreshold + * Sets nicRecoverableNormalEmployerRate * - * @param float|null $postGradLoanThreshold [readonly] + * @param float|null $nicRecoverableNormalEmployerRate [readonly] * * @return $this */ - public function setPostGradLoanThreshold(?float $postGradLoanThreshold): static + public function setNicRecoverableNormalEmployerRate(?float $nicRecoverableNormalEmployerRate): static { - if (is_null($postGradLoanThreshold)) { - throw new InvalidArgumentException('non-nullable postGradLoanThreshold cannot be null'); + if (is_null($nicRecoverableNormalEmployerRate)) { + throw new InvalidArgumentException('non-nullable nicRecoverableNormalEmployerRate cannot be null'); } - $this->container['postGradLoanThreshold'] = $postGradLoanThreshold; + $this->container['nicRecoverableNormalEmployerRate'] = $nicRecoverableNormalEmployerRate; return $this; } /** - * Gets postGradLoanRate + * Gets nicRecoverableSmallEmployerRate * * @return float|null */ - public function getPostGradLoanRate(): ?float + public function getNicRecoverableSmallEmployerRate(): ?float { - return $this->container['postGradLoanRate']; + return $this->container['nicRecoverableSmallEmployerRate']; } /** - * Sets postGradLoanRate + * Sets nicRecoverableSmallEmployerRate * - * @param float|null $postGradLoanRate [readonly] + * @param float|null $nicRecoverableSmallEmployerRate [readonly] * * @return $this */ - public function setPostGradLoanRate(?float $postGradLoanRate): static + public function setNicRecoverableSmallEmployerRate(?float $nicRecoverableSmallEmployerRate): static { - if (is_null($postGradLoanRate)) { - throw new InvalidArgumentException('non-nullable postGradLoanRate cannot be null'); + if (is_null($nicRecoverableSmallEmployerRate)) { + throw new InvalidArgumentException('non-nullable nicRecoverableSmallEmployerRate cannot be null'); } - $this->container['postGradLoanRate'] = $postGradLoanRate; + $this->container['nicRecoverableSmallEmployerRate'] = $nicRecoverableSmallEmployerRate; return $this; } /** - * Gets deaProtectedEarnings + * Gets pensionAeEmployeeContribution * * @return float|null */ - public function getDeaProtectedEarnings(): ?float + public function getPensionAeEmployeeContribution(): ?float { - return $this->container['deaProtectedEarnings']; + return $this->container['pensionAeEmployeeContribution']; } /** - * Sets deaProtectedEarnings + * Sets pensionAeEmployeeContribution * - * @param float|null $deaProtectedEarnings [readonly] + * @param float|null $pensionAeEmployeeContribution [readonly] * * @return $this */ - public function setDeaProtectedEarnings(?float $deaProtectedEarnings): static + public function setPensionAeEmployeeContribution(?float $pensionAeEmployeeContribution): static { - if (is_null($deaProtectedEarnings)) { - throw new InvalidArgumentException('non-nullable deaProtectedEarnings cannot be null'); + if (is_null($pensionAeEmployeeContribution)) { + throw new InvalidArgumentException('non-nullable pensionAeEmployeeContribution cannot be null'); } - $this->container['deaProtectedEarnings'] = $deaProtectedEarnings; + $this->container['pensionAeEmployeeContribution'] = $pensionAeEmployeeContribution; return $this; } /** - * Gets pensionLowerThreshold + * Gets pensionAeEmployerContribution * - * @return \SynergiTech\Staffology\Model\PeriodValue|null + * @return float|null */ - public function getPensionLowerThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue + public function getPensionAeEmployerContribution(): ?float { - return $this->container['pensionLowerThreshold']; + return $this->container['pensionAeEmployerContribution']; } /** - * Sets pensionLowerThreshold + * Sets pensionAeEmployerContribution * - * @param \SynergiTech\Staffology\Model\PeriodValue|null $pensionLowerThreshold pensionLowerThreshold + * @param float|null $pensionAeEmployerContribution [readonly] * * @return $this */ - public function setPensionLowerThreshold(?\SynergiTech\Staffology\Model\PeriodValue $pensionLowerThreshold): static + public function setPensionAeEmployerContribution(?float $pensionAeEmployerContribution): static { - if (is_null($pensionLowerThreshold)) { - throw new InvalidArgumentException('non-nullable pensionLowerThreshold cannot be null'); + if (is_null($pensionAeEmployerContribution)) { + throw new InvalidArgumentException('non-nullable pensionAeEmployerContribution cannot be null'); } - $this->container['pensionLowerThreshold'] = $pensionLowerThreshold; + $this->container['pensionAeEmployerContribution'] = $pensionAeEmployerContribution; return $this; } @@ -1315,340 +1486,298 @@ public function setPensionAutomaticEnrolment(?\SynergiTech\Staffology\Model\Peri } /** - * Gets pensionUpperThreshold + * Gets pensionLowerThreshold * * @return \SynergiTech\Staffology\Model\PeriodValue|null */ - public function getPensionUpperThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue + public function getPensionLowerThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue { - return $this->container['pensionUpperThreshold']; + return $this->container['pensionLowerThreshold']; } /** - * Sets pensionUpperThreshold + * Sets pensionLowerThreshold * - * @param \SynergiTech\Staffology\Model\PeriodValue|null $pensionUpperThreshold pensionUpperThreshold + * @param \SynergiTech\Staffology\Model\PeriodValue|null $pensionLowerThreshold pensionLowerThreshold * * @return $this */ - public function setPensionUpperThreshold(?\SynergiTech\Staffology\Model\PeriodValue $pensionUpperThreshold): static + public function setPensionLowerThreshold(?\SynergiTech\Staffology\Model\PeriodValue $pensionLowerThreshold): static { - if (is_null($pensionUpperThreshold)) { - throw new InvalidArgumentException('non-nullable pensionUpperThreshold cannot be null'); + if (is_null($pensionLowerThreshold)) { + throw new InvalidArgumentException('non-nullable pensionLowerThreshold cannot be null'); } - $this->container['pensionUpperThreshold'] = $pensionUpperThreshold; + $this->container['pensionLowerThreshold'] = $pensionLowerThreshold; return $this; } /** - * Gets pensionAeEmployerContribution + * Gets pensionUpperThreshold * - * @return float|null + * @return \SynergiTech\Staffology\Model\PeriodValue|null */ - public function getPensionAeEmployerContribution(): ?float + public function getPensionUpperThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue { - return $this->container['pensionAeEmployerContribution']; + return $this->container['pensionUpperThreshold']; } /** - * Sets pensionAeEmployerContribution + * Sets pensionUpperThreshold * - * @param float|null $pensionAeEmployerContribution [readonly] + * @param \SynergiTech\Staffology\Model\PeriodValue|null $pensionUpperThreshold pensionUpperThreshold * * @return $this */ - public function setPensionAeEmployerContribution(?float $pensionAeEmployerContribution): static + public function setPensionUpperThreshold(?\SynergiTech\Staffology\Model\PeriodValue $pensionUpperThreshold): static { - if (is_null($pensionAeEmployerContribution)) { - throw new InvalidArgumentException('non-nullable pensionAeEmployerContribution cannot be null'); + if (is_null($pensionUpperThreshold)) { + throw new InvalidArgumentException('non-nullable pensionUpperThreshold cannot be null'); } - $this->container['pensionAeEmployerContribution'] = $pensionAeEmployerContribution; + $this->container['pensionUpperThreshold'] = $pensionUpperThreshold; return $this; } /** - * Gets pensionAeEmployeeContribution + * Gets plan1StudentLoanRate * * @return float|null */ - public function getPensionAeEmployeeContribution(): ?float + public function getPlan1StudentLoanRate(): ?float { - return $this->container['pensionAeEmployeeContribution']; + return $this->container['plan1StudentLoanRate']; } /** - * Sets pensionAeEmployeeContribution + * Sets plan1StudentLoanRate * - * @param float|null $pensionAeEmployeeContribution [readonly] + * @param float|null $plan1StudentLoanRate [readonly] * * @return $this */ - public function setPensionAeEmployeeContribution(?float $pensionAeEmployeeContribution): static + public function setPlan1StudentLoanRate(?float $plan1StudentLoanRate): static { - if (is_null($pensionAeEmployeeContribution)) { - throw new InvalidArgumentException('non-nullable pensionAeEmployeeContribution cannot be null'); + if (is_null($plan1StudentLoanRate)) { + throw new InvalidArgumentException('non-nullable plan1StudentLoanRate cannot be null'); } - $this->container['pensionAeEmployeeContribution'] = $pensionAeEmployeeContribution; + $this->container['plan1StudentLoanRate'] = $plan1StudentLoanRate; return $this; } /** - * Gets employmentAllowancePreviousYear + * Gets plan1StudentLoanThreshold * * @return float|null */ - public function getEmploymentAllowancePreviousYear(): ?float + public function getPlan1StudentLoanThreshold(): ?float { - return $this->container['employmentAllowancePreviousYear']; + return $this->container['plan1StudentLoanThreshold']; } /** - * Sets employmentAllowancePreviousYear + * Sets plan1StudentLoanThreshold * - * @param float|null $employmentAllowancePreviousYear [readonly] + * @param float|null $plan1StudentLoanThreshold [readonly] * * @return $this */ - public function setEmploymentAllowancePreviousYear(?float $employmentAllowancePreviousYear): static + public function setPlan1StudentLoanThreshold(?float $plan1StudentLoanThreshold): static { - if (is_null($employmentAllowancePreviousYear)) { - throw new InvalidArgumentException('non-nullable employmentAllowancePreviousYear cannot be null'); + if (is_null($plan1StudentLoanThreshold)) { + throw new InvalidArgumentException('non-nullable plan1StudentLoanThreshold cannot be null'); } - $this->container['employmentAllowancePreviousYear'] = $employmentAllowancePreviousYear; + $this->container['plan1StudentLoanThreshold'] = $plan1StudentLoanThreshold; return $this; } /** - * Gets employmentAllowance + * Gets plan2StudentLoanRate * * @return float|null */ - public function getEmploymentAllowance(): ?float + public function getPlan2StudentLoanRate(): ?float { - return $this->container['employmentAllowance']; + return $this->container['plan2StudentLoanRate']; } /** - * Sets employmentAllowance + * Sets plan2StudentLoanRate * - * @param float|null $employmentAllowance [readonly] + * @param float|null $plan2StudentLoanRate [readonly] * * @return $this */ - public function setEmploymentAllowance(?float $employmentAllowance): static + public function setPlan2StudentLoanRate(?float $plan2StudentLoanRate): static { - if (is_null($employmentAllowance)) { - throw new InvalidArgumentException('non-nullable employmentAllowance cannot be null'); + if (is_null($plan2StudentLoanRate)) { + throw new InvalidArgumentException('non-nullable plan2StudentLoanRate cannot be null'); } - $this->container['employmentAllowance'] = $employmentAllowance; + $this->container['plan2StudentLoanRate'] = $plan2StudentLoanRate; return $this; } /** - * Gets fixedCodes + * Gets plan2StudentLoanThreshold * - * @return \SynergiTech\Staffology\Model\FixedCode[]|null + * @return float|null */ - public function getFixedCodes(): ?array + public function getPlan2StudentLoanThreshold(): ?float { - return $this->container['fixedCodes']; + return $this->container['plan2StudentLoanThreshold']; } /** - * Sets fixedCodes + * Sets plan2StudentLoanThreshold * - * @param \SynergiTech\Staffology\Model\FixedCode[]|null $fixedCodes [readonly] + * @param float|null $plan2StudentLoanThreshold [readonly] * * @return $this */ - public function setFixedCodes(?array $fixedCodes): static + public function setPlan2StudentLoanThreshold(?float $plan2StudentLoanThreshold): static { - if (is_null($fixedCodes)) { - array_push($this->openAPINullablesSetToNull, 'fixedCodes'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fixedCodes', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($plan2StudentLoanThreshold)) { + throw new InvalidArgumentException('non-nullable plan2StudentLoanThreshold cannot be null'); } - $this->container['fixedCodes'] = $fixedCodes; + $this->container['plan2StudentLoanThreshold'] = $plan2StudentLoanThreshold; return $this; } /** - * Gets scottishFixedCodes + * Gets plan4StudentLoanRate * - * @return \SynergiTech\Staffology\Model\FixedCode[]|null + * @return float|null */ - public function getScottishFixedCodes(): ?array + public function getPlan4StudentLoanRate(): ?float { - return $this->container['scottishFixedCodes']; + return $this->container['plan4StudentLoanRate']; } /** - * Sets scottishFixedCodes + * Sets plan4StudentLoanRate * - * @param \SynergiTech\Staffology\Model\FixedCode[]|null $scottishFixedCodes [readonly] + * @param float|null $plan4StudentLoanRate [readonly] * * @return $this */ - public function setScottishFixedCodes(?array $scottishFixedCodes): static + public function setPlan4StudentLoanRate(?float $plan4StudentLoanRate): static { - if (is_null($scottishFixedCodes)) { - array_push($this->openAPINullablesSetToNull, 'scottishFixedCodes'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('scottishFixedCodes', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($plan4StudentLoanRate)) { + throw new InvalidArgumentException('non-nullable plan4StudentLoanRate cannot be null'); } - $this->container['scottishFixedCodes'] = $scottishFixedCodes; + $this->container['plan4StudentLoanRate'] = $plan4StudentLoanRate; return $this; } /** - * Gets welshFixedCodes + * Gets plan4StudentLoanThreshold * - * @return \SynergiTech\Staffology\Model\FixedCode[]|null + * @return float|null */ - public function getWelshFixedCodes(): ?array + public function getPlan4StudentLoanThreshold(): ?float { - return $this->container['welshFixedCodes']; + return $this->container['plan4StudentLoanThreshold']; } /** - * Sets welshFixedCodes + * Sets plan4StudentLoanThreshold * - * @param \SynergiTech\Staffology\Model\FixedCode[]|null $welshFixedCodes [readonly] + * @param float|null $plan4StudentLoanThreshold [readonly] * * @return $this */ - public function setWelshFixedCodes(?array $welshFixedCodes): static + public function setPlan4StudentLoanThreshold(?float $plan4StudentLoanThreshold): static { - if (is_null($welshFixedCodes)) { - array_push($this->openAPINullablesSetToNull, 'welshFixedCodes'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('welshFixedCodes', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($plan4StudentLoanThreshold)) { + throw new InvalidArgumentException('non-nullable plan4StudentLoanThreshold cannot be null'); } - $this->container['welshFixedCodes'] = $welshFixedCodes; + $this->container['plan4StudentLoanThreshold'] = $plan4StudentLoanThreshold; return $this; } /** - * Gets niRates + * Gets postGradLoanRate * - * @return \SynergiTech\Staffology\Model\NationalInsuranceCode[]|null + * @return float|null */ - public function getNiRates(): ?array + public function getPostGradLoanRate(): ?float { - return $this->container['niRates']; + return $this->container['postGradLoanRate']; } /** - * Sets niRates + * Sets postGradLoanRate * - * @param \SynergiTech\Staffology\Model\NationalInsuranceCode[]|null $niRates [readonly] + * @param float|null $postGradLoanRate [readonly] * * @return $this */ - public function setNiRates(?array $niRates): static + public function setPostGradLoanRate(?float $postGradLoanRate): static { - if (is_null($niRates)) { - array_push($this->openAPINullablesSetToNull, 'niRates'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('niRates', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($postGradLoanRate)) { + throw new InvalidArgumentException('non-nullable postGradLoanRate cannot be null'); } - $this->container['niRates'] = $niRates; + $this->container['postGradLoanRate'] = $postGradLoanRate; return $this; } /** - * Gets directorsNiRates + * Gets postGradLoanThreshold * - * @return \SynergiTech\Staffology\Model\NationalInsuranceCode[]|null + * @return float|null */ - public function getDirectorsNiRates(): ?array + public function getPostGradLoanThreshold(): ?float { - return $this->container['directorsNiRates']; + return $this->container['postGradLoanThreshold']; } /** - * Sets directorsNiRates + * Sets postGradLoanThreshold * - * @param \SynergiTech\Staffology\Model\NationalInsuranceCode[]|null $directorsNiRates [readonly] + * @param float|null $postGradLoanThreshold [readonly] * * @return $this */ - public function setDirectorsNiRates(?array $directorsNiRates): static + public function setPostGradLoanThreshold(?float $postGradLoanThreshold): static { - if (is_null($directorsNiRates)) { - array_push($this->openAPINullablesSetToNull, 'directorsNiRates'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('directorsNiRates', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($postGradLoanThreshold)) { + throw new InvalidArgumentException('non-nullable postGradLoanThreshold cannot be null'); } - $this->container['directorsNiRates'] = $directorsNiRates; + $this->container['postGradLoanThreshold'] = $postGradLoanThreshold; return $this; } /** - * Gets brackets + * Gets primaryThreshold * - * @return \SynergiTech\Staffology\Model\TaxBracket[]|null + * @return \SynergiTech\Staffology\Model\PeriodValue|null */ - public function getBrackets(): ?array + public function getPrimaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue { - return $this->container['brackets']; + return $this->container['primaryThreshold']; } /** - * Sets brackets + * Sets primaryThreshold * - * @param \SynergiTech\Staffology\Model\TaxBracket[]|null $brackets [readonly] + * @param \SynergiTech\Staffology\Model\PeriodValue|null $primaryThreshold primaryThreshold * * @return $this */ - public function setBrackets(?array $brackets): static + public function setPrimaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $primaryThreshold): static { - if (is_null($brackets)) { - array_push($this->openAPINullablesSetToNull, 'brackets'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('brackets', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($primaryThreshold)) { + throw new InvalidArgumentException('non-nullable primaryThreshold cannot be null'); } - $this->container['brackets'] = $brackets; + $this->container['primaryThreshold'] = $primaryThreshold; return $this; } @@ -1688,103 +1817,62 @@ public function setScottishBrackets(?array $scottishBrackets): static } /** - * Gets welshBrackets - * - * @return \SynergiTech\Staffology\Model\TaxBracket[]|null - */ - public function getWelshBrackets(): ?array - { - return $this->container['welshBrackets']; - } - - /** - * Sets welshBrackets - * - * @param \SynergiTech\Staffology\Model\TaxBracket[]|null $welshBrackets [readonly] - * - * @return $this - */ - public function setWelshBrackets(?array $welshBrackets): static - { - if (is_null($welshBrackets)) { - array_push($this->openAPINullablesSetToNull, 'welshBrackets'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('welshBrackets', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['welshBrackets'] = $welshBrackets; - - return $this; - } - - /** - * Gets taxCodeChanges + * Gets scottishFixedCodes * - * @return \SynergiTech\Staffology\Model\TaxCodeChange[]|null + * @return \SynergiTech\Staffology\Model\FixedCode[]|null */ - public function getTaxCodeChanges(): ?array + public function getScottishFixedCodes(): ?array { - return $this->container['taxCodeChanges']; + return $this->container['scottishFixedCodes']; } /** - * Sets taxCodeChanges + * Sets scottishFixedCodes * - * @param \SynergiTech\Staffology\Model\TaxCodeChange[]|null $taxCodeChanges [readonly] + * @param \SynergiTech\Staffology\Model\FixedCode[]|null $scottishFixedCodes [readonly] * * @return $this */ - public function setTaxCodeChanges(?array $taxCodeChanges): static - { - if (is_null($taxCodeChanges)) { - array_push($this->openAPINullablesSetToNull, 'taxCodeChanges'); + public function setScottishFixedCodes(?array $scottishFixedCodes): static + { + if (is_null($scottishFixedCodes)) { + array_push($this->openAPINullablesSetToNull, 'scottishFixedCodes'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxCodeChanges', $nullablesSetToNull); + $index = array_search('scottishFixedCodes', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxCodeChanges'] = $taxCodeChanges; + $this->container['scottishFixedCodes'] = $scottishFixedCodes; return $this; } /** - * Gets minimumWage + * Gets secondaryThreshold * - * @return \SynergiTech\Staffology\Model\NationalMinimumWage[]|null + * @return \SynergiTech\Staffology\Model\PeriodValue|null */ - public function getMinimumWage(): ?array + public function getSecondaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue { - return $this->container['minimumWage']; + return $this->container['secondaryThreshold']; } /** - * Sets minimumWage + * Sets secondaryThreshold * - * @param \SynergiTech\Staffology\Model\NationalMinimumWage[]|null $minimumWage [readonly] + * @param \SynergiTech\Staffology\Model\PeriodValue|null $secondaryThreshold secondaryThreshold * * @return $this */ - public function setMinimumWage(?array $minimumWage): static + public function setSecondaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $secondaryThreshold): static { - if (is_null($minimumWage)) { - array_push($this->openAPINullablesSetToNull, 'minimumWage'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('minimumWage', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($secondaryThreshold)) { + throw new InvalidArgumentException('non-nullable secondaryThreshold cannot be null'); } - $this->container['minimumWage'] = $minimumWage; + $this->container['secondaryThreshold'] = $secondaryThreshold; return $this; } @@ -1817,258 +1905,272 @@ public function setStatutoryPay(?\SynergiTech\Staffology\Model\StatutoryPay $sta } /** - * Gets loanCharge + * Gets taxCodeChanges * - * @return \SynergiTech\Staffology\Model\LoanCharge|null + * @return \SynergiTech\Staffology\Model\TaxCodeChange[]|null */ - public function getLoanCharge(): ?\SynergiTech\Staffology\Model\LoanCharge + public function getTaxCodeChanges(): ?array { - return $this->container['loanCharge']; + return $this->container['taxCodeChanges']; } /** - * Sets loanCharge + * Sets taxCodeChanges * - * @param \SynergiTech\Staffology\Model\LoanCharge|null $loanCharge loanCharge + * @param \SynergiTech\Staffology\Model\TaxCodeChange[]|null $taxCodeChanges [readonly] * * @return $this */ - public function setLoanCharge(?\SynergiTech\Staffology\Model\LoanCharge $loanCharge): static + public function setTaxCodeChanges(?array $taxCodeChanges): static { - if (is_null($loanCharge)) { - throw new InvalidArgumentException('non-nullable loanCharge cannot be null'); + if (is_null($taxCodeChanges)) { + array_push($this->openAPINullablesSetToNull, 'taxCodeChanges'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('taxCodeChanges', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['loanCharge'] = $loanCharge; + $this->container['taxCodeChanges'] = $taxCodeChanges; return $this; } /** - * Gets carCharge + * Gets taxYear * - * @return \SynergiTech\Staffology\Model\CarCharge|null + * @return int|null */ - public function getCarCharge(): ?\SynergiTech\Staffology\Model\CarCharge + public function getTaxYear(): ?int { - return $this->container['carCharge']; + return $this->container['taxYear']; } /** - * Sets carCharge + * Sets taxYear * - * @param \SynergiTech\Staffology\Model\CarCharge|null $carCharge carCharge + * @param int|null $taxYear [readonly] The TaxYear for which this configuration applies * * @return $this */ - public function setCarCharge(?\SynergiTech\Staffology\Model\CarCharge $carCharge): static + public function setTaxYear(?int $taxYear): static { - if (is_null($carCharge)) { - throw new InvalidArgumentException('non-nullable carCharge cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['carCharge'] = $carCharge; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets govTalk + * Gets tieredPensions * - * @return \SynergiTech\Staffology\Model\GovTalk|null + * @return \SynergiTech\Staffology\Model\TieredPension[]|null */ - public function getGovTalk(): ?\SynergiTech\Staffology\Model\GovTalk + public function getTieredPensions(): ?array { - return $this->container['govTalk']; + return $this->container['tieredPensions']; } /** - * Sets govTalk + * Sets tieredPensions * - * @param \SynergiTech\Staffology\Model\GovTalk|null $govTalk govTalk + * @param \SynergiTech\Staffology\Model\TieredPension[]|null $tieredPensions [readonly] * * @return $this */ - public function setGovTalk(?\SynergiTech\Staffology\Model\GovTalk $govTalk): static + public function setTieredPensions(?array $tieredPensions): static { - if (is_null($govTalk)) { - throw new InvalidArgumentException('non-nullable govTalk cannot be null'); + if (is_null($tieredPensions)) { + array_push($this->openAPINullablesSetToNull, 'tieredPensions'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tieredPensions', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['govTalk'] = $govTalk; + $this->container['tieredPensions'] = $tieredPensions; return $this; } /** - * Gets mileageAllowancePaymentsRates + * Gets upperAccrualPoint * - * @return \SynergiTech\Staffology\Model\MileageAllowancePaymentsRate[]|null + * @return \SynergiTech\Staffology\Model\PeriodValue|null */ - public function getMileageAllowancePaymentsRates(): ?array + public function getUpperAccrualPoint(): ?\SynergiTech\Staffology\Model\PeriodValue { - return $this->container['mileageAllowancePaymentsRates']; + return $this->container['upperAccrualPoint']; } /** - * Sets mileageAllowancePaymentsRates + * Sets upperAccrualPoint * - * @param \SynergiTech\Staffology\Model\MileageAllowancePaymentsRate[]|null $mileageAllowancePaymentsRates [readonly] + * @param \SynergiTech\Staffology\Model\PeriodValue|null $upperAccrualPoint upperAccrualPoint * * @return $this */ - public function setMileageAllowancePaymentsRates(?array $mileageAllowancePaymentsRates): static + public function setUpperAccrualPoint(?\SynergiTech\Staffology\Model\PeriodValue $upperAccrualPoint): static { - if (is_null($mileageAllowancePaymentsRates)) { - array_push($this->openAPINullablesSetToNull, 'mileageAllowancePaymentsRates'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('mileageAllowancePaymentsRates', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($upperAccrualPoint)) { + throw new InvalidArgumentException('non-nullable upperAccrualPoint cannot be null'); } - $this->container['mileageAllowancePaymentsRates'] = $mileageAllowancePaymentsRates; + $this->container['upperAccrualPoint'] = $upperAccrualPoint; return $this; } /** - * Gets tieredPensions + * Gets upperEarningsLimit * - * @return \SynergiTech\Staffology\Model\TieredPension[]|null + * @return \SynergiTech\Staffology\Model\PeriodValue|null */ - public function getTieredPensions(): ?array + public function getUpperEarningsLimit(): ?\SynergiTech\Staffology\Model\PeriodValue { - return $this->container['tieredPensions']; + return $this->container['upperEarningsLimit']; } /** - * Sets tieredPensions + * Sets upperEarningsLimit * - * @param \SynergiTech\Staffology\Model\TieredPension[]|null $tieredPensions [readonly] + * @param \SynergiTech\Staffology\Model\PeriodValue|null $upperEarningsLimit upperEarningsLimit * * @return $this */ - public function setTieredPensions(?array $tieredPensions): static + public function setUpperEarningsLimit(?\SynergiTech\Staffology\Model\PeriodValue $upperEarningsLimit): static { - if (is_null($tieredPensions)) { - array_push($this->openAPINullablesSetToNull, 'tieredPensions'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('tieredPensions', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($upperEarningsLimit)) { + throw new InvalidArgumentException('non-nullable upperEarningsLimit cannot be null'); } - $this->container['tieredPensions'] = $tieredPensions; + $this->container['upperEarningsLimit'] = $upperEarningsLimit; return $this; } /** - * Gets nicRecoverableNormalEmployerRate + * Gets upperSecondaryThreshold * - * @return float|null + * @return \SynergiTech\Staffology\Model\PeriodValue|null */ - public function getNicRecoverableNormalEmployerRate(): ?float + public function getUpperSecondaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue { - return $this->container['nicRecoverableNormalEmployerRate']; + return $this->container['upperSecondaryThreshold']; } /** - * Sets nicRecoverableNormalEmployerRate + * Sets upperSecondaryThreshold * - * @param float|null $nicRecoverableNormalEmployerRate [readonly] + * @param \SynergiTech\Staffology\Model\PeriodValue|null $upperSecondaryThreshold upperSecondaryThreshold * * @return $this */ - public function setNicRecoverableNormalEmployerRate(?float $nicRecoverableNormalEmployerRate): static + public function setUpperSecondaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $upperSecondaryThreshold): static { - if (is_null($nicRecoverableNormalEmployerRate)) { - throw new InvalidArgumentException('non-nullable nicRecoverableNormalEmployerRate cannot be null'); + if (is_null($upperSecondaryThreshold)) { + throw new InvalidArgumentException('non-nullable upperSecondaryThreshold cannot be null'); } - $this->container['nicRecoverableNormalEmployerRate'] = $nicRecoverableNormalEmployerRate; + $this->container['upperSecondaryThreshold'] = $upperSecondaryThreshold; return $this; } /** - * Gets nicRecoverableSmallEmployerRate + * Gets veteransUpperSecondaryThreshold * - * @return float|null + * @return \SynergiTech\Staffology\Model\PeriodValue|null */ - public function getNicRecoverableSmallEmployerRate(): ?float + public function getVeteransUpperSecondaryThreshold(): ?\SynergiTech\Staffology\Model\PeriodValue { - return $this->container['nicRecoverableSmallEmployerRate']; + return $this->container['veteransUpperSecondaryThreshold']; } /** - * Sets nicRecoverableSmallEmployerRate + * Sets veteransUpperSecondaryThreshold * - * @param float|null $nicRecoverableSmallEmployerRate [readonly] + * @param \SynergiTech\Staffology\Model\PeriodValue|null $veteransUpperSecondaryThreshold veteransUpperSecondaryThreshold * * @return $this */ - public function setNicRecoverableSmallEmployerRate(?float $nicRecoverableSmallEmployerRate): static + public function setVeteransUpperSecondaryThreshold(?\SynergiTech\Staffology\Model\PeriodValue $veteransUpperSecondaryThreshold): static { - if (is_null($nicRecoverableSmallEmployerRate)) { - throw new InvalidArgumentException('non-nullable nicRecoverableSmallEmployerRate cannot be null'); + if (is_null($veteransUpperSecondaryThreshold)) { + throw new InvalidArgumentException('non-nullable veteransUpperSecondaryThreshold cannot be null'); } - $this->container['nicRecoverableSmallEmployerRate'] = $nicRecoverableSmallEmployerRate; + $this->container['veteransUpperSecondaryThreshold'] = $veteransUpperSecondaryThreshold; return $this; } /** - * Gets nicCompensationNormalEmployerRate + * Gets welshBrackets * - * @return float|null + * @return \SynergiTech\Staffology\Model\TaxBracket[]|null */ - public function getNicCompensationNormalEmployerRate(): ?float + public function getWelshBrackets(): ?array { - return $this->container['nicCompensationNormalEmployerRate']; + return $this->container['welshBrackets']; } /** - * Sets nicCompensationNormalEmployerRate + * Sets welshBrackets * - * @param float|null $nicCompensationNormalEmployerRate [readonly] + * @param \SynergiTech\Staffology\Model\TaxBracket[]|null $welshBrackets [readonly] * * @return $this */ - public function setNicCompensationNormalEmployerRate(?float $nicCompensationNormalEmployerRate): static + public function setWelshBrackets(?array $welshBrackets): static { - if (is_null($nicCompensationNormalEmployerRate)) { - throw new InvalidArgumentException('non-nullable nicCompensationNormalEmployerRate cannot be null'); + if (is_null($welshBrackets)) { + array_push($this->openAPINullablesSetToNull, 'welshBrackets'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('welshBrackets', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['nicCompensationNormalEmployerRate'] = $nicCompensationNormalEmployerRate; + $this->container['welshBrackets'] = $welshBrackets; return $this; } /** - * Gets nicCompensationSmallEmployerRate + * Gets welshFixedCodes * - * @return float|null + * @return \SynergiTech\Staffology\Model\FixedCode[]|null */ - public function getNicCompensationSmallEmployerRate(): ?float + public function getWelshFixedCodes(): ?array { - return $this->container['nicCompensationSmallEmployerRate']; + return $this->container['welshFixedCodes']; } /** - * Sets nicCompensationSmallEmployerRate + * Sets welshFixedCodes * - * @param float|null $nicCompensationSmallEmployerRate [readonly] + * @param \SynergiTech\Staffology\Model\FixedCode[]|null $welshFixedCodes [readonly] * * @return $this */ - public function setNicCompensationSmallEmployerRate(?float $nicCompensationSmallEmployerRate): static + public function setWelshFixedCodes(?array $welshFixedCodes): static { - if (is_null($nicCompensationSmallEmployerRate)) { - throw new InvalidArgumentException('non-nullable nicCompensationSmallEmployerRate cannot be null'); + if (is_null($welshFixedCodes)) { + array_push($this->openAPINullablesSetToNull, 'welshFixedCodes'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('welshFixedCodes', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['nicCompensationSmallEmployerRate'] = $nicCompensationSmallEmployerRate; + $this->container['welshFixedCodes'] = $welshFixedCodes; return $this; } diff --git a/src/Model/TaxYearTypes.php b/src/Model/TaxYearTypes.php index 6fdf7d1..6d64019 100644 --- a/src/Model/TaxYearTypes.php +++ b/src/Model/TaxYearTypes.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -52,6 +52,8 @@ enum TaxYearTypes: string case YEAR2023 = 'Year2023'; case YEAR2024 = 'Year2024'; + + case YEAR2025 = 'Year2025'; } diff --git a/src/Model/TeachersPensionAgeWarning.php b/src/Model/TeachersPensionAgeWarning.php index 3fc31f4..c154c33 100644 --- a/src/Model/TeachersPensionAgeWarning.php +++ b/src/Model/TeachersPensionAgeWarning.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/TeachersPensionDetails.php b/src/Model/TeachersPensionDetails.php index eb36e0c..818e225 100644 --- a/src/Model/TeachersPensionDetails.php +++ b/src/Model/TeachersPensionDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -62,9 +62,9 @@ class TeachersPensionDetails implements ModelInterface, ArrayAccess, JsonSeriali protected static array $openAPITypes = [ 'employmentType' => '\SynergiTech\Staffology\Model\TeachersPensionEmploymentType', 'fullTimeSalary' => 'int', - 'partTimeSalaryPaid' => 'int', 'mcrRoleId1' => 'string', 'mcrRoleId2' => 'string', + 'partTimeSalaryPaid' => 'int', 'teachersPensionAdminNiNumber' => 'string' ]; @@ -76,9 +76,9 @@ class TeachersPensionDetails implements ModelInterface, ArrayAccess, JsonSeriali protected static array $openAPIFormats = [ 'employmentType' => null, 'fullTimeSalary' => 'int32', - 'partTimeSalaryPaid' => 'int32', 'mcrRoleId1' => null, 'mcrRoleId2' => null, + 'partTimeSalaryPaid' => 'int32', 'teachersPensionAdminNiNumber' => null ]; @@ -90,9 +90,9 @@ class TeachersPensionDetails implements ModelInterface, ArrayAccess, JsonSeriali protected static array $openAPINullables = [ 'employmentType' => false, 'fullTimeSalary' => true, - 'partTimeSalaryPaid' => true, 'mcrRoleId1' => true, 'mcrRoleId2' => true, + 'partTimeSalaryPaid' => true, 'teachersPensionAdminNiNumber' => true ]; @@ -184,9 +184,9 @@ public function isNullableSetToNull(string $property): bool protected static array $attributeMap = [ 'employmentType' => 'employmentType', 'fullTimeSalary' => 'fullTimeSalary', - 'partTimeSalaryPaid' => 'partTimeSalaryPaid', 'mcrRoleId1' => 'mcrRoleId1', 'mcrRoleId2' => 'mcrRoleId2', + 'partTimeSalaryPaid' => 'partTimeSalaryPaid', 'teachersPensionAdminNiNumber' => 'teachersPensionAdminNiNumber' ]; @@ -198,9 +198,9 @@ public function isNullableSetToNull(string $property): bool protected static array $setters = [ 'employmentType' => 'setEmploymentType', 'fullTimeSalary' => 'setFullTimeSalary', - 'partTimeSalaryPaid' => 'setPartTimeSalaryPaid', 'mcrRoleId1' => 'setMcrRoleId1', 'mcrRoleId2' => 'setMcrRoleId2', + 'partTimeSalaryPaid' => 'setPartTimeSalaryPaid', 'teachersPensionAdminNiNumber' => 'setTeachersPensionAdminNiNumber' ]; @@ -212,9 +212,9 @@ public function isNullableSetToNull(string $property): bool protected static array $getters = [ 'employmentType' => 'getEmploymentType', 'fullTimeSalary' => 'getFullTimeSalary', - 'partTimeSalaryPaid' => 'getPartTimeSalaryPaid', 'mcrRoleId1' => 'getMcrRoleId1', 'mcrRoleId2' => 'getMcrRoleId2', + 'partTimeSalaryPaid' => 'getPartTimeSalaryPaid', 'teachersPensionAdminNiNumber' => 'getTeachersPensionAdminNiNumber' ]; @@ -276,9 +276,9 @@ public function __construct(?array $data = null) { $this->setIfExists('employmentType', $data ?? [], null); $this->setIfExists('fullTimeSalary', $data ?? [], null); - $this->setIfExists('partTimeSalaryPaid', $data ?? [], null); $this->setIfExists('mcrRoleId1', $data ?? [], null); $this->setIfExists('mcrRoleId2', $data ?? [], null); + $this->setIfExists('partTimeSalaryPaid', $data ?? [], null); $this->setIfExists('teachersPensionAdminNiNumber', $data ?? [], null); } @@ -397,40 +397,6 @@ public function setFullTimeSalary(?int $fullTimeSalary): static return $this; } - /** - * Gets partTimeSalaryPaid - * - * @return int|null - */ - public function getPartTimeSalaryPaid(): ?int - { - return $this->container['partTimeSalaryPaid']; - } - - /** - * Sets partTimeSalaryPaid - * - * @param int|null $partTimeSalaryPaid Up to 7 digits, in pounds. eg 24000 - * - * @return $this - */ - public function setPartTimeSalaryPaid(?int $partTimeSalaryPaid): static - { - if (is_null($partTimeSalaryPaid)) { - array_push($this->openAPINullablesSetToNull, 'partTimeSalaryPaid'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('partTimeSalaryPaid', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['partTimeSalaryPaid'] = $partTimeSalaryPaid; - - return $this; - } - /** * Gets mcrRoleId1 * @@ -507,6 +473,40 @@ public function setMcrRoleId2(?string $mcrRoleId2): static return $this; } + /** + * Gets partTimeSalaryPaid + * + * @return int|null + */ + public function getPartTimeSalaryPaid(): ?int + { + return $this->container['partTimeSalaryPaid']; + } + + /** + * Sets partTimeSalaryPaid + * + * @param int|null $partTimeSalaryPaid Up to 7 digits, in pounds. eg 24000 + * + * @return $this + */ + public function setPartTimeSalaryPaid(?int $partTimeSalaryPaid): static + { + if (is_null($partTimeSalaryPaid)) { + array_push($this->openAPINullablesSetToNull, 'partTimeSalaryPaid'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('partTimeSalaryPaid', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['partTimeSalaryPaid'] = $partTimeSalaryPaid; + + return $this; + } + /** * Gets teachersPensionAdminNiNumber * diff --git a/src/Model/TeachersPensionEmploymentType.php b/src/Model/TeachersPensionEmploymentType.php index 39e004e..6b7f3fe 100644 --- a/src/Model/TeachersPensionEmploymentType.php +++ b/src/Model/TeachersPensionEmploymentType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/TeachersPensionEoyLineItem.php b/src/Model/TeachersPensionEoyLineItem.php index 7f63366..9d7b8ac 100644 --- a/src/Model/TeachersPensionEoyLineItem.php +++ b/src/Model/TeachersPensionEoyLineItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class TeachersPensionEoyLineItem implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'tier' => 'float', - 'percentageRate' => 'float', 'contributorySalary' => 'float', + 'employersContributions' => 'float', + 'percentageRate' => 'float', 'teachersContributions' => 'float', - 'employersContributions' => 'float' + 'tier' => 'float' ]; /** @@ -72,11 +72,11 @@ class TeachersPensionEoyLineItem implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPIFormats = [ - 'tier' => 'double', - 'percentageRate' => 'double', 'contributorySalary' => 'double', + 'employersContributions' => 'double', + 'percentageRate' => 'double', 'teachersContributions' => 'double', - 'employersContributions' => 'double' + 'tier' => 'double' ]; /** @@ -85,11 +85,11 @@ class TeachersPensionEoyLineItem implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPINullables = [ - 'tier' => false, - 'percentageRate' => false, 'contributorySalary' => false, + 'employersContributions' => false, + 'percentageRate' => false, 'teachersContributions' => false, - 'employersContributions' => false + 'tier' => false ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'tier' => 'tier', - 'percentageRate' => 'percentageRate', 'contributorySalary' => 'contributorySalary', + 'employersContributions' => 'employersContributions', + 'percentageRate' => 'percentageRate', 'teachersContributions' => 'teachersContributions', - 'employersContributions' => 'employersContributions' + 'tier' => 'tier' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'tier' => 'setTier', - 'percentageRate' => 'setPercentageRate', 'contributorySalary' => 'setContributorySalary', + 'employersContributions' => 'setEmployersContributions', + 'percentageRate' => 'setPercentageRate', 'teachersContributions' => 'setTeachersContributions', - 'employersContributions' => 'setEmployersContributions' + 'tier' => 'setTier' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'tier' => 'getTier', - 'percentageRate' => 'getPercentageRate', 'contributorySalary' => 'getContributorySalary', + 'employersContributions' => 'getEmployersContributions', + 'percentageRate' => 'getPercentageRate', 'teachersContributions' => 'getTeachersContributions', - 'employersContributions' => 'getEmployersContributions' + 'tier' => 'getTier' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('tier', $data ?? [], null); - $this->setIfExists('percentageRate', $data ?? [], null); $this->setIfExists('contributorySalary', $data ?? [], null); - $this->setIfExists('teachersContributions', $data ?? [], null); $this->setIfExists('employersContributions', $data ?? [], null); + $this->setIfExists('percentageRate', $data ?? [], null); + $this->setIfExists('teachersContributions', $data ?? [], null); + $this->setIfExists('tier', $data ?? [], null); } /** @@ -317,82 +317,82 @@ public function valid(): bool /** - * Gets tier + * Gets contributorySalary * * @return float|null */ - public function getTier(): ?float + public function getContributorySalary(): ?float { - return $this->container['tier']; + return $this->container['contributorySalary']; } /** - * Sets tier + * Sets contributorySalary * - * @param float|null $tier tier + * @param float|null $contributorySalary contributorySalary * * @return $this */ - public function setTier(?float $tier): static + public function setContributorySalary(?float $contributorySalary): static { - if (is_null($tier)) { - throw new InvalidArgumentException('non-nullable tier cannot be null'); + if (is_null($contributorySalary)) { + throw new InvalidArgumentException('non-nullable contributorySalary cannot be null'); } - $this->container['tier'] = $tier; + $this->container['contributorySalary'] = $contributorySalary; return $this; } /** - * Gets percentageRate + * Gets employersContributions * * @return float|null */ - public function getPercentageRate(): ?float + public function getEmployersContributions(): ?float { - return $this->container['percentageRate']; + return $this->container['employersContributions']; } /** - * Sets percentageRate + * Sets employersContributions * - * @param float|null $percentageRate percentageRate + * @param float|null $employersContributions employersContributions * * @return $this */ - public function setPercentageRate(?float $percentageRate): static + public function setEmployersContributions(?float $employersContributions): static { - if (is_null($percentageRate)) { - throw new InvalidArgumentException('non-nullable percentageRate cannot be null'); + if (is_null($employersContributions)) { + throw new InvalidArgumentException('non-nullable employersContributions cannot be null'); } - $this->container['percentageRate'] = $percentageRate; + $this->container['employersContributions'] = $employersContributions; return $this; } /** - * Gets contributorySalary + * Gets percentageRate * * @return float|null */ - public function getContributorySalary(): ?float + public function getPercentageRate(): ?float { - return $this->container['contributorySalary']; + return $this->container['percentageRate']; } /** - * Sets contributorySalary + * Sets percentageRate * - * @param float|null $contributorySalary contributorySalary + * @param float|null $percentageRate percentageRate * * @return $this */ - public function setContributorySalary(?float $contributorySalary): static + public function setPercentageRate(?float $percentageRate): static { - if (is_null($contributorySalary)) { - throw new InvalidArgumentException('non-nullable contributorySalary cannot be null'); + if (is_null($percentageRate)) { + throw new InvalidArgumentException('non-nullable percentageRate cannot be null'); } - $this->container['contributorySalary'] = $contributorySalary; + $this->container['percentageRate'] = $percentageRate; return $this; } @@ -425,28 +425,28 @@ public function setTeachersContributions(?float $teachersContributions): static } /** - * Gets employersContributions + * Gets tier * * @return float|null */ - public function getEmployersContributions(): ?float + public function getTier(): ?float { - return $this->container['employersContributions']; + return $this->container['tier']; } /** - * Sets employersContributions + * Sets tier * - * @param float|null $employersContributions employersContributions + * @param float|null $tier tier * * @return $this */ - public function setEmployersContributions(?float $employersContributions): static + public function setTier(?float $tier): static { - if (is_null($employersContributions)) { - throw new InvalidArgumentException('non-nullable employersContributions cannot be null'); + if (is_null($tier)) { + throw new InvalidArgumentException('non-nullable tier cannot be null'); } - $this->container['employersContributions'] = $employersContributions; + $this->container['tier'] = $tier; return $this; } diff --git a/src/Model/TeachersPensionEoyReport.php b/src/Model/TeachersPensionEoyReport.php index e816ccd..a9cb538 100644 --- a/src/Model/TeachersPensionEoyReport.php +++ b/src/Model/TeachersPensionEoyReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,28 +59,28 @@ class TeachersPensionEoyReport implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPITypes = [ - 'pdfFileName' => 'string', - 'establishment' => '\SynergiTech\Staffology\Model\Establishment', - 'lineItems' => '\SynergiTech\Staffology\Model\TeachersPensionEoyLineItem[]', - 'careerAverageFlexibilities' => 'float', - 'additionalPensionPayments' => 'float', 'additionalContributions' => 'float', - 'teachersContributions' => 'float', - 'employersContributions' => 'float', - 'totalContributions' => 'float', + 'additionalPensionPayments' => 'float', + 'careerAverageFlexibilities' => 'float', 'efeArrears' => 'float', - 'prestonContributions' => 'float', - 'tr22ElectionAmounts' => 'float', - 'totalExtraContributions' => 'float', - 'overallBalance' => 'float', 'employersContributionPercentage' => 'float', - 'totalContributorySalary' => 'float', - 'totalTeachersContributions' => 'float', - 'totalEmployersContributions' => 'float', + 'employersContributions' => 'float', + 'establishment' => '\SynergiTech\Staffology\Model\Establishment', + 'isDraft' => 'bool', + 'lineItems' => '\SynergiTech\Staffology\Model\TeachersPensionEoyLineItem[]', + 'overallBalance' => 'float', + 'pdfFileName' => 'string', + 'prestonContributions' => 'float', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'teachersContributions' => 'float', 'title' => 'string', - 'isDraft' => 'bool' + 'totalContributions' => 'float', + 'totalContributorySalary' => 'float', + 'totalEmployersContributions' => 'float', + 'totalExtraContributions' => 'float', + 'totalTeachersContributions' => 'float', + 'tr22ElectionAmounts' => 'float' ]; /** @@ -89,28 +89,28 @@ class TeachersPensionEoyReport implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPIFormats = [ - 'pdfFileName' => null, - 'establishment' => null, - 'lineItems' => null, - 'careerAverageFlexibilities' => 'double', - 'additionalPensionPayments' => 'double', 'additionalContributions' => 'double', - 'teachersContributions' => 'double', - 'employersContributions' => 'double', - 'totalContributions' => 'double', + 'additionalPensionPayments' => 'double', + 'careerAverageFlexibilities' => 'double', 'efeArrears' => 'double', - 'prestonContributions' => 'double', - 'tr22ElectionAmounts' => 'double', - 'totalExtraContributions' => 'double', - 'overallBalance' => 'double', 'employersContributionPercentage' => 'double', - 'totalContributorySalary' => 'double', - 'totalTeachersContributions' => 'double', - 'totalEmployersContributions' => 'double', + 'employersContributions' => 'double', + 'establishment' => null, + 'isDraft' => null, + 'lineItems' => null, + 'overallBalance' => 'double', + 'pdfFileName' => null, + 'prestonContributions' => 'double', 'report' => null, 'taxYear' => null, + 'teachersContributions' => 'double', 'title' => null, - 'isDraft' => null + 'totalContributions' => 'double', + 'totalContributorySalary' => 'double', + 'totalEmployersContributions' => 'double', + 'totalExtraContributions' => 'double', + 'totalTeachersContributions' => 'double', + 'tr22ElectionAmounts' => 'double' ]; /** @@ -119,28 +119,28 @@ class TeachersPensionEoyReport implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPINullables = [ - 'pdfFileName' => true, - 'establishment' => false, - 'lineItems' => true, - 'careerAverageFlexibilities' => false, - 'additionalPensionPayments' => false, 'additionalContributions' => false, - 'teachersContributions' => false, - 'employersContributions' => false, - 'totalContributions' => false, + 'additionalPensionPayments' => false, + 'careerAverageFlexibilities' => false, 'efeArrears' => false, - 'prestonContributions' => false, - 'tr22ElectionAmounts' => false, - 'totalExtraContributions' => false, - 'overallBalance' => false, 'employersContributionPercentage' => false, - 'totalContributorySalary' => false, - 'totalTeachersContributions' => false, - 'totalEmployersContributions' => false, + 'employersContributions' => false, + 'establishment' => false, + 'isDraft' => false, + 'lineItems' => true, + 'overallBalance' => false, + 'pdfFileName' => true, + 'prestonContributions' => false, 'report' => false, 'taxYear' => false, + 'teachersContributions' => false, 'title' => true, - 'isDraft' => false + 'totalContributions' => false, + 'totalContributorySalary' => false, + 'totalEmployersContributions' => false, + 'totalExtraContributions' => false, + 'totalTeachersContributions' => false, + 'tr22ElectionAmounts' => false ]; /** @@ -229,28 +229,28 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'pdfFileName' => 'pdfFileName', - 'establishment' => 'establishment', - 'lineItems' => 'lineItems', - 'careerAverageFlexibilities' => 'careerAverageFlexibilities', - 'additionalPensionPayments' => 'additionalPensionPayments', 'additionalContributions' => 'additionalContributions', - 'teachersContributions' => 'teachersContributions', - 'employersContributions' => 'employersContributions', - 'totalContributions' => 'totalContributions', + 'additionalPensionPayments' => 'additionalPensionPayments', + 'careerAverageFlexibilities' => 'careerAverageFlexibilities', 'efeArrears' => 'efeArrears', - 'prestonContributions' => 'prestonContributions', - 'tr22ElectionAmounts' => 'tr22ElectionAmounts', - 'totalExtraContributions' => 'totalExtraContributions', - 'overallBalance' => 'overallBalance', 'employersContributionPercentage' => 'employersContributionPercentage', - 'totalContributorySalary' => 'totalContributorySalary', - 'totalTeachersContributions' => 'totalTeachersContributions', - 'totalEmployersContributions' => 'totalEmployersContributions', + 'employersContributions' => 'employersContributions', + 'establishment' => 'establishment', + 'isDraft' => 'isDraft', + 'lineItems' => 'lineItems', + 'overallBalance' => 'overallBalance', + 'pdfFileName' => 'pdfFileName', + 'prestonContributions' => 'prestonContributions', 'report' => 'report', 'taxYear' => 'taxYear', + 'teachersContributions' => 'teachersContributions', 'title' => 'title', - 'isDraft' => 'isDraft' + 'totalContributions' => 'totalContributions', + 'totalContributorySalary' => 'totalContributorySalary', + 'totalEmployersContributions' => 'totalEmployersContributions', + 'totalExtraContributions' => 'totalExtraContributions', + 'totalTeachersContributions' => 'totalTeachersContributions', + 'tr22ElectionAmounts' => 'tr22ElectionAmounts' ]; /** @@ -259,28 +259,28 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'pdfFileName' => 'setPdfFileName', - 'establishment' => 'setEstablishment', - 'lineItems' => 'setLineItems', - 'careerAverageFlexibilities' => 'setCareerAverageFlexibilities', - 'additionalPensionPayments' => 'setAdditionalPensionPayments', 'additionalContributions' => 'setAdditionalContributions', - 'teachersContributions' => 'setTeachersContributions', - 'employersContributions' => 'setEmployersContributions', - 'totalContributions' => 'setTotalContributions', + 'additionalPensionPayments' => 'setAdditionalPensionPayments', + 'careerAverageFlexibilities' => 'setCareerAverageFlexibilities', 'efeArrears' => 'setEfeArrears', - 'prestonContributions' => 'setPrestonContributions', - 'tr22ElectionAmounts' => 'setTr22ElectionAmounts', - 'totalExtraContributions' => 'setTotalExtraContributions', - 'overallBalance' => 'setOverallBalance', 'employersContributionPercentage' => 'setEmployersContributionPercentage', - 'totalContributorySalary' => 'setTotalContributorySalary', - 'totalTeachersContributions' => 'setTotalTeachersContributions', - 'totalEmployersContributions' => 'setTotalEmployersContributions', + 'employersContributions' => 'setEmployersContributions', + 'establishment' => 'setEstablishment', + 'isDraft' => 'setIsDraft', + 'lineItems' => 'setLineItems', + 'overallBalance' => 'setOverallBalance', + 'pdfFileName' => 'setPdfFileName', + 'prestonContributions' => 'setPrestonContributions', 'report' => 'setReport', 'taxYear' => 'setTaxYear', + 'teachersContributions' => 'setTeachersContributions', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'totalContributions' => 'setTotalContributions', + 'totalContributorySalary' => 'setTotalContributorySalary', + 'totalEmployersContributions' => 'setTotalEmployersContributions', + 'totalExtraContributions' => 'setTotalExtraContributions', + 'totalTeachersContributions' => 'setTotalTeachersContributions', + 'tr22ElectionAmounts' => 'setTr22ElectionAmounts' ]; /** @@ -289,28 +289,28 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'pdfFileName' => 'getPdfFileName', - 'establishment' => 'getEstablishment', - 'lineItems' => 'getLineItems', - 'careerAverageFlexibilities' => 'getCareerAverageFlexibilities', - 'additionalPensionPayments' => 'getAdditionalPensionPayments', 'additionalContributions' => 'getAdditionalContributions', - 'teachersContributions' => 'getTeachersContributions', - 'employersContributions' => 'getEmployersContributions', - 'totalContributions' => 'getTotalContributions', + 'additionalPensionPayments' => 'getAdditionalPensionPayments', + 'careerAverageFlexibilities' => 'getCareerAverageFlexibilities', 'efeArrears' => 'getEfeArrears', - 'prestonContributions' => 'getPrestonContributions', - 'tr22ElectionAmounts' => 'getTr22ElectionAmounts', - 'totalExtraContributions' => 'getTotalExtraContributions', - 'overallBalance' => 'getOverallBalance', 'employersContributionPercentage' => 'getEmployersContributionPercentage', - 'totalContributorySalary' => 'getTotalContributorySalary', - 'totalTeachersContributions' => 'getTotalTeachersContributions', - 'totalEmployersContributions' => 'getTotalEmployersContributions', + 'employersContributions' => 'getEmployersContributions', + 'establishment' => 'getEstablishment', + 'isDraft' => 'getIsDraft', + 'lineItems' => 'getLineItems', + 'overallBalance' => 'getOverallBalance', + 'pdfFileName' => 'getPdfFileName', + 'prestonContributions' => 'getPrestonContributions', 'report' => 'getReport', 'taxYear' => 'getTaxYear', + 'teachersContributions' => 'getTeachersContributions', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'totalContributions' => 'getTotalContributions', + 'totalContributorySalary' => 'getTotalContributorySalary', + 'totalEmployersContributions' => 'getTotalEmployersContributions', + 'totalExtraContributions' => 'getTotalExtraContributions', + 'totalTeachersContributions' => 'getTotalTeachersContributions', + 'tr22ElectionAmounts' => 'getTr22ElectionAmounts' ]; /** @@ -369,28 +369,28 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('pdfFileName', $data ?? [], null); - $this->setIfExists('establishment', $data ?? [], null); - $this->setIfExists('lineItems', $data ?? [], null); - $this->setIfExists('careerAverageFlexibilities', $data ?? [], null); - $this->setIfExists('additionalPensionPayments', $data ?? [], null); $this->setIfExists('additionalContributions', $data ?? [], null); - $this->setIfExists('teachersContributions', $data ?? [], null); - $this->setIfExists('employersContributions', $data ?? [], null); - $this->setIfExists('totalContributions', $data ?? [], null); + $this->setIfExists('additionalPensionPayments', $data ?? [], null); + $this->setIfExists('careerAverageFlexibilities', $data ?? [], null); $this->setIfExists('efeArrears', $data ?? [], null); - $this->setIfExists('prestonContributions', $data ?? [], null); - $this->setIfExists('tr22ElectionAmounts', $data ?? [], null); - $this->setIfExists('totalExtraContributions', $data ?? [], null); - $this->setIfExists('overallBalance', $data ?? [], null); $this->setIfExists('employersContributionPercentage', $data ?? [], null); - $this->setIfExists('totalContributorySalary', $data ?? [], null); - $this->setIfExists('totalTeachersContributions', $data ?? [], null); - $this->setIfExists('totalEmployersContributions', $data ?? [], null); + $this->setIfExists('employersContributions', $data ?? [], null); + $this->setIfExists('establishment', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('lineItems', $data ?? [], null); + $this->setIfExists('overallBalance', $data ?? [], null); + $this->setIfExists('pdfFileName', $data ?? [], null); + $this->setIfExists('prestonContributions', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); + $this->setIfExists('teachersContributions', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('totalContributions', $data ?? [], null); + $this->setIfExists('totalContributorySalary', $data ?? [], null); + $this->setIfExists('totalEmployersContributions', $data ?? [], null); + $this->setIfExists('totalExtraContributions', $data ?? [], null); + $this->setIfExists('totalTeachersContributions', $data ?? [], null); + $this->setIfExists('tr22ElectionAmounts', $data ?? [], null); } /** @@ -436,285 +436,312 @@ public function valid(): bool /** - * Gets pdfFileName + * Gets additionalContributions * - * @return string|null + * @return float|null */ - public function getPdfFileName(): ?string + public function getAdditionalContributions(): ?float { - return $this->container['pdfFileName']; + return $this->container['additionalContributions']; } /** - * Sets pdfFileName + * Sets additionalContributions * - * @param string|null $pdfFileName pdfFileName + * @param float|null $additionalContributions additionalContributions * * @return $this */ - public function setPdfFileName(?string $pdfFileName): static + public function setAdditionalContributions(?float $additionalContributions): static { - if (is_null($pdfFileName)) { - array_push($this->openAPINullablesSetToNull, 'pdfFileName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pdfFileName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($additionalContributions)) { + throw new InvalidArgumentException('non-nullable additionalContributions cannot be null'); } - $this->container['pdfFileName'] = $pdfFileName; + $this->container['additionalContributions'] = $additionalContributions; return $this; } /** - * Gets establishment + * Gets additionalPensionPayments * - * @return \SynergiTech\Staffology\Model\Establishment|null + * @return float|null */ - public function getEstablishment(): ?\SynergiTech\Staffology\Model\Establishment + public function getAdditionalPensionPayments(): ?float { - return $this->container['establishment']; + return $this->container['additionalPensionPayments']; } /** - * Sets establishment + * Sets additionalPensionPayments * - * @param \SynergiTech\Staffology\Model\Establishment|null $establishment establishment + * @param float|null $additionalPensionPayments additionalPensionPayments * * @return $this */ - public function setEstablishment(?\SynergiTech\Staffology\Model\Establishment $establishment): static + public function setAdditionalPensionPayments(?float $additionalPensionPayments): static { - if (is_null($establishment)) { - throw new InvalidArgumentException('non-nullable establishment cannot be null'); + if (is_null($additionalPensionPayments)) { + throw new InvalidArgumentException('non-nullable additionalPensionPayments cannot be null'); } - $this->container['establishment'] = $establishment; + $this->container['additionalPensionPayments'] = $additionalPensionPayments; return $this; } /** - * Gets lineItems + * Gets careerAverageFlexibilities * - * @return \SynergiTech\Staffology\Model\TeachersPensionEoyLineItem[]|null + * @return float|null */ - public function getLineItems(): ?array + public function getCareerAverageFlexibilities(): ?float { - return $this->container['lineItems']; + return $this->container['careerAverageFlexibilities']; } /** - * Sets lineItems + * Sets careerAverageFlexibilities * - * @param \SynergiTech\Staffology\Model\TeachersPensionEoyLineItem[]|null $lineItems lineItems + * @param float|null $careerAverageFlexibilities careerAverageFlexibilities * * @return $this */ - public function setLineItems(?array $lineItems): static + public function setCareerAverageFlexibilities(?float $careerAverageFlexibilities): static { - if (is_null($lineItems)) { - array_push($this->openAPINullablesSetToNull, 'lineItems'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lineItems', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($careerAverageFlexibilities)) { + throw new InvalidArgumentException('non-nullable careerAverageFlexibilities cannot be null'); } - $this->container['lineItems'] = $lineItems; + $this->container['careerAverageFlexibilities'] = $careerAverageFlexibilities; return $this; } /** - * Gets careerAverageFlexibilities + * Gets efeArrears * * @return float|null */ - public function getCareerAverageFlexibilities(): ?float + public function getEfeArrears(): ?float { - return $this->container['careerAverageFlexibilities']; + return $this->container['efeArrears']; } /** - * Sets careerAverageFlexibilities + * Sets efeArrears * - * @param float|null $careerAverageFlexibilities careerAverageFlexibilities + * @param float|null $efeArrears efeArrears * * @return $this */ - public function setCareerAverageFlexibilities(?float $careerAverageFlexibilities): static + public function setEfeArrears(?float $efeArrears): static { - if (is_null($careerAverageFlexibilities)) { - throw new InvalidArgumentException('non-nullable careerAverageFlexibilities cannot be null'); + if (is_null($efeArrears)) { + throw new InvalidArgumentException('non-nullable efeArrears cannot be null'); } - $this->container['careerAverageFlexibilities'] = $careerAverageFlexibilities; + $this->container['efeArrears'] = $efeArrears; return $this; } /** - * Gets additionalPensionPayments + * Gets employersContributionPercentage * * @return float|null */ - public function getAdditionalPensionPayments(): ?float + public function getEmployersContributionPercentage(): ?float { - return $this->container['additionalPensionPayments']; + return $this->container['employersContributionPercentage']; } /** - * Sets additionalPensionPayments + * Sets employersContributionPercentage * - * @param float|null $additionalPensionPayments additionalPensionPayments + * @param float|null $employersContributionPercentage employersContributionPercentage * * @return $this */ - public function setAdditionalPensionPayments(?float $additionalPensionPayments): static + public function setEmployersContributionPercentage(?float $employersContributionPercentage): static { - if (is_null($additionalPensionPayments)) { - throw new InvalidArgumentException('non-nullable additionalPensionPayments cannot be null'); + if (is_null($employersContributionPercentage)) { + throw new InvalidArgumentException('non-nullable employersContributionPercentage cannot be null'); } - $this->container['additionalPensionPayments'] = $additionalPensionPayments; + $this->container['employersContributionPercentage'] = $employersContributionPercentage; return $this; } /** - * Gets additionalContributions + * Gets employersContributions * * @return float|null */ - public function getAdditionalContributions(): ?float + public function getEmployersContributions(): ?float { - return $this->container['additionalContributions']; + return $this->container['employersContributions']; } /** - * Sets additionalContributions + * Sets employersContributions * - * @param float|null $additionalContributions additionalContributions + * @param float|null $employersContributions employersContributions * * @return $this */ - public function setAdditionalContributions(?float $additionalContributions): static + public function setEmployersContributions(?float $employersContributions): static { - if (is_null($additionalContributions)) { - throw new InvalidArgumentException('non-nullable additionalContributions cannot be null'); + if (is_null($employersContributions)) { + throw new InvalidArgumentException('non-nullable employersContributions cannot be null'); } - $this->container['additionalContributions'] = $additionalContributions; + $this->container['employersContributions'] = $employersContributions; return $this; } /** - * Gets teachersContributions + * Gets establishment * - * @return float|null + * @return \SynergiTech\Staffology\Model\Establishment|null */ - public function getTeachersContributions(): ?float + public function getEstablishment(): ?\SynergiTech\Staffology\Model\Establishment { - return $this->container['teachersContributions']; + return $this->container['establishment']; } /** - * Sets teachersContributions + * Sets establishment * - * @param float|null $teachersContributions teachersContributions + * @param \SynergiTech\Staffology\Model\Establishment|null $establishment establishment * * @return $this */ - public function setTeachersContributions(?float $teachersContributions): static + public function setEstablishment(?\SynergiTech\Staffology\Model\Establishment $establishment): static { - if (is_null($teachersContributions)) { - throw new InvalidArgumentException('non-nullable teachersContributions cannot be null'); + if (is_null($establishment)) { + throw new InvalidArgumentException('non-nullable establishment cannot be null'); } - $this->container['teachersContributions'] = $teachersContributions; + $this->container['establishment'] = $establishment; return $this; } /** - * Gets employersContributions + * Gets isDraft * - * @return float|null + * @return bool|null */ - public function getEmployersContributions(): ?float + public function getIsDraft(): ?bool { - return $this->container['employersContributions']; + return $this->container['isDraft']; } /** - * Sets employersContributions + * Sets isDraft * - * @param float|null $employersContributions employersContributions + * @param bool|null $isDraft isDraft * * @return $this */ - public function setEmployersContributions(?float $employersContributions): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($employersContributions)) { - throw new InvalidArgumentException('non-nullable employersContributions cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['employersContributions'] = $employersContributions; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets totalContributions + * Gets lineItems * - * @return float|null + * @return \SynergiTech\Staffology\Model\TeachersPensionEoyLineItem[]|null */ - public function getTotalContributions(): ?float + public function getLineItems(): ?array { - return $this->container['totalContributions']; + return $this->container['lineItems']; } /** - * Sets totalContributions + * Sets lineItems * - * @param float|null $totalContributions totalContributions + * @param \SynergiTech\Staffology\Model\TeachersPensionEoyLineItem[]|null $lineItems lineItems * * @return $this */ - public function setTotalContributions(?float $totalContributions): static + public function setLineItems(?array $lineItems): static { - if (is_null($totalContributions)) { - throw new InvalidArgumentException('non-nullable totalContributions cannot be null'); + if (is_null($lineItems)) { + array_push($this->openAPINullablesSetToNull, 'lineItems'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lineItems', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['totalContributions'] = $totalContributions; + $this->container['lineItems'] = $lineItems; return $this; } /** - * Gets efeArrears + * Gets overallBalance * * @return float|null */ - public function getEfeArrears(): ?float + public function getOverallBalance(): ?float { - return $this->container['efeArrears']; + return $this->container['overallBalance']; } /** - * Sets efeArrears + * Sets overallBalance * - * @param float|null $efeArrears efeArrears + * @param float|null $overallBalance overallBalance * * @return $this */ - public function setEfeArrears(?float $efeArrears): static + public function setOverallBalance(?float $overallBalance): static { - if (is_null($efeArrears)) { - throw new InvalidArgumentException('non-nullable efeArrears cannot be null'); + if (is_null($overallBalance)) { + throw new InvalidArgumentException('non-nullable overallBalance cannot be null'); } - $this->container['efeArrears'] = $efeArrears; + $this->container['overallBalance'] = $overallBalance; + + return $this; + } + + /** + * Gets pdfFileName + * + * @return string|null + */ + public function getPdfFileName(): ?string + { + return $this->container['pdfFileName']; + } + + /** + * Sets pdfFileName + * + * @param string|null $pdfFileName pdfFileName + * + * @return $this + */ + public function setPdfFileName(?string $pdfFileName): static + { + if (is_null($pdfFileName)) { + array_push($this->openAPINullablesSetToNull, 'pdfFileName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pdfFileName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['pdfFileName'] = $pdfFileName; return $this; } @@ -747,163 +774,170 @@ public function setPrestonContributions(?float $prestonContributions): static } /** - * Gets tr22ElectionAmounts + * Gets report * - * @return float|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getTr22ElectionAmounts(): ?float + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['tr22ElectionAmounts']; + return $this->container['report']; } /** - * Sets tr22ElectionAmounts + * Sets report * - * @param float|null $tr22ElectionAmounts tr22ElectionAmounts + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setTr22ElectionAmounts(?float $tr22ElectionAmounts): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($tr22ElectionAmounts)) { - throw new InvalidArgumentException('non-nullable tr22ElectionAmounts cannot be null'); + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['tr22ElectionAmounts'] = $tr22ElectionAmounts; + $this->container['report'] = $report; return $this; } /** - * Gets totalExtraContributions + * Gets taxYear * - * @return float|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getTotalExtraContributions(): ?float + public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['totalExtraContributions']; + return $this->container['taxYear']; } /** - * Sets totalExtraContributions + * Sets taxYear * - * @param float|null $totalExtraContributions totalExtraContributions + * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear * * @return $this */ - public function setTotalExtraContributions(?float $totalExtraContributions): static + public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static { - if (is_null($totalExtraContributions)) { - throw new InvalidArgumentException('non-nullable totalExtraContributions cannot be null'); + if (is_null($taxYear)) { + throw new InvalidArgumentException('non-nullable taxYear cannot be null'); } - $this->container['totalExtraContributions'] = $totalExtraContributions; + $this->container['taxYear'] = $taxYear; return $this; } /** - * Gets overallBalance + * Gets teachersContributions * * @return float|null */ - public function getOverallBalance(): ?float + public function getTeachersContributions(): ?float { - return $this->container['overallBalance']; + return $this->container['teachersContributions']; } /** - * Sets overallBalance + * Sets teachersContributions * - * @param float|null $overallBalance overallBalance + * @param float|null $teachersContributions teachersContributions * * @return $this */ - public function setOverallBalance(?float $overallBalance): static + public function setTeachersContributions(?float $teachersContributions): static { - if (is_null($overallBalance)) { - throw new InvalidArgumentException('non-nullable overallBalance cannot be null'); + if (is_null($teachersContributions)) { + throw new InvalidArgumentException('non-nullable teachersContributions cannot be null'); } - $this->container['overallBalance'] = $overallBalance; + $this->container['teachersContributions'] = $teachersContributions; return $this; } /** - * Gets employersContributionPercentage + * Gets title * - * @return float|null + * @return string|null */ - public function getEmployersContributionPercentage(): ?float + public function getTitle(): ?string { - return $this->container['employersContributionPercentage']; + return $this->container['title']; } /** - * Sets employersContributionPercentage + * Sets title * - * @param float|null $employersContributionPercentage employersContributionPercentage + * @param string|null $title title * * @return $this */ - public function setEmployersContributionPercentage(?float $employersContributionPercentage): static + public function setTitle(?string $title): static { - if (is_null($employersContributionPercentage)) { - throw new InvalidArgumentException('non-nullable employersContributionPercentage cannot be null'); + if (is_null($title)) { + array_push($this->openAPINullablesSetToNull, 'title'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('title', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employersContributionPercentage'] = $employersContributionPercentage; + $this->container['title'] = $title; return $this; } /** - * Gets totalContributorySalary + * Gets totalContributions * * @return float|null */ - public function getTotalContributorySalary(): ?float + public function getTotalContributions(): ?float { - return $this->container['totalContributorySalary']; + return $this->container['totalContributions']; } /** - * Sets totalContributorySalary + * Sets totalContributions * - * @param float|null $totalContributorySalary totalContributorySalary + * @param float|null $totalContributions totalContributions * * @return $this */ - public function setTotalContributorySalary(?float $totalContributorySalary): static + public function setTotalContributions(?float $totalContributions): static { - if (is_null($totalContributorySalary)) { - throw new InvalidArgumentException('non-nullable totalContributorySalary cannot be null'); + if (is_null($totalContributions)) { + throw new InvalidArgumentException('non-nullable totalContributions cannot be null'); } - $this->container['totalContributorySalary'] = $totalContributorySalary; + $this->container['totalContributions'] = $totalContributions; return $this; } /** - * Gets totalTeachersContributions + * Gets totalContributorySalary * * @return float|null */ - public function getTotalTeachersContributions(): ?float + public function getTotalContributorySalary(): ?float { - return $this->container['totalTeachersContributions']; + return $this->container['totalContributorySalary']; } /** - * Sets totalTeachersContributions + * Sets totalContributorySalary * - * @param float|null $totalTeachersContributions totalTeachersContributions + * @param float|null $totalContributorySalary totalContributorySalary * * @return $this */ - public function setTotalTeachersContributions(?float $totalTeachersContributions): static + public function setTotalContributorySalary(?float $totalContributorySalary): static { - if (is_null($totalTeachersContributions)) { - throw new InvalidArgumentException('non-nullable totalTeachersContributions cannot be null'); + if (is_null($totalContributorySalary)) { + throw new InvalidArgumentException('non-nullable totalContributorySalary cannot be null'); } - $this->container['totalTeachersContributions'] = $totalTeachersContributions; + $this->container['totalContributorySalary'] = $totalContributorySalary; return $this; } @@ -936,116 +970,82 @@ public function setTotalEmployersContributions(?float $totalEmployersContributio } /** - * Gets report - * - * @return \SynergiTech\Staffology\Model\Report|null - */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report - { - return $this->container['report']; - } - - /** - * Sets report - * - * @param \SynergiTech\Staffology\Model\Report|null $report report - * - * @return $this - */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static - { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); - } - $this->container['report'] = $report; - - return $this; - } - - /** - * Gets taxYear + * Gets totalExtraContributions * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return float|null */ - public function getTaxYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getTotalExtraContributions(): ?float { - return $this->container['taxYear']; + return $this->container['totalExtraContributions']; } /** - * Sets taxYear + * Sets totalExtraContributions * - * @param \SynergiTech\Staffology\Model\TaxYear|null $taxYear taxYear + * @param float|null $totalExtraContributions totalExtraContributions * * @return $this */ - public function setTaxYear(?\SynergiTech\Staffology\Model\TaxYear $taxYear): static + public function setTotalExtraContributions(?float $totalExtraContributions): static { - if (is_null($taxYear)) { - throw new InvalidArgumentException('non-nullable taxYear cannot be null'); + if (is_null($totalExtraContributions)) { + throw new InvalidArgumentException('non-nullable totalExtraContributions cannot be null'); } - $this->container['taxYear'] = $taxYear; + $this->container['totalExtraContributions'] = $totalExtraContributions; return $this; } /** - * Gets title + * Gets totalTeachersContributions * - * @return string|null + * @return float|null */ - public function getTitle(): ?string + public function getTotalTeachersContributions(): ?float { - return $this->container['title']; + return $this->container['totalTeachersContributions']; } /** - * Sets title + * Sets totalTeachersContributions * - * @param string|null $title title + * @param float|null $totalTeachersContributions totalTeachersContributions * * @return $this */ - public function setTitle(?string $title): static + public function setTotalTeachersContributions(?float $totalTeachersContributions): static { - if (is_null($title)) { - array_push($this->openAPINullablesSetToNull, 'title'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('title', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($totalTeachersContributions)) { + throw new InvalidArgumentException('non-nullable totalTeachersContributions cannot be null'); } - $this->container['title'] = $title; + $this->container['totalTeachersContributions'] = $totalTeachersContributions; return $this; } /** - * Gets isDraft + * Gets tr22ElectionAmounts * - * @return bool|null + * @return float|null */ - public function getIsDraft(): ?bool + public function getTr22ElectionAmounts(): ?float { - return $this->container['isDraft']; + return $this->container['tr22ElectionAmounts']; } /** - * Sets isDraft + * Sets tr22ElectionAmounts * - * @param bool|null $isDraft isDraft + * @param float|null $tr22ElectionAmounts tr22ElectionAmounts * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setTr22ElectionAmounts(?float $tr22ElectionAmounts): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($tr22ElectionAmounts)) { + throw new InvalidArgumentException('non-nullable tr22ElectionAmounts cannot be null'); } - $this->container['isDraft'] = $isDraft; + $this->container['tr22ElectionAmounts'] = $tr22ElectionAmounts; return $this; } diff --git a/src/Model/TeachersPensionEoyReportReportResponse.php b/src/Model/TeachersPensionEoyReportReportResponse.php index aabd88c..030fa91 100644 --- a/src/Model/TeachersPensionEoyReportReportResponse.php +++ b/src/Model/TeachersPensionEoyReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class TeachersPensionEoyReportReportResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\TeachersPensionEoyReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class TeachersPensionEoyReportReportResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class TeachersPensionEoyReportReportResponse implements ModelInterface, ArrayAcc * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/Tenant.php b/src/Model/Tenant.php index 91f763c..de3f2e2 100644 --- a/src/Model/Tenant.php +++ b/src/Model/Tenant.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,34 +60,35 @@ class Tenant implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'brandCode' => 'string', 'appName' => 'string', - 'homeUrl' => 'string', - 'headContent' => 'string', - 'logOutUrl' => 'string', - 'loginImgUrl' => 'string', - 'homeImgUrl' => 'string', - 'favIcon' => 'string', + 'approveNewUsers' => 'bool', + 'billingSettings' => '\SynergiTech\Staffology\Model\TenantBillingSettings', + 'brandCode' => 'string', 'cssColorsFile' => 'string', 'cssFile' => 'string', - 'mailingList' => 'bool', + 'disableEvc' => 'bool', + 'enableAdminsToManageReportWriter' => 'bool', + 'enableBureauFeatures' => 'bool', + 'enableReportWriterFeature' => 'bool', + 'favIcon' => 'string', + 'headContent' => 'string', + 'helpUrl' => 'string', + 'homeImgUrl' => 'string', + 'homeUrl' => 'string', 'htmlInsertions' => '\SynergiTech\Staffology\Model\TenantHtmlInsertion[]', + 'id' => 'string', + 'logOutUrl' => 'string', + 'loginImgUrl' => 'string', 'mailSettings' => '\SynergiTech\Staffology\Model\MailSettings', - 'signupUrl' => 'string', - 'termsUrl' => 'string', - 'helpUrl' => 'string', - 'supportEmail' => 'string', + 'mailingList' => 'bool', 'newUserSignupEmail' => 'string', - 'approveNewUsers' => 'bool', - 'enableBureauFeatures' => 'bool', 'requireDdMandateBeforeAllowingBillableActivity' => 'bool', - 'whiteLabelMode' => 'bool', - 'enableReportWriterFeature' => 'bool', - 'disableEvc' => 'bool', + 'signupUrl' => 'string', + 'supportEmail' => 'string', 'tenantOwnsBilling' => 'bool', - 'billingSettings' => '\SynergiTech\Staffology\Model\TenantBillingSettings', + 'termsUrl' => 'string', 'usersCanManageAccountSecuritySettings' => 'bool', - 'id' => 'string' + 'whiteLabelMode' => 'bool' ]; /** @@ -96,34 +97,35 @@ class Tenant implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'brandCode' => null, 'appName' => null, - 'homeUrl' => null, - 'headContent' => null, - 'logOutUrl' => null, - 'loginImgUrl' => null, - 'homeImgUrl' => null, - 'favIcon' => null, + 'approveNewUsers' => null, + 'billingSettings' => null, + 'brandCode' => null, 'cssColorsFile' => null, 'cssFile' => null, - 'mailingList' => null, + 'disableEvc' => null, + 'enableAdminsToManageReportWriter' => null, + 'enableBureauFeatures' => null, + 'enableReportWriterFeature' => null, + 'favIcon' => null, + 'headContent' => null, + 'helpUrl' => null, + 'homeImgUrl' => null, + 'homeUrl' => null, 'htmlInsertions' => null, + 'id' => 'uuid', + 'logOutUrl' => null, + 'loginImgUrl' => null, 'mailSettings' => null, - 'signupUrl' => null, - 'termsUrl' => null, - 'helpUrl' => null, - 'supportEmail' => 'email', + 'mailingList' => null, 'newUserSignupEmail' => 'email', - 'approveNewUsers' => null, - 'enableBureauFeatures' => null, 'requireDdMandateBeforeAllowingBillableActivity' => null, - 'whiteLabelMode' => null, - 'enableReportWriterFeature' => null, - 'disableEvc' => null, + 'signupUrl' => null, + 'supportEmail' => 'email', 'tenantOwnsBilling' => null, - 'billingSettings' => null, + 'termsUrl' => null, 'usersCanManageAccountSecuritySettings' => null, - 'id' => 'uuid' + 'whiteLabelMode' => null ]; /** @@ -132,34 +134,35 @@ class Tenant implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'brandCode' => true, 'appName' => true, - 'homeUrl' => true, - 'headContent' => true, - 'logOutUrl' => true, - 'loginImgUrl' => true, - 'homeImgUrl' => true, - 'favIcon' => true, + 'approveNewUsers' => false, + 'billingSettings' => false, + 'brandCode' => true, 'cssColorsFile' => true, 'cssFile' => true, - 'mailingList' => false, + 'disableEvc' => false, + 'enableAdminsToManageReportWriter' => false, + 'enableBureauFeatures' => false, + 'enableReportWriterFeature' => false, + 'favIcon' => true, + 'headContent' => true, + 'helpUrl' => true, + 'homeImgUrl' => true, + 'homeUrl' => true, 'htmlInsertions' => true, + 'id' => false, + 'logOutUrl' => true, + 'loginImgUrl' => true, 'mailSettings' => false, - 'signupUrl' => true, - 'termsUrl' => true, - 'helpUrl' => true, - 'supportEmail' => true, + 'mailingList' => false, 'newUserSignupEmail' => true, - 'approveNewUsers' => false, - 'enableBureauFeatures' => false, 'requireDdMandateBeforeAllowingBillableActivity' => false, - 'whiteLabelMode' => false, - 'enableReportWriterFeature' => false, - 'disableEvc' => false, + 'signupUrl' => true, + 'supportEmail' => true, 'tenantOwnsBilling' => false, - 'billingSettings' => false, + 'termsUrl' => true, 'usersCanManageAccountSecuritySettings' => false, - 'id' => false + 'whiteLabelMode' => false ]; /** @@ -248,34 +251,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'brandCode' => 'brandCode', 'appName' => 'appName', - 'homeUrl' => 'homeUrl', - 'headContent' => 'headContent', - 'logOutUrl' => 'logOutUrl', - 'loginImgUrl' => 'loginImgUrl', - 'homeImgUrl' => 'homeImgUrl', - 'favIcon' => 'favIcon', + 'approveNewUsers' => 'approveNewUsers', + 'billingSettings' => 'billingSettings', + 'brandCode' => 'brandCode', 'cssColorsFile' => 'cssColorsFile', 'cssFile' => 'cssFile', - 'mailingList' => 'mailingList', + 'disableEvc' => 'disableEvc', + 'enableAdminsToManageReportWriter' => 'enableAdminsToManageReportWriter', + 'enableBureauFeatures' => 'enableBureauFeatures', + 'enableReportWriterFeature' => 'enableReportWriterFeature', + 'favIcon' => 'favIcon', + 'headContent' => 'headContent', + 'helpUrl' => 'helpUrl', + 'homeImgUrl' => 'homeImgUrl', + 'homeUrl' => 'homeUrl', 'htmlInsertions' => 'htmlInsertions', + 'id' => 'id', + 'logOutUrl' => 'logOutUrl', + 'loginImgUrl' => 'loginImgUrl', 'mailSettings' => 'mailSettings', - 'signupUrl' => 'signupUrl', - 'termsUrl' => 'termsUrl', - 'helpUrl' => 'helpUrl', - 'supportEmail' => 'supportEmail', + 'mailingList' => 'mailingList', 'newUserSignupEmail' => 'newUserSignupEmail', - 'approveNewUsers' => 'approveNewUsers', - 'enableBureauFeatures' => 'enableBureauFeatures', 'requireDdMandateBeforeAllowingBillableActivity' => 'requireDdMandateBeforeAllowingBillableActivity', - 'whiteLabelMode' => 'whiteLabelMode', - 'enableReportWriterFeature' => 'enableReportWriterFeature', - 'disableEvc' => 'disableEvc', + 'signupUrl' => 'signupUrl', + 'supportEmail' => 'supportEmail', 'tenantOwnsBilling' => 'tenantOwnsBilling', - 'billingSettings' => 'billingSettings', + 'termsUrl' => 'termsUrl', 'usersCanManageAccountSecuritySettings' => 'usersCanManageAccountSecuritySettings', - 'id' => 'id' + 'whiteLabelMode' => 'whiteLabelMode' ]; /** @@ -284,34 +288,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'brandCode' => 'setBrandCode', 'appName' => 'setAppName', - 'homeUrl' => 'setHomeUrl', - 'headContent' => 'setHeadContent', - 'logOutUrl' => 'setLogOutUrl', - 'loginImgUrl' => 'setLoginImgUrl', - 'homeImgUrl' => 'setHomeImgUrl', - 'favIcon' => 'setFavIcon', + 'approveNewUsers' => 'setApproveNewUsers', + 'billingSettings' => 'setBillingSettings', + 'brandCode' => 'setBrandCode', 'cssColorsFile' => 'setCssColorsFile', 'cssFile' => 'setCssFile', - 'mailingList' => 'setMailingList', + 'disableEvc' => 'setDisableEvc', + 'enableAdminsToManageReportWriter' => 'setEnableAdminsToManageReportWriter', + 'enableBureauFeatures' => 'setEnableBureauFeatures', + 'enableReportWriterFeature' => 'setEnableReportWriterFeature', + 'favIcon' => 'setFavIcon', + 'headContent' => 'setHeadContent', + 'helpUrl' => 'setHelpUrl', + 'homeImgUrl' => 'setHomeImgUrl', + 'homeUrl' => 'setHomeUrl', 'htmlInsertions' => 'setHtmlInsertions', + 'id' => 'setId', + 'logOutUrl' => 'setLogOutUrl', + 'loginImgUrl' => 'setLoginImgUrl', 'mailSettings' => 'setMailSettings', - 'signupUrl' => 'setSignupUrl', - 'termsUrl' => 'setTermsUrl', - 'helpUrl' => 'setHelpUrl', - 'supportEmail' => 'setSupportEmail', + 'mailingList' => 'setMailingList', 'newUserSignupEmail' => 'setNewUserSignupEmail', - 'approveNewUsers' => 'setApproveNewUsers', - 'enableBureauFeatures' => 'setEnableBureauFeatures', 'requireDdMandateBeforeAllowingBillableActivity' => 'setRequireDdMandateBeforeAllowingBillableActivity', - 'whiteLabelMode' => 'setWhiteLabelMode', - 'enableReportWriterFeature' => 'setEnableReportWriterFeature', - 'disableEvc' => 'setDisableEvc', + 'signupUrl' => 'setSignupUrl', + 'supportEmail' => 'setSupportEmail', 'tenantOwnsBilling' => 'setTenantOwnsBilling', - 'billingSettings' => 'setBillingSettings', + 'termsUrl' => 'setTermsUrl', 'usersCanManageAccountSecuritySettings' => 'setUsersCanManageAccountSecuritySettings', - 'id' => 'setId' + 'whiteLabelMode' => 'setWhiteLabelMode' ]; /** @@ -320,34 +325,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'brandCode' => 'getBrandCode', 'appName' => 'getAppName', - 'homeUrl' => 'getHomeUrl', - 'headContent' => 'getHeadContent', - 'logOutUrl' => 'getLogOutUrl', - 'loginImgUrl' => 'getLoginImgUrl', - 'homeImgUrl' => 'getHomeImgUrl', - 'favIcon' => 'getFavIcon', + 'approveNewUsers' => 'getApproveNewUsers', + 'billingSettings' => 'getBillingSettings', + 'brandCode' => 'getBrandCode', 'cssColorsFile' => 'getCssColorsFile', 'cssFile' => 'getCssFile', - 'mailingList' => 'getMailingList', + 'disableEvc' => 'getDisableEvc', + 'enableAdminsToManageReportWriter' => 'getEnableAdminsToManageReportWriter', + 'enableBureauFeatures' => 'getEnableBureauFeatures', + 'enableReportWriterFeature' => 'getEnableReportWriterFeature', + 'favIcon' => 'getFavIcon', + 'headContent' => 'getHeadContent', + 'helpUrl' => 'getHelpUrl', + 'homeImgUrl' => 'getHomeImgUrl', + 'homeUrl' => 'getHomeUrl', 'htmlInsertions' => 'getHtmlInsertions', + 'id' => 'getId', + 'logOutUrl' => 'getLogOutUrl', + 'loginImgUrl' => 'getLoginImgUrl', 'mailSettings' => 'getMailSettings', - 'signupUrl' => 'getSignupUrl', - 'termsUrl' => 'getTermsUrl', - 'helpUrl' => 'getHelpUrl', - 'supportEmail' => 'getSupportEmail', + 'mailingList' => 'getMailingList', 'newUserSignupEmail' => 'getNewUserSignupEmail', - 'approveNewUsers' => 'getApproveNewUsers', - 'enableBureauFeatures' => 'getEnableBureauFeatures', 'requireDdMandateBeforeAllowingBillableActivity' => 'getRequireDdMandateBeforeAllowingBillableActivity', - 'whiteLabelMode' => 'getWhiteLabelMode', - 'enableReportWriterFeature' => 'getEnableReportWriterFeature', - 'disableEvc' => 'getDisableEvc', + 'signupUrl' => 'getSignupUrl', + 'supportEmail' => 'getSupportEmail', 'tenantOwnsBilling' => 'getTenantOwnsBilling', - 'billingSettings' => 'getBillingSettings', + 'termsUrl' => 'getTermsUrl', 'usersCanManageAccountSecuritySettings' => 'getUsersCanManageAccountSecuritySettings', - 'id' => 'getId' + 'whiteLabelMode' => 'getWhiteLabelMode' ]; /** @@ -406,34 +412,35 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('brandCode', $data ?? [], null); $this->setIfExists('appName', $data ?? [], null); - $this->setIfExists('homeUrl', $data ?? [], null); - $this->setIfExists('headContent', $data ?? [], null); - $this->setIfExists('logOutUrl', $data ?? [], null); - $this->setIfExists('loginImgUrl', $data ?? [], null); - $this->setIfExists('homeImgUrl', $data ?? [], null); - $this->setIfExists('favIcon', $data ?? [], null); + $this->setIfExists('approveNewUsers', $data ?? [], null); + $this->setIfExists('billingSettings', $data ?? [], null); + $this->setIfExists('brandCode', $data ?? [], null); $this->setIfExists('cssColorsFile', $data ?? [], null); $this->setIfExists('cssFile', $data ?? [], null); - $this->setIfExists('mailingList', $data ?? [], null); + $this->setIfExists('disableEvc', $data ?? [], null); + $this->setIfExists('enableAdminsToManageReportWriter', $data ?? [], null); + $this->setIfExists('enableBureauFeatures', $data ?? [], null); + $this->setIfExists('enableReportWriterFeature', $data ?? [], null); + $this->setIfExists('favIcon', $data ?? [], null); + $this->setIfExists('headContent', $data ?? [], null); + $this->setIfExists('helpUrl', $data ?? [], null); + $this->setIfExists('homeImgUrl', $data ?? [], null); + $this->setIfExists('homeUrl', $data ?? [], null); $this->setIfExists('htmlInsertions', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('logOutUrl', $data ?? [], null); + $this->setIfExists('loginImgUrl', $data ?? [], null); $this->setIfExists('mailSettings', $data ?? [], null); - $this->setIfExists('signupUrl', $data ?? [], null); - $this->setIfExists('termsUrl', $data ?? [], null); - $this->setIfExists('helpUrl', $data ?? [], null); - $this->setIfExists('supportEmail', $data ?? [], null); + $this->setIfExists('mailingList', $data ?? [], null); $this->setIfExists('newUserSignupEmail', $data ?? [], null); - $this->setIfExists('approveNewUsers', $data ?? [], null); - $this->setIfExists('enableBureauFeatures', $data ?? [], null); $this->setIfExists('requireDdMandateBeforeAllowingBillableActivity', $data ?? [], null); - $this->setIfExists('whiteLabelMode', $data ?? [], null); - $this->setIfExists('enableReportWriterFeature', $data ?? [], null); - $this->setIfExists('disableEvc', $data ?? [], null); + $this->setIfExists('signupUrl', $data ?? [], null); + $this->setIfExists('supportEmail', $data ?? [], null); $this->setIfExists('tenantOwnsBilling', $data ?? [], null); - $this->setIfExists('billingSettings', $data ?? [], null); + $this->setIfExists('termsUrl', $data ?? [], null); $this->setIfExists('usersCanManageAccountSecuritySettings', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('whiteLabelMode', $data ?? [], null); } /** @@ -467,30 +474,30 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'brandCode', the character length must be smaller than or equal to 100."; } + if (!is_null($this->container['helpUrl']) && (mb_strlen($this->container['helpUrl']) > 250)) { + $invalidProperties[] = "invalid value for 'helpUrl', the character length must be smaller than or equal to 250."; + } + if (!is_null($this->container['logOutUrl']) && (mb_strlen($this->container['logOutUrl']) > 150)) { $invalidProperties[] = "invalid value for 'logOutUrl', the character length must be smaller than or equal to 150."; } + if (!is_null($this->container['newUserSignupEmail']) && (mb_strlen($this->container['newUserSignupEmail']) > 150)) { + $invalidProperties[] = "invalid value for 'newUserSignupEmail', the character length must be smaller than or equal to 150."; + } + if (!is_null($this->container['signupUrl']) && (mb_strlen($this->container['signupUrl']) > 150)) { $invalidProperties[] = "invalid value for 'signupUrl', the character length must be smaller than or equal to 150."; } + if (!is_null($this->container['supportEmail']) && (mb_strlen($this->container['supportEmail']) > 150)) { + $invalidProperties[] = "invalid value for 'supportEmail', the character length must be smaller than or equal to 150."; + } + if (!is_null($this->container['termsUrl']) && (mb_strlen($this->container['termsUrl']) > 150)) { $invalidProperties[] = "invalid value for 'termsUrl', the character length must be smaller than or equal to 150."; } - if (!is_null($this->container['helpUrl']) && (mb_strlen($this->container['helpUrl']) > 250)) { - $invalidProperties[] = "invalid value for 'helpUrl', the character length must be smaller than or equal to 250."; - } - - if (!is_null($this->container['supportEmail']) && (mb_strlen($this->container['supportEmail']) > 150)) { - $invalidProperties[] = "invalid value for 'supportEmail', the character length must be smaller than or equal to 150."; - } - - if (!is_null($this->container['newUserSignupEmail']) && (mb_strlen($this->container['newUserSignupEmail']) > 150)) { - $invalidProperties[] = "invalid value for 'newUserSignupEmail', the character length must be smaller than or equal to 150."; - } - return $invalidProperties; } @@ -507,789 +514,805 @@ public function valid(): bool /** - * Gets brandCode + * Gets appName * * @return string|null */ - public function getBrandCode(): ?string + public function getAppName(): ?string { - return $this->container['brandCode']; + return $this->container['appName']; } /** - * Sets brandCode + * Sets appName * - * @param string|null $brandCode [readonly] + * @param string|null $appName appName * * @return $this */ - public function setBrandCode(?string $brandCode): static + public function setAppName(?string $appName): static { - if (is_null($brandCode)) { - array_push($this->openAPINullablesSetToNull, 'brandCode'); + if (is_null($appName)) { + array_push($this->openAPINullablesSetToNull, 'appName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('brandCode', $nullablesSetToNull); + $index = array_search('appName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($brandCode) && (mb_strlen($brandCode) > 100)) { - throw new InvalidArgumentException('invalid length for $brandCode when calling Tenant., must be smaller than or equal to 100.'); - } - - $this->container['brandCode'] = $brandCode; + $this->container['appName'] = $appName; return $this; } /** - * Gets appName + * Gets approveNewUsers * - * @return string|null + * @return bool|null */ - public function getAppName(): ?string + public function getApproveNewUsers(): ?bool { - return $this->container['appName']; + return $this->container['approveNewUsers']; } /** - * Sets appName + * Sets approveNewUsers * - * @param string|null $appName appName + * @param bool|null $approveNewUsers approveNewUsers * * @return $this */ - public function setAppName(?string $appName): static + public function setApproveNewUsers(?bool $approveNewUsers): static { - if (is_null($appName)) { - array_push($this->openAPINullablesSetToNull, 'appName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('appName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($approveNewUsers)) { + throw new InvalidArgumentException('non-nullable approveNewUsers cannot be null'); } - $this->container['appName'] = $appName; + $this->container['approveNewUsers'] = $approveNewUsers; return $this; } /** - * Gets homeUrl + * Gets billingSettings * - * @return string|null + * @return \SynergiTech\Staffology\Model\TenantBillingSettings|null */ - public function getHomeUrl(): ?string + public function getBillingSettings(): ?\SynergiTech\Staffology\Model\TenantBillingSettings { - return $this->container['homeUrl']; + return $this->container['billingSettings']; } /** - * Sets homeUrl + * Sets billingSettings * - * @param string|null $homeUrl homeUrl + * @param \SynergiTech\Staffology\Model\TenantBillingSettings|null $billingSettings billingSettings * * @return $this */ - public function setHomeUrl(?string $homeUrl): static + public function setBillingSettings(?\SynergiTech\Staffology\Model\TenantBillingSettings $billingSettings): static { - if (is_null($homeUrl)) { - array_push($this->openAPINullablesSetToNull, 'homeUrl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('homeUrl', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($billingSettings)) { + throw new InvalidArgumentException('non-nullable billingSettings cannot be null'); } - $this->container['homeUrl'] = $homeUrl; + $this->container['billingSettings'] = $billingSettings; return $this; } /** - * Gets headContent + * Gets brandCode * * @return string|null */ - public function getHeadContent(): ?string + public function getBrandCode(): ?string { - return $this->container['headContent']; + return $this->container['brandCode']; } /** - * Sets headContent + * Sets brandCode * - * @param string|null $headContent headContent + * @param string|null $brandCode [readonly] * * @return $this */ - public function setHeadContent(?string $headContent): static + public function setBrandCode(?string $brandCode): static { - if (is_null($headContent)) { - array_push($this->openAPINullablesSetToNull, 'headContent'); + if (is_null($brandCode)) { + array_push($this->openAPINullablesSetToNull, 'brandCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('headContent', $nullablesSetToNull); + $index = array_search('brandCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['headContent'] = $headContent; + if (!is_null($brandCode) && (mb_strlen($brandCode) > 100)) { + throw new InvalidArgumentException('invalid length for $brandCode when calling Tenant., must be smaller than or equal to 100.'); + } + + $this->container['brandCode'] = $brandCode; return $this; } /** - * Gets logOutUrl + * Gets cssColorsFile * * @return string|null */ - public function getLogOutUrl(): ?string + public function getCssColorsFile(): ?string { - return $this->container['logOutUrl']; + return $this->container['cssColorsFile']; } /** - * Sets logOutUrl + * Sets cssColorsFile * - * @param string|null $logOutUrl logOutUrl + * @param string|null $cssColorsFile [readonly] * * @return $this */ - public function setLogOutUrl(?string $logOutUrl): static + public function setCssColorsFile(?string $cssColorsFile): static { - if (is_null($logOutUrl)) { - array_push($this->openAPINullablesSetToNull, 'logOutUrl'); + if (is_null($cssColorsFile)) { + array_push($this->openAPINullablesSetToNull, 'cssColorsFile'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('logOutUrl', $nullablesSetToNull); + $index = array_search('cssColorsFile', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($logOutUrl) && (mb_strlen($logOutUrl) > 150)) { - throw new InvalidArgumentException('invalid length for $logOutUrl when calling Tenant., must be smaller than or equal to 150.'); - } - - $this->container['logOutUrl'] = $logOutUrl; + $this->container['cssColorsFile'] = $cssColorsFile; return $this; } /** - * Gets loginImgUrl + * Gets cssFile * * @return string|null */ - public function getLoginImgUrl(): ?string + public function getCssFile(): ?string { - return $this->container['loginImgUrl']; + return $this->container['cssFile']; } /** - * Sets loginImgUrl + * Sets cssFile * - * @param string|null $loginImgUrl [readonly] + * @param string|null $cssFile [readonly] * * @return $this */ - public function setLoginImgUrl(?string $loginImgUrl): static + public function setCssFile(?string $cssFile): static { - if (is_null($loginImgUrl)) { - array_push($this->openAPINullablesSetToNull, 'loginImgUrl'); + if (is_null($cssFile)) { + array_push($this->openAPINullablesSetToNull, 'cssFile'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('loginImgUrl', $nullablesSetToNull); + $index = array_search('cssFile', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['loginImgUrl'] = $loginImgUrl; + $this->container['cssFile'] = $cssFile; return $this; } /** - * Gets homeImgUrl + * Gets disableEvc * - * @return string|null + * @return bool|null */ - public function getHomeImgUrl(): ?string + public function getDisableEvc(): ?bool { - return $this->container['homeImgUrl']; + return $this->container['disableEvc']; } /** - * Sets homeImgUrl + * Sets disableEvc * - * @param string|null $homeImgUrl [readonly] + * @param bool|null $disableEvc Indicates whether FPS should be submitted to EVC for employees/employers under this tenant. * * @return $this */ - public function setHomeImgUrl(?string $homeImgUrl): static + public function setDisableEvc(?bool $disableEvc): static { - if (is_null($homeImgUrl)) { - array_push($this->openAPINullablesSetToNull, 'homeImgUrl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('homeImgUrl', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($disableEvc)) { + throw new InvalidArgumentException('non-nullable disableEvc cannot be null'); } - $this->container['homeImgUrl'] = $homeImgUrl; + $this->container['disableEvc'] = $disableEvc; return $this; } /** - * Gets favIcon + * Gets enableAdminsToManageReportWriter * - * @return string|null + * @return bool|null */ - public function getFavIcon(): ?string + public function getEnableAdminsToManageReportWriter(): ?bool { - return $this->container['favIcon']; + return $this->container['enableAdminsToManageReportWriter']; } /** - * Sets favIcon + * Sets enableAdminsToManageReportWriter * - * @param string|null $favIcon [readonly] + * @param bool|null $enableAdminsToManageReportWriter Indicates whether all Admin users of a tenant can manage report templates. * * @return $this */ - public function setFavIcon(?string $favIcon): static + public function setEnableAdminsToManageReportWriter(?bool $enableAdminsToManageReportWriter): static { - if (is_null($favIcon)) { - array_push($this->openAPINullablesSetToNull, 'favIcon'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('favIcon', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($enableAdminsToManageReportWriter)) { + throw new InvalidArgumentException('non-nullable enableAdminsToManageReportWriter cannot be null'); } - $this->container['favIcon'] = $favIcon; + $this->container['enableAdminsToManageReportWriter'] = $enableAdminsToManageReportWriter; return $this; } /** - * Gets cssColorsFile + * Gets enableBureauFeatures * - * @return string|null + * @return bool|null */ - public function getCssColorsFile(): ?string + public function getEnableBureauFeatures(): ?bool { - return $this->container['cssColorsFile']; + return $this->container['enableBureauFeatures']; } /** - * Sets cssColorsFile + * Sets enableBureauFeatures * - * @param string|null $cssColorsFile [readonly] + * @param bool|null $enableBureauFeatures enableBureauFeatures * * @return $this */ - public function setCssColorsFile(?string $cssColorsFile): static + public function setEnableBureauFeatures(?bool $enableBureauFeatures): static { - if (is_null($cssColorsFile)) { - array_push($this->openAPINullablesSetToNull, 'cssColorsFile'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cssColorsFile', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($enableBureauFeatures)) { + throw new InvalidArgumentException('non-nullable enableBureauFeatures cannot be null'); } - $this->container['cssColorsFile'] = $cssColorsFile; + $this->container['enableBureauFeatures'] = $enableBureauFeatures; return $this; } /** - * Gets cssFile + * Gets enableReportWriterFeature * - * @return string|null + * @return bool|null */ - public function getCssFile(): ?string + public function getEnableReportWriterFeature(): ?bool { - return $this->container['cssFile']; + return $this->container['enableReportWriterFeature']; } /** - * Sets cssFile + * Sets enableReportWriterFeature * - * @param string|null $cssFile [readonly] + * @param bool|null $enableReportWriterFeature Indicates if the Report Writer feature is enabled for the tenant. * * @return $this */ - public function setCssFile(?string $cssFile): static + public function setEnableReportWriterFeature(?bool $enableReportWriterFeature): static { - if (is_null($cssFile)) { - array_push($this->openAPINullablesSetToNull, 'cssFile'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cssFile', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($enableReportWriterFeature)) { + throw new InvalidArgumentException('non-nullable enableReportWriterFeature cannot be null'); } - $this->container['cssFile'] = $cssFile; + $this->container['enableReportWriterFeature'] = $enableReportWriterFeature; return $this; } /** - * Gets mailingList + * Gets favIcon * - * @return bool|null + * @return string|null */ - public function getMailingList(): ?bool + public function getFavIcon(): ?string { - return $this->container['mailingList']; + return $this->container['favIcon']; } /** - * Sets mailingList + * Sets favIcon * - * @param bool|null $mailingList mailingList + * @param string|null $favIcon [readonly] * * @return $this */ - public function setMailingList(?bool $mailingList): static + public function setFavIcon(?string $favIcon): static { - if (is_null($mailingList)) { - throw new InvalidArgumentException('non-nullable mailingList cannot be null'); + if (is_null($favIcon)) { + array_push($this->openAPINullablesSetToNull, 'favIcon'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('favIcon', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['mailingList'] = $mailingList; + $this->container['favIcon'] = $favIcon; return $this; } /** - * Gets htmlInsertions + * Gets headContent * - * @return \SynergiTech\Staffology\Model\TenantHtmlInsertion[]|null + * @return string|null */ - public function getHtmlInsertions(): ?array + public function getHeadContent(): ?string { - return $this->container['htmlInsertions']; + return $this->container['headContent']; } /** - * Sets htmlInsertions + * Sets headContent * - * @param \SynergiTech\Staffology\Model\TenantHtmlInsertion[]|null $htmlInsertions htmlInsertions + * @param string|null $headContent headContent * * @return $this */ - public function setHtmlInsertions(?array $htmlInsertions): static + public function setHeadContent(?string $headContent): static { - if (is_null($htmlInsertions)) { - array_push($this->openAPINullablesSetToNull, 'htmlInsertions'); + if (is_null($headContent)) { + array_push($this->openAPINullablesSetToNull, 'headContent'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('htmlInsertions', $nullablesSetToNull); + $index = array_search('headContent', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['htmlInsertions'] = $htmlInsertions; + $this->container['headContent'] = $headContent; return $this; } /** - * Gets mailSettings + * Gets helpUrl * - * @return \SynergiTech\Staffology\Model\MailSettings|null + * @return string|null */ - public function getMailSettings(): ?\SynergiTech\Staffology\Model\MailSettings + public function getHelpUrl(): ?string { - return $this->container['mailSettings']; + return $this->container['helpUrl']; } /** - * Sets mailSettings + * Sets helpUrl * - * @param \SynergiTech\Staffology\Model\MailSettings|null $mailSettings mailSettings + * @param string|null $helpUrl helpUrl * * @return $this */ - public function setMailSettings(?\SynergiTech\Staffology\Model\MailSettings $mailSettings): static + public function setHelpUrl(?string $helpUrl): static { - if (is_null($mailSettings)) { - throw new InvalidArgumentException('non-nullable mailSettings cannot be null'); + if (is_null($helpUrl)) { + array_push($this->openAPINullablesSetToNull, 'helpUrl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('helpUrl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($helpUrl) && (mb_strlen($helpUrl) > 250)) { + throw new InvalidArgumentException('invalid length for $helpUrl when calling Tenant., must be smaller than or equal to 250.'); } - $this->container['mailSettings'] = $mailSettings; + + $this->container['helpUrl'] = $helpUrl; return $this; } /** - * Gets signupUrl + * Gets homeImgUrl * * @return string|null */ - public function getSignupUrl(): ?string + public function getHomeImgUrl(): ?string { - return $this->container['signupUrl']; + return $this->container['homeImgUrl']; } /** - * Sets signupUrl + * Sets homeImgUrl * - * @param string|null $signupUrl signupUrl + * @param string|null $homeImgUrl [readonly] * * @return $this */ - public function setSignupUrl(?string $signupUrl): static + public function setHomeImgUrl(?string $homeImgUrl): static { - if (is_null($signupUrl)) { - array_push($this->openAPINullablesSetToNull, 'signupUrl'); + if (is_null($homeImgUrl)) { + array_push($this->openAPINullablesSetToNull, 'homeImgUrl'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('signupUrl', $nullablesSetToNull); + $index = array_search('homeImgUrl', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($signupUrl) && (mb_strlen($signupUrl) > 150)) { - throw new InvalidArgumentException('invalid length for $signupUrl when calling Tenant., must be smaller than or equal to 150.'); - } - - $this->container['signupUrl'] = $signupUrl; + $this->container['homeImgUrl'] = $homeImgUrl; return $this; } /** - * Gets termsUrl + * Gets homeUrl * * @return string|null */ - public function getTermsUrl(): ?string + public function getHomeUrl(): ?string { - return $this->container['termsUrl']; + return $this->container['homeUrl']; } /** - * Sets termsUrl + * Sets homeUrl * - * @param string|null $termsUrl termsUrl + * @param string|null $homeUrl homeUrl * * @return $this */ - public function setTermsUrl(?string $termsUrl): static + public function setHomeUrl(?string $homeUrl): static { - if (is_null($termsUrl)) { - array_push($this->openAPINullablesSetToNull, 'termsUrl'); + if (is_null($homeUrl)) { + array_push($this->openAPINullablesSetToNull, 'homeUrl'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('termsUrl', $nullablesSetToNull); + $index = array_search('homeUrl', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($termsUrl) && (mb_strlen($termsUrl) > 150)) { - throw new InvalidArgumentException('invalid length for $termsUrl when calling Tenant., must be smaller than or equal to 150.'); - } - - $this->container['termsUrl'] = $termsUrl; + $this->container['homeUrl'] = $homeUrl; return $this; } /** - * Gets helpUrl + * Gets htmlInsertions * - * @return string|null + * @return \SynergiTech\Staffology\Model\TenantHtmlInsertion[]|null */ - public function getHelpUrl(): ?string + public function getHtmlInsertions(): ?array { - return $this->container['helpUrl']; + return $this->container['htmlInsertions']; } /** - * Sets helpUrl + * Sets htmlInsertions * - * @param string|null $helpUrl helpUrl + * @param \SynergiTech\Staffology\Model\TenantHtmlInsertion[]|null $htmlInsertions htmlInsertions * * @return $this */ - public function setHelpUrl(?string $helpUrl): static + public function setHtmlInsertions(?array $htmlInsertions): static { - if (is_null($helpUrl)) { - array_push($this->openAPINullablesSetToNull, 'helpUrl'); + if (is_null($htmlInsertions)) { + array_push($this->openAPINullablesSetToNull, 'htmlInsertions'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('helpUrl', $nullablesSetToNull); + $index = array_search('htmlInsertions', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($helpUrl) && (mb_strlen($helpUrl) > 250)) { - throw new InvalidArgumentException('invalid length for $helpUrl when calling Tenant., must be smaller than or equal to 250.'); + $this->container['htmlInsertions'] = $htmlInsertions; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId(): ?string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id [readonly] The unique id of the object + * + * @return $this + */ + public function setId(?string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - - $this->container['helpUrl'] = $helpUrl; + $this->container['id'] = $id; return $this; } /** - * Gets supportEmail + * Gets logOutUrl * * @return string|null */ - public function getSupportEmail(): ?string + public function getLogOutUrl(): ?string { - return $this->container['supportEmail']; + return $this->container['logOutUrl']; } /** - * Sets supportEmail + * Sets logOutUrl * - * @param string|null $supportEmail supportEmail + * @param string|null $logOutUrl logOutUrl * * @return $this */ - public function setSupportEmail(?string $supportEmail): static + public function setLogOutUrl(?string $logOutUrl): static { - if (is_null($supportEmail)) { - array_push($this->openAPINullablesSetToNull, 'supportEmail'); + if (is_null($logOutUrl)) { + array_push($this->openAPINullablesSetToNull, 'logOutUrl'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('supportEmail', $nullablesSetToNull); + $index = array_search('logOutUrl', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($supportEmail) && (mb_strlen($supportEmail) > 150)) { - throw new InvalidArgumentException('invalid length for $supportEmail when calling Tenant., must be smaller than or equal to 150.'); + if (!is_null($logOutUrl) && (mb_strlen($logOutUrl) > 150)) { + throw new InvalidArgumentException('invalid length for $logOutUrl when calling Tenant., must be smaller than or equal to 150.'); } - $this->container['supportEmail'] = $supportEmail; + $this->container['logOutUrl'] = $logOutUrl; return $this; } /** - * Gets newUserSignupEmail + * Gets loginImgUrl * * @return string|null */ - public function getNewUserSignupEmail(): ?string + public function getLoginImgUrl(): ?string { - return $this->container['newUserSignupEmail']; + return $this->container['loginImgUrl']; } /** - * Sets newUserSignupEmail + * Sets loginImgUrl * - * @param string|null $newUserSignupEmail newUserSignupEmail + * @param string|null $loginImgUrl [readonly] * * @return $this */ - public function setNewUserSignupEmail(?string $newUserSignupEmail): static + public function setLoginImgUrl(?string $loginImgUrl): static { - if (is_null($newUserSignupEmail)) { - array_push($this->openAPINullablesSetToNull, 'newUserSignupEmail'); + if (is_null($loginImgUrl)) { + array_push($this->openAPINullablesSetToNull, 'loginImgUrl'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('newUserSignupEmail', $nullablesSetToNull); + $index = array_search('loginImgUrl', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($newUserSignupEmail) && (mb_strlen($newUserSignupEmail) > 150)) { - throw new InvalidArgumentException('invalid length for $newUserSignupEmail when calling Tenant., must be smaller than or equal to 150.'); - } - - $this->container['newUserSignupEmail'] = $newUserSignupEmail; + $this->container['loginImgUrl'] = $loginImgUrl; return $this; } /** - * Gets approveNewUsers + * Gets mailSettings * - * @return bool|null + * @return \SynergiTech\Staffology\Model\MailSettings|null */ - public function getApproveNewUsers(): ?bool + public function getMailSettings(): ?\SynergiTech\Staffology\Model\MailSettings { - return $this->container['approveNewUsers']; + return $this->container['mailSettings']; } /** - * Sets approveNewUsers + * Sets mailSettings * - * @param bool|null $approveNewUsers approveNewUsers + * @param \SynergiTech\Staffology\Model\MailSettings|null $mailSettings mailSettings * * @return $this */ - public function setApproveNewUsers(?bool $approveNewUsers): static + public function setMailSettings(?\SynergiTech\Staffology\Model\MailSettings $mailSettings): static { - if (is_null($approveNewUsers)) { - throw new InvalidArgumentException('non-nullable approveNewUsers cannot be null'); + if (is_null($mailSettings)) { + throw new InvalidArgumentException('non-nullable mailSettings cannot be null'); } - $this->container['approveNewUsers'] = $approveNewUsers; + $this->container['mailSettings'] = $mailSettings; return $this; } /** - * Gets enableBureauFeatures + * Gets mailingList * * @return bool|null */ - public function getEnableBureauFeatures(): ?bool + public function getMailingList(): ?bool { - return $this->container['enableBureauFeatures']; + return $this->container['mailingList']; } /** - * Sets enableBureauFeatures + * Sets mailingList * - * @param bool|null $enableBureauFeatures enableBureauFeatures + * @param bool|null $mailingList mailingList * * @return $this */ - public function setEnableBureauFeatures(?bool $enableBureauFeatures): static + public function setMailingList(?bool $mailingList): static { - if (is_null($enableBureauFeatures)) { - throw new InvalidArgumentException('non-nullable enableBureauFeatures cannot be null'); + if (is_null($mailingList)) { + throw new InvalidArgumentException('non-nullable mailingList cannot be null'); } - $this->container['enableBureauFeatures'] = $enableBureauFeatures; + $this->container['mailingList'] = $mailingList; return $this; } /** - * Gets requireDdMandateBeforeAllowingBillableActivity + * Gets newUserSignupEmail * - * @return bool|null + * @return string|null */ - public function getRequireDdMandateBeforeAllowingBillableActivity(): ?bool + public function getNewUserSignupEmail(): ?string { - return $this->container['requireDdMandateBeforeAllowingBillableActivity']; + return $this->container['newUserSignupEmail']; } /** - * Sets requireDdMandateBeforeAllowingBillableActivity + * Sets newUserSignupEmail * - * @param bool|null $requireDdMandateBeforeAllowingBillableActivity requireDdMandateBeforeAllowingBillableActivity + * @param string|null $newUserSignupEmail newUserSignupEmail * * @return $this */ - public function setRequireDdMandateBeforeAllowingBillableActivity(?bool $requireDdMandateBeforeAllowingBillableActivity): static + public function setNewUserSignupEmail(?string $newUserSignupEmail): static { - if (is_null($requireDdMandateBeforeAllowingBillableActivity)) { - throw new InvalidArgumentException('non-nullable requireDdMandateBeforeAllowingBillableActivity cannot be null'); + if (is_null($newUserSignupEmail)) { + array_push($this->openAPINullablesSetToNull, 'newUserSignupEmail'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('newUserSignupEmail', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['requireDdMandateBeforeAllowingBillableActivity'] = $requireDdMandateBeforeAllowingBillableActivity; + if (!is_null($newUserSignupEmail) && (mb_strlen($newUserSignupEmail) > 150)) { + throw new InvalidArgumentException('invalid length for $newUserSignupEmail when calling Tenant., must be smaller than or equal to 150.'); + } + + $this->container['newUserSignupEmail'] = $newUserSignupEmail; return $this; } /** - * Gets whiteLabelMode + * Gets requireDdMandateBeforeAllowingBillableActivity * * @return bool|null */ - public function getWhiteLabelMode(): ?bool + public function getRequireDdMandateBeforeAllowingBillableActivity(): ?bool { - return $this->container['whiteLabelMode']; + return $this->container['requireDdMandateBeforeAllowingBillableActivity']; } /** - * Sets whiteLabelMode + * Sets requireDdMandateBeforeAllowingBillableActivity * - * @param bool|null $whiteLabelMode whiteLabelMode + * @param bool|null $requireDdMandateBeforeAllowingBillableActivity requireDdMandateBeforeAllowingBillableActivity * * @return $this */ - public function setWhiteLabelMode(?bool $whiteLabelMode): static + public function setRequireDdMandateBeforeAllowingBillableActivity(?bool $requireDdMandateBeforeAllowingBillableActivity): static { - if (is_null($whiteLabelMode)) { - throw new InvalidArgumentException('non-nullable whiteLabelMode cannot be null'); + if (is_null($requireDdMandateBeforeAllowingBillableActivity)) { + throw new InvalidArgumentException('non-nullable requireDdMandateBeforeAllowingBillableActivity cannot be null'); } - $this->container['whiteLabelMode'] = $whiteLabelMode; + $this->container['requireDdMandateBeforeAllowingBillableActivity'] = $requireDdMandateBeforeAllowingBillableActivity; return $this; } /** - * Gets enableReportWriterFeature + * Gets signupUrl * - * @return bool|null + * @return string|null */ - public function getEnableReportWriterFeature(): ?bool + public function getSignupUrl(): ?string { - return $this->container['enableReportWriterFeature']; + return $this->container['signupUrl']; } /** - * Sets enableReportWriterFeature + * Sets signupUrl * - * @param bool|null $enableReportWriterFeature Indicates if the Report Writer feature is enabled for the tenant. + * @param string|null $signupUrl signupUrl * * @return $this */ - public function setEnableReportWriterFeature(?bool $enableReportWriterFeature): static + public function setSignupUrl(?string $signupUrl): static { - if (is_null($enableReportWriterFeature)) { - throw new InvalidArgumentException('non-nullable enableReportWriterFeature cannot be null'); + if (is_null($signupUrl)) { + array_push($this->openAPINullablesSetToNull, 'signupUrl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('signupUrl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($signupUrl) && (mb_strlen($signupUrl) > 150)) { + throw new InvalidArgumentException('invalid length for $signupUrl when calling Tenant., must be smaller than or equal to 150.'); } - $this->container['enableReportWriterFeature'] = $enableReportWriterFeature; + + $this->container['signupUrl'] = $signupUrl; return $this; } /** - * Gets disableEvc + * Gets supportEmail * - * @return bool|null + * @return string|null */ - public function getDisableEvc(): ?bool + public function getSupportEmail(): ?string { - return $this->container['disableEvc']; + return $this->container['supportEmail']; } /** - * Sets disableEvc + * Sets supportEmail * - * @param bool|null $disableEvc Indicates whether FPS should be submitted to EVC for employees/employers under this tenant. + * @param string|null $supportEmail supportEmail * * @return $this */ - public function setDisableEvc(?bool $disableEvc): static + public function setSupportEmail(?string $supportEmail): static { - if (is_null($disableEvc)) { - throw new InvalidArgumentException('non-nullable disableEvc cannot be null'); + if (is_null($supportEmail)) { + array_push($this->openAPINullablesSetToNull, 'supportEmail'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('supportEmail', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['disableEvc'] = $disableEvc; + if (!is_null($supportEmail) && (mb_strlen($supportEmail) > 150)) { + throw new InvalidArgumentException('invalid length for $supportEmail when calling Tenant., must be smaller than or equal to 150.'); + } + + $this->container['supportEmail'] = $supportEmail; return $this; } @@ -1322,28 +1345,39 @@ public function setTenantOwnsBilling(?bool $tenantOwnsBilling): static } /** - * Gets billingSettings + * Gets termsUrl * - * @return \SynergiTech\Staffology\Model\TenantBillingSettings|null + * @return string|null */ - public function getBillingSettings(): ?\SynergiTech\Staffology\Model\TenantBillingSettings + public function getTermsUrl(): ?string { - return $this->container['billingSettings']; + return $this->container['termsUrl']; } /** - * Sets billingSettings + * Sets termsUrl * - * @param \SynergiTech\Staffology\Model\TenantBillingSettings|null $billingSettings billingSettings + * @param string|null $termsUrl termsUrl * * @return $this */ - public function setBillingSettings(?\SynergiTech\Staffology\Model\TenantBillingSettings $billingSettings): static + public function setTermsUrl(?string $termsUrl): static { - if (is_null($billingSettings)) { - throw new InvalidArgumentException('non-nullable billingSettings cannot be null'); + if (is_null($termsUrl)) { + array_push($this->openAPINullablesSetToNull, 'termsUrl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('termsUrl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['billingSettings'] = $billingSettings; + if (!is_null($termsUrl) && (mb_strlen($termsUrl) > 150)) { + throw new InvalidArgumentException('invalid length for $termsUrl when calling Tenant., must be smaller than or equal to 150.'); + } + + $this->container['termsUrl'] = $termsUrl; return $this; } @@ -1376,28 +1410,28 @@ public function setUsersCanManageAccountSecuritySettings(?bool $usersCanManageAc } /** - * Gets id + * Gets whiteLabelMode * - * @return string|null + * @return bool|null */ - public function getId(): ?string + public function getWhiteLabelMode(): ?bool { - return $this->container['id']; + return $this->container['whiteLabelMode']; } /** - * Sets id + * Sets whiteLabelMode * - * @param string|null $id [readonly] The unique id of the object + * @param bool|null $whiteLabelMode whiteLabelMode * * @return $this */ - public function setId(?string $id): static + public function setWhiteLabelMode(?bool $whiteLabelMode): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($whiteLabelMode)) { + throw new InvalidArgumentException('non-nullable whiteLabelMode cannot be null'); } - $this->container['id'] = $id; + $this->container['whiteLabelMode'] = $whiteLabelMode; return $this; } diff --git a/src/Model/TenantBillingSettings.php b/src/Model/TenantBillingSettings.php index d8458cc..b40c7fe 100644 --- a/src/Model/TenantBillingSettings.php +++ b/src/Model/TenantBillingSettings.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class TenantBillingSettings implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPITypes = [ - 'discount' => 'float', - 'monthlyMinimum' => 'float', 'aggregatedPricing' => 'bool', 'billTo' => 'string', - 'pricingTable' => 'string', + 'discount' => 'float', + 'monthlyMinimum' => 'float', + 'netSuiteDefaultDescription' => 'string', 'netSuiteDefaultItemCode' => 'string', - 'netSuiteDefaultDescription' => 'string' + 'pricingTable' => 'string' ]; /** @@ -74,13 +74,13 @@ class TenantBillingSettings implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPIFormats = [ - 'discount' => 'double', - 'monthlyMinimum' => 'double', 'aggregatedPricing' => null, 'billTo' => null, - 'pricingTable' => 'uuid', + 'discount' => 'double', + 'monthlyMinimum' => 'double', + 'netSuiteDefaultDescription' => null, 'netSuiteDefaultItemCode' => null, - 'netSuiteDefaultDescription' => null + 'pricingTable' => 'uuid' ]; /** @@ -89,13 +89,13 @@ class TenantBillingSettings implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPINullables = [ - 'discount' => false, - 'monthlyMinimum' => false, 'aggregatedPricing' => false, 'billTo' => true, - 'pricingTable' => true, + 'discount' => false, + 'monthlyMinimum' => false, + 'netSuiteDefaultDescription' => true, 'netSuiteDefaultItemCode' => true, - 'netSuiteDefaultDescription' => true + 'pricingTable' => true ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'discount' => 'discount', - 'monthlyMinimum' => 'monthlyMinimum', 'aggregatedPricing' => 'aggregatedPricing', 'billTo' => 'billTo', - 'pricingTable' => 'pricingTable', + 'discount' => 'discount', + 'monthlyMinimum' => 'monthlyMinimum', + 'netSuiteDefaultDescription' => 'netSuiteDefaultDescription', 'netSuiteDefaultItemCode' => 'netSuiteDefaultItemCode', - 'netSuiteDefaultDescription' => 'netSuiteDefaultDescription' + 'pricingTable' => 'pricingTable' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'discount' => 'setDiscount', - 'monthlyMinimum' => 'setMonthlyMinimum', 'aggregatedPricing' => 'setAggregatedPricing', 'billTo' => 'setBillTo', - 'pricingTable' => 'setPricingTable', + 'discount' => 'setDiscount', + 'monthlyMinimum' => 'setMonthlyMinimum', + 'netSuiteDefaultDescription' => 'setNetSuiteDefaultDescription', 'netSuiteDefaultItemCode' => 'setNetSuiteDefaultItemCode', - 'netSuiteDefaultDescription' => 'setNetSuiteDefaultDescription' + 'pricingTable' => 'setPricingTable' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'discount' => 'getDiscount', - 'monthlyMinimum' => 'getMonthlyMinimum', 'aggregatedPricing' => 'getAggregatedPricing', 'billTo' => 'getBillTo', - 'pricingTable' => 'getPricingTable', + 'discount' => 'getDiscount', + 'monthlyMinimum' => 'getMonthlyMinimum', + 'netSuiteDefaultDescription' => 'getNetSuiteDefaultDescription', 'netSuiteDefaultItemCode' => 'getNetSuiteDefaultItemCode', - 'netSuiteDefaultDescription' => 'getNetSuiteDefaultDescription' + 'pricingTable' => 'getPricingTable' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('discount', $data ?? [], null); - $this->setIfExists('monthlyMinimum', $data ?? [], null); $this->setIfExists('aggregatedPricing', $data ?? [], null); $this->setIfExists('billTo', $data ?? [], null); - $this->setIfExists('pricingTable', $data ?? [], null); - $this->setIfExists('netSuiteDefaultItemCode', $data ?? [], null); + $this->setIfExists('discount', $data ?? [], null); + $this->setIfExists('monthlyMinimum', $data ?? [], null); $this->setIfExists('netSuiteDefaultDescription', $data ?? [], null); + $this->setIfExists('netSuiteDefaultItemCode', $data ?? [], null); + $this->setIfExists('pricingTable', $data ?? [], null); } /** @@ -331,150 +331,150 @@ public function valid(): bool /** - * Gets discount + * Gets aggregatedPricing * - * @return float|null + * @return bool|null */ - public function getDiscount(): ?float + public function getAggregatedPricing(): ?bool { - return $this->container['discount']; + return $this->container['aggregatedPricing']; } /** - * Sets discount + * Sets aggregatedPricing * - * @param float|null $discount discount + * @param bool|null $aggregatedPricing aggregatedPricing * * @return $this */ - public function setDiscount(?float $discount): static + public function setAggregatedPricing(?bool $aggregatedPricing): static { - if (is_null($discount)) { - throw new InvalidArgumentException('non-nullable discount cannot be null'); + if (is_null($aggregatedPricing)) { + throw new InvalidArgumentException('non-nullable aggregatedPricing cannot be null'); } - $this->container['discount'] = $discount; + $this->container['aggregatedPricing'] = $aggregatedPricing; return $this; } /** - * Gets monthlyMinimum + * Gets billTo * - * @return float|null + * @return string|null */ - public function getMonthlyMinimum(): ?float + public function getBillTo(): ?string { - return $this->container['monthlyMinimum']; + return $this->container['billTo']; } /** - * Sets monthlyMinimum + * Sets billTo * - * @param float|null $monthlyMinimum monthlyMinimum + * @param string|null $billTo If all activity for a Tenant is being biulled to a specifc user, set the email address here * * @return $this */ - public function setMonthlyMinimum(?float $monthlyMinimum): static + public function setBillTo(?string $billTo): static { - if (is_null($monthlyMinimum)) { - throw new InvalidArgumentException('non-nullable monthlyMinimum cannot be null'); + if (is_null($billTo)) { + array_push($this->openAPINullablesSetToNull, 'billTo'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('billTo', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['monthlyMinimum'] = $monthlyMinimum; + $this->container['billTo'] = $billTo; return $this; } /** - * Gets aggregatedPricing + * Gets discount * - * @return bool|null + * @return float|null */ - public function getAggregatedPricing(): ?bool + public function getDiscount(): ?float { - return $this->container['aggregatedPricing']; + return $this->container['discount']; } /** - * Sets aggregatedPricing + * Sets discount * - * @param bool|null $aggregatedPricing aggregatedPricing + * @param float|null $discount discount * * @return $this */ - public function setAggregatedPricing(?bool $aggregatedPricing): static + public function setDiscount(?float $discount): static { - if (is_null($aggregatedPricing)) { - throw new InvalidArgumentException('non-nullable aggregatedPricing cannot be null'); + if (is_null($discount)) { + throw new InvalidArgumentException('non-nullable discount cannot be null'); } - $this->container['aggregatedPricing'] = $aggregatedPricing; + $this->container['discount'] = $discount; return $this; } /** - * Gets billTo + * Gets monthlyMinimum * - * @return string|null + * @return float|null */ - public function getBillTo(): ?string + public function getMonthlyMinimum(): ?float { - return $this->container['billTo']; + return $this->container['monthlyMinimum']; } /** - * Sets billTo + * Sets monthlyMinimum * - * @param string|null $billTo If all activity for a Tenant is being biulled to a specifc user, set the email address here + * @param float|null $monthlyMinimum monthlyMinimum * * @return $this */ - public function setBillTo(?string $billTo): static + public function setMonthlyMinimum(?float $monthlyMinimum): static { - if (is_null($billTo)) { - array_push($this->openAPINullablesSetToNull, 'billTo'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('billTo', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($monthlyMinimum)) { + throw new InvalidArgumentException('non-nullable monthlyMinimum cannot be null'); } - $this->container['billTo'] = $billTo; + $this->container['monthlyMinimum'] = $monthlyMinimum; return $this; } /** - * Gets pricingTable + * Gets netSuiteDefaultDescription * * @return string|null */ - public function getPricingTable(): ?string + public function getNetSuiteDefaultDescription(): ?string { - return $this->container['pricingTable']; + return $this->container['netSuiteDefaultDescription']; } /** - * Sets pricingTable + * Sets netSuiteDefaultDescription * - * @param string|null $pricingTable If BillTo is set, then specify a Pricing Table to use from the Staffology tenant, otherwise the default Staffology Pricing Table will be used + * @param string|null $netSuiteDefaultDescription [readonly] The product description used in the NetSuite billing if not specified in the pricing table * * @return $this */ - public function setPricingTable(?string $pricingTable): static + public function setNetSuiteDefaultDescription(?string $netSuiteDefaultDescription): static { - if (is_null($pricingTable)) { - array_push($this->openAPINullablesSetToNull, 'pricingTable'); + if (is_null($netSuiteDefaultDescription)) { + array_push($this->openAPINullablesSetToNull, 'netSuiteDefaultDescription'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pricingTable', $nullablesSetToNull); + $index = array_search('netSuiteDefaultDescription', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['pricingTable'] = $pricingTable; + $this->container['netSuiteDefaultDescription'] = $netSuiteDefaultDescription; return $this; } @@ -514,35 +514,35 @@ public function setNetSuiteDefaultItemCode(?string $netSuiteDefaultItemCode): st } /** - * Gets netSuiteDefaultDescription + * Gets pricingTable * * @return string|null */ - public function getNetSuiteDefaultDescription(): ?string + public function getPricingTable(): ?string { - return $this->container['netSuiteDefaultDescription']; + return $this->container['pricingTable']; } /** - * Sets netSuiteDefaultDescription + * Sets pricingTable * - * @param string|null $netSuiteDefaultDescription [readonly] The product description used in the NetSuite billing if not specified in the pricing table + * @param string|null $pricingTable If BillTo is set, then specify a Pricing Table to use from the Staffology tenant, otherwise the default Staffology Pricing Table will be used * * @return $this */ - public function setNetSuiteDefaultDescription(?string $netSuiteDefaultDescription): static + public function setPricingTable(?string $pricingTable): static { - if (is_null($netSuiteDefaultDescription)) { - array_push($this->openAPINullablesSetToNull, 'netSuiteDefaultDescription'); + if (is_null($pricingTable)) { + array_push($this->openAPINullablesSetToNull, 'pricingTable'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('netSuiteDefaultDescription', $nullablesSetToNull); + $index = array_search('pricingTable', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['netSuiteDefaultDescription'] = $netSuiteDefaultDescription; + $this->container['pricingTable'] = $pricingTable; return $this; } diff --git a/src/Model/TenantEmail.php b/src/Model/TenantEmail.php index f71ff11..6d36241 100644 --- a/src/Model/TenantEmail.php +++ b/src/Model/TenantEmail.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,21 +59,21 @@ class TenantEmail implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'toName' => 'string', - 'toEmail' => 'string', - 'subject' => 'string', - 'buttonText' => 'string', - 'buttonLink' => 'string', - 'bodyPreview' => 'string', - 'body' => 'string', 'afterBtnBody' => 'string', + 'attachments' => '\SynergiTech\Staffology\Model\EmailAttachment[]', + 'body' => 'string', + 'bodyPreview' => 'string', + 'buttonLink' => 'string', + 'buttonText' => 'string', + 'id' => 'string', + 'sendAttempts' => 'int', 'status' => '\SynergiTech\Staffology\Model\BackgroundTaskStatus', 'statusDate' => '\DateTime', 'statusMessage' => 'string', - 'sendAttempts' => 'int', - 'webAppBaseUrl' => 'string', - 'attachments' => '\SynergiTech\Staffology\Model\EmailAttachment[]', - 'id' => 'string' + 'subject' => 'string', + 'toEmail' => 'string', + 'toName' => 'string', + 'webAppBaseUrl' => 'string' ]; /** @@ -82,21 +82,21 @@ class TenantEmail implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'toName' => null, - 'toEmail' => null, - 'subject' => null, - 'buttonText' => null, - 'buttonLink' => null, - 'bodyPreview' => null, - 'body' => null, 'afterBtnBody' => null, + 'attachments' => null, + 'body' => null, + 'bodyPreview' => null, + 'buttonLink' => null, + 'buttonText' => null, + 'id' => 'uuid', + 'sendAttempts' => 'int32', 'status' => null, 'statusDate' => 'date-time', 'statusMessage' => null, - 'sendAttempts' => 'int32', - 'webAppBaseUrl' => null, - 'attachments' => null, - 'id' => 'uuid' + 'subject' => null, + 'toEmail' => null, + 'toName' => null, + 'webAppBaseUrl' => null ]; /** @@ -105,21 +105,21 @@ class TenantEmail implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'toName' => false, - 'toEmail' => false, - 'subject' => false, - 'buttonText' => true, - 'buttonLink' => true, - 'bodyPreview' => true, - 'body' => true, 'afterBtnBody' => true, + 'attachments' => true, + 'body' => true, + 'bodyPreview' => true, + 'buttonLink' => true, + 'buttonText' => true, + 'id' => false, + 'sendAttempts' => false, 'status' => false, 'statusDate' => false, 'statusMessage' => true, - 'sendAttempts' => false, - 'webAppBaseUrl' => true, - 'attachments' => true, - 'id' => false + 'subject' => false, + 'toEmail' => false, + 'toName' => false, + 'webAppBaseUrl' => true ]; /** @@ -208,21 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'toName' => 'toName', - 'toEmail' => 'toEmail', - 'subject' => 'subject', - 'buttonText' => 'buttonText', - 'buttonLink' => 'buttonLink', - 'bodyPreview' => 'bodyPreview', - 'body' => 'body', 'afterBtnBody' => 'afterBtnBody', + 'attachments' => 'attachments', + 'body' => 'body', + 'bodyPreview' => 'bodyPreview', + 'buttonLink' => 'buttonLink', + 'buttonText' => 'buttonText', + 'id' => 'id', + 'sendAttempts' => 'sendAttempts', 'status' => 'status', 'statusDate' => 'statusDate', 'statusMessage' => 'statusMessage', - 'sendAttempts' => 'sendAttempts', - 'webAppBaseUrl' => 'webAppBaseUrl', - 'attachments' => 'attachments', - 'id' => 'id' + 'subject' => 'subject', + 'toEmail' => 'toEmail', + 'toName' => 'toName', + 'webAppBaseUrl' => 'webAppBaseUrl' ]; /** @@ -231,21 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'toName' => 'setToName', - 'toEmail' => 'setToEmail', - 'subject' => 'setSubject', - 'buttonText' => 'setButtonText', - 'buttonLink' => 'setButtonLink', - 'bodyPreview' => 'setBodyPreview', - 'body' => 'setBody', 'afterBtnBody' => 'setAfterBtnBody', + 'attachments' => 'setAttachments', + 'body' => 'setBody', + 'bodyPreview' => 'setBodyPreview', + 'buttonLink' => 'setButtonLink', + 'buttonText' => 'setButtonText', + 'id' => 'setId', + 'sendAttempts' => 'setSendAttempts', 'status' => 'setStatus', 'statusDate' => 'setStatusDate', 'statusMessage' => 'setStatusMessage', - 'sendAttempts' => 'setSendAttempts', - 'webAppBaseUrl' => 'setWebAppBaseUrl', - 'attachments' => 'setAttachments', - 'id' => 'setId' + 'subject' => 'setSubject', + 'toEmail' => 'setToEmail', + 'toName' => 'setToName', + 'webAppBaseUrl' => 'setWebAppBaseUrl' ]; /** @@ -254,21 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'toName' => 'getToName', - 'toEmail' => 'getToEmail', - 'subject' => 'getSubject', - 'buttonText' => 'getButtonText', - 'buttonLink' => 'getButtonLink', - 'bodyPreview' => 'getBodyPreview', - 'body' => 'getBody', 'afterBtnBody' => 'getAfterBtnBody', + 'attachments' => 'getAttachments', + 'body' => 'getBody', + 'bodyPreview' => 'getBodyPreview', + 'buttonLink' => 'getButtonLink', + 'buttonText' => 'getButtonText', + 'id' => 'getId', + 'sendAttempts' => 'getSendAttempts', 'status' => 'getStatus', 'statusDate' => 'getStatusDate', 'statusMessage' => 'getStatusMessage', - 'sendAttempts' => 'getSendAttempts', - 'webAppBaseUrl' => 'getWebAppBaseUrl', - 'attachments' => 'getAttachments', - 'id' => 'getId' + 'subject' => 'getSubject', + 'toEmail' => 'getToEmail', + 'toName' => 'getToName', + 'webAppBaseUrl' => 'getWebAppBaseUrl' ]; /** @@ -327,21 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('toName', $data ?? [], null); - $this->setIfExists('toEmail', $data ?? [], null); - $this->setIfExists('subject', $data ?? [], null); - $this->setIfExists('buttonText', $data ?? [], null); - $this->setIfExists('buttonLink', $data ?? [], null); - $this->setIfExists('bodyPreview', $data ?? [], null); - $this->setIfExists('body', $data ?? [], null); $this->setIfExists('afterBtnBody', $data ?? [], null); + $this->setIfExists('attachments', $data ?? [], null); + $this->setIfExists('body', $data ?? [], null); + $this->setIfExists('bodyPreview', $data ?? [], null); + $this->setIfExists('buttonLink', $data ?? [], null); + $this->setIfExists('buttonText', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('sendAttempts', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('statusDate', $data ?? [], null); $this->setIfExists('statusMessage', $data ?? [], null); - $this->setIfExists('sendAttempts', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + $this->setIfExists('toEmail', $data ?? [], null); + $this->setIfExists('toName', $data ?? [], null); $this->setIfExists('webAppBaseUrl', $data ?? [], null); - $this->setIfExists('attachments', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); } /** @@ -371,26 +371,16 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['toName'] === null) { - $invalidProperties[] = "'toName' can't be null"; - } - if ((mb_strlen($this->container['toName']) > 150)) { - $invalidProperties[] = "invalid value for 'toName', the character length must be smaller than or equal to 150."; - } - - if ((mb_strlen($this->container['toName']) < 1)) { - $invalidProperties[] = "invalid value for 'toName', the character length must be bigger than or equal to 1."; + if (!is_null($this->container['bodyPreview']) && (mb_strlen($this->container['bodyPreview']) > 100)) { + $invalidProperties[] = "invalid value for 'bodyPreview', the character length must be smaller than or equal to 100."; } - if ($this->container['toEmail'] === null) { - $invalidProperties[] = "'toEmail' can't be null"; - } - if ((mb_strlen($this->container['toEmail']) > 150)) { - $invalidProperties[] = "invalid value for 'toEmail', the character length must be smaller than or equal to 150."; + if (!is_null($this->container['buttonLink']) && (mb_strlen($this->container['buttonLink']) > 250)) { + $invalidProperties[] = "invalid value for 'buttonLink', the character length must be smaller than or equal to 250."; } - if ((mb_strlen($this->container['toEmail']) < 1)) { - $invalidProperties[] = "invalid value for 'toEmail', the character length must be bigger than or equal to 1."; + if (!is_null($this->container['buttonText']) && (mb_strlen($this->container['buttonText']) > 100)) { + $invalidProperties[] = "invalid value for 'buttonText', the character length must be smaller than or equal to 100."; } if ($this->container['subject'] === null) { @@ -404,16 +394,26 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'subject', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['buttonText']) && (mb_strlen($this->container['buttonText']) > 100)) { - $invalidProperties[] = "invalid value for 'buttonText', the character length must be smaller than or equal to 100."; + if ($this->container['toEmail'] === null) { + $invalidProperties[] = "'toEmail' can't be null"; + } + if ((mb_strlen($this->container['toEmail']) > 150)) { + $invalidProperties[] = "invalid value for 'toEmail', the character length must be smaller than or equal to 150."; } - if (!is_null($this->container['buttonLink']) && (mb_strlen($this->container['buttonLink']) > 250)) { - $invalidProperties[] = "invalid value for 'buttonLink', the character length must be smaller than or equal to 250."; + if ((mb_strlen($this->container['toEmail']) < 1)) { + $invalidProperties[] = "invalid value for 'toEmail', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['bodyPreview']) && (mb_strlen($this->container['bodyPreview']) > 100)) { - $invalidProperties[] = "invalid value for 'bodyPreview', the character length must be smaller than or equal to 100."; + if ($this->container['toName'] === null) { + $invalidProperties[] = "'toName' can't be null"; + } + if ((mb_strlen($this->container['toName']) > 150)) { + $invalidProperties[] = "invalid value for 'toName', the character length must be smaller than or equal to 150."; + } + + if ((mb_strlen($this->container['toName']) < 1)) { + $invalidProperties[] = "invalid value for 'toName', the character length must be bigger than or equal to 1."; } return $invalidProperties; @@ -432,141 +432,141 @@ public function valid(): bool /** - * Gets toName + * Gets afterBtnBody * - * @return string + * @return string|null */ - public function getToName(): string + public function getAfterBtnBody(): ?string { - return $this->container['toName']; + return $this->container['afterBtnBody']; } /** - * Sets toName + * Sets afterBtnBody * - * @param string $toName toName + * @param string|null $afterBtnBody afterBtnBody * * @return $this */ - public function setToName(string $toName): static + public function setAfterBtnBody(?string $afterBtnBody): static { - if (is_null($toName)) { - throw new InvalidArgumentException('non-nullable toName cannot be null'); - } - if ((mb_strlen($toName) > 150)) { - throw new InvalidArgumentException('invalid length for $toName when calling TenantEmail., must be smaller than or equal to 150.'); - } - if ((mb_strlen($toName) < 1)) { - throw new InvalidArgumentException('invalid length for $toName when calling TenantEmail., must be bigger than or equal to 1.'); + if (is_null($afterBtnBody)) { + array_push($this->openAPINullablesSetToNull, 'afterBtnBody'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('afterBtnBody', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - - $this->container['toName'] = $toName; + $this->container['afterBtnBody'] = $afterBtnBody; return $this; } /** - * Gets toEmail + * Gets attachments * - * @return string + * @return \SynergiTech\Staffology\Model\EmailAttachment[]|null */ - public function getToEmail(): string + public function getAttachments(): ?array { - return $this->container['toEmail']; + return $this->container['attachments']; } /** - * Sets toEmail + * Sets attachments * - * @param string $toEmail toEmail + * @param \SynergiTech\Staffology\Model\EmailAttachment[]|null $attachments attachments * * @return $this */ - public function setToEmail(string $toEmail): static + public function setAttachments(?array $attachments): static { - if (is_null($toEmail)) { - throw new InvalidArgumentException('non-nullable toEmail cannot be null'); - } - if ((mb_strlen($toEmail) > 150)) { - throw new InvalidArgumentException('invalid length for $toEmail when calling TenantEmail., must be smaller than or equal to 150.'); - } - if ((mb_strlen($toEmail) < 1)) { - throw new InvalidArgumentException('invalid length for $toEmail when calling TenantEmail., must be bigger than or equal to 1.'); + if (is_null($attachments)) { + array_push($this->openAPINullablesSetToNull, 'attachments'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('attachments', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - - $this->container['toEmail'] = $toEmail; + $this->container['attachments'] = $attachments; return $this; } /** - * Gets subject + * Gets body * - * @return string + * @return string|null */ - public function getSubject(): string + public function getBody(): ?string { - return $this->container['subject']; + return $this->container['body']; } /** - * Sets subject + * Sets body * - * @param string $subject subject + * @param string|null $body body * * @return $this */ - public function setSubject(string $subject): static + public function setBody(?string $body): static { - if (is_null($subject)) { - throw new InvalidArgumentException('non-nullable subject cannot be null'); - } - if ((mb_strlen($subject) > 150)) { - throw new InvalidArgumentException('invalid length for $subject when calling TenantEmail., must be smaller than or equal to 150.'); - } - if ((mb_strlen($subject) < 1)) { - throw new InvalidArgumentException('invalid length for $subject when calling TenantEmail., must be bigger than or equal to 1.'); + if (is_null($body)) { + array_push($this->openAPINullablesSetToNull, 'body'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('body', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - - $this->container['subject'] = $subject; + $this->container['body'] = $body; return $this; } /** - * Gets buttonText + * Gets bodyPreview * * @return string|null */ - public function getButtonText(): ?string + public function getBodyPreview(): ?string { - return $this->container['buttonText']; + return $this->container['bodyPreview']; } /** - * Sets buttonText + * Sets bodyPreview * - * @param string|null $buttonText buttonText + * @param string|null $bodyPreview bodyPreview * * @return $this */ - public function setButtonText(?string $buttonText): static + public function setBodyPreview(?string $bodyPreview): static { - if (is_null($buttonText)) { - array_push($this->openAPINullablesSetToNull, 'buttonText'); + if (is_null($bodyPreview)) { + array_push($this->openAPINullablesSetToNull, 'bodyPreview'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('buttonText', $nullablesSetToNull); + $index = array_search('bodyPreview', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($buttonText) && (mb_strlen($buttonText) > 100)) { - throw new InvalidArgumentException('invalid length for $buttonText when calling TenantEmail., must be smaller than or equal to 100.'); + if (!is_null($bodyPreview) && (mb_strlen($bodyPreview) > 100)) { + throw new InvalidArgumentException('invalid length for $bodyPreview when calling TenantEmail., must be smaller than or equal to 100.'); } - $this->container['buttonText'] = $buttonText; + $this->container['bodyPreview'] = $bodyPreview; return $this; } @@ -610,107 +610,93 @@ public function setButtonLink(?string $buttonLink): static } /** - * Gets bodyPreview + * Gets buttonText * * @return string|null */ - public function getBodyPreview(): ?string + public function getButtonText(): ?string { - return $this->container['bodyPreview']; + return $this->container['buttonText']; } /** - * Sets bodyPreview + * Sets buttonText * - * @param string|null $bodyPreview bodyPreview + * @param string|null $buttonText buttonText * * @return $this */ - public function setBodyPreview(?string $bodyPreview): static + public function setButtonText(?string $buttonText): static { - if (is_null($bodyPreview)) { - array_push($this->openAPINullablesSetToNull, 'bodyPreview'); + if (is_null($buttonText)) { + array_push($this->openAPINullablesSetToNull, 'buttonText'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bodyPreview', $nullablesSetToNull); + $index = array_search('buttonText', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($bodyPreview) && (mb_strlen($bodyPreview) > 100)) { - throw new InvalidArgumentException('invalid length for $bodyPreview when calling TenantEmail., must be smaller than or equal to 100.'); + if (!is_null($buttonText) && (mb_strlen($buttonText) > 100)) { + throw new InvalidArgumentException('invalid length for $buttonText when calling TenantEmail., must be smaller than or equal to 100.'); } - $this->container['bodyPreview'] = $bodyPreview; + $this->container['buttonText'] = $buttonText; return $this; } /** - * Gets body + * Gets id * * @return string|null */ - public function getBody(): ?string + public function getId(): ?string { - return $this->container['body']; + return $this->container['id']; } /** - * Sets body + * Sets id * - * @param string|null $body body + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setBody(?string $body): static + public function setId(?string $id): static { - if (is_null($body)) { - array_push($this->openAPINullablesSetToNull, 'body'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('body', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['body'] = $body; + $this->container['id'] = $id; return $this; } /** - * Gets afterBtnBody + * Gets sendAttempts * - * @return string|null + * @return int|null */ - public function getAfterBtnBody(): ?string + public function getSendAttempts(): ?int { - return $this->container['afterBtnBody']; + return $this->container['sendAttempts']; } /** - * Sets afterBtnBody + * Sets sendAttempts * - * @param string|null $afterBtnBody afterBtnBody + * @param int|null $sendAttempts sendAttempts * * @return $this */ - public function setAfterBtnBody(?string $afterBtnBody): static + public function setSendAttempts(?int $sendAttempts): static { - if (is_null($afterBtnBody)) { - array_push($this->openAPINullablesSetToNull, 'afterBtnBody'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('afterBtnBody', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($sendAttempts)) { + throw new InvalidArgumentException('non-nullable sendAttempts cannot be null'); } - $this->container['afterBtnBody'] = $afterBtnBody; + $this->container['sendAttempts'] = $sendAttempts; return $this; } @@ -804,123 +790,137 @@ public function setStatusMessage(?string $statusMessage): static } /** - * Gets sendAttempts + * Gets subject * - * @return int|null + * @return string */ - public function getSendAttempts(): ?int + public function getSubject(): string { - return $this->container['sendAttempts']; + return $this->container['subject']; } /** - * Sets sendAttempts + * Sets subject * - * @param int|null $sendAttempts sendAttempts + * @param string $subject subject * * @return $this */ - public function setSendAttempts(?int $sendAttempts): static + public function setSubject(string $subject): static { - if (is_null($sendAttempts)) { - throw new InvalidArgumentException('non-nullable sendAttempts cannot be null'); + if (is_null($subject)) { + throw new InvalidArgumentException('non-nullable subject cannot be null'); + } + if ((mb_strlen($subject) > 150)) { + throw new InvalidArgumentException('invalid length for $subject when calling TenantEmail., must be smaller than or equal to 150.'); + } + if ((mb_strlen($subject) < 1)) { + throw new InvalidArgumentException('invalid length for $subject when calling TenantEmail., must be bigger than or equal to 1.'); } - $this->container['sendAttempts'] = $sendAttempts; + + $this->container['subject'] = $subject; return $this; } /** - * Gets webAppBaseUrl + * Gets toEmail * - * @return string|null + * @return string */ - public function getWebAppBaseUrl(): ?string + public function getToEmail(): string { - return $this->container['webAppBaseUrl']; + return $this->container['toEmail']; } /** - * Sets webAppBaseUrl + * Sets toEmail * - * @param string|null $webAppBaseUrl webAppBaseUrl + * @param string $toEmail toEmail * * @return $this */ - public function setWebAppBaseUrl(?string $webAppBaseUrl): static + public function setToEmail(string $toEmail): static { - if (is_null($webAppBaseUrl)) { - array_push($this->openAPINullablesSetToNull, 'webAppBaseUrl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('webAppBaseUrl', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($toEmail)) { + throw new InvalidArgumentException('non-nullable toEmail cannot be null'); + } + if ((mb_strlen($toEmail) > 150)) { + throw new InvalidArgumentException('invalid length for $toEmail when calling TenantEmail., must be smaller than or equal to 150.'); + } + if ((mb_strlen($toEmail) < 1)) { + throw new InvalidArgumentException('invalid length for $toEmail when calling TenantEmail., must be bigger than or equal to 1.'); } - $this->container['webAppBaseUrl'] = $webAppBaseUrl; + + $this->container['toEmail'] = $toEmail; return $this; } /** - * Gets attachments + * Gets toName * - * @return \SynergiTech\Staffology\Model\EmailAttachment[]|null + * @return string */ - public function getAttachments(): ?array + public function getToName(): string { - return $this->container['attachments']; + return $this->container['toName']; } /** - * Sets attachments + * Sets toName * - * @param \SynergiTech\Staffology\Model\EmailAttachment[]|null $attachments attachments + * @param string $toName toName * * @return $this */ - public function setAttachments(?array $attachments): static + public function setToName(string $toName): static { - if (is_null($attachments)) { - array_push($this->openAPINullablesSetToNull, 'attachments'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('attachments', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($toName)) { + throw new InvalidArgumentException('non-nullable toName cannot be null'); } - $this->container['attachments'] = $attachments; + if ((mb_strlen($toName) > 150)) { + throw new InvalidArgumentException('invalid length for $toName when calling TenantEmail., must be smaller than or equal to 150.'); + } + if ((mb_strlen($toName) < 1)) { + throw new InvalidArgumentException('invalid length for $toName when calling TenantEmail., must be bigger than or equal to 1.'); + } + + $this->container['toName'] = $toName; return $this; } /** - * Gets id + * Gets webAppBaseUrl * * @return string|null */ - public function getId(): ?string + public function getWebAppBaseUrl(): ?string { - return $this->container['id']; + return $this->container['webAppBaseUrl']; } /** - * Sets id + * Sets webAppBaseUrl * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $webAppBaseUrl webAppBaseUrl * * @return $this */ - public function setId(?string $id): static + public function setWebAppBaseUrl(?string $webAppBaseUrl): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($webAppBaseUrl)) { + array_push($this->openAPINullablesSetToNull, 'webAppBaseUrl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('webAppBaseUrl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['id'] = $id; + $this->container['webAppBaseUrl'] = $webAppBaseUrl; return $this; } diff --git a/src/Model/TenantHtmlInsertion.php b/src/Model/TenantHtmlInsertion.php index 9f501d9..1c798bd 100644 --- a/src/Model/TenantHtmlInsertion.php +++ b/src/Model/TenantHtmlInsertion.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class TenantHtmlInsertion implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ - 'insertionPoint' => '\SynergiTech\Staffology\Model\HtmlInsertionPoint', - 'content' => 'string' + 'content' => 'string', + 'insertionPoint' => '\SynergiTech\Staffology\Model\HtmlInsertionPoint' ]; /** @@ -69,8 +69,8 @@ class TenantHtmlInsertion implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPIFormats = [ - 'insertionPoint' => null, - 'content' => null + 'content' => null, + 'insertionPoint' => null ]; /** @@ -79,8 +79,8 @@ class TenantHtmlInsertion implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPINullables = [ - 'insertionPoint' => false, - 'content' => true + 'content' => true, + 'insertionPoint' => false ]; /** @@ -169,8 +169,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'insertionPoint' => 'insertionPoint', - 'content' => 'content' + 'content' => 'content', + 'insertionPoint' => 'insertionPoint' ]; /** @@ -179,8 +179,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'insertionPoint' => 'setInsertionPoint', - 'content' => 'setContent' + 'content' => 'setContent', + 'insertionPoint' => 'setInsertionPoint' ]; /** @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'insertionPoint' => 'getInsertionPoint', - 'content' => 'getContent' + 'content' => 'getContent', + 'insertionPoint' => 'getInsertionPoint' ]; /** @@ -249,8 +249,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('insertionPoint', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('insertionPoint', $data ?? [], null); } /** @@ -295,33 +295,6 @@ public function valid(): bool } - /** - * Gets insertionPoint - * - * @return \SynergiTech\Staffology\Model\HtmlInsertionPoint|null - */ - public function getInsertionPoint(): ?\SynergiTech\Staffology\Model\HtmlInsertionPoint - { - return $this->container['insertionPoint']; - } - - /** - * Sets insertionPoint - * - * @param \SynergiTech\Staffology\Model\HtmlInsertionPoint|null $insertionPoint insertionPoint - * - * @return $this - */ - public function setInsertionPoint(?\SynergiTech\Staffology\Model\HtmlInsertionPoint $insertionPoint): static - { - if (is_null($insertionPoint)) { - throw new InvalidArgumentException('non-nullable insertionPoint cannot be null'); - } - $this->container['insertionPoint'] = $insertionPoint; - - return $this; - } - /** * Gets content * @@ -355,6 +328,33 @@ public function setContent(?string $content): static return $this; } + + /** + * Gets insertionPoint + * + * @return \SynergiTech\Staffology\Model\HtmlInsertionPoint|null + */ + public function getInsertionPoint(): ?\SynergiTech\Staffology\Model\HtmlInsertionPoint + { + return $this->container['insertionPoint']; + } + + /** + * Sets insertionPoint + * + * @param \SynergiTech\Staffology\Model\HtmlInsertionPoint|null $insertionPoint insertionPoint + * + * @return $this + */ + public function setInsertionPoint(?\SynergiTech\Staffology\Model\HtmlInsertionPoint $insertionPoint): static + { + if (is_null($insertionPoint)) { + throw new InvalidArgumentException('non-nullable insertionPoint cannot be null'); + } + $this->container['insertionPoint'] = $insertionPoint; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/TenantItem.php b/src/Model/TenantItem.php index 7e448b4..f3a63de 100644 --- a/src/Model/TenantItem.php +++ b/src/Model/TenantItem.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -61,8 +61,8 @@ class TenantItem implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'id' => 'string', - 'name' => 'string', 'metadata' => 'mixed', + 'name' => 'string', 'url' => 'string' ]; @@ -73,8 +73,8 @@ class TenantItem implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPIFormats = [ 'id' => 'uuid', - 'name' => null, 'metadata' => null, + 'name' => null, 'url' => null ]; @@ -85,8 +85,8 @@ class TenantItem implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPINullables = [ 'id' => false, - 'name' => true, 'metadata' => true, + 'name' => true, 'url' => true ]; @@ -177,8 +177,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $attributeMap = [ 'id' => 'id', - 'name' => 'name', 'metadata' => 'metadata', + 'name' => 'name', 'url' => 'url' ]; @@ -189,8 +189,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $setters = [ 'id' => 'setId', - 'name' => 'setName', 'metadata' => 'setMetadata', + 'name' => 'setName', 'url' => 'setUrl' ]; @@ -201,8 +201,8 @@ public function isNullableSetToNull(string $property): bool */ protected static array $getters = [ 'id' => 'getId', - 'name' => 'getName', 'metadata' => 'getMetadata', + 'name' => 'getName', 'url' => 'getUrl' ]; @@ -263,8 +263,8 @@ public function getModelName(): string public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); } @@ -338,69 +338,69 @@ public function setId(?string $id): static } /** - * Gets name + * Gets metadata * - * @return string|null + * @return mixed|null */ - public function getName(): ?string + public function getMetadata(): mixed { - return $this->container['name']; + return $this->container['metadata']; } /** - * Sets name + * Sets metadata * - * @param string|null $name name + * @param mixed|null $metadata metadata * * @return $this */ - public function setName(?string $name): static + public function setMetadata(mixed $metadata): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($metadata)) { + array_push($this->openAPINullablesSetToNull, 'metadata'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('metadata', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['metadata'] = $metadata; return $this; } /** - * Gets metadata + * Gets name * - * @return mixed|null + * @return string|null */ - public function getMetadata(): mixed + public function getName(): ?string { - return $this->container['metadata']; + return $this->container['name']; } /** - * Sets metadata + * Sets name * - * @param mixed|null $metadata metadata + * @param string|null $name name * * @return $this */ - public function setMetadata(mixed $metadata): static + public function setName(?string $name): static { - if (is_null($metadata)) { - array_push($this->openAPINullablesSetToNull, 'metadata'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('metadata', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['metadata'] = $metadata; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/TieredPension.php b/src/Model/TieredPension.php index 27a452f..7d36df8 100644 --- a/src/Model/TieredPension.php +++ b/src/Model/TieredPension.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,9 +60,9 @@ class TieredPension implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => '\SynergiTech\Staffology\Model\PensionContributionLevelType', + 'employerContribRate' => 'float', 'rates' => '\SynergiTech\Staffology\Model\TieredPensionRate[]', - 'employerContribRate' => 'float' + 'type' => '\SynergiTech\Staffology\Model\PensionContributionLevelType' ]; /** @@ -71,9 +71,9 @@ class TieredPension implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'type' => null, + 'employerContribRate' => 'double', 'rates' => null, - 'employerContribRate' => 'double' + 'type' => null ]; /** @@ -82,9 +82,9 @@ class TieredPension implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'type' => false, + 'employerContribRate' => false, 'rates' => true, - 'employerContribRate' => false + 'type' => false ]; /** @@ -173,9 +173,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', + 'employerContribRate' => 'employerContribRate', 'rates' => 'rates', - 'employerContribRate' => 'employerContribRate' + 'type' => 'type' ]; /** @@ -184,9 +184,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', + 'employerContribRate' => 'setEmployerContribRate', 'rates' => 'setRates', - 'employerContribRate' => 'setEmployerContribRate' + 'type' => 'setType' ]; /** @@ -195,9 +195,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', + 'employerContribRate' => 'getEmployerContribRate', 'rates' => 'getRates', - 'employerContribRate' => 'getEmployerContribRate' + 'type' => 'getType' ]; /** @@ -256,9 +256,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('rates', $data ?? [], null); $this->setIfExists('employerContribRate', $data ?? [], null); + $this->setIfExists('rates', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -304,28 +304,28 @@ public function valid(): bool /** - * Gets type + * Gets employerContribRate * - * @return \SynergiTech\Staffology\Model\PensionContributionLevelType|null + * @return float|null */ - public function getType(): ?\SynergiTech\Staffology\Model\PensionContributionLevelType + public function getEmployerContribRate(): ?float { - return $this->container['type']; + return $this->container['employerContribRate']; } /** - * Sets type + * Sets employerContribRate * - * @param \SynergiTech\Staffology\Model\PensionContributionLevelType|null $type type + * @param float|null $employerContribRate employerContribRate * * @return $this */ - public function setType(?\SynergiTech\Staffology\Model\PensionContributionLevelType $type): static + public function setEmployerContribRate(?float $employerContribRate): static { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($employerContribRate)) { + throw new InvalidArgumentException('non-nullable employerContribRate cannot be null'); } - $this->container['type'] = $type; + $this->container['employerContribRate'] = $employerContribRate; return $this; } @@ -365,28 +365,28 @@ public function setRates(?array $rates): static } /** - * Gets employerContribRate + * Gets type * - * @return float|null + * @return \SynergiTech\Staffology\Model\PensionContributionLevelType|null */ - public function getEmployerContribRate(): ?float + public function getType(): ?\SynergiTech\Staffology\Model\PensionContributionLevelType { - return $this->container['employerContribRate']; + return $this->container['type']; } /** - * Sets employerContribRate + * Sets type * - * @param float|null $employerContribRate employerContribRate + * @param \SynergiTech\Staffology\Model\PensionContributionLevelType|null $type type * * @return $this */ - public function setEmployerContribRate(?float $employerContribRate): static + public function setType(?\SynergiTech\Staffology\Model\PensionContributionLevelType $type): static { - if (is_null($employerContribRate)) { - throw new InvalidArgumentException('non-nullable employerContribRate cannot be null'); + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['employerContribRate'] = $employerContribRate; + $this->container['type'] = $type; return $this; } diff --git a/src/Model/TieredPensionRate.php b/src/Model/TieredPensionRate.php index 5126946..e7c22a2 100644 --- a/src/Model/TieredPensionRate.php +++ b/src/Model/TieredPensionRate.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class TieredPensionRate implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', 'description' => 'string', + 'name' => 'string', 'rangeStart' => 'float', 'rate' => 'float' ]; @@ -72,8 +72,8 @@ class TieredPensionRate implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'name' => null, 'description' => null, + 'name' => null, 'rangeStart' => 'double', 'rate' => 'double' ]; @@ -84,8 +84,8 @@ class TieredPensionRate implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'name' => true, 'description' => true, + 'name' => true, 'rangeStart' => false, 'rate' => false ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', 'description' => 'description', + 'name' => 'name', 'rangeStart' => 'rangeStart', 'rate' => 'rate' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', 'description' => 'setDescription', + 'name' => 'setName', 'rangeStart' => 'setRangeStart', 'rate' => 'setRate' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', 'description' => 'getDescription', + 'name' => 'getName', 'rangeStart' => 'getRangeStart', 'rate' => 'getRate' ]; @@ -262,8 +262,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('rangeStart', $data ?? [], null); $this->setIfExists('rate', $data ?? [], null); } @@ -311,69 +311,69 @@ public function valid(): bool /** - * Gets name + * Gets description * * @return string|null */ - public function getName(): ?string + public function getDescription(): ?string { - return $this->container['name']; + return $this->container['description']; } /** - * Sets name + * Sets description * - * @param string|null $name name + * @param string|null $description description * * @return $this */ - public function setName(?string $name): static + public function setDescription(?string $description): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); + if (is_null($description)) { + array_push($this->openAPINullablesSetToNull, 'description'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); + $index = array_search('description', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['name'] = $name; + $this->container['description'] = $description; return $this; } /** - * Gets description + * Gets name * * @return string|null */ - public function getDescription(): ?string + public function getName(): ?string { - return $this->container['description']; + return $this->container['name']; } /** - * Sets description + * Sets name * - * @param string|null $description description + * @param string|null $name name * * @return $this */ - public function setDescription(?string $description): static + public function setName(?string $name): static { - if (is_null($description)) { - array_push($this->openAPINullablesSetToNull, 'description'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('description', $nullablesSetToNull); + $index = array_search('name', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['description'] = $description; + $this->container['name'] = $name; return $this; } diff --git a/src/Model/UmbrellaPayment.php b/src/Model/UmbrellaPayment.php index 7ffc1b5..fa4198e 100644 --- a/src/Model/UmbrellaPayment.php +++ b/src/Model/UmbrellaPayment.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,15 @@ class UmbrellaPayment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'payrollCode' => 'string', 'chargePerTimesheet' => 'float', + 'grossAddition' => 'float', + 'grossDeduction' => 'float', + 'hoursWorked' => 'float', 'invoiceValue' => 'float', 'mapsMiles' => 'int', - 'otherExpenses' => 'float', 'numberOfTimesheets' => 'int', - 'hoursWorked' => 'float', - 'grossDeduction' => 'float', - 'grossAddition' => 'float' + 'otherExpenses' => 'float', + 'payrollCode' => 'string' ]; /** @@ -76,15 +76,15 @@ class UmbrellaPayment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'payrollCode' => null, 'chargePerTimesheet' => 'double', + 'grossAddition' => 'double', + 'grossDeduction' => 'double', + 'hoursWorked' => 'double', 'invoiceValue' => 'double', 'mapsMiles' => 'int32', - 'otherExpenses' => 'double', 'numberOfTimesheets' => 'int32', - 'hoursWorked' => 'double', - 'grossDeduction' => 'double', - 'grossAddition' => 'double' + 'otherExpenses' => 'double', + 'payrollCode' => null ]; /** @@ -93,15 +93,15 @@ class UmbrellaPayment implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'payrollCode' => true, 'chargePerTimesheet' => true, + 'grossAddition' => false, + 'grossDeduction' => false, + 'hoursWorked' => false, 'invoiceValue' => false, 'mapsMiles' => false, - 'otherExpenses' => false, 'numberOfTimesheets' => false, - 'hoursWorked' => false, - 'grossDeduction' => false, - 'grossAddition' => false + 'otherExpenses' => false, + 'payrollCode' => true ]; /** @@ -190,15 +190,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollCode' => 'payrollCode', 'chargePerTimesheet' => 'chargePerTimesheet', + 'grossAddition' => 'grossAddition', + 'grossDeduction' => 'grossDeduction', + 'hoursWorked' => 'hoursWorked', 'invoiceValue' => 'invoiceValue', 'mapsMiles' => 'mapsMiles', - 'otherExpenses' => 'otherExpenses', 'numberOfTimesheets' => 'numberOfTimesheets', - 'hoursWorked' => 'hoursWorked', - 'grossDeduction' => 'grossDeduction', - 'grossAddition' => 'grossAddition' + 'otherExpenses' => 'otherExpenses', + 'payrollCode' => 'payrollCode' ]; /** @@ -207,15 +207,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollCode' => 'setPayrollCode', 'chargePerTimesheet' => 'setChargePerTimesheet', + 'grossAddition' => 'setGrossAddition', + 'grossDeduction' => 'setGrossDeduction', + 'hoursWorked' => 'setHoursWorked', 'invoiceValue' => 'setInvoiceValue', 'mapsMiles' => 'setMapsMiles', - 'otherExpenses' => 'setOtherExpenses', 'numberOfTimesheets' => 'setNumberOfTimesheets', - 'hoursWorked' => 'setHoursWorked', - 'grossDeduction' => 'setGrossDeduction', - 'grossAddition' => 'setGrossAddition' + 'otherExpenses' => 'setOtherExpenses', + 'payrollCode' => 'setPayrollCode' ]; /** @@ -224,15 +224,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollCode' => 'getPayrollCode', 'chargePerTimesheet' => 'getChargePerTimesheet', + 'grossAddition' => 'getGrossAddition', + 'grossDeduction' => 'getGrossDeduction', + 'hoursWorked' => 'getHoursWorked', 'invoiceValue' => 'getInvoiceValue', 'mapsMiles' => 'getMapsMiles', - 'otherExpenses' => 'getOtherExpenses', 'numberOfTimesheets' => 'getNumberOfTimesheets', - 'hoursWorked' => 'getHoursWorked', - 'grossDeduction' => 'getGrossDeduction', - 'grossAddition' => 'getGrossAddition' + 'otherExpenses' => 'getOtherExpenses', + 'payrollCode' => 'getPayrollCode' ]; /** @@ -291,15 +291,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('chargePerTimesheet', $data ?? [], null); + $this->setIfExists('grossAddition', $data ?? [], null); + $this->setIfExists('grossDeduction', $data ?? [], null); + $this->setIfExists('hoursWorked', $data ?? [], null); $this->setIfExists('invoiceValue', $data ?? [], null); $this->setIfExists('mapsMiles', $data ?? [], null); - $this->setIfExists('otherExpenses', $data ?? [], null); $this->setIfExists('numberOfTimesheets', $data ?? [], null); - $this->setIfExists('hoursWorked', $data ?? [], null); - $this->setIfExists('grossDeduction', $data ?? [], null); - $this->setIfExists('grossAddition', $data ?? [], null); + $this->setIfExists('otherExpenses', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); } /** @@ -345,258 +345,258 @@ public function valid(): bool /** - * Gets payrollCode + * Gets chargePerTimesheet * - * @return string|null + * @return float|null */ - public function getPayrollCode(): ?string + public function getChargePerTimesheet(): ?float { - return $this->container['payrollCode']; + return $this->container['chargePerTimesheet']; } /** - * Sets payrollCode + * Sets chargePerTimesheet * - * @param string|null $payrollCode When importing multiple UmbrellaPayments this field is used to identify the employee + * @param float|null $chargePerTimesheet Override the settings for this employer by specifying a ChargePerTimeSheet. Or leave it as null to use the settings from the Employer * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setChargePerTimesheet(?float $chargePerTimesheet): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); + if (is_null($chargePerTimesheet)) { + array_push($this->openAPINullablesSetToNull, 'chargePerTimesheet'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); + $index = array_search('chargePerTimesheet', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['payrollCode'] = $payrollCode; + $this->container['chargePerTimesheet'] = $chargePerTimesheet; return $this; } /** - * Gets chargePerTimesheet + * Gets grossAddition * * @return float|null */ - public function getChargePerTimesheet(): ?float + public function getGrossAddition(): ?float { - return $this->container['chargePerTimesheet']; + return $this->container['grossAddition']; } /** - * Sets chargePerTimesheet + * Sets grossAddition * - * @param float|null $chargePerTimesheet Override the settings for this employer by specifying a ChargePerTimeSheet. Or leave it as null to use the settings from the Employer + * @param float|null $grossAddition grossAddition * * @return $this */ - public function setChargePerTimesheet(?float $chargePerTimesheet): static + public function setGrossAddition(?float $grossAddition): static { - if (is_null($chargePerTimesheet)) { - array_push($this->openAPINullablesSetToNull, 'chargePerTimesheet'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('chargePerTimesheet', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($grossAddition)) { + throw new InvalidArgumentException('non-nullable grossAddition cannot be null'); } - $this->container['chargePerTimesheet'] = $chargePerTimesheet; + $this->container['grossAddition'] = $grossAddition; return $this; } /** - * Gets invoiceValue + * Gets grossDeduction * * @return float|null */ - public function getInvoiceValue(): ?float + public function getGrossDeduction(): ?float { - return $this->container['invoiceValue']; + return $this->container['grossDeduction']; } /** - * Sets invoiceValue + * Sets grossDeduction * - * @param float|null $invoiceValue invoiceValue + * @param float|null $grossDeduction grossDeduction * * @return $this */ - public function setInvoiceValue(?float $invoiceValue): static + public function setGrossDeduction(?float $grossDeduction): static { - if (is_null($invoiceValue)) { - throw new InvalidArgumentException('non-nullable invoiceValue cannot be null'); + if (is_null($grossDeduction)) { + throw new InvalidArgumentException('non-nullable grossDeduction cannot be null'); } - $this->container['invoiceValue'] = $invoiceValue; + $this->container['grossDeduction'] = $grossDeduction; return $this; } /** - * Gets mapsMiles + * Gets hoursWorked * - * @return int|null + * @return float|null */ - public function getMapsMiles(): ?int + public function getHoursWorked(): ?float { - return $this->container['mapsMiles']; + return $this->container['hoursWorked']; } /** - * Sets mapsMiles + * Sets hoursWorked * - * @param int|null $mapsMiles mapsMiles + * @param float|null $hoursWorked hoursWorked * * @return $this */ - public function setMapsMiles(?int $mapsMiles): static + public function setHoursWorked(?float $hoursWorked): static { - if (is_null($mapsMiles)) { - throw new InvalidArgumentException('non-nullable mapsMiles cannot be null'); + if (is_null($hoursWorked)) { + throw new InvalidArgumentException('non-nullable hoursWorked cannot be null'); } - $this->container['mapsMiles'] = $mapsMiles; + $this->container['hoursWorked'] = $hoursWorked; return $this; } /** - * Gets otherExpenses + * Gets invoiceValue * * @return float|null */ - public function getOtherExpenses(): ?float + public function getInvoiceValue(): ?float { - return $this->container['otherExpenses']; + return $this->container['invoiceValue']; } /** - * Sets otherExpenses + * Sets invoiceValue * - * @param float|null $otherExpenses otherExpenses + * @param float|null $invoiceValue invoiceValue * * @return $this */ - public function setOtherExpenses(?float $otherExpenses): static + public function setInvoiceValue(?float $invoiceValue): static { - if (is_null($otherExpenses)) { - throw new InvalidArgumentException('non-nullable otherExpenses cannot be null'); + if (is_null($invoiceValue)) { + throw new InvalidArgumentException('non-nullable invoiceValue cannot be null'); } - $this->container['otherExpenses'] = $otherExpenses; + $this->container['invoiceValue'] = $invoiceValue; return $this; } /** - * Gets numberOfTimesheets + * Gets mapsMiles * * @return int|null */ - public function getNumberOfTimesheets(): ?int + public function getMapsMiles(): ?int { - return $this->container['numberOfTimesheets']; + return $this->container['mapsMiles']; } /** - * Sets numberOfTimesheets + * Sets mapsMiles * - * @param int|null $numberOfTimesheets numberOfTimesheets + * @param int|null $mapsMiles mapsMiles * * @return $this */ - public function setNumberOfTimesheets(?int $numberOfTimesheets): static + public function setMapsMiles(?int $mapsMiles): static { - if (is_null($numberOfTimesheets)) { - throw new InvalidArgumentException('non-nullable numberOfTimesheets cannot be null'); + if (is_null($mapsMiles)) { + throw new InvalidArgumentException('non-nullable mapsMiles cannot be null'); } - $this->container['numberOfTimesheets'] = $numberOfTimesheets; + $this->container['mapsMiles'] = $mapsMiles; return $this; } /** - * Gets hoursWorked + * Gets numberOfTimesheets * - * @return float|null + * @return int|null */ - public function getHoursWorked(): ?float + public function getNumberOfTimesheets(): ?int { - return $this->container['hoursWorked']; + return $this->container['numberOfTimesheets']; } /** - * Sets hoursWorked + * Sets numberOfTimesheets * - * @param float|null $hoursWorked hoursWorked + * @param int|null $numberOfTimesheets numberOfTimesheets * * @return $this */ - public function setHoursWorked(?float $hoursWorked): static + public function setNumberOfTimesheets(?int $numberOfTimesheets): static { - if (is_null($hoursWorked)) { - throw new InvalidArgumentException('non-nullable hoursWorked cannot be null'); + if (is_null($numberOfTimesheets)) { + throw new InvalidArgumentException('non-nullable numberOfTimesheets cannot be null'); } - $this->container['hoursWorked'] = $hoursWorked; + $this->container['numberOfTimesheets'] = $numberOfTimesheets; return $this; } /** - * Gets grossDeduction + * Gets otherExpenses * * @return float|null */ - public function getGrossDeduction(): ?float + public function getOtherExpenses(): ?float { - return $this->container['grossDeduction']; + return $this->container['otherExpenses']; } /** - * Sets grossDeduction + * Sets otherExpenses * - * @param float|null $grossDeduction grossDeduction + * @param float|null $otherExpenses otherExpenses * * @return $this */ - public function setGrossDeduction(?float $grossDeduction): static + public function setOtherExpenses(?float $otherExpenses): static { - if (is_null($grossDeduction)) { - throw new InvalidArgumentException('non-nullable grossDeduction cannot be null'); + if (is_null($otherExpenses)) { + throw new InvalidArgumentException('non-nullable otherExpenses cannot be null'); } - $this->container['grossDeduction'] = $grossDeduction; + $this->container['otherExpenses'] = $otherExpenses; return $this; } /** - * Gets grossAddition + * Gets payrollCode * - * @return float|null + * @return string|null */ - public function getGrossAddition(): ?float + public function getPayrollCode(): ?string { - return $this->container['grossAddition']; + return $this->container['payrollCode']; } /** - * Sets grossAddition + * Sets payrollCode * - * @param float|null $grossAddition grossAddition + * @param string|null $payrollCode When importing multiple UmbrellaPayments this field is used to identify the employee * * @return $this */ - public function setGrossAddition(?float $grossAddition): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($grossAddition)) { - throw new InvalidArgumentException('non-nullable grossAddition cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['grossAddition'] = $grossAddition; + $this->container['payrollCode'] = $payrollCode; return $this; } diff --git a/src/Model/UmbrellaReconciliationReport.php b/src/Model/UmbrellaReconciliationReport.php index 8d8ecf9..7c3cdde 100644 --- a/src/Model/UmbrellaReconciliationReport.php +++ b/src/Model/UmbrellaReconciliationReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,20 +59,21 @@ class UmbrellaReconciliationReport implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'lines' => '\SynergiTech\Staffology\Model\UmbrellaReconciliationReportLine[]', 'employer' => '\SynergiTech\Staffology\Model\Item', - 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', + 'endDate' => '\DateTime', + 'endPeriodName' => 'string', + 'isDraft' => 'bool', + 'lines' => '\SynergiTech\Staffology\Model\UmbrellaReconciliationReportLine[]', 'ordinal' => 'int', + 'payPeriod' => '\SynergiTech\Staffology\Model\PayPeriods', 'period' => 'int', 'periodTo' => 'int', - 'startPeriodName' => 'string', - 'endPeriodName' => 'string', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', 'report' => '\SynergiTech\Staffology\Model\Report', + 'startDate' => '\DateTime', + 'startPeriodName' => 'string', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', 'title' => 'string', - 'isDraft' => 'bool' + 'version' => 'int' ]; /** @@ -81,20 +82,21 @@ class UmbrellaReconciliationReport implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'lines' => null, 'employer' => null, - 'payPeriod' => null, + 'endDate' => 'date', + 'endPeriodName' => null, + 'isDraft' => null, + 'lines' => null, 'ordinal' => 'int32', + 'payPeriod' => null, 'period' => 'int32', 'periodTo' => 'int32', - 'startPeriodName' => null, - 'endPeriodName' => null, - 'startDate' => 'date', - 'endDate' => 'date', 'report' => null, + 'startDate' => 'date', + 'startPeriodName' => null, 'taxYear' => null, 'title' => null, - 'isDraft' => null + 'version' => 'int32' ]; /** @@ -103,20 +105,21 @@ class UmbrellaReconciliationReport implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'lines' => true, 'employer' => false, - 'payPeriod' => false, + 'endDate' => false, + 'endPeriodName' => true, + 'isDraft' => false, + 'lines' => true, 'ordinal' => false, + 'payPeriod' => false, 'period' => false, 'periodTo' => false, - 'startPeriodName' => true, - 'endPeriodName' => true, - 'startDate' => false, - 'endDate' => false, 'report' => false, + 'startDate' => false, + 'startPeriodName' => true, 'taxYear' => false, 'title' => true, - 'isDraft' => false + 'version' => true ]; /** @@ -205,20 +208,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'lines' => 'lines', 'employer' => 'employer', - 'payPeriod' => 'payPeriod', + 'endDate' => 'endDate', + 'endPeriodName' => 'endPeriodName', + 'isDraft' => 'isDraft', + 'lines' => 'lines', 'ordinal' => 'ordinal', + 'payPeriod' => 'payPeriod', 'period' => 'period', 'periodTo' => 'periodTo', - 'startPeriodName' => 'startPeriodName', - 'endPeriodName' => 'endPeriodName', - 'startDate' => 'startDate', - 'endDate' => 'endDate', 'report' => 'report', + 'startDate' => 'startDate', + 'startPeriodName' => 'startPeriodName', 'taxYear' => 'taxYear', 'title' => 'title', - 'isDraft' => 'isDraft' + 'version' => 'version' ]; /** @@ -227,20 +231,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'lines' => 'setLines', 'employer' => 'setEmployer', - 'payPeriod' => 'setPayPeriod', + 'endDate' => 'setEndDate', + 'endPeriodName' => 'setEndPeriodName', + 'isDraft' => 'setIsDraft', + 'lines' => 'setLines', 'ordinal' => 'setOrdinal', + 'payPeriod' => 'setPayPeriod', 'period' => 'setPeriod', 'periodTo' => 'setPeriodTo', - 'startPeriodName' => 'setStartPeriodName', - 'endPeriodName' => 'setEndPeriodName', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', 'report' => 'setReport', + 'startDate' => 'setStartDate', + 'startPeriodName' => 'setStartPeriodName', 'taxYear' => 'setTaxYear', 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'version' => 'setVersion' ]; /** @@ -249,20 +254,21 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'lines' => 'getLines', 'employer' => 'getEmployer', - 'payPeriod' => 'getPayPeriod', + 'endDate' => 'getEndDate', + 'endPeriodName' => 'getEndPeriodName', + 'isDraft' => 'getIsDraft', + 'lines' => 'getLines', 'ordinal' => 'getOrdinal', + 'payPeriod' => 'getPayPeriod', 'period' => 'getPeriod', 'periodTo' => 'getPeriodTo', - 'startPeriodName' => 'getStartPeriodName', - 'endPeriodName' => 'getEndPeriodName', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', 'report' => 'getReport', + 'startDate' => 'getStartDate', + 'startPeriodName' => 'getStartPeriodName', 'taxYear' => 'getTaxYear', 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'version' => 'getVersion' ]; /** @@ -321,20 +327,21 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('employer', $data ?? [], null); - $this->setIfExists('payPeriod', $data ?? [], null); + $this->setIfExists('endDate', $data ?? [], null); + $this->setIfExists('endPeriodName', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('lines', $data ?? [], null); $this->setIfExists('ordinal', $data ?? [], null); + $this->setIfExists('payPeriod', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); $this->setIfExists('periodTo', $data ?? [], null); - $this->setIfExists('startPeriodName', $data ?? [], null); - $this->setIfExists('endPeriodName', $data ?? [], null); - $this->setIfExists('startDate', $data ?? [], null); - $this->setIfExists('endDate', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('startDate', $data ?? [], null); + $this->setIfExists('startPeriodName', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('version', $data ?? [], null); } /** @@ -380,89 +387,150 @@ public function valid(): bool /** - * Gets lines + * Gets employer * - * @return \SynergiTech\Staffology\Model\UmbrellaReconciliationReportLine[]|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getLines(): ?array + public function getEmployer(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['lines']; + return $this->container['employer']; } /** - * Sets lines + * Sets employer * - * @param \SynergiTech\Staffology\Model\UmbrellaReconciliationReportLine[]|null $lines lines + * @param \SynergiTech\Staffology\Model\Item|null $employer employer * * @return $this */ - public function setLines(?array $lines): static + public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static { - if (is_null($lines)) { - array_push($this->openAPINullablesSetToNull, 'lines'); + if (is_null($employer)) { + throw new InvalidArgumentException('non-nullable employer cannot be null'); + } + $this->container['employer'] = $employer; + + return $this; + } + + /** + * Gets endDate + * + * @return \DateTime|null + */ + public function getEndDate(): ?\DateTime + { + return $this->container['endDate']; + } + + /** + * Sets endDate + * + * @param \DateTime|null $endDate endDate + * + * @return $this + */ + public function setEndDate(?\DateTime $endDate): static + { + if (is_null($endDate)) { + throw new InvalidArgumentException('non-nullable endDate cannot be null'); + } + $this->container['endDate'] = $endDate; + + return $this; + } + + /** + * Gets endPeriodName + * + * @return string|null + */ + public function getEndPeriodName(): ?string + { + return $this->container['endPeriodName']; + } + + /** + * Sets endPeriodName + * + * @param string|null $endPeriodName endPeriodName + * + * @return $this + */ + public function setEndPeriodName(?string $endPeriodName): static + { + if (is_null($endPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'endPeriodName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lines', $nullablesSetToNull); + $index = array_search('endPeriodName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lines'] = $lines; + $this->container['endPeriodName'] = $endPeriodName; return $this; } /** - * Gets employer + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\Item|null + * @return bool|null */ - public function getEmployer(): ?\SynergiTech\Staffology\Model\Item + public function getIsDraft(): ?bool { - return $this->container['employer']; + return $this->container['isDraft']; } /** - * Sets employer + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\Item|null $employer employer + * @param bool|null $isDraft isDraft * * @return $this */ - public function setEmployer(?\SynergiTech\Staffology\Model\Item $employer): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($employer)) { - throw new InvalidArgumentException('non-nullable employer cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['employer'] = $employer; + $this->container['isDraft'] = $isDraft; return $this; } /** - * Gets payPeriod + * Gets lines * - * @return \SynergiTech\Staffology\Model\PayPeriods|null + * @return \SynergiTech\Staffology\Model\UmbrellaReconciliationReportLine[]|null */ - public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + public function getLines(): ?array { - return $this->container['payPeriod']; + return $this->container['lines']; } /** - * Sets payPeriod + * Sets lines * - * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * @param \SynergiTech\Staffology\Model\UmbrellaReconciliationReportLine[]|null $lines lines * * @return $this */ - public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + public function setLines(?array $lines): static { - if (is_null($payPeriod)) { - throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + if (is_null($lines)) { + array_push($this->openAPINullablesSetToNull, 'lines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payPeriod'] = $payPeriod; + $this->container['lines'] = $lines; return $this; } @@ -494,6 +562,33 @@ public function setOrdinal(?int $ordinal): static return $this; } + /** + * Gets payPeriod + * + * @return \SynergiTech\Staffology\Model\PayPeriods|null + */ + public function getPayPeriod(): ?\SynergiTech\Staffology\Model\PayPeriods + { + return $this->container['payPeriod']; + } + + /** + * Sets payPeriod + * + * @param \SynergiTech\Staffology\Model\PayPeriods|null $payPeriod payPeriod + * + * @return $this + */ + public function setPayPeriod(?\SynergiTech\Staffology\Model\PayPeriods $payPeriod): static + { + if (is_null($payPeriod)) { + throw new InvalidArgumentException('non-nullable payPeriod cannot be null'); + } + $this->container['payPeriod'] = $payPeriod; + + return $this; + } + /** * Gets period * @@ -549,69 +644,28 @@ public function setPeriodTo(?int $periodTo): static } /** - * Gets startPeriodName - * - * @return string|null - */ - public function getStartPeriodName(): ?string - { - return $this->container['startPeriodName']; - } - - /** - * Sets startPeriodName - * - * @param string|null $startPeriodName startPeriodName - * - * @return $this - */ - public function setStartPeriodName(?string $startPeriodName): static - { - if (is_null($startPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'startPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('startPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['startPeriodName'] = $startPeriodName; - - return $this; - } - - /** - * Gets endPeriodName + * Gets report * - * @return string|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getEndPeriodName(): ?string + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['endPeriodName']; + return $this->container['report']; } /** - * Sets endPeriodName + * Sets report * - * @param string|null $endPeriodName endPeriodName + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setEndPeriodName(?string $endPeriodName): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($endPeriodName)) { - array_push($this->openAPINullablesSetToNull, 'endPeriodName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('endPeriodName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['endPeriodName'] = $endPeriodName; + $this->container['report'] = $report; return $this; } @@ -644,55 +698,35 @@ public function setStartDate(?\DateTime $startDate): static } /** - * Gets endDate - * - * @return \DateTime|null - */ - public function getEndDate(): ?\DateTime - { - return $this->container['endDate']; - } - - /** - * Sets endDate - * - * @param \DateTime|null $endDate endDate - * - * @return $this - */ - public function setEndDate(?\DateTime $endDate): static - { - if (is_null($endDate)) { - throw new InvalidArgumentException('non-nullable endDate cannot be null'); - } - $this->container['endDate'] = $endDate; - - return $this; - } - - /** - * Gets report + * Gets startPeriodName * - * @return \SynergiTech\Staffology\Model\Report|null + * @return string|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getStartPeriodName(): ?string { - return $this->container['report']; + return $this->container['startPeriodName']; } /** - * Sets report + * Sets startPeriodName * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param string|null $startPeriodName startPeriodName * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setStartPeriodName(?string $startPeriodName): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($startPeriodName)) { + array_push($this->openAPINullablesSetToNull, 'startPeriodName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('startPeriodName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['report'] = $report; + $this->container['startPeriodName'] = $startPeriodName; return $this; } @@ -759,28 +793,35 @@ public function setTitle(?string $title): static } /** - * Gets isDraft + * Gets version * - * @return bool|null + * @return int|null */ - public function getIsDraft(): ?bool + public function getVersion(): ?int { - return $this->container['isDraft']; + return $this->container['version']; } /** - * Sets isDraft + * Sets version * - * @param bool|null $isDraft isDraft + * @param int|null $version version * * @return $this */ - public function setIsDraft(?bool $isDraft): static + public function setVersion(?int $version): static { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); + if (is_null($version)) { + array_push($this->openAPINullablesSetToNull, 'version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('version', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isDraft'] = $isDraft; + $this->container['version'] = $version; return $this; } diff --git a/src/Model/UmbrellaReconciliationReportLine.php b/src/Model/UmbrellaReconciliationReportLine.php index 0c55127..b48a36f 100644 --- a/src/Model/UmbrellaReconciliationReportLine.php +++ b/src/Model/UmbrellaReconciliationReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,24 +59,24 @@ class UmbrellaReconciliationReportLine implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ - 'employee' => '\SynergiTech\Staffology\Model\Item', - 'period' => 'string', - 'payrollCode' => 'string', + 'appLevy' => 'float', 'department' => 'string', - 'totalGross' => 'float', - 'netPay' => 'float', - 'tax' => 'float', + 'employee' => '\SynergiTech\Staffology\Model\Item', + 'employeeCosts' => 'float', 'employeeNi' => 'float', - 'employerNi' => 'float', 'employeePension' => 'float', + 'employerCosts' => 'float', + 'employerNi' => 'float', 'employerPension' => 'float', 'expenses' => 'float', 'fee' => 'float', - 'appLevy' => 'float', 'invoiceValue' => 'float', - 'employeeCosts' => 'float', - 'employerCosts' => 'float', - 'total' => 'float' + 'netPay' => 'float', + 'payrollCode' => 'string', + 'period' => 'string', + 'tax' => 'float', + 'total' => 'float', + 'totalGross' => 'float' ]; /** @@ -85,24 +85,24 @@ class UmbrellaReconciliationReportLine implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPIFormats = [ - 'employee' => null, - 'period' => null, - 'payrollCode' => null, + 'appLevy' => 'double', 'department' => null, - 'totalGross' => 'double', - 'netPay' => 'double', - 'tax' => 'double', + 'employee' => null, + 'employeeCosts' => 'double', 'employeeNi' => 'double', - 'employerNi' => 'double', 'employeePension' => 'double', + 'employerCosts' => 'double', + 'employerNi' => 'double', 'employerPension' => 'double', 'expenses' => 'double', 'fee' => 'double', - 'appLevy' => 'double', 'invoiceValue' => 'double', - 'employeeCosts' => 'double', - 'employerCosts' => 'double', - 'total' => 'double' + 'netPay' => 'double', + 'payrollCode' => null, + 'period' => null, + 'tax' => 'double', + 'total' => 'double', + 'totalGross' => 'double' ]; /** @@ -111,24 +111,24 @@ class UmbrellaReconciliationReportLine implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPINullables = [ - 'employee' => false, - 'period' => true, - 'payrollCode' => true, + 'appLevy' => false, 'department' => true, - 'totalGross' => false, - 'netPay' => false, - 'tax' => false, + 'employee' => false, + 'employeeCosts' => false, 'employeeNi' => false, - 'employerNi' => false, 'employeePension' => false, + 'employerCosts' => false, + 'employerNi' => false, 'employerPension' => false, 'expenses' => false, 'fee' => false, - 'appLevy' => false, 'invoiceValue' => false, - 'employeeCosts' => false, - 'employerCosts' => false, - 'total' => false + 'netPay' => false, + 'payrollCode' => true, + 'period' => true, + 'tax' => false, + 'total' => false, + 'totalGross' => false ]; /** @@ -217,24 +217,24 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employee' => 'employee', - 'period' => 'period', - 'payrollCode' => 'payrollCode', + 'appLevy' => 'appLevy', 'department' => 'department', - 'totalGross' => 'totalGross', - 'netPay' => 'netPay', - 'tax' => 'tax', + 'employee' => 'employee', + 'employeeCosts' => 'employeeCosts', 'employeeNi' => 'employeeNi', - 'employerNi' => 'employerNi', 'employeePension' => 'employeePension', + 'employerCosts' => 'employerCosts', + 'employerNi' => 'employerNi', 'employerPension' => 'employerPension', 'expenses' => 'expenses', 'fee' => 'fee', - 'appLevy' => 'appLevy', 'invoiceValue' => 'invoiceValue', - 'employeeCosts' => 'employeeCosts', - 'employerCosts' => 'employerCosts', - 'total' => 'total' + 'netPay' => 'netPay', + 'payrollCode' => 'payrollCode', + 'period' => 'period', + 'tax' => 'tax', + 'total' => 'total', + 'totalGross' => 'totalGross' ]; /** @@ -243,24 +243,24 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employee' => 'setEmployee', - 'period' => 'setPeriod', - 'payrollCode' => 'setPayrollCode', + 'appLevy' => 'setAppLevy', 'department' => 'setDepartment', - 'totalGross' => 'setTotalGross', - 'netPay' => 'setNetPay', - 'tax' => 'setTax', + 'employee' => 'setEmployee', + 'employeeCosts' => 'setEmployeeCosts', 'employeeNi' => 'setEmployeeNi', - 'employerNi' => 'setEmployerNi', 'employeePension' => 'setEmployeePension', + 'employerCosts' => 'setEmployerCosts', + 'employerNi' => 'setEmployerNi', 'employerPension' => 'setEmployerPension', 'expenses' => 'setExpenses', 'fee' => 'setFee', - 'appLevy' => 'setAppLevy', 'invoiceValue' => 'setInvoiceValue', - 'employeeCosts' => 'setEmployeeCosts', - 'employerCosts' => 'setEmployerCosts', - 'total' => 'setTotal' + 'netPay' => 'setNetPay', + 'payrollCode' => 'setPayrollCode', + 'period' => 'setPeriod', + 'tax' => 'setTax', + 'total' => 'setTotal', + 'totalGross' => 'setTotalGross' ]; /** @@ -269,24 +269,24 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employee' => 'getEmployee', - 'period' => 'getPeriod', - 'payrollCode' => 'getPayrollCode', + 'appLevy' => 'getAppLevy', 'department' => 'getDepartment', - 'totalGross' => 'getTotalGross', - 'netPay' => 'getNetPay', - 'tax' => 'getTax', + 'employee' => 'getEmployee', + 'employeeCosts' => 'getEmployeeCosts', 'employeeNi' => 'getEmployeeNi', - 'employerNi' => 'getEmployerNi', 'employeePension' => 'getEmployeePension', + 'employerCosts' => 'getEmployerCosts', + 'employerNi' => 'getEmployerNi', 'employerPension' => 'getEmployerPension', 'expenses' => 'getExpenses', 'fee' => 'getFee', - 'appLevy' => 'getAppLevy', 'invoiceValue' => 'getInvoiceValue', - 'employeeCosts' => 'getEmployeeCosts', - 'employerCosts' => 'getEmployerCosts', - 'total' => 'getTotal' + 'netPay' => 'getNetPay', + 'payrollCode' => 'getPayrollCode', + 'period' => 'getPeriod', + 'tax' => 'getTax', + 'total' => 'getTotal', + 'totalGross' => 'getTotalGross' ]; /** @@ -345,24 +345,24 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employee', $data ?? [], null); - $this->setIfExists('period', $data ?? [], null); - $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('appLevy', $data ?? [], null); $this->setIfExists('department', $data ?? [], null); - $this->setIfExists('totalGross', $data ?? [], null); - $this->setIfExists('netPay', $data ?? [], null); - $this->setIfExists('tax', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); + $this->setIfExists('employeeCosts', $data ?? [], null); $this->setIfExists('employeeNi', $data ?? [], null); - $this->setIfExists('employerNi', $data ?? [], null); $this->setIfExists('employeePension', $data ?? [], null); + $this->setIfExists('employerCosts', $data ?? [], null); + $this->setIfExists('employerNi', $data ?? [], null); $this->setIfExists('employerPension', $data ?? [], null); $this->setIfExists('expenses', $data ?? [], null); $this->setIfExists('fee', $data ?? [], null); - $this->setIfExists('appLevy', $data ?? [], null); $this->setIfExists('invoiceValue', $data ?? [], null); - $this->setIfExists('employeeCosts', $data ?? [], null); - $this->setIfExists('employerCosts', $data ?? [], null); + $this->setIfExists('netPay', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); + $this->setIfExists('period', $data ?? [], null); + $this->setIfExists('tax', $data ?? [], null); $this->setIfExists('total', $data ?? [], null); + $this->setIfExists('totalGross', $data ?? [], null); } /** @@ -408,96 +408,28 @@ public function valid(): bool /** - * Gets employee - * - * @return \SynergiTech\Staffology\Model\Item|null - */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item - { - return $this->container['employee']; - } - - /** - * Sets employee - * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee - * - * @return $this - */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static - { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); - } - $this->container['employee'] = $employee; - - return $this; - } - - /** - * Gets period - * - * @return string|null - */ - public function getPeriod(): ?string - { - return $this->container['period']; - } - - /** - * Sets period - * - * @param string|null $period period - * - * @return $this - */ - public function setPeriod(?string $period): static - { - if (is_null($period)) { - array_push($this->openAPINullablesSetToNull, 'period'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('period', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['period'] = $period; - - return $this; - } - - /** - * Gets payrollCode + * Gets appLevy * - * @return string|null + * @return float|null */ - public function getPayrollCode(): ?string + public function getAppLevy(): ?float { - return $this->container['payrollCode']; + return $this->container['appLevy']; } /** - * Sets payrollCode + * Sets appLevy * - * @param string|null $payrollCode payrollCode + * @param float|null $appLevy appLevy * * @return $this */ - public function setPayrollCode(?string $payrollCode): static + public function setAppLevy(?float $appLevy): static { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($appLevy)) { + throw new InvalidArgumentException('non-nullable appLevy cannot be null'); } - $this->container['payrollCode'] = $payrollCode; + $this->container['appLevy'] = $appLevy; return $this; } @@ -537,163 +469,163 @@ public function setDepartment(?string $department): static } /** - * Gets totalGross + * Gets employee * - * @return float|null + * @return \SynergiTech\Staffology\Model\Item|null */ - public function getTotalGross(): ?float + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item { - return $this->container['totalGross']; + return $this->container['employee']; } /** - * Sets totalGross + * Sets employee * - * @param float|null $totalGross totalGross + * @param \SynergiTech\Staffology\Model\Item|null $employee employee * * @return $this */ - public function setTotalGross(?float $totalGross): static + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static { - if (is_null($totalGross)) { - throw new InvalidArgumentException('non-nullable totalGross cannot be null'); + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); } - $this->container['totalGross'] = $totalGross; + $this->container['employee'] = $employee; return $this; } /** - * Gets netPay + * Gets employeeCosts * * @return float|null */ - public function getNetPay(): ?float + public function getEmployeeCosts(): ?float { - return $this->container['netPay']; + return $this->container['employeeCosts']; } /** - * Sets netPay + * Sets employeeCosts * - * @param float|null $netPay netPay + * @param float|null $employeeCosts employeeCosts * * @return $this */ - public function setNetPay(?float $netPay): static + public function setEmployeeCosts(?float $employeeCosts): static { - if (is_null($netPay)) { - throw new InvalidArgumentException('non-nullable netPay cannot be null'); + if (is_null($employeeCosts)) { + throw new InvalidArgumentException('non-nullable employeeCosts cannot be null'); } - $this->container['netPay'] = $netPay; + $this->container['employeeCosts'] = $employeeCosts; return $this; } /** - * Gets tax + * Gets employeeNi * * @return float|null */ - public function getTax(): ?float + public function getEmployeeNi(): ?float { - return $this->container['tax']; + return $this->container['employeeNi']; } /** - * Sets tax + * Sets employeeNi * - * @param float|null $tax tax + * @param float|null $employeeNi employeeNi * * @return $this */ - public function setTax(?float $tax): static + public function setEmployeeNi(?float $employeeNi): static { - if (is_null($tax)) { - throw new InvalidArgumentException('non-nullable tax cannot be null'); + if (is_null($employeeNi)) { + throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); } - $this->container['tax'] = $tax; + $this->container['employeeNi'] = $employeeNi; return $this; } /** - * Gets employeeNi + * Gets employeePension * * @return float|null */ - public function getEmployeeNi(): ?float + public function getEmployeePension(): ?float { - return $this->container['employeeNi']; + return $this->container['employeePension']; } /** - * Sets employeeNi + * Sets employeePension * - * @param float|null $employeeNi employeeNi + * @param float|null $employeePension employeePension * * @return $this */ - public function setEmployeeNi(?float $employeeNi): static + public function setEmployeePension(?float $employeePension): static { - if (is_null($employeeNi)) { - throw new InvalidArgumentException('non-nullable employeeNi cannot be null'); + if (is_null($employeePension)) { + throw new InvalidArgumentException('non-nullable employeePension cannot be null'); } - $this->container['employeeNi'] = $employeeNi; + $this->container['employeePension'] = $employeePension; return $this; } /** - * Gets employerNi + * Gets employerCosts * * @return float|null */ - public function getEmployerNi(): ?float + public function getEmployerCosts(): ?float { - return $this->container['employerNi']; + return $this->container['employerCosts']; } /** - * Sets employerNi + * Sets employerCosts * - * @param float|null $employerNi employerNi + * @param float|null $employerCosts employerCosts * * @return $this */ - public function setEmployerNi(?float $employerNi): static + public function setEmployerCosts(?float $employerCosts): static { - if (is_null($employerNi)) { - throw new InvalidArgumentException('non-nullable employerNi cannot be null'); + if (is_null($employerCosts)) { + throw new InvalidArgumentException('non-nullable employerCosts cannot be null'); } - $this->container['employerNi'] = $employerNi; + $this->container['employerCosts'] = $employerCosts; return $this; } /** - * Gets employeePension + * Gets employerNi * * @return float|null */ - public function getEmployeePension(): ?float + public function getEmployerNi(): ?float { - return $this->container['employeePension']; + return $this->container['employerNi']; } /** - * Sets employeePension + * Sets employerNi * - * @param float|null $employeePension employeePension + * @param float|null $employerNi employerNi * * @return $this */ - public function setEmployeePension(?float $employeePension): static + public function setEmployerNi(?float $employerNi): static { - if (is_null($employeePension)) { - throw new InvalidArgumentException('non-nullable employeePension cannot be null'); + if (is_null($employerNi)) { + throw new InvalidArgumentException('non-nullable employerNi cannot be null'); } - $this->container['employeePension'] = $employeePension; + $this->container['employerNi'] = $employerNi; return $this; } @@ -780,109 +712,150 @@ public function setFee(?float $fee): static } /** - * Gets appLevy + * Gets invoiceValue * * @return float|null */ - public function getAppLevy(): ?float + public function getInvoiceValue(): ?float { - return $this->container['appLevy']; + return $this->container['invoiceValue']; } /** - * Sets appLevy + * Sets invoiceValue * - * @param float|null $appLevy appLevy + * @param float|null $invoiceValue invoiceValue * * @return $this */ - public function setAppLevy(?float $appLevy): static + public function setInvoiceValue(?float $invoiceValue): static { - if (is_null($appLevy)) { - throw new InvalidArgumentException('non-nullable appLevy cannot be null'); + if (is_null($invoiceValue)) { + throw new InvalidArgumentException('non-nullable invoiceValue cannot be null'); } - $this->container['appLevy'] = $appLevy; + $this->container['invoiceValue'] = $invoiceValue; return $this; } /** - * Gets invoiceValue + * Gets netPay * * @return float|null */ - public function getInvoiceValue(): ?float + public function getNetPay(): ?float { - return $this->container['invoiceValue']; + return $this->container['netPay']; } /** - * Sets invoiceValue + * Sets netPay * - * @param float|null $invoiceValue invoiceValue + * @param float|null $netPay netPay * * @return $this */ - public function setInvoiceValue(?float $invoiceValue): static + public function setNetPay(?float $netPay): static { - if (is_null($invoiceValue)) { - throw new InvalidArgumentException('non-nullable invoiceValue cannot be null'); + if (is_null($netPay)) { + throw new InvalidArgumentException('non-nullable netPay cannot be null'); } - $this->container['invoiceValue'] = $invoiceValue; + $this->container['netPay'] = $netPay; return $this; } /** - * Gets employeeCosts + * Gets payrollCode * - * @return float|null + * @return string|null */ - public function getEmployeeCosts(): ?float + public function getPayrollCode(): ?string { - return $this->container['employeeCosts']; + return $this->container['payrollCode']; } /** - * Sets employeeCosts + * Sets payrollCode * - * @param float|null $employeeCosts employeeCosts + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setEmployeeCosts(?float $employeeCosts): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($employeeCosts)) { - throw new InvalidArgumentException('non-nullable employeeCosts cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['employeeCosts'] = $employeeCosts; + $this->container['payrollCode'] = $payrollCode; return $this; } /** - * Gets employerCosts + * Gets period + * + * @return string|null + */ + public function getPeriod(): ?string + { + return $this->container['period']; + } + + /** + * Sets period + * + * @param string|null $period period + * + * @return $this + */ + public function setPeriod(?string $period): static + { + if (is_null($period)) { + array_push($this->openAPINullablesSetToNull, 'period'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('period', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['period'] = $period; + + return $this; + } + + /** + * Gets tax * * @return float|null */ - public function getEmployerCosts(): ?float + public function getTax(): ?float { - return $this->container['employerCosts']; + return $this->container['tax']; } /** - * Sets employerCosts + * Sets tax * - * @param float|null $employerCosts employerCosts + * @param float|null $tax tax * * @return $this */ - public function setEmployerCosts(?float $employerCosts): static + public function setTax(?float $tax): static { - if (is_null($employerCosts)) { - throw new InvalidArgumentException('non-nullable employerCosts cannot be null'); + if (is_null($tax)) { + throw new InvalidArgumentException('non-nullable tax cannot be null'); } - $this->container['employerCosts'] = $employerCosts; + $this->container['tax'] = $tax; return $this; } @@ -913,6 +886,33 @@ public function setTotal(?float $total): static return $this; } + + /** + * Gets totalGross + * + * @return float|null + */ + public function getTotalGross(): ?float + { + return $this->container['totalGross']; + } + + /** + * Sets totalGross + * + * @param float|null $totalGross totalGross + * + * @return $this + */ + public function setTotalGross(?float $totalGross): static + { + if (is_null($totalGross)) { + throw new InvalidArgumentException('non-nullable totalGross cannot be null'); + } + $this->container['totalGross'] = $totalGross; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/UmbrellaReconciliationReportReportResponse.php b/src/Model/UmbrellaReconciliationReportReportResponse.php index 84e1aa4..7a859d3 100644 --- a/src/Model/UmbrellaReconciliationReportReportResponse.php +++ b/src/Model/UmbrellaReconciliationReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class UmbrellaReconciliationReportReportResponse implements ModelInterface, Arra * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\UmbrellaReconciliationReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class UmbrellaReconciliationReportReportResponse implements ModelInterface, Arra * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class UmbrellaReconciliationReportReportResponse implements ModelInterface, Arra * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/UsageBill.php b/src/Model/UsageBill.php index c53506c..ded5554 100644 --- a/src/Model/UsageBill.php +++ b/src/Model/UsageBill.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,22 +59,22 @@ class UsageBill implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'year' => 'int', + 'accountingCustomerId' => 'string', + 'accountingInvoiceId' => 'string', + 'accountingInvoiceLink' => 'string', + 'discount' => 'float', + 'id' => 'string', 'month' => 'int', - 'payslipCount' => 'int', - 'previouslyBilledPayslipCount' => 'int', + 'monthlyMinimum' => 'float', 'netCost' => 'float', - 'discount' => 'float', + 'paid' => 'bool', 'partnerDiscountAmount' => 'float', - 'monthlyMinimum' => 'float', + 'payslipCount' => 'int', + 'previouslyBilledPayslipCount' => 'int', 'total' => 'float', - 'paid' => 'bool', 'usage' => '\SynergiTech\Staffology\Model\Item[]', - 'accountingCustomerId' => 'string', - 'accountingInvoiceId' => 'string', - 'accountingInvoiceLink' => 'string', 'useNetSuite' => 'bool', - 'id' => 'string' + 'year' => 'int' ]; /** @@ -83,22 +83,22 @@ class UsageBill implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'year' => 'int32', + 'accountingCustomerId' => null, + 'accountingInvoiceId' => null, + 'accountingInvoiceLink' => null, + 'discount' => 'double', + 'id' => 'uuid', 'month' => 'int32', - 'payslipCount' => 'int32', - 'previouslyBilledPayslipCount' => 'int32', + 'monthlyMinimum' => 'double', 'netCost' => 'double', - 'discount' => 'double', + 'paid' => null, 'partnerDiscountAmount' => 'double', - 'monthlyMinimum' => 'double', + 'payslipCount' => 'int32', + 'previouslyBilledPayslipCount' => 'int32', 'total' => 'double', - 'paid' => null, 'usage' => null, - 'accountingCustomerId' => null, - 'accountingInvoiceId' => null, - 'accountingInvoiceLink' => null, 'useNetSuite' => null, - 'id' => 'uuid' + 'year' => 'int32' ]; /** @@ -107,22 +107,22 @@ class UsageBill implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'year' => false, + 'accountingCustomerId' => true, + 'accountingInvoiceId' => true, + 'accountingInvoiceLink' => true, + 'discount' => false, + 'id' => false, 'month' => false, - 'payslipCount' => false, - 'previouslyBilledPayslipCount' => false, + 'monthlyMinimum' => false, 'netCost' => false, - 'discount' => false, + 'paid' => false, 'partnerDiscountAmount' => false, - 'monthlyMinimum' => false, + 'payslipCount' => false, + 'previouslyBilledPayslipCount' => false, 'total' => false, - 'paid' => false, 'usage' => true, - 'accountingCustomerId' => true, - 'accountingInvoiceId' => true, - 'accountingInvoiceLink' => true, 'useNetSuite' => false, - 'id' => false + 'year' => false ]; /** @@ -211,22 +211,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'year' => 'year', + 'accountingCustomerId' => 'accountingCustomerId', + 'accountingInvoiceId' => 'accountingInvoiceId', + 'accountingInvoiceLink' => 'accountingInvoiceLink', + 'discount' => 'discount', + 'id' => 'id', 'month' => 'month', - 'payslipCount' => 'payslipCount', - 'previouslyBilledPayslipCount' => 'previouslyBilledPayslipCount', + 'monthlyMinimum' => 'monthlyMinimum', 'netCost' => 'netCost', - 'discount' => 'discount', + 'paid' => 'paid', 'partnerDiscountAmount' => 'partnerDiscountAmount', - 'monthlyMinimum' => 'monthlyMinimum', + 'payslipCount' => 'payslipCount', + 'previouslyBilledPayslipCount' => 'previouslyBilledPayslipCount', 'total' => 'total', - 'paid' => 'paid', 'usage' => 'usage', - 'accountingCustomerId' => 'accountingCustomerId', - 'accountingInvoiceId' => 'accountingInvoiceId', - 'accountingInvoiceLink' => 'accountingInvoiceLink', 'useNetSuite' => 'useNetSuite', - 'id' => 'id' + 'year' => 'year' ]; /** @@ -235,22 +235,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'year' => 'setYear', + 'accountingCustomerId' => 'setAccountingCustomerId', + 'accountingInvoiceId' => 'setAccountingInvoiceId', + 'accountingInvoiceLink' => 'setAccountingInvoiceLink', + 'discount' => 'setDiscount', + 'id' => 'setId', 'month' => 'setMonth', - 'payslipCount' => 'setPayslipCount', - 'previouslyBilledPayslipCount' => 'setPreviouslyBilledPayslipCount', + 'monthlyMinimum' => 'setMonthlyMinimum', 'netCost' => 'setNetCost', - 'discount' => 'setDiscount', + 'paid' => 'setPaid', 'partnerDiscountAmount' => 'setPartnerDiscountAmount', - 'monthlyMinimum' => 'setMonthlyMinimum', + 'payslipCount' => 'setPayslipCount', + 'previouslyBilledPayslipCount' => 'setPreviouslyBilledPayslipCount', 'total' => 'setTotal', - 'paid' => 'setPaid', 'usage' => 'setUsage', - 'accountingCustomerId' => 'setAccountingCustomerId', - 'accountingInvoiceId' => 'setAccountingInvoiceId', - 'accountingInvoiceLink' => 'setAccountingInvoiceLink', 'useNetSuite' => 'setUseNetSuite', - 'id' => 'setId' + 'year' => 'setYear' ]; /** @@ -259,22 +259,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'year' => 'getYear', + 'accountingCustomerId' => 'getAccountingCustomerId', + 'accountingInvoiceId' => 'getAccountingInvoiceId', + 'accountingInvoiceLink' => 'getAccountingInvoiceLink', + 'discount' => 'getDiscount', + 'id' => 'getId', 'month' => 'getMonth', - 'payslipCount' => 'getPayslipCount', - 'previouslyBilledPayslipCount' => 'getPreviouslyBilledPayslipCount', + 'monthlyMinimum' => 'getMonthlyMinimum', 'netCost' => 'getNetCost', - 'discount' => 'getDiscount', + 'paid' => 'getPaid', 'partnerDiscountAmount' => 'getPartnerDiscountAmount', - 'monthlyMinimum' => 'getMonthlyMinimum', + 'payslipCount' => 'getPayslipCount', + 'previouslyBilledPayslipCount' => 'getPreviouslyBilledPayslipCount', 'total' => 'getTotal', - 'paid' => 'getPaid', 'usage' => 'getUsage', - 'accountingCustomerId' => 'getAccountingCustomerId', - 'accountingInvoiceId' => 'getAccountingInvoiceId', - 'accountingInvoiceLink' => 'getAccountingInvoiceLink', 'useNetSuite' => 'getUseNetSuite', - 'id' => 'getId' + 'year' => 'getYear' ]; /** @@ -333,22 +333,22 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('year', $data ?? [], null); + $this->setIfExists('accountingCustomerId', $data ?? [], null); + $this->setIfExists('accountingInvoiceId', $data ?? [], null); + $this->setIfExists('accountingInvoiceLink', $data ?? [], null); + $this->setIfExists('discount', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('month', $data ?? [], null); - $this->setIfExists('payslipCount', $data ?? [], null); - $this->setIfExists('previouslyBilledPayslipCount', $data ?? [], null); + $this->setIfExists('monthlyMinimum', $data ?? [], null); $this->setIfExists('netCost', $data ?? [], null); - $this->setIfExists('discount', $data ?? [], null); + $this->setIfExists('paid', $data ?? [], null); $this->setIfExists('partnerDiscountAmount', $data ?? [], null); - $this->setIfExists('monthlyMinimum', $data ?? [], null); + $this->setIfExists('payslipCount', $data ?? [], null); + $this->setIfExists('previouslyBilledPayslipCount', $data ?? [], null); $this->setIfExists('total', $data ?? [], null); - $this->setIfExists('paid', $data ?? [], null); $this->setIfExists('usage', $data ?? [], null); - $this->setIfExists('accountingCustomerId', $data ?? [], null); - $this->setIfExists('accountingInvoiceId', $data ?? [], null); - $this->setIfExists('accountingInvoiceLink', $data ?? [], null); $this->setIfExists('useNetSuite', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('year', $data ?? [], null); } /** @@ -394,190 +394,184 @@ public function valid(): bool /** - * Gets year - * - * @return int|null - */ - public function getYear(): ?int - { - return $this->container['year']; - } - - /** - * Sets year - * - * @param int|null $year year - * - * @return $this - */ - public function setYear(?int $year): static - { - if (is_null($year)) { - throw new InvalidArgumentException('non-nullable year cannot be null'); - } - $this->container['year'] = $year; - - return $this; - } - - /** - * Gets month + * Gets accountingCustomerId * - * @return int|null + * @return string|null */ - public function getMonth(): ?int + public function getAccountingCustomerId(): ?string { - return $this->container['month']; + return $this->container['accountingCustomerId']; } /** - * Sets month + * Sets accountingCustomerId * - * @param int|null $month month + * @param string|null $accountingCustomerId accountingCustomerId * * @return $this */ - public function setMonth(?int $month): static + public function setAccountingCustomerId(?string $accountingCustomerId): static { - if (is_null($month)) { - throw new InvalidArgumentException('non-nullable month cannot be null'); + if (is_null($accountingCustomerId)) { + array_push($this->openAPINullablesSetToNull, 'accountingCustomerId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountingCustomerId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['month'] = $month; + $this->container['accountingCustomerId'] = $accountingCustomerId; return $this; } /** - * Gets payslipCount + * Gets accountingInvoiceId * - * @return int|null + * @return string|null */ - public function getPayslipCount(): ?int + public function getAccountingInvoiceId(): ?string { - return $this->container['payslipCount']; + return $this->container['accountingInvoiceId']; } /** - * Sets payslipCount + * Sets accountingInvoiceId * - * @param int|null $payslipCount payslipCount + * @param string|null $accountingInvoiceId accountingInvoiceId * * @return $this */ - public function setPayslipCount(?int $payslipCount): static + public function setAccountingInvoiceId(?string $accountingInvoiceId): static { - if (is_null($payslipCount)) { - throw new InvalidArgumentException('non-nullable payslipCount cannot be null'); + if (is_null($accountingInvoiceId)) { + array_push($this->openAPINullablesSetToNull, 'accountingInvoiceId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountingInvoiceId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['payslipCount'] = $payslipCount; + $this->container['accountingInvoiceId'] = $accountingInvoiceId; return $this; } /** - * Gets previouslyBilledPayslipCount + * Gets accountingInvoiceLink * - * @return int|null + * @return string|null */ - public function getPreviouslyBilledPayslipCount(): ?int + public function getAccountingInvoiceLink(): ?string { - return $this->container['previouslyBilledPayslipCount']; + return $this->container['accountingInvoiceLink']; } /** - * Sets previouslyBilledPayslipCount + * Sets accountingInvoiceLink * - * @param int|null $previouslyBilledPayslipCount The number of payslips that appear in the usage, but were billed in a previous period + * @param string|null $accountingInvoiceLink accountingInvoiceLink * * @return $this */ - public function setPreviouslyBilledPayslipCount(?int $previouslyBilledPayslipCount): static + public function setAccountingInvoiceLink(?string $accountingInvoiceLink): static { - if (is_null($previouslyBilledPayslipCount)) { - throw new InvalidArgumentException('non-nullable previouslyBilledPayslipCount cannot be null'); + if (is_null($accountingInvoiceLink)) { + array_push($this->openAPINullablesSetToNull, 'accountingInvoiceLink'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountingInvoiceLink', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['previouslyBilledPayslipCount'] = $previouslyBilledPayslipCount; + $this->container['accountingInvoiceLink'] = $accountingInvoiceLink; return $this; } /** - * Gets netCost + * Gets discount * * @return float|null */ - public function getNetCost(): ?float + public function getDiscount(): ?float { - return $this->container['netCost']; + return $this->container['discount']; } /** - * Sets netCost + * Sets discount * - * @param float|null $netCost Net cost of any payslips, or the Pricing Table minimum, whichever is greater. + * @param float|null $discount discount * * @return $this */ - public function setNetCost(?float $netCost): static + public function setDiscount(?float $discount): static { - if (is_null($netCost)) { - throw new InvalidArgumentException('non-nullable netCost cannot be null'); + if (is_null($discount)) { + throw new InvalidArgumentException('non-nullable discount cannot be null'); } - $this->container['netCost'] = $netCost; + $this->container['discount'] = $discount; return $this; } /** - * Gets discount + * Gets id * - * @return float|null + * @return string|null */ - public function getDiscount(): ?float + public function getId(): ?string { - return $this->container['discount']; + return $this->container['id']; } /** - * Sets discount + * Sets id * - * @param float|null $discount discount + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setDiscount(?float $discount): static + public function setId(?string $id): static { - if (is_null($discount)) { - throw new InvalidArgumentException('non-nullable discount cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['discount'] = $discount; + $this->container['id'] = $id; return $this; } /** - * Gets partnerDiscountAmount + * Gets month * - * @return float|null + * @return int|null */ - public function getPartnerDiscountAmount(): ?float + public function getMonth(): ?int { - return $this->container['partnerDiscountAmount']; + return $this->container['month']; } /** - * Sets partnerDiscountAmount + * Sets month * - * @param float|null $partnerDiscountAmount partnerDiscountAmount + * @param int|null $month month * * @return $this */ - public function setPartnerDiscountAmount(?float $partnerDiscountAmount): static + public function setMonth(?int $month): static { - if (is_null($partnerDiscountAmount)) { - throw new InvalidArgumentException('non-nullable partnerDiscountAmount cannot be null'); + if (is_null($month)) { + throw new InvalidArgumentException('non-nullable month cannot be null'); } - $this->container['partnerDiscountAmount'] = $partnerDiscountAmount; + $this->container['month'] = $month; return $this; } @@ -610,28 +604,28 @@ public function setMonthlyMinimum(?float $monthlyMinimum): static } /** - * Gets total + * Gets netCost * * @return float|null */ - public function getTotal(): ?float + public function getNetCost(): ?float { - return $this->container['total']; + return $this->container['netCost']; } /** - * Sets total + * Sets netCost * - * @param float|null $total total + * @param float|null $netCost Net cost of any payslips, or the Pricing Table minimum, whichever is greater. * * @return $this */ - public function setTotal(?float $total): static + public function setNetCost(?float $netCost): static { - if (is_null($total)) { - throw new InvalidArgumentException('non-nullable total cannot be null'); + if (is_null($netCost)) { + throw new InvalidArgumentException('non-nullable netCost cannot be null'); } - $this->container['total'] = $total; + $this->container['netCost'] = $netCost; return $this; } @@ -664,137 +658,143 @@ public function setPaid(?bool $paid): static } /** - * Gets usage + * Gets partnerDiscountAmount * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return float|null */ - public function getUsage(): ?array + public function getPartnerDiscountAmount(): ?float { - return $this->container['usage']; + return $this->container['partnerDiscountAmount']; } /** - * Sets usage + * Sets partnerDiscountAmount * - * @param \SynergiTech\Staffology\Model\Item[]|null $usage usage + * @param float|null $partnerDiscountAmount partnerDiscountAmount * * @return $this */ - public function setUsage(?array $usage): static + public function setPartnerDiscountAmount(?float $partnerDiscountAmount): static { - if (is_null($usage)) { - array_push($this->openAPINullablesSetToNull, 'usage'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('usage', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($partnerDiscountAmount)) { + throw new InvalidArgumentException('non-nullable partnerDiscountAmount cannot be null'); } - $this->container['usage'] = $usage; + $this->container['partnerDiscountAmount'] = $partnerDiscountAmount; return $this; } /** - * Gets accountingCustomerId + * Gets payslipCount * - * @return string|null + * @return int|null */ - public function getAccountingCustomerId(): ?string + public function getPayslipCount(): ?int { - return $this->container['accountingCustomerId']; + return $this->container['payslipCount']; } /** - * Sets accountingCustomerId + * Sets payslipCount * - * @param string|null $accountingCustomerId accountingCustomerId + * @param int|null $payslipCount payslipCount * * @return $this */ - public function setAccountingCustomerId(?string $accountingCustomerId): static + public function setPayslipCount(?int $payslipCount): static { - if (is_null($accountingCustomerId)) { - array_push($this->openAPINullablesSetToNull, 'accountingCustomerId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountingCustomerId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($payslipCount)) { + throw new InvalidArgumentException('non-nullable payslipCount cannot be null'); } - $this->container['accountingCustomerId'] = $accountingCustomerId; + $this->container['payslipCount'] = $payslipCount; return $this; } /** - * Gets accountingInvoiceId + * Gets previouslyBilledPayslipCount * - * @return string|null + * @return int|null */ - public function getAccountingInvoiceId(): ?string + public function getPreviouslyBilledPayslipCount(): ?int { - return $this->container['accountingInvoiceId']; + return $this->container['previouslyBilledPayslipCount']; } /** - * Sets accountingInvoiceId + * Sets previouslyBilledPayslipCount * - * @param string|null $accountingInvoiceId accountingInvoiceId + * @param int|null $previouslyBilledPayslipCount The number of payslips that appear in the usage, but were billed in a previous period * * @return $this */ - public function setAccountingInvoiceId(?string $accountingInvoiceId): static + public function setPreviouslyBilledPayslipCount(?int $previouslyBilledPayslipCount): static { - if (is_null($accountingInvoiceId)) { - array_push($this->openAPINullablesSetToNull, 'accountingInvoiceId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountingInvoiceId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($previouslyBilledPayslipCount)) { + throw new InvalidArgumentException('non-nullable previouslyBilledPayslipCount cannot be null'); } - $this->container['accountingInvoiceId'] = $accountingInvoiceId; + $this->container['previouslyBilledPayslipCount'] = $previouslyBilledPayslipCount; return $this; } /** - * Gets accountingInvoiceLink + * Gets total * - * @return string|null + * @return float|null */ - public function getAccountingInvoiceLink(): ?string + public function getTotal(): ?float { - return $this->container['accountingInvoiceLink']; + return $this->container['total']; } /** - * Sets accountingInvoiceLink + * Sets total * - * @param string|null $accountingInvoiceLink accountingInvoiceLink + * @param float|null $total total * * @return $this */ - public function setAccountingInvoiceLink(?string $accountingInvoiceLink): static + public function setTotal(?float $total): static { - if (is_null($accountingInvoiceLink)) { - array_push($this->openAPINullablesSetToNull, 'accountingInvoiceLink'); + if (is_null($total)) { + throw new InvalidArgumentException('non-nullable total cannot be null'); + } + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets usage + * + * @return \SynergiTech\Staffology\Model\Item[]|null + */ + public function getUsage(): ?array + { + return $this->container['usage']; + } + + /** + * Sets usage + * + * @param \SynergiTech\Staffology\Model\Item[]|null $usage usage + * + * @return $this + */ + public function setUsage(?array $usage): static + { + if (is_null($usage)) { + array_push($this->openAPINullablesSetToNull, 'usage'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountingInvoiceLink', $nullablesSetToNull); + $index = array_search('usage', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['accountingInvoiceLink'] = $accountingInvoiceLink; + $this->container['usage'] = $usage; return $this; } @@ -827,28 +827,28 @@ public function setUseNetSuite(?bool $useNetSuite): static } /** - * Gets id + * Gets year * - * @return string|null + * @return int|null */ - public function getId(): ?string + public function getYear(): ?int { - return $this->container['id']; + return $this->container['year']; } /** - * Sets id + * Sets year * - * @param string|null $id [readonly] The unique id of the object + * @param int|null $year year * * @return $this */ - public function setId(?string $id): static + public function setYear(?int $year): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($year)) { + throw new InvalidArgumentException('non-nullable year cannot be null'); } - $this->container['id'] = $id; + $this->container['year'] = $year; return $this; } diff --git a/src/Model/User.php b/src/Model/User.php index 4cb190c..c830d0b 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,56 +60,57 @@ class User implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'category' => '\SynergiTech\Staffology\Model\UserCategory', - 'emailAddress' => 'string', - 'pendingEmailAddress' => 'string', - 'firstName' => 'string', - 'lastName' => 'string', - 'salutation' => 'string', - 'userIdentifier' => 'string', - 'photo' => 'string', - 'photoSasUrl' => 'string', - 'role' => '\SynergiTech\Staffology\Model\UserRole', - 'jobType' => '\SynergiTech\Staffology\Model\UserJobType', - 'jobTitle' => 'string', - 'telephoneNumber' => 'string', - 'businessName' => 'string', - 'industry' => '\SynergiTech\Staffology\Model\UserIndustry', + 'accountingCustomerId' => 'string', 'address' => '\SynergiTech\Staffology\Model\Address', - 'statedEmployeeCount' => 'int', - 'emailVerified' => 'bool', - 'emailVerificationKey' => 'string', - 'gdprOptin' => 'bool', - 'inviteCode' => 'string', - 'registrationIp' => 'string', - 'registrationDate' => '\DateTime', - 'lastLogin' => '\DateTime', - 'isActivated' => 'bool', + 'apiMailingEnabled' => 'bool', 'authorization' => '\SynergiTech\Staffology\Model\UserAuthorization', - 'isSuperAdmin' => 'bool', - 'canUseBureauFeatures' => 'bool', + 'bureauNotificationEmailAddress' => 'string', + 'businessName' => 'string', + 'canCreateEmployers' => 'bool', + 'canEnablePremiumConnectors' => 'bool', 'canUseBetaFeatures' => 'bool', + 'canUseBureauFeatures' => 'bool', 'canUseReportWriter' => 'bool', - 'canUseRefactoredAeRoutines' => 'bool', - 'isBilledInNetSuite' => 'bool', - 'tenant' => '\SynergiTech\Staffology\Model\Tenant', - 'requestDdSetup' => 'bool', + 'category' => '\SynergiTech\Staffology\Model\UserCategory', + 'directDebitMandate' => '\SynergiTech\Staffology\Model\DirectDebitMandate', 'disabled' => 'bool', - 'canCreateEmployers' => 'bool', 'disabledReason' => 'string', - 'directDebitMandate' => '\SynergiTech\Staffology\Model\DirectDebitMandate', 'displayPrefs' => '\SynergiTech\Staffology\Model\UserDisplayPreferences', - 'showBills' => 'bool', - 'accountingCustomerId' => 'string', - 'pricingTableId' => 'string', - 'utmInfo' => '\SynergiTech\Staffology\Model\UtmInfo', + 'emailAddress' => 'string', + 'emailVerificationKey' => 'string', + 'emailVerified' => 'bool', 'firstBillableActivityDate' => '\DateTime', - 'bureauNotificationEmailAddress' => 'string', - 'monthlyMinimum' => '\SynergiTech\Staffology\Model\MonthlyMinimum', - 'apiMailingEnabled' => 'bool', - 'loginDisabled' => 'bool', + 'firstName' => 'string', + 'gdprOptin' => 'bool', + 'id' => 'string', + 'industry' => '\SynergiTech\Staffology\Model\UserIndustry', + 'inviteCode' => 'string', + 'isActivated' => 'bool', + 'isBilledInNetSuite' => 'bool', 'isBureauMember' => 'bool', - 'id' => 'string' + 'isSuperAdmin' => 'bool', + 'jobTitle' => 'string', + 'jobType' => '\SynergiTech\Staffology\Model\UserJobType', + 'lastLogin' => '\DateTime', + 'lastName' => 'string', + 'loginDisabled' => 'bool', + 'migratedFrom' => 'string', + 'monthlyMinimum' => '\SynergiTech\Staffology\Model\MonthlyMinimum', + 'pendingEmailAddress' => 'string', + 'photo' => 'string', + 'photoSasUrl' => 'string', + 'pricingTableId' => 'string', + 'registrationDate' => '\DateTime', + 'registrationIp' => 'string', + 'requestDdSetup' => 'bool', + 'role' => '\SynergiTech\Staffology\Model\UserRole', + 'salutation' => 'string', + 'showBills' => 'bool', + 'statedEmployeeCount' => 'int', + 'telephoneNumber' => 'string', + 'tenant' => '\SynergiTech\Staffology\Model\Tenant', + 'userIdentifier' => 'string', + 'utmInfo' => '\SynergiTech\Staffology\Model\UtmInfo' ]; /** @@ -118,56 +119,57 @@ class User implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'category' => null, - 'emailAddress' => 'email', - 'pendingEmailAddress' => 'email', - 'firstName' => null, - 'lastName' => null, - 'salutation' => null, - 'userIdentifier' => null, - 'photo' => null, - 'photoSasUrl' => null, - 'role' => null, - 'jobType' => null, - 'jobTitle' => null, - 'telephoneNumber' => null, - 'businessName' => null, - 'industry' => null, + 'accountingCustomerId' => null, 'address' => null, - 'statedEmployeeCount' => 'int32', - 'emailVerified' => null, - 'emailVerificationKey' => 'uuid', - 'gdprOptin' => null, - 'inviteCode' => null, - 'registrationIp' => null, - 'registrationDate' => 'date', - 'lastLogin' => 'date', - 'isActivated' => null, + 'apiMailingEnabled' => null, 'authorization' => null, - 'isSuperAdmin' => null, - 'canUseBureauFeatures' => null, + 'bureauNotificationEmailAddress' => 'email', + 'businessName' => null, + 'canCreateEmployers' => null, + 'canEnablePremiumConnectors' => null, 'canUseBetaFeatures' => null, + 'canUseBureauFeatures' => null, 'canUseReportWriter' => null, - 'canUseRefactoredAeRoutines' => null, - 'isBilledInNetSuite' => null, - 'tenant' => null, - 'requestDdSetup' => null, + 'category' => null, + 'directDebitMandate' => null, 'disabled' => null, - 'canCreateEmployers' => null, 'disabledReason' => null, - 'directDebitMandate' => null, 'displayPrefs' => null, - 'showBills' => null, - 'accountingCustomerId' => null, - 'pricingTableId' => 'uuid', - 'utmInfo' => null, + 'emailAddress' => 'email', + 'emailVerificationKey' => 'uuid', + 'emailVerified' => null, 'firstBillableActivityDate' => 'date', - 'bureauNotificationEmailAddress' => 'email', - 'monthlyMinimum' => null, - 'apiMailingEnabled' => null, - 'loginDisabled' => null, + 'firstName' => null, + 'gdprOptin' => null, + 'id' => 'uuid', + 'industry' => null, + 'inviteCode' => null, + 'isActivated' => null, + 'isBilledInNetSuite' => null, 'isBureauMember' => null, - 'id' => 'uuid' + 'isSuperAdmin' => null, + 'jobTitle' => null, + 'jobType' => null, + 'lastLogin' => 'date', + 'lastName' => null, + 'loginDisabled' => null, + 'migratedFrom' => null, + 'monthlyMinimum' => null, + 'pendingEmailAddress' => 'email', + 'photo' => null, + 'photoSasUrl' => null, + 'pricingTableId' => 'uuid', + 'registrationDate' => 'date', + 'registrationIp' => null, + 'requestDdSetup' => null, + 'role' => null, + 'salutation' => null, + 'showBills' => null, + 'statedEmployeeCount' => 'int32', + 'telephoneNumber' => null, + 'tenant' => null, + 'userIdentifier' => null, + 'utmInfo' => null ]; /** @@ -176,56 +178,57 @@ class User implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'category' => false, - 'emailAddress' => true, - 'pendingEmailAddress' => true, - 'firstName' => true, - 'lastName' => true, - 'salutation' => true, - 'userIdentifier' => true, - 'photo' => true, - 'photoSasUrl' => true, - 'role' => false, - 'jobType' => false, - 'jobTitle' => true, - 'telephoneNumber' => true, - 'businessName' => true, - 'industry' => false, + 'accountingCustomerId' => true, 'address' => false, - 'statedEmployeeCount' => true, - 'emailVerified' => false, - 'emailVerificationKey' => false, - 'gdprOptin' => false, - 'inviteCode' => true, - 'registrationIp' => true, - 'registrationDate' => false, - 'lastLogin' => true, - 'isActivated' => false, + 'apiMailingEnabled' => false, 'authorization' => false, - 'isSuperAdmin' => false, - 'canUseBureauFeatures' => false, + 'bureauNotificationEmailAddress' => true, + 'businessName' => true, + 'canCreateEmployers' => false, + 'canEnablePremiumConnectors' => false, 'canUseBetaFeatures' => false, + 'canUseBureauFeatures' => false, 'canUseReportWriter' => false, - 'canUseRefactoredAeRoutines' => false, - 'isBilledInNetSuite' => false, - 'tenant' => false, - 'requestDdSetup' => false, + 'category' => false, + 'directDebitMandate' => false, 'disabled' => false, - 'canCreateEmployers' => false, 'disabledReason' => true, - 'directDebitMandate' => false, 'displayPrefs' => false, - 'showBills' => true, - 'accountingCustomerId' => true, - 'pricingTableId' => true, - 'utmInfo' => false, + 'emailAddress' => true, + 'emailVerificationKey' => false, + 'emailVerified' => false, 'firstBillableActivityDate' => true, - 'bureauNotificationEmailAddress' => true, - 'monthlyMinimum' => false, - 'apiMailingEnabled' => false, - 'loginDisabled' => false, + 'firstName' => true, + 'gdprOptin' => false, + 'id' => false, + 'industry' => false, + 'inviteCode' => true, + 'isActivated' => false, + 'isBilledInNetSuite' => false, 'isBureauMember' => false, - 'id' => false + 'isSuperAdmin' => false, + 'jobTitle' => true, + 'jobType' => false, + 'lastLogin' => true, + 'lastName' => true, + 'loginDisabled' => false, + 'migratedFrom' => true, + 'monthlyMinimum' => false, + 'pendingEmailAddress' => true, + 'photo' => true, + 'photoSasUrl' => true, + 'pricingTableId' => true, + 'registrationDate' => false, + 'registrationIp' => true, + 'requestDdSetup' => false, + 'role' => false, + 'salutation' => true, + 'showBills' => true, + 'statedEmployeeCount' => true, + 'telephoneNumber' => true, + 'tenant' => false, + 'userIdentifier' => true, + 'utmInfo' => false ]; /** @@ -314,56 +317,57 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'category' => 'category', - 'emailAddress' => 'emailAddress', - 'pendingEmailAddress' => 'pendingEmailAddress', - 'firstName' => 'firstName', - 'lastName' => 'lastName', - 'salutation' => 'salutation', - 'userIdentifier' => 'userIdentifier', - 'photo' => 'photo', - 'photoSasUrl' => 'photoSasUrl', - 'role' => 'role', - 'jobType' => 'jobType', - 'jobTitle' => 'jobTitle', - 'telephoneNumber' => 'telephoneNumber', - 'businessName' => 'businessName', - 'industry' => 'industry', + 'accountingCustomerId' => 'accountingCustomerId', 'address' => 'address', - 'statedEmployeeCount' => 'statedEmployeeCount', - 'emailVerified' => 'emailVerified', - 'emailVerificationKey' => 'emailVerificationKey', - 'gdprOptin' => 'gdprOptin', - 'inviteCode' => 'inviteCode', - 'registrationIp' => 'registrationIp', - 'registrationDate' => 'registrationDate', - 'lastLogin' => 'lastLogin', - 'isActivated' => 'isActivated', + 'apiMailingEnabled' => 'apiMailingEnabled', 'authorization' => 'authorization', - 'isSuperAdmin' => 'isSuperAdmin', - 'canUseBureauFeatures' => 'canUseBureauFeatures', + 'bureauNotificationEmailAddress' => 'bureauNotificationEmailAddress', + 'businessName' => 'businessName', + 'canCreateEmployers' => 'canCreateEmployers', + 'canEnablePremiumConnectors' => 'canEnablePremiumConnectors', 'canUseBetaFeatures' => 'canUseBetaFeatures', + 'canUseBureauFeatures' => 'canUseBureauFeatures', 'canUseReportWriter' => 'canUseReportWriter', - 'canUseRefactoredAeRoutines' => 'canUseRefactoredAeRoutines', - 'isBilledInNetSuite' => 'isBilledInNetSuite', - 'tenant' => 'tenant', - 'requestDdSetup' => 'requestDdSetup', + 'category' => 'category', + 'directDebitMandate' => 'directDebitMandate', 'disabled' => 'disabled', - 'canCreateEmployers' => 'canCreateEmployers', 'disabledReason' => 'disabledReason', - 'directDebitMandate' => 'directDebitMandate', 'displayPrefs' => 'displayPrefs', - 'showBills' => 'showBills', - 'accountingCustomerId' => 'accountingCustomerId', - 'pricingTableId' => 'pricingTableId', - 'utmInfo' => 'utmInfo', + 'emailAddress' => 'emailAddress', + 'emailVerificationKey' => 'emailVerificationKey', + 'emailVerified' => 'emailVerified', 'firstBillableActivityDate' => 'firstBillableActivityDate', - 'bureauNotificationEmailAddress' => 'bureauNotificationEmailAddress', - 'monthlyMinimum' => 'monthlyMinimum', - 'apiMailingEnabled' => 'apiMailingEnabled', - 'loginDisabled' => 'loginDisabled', + 'firstName' => 'firstName', + 'gdprOptin' => 'gdprOptin', + 'id' => 'id', + 'industry' => 'industry', + 'inviteCode' => 'inviteCode', + 'isActivated' => 'isActivated', + 'isBilledInNetSuite' => 'isBilledInNetSuite', 'isBureauMember' => 'isBureauMember', - 'id' => 'id' + 'isSuperAdmin' => 'isSuperAdmin', + 'jobTitle' => 'jobTitle', + 'jobType' => 'jobType', + 'lastLogin' => 'lastLogin', + 'lastName' => 'lastName', + 'loginDisabled' => 'loginDisabled', + 'migratedFrom' => 'migratedFrom', + 'monthlyMinimum' => 'monthlyMinimum', + 'pendingEmailAddress' => 'pendingEmailAddress', + 'photo' => 'photo', + 'photoSasUrl' => 'photoSasUrl', + 'pricingTableId' => 'pricingTableId', + 'registrationDate' => 'registrationDate', + 'registrationIp' => 'registrationIp', + 'requestDdSetup' => 'requestDdSetup', + 'role' => 'role', + 'salutation' => 'salutation', + 'showBills' => 'showBills', + 'statedEmployeeCount' => 'statedEmployeeCount', + 'telephoneNumber' => 'telephoneNumber', + 'tenant' => 'tenant', + 'userIdentifier' => 'userIdentifier', + 'utmInfo' => 'utmInfo' ]; /** @@ -372,56 +376,57 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'category' => 'setCategory', - 'emailAddress' => 'setEmailAddress', - 'pendingEmailAddress' => 'setPendingEmailAddress', - 'firstName' => 'setFirstName', - 'lastName' => 'setLastName', - 'salutation' => 'setSalutation', - 'userIdentifier' => 'setUserIdentifier', - 'photo' => 'setPhoto', - 'photoSasUrl' => 'setPhotoSasUrl', - 'role' => 'setRole', - 'jobType' => 'setJobType', - 'jobTitle' => 'setJobTitle', - 'telephoneNumber' => 'setTelephoneNumber', - 'businessName' => 'setBusinessName', - 'industry' => 'setIndustry', + 'accountingCustomerId' => 'setAccountingCustomerId', 'address' => 'setAddress', - 'statedEmployeeCount' => 'setStatedEmployeeCount', - 'emailVerified' => 'setEmailVerified', - 'emailVerificationKey' => 'setEmailVerificationKey', - 'gdprOptin' => 'setGdprOptin', - 'inviteCode' => 'setInviteCode', - 'registrationIp' => 'setRegistrationIp', - 'registrationDate' => 'setRegistrationDate', - 'lastLogin' => 'setLastLogin', - 'isActivated' => 'setIsActivated', + 'apiMailingEnabled' => 'setApiMailingEnabled', 'authorization' => 'setAuthorization', - 'isSuperAdmin' => 'setIsSuperAdmin', - 'canUseBureauFeatures' => 'setCanUseBureauFeatures', + 'bureauNotificationEmailAddress' => 'setBureauNotificationEmailAddress', + 'businessName' => 'setBusinessName', + 'canCreateEmployers' => 'setCanCreateEmployers', + 'canEnablePremiumConnectors' => 'setCanEnablePremiumConnectors', 'canUseBetaFeatures' => 'setCanUseBetaFeatures', + 'canUseBureauFeatures' => 'setCanUseBureauFeatures', 'canUseReportWriter' => 'setCanUseReportWriter', - 'canUseRefactoredAeRoutines' => 'setCanUseRefactoredAeRoutines', - 'isBilledInNetSuite' => 'setIsBilledInNetSuite', - 'tenant' => 'setTenant', - 'requestDdSetup' => 'setRequestDdSetup', + 'category' => 'setCategory', + 'directDebitMandate' => 'setDirectDebitMandate', 'disabled' => 'setDisabled', - 'canCreateEmployers' => 'setCanCreateEmployers', 'disabledReason' => 'setDisabledReason', - 'directDebitMandate' => 'setDirectDebitMandate', 'displayPrefs' => 'setDisplayPrefs', - 'showBills' => 'setShowBills', - 'accountingCustomerId' => 'setAccountingCustomerId', - 'pricingTableId' => 'setPricingTableId', - 'utmInfo' => 'setUtmInfo', + 'emailAddress' => 'setEmailAddress', + 'emailVerificationKey' => 'setEmailVerificationKey', + 'emailVerified' => 'setEmailVerified', 'firstBillableActivityDate' => 'setFirstBillableActivityDate', - 'bureauNotificationEmailAddress' => 'setBureauNotificationEmailAddress', - 'monthlyMinimum' => 'setMonthlyMinimum', - 'apiMailingEnabled' => 'setApiMailingEnabled', - 'loginDisabled' => 'setLoginDisabled', + 'firstName' => 'setFirstName', + 'gdprOptin' => 'setGdprOptin', + 'id' => 'setId', + 'industry' => 'setIndustry', + 'inviteCode' => 'setInviteCode', + 'isActivated' => 'setIsActivated', + 'isBilledInNetSuite' => 'setIsBilledInNetSuite', 'isBureauMember' => 'setIsBureauMember', - 'id' => 'setId' + 'isSuperAdmin' => 'setIsSuperAdmin', + 'jobTitle' => 'setJobTitle', + 'jobType' => 'setJobType', + 'lastLogin' => 'setLastLogin', + 'lastName' => 'setLastName', + 'loginDisabled' => 'setLoginDisabled', + 'migratedFrom' => 'setMigratedFrom', + 'monthlyMinimum' => 'setMonthlyMinimum', + 'pendingEmailAddress' => 'setPendingEmailAddress', + 'photo' => 'setPhoto', + 'photoSasUrl' => 'setPhotoSasUrl', + 'pricingTableId' => 'setPricingTableId', + 'registrationDate' => 'setRegistrationDate', + 'registrationIp' => 'setRegistrationIp', + 'requestDdSetup' => 'setRequestDdSetup', + 'role' => 'setRole', + 'salutation' => 'setSalutation', + 'showBills' => 'setShowBills', + 'statedEmployeeCount' => 'setStatedEmployeeCount', + 'telephoneNumber' => 'setTelephoneNumber', + 'tenant' => 'setTenant', + 'userIdentifier' => 'setUserIdentifier', + 'utmInfo' => 'setUtmInfo' ]; /** @@ -430,56 +435,57 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'category' => 'getCategory', - 'emailAddress' => 'getEmailAddress', - 'pendingEmailAddress' => 'getPendingEmailAddress', - 'firstName' => 'getFirstName', - 'lastName' => 'getLastName', - 'salutation' => 'getSalutation', - 'userIdentifier' => 'getUserIdentifier', - 'photo' => 'getPhoto', - 'photoSasUrl' => 'getPhotoSasUrl', - 'role' => 'getRole', - 'jobType' => 'getJobType', - 'jobTitle' => 'getJobTitle', - 'telephoneNumber' => 'getTelephoneNumber', - 'businessName' => 'getBusinessName', - 'industry' => 'getIndustry', + 'accountingCustomerId' => 'getAccountingCustomerId', 'address' => 'getAddress', - 'statedEmployeeCount' => 'getStatedEmployeeCount', - 'emailVerified' => 'getEmailVerified', - 'emailVerificationKey' => 'getEmailVerificationKey', - 'gdprOptin' => 'getGdprOptin', - 'inviteCode' => 'getInviteCode', - 'registrationIp' => 'getRegistrationIp', - 'registrationDate' => 'getRegistrationDate', - 'lastLogin' => 'getLastLogin', - 'isActivated' => 'getIsActivated', + 'apiMailingEnabled' => 'getApiMailingEnabled', 'authorization' => 'getAuthorization', - 'isSuperAdmin' => 'getIsSuperAdmin', - 'canUseBureauFeatures' => 'getCanUseBureauFeatures', + 'bureauNotificationEmailAddress' => 'getBureauNotificationEmailAddress', + 'businessName' => 'getBusinessName', + 'canCreateEmployers' => 'getCanCreateEmployers', + 'canEnablePremiumConnectors' => 'getCanEnablePremiumConnectors', 'canUseBetaFeatures' => 'getCanUseBetaFeatures', + 'canUseBureauFeatures' => 'getCanUseBureauFeatures', 'canUseReportWriter' => 'getCanUseReportWriter', - 'canUseRefactoredAeRoutines' => 'getCanUseRefactoredAeRoutines', - 'isBilledInNetSuite' => 'getIsBilledInNetSuite', - 'tenant' => 'getTenant', - 'requestDdSetup' => 'getRequestDdSetup', + 'category' => 'getCategory', + 'directDebitMandate' => 'getDirectDebitMandate', 'disabled' => 'getDisabled', - 'canCreateEmployers' => 'getCanCreateEmployers', 'disabledReason' => 'getDisabledReason', - 'directDebitMandate' => 'getDirectDebitMandate', 'displayPrefs' => 'getDisplayPrefs', - 'showBills' => 'getShowBills', - 'accountingCustomerId' => 'getAccountingCustomerId', - 'pricingTableId' => 'getPricingTableId', - 'utmInfo' => 'getUtmInfo', + 'emailAddress' => 'getEmailAddress', + 'emailVerificationKey' => 'getEmailVerificationKey', + 'emailVerified' => 'getEmailVerified', 'firstBillableActivityDate' => 'getFirstBillableActivityDate', - 'bureauNotificationEmailAddress' => 'getBureauNotificationEmailAddress', - 'monthlyMinimum' => 'getMonthlyMinimum', - 'apiMailingEnabled' => 'getApiMailingEnabled', - 'loginDisabled' => 'getLoginDisabled', + 'firstName' => 'getFirstName', + 'gdprOptin' => 'getGdprOptin', + 'id' => 'getId', + 'industry' => 'getIndustry', + 'inviteCode' => 'getInviteCode', + 'isActivated' => 'getIsActivated', + 'isBilledInNetSuite' => 'getIsBilledInNetSuite', 'isBureauMember' => 'getIsBureauMember', - 'id' => 'getId' + 'isSuperAdmin' => 'getIsSuperAdmin', + 'jobTitle' => 'getJobTitle', + 'jobType' => 'getJobType', + 'lastLogin' => 'getLastLogin', + 'lastName' => 'getLastName', + 'loginDisabled' => 'getLoginDisabled', + 'migratedFrom' => 'getMigratedFrom', + 'monthlyMinimum' => 'getMonthlyMinimum', + 'pendingEmailAddress' => 'getPendingEmailAddress', + 'photo' => 'getPhoto', + 'photoSasUrl' => 'getPhotoSasUrl', + 'pricingTableId' => 'getPricingTableId', + 'registrationDate' => 'getRegistrationDate', + 'registrationIp' => 'getRegistrationIp', + 'requestDdSetup' => 'getRequestDdSetup', + 'role' => 'getRole', + 'salutation' => 'getSalutation', + 'showBills' => 'getShowBills', + 'statedEmployeeCount' => 'getStatedEmployeeCount', + 'telephoneNumber' => 'getTelephoneNumber', + 'tenant' => 'getTenant', + 'userIdentifier' => 'getUserIdentifier', + 'utmInfo' => 'getUtmInfo' ]; /** @@ -538,56 +544,57 @@ public function getModelName(): string */ public function __construct(?array $data = null) { + $this->setIfExists('accountingCustomerId', $data ?? [], null); + $this->setIfExists('address', $data ?? [], null); + $this->setIfExists('apiMailingEnabled', $data ?? [], null); + $this->setIfExists('authorization', $data ?? [], null); + $this->setIfExists('bureauNotificationEmailAddress', $data ?? [], null); + $this->setIfExists('businessName', $data ?? [], null); + $this->setIfExists('canCreateEmployers', $data ?? [], null); + $this->setIfExists('canEnablePremiumConnectors', $data ?? [], null); + $this->setIfExists('canUseBetaFeatures', $data ?? [], null); + $this->setIfExists('canUseBureauFeatures', $data ?? [], null); + $this->setIfExists('canUseReportWriter', $data ?? [], null); $this->setIfExists('category', $data ?? [], null); + $this->setIfExists('directDebitMandate', $data ?? [], null); + $this->setIfExists('disabled', $data ?? [], null); + $this->setIfExists('disabledReason', $data ?? [], null); + $this->setIfExists('displayPrefs', $data ?? [], null); $this->setIfExists('emailAddress', $data ?? [], null); - $this->setIfExists('pendingEmailAddress', $data ?? [], null); - $this->setIfExists('firstName', $data ?? [], null); - $this->setIfExists('lastName', $data ?? [], null); - $this->setIfExists('salutation', $data ?? [], null); - $this->setIfExists('userIdentifier', $data ?? [], null); - $this->setIfExists('photo', $data ?? [], null); - $this->setIfExists('photoSasUrl', $data ?? [], null); - $this->setIfExists('role', $data ?? [], null); - $this->setIfExists('jobType', $data ?? [], null); - $this->setIfExists('jobTitle', $data ?? [], null); - $this->setIfExists('telephoneNumber', $data ?? [], null); - $this->setIfExists('businessName', $data ?? [], null); - $this->setIfExists('industry', $data ?? [], null); - $this->setIfExists('address', $data ?? [], null); - $this->setIfExists('statedEmployeeCount', $data ?? [], null); - $this->setIfExists('emailVerified', $data ?? [], null); $this->setIfExists('emailVerificationKey', $data ?? [], null); + $this->setIfExists('emailVerified', $data ?? [], null); + $this->setIfExists('firstBillableActivityDate', $data ?? [], null); + $this->setIfExists('firstName', $data ?? [], null); $this->setIfExists('gdprOptin', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('industry', $data ?? [], null); $this->setIfExists('inviteCode', $data ?? [], null); - $this->setIfExists('registrationIp', $data ?? [], null); - $this->setIfExists('registrationDate', $data ?? [], null); - $this->setIfExists('lastLogin', $data ?? [], null); $this->setIfExists('isActivated', $data ?? [], null); - $this->setIfExists('authorization', $data ?? [], null); - $this->setIfExists('isSuperAdmin', $data ?? [], null); - $this->setIfExists('canUseBureauFeatures', $data ?? [], null); - $this->setIfExists('canUseBetaFeatures', $data ?? [], null); - $this->setIfExists('canUseReportWriter', $data ?? [], null); - $this->setIfExists('canUseRefactoredAeRoutines', $data ?? [], null); $this->setIfExists('isBilledInNetSuite', $data ?? [], null); - $this->setIfExists('tenant', $data ?? [], null); + $this->setIfExists('isBureauMember', $data ?? [], null); + $this->setIfExists('isSuperAdmin', $data ?? [], null); + $this->setIfExists('jobTitle', $data ?? [], null); + $this->setIfExists('jobType', $data ?? [], null); + $this->setIfExists('lastLogin', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('loginDisabled', $data ?? [], null); + $this->setIfExists('migratedFrom', $data ?? [], null); + $this->setIfExists('monthlyMinimum', $data ?? [], null); + $this->setIfExists('pendingEmailAddress', $data ?? [], null); + $this->setIfExists('photo', $data ?? [], null); + $this->setIfExists('photoSasUrl', $data ?? [], null); + $this->setIfExists('pricingTableId', $data ?? [], null); + $this->setIfExists('registrationDate', $data ?? [], null); + $this->setIfExists('registrationIp', $data ?? [], null); $this->setIfExists('requestDdSetup', $data ?? [], null); - $this->setIfExists('disabled', $data ?? [], null); - $this->setIfExists('canCreateEmployers', $data ?? [], null); - $this->setIfExists('disabledReason', $data ?? [], null); - $this->setIfExists('directDebitMandate', $data ?? [], null); - $this->setIfExists('displayPrefs', $data ?? [], null); + $this->setIfExists('role', $data ?? [], null); + $this->setIfExists('salutation', $data ?? [], null); $this->setIfExists('showBills', $data ?? [], null); - $this->setIfExists('accountingCustomerId', $data ?? [], null); - $this->setIfExists('pricingTableId', $data ?? [], null); + $this->setIfExists('statedEmployeeCount', $data ?? [], null); + $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('tenant', $data ?? [], null); + $this->setIfExists('userIdentifier', $data ?? [], null); $this->setIfExists('utmInfo', $data ?? [], null); - $this->setIfExists('firstBillableActivityDate', $data ?? [], null); - $this->setIfExists('bureauNotificationEmailAddress', $data ?? [], null); - $this->setIfExists('monthlyMinimum', $data ?? [], null); - $this->setIfExists('apiMailingEnabled', $data ?? [], null); - $this->setIfExists('loginDisabled', $data ?? [], null); - $this->setIfExists('isBureauMember', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); } /** @@ -617,60 +624,68 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (!is_null($this->container['emailAddress']) && (mb_strlen($this->container['emailAddress']) > 150)) { - $invalidProperties[] = "invalid value for 'emailAddress', the character length must be smaller than or equal to 150."; + if (!is_null($this->container['bureauNotificationEmailAddress']) && (mb_strlen($this->container['bureauNotificationEmailAddress']) > 150)) { + $invalidProperties[] = "invalid value for 'bureauNotificationEmailAddress', the character length must be smaller than or equal to 150."; } - if (!is_null($this->container['pendingEmailAddress']) && (mb_strlen($this->container['pendingEmailAddress']) > 150)) { - $invalidProperties[] = "invalid value for 'pendingEmailAddress', the character length must be smaller than or equal to 150."; + if (!is_null($this->container['businessName']) && (mb_strlen($this->container['businessName']) > 160)) { + $invalidProperties[] = "invalid value for 'businessName', the character length must be smaller than or equal to 160."; + } + + if (!is_null($this->container['businessName']) && !preg_match("/^[A-Za-z0-9 ,;:'£()\\-\\.\\@\\$\\&]{1,160}$/", $this->container['businessName'])) { + $invalidProperties[] = "invalid value for 'businessName', must be conform to the pattern /^[A-Za-z0-9 ,;:'£()\\-\\.\\@\\$\\&]{1,160}$/."; + } + + if (!is_null($this->container['emailAddress']) && (mb_strlen($this->container['emailAddress']) > 150)) { + $invalidProperties[] = "invalid value for 'emailAddress', the character length must be smaller than or equal to 150."; } if (!is_null($this->container['firstName']) && (mb_strlen($this->container['firstName']) > 150)) { $invalidProperties[] = "invalid value for 'firstName', the character length must be smaller than or equal to 150."; } + if (!is_null($this->container['jobTitle']) && (mb_strlen($this->container['jobTitle']) > 150)) { + $invalidProperties[] = "invalid value for 'jobTitle', the character length must be smaller than or equal to 150."; + } + if (!is_null($this->container['lastName']) && (mb_strlen($this->container['lastName']) > 150)) { $invalidProperties[] = "invalid value for 'lastName', the character length must be smaller than or equal to 150."; } - - if (!is_null($this->container['salutation']) && (mb_strlen($this->container['salutation']) > 35)) { - $invalidProperties[] = "invalid value for 'salutation', the character length must be smaller than or equal to 35."; + + if (!is_null($this->container['migratedFrom']) && (mb_strlen($this->container['migratedFrom']) > 150)) { + $invalidProperties[] = "invalid value for 'migratedFrom', the character length must be smaller than or equal to 150."; } - if (!is_null($this->container['salutation']) && !preg_match("/^[A-Za-z '\\-]{1,35}$/", $this->container['salutation'])) { - $invalidProperties[] = "invalid value for 'salutation', must be conform to the pattern /^[A-Za-z '\\-]{1,35}$/."; + if (!is_null($this->container['migratedFrom']) && (mb_strlen($this->container['migratedFrom']) < 0)) { + $invalidProperties[] = "invalid value for 'migratedFrom', the character length must be bigger than or equal to 0."; } - if (!is_null($this->container['userIdentifier']) && (mb_strlen($this->container['userIdentifier']) > 150)) { - $invalidProperties[] = "invalid value for 'userIdentifier', the character length must be smaller than or equal to 150."; + if (!is_null($this->container['pendingEmailAddress']) && (mb_strlen($this->container['pendingEmailAddress']) > 150)) { + $invalidProperties[] = "invalid value for 'pendingEmailAddress', the character length must be smaller than or equal to 150."; } if (!is_null($this->container['photo']) && (mb_strlen($this->container['photo']) > 1000)) { $invalidProperties[] = "invalid value for 'photo', the character length must be smaller than or equal to 1000."; } - if (!is_null($this->container['jobTitle']) && (mb_strlen($this->container['jobTitle']) > 150)) { - $invalidProperties[] = "invalid value for 'jobTitle', the character length must be smaller than or equal to 150."; - } - - if (!is_null($this->container['telephoneNumber']) && (mb_strlen($this->container['telephoneNumber']) > 20)) { - $invalidProperties[] = "invalid value for 'telephoneNumber', the character length must be smaller than or equal to 20."; + if (!is_null($this->container['registrationIp']) && (mb_strlen($this->container['registrationIp']) > 20)) { + $invalidProperties[] = "invalid value for 'registrationIp', the character length must be smaller than or equal to 20."; } - if (!is_null($this->container['businessName']) && (mb_strlen($this->container['businessName']) > 160)) { - $invalidProperties[] = "invalid value for 'businessName', the character length must be smaller than or equal to 160."; + if (!is_null($this->container['salutation']) && (mb_strlen($this->container['salutation']) > 35)) { + $invalidProperties[] = "invalid value for 'salutation', the character length must be smaller than or equal to 35."; } - if (!is_null($this->container['businessName']) && !preg_match("/^[A-Za-z0-9 ,;:'£()\\-\\.\\@\\$\\&]{1,160}$/", $this->container['businessName'])) { - $invalidProperties[] = "invalid value for 'businessName', must be conform to the pattern /^[A-Za-z0-9 ,;:'£()\\-\\.\\@\\$\\&]{1,160}$/."; + if (!is_null($this->container['salutation']) && !preg_match("/^[A-Za-z '\\-]{1,35}$/", $this->container['salutation'])) { + $invalidProperties[] = "invalid value for 'salutation', must be conform to the pattern /^[A-Za-z '\\-]{1,35}$/."; } - if (!is_null($this->container['registrationIp']) && (mb_strlen($this->container['registrationIp']) > 20)) { - $invalidProperties[] = "invalid value for 'registrationIp', the character length must be smaller than or equal to 20."; + if (!is_null($this->container['telephoneNumber']) && (mb_strlen($this->container['telephoneNumber']) > 20)) { + $invalidProperties[] = "invalid value for 'telephoneNumber', the character length must be smaller than or equal to 20."; } - if (!is_null($this->container['bureauNotificationEmailAddress']) && (mb_strlen($this->container['bureauNotificationEmailAddress']) > 150)) { - $invalidProperties[] = "invalid value for 'bureauNotificationEmailAddress', the character length must be smaller than or equal to 150."; + if (!is_null($this->container['userIdentifier']) && (mb_strlen($this->container['userIdentifier']) > 150)) { + $invalidProperties[] = "invalid value for 'userIdentifier', the character length must be smaller than or equal to 150."; } return $invalidProperties; @@ -689,590 +704,537 @@ public function valid(): bool /** - * Gets category + * Gets accountingCustomerId * - * @return \SynergiTech\Staffology\Model\UserCategory|null + * @return string|null */ - public function getCategory(): ?\SynergiTech\Staffology\Model\UserCategory + public function getAccountingCustomerId(): ?string { - return $this->container['category']; + return $this->container['accountingCustomerId']; } /** - * Sets category + * Sets accountingCustomerId * - * @param \SynergiTech\Staffology\Model\UserCategory|null $category category + * @param string|null $accountingCustomerId [readonly] Used internally to manage billing * * @return $this */ - public function setCategory(?\SynergiTech\Staffology\Model\UserCategory $category): static + public function setAccountingCustomerId(?string $accountingCustomerId): static { - if (is_null($category)) { - throw new InvalidArgumentException('non-nullable category cannot be null'); + if (is_null($accountingCustomerId)) { + array_push($this->openAPINullablesSetToNull, 'accountingCustomerId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('accountingCustomerId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['category'] = $category; + $this->container['accountingCustomerId'] = $accountingCustomerId; return $this; } /** - * Gets emailAddress + * Gets address * - * @return string|null + * @return \SynergiTech\Staffology\Model\Address|null */ - public function getEmailAddress(): ?string + public function getAddress(): ?\SynergiTech\Staffology\Model\Address { - return $this->container['emailAddress']; + return $this->container['address']; } /** - * Sets emailAddress + * Sets address * - * @param string|null $emailAddress emailAddress + * @param \SynergiTech\Staffology\Model\Address|null $address address * * @return $this */ - public function setEmailAddress(?string $emailAddress): static + public function setAddress(?\SynergiTech\Staffology\Model\Address $address): static { - if (is_null($emailAddress)) { - array_push($this->openAPINullablesSetToNull, 'emailAddress'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('emailAddress', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($emailAddress) && (mb_strlen($emailAddress) > 150)) { - throw new InvalidArgumentException('invalid length for $emailAddress when calling User., must be smaller than or equal to 150.'); + if (is_null($address)) { + throw new InvalidArgumentException('non-nullable address cannot be null'); } - - $this->container['emailAddress'] = $emailAddress; + $this->container['address'] = $address; return $this; } /** - * Gets pendingEmailAddress + * Gets apiMailingEnabled * - * @return string|null + * @return bool|null */ - public function getPendingEmailAddress(): ?string + public function getApiMailingEnabled(): ?bool { - return $this->container['pendingEmailAddress']; + return $this->container['apiMailingEnabled']; } /** - * Sets pendingEmailAddress + * Sets apiMailingEnabled * - * @param string|null $pendingEmailAddress If the user has requested to change their email address then the address it'll be changed to after verification will be shown here. + * @param bool|null $apiMailingEnabled Flag to keep the user up-to-date with any API changes and inform about upcoming breaking changes. * * @return $this */ - public function setPendingEmailAddress(?string $pendingEmailAddress): static + public function setApiMailingEnabled(?bool $apiMailingEnabled): static { - if (is_null($pendingEmailAddress)) { - array_push($this->openAPINullablesSetToNull, 'pendingEmailAddress'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pendingEmailAddress', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($pendingEmailAddress) && (mb_strlen($pendingEmailAddress) > 150)) { - throw new InvalidArgumentException('invalid length for $pendingEmailAddress when calling User., must be smaller than or equal to 150.'); + if (is_null($apiMailingEnabled)) { + throw new InvalidArgumentException('non-nullable apiMailingEnabled cannot be null'); } - - $this->container['pendingEmailAddress'] = $pendingEmailAddress; + $this->container['apiMailingEnabled'] = $apiMailingEnabled; return $this; } /** - * Gets firstName + * Gets authorization * - * @return string|null + * @return \SynergiTech\Staffology\Model\UserAuthorization|null */ - public function getFirstName(): ?string + public function getAuthorization(): ?\SynergiTech\Staffology\Model\UserAuthorization { - return $this->container['firstName']; + return $this->container['authorization']; } /** - * Sets firstName + * Sets authorization * - * @param string|null $firstName firstName + * @param \SynergiTech\Staffology\Model\UserAuthorization|null $authorization authorization * * @return $this */ - public function setFirstName(?string $firstName): static + public function setAuthorization(?\SynergiTech\Staffology\Model\UserAuthorization $authorization): static { - if (is_null($firstName)) { - array_push($this->openAPINullablesSetToNull, 'firstName'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('firstName', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($firstName) && (mb_strlen($firstName) > 150)) { - throw new InvalidArgumentException('invalid length for $firstName when calling User., must be smaller than or equal to 150.'); + if (is_null($authorization)) { + throw new InvalidArgumentException('non-nullable authorization cannot be null'); } - - $this->container['firstName'] = $firstName; + $this->container['authorization'] = $authorization; return $this; } /** - * Gets lastName + * Gets bureauNotificationEmailAddress * * @return string|null */ - public function getLastName(): ?string + public function getBureauNotificationEmailAddress(): ?string { - return $this->container['lastName']; + return $this->container['bureauNotificationEmailAddress']; } /** - * Sets lastName + * Sets bureauNotificationEmailAddress * - * @param string|null $lastName lastName + * @param string|null $bureauNotificationEmailAddress If an email address is provided here then Bureau-related notifications will go to this address instead of the EmailAddress * * @return $this */ - public function setLastName(?string $lastName): static + public function setBureauNotificationEmailAddress(?string $bureauNotificationEmailAddress): static { - if (is_null($lastName)) { - array_push($this->openAPINullablesSetToNull, 'lastName'); + if (is_null($bureauNotificationEmailAddress)) { + array_push($this->openAPINullablesSetToNull, 'bureauNotificationEmailAddress'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastName', $nullablesSetToNull); + $index = array_search('bureauNotificationEmailAddress', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($lastName) && (mb_strlen($lastName) > 150)) { - throw new InvalidArgumentException('invalid length for $lastName when calling User., must be smaller than or equal to 150.'); + if (!is_null($bureauNotificationEmailAddress) && (mb_strlen($bureauNotificationEmailAddress) > 150)) { + throw new InvalidArgumentException('invalid length for $bureauNotificationEmailAddress when calling User., must be smaller than or equal to 150.'); } - $this->container['lastName'] = $lastName; + $this->container['bureauNotificationEmailAddress'] = $bureauNotificationEmailAddress; return $this; } /** - * Gets salutation + * Gets businessName * * @return string|null */ - public function getSalutation(): ?string + public function getBusinessName(): ?string { - return $this->container['salutation']; + return $this->container['businessName']; } /** - * Sets salutation + * Sets businessName * - * @param string|null $salutation salutation + * @param string|null $businessName businessName * * @return $this */ - public function setSalutation(?string $salutation): static + public function setBusinessName(?string $businessName): static { - if (is_null($salutation)) { - array_push($this->openAPINullablesSetToNull, 'salutation'); + if (is_null($businessName)) { + array_push($this->openAPINullablesSetToNull, 'businessName'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('salutation', $nullablesSetToNull); + $index = array_search('businessName', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($salutation) && (mb_strlen($salutation) > 35)) { - throw new InvalidArgumentException('invalid length for $salutation when calling User., must be smaller than or equal to 35.'); + if (!is_null($businessName) && (mb_strlen($businessName) > 160)) { + throw new InvalidArgumentException('invalid length for $businessName when calling User., must be smaller than or equal to 160.'); } - if (!is_null($salutation) && (!preg_match("/^[A-Za-z '\\-]{1,35}$/", ObjectSerializer::toString($salutation)))) { - throw new InvalidArgumentException("invalid value for \$salutation when calling User., must conform to the pattern /^[A-Za-z '\\-]{1,35}$/."); + if (!is_null($businessName) && (!preg_match("/^[A-Za-z0-9 ,;:'£()\\-\\.\\@\\$\\&]{1,160}$/", ObjectSerializer::toString($businessName)))) { + throw new InvalidArgumentException("invalid value for \$businessName when calling User., must conform to the pattern /^[A-Za-z0-9 ,;:'£()\\-\\.\\@\\$\\&]{1,160}$/."); } - $this->container['salutation'] = $salutation; + $this->container['businessName'] = $businessName; return $this; } /** - * Gets userIdentifier + * Gets canCreateEmployers * - * @return string|null + * @return bool|null */ - public function getUserIdentifier(): ?string + public function getCanCreateEmployers(): ?bool { - return $this->container['userIdentifier']; + return $this->container['canCreateEmployers']; } /** - * Sets userIdentifier + * Sets canCreateEmployers * - * @param string|null $userIdentifier userIdentifier + * @param bool|null $canCreateEmployers [readonly] If false then the user cannot create new employers. This can be turned on or off by the tenant admin. * * @return $this */ - public function setUserIdentifier(?string $userIdentifier): static + public function setCanCreateEmployers(?bool $canCreateEmployers): static { - if (is_null($userIdentifier)) { - array_push($this->openAPINullablesSetToNull, 'userIdentifier'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('userIdentifier', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($userIdentifier) && (mb_strlen($userIdentifier) > 150)) { - throw new InvalidArgumentException('invalid length for $userIdentifier when calling User., must be smaller than or equal to 150.'); + if (is_null($canCreateEmployers)) { + throw new InvalidArgumentException('non-nullable canCreateEmployers cannot be null'); } + $this->container['canCreateEmployers'] = $canCreateEmployers; - $this->container['userIdentifier'] = $userIdentifier; + return $this; + } + + /** + * Gets canEnablePremiumConnectors + * + * @return bool|null + */ + public function getCanEnablePremiumConnectors(): ?bool + { + return $this->container['canEnablePremiumConnectors']; + } + + /** + * Sets canEnablePremiumConnectors + * + * @param bool|null $canEnablePremiumConnectors Indicates whether the user has permission to enable the premium connectors feature. + * + * @return $this + */ + public function setCanEnablePremiumConnectors(?bool $canEnablePremiumConnectors): static + { + if (is_null($canEnablePremiumConnectors)) { + throw new InvalidArgumentException('non-nullable canEnablePremiumConnectors cannot be null'); + } + $this->container['canEnablePremiumConnectors'] = $canEnablePremiumConnectors; return $this; } /** - * Gets photo + * Gets canUseBetaFeatures * - * @return string|null + * @return bool|null */ - public function getPhoto(): ?string + public function getCanUseBetaFeatures(): ?bool { - return $this->container['photo']; + return $this->container['canUseBetaFeatures']; } /** - * Sets photo + * Sets canUseBetaFeatures * - * @param string|null $photo photo + * @param bool|null $canUseBetaFeatures canUseBetaFeatures * * @return $this */ - public function setPhoto(?string $photo): static + public function setCanUseBetaFeatures(?bool $canUseBetaFeatures): static { - if (is_null($photo)) { - array_push($this->openAPINullablesSetToNull, 'photo'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('photo', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($photo) && (mb_strlen($photo) > 1000)) { - throw new InvalidArgumentException('invalid length for $photo when calling User., must be smaller than or equal to 1000.'); + if (is_null($canUseBetaFeatures)) { + throw new InvalidArgumentException('non-nullable canUseBetaFeatures cannot be null'); } - - $this->container['photo'] = $photo; + $this->container['canUseBetaFeatures'] = $canUseBetaFeatures; return $this; } /** - * Gets photoSasUrl + * Gets canUseBureauFeatures * - * @return string|null + * @return bool|null */ - public function getPhotoSasUrl(): ?string + public function getCanUseBureauFeatures(): ?bool { - return $this->container['photoSasUrl']; + return $this->container['canUseBureauFeatures']; } /** - * Sets photoSasUrl + * Sets canUseBureauFeatures * - * @param string|null $photoSasUrl photoSasUrl + * @param bool|null $canUseBureauFeatures canUseBureauFeatures * * @return $this */ - public function setPhotoSasUrl(?string $photoSasUrl): static + public function setCanUseBureauFeatures(?bool $canUseBureauFeatures): static { - if (is_null($photoSasUrl)) { - array_push($this->openAPINullablesSetToNull, 'photoSasUrl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('photoSasUrl', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($canUseBureauFeatures)) { + throw new InvalidArgumentException('non-nullable canUseBureauFeatures cannot be null'); } - $this->container['photoSasUrl'] = $photoSasUrl; + $this->container['canUseBureauFeatures'] = $canUseBureauFeatures; return $this; } /** - * Gets role + * Gets canUseReportWriter * - * @return \SynergiTech\Staffology\Model\UserRole|null + * @return bool|null */ - public function getRole(): ?\SynergiTech\Staffology\Model\UserRole + public function getCanUseReportWriter(): ?bool { - return $this->container['role']; + return $this->container['canUseReportWriter']; } /** - * Sets role + * Sets canUseReportWriter * - * @param \SynergiTech\Staffology\Model\UserRole|null $role role + * @param bool|null $canUseReportWriter Indicates whether the user has permission to use the report writer feature. * * @return $this */ - public function setRole(?\SynergiTech\Staffology\Model\UserRole $role): static + public function setCanUseReportWriter(?bool $canUseReportWriter): static { - if (is_null($role)) { - throw new InvalidArgumentException('non-nullable role cannot be null'); + if (is_null($canUseReportWriter)) { + throw new InvalidArgumentException('non-nullable canUseReportWriter cannot be null'); } - $this->container['role'] = $role; + $this->container['canUseReportWriter'] = $canUseReportWriter; return $this; } /** - * Gets jobType + * Gets category * - * @return \SynergiTech\Staffology\Model\UserJobType|null + * @return \SynergiTech\Staffology\Model\UserCategory|null */ - public function getJobType(): ?\SynergiTech\Staffology\Model\UserJobType + public function getCategory(): ?\SynergiTech\Staffology\Model\UserCategory { - return $this->container['jobType']; + return $this->container['category']; } /** - * Sets jobType + * Sets category * - * @param \SynergiTech\Staffology\Model\UserJobType|null $jobType jobType + * @param \SynergiTech\Staffology\Model\UserCategory|null $category category * * @return $this */ - public function setJobType(?\SynergiTech\Staffology\Model\UserJobType $jobType): static + public function setCategory(?\SynergiTech\Staffology\Model\UserCategory $category): static { - if (is_null($jobType)) { - throw new InvalidArgumentException('non-nullable jobType cannot be null'); + if (is_null($category)) { + throw new InvalidArgumentException('non-nullable category cannot be null'); } - $this->container['jobType'] = $jobType; + $this->container['category'] = $category; return $this; } /** - * Gets jobTitle + * Gets directDebitMandate * - * @return string|null + * @return \SynergiTech\Staffology\Model\DirectDebitMandate|null */ - public function getJobTitle(): ?string + public function getDirectDebitMandate(): ?\SynergiTech\Staffology\Model\DirectDebitMandate { - return $this->container['jobTitle']; + return $this->container['directDebitMandate']; } /** - * Sets jobTitle + * Sets directDebitMandate * - * @param string|null $jobTitle jobTitle + * @param \SynergiTech\Staffology\Model\DirectDebitMandate|null $directDebitMandate directDebitMandate * * @return $this */ - public function setJobTitle(?string $jobTitle): static + public function setDirectDebitMandate(?\SynergiTech\Staffology\Model\DirectDebitMandate $directDebitMandate): static { - if (is_null($jobTitle)) { - array_push($this->openAPINullablesSetToNull, 'jobTitle'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('jobTitle', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($jobTitle) && (mb_strlen($jobTitle) > 150)) { - throw new InvalidArgumentException('invalid length for $jobTitle when calling User., must be smaller than or equal to 150.'); + if (is_null($directDebitMandate)) { + throw new InvalidArgumentException('non-nullable directDebitMandate cannot be null'); } - - $this->container['jobTitle'] = $jobTitle; + $this->container['directDebitMandate'] = $directDebitMandate; return $this; } /** - * Gets telephoneNumber + * Gets disabled * - * @return string|null + * @return bool|null */ - public function getTelephoneNumber(): ?string + public function getDisabled(): ?bool { - return $this->container['telephoneNumber']; + return $this->container['disabled']; } /** - * Sets telephoneNumber + * Sets disabled * - * @param string|null $telephoneNumber telephoneNumber + * @param bool|null $disabled [readonly] If true then any employers the owner managed will not be able to run new payruns. DisabledReason will give a reason why the account is disabled * * @return $this */ - public function setTelephoneNumber(?string $telephoneNumber): static + public function setDisabled(?bool $disabled): static { - if (is_null($telephoneNumber)) { - array_push($this->openAPINullablesSetToNull, 'telephoneNumber'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('telephoneNumber', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($telephoneNumber) && (mb_strlen($telephoneNumber) > 20)) { - throw new InvalidArgumentException('invalid length for $telephoneNumber when calling User., must be smaller than or equal to 20.'); + if (is_null($disabled)) { + throw new InvalidArgumentException('non-nullable disabled cannot be null'); } - - $this->container['telephoneNumber'] = $telephoneNumber; + $this->container['disabled'] = $disabled; return $this; } /** - * Gets businessName + * Gets disabledReason * * @return string|null */ - public function getBusinessName(): ?string + public function getDisabledReason(): ?string { - return $this->container['businessName']; + return $this->container['disabledReason']; } /** - * Sets businessName + * Sets disabledReason * - * @param string|null $businessName businessName + * @param string|null $disabledReason disabledReason * * @return $this */ - public function setBusinessName(?string $businessName): static + public function setDisabledReason(?string $disabledReason): static { - if (is_null($businessName)) { - array_push($this->openAPINullablesSetToNull, 'businessName'); + if (is_null($disabledReason)) { + array_push($this->openAPINullablesSetToNull, 'disabledReason'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('businessName', $nullablesSetToNull); + $index = array_search('disabledReason', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($businessName) && (mb_strlen($businessName) > 160)) { - throw new InvalidArgumentException('invalid length for $businessName when calling User., must be smaller than or equal to 160.'); - } - if (!is_null($businessName) && (!preg_match("/^[A-Za-z0-9 ,;:'£()\\-\\.\\@\\$\\&]{1,160}$/", ObjectSerializer::toString($businessName)))) { - throw new InvalidArgumentException("invalid value for \$businessName when calling User., must conform to the pattern /^[A-Za-z0-9 ,;:'£()\\-\\.\\@\\$\\&]{1,160}$/."); - } - - $this->container['businessName'] = $businessName; + $this->container['disabledReason'] = $disabledReason; return $this; } /** - * Gets industry + * Gets displayPrefs * - * @return \SynergiTech\Staffology\Model\UserIndustry|null + * @return \SynergiTech\Staffology\Model\UserDisplayPreferences|null */ - public function getIndustry(): ?\SynergiTech\Staffology\Model\UserIndustry + public function getDisplayPrefs(): ?\SynergiTech\Staffology\Model\UserDisplayPreferences { - return $this->container['industry']; + return $this->container['displayPrefs']; } /** - * Sets industry + * Sets displayPrefs * - * @param \SynergiTech\Staffology\Model\UserIndustry|null $industry industry + * @param \SynergiTech\Staffology\Model\UserDisplayPreferences|null $displayPrefs displayPrefs * * @return $this */ - public function setIndustry(?\SynergiTech\Staffology\Model\UserIndustry $industry): static + public function setDisplayPrefs(?\SynergiTech\Staffology\Model\UserDisplayPreferences $displayPrefs): static { - if (is_null($industry)) { - throw new InvalidArgumentException('non-nullable industry cannot be null'); + if (is_null($displayPrefs)) { + throw new InvalidArgumentException('non-nullable displayPrefs cannot be null'); } - $this->container['industry'] = $industry; + $this->container['displayPrefs'] = $displayPrefs; return $this; } /** - * Gets address + * Gets emailAddress * - * @return \SynergiTech\Staffology\Model\Address|null + * @return string|null */ - public function getAddress(): ?\SynergiTech\Staffology\Model\Address + public function getEmailAddress(): ?string { - return $this->container['address']; + return $this->container['emailAddress']; } /** - * Sets address + * Sets emailAddress * - * @param \SynergiTech\Staffology\Model\Address|null $address address + * @param string|null $emailAddress emailAddress * * @return $this */ - public function setAddress(?\SynergiTech\Staffology\Model\Address $address): static + public function setEmailAddress(?string $emailAddress): static { - if (is_null($address)) { - throw new InvalidArgumentException('non-nullable address cannot be null'); + if (is_null($emailAddress)) { + array_push($this->openAPINullablesSetToNull, 'emailAddress'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('emailAddress', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['address'] = $address; + if (!is_null($emailAddress) && (mb_strlen($emailAddress) > 150)) { + throw new InvalidArgumentException('invalid length for $emailAddress when calling User., must be smaller than or equal to 150.'); + } + + $this->container['emailAddress'] = $emailAddress; return $this; } /** - * Gets statedEmployeeCount + * Gets emailVerificationKey * - * @return int|null + * @return string|null */ - public function getStatedEmployeeCount(): ?int + public function getEmailVerificationKey(): ?string { - return $this->container['statedEmployeeCount']; + return $this->container['emailVerificationKey']; } /** - * Sets statedEmployeeCount + * Sets emailVerificationKey * - * @param int|null $statedEmployeeCount statedEmployeeCount + * @param string|null $emailVerificationKey emailVerificationKey * * @return $this */ - public function setStatedEmployeeCount(?int $statedEmployeeCount): static - { - if (is_null($statedEmployeeCount)) { - array_push($this->openAPINullablesSetToNull, 'statedEmployeeCount'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('statedEmployeeCount', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + public function setEmailVerificationKey(?string $emailVerificationKey): static + { + if (is_null($emailVerificationKey)) { + throw new InvalidArgumentException('non-nullable emailVerificationKey cannot be null'); } - $this->container['statedEmployeeCount'] = $statedEmployeeCount; + $this->container['emailVerificationKey'] = $emailVerificationKey; return $this; } @@ -1305,188 +1267,188 @@ public function setEmailVerified(?bool $emailVerified): static } /** - * Gets emailVerificationKey + * Gets firstBillableActivityDate * - * @return string|null + * @return \DateTime|null */ - public function getEmailVerificationKey(): ?string + public function getFirstBillableActivityDate(): ?\DateTime { - return $this->container['emailVerificationKey']; + return $this->container['firstBillableActivityDate']; } /** - * Sets emailVerificationKey + * Sets firstBillableActivityDate * - * @param string|null $emailVerificationKey emailVerificationKey + * @param \DateTime|null $firstBillableActivityDate firstBillableActivityDate * * @return $this */ - public function setEmailVerificationKey(?string $emailVerificationKey): static + public function setFirstBillableActivityDate(?\DateTime $firstBillableActivityDate): static { - if (is_null($emailVerificationKey)) { - throw new InvalidArgumentException('non-nullable emailVerificationKey cannot be null'); + if (is_null($firstBillableActivityDate)) { + array_push($this->openAPINullablesSetToNull, 'firstBillableActivityDate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('firstBillableActivityDate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['emailVerificationKey'] = $emailVerificationKey; + $this->container['firstBillableActivityDate'] = $firstBillableActivityDate; return $this; } /** - * Gets gdprOptin + * Gets firstName * - * @return bool|null + * @return string|null */ - public function getGdprOptin(): ?bool + public function getFirstName(): ?string { - return $this->container['gdprOptin']; + return $this->container['firstName']; } /** - * Sets gdprOptin + * Sets firstName * - * @param bool|null $gdprOptin gdprOptin + * @param string|null $firstName firstName * * @return $this */ - public function setGdprOptin(?bool $gdprOptin): static + public function setFirstName(?string $firstName): static { - if (is_null($gdprOptin)) { - throw new InvalidArgumentException('non-nullable gdprOptin cannot be null'); + if (is_null($firstName)) { + array_push($this->openAPINullablesSetToNull, 'firstName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('firstName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['gdprOptin'] = $gdprOptin; + if (!is_null($firstName) && (mb_strlen($firstName) > 150)) { + throw new InvalidArgumentException('invalid length for $firstName when calling User., must be smaller than or equal to 150.'); + } + + $this->container['firstName'] = $firstName; return $this; } /** - * Gets inviteCode + * Gets gdprOptin * - * @return string|null + * @return bool|null */ - public function getInviteCode(): ?string + public function getGdprOptin(): ?bool { - return $this->container['inviteCode']; + return $this->container['gdprOptin']; } /** - * Sets inviteCode + * Sets gdprOptin * - * @param string|null $inviteCode inviteCode + * @param bool|null $gdprOptin gdprOptin * * @return $this */ - public function setInviteCode(?string $inviteCode): static + public function setGdprOptin(?bool $gdprOptin): static { - if (is_null($inviteCode)) { - array_push($this->openAPINullablesSetToNull, 'inviteCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('inviteCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($gdprOptin)) { + throw new InvalidArgumentException('non-nullable gdprOptin cannot be null'); } - $this->container['inviteCode'] = $inviteCode; + $this->container['gdprOptin'] = $gdprOptin; return $this; } /** - * Gets registrationIp + * Gets id * * @return string|null */ - public function getRegistrationIp(): ?string + public function getId(): ?string { - return $this->container['registrationIp']; + return $this->container['id']; } /** - * Sets registrationIp + * Sets id * - * @param string|null $registrationIp registrationIp + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setRegistrationIp(?string $registrationIp): static + public function setId(?string $id): static { - if (is_null($registrationIp)) { - array_push($this->openAPINullablesSetToNull, 'registrationIp'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('registrationIp', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($registrationIp) && (mb_strlen($registrationIp) > 20)) { - throw new InvalidArgumentException('invalid length for $registrationIp when calling User., must be smaller than or equal to 20.'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - - $this->container['registrationIp'] = $registrationIp; + $this->container['id'] = $id; return $this; } /** - * Gets registrationDate + * Gets industry * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\UserIndustry|null */ - public function getRegistrationDate(): ?\DateTime + public function getIndustry(): ?\SynergiTech\Staffology\Model\UserIndustry { - return $this->container['registrationDate']; + return $this->container['industry']; } /** - * Sets registrationDate + * Sets industry * - * @param \DateTime|null $registrationDate registrationDate + * @param \SynergiTech\Staffology\Model\UserIndustry|null $industry industry * * @return $this */ - public function setRegistrationDate(?\DateTime $registrationDate): static + public function setIndustry(?\SynergiTech\Staffology\Model\UserIndustry $industry): static { - if (is_null($registrationDate)) { - throw new InvalidArgumentException('non-nullable registrationDate cannot be null'); + if (is_null($industry)) { + throw new InvalidArgumentException('non-nullable industry cannot be null'); } - $this->container['registrationDate'] = $registrationDate; + $this->container['industry'] = $industry; return $this; } /** - * Gets lastLogin + * Gets inviteCode * - * @return \DateTime|null + * @return string|null */ - public function getLastLogin(): ?\DateTime + public function getInviteCode(): ?string { - return $this->container['lastLogin']; + return $this->container['inviteCode']; } /** - * Sets lastLogin + * Sets inviteCode * - * @param \DateTime|null $lastLogin lastLogin + * @param string|null $inviteCode inviteCode * * @return $this */ - public function setLastLogin(?\DateTime $lastLogin): static + public function setInviteCode(?string $inviteCode): static { - if (is_null($lastLogin)) { - array_push($this->openAPINullablesSetToNull, 'lastLogin'); + if (is_null($inviteCode)) { + array_push($this->openAPINullablesSetToNull, 'inviteCode'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('lastLogin', $nullablesSetToNull); + $index = array_search('inviteCode', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['lastLogin'] = $lastLogin; + $this->container['inviteCode'] = $inviteCode; return $this; } @@ -1519,722 +1481,816 @@ public function setIsActivated(?bool $isActivated): static } /** - * Gets authorization + * Gets isBilledInNetSuite * - * @return \SynergiTech\Staffology\Model\UserAuthorization|null + * @return bool|null */ - public function getAuthorization(): ?\SynergiTech\Staffology\Model\UserAuthorization + public function getIsBilledInNetSuite(): ?bool { - return $this->container['authorization']; + return $this->container['isBilledInNetSuite']; } /** - * Sets authorization + * Sets isBilledInNetSuite * - * @param \SynergiTech\Staffology\Model\UserAuthorization|null $authorization authorization + * @param bool|null $isBilledInNetSuite isBilledInNetSuite * * @return $this */ - public function setAuthorization(?\SynergiTech\Staffology\Model\UserAuthorization $authorization): static + public function setIsBilledInNetSuite(?bool $isBilledInNetSuite): static { - if (is_null($authorization)) { - throw new InvalidArgumentException('non-nullable authorization cannot be null'); + if (is_null($isBilledInNetSuite)) { + throw new InvalidArgumentException('non-nullable isBilledInNetSuite cannot be null'); } - $this->container['authorization'] = $authorization; + $this->container['isBilledInNetSuite'] = $isBilledInNetSuite; return $this; } /** - * Gets isSuperAdmin + * Gets isBureauMember * * @return bool|null */ - public function getIsSuperAdmin(): ?bool + public function getIsBureauMember(): ?bool { - return $this->container['isSuperAdmin']; + return $this->container['isBureauMember']; } /** - * Sets isSuperAdmin + * Sets isBureauMember * - * @param bool|null $isSuperAdmin isSuperAdmin + * @param bool|null $isBureauMember Indicates whether the user is a bureau member. * * @return $this */ - public function setIsSuperAdmin(?bool $isSuperAdmin): static + public function setIsBureauMember(?bool $isBureauMember): static { - if (is_null($isSuperAdmin)) { - throw new InvalidArgumentException('non-nullable isSuperAdmin cannot be null'); + if (is_null($isBureauMember)) { + throw new InvalidArgumentException('non-nullable isBureauMember cannot be null'); } - $this->container['isSuperAdmin'] = $isSuperAdmin; + $this->container['isBureauMember'] = $isBureauMember; return $this; } /** - * Gets canUseBureauFeatures + * Gets isSuperAdmin * * @return bool|null */ - public function getCanUseBureauFeatures(): ?bool + public function getIsSuperAdmin(): ?bool { - return $this->container['canUseBureauFeatures']; + return $this->container['isSuperAdmin']; } /** - * Sets canUseBureauFeatures + * Sets isSuperAdmin * - * @param bool|null $canUseBureauFeatures canUseBureauFeatures + * @param bool|null $isSuperAdmin isSuperAdmin * * @return $this */ - public function setCanUseBureauFeatures(?bool $canUseBureauFeatures): static + public function setIsSuperAdmin(?bool $isSuperAdmin): static { - if (is_null($canUseBureauFeatures)) { - throw new InvalidArgumentException('non-nullable canUseBureauFeatures cannot be null'); + if (is_null($isSuperAdmin)) { + throw new InvalidArgumentException('non-nullable isSuperAdmin cannot be null'); } - $this->container['canUseBureauFeatures'] = $canUseBureauFeatures; + $this->container['isSuperAdmin'] = $isSuperAdmin; return $this; } /** - * Gets canUseBetaFeatures + * Gets jobTitle * - * @return bool|null + * @return string|null */ - public function getCanUseBetaFeatures(): ?bool + public function getJobTitle(): ?string { - return $this->container['canUseBetaFeatures']; + return $this->container['jobTitle']; } /** - * Sets canUseBetaFeatures + * Sets jobTitle * - * @param bool|null $canUseBetaFeatures canUseBetaFeatures + * @param string|null $jobTitle jobTitle * * @return $this */ - public function setCanUseBetaFeatures(?bool $canUseBetaFeatures): static + public function setJobTitle(?string $jobTitle): static { - if (is_null($canUseBetaFeatures)) { - throw new InvalidArgumentException('non-nullable canUseBetaFeatures cannot be null'); + if (is_null($jobTitle)) { + array_push($this->openAPINullablesSetToNull, 'jobTitle'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('jobTitle', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['canUseBetaFeatures'] = $canUseBetaFeatures; + if (!is_null($jobTitle) && (mb_strlen($jobTitle) > 150)) { + throw new InvalidArgumentException('invalid length for $jobTitle when calling User., must be smaller than or equal to 150.'); + } + + $this->container['jobTitle'] = $jobTitle; return $this; } /** - * Gets canUseReportWriter + * Gets jobType * - * @return bool|null + * @return \SynergiTech\Staffology\Model\UserJobType|null */ - public function getCanUseReportWriter(): ?bool + public function getJobType(): ?\SynergiTech\Staffology\Model\UserJobType { - return $this->container['canUseReportWriter']; + return $this->container['jobType']; } /** - * Sets canUseReportWriter + * Sets jobType * - * @param bool|null $canUseReportWriter Indicates whether the user has permission to use the report writer feature. + * @param \SynergiTech\Staffology\Model\UserJobType|null $jobType jobType * * @return $this */ - public function setCanUseReportWriter(?bool $canUseReportWriter): static + public function setJobType(?\SynergiTech\Staffology\Model\UserJobType $jobType): static { - if (is_null($canUseReportWriter)) { - throw new InvalidArgumentException('non-nullable canUseReportWriter cannot be null'); + if (is_null($jobType)) { + throw new InvalidArgumentException('non-nullable jobType cannot be null'); } - $this->container['canUseReportWriter'] = $canUseReportWriter; + $this->container['jobType'] = $jobType; return $this; } /** - * Gets canUseRefactoredAeRoutines + * Gets lastLogin * - * @return bool|null + * @return \DateTime|null */ - public function getCanUseRefactoredAeRoutines(): ?bool + public function getLastLogin(): ?\DateTime { - return $this->container['canUseRefactoredAeRoutines']; + return $this->container['lastLogin']; } /** - * Sets canUseRefactoredAeRoutines + * Sets lastLogin * - * @param bool|null $canUseRefactoredAeRoutines canUseRefactoredAeRoutines + * @param \DateTime|null $lastLogin lastLogin * * @return $this */ - public function setCanUseRefactoredAeRoutines(?bool $canUseRefactoredAeRoutines): static + public function setLastLogin(?\DateTime $lastLogin): static { - if (is_null($canUseRefactoredAeRoutines)) { - throw new InvalidArgumentException('non-nullable canUseRefactoredAeRoutines cannot be null'); + if (is_null($lastLogin)) { + array_push($this->openAPINullablesSetToNull, 'lastLogin'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lastLogin', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['canUseRefactoredAeRoutines'] = $canUseRefactoredAeRoutines; + $this->container['lastLogin'] = $lastLogin; return $this; } /** - * Gets isBilledInNetSuite + * Gets lastName * - * @return bool|null + * @return string|null */ - public function getIsBilledInNetSuite(): ?bool + public function getLastName(): ?string { - return $this->container['isBilledInNetSuite']; + return $this->container['lastName']; } /** - * Sets isBilledInNetSuite + * Sets lastName * - * @param bool|null $isBilledInNetSuite isBilledInNetSuite + * @param string|null $lastName lastName * * @return $this */ - public function setIsBilledInNetSuite(?bool $isBilledInNetSuite): static + public function setLastName(?string $lastName): static { - if (is_null($isBilledInNetSuite)) { - throw new InvalidArgumentException('non-nullable isBilledInNetSuite cannot be null'); + if (is_null($lastName)) { + array_push($this->openAPINullablesSetToNull, 'lastName'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('lastName', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isBilledInNetSuite'] = $isBilledInNetSuite; + if (!is_null($lastName) && (mb_strlen($lastName) > 150)) { + throw new InvalidArgumentException('invalid length for $lastName when calling User., must be smaller than or equal to 150.'); + } + + $this->container['lastName'] = $lastName; return $this; } /** - * Gets tenant + * Gets loginDisabled * - * @return \SynergiTech\Staffology\Model\Tenant|null + * @return bool|null */ - public function getTenant(): ?\SynergiTech\Staffology\Model\Tenant + public function getLoginDisabled(): ?bool { - return $this->container['tenant']; + return $this->container['loginDisabled']; } /** - * Sets tenant + * Sets loginDisabled * - * @param \SynergiTech\Staffology\Model\Tenant|null $tenant tenant + * @param bool|null $loginDisabled [readonly] If true then the user will not have login permissions * * @return $this */ - public function setTenant(?\SynergiTech\Staffology\Model\Tenant $tenant): static + public function setLoginDisabled(?bool $loginDisabled): static { - if (is_null($tenant)) { - throw new InvalidArgumentException('non-nullable tenant cannot be null'); + if (is_null($loginDisabled)) { + throw new InvalidArgumentException('non-nullable loginDisabled cannot be null'); } - $this->container['tenant'] = $tenant; + $this->container['loginDisabled'] = $loginDisabled; return $this; } /** - * Gets requestDdSetup + * Gets migratedFrom * - * @return bool|null + * @return string|null */ - public function getRequestDdSetup(): ?bool + public function getMigratedFrom(): ?string { - return $this->container['requestDdSetup']; + return $this->container['migratedFrom']; } /** - * Sets requestDdSetup + * Sets migratedFrom * - * @param bool|null $requestDdSetup [readonly] If true then the user is required to set up a direct debit mandate + * @param string|null $migratedFrom migratedFrom * * @return $this */ - public function setRequestDdSetup(?bool $requestDdSetup): static + public function setMigratedFrom(?string $migratedFrom): static { - if (is_null($requestDdSetup)) { - throw new InvalidArgumentException('non-nullable requestDdSetup cannot be null'); + if (is_null($migratedFrom)) { + array_push($this->openAPINullablesSetToNull, 'migratedFrom'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('migratedFrom', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($migratedFrom) && (mb_strlen($migratedFrom) > 150)) { + throw new InvalidArgumentException('invalid length for $migratedFrom when calling User., must be smaller than or equal to 150.'); + } + if (!is_null($migratedFrom) && (mb_strlen($migratedFrom) < 0)) { + throw new InvalidArgumentException('invalid length for $migratedFrom when calling User., must be bigger than or equal to 0.'); } - $this->container['requestDdSetup'] = $requestDdSetup; + + $this->container['migratedFrom'] = $migratedFrom; return $this; } /** - * Gets disabled + * Gets monthlyMinimum * - * @return bool|null + * @return \SynergiTech\Staffology\Model\MonthlyMinimum|null */ - public function getDisabled(): ?bool + public function getMonthlyMinimum(): ?\SynergiTech\Staffology\Model\MonthlyMinimum { - return $this->container['disabled']; + return $this->container['monthlyMinimum']; } /** - * Sets disabled + * Sets monthlyMinimum * - * @param bool|null $disabled [readonly] If true then any employers the owner managed will not be able to run new payruns. DisabledReason will give a reason why the account is disabled + * @param \SynergiTech\Staffology\Model\MonthlyMinimum|null $monthlyMinimum monthlyMinimum * * @return $this */ - public function setDisabled(?bool $disabled): static + public function setMonthlyMinimum(?\SynergiTech\Staffology\Model\MonthlyMinimum $monthlyMinimum): static { - if (is_null($disabled)) { - throw new InvalidArgumentException('non-nullable disabled cannot be null'); + if (is_null($monthlyMinimum)) { + throw new InvalidArgumentException('non-nullable monthlyMinimum cannot be null'); } - $this->container['disabled'] = $disabled; + $this->container['monthlyMinimum'] = $monthlyMinimum; return $this; } /** - * Gets canCreateEmployers + * Gets pendingEmailAddress * - * @return bool|null + * @return string|null */ - public function getCanCreateEmployers(): ?bool + public function getPendingEmailAddress(): ?string { - return $this->container['canCreateEmployers']; + return $this->container['pendingEmailAddress']; } /** - * Sets canCreateEmployers + * Sets pendingEmailAddress * - * @param bool|null $canCreateEmployers [readonly] If false then the user cannot create new employers. This can be turned on or off by the tenant admin. + * @param string|null $pendingEmailAddress If the user has requested to change their email address then the address it'll be changed to after verification will be shown here. * * @return $this */ - public function setCanCreateEmployers(?bool $canCreateEmployers): static + public function setPendingEmailAddress(?string $pendingEmailAddress): static { - if (is_null($canCreateEmployers)) { - throw new InvalidArgumentException('non-nullable canCreateEmployers cannot be null'); + if (is_null($pendingEmailAddress)) { + array_push($this->openAPINullablesSetToNull, 'pendingEmailAddress'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pendingEmailAddress', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['canCreateEmployers'] = $canCreateEmployers; + if (!is_null($pendingEmailAddress) && (mb_strlen($pendingEmailAddress) > 150)) { + throw new InvalidArgumentException('invalid length for $pendingEmailAddress when calling User., must be smaller than or equal to 150.'); + } + + $this->container['pendingEmailAddress'] = $pendingEmailAddress; return $this; } /** - * Gets disabledReason + * Gets photo * * @return string|null */ - public function getDisabledReason(): ?string + public function getPhoto(): ?string { - return $this->container['disabledReason']; + return $this->container['photo']; } /** - * Sets disabledReason + * Sets photo * - * @param string|null $disabledReason disabledReason + * @param string|null $photo photo * * @return $this */ - public function setDisabledReason(?string $disabledReason): static + public function setPhoto(?string $photo): static { - if (is_null($disabledReason)) { - array_push($this->openAPINullablesSetToNull, 'disabledReason'); + if (is_null($photo)) { + array_push($this->openAPINullablesSetToNull, 'photo'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('disabledReason', $nullablesSetToNull); + $index = array_search('photo', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['disabledReason'] = $disabledReason; + if (!is_null($photo) && (mb_strlen($photo) > 1000)) { + throw new InvalidArgumentException('invalid length for $photo when calling User., must be smaller than or equal to 1000.'); + } + + $this->container['photo'] = $photo; return $this; } /** - * Gets directDebitMandate + * Gets photoSasUrl * - * @return \SynergiTech\Staffology\Model\DirectDebitMandate|null + * @return string|null */ - public function getDirectDebitMandate(): ?\SynergiTech\Staffology\Model\DirectDebitMandate + public function getPhotoSasUrl(): ?string { - return $this->container['directDebitMandate']; + return $this->container['photoSasUrl']; } /** - * Sets directDebitMandate + * Sets photoSasUrl * - * @param \SynergiTech\Staffology\Model\DirectDebitMandate|null $directDebitMandate directDebitMandate + * @param string|null $photoSasUrl photoSasUrl * * @return $this */ - public function setDirectDebitMandate(?\SynergiTech\Staffology\Model\DirectDebitMandate $directDebitMandate): static + public function setPhotoSasUrl(?string $photoSasUrl): static { - if (is_null($directDebitMandate)) { - throw new InvalidArgumentException('non-nullable directDebitMandate cannot be null'); + if (is_null($photoSasUrl)) { + array_push($this->openAPINullablesSetToNull, 'photoSasUrl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('photoSasUrl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['directDebitMandate'] = $directDebitMandate; + $this->container['photoSasUrl'] = $photoSasUrl; return $this; } /** - * Gets displayPrefs + * Gets pricingTableId * - * @return \SynergiTech\Staffology\Model\UserDisplayPreferences|null + * @return string|null */ - public function getDisplayPrefs(): ?\SynergiTech\Staffology\Model\UserDisplayPreferences + public function getPricingTableId(): ?string { - return $this->container['displayPrefs']; + return $this->container['pricingTableId']; } /** - * Sets displayPrefs + * Sets pricingTableId * - * @param \SynergiTech\Staffology\Model\UserDisplayPreferences|null $displayPrefs displayPrefs + * @param string|null $pricingTableId pricingTableId * * @return $this */ - public function setDisplayPrefs(?\SynergiTech\Staffology\Model\UserDisplayPreferences $displayPrefs): static + public function setPricingTableId(?string $pricingTableId): static { - if (is_null($displayPrefs)) { - throw new InvalidArgumentException('non-nullable displayPrefs cannot be null'); + if (is_null($pricingTableId)) { + array_push($this->openAPINullablesSetToNull, 'pricingTableId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pricingTableId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['displayPrefs'] = $displayPrefs; + $this->container['pricingTableId'] = $pricingTableId; return $this; } /** - * Gets showBills + * Gets registrationDate * - * @return bool|null + * @return \DateTime|null */ - public function getShowBills(): ?bool + public function getRegistrationDate(): ?\DateTime { - return $this->container['showBills']; + return $this->container['registrationDate']; } /** - * Sets showBills + * Sets registrationDate * - * @param bool|null $showBills [readonly] Whether or not the user can see bills. This will be false if the Tenant manages billing and the user is not an admin for the Tenant + * @param \DateTime|null $registrationDate registrationDate * * @return $this */ - public function setShowBills(?bool $showBills): static + public function setRegistrationDate(?\DateTime $registrationDate): static { - if (is_null($showBills)) { - array_push($this->openAPINullablesSetToNull, 'showBills'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('showBills', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($registrationDate)) { + throw new InvalidArgumentException('non-nullable registrationDate cannot be null'); } - $this->container['showBills'] = $showBills; + $this->container['registrationDate'] = $registrationDate; return $this; } /** - * Gets accountingCustomerId + * Gets registrationIp * * @return string|null */ - public function getAccountingCustomerId(): ?string + public function getRegistrationIp(): ?string { - return $this->container['accountingCustomerId']; + return $this->container['registrationIp']; } /** - * Sets accountingCustomerId + * Sets registrationIp * - * @param string|null $accountingCustomerId [readonly] Used internally to manage billing + * @param string|null $registrationIp registrationIp * * @return $this */ - public function setAccountingCustomerId(?string $accountingCustomerId): static + public function setRegistrationIp(?string $registrationIp): static { - if (is_null($accountingCustomerId)) { - array_push($this->openAPINullablesSetToNull, 'accountingCustomerId'); + if (is_null($registrationIp)) { + array_push($this->openAPINullablesSetToNull, 'registrationIp'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('accountingCustomerId', $nullablesSetToNull); + $index = array_search('registrationIp', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['accountingCustomerId'] = $accountingCustomerId; + if (!is_null($registrationIp) && (mb_strlen($registrationIp) > 20)) { + throw new InvalidArgumentException('invalid length for $registrationIp when calling User., must be smaller than or equal to 20.'); + } + + $this->container['registrationIp'] = $registrationIp; return $this; } /** - * Gets pricingTableId + * Gets requestDdSetup * - * @return string|null + * @return bool|null */ - public function getPricingTableId(): ?string + public function getRequestDdSetup(): ?bool { - return $this->container['pricingTableId']; + return $this->container['requestDdSetup']; } /** - * Sets pricingTableId + * Sets requestDdSetup * - * @param string|null $pricingTableId pricingTableId + * @param bool|null $requestDdSetup [readonly] If true then the user is required to set up a direct debit mandate * * @return $this */ - public function setPricingTableId(?string $pricingTableId): static + public function setRequestDdSetup(?bool $requestDdSetup): static { - if (is_null($pricingTableId)) { - array_push($this->openAPINullablesSetToNull, 'pricingTableId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pricingTableId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($requestDdSetup)) { + throw new InvalidArgumentException('non-nullable requestDdSetup cannot be null'); } - $this->container['pricingTableId'] = $pricingTableId; + $this->container['requestDdSetup'] = $requestDdSetup; return $this; } /** - * Gets utmInfo + * Gets role * - * @return \SynergiTech\Staffology\Model\UtmInfo|null + * @return \SynergiTech\Staffology\Model\UserRole|null */ - public function getUtmInfo(): ?\SynergiTech\Staffology\Model\UtmInfo + public function getRole(): ?\SynergiTech\Staffology\Model\UserRole { - return $this->container['utmInfo']; + return $this->container['role']; } /** - * Sets utmInfo + * Sets role * - * @param \SynergiTech\Staffology\Model\UtmInfo|null $utmInfo utmInfo + * @param \SynergiTech\Staffology\Model\UserRole|null $role role * * @return $this */ - public function setUtmInfo(?\SynergiTech\Staffology\Model\UtmInfo $utmInfo): static + public function setRole(?\SynergiTech\Staffology\Model\UserRole $role): static { - if (is_null($utmInfo)) { - throw new InvalidArgumentException('non-nullable utmInfo cannot be null'); + if (is_null($role)) { + throw new InvalidArgumentException('non-nullable role cannot be null'); } - $this->container['utmInfo'] = $utmInfo; + $this->container['role'] = $role; return $this; } /** - * Gets firstBillableActivityDate + * Gets salutation * - * @return \DateTime|null + * @return string|null */ - public function getFirstBillableActivityDate(): ?\DateTime + public function getSalutation(): ?string { - return $this->container['firstBillableActivityDate']; + return $this->container['salutation']; } /** - * Sets firstBillableActivityDate + * Sets salutation * - * @param \DateTime|null $firstBillableActivityDate firstBillableActivityDate + * @param string|null $salutation salutation * * @return $this */ - public function setFirstBillableActivityDate(?\DateTime $firstBillableActivityDate): static + public function setSalutation(?string $salutation): static { - if (is_null($firstBillableActivityDate)) { - array_push($this->openAPINullablesSetToNull, 'firstBillableActivityDate'); + if (is_null($salutation)) { + array_push($this->openAPINullablesSetToNull, 'salutation'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('firstBillableActivityDate', $nullablesSetToNull); + $index = array_search('salutation', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['firstBillableActivityDate'] = $firstBillableActivityDate; + if (!is_null($salutation) && (mb_strlen($salutation) > 35)) { + throw new InvalidArgumentException('invalid length for $salutation when calling User., must be smaller than or equal to 35.'); + } + if (!is_null($salutation) && (!preg_match("/^[A-Za-z '\\-]{1,35}$/", ObjectSerializer::toString($salutation)))) { + throw new InvalidArgumentException("invalid value for \$salutation when calling User., must conform to the pattern /^[A-Za-z '\\-]{1,35}$/."); + } + + $this->container['salutation'] = $salutation; return $this; } /** - * Gets bureauNotificationEmailAddress + * Gets showBills * - * @return string|null + * @return bool|null */ - public function getBureauNotificationEmailAddress(): ?string + public function getShowBills(): ?bool { - return $this->container['bureauNotificationEmailAddress']; + return $this->container['showBills']; } /** - * Sets bureauNotificationEmailAddress + * Sets showBills * - * @param string|null $bureauNotificationEmailAddress If an email address is provided here then Bureau-related notifications will go to this address instead of the EmailAddress + * @param bool|null $showBills [readonly] Whether or not the user can see bills. This will be false if the Tenant manages billing and the user is not an admin for the Tenant * * @return $this */ - public function setBureauNotificationEmailAddress(?string $bureauNotificationEmailAddress): static + public function setShowBills(?bool $showBills): static { - if (is_null($bureauNotificationEmailAddress)) { - array_push($this->openAPINullablesSetToNull, 'bureauNotificationEmailAddress'); + if (is_null($showBills)) { + array_push($this->openAPINullablesSetToNull, 'showBills'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bureauNotificationEmailAddress', $nullablesSetToNull); + $index = array_search('showBills', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($bureauNotificationEmailAddress) && (mb_strlen($bureauNotificationEmailAddress) > 150)) { - throw new InvalidArgumentException('invalid length for $bureauNotificationEmailAddress when calling User., must be smaller than or equal to 150.'); - } - - $this->container['bureauNotificationEmailAddress'] = $bureauNotificationEmailAddress; + $this->container['showBills'] = $showBills; return $this; } /** - * Gets monthlyMinimum + * Gets statedEmployeeCount * - * @return \SynergiTech\Staffology\Model\MonthlyMinimum|null + * @return int|null */ - public function getMonthlyMinimum(): ?\SynergiTech\Staffology\Model\MonthlyMinimum + public function getStatedEmployeeCount(): ?int { - return $this->container['monthlyMinimum']; + return $this->container['statedEmployeeCount']; } /** - * Sets monthlyMinimum + * Sets statedEmployeeCount * - * @param \SynergiTech\Staffology\Model\MonthlyMinimum|null $monthlyMinimum monthlyMinimum + * @param int|null $statedEmployeeCount statedEmployeeCount * * @return $this */ - public function setMonthlyMinimum(?\SynergiTech\Staffology\Model\MonthlyMinimum $monthlyMinimum): static + public function setStatedEmployeeCount(?int $statedEmployeeCount): static { - if (is_null($monthlyMinimum)) { - throw new InvalidArgumentException('non-nullable monthlyMinimum cannot be null'); + if (is_null($statedEmployeeCount)) { + array_push($this->openAPINullablesSetToNull, 'statedEmployeeCount'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('statedEmployeeCount', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['monthlyMinimum'] = $monthlyMinimum; + $this->container['statedEmployeeCount'] = $statedEmployeeCount; return $this; } /** - * Gets apiMailingEnabled + * Gets telephoneNumber * - * @return bool|null + * @return string|null */ - public function getApiMailingEnabled(): ?bool + public function getTelephoneNumber(): ?string { - return $this->container['apiMailingEnabled']; + return $this->container['telephoneNumber']; } /** - * Sets apiMailingEnabled + * Sets telephoneNumber * - * @param bool|null $apiMailingEnabled Flag to keep the user up-to-date with any API changes and inform about upcoming breaking changes. + * @param string|null $telephoneNumber telephoneNumber * * @return $this */ - public function setApiMailingEnabled(?bool $apiMailingEnabled): static + public function setTelephoneNumber(?string $telephoneNumber): static { - if (is_null($apiMailingEnabled)) { - throw new InvalidArgumentException('non-nullable apiMailingEnabled cannot be null'); + if (is_null($telephoneNumber)) { + array_push($this->openAPINullablesSetToNull, 'telephoneNumber'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('telephoneNumber', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['apiMailingEnabled'] = $apiMailingEnabled; + if (!is_null($telephoneNumber) && (mb_strlen($telephoneNumber) > 20)) { + throw new InvalidArgumentException('invalid length for $telephoneNumber when calling User., must be smaller than or equal to 20.'); + } + + $this->container['telephoneNumber'] = $telephoneNumber; return $this; } /** - * Gets loginDisabled + * Gets tenant * - * @return bool|null + * @return \SynergiTech\Staffology\Model\Tenant|null */ - public function getLoginDisabled(): ?bool + public function getTenant(): ?\SynergiTech\Staffology\Model\Tenant { - return $this->container['loginDisabled']; + return $this->container['tenant']; } /** - * Sets loginDisabled + * Sets tenant * - * @param bool|null $loginDisabled [readonly] If true then the user will not have login permissions + * @param \SynergiTech\Staffology\Model\Tenant|null $tenant tenant * * @return $this */ - public function setLoginDisabled(?bool $loginDisabled): static + public function setTenant(?\SynergiTech\Staffology\Model\Tenant $tenant): static { - if (is_null($loginDisabled)) { - throw new InvalidArgumentException('non-nullable loginDisabled cannot be null'); + if (is_null($tenant)) { + throw new InvalidArgumentException('non-nullable tenant cannot be null'); } - $this->container['loginDisabled'] = $loginDisabled; + $this->container['tenant'] = $tenant; return $this; } /** - * Gets isBureauMember + * Gets userIdentifier * - * @return bool|null + * @return string|null */ - public function getIsBureauMember(): ?bool + public function getUserIdentifier(): ?string { - return $this->container['isBureauMember']; + return $this->container['userIdentifier']; } /** - * Sets isBureauMember + * Sets userIdentifier * - * @param bool|null $isBureauMember Indicates whether the user is a bureau member. + * @param string|null $userIdentifier userIdentifier * * @return $this */ - public function setIsBureauMember(?bool $isBureauMember): static + public function setUserIdentifier(?string $userIdentifier): static { - if (is_null($isBureauMember)) { - throw new InvalidArgumentException('non-nullable isBureauMember cannot be null'); + if (is_null($userIdentifier)) { + array_push($this->openAPINullablesSetToNull, 'userIdentifier'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('userIdentifier', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['isBureauMember'] = $isBureauMember; + if (!is_null($userIdentifier) && (mb_strlen($userIdentifier) > 150)) { + throw new InvalidArgumentException('invalid length for $userIdentifier when calling User., must be smaller than or equal to 150.'); + } + + $this->container['userIdentifier'] = $userIdentifier; return $this; } /** - * Gets id + * Gets utmInfo * - * @return string|null + * @return \SynergiTech\Staffology\Model\UtmInfo|null */ - public function getId(): ?string + public function getUtmInfo(): ?\SynergiTech\Staffology\Model\UtmInfo { - return $this->container['id']; + return $this->container['utmInfo']; } /** - * Sets id + * Sets utmInfo * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\UtmInfo|null $utmInfo utmInfo * * @return $this */ - public function setId(?string $id): static + public function setUtmInfo(?\SynergiTech\Staffology\Model\UtmInfo $utmInfo): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($utmInfo)) { + throw new InvalidArgumentException('non-nullable utmInfo cannot be null'); } - $this->container['id'] = $id; + $this->container['utmInfo'] = $utmInfo; return $this; } diff --git a/src/Model/UserAuthorization.php b/src/Model/UserAuthorization.php index a170103..7647411 100644 --- a/src/Model/UserAuthorization.php +++ b/src/Model/UserAuthorization.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/UserCategory.php b/src/Model/UserCategory.php index 14f96c0..5b698d8 100644 --- a/src/Model/UserCategory.php +++ b/src/Model/UserCategory.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/UserDisplayPreferences.php b/src/Model/UserDisplayPreferences.php index c7e5714..623b3a2 100644 --- a/src/Model/UserDisplayPreferences.php +++ b/src/Model/UserDisplayPreferences.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,22 +59,22 @@ class UserDisplayPreferences implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'startPage' => '\SynergiTech\Staffology\Model\UserstartPage', - 'showZeroes' => 'bool', - 'showTaxCodeWhenViewingPayrunEntry' => 'bool', 'allowJournalResubmit' => 'bool', - 'hideSalaryOnEmployeeIndexPage' => 'bool', - 'enableMultiEmployerImport' => 'bool', + 'dontHideFpsEmployeeList' => 'bool', 'enableCovid19Features' => 'bool', - 'hidePayslipCheckboxes' => 'bool', - 'hidePayslipSearchAndSort' => 'bool', - 'showYtdInPayslipView' => 'bool', 'enableDpsXmlUpload' => 'bool', - 'enableRtiTimestampOverride' => 'bool', + 'enableMultiEmployerImport' => 'bool', + 'enablePayrunPagination' => 'bool', 'enablePayrunWarnings' => 'bool', + 'enableRtiTimestampOverride' => 'bool', 'enableWorkingDaysOverrides' => 'bool', - 'enablePayrunPagination' => 'bool', - 'dontHideFpsEmployeeList' => 'bool' + 'hidePayslipCheckboxes' => 'bool', + 'hidePayslipSearchAndSort' => 'bool', + 'hideSalaryOnEmployeeIndexPage' => 'bool', + 'showTaxCodeWhenViewingPayrunEntry' => 'bool', + 'showYtdInPayslipView' => 'bool', + 'showZeroes' => 'bool', + 'startPage' => '\SynergiTech\Staffology\Model\UserstartPage' ]; /** @@ -83,22 +83,22 @@ class UserDisplayPreferences implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPIFormats = [ - 'startPage' => null, - 'showZeroes' => null, - 'showTaxCodeWhenViewingPayrunEntry' => null, 'allowJournalResubmit' => null, - 'hideSalaryOnEmployeeIndexPage' => null, - 'enableMultiEmployerImport' => null, + 'dontHideFpsEmployeeList' => null, 'enableCovid19Features' => null, - 'hidePayslipCheckboxes' => null, - 'hidePayslipSearchAndSort' => null, - 'showYtdInPayslipView' => null, 'enableDpsXmlUpload' => null, - 'enableRtiTimestampOverride' => null, + 'enableMultiEmployerImport' => null, + 'enablePayrunPagination' => null, 'enablePayrunWarnings' => null, + 'enableRtiTimestampOverride' => null, 'enableWorkingDaysOverrides' => null, - 'enablePayrunPagination' => null, - 'dontHideFpsEmployeeList' => null + 'hidePayslipCheckboxes' => null, + 'hidePayslipSearchAndSort' => null, + 'hideSalaryOnEmployeeIndexPage' => null, + 'showTaxCodeWhenViewingPayrunEntry' => null, + 'showYtdInPayslipView' => null, + 'showZeroes' => null, + 'startPage' => null ]; /** @@ -107,22 +107,22 @@ class UserDisplayPreferences implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPINullables = [ - 'startPage' => false, - 'showZeroes' => false, - 'showTaxCodeWhenViewingPayrunEntry' => false, 'allowJournalResubmit' => false, - 'hideSalaryOnEmployeeIndexPage' => false, - 'enableMultiEmployerImport' => false, + 'dontHideFpsEmployeeList' => false, 'enableCovid19Features' => false, - 'hidePayslipCheckboxes' => false, - 'hidePayslipSearchAndSort' => false, - 'showYtdInPayslipView' => false, 'enableDpsXmlUpload' => false, - 'enableRtiTimestampOverride' => false, + 'enableMultiEmployerImport' => false, + 'enablePayrunPagination' => false, 'enablePayrunWarnings' => false, + 'enableRtiTimestampOverride' => false, 'enableWorkingDaysOverrides' => false, - 'enablePayrunPagination' => false, - 'dontHideFpsEmployeeList' => false + 'hidePayslipCheckboxes' => false, + 'hidePayslipSearchAndSort' => false, + 'hideSalaryOnEmployeeIndexPage' => false, + 'showTaxCodeWhenViewingPayrunEntry' => false, + 'showYtdInPayslipView' => false, + 'showZeroes' => false, + 'startPage' => false ]; /** @@ -211,22 +211,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'startPage' => 'startPage', - 'showZeroes' => 'showZeroes', - 'showTaxCodeWhenViewingPayrunEntry' => 'showTaxCodeWhenViewingPayrunEntry', 'allowJournalResubmit' => 'allowJournalResubmit', - 'hideSalaryOnEmployeeIndexPage' => 'hideSalaryOnEmployeeIndexPage', - 'enableMultiEmployerImport' => 'enableMultiEmployerImport', + 'dontHideFpsEmployeeList' => 'dontHideFpsEmployeeList', 'enableCovid19Features' => 'enableCovid19Features', - 'hidePayslipCheckboxes' => 'hidePayslipCheckboxes', - 'hidePayslipSearchAndSort' => 'hidePayslipSearchAndSort', - 'showYtdInPayslipView' => 'showYtdInPayslipView', 'enableDpsXmlUpload' => 'enableDpsXmlUpload', - 'enableRtiTimestampOverride' => 'enableRtiTimestampOverride', + 'enableMultiEmployerImport' => 'enableMultiEmployerImport', + 'enablePayrunPagination' => 'enablePayrunPagination', 'enablePayrunWarnings' => 'enablePayrunWarnings', + 'enableRtiTimestampOverride' => 'enableRtiTimestampOverride', 'enableWorkingDaysOverrides' => 'enableWorkingDaysOverrides', - 'enablePayrunPagination' => 'enablePayrunPagination', - 'dontHideFpsEmployeeList' => 'dontHideFpsEmployeeList' + 'hidePayslipCheckboxes' => 'hidePayslipCheckboxes', + 'hidePayslipSearchAndSort' => 'hidePayslipSearchAndSort', + 'hideSalaryOnEmployeeIndexPage' => 'hideSalaryOnEmployeeIndexPage', + 'showTaxCodeWhenViewingPayrunEntry' => 'showTaxCodeWhenViewingPayrunEntry', + 'showYtdInPayslipView' => 'showYtdInPayslipView', + 'showZeroes' => 'showZeroes', + 'startPage' => 'startPage' ]; /** @@ -235,22 +235,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'startPage' => 'setStartPage', - 'showZeroes' => 'setShowZeroes', - 'showTaxCodeWhenViewingPayrunEntry' => 'setShowTaxCodeWhenViewingPayrunEntry', 'allowJournalResubmit' => 'setAllowJournalResubmit', - 'hideSalaryOnEmployeeIndexPage' => 'setHideSalaryOnEmployeeIndexPage', - 'enableMultiEmployerImport' => 'setEnableMultiEmployerImport', + 'dontHideFpsEmployeeList' => 'setDontHideFpsEmployeeList', 'enableCovid19Features' => 'setEnableCovid19Features', - 'hidePayslipCheckboxes' => 'setHidePayslipCheckboxes', - 'hidePayslipSearchAndSort' => 'setHidePayslipSearchAndSort', - 'showYtdInPayslipView' => 'setShowYtdInPayslipView', 'enableDpsXmlUpload' => 'setEnableDpsXmlUpload', - 'enableRtiTimestampOverride' => 'setEnableRtiTimestampOverride', + 'enableMultiEmployerImport' => 'setEnableMultiEmployerImport', + 'enablePayrunPagination' => 'setEnablePayrunPagination', 'enablePayrunWarnings' => 'setEnablePayrunWarnings', + 'enableRtiTimestampOverride' => 'setEnableRtiTimestampOverride', 'enableWorkingDaysOverrides' => 'setEnableWorkingDaysOverrides', - 'enablePayrunPagination' => 'setEnablePayrunPagination', - 'dontHideFpsEmployeeList' => 'setDontHideFpsEmployeeList' + 'hidePayslipCheckboxes' => 'setHidePayslipCheckboxes', + 'hidePayslipSearchAndSort' => 'setHidePayslipSearchAndSort', + 'hideSalaryOnEmployeeIndexPage' => 'setHideSalaryOnEmployeeIndexPage', + 'showTaxCodeWhenViewingPayrunEntry' => 'setShowTaxCodeWhenViewingPayrunEntry', + 'showYtdInPayslipView' => 'setShowYtdInPayslipView', + 'showZeroes' => 'setShowZeroes', + 'startPage' => 'setStartPage' ]; /** @@ -259,22 +259,22 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'startPage' => 'getStartPage', - 'showZeroes' => 'getShowZeroes', - 'showTaxCodeWhenViewingPayrunEntry' => 'getShowTaxCodeWhenViewingPayrunEntry', 'allowJournalResubmit' => 'getAllowJournalResubmit', - 'hideSalaryOnEmployeeIndexPage' => 'getHideSalaryOnEmployeeIndexPage', - 'enableMultiEmployerImport' => 'getEnableMultiEmployerImport', + 'dontHideFpsEmployeeList' => 'getDontHideFpsEmployeeList', 'enableCovid19Features' => 'getEnableCovid19Features', - 'hidePayslipCheckboxes' => 'getHidePayslipCheckboxes', - 'hidePayslipSearchAndSort' => 'getHidePayslipSearchAndSort', - 'showYtdInPayslipView' => 'getShowYtdInPayslipView', 'enableDpsXmlUpload' => 'getEnableDpsXmlUpload', - 'enableRtiTimestampOverride' => 'getEnableRtiTimestampOverride', + 'enableMultiEmployerImport' => 'getEnableMultiEmployerImport', + 'enablePayrunPagination' => 'getEnablePayrunPagination', 'enablePayrunWarnings' => 'getEnablePayrunWarnings', + 'enableRtiTimestampOverride' => 'getEnableRtiTimestampOverride', 'enableWorkingDaysOverrides' => 'getEnableWorkingDaysOverrides', - 'enablePayrunPagination' => 'getEnablePayrunPagination', - 'dontHideFpsEmployeeList' => 'getDontHideFpsEmployeeList' + 'hidePayslipCheckboxes' => 'getHidePayslipCheckboxes', + 'hidePayslipSearchAndSort' => 'getHidePayslipSearchAndSort', + 'hideSalaryOnEmployeeIndexPage' => 'getHideSalaryOnEmployeeIndexPage', + 'showTaxCodeWhenViewingPayrunEntry' => 'getShowTaxCodeWhenViewingPayrunEntry', + 'showYtdInPayslipView' => 'getShowYtdInPayslipView', + 'showZeroes' => 'getShowZeroes', + 'startPage' => 'getStartPage' ]; /** @@ -333,22 +333,22 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('startPage', $data ?? [], null); - $this->setIfExists('showZeroes', $data ?? [], null); - $this->setIfExists('showTaxCodeWhenViewingPayrunEntry', $data ?? [], null); $this->setIfExists('allowJournalResubmit', $data ?? [], null); - $this->setIfExists('hideSalaryOnEmployeeIndexPage', $data ?? [], null); - $this->setIfExists('enableMultiEmployerImport', $data ?? [], null); + $this->setIfExists('dontHideFpsEmployeeList', $data ?? [], null); $this->setIfExists('enableCovid19Features', $data ?? [], null); - $this->setIfExists('hidePayslipCheckboxes', $data ?? [], null); - $this->setIfExists('hidePayslipSearchAndSort', $data ?? [], null); - $this->setIfExists('showYtdInPayslipView', $data ?? [], null); $this->setIfExists('enableDpsXmlUpload', $data ?? [], null); - $this->setIfExists('enableRtiTimestampOverride', $data ?? [], null); + $this->setIfExists('enableMultiEmployerImport', $data ?? [], null); + $this->setIfExists('enablePayrunPagination', $data ?? [], null); $this->setIfExists('enablePayrunWarnings', $data ?? [], null); + $this->setIfExists('enableRtiTimestampOverride', $data ?? [], null); $this->setIfExists('enableWorkingDaysOverrides', $data ?? [], null); - $this->setIfExists('enablePayrunPagination', $data ?? [], null); - $this->setIfExists('dontHideFpsEmployeeList', $data ?? [], null); + $this->setIfExists('hidePayslipCheckboxes', $data ?? [], null); + $this->setIfExists('hidePayslipSearchAndSort', $data ?? [], null); + $this->setIfExists('hideSalaryOnEmployeeIndexPage', $data ?? [], null); + $this->setIfExists('showTaxCodeWhenViewingPayrunEntry', $data ?? [], null); + $this->setIfExists('showYtdInPayslipView', $data ?? [], null); + $this->setIfExists('showZeroes', $data ?? [], null); + $this->setIfExists('startPage', $data ?? [], null); } /** @@ -394,433 +394,433 @@ public function valid(): bool /** - * Gets startPage + * Gets allowJournalResubmit * - * @return \SynergiTech\Staffology\Model\UserstartPage|null + * @return bool|null */ - public function getStartPage(): ?\SynergiTech\Staffology\Model\UserstartPage + public function getAllowJournalResubmit(): ?bool { - return $this->container['startPage']; + return $this->container['allowJournalResubmit']; } /** - * Sets startPage + * Sets allowJournalResubmit * - * @param \SynergiTech\Staffology\Model\UserstartPage|null $startPage startPage + * @param bool|null $allowJournalResubmit allowJournalResubmit * * @return $this */ - public function setStartPage(?\SynergiTech\Staffology\Model\UserstartPage $startPage): static + public function setAllowJournalResubmit(?bool $allowJournalResubmit): static { - if (is_null($startPage)) { - throw new InvalidArgumentException('non-nullable startPage cannot be null'); + if (is_null($allowJournalResubmit)) { + throw new InvalidArgumentException('non-nullable allowJournalResubmit cannot be null'); } - $this->container['startPage'] = $startPage; + $this->container['allowJournalResubmit'] = $allowJournalResubmit; return $this; } /** - * Gets showZeroes + * Gets dontHideFpsEmployeeList * * @return bool|null */ - public function getShowZeroes(): ?bool + public function getDontHideFpsEmployeeList(): ?bool { - return $this->container['showZeroes']; + return $this->container['dontHideFpsEmployeeList']; } /** - * Sets showZeroes + * Sets dontHideFpsEmployeeList * - * @param bool|null $showZeroes showZeroes + * @param bool|null $dontHideFpsEmployeeList dontHideFpsEmployeeList * * @return $this */ - public function setShowZeroes(?bool $showZeroes): static + public function setDontHideFpsEmployeeList(?bool $dontHideFpsEmployeeList): static { - if (is_null($showZeroes)) { - throw new InvalidArgumentException('non-nullable showZeroes cannot be null'); + if (is_null($dontHideFpsEmployeeList)) { + throw new InvalidArgumentException('non-nullable dontHideFpsEmployeeList cannot be null'); } - $this->container['showZeroes'] = $showZeroes; + $this->container['dontHideFpsEmployeeList'] = $dontHideFpsEmployeeList; return $this; } /** - * Gets showTaxCodeWhenViewingPayrunEntry + * Gets enableCovid19Features * * @return bool|null */ - public function getShowTaxCodeWhenViewingPayrunEntry(): ?bool + public function getEnableCovid19Features(): ?bool { - return $this->container['showTaxCodeWhenViewingPayrunEntry']; + return $this->container['enableCovid19Features']; } /** - * Sets showTaxCodeWhenViewingPayrunEntry + * Sets enableCovid19Features * - * @param bool|null $showTaxCodeWhenViewingPayrunEntry showTaxCodeWhenViewingPayrunEntry + * @param bool|null $enableCovid19Features enableCovid19Features * * @return $this */ - public function setShowTaxCodeWhenViewingPayrunEntry(?bool $showTaxCodeWhenViewingPayrunEntry): static + public function setEnableCovid19Features(?bool $enableCovid19Features): static { - if (is_null($showTaxCodeWhenViewingPayrunEntry)) { - throw new InvalidArgumentException('non-nullable showTaxCodeWhenViewingPayrunEntry cannot be null'); + if (is_null($enableCovid19Features)) { + throw new InvalidArgumentException('non-nullable enableCovid19Features cannot be null'); } - $this->container['showTaxCodeWhenViewingPayrunEntry'] = $showTaxCodeWhenViewingPayrunEntry; + $this->container['enableCovid19Features'] = $enableCovid19Features; return $this; } /** - * Gets allowJournalResubmit + * Gets enableDpsXmlUpload * * @return bool|null */ - public function getAllowJournalResubmit(): ?bool + public function getEnableDpsXmlUpload(): ?bool { - return $this->container['allowJournalResubmit']; + return $this->container['enableDpsXmlUpload']; } /** - * Sets allowJournalResubmit + * Sets enableDpsXmlUpload * - * @param bool|null $allowJournalResubmit allowJournalResubmit + * @param bool|null $enableDpsXmlUpload enableDpsXmlUpload * * @return $this */ - public function setAllowJournalResubmit(?bool $allowJournalResubmit): static + public function setEnableDpsXmlUpload(?bool $enableDpsXmlUpload): static { - if (is_null($allowJournalResubmit)) { - throw new InvalidArgumentException('non-nullable allowJournalResubmit cannot be null'); + if (is_null($enableDpsXmlUpload)) { + throw new InvalidArgumentException('non-nullable enableDpsXmlUpload cannot be null'); } - $this->container['allowJournalResubmit'] = $allowJournalResubmit; + $this->container['enableDpsXmlUpload'] = $enableDpsXmlUpload; return $this; } /** - * Gets hideSalaryOnEmployeeIndexPage + * Gets enableMultiEmployerImport * * @return bool|null */ - public function getHideSalaryOnEmployeeIndexPage(): ?bool + public function getEnableMultiEmployerImport(): ?bool { - return $this->container['hideSalaryOnEmployeeIndexPage']; + return $this->container['enableMultiEmployerImport']; } /** - * Sets hideSalaryOnEmployeeIndexPage + * Sets enableMultiEmployerImport * - * @param bool|null $hideSalaryOnEmployeeIndexPage hideSalaryOnEmployeeIndexPage + * @param bool|null $enableMultiEmployerImport enableMultiEmployerImport * * @return $this */ - public function setHideSalaryOnEmployeeIndexPage(?bool $hideSalaryOnEmployeeIndexPage): static + public function setEnableMultiEmployerImport(?bool $enableMultiEmployerImport): static { - if (is_null($hideSalaryOnEmployeeIndexPage)) { - throw new InvalidArgumentException('non-nullable hideSalaryOnEmployeeIndexPage cannot be null'); + if (is_null($enableMultiEmployerImport)) { + throw new InvalidArgumentException('non-nullable enableMultiEmployerImport cannot be null'); } - $this->container['hideSalaryOnEmployeeIndexPage'] = $hideSalaryOnEmployeeIndexPage; + $this->container['enableMultiEmployerImport'] = $enableMultiEmployerImport; return $this; } /** - * Gets enableMultiEmployerImport + * Gets enablePayrunPagination * * @return bool|null */ - public function getEnableMultiEmployerImport(): ?bool + public function getEnablePayrunPagination(): ?bool { - return $this->container['enableMultiEmployerImport']; + return $this->container['enablePayrunPagination']; } /** - * Sets enableMultiEmployerImport + * Sets enablePayrunPagination * - * @param bool|null $enableMultiEmployerImport enableMultiEmployerImport + * @param bool|null $enablePayrunPagination enablePayrunPagination * * @return $this */ - public function setEnableMultiEmployerImport(?bool $enableMultiEmployerImport): static + public function setEnablePayrunPagination(?bool $enablePayrunPagination): static { - if (is_null($enableMultiEmployerImport)) { - throw new InvalidArgumentException('non-nullable enableMultiEmployerImport cannot be null'); + if (is_null($enablePayrunPagination)) { + throw new InvalidArgumentException('non-nullable enablePayrunPagination cannot be null'); } - $this->container['enableMultiEmployerImport'] = $enableMultiEmployerImport; + $this->container['enablePayrunPagination'] = $enablePayrunPagination; return $this; } /** - * Gets enableCovid19Features + * Gets enablePayrunWarnings * * @return bool|null */ - public function getEnableCovid19Features(): ?bool + public function getEnablePayrunWarnings(): ?bool { - return $this->container['enableCovid19Features']; + return $this->container['enablePayrunWarnings']; } /** - * Sets enableCovid19Features + * Sets enablePayrunWarnings * - * @param bool|null $enableCovid19Features enableCovid19Features + * @param bool|null $enablePayrunWarnings enablePayrunWarnings * * @return $this */ - public function setEnableCovid19Features(?bool $enableCovid19Features): static + public function setEnablePayrunWarnings(?bool $enablePayrunWarnings): static { - if (is_null($enableCovid19Features)) { - throw new InvalidArgumentException('non-nullable enableCovid19Features cannot be null'); + if (is_null($enablePayrunWarnings)) { + throw new InvalidArgumentException('non-nullable enablePayrunWarnings cannot be null'); } - $this->container['enableCovid19Features'] = $enableCovid19Features; + $this->container['enablePayrunWarnings'] = $enablePayrunWarnings; return $this; } /** - * Gets hidePayslipCheckboxes + * Gets enableRtiTimestampOverride * * @return bool|null */ - public function getHidePayslipCheckboxes(): ?bool + public function getEnableRtiTimestampOverride(): ?bool { - return $this->container['hidePayslipCheckboxes']; + return $this->container['enableRtiTimestampOverride']; } /** - * Sets hidePayslipCheckboxes + * Sets enableRtiTimestampOverride * - * @param bool|null $hidePayslipCheckboxes hidePayslipCheckboxes + * @param bool|null $enableRtiTimestampOverride enableRtiTimestampOverride * * @return $this */ - public function setHidePayslipCheckboxes(?bool $hidePayslipCheckboxes): static + public function setEnableRtiTimestampOverride(?bool $enableRtiTimestampOverride): static { - if (is_null($hidePayslipCheckboxes)) { - throw new InvalidArgumentException('non-nullable hidePayslipCheckboxes cannot be null'); + if (is_null($enableRtiTimestampOverride)) { + throw new InvalidArgumentException('non-nullable enableRtiTimestampOverride cannot be null'); } - $this->container['hidePayslipCheckboxes'] = $hidePayslipCheckboxes; + $this->container['enableRtiTimestampOverride'] = $enableRtiTimestampOverride; return $this; } /** - * Gets hidePayslipSearchAndSort + * Gets enableWorkingDaysOverrides * * @return bool|null */ - public function getHidePayslipSearchAndSort(): ?bool + public function getEnableWorkingDaysOverrides(): ?bool { - return $this->container['hidePayslipSearchAndSort']; + return $this->container['enableWorkingDaysOverrides']; } /** - * Sets hidePayslipSearchAndSort + * Sets enableWorkingDaysOverrides * - * @param bool|null $hidePayslipSearchAndSort hidePayslipSearchAndSort + * @param bool|null $enableWorkingDaysOverrides enableWorkingDaysOverrides * * @return $this */ - public function setHidePayslipSearchAndSort(?bool $hidePayslipSearchAndSort): static + public function setEnableWorkingDaysOverrides(?bool $enableWorkingDaysOverrides): static { - if (is_null($hidePayslipSearchAndSort)) { - throw new InvalidArgumentException('non-nullable hidePayslipSearchAndSort cannot be null'); + if (is_null($enableWorkingDaysOverrides)) { + throw new InvalidArgumentException('non-nullable enableWorkingDaysOverrides cannot be null'); } - $this->container['hidePayslipSearchAndSort'] = $hidePayslipSearchAndSort; + $this->container['enableWorkingDaysOverrides'] = $enableWorkingDaysOverrides; return $this; } /** - * Gets showYtdInPayslipView + * Gets hidePayslipCheckboxes * * @return bool|null */ - public function getShowYtdInPayslipView(): ?bool + public function getHidePayslipCheckboxes(): ?bool { - return $this->container['showYtdInPayslipView']; + return $this->container['hidePayslipCheckboxes']; } /** - * Sets showYtdInPayslipView + * Sets hidePayslipCheckboxes * - * @param bool|null $showYtdInPayslipView showYtdInPayslipView + * @param bool|null $hidePayslipCheckboxes hidePayslipCheckboxes * * @return $this */ - public function setShowYtdInPayslipView(?bool $showYtdInPayslipView): static + public function setHidePayslipCheckboxes(?bool $hidePayslipCheckboxes): static { - if (is_null($showYtdInPayslipView)) { - throw new InvalidArgumentException('non-nullable showYtdInPayslipView cannot be null'); + if (is_null($hidePayslipCheckboxes)) { + throw new InvalidArgumentException('non-nullable hidePayslipCheckboxes cannot be null'); } - $this->container['showYtdInPayslipView'] = $showYtdInPayslipView; + $this->container['hidePayslipCheckboxes'] = $hidePayslipCheckboxes; return $this; } /** - * Gets enableDpsXmlUpload + * Gets hidePayslipSearchAndSort * * @return bool|null */ - public function getEnableDpsXmlUpload(): ?bool + public function getHidePayslipSearchAndSort(): ?bool { - return $this->container['enableDpsXmlUpload']; + return $this->container['hidePayslipSearchAndSort']; } /** - * Sets enableDpsXmlUpload + * Sets hidePayslipSearchAndSort * - * @param bool|null $enableDpsXmlUpload enableDpsXmlUpload + * @param bool|null $hidePayslipSearchAndSort hidePayslipSearchAndSort * * @return $this */ - public function setEnableDpsXmlUpload(?bool $enableDpsXmlUpload): static + public function setHidePayslipSearchAndSort(?bool $hidePayslipSearchAndSort): static { - if (is_null($enableDpsXmlUpload)) { - throw new InvalidArgumentException('non-nullable enableDpsXmlUpload cannot be null'); + if (is_null($hidePayslipSearchAndSort)) { + throw new InvalidArgumentException('non-nullable hidePayslipSearchAndSort cannot be null'); } - $this->container['enableDpsXmlUpload'] = $enableDpsXmlUpload; + $this->container['hidePayslipSearchAndSort'] = $hidePayslipSearchAndSort; return $this; } /** - * Gets enableRtiTimestampOverride + * Gets hideSalaryOnEmployeeIndexPage * * @return bool|null */ - public function getEnableRtiTimestampOverride(): ?bool + public function getHideSalaryOnEmployeeIndexPage(): ?bool { - return $this->container['enableRtiTimestampOverride']; + return $this->container['hideSalaryOnEmployeeIndexPage']; } /** - * Sets enableRtiTimestampOverride + * Sets hideSalaryOnEmployeeIndexPage * - * @param bool|null $enableRtiTimestampOverride enableRtiTimestampOverride + * @param bool|null $hideSalaryOnEmployeeIndexPage hideSalaryOnEmployeeIndexPage * * @return $this */ - public function setEnableRtiTimestampOverride(?bool $enableRtiTimestampOverride): static + public function setHideSalaryOnEmployeeIndexPage(?bool $hideSalaryOnEmployeeIndexPage): static { - if (is_null($enableRtiTimestampOverride)) { - throw new InvalidArgumentException('non-nullable enableRtiTimestampOverride cannot be null'); + if (is_null($hideSalaryOnEmployeeIndexPage)) { + throw new InvalidArgumentException('non-nullable hideSalaryOnEmployeeIndexPage cannot be null'); } - $this->container['enableRtiTimestampOverride'] = $enableRtiTimestampOverride; + $this->container['hideSalaryOnEmployeeIndexPage'] = $hideSalaryOnEmployeeIndexPage; return $this; } /** - * Gets enablePayrunWarnings + * Gets showTaxCodeWhenViewingPayrunEntry * * @return bool|null */ - public function getEnablePayrunWarnings(): ?bool + public function getShowTaxCodeWhenViewingPayrunEntry(): ?bool { - return $this->container['enablePayrunWarnings']; + return $this->container['showTaxCodeWhenViewingPayrunEntry']; } /** - * Sets enablePayrunWarnings + * Sets showTaxCodeWhenViewingPayrunEntry * - * @param bool|null $enablePayrunWarnings enablePayrunWarnings + * @param bool|null $showTaxCodeWhenViewingPayrunEntry showTaxCodeWhenViewingPayrunEntry * * @return $this */ - public function setEnablePayrunWarnings(?bool $enablePayrunWarnings): static + public function setShowTaxCodeWhenViewingPayrunEntry(?bool $showTaxCodeWhenViewingPayrunEntry): static { - if (is_null($enablePayrunWarnings)) { - throw new InvalidArgumentException('non-nullable enablePayrunWarnings cannot be null'); + if (is_null($showTaxCodeWhenViewingPayrunEntry)) { + throw new InvalidArgumentException('non-nullable showTaxCodeWhenViewingPayrunEntry cannot be null'); } - $this->container['enablePayrunWarnings'] = $enablePayrunWarnings; + $this->container['showTaxCodeWhenViewingPayrunEntry'] = $showTaxCodeWhenViewingPayrunEntry; return $this; } /** - * Gets enableWorkingDaysOverrides + * Gets showYtdInPayslipView * * @return bool|null */ - public function getEnableWorkingDaysOverrides(): ?bool + public function getShowYtdInPayslipView(): ?bool { - return $this->container['enableWorkingDaysOverrides']; + return $this->container['showYtdInPayslipView']; } /** - * Sets enableWorkingDaysOverrides + * Sets showYtdInPayslipView * - * @param bool|null $enableWorkingDaysOverrides enableWorkingDaysOverrides + * @param bool|null $showYtdInPayslipView showYtdInPayslipView * * @return $this */ - public function setEnableWorkingDaysOverrides(?bool $enableWorkingDaysOverrides): static + public function setShowYtdInPayslipView(?bool $showYtdInPayslipView): static { - if (is_null($enableWorkingDaysOverrides)) { - throw new InvalidArgumentException('non-nullable enableWorkingDaysOverrides cannot be null'); + if (is_null($showYtdInPayslipView)) { + throw new InvalidArgumentException('non-nullable showYtdInPayslipView cannot be null'); } - $this->container['enableWorkingDaysOverrides'] = $enableWorkingDaysOverrides; + $this->container['showYtdInPayslipView'] = $showYtdInPayslipView; return $this; } /** - * Gets enablePayrunPagination + * Gets showZeroes * * @return bool|null */ - public function getEnablePayrunPagination(): ?bool + public function getShowZeroes(): ?bool { - return $this->container['enablePayrunPagination']; + return $this->container['showZeroes']; } /** - * Sets enablePayrunPagination + * Sets showZeroes * - * @param bool|null $enablePayrunPagination enablePayrunPagination + * @param bool|null $showZeroes showZeroes * * @return $this */ - public function setEnablePayrunPagination(?bool $enablePayrunPagination): static + public function setShowZeroes(?bool $showZeroes): static { - if (is_null($enablePayrunPagination)) { - throw new InvalidArgumentException('non-nullable enablePayrunPagination cannot be null'); + if (is_null($showZeroes)) { + throw new InvalidArgumentException('non-nullable showZeroes cannot be null'); } - $this->container['enablePayrunPagination'] = $enablePayrunPagination; + $this->container['showZeroes'] = $showZeroes; return $this; } /** - * Gets dontHideFpsEmployeeList + * Gets startPage * - * @return bool|null + * @return \SynergiTech\Staffology\Model\UserstartPage|null */ - public function getDontHideFpsEmployeeList(): ?bool + public function getStartPage(): ?\SynergiTech\Staffology\Model\UserstartPage { - return $this->container['dontHideFpsEmployeeList']; + return $this->container['startPage']; } /** - * Sets dontHideFpsEmployeeList + * Sets startPage * - * @param bool|null $dontHideFpsEmployeeList dontHideFpsEmployeeList + * @param \SynergiTech\Staffology\Model\UserstartPage|null $startPage startPage * * @return $this */ - public function setDontHideFpsEmployeeList(?bool $dontHideFpsEmployeeList): static + public function setStartPage(?\SynergiTech\Staffology\Model\UserstartPage $startPage): static { - if (is_null($dontHideFpsEmployeeList)) { - throw new InvalidArgumentException('non-nullable dontHideFpsEmployeeList cannot be null'); + if (is_null($startPage)) { + throw new InvalidArgumentException('non-nullable startPage cannot be null'); } - $this->container['dontHideFpsEmployeeList'] = $dontHideFpsEmployeeList; + $this->container['startPage'] = $startPage; return $this; } diff --git a/src/Model/UserEmployer.php b/src/Model/UserEmployer.php new file mode 100644 index 0000000..e9d2259 --- /dev/null +++ b/src/Model/UserEmployer.php @@ -0,0 +1,578 @@ + + */ +class UserEmployer implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'UserEmployer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'employerId' => 'int', + 'id' => 'string', + 'isOwner' => 'bool', + 'role' => '\SynergiTech\Staffology\Model\UserRole', + 'showOutstandingLoanBalancesOnly' => 'bool', + 'userId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'employerId' => 'int32', + 'id' => 'uuid', + 'isOwner' => null, + 'role' => null, + 'showOutstandingLoanBalancesOnly' => null, + 'userId' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'employerId' => false, + 'id' => false, + 'isOwner' => false, + 'role' => false, + 'showOutstandingLoanBalancesOnly' => false, + 'userId' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'employerId' => 'employerId', + 'id' => 'id', + 'isOwner' => 'isOwner', + 'role' => 'role', + 'showOutstandingLoanBalancesOnly' => 'showOutstandingLoanBalancesOnly', + 'userId' => 'userId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'employerId' => 'setEmployerId', + 'id' => 'setId', + 'isOwner' => 'setIsOwner', + 'role' => 'setRole', + 'showOutstandingLoanBalancesOnly' => 'setShowOutstandingLoanBalancesOnly', + 'userId' => 'setUserId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'employerId' => 'getEmployerId', + 'id' => 'getId', + 'isOwner' => 'getIsOwner', + 'role' => 'getRole', + 'showOutstandingLoanBalancesOnly' => 'getShowOutstandingLoanBalancesOnly', + 'userId' => 'getUserId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('employerId', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('isOwner', $data ?? [], null); + $this->setIfExists('role', $data ?? [], null); + $this->setIfExists('showOutstandingLoanBalancesOnly', $data ?? [], null); + $this->setIfExists('userId', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets employerId + * + * @return int|null + */ + public function getEmployerId(): ?int + { + return $this->container['employerId']; + } + + /** + * Sets employerId + * + * @param int|null $employerId employerId + * + * @return $this + */ + public function setEmployerId(?int $employerId): static + { + if (is_null($employerId)) { + throw new InvalidArgumentException('non-nullable employerId cannot be null'); + } + $this->container['employerId'] = $employerId; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId(): ?string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id [readonly] The unique id of the object + * + * @return $this + */ + public function setId(?string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets isOwner + * + * @return bool|null + */ + public function getIsOwner(): ?bool + { + return $this->container['isOwner']; + } + + /** + * Sets isOwner + * + * @param bool|null $isOwner isOwner + * + * @return $this + */ + public function setIsOwner(?bool $isOwner): static + { + if (is_null($isOwner)) { + throw new InvalidArgumentException('non-nullable isOwner cannot be null'); + } + $this->container['isOwner'] = $isOwner; + + return $this; + } + + /** + * Gets role + * + * @return \SynergiTech\Staffology\Model\UserRole|null + */ + public function getRole(): ?\SynergiTech\Staffology\Model\UserRole + { + return $this->container['role']; + } + + /** + * Sets role + * + * @param \SynergiTech\Staffology\Model\UserRole|null $role role + * + * @return $this + */ + public function setRole(?\SynergiTech\Staffology\Model\UserRole $role): static + { + if (is_null($role)) { + throw new InvalidArgumentException('non-nullable role cannot be null'); + } + $this->container['role'] = $role; + + return $this; + } + + /** + * Gets showOutstandingLoanBalancesOnly + * + * @return bool|null + */ + public function getShowOutstandingLoanBalancesOnly(): ?bool + { + return $this->container['showOutstandingLoanBalancesOnly']; + } + + /** + * Sets showOutstandingLoanBalancesOnly + * + * @param bool|null $showOutstandingLoanBalancesOnly showOutstandingLoanBalancesOnly + * + * @return $this + */ + public function setShowOutstandingLoanBalancesOnly(?bool $showOutstandingLoanBalancesOnly): static + { + if (is_null($showOutstandingLoanBalancesOnly)) { + throw new InvalidArgumentException('non-nullable showOutstandingLoanBalancesOnly cannot be null'); + } + $this->container['showOutstandingLoanBalancesOnly'] = $showOutstandingLoanBalancesOnly; + + return $this; + } + + /** + * Gets userId + * + * @return int|null + */ + public function getUserId(): ?int + { + return $this->container['userId']; + } + + /** + * Sets userId + * + * @param int|null $userId userId + * + * @return $this + */ + public function setUserId(?int $userId): static + { + if (is_null($userId)) { + throw new InvalidArgumentException('non-nullable userId cannot be null'); + } + $this->container['userId'] = $userId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/UserIndustry.php b/src/Model/UserIndustry.php index a6190ba..ce80b36 100644 --- a/src/Model/UserIndustry.php +++ b/src/Model/UserIndustry.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/UserJobType.php b/src/Model/UserJobType.php index dd52f52..6d00f6b 100644 --- a/src/Model/UserJobType.php +++ b/src/Model/UserJobType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/UserRole.php b/src/Model/UserRole.php index 7115052..253ea2f 100644 --- a/src/Model/UserRole.php +++ b/src/Model/UserRole.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/UserstartPage.php b/src/Model/UserstartPage.php index ca599bd..9af8936 100644 --- a/src/Model/UserstartPage.php +++ b/src/Model/UserstartPage.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/UtmInfo.php b/src/Model/UtmInfo.php index 2341a18..53b6e60 100644 --- a/src/Model/UtmInfo.php +++ b/src/Model/UtmInfo.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class UtmInfo implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'source' => 'string', - 'medium' => 'string', - 'term' => 'string', + 'campaign' => 'string', 'content' => 'string', - 'campaign' => 'string' + 'medium' => 'string', + 'source' => 'string', + 'term' => 'string' ]; /** @@ -72,11 +72,11 @@ class UtmInfo implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'source' => null, - 'medium' => null, - 'term' => null, + 'campaign' => null, 'content' => null, - 'campaign' => null + 'medium' => null, + 'source' => null, + 'term' => null ]; /** @@ -85,11 +85,11 @@ class UtmInfo implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'source' => true, - 'medium' => true, - 'term' => true, + 'campaign' => true, 'content' => true, - 'campaign' => true + 'medium' => true, + 'source' => true, + 'term' => true ]; /** @@ -178,11 +178,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'source' => 'source', - 'medium' => 'medium', - 'term' => 'term', + 'campaign' => 'campaign', 'content' => 'content', - 'campaign' => 'campaign' + 'medium' => 'medium', + 'source' => 'source', + 'term' => 'term' ]; /** @@ -191,11 +191,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'source' => 'setSource', - 'medium' => 'setMedium', - 'term' => 'setTerm', + 'campaign' => 'setCampaign', 'content' => 'setContent', - 'campaign' => 'setCampaign' + 'medium' => 'setMedium', + 'source' => 'setSource', + 'term' => 'setTerm' ]; /** @@ -204,11 +204,11 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'source' => 'getSource', - 'medium' => 'getMedium', - 'term' => 'getTerm', + 'campaign' => 'getCampaign', 'content' => 'getContent', - 'campaign' => 'getCampaign' + 'medium' => 'getMedium', + 'source' => 'getSource', + 'term' => 'getTerm' ]; /** @@ -267,11 +267,11 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('campaign', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); $this->setIfExists('medium', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); $this->setIfExists('term', $data ?? [], null); - $this->setIfExists('content', $data ?? [], null); - $this->setIfExists('campaign', $data ?? [], null); } /** @@ -317,171 +317,171 @@ public function valid(): bool /** - * Gets source + * Gets campaign * * @return string|null */ - public function getSource(): ?string + public function getCampaign(): ?string { - return $this->container['source']; + return $this->container['campaign']; } /** - * Sets source + * Sets campaign * - * @param string|null $source source + * @param string|null $campaign campaign * * @return $this */ - public function setSource(?string $source): static + public function setCampaign(?string $campaign): static { - if (is_null($source)) { - array_push($this->openAPINullablesSetToNull, 'source'); + if (is_null($campaign)) { + array_push($this->openAPINullablesSetToNull, 'campaign'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('source', $nullablesSetToNull); + $index = array_search('campaign', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['source'] = $source; + $this->container['campaign'] = $campaign; return $this; } /** - * Gets medium + * Gets content * * @return string|null */ - public function getMedium(): ?string + public function getContent(): ?string { - return $this->container['medium']; + return $this->container['content']; } /** - * Sets medium + * Sets content * - * @param string|null $medium medium + * @param string|null $content content * * @return $this */ - public function setMedium(?string $medium): static + public function setContent(?string $content): static { - if (is_null($medium)) { - array_push($this->openAPINullablesSetToNull, 'medium'); + if (is_null($content)) { + array_push($this->openAPINullablesSetToNull, 'content'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('medium', $nullablesSetToNull); + $index = array_search('content', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['medium'] = $medium; + $this->container['content'] = $content; return $this; } /** - * Gets term + * Gets medium * * @return string|null */ - public function getTerm(): ?string + public function getMedium(): ?string { - return $this->container['term']; + return $this->container['medium']; } /** - * Sets term + * Sets medium * - * @param string|null $term term + * @param string|null $medium medium * * @return $this */ - public function setTerm(?string $term): static + public function setMedium(?string $medium): static { - if (is_null($term)) { - array_push($this->openAPINullablesSetToNull, 'term'); + if (is_null($medium)) { + array_push($this->openAPINullablesSetToNull, 'medium'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('term', $nullablesSetToNull); + $index = array_search('medium', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['term'] = $term; + $this->container['medium'] = $medium; return $this; } /** - * Gets content + * Gets source * * @return string|null */ - public function getContent(): ?string + public function getSource(): ?string { - return $this->container['content']; + return $this->container['source']; } /** - * Sets content + * Sets source * - * @param string|null $content content + * @param string|null $source source * * @return $this */ - public function setContent(?string $content): static + public function setSource(?string $source): static { - if (is_null($content)) { - array_push($this->openAPINullablesSetToNull, 'content'); + if (is_null($source)) { + array_push($this->openAPINullablesSetToNull, 'source'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('content', $nullablesSetToNull); + $index = array_search('source', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['content'] = $content; + $this->container['source'] = $source; return $this; } /** - * Gets campaign + * Gets term * * @return string|null */ - public function getCampaign(): ?string + public function getTerm(): ?string { - return $this->container['campaign']; + return $this->container['term']; } /** - * Sets campaign + * Sets term * - * @param string|null $campaign campaign + * @param string|null $term term * * @return $this */ - public function setCampaign(?string $campaign): static + public function setTerm(?string $term): static { - if (is_null($campaign)) { - array_push($this->openAPINullablesSetToNull, 'campaign'); + if (is_null($term)) { + array_push($this->openAPINullablesSetToNull, 'term'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('campaign', $nullablesSetToNull); + $index = array_search('term', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['campaign'] = $campaign; + $this->container['term'] = $term; return $this; } diff --git a/src/Model/ValueOverride.php b/src/Model/ValueOverride.php index 75a066d..0b2e2d9 100644 --- a/src/Model/ValueOverride.php +++ b/src/Model/ValueOverride.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,13 +59,13 @@ class ValueOverride implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => '\SynergiTech\Staffology\Model\PayrollValueType', - 'value' => 'float', - 'originalValue' => 'float', - 'note' => 'string', 'attachmentOrderId' => 'string', + 'leaveId' => 'string', + 'note' => 'string', + 'originalValue' => 'float', 'pensionId' => 'string', - 'leaveId' => 'string' + 'type' => '\SynergiTech\Staffology\Model\PayrollValueType', + 'value' => 'float' ]; /** @@ -74,13 +74,13 @@ class ValueOverride implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'type' => null, - 'value' => 'double', - 'originalValue' => 'double', - 'note' => null, 'attachmentOrderId' => 'uuid', + 'leaveId' => 'uuid', + 'note' => null, + 'originalValue' => 'double', 'pensionId' => 'uuid', - 'leaveId' => 'uuid' + 'type' => null, + 'value' => 'double' ]; /** @@ -89,13 +89,13 @@ class ValueOverride implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'type' => false, - 'value' => false, - 'originalValue' => false, - 'note' => true, 'attachmentOrderId' => true, + 'leaveId' => true, + 'note' => true, + 'originalValue' => false, 'pensionId' => true, - 'leaveId' => true + 'type' => false, + 'value' => false ]; /** @@ -184,13 +184,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', - 'value' => 'value', - 'originalValue' => 'originalValue', - 'note' => 'note', 'attachmentOrderId' => 'attachmentOrderId', + 'leaveId' => 'leaveId', + 'note' => 'note', + 'originalValue' => 'originalValue', 'pensionId' => 'pensionId', - 'leaveId' => 'leaveId' + 'type' => 'type', + 'value' => 'value' ]; /** @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', - 'value' => 'setValue', - 'originalValue' => 'setOriginalValue', - 'note' => 'setNote', 'attachmentOrderId' => 'setAttachmentOrderId', + 'leaveId' => 'setLeaveId', + 'note' => 'setNote', + 'originalValue' => 'setOriginalValue', 'pensionId' => 'setPensionId', - 'leaveId' => 'setLeaveId' + 'type' => 'setType', + 'value' => 'setValue' ]; /** @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', - 'value' => 'getValue', - 'originalValue' => 'getOriginalValue', - 'note' => 'getNote', 'attachmentOrderId' => 'getAttachmentOrderId', + 'leaveId' => 'getLeaveId', + 'note' => 'getNote', + 'originalValue' => 'getOriginalValue', 'pensionId' => 'getPensionId', - 'leaveId' => 'getLeaveId' + 'type' => 'getType', + 'value' => 'getValue' ]; /** @@ -279,13 +279,13 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('value', $data ?? [], null); - $this->setIfExists('originalValue', $data ?? [], null); - $this->setIfExists('note', $data ?? [], null); $this->setIfExists('attachmentOrderId', $data ?? [], null); - $this->setIfExists('pensionId', $data ?? [], null); $this->setIfExists('leaveId', $data ?? [], null); + $this->setIfExists('note', $data ?? [], null); + $this->setIfExists('originalValue', $data ?? [], null); + $this->setIfExists('pensionId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -335,82 +335,69 @@ public function valid(): bool /** - * Gets type - * - * @return \SynergiTech\Staffology\Model\PayrollValueType|null - */ - public function getType(): ?\SynergiTech\Staffology\Model\PayrollValueType - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \SynergiTech\Staffology\Model\PayrollValueType|null $type type - * - * @return $this - */ - public function setType(?\SynergiTech\Staffology\Model\PayrollValueType $type): static - { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets value + * Gets attachmentOrderId * - * @return float|null + * @return string|null */ - public function getValue(): ?float + public function getAttachmentOrderId(): ?string { - return $this->container['value']; + return $this->container['attachmentOrderId']; } /** - * Sets value + * Sets attachmentOrderId * - * @param float|null $value The value to use in place of the original value + * @param string|null $attachmentOrderId The Id of the AttachmentOrder. Only relevant if the Type is set to AttachmentOrderDeductions * * @return $this */ - public function setValue(?float $value): static + public function setAttachmentOrderId(?string $attachmentOrderId): static { - if (is_null($value)) { - throw new InvalidArgumentException('non-nullable value cannot be null'); + if (is_null($attachmentOrderId)) { + array_push($this->openAPINullablesSetToNull, 'attachmentOrderId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('attachmentOrderId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['value'] = $value; + $this->container['attachmentOrderId'] = $attachmentOrderId; return $this; } /** - * Gets originalValue + * Gets leaveId * - * @return float|null + * @return string|null */ - public function getOriginalValue(): ?float + public function getLeaveId(): ?string { - return $this->container['originalValue']; + return $this->container['leaveId']; } /** - * Sets originalValue + * Sets leaveId * - * @param float|null $originalValue [readonly] The original value + * @param string|null $leaveId The Id of the associated Leave. * * @return $this */ - public function setOriginalValue(?float $originalValue): static + public function setLeaveId(?string $leaveId): static { - if (is_null($originalValue)) { - throw new InvalidArgumentException('non-nullable originalValue cannot be null'); + if (is_null($leaveId)) { + array_push($this->openAPINullablesSetToNull, 'leaveId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('leaveId', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['originalValue'] = $originalValue; + $this->container['leaveId'] = $leaveId; return $this; } @@ -454,35 +441,28 @@ public function setNote(?string $note): static } /** - * Gets attachmentOrderId + * Gets originalValue * - * @return string|null + * @return float|null */ - public function getAttachmentOrderId(): ?string + public function getOriginalValue(): ?float { - return $this->container['attachmentOrderId']; + return $this->container['originalValue']; } /** - * Sets attachmentOrderId + * Sets originalValue * - * @param string|null $attachmentOrderId The Id of the AttachmentOrder. Only relevant if the Type is set to AttachmentOrderDeductions + * @param float|null $originalValue [readonly] The original value * * @return $this */ - public function setAttachmentOrderId(?string $attachmentOrderId): static + public function setOriginalValue(?float $originalValue): static { - if (is_null($attachmentOrderId)) { - array_push($this->openAPINullablesSetToNull, 'attachmentOrderId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('attachmentOrderId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($originalValue)) { + throw new InvalidArgumentException('non-nullable originalValue cannot be null'); } - $this->container['attachmentOrderId'] = $attachmentOrderId; + $this->container['originalValue'] = $originalValue; return $this; } @@ -522,35 +502,55 @@ public function setPensionId(?string $pensionId): static } /** - * Gets leaveId + * Gets type * - * @return string|null + * @return \SynergiTech\Staffology\Model\PayrollValueType|null */ - public function getLeaveId(): ?string + public function getType(): ?\SynergiTech\Staffology\Model\PayrollValueType { - return $this->container['leaveId']; + return $this->container['type']; } /** - * Sets leaveId + * Sets type * - * @param string|null $leaveId The Id of the associated Leave. + * @param \SynergiTech\Staffology\Model\PayrollValueType|null $type type * * @return $this */ - public function setLeaveId(?string $leaveId): static + public function setType(?\SynergiTech\Staffology\Model\PayrollValueType $type): static { - if (is_null($leaveId)) { - array_push($this->openAPINullablesSetToNull, 'leaveId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('leaveId', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['leaveId'] = $leaveId; + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets value + * + * @return float|null + */ + public function getValue(): ?float + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param float|null $value The value to use in place of the original value + * + * @return $this + */ + public function setValue(?float $value): static + { + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; return $this; } diff --git a/src/Model/VarianceReport.php b/src/Model/VarianceReport.php index 4c0dd0c..9da9f91 100644 --- a/src/Model/VarianceReport.php +++ b/src/Model/VarianceReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,19 +59,19 @@ class VarianceReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'showDifferenceAsPercentage' => 'bool', - 'minimumChangePercentage' => 'float', - 'primary' => '\SynergiTech\Staffology\Model\GrossToNetReport', - 'secondary' => '\SynergiTech\Staffology\Model\GrossToNetReport', - 'joiners' => '\SynergiTech\Staffology\Model\GrossToNetReportLine[]', - 'leavers' => '\SynergiTech\Staffology\Model\GrossToNetReportLine[]', - 'hasDepartments' => 'bool', 'commonLines' => '\SynergiTech\Staffology\Model\GrossToNetReportLine[]', + 'hasDepartments' => 'bool', 'hasVariances' => 'bool', + 'isDraft' => 'bool', + 'joiners' => '\SynergiTech\Staffology\Model\GrossToNetReportLine[]', + 'leavers' => '\SynergiTech\Staffology\Model\GrossToNetReportLine[]', + 'minimumChangePercentage' => 'float', + 'primary' => '\SynergiTech\Staffology\Model\GrossToNetReport', 'report' => '\SynergiTech\Staffology\Model\Report', + 'secondary' => '\SynergiTech\Staffology\Model\GrossToNetReport', + 'showDifferenceAsPercentage' => 'bool', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -80,19 +80,19 @@ class VarianceReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'showDifferenceAsPercentage' => null, - 'minimumChangePercentage' => 'double', - 'primary' => null, - 'secondary' => null, - 'joiners' => null, - 'leavers' => null, - 'hasDepartments' => null, 'commonLines' => null, + 'hasDepartments' => null, 'hasVariances' => null, + 'isDraft' => null, + 'joiners' => null, + 'leavers' => null, + 'minimumChangePercentage' => 'double', + 'primary' => null, 'report' => null, + 'secondary' => null, + 'showDifferenceAsPercentage' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -101,19 +101,19 @@ class VarianceReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'showDifferenceAsPercentage' => false, - 'minimumChangePercentage' => false, - 'primary' => false, - 'secondary' => false, - 'joiners' => true, - 'leavers' => true, - 'hasDepartments' => false, 'commonLines' => true, + 'hasDepartments' => false, 'hasVariances' => false, + 'isDraft' => false, + 'joiners' => true, + 'leavers' => true, + 'minimumChangePercentage' => false, + 'primary' => false, 'report' => false, + 'secondary' => false, + 'showDifferenceAsPercentage' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -202,19 +202,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'showDifferenceAsPercentage' => 'showDifferenceAsPercentage', - 'minimumChangePercentage' => 'minimumChangePercentage', - 'primary' => 'primary', - 'secondary' => 'secondary', - 'joiners' => 'joiners', - 'leavers' => 'leavers', - 'hasDepartments' => 'hasDepartments', 'commonLines' => 'commonLines', + 'hasDepartments' => 'hasDepartments', 'hasVariances' => 'hasVariances', + 'isDraft' => 'isDraft', + 'joiners' => 'joiners', + 'leavers' => 'leavers', + 'minimumChangePercentage' => 'minimumChangePercentage', + 'primary' => 'primary', 'report' => 'report', + 'secondary' => 'secondary', + 'showDifferenceAsPercentage' => 'showDifferenceAsPercentage', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -223,19 +223,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'showDifferenceAsPercentage' => 'setShowDifferenceAsPercentage', - 'minimumChangePercentage' => 'setMinimumChangePercentage', - 'primary' => 'setPrimary', - 'secondary' => 'setSecondary', - 'joiners' => 'setJoiners', - 'leavers' => 'setLeavers', - 'hasDepartments' => 'setHasDepartments', 'commonLines' => 'setCommonLines', + 'hasDepartments' => 'setHasDepartments', 'hasVariances' => 'setHasVariances', + 'isDraft' => 'setIsDraft', + 'joiners' => 'setJoiners', + 'leavers' => 'setLeavers', + 'minimumChangePercentage' => 'setMinimumChangePercentage', + 'primary' => 'setPrimary', 'report' => 'setReport', + 'secondary' => 'setSecondary', + 'showDifferenceAsPercentage' => 'setShowDifferenceAsPercentage', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -244,19 +244,19 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'showDifferenceAsPercentage' => 'getShowDifferenceAsPercentage', - 'minimumChangePercentage' => 'getMinimumChangePercentage', - 'primary' => 'getPrimary', - 'secondary' => 'getSecondary', - 'joiners' => 'getJoiners', - 'leavers' => 'getLeavers', - 'hasDepartments' => 'getHasDepartments', 'commonLines' => 'getCommonLines', + 'hasDepartments' => 'getHasDepartments', 'hasVariances' => 'getHasVariances', + 'isDraft' => 'getIsDraft', + 'joiners' => 'getJoiners', + 'leavers' => 'getLeavers', + 'minimumChangePercentage' => 'getMinimumChangePercentage', + 'primary' => 'getPrimary', 'report' => 'getReport', + 'secondary' => 'getSecondary', + 'showDifferenceAsPercentage' => 'getShowDifferenceAsPercentage', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -315,19 +315,19 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('showDifferenceAsPercentage', $data ?? [], null); - $this->setIfExists('minimumChangePercentage', $data ?? [], null); - $this->setIfExists('primary', $data ?? [], null); - $this->setIfExists('secondary', $data ?? [], null); - $this->setIfExists('joiners', $data ?? [], null); - $this->setIfExists('leavers', $data ?? [], null); - $this->setIfExists('hasDepartments', $data ?? [], null); $this->setIfExists('commonLines', $data ?? [], null); + $this->setIfExists('hasDepartments', $data ?? [], null); $this->setIfExists('hasVariances', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); + $this->setIfExists('joiners', $data ?? [], null); + $this->setIfExists('leavers', $data ?? [], null); + $this->setIfExists('minimumChangePercentage', $data ?? [], null); + $this->setIfExists('primary', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); + $this->setIfExists('secondary', $data ?? [], null); + $this->setIfExists('showDifferenceAsPercentage', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -373,109 +373,116 @@ public function valid(): bool /** - * Gets showDifferenceAsPercentage + * Gets commonLines * - * @return bool|null + * @return \SynergiTech\Staffology\Model\GrossToNetReportLine[]|null */ - public function getShowDifferenceAsPercentage(): ?bool + public function getCommonLines(): ?array { - return $this->container['showDifferenceAsPercentage']; + return $this->container['commonLines']; } /** - * Sets showDifferenceAsPercentage + * Sets commonLines * - * @param bool|null $showDifferenceAsPercentage showDifferenceAsPercentage + * @param \SynergiTech\Staffology\Model\GrossToNetReportLine[]|null $commonLines commonLines * * @return $this */ - public function setShowDifferenceAsPercentage(?bool $showDifferenceAsPercentage): static + public function setCommonLines(?array $commonLines): static { - if (is_null($showDifferenceAsPercentage)) { - throw new InvalidArgumentException('non-nullable showDifferenceAsPercentage cannot be null'); + if (is_null($commonLines)) { + array_push($this->openAPINullablesSetToNull, 'commonLines'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('commonLines', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['showDifferenceAsPercentage'] = $showDifferenceAsPercentage; + $this->container['commonLines'] = $commonLines; return $this; } /** - * Gets minimumChangePercentage + * Gets hasDepartments * - * @return float|null + * @return bool|null */ - public function getMinimumChangePercentage(): ?float + public function getHasDepartments(): ?bool { - return $this->container['minimumChangePercentage']; + return $this->container['hasDepartments']; } /** - * Sets minimumChangePercentage + * Sets hasDepartments * - * @param float|null $minimumChangePercentage minimumChangePercentage + * @param bool|null $hasDepartments hasDepartments * * @return $this */ - public function setMinimumChangePercentage(?float $minimumChangePercentage): static + public function setHasDepartments(?bool $hasDepartments): static { - if (is_null($minimumChangePercentage)) { - throw new InvalidArgumentException('non-nullable minimumChangePercentage cannot be null'); + if (is_null($hasDepartments)) { + throw new InvalidArgumentException('non-nullable hasDepartments cannot be null'); } - $this->container['minimumChangePercentage'] = $minimumChangePercentage; + $this->container['hasDepartments'] = $hasDepartments; return $this; } /** - * Gets primary + * Gets hasVariances * - * @return \SynergiTech\Staffology\Model\GrossToNetReport|null + * @return bool|null */ - public function getPrimary(): ?\SynergiTech\Staffology\Model\GrossToNetReport + public function getHasVariances(): ?bool { - return $this->container['primary']; + return $this->container['hasVariances']; } /** - * Sets primary + * Sets hasVariances * - * @param \SynergiTech\Staffology\Model\GrossToNetReport|null $primary primary + * @param bool|null $hasVariances hasVariances * * @return $this */ - public function setPrimary(?\SynergiTech\Staffology\Model\GrossToNetReport $primary): static + public function setHasVariances(?bool $hasVariances): static { - if (is_null($primary)) { - throw new InvalidArgumentException('non-nullable primary cannot be null'); + if (is_null($hasVariances)) { + throw new InvalidArgumentException('non-nullable hasVariances cannot be null'); } - $this->container['primary'] = $primary; + $this->container['hasVariances'] = $hasVariances; return $this; } /** - * Gets secondary + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\GrossToNetReport|null + * @return bool|null */ - public function getSecondary(): ?\SynergiTech\Staffology\Model\GrossToNetReport + public function getIsDraft(): ?bool { - return $this->container['secondary']; + return $this->container['isDraft']; } /** - * Sets secondary + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\GrossToNetReport|null $secondary secondary + * @param bool|null $isDraft isDraft * * @return $this */ - public function setSecondary(?\SynergiTech\Staffology\Model\GrossToNetReport $secondary): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($secondary)) { - throw new InvalidArgumentException('non-nullable secondary cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['secondary'] = $secondary; + $this->container['isDraft'] = $isDraft; return $this; } @@ -549,116 +556,136 @@ public function setLeavers(?array $leavers): static } /** - * Gets hasDepartments + * Gets minimumChangePercentage * - * @return bool|null + * @return float|null */ - public function getHasDepartments(): ?bool + public function getMinimumChangePercentage(): ?float { - return $this->container['hasDepartments']; + return $this->container['minimumChangePercentage']; } /** - * Sets hasDepartments + * Sets minimumChangePercentage * - * @param bool|null $hasDepartments hasDepartments + * @param float|null $minimumChangePercentage minimumChangePercentage * * @return $this */ - public function setHasDepartments(?bool $hasDepartments): static + public function setMinimumChangePercentage(?float $minimumChangePercentage): static { - if (is_null($hasDepartments)) { - throw new InvalidArgumentException('non-nullable hasDepartments cannot be null'); + if (is_null($minimumChangePercentage)) { + throw new InvalidArgumentException('non-nullable minimumChangePercentage cannot be null'); } - $this->container['hasDepartments'] = $hasDepartments; + $this->container['minimumChangePercentage'] = $minimumChangePercentage; return $this; } /** - * Gets commonLines + * Gets primary * - * @return \SynergiTech\Staffology\Model\GrossToNetReportLine[]|null + * @return \SynergiTech\Staffology\Model\GrossToNetReport|null */ - public function getCommonLines(): ?array + public function getPrimary(): ?\SynergiTech\Staffology\Model\GrossToNetReport { - return $this->container['commonLines']; + return $this->container['primary']; } /** - * Sets commonLines + * Sets primary * - * @param \SynergiTech\Staffology\Model\GrossToNetReportLine[]|null $commonLines commonLines + * @param \SynergiTech\Staffology\Model\GrossToNetReport|null $primary primary * * @return $this */ - public function setCommonLines(?array $commonLines): static + public function setPrimary(?\SynergiTech\Staffology\Model\GrossToNetReport $primary): static { - if (is_null($commonLines)) { - array_push($this->openAPINullablesSetToNull, 'commonLines'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('commonLines', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($primary)) { + throw new InvalidArgumentException('non-nullable primary cannot be null'); } - $this->container['commonLines'] = $commonLines; + $this->container['primary'] = $primary; return $this; } /** - * Gets hasVariances + * Gets report * - * @return bool|null + * @return \SynergiTech\Staffology\Model\Report|null */ - public function getHasVariances(): ?bool + public function getReport(): ?\SynergiTech\Staffology\Model\Report { - return $this->container['hasVariances']; + return $this->container['report']; } /** - * Sets hasVariances + * Sets report * - * @param bool|null $hasVariances hasVariances + * @param \SynergiTech\Staffology\Model\Report|null $report report * * @return $this */ - public function setHasVariances(?bool $hasVariances): static + public function setReport(?\SynergiTech\Staffology\Model\Report $report): static { - if (is_null($hasVariances)) { - throw new InvalidArgumentException('non-nullable hasVariances cannot be null'); + if (is_null($report)) { + throw new InvalidArgumentException('non-nullable report cannot be null'); } - $this->container['hasVariances'] = $hasVariances; + $this->container['report'] = $report; return $this; } /** - * Gets report + * Gets secondary * - * @return \SynergiTech\Staffology\Model\Report|null + * @return \SynergiTech\Staffology\Model\GrossToNetReport|null */ - public function getReport(): ?\SynergiTech\Staffology\Model\Report + public function getSecondary(): ?\SynergiTech\Staffology\Model\GrossToNetReport { - return $this->container['report']; + return $this->container['secondary']; } /** - * Sets report + * Sets secondary * - * @param \SynergiTech\Staffology\Model\Report|null $report report + * @param \SynergiTech\Staffology\Model\GrossToNetReport|null $secondary secondary * * @return $this */ - public function setReport(?\SynergiTech\Staffology\Model\Report $report): static + public function setSecondary(?\SynergiTech\Staffology\Model\GrossToNetReport $secondary): static { - if (is_null($report)) { - throw new InvalidArgumentException('non-nullable report cannot be null'); + if (is_null($secondary)) { + throw new InvalidArgumentException('non-nullable secondary cannot be null'); } - $this->container['report'] = $report; + $this->container['secondary'] = $secondary; + + return $this; + } + + /** + * Gets showDifferenceAsPercentage + * + * @return bool|null + */ + public function getShowDifferenceAsPercentage(): ?bool + { + return $this->container['showDifferenceAsPercentage']; + } + + /** + * Sets showDifferenceAsPercentage + * + * @param bool|null $showDifferenceAsPercentage showDifferenceAsPercentage + * + * @return $this + */ + public function setShowDifferenceAsPercentage(?bool $showDifferenceAsPercentage): static + { + if (is_null($showDifferenceAsPercentage)) { + throw new InvalidArgumentException('non-nullable showDifferenceAsPercentage cannot be null'); + } + $this->container['showDifferenceAsPercentage'] = $showDifferenceAsPercentage; return $this; } @@ -723,33 +750,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/VarianceReportReportResponse.php b/src/Model/VarianceReportReportResponse.php index cb9455f..430074b 100644 --- a/src/Model/VarianceReportReportResponse.php +++ b/src/Model/VarianceReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class VarianceReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\VarianceReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class VarianceReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class VarianceReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/VeteranDetails.php b/src/Model/VeteranDetails.php index 73a9fec..9c856a2 100644 --- a/src/Model/VeteranDetails.php +++ b/src/Model/VeteranDetails.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class VeteranDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'isVeteran' => 'bool', - 'firstCivilianEmploymentDate' => '\DateTime' + 'firstCivilianEmploymentDate' => '\DateTime', + 'isVeteran' => 'bool' ]; /** @@ -70,8 +70,8 @@ class VeteranDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'isVeteran' => null, - 'firstCivilianEmploymentDate' => 'date' + 'firstCivilianEmploymentDate' => 'date', + 'isVeteran' => null ]; /** @@ -80,8 +80,8 @@ class VeteranDetails implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'isVeteran' => false, - 'firstCivilianEmploymentDate' => true + 'firstCivilianEmploymentDate' => true, + 'isVeteran' => false ]; /** @@ -170,8 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'isVeteran' => 'isVeteran', - 'firstCivilianEmploymentDate' => 'firstCivilianEmploymentDate' + 'firstCivilianEmploymentDate' => 'firstCivilianEmploymentDate', + 'isVeteran' => 'isVeteran' ]; /** @@ -180,8 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'isVeteran' => 'setIsVeteran', - 'firstCivilianEmploymentDate' => 'setFirstCivilianEmploymentDate' + 'firstCivilianEmploymentDate' => 'setFirstCivilianEmploymentDate', + 'isVeteran' => 'setIsVeteran' ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'isVeteran' => 'getIsVeteran', - 'firstCivilianEmploymentDate' => 'getFirstCivilianEmploymentDate' + 'firstCivilianEmploymentDate' => 'getFirstCivilianEmploymentDate', + 'isVeteran' => 'getIsVeteran' ]; /** @@ -250,8 +250,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('isVeteran', $data ?? [], null); $this->setIfExists('firstCivilianEmploymentDate', $data ?? [], null); + $this->setIfExists('isVeteran', $data ?? [], null); } /** @@ -296,33 +296,6 @@ public function valid(): bool } - /** - * Gets isVeteran - * - * @return bool|null - */ - public function getIsVeteran(): ?bool - { - return $this->container['isVeteran']; - } - - /** - * Sets isVeteran - * - * @param bool|null $isVeteran Set to true if the employee is a veteran - * - * @return $this - */ - public function setIsVeteran(?bool $isVeteran): static - { - if (is_null($isVeteran)) { - throw new InvalidArgumentException('non-nullable isVeteran cannot be null'); - } - $this->container['isVeteran'] = $isVeteran; - - return $this; - } - /** * Gets firstCivilianEmploymentDate * @@ -356,6 +329,33 @@ public function setFirstCivilianEmploymentDate(?\DateTime $firstCivilianEmployme return $this; } + + /** + * Gets isVeteran + * + * @return bool|null + */ + public function getIsVeteran(): ?bool + { + return $this->container['isVeteran']; + } + + /** + * Sets isVeteran + * + * @param bool|null $isVeteran Set to true if the employee is a veteran + * + * @return $this + */ + public function setIsVeteran(?bool $isVeteran): static + { + if (is_null($isVeteran)) { + throw new InvalidArgumentException('non-nullable isVeteran cannot be null'); + } + $this->container['isVeteran'] = $isVeteran; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/WarningsReport.php b/src/Model/WarningsReport.php index e05fd57..371d883 100644 --- a/src/Model/WarningsReport.php +++ b/src/Model/WarningsReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/WarningsReportLine.php b/src/Model/WarningsReportLine.php index 25a895a..05e3b7a 100644 --- a/src/Model/WarningsReportLine.php +++ b/src/Model/WarningsReportLine.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class WarningsReportLine implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'payrollCode' => 'string', 'employeeName' => 'string', - 'warningType' => '\SynergiTech\Staffology\Model\PayRunEntryWarningType', - 'warningMessage' => 'string' + 'payrollCode' => 'string', + 'warningMessage' => 'string', + 'warningType' => '\SynergiTech\Staffology\Model\PayRunEntryWarningType' ]; /** @@ -71,10 +71,10 @@ class WarningsReportLine implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPIFormats = [ - 'payrollCode' => null, 'employeeName' => null, - 'warningType' => null, - 'warningMessage' => null + 'payrollCode' => null, + 'warningMessage' => null, + 'warningType' => null ]; /** @@ -83,10 +83,10 @@ class WarningsReportLine implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPINullables = [ - 'payrollCode' => true, 'employeeName' => true, - 'warningType' => false, - 'warningMessage' => true + 'payrollCode' => true, + 'warningMessage' => true, + 'warningType' => false ]; /** @@ -175,10 +175,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrollCode' => 'payrollCode', 'employeeName' => 'employeeName', - 'warningType' => 'warningType', - 'warningMessage' => 'warningMessage' + 'payrollCode' => 'payrollCode', + 'warningMessage' => 'warningMessage', + 'warningType' => 'warningType' ]; /** @@ -187,10 +187,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrollCode' => 'setPayrollCode', 'employeeName' => 'setEmployeeName', - 'warningType' => 'setWarningType', - 'warningMessage' => 'setWarningMessage' + 'payrollCode' => 'setPayrollCode', + 'warningMessage' => 'setWarningMessage', + 'warningType' => 'setWarningType' ]; /** @@ -199,10 +199,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrollCode' => 'getPayrollCode', 'employeeName' => 'getEmployeeName', - 'warningType' => 'getWarningType', - 'warningMessage' => 'getWarningMessage' + 'payrollCode' => 'getPayrollCode', + 'warningMessage' => 'getWarningMessage', + 'warningType' => 'getWarningType' ]; /** @@ -261,10 +261,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('employeeName', $data ?? [], null); - $this->setIfExists('warningType', $data ?? [], null); + $this->setIfExists('payrollCode', $data ?? [], null); $this->setIfExists('warningMessage', $data ?? [], null); + $this->setIfExists('warningType', $data ?? [], null); } /** @@ -309,40 +309,6 @@ public function valid(): bool } - /** - * Gets payrollCode - * - * @return string|null - */ - public function getPayrollCode(): ?string - { - return $this->container['payrollCode']; - } - - /** - * Sets payrollCode - * - * @param string|null $payrollCode payrollCode - * - * @return $this - */ - public function setPayrollCode(?string $payrollCode): static - { - if (is_null($payrollCode)) { - array_push($this->openAPINullablesSetToNull, 'payrollCode'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payrollCode', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['payrollCode'] = $payrollCode; - - return $this; - } - /** * Gets employeeName * @@ -378,28 +344,35 @@ public function setEmployeeName(?string $employeeName): static } /** - * Gets warningType + * Gets payrollCode * - * @return \SynergiTech\Staffology\Model\PayRunEntryWarningType|null + * @return string|null */ - public function getWarningType(): ?\SynergiTech\Staffology\Model\PayRunEntryWarningType + public function getPayrollCode(): ?string { - return $this->container['warningType']; + return $this->container['payrollCode']; } /** - * Sets warningType + * Sets payrollCode * - * @param \SynergiTech\Staffology\Model\PayRunEntryWarningType|null $warningType warningType + * @param string|null $payrollCode payrollCode * * @return $this */ - public function setWarningType(?\SynergiTech\Staffology\Model\PayRunEntryWarningType $warningType): static + public function setPayrollCode(?string $payrollCode): static { - if (is_null($warningType)) { - throw new InvalidArgumentException('non-nullable warningType cannot be null'); + if (is_null($payrollCode)) { + array_push($this->openAPINullablesSetToNull, 'payrollCode'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payrollCode', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['warningType'] = $warningType; + $this->container['payrollCode'] = $payrollCode; return $this; } @@ -437,6 +410,33 @@ public function setWarningMessage(?string $warningMessage): static return $this; } + + /** + * Gets warningType + * + * @return \SynergiTech\Staffology\Model\PayRunEntryWarningType|null + */ + public function getWarningType(): ?\SynergiTech\Staffology\Model\PayRunEntryWarningType + { + return $this->container['warningType']; + } + + /** + * Sets warningType + * + * @param \SynergiTech\Staffology\Model\PayRunEntryWarningType|null $warningType warningType + * + * @return $this + */ + public function setWarningType(?\SynergiTech\Staffology\Model\PayRunEntryWarningType $warningType): static + { + if (is_null($warningType)) { + throw new InvalidArgumentException('non-nullable warningType cannot be null'); + } + $this->container['warningType'] = $warningType; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/WarningsReportReportResponse.php b/src/Model/WarningsReportReportResponse.php index f11a259..d8be46f 100644 --- a/src/Model/WarningsReportReportResponse.php +++ b/src/Model/WarningsReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class WarningsReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\WarningsReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class WarningsReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class WarningsReportReportResponse implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/Webhook.php b/src/Model/Webhook.php index 0c3a0cf..c9d0d4c 100644 --- a/src/Model/Webhook.php +++ b/src/Model/Webhook.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class Webhook implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'webhookEvent' => '\SynergiTech\Staffology\Model\WebhookEvent', - 'url' => 'string', 'active' => 'bool', 'eventCount' => 'int', + 'id' => 'string', 'lastPayload' => '\SynergiTech\Staffology\Model\WebhookPayload', - 'id' => 'string' + 'url' => 'string', + 'webhookEvent' => '\SynergiTech\Staffology\Model\WebhookEvent' ]; /** @@ -73,12 +73,12 @@ class Webhook implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'webhookEvent' => null, - 'url' => 'uri', 'active' => null, 'eventCount' => 'int32', + 'id' => 'uuid', 'lastPayload' => null, - 'id' => 'uuid' + 'url' => 'uri', + 'webhookEvent' => null ]; /** @@ -87,12 +87,12 @@ class Webhook implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'webhookEvent' => false, - 'url' => false, 'active' => false, 'eventCount' => false, + 'id' => false, 'lastPayload' => false, - 'id' => false + 'url' => false, + 'webhookEvent' => false ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'webhookEvent' => 'webhookEvent', - 'url' => 'url', 'active' => 'active', 'eventCount' => 'eventCount', + 'id' => 'id', 'lastPayload' => 'lastPayload', - 'id' => 'id' + 'url' => 'url', + 'webhookEvent' => 'webhookEvent' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'webhookEvent' => 'setWebhookEvent', - 'url' => 'setUrl', 'active' => 'setActive', 'eventCount' => 'setEventCount', + 'id' => 'setId', 'lastPayload' => 'setLastPayload', - 'id' => 'setId' + 'url' => 'setUrl', + 'webhookEvent' => 'setWebhookEvent' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'webhookEvent' => 'getWebhookEvent', - 'url' => 'getUrl', 'active' => 'getActive', 'eventCount' => 'getEventCount', + 'id' => 'getId', 'lastPayload' => 'getLastPayload', - 'id' => 'getId' + 'url' => 'getUrl', + 'webhookEvent' => 'getWebhookEvent' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('webhookEvent', $data ?? [], null); - $this->setIfExists('url', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); $this->setIfExists('eventCount', $data ?? [], null); - $this->setIfExists('lastPayload', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('lastPayload', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('webhookEvent', $data ?? [], null); } /** @@ -335,170 +335,170 @@ public function valid(): bool /** - * Gets webhookEvent + * Gets active * - * @return \SynergiTech\Staffology\Model\WebhookEvent|null + * @return bool|null */ - public function getWebhookEvent(): ?\SynergiTech\Staffology\Model\WebhookEvent + public function getActive(): ?bool { - return $this->container['webhookEvent']; + return $this->container['active']; } /** - * Sets webhookEvent + * Sets active * - * @param \SynergiTech\Staffology\Model\WebhookEvent|null $webhookEvent webhookEvent + * @param bool|null $active If set to false then this Webhook will not be triggered * * @return $this */ - public function setWebhookEvent(?\SynergiTech\Staffology\Model\WebhookEvent $webhookEvent): static + public function setActive(?bool $active): static { - if (is_null($webhookEvent)) { - throw new InvalidArgumentException('non-nullable webhookEvent cannot be null'); + if (is_null($active)) { + throw new InvalidArgumentException('non-nullable active cannot be null'); } - $this->container['webhookEvent'] = $webhookEvent; + $this->container['active'] = $active; return $this; } /** - * Gets url + * Gets eventCount * - * @return string + * @return int|null */ - public function getUrl(): string + public function getEventCount(): ?int { - return $this->container['url']; + return $this->container['eventCount']; } /** - * Sets url + * Sets eventCount * - * @param string $url The Url to which the payload should be sent + * @param int|null $eventCount The number of times this webhook has been triggered * * @return $this */ - public function setUrl(string $url): static + public function setEventCount(?int $eventCount): static { - if (is_null($url)) { - throw new InvalidArgumentException('non-nullable url cannot be null'); - } - if ((mb_strlen($url) > 300)) { - throw new InvalidArgumentException('invalid length for $url when calling Webhook., must be smaller than or equal to 300.'); - } - if ((mb_strlen($url) < 1)) { - throw new InvalidArgumentException('invalid length for $url when calling Webhook., must be bigger than or equal to 1.'); + if (is_null($eventCount)) { + throw new InvalidArgumentException('non-nullable eventCount cannot be null'); } - - $this->container['url'] = $url; + $this->container['eventCount'] = $eventCount; return $this; } /** - * Gets active + * Gets id * - * @return bool|null + * @return string|null */ - public function getActive(): ?bool + public function getId(): ?string { - return $this->container['active']; + return $this->container['id']; } /** - * Sets active + * Sets id * - * @param bool|null $active If set to false then this Webhook will not be triggered + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setActive(?bool $active): static + public function setId(?string $id): static { - if (is_null($active)) { - throw new InvalidArgumentException('non-nullable active cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['active'] = $active; + $this->container['id'] = $id; return $this; } /** - * Gets eventCount + * Gets lastPayload * - * @return int|null + * @return \SynergiTech\Staffology\Model\WebhookPayload|null */ - public function getEventCount(): ?int + public function getLastPayload(): ?\SynergiTech\Staffology\Model\WebhookPayload { - return $this->container['eventCount']; + return $this->container['lastPayload']; } /** - * Sets eventCount + * Sets lastPayload * - * @param int|null $eventCount The number of times this webhook has been triggered + * @param \SynergiTech\Staffology\Model\WebhookPayload|null $lastPayload lastPayload * * @return $this */ - public function setEventCount(?int $eventCount): static + public function setLastPayload(?\SynergiTech\Staffology\Model\WebhookPayload $lastPayload): static { - if (is_null($eventCount)) { - throw new InvalidArgumentException('non-nullable eventCount cannot be null'); + if (is_null($lastPayload)) { + throw new InvalidArgumentException('non-nullable lastPayload cannot be null'); } - $this->container['eventCount'] = $eventCount; + $this->container['lastPayload'] = $lastPayload; return $this; } /** - * Gets lastPayload + * Gets url * - * @return \SynergiTech\Staffology\Model\WebhookPayload|null + * @return string */ - public function getLastPayload(): ?\SynergiTech\Staffology\Model\WebhookPayload + public function getUrl(): string { - return $this->container['lastPayload']; + return $this->container['url']; } /** - * Sets lastPayload + * Sets url * - * @param \SynergiTech\Staffology\Model\WebhookPayload|null $lastPayload lastPayload + * @param string $url The Url to which the payload should be sent * * @return $this */ - public function setLastPayload(?\SynergiTech\Staffology\Model\WebhookPayload $lastPayload): static + public function setUrl(string $url): static { - if (is_null($lastPayload)) { - throw new InvalidArgumentException('non-nullable lastPayload cannot be null'); + if (is_null($url)) { + throw new InvalidArgumentException('non-nullable url cannot be null'); } - $this->container['lastPayload'] = $lastPayload; + if ((mb_strlen($url) > 300)) { + throw new InvalidArgumentException('invalid length for $url when calling Webhook., must be smaller than or equal to 300.'); + } + if ((mb_strlen($url) < 1)) { + throw new InvalidArgumentException('invalid length for $url when calling Webhook., must be bigger than or equal to 1.'); + } + + $this->container['url'] = $url; return $this; } /** - * Gets id + * Gets webhookEvent * - * @return string|null + * @return \SynergiTech\Staffology\Model\WebhookEvent|null */ - public function getId(): ?string + public function getWebhookEvent(): ?\SynergiTech\Staffology\Model\WebhookEvent { - return $this->container['id']; + return $this->container['webhookEvent']; } /** - * Sets id + * Sets webhookEvent * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\WebhookEvent|null $webhookEvent webhookEvent * * @return $this */ - public function setId(?string $id): static + public function setWebhookEvent(?\SynergiTech\Staffology\Model\WebhookEvent $webhookEvent): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($webhookEvent)) { + throw new InvalidArgumentException('non-nullable webhookEvent cannot be null'); } - $this->container['id'] = $id; + $this->container['webhookEvent'] = $webhookEvent; return $this; } diff --git a/src/Model/WebhookEvent.php b/src/Model/WebhookEvent.php index 8ea5e9e..cdf680a 100644 --- a/src/Model/WebhookEvent.php +++ b/src/Model/WebhookEvent.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/WebhookPayload.php b/src/Model/WebhookPayload.php index 54b74a9..beb5e22 100644 --- a/src/Model/WebhookPayload.php +++ b/src/Model/WebhookPayload.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,15 +59,15 @@ class WebhookPayload implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', - 'url' => 'string', 'attempts' => 'int', - 'statusCode' => 'int', - 'taskStatus' => '\SynergiTech\Staffology\Model\BackgroundTaskStatus', - 'statusMessage' => 'string', 'created' => '\DateTime', + 'id' => 'string', + 'name' => 'string', 'payload' => 'mixed', - 'id' => 'string' + 'statusCode' => 'int', + 'statusMessage' => 'string', + 'taskStatus' => '\SynergiTech\Staffology\Model\BackgroundTaskStatus', + 'url' => 'string' ]; /** @@ -76,15 +76,15 @@ class WebhookPayload implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'name' => null, - 'url' => 'uri', 'attempts' => 'int32', - 'statusCode' => 'int32', - 'taskStatus' => null, - 'statusMessage' => null, 'created' => 'date', + 'id' => 'uuid', + 'name' => null, 'payload' => null, - 'id' => 'uuid' + 'statusCode' => 'int32', + 'statusMessage' => null, + 'taskStatus' => null, + 'url' => 'uri' ]; /** @@ -93,15 +93,15 @@ class WebhookPayload implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'name' => true, - 'url' => false, 'attempts' => false, - 'statusCode' => false, - 'taskStatus' => false, - 'statusMessage' => true, 'created' => false, + 'id' => false, + 'name' => true, 'payload' => true, - 'id' => false + 'statusCode' => false, + 'statusMessage' => true, + 'taskStatus' => false, + 'url' => false ]; /** @@ -190,15 +190,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', - 'url' => 'url', 'attempts' => 'attempts', - 'statusCode' => 'statusCode', - 'taskStatus' => 'taskStatus', - 'statusMessage' => 'statusMessage', 'created' => 'created', + 'id' => 'id', + 'name' => 'name', 'payload' => 'payload', - 'id' => 'id' + 'statusCode' => 'statusCode', + 'statusMessage' => 'statusMessage', + 'taskStatus' => 'taskStatus', + 'url' => 'url' ]; /** @@ -207,15 +207,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', - 'url' => 'setUrl', 'attempts' => 'setAttempts', - 'statusCode' => 'setStatusCode', - 'taskStatus' => 'setTaskStatus', - 'statusMessage' => 'setStatusMessage', 'created' => 'setCreated', + 'id' => 'setId', + 'name' => 'setName', 'payload' => 'setPayload', - 'id' => 'setId' + 'statusCode' => 'setStatusCode', + 'statusMessage' => 'setStatusMessage', + 'taskStatus' => 'setTaskStatus', + 'url' => 'setUrl' ]; /** @@ -224,15 +224,15 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', - 'url' => 'getUrl', 'attempts' => 'getAttempts', - 'statusCode' => 'getStatusCode', - 'taskStatus' => 'getTaskStatus', - 'statusMessage' => 'getStatusMessage', 'created' => 'getCreated', + 'id' => 'getId', + 'name' => 'getName', 'payload' => 'getPayload', - 'id' => 'getId' + 'statusCode' => 'getStatusCode', + 'statusMessage' => 'getStatusMessage', + 'taskStatus' => 'getTaskStatus', + 'url' => 'getUrl' ]; /** @@ -291,15 +291,15 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('url', $data ?? [], null); $this->setIfExists('attempts', $data ?? [], null); - $this->setIfExists('statusCode', $data ?? [], null); - $this->setIfExists('taskStatus', $data ?? [], null); - $this->setIfExists('statusMessage', $data ?? [], null); $this->setIfExists('created', $data ?? [], null); - $this->setIfExists('payload', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('payload', $data ?? [], null); + $this->setIfExists('statusCode', $data ?? [], null); + $this->setIfExists('statusMessage', $data ?? [], null); + $this->setIfExists('taskStatus', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); } /** @@ -333,6 +333,10 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 150."; } + if (!is_null($this->container['statusMessage']) && (mb_strlen($this->container['statusMessage']) > 150)) { + $invalidProperties[] = "invalid value for 'statusMessage', the character length must be smaller than or equal to 150."; + } + if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } @@ -344,10 +348,6 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'url', the character length must be bigger than or equal to 1."; } - if (!is_null($this->container['statusMessage']) && (mb_strlen($this->container['statusMessage']) > 150)) { - $invalidProperties[] = "invalid value for 'statusMessage', the character length must be smaller than or equal to 150."; - } - return $invalidProperties; } @@ -364,154 +364,181 @@ public function valid(): bool /** - * Gets name + * Gets attempts * - * @return string|null + * @return int|null */ - public function getName(): ?string + public function getAttempts(): ?int { - return $this->container['name']; + return $this->container['attempts']; } /** - * Sets name + * Sets attempts * - * @param string|null $name [readonly] A descriptive name for this payload + * @param int|null $attempts [readonly] The number of attempts that have been made to deliver this payload * * @return $this */ - public function setName(?string $name): static + public function setAttempts(?int $attempts): static { - if (is_null($name)) { - array_push($this->openAPINullablesSetToNull, 'name'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('name', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($name) && (mb_strlen($name) > 150)) { - throw new InvalidArgumentException('invalid length for $name when calling WebhookPayload., must be smaller than or equal to 150.'); + if (is_null($attempts)) { + throw new InvalidArgumentException('non-nullable attempts cannot be null'); } - - $this->container['name'] = $name; + $this->container['attempts'] = $attempts; return $this; } /** - * Gets url + * Gets created * - * @return string + * @return \DateTime|null */ - public function getUrl(): string + public function getCreated(): ?\DateTime { - return $this->container['url']; + return $this->container['created']; } /** - * Sets url + * Sets created * - * @param string $url [readonly] The Url that payload will be sent to + * @param \DateTime|null $created [readonly] The date and time this payload was created * * @return $this */ - public function setUrl(string $url): static + public function setCreated(?\DateTime $created): static { - if (is_null($url)) { - throw new InvalidArgumentException('non-nullable url cannot be null'); - } - if ((mb_strlen($url) > 300)) { - throw new InvalidArgumentException('invalid length for $url when calling WebhookPayload., must be smaller than or equal to 300.'); - } - if ((mb_strlen($url) < 1)) { - throw new InvalidArgumentException('invalid length for $url when calling WebhookPayload., must be bigger than or equal to 1.'); + if (is_null($created)) { + throw new InvalidArgumentException('non-nullable created cannot be null'); } + $this->container['created'] = $created; - $this->container['url'] = $url; + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId(): ?string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id [readonly] The unique id of the object + * + * @return $this + */ + public function setId(?string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; return $this; } /** - * Gets attempts + * Gets name * - * @return int|null + * @return string|null */ - public function getAttempts(): ?int + public function getName(): ?string { - return $this->container['attempts']; + return $this->container['name']; } /** - * Sets attempts + * Sets name * - * @param int|null $attempts [readonly] The number of attempts that have been made to deliver this payload + * @param string|null $name [readonly] A descriptive name for this payload * * @return $this */ - public function setAttempts(?int $attempts): static + public function setName(?string $name): static { - if (is_null($attempts)) { - throw new InvalidArgumentException('non-nullable attempts cannot be null'); + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['attempts'] = $attempts; + if (!is_null($name) && (mb_strlen($name) > 150)) { + throw new InvalidArgumentException('invalid length for $name when calling WebhookPayload., must be smaller than or equal to 150.'); + } + + $this->container['name'] = $name; return $this; } /** - * Gets statusCode + * Gets payload * - * @return int|null + * @return mixed|null */ - public function getStatusCode(): ?int + public function getPayload(): mixed { - return $this->container['statusCode']; + return $this->container['payload']; } /** - * Sets statusCode + * Sets payload * - * @param int|null $statusCode [readonly] The status code received from the Url + * @param mixed|null $payload [readonly] the JSON payload that will be sent to the URl * * @return $this */ - public function setStatusCode(?int $statusCode): static + public function setPayload(mixed $payload): static { - if (is_null($statusCode)) { - throw new InvalidArgumentException('non-nullable statusCode cannot be null'); + if (is_null($payload)) { + array_push($this->openAPINullablesSetToNull, 'payload'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payload', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['statusCode'] = $statusCode; + $this->container['payload'] = $payload; return $this; } /** - * Gets taskStatus + * Gets statusCode * - * @return \SynergiTech\Staffology\Model\BackgroundTaskStatus|null + * @return int|null */ - public function getTaskStatus(): ?\SynergiTech\Staffology\Model\BackgroundTaskStatus + public function getStatusCode(): ?int { - return $this->container['taskStatus']; + return $this->container['statusCode']; } /** - * Sets taskStatus + * Sets statusCode * - * @param \SynergiTech\Staffology\Model\BackgroundTaskStatus|null $taskStatus taskStatus + * @param int|null $statusCode [readonly] The status code received from the Url * * @return $this */ - public function setTaskStatus(?\SynergiTech\Staffology\Model\BackgroundTaskStatus $taskStatus): static + public function setStatusCode(?int $statusCode): static { - if (is_null($taskStatus)) { - throw new InvalidArgumentException('non-nullable taskStatus cannot be null'); + if (is_null($statusCode)) { + throw new InvalidArgumentException('non-nullable statusCode cannot be null'); } - $this->container['taskStatus'] = $taskStatus; + $this->container['statusCode'] = $statusCode; return $this; } @@ -555,89 +582,62 @@ public function setStatusMessage(?string $statusMessage): static } /** - * Gets created + * Gets taskStatus * - * @return \DateTime|null + * @return \SynergiTech\Staffology\Model\BackgroundTaskStatus|null */ - public function getCreated(): ?\DateTime + public function getTaskStatus(): ?\SynergiTech\Staffology\Model\BackgroundTaskStatus { - return $this->container['created']; + return $this->container['taskStatus']; } /** - * Sets created + * Sets taskStatus * - * @param \DateTime|null $created [readonly] The date and time this payload was created + * @param \SynergiTech\Staffology\Model\BackgroundTaskStatus|null $taskStatus taskStatus * * @return $this */ - public function setCreated(?\DateTime $created): static + public function setTaskStatus(?\SynergiTech\Staffology\Model\BackgroundTaskStatus $taskStatus): static { - if (is_null($created)) { - throw new InvalidArgumentException('non-nullable created cannot be null'); + if (is_null($taskStatus)) { + throw new InvalidArgumentException('non-nullable taskStatus cannot be null'); } - $this->container['created'] = $created; + $this->container['taskStatus'] = $taskStatus; return $this; } /** - * Gets payload + * Gets url * - * @return mixed|null + * @return string */ - public function getPayload(): mixed + public function getUrl(): string { - return $this->container['payload']; + return $this->container['url']; } /** - * Sets payload + * Sets url * - * @param mixed|null $payload [readonly] the JSON payload that will be sent to the URl + * @param string $url [readonly] The Url that payload will be sent to * * @return $this */ - public function setPayload(mixed $payload): static + public function setUrl(string $url): static { - if (is_null($payload)) { - array_push($this->openAPINullablesSetToNull, 'payload'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payload', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($url)) { + throw new InvalidArgumentException('non-nullable url cannot be null'); } - $this->container['payload'] = $payload; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId(): ?string - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id [readonly] The unique id of the object - * - * @return $this - */ - public function setId(?string $id): static - { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if ((mb_strlen($url) > 300)) { + throw new InvalidArgumentException('invalid length for $url when calling WebhookPayload., must be smaller than or equal to 300.'); } - $this->container['id'] = $id; + if ((mb_strlen($url) < 1)) { + throw new InvalidArgumentException('invalid length for $url when calling WebhookPayload., must be bigger than or equal to 1.'); + } + + $this->container['url'] = $url; return $this; } diff --git a/src/Model/WorkerGroup.php b/src/Model/WorkerGroup.php index 7e8f8e2..e75b468 100644 --- a/src/Model/WorkerGroup.php +++ b/src/Model/WorkerGroup.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,35 +59,35 @@ class WorkerGroup implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'name' => 'string', + 'additionalVoluntaryContribution' => 'float', + 'assumedPensionablePay' => '\SynergiTech\Staffology\Model\AssumedPensionablePay', + 'avcIsPercentage' => 'bool', 'contributionLevelType' => '\SynergiTech\Staffology\Model\PensionContributionLevelType', + 'customThreshold' => 'bool', 'employeeContribution' => 'float', 'employeeContributionIsPercentage' => 'bool', 'employerContribution' => 'float', - 'employerContributionIsPercentage' => 'bool', - 'employerContributionTopUpPercentage' => 'float', 'employerContributionIncludesNiSaving' => 'bool', + 'employerContributionIsPercentage' => 'bool', + 'employerContributionNiSaving' => 'float', 'employerContributionNiSavingPercentage' => 'float', + 'employerContributionTopUpPercentage' => 'float', + 'employerReference' => 'string', + 'id' => 'string', 'isAvc' => 'bool', - 'additionalVoluntaryContribution' => 'float', - 'avcIsPercentage' => 'bool', - 'employerContributionNiSaving' => 'float', - 'customThreshold' => 'bool', - 'lowerLimit' => 'float', - 'upperLimit' => 'float', - 'papdisGroup' => 'string', - 'papdisSubGroup' => 'string', + 'lgpsFund' => '\SynergiTech\Staffology\Model\LgpsFund', 'localAuthorityNumber' => 'string', - 'schoolEmployerType' => 'string', + 'lowerLimit' => 'float', 'matIdentifier' => 'string', 'matUniqueNumber' => 'string', - 'employerReference' => 'string', - 'lgpsFund' => '\SynergiTech\Staffology\Model\LgpsFund', - 'workerGroupId' => 'string', - 'assumedPensionablePay' => '\SynergiTech\Staffology\Model\AssumedPensionablePay', - 'pensionablePayDefinition' => '\SynergiTech\Staffology\Model\PensionablePayDefinition', + 'name' => 'string', + 'papdisGroup' => 'string', + 'papdisSubGroup' => 'string', 'payslipDescription' => 'string', - 'id' => 'string' + 'pensionablePayDefinition' => '\SynergiTech\Staffology\Model\PensionablePayDefinition', + 'schoolEmployerType' => 'string', + 'upperLimit' => 'float', + 'workerGroupId' => 'string' ]; /** @@ -96,35 +96,35 @@ class WorkerGroup implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'name' => null, + 'additionalVoluntaryContribution' => 'double', + 'assumedPensionablePay' => null, + 'avcIsPercentage' => null, 'contributionLevelType' => null, + 'customThreshold' => null, 'employeeContribution' => 'double', 'employeeContributionIsPercentage' => null, 'employerContribution' => 'double', - 'employerContributionIsPercentage' => null, - 'employerContributionTopUpPercentage' => 'double', 'employerContributionIncludesNiSaving' => null, + 'employerContributionIsPercentage' => null, + 'employerContributionNiSaving' => 'double', 'employerContributionNiSavingPercentage' => 'double', + 'employerContributionTopUpPercentage' => 'double', + 'employerReference' => null, + 'id' => 'uuid', 'isAvc' => null, - 'additionalVoluntaryContribution' => 'double', - 'avcIsPercentage' => null, - 'employerContributionNiSaving' => 'double', - 'customThreshold' => null, - 'lowerLimit' => 'double', - 'upperLimit' => 'double', - 'papdisGroup' => null, - 'papdisSubGroup' => null, + 'lgpsFund' => null, 'localAuthorityNumber' => null, - 'schoolEmployerType' => null, + 'lowerLimit' => 'double', 'matIdentifier' => null, 'matUniqueNumber' => null, - 'employerReference' => null, - 'lgpsFund' => null, - 'workerGroupId' => 'uuid', - 'assumedPensionablePay' => null, - 'pensionablePayDefinition' => null, + 'name' => null, + 'papdisGroup' => null, + 'papdisSubGroup' => null, 'payslipDescription' => null, - 'id' => 'uuid' + 'pensionablePayDefinition' => null, + 'schoolEmployerType' => null, + 'upperLimit' => 'double', + 'workerGroupId' => 'uuid' ]; /** @@ -133,35 +133,35 @@ class WorkerGroup implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'name' => false, + 'additionalVoluntaryContribution' => true, + 'assumedPensionablePay' => false, + 'avcIsPercentage' => true, 'contributionLevelType' => false, + 'customThreshold' => false, 'employeeContribution' => false, 'employeeContributionIsPercentage' => false, 'employerContribution' => false, - 'employerContributionIsPercentage' => false, - 'employerContributionTopUpPercentage' => false, 'employerContributionIncludesNiSaving' => false, + 'employerContributionIsPercentage' => false, + 'employerContributionNiSaving' => false, 'employerContributionNiSavingPercentage' => false, + 'employerContributionTopUpPercentage' => false, + 'employerReference' => true, + 'id' => false, 'isAvc' => false, - 'additionalVoluntaryContribution' => true, - 'avcIsPercentage' => true, - 'employerContributionNiSaving' => false, - 'customThreshold' => false, - 'lowerLimit' => false, - 'upperLimit' => false, - 'papdisGroup' => true, - 'papdisSubGroup' => true, + 'lgpsFund' => false, 'localAuthorityNumber' => true, - 'schoolEmployerType' => true, + 'lowerLimit' => false, 'matIdentifier' => true, 'matUniqueNumber' => true, - 'employerReference' => true, - 'lgpsFund' => false, - 'workerGroupId' => false, - 'assumedPensionablePay' => false, - 'pensionablePayDefinition' => false, + 'name' => false, + 'papdisGroup' => true, + 'papdisSubGroup' => true, 'payslipDescription' => true, - 'id' => false + 'pensionablePayDefinition' => false, + 'schoolEmployerType' => true, + 'upperLimit' => false, + 'workerGroupId' => false ]; /** @@ -250,35 +250,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'name' => 'name', + 'additionalVoluntaryContribution' => 'additionalVoluntaryContribution', + 'assumedPensionablePay' => 'assumedPensionablePay', + 'avcIsPercentage' => 'avcIsPercentage', 'contributionLevelType' => 'contributionLevelType', + 'customThreshold' => 'customThreshold', 'employeeContribution' => 'employeeContribution', 'employeeContributionIsPercentage' => 'employeeContributionIsPercentage', 'employerContribution' => 'employerContribution', - 'employerContributionIsPercentage' => 'employerContributionIsPercentage', - 'employerContributionTopUpPercentage' => 'employerContributionTopUpPercentage', 'employerContributionIncludesNiSaving' => 'employerContributionIncludesNiSaving', + 'employerContributionIsPercentage' => 'employerContributionIsPercentage', + 'employerContributionNiSaving' => 'employerContributionNiSaving', 'employerContributionNiSavingPercentage' => 'employerContributionNiSavingPercentage', + 'employerContributionTopUpPercentage' => 'employerContributionTopUpPercentage', + 'employerReference' => 'employerReference', + 'id' => 'id', 'isAvc' => 'isAvc', - 'additionalVoluntaryContribution' => 'additionalVoluntaryContribution', - 'avcIsPercentage' => 'avcIsPercentage', - 'employerContributionNiSaving' => 'employerContributionNiSaving', - 'customThreshold' => 'customThreshold', - 'lowerLimit' => 'lowerLimit', - 'upperLimit' => 'upperLimit', - 'papdisGroup' => 'papdisGroup', - 'papdisSubGroup' => 'papdisSubGroup', + 'lgpsFund' => 'lgpsFund', 'localAuthorityNumber' => 'localAuthorityNumber', - 'schoolEmployerType' => 'schoolEmployerType', + 'lowerLimit' => 'lowerLimit', 'matIdentifier' => 'matIdentifier', 'matUniqueNumber' => 'matUniqueNumber', - 'employerReference' => 'employerReference', - 'lgpsFund' => 'lgpsFund', - 'workerGroupId' => 'workerGroupId', - 'assumedPensionablePay' => 'assumedPensionablePay', - 'pensionablePayDefinition' => 'pensionablePayDefinition', + 'name' => 'name', + 'papdisGroup' => 'papdisGroup', + 'papdisSubGroup' => 'papdisSubGroup', 'payslipDescription' => 'payslipDescription', - 'id' => 'id' + 'pensionablePayDefinition' => 'pensionablePayDefinition', + 'schoolEmployerType' => 'schoolEmployerType', + 'upperLimit' => 'upperLimit', + 'workerGroupId' => 'workerGroupId' ]; /** @@ -287,35 +287,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'name' => 'setName', + 'additionalVoluntaryContribution' => 'setAdditionalVoluntaryContribution', + 'assumedPensionablePay' => 'setAssumedPensionablePay', + 'avcIsPercentage' => 'setAvcIsPercentage', 'contributionLevelType' => 'setContributionLevelType', + 'customThreshold' => 'setCustomThreshold', 'employeeContribution' => 'setEmployeeContribution', 'employeeContributionIsPercentage' => 'setEmployeeContributionIsPercentage', 'employerContribution' => 'setEmployerContribution', - 'employerContributionIsPercentage' => 'setEmployerContributionIsPercentage', - 'employerContributionTopUpPercentage' => 'setEmployerContributionTopUpPercentage', 'employerContributionIncludesNiSaving' => 'setEmployerContributionIncludesNiSaving', + 'employerContributionIsPercentage' => 'setEmployerContributionIsPercentage', + 'employerContributionNiSaving' => 'setEmployerContributionNiSaving', 'employerContributionNiSavingPercentage' => 'setEmployerContributionNiSavingPercentage', + 'employerContributionTopUpPercentage' => 'setEmployerContributionTopUpPercentage', + 'employerReference' => 'setEmployerReference', + 'id' => 'setId', 'isAvc' => 'setIsAvc', - 'additionalVoluntaryContribution' => 'setAdditionalVoluntaryContribution', - 'avcIsPercentage' => 'setAvcIsPercentage', - 'employerContributionNiSaving' => 'setEmployerContributionNiSaving', - 'customThreshold' => 'setCustomThreshold', - 'lowerLimit' => 'setLowerLimit', - 'upperLimit' => 'setUpperLimit', - 'papdisGroup' => 'setPapdisGroup', - 'papdisSubGroup' => 'setPapdisSubGroup', + 'lgpsFund' => 'setLgpsFund', 'localAuthorityNumber' => 'setLocalAuthorityNumber', - 'schoolEmployerType' => 'setSchoolEmployerType', + 'lowerLimit' => 'setLowerLimit', 'matIdentifier' => 'setMatIdentifier', 'matUniqueNumber' => 'setMatUniqueNumber', - 'employerReference' => 'setEmployerReference', - 'lgpsFund' => 'setLgpsFund', - 'workerGroupId' => 'setWorkerGroupId', - 'assumedPensionablePay' => 'setAssumedPensionablePay', - 'pensionablePayDefinition' => 'setPensionablePayDefinition', + 'name' => 'setName', + 'papdisGroup' => 'setPapdisGroup', + 'papdisSubGroup' => 'setPapdisSubGroup', 'payslipDescription' => 'setPayslipDescription', - 'id' => 'setId' + 'pensionablePayDefinition' => 'setPensionablePayDefinition', + 'schoolEmployerType' => 'setSchoolEmployerType', + 'upperLimit' => 'setUpperLimit', + 'workerGroupId' => 'setWorkerGroupId' ]; /** @@ -324,35 +324,35 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'name' => 'getName', + 'additionalVoluntaryContribution' => 'getAdditionalVoluntaryContribution', + 'assumedPensionablePay' => 'getAssumedPensionablePay', + 'avcIsPercentage' => 'getAvcIsPercentage', 'contributionLevelType' => 'getContributionLevelType', + 'customThreshold' => 'getCustomThreshold', 'employeeContribution' => 'getEmployeeContribution', 'employeeContributionIsPercentage' => 'getEmployeeContributionIsPercentage', 'employerContribution' => 'getEmployerContribution', - 'employerContributionIsPercentage' => 'getEmployerContributionIsPercentage', - 'employerContributionTopUpPercentage' => 'getEmployerContributionTopUpPercentage', 'employerContributionIncludesNiSaving' => 'getEmployerContributionIncludesNiSaving', + 'employerContributionIsPercentage' => 'getEmployerContributionIsPercentage', + 'employerContributionNiSaving' => 'getEmployerContributionNiSaving', 'employerContributionNiSavingPercentage' => 'getEmployerContributionNiSavingPercentage', + 'employerContributionTopUpPercentage' => 'getEmployerContributionTopUpPercentage', + 'employerReference' => 'getEmployerReference', + 'id' => 'getId', 'isAvc' => 'getIsAvc', - 'additionalVoluntaryContribution' => 'getAdditionalVoluntaryContribution', - 'avcIsPercentage' => 'getAvcIsPercentage', - 'employerContributionNiSaving' => 'getEmployerContributionNiSaving', - 'customThreshold' => 'getCustomThreshold', - 'lowerLimit' => 'getLowerLimit', - 'upperLimit' => 'getUpperLimit', - 'papdisGroup' => 'getPapdisGroup', - 'papdisSubGroup' => 'getPapdisSubGroup', + 'lgpsFund' => 'getLgpsFund', 'localAuthorityNumber' => 'getLocalAuthorityNumber', - 'schoolEmployerType' => 'getSchoolEmployerType', + 'lowerLimit' => 'getLowerLimit', 'matIdentifier' => 'getMatIdentifier', 'matUniqueNumber' => 'getMatUniqueNumber', - 'employerReference' => 'getEmployerReference', - 'lgpsFund' => 'getLgpsFund', - 'workerGroupId' => 'getWorkerGroupId', - 'assumedPensionablePay' => 'getAssumedPensionablePay', - 'pensionablePayDefinition' => 'getPensionablePayDefinition', + 'name' => 'getName', + 'papdisGroup' => 'getPapdisGroup', + 'papdisSubGroup' => 'getPapdisSubGroup', 'payslipDescription' => 'getPayslipDescription', - 'id' => 'getId' + 'pensionablePayDefinition' => 'getPensionablePayDefinition', + 'schoolEmployerType' => 'getSchoolEmployerType', + 'upperLimit' => 'getUpperLimit', + 'workerGroupId' => 'getWorkerGroupId' ]; /** @@ -411,35 +411,35 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('additionalVoluntaryContribution', $data ?? [], null); + $this->setIfExists('assumedPensionablePay', $data ?? [], null); + $this->setIfExists('avcIsPercentage', $data ?? [], null); $this->setIfExists('contributionLevelType', $data ?? [], null); + $this->setIfExists('customThreshold', $data ?? [], null); $this->setIfExists('employeeContribution', $data ?? [], null); $this->setIfExists('employeeContributionIsPercentage', $data ?? [], null); $this->setIfExists('employerContribution', $data ?? [], null); - $this->setIfExists('employerContributionIsPercentage', $data ?? [], null); - $this->setIfExists('employerContributionTopUpPercentage', $data ?? [], null); $this->setIfExists('employerContributionIncludesNiSaving', $data ?? [], null); + $this->setIfExists('employerContributionIsPercentage', $data ?? [], null); + $this->setIfExists('employerContributionNiSaving', $data ?? [], null); $this->setIfExists('employerContributionNiSavingPercentage', $data ?? [], null); + $this->setIfExists('employerContributionTopUpPercentage', $data ?? [], null); + $this->setIfExists('employerReference', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('isAvc', $data ?? [], null); - $this->setIfExists('additionalVoluntaryContribution', $data ?? [], null); - $this->setIfExists('avcIsPercentage', $data ?? [], null); - $this->setIfExists('employerContributionNiSaving', $data ?? [], null); - $this->setIfExists('customThreshold', $data ?? [], null); + $this->setIfExists('lgpsFund', $data ?? [], null); + $this->setIfExists('localAuthorityNumber', $data ?? [], null); $this->setIfExists('lowerLimit', $data ?? [], null); - $this->setIfExists('upperLimit', $data ?? [], null); + $this->setIfExists('matIdentifier', $data ?? [], null); + $this->setIfExists('matUniqueNumber', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); $this->setIfExists('papdisGroup', $data ?? [], null); $this->setIfExists('papdisSubGroup', $data ?? [], null); - $this->setIfExists('localAuthorityNumber', $data ?? [], null); + $this->setIfExists('payslipDescription', $data ?? [], null); + $this->setIfExists('pensionablePayDefinition', $data ?? [], null); $this->setIfExists('schoolEmployerType', $data ?? [], null); - $this->setIfExists('matIdentifier', $data ?? [], null); - $this->setIfExists('matUniqueNumber', $data ?? [], null); - $this->setIfExists('employerReference', $data ?? [], null); - $this->setIfExists('lgpsFund', $data ?? [], null); + $this->setIfExists('upperLimit', $data ?? [], null); $this->setIfExists('workerGroupId', $data ?? [], null); - $this->setIfExists('assumedPensionablePay', $data ?? [], null); - $this->setIfExists('pensionablePayDefinition', $data ?? [], null); - $this->setIfExists('payslipDescription', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); } /** @@ -469,25 +469,6 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ((mb_strlen($this->container['name']) > 150)) { - $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 150."; - } - - if ((mb_strlen($this->container['name']) < 1)) { - $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; - } - - if (!is_null($this->container['papdisGroup']) && (mb_strlen($this->container['papdisGroup']) > 40)) { - $invalidProperties[] = "invalid value for 'papdisGroup', the character length must be smaller than or equal to 40."; - } - - if (!is_null($this->container['papdisSubGroup']) && (mb_strlen($this->container['papdisSubGroup']) > 40)) { - $invalidProperties[] = "invalid value for 'papdisSubGroup', the character length must be smaller than or equal to 40."; - } - if (!is_null($this->container['localAuthorityNumber']) && (mb_strlen($this->container['localAuthorityNumber']) > 3)) { $invalidProperties[] = "invalid value for 'localAuthorityNumber', the character length must be smaller than or equal to 3."; } @@ -496,14 +477,6 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'localAuthorityNumber', must be conform to the pattern /^(\\d{3})$/."; } - if (!is_null($this->container['schoolEmployerType']) && (mb_strlen($this->container['schoolEmployerType']) > 4)) { - $invalidProperties[] = "invalid value for 'schoolEmployerType', the character length must be smaller than or equal to 4."; - } - - if (!is_null($this->container['schoolEmployerType']) && !preg_match("/^(\\d{4})$/", $this->container['schoolEmployerType'])) { - $invalidProperties[] = "invalid value for 'schoolEmployerType', must be conform to the pattern /^(\\d{4})$/."; - } - if (!is_null($this->container['matIdentifier']) && (mb_strlen($this->container['matIdentifier']) > 3)) { $invalidProperties[] = "invalid value for 'matIdentifier', the character length must be smaller than or equal to 3."; } @@ -520,9 +493,36 @@ public function listInvalidProperties(): array $invalidProperties[] = "invalid value for 'matUniqueNumber', must be conform to the pattern /^(\\d{4}|)$/."; } - if (!is_null($this->container['payslipDescription']) && (mb_strlen($this->container['payslipDescription']) > 100)) { - $invalidProperties[] = "invalid value for 'payslipDescription', the character length must be smaller than or equal to 100."; - } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 150)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 150."; + } + + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if (!is_null($this->container['papdisGroup']) && (mb_strlen($this->container['papdisGroup']) > 40)) { + $invalidProperties[] = "invalid value for 'papdisGroup', the character length must be smaller than or equal to 40."; + } + + if (!is_null($this->container['papdisSubGroup']) && (mb_strlen($this->container['papdisSubGroup']) > 40)) { + $invalidProperties[] = "invalid value for 'papdisSubGroup', the character length must be smaller than or equal to 40."; + } + + if (!is_null($this->container['payslipDescription']) && (mb_strlen($this->container['payslipDescription']) > 100)) { + $invalidProperties[] = "invalid value for 'payslipDescription', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['schoolEmployerType']) && (mb_strlen($this->container['schoolEmployerType']) > 4)) { + $invalidProperties[] = "invalid value for 'schoolEmployerType', the character length must be smaller than or equal to 4."; + } + + if (!is_null($this->container['schoolEmployerType']) && !preg_match("/^(\\d{4})$/", $this->container['schoolEmployerType'])) { + $invalidProperties[] = "invalid value for 'schoolEmployerType', must be conform to the pattern /^(\\d{4})$/."; + } return $invalidProperties; } @@ -540,35 +540,96 @@ public function valid(): bool /** - * Gets name + * Gets additionalVoluntaryContribution * - * @return string + * @return float|null */ - public function getName(): string + public function getAdditionalVoluntaryContribution(): ?float { - return $this->container['name']; + return $this->container['additionalVoluntaryContribution']; } /** - * Sets name + * Sets additionalVoluntaryContribution * - * @param string $name name + * @param float|null $additionalVoluntaryContribution Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. * * @return $this */ - public function setName(string $name): static + public function setAdditionalVoluntaryContribution(?float $additionalVoluntaryContribution): static { - if (is_null($name)) { - throw new InvalidArgumentException('non-nullable name cannot be null'); - } - if ((mb_strlen($name) > 150)) { - throw new InvalidArgumentException('invalid length for $name when calling WorkerGroup., must be smaller than or equal to 150.'); + if (is_null($additionalVoluntaryContribution)) { + array_push($this->openAPINullablesSetToNull, 'additionalVoluntaryContribution'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('additionalVoluntaryContribution', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - if ((mb_strlen($name) < 1)) { - throw new InvalidArgumentException('invalid length for $name when calling WorkerGroup., must be bigger than or equal to 1.'); + $this->container['additionalVoluntaryContribution'] = $additionalVoluntaryContribution; + + return $this; + } + + /** + * Gets assumedPensionablePay + * + * @return \SynergiTech\Staffology\Model\AssumedPensionablePay|null + */ + public function getAssumedPensionablePay(): ?\SynergiTech\Staffology\Model\AssumedPensionablePay + { + return $this->container['assumedPensionablePay']; + } + + /** + * Sets assumedPensionablePay + * + * @param \SynergiTech\Staffology\Model\AssumedPensionablePay|null $assumedPensionablePay assumedPensionablePay + * + * @return $this + */ + public function setAssumedPensionablePay(?\SynergiTech\Staffology\Model\AssumedPensionablePay $assumedPensionablePay): static + { + if (is_null($assumedPensionablePay)) { + throw new InvalidArgumentException('non-nullable assumedPensionablePay cannot be null'); } + $this->container['assumedPensionablePay'] = $assumedPensionablePay; - $this->container['name'] = $name; + return $this; + } + + /** + * Gets avcIsPercentage + * + * @return bool|null + */ + public function getAvcIsPercentage(): ?bool + { + return $this->container['avcIsPercentage']; + } + + /** + * Sets avcIsPercentage + * + * @param bool|null $avcIsPercentage Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, + * + * @return $this + */ + public function setAvcIsPercentage(?bool $avcIsPercentage): static + { + if (is_null($avcIsPercentage)) { + array_push($this->openAPINullablesSetToNull, 'avcIsPercentage'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('avcIsPercentage', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['avcIsPercentage'] = $avcIsPercentage; return $this; } @@ -600,6 +661,33 @@ public function setContributionLevelType(?\SynergiTech\Staffology\Model\PensionC return $this; } + /** + * Gets customThreshold + * + * @return bool|null + */ + public function getCustomThreshold(): ?bool + { + return $this->container['customThreshold']; + } + + /** + * Sets customThreshold + * + * @param bool|null $customThreshold customThreshold + * + * @return $this + */ + public function setCustomThreshold(?bool $customThreshold): static + { + if (is_null($customThreshold)) { + throw new InvalidArgumentException('non-nullable customThreshold cannot be null'); + } + $this->container['customThreshold'] = $customThreshold; + + return $this; + } + /** * Gets employeeContribution * @@ -682,82 +770,82 @@ public function setEmployerContribution(?float $employerContribution): static } /** - * Gets employerContributionIsPercentage + * Gets employerContributionIncludesNiSaving * * @return bool|null */ - public function getEmployerContributionIsPercentage(): ?bool + public function getEmployerContributionIncludesNiSaving(): ?bool { - return $this->container['employerContributionIsPercentage']; + return $this->container['employerContributionIncludesNiSaving']; } /** - * Sets employerContributionIsPercentage + * Sets employerContributionIncludesNiSaving * - * @param bool|null $employerContributionIsPercentage employerContributionIsPercentage + * @param bool|null $employerContributionIncludesNiSaving Employer Contribution includes the Employers NI saving * * @return $this */ - public function setEmployerContributionIsPercentage(?bool $employerContributionIsPercentage): static + public function setEmployerContributionIncludesNiSaving(?bool $employerContributionIncludesNiSaving): static { - if (is_null($employerContributionIsPercentage)) { - throw new InvalidArgumentException('non-nullable employerContributionIsPercentage cannot be null'); + if (is_null($employerContributionIncludesNiSaving)) { + throw new InvalidArgumentException('non-nullable employerContributionIncludesNiSaving cannot be null'); } - $this->container['employerContributionIsPercentage'] = $employerContributionIsPercentage; + $this->container['employerContributionIncludesNiSaving'] = $employerContributionIncludesNiSaving; return $this; } /** - * Gets employerContributionTopUpPercentage + * Gets employerContributionIsPercentage * - * @return float|null + * @return bool|null */ - public function getEmployerContributionTopUpPercentage(): ?float + public function getEmployerContributionIsPercentage(): ?bool { - return $this->container['employerContributionTopUpPercentage']; + return $this->container['employerContributionIsPercentage']; } /** - * Sets employerContributionTopUpPercentage + * Sets employerContributionIsPercentage * - * @param float|null $employerContributionTopUpPercentage Increase Employer Contribution by this percentage of the Employee Contribution + * @param bool|null $employerContributionIsPercentage employerContributionIsPercentage * * @return $this */ - public function setEmployerContributionTopUpPercentage(?float $employerContributionTopUpPercentage): static + public function setEmployerContributionIsPercentage(?bool $employerContributionIsPercentage): static { - if (is_null($employerContributionTopUpPercentage)) { - throw new InvalidArgumentException('non-nullable employerContributionTopUpPercentage cannot be null'); + if (is_null($employerContributionIsPercentage)) { + throw new InvalidArgumentException('non-nullable employerContributionIsPercentage cannot be null'); } - $this->container['employerContributionTopUpPercentage'] = $employerContributionTopUpPercentage; + $this->container['employerContributionIsPercentage'] = $employerContributionIsPercentage; return $this; } /** - * Gets employerContributionIncludesNiSaving + * Gets employerContributionNiSaving * - * @return bool|null + * @return float|null */ - public function getEmployerContributionIncludesNiSaving(): ?bool + public function getEmployerContributionNiSaving(): ?float { - return $this->container['employerContributionIncludesNiSaving']; + return $this->container['employerContributionNiSaving']; } /** - * Sets employerContributionIncludesNiSaving + * Sets employerContributionNiSaving * - * @param bool|null $employerContributionIncludesNiSaving Employer Contribution includes the Employers NI saving + * @param float|null $employerContributionNiSaving Employers NI Saving * * @return $this */ - public function setEmployerContributionIncludesNiSaving(?bool $employerContributionIncludesNiSaving): static + public function setEmployerContributionNiSaving(?float $employerContributionNiSaving): static { - if (is_null($employerContributionIncludesNiSaving)) { - throw new InvalidArgumentException('non-nullable employerContributionIncludesNiSaving cannot be null'); + if (is_null($employerContributionNiSaving)) { + throw new InvalidArgumentException('non-nullable employerContributionNiSaving cannot be null'); } - $this->container['employerContributionIncludesNiSaving'] = $employerContributionIncludesNiSaving; + $this->container['employerContributionNiSaving'] = $employerContributionNiSaving; return $this; } @@ -790,280 +878,143 @@ public function setEmployerContributionNiSavingPercentage(?float $employerContri } /** - * Gets isAvc - * - * @return bool|null - */ - public function getIsAvc(): ?bool - { - return $this->container['isAvc']; - } - - /** - * Sets isAvc - * - * @param bool|null $isAvc Determines whether the workergroup uses additonal voluntary contributions. This property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC. - * - * @return $this - */ - public function setIsAvc(?bool $isAvc): static - { - if (is_null($isAvc)) { - throw new InvalidArgumentException('non-nullable isAvc cannot be null'); - } - $this->container['isAvc'] = $isAvc; - - return $this; - } - - /** - * Gets additionalVoluntaryContribution + * Gets employerContributionTopUpPercentage * * @return float|null */ - public function getAdditionalVoluntaryContribution(): ?float + public function getEmployerContributionTopUpPercentage(): ?float { - return $this->container['additionalVoluntaryContribution']; + return $this->container['employerContributionTopUpPercentage']; } /** - * Sets additionalVoluntaryContribution + * Sets employerContributionTopUpPercentage * - * @param float|null $additionalVoluntaryContribution Any additional voluntary amount the employee contributes towards the pension. Could be a percentage or a fixed amount depending on AvcIsPercentage. + * @param float|null $employerContributionTopUpPercentage Increase Employer Contribution by this percentage of the Employee Contribution * * @return $this */ - public function setAdditionalVoluntaryContribution(?float $additionalVoluntaryContribution): static + public function setEmployerContributionTopUpPercentage(?float $employerContributionTopUpPercentage): static { - if (is_null($additionalVoluntaryContribution)) { - array_push($this->openAPINullablesSetToNull, 'additionalVoluntaryContribution'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('additionalVoluntaryContribution', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($employerContributionTopUpPercentage)) { + throw new InvalidArgumentException('non-nullable employerContributionTopUpPercentage cannot be null'); } - $this->container['additionalVoluntaryContribution'] = $additionalVoluntaryContribution; + $this->container['employerContributionTopUpPercentage'] = $employerContributionTopUpPercentage; return $this; } /** - * Gets avcIsPercentage + * Gets employerReference * - * @return bool|null + * @return string|null */ - public function getAvcIsPercentage(): ?bool + public function getEmployerReference(): ?string { - return $this->container['avcIsPercentage']; + return $this->container['employerReference']; } /** - * Sets avcIsPercentage + * Sets employerReference * - * @param bool|null $avcIsPercentage Determines whether the Value of the Additional Voluntary Contribution is a fixed amount or a percentage, + * @param string|null $employerReference employerReference * * @return $this */ - public function setAvcIsPercentage(?bool $avcIsPercentage): static + public function setEmployerReference(?string $employerReference): static { - if (is_null($avcIsPercentage)) { - array_push($this->openAPINullablesSetToNull, 'avcIsPercentage'); + if (is_null($employerReference)) { + array_push($this->openAPINullablesSetToNull, 'employerReference'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('avcIsPercentage', $nullablesSetToNull); + $index = array_search('employerReference', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['avcIsPercentage'] = $avcIsPercentage; + $this->container['employerReference'] = $employerReference; return $this; } /** - * Gets employerContributionNiSaving + * Gets id * - * @return float|null + * @return string|null */ - public function getEmployerContributionNiSaving(): ?float + public function getId(): ?string { - return $this->container['employerContributionNiSaving']; + return $this->container['id']; } /** - * Sets employerContributionNiSaving + * Sets id * - * @param float|null $employerContributionNiSaving Employers NI Saving + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setEmployerContributionNiSaving(?float $employerContributionNiSaving): static + public function setId(?string $id): static { - if (is_null($employerContributionNiSaving)) { - throw new InvalidArgumentException('non-nullable employerContributionNiSaving cannot be null'); + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['employerContributionNiSaving'] = $employerContributionNiSaving; + $this->container['id'] = $id; return $this; } /** - * Gets customThreshold + * Gets isAvc * * @return bool|null */ - public function getCustomThreshold(): ?bool - { - return $this->container['customThreshold']; - } - - /** - * Sets customThreshold - * - * @param bool|null $customThreshold customThreshold - * - * @return $this - */ - public function setCustomThreshold(?bool $customThreshold): static - { - if (is_null($customThreshold)) { - throw new InvalidArgumentException('non-nullable customThreshold cannot be null'); - } - $this->container['customThreshold'] = $customThreshold; - - return $this; - } - - /** - * Gets lowerLimit - * - * @return float|null - */ - public function getLowerLimit(): ?float - { - return $this->container['lowerLimit']; - } - - /** - * Sets lowerLimit - * - * @param float|null $lowerLimit lowerLimit - * - * @return $this - */ - public function setLowerLimit(?float $lowerLimit): static - { - if (is_null($lowerLimit)) { - throw new InvalidArgumentException('non-nullable lowerLimit cannot be null'); - } - $this->container['lowerLimit'] = $lowerLimit; - - return $this; - } - - /** - * Gets upperLimit - * - * @return float|null - */ - public function getUpperLimit(): ?float - { - return $this->container['upperLimit']; - } - - /** - * Sets upperLimit - * - * @param float|null $upperLimit upperLimit - * - * @return $this - */ - public function setUpperLimit(?float $upperLimit): static - { - if (is_null($upperLimit)) { - throw new InvalidArgumentException('non-nullable upperLimit cannot be null'); - } - $this->container['upperLimit'] = $upperLimit; - - return $this; - } - - /** - * Gets papdisGroup - * - * @return string|null - */ - public function getPapdisGroup(): ?string + public function getIsAvc(): ?bool { - return $this->container['papdisGroup']; + return $this->container['isAvc']; } /** - * Sets papdisGroup + * Sets isAvc * - * @param string|null $papdisGroup papdisGroup + * @param bool|null $isAvc Determines whether the workergroup uses additonal voluntary contributions. This property will automatically be set to true for the following Contribution Level Types: TpFasterAccrual, TpAdditionalPensionContributions, TpActuariallyAdjustedBenefits, TpFamilyBenefits, tpPastAddedYears, tpHigherSalaries, tpPreston, tpElectedFurtherEmployment, LgpsAdditionalPensionContributions, LgpsSharedAdditionalPensionContributions, LgpsAdditionalRegularContributions, LgpsAddedYearsContributions, LgpsSharedAdditionalPensionLumpSump, LgpsPartTimeBuyBack, PrudentialAVC. * * @return $this */ - public function setPapdisGroup(?string $papdisGroup): static + public function setIsAvc(?bool $isAvc): static { - if (is_null($papdisGroup)) { - array_push($this->openAPINullablesSetToNull, 'papdisGroup'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisGroup', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($papdisGroup) && (mb_strlen($papdisGroup) > 40)) { - throw new InvalidArgumentException('invalid length for $papdisGroup when calling WorkerGroup., must be smaller than or equal to 40.'); + if (is_null($isAvc)) { + throw new InvalidArgumentException('non-nullable isAvc cannot be null'); } - - $this->container['papdisGroup'] = $papdisGroup; + $this->container['isAvc'] = $isAvc; return $this; } /** - * Gets papdisSubGroup + * Gets lgpsFund * - * @return string|null + * @return \SynergiTech\Staffology\Model\LgpsFund|null */ - public function getPapdisSubGroup(): ?string + public function getLgpsFund(): ?\SynergiTech\Staffology\Model\LgpsFund { - return $this->container['papdisSubGroup']; + return $this->container['lgpsFund']; } /** - * Sets papdisSubGroup + * Sets lgpsFund * - * @param string|null $papdisSubGroup papdisSubGroup + * @param \SynergiTech\Staffology\Model\LgpsFund|null $lgpsFund lgpsFund * * @return $this */ - public function setPapdisSubGroup(?string $papdisSubGroup): static + public function setLgpsFund(?\SynergiTech\Staffology\Model\LgpsFund $lgpsFund): static { - if (is_null($papdisSubGroup)) { - array_push($this->openAPINullablesSetToNull, 'papdisSubGroup'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('papdisSubGroup', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($papdisSubGroup) && (mb_strlen($papdisSubGroup) > 40)) { - throw new InvalidArgumentException('invalid length for $papdisSubGroup when calling WorkerGroup., must be smaller than or equal to 40.'); + if (is_null($lgpsFund)) { + throw new InvalidArgumentException('non-nullable lgpsFund cannot be null'); } - - $this->container['papdisSubGroup'] = $papdisSubGroup; + $this->container['lgpsFund'] = $lgpsFund; return $this; } @@ -1110,42 +1061,28 @@ public function setLocalAuthorityNumber(?string $localAuthorityNumber): static } /** - * Gets schoolEmployerType + * Gets lowerLimit * - * @return string|null + * @return float|null */ - public function getSchoolEmployerType(): ?string + public function getLowerLimit(): ?float { - return $this->container['schoolEmployerType']; + return $this->container['lowerLimit']; } /** - * Sets schoolEmployerType + * Sets lowerLimit * - * @param string|null $schoolEmployerType Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales + * @param float|null $lowerLimit lowerLimit * * @return $this */ - public function setSchoolEmployerType(?string $schoolEmployerType): static + public function setLowerLimit(?float $lowerLimit): static { - if (is_null($schoolEmployerType)) { - array_push($this->openAPINullablesSetToNull, 'schoolEmployerType'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('schoolEmployerType', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - if (!is_null($schoolEmployerType) && (mb_strlen($schoolEmployerType) > 4)) { - throw new InvalidArgumentException('invalid length for $schoolEmployerType when calling WorkerGroup., must be smaller than or equal to 4.'); - } - if (!is_null($schoolEmployerType) && (!preg_match("/^(\\d{4})$/", ObjectSerializer::toString($schoolEmployerType)))) { - throw new InvalidArgumentException("invalid value for \$schoolEmployerType when calling WorkerGroup., must conform to the pattern /^(\\d{4})$/."); + if (is_null($lowerLimit)) { + throw new InvalidArgumentException('non-nullable lowerLimit cannot be null'); } - - $this->container['schoolEmployerType'] = $schoolEmployerType; + $this->container['lowerLimit'] = $lowerLimit; return $this; } @@ -1233,116 +1170,149 @@ public function setMatUniqueNumber(?string $matUniqueNumber): static } /** - * Gets employerReference + * Gets name * - * @return string|null + * @return string */ - public function getEmployerReference(): ?string + public function getName(): string { - return $this->container['employerReference']; + return $this->container['name']; } /** - * Sets employerReference + * Sets name * - * @param string|null $employerReference employerReference + * @param string $name name * * @return $this */ - public function setEmployerReference(?string $employerReference): static + public function setName(string $name): static { - if (is_null($employerReference)) { - array_push($this->openAPINullablesSetToNull, 'employerReference'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('employerReference', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['employerReference'] = $employerReference; + if ((mb_strlen($name) > 150)) { + throw new InvalidArgumentException('invalid length for $name when calling WorkerGroup., must be smaller than or equal to 150.'); + } + if ((mb_strlen($name) < 1)) { + throw new InvalidArgumentException('invalid length for $name when calling WorkerGroup., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; return $this; } /** - * Gets lgpsFund + * Gets papdisGroup * - * @return \SynergiTech\Staffology\Model\LgpsFund|null + * @return string|null */ - public function getLgpsFund(): ?\SynergiTech\Staffology\Model\LgpsFund + public function getPapdisGroup(): ?string { - return $this->container['lgpsFund']; + return $this->container['papdisGroup']; } /** - * Sets lgpsFund + * Sets papdisGroup * - * @param \SynergiTech\Staffology\Model\LgpsFund|null $lgpsFund lgpsFund + * @param string|null $papdisGroup papdisGroup * * @return $this */ - public function setLgpsFund(?\SynergiTech\Staffology\Model\LgpsFund $lgpsFund): static + public function setPapdisGroup(?string $papdisGroup): static { - if (is_null($lgpsFund)) { - throw new InvalidArgumentException('non-nullable lgpsFund cannot be null'); + if (is_null($papdisGroup)) { + array_push($this->openAPINullablesSetToNull, 'papdisGroup'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('papdisGroup', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['lgpsFund'] = $lgpsFund; + if (!is_null($papdisGroup) && (mb_strlen($papdisGroup) > 40)) { + throw new InvalidArgumentException('invalid length for $papdisGroup when calling WorkerGroup., must be smaller than or equal to 40.'); + } + + $this->container['papdisGroup'] = $papdisGroup; return $this; } /** - * Gets workerGroupId + * Gets papdisSubGroup * * @return string|null */ - public function getWorkerGroupId(): ?string + public function getPapdisSubGroup(): ?string { - return $this->container['workerGroupId']; + return $this->container['papdisSubGroup']; } /** - * Sets workerGroupId + * Sets papdisSubGroup * - * @param string|null $workerGroupId [readonly] + * @param string|null $papdisSubGroup papdisSubGroup * * @return $this */ - public function setWorkerGroupId(?string $workerGroupId): static + public function setPapdisSubGroup(?string $papdisSubGroup): static { - if (is_null($workerGroupId)) { - throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); + if (is_null($papdisSubGroup)) { + array_push($this->openAPINullablesSetToNull, 'papdisSubGroup'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('papdisSubGroup', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['workerGroupId'] = $workerGroupId; + if (!is_null($papdisSubGroup) && (mb_strlen($papdisSubGroup) > 40)) { + throw new InvalidArgumentException('invalid length for $papdisSubGroup when calling WorkerGroup., must be smaller than or equal to 40.'); + } + + $this->container['papdisSubGroup'] = $papdisSubGroup; return $this; } /** - * Gets assumedPensionablePay + * Gets payslipDescription * - * @return \SynergiTech\Staffology\Model\AssumedPensionablePay|null + * @return string|null */ - public function getAssumedPensionablePay(): ?\SynergiTech\Staffology\Model\AssumedPensionablePay + public function getPayslipDescription(): ?string { - return $this->container['assumedPensionablePay']; + return $this->container['payslipDescription']; } /** - * Sets assumedPensionablePay + * Sets payslipDescription * - * @param \SynergiTech\Staffology\Model\AssumedPensionablePay|null $assumedPensionablePay assumedPensionablePay + * @param string|null $payslipDescription Used for overwriting the pension description that is displayed on the payslip * * @return $this */ - public function setAssumedPensionablePay(?\SynergiTech\Staffology\Model\AssumedPensionablePay $assumedPensionablePay): static + public function setPayslipDescription(?string $payslipDescription): static { - if (is_null($assumedPensionablePay)) { - throw new InvalidArgumentException('non-nullable assumedPensionablePay cannot be null'); + if (is_null($payslipDescription)) { + array_push($this->openAPINullablesSetToNull, 'payslipDescription'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payslipDescription', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['assumedPensionablePay'] = $assumedPensionablePay; + if (!is_null($payslipDescription) && (mb_strlen($payslipDescription) > 100)) { + throw new InvalidArgumentException('invalid length for $payslipDescription when calling WorkerGroup., must be smaller than or equal to 100.'); + } + + $this->container['payslipDescription'] = $payslipDescription; return $this; } @@ -1375,66 +1345,96 @@ public function setPensionablePayDefinition(?\SynergiTech\Staffology\Model\Pensi } /** - * Gets payslipDescription + * Gets schoolEmployerType * * @return string|null */ - public function getPayslipDescription(): ?string + public function getSchoolEmployerType(): ?string { - return $this->container['payslipDescription']; + return $this->container['schoolEmployerType']; } /** - * Sets payslipDescription + * Sets schoolEmployerType * - * @param string|null $payslipDescription Used for overwriting the pension description that is displayed on the payslip + * @param string|null $schoolEmployerType Only applicable if ContributionLevelType is TeachersPensionEnglandAndWales * * @return $this */ - public function setPayslipDescription(?string $payslipDescription): static + public function setSchoolEmployerType(?string $schoolEmployerType): static { - if (is_null($payslipDescription)) { - array_push($this->openAPINullablesSetToNull, 'payslipDescription'); + if (is_null($schoolEmployerType)) { + array_push($this->openAPINullablesSetToNull, 'schoolEmployerType'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('payslipDescription', $nullablesSetToNull); + $index = array_search('schoolEmployerType', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($payslipDescription) && (mb_strlen($payslipDescription) > 100)) { - throw new InvalidArgumentException('invalid length for $payslipDescription when calling WorkerGroup., must be smaller than or equal to 100.'); + if (!is_null($schoolEmployerType) && (mb_strlen($schoolEmployerType) > 4)) { + throw new InvalidArgumentException('invalid length for $schoolEmployerType when calling WorkerGroup., must be smaller than or equal to 4.'); + } + if (!is_null($schoolEmployerType) && (!preg_match("/^(\\d{4})$/", ObjectSerializer::toString($schoolEmployerType)))) { + throw new InvalidArgumentException("invalid value for \$schoolEmployerType when calling WorkerGroup., must conform to the pattern /^(\\d{4})$/."); } - $this->container['payslipDescription'] = $payslipDescription; + $this->container['schoolEmployerType'] = $schoolEmployerType; return $this; } /** - * Gets id + * Gets upperLimit + * + * @return float|null + */ + public function getUpperLimit(): ?float + { + return $this->container['upperLimit']; + } + + /** + * Sets upperLimit + * + * @param float|null $upperLimit upperLimit + * + * @return $this + */ + public function setUpperLimit(?float $upperLimit): static + { + if (is_null($upperLimit)) { + throw new InvalidArgumentException('non-nullable upperLimit cannot be null'); + } + $this->container['upperLimit'] = $upperLimit; + + return $this; + } + + /** + * Gets workerGroupId * * @return string|null */ - public function getId(): ?string + public function getWorkerGroupId(): ?string { - return $this->container['id']; + return $this->container['workerGroupId']; } /** - * Sets id + * Sets workerGroupId * - * @param string|null $id [readonly] The unique id of the object + * @param string|null $workerGroupId [readonly] * * @return $this */ - public function setId(?string $id): static + public function setWorkerGroupId(?string $workerGroupId): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($workerGroupId)) { + throw new InvalidArgumentException('non-nullable workerGroupId cannot be null'); } - $this->container['id'] = $id; + $this->container['workerGroupId'] = $workerGroupId; return $this; } diff --git a/src/Model/WorkingPattern.php b/src/Model/WorkingPattern.php index 1f6030c..7c33060 100644 --- a/src/Model/WorkingPattern.php +++ b/src/Model/WorkingPattern.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,27 +59,27 @@ class WorkingPattern implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'title' => 'string', - 'mon' => 'float', - 'tue' => 'float', - 'wed' => 'float', - 'thu' => 'float', - 'fri' => 'float', - 'sat' => 'float', - 'sun' => 'float', + 'bankHolidayDates' => '\DateTime[]', + 'bankHolidays' => '\SynergiTech\Staffology\Model\BankHolidayCollection', 'contractedWeeks' => 'float', - 'fullTimeContractedWeeks' => 'float', + 'effectiveFrom' => '\DateTime', + 'fri' => 'float', 'fullTimeContractedHours' => 'float', - 'bankHolidays' => '\SynergiTech\Staffology\Model\BankHolidayCollection', - 'proRataRule' => '\SynergiTech\Staffology\Model\ProRataRule', - 'bankHolidayDates' => '\DateTime[]', - 'workingPatternHoursType' => '\SynergiTech\Staffology\Model\WorkingPatternHoursType', + 'fullTimeContractedWeeks' => 'float', + 'id' => 'string', 'isDefault' => 'bool', - 'effectiveFrom' => '\DateTime', - 'workingPatternType' => '\SynergiTech\Staffology\Model\WorkingPatternType', + 'mon' => 'float', + 'proRataRule' => '\SynergiTech\Staffology\Model\ProRataRule', + 'sat' => 'float', 'shiftWorkingPatternDays' => '\SynergiTech\Staffology\Model\ShiftWorkingPatternDay[]', + 'sun' => 'float', + 'thu' => 'float', + 'title' => 'string', + 'tue' => 'float', + 'wed' => 'float', 'workingPatternEffectiveFrom' => '\DateTime', - 'id' => 'string' + 'workingPatternHoursType' => '\SynergiTech\Staffology\Model\WorkingPatternHoursType', + 'workingPatternType' => '\SynergiTech\Staffology\Model\WorkingPatternType' ]; /** @@ -88,27 +88,27 @@ class WorkingPattern implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'title' => null, - 'mon' => 'double', - 'tue' => 'double', - 'wed' => 'double', - 'thu' => 'double', - 'fri' => 'double', - 'sat' => 'double', - 'sun' => 'double', + 'bankHolidayDates' => 'date-time', + 'bankHolidays' => null, 'contractedWeeks' => 'double', - 'fullTimeContractedWeeks' => 'double', + 'effectiveFrom' => 'date', + 'fri' => 'double', 'fullTimeContractedHours' => 'double', - 'bankHolidays' => null, - 'proRataRule' => null, - 'bankHolidayDates' => 'date-time', - 'workingPatternHoursType' => null, + 'fullTimeContractedWeeks' => 'double', + 'id' => 'uuid', 'isDefault' => null, - 'effectiveFrom' => 'date', - 'workingPatternType' => null, + 'mon' => 'double', + 'proRataRule' => null, + 'sat' => 'double', 'shiftWorkingPatternDays' => null, + 'sun' => 'double', + 'thu' => 'double', + 'title' => null, + 'tue' => 'double', + 'wed' => 'double', 'workingPatternEffectiveFrom' => 'date', - 'id' => 'uuid' + 'workingPatternHoursType' => null, + 'workingPatternType' => null ]; /** @@ -117,27 +117,27 @@ class WorkingPattern implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'title' => false, - 'mon' => false, - 'tue' => false, - 'wed' => false, - 'thu' => false, - 'fri' => false, - 'sat' => false, - 'sun' => false, + 'bankHolidayDates' => true, + 'bankHolidays' => false, 'contractedWeeks' => true, - 'fullTimeContractedWeeks' => true, + 'effectiveFrom' => true, + 'fri' => false, 'fullTimeContractedHours' => true, - 'bankHolidays' => false, - 'proRataRule' => false, - 'bankHolidayDates' => true, - 'workingPatternHoursType' => false, + 'fullTimeContractedWeeks' => true, + 'id' => false, 'isDefault' => false, - 'effectiveFrom' => true, - 'workingPatternType' => false, + 'mon' => false, + 'proRataRule' => false, + 'sat' => false, 'shiftWorkingPatternDays' => true, + 'sun' => false, + 'thu' => false, + 'title' => false, + 'tue' => false, + 'wed' => false, 'workingPatternEffectiveFrom' => true, - 'id' => false + 'workingPatternHoursType' => false, + 'workingPatternType' => false ]; /** @@ -226,27 +226,27 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'title' => 'title', - 'mon' => 'mon', - 'tue' => 'tue', - 'wed' => 'wed', - 'thu' => 'thu', - 'fri' => 'fri', - 'sat' => 'sat', - 'sun' => 'sun', + 'bankHolidayDates' => 'bankHolidayDates', + 'bankHolidays' => 'bankHolidays', 'contractedWeeks' => 'contractedWeeks', - 'fullTimeContractedWeeks' => 'fullTimeContractedWeeks', + 'effectiveFrom' => 'effectiveFrom', + 'fri' => 'fri', 'fullTimeContractedHours' => 'fullTimeContractedHours', - 'bankHolidays' => 'bankHolidays', - 'proRataRule' => 'proRataRule', - 'bankHolidayDates' => 'bankHolidayDates', - 'workingPatternHoursType' => 'workingPatternHoursType', + 'fullTimeContractedWeeks' => 'fullTimeContractedWeeks', + 'id' => 'id', 'isDefault' => 'isDefault', - 'effectiveFrom' => 'effectiveFrom', - 'workingPatternType' => 'workingPatternType', + 'mon' => 'mon', + 'proRataRule' => 'proRataRule', + 'sat' => 'sat', 'shiftWorkingPatternDays' => 'shiftWorkingPatternDays', + 'sun' => 'sun', + 'thu' => 'thu', + 'title' => 'title', + 'tue' => 'tue', + 'wed' => 'wed', 'workingPatternEffectiveFrom' => 'workingPatternEffectiveFrom', - 'id' => 'id' + 'workingPatternHoursType' => 'workingPatternHoursType', + 'workingPatternType' => 'workingPatternType' ]; /** @@ -255,27 +255,27 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'title' => 'setTitle', - 'mon' => 'setMon', - 'tue' => 'setTue', - 'wed' => 'setWed', - 'thu' => 'setThu', - 'fri' => 'setFri', - 'sat' => 'setSat', - 'sun' => 'setSun', + 'bankHolidayDates' => 'setBankHolidayDates', + 'bankHolidays' => 'setBankHolidays', 'contractedWeeks' => 'setContractedWeeks', - 'fullTimeContractedWeeks' => 'setFullTimeContractedWeeks', + 'effectiveFrom' => 'setEffectiveFrom', + 'fri' => 'setFri', 'fullTimeContractedHours' => 'setFullTimeContractedHours', - 'bankHolidays' => 'setBankHolidays', - 'proRataRule' => 'setProRataRule', - 'bankHolidayDates' => 'setBankHolidayDates', - 'workingPatternHoursType' => 'setWorkingPatternHoursType', + 'fullTimeContractedWeeks' => 'setFullTimeContractedWeeks', + 'id' => 'setId', 'isDefault' => 'setIsDefault', - 'effectiveFrom' => 'setEffectiveFrom', - 'workingPatternType' => 'setWorkingPatternType', + 'mon' => 'setMon', + 'proRataRule' => 'setProRataRule', + 'sat' => 'setSat', 'shiftWorkingPatternDays' => 'setShiftWorkingPatternDays', + 'sun' => 'setSun', + 'thu' => 'setThu', + 'title' => 'setTitle', + 'tue' => 'setTue', + 'wed' => 'setWed', 'workingPatternEffectiveFrom' => 'setWorkingPatternEffectiveFrom', - 'id' => 'setId' + 'workingPatternHoursType' => 'setWorkingPatternHoursType', + 'workingPatternType' => 'setWorkingPatternType' ]; /** @@ -284,27 +284,27 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'title' => 'getTitle', - 'mon' => 'getMon', - 'tue' => 'getTue', - 'wed' => 'getWed', - 'thu' => 'getThu', - 'fri' => 'getFri', - 'sat' => 'getSat', - 'sun' => 'getSun', + 'bankHolidayDates' => 'getBankHolidayDates', + 'bankHolidays' => 'getBankHolidays', 'contractedWeeks' => 'getContractedWeeks', - 'fullTimeContractedWeeks' => 'getFullTimeContractedWeeks', + 'effectiveFrom' => 'getEffectiveFrom', + 'fri' => 'getFri', 'fullTimeContractedHours' => 'getFullTimeContractedHours', - 'bankHolidays' => 'getBankHolidays', - 'proRataRule' => 'getProRataRule', - 'bankHolidayDates' => 'getBankHolidayDates', - 'workingPatternHoursType' => 'getWorkingPatternHoursType', + 'fullTimeContractedWeeks' => 'getFullTimeContractedWeeks', + 'id' => 'getId', 'isDefault' => 'getIsDefault', - 'effectiveFrom' => 'getEffectiveFrom', - 'workingPatternType' => 'getWorkingPatternType', + 'mon' => 'getMon', + 'proRataRule' => 'getProRataRule', + 'sat' => 'getSat', 'shiftWorkingPatternDays' => 'getShiftWorkingPatternDays', + 'sun' => 'getSun', + 'thu' => 'getThu', + 'title' => 'getTitle', + 'tue' => 'getTue', + 'wed' => 'getWed', 'workingPatternEffectiveFrom' => 'getWorkingPatternEffectiveFrom', - 'id' => 'getId' + 'workingPatternHoursType' => 'getWorkingPatternHoursType', + 'workingPatternType' => 'getWorkingPatternType' ]; /** @@ -363,27 +363,27 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('mon', $data ?? [], null); - $this->setIfExists('tue', $data ?? [], null); - $this->setIfExists('wed', $data ?? [], null); - $this->setIfExists('thu', $data ?? [], null); - $this->setIfExists('fri', $data ?? [], null); - $this->setIfExists('sat', $data ?? [], null); - $this->setIfExists('sun', $data ?? [], null); + $this->setIfExists('bankHolidayDates', $data ?? [], null); + $this->setIfExists('bankHolidays', $data ?? [], null); $this->setIfExists('contractedWeeks', $data ?? [], null); - $this->setIfExists('fullTimeContractedWeeks', $data ?? [], null); + $this->setIfExists('effectiveFrom', $data ?? [], null); + $this->setIfExists('fri', $data ?? [], null); $this->setIfExists('fullTimeContractedHours', $data ?? [], null); - $this->setIfExists('bankHolidays', $data ?? [], null); - $this->setIfExists('proRataRule', $data ?? [], null); - $this->setIfExists('bankHolidayDates', $data ?? [], null); - $this->setIfExists('workingPatternHoursType', $data ?? [], null); + $this->setIfExists('fullTimeContractedWeeks', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('isDefault', $data ?? [], null); - $this->setIfExists('effectiveFrom', $data ?? [], null); - $this->setIfExists('workingPatternType', $data ?? [], null); + $this->setIfExists('mon', $data ?? [], null); + $this->setIfExists('proRataRule', $data ?? [], null); + $this->setIfExists('sat', $data ?? [], null); $this->setIfExists('shiftWorkingPatternDays', $data ?? [], null); + $this->setIfExists('sun', $data ?? [], null); + $this->setIfExists('thu', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('tue', $data ?? [], null); + $this->setIfExists('wed', $data ?? [], null); $this->setIfExists('workingPatternEffectiveFrom', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('workingPatternHoursType', $data ?? [], null); + $this->setIfExists('workingPatternType', $data ?? [], null); } /** @@ -440,143 +440,132 @@ public function valid(): bool /** - * Gets title + * Gets bankHolidayDates * - * @return string + * @return \DateTime[]|null */ - public function getTitle(): string + public function getBankHolidayDates(): ?array { - return $this->container['title']; + return $this->container['bankHolidayDates']; } /** - * Sets title + * Sets bankHolidayDates * - * @param string $title title + * @param \DateTime[]|null $bankHolidayDates [readonly] The dates that are classed as Bank Holidays for this WorkingPattern * * @return $this */ - public function setTitle(string $title): static + public function setBankHolidayDates(?array $bankHolidayDates): static { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); - } - if ((mb_strlen($title) > 100)) { - throw new InvalidArgumentException('invalid length for $title when calling WorkingPattern., must be smaller than or equal to 100.'); - } - if ((mb_strlen($title) < 1)) { - throw new InvalidArgumentException('invalid length for $title when calling WorkingPattern., must be bigger than or equal to 1.'); + if (is_null($bankHolidayDates)) { + array_push($this->openAPINullablesSetToNull, 'bankHolidayDates'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bankHolidayDates', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - - $this->container['title'] = $title; + $this->container['bankHolidayDates'] = $bankHolidayDates; return $this; } /** - * Gets mon + * Gets bankHolidays * - * @return float|null + * @return \SynergiTech\Staffology\Model\BankHolidayCollection|null */ - public function getMon(): ?float + public function getBankHolidays(): ?\SynergiTech\Staffology\Model\BankHolidayCollection { - return $this->container['mon']; + return $this->container['bankHolidays']; } /** - * Sets mon + * Sets bankHolidays * - * @param float|null $mon mon + * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHolidays bankHolidays * * @return $this */ - public function setMon(?float $mon): static + public function setBankHolidays(?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHolidays): static { - if (is_null($mon)) { - throw new InvalidArgumentException('non-nullable mon cannot be null'); + if (is_null($bankHolidays)) { + throw new InvalidArgumentException('non-nullable bankHolidays cannot be null'); } - $this->container['mon'] = $mon; + $this->container['bankHolidays'] = $bankHolidays; return $this; } /** - * Gets tue + * Gets contractedWeeks * * @return float|null */ - public function getTue(): ?float + public function getContractedWeeks(): ?float { - return $this->container['tue']; + return $this->container['contractedWeeks']; } /** - * Sets tue + * Sets contractedWeeks * - * @param float|null $tue tue + * @param float|null $contractedWeeks The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. * * @return $this */ - public function setTue(?float $tue): static + public function setContractedWeeks(?float $contractedWeeks): static { - if (is_null($tue)) { - throw new InvalidArgumentException('non-nullable tue cannot be null'); + if (is_null($contractedWeeks)) { + array_push($this->openAPINullablesSetToNull, 'contractedWeeks'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('contractedWeeks', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['tue'] = $tue; - return $this; - } - /** - * Gets wed - * - * @return float|null - */ - public function getWed(): ?float - { - return $this->container['wed']; - } - - /** - * Sets wed - * - * @param float|null $wed wed - * - * @return $this - */ - public function setWed(?float $wed): static - { - if (is_null($wed)) { - throw new InvalidArgumentException('non-nullable wed cannot be null'); - } - $this->container['wed'] = $wed; + $this->container['contractedWeeks'] = $contractedWeeks; return $this; } /** - * Gets thu + * Gets effectiveFrom * - * @return float|null + * @return \DateTime|null */ - public function getThu(): ?float + public function getEffectiveFrom(): ?\DateTime { - return $this->container['thu']; + return $this->container['effectiveFrom']; } /** - * Sets thu + * Sets effectiveFrom * - * @param float|null $thu thu + * @param \DateTime|null $effectiveFrom The date when the assignment of the Working Pattern becomes effective. Required for a Shift WorkingPattern to determine when it starts * * @return $this */ - public function setThu(?float $thu): static + public function setEffectiveFrom(?\DateTime $effectiveFrom): static { - if (is_null($thu)) { - throw new InvalidArgumentException('non-nullable thu cannot be null'); + if (is_null($effectiveFrom)) { + array_push($this->openAPINullablesSetToNull, 'effectiveFrom'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('effectiveFrom', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['thu'] = $thu; + $this->container['effectiveFrom'] = $effectiveFrom; return $this; } @@ -609,83 +598,63 @@ public function setFri(?float $fri): static } /** - * Gets sat - * - * @return float|null - */ - public function getSat(): ?float - { - return $this->container['sat']; - } - - /** - * Sets sat - * - * @param float|null $sat sat - * - * @return $this - */ - public function setSat(?float $sat): static - { - if (is_null($sat)) { - throw new InvalidArgumentException('non-nullable sat cannot be null'); - } - $this->container['sat'] = $sat; - - return $this; - } - - /** - * Gets sun + * Gets fullTimeContractedHours * * @return float|null */ - public function getSun(): ?float + public function getFullTimeContractedHours(): ?float { - return $this->container['sun']; + return $this->container['fullTimeContractedHours']; } /** - * Sets sun + * Sets fullTimeContractedHours * - * @param float|null $sun sun + * @param float|null $fullTimeContractedHours The amount of hours an employee works (Full Time). If Null then the default is used. * * @return $this */ - public function setSun(?float $sun): static + public function setFullTimeContractedHours(?float $fullTimeContractedHours): static { - if (is_null($sun)) { - throw new InvalidArgumentException('non-nullable sun cannot be null'); + if (is_null($fullTimeContractedHours)) { + array_push($this->openAPINullablesSetToNull, 'fullTimeContractedHours'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fullTimeContractedHours', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['sun'] = $sun; + $this->container['fullTimeContractedHours'] = $fullTimeContractedHours; return $this; } /** - * Gets contractedWeeks + * Gets fullTimeContractedWeeks * * @return float|null */ - public function getContractedWeeks(): ?float + public function getFullTimeContractedWeeks(): ?float { - return $this->container['contractedWeeks']; + return $this->container['fullTimeContractedWeeks']; } /** - * Sets contractedWeeks + * Sets fullTimeContractedWeeks * - * @param float|null $contractedWeeks The amount of weeks an employee works, utilise for employees who aren't working full time. If Null then the default is used. + * @param float|null $fullTimeContractedWeeks The amount of weeks an employee works (Full Time). If Null then the default is used. * * @return $this */ - public function setContractedWeeks(?float $contractedWeeks): static + public function setFullTimeContractedWeeks(?float $fullTimeContractedWeeks): static { - if (is_null($contractedWeeks)) { - array_push($this->openAPINullablesSetToNull, 'contractedWeeks'); + if (is_null($fullTimeContractedWeeks)) { + array_push($this->openAPINullablesSetToNull, 'fullTimeContractedWeeks'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('contractedWeeks', $nullablesSetToNull); + $index = array_search('fullTimeContractedWeeks', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); @@ -693,104 +662,88 @@ public function setContractedWeeks(?float $contractedWeeks): static } - $this->container['contractedWeeks'] = $contractedWeeks; + $this->container['fullTimeContractedWeeks'] = $fullTimeContractedWeeks; return $this; } /** - * Gets fullTimeContractedWeeks + * Gets id * - * @return float|null + * @return string|null */ - public function getFullTimeContractedWeeks(): ?float + public function getId(): ?string { - return $this->container['fullTimeContractedWeeks']; + return $this->container['id']; } /** - * Sets fullTimeContractedWeeks + * Sets id * - * @param float|null $fullTimeContractedWeeks The amount of weeks an employee works (Full Time). If Null then the default is used. + * @param string|null $id [readonly] The unique id of the object * * @return $this */ - public function setFullTimeContractedWeeks(?float $fullTimeContractedWeeks): static + public function setId(?string $id): static { - if (is_null($fullTimeContractedWeeks)) { - array_push($this->openAPINullablesSetToNull, 'fullTimeContractedWeeks'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fullTimeContractedWeeks', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); } - - - $this->container['fullTimeContractedWeeks'] = $fullTimeContractedWeeks; + $this->container['id'] = $id; return $this; } /** - * Gets fullTimeContractedHours + * Gets isDefault * - * @return float|null + * @return bool|null */ - public function getFullTimeContractedHours(): ?float + public function getIsDefault(): ?bool { - return $this->container['fullTimeContractedHours']; + return $this->container['isDefault']; } /** - * Sets fullTimeContractedHours + * Sets isDefault * - * @param float|null $fullTimeContractedHours The amount of hours an employee works (Full Time). If Null then the default is used. + * @param bool|null $isDefault isDefault * * @return $this */ - public function setFullTimeContractedHours(?float $fullTimeContractedHours): static + public function setIsDefault(?bool $isDefault): static { - if (is_null($fullTimeContractedHours)) { - array_push($this->openAPINullablesSetToNull, 'fullTimeContractedHours'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('fullTimeContractedHours', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($isDefault)) { + throw new InvalidArgumentException('non-nullable isDefault cannot be null'); } - $this->container['fullTimeContractedHours'] = $fullTimeContractedHours; + $this->container['isDefault'] = $isDefault; return $this; } /** - * Gets bankHolidays + * Gets mon * - * @return \SynergiTech\Staffology\Model\BankHolidayCollection|null + * @return float|null */ - public function getBankHolidays(): ?\SynergiTech\Staffology\Model\BankHolidayCollection + public function getMon(): ?float { - return $this->container['bankHolidays']; + return $this->container['mon']; } /** - * Sets bankHolidays + * Sets mon * - * @param \SynergiTech\Staffology\Model\BankHolidayCollection|null $bankHolidays bankHolidays + * @param float|null $mon mon * * @return $this */ - public function setBankHolidays(?\SynergiTech\Staffology\Model\BankHolidayCollection $bankHolidays): static + public function setMon(?float $mon): static { - if (is_null($bankHolidays)) { - throw new InvalidArgumentException('non-nullable bankHolidays cannot be null'); + if (is_null($mon)) { + throw new InvalidArgumentException('non-nullable mon cannot be null'); } - $this->container['bankHolidays'] = $bankHolidays; + $this->container['mon'] = $mon; return $this; } @@ -823,184 +776,204 @@ public function setProRataRule(?\SynergiTech\Staffology\Model\ProRataRule $proRa } /** - * Gets bankHolidayDates + * Gets sat * - * @return \DateTime[]|null + * @return float|null */ - public function getBankHolidayDates(): ?array + public function getSat(): ?float { - return $this->container['bankHolidayDates']; + return $this->container['sat']; } /** - * Sets bankHolidayDates + * Sets sat * - * @param \DateTime[]|null $bankHolidayDates [readonly] The dates that are classed as Bank Holidays for this WorkingPattern + * @param float|null $sat sat * * @return $this */ - public function setBankHolidayDates(?array $bankHolidayDates): static + public function setSat(?float $sat): static { - if (is_null($bankHolidayDates)) { - array_push($this->openAPINullablesSetToNull, 'bankHolidayDates'); + if (is_null($sat)) { + throw new InvalidArgumentException('non-nullable sat cannot be null'); + } + $this->container['sat'] = $sat; + + return $this; + } + + /** + * Gets shiftWorkingPatternDays + * + * @return \SynergiTech\Staffology\Model\ShiftWorkingPatternDay[]|null + */ + public function getShiftWorkingPatternDays(): ?array + { + return $this->container['shiftWorkingPatternDays']; + } + + /** + * Sets shiftWorkingPatternDays + * + * @param \SynergiTech\Staffology\Model\ShiftWorkingPatternDay[]|null $shiftWorkingPatternDays shiftWorkingPatternDays + * + * @return $this + */ + public function setShiftWorkingPatternDays(?array $shiftWorkingPatternDays): static + { + if (is_null($shiftWorkingPatternDays)) { + array_push($this->openAPINullablesSetToNull, 'shiftWorkingPatternDays'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('bankHolidayDates', $nullablesSetToNull); + $index = array_search('shiftWorkingPatternDays', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['bankHolidayDates'] = $bankHolidayDates; + $this->container['shiftWorkingPatternDays'] = $shiftWorkingPatternDays; return $this; } /** - * Gets workingPatternHoursType + * Gets sun * - * @return \SynergiTech\Staffology\Model\WorkingPatternHoursType|null + * @return float|null */ - public function getWorkingPatternHoursType(): ?\SynergiTech\Staffology\Model\WorkingPatternHoursType + public function getSun(): ?float { - return $this->container['workingPatternHoursType']; + return $this->container['sun']; } /** - * Sets workingPatternHoursType + * Sets sun * - * @param \SynergiTech\Staffology\Model\WorkingPatternHoursType|null $workingPatternHoursType workingPatternHoursType + * @param float|null $sun sun * * @return $this */ - public function setWorkingPatternHoursType(?\SynergiTech\Staffology\Model\WorkingPatternHoursType $workingPatternHoursType): static + public function setSun(?float $sun): static { - if (is_null($workingPatternHoursType)) { - throw new InvalidArgumentException('non-nullable workingPatternHoursType cannot be null'); + if (is_null($sun)) { + throw new InvalidArgumentException('non-nullable sun cannot be null'); } - $this->container['workingPatternHoursType'] = $workingPatternHoursType; + $this->container['sun'] = $sun; return $this; } /** - * Gets isDefault + * Gets thu * - * @return bool|null + * @return float|null */ - public function getIsDefault(): ?bool + public function getThu(): ?float { - return $this->container['isDefault']; + return $this->container['thu']; } /** - * Sets isDefault + * Sets thu * - * @param bool|null $isDefault isDefault + * @param float|null $thu thu * * @return $this */ - public function setIsDefault(?bool $isDefault): static + public function setThu(?float $thu): static { - if (is_null($isDefault)) { - throw new InvalidArgumentException('non-nullable isDefault cannot be null'); + if (is_null($thu)) { + throw new InvalidArgumentException('non-nullable thu cannot be null'); } - $this->container['isDefault'] = $isDefault; + $this->container['thu'] = $thu; return $this; } /** - * Gets effectiveFrom + * Gets title * - * @return \DateTime|null + * @return string */ - public function getEffectiveFrom(): ?\DateTime + public function getTitle(): string { - return $this->container['effectiveFrom']; + return $this->container['title']; } /** - * Sets effectiveFrom + * Sets title * - * @param \DateTime|null $effectiveFrom The date when the assignment of the Working Pattern becomes effective. Required for a Shift WorkingPattern to determine when it starts + * @param string $title title * * @return $this */ - public function setEffectiveFrom(?\DateTime $effectiveFrom): static + public function setTitle(string $title): static { - if (is_null($effectiveFrom)) { - array_push($this->openAPINullablesSetToNull, 'effectiveFrom'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('effectiveFrom', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if ((mb_strlen($title) > 100)) { + throw new InvalidArgumentException('invalid length for $title when calling WorkingPattern., must be smaller than or equal to 100.'); + } + if ((mb_strlen($title) < 1)) { + throw new InvalidArgumentException('invalid length for $title when calling WorkingPattern., must be bigger than or equal to 1.'); } - $this->container['effectiveFrom'] = $effectiveFrom; + + $this->container['title'] = $title; return $this; } /** - * Gets workingPatternType + * Gets tue * - * @return \SynergiTech\Staffology\Model\WorkingPatternType|null + * @return float|null */ - public function getWorkingPatternType(): ?\SynergiTech\Staffology\Model\WorkingPatternType + public function getTue(): ?float { - return $this->container['workingPatternType']; + return $this->container['tue']; } /** - * Sets workingPatternType + * Sets tue * - * @param \SynergiTech\Staffology\Model\WorkingPatternType|null $workingPatternType workingPatternType + * @param float|null $tue tue * * @return $this */ - public function setWorkingPatternType(?\SynergiTech\Staffology\Model\WorkingPatternType $workingPatternType): static + public function setTue(?float $tue): static { - if (is_null($workingPatternType)) { - throw new InvalidArgumentException('non-nullable workingPatternType cannot be null'); + if (is_null($tue)) { + throw new InvalidArgumentException('non-nullable tue cannot be null'); } - $this->container['workingPatternType'] = $workingPatternType; + $this->container['tue'] = $tue; return $this; } /** - * Gets shiftWorkingPatternDays + * Gets wed * - * @return \SynergiTech\Staffology\Model\ShiftWorkingPatternDay[]|null + * @return float|null */ - public function getShiftWorkingPatternDays(): ?array + public function getWed(): ?float { - return $this->container['shiftWorkingPatternDays']; + return $this->container['wed']; } /** - * Sets shiftWorkingPatternDays + * Sets wed * - * @param \SynergiTech\Staffology\Model\ShiftWorkingPatternDay[]|null $shiftWorkingPatternDays shiftWorkingPatternDays + * @param float|null $wed wed * * @return $this */ - public function setShiftWorkingPatternDays(?array $shiftWorkingPatternDays): static + public function setWed(?float $wed): static { - if (is_null($shiftWorkingPatternDays)) { - array_push($this->openAPINullablesSetToNull, 'shiftWorkingPatternDays'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('shiftWorkingPatternDays', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($wed)) { + throw new InvalidArgumentException('non-nullable wed cannot be null'); } - $this->container['shiftWorkingPatternDays'] = $shiftWorkingPatternDays; + $this->container['wed'] = $wed; return $this; } @@ -1040,28 +1013,55 @@ public function setWorkingPatternEffectiveFrom(?\DateTime $workingPatternEffecti } /** - * Gets id + * Gets workingPatternHoursType * - * @return string|null + * @return \SynergiTech\Staffology\Model\WorkingPatternHoursType|null */ - public function getId(): ?string + public function getWorkingPatternHoursType(): ?\SynergiTech\Staffology\Model\WorkingPatternHoursType { - return $this->container['id']; + return $this->container['workingPatternHoursType']; } /** - * Sets id + * Sets workingPatternHoursType * - * @param string|null $id [readonly] The unique id of the object + * @param \SynergiTech\Staffology\Model\WorkingPatternHoursType|null $workingPatternHoursType workingPatternHoursType * * @return $this */ - public function setId(?string $id): static + public function setWorkingPatternHoursType(?\SynergiTech\Staffology\Model\WorkingPatternHoursType $workingPatternHoursType): static { - if (is_null($id)) { - throw new InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($workingPatternHoursType)) { + throw new InvalidArgumentException('non-nullable workingPatternHoursType cannot be null'); } - $this->container['id'] = $id; + $this->container['workingPatternHoursType'] = $workingPatternHoursType; + + return $this; + } + + /** + * Gets workingPatternType + * + * @return \SynergiTech\Staffology\Model\WorkingPatternType|null + */ + public function getWorkingPatternType(): ?\SynergiTech\Staffology\Model\WorkingPatternType + { + return $this->container['workingPatternType']; + } + + /** + * Sets workingPatternType + * + * @param \SynergiTech\Staffology\Model\WorkingPatternType|null $workingPatternType workingPatternType + * + * @return $this + */ + public function setWorkingPatternType(?\SynergiTech\Staffology\Model\WorkingPatternType $workingPatternType): static + { + if (is_null($workingPatternType)) { + throw new InvalidArgumentException('non-nullable workingPatternType cannot be null'); + } + $this->container['workingPatternType'] = $workingPatternType; return $this; } diff --git a/src/Model/WorkingPatternHoursType.php b/src/Model/WorkingPatternHoursType.php index 30cff25..70276f8 100644 --- a/src/Model/WorkingPatternHoursType.php +++ b/src/Model/WorkingPatternHoursType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/WorkingPatternType.php b/src/Model/WorkingPatternType.php index 9de2fbe..bab750b 100644 --- a/src/Model/WorkingPatternType.php +++ b/src/Model/WorkingPatternType.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/Model/YearEnd.php b/src/Model/YearEnd.php index 16b2d72..a818b5e 100644 --- a/src/Model/YearEnd.php +++ b/src/Model/YearEnd.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,17 +60,17 @@ class YearEnd implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'endingYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'startingYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'createEpsForFinalSubmission' => 'bool', 'createEpsForEmploymentAllowance' => 'bool', + 'createEpsForFinalSubmission' => 'bool', 'createExb' => 'bool', - 'setEmploymentAllowance' => 'float', - 'taxCodeChanges' => '\SynergiTech\Staffology\Model\YearEndTaxCodeChange[]', - 'removeWeek1Month1' => '\SynergiTech\Staffology\Model\Item[]', + 'emailCisStatement' => '\SynergiTech\Staffology\Model\Item[]', 'emailP60' => '\SynergiTech\Staffology\Model\Item[]', + 'endingYear' => '\SynergiTech\Staffology\Model\TaxYear', 'pushP60' => '\SynergiTech\Staffology\Model\ExternalDataProviderId[]', - 'emailCisStatement' => '\SynergiTech\Staffology\Model\Item[]' + 'removeWeek1Month1' => '\SynergiTech\Staffology\Model\Item[]', + 'setEmploymentAllowance' => 'float', + 'startingYear' => '\SynergiTech\Staffology\Model\TaxYear', + 'taxCodeChanges' => '\SynergiTech\Staffology\Model\YearEndTaxCodeChange[]' ]; /** @@ -79,17 +79,17 @@ class YearEnd implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'endingYear' => null, - 'startingYear' => null, - 'createEpsForFinalSubmission' => null, 'createEpsForEmploymentAllowance' => null, + 'createEpsForFinalSubmission' => null, 'createExb' => null, - 'setEmploymentAllowance' => 'double', - 'taxCodeChanges' => null, - 'removeWeek1Month1' => null, + 'emailCisStatement' => null, 'emailP60' => null, + 'endingYear' => null, 'pushP60' => null, - 'emailCisStatement' => null + 'removeWeek1Month1' => null, + 'setEmploymentAllowance' => 'double', + 'startingYear' => null, + 'taxCodeChanges' => null ]; /** @@ -98,17 +98,17 @@ class YearEnd implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'endingYear' => false, - 'startingYear' => false, - 'createEpsForFinalSubmission' => false, 'createEpsForEmploymentAllowance' => false, + 'createEpsForFinalSubmission' => false, 'createExb' => false, - 'setEmploymentAllowance' => true, - 'taxCodeChanges' => true, - 'removeWeek1Month1' => true, + 'emailCisStatement' => true, 'emailP60' => true, + 'endingYear' => false, 'pushP60' => true, - 'emailCisStatement' => true + 'removeWeek1Month1' => true, + 'setEmploymentAllowance' => true, + 'startingYear' => false, + 'taxCodeChanges' => true ]; /** @@ -197,17 +197,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'endingYear' => 'endingYear', - 'startingYear' => 'startingYear', - 'createEpsForFinalSubmission' => 'createEpsForFinalSubmission', 'createEpsForEmploymentAllowance' => 'createEpsForEmploymentAllowance', + 'createEpsForFinalSubmission' => 'createEpsForFinalSubmission', 'createExb' => 'createExb', - 'setEmploymentAllowance' => 'setEmploymentAllowance', - 'taxCodeChanges' => 'taxCodeChanges', - 'removeWeek1Month1' => 'removeWeek1Month1', + 'emailCisStatement' => 'emailCisStatement', 'emailP60' => 'emailP60', + 'endingYear' => 'endingYear', 'pushP60' => 'pushP60', - 'emailCisStatement' => 'emailCisStatement' + 'removeWeek1Month1' => 'removeWeek1Month1', + 'setEmploymentAllowance' => 'setEmploymentAllowance', + 'startingYear' => 'startingYear', + 'taxCodeChanges' => 'taxCodeChanges' ]; /** @@ -216,17 +216,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'endingYear' => 'setEndingYear', - 'startingYear' => 'setStartingYear', - 'createEpsForFinalSubmission' => 'setCreateEpsForFinalSubmission', 'createEpsForEmploymentAllowance' => 'setCreateEpsForEmploymentAllowance', + 'createEpsForFinalSubmission' => 'setCreateEpsForFinalSubmission', 'createExb' => 'setCreateExb', - 'setEmploymentAllowance' => 'setSetEmploymentAllowance', - 'taxCodeChanges' => 'setTaxCodeChanges', - 'removeWeek1Month1' => 'setRemoveWeek1Month1', + 'emailCisStatement' => 'setEmailCisStatement', 'emailP60' => 'setEmailP60', + 'endingYear' => 'setEndingYear', 'pushP60' => 'setPushP60', - 'emailCisStatement' => 'setEmailCisStatement' + 'removeWeek1Month1' => 'setRemoveWeek1Month1', + 'setEmploymentAllowance' => 'setSetEmploymentAllowance', + 'startingYear' => 'setStartingYear', + 'taxCodeChanges' => 'setTaxCodeChanges' ]; /** @@ -235,17 +235,17 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'endingYear' => 'getEndingYear', - 'startingYear' => 'getStartingYear', - 'createEpsForFinalSubmission' => 'getCreateEpsForFinalSubmission', 'createEpsForEmploymentAllowance' => 'getCreateEpsForEmploymentAllowance', + 'createEpsForFinalSubmission' => 'getCreateEpsForFinalSubmission', 'createExb' => 'getCreateExb', - 'setEmploymentAllowance' => 'getSetEmploymentAllowance', - 'taxCodeChanges' => 'getTaxCodeChanges', - 'removeWeek1Month1' => 'getRemoveWeek1Month1', + 'emailCisStatement' => 'getEmailCisStatement', 'emailP60' => 'getEmailP60', + 'endingYear' => 'getEndingYear', 'pushP60' => 'getPushP60', - 'emailCisStatement' => 'getEmailCisStatement' + 'removeWeek1Month1' => 'getRemoveWeek1Month1', + 'setEmploymentAllowance' => 'getSetEmploymentAllowance', + 'startingYear' => 'getStartingYear', + 'taxCodeChanges' => 'getTaxCodeChanges' ]; /** @@ -304,17 +304,17 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('endingYear', $data ?? [], null); - $this->setIfExists('startingYear', $data ?? [], null); - $this->setIfExists('createEpsForFinalSubmission', $data ?? [], null); $this->setIfExists('createEpsForEmploymentAllowance', $data ?? [], null); + $this->setIfExists('createEpsForFinalSubmission', $data ?? [], null); $this->setIfExists('createExb', $data ?? [], null); - $this->setIfExists('setEmploymentAllowance', $data ?? [], null); - $this->setIfExists('taxCodeChanges', $data ?? [], null); - $this->setIfExists('removeWeek1Month1', $data ?? [], null); + $this->setIfExists('emailCisStatement', $data ?? [], null); $this->setIfExists('emailP60', $data ?? [], null); + $this->setIfExists('endingYear', $data ?? [], null); $this->setIfExists('pushP60', $data ?? [], null); - $this->setIfExists('emailCisStatement', $data ?? [], null); + $this->setIfExists('removeWeek1Month1', $data ?? [], null); + $this->setIfExists('setEmploymentAllowance', $data ?? [], null); + $this->setIfExists('startingYear', $data ?? [], null); + $this->setIfExists('taxCodeChanges', $data ?? [], null); } /** @@ -360,204 +360,211 @@ public function valid(): bool /** - * Gets endingYear + * Gets createEpsForEmploymentAllowance * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return bool|null */ - public function getEndingYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getCreateEpsForEmploymentAllowance(): ?bool { - return $this->container['endingYear']; + return $this->container['createEpsForEmploymentAllowance']; } /** - * Sets endingYear + * Sets createEpsForEmploymentAllowance * - * @param \SynergiTech\Staffology\Model\TaxYear|null $endingYear endingYear + * @param bool|null $createEpsForEmploymentAllowance [readonly] Whether or not the system will automatically create an EPS to tell HMRC you qualify for Employment Allowance. * * @return $this */ - public function setEndingYear(?\SynergiTech\Staffology\Model\TaxYear $endingYear): static + public function setCreateEpsForEmploymentAllowance(?bool $createEpsForEmploymentAllowance): static { - if (is_null($endingYear)) { - throw new InvalidArgumentException('non-nullable endingYear cannot be null'); + if (is_null($createEpsForEmploymentAllowance)) { + throw new InvalidArgumentException('non-nullable createEpsForEmploymentAllowance cannot be null'); } - $this->container['endingYear'] = $endingYear; + $this->container['createEpsForEmploymentAllowance'] = $createEpsForEmploymentAllowance; return $this; } /** - * Gets startingYear + * Gets createEpsForFinalSubmission * - * @return \SynergiTech\Staffology\Model\TaxYear|null + * @return bool|null */ - public function getStartingYear(): ?\SynergiTech\Staffology\Model\TaxYear + public function getCreateEpsForFinalSubmission(): ?bool { - return $this->container['startingYear']; + return $this->container['createEpsForFinalSubmission']; } /** - * Sets startingYear + * Sets createEpsForFinalSubmission * - * @param \SynergiTech\Staffology\Model\TaxYear|null $startingYear startingYear + * @param bool|null $createEpsForFinalSubmission [readonly] Whether or not the system will automatically create an EPS to tell HMRC the year has ended. * * @return $this */ - public function setStartingYear(?\SynergiTech\Staffology\Model\TaxYear $startingYear): static + public function setCreateEpsForFinalSubmission(?bool $createEpsForFinalSubmission): static { - if (is_null($startingYear)) { - throw new InvalidArgumentException('non-nullable startingYear cannot be null'); + if (is_null($createEpsForFinalSubmission)) { + throw new InvalidArgumentException('non-nullable createEpsForFinalSubmission cannot be null'); } - $this->container['startingYear'] = $startingYear; + $this->container['createEpsForFinalSubmission'] = $createEpsForFinalSubmission; return $this; } /** - * Gets createEpsForFinalSubmission + * Gets createExb * * @return bool|null */ - public function getCreateEpsForFinalSubmission(): ?bool + public function getCreateExb(): ?bool { - return $this->container['createEpsForFinalSubmission']; + return $this->container['createExb']; } /** - * Sets createEpsForFinalSubmission + * Sets createExb * - * @param bool|null $createEpsForFinalSubmission [readonly] Whether or not the system will automatically create an EPS to tell HMRC the year has ended. + * @param bool|null $createExb [readonly] Whether or not the system will automatically create an EXB to inform HMRC of Expenses and Benefits * * @return $this */ - public function setCreateEpsForFinalSubmission(?bool $createEpsForFinalSubmission): static + public function setCreateExb(?bool $createExb): static { - if (is_null($createEpsForFinalSubmission)) { - throw new InvalidArgumentException('non-nullable createEpsForFinalSubmission cannot be null'); + if (is_null($createExb)) { + throw new InvalidArgumentException('non-nullable createExb cannot be null'); } - $this->container['createEpsForFinalSubmission'] = $createEpsForFinalSubmission; + $this->container['createExb'] = $createExb; return $this; } /** - * Gets createEpsForEmploymentAllowance + * Gets emailCisStatement * - * @return bool|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getCreateEpsForEmploymentAllowance(): ?bool + public function getEmailCisStatement(): ?array { - return $this->container['createEpsForEmploymentAllowance']; + return $this->container['emailCisStatement']; } /** - * Sets createEpsForEmploymentAllowance + * Sets emailCisStatement * - * @param bool|null $createEpsForEmploymentAllowance [readonly] Whether or not the system will automatically create an EPS to tell HMRC you qualify for Employment Allowance. + * @param \SynergiTech\Staffology\Model\Item[]|null $emailCisStatement [readonly] Subcontractors who will be automatically sent an annual CIS Statement * * @return $this */ - public function setCreateEpsForEmploymentAllowance(?bool $createEpsForEmploymentAllowance): static + public function setEmailCisStatement(?array $emailCisStatement): static { - if (is_null($createEpsForEmploymentAllowance)) { - throw new InvalidArgumentException('non-nullable createEpsForEmploymentAllowance cannot be null'); + if (is_null($emailCisStatement)) { + array_push($this->openAPINullablesSetToNull, 'emailCisStatement'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('emailCisStatement', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['createEpsForEmploymentAllowance'] = $createEpsForEmploymentAllowance; + $this->container['emailCisStatement'] = $emailCisStatement; return $this; } /** - * Gets createExb + * Gets emailP60 * - * @return bool|null + * @return \SynergiTech\Staffology\Model\Item[]|null */ - public function getCreateExb(): ?bool + public function getEmailP60(): ?array { - return $this->container['createExb']; + return $this->container['emailP60']; } /** - * Sets createExb + * Sets emailP60 * - * @param bool|null $createExb [readonly] Whether or not the system will automatically create an EXB to inform HMRC of Expenses and Benefits + * @param \SynergiTech\Staffology\Model\Item[]|null $emailP60 [readonly] Employees who will be automatically emailed P60s * * @return $this */ - public function setCreateExb(?bool $createExb): static + public function setEmailP60(?array $emailP60): static { - if (is_null($createExb)) { - throw new InvalidArgumentException('non-nullable createExb cannot be null'); + if (is_null($emailP60)) { + array_push($this->openAPINullablesSetToNull, 'emailP60'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('emailP60', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['createExb'] = $createExb; + $this->container['emailP60'] = $emailP60; return $this; } /** - * Gets setEmploymentAllowance + * Gets endingYear * - * @return float|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getSetEmploymentAllowance(): ?float + public function getEndingYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['setEmploymentAllowance']; + return $this->container['endingYear']; } /** - * Sets setEmploymentAllowance + * Sets endingYear * - * @param float|null $setEmploymentAllowance [readonly] If the Employment Allowance needs to be changed, this indicates the new value + * @param \SynergiTech\Staffology\Model\TaxYear|null $endingYear endingYear * * @return $this */ - public function setSetEmploymentAllowance(?float $setEmploymentAllowance): static + public function setEndingYear(?\SynergiTech\Staffology\Model\TaxYear $endingYear): static { - if (is_null($setEmploymentAllowance)) { - array_push($this->openAPINullablesSetToNull, 'setEmploymentAllowance'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('setEmploymentAllowance', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($endingYear)) { + throw new InvalidArgumentException('non-nullable endingYear cannot be null'); } - $this->container['setEmploymentAllowance'] = $setEmploymentAllowance; + $this->container['endingYear'] = $endingYear; return $this; } /** - * Gets taxCodeChanges + * Gets pushP60 * - * @return \SynergiTech\Staffology\Model\YearEndTaxCodeChange[]|null + * @return \SynergiTech\Staffology\Model\ExternalDataProviderId[]|null */ - public function getTaxCodeChanges(): ?array + public function getPushP60(): ?array { - return $this->container['taxCodeChanges']; + return $this->container['pushP60']; } /** - * Sets taxCodeChanges + * Sets pushP60 * - * @param \SynergiTech\Staffology\Model\YearEndTaxCodeChange[]|null $taxCodeChanges [readonly] Details of changes that wil be made to Tax Codes + * @param \SynergiTech\Staffology\Model\ExternalDataProviderId[]|null $pushP60 [readonly] ExternalDataProviderIds to which P60s can be pushed * * @return $this */ - public function setTaxCodeChanges(?array $taxCodeChanges): static + public function setPushP60(?array $pushP60): static { - if (is_null($taxCodeChanges)) { - array_push($this->openAPINullablesSetToNull, 'taxCodeChanges'); + if (is_null($pushP60)) { + array_push($this->openAPINullablesSetToNull, 'pushP60'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('taxCodeChanges', $nullablesSetToNull); + $index = array_search('pushP60', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['taxCodeChanges'] = $taxCodeChanges; + $this->container['pushP60'] = $pushP60; return $this; } @@ -597,103 +604,96 @@ public function setRemoveWeek1Month1(?array $removeWeek1Month1): static } /** - * Gets emailP60 + * Gets setEmploymentAllowance * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return float|null */ - public function getEmailP60(): ?array + public function getSetEmploymentAllowance(): ?float { - return $this->container['emailP60']; + return $this->container['setEmploymentAllowance']; } /** - * Sets emailP60 + * Sets setEmploymentAllowance * - * @param \SynergiTech\Staffology\Model\Item[]|null $emailP60 [readonly] Employees who will be automatically emailed P60s + * @param float|null $setEmploymentAllowance [readonly] If the Employment Allowance needs to be changed, this indicates the new value * * @return $this */ - public function setEmailP60(?array $emailP60): static + public function setSetEmploymentAllowance(?float $setEmploymentAllowance): static { - if (is_null($emailP60)) { - array_push($this->openAPINullablesSetToNull, 'emailP60'); + if (is_null($setEmploymentAllowance)) { + array_push($this->openAPINullablesSetToNull, 'setEmploymentAllowance'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('emailP60', $nullablesSetToNull); + $index = array_search('setEmploymentAllowance', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['emailP60'] = $emailP60; + $this->container['setEmploymentAllowance'] = $setEmploymentAllowance; return $this; } /** - * Gets pushP60 + * Gets startingYear * - * @return \SynergiTech\Staffology\Model\ExternalDataProviderId[]|null + * @return \SynergiTech\Staffology\Model\TaxYear|null */ - public function getPushP60(): ?array + public function getStartingYear(): ?\SynergiTech\Staffology\Model\TaxYear { - return $this->container['pushP60']; + return $this->container['startingYear']; } /** - * Sets pushP60 + * Sets startingYear * - * @param \SynergiTech\Staffology\Model\ExternalDataProviderId[]|null $pushP60 [readonly] ExternalDataProviderIds to which P60s can be pushed + * @param \SynergiTech\Staffology\Model\TaxYear|null $startingYear startingYear * * @return $this */ - public function setPushP60(?array $pushP60): static + public function setStartingYear(?\SynergiTech\Staffology\Model\TaxYear $startingYear): static { - if (is_null($pushP60)) { - array_push($this->openAPINullablesSetToNull, 'pushP60'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('pushP60', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($startingYear)) { + throw new InvalidArgumentException('non-nullable startingYear cannot be null'); } - $this->container['pushP60'] = $pushP60; + $this->container['startingYear'] = $startingYear; return $this; } /** - * Gets emailCisStatement + * Gets taxCodeChanges * - * @return \SynergiTech\Staffology\Model\Item[]|null + * @return \SynergiTech\Staffology\Model\YearEndTaxCodeChange[]|null */ - public function getEmailCisStatement(): ?array + public function getTaxCodeChanges(): ?array { - return $this->container['emailCisStatement']; + return $this->container['taxCodeChanges']; } /** - * Sets emailCisStatement + * Sets taxCodeChanges * - * @param \SynergiTech\Staffology\Model\Item[]|null $emailCisStatement [readonly] Subcontractors who will be automatically sent an annual CIS Statement + * @param \SynergiTech\Staffology\Model\YearEndTaxCodeChange[]|null $taxCodeChanges [readonly] Details of changes that wil be made to Tax Codes * * @return $this */ - public function setEmailCisStatement(?array $emailCisStatement): static + public function setTaxCodeChanges(?array $taxCodeChanges): static { - if (is_null($emailCisStatement)) { - array_push($this->openAPINullablesSetToNull, 'emailCisStatement'); + if (is_null($taxCodeChanges)) { + array_push($this->openAPINullablesSetToNull, 'taxCodeChanges'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('emailCisStatement', $nullablesSetToNull); + $index = array_search('taxCodeChanges', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['emailCisStatement'] = $emailCisStatement; + $this->container['taxCodeChanges'] = $taxCodeChanges; return $this; } diff --git a/src/Model/YearEndTaxCodeChange.php b/src/Model/YearEndTaxCodeChange.php index 274414f..3bf6610 100644 --- a/src/Model/YearEndTaxCodeChange.php +++ b/src/Model/YearEndTaxCodeChange.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class YearEndTaxCodeChange implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPITypes = [ - 'employee' => '\SynergiTech\Staffology\Model\Item', 'currentCode' => 'string', + 'employee' => '\SynergiTech\Staffology\Model\Item', 'newCode' => 'string' ]; @@ -71,8 +71,8 @@ class YearEndTaxCodeChange implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPIFormats = [ - 'employee' => null, 'currentCode' => null, + 'employee' => null, 'newCode' => null ]; @@ -82,8 +82,8 @@ class YearEndTaxCodeChange implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPINullables = [ - 'employee' => false, 'currentCode' => true, + 'employee' => false, 'newCode' => true ]; @@ -173,8 +173,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'employee' => 'employee', 'currentCode' => 'currentCode', + 'employee' => 'employee', 'newCode' => 'newCode' ]; @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'employee' => 'setEmployee', 'currentCode' => 'setCurrentCode', + 'employee' => 'setEmployee', 'newCode' => 'setNewCode' ]; @@ -195,8 +195,8 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'employee' => 'getEmployee', 'currentCode' => 'getCurrentCode', + 'employee' => 'getEmployee', 'newCode' => 'getNewCode' ]; @@ -256,8 +256,8 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('currentCode', $data ?? [], null); + $this->setIfExists('employee', $data ?? [], null); $this->setIfExists('newCode', $data ?? [], null); } @@ -303,33 +303,6 @@ public function valid(): bool } - /** - * Gets employee - * - * @return \SynergiTech\Staffology\Model\Item|null - */ - public function getEmployee(): ?\SynergiTech\Staffology\Model\Item - { - return $this->container['employee']; - } - - /** - * Sets employee - * - * @param \SynergiTech\Staffology\Model\Item|null $employee employee - * - * @return $this - */ - public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static - { - if (is_null($employee)) { - throw new InvalidArgumentException('non-nullable employee cannot be null'); - } - $this->container['employee'] = $employee; - - return $this; - } - /** * Gets currentCode * @@ -364,6 +337,33 @@ public function setCurrentCode(?string $currentCode): static return $this; } + /** + * Gets employee + * + * @return \SynergiTech\Staffology\Model\Item|null + */ + public function getEmployee(): ?\SynergiTech\Staffology\Model\Item + { + return $this->container['employee']; + } + + /** + * Sets employee + * + * @param \SynergiTech\Staffology\Model\Item|null $employee employee + * + * @return $this + */ + public function setEmployee(?\SynergiTech\Staffology\Model\Item $employee): static + { + if (is_null($employee)) { + throw new InvalidArgumentException('non-nullable employee cannot be null'); + } + $this->container['employee'] = $employee; + + return $this; + } + /** * Gets newCode * diff --git a/src/Model/YtdReport.php b/src/Model/YtdReport.php index 32959dd..7b09abe 100644 --- a/src/Model/YtdReport.php +++ b/src/Model/YtdReport.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class YtdReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'payrun' => '\SynergiTech\Staffology\Model\PayRun', + 'isDraft' => 'bool', 'lines' => '\SynergiTech\Staffology\Model\EmployeeYtdValues[]', + 'payrun' => '\SynergiTech\Staffology\Model\PayRun', 'report' => '\SynergiTech\Staffology\Model\Report', 'taxYear' => '\SynergiTech\Staffology\Model\TaxYear', - 'title' => 'string', - 'isDraft' => 'bool' + 'title' => 'string' ]; /** @@ -73,12 +73,12 @@ class YtdReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'payrun' => null, + 'isDraft' => null, 'lines' => null, + 'payrun' => null, 'report' => null, 'taxYear' => null, - 'title' => null, - 'isDraft' => null + 'title' => null ]; /** @@ -87,12 +87,12 @@ class YtdReport implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'payrun' => false, + 'isDraft' => false, 'lines' => true, + 'payrun' => false, 'report' => false, 'taxYear' => false, - 'title' => true, - 'isDraft' => false + 'title' => true ]; /** @@ -181,12 +181,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'payrun' => 'payrun', + 'isDraft' => 'isDraft', 'lines' => 'lines', + 'payrun' => 'payrun', 'report' => 'report', 'taxYear' => 'taxYear', - 'title' => 'title', - 'isDraft' => 'isDraft' + 'title' => 'title' ]; /** @@ -195,12 +195,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'payrun' => 'setPayrun', + 'isDraft' => 'setIsDraft', 'lines' => 'setLines', + 'payrun' => 'setPayrun', 'report' => 'setReport', 'taxYear' => 'setTaxYear', - 'title' => 'setTitle', - 'isDraft' => 'setIsDraft' + 'title' => 'setTitle' ]; /** @@ -209,12 +209,12 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'payrun' => 'getPayrun', + 'isDraft' => 'getIsDraft', 'lines' => 'getLines', + 'payrun' => 'getPayrun', 'report' => 'getReport', 'taxYear' => 'getTaxYear', - 'title' => 'getTitle', - 'isDraft' => 'getIsDraft' + 'title' => 'getTitle' ]; /** @@ -273,12 +273,12 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('payrun', $data ?? [], null); + $this->setIfExists('isDraft', $data ?? [], null); $this->setIfExists('lines', $data ?? [], null); + $this->setIfExists('payrun', $data ?? [], null); $this->setIfExists('report', $data ?? [], null); $this->setIfExists('taxYear', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('isDraft', $data ?? [], null); } /** @@ -324,28 +324,28 @@ public function valid(): bool /** - * Gets payrun + * Gets isDraft * - * @return \SynergiTech\Staffology\Model\PayRun|null + * @return bool|null */ - public function getPayrun(): ?\SynergiTech\Staffology\Model\PayRun + public function getIsDraft(): ?bool { - return $this->container['payrun']; + return $this->container['isDraft']; } /** - * Sets payrun + * Sets isDraft * - * @param \SynergiTech\Staffology\Model\PayRun|null $payrun payrun + * @param bool|null $isDraft isDraft * * @return $this */ - public function setPayrun(?\SynergiTech\Staffology\Model\PayRun $payrun): static + public function setIsDraft(?bool $isDraft): static { - if (is_null($payrun)) { - throw new InvalidArgumentException('non-nullable payrun cannot be null'); + if (is_null($isDraft)) { + throw new InvalidArgumentException('non-nullable isDraft cannot be null'); } - $this->container['payrun'] = $payrun; + $this->container['isDraft'] = $isDraft; return $this; } @@ -384,6 +384,33 @@ public function setLines(?array $lines): static return $this; } + /** + * Gets payrun + * + * @return \SynergiTech\Staffology\Model\PayRun|null + */ + public function getPayrun(): ?\SynergiTech\Staffology\Model\PayRun + { + return $this->container['payrun']; + } + + /** + * Sets payrun + * + * @param \SynergiTech\Staffology\Model\PayRun|null $payrun payrun + * + * @return $this + */ + public function setPayrun(?\SynergiTech\Staffology\Model\PayRun $payrun): static + { + if (is_null($payrun)) { + throw new InvalidArgumentException('non-nullable payrun cannot be null'); + } + $this->container['payrun'] = $payrun; + + return $this; + } + /** * Gets report * @@ -471,33 +498,6 @@ public function setTitle(?string $title): static return $this; } - - /** - * Gets isDraft - * - * @return bool|null - */ - public function getIsDraft(): ?bool - { - return $this->container['isDraft']; - } - - /** - * Sets isDraft - * - * @param bool|null $isDraft isDraft - * - * @return $this - */ - public function setIsDraft(?bool $isDraft): static - { - if (is_null($isDraft)) { - throw new InvalidArgumentException('non-nullable isDraft cannot be null'); - } - $this->container['isDraft'] = $isDraft; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/YtdReportReportResponse.php b/src/Model/YtdReportReportResponse.php index eefd506..1ea9104 100644 --- a/src/Model/YtdReportReportResponse.php +++ b/src/Model/YtdReportReportResponse.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -60,10 +60,10 @@ class YtdReportReportResponse implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ - 'type' => 'string', 'content' => 'string', 'model' => '\SynergiTech\Staffology\Model\YtdReport', - 'stream' => 'string' + 'stream' => 'string', + 'type' => 'string' ]; /** @@ -72,10 +72,10 @@ class YtdReportReportResponse implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'content' => null, 'model' => null, - 'stream' => 'byte' + 'stream' => 'byte', + 'type' => null ]; /** @@ -84,10 +84,10 @@ class YtdReportReportResponse implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPINullables = [ - 'type' => true, 'content' => true, 'model' => false, - 'stream' => true + 'stream' => true, + 'type' => true ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'content' => 'content', 'model' => 'model', - 'stream' => 'stream' + 'stream' => 'stream', + 'type' => 'type' ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'content' => 'setContent', 'model' => 'setModel', - 'stream' => 'setStream' + 'stream' => 'setStream', + 'type' => 'setType' ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'content' => 'getContent', 'model' => 'getModel', - 'stream' => 'getStream' + 'stream' => 'getStream', + 'type' => 'getType' ]; /** @@ -262,10 +262,10 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('content', $data ?? [], null); $this->setIfExists('model', $data ?? [], null); $this->setIfExists('stream', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -310,40 +310,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return string|null - */ - public function getType(): ?string - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report - * - * @return $this - */ - public function setType(?string $type): static - { - if (is_null($type)) { - array_push($this->openAPINullablesSetToNull, 'type'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('type', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets content * @@ -438,6 +404,40 @@ public function setStream(?string $stream): static return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type [readonly] The content-type, this would usually be the same as the accept header you provided when you requested the report + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + array_push($this->openAPINullablesSetToNull, 'type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/YtdValue.php b/src/Model/YtdValue.php index 803790d..43e4978 100644 --- a/src/Model/YtdValue.php +++ b/src/Model/YtdValue.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class YtdValue implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => '\SynergiTech\Staffology\Model\PayrollValueType', 'broughtForward' => 'float', 'period' => 'float', + 'type' => '\SynergiTech\Staffology\Model\PayrollValueType', 'value' => 'float' ]; @@ -71,9 +71,9 @@ class YtdValue implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPIFormats = [ - 'type' => null, 'broughtForward' => 'double', 'period' => 'double', + 'type' => null, 'value' => 'double' ]; @@ -83,9 +83,9 @@ class YtdValue implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPINullables = [ - 'type' => false, 'broughtForward' => false, 'period' => false, + 'type' => false, 'value' => false ]; @@ -175,9 +175,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $attributeMap = [ - 'type' => 'type', 'broughtForward' => 'broughtForward', 'period' => 'period', + 'type' => 'type', 'value' => 'value' ]; @@ -187,9 +187,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $setters = [ - 'type' => 'setType', 'broughtForward' => 'setBroughtForward', 'period' => 'setPeriod', + 'type' => 'setType', 'value' => 'setValue' ]; @@ -199,9 +199,9 @@ public function isNullableSetToNull(string $property): bool * @var array */ protected static array $getters = [ - 'type' => 'getType', 'broughtForward' => 'getBroughtForward', 'period' => 'getPeriod', + 'type' => 'getType', 'value' => 'getValue' ]; @@ -261,9 +261,9 @@ public function getModelName(): string */ public function __construct(?array $data = null) { - $this->setIfExists('type', $data ?? [], null); $this->setIfExists('broughtForward', $data ?? [], null); $this->setIfExists('period', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); } @@ -309,33 +309,6 @@ public function valid(): bool } - /** - * Gets type - * - * @return \SynergiTech\Staffology\Model\PayrollValueType|null - */ - public function getType(): ?\SynergiTech\Staffology\Model\PayrollValueType - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \SynergiTech\Staffology\Model\PayrollValueType|null $type type - * - * @return $this - */ - public function setType(?\SynergiTech\Staffology\Model\PayrollValueType $type): static - { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); - } - $this->container['type'] = $type; - - return $this; - } - /** * Gets broughtForward * @@ -390,6 +363,33 @@ public function setPeriod(?float $period): static return $this; } + /** + * Gets type + * + * @return \SynergiTech\Staffology\Model\PayrollValueType|null + */ + public function getType(): ?\SynergiTech\Staffology\Model\PayrollValueType + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \SynergiTech\Staffology\Model\PayrollValueType|null $type type + * + * @return $this + */ + public function setType(?\SynergiTech\Staffology\Model\PayrollValueType $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + /** * Gets value * diff --git a/src/Model/ZeroPaidFilter.php b/src/Model/ZeroPaidFilter.php index 24a346b..b7489ad 100644 --- a/src/Model/ZeroPaidFilter.php +++ b/src/Model/ZeroPaidFilter.php @@ -15,9 +15,9 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ /** diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 5b5d800..51c22c6 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -15,11 +15,10 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 - * Contact: duane@staffology.co.uk + * Contact: hello@staffology.co.uk * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.13.0-SNAPSHOT + * Generator version: 7.20.0-SNAPSHOT */ - /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech